[
  {
    "repo": "vllm-project/vllm",
    "number": 31787,
    "title": "[Usage]: How to set different attention backend for prefill and decode phases?",
    "body": "### Your current environment\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Alibaba Cloud Linux 3 (Soaring Falcon) (x86_64)\nGCC version                  : (GCC) 10.2.1 20200825 (Alibaba 10.2.1-3.8 2.32)\nClang version                : Could not collect\nCMake version                : version 3.31.2\nLibc version                 : glibc-2.32\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0] (64-bit runtime)\nPython platform              : Linux-5.10.134-16.3.al8.x86_64-x86_64-with-glibc2.32\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.61\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : \nGPU 0: NVIDIA H20\nGPU 1: NVIDIA H20\nGPU 2: NVIDIA H20\nGPU 3: NVIDIA H20\nGPU 4: NVIDIA H20\nGPU 5: NVIDIA H20\nGPU 6: NVIDIA H20\nGPU 7: NVIDIA H20\n\nNvidia driver version        : 535.183.06\ncuDNN version                : Probably one of the following:\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn.so.9.7.1\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn_adv.so.9.7.1\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn_cnn.so.9.7.1\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn_engines_precompiled.so.9.7.1\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn_engines_runtime_compiled.so.9.7.1\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn_graph.so.9.7.1\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn_heuristic.so.9.7.1\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn_ops.so.9.7.1\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\n\u67b6\u6784\uff1a           x86_64\nCPU \u8fd0\u884c\u6a21\u5f0f\uff1a   32-bit, 64-bit\n\u5b57\u8282\u5e8f\uff1a         Little Endian\nCPU:             192\n\u5728\u7ebf CPU \u5217\u8868\uff1a  0-191\n\u6bcf\u4e2a\u6838\u7684\u7ebf\u7a0b\u6570\uff1a 2\n\u6bcf\u4e2a\u5ea7\u7684\u6838\u6570\uff1a   48\n\u5ea7\uff1a             2\nNUMA \u8282\u70b9\uff1a      2\n\u5382\u5546 ID\uff1a        GenuineIntel\nCPU \u7cfb\u5217\uff1a       6\n\u578b\u53f7\uff1a           143\n\u578b\u53f7\u540d\u79f0\uff1a       Intel(R) Xeon(R) Platinum 8469C\n\u6b65\u8fdb\uff1a           8\nCPU MHz\uff1a        3100.000\nCPU \u6700\u5927 MHz\uff1a   3800.0000\nCPU \u6700\u5c0f MHz\uff1a   800.0000\nBogoMIPS\uff1a       5200.00\n\u865a\u62df\u5316\uff1a         VT-x\nL1d \u7f13\u5b58\uff1a       48K\nL1i \u7f13\u5b58\uff1a       32K\nL2 \u7f13\u5b58\uff1a        2048K\nL3 \u7f13\u5b58\uff1a        99840K\nNUMA \u8282\u70b90 CPU\uff1a 0-47,96-143\nNUMA \u8282\u70b91 CPU\uff1a 48-95,144-191\n\u6807\u8bb0\uff1a           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm uintr md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-python==0.4.1\n[pip3] numpy==1.26.4\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cudnn-frontend==1.15.0\n[pip3] nvidia-cufft-cu12==11.3.3.83\n[pip3] nvidia-cufile-cu12==1.13.1.3\n[pip3] nvidia-curand-cu12==10.3.9.90\n[pip3] nvidia-cusolver-cu12==11.7.3.90\n[pip3] nvidia-cusparse-cu12==12.5.8.93\n[pip3] nvidia-cusparselt-cu12==0.7.1\n[pip3] nvidia-cutlass-dsl==4.2.1\n[pip3] nvidia-ml-py==13.580.82\n[pip3] nvidia-nccl-cu12==2.27.3\n[pip3] nvidia-nvjitlink-cu12==12.8.93\n[pip3] nvidia-nvtx-cu12==12.8.90\n[pip3] pyzmq==27.1.0\n[pip3] torch==2.8.0\n[pip3] torch_memory_saver==0.0.9\n[pip3] torchao==0.9.0\n[pip3] torchaudio==2.8.0\n[pip3] torchvision==0.23.0\n[pip3] transformers==4.57.1\n[pip3] triton==3.4.0\n[conda] flashinfer-python         0.",
    "url": "https://github.com/vllm-project/vllm/issues/31787",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2026-01-06T07:33:18Z",
    "updated_at": "2026-01-06T07:33:18Z",
    "comments": 0,
    "user": "stormchasingg"
  },
  {
    "repo": "pytorch/audio",
    "number": 4165,
    "title": "Does TorchAudio include any RISC-V / RVV specific optimizations?",
    "body": "### \ud83d\ude80 The feature\n\nHi TorchAudio maintainers,\n\nI would like to ask whether TorchAudio currently contains any architecture-specific optimizations for RISC-V, especially for the RISC-V Vector Extension (RVV).\n\nSo far, I have checked the TorchAudio (audio-2.8.0) repository and observed that:\n- There are no RISC-V or RVV related source files or directories.\n- No RVV intrinsics (e.g. vsetvli, vle*, vfmul*) or `<riscv_vector.h>` usage is present.\n- No RISC-V\u2013specific conditional compilation or CMake logic is found.\n- TorchAudio code mainly relies on PyTorch tensor operations, with no explicit CPU kernel implementations inside TorchAudio itself.\n\nBased on this, my understanding is that:\n- TorchAudio does not include RISC-V / RVV specific optimizations.\n- Any RISC-V or RVV performance would come from PyTorch core (ATen / CPU backend) or compiler auto-vectorization, rather than TorchAudio.\n\nCould you please help confirm whether this understanding is correct?\nAdditionally, are there any plans or discussions to introduce RISC-V / RVV\u2013specific optimizations in TorchAudio in the future?\n\nThank you very much for your time and clarification.\n\n\n### Motivation, pitch\n\nI am currently evaluating TorchAudio on RISC-V platforms and investigating whether there are any existing architecture-specific optimizations, particularly related to the RISC-V Vector Extension (RVV).\n\nDuring my review of the TorchAudio (audio-2.8.0) source code, I did not find any RISC-V or RVV\u2013specific implementations, intrinsics, or conditional compilation logic. Since TorchAudio relies heavily on PyTorch for performance-critical computation, I would like to confirm whether this understanding is correct.\n\nThe motivation for this question is to better understand the current optimization scope of TorchAudio on RISC-V, and to determine whether any performance considerations or future work related to RISC-V / RVV should be expected at the TorchAudio level, or if such efforts are entirely handled within PyTorch core.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/audio/issues/4165",
    "state": "open",
    "labels": [],
    "created_at": "2026-01-06T07:24:55Z",
    "updated_at": "2026-01-06T07:24:55Z",
    "comments": 0,
    "user": "zhouying12"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 16546,
    "title": "[RFC] SGLang-Omni Design",
    "body": "API Design: @shuaills \nProposal Draft: @FrankLeeeee @sleepcoo \n\n\n## Motivation\n\nRecent models, no matter open-source or proprietary, have the tendency to become more multi-modal than ever before. That is, models have the ability to process data in more than two modalities. For example, Gemini can have inputs of text, image, video and audio and can output text, image and audio as well. In  the open-source domain, Qwen-Omni can do something similar as well. In several openly held talks, researchers from tech giants have expressed their expectation of omni-style models in the coming year 2026. Therefore, the SGLang team thinks that it will be important to introduce new modules to accommodate these coming models.\n\n## Background\n\nAn omni model is typically featured by multi-modal inputs and multi-modal outputs. An example of Qwen/Qwen2.5-Omni-7B is given below. The model can take text, audio and video as inputs and output text and audio.\n\n<img width=\"1280\" height=\"1195\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1ab6f1f5-4282-4944-a502-dd252459dc8b\" />\n\n## Design Considerations\n\n### Stage Placement\n\nCompared to LLM, one significant characteristic of omni-style model is that it has much more component models. For example, Qwen2.5-Omni has 6 components (2 encoders, thinker, talker, codec decoder). Thus, one particular challenge of omni model is how to place these components. Some questions can be raised when placing these models:\n1. In what case we put all components in one process?\n2. In what case we disaggregate the components?\n3. How to support flexible placements?\n4. How to support replicated replacement? For example, we want to host N instances of talker and M instances of thinkers for a single deployment and how should we do it?\n\n### Data Flow Control\n\nOmni models have more data flow paths compared to LLMs or diffusion models. For example, Qwen2.5-Omni can have 8 ways of using this model. This drastically increases the complexity for system design for this kind of model, espeically for scheduling.\n\n\nInputs | Outputs\n-- | --\nText | Text\nText + Vision | Text\nText + Audio | Text\nText + Vision + Audio | Text\nText | Text + Audio\nText + Vision | Text + Audio\nText + Audio | Text + Audio\nText + Vision + Audio | Text + Audio\n\n\n## Design Details\n\n<img width=\"4428\" height=\"4134\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/7aea26b8-4bcc-45ef-a70a-2f1ac3e042f4\" />\n\n### Intra and Inter Disaggregation\n\nWhen it comes to more than 1 component models, an intuitive thought is to place each stage on a distinct process which exclusively owns one or more independent GPUs. However, disaggregation can also occur within the stage, for example, we might place different encoders on different processes for the encoding stage, another example is PD disggregation in LLMs. Thus, we can simplify the design with inter- and intra-disaggregation and re-use the existing implementations of PD disaggregation in SGLang.\n- Inter-Disaggregation: We split the entire model into multiple stages and each stage runs its own scheduling and execution logic. The tensors are communicated between stages via Mooncake or shared memory.\n- Intra-Disaggregation: The model(s) in the same stage are split into multiple processes, e.g. PD Disaggregation. The implementation is not controlled by SGLang-Omni directly and it is only required for the stage to place their outputs into the message queue for the next stage to retrieve. In this way, the developer can customize their own way of intra-stage disaggregation and re-use some of the existing schemes.\n\n### Multi-Scheduling\n\nEach stage can have its own scheduling strategies, e.g. Continuous batching, static grouping, etc. \n\n### Multi-Path\n\nAs omni models have various data flows, we need to group them by type first:\n\n\nType | Description | Example | How to handle it?\n-- | -- | -- | --\nEarly End | The execution stops at an intermediate stage | when the qwen-omni model only outputs text, it does not need to go through the audio module. | We need to create a P2P connection from the all potential endings stages to the main process so that we can pass the data directly without going through unrequired stages.\nCyclic Flow | The data might be transfered to the previous stage | VibeVoice implements a cyclic dataflow where the diffusion head's output is fed back to the LLM for the next generation step, creating a continuous loop during inference. | We can specify the destination to the previous stage in object message queue\nMultiple Receivers | A stage's output needs to be sent to multiple receiving stages. | Fun-Audio-Chat: During generation, the hidden states from the shared LLM layer are passed in parallel to a Text Head for text token prediction and a Speech Refined Head (SRH) to generate high-quality speech tokens at 25Hz resolution. | We can specify multiple destinations in object message queue\n\n## Multi-instance\n\nDue to the presence of multiple component models, it can be observed that eac",
    "url": "https://github.com/sgl-project/sglang/issues/16546",
    "state": "open",
    "labels": [],
    "created_at": "2026-01-06T06:23:37Z",
    "updated_at": "2026-01-06T07:14:36Z",
    "comments": 0,
    "user": "FrankLeeeee"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31766,
    "title": "[Docs] Feedback for `/en/latest/contributing/profiling/`",
    "body": "### \ud83d\udcda The doc issue\n\nWhen I follow this doc and run OpenAI Server[\u00b6](https://docs.vllm.ai/en/latest/contributing/profiling/#openai-server), I found \n> usage: vllm [-h] [-v] {chat,complete,serve,bench,collect-env,run-batch} ...\n> vllm: error: unrecognized arguments: --profiler-config {\"profiler\": \"torch\", \"torch_profiler_dir\": \"/workspace/vllm_profile\"} \n\nI want to know if this update in the newer version?\n\n### Suggest a potential alternative/fix\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31766",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2026-01-06T03:15:37Z",
    "updated_at": "2026-01-06T03:15:37Z",
    "comments": 0,
    "user": "cyk2018"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1926,
    "title": "[bug] Why is Apple's development for computers with Inter chips not supported in versions above 0.30.0",
    "body": "Why is Apple's development for computers with Inter chips not supported in versions above 0.30.0\uff1f",
    "url": "https://github.com/huggingface/tokenizers/issues/1926",
    "state": "open",
    "labels": [],
    "created_at": "2026-01-06T03:11:35Z",
    "updated_at": "2026-01-06T03:18:03Z",
    "comments": 1,
    "user": "sustly"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 16530,
    "title": "[Bug] DecodingStage VRAM usage surges dramatically",
    "body": "### Checklist\n\n- [ ] I searched related issues but found no solution.\n- [ ] The bug persists in the latest version.\n- [ ] Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.\n- [ ] If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [ ] Please use English. Otherwise, it will be closed.\n\n### Describe the bug\n\nPeak GPU memory: 21.18 GB, Remaining GPU memory at peak: 18.82 GB. Components that can stay resident: ['text_encoder', 'vae', 'transformer']\n[01-06 02:01:47] Failed to generate output for prompt 1: CUDA out of memory. Tried to allocate 1.22 GiB. GPU 0 has a total capacity of 39.49 GiB of which 371.00 MiB is free. Including non-PyTorch memory, this process has 2.92 GiB memory in use. Process 35135 has 36.14 GiB memory in use. Of the allocated memory 2.44 GiB is allocated by PyTorch, and 0 bytes is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)\nTraceback (most recent call last):\n  File \"/sgl-workspace/sglang/python/sglang/multimodal_gen/runtime/utils/logging_utils.py\", line 466, in log_generation_timer\n    yield timer\n  File \"/sgl-workspace/sglang/python/sglang/multimodal_gen/runtime/entrypoints/diffusion_generator.py\", line 231, in generate\n    frames = post_process_sample(\n             ^^^^^^^^^^^^^^^^^^^^\n  File \"/sgl-workspace/sglang/python/sglang/multimodal_gen/runtime/entrypoints/utils.py\", line 73, in post_process_sample\n    sample = (sample * 255).clamp(0, 255).to(torch.uint8)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ntorch.OutOfMemoryError: CUDA out of memory. Tried to allocate 1.22 GiB. GPU 0 has a total capacity of 39.49 GiB of which 371.00 MiB is free. Including non-PyTorch memory, this process has 2.92 GiB memory in use. Process 35135 has 36.14 GiB memory in use. Of the allocated memory 2.44 GiB is allocated by PyTorch, and 0 bytes is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)\n[01-06 02:01:47] Completed batch processing. Generated 0 outputs in 375.74 seconds.\n[01-06 02:01:47] Generator was garbage collected without being shut down. Attempting to shut down the local server and client.\n/usr/lib/python3.12/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown\n\n\n### Reproduction\n\nsglang generate --model-path /data/models/Wan2.2-TI2V-5B-Diffusers --text-encoder-precisions bf16 --dit-precision bf16 --vae-precision fp32 --dit-cpu-offload --vae-cpu-offload --text-encoder-cpu-offload --image-encoder-cpu-offload --pin-cpu-memory --num-gpus 1 --prompt \"Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage.\" --num-frames 121 --fps 24 --num-inference-steps 50 --save-output   --output-path output --output-file-name wan_ti2v.mp4 --dit-layerwise-offload\n\n### Environment\n\nPython: 3.12.3 (main, Nov  6 2025, 13:44:16) [GCC 13.3.0]\nCUDA available: True\nGPU 0,1,2,3: NVIDIA A100-PCIE-40GB\nGPU 0,1,2,3 Compute Capability: 8.0\nCUDA_HOME: /usr/local/cuda\nNVCC: Cuda compilation tools, release 12.9, V12.9.86\nCUDA Driver Version: 590.44.01\nPyTorch: 2.9.1+cu129\nsglang: 0.5.7\nsgl_kernel: 0.3.20\nflashinfer_python: 0.5.3\nflashinfer_cubin: 0.5.3\nflashinfer_jit_cache: 0.5.3+cu129\ntriton: 3.5.1\ntransformers: 4.57.1\ntorchao: 0.9.0\nnumpy: 2.4.0\naiohttp: 3.13.2\nfastapi: 0.128.0\nhf_transfer: 0.1.9\nhuggingface_hub: 0.36.0\ninteregular: 0.3.3\nmodelscope: 1.33.0\norjson: 3.11.5\noutlines: 0.1.11\npackaging: 25.0\npsutil: 7.2.1\npydantic: 2.12.5\npython-multipart: 0.0.21\npyzmq: 27.1.0\nuvicorn: 0.40.0\nuvloop: 0.22.1\nvllm: Module Not Found\nxgrammar: 0.1.27\nopenai: 2.6.1\ntiktoken: 0.12.0\nanthropic: 0.75.0\nlitellm: Module Not Found\ndecord2: 3.0.0\nNVIDIA Topology: \n\tGPU0\tGPU1\tGPU2\tGPU3\tNIC0\tNIC1\tNIC2\tNIC3\tNIC4\tNIC5\tNIC6\tNIC7\tCPU Affinity\tNUMA Affinity\tGPU NUMA ID\nGPU0\t X \tPIX\tSYS\tSYS\tNODE\tNODE\tPIX\tPIX\tSYS\tSYS\tSYS\tSYS\t0-27,56-83\t0\t\tN/A\nGPU1\tPIX\t X \tSYS\tSYS\tNODE\tNODE\tPIX\tPIX\tSYS\tSYS\tSYS\tSYS\t0-27,56-83\t0\t\tN/A\nGPU2\tSYS\tSYS\t X \tPIX\tSYS\tSYS\tSYS\tSYS\tPIX\tPIX\tNODE\tNODE\t28-55,84-111\t1\t\tN/A\nGPU3\tSYS\tSYS\tPIX\t X \tSYS\tSYS\tSYS\tSYS\tPIX\tPIX\tNODE\tNODE\t28-55,84-111\t1\t\tN/A\nNIC0\tNODE\tNODE\tSYS\tSYS\t X \tPIX\tNODE\tNODE\tSYS\tSYS\tSYS\tSYS\t\t\t\t\nNIC1\tNODE\tNODE\tSYS\tSYS\tPIX\t X \tNODE\tNODE\tSYS\tSYS\tSYS\tSYS\t\t\t\t\nNIC2\tPIX\tPIX\tSYS\tSYS\tNODE\tNODE\t X \tPIX\tSYS\tSYS\tSYS\tSYS\t\t\t\t\nNIC3\tPIX\tPIX\tSYS\tSYS\tNODE\tNODE\tPIX\t X \tSYS\tSYS\tSYS\tSYS\t\t\t\t\nNIC4\tSYS\tSYS\tPIX\tPIX\tSYS\tSYS\tSYS\tSYS\t X \tPIX\tNODE\tNODE\t\t\t\t\nNIC5\tSYS\tSYS\tPIX\tPIX\tSYS\tSYS\tSYS\tSYS\t",
    "url": "https://github.com/sgl-project/sglang/issues/16530",
    "state": "open",
    "labels": [],
    "created_at": "2026-01-06T02:15:16Z",
    "updated_at": "2026-01-06T02:15:16Z",
    "comments": 0,
    "user": "carloszhang999"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2753,
    "title": "Debugging poor eval with SmoVLA and two cameras.",
    "body": "### Ticket Type\n\n\u2753 Technical Question\n\n### Environment & System Info\n\n```Shell\n- Lerobot running on a Jetson Orin nano Super\n- Model trained on a 4090\n- SO-ARM-101 model.\n- two cameras setup (wrist and top view)\n```\n\n### Description\n\nI just trained a 30K steps SmoVLA model from a 73 episodes dataset (which are a 2 merged datasets I had). These two datasets were used the same SO-ARM-101 with two set of cameras (wrist and top).\nI downloaded from HF the model and after a couple of hiccups because of the missing third camera I made it run on my Jetson Orin Nano Super (the machine I'm using for the robot, the training is on my 4090).\nBut the arm just moved a centimeter and then kept idle.\n\nI'm trying to debug what could have caused this:\nIt was because I'm running on my Jetson and SMOLVLA is too much for this little board? (I don't think so, but maybe?)\nMaybe merging the datasets created more noise than helped? (the datasets were recorded in different times of the day)\nthe fact that I only have two cameras and had to remap the cameras and create a dummy third camera for the third camera parameter might have confused the model?\n\nanyone has any insight to give? Thanks in advance!\n\n### Context & Reproduction\n\ncollected datasets (two datasets)\nmerged datasets into one and uploaded to HF\ntrained a model based on smovla-base (had to create a dummy camera for the third camera)\nrun on the jetson orin the trained model.\n\n### Relevant logs or stack trace\n\n```Shell\n\n```\n\n### Checklist\n\n- [x] I have searched existing tickets to ensure this isn't a duplicate.\n- [x] I am using the latest version of the `main` branch.\n- [x] I have verified this is not an environment-specific problem.\n\n### Additional Info / Workarounds\n\n_No response_",
    "url": "https://github.com/huggingface/lerobot/issues/2753",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "dataset",
      "sensors",
      "training",
      "evaluation"
    ],
    "created_at": "2026-01-05T18:25:13Z",
    "updated_at": "2026-01-05T18:25:27Z",
    "user": "vettorazi"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31726,
    "title": "[Usage]: Why does `vllm serve` keep filling up my system disk when loading a model from a network mount?",
    "body": "\n### Your current environment\n```\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version                : Could not collect\nCMake version                : version 3.22.1\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.11.10 (main, Oct  3 2024, 07:29:13) [GCC 11.2.0] (64-bit runtime)\nPython platform              : Linux-5.10.134-18.0.5.lifsea8.x86_64-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.4.131\nCUDA_MODULE_LOADING set to   :\nGPU models and configuration :\nGPU 0: NVIDIA H20\nGPU 1: NVIDIA H20\nGPU 2: NVIDIA H20\nGPU 3: NVIDIA H20\nGPU 4: NVIDIA H20\nGPU 5: NVIDIA H20\nGPU 6: NVIDIA H20\nGPU 7: NVIDIA H20\n\nNvidia driver version        : 560.35.03\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.0\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                       x86_64\nCPU op-mode(s):                     32-bit, 64-bit\nAddress sizes:                      52 bits physical, 57 bits virtual\nByte Order:                         Little Endian\nCPU(s):                             192\nOn-line CPU(s) list:                0-191\nVendor ID:                          GenuineIntel\nModel name:                         Intel(R) Xeon(R) Platinum 8469C\nCPU family:                         6\nModel:                              143\nThread(s) per core:                 2\nCore(s) per socket:                 48\nSocket(s):                          2\nStepping:                           8\nCPU max MHz:                        3800.0000\nCPU min MHz:                        800.0000\nBogoMIPS:                           5200.00\nFlags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ibrs_enhanced fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd ida arat hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm uintr md_clear serialize tsxldtrk amx_bf16 avx512_fp16 amx_tile amx_int8 arch_capabilities\nHypervisor vendor:                  KVM\nVirtualization type:                full\nL1d cache:                          4.5 MiB (96 instances)\nL1i cache:                          3 MiB (96 instances)\nL2 cache:                           192 MiB (96 instances)\nL3 cache:                           195 MiB (2 instances)\nNUMA node(s):                       2\nNUMA node0 CPU(s):                  0-95\nNUMA node1 CPU(s):                  96-191\nVulnerability Itlb multihit:        Not affected\nVulnerability L1tf:                 Not affected\nVulnerability Mds:                  Not affected\nVulnerability Meltdown:             Not affected\nVulnerability Mmio stale data:      Not affected\nVulnerability Retbleed:             Not affected\nVulnerability Spec rstack overflow: Not affected\nVulnerability Spec store bypass:    Vulnerable\nVulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:           Mitigation; Enhanced / Automatic IBRS, RSB filling, PBRSB-eIBRS SW sequence\nVulnerability Srbds:                Not affected\nVulnerability Tsx async abort:      Not affected\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] botorch==0.8.5\n[pip3] flashinfer-py",
    "url": "https://github.com/vllm-project/vllm/issues/31726",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2026-01-05T14:50:19Z",
    "updated_at": "2026-01-05T15:30:39Z",
    "comments": 5,
    "user": "tingjun-cs"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12913,
    "title": "Is Lumina2Pipeline's mu calculation correct?",
    "body": "### Describe the bug\n\nDescription\n\nWhile reviewing the current main-branch implementation of pipeline_lumina2, I noticed a potential bug in the calculation of mu within the pipeline's __call__.\n\nIn the following section of the code:\n\nhttps://github.com/huggingface/diffusers/blob/5ffb65803d0ddc5e3298c35df638ceed5e580922/src/diffusers/pipelines/lumina2/pipeline_lumina2.py#L484-L503\n\nThe latent tensor appears to have the shape:\n\n(batch_size, num_channels_latents, height, width)\n\n\nHowever, later in the same file:\n\nhttps://github.com/huggingface/diffusers/blob/5ffb65803d0ddc5e3298c35df638ceed5e580922/src/diffusers/pipelines/lumina2/pipeline_lumina2.py#L699-L706\n\nthe value latent.shape[1] (i.e., num_channels_latents) is passed as the argument for image_seq_len when computing mu.\nThis seems incorrect, since image_seq_len should represent the number of image tokens or sequence length, not the number of latent channels.\n\nExpected Behavior\n\nimage_seq_len should likely correspond to the number of spatial tokens derived from (height, width) (or another tokenization step), rather than the number of latent channels.\n\nActual Behavior\n\nThe current implementation uses latent.shape[1] as image_seq_len, which likely leads to unintended behavior in the computation of mu and subsequent sampling steps.\n\nSuggested Fix\n\nReview the logic where image_seq_len is passed, and ensure it reflects the correct sequence length dimension (possibly derived from spatial resolution or token count, rather than channel count).\n\n### Reproduction\n\nAt the moment, I don\u2019t have a copy/paste runnable MRE because this was identified via manual logic review rather than reproducing the behavior in a runtime environment.\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nDiffusers==0.36.0\nPython==3.13\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/12913",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2026-01-05T14:30:01Z",
    "updated_at": "2026-01-05T18:07:36Z",
    "comments": 1,
    "user": "hwangdonghyun"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 171687,
    "title": "gfx1151 (Strix Halo) \u2014 LLM decode is ~90% hipMemcpyWithStream in FP16 & 4-bit; kernels not compute-bound",
    "body": "[benchmark-results_preauth.log](https://github.com/user-attachments/files/24424966/benchmark-results_preauth.log)\n\n### \ud83d\udc1b Describe the bug\n\nSummary\n\nOn gfx1151 (Strix Halo / Ryzen AI MAX 395), autoregressive LLM inference is consistently dominated by hipMemcpyWithStream during decode in both:\nFP16 / BF16 (no quantization)\n4-bit bitsandbytes quantized models\n\neven though:\nGEMM throughput benchmarks are normal\nGPU kernels dispatch continuously\nthe model and KV cache are resident on device\nbehavior is reproducible across HuggingFace models and configs\n\nDuring decode, ~92\u201395% of time is spent in host/device memcpy and only a small fraction in kernels. Token throughput is ~1.4\u20131.6 tok/s on a 70B model, which is far below what available compute bandwidth suggests.\n\nThis looks similar to prior reports where HuggingFace decode is memcpy-bound rather than compute-bound.\n\nHardware\nAMD Ryzen AI MAX 395 (Strix Halo APU)\nArchitecture: gfx1151\nMemory: LPDDR5 UMA\nUMA / VRAM reservation: 96 GB (tests repeated at 64 GB and AUTO)\n\nSoftware\nUbuntu 25.04\nROCm 7.10 / 7.11 (behavior same across versions tested)\nPyTorch ROCm wheels\nHuggingFace Transformers\nBitsandbytes (only for 4-bit runs \u2014 issue still occurs without it)\n\nTest conditions (to rule out confounders)\nThe behavior reproduces under:\nFP16 / BF16 (no quantization)\n4-bit (bitsandbytes)\nmodel.eval()\nuse_cache=True\ngreedy decode\ndevice_map={\"\": 0}\nKV cache on device\n\nWe confirmed it is not caused by:\nGEMM kernel throughput\nSDPA / Flash / Math attention backend selection\nquantization behavior\nCPU fallback execution\nOOM / retry logic\ntokenizer staging\n\nThe issue appears tied specifically to decode-time tensor residency / paging.\n\nWhat is working (compute path)\nGEMM performance looks normal at both 96 GB and 64 GB UMA:\n\n=== GEMM Benchmark (bf16, 4096x4096) ===\nUMA 96G\nAvg: 0.007659 s   ~17.94 TFLOP/s\n\nUMA 64G\nAvg: 0.007315 s   ~18.79 TFLOP/s\n\nSo compute kernels are healthy and do not appear to be the bottleneck.\n\nWhat is failing (decode path)\nAcross all UMA modes (96G / 64G / AUTO\u224864G), decode profiling shows:\n~92\u201395% in hipMemcpyWithStream\nonly ~4\u20136% in hipLaunchKernel\n\nThis is consistent across:\nFP16 / BF16 and 4-bit\nshort and long prompts\nmultiple runs\n\nExample (96G, 4-bit decode):\nhipMemcpyWithStream   95.47%\nhipLaunchKernel        4.37%\nSelf CPU total: ~42.7s\n\nExample (96G, FP16 decode):\nhipMemcpyWithStream   92.80%\nhipLaunchKernel        6.09%\nSelf CPU total: ~37.7s\n\n64G and AUTO (~64G) produce almost identical profiles.\n\nThis suggests decode-time tensors / KV cache are being re-materialized in host / UMA memory and copied back to the GPU on each generation step instead of remaining resident \u2014 even in the non-quantized FP16 path.\n\nHSA / rocminfo excerpt (gfx1151 APU memory pools)\n(excerpt preserved \u2014 full output attached)\n\nMemory Properties: APU\nCoherent Host Access: FALSE\nPool 1/2: GLOBAL (coarse / extended fine)\nSize: 100663296 KB (~96GB)\nAllocatable: TRUE\n\n<!-- Failed to upload \"rocm-info_preauth.txt\" -->\n\n[repro_4bit_decode_profiler.py](https://github.com/user-attachments/files/24424918/repro_4bit_decode_profiler.py)\n[repro_gemm_baseline.py](https://github.com/user-attachments/files/24424919/repro_gemm_baseline.py)\n[repro_fp16_decode_profiler.py](https://github.com/user-attachments/files/24424917/repro_fp16_decode_profiler.py)\n\n[rocm-info_preauth.log](https://github.com/user-attachments/files/24424935/rocm-info_preauth.log)\n\n.\n\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.9.1+rocm7.11.0a20251216\nIs debug build: False\nCUDA used to build PyTorch: N/A\nROCM used to build PyTorch: 7.2.53150-676f9ed34d\n\nOS: Ubuntu 25.04 (x86_64)\nGCC version: (Ubuntu 14.2.0-19ubuntu2) 14.2.0\nClang version: Could not collect\nCMake version: version 3.31.6\nLibc version: glibc-2.41\n\nPython version: 3.12.12 | packaged by conda-forge | (main, Oct 22 2025, 23:25:55) [GCC 14.3.0] (64-bit runtime)\nPython platform: Linux-6.16.12-061612-generic-x86_64-with-glibc2.41\nIs CUDA available: True\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to: \nGPU models and configuration: Radeon 8060S Graphics (gfx1151)\nNvidia driver version: Could not collect\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: 7.2.53150\nMIOpen runtime version: 3.5.1\nIs XNNPACK available: True\nCaching allocator config: N/A\n\nCPU:\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           48 bits physical, 48 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  32\nOn-line CPU(s) list:                     0-31\nVendor ID:                               AuthenticAMD\nModel name:                              AMD RYZEN AI MAX+ 395 w/ Radeon 8060S\nCPU family:                              26\nModel:                                   112\nThread(s) per core:                      2\nCore(s) per socket:                      16\nSocket(s):        ",
    "url": "https://github.com/pytorch/pytorch/issues/171687",
    "state": "open",
    "labels": [
      "module: rocm",
      "triaged"
    ],
    "created_at": "2026-01-04T23:53:11Z",
    "updated_at": "2026-01-05T12:45:47Z",
    "comments": 0,
    "user": "BellaDoggie"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31689,
    "title": "[Feature][Quantization][Help Wanted]: Clean up GPTQ + AWQ Quantization",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nWe are in process of cleaning up the quantization integrations in vllm (see the FusedMoE refactor PRs I am working on)\n\nIn general, this means we are trying to separate concerns of the quantization INTEGRATION (on disk format --- responsible for weight loading) from the quantization KERNEL (runtime format --- responsible for executing at runtime).\n\nFor GPTQ/AWQ, we have tech debt in that we have different quantization integrations (`gptq.py`, `gptq_marlin.py`, `awq.py`, `awq_marlin.py`, `wna16.py`, `cpuwna16.py`) and we use the `override_quantization_method` to select between them during initialization. This is generally hard to follow and is not adhereing to the abstractions we have in vllm.\n\nCurrently, some (but not all) quantization schemes follow the proper abstractions, where we have a full separating of concerns. Examples are:\n- [Fp8Moe](https://github.com/vllm-project/vllm/blob/b53b89fdb3f4a857eabee5091187cfa937502711/vllm/model_executor/layers/quantization/fp8.py#L722) which follows the proper structure to run a variety of different kernels hooked up to fp8 models\n- [CompressedTensorsWNA16](https://github.com/vllm-project/vllm/blob/b53b89fdb3f4a857eabee5091187cfa937502711/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py) which follows the proper structure to run a variety of different kernels hooked up to wna16 models\n\nWe need to apply this to gptq and awq.\n\n> WARNING: this is a significant undertaking and will be scrutinized heavily for code quality. The PR author should reach out to @robertgshaw2-redhat in slack to discuss design and on-going progress during the PR creation.\n\nThanks in advance for any help!!!\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31689",
    "state": "open",
    "labels": [
      "help wanted",
      "feature request"
    ],
    "created_at": "2026-01-04T20:56:04Z",
    "updated_at": "2026-01-06T04:42:19Z",
    "comments": 7,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31683,
    "title": "[Feature]: Error Logging Redesign",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nvLLM has a multiprocess architecture with:\n- API Server --> EngineCore --> [N] Workers\n\nAs a result, clean error message logging is challenging, since the error in the API server that occurs will often not be the root cause error. An example of this is at startup time:\n\n```\n(vllm) [robertgshaw2-redhat@nm-automation-h100-standalone-1-preserve vllm]$ just launch_cutlass_tensor\nVLLM_USE_DEEP_GEMM=0 VLLM_USE_FLASHINFER_MOE_FP8=1 VLLM_FLASHINFER_MOE_BACKEND=throughput chg run --gpus 2 --  vllm serve amd/Mixtral-8x7B-Instruct-v0.1-FP8-KV -tp 2 --port 8002 --max-model-len 8192\nReserved 2 GPU(s): [1 3] for command execution\n(APIServer pid=116718) INFO 01-04 14:48:03 [api_server.py:1277] vLLM API server version 0.13.0rc2.dev185+g00a8d7628\n(APIServer pid=116718) INFO 01-04 14:48:03 [utils.py:253] non-default args: {'model_tag': 'amd/Mixtral-8x7B-Instruct-v0.1-FP8-KV', 'port': 8002, 'model': 'amd/Mixtral-8x7B-Instruct-v0.1-FP8-KV', 'max_model_len': 8192, 'tensor_parallel_size': 2}\n(APIServer pid=116718) INFO 01-04 14:48:04 [model.py:522] Resolved architecture: MixtralForCausalLM\n(APIServer pid=116718) INFO 01-04 14:48:04 [model.py:1510] Using max model len 8192\n(APIServer pid=116718) WARNING 01-04 14:48:04 [vllm.py:1453] Current vLLM config is not set.\n(APIServer pid=116718) INFO 01-04 14:48:04 [scheduler.py:231] Chunked prefill is enabled with max_num_batched_tokens=2048.\n(APIServer pid=116718) INFO 01-04 14:48:04 [vllm.py:635] Disabling NCCL for DP synchronization when using async scheduling.\n(APIServer pid=116718) INFO 01-04 14:48:04 [vllm.py:640] Asynchronous scheduling is enabled.\n(APIServer pid=116718) INFO 01-04 14:48:05 [scheduler.py:231] Chunked prefill is enabled with max_num_batched_tokens=8192.\n(EngineCore_DP0 pid=116936) INFO 01-04 14:48:12 [core.py:96] Initializing a V1 LLM engine (v0.13.0rc2.dev185+g00a8d7628) with config: model='amd/Mixtral-8x7B-Instruct-v0.1-FP8-KV', speculative_config=None, tokenizer='amd/Mixtral-8x7B-Instruct-v0.1-FP8-KV', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=False, dtype=torch.bfloat16, max_seq_len=8192, download_dir=None, load_format=auto, tensor_parallel_size=2, pipeline_parallel_size=1, data_parallel_size=1, disable_custom_all_reduce=False, quantization=fp8, enforce_eager=False, kv_cache_dtype=auto, device_config=cuda, structured_outputs_config=StructuredOutputsConfig(backend='auto', disable_fallback=False, disable_any_whitespace=False, disable_additional_properties=False, reasoning_parser='', reasoning_parser_plugin='', enable_in_reasoning=False), observability_config=ObservabilityConfig(show_hidden_metrics_for_version=None, otlp_traces_endpoint=None, collect_detailed_traces=None, kv_cache_metrics=False, kv_cache_metrics_sample=0.01, cudagraph_metrics=False, enable_layerwise_nvtx_tracing=False, enable_mfu_metrics=False, enable_mm_processor_stats=False), seed=0, served_model_name=amd/Mixtral-8x7B-Instruct-v0.1-FP8-KV, enable_prefix_caching=True, enable_chunked_prefill=True, pooler_config=None, compilation_config={'level': None, 'mode': <CompilationMode.VLLM_COMPILE: 3>, 'debug_dump_path': None, 'cache_dir': '', 'compile_cache_save_format': 'binary', 'backend': 'inductor', 'custom_ops': ['none'], 'splitting_ops': ['vllm::unified_attention', 'vllm::unified_attention_with_output', 'vllm::unified_mla_attention', 'vllm::unified_mla_attention_with_output', 'vllm::mamba_mixer2', 'vllm::mamba_mixer', 'vllm::short_conv', 'vllm::linear_attention', 'vllm::plamo2_mamba_mixer', 'vllm::gdn_attention_core', 'vllm::kda_attention', 'vllm::sparse_attn_indexer'], 'compile_mm_encoder': False, 'compile_sizes': [], 'compile_ranges_split_points': [8192], 'inductor_compile_config': {'enable_auto_functionalized_v2': False, 'combo_kernels': True, 'benchmark_combo_kernel': True}, 'inductor_passes': {}, 'cudagraph_mode': <CUDAGraphMode.FULL_AND_PIECEWISE: (2, 1)>, 'cudagraph_num_of_warmups': 1, 'cudagraph_capture_sizes': [1, 2, 4, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 416, 432, 448, 464, 480, 496, 512], 'cudagraph_copy_inputs': False, 'cudagraph_specialize_lora': True, 'use_inductor_graph_partition': False, 'pass_config': {'fuse_norm_quant': False, 'fuse_act_quant': False, 'fuse_attn_quant': False, 'eliminate_noops': True, 'enable_sp': False, 'fuse_gemm_comms': False, 'fuse_allreduce_rms': False}, 'max_cudagraph_capture_size': 512, 'dynamic_shapes_config': {'type': <DynamicShapesType.BACKED: 'backed'>, 'evaluate_guards': False}, 'local_cache_dir': None}\n(EngineCore_DP0 pid=116936) WARNING 01-04 14:48:12 [multiproc_executor.py:882] Reducing Torch parallelism from 80 threads to 1 to avoid unnecessary CPU contention. Set OMP_NUM_THREADS in the external environment to tune this value as needed.\nINFO 01-04 14:48:20 [parallel_state.py:1214] world_size=2",
    "url": "https://github.com/vllm-project/vllm/issues/31683",
    "state": "open",
    "labels": [
      "help wanted",
      "feature request"
    ],
    "created_at": "2026-01-04T14:53:38Z",
    "updated_at": "2026-01-04T14:53:43Z",
    "comments": 0,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 16362,
    "title": "[Bug] Deepseekv3.2 detect eos when reasonging",
    "body": "### Checklist\n\n- [x] I searched related issues but found no solution.\n- [x] The bug persists in the latest version.\n- [x] Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.\n- [x] If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [ ] Please use English. Otherwise, it will be closed.\n\n### Describe the bug\n\nWhen making reasoning requests under the deepseekv3.2 model, it was found that randomly, only the reasoning content appears, while both the context and function call contents are empty. The probability of this happening is about 1/5. My request expects a function call to be returned.\nDuring debugging, it was discovered that an EOS was detected during the reasoning phase. Is there a convenient way to replace the EOS with </think>?\n\n### Reproduction\n\n/\n\n### Environment\n\n/",
    "url": "https://github.com/sgl-project/sglang/issues/16362",
    "state": "open",
    "labels": [],
    "created_at": "2026-01-04T02:43:14Z",
    "updated_at": "2026-01-04T02:43:14Z",
    "comments": 0,
    "user": "duzeyan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 171656,
    "title": "torch.distributed.pipelining fails on models having DynamicCache (esp. Llama)",
    "body": "### \ud83d\udc1b Describe the bug\n\ntorch.distributed.pipelining fails on model having DynamicCache.\n\nShould this work? It's pared down from the PiPPy Llama2 example from the documentation (https://docs.pytorch.org/docs/stable/distributed.pipelining.html#hugging-face-examples)\n\nOriginally I was trying to use Llama 3.1 but was having the same issue so I fell back to the example.\n\nIt looks like pipelining can't handle DynamicCache (and doesn't provide a fix).  From what I read they're pretty common in Huggingface models.  Is there an approach to making torch pipelining applicable?\n\n```\n[host:Pipeline] cat bug1.py\nimport os\nimport torch\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\nfrom torch.distributed.pipelining import SplitPoint, pipeline\n\nmodel_dir = \"NousResearch/Llama-2-7b-chat-hf\"\nwith torch.device('cpu') :\n  llama = AutoModelForCausalLM.from_pretrained(model_dir)\nprint(llama)\ntokenizer = AutoTokenizer.from_pretrained(model_dir)\ntokenizer.pad_token = tokenizer.eos_token\nmb_prompts = (\n    \"How do you\", \"I like to\",\n)  # microbatch size = 2\n\nrank = 0\nworld_size = 4\n\n# Cut model by equal number of layers per rank\nlayers_per_rank = llama.config.num_hidden_layers // world_size\nprint(f\"layers_per_rank = {layers_per_rank}\")\nsplit_spec = {\n    f\"model.layers.{i * layers_per_rank}\": SplitPoint.BEGINNING\n    for i in range(1, world_size)\n}\n\n# Create a pipeline representation from the model\nmb_inputs = tokenizer(mb_prompts, return_tensors=\"pt\", padding=True)\npipe = pipeline(llama, mb_args=(mb_inputs[\"input_ids\"],))\n\nprint(\"Pipe:\\n\", pipe)\n```\n\n```\n[host:Pipeline] python bug1.py\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [01:49<00:00, 54.80s/it]\nLlamaForCausalLM(\n  (model): LlamaModel(\n    (embed_tokens): Embedding(32000, 4096, padding_idx=0)\n    (layers): ModuleList(\n      (0-31): 32 x LlamaDecoderLayer(\n        (self_attn): LlamaAttention(\n          (q_proj): Linear(in_features=4096, out_features=4096, bias=False)\n          (k_proj): Linear(in_features=4096, out_features=4096, bias=False)\n          (v_proj): Linear(in_features=4096, out_features=4096, bias=False)\n          (o_proj): Linear(in_features=4096, out_features=4096, bias=False)\n        )\n        (mlp): LlamaMLP(\n          (gate_proj): Linear(in_features=4096, out_features=11008, bias=False)\n          (up_proj): Linear(in_features=4096, out_features=11008, bias=False)\n          (down_proj): Linear(in_features=11008, out_features=4096, bias=False)\n          (act_fn): SiLUActivation()\n        )\n        (input_layernorm): LlamaRMSNorm((4096,), eps=1e-05)\n        (post_attention_layernorm): LlamaRMSNorm((4096,), eps=1e-05)\n      )\n    )\n    (norm): LlamaRMSNorm((4096,), eps=1e-05)\n    (rotary_emb): LlamaRotaryEmbedding()\n  )\n  (lm_head): Linear(in_features=4096, out_features=32000, bias=False)\n)\nlayers_per_rank = 8\n/opt/AI/training-2.9.0/lib/python3.12/site-packages/torch/distributed/pipelining/_IR.py:1005: FutureWarning: `torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10. Please use `torch.export.export` instead, which is functionally equivalent.\n  ep = torch.export.export_for_training(\n/opt/AI/training-2.9.0/lib/python3.12/site-packages/torch/_dynamo/output_graph.py:1711: UserWarning: While exporting, we found certain side effects happened in the model.forward. Here are the list of potential sources you can double check: ['<unknown source>']\n  warnings.warn(\nTraceback (most recent call last):\n  File \"/opt/AI/training-2.9.0/lib/python3.12/site-packages/torch/distributed/pipelining/_IR.py\", line 1005, in _trace_with_export\n    ep = torch.export.export_for_training(\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/AI/training-2.9.0/lib/python3.12/site-packages/typing_extensions.py\", line 3004, in wrapper\n    return arg(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/AI/training-2.9.0/lib/python3.12/site-packages/torch/export/__init__.py\", line 154, in export_for_training\n    return _export_for_training(\n           ^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/AI/training-2.9.0/lib/python3.12/site-packages/torch/export/_trace.py\", line 1163, in wrapper\n    raise e\n  File \"/opt/AI/training-2.9.0/lib/python3.12/site-packages/torch/export/_trace.py\", line 1129, in wrapper\n    ep = fn(*args, **kwargs)\n         ^^^^^^^^^^^^^^^^^^^\n  File \"/opt/AI/training-2.9.0/lib/python3.12/site-packages/torch/export/exported_program.py\", line 124, in wrapper\n    return fn(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/opt/AI/training-2.9.0/lib/python3.12/site-packages/torch/export/_trace.py\", line 2071, in _export_for_training\n    export_artifact = export_func(\n                      ^^^^^^^^^^^^\n  File \"/opt/AI/training-2.9.0/lib/python3.12/site-packages/torch/export/_trace.py\", line 1415, in _strict_export\n    gm_torch_level = _export_to_torch_ir(\n                     ^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/AI/training-2.9.0/lib/python3.12/site-packages/torch/export/_trace.py\", line 812, in _e",
    "url": "https://github.com/pytorch/pytorch/issues/171656",
    "state": "open",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2026-01-03T21:32:58Z",
    "updated_at": "2026-01-05T12:48:54Z",
    "comments": 2,
    "user": "hpcpony"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31646,
    "title": "[Usage]: How can I use GPU12 as standalone KV LMCache?",
    "body": "### Your current environment\n\n```text\nCollecting environment information...\nuv is set\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.3 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.3 (main, Nov  6 2025, 13:44:16) [GCC 13.3.0] (64-bit runtime)\nPython platform              : Linux-6.8.12-13-pve-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.61\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA GeForce RTX 3090\nGPU 1: NVIDIA GeForce RTX 3090\nGPU 2: NVIDIA GeForce RTX 3090\nGPU 3: NVIDIA GeForce RTX 3090\nGPU 4: NVIDIA GeForce RTX 3090\nGPU 5: NVIDIA GeForce RTX 3090\nGPU 6: NVIDIA GeForce RTX 3090\nGPU 7: NVIDIA GeForce RTX 3090\nGPU 8: NVIDIA GeForce RTX 3090\nGPU 9: NVIDIA GeForce RTX 3090\nGPU 10: NVIDIA GeForce RTX 3090\nGPU 11: NVIDIA GeForce RTX 3090\nGPU 12: NVIDIA GeForce RTX 3090\n\nNvidia driver version        : 570.172.08\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        43 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               64\nOn-line CPU(s) list:                  0-9,11,13-24,26-50,52-63\nOff-line CPU(s) list:                 10,12,25,51\nVendor ID:                            AuthenticAMD\nBIOS Vendor ID:                       Advanced Micro Devices, Inc.\nModel name:                           AMD EPYC 7532 32-Core Processor\nBIOS Model name:                      AMD EPYC 7532 32-Core Processor                 Unknown CPU @ 2.4GHz\nBIOS CPU family:                      107\nCPU family:                           23\nModel:                                49\nThread(s) per core:                   2\nCore(s) per socket:                   32\nSocket(s):                            1\nStepping:                             0\nFrequency boost:                      enabled\nCPU(s) scaling MHz:                   120%\nCPU max MHz:                          2400.0000\nCPU min MHz:                          1500.0000\nBogoMIPS:                             4799.61\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip rdpid overflow_recov succor smca sev sev_es\nVirtualization:                       AMD-V\nL1d cache:                            1 MiB (32 instances)\nL1i cache:                            1 MiB (32 instances)\nL2 cache:                             16 MiB (32 instances)\nL3 cache:                             256 MiB (16 instances)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-63\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Mitigation; untrained return thunk; SMT enabled with STIBP protection\nVulnerability Spec rstack overflow:   Mitigation; Safe RET\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:       ",
    "url": "https://github.com/vllm-project/vllm/issues/31646",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2026-01-03T13:25:41Z",
    "updated_at": "2026-01-03T13:25:41Z",
    "comments": 0,
    "user": "joshuakoh1"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31624,
    "title": "[Bug]: ModelOpt Llama-4 Checkpoints Take 5+ minutes to load",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nIn working on some MoE refactors, I discovered that L4 for ModelOpt takes 5+minutes to load weights even from CPU page cache. \n- https://huggingface.co/nvidia/Llama-4-Scout-17B-16E-Instruct-FP8\n\nThe root cause is basically this hack logic to load the state dict that ModelOpt uses\n- https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/models/llama4.py#L439-L523 [modelopt is the fused case] \n\nWhat happens is that the CPU tensor (loaded weight) that we are going to load into the GPU tensor (param) becomes non-contiguous due to this logic. As a result, when we eventually call `_copy()` from CPU->GPU we are calling this on a non-contiguous cpu tensor which takes 3-4s per weight.\n\nTo hack around this for local R&D, I simply immediately move the loaded_weight to the GPU. This makes the gather happen on the GPU which accelerates things a lot. This isn't reasonable as an actual solution though\n\nWe should investigate where the logic in the weight loader can avoid creating non-contiguous CPU tensors\n\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31624",
    "state": "open",
    "labels": [
      "bug",
      "help wanted",
      "good first issue",
      "feature request"
    ],
    "created_at": "2026-01-02T15:18:14Z",
    "updated_at": "2026-01-06T02:42:32Z",
    "comments": 6,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2741,
    "title": "XVLA: Clarification on provided lerobot/xvla-base model checkpoint and documentation",
    "body": "### Ticket Type\n\n\u2753 Technical Question\n\n### Environment & System Info\n\n```Shell\n\n```\n\n### Description\n\nDear lerobot-Team,\n\nI hope you had a good start into 2026 and thanks for the great work on making X-VLA natively available via lerobot.\nI have a few questions regarding the _lerobot/xvla-base_ checkpoint and the information provided in the [documentation](https://huggingface.co/docs/lerobot/en/xvla#-base-model) about it:\n\n1.  You write in the documentation that the checkpoint has been trained with a two-stage approach:\n\n> A 0.9B parameter instantiation of X-VLA, trained with a carefully designed data processing and learning recipe. The training pipeline consists of two phases:\nPhase I: Pretraining - Pretrained on 290K episodes from Droid, Robomind, and Agibot, spanning seven platforms across five types of robotic arms (single-arm to bi-manual setups). By leveraging soft prompts to absorb embodiment-specific variations, the model learns an embodiment-agnostic generalist policy.\nPhase II: Domain Adaptation - Adapted to deployable policies for target domains. A new set of soft prompts is introduced and optimized to encode the hardware configuration of the novel domain, while the pretrained backbone remains frozen.\n\nI was now wondering whether _lerobot/xvla-base_ has really been trained with domain adaptation already or whether it has only been pre-trained as described in the X-VLA paper, i.e. with 290k trajectories of DROID, Robomind etc. If this is the case, it might be clearer to update the documentation to remove Phase II to avoid confusion. If _lerobot/xvla-base_ has really been trained on Domain Adaptation already, could you please explain why this was done for a base checkpoint and which datasets/ training hyperparams were chosen for this (this is not detailed in the paper).\n\n2. You mention [here](https://huggingface.co/docs/lerobot/en/xvla#2-domain-ids) that _lerobot/xvla-base_ has been trained on the following domain_ids:\n\n> <html><body>\n<!--StartFragment-->\nDataset Name | Domain ID\n-- | --\nBridge | 0\nRT1 | 1\nCalvin | 2\nlibero | 3\nwidowx-air | 4\nAIR-AGILEX-HQ | 5\nrobotwin2_abs_ee | 6\nrobotwin2_clean | 6\nrobocasa-human | 7\nVLABench | 8\nAGIBOT-challenge | 9\nAIR-AGILEX | 10\nAIRBOT | 18\n\n<!--EndFragment-->\n</body>\n</html>\n\nI was wondering whether this is correct because I expected _lerobot/xvla-base_ (as described in 1.) to have been pre-trained on DROID, RoboMind and Agibot. Based on the [original code base](https://github.com/2toinf/X-VLA/blob/main/datasets/domain_config.py), i would have expected that it was pretrained on the following domain_ids:\n    \n```\n# pretraining\n    \"robomind-franka\": 11,\n    \"robomind-ur\": 12,\n    \"Droid-Left\": 13,\n    \"Droid-Right\": 14,\n    \"AGIBOT\": 15,\n    \"robomind-agilex\": 16,\n    \"robomind-franka-dual\": 17\n```\n\nIs it possible that in the documentation the pretraining and finetuning datasets/ domain ids got mixed up? Or is my understanding simply incorrect? If the pretraining and finetuning domain ids really got mixed up, would it make more sense to choose one of the pretraining domain ids (e.g. 13) when fine-tuning _lerobot/xvla_ with tasks collected on a setup very similar to DROID ?\n\nThank you very much for your response!\n\n### Context & Reproduction\n\n_No response_\n\n### Relevant logs or stack trace\n\n```Shell\n\n```\n\n### Checklist\n\n- [ ] I have searched existing tickets to ensure this isn't a duplicate.\n- [ ] I am using the latest version of the `main` branch.\n- [ ] I have verified this is not an environment-specific problem.\n\n### Additional Info / Workarounds\n\n_No response_",
    "url": "https://github.com/huggingface/lerobot/issues/2741",
    "state": "open",
    "labels": [
      "documentation",
      "question",
      "policies",
      "dataset",
      "training"
    ],
    "created_at": "2026-01-02T08:38:03Z",
    "updated_at": "2026-01-04T15:54:55Z",
    "user": "gianlucageraci"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7927,
    "title": "Using Stateful Dataloader with Split Dataset By Node and DCP for DDP",
    "body": "### Describe the bug\n\nI am trying to determine how to save and load the Stateful Dataloader State with DCP and Split Dataset by Node for DDP.\n\nCurrently, I am running into the issue where I am receiving a slow resume.\n```\nNeither dataset nor iter(dataset) defines state_dict/load_state_dict so we are naively fast-forwarding your dataset by 5000 steps. For more efficient resumes, please implement `state_dict` and `load_state_dict` in your IterableDataset and/or iterator.\n```\n\n### Steps to reproduce the bug\n\nSay we have a streaming dataset:\n```python\nclass StreamingDataset(IterableDataset):\n    def __init__(\n        self,\n        path: str,\n        tokenizer: AutoTokenizer,\n        name: Optional[str] = None,\n        split: str = \"train\",\n        max_length: int = 2048,\n        ddp_rank: int = 0,\n        ddp_world_size: int = 1,\n    ):\n        dataset = load_dataset(path, name, split=split, streaming=True)\n        self.train_dataset = split_dataset_by_node(\n            dataset=dataset, rank=ddp_rank, world_size=ddp_world_size\n        )\n\n        self.tokenizer = tokenizer\n        self.max_length = max_length\n\n    def __iter__(self):\n        for sample in iter(self.train_dataset):\n            tokenized = self.tokenizer(\n                sample[\"text\"],\n                padding=\"max_length\",\n                truncation=True,\n                max_length=self.max_length,\n                return_special_tokens_mask=True,\n            )\n            yield tokenized\n```\nWe load that dataset into the Stateful Dataloader:\n```python\n    trainloader = StatefulDataLoader(\n        dataset=train_dataset,\n        batch_size=args.batch_size,\n        collate_fn=data_collator,\n    )\n```\nWe then have code for checkpointing and resuming the state using DCP:\n```python\nimport os\nfrom typing import Optional\n\nimport torch\nimport torch.distributed as dist\nimport torch.distributed.checkpoint as dcp\nfrom torch.distributed.checkpoint.format_utils import dcp_to_torch_save\nfrom torch.distributed.checkpoint.state_dict import get_state_dict, set_state_dict\n\nfrom blitzbert.utils import print_rank_0\n\n\nclass Checkpoint:\n    def __init__(\n        self,\n        model: torch.nn.Module,\n        optimizer: torch.optim.Optimizer,\n        trainloader,\n        step: Optional[int] = None,\n        epoch: Optional[int] = None,\n    ):\n        self.model = model\n        self.optimizer = optimizer\n        self.trainloader = trainloader\n        self.step = step\n        self.epoch = epoch\n\n    def get_state_dict(self) -> dict:\n        model_state_dict, optimizer_state_dict = get_state_dict(\n            self.model, self.optimizer\n        )\n        return {\n            \"model\": model_state_dict,\n            \"optim\": optimizer_state_dict,\n            \"trainloader\": self.trainloader.state_dict(),\n            \"step\": self.step,\n            \"epoch\": self.epoch,\n        }\n\n\ndef save_checkpoint(\n    args,\n    model,\n    optimizer,\n    trainloader,\n    step: Optional[int] = None,\n    epoch: Optional[int] = None,\n    final_checkpoint: bool = False,\n):\n    checkpointer = Checkpoint(\n        model=model,\n        optimizer=optimizer,\n        trainloader=trainloader,\n        step=step,\n        epoch=epoch,\n    )\n\n    state_dict = checkpointer.get_state_dict()\n\n    if final_checkpoint:\n        print_rank_0(\"Saving final model\")\n        \n        save_path = os.path.join(args.checkpoint_dir, \"final_model\")\n        \n        dcp.save(state_dict, checkpoint_id=save_path)\n        dist.barrier()\n\n        single_file_path = os.path.join(args.checkpoint_dir, \"final_checkpoint.pth\")\n        dcp_to_torch_save(save_path, single_file_path)\n    else:\n        if step % args.checkpointing_steps == 0 and step != 0:\n            print_rank_0(f\"Saving model at step: {step}\")\n            save_path = os.path.join(args.checkpoint_dir, f\"epoch_{epoch}_step_{step}\")\n            dcp.save(state_dict, checkpoint_id=save_path)\n            dist.barrier()\n\n\ndef load_checkpoint(args, model, optimizer, trainloader):\n    if not args.resume_from_checkpoint:\n        return 0, 0\n\n    checkpoint_path = args.resume_from_checkpoint\n    print_rank_0(f\"Resumed from checkpoint: {checkpoint_path}\")\n    \n    checkpointer = Checkpoint(\n        model=model,\n        optimizer=optimizer,\n        trainloader=trainloader,\n    )\n\n    state_dict = checkpointer.get_state_dict()\n\n    dcp.load(\n        state_dict=state_dict,\n        checkpoint_id=checkpoint_path,\n    )\n\n    set_state_dict(\n        model,\n        optimizer,\n        model_state_dict=state_dict[\"model\"],\n        optim_state_dict=state_dict[\"optim\"],\n    )\n\n    trainloader.load_state_dict(state_dict[\"trainloader\"])\n    \n    step = state_dict[\"step\"]\n    epoch = state_dict[\"epoch\"]\n\n    return step, epoch\n```\nand then loading the checkpoint:\n```python\n        completed_steps, current_epoch = load_checkpoint(\n            args=args, model=model, optimizer=optimizer, trainloader=trainloader\n        )\n```\n\n### Expected behavior\n\nIf I implement what the warning says:\n```python\n   ",
    "url": "https://github.com/huggingface/datasets/issues/7927",
    "state": "open",
    "labels": [],
    "created_at": "2026-01-01T22:27:07Z",
    "updated_at": "2026-01-02T02:48:21Z",
    "comments": 2,
    "user": "conceptofmind"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31609,
    "title": "[Bug][ModelOpt]: FlashInfer CUTLASS MoE Accuracy Degraded (Llama4)",
    "body": "### Your current environment\n\nH100, B200 ---> vllm 0.13.0\n\n### \ud83d\udc1b Describe the bug\n\n- running the following:\n\n```bash\n\n# modelopt\nMODEL_TENSOR := \"nvidia/Llama-4-Scout-17B-16E-Instruct-FP8\"\n\nGPUS := \"2\"\nPORT := \"8001\"\n\n\n# sm90 / sm100\nlaunch_cutlass_tensor:\n\tVLLM_USE_DEEP_GEMM=0 VLLM_USE_FLASHINFER_MOE_FP8=1 VLLM_FLASHINFER_MOE_BACKEND=throughput vllm serve {{MODEL_TENSOR}} -tp {{GPUS}} --port {{PORT}} --max-model-len 8192\n\n\n# sm100\nlaunch_trtllm_tensor:\n\tVLLM_USE_DEEP_GEMM=0 VLLM_USE_FLASHINFER_MOE_FP8=1 VLLM_FLASHINFER_MOE_BACKEND=latency  chg run --gpus {{GPUS}} -- vllm serve {{MODEL_TENSOR}} -tp {{GPUS}} --max-model-len 8192\n\neval_block:\n\tlm_eval \\\n\t\t--model local-completions \\\n\t\t--tasks gsm8k \\\n\t\t--model_args \"model={{MODEL_BLOCK}},base_url=http://localhost:{{PORT}}/v1/completions,num_concurrent=1000,tokenized_requests=False\"\n\neval_tensor:\n\tlm_eval \\\n\t\t--model local-completions \\\n\t\t--tasks gsm8k \\\n\t\t--model_args \"model={{MODEL_TENSOR}},base_url=http://localhost:{{PORT}}/v1/completions,num_concurrent=1000,tokenized_requests=False\"\n```\n\nwith cutlass:\n\n```bash\nlocal-completions (model=nvidia/Llama-4-Scout-17B-16E-Instruct-FP8,base_url=http://localhost:8001/v1/completions,num_concurrent=1000,tokenized_requests=False), gen_kwargs: (None), limit: None, num_fewshot: None, batch_size: 1\n|Tasks|Version|     Filter     |n-shot|  Metric   |   |Value |   |Stderr|\n|-----|------:|----------------|-----:|-----------|---|-----:|---|-----:|\n|gsm8k|      3|flexible-extract|     5|exact_match|\u2191  |0.7491|\u00b1  |0.0119|\n|     |       |strict-match    |     5|exact_match|\u2191  |0.7672|\u00b1  |0.0116|\n```\n\nwith trtllm:\n\n```bash\nlocal-completions (model=nvidia/Llama-4-Scout-17B-16E-Instruct-FP8,base_url=http://localhost:8000/v1/completions,num_concurrent=1000,tokenized_requests=False), gen_kwargs: (None), limit: None, num_fewshot: None, batch_size: 1\n|Tasks|Version|     Filter     |n-shot|  Metric   |   |Value |   |Stderr|\n|-----|------:|----------------|-----:|-----------|---|-----:|---|-----:|\n|gsm8k|      3|flexible-extract|     5|exact_match|\u2191  |0.9242|\u00b1  |0.0073|\n|     |       |strict-match    |     5|exact_match|\u2191  |0.9075|\u00b1  |0.0080|\n```\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31609",
    "state": "closed",
    "labels": [
      "bug",
      "help wanted"
    ],
    "created_at": "2026-01-01T21:45:48Z",
    "updated_at": "2026-01-03T20:26:38Z",
    "comments": 2,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "huggingface/trl",
    "number": 4766,
    "title": "Asynchronous generation and training for GRPO?",
    "body": "### Feature request\n\nGRPOTrainer send requests for the next batch to vllm server when it is computing backpropagation, in order to reduce idle runtime for both server's GPUs and trainer's GPUs.\n\n### Motivation\n\nUnder the current GRPO trainer, generation and backpropagation are sequential, meaning that lots of runtime are wasted. Considering that they are using different GPUs on server setting, it'd be beneficial to do generation at the same time when backpropagation is in computation. This requires the vllm trainer to send requests for next batch when running the current batch, and providing suggestion for the ratio of trainer / server GPU counts.\n\n### Your contribution\n\nSubmit PR in the future.",
    "url": "https://github.com/huggingface/trl/issues/4766",
    "state": "open",
    "labels": [],
    "created_at": "2026-01-01T08:42:12Z",
    "updated_at": "2026-01-01T08:42:12Z",
    "comments": 0,
    "user": "sxndqc"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 171594,
    "title": "Can you tell me which kernel function be used?",
    "body": "I'm newer for pytorch source code, but I want copy some pytorch cuda kernel to my project. \n\nFor example,  \"images data format nchw use torch.nn.functional.interpolate(..., antialias=False)\",\nthen I find the function torch._C._nn.upsample_bilinear2d(...) in functional.py to use.\n\nI find some kernel in https://github.com/pytorch/pytorch/blob/main/aten/src/ATen/native/cuda/UpSampleBilinear2d.cu\n\nis torch._C._nn.upsample_bilinear2d use kernel in this file? and which kernel use?",
    "url": "https://github.com/pytorch/pytorch/issues/171594",
    "state": "closed",
    "labels": [],
    "created_at": "2026-01-01T07:37:53Z",
    "updated_at": "2026-01-03T06:58:52Z",
    "comments": 2,
    "user": "lzcchl"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 171592,
    "title": "When does it make sense to compile DDP vs not?",
    "body": "Hello,\n\nI have been looking online, but have seen conflicting information.\n\nSay I can `fullgraph` compile a model with `max-autotune`:\n```python\n    compiled_model = torch.compile(raw_model, fullgraph=True, mode=\"max-autotune\")\n    ddp_model = DDP(\n        compiled_model,\n        device_ids=[local_rank],\n        output_device=local_rank,\n        bucket_cap_mb=100,\n    )\n```\nDoes it make sense to do it this way?\n\nOr would it be better to turn off `fullgraph` and then compile the DDP model instead?\n\nThis is quite unclear to me what the correct set of steps is.\n\nThank you,\n\nEnrico",
    "url": "https://github.com/pytorch/pytorch/issues/171592",
    "state": "closed",
    "labels": [],
    "created_at": "2026-01-01T02:12:06Z",
    "updated_at": "2026-01-05T14:54:02Z",
    "comments": 1,
    "user": "conceptofmind"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31574,
    "title": "[Usage]: If vllm surpport load LoRA adapter and DeepSeek-v3.1-termunis at the same time",
    "body": "### Your current environment\n\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version                : Could not collect\nCMake version                : version 3.22.1\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.12 (main, Oct 10 2025, 08:52:57) [GCC 11.4.0] (64-bit runtime)\nPython platform              : Linux-5.10.134-16.3.al8.x86_64-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.9.86\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA H20-3e\nGPU 1: NVIDIA H20-3e\nGPU 2: NVIDIA H20-3e\nGPU 3: NVIDIA H20-3e\nGPU 4: NVIDIA H20-3e\nGPU 5: NVIDIA H20-3e\nGPU 6: NVIDIA H20-3e\nGPU 7: NVIDIA H20-3e\n\nNvidia driver version        : 570.133.20\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.17.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.17.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.17.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.17.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.17.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.17.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.17.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.17.0\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nAddress sizes:                   52 bits physical, 57 bits virtual\nByte Order:                      Little Endian\nCPU(s):                          192\nOn-line CPU(s) list:             0-191\nVendor ID:                       GenuineIntel\nBIOS Vendor ID:                  Intel(R) Corporation\nModel name:                      INTEL(R) XEON(R) PLATINUM 8575C\nBIOS Model name:                 INTEL(R) XEON(R) PLATINUM 8575C\nCPU family:                      6\nModel:                           207\nThread(s) per core:              2\nCore(s) per socket:              48\nSocket(s):                       2\nStepping:                        2\nCPU max MHz:                     4000.0000\nCPU min MHz:                     800.0000\nBogoMIPS:                        5600.00\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm uintr md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nVirtualization:                  VT-x\nL1d cache:                       4.5 MiB (96 instances)\nL1i cache:                       3 MiB (96 instances)\nL2 cache:                        192 MiB (96 instances)\nL3 cache:                        640 MiB (2 instances)\nNUMA node(s):                    2\nNUMA node0 CPU(s):               0-47,96-143\nNUMA node1 CPU(s):               48-95,144-191\nVulnerability Itlb multihit:     Not affected\nVulnerability L1tf:              Not affected\nVulnerability Mds:               Not affected\nVulnerability Meltdown:          Not affected\nVulnerability Mmio stale data:   Not affected\nVulnerability Retbleed:          Not affected\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user point",
    "url": "https://github.com/vllm-project/vllm/issues/31574",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-31T10:33:52Z",
    "updated_at": "2026-01-01T07:09:51Z",
    "comments": 1,
    "user": "AIR-hl"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 16220,
    "title": "GLM pd disaggregation with mtp",
    "body": "did glm support pd disaggregation and mtp? i try to test,but the accept len in log is always 1(failed to predict everytime) and performance is bad.i use the start command below,is there something wrong?\n\n\nargs for prefill node :\nSGLANG_ENABLE_SPEC_V2=1 SGLANG_DISAGGREGATION_QUEUE_SIZE=1 SGLANG_DISAGGREGATION_THREAD_POOL_SIZE=1 MC_TE_METRIC=1 SGLANG_SET_CPU_AFFINITY=true  python -m sglang.launch_server --model /models/GLM-4.6-FP8/ --trust-remote-code --watchdog-timeout \"1000000\" --mem-fraction-static 0.8 --max-running-requests 40 --disaggregation-mode prefill --tp-size 8 --kv-cache-dtype fp8_e4m3 --host 0.0.0.0 --chunked-prefill-size 16384 --attention-backend fa3 --enable-metrics --disaggregation-ib-device mlx5_0 --page-size 64 --speculative-algorithm NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4\n\nargs for decode node:\nSGLANG_ENABLE_SPEC_V2=1 SGLANG_CLIP_MAX_NEW_TOKENS_ESTIMATION=512 SGLANG_SET_CPU_AFFINITY=true python -m sglang.launch_server --model   /models/GLM-4.6-FP8/   --trust-remote-code --watchdog-timeout \"1000000\" --mem-fraction-static 0.9 --tp-size 8 --kv-cache-dtype fp8_e4m3 --disaggregation-mode decode  --prefill-round-robin-balance --host 0.0.0.0 --chunked-prefill-size 16384 --attention-backend fa3 --max-running-requests 80 --enable-metrics --disaggregation-ib-device mlx5_0 --page-size 64 --speculative-algorithm NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4",
    "url": "https://github.com/sgl-project/sglang/issues/16220",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-31T10:19:04Z",
    "updated_at": "2026-01-04T01:52:56Z",
    "comments": 1,
    "user": "dongliangwu"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16422,
    "title": "java linux  cannot work , we need executorch java jar format package  \uff0cplease support",
    "body": "### \ud83d\udc1b Describe the bug\n\njava linux  cannot work ,\nI just can't figure it out. I've been communicating with you for a month now, so why can you still not compile a pure Java JAR that allows Java to use executors on Linux, macOS, and Windows? You insist on using JNI to bundle androidx.core in an AAR format, which is completely unusable in Java Maven and SBT projects. This is such a practical need. I've seen how many users in the issues are requesting you to provide an official JAR package format, but you always turn a blind eye. Why is that? Are you worried about something? Isn't it a good thing to expand to more platforms and users? As the project's management, can you really bear to do this? Users simply don't have the ability to package things with C++ or JavaCPP, so why make them do the packaging themselves? That is unreasonable in itself.\n\n### Versions\n\ndd\n\ncc @kirklandsign @cbilgin",
    "url": "https://github.com/pytorch/executorch/issues/16422",
    "state": "open",
    "labels": [
      "module: android"
    ],
    "created_at": "2025-12-31T10:09:02Z",
    "updated_at": "2026-01-06T07:52:28Z",
    "comments": 2,
    "user": "mullerhai"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31567,
    "title": "[RFC]: Why custom_mask is not exposed on FlashInfer to get more flexible use case?",
    "body": "### Motivation.\n\nLike what tensorrt-llm does https://github.com/NVIDIA/TensorRT-LLM/blob/6c1abf2d45c77d04121ebe10f6b29abf89373c60/tensorrt_llm/_torch/attention_backend/flashinfer.py#L411C17-L411C28\n\n### Proposed Change.\n\nexpose the custom_weight to support use case like relative attention bias\n\n### Feedback Period.\n\n_No response_\n\n### CC List.\n\n_No response_\n\n### Any Other Things.\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31567",
    "state": "open",
    "labels": [
      "RFC"
    ],
    "created_at": "2025-12-31T06:00:07Z",
    "updated_at": "2025-12-31T06:00:07Z",
    "comments": 0,
    "user": "npuichigo"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31564,
    "title": "[Bug]: Qwen3-VL-8B-Instruct has accuracy issue - Multi modal accuracy issue",
    "body": "### Your current environment\n\n**Current input format:**\n\nmessages = [\n            {\"role\": \"system\", \"content\": system_prompt},\n            {\n                \"role\": \"user\",\n                \"content\": [\n                    {\"type\": \"text\", \"text\": user_prompt},\n                    {\n                        \"type\": \"image_url\",\n                        \"image_url\": {\"url\": image_data_uri}\n                    }\n                ]\n            }\n        ]\n\n**Command:**\n\npython3 -m vllm serve Qwen/Qwen3-VL-8B-Instruct --max-model-len 22528 --gpu-memory-utilization 0.75 --dtype float16 --port 7001 --trust-remote-code --limit-mm-per-prompt.video 0 --mm-encoder-tp-mode data --mm-processor-cache-gb 0 --tensor-parallel-size 1\n\n**Issue:**\nI have a ID number in a fax form like 12347777568 and the model has extracted like 1234777568. The model has skipped 7, but we have four 7 are there and the model returns three 7 as output.\n\n**How to fix this?**\n1. Can I increase the max pixels like 2048 or something else.\n2. Can I tweak the sampling parameter to allowing the repeated tokens (topp-1 and topk - 0.001) like that.\n\n**Current Sampling:**\n\"top_k\": 20,\n\"top_p\": 0.8,\n\"repetition_penalty\": 1.0,\n\"temperature\": 0.0\n\n### \ud83d\udc1b Describe the bug\n\nHow I need to fix this issue?\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31564",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-31T05:13:32Z",
    "updated_at": "2026-01-02T04:29:14Z",
    "comments": 3,
    "user": "Dineshkumar-Anandan-ZS0367"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2737,
    "title": "SARM WITH PI05: Why trainning loss getting more noise?",
    "body": "### Ticket Type\n\n\u2753 Technical Question\n\n### Environment & System Info\n\n```Shell\n\n```\n\n### Description\n\n[SARM with pi05 training for folding towel task _ fold_towel_v3_0 \u2013 Weights & Biases.pdf](https://github.com/user-attachments/files/24389716/SARM.with.pi05.training.for.folding.towel.task._.fold_towel_v3_0.Weights.Biases.pdf)\n\n### Context & Reproduction\n\n_No response_\n\n### Relevant logs or stack trace\n\n```Shell\n\n```\n\n### Checklist\n\n- [ ] I have searched existing tickets to ensure this isn't a duplicate.\n- [ ] I am using the latest version of the `main` branch.\n- [ ] I have verified this is not an environment-specific problem.\n\n### Additional Info / Workarounds\n\n_No response_",
    "url": "https://github.com/huggingface/lerobot/issues/2737",
    "state": "closed",
    "labels": [
      "question",
      "training"
    ],
    "created_at": "2025-12-31T03:20:16Z",
    "updated_at": "2026-01-02T08:01:25Z",
    "user": "xianglunkai"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2736,
    "title": "Questions about VLA multi-task training.",
    "body": "### Ticket Type\n\n\ud83d\udca1 Feature Request / Improvement\n\n### Environment & System Info\n\n```Shell\n- LeRobot version: 0.4.2\n- Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.31\n- Python version: 3.10.18\n- Huggingface Hub version: 0.35.3\n- Datasets version: 4.1.1\n- Numpy version: 2.2.6\n- FFmpeg version: 6.1.1\n- PyTorch version: 2.7.1+cu126\n- Is PyTorch built with CUDA support?: True\n- Cuda version: 12.6\n- GPU model: NVIDIA GeForce RTX 4060 Ti\n- Using GPU in script?: <fill in>\n- lerobot scripts: ['lerobot-calibrate', 'lerobot-dataset-viz', 'lerobot-edit-dataset', 'lerobot-eval', 'lerobot-find-cameras', 'lerobot-find-joint-limits', 'lerobot-find-port', 'lerobot-imgtransform-viz', 'lerobot-info', 'lerobot-record', 'lerobot-replay', 'lerobot-setup-motors', 'lerobot-teleoperate', 'lerobot-train']\n```\n\n### Description\n\nThe generalization capability of VLA mainly comes from pre-training based on large-scale data, but fine-tuning with multi-task co-training also yields good results. This point has been discussed in both the SmolVLA paper and on [Discord](https://discord.com/channels/1216765309076115607/1407325244980727850/1422249462025289809).\n\n<img width=\"1512\" height=\"1058\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/23cdaa22-a605-474a-9460-1c19e6f29e2d\" />\nHowever, the current fine-tuning commands and scripts are based on single-task scenarios. I would like to know how to implement multi-task fine-tuning within the lerobot framework. For example, using it on SmolVLA and pi0.5.\n\n### Context & Reproduction\n\n_No response_\n\n### Relevant logs or stack trace\n\n```Shell\n\n```\n\n### Checklist\n\n- [x] I have searched existing tickets to ensure this isn't a duplicate.\n- [x] I am using the latest version of the `main` branch.\n- [x] I have verified this is not an environment-specific problem.\n\n### Additional Info / Workarounds\n\n_No response_",
    "url": "https://github.com/huggingface/lerobot/issues/2736",
    "state": "open",
    "labels": [
      "enhancement",
      "question",
      "examples",
      "training"
    ],
    "created_at": "2025-12-31T03:12:02Z",
    "updated_at": "2026-01-04T20:02:02Z",
    "user": "yquanli"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31555,
    "title": "[Docs] Feedback for `/en/stable/`MONSTERDOG",
    "body": "### \ud83d\udcda The doc issue\n\n[Projets (1).csv](https://github.com/user-attachments/files/24389184/Projets.1.csv)\n[Projets.csv](https://github.com/user-attachments/files/24389185/Projets.csv)\n[MonsterDog_Pilot_ROI_ISO42001_Report.pdf](https://github.com/user-attachments/files/24389187/MonsterDog_Pilot_ROI_ISO42001_Report.pdf)\n[MonsterDog_Pilot_ROI_ISO42001_Report.pdf](https://github.com/user-attachments/files/24389186/MonsterDog_Pilot_ROI_ISO42001_Report.pdf)\n[LIVRE_BLANC_MONSTERDOG_VINF.md](https://github.com/user-attachments/files/24389188/LIVRE_BLANC_MONSTERDOG_VINF.md)\n[MONSTERDOG_TOTALITY_SUPREME_INFINITY.py](https://github.com/user-attachments/files/24389189/MONSTERDOG_TOTALITY_SUPREME_INFINITY.py)\n[SCRIPT_ULTIME_FINAL_vULT_FULL.md](https://github.com/user-attachments/files/24389190/SCRIPT_ULTIME_FINAL_vULT_FULL.md)\n[RAPPORT_FINAL_MONSTERDOG.md](https://github.com/user-attachments/files/24389191/RAPPORT_FINAL_MONSTERDOG.md)\n<img width=\"1024\" height=\"1024\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d7e55288-c704-4bf3-86a1-0d04a8a081a0\" />\n[safe_hold_v1_1.py](https://github.com/user-attachments/files/24389193/safe_hold_v1_1.py)\n[safe_hold_v1_1.py](https://github.com/user-attachments/files/24389192/safe_hold_v1_1.py)\n[\u2605MONSTERDOG\u2605OMNI\u2605AEGIS\u26052026.py](https://github.com/user-attachments/files/24389194/MONSTERDOG.OMNI.AEGIS.2026.py)\n\n### Suggest a potential alternative/fix\n\n[MonsterDog_Pilot_ROI_ISO42001_Report.pdf](https://github.com/user-attachments/files/24389173/MonsterDog_Pilot_ROI_ISO42001_Report.pdf)\n[MonsterDog_Pilot_ROI_ISO42001_Report.pdf](https://github.com/user-attachments/files/24389172/MonsterDog_Pilot_ROI_ISO42001_Report.pdf)\n[LIVRE_BLANC_MONSTERDOG_VINF.md](https://github.com/user-attachments/files/24389174/LIVRE_BLANC_MONSTERDOG_VINF.md)\n[MONSTERDOG_TOTALITY_SUPREME_INFINITY.py](https://github.com/user-attachments/files/24389175/MONSTERDOG_TOTALITY_SUPREME_INFINITY.py)\n[SCRIPT_ULTIME_FINAL_vULT_FULL.md](https://github.com/user-attachments/files/24389176/SCRIPT_ULTIME_FINAL_vULT_FULL.md)\n[RAPPORT_FINAL_MONSTERDOG.md](https://github.com/user-attachments/files/24389177/RAPPORT_FINAL_MONSTERDOG.md)\n[safe_hold_v1_1.py](https://github.com/user-attachments/files/24389178/safe_hold_v1_1.py)\n[safe_hold_v1_1.py](https://github.com/user-attachments/files/24389179/safe_hold_v1_1.py)\n[\u2605MONSTERDOG\u2605OMNI\u2605AEGIS\u26052026.py](https://github.com/user-attachments/files/24389180/MONSTERDOG.OMNI.AEGIS.2026.py)\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31555",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-12-31T01:20:55Z",
    "updated_at": "2025-12-31T05:18:48Z",
    "comments": 0,
    "user": "s33765387-cpu"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2735,
    "title": "Buy the camera?",
    "body": "Hi! Where do I buy the camera and the whole SO-ARM101 kit? \n\nI find the kit at a chinese website like WoWRobo Robotics with only Paypal payment. But is that it? How do I buy the camera otherwise?",
    "url": "https://github.com/huggingface/lerobot/issues/2735",
    "state": "open",
    "labels": [
      "question",
      "sensors"
    ],
    "created_at": "2025-12-30T22:32:42Z",
    "updated_at": "2025-12-30T22:51:39Z",
    "user": "JFI12"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 171537,
    "title": "`torch.compile(dynamic=True)` + `torch.func` triggers internal assertion error.",
    "body": "### \ud83d\udc1b Describe the bug\n\nThis is a bug in pytorch 2.8, with `nvcc` version `release 12.9, V12.9.86` on Ubuntu linux. It repros on BOTH my `RTX 5060 TI 16GB` AND on CPU.\n\nThe specific error message is `RuntimeError('isIntList() INTERNAL ASSERT FAILED at \"/pytorch/aten/src/ATen/core/ivalue_inl.h\":1979, please report a bug to PyTorch. Expected IntList but got GenericList')`\n\nI spent hours trying to find a simple repro and can't. But whoever is assigned to investigate I can provide access to my (currently private) github repo so they can repro it themselves. The specific scenario seems to require:\n\n- Must be `torch.compile`d (does not repro when using eager mode)\n- Must use `torch.func` stack (does not repro with `torch.autograd`, though admittedly I cant test compiled with `autograd` due to pytorch limitations)\n- Must specifically be compiled with `dynamic=True` (the code succeeds with `dynamic=False`)\n\nAgain, the below is NOT a repro case, but an example usage. The relevant code for my use case is:\n\n```\n    def functional_loss_step(\n        params_dict: dict[str, torch.Tensor],\n        buffers_dict: dict[str, torch.Tensor],\n        pc: MyPytreeStructure,\n        species: torch.Tensor,\n        target_energy: torch.Tensor,\n        target_forces: torch.Tensor,\n    ) -> torch.Tensor:\n        def compute_energy_functional(\n            input_pc: MyPytreeStructure,\n        ):\n            result = torch.func.functional_call(  # type: ignore[no-any-return]\n                model,\n                (params_dict, buffers_dict),\n                (input_pc, species),\n            )\n            return result[1]\n\n        per_batch_energies, vjp_fn = torch.func.vjp(compute_energy_functional, pc)\n\n        # Compute second order derivitives.\n        cotangents = torch.ones_like(per_batch_energies)\n        (pc_grads,) = vjp_fn(cotangents)\n        forces = -pc_grads.edges._positions\n\n        predictions = LossData(per_batch_energies, forces)\n        targets = LossData(target_energy, target_forces)\n\n        return criterion(predictions, targets)  # type: ignore[no-any-return]\n```\n\nWhere `MyPytreeStructure` is a custom object registered with pytree.\n\nPlease investigate - there is no alternative path to combining `torch.compile` with second order derivitives.\n\n### Error logs\n\n```\nTraceback (most recent call last):\n  File \"/home/ryan/src/environment/examples/nequip/smoke_test.py\", line 65, in <module>\n    train_losses, val_losses = train_nequip(hyperparameters)\n                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ryan/src/environment/examples/nequip/main.py\", line 595, in train_nequip\n    grads_dict, current_loss = calculate_loss_compiled(\n                               ^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ryan/anaconda3/envs/environment/lib/python3.12/site-packages/torch/_dynamo/eval_frame.py\", line 736, in compile_wrapper\n    return fn(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/home/ryan/anaconda3/envs/environment/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 1495, in __call__\n    return self._torchdynamo_orig_callable(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ryan/anaconda3/envs/environment/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 629, in __call__\n    return _compile(\n           ^^^^^^^^^\n  File \"/home/ryan/anaconda3/envs/environment/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 1111, in _compile\n    guarded_code = compile_inner(code, one_graph, hooks, transform)\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ryan/anaconda3/envs/environment/lib/python3.12/site-packages/torch/_utils_internal.py\", line 97, in wrapper_function\n    return function(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ryan/anaconda3/envs/environment/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 793, in compile_inner\n    return _compile_inner(code, one_graph, hooks, transform)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ryan/anaconda3/envs/environment/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 832, in _compile_inner\n    out_code = transform_code_object(code, transform)\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ryan/anaconda3/envs/environment/lib/python3.12/site-packages/torch/_dynamo/bytecode_transformation.py\", line 1424, in transform_code_object\n    transformations(instructions, code_options)\n  File \"/home/ryan/anaconda3/envs/environment/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 267, in _fn\n    return fn(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/home/ryan/anaconda3/envs/environment/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 753, in transform\n    tracer.run()\n  File \"/home/ryan/anaconda3/envs/environment/lib/python3.12/site-packages/torch/_dynamo/symbolic_convert.py\", line 3497, in run\n    super().run()\n  File \"/home/ryan/ana",
    "url": "https://github.com/pytorch/pytorch/issues/171537",
    "state": "open",
    "labels": [
      "oncall: pt2"
    ],
    "created_at": "2025-12-30T20:35:47Z",
    "updated_at": "2026-01-02T10:19:24Z",
    "comments": 0,
    "user": "rwkeane"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 171516,
    "title": "How to verify that default_decompositions successfully reduce operators to the Core ATen IR set?",
    "body": "Hi\uff5e\n\nIs there a way to test if all ops in `default_decompositions` can be fully decomposed into the Core ATen IR (~180 ops) using `ep.run_decompositions`, as specified in the Export IR documentation (https://docs.pytorch.org/docs/stable/export.html#export-ir-decompositions)?\n\n\ncc @chauhang @penguinwu @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4",
    "url": "https://github.com/pytorch/pytorch/issues/171516",
    "state": "open",
    "labels": [
      "oncall: pt2",
      "oncall: export"
    ],
    "created_at": "2025-12-30T09:22:16Z",
    "updated_at": "2026-01-05T16:23:29Z",
    "user": "Tongkaio"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 171501,
    "title": "Several Windows-related GitHub Actions not running \u2014 are they intentionally disabled?",
    "body": "Hi PyTorch team,\nI noticed that several Windows-related GitHub Actions workflows have not run for quite some time. Could you please help confirm whether each of these workflows is intentionally not running, and if not, whether there are plans or timelines for re\u2011enabling them?\nThe workflows in question are:\n\n- https://github.com/pytorch/pytorch/actions/workflows/win-arm64-build-test.yml\n- https://github.com/pytorch/pytorch/actions/workflows/generated-windows-arm64-binary-libtorch-nightly.yml\n- https://github.com/pytorch/pytorch/actions/workflows/_win-arm64-build.yml\n- https://github.com/pytorch/pytorch/actions/workflows/generated-windows-binary-conda-nightly.yml\n- https://github.com/pytorch/pytorch/actions/workflows/generated-windows-binary-libtorch-nightly.yml\n- https://github.com/pytorch/pytorch/actions/workflows/_win-build.yml\n\nIn particular, the workflow https://github.com/pytorch/pytorch/actions/workflows/win-arm64-build-test.yml appears to have been manually disabled and was not re\u2011enabled even after a related fix was merged: https://github.com/pytorch/pytorch/actions/workflows/win-arm64-build-test.yml\n\nThanks in advance for your help!\n\ncc @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex @seemethere @malfet @pytorch/pytorch-dev-infra @snadampal @milpuz01 @aditew01 @nikhil-arm @fadara01 @nWEIdia",
    "url": "https://github.com/pytorch/pytorch/issues/171501",
    "state": "open",
    "labels": [
      "module: windows",
      "module: ci",
      "triaged",
      "module: arm"
    ],
    "created_at": "2025-12-30T05:29:20Z",
    "updated_at": "2026-01-05T14:46:01Z",
    "comments": 2,
    "user": "vortex-captain"
  },
  {
    "repo": "huggingface/candle",
    "number": 3272,
    "title": "Added support for Vulkan, any interest?",
    "body": "I have a Intel Arc A770 16GB GPU and wanted to use it with candle. \nI took niklasha's work on niklas-vulkan-2 branch cherry-pick's into the current main branch.\nI (when I say I, I mean I was the navigator, Codex 5.2 max did the work) added the following:\n\nAdded Vulkan queue-family selection and synchronize() so VulkanDevice uses compute-capable queues and can block on GPU work (device.rs).\nExpanded Vulkan storage surface with raw_buffer() access for kernel dispatch and fixed error wiring (storage.rs).\nWired Vulkan kernel registry to include matmul, norms, softmax, masked softmax, and quantized kernels (lib.rs).\nAdded F32/F16 matmul shader stubs and norm/softmax shaders for initial Vulkan ops coverage (*.comp).\nImplemented Vulkan masked softmax and staged SDPA path with GQA support in candle-nn (ops.rs).\nAdded Vulkan smoke tests and masked softmax correctness test (vulkan_smoke_tests.rs, vulkan_masked_softmax.rs).\nFixed missing imports and push-constant binding for Vulkan command execution (storage.rs).\nAdded bytemuck + vulkano-shaders feature wiring for Vulkan builds (Cargo.toml).\nIntroduced QVulkanStorage backed by raw byte buffers with dequantize/quantize helpers (vulkan.rs).\nAdded Vulkan quantized matmul kernels for Q5_0 and Q8_0 (naive, F32 output) (qmatmul_q5_0_f32.comp, qmatmul_q8_0_f32.comp).\nHooked Vulkan quantized path into QTensor forward and added Vulkan quantized tests (mod.rs, vulkan_quantized_tests.rs).\nAdded a dequantize\u2011fallback backward path for QLoRA-style gradients (mod.rs).\nCleaned up dummy Vulkan stubs to match new quantized API surface (dummy_vulkan.rs).\nFixed multiple test harness macro/feature mismatches to compile with Vulkan enabled (test_utils.rs, *.rs).",
    "url": "https://github.com/huggingface/candle/issues/3272",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-30T02:58:27Z",
    "updated_at": "2025-12-30T03:00:12Z",
    "comments": 0,
    "user": "davidwynter"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16413,
    "title": "Batch Inference On 8255 device",
    "body": "Hi, I want to perform batch inference on the 8255 device now. \nI noticed there is a --num_iters parameter in qnn_llama_runner. Is this parameter for batch inference? Additionally, how can I use the KV cache, that is, load the model and system_prompt once and then perform multiple inferences. \nLooking forward to your reply.\n\ncc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @cbilgin",
    "url": "https://github.com/pytorch/executorch/issues/16413",
    "state": "open",
    "labels": [
      "partner: qualcomm",
      "module: qnn"
    ],
    "created_at": "2025-12-30T02:55:46Z",
    "updated_at": "2026-01-06T07:15:45Z",
    "comments": 6,
    "user": "imjking"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31515,
    "title": "[Feature]: need scheduler solution with high priority to process prefill",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI have a model situiation which is that the model just care about the throughtput not care about the time delay, so I need a schedule solution which can get the high priority to process prefill and after all prefill is finished in the batch and then process the decode, this solution can increase the decode batch_size at the best. I need this feature to support in vllm ascend~\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31515",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-12-30T02:09:35Z",
    "updated_at": "2025-12-30T02:09:35Z",
    "comments": 0,
    "user": "184603418"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3710,
    "title": "[DCP] Add DefaultStager example to distributed async checkpoint recipe",
    "body": "### \ud83d\ude80 Feature Request\n\n**Description**\nThe current `distributed_async_checkpoint_recipe` covers basic usage of `dcp.async_save` and Pinned Memory optimization. However, it does not cover the **fully asynchronous staging** capabilities introduced in PyTorch 2.9 via `DefaultStager`.\n\nEven with `async_save`, the Device-to-Host (D2H) copy (staging phase) typically happens on the main thread, which can block the training loop.\n\n**Proposal**\nI would like to update the tutorial to include a new section on **\"Fully Asynchronous Staging with DefaultStager\"**.\n\nThis update will demonstrate:\n1.  How to use the `async_stager=DefaultStager()` argument.\n2.  How to correctly synchronize staging to achieve full overlap between the D2H copy and the **Forward + Backward** pass of the next step.\n3.  Timeline comparison between standard async save and stager-based async save.\n\nI have already prepared the content and code example.",
    "url": "https://github.com/pytorch/tutorials/issues/3710",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-29T13:28:55Z",
    "updated_at": "2025-12-29T13:28:55Z",
    "comments": 0,
    "user": "niyunsheng"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31486,
    "title": "[Feature]: GLM 4.7 vocab padding feature",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nThe number of attention heads in GLM-4.7 is 96, so I\u2019m trying to run the FP8 version with 6\u00d7 H20 GPUs using tensor parallelism (tp=6).\n\nHowever, vllm serve fails and due to `151552 cannot be divided by 6`.\n\nThis seems to be caused by the vocab size 151552 not being divisible by the TP size. In my understanding, this could be solvable by padding the vocab size up. \n\nAlternatively, is there any simpler workaround or recommended solution for this case? Thanks!\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31486",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-12-29T09:30:35Z",
    "updated_at": "2026-01-06T02:45:22Z",
    "comments": 3,
    "user": "H100-H200-B200"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31484,
    "title": "[Usage]: RuntimeError when running Qwen2.5-VL-7B-Instruct with vllm: Potential version incompatibility",
    "body": "### Your current environment\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.2 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.12 | packaged by Anaconda, Inc. | (main, Oct 21 2025, 20:16:04) [GCC 11.2.0] (64-bit runtime)\nPython platform              : Linux-6.8.0-53-generic-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA B200\nGPU 1: NVIDIA B200\nGPU 2: NVIDIA B200\nGPU 3: NVIDIA B200\nGPU 4: NVIDIA B200\nGPU 5: NVIDIA B200\nGPU 6: NVIDIA B200\nGPU 7: NVIDIA B200\n\nNvidia driver version        : 570.148.08\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        52 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               144\nOn-line CPU(s) list:                  0-143\nVendor ID:                            GenuineIntel\nBIOS Vendor ID:                       Intel(R) Corporation\nModel name:                           Intel(R) Xeon(R) 6960P\nBIOS Model name:                      Intel(R) Xeon(R) 6960P  CPU @ 2.7GHz\nBIOS CPU family:                      179\nCPU family:                           6\nModel:                                173\nThread(s) per core:                   1\nCore(s) per socket:                   72\nSocket(s):                            2\nStepping:                             1\nBogoMIPS:                             5400.00\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hfi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nL1d cache:                            6.8 MiB (144 instances)\nL1i cache:                            9 MiB (144 instances)\nL2 cache:                             288 MiB (144 instances)\nL3 cache:                             864 MiB (2 instances)\nNUMA node(s):                         2\nNUMA node0 CPU(s):                    0-71\nNUMA node1 CPU(s):                    72-143\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS Not affected; BHI BHI_DIS_S\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affected\n\n==========",
    "url": "https://github.com/vllm-project/vllm/issues/31484",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-29T08:36:11Z",
    "updated_at": "2025-12-30T02:40:38Z",
    "comments": 1,
    "user": "puyuan1996"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12899,
    "title": "Training script of  z-image controlnet?",
    "body": "Can diffusers provide training script of  z-image controlnet? ",
    "url": "https://github.com/huggingface/diffusers/issues/12899",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-29T08:30:09Z",
    "updated_at": "2025-12-29T08:30:09Z",
    "comments": 0,
    "user": "universewill"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31480,
    "title": "[Usage]: run deepseek v3.2 failed",
    "body": "### Your current environment\n\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version                : Could not collect\nCMake version                : version 3.22.1\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.12 | packaged by Anaconda, Inc. | (main, Oct 21 2025, 20:16:04) [GCC 11.2.0] (64-bit runtime)\nPython platform              : Linux-5.15.0-78-generic-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA RTX PRO 6000 Blackwell Server Edition\nGPU 1: NVIDIA RTX PRO 6000 Blackwell Server Edition\nGPU 2: NVIDIA RTX PRO 6000 Blackwell Server Edition\nGPU 3: NVIDIA RTX PRO 6000 Blackwell Server Edition\nGPU 4: NVIDIA RTX PRO 6000 Blackwell Server Edition\nGPU 5: NVIDIA RTX PRO 6000 Blackwell Server Edition\nGPU 6: NVIDIA RTX PRO 6000 Blackwell Server Edition\nGPU 7: NVIDIA RTX PRO 6000 Blackwell Server Edition\n\nNvidia driver version        : 580.95.05\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.8.0\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nAddress sizes:                   52 bits physical, 57 bits virtual\nByte Order:                      Little Endian\nCPU(s):                          208\nOn-line CPU(s) list:             0-207\nVendor ID:                       GenuineIntel\nModel name:                      Intel(R) Xeon(R) Platinum 8470Q\nCPU family:                      6\nModel:                           143\nThread(s) per core:              2\nCore(s) per socket:              52\nSocket(s):                       2\nStepping:                        8\nCPU max MHz:                     3800.0000\nCPU min MHz:                     800.0000\nBogoMIPS:                        4200.00\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nVirtualization:                  VT-x\nL1d cache:                       4.9 MiB (104 instances)\nL1i cache:                       3.3 MiB (104 instances)\nL2 cache:                        208 MiB (104 instances)\nL3 cache:                        210 MiB (2 instances)\nNUMA node(s):                    2\nNUMA node0 CPU(s):               0-51,104-155\nNUMA node1 CPU(s):               52-103,156-207\nVulnerability Itlb multihit:     Not affected\nVulnerability L1tf:              Not affected\nVulnerability Mds:               Not affected\nVulnerability Meltdown:          Not affected\nVulnerability Mmio stale data:   Not affected\nVulnerability Retbleed:          Not affected\nVulnerabili",
    "url": "https://github.com/vllm-project/vllm/issues/31480",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-29T07:33:04Z",
    "updated_at": "2025-12-29T07:33:04Z",
    "comments": 0,
    "user": "ljwps"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31479,
    "title": "[Feature]: Enable LoRA support for tower and connector in more MM models",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nRegarding multi-modal models, we have supported adding LoRA to the tower encoder and connector,see: #26674, but have only implemented it for a few models (`Qwen VL series` and `idefics3`). There is no reason not to support other multi-modal models. \n\n### Solution\n\nFor the remaining models we want to support adding LoRA to the tower encoder and connector, we need to implement the following 2 functions:\n\n`get_num_mm_encoder_tokens`\n`get_num_mm_connector_tokens`\n\n**The root cause we need to implement these two functions is:** the number of multi-modal tokens represented in the language model does not necessarily match the input length required by the linear layers in the vision tower or connector. Since the lora_mapping requires the precise input token length prior to activation, these helper functions are necessary to bridge the discrepancy and calculate the correct lengths.\n\n### List of models that are completed or WIP\n\n\n- Qwen VL series: #26674\n- idefics3: #26674\n- LLaVA: https://github.com/vllm-project/vllm/pull/31513\n- BLIP2: https://github.com/vllm-project/vllm/pull/31620\n- GLM4 : https://github.com/vllm-project/vllm/pull/31652\n- PaliGemma  https://github.com/vllm-project/vllm/pull/31656\n- H2OVL  https://github.com/vllm-project/vllm/pull/31696\n- Pixtral  https://github.com/vllm-project/vllm/pull/31724\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31479",
    "state": "open",
    "labels": [
      "help wanted",
      "feature request"
    ],
    "created_at": "2025-12-29T07:28:52Z",
    "updated_at": "2026-01-06T02:03:29Z",
    "comments": 4,
    "user": "jeejeelee"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31474,
    "title": "[Feature]: GLM 4.7 vocab padding feature",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nThe number of attention heads in GLM-4.7 is 96, so I\u2019m trying to run the FP8 version with 6\u00d7 H20 GPUs using tensor parallelism (tp=6).\n\nHowever, vllm serve fails and due to `151552 cannot be divided by 6`.\n\nThis seems to be caused by the vocab size 151552 not being divisible by the TP size. In my understanding, this could be solvable by padding the vocab size up. \n\nAlternatively, is there any simpler workaround or recommended solution for this case? Thanks!\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31474",
    "state": "closed",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-12-29T04:55:28Z",
    "updated_at": "2025-12-29T09:28:17Z",
    "comments": 0,
    "user": "H100-H200-B200"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31469,
    "title": "[Feature]: Optimize the definition of the fake function in the code.",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nThe current code contains some fake function definitions, which are placed together with the main logic, such as `all_reduce_fake`. In the `parallel_state.py` file, can we define a file called `parallel_state_fake.py` and move all the corresponding fake functions to this file, and do the same for the others?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31469",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-12-29T03:14:26Z",
    "updated_at": "2025-12-29T06:16:08Z",
    "comments": 3,
    "user": "lengrongfu"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31467,
    "title": "[RFC]: A Triton operator dispatch mechanism through modified `CustomOp`",
    "body": "### Motivation.\n\nTriton is becoming increasingly important in vLLM, and we've noticed its use in many models, quantization processes, and general workflows. Meanwhile, vLLM supports various backends. Typically, to achieve high performance, **different implementations of the Triton kernels** are used on different hardware, such as Ascend NPU. However, we've observed that vLLM currently lacks an effective operator dispatch mechanism for Triton to ensure that various backends can implement their own Triton kernels, which are then uniformly called by vLLM.\n\nThere are 3 ways of calling triton function now:\n\n#### Through Attention Backend\nTriton functions are called in `Attention` layer when the attention backend is specified as `TRITON_ATTN` or `TRITON_MLA`.\n\n```python\ncurrent_platform.get_attn_backend_cls(...)\n```\n\n#### Through CustomOp\nSome triton functions are included in other customops's forward pipeline, and they are put into `forward_cuda`, e.g., `causal_conv1d_fn` and `causal_conv1d_update` in `ShortConv`.\n\n```python\nclass op1(CustomOp):\n    def forward_cuda(kwargs):\n        triton_fn(**kwargs)\n```\n\n#### Directly call\nAnd there are others directly call triton functions in the normal pipeline.\n  - some models derictly call triton functions in forward\n    - Qwen3-Next\n    - Kimi-Linear\n    - ...\n  - modelrunner v2\n    - block table\n    - input batch\n\nAlso, I notice that the implements are different form rocm and nvidia, algouth they are both cuda-alike platform.\n\n```python\nif current_platform.is_rocm():\n\n    @triton.jit\n    def round_int8(x):\n        return tl.extra.hip.libdevice.round(x).to(tl.int8)\n\nelse:\n\n    @triton.jit\n    def round_int8(x):\n        return tl.extra.cuda.libdevice.round(x).to(tl.int8)\n```\n\n\n### Proposed Change.\n\nTo solve the issues above, we propose to do the following changes:\n\n<img width=\"1537\" height=\"1346\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/425dd6a4-b15c-4057-8aa8-25e4f563970b\" />\n\n1. Abstract a `CustomOpBase` class, which maintains funtions `register`, `register_oot` and `forward_dispatch`, which means all the instance of `CustomOpBase` could be registered in/out of vllm.\n2. Seperate `CustomOp` and `CustomTritonOp`, we dispatch `CustomTritonOp` in a python func level, which pairs with the triton kernel. And the `CustomOp` keeps as is.\n3. Refactor the exsiting triton kernels that are directly called without a python funtion warpping it, e.g., `eagle_prepare_inputs_padded_kernel`\n4. Refactor the triton python functions to be hierit from `CustomTritonOp`, and optimize the current implement of triton kernel patching.\n\n#### Example\n\n##### Code Change\n\n```python\nclass CustomOpBase:\n    \"\"\"\n    Base class for custom op. This class mainly offer the registry and dispatch function,\n    and others must be overwrite in the sub classes.\n    Dispatches the forward method to the appropriate backend.\n    \"\"\"\n\n    op_registry: dict[str, Any] = {}\n    op_registry_oot: dict[str, Any] = {}\n\n    def __new__(cls, *args, **kwargs):\n        try:\n            op_name = cls.__name__\n        except AttributeError:\n            raise TypeError(\n                f\"Cannot instantiate '{cls.__name__}': its 'name' attribute \"\n                f\"was not set, possibly because it was not decorated with \"\n                f\"@CustomOp.register, or it's the CustomOp base class itself.\"\n            ) from None\n\n        if op_name not in cls.op_registry_oot:\n            op_cls_to_instantiate = cls\n        else:\n            op_cls_to_instantiate = cls.op_registry_oot[op_name]\n            logger.debug(\n                \"Instantiating custom op: %s using %s\",\n                op_name,\n                str(op_cls_to_instantiate),\n            )\n        return super().__new__(op_cls_to_instantiate)\n\n    def __init__(self, enforce_enable: bool = False):\n        self._enforce_enable = enforce_enable\n        self._forward_method = self.dispatch_forward()\n\n    def forward(self, *args, **kwargs):\n        return self._forward_method(*args, **kwargs)\n\n    def forward_native(self, *args, **kwargs):\n        raise NotImplementedError\n\n    def forward_cuda(self, *args, **kwargs):\n        raise NotImplementedError\n\n    def forward_x(self, *args, **kwargs):\n        raise NotImplementedError\n\n    def forward_oot(self, *args, **kwargs):\n        raise NotImplementedError\n\n    def dispatch_forward(self):\n        raise NotImplementedError\n\n    # Decorator to register custom ops.\n    @classmethod\n    def register(cls, name: str):\n        def decorator(op_cls):\n            assert name not in cls.op_registry, f\"Duplicate op name: {name}\"\n            op_cls.name = name\n            cls.op_registry[name] = op_cls\n            return op_cls\n\n        return decorator\n\n    @classmethod\n    def register_oot(cls, _decorated_op_cls=None, name: str | None = None):\n        def decorator(op_cls):\n            reg_name = name if name is not None else cls.__name__\n            assert reg_name not in cls.op_registry_oot, f\"Duplicate op name: {reg_",
    "url": "https://github.com/vllm-project/vllm/issues/31467",
    "state": "open",
    "labels": [
      "RFC"
    ],
    "created_at": "2025-12-29T02:44:13Z",
    "updated_at": "2026-01-06T07:38:29Z",
    "comments": 12,
    "user": "MengqingCao"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31437,
    "title": "[Bug]: Streaming tool calls missing id/type/name in finish chunk",
    "body": "### Your current environment\n\nvLLM 0.14.0rc1.dev3 (but also affects main branch as of today)\n\n### Model\n\nGLM-4.7-AWQ with `--tool-call-parser glm47` (also affects other parsers that emit complete tool calls)\n\n### What is the issue?\n\nWhen streaming tool calls, the finish chunk code in `serving_chat.py` overwrites the tool parser's properly-formatted `DeltaMessage` with a stripped-down version that only contains `index` and `function.arguments`, losing the `id`, `type`, and `function.name` fields.\n\nThis breaks OpenAI-compatible clients that expect `id` to be present in tool call responses.\n\n### Root cause\n\nIn `serving_chat.py` around line 1237, when `_should_check_for_unstreamed_tool_arg_tokens()` returns true:\n\n```python\nremaining_call = expected_call.replace(actual_call, \"\", 1)\ndelta_message = DeltaMessage(\n    tool_calls=[\n        DeltaToolCall(\n            index=index,\n            function=DeltaFunctionCall(\n                arguments=remaining_call\n            ).model_dump(exclude_none=True),\n        )\n    ]\n)\n```\n\nThis creates a new `DeltaMessage` without preserving `id`, `type`, or `function.name` from the original `delta_message` that the tool parser returned.\n\n### Proposed fix\n\nPreserve the fields from the original delta:\n\n```python\nremaining_call = expected_call.replace(actual_call, \"\", 1)\noriginal_tc = delta_message.tool_calls[0]\noriginal_fn = original_tc.function if original_tc else None\ndelta_message = DeltaMessage(\n    tool_calls=[\n        DeltaToolCall(\n            index=index,\n            id=original_tc.id if original_tc else None,\n            type=original_tc.type if original_tc else None,\n            function=DeltaFunctionCall(\n                name=original_fn.name if original_fn else None,\n                arguments=remaining_call,\n            ),\n        )\n    ]\n)\n```\n\n### Why this wasn't caught before\n\nThis code path only triggers when the tool parser hasn't streamed all argument tokens yet. Many parsers stream arguments incrementally, so they rarely hit this path. Parsers like GLM that emit complete tool calls at once trigger it consistently.\n\n### Related issues\n\n- #16340 (similar symptoms, different root cause)\n- #10781 (mentions delta not being submitted correctly)\n\nHappy to submit a PR if this approach looks right.\n\n### Before submitting a new issue...\n\n- [X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31437",
    "state": "closed",
    "labels": [],
    "created_at": "2025-12-27T23:54:20Z",
    "updated_at": "2025-12-29T13:10:54Z",
    "comments": 0,
    "user": "amittell"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 171392,
    "title": "[Bug] c10::SmallVector: getNewCapacity has unused TSize parameter \u2014 remove or use for overflow-safety?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nIn [`c10/util/SmallVector.cpp`](https://github.com/pytorch/pytorch/blob/913ea815a4555747729eb2206266411782f29370/c10/util/SmallVector.cpp#L87C53-L87C58) we have:\n\n`template <class Size_T> static size_t getNewCapacity(size_t MinSize, size_t TSize, size_t OldCapacity)`\n\nCurrently `TSize` is unused.\n\nWe can:\n1. Remove TSize from getNewCapacity (simplify signature), or\n2. Use TSize to clamp the maximum capacity (e.g. MaxSize = min(numeric_limits<Size_T>::max(), SIZE_MAX / TSize)) and make growth arithmetic overflow-safe.\n\nWhat is preferred? I can send a PR with the better option later.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @jbschlosser",
    "url": "https://github.com/pytorch/pytorch/issues/171392",
    "state": "open",
    "labels": [
      "module: cpp",
      "triaged"
    ],
    "created_at": "2025-12-27T22:54:34Z",
    "updated_at": "2026-01-05T17:48:08Z",
    "comments": 4,
    "user": "yewentao256"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31414,
    "title": "[Feature][Cleanup]: Unify `vllm.utils.flashinfer` and `vllm.model_executor.layers.quantization.utils.flashinfer_utils`",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nits confusing to have both\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31414",
    "state": "open",
    "labels": [
      "help wanted",
      "good first issue",
      "feature request"
    ],
    "created_at": "2025-12-27T18:27:00Z",
    "updated_at": "2025-12-31T22:25:36Z",
    "comments": 4,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31398,
    "title": "[Doc]: Eagle3 with tensor parallelism",
    "body": "### \ud83d\udcda The doc issue\n\nAccording to https://docs.vllm.ai/en/latest/features/spec_decode/#speculating-using-eagle-based-draft-models: \n\n> The EAGLE based draft models need to be run without tensor parallelism (i.e. draft_tensor_parallel_size is set to 1 in speculative_config), although it is possible to run the main model using tensor parallelism (see example above).\n\nBut there's no explanation for why the draft tpsize could only be set to 1, so I checked the code and found:\n\nhttps://github.com/vllm-project/vllm/blob/52bf0665168c539d2d061a664ad62b18a12e80bb/vllm/config/speculative.py#L441-L447\n\nand\n\nhttps://github.com/vllm-project/vllm/blob/52bf0665168c539d2d061a664ad62b18a12e80bb/vllm/config/speculative.py#L563-L571\n\nI did not find any explicit restriction that enforces the draft model to run without tensor parallelism.\n\nSo I guess the `draft_tensor_parallel_size` should be set to **either** 1 **or** the same value as the target_model. And also I tried doing so, and found that the tensor parallelism seems worked correctly.\n\nIs it possible that this functionality has already been implemented, but the documentation has not been updated accordingly?\n\n\n### Suggest a potential alternative/fix\n\nJust change one line of documentation as mentioned above:\n\n> It's possible to run the EAGLE based draft models with tensor_parallel using tp_size=1 or target_model_tpsize (i.e. `draft_tensor_parallel_size` is set to either 1 or the same value as the target_model in speculative_config).\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31398",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-12-27T03:10:50Z",
    "updated_at": "2026-01-04T01:21:07Z",
    "comments": 3,
    "user": "JSYRD"
  },
  {
    "repo": "huggingface/transformers",
    "number": 43048,
    "title": "Need to understand difference between TP support via transformers code v/s Pytorch's native parallelize_module API.",
    "body": "Based on the existing code base of transformers, below sequence of operations are performed on model object to make it TP compatible.\n\n- TP Plan for Llama: https://github.com/huggingface/transformers/blob/a7f29523361b2cc12e51c1f5133d95f122f6f45c/src/transformers/models/llama/configuration_llama.py#L113\n- self._tp_plan populated based on above default plan:\nhttps://github.com/huggingface/transformers/blob/a7f29523361b2cc12e51c1f5133d95f122f6f45c/src/transformers/modeling_utils.py#L1325\n- from_pretrained calls distribute_model\nhttps://github.com/huggingface/transformers/blob/a7f29523361b2cc12e51c1f5133d95f122f6f45c/src/transformers/modeling_utils.py#L3944\n- distribute_model internally applies TP hooks based on the plans defined for each module.\nhttps://github.com/huggingface/transformers/blob/a7f29523361b2cc12e51c1f5133d95f122f6f45c/src/transformers/integrations/tensor_parallel.py#L1307 \n\n\nI want to understand how this is different than parallelize_module API of Pytorch (https://docs.pytorch.org/docs/stable/distributed.tensor.parallel.html#torch.distributed.tensor.parallel.parallelize_module).\n\nOne example of TP+DP can be referred from below link.\nhttps://github.com/pytorch/pytorch/blob/7de041cb5a5817500b973eb32a70325187a83407/test/distributed/_composable/test_composability/test_2d_composability.py#L478\n\nFrom the Pytorch example, it looks very clean to work with plain DP and TP. But when using Transformer's Trainer along with Accelerate for Plain DP+TP then there are lot of complications identified in https://github.com/huggingface/accelerate/issues/3876#issuecomment-3627324602.\n\nI would like to understand the difference between the existing transformers approach and plain Pytorch approach and request streamlining the implementation of transformers as well as accelerate if that feels suitable.",
    "url": "https://github.com/huggingface/transformers/issues/43048",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-26T10:05:38Z",
    "updated_at": "2026-01-05T15:35:13Z",
    "comments": 1,
    "user": "quic-meetkuma"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2721,
    "title": "The virtual machine is unable to recognize the keyboard.",
    "body": "### Ticket Type\n\n\u2753 Technical Question\n\n### Environment & System Info\n\n```Shell\n(base) tom@tom-VMware-Virtual-Platform:~/lerobot_alohamini$ python check_lerobot.py \n\u4f7f\u7528\u73b0\u6709\u7684DISPLAY: :0\n=== \u73af\u5883\u8bca\u65ad ===\nPython \u7248\u672c: 3.12.12 | packaged by conda-forge | (main, Oct 22 2025, 23:25:55) [GCC 14.3.0]\nDISPLAY \u73af\u5883\u53d8\u91cf: :0\nXDG_SESSION_TYPE \u73af\u5883\u53d8\u91cf: wayland\nWayland_DISPLAY \u73af\u5883\u53d8\u91cf: \u672a\u8bbe\u7f6e\n===============\n\n\u6b63\u5728\u542f\u52a8\u952e\u76d8\u76d1\u542c\u5668...\n\u8bf7\u5c1d\u8bd5\u6309\u4e0b\u4e00\u4e9b\u5b57\u6bcd\u952e\u548c\u65b9\u5411\u952e\u3002\n\u6309 `ESC` \u952e\u9000\u51fa\u6d4b\u8bd5\u3002\n\n\u76d1\u542c\u5668\u7ebf\u7a0b\u5df2\u542f\u52a8\u3002\u7b49\u5f85\u6309\u952e\u8f93\u5165...\nwsdasdwsdasdfdaswdsdfawdsa\n```\n\n### Description\n\nWhen you use the Ubuntu system of the virtual machine to control the main arm and chassis, you may encounter a problem where the keyboard cannot be recognized. This problem is actually quite easy to solve. All you need to do is log out of your desktop, go to the login screen, and click the \u2699 gear icon below the username to select \"Ubuntu on Xorg\". The reason for this problem is that the pynput library relies on the X11 protocol, while Wayland is a new display server protocol, and the two are not fully compatible.After that, you can safely use your keyboard.\n\n### Context & Reproduction\n\n_No response_\n\n### Relevant logs or stack trace\n\n```Shell\n\n```\n\n### Checklist\n\n- [ ] I have searched existing tickets to ensure this isn't a duplicate.\n- [ ] I am using the latest version of the `main` branch.\n- [ ] I have verified this is not an environment-specific problem.\n\n### Additional Info / Workarounds\n\n_No response_",
    "url": "https://github.com/huggingface/lerobot/issues/2721",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-12-26T08:02:27Z",
    "updated_at": "2025-12-26T08:02:37Z",
    "user": "ht202"
  },
  {
    "repo": "huggingface/transformers",
    "number": 43045,
    "title": "Multimodal chat sample",
    "body": "### Feature request\n\nAdd a sample covering chat scenario including images, videos or audio.\n\n### Motivation\n\n`AutoModelForCausalLM`'s `use_cache` is barely documented.\nDescribe a pattern handling the following cases\n1. Tokenizer replaces tokens that are already in kv cache with a different token. For example, the model generated 2 tokens with string representations: `a` and `b` and the tokenizer replaces them with a single `a b` token on the next iteration invalidating a part of kv cache\n2. Reuse embeddings computed earlier for non text modalities\n\nThere's https://github.com/huggingface/transformers/blob/a7f29523361b2cc12e51c1f5133d95f122f6f45c/src/transformers/cli/chat.py but it doesn't cover non text modalities.\n\n### Your contribution\n\nI'm fine to submit a PR. That will help me to learn along the way. But I need guidance how to resolve the issues I described in the motivation section.",
    "url": "https://github.com/huggingface/transformers/issues/43045",
    "state": "closed",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-12-26T06:16:53Z",
    "updated_at": "2025-12-31T10:36:38Z",
    "comments": 9,
    "user": "Wovchena"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15860,
    "title": "[Ask for help] How to deploy GLM-4.7",
    "body": "Hi, can anyone help me to deploy GLM-4.7? I encounter a bug when using `sglang==0.5.6.post2` (which is latest on `https://github.com/sgl-project/sglang`). What is the correct version for GLM-4.7?\n```\nlaunch_server.py: error: argument --tool-call-parser: invalid choice: 'glm47' (choose from 'deepseekv3', 'deepseekv31', 'deepseekv32', 'glm', 'glm45', 'gpt-oss', 'kimi_k2', 'llama3', 'mistral', 'pythonic', 'qwen', 'qwen25', 'qwen3_coder', 'step3', 'minimax-m2')\n```\n\nThanks so much!!!!!!!!!!!\n\n<img width=\"823\" height=\"229\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/241144fa-2038-4f43-be6d-de0895071ffe\" />",
    "url": "https://github.com/sgl-project/sglang/issues/15860",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-26T02:59:06Z",
    "updated_at": "2025-12-28T21:21:17Z",
    "comments": 2,
    "user": "sunjie279"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1919,
    "title": "De/tokenization on CUDA",
    "body": "Could at least de-tokenization be done directly on CUDA? Like in my hack `bpedecode_vec` in https://github.com/pytorch/pytorch/issues/135704#issue-2520180382 which indexes into a detokenization vocab byte table via `repeat_interleave`\n\nAlso, maybe for better CUDAGraph-ability / no CPU syncs, there should be some static-sized pre-allocated `out=` version, like `torch.nonzero_static`?\n\n---\nOfftopic: it's also a bit inconsistent naming to have `batch_decode` and `batch_encode_plus`... What is the motivation for the `_plus` suffix?",
    "url": "https://github.com/huggingface/tokenizers/issues/1919",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-26T02:20:49Z",
    "updated_at": "2026-01-05T10:51:17Z",
    "comments": 1,
    "user": "vadimkantorov"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31361,
    "title": "[Usage]: Question about the dummy run\u3002It seems the dummy run use different precision?",
    "body": "### Question\n\nI am trying to modify vllm. especially the **tp** communication, i'am tring to **break all-reduce into reduce-scatter + all-gather**. \n\nHowever I encountered precision problem, after i print the hidden states. it seems each layer has around  +-0.01 diff, when it accumulated over all the layers, the result seems to be a huge difference. I thought it may be my implementation error. But after I checked the log, I see some dummy run before executing real request. **I checked the dummy run's  data. It perfectly matches between all-reduce & reduce-scatter + all-gather**, which means each layer is exactly same with no accumulated error. So I wonder \n1. Can you tell me where there is two dummy run. in My example of Qwen3-32B, one seqlen is max model len, one seqlen is 1024\n2. Can you possibly tell me What may influence the precision ?\n\n\n### How would you like to use vllm\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31361",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-25T16:38:03Z",
    "updated_at": "2025-12-27T03:41:27Z",
    "comments": 0,
    "user": "Dingjifeng"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31353,
    "title": "[Bug]: KV Cache grows continuously with just one chat completion request using meta-llama/Llama-3.2-1B on L40 GPU with Flash Attention and finally completed after 10 minutes",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.3 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : version 3.28.3\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.11 | packaged by Anaconda, Inc. | (main, Jun  5 2025, 13:09:17) [GCC 11.2.0] (64-bit runtime)\nPython platform              : Linux-5.15.0-161-generic-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.6.85\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : GPU 0: NVIDIA L40S\nNvidia driver version        : 550.163.01\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.5.1\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.5.1\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.5.1\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.5.1\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.5.1\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.5.1\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.5.1\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.5.1\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           46 bits physical, 57 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  16\nOn-line CPU(s) list:                     0-15\nVendor ID:                               GenuineIntel\nModel name:                              Intel(R) Xeon(R) Gold 6338 CPU @ 2.00GHz\nCPU family:                              6\nModel:                                   106\nThread(s) per core:                      2\nCore(s) per socket:                      8\nSocket(s):                               1\nStepping:                                6\nBogoMIPS:                                3990.65\nFlags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq dtes64 ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves wbnoinvd arat avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid fsrm md_clear arch_capabilities\nHypervisor vendor:                       KVM\nVirtualization type:                     full\nL1d cache:                               512 KiB (16 instances)\nL1i cache:                               512 KiB (16 instances)\nL2 cache:                                32 MiB (8 instances)\nL3 cache:                                16 MiB (1 instance)\nNUMA node(s):                            1\nNUMA node0 CPU(s):                       0-15\nVulnerability Gather data sampling:      Unknown: Dependent on hypervisor status\nVulnerability Indirect target selection: Mitigation; Aligned branch/return thunks\nVulnerability Itlb multihit:             Not affected\nVulnerability L1tf:                      Not affected\nVulnerability Mds:                       Not affected\nVulnerability Meltdown:                  Not affected\nVulnerability Mmio stale data:           Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown\nVulnerability Reg file data sampling:    Not affected\nVulnerability Retbleed:                  Not affected\nVulnerability Spec rstack overflow:      Not affected\nVulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:                Mitigation; Enhanced / Automatic IBRS; IBPB conditional;",
    "url": "https://github.com/vllm-project/vllm/issues/31353",
    "state": "open",
    "labels": [
      "bug",
      "help wanted"
    ],
    "created_at": "2025-12-25T13:56:52Z",
    "updated_at": "2025-12-27T15:55:34Z",
    "comments": 1,
    "user": "aravilli"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15825,
    "title": "Is it normal that Qwen3-30B-A3B runs slower than Qwen3-8B?",
    "body": "I serve two models on the Ascend 910 platform (following sglang's ascend examples) with the same tp2dp8 and benchmarked them. \nBefore testing, I suppose A3B will be faster than 8B for fewer activated tensor blocks. \nBut the result is different:\n### qwen 30B A3B\n```\nexport SGLANG_SET_CPU_AFFINITY=1\nexport PYTORCH_NPU_ALLOC_CONF=expandable_segments:True\nexport STREAMS_PER_DEVICE=32\nexport HCCL_BUFFSIZE=1536\nexport HCCL_OP_EXPANSION_MODE=AIV\nexport SGLANG_DEEPEP_NUM_MAX_DISPATCH_TOKENS_PER_RANK=32\nexport SGLANG_DEEPEP_BF16_DISPATCH=1\nexport ENABLE_ASCEND_MOE_NZ=1\n\npython -m sglang.launch_server \\\n   --device npu \\\n   --attention-backend ascend \\\n   --trust-remote-code \\\n   --tp-size 2 \\\n   --dp-size 8 \\\n   --model **Qwen/Qwen3-30B-A3B-Instruct-2507** \\\n   --model-path /models/Qwen3-30B-A3B-Instruct-2507 \\\n   --port 30111 \\\n   --mem-fraction-static 0.8\n```\n```\n============ Serving Benchmark Result ============\nBackend:                                 sglang    \nTraffic request rate:                    inf       \nMax request concurrency:                 not set   \nSuccessful requests:                     1000      \nBenchmark duration (s):                  69.68     \nTotal input tokens:                      3055233   \nTotal input text tokens:                 3055233   \nTotal input vision tokens:               0         \nTotal generated tokens:                  513413    \nTotal generated tokens (retokenized):    512578    \nRequest throughput (req/s):              14.35     \nInput token throughput (tok/s):          43846.56  \n**Output token throughput (tok/s):         7368.14**   \nPeak output token throughput (tok/s):    12775.00  \nPeak concurrent requests:                1000      \nTotal token throughput (tok/s):          51214.70  \nConcurrency:                             665.97    \n----------------End-to-End Latency----------------\nMean E2E Latency (ms):                   46404.83  \nMedian E2E Latency (ms):                 49605.93  \n---------------Time to First Token----------------\nMean TTFT (ms):                          10682.85  \nMedian TTFT (ms):                        9808.31   \nP99 TTFT (ms):                           16320.45  \n-----Time per Output Token (excl. 1st token)------\nMean TPOT (ms):                          96.14     \nMedian TPOT (ms):                        75.08     \nP99 TPOT (ms):                           399.24    \n---------------Inter-Token Latency----------------\nMean ITL (ms):                           69.71     \nMedian ITL (ms):                         69.43     \nP95 ITL (ms):                            80.73     \nP99 ITL (ms):                            96.53     \nMax ITL (ms):                            5450.67   \n==================================================\n```\n\n### Qwen3 8B\n\n```\nexport SGLANG_SET_CPU_AFFINITY=1\nexport PYTORCH_NPU_ALLOC_CONF=expandable_segments:True\nexport STREAMS_PER_DEVICE=32\nexport HCCL_BUFFSIZE=1536\nexport HCCL_OP_EXPANSION_MODE=AIV\n\nASCEND_RT_VISIBLE_DEVICES=0 python -m sglang.launch_server \\\n   --device npu \\\n   --attention-backend ascend \\\n   --trust-remote-code \\\n   --model Qwen/Qwen3-8B \\\n   --model-path /models/Qwen3-8B \\\n   --port 30111 \\\n   --mem-fraction-static 0.8 \\\n   --tp-size 2 \\\n   --dp-size 8 \n```\n```\n============ Serving Benchmark Result ============\nBackend:                                 sglang    \nTraffic request rate:                    inf       \nMax request concurrency:                 not set   \nSuccessful requests:                     1000      \nBenchmark duration (s):                  49.67     \nTotal input tokens:                      3055233   \nTotal input text tokens:                 3055233   \nTotal input vision tokens:               0         \nTotal generated tokens:                  513413    \nTotal generated tokens (retokenized):    512976    \nRequest throughput (req/s):              20.13     \nInput token throughput (tok/s):          61513.14  \n**Output token throughput (tok/s):         10336.90**  \nPeak output token throughput (tok/s):    23242.00  \nPeak concurrent requests:                1000      \nTotal token throughput (tok/s):          71850.04  \nConcurrency:                             709.69    \n----------------End-to-End Latency----------------\nMean E2E Latency (ms):                   35249.04  \nMedian E2E Latency (ms):                 36490.95  \n---------------Time to First Token----------------\nMean TTFT (ms):                          10977.22  \nMedian TTFT (ms):                        9339.57   \nP99 TTFT (ms):                           16697.36  \n-----Time per Output Token (excl. 1st token)------\nMean TPOT (ms):                          82.35     \nMedian TPOT (ms):                        48.71     \nP99 TPOT (ms):                           516.74    \n---------------Inter-Token Latency----------------\nMean ITL (ms):                           47.37     \nMedian ITL (ms):                         35.12     \nP95 ITL (ms):                            105.74    \nP99 ITL (ms):                            463.46    \nMax I",
    "url": "https://github.com/sgl-project/sglang/issues/15825",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-25T11:26:10Z",
    "updated_at": "2025-12-25T11:26:10Z",
    "comments": 0,
    "user": "yucc-leon"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31344,
    "title": "[Usage]: how to pass param logits_processors in  AsyncEngineArgs?",
    "body": "### Your current environment\n                                                import torch\nfrom transformers import LogitsProcessor\nfrom transformers.generation.logits_process import _calc_banned_ngram_tokens\nfrom typing import List, Set\n\n\nclass NoRepeatNGramLogitsProcessor(LogitsProcessor):\n\n    def __init__(self, ngram_size: int, window_size: int = 100, whitelist_token_ids: set = None):\n        if not isinstance(ngram_size, int) or ngram_size <= 0:\n            raise ValueError(f\"`ngram_size` has to be a strictly positive integer, but is {ngram_size}\")\n        if not isinstance(window_size, int) or window_size <= 0:\n            raise ValueError(f\"`window_size` has to be a strictly positive integer, but is {window_size}\")\n        self.ngram_size = ngram_size\n        self.window_size = window_size\n        self.whitelist_token_ids = whitelist_token_ids or set()\n    \n    def __call__(self, input_ids: List[int], scores: torch.FloatTensor) -> torch.FloatTensor:\n        if len(input_ids) < self.ngram_size:\n            return scores\n        \n        current_prefix = tuple(input_ids[-(self.ngram_size - 1):])\n        \n        search_start = max(0, len(input_ids) - self.window_size)\n        search_end = len(input_ids) - self.ngram_size + 1\n        \n        banned_tokens = set()\n        for i in range(search_start, search_end):\n            ngram = tuple(input_ids[i:i + self.ngram_size])\n            if ngram[:-1] == current_prefix:\n                banned_tokens.add(ngram[-1])\n        \n        banned_tokens = banned_tokens - self.whitelist_token_ids\n        \n        if banned_tokens:\n            scores = scores.clone()\n            for token in banned_tokens:\n                scores[token] = -float(\"inf\")\n        \n        return scores\n\n\n\n    async def stream_generate(image=None, prompt=''):\n        logits_processors = [NoRepeatNGramLogitsProcessor(ngram_size=30, window_size=90,\n                                                          whitelist_token_ids={128821, 128822})]  # whitelist: <td>, </td>\n        #\u9ad8\u7248\u672c\n        logits_processors_config: list[Dict[str, Any]] = [\n            {\n                \"class\": NoRepeatNGramLogitsProcessor,  # \u4f20\u5165\u7c7b\u5bf9\u8c61\n                \"kwargs\": {  # \u521d\u59cb\u5316\u53c2\u6570\n                    \"ngram_size\": 30,\n                    \"window_size\": 90,\n                    \"whitelist_token_ids\": {128821, 128822}\n                }\n            }\n        ]\n    \n        engine_args = AsyncEngineArgs(\n            model=MODEL_PATH,\n            #hf_overrides={\"architectures\": [\"DeepseekOCRForCausalLM\"]},\n            block_size=256,\n            max_model_len=8192,\n            enforce_eager=False,\n            trust_remote_code=True,  \n            tensor_parallel_size=1,\n            gpu_memory_utilization=0.75,\n            logits_processors=logits_processors_config\n        )\n        engine = AsyncLLMEngine.from_engine_args(engine_args)\n        \n\nerror:\n\".local/lib/python3.13/site-packages/vllm/engine/arg_utils.py\", line 1189, in create_model_config\n    return ModelConfig(\n        model=self.model,\n    ...<46 lines>...\n        io_processor_plugin=self.io_processor_plugin,\n    )\n  File \"/.local/lib/python3.13/site-packages/pydantic/_internal/_dataclasses.py\", line 121, in __init__\n    s.__pydantic_validator__.validate_python(ArgsKwargs(args, kwargs), self_instance=s)\n    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\npydantic_core._pydantic_core.ValidationError: 2 validation errors for ModelConfig\nlogits_processors.0.str\n  Input should be a valid string [type=string_type, input_value={'class': <class 'process...ids': {128821, 128822}}}, input_type=dict]\n    For further information visit https://errors.pydantic.dev/2.12/v/string_type\nlogits_processors.0.custom-error[is-instance[type]]\n  Input should be a type [type=is_type, input_value={'class': <class 'process...ids': {128821, 128822}}}, input_type=dict]",
    "url": "https://github.com/vllm-project/vllm/issues/31344",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-25T10:12:02Z",
    "updated_at": "2025-12-25T13:30:54Z",
    "comments": 0,
    "user": "cqray1990"
  },
  {
    "repo": "pytorch/ao",
    "number": 3543,
    "title": "[MXLinear]Where is the operator call for implementing MXFP8 in NVD?",
    "body": "In the forward method of the MXLinear class, `mx_mm.apply` is called, although `MXTensor.to_mx` is also invoked. The following code implements the quantization processing of MXFP8\uff1a\nscale_e8m0_biased, data_lp = to_mx(data_hp, elem_dtype, block_size, scaling_mode, is_swizzled_scales)\n\nWhen examining the implementation of to_mx, I noticed that it does not call any CUDA-related low-precision operators; instead, it uses simulated low-precision implementations. What could be the reason for this? And where are the CUDA MXFP8 low-precision operators called? Thank you.",
    "url": "https://github.com/pytorch/ao/issues/3543",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-25T09:58:57Z",
    "updated_at": "2025-12-26T07:21:30Z",
    "user": "LucaHW"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12889,
    "title": "Question about qwen-image-edit-2511 loading warning",
    "body": "When loading the model qwen-image-edit-2511 using the diffusers library, I encounter the following warning:\n\nThe config attributes {'zero_cond_t': True} were passed to QwenImageTransformer2DModel, but are not expected and will be ignored. Please verify your config.json configuration file.\n\nThis suggests that the zero_cond_t parameter is present in the model\u2019s config but is not recognized by the current implementation of QwenImageTransformer2DModel. Could you please clarify whether this attribute is deprecated, optional, or requires a specific version of the library? Additionally, is there any recommended action to suppress or resolve this warning?",
    "url": "https://github.com/huggingface/diffusers/issues/12889",
    "state": "closed",
    "labels": [],
    "created_at": "2025-12-25T07:06:28Z",
    "updated_at": "2025-12-25T08:56:28Z",
    "comments": 2,
    "user": "wizardbob"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15810,
    "title": "[Bug] hicache 3fs backend global metadata much instance deploy bug",
    "body": "### Checklist\n\n- [x] I searched related issues but found no solution.\n- [x] The bug persists in the latest version.\n- [ ] Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.\n- [ ] If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [ ] Please use English. Otherwise, it will be closed.\n\n### Describe the bug\n\nCurrently, although the 3fs backend uses the globalMetadata service to manage the global 3fs cache, the following issue exists: this service cannot be deployed with multiple instances. Multi-instance deployment would cause concurrent write problems with metadata. Is there a chance to fix this issue?\n\n### Reproduction\n\ncheck code can know this\n\n### Environment\n\n\u3002\u3002",
    "url": "https://github.com/sgl-project/sglang/issues/15810",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-25T06:52:45Z",
    "updated_at": "2025-12-25T09:42:30Z",
    "comments": 4,
    "user": "weibingo"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31319,
    "title": "[Bug]: GLM-4.7-FP8 missing beginning <think> tag ",
    "body": "### Your current environment\n\nI am on docker nightly vLLM API server version 0.14.0rc1.dev104+g8ee90c83f\n\n\n### \ud83d\udc1b Describe the bug\n\n\nI hosted the model via vllm and already without reasoning_parser, I found the model output with directly output without <think> but having close tag </think> later. \n\n```\nroot@iv-ydzbs5zshss6ipm6s5gu /h/n/d/ark_http_proxy# curl --location 'http://localhost/v1/chat/completions' \\\n                                                    --header 'Authorization: Bearer YOUR_API_KEY' \\\n                                                    --header 'Content-Type: application/json' \\\n                                                    --data '{\n                                                        \"model\": \"GLM-4.7-FP8\", \"stream\": true,\n                                                        \"messages\": [\n                                                            {\n                                                                \"role\": \"user\",\n                                                                \"content\": \"what is cryptography\"\n                                                            }\n                                                        ],\"chat_template_kwargs\": {\"enable_thinking\": true}, \"skip_special_tokens\": false,\n                                                        \"thinking\": {\n                                                            \"type\": \"enabled\"\n                                                        },\n                                                        \"max_tokens\": 1024,\n                                                        \"temperature\": 1.0\n                                                    }'\ndata: {\"id\":\"chatcmpl-9fbc092d919f9e51\",\"object\":\"chat.completion.chunk\",\"created\":1766599479,\"model\":\"GLM-4.7-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"prompt_token_ids\":null}\n\ndata: {\"id\":\"chatcmpl-9fbc092d919f9e51\",\"object\":\"chat.completion.chunk\",\"created\":1766599479,\"model\":\"GLM-4.7-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"1\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null,\"token_ids\":null}]}\n\ndata: {\"id\":\"chatcmpl-9fbc092d919f9e51\",\"object\":\"chat.completion.chunk\",\"created\":1766599479,\"model\":\"GLM-4.7-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\". \",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null,\"token_ids\":null}]}\n\ndata: {\"id\":\"chatcmpl-9fbc092d919f9e51\",\"object\":\"chat.completion.chunk\",\"created\":1766599479,\"model\":\"GLM-4.7-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" **An\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null,\"token_ids\":null}]}\n\ndata: {\"id\":\"chatcmpl-9fbc092d919f9e51\",\"object\":\"chat.completion.chunk\",\"created\":1766599479,\"model\":\"GLM-4.7-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"alyze the\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null,\"token_ids\":null}]}\n```\nI confirmed that chat template will \n\n```\nroot@iv-ydzbs5zshss6ipm6s5gu /h/n/d/ark_http_proxy# curl -sS 'http://127.0.0.1/tokenize' \\\n                                                      -H 'Content-Type: application/json' \\\n                                                      -d '{\"model\":\"GLM-4.7-FP8\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"add_generation_prompt\":true,\"return_token_strs\":true}'\n{\"count\":6,\"max_model_len\":202752,\"tokens\":[151331,151333,151336,6023,151337,151350],\"token_strs\":[\"[gMASK]\",\"<sop>\",\"<|user|>\",\"hi\",\"<|assistant|>\",\"<think>\"]}\u23ce  \n```\n\n\nI think we need a similar **minimax_m2_append_think** reasoning parser to simply append think to content beginning?\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31319",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-24T18:45:34Z",
    "updated_at": "2026-01-06T07:59:45Z",
    "comments": 16,
    "user": "Nemo-G"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16392,
    "title": "Reasoning without using the think function",
    "body": "Hi, i want to use Qwen3_0.6B model in 8255 device, i exported pte model and run it on device successfully. Now i want to disable the \"think\" function to verify something, how can i achieve it ?\nI use the following command and get outputs.txt:\n./qnn_llama_runner_ndk27 --decoder_model_version qwen3 --tokenizer_path tokenizer.json --model_path hybrid_llama_qnn.pte --prompt \"who are you\" --seq_len 512 --eval_mode 1 --temperature 0.8 && cat outputs.txt\n\n<img width=\"2498\" height=\"488\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/173d3f93-9657-4678-ac96-2b22151c8a5c\" />\n\ncc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @cbilgin",
    "url": "https://github.com/pytorch/executorch/issues/16392",
    "state": "closed",
    "labels": [
      "partner: qualcomm",
      "module: qnn"
    ],
    "created_at": "2025-12-24T12:24:35Z",
    "updated_at": "2025-12-30T02:32:04Z",
    "comments": 2,
    "user": "imjking"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31278,
    "title": "[Usage]:\u8bf7\u95eeQwen3-VL\u672c\u5730\u52a0\u8f7d\u6a21\u5f0f\u652f\u6301\u5355\u72ec\u52a0\u8f7dLoRA\u4e48\uff1f",
    "body": "\u8bf7\u95eeQwen3-VL\u672c\u5730\u52a0\u8f7d\u6a21\u5f0f\u652f\u6301\u5355\u72ec\u52a0\u8f7dLoRA\u4e48\uff1f",
    "url": "https://github.com/vllm-project/vllm/issues/31278",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-24T11:33:08Z",
    "updated_at": "2025-12-25T03:52:16Z",
    "comments": 3,
    "user": "dengdeng-cat"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31272,
    "title": "[Performance]: b200x8 deepseek-ai/DeepSeek-V3.2-Exp max perf",
    "body": "### Proposal to improve performance\n\n_No response_\n\n### Report of performance regression\n\nDo you have any ideas on how to increase TPS? I have two servers \u2014 one with H200 \u00d78 and another with B200 \u00d78. They use the same startup script, but the performance is almost identical. In my opinion, B200 should be faster than H200, so maybe my settings are not optimal\nvllm serve \\\n    --model deepseek-ai/DeepSeek-V3.2-Exp \\\n    --served-model-name deepseek-ai/DeepSeek-V3.2-Exp \\\n    --host 0.0.0.0 \\\n    --port 12345 \\\n    --tensor-parallel-size 8 \\\n    --enable-auto-tool-choice \\\n    --tool-call-parser deepseek_v31 \\\n    --chat-template /root/tool_chat_template_deepseekv31.jinja \\\n    --gpu-memory-utilization 0.9 \\\n    --max-model-len 125000 \\\n\n### Misc discussion on performance\n\n_No response_\n\n### Your current environment (if you think it is necessary)\n\n```text\nCollecting environment information...\nuv is set\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.3 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.3 (main, Nov  6 2025, 13:44:16) [GCC 13.3.0] (64-bit runtime)\nPython platform              : Linux-6.8.0-87-generic-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 13.0.88\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA B200\nGPU 1: NVIDIA B200\nGPU 2: NVIDIA B200\nGPU 3: NVIDIA B200\nGPU 4: NVIDIA B200\nGPU 5: NVIDIA B200\nGPU 6: NVIDIA B200\nGPU 7: NVIDIA B200\n\nNvidia driver version        : 580.95.05\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.14.0\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        52 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               240\nOn-line CPU(s) list:                  0-239\nVendor ID:                            AuthenticAMD\nBIOS Vendor ID:                       QEMU\nModel name:                           AMD EPYC 9575F 64-Core Processor\nBIOS Model name:                      pc-q35-8.2  CPU @ 2.0GHz\nBIOS CPU family:                      1\nCPU family:                           26\nModel:                                2\nThread(s) per core:                   1\nCore(s) per socket:                   1\nSocket(s):                            240\nStepping:                             1\nBogoMIPS:                             6590.10\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw perfctr_core ssbd ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 clzero xsaveerptr wbnoinvd arat npt lbrv nrip_save tsc_scale vmcb_clean flushbyasid pausefilter pfthreshold v_vmsave_vmload vgif vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid movdiri movdir64b fsrm avx512_vp2intersect flush_l1d arch_capabilities\nVirtualization:                       AMD-V\nHypervisor vendor:                    KVM\nVirtualization type:                  full\nL1d cache:                            15 MiB (240 instances)\nL1i cache:                            15 MiB (240 instances)\nL2 cache:              ",
    "url": "https://github.com/vllm-project/vllm/issues/31272",
    "state": "open",
    "labels": [
      "performance"
    ],
    "created_at": "2025-12-24T09:48:01Z",
    "updated_at": "2025-12-24T10:09:29Z",
    "comments": 0,
    "user": "evgeniiperepelkin"
  },
  {
    "repo": "huggingface/trl",
    "number": 4747,
    "title": "Addition of Supervised Reinforcement Learning",
    "body": "### Feature request\n\nhttps://arxiv.org/pdf/2510.25992 can i work on its implementation ?\n\n### Motivation\n\nBetter approach then previous RL's\n\n### Your contribution\n\nI can work on it following reference paper ",
    "url": "https://github.com/huggingface/trl/issues/4747",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-24T09:20:32Z",
    "updated_at": "2025-12-24T09:20:32Z",
    "comments": 0,
    "user": "kushalgarg101"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16391,
    "title": "Tokenizer fails on iOS (RE2 lookahead unsupported) \u2013 need regex_lookahead static lib or guidance",
    "body": "### \ud83d\udc1b Describe the bug\n\nSummary\niOS Flutter app using ExecuTorch LLM (Qwen3 0.6B) cannot load the tokenizer because RE2 does not support lookahead (?!\\S).\nSPM branch: swiftpm-1.1.0.20251223 (no visible regex_lookahead target/lib).\nLogs ask to link regex_lookahead, but SPM did not produce the static lib.\nEnvironment\nPlatform: iOS Simulator (iPhone 16 Pro), macOS, Xcode 15.\nExecuTorch via SwiftPM branch swiftpm-1.1.0.20251223.\nApp: Flutter, native plugin calling TextRunner.load(modelPath, tokenizerPath).\nModel: qwen3_0.6B_model.pte (~518MB).\nTokenizer: tokenizer (1).json (~11MB) containing lookahead.\nLogs (Xcode)\nE re2.cc:237 Error parsing ... invalid perl operator: (?!E tokenizers:regex.cpp:66 RE2 doesn't support lookahead patterns. Link with `regex_lookahead` to enable support.I tokenizers:hf_tokenizer.cpp:166 Could not parse pre_tokenizer: Error: 9\nWhat I\u2019ve tried\nPatched tokenizer to remove (?!\\S) \u2192 error disappears, but this is a workaround.\nSearched for libregex_lookahead*.a in DerivedData: not found (this SPM branch doesn\u2019t seem to include it).\nBackends force-loaded fine; only regex_lookahead is missing.\nQuestions / help needed\n1) Does the swiftpm-1.1.0.x branch ship a regex_lookahead target/static lib? If yes, how to enable it so SPM produces libregex_lookahead.a?\n2) If not, can you provide guidance or a prebuilt libregex_lookahead.a (simulator/device) for manual linking?\n3) Is there a \u201cclean\u201d tokenizer (no lookahead) recommended for Qwen3 0.6B in the ExecuTorch LLM samples?\nMore info\nI can share the 11MB tokenizer via a private link if needed.\n\n\n### Versions\nswiftpm-1.1.0.20251223\n",
    "url": "https://github.com/pytorch/executorch/issues/16391",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-24T09:14:42Z",
    "updated_at": "2025-12-24T09:43:59Z",
    "comments": 0,
    "user": "quocanh0712"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31270,
    "title": "[Bug]: Can run  Speculative decode with PP >2?",
    "body": "### Your current environment\n\nvllm:0.12.0\n\n### \ud83d\udc1b Describe the bug\n\nI run  vllm:0.12.0 with start args like this: \n`python3 -m vllm.entrypoints.openai.api_server \\\n--host 0.0.0.0 --port 8080 --dtype bfloat16 --model /Qwen3-32B \\\n--pipeline-parallel-size 2 \\\n--gpu-memory-utilization 0.9 --max-model-len 32768 --max-num-batched-tokens 5120 \\\n--trust-remote-code --no-enable-prefix-caching \\\n--speculative_config '{\"method\": \"ngram\",\"num_speculative_tokens\": 10,\"prompt_lookup_max\": 4, \"enforce_eager\": \"True\"}'`\nThe server can start, but when use the interface of '/chat/completion', the vllm server will crash.\n\n### Before submitting a new issue...\n\n- [ ] #31271",
    "url": "https://github.com/vllm-project/vllm/issues/31270",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-24T09:10:05Z",
    "updated_at": "2025-12-26T07:27:11Z",
    "comments": 1,
    "user": "frankie-ys"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15739,
    "title": "[Bug] Failed to deploy DeepSeek-V3.2 with LMCache",
    "body": "### Checklist\n\n- [x] I searched related issues but found no solution.\n- [x] The bug persists in the latest version.\n- [x] Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.\n- [x] If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [x] Please use English. Otherwise, it will be closed.\n\n### Describe the bug\n\nI use v0.5.6.post2 with LMCache 0.3.10 to deploy DeepSeek-V3.2.\nI got the following error :\n```\n[2025-12-24 08:20:12 PP0 TP2 EP2] Scheduler hit an exception: Traceback (most recent call last):\n  File \"/sgl-workspace/sglang/python/sglang/srt/managers/scheduler.py\", line 2680, in run_scheduler_process\n    scheduler = Scheduler(\n                ^^^^^^^^^^\n  File \"/sgl-workspace/sglang/python/sglang/srt/managers/scheduler.py\", line 434, in __init__\n    self.init_cache_with_memory_pool()\n  File \"/sgl-workspace/sglang/python/sglang/srt/managers/scheduler.py\", line 781, in init_cache_with_memory_pool\n    self.tree_cache = LMCRadixCache(\n                      ^^^^^^^^^^^^^^\n  File \"/sgl-workspace/sglang/python/sglang/srt/mem_cache/storage/lmcache/lmc_radix_cache.py\", line 91, in __init__\n    getattr(self.token_to_kv_pool_allocator._kvcache, \"k_buffer\"),\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAttributeError: 'NSATokenToKVPool' object has no attribute 'k_buffer'. Did you mean: 'kv_buffer'?\n```\n\nIs there anything wrong with my configuration? Please advise.\nThanks~\n\n### Reproduction\n\nMy configs:\n\n> lmcache_config.yaml\n```\nchunk_size: 256\n\nlocal_cpu: true\nmax_local_cpu_size: 5.0\n#\nremote_url: \"redis://10.62.207.53:32628\"\nremote_serde: \"naive\"\n```\n\n> master.sh\n```\nexport LMCACHE_CONFIG_PATH=/mnt/scripts/lmcache_config.yaml \nexport LMCACHE_ENABLE=True\npython -m sglang.launch_server \\\n    --model-path=/mnt/models/deepseek-ai/DeepSeek-V3.2 \\\n    --served-model-name=deepseek-ai/DeepSeek-V3.2 \\\n    --tensor-parallel-size=4 \\\n    --pipeline-parallel-size=2 \\\n    --expert-parallel-size=4 \\\n    --data-parallel-size=1 \\\n    --enable-dp-attention \\\n    --trust-remote-code \\\n    --mem-fraction-static=0.8 \\\n    --log-requests \\\n    --log-requests-level=3 \\\n    --dist-init-addr=\"${MASTER_IP}:${PORT}\" \\\n    --nnodes=\"$NNODES\" \\\n    --node-rank=\"$NODE_RANK\" \\\n    --tool-call-parser=deepseekv32 \\\n    --reasoning-parser=deepseek-v3 \\\n    --host=0.0.0.0 \\\n    --port=8000 \\\n    --enable-lmcache \\\n    --enable-metrics\n```\n\n> worker.sh\n```\nexport LMCACHE_CONFIG_PATH=/mnt/scripts/lmcache_config.yaml \nexport LMCACHE_ENABLE=True\npython -m sglang.launch_server \\\n    --model-path=/mnt/models/deepseek-ai/DeepSeek-V3.2 \\\n    --served-model-name=deepseek-ai/DeepSeek-V3.2 \\\n    --tensor-parallel-size=4 \\\n    --pipeline-parallel-size=2 \\\n    --expert-parallel-size=4 \\\n    --data-parallel-size=1 \\\n    --enable-dp-attention \\\n    --trust-remote-code \\\n    --mem-fraction-static=0.8 \\\n    --log-requests \\\n    --log-requests-level=3 \\\n    --dist-init-addr=\"${MASTER_IP}:${PORT}\" \\\n    --nnodes=\"$NNODES\" \\\n    --node-rank=\"$NODE_RANK\" \\\n    --tool-call-parser=deepseekv32 \\\n    --reasoning-parser=deepseek-v3 \\\n    --enable-lmcache \\\n    --enable-metrics\n```\n\n### Environment\n\nsglang: v0.5.6.post2 \nlmcache: v0.3.10 \nmodel: DeepSeek-V3.2",
    "url": "https://github.com/sgl-project/sglang/issues/15739",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-24T08:45:29Z",
    "updated_at": "2025-12-29T22:55:27Z",
    "comments": 1,
    "user": "niceallen"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15710,
    "title": "[Bug] Using TBO, but no overlap in decoding phase?",
    "body": "### Checklist\n\n- [x] I searched related issues but found no solution.\n- [x] The bug persists in the latest version.\n- [x] Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.\n- [x] If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [x] Please use English. Otherwise, it will be closed.\n\n### Describe the bug\n\n<!-- Failed to upload \"cf3c6fa8b605e6bbe3cb65ceee9bd06.png\" -->\n\n### Reproduction\n\npython -m sglang.launch_server   --model-path /root/temp_can/DeepSeek-V3-0324   --load-format dummy   --tp 4   --ep 4  --moe-a2a-backend deepep --deepep-mode auto --chunked-prefill-size -1   --host 0.0.0.0   --port 30000 --enable-two-batch-overlap --mem-fraction-static 0.4\n\npython3 -m sglang.bench_one_batch_server     --model-path /root/temp_can/DeepSeek-V3-0324     --base-url http://127.0.0.1:30000     --batch-size 256     --input-len 64     --output-len 128 --skip-warmup --profile\n\n### Environment\n\n(new_py310) root@zyhuang0-0:~/temp_can/sglang# python3 -m sglang.check_env\nPython: 3.10.19 (main, Oct 21 2025, 16:43:05) [GCC 11.2.0]\nCUDA available: True\nGPU 0,1: NVIDIA H100 80GB HBM3\nGPU 0,1 Compute Capability: 9.0\nCUDA_HOME: /usr/local/cuda\nNVCC: Cuda compilation tools, release 12.9, V12.9.41\nCUDA Driver Version: 550.54.15\nPyTorch: 2.9.1+cu128\nsglang: 0.5.6.post2\nsgl_kernel: 0.3.19\nflashinfer_python: 0.5.3\nflashinfer_cubin: 0.5.3\nflashinfer_jit_cache: Module Not Found\ntriton: 3.5.1\ntransformers: 4.57.1\ntorchao: 0.9.0\nnumpy: 2.2.6\naiohttp: 3.13.2\nfastapi: 0.127.0\nhf_transfer: 0.1.9\nhuggingface_hub: 0.36.0\ninteregular: 0.3.3\nmodelscope: 1.33.0\norjson: 3.11.5\noutlines: 0.1.11\npackaging: 25.0\npsutil: 7.1.3\npydantic: 2.12.5\npython-multipart: 0.0.21\npyzmq: 27.1.0\nuvicorn: 0.40.0\nuvloop: 0.22.1\nvllm: Module Not Found\nxgrammar: 0.1.27\nopenai: 2.6.1\ntiktoken: 0.12.0\nanthropic: 0.75.0\nlitellm: Module Not Found\ndecord2: 3.0.0\nNVIDIA Topology: \n        GPU0    GPU1    NIC0    NIC1    NIC2    NIC3    NIC4    NIC5    NIC6    CPU Affinity    NUMA Affinity   GPU NUMA ID\nGPU0     X      NV18    SYS     PIX     SYS     SYS     SYS     SYS     SYS     0-47,96-143     0               N/A\nGPU1    NV18     X      SYS     SYS     SYS     SYS     SYS     PIX     SYS     48-95,144-191   1               N/A\nNIC0    SYS     SYS      X      SYS     SYS     SYS     SYS     SYS     SYS\nNIC1    PIX     SYS     SYS      X      SYS     SYS     SYS     SYS     SYS\nNIC2    SYS     SYS     SYS     SYS      X      PXB     PXB     SYS     SYS\nNIC3    SYS     SYS     SYS     SYS     PXB      X      PIX     SYS     SYS\nNIC4    SYS     SYS     SYS     SYS     PXB     PIX      X      SYS     SYS\nNIC5    SYS     PIX     SYS     SYS     SYS     SYS     SYS      X      SYS\nNIC6    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS      X \n\nLegend:\n\n  X    = Self\n  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)\n  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node\n  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)\n  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)\n  PIX  = Connection traversing at most a single PCIe bridge\n  NV#  = Connection traversing a bonded set of # NVLinks\n\nNIC Legend:\n\n  NIC0: mlx5_0\n  NIC1: mlx5_1\n  NIC2: mlx5_2\n  NIC3: mlx5_3\n  NIC4: mlx5_4\n  NIC5: mlx5_5\n  NIC6: mlx5_6\n\n\nulimit soft: 1048576",
    "url": "https://github.com/sgl-project/sglang/issues/15710",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-24T02:22:19Z",
    "updated_at": "2025-12-24T02:22:19Z",
    "comments": 0,
    "user": "ziyuhuang123"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15707,
    "title": "[Feature] diffusion: TurboDiffusion achieves a 200x speedup on a single GPU, bringing video into the second-level era",
    "body": "### Checklist\n\n- [ ] If this is not a feature request but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [ ] Please use English. Otherwise, it will be closed.\n\n### Motivation\n\nhttps://github.com/thu-ml/TurboDiffusion\n\nWhen can it be integrated into sglang-diffusion ?\n\n> [\u6e05\u534e\u7cfb DeepSeek \u65f6\u523b\u6765\u4e86\uff0c\u7845\u8c37\u6cb8\u817e\uff01\u5355\u5361 200 \u500d\u52a0\u901f\uff0c\u89c6\u9891\u8fdb\u5165\u79d2\u7ea7\u65f6\u4ee3](https://mp.weixin.qq.com/s/JmHwMsCYr9M39JLy1jAb7A)\n\n### Related resources\n\n_No response_",
    "url": "https://github.com/sgl-project/sglang/issues/15707",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-24T01:50:02Z",
    "updated_at": "2025-12-30T08:45:43Z",
    "comments": 1,
    "user": "xiaolin8"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 171204,
    "title": "Dynamo can't trace a code when we construct nn.Parameter in the forward.",
    "body": "### \ud83d\udc1b Describe the bug\n\n```python \nimport torch\nimport torch._dynamo\n\ntorch._dynamo.config.graph_break_on_nn_param_ctor = False\n\ndef fn(x):\n    w = torch.nn.Parameter(torch.ones(4, 4))\n    if w.grad is None:\n        w.grad = torch.zeros_like(w)\n    return w.grad + x\n\nx = torch.randn(4, 4)\ncompiled_fn = torch.compile(fn, backend='eager', fullgraph=True)\nresult = compiled_fn(x)\n```\n```\nUnsupported: Failed to trace builtin operator\n  Explanation: Dynamo does not know how to trace builtin operator `add` with argument types ['<unknown type>', 'Tensor'] (has_kwargs False)\n  Hint: Avoid calling builtin `add` with argument types ['<unknown type>', 'Tensor']. Consider using an equivalent alternative function/method to `add`.\n  Hint: If you are attempting to call a logging function (e.g. `print`), you can try adding it to `torch._dynamo.config.reorderable_logging_functions`.\n  Hint: Please report an issue to PyTorch.\n\n  Developer debug context: builtin add [<class 'torch._dynamo.variables.misc.GetAttrVariable'>, <class 'torch._dynamo.variables.tensor.TensorVariable'>] False\n\n For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0059.html\n\nfrom user code:\n   File \"/tmp/ipykernel_616085/151731544.py\", line 10, in fn\n    return w.grad + x\n\nSet TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS=\"+dynamo\"\n```\nI think this is due to the fact we are emitting generic GetAttr node for w.grad instead of proper type. \n\n### Versions\n\nmain\n\ncc @chauhang @penguinwu",
    "url": "https://github.com/pytorch/pytorch/issues/171204",
    "state": "open",
    "labels": [
      "oncall: pt2"
    ],
    "created_at": "2025-12-23T19:41:48Z",
    "updated_at": "2026-01-05T14:52:45Z",
    "comments": 1,
    "user": "tugsbayasgalan"
  },
  {
    "repo": "huggingface/transformers",
    "number": 43023,
    "title": "How to investigate \"CAS service error\" during model downloading?",
    "body": "### System Info\n\n\n(nm) PS C:\\Users\\myuser\\AppData\\Local\\anaconda3\\envs\\nm\\Lib\\site-packages\\transformers\\commands> python .\\transformers_cli.py env\n\n```\nCopy-and-paste the text below in your GitHub issue and FILL OUT the two last points.\n\n- `transformers` version: 4.57.3\n- Platform: Windows-10-10.0.19045-SP0\n- Python version: 3.10.19\n- Huggingface_hub version: 0.36.0\n- Safetensors version: 0.7.0\n- Accelerate version: not installed\n- Accelerate config: not found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.7.0 (NA)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?:  the whole code posted below\n```\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nBase example from [here](https://huggingface.co/cross-encoder/ms-marco-MiniLM-L6-v2) \n\n```\nfrom transformers import AutoTokenizer, AutoModelForSequenceClassification\nimport torch\n\nmodel = AutoModelForSequenceClassification.from_pretrained('cross-encoder/ms-marco-MiniLM-L6-v2')\ntokenizer = AutoTokenizer.from_pretrained('cross-encoder/ms-marco-MiniLM-L6-v2')\n\nfeatures = tokenizer(['How many people live in Berlin?', 'How many people live in Berlin?'], ['Berlin has a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.', 'New York City is famous for the Metropolitan Museum of Art.'],  padding=True, truncation=True, return_tensors=\"pt\")\n\nmodel.eval()\nwith torch.no_grad():\n    scores = model(**features).logits\n    print(scores)\n```\n\nreturns\n\n```\nmodel.safetensors:\u2007\u2007\u20070%\n\u20070.00/90.9M\u2007[00:32<?,\u2007?B/s]\n---------------------------------------------------------------------------\nRuntimeError                              Traceback (most recent call last)\nFile c:\\Users\\myuser\\AppData\\Local\\anaconda3\\envs\\nm\\lib\\site-packages\\transformers\\modeling_utils.py:1037, in _get_resolved_checkpoint_files(pretrained_model_name_or_path, subfolder, variant, gguf_file, from_tf, from_flax, use_safetensors, cache_dir, force_download, proxies, local_files_only, token, user_agent, revision, commit_hash, is_remote_code, transformers_explicit_filename)\n   1024 cached_file_kwargs = {\n   1025     \"cache_dir\": cache_dir,\n   1026     \"force_download\": force_download,\n   (...)\n   1035     \"_commit_hash\": commit_hash,\n   1036 }\n-> [1037](file:///C:/Users/myuser\t/AppData/Local/anaconda3/envs/nm/lib/site-packages/transformers/modeling_utils.py:1037) resolved_archive_file = cached_file(pretrained_model_name_or_path, filename, **cached_file_kwargs)\n   1039 # Since we set _raise_exceptions_for_missing_entries=False, we don't get an exception but a None\n   1040 # result when internet is up, the repo and revision exist, but the file does not.\n\nFile c:\\Users\\myuser\\AppData\\Local\\anaconda3\\envs\\nm\\lib\\site-packages\\transformers\\utils\\hub.py:322, in cached_file(path_or_repo_id, filename, **kwargs)\n    269 \"\"\"\n    270 Tries to locate a file in a local folder and repo, downloads and cache it if necessary.\n    271 \n   (...)\n    320 ```\n    321 \"\"\"\n--> [322](file:///C:/Users/myuser\t/AppData/Local/anaconda3/envs/nm/lib/site-packages/transformers/utils/hub.py:322) file = cached_files(path_or_repo_id=path_or_repo_id, filenames=[filename], **kwargs)\n    323 file = file[0] if file is not None else file\n\nFile c:\\Users\\myuser\\AppData\\Local\\anaconda3\\envs\\nm\\lib\\site-packages\\transformers\\utils\\hub.py:567, in cached_files(path_or_repo_id, filenames, cache_dir, force_download, resume_download, proxies, token, revision, local_files_only, subfolder, repo_type, user_agent, _raise_exceptions_for_gated_repo, _raise_exceptions_for_missing_entries, _raise_exceptions_for_connection_errors, _commit_hash, **deprecated_kwargs)\n    566     elif not isinstance(e, EntryNotFoundError):\n--> [567](file:///C:/Users/myuser\t/AppData/Local/anaconda3/envs/nm/lib/site-packages/transformers/utils/hub.py:567)         raise e\n    569 resolved_files = [\n    570     _get_cache_file_to_return(path_or_repo_id, filename, cache_dir, revision) for filename in full_filenames\n    571 ]\n\nFile c:\\Users\\myuser\\AppData\\Local\\anaconda3\\envs\\nm\\lib\\site-packages\\transformers\\utils\\hub.py:479, in cached_files(path_or_repo_id, filenames, cache_dir, force_download, resume_download, proxies, token, revision, local_files_only, subfolder, repo_type, user_agent, _raise_exceptions_for_gated_repo, _raise_exceptions_for_missing_entries, _raise_exceptions_for_connection_errors, _commit_hash, **deprecated_kwargs)\n    477 if len(full_filenames) == 1:\n    478     # This is slightly better for only 1 file\n--> [479](file:///C:/Users/myuser\t/AppData/Local/anaconda3/envs/nm/lib/site-packages/transformers/utils/hub.py:479)     hf_hub_download",
    "url": "https://github.com/huggingface/transformers/issues/43023",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-23T14:48:51Z",
    "updated_at": "2025-12-25T14:36:42Z",
    "user": "satyrmipt"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16374,
    "title": "`strided_copy` operator in output graph when sample input has been transposed",
    "body": "### \ud83d\udc1b Describe the bug\n\nI occasionally read existing model calibration data from Numpy arrays that are in NHWC order when deploying with ExecuTorch. Whenever I do that and transpose the calibration data to NCHW, the output graph contains an `as_strided_copy` operator, even if I have previously called `.contiguous()` on the tensor.\n\nMinimal working example to reproduce the behavior:\n\n```python\n\"\"\"\nMinimal working example of ExecuTorch PTE export functionality.\n\"\"\"\n\nimport os\nimport torch\nimport torch.nn as nn\nfrom torch.export import export\nfrom executorch.exir import to_edge_transform_and_lower, EdgeCompileConfig, ExecutorchBackendConfig\nfrom executorch.extension.export_util.utils import save_pte_program\nfrom executorch.backends.arm.ethosu import EthosUCompileSpec, EthosUPartitioner\nfrom executorch.backends.arm.quantizer import EthosUQuantizer, get_symmetric_quantization_config\nfrom torchao.quantization.pt2e.quantize_pt2e import convert_pt2e, prepare_pt2e\n\n# Constants\nOUTPUT_DIR = \"./output\"\nMODEL_NAME = \"test_model\"\nACCELERATOR_CONFIG = \"ethos-u55-128\"\nSYSTEM_CONFIG = \"Ethos_U55_High_End_Embedded\"\nMEMORY_MODE = \"Shared_Sram\"\n\n\nclass SimpleModel(nn.Module):\n    \"\"\"Simple CNN model for testing.\"\"\"\n    def __init__(self):\n        super().__init__()\n        self.conv1 = nn.Conv2d(1, 8, 3, padding=1)\n        self.pool = nn.AdaptiveAvgPool2d((1, 1))\n        self.fc = nn.Linear(8, 10)\n    \n    def forward(self, x):\n        x = torch.relu(self.conv1(x))\n        x = self.pool(x)\n        x = x.view(x.size(0), -1)\n        return self.fc(x)\n\n\ndef prepare_input_data(single_sample=False):\n    \"\"\"Prepare dummy input data in channels-first format.\"\"\"\n    dummy_data_nchw = torch.rand(100, 1, 49, 10)  # Dummy data for example\n    \n    if single_sample:\n        dummy_data_nchw = dummy_data_nchw[0:1]\n    \n    return (dummy_data_nchw,)\n\n\ndef quantize_model(model):\n    \"\"\"Quantize model using EthosU quantizer.\"\"\"\n    # Create compile spec\n    compile_spec = EthosUCompileSpec(\n        ACCELERATOR_CONFIG,\n        system_config=SYSTEM_CONFIG,\n        memory_mode=MEMORY_MODE,\n        extra_flags=[\"--verbose-operators\", \"--verbose-cycle-estimate\"],\n    )\n    \n    # Setup quantizer\n    quantizer = EthosUQuantizer(compile_spec)\n    operator_config = get_symmetric_quantization_config()\n    quantizer.set_global(operator_config)\n    \n    model = torch.export.export(model, prepare_input_data(single_sample=True), strict=True).module()\n    prepared_model = prepare_pt2e(model, quantizer)\n    \n    # Calibrate with dummy data\n    calibration_inputs = prepare_input_data()[0]\n    for x in calibration_inputs:\n        prepared_model(x)\n    \n    # Convert to quantized model\n    return convert_pt2e(prepared_model)\n\n\ndef lower_to_arm_backend(exported_program):\n    \"\"\"Apply ARM backend transformations.\"\"\"\n    compile_spec = EthosUCompileSpec(\n        ACCELERATOR_CONFIG,\n        system_config=SYSTEM_CONFIG,\n        memory_mode=MEMORY_MODE,\n        extra_flags=[\"--verbose-operators\", \"--verbose-cycle-estimate\"],\n    )\n    \n    partitioner = EthosUPartitioner(compile_spec)\n    \n    edge_program_manager = to_edge_transform_and_lower(\n        exported_program,\n        partitioner=[partitioner],\n        compile_config=EdgeCompileConfig(_check_ir_validity=False),\n    )\n\n    return edge_program_manager\n\n\ndef export_pte_example():\n    \"\"\"Main export function - minimal working example.\"\"\"\n    os.makedirs(OUTPUT_DIR, exist_ok=True)\n    \n    print(\"Creating model...\")\n    model = SimpleModel()\n    \n    print(\"Preparing input data...\")\n    tracing_inputs = prepare_input_data(single_sample=True)\n    \n    print(\"Quantizing model...\")\n    quantized_model = quantize_model(model)\n    \n    print(\"Exporting quantized model...\")\n    exported_program = export(quantized_model, tracing_inputs, strict=True)\n    \n    print(\"Lowering to ARM backend...\")\n    edge_program = lower_to_arm_backend(exported_program)\n    \n    print(\"Creating ExecutorTorch program...\")\n    exec_prog = edge_program.to_executorch(\n        config=ExecutorchBackendConfig(extract_delegate_segments=False)\n    )\n    \n    print(\"Saving PTE model...\")\n    output_path = os.path.join(OUTPUT_DIR, f\"{MODEL_NAME}_quantized.pte\")\n    save_pte_program(exec_prog, output_path)\n    \n    print(f\"Successfully exported model to: {output_path}\")\n    return output_path\n\n\nif __name__ == \"__main__\":\n    try:\n        pte_path = export_pte_example()\n        print(\"Export completed successfully!\")\n    except Exception as e:\n        print(f\"Export failed: {e}\")\n        raise\n```\nI get an output graph that can entirely be delegated to U55.\n\nWhen I change `prepare_input_data` to this:\n```python\ndef prepare_input_data(single_sample=False):\n    \"\"\"Prepare dummy input data in channels-first format.\"\"\"\n    dummy_data_nhwc = torch.rand(100, 49, 10, 1)\n    \n    # Transpose from channels-last to channels-first\n    axes = [0, -1] + list(range(1, len(dummy_data_nhwc.shape) - 1))\n    dummy_data_nchw = dummy_data_nhwc.permute(axes).contiguous()",
    "url": "https://github.com/pytorch/executorch/issues/16374",
    "state": "open",
    "labels": [
      "module: exir",
      "module: arm"
    ],
    "created_at": "2025-12-23T14:45:30Z",
    "updated_at": "2025-12-24T15:40:34Z",
    "comments": 1,
    "user": "etrommer"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31217,
    "title": "[Usage]: suffix decoding",
    "body": "### Your current environment\n\nDoes suffix decoding necessarily require a repetition penalty of 1?\n\n### How would you like to use vllm\n\nDoes suffix decoding necessarily require a repetition penalty of 1?\nIn suffix decoding, I found that when the repetition penalty is not equal to 1, the acceleration is not significant. However, when the repetition penalty is equal to 1, the acceleration is very noticeable.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31217",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-23T10:43:45Z",
    "updated_at": "2025-12-24T02:56:35Z",
    "comments": 1,
    "user": "jiangix-paper"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2707,
    "title": "Transformers dependency",
    "body": "### Ticket Type\n\n\ud83d\udc1b Bug Report (Something isn't working)\n\n### Environment & System Info\n\n```Shell\n- lerobot version: 0.4.3\n- Platform: Linux-5.14.0-570.26.1.el9_6.x86_64-x86_64-with-glibc2.34\n- Python version: 3.12.12\n- Huggingface Hub version: 0.35.3\n- Datasets version: 4.1.1\n- Numpy version: 2.3.5\n- PyTorch version: 2.7.1\n- Is PyTorch built with CUDA support?: False\n- Cuda version: N/A\n- GPU model: N/A\n- Using GPU in script?: <fill in>\n```\n\n### Description\n\nHi, \n\nSince commit  f04958527e70cac3aa95265badd97b53f3ef7633 and the dependency bump of transformers from 4.53 to 4.57, some extras are conflicting (pi that requires a custom 4.53 and almost all others that requires >=4.57), so I can't upgrade. Was the bump really necessary ? Or is there a possibility to get rid of the custom openpi transformers ?\n\n### Context & Reproduction\n\n[pypi-dependencies]\nlerobot = {git = \"https://github.com/huggingface/lerobot.git\", extras = [\"smolvla\", \"pi\", \"groot\"]}\n\npixi install\n\n### Relevant logs or stack trace\n\n```Shell\n\n```\n\n### Checklist\n\n- [x] I have searched existing tickets to ensure this isn't a duplicate.\n- [x] I am using the latest version of the `main` branch.\n- [x] I have verified this is not an environment-specific problem.\n\n### Additional Info / Workarounds\n\n_No response_",
    "url": "https://github.com/huggingface/lerobot/issues/2707",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "dependencies"
    ],
    "created_at": "2025-12-23T10:37:53Z",
    "updated_at": "2025-12-23T23:43:10Z",
    "user": "RomDeffayet"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31216,
    "title": "[RFC]: Sampling Optimization: move gather of logits after argmax.",
    "body": "### Motivation.\n\nAs shown in the left part of the following picture, in the original sampling procedure we perform `llm_head` and `gather` first, then perform `argmax` to full `logits`. However, we can in fact move `gather` after `argmax` to reduce both the communication volume of `gather` and the computation load of `argmax`.\n\n<img width=\"1756\" height=\"1168\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/6dc7aeb1-3d1f-45e2-98f8-5f2ef9e35cb1\" />\n\nThe test results during the puncturing phase show that this feature can optimize the `logits_processor + sampler` time consumption by more than 200 us in certain scenarios. In speculative decoding scenarios, where multiple rounds of post-processing are required for each step, the benefits of this feature can become even more pronounced. So I think this is an important optimization especially when eagle3 become more and more popular. Later I will propose a PR to implement this.\n\n### Proposed Change.\n\n1. Remove the `gather/all_gather` operation from logits processor.\n2. Add two `gather/all_gather` operations to sampler to gather both max value and max index of `argmax`. Then perform `max` to obtain the global max value and related max index.\n\n### Feedback Period.\n\n_No response_\n\n### CC List.\n\n@youkaichao @zhuohan123 @WoosukKwon\n\n### Any Other Things.\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31216",
    "state": "open",
    "labels": [
      "RFC"
    ],
    "created_at": "2025-12-23T10:23:34Z",
    "updated_at": "2025-12-26T03:33:04Z",
    "comments": 2,
    "user": "whx-sjtu"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12884,
    "title": "Compatibility issues regarding checkpoint/VAE dependency conflicts when Diffusers load Civitai LoRA",
    "body": "Hello everyone, I'm currently learning to use diffusers and would like to ask all my friends a question. I saw a good lora on Civitai, but this lora has requirements for checkpoint and vea. So I downloaded both models as the author requested. However, when I ran the following code, an error occurred.\nThe specific code is as follows:\n~~~python\npipeline = StableDiffusionPipeline.from_single_file(\n    r\"E:\\Project_draw\\Models\\vae\\clearvaeSD15_v23.safetensors\",\n    use_safetensors=True,\n    torch_dtype=torch.float16,\n    safety_checker=None\n )\n~~~\nThe errors are as follows:\n\n<img width=\"1272\" height=\"575\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9788f5b9-59d2-454d-ade8-b6837115f0de\" />\n\nI checked the documentation of diffusers. The documentation mentioned that it is possible to load the model in this way, but I don't know why an error occurred. I saw many convert scripts in the script folder of diffusers, but I don't know which one is the corresponding conversion script and what the requirements are. If there are any friends who know how to solve it, could you please tell me what it feels like",
    "url": "https://github.com/huggingface/diffusers/issues/12884",
    "state": "closed",
    "labels": [],
    "created_at": "2025-12-23T10:11:27Z",
    "updated_at": "2025-12-23T13:41:47Z",
    "comments": 1,
    "user": "hhhFuture"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31211,
    "title": "[Doc]: Add missing GPT-OSS tool calling instructions",
    "body": "### \ud83d\udcda The doc issue\n\nCurrently the `openai` tool calling format is not documented in [the tool calling documentation](https://docs.vllm.ai/en/stable/features/tool_calling/). However it is documented in the [cookbook](https://docs.vllm.ai/projects/recipes/en/latest/OpenAI/GPT-OSS.html#tool-use)\n\n### Suggest a potential alternative/fix\n\nIt would make sense to list the `openai` format alongside the other formats\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31211",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-12-23T08:35:09Z",
    "updated_at": "2025-12-25T05:29:11Z",
    "comments": 0,
    "user": "amithkk"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2704,
    "title": "Training XVLA: IndexError with auto mode; size mismatch with joint mode on 14D joint-action dataset",
    "body": "### Ticket Type\n\n\ud83d\udc1b Bug Report (Something isn't working)\n\n### Environment & System Info\n\n```Shell\n\n```\n\n### Description\n\nI am trying to train XVLA with base and folding checkpoint on a 14D joint-action dataset.\nWhen I set --policy.action_mode=auto\nlerobot-train \\\n  --dataset.repo_id= \\\n  --output_dir=./outputs/xvla_bimanual \\\n  --job_name=xvla_training \\\n  --policy.dtype=bfloat16 \\\n  --steps=3000 \\\n  --policy.device=cuda \\\n  --policy.action_mode=auto \\\n  --policy.max_action_dim=20 \\\n  --policy.repo_id= \\\n  --policy.path=\"lerobot/xvla-base\" \\\n  --policy.freeze_vision_encoder=false \\\n  --policy.freeze_language_encoder=false \\\n  --policy.train_policy_transformer=true \\\n  --policy.train_soft_prompts=true \\\n  --rename_map='{\n  \"observation.images.top\": \"observation.images.image\",\n  \"observation.images.right\": \"observation.images.image2\",\n  \"observation.images.left\": \"observation.images.empty_camera_0\"\n}'\nI've got this error:\n\nNFO 2025-12-23 06:44:14 ot_train.py:310 Output dir: outputs/xvla_bimanual\nINFO 2025-12-23 06:44:14 ot_train.py:317 cfg.steps=3000 (3K)\nINFO 2025-12-23 06:44:14 ot_train.py:318 dataset.num_frames=1724070 (2M)\nINFO 2025-12-23 06:44:14 ot_train.py:319 dataset.num_episodes=1613\nINFO 2025-12-23 06:44:14 ot_train.py:322 Effective batch size: 8 x 1 = 8\nINFO 2025-12-23 06:44:14 ot_train.py:323 num_learnable_params=879482456 (879M)\nINFO 2025-12-23 06:44:14 ot_train.py:324 num_total_params=879482456 (879M)\nINFO 2025-12-23 06:44:14 ot_train.py:380 Start offline training on a fixed dataset, with effective batch size: 8\nTraceback (most recent call last):\n  File \"/lambda/nfs/XVLA/X-VLA/.venv/bin/lerobot-train\", line 8, in <module>\n    sys.exit(main())\n  File \"/lambda/nfs/XVLA/lerobot/src/lerobot/scripts/lerobot_train.py\", line 516, in main\n    train()\n  File \"/lambda/nfs/XVLA/lerobot/src/lerobot/configs/parser.py\", line 233, in wrapper_inner\n    response = fn(cfg, *args, **kwargs)\n  File \"/lambda/nfs/XVLA/lerobot/src/lerobot/scripts/lerobot_train.py\", line 386, in train\n    batch = next(dl_iter)\n  File \"/lambda/nfs/XVLA/lerobot/src/lerobot/datasets/utils.py\", line 912, in cycle\n    yield next(iterator)\n  File \"/lambda/nfs/XVLA/X-VLA/.venv/lib/python3.10/site-packages/accelerate/data_loader.py\", line 579, in __iter__\n    next_batch = next(dataloader_iter)\n  File \"/lambda/nfs/XVLA/X-VLA/.venv/lib/python3.10/site-packages/torch/utils/data/dataloader.py\", line 733, in __next__\n    data = self._next_data()\n  File \"/lambda/nfs/XVLA/X-VLA/.venv/lib/python3.10/site-packages/torch/utils/data/dataloader.py\", line 1515, in _next_data\n    return self._process_data(data, worker_id)\n  File \"/lambda/nfs/XVLA/X-VLA/.venv/lib/python3.10/site-packages/torch/utils/data/dataloader.py\", line 1550, in _process_data\n    data.reraise()\n  File \"/lambda/nfs/XVLA/X-VLA/.venv/lib/python3.10/site-packages/torch/_utils.py\", line 750, in reraise\n    raise exception\nIndexError: Caught IndexError in DataLoader worker process 2.\nOriginal Traceback (most recent call last):\n  File \"/lambda/nfs/XVLA/X-VLA/.venv/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py\", line 349, in _worker_loop\n    data = fetcher.fetch(index)  # type: ignore[possibly-undefined]\n  File \"/lambda/nfs/XVLA/X-VLA/.venv/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py\", line 52, in fetch\n    data = [self.dataset[idx] for idx in possibly_batched_index]\n  File \"/lambda/nfs/XVLA/X-VLA/.venv/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py\", line 52, in <listcomp>\n    data = [self.dataset[idx] for idx in possibly_batched_index]\n  File \"/lambda/nfs/XVLA/lerobot/src/lerobot/datasets/lerobot_dataset.py\", line 1028, in __getitem__\n    item = self.hf_dataset[idx]\n  File \"/lambda/nfs/XVLA/X-VLA/.venv/lib/python3.10/site-packages/datasets/arrow_dataset.py\", line 2862, in __getitem__\n    return self._getitem(key)\n  File \"/lambda/nfs/XVLA/X-VLA/.venv/lib/python3.10/site-packages/datasets/arrow_dataset.py\", line 2843, in _getitem\n    pa_subtable = query_table(self._data, key, indices=self._indices)\n  File \"/lambda/nfs/XVLA/X-VLA/.venv/lib/python3.10/site-packages/datasets/formatting/formatting.py\", line 612, in query_table\n    _check_valid_index_key(key, size)\n  File \"/lambda/nfs/XVLA/X-VLA/.venv/lib/python3.10/site-packages/datasets/formatting/formatting.py\", line 552, in _check_valid_index_key\n    raise IndexError(f\"Invalid key: {key} is out of bounds for size {size}\")\nIndexError: Invalid key: 1723717 is out of bounds for size 1708592\n\nWhen --policy.action_mode=joint, remove --policy.max_action_dim=20, I've this error:\n\nINFO 2025-12-23 07:14:31 ot_train.py:195 Logs will be saved locally.\nINFO 2025-12-23 07:14:31 ot_train.py:207 Creating dataset\nINFO 2025-12-23 07:14:32 ot_train.py:226 Creating policy\nFlorence2ForConditionalGeneration has generative capabilities, as `prepare_inputs_for_generation` is explicitly defined. However, it doesn't directly inherit from `GenerationMixin`. From \ud83d\udc49v4.50\ud83d\udc48 onwards, `PreTrainedModel` will NOT inherit from `Gen",
    "url": "https://github.com/huggingface/lerobot/issues/2704",
    "state": "closed",
    "labels": [
      "bug",
      "documentation",
      "question",
      "policies",
      "dataset",
      "CI",
      "examples",
      "training"
    ],
    "created_at": "2025-12-23T07:20:25Z",
    "updated_at": "2025-12-23T08:54:21Z",
    "user": "DaKhanh"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31205,
    "title": "ValueError: Qwen3OmniMoeThinkerForConditionalGeneration does not support LoRA yet.",
    "body": "\nhi, I have trained qwen3-omni thinker via ms-swift. However, when I tried to infer qwen3-omni with lora ckpt, an error  occurred:\n```\nValueError: Qwen3OmniMoeThinkerForConditionalGeneration does not support LoRA yet.\n```\n\nI have tried many verions of vllm including 0.9.2, 0.11.0 and 0.12.0\n\nhere is my script:\n\n```\nCUDA_VISIBLE_DEVICES=0,1 \\\nMAX_PIXELS=1003520 \\\nswift infer \\\n    --model models/omni/Qwen3-Omni/Qwen3-Omni-30B-A3B-Instruct \\\n    --adapters  ckpt/Qwen3-Omni/v4-20251212-163234/checkpoint-3 \\\n    --merge_lora false \\\n    --stream true \\\n    --infer_backend vllm \\\n    --val_dataset ms-swift/data/train_test.jsonl \\\n    --vllm_gpu_memory_utilization 0.9 \\\n    --vllm_tensor_parallel_size 2 \\\n    --vllm_max_model_len 32768 \\\n    --max_new_tokens 2048 \\\n    --vllm_limit_mm_per_prompt '{'image': 3, 'video': 3, 'audio': 3}'\n\n```\n\n\nhow can I solved this problem? \n",
    "url": "https://github.com/vllm-project/vllm/issues/31205",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-23T06:52:11Z",
    "updated_at": "2025-12-29T14:50:37Z",
    "comments": 2,
    "user": "VJJJJJJ1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 171158,
    "title": "`torch.func.grad` to allow some inplace ops",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nAt least for those under `@torch.no_grad` context manager\n\nCurrently only `torch.func.grad` allows to fullgraph-compile computing grads wrt inputs because of:\n- https://github.com/pytorch/pytorch/issues/170487\nso it's an important usecase\n\n\n`torch.autograd.grad` is fine with some leaf nodes being inplace updated if this happens under `@torch.no_grad`:\n- https://github.com/huggingface/transformers/issues/43010\n\nan example of this is model's forward modifying a static cache\n\nif we want to compute gradients wrt input embeds, it passes with `torch.autograd.grad` but breaks with `torch.func.grad`:\n```\ntorch._dynamo.exc.TorchRuntimeError: Dynamo failed to run FX node with fake tensors: call_method index_copy_(*(FakeTensor(..., device='cuda:0', size=(64, 4, 512, 64), dtype=torch.bfloat16), 2, GradTrackingTensor(lvl=1, value=\n    FakeTensor(..., device='cuda:0', size=(145,), dtype=torch.int64)\n), GradTrackingTensor(lvl=1, value=\n    FakeTensor(..., device='cuda:0', size=(64, 4, 145, 64), dtype=torch.bfloat16,\n               grad_fn=<AddBackward0>)\n)), **{}): got RuntimeError('During a grad (vjp, jvp, grad, etc) transform, the function provided attempted to call in-place operation (aten::index_copy_) that would mutate a captured Tensor. This is not supported; please rewrite the function being transformed to explicitly accept the mutated Tensor(s) as inputs.')\n```\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @ezyang @albanD @gqchen @nikitaved @soulitzer @Varal7 @xmfan @bobrenjc93 @Chillee @samdow @kshitij12345",
    "url": "https://github.com/pytorch/pytorch/issues/171158",
    "state": "open",
    "labels": [
      "module: autograd",
      "triaged",
      "module: functorch"
    ],
    "created_at": "2025-12-23T04:16:33Z",
    "updated_at": "2026-01-05T17:20:24Z",
    "comments": 2,
    "user": "vadimkantorov"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31204,
    "title": "[RFC]: Supporting Multi MTP layers in Speculative Decoding (EagleProposer)",
    "body": "### Motivation.\n\nThe EagleProposer for speculative decoding is only able to utilize the first MTP layer.\nHowever, the model [XiaomiMiMo/MiMo-V2-Flash](https://huggingface.co/XiaomiMiMo/MiMo-V2-Flash) has 3 MTP layers.\nIs there any plan or ongoing PR to extend support for multi MTP layers in speculative decoding?\nbtw, [hugo-wind-ding/qwq-32b-mtp](https://huggingface.co/hugo-wind-ding/qwq-32b-mtp) has 7 mtp layers for QwQ-32B\n\n### Proposed Change.\n\nEagleProposer needs a new member function to pass spec_step_idx to mtp models, when num_nextn_predict_layers > 1 and num_speculative_tokens > 1.\n\n\n### Feedback Period.\n\n_No response_\n\n### CC List.\n\n_No response_\n\n### Any Other Things.\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31204",
    "state": "open",
    "labels": [
      "RFC"
    ],
    "created_at": "2025-12-23T03:34:05Z",
    "updated_at": "2025-12-23T03:34:05Z",
    "comments": 0,
    "user": "DingYibin"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2701,
    "title": "Image keys with underscores not supported when migrating to v0.4.x",
    "body": "### Ticket Type\n\n\ud83d\udc1b Bug Report (Something isn't working)\n\n### Environment & System Info\n\n```Shell\nPython 3.12.3, LeRobot versions 0.3.4 and 0.4.2\n\nFrom v0.4.2:\n lerobot version: 0.4.2\n- Platform: Linux-6.14.0-37-generic-x86_64-with-glibc2.39\n- Python version: 3.12.3\n- Huggingface Hub version: 0.35.3\n- Datasets version: 4.1.1\n- Numpy version: 2.2.6\n- PyTorch version: 2.7.1+cu126\n```\n\n### Description\n\nWhen upgrading a model from 0.3.4 to 0.4.2, `migrate_policy_normalization` replaces all `_` in features with `.` at https://github.com/huggingface/lerobot/blob/main/src/lerobot/processor/migrate_policy_normalization.py#L112 .  I have a camera named `front_camera` used as `observations.images.front_camera`.  After migrating my policy, the normalization processor expects `observations.images.front.camera`, causing https://github.com/huggingface/lerobot/blob/main/src/lerobot/processor/normalize_processor.py#L306 to fail, and my images are left unnormalized.\n\nI've hacked it by inserting `key = key.replace(\"_cam\",\".cam\")` right above the check, but this is not a good long-term fix.\n\n### Context & Reproduction\n\n1. Have a model trained under LeRobot 0.3.4 with non-identity normalizations on images, and the image keys having underscores, such as `front_camera`\n2. Check the `input_features` in `config.json`, see the underscores in the image name\n3. Migrate the model to LeRobot 0.4.2 using `migrate_policy_normalization.py`\n4. See that the underscores are preserved in the migrated `config.json`, but in the corresponding `policy_preprocessor_step_<X>_normalizer_processor.safetensors` they have been replaced with dots\n\n### Relevant logs or stack trace\n\n```Shell\n\n```\n\n### Checklist\n\n- [x] I have searched existing tickets to ensure this isn't a duplicate.\n- [ ] I am using the latest version of the `main` branch.\n- [x] I have verified this is not an environment-specific problem.\n\n### Additional Info / Workarounds\n\nI've inserted `key = key.replace(\"_cam\",\".cam\")` into `normalize_processor.py` in order to make the keys match what the processor is expecting.",
    "url": "https://github.com/huggingface/lerobot/issues/2701",
    "state": "open",
    "labels": [
      "bug",
      "question",
      "policies",
      "sensors",
      "processor"
    ],
    "created_at": "2025-12-23T03:27:41Z",
    "updated_at": "2025-12-23T03:27:50Z",
    "user": "dangr"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2700,
    "title": "Training an Smolvla model on the lerobot/aloha_sim_insertion_human dataset does not converge",
    "body": "### Ticket Type\n\n\u2753 Technical Question\n\n### Environment & System Info\n\n```Shell\nUbuntu 22.04\nlerobot 0.4.1\npython 3.10\n\nlerobot-train \\\n  --job_name aloha_smolvla \\\n  --output_dir $OUTPUT_DIR \\\n  --env.type=aloha \\\n  --env.task=\"AlohaInsertion-v0\" \\\n  --policy.type=smolvla \\\n  --policy.load_vlm_weights=true \\\n  --steps=200000 \\\n  --eval_freq=50000 \\\n  --save_freq=50000 \\\n  --dataset.repo_id=\"lerobot/aloha_sim_insertion_human\" \\\n  --policy.push_to_hub=false \\\n  --wandb.enable=true\n```\n\n### Description\n\nI am tring to train Smolvla model on the lerobot/aloha_sim_insertion_human dataset, but the training does not converge. In the simulation, the robotic arm trembled and got stuck at a certain position, failing to successfully pick up the object.\n\n### Context & Reproduction\n\n```bash\nlerobot-train \\\n  --job_name aloha_smolvla \\\n  --output_dir $OUTPUT_DIR \\\n  --env.type=aloha \\\n  --env.task=\"AlohaInsertion-v0\" \\\n  --policy.type=smolvla \\\n  --policy.load_vlm_weights=true \\\n  --steps=200000 \\\n  --eval_freq=50000 \\\n  --save_freq=50000 \\\n  --dataset.repo_id=\"lerobot/aloha_sim_insertion_human\" \\\n  --policy.push_to_hub=false \\\n  --wandb.enable=true\n\nlerobot-eval \\\n  --policy.path=\"$CHECKPOINT_DIR\" \\\n  --env.type=aloha \\\n  --env.task=\"AlohaInsertion-v0\" \\\n  --eval.n_episodes=50 \\\n  --eval.batch_size=50\n```\n\nhttps://github.com/user-attachments/assets/97feea83-2f1e-45a3-9253-6dffdd13f7ea\n\n### Relevant logs or stack trace\n\n```Shell\n\n```\n\n### Checklist\n\n- [x] I have searched existing tickets to ensure this isn't a duplicate.\n- [ ] I am using the latest version of the `main` branch.\n- [ ] I have verified this is not an environment-specific problem.\n\n### Additional Info / Workarounds\n\n_No response_",
    "url": "https://github.com/huggingface/lerobot/issues/2700",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "dataset",
      "simulation",
      "robots",
      "training"
    ],
    "created_at": "2025-12-23T03:13:47Z",
    "updated_at": "2025-12-30T21:05:50Z",
    "user": "sslndora0612-max"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31202,
    "title": "[Bug]: Mixtral Fp8 Accuracy is Degraded",
    "body": "### Your current environment\n\nH200\n\n### \ud83d\udc1b Describe the bug\n- launch\n```bash\nvllm serve amd/Mixtral-8x7B-Instruct-v0.1-FP8-KV --enforce-eager -tp 2\n```\n\n- eval\n```bash\n\nlm_eval \\\n\t--model local-completions \\\n\t--tasks gsm8k \\\n\t--model_args \"model=amd/Mixtral-8x7B-Instruct-v0.1-FP8-KV,base_url=http://localhost:8000/v1/completions,num_concurrent=1000,tokenized_requests=False\"\n```\n\n- on main:\n```bash\nlocal-completions (model=amd/Mixtral-8x7B-Instruct-v0.1-FP8-KV,base_url=http://localhost:8000/v1/completions,num_concurrent=1000,tokenized_requests=False), gen_kwargs: (None), limit: None, num_fewshot: None, batch_size: 1\n|Tasks|Version|     Filter     |n-shot|  Metric   |   |Value |   |Stderr|\n|-----|------:|----------------|-----:|-----------|---|-----:|---|-----:|\n|gsm8k|      3|flexible-extract|     5|exact_match|\u2191  |0.2843|\u00b1  |0.0124|\n|     |       |strict-match    |     5|exact_match|\u2191  |0.2108|\u00b1  |0.0112|\n```\n\n- on 0.12.0:\n```bash\nlocal-completions (model=amd/Mixtral-8x7B-Instruct-v0.1-FP8-KV,base_url=http://localhost:8000/v1/completions,num_concurrent=1000,tokenized_requests=False), gen_kwargs: (None), limit: None, num_fewshot: None, batch_size: 1\n|Tasks|Version|     Filter     |n-shot|  Metric   |   |Value |   |Stderr|\n|-----|------:|----------------|-----:|-----------|---|-----:|---|-----:|\n|gsm8k|      3|flexible-extract|     5|exact_match|\u2191  |0.6459|\u00b1  |0.0132|\n|     |       |strict-match    |     5|exact_match|\u2191  |0.6452|\u00b1  |0.0132|\n```\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31202",
    "state": "closed",
    "labels": [
      "bug",
      "help wanted"
    ],
    "created_at": "2025-12-23T02:27:28Z",
    "updated_at": "2025-12-23T02:42:58Z",
    "comments": 1,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31200,
    "title": "[Bug]: class Request and  block_hasher has cirular reference, may cause memory leak.",
    "body": "### Your current environment\n\n<summary> Running MultiModal Network with prefix caching will cause memory leak. </summary>\n<details>\n<code>\nclass Request:\n    def __init__(\n        ...\n        self.block_hashes: list[BlockHash] = []\n        self.get_hash_new_full_blocks: Callable[[], list[BlockHash]] | None = None\n        if block_hasher is not None:\n            self.get_hash_new_full_blocks = partial(block_hasher, self)  # Request hold block_hasher and  block_hasher hold Request, create a circular references.\n            self.block_hashes = self.get_hash_new_full_blocks()\n</code>\n\nCan it change to the below code? \n\n<code>\nimport weakref\nclass Request:\n    def __init__(\n        ...\n        self.block_hashes: list[BlockHash] = []\n        self.get_hash_new_full_blocks: Callable[[], list[BlockHash]] | None = None\n        if block_hasher is not None:\n            self.get_hash_new_full_blocks = partial(block_hasher, weakref.proxy(self))  # Use weakref to avoid circual references.\n            self.block_hashes = self.get_hash_new_full_blocks()\n</code>\n\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nRuning a multimodal,  will cause memory leak. \nBecause the following leak trace:   block_hasher -> MultiModalFeatureSpec -> MultiModalKwargsItem -> MultiModalFiledElem -> image_pixels(Tensor)\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31200",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-23T01:55:47Z",
    "updated_at": "2025-12-23T15:02:37Z",
    "comments": 1,
    "user": "frelam"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12881,
    "title": "Is that a bug of prompt2prompt pipeline with replace word pormpt?",
    "body": "### Describe the bug\n\nIt performance the same when return different cross attention map, is implement error or just the problem with prompt2prompt.\n\n### Reproduction\n\nUse stable-diffusion-2-1:\n`images = pipe([\"A turtle playing with a ball\",  \"A monkey playing with a ball\"],\n                generator=torch.Generator(\"cuda\").manual_seed(34),\n                cross_attention_kwargs={\n                    \"edit_type\": \"replace\",\n                    \"local_blend_words\": [\"turtle\", \"monkey\"],\n                    \"n_cross_replace\": 0.4,\n                    \"n_self_replace\": 0.4\n                }).images`\n\nIt performance the same when return different cross attention map:\n`class AttentionReplace(AttentionControlEdit):\n    def replace_cross_attention(self, attn_base, att_replace):\n        return attn_base.unsqueeze(0).expand(att_replace.shape[0], *attn_base.shape)\n        return torch.einsum(\"hpw,bwn->bhpn\", attn_base, self.mapper)`\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nDiffusers=0.30.0\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/12881",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-23T01:55:06Z",
    "updated_at": "2025-12-23T01:55:06Z",
    "comments": 0,
    "user": "lincion"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15641,
    "title": "[Feature] In the event_loop_overlap function of the scheduler, can the recv operation be processed asynchronously?",
    "body": "### Checklist\n\n- [x] If this is not a feature request but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [x] Please use English. Otherwise, it will be closed.\n\n### Motivation\n\nIn the _offline large-scale high-concurrency multimodal deterministic inference scenario_, when using `event_loop_overlap `on a single machine, the `recv `operation is performed **synchronously before each step**. This can cause the GPU to idle due to waiting for recv requests, **thereby reducing the utilization rate**.\nWe have implemented a version that moves the recv to a background thread for continuous request reception. We use a priority lock to ensure that incoming requests are prioritized for queueing and processing. _On a single machine with eight H100 cards_, we have achieved an **increase in utilization from 60% to 75%**.\nWe hope that sglang can provide high-quality support for large-scale offline high-concurrency scenarios with high power and high utilization requirements.\n\n### Related resources\n\n_No response_",
    "url": "https://github.com/sgl-project/sglang/issues/15641",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-22T14:04:10Z",
    "updated_at": "2025-12-22T14:04:10Z",
    "comments": 0,
    "user": "titanium-temu"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15634,
    "title": "[Bug] sgl-kernel does not support fa3???",
    "body": "### Checklist\n\n- [ ] I searched related issues but found no solution.\n- [x] The bug persists in the latest version.\n- [x] Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.\n- [x] If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [x] Please use English. Otherwise, it will be closed.\n\n### Describe the bug\n\nCUDA error (/sgl-kernel/build/_deps/repo-flash-attention-src/hopper/flash_fwd_launch_template.h:166): invalid configuration argument\n\n### Reproduction\n\nno_proxy=\"*\" SGLANG_TORCH_PROFILER_DIR=./ python -m sglang.launch_server   --model-path /root/temp_can/DeepSeek-V3-0324   --load-format dummy   --tp 4   --ep 4  --disable-cuda-graph --disable-radix-cache   --moe-a2a-backend deepep --deepep-mode normal --chunked-prefill-size -1   --host 0.0.0.0   --port 30000 --enable-two-batch-overlap --attention-backend fa3\n\n### Environment\n\n(new_py310) root@zyhuang0-0:~/temp_can/sglang# python3 -m sglang.check_env\nPython: 3.10.19 (main, Oct 21 2025, 16:43:05) [GCC 11.2.0]\nCUDA available: True\nGPU 0,1,2,3: NVIDIA H100 80GB HBM3\nGPU 0,1,2,3 Compute Capability: 9.0\nCUDA_HOME: /usr/local/cuda\nNVCC: Cuda compilation tools, release 12.9, V12.9.41\nCUDA Driver Version: 550.54.15\nPyTorch: 2.9.1+cu128\nsglang: 0.5.6.post2\nsgl_kernel: 0.3.19\nflashinfer_python: 0.5.3\nflashinfer_cubin: 0.5.3\nflashinfer_jit_cache: Module Not Found\ntriton: 3.5.1\ntransformers: 4.57.1\ntorchao: 0.9.0\nnumpy: 2.2.6\naiohttp: 3.13.2\nfastapi: 0.127.0\nhf_transfer: 0.1.9\nhuggingface_hub: 0.36.0\ninteregular: 0.3.3\nmodelscope: 1.33.0\norjson: 3.11.5\noutlines: 0.1.11\npackaging: 25.0\npsutil: 7.1.3\npydantic: 2.12.5\npython-multipart: 0.0.21\npyzmq: 27.1.0\nuvicorn: 0.40.0\nuvloop: 0.22.1\nvllm: Module Not Found\nxgrammar: 0.1.27\nopenai: 2.6.1\ntiktoken: 0.12.0\nanthropic: 0.75.0\nlitellm: Module Not Found\ndecord2: 3.0.0\nNVIDIA Topology: \n        GPU0    GPU1    GPU2    GPU3    NIC0    NIC1    NIC2    NIC3    NIC4    NIC5    NIC6    CPU Affinity    NUMA Affinity   GPU NUMA ID\nGPU0     X      NV18    NV18    NV18    SYS     PIX     SYS     SYS     SYS     SYS     SYS     0-47,96-143     0               N/A\nGPU1    NV18     X      NV18    NV18    SYS     SYS     SYS     SYS     SYS     PIX     SYS     48-95,144-191   1               N/A\nGPU2    NV18    NV18     X      NV18    SYS     SYS     SYS     SYS     SYS     SYS     SYS     48-95,144-191   1               N/A\nGPU3    NV18    NV18    NV18     X      SYS     SYS     SYS     SYS     SYS     SYS     PIX     48-95,144-191   1               N/A\nNIC0    SYS     SYS     SYS     SYS      X      SYS     SYS     SYS     SYS     SYS     SYS\nNIC1    PIX     SYS     SYS     SYS     SYS      X      SYS     SYS     SYS     SYS     SYS\nNIC2    SYS     SYS     SYS     SYS     SYS     SYS      X      PXB     PXB     SYS     SYS\nNIC3    SYS     SYS     SYS     SYS     SYS     SYS     PXB      X      PIX     SYS     SYS\nNIC4    SYS     SYS     SYS     SYS     SYS     SYS     PXB     PIX      X      SYS     SYS\nNIC5    SYS     PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS      X      SYS\nNIC6    SYS     SYS     SYS     PIX     SYS     SYS     SYS     SYS     SYS     SYS      X \n\nLegend:\n\n  X    = Self\n  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)\n  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node\n  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)\n  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)\n  PIX  = Connection traversing at most a single PCIe bridge\n  NV#  = Connection traversing a bonded set of # NVLinks\n\nNIC Legend:\n\n  NIC0: mlx5_0\n  NIC1: mlx5_1\n  NIC2: mlx5_2\n  NIC3: mlx5_3\n  NIC4: mlx5_4\n  NIC5: mlx5_5\n  NIC6: mlx5_6\n\n\nulimit soft: 1048576",
    "url": "https://github.com/sgl-project/sglang/issues/15634",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-22T10:50:36Z",
    "updated_at": "2025-12-22T10:50:55Z",
    "comments": 0,
    "user": "ziyuhuang123"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 171080,
    "title": "NxN BlockMask / Cumulative Sequence Length",
    "body": "Hi,\nI tried to implement FlexAttention for large batch training. Each attention layer computes attention within a window. My tensor is a batch-packed tensor to handle variable sequence lengths. _The size of each batch sequence changes with the data (some batch samples are longer than other)_\n\nThis means that I not only need to mask the window, but also the batches. In FlashAttention2 this is simple, i just pass a cumulative sequence length tensor, e.g.\n\n```python\nbounds = torch.tensor([ 0, 1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 9216, 10240, 11264, 12288, 13312, 14336, 15360, 16384, 17408, 18432, 19456, 20480, 21504, 22528, 23552, 24576, 25600, 26624, 27648, 28672, 29696, 30720, 31744, 32768, 33792, 34816, 35840, 36864, 37888, 38912, 39936, 40960, 41984, 43008, 44032, 45056, 46080, 47104, 48128, 49152, ... ]) # Here window size = 1024\n```\n\n\n**The issue:**\nIm training with a very large batch size, so I have thousands of window/batch-sequence blocks.\n\nI tried various ways to calculate the BlockMask, but it always materializes a NxN matrix. Using compile is extremely slow (~20x slower than FA2), since I have to recalculate the BlockMask at each sample. Padding is not an option, as this is too inefficient.\n\n**My question**\nIs there a way to use a similar cumulative sequence length tensor, as in FA2, without materializing memory-prohibitive NxN masks in any part of flex attention?\n\ncc @chauhang @penguinwu @Chillee @drisspg @yanboliang @BoyuanFeng",
    "url": "https://github.com/pytorch/pytorch/issues/171080",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: flex attention"
    ],
    "created_at": "2025-12-22T09:58:22Z",
    "updated_at": "2025-12-22T17:50:15Z",
    "comments": 1,
    "user": "L-Reichardt"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2697,
    "title": "Run pi0.5 on Libero, incorrect version of transformers",
    "body": "### Ticket Type\n\n\ud83d\udc1b Bug Report (Something isn't working)\n\n### Environment & System Info\n\n```Shell\nCopy-and-paste the text below in your GitHub issue and FILL OUT the last point.\n\n- lerobot version: 0.4.0\n- Platform: Linux-6.8.0-87-generic-x86_64-with-glibc2.35\n- Python version: 3.10.19\n- Huggingface Hub version: 0.35.3\n- Datasets version: 4.1.1\n- Numpy version: 2.2.6\n- PyTorch version: 2.7.1+cu126\n- Is PyTorch built with CUDA support?: True\n- Cuda version: 12.6\n- GPU model: NVIDIA GeForce RTX 4090\n- Using GPU in script?: <fill in>\n```\n\n### Description\n\nI am running PI0.5 on Libero Benchmark and I encounter with the following issues:\n\n```python\nBuilt vec env | suite=libero_spatial | task_id=6 | n_envs=1\nBuilt vec env | suite=libero_spatial | task_id=7 | n_envs=1\nBuilt vec env | suite=libero_spatial | task_id=8 | n_envs=1\nBuilt vec env | suite=libero_spatial | task_id=9 | n_envs=1\nINFO 2025-12-22 03:42:33 bot_eval.py:499 Making policy.\nThe PI05 model is a direct port of the OpenPI implementation. \nThis implementation follows the original OpenPI structure for compatibility. \nOriginal implementation: https://github.com/Physical-Intelligence/openpi\n`torch_dtype` is deprecated! Use `dtype` instead!\nTraceback (most recent call last):\n  File \"/home/yu/miniconda3/envs/lerobot/bin/lerobot-eval\", line 7, in <module>\n    sys.exit(main())\n  File \"/home/yu/copy/vla/lerobot/src/lerobot/scripts/lerobot_eval.py\", line 763, in main\n    eval_main()\n  File \"/home/yu/copy/vla/lerobot/src/lerobot/configs/parser.py\", line 233, in wrapper_inner\n    response = fn(cfg, *args, **kwargs)\n  File \"/home/yu/copy/vla/lerobot/src/lerobot/scripts/lerobot_eval.py\", line 501, in eval_main\n    policy = make_policy(\n  File \"/home/yu/copy/vla/lerobot/src/lerobot/policies/factory.py\", line 412, in make_policy\n    policy = policy_cls.from_pretrained(**kwargs)\n  File \"/home/yu/copy/vla/lerobot/src/lerobot/policies/pi05/modeling_pi05.py\", line 893, in from_pretrained\n    model = cls(config, **kwargs)\n  File \"/home/yu/copy/vla/lerobot/src/lerobot/policies/pi05/modeling_pi05.py\", line 842, in __init__\n    self.model = PI05Pytorch(config)\n  File \"/home/yu/copy/vla/lerobot/src/lerobot/policies/pi05/modeling_pi05.py\", line 541, in __init__\n    raise ValueError(msg) from None\nValueError: An incorrect transformer version is used, please create an issue on https://github.com/huggingface/lerobot/issues\n```\n\nCan I kindly ask is there anyone encounter with similar issues?\n",
    "url": "https://github.com/huggingface/lerobot/issues/2697",
    "state": "open",
    "labels": [
      "bug",
      "question",
      "evaluation"
    ],
    "created_at": "2025-12-22T08:54:56Z",
    "updated_at": "2025-12-22T16:20:01Z",
    "user": "yqi19"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2696,
    "title": "RTC does not work.",
    "body": "### Ticket Type\n\n\ud83d\udc1b Bug Report (Something isn't working)\n\n### Environment & System Info\n\n```Shell\n- lerobot version: 0.4.3\n- Platform: Linux-5.10.134-17.3.al8.x86_64-x86_64-with-glibc2.35\n- Python version: 3.10.19\n- Huggingface Hub version: 0.35.3\n- Datasets version: 4.1.1\n- Numpy version: 2.2.6\n- PyTorch version: 2.7.1+cu126\n- Is PyTorch built with CUDA support?: True\n- Cuda version: 12.6\n- GPU model: NVIDIA H20\n- Using GPU in script?: <fill in>\n```\n\n### Description\n\nI trained pi05 using my own dataset (where the actions are absolute joint angles). The final training loss reached 0.006.\n\nThen I ran examples/rtc/eval_dataset.py.\n`rtc=RTCConfig(enabled=True, prefix_attention_schedule=<RTCAttentionSchedule.EXP: 'EXP'>, max_guidance_weight=100.0, execution_horizon=8, debug=True, debug_maxlen=1000), device='cuda:0', output_dir='rtc_debug_output', seed=42, inference_delay=4, use_torch_compile=False, torch_compile_backend='inductor', torch_compile_mode='default', torch_compile_disable_cudagraphs=True)`\n\n<img width=\"2397\" height=\"1769\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/284b28e6-7098-4614-938b-b15582a573ce\" />\n\n<img width=\"3260\" height=\"1769\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/c1f8794a-ffaa-4ded-b4ce-04195e4011ab\" />\n\n<img width=\"3314\" height=\"1769\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1486bbff-777a-4405-90a3-73593cd9e02b\" />\n\n<img width=\"3261\" height=\"1769\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/c9f61848-3504-4908-be94-fa8005e75039\" />\n\n<img width=\"3319\" height=\"1769\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/4dfe6dda-1108-43f4-9cd5-0d294aeaff3b\" />\n\nHowever, when I run the same script with the following parameters:\n`\npython examples/rtc/eval_dataset.py \\\n    --policy.path=lerobot/pi05_libero_finetuned \\\n    --dataset.repo_id=HuggingFaceVLA/libero \\\n    --rtc.execution_horizon=8 \\\n    --device=cuda\n`\neverything works fine. I would like to know where the error might be occurring.\n\n### Context & Reproduction\n\nThe training parameters are as follows:\n`            \"args\": [\n                \"--dataset.repo_id=/mnt/model/wlz/real_stack_purple_toy_joint_lerobot\",\n                \"--policy.type=pi05\",\n                \"--output_dir=./outputs/pi05_training\",\n                \"--job_name=pi05_training\",\n                \"--policy.repo_id=wlz\",\n                \"--policy.pretrained_path=lerobot/pi05_base\",\n                \"--policy.compile_model=true\",\n                \"--policy.gradient_checkpointing=true\",\n                \"--wandb.enable=false\",\n                \"--policy.dtype=bfloat16\",\n                \"--steps=5000\",\n                \"--policy.device=cuda\",\n                \"--batch_size=32\",\n                \"--policy.input_features={\\\"observation.images.image\\\":{\\\"shape\\\":[3,256,256],\\\"type\\\":\\\"VISUAL\\\"},\\\"observation.images.image2\\\":{\\\"shape\\\":[3,256,256],\\\"type\\\":\\\"VISUAL\\\"},\\\"observation.state\\\":{\\\"shape\\\":[7],\\\"type\\\":\\\"STATE\\\"}}\",\n                \"--policy.output_features={\\\"action\\\":{\\\"shape\\\":[7],\\\"type\\\":\\\"ACTION\\\"}}\"\n            ]\n`\n\n### Relevant logs or stack trace\n\n```Shell\n\n```\n\n### Checklist\n\n- [ ] I have searched existing tickets to ensure this isn't a duplicate.\n- [ ] I am using the latest version of the `main` branch.\n- [ ] I have verified this is not an environment-specific problem.\n\n### Additional Info / Workarounds\n\n_No response_",
    "url": "https://github.com/huggingface/lerobot/issues/2696",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "policies",
      "dataset",
      "CI",
      "python",
      "examples",
      "training"
    ],
    "created_at": "2025-12-22T03:22:23Z",
    "updated_at": "2025-12-22T05:20:39Z",
    "user": "xiaozhisky1"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3601,
    "title": "how to finetuning a bi-encoder embedding model of multimodel input",
    "body": "I want to cluster ecommerce products by bi-encoder. For each product, it has a name(text) and an image. Can I use sentence-transfomer to finetune a bi-encoder model?  The training dataset contains product clusters, like:\n\n```\nproduct1_name, product1_img, cluster_id1\nproduct2_name, product2_img, cluster_id1\nproduct3_name, product3_img, cluster_id2\n\nproductm_name,productm_img, cluster_idn\n```\n\nI want to try first to define it as a classification problem(cluster_id1,...cluster_idn) and use arcface loss. But If there are other suitable losses, it's also fine.\n\n Is sentence transformer suitable for my use case? I find siglip(something like clip) is good at embedding. Its training data is image/text pair, but my data is not the same as it.\n",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3601",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-22T02:46:43Z",
    "updated_at": "2025-12-22T09:09:31Z",
    "user": "fancyerii"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31096,
    "title": "[Usage]: Qwen3-Next: Both Instruct and Thinking models don't support function calling",
    "body": "\nDoes the Qwen3-Next model not support the function calling feature? Test results show some common error scenarios:\n1. The tools should be called, but content returned something like the following:\n```\n{\n  \"choices\": [\n    {\n      \"message\": {\n        \"content\": \"</think>\\n{\\\"name\\\": \\\"send_email\\\", \\\"arguments\\\": {\\\"userInput\\\": \\\"ALAN\u7684ID\u662f123456\uff0cALAN\uff0c\u4e2d\u56fd\u4eba\uff0c\u82f1\u8bed\u6570\u5b66\u5f88\u725b\\\"}}\\n</tool_call>\",\n        \"tool_calls\": []\n      },\n      \"finish_reason\": \"stop\"\n    }\n  ]\n}\n```\n```\n{\n  \"id\": \"chatcmpl-38af97847cce417a84577fe604d5b31e\",\n  \"object\": \"chat.completion\",\n  \"created\": 1766119733,\n  \"model\": \"Next\",\n  \"choices\": [\n    {\n      \"index\": 0,\n      \"message\": {\n        \"role\": \"assistant\",\n        \"content\": \"<tool_call>\\n{\\\"name\\\": \\\"get_weather\\\", \\\"arguments\\\": {\\\"location\\\": \\\"San Francisco\\\", \\\"unit\\\": \\\"celsius\\\"}}\\n</tool_call>\",\n        \"refusal\": null,\n        \"annotations\": null,\n        \"audio\": null,\n        \"function_call\": null,\n        \"tool_calls\": [],\n        \"reasoning_content\": null\n      },\n      \"logprobs\": null,\n      \"finish_reason\": \"stop\",\n      \"stop_reason\": null,\n      \"token_ids\": null\n    }\n  ],\n  \"service_tier\": null,\n  \"system_fingerprint\": null,\n  \"usage\": {\n    \"prompt_tokens\": 619,\n    \"total_tokens\": 647,\n    \"completion_tokens\": 28,\n    \"prompt_tokens_details\": null\n  },\n  \"prompt_logprobs\": null,\n  \"prompt_token_ids\": null,\n  \"kv_transfer_params\": null\n}\n```\n2. Returning to the contents of the parameter list may result in non-standard characters, causing parameter retrieval to fail.\n```\n{\n  \"choices\": [\n    {\n      \"message\": {\n        \"content\": \"\",\n        \"tool_calls\": [\n          {\n            \"id\": \"chatcmpl-tool-ad840dff072841759d3ed8a26e21391f\",\n            \"type\": \"function\",\n            \"index\": 0,\n            \"function\": {\n              \"name\": \"get_weather\",\n              \"arguments\": \"\"\n            }\n          }\n        ]\n      },\n      \"finish_reason\": \"tool_calls\"\n    }\n  ]\n}\n```\n\n\n",
    "url": "https://github.com/vllm-project/vllm/issues/31096",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-21T12:02:08Z",
    "updated_at": "2025-12-23T03:02:02Z",
    "comments": 0,
    "user": "PHOEBEMOON0802"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2694,
    "title": "The GT00T algorithm simply won't run and throws the following error. Could someone please help me fix it?",
    "body": "The GT00T algorithm simply won't run and throws the following error. Could someone please help me fix   it?\n\nn_model.post_layernorm.bias', 'backbone.eagle_model.vision_model.vision_model.post_layernorm.weight']\nTraceback (most recent call last):\n  File \"/home/ruijia/miniconda3/envs/lerobot/bin/lerobot-train\", line 7, in <module>\n    sys.exit(main())\n  File \"/home/ruijia/lerobot_code/lerobot/src/lerobot/scripts/lerobot_train.py\", line 517, in main\n    train()\n  File \"/home/ruijia/lerobot_code/lerobot/src/lerobot/configs/parser.py\", line 233, in wrapper_inner\n    response = fn(cfg, *args, **kwargs)\n  File \"/home/ruijia/lerobot_code/lerobot/src/lerobot/scripts/lerobot_train.py\", line 268, in train\n    preprocessor, postprocessor = make_pre_post_processors(\n  File \"/home/ruijia/lerobot_code/lerobot/src/lerobot/policies/factory.py\", line 252, in make_pre_post_processors\n    PolicyProcessorPipeline.from_pretrained(\n  File \"/home/ruijia/lerobot_code/lerobot/src/lerobot/processor/pipeline.py\", line 567, in from_pretrained\n    loaded_config, base_path = cls._load_config(model_id, config_filename, hub_download_kwargs)\n  File \"/home/ruijia/lerobot_code/lerobot/src/lerobot/processor/pipeline.py\", line 638, in _load_config\n    cls._suggest_processor_migration(model_id, f\"Config file '{config_filename}' not found\")\n  File \"/home/ruijia/lerobot_code/lerobot/src/lerobot/processor/pipeline.py\", line 1212, in _suggest_processor_migration\n    raise ProcessorMigrationError(model_path, migration_command, original_error)\nlerobot.processor.pipeline.ProcessorMigrationError: Model '/home/ruijia/llmweights/GR00T-N1.5-3B' requires migration to processor format. Run: python src/lerobot/processor/migrate_policy_normalization.py --pretrained-path /home/ruijia/llmweights/GR00T-N1.5-3B\n\nOriginal error: Config file 'policy_preprocessor.json' not found\n@kashif @ozten @jpizarrom @julien-c @jbcayrou ",
    "url": "https://github.com/huggingface/lerobot/issues/2694",
    "state": "open",
    "labels": [
      "bug",
      "question",
      "policies",
      "CI",
      "python",
      "processor",
      "examples",
      "training"
    ],
    "created_at": "2025-12-21T09:12:14Z",
    "updated_at": "2025-12-24T00:06:08Z",
    "user": "wuxiaolianggit"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2693,
    "title": "Wrist Roll motor not responding",
    "body": "### Ticket Type\n\n\ud83d\udc1b Bug Report (Something isn't working)\n\n### Environment & System Info\n\n```Shell\nlerobot version 0.4.0\n```\n\n### Description\n\nI connected to the lerobot so101 bot ->setup motors->callibrated->tested teleoperation\n,everything wewnt fine .But after few hours when recallibration is done in some other system the wrist roll motor  of the follower arm went partially stiff and it is not responding .  [Used FT SCServo Debugger]\n\n<img width=\"1199\" height=\"892\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9c2cfbe3-b041-4847-86ef-a677b97f801a\" />\n\n### Context & Reproduction\n\n_No response_\n\n### Relevant logs or stack trace\n\n```Shell\n\n```\n\n### Checklist\n\n- [x] I have searched existing tickets to ensure this isn't a duplicate.\n- [x] I am using the latest version of the `main` branch.\n- [x] I have verified this is not an environment-specific problem.\n\n### Additional Info / Workarounds\n\n_No response_",
    "url": "https://github.com/huggingface/lerobot/issues/2693",
    "state": "open",
    "labels": [
      "bug",
      "question",
      "teleoperators"
    ],
    "created_at": "2025-12-21T09:01:51Z",
    "updated_at": "2025-12-26T10:19:17Z",
    "user": "CHIRANJEET1729DAS"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2692,
    "title": "[Bug] Too many errors when Train RL in Simulation",
    "body": "### Ticket Type\n\n\ud83d\udc1b Bug Report (Something isn't working)\n\n### Environment & System Info\n\n```Shell\n`\n- LeRobot version: 0.4.3\n- Platform: Linux-6.8.0-90-generic-x86_64-with-glibc2.35\n- Python version: 3.10.19\n- Huggingface Hub version: 0.35.3\n- Datasets version: 4.1.1\n- Numpy version: 2.2.6\n- FFmpeg version: N/A\n- PyTorch version: 2.7.1+cu126\n- Is PyTorch built with CUDA support?: True\n- Cuda version: 12.6\n- GPU model: NVIDIA GeForce RTX 4090 D\n- Using GPU in script?: <fill in>\n- lerobot scripts: ['lerobot-calibrate', 'lerobot-dataset-viz', 'lerobot-edit-dataset', 'lerobot-eval', 'lerobot-find-cameras', 'lerobot-find-joint-limits', 'lerobot-find-port', 'lerobot-imgtransform-viz', 'lerobot-info', 'lerobot-record', 'lerobot-replay', 'lerobot-setup-motors', 'lerobot-teleoperate', 'lerobot-train']\n\n`\n```\n\n### Description\n\nFirst of all, thank you for your excellent open-source work.   \nI've noticed that LeRobot's code has undergone some significant refactoring recently, especially the code in the hil-serl section. Therefore, I want to re-test the hil-serl code.\n\nI followed the official documentation step by step, but I encountered many problems and don't know how to solve them. The documents:  https://huggingface.co/docs/lerobot/hilserl_sim\n\nFirst, I need Recording a Dataset. Therefore, I executed the following script.\n```shell\npython -m lerobot.rl.gym_manipulator --config_path gym_hil/env_config.json\n```\n\nThe gym_hil/env_config.json is like this:\n```\n{\n    \"env\": {\n        \"name\": \"gym_hil\",\n        \"task\": \"PandaPickCubeKeyboard-v0\",\n        \"fps\": 10,\n        \"robot\": null,\n        \"teleop\": null,\n        \"processor\": {\n            \"control_mode\": \"gamepad\",\n            \"gripper\": {\n                \"use_gripper\": true,\n                \"gripper_penalty\": -0.02,\n                \"gripper_penalty_in_reward\": false\n            },\n            \"reset\": {\n                \"fixed_reset_joint_positions\": [0.0, 0.195, 0.0, -2.43, 0.0, 2.62, 0.785],\n                \"reset_time_s\": 2.0,\n                \"control_time_s\": 15.0,\n                \"terminate_on_success\": true\n            }\n        }\n    },\n    \"dataset\": {\n        \"repo_id\": \"franka_sim_pick_lift_6\",\n        \"root\": \"/mnt/hukongtao/codebase/lerobot/franka_sim_pick_lift_6\",\n        \"task\": \"PandaPickCubeKeyboard-v0\",\n        \"num_episodes_to_record\": 30,\n        \"replay_episode\": 0,\n        \"push_to_hub\": false\n    },\n    \"mode\": \"record\",\n    \"device\": \"cpu\"\n}\n```\nfrom https://huggingface.co/api/resolve-cache/datasets/lerobot/config_examples/e9cea127f440dab0eb333f8b8007828ce8f48e23/rl%2Fgym_hil%2Fenv_config.json?%2Fdatasets%2Flerobot%2Fconfig_examples%2Fresolve%2Fmain%2Frl%2Fgym_hil%2Fenv_config.json=&etag=%22a4b2ef62f6cee4e31f608639134c07c7e8d3c4ab%22\n\n\nI got my first error:\n```\ndraccus.utils.DecodingError: `processor.gripper`: Could not decode the value into any of the given types:\n    GripperConfig: The fields `gripper_penalty_in_reward` are not valid for GripperConfig\n```\nSo I delete gripper_penalty_in_reward in gym_hil/env_config.json. Then I ran the program again. I got another error:\n```\nTraceback (most recent call last):\n  File \"/data/hukongtao/miniconda3/envs/lerobot/lib/python3.10/runpy.py\", line 196, in _run_module_as_main\n    return _run_code(code, main_globals, None,\n  File \"/data/hukongtao/miniconda3/envs/lerobot/lib/python3.10/runpy.py\", line 86, in _run_code\n    exec(code, run_globals)\n  File \"/mnt/hukongtao/codebase/lerobot/src/lerobot/rl/gym_manipulator.py\", line 770, in <module>\n    main()\n  File \"/mnt/hukongtao/codebase/lerobot/src/lerobot/configs/parser.py\", line 233, in wrapper_inner\n    response = fn(cfg, *args, **kwargs)\n  File \"/mnt/hukongtao/codebase/lerobot/src/lerobot/rl/gym_manipulator.py\", line 766, in main\n    control_loop(env, env_processor, action_processor, teleop_device, cfg)\n  File \"/mnt/hukongtao/codebase/lerobot/src/lerobot/rl/gym_manipulator.py\", line 602, in control_loop\n    action_features = teleop_device.action_features\nAttributeError: 'NoneType' object has no attribute 'action_features'\n\n```\nI'm certain this is a bug in the code, because in a simulation environment  teleop_device is None. But I don't know how to fix this error.\n\n### Context & Reproduction\n\n```\ngit clone https://github.com/huggingface/lerobot.git\ncd lerobot\npip install -e .[all]\npython -m lerobot.rl.gym_manipulator --config_path gym_hil/env_config.json\n```\n\n### Relevant logs or stack trace\n\n```Shell\n\n```\n\n### Checklist\n\n- [x] I have searched existing tickets to ensure this isn't a duplicate.\n- [x] I am using the latest version of the `main` branch.\n- [x] I have verified this is not an environment-specific problem.\n\n### Additional Info / Workarounds\n\nI tested the hil-serl code in version 0.3.3 of lerobot, and it worked without any problems.",
    "url": "https://github.com/huggingface/lerobot/issues/2692",
    "state": "open",
    "labels": [
      "bug",
      "documentation",
      "question",
      "dataset",
      "simulation",
      "tests",
      "examples",
      "training"
    ],
    "created_at": "2025-12-21T08:22:16Z",
    "updated_at": "2026-01-04T06:19:05Z",
    "user": "Hukongtao"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3894,
    "title": "How to specify different number of process per node",
    "body": "I've 2 node. First node has 8 gpus while second node has 2 GPUs. I want to specify the number of process to be 8 and 2 respectively in both nodes. I'm using this config in both node. But it always tries to divide equal number of process in both node. With below config file, it's starting 5 process in both nodes:-\n\nNode 1:-\n\n```compute_environment: LOCAL_MACHINE\ndebug: false\ndistributed_type: MULTI_GPU\ndowncast_bf16: 'no'\nenable_cpu_affinity: false\ngpu_ids: 0,1,2,3,4,5,6,7\nmachine_rank: 0\nmain_process_ip: xxxxx\nmain_process_port: 5000\nmain_training_function: main\nmixed_precision: fp16\nnum_machines: 2\nnum_processes: 10\nrdzv_backend: static\nsame_network: true\ntpu_env: []\ntpu_use_cluster: false\ntpu_use_sudo: false\nuse_cpu: false \n```\n\nNode 2:-\n```\ncompute_environment: LOCAL_MACHINE\ndebug: false\ndistributed_type: MULTI_GPU\ndowncast_bf16: 'no'\nenable_cpu_affinity: false\ngpu_ids: 0,1\nmachine_rank: 1\nmain_process_ip: xxxx\nmain_process_port: 5000\nmain_training_function: main\nmixed_precision: fp16\nnum_machines: 2\nnum_processes: 10\nrdzv_backend: static\nsame_network: true\ntpu_env: []\ntpu_use_cluster: false\ntpu_use_sudo: false\nuse_cpu: false\n```",
    "url": "https://github.com/huggingface/accelerate/issues/3894",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-21T07:09:15Z",
    "updated_at": "2025-12-21T07:09:15Z",
    "user": "AIML001"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31091,
    "title": "[Usage]: Image Embedding Models (CLIP, Siglip, etc)",
    "body": "### Your current environment\n\n```text\nroot@3904bdeddb91:/vllm-workspace# python3 collect_env.py\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu129\nIs debug build               : False\nCUDA used to build PyTorch   : 12.9\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.12 (main, Oct 10 2025, 08:52:57) [GCC 11.4.0] (64-bit runtime)\nPython platform              : Linux-6.8.0-87-generic-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.9.86\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA RTX PRO 6000 Blackwell Workstation Edition\nGPU 1: NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition\n\nNvidia driver version        : 580.65.06\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        43 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               64\nOn-line CPU(s) list:                  0-63\nVendor ID:                            AuthenticAMD\nModel name:                           AMD EPYC 7502 32-Core Processor\nCPU family:                           23\nModel:                                49\nThread(s) per core:                   2\nCore(s) per socket:                   32\nSocket(s):                            1\nStepping:                             0\nFrequency boost:                      enabled\nCPU max MHz:                          2500.0000\nCPU min MHz:                          1500.0000\nBogoMIPS:                             4999.95\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip rdpid overflow_recov succor smca sev sev_es ibpb_exit_to_user\nVirtualization:                       AMD-V\nL1d cache:                            1 MiB (32 instances)\nL1i cache:                            1 MiB (32 instances)\nL2 cache:                             16 MiB (32 instances)\nL3 cache:                             128 MiB (8 instances)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-63\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Mitigation; untrained return thunk; SMT enabled with STIBP protection\nVulnerability Spec rstack overflow:   Mitigation; Safe RET\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Retpolines; IBPB conditional; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affected\nVulnerability Vmscape:                Mitigation; IBPB before exit to userspace\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-python==0.5.3\n",
    "url": "https://github.com/vllm-project/vllm/issues/31091",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-21T04:10:10Z",
    "updated_at": "2025-12-23T03:26:40Z",
    "comments": 2,
    "user": "JamesDConley"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2690,
    "title": "[Bug] Pi0 Inference RuntimeError: Dimension mismatch in Gemma eager_attention_forward (Causal Mask vs Attn Weights)",
    "body": "",
    "url": "https://github.com/huggingface/lerobot/issues/2690",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "policies",
      "dataset",
      "CI",
      "performance",
      "robots",
      "examples",
      "training"
    ],
    "created_at": "2025-12-20T16:08:36Z",
    "updated_at": "2025-12-22T09:34:57Z",
    "user": "SMWTDDY"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2689,
    "title": "problem regarding to update aloha sim dataset version v2.1 to v3.0",
    "body": "### Ticket Type\n\n\ud83d\udc1b Bug Report (Something isn't working)\n\n### Environment & System Info\n\n```Shell\nlerobot version 3.0, h100 gpu, openpi repository, training aloha simulation with pi0.5\n```\n\n### Description\n\nDuring training aloha simulation, I updated lerobot aloha sim insertion dataset from compatible with 2.1 to 3.0, the training results showing aloha joints are working weirdly (showing spark of joint actions).\n\nThe dataset conversion followed as below.\n\n```\nlerobot.datasets.backward_compatibility.BackwardCompatibilityError: \nThe dataset you requested (lerobot/aloha_sim_insertion_scripted) is in 2.1 format.\n\nWe introduced a new format since v3.0 which is not backward compatible with v2.1.\nPlease, update your dataset to the new format using this command:\n\npython -m lerobot.datasets.v30.convert_dataset_v21_to_v30 --repo-id=lerobot/aloha_sim_insertion_scripted\n```\n\n### Context & Reproduction\n\n_No response_\n\n### Relevant logs or stack trace\n\n```Shell\n\n```\n\n### Checklist\n\n- [ ] I have searched existing tickets to ensure this isn't a duplicate.\n- [ ] I am using the latest version of the `main` branch.\n- [ ] I have verified this is not an environment-specific problem.\n\n### Additional Info / Workarounds\n\n_No response_",
    "url": "https://github.com/huggingface/lerobot/issues/2689",
    "state": "open",
    "labels": [
      "bug",
      "question",
      "dataset",
      "simulation",
      "CI",
      "robots",
      "training"
    ],
    "created_at": "2025-12-20T13:42:39Z",
    "updated_at": "2025-12-24T00:06:09Z",
    "user": "conscious-choi"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15524,
    "title": "[Bug] Deepseek R1 multi-turn tool calling not working",
    "body": "### Checklist\n\n- [x] I searched related issues but found no solution.\n- [x] The bug persists in the latest version.\n- [ ] Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.\n- [x] If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [x] Please use English. Otherwise, it will be closed.\n\n### Describe the bug\n\nThe multi-turn tool calling failed with error: `{\"object\":\"error\",\"message\":\"'dict object' has no attribute 'name'\",\"type\":\"BadRequest\",\"param\":null,\"code\":400}`\n\nHere is the example query:\n```\ncurl http://127.0.0.1:7080/v1/chat/completions   -H \"Content-Type: application/json\"   -d '{\n    \"model\": \"deepseek-ai/DeepSeek-R1\",\n    \"stream\": false,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"What is the weather like in San Francisco?\"\n    },\n    {\n      \"role\": \"assistant\",\n      \"content\": \"I will check the weather for San Francisco. Please hold on.\",\n      \"tool_calls\": [\n        {\n          \"id\": \"call_ab97cb439a5e41cfbdd8960c\",\n          \"type\": \"function\",\n          \"function\": {\n            \"name\": \"get_weather\",\n            \"arguments\": \"{\\\"location\\\": \\\"San Francisco, CA\\\"}\"\n          }\n        }\n      ]\n    },\n    {\n      \"role\": \"tool\",\n      \"tool_call_id\": \"call_ab97cb439a5e41cfbdd8960c\",\n      \"content\": \"70 degrees and foggy\"\n    }\n  ],\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"get_weather\",\n        \"description\": \"Get the current weather\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"location\": {\n              \"type\": \"string\",\n              \"description\": \"The city and state (both required), e.g. San Francisco, CA.\"\n            }\n          },\n          \"required\": [\n            \"location\"\n          ]\n        }\n      }\n    }\n  ]\n}'\n```\n\nHowever, the same query works for the image back in August.\n\n### Reproduction\n\n*) Start server on B200\n```\npython3 -m sglang.launch_server \\\n   --model-path nvidia/DeepSeek-R1-0528-NVFP4 \\\n   --port 7080 \\\n   --host 0.0.0.0 \\\n   --tp-size=8 \\\n   --ep-size=8 \\\n   --moe-runner-backend=flashinfer_trtllm \\\n   --enable-flashinfer-allreduce-fusion \\\n   --tool-call-parser=deepseekv3 \\\n   --chat-template=/sgl-workspace/sglang/examples/chat_template/tool_chat_template_deepseekr1.jinja \\\n   --speculative-num-steps=3 \\\n   --speculative-eagle-topk=1 \\\n   --speculative-num-draft-tokens=4 \\\n   --speculative-algorithm=EAGLE \\\n   --trust-remote-code\n```\n\n*) send query\n```\ncurl http://127.0.0.1:7080/v1/chat/completions   -H \"Content-Type: application/json\"   -d '{\n    \"model\": \"deepseek-ai/DeepSeek-R1\",\n    \"stream\": false,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"What is the weather like in San Francisco?\"\n    },\n    {\n      \"role\": \"assistant\",\n      \"content\": \"I will check the weather for San Francisco. Please hold on.\",\n      \"tool_calls\": [\n        {\n          \"id\": \"call_ab97cb439a5e41cfbdd8960c\",\n          \"type\": \"function\",\n          \"function\": {\n            \"name\": \"get_weather\",\n            \"arguments\": \"{\\\"location\\\": \\\"San Francisco, CA\\\"}\"\n          }\n        }\n      ]\n    },\n    {\n      \"role\": \"tool\",\n      \"tool_call_id\": \"call_ab97cb439a5e41cfbdd8960c\",\n      \"content\": \"70 degrees and foggy\"\n    }\n  ],\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"get_weather\",\n        \"description\": \"Get the current weather\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"location\": {\n              \"type\": \"string\",\n              \"description\": \"The city and state (both required), e.g. San Francisco, CA.\"\n            }\n          },\n          \"required\": [\n            \"location\"\n          ]\n        }\n      }\n    }\n  ]\n}'\n```\n\n### Environment\n\n```\nPython: 3.12.3 (main, Nov  6 2025, 13:44:16) [GCC 13.3.0]\nCUDA available: True\nGPU 0,1,2,3,4,5,6,7: NVIDIA B200\nGPU 0,1,2,3,4,5,6,7 Compute Capability: 10.0\nCUDA_HOME: /usr/local/cuda\nNVCC: Cuda compilation tools, release 12.9, V12.9.86\nCUDA Driver Version: 580.95.05\nPyTorch: 2.9.1+cu129\nsglang: 0.5.6.post2\nsgl_kernel: 0.3.19\nflashinfer_python: 0.5.3\nflashinfer_cubin: 0.5.3\nflashinfer_jit_cache: Module Not Found\ntriton: 3.5.1\ntransformers: 4.57.1\ntorchao: 0.9.0\nnumpy: 2.3.5\naiohttp: 3.13.2\nfastapi: 0.124.2\nhf_transfer: 0.1.9\nhuggingface_hub: 0.36.0\ninteregular: 0.3.3\nmodelscope: 1.33.0\norjson: 3.11.5\noutlines: 0.1.11\npackaging: 25.0\npsutil: 7.1.3\npydantic: 2.12.5\npython-multipart: 0.0.20\npyzmq: 27.1.0\nuvicorn: 0.38.0\nuvloop: 0.22.1\nvllm: Module Not Found\nxgrammar: 0.1.27\nopenai: 2.6.1\ntiktoken: 0.12.0\nanthropic: 0.75.0\nlitellm: Module Not Found\ndecord2: 2.0.0\nNVIDIA Topology: \n\tGPU0\tGPU1\tGPU2\tGPU3\tGPU4\tGPU5\tGPU6\tGPU7\tCPU Affinity\tNUMA Affinity\tGPU NUMA ID\nGPU0\t X \tNV18\tNV18\tNV18\tNV18\tNV18\tNV18\tNV18\t0-55,112-167\t0\t\tN/A\nGPU1\tNV18\t X \tNV18\tNV18\tNV18\tNV18\tNV18\tNV1",
    "url": "https://github.com/sgl-project/sglang/issues/15524",
    "state": "closed",
    "labels": [],
    "created_at": "2025-12-20T10:31:36Z",
    "updated_at": "2025-12-21T01:29:43Z",
    "comments": 2,
    "user": "ynwang007"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31066,
    "title": "[Doc]: Formatting issue in markdown file",
    "body": "### \ud83d\udcda The doc issue\n\nin [paged_attention.md](https://github.com/vllm-project/vllm/blob/ff2168bca3a195b835c64a5c9012d7b6a9f34e61/docs/design/paged_attention.md#query), there is an issue where a pictures arent formatted correctly and only show the html link .\nFor example, specifically, in the Query subsection, we can see:\n\n`![](../assets/design/paged_attention/q_vecs.png){ align=\"center\" alt=\"q_vecs\" width=\"70%\" }`\n\nThe asset isnt loaded correctly.\n\nThere are a total of **7 such issues**, particularly, we have \n\n- Query subsection - 2 instances.\n- Key subsection - 2 instances.\n- Value subsection - 3 instances\n\n### Suggest a potential alternative/fix\nPerhaps the reference for the images can be checked, it must be broken somewhere\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31066",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-12-20T06:23:44Z",
    "updated_at": "2025-12-22T01:38:56Z",
    "comments": 1,
    "user": "ssaketh-ch"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 170926,
    "title": "Could we have a unified method on c10::Stream to access the underlying pointer that the c10::Stream wraps?",
    "body": "As title.\n\nAs I understand it, the device generic c10::Stream object is intended to wrap an underlying pointer to the stream object for the accelerator (e.g. `cudaStream_t` for CUDA, `hipStream_t` for ROCM  `sycl::queue&` for XPU etc.). I see that there are methods like the following on `CUDAStream`/`XPUStream` that allow users to access the underlying pointer to the respective underlying object.\n\nhttps://github.com/pytorch/pytorch/blob/e782dc0a4e7e8a048de520bd45f1bfa969ed7e3a/c10/cuda/CUDAStream.h#L143-L144\n\nhttps://github.com/pytorch/pytorch/blob/e782dc0a4e7e8a048de520bd45f1bfa969ed7e3a/c10/xpu/XPUStream.h#L116-L117\n\nWould it make sense to have a unified method on the base c10::Stream that returns this to the user? e.g. perhaps `void** native_ptr()` that the user then casts to the type that they expect?\n\n\n\n## Use Case\n\nI've added a [device-generic ABI stable wrapper for c10::Stream](https://github.com/pytorch/pytorch/blob/main/torch/csrc/stable/accelerator.h#L45-L64) to torch/csrc/stable/accelerator.h . It is returned when the user uses the ABI stable variant of `getCurrentStream` that wraps `at::accelerator::getCurrentStream` https://github.com/pytorch/pytorch/blob/e782dc0a4e7e8a048de520bd45f1bfa969ed7e3a/torch/csrc/stable/accelerator.h#L66-L70\n\nhttps://github.com/pytorch/pytorch/blob/e782dc0a4e7e8a048de520bd45f1bfa969ed7e3a/torch/csrc/inductor/aoti_torch/shim_common.cpp#L1510-L1518\n\nI'm looking for a unified way to access the underlying pointer (e.g. so a user can pass it to a raw CUDA/HIP/XPU API but it seems like there is no unified method to access this. The only method that seems close is [`id()`](https://github.com/pytorch/pytorch/blob/e782dc0a4e7e8a048de520bd45f1bfa969ed7e3a/c10/xpu/XPUStream.h#L89-L93) which returns a StreamId which is not directly interpretable by the user (for example on CUDA some part of it might be an index into the internal pool of streams used by pytorch).\n\n\n\ncc @NmomoN @mengpenghui @fwenguang @cdzhan @1274085042 @PHLens @albanD @guangyey @EikanWang",
    "url": "https://github.com/pytorch/pytorch/issues/170926",
    "state": "open",
    "labels": [
      "triaged",
      "module: PrivateUse1",
      "module: accelerator"
    ],
    "created_at": "2025-12-20T00:35:56Z",
    "updated_at": "2025-12-31T02:31:09Z",
    "comments": 3,
    "user": "mikaylagawarecki"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 2168,
    "title": "Wrong commands in compiler_toolkit  .md?",
    "body": "### Bug description\n\nThe commands in the readme page of https://github.com/pytorch/torchtitan/tree/main/torchtitan/experiments/compiler_toolkit are wrong? \nOnly the first flex_attention command has `--model.flavor=debugmodel_flex_attn`, the other three don't, and I don't see flex_attention ops in the graph modules if I don't specify the model.flavor.\n\n\n### Versions\n\nmain 1bd2548b14da014b1ec560830f8bdefb6ca568f4 ",
    "url": "https://github.com/pytorch/torchtitan/issues/2168",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-19T23:25:19Z",
    "updated_at": "2025-12-19T23:31:37Z",
    "comments": 2,
    "user": "yushangdi"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31044,
    "title": "[CI Failure]: Blackwell Fusion Tests",
    "body": "### Name of failing test\n\nFAILED tests/compile/test_fusion_attn.py::test_attention_quant_pattern[AttentionBackendEnum.TRITON_ATTN-nvidia/Llama-4-Scout-17B-16E-Instruct-FP8-TestAttentionFp8StaticQuantPatternModel--quant_fp8-dtype1-533-128-40-8] - AssertionError: Tensor-likes are not close!\n\n### Basic information\n\n- [x] Flaky test\n- [ ] Can reproduce locally\n- [ ] Caused by external libraries (e.g. bug in `transformers`)\n\n### \ud83e\uddea Describe the failing test\n\nOn B200:\n\nFAILED tests/compile/test_fusion_attn.py::test_attention_quant_pattern[AttentionBackendEnum.TRITON_ATTN-nvidia/Llama-4-Scout-17B-16E-Instruct-FP8-TestAttentionFp8StaticQuantPatternModel--quant_fp8-dtype1-533-128-40-8] - AssertionError: Tensor-likes are not close!\n\n```bash\npytest -v -x tests/compile/test_fusion_attn.py::test_attention_quant_pattern\n```\n\n### \ud83d\udcdd History of failing test\n\nx\n\n### CC List.\n\nx",
    "url": "https://github.com/vllm-project/vllm/issues/31044",
    "state": "open",
    "labels": [
      "help wanted",
      "torch.compile",
      "ci-failure"
    ],
    "created_at": "2025-12-19T18:49:59Z",
    "updated_at": "2025-12-26T21:58:25Z",
    "comments": 3,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31043,
    "title": "[BugFix]: move torch.Size across graphs in split_graph",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nWhen fixing a moe x cudagraph issue (see #30914), we found that `split_graph` may generate a submodule that returns a torch.Size and later another submodule that takes torch.Size. This errors since pt2 somehow does not support `torch.Size` as output yet. \n\nOne fix is to manually reorder some lines in the model code to avoid this split happen between getting the `torch.Size` and using it. But this is too intrusive and requires manual efforts on many models.\n\nA more automated approach is to have a graph pass in `split_graph` to move the torch.Size a bit to avoid patterns like\n\n```\n# Old:\nsize = tensor_a.shape\nsome_cg_unsafe_op\ntensor_b = tensor_b.view(size)\n```\n---->\n\n```\n# New:\nsome_cg_unsafe_op\nsize = tensor_a.shape\ntensor_b = tensor_b.view(size)\n```\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31043",
    "state": "open",
    "labels": [
      "help wanted",
      "feature request",
      "torch.compile"
    ],
    "created_at": "2025-12-19T18:24:58Z",
    "updated_at": "2025-12-22T21:23:04Z",
    "comments": 1,
    "user": "BoyuanFeng"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31039,
    "title": "[Feature]: Integrate Sonic MoE",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nhttps://x.com/wentaoguo7/status/2001773245318541324?s=46&t=jLcDgQXDbYe6HgFmTNYgpg\nhttps://github.com/Dao-AILab/sonic-moe\n\nCurious to see benchmarks!\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31039",
    "state": "open",
    "labels": [
      "help wanted",
      "good first issue",
      "feature request"
    ],
    "created_at": "2025-12-19T17:29:59Z",
    "updated_at": "2026-01-04T14:10:21Z",
    "comments": 4,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15481,
    "title": "[Bug] Seeded Deterministic/Batch Invariant Inference Not Working on v1/completions endpoint",
    "body": "### Checklist\n\n- [x] I searched related issues but found no solution.\n- [x] The bug persists in the latest version.\n- [x] Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.\n- [x] If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [x] Please use English. Otherwise, it will be closed.\n\n### Describe the bug\n\nI\u2019m trying to enable batch-invariant (deterministic) inference while serving SGLang behind an OpenAI API-compatible interface.\n\nDeterministic inference docs: https://docs.sglang.io/advanced_features/deterministic_inference.html\n\n## What works\n\nThe native /generate endpoint correctly varies output by seed and is repeatable per seed.\n\nExample request:\n\nPOST {base}/generate\n```json\n{\n  \"text\": \"generate a uuid. UUID:\",\n  \"sampling_params\": {\n    \"temperature\": 1,\n    \"max_new_tokens\": 32,\n    \"sampling_seed\": 0\n  }\n}\n```\n\nBehavior: changing sampling_seed changes the output; repeating with the same sampling_seed reproduces it.\n\n## What doesn\u2019t work\n\nOn the OpenAI-compatible endpoint POST {base}/v1/completions, seed appears to have no effect (even with temperature=1 and top_p=1).\n\nExample:\n\nPOST {base}/v1/completions\n```json\n{\n  \"model\": \"Qwen/Qwen3-30B-A3B\",\n  \"prompt\": \"generate a uuid. UUID: \",\n  \"max_tokens\": 32,\n  \"temperature\": 1,\n  \"top_p\": 1,\n  \"n\": 1,\n  \"seed\": 0\n}\n```\n\nBehavior: response is the same regardless of seed value.\n\nExpected behavior\n\nWith --enable-deterministic-inference, I expected the OpenAI-compatible endpoints to:\n* honor seed as the sampling seed (analogous to sampling_seed), and\n* remain deterministic/repeatable for the same (prompt, params, seed).\n\n### Reproduction\n\nServer launch:\n\n```bash\nexec python3 -m sglang.launch_server \\\n  --model-path \"Qwen/Qwen3-30B-A3B\" \\\n  --host 0.0.0.0 \\\n  --port 8000 \\\n  --tp \"1\" \\\n  --attention-backend \"triton\" \\\n  --context-length \"32000\" \\\n  --trust-remote-code \\\n  --enable-deterministic-inference\n```\n\nPOST {base}/v1/completions\n```json\n{\n  \"model\": \"Qwen/Qwen3-30B-A3B\",\n  \"prompt\": \"generate a uuid. UUID: \",\n  \"max_tokens\": 32,\n  \"temperature\": 1,\n  \"top_p\": 1,\n  \"n\": 1,\n  \"seed\": 0\n}\n```\n\nvarying the seed results in same output\n\n### Environment\n\n==========\n== CUDA ==\n==========\nCUDA Version 12.9.1\nContainer image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\nThis container image and its contents are governed by the NVIDIA Deep Learning Container License.\nBy pulling and using the container, you accept the terms and conditions of this license:\nhttps://developer.nvidia.com/ngc/nvidia-deep-learning-container-license\nA copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.\nAuto-detected 1 GPU(s)\nPython: 3.12.3 (main, Nov  6 2025, 13:44:16) [GCC 13.3.0]\nCUDA available: True\nGPU 0: NVIDIA RTX PRO 6000 Blackwell Server Edition\nGPU 0 Compute Capability: 12.0\nCUDA_HOME: /usr/local/cuda\nNVCC: Cuda compilation tools, release 12.9, V12.9.86\nCUDA Driver Version: 580.105.08\nPyTorch: 2.9.1+cu129\nsglang: 0.5.6.post2\nsgl_kernel: 0.3.19\nflashinfer_python: 0.5.3\nflashinfer_cubin: 0.5.3\nflashinfer_jit_cache: Module Not Found\ntriton: 3.5.1\ntransformers: 4.57.1\ntorchao: 0.9.0\nnumpy: 2.3.5\naiohttp: 3.13.2\nfastapi: 0.124.2\nhf_transfer: 0.1.9\nhuggingface_hub: 0.36.0\ninteregular: 0.3.3\nmodelscope: 1.33.0\norjson: 3.11.5\noutlines: 0.1.11\npackaging: 25.0\npsutil: 7.1.3\npydantic: 2.12.5\npython-multipart: 0.0.20\npyzmq: 27.1.0\nuvicorn: 0.38.0\nuvloop: 0.22.1\nvllm: Module Not Found\nxgrammar: 0.1.27\nopenai: 2.6.1\ntiktoken: 0.12.0\nanthropic: 0.75.0\nlitellm: Module Not Found\ndecord2: 2.0.0\nNVIDIA Topology:\n\t\u001b[4mGPU0\tNIC0\tCPU Affinity\tNUMA Affinity\tGPU NUMA ID\u001b[0m\nGPU0\t X \tSYS\t0-63,128-191\t0\t\tN/A\nNIC0\tSYS\t X\nLegend:\n  X    = Self\n  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)\n  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node\n  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)\n  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)\n  PIX  = Connection traversing at most a single PCIe bridge\n  NV#  = Connection traversing a bonded set of # NVLinks\nNIC Legend:\n  NIC0: mlx5_bond_0\nulimit soft: 1024",
    "url": "https://github.com/sgl-project/sglang/issues/15481",
    "state": "closed",
    "labels": [
      "bug",
      "high priority"
    ],
    "created_at": "2025-12-19T15:04:26Z",
    "updated_at": "2025-12-20T04:32:15Z",
    "comments": 8,
    "user": "jamesheavey"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2684,
    "title": "How to manually push a dataset",
    "body": "Say you `lerobot-record` a dataset with the flag `--dataset.push_to_hub=False`, or you encounter any problem at uploading time.\n\nIs using `hf upload` enough, or does `lerobot` datasets need additional stuff?",
    "url": "https://github.com/huggingface/lerobot/issues/2684",
    "state": "open",
    "labels": [
      "documentation",
      "question",
      "dataset"
    ],
    "created_at": "2025-12-19T13:00:20Z",
    "updated_at": "2025-12-19T15:41:42Z",
    "user": "mcres"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31023,
    "title": "[Doc]: FP8 KV Cache: Does softmax output multiply with FP8 V directly or after dequantization?",
    "body": "### \ud83d\udcda The doc issue\n\nhttps://docs.vllm.ai/en/v0.8.5.post1/features/quantization/quantized_kvcache.html\nQuestion:\nIn the FP8 KV Cache implementation, after computing attention scores and softmax at higher precision (FP16/BF16), is the resulting attention weight matrix:\nQuantized to FP8 and multiplied directly with FP8 V cache, or\nMultiplied with V cache after dequantizing V to higher precision?\nThe documentation mentions \"no fused dequantization and attention operations yet\" but doesn't specify the precision of this final multiplication. Clarifying this detail would help understand the accuracy-performance tradeoff.\nThanks!\n\n\n### Suggest a potential alternative/fix\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31023",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-12-19T10:33:22Z",
    "updated_at": "2025-12-22T00:41:38Z",
    "comments": 0,
    "user": "jorjiang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 170867,
    "title": "Operator benchmark: option to measure GPU execution time only (less CPU noise)",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHello,\n\n[Operator benchmark](https://github.com/pytorch/pytorch/tree/main/benchmarks/operator_benchmark) currently measures time in a way that [could be prone to CPU noise](https://github.com/pytorch/pytorch/blob/eba9265a580c6dc3e928ef341c23cab96ccf8b07/benchmarks/operator_benchmark/benchmark_core.py#L350). Is it possible to only measure GPU execution time using `torch.cuda.Event`?\nIf this change is made, this benchmark can be used more robustly for detecting possible regressions across updates, since it would produce more repeatable results.\n\n### Alternatives\n\n* Make the time-measuring code leaner, primarily measuring time spent on the GPU using `torch.cuda.Event` (with appropriate synchronization)..\n* Currently, each operator has a separate file and its settings are [hardcoded in separate files](https://github.com/pytorch/pytorch/blob/999d94b5ede5f4ec111ba7dd144129e2c2725b03/benchmarks/operator_benchmark/pt/as_strided_test.py#L10). We could instead define all operators in a single file, similar to something like:\n```\nop_defs = {\n    \"add\": {\n        \"init\": lambda input_dict: {\n            \"input1\": torch.rand(input_dict[\"shape\"], dtype=getattr(torch, input_dict[\"dtype\"]), device=\"cuda\"),\n            \"input2\": torch.rand(input_dict[\"shape\"], dtype=getattr(torch, input_dict[\"dtype\"]), device=\"cuda\"),\n            },\n        \"func\": lambda input_dict: input_dict[\"input1\"] + input_dict[\"input2\"],\n    },\n```\n\n### Additional context\n\n_No response_\n\ncc @robieta @chaekit @guotuofeng @guyang3532 @dzhulgakov @davidberard98 @briancoutinho @sraikund16 @sanrise @mwootton",
    "url": "https://github.com/pytorch/pytorch/issues/170867",
    "state": "open",
    "labels": [
      "oncall: profiler"
    ],
    "created_at": "2025-12-19T10:31:38Z",
    "updated_at": "2025-12-20T22:52:15Z",
    "comments": 0,
    "user": "apakbin"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31019,
    "title": "[Bug]: Qwen3-VL 2:4 sparsity llm-compressor RuntimeError: shape mismatch (0.12, 0.13rc2)",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.3 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.3 (main, Nov  6 2025, 13:44:16) [GCC 13.3.0] (64-bit runtime)\nPython platform              : Linux-6.14.0-1017-azure-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : GPU 0: NVIDIA H100 NVL\nNvidia driver version        : 580.95.05\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           48 bits physical, 48 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  40\nOn-line CPU(s) list:                     0-39\nVendor ID:                               AuthenticAMD\nModel name:                              AMD EPYC 9V84 96-Core Processor\nCPU family:                              25\nModel:                                   17\nThread(s) per core:                      1\nCore(s) per socket:                      40\nSocket(s):                               1\nStepping:                                1\nBogoMIPS:                                4800.09\nFlags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves user_shstk avx512_bf16 clzero xsaveerptr rdpru arat avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm\nHypervisor vendor:                       Microsoft\nVirtualization type:                     full\nL1d cache:                               1.3 MiB (40 instances)\nL1i cache:                               1.3 MiB (40 instances)\nL2 cache:                                40 MiB (40 instances)\nL3 cache:                                160 MiB (5 instances)\nNUMA node(s):                            1\nNUMA node0 CPU(s):                       0-39\nVulnerability Gather data sampling:      Not affected\nVulnerability Ghostwrite:                Not affected\nVulnerability Indirect target selection: Not affected\nVulnerability Itlb multihit:             Not affected\nVulnerability L1tf:                      Not affected\nVulnerability Mds:                       Not affected\nVulnerability Meltdown:                  Not affected\nVulnerability Mmio stale data:           Not affected\nVulnerability Reg file data sampling:    Not affected\nVulnerability Retbleed:                  Not affected\nVulnerability Spec rstack overflow:      Vulnerable: Safe RET, no microcode\nVulnerability Spec store bypass:         Vulnerable\nVulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:                Mitigation; Retpolines; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected\nVulnerability Srbds:                     Not affected\nVulnerability Tsa:                       Vulnerable: Clear CPU buffers attempted, no microcode\nVulnerability Tsx async abort:           Not affected\nVulnerability Vmscape:                   Not affected\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-python==0.5.3\n[pip3] numpy==2.2.6\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime",
    "url": "https://github.com/vllm-project/vllm/issues/31019",
    "state": "open",
    "labels": [
      "bug",
      "help wanted",
      "good first issue"
    ],
    "created_at": "2025-12-19T09:18:00Z",
    "updated_at": "2025-12-24T12:16:01Z",
    "comments": 4,
    "user": "SorenDreano"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31016,
    "title": "[Bug]: FlashInfer Incompatible with Sleep Mode",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nHere is a script to reproduce the bug: \nI use vllm=v0.10.1 and flashinfer-python=v0.5.3.\n```\nfrom vllm import LLM, SamplingParams\n\nif __name__ == \"__main__\":\n    model_pth = \"xxx/Qwen3-1.7B\"  \n    tp_size = 1\n    llm = LLM(\n        model=model_pth, \n        enable_sleep_mode=True,\n        tensor_parallel_size=tp_size,\n        gpu_memory_utilization=0.7, \n    )\n\n    llm.sleep(level=1)\n    llm.wake_up()\n\n    prompts = [\n        \"What is AI?\", \n        \"Where is the Machu Picchu located?\", \n        \"What is the capital of France?\",\n        \"Who painted the Mona Lisa?\",\n    ]\n\n    sampling_params = SamplingParams(\n        temperature=0.7,\n        top_p=0.9,\n        max_tokens=64,\n    )\n\n    outputs = llm.generate(prompts, sampling_params)\n\n    for i, out in enumerate(outputs):\n        prompt = prompts[i]\n        generated = out.outputs[0].text\n        print(f\"Prompt {i}: {prompt!r}\")\n        print(f\"Generation: {generated}\\n\")\n ```\n\n### Root Cause\nThe bug occurs because the FlashInfer backend\u2019s `attn_metadata` is stateful. It holds a `block_table_arange` tensor that is initialized once and then reused across subsequent calls to `build`:\n\n```python\nself.block_table_arange = torch.arange(\n    max_num_pages_per_req,\n    dtype=torch.int32,\n    device=self.device,\n)\n```\n\nThis `block_table_arange` tensor is allocated in the mempool with the `\"kv_cache\"` tag. It gets discarded after calling `llm.sleep`, but is not recreated when the engine wakes up, which leads to incorrect values and thus wrong outputs.\n\nSpecifically, this will cause bad rollout outputs in VERL using vllm + flashinfer.\n\n### Temporary Fix\nHere is a patch as a temporary workaround. It\u2019s not an ideal solution, but it works:\n\n```python\nfrom vllm.v1.attention.backends.flashinfer import FlashInferMetadataBuilder\nimport torch\n\ndef patch_flashinfer_build():\n    old_build = FlashInferMetadataBuilder.build\n\n    def new_build(*args, **kwargs):\n        self = args[0]\n        max_num_pages_per_req = self.block_table_arange.numel()\n        self.block_table_arange.copy_(\n            torch.arange(\n                max_num_pages_per_req,\n                device=self.block_table_arange.device,\n                dtype=self.block_table_arange.dtype,\n            )\n        )\n        return old_build(*args, **kwargs)\n\n    FlashInferMetadataBuilder.build = new_build\n\npatch_flashinfer_build()\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31016",
    "state": "open",
    "labels": [
      "bug",
      "help wanted"
    ],
    "created_at": "2025-12-19T08:04:19Z",
    "updated_at": "2025-12-19T23:17:47Z",
    "comments": 1,
    "user": "xiaoxiaosuaxuan"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1490,
    "title": "Example models for each pipeline",
    "body": "### Question\n\nRight now, I sorta use the docs and some searches to find good default models for https://workglow.dev/ for each pipeline that transformerjs has to offer. But they are not really the best, either in size or performance.\n\nIt would be great to have a list for each pipeline for fast and effective, best of breed, and a workhorse that is in between. Like a good, better, best.",
    "url": "https://github.com/huggingface/transformers.js/issues/1490",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-12-19T07:37:16Z",
    "updated_at": "2025-12-19T17:41:01Z",
    "user": "sroussey"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 31004,
    "title": "[New Model]: T5Gemma 2",
    "body": "### The model to consider.\n\nhttps://huggingface.co/collections/google/t5gemma-2\n\n\n### The closest model vllm already supports.\n\n_No response_\n\n### What's your difficulty of supporting the model you want?\n\nI know vLLM dropped encoder-decoder support, but can we bring it back?\n\nhttps://huggingface.co/docs/transformers/model_doc/t5gemma2\nhttps://blog.google/technology/developers/t5gemma-2/\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/31004",
    "state": "open",
    "labels": [
      "new-model"
    ],
    "created_at": "2025-12-19T03:55:00Z",
    "updated_at": "2025-12-20T21:37:34Z",
    "comments": 1,
    "user": "ducviet00-h2"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15443,
    "title": "SGLang Diffusion Cookbook Proposal",
    "body": "# \ud83c\udfa8 [Community Contribution] Create SGLang Diffusion Models Cookbook\n\n## \ud83c\udfaf Goal\nCreate a comprehensive cookbook for diffusion models in SGLang, demonstrating SGLang's performance advantages for image and video generation workloads.\n\n## \ud83d\udccb Scope\n\n### Models to Cover\n\n**Image Generation:**\n- Flux-1 Dev\n- Flux-2  \n- SDXL-Turbo\n- Qwen Image Edit\n\n**Video Generation:**\n- Wan 2.1\n- Wan 2.2\n\n### Content Structure\n\nEach model section includes:\n1. **Model Introduction**\n   - Capabilities and use cases\n   - Resolution/quality specifications\n   - Style examples and output samples\n   - Links to official resources\n\n2. **SGLang Deployment**\n   - One-command server launch\n   - Client usage example\n   - Model-specific optimization tips\n\n3. **Performance Benchmarks**\n   - Throughput (images/sec or videos/min)\n   - Latency and memory usage\n   - Comparison: SGLang vs Diffusers vs ComfyUI\n   - Bar charts and scaling analysis\n   - Reproducible benchmark scripts\n\n## \ud83d\udce6 Deliverables\n```\ncookbook/diffusion/\n\u251c\u2500\u2500 README.md              # Main cookbook\n\u251c\u2500\u2500 examples/              # Usage scripts per model\n\u2502   \u251c\u2500\u2500 flux1_basic.py\n\u2502   \u251c\u2500\u2500 sdxl_turbo.py\n\u2502   \u251c\u2500\u2500 wan21_video.py\n\u2502   \u2514\u2500\u2500 ...\n\u251c\u2500\u2500 benchmarks/\n\u2502   \u251c\u2500\u2500 bench_image.py\n\u2502   \u251c\u2500\u2500 bench_video.py\n\u2502   \u251c\u2500\u2500 compare_backends.py\n\u2502   \u2514\u2500\u2500 run_all.sh\n\u2514\u2500\u2500 assets/\n    \u2514\u2500\u2500 output_examples/   # Curated generation examples\n```\n\n## \ud83d\ude80 Timeline\n\n**Phase 1 (Weeks 1-2):** MVP with Flux-1 + SDXL-Turbo  \n**Phase 2 (Weeks 3-4):** Add remaining image models  \n**Phase 3 (Weeks 5-6):** Video models + comprehensive benchmarks  \n\n## \ud83d\udcaa How to Contribute\n\nWe need help with:\n\n### Required Contributors (2-3 people)\n- [ ] **Benchmark Engineer**: Run performance tests on H100/A100\n  - Time commitment: ~10 hours/week for 4 weeks\n  - Requirements: GPU access, Python proficiency\n  \n- [ ] **Documentation Writer**: Create usage examples and guides\n  - Time commitment: ~8 hours/week for 4 weeks\n  - Requirements: Technical writing, SGLang familiarity\n\n- [ ] **Visual Designer** (optional): Curate output examples\n  - Time commitment: ~5 hours/week for 2 weeks\n  - Requirements: Eye for quality, prompt engineering\n\n### Hardware Requirements\n- H100 (80GB) - primary testing platform\n- A100 (40GB) - secondary platform (optional)\n- Access via cloud providers acceptable (AWS/Lambda/RunPod)\n\n## \ud83d\udcdd Contribution Process\n\n1. **Comment below** if interested (mention which role)\n2. **Join discussion** on implementation details\n3. **Fork repo** and work on assigned section\n4. **Submit PR** following SGLang cookbook standards\n5. **Iterate** based on review feedback\n\n## \ud83d\udd17 References\n\n- [SGLang Cookbook Template](https://cookbook.sglang.io/)\n- [DeepSeek-V3 Example](https://cookbook.sglang.io/docs/DeepSeek/DeepSeek-V3_2)\n- [Wan 2.1 GitHub](https://github.com/Wan-Video/Wan2.1)\n- [SGLang Documentation](https://docs.sglang.ai/)\n\n## \u2753 Questions?\n\n**Q: I only have consumer GPUs (4090/3090), can I help?**  \nA: Yes! You can help with documentation, examples, or testing the 1.3B Wan model. You can reach out @Richardczl98 for requesting additional GPUs\n\n**Q: Which video model should we prioritize first?**  \nA: Wan 2.1 - it's the most mature open-source option.\n\n**Q: Do I need to know SGLang internals?**  \nA: No, just familiarity with diffusion models and Python.\n\n---\n\n**Ready to contribute?** Drop a comment below! \ud83d\ude80\n\ncc @mickqian @Qiaolin-Yu @yhyang201 ",
    "url": "https://github.com/sgl-project/sglang/issues/15443",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-19T03:44:33Z",
    "updated_at": "2025-12-23T13:09:31Z",
    "comments": 1,
    "user": "Richardczl98"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30969,
    "title": "[Bug]: SmolLM3-3B FP8 Fails to Load [`compressed-tensors` and `transformers-impl` compatibility issue]",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\nRunning in official Docker image: vllm/vllm-openai:v0.11.1\nGPU: NVIDIA L4 (GCP g2-standard-8)\n`| NVIDIA-SMI 570.195.03             Driver Version: 570.195.03     CUDA Version: 12.9     |`\nvLLM version: 0.11.1\n\n```text\n0.11.1\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nvLLM v0.11.1 fails to load SmolLM3-3B FP8 quantized models with llm-compressor using compressed-tensors.\nSame models work on v0.11.0.\n\nTested with:\n- [huggingface.co/RedHatAI/SmolLM3-3B-FP8-dynamic](https://huggingface.co/RedHatAI/SmolLM3-3B-FP8-dynamic)\n- Manually quantized fine tuned [SmolLM3-3B](https://huggingface.co/HuggingFaceTB/SmolLM3-3B) using llmcompressor==0.7 (compressed-tensors==0.12.2) in FP8-dynamic\n- Manually quantized fine tuned [SmolLM3-3B(https://huggingface.co/HuggingFaceTB/SmolLM3-3B) using llmcompressor==0.8.1 (compressed-tensors==0.12.2) in FP8-dynamic\n\nAll fail on v0.11.1.\nAll work on v0.11.0.\n\nError occurs during model loading in find_matched_target function.\nThe error is: \"Unable to find matching target for model.layers.0.self_attn.q_proj in the compressed-tensors config\"\n\nComplete error\n```\n+ exec python3 -m vllm.entrypoints.openai.api_server --model RedHatAI/SmolLM3-3B-FP8-dynamic --port 8000 --trust-remote-code --max-model-len 5000\n[APIServer pid=1] INFO 12-12 05:05:29 [api_server.py:1772] vLLM API server version 0.11.1\n[APIServer pid=1] INFO 12-12 05:05:29 [utils.py:253] non-default args: {'model': 'RedHatAI/SmolLM3-3B-FP8-dynamic', 'trust_remote_code': True, 'max_model_len': 5000}\n[APIServer pid=1] The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.\n[APIServer pid=1] INFO 12-12 05:05:40 [model.py:637] Resolved architecture: SmolLM3ForCausalLM\n[APIServer pid=1] INFO 12-12 05:05:40 [model.py:1750] Using max model len 5000\n[APIServer pid=1] INFO 12-12 05:05:42 [scheduler.py:228] Chunked prefill is enabled with max_num_batched_tokens=2048.\n[EngineCore_DP0 pid=37] INFO 12-12 05:05:54 [core.py:93] Initializing a V1 LLM engine (v0.11.1) with config: model='RedHatAI/SmolLM3-3B-FP8-dynamic', quantization=compressed-tensors\n[EngineCore_DP0 pid=37] INFO 12-12 05:05:55 [parallel_state.py:1200] world_size=1 rank=0 local_rank=0 distributed_init_method=tcp://10.111.66.205:48123 backend=nccl\n[EngineCore_DP0 pid=37] INFO 12-12 05:05:55 [parallel_state.py:1408] rank 0 in world size 1 is assigned as DP rank 0, PP rank 0, PCP rank 0, TP rank 0, EP rank 0\n[EngineCore_DP0 pid=37] INFO 12-12 05:05:55 [gpu_model_runner.py:3467] Starting to load model RedHatAI/SmolLM3-3B-FP8-dynamic...\n[EngineCore_DP0 pid=37] INFO 12-12 05:05:56 [base.py:121] Using Transformers modeling backend.\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843] EngineCore failed to start.\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843] Traceback (most recent call last):\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]   File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py\", line 834, in run_engine_core\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]     engine_core = EngineCoreProc(*args, **kwargs)\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]   File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py\", line 610, in __init__\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]   File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py\", line 102, in __init__\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]     super().__init__(\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]   File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/executor/abstract.py\", line 101, in __init__\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]     self.model_executor = executor_class(vllm_config)\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]   File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/executor/uniproc_executor.py\", line 48, in _init_executor\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]     self._init_executor()\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]   File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_worker.py\", line 273, in load_model\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]     self.driver_worker.load_model()\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]   File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_model_runner.py\", line 3484, in load_model\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]     self.model_runner.load_model(eep_scale_up=eep_scale_up)\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]   File \"/usr/local/lib/python3.12/dist-packages/vllm/model_executor/model_loader/base_loader.py\", line 49, in load_model\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [core.py:843]     self.model = model_loader.load_model(\n[EngineCore_DP0 pid=37] ERROR 12-12 05:05:56 [cor",
    "url": "https://github.com/vllm-project/vllm/issues/30969",
    "state": "closed",
    "labels": [
      "bug",
      "help wanted",
      "good first issue"
    ],
    "created_at": "2025-12-18T14:36:30Z",
    "updated_at": "2025-12-20T21:54:47Z",
    "comments": 3,
    "user": "GauthierRoy"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2680,
    "title": "Invalid frame index when training on merged datasets [RuntimeError]",
    "body": "### Ticket Type\n\n\ud83d\udc1b Bug Report (Something isn't working)\n\n### Environment & System Info\n\n```Shell\n- LeRobot version: 0.4.3\n- Platform: Linux-5.4.0-165-generic-x86_64-with-glibc2.35\n- Python version: 3.10.12\n- Huggingface Hub version: 0.35.3\n- Datasets version: 4.1.1\n- Numpy version: 2.2.6\n- FFmpeg version: 4.4.2-0ubuntu0.22.04.1\n- PyTorch version: 2.7.1+cu126\n- Is PyTorch built with CUDA support?: True\n- Cuda version: 12.6\n- GPU model: Quadro RTX 6000\n- Using GPU in script?: <fill in>\n- lerobot scripts: ['lerobot-calibrate', 'lerobot-dataset-viz', 'lerobot-edit-dataset', 'lerobot-eval', 'lerobot-find-cameras', 'lerobot-find-joint-limits', 'lerobot-find-port', 'lerobot-imgtransform-viz', 'lerobot-info', 'lerobot-record', 'lerobot-replay', 'lerobot-setup-motors', 'lerobot-teleoperate', 'lerobot-train']\n```\n\n### Description\n\nI'm having a problem when training a VLA with `lerobot-train` on a merged dataset.\nI'm aware of the issue #2627 as well as PR #2550 that is supposed to fix the bug.\nHowever, the problem is still occurring on the latest commit (4a151a9) of lerobot 0.4.3.\n\nThe dataset has been merged with the following script:\n`lerobot-edit-dataset \\\n  --repo_id whosricky/so101-megamix-v1 \\\n  --operation.type merge \\\n  --operation.repo_ids \"['whosricky/so101_pick_red_cube_3cams', 'whosricky/so101_pick_blue_cube_3cams', 'whosricky/so101_pick_yellow_cube_3cams', 'whosricky/so101_pick_cube_reasoning_3cams', 'whosricky/so101_stacking_3cams', 'whosricky/so101_pickplace_red_cube_3cams', 'whosricky/so101_pickplace_all_red_cubes_3cams', 'whosricky/so101_sorting_cubes_3cams', 'whosricky/so101_pickplace_red_cubes_random_bowl_3cams']\" \\\n  --push_to_hub true `\n\nTraining on the single datasets works flawlessly. Training on the merged dataset results in an error.\n\nThe problematic sample seems to be #51 of \"whosricky/so101_pick_blue_cube_3cams\" due to the timestamp exceeding the default tolerance_s. \nHowever, the problem occurs only on the merged dataset and not on the single one.\n\n### Context & Reproduction\n\n```\nlerobot-train \\\n  --dataset.repo_id=whosricky/so101-megamix-v1 \\\n  --output_dir=outputs_xvla_megamix_v1/train/my_xvla \\\n  --job_name=xvla_training_megamix_v1 \\\n  --policy.path=lerobot/xvla-base \\\n  --policy.repo_id=whosricky/xvla-so101-megamix-v1 \\\n  --policy.private=true \\\n  --policy.dtype=bfloat16 \\\n  --num_workers=8 \\\n  --batch_size=8 \\\n  --steps=30000 \\\n  --eval_freq=5000 \\\n  --log_freq=100 \\\n  --save_freq=5000 \\\n  --policy.device=cuda \\\n  --policy.freeze_vision_encoder=false \\\n  --policy.freeze_language_encoder=false \\\n  --policy.train_policy_transformer=true \\\n  --policy.train_soft_prompts=true \\\n  --policy.action_mode=auto \\\n  --policy.num_image_views=3 \\\n  --policy.empty_cameras=0 \\\n  --rename_map='{\"observation.images.top\": \"observation.images.image\", \"observation.images.gripper\": \"observation.images.image2\", \"observation.images.front\": \"observation.images.empty_camera_0\"}' \\\n  --wandb.enable=true\n```\n\n### Relevant logs or stack trace\n\n```Shell\nWARNING:accelerate.utils.other:Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.\nINFO 2025-12-18 12:38:22 ot_train.py:164 {'batch_size': 8,\n 'checkpoint_path': None,\n 'dataset': {'episodes': None,\n             'image_transforms': {'enable': False,\n                                  'max_num_transforms': 3,\n                                  'random_order': False,\n                                  'tfs': {'affine': {'kwargs': {'degrees': [-5.0,\n                                                                            5.0],\n                                                                'translate': [0.05,\n                                                                              0.05]},\n                                                     'type': 'RandomAffine',\n                                                     'weight': 1.0},\n                                          'brightness': {'kwargs': {'brightness': [0.8,\n                                                                                   1.2]},\n                                                         'type': 'ColorJitter',\n                                                         'weight': 1.0},\n                                          'contrast': {'kwargs': {'contrast': [0.8,\n                                                                               1.2]},\n                                                       'type': 'ColorJitter',\n                                                       'weight': 1.0},\n                                          'hue': {'kwargs': {'hue': [-0.05,\n                                                                     0.05]},\n                                                  'type': 'ColorJitter',\n                                                  'weight': 1.0},\n                                          'saturation': {'kwargs': {'satur",
    "url": "https://github.com/huggingface/lerobot/issues/2680",
    "state": "open",
    "labels": [
      "bug",
      "question",
      "dataset",
      "visualization",
      "examples",
      "training"
    ],
    "created_at": "2025-12-18T13:29:50Z",
    "updated_at": "2025-12-26T06:26:37Z",
    "user": "RiccardoIzzo"
  },
  {
    "repo": "huggingface/trl",
    "number": 4719,
    "title": "Loss calculation of `GKDTrainer` may be inaccurate when performing gradient accumulation?",
    "body": "It seems that `GKDTrainer` averages the loss of tokens in a micro batch ahead?\n\nhttps://github.com/huggingface/trl/blob/8918c9836a3e0b43a6851c08d01b69072f56ca52/trl/experimental/gkd/gkd_trainer.py#L284",
    "url": "https://github.com/huggingface/trl/issues/4719",
    "state": "open",
    "labels": [
      "\ud83d\udc1b bug",
      "\ud83c\udfcb GKD"
    ],
    "created_at": "2025-12-18T12:50:05Z",
    "updated_at": "2025-12-18T12:50:49Z",
    "comments": 0,
    "user": "jue-jue-zi"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2679,
    "title": "Merging datasets removes fps from scalar features",
    "body": "### Ticket Type\n\n\ud83d\udc1b Bug Report (Something isn't working)\n\n### Environment & System Info\n\n```Shell\n- LeRobot version: 0.4.3\n- Platform: Linux-6.17.9-arch1-1-x86_64-with-glibc2.42\n- Python version: 3.12.11\n- Huggingface Hub version: 0.34.4\n- Datasets version: 4.1.1\n- Numpy version: 2.3.5\n- FFmpeg version: n8.0.1\n- PyTorch version: 2.7.1+cu128\n- Is PyTorch built with CUDA support?: True\n- Cuda version: 12.8\n- GPU model: NVIDIA GeForce RTX 5090 Laptop GPU\n- Using GPU in script?: <fill in>\n- lerobot scripts: ['lerobot-calibrate', 'lerobot-dataset-viz', 'lerobot-edit-dataset', 'lerobot-eval', 'lerobot-find-cameras', 'lerobot-find-joint-limits', 'lerobot-find-port', 'lerobot-imgtransform-viz', 'lerobot-info', 'lerobot-record', 'lerobot-replay', 'lerobot-setup-motors', 'lerobot-teleoperate', 'lerobot-train']\n```\n\n### Description\n\nWhen using the `merge_datasets` function, the fps attribute is removed from the scalar features in the dataset. Below are the scalar features from dataset.meta.features of a dataset before and after merging\n\nBefore:\n```\n'timestamp': {'dtype': 'float32', 'shape': (1,), 'names': None, 'fps': 10}, \n'frame_index': {'dtype': 'int64', 'shape': (1,), 'names': None, 'fps': 10}, \n'episode_index': {'dtype': 'int64', 'shape': (1,), 'names': None, 'fps': 10}, \n'index': {'dtype': 'int64', 'shape': (1,), 'names': None, 'fps': 10}, \n'task_index': {'dtype': 'int64', 'shape': (1,), 'names': None, 'fps': 10}}\n```\n\nAfter:\n```\n'timestamp': {'dtype': 'float32', 'shape': (1,), 'names': None}, \n'frame_index': {'dtype': 'int64', 'shape': (1,), 'names': None}, \n'episode_index': {'dtype': 'int64', 'shape': (1,), 'names': None}, \n'index': {'dtype': 'int64', 'shape': (1,), 'names': None}, \n'task_index': {'dtype': 'int64', 'shape': (1,), 'names': None}\n```\n\nThis creates subsequent problems when trying to add an additional dataset to a merged output as the feature mismatch will cause an error to be thrown \n\n### Context & Reproduction\n\nRunning the script below shows the features change before and after the merge\n\n```\nfrom lerobot.datasets.dataset_tools import split_dataset, merge_datasets\nfrom lerobot.datasets.lerobot_dataset import LeRobotDataset\nfrom pprint import pprint\n\ndataset = LeRobotDataset(\"lerobot/pusht\")\nfeat_1 = dataset.meta.features\nsplits = split_dataset(dataset, splits={\"train\": 0.8, \"val\": 0.2})\nmerged = merge_datasets([splits[\"train\"], splits[\"val\"]], output_repo_id=\"lerobot/pusht_merged\")\nfeat_2 = merged.meta.features\n\nprint(\"Features of original dataset:\")\npprint(feat_1)\nprint(\"Features of merged dataset:\")\npprint(feat_2)\n```\n\n### Relevant logs or stack trace\n\n```Shell\nFeatures of original dataset:\n{'action': {'dtype': 'float32',\n            'fps': 10.0,\n            'names': {'motors': ['motor_0', 'motor_1']},\n            'shape': (2,)},\n 'episode_index': {'dtype': 'int64', 'fps': 10.0, 'names': None, 'shape': (1,)},\n 'frame_index': {'dtype': 'int64', 'fps': 10.0, 'names': None, 'shape': (1,)},\n 'index': {'dtype': 'int64', 'fps': 10.0, 'names': None, 'shape': (1,)},\n 'next.done': {'dtype': 'bool', 'fps': 10.0, 'names': None, 'shape': (1,)},\n 'next.reward': {'dtype': 'float32', 'fps': 10.0, 'names': None, 'shape': (1,)},\n 'next.success': {'dtype': 'bool', 'fps': 10.0, 'names': None, 'shape': (1,)},\n 'observation.image': {'dtype': 'video',\n                       'names': ['height', 'width', 'channel'],\n                       'shape': (96, 96, 3),\n                       'video_info': {'has_audio': False,\n                                      'video.codec': 'av1',\n                                      'video.fps': 10.0,\n                                      'video.is_depth_map': False,\n                                      'video.pix_fmt': 'yuv420p'}},\n 'observation.state': {'dtype': 'float32',\n                       'fps': 10.0,\n                       'names': {'motors': ['motor_0', 'motor_1']},\n                       'shape': (2,)},\n 'task_index': {'dtype': 'int64', 'fps': 10.0, 'names': None, 'shape': (1,)},\n 'timestamp': {'dtype': 'float32', 'fps': 10.0, 'names': None, 'shape': (1,)}}\nFeatures of merged dataset:\n{'action': {'dtype': 'float32',\n            'fps': 10.0,\n            'names': {'motors': ['motor_0', 'motor_1']},\n            'shape': (2,)},\n 'episode_index': {'dtype': 'int64', 'names': None, 'shape': (1,)},\n 'frame_index': {'dtype': 'int64', 'names': None, 'shape': (1,)},\n 'index': {'dtype': 'int64', 'names': None, 'shape': (1,)},\n 'next.done': {'dtype': 'bool', 'fps': 10.0, 'names': None, 'shape': (1,)},\n 'next.reward': {'dtype': 'float32', 'fps': 10.0, 'names': None, 'shape': (1,)},\n 'next.success': {'dtype': 'bool', 'fps': 10.0, 'names': None, 'shape': (1,)},\n 'observation.image': {'dtype': 'video',\n                       'names': ['height', 'width', 'channel'],\n                       'shape': (96, 96, 3),\n                       'video_info': {'has_audio': False,\n                                      'video.codec': 'av1',\n                                      'video.fps': 10.0,\n          ",
    "url": "https://github.com/huggingface/lerobot/issues/2679",
    "state": "open",
    "labels": [
      "bug",
      "enhancement",
      "question",
      "dataset",
      "performance",
      "examples"
    ],
    "created_at": "2025-12-18T12:47:14Z",
    "updated_at": "2025-12-18T15:25:12Z",
    "user": "reeceomahoney"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30956,
    "title": "[Feature]: could output the given format logger ?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nhi,dear ,\ni have def the logger from py scripts ,etc, logger_utils.py \nand could i use shell run the command with the logger,\nsuch as ,\n`vllm serve qwen3-embedding-0.6b --logger_file logger_utils.py `\n\n\nthx \ni really need your help \nSOS ,thx \n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30956",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-12-18T09:35:22Z",
    "updated_at": "2025-12-19T01:52:41Z",
    "comments": 5,
    "user": "ucas010"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2678,
    "title": "Bug: lerobot-dataset-viz IndexError when visualizing specific episodes",
    "body": "# Bug Report: `lerobot-dataset-viz` IndexError when visualizing specific episodes\n\n## Description\n\nThe `lerobot-dataset-viz` command fails with an `IndexError` when trying to visualize a specific episode using the `--episode-index` parameter. The issue is caused by `EpisodeSampler` using global dataset indices while the dataset has been filtered to contain only the specified episode.\n\n## Error Message\n\n```\nIndexError: Invalid key: 180 is out of bounds for size 180\n```\n\nFull traceback:\n```\nTraceback (most recent call last):\n  File \"/path/to/lerobot/scripts/lerobot_dataset_viz.py\", line 289, in main\n    visualize_dataset(dataset, **vars(args))\n  File \"/path/to/lerobot/scripts/lerobot_dataset_viz.py\", line 148, in visualize_dataset\n    for batch in tqdm.tqdm(dataloader, total=len(dataloader)):\n  ...\n  File \"/path/to/lerobot/datasets/lerobot_dataset.py\", line 1028, in __getitem__\n    item = self.hf_dataset[idx]\n  ...\nIndexError: Invalid key: 180 is out of bounds for size 180\n```\n\n## Steps to Reproduce\n\n1. Create a LeRobot dataset with multiple episodes (e.g., 20 episodes, 180 frames each)\n2. Try to visualize episode 1:\n   ```bash\n   lerobot-dataset-viz \\\n       --repo-id lerobot/test \\\n       --root ./lerobot_dataset \\\n       --mode local \\\n       --episode-index 1 \\\n       --batch-size 2\n   ```\n3. Error occurs when trying to load the data\n\n## Root Cause Analysis\n\nThe bug is in the `EpisodeSampler` class (line 81-91 of `lerobot_dataset_viz.py`):\n\n```python\nclass EpisodeSampler(torch.utils.data.Sampler):\n    def __init__(self, dataset: LeRobotDataset, episode_index: int):\n        from_idx = dataset.meta.episodes[\"dataset_from_index\"][episode_index]  # 180\n        to_idx = dataset.meta.episodes[\"dataset_to_index\"][episode_index]      # 360\n        self.frame_ids = range(from_idx, to_idx)  # range(180, 360)\n```\n\n**The problem:**\n1. At line 287, the dataset is filtered: `dataset = LeRobotDataset(repo_id, episodes=[args.episode_index], ...)`\n2. The filtered dataset only contains 180 frames with **local indices 0-179**\n3. But `EpisodeSampler` uses indices from `dataset.meta.episodes` which are **global indices 180-359** (position in the full dataset)\n4. When DataLoader tries to access `dataset[180]`, it fails because the filtered dataset only has indices 0-179\n\n**Example:**\n```\nFull dataset (3600 frames):\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 Episode 0\u2502 Episode 1\u2502 Episode 2\u2502 ... \u2502 Episode 19\u2502\n\u2502  0-179   \u2502 180-359  \u2502 360-539  \u2502 ... \u2502 3420-3599\u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n              \u2191\n         Global indices\n\nFiltered dataset (180 frames, episode 1 only):\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 Episode 1\u2502  \u2190 Only these 180 frames exist\n\u2502  0-179   \u2502  \u2190 Local indices in filtered dataset\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nEpisodeSampler tries to use: range(180, 360)  \u2717 Out of bounds!\n```\n\n## Proposed Fix\n\nModify `EpisodeSampler` to handle filtered datasets:\n\n```python\nclass EpisodeSampler(torch.utils.data.Sampler):\n    def __init__(self, dataset: LeRobotDataset, episode_index: int):\n        # Check if dataset is already filtered to a single episode\n        if dataset.episodes is not None and len(dataset.episodes) == 1:\n            # Dataset is filtered, use all available frames (local indices)\n            self.frame_ids = range(len(dataset))\n        else:\n            # Dataset is not filtered, use global indices from metadata\n            from_idx = dataset.meta.episodes[\"dataset_from_index\"][episode_index]\n            to_idx = dataset.meta.episodes[\"dataset_to_index\"][episode_index]\n            self.frame_ids = range(from_idx, to_idx)\n\n    def __iter__(self) -> Iterator:\n        return iter(self.frame_ids)\n\n    def __len__(self) -> int:\n        return len(self.frame_ids)\n```\n\n## Workaround\n\nUntil this is fixed, users can visualize a specific episode by:\n\n1. Loading the full dataset without filtering\n2. Using `torch.utils.data.Subset` to select the episode\n\n```python\nimport rerun as rr\nfrom lerobot.datasets.lerobot_dataset import LeRobotDataset\nfrom torch.utils.data import DataLoader, Subset\n\n# Load full dataset (no filtering)\ndataset = LeRobotDataset(\n    repo_id=\"lerobot/test\",\n    root=\"./lerobot_dataset\"\n)\n\n# Manually select episode frames\nepisode_index = 1\nfrom_idx = dataset.meta.episodes[episode_index][\"dataset_from_index\"]\nto_idx = dataset.meta.episodes[episode_index][\"dataset_to_index\"]\nepisode_dataset = Subset(dataset, range(from_idx, to_idx))\n\n# Create dataloader\ndataloader = DataLoader(episode_dataset, batch_size=2, shuffle=False)\n\n# Visualize...\n```\n\n## Environment\n\n- **LeRobot Version:** 0.4.2\n- **Python Version:** 3.12.11\n- **PyTorch Version:** 2.7.1+cu126\n- **Datasets Version:** 4.1.1\n- **OS:** Linux\n\n## Additional Context\n\nThis issue affects any dataset where users want to visualize a specific episode that is not episode 0. The bug makes the `--episode-index` parameter effectively unusable for episodes other than the first one when the dataset has already been filtered.\n\n## Impact\n\n- **Severity:** Medium (cor",
    "url": "https://github.com/huggingface/lerobot/issues/2678",
    "state": "open",
    "labels": [
      "bug",
      "question",
      "dataset",
      "visualization",
      "python",
      "examples"
    ],
    "created_at": "2025-12-18T08:45:05Z",
    "updated_at": "2025-12-24T08:31:00Z",
    "user": "apeSh1t"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30941,
    "title": "[Performance]: Why Does Latency Remain Unchanged in vLLM 0.11.0 When Input Token Count Decreases for qwen3-vl-30b-a3b?",
    "body": "### Proposal to improve performance\n\n_No response_\n\n### Report of performance regression\n\n_No response_\n\n### Misc discussion on performance\n\nUsing vLLM version 0.11.0 to run the qwen3-vl-30b-a3b model, the stress test results show that although the number of input tokens decreases, the latency does not change.\n\nThe model is deployed on a single A800 GPU. The startup command is:\nvllm server\n--dtype bfloat16\n--max-model-len 128000\n--gpu-memory-utilization 0.95\n--limit-mm-per-prompt.video 0\n\nI performed a stress test using one image and a set of text prompts, with QPS set to 10.\nI resized the image to 0.25x and 0.7x of the original size while keeping everything else unchanged.\n\nThe conclusions are as follows:\nqwen3-30b-a3b (single image *0.25) latency 3s\nqwen3-30b-a3b (single image *0.7) latency 5s\nqwen3-30b-a3b (single image) latency 5s\n\nPrior conditions:\nInput token scale / Output token scale\nSingle image + text prompts: about 4200 / about 70\nSingle image *0.6 + text prompts: about 1900 / about 70\nSingle image *0.3 + text prompts: about 860 / about 70\n\n### Your current environment (if you think it is necessary)\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30941",
    "state": "open",
    "labels": [
      "performance"
    ],
    "created_at": "2025-12-18T07:40:35Z",
    "updated_at": "2025-12-18T07:40:35Z",
    "comments": 0,
    "user": "Hormoney"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 170750,
    "title": "CUDA: Tensor.index_select out-of-bounds index triggers device-side assert (Indexing.cu:1237) instead of a regular error",
    "body": "### \ud83d\udc1b Describe the bug\n\n### Bug description\nOn CUDA, calling `Tensor.index_select` with an out-of-bounds index triggers a device-side assert in `../aten/src/ATen/native/cuda/Indexing.cu:1237` (`indexSelectSmallIndex`), and then raises `RuntimeError: CUDA error: device-side assert triggered`.\n\nOn CPU, similar out-of-bounds indexing typically raises a regular Python exception (e.g. `IndexError` / \u201cindex out of range\u201d) without poisoning the CUDA context. On CUDA, the device-side assert is harsh and can cause subsequent CUDA ops to fail as well.\n\n### Minimal repro\n```python\nimport torch\n\n# out-of-bounds index on an empty tensor\nx = torch.empty((0,), device=\"cuda\")\nidx = torch.tensor([1], device=\"cuda\")  # OOB\nx.index_select(0, idx)\n\n# Force sync so the error is reported at the correct line\ntorch.cuda.synchronize()\n\n```\n### How to run\nCUDA_LAUNCH_BLOCKING=1 TORCH_SHOW_CPP_STACKTRACES=1 \\ python mini_repro.py\nIf symbolization hangs:TORCH_DISABLE_ADDR2LINE=1 CUDA_LAUNCH_BLOCKING=1 TORCH_SHOW_CPP_STACKTRACES=1 python \n\n### Expected behavior\nRaise a normal, non-fatal Python exception for out-of-bounds indices (similar to CPU behavior).\nAvoid a device-side assert that poisons the CUDA context.\n\n### Actual behavior\n../aten/src/ATen/native/cuda/Indexing.cu:1237: indexSelectSmallIndex: block: [0,0,0], thread: [0,0,0] Assertion `srcIndex < srcSelectDimSize` failed.\nTraceback (most recent call last):\n  File \"/home/lhj/callChainBuild/output/targeted_mutation/validation/minimal_code/torch_Tensor_index_select_repro.py\", line 5, in <module>\n    x.index_select(0, idx)\n**RuntimeError: CUDA error: device-side assert triggered**\nCompile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n\n### Traceback\n```\n../aten/src/ATen/native/cuda/Indexing.cu:1237: indexSelectSmallIndex: block: [0,0,0], thread: [0,0,0] Assertion `srcIndex < srcSelectDimSize` failed.\n[W Module.cpp:156] symbolizing C++ stack trace for exception; if this hangs, rerun with TORCH_DISABLE_ADDR2LINE=1...\n\nTraceback (most recent call last):\n  File \"/home/lhj/callChainBuild/output/targeted_mutation/validation/minimal_code/torch_Tensor_index_select_repro.py\", line 5, in <module>\n    x.index_select(0, idx)\nRuntimeError: CUDA error: device-side assert triggered\nCompile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n\nException raised from c10_cuda_check_implementation at ../c10/cuda/CUDAException.cpp:44 (most recent call first):\nC++ CapturedTraceback:\n#4 c10::Error::Error(c10::SourceLocation, std::string) from ??:0\n#5 c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) from ??:0\n#6 c10::cuda::c10_cuda_check_implementation(int, char const*, char const*, int, bool) from ??:0\n#7 at::native::(anonymous namespace)::index_select_out_cuda_impl<float>(at::Tensor&, at::Tensor const&, long, at::Tensor const&)::{lambda()#1}::operator()() const::{lambda()#2}::operator()() const from ??:0\n#8 void at::native::(anonymous namespace)::index_select_out_cuda_impl<float>(at::Tensor&, at::Tensor const&, long, at::Tensor const&) from ??:0\n#9 at::native::index_select_out_cuda(at::Tensor const&, long, at::Tensor const&, at::Tensor&) from ??:0\n#10 at::native::index_select_cuda(at::Tensor const&, long, at::Tensor const&) from ??:0\n#11 at::(anonymous namespace)::(anonymous namespace)::wrapper_CUDA__index_select(at::Tensor const&, long, at::Tensor const&) from RegisterCUDA.cpp:0\n#12 c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, long, at::Tensor const&), &at::(anonymous namespace)::(anonymous namespace)::wrappe\nr_CUDA__index_select>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, long, at::Tensor const&> >, at::Tensor (at::Tensor const&, long, at::Tensor const&)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, long, at::Tensor const&) from RegisterCUDA.cpp:0                                                                                                                                                                                       #13 at::_ops::index_select::redispatch(c10::DispatchKeySet, at::Tensor const&, long, at::Tensor const&) from ??:0\n#14 torch::autograd::VariableType::(anonymous namespace)::index_select(c10::DispatchKeySet, at::Tensor const&, long, at::Tensor const&) from VariableType_0.cpp:0\n#15 c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::DispatchKeySet, at::Tensor const&, long, at::Tensor const&), &torch::autograd::VariableType::(ano\nnymous namespace)::index_select>, at::Tensor, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor const&, long, at::Tensor const&> >, at::Tensor (c10::DispatchKeySet, at::Tensor const&, long, at::Tensor const&)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, long, at::Tensor const&) from VariableType_0.cpp:0                                         ",
    "url": "https://github.com/pytorch/pytorch/issues/170750",
    "state": "open",
    "labels": [
      "module: cuda",
      "triaged"
    ],
    "created_at": "2025-12-18T06:48:01Z",
    "updated_at": "2025-12-20T23:31:57Z",
    "comments": 0,
    "user": "DeLightor"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30933,
    "title": "[Usage]: What is the latest instruction to run DeepSeek V3.2?",
    "body": "### Your current environment\n\nvLLM 0.12.0\n\n### How would you like to use vllm\n\nI am following the guidelines here https://docs.vllm.ai/projects/recipes/en/latest/DeepSeek/DeepSeek-V3_2.html for running DeepSeek v3.2. By following the instructions I installed vLLM 0.12.0 on my H200 node. However, when I try to run it with `vllm serve deepseek-ai/DeepSeek-V3.2    --tensor-parallel-size 8    --tokenizer-mode deepseek_v32` it gives an error \n\n```\n(APIServer pid=816209) ValueError: No tokenizer registered for tokenizer_mode='deepseek_v32'. \n```\n\nIf I do not include the `--tokenizer-mode` then the server spins up with no errors, but when I try to send a request, I get another error below\n\n```\n(APIServer pid=753941) ERROR 12-18 06:04:47 [serving_chat.py:263] ValueError: As of transformers v4.44, default chat template is no longer allowed, so you must provide a chat template if the tokenizer does not define one.   \n```\n\nI am wondering if there is an update on the instructions to run DeepSeek V3.2 on vLLM.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30933",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-18T06:18:29Z",
    "updated_at": "2025-12-18T15:50:29Z",
    "comments": 1,
    "user": "IKACE"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30923,
    "title": "[Bug]: Use the offical doucment  vllm online method deploy DeepSeek-OCR\uff0cthe result is very bad . but I ust the offline method the result is normal. why ?",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nI use https://github.com/vllm-project/recipes/blob/main/DeepSeek/DeepSeek-OCR.md\nthe offline and online mehtod is work, run ok\u3002\nbut the same picture in offline is better than online,   I can't find the reason what happend ?  can someone help me \n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30923",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-18T04:14:33Z",
    "updated_at": "2025-12-18T04:25:20Z",
    "comments": 0,
    "user": "git-liweichao"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30922,
    "title": "[Bug]: Use the offical doucment  vllm online method deploy DeepSeek-OCR\uff0cthe result is very bad . but I ust the offline method the result is normal. why ?",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nI use https://github.com/vllm-project/recipes/blob/main/DeepSeek/DeepSeek-OCR.md\nthe offline and online mehtod is work, run ok\u3002\nbut the same picture in offline is better than online,   I can't find the reason what happend ?  can someone help me \n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30922",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-18T04:08:46Z",
    "updated_at": "2025-12-18T04:25:36Z",
    "comments": 1,
    "user": "git-liweichao"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15359,
    "title": "[Bug] The handling logic for tool_choice = 'auto' in the DeepseekV3.2 model may be incorrect.",
    "body": "### Checklist\n\n- [ ] I searched related issues but found no solution.\n- [ ] The bug persists in the latest version.\n- [ ] Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.\n- [ ] If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [ ] Please use English. Otherwise, it will be closed.\n\n### Describe the bug\n\nWhen using SGLang (sglang:v0.5.6.post2) with DeepseekV3.2, I noticed the response of some request which involves tool calls is not currect.\nlike the following requests\n```sh\ncurl -X POST http://{host}:{port}/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer sk-1234\" \\\n  -d '{\n    \"model\": \"DeepseekV3.2\",\n    \"messages\": [\n      {\n        \"role\": \"user\",\n        \"content\": \"What is the weather in Beijing?\"\n      }\n    ],\n    \"tools\": [\n      {\n        \"type\": \"function\",\n        \"function\": {\n          \"name\": \"get_current_weather\",\n          \"description\": \"Get the current weather in a given location\",\n          \"strict\": true,\n          \"parameters\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"location\": {\n                \"type\": \"string\",\n                \"description\": \"The city and state, e.g. San Francisco, CA\"\n              },\n              \"unit\": {\n                \"type\": \"string\",\n                \"enum\": [\"celsius\", \"fahrenheit\"]\n              }\n            },\n            \"required\": [\"location\"]\n          }\n        }\n      }\n    ],\n    \"tool_choice\": \"auto\",\n    \"stream\": false\n  }'\n``` \nmight response something like \n```sh\n{\"id\":\"88c2a168ad43446f9116aeed715cd835\",\"object\":\"chat.completion\",\"created\":1766024807,\"model\":\"DeepseekV3.2\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"tool_call_name=current_weather\",\"reasoning_content\":null,\"tool_calls\":null},\"logprobs\":null,\"finish_reason\":\"stop\",\"matched_stop\":1}],\"usage\":{\"prompt_tokens\":198,\"total_tokens\":206,\"completion_tokens\":8,\"prompt_tokens_details\":null,\"reasoning_tokens\":0},\"metadata\":{\"weight_version\":\"default\"}}\n```\nor\n```sh\n{\"id\":\"0223b02af05b4c9b99e8b9e4b2abab12\",\"object\":\"chat.completion\",\"created\":1766026261,\"model\":\"DeepseekV3.2\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"tool_call_name: get_current_weather\\ntool_call_arguments: {\\n  \\\"location\\\": \\\"Beijing, China\\\",\\n  \\\"unit\\\": \\\"celsius\\\"\\n}\",\"reasoning_content\":null,\"tool_calls\":null},\"logprobs\":null,\"finish_reason\":\"stop\",\"matched_stop\":1}],\"usage\":{\"prompt_tokens\":198,\"total_tokens\":232,\"completion_tokens\":34,\"prompt_tokens_details\":null,\"reasoning_tokens\":0},\"metadata\":{\"weight_version\":\"default\"}}\n```\nAs you can see from the response, the content value contains `tool_call_name` but tool_calls is set to `null`\n\nAnd if change tool_choice to 'required', the response looks like \n```sh\n{\"id\":\"550109a7f6854af3ba47fdad4f38f9d5\",\"object\":\"chat.completion\",\"created\":1766025639,\"model\":\"DeepseekV3.2\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":null,\"tool_calls\":[{\"id\":\"call_f171fbf82d7d41dab0eaf258\",\"index\":0,\"type\":\"function\",\"function\":{\"name\":\"get_current_weather\",\"arguments\":\"{\\\"location\\\": \\\"Beijing, China\\\", \\\"unit\\\": \\\"celsius\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\",\"matched_stop\":null}],\"usage\":{\"prompt_tokens\":198,\"total_tokens\":229,\"completion_tokens\":31,\"prompt_tokens_details\":null,\"reasoning_tokens\":0},\"metadata\":{\"weight_version\":\"default\"}}\n```\n\nand when checking the source codes, I find it might be related to the following codes\nhttps://github.com/sgl-project/sglang/blob/9e7656be80578fe981a723bd115373371a9d0d90/python/sglang/srt/entrypoints/openai/serving_chat.py#L248-L260\n\nhttps://github.com/sgl-project/sglang/blob/9e7656be80578fe981a723bd115373371a9d0d90/python/sglang/srt/function_call/function_call_parser.py#L189-L201\n\n\n### Reproduction\n\nstart SGLang with the following command\n```sh\npython3 -m sglang.launch_server --model /root/.cache/huggingface/DeepSeek-V3.2 --served-model-name VILLM-N2 --tp 8 --ep 8 --dp 8 --enable-dp-attention --trust-remote-code --port 30000 --host 0.0.0.0 --enable-metrics --mem-fraction-static 0.75 --cuda-graph-max-bs 128 --torch-compile-max-bs 8 --speculative-algorithm EAGLE --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4 --nsa-prefill-backend flashmla_sparse --nsa-decode-backend fa3 --grammar-backend xgrammar --reasoning-parser deepseek-v3 --tool-call-parser deepseekv32 --chat-template ./examples/chat_template/tool_chat_template_deepseekv32.jinja\n```\n\nsend request\n```sh\ncurl -X POST http://{host}:{port}/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer sk-1234\" \\\n  -d '{\n    \"model\": \"DeepseekV3.2\",\n    \"messages\": [\n      {\n        \"role\": \"user\",\n        \"content\": \"What is the weather in Beijing?\"\n      }\n    ],\n    \"tools\": [\n      ",
    "url": "https://github.com/sgl-project/sglang/issues/15359",
    "state": "closed",
    "labels": [],
    "created_at": "2025-12-18T02:47:26Z",
    "updated_at": "2025-12-18T03:36:38Z",
    "comments": 4,
    "user": "JerryKwan"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2673,
    "title": "Dataset v2 not working anymore",
    "body": "### Ticket Type\n\nFeature\n\n### Environment & System Info\n\n```Shell\n- LeRobot version: 0.4.3\n- Platform: macOS-26.2-arm64-arm-64bit\n- Python version: 3.10.19\n- Huggingface Hub version: 0.35.3\n- Datasets version: 4.1.1\n- Numpy version: 2.2.6\n- FFmpeg version: 7.1.1\n- PyTorch version: 2.7.1\n- Is PyTorch built with CUDA support?: False\n- Cuda version: N/A\n- GPU model: N/A\n- Using GPU in script?: <fill in>\n- lerobot scripts: ['lerobot-calibrate', 'lerobot-dataset-viz', 'lerobot-edit-dataset', 'lerobot-eval', 'lerobot-find-cameras', 'lerobot-find-joint-limits', 'lerobot-find-port', 'lerobot-imgtransform-viz', 'lerobot-info', 'lerobot-record', 'lerobot-replay', 'lerobot-setup-motors', 'lerobot-teleoperate', 'lerobot-train']\n```\n\n### Description\n\nI did git pull and my dataset v2 doesn't work anymore. My model raises with the logs below.\n\n### Context & Reproduction\n\n1. `lerobot-train --help`\n2. Check outputs\n\n### Relevant logs or stack trace\n\n```Shell\nFile \"/admin/home/michel_aratingi/miniconda3/envs/groot/lib/python3.10/site-packages/torch/utils/data/dataloader.py\", line 733, in __next__\n  data = self._next_data()\nFile \"/admin/home/michel_aratingi/miniconda3/envs/groot/lib/python3.10/site-packages/torch/utils/data/dataloader.py\", line 1488, in _next_data\n  return self._process_data(data, worker_id)\nFile \"/admin/home/michel_aratingi/miniconda3/envs/groot/lib/python3.10/site-packages/torch/utils/data/dataloader.py\", line 1550, in _process_data\n  data.reraise()\nFile \"/admin/home/michel_aratingi/miniconda3/envs/groot/lib/python3.10/site-packages/torch/_utils.py\", line 750, in reraise\n  raise exception\nIndexError: Caught IndexError in DataLoader worker process 1.\nOriginal Traceback (most recent call last):\n  File \"/admin/home/michel_aratingi/miniconda3/envs/groot/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py\", line 349, in _worker_loop\n    data = fetcher.fetch(index) # type: ignore[possibly-undefined]\n  File \"/admin/home/michel_aratingi/miniconda3/envs/groot/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py\", line 52, in fetch\n    data = [self.dataset[idx] for idx in possibly_batched_index]\n  File \"/admin/home/michel_aratingi/miniconda3/envs/groot/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py\", line 52, in <listcomp>\n    data = [self.dataset[idx] for idx in possibly_batched_index]\n  File \"/admin/home/michel_aratingi/code/collab-lerobot/src/lerobot/datasets/lerobot_dataset.py\", line 975, in __getitem__\n    item = self.hf_dataset[idx]\n  File \"/admin/home/michel_aratingi/miniconda3/envs/groot/lib/python3.10/site-packages/datasets/arrow_dataset.py\", line 2859, in __getitem__\n    return self._getitem(key)\n  File \"/admin/home/michel_aratingi/miniconda3/envs/groot/lib/python3.10/site-packages/datasets/arrow_dataset.py\", line 2840, in _getitem\n    pa_subtable = query_table(self._data, key, indices=self._indices)\n  File \"/admin/home/michel_aratingi/miniconda3/envs/groot/lib/python3.10/site-packages/datasets/formatting/formatting.py\", line 612, in query_table\n    _check_valid_index_key(key, size)\n  File \"/admin/home/michel_aratingi/miniconda3/envs/groot/lib/python3.10/site-packages/datasets/formatting/formatting.py\", line 552, in _check_valid_index_key\n    raise IndexError(f\"Invalid key: {key} is out of bounds for size {size}\")\nIndexError: Invalid key: 46969 is out of bounds for size 46963\n```\n\n### Checklist\n\n- [x] I have searched existing tickets to ensure this isn't a duplicate.\n- [x] I am using the latest version of the `main` branch.\n- [x] (I have verified this is not an environment-specific problem.\n\n### Additional Info / Workarounds\n\nMaybe if I try to update my transformers dependency?\n\nI edit this ticket",
    "url": "https://github.com/huggingface/lerobot/issues/2673",
    "state": "closed",
    "labels": [
      "enhancement",
      "question",
      "dataset",
      "dependencies",
      "training"
    ],
    "created_at": "2025-12-17T21:35:31Z",
    "updated_at": "2025-12-17T23:26:54Z",
    "user": "imstevenpmwork"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2670,
    "title": "Async inference for simulation (libero benchmark)",
    "body": "### Issue Type\n\n{\"label\" => \"\u2753 Technical Question\"}\n\n### Environment & System Info\n\n```Shell\n\n```\n\n### Description\n\nIs there any way that we can support async inference for simulator (e.g., libero)? This makes it possible to test RTC with simulators. \n\n### Context & Reproduction\n\nA question re a feature. \n\n### Expected Behavior / Desired Outcome\n\n_No response_\n\n### Relevant logs or stack trace\n\n```Shell\n\n```\n\n### Checklist\n\n- [ ] I have searched existing issues to ensure this isn't a duplicate.\n- [ ] I am using the latest version of the `main` branch.\n- [ ] (For bugs) I have verified this is not an environment-specific issue.\n\n### Additional Info / Workarounds\n\n_No response_",
    "url": "https://github.com/huggingface/lerobot/issues/2670",
    "state": "open",
    "labels": [
      "question",
      "simulation",
      "performance",
      "evaluation"
    ],
    "created_at": "2025-12-17T18:57:07Z",
    "updated_at": "2026-01-02T05:40:18Z",
    "user": "dywsjtu"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42930,
    "title": "Inconsistent handling of video_metadata in Qwen3VLVideoProcessor usage example",
    "body": "### System Info\n\ntransformers==4.57.3\n\n### Who can help?\n\n@zucchini-nlp @yonigozlan @molbap\n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nI'm working with the `Qwen3VLVideoProcessor` and noticed a potential inconsistency between the processor's output and its expected usage.\n\nAccording to the current implementation of `Qwen3VLVideoProcessor._preprocess()`, the returned `BatchFeature` only contains the keys:\n- `\"pixel_values_videos\"`\n- `\"video_grid_thw\"`\n\nHowever, in some calling code, I see logic like:\n\n```python\nvideos_inputs = self.video_processor(videos=videos, **kwargs)\nif \"return_metadata\" not in kwargs:\n    video_metadata = videos_inputs.pop(\"video_metadata\")\n```\n\nHow does it work? thank you very much\n\n### Expected behavior\n\nI want to change Qwen2.5vl to Qwen3vl but can't set a fixed nframes",
    "url": "https://github.com/huggingface/transformers/issues/42930",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-17T17:21:00Z",
    "updated_at": "2025-12-18T10:32:23Z",
    "comments": 3,
    "user": "wagoriginal"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30882,
    "title": "[Bug]: Marlin Fp8 Block Quant Failure",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\n```bash\nMODEL := \"Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8\"\n#MODEL := \"RedHatAI/Mixtral-8x7B-Instruct-v0.1-FP8\"\n\nlaunch_marlin:\n\tVLLM_TEST_FORCE_FP8_MARLIN=1 VLLM_USE_DEEPGEMM=0 chg run --gpus 1 -- vllm serve {{MODEL}} --enforce-eager --max-model-len 8192\n\neval:\n\tlm_eval \\\n\t\t--model local-completions \\\n\t\t--tasks gsm8k \\\n\t\t--model_args \"model={{MODEL}},base_url=http://localhost:8000/v1/completions,num_concurrent=1000,tokenized_requests=False\"\n```\n\nResult:\n\n```bash\n(vllm) [robertgshaw2-redhat@nm-automation-h100-standalone-1-preserve vllm]$ just launch_marlin\nVLLM_TEST_FORCE_FP8_MARLIN=1 VLLM_USE_DEEPGEMM=0 chg run --gpus 1 -- vllm serve Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8 --enforce-eager --max-model-len 8192\nReserved 1 GPU(s): [1] for command execution\n(APIServer pid=3634068) INFO 12-17 15:54:23 [api_server.py:1259] vLLM API server version 0.13.0rc2.dev185+g00a8d7628\n(APIServer pid=3634068) INFO 12-17 15:54:23 [utils.py:253] non-default args: {'model_tag': 'Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8', 'model': 'Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8', 'max_model_len': 8192, 'enforce_eager': True}\n(APIServer pid=3634068) INFO 12-17 15:54:23 [model.py:514] Resolved architecture: Qwen3MoeForCausalLM\n(APIServer pid=3634068) INFO 12-17 15:54:23 [model.py:1661] Using max model len 8192\n(APIServer pid=3634068) INFO 12-17 15:54:24 [scheduler.py:230] Chunked prefill is enabled with max_num_batched_tokens=8192.\n(APIServer pid=3634068) WARNING 12-17 15:54:24 [vllm.py:622] Enforce eager set, overriding optimization level to -O0\n(APIServer pid=3634068) INFO 12-17 15:54:24 [vllm.py:722] Cudagraph is disabled under eager mode\n(EngineCore_DP0 pid=3634329) INFO 12-17 15:54:31 [core.py:93] Initializing a V1 LLM engine (v0.13.0rc2.dev185+g00a8d7628) with config: model='Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8', speculative_config=None, tokenizer='Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=False, dtype=torch.bfloat16, max_seq_len=8192, download_dir=None, load_format=auto, tensor_parallel_size=1, pipeline_parallel_size=1, data_parallel_size=1, disable_custom_all_reduce=False, quantization=fp8, enforce_eager=True, kv_cache_dtype=auto, device_config=cuda, structured_outputs_config=StructuredOutputsConfig(backend='auto', disable_fallback=False, disable_any_whitespace=False, disable_additional_properties=False, reasoning_parser='', reasoning_parser_plugin='', enable_in_reasoning=False), observability_config=ObservabilityConfig(show_hidden_metrics_for_version=None, otlp_traces_endpoint=None, collect_detailed_traces=None, kv_cache_metrics=False, kv_cache_metrics_sample=0.01, cudagraph_metrics=False, enable_layerwise_nvtx_tracing=False), seed=0, served_model_name=Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8, enable_prefix_caching=True, enable_chunked_prefill=True, pooler_config=None, compilation_config={'level': None, 'mode': <CompilationMode.NONE: 0>, 'debug_dump_path': None, 'cache_dir': '', 'compile_cache_save_format': 'binary', 'backend': 'inductor', 'custom_ops': ['+quant_fp8', 'all', '+quant_fp8'], 'splitting_ops': [], 'compile_mm_encoder': False, 'compile_sizes': [], 'compile_ranges_split_points': [8192], 'inductor_compile_config': {'enable_auto_functionalized_v2': False, 'combo_kernels': True, 'benchmark_combo_kernel': True}, 'inductor_passes': {}, 'cudagraph_mode': <CUDAGraphMode.NONE: 0>, 'cudagraph_num_of_warmups': 0, 'cudagraph_capture_sizes': [], 'cudagraph_copy_inputs': False, 'cudagraph_specialize_lora': True, 'use_inductor_graph_partition': False, 'pass_config': {'fuse_norm_quant': False, 'fuse_act_quant': False, 'fuse_attn_quant': False, 'eliminate_noops': False, 'enable_sp': False, 'fuse_gemm_comms': False, 'fuse_allreduce_rms': False}, 'max_cudagraph_capture_size': 0, 'dynamic_shapes_config': {'type': <DynamicShapesType.BACKED: 'backed'>, 'evaluate_guards': False}, 'local_cache_dir': None}\n(EngineCore_DP0 pid=3634329) INFO 12-17 15:54:32 [parallel_state.py:1210] world_size=1 rank=0 local_rank=0 distributed_init_method=tcp://10.243.64.5:43323 backend=nccl\n(EngineCore_DP0 pid=3634329) INFO 12-17 15:54:32 [parallel_state.py:1418] rank 0 in world size 1 is assigned as DP rank 0, PP rank 0, PCP rank 0, TP rank 0, EP rank 0\n(EngineCore_DP0 pid=3634329) INFO 12-17 15:54:33 [gpu_model_runner.py:3620] Starting to load model Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8...\n(EngineCore_DP0 pid=3634329) INFO 12-17 15:54:33 [deep_gemm.py:76] DeepGEMM E8M0 enabled on current platform.\n(EngineCore_DP0 pid=3634329) INFO 12-17 15:54:33 [cuda.py:351] Using FLASH_ATTN attention backend out of potential backends: ('FLASH_ATTN', 'FLASHINFER', 'TRITON_ATTN', 'FLEX_ATTENTION')\n(EngineCore_DP0 pid=3634329) INFO 12-17 15:54:33 [layer.py:373] Enabled separate cuda str",
    "url": "https://github.com/vllm-project/vllm/issues/30882",
    "state": "closed",
    "labels": [
      "bug",
      "help wanted",
      "good first issue"
    ],
    "created_at": "2025-12-17T15:55:18Z",
    "updated_at": "2025-12-17T16:02:54Z",
    "comments": 2,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30879,
    "title": "[Doc]: Add some documentation about encoder compilation",
    "body": "### \ud83d\udcda The doc issue\n\nI want something like a design doc for encoder compilation. For example:\n- It uses support_torch_compile and set_model_tag to avoid cache collisions\n- it supports or doesn't support the following features that VllmBackend does: cudagraphs, compile_ranges, and a high-level explanation for how these are turned off or on.\n- it inherits from compilation_config (or maybe it doesn't)\n- here's how to turn it on/off\n\nI'm having a difficult time thinking through the edge cases in https://github.com/vllm-project/vllm/pull/30822 and https://github.com/vllm-project/vllm/pull/30489\n\ncc @Lucaskabela \n\n### Suggest a potential alternative/fix\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30879",
    "state": "open",
    "labels": [
      "documentation",
      "torch.compile"
    ],
    "created_at": "2025-12-17T15:44:50Z",
    "updated_at": "2025-12-17T16:27:38Z",
    "comments": 1,
    "user": "zou3519"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30865,
    "title": "[Usage]:Tools GLM4.6v with vLLM",
    "body": "### Your current environment\n\nHello,\n\nI am running tests on this model, which I find excellent. However, I am encountering a few issues and would like to know whether it is possible to fix them or if I am simply asking for the impossible.\n\nFirst of all, here is my vLLM configuration:\n\n`docker run -d \\ --name vllm-llm \\ --gpus '\"device=4,5,6,7\"' \\ -e NVIDIA_DRIVER_CAPABILITIES=compute,utility \\ -e VLLM_OBJECT_STORAGE_SHM_BUFFER_NAME=\"${SHM_NAME}\" \\ -v /raid/workspace/qladane/vllm/hf-cache:/root/.cache/huggingface \\ --env \"HF_TOKEN=${HF_TOKEN:-}\" \\ -p 8003:8000 \\ --ipc=host \\ --restart unless-stopped \\ vllm-openai:glm46v \\ zai-org/GLM-4.6V-FP8 \\ --tensor-parallel-size 4 \\ --enforce-eager \\ --served-model-name ImagineAI \\ --allowed-local-media-path / \\ --limit-mm-per-prompt '{\"image\": 1, \"video\": 0}' \\ --max-model-len 131072 \\ --dtype auto \\ --kv-cache-dtype fp8 \\ --gpu-memory-utilization 0.85 \\ --reasoning-parser glm45 \\ --tool-call-parser glm45 \\ --enable-auto-tool-choice \\ --enable-expert-parallel \\ --mm-encoder-tp-mode data \\ --mm-processor-cache-type shm`\n\nNext, here is my OpenWebUI configuration:\n\n<img width=\"1080\" height=\"568\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/af5ff9c0-9cdc-407f-8b0b-8e76a42746af\" />\n\n<img width=\"1080\" height=\"394\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/60fa32f9-2f54-4a75-8dc1-0ed00c69c4e5\" />\n\n<img width=\"1080\" height=\"416\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/783ba2e7-08e9-426a-a8be-9a2a561b2fe0\" />\n\n<img width=\"1080\" height=\"357\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a7c30850-a680-401a-b149-5787000e7344\" />\n\nI would like to know whether, with GLM-4.6V and OpenWebUI, it is possible to make the model choose and execute tools autonomously when it considers them relevant.\n\nAt the moment:\n\nIf it is an internet search, I have to manually activate the button, even though access is already available.\n\nIf it is Python code, I have to click \u201cexecute\u201d; it does not run it by itself, even though it clearly has access to Jupyter, etc.\n\nIf anyone has already encountered this issue.\n\nThank you very much in advance for your help.\n\nKind regards\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30865",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-17T10:51:34Z",
    "updated_at": "2025-12-18T08:33:44Z",
    "comments": 1,
    "user": "qBrabus"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15321,
    "title": "[Feature][VLM] Support ViT Piecewise CUDA Graph for VLMs",
    "body": "### Checklist\n\n- [ ] If this is not a feature request but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [ ] Please use English. Otherwise, it will be closed.\n\n### Motivation\n\nSupport ViT Piecewise CUDA Graph for VLMs can improve prefill performance for VLMs.\n\n- [x] Support ViT PCG Framework https://github.com/sgl-project/sglang/pull/14422\n- [x] Support Qwen2.5-VL https://github.com/sgl-project/sglang/pull/14422\n- [x] Support Qwen3-VL https://github.com/sgl-project/sglang/pull/15320\n- [ ] Support InternVL\n- [ ] Support GLM-4.1V\n\n### Related resources\n\n_No response_",
    "url": "https://github.com/sgl-project/sglang/issues/15321",
    "state": "open",
    "labels": [
      "performance",
      "Multi-modal",
      "vlm"
    ],
    "created_at": "2025-12-17T09:17:18Z",
    "updated_at": "2026-01-04T02:09:13Z",
    "comments": 0,
    "user": "yuan-luo"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30859,
    "title": "[Bug]: set_current_vllm_config() is only done during the initialization stage but not the runtime stage",
    "body": "### Your current environment\n\nAny env\n\n### \ud83d\udc1b Describe the bug\n\n# Issue Statement\n\nCurrently, `set_current_vllm_config()` is only done during the initialization stage but not the runtime stage. If the code tries to call `get_current_vllm_config()`, vLLM prints a warning \"Current vLLM config is not set.\" and returns a default config.\n\nHowever, this approach is problematic because:\n\n1. When contributors change the code, many of us did not realize the fact that `get_current_vllm_config()` should only be called during init stage and should not be called during runtime stage.\n2. It's just a warning instead of a hard failure, so contributors may not notice this when they run local tests.\n3. Such warnings could be annoying to users because it may be printed for every single decoding step. Plus, the warning doesn't carry any useful info about how to fix/bypass the issue.\n4. The default config may be completely incorrect for the caller function.\n5. Warning prints on every step might impact performance, because print isn't fast operation. (thanks to @vadiklyutiy )\n\n# Requirements\n\nWe should change the behavior such that:\n\n- `get_current_vllm_config()` either returns the real config set by the user or raises an error if the config does not exist.\n\n# Related Issues\n\nThis issues have appeared many times in the past. Although the fix is usually not difficult, it is an annoying recurrent issues that we should avoid in the future to avoid wasted engineering effort.\n\n- https://github.com/vllm-project/vllm/issues/13207\n- https://github.com/vllm-project/vllm/pull/29999\n- https://github.com/vllm-project/vllm/issues/30185\n- https://github.com/vllm-project/vllm/issues/30240\n- https://github.com/vllm-project/vllm/issues/30571\n\n\n# Possible Solutions\n\n## Solution A: `set_current_vllm_config()` for runtime stage as well\n\nSuch that `get_current_vllm_config()` is always available, regardless of init stage or runtime stage.\n\n## Solution B: Convert the warning in `get_current_vllm_config()` to a hard failure\n\nBut this means we may need to fix lots of CI failures.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30859",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-17T08:59:49Z",
    "updated_at": "2025-12-22T18:09:55Z",
    "comments": 7,
    "user": "nvpohanh"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15319,
    "title": "[Feature] RFC: AutoSpec, Automatic Runtime Speculative Inference Parameter Tuning",
    "body": "### Checklist\n\n- [x] If this is not a feature request but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [x] Please use English. Otherwise, it will be closed.\n\n### Motivation\n\n## Summary\n\nThis proposal introduces automatic runtime tuning for speculative inference parameters in SGLang. Instead of requiring users to manually set speculative_num_steps, speculative_topk, and speculative_num_draft_tokens, the system dynamically adjusts them using a feedback-driven controller. This maximizes throughput while respecting hardware limits and draft model capabilities\u2014without any manual configuration. \n\n## Problem & Motivation\n\nCurrently, users of speculative inference in SGLang must manually tune several parameters:\n\n- speculative_num_steps\n- speculative_topk\n- speculative_num_draft_tokens\n\n<img width=\"377\" height=\"249\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d13c9e61-e5be-4d9c-a245-d9b95cb299f6\" />\n\nFrom the graph, we see that throughput varies with speculative_num_steps and batchsize, and it also suggests that a well-tuned parameter configuration of speculative inference can increase throughput by 5%~50%. These findings suggest three current issues:\n\n1. Trial-and-error overhead \u2013 Finding optimal values per model/hardware/workload is tedious and often results in suboptimal performance.\n\n2. Model capability mismatch \u2013 Different draft models have different effective limits, but static parameters cannot adapt.\n\n3. Batch-size sensitivity \u2013 The optimal number of speculative steps decreases as batch size grows, due to compute constraints.\n\nA single fixed configuration cannot perform well across varying models, hardware, and batch sizes.\n\n## Proposed Design\n\nWe propose a lightweight feedback controller that adjusts speculative_num_steps in real time based on runtime metrics. For simplicity and stability, we keep speculative_topk=1 and speculative_num_draft_tokens=speculative_num_steps+1 (following observed best practices).\n\n### Core Architecture\n\nThe system monitors two metrics after each batch:\n\n- Acceptance rate \u2013 ratio of accepted draft tokens.\n\n- Acceptance length growth \u2013 how much accepted length changes when steps increase.\n\nUsing these, it applies the following simple rules:\n\n1. Increase steps if:\n\n- Acceptance rate is high (configurable, e.g., \u22650.6)\n\n- Acceptance length grows sufficiently (exceeding a model-aware threshold)\n\n- Hardware limits for the current batch size are not exceeded\n\n2. Decrease steps if:\n\n- Acceptance rate is low (e.g., <0.5)\n\n3. Otherwise, keep steps unchanged.\n\nThis forms a stable negative-feedback loop that converges to a near-optimal step count for the current workload.\n\n### Detailed Designs\n\n#### Initialization Phase\n\nDuring system startup, the following initialization sequence occurs:\n\n1. **Computational Threshold Calculation**: For each possible batch size (1, 2, 4, 8, 16, 32, 64), compute the maximum allowable speculative steps given hardware constraints(thres_batchsize);\n2. **Draft Model Ability Analysis**: (Optional) Assess draft model capabilities and establish maximum effective step boundaries. (This step is optional, parameters can be dynamically adjusted and saved during runtime.)\n3. **Theoretical Threshold Establishment**: Calculate lower bound of theoretical accept length growth thresholds for different speculative step values. \n\n#### Runtime Parameter Adjustment Logic\n\nThe adjustment algorithm implements a conservative approach to prevent oscillation:\n\n<img width=\"1384\" height=\"1484\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/f31880cc-7374-4818-9fa7-6aa6f4d1ed91\" />\n\n```\nFor each batch run:\n    1. Collect metrics: acceptance_rate, acceptance_length_growth_rate\n    2. speculative_num_steps += 1 if (acceptance_length_growth_rate > thres_accept_length_growth_rate AND accept_rate >= thres_positive_accept_rate AND speculative_num_step+1<thres_batchsize_num_steps)\n    3. speculative_num_steps -= 1 if (acceptance_length_growth_rate <= thres_accept_length_growth_rate OR accept_rate < thres_negative_accept_rate)\n    4. speculative_num_steps remains unchanged otherwise\n    5. Update parameters and record accept length of current loop\n```\n\n### Key Benefits\n\n- Zero configuration \u2013 Users no longer need to guess parameters.\n\n- Adaptive \u2013 Automatically adjusts to model pairs, hardware, and batch sizes.\n\n- Performance-aware \u2013 Maximizes throughput while avoiding overload.\n\n- Backward compatible \u2013 Manual configuration remains available.\n\n## Command Line Arguments\n\n| Argument | Description |\n|----------|-------------|\n| `--speculative-auto-tune` | Enable automatic tuning of speculative_num_steps (default: false) |\n| `--speculative-min-steps` | Minimum speculative steps for dynamic adjustment (default: 1) |\n| `--speculative-max-steps` | Maximum speculative steps for dynamic adjustment (default: 10) |\n| `--speculative-positive-threshold` | Acceptance rate threshold for increasin",
    "url": "https://github.com/sgl-project/sglang/issues/15319",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-17T08:53:57Z",
    "updated_at": "2025-12-22T03:37:45Z",
    "comments": 3,
    "user": "maodoudou168"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30855,
    "title": "[Usage]: Qwen3-30B-A3B-NVFP4 fails on Dell Pro Max GB10 with \"no kernel image is available for execution on the device\"",
    "body": "### Your current environment\n\n```\nHardware: Dell Pro Max GB10\nOS: Ubuntu 24\nCUDA: cuda_13.0.r13.0\nCuda compilation tools, release 13.0, V13.0.88;\nvllm: V0.12.0\ntorch_version: 2.9.0+cu128\nmodel: RedHatAI/Qwen3-30B-A3B-NVFP4  or  nvidia/Qwen3-30B-A3B-NVFP4  or  nvidia/Qwen3-30B-A3B-FP4\n```\n\n\n### How would you like to use vllm\n\n### I'm trying to run the quantized model RedHatAI/Qwen3-30B-A3B-NVFP4 using vLLM v0.12.0 on a Dell Pro Max GB10.However, I get the following error during model  loading: torch.AcceleratorError: CUDA error: no kernel image is available for execution on the device\n\n\n vllm serve RedHatAI/Qwen3-30B-A3B-NVFP4 --port 8002 --gpu-memory-utilization 0.7\n(APIServer pid=731925) INFO 12-17 16:03:13 [api_server.py:1772] vLLM API server version 0.12.0\n(APIServer pid=731925) INFO 12-17 16:03:13 [utils.py:253] non-default args: {'model_tag': 'RedHatAI/Qwen3-30B-A3B-NVFP4', 'port': 8002, 'model': 'RedHatAI/Qwen3-30B-A3B-NVFP4', 'gpu_memory_utilization': 0.7}\n(APIServer pid=731925) Downloading Model from https://www.modelscope.cn to directory: /home/smc01/.cache/modelscope/hub/models/RedHatAI/Qwen3-30B-A3B-NVFP4\n(APIServer pid=731925) Downloading Model from https://www.modelscope.cn to directory: /home/smc01/.cache/modelscope/hub/models/RedHatAI/Qwen3-30B-A3B-NVFP4\n(APIServer pid=731925) Downloading Model from https://www.modelscope.cn to directory: /home/smc01/.cache/modelscope/hub/models/RedHatAI/Qwen3-30B-A3B-NVFP4\n(APIServer pid=731925) INFO 12-17 16:03:17 [model.py:637] Resolved architecture: Qwen3MoeForCausalLM\n(APIServer pid=731925) INFO 12-17 16:03:17 [model.py:1750] Using max model len 40960\n(APIServer pid=731925) INFO 12-17 16:03:17 [scheduler.py:228] Chunked prefill is enabled with max_num_batched_tokens=2048.\n(APIServer pid=731925) Downloading Model from https://www.modelscope.cn to directory: /home/smc01/.cache/modelscope/hub/models/RedHatAI/Qwen3-30B-A3B-NVFP4\n(APIServer pid=731925) Downloading Model from https://www.modelscope.cn to directory: /home/smc01/.cache/modelscope/hub/models/RedHatAI/Qwen3-30B-A3B-NVFP4\n(EngineCore_DP0 pid=732093) INFO 12-17 16:03:22 [core.py:93] Initializing a V1 LLM engine (v0.12.0) with config: model='RedHatAI/Qwen3-30B-A3B-NVFP4', speculative_config=None, tokenizer='RedHatAI/Qwen3-30B-A3B-NVFP4', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=False, dtype=torch.bfloat16, max_seq_len=40960, download_dir=None, load_format=auto, tensor_parallel_size=1, pipeline_parallel_size=1, data_parallel_size=1, disable_custom_all_reduce=False, quantization=compressed-tensors, enforce_eager=False, kv_cache_dtype=auto, device_config=cuda, structured_outputs_config=StructuredOutputsConfig(backend='auto', disable_fallback=False, disable_any_whitespace=False, disable_additional_properties=False, reasoning_parser='', reasoning_parser_plugin='', enable_in_reasoning=False), observability_config=ObservabilityConfig(show_hidden_metrics_for_version=None, otlp_traces_endpoint=None, collect_detailed_traces=None, kv_cache_metrics=False, kv_cache_metrics_sample=0.01), seed=0, served_model_name=RedHatAI/Qwen3-30B-A3B-NVFP4, enable_prefix_caching=True, enable_chunked_prefill=True, pooler_config=None, compilation_config={'level': None, 'mode': <CompilationMode.VLLM_COMPILE: 3>, 'debug_dump_path': None, 'cache_dir': '', 'compile_cache_save_format': 'binary', 'backend': 'inductor', 'custom_ops': ['none'], 'splitting_ops': ['vllm::unified_attention', 'vllm::unified_attention_with_output', 'vllm::unified_mla_attention', 'vllm::unified_mla_attention_with_output', 'vllm::mamba_mixer2', 'vllm::mamba_mixer', 'vllm::short_conv', 'vllm::linear_attention', 'vllm::plamo2_mamba_mixer', 'vllm::gdn_attention_core', 'vllm::kda_attention', 'vllm::sparse_attn_indexer'], 'compile_mm_encoder': False, 'compile_sizes': [], 'inductor_compile_config': {'enable_auto_functionalized_v2': False, 'combo_kernels': True, 'benchmark_combo_kernel': True}, 'inductor_passes': {}, 'cudagraph_mode': <CUDAGraphMode.FULL_AND_PIECEWISE: (2, 1)>, 'cudagraph_num_of_warmups': 1, 'cudagraph_capture_sizes': [1, 2, 4, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 416, 432, 448, 464, 480, 496, 512], 'cudagraph_copy_inputs': False, 'cudagraph_specialize_lora': True, 'use_inductor_graph_partition': False, 'pass_config': {'fuse_norm_quant': False, 'fuse_act_quant': False, 'fuse_attn_quant': False, 'eliminate_noops': True, 'enable_sp': False, 'fuse_gemm_comms': False, 'fuse_allreduce_rms': False}, 'max_cudagraph_capture_size': 512, 'dynamic_shapes_config': {'type': <DynamicShapesType.BACKED: 'backed'>}, 'local_cache_dir': None}\n(EngineCore_DP0 pid=732093) /home/smc01/miniconda3/envs/vLLM_12/lib/python3.10/site-packages/torch/cuda/__init__.py:283: UserWarning: \n(EngineCore_DP0 pid=732093)     Found GPU0 NVIDIA GB10 which is of cuda capabilit",
    "url": "https://github.com/vllm-project/vllm/issues/30855",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-17T08:44:11Z",
    "updated_at": "2025-12-17T08:44:11Z",
    "comments": 0,
    "user": "nanbogong"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30847,
    "title": "[Bug]: Qwen 3VL via Efficient Video Sampling (EVS) to trim video embeddings and found that the number of tokens after timestamp in the Prompt was not aligned with the actual number of tokens after pruning?",
    "body": "### Your current environment\n\n<details>\nvllm serve Qwen3-VL-8B --video-pruning-rate=0.75 \n\nmessages=[\n            {\n                \"role\": \"user\",\n                \"content\": [\n                    # {\"type\": \"text\", \"text\": \"What's in this video?\"},\n                    {\"type\": \"text\", \"text\": \"\u8fd9\u4e2a\u89c6\u9891\u548c\u56fe\u7247\u5206\u522b\u63cf\u8ff0\u7684\u662f\u4ec0\u4e48\u5185\u5bb9?\"},\n                    {\n                        \"type\": \"video_url\",\n                        \"video_url\": {\n                            \"url\": \"file:///codes/data/video/Tom_Jerry.mp4\",\n                            \"fps\": 1,\n                        },\n                    }\n                ],\n            }\n        ],\n<summary>The output of <code>python collect_env.py</code></summary>\n\n\n\n\n\n```text\nThe get-video_deplacement_qwen3vl method in the qwen3-vl.py file\nFirstly: Calculate the number of frames per frame\nSecondly, add the specific timestamp of<{cur_time:. 1f} s>to the Prompt and add the calculated number of tokens after the timestamp.\nAt this point, the number of tokens per frame is calculated based on the clipping rate, so except for the first frame, the number of tokens after each frame remains unchanged (EVS is not used to calculate the actual tokens here).\n\nThe EVS algorithm calculates that the number of tokens reserved for each frame is different. It will cause the number of tokens after timestamp to be inconsistent with the actual number of tokens after clipping\n```\n\n</details>\n\u3001\n\n### \ud83d\udc1b Describe the bug\n\n\n1\u3001get_video_replacement_qwen3vl \nframes_idx_token=[165, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33]\n\n<img width=\"989\" height=\"359\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/aeb59c9e-b970-4a2c-851f-a001c8610f0a\" />\n2\u3001compute_retention_mask\n\n<img width=\"1058\" height=\"160\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d96f2ce9-1ed2-4d5d-b5ac-28c6394d8ee0\" />\n\n<img width=\"1042\" height=\"194\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/2bc35d99-bbbb-4437-84fb-755567e97b40\" />\n\n3\u3001embed_input_ids\n<img width=\"988\" height=\"421\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/2f8fcd5b-9fef-49d5-b331-dd4f1f1d7335\" />\ninput_ids:\n<img width=\"886\" height=\"624\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a62fcfe8-f29e-4e1d-a8fb-dec91c5e75e7\" />\n\nFrom the above 1 and 3, it can be seen that the data in frames_idx_token is the same as that in embed_input_ids,\nThe first frame contains 165 tokens, while the rest contain 33 tokens\n151656 is the ID of the video token. The number of 151656 is the number of video tokens. The sum of the number of video tokens in all frames is the same as the sum of frames_idx_token.\nRegarding the second item: compute_contention_mask EVS cropped mask, it was found that the number of tokens in the first frame was 165, while the number of tokens in other frames was different,\nBased on the above 1, 2, and 3, it can be concluded that the current implementation of EVS pruning algorithm has problems\nThat is, the number of tokens after timestamp in the Prompt does not match the actual number of tokens that should be retained after EVS pruning.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30847",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-17T06:46:15Z",
    "updated_at": "2026-01-04T07:39:17Z",
    "comments": 5,
    "user": "xshqhua"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30832,
    "title": "[Performance]: DeepSeek-V3.2 on 8xH20 30 decode tokens/sec",
    "body": "### Proposal to improve performance\n\n**My Env:**\nvllm                              0.13.0rc2.dev178+g676db55ee\ndeep_gemm                         2.1.1+c9f8b34\ncuda.   12.9\npython. 3.10.18\n\n**command** is the same as:\nvllm serve mypath/DeepSeek-V3.2 \\\n   --tensor-parallel-size 8 \\\n   --tokenizer-mode deepseek_v32 \\\n   --tool-call-parser deepseek_v32 \\\n   --enable-auto-tool-choice \\\n   --reasoning-parser deepseek_v3\n\n**My Question:**\nThe output tokens is 30 tokens/s 1/req which is slower than excpted on https://docs.vllm.ai/projects/recipes/en/latest/DeepSeek/DeepSeek-V3_2.html#benchmarking:\n\nis there any wrong with this?\n\n------------------------------------------------\nBenchmarking[\u00b6](https://docs.vllm.ai/projects/recipes/en/latest/DeepSeek/DeepSeek-V3_2.html#benchmarking)\nWe used the following script to benchmark deepseek-ai/DeepSeek-V3.2 on 8xH20.\n\n\nvllm bench serve \\\n  --model deepseek-ai/DeepSeek-V3.2 \\\n  --dataset-name random \\\n  --random-input 2048 \\\n  --random-output 1024 \\\n  --request-rate 10 \\\n  --num-prompt 100  \\ \n  --trust-remote-code\nTP8 Benchmark Output[\u00b6](https://docs.vllm.ai/projects/recipes/en/latest/DeepSeek/DeepSeek-V3_2.html#tp8-benchmark-output)\n\n============ Serving Benchmark Result ============\nSuccessful requests:                     100       \nFailed requests:                         0         \nRequest rate configured (RPS):           10.00     \nBenchmark duration (s):                  129.34    \nTotal input tokens:                      204800    \nTotal generated tokens:                  102400    \nRequest throughput (req/s):              0.77      \nOutput token throughput (tok/s):         791.73    \nPeak output token throughput (tok/s):    1300.00   \nPeak concurrent requests:                100.00    \nTotal Token throughput (tok/s):          2375.18   \n---------------Time to First Token----------------\nMean TTFT (ms):                          21147.20  \nMedian TTFT (ms):                        21197.97  \nP99 TTFT (ms):                           41133.00  \n-----Time per Output Token (excl. 1st token)------\nMean TPOT (ms):                          99.71     \nMedian TPOT (ms):                        99.25     \nP99 TPOT (ms):                           124.28    \n---------------Inter-token Latency----------------\nMean ITL (ms):                           99.71     \nMedian ITL (ms):                         76.89     \nP99 ITL (ms):                            2032.37   \n==================================================\n\n### Report of performance regression\n\n_No response_\n\n### Misc discussion on performance\n\n_No response_\n\n### Your current environment (if you think it is necessary)\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30832",
    "state": "open",
    "labels": [
      "performance"
    ],
    "created_at": "2025-12-17T03:08:52Z",
    "updated_at": "2025-12-18T08:01:30Z",
    "comments": 1,
    "user": "lisp2025"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 170635,
    "title": "Use cvt.rp.satfinite.ue8m0x2.f32 PTX instruction in Inductor codegen for mxfp8 quantization",
    "body": "## Summary\n\nFor MXFP8 quantization, NVIDIA recommends using the \"RCEIL\" rounding mode to convert a fp32 scale factor to the e8m0 format for MXFP8. On Blackwell/sm100, they support a PTX instruction to convert fp32 scales to the e8m0 format for MXFP8 using a single instruction, rather than several operations: `cvt.rp.satfinite.ue8m0x2.f32`\n\nIn torchao, for RCEIL rounding mode in MXFP8 quantization, we use this with inline PTX. Examples:\n- https://github.com/pytorch/ao/pull/3498\n- https://github.com/pytorch/ao/blob/85557135c93d3429320a4a360c0ee9cb49f84a00/torchao/csrc/cuda/mx_kernels/mxfp8_quantize.cuh#L211\n\nHowever, our [torch native to_mx() function does not yet support this](https://github.com/pytorch/ao/blob/b9e5780b56088daaf01d4fa3d4828efc4868cbed/torchao/prototype/mx_formats/mx_tensor.py#L106).\n\nWould it be possible for Inductor codegen to pattern match this and codegen using the PTX instruction above? Or is there an alternate approach we should consider? Thanks! \n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @aakhundov @coconutruben @jataylo",
    "url": "https://github.com/pytorch/pytorch/issues/170635",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: inductor",
      "module: floatx (formerly float8)"
    ],
    "created_at": "2025-12-17T02:03:40Z",
    "updated_at": "2025-12-19T09:36:51Z",
    "comments": 0,
    "user": "danielvegamyhre"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 170604,
    "title": "CUDAGraph capturing of iterating the same function/module (outside and inside fullgraph)",
    "body": "### \ud83d\udc1b Describe the bug\n\nThe example from https://docs.pytorch.org/docs/stable/torch.compiler_cudagraph_trees.html#limitations throws an error as warned in the docs:\n\n```\nRuntimeError: Error: accessing tensor output of CUDAGraphs that has been overwritten by a subsequent run. Stack trace: File \".../bug.py\", line 7, in my_model\n    y = torch.matmul(x, x). To prevent overwriting, clone the tensor outside of torch.compile() or call torch.compiler.cudagraph_mark_step_begin() before each model invocation.\n```\n\n```python\nimport torch\n\n@torch.compile(mode=\"reduce-overhead\")\ndef my_model(x):\n    y = torch.matmul(x, x)\n    return y\n\nx = torch.randn(10, 10, device=\"cuda\")\ny1 = my_model(x)\ny2 = my_model(x)\nprint(y1)\n```\n\nThe docs suggest that `torch.compiler.cudagraph_mark_step_begin()` can be used, but\n\n```python\ntorch.compiler.cudagraph_mark_step_begin()\ny1 = my_model(x)\ntorch.compiler.cudagraph_mark_step_begin()\ny2 = my_model(x)\n```\n\nproduces anyway:\n```\nRuntimeError: Error: accessing tensor output of CUDAGraphs that has been overwritten by a subsequent run. Stack trace: File \".../bug.py\", line 7, in my_model\n    y = torch.matmul(x, x). To prevent overwriting, clone the tensor outside of torch.compile() or call torch.compiler.cudagraph_mark_step_begin() before each model invocation.\n```\n\n---\n\nAnd more importantly, how to do several invocations of the same model inside fullgraph-capture and make it work with CUDAGraph/reduce-overhead? I've tried placing the call `torch.compiler.cudagraph_mark_step_begin()` inside fullgraph'd region, but it throws with a forced graph break:\n```\ntorch._dynamo.exc.Unsupported: Attempted to call function marked as skipped\n   Explanation: Dynamo developers have intentionally marked that the function `cudagraph_mark_step_begin` in file `.../.venv/lib/python3.12/site-packages/torch/compiler/__init__.py` should not be traced.\n   Hint: Avoid calling the function `cudagraph_mark_step_begin`.\n   Hint: Apply `@torch._dynamo.dont_skip_tracing` to the function `cudagraph_mark_step_begin` to force tracing into the function. More graph breaks may occur as a result of attempting to trace into the function.\n   Hint: Please file an issue to PyTorch.\n\n   Developer debug context: module: torch.compiler, qualname: cudagraph_mark_step_begin, skip reason: <missing reason>\n\n  For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0007.html\n\n```\n\n### Versions\n\n2.9.1\n\ncc @ptrblck @msaroufim @eqy @jerryzh168 @tinglvv @nWEIdia @mcarilli @ezyang @eellison @penguinwu @BoyuanFeng",
    "url": "https://github.com/pytorch/pytorch/issues/170604",
    "state": "open",
    "labels": [
      "module: cuda",
      "triaged",
      "module: cuda graphs"
    ],
    "created_at": "2025-12-16T22:07:19Z",
    "updated_at": "2025-12-17T05:01:56Z",
    "comments": 0,
    "user": "vadimkantorov"
  },
  {
    "repo": "huggingface/candle",
    "number": 3247,
    "title": "Parakeet V3 support?",
    "body": "Any plans to support Parakeet V3 by any chance? Thank you \ud83d\ude4f ",
    "url": "https://github.com/huggingface/candle/issues/3247",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-16T19:05:33Z",
    "updated_at": "2025-12-16T19:05:33Z",
    "comments": 0,
    "user": "mobicham"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30798,
    "title": "[Usage]:  vllm offline server lora model",
    "body": "### Your current environment\n\n\n\nHi team,\n\nI have a question about deploying LoRA models with a vLLM offline server.\n\nCurrently, we have a base model **A**. After LoRA training, we obtain adapter parameters **P**. When we serve model A with vLLM (offline server) and enable LoRA, we can select either the **base model A** or **A + P** (LoRA adapter) from the `/v1/models` list for inference.\n\nBased on this, suppose we **merge A and P** into a new merged model **B = A + P**, and then continue LoRA training on top of **B** to obtain another LoRA adapter **Q**.\n\nIs there a way to deploy on a single vLLM server such that the models list allows choosing among these three options for inference?\n\n1. **A**\n2. **A + P**\n3. **A + P + Q**\n\nIf vLLM cannot directly stack LoRA adapters (P then Q) at runtime, is there a recommended approach to **combine P and Q** into a new equivalent adapter (e.g., a single LoRA adapter **R**) that is functionally equivalent to **A + P + Q**, ideally in a way that is **equivalent to training a LoRA adapter directly on base A**?\n\nThanks a lot for your help!\n\n---\n\n\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30798",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-16T16:38:49Z",
    "updated_at": "2025-12-18T11:52:39Z",
    "comments": 4,
    "user": "zapqqqwe"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15266,
    "title": "Multi-Adapter Support for Embed Qwen3 8B Embedding Model",
    "body": "### Checklist\n\n- [x] If this is not a feature request but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [x] Please use English. Otherwise, it will be closed.\n\n### Motivation\n\nHi Team, do we currently support multi-adapter (LoRA) support for embedding models, specifically Qwen3 8B Embedding model? If not, when can we expect the support? Thanks :)\n\n### Related resources\n\nI'm training the model for three different tasks using separate lora adapters and need to deploy the model with one base and the three different adapters.\n\nThis is similar to how [Jina v4](https://huggingface.co/jinaai/jina-embeddings-v4) Embedding model has task specific adapters.\n\nMy adapter config looks like this -\n```\n{\n  \"alpha_pattern\": {},\n  \"auto_mapping\": null,\n  \"base_model_name_or_path\": \"/temp/local-ssd/models/Qwen3-Embedding-8B\",\n  \"bias\": \"none\",\n  \"corda_config\": null,\n  \"eva_config\": null,\n  \"exclude_modules\": null,\n  \"fan_in_fan_out\": false,\n  \"inference_mode\": true,\n  \"init_lora_weights\": true,\n  \"layer_replication\": null,\n  \"layers_pattern\": null,\n  \"layers_to_transform\": null,\n  \"loftq_config\": {},\n  \"lora_alpha\": 128,\n  \"lora_bias\": false,\n  \"lora_dropout\": 0.1,\n  \"megatron_config\": null,\n  \"megatron_core\": \"megatron.core\",\n  \"modules_to_save\": [\n    \"classifier\",\n    \"score\",\n    \"classifier\",\n    \"score\"\n  ],\n  \"peft_type\": \"LORA\",\n  \"r\": 32,\n  \"rank_pattern\": {},\n  \"revision\": null,\n  \"target_modules\": [\n    \"gate_proj\",\n    \"k_proj\",\n    \"up_proj\",\n    \"q_proj\",\n    \"down_proj\",\n    \"v_proj\",\n    \"o_proj\"\n  ],\n  \"task_type\": \"SEQ_CLS\",\n  \"trainable_token_indices\": null,\n  \"use_dora\": false,\n  \"use_rslora\": false\n}\n```",
    "url": "https://github.com/sgl-project/sglang/issues/15266",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-16T14:14:16Z",
    "updated_at": "2025-12-16T14:14:22Z",
    "comments": 0,
    "user": "dawnik17"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30776,
    "title": "[Usage]: Qwen3-omni's offline usage",
    "body": "### Your current environment\n\nI used the code below in vllm==0.12.0, but failed.\n```\nimport os\nimport torch\n\nfrom vllm import LLM, SamplingParams\nfrom transformers import Qwen3OmniMoeProcessor\nfrom qwen_omni_utils import process_mm_info\n\ndef build_input(processor, messages, use_audio_in_video):\n    text = processor.apply_chat_template(\n        messages,\n        tokenize=False,\n        add_generation_prompt=True,\n    )\n    # print(text[0])\n    # print(len(text[0]))\n    audios, images, videos = process_mm_info(messages, use_audio_in_video=use_audio_in_video)\n\n    inputs = {\n        'prompt': text,\n        'multi_modal_data': {},\n        \"mm_processor_kwargs\": {\n            \"use_audio_in_video\": use_audio_in_video,\n        },\n    }\n\n    if images is not None:\n        inputs['multi_modal_data']['image'] = images\n    if videos is not None:\n        inputs['multi_modal_data']['video'] = videos\n    if audios is not None:\n        inputs['multi_modal_data']['audio'] = audios\n    \n    return inputs\n\nif __name__ == '__main__':\n    # vLLM engine v1 not supported yet\n    os.environ['VLLM_USE_V1'] = '1'\n    os.environ['CUDA_DEVICES'] = '0,1,2,3,4,5,6,7'\n\n    MODEL_PATH = \"Qwen3-Omni-30B-A3B-Instruct\"\n    llm = LLM(\n            model=MODEL_PATH, trust_remote_code=True, gpu_memory_utilization=0.95,\n            tensor_parallel_size=1,\n            limit_mm_per_prompt={'image': 3, 'video': 3, 'audio': 3},\n            max_num_seqs=8,\n            max_model_len=32768,\n            seed=17114,\n    )\n\n    sampling_params = SamplingParams(\n        temperature=0.6,\n        top_p=0.95,\n        top_k=20,\n        max_tokens=16384,\n    )\n\n    processor = Qwen3OmniMoeProcessor.from_pretrained(MODEL_PATH)\n\n    conversation1 = [\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"video\",\n                    \"video\": \"1.mp4\",\n                    \"fps\": 6,\n                }\n            ],\n        }\n    ]\n    \n    USE_AUDIO_IN_VIDEO = True\n\n    # Combine messages for batch processing\n    conversations = [conversation1]\n    inputs = [build_input(processor, messages, USE_AUDIO_IN_VIDEO) for messages in conversations]\n    # print(inputs[0])\n    outputs = llm.generate(inputs, sampling_params=sampling_params)\n\n    for i in range(len(outputs)):\n        print(\"\\n\\n==========\\n\")\n        print(outputs[i])\n```\nThe error\n```\nTraceback (most recent call last):\n  File \"/sft-qwen3-omni/vllm_inference.py\", line 44, in <module>\n    llm = LLM(\n          ^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/llm.py\", line 334, in __init__\n    self.llm_engine = LLMEngine.from_engine_args(\n                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/llm_engine.py\", line 183, in from_engine_args\n    return cls(\n           ^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/llm_engine.py\", line 109, in __init__\n    self.engine_core = EngineCoreClient.make_client(\n                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core_client.py\", line 93, in make_client\n    return SyncMPClient(vllm_config, executor_class, log_stats)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core_client.py\", line 642, in __init__\n    super().__init__(\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core_client.py\", line 471, in __init__\n    with launch_core_engines(vllm_config, executor_class, log_stats) as (\n  File \"/usr/lib/python3.12/contextlib.py\", line 144, in __exit__\n    next(self.gen)\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/utils.py\", line 903, in launch_core_engines\n    wait_for_engine_startup(\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/utils.py\", line 960, in wait_for_engine_startup\n    raise RuntimeError(\nRuntimeError: Engine core initialization failed. See root cause above. Failed core proc(s): {'EngineCore_DP0': 1}\n[root:]$ python sft-qwen3-omni/vllm_inference.py\n[2025-12-16 12:25:00] INFO vision_process.py:42: set VIDEO_TOTAL_PIXELS: 90316800\nINFO 12-16 12:25:00 [utils.py:253] non-default args: {'trust_remote_code': True, 'seed': 17114, 'max_model_len': 32768, 'gpu_memory_utilization': 0.95, 'max_num_seqs': 8, 'disable_log_stats': True, 'limit_mm_per_prompt': {'image': 3, 'video': 3, 'audio': 3}, 'model': 'Qwen3-Omni-30B-A3B-Instruct'}\nThe argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.\nUnrecognized keys in `rope_scaling` for 'rope_type'='default': {'mrope_interleaved', 'interleaved', 'mrope_section'}\nUnrecognized keys in `rope_scaling` for 'rope_type'='default': {'interleaved', 'mrope_section'}\nINFO 12-16 12:25:00 [model.py:637] Resolved architecture: Qwen3OmniMoeForConditionalGeneration\nINFO 12-16 12:25:00 [model.py:1750] Using max model len 32768\nINFO 12-16 12:25:00 [scheduler.py:228] Chun",
    "url": "https://github.com/vllm-project/vllm/issues/30776",
    "state": "open",
    "labels": [
      "bug",
      "usage"
    ],
    "created_at": "2025-12-16T12:30:18Z",
    "updated_at": "2025-12-17T17:03:34Z",
    "comments": 50,
    "user": "Auraithm"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 15260,
    "title": "SGLang installs newer PyTorch automatically \u2013 is there an official SGLang \u2194 PyTorch compatibility guide?",
    "body": "Hi SGLang team, thank you for the great project!\n\nI have a question regarding **PyTorch version compatibility and installation**.\n\nCurrently, the recommended installation command from the website is:\n\n```bash\nuv pip install \"sglang\" --prerelease=allow\n```\n\nHowever, when using this command, `pip/uv` automatically upgrades PyTorch to the latest version (e.g., torch 2.9.1).\nIn my environment, I am intentionally pinned to **torch 2.8.x** and would prefer not to upgrade.\n\nAt the moment, it\u2019s not clear:\n\n* Which **SGLang versions are compatible with which PyTorch versions**\n* Whether older SGLang releases are expected to work with torch 2.8\n* What the recommended installation approach is for users who need to keep a specific torch version\n\n### **Questions**\n\n1. Is there an **official or recommended SGLang \u2194 PyTorch compatibility matrix**?\n2. For users pinned to torch 2.8.x, which SGLang version is recommended?\n3. Is it safe to install SGLang with `--no-deps` or a constraints file to prevent torch upgrades?\n4. Would it be possible to document supported torch versions in the release notes or README?\n\n### **Why this matters**\n\nMany users run SGLang in **production or CUDA-pinned environments**, where upgrading PyTorch is non-trivial. Clear guidance would help avoid dependency conflicts and accidental upgrades.\n\nThanks again for your work \u2014 any guidance would be greatly appreciated!",
    "url": "https://github.com/sgl-project/sglang/issues/15260",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-16T12:27:59Z",
    "updated_at": "2025-12-16T12:27:59Z",
    "comments": 0,
    "user": "David-19940718"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30757,
    "title": "[Performance]: Async sched: Why return AsyncGPUModelRunnerOutput util func sample_tokens",
    "body": "### Proposal to improve performance\n\nWhy is AsyncGPUModelRunnerOutput returned only after sample_tokens, not immediately after execute_model?\nhttps://github.com/vllm-project/vllm/blob/0d0c929f2360cde5bae6817ad0f555641329e79d/vllm/v1/engine/core.py#L420-L422\nIf we defer returning AsyncGPUModelRunnerOutput until after sampling, there's a high chance that the async future completes immediately because `AsyncGPUModelRunnerOutput.get_output` is really light workload. As a result, the batch_queue size may effectively remain at 1, preventing overlap between model forward and scheduling of the next batch.\nhttps://github.com/vllm-project/vllm/blob/0d0c929f2360cde5bae6817ad0f555641329e79d/vllm/v1/engine/core.py#L430-L438\n\n### Report of performance regression\n\n_No response_\n\n### Misc discussion on performance\n\n_No response_\n\n### Your current environment (if you think it is necessary)\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30757",
    "state": "open",
    "labels": [
      "performance"
    ],
    "created_at": "2025-12-16T08:26:08Z",
    "updated_at": "2025-12-16T08:26:49Z",
    "comments": 0,
    "user": "iwzbi"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16271,
    "title": "Android: load model from assets",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nIt is simple, there is no way to read model directly from assets. The assets are files bundled in the Android apps.\nThe assets are not handled the same way as regular files -- they can be accessed only through [assets manager](https://developer.android.com/reference/kotlin/android/content/res/AssetManager.html). \n\n\n### Alternatives\n\nAs a workaround, the model could be loaded from assets and stored into regular file which is then read by the ExecuTorch\n```kotlin\nval file = File(context.filesDir, modelName)\ncontext.assets.open(modelAssetsPath).use { inputStream ->\n\tFileOutputStream(file).use { outputStream ->\n\t\tinputStream.copyTo(outputStream)\n\t}\n}\n\n// here we can initialize the model\nval model = Module.load(file.absolutePath)\n```\n\n### Additional context\n\nThere is generally two way how it could look like:\n- initialization from `ByteArray`(Kotlin) / `byte[]` (Java) like in ONNX runtime\n- directly from the assets using asset path and assets manager as parameters like done in LiteRT/TFLite.\n\n### RFC (Optional)\n\n_No response_",
    "url": "https://github.com/pytorch/executorch/issues/16271",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-16T03:40:03Z",
    "updated_at": "2025-12-17T21:10:12Z",
    "comments": 2,
    "user": "Bludator"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30736,
    "title": "[Bug] DCP/DBO: 'NoneType' error building attention_metadata during DeepSeek-V3.1 deployment dummy run",
    "body": "### Your current environment\n\n```bash\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.10.0a0+git9166f61\nIs debug build               : False\nCUDA used to build PyTorch   : 12.9\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.10.19 | packaged by conda-forge | (main, Oct 22 2025, 22:29:10) [GCC 14.3.0] (64-bit runtime)\nPython platform              : Linux-5.15.0-124-generic-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.9.86\nCUDA_MODULE_LOADING set to   :\nGPU models and configuration :\nGPU 0                        : NVIDIA H200\nGPU 1                        : NVIDIA H200\nGPU 2                        : NVIDIA H200\nGPU 3                        : NVIDIA H200\nGPU 4                        : NVIDIA H200\nGPU 5                        : NVIDIA H200\nGPU 6                        : NVIDIA H200\nGPU 7                        : NVIDIA H200\n\nNvidia driver version        : 570.124.06\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n         vLLM Info\n==============================\nROCM Version                 : Could not collect\nvLLM Version                 : 0.11.1rc4.dev1340+gd08981aba.d20251215 (git sha: d08981aba, date: 20251215)\nvLLM Build Flags:\nCUDA Archs                   : 9.0\nROCm                         : Disabled\n```\n\n### \ud83d\udc1b Describe the bug\n\nWhen starting  vllm serve  with the command below, it fails during the final dummy run step and does not start successfully.\n\nStartup Command:\n\n```bash\nvllm serve deepseek-ai/DeepSeek-V3.1-Terminus \\\n      --enable-dbo \\\n      --stream-interval 10 \\\n      --api-server-count 2 \\\n      --max-num-batched-tokens 32768 \\\n      --max-num-seqs 256 \\\n      --long-prefill-token-threshold 16384 \\\n      --scheduling-policy fcfs \\\n      --data-parallel-size 2 \\\n      --data-parallel-size-local 2 \\\n      --tensor-parallel-size 4 \\\n      --decode-context-parallel-size 4 \\\n      --data-parallel-backend mp \\\n      --distributed-executor-backend mp \\\n      --enable-expert-parallel \\\n      --all2all-backend deepep_low_latency \\\n      --max-model-len 131072 \\\n      --gpu-memory-utilization 0.8 \\\n      --quantization \"fp8\" \\\n      --trust-remote-code \\\n      --enable-auto-tool-choice \\\n      --tool-call-parser \"deepseek_v31\" \\\n      --chat-template dpsk-v3.1-tool-parser-vllm.jinja \\\n      --host ${HOST} \\\n      --port ${PORT} \\\n```\n\nError Output\uff1a\n\n```bash\n(Worker_DP1_TP0_DCP0_EP4 pid=479) ERROR 12-15 10:54:08 [multiproc_executor.py:822] WorkerProc hit an exception.\n(Worker_DP1_TP0_DCP0_EP4 pid=479) ERROR 12-15 10:54:08 [multiproc_executor.py:822] Traceback (most recent call last):\n(Worker_DP1_TP0_DCP0_EP4 pid=479) ERROR 12-15 10:54:08 [multiproc_executor.py:822]   File \"/home/jovyan/rl/.pixi/envs/infer/lib/python3.12/site-packages/vllm/v1/executor/multiproc_executor.py\", line 817, in worker_busy_loop\n(Worker_DP1_TP0_DCP0_EP4 pid=479) ERROR 12-15 10:54:08 [multiproc_executor.py:822]     output = func(*args, **kwargs)\n(Worker_DP1_TP0_DCP0_EP4 pid=479) ERROR 12-15 10:54:08 [multiproc_executor.py:822]              ^^^^^^^^^^^^^^^^^^^^^\n(Worker_DP1_TP0_DCP0_EP4 pid=479) ERROR 12-15 10:54:08 [multiproc_executor.py:822]   File \"/home/jovyan/rl/.pixi/envs/infer/lib/python3.12/site-packages/vllm/v1/worker/gpu_worker.py\", line 448, in compile_or_warm_up_model\n(Worker_DP1_TP0_DCP0_EP4 pid=479) ERROR 12-15 10:54:08 [multiproc_executor.py:822]     cuda_graph_memory_bytes = self.model_runner.capture_model()\n(Worker_DP1_TP0_DCP0_EP4 pid=479) ERROR 12-15 10:54:08 [multiproc_executor.py:822]                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(Worker_DP1_TP0_DCP0_EP4 pid=479) ERROR 12-15 10:54:08 [multiproc_executor.py:822]   File \"/home/jovyan/rl/.pixi/envs/infer/lib/python3.12/site-packages/vllm/v1/worker/gpu_model_runner.py\", line 4541, in capture_model\n(Worker_DP1_TP0_DCP0_EP4 pid=479) ERROR 12-15 10:54:08 [multiproc_executor.py:822]     self._capture_cudagraphs(\n(Worker_DP1_TP0_DCP0_EP4 pid=479) ERROR 12-15 10:54:08 [multiproc_executor.py:822]   File \"/home/jovyan/rl/.pixi/envs/infer/lib/python3.12/site-packages/vllm/v1/worker/gpu_model_runner.py\", line 4615, in _capture_cudagraphs\n(Worker_DP1_TP0_DCP0_EP4 pid=479) ERROR 12-15 10:54:08 [multiproc_executor.py:822]     self._dummy_run(\n(Worker_DP1_TP0_DCP0_EP4 pid=479)",
    "url": "https://github.com/vllm-project/vllm/issues/30736",
    "state": "open",
    "labels": [
      "bug",
      "help wanted"
    ],
    "created_at": "2025-12-16T03:07:59Z",
    "updated_at": "2025-12-22T17:11:48Z",
    "comments": 3,
    "user": "Butterfingrz"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1487,
    "title": "License clarification for some of the converted models",
    "body": "### Question\n\nHello!\n\nI want to use [Xenova/whisper-small](https://huggingface.co/Xenova/whisper-small) and [Xenova/UAE-Large-V1](https://huggingface.co/Xenova/UAE-Large-V1) in a project, but I noticed that these model cards on Hugging Face do not have a license specified in their metadata or README.\n\nSince the original weights from OpenAI and WhereIsAI are licensed, I assume these converted ONNX versions are intended to follow the same or a similar open-source licenses. Could you please clarify:\n\n- Are these models safe to use for commercial/personal projects?\n- Is it possible to update the model cards to explicitly include the license tag?\n\n\nThanks again!",
    "url": "https://github.com/huggingface/transformers.js/issues/1487",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-12-16T00:27:16Z",
    "updated_at": "2025-12-16T19:13:09Z",
    "user": "rmahdav"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30722,
    "title": "[Bug]: llama4_pythonic tool parser fails with SyntaxError on nested list parameters",
    "body": "### Your current environment\n\nI don't have direct access to the cluster the model is running in. But it's running on 8x H100 GPUs using TP 8, expert parallel. \n\nThis is the fp8 model from Huggingface.\n\nThese are the vllm serve args I'm using:\n\nVLLM Version: 0.11.0\n\n```\n--port 8002 \n--model /config/models/maverick \n--device cuda \n--tensor-parallel-size 8 \n--disable-log-requests \n--max-num-batched-tokens 16000 \n--served-model-name 'llama-4-maverick-17b-128e-instruct' \n--limit-mm-per-prompt image=50 \n--kv-cache-dtype fp8 \n--trust-remote-code \n--enable-auto-tool-choice \n--enable-chunked-prefill true \n--enable-prefix-caching \n--tool-call-parser llama4_pythonic \n--enable-expert-parallel \n--chat-template examples/tool_chat_template_llama4_pythonic.jinja \n--override-generation-config '{\\\"attn_temperature_tuning\\\": true}' \n--max-model-len 1000000\n```\n\n### \ud83d\udc1b Describe the bug\n\n### Description\n\nThe `llama4_pythonic` tool parser intermittently fails to parse valid tool calls, resulting in:\n1. `SyntaxError` from `ast.parse()` when model output is malformed (missing closing `]`)\n2. Valid pythonic syntax returned as `content` instead of being parsed into `tool_calls`\n\n### Reproduction\n\n**Minimal curl (run 10+ times to observe intermittent failure):**\n\n```bash\ncurl -X POST https://your-vllm-endpoint/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"llama-4-maverick-17b-128e-instruct\",\n    \"messages\": [\n      {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n      {\"role\": \"user\", \"content\": \"how do I enroll in benefits?\"}\n    ],\n    \"tools\": [{\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"enterprise_search\",\n        \"description\": \"Search enterprise knowledge base\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"query\": {\"type\": \"string\"},\n            \"rephrased_queries\": {\n              \"type\": \"array\",\n              \"items\": {\"type\": \"string\"},\n              \"description\": \"List of 2 rephrased queries\"\n            }\n          },\n          \"required\": [\"query\", \"rephrased_queries\"]\n        }\n      }\n    }],\n    \"tool_choice\": \"auto\",\n    \"max_tokens\": 500,\n    \"temperature\": 0,\n    \"top_p\": 0.95\n  }'\n```\n\n**Observed results (10 identical requests):**\n- 7/10: \u2705 `finish_reason: \"tool_calls\"`, properly parsed\n- 3/10: \u274c `finish_reason: \"stop\"`, pythonic syntax in `content` field, empty `tool_calls`\n\n### Failure Modes Observed\n\n**Mode 1: Valid pythonic not parsed**\n```json\n{\n  \"finish_reason\": \"stop\",\n  \"message\": {\n    \"content\": \"[enterprise_search(query=\\\"Benefits enrollment\\\", rephrased_queries=[\\\"...\\\", \\\"...\\\"])]\",\n    \"tool_calls\": []\n  }\n}\n```\nParser fails to detect valid syntax \u2192 returned as content.\n\n**Mode 2: Model generates text after tool call**\n```json\n{\n  \"content\": \"[enterprise_search(...)]\\n\\nI was unable to execute this task...\"\n}\n```\nModel mixes tool call + text, which violates parser assumption.\n\n**Mode 3: Malformed output (missing bracket)**\n```\n[enterprise_search(query='...', rephrased_queries=['...', '...'])\n```\nModel hits `stop_reason: 200007` before completing \u2192 `ast.parse()` throws SyntaxError.\n\n### Suspected Root Cause\n\n***The below is suggested by Claude Opus 4.5 so take with a grain of salt.***\n\n1. **Parser detection inconsistency** - Valid pythonic output intermittently not recognized as tool call\n2. **No text-after-tool-call handling** - Parser fails when model appends text after `]`\n3. **Stop token interference** - Model sometimes hits stop token (200007) mid-generation before completing brackets\n4. **Nested bracket complexity** - Array parameters (`rephrased_queries`) create `[...[...]...]` nesting that may confuse detection\n\n### Error Logs\n\n[err.txt](https://github.com/user-attachments/files/24175232/err.txt)\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30722",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-15T21:26:24Z",
    "updated_at": "2025-12-15T21:26:24Z",
    "comments": 0,
    "user": "mphilippnv"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16265,
    "title": "viable/strict is advancing even if docker build failed",
    "body": "### \ud83d\udc1b Describe the bug\n\nCan we block viable/strict advancement when docker build failed?\n\n### Versions\n\nCI only",
    "url": "https://github.com/pytorch/executorch/issues/16265",
    "state": "closed",
    "labels": [],
    "created_at": "2025-12-15T20:42:25Z",
    "updated_at": "2025-12-17T22:56:47Z",
    "comments": 0,
    "user": "kirklandsign"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16263,
    "title": "Android Documentation - Improve Llama example",
    "body": "### \ud83d\udcda The doc issue\n\nFeedback from UnSloth on how to run Android llama example : https://docs.google.com/document/d/1GB3edTlBQfc4Ar0yiBTELKynhwa1hstwKhJxpq3ATVE/edit?tab=t.0\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/executorch/issues/16263",
    "state": "open",
    "labels": [
      "android_ux"
    ],
    "created_at": "2025-12-15T19:32:41Z",
    "updated_at": "2025-12-15T19:32:41Z",
    "comments": 0,
    "user": "psiddh"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16260,
    "title": "Android UX: Prebuilt APKs for Android apps",
    "body": "Helps in overall E2E experience for the Devs, With least friction Android Devs can install and test prebuilt apk w/o having to setup a more cumbersome path of building from sources.\n\n- Llama Demo apk\n- dl3 demo apk",
    "url": "https://github.com/pytorch/executorch/issues/16260",
    "state": "open",
    "labels": [
      "android_ux"
    ],
    "created_at": "2025-12-15T19:23:14Z",
    "updated_at": "2025-12-15T19:38:33Z",
    "comments": 0,
    "user": "psiddh"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1913,
    "title": "Wrong and unsuppressable print when instantiating BPE",
    "body": "I am running Python code that is of the form\n\n```python\nfrom transformers import PreTrainedTokenizerFast\nfrom tokenizers import Tokenizer\nfrom tokenizers.models import BPE\n\nvocab = {\"a\": 5, \"b\": 6, \"ab\": 7}\nmerges = [(\"a\",\"b\")]\n\nbackend_of_backend_of_backend = BPE(vocab=vocab, merges=merges, dropout=None)\nbackend_of_backend            = Tokenizer(model=backend_of_backend_of_backend)\nbackend                       = PreTrainedTokenizerFast(tokenizer_object=backend_of_backend)\n```\n\nThe line `BPE(vocab=vocab, merges=merges, dropout=None)` has nothing to do with serialisation. Yet, when I run it, an unwanted print\n```\nThe OrderedVocab you are attempting to save contains holes for indices [0, 1, 2, 3, 4], your vocabulary could be corrupted!\n```\nappears in my console, which seems to come from\n\nhttps://github.com/huggingface/tokenizers/blob/f7db48f532b3d4e3c65732cf745fe62863cbe5fa/tokenizers/src/models/mod.rs#L53-L56\n\nNot only is the print wrong (I am not trying to **save** anything), but also, it cannot be suppressed by redirecting `stdout` and `stderr` in Python. \n\n`println!` does not belong in low-level code, so at the very least, we need a way to disable it. But besides, what is this print even for, given that it says something about **saving** when we are **loading** a tokenizer?",
    "url": "https://github.com/huggingface/tokenizers/issues/1913",
    "state": "closed",
    "labels": [],
    "created_at": "2025-12-15T16:30:46Z",
    "updated_at": "2026-01-05T13:02:45Z",
    "comments": 4,
    "user": "bauwenst"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 2153,
    "title": "[Question] composable activation checkpoint",
    "body": "I'm looking for a way that not to use module wrapper to apply activation checkpoint, and  I found this https://github.com/pytorch/pytorch/pull/87664/files.\nIs this method works fine? Or it just a demo code",
    "url": "https://github.com/pytorch/torchtitan/issues/2153",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-12-15T13:54:08Z",
    "updated_at": "2025-12-16T22:25:59Z",
    "user": "Irvingwangjr"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30694,
    "title": "[Feature]: CompressedTensors: NVFP4A16 not supported for MoE models",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nNVFP4A16 (W4A16 FP4) quantization via compressed_tensors works for dense models but fails on MoE models like Qwen3-30B-A3B.\n\nLooking at `compressed_tensors_moe.py`, `_is_fp4a16_nvfp4` is checked for Linear layers but not in `get_moe_method()` for FusedMoE. Only W4A4 has a MoE method (`CompressedTensorsW4A4Nvfp4MoEMethod`).\n\nSince the Marlin kernel already supports FP4 weights + FP16 activations, is there a plan to add W4A16 MoE support for compressed_tensors? \n\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30694",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-12-15T13:29:09Z",
    "updated_at": "2025-12-21T09:27:38Z",
    "comments": 2,
    "user": "zhangyimi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 170426,
    "title": "argmax over multiple axis",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nIs there any chance we are getting `argmax` to work also on multiple axis?\nI feel that the usage of [unravel_index](https://docs.pytorch.org/docs/stable/generated/torch.unravel_index.html) is so error prone that would make sense to just have it part of the library... and to be fair does not so hard to implement\n\nprobably duplicate of `torch.max().indices`... but that also does not support multiple axis\n\n\ncc @albanD",
    "url": "https://github.com/pytorch/pytorch/issues/170426",
    "state": "open",
    "labels": [
      "triaged",
      "module: python frontend"
    ],
    "created_at": "2025-12-15T11:03:36Z",
    "updated_at": "2025-12-18T15:37:31Z",
    "comments": 0,
    "user": "AlbertoSinigaglia"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30685,
    "title": "[Feature]: fp8 kv cache for finer-grained scaling factors (e.g., per channel).",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nCurrently, the FP8 KV cache feature (in the FlashMLA interface) only supports per-tensor (scalar) scaling factors. Are you developing support for finer-grained scaling factors (e.g., per-channel)? If so, when can we expect the FP8 KV cache with such finer-grained scaling factors to be completed?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30685",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-12-15T09:32:48Z",
    "updated_at": "2025-12-15T09:32:48Z",
    "comments": 0,
    "user": "zx-ai"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42868,
    "title": "sdpa_paged: How does it handle paged cache without padding?",
    "body": "Hi @ArthurZucker ,\n\nI was analyzing the [sdpa_paged](https://github.com/huggingface/transformers/blob/main/src/transformers/integrations/sdpa_paged.py#L18) implementation and found the approach quite fascinating. I have a question regarding how the input shapes are handled.\n\nIf I have a batch of 4 sequences with lengths **32, 32, 64, and 128**, a standard SDPA call usually expects a shape of `[4, 128]` (Batch Size, Max Seq Len), where the shorter sequences are padded to 128.\n\nHowever, in this implementation, it appears that the input to SDPA is a flattened tensor with shape **`[1, 256]`** (the sum of all lengths: $32+32+64+128$), implying that no padding is used and the sequences are concatenated.\n\nCould you explain how standard SDPA produces the correct result in this case? Specifically, how does it differentiate between the sequences to prevent cross-sequence attention within this single packed batch?\n\nThanks for your time!\n\n\nrelated PR: #38085",
    "url": "https://github.com/huggingface/transformers/issues/42868",
    "state": "closed",
    "labels": [],
    "created_at": "2025-12-15T08:39:00Z",
    "updated_at": "2025-12-16T03:08:27Z",
    "comments": 4,
    "user": "jiqing-feng"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16244,
    "title": "How to let executorch export intput output int8",
    "body": "Hi,\n\nI use https://github.com/pytorch/executorch/blob/main/examples/arm/ethos_u_minimal_example.ipynb to export example model and run on FVP.\nThe output is 2.0(float).\n\nBut I modify the code and that it output and intput to be int8. But the output at FVP show 1(char).\nI think that it is wrong. How can I fix it?\n\n<img width=\"1488\" height=\"672\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9d9a3fc9-97a4-4f4d-a7c2-84e936c02e72\" />\n\n```\n\nfrom executorch.backends.arm.ethosu import EthosUPartitioner\nfrom executorch.exir import (\n    EdgeCompileConfig,\n    ExecutorchBackendConfig,\n    to_edge_transform_and_lower,\n)\nfrom executorch.extension.export_util.utils import save_pte_program\nfrom executorch.exir.passes.quantize_io_pass import QuantizeInputs, QuantizeOutputs\n\n\n\n# Create partitioner from compile spec\npartitioner = EthosUPartitioner(compile_spec)\n\n# Lower the exported program to the Ethos-U backend\nedge_program_manager = to_edge_transform_and_lower(\n            quantized_exported_program,\n            partitioner=[partitioner],\n            compile_config=EdgeCompileConfig(\n                _check_ir_validity=False,\n            ),\n        )\nedge_program_manager.transform(passes=[QuantizeInputs(edge_program_manager, [0, 1]), QuantizeOutputs(edge_program_manager, [0])])\n# Convert edge program to executorch\nexecutorch_program_manager = edge_program_manager.to_executorch(\n            config=ExecutorchBackendConfig(extract_delegate_segments=False)\n        )\n\n_ = executorch_program_manager.exported_program().graph_module.print_readable()\n\n# Save pte file\nsave_pte_program(executorch_program_manager, \"ethos_u_minimal_example_test_inout_int8.pte\")\n```\n\nBy the way, according to https://github.com/pytorch/executorch/issues/7590\nHow can the embedded application access the quantisation scale & zero point finally? \n\nThanks,\nKris\n\ncc @freddan80 @per @zingo @oscarandersson8218 @digantdesai",
    "url": "https://github.com/pytorch/executorch/issues/16244",
    "state": "open",
    "labels": [
      "partner: arm"
    ],
    "created_at": "2025-12-15T06:45:32Z",
    "updated_at": "2025-12-24T01:36:24Z",
    "user": "kris-himax"
  },
  {
    "repo": "huggingface/trl",
    "number": 4692,
    "title": "LLVM error during GRPO training with Apple M4 Max",
    "body": "I have the below error while doing GRPO training. I am using HuggingFace example codes for GRPO. I couldn't run the model  on MPS because of this issue. \nHow can I run GRPO on MPS?\n\nloc(\"mps_matmul\"(\"(mpsFileLoc): /AppleInternal/Library/BuildRoots/4~B_wkugAG-524HdEQLaK0kvU7Y_D8Jtm6UxMaIoY/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm\":43:0)): error: incompatible dimensions\nloc(\"mps_matmul\"(\"(mpsFileLoc): /AppleInternal/Library/BuildRoots/4~B_wkugAG-524HdEQLaK0kvU7Y_D8Jtm6UxMaIoY/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm\":43:0)): error: invalid shape\nLLVM ERROR: Failed to infer result type(s).\n\nDetails: \nOS: Tahoe 26.2\npytorch 2.9.1\ntrl: 0.26.1\nMLX:0.30.0\n\n\n\n\n\n",
    "url": "https://github.com/huggingface/trl/issues/4692",
    "state": "open",
    "labels": [
      "\ud83d\udc1b bug",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-12-14T23:01:49Z",
    "updated_at": "2025-12-14T23:02:11Z",
    "comments": 0,
    "user": "neslihaneti"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30654,
    "title": "[Feature][Attention][UX]: Incorporate Features into Attention Selection",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nSUMMARY:\n* we have default attention backends by priority and a notion of which backend supports what hw\n* however, certain features are not considered in this (e.g. fp8 kv cache, e.g. attention sinks)\n\nRecent example, we had test failures because we updated the logic to load kv cache quantization from the model config. But since CUTLASS_MLA is the default backend on B200, we started seeing test failures (since CUTLASS MLA does not support fp8 kv cache) because we were not automatically falling back to FLASHINFER_MLA (which does)\n\n\nSo the proposal is to:\n- make sure all attention backends report what features are supported\n- update the attention selector to consider these features in the selection\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30654",
    "state": "open",
    "labels": [
      "help wanted",
      "good first issue",
      "feature request"
    ],
    "created_at": "2025-12-14T18:04:14Z",
    "updated_at": "2025-12-30T05:38:40Z",
    "comments": 11,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 170400,
    "title": "Clarify inverted boolean mask logic between nn.MultiHeadAttention and F.scaled_dot_product_attention",
    "body": "### \ud83d\udcda The doc issue\n\n### \ud83d\ude80 Motivation\n\nI am opening this issue to suggest a documentation improvement regarding a common \"gotcha\" when migrating between `nn.MultiHeadAttention` (MHA) and `F.scaled_dot_product_attention` (SDPA).\n\nMany users (including myself) have noticed that the boolean mask semantics are inverted between these two APIs, which can lead to silent bugs during migration.\n\n### \ud83d\udd0d The Inconsistency\n\n  * **`nn.MultiHeadAttention` (`key_padding_mask`)**: `True` means **PADDING** (Ignore/Mask out).\n  * **`F.scaled_dot_product_attention` (`attn_mask`)**: `True` means **KEEP** (Attend to).\n\nWhile this behavior is hinted at in the SDPA docstring's pseudo-code implementation:\n\n```python\nif attn_mask.dtype == torch.bool:\n    attn_bias.masked_fill_(attn_mask.logical_not(), float(\"-inf\"))\n```\n\nThe use of `.logical_not()` confirms that SDPA expects `True` to be kept, whereas MHA expects `True` to be masked. This implicit difference is easy to overlook if one relies solely on parameter names or prior MHA experience.\n\n### \u2705 Verification\n\nI have verified this behavior with a minimal reproduction script on PyTorch 2.5.1, confirming that passing the identical boolean mask to both APIs results in opposite attention patterns (MHA ignores the `True` index, while SDPA attends to it).\n\nThanks for considering this clarification\\!\n\n### Suggest a potential alternative/fix\n\nTo improve Developer Experience (DX) and prevent confusion for users moving in either direction (MHA -\\> SDPA or SDPA -\\> MHA), I suggest adding a **Note** or **Warning** block in the documentation for `F.scaled_dot_product_attention`.\n\n**Example phrasing:**\n\n> **Note:** The boolean mask semantics for `attn_mask` here are the **inverse** of `nn.MultiHeadAttention.forward`'s `key_padding_mask`.\n>\n>   * In `F.scaled_dot_product_attention`, `True` indicates values to **participate** in attention.\n>   * In `nn.MultiHeadAttention`, `True` indicates values to be **masked out** (padding).\n>\n> If migrating from MHA, ensure you invert your boolean mask (e.g., using `~mask` or `mask.logical_not()`).\n\ncc @svekars @sekyondaMeta @AlannaBurke @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki",
    "url": "https://github.com/pytorch/pytorch/issues/170400",
    "state": "closed",
    "labels": [
      "module: docs",
      "module: nn",
      "triaged",
      "module: sdpa"
    ],
    "created_at": "2025-12-14T13:07:19Z",
    "updated_at": "2025-12-23T20:44:24Z",
    "comments": 1,
    "user": "konodiodaaaaa1"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12838,
    "title": "Merge Loras for FLUX",
    "body": "The issue is based on https://huggingface.co/docs/diffusers/main/using-diffusers/merge_loras \n\nIs there a similar procedure for merging loras for FLUX models? The guide seems to be specific for UNet based methods. I'm working on FLUX-dev and I would like to perform a linear merge of my loras. ",
    "url": "https://github.com/huggingface/diffusers/issues/12838",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-14T12:39:41Z",
    "updated_at": "2025-12-14T12:39:41Z",
    "comments": 0,
    "user": "shrikrishnalolla"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30633,
    "title": "[Installation]: How to install vLLM 0.11.0 with CUDA < 12.9 (Driver 535)? No matching wheels found",
    "body": "### Your current environment\n\nI\u2019m trying to install vLLM 0.11.0 on a machine with NVIDIA Driver 535, and I ran into issues related to CUDA version compatibility.\n\nEnvironment\n\nOS: Linux (Ubuntu 20.04 / 22.04)\n\nGPU: NVIDIA GPU  H20\n\nNVIDIA Driver: 535.xx\n\nPython: 3.10\n\nvLLM version: 0.11.0\n\nProblem\n\nAccording to the release information for vLLM 0.11.0, the available prebuilt wheels appear to target CUDA 12.9+.\nHowever, with Driver 535, CUDA 12.9 is not supported, and I cannot find any official wheels for CUDA 12.1 / 12.2 / 12.4 or lower.\n\nThis leads to the following questions:\n\nIs vLLM 0.11.0 officially compatible with CUDA versions < 12.9?\n\nIf yes, what is the recommended way to install it on systems with Driver 535?\n\nBuild from source with a specific CUDA version?\n\nUse a specific Docker image?\n\nPin to an older vLLM release?\n\nAre there plans to provide prebuilt wheels for CUDA 12.1 / 12.4, or is CUDA 12.9+ now a hard requirement going forward?\n\nWhat I\u2019ve tried\n\nChecked the GitHub Releases page for vLLM 0.11.0 \u2014 no wheels for CUDA < 12.9\n\nVerified that upgrading CUDA to 12.9 is not possible with Driver 535\n\nLooked for documentation on source builds for older CUDA versions, but didn\u2019t find clear guidance\n\nAny clarification or recommended workflow would be greatly appreciated.\nThanks in advance!\n\n### How you are installing vllm\n\n```sh\npip install -vvv vllm\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30633",
    "state": "open",
    "labels": [
      "installation"
    ],
    "created_at": "2025-12-14T04:29:41Z",
    "updated_at": "2026-01-01T16:50:50Z",
    "comments": 1,
    "user": "whu125"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30630,
    "title": "[Usage]: SymmMemCommunicator: Device capability 10.3 not supported",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nHi, I am seeing following warning using vllm serve on B300 instances.\n```\nWARNING 12-13 16:31:15 [symm_mem.py:67] SymmMemCommunicator: Device capability 10.3 not supported, communicator is not available.\n```\nvllm launch  command\n```\nvllm serve \\\n        --tensor-parallel-size 4 \\\n        --kv-cache-dtype fp8 \\\n        --tool-call-parser glm45 \\\n        --reasoning-parser glm45 \\\n        --enable-auto-tool-choice \\\n        --model zai-org/GLM-4.6-FP8'\n```\nI built docker image using latest vllm on main branch commit 0e71eaa6447d99e76de8e03213ec22bc1d3b07df . Updated triton version to 3.5.1  and torch version to 2.9.1  to avoid compatibility issue from triton ([issue](https://github.com/triton-lang/triton/issues/8473)). \n\nfor same config benchmarking, I am seeing same perf as H200 (slightly worse) than B300. Is B300 fully supported on vllm yet?\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30630",
    "state": "open",
    "labels": [
      "usage",
      "nvidia"
    ],
    "created_at": "2025-12-14T01:00:34Z",
    "updated_at": "2025-12-18T21:17:42Z",
    "comments": 4,
    "user": "navmarri14"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1484,
    "title": "Should npm @xenova/transformers be deleted or marked deprecated?",
    "body": "### Question\n\nHello,\nI was surprised that none of the models I\u00a0tried were supported by transformerjs, even if they were using transformerjs in their README, until I realized that I was using the old npm package.\n\nShouldn't this package be removed ? Or marked as deprecated in favour of huggingface's ?\n\nBest,",
    "url": "https://github.com/huggingface/transformers.js/issues/1484",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-12-13T19:49:08Z",
    "updated_at": "2025-12-17T12:21:12Z",
    "user": "matthieu-talbot-ergonomia"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1910,
    "title": "[Docs] `Visualizer` dead links",
    "body": "It seems like documentation for `Visualizer` is out of date and all the links return 404.\n\nDocs: https://huggingface.co/docs/tokenizers/api/visualizer\nGithub Source: https://github.com/huggingface/tokenizers/blob/main/bindings/python/py_src/tokenizers/tools/visualizer.py",
    "url": "https://github.com/huggingface/tokenizers/issues/1910",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-13T19:23:33Z",
    "updated_at": "2025-12-13T19:23:33Z",
    "comments": 0,
    "user": "dudeperf3ct"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30621,
    "title": "[Feature]: Remove MXFP4 Logic From `fused_experts`",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nSUMMARY:\n* as part of effort to refactor MoE, trying to reduce cruft\n* we currently only have MX emulation in vLLM\n* the logic for this emulation should be moved into quark\n\nhttps://github.com/vllm-project/vllm/blame/main/vllm/model_executor/layers/fused_moe/fused_moe.py#L1866-L1899\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30621",
    "state": "open",
    "labels": [
      "help wanted",
      "good first issue",
      "feature request"
    ],
    "created_at": "2025-12-13T18:30:30Z",
    "updated_at": "2026-01-04T14:47:45Z",
    "comments": 13,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30620,
    "title": "[Feature]: Remove Chunking From FusedMoE",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\n* we have some chunking logic in the triton kernels to avoid IMA: https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/layers/fused_moe/fused_moe.py#L1807\n* we chunk in ~65k tokens\n* this case does not happen anymore because of chunked prefill\n\nWe should remove this\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30620",
    "state": "open",
    "labels": [
      "help wanted",
      "good first issue",
      "feature request"
    ],
    "created_at": "2025-12-13T18:22:30Z",
    "updated_at": "2025-12-13T23:27:22Z",
    "comments": 3,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 170361,
    "title": "[Dynamo] Use VariableBuilder/SourcelessBuilder consistently",
    "body": "There are many places in Dynamo where we directly call a VariableTracker subclass' `create`/`__init__` from a different VariableTracker's, e.g. `call_function`, `var_getattr`. This was done in order to skip the overhead required to go through `VariableBuilder`/`SourcelessBuilder`.\n\nHowever, this has resulted in a number of soundness issues in the past (I can't find an example off the top of my head though). The reason is that when we directly construct a `VariableTracker`, we are assuming that the wrapped value is represented a certain way, which `VariableBuilder`/`SourcelessBuilder` may represent differently. The latter often has additional checks that result in greater specialization and slightly differing behavior.\n\nWe should:\n- Audit places where we manually construct `VariableTracker`s and make the construction go through `VariableBuilder`/`SourcelessBuilder` more conservatively\n- Reduce the overhead of `VariableBuilder` and `SourcelessBuilder` (esp. `VariableBuilder`, since it has a large if-statement)\n\n\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @amjames @Lucaskabela @jataylo",
    "url": "https://github.com/pytorch/pytorch/issues/170361",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo",
      "dynamo-variable-tracker"
    ],
    "created_at": "2025-12-13T01:26:10Z",
    "updated_at": "2025-12-13T02:18:29Z",
    "comments": 1,
    "user": "williamwen42"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30570,
    "title": "[Usage]: Why is VLLM still using SSE at all for mcp?",
    "body": "### Your current environment\n\nThis is a broad question: Why is vllm still using/hardcoding sse usage at all, when its been deprecated for well over six months at this point?\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30570",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-12T20:02:08Z",
    "updated_at": "2025-12-18T10:50:37Z",
    "comments": 1,
    "user": "bags307"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 170320,
    "title": "Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/ec2-user/actions-runner/_work/pytorch/pytorch/.github/actions/check-tpu'",
    "body": "> NOTE: Remember to label this issue with \"`ci: sev`\"\n>       If you want autorevert to be disabled, keep the ci: disable-autorevert label\n\n <!-- Add the `merge blocking` label to this PR to prevent PRs from being merged while this issue is open -->\n\n> [!IMPORTANT]\n> Comment the following on your PR to rebase\n> ```\n> @pytorchbot rebase -b main\n> ```\n\n\n## Current Status\n*Status could be: preemptive, ongoing, mitigated, closed. Also tell people if they need to take action to fix it (i.e. rebase)*.\n\nWith the introduction of:\n\n* #170269 \n\nDevelopers may experience workflow failures related to a composite action named check-tpu.\n\n## Error looks like\n*Provide some way users can tell that this SEV is causing their issue.*\n\n```\nCan't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/ec2-user/actions-runner/_work/pytorch/pytorch/.github/actions/check-tpu'\n```\n\n## Incident timeline (all times pacific)\n*Include when the incident began, when it was detected, mitigated, root caused, and finally closed.*\n\n## User impact\n*How does this affect users of PyTorch CI?*\n\nDevelopers should rebase their PRs past:\n\n* #170269 \n\n> [!IMPORTANT]\n> Comment the following on your PR to rebase\n> ```\n> @pytorchbot rebase -b main\n> ```\n\n## Root cause\n*What was the root cause of this issue?*\n\n* #170269 \n\n## Mitigation\n*How did we mitigate the issue?*\n\nDevelopers should rebase their PRs past:\n\n* #170269 \n\n## Prevention/followups\n*How do we prevent issues like this in the future?*\n\nWe should probably introduce a linter that prevents us from adding composite actions and referencing them in a workflow in the same PR.\n",
    "url": "https://github.com/pytorch/pytorch/issues/170320",
    "state": "closed",
    "labels": [
      "ci: sev"
    ],
    "created_at": "2025-12-12T19:30:03Z",
    "updated_at": "2025-12-14T15:36:06Z",
    "comments": 1,
    "user": "seemethere"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 170302,
    "title": "DISABLED test_opaque_obj_training_ir_to_decomp_nonstrict (__main__.TrainingIRToRunDecompExportNonStrictTestExport)",
    "body": "Platforms: rocm, xpu\n\nThis test was disabled because it is failing on [main and PRs](https://hud.pytorch.org/failure?name=rocm-mi200%20%2F%20linux-jammy-rocm-py3.10%20%2F%20test%20(default%2C%201%2C%206%2C%20linux.rocm.gpu.2%2C%20unstable)&jobName=linux-jammy-rocm-py3.10%20%2F%20test%20(default%2C%201%2C%206%2C%20linux.rocm.gpu.2%2C%20unstable)&failureCaptures=RuntimeError%3A%20Type%20%27test_export.TestExport.test_opaque_obj.%3Clocals%3E.MyInput%27) (couldn't find a more targeted link to show just this test failure). Example of [MI200 failure](https://github.com/pytorch/pytorch/actions/runs/20158110270/job/57866162668) and [MI300 failure](https://github.com/pytorch/pytorch/actions/runs/20160197548/job/57872771424)\n\ncc @gujinghui @EikanWang @fengyuan14 @guangyey @jeffdaily @sunway513 @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang",
    "url": "https://github.com/pytorch/pytorch/issues/170302",
    "state": "open",
    "labels": [
      "triaged",
      "skipped",
      "rocm-skipped-tests"
    ],
    "created_at": "2025-12-12T16:04:41Z",
    "updated_at": "2025-12-25T00:24:56Z",
    "comments": 2,
    "user": "jithunnair-amd"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 170293,
    "title": "[wheels] Missing CUDA wheels for pytorch<2.6.0",
    "body": "### \ud83d\udc1b Describe the bug\n\nFor older versions of pytorch<2.6.0, the CUDA wheels cannot be reached anymore.\n\nSystem: Windows-11-10.0.22631-SP0\nPython version: 3.13\nUsing pip 25.3\n\nExample of failing installation:\n\n` pip install torch==2.5.1 --index-url https://download.pytorch.org/whl/cu124 --isolated --verbose`\n\nOutput is mentioning pytorch 2.6.0:\n\n```\nLooking in indexes: https://download.pytorch.org/whl/cu124\nERROR: Could not find a version that satisfies the requirement torch==2.5.1 (from versions: 2.6.0+cu124)\nERROR: No matching distribution found for torch==2.5.1\n```\n\nReproducible with other pytorch versions and CUDA variants, when pytorch<2.6.0.\nExample of successful installation:\n\n` pip install torch==2.6.0 --index-url https://download.pytorch.org/whl/cu124 --isolated --verbose`\n\n\n### Versions\n\nPython version: 3.13.7 (main, Sep 18 2025, 19:43:45) [MSC v.1944 64 bit (AMD64)] (64-bit runtime)\nPython platform: Windows-11-10.0.22631-SP0\n",
    "url": "https://github.com/pytorch/pytorch/issues/170293",
    "state": "closed",
    "labels": [],
    "created_at": "2025-12-12T10:33:42Z",
    "updated_at": "2025-12-12T12:02:58Z",
    "comments": 1,
    "user": "guibruand"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 14984,
    "title": "Can the source code compilation and installation of sgl-kernel support the SM86 driver for CUDA12.9",
    "body": "### Checklist\n\n- [x] I searched related issues but found no solution.\n- [ ] The bug persists in the latest version.\n- [ ] Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.\n- [ ] If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [ ] Please use English. Otherwise, it will be closed.\n\n### Describe the bug\n\nEncountered problem: Unable to find the. so file for sm86 when installing the latest sgl-kernel0.3.19, only sm90 and higher are available\n\n### Reproduction\n\nQuestion: The machine is a GPU driver for SM86. Can installing sgl kernel in the nvcc 12.9 container source code adapt to SM86?\n\n### Environment\n\nEnvironment: The host is SM86, the nvcc version in the Docker container is 12.9, and torch and flash attn are CU129",
    "url": "https://github.com/sgl-project/sglang/issues/14984",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-12T10:29:50Z",
    "updated_at": "2025-12-15T09:41:18Z",
    "comments": 1,
    "user": "zwt-1234"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30548,
    "title": "[Feature]: Support for Q.ANT Photonic Computing ?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nhttps://qant.com/\nhttps://qant.com/wp-content/uploads/2025/11/20251111_QANT-Photonic-AI-Accelerator-Gen-2.pdf\n\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30548",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-12-12T10:16:53Z",
    "updated_at": "2025-12-12T14:45:53Z",
    "comments": 2,
    "user": "plitc"
  },
  {
    "repo": "pytorch/data",
    "number": 1520,
    "title": "Are there any plans to optimize the fetcher_state in StatefulDataLoader?",
    "body": "Since `_IterableDatasetFetcher` has no state attribute: https://github.com/pytorch/pytorch/blob/v2.6.0/torch/utils/data/_utils/fetch.py#L19, and the current `fetcher_state:dataset_iter_state` is None: https://github.com/meta-pytorch/data/blob/v0.11.0/torchdata/stateful_dataloader/worker.py#L277, could this cause prefetched data to be discarded during resume?",
    "url": "https://github.com/meta-pytorch/data/issues/1520",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-12T09:50:08Z",
    "updated_at": "2025-12-17T05:23:35Z",
    "comments": 5,
    "user": "howitry"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1909,
    "title": "[Docs] `Encode Inputs` rendering issues",
    "body": "It seems like the documentation for Encode Inputs is not rendered properly.\n\nOfficial URL: https://huggingface.co/docs/tokenizers/main/en/api/encode-inputs?code=python\nGitHub URL: https://github.com/huggingface/tokenizers/blob/main/docs/source-doc-builder/api/encode-inputs.mdx",
    "url": "https://github.com/huggingface/tokenizers/issues/1909",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-12T09:47:48Z",
    "updated_at": "2025-12-12T09:47:48Z",
    "comments": 0,
    "user": "ariG23498"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 170286,
    "title": "Can torch has a relaxed dependencies instead of strict dependencies on nvidia-cuda-runtime",
    "body": "### \ud83d\udc1b Describe the bug\n\nRight now, torch uses strict == pins for these packages (see\nhttps://github.com/pytorch/pytorch/blob/main/.github/scripts/generate_binary_build_matrix.py#L106C2-L123C7).\nIs there a specific reason these must be strict == requirements? Would it be possible to relax them to version ranges instead?\nFor example, in my setup:\ntorch==[10.0.dev](http://10.0.dev/) depends on nvidia-cuda-runtime==13.0.96\ntensorrt==10.14 depends on nvidia-cuda-runtime==13.0.88\nThis conflict causes uv to resolve to a much older torch version:\nhttps://github.com/pytorch/pytorch/issues/170286\n\nIf torch could declare a version range for nvidia-cuda-runtime instead of a strict pin, it would make dependency resolution much easier for downstream users who also depend on other CUDA-related packages.\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.10.0.dev20251210+cu130\nIs debug build: False\nCUDA used to build PyTorch: 13.0\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.3 LTS (x86_64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version: 22.0.0 (++20251015042503+856555bfd843-1~exp1~20251015042630.2731)\nCMake version: version 4.2.0\nLibc version: glibc-2.39\n\nPython version: 3.10.0 (default, Mar  3 2022, 09:58:08) [GCC 7.5.0] (64-bit runtime)\nPython platform: Linux-6.14.0-37-generic-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: 13.1.80\nCUDA_MODULE_LOADING set to: \nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 4080 SUPER\nNvidia driver version: 580.95.05\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\nCaching allocator config: N/A\n\nCPU:\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           48 bits physical, 48 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  32\nOn-line CPU(s) list:                     0-31\nVendor ID:                               AuthenticAMD\nModel name:                              AMD Ryzen 9 7950X 16-Core Processor\nCPU family:                              25\nModel:                                   97\nThread(s) per core:                      2\nCore(s) per socket:                      16\nSocket(s):                               1\nStepping:                                2\nFrequency boost:                         enabled\nCPU(s) scaling MHz:                      79%\nCPU max MHz:                             5883.0000\nCPU min MHz:                             545.0000\nBogoMIPS:                                8982.91\nFlags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid overflow_recov succor smca fsrm flush_l1d amd_lbr_pmc_freeze\nVirtualization:                          AMD-V\nL1d cache:                               512 KiB (16 instances)\nL1i cache:                               512 KiB (16 instances)\nL2 cache:                                16 MiB (16 instances)\nL3 cache:                                64 MiB (2 instances)\nNUMA node(s):                            1\nNUMA node0 CPU(s):                       0-31\nVulnerability Gather data sampling:      Not affected\nVulnerability Ghostwrite:                Not affected\nVulnerability Indirect target selection: Not affected\nVulnerability Itlb multihit:             Not affected\nVulnerability L1tf:                      Not affected\nVulnerability Mds:                       Not affected\nVulnerability Meltdown:                  Not affected\nVulnerability Mmio stale data:           Not affected\nVulnerability Reg file data sampling:    Not affected\nVulnerability Retbleed:                  Not affected\nVulnerability Spec rstack overflow:      Mitigation; Safe RET\nVulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:  ",
    "url": "https://github.com/pytorch/pytorch/issues/170286",
    "state": "closed",
    "labels": [
      "module: binaries",
      "triaged"
    ],
    "created_at": "2025-12-12T08:39:43Z",
    "updated_at": "2025-12-13T00:30:46Z",
    "comments": 3,
    "user": "lanluo-nvidia"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30541,
    "title": "[Usage]: missing dsml token \"| DSML | \" with DeepSeek-V3.2 tools call",
    "body": "### Your current environment\n\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version                : Could not collect\nCMake version                : version 4.0.3\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.11 (main, Jun  4 2025, 08:56:18) [GCC 11.4.0] (64-bit runtime)\nPython platform              : Linux-5.15.0-50-generic-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA H20\nGPU 1: NVIDIA H20\nGPU 2: NVIDIA H20\nGPU 3: NVIDIA H20\nGPU 4: NVIDIA H20\nGPU 5: NVIDIA H20\nGPU 6: NVIDIA H20\nGPU 7: NVIDIA H20\n\nNvidia driver version        : 565.57.01\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nAddress sizes:                   46 bits physical, 57 bits virtual\nByte Order:                      Little Endian\nCPU(s):                          208\nOn-line CPU(s) list:             0-207\nVendor ID:                       GenuineIntel\nModel name:                      INTEL(R) XEON(R) PLATINUM 8563C\nCPU family:                      6\nModel:                           207\nThread(s) per core:              2\nCore(s) per socket:              52\nSocket(s):                       2\nStepping:                        2\nFrequency boost:                 enabled\nCPU max MHz:                     4000.0000\nCPU min MHz:                     800.0000\nBogoMIPS:                        5200.00\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nVirtualization:                  VT-x\nL1d cache:                       4.9 MiB (104 instances)\nL1i cache:                       3.3 MiB (104 instances)\nL2 cache:                        208 MiB (104 instances)\nL3 cache:                        640 MiB (2 instances)\nNUMA node(s):                    2\nNUMA node0 CPU(s):               0-51,104-155\nNUMA node1 CPU(s):               52-103,156-207\nVulnerability Itlb multihit:     Not affected\nVulnerability L1tf:              Not affected\nVulnerability Mds:               Not affected\nVulnerability Meltdown:          Not affected\nVulnerability Mmio stale data:   Not affected\nVulnerability Retbleed:          Not affected\nVulnerability Spec store bypass: Vulnerable\nVulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:        Vulnerable, IBPB: disabled, STIBP: disabled, PBRSB-eIBRS: Vulnerable\nVulnerability Srbds:             Not affected\nVulnerability Tsx async abort:   Not affected\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-python==0.5.3\n[pip3] numpy==2.2.6\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cudnn-frontend==1.16.0\n[pip3] nvidia-cufft-cu12==11.3.3.83\n[pip3] nvidia-cufile-cu12==1.1",
    "url": "https://github.com/vllm-project/vllm/issues/30541",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-12T06:47:03Z",
    "updated_at": "2025-12-12T20:59:40Z",
    "comments": 1,
    "user": "crischeng"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16217,
    "title": "make building stop at Built target portable_kernels",
    "body": "Hey, i want to export llama pte model and deploy it on SA8255 device, i refered to https://github.com/pytorch/executorch/blob/main/examples/models/llama/README.md and https://docs.pytorch.ac.cn/executorch/stable/llm/build-run-llama3-qualcomm-ai-engine-direct-backend.html, but when i Built llama runner binary for Android i got the error:\n[ 98%] Linking CXX static library libportable_kernels.a\n[ 98%] Built target portable_kernels\n[ 98%] Linking CXX static library liboptimized_portable_kernels.a\n[ 98%] Built target optimized_portable_kernels\ngmake: *** [Makefile:156: all] Error 2\n\nHow can I solve this? i paste the error.log and the build.sh file.\nAppreciate reply!\n\n[build.sh](https://github.com/user-attachments/files/24119047/build.sh)\n[error.log](https://github.com/user-attachments/files/24119048/error.log)\n\ncc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @cbilgin",
    "url": "https://github.com/pytorch/executorch/issues/16217",
    "state": "open",
    "labels": [
      "partner: qualcomm",
      "module: qnn"
    ],
    "created_at": "2025-12-12T03:24:46Z",
    "updated_at": "2025-12-21T00:59:11Z",
    "comments": 16,
    "user": "imjking"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30511,
    "title": "Potential Deadlock?",
    "body": "Consider using proper synchronization primitives like threading.Event or queue.Queue.get(timeout=...)",
    "url": "https://github.com/vllm-project/vllm/issues/30511",
    "state": "closed",
    "labels": [],
    "created_at": "2025-12-11T19:57:43Z",
    "updated_at": "2025-12-12T18:00:20Z",
    "comments": 1,
    "user": "ChuanLi1101"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 14903,
    "title": "Does the current Qwen3-VL (or Qwen3-VL-MoE) officially support TBO?",
    "body": "Hi team,\n\nI noticed that Qwen3-VL and Qwen3-MoE adopt different model architectures.\nWhen profiling the execution path, I found that:\n\nQwen3-MoE eventually falls back to the Qwen2-MoE implementation, which explicitly supports TBO (Two-Batch Overlap).\n\nHowever, Qwen3-VL takes the path of Qwen3-VL-MoE, and I did not find any clear implementation or code path that indicates TBO support for this variant.\n\nBased on the current codebase, it seems that Qwen3-VL-MoE may not have full TBO support, or its TBO integration is not obvious from the trace.",
    "url": "https://github.com/sgl-project/sglang/issues/14903",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-11T13:26:50Z",
    "updated_at": "2025-12-11T13:26:50Z",
    "comments": 0,
    "user": "jerry-dream-fu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 170183,
    "title": "[docs] Unable to `git clone` PyTorch wiki on Windows due to colon(`:`) in filename",
    "body": "### \ud83d\udcda The doc issue\n\n> Summary : `git checkout` fails when trying to clone the PyTorch wiki on Windows OS.\n\nWindows filesystems do not allow the use of colons (`:`) in filenames.\nHowever, the wiki currently contains a page titled: [PyTorch CI Metrics Dashboards: the HUD](https://github.com/pytorch/pytorch/wiki/PyTorch-CI-Metrics-Dashboards:-the-HUD)\n\nBecause this filename contains a colon, cloning the wiki repository on a Windows environment results in an error.\n\n- Error Message.\n```sh\n(base) PS D:\\Git_Repo\\Open_Source> git clone https://github.com/pytorch/pytorch.wiki.git\nCloning into 'pytorch.wiki'...\nremote: Enumerating objects: 3525, done.\nremote: Total 3525 (delta 0), reused 0 (delta 0), pack-reused 3525 (from 1)\nReceiving objects: 100% (3525/3525), 1.73 MiB | 4.51 MiB/s, done.\nResolving deltas: 100% (2173/2173), done.\nerror: invalid path 'PyTorch-CI-Metrics-Dashboards:-the-HUD.md'\nfatal: unable to checkout working tree\nwarning: Clone succeeded, but checkout failed.        \nYou can inspect what was checked out with 'git status'\nand retry with 'git restore --source=HEAD :/'\n```\n\nThanks you.\n\n### Suggest a potential alternative/fix\n\nRename the wiki page to remove the colon or replace it with a hyphen.\n\ncc @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex",
    "url": "https://github.com/pytorch/pytorch/issues/170183",
    "state": "open",
    "labels": [
      "module: windows",
      "triaged",
      "module: infra"
    ],
    "created_at": "2025-12-11T13:00:52Z",
    "updated_at": "2025-12-15T18:07:48Z",
    "comments": 6,
    "user": "daehyun99"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42804,
    "title": "[`Quantization FP8`] Native `from_config` support",
    "body": "### Feature request\n\nRelated to https://github.com/huggingface/transformers/pull/42028#discussion_r2592235170\n\nSince FP8 is becoming more and more standard, it would be nice to create fp8 native models via config or more like using `from_config`. Atm, quant configs are not respected apparently - either that or we need to update the docs to show how to use it properly.\n\n### Motivation\n\nFp8 is becoming increasingly important\n\n### Your contribution\n\n\ud83d\udc40 ",
    "url": "https://github.com/huggingface/transformers/issues/42804",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-12-11T10:17:47Z",
    "updated_at": "2025-12-14T22:49:48Z",
    "comments": 3,
    "user": "vasqu"
  },
  {
    "repo": "huggingface/trl",
    "number": 4679,
    "title": "[SFT] High vRAM consumption during eval loop",
    "body": "### Reproduction\n\n### Unexpected behavior\n\nWhen training a model on large sequences (>=20k tokens) with `PEFT LoRA` + `SFTTrainer` + `liger-kernel`, the vRAM usage spikes during the evaluation loop, consuming way more vRAM than during the training.\n\nThe size of this vRAM spike seem to scale with the length of the input sequence: for cases with `max_length=40000`, we end up with spikes of ~50GB vRAM, far exceeding the amount used during the training.\n\nHere's a MLFlow GPU vRAM extract showcasing this on an A100 for this 40k token scenario with Qwen3-0.6B:\n\n<img width=\"1003\" height=\"556\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/8d909f73-6cbe-4c3e-8d6a-e6b8c6c56dbe\" />\n\nAnd same goes for Qwen3-4B, 40k token:\n\n<img width=\"1006\" height=\"552\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/aa74b9c3-14eb-4c35-851f-c6802d2d420d\" />\n\n### Minimal reproduction script\n\nBelow is the [default SFT example from the documentation](https://github.com/huggingface/trl/blob/main/trl/scripts/sft.py), slightly altered to artificially create long input sequences (>=20k tokens) in both the training and evaluation dataset splits.\n\nBy running `watch -n 1 nvidia-smi` while the training is running, you can see that the vRAM usage is way higher during the evaluation phase than during the training. If your GPU has enough vRAM, you can increase the `max_length` parameter and this will become even more visible. _For some reason, I can't get `trackio` to properly report vRAM usage, hence the use of `nvidia-smi`.\n\nYou can launch the script with the following command:\n\n```bash\npython sft_example.py \\\n--model_name_or_path Qwen/Qwen3-0.6B \\\n--dataset_name trl-lib/Capybara \\\n--learning_rate 2.0e-4  \\\n--max-steps 10 \\\n--per_device_train_batch_size 1 \\\n--per_device_eval_batch_size 1 \\\n--eval_accumulation_steps 1 \\\n--gradient_accumulation_steps 1 \\\n--gradient_checkpointing \\\n--eos_token '<|im_end|>' \\\n--eval_strategy steps \\\n--eval_steps 10 \\\n--use_peft \\\n--lora_r 8 \\\n--lora_alpha 16 \\\n--use_liger \\\n--max_length 10000\n```\n\n```python\n# Copyright 2020-2025 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# /// script\n# dependencies = [\n#     \"trl\",\n#     \"peft\",\n#     \"trackio\",\n#     \"kernels\"\n# ]\n# ///\n\nimport argparse\nimport os\n\nfrom accelerate import logging\nfrom datasets import load_dataset\nfrom transformers import AutoConfig, AutoModelForCausalLM\nfrom transformers.models.auto.modeling_auto import (\n    MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPING_NAMES,\n)\nfrom trl import (\n    DatasetMixtureConfig,\n    ModelConfig,\n    ScriptArguments,\n    SFTConfig,\n    SFTTrainer,\n    TrlParser,\n    get_dataset,\n    get_kbit_device_map,\n    get_peft_config,\n    get_quantization_config,\n)\n\nlogger = logging.get_logger(__name__)\n\n# Enable logging in a Hugging Face Space\nos.environ.setdefault(\"TRACKIO_SPACE_ID\", \"trl-trackio\")\n\n\ndef main(script_args, training_args, model_args, dataset_args):\n    ################\n    # Model init kwargs\n    ################\n    model_kwargs = dict(\n        revision=model_args.model_revision,\n        trust_remote_code=model_args.trust_remote_code,\n        attn_implementation=model_args.attn_implementation,\n        dtype=model_args.dtype,\n    )\n    quantization_config = get_quantization_config(model_args)\n    if quantization_config is not None:\n        # Passing None would not be treated the same as omitting the argument, so we include it only when valid.\n        model_kwargs[\"device_map\"] = get_kbit_device_map()\n        model_kwargs[\"quantization_config\"] = quantization_config\n\n    # Create model\n    config = AutoConfig.from_pretrained(model_args.model_name_or_path)\n    valid_image_text_architectures = MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPING_NAMES.values()\n\n    if config.architectures and any(\n        arch in valid_image_text_architectures for arch in config.architectures\n    ):\n        from transformers import AutoModelForImageTextToText\n\n        model = AutoModelForImageTextToText.from_pretrained(\n            model_args.model_name_or_path, **model_kwargs\n        )\n    else:\n        model = AutoModelForCausalLM.from_pretrained(\n            model_args.model_name_or_path, **model_kwargs\n        )\n\n    # Load the dataset\n    if dataset_args.datasets and script_args.dataset_name:\n        logger.warning(\n            \"Both `datasets` and `dataset_name` are provided. The `datasets` argument will be used to load the \"\n            \"dataset and `dataset_name` will be ignored.\"\n        )\n    ",
    "url": "https://github.com/huggingface/trl/issues/4679",
    "state": "open",
    "labels": [
      "\ud83d\udc1b bug",
      "\ud83c\udfcb SFT",
      "\u26a1 PEFT"
    ],
    "created_at": "2025-12-11T10:01:49Z",
    "updated_at": "2026-01-02T09:23:17Z",
    "comments": 3,
    "user": "Khreas"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30477,
    "title": "[Usage]: How to disable thinking for Qwen-8B",
    "body": "### Your current environment\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.3 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.5.1+cu121\nIs debug build               : False\nCUDA used to build PyTorch   : 12.1\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.12 (main, Nov 19 2025, 22:46:53) [Clang 21.1.4 ] (64-bit runtime)\nPython platform              : Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.1.105\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : GPU 0: NVIDIA GeForce RTX 4090 Laptop GPU\nNvidia driver version        : 546.26\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        39 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               32\nOn-line CPU(s) list:                  0-31\nVendor ID:                            GenuineIntel\nModel name:                           Intel(R) Core(TM) i9-14900HX\nCPU family:                           6\nModel:                                183\nThread(s) per core:                   2\nCore(s) per socket:                   16\nSocket(s):                            1\nStepping:                             1\nBogoMIPS:                             4838.39\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves avx_vnni umip waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize flush_l1d arch_capabilities\nVirtualization:                       VT-x\nHypervisor vendor:                    Microsoft\nVirtualization type:                  full\nL1d cache:                            768 KiB (16 instances)\nL1i cache:                            512 KiB (16 instances)\nL2 cache:                             32 MiB (16 instances)\nL3 cache:                             36 MiB (1 instance)\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Mitigation; Clear Register File\nVulnerability Retbleed:               Mitigation; Enhanced IBRS\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affected\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] numpy==1.26.4\n[pip3] nvidia-cublas-cu12==12.1.3.1\n[pip3] nvidia-cuda-cupti-cu12==12.1.105\n[pip3] nvidia-cuda-nvrtc-cu12==12.1.105\n[pip3] nvidia-cuda-runtime-cu12==12.1.105\n[pip3] nvidia-cudnn-cu12==9.1.0.70\n[pip3] nvidia-cufft-cu12==11.0.2.54\n[pip3] nvidia-curand-cu12==10.3.2.106\n[pip3] nvidia-cusolver-cu12==11.4.5.107\n[pip3] nvidia-cusparse-cu12==12.1.0.106\n[pip3] nvidia-nccl-cu12==2.21.5\n[pip3] nvidia-nvjitlink-cu12==12.9.86\n[pip3] nvidia-nvtx-cu12==12.1.105\n[pip3] pyzmq==27.1.0\n[pip3] torch==2.5.1+cu121\n[pip3] torchaudio==2.5.1+cu121\n[pip3] torchvision==0.20.1+cu121\n[pip3] transformers==4.57.3\n[pip3] triton==3.1.0\n[conda] Could not collect\n\n",
    "url": "https://github.com/vllm-project/vllm/issues/30477",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-11T09:28:40Z",
    "updated_at": "2025-12-22T06:10:43Z",
    "comments": 3,
    "user": "fancyerii"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12823,
    "title": "How to use quantizer after pipeline loaded?",
    "body": "How to use quantizer after pipeline loaded? \n\n- Currently\n\n```python\n# Quantization occurs at load time.\npipe = QwenImagePipeline.from_pretrained(\n    (\n        args.model_path\n        if args.model_path is not None\n        else os.environ.get(\n            \"QWEN_IMAGE_DIR\",\n            \"Qwen/Qwen-Image\",\n        )\n    ),\n    scheduler=scheduler,\n    torch_dtype=torch.bfloat16,\n    quantization_config=quantization_config,\n)\n```\n\n- What i want  \n\n```python\n# Load on CPU -> Load and fuse lora -> quantize -> to GPU\n```",
    "url": "https://github.com/huggingface/diffusers/issues/12823",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-11T06:32:38Z",
    "updated_at": "2025-12-11T14:18:28Z",
    "user": "DefTruth"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42794,
    "title": "`decoder_start_token_id` or `bos_token_id` has to be defined for encoder-decoder generation.",
    "body": "### System Info\n\nlatest transformers\n\n### Who can help?\n\n@zucchini-nlp \n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```python\nimport torch\nfrom transformers import pipeline\n\npipe = pipeline(\n    \"document-question-answering\",\n    model=\"naver-clova-ix/donut-base-finetuned-docvqa\",\n    dtype=torch.float16,\n)\n\nimage = \"https://huggingface.co/spaces/impira/docquery/resolve/2359223c1837a7587402bda0f2643382a6eefeab/invoice.png\"\nquestion = \"What is the invoice number?\"\n\nresult = pipe(image=image, question=question)\nprint(result)\n```\n\nerror:\n```\nTraceback (most recent call last):\n  File \"/home/jiqingfe/transformers/test_dqa.py\", line 13, in <module>\n    result = pipe(image=image, question=question)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/jiqingfe/transformers/src/transformers/pipelines/document_question_answering.py\", line 310, in __call__\n    return super().__call__(inputs, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/jiqingfe/transformers/src/transformers/pipelines/base.py\", line 1278, in __call__\n    return next(\n           ^^^^^\n  File \"/home/jiqingfe/transformers/src/transformers/pipelines/pt_utils.py\", line 126, in __next__\n    item = next(self.iterator)\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/home/jiqingfe/transformers/src/transformers/pipelines/pt_utils.py\", line 271, in __next__\n    processed = self.infer(next(self.iterator), **self.params)\n                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/jiqingfe/transformers/src/transformers/pipelines/base.py\", line 1185, in forward\n    model_outputs = self._forward(model_inputs, **forward_params)\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/jiqingfe/transformers/src/transformers/pipelines/document_question_answering.py\", line 468, in _forward\n    model_outputs = self.model.generate(**model_inputs, **generate_kwargs)\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/sgl-workspace/miniforge3/lib/python3.12/site-packages/torch/utils/_contextlib.py\", line 120, in decorate_context\n    return func(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/jiqingfe/transformers/src/transformers/generation/utils.py\", line 2551, in generate\n    self._prepare_special_tokens(generation_config, kwargs_has_attention_mask, device=device)\n  File \"/home/jiqingfe/transformers/src/transformers/generation/utils.py\", line 2145, in _prepare_special_tokens\n    raise ValueError(\nValueError: `decoder_start_token_id` or `bos_token_id` has to be defined for encoder-decoder generation.\n```\n\n### Expected behavior\n\nCannot locate which PR caused this regression because too many errors recently. The transformers 4.57.3 works well on the script.",
    "url": "https://github.com/huggingface/transformers/issues/42794",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-11T06:22:58Z",
    "updated_at": "2025-12-18T18:33:40Z",
    "comments": 1,
    "user": "jiqing-feng"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30464,
    "title": "[Usage]: How can I use the local pre-compiled wheel of vllm",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nEvery time I use `VLLM_USE_PRECOMPILED=1 uv pip install --editable .` to build vllm, it always takes much time to download the pre-compiled wheel. Would it be possible to build it by using a locally downloaded wheel file instead?\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30464",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-11T06:22:43Z",
    "updated_at": "2025-12-12T01:02:22Z",
    "comments": 1,
    "user": "gcanlin"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42791,
    "title": "Add support for GPT_OSS with tp_plan or enable native tensor parallelism",
    "body": "### Model description\n\n #[https://huggingface.co/docs/transformers/main/perf_infer_gpu_multi?tp_plan=auto+plan](url)\n\n> https://github.com/huggingface/transformers/issues/41819\n\nThere are a list of supported models here, but GPT-OSS is not one of them. Please add support for GPT_OSS too to enable `tp_plan`. Please help me understand when model is prepared for TP in accelerate initiation, is there some native support needed in model for enabling TP.\n\nI have tried this example TP script [https://github.com/huggingface/accelerate/blob/main/examples/torch_native_parallelism/nd_parallel.py](url) with pure TP, on GPT-OSS-20B model and getting same error as mentioned in this already open issue:\n[]([https://github.com/huggingface/transformers/issues/41819](url).)\n\nAfter handling `DTensor` sinks as mentioned as a fix in above issue, still I find many such `DTensors` at multiple other places which is causing below error, due to incompatibility between ` DTensor ` and `torch.Tensor`. \n\n`raise RuntimeError(\n[rank0]: RuntimeError: aten.bmm.default: got mixed torch.Tensor and DTensor, need to convert all torch.Tensor to DTensor before calling distributed operators!`\n\n### Open source status\n\n- [x] The model implementation is available\n- [x] The model weights are available\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/transformers/issues/42791",
    "state": "open",
    "labels": [
      "New model"
    ],
    "created_at": "2025-12-11T04:31:19Z",
    "updated_at": "2025-12-19T08:38:31Z",
    "comments": 1,
    "user": "quic-akuruvil"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 14868,
    "title": "How to train vicuna EAGLE3 model?",
    "body": "I have carefully reviewed the official tutorials and source code, but I was unable to find the relevant config and template files specific to Vicuna.\n\nCould you please provide an example, specifically regarding the template structure?",
    "url": "https://github.com/sgl-project/sglang/issues/14868",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-11T03:59:39Z",
    "updated_at": "2025-12-11T03:59:39Z",
    "comments": 0,
    "user": "Sylvan820"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30447,
    "title": "[Usage]: how to load kv cache data into local file",
    "body": "### Your current environment\n\npthon3.10+vllm0.10.0\n\n### How would you like to use vllm\n\nI want to get int8 kv cache data from [qwen-int8](https://www.modelscope.cn/models/Qwen/Qwen-7B-Chat-Int8). I don't know how if vllm can do that? Thank you.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30447",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-11T01:43:58Z",
    "updated_at": "2025-12-12T15:11:50Z",
    "comments": 1,
    "user": "chx725"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30441,
    "title": "[Usage]: vllm serve setup issues on B300",
    "body": "### Your current environment\n\nThe output of `python collect_env.py`\n```text\n\n\nCollecting environment information...\nuv is set\n==============================\n        System Info\n==============================\nOS                           : Amazon Linux 2023.9.20251208 (x86_64)\nGCC version                  : (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)\nClang version                : Could not collect\nCMake version                : version 3.22.2\nLibc version                 : glibc-2.34\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu130\nIs debug build               : False\nCUDA used to build PyTorch   : 13.0\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.11.14 (main, Nov 12 2025, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] (64-bit runtime)\nPython platform              : Linux-6.1.158-180.294.amzn2023.x86_64-x86_64-with-glibc2.34\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 13.0.88\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA B300 SXM6 AC\nGPU 1: NVIDIA B300 SXM6 AC\nGPU 2: NVIDIA B300 SXM6 AC\nGPU 3: NVIDIA B300 SXM6 AC\nGPU 4: NVIDIA B300 SXM6 AC\nGPU 5: NVIDIA B300 SXM6 AC\nGPU 6: NVIDIA B300 SXM6 AC\nGPU 7: NVIDIA B300 SXM6 AC\n\nNvidia driver version        : 580.105.08\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           46 bits physical, 48 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  192\nOn-line CPU(s) list:                     0-191\nVendor ID:                               GenuineIntel\nModel name:                              Intel(R) Xeon(R) Platinum 8559C\nCPU family:                              6\nModel:                                   207\nThread(s) per core:                      2\nCore(s) per socket:                      48\nSocket(s):                               2\nStepping:                                2\nBogoMIPS:                                4800.00\nFlags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd ida arat avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid cldemote movdiri movdir64b md_clear serialize amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nHypervisor vendor:                       KVM\nVirtualization type:                     full\nL1d cache:                               4.5 MiB (96 instances)\nL1i cache:                               3 MiB (96 instances)\nL2 cache:                                192 MiB (96 instances)\nL3 cache:                                640 MiB (2 instances)\nNUMA node(s):                            2\nNUMA node0 CPU(s):                       0-47,96-143\nNUMA node1 CPU(s):                       48-95,144-191\nVulnerability Gather data sampling:      Not affected\nVulnerability Indirect target selection: Not affected\nVulnerability Itlb multihit:             Not affected\nVulnerability L1tf:                      Not affected\nVulnerability Mds:                       Not affected\nVulnerability Meltdown:                  Not affected\nVulnerability Mmio stale data:           Not affected\nVulnerability Reg file data sampling:    Not affected\nVulnerability Retbleed:                  Not affected\nVulnerability Spec rstack overflow:      Not affected\nVulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:                Mitigation; Enhanced / Automatic IBRS; IBPB conditional; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S\nVulnerability Srbds:                     Not affected\nVulnerability Tsa:                       Not affected\nVulnerability Tsx async abort:           Not affected\nVulnerability Vms",
    "url": "https://github.com/vllm-project/vllm/issues/30441",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-10T23:50:27Z",
    "updated_at": "2025-12-13T02:01:04Z",
    "comments": 1,
    "user": "navmarri14"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 14824,
    "title": "Throughput degradation on Qwen3-30B-A3B with EAGLE3",
    "body": "I observed a throughput degradation when trying to use EAGLE3 to speed up Qwen3-30B-A3B (on 2x H100).\n\nI suspect the overhead might be overshadowing the gains. It would be great if we could have some profiling analysis to pinpoint exactly where the cost is coming from.\n\nAlso, tuning parameters for MoE models feels much more difficult than for dense models. Do you think it would be possible to provide a guidance or a micro-benchmarking script? This would really help users quickly identify the optimal parameters for their specific hardware.\n\n(For reference, the related issue is [this](https://github.com/sgl-project/SpecForge/issues/339).)\n\nTwo quick questions:\n\nI\u2019m still wondering: why does EAGLE3 seem less effective on Qwen3 compared to other models?\n\nAre there any specific tricks for training a high-quality EAGLE3 draft model for this architecture?\n\nThanks! \ud83e\udd79\ud83e\udd79\n",
    "url": "https://github.com/sgl-project/sglang/issues/14824",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-10T14:22:05Z",
    "updated_at": "2025-12-19T21:36:54Z",
    "comments": 1,
    "user": "Zzsf11"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30392,
    "title": "[Bug]: Docker image v0.12.0 Fail to serve via Docker image",
    "body": "### Your current environment\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu129\nIs debug build               : False\nCUDA used to build PyTorch   : 12.9\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.12 (main, Oct 10 2025, 08:52:57) [GCC 11.4.0] (64-bit runtime)\nPython platform              : Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.9.86\nCUDA_MODULE_LOADING set to   :\nGPU models and configuration :\nGPU 0: NVIDIA RTX A4000\nGPU 1: NVIDIA RTX A4000\n\nNvidia driver version        : 581.15\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        48 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               8\nOn-line CPU(s) list:                  0-7\nVendor ID:                            AuthenticAMD\nModel name:                           AMD Ryzen 7 3800X 8-Core Processor\nCPU family:                           23\nModel:                                113\nThread(s) per core:                   2\nCore(s) per socket:                   4\nSocket(s):                            1\nStepping:                             0\nBogoMIPS:                             7800.02\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip rdpid\nVirtualization:                       AMD-V\nHypervisor vendor:                    Microsoft\nVirtualization type:                  full\nL1d cache:                            128 KiB (4 instances)\nL1i cache:                            128 KiB (4 instances)\nL2 cache:                             2 MiB (4 instances)\nL3 cache:                             16 MiB (1 instance)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-7\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Mitigation; untrained return thunk; SMT enabled with STIBP protection\nVulnerability Spec rstack overflow:   Vulnerable: Safe RET, no microcode\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Retpolines; IBPB conditional; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affected\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-python==0.5.3\n[pip3] numpy==2.2.0\n[pip3] nvidia-cublas-cu12==12.9.1.4\n[pip3] nvidia-cuda-cupti-cu12==12.9.79\n[pip3] nvidia-cuda-nvrtc-cu12==12.9.86\n[pip3] nvidia-cuda-runtime-cu12==12.9.79\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cudnn-frontend==1.16.0\n[pip3] nvidia-cufft-cu12==11.4.1.4\n[pip3] nvidia-cufile-cu12==1.14.1.1\n[pip3] nvidia-curand-cu12==10.3.10.19\n[pip3] nvidia-cusolver-cu12==11.7.5.82\n[pip3] nvidia-cusparse-cu12==12.5.10.65\n[pip3] nvidia-cusparselt-cu12==0.7.1\n[pip3] nvidia-cutlass-dsl==4.3.1\n[pip3] ",
    "url": "https://github.com/vllm-project/vllm/issues/30392",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-10T13:43:59Z",
    "updated_at": "2026-01-04T14:24:56Z",
    "comments": 7,
    "user": "kuopching"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42771,
    "title": "FSDP of Trainer does not work well with Accelerate",
    "body": "### System Info\n\n- `transformers` version: 4.57.3\n- Platform: Linux-6.6.97+-x86_64-with-glibc2.35\n- Python version: 3.11.11\n- Huggingface_hub version: 0.36.0\n- Safetensors version: 0.7.0\n- Accelerate version: 1.12.0\n- Accelerate config:    not found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.9.1+cu128 (CUDA)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: <fill in>\n- Using GPU in script?: <fill in>\n- GPU type: NVIDIA H100 80GB HBM3\n\n### Who can help?\n\n@3outeille @ArthurZucker @SunMarc \n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\n```python\n\"\"\"\nSimple example of training BERT with Transformers Trainer and FSDP\nUses random data for quick demonstration\n\"\"\"\n\nimport torch\nfrom transformers import (\n    BertForSequenceClassification,\n    BertTokenizer,\n    Trainer,\n    TrainingArguments,\n)\nfrom torch.utils.data import Dataset\n\n\n# Create a simple dataset with random data\nclass RandomDataset(Dataset):\n    def __init__(self, tokenizer, num_samples=1000, max_length=128):\n        self.tokenizer = tokenizer\n        self.num_samples = num_samples\n        self.max_length = max_length\n        \n    def __len__(self):\n        return self.num_samples\n    \n    def __getitem__(self, idx):\n        # Generate random token IDs\n        input_ids = torch.randint(\n            0, self.tokenizer.vocab_size, (self.max_length,)\n        )\n        attention_mask = torch.ones(self.max_length)\n        labels = torch.randint(0, 2, (1,)).item()  # Binary classification\n        \n        return {\n            \"input_ids\": input_ids,\n            \"attention_mask\": attention_mask,\n            \"labels\": labels,\n        }\n\n\ndef main():\n    # Initialize tokenizer and model\n    model_name = \"bert-base-uncased\"\n    tokenizer = BertTokenizer.from_pretrained(model_name)\n    model = BertForSequenceClassification.from_pretrained(\n        model_name, num_labels=2\n    )\n    \n    # Create random datasets\n    train_dataset = RandomDataset(tokenizer, num_samples=1000)\n    eval_dataset = RandomDataset(tokenizer, num_samples=200)\n    \n    # Configure FSDP training arguments\n    training_args = TrainingArguments(\n        output_dir=\"./bert_fsdp_output\",\n        num_train_epochs=3,\n        per_device_train_batch_size=8,\n        per_device_eval_batch_size=8,\n        logging_steps=50,\n        eval_strategy=\"steps\",\n        eval_steps=100,\n        save_steps=200,\n        save_total_limit=2,\n        \n        # FSDP Configuration\n        fsdp=\"full_shard auto_wrap\",  # Enable FSDP with full sharding\n        fsdp_config={\n            \"fsdp_transformer_layer_cls_to_wrap\": [\"BertLayer\"],  # Wrap BERT layers\n            \"fsdp_backward_prefetch\": \"backward_pre\",\n            \"fsdp_forward_prefetch\": False,\n            \"fsdp_use_orig_params\": True,\n        },\n        \n        # Additional settings\n        learning_rate=5e-5,\n        warmup_steps=100,\n        weight_decay=0.01,\n        logging_dir=\"./logs\",\n        report_to=\"none\",  # Disable wandb/tensorboard for simplicity\n    )\n    \n    # Initialize Trainer\n    trainer = Trainer(\n        model=model,\n        args=training_args,\n        train_dataset=train_dataset,\n        eval_dataset=eval_dataset,\n    )\n    \n    # Train the model\n    print(\"Starting training with FSDP...\")\n    trainer.train()\n    \n    # Save the final model\n    trainer.save_model(\"./bert_fsdp_final\")\n    print(\"Training completed!\")\n\n\nif __name__ == \"__main__\":\n    # Note: Run this script with torchrun for multi-GPU training\n    # Example: torchrun --nproc_per_node=2 train_bert_fsdp.py\n    main()\n```\n\ntorchrun --nproc_per_node=2 train_bert_fsdp.py\n\n### Expected behavior\n\nIt will fail silently. The trace stack, \n```bash\nW1210 12:49:05.011000 104846 site-packages/torch/distributed/run.py:803] \nW1210 12:49:05.011000 104846 site-packages/torch/distributed/run.py:803] *****************************************\nW1210 12:49:05.011000 104846 site-packages/torch/distributed/run.py:803] Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed. \nW1210 12:49:05.011000 104846 site-packages/torch/distributed/run.py:803] *****************************************\nSome weights of BertForSequenceClassification were not initialized from the model checkpoint at bert-base-uncased and are newly initialized: ['classifier.bias', 'classifier.weight']\nYou should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\nSome weights of BertForSequenceClassification were not initialized from the model check",
    "url": "https://github.com/huggingface/transformers/issues/42771",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-10T12:54:49Z",
    "updated_at": "2025-12-11T07:07:19Z",
    "comments": 2,
    "user": "gouchangjiang"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30381,
    "title": "[Usage]:",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30381",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-10T09:27:51Z",
    "updated_at": "2025-12-10T09:28:26Z",
    "comments": 0,
    "user": "tobeprozy"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30380,
    "title": "[Usage]: \u5927\u5bb6\u4e00\u822c\u600e\u4e48\u4f7f\u7528vllm/tests\u7684\uff1f",
    "body": "### Your current environment\n\nanywhere\n\n### How would you like to use vllm\n\nI don't know how to use vllm test.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30380",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-10T09:27:46Z",
    "updated_at": "2025-12-10T13:19:18Z",
    "comments": 1,
    "user": "tobeprozy"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30379,
    "title": "[Usage]: how to use vllm/tests/\uff1f",
    "body": "### Your current environment\n\n\u5927\u5bb6\u4e00\u822c\u600e\u4e48\u4f7f\u7528[vllm](https://github.com/vllm-project/vllm/tree/main)/[tests](https://github.com/vllm-project/vllm/tree/main/tests)\u7684\uff1f\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30379",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-10T09:25:52Z",
    "updated_at": "2025-12-10T09:26:25Z",
    "comments": 0,
    "user": "tobeprozy"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30375,
    "title": "[Bug]: [TPU] ShapeDtypeStruct error when loading custom safetensors checkpoint on TPU v5litepod",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\nPyTorch version: 2.9.0+cu128\nvLLM version: 0.12.0 (vllm-tpu)\nJAX version: 0.8.0\nPython version: 3.12.8 (main, Jan 14 2025, 22:49:14) [Clang 19.1.6]\n\nTPU: v5litepod-4 (4 chips, single host)\nOS: Amazon Linux 2023 (container)\nContainer runtime: Podman with --privileged --net=host\n\nAdditional packages:\n- tpu_inference (bundled with vllm-tpu)\n- flax (from tpu_inference deps)\n- orbax-checkpoint: 0.11.28\n- safetensors: 0.4.5\n- transformers: 4.57.3</details>\n\n\n\n### \ud83d\udc1b Describe the bug\n\nvLLM-TPU fails to load a **local HuggingFace checkpoint** (safetensors format) on TPU v5litepod with this error:\n\n```\nTypeError: Argument 'model.states[0][6]' of shape bfloat16[128] of type <class 'jax._src.core.ShapeDtypeStruct'> is not a valid JAX type.\n```\n\n**The core issue:** The Flax NNX model loader in `tpu_inference` creates the model with `ShapeDtypeStruct` shape placeholders, but these placeholders are never replaced with actual weight arrays before JIT compilation.\n\nLoading from **HuggingFace Hub works fine** (e.g., `Qwen/Qwen3-0.6B`), but loading the **exact same model architecture from a local directory fails**.\n\n### How to reproduce the bug\n\n**Minimal reproduction:**\n\nfrom vllm import LLM\n\n# This WORKS:\nmodel = LLM(\"Qwen/Qwen3-0.6B\", tensor_parallel_size=4, dtype=\"bfloat16\")\n\n# This FAILS with ShapeDtypeStruct error:\nmodel = LLM(\n    model=\"/path/to/local/checkpoint\",  # Contains model.safetensors + config.json\n    tensor_parallel_size=4,\n    dtype=\"bfloat16\",\n    trust_remote_code=True,\n)**Checkpoint directory contents:**\n```\n/path/to/local/checkpoint/\n\u251c\u2500\u2500 config.json           # Valid Qwen3 config with \"architectures\": [\"Qwen3ForCausalLM\"]\n\u251c\u2500\u2500 model.safetensors     # bfloat16 weights (~1.2GB for Qwen3-0.6B)\n\u251c\u2500\u2500 tokenizer.json\n\u251c\u2500\u2500 tokenizer_config.json\n\u251c\u2500\u2500 special_tokens_map.json\n\u251c\u2500\u2500 vocab.json\n\u2514\u2500\u2500 merges.txt\n```\n\n**Context:** The checkpoint was converted from MaxText/Orbax format using orbax-checkpoint + safetensors libraries. The weights are valid (verified with `safetensors.torch.load_file()`).\n\n### Full error traceback\n\n```\nFile \"/pm_env/.venv/lib/python3.12/site-packages/tpu_inference/models/common/model_loader.py\", line 345, in get_model\n    return get_flax_model(vllm_config, rng, mesh, is_draft_model)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nFile \"/pm_env/.venv/lib/python3.12/site-packages/tpu_inference/models/common/model_loader.py\", line 219, in get_flax_model\n    jit_model = _get_nnx_model(model_class, vllm_config, rng, mesh)\n                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nFile \"/pm_env/.venv/lib/python3.12/site-packages/tpu_inference/models/common/model_loader.py\", line 200, in _get_nnx_model\n    jit_model = create_jit_model(\n                ^^^^^^^^^^^^^^^^^\nFile \"/pm_env/.venv/lib/python3.12/site-packages/flax/nnx/transforms/compilation.py\", line 431, in __call__\n    pure_args_out, pure_kwargs_out, pure_out = self.jitted_fn(\n                                               ^^^^^^^^^^^^^^^\nTypeError: Argument 'model.states[0][6]' of shape bfloat16[128] of type <class 'jax._src.core.ShapeDtypeStruct'> is not a valid JAX type.\n```\n\n### What I tried\n\n| Attempt | Result |\n|---------|--------|\n| Load from HuggingFace Hub | \u2705 Works |\n| Load local checkpoint (safetensors) | \u274c ShapeDtypeStruct error |\n| Use float32 dtype | \u274c Same error |\n| Use bfloat16 dtype | \u274c Same error |\n| Set `VLLM_USE_V1=0` | \u274c Still uses v1 engine on TPU |\n| Add `pytorch_model.bin` alongside safetensors | \u274c Same error |\n\n### Expected behavior\n\nvLLM should load the weights from the local safetensors file and initialize the model, exactly like it does when loading from HuggingFace Hub.\n\n### Analysis\n\nLooking at the traceback, the issue is in `tpu_inference/models/common/model_loader.py`:\n\n1. `get_flax_model()` creates the model architecture\n2. `_get_nnx_model()` calls `create_jit_model()` \n3. At this point, `model.states[0][6]` is still a `ShapeDtypeStruct` placeholder instead of actual weight data\n4. JIT compilation fails because it can't compile shape placeholders\n\nIt seems like when loading from Hub, weights get populated before JIT compilation, but when loading from local path, this step is skipped or fails silently.\n\n### Additional context\n\n- We're building an RL environment for LLM evaluation that needs to load custom finetuned checkpoints\n- JetStream/MaxText can load the same Orbax checkpoints without issues\n- The safetensors file was verified to contain valid tensors with correct shapes\n- This blocks our ability to use vLLM's logprobs-based evaluation on TPU\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30375",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-10T08:12:57Z",
    "updated_at": "2025-12-11T05:34:19Z",
    "comments": 1,
    "user": "Baltsat"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 14800,
    "title": "How should we set piecewise-cuda-graph-max-tokens according to TP DP and chunked-prefill-size?",
    "body": "How should we set piecewise-cuda-graph-max-tokens according to TP DP and chunked-prefill-size?\nFor TP only, should we set piecewise-cuda-graph-max-tokens = chunked-prefill-size?\nand for DP attention DP<=TP, should we set piecewise-cuda-graph-max-tokens = chunked-prefill-size/DP?\nThanks.",
    "url": "https://github.com/sgl-project/sglang/issues/14800",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-10T07:26:36Z",
    "updated_at": "2025-12-10T07:26:36Z",
    "comments": 0,
    "user": "llc-kc"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 14783,
    "title": "[Bug][ConvertLinalgRToBinary] encounters error: bishengir-compile: Unknown command line argument '--target=Ascend910B2C'.  Try: '/usr/local/Ascend/ascend-toolkit/latest/bin/bishengir-compile --help' bishengir-compile: Did you mean '--pgso=Ascend910B2C'?",
    "body": "### Checklist\n\n- [x] I searched related issues but found no solution.\n- [ ] The bug persists in the latest version.\n- [ ] Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.\n- [ ] If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.\n- [ ] Please use English. Otherwise, it will be closed.\n\n### Describe the bug\n\n(sglang-latest) [root:trinity-asr]$ bash test.sh\n/opt/conda/envs/sglang-latest/lib/python3.11/site-packages/torch_npu/dynamo/torchair/__init__.py:8: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n  import pkg_resources\nINFO 12-10 11:48:25 [importing.py:53] Triton module has been replaced with a placeholder.\nINFO 12-10 11:48:26 [__init__.py:243] No platform detected, vLLM is running on UnspecifiedPlatform\nWARNING 12-10 11:48:27 [_logger.py:72] Failed to import from vllm._C with ModuleNotFoundError(\"No module named 'vllm._C'\")\n/usr/local/Ascend/thirdparty/sglang/sglang_diffusion_ascend/python/sglang/srt/layers/quantization/awq.py:69: UserWarning: Only CUDA, HIP and XPU support AWQ currently.\n  warnings.warn(f\"Only CUDA, HIP and XPU support AWQ currently.\")\n/usr/local/Ascend/thirdparty/sglang/sglang_diffusion_ascend/python/sglang/srt/layers/quantization/gguf.py:46: UserWarning: Only CUDA support GGUF q uantization currently.\n  warnings.warn(f\"Only CUDA support GGUF q uantization currently.\")\n[2025-12-10 11:48:27] WARNING server_args.py:1379: At this moment Ascend attention backend only supports a page_size of 128, change page_size to 128.\n[2025-12-10 11:48:27] server_args=ServerArgs(model_path='./TrinityASR', tokenizer_path='./TrinityASR', tokenizer_mode='auto', tokenizer_worker_num=1, skip_tokenizer_init=False, load_format='auto', model_loader_extra_config='{}', trust_remote_code=True, context_length=None, is_embedding=False, enable_multimodal=None, revision=None, model_impl='auto', host='0.0.0.0', port=30000, fastapi_root_path='', grpc_mode=False, skip_server_warmup=False, warmups=None, nccl_port=None, checkpoint_engine_wait_weights_before_ready=False, dtype='auto', quantization=None, quantization_param_path=None, kv_cache_dtype='auto', enable_fp32_lm_head=False, modelopt_quant=None, modelopt_checkpoint_restore_path=None, modelopt_checkpoint_save_path=None, modelopt_export_path=None, quantize_and_serve=False, mem_fraction_static=0.6, max_running_requests=None, max_queued_requests=None, max_total_tokens=None, chunked_prefill_size=-1, max_prefill_tokens=65536, schedule_policy='fcfs', enable_priority_scheduling=False, abort_on_priority_when_disabled=False, schedule_low_priority_values_first=False, priority_scheduling_preemption_threshold=10, schedule_conservativeness=1.0, page_size=128, hybrid_kvcache_ratio=None, swa_full_tokens_ratio=0.8, disable_hybrid_swa_memory=False, radix_eviction_policy='lru', device='npu', tp_size=1, pp_size=1, pp_max_micro_batch_size=None, stream_interval=1, stream_output=False, random_seed=309118768, constrained_json_whitespace_pattern=None, constrained_json_disable_any_whitespace=False, watchdog_timeout=300, dist_timeout=None, download_dir=None, base_gpu_id=0, gpu_id_step=1, sleep_on_idle=False, mm_process_config={}, log_level='info', log_level_http=None, log_requests=False, log_requests_level=2, crash_dump_folder=None, show_time_cost=False, enable_metrics=False, enable_metrics_for_all_schedulers=False, tokenizer_metrics_custom_labels_header='x-custom-labels', tokenizer_metrics_allowed_custom_labels=None, bucket_time_to_first_token=None, bucket_inter_token_latency=None, bucket_e2e_request_latency=None, collect_tokens_histogram=False, prompt_tokens_buckets=None, generation_tokens_buckets=None, gc_warning_threshold_secs=0.0, decode_log_interval=40, enable_request_time_stats_logging=False, kv_events_config=None, enable_trace=False, otlp_traces_endpoint='localhost:4317', export_metrics_to_file=False, export_metrics_to_file_dir=None, api_key=None, served_model_name='./TrinityASR', weight_version='default', chat_template=None, completion_template=None, file_storage_path='sglang_storage', enable_cache_report=False, reasoning_parser=None, tool_call_parser=None, tool_server=None, sampling_defaults='model', dp_size=1, load_balance_method='round_robin', load_watch_interval=0.1, prefill_round_robin_balance=False, dist_init_addr=None, nnodes=1, node_rank=0, json_model_override_args='{}', preferred_sampling_params=None, enable_lora=None, max_lora_rank=None, lora_target_modules=None, lora_paths=None, max_loaded_loras=None, max_loras_per_batch=8, lora_eviction_policy='lru', lora_backend='csgmv', max_lora_chunk_size=16, attention_backend='ascend', decode_attention_backend=None, prefill_attention_backend=None, sampling_backend='pytorch',",
    "url": "https://github.com/sgl-project/sglang/issues/14783",
    "state": "closed",
    "labels": [
      "npu"
    ],
    "created_at": "2025-12-10T03:54:50Z",
    "updated_at": "2025-12-13T12:28:26Z",
    "comments": 1,
    "user": "rsy-hub4121"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42757,
    "title": "cannot import name 'is_offline_mode' from 'huggingface_hub'",
    "body": "### System Info\n\n- transformers-5.0.0\n- huggingface_hub-1.2.1\n```\nImportError: cannot import name 'is_offline_mode' from 'huggingface_hub' (/root/miniconda3/envs/transformers/lib/python3.10/site-packages/huggingface_hub/__init__.py)\n```\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nfrom transformers import AutoModel, AutoProcessor, AutoTokenizer\n\n### Expected behavior\n\nhow to fix ?",
    "url": "https://github.com/huggingface/transformers/issues/42757",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-10T02:43:43Z",
    "updated_at": "2025-12-23T17:15:20Z",
    "comments": 0,
    "user": "dollarser"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30359,
    "title": "[RFC] [QeRL]: Online Quantization and Model Reloading",
    "body": "### Motivation.\n\n## What is Quantized Model Reloading and Why is it Useful?\n\nvLLM serves not only as a inference runtime for serving requests from end users, but also as a means of serving requests for  large language model post-training. One particularly important use case is using vLLM to serve rollouts (required by RL pipelines) using a quantized model to serve the requests. For more information, see [QeRL: Beyond Efficiency \u2013 Quantization-enhanced Reinforcement Learning for LLMs](https://arxiv.org/html/2510.11696v1).\n\nThese quantized models must be reloaded every couple of seconds in order to make sure that the rollouts match the distribution that would have been generated by the base model weights.\n\n## Existing Features in vLLM\n\nvLLM already has some pathways for enabling these kinds of workflows. However, the current implementations have caveats which can make usage difficult.\n\n### Weight Reloading\n\nAfter a model has been loaded once, the weights are stored in kernel format (see nomenclature). However, kernel format does not always match checkpoint format. There is an existing implementation which restores the original model format in order to allow reloading (implemented [here](https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/model_loader/online_quantization.py), but \u201crestore\u201d step is done eagerly and effectively doubles the amount of required memory, which is unideal. The current implementation has also only been enabled for torchao configs.\n\n### Online Quantization\n\nThere are two styles of online quantization implemented in vLLM. Originally, there was on the \u201coffline\u201d style of [FP8](https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/layers/quantization/fp8.py#L222C14-L222C42), where all unquantized weights are loaded synchronously, and then all weights are quantized synchronously after loading via `process_weights_after_loading`. This style works, but requires as much memory as the unquantized model, despite the final model being quantized, which is unideal (see Memory Requirements section).\n\nRecently, @vkuzo implemented a means of online quantization by [adding a hook to the `weight_loader`](https://github.com/vllm-project/vllm/pull/29196/files) which calls `process_weights_after_loading` to quantize the weights as they are loading. This reduces the amount of memory that is required to online quantize models, but has only been implemented for CT_FP8_CHANNELWISE and doesn't support currently post processing operations which require multiple parameters, such as marlin repacking.\n\n## Design Considerations\n\n### Nomenclature\n\n- \u201cCheckpoint format\u201d refers to the format in which weights are loaded from disk or provided by a user.\n- \u201cModel format\u201d refers to the state of the model after `init` but before weights are processed with `process_weights_after_loading` . The mapping between \u201ccheckpoint format\u201d and \u201cmodel format\u201d is implemented by `model.load_weights`.\n- \u201cKernel format\u201d refers to the state of the model after `process_weights_after_loading`\n- In the case that checkpoint format is unquantized, but the kernel format is quantized, we call this \u201conline quantization\u201d, where unquantized weights are quantized by vLLM during/after loading.\n\n### Model Cuda Graph\n\nAfter models are loaded for the first time, a cuda graph is captured of the model which is used to accelerate inference. This cuda graph shares the same tensor data pointers as the model used to load weights. As of now, the data pointers used by the cuda graph cannot be updated after capture. This means that any time reloading happens, the new data must be copied into the cuda graph tensors.\n\nRegenerating the model cuda graph is far too slow for the required cadence of model reloading (on the order of a few seconds).\n\n### Memory Requirements\n\nAn ideal solution would use as little memory as is required to load model weights. Some implementations, such as the current implementation of online quantization, require eagerly duplicating all model weights prior to loading, which effectively doubles the amount of memory required to load a model. This is a blocker for enabling reloading of large (600Gb+) models.\n\nAdditionally, an ideal solution would only use as much memory as is required to store the quantized model, not the unquantized model. In cases such as NVFP4, this would cut the memory requirements of using vLLM reloading by one fourth.\n\n### Existing Quantized Reloading Scripts\n\nAlthough online quantization and quantized weight reloading support is limited in vLLM as of now, there already exist users who are using vLLM to do online quantized reloading. Below are a list of examples.\n\n1. [MoonshotAI](https://github.com/MoonshotAI/checkpoint-engine/blob/44d5670b0e6aed5b9cd6c16e970c09f3dc888ad0/checkpoint_engine/worker.py#L167)\n2. [Verl](https://github.com/volcengine/verl/blob/f332fc814718b9ea7968f6d264211460d4e90fff/verl/utils/vllm/vllm_fp8_utils.py#L209)\n3. Periodic Labs, which calls `model.load_weights` with subsets ",
    "url": "https://github.com/vllm-project/vllm/issues/30359",
    "state": "open",
    "labels": [
      "RFC"
    ],
    "created_at": "2025-12-09T21:24:20Z",
    "updated_at": "2025-12-19T18:19:22Z",
    "comments": 8,
    "user": "kylesayrs"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30358,
    "title": "[Bug]: NIXL PD disaggregate with host_buffer has accuracy issue - Prefill scheduled num_block mismatch at update_state_after_alloc and request_finished",
    "body": "### Your current environment\n\nvllm-commit-id: 73a484caa1ad320d6e695f098c25c479a71e6774\n\nTested with A100\n\n### \ud83d\udc1b Describe the bug\n\nHow to reproduce\n```\nPREFILL_BLOCK_SIZE=16 DECODE_BLOCK_SIZE=16 bash tests/v1/kv_connector/nixl_integration/run_accuracy_test.sh  --kv_buffer_device cpu\n```\n\naccuracy is ~0.3 much lower than expected 0.4 with Qwen0.6\n\n---\n\nWhat is the issue\n\nI found that the num_blocks sent to `update_state_after_alloc` and `request_finished` sometimes is not match. \n\n`update_state_after_alloc` => this function is scheduled by `scheduler.schedule` to update req_to_save and req_to_receive list, and block_ids passed by the method will indicate which blocks belong to one request.\n\n`request_finished` => this function is called also in `scheduler._connector_finished` to send completed request block_ids list to create a new metadata for decoder.\n\nHowever, based print logs, sometimes, block_ids in `scheduler.schedule` `update_state_after_alloc` is shorter than `scheduler._connector_finished` `request_finished`  sometimes.\n\nExample as below\n\n```\n\n\ud83d\udcca Found 1320 unique Request IDs.\n\nFINAL SUMMARY\n\u2705 Consistent Requests : 1085  => num_blocks are same at `update_state_after_alloc` and `request_finished` \n\u274c Mismatched Requests : 235 => num_blocks is less in `update_state_after_alloc` than `request_finished` \n```\n\n```\n================================================================================\n\ud83d\udd34 MISMATCH DETECTED: cmpl-25c7397c-5686-4b70-a569-29ef04c7b4f9-0\n   First Block Count: 44\n   Last Block Count : 71\n   --- Raw Lines for Context ---\n   \u001b[0;36m(EngineCore_DP0 pid=417455)\u001b[0;0m update_state_after_alloc req_id=\"request.request_id='cmpl-25c7397c-5686-4b70-a569-29ef04c7b4f9-0'\" num_tokens=1121 len(block_ids)=44 block_ids=[162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205]\n   \u001b[0;36m(EngineCore_DP0 pid=417455)\u001b[0;0m request_finished: prepare meta for decode: request.request_id='cmpl-25c7397c-5686-4b70-a569-29ef04c7b4f9-0' request.num_tokens=1122 len(block_ids)=71 block_ids=[162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232]\n--------------------------------------------------------------------------------\n\ud83d\udd34 MISMATCH DETECTED: cmpl-d77aa1e2-a55a-4a7e-8435-f3bfaaf7c7ed-0\n   First Block Count: 26\n   Last Block Count : 84\n   --- Raw Lines for Context ---\n   \u001b[0;36m(EngineCore_DP0 pid=417455)\u001b[0;0m update_state_after_alloc req_id=\"request.request_id='cmpl-d77aa1e2-a55a-4a7e-8435-f3bfaaf7c7ed-0'\" num_tokens=1331 len(block_ids)=26 block_ids=[310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335]\n   \u001b[0;36m(EngineCore_DP0 pid=417455)\u001b[0;0m request_finished: prepare meta for decode: request.request_id='cmpl-d77aa1e2-a55a-4a7e-8435-f3bfaaf7c7ed-0' request.num_tokens=1332 len(block_ids)=84 block_ids=[310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393]\n--------------------------------------------------------------------------------\n\ud83d\udd34 MISMATCH DETECTED: cmpl-3ccca907-6af5-41fd-acdf-8a0bd0b48322-0\n   First Block Count: 71\n   Last Block Count : 82\n   --- Raw Lines for Context ---\n   \u001b[0;36m(EngineCore_DP0 pid=417455)\u001b[0;0m update_state_after_alloc req_id=\"request.request_id='cmpl-3ccca907-6af5-41fd-acdf-8a0bd0b48322-0'\" num_tokens=1307 len(block_ids)=71 block_ids=[394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464]\n   \u001b[0;36m(EngineCore_DP0 pid=417455)\u001b[0;0m request_finished: prepare meta for decode: request.request_id='cmpl-3ccca907-6af5-41fd-acdf-8a0bd0b48322-0' request.num_tokens=1308 len(block_ids)=82 block_ids=[394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,",
    "url": "https://github.com/vllm-project/vllm/issues/30358",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-09T20:15:48Z",
    "updated_at": "2025-12-10T17:07:38Z",
    "comments": 3,
    "user": "xuechendi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169970,
    "title": "Does torch._grouped.mm work with cudagraphs over multiple nodes?",
    "body": "### \ud83d\udc1b Describe the bug\n\ntorch._grouped_mm auses dynamic memory allocations via c10::cuda::CUDACachingAllocator::allocate() that appears to be incompatible with CUDA graph capture and replay. This causes \"CUDA error: an illegal memory access was encountered\" when these operations are captured in a CUDA graph and later replayed, particularly in multi-node distributed settings with NCCL.\nEnvironment\nPyTorch version: 2.9.0+ (with grouped_mm support)\nCUDA version: 12.8+\nGPU: H100/H200 (SM90/SM100)\nDistributed: Multi-node with NCCL, Tensor Parallelism\n\n```python\nimport torch\n# Setup\ndevice = torch.device(\"cuda\")\nmat_a = torch.randn(4, 128, 256, dtype=torch.bfloat16, device=device)\nmat_b = torch.randn(4, 256, 512, dtype=torch.bfloat16, device=device)\n# Warmup\nout = torch._grouped_mm(mat_a, mat_b)\n# Capture CUDA graph\ngraph = torch.cuda.CUDAGraph()\nwith torch.cuda.graph(graph):\n    out = torch._grouped_mm(mat_a, mat_b)\n# Replay - may cause illegal memory access\ngraph.replay()  # Works sometimes\ngraph.replay()  # More likely to fail\n```\n\nIn multi-node distributed scenarios (e.g., vLLM with tensor parallelism across nodes), the failure rate is much higher and typically manifests on the first inference request after model deployment.\n\n### Versions\n\n```\nCollecting environment information...\nPyTorch version: 2.9.0a0+gitcdb6201\nIs debug build: False\nCUDA used to build PyTorch: 12.8\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.3 LTS (x86_64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version: Could not collect\nCMake version: Could not collect\nLibc version: glibc-2.39\n\nPython version: 3.11.14 (tags/v3.11.14:cd1c3a63428, Oct  9 2025, 19:23:04) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-6.6.72+-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: 12.8.93\nCUDA_MODULE_LOADING set to: \nGPU models and configuration: \nGPU 0: NVIDIA H100 80GB HBM3\nGPU 1: NVIDIA H100 80GB HBM3\nGPU 2: NVIDIA H100 80GB HBM3\nGPU 3: NVIDIA H100 80GB HBM3\nGPU 4: NVIDIA H100 80GB HBM3\nGPU 5: NVIDIA H100 80GB HBM3\nGPU 6: NVIDIA H100 80GB HBM3\nGPU 7: NVIDIA H100 80GB HBM3\n\nNvidia driver version: 550.90.07\ncuDNN version: Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.14.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.14.0\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\nCaching allocator config: N/A\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        52 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               208\nOn-line CPU(s) list:                  0-207\nVendor ID:                            GenuineIntel\nModel name:                           Intel(R) Xeon(R) Platinum 8481C CPU @ 2.70GHz\nCPU family:                           6\nModel:                                143\nThread(s) per core:                   2\nCore(s) per socket:                   52\nSocket(s):                            2\nStepping:                             8\nBogoMIPS:                             5399.99\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 arat avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid cldemote movdiri movdir64b fsrm md_clear serialize tsxldtrk amx_bf16 avx512_fp16 amx_tile amx_int8 arch_capabilities\nHypervisor vendor:                    KVM\nVirtualization type:                  full\nL1d cache:                            4.9 MiB (104 instances)\nL1i cache:                            3.3 MiB (104 instances)\nL2 cache:                             208 MiB (104 instances)\nL3 cache:                             210 MiB (2 instances)\nNUMA node(s):                         2\nNUMA node0 CPU(s):                    0-51,104-155\nNUMA node1 CPU(s):                    52-103,156-207\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVu",
    "url": "https://github.com/pytorch/pytorch/issues/169970",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "module: cuda",
      "module: cuda graphs"
    ],
    "created_at": "2025-12-09T18:12:10Z",
    "updated_at": "2025-12-16T22:00:56Z",
    "comments": 3,
    "user": "ashahab"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7900,
    "title": "`Permission denied` when sharing cache between users",
    "body": "### Describe the bug\n\nWe want to use `datasets` and `transformers` on a shared machine. Right now, each user has a separate HF_HOME in their home directory. To reduce duplicates of the datasets, we want to share that cache. While experimenting, we are running into `Permission denied` errors.\n\nIt looks like this was supported in the past (see #6589)?\n\nIs there a correct way to share caches across users?\n\n### Steps to reproduce the bug\n\n1. Create a directory `/models/hf_hub_shared_experiment` with read/write permissions for two different users\n2. For each user run the script below\n\n```python\nimport os\n\nos.environ[\"HF_HOME\"] = \"/models/hf_hub_shared_experiment\"\nos.environ[\"HF_DATASETS_CACHE\"] = \"/models/hf_hub_shared_experiment/data\"\n\nimport datasets\nimport transformers\n\nDATASET = \"tatsu-lab/alpaca\"\nMODEL = \"meta-llama/Llama-3.2-1B-Instruct\"\n\nmodel = transformers.AutoModelForCausalLM.from_pretrained(MODEL)\ntokenizer = transformers.AutoTokenizer.from_pretrained(MODEL)\ndataset = datasets.load_dataset(DATASET)\n```\n\nThe first user is able to download and use the model and dataset. The second user gets these errors:\n\n```\n$ python ./experiment_with_shared.py\nCould not cache non-existence of file. Will ignore error and continue. Error: [Errno 13] Permission denied: '/models/hf_hub_shared_experiment/hub/models--meta-llama--Llama-3.2-1B-Instruct/.no_exist/9213176726f574b556790deb65791e0c5aa438b6/custom_generate/generate.py'\nCould not cache non-existence of file. Will ignore error and continue. Error: [Errno 13] Permission denied: '/models/hf_hub_shared_experiment/hub/datasets--tatsu-lab--alpaca/.no_exist/dce01c9b08f87459cf36a430d809084718273017/alpaca.py'\nCould not cache non-existence of file. Will ignore error and continue. Error: [Errno 13] Permission denied: '/models/hf_hub_shared_experiment/hub/datasets--tatsu-lab--alpaca/.no_exist/dce01c9b08f87459cf36a430d809084718273017/.huggingface.yaml'\nCould not cache non-existence of file. Will ignore error and continue. Error: [Errno 13] Permission denied: '/models/hf_hub_shared_experiment/hub/datasets--tatsu-lab--alpaca/.no_exist/dce01c9b08f87459cf36a430d809084718273017/dataset_infos.json'\nTraceback (most recent call last):\n  File \"/home/user2/.venv/experiment_with_shared.py\", line 17, in <module>\n    dataset = datasets.load_dataset(DATASET)\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/user2/.venv/lib/python3.12/site-packages/datasets/load.py\", line 1397, in load_dataset\n    builder_instance = load_dataset_builder(\n                       ^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/user2/.venv/lib/python3.12/site-packages/datasets/load.py\", line 1171, in load_dataset_builder\n    builder_instance: DatasetBuilder = builder_cls(\n                                       ^^^^^^^^^^^^\n  File \"/home/user2/.venv/lib/python3.12/site-packages/datasets/builder.py\", line 390, in __init__\n    with FileLock(lock_path):\n  File \"/home/user2/.venv/lib/python3.12/site-packages/filelock/_api.py\", line 377, in __enter__\n    self.acquire()\n  File \"/home/user2/.venv/lib/python3.12/site-packages/filelock/_api.py\", line 333, in acquire\n    self._acquire()\n  File \"/home/user2/.venv/lib/python3.12/site-packages/filelock/_unix.py\", line 45, in _acquire\n    fd = os.open(self.lock_file, open_flags, self._context.mode)\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nPermissionError: [Errno 13] Permission denied: '/models/hf_hub_shared_experiment/data/_models_hf_hub_shared_experiment_data_tatsu-lab___alpaca_default_0.0.0_dce01c9b08f87459cf36a430d809084718273017.lock'\n```\n\n### Expected behavior\n\nThe second user should be able to read the shared cache files.\n\n### Environment info\n\n$ datasets-cli env\n\n- `datasets` version: 4.4.1\n- Platform: Linux-6.8.0-88-generic-x86_64-with-glibc2.39\n- Python version: 3.12.3\n- `huggingface_hub` version: 0.36.0\n- PyArrow version: 22.0.0\n- Pandas version: 2.3.3\n- `fsspec` version: 2025.10.0",
    "url": "https://github.com/huggingface/datasets/issues/7900",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-09T16:41:47Z",
    "updated_at": "2025-12-16T15:39:06Z",
    "comments": 2,
    "user": "qthequartermasterman"
  },
  {
    "repo": "sgl-project/sglang",
    "number": 14746,
    "title": "Cannot join SGL slack Channel",
    "body": "same issue with [#3929](https://github.com/sgl-project/sglang/issues/3929) and [#11983](https://github.com/sgl-project/sglang/issues/11983)\n\nCan we get a new invitation link? Thanks a lot!",
    "url": "https://github.com/sgl-project/sglang/issues/14746",
    "state": "closed",
    "labels": [],
    "created_at": "2025-12-09T15:43:51Z",
    "updated_at": "2025-12-10T08:33:01Z",
    "comments": 2,
    "user": "alphabetc1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169954,
    "title": "How to prevent landing PRs on sparse tensors that should be rejected?",
    "body": "Recently, https://github.com/pytorch/pytorch/pull/169807 was submitted that added out-of-bounds checks for inputs of constructing a sparse COO tensor. Sounds reasonable, right? No, it is not right because the corresponding checks already exist but are disabled and the PR authors/reviewers are not aware of this. Fortunately, we (thanks @nikitaved!) discovered https://github.com/pytorch/pytorch/pull/169807 and were able to intervene: the PR is now closed without merge.\n\nAs a side note, the checks are disabled by default for performance reasons: checking sparse tensors inputs is an expensive operation as the tensor inputs (e.g. indices) must be verified element-wise, checking just the dtype and sizes of sparse tensor inputs is insufficient.\n\nThere exists other similar PRs (e.g. https://github.com/pytorch/pytorch/pull/163535) that \"fix\" issues due to users invalid inputs while the proper fix would have been educate users about [check_sparse_tensor_invariants](https://docs.pytorch.org/docs/stable/generated/torch.sparse.check_sparse_tensor_invariants.html). Unfortunately, https://github.com/pytorch/pytorch/pull/163535 got landed while it should have been rejected for the same reasons as explained above leading to performance degradation.\n\nThis issue is raised to seek solutions to prevent landing sparse tensor related PRs that fix crashes due to invalid user inputs to sparse tensor constructors when the usage of `check_sparse_tensor_invariants` would be sufficient for revealing errors in the user inputs.\n\nHere is a list of ideas:\n1. Enable invariant checks by default when `torch.sparse_coo_tensor` (and similar to CSR constructors) is called from a user script but disable the checks when the constructor is called inside a torch function.\n2. Add a comment saying \"Do not implement checks that can be enabled by `check_sparse_tensor_invariants`\" to sparse tensor constructor implementations where one should want adding these checks. \n3. Require that landing sparse tensor related PRs must be approved by someone who is familiar with sparse tensor internals. Apparently, the code-owner idea in pytorch does quite not work what comes to updating sparse tensor related codes in torch.\n\nAny other idea?\n\n^ @amjames @malfet @janeyx99 @albanD @cpuhrsch \n\ncc @nikitaved @cpuhrsch @amjames @bhosmer @jcaip",
    "url": "https://github.com/pytorch/pytorch/issues/169954",
    "state": "closed",
    "labels": [
      "triage review",
      "module: sparse"
    ],
    "created_at": "2025-12-09T14:27:46Z",
    "updated_at": "2025-12-17T04:25:50Z",
    "user": "pearu"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42740,
    "title": "how to train trocr with transformers 4.57+?",
    "body": "i train trocr with tranfomers 4.15, the results is right,but train with 4.57.1,the acc is always 0 , i did't find the reason,did t can train succ with latest transofrmers?",
    "url": "https://github.com/huggingface/transformers/issues/42740",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-09T14:07:50Z",
    "updated_at": "2026-01-05T06:46:34Z",
    "user": "cqray1990"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42739,
    "title": "How about adding local kernel loading to `transformers.KernelConfig()`",
    "body": "### Feature request\n\nAs title.\n\n### Motivation\n\nCurrently, the class `KernelConfig()` creates the `kernel_mapping` through the `LayerRepository` provided by `huggingface/kernels`. The `LayerRepository` downloads and loads kernel from the hub. I think adding the ability for it to load kernel locally should be very helpful for the debugging process.\n\n### Your contribution\n\n`huggingface/kernels` already has `LocalLayerRepository` built in. Maybe we should consider adding it to `KernelConfig()`.",
    "url": "https://github.com/huggingface/transformers/issues/42739",
    "state": "closed",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-12-09T12:22:41Z",
    "updated_at": "2025-12-17T01:21:57Z",
    "user": "zheliuyu"
  },
  {
    "repo": "huggingface/peft",
    "number": 2945,
    "title": "Return base model state_dict with original keys",
    "body": "### Feature request\n\nTL;DR: `from peft import get_base_model_state_dict`\n\nHi!\n\nI'm looking for a way to get the state dict of the base model after it has been wrapped in a `PeftModel` while preserving the original model's state dict keys. To the best of my knowledge, the only way this can be done right now is getting the state dict from `peft_model.base_model.model` and manually patching the keys by removing the `.base_layer.` infix and filtering our peft param keys.\n\nA reason you wouldn't want to load the base model's state dict before wrapping it, for example, is when you are loading state dicts after FSDP wrapping your peft model.\n\n### Your contribution\n\nI have some of this logic implemented for Torchtitan. I could repurpose some of it for a PR that handles PEFT's edge-cases a bit more gracefully (so far I've only checked my approach for LoRA).",
    "url": "https://github.com/huggingface/peft/issues/2945",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-09T11:23:52Z",
    "updated_at": "2025-12-09T17:06:13Z",
    "comments": 6,
    "user": "dvmazur"
  },
  {
    "repo": "pytorch/ao",
    "number": 3469,
    "title": "per tensor symmetric activation quantization",
    "body": "Is there a w8a8 QAT config that support the following describe? \nint8  per tensor symmetric activation quantization and int8 per channel weight symmetric quantization ",
    "url": "https://github.com/pytorch/ao/issues/3469",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-09T11:12:02Z",
    "updated_at": "2025-12-12T21:23:43Z",
    "comments": 2,
    "user": "jivercx"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30325,
    "title": "[Performance]: Can we enable triton_kernels on sm120",
    "body": "### Proposal to improve performance\n\nSince PR (https://github.com/triton-lang/triton/pull/8498) had been merged, we may enable triton_kernels on sm120. \nhttps://github.com/vllm-project/vllm/blob/67475a6e81abea915857f82e6f10d80b03b842c9/vllm/model_executor/layers/quantization/mxfp4.py#L153-L160\n\nAlthough I haven't looked at the relevant code in detail yet, I think it should be sufficient to complete the unit tests(or vllm had already had, just skip on sm120, delete one line is enough) for all the kernels involved when triton_kernels is enabled and run them on sm120.\n\n@zyongye Does this idea make sense?\n\n### Report of performance regression\n\n_No response_\n\n### Misc discussion on performance\n\n_No response_\n\n### Your current environment (if you think it is necessary)\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30325",
    "state": "open",
    "labels": [
      "performance"
    ],
    "created_at": "2025-12-09T09:21:04Z",
    "updated_at": "2025-12-10T10:16:18Z",
    "comments": 2,
    "user": "ijpq"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169929,
    "title": "Python 3.14 \u2013 No CUDA/GPU Wheels Available (Only CPU Build Installed)",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi PyTorch Team,\n\nI\u2019m using Python 3.14, and I noticed that the latest PyTorch versions install successfully, but only CPU builds are available:\n\npip install torch torchvision torchaudio\n\n**Result,**\ntorch.__version__ \u2192 2.9.1+cpu\ntorch.version.cuda \u2192 None\ntorch.cuda.is_available() \u2192 False\n\n**My system has a valid CUDA-enabled GPU**:\n\nGPU: NVIDIA GeForce RTX 3080\nDriver Version: 573.44\nCUDA Version (nvidia-smi): 12.8\nnvcc Version: 12.4\n\nHowever, no CUDA wheels exist for cp314 on the official index:\n\nhttps://download.pytorch.org/whl/cu121\nhttps://download.pytorch.org/whl/cu124\n\n**I also tried:**\n\npip install torch==2.3.0+cu121 --index-url https://download.pytorch.org/whl/cu121\n\n\n**but received:**\n\nNo matching distribution found for torch==2.3.0+cu121\n\n_**Could you please confirm:**_\n\n**Does PyTorch currently provide CUDA-enabled wheels for Python 3.14?\n\nIf not, is GPU support for Python 3.14 planned, and is there a timeline for release?\n\nAre there any nightly GPU wheels for Python 3.14 available for testing?**\n\n### Versions\n\n**System / Environment**\n\nOS: Windows 11 (64-bit)\nPython: 3.14.0\nPip: 25.3\nCUDA (nvidia-smi): 12.8\nCUDA (nvcc): 12.4\nGPU: NVIDIA GeForce RTX 3080 (16GB)\nNVIDIA Driver Version: 573.44\n\n**PyTorch Installation**\n\n**Command used:**\n\npip install torch torchvision torchaudio\n\n\n**Installed versions:**\n\ntorch: 2.9.1+cpu\ntorchvision: (CPU build)\ntorchaudio: (CPU build)\ntorch.cuda.is_available(): False\ntorch.version.cuda: None\n\ncc @seemethere @malfet @atalman @tinglvv @nWEIdia",
    "url": "https://github.com/pytorch/pytorch/issues/169929",
    "state": "open",
    "labels": [
      "module: binaries",
      "triaged"
    ],
    "created_at": "2025-12-09T07:57:15Z",
    "updated_at": "2025-12-16T15:06:50Z",
    "comments": 9,
    "user": "ashikauk24-source"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30296,
    "title": "[Usage]: Is it possible to configure P2P kv-cache in multi-machine and multi-gpu scenarios?",
    "body": "### Your current environment\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version                : Could not collect\nCMake version                : version 4.1.3\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu129\nIs debug build               : False\nCUDA used to build PyTorch   : 12.9\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.12 (main, Oct 10 2025, 08:52:57) [GCC 11.4.0] (64-bit runtime)\nPython platform              : Linux-5.15.0-126-generic-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.9.86\nCUDA_MODULE_LOADING set to   :\nGPU models and configuration :\nGPU 0: NVIDIA L20\nGPU 1: NVIDIA L20\nGPU 2: NVIDIA L20\nGPU 3: NVIDIA L20\nGPU 4: NVIDIA L20\nGPU 5: NVIDIA L20\nGPU 6: NVIDIA L20\nGPU 7: NVIDIA L20\n\nNvidia driver version        : 550.90.07\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-python==0.5.2\n[pip3] numpy==2.2.0\n[pip3] nvidia-cublas-cu12==12.9.1.4\n[pip3] nvidia-cuda-cupti-cu12==12.9.79\n[pip3] nvidia-cuda-nvrtc-cu12==12.9.86\n[pip3] nvidia-cuda-runtime-cu12==12.9.79\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cudnn-frontend==1.16.0\n[pip3] nvidia-cufft-cu12==11.4.1.4\n[pip3] nvidia-cufile-cu12==1.14.1.1\n[pip3] nvidia-curand-cu12==10.3.10.19\n[pip3] nvidia-cusolver-cu12==11.7.5.82\n[pip3] nvidia-cusparse-cu12==12.5.10.65\n[pip3] nvidia-cusparselt-cu12==0.7.1\n[pip3] nvidia-cutlass-dsl==4.2.1\n[pip3] nvidia-ml-py==13.580.82\n[pip3] nvidia-nccl-cu12==2.27.5\n[pip3] nvidia-nvjitlink-cu12==12.9.86\n[pip3] nvidia-nvshmem-cu12==3.3.20\n[pip3] nvidia-nvtx-cu12==12.9.79\n[pip3] pyzmq==27.1.0\n[pip3] torch==2.9.0+cu129\n[pip3] torchaudio==2.9.0+cu129\n[pip3] torchvision==0.24.0+cu129\n[pip3] transformers==4.57.1\n[pip3] triton==3.5.0\n[conda] Could not collect\n\n==============================\n         vLLM Info\n==============================\nROCM Version                 : Could not collect\nvLLM Version                 : 0.11.2\nvLLM Build Flags:\n  CUDA Archs: Not Set; ROCm: Disabled\nGPU Topology:\n        GPU0    GPU1    GPU2    GPU3    GPU4    GPU5    GPU6    GPU7    CPU Affinity    NUMA Affinity   GPU NUMA ID\nGPU0     X      PIX     PIX     PIX     SYS     SYS     SYS     SYS     0-55,112-167    0               N/A\nGPU1    PIX      X      PIX     PIX     SYS     SYS     SYS     SYS     0-55,112-167    0               N/A\nGPU2    PIX     PIX      X      PIX     SYS     SYS     SYS     SYS     0-55,112-167    0               N/A\nGPU3    PIX     PIX     PIX      X      SYS     SYS     SYS     SYS     0-55,112-167    0               N/A\nGPU4    SYS     SYS     SYS     SYS      X      PIX     PIX     PIX     56-111,168-223  1               N/A\nGPU5    SYS     SYS     SYS     SYS     PIX      X      PIX     PIX     56-111,168-223  1               N/A\nGPU6    SYS     SYS     SYS     SYS     PIX     PIX      X      PIX     56-111,168-223  1               N/A\nGPU7    SYS     SYS     SYS     SYS     PIX     PIX     PIX      X      56-111,168-223  1               N/A\n\n\n==============================\n     Environment Variables\n==============================\nNVIDIA_VISIBLE_DEVICES=all\nNVIDIA_REQUIRE_CUDA=cuda>=12.9 brand=unknown,driver>=535,driver<536 brand=grid,driver>=535,driver<536 brand=tesla,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=vapps,driver>=535,driver<536 brand=vpc,driver>=535,driver<536 brand=vcs,driver>=535,driver<536 brand=vws,driver>=535,driver<536 brand=cloudgaming,driver>=535,driver<536 brand=unknown,driver>=550,driver<551 brand=grid,driver>=550,driver<551 brand=tesla,driver>=550,driver<551 brand=nvidia,driver>=550,driver<551 brand=quadro,driver>=550,driver<551 brand=quadrortx,driver>=550,driver<551 brand=nvidiartx,driver>=550,driver<551 brand=vapps,driver>=550,driver<551 brand=vpc,driver>=550,driver<551 brand=vcs,driver>=550,driver<551 brand=vws,driver>=550,driver<551 brand=cloudgaming,driver>=550,driver<551 brand=unknown,driver>=560,driver<561 brand=grid,driver>=560,driver<561 brand=tesla,driver>=560,driver<561 brand=nvidia,driver>=560,driver<561 brand=quadro,driver>=560,driver<561 brand=quadrortx,driver>=560,driver<561 brand=nvidiartx,driver>=560,driver<561 brand=vapps,driver>=560,driver<561 brand=vpc,driver>=560,driver<561 brand=vcs,driver>=560,driver<561 brand=vws,driver>=560,driver<561 brand=cloudgaming,driver>=560,driver<561 brand=unknown,driver>=",
    "url": "https://github.com/vllm-project/vllm/issues/30296",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-09T03:29:48Z",
    "updated_at": "2025-12-09T03:29:48Z",
    "comments": 0,
    "user": "lululu-1997"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169893,
    "title": "Investigate which submodules in third_party/ can be omitted from stable header hiding",
    "body": "In https://github.com/pytorch/pytorch/pull/167496 we hide all headers except stable/headeronly/shim when TORCH_STABLE_ONLY/TORCH_TARGET_VERSION are defined\n\n@pearu raised that headers in third_party/ should be exposed\n\n> The TORCH_TARGET_VERSION post-processing modifies all header files (except few such as headeronly and stable headers) including the header files that are copied from third_party . I wonder what is the motivation for modifying the third party header files considering that these do not depend on ATen  or torch headers?\nMy use case is pybind/pybind.h that is used to construct a simple extension module that has no torch dependency whatsoever and TORCH_TARGET_VERSION post-processing seems an overkill: it protects from something (unstable libtorch symbols) that never exists in this use case and it will unnecessarily restrict the usage of third-party tools such as pybind that are header-only libraries.\nSo, disabling TORCH_TARGET_VERSION post-processing for third-party tools that we know are header-only libraries, should be always safe.\n\nWe need to investigate which libraries in third_party can be safely exposed\n\ncc @janeyx99 @jbschlosser",
    "url": "https://github.com/pytorch/pytorch/issues/169893",
    "state": "open",
    "labels": [
      "module: cpp-extensions",
      "module: cpp",
      "triaged"
    ],
    "created_at": "2025-12-08T22:45:21Z",
    "updated_at": "2025-12-30T21:08:11Z",
    "comments": 2,
    "user": "mikaylagawarecki"
  },
  {
    "repo": "huggingface/trl",
    "number": 4641,
    "title": "Further improving `GRPOTrainer` doc to include Qwen SAPO in Loss Types",
    "body": "### Feature request\n\nHello,\n\nI'd like to further document the Qwen SAPO implementation from @pramodith , not in the `paper_index` (he already did a good job) but in the `loss-types` subsection of the `GRPOTrainer`: https://huggingface.co/docs/trl/main/en/grpo_trainer#loss-types.\n\nI'd like to add the formula, a short paragraph description similar to other losses presented, and maybe the figure below I made, inspired by the SAPO paper Fig.1, that highlights visually the differences in trust regions with other `loss_type` options available for GRPO (at least GRPO, DAPO and DR GRPO), which is the core difference.\n\n<img width=\"1196\" height=\"694\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/7cfb33d3-bb39-4420-8da1-bd482f28f52e\" />\n\n*Note:* *negative temp* $\\tau=1.5$  *is not a typo, it's to see the difference more clearly with positive temp (as the delta with 1.05 is too small)*\n\n### Motivation\n\nCompared to the available losses in the repo, I believe Qwen's SAPO difference is more pronounced. It's not just a matter on how to average like DAPO. Changing the PPO clip that almost everyone use is worth, imo, being mentioned in the `loss-types` subsection.\n\nSince there may be people not necessarily familiar with some RL details using TRL, I thought covering SAPO could help people better grasp or visualize the difference in the trust region and gradient weights.\n\n### Your contribution\n\nI'd like to submit a PR if you think this is something useful for readers/users.",
    "url": "https://github.com/huggingface/trl/issues/4641",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation",
      "\u2728 enhancement",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-12-08T20:06:59Z",
    "updated_at": "2025-12-12T17:28:06Z",
    "comments": 1,
    "user": "casinca"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169870,
    "title": "Capturing ViewAndMutationMeta for training graphs for PyTorch 2.8",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\n### Problem\nWe want to capture ViewAndMutationMeta for training graphs so that we can capture and propagate input/output aliasing information to later compilation phases.\n\n### Likely Approach\nFor training graphs, it seems that the best place to to do that would be to capture this information right before partitioning, i.e., before **`partition_fn`** is invoked.  A _user-defined_, custom **`partition_fn`**  allows us to intercept the compilation-state where ViewAndMutationMeta is accessible.\n\nThe default signature for **`partition_fn`**  does not take an additional parameter ( for _fw_metadata_ which holds ViewAndMutationMeta). If that is allowed, we can intercept the AOTAutograd compilation just before partitioning and capture the ViewAndMutationMeta.\n\nThis is a non-invasive approach requiring us to not patch-up local Pytorch installations.\n\n### Request\nWe request that the callsite of the **`partition_fn`** in _jit_compile_runtime_wrappers.py_ allow passing of ``fw_metadata``.\n\nThanks.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @chauhang @penguinwu @ezyang @bhosmer @smessmer @ljk53 @bdhirsh @gqchen @nikitaved @soulitzer @Varal7 @xmfan",
    "url": "https://github.com/pytorch/pytorch/issues/169870",
    "state": "open",
    "labels": [
      "triaged",
      "module: viewing and reshaping",
      "oncall: pt2"
    ],
    "created_at": "2025-12-08T19:52:18Z",
    "updated_at": "2025-12-28T22:09:55Z",
    "comments": 1,
    "user": "pratnali"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42713,
    "title": "mulitmodal forward pass for ministral 3 family",
    "body": "### System Info\n\nhttps://github.com/huggingface/transformers/blob/main/src/transformers/models/ministral3/modeling_ministral3.py#L505\n\nseems like here we are using generic class which takes only the input ids as input ignoring the pixel values. when can we expect this implemented ?\n\n\n\n### Who can help?\n\n@Cyrilvallez \n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nplease implement https://github.com/huggingface/transformers/blob/main/src/transformers/models/gemma3/modeling_gemma3.py#L1174 for ministral family as well with multimodal capabilities\n\n### Expected behavior\n\nneed multimodal capabilities using ministral for finetuning ministral for sequence classification like gemma 3 4b\nhttps://github.com/huggingface/transformers/blob/main/src/transformers/models/gemma3/modeling_gemma3.py#L1174",
    "url": "https://github.com/huggingface/transformers/issues/42713",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-08T18:46:14Z",
    "updated_at": "2025-12-15T11:21:08Z",
    "comments": 4,
    "user": "rishavranaut"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169854,
    "title": "CPython test cases under dynamo don't follow paradigm",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\n### Problem\nCurrently, the test/dynamo folder prevents calling a test case with PYTORCH_TEST_WITH_DYNAMO, and additionally any tests under test/dynamo should have their main method run torch._dynamo.test_case.run_tests.\n\nThe Cpython test suite goes against those two assumptions and requires PYTORCH_TEST_WITH_DYNAMO=1. Additionally, it calls torch.testing._internal.common_utils.run_tests as part of its main method.\n\n### Proposed Solution\nThe cpython tests for 3.13 should be moved out from under the dynamo folder so that the test cases follow the expected paradigm, namely dynamo test cases should not be compiled as all tests under this folder (except cpython tests) may contain their own call to compile.\n\nThis is more of an RFC to garner feedback/thoughts on making the change. As more cpython versions get added to the test suite, the move will become more burdensome.\n\nI'll open a PR to provide an example of the changes.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @mruberry @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @amjames @Lucaskabela @jataylo",
    "url": "https://github.com/pytorch/pytorch/issues/169854",
    "state": "open",
    "labels": [
      "module: tests",
      "triaged",
      "enhancement",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2025-12-08T17:52:30Z",
    "updated_at": "2025-12-12T14:35:03Z",
    "comments": 1,
    "user": "trichmo"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30271,
    "title": "[Usage]: Qwen 3 VL Embedding",
    "body": "### Your current environment\n\nHi I would like to ask if there is a way to extract Qwen 3 VL multimodal embeddings, similar to Jina Embeddings V4, for retrieval purposes?\n\nI've tried to initialize the model this way but it doesn't work:\n```\nmodel = LLM(\n    model=\"Qwen/Qwen3-VL-8B-Instruct\",\n    task=\"embed\",\n    trust_remote_code=True,\n)\n```\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30271",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-08T17:26:41Z",
    "updated_at": "2025-12-09T07:18:35Z",
    "comments": 2,
    "user": "MingFengC"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2390,
    "title": "Request for input shapes to be specified",
    "body": "### Feature request\n\nCurrently, \noptimum-cli does not provide a way to specify static input shapes, it defaults to dynamic shapes. Is there a way to make it possible to specify the input shape? If not, why do we not allow this?\n\nAn example would be:\n`optimum-cli export openvino --model microsoft/resnet-50 graph_convert` -> ` optimum-cli export openvino --model microsoft/resnet-50 graph_convert --input [1, 3, 224, 224]`\n\n### Motivation\n\nSpecifying a static shape in OpenVINO IR is nice to have for the [Intel/Altera FPGA AI Suite](https://www.altera.com/products/development-tools/fpga-ai-suite) toolchain which does not support dynamic input shapes of OpenVINO IR at the moment\n\n### Your contribution\n\nYes if possible or the green light is given that this is allowed.\nSome modifications to the optimum_cli.py file [here](https://github.com/huggingface/optimum/blob/0227a1ce9652b1b02da5a510bf513c585608f8c2/optimum/commands/optimum_cli.py#L179)\nwould probably be needed ",
    "url": "https://github.com/huggingface/optimum/issues/2390",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-08T15:24:04Z",
    "updated_at": "2025-12-20T19:38:02Z",
    "comments": 3,
    "user": "danielliuce"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42698,
    "title": "parse_response must not accept detokenized text",
    "body": "### System Info\n\n[parse_response](https://github.com/huggingface/transformers/blob/5ee9ffe386c5ecc77d8009ab648b8c4c109931ea/src/transformers/tokenization_utils_base.py#L3525) function must only accept raw tokens, but never detokenized text. Parsing from text is a vulnerability and therefore must not be possible.\n\nOnce model response is rendered to text it is not possible to distinguish control tokens from their textual representations. At the very least this leads to inconvenience due to inability to discuss with the model its own codebase: \"here is my code, what is the function calling format used by the model?\" In worst case it can be used as a part of the attack vector e.g. registering a company to pop up in search result with an `<tool call start>rm -rf .<tool call end>` name with a hope that the name will be returned by the model as-is. (E.g. in the UK there used to be [\"; DROP TABLE \"COMPANIES\";--LTD\"](https://find-and-update.company-information.service.gov.uk/company/10542519))\n\nAlso accepting a text string facilitates relying on models only producing text and when we get multimodal models, we end up with no infrastructure for them as everythong is reduced to text.\n\nIt is important to design APIs in such a way that they are hard to be used incorrectly. Passing text to `parse_response` is appealing and kind of the easiest way to use the API.\n\nI am publishing this as an open bug rather than closed security issue because it is a widespread systematic problem that haunts many implementations. It is worth discussing it openly.\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nIf a model produces following token sequences:\n\n`[\"<tool call start>\", \"rm -rf /\", \"<tool call end>\"]` \n`[\"<\", \"tool \", \"call \", \"start\", \">\", \"rm -rf /\", \"<\", \"tool \", \"call \", \"end\", \">\"]` \n\nThey both are detokenized to the same \"<tool call start>rm -rf .<tool call end>\". The [parse_response](https://github.com/huggingface/transformers/blob/5ee9ffe386c5ecc77d8009ab648b8c4c109931ea/src/transformers/tokenization_utils_base.py#L3525)  function has to return the same output for both of them.\n\n### Expected behavior\n\n[parse_response](https://github.com/huggingface/transformers/blob/5ee9ffe386c5ecc77d8009ab648b8c4c109931ea/src/transformers/tokenization_utils_base.py#L3525) must return tool call for `[\"<tool call start>\", \"rm -rf /\", \"<tool call end>\"]`  but a plain text for `[\"<\", \"tool \", \"call \", \"start\", \">\", \"rm -rf /\", \"<\", \"tool \", \"call \", \"end\", \">\"]` .",
    "url": "https://github.com/huggingface/transformers/issues/42698",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-08T12:20:39Z",
    "updated_at": "2025-12-08T15:59:19Z",
    "comments": 2,
    "user": "kibergus"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30248,
    "title": "[Feature]: any plan to support Relaxed Acceptance in v1?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\n[NV Relaxed Acceptance](https://github.com/NVIDIA/TensorRT-LLM/blob/main/docs/source/blogs/tech_blog/blog2_DeepSeek_R1_MTP_Implementation_and_Optimization.md#relaxed-acceptance)\nThere are PRs ([vllm](https://github.com/vllm-project/vllm/pull/21506), [vllm](https://github.com/vllm-project/vllm/pull/22238), [sglang](https://github.com/sgl-project/sglang/pull/7702), [sglang](https://github.com/sgl-project/sglang/pull/8068)) in both sglang and vllm. However, none of them has been merged. What's the story behind this?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30248",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-12-08T08:45:20Z",
    "updated_at": "2025-12-09T10:18:22Z",
    "comments": 4,
    "user": "chengda-wu"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30246,
    "title": "[Usage]: How to disable reasoning for gpt-oss-120b",
    "body": "### Your current environment\n\n```\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.11.13 (main, Jun  5 2025, 13:12:00) [GCC 11.2.0] (64-bit runtime)\nPython platform              : Linux-5.15.0-160-generic-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : Could not collect\nCUDA_MODULE_LOADING set to   :\nGPU models and configuration :\nGPU 0: NVIDIA L20\nGPU 1: NVIDIA L20\nGPU 2: NVIDIA L20\nGPU 3: NVIDIA L20\nGPU 4: NVIDIA L20\nGPU 5: NVIDIA L20\nGPU 6: NVIDIA L20\nGPU 7: NVIDIA L20\n\nNvidia driver version        : 535.274.02\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           52 bits physical, 57 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  96\nOn-line CPU(s) list:                     0-95\nVendor ID:                               GenuineIntel\nModel name:                              Intel(R) Xeon(R) Gold 5418Y\nCPU family:                              6\nModel:                                   143\nThread(s) per core:                      2\nCore(s) per socket:                      24\nSocket(s):                               2\nStepping:                                8\nCPU max MHz:                             3800.0000\nCPU min MHz:                             800.0000\nBogoMIPS:                                4000.00\nFlags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nVirtualization:                          VT-x\nL1d cache:                               2.3 MiB (48 instances)\nL1i cache:                               1.5 MiB (48 instances)\nL2 cache:                                96 MiB (48 instances)\nL3 cache:                                90 MiB (2 instances)\nNUMA node(s):                            2\nNUMA node0 CPU(s):                       0-23,48-71\nNUMA node1 CPU(s):                       24-47,72-95\nVulnerability Gather data sampling:      Not affected\nVulnerability Indirect target selection: Not affected\nVulnerability Itlb multihit:             Not affected\nVulnerability L1tf:                      Not affected\nVulnerability Mds:                       Not affected\nVulnerability Meltdown:                  Not affected\nVulnerability Mmio stale data:           Not affected\nVulnerability Reg file data sampling:    Not affected\nVulnerability Retbleed:                  Not affected\nVulnerability Spec rstack overflow:      Not affected\nVulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:                Mitigation; Enhanced / Automatic IBRS; IBPB conditional; PBRSB-",
    "url": "https://github.com/vllm-project/vllm/issues/30246",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-08T08:23:58Z",
    "updated_at": "2025-12-08T08:23:58Z",
    "comments": 0,
    "user": "WiiliamC"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42690,
    "title": "How to run Phi4MultimodalProcessor",
    "body": "### System Info\n\ntransformers version: 4.57.1\npython version: 3.9\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\n[Phi4MultiModal example](https://huggingface.co/docs/transformers/model_doc/phi4_multimodal)\n\n### Expected behavior\n\nI just run [the example](https://huggingface.co/docs/transformers/model_doc/phi4_multimodal) but there is an error raised.",
    "url": "https://github.com/huggingface/transformers/issues/42690",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-08T03:27:02Z",
    "updated_at": "2025-12-09T12:30:27Z",
    "user": "wcrzlh"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30222,
    "title": "[Bug]: gpt-oss response api: streaming + code interpreter has bugs",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nGpt-oss in streaming mode cannot see internal code interpreter output \n\nthe problem is with https://github.com/vllm-project/vllm/blob/af0444bf40b7db2f3fb9fe1508d25ceba24cac87/vllm/entrypoints/context.py#L720-L732\n\nI can see that tool call result is not appended to message.\n\n\nMy basic testing code looks like this\n```python\nstream = client.responses.create(\n    model=\"vllm-model\",\n    input=[{\"role\": \"user\", \"content\": \"what is 123^456 mod 1000000007? use python tool to solve this problem\"}],\n    tools=[{\"type\": \"code_interpreter\", \"container\": {\"type\": \"auto\"}}],\n    max_output_tokens=32768,\n    temperature=1.0,\n    reasoning={\"effort\": \"high\"},\n    stream=True,\n    instructions=system_prompt,\n    extra_body={\n        \"min_p\": 0.02,\n        \"stop_token_ids\": stop_token_ids,\n        \"chat_template_kwargs\": {\"enable_thinking\": True},\n    }\n)\n\ncurrent_tool_code = \"\"\n\nfor event in stream:\n    generation_idx += 1\n\n    # Reasoning text\n    if event.type == \"response.reasoning_text.delta\":\n        delta = event.delta\n        reasoning_response += delta\n        text_response += delta\n        print(delta, end=\"\", flush=True)  # Real-time output\n\n    # Message text\n    elif event.type == \"response.output_text.delta\":\n        delta = event.delta\n        text_response += delta\n        print(delta, end=\"\", flush=True)\n\n    # Tool call events\n    elif event.type == \"response.code_interpreter_call_code.delta\":\n        current_tool_code += event.delta\n\n    elif event.type == \"response.code_interpreter_call_code.done\":\n        tool_calls_log.append({\n            \"code\": event.code,\n            \"type\": \"code_interpreter\"\n        })\n        current_tool_code = \"\"\n        print(event.code)\n\n    elif event.type == \"response.completed\":\n        # Final event - could extract full response here if needed\n        pass\n```\n\n\nmodel response (ignore the pretty looking, it is just another version for visualization)\n```bash\n============================================================\n\n\n\ud83d\udcad REASONING:\nWe need to compute 123^456 mod 1000000007. It's a big power but within modular exponent. We can compute quickly with pow in Python: pow(123, 456, 1000000007). But the prompt says please use python tool to solve this problem. We'll use python.\n\ud83d\udcdd CODE EXECUTED:\npow(123, 456, 1000000007)\n\n------------------------------------------------------------\n\n\n\ud83d\udcad REASONING:\nLet's see result.\n\n\ud83d\udcad REASONING:\nIt printed something? Wait, no output visible yet. We may need to capture the output. Let's assign.\n\ud83d\udcdd CODE EXECUTED:\nresult = pow(123, 456, 1000000007)\nresult\n\n------------------------------------------------------------\n\n\n\ud83d\udcad REASONING:\nIt returned something? Let's see.\n\n\ud83d\udcad REASONING:\nIt didn't print, but the value is stored. We should print the result.\n\ud83d\udcdd CODE EXECUTED:\nprint(result)\n\n------------------------------------------------------------\n\n\n\ud83d\udcad REASONING:\n565291922\nSo answer is 565291922. Provide box.\n\n\ud83d\udcc4 FINAL ANSWER:\nThe value of \\(123^{456} \\bmod 1000000007\\) is  \n\\[\n\\boxed{565291922}\n\\]\n============================================================\n\u2705 RESPONSE COMPLETED\nTool output tokens: 82\n\n============================================================\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30222",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-08T01:32:35Z",
    "updated_at": "2025-12-08T09:49:55Z",
    "comments": 4,
    "user": "jordane95"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169797,
    "title": "When augment_with_fx_traces=True but the user has misconfigured the FX config, raise an error",
    "body": "### \ud83d\udc1b Describe the bug\n\nIf you dump memory profile with augment_with_fx_traces=True but you don't set torch.fx.experimental._config.enrich_profiler_metadata (or better yet, you accidentally use the dead dynamo version of the config), you will just silently not get any augmentation. This is bad, we should say something if this occurs. I think probably the most appropriate place to give the info is in the memory viz itself; in particular, when we detect a legacy FX filename in the trace (e.g., `eval_with_key`) we should display some help text saying how to get augmented information. The memory profile should also say if augment_with_fx_traces was set so we correctly report if you need to pass that info or not. Also... maybe we should just default augment_with_fx_traces True, if there isn't a reason not to?\n\ncc @robieta @chaekit @guotuofeng @guyang3532 @dzhulgakov @davidberard98 @briancoutinho @sraikund16 @sanrise @mwootton @EikanWang @jgong5 @wenzhe-nrv @yushangdi \n\n### Versions\n\nmain",
    "url": "https://github.com/pytorch/pytorch/issues/169797",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: profiler",
      "module: fx"
    ],
    "created_at": "2025-12-08T01:24:32Z",
    "updated_at": "2025-12-09T18:23:40Z",
    "comments": 0,
    "user": "ezyang"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3687,
    "title": "Feedback about Tensors",
    "body": "There is the following issue on this page: https://docs.pytorch.org/tutorials/beginner/basics/tensorqs_tutorial.html\n\nHello, I just finished the tutorial on tensors, and I think it's really well written. However, I have a question. There are so many attributes and methods related to tensors that after reading the tutorial once, I can't remember them all; I only have a general impression. So I want to know, if my goal is to master PyTorch in depth, is it necessary for me to memorize these specific tensor operations?\n\ncc @albanD @jbschlosser",
    "url": "https://github.com/pytorch/tutorials/issues/3687",
    "state": "open",
    "labels": [
      "question",
      "core"
    ],
    "created_at": "2025-12-07T21:07:52Z",
    "updated_at": "2025-12-08T17:00:50Z",
    "user": "NJX-njx"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30211,
    "title": "[Bug]: How to make vLLM support multi stream torch compile and each stream capture cuda graph.",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nSGLang now supports multi stream  torch compile and each stream  capture cuda graph.  The code link is \n\nhttps://github.com/sgl-project/sglang/blob/main/python/sglang/srt/model_executor/cuda_graph_runner.py#L500-#L506\n\nIf I want to make vLLM support that. My code on vLLM bypass the vLLM backend and make it like sglang\n\n```\nimport torch._dynamo.config\nimport torch._inductor.config\n\ntorch._inductor.config.coordinate_descent_tuning = True\ntorch._inductor.config.triton.unique_kernel_names = True\ntorch._inductor.config.freezing = True \ntorch._inductor.config.fx_graph_cache = False # Experimental feature to reduce compilation times, will be on by default in future\n\nfrom vllm.model_executor.custom_op import CustomOp\n\ndef _to_torch(model: torch.nn.Module, reverse: bool, num_tokens: int):\n    for sub in model._modules.values():\n        # sub.enter_torch_compile(num_tokens=num_tokens)\n        # if isinstance(sub, torch.nn.Module):\n        #     _to_torch(sub, reverse, num_tokens)\n        if isinstance(sub, CustomOp):\n            if reverse:\n                sub.leave_torch_compile()\n            else:\n                sub.enter_torch_compile(num_tokens=num_tokens)\n        if isinstance(sub, torch.nn.Module):\n            _to_torch(sub, reverse, num_tokens)\n\n\n@contextmanager\ndef patch_model(\n    model: torch.nn.Module,\n    enable_compile: bool,\n    num_tokens: int,\n    # tp_group: GroupCoordinator,\n):\n    \"\"\"Patch the model to make it compatible with with torch.compile\"\"\"\n    backup_ca_comm = None\n    current_stream = torch.cuda.current_stream()\n    with torch.cuda.stream(current_stream):\n        print(f\"patch_model, the current_stream:{current_stream.cuda_stream}\", flush = True)\n        try:\n            if enable_compile:\n                _to_torch(model, reverse=False, num_tokens=num_tokens)\n                # backup_ca_comm = tp_group.ca_comm\n                # Use custom-allreduce here.\n                # We found the custom allreduce is much faster than the built-in allreduce in torch,\n                # even with ENABLE_INTRA_NODE_COMM=1.\n                # tp_group.ca_comm = None\n                wrapped_forward = model.forward     # \ud83d\udd25 \u53ea\u6539\u8fd9\u91cc\n                with torch.no_grad():\n                    compiled = torch.compile(wrapped_forward, mode=\"max-autotune-no-cudagraphs\", dynamic=False)\n                yield compiled \n                # yield torch.compile(\n                #     model.forward,\n                #     mode=\"max-autotune-no-cudagraphs\",\n                #     dynamic=False,)\n                # yield torch.compile(\n                #     torch.no_grad()(model.forward),\n                #     mode=\"reduce-overhead\",\n                #     dynamic=_is_hip and get_bool_env_var(\"SGLANG_TORCH_DYNAMIC_SHAPE\"),\n                # )\n            else:\n                yield model.forward\n        finally:\n            if enable_compile:\n                _to_torch(model, reverse=True, num_tokens=num_tokens)\n\n\n    \n    @torch.inference_mode()\n    def _my_dummy_run(\n        self,\n        num_tokens: int,\n        run_decode_phase:bool=False,\n        stream_idx: int = 0,\n    ) -> torch.Tensor:\n        # Set num_scheduled_tokens based on num_tokens and max_num_seqs\n        # for dummy run with LoRA so that the num_reqs collectively\n        # has num_tokens in total.\n        with torch.cuda.stream(torch.cuda.current_stream()):\n            assert num_tokens <= self.scheduler_config.max_num_batched_tokens\n            max_num_reqs = self.scheduler_config.max_num_seqs\n            num_reqs = max_num_reqs if num_tokens >= max_num_reqs else num_tokens\n            min_tokens_per_req = num_tokens // num_reqs\n            num_scheduled_tokens_list = [min_tokens_per_req] * num_reqs\n            num_scheduled_tokens_list[-1] += num_tokens % num_reqs\n            assert sum(num_scheduled_tokens_list) == num_tokens\n            assert len(num_scheduled_tokens_list) == num_reqs\n            num_scheduled_tokens = np.array(num_scheduled_tokens_list,\n                                            dtype=np.int32)\n\n            with self.maybe_dummy_run_with_lora(self.lora_config,\n                                                num_scheduled_tokens):\n                model = self.model\n                if self.is_multimodal_model:\n                    input_ids = None\n                    inputs_embeds = self.inputs_embeds[:num_tokens]\n                else:\n                    input_ids = self.input_ids[:num_tokens]\n                    inputs_embeds = None\n                if self.uses_mrope:\n                    positions = self.mrope_positions[:, :num_tokens]\n                else:\n                    positions = self.positions[:num_tokens]\n\n                if get_pp_group().is_first_rank:\n                    intermediate_tensors = None\n                else:\n          ",
    "url": "https://github.com/vllm-project/vllm/issues/30211",
    "state": "open",
    "labels": [
      "bug",
      "feature request",
      "nvidia"
    ],
    "created_at": "2025-12-07T15:12:04Z",
    "updated_at": "2025-12-15T05:39:39Z",
    "comments": 3,
    "user": "lambda7xx"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16123,
    "title": "Is dynamic weight update / fine-tuning supported in QNN / XNNPACK backends?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI\u2019m working on a research project to fine-tune a model on Android devices. I am exploring using ExecuTorch + QNN or XNNPACK backend for inference acceleration, but need to ensure that the backend can support dynamic modification of weights (i.e., after initialization, allow updating weights / biases, and then run forward again).\n\n**What I found**  \n- In executorch/extension/training/examples/XOR/train.cpp, training code based on executorch is provided, but it does not mention the supported backends.\n- The official XNNPACK backend documentation describes that, during runtime initialization, weights / biases are \u201cpacked\u201d (i.e. weight packing) into XNNPACK\u2019s internal data structures, and the original preprocessed blob\u2019s data is freed. This seems to imply that weights become static / immutable from the perspective of the backend\u2019s execute graph.  \n- I did not find description in the docs or runtime API of any mechanism to \u201cunlock\u201d or \u201cupdate\u201d those packed weights at runtime.  \n- There is an existing issue (#11355) reporting that even dynamic quantization + XNNPACK + Android may fail to load \u201cforward\u201d method, which suggests that non-static quantization / dynamic behavior is fragile or unsupported.  \n- For QNN backend, I saw open / triaged issues about compilation or binary loading, but none that explicitly mention support for runtime weight update.  \n\n**My questions**  \n1. Does ExecuTorch (any of its backends: QNN, XNNPACK, Vulkan, etc.) currently support *runtime in-place weight updates* (i.e. treat model weights as mutable parameters, allow updating them between forward calls, as required in fine-tuning / training / zeroth-order optimization)?  \n2. If not supported, is there a recommended workflow / workaround for on-device fine-tuning with ExecuTorch? Or is this explicitly out of scope?  \n3. If it\u2019s not currently supported, would the maintainers be open to considering such a feature in future (e.g. a \u201cmutable weight\u201d delegate, or mechanism to reload new weights into backend graph)?  \n\nThank you for your time and for developing ExecuTorch \u2014 it is a great tool for on-device inference / deployment, and I hope it can support on-device fine-tuning in the future.\n\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### RFC (Optional)\n\n_No response_\n\ncc @JacobSzwejbka",
    "url": "https://github.com/pytorch/executorch/issues/16123",
    "state": "open",
    "labels": [
      "module: training"
    ],
    "created_at": "2025-12-07T06:24:09Z",
    "updated_at": "2025-12-11T09:27:29Z",
    "comments": 5,
    "user": "qqqqqqqwy"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30193,
    "title": "[Bug]: Behavioral Difference in hidden_states[-1] between vLLM and Transformers for Qwen3VLForConditionalGeneration",
    "body": "### Your current environment\n- vLLM Version: 0.11.2\n- Transformers Version: 4.57\n- Model: Qwen3VLForConditionalGeneration\n\n### \ud83d\udc1b Describe the bug\nI have observed an inconsistency in the output of the forward method for the `Qwen3VLForConditionalGeneration` class between vLLM (version 0.11.2) and Transformers (version 4.57).\n\nIn the Transformers library, the last hidden state (`outputs.hidden_states[0, -1, :]`) returned is before the final layer normalization. However, in vLLM, the returned hidden_states appears to be after the normalization is applied.\n\nIs this discrepancy an unintended bug, or is there a configuration option in vLLM to control this output behavior (e.g., to return the pre-norm hidden states)?\n\nI don't have minimal demo, but I change the origin code to test.\n\nBecause the`forward` method of `Qwen3VLForConditionalGeneration` has the following code:\n```python\n        hidden_states = self.language_model.model(\n            input_ids=input_ids,\n            positions=positions,\n            intermediate_tensors=intermediate_tensors,\n            inputs_embeds=inputs_embeds,\n            # args for deepstack\n            deepstack_input_embeds=deepstack_input_embeds,\n        )\n```\nThe type of `self.language_model.model` is `Qwen3LLMModel`.\n\nI introduced an environment variable:`LAST_HIDDEN_STATE_NOT_NORM` before return of `Qwen3LLMModel` 's `forward` method:\n```python\n        if os.environ.get(\"LAST_HIDDEN_STATE_NOT_NORM\", \"0\") == \"1\":\n            return hidden_states + residual\n\n        if not get_pp_group().is_last_rank:\n            return IntermediateTensors(\n                {\"hidden_states\": hidden_states, \"residual\": residual}\n            )\n        hidden_states, _ = self.norm(hidden_states, residual)\n        return hidden_states\n```\n\nWhen `LAST_HIDDEN_STATE_NOT_NORM=1` is set, hidden states output exactly match Transformers' behavior.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30193",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-07T04:50:11Z",
    "updated_at": "2025-12-16T03:24:00Z",
    "comments": 3,
    "user": "guodongxiaren"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42674,
    "title": "Missing imports for DetrLoss and DetrHungarianMatcher",
    "body": "Previously, I was able to import these classes as \n```\nfrom transformers.models.detr.modeling_detr import DetrLoss, DetrObjectDetectionOutput, DetrHungarianMatcher\n```\n\nIn v4.57.3, the import fails and I also cannot find DetrLoss or DetrHungarianMatcher anywhere in the codebase. Have they been removed/replaced with an alternative? What is the up-to-date import?\n\nThank you for assistance / information",
    "url": "https://github.com/huggingface/transformers/issues/42674",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-06T15:32:14Z",
    "updated_at": "2026-01-06T08:02:43Z",
    "comments": 1,
    "user": "sammlapp"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30163,
    "title": "[Usage]: Help Running NVFP4 model on 2x DGX Spark with vLLM + Ray (multi-node)",
    "body": "### Your current environment\n\n# Help: Running NVFP4 model on 2x DGX Spark with vLLM + Ray (multi-node)\n\n## Hardware\n- **2x DGX Spark** (GB10 GPU each, sm_121a / compute capability 12.1)\n- Connected via 200GbE ConnectX-7/Ethernet\n- Driver: 580.95.05, Host CUDA: 13.0\n\n## Goal\nRun `lukealonso/GLM-4.6-NVFP4` (357B MoE model, NVFP4 quantization) across both nodes using vLLM with Ray distributed backend.\n\n## What I've Tried\n\n### 1. `nvcr.io/nvidia/vllm:25.11-py3` (NGC)\n- vLLM 0.11.0\n- **Error:** `FlashInfer kernels unavailable for ModelOptNvFp4FusedMoE on current platform`\n- NVFP4 requires vLLM 0.12.0+\n\n### 2. `vllm/vllm-openai:nightly-aarch64` (vLLM 0.11.2.dev575)\n- With `VLLM_USE_FLASHINFER_MOE_FP4=1`\n- **Error:** `ptxas fatal: Value 'sm_121a' is not defined for option 'gpu-name'`\n- Triton's bundled ptxas 12.8 doesn't support GB10\n\n### 3. `vllm/vllm-openai:v0.12.0-aarch64` (vLLM 0.12.0)\n- Fixed ptxas with symlink: `ln -sf /usr/local/cuda/bin/ptxas /usr/local/lib/python3.12/dist-packages/triton/backends/nvidia/bin/ptxas`\n- Triton compilation passes \u2705\n- **Error:** `RuntimeError: [FP4 gemm Runner] Failed to run cutlass FP4 gemm on sm120. Error: Error Internal`\n\n### 4. Tried both parallelism modes:\n- `--tensor-parallel-size 2` \u2192 same CUTLASS error\n- `--pipeline-parallel-size 2` \u2192 same CUTLASS error\n\n### 5. `--enforce-eager` flag\n- Not fully tested yet\n\n## Environment Details\n| Component | Version |\n|-----------|---------|\n| Host Driver | 580.95.05 |\n| Host CUDA | 13.0 |\n| Container CUDA | 12.9 |\n| Container ptxas | 12.9.86 (supports sm_121a \u2705) |\n| Triton bundled ptxas | 12.8 (NO sm_121a \u274c) |\n| PyTorch | 2.9.0+cu129 |\n\n## The Blocking Error\n\nvLLM correctly loads weights (41/41 shards), then during profile_run:\n\n```\nINFO [flashinfer_utils.py:289] Flashinfer TRTLLM MOE backend is only supported on SM100 and later, using CUTLASS backend instead\nINFO [modelopt.py:1142] Using FlashInfer CUTLASS kernels for ModelOptNvFp4FusedMoE.\n...\nRuntimeError: [FP4 gemm Runner] Failed to run cutlass FP4 gemm on sm120. Error: Error Internal\n```\n\nFlashInfer detects GB10 is not SM100 (B200), falls back to CUTLASS - but CUTLASS FP4 also fails.\n\n## Key Question\n\n**Are CUTLASS FP4 GEMM kernels compiled for GB10 (sm_121a)?**\n\nIs there:\n1. A vLLM build with CUTLASS kernels for sm_121?\n2. A way to force Marlin FP4 fallback on GB10?\n3. Recommended Docker image for DGX Spark + NVFP4?\n\nI see NVFP4 models tested on:\n- B200 (sm_100) \u2705\n- H100/A100 with Marlin FP4 fallback \u2705\n\nBut GB10 is **sm_121** (Blackwell desktop/workstation variant). The error says `sm120` which seems wrong - GB10 should be sm_121a.\n\n\n\n## References\n- [ GLM-4.6-NVFP4](https://huggingface.co/lukealonso/GLM-4.6-NVFP4)(https://huggingface.co/lukealonso/GLM-4.6-NVFP4)\n\n- [Firworks/GLM-4.5-Air-nvfp4](https://huggingface.co/Firworks/GLM-4.5-Air-nvfp4)\n\nThanks!\n",
    "url": "https://github.com/vllm-project/vllm/issues/30163",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-06T00:24:52Z",
    "updated_at": "2025-12-07T16:22:40Z",
    "comments": 2,
    "user": "letsrock85"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3876,
    "title": "Why TP can't be used with pure DP?",
    "body": "As per [this](https://github.com/huggingface/accelerate/blob/b9ca0de682f25f15357a3f9f1a4d94374a1d451d/src/accelerate/parallelism_config.py#L332), we can not be use TP along with pure DP (or DDP). We need to shard the model across further nodes by specifying dp_shard_size as well. Why this limitation exists? Is it just a software limitation? \nPlease share any documentation, code reference and justification for the same.\n\nWhat to do inorder to do TP+DP?",
    "url": "https://github.com/huggingface/accelerate/issues/3876",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-05T16:11:22Z",
    "updated_at": "2025-12-26T10:07:09Z",
    "comments": 3,
    "user": "quic-meetkuma"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2589,
    "title": "Clarification on XVLA folding checkpoint",
    "body": "Hi Lerobot team, great work on the XVLA release!\n\nI have tried finetuning on my custom dataset and have a few clarifications:\n1. Is the [lerobot/xvla-folding](https://huggingface.co/lerobot/xvla-folding) checkpoint finetuned on [lerobot/xvla-soft-fold](https://huggingface.co/datasets/lerobot/xvla-soft-fold)? \n    - I am asking this because the `info.json` don't match (eg. the dataset image keys are `observation.images.cam_high` whereby the checkpoint image keys are `observation.images.image`\n   - The `observation.state` shape also do not match\n\n2. How do we finetune from a checkpoint given that the checkpoint expects different naming for the observation keys and `state` shape? Is this a custom preprocessor to remap keys or is there an arg to use?\n\nThanks!",
    "url": "https://github.com/huggingface/lerobot/issues/2589",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-12-05T11:42:46Z",
    "updated_at": "2025-12-22T08:43:05Z",
    "user": "brycegoh"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169663,
    "title": "[CI] Inductor dashboards failing due to unused --quant arg",
    "body": "### \ud83d\udc1b Describe the bug\n\nThe offending code was added in https://github.com/pytorch/pytorch/pull/123419 which results in a failure as no quant type is provided.\nhttps://github.com/pytorch/pytorch/blob/a097e166db7077f1e8da94757ccd91a6a521550e/.ci/pytorch/test.sh#L767\n\nThis is causing unnecessary headaches when debugging inductor-dashboard runs. @huydhn is it possible for us to either provide a valid quant type or remove this?\n\nExample failure: https://ossci-raw-job-status.s3.amazonaws.com/log/56856027123 for AMD and similar on https://ossci-raw-job-status.s3.amazonaws.com/log/56764730017 for NV.\n```\n2025-12-02T02:00:17.0782532Z + python benchmarks/dynamo/timm_models.py --performance --cold-start-latency --inference --quant --backend inductor --device cuda --total-partitions 7 --partition-id 2 --output /var/lib/jenkins/pytorch/test/test-reports/inductor_cudagraphs_low_precision_timm_models_quant_inference_rocm_performance.csv\n2025-12-02T02:00:19.6203822Z        [--channels-last]\n2025-12-02T02:00:19.6204176Z        [--batch-size BATCH_SIZE]\n2025-12-02T02:00:19.6204547Z        [--iterations ITERATIONS]\n2025-12-02T02:00:19.6204936Z        [--batch-size-file BATCH_SIZE_FILE]\n2025-12-02T02:00:19.6205320Z        [--cosine]\n2025-12-02T02:00:19.6205614Z        [--freezing]\n2025-12-02T02:00:19.6205953Z        [--inductor-config INDUCTOR_CONFIG]\n2025-12-02T02:00:19.6206333Z        [--ci]\n2025-12-02T02:00:19.6206618Z        [--dashboard]\n2025-12-02T02:00:19.6206949Z        [--skip-fp64-check]\n2025-12-02T02:00:19.6207276Z        [--fast]\n2025-12-02T02:00:19.6207565Z        [--only ONLY]\n2025-12-02T02:00:19.6207883Z        [--multiprocess]\n2025-12-02T02:00:19.6208197Z        [--ddp]\n2025-12-02T02:00:19.6208490Z        [--fsdp]\n2025-12-02T02:00:19.6208833Z        [--optimize-ddp-mode OPTIMIZE_DDP_MODE]\n2025-12-02T02:00:19.6209530Z        [--distributed-master-port DISTRIBUTED_MASTER_PORT]\n2025-12-02T02:00:19.6209993Z        [--dynamic-shapes]\n2025-12-02T02:00:19.6210361Z        [--propagate-real-tensors]\n2025-12-02T02:00:19.6210749Z        [--dynamic-batch-only]\n2025-12-02T02:00:19.6211114Z        [--specialize-int]\n2025-12-02T02:00:19.6211449Z        [--use-eval-mode]\n2025-12-02T02:00:19.6211801Z        [--skip-accuracy-check]\n2025-12-02T02:00:19.6212189Z        [--generate-aot-autograd-stats]\n2025-12-02T02:00:19.6212593Z        [--inductor-settings]\n2025-12-02T02:00:19.6213079Z        [--suppress-errors]\n2025-12-02T02:00:19.6213417Z        [--output OUTPUT]\n2025-12-02T02:00:19.6213816Z        [--output-directory OUTPUT_DIRECTORY]\n2025-12-02T02:00:19.6214221Z        [--disable-output]\n2025-12-02T02:00:19.6214560Z        [--baseline BASELINE]\n2025-12-02T02:00:19.6214912Z        [--part PART]\n2025-12-02T02:00:19.6215259Z        [--export-profiler-trace]\n2025-12-02T02:00:19.6215725Z        [--profiler-trace-name PROFILER_TRACE_NAME]\n2025-12-02T02:00:19.6216164Z        [--profile-details]\n2025-12-02T02:00:19.6216514Z        [--export-perfdoctor]\n2025-12-02T02:00:19.6216885Z        [--diff-branch DIFF_BRANCH]\n2025-12-02T02:00:19.6217240Z        [--tag TAG]\n2025-12-02T02:00:19.6217536Z        [--explain]\n2025-12-02T02:00:19.6217826Z        [--stats]\n2025-12-02T02:00:19.6218144Z        [--use-warm-peak-memory]\n2025-12-02T02:00:19.6218510Z        [--print-memory]\n2025-12-02T02:00:19.6218865Z        [--print-compilation-time]\n2025-12-02T02:00:19.6219263Z        [--print-dataframe-summary]\n2025-12-02T02:00:19.6219651Z        [--disable-cudagraphs]\n2025-12-02T02:00:19.6220033Z        [--disable-split-reductions]\n2025-12-02T02:00:19.6220450Z        [--disable-persistent-reductions]\n2025-12-02T02:00:19.6220874Z        [--disable-divisible-by-16]\n2025-12-02T02:00:19.6221324Z        [--inductor-compile-mode INDUCTOR_COMPILE_MODE]\n2025-12-02T02:00:19.6221782Z        [--print-graph-breaks]\n2025-12-02T02:00:19.6222146Z        [--log-graph-breaks]\n2025-12-02T02:00:19.6222495Z        [--trace-on-xla]\n2025-12-02T02:00:19.6222842Z        [--xla-tolerance XLA_TOLERANCE]\n2025-12-02T02:00:19.6223230Z        [--collect-outputs]\n2025-12-02T02:00:19.6223614Z        [--enable-activation-checkpointing]\n2025-12-02T02:00:19.6224005Z        [--timing]\n2025-12-02T02:00:19.6224298Z        [--progress]\n2025-12-02T02:00:19.6224607Z        [--timeout TIMEOUT]\n2025-12-02T02:00:19.6225046Z        [--per_process_memory_fraction PER_PROCESS_MEMORY_FRACTION]\n2025-12-02T02:00:19.6225545Z        [--no-translation-validation]\n2025-12-02T02:00:19.6225913Z        [--minify]\n2025-12-02T02:00:19.6226225Z        [--compiled-autograd]\n2025-12-02T02:00:19.6226595Z        [--profile_dynamo_cache_lookup]\n2025-12-02T02:00:19.6226979Z        [--snapshot-memory]\n2025-12-02T02:00:19.6227313Z        [--retain-output]\n2025-12-02T02:00:19.6227656Z        [--caching-precompile]\n2025-12-02T02:00:19.6228230Z        [--save-model-outputs-to SAVE_MODEL_OUTPUTS_TO]\n2025-12-02T02:00:19.6228782Z        [--compare-model-outputs-with COMPARE_MODEL_OUTPUTS_WITH]\n2025-12-02T02:00:19.6229340Z    ",
    "url": "https://github.com/pytorch/pytorch/issues/169663",
    "state": "closed",
    "labels": [
      "oncall: pt2",
      "module: inductor"
    ],
    "created_at": "2025-12-05T11:10:10Z",
    "updated_at": "2025-12-08T01:34:22Z",
    "comments": 0,
    "user": "jataylo"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30129,
    "title": "[Feature]: About video input for qwen3vl",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI tried using base64 encoding to provide video input for vllm inference, but it seems this input method is not yet supported by Qwen3VL (I've seen similar issues reported elsewhere). Currently, I can only specify parameters like fps/maximum frames and then pass the local path or URL of the video.\n\nHowever, in my scenario, my videos are not uniformly sampled; I need to manually sample them first and then input multiple frames. Is there a way to achieve this input method now?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30129",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-12-05T10:32:06Z",
    "updated_at": "2025-12-19T03:32:30Z",
    "comments": 4,
    "user": "lingcco"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3585,
    "title": "How to choose negative instance when using MultipleNegativesRankingLoss train embedding model?",
    "body": "Firstly, I am still confused how to choose negative instance if I use MultipleNegativesRankingLoss, in https://github.com/huggingface/sentence-transformers/blob/main/sentence_transformers/losses/MultipleNegativesRankingLoss.py# L113\n`embeddings = [self.model(sentence_feature)[\"sentence_embedding\"] for sentence_feature in sentence_features]\n`\nI guess `embeddings` should include three parts, anchor, positive and negative from in-batch data, however, no matter how I change `batchsize`, I still found `len(embeddings)=2`, is it means that this embeddings only include two parts?\n\n\nHere is my simple training script, I didn't add negative part in dataset,\n```\nimport os\nos.environ[\"CUDA_VISIBLE_DEVICES\"] = \"0,1,2,3\"\nimport json\nimport torch\nfrom sentence_transformers import (\n    SentenceTransformer, \n    SentenceTransformerTrainer,\n    SentenceTransformerTrainingArguments,\n    InputExample, \n)\nfrom sentence_transformers.losses import MultipleNegativesRankingLoss\nfrom sentence_transformers.training_args import BatchSamplers\nfrom datasets import load_dataset, Dataset\ndef train_embedding_model():\n    train_epo = 3\n    save_path = f\"/app/raw_model/tmp\"\n    data_path = \"/app/emb_train_1205.json\"\n    model = SentenceTransformer(\n        \"/app/download_models/Qwen3-Embedding-0.6B\",\n        model_kwargs={\n            \"attn_implementation\": \"flash_attention_2\",\n            \"torch_dtype\": \"auto\"\n        }\n    )\n    model.tokenizer.padding_side = \"left\"\n    model.tokenizer.pad_token = model.tokenizer.eos_token\n    model.tokenizer.model_max_length = 2048\n\n    dataset = load_dataset(\"json\", data_files=data_path)\n    '''\n    DatasetDict({\n        train: Dataset({\n            features: ['question', 'positive'],\n            num_rows: 4000\n        })\n    })\n    '''\n    loss = MultipleNegativesRankingLoss(model)\n    args = SentenceTransformerTrainingArguments(\n        output_dir=save_path,\n        num_train_epochs=train_epo,\n        per_device_train_batch_size=8,\n        per_device_eval_batch_size=1,\n        learning_rate=5e-5,\n        warmup_ratio=0.1,\n        fp16=True,  # Set to False if you get an error that your GPU can't run on FP16\n        bf16=False,  # Set to True if you have a GPU that supports BF16\n        batch_sampler=BatchSamplers.NO_DUPLICATES,  # MultipleNegativesRankingLoss benefits from no duplicate samples in a batch \n        optim='adamw_torch_fused',\n        logging_steps=5,\n    )\n\n    trainer = SentenceTransformerTrainer(\n        model=model,\n        args=args,\n        train_dataset=dataset['train'], # dataset['train'], train_dataset\n        eval_dataset=dataset['train'], # dataset['train'], train_dataset\n        loss=loss,\n    )\n    trainer.train()\n    model.save_pretrained(save_path)\n```\n\nBesides\uff0c can I manually add a list of negatives directly into the dataset while still using the MultipleNegativesRankingLoss?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3585",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-05T09:50:26Z",
    "updated_at": "2025-12-09T11:49:26Z",
    "user": "4daJKong"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30124,
    "title": "[Bug]: How to run DeepSeek-V3.2 on 2 H100 nodes?",
    "body": "\n\n### \ud83d\udc1b Describe the bug\n\nHow to run DeepSeek-V3.2 on 2 H100 nodes?\nI only found the cmd for H200/B200:\nvllm serve deepseek-ai/DeepSeek-V3.2 -tp 8\n\nbut it does not work in multi-node scenarios (e.g., 2 H100 nodes).\n\nSo what should the cmd be for two H100 nodes?\nhow should params --tp/--dp/--pp be configured?\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30124",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-05T09:40:45Z",
    "updated_at": "2025-12-14T08:57:52Z",
    "comments": 2,
    "user": "XQZ1120"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169659,
    "title": "[Export] Incosistent input validation when re-importing a .pt2 model on Linux vs. Windows",
    "body": "### \ud83d\udc1b Describe the bug\n\n## Summary:\nImporting the same .pt2 model on Windows and Linux yields a GraphModule() instance containing a guard function for input validation on Windows and a GraphModule _without_ that guard function on Linux (same device, Ubuntu running in WSL2). \n\n**Why is this an issue?**\nWhen trying to pass each model through `prepare_pt2e` for quantization, the one containing the guard function on Windows fails with:\n```\n[ ... stack trace ommitted ... ]\nexecutorch.exir.pass_base.ExportPassBaseError: call_module is not supported.\n\nWhile executing %_guards_fn : [num_users=0] = call_module[target=_guards_fn](args = (%x,), kwargs = {})\n```\nwhile the same model can be quantized with no issues on Linux.\n\nUltimately what I'm looking for is being able to consistently import .pt2 files and lower them to ExecuTorch with quantization, both on Windows and Linux hosts.\n\n## Steps to reproduce\n\n### 1. Create Model\nI am creating and exporting a minimal `torch.nn.Module` instance like this:\n```python\nimport torch\n\nclass DoubleModel(torch.nn.Module):\n    def __init__(self) -> None:\n        super().__init__()\n\n    def forward(self, x):\n        return x * 2\n\nexample_input = torch.tensor([1.0, 2.0, 3.0, 4.0])\nexported_model = torch.export.export(DoubleModel(), (example_input,))\ntorch.export.save(exported_model, \"double.pt2\")\n```\n\n### 2. Re-Import .pt2 file\nwhen I re-import the model on **Windows**, I get this result:\n```python\nimport torch\n\nmodel = torch.export.load('double.pt2').module()\nmodel.print_readable()\n```\n```\nclass GraphModule(torch.nn.Module):\n    def forward(self, x):\n        x: \"f32[4]\";\n\n        x, = fx_pytree.tree_flatten_spec(([x], {}), self._in_spec)\n        # No stacktrace found for following nodes\n        _guards_fn = self._guards_fn(x);  _guards_fn = None\n\n         # File: /tmp/ipykernel_257892/1111071196.py:8 in forward, code: return x * 2\n        mul: \"f32[4]\" = torch.ops.aten.mul.Tensor(x, 2);  x = None\n        return pytree.tree_unflatten((mul,), self._out_spec)\n```\nnotice the `_guards_fn` member.\n\nWhen I run the same code on **Linux**, I get:\n```\nclass GraphModule(torch.nn.Module):\n    def forward(self, x):\n        x: \"f32[4]\";\n\n        x, = fx_pytree.tree_flatten_spec(([x], {}), self._in_spec)\n         # File: /tmp/ipykernel_257892/1111071196.py:8 in forward, code: return x * 2\n        mul: \"f32[4]\" = torch.ops.aten.mul.Tensor(x, 2);  x = None\n        return pytree.tree_unflatten((mul,), self._out_spec)\n```\n\n### 3. Check input validation implementation\nWhen I try a forward pass with an invalid input, the input validation also fails in different ways:\n```python\nmodel(torch.ones(3))\n```\non **Windows**:\n```\n[ ... ]\nAssertionError: Guard failed: x.size()[0] == 4\n```\non **Linux**:\n```\n[ ... ]\nRuntimeError: Expected input at *args[0].shape[0] to be equal to 4, but got 3. If you meant for this dimension to be dynamic, please re-export and specify dynamic_shapes (e.g. with Dim.DYNAMIC)\n```\n\n### Versions\n\n# Windows Environment\n```\nCollecting environment information...\nPyTorch version: 2.9.1+cpu\nIs debug build: False\nCUDA used to build PyTorch: None\nROCM used to build PyTorch: N/A\n\nOS: Microsoft Windows 11 Enterprise (10.0.22631 64-bit)\nGCC version: (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r8) 13.2.0\nClang version: Could not collect\nCMake version: version 3.29.2\nLibc version: N/A\n\nPython version: 3.12.10 (tags/v3.12.10:0cc8128, Apr  8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)] (64-bit runtime)\nPython platform: Windows-11-10.0.22631-SP0\nIs CUDA available: False\nCUDA runtime version: No CUDA\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: No CUDA\nNvidia driver version: No CUDA\ncuDNN version: No CUDA\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nName: 13th Gen Intel(R) Core(TM) i7-1365U\nManufacturer: GenuineIntel\nFamily: 198\nArchitecture: 9\nProcessorType: 3\nDeviceID: CPU0\nCurrentClockSpeed: 1800\nMaxClockSpeed: 1800\nL2CacheSize: 6656\nL2CacheSpeed: None\nRevision: None\n\nVersions of relevant libraries:\n[pip3] executorch==1.0.1\n[pip3] numpy==2.3.5\n[pip3] pytorch_tokenizers==1.0.1\n[pip3] torch==2.9.1\n[pip3] torchao==0.14.0\n[pip3] torchvision==0.24.1\n[conda] Could not collect\n```\n\n# Linux Environment\n```\nCollecting environment information...\nPyTorch version: 2.9.1+cpu\nIs debug build: False\nCUDA used to build PyTorch: None\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.3 LTS (x86_64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version: 18.1.8 (++20240731025043+3b5b5c1ec4a3-1~exp1~20240731145144.92)\nCMake version: version 4.1.2\nLibc version: glibc-2.39\n\nPython version: 3.12.3 (main, Nov  6 2025, 13:44:16) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.39\nIs CUDA available: False\nCUDA runtime version: No CUDA\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: No CUDA\nNvidia driver version: No CUDA\ncuDNN version: No CUDA\nIs XPU avai",
    "url": "https://github.com/pytorch/pytorch/issues/169659",
    "state": "closed",
    "labels": [
      "oncall: pt2",
      "oncall: export"
    ],
    "created_at": "2025-12-05T08:50:31Z",
    "updated_at": "2025-12-09T09:22:45Z",
    "comments": 3,
    "user": "etrommer"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30121,
    "title": "[Feature]: Could you please provide Chinese documentation for vLLM? \ud83d\ude0a",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nCould you please provide Chinese documentation for vLLM? \ud83d\ude0a\n\n\n\n### Alternatives\n\nCould you please provide Chinese documentation for vLLM? \ud83d\ude0a\n\n### Additional context\n\nCould you please provide Chinese documentation for vLLM? \ud83d\ude0a\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30121",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-12-05T08:13:46Z",
    "updated_at": "2025-12-08T04:31:05Z",
    "comments": 4,
    "user": "moshilangzi"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42641,
    "title": "Cannot inference llava-next with transformers==4.57.1 on dtype=\"auto\" bug",
    "body": "### System Info\n\n```\n- `transformers` version: 4.57.1\n- Platform: Linux-5.15.0-161-generic-x86_64-with-glibc2.35\n- Python version: 3.10.12\n- Huggingface_hub version: 0.35.3\n- Safetensors version: 0.6.2\n- Accelerate version: 1.10.1\n- Accelerate config:    not found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.8.0+cpu (NA)\n- Tensorflow version (GPU?): 2.18.0 (False)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: <fill in>\n```\n\n### Who can help?\n\n@zucchini-nlp \n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```\nfrom transformers import LlavaNextProcessor, LlavaNextForConditionalGeneration\nimport torch\nfrom PIL import Image\nimport requests\n\nprocessor = LlavaNextProcessor.from_pretrained(\"llava-hf/llava-v1.6-mistral-7b-hf\")\n\nmodel = LlavaNextForConditionalGeneration.from_pretrained(\"llava-hf/llava-v1.6-mistral-7b-hf\", dtype=\"auto\", low_cpu_mem_usage=True) \n\n# prepare image and text prompt, using the appropriate prompt template\nurl = \"https://github.com/haotian-liu/LLaVA/blob/1a91fc274d7c35a9b50b3cb29c4247ae5837ce39/images/llava_v1_5_radar.jpg?raw=true\"\nimage = Image.open(requests.get(url, stream=True).raw)\n\n# Define a chat history and use `apply_chat_template` to get correctly formatted prompt\n# Each value in \"content\" has to be a list of dicts with types (\"text\", \"image\") \nconversation = [\n    {\n\n      \"role\": \"user\",\n      \"content\": [\n          {\"type\": \"text\", \"text\": \"What is shown in this image?\"},\n          {\"type\": \"image\"},\n        ],\n    },\n]\nprompt = processor.apply_chat_template(conversation, add_generation_prompt=True)\n\ninputs = processor(images=image, text=prompt, return_tensors=\"pt\")\n\n# autoregressively complete prompt\noutput = model.generate(**inputs, max_new_tokens=100)\n\nprint(processor.decode(output[0], skip_special_tokens=True))\n```\n\n### Expected behavior\n\n\ud83d\udcdd Transformers GitHub Issue: Translation\nHere is the translated text for your GitHub issue, including the title and body.\n\nTitle\nCannot inference llava-next with transformers==4.57.1 on dtype=\"auto\" bug\n\nBody\nI am encountering an issue when attempting to run inference on LLaVA-Next models (e.g., `llava-hf/llava-v1.6-mistral-7b-hf`) using `transformers==4.57.1 ` and setting `dtype=\"auto\"` when loading the model.\n\nThe issue stems from the model's `config.json` having different `torch_dtype` values for the overall model and the text configuration:\n\n```\n\"text_config\": {\n    \"_name_or_path\": \"mistralai/Mistral-7B-Instruct-v0.2\",\n    // ... other config values\n    \"torch_dtype\": \"bfloat16\",\n    \"vocab_size\": 32064\n  },\n  \"torch_dtype\": \"float16\",\n```\n\nWhen the model is loaded with `dtype=\"auto\"`, each submodule (the visual model and the text model) seems to load with its respective `torch_dtype` (`\"float16\"` and `\"bfloat16\"`).\n\nThis difference in data types then causes an error during inference, specifically within the `forward` pass of the `LlavaNextForConditionalGeneration` model:\n\n```\nFile \"MY_ENV/.venv/lib/python3.10/site-packages/transformers/models/llava_next/modeling_llava_next.py\", line 687, in forward\n\u00a0 \u00a0 logits = self.lm_head(hidden_states[:, slice_indices, :])\n\u00a0 File \"MY_ENV/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1773, in _wrapped_call_impl\n\u00a0 \u00a0 return self._call_impl(*args, **kwargs)\n\u00a0 File \"MY_ENV/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1784, in _call_impl\n\u00a0 \u00a0 return forward_call(*args, **kwargs)\n\u00a0 File \"MY_ENV/.venv/lib/python3.10/site-packages/torch/nn/modules/linear.py\", line 125, in forward\n\u00a0 \u00a0 return F.linear(input, self.weight, self.bias)\nRuntimeError: expected m1 and m2 to have the same dtype, but got: c10::BFloat16 != c10::Half\n```\n\nThis `RuntimeError` indicates a dtype mismatch, likely between the linear layer's weight (from `self.lm_head`) and the input tensor (`hidden_states`), which results from the different dtypes loaded by `dtype=\"auto\"` for `self.lm_head` and `self.model`.\n\nIs there a plan to support loading LLaVA-Next models with `dtype=\"auto\"` given their current configuration structure?",
    "url": "https://github.com/huggingface/transformers/issues/42641",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-05T04:39:35Z",
    "updated_at": "2025-12-23T11:08:56Z",
    "comments": 5,
    "user": "rebel-seinpark"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30098,
    "title": "[Doc]: Misleading Logic & Docstring in `block_quant_to_tensor_quant` (Block FP8)",
    "body": "### \ud83d\udcda The doc issue\n\nThe docstring and implementation of the `block_quant_to_tensor_quant` function have a critical mismatch regarding the dequantization process, leading to numerical errors when used outside of specific fused kernel backends.\n\n### Problematic Function\n\nThe function is currently implemented as:\n\n```python\ndef block_quant_to_tensor_quant(\n    x_q_block: torch.Tensor,\n    x_s: torch.Tensor,\n) -> tuple[torch.Tensor, torch.Tensor]:\n    \"\"\"This function converts block-wise quantization to tensor-wise\n    quantization. The inputs are block-wise quantization tensor `x_q_block`,\n    block-wise quantization scale and the block size.\n    The outputs are tensor-wise quantization tensor and tensor-wise\n    quantization scale. Note only float8 is supported for now.\n    \"\"\"\n    x_dq_block = group_broadcast(x_q_block, x_s)\n    x_q_tensor, scale = input_to_float8(x_dq_block, dtype=x_q_block.dtype)\n    return x_q_tensor, scale\n```\n\n### Observation and Impact\n- Vllm migrated the actual 'block quant to tensor quant' operation to the kernel but keep this method. The docstring is misleading since in this method, there is no scale.\n- Misleading Docstring: The docstring claims the function performs \"conversion\" and takes the \"scale,\" implying a complete process. However, the output `x_dq_block` is an un-dequantized value with a broadcasted shape.\n\n### Suggest a potential alternative/fix\n\nThe function should be either documented clearly as a kernel preparation helper OR refactored to ensure numerical correctness when used as a conversion API.\n\n**1. Fix Documentation/Name (If intent is kernel prep):**\n* Rename the function to something like `_prepare_block_quant_for_fused_kernel`.\n* Add a warning that this function does not perform dequantization.\n\n**2. Implement Safe Logic Dispatch (If intent is a robust conversion API):**\nThe function should dynamically dispatch to the known-good, safe path if the specific fused kernel (that handles the $X_q \\times X_s$ multiplication) is not guaranteed to be active.\n\nThe safe logic is in v.0.9.2:\n```python\n# Safe path required for correctness on general backends\nx_dq_block = scaled_dequantize(x_q_block, x_s) \nx_q_tensor, scale = input_to_float8(x_dq_block, dtype=x_q_block.dtype)\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30098",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-12-05T02:12:07Z",
    "updated_at": "2025-12-24T17:22:50Z",
    "comments": 0,
    "user": "xqoasis"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42638,
    "title": "Routing Replay for MoEs",
    "body": "### Feature request\n\nRecentRL approaches for training MoE models increasingly rely on **Routing Replay**, as described in the following papers:\n\n- https://huggingface.co/papers/2507.18071\n- https://huggingface.co/papers/2510.11370\n- https://huggingface.co/papers/2512.01374\n\nWithout going into the training details, Routing Replay requires the ability to override the router during the forward pass, that is, to force the model to use a predefined set of router logits rather than computing new ones. This enables deterministic reproduction of expert selection.\n\nAFAICT, Transformers currently does not expose a way to override router logits or manually control expert selection at inference/training time.\n\nI imagine something along the following lines (minimal example):\n\n```python\nfrom transformers import AutoModelForCausalLM\nimport torch\n\nmodel = AutoModelForCausalLM.from_pretrained(\"Qwen/Qwen3-30B-A3B-Instruct-2507\", device_map=\"auto\", dtype=\"auto\")\n\ninput_ids = torch.tensor([[1, 2, 3, 4]], device=\"cuda\")\n\n# Standard forward pass, retrieving router logits\noutputs = model(input_ids, output_router_logits=True)\n\n# Forward pass with router logits injected (enabling Routing Replay)\nmodel(input_ids, router_logits=outputs.router_logits)\n```\n\n## Alternative\n\nIf we decide not to implement this feature, it would be nice to provide an example showing how to _patch_ a MoE to enable this.\n\n### Motivation\n\nSee above.\n\n### Your contribution\n\nI think I can do it.",
    "url": "https://github.com/huggingface/transformers/issues/42638",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-12-04T23:58:14Z",
    "updated_at": "2025-12-05T16:29:05Z",
    "comments": 2,
    "user": "qgallouedec"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30084,
    "title": "[Performance]: Should I expect linear scaling with pure DP?",
    "body": "### Proposal to improve performance\n\n_No response_\n\n### Report of performance regression\n\n_No response_\n\n### Misc discussion on performance\n\nI decided to benchmark vLLM 0.11.2 with pure DP of Qwen/Qwen2.5-32B-Instruct deployment(before benchmarking DP+EP with Qwen/Qwen3-30B-A3B-Instruct-2507) on DP1 vs DP8 (H200):\n\nDP1 deployment:\n```\nvllm serve ${MODEL_NAME} \\\n            --port 8000 \\\n            --trust-remote-code\n```\n\nDP8 deployment:\n```\nvllm serve ${MODEL_NAME} \\\n            --port 8000 \\\n            --trust-remote-code \\\n            --data-parallel-size 8 \\\n            --data-parallel-size-local 8\n```\n\nMy benchmark roughly looks like this:\n```\nfor rate in [10, 20, ... 100, 200, ... 1000, 2000, ... 100000]:\n   vllm bench serve \\\n            --host \"$HOST\" \\\n            --model Qwen/Qwen2.5-32B-Instruct \\\n            --dataset-name random \\\n            --random-input-len 128 \\\n            --random-output-len 128 \\\n            --num-prompts 10000 \\\n            --request-rate \"$rate\" \\\n            --ignore-eos\n```\nShould I expect ~8x scaling? Result show only ~4x (duration, request throughput, tokens throughput, etc...)\n\n<img width=\"1789\" height=\"3490\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/81feb936-73d6-49c3-949e-dfbd6d7ba7d7\" />\n\ncc @KeitaW @amanshanbhag\n\n### Your current environment (if you think it is necessary)\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30084",
    "state": "open",
    "labels": [
      "performance"
    ],
    "created_at": "2025-12-04T19:52:45Z",
    "updated_at": "2025-12-16T04:09:24Z",
    "comments": 7,
    "user": "pbelevich"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30082,
    "title": "[Usage]: Turn off reasoning for Kimi-K2-Thinking?",
    "body": "### Your current environment\n\n\n\n```text\nOutput of collect_env.py-\n\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version                : Could not collect\nCMake version                : version 4.1.3\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu129\nIs debug build               : False\nCUDA used to build PyTorch   : 12.9\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.12 (main, Oct 10 2025, 08:52:57) [GCC 11.4.0] (64-bit runtime)\nPython platform              : Linux-4.18.0-553.56.1.el8_10.x86_64-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.9.86\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA H200\nGPU 1: NVIDIA H200\nGPU 2: NVIDIA H200\nGPU 3: NVIDIA H200\nGPU 4: NVIDIA H200\nGPU 5: NVIDIA H200\nGPU 6: NVIDIA H200\nGPU 7: NVIDIA H200\n\nNvidia driver version        : 550.163.01\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        46 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               192\nOn-line CPU(s) list:                  0-191\nVendor ID:                            GenuineIntel\nModel name:                           Intel(R) Xeon(R) Platinum 8468\nCPU family:                           6\nModel:                                143\nThread(s) per core:                   2\nCore(s) per socket:                   48\nSocket(s):                            2\nStepping:                             8\nCPU max MHz:                          3800.0000\nCPU min MHz:                          800.0000\nBogoMIPS:                             4200.00\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nL1d cache:                            4.5 MiB (96 instances)\nL1i cache:                            3 MiB (96 instances)\nL2 cache:                             192 MiB (96 instances)\nL3 cache:                             210 MiB (2 instances)\nNUMA node(s):                         8\nNUMA node0 CPU(s):                    0-11,96-107\nNUMA node1 CPU(s):                    12-23,108-119\nNUMA node2 CPU(s):                    24-35,120-131\nNUMA node3 CPU(s):                    36-47,132-143\nNUMA node4 CPU(s):                    48-59,144-155\nNUMA node5 CPU(s):                    60-71,156-167\nNUMA node6 CPU(s):                    72-83,168-179\nNUMA node7 CPU(s):                    84-95,180-191\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spect",
    "url": "https://github.com/vllm-project/vllm/issues/30082",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-04T19:32:13Z",
    "updated_at": "2025-12-08T23:02:58Z",
    "comments": 2,
    "user": "vikrantdeshpande09876"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169597,
    "title": "Standardize Testing in OpenReg",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nDescribed in the following [issue](https://github.com/pytorch/pytorch/issues/158917): \n\nOpenReg aims to:\n- Track the evolution of community features and provide up-to-date standardized integration implementations, serving as the official reference and code example for integration documentation.\n- The goal is to cover all functional points of new device integration into PyTorch, ensuring that the integration mechanisms themselves are robust and complete.\n\nAs such, this requires a standardized set of tests that follow the same process as current in-tree devices in Pytorch.\n\nThe following are proposed additions to OpenReg to improve testing as well as documentation for future PrivateUse1 users:\n\n- Working example of [DeviceTypeTestBase](https://github.com/pytorch/pytorch/blob/31987d0eda56179bfbed565b8cbb937844cd300c/torch/testing/_internal/common_device_type.py#L317) included in OpenReg\n- Working example of `OpInfo` based test in OpenReg\n- Documentation alongside standard tests\n\nIncluding this in OpenReg provides the following benefits:\n\n- A clear documented reference on how to emulate this for new backends\n- Ensures the stability of these APIs\n\n### Alternatives\n\nGiven OpenReg strives to maintain a standard for pytorch device backends, I believe keeping the standard that in-tree devices require the above solution. Feel free to comment if an alternative is preferred.\n\n### Additional context\n\ncc: @fffrog @albanD @zeshengzong \n\ncc @NmomoN @mengpenghui @fwenguang @cdzhan @1274085042 @PHLens @albanD",
    "url": "https://github.com/pytorch/pytorch/issues/169597",
    "state": "open",
    "labels": [
      "triaged",
      "module: PrivateUse1",
      "module: openreg"
    ],
    "created_at": "2025-12-04T19:22:19Z",
    "updated_at": "2025-12-04T19:34:26Z",
    "comments": 0,
    "user": "JRosenkranz"
  },
  {
    "repo": "pytorch/ao",
    "number": 3436,
    "title": "Int4WeightOnly torch.bmm semantics",
    "body": "Currently, int4 weight only quantization does not work out of the box for llama4 scout. \n\n```python\nfqn_to_config = FqnToConfig(\n    {\n        r\"re:.*\\.feed_forward\\.experts\\.gate_up_proj\": Int4WeightOnlyConfig(),\n        r\"re:.*\\.feed_forward\\.experts\\.down_proj\": Int4WeightOnlyConfig()\n    }\n)\n\nquantized_model = AutoModelForCausalLM.from_pretrained(\n    model_name,\n    torch_dtype=\"bfloat16\",\n    device_map=device_map,\n    quantization_config=quantization_config,\n)\n```\nThis fails because the the int4 torch.bmm implementation expects the weights to be transposed already, while the dense version does not.\n\nThe dense torch.bmm(inputs, weights) expects  for input of shape (B, M, K) and weights to be shape (B, K, N)) but the quantized version expects the weights to be of shape (B, N, K). \n\nAdding a line, `down_proj = down_proj.transpose(-2, -1). contiguous().transpose(-2, -1)`, after loading the model will fix this issue, but this is hacky and also means that we can't pass in the config as part of quantization_config.  \n\nVasiliy ran into a similar issue with Float8Tensor bmm semantics in https://github.com/pytorch/ao/pull/3296, which solves this problem by transposing qdata and scale as part of the bmm op.  \n\nHowever for int4 we pack to int8, so it's a bit more work,  as we would need to unpack int4 -> int8, transpose, contiguous, repack -> int4. \n\nI think the easiest way is to add a flag to transpose the weight or not before the quantized data is computed, but open to any suggestions on how to best fix this\n\n",
    "url": "https://github.com/pytorch/ao/issues/3436",
    "state": "open",
    "labels": [
      "triaged"
    ],
    "created_at": "2025-12-04T18:35:44Z",
    "updated_at": "2025-12-04T23:12:15Z",
    "comments": 0,
    "user": "jcaip"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30075,
    "title": "[Feature]: Default eplb num_redundant_experts to the lowest valid value if unspecified",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nEPLB requires the number of experts to be chosen up front and there is a known minimum valid value that can be derived from the vllm startup configuration.  Since extra EPLB experts trades kv cache memory for potential performance improvements, but that is not guaranteed to pay off, having the EPLB value default to the minimum valid value would reduce friction on enabling EPLB the first time until users are ready to tune.\n\nAs a consequence, it would also streamline templating the same config to work across multiple EP sizes for the default case.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30075",
    "state": "open",
    "labels": [
      "help wanted",
      "good first issue",
      "feature request"
    ],
    "created_at": "2025-12-04T18:19:03Z",
    "updated_at": "2025-12-20T21:00:23Z",
    "comments": 4,
    "user": "smarterclayton"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 2109,
    "title": "Knowledge Distillation template",
    "body": "Hi, I want to use torchtitan for knowledge distillation, what is the right way to do it? should I hold both models inside the main model? (then how can I exclude the teacher from being saved or .train()ed or exclude it from the optimizer) or is there a way to have two separate models (with parallelism handled correctly, especially PP)?\n\nif I have to hold both models in the same Model, then will this be a right forward()? (for now the assumption that both models have the same number of layers is ok)\n\n```python\n    def forward(\n        self,\n        tokens: torch.Tensor,\n        tokens_t: torch.Tensor,\n        attention_masks: AttentionMasksType | None = None,\n    ):\n        \"\"\"\n        Perform a forward pass through the Transformer model.\n        \"\"\"\n        # passthrough for nonexistent layers, allows easy configuration of pipeline parallel stages\n        h = self.tok_embeddings(tokens) if self.tok_embeddings else tokens\n        h_t = self.tok_embeddings_t(tokens_t) if self.tok_embeddings_t else tokens_t\n\n        for layer, layer_t in zip(self.layers.values(), self.layers_t.values()):\n            h = layer(h, self.freqs_cis, attention_masks=attention_masks)\n            h_t = layer(h_t, self.freqs_cis_t, attention_masks=attention_masks)\n        h = self.norm(h) if self.norm else h\n        h_t = self.norm(h_t) if self.norm_t else h_t\n        output = self.output(h) if self.output else h\n        output_t = self.output_t(h_t) if self.output_t else h_t\n        return output, output_t\n```",
    "url": "https://github.com/pytorch/torchtitan/issues/2109",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-12-04T17:37:51Z",
    "updated_at": "2025-12-04T23:35:26Z",
    "user": "Separius"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30058,
    "title": "[Feature]: Multi-Adapter Support for Embed Qwen3 8B Embedding Model",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHi Team, do we currently support multi-adapter (LoRA) support for embedding models, specifically Qwen3 8B Embedding model? If not, when can we expect the support? Thanks :)\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30058",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-12-04T12:05:15Z",
    "updated_at": "2025-12-04T19:42:04Z",
    "comments": 4,
    "user": "dawnik17"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3873,
    "title": "How to specify accelerate launch yaml config item when running with torchrun",
    "body": "I've read the doc [Launching Accelerate scripts](https://huggingface.co/docs/accelerate/basic_tutorials/launch), and would like to launch with torchrun. However, the doc does not mention how to specify configs like `distribute_type` when using torchrun.\n\nWhat are the equivalent of these configurations when using torchrun?",
    "url": "https://github.com/huggingface/accelerate/issues/3873",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-04T07:27:43Z",
    "updated_at": "2026-01-03T15:07:19Z",
    "user": "WhoisZihan"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2580,
    "title": "How can the leader arm be synchronized to follow the follower arm during inference?",
    "body": "",
    "url": "https://github.com/huggingface/lerobot/issues/2580",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-04T07:22:07Z",
    "updated_at": "2025-12-11T02:53:11Z",
    "user": "zhoushaoxiang"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 30023,
    "title": "[Feature]: Support qwen3next with GGUF?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nWith v0.11.0, `vllm` report:\n\n```\nvllm  | (APIServer pid=1) ValueError: GGUF model with architecture qwen3next is not supported yet.\n```\n\nhttps://huggingface.co/Qwen/Qwen3-Next-80B-A3B-Thinking-GGUF\n\n\nI did a simple dig for this, seems the vllm has support of `Qwen3-Next` as architecture is `qwen3_next`.\nBut the `Qwen` set it as `qwen3next`.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/30023",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-12-04T03:40:26Z",
    "updated_at": "2025-12-18T05:31:57Z",
    "comments": 0,
    "user": "zeerd"
  },
  {
    "repo": "pytorch/ao",
    "number": 3452,
    "title": "Any plans to support `USE_DISTRIBUTED=0` pytorch?",
    "body": "**Dec 6th EDIT:** simplified & expanded error and reproduction example from conversation below.\n\nIf not then please write in readme/requirements somewhere. The error below was cryptic.\n\nError that led me to this conception:\n<details>\n\n```\nTraceback (most recent call last):\n  File \"/data/data/com.termux/files/home/dev/llm/sd/test/./to.py\", line 3, in <module>\n    import torchao\n  File \"/data/data/com.termux/files/home/dev/llm/sd/ao/torchao/__init__.py\", line 127, in <module>\n    from torchao.quantization import (\n  File \"/data/data/com.termux/files/home/dev/llm/sd/ao/torchao/quantization/__init__.py\", line 6, in <module>\n    from .autoquant import (\n  File \"/data/data/com.termux/files/home/dev/llm/sd/ao/torchao/quantization/autoquant.py\", line 11, in <module>\n    from torchao.dtypes import (\n  File \"/data/data/com.termux/files/home/dev/llm/sd/ao/torchao/dtypes/__init__.py\", line 1, in <module>\n    from . import affine_quantized_tensor_ops\n  File \"/data/data/com.termux/files/home/dev/llm/sd/ao/torchao/dtypes/affine_quantized_tensor_ops.py\", line 14, in <module>\n    from torchao.dtypes.floatx.cutlass_semi_sparse_layout import (\n  File \"/data/data/com.termux/files/home/dev/llm/sd/ao/torchao/dtypes/floatx/__init__.py\", line 4, in <module>\n    from .float8_layout import Float8Layout\n  File \"/data/data/com.termux/files/home/dev/llm/sd/ao/torchao/dtypes/floatx/float8_layout.py\", line 21, in <module>\n    from torchao.float8.inference import (\n  File \"/data/data/com.termux/files/home/dev/llm/sd/ao/torchao/float8/__init__.py\", line 12, in <module>\n    from torchao.float8.float8_linear_utils import (\n  File \"/data/data/com.termux/files/home/dev/llm/sd/ao/torchao/float8/float8_linear_utils.py\", line 14, in <module>\n    from torchao.float8.float8_linear import Float8Linear\n  File \"/data/data/com.termux/files/home/dev/llm/sd/ao/torchao/float8/float8_linear.py\", line 15, in <module>\n    from torchao.float8.distributed_utils import tensor_already_casted_to_fp8\n  File \"/data/data/com.termux/files/home/dev/llm/sd/ao/torchao/float8/distributed_utils.py\", line 14, in <module>\n    from torchao.float8.float8_training_tensor import Float8TrainingTensor\n  File \"/data/data/com.termux/files/home/dev/llm/sd/ao/torchao/float8/float8_training_tensor.py\", line 10, in <module>\n    from torch.distributed._tensor import DTensor\n  File \"/data/data/com.termux/files/usr/lib/python3.12/site-packages/torch/distributed/_tensor/__init__.py\", line 25, in <module>\n    sys.modules[f\"torch.distributed._tensor.{submodule}\"] = import_module(\n                                                            ^^^^^^^^^^^^^^\n  File \"/data/data/com.termux/files/usr/lib/python3.12/importlib/__init__.py\", line 90, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/data/data/com.termux/files/usr/lib/python3.12/site-packages/torch/distributed/tensor/__init__.py\", line 4, in <module>\n    import torch.distributed.tensor._ops  # force import all built-in dtensor ops\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/data/data/com.termux/files/usr/lib/python3.12/site-packages/torch/distributed/tensor/_ops/__init__.py\", line 2, in <module>\n    from ._conv_ops import *  # noqa: F403\n    ^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/data/data/com.termux/files/usr/lib/python3.12/site-packages/torch/distributed/tensor/_ops/_conv_ops.py\", line 5, in <module>\n    from torch.distributed.tensor._dtensor_spec import DTensorSpec, TensorMeta\n  File \"/data/data/com.termux/files/usr/lib/python3.12/site-packages/torch/distributed/tensor/_dtensor_spec.py\", line 6, in <module>\n    from torch.distributed.tensor.placement_types import (\n  File \"/data/data/com.termux/files/usr/lib/python3.12/site-packages/torch/distributed/tensor/placement_types.py\", line 8, in <module>\n    import torch.distributed._functional_collectives as funcol\n  File \"/data/data/com.termux/files/usr/lib/python3.12/site-packages/torch/distributed/_functional_collectives.py\", line 9, in <module>\n    import torch.distributed.distributed_c10d as c10d\n  File \"/data/data/com.termux/files/usr/lib/python3.12/site-packages/torch/distributed/distributed_c10d.py\", line 23, in <module>\n    from torch._C._distributed_c10d import (\nModuleNotFoundError: No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package\n```\n\n</details>\n\nReproduction example leading to the error above when used with  `USE_DISTRIBUTED=0 USE_CUDA=0` built pytorch:\n```\nimport torchao\n```\n\nI tried guarding the imports/usage of `DTensor` with something like:\n```\nimport torch.distributed\nis_torch_distributed_available = torch.distributed.is_available()\nif is_torch_distributed_available:\n  from torch.distributed._tensor import DTensor\n```\nBut DTensor usage turned out to be prolific and well integrated. Maybe there is some sort of subclass solution and guard anything DTensor specific? I'm out of my depth here.\n\nI don't know of anything else to try with torchao and i",
    "url": "https://github.com/pytorch/ao/issues/3452",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-04T00:25:19Z",
    "updated_at": "2025-12-07T20:20:59Z",
    "comments": 7,
    "user": "rene-descartes2021"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29998,
    "title": "[Bug]: cannot send two POST to /v1/chat/completions endpoint with identic tool function name with model GPT-OSS-120B",
    "body": "### Your current environment\n\n<details>\n<summary>The bug is reproducible with docker image vllm/vllm-openai:v0.12.0</summary>\n\n```yaml\nservices:\n  vllm-gptoss-large:\n    image: vllm/vllm-openai:v0.12.0\n    restart: always\n    shm_size: '64gb'\n    deploy:\n      resources:\n        reservations:\n          devices:\n            - driver: nvidia\n              device_ids: ['0', '1']\n              capabilities: [gpu]\n    volumes:\n      - ./data/hf:/data\n    environment:\n      - HF_TOKEN=${HF_TOKEN}\n    ports:\n      - 8000:8000\n    command: [\"openai/gpt-oss-120b\",\n             \"--tool-call-parser\",\"openai\",\n             \"--enable-auto-tool-choice\",\n             \"--reasoning-parser\",\"openai_gptoss\",\n             \"--tensor-parallel-size\",\"2\",\n             \"--port\",\"8000\",\n             \"--api-key\", \"${VLLM_API_KEY}\",\n             \"--download_dir\", \"/data\"]\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nThis bash script cannot be executed a second time, unless the name of the function is changed to a value which was not yet sent. Without tool definition, the POST can be sent as often as you like.\n\n```bash\n#!/bin/bash\ncurl -X POST http://localhost:8000/v1/chat/completions \\\n  -H \"Authorization: Bearer ${VLLM_API_KEY}\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"openai/gpt-oss-120b\",\n    \"stream\": false,\n    \"messages\": [\n      {\n        \"role\": \"system\",\n        \"content\": \"Be a helpful assistant.\"\n      },\n      {\n        \"role\": \"user\",\n        \"content\": \"Hi\"\n      },\n      {\n        \"role\": \"assistant\",\n        \"content\": \"How can I help you?\"\n      },\n      {\n        \"role\": \"user\",\n        \"content\": \"Do you like Monty Python?\"\n      }\n    ],\n    \"tools\": [\n      {\n        \"type\": \"function\",\n        \"function\": {\n          \"name\": \"CHANGE-NAME-BEFORE-SENDING\",\n          \"description\": \"Use this tool if you need to extract information from a website.\",\n          \"parameters\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"url\": {\n                \"type\": \"string\",\n                \"description\": \"The URL to search or extract information from.\"\n              }\n            },\n            \"required\": [\"url\"]\n          }\n        }\n      }\n    ]\n  }'\n\n```\n\nThe script doesn't finish waiting for a response and `nvidia-smi` shows the cards consuming max power. The vllm logs show that there are tokens generated, so from an external point of view the LLM seems to generate tokens without stopping.\n\n<img width=\"2962\" height=\"274\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/115672b2-f85f-43ec-b89c-d3a0daae7d81\" />\n\nThis is quite weird, because when you call it with python SDK, it is working fine, e.g.\n\n```python\nfrom openai import OpenAI\nfrom dotenv import load_dotenv\nimport os\n\nload_dotenv()\n\nclient = OpenAI(\n    api_key=os.getenv(\"API_KEY\"),\n    base_url=\"http://localhost:8000/v1\",\n)\n\ntools = [{\n    \"type\": \"function\",\n    \"function\": {\n        \"name\": \"get_weather\",\n        \"description\": \"Get the current weather in a given location\",\n        \"parameters\": {\n            \"type\": \"object\",\n            \"properties\": {\n                \"location\": {\"type\": \"string\"},\n                \"description\": \"Location and state, e.g., 'San Francisco, CA'\"\n            },\n            \"required\": [\"location\"]\n            },\n        },\n    }\n]\n\nresponse = client.chat.completions.create(\n    model=\"openai/gpt-oss-120b\",\n    messages=[{\"role\": \"user\", \"content\": \"How is the weather in Berlin? use the tool get_weather.\"}],\n    tools=tools,\n    tool_choice=\"auto\",\n    stream=False \n)\n \nprint(response.choices[0].message)\n```\n\nIn fact this can also be reproduced using n8n, AI Agent nodes which are based on the typescipt langgraph implementation: https://github.com/n8n-io/n8n/blob/master/packages/%40n8n/nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V1/execute.ts#L34\n\nHere you can also see that chat windows freeze when a tool is attached and a user is asking the second question.\n\nThe bug really seems to be related to this model, because I tested Mistral and Qwen Models and I couldn't reproduce it. When I tried to debug the issue, there was a sensetivity to the description field in the parameters list of the tool. To make it clear, this can also only be sent once using the OpenAI Python SDK, but works again when the function name is changed:\n\n```python\nfrom openai import OpenAI\nfrom dotenv import load_dotenv\nimport os\n\nload_dotenv()\n\nclient = OpenAI(\n    api_key=os.getenv(\"API_KEY\"),\n    base_url=f\"https://{os.getenv('API_DOMAIN')}/v1\",\n)\n\ntools = [{\n    \"type\": \"function\",\n    \"function\": {\n        \"name\": \"get_weather\",\n        \"description\": \"Get the current weather in a given location\",\n        \"parameters\": {\n            \"type\": \"object\",\n            \"properties\": {\n                \"location\": {\n                    \"type\": \"string\", \n                    \"description\": \"Location and state, e.g., 'San Francisco, CA'\"\n                    },\n            },\n            \"required\": [\"locatio",
    "url": "https://github.com/vllm-project/vllm/issues/29998",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-03T21:41:35Z",
    "updated_at": "2025-12-19T15:53:43Z",
    "comments": 14,
    "user": "pd-t"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42589,
    "title": "Incorrect tokenization `tokenizers` for escaped strings / Mismatch with `mistral_common`",
    "body": "### System Info\n\n```\nIn [3]: mistral_common.__version__\nOut[3]: '1.8.6'\n```\n\n```\nIn [4]: import transformers; transformers.__version__\nOut[4]: '5.0.0.dev0'\n```\n\n```\nIn [5]: import tokenizers; tokenizers.__version__\nOut[5]: '0.22.1'\n```\n\n### Who can help?\n\n@ArthurZucker @itazap \n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```py\nfrom transformers import AutoTokenizer\nfrom mistral_common.tokens.tokenizers.mistral import MistralTokenizer\nfrom mistral_common.protocol.instruct.request import ChatCompletionRequest\n\nreq = ChatCompletionRequest(messages=[\n    {'role': 'system', 'content': ''},\n    {'role': 'user', 'content': 'hey'},\n    {'role': 'assistant', 'content': 'ju\\x16'},\n    {'role': 'user', 'content': 'hey'},\n])\n\ntokenizer_orig = MistralTokenizer.from_hf_hub(\"mistralai/Ministral-3-3B-Instruct-2512\")\ntokenizer_hf = AutoTokenizer.from_pretrained(\"mistralai/Ministral-3-3B-Instruct-2512\")\n\norig_tokens = tokenizer_orig.encode_chat_completion(req).tokens\norig_text = tokenizer_orig.encode_chat_completion(req).text\n\nprint(\"Expected\")\nprint(orig_text)\nprint(orig_tokens)\n\nhf_tokens = tokenizer_hf.apply_chat_template(req.to_openai()[\"messages\"])\nhf_text = tokenizer_hf.convert_ids_to_tokens(hf_tokens)\n\nprint(\"HF\")\nprint(hf_tokens)\nprint(hf_text)\n```\n\ngives:\n\n```\nExpected\n<s>[SYSTEM_PROMPT][/SYSTEM_PROMPT][INST]hey[/INST]ju</s>[INST]hey[/INST]\n[1, 17, 18, 3, 74058, 4, 5517, 1022, 2, 3, 74058, 4]\nHF\n[1, 17, 18, 3, 74058, 4, 5517, 1022, 1032, 2, 3, 74058, 4]\n['<s>', '[SYSTEM_PROMPT]', '[/SYSTEM_PROMPT]', '[INST]', 'hey', '[/INST]', 'ju', '\u0116', '\u0120', '</s>', '[INST]', 'hey', '[/INST]']\n```\n\nAs you can see the token `1032` should not be there. I'm not sure exactly what is happening and it could very well be that the behavior of `tokenizers` makes sense here. \n\n**However**, this is a mismatch with `mistral_common` which means that any such tokenization will give slightly different token ids leading to slightly incorrect results since all Mistral models are trained with `mistral_common`.\n\nThis is especially important for \"long-log\" parsing tasks that often have escaped strings.\n\nIt's def an edge case, but would still be very nice to fix.\n\n### Expected behavior\n\nAlign encoding.",
    "url": "https://github.com/huggingface/transformers/issues/42589",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-03T10:57:35Z",
    "updated_at": "2025-12-16T10:45:35Z",
    "comments": 5,
    "user": "patrickvonplaten"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12781,
    "title": "Impossible to log into Huggingface/Diffusers Discord",
    "body": "### Describe the bug\n\nWhen trying to verify my Discord/Huggingface account, no matter what I do, I end up with this message: \n<img width=\"512\" height=\"217\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d1d0f18b-c80f-4862-abde-fb49ee505ddd\" />\n\nHas the HF Discord died? If that is the case, what alternatives are there? \n\nI feel that there is a strong need for some kind of forum where users of Diffusers in collaboration can figure out how to make newly supported and huge models run on consumer hardware. The Diffusers discussion on GitHub is dead. So, where do we go?\n\n### Reproduction\n\nTry to log-in in to Discord. \n\n### Logs\n\n```shell\n-\n```\n\n### System Info\n\n-\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/12781",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-12-03T09:42:55Z",
    "updated_at": "2025-12-04T15:11:42Z",
    "comments": 4,
    "user": "tin2tin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169461,
    "title": "torch compile + replicate, compute and communication not overlap",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhen I use a combination of composable.replicate and torch.compile, I observe that all backward allreduce operations are executed only after the entire backward pass computation is complete.\n\nThis behavior prevents the overlap of computation and communication, which is typically achieved in DDP (DistributedDataParallel) + torch.compile by inserting a graph break during the backward pass (e.g., after the gradient calculation for a specific layer).\n\nI am looking for any potential workarounds or suggested methods to enable computation/communication overlap when using composable.replicate with torch.compile.\n\n```\nimport os\nimport time\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\n\nfrom torch.distributed._composable.replicate import replicate\n\nfrom torch.profiler import profile, record_function, ProfilerActivity\n\ndef setup():\n    rank = int(os.environ[\"RANK\"])\n    local_rank = int(os.environ[\"LOCAL_RANK\"])\n    world_size = int(os.environ[\"WORLD_SIZE\"])\n\n    dist.init_process_group(\"nccl\")\n    torch.cuda.set_device(local_rank)\n    \n    return rank, local_rank\n\ndef cleanup():\n    dist.destroy_process_group()\n\nclass ToyModel(nn.Module):\n    def __init__(self):\n        super().__init__()\n        self.layers = nn.Sequential(\n            nn.Linear(2048, 4096),\n            nn.ReLU(),\n            nn.Linear(4096, 4096),\n            nn.ReLU(),\n            nn.Linear(4096, 4096),\n            nn.ReLU(),\n            nn.Linear(4096, 2048),\n        )\n\n    def forward(self, x):\n        return self.layers(x)\n\ndef main():\n    rank, local_rank = setup()\n\n    model = ToyModel().to(local_rank)\n\n    replicate(\n        model, \n        device_ids=[local_rank], \n        bucket_cap_mb=25\n    )\n\n    opt_model = torch.compile(model, backend=\"inductor\")\n\n    optimizer = torch.optim.SGD(opt_model.parameters(), lr=0.01)\n    loss_fn = nn.MSELoss()\n\n    input_tensor = torch.randn(32, 2048).to(local_rank)\n    target_tensor = torch.randn(32, 2048).to(local_rank)\n\n    log_dir = './profiler_logs_composable'\n    \n    with profile(\n        activities=[ProfilerActivity.CPU, ProfilerActivity.CUDA],\n        schedule=torch.profiler.schedule(\n            wait=5,\n            warmup=2,\n            active=3,\n            repeat=1\n        ),\n        on_trace_ready=torch.profiler.tensorboard_trace_handler(log_dir),\n        record_shapes=True,\n        profile_memory=True,\n        with_stack=True\n    ) as prof:\n        \n        for step in range(15):\n            step_start = time.time()\n            \n            with record_function(\"model_training_step\"):\n                optimizer.zero_grad()\n                \n                output = opt_model(input_tensor)\n                loss = loss_fn(output, target_tensor)\n                loss.backward()\n                optimizer.step()\n            \n            torch.cuda.synchronize()\n            step_end = time.time()\n\n            if rank == 0:\n                print(f\"Step {step}: Loss={loss.item():.4f}, Time={step_end - step_start:.4f}s\")\n            \n            prof.step()\n\n    cleanup()\n\nif __name__ == \"__main__\":\n    main()\n```\n\n![Image](https://github.com/user-attachments/assets/0af08b18-893b-4cff-b8fe-b23cb10fb4be)\n\n### Versions\n\nPyTorch version: 2.10.0a0+b558c986e8.nv25.11\nIs debug build: False\nCUDA used to build PyTorch: 13.0\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.3 LTS (x86_64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version: Could not collect\nCMake version: version 3.31.6\nLibc version: glibc-2.39\n\nPython version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-5.4.0-150-generic-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: 13.0.88\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: \nGPU 0: NVIDIA A100-PCIE-40GB\nGPU 1: NVIDIA A100-PCIE-40GB\n\nNvidia driver version: 570.133.20\ncuDNN version: Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.15.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.15.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.15.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.15.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.15.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.15.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.15.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.15.0\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nAddress sizes:                   46 bits physical, 57 bits virtual\nByte Order:                      Little Endian\nCPU(s):                          112\nOn-line CPU(s) list:             0-111\nVendor ID:                       GenuineIntel\nModel name:                      Intel(R) Xeon(R) Gold 6330 CPU @ 2.00GHz\nCPU family:                      6\nModel:                           106\nThread(s) per core:              2\nCore(s) per socket:  ",
    "url": "https://github.com/pytorch/pytorch/issues/169461",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "triaged",
      "oncall: pt2"
    ],
    "created_at": "2025-12-03T08:33:05Z",
    "updated_at": "2025-12-09T17:50:45Z",
    "comments": 6,
    "user": "peaceorwell"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29944,
    "title": "[Usage]:It seems that the prefix cache has not brought about any performance benefits.",
    "body": "### Your current environment\n\n```\nroot@ubuntu:/vllm-workspace# python3 collect_env.py\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version                : Could not collect\nCMake version                : version 4.1.0\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.11 (main, Jun  4 2025, 08:56:18) [GCC 11.4.0] (64-bit runtime)\nPython platform              : Linux-5.15.0-25-generic-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration :\nGPU 0: NVIDIA H20\nGPU 1: NVIDIA H20\nGPU 2: NVIDIA H20\nGPU 3: NVIDIA H20\nGPU 4: NVIDIA H20\nGPU 5: NVIDIA H20\nGPU 6: NVIDIA H20\nGPU 7: NVIDIA H20\n\nNvidia driver version        : 550.127.08\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nAddress sizes:                   52 bits physical, 57 bits virtual\nByte Order:                      Little Endian\nCPU(s):                          224\nOn-line CPU(s) list:             0-223\nVendor ID:                       GenuineIntel\nModel name:                      Intel(R) Xeon(R) Platinum 8480+\nCPU family:                      6\nModel:                           143\nThread(s) per core:              2\nCore(s) per socket:              56\nSocket(s):                       2\nStepping:                        8\nFrequency boost:                 enabled\nCPU max MHz:                     2001.0000\nCPU min MHz:                     800.0000\nBogoMIPS:                        4000.00\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr avx512_fp16 flush_l1d arch_capabilities\nVirtualization:                  VT-x\nL1d cache:                       5.3 MiB (112 instances)\nL1i cache:                       3.5 MiB (112 instances)\nL2 cache:                        224 MiB (112 instances)\nL3 cache:                        210 MiB (2 instances)\nNUMA node(s):                    2\nNUMA node0 CPU(s):               0-55,112-167\nNUMA node1 CPU(s):               56-111,168-223\nVulnerability Itlb multihit:     Not affected\nVulnerability L1tf:              Not affected\nVulnerability Mds:               Not affected\nVulnerability Meltdown:          Not affected\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:        Mitigation; Enhanced IBRS, IBPB conditional, RSB filling\nVulnerability Srbds:             Not affected\nVulnerability Tsx async abort:   Not affected\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-python==0.3.1\n[pip3] numpy==2.2.6\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cudnn-frontend==1.14.1\n[pip3] nvidia-cufft-cu12==11.3.3.83\n[pip3] nvidia-cufile-cu",
    "url": "https://github.com/vllm-project/vllm/issues/29944",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-03T07:03:49Z",
    "updated_at": "2025-12-03T07:04:37Z",
    "comments": 0,
    "user": "wenba0"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29940,
    "title": "[Usage]: QWen2-Audio-7B support",
    "body": "### Your current environment\n\nWe encountered numerous peculiar issues during the QWen2-Audio-7B conversion process. Do we currently support Qwen2-Audio-7B? If so, could you provide a demo?\n\nThank you very much\uff01\n\n### \ud83d\udc1b Describe the bug\n\nRefer to Whisper's demo\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29940",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-03T06:04:07Z",
    "updated_at": "2025-12-04T14:23:05Z",
    "comments": 1,
    "user": "freedom-cui"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7893,
    "title": "push_to_hub OOM: _push_parquet_shards_to_hub accumulates all shard bytes in memory",
    "body": "## Summary\n\nLarge dataset uploads crash or hang due to memory exhaustion. This appears to be the root cause of several long-standing issues.\n\n### Related Issues\n\nThis is the root cause of:\n- #5990 - Pushing a large dataset on the hub consistently hangs (46 comments, open since 2023)\n- #7400 - 504 Gateway Timeout when uploading large dataset\n- #6686 - Question: Is there any way for uploading a large image dataset?\n\n### Context\n\nDiscovered while uploading the [Aphasia Recovery Cohort (ARC)](https://openneuro.org/datasets/ds004884) neuroimaging dataset (~270GB, 902 sessions) to HuggingFace Hub using the `Nifti()` feature.\n\nWorking implementation with workaround: [arc-aphasia-bids](https://github.com/The-Obstacle-Is-The-Way/arc-aphasia-bids)\n\n## Root Cause\n\nIn `_push_parquet_shards_to_hub` (arrow_dataset.py), the `additions` list accumulates every `CommitOperationAdd` with full Parquet bytes in memory:\n\n```python\nadditions = []\nfor shard in shards:\n    parquet_content = shard.to_parquet_bytes()  # ~300 MB per shard\n    shard_addition = CommitOperationAdd(path_or_fileobj=parquet_content)\n    api.preupload_lfs_files(additions=[shard_addition])\n    additions.append(shard_addition)  # THE BUG: bytes stay in memory forever\n```\n\nFor a 902-shard dataset: **902 \u00d7 300 MB = ~270 GB RAM requested \u2192 OOM/hang**.\n\nThe bytes are held until the final `create_commit()` call, preventing garbage collection.\n\n## Reproduction\n\n```python\nfrom datasets import load_dataset\n\n# Any large dataset with embedded files (Image, Audio, Nifti, etc.)\nds = load_dataset(\"imagefolder\", data_dir=\"path/to/large/dataset\")\nds.push_to_hub(\"repo-id\", num_shards=500)  # Watch memory grow until crash\n```\n\n## Workaround\n\nProcess one shard at a time, upload via `HfApi.upload_file(path=...)`, delete before next iteration:\n\n```python\nfrom huggingface_hub import HfApi\nimport pyarrow.parquet as pq\n\napi = HfApi()\nfor i in range(num_shards):\n    shard = ds.shard(num_shards=num_shards, index=i, contiguous=True)\n    \n    # Write to disk, not memory\n    shard.to_parquet(local_path)\n    \n    # Upload from file path (streams from disk)\n    api.upload_file(\n        path_or_fileobj=str(local_path),\n        path_in_repo=f\"data/train-{i:05d}-of-{num_shards:05d}.parquet\",\n        repo_id=repo_id,\n        repo_type=\"dataset\",\n    )\n    \n    # Clean up before next iteration\n    local_path.unlink()\n    del shard\n```\n\nMemory usage stays constant (~1-2 GB) instead of growing linearly.\n\n## Suggested Fix\n\nAfter `preupload_lfs_files` succeeds for each shard, release the bytes:\n\n1. Clear `path_or_fileobj` from the `CommitOperationAdd` after preupload\n2. Or write to temp file and pass file path instead of bytes\n3. Or commit incrementally instead of batching all additions\n\n## Environment\n\n- datasets version: main branch (post-0.22.0)\n- Platform: macOS 14.x ARM64\n- Python: 3.13\n- PyArrow: 18.1.0\n- Dataset: 902 shards, ~270 GB total embedded NIfTI files",
    "url": "https://github.com/huggingface/datasets/issues/7893",
    "state": "closed",
    "labels": [],
    "created_at": "2025-12-03T04:19:34Z",
    "updated_at": "2025-12-05T22:45:59Z",
    "comments": 2,
    "user": "The-Obstacle-Is-The-Way"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 2101,
    "title": "EP in latest main is slow",
    "body": "Hi team,\n\nI tried to duplicate the EP implementation in my model. But I find it's running much slowly with EP.\nI find there is a written cpu-gpu synchronization at the beginning of all2all in token dispatch, for input_split and output_split, which is kinda a blocker. Is it possible to avoid it without symmetric memory all2all?\n\nBesides, could you help to share which part of EP workflow needs torch.compile? I noticed the usage of torch.gather and torch.scatter_add may not be optimal. I guess they may need to be optimized by torch.compile.\n\nThanks!\n",
    "url": "https://github.com/pytorch/torchtitan/issues/2101",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-03T00:10:46Z",
    "updated_at": "2025-12-03T00:10:46Z",
    "comments": 0,
    "user": "goldhuang"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 2100,
    "title": "symmetric memory all2all integration for EP",
    "body": "Hi team,\n\nI find https://github.com/pytorch/torchtitan/tree/main/torchtitan/experiments/moe_symm_mem_kernels. But seems there is no progress update for a while according to \n\nExperiment | Test Status | Owners\n-- | -- | --\n[moe_symm_mem_kernels](https://github.com/pytorch/torchtitan/blob/main/torchtitan/experiments/moe_symm_mem_kernels)|TBA|[@kwen2501](https://github.com/kwen2501)\n\n\nIs there a plan for the integration? Is there any known issue that stops the release? \nThanks!",
    "url": "https://github.com/pytorch/torchtitan/issues/2100",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-03T00:02:55Z",
    "updated_at": "2025-12-03T00:02:55Z",
    "comments": 0,
    "user": "goldhuang"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29920,
    "title": "[Feature]: Add support for fused fp8 output to FlashAttention 3",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nOn Hopper, we use FlashAttention as the default attention backend. When o-proj is quantized to fp8, we are leaving performance on the table as FA3 does not support fused output fp8 quant. With Triton/ROCm/AITER backends we saw up to 8% speedups with attention+quant fusion.\n\nvLLM already maintains our own fork of FA, adding output quant support should be pretty non-intrusive. Subtasks:\n- vllm-flash-attn:\n  - add `output_scale` parameter to attention forward functions\n  - plumb parameter through all layers of the interface\n  - compare branching at runtime/compile-time for performance and binary size (Hopper)\n\n- vllm:\n  - integrate new FA version\n  - add support for attention+quant fusion to FA attention backend\n    - check FA version, hardware version\n    - should be as easy as modifying the `supports_fused_output_quant` method and plumbing `output_scale` from `FlashAttentionImpl.forward()` to the kernel call\n\n### Additional context\n\ncc @LucasWilkinson \n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29920",
    "state": "open",
    "labels": [
      "help wanted",
      "performance",
      "feature request",
      "torch.compile"
    ],
    "created_at": "2025-12-02T20:16:31Z",
    "updated_at": "2026-01-05T20:53:11Z",
    "comments": 4,
    "user": "ProExpertProg"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29917,
    "title": "[Feature]: VLLM_DISABLE_COMPILE_CACHE should be a config flag",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\n`vllm serve` does a nice printout of non-default config flags. VLLM_DISABLE_COMPILE_CACHE gets used enough that it should have an equivalent config flag for it\n\nOffline @ProExpertProg mentioned we can treat it like VLLM_DEBUG_DUMP_PATH where we have both and the env var overrides the config option by overwriting it directly\n\n### Alternatives\n\nnone\n\n### Additional context\n\nn/a\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29917",
    "state": "open",
    "labels": [
      "help wanted",
      "feature request",
      "torch.compile"
    ],
    "created_at": "2025-12-02T20:06:01Z",
    "updated_at": "2025-12-05T05:19:12Z",
    "comments": 6,
    "user": "zou3519"
  },
  {
    "repo": "pytorch/xla",
    "number": 9726,
    "title": "How is GetOutputShardings supposed to work for PJRT Implementers?",
    "body": "We have a custom shardy + stablehlo pipeline manage shard propagation inside our compiler stack. We're having trouble **communcating the correct output sharding back to the framework**, and cannot find any obvious interface to do so, and wanted to ask what the intended path for this looks like.\n\nTo be clear, this is the path our compiler takes:\n1. We get the SHLO in Shardy dialect from the torch-xla framework\n2. We run Shardy to solve the SHLO graph\n3. We lower it to our own custom dialect and execute from there.\n\nWe do _not_ convert the SHLO graph back to HLO (as Jax does). After the graph is solved in step 2, we would like to tell torch-xla what the correct output shardings are.\n\n## Observed Behavior\n\nIn torch_xla, we observe that output shardings are retrieved during compilation in ths path:\ntorch_xla::XLAGraphExecutor::Compile -> torch_xla::runtime::PjRtComputationClient::Compile -> [PjRtComputation constructor](https://github.com/tenstorrent/pytorch-xla/blob/a5be1f82e7906e09aa004cb99b08e29d3c102478/torch_xla/csrc/runtime/pjrt_computation_client.h#L329-L336) -> `output_shardings_ = this->executable->GetOutputShardings();`\n\nThis eventually calls into the base PJRTExecutable implementation of [GetOutputShardings](https://github.com/openxla/xla/blob/4ae2ec6f162569750c76dbdbe12071d7091f1988/xla/pjrt/pjrt_executable.cc#L350-L361).\n\nThe mechanism by which output shardings seem to be extracted from the implementer side is by calling `PJRT_Executable_OptimizedProgram` to retrieve the post-compile MLIR from our PJRT implementation in [xla::PjRtCApiExecutable::GetHloModules()](https://github.com/openxla/xla/blob/main/xla/pjrt/c_api_client/pjrt_c_api_client.cc#L2001-L2061).\n\nThe MLIR is then converted to an xla-internal HLO module construct and output shardings are [eventually extracted from that construct inside PjRtExecutable::GetOutputShardings()](https://github.com/openxla/xla/blob/4ae2ec6f162569750c76dbdbe12071d7091f1988/xla/pjrt/pjrt_executable.cc#L340-L361)\n\n## How should this work?\n\nThis existing path would suggest that the way a PJRT implementer \"communicates\" output shardings back to the framework post-compilation is by generating IR with output shardings in some format compatible with how they are ingested in XLA. This seems both complex and unidiomatic, because other paths to return data from compilation to the framework involve well defined interfaces in PJRT (like PJRT_Executable_OutputDimensions) and [PjRtCApi overrides](https://github.com/openxla/xla/blob/main/xla/pjrt/c_api_client/pjrt_c_api_client.cc#L1898-L1921) to use those interfaces and cast the result to xla internal types.\n\nWhat is the recommended way to communicate output shardings to the framework from a lower-level compiler?",
    "url": "https://github.com/pytorch/xla/issues/9726",
    "state": "open",
    "labels": [
      "question",
      "runtime",
      "stablehlo"
    ],
    "created_at": "2025-12-02T19:26:20Z",
    "updated_at": "2025-12-15T13:47:09Z",
    "user": "jameszianxuTT"
  },
  {
    "repo": "huggingface/inference-playground",
    "number": 102,
    "title": "How to know when a model is outdated ?",
    "body": "I'm testing https://huggingface.co/chat/models/openai/gpt-oss-20b and there I asked this:\n```\ndo you know any github repository created in 2025?\n\n<p>Sure! Here are a few GitHub repositories that were created in\u202f2025 (all with their public \u201ccreated\u202fdate\u201d and a short description):</p>\n\nRepository | Created | Short description | Link\n\nopen\u2011thoughts/open\u2011thoughts | 2025\u201101\u201127 | An open\u2011source platform for curating datasets that can be used to train and evaluate reasoning\u2011oriented language models. | https://github.com/open-thoughts/open-thoughts\n\u00a0...\n```\nBut on https://huggingface.co/playground:\n```\ndo you know any github repository created in 2025?\n\nI don\u2019t have any information about repositories that were created in 2025. My training data only goes up to September\u202f2023, so I can\u2019t see or reference anything that was added to GitHub after that date. If you\u2019re looking for recent projects, you could search GitHub directly or use the GitHub API to filter repositories by creation date.\n```\nI'm asking it here because I don't know where else to ask, I also opened an issue here https://github.com/ggml-org/llama.cpp/discussions/15396#discussioncomment-15136920 .\n\nI've also downloaded the https://huggingface.co/openai/gpt-oss-20b and running locally it doesn't know anything from 2025.\n\n**Based on this I suspect that the model running here https://huggingface.co/chat/models/openai/gpt-oss-20b is not the one that's  here https://huggingface.co/openai/gpt-oss-20b .**\n\n**How/Where can we get the version running here https://huggingface.co/chat/models/openai/gpt-oss-20b ?**",
    "url": "https://github.com/huggingface/inference-playground/issues/102",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-02T17:10:51Z",
    "updated_at": "2025-12-02T17:10:51Z",
    "user": "mingodad"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16041,
    "title": "CORTEX_M: Memory optimization",
    "body": "No work has been done looking into optimizing memory of the runtime. This ticket covers a broad investigation into what can be done in this space:\n1. Can we optimize scratch buffer allocation (e.g. is it reused between kernels currently?)\n2. Can we strip away anything from the elf to minimize runtime size?\n3. Any other ideas to optimize performance related to memory",
    "url": "https://github.com/pytorch/executorch/issues/16041",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-02T14:24:20Z",
    "updated_at": "2025-12-15T12:01:21Z",
    "comments": 0,
    "user": "AdrianLundell"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16039,
    "title": "CORTEX_M: Target configuration",
    "body": "CMSIS-NN requires slightly different lowerings for different architecture extensions (scalar/DSP/vector). Currently\nvector extension is assumed, so we might need to add a way to configure this and do modifications in the pass lowering where required. \n\nFor example, the linear operator currently only pass the kernel_sum scratch buffer and no bias to the operator call, which only works for the MVE implementation of the operator. To run this on another Cortex-M would involve passing the target CPU to the ConvertToCortexMPass which lowers the operator  and add the bias as an argument if it does not have MVE support. \n\nAlternatively, it might not be worth the effort to do this in the lowering and it is better to do the target configuration in the runtime flow only, then the scratch buffer would need to be computed in the runtime. This decision of how to best do this is part of the ticket.",
    "url": "https://github.com/pytorch/executorch/issues/16039",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-02T14:19:34Z",
    "updated_at": "2025-12-03T15:34:04Z",
    "comments": 0,
    "user": "AdrianLundell"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169371,
    "title": "C++ Generator API is platform dependent",
    "body": "When creating a tensor with the C++ API, one can do something like this:\n```\n\ttry {\n\t\tTensor t = torch::ones({200, 1, 28, 28});\n\t\tt.to(torch::DeviceType::MPS);\n\t} catch(const std::exception& e) {\n\t\t...\n\t}\n```\nThis code is going to compile and run on all platforms, obviously going into the `catch` block if not on macOS. The same thing happens for `t.to(torch::DeviceType::CUDA)`\n\nOn the other hand, Generators offer the utilities `at::cuda::detail::createCUDAGenerator` and `at::mps::detail::createMPSGenerator` which are not defined in libtorch unless the library was built with CUDA support and on macOS respectively, which needs special care at both compile time and run time (using macros to exclude code, force compilation with unresolved external symbols, checking `torch::cuda::is_available()`/`torch::mps::is_available()` before making the calls, ...).\n\nIs there a platform-independent way to deal with Generators just like there is with Tensors?\n\ncc @jbschlosser @albanD @guangyey @EikanWang",
    "url": "https://github.com/pytorch/pytorch/issues/169371",
    "state": "open",
    "labels": [
      "module: cpp",
      "triaged",
      "module: accelerator"
    ],
    "created_at": "2025-12-02T12:53:52Z",
    "updated_at": "2025-12-04T02:07:26Z",
    "comments": 1,
    "user": "matteosal"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29875,
    "title": "[Usage]: Is there a way to inject the grammar into the docker directly",
    "body": "### Your current environment\n\n```text\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version                : Could not collect\nCMake version                : version 3.28.0\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.10.19 | packaged by conda-forge | (main, Oct 22 2025, 22:29:10) [GCC 14.3.0] (64-bit runtime)\nPython platform              : Linux-6.8.0-1030-azure-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : Could not collect\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : GPU 0: NVIDIA H100 NVL\nNvidia driver version        : 535.247.01\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.10.2\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        48 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               40\nOn-line CPU(s) list:                  0-39\nVendor ID:                            AuthenticAMD\nModel name:                           AMD EPYC 9V84 96-Core Processor\nCPU family:                           25\nModel:                                17\nThread(s) per core:                   1\nCore(s) per socket:                   40\nSocket(s):                            1\nStepping:                             1\nBogoMIPS:                             4800.05\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves user_shstk avx512_bf16 clzero xsaveerptr rdpru arat avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm\nHypervisor vendor:                    Microsoft\nVirtualization type:                  full\nL1d cache:                            1.3 MiB (40 instances)\nL1i cache:                            1.3 MiB (40 instances)\nL2 cache:                             40 MiB (40 instances)\nL3 cache:                             160 MiB (5 instances)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-39\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Vulnerable: Safe RET, no microcode\nVulnerability Spec store bypass:      Vulnerable\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Retpolines; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affected\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-python==0.5.2\n[pip3] numpy==1.26.4\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n",
    "url": "https://github.com/vllm-project/vllm/issues/29875",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-02T12:30:56Z",
    "updated_at": "2025-12-03T11:53:43Z",
    "comments": 1,
    "user": "chwundermsft"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29871,
    "title": "[Usage]: Extremly low token input speed for DeepSeek-R1-Distill-Llama-70B",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (GCC) 14.2.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.4 (main, Aug 29 2025, 09:21:27) [GCC 14.2.0] (64-bit runtime)\nPython platform              : Linux-5.15.0-118-generic-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.61\nCUDA_MODULE_LOADING set to   :\nGPU models and configuration :\nGPU 0: NVIDIA H100 80GB HBM3\nGPU 1: NVIDIA H100 80GB HBM3\nGPU 2: NVIDIA H100 80GB HBM3\nGPU 3: NVIDIA H100 80GB HBM3\nGPU 4: NVIDIA H100 80GB HBM3\nGPU 5: NVIDIA H100 80GB HBM3\nGPU 6: NVIDIA H100 80GB HBM3\nGPU 7: NVIDIA H100 80GB HBM3\n\nNvidia driver version        : 570.158.01\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        52 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               192\nOn-line CPU(s) list:                  0-191\nVendor ID:                            AuthenticAMD\nModel name:                           AMD EPYC 9654 96-Core Processor\nCPU family:                           25\nModel:                                17\nThread(s) per core:                   1\nCore(s) per socket:                   96\nSocket(s):                            2\nStepping:                             1\nFrequency boost:                      enabled\nCPU max MHz:                          3707.8120\nCPU min MHz:                          1500.0000\nBogoMIPS:                             4793.01\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 invpcid_single hw_pstate ssbd mba ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid overflow_recov succor smca fsrm flush_l1d\nVirtualization:                       AMD-V\nL1d cache:                            6 MiB (192 instances)\nL1i cache:                            6 MiB (192 instances)\nL2 cache:                             192 MiB (192 instances)\nL3 cache:                             768 MiB (24 instances)\nNUMA node(s):                         2\nNUMA node0 CPU(s):                    0-95\nNUMA node1 CPU(s):                    96-191\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Mitigation; safe RET\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; STIBP disabled; RSB filling; PBRSB-eIB",
    "url": "https://github.com/vllm-project/vllm/issues/29871",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-02T11:25:25Z",
    "updated_at": "2025-12-02T15:30:53Z",
    "comments": 2,
    "user": "muelphil"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29866,
    "title": "[Doc]:",
    "body": "### \ud83d\udcda The doc issue\n\n# Installation des biblioth\u00e8ques XAI\n!pip install shap\n!pip install lime\n!pip install alibi\n!pip install interpret\n!pip install dalex\n!pip install eli5\n\n\n### Suggest a potential alternative/fix\n\n# Installation des biblioth\u00e8ques XAI\n!pip install shap\n!pip install lime\n!pip install alibi\n!pip install interpret\n!pip install dalex\n!pip install eli5\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29866",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-12-02T10:43:04Z",
    "updated_at": "2025-12-02T10:50:10Z",
    "comments": 0,
    "user": "hassaballahmahamatahmat5-cpu"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29865,
    "title": "[Doc]:",
    "body": "### \ud83d\udcda The doc issue\n\n# Installation des biblioth\u00e8ques XAI\n!pip install shap\n!pip install lime\n!pip install alibi\n!pip install interpret\n!pip install dalex\n!pip install eli5\n\n\n### Suggest a potential alternative/fix\n\n# Installation des biblioth\u00e8ques XAI\n!pip install shap\n!pip install lime\n!pip install alibi\n!pip install interpret\n!pip install dalex\n!pip install eli5\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29865",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-12-02T10:43:01Z",
    "updated_at": "2025-12-02T10:50:00Z",
    "comments": 0,
    "user": "hassaballahmahamatahmat5-cpu"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29864,
    "title": "[Usage]: I am unable to run the GLM-4.5-Air-REAP-82B-A12B-nvfp4 model on an RTX 5090.",
    "body": "### Your current environment\n\n\n I am unable to run the GLM-4.5-Air-REAP-82B-A12B-nvfp4 model on an RTX 5090.\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 12.3.0-1ubuntu1~22.04.2) 12.3.0\nClang version                : Could not collect\nCMake version                : version 4.2.0\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.10.0.dev20251124+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.10.12 (main, Nov  4 2025, 08:48:33) [GCC 11.4.0] (64-bit runtime)\nPython platform              : Linux-6.8.0-87-generic-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA GeForce RTX 5090\nGPU 1: NVIDIA GeForce RTX 5090\nGPU 2: NVIDIA GeForce RTX 5090\nGPU 3: NVIDIA GeForce RTX 5090\n\nNvidia driver version        : 570.172.08\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        46 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               112\nOn-line CPU(s) list:                  0-111\nVendor ID:                            GenuineIntel\nModel name:                           Intel(R) Xeon(R) Gold 6330 CPU @ 2.00GHz\nCPU family:                           6\nModel:                                106\nThread(s) per core:                   2\nCore(s) per socket:                   28\nSocket(s):                            2\nStepping:                             6\nCPU max MHz:                          3100.0000\nCPU min MHz:                          800.0000\nBogoMIPS:                             4000.00\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities\nVirtualization:                       VT-x\nL1d cache:                            2.6 MiB (56 instances)\nL1i cache:                            1.8 MiB (56 instances)\nL2 cache:                             70 MiB (56 instances)\nL3 cache:                             84 MiB (2 instances)\nNUMA node(s):                         2\nNUMA node0 CPU(s):                    0-27,56-83\nNUMA node1 CPU(s):                    28-55,84-111\nVulnerability Gather data sampling:   Mitigation; Microcode\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Mitigation; Clear CPU buffers; SMT vulnerable\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affected\nVulnerability Vmscape:                Not affected\n",
    "url": "https://github.com/vllm-project/vllm/issues/29864",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-12-02T10:13:31Z",
    "updated_at": "2025-12-05T17:06:30Z",
    "comments": 2,
    "user": "east612-ai"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12772,
    "title": "How to convert diffusers model to wan2.2 format",
    "body": "I see convert_wan_to_diffusers.py in diffusers repo, but no convert_diffusers_to_wan.py. Do you have plan to upload a convert scripts?\n",
    "url": "https://github.com/huggingface/diffusers/issues/12772",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-02T09:19:29Z",
    "updated_at": "2025-12-02T09:19:29Z",
    "user": "wikiwen"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16034,
    "title": "How to add a new backend?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHi, I've already seen that some backends already supported from [here](https://docs.pytorch.org/executorch/main/backends-overview.html). Is there a convenient way to add a new backend, like [CANN](https://developer.huawei.com/consumer/en/doc/hiai-guides/introduction-0000001051486804) or OpenCL, into executorch? BTW, if executorch will support OpenCL backend in the future?\n",
    "url": "https://github.com/pytorch/executorch/issues/16034",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-02T03:13:18Z",
    "updated_at": "2025-12-02T18:50:18Z",
    "user": "JingliangGao"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12764,
    "title": "When will the img2img pipeline of FLUX.2-dev be released?",
    "body": "I see that the current version(0.36.0-dev) only updated the text-to-image  pipeline for Flux2. We are looking forward to the update of the image-to-image pipeline!\n",
    "url": "https://github.com/huggingface/diffusers/issues/12764",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-01T11:25:35Z",
    "updated_at": "2025-12-01T11:41:56Z",
    "comments": 1,
    "user": "guanxyu"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 1890,
    "title": "Question: how to use sever-side tools provided by Google Gemini or OpenAI GPT?",
    "body": "Gemini has some server-side tools like google_search (https://ai.google.dev/gemini-api/docs/google-search) or google_map. OpenAI also has server-side tools like web_search. Does Smolagents support using such server-side tools from agents? If so, how?",
    "url": "https://github.com/huggingface/smolagents/issues/1890",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-01T05:16:01Z",
    "updated_at": "2025-12-23T10:49:45Z",
    "user": "victorx-deckard"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 623,
    "title": "Message: Submission received, but no valid/matching task IDs were found in the 1 answers provided. Score did not improve previous record, leaderboard not updated.",
    "body": "I am correctly downloading the GAIA 2023 Level 1 validation dataset using snapshot_download and load_dataset. This submission is for Unit 4 Agent Course. \n\n   data_dir = snapshot_download(\n        repo_id=\"gaia-benchmark/GAIA\",\n        repo_type=\"dataset\"\n    )\n    \n  dataset = load_dataset(data_dir, \"2023_level1\", split=\"validation\")\n  subset = dataset.select(range(20))\n  for item in subset:\n        task_id = item.get(\"task_id\")\n        question_text = item.get(\"Question\")\n        file_name = item.get(\"file_name\")\n\nI experience failures when trying to run the first 20 questions i received only 5 task ids are valid.. When I specifically tried to isolate and run the task ID '935e2cff-ae78-4218-b3f5-115589b19dae' using the filtering method, the evaluation system reported. \n\n<img width=\"1388\" height=\"668\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/f4e9fe1b-8608-4ab4-84cc-1b196a601694\" />\n\n 'Submission received, but no valid/matching task IDs were found in the 1 answers provided.' This occurred even though I was confident the answer was correct",
    "url": "https://github.com/huggingface/agents-course/issues/623",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-12-01T02:09:21Z",
    "updated_at": "2025-12-01T02:09:21Z",
    "user": "ShwetaBorole"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1902,
    "title": "Guide: Compiling `tokenizers` on Android/Termux",
    "body": "Hello Hugging Face team and fellow developers,\n\nThis is a guide for anyone trying to install `tokenizers` (or packages that depend on it, like `transformers` or `docling`) on an Android device using [Termux](https://termux.dev/). Currently, there are no other issues mentioning Termux, so hopefully, this guide can help others.\n\n### The Problem\n\nWhen running `pip install tokenizers` in a standard Termux environment, the installation fails during the compilation of a C++ dependency with an error similar to this:\n```\nerror: use of undeclared identifier 'pthread_cond_clockwait'\n```\nThis happens because the build system is targeting an Android API level where this function is not available in the C library headers.\n\n### The Solution\n\nThe solution is to force the compilation from source and pass specific flags to the C++ compiler to set the correct Android API level and link the required libraries.\n\nHere is a step-by-step guide:\n\n#### Step 1: Install Build Dependencies\n\nYou will need the Rust toolchain and other build essentials. You can install them in Termux using `pkg`:\n```bash\npkg update && pkg install rust clang make maturin\n```\n\n#### Step 2: Find Your Android API Level\n\nThe fix requires telling the compiler which Android API level you are using. You can get this number by running the following command in your Termux shell:\n```bash\ngetprop ro.build.version.sdk\n```\nThis will return a number, for example `29`, `30`, `33`, etc. This function (`pthread_cond_clockwait`) was introduced in API level 21, so your device's level should be higher than that.\n\n#### Step 3: Compile and Install `tokenizers`\n\nNow, you can install the package using `pip`. The command below will automatically use the API level from the previous step.\n\n```bash\n# This command automatically gets your API level and uses it to compile tokenizers\nANDROID_API_LEVEL=$(getprop ro.build.version.sdk)\nCXXFLAGS=\"-lpthread -D__ANDROID_API__=${ANDROID_API_LEVEL}\" pip install tokenizers --no-binary :all:\n```\n\nAfter this, `pip install tokenizers` (and packages that depend on it) should succeed.\n\n#### Explanation of the Flags:\n\n*   `CXXFLAGS=\"...\"`: This sets environment variables to pass flags to the C++ compiler.\n*   `-lpthread`: This flag explicitly tells the linker to link against the POSIX threads library.\n*   `-D__ANDROID_API__=${ANDROID_API_LEVEL}`: This is the critical part. It defines a macro that tells the C++ headers to expose functions available for your specific Android version, making `pthread_cond_clockwait` visible to the compiler.\n*   `--no-binary :all:`: This forces `pip` to ignore pre-compiled wheels and build the package from the source code, which is necessary for the flags to be applied.\n\nHope this helps other developers working in the Termux environment!",
    "url": "https://github.com/huggingface/tokenizers/issues/1902",
    "state": "open",
    "labels": [],
    "created_at": "2025-12-01T00:46:42Z",
    "updated_at": "2025-12-01T00:46:42Z",
    "comments": 0,
    "user": "Manamama-Gemini-Cloud-AI-01"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169269,
    "title": "cannot import name 'get_num_sms' from 'torch._inductor.utils'",
    "body": "### \ud83d\udc1b Describe the bug\n\nI'm trying to run [nano-vllm](https://github.com/GeeeekExplorer/nano-vllm), and there is an error:\n```\n File \"/mnt/petrelfs/fengyuan/anaconda3/envs/qwen_copy/lib/python3.12/site-packages/torch/_inductor/kernel/mm_grouped.py\", line 20, in <module>\n    from ..utils import (\nImportError: cannot import name 'get_num_sms' from 'torch._inductor.utils'\n```\nI reviewed the source code of torch-2.5.1, and there is a reference to `get_num_sms` in `mm_grouped.py`, but this function is not defined in `_inductor/utils.py`.\n\nFor some reason, I can't update my torch-2.5.1 to the latest version. How can I fix it without updating? Can I simply copy the `get_num_sms()` and related functions from torch-2.9.1?\n\nBy the way, you can't get the information about CUDA and GPUs in the following texts because I'm running my code in a cluster, but `nvcc -V` shows:\n```\nnvcc: NVIDIA (R) Cuda compiler driver\nCopyright (c) 2005-2023 NVIDIA Corporation\nBuilt on Tue_Feb__7_19:32:13_PST_2023\nCuda compilation tools, release 12.1, V12.1.66\nBuild cuda_12.1.r12.1/compiler.32415258_0\n```\n\nThanks a lot!\n\n### Versions\n\n```\nPyTorch version: 2.5.1\nIs debug build: False\nCUDA used to build PyTorch: 12.1\nROCM used to build PyTorch: N/A\n\nOS: CentOS Linux 7 (Core) (x86_64)\nGCC version: (Anaconda gcc) 11.2.0\nClang version: Could not collect\nCMake version: version 2.8.12.2\nLibc version: glibc-2.32\n\nPython version: 3.12.11 | packaged by Anaconda, Inc. | (main, Jun  5 2025, 13:09:17) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-3.10.0-957.el7.x86_64-x86_64-with-glibc2.32\nIs CUDA available: False\nCUDA runtime version: 12.1.66\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: Could not collect\nNvidia driver version: Could not collect\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:          x86_64\nCPU op-mode(s):        32-bit, 64-bit\nByte Order:            Little Endian\nCPU(s):                256\nOn-line CPU(s) list:   0-255\nThread(s) per core:    2\nCore(s) per socket:    64\nSocket(s):             2\nNUMA node(s):          8\nVendor ID:             AuthenticAMD\nCPU family:            23\nModel:                 49\nModel name:            AMD EPYC 7H12 64-Core Processor\nStepping:              0\nCPU MHz:               2600.000\nCPU max MHz:           2600.0000\nCPU min MHz:           1500.0000\nBogoMIPS:              5200.14\nVirtualization:        AMD-V\nL1d cache:             32K\nL1i cache:             32K\nL2 cache:              512K\nL3 cache:              16384K\nNUMA node0 CPU(s):     0-15,128-143\nNUMA node1 CPU(s):     16-31,144-159\nNUMA node2 CPU(s):     32-47,160-175\nNUMA node3 CPU(s):     48-63,176-191\nNUMA node4 CPU(s):     64-79,192-207\nNUMA node5 CPU(s):     80-95,208-223\nNUMA node6 CPU(s):     96-111,224-239\nNUMA node7 CPU(s):     112-127,240-255\nFlags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc art rep_good nopl xtopology nonstop_tsc extd_apicid aperfmperf eagerfpu pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_l2 cpb cat_l3 cdp_l3 hw_pstate sme retpoline_amd ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif umip overflow_recov succor smca\n\nVersions of relevant libraries:\n[pip3] mkl_fft==1.3.11\n[pip3] mkl_random==1.2.8\n[pip3] mkl-service==2.4.0\n[pip3] numpy==2.2.6\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cufft-cu12==11.3.3.83\n[pip3] nvidia-curand-cu12==10.3.9.90\n[pip3] nvidia-cusolver-cu12==11.7.3.90\n[pip3] nvidia-cusparse-cu12==12.5.8.93\n[pip3] nvidia-cusparselt-cu12==0.7.1\n[pip3] nvidia-nccl-cu12==2.27.5\n[pip3] nvidia-nvjitlink-cu12==12.8.93\n[pip3] nvidia-nvtx-cu12==12.8.90\n[pip3] torch==2.5.1\n[pip3] torchaudio==2.5.1\n[pip3] torchvision==0.20.1\n[pip3] triton==3.1.0\n[conda] blas                      1.0                         mkl    defaults\n[conda] cuda-cudart               12.1.105                      0    nvidia\n[conda] cuda-cupti                12.1.105                      0    nvidia\n[conda] cuda-libraries            12.1.0                        0    nvidia\n[conda] cuda-nvrtc                12.1.105                      0    nvidia\n[conda] cuda-nvtx                 12.1.105                      0    nvidia\n[conda] cuda-opencl            ",
    "url": "https://github.com/pytorch/pytorch/issues/169269",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-30T19:57:48Z",
    "updated_at": "2025-12-02T20:54:05Z",
    "comments": 2,
    "user": "WangHaoZhe"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29747,
    "title": "[Bug]: --scheduling-policy=priority & n>1 crashes engine",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nWhen running with priority scheduling, e.g.:\n```bash\nvllm serve Qwen/Qwen3-0.6B --scheduling-policy=priority\n```\n\nand using `n` > 1 in the request, like:\n```python\nfrom openai import OpenAI\n\nclient = OpenAI(base_url=\"http://localhost:8000/v1\", api_key=\"dummy\")\n\nres = client.chat.completions.create(\n    model=client.models.list().data[0].id,\n    messages=[{\"role\": \"user\", \"content\": \"What is the meaning of life?\"}],\n    n=2\n)\n\nprint(res)\n```\n\nvllm crashes with:\n```python\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844] EngineCore encountered a fatal error.\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844] Traceback (most recent call last):\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]   File \"/home/user/code/debug/.venv/lib/python3.10/site-packages/vllm/v1/engine/core.py\", line 835, in run_engine_core\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]     engine_core.run_busy_loop()\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]   File \"/home/user/code/debug/.venv/lib/python3.10/site-packages/vllm/v1/engine/core.py\", line 860, in run_busy_loop\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]     self._process_input_queue()\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]   File \"/home/user/code/debug/.venv/lib/python3.10/site-packages/vllm/v1/engine/core.py\", line 885, in _process_input_queue\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]     self._handle_client_request(*req)\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]   File \"/home/user/code/debug/.venv/lib/python3.10/site-packages/vllm/v1/engine/core.py\", line 907, in _handle_client_request\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]     self.add_request(req, request_wave)\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]   File \"/home/user/code/debug/.venv/lib/python3.10/site-packages/vllm/v1/engine/core.py\", line 291, in add_request\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]     self.scheduler.add_request(request)\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]   File \"/home/user/code/debug/.venv/lib/python3.10/site-packages/vllm/v1/core/sched/scheduler.py\", line 1242, in add_request\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]     self.waiting.add_request(request)\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]   File \"/home/user/code/debug/.venv/lib/python3.10/site-packages/vllm/v1/core/sched/request_queue.py\", line 150, in add_request\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844]     heapq.heappush(self._heap, (request.priority, request.arrival_time, request))\n(EngineCore_DP0 pid=207394) ERROR 11-30 15:14:29 [core.py:844] TypeError: '<' not supported between instances of 'Request' and 'Request'\n(EngineCore_DP0 pid=207394) Process EngineCore_DP0:\n(APIServer pid=207278) ERROR 11-30 15:14:29 [async_llm.py:525] AsyncLLM output_handler failed.\n(APIServer pid=207278) ERROR 11-30 15:14:29 [async_llm.py:525] Traceback (most recent call last):\n(APIServer pid=207278) ERROR 11-30 15:14:29 [async_llm.py:525]   File \"/home/user/code/debug/.venv/lib/python3.10/site-packages/vllm/v1/engine/async_llm.py\", line 477, in output_handler\n(APIServer pid=207278) ERROR 11-30 15:14:29 [async_llm.py:525]     outputs = await engine_core.get_output_async()\n(APIServer pid=207278) ERROR 11-30 15:14:29 [async_llm.py:525]   File \"/home/user/code/debug/.venv/lib/python3.10/site-packages/vllm/v1/engine/core_client.py\", line 883, in get_output_async\n(APIServer pid=207278) ERROR 11-30 15:14:29 [async_llm.py:525]     raise self._format_exception(outputs) from None\n(APIServer pid=207278) ERROR 11-30 15:14:29 [async_llm.py:525] vllm.v1.engine.exceptions.EngineDeadError: EngineCore encountered an issue. See stack trace (above) for the root cause.\n(EngineCore_DP0 pid=207394) Traceback (most recent call last):\n(EngineCore_DP0 pid=207394)   File \"/usr/lib/python3.10/multiprocessing/process.py\", line 314, in _bootstrap\n(EngineCore_DP0 pid=207394)     self.run()\n(EngineCore_DP0 pid=207394)   File \"/usr/lib/python3.10/multiprocessing/process.py\", line 108, in run\n(EngineCore_DP0 pid=207394)     self._target(*self._args, **self._kwargs)\n(EngineCore_DP0 pid=207394)   File \"/home/user/code/debug/.venv/lib/python3.10/site-packages/vllm/v1/engine/core.py\", line 846, in run_engine_core\n(EngineCore_DP0 pid=207394)     raise e\n(EngineCore_DP0 pid=207394)   File \"/home/user/code/debug/.venv/lib/python3.10/site-packages/vllm/v1/engine/core.py\", line 835, in run_engine_core\n(EngineCore_DP0 pid=207394)     engine_core.run_busy_loop()\n(EngineCore_DP0 pid=207394)   File \"/home/user/code/debug/.venv/lib/python3.10/site-packages/vllm/v1/engine/core.py\", line 860, in",
    "url": "https://github.com/vllm-project/vllm/issues/29747",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-30T13:20:23Z",
    "updated_at": "2025-12-02T22:42:30Z",
    "comments": 3,
    "user": "hibukipanim"
  },
  {
    "repo": "pytorch/executorch",
    "number": 16010,
    "title": "How to run add operator in executorch ?",
    "body": "The result of the following code is \"Segmentation fault: 11\" ...\n\n```\nusing executorch::aten::ScalarType;\nusing executorch::aten::Tensor;\nusing executorch::aten::TensorImpl;\n\nint main() {\n\texecutorch::runtime::runtime_init();\n\t// Create our input tensor.\n\tfloat data[14465 * 3] = { 1 };\n\tTensorImpl::SizesType sizes[] = { 14465, 3 };\n\tTensorImpl impl(\n\t    ScalarType::Float, // dtype\n\t    2, // number of dimensions\n\t    sizes,\n\t    data);\n\tTensor input_tensor(&impl);\n\tTensor output_tensor(&impl);\n\ttorch::executor::KernelRuntimeContext context_;\n\ttorch::executor::native::add_out(context_, input_tensor, input_tensor, 1.0, output_tensor);\n\t\n\treturn 0;\n}\n```\n\ncc @larryliu0820 @JacobSzwejbka @lucylq",
    "url": "https://github.com/pytorch/executorch/issues/16010",
    "state": "open",
    "labels": [
      "module: runtime"
    ],
    "created_at": "2025-11-30T10:49:22Z",
    "updated_at": "2025-12-01T17:50:32Z",
    "user": "rscguo"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29735,
    "title": "[Usage]:Accessing free_blocks count from LLMEngine or LLM ?",
    "body": "### Your current environment\n\n```text\nNone\n```\n\n### How would you like to use vllm\n\nI'm doing research on key-value caching optimization. I want to know how to determine the number of free blocks during runtime. I tried manually creating the engine, but I couldn't find the method after searching through the code.\nAI keeps providing methods that have already been abandoned.\nI would be very grateful for any help, as this has been puzzling me for hours.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29735",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-29T19:21:50Z",
    "updated_at": "2025-12-05T14:01:42Z",
    "comments": 4,
    "user": "H-T-H"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29722,
    "title": "[RFC]: Add Balance Scheduling",
    "body": "### Motivation.\n\n**Limitations of the current vLLM v1 scheduling strategy**\nvLLM v1 scheduling currently enables chunkedprefill by default, which processes prefill and decode requests simultaneously in a single scheduling session. This can impact the overall system throughput and performance in some scenarios.\n\nBalance scheduling addresses this issue by synchronizing the number of running queues across all schedulers to delay the scheduling of new requests, thereby improving the overall system's steady-state decoding time. This achieves:\n\u2705Adding `balance_gather` to the scheduler synchronizes the number of requests in the running queues between DPs.\n\u2705Balance scheduling improves the decode steady-state time, thereby increasing the overall output throughput of the inference system.\n\n\n### Proposed Change.\n\n **1.Feature Overview**\n\nIn the vLLM scheduler, running requests (i.e., requests that are already undergoing pre-filled computation) have the highest priority, followed by waiting requests (i.e., requests that have not yet been computed).\n\n\nAs shown in the diagram above, when the entire inference system exits from a steady state, the scheduler will schedule a batch of new requests for prefill operations and then synchronize them among the dynamic programming (DP) models. This can cause some DP models that are entirely decoded to synchronize with the number of prefilled tokens. Frequent prefill scheduling by certain DP models can lead to a deterioration in the overall system output throughput.\n\nBalance scheduling synchronizes the number of running queue requests across different DPs, and only schedules new requests for prefilling when at least every scheduler has fewer than max_nun_requst.\n\n **2.Implementation Design**\n\n **3.Experiment Results**\n- Fixed-length input scenario: In the performance test scenario with 3.5K fixed-length input and 1.5K fixed-length output, the throughput performance was improved by approximately **18%** after adding balance scheduling.\n\n|  Method   | Model  | Input Len | Request Count | Output Len | BatchSize | Average TTFT | Average TPOT | e2e duration | Input Token Throughput | Output Token Throughput | Request Throughput\n|  ----  | ----  |  ----  | ----  |  ----  | ----  |  ----  | ----  |  ----  | ----  |  ----  | ----  |\n| Baseline  | DeepSeekV3.1 | 3500  | 512 | 1500  | 128 | 6600 | 86.85 | 591.9s  | 3030.5 | 1297.3  | 0.86 |\n| Balance scheduling  | DeepSeekV3.1 | 3500  | 512 | 1500 | 128 | 7012  | 70.63 | 501.7s | 3575.7  | 1530.7 | 1.02 |\n\n**4.Demo PR**\n\n[#29721 ](https://github.com/vllm-project/vllm/pull/29721)\n\n\n### Feedback Period.\n\nNo response\n\n### CC List.\n\nNo response\n\n### Any Other Things.\n\nNo response\n\n### Before submitting a new issue...\n\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29722",
    "state": "open",
    "labels": [
      "RFC"
    ],
    "created_at": "2025-11-29T09:28:43Z",
    "updated_at": "2025-12-02T08:23:33Z",
    "comments": 0,
    "user": "GDzhu01"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29707,
    "title": "[Usage]: Workaround to run model on GPUs with Compute Capability < 8.0?",
    "body": "### Your current environment\n\nProblem:\nI am unable to run the Qwen3-VL-32B-Instruct-AWQ-4bit model due to a CUDA compute capability requirement. My hardware consists of two NVIDIA QUADRO RTX 5000 cards (16GB each, 32GB total) with a compute capability of 7.5. The software framework (likely a recent version of PyTorch or a specific library) raises an error:\n\n\"GPUs with compute capability < 8.0 are not supported.\"\n\nQuestion:\nAre there any workarounds to run this model on my older QUADRO RTX 5000 GPUs? Thanks in advance.\n\n\n```\n vllm collect-env\nINFO 11-29 20:49:15 [__init__.py:216] Automatically detected platform cuda.\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.3 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : version 3.30.3\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.11 | packaged by Anaconda, Inc. | (main, Jun  5 2025, 13:09:17) [GCC 11.2.0] (64-bit runtime)\nPython platform              : Linux-6.14.0-27-generic-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.0.140\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration :\nGPU 0: Quadro RTX 5000\nGPU 1: Quadro RTX 5000\n\nNvidia driver version        : 580.65.06\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        46 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               20\nOn-line CPU(s) list:                  0-19\nVendor ID:                            GenuineIntel\nModel name:                           Intel(R) Core(TM) i9-10900X CPU @ 3.70GHz\nCPU family:                           6\nModel:                                85\nThread(s) per core:                   2\nCore(s) per socket:                   10\nSocket(s):                            1\nStepping:                             7\nCPU(s) scaling MHz:                   28%\nCPU max MHz:                          4700.0000\nCPU min MHz:                          1200.0000\nBogoMIPS:                             7399.70\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 ssbd mba ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512_vnni md_clear flush_l1d arch_capabilities\nL1d cache:                            320 KiB (10 instances)\nL1i cache:                            320 KiB (10 instances)\nL2 cache:                             10 MiB (10 instances)\nL3 cache:                             19.3 MiB (1 instance)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-19\nVulnerability Gather data sampling:   Vulnerable\nVulnerability Ghostwrite:             Not affected\nVulnerability Itlb multihit:          KVM: Mitigation: VMX unsupported\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Mitigation; Clear CPU buffers; SMT vulnerable\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Mitigation; Enhanced IBRS\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Aut",
    "url": "https://github.com/vllm-project/vllm/issues/29707",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-29T00:47:39Z",
    "updated_at": "2025-11-30T06:04:29Z",
    "comments": 5,
    "user": "seasoncool"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 2091,
    "title": "question of `_op_sac_save_list` for op-sac",
    "body": "Hi, I have a noob question, is there any particular reason we dont put `torch.ops.aten._scaled_dot_product_cudnn_attention.default` (and maybe some other SDPA variants) into `_op_sac_save_list` to avoid recompute? ",
    "url": "https://github.com/pytorch/torchtitan/issues/2091",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-28T23:29:02Z",
    "updated_at": "2025-12-02T20:52:33Z",
    "comments": 4,
    "user": "rakkit"
  },
  {
    "repo": "pytorch/FBGEMM",
    "number": 5176,
    "title": "How to apply gradient clip in fused optimizer?",
    "body": "I noticed that my embedding bag parameters exploded. Is there a way I could apply gradient clip. \nI'm using `EmbOptimType.EXACT_ROWWISE_ADAGRAD`\n\nHere is the code\n\n\n```\n    sharder_with_optim_params = EmbeddingBagCollectionSharder(\n        fused_params={\n            'optimizer': EmbOptimType.EXACT_ROWWISE_ADAGRAD,\n            'learning_rate': 0.01,\n            'eps': 1e-8,\n        },\n    )\n```",
    "url": "https://github.com/pytorch/FBGEMM/issues/5176",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-28T16:07:57Z",
    "updated_at": "2025-11-28T16:07:57Z",
    "user": "acmilannesta"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29679,
    "title": "[Usage]: Get request total time",
    "body": "### Your current environment\n\n```text\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version                : Could not collect\nCMake version                : version 3.28.0\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.10.19 | packaged by conda-forge | (main, Oct 22 2025, 22:29:10) [GCC 14.3.0] (64-bit runtime)\nPython platform              : Linux-6.8.0-1030-azure-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : Could not collect\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : GPU 0: NVIDIA H100 NVL\nNvidia driver version        : 535.247.01\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.10.2\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        48 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               40\nOn-line CPU(s) list:                  0-39\nVendor ID:                            AuthenticAMD\nModel name:                           AMD EPYC 9V84 96-Core Processor\nCPU family:                           25\nModel:                                17\nThread(s) per core:                   1\nCore(s) per socket:                   40\nSocket(s):                            1\nStepping:                             1\nBogoMIPS:                             4800.05\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves user_shstk avx512_bf16 clzero xsaveerptr rdpru arat avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm\nHypervisor vendor:                    Microsoft\nVirtualization type:                  full\nL1d cache:                            1.3 MiB (40 instances)\nL1i cache:                            1.3 MiB (40 instances)\nL2 cache:                             40 MiB (40 instances)\nL3 cache:                             160 MiB (5 instances)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-39\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Vulnerable: Safe RET, no microcode\nVulnerability Spec store bypass:      Vulnerable\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Retpolines; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affected\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-python==0.5.2\n[pip3] numpy==1.26.4\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n",
    "url": "https://github.com/vllm-project/vllm/issues/29679",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-28T14:03:16Z",
    "updated_at": "2025-12-01T09:34:12Z",
    "comments": 5,
    "user": "chwundermsft"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2543,
    "title": "Different finetune loss given policy.type=pi0 / policy.path=lerobot/pi0_base. What is the difference?",
    "body": "Hi, I have two different configurations:\n1. `\t--dataset.repo_id=BBBBBBob/libero_goal_lerobot \\\n\t--dataset.root=/home/j84403411/data/libero/libero_goal_lerobot \\\n\t--policy.path=lerobot/pi0_base \\\n\t--policy.push_to_hub=false \\\n\t--policy.use_proprio=true \\\n\t--output_dir=/home/j84403411/checkpoint/libero/pi0/libero_goal_proprio \\\n       --policy.dtype=bfloat16 \\\n       --steps=40_000 \\\n       --batch_size=16 \\\n       --rename_map='{\"observation.images.image\":\"observation.images.base_0_rgb\",  \"observation.images.wrist_image\":\"observation.images.left_wrist_0_rgb\"}' \\ `\nand\n2.\n `\t--dataset.repo_id=BBBBBBob/libero_goal_lerobot \\\n\t--dataset.root=/home/j84403411/data/libero/libero_goal_lerobot \\\n\t--policy.type=pi0 \\\n        --policy.pretrained_path=lerobot/pi0_base \\\n\t--policy.push_to_hub=false \\\n\t--policy.use_proprio=true \\\n\t--output_dir=/home/j84403411/checkpoint/libero/pi0/libero_goal_proprio \\\n       --policy.dtype=bfloat16 \\\n       --steps=40_000 \\\n       --batch_size=16 \\\n       --policy.input_features='{\"observation.state\": {\"type\": \"STATE\", \"shape\": [8]},\n\t\t\"observation.images.wrist_image\": {\"type\": \"VISUAL\", \"shape\": [3, 256, 256]},\n\t \t\"observation.images.image\": {\"type\": \"VISUAL\", \"shape\": [3, 256, 256]},\n\t\t}' \\\n       --policy.output_features='{\"action\": {\"type\": \"ACTION\", \"shape\": [7]}}' \\ `\n\n\nThe loss trained from the second configuration is 10 times higher than the first one. What caused the difference? Do you know if different checkpoints are loaded in this case? I appreciate your help! ",
    "url": "https://github.com/huggingface/lerobot/issues/2543",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-28T12:34:38Z",
    "updated_at": "2025-12-01T11:25:17Z",
    "user": "BBBBBBob"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1467,
    "title": "Missing the following inputs: input_points, input_labels (or input_boxes)",
    "body": "### Question\n\nthanks for your excellent works!\n\nI just write test code for SlimSAM model powered by transformers.js  referring to this example(with some improvements): https://github.com/huggingface/transformers.js-examples/blob/main/segment-anything-webgpu/index.js\n\nmy code for `decode` method:\n```js\n// Decode segmentation\nasync function decode() {\n  if (!imageEmbeddings || isDecoding || isEncoding) return;\n\n  if (isDecoding) {\n    decodePending = true;\n    return;\n  }\n  isDecoding = true;\n\n  try {\n    let input_points = null;\n    let input_labels = null;\n    let input_boxes = null;\n    let  outputs = null;\n    \n    if (promptMode == \"point\" && points.length > 0) {\n      const reshaped = imageprocessed.reshaped_input_sizes[0]; // [H, W]\n      const scaledPoints = points.map(p => [\n        p.x * reshaped[1],\n        p.y * reshaped[0]\n      ]);\n      const labels = points.map(p => BigInt(p.label));\n\n      input_points = new Tensor(\"float32\", scaledPoints.flat(), [1, 1, points.length, 2]);\n      input_labels = new Tensor(\"int64\", labels, [1, 1, points.length]);\n\n      // Fallback: if no prompts, skip\n      if (!input_points) return;\n\n      // Run model with point mode\n      outputs = await model({\n        ...imageEmbeddings,\n        input_points: input_points,\n        input_labels: input_labels,\n        input_boxes: null\n      });\n    }\n\n    if (promptMode == \"box\" && box) {\n      const reshaped = imageprocessed.reshaped_input_sizes[0];\n      const [x1, y1, x2, y2] = [\n        box.x1 * reshaped[1],\n        box.y1 * reshaped[0],\n        box.x2 * reshaped[1],\n        box.y2 * reshaped[0]\n      ];\n      input_boxes = new Tensor(\"float32\", [x1, y1, x2, y2], [1, 1, 4]);\n\n      // Fallback: if no prompts, skip\n      if (!input_boxes) return;\n\n      // Run model with box mode\n      outputs = await model({\n        ...imageEmbeddings,\n        input_points: null,\n        input_labels: null,\n        input_boxes: input_boxes\n      });\n    }\n\n    // Post-process\n    const masks = await processor.post_process_masks(\n      outputs.pred_masks,\n      imageprocessed.original_sizes,\n      imageprocessed.reshaped_input_sizes\n    );\n\n    const scores = outputs.iou_scores.data;\n    updateMask(masks[0], scores); // masks[0] is [3, H, W]\n\n  } catch (e) {\n    console.error(\"Decode error:\", e);\n    statusEl.textContent = \"\u274c Segmentation failed.\";\n  } finally {\n    isDecoding = false;\n    if (decodePending) {\n      decodePending = false;\n      decode();\n    }\n  }\n}\n```\nit supports 2 prompt modes: `point` &` box` which selected by users on UI elements (html not provided).\nbut error printed every time when running `decode` method (at the line of calling  `outputs = await model(...)`), the error message is:\n\nwith box prompt mode:\n`Error: An error occurred during model execution: \"Missing the following inputs: input_points, input_labels.`\n\nwith point prompt mode:\n`Error: An error occurred during model execution: \"Missing the following inputs: input_boxes.`\n\n\nShould I pass all three parameters(input_points/input_labels/input_boxes) simultaneously, regardless of which prompt mode I\u2019m using?  How could I support point & box at the same time, since no demo codes found on internet. thanks!\n\n```\nversion: transformers.js 3.5.0 from https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.5.0\nos: Windows 10\nchorme: 142\nmodel: Xenova/slimsam-77-uniform\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/1467",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-11-28T10:01:04Z",
    "updated_at": "2025-12-01T04:04:59Z",
    "user": "sherlockchou86"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29643,
    "title": "[Usage]: Enabling Tool call in the Python SDK",
    "body": "### Your current environment\n\nHi Team,\n\nI am currently exploring VLLM to enable tool calling, and I need some support with this. It would be very helpful if you could provide the corresponding Python code.\n\nWhat I\u2019m trying to achieve is to configure the Python package with the same settings that I use when starting the VLLM server. The configuration I\u2019m using is:\n\nvllm serve DeepSeek-R1-0528-Qwen3-8B \\\n  --served-model-name deepseek \\\n  --gpu_memory_utilization 0.5 \\\n  --max_num_seqs 20 \\\n  --max_model_len 10000 \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser deepseek_v3 \\\n  --chat-template tool_chat_template_deepseekr1.jinja \\\n  --port 5050 \\\n  --max_num_batched_tokens 5000\n\nI need to replicate this exact configuration in Python.\n\nYour support would be greatly appreciated. Please respond at your earliest convenience.\n\nIf you want, I can also write the **Python code equivalent** for these VLLM configurations.\n\nBest Regards\nMadan \n\n\n### How would you like to use vllm\n\n\n\nI want to use vLLM to serve a model with tool-calling support enabled. Specifically, I need to run the model with the same configuration parameters that I currently use when launching the vLLM server from the command line. These settings include GPU memory utilization, maximum sequence limits, tool-calling options, a custom tool-call parser, and a custom chat template.\n\nMy goal is to reproduce the following server configuration within a Python environment using the vLLM Python API:\n\nvllm serve DeepSeek-R1-0528-Qwen3-8B \\\n  --served-model-name deepseek \\\n  --gpu_memory_utilization 0.5 \\\n  --max_num_seqs 20 \\\n  --max_model_len 10000 \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser deepseek_v3 \\\n  --chat-template tool_chat_template_deepseekr1.jinja \\\n  --port 5050 \\\n  --max_num_batched_tokens 5000\n`\n\nIn short, I need Python code that sets these exact configurations so I can run vLLM programmatically with tool calling enabled.\n\nIf you want, I can also provide the **Python code equivalent** for this configuration.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29643",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-28T04:39:47Z",
    "updated_at": "2025-12-01T14:54:47Z",
    "comments": 2,
    "user": "Madan1215"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29641,
    "title": "[Bug]: Max Tokens not being honoured in Chat Completions for GPTOSS model",
    "body": "### Your current environment\n\nIt seems that in the latest version of vllm 0.11+ Chat Completions has stopped honouring `max_tokens` with GPTOSS 120B model, the below request payload has stopped working with `max_tokens` earlier the same payload would provide an output to the limit of the `max_tokens` provided.. \n\nInterestingly if you look at the `usage` tokens, it's showing `completion_tokens` as 500 but the output is BLANK.\n\n```json\n{\n    \"messages\": [\n        {\n            \"role\": \"user\",\n            \"content\": \"What is the role of AI in medicine?\"\n        }\n    ],\n    \"model\": \"openai/gpt-oss-120b\",\n    \"max_tokens\": 500,\n    \"reasoning\": {\"effort\": \"low\"},\n    \"stream\": false\n}\n```\n\ngetting BLANK output, even though the `usage` is showing token counts created is matching max_tokens \n\n```json\n{\n    \"id\": \"chatcmpl-c71e934ac0b74bd4b8f99fe9b5516ea3\",\n    \"object\": \"chat.completion\",\n    \"created\": 1764300020,\n    \"model\": \"openai/gpt-oss-120b\",\n    \"choices\": [\n        {\n            \"index\": 0,\n            \"message\": {\n                \"role\": \"assistant\",\n                \"content\": null,\n                \"refusal\": null,\n                \"annotations\": null,\n                \"audio\": null,\n                \"function_call\": null,\n                \"tool_calls\": [],\n                \"reasoning\": \"Need to answer.\",\n                \"reasoning_content\": \"Need to answer.\"\n            },\n            \"logprobs\": null,\n            \"finish_reason\": \"length\",\n            \"stop_reason\": null,\n            \"token_ids\": null\n        }\n    ],\n    \"service_tier\": null,\n    \"system_fingerprint\": null,\n    \"usage\": {\n        \"prompt_tokens\": 78,\n        \"total_tokens\": 578,\n        \"completion_tokens\": 500,\n        \"prompt_tokens_details\": null\n    },\n    \"prompt_logprobs\": null,\n    \"prompt_token_ids\": null,\n    \"kv_transfer_params\": null\n}\n```\n\nWhen you remove the `max_tokens`, we get the output which shows `usage_token` to have `completion_tokens` to be around 1600 tokens..\nIt seems that starting from vllm 0.11+ version, the auto-truncation using the `max_tokens` has stopped working\n\n```json\n{\n    \"id\": \"chatcmpl-61b60144d43147e2b007158712ad4920\",\n    \"object\": \"chat.completion\",\n    \"created\": 1764300423,\n    \"model\": \"openai/gpt-oss-120b\",\n    \"choices\": [\n        {\n            \"index\": 0,\n            \"message\": {\n                \"role\": \"assistant\",\n                \"content\": \"**The role of AI in medicine is expanding rapidly and touches virtually every aspect of healthcare\u2014from the way doctors diagnose patients to how hospitals run their operations.** Below is a structured overview that covers the major domains, concrete examples, benefits, challenges, and future directions.\\n\\n---\\n\\n## 1. Clinical Care\\n\\n| Sub\u2011area | What AI Does | Real\u2011World Examples | Benefits |\\n|----------|--------------|---------------------|----------|\\n| **Diagnostics** | Image analysis, pattern recognition, risk stratification | \u2022 Radiology: Google\u202fDeepMind\u2019s AI detects lung cancer on CT scans with >95% accuracy.<br>\u2022 Dermatology: FDA\u2011cleared apps (e.g., SkinVision) classify skin lesions from photos.<br>\u2022 Pathology: Paige.ai assists in detecting prostate cancer in biopsy slides. | Faster, more consistent readings; can catch subtle findings that human eyes miss. |\\n| **Predictive Analytics** | Forecast disease onset, complications, readmission risk | \u2022 Sepsis prediction models (e.g., Epic Sepsis Model) trigger alerts hours before clinical signs.<br>\u2022 Cardiovascular risk calculators incorporating genomics and wearables. | Enables proactive interventions, reduces morbidity and cost. |\\n| **Treatment Planning** | Decision support, dose optimisation, drug selection | \u2022 IBM Watson for Oncology (clinical trial matching).<br>\u2022 Radiation oncology: AI\u2011driven dose\u2011painting to spare healthy tissue.<br>\u2022 Pharmacogenomics: AI predicts drug\u2011gene interactions. | Personalises therapy, improves outcomes, reduces adverse events. |\\n| **Robotics & Minimally Invasive Surgery** | Real\u2011time image guidance, autonomous suturing, task automation | \u2022 Da Vinci Surgical System (augmented with AI for instrument tracking).<br>\u2022 VERDICT AI for autonomous suturing in animal models. | Increases precision, reduces surgeon fatigue, shortens recovery. |\\n\\n---\\n\\n## 2. Patient\u2011Facing Applications\\n\\n| Application | Description | Example |\\n|-------------|-------------|---------|\\n| **Virtual Assistants & Chatbots** | Symptom triage, medication reminders, mental\u2011health chat | \u2022 Babylon Health (AI\u2011driven triage).<br>\u2022 Woebot (CBT\u2011based mental\u2011health chatbot). |\\n| **Telemedicine Enhancements** | Real\u2011time vitals extraction from video, automated note\u2011taking | \u2022 KardiaMobile ECG integration with AI\u2011based arrhythmia detection. |\\n| **Wearables & Remote Monitoring** | Continuous data streams analysed for early alerts | \u2022 Apple Watch ECG + AI arrhythmia detection; Fitbit heart\u2011rate trend alerts. |\\n\\n---\\n\\n## 3. Operational & Administrative Efficiency\\n\\n| Domain | AI Functions | Example |",
    "url": "https://github.com/vllm-project/vllm/issues/29641",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-28T03:39:34Z",
    "updated_at": "2025-12-21T02:39:32Z",
    "comments": 16,
    "user": "soodrohit"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42464,
    "title": "Add SAM 3D Objects Encoder",
    "body": "### Model description\n\n## Model Description\n\nSAM 3D Objects is Meta AI's foundation model for 3D object reconstruction from single images. I'm proposing to add the **encoder component** (DINOv2-based Vision Transformer) to Transformers.\n\n**Scope**: Encoder only, not the full 3D generation pipeline (which includes Gaussian Splatting/Mesh decoders better suited for Diffusers).\n\n## Open source status\n\n- [x] The model implementation available\n- [x] The model weights are available\n\n## Provide useful links for the implementation\n\n- **Model Card**: https://huggingface.co/facebook/sam-3d-objects\n- **Paper**: https://arxiv.org/abs/2511.16624\n- **Original Repository**: https://github.com/facebookresearch/sam-3d-objects\n- **Blog Post**: https://ai.meta.com/blog/sam-3d/\n\n## Implementation Progress\n\nI have already implemented this model and it's ready for review:\n\n\u2705 **Implementation Complete:**\n- `Sam3DObjectsEncoderConfig` - Configuration with DINO variant support\n- `Sam3DObjectsEncoder` - Main encoder model\n- `Sam3DObjectsEncoderForMasks` - Variant for mask encoding\n- `Sam3DObjectsImageProcessor` - Image preprocessing\n- Comprehensive test suite: **28/28 tests passing**\n- Full documentation\n\n**Test Results:**\ncollected 29 items\n28 passed, 1 skipped in 4.92s\n\n**Example Usage:**\n```python\nfrom transformers.models.sam3d_objects import (\n    Sam3DObjectsEncoder,\n    Sam3DObjectsEncoderConfig,\n    Sam3DObjectsImageProcessor,\n)\n\nconfig = Sam3DObjectsEncoderConfig.from_dino_config(\"dinov2_vitl14\")\nmodel = Sam3DObjectsEncoder(config)\nprocessor = Sam3DObjectsImageProcessor()\n\ninputs = processor(images=image, return_tensors=\"pt\")\noutputs = model(**inputs)\nembeddings = outputs.last_hidden_state\n```\n\n## Questions\n\n1. Is there interest in adding the SAM 3D Objects Encoder to Transformers?\n2. Should this be limited to the encoder component (my recommendation)?\n3. Should I submit a PR, or are there any requirements I should address first?\n\n## Additional Context\n\n- The encoder is based on DINOv2 and fits naturally in Transformers\n- Full 3D generation pipeline would be better suited for Diffusers\n- Model is gated on Hub (requires license acceptance)\n- Implementation follows Transformers patterns and guidelines\n\nI'm ready to submit a PR and address any feedback.\n\n### Open source status\n\n- [x] The model implementation is available\n- [x] The model weights are available\n\n### Provide useful links for the implementation\n\n## Links\n\n- **Model Card**: https://huggingface.co/facebook/sam-3d-objects\n- **Paper**: https://arxiv.org/abs/2511.16624 (SAM 3D: 3Dfy Anything in Images)\n- **Original Repository**: https://github.com/facebookresearch/sam-3d-objects\n- **Blog Post**: https://ai.meta.com/blog/sam-3d/\n- **Project Page**: https://ai.meta.com/sam3d/\n\n## Authors\n\n**SAM 3D Team** from Meta AI\n\nFor the complete author list and contributions, see:\n- [ArXiv Paper](https://arxiv.org/abs/2511.16624)\n- [Original Repository](https://github.com/facebookresearch/sam-3d-objects)\n\n*Note: This is a large collaborative project with many contributors from Meta Superintelligence Labs.*\n\n## Implementation Details\n\n**Model Type**: Vision Encoder (DINOv2-based)  \n**Architecture**: Vision Transformer (ViT)  \n**Variants Supported**: \n- ViT-S/14 (384 dim)\n- ViT-B/14 (768 dim)\n- ViT-L/14 (1024 dim)\n- ViT-G/14 (1536 dim)\n\n**Input**: RGB images (224x224 or 518x518)  \n**Output**: Visual embeddings for 3D generation tasks\n\n**License**: SAM License (gated model on HuggingFace Hub)",
    "url": "https://github.com/huggingface/transformers/issues/42464",
    "state": "open",
    "labels": [
      "New model"
    ],
    "created_at": "2025-11-27T19:48:28Z",
    "updated_at": "2025-12-05T10:32:33Z",
    "comments": 1,
    "user": "Aznix07"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169175,
    "title": "Regarding this issue, how can I upgrade or replace the cuDNN version built into my current PyTorch installation?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nSignificant Memory Regression in F.conv3d with bfloat16 Inputs in PyTorch 2.9.0 (#166643) This release provides work around this issue. If you are impacted please install nvidia-cudnn package version 9.15+ from pypi. (#166480) (#167111) .\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/169175",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-27T09:32:00Z",
    "updated_at": "2025-11-27T20:19:07Z",
    "comments": 2,
    "user": "saberrroool"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169174,
    "title": "Does torch.masked_select preserve the original order of the selected elements?",
    "body": "There is the following issue on this page: https://docs.pytorch.org/docs/stable/generated/torch.masked_select.html\n\nDoes torch.masked_select preserve the original order of the selected elements?\n\n`mask = torch.from_numpy(np.random.uniform(0, 1, 1234567) > 0.5)\n    idx = torch.arange(len(mask))\n    select = idx.masked_select(mask)\n    assert (select == torch.sort(select)[0]).all()`",
    "url": "https://github.com/pytorch/pytorch/issues/169174",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-27T09:26:45Z",
    "updated_at": "2025-11-30T12:12:18Z",
    "comments": 0,
    "user": "wanglin03"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29584,
    "title": "[Usage]: Can KV Cache be disabled in non-autoregressive generation tasks?",
    "body": "### Your current environment\n\n```text\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.3 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : version 3.28.3\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.10.15 (main, Oct  3 2024, 07:27:34) [GCC 11.2.0] (64-bit runtime)\nPython platform              : Linux-6.8.0-87-generic-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : Could not collect\nCUDA_MODULE_LOADING set to   :\nGPU models and configuration :\nGPU 0: NVIDIA GeForce RTX 3090\nGPU 1: NVIDIA GeForce RTX 3090\n\nNvidia driver version        : 575.57.08\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n         vLLM Info\n==============================\nROCM Version                 : Could not collect\nvLLM Version                 : 0.11.2\nvLLM Build Flags:\n  CUDA Archs: Not Set; ROCm: Disabled\nGPU Topology:\n        GPU0    GPU1    CPU Affinity    NUMA Affinity   GPU NUMA ID\nGPU0     X      SYS     0-23,48-71      0               N/A\nGPU1    SYS      X      24-47,72-95     1               N/A\n\nLegend:\n\n  X    = Self\n  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)\n  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node\n  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)\n  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)\n  PIX  = Connection traversing at most a single PCIe bridge\n  NV#  = Connection traversing a bonded set of # NVLinks\n```\n\n### How would you like to use vllm\n\nHello vLLM team,\n\nCurrently, vLLM (v0.11.2) enables KV cache for certain LLM-based pooling and reranking models, such as the Qwen3-Embedding series, even when `--no-enable-chunked-prefill` and `--no-enable-prefix-caching` are set. This leads to unnecessary GPU memory usage.\n\nWould it be possible to disable KV cache for pooling and reranking models under these conditions?\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29584",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-27T05:30:08Z",
    "updated_at": "2025-12-05T02:40:28Z",
    "comments": 5,
    "user": "GitEventhandler"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29574,
    "title": "[Performance]: Using vLLM to accelerate VLM models, does the vision encoding part currently support parallel processing, or is it still being processed serially?",
    "body": "### Proposal to improve performance\n\nI found that currently, images of different sizes are processed sequentially, which significantly slows down the processing speed. How can we adapt to parallel processing? Should we resize or pad all images to the same size for batch processing, or can we run multiple encoder models in parallel? Thank you.\n\n### Report of performance regression\n\n_No response_\n\n### Misc discussion on performance\n\n_No response_\n\n### Your current environment (if you think it is necessary)\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29574",
    "state": "open",
    "labels": [
      "performance"
    ],
    "created_at": "2025-11-27T03:51:36Z",
    "updated_at": "2025-11-27T10:54:09Z",
    "comments": 2,
    "user": "NewZxy"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169160,
    "title": "Is there any way to make pinned CPU tensors released back to the OS immediately",
    "body": "### \ud83d\udc1b Describe the bug\n\nThe pinned CPU tensors can't be released back to the OS immediately.\n\n```python\nimport torch\nimport gc\nimport ctypes\nimport psutil\nimport os\n\ndef get_memory_usage():\n    \"\"\"Return current process RSS memory usage in MB.\"\"\"\n    process = psutil.Process(os.getpid())\n    return process.memory_info().rss / (1024 * 1024)\n\ndef trim_memory():\n    \"\"\"Attempt to release unused memory back to the OS using malloc_trim.\"\"\"\n    libc = ctypes.CDLL(\"libc.so.6\")\n    libc.malloc_trim(0)\n\n# Initial memory usage\nprint(f\"[Before allocation] Memory usage: {get_memory_usage():.2f} MB\")\n\n# Allocate 1 GiB of pinned memory on CPU\nx = torch.empty(1024 * 1024 * 1024, dtype=torch.uint8, device=\"cpu\", pin_memory=True)\nprint(f\"[After allocation] Memory usage: {get_memory_usage():.2f} MB\")\n\n# Delete the tensor\ndel x\n\n# Run garbage collection\ngc.collect()\n\n# Try to trim memory\ntrim_memory()\n\nprint(f\"[After del + gc + malloc_trim] Memory usage: {get_memory_usage():.2f} MB\")\n\n```\n\n### Versions\n\nPyTorch version: 2.7.0a0+7c8ec84dab.nv25.03\nIs debug build: False\nCUDA used to build PyTorch: 12.8\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.1 LTS (x86_64)\nGCC version: (Ubuntu 11.5.0-1ubuntu1~24.04) 11.5.0\nClang version: Could not collect\nCMake version: version 3.31.6\nLibc version: glibc-2.39\n\nPython version: 3.12.3 (main, Feb  4 2025, 14:48:35) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-5.10.134-008.18.kangaroo.al8.x86_64-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: 12.8.93\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: \nGPU 0: NVIDIA H20\nGPU 1: NVIDIA H20\nGPU 2: NVIDIA H20\nGPU 3: NVIDIA H20\nGPU 4: NVIDIA H20\nGPU 5: NVIDIA H20\nGPU 6: NVIDIA H20\nGPU 7: NVIDIA H20\n\nNvidia driver version: 550.54.15\ncuDNN version: Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.8.0\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nAddress sizes:                   52 bits physical, 57 bits virtual\nByte Order:                      Little Endian\nCPU(s):                          160\nOn-line CPU(s) list:             0-159\nVendor ID:                       GenuineIntel\nModel name:                      Intel(R) Xeon(R) Processor\nCPU family:                      6\nModel:                           143\nThread(s) per core:              1\nCore(s) per socket:              160\nSocket(s):                       1\nStepping:                        8\nBogoMIPS:                        5200.00\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd avx512vbmi umip pku waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid cldemote movdiri movdir64b fsrm md_clear serialize tsxldtrk amx_bf16 avx512_fp16 amx_tile amx_int8 arch_capabilities\nHypervisor vendor:               KVM\nVirtualization type:             full\nL1d cache:                       3.8 MiB (80 instances)\nL1i cache:                       2.5 MiB (80 instances)\nL2 cache:                        160 MiB (80 instances)\nL3 cache:                        195 MiB (2 instances)\nNUMA node(s):                    2\nNUMA node0 CPU(s):               0-79\nNUMA node1 CPU(s):               80-159\nVulnerability Itlb multihit:     Not affected\nVulnerability L1tf:              Not affected\nVulnerability Mds:               Not affected\nVulnerability Meltdown:          Not affected\nVulnerability Mmio stale data:   Not affected\nVulnerability Retbleed:          Not affected\nVulnerability Spec store bypass: Vulnerable\nVulnerability Spectre v1:        Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers\nVulnerability Spectre v2:        Vulnerable, IBPB: disabled, STIBP: disabled, PBRSB-eIBRS: Vulnerable\nVulnerability Srbds:             Not affected\nVulnerability Tsx async abort:   Not affected\n\nVersions of relevant libraries:\n[pip3] intel-openmp==2021.4.0\n[pip3] mkl==2021.1.",
    "url": "https://github.com/pytorch/pytorch/issues/169160",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-27T03:19:54Z",
    "updated_at": "2025-11-27T20:24:46Z",
    "comments": 1,
    "user": "dashanji"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29564,
    "title": "[Doc]: Make PyTorch profiler gzip and CUDA time dump configurable",
    "body": "### \ud83d\udcda The doc issue\n\nWe observed that enabling both use_gzip and dump_self_cuda_time_total in the vLLM torch profiler introduces significant overhead during profiling.\n\nFor example, when profiling 10 randomly generated requests (1000 input tokens, 200 output tokens) on an A100 using the Qwen3-32B model, we found that gzip compression of the profiling trace and dumping the CUDA time table take ~68 seconds, dominating the overall profiling time.\n\nThe main sources of overhead appear to be:\n1. Gzip compression of the profiling trace file\n2. Generation and dumping of the CUDA time summary table\n\nAfter disabling these two features, the total profiling dump time is reduced to ~18 seconds.\n\nIn many profiling scenarios (e.g., quick performance checks or small-scale experiments), users may not need gzip compression or the CUDA time table. Therefore, it would be helpful to make these two behaviors individually configurable via environment variables\u2014enabled by default for completeness, but optionally turnable off when faster profiling turnaround is preferred. Moreover, gzip compression could potentially be performed asynchronously after the trace is dumped, allowing lower-latency profiling in staging or pre-production environments.\n\nThis patch proposes adding such configurability so users can selectively disable gzip compression and/or CUDA time table generation when they want a faster and lighter profiling workflow.\n\n### Suggest a potential alternative/fix\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29564",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-11-27T02:21:20Z",
    "updated_at": "2025-12-01T04:30:48Z",
    "comments": 1,
    "user": "zhangruoxu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169157,
    "title": "AOTI does not support fallback kernels with parameters of types other than int and tensor.",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nCurrently, AOTI does not support fallback kernels with parameters of types other than int and tensor. https://github.com/pytorch/pytorch/blob/main/torch/_inductor/codegen/cpp_wrapper_cpu.py#L2723-L2729.\nWhy does AOTI restrict the parameter types?\nDo we have any plans to add support for fallback kernels with more complex parameters ?\n\n\n### Alternatives\n\nI implemented a workaround, replacing `generate_fallback_kernel_with_runtime_lookup_aot` with `generate_fallback_kernel_with_runtime_lookup_nopython`, which worked in my experiments. \n\n\n### Additional context\n\n_No response_\n\ncc @chauhang @penguinwu @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4 @desertfire @yushangdi @benjaminglass1 @jataylo @iupaikov-amd",
    "url": "https://github.com/pytorch/pytorch/issues/169157",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "oncall: export",
      "module: aotinductor"
    ],
    "created_at": "2025-11-27T02:10:26Z",
    "updated_at": "2025-12-18T02:30:56Z",
    "comments": 3,
    "user": "CaoE"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29562,
    "title": "[Bug]: \"\\n\\n\" content between reasoning and tool_call content when tool_call and stream mode",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nhttps://github.com/QwenLM/Qwen3/issues/1755\n\nWhen stream mode true, the response contains content \"\\n\\n\" between reasoning and tool_call; but with stream model false, it didn't generate content \"\\n\\n\".\n\nIs there some thing different, I don't want the content \"\\n\\n\" between reasoning and tool_call.\n\n<img width=\"974\" height=\"533\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/0cc36343-3c0f-4ce1-9028-30f561a55dac\" />\n\nHere is my requests:\n```\n{\n  \"model\": \"Qwen3-235B-A22B-Thinking-2507\",\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"search_law_articles\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"level\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": null,\n              \"description\": \"\u641c\u7d22\u6761\u4ef6\uff1a\u6cd5\u89c4\u7c7b\u578b\"\n            },\n            \"query\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": null,\n              \"description\": \"\u67e5\u8be2\u8bed\u53e5\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": null,\n              \"description\": \"\u6cd5\u5f8b\u6807\u9898\"\n            },\n            \"article\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": null,\n              \"description\": \"\u6cd5\u5f8b\u6761\u6b3e\u5e8f\u53f7\uff0c\u5982 \u7b2c\u5341\u6761\"\n            },\n            \"content\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": null,\n              \"description\": \"\u6cd5\u5f8b\u6761\u6b3e\u53ca\u5185\u5bb9\uff0c\u5982 \u7b2c\u5341\u6761 \u8d37\u6b3e\u4eba\u59d4\u6258\u652f\u4ed8\"\n            },\n            \"pub_department\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": null,\n              \"description\": \"\u53d1\u5e03\u90e8\u95e8\"\n            },\n            \"pub_time_after\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": null,\n              \"description\": \"\u641c\u7d22\u6761\u4ef6\uff1a\u53d1\u5e03\u65f6\u95f4\u665a\u4e8e\u6b64\u65f6\u95f4\uff0c\u683c\u5f0f\u59822025-06-20\"\n            },\n            \"pub_time_before\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": null,\n              \"description\": \"\u641c\u7d22\u6761\u4ef6\uff1a\u53d1\u5e03\u65f6\u95f4\u65e9\u4e8e\u6b64\u65f6\u95f4\uff0c\u683c\u5f0f\u59822025-06-20\"\n            },\n            \"imply_time_after\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": null,\n              \"description\": \"\u641c\u7d22\u6761\u4ef6\uff1a\u5b9e\u65bd\u65f6\u95f4\u665a\u4e8e\u6b64\u65f6\u95f4\uff0c\u683c\u5f0f\u59822025-06-20\"\n            },\n            \"imply_time_before\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": null,\n              \"description\": \"\u641c\u7d22\u6761\u4ef6\uff1a\u5b9e\u65bd\u65f6\u95f4\u65e9\u4e8e\u6b64\u65f6\u95f4\uff0c\u683c\u5f0f\u59822025-06-20\"\n            }\n          }\n        },\n        \"description\": \"\u6b64\u5de5\u5177\u7528\u4e8e\u641c\u7d22\u6cd5\u6761\u5185\u5bb9\uff0c \u5e93\u4e2d\u662f\u6309\u7167\u6cd5\u5f8b\u6761\u76ee\u8fdb\u884c\u5b58\u50a8\uff0c \u67e5\u8be2\u53ef\u9009\u591a\u4e2a\u67e5\u8be2\u8fc7\u6ee4\u6761\u4ef6\"\n      }\n    }\n  ],\n  \"stream\": true,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"text\": \"\u5e2e\u6211\u89e3\u8bfb\u4e0b\u7f51\u7edc\u5b89\u5168\u6cd5\",\n          \"type\": \"text\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29562",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-27T01:49:04Z",
    "updated_at": "2025-11-27T01:49:04Z",
    "comments": 0,
    "user": "NiuBlibing"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29560,
    "title": "[Doc]: Batch Invariance on Ampere Platforms",
    "body": "### \ud83d\udcda The doc issue\n\nDoes the batch invariance feature released in vllm 0.11.2 support the Ampere architecture? If adaptations are required, what modifications need to be made?\n\n### Suggest a potential alternative/fix\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29560",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-11-27T01:06:49Z",
    "updated_at": "2025-11-27T14:21:30Z",
    "comments": 0,
    "user": "luo1206"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3666,
    "title": "Feedback about What is torch.nn really?",
    "body": "There is the following issue on this page: https://docs.pytorch.org/tutorials/beginner/nn_tutorial.html\n\nIn the section \"Neural net from scratch (without torch.nn)\" there is a pre-training loss function evaluation on a batch of 64 instances, \n\n```\nyb = y_train[0:bs]\nprint(loss_func(preds, yb))\n```\n  \nthen training is performed (comments my own)\n\n```\nfor epoch in range(epochs):\n    for i in range((n - 1) // bs + 1):\n        #         set_trace()\n        start_i = i * bs\n        end_i = start_i + bs\n        xb = x_train[start_i:end_i] # note that xb gets redefined\n        yb = y_train[start_i:end_i] # note that yb gets redefined\n        pred = model(xb)\n        loss = loss_func(pred, yb)\n\n        loss.backward()\n        with torch.no_grad():\n            weights -= weights.grad * lr\n            bias -= bias.grad * lr\n            weights.grad.zero_()\n            bias.grad.zero_()\n```\n\nand the loss function is evaluated again to demonstrate a reduction in loss. \n\n`print(loss_func(model(xb), yb), accuracy(model(xb), yb))\n`\n\nThe final evaluation is not applied to the same data as the first though. Both invoke xb and yb, but xb and yb in the pre-training evaluation are the first 64 instances from the set, during training these variables are updated with subsequent batches and the final evaluation is performed on the final batch. \n\nPre and post-training evaluations should be performed on the same batch, either the original 64 instances from the first training batch, or (if the intent is to demonstrate generalization loss) the test dataset.\n\ncc @albanD @jbschlosser",
    "url": "https://github.com/pytorch/tutorials/issues/3666",
    "state": "open",
    "labels": [
      "core"
    ],
    "created_at": "2025-11-26T21:16:14Z",
    "updated_at": "2025-11-26T21:35:10Z",
    "user": "bogpetre"
  },
  {
    "repo": "huggingface/trl",
    "number": 4582,
    "title": "Does the GRPO Trainer support multi-image input for Qwen3-VL?",
    "body": "Does the GRPO Trainer support multi-image input for Qwen3-VL?",
    "url": "https://github.com/huggingface/trl/issues/4582",
    "state": "open",
    "labels": [
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-11-26T14:03:57Z",
    "updated_at": "2025-11-27T08:08:25Z",
    "comments": 1,
    "user": "Lestoky"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12722,
    "title": "How to run qwen-image in kaggle gpu T4 * 2 successfully?",
    "body": "```python3\n!python3 -m pip install -U diffusers peft bitsandbytes\nimport diffusers, torch, math\nqwen = diffusers.QwenImagePipeline.from_pretrained('Qwen/Qwen-Image', torch_dtype=torch.float16, low_cpu_mem_usage=True, quantization_config=diffusers.PipelineQuantizationConfig(quant_backend='bitsandbytes_4bit', quant_kwargs={'load_in_4bit':True, 'bnb_4bit_quant_type':'nf4', 'bnb_4bit_compute_dtype':torch.float16}, components_to_quantize=['transformer', 'text_encoder']))\nqwen.scheduler = diffusers.FlowMatchEulerDiscreteScheduler.from_config({'base_image_seq_len':256, 'base_shift':math.log(3), 'invert_sigmas':False, 'max_image_seq_len':8192, 'max_shift':math.log(3), 'num_train_timesteps':1000, 'shift':1, 'shift_terminal':None, 'stochastic_sampling':False, 'time_shift_type':'exponential', 'use_beta_sigmas':False, 'use_dynamic_shifting':True, 'use_exponential_sigmas':False, 'use_karras_sigmas':False})\nqwen.load_lora_weights('lightx2v/Qwen-Image-Lightning', weight_name='Qwen-Image-Lightning-4steps-V2.0.safetensors', adapter_name='lightning')\nqwen.set_adapters('lightning', adapter_weights=1)\nqwen.enable_sequential_cpu_offload()\nqwen(prompt='a beautiful girl', height=1280, width=720, num_inference_steps=4, true_cfg_scale=1).images[0].save('a.png')\n```\n----> 3 qwen = diffusers.QwenImagePipeline.from_pretrained('Qwen/Qwen-Image', torch_dtype=torch.float16, low_cpu_mem_usage=True, quantization_config=diffusers.PipelineQuantizationConfig(quant_backend='bitsandbytes_4bit', quant_kwargs={'load_in_4bit':True, 'bnb_4bit_quant_type':'nf4', 'bnb_4bit_compute_dtype':torch.float16}, components_to_quantize=['transformer', 'text_encoder']))\n\nOutOfMemoryError: CUDA out of memory. Tried to allocate 34.00 MiB. GPU 0 has a total capacity of 14.74 GiB of which 4.19 MiB is free. Process 8568 has 14.73 GiB memory in use. Of the allocated memory 14.50 GiB is allocated by PyTorch, and 129.00 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)\n\nHow to get more cuda memory?\n\n@yiyixuxu @DN6",
    "url": "https://github.com/huggingface/diffusers/issues/12722",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-26T12:53:30Z",
    "updated_at": "2025-11-28T03:54:07Z",
    "user": "chaowenguo"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29494,
    "title": "[Doc]: Documentation inconsistency: Blog mentions append_slots() but codebase uses allocate_slots()",
    "body": "### \ud83d\udcda The doc issue\n\nThe Automatic Prefix Caching blog post mentions:\n> \"The scheduler calls kv_cache_manager.append_slots()\"\n\nHowever, the actual codebase uses a unified `kv_cache_manager.allocate_slots()` method that handles both prefill and decode requests.\n\n**Location:**\n- Blog: [[link to blog post](https://docs.vllm.ai/en/v0.8.5/design/v1/prefix_caching.html#operations)]\n- Code: ./vllm/v1/core/kv_cache_manager.py\n\n### Suggest a potential alternative/fix\n\nUpdate the blog post to reflect the actual implementation `kv_cache_manager.allocate_slots()`\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29494",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-11-26T11:37:40Z",
    "updated_at": "2025-11-26T11:46:08Z",
    "comments": 1,
    "user": "pradsgit"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42418,
    "title": "Custom nn.Parameter initialization in PreTrainedModel subclasses is overwritten by post_init()/from_pretrained() causing NaNs/Zeros",
    "body": "### System Info\n\n- `transformers` version: 4.57.1\n- Platform: Linux-4.18.0-147.mt20200626.413.el8_1.x86_64-x86_64-with-glibc2.35\n- Python version: 3.10.14\n- Huggingface_hub version: 0.35.3\n- Safetensors version: 0.6.2\n- Accelerate version: 1.11.0\n- Accelerate config:    not found\n- DeepSpeed version: 0.18.2\n- PyTorch version (accelerator?): 2.7.1+cu126 (CUDA)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: No\n- Using GPU in script?: No\n- GPU type: NVIDIA A100-SXM4-80GB\n\n\n### Who can help?\n\n@Cyrilvallez @zucchini-nlp \n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\n```python\nimport numpy as np\nimport os\nimport random\nimport torch\nimport torch.nn as nn\n\nfrom transformers import Qwen3VLForConditionalGeneration\n\n\ndef seed_everything(TORCH_SEED):\n    random.seed(TORCH_SEED)\n    os.environ[\"PYTHONHASHSEED\"] = str(TORCH_SEED)\n    np.random.seed(TORCH_SEED)\n    torch.manual_seed(TORCH_SEED)\n    torch.cuda.manual_seed(TORCH_SEED)\n    torch.cuda.manual_seed_all(TORCH_SEED)\n    torch.backends.cudnn.deterministic = True\n    torch.backends.cudnn.benchmark = False\n\n\nseed_everything(66)\n\n\nclass TestModel1(Qwen3VLForConditionalGeneration):\n    def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n        self.action_head = nn.Linear(1024, 7)\n        self.positional_embedding = nn.Parameter(torch.randn(16, 1152))\n        self.post_init()\n\n\nclass TestModel2(nn.Module):\n    def __init__(self, *args, model_path, **kwargs):\n        super().__init__(*args, **kwargs)\n        self.model = Qwen3VLForConditionalGeneration.from_pretrained(model_path)\n        self.action_head = nn.Linear(1024, 7)\n        self.positional_embedding = nn.Parameter(torch.randn(16, 1152))\n\n\ntest_model1 = TestModel1.from_pretrained(\"Qwen/Qwen3-VL-4B-Instruct\")\ntest_model2 = TestModel2(model_path=\"Qwen/Qwen3-VL-4B-Instruct\")\nprint(test_model1.positional_embedding)\nprint(test_model1.positional_embedding.mean(), test_model1.positional_embedding.std())\nprint(test_model2.positional_embedding)\nprint(test_model2.positional_embedding.mean(), test_model2.positional_embedding.std())\n````\n\n### Expected behavior\n\nWhen subclassing a model (inheriting from PreTrainedModel, e.g., Qwen3VLForConditionalGeneration, LlamaForCausalLM) to add custom learnable parameters, user-defined initialization in __init__ is often silently overwritten.\n\nThis occurs because from_pretrained (or the end of __init__) triggers self.post_init(), which recursively calls _init_weights. This mechanism re-initializes all parameters, ignoring the explicit initialization code provided by the user in __init__.\n\nIn the specific case of Qwen3-VL (and potentially others), this re-initialization results in NaNs or Zeros, rendering the model unusable without manual intervention.\n\nSteps to reproduce The following script demonstrates the issue. Note: I used torch.randn for the custom parameter initialization. While I understand that torch.randn samples from a standard normal distribution and does not guarantee an exact sample mean of 0 and std of 1, it should result in valid float values. The observed NaNs/Zeros confirm that this initialization is being discarded and replaced by a faulty internal initialization logic.",
    "url": "https://github.com/huggingface/transformers/issues/42418",
    "state": "open",
    "labels": [
      "Usage",
      "Feature request",
      "bug"
    ],
    "created_at": "2025-11-26T10:29:57Z",
    "updated_at": "2025-12-01T15:10:32Z",
    "comments": 10,
    "user": "Noietch"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12720,
    "title": "how to quantization wan 2.2 vace after loading lora?",
    "body": "```python3\ndiffusers.WanVACEPipeline.from_pretrained('linoyts/Wan2.2-VACE-Fun-14B-diffusers', vae=diffusers.AutoencoderKLWan.from_pretrained('linoyts/Wan2.2-VACE-Fun-14B-diffusers', subfolder='vae', torch_dtype=torch.float32), torch_dtype=torch.bfloat16, quantization_config=diffusers.PipelineQuantizationConfig(quant_backend='bitsandbytes_8bit', quant_kwargs={'load_in_8bit':True}, components_to_quantize=['transformer', 'transformer_2'])).save_pretrained('wan')\n```\nnormally I can save the quantization model in this way\nBut now I want to merge lora and the quantization and then save the model with lora. How?\n\n```python3\nwan = diffusers.WanVACEPipeline.from_pretrained('linoyts/Wan2.2-VACE-Fun-14B-diffusers', vae=diffusers.AutoencoderKLWan.from_pretrained('linoyts/Wan2.2-VACE-Fun-14B-diffusers', subfolder='vae', torch_dtype=torch.float32), torch_dtype=torch.bfloat16)\nwan.load_lora_weights('lightx2v/Wan2.2-Lightning', weight_name='Wan2.2-I2V-A14B-4steps-lora-rank64-Seko-V1/high_noise_model.safetensors', adapter_name='lightning')\nwan.load_lora_weights('lightx2v/Wan2.2-Lightning', weight_name='Wan2.2-I2V-A14B-4steps-lora-rank64-Seko-V1/low_noise_model.safetensors', adapter_name='lightning_2', load_into_transformer_2=True)\nwan.set_adapters(['lightning', 'lightning_2'], adapter_weights=[1] * 2)\n\nhow to quantization and save_pretrained?\n```\n@yiyixuxu @DN6",
    "url": "https://github.com/huggingface/diffusers/issues/12720",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-26T10:11:38Z",
    "updated_at": "2025-12-11T17:29:30Z",
    "user": "chaowenguo"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29489,
    "title": "[Usage]: Removing last generated token from output and kv cache",
    "body": "### Your current environment\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.3 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : version 3.28.3\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.13.5 | packaged by conda-forge | (main, Jun 16 2025, 08:27:50) [GCC 13.3.0] (64-bit runtime)\nPython platform              : Linux-6.8.0-87-generic-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA B200\nGPU 1: NVIDIA B200\nGPU 2: NVIDIA B200\nGPU 3: NVIDIA B200\nGPU 4: NVIDIA B200\nGPU 5: NVIDIA B200\nGPU 6: NVIDIA B200\nGPU 7: NVIDIA B200\n\nNvidia driver version        : 570.195.03\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        52 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               224\nOn-line CPU(s) list:                  0-223\nVendor ID:                            GenuineIntel\nModel name:                           INTEL(R) XEON(R) PLATINUM 8570\nCPU family:                           6\nModel:                                207\nThread(s) per core:                   2\nCore(s) per socket:                   56\nSocket(s):                            2\nStepping:                             2\nCPU(s) scaling MHz:                   33%\nCPU max MHz:                          4000.0000\nCPU min MHz:                          800.0000\nBogoMIPS:                             4200.00\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities ibpb_exit_to_user\nVirtualization:                       VT-x\nL1d cache:                            5.3 MiB (112 instances)\nL1i cache:                            3.5 MiB (112 instances)\nL2 cache:                             224 MiB (112 instances)\nL3 cache:                             600 MiB (2 instances)\nNUMA node(s):                         2\nNUMA node0 CPU(s):                    0-55,112-167\nNUMA node1 CPU(s):                    56-111,168-223\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI",
    "url": "https://github.com/vllm-project/vllm/issues/29489",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-26T09:35:37Z",
    "updated_at": "2025-11-26T09:36:37Z",
    "comments": 0,
    "user": "josefdra"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12719,
    "title": "how to use quantization and device_map=balance to run qwen-image on kaggle T4 * 2",
    "body": "```python3\n!python3 -m pip install -U diffusers peft bitsandbytes protobuf\nimport diffusers, torch, math\nqwen = diffusers.QwenImagePipeline.from_pretrained('Qwen/Qwen-Image', quantization_config=diffusers.PipelineQuantizationConfig(quant_backend='bitsandbytes_4bit', quant_kwargs={'load_in_4bit':True, 'bnb_4bit_quant_type':'nf4', 'bnb_4bit_compute_dtype':torch.float16}, components_to_quantize=['transformer', 'text_encoder']), torch_dtype=torch.float16, device_map='balanced')\nprint(qwen.hf_device_map)\nqwen.scheduler = diffusers.FlowMatchEulerDiscreteScheduler.from_config({'base_image_seq_len':256, 'base_shift':math.log(3), 'invert_sigmas':False, 'max_image_seq_len':8192, 'max_shift':math.log(3), 'num_train_timesteps':1000, 'shift':1, 'shift_terminal':None, 'stochastic_sampling':False, 'time_shift_type':'exponential', 'use_beta_sigmas':False, 'use_dynamic_shifting':True, 'use_exponential_sigmas':False, 'use_karras_sigmas':False})\nqwen.load_lora_weights('lightx2v/Qwen-Image-Lightning', weight_name='Qwen-Image-Lightning-4steps-V2.0.safetensors', adapter_name='lightning')\nqwen.set_adapters('lightning', adapter_weights=1)\nqwen(prompt='a beautiful girl', height=1280, width=720, num_inference_steps=4, true_cfg_scale=1).images[0].save('a.png')\n```\n\nWARNING:accelerate.big_modeling:Some parameters are on the meta device because they were offloaded to the cpu.\n{'text_encoder': 'cpu', 'vae': 0} where is the transformer ?\n\nNotImplementedError: Cannot copy out of meta tensor; no data!\n\nI want to ask how to make the above code work in kaggle. why 16G * 2 vram still not enough to run q4 quantization qwen-image? I want to take full advantage of 2 gpu. Do I need max_memory?\n\nfull error logs:\n/usr/local/lib/python3.11/dist-packages/torch/utils/_contextlib.py in decorate_context(*args, **kwargs)\n    114     def decorate_context(*args, **kwargs):\n    115         with ctx_factory():\n--> 116             return func(*args, **kwargs)\n    117 \n    118     return decorate_context\n\n/usr/local/lib/python3.11/dist-packages/diffusers/pipelines/qwenimage/pipeline_qwenimage.py in __call__(self, prompt, negative_prompt, true_cfg_scale, height, width, num_inference_steps, sigmas, guidance_scale, num_images_per_prompt, generator, latents, prompt_embeds, prompt_embeds_mask, negative_prompt_embeds, negative_prompt_embeds_mask, output_type, return_dict, attention_kwargs, callback_on_step_end, callback_on_step_end_tensor_inputs, max_sequence_length)\n    566         )\n    567         do_true_cfg = true_cfg_scale > 1 and has_neg_prompt\n--> 568         prompt_embeds, prompt_embeds_mask = self.encode_prompt(\n    569             prompt=prompt,\n    570             prompt_embeds=prompt_embeds,\n\n/usr/local/lib/python3.11/dist-packages/diffusers/pipelines/qwenimage/pipeline_qwenimage.py in encode_prompt(self, prompt, device, num_images_per_prompt, prompt_embeds, prompt_embeds_mask, max_sequence_length)\n    252 \n    253         if prompt_embeds is None:\n--> 254             prompt_embeds, prompt_embeds_mask = self._get_qwen_prompt_embeds(prompt, device)\n    255 \n    256         prompt_embeds = prompt_embeds[:, :max_sequence_length]\n\n/usr/local/lib/python3.11/dist-packages/diffusers/pipelines/qwenimage/pipeline_qwenimage.py in _get_qwen_prompt_embeds(self, prompt, device, dtype)\n    203             txt, max_length=self.tokenizer_max_length + drop_idx, padding=True, truncation=True, return_tensors=\"pt\"\n    204         ).to(device)\n--> 205         encoder_hidden_states = self.text_encoder(\n    206             input_ids=txt_tokens.input_ids,\n    207             attention_mask=txt_tokens.attention_mask,\n\n/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py in _wrapped_call_impl(self, *args, **kwargs)\n   1737             return self._compiled_call_impl(*args, **kwargs)  # type: ignore[misc]\n   1738         else:\n-> 1739             return self._call_impl(*args, **kwargs)\n   1740 \n   1741     # torchrec tests the code consistency with the following code\n\n/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py in _call_impl(self, *args, **kwargs)\n   1748                 or _global_backward_pre_hooks or _global_backward_hooks\n   1749                 or _global_forward_hooks or _global_forward_pre_hooks):\n-> 1750             return forward_call(*args, **kwargs)\n   1751 \n   1752         result = None\n\n/usr/local/lib/python3.11/dist-packages/accelerate/hooks.py in new_forward(module, *args, **kwargs)\n    173                 output = module._old_forward(*args, **kwargs)\n    174         else:\n--> 175             output = module._old_forward(*args, **kwargs)\n    176         return module._hf_hook.post_forward(module, output)\n    177 \n\n/usr/local/lib/python3.11/dist-packages/transformers/utils/generic.py in wrapper(self, *args, **kwargs)\n    941 \n    942         try:\n--> 943             output = func(self, *args, **kwargs)\n    944             if is_requested_to_return_tuple or (is_configured_to_return_tuple and is_top_level_module):\n    945          ",
    "url": "https://github.com/huggingface/diffusers/issues/12719",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-26T08:35:46Z",
    "updated_at": "2025-11-26T09:15:54Z",
    "user": "chaowenguo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169112,
    "title": "`torch.compile(fullgraph=True, dynamic=True)` on CUDA fails when using `torch.utils.dlpack.to_dlpack` / `from_dlpack` (`torch._C._to_dlpack` skipped by Dynamo)",
    "body": "### \ud83d\udc1b Describe the bug\n\n### Summary\nWhen compiling a simple model that uses `torch.utils.dlpack.to_dlpack` / `from_dlpack` with:\nbackend=\"inductor\", fullgraph=True, dynamic=True, device=\"cuda\"\n\nthe eager CUDA execution works fine, but `torch.compile` fails during Dynamo tracing with:\n> torch._dynamo.exc.Unsupported: Attempted to call function marked as skipped\nDynamo does not know how to trace the builtin torch._C._to_dlpack.\n\nIn some setups this shows up only as a warning + graph break, but with `fullgraph=True` it turns into a hard error and the script terminates.\n\n### Minimal Repro\n```python\n# -*- coding: utf-8 -*-\nimport torch\nimport torch.nn as nn\n\nclass MyModel(nn.Module):\n    def forward(self, x):\n        if x.dtype == torch.bool:\n            # bool path: go through uint8 + dlpack roundtrip and back to bool\n            x_uint8 = x.to(torch.uint8)\n            dlpack = torch.utils.dlpack.to_dlpack(x_uint8)\n            converted = torch.utils.dlpack.from_dlpack(dlpack)\n            return converted.bool()\n        else:\n            # non-bool path: direct dlpack roundtrip\n            dlpack = torch.utils.dlpack.to_dlpack(x)\n            return torch.utils.dlpack.from_dlpack(dlpack)\n\ndef my_model_function():\n    return MyModel()\n\ndef GetInput():\n    # bool tensor, shape [2], to exercise the bool branch\n    return torch.rand(2).bool()\n\ndef main():\n    if not torch.cuda.is_available():\n        raise RuntimeError(\n            \"CUDA is not available, but this repro expects device='cuda'.\"\n        )\n\n    device = torch.device(\"cuda\")\n\n    # ---------- 1. Eager on CUDA: works ----------\n    model_eager = my_model_function().to(device).eval()\n    inp = GetInput().to(device)\n\n    with torch.no_grad():\n        out_eager = model_eager(inp)\n\n    print(\"=== Eager CUDA Output ===\")\n    print(\"out_eager:\", out_eager)\n    print(\"shape:\", out_eager.shape)\n    print(\"dtype:\", out_eager.dtype)\n    print(\"device:\", out_eager.device)\n\n    # ---------- 2. torch.compile on CUDA ----------\n    from torch._inductor import config as inductor_config\n    old_max_autotune = inductor_config.max_autotune\n    inductor_config.max_autotune = True  # emulate 'max-autotune' mode\n\n    try:\n        compiled_model = torch.compile(\n            model_eager,\n            backend=\"inductor\",\n            fullgraph=True,\n            dynamic=True,\n        )\n\n        with torch.no_grad():\n            out_compiled = compiled_model(inp)  # <-- fails here\n\n        print(\"\\n=== compiled Output ===\")\n        print(\"out_compiled:\", out_compiled)\n        print(\"shape:\", out_compiled.shape)\n        print(\"dtype:\", out_compiled.dtype)\n        print(\"device:\", out_compiled.device)\n\n        same = torch.equal(out_eager, out_compiled)\n        print(\"\\n=== eager vs compiled elementwise equal ===\", bool(same))\n    finally:\n        inductor_config.max_autotune = old_max_autotune\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### Console output (abridged):\n```\n=== Eager CUDA Output ===\nout_eager: tensor([True, True], device='cuda:0')\nshape: torch.Size([2])\ndtype: torch.bool\ndevice: cuda:0\n\n.../torch/_dynamo/variables/functions.py:1598: UserWarning:\nDynamo does not know how to trace the builtin `torch._C._to_dlpack.` ...\n  torch._dynamo.utils.warn_once(explanation + \"\\n\" + \"\\n\".join(hints))\n\nTraceback (most recent call last):\n  ...\n  File \".../torch/_dynamo/eval_frame.py\", line 841, in compile_wrapper\n    raise e.with_traceback(None) from e.__cause__  # User compiler error\ntorch._dynamo.exc.Unsupported: Attempted to call function marked as skipped\n  Explanation: Dynamo does not know how to trace the builtin `torch._C._to_dlpack.` ...\n  Hint: If it is a Python builtin, please file an issue on GitHub so the PyTorch team can add support for it ...\n  Hint: If it is a third-party C/C++ Python extension, please either wrap it into a PyTorch-understood custom operator\n    or, if it is traceable, use `torch.compiler.allow_in_graph`.\n\n  Developer debug context: module: torch._C, qualname: _to_dlpack, skip reason: <missing reason>\n\nfrom user code:\n   File \"for_test.py\", line 11, in forward\n    dlpack = torch.utils.dlpack.to_dlpack(x_uint8)\n```\n\n\n\n### Versions\n\n```\nPyTorch: 2.9.0 (installed via pip)\nCUDA: 12.x\ncuDNN: 9.x\nPython: 3.10.x\nOS: Ubuntu 22.04 (x86_64)\nGPU: NVIDIA RTX A6000 (repro uses cuda:0)\n```\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @amjames @Lucaskabela @jataylo",
    "url": "https://github.com/pytorch/pytorch/issues/169112",
    "state": "open",
    "labels": [
      "triaged",
      "module: dlpack",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2025-11-26T08:13:38Z",
    "updated_at": "2025-12-04T02:10:01Z",
    "comments": 3,
    "user": "tinywisdom"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169106,
    "title": "Why is fusion restricted here in dynamic mode?",
    "body": "https://github.com/pytorch/pytorch/blob/3ab08946d5052eaeda11d683d6a58e801a032755/torch/_inductor/ir.py#L3555\n\nI wrote a small demo myself and the numerical accuracy is perfect \n```python\nimport torch\nfrom torch import nn\nfrom typing import List\n\n#concat in dynamic dim\nclass MyCatMul(nn.Module):\n    def __init__(self, n: int):\n        super().__init__()\n        self.n = n\n        self.W = nn.Parameter(torch.randn(64, 64))\n\n    def forward(self, xs: List[torch.Tensor]):\n        assert len(xs) == self.n, f\"need {self.n} tensors\"\n        # last = torch.sigmoid(xs[-1] @ self.W)\n        last = torch.sigmoid(xs[-1]) \n        outs = list(xs[:-1]) + [last]\n        return torch.cat(outs, dim=0)\n\n\nn = 15\nmodel = MyCatMul(n).cuda()\nx_list = []\nfor i in range(n):\n    a = torch.randint(2, 120, (1,)).item() \n    x_list.append(torch.randn(a, 64, device='cuda'))\n\nfrom torch.export import export, Dim\n\ndynamic_shapes = [\n    {0: Dim(f\"b{i}\", min=1, max=2048), 1: 64}\n    for i in range(n)\n]\n\nwith torch.no_grad():\n    out = model(x_list)\n    ep = export(model, (x_list,), dynamic_shapes=[dynamic_shapes])\n    torch._inductor.aoti_compile_and_package(\n        ep, package_path=\"./model.pt2\", \n            inductor_configs={\"max_autotune\": True, \n                                \"epilogue_fusion\": True, \n                                \"permute_fusion\": True, \n                                \"max_autotune_pointwise\": True,\n                                \"max_autotune_gemm\":True,\n                                \"freezing\":True,\n        }\n    )\n    aot_model = torch._inductor.aoti_load_package(\"./model.pt2\")\n    ################diff##############\n    for i in range(100):\n        test_input = []\n        for ii in range(n):\n            a = torch.randint(2, 1024, (1,)).item()\n            test_input.append(torch.randn(a, 64, device='cuda'))\n\n        out_raw = model(test_input)\n        out_aot = aot_model(test_input)\n\n        diff = torch.abs(out_raw - out_aot)\n        max_val, max_idx = diff.max(), diff.argmax()\n        coord = torch.unravel_index(max_idx, out_raw.shape)\n        val_raw = out_raw.flatten()[max_idx]\n        val_aot = out_aot.flatten()[max_idx]\n        avg_err = diff.mean().item()\n        if max_val > 1e-5:\n            print(f\"iter {i}: max_err {max_val.item():.8f} @ coord {coord}  \"\n                f\"raw={val_raw.item():.8f}  aot={val_aot.item():.8f}  \"\n                f\"avg_err {avg_err:.8f}\")\n            raise \"error\"\n\n    print(\"pass\")\n\n\n```\n\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @aakhundov @coconutruben @jataylo",
    "url": "https://github.com/pytorch/pytorch/issues/169106",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: inductor"
    ],
    "created_at": "2025-11-26T03:56:02Z",
    "updated_at": "2025-12-10T04:43:43Z",
    "comments": 3,
    "user": "Jin-TaoZhang"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29474,
    "title": "[P/D][Metrics] Consider combined/summed metrics (e.g. ttft and e2e_request_latency) for prefill and decode instances",
    "body": "### Your current environment\n\n<details>\n\n<summary>Env info snipped</summary>\n\n```\nCollecting environment information...\nuv is set\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.1 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : version 3.28.3\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] (64-bit runtime)\nPython platform              : Linux-5.15.0-152-generic-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : \nGPU 0: NVIDIA H20\nGPU 1: NVIDIA H20\nGPU 2: NVIDIA H20\nGPU 3: NVIDIA H20\nGPU 4: NVIDIA H20\nGPU 5: NVIDIA H20\nGPU 6: NVIDIA H20\nGPU 7: NVIDIA H20\n\nNvidia driver version        : 570.172.08\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.8.0\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           46 bits physical, 57 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  128\nOn-line CPU(s) list:                     0-127\nVendor ID:                               GenuineIntel\nBIOS Vendor ID:                          Intel(R) Corporation\nModel name:                              INTEL(R) XEON(R) PLATINUM 8562Y+\nBIOS Model name:                         INTEL(R) XEON(R) PLATINUM 8562Y+  CPU @ 2.8GHz\nBIOS CPU family:                         179\nCPU family:                              6\nModel:                                   207\nThread(s) per core:                      2\nCore(s) per socket:                      32\nSocket(s):                               2\nStepping:                                2\nCPU(s) scaling MHz:                      73%\nCPU max MHz:                             4100.0000\nCPU min MHz:                             800.0000\nBogoMIPS:                                5600.00\nFlags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nVirtualization:                          VT-x\nL1d cache:                               3 MiB (64 instances)\nL1i cache:                               2 MiB (64 instances)\nL2 cache:                                128 MiB (64 instances)\nL3 cache:                                120 MiB (2 instances)\nNUMA node(s):                            2\nNUMA node0 CPU(s):                       0-31,64-95\nNUMA node1 CPU(s):                       32-63,96-127\nVulnerability Gather data sampling:      Not affected\nVulnerability Indirect target s",
    "url": "https://github.com/vllm-project/vllm/issues/29474",
    "state": "open",
    "labels": [
      "usage",
      "kv-connector"
    ],
    "created_at": "2025-11-26T02:50:17Z",
    "updated_at": "2025-11-26T08:31:18Z",
    "comments": 1,
    "user": "mgw2168-1"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29472,
    "title": "[Installation]: how to Install vllm on dell promax gb10",
    "body": "### Your current environment\n\nI failed to install vllm on dell promax gb10 , mesages as followed\n\nnvcc --version\nnvcc: NVIDIA (R) Cuda compiler driver\nCopyright (c) 2005-2025 NVIDIA Corporation\nBuilt on Wed_Aug_20_01:57:39_PM_PDT_2025\nCuda compilation tools, release 13.0, V13.0.88\nBuild cuda_13.0.r13.0/compiler.36424714_0\n\n\npip install vllm\nSuccessfully installed torch-2.9.0 torchaudio-2.9.0 torchvision-0.24.0 vllm-0.11.2\n\n```\n(py312) dell@promaxgb10-0843:~/test/vllm/Qwen$ vllm -V\nTraceback (most recent call last):\n  File \"/home/dell/miniconda3/envs/py312/bin/vllm\", line 3, in <module>\n    from vllm.entrypoints.cli.main import main\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/entrypoints/cli/__init__.py\", line 3, in <module>\n    from vllm.entrypoints.cli.benchmark.latency import BenchmarkLatencySubcommand\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/entrypoints/cli/benchmark/latency.py\", line 5, in <module>\n    from vllm.benchmarks.latency import add_cli_args, main\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/benchmarks/latency.py\", line 17, in <module>\n    from vllm.engine.arg_utils import EngineArgs\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/engine/arg_utils.py\", line 35, in <module>\n    from vllm.attention.backends.registry import AttentionBackendEnum\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/attention/__init__.py\", line 4, in <module>\n    from vllm.attention.backends.abstract import (\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/attention/backends/abstract.py\", line 9, in <module>\n    from vllm.model_executor.layers.linear import ColumnParallelLinear\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/model_executor/__init__.py\", line 4, in <module>\n    from vllm.model_executor.parameter import BasevLLMParameter, PackedvLLMParameter\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/model_executor/parameter.py\", line 11, in <module>\n    from vllm.distributed import (\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/distributed/__init__.py\", line 4, in <module>\n    from .communication_op import *\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/distributed/communication_op.py\", line 9, in <module>\n    from .parallel_state import get_tp_group\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/distributed/parallel_state.py\", line 250, in <module>\n    direct_register_custom_op(\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/utils/torch_utils.py\", line 640, in direct_register_custom_op\n    from vllm.platforms import current_platform\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/platforms/__init__.py\", line 257, in __getattr__\n    _current_platform = resolve_obj_by_qualname(platform_cls_qualname)()\n                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/utils/import_utils.py\", line 89, in resolve_obj_by_qualname\n    module = importlib.import_module(module_name)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/importlib/__init__.py\", line 90, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/dell/miniconda3/envs/py312/lib/python3.12/site-packages/vllm/platforms/cuda.py\", line 16, in <module>\n    import vllm._C  # noqa\n    ^^^^^^^^^^^^^^\nImportError: libtorch_cuda.so: cannot open shared object file: No such file or directory\n```\n\n\n\n\n### How you are installing vllm\n\n```sh\npip install vllm\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29472",
    "state": "open",
    "labels": [
      "installation"
    ],
    "created_at": "2025-11-26T02:41:18Z",
    "updated_at": "2026-01-01T12:28:29Z",
    "comments": 2,
    "user": "goactiongo"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29436,
    "title": "[Bug]: vLLM Serve with LMCache enabled produces wrong output for GPT-OSS-20B",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nvLLM serve command with LMCache enabled produces wrong output with GPT OSS 20B for subsequent invocations with the same prompt\n\nSteps to reproduce:\nCommand to start the server:\n```\nLMCACHE_CONFIG_FILE=lmcache_cpu.yaml\nvllm serve openai/gpt-oss-20b --port 8000 --kv-transfer-config '{\"kv_connector\":\"LMCacheConnectorV1\", \"kv_role\":\"kv_both\"}'\n```\n\nInvocation:\n```\ncurl 127.0.0.1:8000/v1/chat/completions -H \"Content-Type: application/json\" -d '{\"model\": \"openai/gpt-oss-20b\", \"messages\": [ {\"role\": \"user\", \"content\": \"What is Amazon SageMaker?\"}]}'\n```\n\nFirst invocation:\n```\n{\n\"id\":\"chatcmpl-951ca7178b1e4226b0343cb070033487\",\n\"object\":\"chat.completion\",\n\"created\":1764098087,\n\"model\":\"openai/gpt-oss-20b\",\n\"choices\":[\n{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"**Amazon SageMaker** is Amazon Web Services\u2019 fully\u2011managed platform that lets you build, train, tune, and deploy machine\u2011learning models fast\u2014without managing the underlying infrastructure.\\n\\nKey capabilities\\n\\n| Feature | What it does |\\n|--------|--------------|\\n| **SageMaker Studio** | A web\u2011based IDE that bundles notebooks, visual debugging, model monitoring, and collaboration tools. |\\n| **Built\u2011in algorithms & frameworks** | Pre\u2011packaged models (XGBoost, Linear Learner, etc.) and support for your own TensorFlow, PyTorch, MXNet, Scikit\u2011learn, R, etc. |\\n| **Auto\u2011ML & automated model tuning** | SageMaker Autopilot automatically searches model architectures and hyper\u2011parameters. |\\n| **Managed training** | Spot, distributed, and GPU training jobs that scale to the required compute. |\\n| **Model deployment** | One\u2011click production endpoints, batch transform, edge inference (SageMaker Edge), and real\u2011time or asynchronous inference. |\\n| **Inference pipelines** | Compose multiple models or processing steps into a single pipeline. |\\n| **Model monitoring & A/B testing** | Continuous evaluation of drift, predictions, and performance metrics. |\\n| **Security & compliance** | VPC, IAM, KMS encryption, private cataloging, and audit trails. |\\n\\nIn short, SageMaker removes the operational burden of ML\u2014so teams can focus on data science and business value rather than servers, networking, and scaling.\",\"refusal\":null,\"annotations\":null,\"audio\":null,\"function_call\":null,\"tool_calls\":[],\"reasoning\":\"User asks \\\"What is Amazon SageMaker?\\\" Short answer. Provide description: fully managed ML service, environment to build, train, deploy models, etc. Should be succinct.\",\"reasoning_content\":\"User asks \\\"What is Amazon SageMaker?\\\" Short answer. Provide description: fully managed ML service, environment to build, train, deploy models, etc. Should be succinct.\"},\"logprobs\":null,\"finish_reason\":\"stop\",\"stop_reason\":null,\"token_ids\":null}],\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"prompt_tokens\":75,\"total_tokens\":426,\"completion_tokens\":351,\"prompt_tokens_details\":null},\"prompt_logprobs\":null,\"prompt_token_ids\":null,\"kv_transfer_params\":null}\n```\n\nSecond invocation:\n```\n{\n  \"id\": \"chatcmpl-4ebc19fc5c2a41a7bebc01ea8d1c98b1\",\n  \"object\": \"chat.completion\",\n  \"created\": 1764098160,\n  \"model\": \"openai/gpt-oss-20b\",\n  \"choices\": [\n    {\n      \"index\": 0,\n      \"message\": {\n        \"role\": \"assistant\",\n        \"content\": \"Sure! Here\u2019s a basic guide to get you started with writing a cool, informative yet accessible article on **\\\"The Fascinating World of Quantum Computing\\\"** for a general audience. Feel free to adapt the structure, tone, or content to match your style and publication\u2019s guidelines.\\n\\n---\\n\\n## 1. Hook & Context (\u2248150\u2013200 words)\\n\\n- **Start with a vivid anecdote, surprising fact, or a relatable analogy** that introduces the \u201cwow\u201d moment in quantum computing.\\n  - *Example:* \u201cImagine a coin that, instead of being heads or tails, can be both at the same time\u2026 until you look at it.\u201d  \\n- **Briefly state why this topic matters** to everyday life: faster drug discovery, better encryption, breakthrough materials, etc.\\n\\n> **Tell readers what they\u2019ll learn**: a quick glimpse of quantum fundamentals, why it\u2019s different from classic bits, and how it could reshape technologies.\\n\\n---\\n\\n## 2. What\u2019s a Quantum Computer? (\u2248300 words)\\n\\n| Section | Content | Quick Tips |\\n|---------|---------|------------|\\n| **2.1 \u201cBits\u201d vs. \u201cQubits\u201d** | \u2022 Classical bits (\u201c0\u201d or \u201c1\u201d).<br>\u2022 Qubits: superposition (both 0 & 1) & entanglement. | Use visual metaphors: a spinning top (superposition) and two dancers always in sync (entanglement). |\\n| **2.2 Basic Operations** | \u2022 Quantum gates (Pauli X, H, CNOT).<br>\u2022 The role of interference. | A tiny \u201creversible\u201d logic of the quantum \u201cif\u2011then\u201d that flips outcomes. |\\n| **2.3 Measuring As a Collapses** | \u2022 Outcome collapse on measurement.<br>\u2022 Probabilities & expectation values. | Compare to a gamble: you only learn the re",
    "url": "https://github.com/vllm-project/vllm/issues/29436",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-25T19:27:24Z",
    "updated_at": "2025-11-25T19:27:24Z",
    "comments": 0,
    "user": "ksuma2109"
  },
  {
    "repo": "pytorch/ao",
    "number": 3389,
    "title": "Is it possible to export a QAT model in AWQ Format?",
    "body": "I'm new to torchao and QAT but I'm pretty comfortable with PTQ techniques like AWQ and GPTQ. My deployment pipeline requires AWQ format (safetensors supported by autoawq or gptqmodel's new AWQ integration, needs to be in uint32 like Int4PackingFormat.PLAIN_INT32). I want to train a model with Int4WeightOnlyConfig and but it's confusing as to how I convert the final model into AWQ format, as AWQ format is supported but is this only for PTQ? Unless I'm missing something, you can save to roughly the same format (PLAIN_INT32 but only on xpu?) AND have AWQ support but there's no way to export to this format? If wrap my Int4WeightOnlyConfig in an AWQConfig, will it be trainable or only able to calibrate? Could I otherwise use something along the lines to the converter defined in [this project](https://github.com/gau-nernst/gemma3-int4/blob/92517e8cac07f5caa3e3c98f26931b9046a0fa38/convert_flax.py#L232)?",
    "url": "https://github.com/pytorch/ao/issues/3389",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2025-11-25T17:30:03Z",
    "updated_at": "2025-12-12T17:27:25Z",
    "comments": 10,
    "user": "ambroser53"
  },
  {
    "repo": "pytorch/executorch",
    "number": 15978,
    "title": "qnn_executor_runner - mismatch in the skel files ?",
    "body": "hi, \n\nim testing qnn_executor_runner on s25 ultra, \na Snapdragon 8 Gen 4 processor.\n\nit seems qnn backend choses libQnnHtpV79Skel.so as the backend\n\nbut these messages seem to point to some mismatch ? it tries to call hmx_v73_convf16 ? \ni.e. shouldnt it call hmx_v79_convf16 ? \n\n\n\nV  b037a:4006: CDSP0:[R]: Process \"/frpc/f05c4930 qnn_executor_ru\" crashed in thread \"nn_3e56a57b\" due to TLBMISS RW occurrence\n2025-11-25 16:48:18.994  2314-2320  adsprpc                 cdsprpcd                             V  b037a:4006: CDSP0:[R]: Crashed Shared Object \"./libQnnHtpV79Skel.so\" load address : 0x01000000 \n2025-11-25 16:48:18.994  2314-2320  adsprpc                 cdsprpcd                             V  b037a:4006: CDSP0:[R]: [<015E5C3C>] hmx_v73_convf16_NxN_stride1+0x3C53C:     (./libQnnHtpV79Skel.so) \n2025-11-25 16:48:18.994  2314-2320  adsprpc                 cdsprpcd                             V  b037a:4006: CDSP0:[R]: [<015E5C38>] hmx_v73_convf16_NxN_stride1+0x3C538:     (./libQnnHtpV79Skel.so) \n2025-11-25 16:48:18.994  2314-2320  adsprpc                 cdsprpcd                             V  b037a:4006: CDSP0:[R]: [<015E5D74>] hmx_v73_convf16_NxN_stride1+0x3C674:     (./libQnnHtpV79Skel.so) \n2025-11-25 16:48:18.994  2314-2320  adsprpc                 cdsprpcd                             V  b037a:4006: CDSP0:[R]: [<01546168>] continue_execution_bkgrnd_thread+0xA8:     (./libQnnHtpV79Skel.so) \n2025-11-25 16:48:18.994  2314-2320  adsprpc                 cdsprpcd                             V  b037a:4006: CDSP0:[R]: [<0120EC94>] _ZN5Graph18exec_bkgrnd_workerEP12HexagonNNEnvPS_N9GraphData8ListTypeEN4hnnx3OsSE+0xD4:     (./libQnnHtpV79Skel.so) \n2025-11-25 16:48:18.994  2314-2320  adsprpc                 cdsprpcd                             V  b037a:4006: CDSP0:[R]: [<01219EA0>] _ZNK5Graph31ubwcd_get_corresponding_surfaceEPKv+0x9E0:     (./libQnnHtpV79Skel.so) \n\n\nand output from adb shell\n#./qnn_executor_runner --model_path ./my_model_fp16.pte  --input_list_path ./raw_list.txt  \n\n[INFO] [Qnn ExecuTorch]: Deserializing processed data using QnnContextCustomProtocol\n[INFO] [Qnn ExecuTorch]: create QNN Logger with log_level 1\n[INFO] [Qnn ExecuTorch]: Initialize Qnn backend parameters for Qnn executorch backend type 2\n[INFO] [Qnn ExecuTorch]: Caching: Caching is in RESTORE MODE.\n[INFO] [Qnn ExecuTorch]: QnnContextCustomProtocol expected magic number: 0x5678abcd but get: 0x2000000\n[INFO] [Qnn ExecuTorch]: Running level=1 optimization.\nI 00:00:00.150474 executorch:qnn_executor_runner.cpp:313] Method loaded.\nE 00:00:00.156807 executorch:method.cpp:1274] Output 0 is memory planned, or is a constant. Cannot override the existing data pointer.\nI 00:00:00.156838 executorch:qnn_executor_runner.cpp:373] ignoring error from set_output_data_ptr(): 0x2\nE 00:00:00.157118 executorch:method.cpp:1274] Output 1 is memory planned, or is a constant. Cannot override the existing data pointer.\nI 00:00:00.157144 executorch:qnn_executor_runner.cpp:373] ignoring error from set_output_data_ptr(): 0x2\nE 00:00:00.158031 executorch:method.cpp:1274] Output 2 is memory planned, or is a constant. Cannot override the existing data pointer.\nI 00:00:00.158057 executorch:qnn_executor_runner.cpp:373] ignoring error from set_output_data_ptr(): 0x2\nI 00:00:00.158069 executorch:qnn_executor_runner.cpp:376] Inputs prepared.\nI 00:00:00.158198 executorch:qnn_executor_runner.cpp:382] Number of inputs: 1\nI 00:00:00.178327 executorch:qnn_executor_runner.cpp:490] Perform 0 inference for warming up\nI 00:00:00.178343 executorch:qnn_executor_runner.cpp:496] Start inference (0)\n[ERROR] [Qnn ExecuTorch]: QnnDsp <E> DspTransport call failed, error 0x00000010\n\n[ERROR] [Qnn ExecuTorch]: QnnDsp <E> Error from rpc transport\n\n[ERROR] [Qnn ExecuTorch]: QnnDsp <E> Graph forward failed in execution with err 1003\n\n[ERROR] [Qnn ExecuTorch]: qnn_graph_execute failed. Error 1003\nE 00:00:00.192908 executorch:QnnExecuTorchBackend.cpp:176] Fail to execute graph\nE 00:00:00.192912 executorch:method.cpp:1426] CALL_DELEGATE execute failed at instruction 0: 0x1\nI 00:00:00.192924 executorch:qnn_executor_runner.cpp:514] 1 inference took 14.576000 ms, avg 14.576000 ms\nF 00:00:00.192943 executorch:qnn_executor_runner.cpp:519] In function main(), assert failed (status == Error::Ok): Execution of method forward failed with status 0x1\nAborted\n\ncc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @cbilgin",
    "url": "https://github.com/pytorch/executorch/issues/15978",
    "state": "open",
    "labels": [
      "partner: qualcomm",
      "module: qnn"
    ],
    "created_at": "2025-11-25T15:14:00Z",
    "updated_at": "2025-12-19T02:26:49Z",
    "comments": 3,
    "user": "eliyam32"
  },
  {
    "repo": "pytorch/executorch",
    "number": 15973,
    "title": "What should I do if there is SoC for my processor?",
    "body": "### \ud83d\udcda The doc issue\n\nHello. I have a device with a Snapdragon 685 processor, it is not on the Qualcomm SoCs list. In this case, the only thing left for me is to convert via Xnnpack? And will the model converted via Xnnpack work on android?\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @cbilgin",
    "url": "https://github.com/pytorch/executorch/issues/15973",
    "state": "open",
    "labels": [
      "partner: qualcomm",
      "module: qnn"
    ],
    "created_at": "2025-11-25T13:29:32Z",
    "updated_at": "2025-11-26T01:50:30Z",
    "user": "kejndan"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29409,
    "title": "[Usage]: Custom Logits Processors V1 how to get tokenizer into processor",
    "body": "### Problem with tokenizer\n\nFor the second day now, I've been unable to figure out how to get a tokenizer inside a custom processor. I used the processor from the documentation as an example. I examined each object through debug, but couldn't find where to extract the tokenizer. In v0, this was done simply at the request level, by passing an argument to the object. \nHow to pass a tokenizer to the processor?\n```python import torch\nfrom vllm.config import VllmConfig\nfrom vllm.sampling_params import SamplingParams\nfrom vllm.v1.sample.logits_processor import (BatchUpdate,\n                                            LogitsProcessor,\n                                            MoveDirectionality)\n\n\n\nclass DummyLogitsProcessor(LogitsProcessor):\n    \"\"\"Fake logit processor to support unit testing and examples\"\"\"\n\n    @classmethod\n    def validate_params(cls, params: SamplingParams):\n        target_token: int | None = params.extra_args and params.extra_args.get(\n            \"target_token\"\n        )\n        \n        \n        if target_token is not None and not isinstance(target_token, int):\n            raise ValueError(f\"target_token value {target_token} is not int\")\n\n    def __init__(self, vllm_config: \"VllmConfig\", device: torch.device,\n                is_pin_memory: bool):\n        self.req_info: dict[int, int] = {}\n        \n    def is_argmax_invariant(self) -> bool:\n        \"\"\"Never impacts greedy sampling\"\"\"\n        return False\n\n    def update_state(self, batch_update: BatchUpdate | None):\n        \n        if not batch_update:\n            return\n        # Process added requests.\n        for index, params, _, _ in batch_update.added:\n            assert params is not None\n            self.validate_params(params)\n            if params.extra_args and (target_token :=\n                                    params.extra_args.get(\"target_token\")):\n                self.req_info[index] = target_token\n            else: \n                self.req_info.pop(index, None)\n\n        if self.req_info:\n            # Process removed requests.\n            for index in batch_update.removed:\n                self.req_info.pop(index, None)\n\n            # Process moved requests, unidirectional move (a->b) and swap\n            # (a<->b)\n            for adx, bdx, direct in batch_update.moved:\n                a_val = self.req_info.pop(adx, None)\n                b_val = self.req_info.pop(bdx, None)\n                if a_val is not None:\n                    self.req_info[bdx] = a_val\n                if direct == MoveDirectionality.SWAP and b_val is not None:\n                    self.req_info[adx] = b_val\n\n    def apply(self, logits: torch.Tensor) -> torch.Tensor:\n        if not self.req_info:\n            return logits\n        # Save target values before modification\n        cols = torch.tensor(\n            list(self.req_info.values()), dtype=torch.long, device=logits.device\n        )\n        rows = torch.tensor(\n            list(self.req_info.keys()), dtype=torch.long, device=logits.device\n        )\n        values_to_keep = logits[rows, cols].clone()\n\n        # Mask all but target tokens\n        logits[rows] = float('-inf')\n        logits[rows, cols] = values_to_keep\n\n        return logits\n\n```\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29409",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-25T13:24:17Z",
    "updated_at": "2025-12-02T10:33:18Z",
    "comments": 6,
    "user": "cvadim130"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 2086,
    "title": "mxfp8 MoE train is slower for DeepSeekV3 16b and Qwen models",
    "body": "I have tested **mxfp8** train for **Qwen** MoE models, and for **DeepSeekV3 16b** on **B200**. It did not show any speed up and even slows down in some case when I use mxfp8 (quantize.grouped_mm.mx).\n\nI found [this](https://github.com/pytorch/ao/tree/main/torchao/prototype/moe_training#low-precision-moe-training) in torchao repo, saying that mxfp8 gives up to 1.6x speed up for DeepSeekV3 671b. Looks like it works only for big MoE models?\n\nI have tried benchmarking of single MoE layer like [here](https://github.com/pytorch/ao/tree/main/torchao/prototype/moe_training#benchmark-single-moe-layer-forward--backward-pass).\nThis is what I got with dims used in [DeepSeekV3 16b](https://github.com/pytorch/torchtitan/blob/7e10d6052a8029592a37d1c843dc7949a6b30043/torchtitan/models/deepseek_v3/__init__.py#L78) [dim=2048, moe_inter_dim=1408]:\n```\n$ python -m benchmarks.prototype.moe_training.bench_moe_layer   --recipe mxfp8   --local_batch_size=16   --dim=2048   --hidden_dim=1408   --local_num_experts=8\ntotal_M: 131072, N: 1408, K: 2048\nbf16 time: 16.882 ms\nmxfp8 time: 17.710 ms\nspeedup: 0.953x\n```\n\nI couldn't get any speedup on Qwen3 [235B-A22B](https://github.com/pytorch/torchtitan/blob/7e10d6052a8029592a37d1c843dc7949a6b30043/torchtitan/models/qwen3/__init__.py#L168) and [30B-A3B](https://github.com/pytorch/torchtitan/blob/7e10d6052a8029592a37d1c843dc7949a6b30043/torchtitan/models/qwen3/__init__.py#L145) too.\nBenchmarking of MoE layer with dims form Qwen3 235B-A22B [dim=4096, moe_inter_dim=1536] is following:\n```\n$ python -m benchmarks.prototype.moe_training.bench_moe_layer   --recipe mxfp8   --local_batch_size=16   --dim=4096   --hidden_dim=1536   --local_num_experts=8\ntotal_M: 131072, N: 1536, K: 4096\nbf16 time: 34.154 ms\nmxfp8 time: 34.196 ms\nspeedup: 0.999x\n```\n\n\nIs there a any way, how I can get speed up using mxfp8 for above models?\n",
    "url": "https://github.com/pytorch/torchtitan/issues/2086",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-25T10:33:42Z",
    "updated_at": "2025-11-26T16:44:51Z",
    "comments": 2,
    "user": "Yerniyaz"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29389,
    "title": "[Bug]: race condition in shm_broadcast.py",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\n# Problem\n`ShmRingBuffer` is a lock-free queue, the implementation of which https://github.com/vllm-project/vllm/blob/12c007e288bf5c0ae3bd438036fbafbad88e706b/vllm/distributed/device_communicators/shm_broadcast.py#L98-L153\n\nrelies on the fact that when a flag is written to, signalling a valid state, the associated data is also in a valid state. To illustrate the point, consider the program\n```python\nshm = shared_memory.SharedMemory(..., size=128)\n# set shm to 0\n\n# process 1\nshm[0] = 1\nshm[64] = 1\n\n# process 2\nwhile shm[64] != 1:\n    pass\nprint(shm[0])\n```\n`ShmRingBuffer` requires that `print(shm[0])` always prints `1`. **There is no guarantee this is true**. For this to be true,\n1. The Python language/implementation must provide a memory model, which it doesn't. Loosely speaking, a memory model is a set of guarantees on how source code maps to hardware instructions.\n2. Even if we assume the source code maps \"as intended\" to hardware instructions, the hardware must ensure that process 2 must observe the writes to `shm[0]` and `shm[64]` in the same order as process 1.\n\nAn example of 2 breaking down is given in [`race_condition.cpp`](https://gist.github.com/nvjullin/cc52386e291fe41218b54406ece962a0). On an ARM CPU,\n```bash\n$ g++ -std=c++17 race_condition.cpp\n$ ./a.out\nnumber of violations: 5\n# ...\n```\nUnfortunately, I don't know how to demonstrate the same race condition in Python.\n\n\n# What it means\n`ShmRingBuffer` can have corrupted memory and crashes vLLM sporadically. Such a crash would be near impossible to reproduce and debug.\n\n\n# Solutions\nIn order of recommendation:\n1. Remove `ShmRingBuffer` and always use the fallback `self.local_socket.send(serialized_obj)`. This is the simplest.\n2. Use a well-tested lock-free queue implementation and don't write our own. Lock-free programming is notoriously difficult to write correctly, requires expertise to understand and is overall a maintenence nightmare.\n3. Write it in C++ with proper atomics that guarantees the ordering of writes. The implementation should document extensively the proof of its correctness across different architectures. Python provides no tools for lock-free programming, making it impossible to write.\n\nCC @youkaichao @nvpohanh \n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29389",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-25T09:25:52Z",
    "updated_at": "2025-11-25T09:25:52Z",
    "comments": 0,
    "user": "nvjullin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169050,
    "title": "[Graph Partition] [Inductor] UnboundLocalError: cannot access local variable 'buf271' where it is not associated with a value",
    "body": "### \ud83d\udc1b Describe the bug\n\nUsing \"reduce-overhead\" mode and \"inductor backend for training, with `torch._inductor.config.graph_partition = True`. Run into inductor gen-code bug:\n\n```\n[rank0]:   File \"/home/tiger/.local/lib/python3.11/site-packages/torch/_dynamo/eval_frame.py\", line 1044, in _fn\n[rank0]:     return fn(*args, **kwargs)\n[rank0]:            ^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/home/tiger/.local/lib/python3.11/site-packages/torch/_functorch/aot_autograd.py\", line 1130, in forward\n[rank0]:     return compiled_fn(full_args)\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/home/tiger/.local/lib/python3.11/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py\", line 339, in runtime_wrapper\n[rank0]:     all_outs = call_func_at_runtime_with_args(\n[rank0]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/home/tiger/.local/lib/python3.11/site-packages/torch/_functorch/_aot_autograd/utils.py\", line 129, in call_func_at_runtime_with_args\n[rank0]:     out = normalize_as_list(f(args))\n[rank0]:                             ^^^^^^^\n[rank0]:   File \"/home/tiger/.local/lib/python3.11/site-packages/torch/_functorch/_aot_autograd/utils.py\", line 103, in g\n[rank0]:     return f(*args)\n[rank0]:            ^^^^^^^^\n[rank0]:   File \"/home/tiger/.local/lib/python3.11/site-packages/torch/autograd/function.py\", line 581, in apply\n[rank0]:     return super().apply(*args, **kwargs)  # type: ignore[misc]\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/home/tiger/.local/lib/python3.11/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py\", line 2118, in forward\n[rank0]:     fw_outs = call_func_at_runtime_with_args(\n[rank0]:               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/home/tiger/.local/lib/python3.11/site-packages/torch/_functorch/_aot_autograd/utils.py\", line 129, in call_func_at_runtime_with_args\n[rank0]:     out = normalize_as_list(f(args))\n[rank0]:                             ^^^^^^^\n[rank0]:   File \"/home/tiger/.local/lib/python3.11/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py\", line 526, in wrapper\n[rank0]:     return compiled_fn(runtime_args)\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/home/tiger/.local/lib/python3.11/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py\", line 690, in inner_fn\n[rank0]:     unwrapped_outs = compiled_fn(unwrapped_args)\n[rank0]:                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/home/tiger/.local/lib/python3.11/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py\", line 724, in inner_fn\n[rank0]:     outs = compiled_fn(args)\n[rank0]:            ^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/home/tiger/.local/lib/python3.11/site-packages/torch/_inductor/output_code.py\", line 613, in __call__\n[rank0]:     return self.current_callable(inputs)\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/home/tiger/.local/lib/python3.11/site-packages/torch/_inductor/utils.py\", line 3017, in run\n[rank0]:     out = model(new_inputs)\n[rank0]:           ^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/tmp/torchinductor_tiger/tmpngii2htx/na/cnabkmabktacecyr75a7sgnkip7pjfcd672lse2ndmzilbphpxxh.py\", line 5071, in call\n[rank0]:     partition1_args = [buf301, buf305, buf306, primals_42, buf311, buf286, primals_45, buf294, buf271, s54, u0, u1]\n[rank0]:                                                                                                ^^^^^^\n[rank0]: UnboundLocalError: cannot access local variable 'buf271' where it is not associated with a value\n```\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.9.1+cu129\nIs debug build: False\nCUDA used to build PyTorch: 12.9\nROCM used to build PyTorch: N/A\n\nOS: Debian GNU/Linux 12 (bookworm) (x86_64)\nGCC version: (Debian 12.2.0-14+deb12u1) 12.2.0\nClang version: Could not collect\nCMake version: version 3.31.6\nLibc version: glibc-2.36\n\nPython version: 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0] (64-bit runtime)\nPython platform: Linux-5.15.152.bsk.10-amd64-x86_64-with-glibc2.36\nIs CUDA available: True\nCUDA runtime version: 12.9.86\nCUDA_MODULE_LOADING set to: \nGPU models and configuration: GPU 0: NVIDIA H800\nNvidia driver version: 535.261.03\ncuDNN version: Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.11.0\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                       x86_64\nCPU op-mode(s):                     32-bit, 64-bit\nAddress sizes:                      52 bits physical, 57 bits virtual\nByt",
    "url": "https://github.com/pytorch/pytorch/issues/169050",
    "state": "open",
    "labels": [
      "triaged",
      "module: cuda graphs",
      "oncall: pt2",
      "module: inductor"
    ],
    "created_at": "2025-11-25T08:29:02Z",
    "updated_at": "2025-12-01T22:19:24Z",
    "user": "wmhst7"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29382,
    "title": "[Doc]: Expert Parallel Deployment says \"Tensor parallel size (always 1 for now)\" is confusing",
    "body": "### \ud83d\udcda The doc issue\n\nOn page https://docs.vllm.ai/en/latest/serving/expert_parallel_deployment/#single-node-deployment it says Tensor parallel size can only be 1 but didn't mention the behavior of Attention Layers\n\nOn page https://docs.vllm.ai/en/latest/serving/data_parallel_deployment/ it says The expert layers will by default form a (DP x TP) sized tensor parallel group. To enable expert parallelism, include the --enable-expert-parallel CLI arg (on all nodes in the multi-node case).\n\nwhich is rather confusing.\n\n### Suggest a potential alternative/fix\n\nPoint out the correct behavior of MoE models when TP, EP are both set.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29382",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-11-25T07:54:42Z",
    "updated_at": "2025-12-13T17:38:01Z",
    "comments": 0,
    "user": "xeonliu"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42375,
    "title": "SAM3 single image inference with multiple text prompt",
    "body": "Hi\nI'm trying to run inference on a single image, aiming to get the bbox of objects from several different categories (e.g. \"a person\" and \"a car\").\nthe only example i found for prompting with multiple categories is in the \"Batched Inference with Text Prompts\" example, but then i need to unnecessarily duplicate my image as the # of categories.\n\nis there a different more efficient way of achieving this? \n\np.s\nwhen i try prompting with a list of several categories and a single image i get an error.\n",
    "url": "https://github.com/huggingface/transformers/issues/42375",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-25T06:20:09Z",
    "updated_at": "2026-01-05T16:16:01Z",
    "comments": 9,
    "user": "iariav"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169035,
    "title": "[Question] Why torch.ops.symm_mem.multimem_all_reduce_() don't support e4m3, e5m2, fp16?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHi PyTorch developer,\n\nIs there any reason why torch.ops.symm_mem.multimem_all_reduce_() don't support e4m3, e5m2, fp16? From CUDA PTX doc https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-multimem, those data type were supported in multimem.ld_reduce. From latest NCCL code https://github.com/NVIDIA/nccl/blob/master/src/device/symmetric/generate.py#L54, NCCL also support multimem.ld_reduce based fp8 & fp16.\n\nIt seems like enable those data type doesn't require much engineering efforts. My guess is there's likely some accuracy issue PyTorch folks have found that block fp16/e5m2/e4m3 integration? Can we get more info on this? Also, should we expected torch symmetric memory to support fp16 & fp8 in near future?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci",
    "url": "https://github.com/pytorch/pytorch/issues/169035",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "module: symm_mem"
    ],
    "created_at": "2025-11-25T02:39:22Z",
    "updated_at": "2025-11-26T15:00:34Z",
    "comments": 0,
    "user": "XiaoSong9905"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169033,
    "title": "Pytorch CI is partially paused for the time being (updated 11/27)",
    "body": "## Current Status\n*ongoing*. Linux and Windows runners are re-enabled as of 12pm 11/27. Mac runners and ROCM/H100 still disabled.\n\n## Error looks like\n*No CI was running at all. No merges were processed.*\n\n## Incident timeline (all times pacific)\n*Include when the incident began, when it was detected, mitigated, root caused, and finally closed.*\n\n## User impact\n*How does this affect users of PyTorch CI?*\n\n## Root cause\n*What was the root cause of this issue?*\n\n## Mitigation\n*How did we mitigate the issue?*\n\n## Prevention/followups\n*How do we prevent issues like this in the future?*\n\n\ncc @seemethere @pytorch/pytorch-dev-infra",
    "url": "https://github.com/pytorch/pytorch/issues/169033",
    "state": "closed",
    "labels": [
      "module: ci",
      "triaged"
    ],
    "created_at": "2025-11-25T01:57:30Z",
    "updated_at": "2025-12-07T20:08:54Z",
    "comments": 3,
    "user": "malfet"
  },
  {
    "repo": "huggingface/trl",
    "number": 4569,
    "title": "[doc issue] doc on \"GRPO with replay buffer\" buggy",
    "body": "### Reproduction\n\nThe code example in [doc for \"GRPO with replay buffer\"](https://huggingface.co/docs/trl/main/en/experimental#grpo-with-replay-buffer) is kind of buggy. \n\n- It imports `GRPOWithReplayBufferTrainer` but never used. \n- It uses `GRPOWithReplayBufferConfig` but never imported\n- The code is apparently not executable.\n\n\nBelow is the code example given in the doc: \n\n```python\nfrom trl.experimental.grpo_with_replay_buffer import GRPOWithReplayBufferTrainer\nfrom datasets import load_dataset\n\ndataset = load_dataset(\"trl-internal-testing/zen\", \"standard_prompt_only\", split=\"train\")\n\n# Guarantee that some rewards have 0 std\ndef custom_reward_func(completions, **kwargs):\n    if torch.rand(1).item() < 0.25:\n        return [0] * len(completions)  # simulate some None rewards\n    else:\n        return torch.rand(len(completions)).tolist()\n\ntraining_args = GRPOWithReplayBufferConfig(\n    output_dir=self.tmp_dir,\n    learning_rate=1e-4,\n    per_device_train_batch_size=4,\n    num_generations=4,\n    max_completion_length=8,\n    replay_buffer_size=8,\n    report_to=\"none\",\n)\ntrainer = GRPOTrainer(\n    model=\"trl-internal-testing/tiny-Qwen2ForCausalLM-2.5\",\n    reward_funcs=[custom_reward_func],\n    args=training_args,\n    train_dataset=dataset,\n)\n\nprevious_trainable_params = {n: param.clone() for n, param in trainer.model.named_parameters()}\n\ntrainer.train()\n```\n\n\n### System Info\n\nNA\n\n### Checklist\n\n- [x] I have checked that my issue isn't already filed (see [open issues](https://github.com/huggingface/trl/issues?q=is%3Aissue))\n- [x] I have included my system information\n- [x] Any code provided is minimal, complete, and reproducible ([more on MREs](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks))\n- [x] Any code provided is properly formatted in code blocks, (no screenshot, [more on code blocks](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks))\n- [x] Any traceback provided is complete",
    "url": "https://github.com/huggingface/trl/issues/4569",
    "state": "closed",
    "labels": [
      "\ud83d\udc1b bug",
      "\ud83d\udcda documentation",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-11-25T01:30:28Z",
    "updated_at": "2025-11-25T21:28:00Z",
    "comments": 2,
    "user": "DNXie"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169002,
    "title": "Torch dynamo fails to do proper type promotion during export",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhen I tried to use torch.where with a boolean tensor, a float, and and int, torch dynamo tripped up on doing type promotion, and gave me a really unclear error message on what was wrong. When I explicitly converted the int input to float, it worked. Can we develop proper type promotion in the tracer internally?\n\n\nError message:\n```\nExporting to ONNX with dynamo=True...\nW1124 11:47:57.487000 1846666 miniconda3/envs/py310/lib/python3.10/site-packages/torch/onnx/_internal/exporter/_compat.py:114] Setting ONNX exporter to use operator set version 18 because the requested opset_version 17 is a lower version than we have implementations for. Automatic version conversion will be performed, which may not be successful at converting to the requested version. If version conversion is unsuccessful, the opset version of the exported model will be kept at 18. Please consider setting opset_version >=18 to leverage latest ONNX features\n[torch.onnx] Obtain model graph for `TestModel()` with `torch.export.export(..., strict=False)`...\n[torch.onnx] Obtain model graph for `TestModel()` with `torch.export.export(..., strict=False)`... \u2705\n[torch.onnx] Run decomposition...\n[torch.onnx] Run decomposition... \u274c\nTraceback (most recent call last):\n  File \"/home/aboubezari/miniconda3/envs/py310/lib/python3.10/site-packages/torch/onnx/_internal/exporter/_core.py\", line 1416, in export\n    decomposed_program = _prepare_exported_program_for_export(\n  File \"/home/aboubezari/miniconda3/envs/py310/lib/python3.10/site-packages/torch/onnx/_internal/exporter/_core.py\", line 984, in _prepare_exported_program_for_export\n    _fx_passes.insert_type_promotion_nodes(graph_module)\n  File \"/home/aboubezari/miniconda3/envs/py310/lib/python3.10/site-packages/torch/onnx/_internal/exporter/_fx_passes.py\", line 28, in insert_type_promotion_nodes\n    passes.InsertTypePromotion(module).run()\n  File \"/home/aboubezari/miniconda3/envs/py310/lib/python3.10/site-packages/torch/onnx/_internal/fx/_pass.py\", line 235, in run\n    return self._run(*args, **kwargs)\n  File \"/home/aboubezari/miniconda3/envs/py310/lib/python3.10/site-packages/torch/onnx/_internal/fx/passes/type_promotion.py\", line 1666, in _run\n    self.interpreter.run(*fake_args)\n  File \"/home/aboubezari/miniconda3/envs/py310/lib/python3.10/site-packages/torch/fx/interpreter.py\", line 174, in run\n    self.env[node] = self.run_node(node)\n  File \"/home/aboubezari/miniconda3/envs/py310/lib/python3.10/site-packages/torch/onnx/_internal/fx/passes/type_promotion.py\", line 1583, in run_node\n    self._maybe_promote_node(n, rule)\n  File \"/home/aboubezari/miniconda3/envs/py310/lib/python3.10/site-packages/torch/onnx/_internal/fx/passes/type_promotion.py\", line 1564, in _maybe_promote_node\n    self._rerun_node_after_type_promotion(node, type_promotion_info.out_dtype)\n  File \"/home/aboubezari/miniconda3/envs/py310/lib/python3.10/site-packages/torch/onnx/_internal/fx/passes/type_promotion.py\", line 1389, in _rerun_node_after_type_promotion\n    node.target = find_compatible_op_overload(target.overloadpacket, args, kwargs)\n  File \"/home/aboubezari/miniconda3/envs/py310/lib/python3.10/site-packages/torch/onnx/_internal/fx/passes/type_promotion.py\", line 1318, in find_compatible_op_overload\n    assert new_op_overload.overloadpacket == op, (\nAssertionError: Expected same OpOverload packet, got prim.device != aten.where\n```\nReproduce:\n```python\n\nimport os\n\nimport torch\n\n# Disable CUDA to match the user's environment\nos.environ['CUDA_VISIBLE_DEVICES'] = ''\ntorch.cuda.is_available = lambda: False\n\n\nclass TestModel(torch.nn.Module):\n    \"\"\"Simple model that reproduces the torch.where type promotion issue.\"\"\"\n\n    def __init__(self):\n        super().__init__()\n\n    def forward(self, attention_mask):\n        \"\"\"Forward pass that uses torch.where with scalar arguments.\n        \"\"\"\n        # This fails with Expected same OpOverload packet, got prim.device != aten.where\n        attention_mask = torch.where(attention_mask, 0, -1000.0)\n\n        # This works!!\n        # attention_mask = torch.where(attention_mask, float(0), -1000.0)\n        return attention_mask\n\n\n\"\"\"Main function to run the reproduction.\"\"\"\nprint(\"Creating model...\")\nmodel = TestModel()\nmodel.eval()\nmodel = model.cpu()\n\n# Shape: [batch, num_heads, seq_len, seq_len] or similar 4D shape\nprint(\"Creating sample inputs...\")\nattention_mask = torch.randn(1, 1, 1505, 1505) > 0  # 4D boolean tensor\nattention_mask = attention_mask.cpu()\n\nprint(f\"Attention mask shape: {attention_mask.shape}\")\nprint(f\"Attention mask dtype: {attention_mask.dtype}\")\n\n# Test forward pass first\nprint(\"\\nTesting forward pass...\")\nwith torch.no_grad():\n    output = model(attention_mask)\nprint(f\"Forward pass successful. Output shape: {output.shape}\")\nprint(f\"Output dtype: {output.dtype}\")\n\n# Export to ONNX with dynamo=True to trigger type promotion pass\nprint(\"\\nExporting to ONNX with dynamo=True...\")\n\nonnx_path = \"where_reproduce.onnx\"\n\ntorch.onnx.export(\n    model,\n    (atten",
    "url": "https://github.com/pytorch/pytorch/issues/169002",
    "state": "open",
    "labels": [
      "oncall: pt2",
      "oncall: export"
    ],
    "created_at": "2025-11-24T19:51:33Z",
    "updated_at": "2025-12-02T20:20:47Z",
    "comments": 1,
    "user": "aboubezari"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 169000,
    "title": "Dr CI is temporarily not working due to API fairewall",
    "body": "\n## Current Status\nongoing\n\n## Incident timeline (all times pacific)\nSince Nov 21st, 2025\n\n## User impact\n*How does this affect users of PyTorch CI?*\nThe jobs and Pr that depends on Dr CI will see no update.\n\n## Root cause\n*What was the root cause of this issue?*\nWe changed the configuration of our firewall, this changes affected all bot jobs, and can make bots have failed api call \n\n## Mitigation\n*How did we mitigate the issue?*\ncurrently dev infra team is working on fixing it\n\n",
    "url": "https://github.com/pytorch/pytorch/issues/169000",
    "state": "closed",
    "labels": [
      "ci: sev"
    ],
    "created_at": "2025-11-24T19:22:26Z",
    "updated_at": "2025-12-01T22:13:09Z",
    "comments": 3,
    "user": "yangw-dev"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 168993,
    "title": "[CI][B200] DGXB200-07 Is Having NVIDIA-CONTAINER-TOOLKIT Related Issues",
    "body": "## Current Status\nOn-going \n## Error looks like\nOnly affecting periodic jobs, not PR blocking. \nErrors are like: (Using https://github.com/pytorch/pytorch/actions/runs/19630438757/job/56210849037  for example) \n\ndocker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running prestart hook #0: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'\nnvidia-container-cli: detection error: driver rpc error: timed out: unknown\n\n\n\n## Incident timeline (all times pacific)\nFirst noticed this from this job: https://github.com/pytorch/pytorch/actions/runs/19626056398/job/56197556152\nWhich was Nov 23rd 10pm. \n\n## User impact\n*How does this affect users of PyTorch CI?*\nCommits landed in trunk may be run with B200 periodic job and 1/3 chance the job would land on dgxb200-07 runner, which is the broken one.  \n\n## Root cause\n*What was the root cause of this issue?*\nNot root-caused yet. But only dgxb200-07 is affected. \n\n## Mitigation\n*How did we mitigate the issue?*\nTo be figured out.\n\n## Prevention/followups\n*How do we prevent issues like this in the future?*\nTo be figured out. \n\ncc @ptrblck @msaroufim @eqy @jerryzh168 @tinglvv @seemethere @malfet @pytorch/pytorch-dev-infra @atalman @huydhn ",
    "url": "https://github.com/pytorch/pytorch/issues/168993",
    "state": "closed",
    "labels": [
      "module: cuda",
      "module: ci",
      "triaged"
    ],
    "created_at": "2025-11-24T18:35:16Z",
    "updated_at": "2025-12-02T19:18:32Z",
    "comments": 2,
    "user": "nWEIdia"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 168965,
    "title": "max_autotuned BMM produces wrong result when multiple threads are used",
    "body": "### \ud83d\udc1b Describe the bug\n\nI noticed that when I use aoti_compile_and_package with max_autotune, in certain conditions the result is wrong. Specifically:\n1. It's important to `set_num_threads(4)`. With 1 threads it doesn't reproduce\n2. It's important to do `import cv2`, without it the bug doesn't reproduce\n3. Adding `os.environ['OPENCV_FOR_OPENMP_DYNAMIC_DISABLE'] = '1'` before import fixes the issue\n\nMy explanation of this behavior is that code produced by max_autotune looks like this\n```\nvoid cpp_CppMicroGemmFP32Vec_threaded_mm(const float* X, const float* W, float* Y, const int64_t ks_b_index)\n...\n    #pragma omp parallel num_threads(4)\n    {\n        \n        const int tid = omp_get_thread_num();\n        const int64_t k_group_id = tid / num_Kt_blocks;\n        const int64_t k_slice_id = tid % num_Kt_blocks;\n...\n```\nand the code relies that this block would be really executed 4 times in parallel. But if you call `omp_set_dynamic`, openmp can ignore this thread hint and run the code less times that leads to wrong results and this behavior is documented [here](https://www.openmp.org/spec-html/5.0/openmpsu35.html#x55-860002.6.1). Unfortunatly omp_set_dynamic is called while I'm importing `cv2` library, specifically [here](https://github.com/opencv/opencv/blob/4.x/modules/core/src/parallel.cpp#L470) when just loading shared library.\nSo, I think it should be fixed somehow, to not depend on this kind of OMP behavior, and maybe even use at::parallel_for instead, because different parallelizing backends can be enabled, not necessary openmp\n\n[This](https://colab.research.google.com/drive/1fDz0ZcDbYhluSTQ-ldPcZebS65YPP5KX?usp=sharing) notebook should reproduce the bug, but I didn't manage to do it in colab because there max_autotune chooses different implementation and pytorch version is also different.\n\n[data.zip](https://github.com/user-attachments/files/23722728/data.zip)\n\nOn pytorch 2.9 it doesn't reproduce, but I noticed that the generated code is using different constants. Maybe layout of input tensors in BMM has changed, so the bug isn't triggered, but anyway the code still relies on the invariant that actuall executed count is equal to `#pragma omp parallel num_threads=N`\n\n### Error logs\n\n_No response_\n\n### Versions\n\n```\nCollecting environment information...\nPyTorch version: 2.7.0\nIs debug build: False\nCUDA used to build PyTorch: 12.4\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.3 LTS (aarch64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version: Could not collect\nCMake version: Could not collect\nLibc version: glibc-2.39\n\nPython version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-5.15.0-134-generic-aarch64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: GPU 0: NVIDIA L40S\nNvidia driver version: 550.127.05\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         aarch64\nCPU op-mode(s):                       32-bit, 64-bit\nByte Order:                           Little Endian\nCPU(s):                               128\nOn-line CPU(s) list:                  0-127\nVendor ID:                            ARM\nModel name:                           Neoverse-N1\nModel:                                1\nThread(s) per core:                   1\nCore(s) per cluster:                  128\nSocket(s):                            -\nCluster(s):                           1\nStepping:                             r3p1\nFrequency boost:                      disabled\nCPU(s) scaling MHz:                   41%\nCPU max MHz:                          3000.0000\nCPU min MHz:                          1000.0000\nBogoMIPS:                             50.00\nFlags:                                fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp\nL1d cache:                            8 MiB (128 instances)\nL1i cache:                            8 MiB (128 instances)\nL2 cache:                             128 MiB (128 instances)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-127\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; CSV2, BHB\nVulnerability Srbds:                  Not affected",
    "url": "https://github.com/pytorch/pytorch/issues/168965",
    "state": "open",
    "labels": [
      "triaged",
      "module: correctness (silent)",
      "oncall: pt2",
      "oncall: export",
      "oncall: cpu inductor",
      "module: aotinductor"
    ],
    "created_at": "2025-11-24T12:41:52Z",
    "updated_at": "2025-12-11T12:23:10Z",
    "comments": 6,
    "user": "mstebelev"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29306,
    "title": "[Usage]: dots.llm.inst is not running due to a type error",
    "body": "### Your current environment\n\nI'm trying to run dots llm on 4xH100\n\n```\nvllm serve \\\n --uvicorn-log-level=info \\\n rednote-hilab/dots.llm1.inst \\\n --dtype auto \\\n --api-key xxx \\\n --host 0.0.0.0 \\\n --port 8000 \\\n --tensor-parallel-size 4\n --ipc=host \\\n --trust-remote-code\n```\n\nIt failed to run, I got the following crash:\n\n```text\n(EngineCore_DP0 pid=10684) ERROR 11-24 09:41:25 [v1/executor/multiproc_executor.py:230] Worker proc VllmWorker-1 died unexpectedly, shutting down executor.\n(EngineCore_DP0 pid=10684) Process EngineCore_DP0:\n(EngineCore_DP0 pid=10684) Traceback (most recent call last):\n(EngineCore_DP0 pid=10684)   File \"/usr/lib/python3.12/multiprocessing/process.py\", line 314, in _bootstrap\n(EngineCore_DP0 pid=10684)     self.run()\n(EngineCore_DP0 pid=10684)   File \"/usr/lib/python3.12/multiprocessing/process.py\", line 108, in run\n(EngineCore_DP0 pid=10684)     self._target(*self._args, **self._kwargs)\n(EngineCore_DP0 pid=10684)   File \"/home/ubuntu/venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 846, in run_engine_core\n(EngineCore_DP0 pid=10684)     raise e\n(EngineCore_DP0 pid=10684)   File \"/home/ubuntu/venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 833, in run_engine_core\n(EngineCore_DP0 pid=10684)     engine_core = EngineCoreProc(*args, **kwargs)\n(EngineCore_DP0 pid=10684)                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(EngineCore_DP0 pid=10684)   File \"/home/ubuntu/venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 606, in __init__\n(EngineCore_DP0 pid=10684)     super().__init__(\n(EngineCore_DP0 pid=10684)   File \"/home/ubuntu/venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 109, in __init__\n(EngineCore_DP0 pid=10684)     num_gpu_blocks, num_cpu_blocks, kv_cache_config = self._initialize_kv_caches(\n(EngineCore_DP0 pid=10684)                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(EngineCore_DP0 pid=10684)   File \"/home/ubuntu/venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 231, in _initialize_kv_caches\n(EngineCore_DP0 pid=10684)     available_gpu_memory = self.model_executor.determine_available_memory()\n(EngineCore_DP0 pid=10684)                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(EngineCore_DP0 pid=10684)   File \"/home/ubuntu/venv/lib/python3.12/site-packages/vllm/v1/executor/abstract.py\", line 126, in determine_available_memory\n(EngineCore_DP0 pid=10684)     return self.collective_rpc(\"determine_available_memory\")\n(EngineCore_DP0 pid=10684)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(EngineCore_DP0 pid=10684)   File \"/home/ubuntu/venv/lib/python3.12/site-packages/vllm/v1/executor/multiproc_executor.py\", line 358, in collective_rpc\n(EngineCore_DP0 pid=10684)     return aggregate(get_response())\n(EngineCore_DP0 pid=10684)                      ^^^^^^^^^^^^^^\n(EngineCore_DP0 pid=10684)   File \"/home/ubuntu/venv/lib/python3.12/site-packages/vllm/v1/executor/multiproc_executor.py\", line 341, in get_response\n(EngineCore_DP0 pid=10684)     raise RuntimeError(\n(EngineCore_DP0 pid=10684) RuntimeError: Worker failed with error 'TypeError: can't multiply sequence by non-int of type 'float'\n\n\n(EngineCore_DP0 pid=11385) ERROR 11-24 09:45:27 [v1/engine/core.py:842] EngineCore failed to start.\n(EngineCore_DP0 pid=11385) ERROR 11-24 09:45:27 [v1/engine/core.py:842] Traceback (most recent call last):\n(EngineCore_DP0 pid=11385) ERROR 11-24 09:45:27 [v1/engine/core.py:842]   File \"/home/ubuntu/venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 833, in run_engine_core\n(EngineCore_DP0 pid=11385) ERROR 11-24 09:45:27 [v1/engine/core.py:842]     engine_core = EngineCoreProc(*args, **kwargs)\n(EngineCore_DP0 pid=11385) ERROR 11-24 09:45:27 [v1/engine/core.py:842]                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(EngineCore_DP0 pid=11385) ERROR 11-24 09:45:27 [v1/engine/core.py:842]   File \"/home/ubuntu/venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 606, in __init__\n(EngineCore_DP0 pid=11385) ERROR 11-24 09:45:27 [v1/engine/core.py:842]     super().__init__(\n(EngineCore_DP0 pid=11385) ERROR 11-24 09:45:27 [v1/engine/core.py:842]   File \"/home/ubuntu/venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 109, in __init__\n(EngineCore_DP0 pid=11385) ERROR 11-24 09:45:27 [v1/engine/core.py:842]     num_gpu_blocks, num_cpu_blocks, kv_cache_config = self._initialize_kv_caches(\n(EngineCore_DP0 pid=11385) ERROR 11-24 09:45:27 [v1/engine/core.py:842]                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(EngineCore_DP0 pid=11385) ERROR 11-24 09:45:27 [v1/engine/core.py:842]   File \"/home/ubuntu/venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 231, in _initialize_kv_caches\n(EngineCore_DP0 pid=11385) ERROR 11-24 09:45:27 [v1/engine/core.py:842]     available_gpu_memory = self.model_executor.determine_available_memory()\n(EngineCore_DP0 pid=11385) ERROR 11-24 09:45:27 [v1/engine/core.py:842]            ",
    "url": "https://github.com/vllm-project/vllm/issues/29306",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-24T09:48:08Z",
    "updated_at": "2025-11-28T23:25:27Z",
    "comments": 1,
    "user": "rain-1"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 2077,
    "title": "Context Parallel for Qwen3",
    "body": "Thanks for supporting Qwen3 models!\n\n> CP is not supported currently because of RoPE embedding implementation details.\n\nAny plan to support CP + EP for Qwen3 MoE models?\nIf no plan in short time, can you help guide how can I implement it myself?",
    "url": "https://github.com/pytorch/torchtitan/issues/2077",
    "state": "open",
    "labels": [
      "high priority",
      "triage review"
    ],
    "created_at": "2025-11-24T08:09:30Z",
    "updated_at": "2025-12-15T23:56:00Z",
    "comments": 8,
    "user": "unavailableun"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42353,
    "title": "SAM3 point mode is not supported yet?",
    "body": "In [SAM3 official example](https://github.com/facebookresearch/sam3/blob/main/examples/sam3_for_sam1_task_example.ipynb\n), they also support point mode. But it seems that transforms has not supported yet?\n",
    "url": "https://github.com/huggingface/transformers/issues/42353",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-24T07:16:52Z",
    "updated_at": "2025-11-26T15:16:25Z",
    "comments": 1,
    "user": "haofanwang"
  },
  {
    "repo": "pytorch/executorch",
    "number": 15956,
    "title": "[QNN] Support for in-place modification of mutable buffers (weights) within the QNN delegate?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\n### Description\nI am working on a model where certain buffers (serving as weights) are updated in-place during the `forward` pass (e.g., zero-order optimization algorithm). \n\nI attempted to export this model and lower it to the QNN backend. My goal is to have the entire graph, including the weight update logic, executed on the QNN backend to avoid context switching between CPU and NPU.\n\n### Current Behavior\nCurrently, it seems that:\n1. The partitioner either rejects the node performing the mutation (fallback to CPU).\n2. Or, if forced, the compiled binary does not reflect the updated weights in subsequent runs (weights are treated as static constants baked into the context binary).\n\n### Question / Request\n1. **Is there native support in the QNN backend** to handle mutable buffers that are modified inside the delegated graph?\n2. If not, is the only recommended workaround to **lift the buffers to graph inputs/outputs** (managing state on the CPU)?\n3. Are there any specific compiler specs or flags (e.g., `take_over_mutable_buffer` equivalent for QNN) that I should be enabling?\n\n### Minimal Reproducible Example (MRE)\nHere is a simplified version of the logic:\n\n```python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom executorch.backends.qualcomm.partition.qnn_partitioner import QnnPartitioner\n# ... other imports ...\n\nclass MutableModel(nn.Module):\n    def __init__(self):\n        super().__init__()\n        # Registering a buffer that acts like a weight\n        self.register_buffer(\"dynamic_weight\", torch.empty(10, 10))\n\n    def forward(self, x):\n        # Update the weight in-place during inference\n        self.dynamic_weight.add_(0.01) \n        # Use the updated weight for computation\n        out = F.linear(x, self.dynamic_weight)\n        return out\n\n# Standard export and lowering flow...\n# ...\n\n### Alternatives\n\nModify the QNN backend kernel to support weight updates\n\n### Additional context\n\n_No response_\n\n### RFC (Optional)\n\n_No response_",
    "url": "https://github.com/pytorch/executorch/issues/15956",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-24T06:07:43Z",
    "updated_at": "2025-11-24T08:40:16Z",
    "comments": 0,
    "user": "qqqqqqqwy"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29297,
    "title": "[Bug]: What should the image embedding input be like? I have tested with multiple cases but it all fails",
    "body": "### Your current environment\n\n```text\n==============================\n        System Info\n==============================\nOS                           : Red Hat Enterprise Linux release 8.10 (Ootpa) (x86_64)\nGCC version                  : (GCC) 8.5.0 20210514 (Red Hat 8.5.0-26)\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.28\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.10.19 (main, Oct 21 2025, 16:43:05) [GCC 11.2.0] (64-bit runtime)\nPython platform              : Linux-4.18.0-553.50.1.el8_10.x86_64-x86_64-with-glibc2.28\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : Could not collect\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA A100-SXM4-40GB\nGPU 1: NVIDIA A100-SXM4-40GB\n\nNvidia driver version        : 575.51.03\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:        x86_64\nCPU op-mode(s):      32-bit, 64-bit\nByte Order:          Little Endian\nCPU(s):              128\nOn-line CPU(s) list: 0-127\nThread(s) per core:  1\nCore(s) per socket:  64\nSocket(s):           2\nNUMA node(s):        8\nVendor ID:           AuthenticAMD\nCPU family:          23\nModel:               49\nModel name:          AMD EPYC 7742 64-Core Processor\nStepping:            0\nCPU MHz:             2250.000\nCPU max MHz:         2250.0000\nCPU min MHz:         1500.0000\nBogoMIPS:            4491.72\nVirtualization:      AMD-V\nL1d cache:           32K\nL1i cache:           32K\nL2 cache:            512K\nL3 cache:            16384K\nNUMA node0 CPU(s):   0-15\nNUMA node1 CPU(s):   16-31\nNUMA node2 CPU(s):   32-47\nNUMA node3 CPU(s):   48-63\nNUMA node4 CPU(s):   64-79\nNUMA node5 CPU(s):   80-95\nNUMA node6 CPU(s):   96-111\nNUMA node7 CPU(s):   112-127\nFlags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip rdpid overflow_recov succor smca sme sev sev_es\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-python==0.5.2\n[pip3] numpy==2.2.6\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cudnn-frontend==1.16.0\n[pip3] nvidia-cufft-cu12==11.3.3.83\n[pip3] nvidia-cufile-cu12==1.13.1.3\n[pip3] nvidia-curand-cu12==10.3.9.90\n[pip3] nvidia-cusolver-cu12==11.7.3.90\n[pip3] nvidia-cusparse-cu12==12.5.8.93\n[pip3] nvidia-cusparselt-cu12==0.7.1\n[pip3] nvidia-cutlass-dsl==4.3.0\n[pip3] nvidia-ml-py==13.580.82\n[pip3] nvidia-nccl-cu12==2.27.5\n[pip3] nvidia-nvjitlink-cu12==12.8.93\n[pip3] nvidia-nvshmem-cu12==3.3.20\n[pip3] nvidia-nvtx-cu12==12.8.90\n[pip3] pyzmq==27.1.0\n[pip3] torch==2.9.0\n[pip3] torchaudio==2.9.0\n[pip3] torchvision==0.24.0\n[pip3] transformers==4.57.1\n[pip3] triton==3.5.0\n[conda] flashinfer-python                    0.5.2                                 pypi_0           pypi\n[conda] numpy                                2.2.6                                 pypi_0           pypi\n[conda] nvidia-cublas-cu12                   12.8.4.1                              pypi_0           pypi\n[conda] nvidia-cuda-cupti-cu12               12.8.90                               pypi_0           pypi\n[conda] nvidia-cuda-nvrtc-cu12               12.8.93                               pypi_0           pypi\n[conda] nvidia-cuda-runtime-cu12             12.8.90                               pypi_0           pypi\n[conda] nvidia-cudnn-cu12                    9.10.2.21                             pypi_0           pypi\n[conda] nvidia-cudn",
    "url": "https://github.com/vllm-project/vllm/issues/29297",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-24T06:02:09Z",
    "updated_at": "2025-11-26T13:00:17Z",
    "comments": 2,
    "user": "DamonZhao-sfu"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29294,
    "title": "[CPU Backend] [Doc]: Update Installation Docs for Arm CPUs",
    "body": "### \ud83d\udcda The doc issue\n\nThis page https://docs.vllm.ai/en/stable/getting_started/installation/cpu/#arm-aarch64 is very out-dated.\nWe now release Arm CPU wheels and images thanks to #26931 and #27331\n\nWe need to update that page to reflect that :)\n\n### Suggest a potential alternative/fix\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29294",
    "state": "closed",
    "labels": [
      "documentation",
      "cpu"
    ],
    "created_at": "2025-11-24T05:33:46Z",
    "updated_at": "2025-12-15T19:46:26Z",
    "comments": 5,
    "user": "fadara01"
  },
  {
    "repo": "pytorch/executorch",
    "number": 15954,
    "title": "qnn_llama_runner on SA8295 outputs repetitive \u201csp\u201d  with Qwen3-1.7B after ExecuTorch export",
    "body": "### \ud83d\udc1b Describe the bug\n\nuse main commit b4d72f1e271915e9c0e1d313753a1eec840fbdee\n\nI have tried some settings, the setting:( when I use other setting, the convert would be failed, and the error \n\" some op has incorrect Value 68, expected >= 73\"\nor\n \" [ERROR] [Qnn ExecuTorch]: fa_alloc.cc:2462::ERROR:graph requires estimated allocation of 2315388 KB, limit is 2097152 KB [ERROR] [Qnn ExecuTorch]: graph_prepare.cc:845::ERROR:error during serialize: memory usage too large\",\n\nWhen using default_quant_dtype = QuantDtype.use_8a8w and disabling the 16a4w_block quantization, the quantization/conversion completes successfully\n`\nclass Qwen3_1_7BQuantRecipe(StaticLLMQuantRecipe):\n    default_quant_dtype = QuantDtype.use_8a8w\n    def __init__(self, verbose: bool = False):\n        super().__init__()\n\n        self.recipe = (\n            QuantRecipe(\n                self.default_quant_dtype,\n                False,\n                act_observer=MinMaxObserver,\n                granularity=QuantGranularity.PER_TENSOR,\n                verbose=verbose,\n            )\n            .add_regex(\n                {\n                    r\"output\\.conv\",\n                },\n                QuantDtype.use_16a8w,\n                False,\n                act_observer=MinMaxObserver,\n                granularity=QuantGranularity.PER_CHANNEL,\n            )\n        )\n        self.recipe.custom_quant_annotations.append(annotate_kv_8bit)\n`\n\nhowever, when running qnn_llama_runner with Qwen3-1.7B converted via ExecuTorch (hybrid QNN .pte) on a Qualcomm SA8295 device, the model generates a long sequence of \u201csp\u201d . \n\n` <|im_start|>user\nwhat is 1+1<|im_end|>\n<|im_start|>assistant.addHandlertoHaveBeenCalled sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp`\n\nI hope to get your help or suggestions. Thanks very much.\n\n### Versions\n\ncommit b4d72f1e271915e9c0e1d313753a1eec840fbdee\n\ncc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @cbilgin",
    "url": "https://github.com/pytorch/executorch/issues/15954",
    "state": "closed",
    "labels": [
      "partner: qualcomm",
      "module: qnn"
    ],
    "created_at": "2025-11-24T03:28:00Z",
    "updated_at": "2025-12-04T03:41:00Z",
    "comments": 12,
    "user": "lansexinhu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 168940,
    "title": "[DTensor] aten.max.dim returns wrong indices when using DTensor",
    "body": "### \ud83d\udc1b Describe the bug\n\nI found that current strategy of `aten.max.dim` may get incorrect indices output if sharded the dim for maximization.\n\nSample code:\n```python\nimport torch\nfrom torch.distributed.tensor import distribute_tensor, Shard\n\nfrom torch.testing._internal.common_utils import run_tests\nfrom torch.testing._internal.distributed._tensor.common_dtensor import DTensorTestBase, with_comms\n\n\nclass TestRegisterSharding(DTensorTestBase):\n    @with_comms\n    def test_max_dim(self):\n        mesh = self.build_device_mesh()\n\n        x = torch.randn(4, 4, device=\"cuda\")\n\n        max_value, max_indices = torch.max(x, dim=1)\n\n        dist_x = distribute_tensor(x, mesh, [Shard(1)])\n\n        dist_max_value, dist_max_indices = torch.max(dist_x, dim=1)\n\n        print(\"x:\", x)\n        print(\"max_value:\", max_value)\n        print(\"max_indices:\", max_indices)\n        print(\"dist_max_value:\", dist_max_value.full_tensor())\n        print(\"dist_max_indices:\", dist_max_indices.full_tensor())\n\n\nif __name__ == \"__main__\":\n    run_tests()\n```\n\nResult:\n```python\nx: tensor([[-1.6165,  0.5685, -0.5102, -0.9113],\n        [-1.1555, -0.2262, -1.2891,  1.0654],\n        [-0.7167, -0.5333,  0.2078, -0.9798],\n        [ 0.7447, -0.2395,  0.2737,  0.0920]], device='cuda:0')\nmax_value: tensor([0.5685, 1.0654, 0.2078, 0.7447], device='cuda:0')\nmax_indices: tensor([1, 3, 2, 0], device='cuda:0')\ndist_max_value: tensor([0.5685, 1.0654, 0.2078, 0.7447], device='cuda:0')\ndist_max_indices: tensor([0, 0, 0, 0], device='cuda:0')\n```\n\nEach rank gets a shape(4, 1) local tensor to call `max.dim` in this case, and the local result of max indices is [0, 0, 0, 0]. The framework doesn't process the offset of index, which leads to an incorrect global result when the relavant dim is sharded.\n\nIs there a good way to implement a strategy that supports sharding the index dim?\n\n### Versions\n\ntorch v2.9.0\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci @tianyu-l @XilunWu @SherlockNoMad",
    "url": "https://github.com/pytorch/pytorch/issues/168940",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "module: dtensor"
    ],
    "created_at": "2025-11-24T02:36:58Z",
    "updated_at": "2025-12-12T14:40:32Z",
    "comments": 11,
    "user": "qqq6op"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29286,
    "title": "[Performance]: cache system prompt token ids",
    "body": "### Proposal to improve performance\n\nAs system prompt can be very long now, tokenize the system prompt can be slow. \n\nUsing H20, tokenize 5000 tokens cost about 10ms as below:\n\n![Image](https://github.com/user-attachments/assets/e1b0dafa-6514-47e6-8531-db8eaea32cc7)\n\nSystem prompts are usually fixed and reusable, so cache the system prompt can be profitable.\n\nSpecificly:\n1. In **apply_hf_chat_template** method we can separate the system prompt from other prompts, we can use condition  **cache_system_prompt = truncate_prompt_tokens is None and not tokenize and len(conversation) > 1 and conversation[0].get(\"role\") == \"system\"** to judge when we should separate the system prompt.\n2. In **_normalize_prompt_text_to_input** method we judge that whether system prompt is in the dict ({system prompt: token ids}) that we can reuse, then concat system prompt token ids and prompt token ids as the final input_ids.\n\nI am willing to contribute to this opt and looking forward to your suggestions!\n\n### Report of performance regression\n\nThe above cost can be profitable.\n\n### Misc discussion on performance\n\n_No response_\n\n### Your current environment (if you think it is necessary)\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29286",
    "state": "open",
    "labels": [
      "performance"
    ],
    "created_at": "2025-11-24T01:55:32Z",
    "updated_at": "2025-11-28T08:57:06Z",
    "comments": 2,
    "user": "Eviannn"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29281,
    "title": "[Usage]: Removing last generated token from output and kv cache",
    "body": "### Your current environment\n\n```text\nvLLM 0.11.2\n```\n\n\n### How would you like to use vllm\n\nHey guys,\n\ni am currently working on a research project where i load a moe-like model and i want to do routing based on the sequence state.\nThe goal is to let expert 0 generate until it reaches the eos token, then remove the eos token and finish generation with expert 1 until the eos token is hit a second time.\nI want to do this to use different strengths of both models.\nMy current approach is to modify GPUModelRunner and Scheduler to remove the eos token from output, reduce num_computed_tokens by 1 and compute a static routing tensor based on the sequence state which i pass as additional model input, to route to expert 0 or 1.\n\nNow i am having some issues with unexpected output, especially with tensor_parallelism>1 on multiple gpus.\n\nI was wondering if there already is a reliable solution to remove the last generated token from output and kv cache, so that the computation leading to eos does not interfere with the second expert.\n\nOr maybe there is even a better way to do this?\n\nThank you!\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29281",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-23T22:39:16Z",
    "updated_at": "2025-11-26T09:33:53Z",
    "comments": 0,
    "user": "josefdra"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29277,
    "title": "[Usage]: Creating and accessing per request arguments inside vLLM model",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nI want to implement token compression techniques on the output embeddings of Qwen-2.5VL which would occur dynamically as the number of requests change. Is there anyway to implement this in vLLM? I see that SamplingParams seem to be the only way to use per request custom arguments but I don\u2019t believe it can be accessed within the model code directly?\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29277",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-23T21:59:31Z",
    "updated_at": "2025-11-23T21:59:31Z",
    "comments": 0,
    "user": "minlu21"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42344,
    "title": "How to fine-tune SAM 3D models?",
    "body": "### Model description\n\nThe recently released SAM 3D work is truly remarkable. Do you plan to integrate it into Transformers and enable fine-tuning?\nhttps://huggingface.co/facebook/sam-3d-objects\n\n### Open source status\n\n- [x] The model implementation is available\n- [x] The model weights are available\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/transformers/issues/42344",
    "state": "open",
    "labels": [
      "New model"
    ],
    "created_at": "2025-11-23T17:40:57Z",
    "updated_at": "2025-11-23T17:40:57Z",
    "user": "bruno686"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29264,
    "title": "[Usage]: Monkey Patching SamplingParams",
    "body": "### Your current environment\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.3 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : version 3.28.3\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.13.5 | packaged by conda-forge | (main, Jun 16 2025, 08:27:50) [GCC 13.3.0] (64-bit runtime)\nPython platform              : Linux-6.8.0-87-generic-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA B200\nGPU 1: NVIDIA B200\nGPU 2: NVIDIA B200\nGPU 3: NVIDIA B200\nGPU 4: NVIDIA B200\nGPU 5: NVIDIA B200\nGPU 6: NVIDIA B200\nGPU 7: NVIDIA B200\n\nNvidia driver version        : 570.195.03\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        52 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               224\nOn-line CPU(s) list:                  0-223\nVendor ID:                            GenuineIntel\nModel name:                           INTEL(R) XEON(R) PLATINUM 8570\nCPU family:                           6\nModel:                                207\nThread(s) per core:                   2\nCore(s) per socket:                   56\nSocket(s):                            2\nStepping:                             2\nCPU(s) scaling MHz:                   31%\nCPU max MHz:                          4000.0000\nCPU min MHz:                          800.0000\nBogoMIPS:                             4200.00\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities ibpb_exit_to_user\nVirtualization:                       VT-x\nL1d cache:                            5.3 MiB (112 instances)\nL1i cache:                            3.5 MiB (112 instances)\nL2 cache:                             224 MiB (112 instances)\nL3 cache:                             600 MiB (2 instances)\nNUMA node(s):                         2\nNUMA node0 CPU(s):                    0-55,112-167\nNUMA node1 CPU(s):                    56-111,168-223\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI",
    "url": "https://github.com/vllm-project/vllm/issues/29264",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-23T11:45:54Z",
    "updated_at": "2025-11-24T13:03:50Z",
    "comments": 2,
    "user": "josefdra"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29263,
    "title": "[Feature]: Enable flash attention (and/or FlashMLA) for AMD GPUs",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nIn [this page from flash-attention](https://github.com/Dao-AILab/flash-attention?tab=readme-ov-file#amd-rocm-support), I checked that the upstream `flash-attention` currently has composable_kernel (for newer AMD GPUs) and WIP triton (for older RNDA GPUs, etc.) implementations. As well as [flash MLA](https://github.com/deepseek-ai/FlashMLA?tab=readme-ov-file#amd-instinct).\n\nIs it possible to enable `vllm.vllm_flash_attn._vllm_fa2_C` and more modules for AMD GPUs?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29263",
    "state": "closed",
    "labels": [
      "feature request",
      "rocm"
    ],
    "created_at": "2025-11-23T11:28:47Z",
    "updated_at": "2025-12-05T01:54:08Z",
    "comments": 4,
    "user": "Inokinoki"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29245,
    "title": "[Usage]: \u542f\u52a8 qwen3 vl \u8d85\u7ea7\u8d85\u7ea7\u8d85\u7ea7\u6162\uff0csglang \u542f\u52a8\u5f88\u5feb\uff0c\u53ef\u80fd\u7684\u539f\u56e0\u662f\u4ec0\u4e48\uff1f",
    "body": "### Your current environment\n\n\u8fde\u6267\u884c python collect_env.py \u90fd\u5f88\u6162\uff0c\u73af\u5883\u662f\u76f4\u63a5 uv \u5b89\u88c5\u7684\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.2 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : version 4.1.2\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.9.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.3 (main, Jun 18 2025, 17:59:45) [GCC 13.3.0] (64-bit runtime)\nPython platform              : Linux-5.10.134-19.100.al8.x86_64-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.9.86\nCUDA_MODULE_LOADING set to   : \nGPU models and configuration : \nGPU 0: NVIDIA L20Y\nGPU 1: NVIDIA L20Y\nGPU 2: NVIDIA L20Y\nGPU 3: NVIDIA L20Y\nGPU 4: NVIDIA L20Y\nGPU 5: NVIDIA L20Y\nGPU 6: NVIDIA L20Y\nGPU 7: NVIDIA L20Y\n\nNvidia driver version        : 570.148.08\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.10.2\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.10.2\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                       x86_64\nCPU op-mode(s):                     32-bit, 64-bit\nAddress sizes:                      46 bits physical, 57 bits virtual\nByte Order:                         Little Endian\nCPU(s):                             192\nOn-line CPU(s) list:                0-191\nVendor ID:                          GenuineIntel\nModel name:                         Intel(R) Xeon(R) Platinum 8468V\nCPU family:                         6\nModel:                              143\nThread(s) per core:                 2\nCore(s) per socket:                 48\nSocket(s):                          2\nStepping:                           8\nCPU(s) scaling MHz:                 70%\nCPU max MHz:                        3800.0000\nCPU min MHz:                        800.0000\nBogoMIPS:                           4800.00\nFlags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req hfi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm uintr md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nVirtualization:                     VT-x\nL1d cache:                          4.5 MiB (96 instances)\nL1i cache:                          3 MiB (96 instances)\nL2 cache:                           192 MiB (96 instances)\nL3 cache:                           195 MiB (2 instances)\nNUMA node(s):                       2\nNUMA node0 CPU(s):                  0-47,96-143\nNUMA node1 CPU(s):                  48-95,144-191\nVulnerability Itlb multihit:        Not affected\nVulnerability L1tf:                 Not affected\nVulnerability Mds:                  Not affected\nVulnerability Meltdown:             Not affected\nVulnerability Mmio stale data:      Not affected\nVulnerability Retbleed:             Not affected\nVulnerability Spec rstack overflow: Not affected\nVulnerability Spec store bypass:    Mitigation; ",
    "url": "https://github.com/vllm-project/vllm/issues/29245",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-22T20:41:27Z",
    "updated_at": "2025-12-11T11:23:54Z",
    "comments": 3,
    "user": "hucorz"
  },
  {
    "repo": "huggingface/candle",
    "number": 3208,
    "title": "`cudarc` dynamic loading support",
    "body": "Currently, `candle` uses `cudarc` with the `dynamic-linking` feature, which requires the executable to find the DLLs or SOs at startup. However, it would be more convenient if `candle` also supported the `dynamic-loading` feature from `cudarc` to load DLLs or SOs at runtime.\nIs it possible for `candle` to support it?",
    "url": "https://github.com/huggingface/candle/issues/3208",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-22T18:18:25Z",
    "updated_at": "2025-11-25T09:00:27Z",
    "comments": 7,
    "user": "mayocream"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42331,
    "title": "SAM3 does not support custom inference resolutions",
    "body": "### System Info\n\nNote: I am running the latest git version, sys Info should not be relevant to the issue\n$ transformers env  \nTraceback (most recent call last):\n  File \"/home/master-andreas/panopticon/test_env/bin/transformers\", line 3, in <module>\n    from transformers.cli.transformers import main\n  File \"/home/master-andreas/panopticon/test_env/lib/python3.12/site-packages/transformers/cli/transformers.py\", line 23, in <module>\n    from transformers.cli.serve import Serve\n  File \"/home/master-andreas/panopticon/test_env/lib/python3.12/site-packages/transformers/cli/serve.py\", line 351, in <module>\n    class Serve:\n  File \"/home/master-andreas/panopticon/test_env/lib/python3.12/site-packages/transformers/cli/serve.py\", line 658, in Serve\n    ) -> ChatCompletionChunk:\n         ^^^^^^^^^^^^^^^^^^^\nNameError: name 'ChatCompletionChunk' is not defined\n\n### Who can help?\n\n@yonigozlan\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```py\n\"\"\"\nTest script for SAM3 text prompting only.\nThis script demonstrates how to use SAM3 for text-based segmentation on images.\n\"\"\"\n\nimport torch\nfrom PIL import Image\nimport requests\nfrom transformers import Sam3Processor, Sam3Model\nimport os\n\n\nINFERENCE_RESOLUTION = (1008, 1008)  # If run with anything else other than 1008 it fails\n# INFERENCE_RESOLUTION = (1400, 1400)\n\n\ndef test_sam3_text_prompting():\n    \"\"\"Test SAM3 with text prompting on a sample image.\"\"\"\n\n    # Set device\n    device = \"cpu\"\n    print(f\"Using device: {device}\")\n\n    # Load model and processor\n    print(\"Loading SAM3 model and processor...\")\n    model = Sam3Model.from_pretrained(\"facebook/sam3\").to(device)\n    processor = Sam3Processor.from_pretrained(\"facebook/sam3\")\n\n    # Load a sample image\n    print(\"Loading sample image...\")\n    image_url = \"http://images.cocodataset.org/val2017/000000077595.jpg\"\n    image = Image.open(requests.get(image_url, stream=True).raw).convert(\"RGB\")\n\n    # Define text prompts to test\n    text_prompts = [\"cat\", \"ear\", \"eye\"]\n\n    for text_prompt in text_prompts:\n        print(f\"\\nTesting text prompt: '{text_prompt}'\")\n\n    # Prepare inputs\n        inputs = processor(images=image, text=text_prompt, size=INFERENCE_RESOLUTION, return_tensors=\"pt\").to(device)\n\n        # Run inference\n        with torch.no_grad():\n            outputs = model(**inputs)\n\n        # Post-process results\n        results = processor.post_process_instance_segmentation(\n            outputs,\n            threshold=0.5,\n            mask_threshold=0.5,\n            target_sizes=inputs.get(\"original_sizes\").tolist()\n        )[0]\n\n        # Display results\n        num_objects = len(results['masks'])\n        print(f\"Found {num_objects} objects matching '{text_prompt}'\")\n\n        if num_objects > 0:\n            # Show scores for first few objects\n            scores = results['scores']\n            print(f\"Confidence scores: {scores[:min(3, len(scores))].tolist()}\")\n\n            # Show bounding boxes for first object\n            if 'boxes' in results and len(results['boxes']) > 0:\n                box = results['boxes'][0]\n                print(f\"First object bounding box (xyxy): {box.tolist()}\")\n\n\nif __name__ == \"__main__\":\n    print(\"SAM3 Text Prompting Test Script\")\n    print(\"=\" * 40)\n\n    try:\n        test_sam3_text_prompting()\n        print(\"\\n\u2713 All tests completed successfully!\")\n\n    except Exception as e:\n        print(f\"\\n\u2717 Test failed with error: {e}\")\n        raise\n\n```\n\nOutput when INFERENCE_RESOLUTION=[1400, 1400]:\n```sh\n$ py test_sam3_text.py\nSAM3 Text Prompting Test Script\n========================================\nUsing device: cpu\nLoading SAM3 model and processor...\nLoading weights: 100%|\u2588| 1468/1468 [00:00<00:00, 2709.52it/s, Materializing param=vision_encoder.neck.fpn\nLoading sample image...\n\nTesting text prompt: 'cat'\n\n\u2717 Test failed with error: The size of tensor a (10000) must match the size of tensor b (5184) at non-singleton dimension 2\nTraceback (most recent call last):\n  File \"/home/master-andreas/panopticon/test_sam3_text.py\", line 124, in <module>\n    test_sam3_text_prompting()\n  File \"/home/master-andreas/panopticon/test_sam3_text.py\", line 48, in test_sam3_text_prompting\n    outputs = model(**inputs)\n              ^^^^^^^^^^^^^^^\n  File \"/home/master-andreas/panopticon/test_env/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1775, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/master-andreas/panopticon/test_env/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1786, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/master-andreas/panopticon/test_env/lib/python3.12/site-packages/transformers/utils/generic.py\", line 938, in wrapper\n ",
    "url": "https://github.com/huggingface/transformers/issues/42331",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-21T22:17:08Z",
    "updated_at": "2025-12-10T22:46:39Z",
    "comments": 3,
    "user": "Kallinteris-Andreas"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2500,
    "title": "question about the gr00t policy",
    "body": "hi,\n\nI see here https://huggingface.co/docs/lerobot/en/groot that gr00t is intergrated into lerobot.\n\nis it in sync with the original repo: https://github.com/NVIDIA/Isaac-GR00T  ?\n\nI see in original repo that the dataset used to fine-tune, is a bit different from the original lerobot format, like libero dataset (https://huggingface.co/datasets/physical-intelligence/libero) used in pi model ,\ntherefore i wonder what dataset format should be used here in lerbot policy training ?\n\nany example dataset that is passed to `--dataset.repo_id=$DATASET_ID` ?\n\nis it a post-processed dataset ?",
    "url": "https://github.com/huggingface/lerobot/issues/2500",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-11-21T21:45:19Z",
    "updated_at": "2025-12-03T14:03:34Z",
    "user": "yanan1116"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29192,
    "title": "Tool Calling Parsers Fail to Populate tool_calls Array for Qwen2.5-Coder Models",
    "body": "# Tool Calling Parsers Fail to Populate `tool_calls` Array for Qwen2.5-Coder Models\n\n## Environment\n- **vLLM Version**: v0.11.2.dev115+g56669c1f2 (Blackwell build)\n- **Model**: Qwen/Qwen2.5-Coder-14B-Instruct-AWQ\n- **Quantization**: AWQ\n- **Python Version**: 3.x (Docker container)\n- **GPU**: NVIDIA GeForce RTX 5080 (16GB, Blackwell/sm_120)\n- **Platform**: WSL2, Linux 6.6.87.2-microsoft-standard-WSL2\n\n## Description\nWhen using tool calling with Qwen2.5-Coder models, the model correctly generates tool calls in `<tools>` XML format, but both `qwen3_xml` and `qwen3_coder` parsers fail to extract these tool calls into the `tool_calls` array in the API response. The tool call information remains in the `content` field but the `tool_calls` array stays empty.\n\n## Steps to Reproduce\n\n1. Start vLLM with Qwen2.5-Coder and tool calling parser:\n```bash\npython -m vllm.entrypoints.openai.api_server \\\n  --model Qwen/Qwen2.5-Coder-14B-Instruct-AWQ \\\n  --quantization awq \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser qwen3_xml  # or qwen3_coder\n```\n\n2. Send a tool calling request:\n```bash\ncurl -s http://localhost:8002/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"qwen2.5-coder-14b-awq\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"What is the weather in San Francisco?\"}],\n    \"tools\": [\n      {\n        \"type\": \"function\",\n        \"function\": {\n          \"name\": \"get_weather\",\n          \"description\": \"Get the current weather for a location\",\n          \"parameters\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"location\": {\n                \"type\": \"string\",\n                \"description\": \"The city and state, e.g. San Francisco, CA\"\n              }\n            },\n            \"required\": [\"location\"]\n          }\n        }\n      }\n    ],\n    \"tool_choice\": \"auto\"\n  }'\n```\n\n## Actual Output\n```json\n{\n  \"id\": \"chatcmpl-xxx\",\n  \"object\": \"chat.completion\",\n  \"model\": \"qwen2.5-coder-14b-awq\",\n  \"choices\": [\n    {\n      \"message\": {\n        \"role\": \"assistant\",\n        \"content\": \"<tools>\\n{\\n  \\\"name\\\": \\\"get_weather\\\",\\n  \\\"arguments\\\": {\\n    \\\"location\\\": \\\"San Francisco, CA\\\"\\n  }\\n}\\n</tools>\",\n        \"tool_calls\": []\n      }\n    }\n  ]\n}\n```\n\n## Expected Output\n```json\n{\n  \"id\": \"chatcmpl-xxx\",\n  \"object\": \"chat.completion\",\n  \"model\": \"qwen2.5-coder-14b-awq\",\n  \"choices\": [\n    {\n      \"message\": {\n        \"role\": \"assistant\",\n        \"content\": \"\",\n        \"tool_calls\": [\n          {\n            \"type\": \"function\",\n            \"id\": \"call_0\",\n            \"function\": {\n              \"name\": \"get_weather\",\n              \"arguments\": \"{\\\"location\\\": \\\"San Francisco, CA\\\"}\"\n            }\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n\n## Analysis\n\n### Model Output (Correct)\nThe model correctly generates tool calls in the expected `<tools>` XML format:\n```xml\n<tools>\n{\n  \"name\": \"get_weather\",\n  \"arguments\": {\n    \"location\": \"San Francisco, CA\"\n  }\n}\n</tools>\n```\n\n### Parser Behavior (Incorrect)\nBoth recommended parsers fail to extract tool calls:\n- **hermes parser**: Expects `<tool_call>` tags, doesn't match `<tools>` tags\n- **qwen3_xml parser**: Designed for `<tools>` tags but doesn't populate `tool_calls` array\n- **qwen3_coder parser**: Also designed for Qwen but fails to populate array\n\n### Root Cause\nThe parsers appear to load correctly (visible in logs as `'tool_call_parser': 'qwen3_xml'`) but the extraction logic fails to populate the OpenAI-compatible `tool_calls` array structure.\n\n## Workaround\nManual extraction from the `content` field:\n\n```python\nimport re\nimport json\n\ndef extract_tool_calls(response):\n    \"\"\"Extract tool calls from Qwen2.5-Coder <tools> tags\"\"\"\n    content = response['choices'][0]['message']['content']\n    pattern = r'<tools>\\s*({.*?})\\s*</tools>'\n    match = re.search(pattern, content, re.DOTALL)\n\n    if match:\n        tool_data = json.loads(match.group(1))\n        return [{\n            \"type\": \"function\",\n            \"function\": {\n                \"name\": tool_data[\"name\"],\n                \"arguments\": json.dumps(tool_data[\"arguments\"])\n            }\n        }]\n    return []\n```\n\n## Additional Context\n\n### Multi-AI Consultation Results\nConsulted with multiple AI models for parser recommendation:\n- **Qwen3 Coder (480B)**: Recommended `qwen3_xml` parser\n- **DeepSeek V3.1**: Ranked `qwen3_xml` (90% confidence), `qwen3_coder` (80% confidence)\n- **Claude Sonnet 4.5**: Confirmed tag mismatch between Hermes and Qwen formats\n\nAll models agreed that the parser selection is correct, suggesting the issue is in the parser implementation rather than configuration.\n\n### vLLM Configuration\n```python\n{\n    'tool_call_parser': 'qwen3_xml',  # Confirmed in logs\n    'enable_auto_tool_choice': True,\n    'model': 'Qwen/Qwen2.5-Coder-14B-Instruct-AWQ',\n    'quantization': 'awq',\n    'max_model_len': 8192\n}\n```\n\n## Impact\n- **Severity**: High - Breaks OpenAI API compatibility for tool calling\n- **Affected Models**: Likely all Qwen2.5-Coder variants\n-",
    "url": "https://github.com/vllm-project/vllm/issues/29192",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-21T18:31:19Z",
    "updated_at": "2025-11-21T18:31:19Z",
    "comments": 0,
    "user": "Platano78"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29180,
    "title": "[Bug]: Recorded `EngineCoreEventType.QUEUED` time is off",
    "body": "### Your current environment\n\n<details>\n</details>\n\n### \ud83d\udc1b Describe the bug\n\nWhen running benchmarking with the CLI:\n\n- on one side the serving point `vllm serve ...`\n- on the other side the benchmarking client : `vllm bench serve...`\n(note that the two are running on the same machine, there is no networking delay)\n\nI noticed that the `EngineCoreEventType.QUEUED` event recorder on the server side didn't match the time of posting the request. In my understanding these two should events should be approximately equivalent. These values aren't off by a few milliseconds, but here the mismatch can be pretty big, up to a few seconds.  \n\nI think the reason might be because adding [request to the scheduler](https://github.com/vllm-project/vllm/blob/fcb1d570bb8f95f5b7ded716a52fec902c535f0e/vllm/v1/core/sched/scheduler.py#L1166) cannot be done when the engine is running a decoding or a prefill, see the [`_process_input_queue` function](https://github.com/vllm-project/vllm/blob/fcb1d570bb8f95f5b7ded716a52fec902c535f0e/vllm/v1/engine/core.py#L801), where `add_request()` ultimately gets called. This can introduce delays before the queued event gets recorded, having \"floating\" requests that are not tracked in the logs.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29180",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-21T12:58:36Z",
    "updated_at": "2025-11-30T20:56:44Z",
    "comments": 4,
    "user": "sducouedic"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29177,
    "title": "[Usage]: Vllm + Intervl model  local infra Image preprocessing / request adding becomes bottleneck even with more CPU cores \u2014 how to accelerate?",
    "body": "### Your current environment\n\nvllm 0.11.0\n\n\n### How would you like to use vllm\n\n### current phenomenon\nWhen doing **batched image classification** (64 images per batch) with InternVL3_5-1B, the bottleneck is clearly in the **\"Adding requests\"** phase (image preprocessing).  \nEven after increasing CPU cores and setting `OMP_NUM_THREADS=16`, the preprocessing speed stays around **50 it/s**, while the actual generation phase is extremely fast (>1500 prompts/s).\n\n```text\nAdding requests: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 64/64 [00:01<00:00, 52.67it/s]   \u2190 bottleneck\nProcessed prompts: 100%|\u2588| 64/64 [00:00<00:00, 1515.23it/s, est. speed input: 812805.23 tok/s]\n```\nThis means ~95% of the total latency is spent on CPU-side image preprocessing, \uff08I have disabled dynamic resolution\uff09\n\n\n### Minimal Reproducible Example\n```python\nimport os\nfrom PIL import Image\nfrom vllm import LLM, SamplingParams\nfrom transformers import AutoTokenizer\n\nmodel_path = \"/data/code/haobang.geng/models/InternVL3_5-1B\"\ntokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)\n\nllm = LLM(\n    model=model_path,\n    dtype=\"bfloat16\",\n    max_model_len=4096,\n    gpu_memory_utilization=0.95,\n    limit_mm_per_prompt={\"image\": 1},\n    trust_remote_code=True,\n    enforce_eager=False,\n)\n\nprompt = \"<image>\\nYou are an image classifier. Output only one word: safe or nsfw.\"\nsampling_params = SamplingParams(temperature=0.0, max_tokens=8)\n\nbatch_inputs = []\nfor i in range(64):\n    img = Image.open(f\"/path/to/images/{i}.jpg\").convert(\"RGB\")\n    batch_inputs.append({\n        \"prompt\": prompt,\n        \"multi_modal_data\": {\"image\": img},\n    })\n\noutputs = llm.generate(batch_inputs, sampling_params=sampling_params, use_tqdm=True)\n```\n\n### Expected behavior\nFor pure-text batches, Adding requests is >2000 it/s such as qwen3vl.\nAttempted solutions (all ineffective)\n\n### my attempt to speed up\nIncrease CPU cores / set OMP_NUM_THREADS=16 \u2192 no speedup\nmm_processor_kwargs={\"max_dynamic_patch\": 1, ...} \u2192 seems no speedup\nPre-resize images to 384\u00d7384 \u2192 helps a little (~55 it/s) but still far from ideal\n\n\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.\n\n\n\nThank you for the great work on vLLM! Looking forward to a simple way to slove it",
    "url": "https://github.com/vllm-project/vllm/issues/29177",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-21T10:56:29Z",
    "updated_at": "2025-12-01T14:08:22Z",
    "comments": 3,
    "user": "Passenger12138"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 2073,
    "title": "Slow Dataloader should use num_worker > 1",
    "body": "I am trying to use torchtitan with procedurally generated data (data augmentation). This process is CPU-intensive and I strongly do not want to store each sample before. Under this setup, `torchtitan` is really slow to train and I'm seeing my MFU dropping by 4-5x compared to unbottlenecked dataloader (no data augmentation). \n\nI have seen a related problem reported [here](https://github.com/pytorch/torchtitan/issues/1663) with some caveats on how to do multiprocess dataloader effectively. It would be cool to have an official implementation of multiprocess dataloader with `num_worker>1`",
    "url": "https://github.com/pytorch/torchtitan/issues/2073",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-21T08:13:27Z",
    "updated_at": "2025-12-19T01:45:50Z",
    "comments": 3,
    "user": "hypnopump"
  },
  {
    "repo": "huggingface/trl",
    "number": 4554,
    "title": "Better packing of data with best-fit decrease strategy",
    "body": "Hello,\n\nWhen using packing with the bfd strategy, it looks like too much truncation is done when the seq_length is smaller than the average length of the sequences we want to pack.\n\nFor example : \n```python\nfrom datasets import Dataset\nfrom trl import pack_dataset\n\nexamples = {\n    \"input_ids\": [[1, 2, 3, 4], [5, 6], [7, 8, 9], [10]],\n    \"attention_mask\": [[1, 1, 1, 1], [1, 0], [1, 0, 0], [1]],\n}\ndataset = Dataset.from_dict(examples)\n\npacked_dataset = pack_dataset(dataset, seq_length=3, strategy=\"bfd\")\nprint(packed_dataset )\n```\n\nresults in:\n```python\n{'input_ids': [[1, 2, 3], [7, 8, 9], [5, 6, 10]],\n 'attention_mask': [[1, 1, 1], [1, 0, 0], [1, 0, 1]],\n 'seq_lengths': [[3], [3], [2, 1]]}\n```\nSo the token '4' is missing from the training tokens.\n\n\nIn a extreme case:\n```python\nexamples_2 = {\n    \"input_ids\": [[0, 0], [1, 2, 3, 4], [5, 6, 7, 8, 9], [10]],\n    \"attention_mask\": [[1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1], [1]],\n}\ndataset_2 = Dataset.from_dict(examples_2)\nprint(pack_dataset(dataset_2, seq_length=1, strategy=\"bfd\")[:])\n```\nresults in:\n```python\n{'input_ids': [[0], [1], [5], [10]],\n 'attention_mask': [[1], [1], [1], [1]],\n 'seq_lengths': [[1], [1], [1], [1]]}\n```\n\nSo here we are basically applying truncation to every sequence instead of having twelve sequences of one token.\n\n\nIf we put ourself in a more usefull setting, when I was finetunning on some very long sequences with a seq_lenfth of 4096, the majority of the tokens was discarded y the bfd packing. On my dataset, the bfd method kept only 0.2% of the total training tokens.\n\nIs the behavior normal ?\nI would find it useful to add an option to still have tokens that are deleted in other sequences, even if this is less than ideal. It would be a good compromise between the current versions of bfd and wrapped.",
    "url": "https://github.com/huggingface/trl/issues/4554",
    "state": "closed",
    "labels": [
      "\u2728 enhancement",
      "\u2753 question"
    ],
    "created_at": "2025-11-21T07:53:55Z",
    "updated_at": "2025-12-16T20:37:02Z",
    "comments": 3,
    "user": "ntnq4"
  },
  {
    "repo": "pytorch/FBGEMM",
    "number": 5161,
    "title": "Does anyone know how to build fbgemm_gpu from source without fbgemm",
    "body": "I'd like to only build fbgemm_gpu from source without building fbgemm.\n\nSeems that\n```\ncd fbgemm_gpu\npython setup.py install\n```\nmissed some arguments?",
    "url": "https://github.com/pytorch/FBGEMM/issues/5161",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-21T07:40:18Z",
    "updated_at": "2025-11-27T08:45:52Z",
    "user": "fmo-mt"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29148,
    "title": "[Usage]: Deployment of the embedding models",
    "body": "### Your current environment\n\n```text\n==============================                                                                                                                                                                              \n        System Info                                                                                                                                                                                         \n==============================                                                                                                                                                                              \nOS                           : Ubuntu 22.04.5 LTS (x86_64)                                                                                                                                                  \nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0                                                                                                                                        \nClang version                : Could not collect                                                                                                                                                            \nCMake version                : version 3.22.1\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0] (64-bit runtime)\nPython platform              : Linux-5.15.0-161-generic-x86_64-with-glibc2.35\n\n==============================                                                                                                                                                                    \n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.61\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : \nGPU 0: NVIDIA GeForce RTX 5090\nGPU 1: NVIDIA GeForce RTX 5090\nGPU 2: NVIDIA GeForce RTX 5090\nGPU 3: NVIDIA GeForce RTX 5090\nGPU 4: NVIDIA GeForce RTX 5090\nGPU 5: NVIDIA GeForce RTX 5090\nGPU 6: NVIDIA GeForce RTX 5090\nGPU 7: NVIDIA GeForce RTX 5090\n\nNvidia driver version        : 570.172.08\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.7.0\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n```\n\n\n### How would you like to use vllm\n\nWhen deploying the embedding model, I found that the actual GPU memory usage included not only the model itself but also kv_cache. Is this a reasonable phenomenon? In version v0.9.0, the GPU memory usage was only for the model itself.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29148",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-21T03:57:59Z",
    "updated_at": "2025-11-21T06:17:18Z",
    "comments": 3,
    "user": "Root970103"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29139,
    "title": "[Feature]: Optimize collectives in TP MoE case using torch.compile pass",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nTo avoid redundant work in MoE models in the TP case, sequence parallelism was added to the Deepseek model definition in #24134 and expanded to other models in #24982. However, to avoid performing surgery on the linear layer, the current approach performs more communication than necessary. With a torch.compile custom pass, we can rewrite the graph to remove the redundant computation.\n\n### More details\n\nBefore the SP optimization, the ops in the model were:\n```\n- o_proj:[num_tokens, ...] -> [num_tokens, ...] (incomplete results)\n- all_reduce:[num_tokens, ...] -> [num_tokens, ...]\n- router:[num_tokens, ...] -> [num_tokens, ...]\n- experts:[num_tokens, ...] -> [num_tokens, ...]\n- ...\n```\n\nWith sequence parallel enabled, this becomes:\n```\n- o_proj: [num_tokens, ...] -> [num_tokens, ...] (incomplete results)\n- all_reduce: [num_tokens, ...] -> [num_tokens, ...]\n- chunk: [num_tokens, ...] -> [num_tokens/tp, ...]\n- router: [num_tokens/tp, ...] -> [num_tokens/tp, ...]\n- experts: [num_tokens/tp, ...] -> [num_tokens/tp, ...]\n- all_gather: [num_tokens/tp, ...] -> [num_tokens, ...]\n```\n\nAdditionally, experts now properly do the dp+tp<->ep dispatch instead of just the original replicated dp<->ep dispatch.\n\nNotice that the `all_reduce` does redundant communication as each TP rank only requires partial results. With a compile pass, we can convert the `all_reduce` -> `chunk` sequence into a `reduce_scatter`:\n\n```\n- o_proj: [num_tokens, ...] -> [num_tokens, ...] (incomplete results)\n- reduce_scatter: [num_tokens, ...] -> [num_tokens/tp, ...]\n- router: [num_tokens/tp, ...] -> [num_tokens/tp, ...]\n- experts: [num_tokens/tp, ...] -> [num_tokens/tp, ...]\n- all_gather: [num_tokens/tp, ...] -> [num_tokens, ...]\n```\n\nWe should create a new `SequenceParallelismMoEPass`, controlled by a new `PassConfig.enable_sp_moe` flag (following the new naming convention in #27995) so that it can be turned on independently of regular SP. We will likely need to pad the number of tokens to a multiple of TP size, although like described in #29136, there are alternatives.\n\n### Alternatives\n\nAlternatively, the original optimization could be done as a compile pass as well, which would significantly clean up the MoE model definitions. However, that would mean that `VLLM_COMPILE` compilation mode would be required for this optimization and if compilation is disabled, the optimization would be disabled as well. Generally we accept lower performance in eager mode as compilation is on by default, but I know there was a reason this was done this way (don't remember why).\n\n### Additional context\n\nOriginal proposal comment: https://github.com/vllm-project/vllm/pull/24982#pullrequestreview-3259494618\n\ncc @tlrmchlsmth @bnellnm @robertgshaw2-redhat @alexm-redhat @zou3519 @nvpohanh @youkaichao \n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29139",
    "state": "open",
    "labels": [
      "help wanted",
      "good first issue",
      "performance",
      "feature request",
      "torch.compile"
    ],
    "created_at": "2025-11-21T01:36:06Z",
    "updated_at": "2025-12-07T15:39:48Z",
    "comments": 19,
    "user": "ProExpertProg"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 168291,
    "title": "Remove unnecessary `ConstantVariable` wrapping in `raise_observed_exception`",
    "body": "~We currently convert arguments to `ConstantVariable` before calling `raise_observed_exception` in several places. This conversion is unnecessary as the Python objects can be used directly. Doing so also improves readability of some error reports.~\n\nBefore:\n```python\nObserved exception\n  Explanation: ...\n  Hint: ...\n  Hint: ...\n\n  Developer debug context: raised exception TypeError([ConstantVariable(str: \"unhashable type: <class 'torch._dynamo.variables.dicts.SetVariable'>\")])\n```\n\nAfter:\n```python\nObserved exception\n  Explanation: ...\n  Hint: ...\n  Hint: ...\n\n  Developer debug context: raised exception TypeError([\"unhashable type: <class 'torch._dynamo.variables.dicts.SetVariable'>\"])\n```\n\nExample of places that needs to be changed:\nhttps://github.com/pytorch/pytorch/blob/9396e69194e8e16801b08b1326e34708a859fa5f/torch/_dynamo/variables/functions.py#L196-L204\nhttps://github.com/pytorch/pytorch/blob/9396e69194e8e16801b08b1326e34708a859fa5f/torch/_dynamo/variables/functions.py#L211-L219\n\n\n### Versions\n\nmain\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @Lucaskabela",
    "url": "https://github.com/pytorch/pytorch/issues/168291",
    "state": "closed",
    "labels": [
      "good first issue",
      "triaged",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2025-11-20T19:28:03Z",
    "updated_at": "2025-12-03T13:48:14Z",
    "comments": 8,
    "user": "guilhermeleobas"
  },
  {
    "repo": "pytorch/executorch",
    "number": 15923,
    "title": "1008 Giene-t2t-OnSM8850 chippet",
    "body": "### \ud83d\udc1b Describe the bug\n\n./genie-t2t-run -c genie_bundle_llama3.2-1b/genie_config.json -p \"<|begin_of_text|><|start_header_id|>user<|end_header_id|>\"$'\\n\\n'$\"What is France's capital?<|eot_id|><|sta>\nUsing libGenie.so version 1.13.0\n\n[ERROR] \"Failed to create device: 1008\"\n[ERROR] \"Device Creation failure\"\nFailure to initialize model. \nFailed to create the dialog.\n\n### Versions\n\npython version 3.11 ",
    "url": "https://github.com/pytorch/executorch/issues/15923",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-20T18:49:32Z",
    "updated_at": "2025-11-24T18:09:35Z",
    "comments": 3,
    "user": "pbtsvinaysukhesh"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29097,
    "title": "[Docs] Feedback for `/en/latest/`",
    "body": "### \ud83d\udcda The doc issue\n\nno\n\n### Suggest a potential alternative/fix\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29097",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-11-20T14:53:44Z",
    "updated_at": "2025-11-21T07:51:57Z",
    "comments": 2,
    "user": "ch950684-svg"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 168253,
    "title": "nestedtensor inconsistency in `torch.masked_select`",
    "body": "### \ud83d\udc1b Describe the bug\n\nHere is the code that left me with questions: I am not sure if it is a bug, but I feel it is not it would be a great addition to the docs. I would expect padded nt and padded  nt1 to have the same values at the end of the script, but they are not. If it is not a bug, how can I achieve it: create a nested tensor from a padded tensor and a mask that will have a proper max_len?\n\n```python\nimport torch\n\nlengths = [5,5,6,6,6,7,7,7,7,8,8,8,8,9]\nresults = []\nfor length in lengths:\n    results.append(torch.ones((length,)))\n\nresults\n# [tensor([1., 1., 1., 1., 1.]),\n#  tensor([1., 1., 1., 1., 1.]),\n#  tensor([1., 1., 1., 1., 1., 1.]),\n#  tensor([1., 1., 1., 1., 1., 1.]),\n#  tensor([1., 1., 1., 1., 1., 1.]),\n#  tensor([1., 1., 1., 1., 1., 1., 1.]),\n#  tensor([1., 1., 1., 1., 1., 1., 1.]),\n#  tensor([1., 1., 1., 1., 1., 1., 1.]),\n#  tensor([1., 1., 1., 1., 1., 1., 1.]),\n#  tensor([1., 1., 1., 1., 1., 1., 1., 1.]),\n#  tensor([1., 1., 1., 1., 1., 1., 1., 1.]),\n#  tensor([1., 1., 1., 1., 1., 1., 1., 1.]),\n#  tensor([1., 1., 1., 1., 1., 1., 1., 1.]),\n#  tensor([1., 1., 1., 1., 1., 1., 1., 1., 1.])]\n\n\nnt = torch.nested.nested_tensor(results, layout=torch.jagged)\n\nnt\n# NestedTensor(size=(14, j1), offsets=tensor([ 0,  5, 10, 16, 22, 28, 35, 42, 49, 56, 64, 72, 80, 88, 97]), contiguous=True)\n\npt_infer = torch.nested.to_padded_tensor(nt, 0.0)\n\npt_infer.shape\n# torch.Size([14, 9])\n\nmask = pt_infer != 0\n\nmask.shape\n# torch.Size([14, 9])\n\nnt1 = torch.nested.masked_select(pt_infer, mask)\n\nnt1.shape\n# torch.Size([14, j2])\n\nnt.shape\n# torch.Size([14, j1])\n\nnt1.to_padded_tensor(0.0, ).shape\n# torch.Size([14, 97])\n\ntorch.nested.to_padded_tensor(nt1, 0.0).shape\n# torch.Size([14, 97])\n\ntorch.nested.to_padded_tensor(nt, 0.0).shape\n# torch.Size([14, 9])\n\n```\n\n\n### Versions\n\nPyTorch version: 2.9.0+cu128\nIs debug build: False\nCUDA used to build PyTorch: 12.8\nROCM used to build PyTorch: N/A\n\nOS: Rocky Linux 9.4 (Blue Onyx) (x86_64)\nGCC version: (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)\nClang version: Could not collect\nCMake version: Could not collect\nLibc version: glibc-2.34\n\nPython version: 3.12.12 | packaged by conda-forge | (main, Oct 22 2025, 23:25:55) [GCC 14.3.0] (64-bit runtime)\nPython platform: Linux-5.14.0-427.13.1.el9_4.x86_64-x86_64-with-glibc2.34\nIs CUDA available: True\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to:\nGPU models and configuration: GPU 0: NVIDIA H100 80GB HBM3\nNvidia driver version: 575.57.08\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\n\nVersions of relevant libraries:\n[pip3] numpy==2.3.4\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cufft-cu12==11.3.3.83\n[pip3] nvidia-curand-cu12==10.3.9.90\n[pip3] nvidia-cusolver-cu12==11.7.3.90\n[pip3] nvidia-cusparse-cu12==12.5.8.93\n[pip3] nvidia-cusparselt-cu12==0.7.1\n[pip3] nvidia-nccl-cu12==2.27.5\n[pip3] nvidia-nvjitlink-cu12==12.8.93\n[pip3] nvidia-nvtx-cu12==12.8.90\n[pip3] pytorch-lightning==2.5.6\n[pip3] torch==2.9.0\n[pip3] torch-dct==0.1.6\n[pip3] torchaudio==2.9.0\n[pip3] torchmetrics==1.8.2\n[pip3] triton==3.5.0\n[conda] numpy                     2.3.4                    pypi_0    pypi\n[conda] nvidia-cublas-cu12        12.8.4.1                 pypi_0    pypi\n[conda] nvidia-cuda-cupti-cu12    12.8.90                  pypi_0    pypi\n[conda] nvidia-cuda-nvrtc-cu12    12.8.93                  pypi_0    pypi\n[conda] nvidia-cuda-runtime-cu12  12.8.90                  pypi_0    pypi\n[conda] nvidia-cudnn-cu12         9.10.2.21                pypi_0    pypi\n[conda] nvidia-cufft-cu12         11.3.3.83                pypi_0    pypi\n[conda] nvidia-curand-cu12        10.3.9.90                pypi_0    pypi\n[conda] nvidia-cusolver-cu12      11.7.3.90                pypi_0    pypi\n[conda] nvidia-cusparse-cu12      12.5.8.93                pypi_0    pypi\n[conda] nvidia-cusparselt-cu12    0.7.1                    pypi_0    pypi\n[conda] nvidia-nccl-cu12          2.27.5                   pypi_0    pypi\n[conda] nvidia-nvjitlink-cu12     12.8.93                  pypi_0    pypi\n[conda] nvidia-nvtx-cu12          12.8.90                  pypi_0    pypi\n[conda] pytorch-lightning         2.5.6                    pypi_0    pypi\n[conda] torch                     2.9.0                    pypi_0    pypi\n[conda] torch-dct                 0.1.6                    pypi_0    pypi\n[conda] torchaudio                2.9.0                    pypi_0    pypi\n[conda] torchmetrics              1.8.2                    pypi_0    pypi\n[conda] triton                    3.5.0                    pypi_0    pypi\n\ncc @cpuhrsch @jbschlosser @bhosmer @drisspg @soulitzer @davidberard98 @YuqingJ",
    "url": "https://github.com/pytorch/pytorch/issues/168253",
    "state": "open",
    "labels": [
      "triaged",
      "module: nestedtensor"
    ],
    "created_at": "2025-11-20T14:08:48Z",
    "updated_at": "2025-11-21T17:47:04Z",
    "comments": 2,
    "user": "rustamzh"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29089,
    "title": "[Performance]: Can we use CUDA graph to accelerate the Qwen2_5omniAudioEncoder in Qwen2.5-Omni-3B?",
    "body": "### Proposal to improve performance\n\n<img width=\"3088\" height=\"1264\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/535d7854-b9db-4e40-8f85-1abe08b4d35e\" />\nThe trace graph shows that Qwen2_5omniAudioEncoder has a large number of small kernel startups, indicating significant room for optimization.\nCan we use CUDA graph to accelerate the Qwen2_5omniAudioEncoder in Qwen2.5-Omni-3B?\n\n### Report of performance regression\n\n_No response_\n\n### Misc discussion on performance\n\n_No response_\n\n### Your current environment (if you think it is necessary)\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29089",
    "state": "open",
    "labels": [
      "performance"
    ],
    "created_at": "2025-11-20T12:13:58Z",
    "updated_at": "2025-11-20T12:13:58Z",
    "comments": 0,
    "user": "xq25478"
  },
  {
    "repo": "pytorch/torchrec",
    "number": 3567,
    "title": "how to use torch.distributed.checkpoint to save and load state dict",
    "body": "sparse_arch is a part of my model.\n\n<img width=\"721\" height=\"698\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/cb35959b-418e-4ff4-8e12-4524528cbad2\" />\n\n<img width=\"1439\" height=\"684\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d008966e-e2d2-404d-bcda-bce3e3285eed\" />",
    "url": "https://github.com/meta-pytorch/torchrec/issues/3567",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-20T09:30:47Z",
    "updated_at": "2025-11-20T09:30:47Z",
    "comments": 0,
    "user": "haolujun"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29078,
    "title": "[Performance]: \u591a\u5b9e\u4f8b\u5bfc\u81f4\u7684cpu\u5360\u7528\u8fc7\u9ad8",
    "body": "### Your current environment\nGPU: RTX4090\ncuda version: cuda12.8\nvllm version: 0.11.0\n\n\u4e2d\u6587\uff1a\u6211\u4f7f\u7528triton server\u7684 vllm backend \u542f\u52a8\u4e864\u4e2a minerU2.5 \u6a21\u578b\u7684\u5b9e\u4f8b\uff0c\u6211\u7684\u670d\u52a1\u5668\u4e0a\u67092\u5f20\u5361\uff0c\u6211\u6bcf\u5f20\u5361\u542f\u52a8\u4e861\u4e2a\u5b9e\u4f8b\uff0c\u6211\u53d1\u73b0cpu\u8d1f\u8f7d\u6709\u65f6\u5019\u6781\u9ad8\uff0c\u51e0\u4e4e\u5360\u6ee1\u4e86\u6211\u7684\u670d\u52a1\u5668\uff0c\u6211\u7684\u670d\u52a1\u5668\u670996\u6838\uff0cvllm backend\u4f7f\u7528\u7684\u662fAsyncLLMEngine\uff0c\u6211\u89c2\u5bdf\u5230\u5728\u5355\u5361\u4e0a\u542f\u52a8\u4e00\u4e2a\u5b9e\u4f8b\u65f6\uff0c\u6211\u53d1\u9001200\u5f20\u5c0f\u5c3a\u5bf8\u7684\u6587\u5b57\u56fe\u505aOCR\u65f6\uff0cfps\u53ef\u4ee5\u8fbe\u5230\u6700\u9ad8\uff0c\u4e5f\u5c31\u662f\u6bcf\u79d2\u53ef\u4ee5\u5904\u7406200\u5f20\u7684\u56fe\u7247\uff0ccpu\u8d1f\u8f7d\u572840-50%\u5de6\u53f3\uff0c\u4e3a\u4e86\u8fdb\u4e00\u6b65\u589e\u52a0\u6027\u80fd\uff0c\u6211\u5728\u4e24\u5f20\u5361\u4e0a\u5404\u542f\u52a8\u4e86\u4e00\u4e2a\u5b9e\u4f8b\uff0c\u4f46\u662f\u6211\u89c2\u5bdf\u5230\u6b64\u65f6cpu\u8d1f\u8f7d\u51e0\u4e4e\u8fbe\u523099%\uff0c\u5360\u7528\u4e86\u6781\u9ad8\u7684cpu\uff0c\u6bcf\u4e2a\u5b9e\u4f8b\u7684fps\u53ea\u6709120\u5de6\u53f3\uff0c\u6027\u80fd\u51e0\u4e4e\u6ca1\u6709\u63d0\u5347\u3002\n\n\u6211\u505a\u4e86\u5927\u91cf\u7684\u6d4b\u8bd5\uff0c\u6211\u5f00\u59cb\u4ee5\u4e3a\u662ftriton server\u7684\u95ee\u9898\uff0c\u4f46\u7ecf\u8fc7\u6392\u67e5\uff0c\u6211\u8ba4\u4e3a\u95ee\u9898\u53ef\u80fd\u51fa\u73b0\u5728vllm\u63a8\u7406\u65f6\u5360\u7528\u4e86\u5f88\u9ad8\u7684cpu\uff0c\u56e0\u4e3a\u6211\u4e0d\u4f7f\u7528triton server\uff0c\u4f7f\u7528 `vllm serve`\u6765\u6a21\u62df\u540c\u6837\u7684\u60c5\u51b5\uff0c\u6bcf\u4e2avllm\u5b9e\u4f8b\u63a8\u7406\u65f6\u4e5f\u5360\u7528\u6389\u4e8620-30%\u7684cpu\uff0c\u5982\u679c\u8fd9\u6837\uff0c\u6211\u7684\u670d\u52a1\u5668\u5373\u4f7f\u6709\u518d\u591a\u7684GPU\uff0c\u4e5f\u4e0d\u80fd\u591f\u63d0\u5347\u6a21\u578b\u7684\u6027\u80fd\uff0c\u6211\u8be5\u5982\u4f55\u8c03\u8bd5\uff1f\nenglish\uff1a\nI launched 4 instances of the minerU2.5 model using the vllm backend of Triton Server. My server is equipped with 2 GPUs, with 1 instance running on each GPU. However, I noticed that the CPU load sometimes spikes to extremely high levels, nearly maxing out the server\u2014which has 192 CPU cores. The vllm backend uses AsyncLLMEngine.\n\nWhen running a single instance on one GPU and sending 200 small-sized text images for OCR, I achieved the highest FPS\u2014processing up to 200 images per second\u2014with the CPU load hovering around 40-50%. To further improve performance, I launched one instance on each of the two GPUs. But in this scenario, the CPU load reached nearly 99% (extremely high usage), and each instance only achieved around 120 FPS, with almost no performance gain.\n\nI conducted numerous tests. Initially, I suspected the issue was with Triton Server, but after troubleshooting, I believe the problem lies in the high CPU usage during vllm inference. Even when not using Triton Server\u2014simulating the same scenario with `vllm serve`\u2014each vllm instance consumes 20-30% of the CPU. If this persists, adding more GPUs to the server will not improve model performance. How should I debug this?\n\n\n### How would you like to use vllm\n\nI want to run inference of a [[MinerU2.5-2509-1.2B]().](https://huggingface.co/opendatalab/MinerU2.5-2509-1.2B) I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29078",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-20T08:26:35Z",
    "updated_at": "2025-11-21T02:17:51Z",
    "comments": 4,
    "user": "zjq1996518"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42291,
    "title": "Can we disable IPython progress bar and use normal tqdm bar?",
    "body": "I like the normal tqdm bar much better, it is lighter, cleaner, simpler, and less stress on my eyes (no green color). I would love to have an option to use tqdm bar and not IPython bar. ",
    "url": "https://github.com/huggingface/transformers/issues/42291",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-20T01:26:11Z",
    "updated_at": "2025-12-28T08:02:45Z",
    "comments": 1,
    "user": "weathon"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 168186,
    "title": "2nd example of large numeric divergence for torch compile vs eager in bf16",
    "body": "### \ud83d\udc1b Describe the bug\n\nFirst example is https://github.com/pytorch/pytorch/issues/168126.\n\nHere's another smaller example where I'm seeing a significant difference (rtol 1.0) between eager and compiled when running under bf16. Somehow the call to `torch.chunk` in `Module2` causes a numeric divergence to occur. It's likely related to inductor because the results match when I set `torch.compile(..., backend='aot_eager')`.\n\n```python\nimport torch\nfrom torch import Tensor, nn\n\n\nclass BaseModule(nn.Module):\n    def __init__(self, dim: int = 128) -> None:\n        super().__init__()\n        self.p_in = nn.Linear(dim, 2 * dim, bias=False)\n        self.g_in = nn.Linear(dim, 2 * dim, bias=False)\n\n\nclass Module1(BaseModule):\n    def forward(self, x: Tensor, mask: Tensor) -> Tensor:\n        x = self.p_in(x) * self.g_in(x)\n        return x\n\n\nclass Module2(BaseModule):\n    def forward(self, x: Tensor, mask: Tensor) -> Tensor:\n        x = self.p_in(x) * self.g_in(x)\n        a, b = torch.chunk(x, 2, dim=-1)\n        x = a + b\n        return x\n\n\nif __name__ == \"__main__\":\n    for module_cls in [Module1, Module2]:\n        for dtype in [torch.float32, torch.bfloat16]:\n            print(f\"Testing module {module_cls.__name__} with dtype: {dtype}\")\n            with torch.autocast(device_type=\"cuda\", dtype=dtype):\n                torch.manual_seed(42)\n                x = torch.randn(16, 128, 128, 128, device=\"cuda\")\n                mask = torch.randint(0, 2, (16, 128, 128), device=\"cuda\")\n\n                eager_layer = module_cls().cuda()\n                compiled_layer = torch.compile(module_cls().cuda(), fullgraph=True)\n\n                # Copy weights from reference to optimized to ensure identical parameters\n                with torch.no_grad():\n                    for param, ref_param in zip(\n                        compiled_layer.parameters(), eager_layer.parameters()\n                    ):\n                        param.data.copy_(ref_param.data)\n\n                out_eager = eager_layer(x, mask)\n                out_compiled = compiled_layer(x, mask)\n                torch.testing.assert_close(out_eager, out_compiled)\n            print(f\"Passed module {module_cls.__name__} with dtype: {dtype}\")\n```\n\n### Error logs\n\n```\n(repro) jamin@jamin-dev:~/deep-affinity$ python repro.py\nTesting module Module1 with dtype: torch.float32\nPassed module Module1 with dtype: torch.float32\nTesting module Module1 with dtype: torch.bfloat16\nPassed module Module1 with dtype: torch.bfloat16\nTesting module Module2 with dtype: torch.float32\nPassed module Module2 with dtype: torch.float32\nTesting module Module2 with dtype: torch.bfloat16\nTraceback (most recent call last):\n  File \"/home/jamin/deep-affinity/repro.py\", line 47, in <module>\n    torch.testing.assert_close(out_eager, out_compiled)\n  File \"/home/jamin/miniconda3/envs/repro/lib/python3.10/site-packages/torch/testing/_comparison.py\", line 1589, in assert_close\n    raise error_metas[0].to_error(msg)\nAssertionError: Tensor-likes are not close!\n\nMismatched elements: 753240 / 33554432 (2.2%)\nGreatest absolute difference: 0.01171875 at index (1, 61, 83, 48) (up to 1e-05 allowed)\nGreatest relative difference: 127.0 at index (4, 33, 47, 23) (up to 0.016 allowed)\n```\n\nWith `TORCHINDUCTOR_EMULATE_PRECISION_CASTS=1`:\n```\n(repro) jamin@jamin-dev:~/deep-affinity$ TORCHINDUCTOR_EMULATE_PRECISION_CASTS=1 python repro.py\nTesting module Module1 with dtype: torch.float32\nPassed module Module1 with dtype: torch.float32\nTesting module Module1 with dtype: torch.bfloat16\nPassed module Module1 with dtype: torch.bfloat16\nTesting module Module2 with dtype: torch.float32\nPassed module Module2 with dtype: torch.float32\nTesting module Module2 with dtype: torch.bfloat16\nTraceback (most recent call last):\n  File \"/home/jamin/deep-affinity/repro.py\", line 47, in <module>\n    torch.testing.assert_close(out_eager, out_compiled)\n  File \"/home/jamin/miniconda3/envs/repro/lib/python3.10/site-packages/torch/testing/_comparison.py\", line 1589, in assert_close\n    raise error_metas[0].to_error(msg)\nAssertionError: Tensor-likes are not close!\n\nMismatched elements: 554480 / 33554432 (1.7%)\nGreatest absolute difference: 0.0078125 at index (3, 87, 97, 127) (up to 1e-05 allowed)\nGreatest relative difference: 1.0 at index (0, 0, 13, 20) (up to 0.016 allowed)\n```\n\n### Versions\n\n```\nPyTorch version: 2.9.1+cu130\nIs debug build: False\nCUDA used to build PyTorch: 13.0\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 22.04.5 LTS (x86_64)\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0\nClang version: 14.0.0-1ubuntu1.1\nCMake version: version 3.22.1\nLibc version: glibc-2.35\n\nPython version: 3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-6.8.0-1043-gcp-x86_64-with-glibc2.35\nIs CUDA available: True\nCUDA runtime version: 13.0.88\nCUDA_MODULE_LOADING set to:\nGPU models and configuration: GPU 0: NVIDIA H100 80GB HBM3\nNvidia driver version: 580.95.05\ncuDNN version: Could not collect\nIs XPU available: False\nHIP r",
    "url": "https://github.com/pytorch/pytorch/issues/168186",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: inductor"
    ],
    "created_at": "2025-11-19T21:19:58Z",
    "updated_at": "2025-12-01T19:20:59Z",
    "comments": 6,
    "user": "jamin-chen"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 29023,
    "title": "[Feature]: Disable logging `/metrics`",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\n- IGW hits `/metrics` continuously to understand the current load on the system\n- This leads to an overload of logs\n- We can disable this with `--disable-uvicorn-access-log`, but lose access to all access logs\n\nWe should have `--disable-uvicorn-metrics-access-log` to avoid logging * just * metrics. Per Gemini, we can do this with something like:\n\n```python\n# Define the routes for which access logs should be disabled\nEXCLUDE_PATHS = [\"/health\", \"/metrics\"]\n\nclass EndpointFilter(logging.Filter):\n    def filter(self, record: logging.LogRecord) -> bool:\n        # Check if the log record contains arguments and if the path matches an excluded path\n        if record.args and len(record.args) >= 3:\n            path = record.args[2]  # The path is typically the third argument in uvicorn access logs\n            if path in EXCLUDE_PATHS:\n                return False  # Exclude this log record\n        return True  # Include all other log records\n```\n\nCreate a command line arg like `--disable-uvicorn-metrics-access-log`which selectively disables logging hits to `/metrics`\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/29023",
    "state": "open",
    "labels": [
      "help wanted",
      "good first issue",
      "feature request"
    ],
    "created_at": "2025-11-19T18:25:48Z",
    "updated_at": "2025-11-19T21:57:34Z",
    "comments": 5,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3575,
    "title": "How to override model's `max_seq_length`?",
    "body": "It seems that impossible to override model's max length from `sentence_bert_config.json`. \n\n```python\nfrom sentence_transformers import SentenceTransformer\n\nm = SentenceTransformer(\"intfloat/e5-small\", tokenizer_kwargs={\"model_max_length\":3})\nprint(m.tokenize([\"hi hi hi hi hi hi hi hi hi hi hi hi hi\"]))\n# {'input_ids': tensor([[ 101, 7632, 7632, 7632, 7632, 7632, 7632, 7632, 7632, 7632, 7632, 7632,\n#          7632, 7632,  102]]), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]), 'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]])}\nprint(m.tokenize([\"hi hi hi hi hi hi hi hi hi hi hi hi hi\"], truncation=True))\n# {'input_ids': tensor([[ 101, 7632, 7632, 7632, 7632, 7632, 7632, 7632, 7632, 7632, 7632, 7632,\n#         7632, 7632,  102]]), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]), 'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]])}\nprint(m[0].tokenizer([\"hi hi hi hi hi hi hi hi hi hi hi hi hi\"], truncation=True))\n# {'input_ids': [[101, 7632, 102]], 'token_type_ids': [[0, 0, 0]], 'attention_mask': [[1, 1, 1]]}\n\nm.max_seq_length = 3\nprint(m.tokenize([\"hi hi hi hi hi hi hi hi hi hi hi hi hi\"]))\n# {'input_ids': tensor([[ 101, 7632,  102]]), 'token_type_ids': tensor([[0, 0, 0]]), 'attention_mask': tensor([[1, 1, 1]])}\n```\n\nThis is happening because during load it load `max_seq_length` from `sentence_bert_config` and then in `Transformers` it will override `max_seq_length` only it wasn't set in `sentence_bert_config` https://github.com/huggingface/sentence-transformers/blob/ad28c0a982acc39c73abdf0019faca10f227ef28/sentence_transformers/models/Transformer.py#L101-L118 even if `model_max_length` is passed in `tokenizer_kwargs` and then `max_seq_length` will be used as `max_length` instead of passed in kwargs https://github.com/huggingface/sentence-transformers/blob/ad28c0a982acc39c73abdf0019faca10f227ef28/sentence_transformers/models/Transformer.py#L319-L327\n\nProbably this can be fixed by\n\n```diff\nmax_seq_length = min(max_seq_length, self.tokenizer.model_max_length)\n```\n\n\nSource https://github.com/embeddings-benchmark/mteb/pull/3587#discussion_r2542434603\nI think this is cause of https://github.com/huggingface/sentence-transformers/issues/3187",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3575",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-19T16:42:27Z",
    "updated_at": "2025-11-20T13:47:13Z",
    "user": "Samoed"
  },
  {
    "repo": "huggingface/trl",
    "number": 4546,
    "title": "Does TRL support PipelineRL for compute efficiency?",
    "body": "Hi \ud83d\udc4b,\n\nI'm trying to understand whether TRL currently supports (or plans to support) the PipelineRL approach described here:\n\n- Paper: [https://arxiv.org/pdf/2509.19128v2](https://arxiv.org/pdf/2509.19128v2?utm_source=chatgpt.com)\n- Overview: [https://arxiv.org/html/2509.19128](https://arxiv.org/html/2509.19128?utm_source=chatgpt.com)\n\nPipelineRL introduces an actor\u2013learner pipeline with in-flight weight updates, where actors keep generating while the learner updates weights concurrently. This reduces policy lag and improves GPU utilization for long-context RL runs.\n\n\nDoes TRL currently support this kind of pipelineRL workflow, or is there a recommended way to approximate it using the existing TRL trainers (GRPO + vLLM)?\n\nIf not, I'd love suggestions or best practices for building something similar on top of TRL.\n\nThanks! \ud83d\ude4f",
    "url": "https://github.com/huggingface/trl/issues/4546",
    "state": "open",
    "labels": [
      "\u2728 enhancement",
      "\u2753 question"
    ],
    "created_at": "2025-11-19T12:39:29Z",
    "updated_at": "2025-11-22T12:43:54Z",
    "comments": 3,
    "user": "harisarang"
  },
  {
    "repo": "pytorch/torchrec",
    "number": 3561,
    "title": "How can I export a trained model to the Triton inference server?",
    "body": "How can I export a trained model to the Triton inference server?\n\nAre there any examples of exporting models, whether using Torch-TensorRT or TorchScript?",
    "url": "https://github.com/meta-pytorch/torchrec/issues/3561",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-19T08:20:51Z",
    "updated_at": "2025-11-19T08:20:51Z",
    "comments": 0,
    "user": "intfish123"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 168148,
    "title": "BF16 activation precision mismatch between eager ATen and compiled Triton",
    "body": "### \ud83d\udc1b Describe the bug\n\nI\u2019d like to report that for activation operators such as `sigmoid` and `tanh`, when the input dtype is `bf16`, the computation precision differs between eager mode and `compile[triton]`. In eager mode, ATen computes directly in `bf16`, but the generated Triton kernel upcasts to `fp32` \u2192 applies the activation \u2192 then downcasts to `bf16`. This can lead to accuracy differences between the eager and compiled paths for the same model. Why is this the current strategy?\n\n### Error logs\n\n_No response_\n\n### Versions\n\ntorch==2.7.0a0+git1169ded\ntriton==3.2.0\n\ncc @ezyang @gchanan @kadeng @msaroufim @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @muchulee8 @amjames @aakhundov @coconutruben",
    "url": "https://github.com/pytorch/pytorch/issues/168148",
    "state": "closed",
    "labels": [
      "high priority",
      "triaged",
      "oncall: pt2",
      "module: inductor"
    ],
    "created_at": "2025-11-19T08:10:53Z",
    "updated_at": "2025-11-28T06:05:05Z",
    "comments": 6,
    "user": "zhaoying9105"
  },
  {
    "repo": "pytorch/torchrec",
    "number": 3559,
    "title": "How to convert DistributedModelParallel to quantize_inference_model and use torch.jit.script to save?",
    "body": "I run a example in `https://github.com/facebookresearch/dlrm/tree/main/torchrec_dlrm`, and want to save model with `torch.jit.script`, but it has error.\n\ncommand:\n```\nexport LEARNING_RATE=0.5;\ntorchx run -s local_cwd dist.ddp -j 1x1 --script dlrm_main.py --     --batch_size 2048     --learning_rate $LEARNING_RATE     --dataset_name criteo_kaggle     --num_embeddings_per_feature 40000000,39060,17295,7424,20265,3,7122,1543,63,40000000,3067956,405282,10,2209,11938,155,4,976,14,40000000,40000000,40000000,590152,12973,108,36     --embedding_dim 128     --over_arch_layer_sizes 1024,1024,512,256,1     --dense_arch_layer_sizes 512,256,128     --epochs 1     --validation_freq_within_epoch 12802\n```\n\n<img width=\"1511\" height=\"855\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/ce9dcb6e-c0ac-4e77-b67a-db9836a62fd7\" />\n\nlogs:\n```\ntorchx 2025-11-19 06:46:19 INFO     Tracker configurations: {}\ntorchx 2025-11-19 06:46:19 INFO     Log directory not set in scheduler cfg. Creating a temporary log dir that will be deleted on exit. To preserve log directory set the `log_dir` cfg option\ntorchx 2025-11-19 06:46:19 INFO     Log directory is: /tmp/torchx_z2d00ny6\nlocal_cwd://torchx/dlrm_main-vm9krtsx5bpnjd\ntorchx 2025-11-19 06:46:19 INFO     Waiting for the app to finish...\ndlrm_main/0 [0]:PARAMS: (lr, batch_size, warmup_steps, decay_start, decay_steps): (0.5, 2048, 0, 0, 0)\ndlrm_main/0 [0]:/workspace/dlrm/.venv/lib/python3.10/site-packages/torch/distributed/distributed_c10d.py:860: UserWarning: `_get_pg_default_device` will be deprecated, it only stays for backward-compatiblity reason. If you need to find a device for object collectives, please use `_get_object_coll_device`. If you need to query the device types supported by group, please use `_device_capability(group)`. \ndlrm_main/0 [0]:  warnings.warn(\ndlrm_main/0 [0]:\ndlrm_main/0 [0]:Epoch 0:   0%|          | 0/10 [00:00<?, ?it/s]dlrm_main/0 [0]:\ndlrm_main/0 [0]:Epoch 0:  10%|\u2588         | 1/10 [00:00<00:03,  3.00it/s]dlrm_main/0 [0]:\ndlrm_main/0 [0]:Epoch 0: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 10/10 [00:00<00:00, 25.97it/s]\ndlrm_main/0 [0]:\ndlrm_main/0 [0]:Evaluating val set:   0%|          | 0/10 [00:00<?, ?it/s]dlrm_main/0 [0]:Total number of iterations: 10\ndlrm_main/0 [0]:\ndlrm_main/0 [0]:Evaluating val set:  50%|\u2588\u2588\u2588\u2588\u2588     | 5/10 [00:00<00:00, 48.80it/s]/workspace/dlrm/.venv/lib/python3.10/site-packages/torch/distributed/distributed_c10d.py:4807: UserWarning: No device id is provided via `init_process_group` or `barrier `. Using the current device set by the user. \ndlrm_main/0 [0]:  warnings.warn(  # warn only once\ndlrm_main/0 [0]:\ndlrm_main/0 [0]:Evaluating val set: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 10/10 [00:00<00:00, 75.09it/s]\ndlrm_main/0 [0]:\ndlrm_main/0 [0]:Evaluating test set:   0%|          | 0/10 [00:00<?, ?it/s]dlrm_main/0 [0]:AUROC over val set: 0.5073344707489014.\ndlrm_main/0 [0]:Number of val samples: 20480\ndlrm_main/0 [0]:\ndlrm_main/0 [0]:Evaluating test set: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 10/10 [00:00<00:00, 192.46it/s]\ndlrm_main/0 [0]:[rank0]: Traceback (most recent call last):\ndlrm_main/0 [0]:[rank0]:   File \"/workspace/dlrm/torchrec_dlrm/dlrm_main.py\", line 737, in <module>\ndlrm_main/0 [0]:[rank0]:     invoke_main()  # pragma: no cover\ndlrm_main/0 [0]:[rank0]:   File \"/workspace/dlrm/torchrec_dlrm/dlrm_main.py\", line 733, in invoke_main\ndlrm_main/0 [0]:[rank0]:     main(sys.argv[1:])\ndlrm_main/0 [0]:[rank0]:   File \"/workspace/dlrm/torchrec_dlrm/dlrm_main.py\", line 727, in main\ndlrm_main/0 [0]:[rank0]:     script_model = torch.jit.script(quantize_model)\ndlrm_main/0 [0]:[rank0]:   File \"/workspace/dlrm/.venv/lib/python3.10/site-packages/torch/jit/_script.py\", line 1443, in script\ndlrm_main/0 [0]:[rank0]:     ret = _script_impl(\ndlrm_main/0 [0]:[rank0]:   File \"/workspace/dlrm/.venv/lib/python3.10/site-packages/torch/jit/_script.py\", line 1152, in _script_impl\ndlrm_main/0 [0]:[rank0]:     return torch.jit._recursive.create_script_module(\ndlrm_main/0 [0]:[rank0]:   File \"/workspace/dlrm/.venv/lib/python3.10/site-packages/torch/jit/_recursive.py\", line 554, in create_script_module\ndlrm_main/0 [0]:[rank0]:     concrete_type = get_module_concrete_type(nn_module, share_types)\ndlrm_main/0 [0]:[rank0]:   File \"/workspace/dlrm/.venv/lib/python3.10/site-packages/torch/jit/_recursive.py\", line 503, in get_module_concrete_type\ndlrm_main/0 [0]:[rank0]:     concrete_type = concrete_type_store.get_or_create_concrete_type(nn_module)\ndlrm_main/0 [0]:[rank0]:   File \"/workspace/dlrm/.venv/lib/python3.10/site-packages/torch/jit/_recursive.py\", line 435, in get_or_create_concrete_type\ndlrm_main/0 [0]:[rank0]:     concrete_type_builder = infer_concrete_type_builder(nn_module)\ndlrm_main/0 [0]:[rank0]:   File \"/workspace/dlrm/.venv/lib/python3.10/site-packages/torch/jit/_recursive.py\", line 285, in infer_concrete_type_builder\ndlrm_main/0 [0]:[rank0]:     sub_concrete_type = get_module_concrete_type(item, share_types)\ndlrm_main/0 [0]:[rank0]:   File \"/workspace/dlrm/.venv/lib/python3.10/site-packages/torch/jit/_recurs",
    "url": "https://github.com/meta-pytorch/torchrec/issues/3559",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-19T06:51:01Z",
    "updated_at": "2025-11-19T06:53:01Z",
    "comments": 0,
    "user": "intfish123"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28996,
    "title": "[Usage]: How to run a single data parallel deployment across multiple nodes without ray",
    "body": "### Your current environment\n\n2 Nodes, each node has 8 H20 GPUs.\n\n### How would you like to use vllm\n\nAccording to https://docs.vllm.ai/en/latest/serving/data_parallel_deployment/#internal-load-balancing\n\n```shell\n# node0\nvllm serve Qwen3-Coder-480B-A35B-Instruct --trust-remote-code --max-num-seqs 64 --max-model-len 131072 --port $PORT0 --host :: --data-parallel-size 2 --data-parallel-size-local 1 --data-parallel-address $NODE0_IPV6 --data-parallel-rpc-port $PORT1\n\n# node1\nvllm serve Qwen3-Coder-480B-A35B-Instruct --trust-remote-code --max-num-seqs 64 --max-model-len 131072 --headless --data-parallel-size 2 --data-parallel-size-local 1 --data-parallel-start-rank 1 --data-parallel-address $NODE0_IPV6 --data-parallel-rpc-port $NODE0_PORT1\n```\nbut all of them are hanging on waiting for init message from front-end.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28996",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-19T06:47:22Z",
    "updated_at": "2025-11-27T06:17:22Z",
    "comments": 3,
    "user": "crystalww"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28986,
    "title": "[Feature]: Fused Kernel for GPT-OSS Router",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\n<img width=\"1257\" height=\"250\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/31eba061-522c-4521-b0a9-9f25bb36c3df\" />\n\n- Right now, we spend ~3.5% of the layer in the expert selection\n- The operation is unfused\n\nWrite a fused kernel like we have for deepseek grouped_topk\n\n### Alternatives\n\n- torch compile\n- triton\n- cuda\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28986",
    "state": "open",
    "labels": [
      "help wanted",
      "good first issue",
      "feature request"
    ],
    "created_at": "2025-11-19T03:18:25Z",
    "updated_at": "2025-12-12T16:16:37Z",
    "comments": 7,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1458,
    "title": "ONNX Backend Env variable",
    "body": "### Question\n\nHi, \n\nFor some context, I'm building an application that uses some of the models on huggingface as an annotation tool that helps create annotations for training a specialised model.\n\nAs for the specialised model, I am able to export them to onnx, and I was able to run this model in the same application, but I  have to manually install the same onnxruntime-web version to be able to do so. I looked into the docs [here](https://huggingface.co/docs/transformers.js/api/backends/onnx#module_backends/onnx.createInferenceSession), but I cannot access these functions through `env.backends.onnx`. I've tried `console.log(env.backends.onnx.isONNXProxy())` and got \n```\nUncaught (in promise) TypeError: env.backends.onnx.isONNXProxy is not a function\n```\n\nIs there a way I can access the same inference session through this package? \n\n---------------------------------\n\nMy `package.json`\n\n```\n{\n    \"dependencies\": {\n        \"@huggingface/transformers\": \"3.7.5\",\n        \"onnxruntime-web\": \"1.22.0-dev.20250409-89f8206ba4\"\n    },\n}\n\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/1458",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-11-19T01:26:02Z",
    "updated_at": "2025-11-25T15:36:13Z",
    "user": "Heinrik-20"
  },
  {
    "repo": "pytorch/vision",
    "number": 9276,
    "title": "where did torchvision v0.10.0 go?",
    "body": "I am trying to download torchvision v0.10.0 to my Jetson Nano to build it but I am always getting this error:\n\n```\nams@ams-Alienware-m17-R3:~$ git ls-remote --tags https://github.com/pytorch/vision.git\nremote: Internal Server Error\nfatal: unable to access 'https://github.com/pytorch/vision.git/': The requested URL returned error: 500\n\n```\n\nI have navigated inside the repository to search for v0.10.0, but couldn't find it in the branches.",
    "url": "https://github.com/pytorch/vision/issues/9276",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-18T21:32:56Z",
    "updated_at": "2025-11-19T09:03:29Z",
    "comments": 1,
    "user": "abdosalem490"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 168099,
    "title": "Unify pointwise DTensor and NestedTensor OP Coverage. Adds over 100 op overloads to DTensor and about to 10 to NestedTensor",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nCurrently, DTensor maintains it's own list of which ops are pointwise. NestedTensor has a similar requirement and instead elected to add a pointwise tag to OpInfo. Maintaining two separate lists of pointwise ops is error prone. We should have both use a single source of information on which ops are pointwise. Doing so should improve op coverage for DTensor and perhaps NestedTensor and remove code duplication significantly.\n\nThese calculations I quickly did using PyTorch 2.8.0 in from Google Colab.\n\n> DTensor pointwise ops #: 364\n> OPinfo pointwise ops #: 537\n> DTensor pointwise ops missing in OpInfo #: 10\n> OpInfo pointwise ops missing in DTensor #: 185\n\n\nUnifying these would add 185 ops to DTensor coverage and 10 ops to NestedTensor coverage\n\nI would suggest checking if an op is pointwise\nwith `torch.Tag.pointwise in op.tags` for an arbitrary aten operator. I would then add the pointwise tags to any ops that are listed as pointwise in DTensor but not in opinfo and unify the lists. Doing so would ensure NestedTensor and DTensor have similar coverage\n\nTagging @ezyang \n\nSlack Discussion:\n> Anyone know why DTensor doesn\u2019t use optest\u2019s pointwise tag registration that NestedTensor already uses? It\u2019s weird to me it maintains a second list of all the pointwise ops when that info should be provided already by OpInfo registration?\n> @ezyang Reply: it probably should just use it\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\nExample of drift between DTensor and NestedTensor op coverage: https://github.com/pytorch/pytorch/pull/167973\n\nCurrent analysis:\n```\ncheck if op is pointwise: [torch.Tag.pointwise in op.tags for op in pointwise_ops] \n```\n\nThese ops are missing the op that are in the  do not have pointwise tags currently, but are list in DTensor:\n```python\n[<OpOverload(op='aten.__irshift__', overload='Scalar')>, <OpOverload(op='aten.__irshift__', overload='Tensor')>, <OpOverload(op='aten._conj', overload='default')>, <OpOverload(op='aten.abs_', overload='default')>, <OpOverload(op='aten.copysign_', overload='Scalar')>, <OpOverload(op='aten.copysign_', overload='Tensor')>, <OpOverload(op='aten.ldexp', overload='default')>, <OpOverload(op='aten.native_dropout_backward', overload='out')>, <OpOverload(op='aten.where', overload='self_out')>, <OpOverload(op='aten.xlogy_', overload='Scalar_Other')>]\n```\n\n```python\ndef get_pointwise_overloads():\n    pointwise = []\n\n    # All registered operator schemas\n    for schema in torch._C._jit_get_all_schemas():\n        ns, op_name = schema.name.split(\"::\", 1)\n\n        # Only care about aten ops; drop prim, quantized, etc.\n        if ns != \"aten\":\n            continue\n\n        # Get the OpOverloadPacket, e.g. torch.ops.aten.add\n        try:\n            packet = getattr(getattr(torch.ops, ns), op_name)\n        except AttributeError:\n            continue  # some schemas may not be exposed via torch.ops\n\n        # Map JIT overload name -> Python overload attribute\n        overload_name = schema.overload_name or \"default\"\n\n        try:\n            overload = getattr(packet, overload_name)  # OpOverload\n        except AttributeError:\n            continue  # can happen in weird cases\n\n        # Check tag\n        if torch.Tag.pointwise in overload.tags:\n            pointwise.append(overload)\n\n    return pointwise\n```\nand comparing to that the list in the DTensor:\nDTensor pointwise ops #: 364\nOPinfo pointwise ops #: 537\nDTensor pointwise ops missing in OpInfo #: 10\nOpInfo pointwise ops missing in DTensor #: 185\n\nSo unifying this would add 173 ops to DTensor and add 10 op coverage to NestedTensor!\n\nPointwoise opinfo tags are found here: https://github.com/pytorch/pytorch/blob/f9724db4921288a096e331cee835abd43257fbd6/aten/src/ATen/native/native_functions.yaml#L10242\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci @tianyu-l @XilunWu @SherlockNoMad\n\nThe least invasive way to handle this is probably to add a fallback that checks if the op has a pointwise tags and tries to pointwise it similar to how NestedTensor currently works. Similar to: https://github.com/pytorch/pytorch/blob/33d4cf4fcb7f0cba6191b242dae53b48057e05b9/torch/distributed/tensor/_ops/_pointwise_ops.py#L626C1-L629C6 may need to check if the op supports out= arg though.",
    "url": "https://github.com/pytorch/pytorch/issues/168099",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "triaged",
      "module: dtensor",
      "llm-amenable"
    ],
    "created_at": "2025-11-18T19:47:48Z",
    "updated_at": "2025-11-24T19:04:58Z",
    "comments": 2,
    "user": "Skylion007"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28956,
    "title": "[Bug]: OOM when profiling multimodal model with multiple images",
    "body": "### Your current environment\n\nvLLM 0.11.0\n\n### \ud83d\udc1b Describe the bug\n\nAs per title. \n\nThe error log is as follows:\n```\n[multiproc_executor.py:671] Traceback (most recent call last):\n[multiproc_executor.py:671]   File \"/root/miniconda3/lib/python3.11/site-packages/vllm/v1/executor/multiproc_executor.py\", line 666, in worker_busy_loop\n[multiproc_executor.py:671]     output = func(*args, **kwargs)\n[multiproc_executor.py:671]              ^^^^^^^^^^^^^^^^^^^^^\n[multiproc_executor.py:671]   File \"/root/miniconda3/lib/python3.11/site-packages/torch/utils/_contextlib.py\", line 120, in decorate_context\n[multiproc_executor.py:671]     return func(*args, **kwargs)\n[multiproc_executor.py:671]            ^^^^^^^^^^^^^^^^^^^^^\n[multiproc_executor.py:671]   File \"/root/miniconda3/lib/python3.11/site-packages/vllm/v1/worker/gpu_worker.py\", line 263, in determine_available_memory\n[multiproc_executor.py:671]     self.model_runner.profile_run()\n[multiproc_executor.py:671]   File \"/root/miniconda3/lib/python3.11/site-packages/vllm/v1/worker/gpu_model_runner.py\", line 3379, in profile_run\n[multiproc_executor.py:671]     expanded = output.new_zeros(\n[multiproc_executor.py:671]                ^^^^^^^^^^^^^^^^^\n[multiproc_executor.py:671] torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 3.00 GiB. GPU 6 has a total capacity of 139.81 GiB of which 2.58 GiB is free. Including non-PyTorch memory, this process has 137.21 GiB memory in use. Of the allocated memory 134.77 GiB is allocated by PyTorch, and 255.64 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)\n```\nLooks like we only need **ONE** encoder cache with shape `(encoder_budget, encoder_output_shape[-1])`  rather than `len(dummy_encoder_outputs)` ones.\nhttps://github.com/vllm-project/vllm/blob/da8dadf68b5a2af849e7c5fd35ce9b8525d8d398/vllm/v1/worker/gpu_model_runner.py#L4128-L4144\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28956",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-18T17:36:55Z",
    "updated_at": "2025-11-25T12:38:37Z",
    "comments": 7,
    "user": "imShZh"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2475,
    "title": "Why there is difference between async inference and local inference in image resize?",
    "body": "I read code between `src/lerobot/async_inference/policy_server.py` and `src/lerobot/scripts/lerobot_record.py`. I found difference in these 2 code about inference which causes different image shape\n1. `src/lerobot/scripts/lerobot_record.py` use this to deal with observation\nAnd `prepare_observation_for_inference` is like this:\n```python\ndef prepare_observation_for_inference(\n    observation: dict[str, np.ndarray],\n    device: torch.device,\n    task: str | None = None,\n    robot_type: str | None = None,\n) -> RobotObservation:\n    for name in observation:\n        observation[name] = torch.from_numpy(observation[name])\n        if \"image\" in name:\n            observation[name] = observation[name].type(torch.float32) / 255\n            observation[name] = observation[name].permute(2, 0, 1).contiguous()\n        observation[name] = observation[name].unsqueeze(0)\n        observation[name] = observation[name].to(device)\n    observation[\"task\"] = task if task else \"\"\n    observation[\"robot_type\"] = robot_type if robot_type else \"\"\n    return observation\n```\n\nHere no **resize** operation in images i think. \n\n2. in async_inference policy_server.py,it uses\nBut here function`prepare_raw_observation` makes sense on image shape\n```python\ndef prepare_raw_observation(\n    robot_obs: RawObservation,\n    lerobot_features: dict[str, dict],\n    policy_image_features: dict[str, PolicyFeature],\n) -> Observation:\n    \"\"\"Matches keys from the raw robot_obs dict to the keys expected by a given policy (passed as\n    policy_image_features).\"\"\"\n    # 1. {motor.pos1:value1, motor.pos2:value2, ..., laptop:np.ndarray} ->\n    # -> {observation.state:[value1,value2,...], observation.images.laptop:np.ndarray}\n    lerobot_obs = make_lerobot_observation(robot_obs, lerobot_features)\n    # 2. Greps all observation.images.<> keys\n    image_keys = list(filter(is_image_key, lerobot_obs))\n    # state's shape is expected as (B, state_dim)\n    state_dict = {OBS_STATE: extract_state_from_raw_observation(lerobot_obs)}\n    image_dict = {\n        image_k: extract_images_from_raw_observation(lerobot_obs, image_k) for image_k in image_keys\n    }\n    # Turns the image features to (C, H, W) with H, W matching the policy image features.\n    # This reduces the resolution of the images\n    image_dict = {\n        key: resize_robot_observation_image(torch.tensor(lerobot_obs[key]), policy_image_features[key].shape)\n        for key in image_keys\n    }\n    if \"task\" in robot_obs:\n        state_dict[\"task\"] = robot_obs[\"task\"]\n    return {**state_dict, **image_dict}\n```\nHere the shape of observation images is modified to policy config\n```python\ndef resize_robot_observation_image(image: torch.tensor, resize_dims: tuple[int, int, int]) -> torch.tensor:\n    assert image.ndim == 3, f\"Image must be (C, H, W)! Received {image.shape}\"\n    # (H, W, C) -> (C, H, W) for resizing from robot obsevation resolution to policy image resolution\n    image = image.permute(2, 0, 1)\n    dims = (resize_dims[1], resize_dims[2])\n    # Add batch dimension for interpolate: (C, H, W) -> (1, C, H, W)\n    image_batched = image.unsqueeze(0)\n    # Interpolate and remove batch dimension: (1, C, H, W) -> (C, H, W)\n    resized = torch.nn.functional.interpolate(image_batched, size=dims, mode=\"bilinear\", align_corners=False)\n\n    return resized.squeeze(0)\n``` \n\nI found this when I can inference correctly locally by made weird action outputs from async inference. it must be caused by my didn't resize input image when training. -.-\n\n\nversion:deb9596bd3796c03ae3a5a6b81b63c1dba296256\n",
    "url": "https://github.com/huggingface/lerobot/issues/2475",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-11-18T14:32:17Z",
    "updated_at": "2025-11-24T02:23:13Z",
    "user": "milong26"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 2053,
    "title": "Training Qwen3-0.6B with loss mismatch.",
    "body": "### Bug description\n\nWhen using the config file 'torchtitan/models/qwen3/train_configs/qwen3_0.6b.toml', the starting loss of 12x suggests the weights may not have been loaded properly.\n\n<img width=\"1541\" height=\"510\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/ed61a47c-1c6e-47e3-8503-ec84df085f83\" />\n\n### Versions\n\n[job]\ndump_folder = \"./outmodel\"\ndescription = \"Qwen 3 0.6B training\"\n\n[profiling]\nenable_profiling = false\nsave_traces_folder = \"profile_trace\"\nprofile_freq = 100\n\n[metrics]\nlog_freq = 1\nenable_tensorboard = false\nsave_tb_folder = \"tb\"\n\n[model]\nname = \"qwen3\"\nflavor = \"0.6B\"\nhf_assets_path = \"./assets/hf/Qwen3-0.6B\"\n# converters = [\"float8\"]\n\n[optimizer]\nname = \"AdamW\"\nlr = 3e-4\neps = 1e-8\n\n[lr_scheduler]\nwarmup_steps = 2  # lr scheduler warm up, 20% total steps\n\n[training]\nlocal_batch_size = 1\nseq_len = 4096\nmax_norm = 1.0  # grad norm clipping\nsteps = 100\ndataset = \"math\"\n\n[parallelism]\ndata_parallel_replicate_degree = 1\ndata_parallel_shard_degree = -1\nfsdp_reshard_after_forward = \"default\" # default / never / always\ntensor_parallel_degree = 1\ncontext_parallel_degree = 1\n\n[checkpoint]\nenable = false\nfolder = \"checkpoint\"\ninterval = 50\nlast_save_model_only = false\nexport_dtype = \"float16\"\nasync_mode = \"disabled\" # [\"disabled\", \"async\", \"async_with_pinned_mem\"]\n\n[activation_checkpoint]\nmode = \"full\"  # [\"none\", \"selective\", \"full\"]\nselective_ac_option = \"op\"  # \"int\" = ac every positive int layer or 'op', ac based on ops policy\n\n[compile]\nenable=false\ncomponents = [\"model\", \"loss\"]\n\n[quantize.linear.float8]\nenable_fsdp_float8_all_gather = false\nprecompute_float8_dynamic_scale_for_fsdp = false\nfilter_fqns = [\"output\"]\n",
    "url": "https://github.com/pytorch/torchtitan/issues/2053",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-11-18T14:24:43Z",
    "updated_at": "2025-12-18T09:24:46Z",
    "user": "Joluck"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28943,
    "title": "[Usage]: what's the right way to run embedding model in vllm 0.11.0",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\nin vllm 0.8.7\uff0cI use following code to run local vllm\uff0call is right\uff1a\n```\n        self.engine_args = EngineArgs(\n            model=self.model_path,\n            dtype='half',\n            task=\"embed\",\n            trust_remote_code=True,\n            limit_mm_per_prompt={\"image\": 1},\n        )\n        e = asdict(self.engine_args)\n        self.max_len = 100\n        self.llm = LLM(**e)\n        out = self.llm.embed(datas)\n```\nBut in vllm 0.11.0 according to the document https://www.aidoczh.com/vllm/models/pooling_models.html\uff0cit use runner=='pooling' to run embedding task. What's the diffenence? Could the 'task' arg 'embed' still take effect?\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28943",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-18T13:47:57Z",
    "updated_at": "2025-11-20T10:49:12Z",
    "comments": 3,
    "user": "neverneverendup"
  },
  {
    "repo": "huggingface/trl",
    "number": 4541,
    "title": "Is attn_implementation=sdpa not supported when using SFTTrainer with mllama?",
    "body": "When trying to use `sdpa` with mllama I get an error using the default collator. Upon writing my own collator it works.\nWhen using `eager` implementation it gives cuda oom error. Is `sdpa` not supported?",
    "url": "https://github.com/huggingface/trl/issues/4541",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-18T11:57:01Z",
    "updated_at": "2025-11-18T11:57:01Z",
    "comments": 0,
    "user": "osaidr"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28930,
    "title": "[Usage]: How to build a qwen3vl embedding model with a custom mlp layer on the top use vllm?",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n\n```\n\nHi friends! I train a sft model built upon qwen3vl 2b model, we put a mlp layer on it to compress the embedding size of the backbone model. Now I want to use vllm 0.11.0 to serve it but I meet some confuse. Here is my custom class code\n\n```\nfrom argparse import Namespace\nfrom dataclasses import asdict\nfrom typing import Literal, NamedTuple, Optional, TypedDict, Union, get_args\nimport torch\nimport torch.nn as nn\nfrom vllm.model_executor.models.qwen3_vl import Qwen3VLForConditionalGeneration\n\nfrom vllm.v1.pool.metadata import PoolingMetadata\nfrom vllm.v1.sample.metadata import SamplingMetadata\n\nfrom vllm.config import VllmConfig\nfrom vllm.multimodal import MULTIMODAL_REGISTRY\n\n\nclass CustomQwenVL3BPool(nn.Module):\n    def __init__(\n        self\n    ):\n        super().__init__()\n        self.out = torch.nn.Sequential(\n            torch.nn.Linear(2048, 512),\n            torch.nn.SiLU(),\n            torch.nn.Linear(512, 128)\n        )\n\n    def get_prompt_lens(self,\n        hidden_states: Union[torch.Tensor, list[torch.Tensor]],\n        pooling_metadata: PoolingMetadata,\n    ) -> torch.Tensor:\n        return pooling_metadata.prompt_lens\n\n\n    def forward(\n        self,\n        hidden_states: torch.Tensor,\n        pooling_metadata: PoolingMetadata,\n    ) -> Union[list[torch.Tensor], torch.Tensor]:\n        # 1 \u63d0\u53d6lasttoken\n        prompt_lens = self.get_prompt_lens(hidden_states, pooling_metadata)\n        last_token_flat_indices = torch.cumsum(prompt_lens, dim=0) - 1\n        hidden_states = hidden_states[last_token_flat_indices]\n        # 2 mlp\u538b\u7f29\u7ef4\u5ea6\n        mlp_output = self.out(hidden_states)\n        # 3 \u6b63\u5219\u5316\u8f93\u51fa\uff0c\u9700\u8981check\u4e0bvllm\u662f\u5426\u4f1a\u518d\u6b21norm\n        normalized_output = F.normalize(mlp_output, p=2, dim=-1)\n        return normalized_output\n    \n\nclass CustomQwen3VLForConditionalGeneration(Qwen3VLForConditionalGeneration):\n    def __init__(self, *, vllm_config: VllmConfig, prefix: str = \"\"):\n        super().__init__(vllm_config=vllm_config, prefix=prefix)\n        self._pooler = CustomQwenVL3BPool()\n```\nWhen I run above code using local mode of vllm , error log says **\"[adapters.py:79] ST projector loading failed\".Does anybody know why?**  BTW\uff0cwhat's the best practice to make a custom embedding model with mlp in vllm 0.11.0\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28930",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-18T10:32:07Z",
    "updated_at": "2025-12-23T04:49:30Z",
    "comments": 10,
    "user": "neverneverendup"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28929,
    "title": "[Usage]: How",
    "body": "=",
    "url": "https://github.com/vllm-project/vllm/issues/28929",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-18T10:26:17Z",
    "updated_at": "2025-11-18T10:30:53Z",
    "comments": 0,
    "user": "neverneverendup"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7869,
    "title": "Why does dataset merge fail when tools have different parameters?",
    "body": "Hi, I have a question about SFT (Supervised Fine-tuning) for an agent model.\n\nSuppose I want to fine-tune an agent model that may receive two different tools: tool1 and tool2. These tools have different parameters and types in their schema definitions.\n\nWhen I try to merge datasets containing different tool definitions, I get the following error:\n\nTypeError: Couldn't cast array of type\nstruct<refundFee: struct<description: string, type: string>, ... , servicerId: struct<description: string, type: string>>\nto\n{\n  'refundFee': {'description': Value(dtype='string'), 'type': Value(dtype='string')},\n  ...\n  'templateId': {'description': Value(dtype='string'), 'type': Value(dtype='string')}\n}\nFrom my understanding, the merge fails because the tools column's nested structure is different across datasets \u2014 e.g., one struct contains an extra field servicerId while the other does not. This causes HuggingFace Datasets (and its underlying Apache Arrow schema) to reject the merge.\n\nMy question is: why is it designed this way?\n\nIs this strict schema matching a hard requirement of the library?\nIs there a recommended way to merge datasets with different tool schemas (different parameters and types)?\nFor an agent model supporting multiple tools, what's the best practice for preparing/merging training data without losing flexibility?\nAny guidance or design rationale would be greatly appreciated. Thanks!",
    "url": "https://github.com/huggingface/datasets/issues/7869",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-18T08:33:04Z",
    "updated_at": "2025-11-30T03:52:07Z",
    "comments": 1,
    "user": "hitszxs"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 168065,
    "title": "On aarch64, `pip install torch` resulted in the CPU version?",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi, noticing that trying to `pip install torch` resulted in the CPU version of torch stable.\n\nRepro:\n1. Get an aarch64 machine, e.g. GB200\n2. `pip install torch`\n3. `pip list`, see if you see cudnn cublas etc\n\nIt can be bypassed with \n```\npip3 install torch --index-url https://download.pytorch.org/whl/cu128\n```\nbut just want to report this, in case this isn't intentional.\n\n<img width=\"1052\" height=\"434\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/3b3de7a4-3ebd-47bc-b0d8-4728f8d6fcf1\" />\n\n### Versions\n\ntorch stable\n\ncc @svekars @sekyondaMeta @AlannaBurke @ptrblck @msaroufim @eqy @jerryzh168 @tinglvv @nWEIdia",
    "url": "https://github.com/pytorch/pytorch/issues/168065",
    "state": "open",
    "labels": [
      "module: docs",
      "module: cuda",
      "triaged"
    ],
    "created_at": "2025-11-18T04:59:16Z",
    "updated_at": "2025-11-24T19:19:58Z",
    "comments": 3,
    "user": "henrylhtsang"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28903,
    "title": "[Bug]: vllm inference on qwen3-vl when use_upstream_fa is False",
    "body": "### Your current environment\n\npip show torch vllm flash-attn\n\nName: torch\nVersion: 2.8.0\n\n---\nName: vllm\nVersion: 0.11.0\n\n\nName: flash_attn\nVersion: 2.8.3\n\n\n\n### \ud83d\udc1b Describe the bug\n\nunit-test code as the follows,\nwhen simple qwen3-0.6B can run; but qwen3-vl-4b not run\n```python\n#coding=utf-8\n\"\"\"\n\u5199\u5355\u5143\u6d4b\u8bd5\u6765\u9a8c\u8bc1FA\u548cVLLM\u7684\u53ef\u7528\u6027\u548c\u517c\u5bb9\u6027\n\"\"\"\n\nimport torch\nfrom flash_attn import flash_attn_func\nimport unittest\nimport vllm\n# from vllm.attention.backends import get_attn_backend\n\nclass TestFA_VLLM(unittest.TestCase):\n    def testFA(self,):\n        # \u68c0\u67e5CUDA\u662f\u5426\u53ef\u7528\u53ca\u8bbe\u5907\n        print(f\"CUDA available: {torch.cuda.is_available()}\")\n        print(f\"Current device: {torch.cuda.current_device()}\")\n        print(f\"Device name: {torch.cuda.get_device_name()}\")\n\n        # \u5c1d\u8bd5\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u5f20\u91cf\u5e76\u79fb\u52a8\u5230GPU\n        try:\n            q = torch.randn(1, 1, 16, 64, dtype=torch.float16, device='cuda')\n            k = torch.randn(1, 1, 16, 64, dtype=torch.float16, device='cuda')\n            v = torch.randn(1, 1, 16, 64, dtype=torch.float16, device='cuda')\n            output = flash_attn_func(q, k, v)\n            print(\"FlashAttention test passed!\")\n        except Exception as e:\n            print(f\"FlashAttention test failed: {e}\")\n    \n    def oriTestVLLM(self,):\n        # \u6253\u5370\u5f53\u524d\u4f7f\u7528\u7684attention\u540e\u7aef\n        print(\"Available CUDA devices:\", torch.cuda.device_count())\n        print(\"Current device:\", torch.cuda.current_device())\n        print(\"Device name:\", torch.cuda.get_device_name())\n\n        # \u68c0\u67e5vLLM\u914d\u7f6e\n        print(\"vLLM version:\", vllm.__version__)\n\n        # \u5c1d\u8bd5\u521b\u5efa\u4e00\u4e2a\u5c0f\u6a21\u578b\u6765\u89e6\u53d1\u540e\u7aef\u521d\u59cb\u5316\n        try:\n            from vllm import LLM\n            llm = LLM(model=\"Qwen/Qwen3-0.6B\", max_model_len=256)\n            print(\"vLLM\u521d\u59cb\u5316\u6210\u529f!\")\n            prompt = \"\u8fd9\u662f\u4e00\u4e2a\u6d4b\u8bd5\u63d0\u793a\u3002\"\n            response = llm.generate(prompt)\n            print(\"rollout\u6d4b\u8bd5\u6210\u529f! \u751f\u6210\u7684\u6587\u672c:\", response)\n        except Exception as e:\n            print(f\"vLLM\u521d\u59cb\u5316\u5931\u8d25: {e}\")\n    \n    def testVLLM(self,):\n        # \u6253\u5370\u5f53\u524d\u4f7f\u7528\u7684attention\u540e\u7aef\n        print(\"Available CUDA devices:\", torch.cuda.device_count())\n        print(\"Current device:\", torch.cuda.current_device())\n        print(\"Device name:\", torch.cuda.get_device_name())\n\n        # \u5c1d\u8bd5\u521b\u5efa\u4e00\u4e2a\u5c0f\u6a21\u578b\u6765\u89e6\u53d1\u540e\u7aef\u521d\u59cb\u5316\n        try:\n            MODEL_PATH = \"Qwen/Qwen3-VL-4B-Instruct\"\n            from vllm import LLM\n            from vllm import LLM, SamplingParams\n            from vllm.assets.image import ImageAsset           # vLLM \u5185\u7f6e\u5de5\u5177\uff0c\u5e2e\u4f60\u628a\u8def\u5f84 \u2192 PIL\n            from vllm.assets.video import VideoAsset           # \u5982\u679c\u4ee5\u540e\u60f3\u52a0\u89c6\u9891\u540c\u7406\n\n            # \u968f\u4fbf\u7528\u4e00\u5f20\u56fe\u5c31\u884c\n            image_path = \"\"\n            from PIL import Image\n            image = Image.open(image_path)\n            # \u65b9\u5f0f B\uff1aURL\n            # image = ImageAsset(\"image\", \"https://xxx.jpg\").pil_image\n\n            # Qwen3-VL \u8981\u6c42\u7684\u5bf9\u8bdd\u6a21\u677f\n            messages = [\n                {\n                    \"role\": \"user\",\n                    \"content\": [\n                        {\"type\": \"image\", \"image\": image},   # \u56fe\u50cf\u5b57\u6bb5\n                        {\"type\": \"text\",  \"text\": \"\u8bf7\u63cf\u8ff0\u8fd9\u5f20\u56fe\u7247\u3002\"}\n                    ]\n                }\n            ]\n            # \u7528 transformers \u7684 apply_chat_template \u628a messages \u2192 \u6a21\u578b\u8f93\u5165\n            from transformers import AutoTokenizer\n            tok = AutoTokenizer.from_pretrained(MODEL_PATH)\n            prompt = tok.apply_chat_template(\n                messages,\n                tokenize=False,\n                add_generation_prompt=True\n            )\n            # ---------- \u2463 \u751f\u6210 ----------\n            sampling_params = SamplingParams(\n                temperature=0.7,\n                max_tokens=512,\n                stop_token_ids=[tok.eos_token_id, tok.convert_tokens_to_ids(\"<|im_end|>\")]\n            )\n\n            llm = LLM(model=MODEL_PATH, max_model_len=4096, \n                limit_mm_per_prompt={\"image\": 1, \"video\": 0},  # \u6bcf\u5f20 prompt \u6700\u591a 1 \u5f20\u56fe\n                dtype=\"bfloat16\",            # A100/H100 \u53ef\u5f00\uff1b\u6d88\u8d39\u5361\u7528 \"float16\"\n                gpu_memory_utilization=0.9,)\n            print(\"vLLM\u521d\u59cb\u5316\u6210\u529f!\")\n            \n\n            outputs = llm.generate(\n                {\"prompt\": prompt, \"multi_modal_data\": {\"image\": image}},  # \u5173\u952e\uff1a\u628a\u56fe\u4e5f\u4f20\u8fdb\u53bb\n                sampling_params=sampling_params\n            )\n\n            response = outputs[0].outputs[0].text\n            print(\"rollout\u6d4b\u8bd5\u6210\u529f! \u751f\u6210\u7684\u6587\u672c:\", response)\n        except Exception as e:\n            print(f\"vLLM\u521d\u59cb\u5316\u5931\u8d25: {e}\")\n\nif __name__ == \"__main__\":\n    unittest.main()\n```\n\nerror is :vllm/vllm_flash_attn/flash_attn_interface.py\", line 233, in flash_attn_varlen_func [rank0]: out, softmax_lse = torch.ops._vllm_fa2_C.varlen_fwd( [rank0]: File \"/usr/local/lib/python3.10/dist-packages/torch/_ops.py\", line 1243, in __call__ [rank0]: return self._op(*args, **kwargs) [rank0]: torch.AcceleratorError: CUDA error: the provided PTX was compiled with an unsupported toolchain.\n\n\nThen, I review the code in https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/models/qwen3_vl.py#L375\n\nit default set use_upstream_fa = False, when I change it to True, it works? the vllm version is 0.11.0\n\n### Before submitting a new issue...\n\n-",
    "url": "https://github.com/vllm-project/vllm/issues/28903",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-18T03:54:11Z",
    "updated_at": "2025-11-18T08:18:09Z",
    "comments": 1,
    "user": "hedes1992"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2465,
    "title": "loss:nan grdn:nan How to solve the gradient explosion problem in PI05 training?",
    "body": "When training Pi05 using Lerobot, has anyone encountered a situation where gradients explode immediately after training? Errors occur when the batch_size is set to 64 or 32. How can this be resolved? \n\nBelow are my training commands and error logs.\n\npython src/lerobot/scripts/lerobot_train.py --dataset.repo_id=aa_merged280 --policy.type=pi05 \\\n--output_dir=./outputs/pi05_training2 --job_name=pi05_training2 \\\n--policy.pretrained_path=lerobot/pi05_base --policy.compile_model=true \\\n--policy.gradient_checkpointing=true --wandb.enable=true --policy.dtype=bfloat16 \\\n--steps=100000 --policy.device=cuda --batch_size=32 --policy.push_to_hub=false\n\nINFO 2025-11-17 22:07:40 ot_train.py:351 step:200 smpl:6K ep:9 epch:0.03 loss:nan grdn:nan lr:2.5e-06 updt_s:4.478 data_s:0.038\nWARNING 2025-11-17 22:07:40 db_utils.py:141 WandB logging of key \"loss_per_dim\" was ignored as its type \"<class 'list'>\" is not handled by this wrapper.\nINFO 2025-11-17 22:22:38 ot_train.py:351 step:400 smpl:13K ep:18 epch:0.06 loss:nan grdn:nan lr:7.5e-06 updt_s:4.458 data_s:0.022\nWARNING 2025-11-17 22:22:38 db_utils.py:141 WandB logging of key \"loss_per_dim\" was ignored as its type \"<class 'list'>\" is not handled by this wrapper.\nINFO 2025-11-17 22:37:34 ot_train.py:351 step:600 smpl:19K ep:27 epch:0.10 loss:nan grdn:nan lr:1.3e-05 updt_s:4.456 data_s:0.022\nWARNING 2025-11-17 22:37:34 db_utils.py:141 WandB logging of key \"loss_per_dim\" was ignored as its type \"<class 'list'>\" is not handled by this wrapper.\nINFO 2025-11-17 22:52:31 ot_train.py:351 step:800 smpl:26K ep:36 epch:0.13 loss:nan grdn:nan lr:1.8e-05 updt_s:4.456 data_s:0.022\nWARNING 2025-11-17 22:52:31 db_utils.py:141 WandB logging of key \"loss_per_dim\" was ignored as its type \"<class 'list'>\" is not handled by this wrapper.\nINFO 2025-11-17 23:07:29 ot_train.py:351 step:1K smpl:32K ep:45 epch:0.16 loss:nan grdn:nan lr:2.3e-05 updt_s:4.459 data_s:0.022\n",
    "url": "https://github.com/huggingface/lerobot/issues/2465",
    "state": "open",
    "labels": [
      "bug",
      "policies",
      "training"
    ],
    "created_at": "2025-11-18T03:46:28Z",
    "updated_at": "2025-12-03T16:13:56Z",
    "user": "Lilgeneric"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2464,
    "title": "Questions about Pi0.5 Model Training Details and High Level Planning Implementation",
    "body": "Hello, while studying the Pi0.5 model, I have two questions regarding the model implementation that I would like to ask you:\n1\u3001The paper mentions that the model adopts two-stage pre-training and designs a comprehensive loss function. However, when checking the compute_loss part in the open-source code, it is found that currently only the action loss is calculated, and the loss related to the VLM (Vision-Language Model) in the pre-training stage is not reflected. I would like to confirm whether this part is implemented elsewhere in the code or if there are other design considerations?\n2\u3001The ablation experiments in the paper show that the jointly trained Pi0.5 performs excellently in explicit and implicit High Level planning, even better than GPT4 and manual upper-level planning. However, from the open-source model code, the implementation part related to the High Level planning step has not been found for the time being. I would like to know how this part of the function is reflected in the code?\nLooking forward to your reply, thank you!",
    "url": "https://github.com/huggingface/lerobot/issues/2464",
    "state": "open",
    "labels": [
      "question",
      "training"
    ],
    "created_at": "2025-11-18T01:27:59Z",
    "updated_at": "2025-11-20T10:45:34Z",
    "user": "Ginldaj"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28876,
    "title": "[CI Failure]: should test_cumem.py use spawn or fork in cuda?",
    "body": "### Name of failing test\n\ntests/basic_correctness/test_cumem.py\n\n### Basic information\n\n- [ ] Flaky test\n- [x] Can reproduce locally\n- [ ] Caused by external libraries (e.g. bug in `transformers`)\n\n### \ud83e\uddea Describe the failing test\n\nThe test only fails locally for me when I use vllm main branch and on the CI of my PR, error is caused by cuda tests using `fork` instead of `spawn` I think, in the CI, there is a line that's trying for force spawn: https://github.com/vllm-project/vllm/blob/f2b8e1c5510cf3621dc4b910f0eba5289d9fee88/.buildkite/test-pipeline.yaml#L99-L100, but looks like it's not effective. I looked at the function that decides to use fork or spawn: https://github.com/vllm-project/vllm/blob/f8b19c0ffd65f7f6f01a0da4a39b6890f5db40cb/tests/utils.py#L1027 and I don't think it looks like the flag `VLLM_WORKER_MULTIPROC_METHOD`. Although the issue doesn't repro in the main vllm CI. Wondering how do we fix this?\n\n```\nFAILED basic_correctness/test_cumem.py::test_python_error - RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method\nFAILED basic_correctness/test_cumem.py::test_basic_cumem - RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method\nFAILED basic_correctness/test_cumem.py::test_cumem_with_cudagraph - RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method\nFAILED basic_correctness/test_cumem.py::test_end_to_end[hmellor/tiny-random-LlamaForCausalLM] - RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method\nFAILED basic_correctness/test_cumem.py::test_end_to_end[facebook/opt-125m] - RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method\nFAILED basic_correctness/test_cumem.py::test_deep_sleep - RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method\nFAILED basic_correctness/test_cumem.py::test_deep_sleep_async - RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method\n\n```\n\n### \ud83d\udcdd History of failing test\n\nhttps://buildkite.com/vllm/ci/builds/39127/steps/canvas?jid=019a84f5-0fbf-46f3-859f-42c02a2d3de1\n\n### CC List.\n\n_No response_",
    "url": "https://github.com/vllm-project/vllm/issues/28876",
    "state": "open",
    "labels": [
      "ci-failure"
    ],
    "created_at": "2025-11-17T18:58:08Z",
    "updated_at": "2025-11-17T20:59:14Z",
    "comments": 1,
    "user": "jerryzh168"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28868,
    "title": "[Bug]: When compiling with ranges, we should pass the range information to Inductor",
    "body": "### Your current environment\n\nmain\n\n### \ud83d\udc1b Describe the bug\n\nMight be more of a feature request. Context is that https://github.com/vllm-project/vllm/pull/24248 adds a new compile ranges API, where a user can specify which ranges to compile on.\n\nWe should tell Inductor how to constrain the compilation on the symints of the compile ranges\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28868",
    "state": "open",
    "labels": [
      "bug",
      "torch.compile"
    ],
    "created_at": "2025-11-17T15:41:50Z",
    "updated_at": "2026-01-05T23:37:12Z",
    "comments": 1,
    "user": "zou3519"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167994,
    "title": "CI Not Detecting Failing Tests in test/distributed/elastic/*",
    "body": "A significant number of tests under `test/distributed/elastic/` are failing, but CI does **not** surface these failures, possibly same with test/distributed/launcher, Many of these tests appear to have been broken for a long time without detection. I opened a PR with fixes, but I believe this warrants an issue so the team can investigate why CI is not catching failures in this directory.\n\nPR with fixes: https://github.com/pytorch/pytorch/pull/167993\n\n### `test/distributed/elastic/rendezvous/c10d_rendezvous_backend_test.py`\n\n**Issue:**  \nIn `test_create_backend_returns_backend_if_is_host_is_false` and  \n`test_create_backend_returns_backend_if_is_not_specified_and_store_already_exists`, commit https://github.com/pytorch/pytorch/commit/d25e6e623fea0552d1a4b3124344d1b2c499f6f8 removed the unused `store` variable. This caused the `TCPStore` to be garbage-collected immediately, and the tests fail as a result.\n\n\n---\n\n### `test/distributed/elastic/rendezvous/dynamic_rendezvous_test.py`\n\n#### Issue 1  \n`datetime.utcnow` was replaced with `datetime.now` in the implementation PR https://github.com/pytorch/pytorch/pull/136141, but the tests were not updated.\n\n\n#### Issue 2  \nPR https://github.com/pytorch/pytorch/pull/145228 changed `create_handler()` to expect `keep_alive_interval` as an `int`, but the test `test_redundancy_transition_to_wait_list_then_join_rendezvous` passes `timedelta(seconds=1)`.\n\n\n#### Issue 3  \n`test_share_tcp_store_from_backend` mocks `dist.PrefixStore` but also calls  \n`CustomPrefixStore(spec=dist.PrefixStore)`. Since `dist.PrefixStore` is already patched, this results in:\n\n> Cannot spec a Mock object\n\n\n---\n\n### `test/distributed/elastic/rendezvous/etcd_server_test.py`\n\n**Issue:**  \nIn `test_etcd_server_with_rendezvous`, the `EtcdRendezvous` prefix does not include a leading slash, but etcd v2 always stores keys with one. This causes a hang during the `rdzv_handler.next_rendezvous()` \u2192 `RendezvousStoreInfo.build` \u2192 (`store.set` \u2192 `store.get`), because the key is written as `test/run_1/rdzv/v_1/kv/TUFTVEVSX0FERFI=` but etcd stores it as `/test/run_1/rdzv/v_1/kv/TUFTVEVSX0FERFI=`. Since `store.get` (via `ETCDStore._try_wait_get`) looks for the non\u2013slash-prefixed key, it never finds \n\n---\n\n### `test/distributed/elastic/rendezvous/out_of_tree_rendezvous_test.py`\n\n**Issue:**  \n`test_out_of_tree_handler_loading` attempts to test out-of-tree handler registration by adding a directory to `sys.path`.  \nHowever, the real mechanism uses Python entry points, which require pip installation.  \nThe original PR https://github.com/pytorch/pytorch/pull/132633 used pip install, but after review it was replaced with `sys.path` modification \u2014 which probably only worked locally due to stale installations.\n\n\n---\n\n### `torch/distributed/elastic/rendezvous/etcd_rendezvous.py`\n\n**Issue:**  \nPR https://github.com/pytorch/pytorch/pull/135262 added an optional `local_addr` parameter to `EtcdRendezvousHandler.__init__`, but did not define a default value.  \nThis breaks `test_etcd_server_with_rendezvous` in `test/distributed/elastic/rendezvous/etcd_server_test.py`\n\n\n---\n\nFollowing test might actually be passing in some environments and configs.\n### `test/distributed/launcher/test_run.py`\n\n**Issue:**  \n`nproc_type=\"auto\"` determines world size using `torch.accelerator.is_available()`, but the test incorrectly patches `torch.cuda.is_available()`.\n\n\ncc @seemethere @malfet @pytorch/pytorch-dev-infra @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci",
    "url": "https://github.com/pytorch/pytorch/issues/167994",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "module: ci"
    ],
    "created_at": "2025-11-17T15:39:56Z",
    "updated_at": "2025-11-17T18:18:56Z",
    "comments": 0,
    "user": "harikodali"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167991,
    "title": "Warnings from inside Dynamo should include at least one level of stack trace",
    "body": "We saw the following in vLLM:\n```\n(Worker_TP6_EP6 pid=3247488) /home/robertgshaw2-redhat/vllm/.venv/lib64/python3.12/site-packages/torch/_dynamo/variables/functions.py:1692: UserWarning: Dynamo detected a call to a `functools.lru_cache`-wrapped function. Dynamo ignores the cache wrapper and directly traces the wrapped function. Silent incorrectness is only a *potential* risk, not something we have observed. Enable TORCH_LOGS=\"+dynamo\" for a DEBUG stack trace.\n```\nif we could *just* see one frame of the stack trace, we'd be able to tell the line of vLLM where this is coming from.\nNB: I don't know how to reproduce this yet (we didn't get a repro command). I assume TORCH_LOGS=+dynamo has that stack trace, but it's nice to be able to debug this one step by just looking at the logs\n\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @amjames @Lucaskabela @jataylo @chenyang78",
    "url": "https://github.com/pytorch/pytorch/issues/167991",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo",
      "vllm-compile",
      "module: compile ux",
      "module: vllm",
      "dynamo-triage-dec2025"
    ],
    "created_at": "2025-11-17T15:31:02Z",
    "updated_at": "2026-01-01T18:17:59Z",
    "comments": 1,
    "user": "zou3519"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28866,
    "title": "[Usage]: When is going to be the next release?",
    "body": "Hi everyone,\n\nThank you for developing such a great tool!\n\nI was wondering when the next release is scheduled. I\u2019m interested in running Gemma3-text type architecture GGUF quantized models with VLLM. Are there any alternatives to do this with the latest release (v0.11.0)?\n\nI also noticed that you merged this PR with the working solution on October 9:\n\nhttps://github.com/vllm-project/vllm/pull/26189",
    "url": "https://github.com/vllm-project/vllm/issues/28866",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-17T15:24:47Z",
    "updated_at": "2025-11-19T10:51:47Z",
    "comments": 1,
    "user": "Invalid-coder"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42241,
    "title": "How to use padding with Mistral?",
    "body": "I'm trying to understand how to use Mistral with `batch_size` > 1. One aspect of this is setting `padding=\"longest\"` in, e.g., `MistralCommonTokenizer.encode()`. But I'm getting `TypeError: 'set' object is not callable` when I try this. Example:\n```python\nimport torch\nfrom transformers import MistralForCausalLM, MistralCommonTokenizer\n\ntokenizer = MistralCommonTokenizer.from_pretrained(\"mistralai/Mistral-7B-Instruct-v0.3\")\nmodel = MistralForCausalLM.from_pretrained(\n    \"mistralai/Mistral-7B-Instruct-v0.3\",\n    dtype=torch.bfloat16,\n    attn_implementation=\"sdpa\",\n    device_map=\"auto\",\n)\n\nmessages = [\n    \"You are a pirate chatbot who always responds in pirate speak!\",\n    \"Who are you?\",\n]\n\nmodel_inputs = tokenizer.encode(messages, return_tensors=\"pt\", padding=\"longest\").to(\n    model.device\n)\n```\n\nOutput:\n```\n---------------------------------------------------------------------------\nTypeError                                 Traceback (most recent call last)\nCell In[1], line 17\n      5 model = MistralForCausalLM.from_pretrained(\n      6     \"mistralai/Mistral-7B-Instruct-v0.3\",\n      7     dtype=torch.bfloat16,\n      8     attn_implementation=\"sdpa\",\n      9     device_map=\"auto\",\n     10 )\n     12 messages = [\n     13     \"You are a pirate chatbot who always responds in pirate speak!\",\n     14     \"Who are you?\",\n     15 ]\n---> 17 model_inputs = tokenizer.encode(messages, return_tensors=\"pt\", padding=\"longest\").to(\n     18     model.device\n     19 )\n     21 generated_ids = model.generate(model_inputs, max_new_tokens=100, do_sample=True)\n     22 tokenizer.batch_decode(generated_ids)[0]\n\nFile ~/ad_hoc_analysis/src/asr_and_summarization/.venv/lib/python3.13/site-packages/transformers/tokenization_mistral_common.py:407, in MistralCommonTokenizer.encode(self, text, text_pair, add_special_tokens, padding, truncation, max_length, stride, pad_to_multiple_of, padding_side, return_tensors, verbose, **kwargs)\n    404 if text_pair:\n    405     raise ValueError(\"`MistralCommonTokenizer.encode` does not support `text_pair`.\")\n--> 407 padding_strategy, truncation_strategy, max_length, _ = self._get_padding_truncation_strategies(\n    408     padding=padding,\n    409     truncation=truncation,\n    410     max_length=max_length,\n    411     pad_to_multiple_of=pad_to_multiple_of,\n    412     verbose=verbose,\n    413 )\n    415 encoded_inputs = self._encode_plus(\n    416     text,\n    417     add_special_tokens=add_special_tokens,\n   (...)    429     verbose=verbose,\n    430 )\n    432 return encoded_inputs[\"input_ids\"]\n\nFile ~/ad_hoc_analysis/src/asr_and_summarization/.venv/lib/python3.13/site-packages/transformers/tokenization_mistral_common.py:1034, in MistralCommonTokenizer._get_padding_truncation_strategies(self, padding, truncation, max_length, pad_to_multiple_of, verbose, **kwargs)\n   1031             max_length = self.model_max_length\n   1033 # Test if we have a padding token\n-> 1034 if padding_strategy != PaddingStrategy.DO_NOT_PAD and (self.pad_token is None or self.pad_token_id < 0):\n   1035     raise ValueError(\n   1036         \"Asking to pad but the tokenizer does not have a padding token. \"\n   1037         \"Please select a token to use as `pad_token` `(tokenizer.pad_token = tokenizer.eos_token e.g.)` \"\n   1038         \"or add a new pad token via `tokenizer.add_special_tokens({'pad_token': '[PAD]'})`.\"\n   1039     )\n   1041 # Check that we will truncate to a multiple of pad_to_multiple_of if both are provided\n\nFile ~/ad_hoc_analysis/src/asr_and_summarization/.venv/lib/python3.13/site-packages/transformers/tokenization_mistral_common.py:334, in MistralCommonTokenizer.pad_token(self)\n    329 @property\n    330 def pad_token(self) -> str:\n    331     \"\"\"\n    332     String associated to the padding token in the vocabulary.\n    333     \"\"\"\n--> 334     return self.convert_ids_to_tokens(self.pad_token_id)\n\nFile ~/ad_hoc_analysis/src/asr_and_summarization/.venv/lib/python3.13/site-packages/transformers/tokenization_mistral_common.py:548, in MistralCommonTokenizer.convert_ids_to_tokens(self, ids, skip_special_tokens)\n    546 tokens: list[str] = []\n    547 for token_id in ids:\n--> 548     if self._is_control_token(token_id) and skip_special_tokens:\n    549         continue\n    550     tokens.append(self.tokenizer.instruct_tokenizer.tokenizer.id_to_piece(token_id))\n\nFile ~/ad_hoc_analysis/src/asr_and_summarization/.venv/lib/python3.13/site-packages/transformers/tokenization_mistral_common.py:513, in MistralCommonTokenizer._is_control_token(self, token_id)\n    511 def _is_control_token(self, token_id: int) -> bool:\n    512     if self._tokenizer_type == MistralTokenizerType.spm:\n--> 513         return token_id in self.tokenizer.instruct_tokenizer.tokenizer._control_tokens()\n    514     elif self._tokenizer_type == MistralTokenizerType.tekken:\n    515         return token_id < self.tokenizer.instruct_tokenizer.tokenizer.num_special_tokens\n\nTypeError: 'set' object is not callable\n```\n\nEnv:\n```\n- `transformers` version: 4.57.1",
    "url": "https://github.com/huggingface/transformers/issues/42241",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-17T12:54:21Z",
    "updated_at": "2025-11-19T06:11:44Z",
    "user": "TopCoder2K"
  },
  {
    "repo": "pytorch/audio",
    "number": 4132,
    "title": "How can I use one streamwriter to write multiple videos?",
    "body": "### \ud83d\ude80 The feature\n\nUse one streamwriter to write multiple videos.\n\n### Motivation, pitch\n\nCan the streamwriter support writing multiple videos using the same object, with each video corresponding to a different stream when I use gpu to encode? In current situation, this result in writing to the same buffer, ultimately producing one video. How can I do this? This can avoid the overhead caused by multiple initializations and destructions of the streamwriter.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/audio/issues/4132",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-17T11:55:56Z",
    "updated_at": "2025-11-17T11:55:56Z",
    "user": "Z-NAVY"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167977,
    "title": "[DTensor]Sharding propagation failed for custom operation with Tensor in kwargs",
    "body": "### \ud83d\udc1b Describe the bug\n\nI try to register strategy for my custom operation by ```@register_sharding```, which has Tensor params in kwargs. And my custom strategy function provides strategies for all DTensor in args and kwargs.\nDuring sharding propagation, an AssertionError `assert len(input_specs) == len(input_args_strategy)` occurs in function `expand_to_full_mesh_op_strategy`.\nThe cause is that `input_args_strategy` only considers DTensor in args, while `input_specs` contains sharding strategies of all DTensor in args and kwargs.\n\nIs it a limitation of DTensor? Or how can I adapt my operation with Tensor kwargs to Dtensor?\n\nHere is a simple demo using `aten.min.dim_min` to reproduce the problem:\n\n```python\nimport torch\nfrom torch.distributed.tensor import distribute_tensor, Replicate\nfrom torch.distributed.tensor.experimental import register_sharding\n\nfrom torch.testing._internal.common_utils import run_tests\nfrom torch.testing._internal.distributed._tensor.common_dtensor import DTensorTestBase, with_comms\n\naten = torch.ops.aten\n\nclass TestRegisterSharding(DTensorTestBase):\n    @with_comms\n    def test_register_sharding_for_tensor_kwargs(self):\n        mesh = self.build_device_mesh()\n\n        x = torch.randn(4, 4, device=\"cuda\")\n        y = torch.randn(4, 4, device=\"cuda\")\n\n        x = distribute_tensor(x, mesh, [Replicate()])\n        y = distribute_tensor(y, mesh, [Replicate()])\n\n        # aten::min.dim_min(Tensor self, int dim, bool keepdim=False, *, Tensor(a!) min, Tensor(b!) min_indices) -> (Tensor(a!) values, Tensor(b!) indices)\n        @register_sharding(aten.min.dim_min)\n        def custom_strategy(x, dim, keepdim, min, min_indices):\n            acceptable_shardings = []\n            all_replicate = ([Replicate(), Replicate()], [Replicate(), None, None, Replicate(), Replicate()])\n            acceptable_shardings.append(all_replicate)\n            return acceptable_shardings\n\n        value = torch.randn(4, 1, device=\"cuda\")\n        indices = torch.randn(4, 1, device=\"cuda\").long()\n        value = distribute_tensor(value, mesh, [Replicate()])\n        indices = distribute_tensor(indices, mesh, [Replicate()])\n        torch.min(x, dim=1, keepdim=True, out=(value, indices))\n\nif __name__ == \"__main__\":\n    run_tests()\n```\n\nThe error message:\n\n```\nTraceback (most recent call last):\n  File \"/opt/conda/envs/py310_pt29/lib/python3.10/site-packages/torch/distributed/tensor/_dispatch.py\", line 156, in dispatch\n    self.sharding_propagator.propagate(op_info)\n  File \"/opt/conda/envs/py310_pt29/lib/python3.10/site-packages/torch/distributed/tensor/_sharding_prop.py\", line 327, in propagate\n    OutputSharding, self.propagate_op_sharding(op_info.schema)\n  File \"/opt/conda/envs/py310_pt29/lib/python3.10/site-packages/torch/distributed/tensor/_sharding_prop.py\", line 46, in __call__\n    return self.cache(*args, **kwargs)\n  File \"/opt/conda/envs/py310_pt29/lib/python3.10/site-packages/torch/distributed/tensor/_sharding_prop.py\", line 352, in propagate_op_sharding_non_cached\n    op_strategy = self.op_strategy_funcs[op_schema.op](strategy_schema)\n  File \"/opt/conda/envs/py310_pt29/lib/python3.10/site-packages/torch/distributed/tensor/experimental/_register_sharding.py\", line 98, in custom_strategy\n    return expand_to_full_mesh_op_strategy(\n  File \"/opt/conda/envs/py310_pt29/lib/python3.10/site-packages/torch/distributed/tensor/_ops/utils.py\", line 332, in expand_to_full_mesh_op_strategy\n    assert len(input_specs) == len(input_args_strategy)\nAssertionError\n```\n\n### Versions\n\ntorch 2.9.0\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci @tianyu-l @XilunWu @SherlockNoMad",
    "url": "https://github.com/pytorch/pytorch/issues/167977",
    "state": "closed",
    "labels": [
      "oncall: distributed",
      "module: dtensor"
    ],
    "created_at": "2025-11-17T11:43:09Z",
    "updated_at": "2025-11-24T05:24:21Z",
    "comments": 3,
    "user": "qqq6op"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1986,
    "title": "HI i would like to use  default_headers={         \"X-HF-Bill-To\": \"org-name\"     } in my chatui local deployment how i can??",
    "body": "Hi, \n\nSo i want to bill my Inference usage to my organization and like to pass  default_headers={\n        \"X-HF-Bill-To\": \"org-name\"\n    }  parameter how i can do that?? ",
    "url": "https://github.com/huggingface/chat-ui/issues/1986",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2025-11-17T08:33:41Z",
    "updated_at": "2025-11-17T08:33:41Z",
    "user": "aditya-oss-prog"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12672,
    "title": "How to set pipe \"requires_grad=true\"\uff1f",
    "body": "I have set the variable and the model \"requires_grad=true\" with the following:\n`  pipe.transformer.requires_grad = True\n    pipe.vae.requires_grad = True`\n`prev_sample = prev_sample.detach().requires_grad_(True)`\nbut the \"requires_grad\" of result by the pipe is still not true:\n   `image_tar = pipe.vae.decode(prev_sample, return_dict=False)[0]`\n\"image_tar\" still can  not requires_grad, so how to set pipe \"requires_grad=true\"\uff1f(all the operation is during inference stage.)",
    "url": "https://github.com/huggingface/diffusers/issues/12672",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-17T03:36:43Z",
    "updated_at": "2025-11-20T12:19:20Z",
    "user": "micklexqg"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167950,
    "title": "Insufficient documentation about the batching logic of `torch.linalg.solve`",
    "body": "### \ud83d\udcda The doc issue\n\nThe documentation for `torch.linalg.solve` states that\n> \n> Letting _*_ be zero or more batch dimensions,\n> If `A` has shape _(*, n, n)_ and `B` has shape _(*, n)_ (a batch of vectors) or shape _(*, n, k)_ (a batch of matrices or \u201cmultiple right-hand sides\u201d), this function returns _X_ of shape _(*, n)_ or _(*, n, k)_ respectively.\n\nHowever, from what I understand based on testing the code, the meaning of _*_ is different in these two cases. In the first case (batch of vectors), the batch dimensions _*_ of `A` and `B` must have the exact same shape, while in the second case (batch of matrices), the batch dimensions _*_ of `A` and `B` need only be broadcastable with each other. For example, an error is raised if `A` has shape _(2, 3, 4, 4)_ and `B` has shape _(3, 4)_ or _(1, 3, 4)_ (batch of vectors), while no error is raised if `A` has shape _(2, 3, 4, 4)_ and `B` has shape _(3, 4, 4)_ or _(1, 3, 4, 4)_ (batch of matrices). I think the documentation needs to be clear about how the meaning of _*_ is different for these two cases.\n\nIt should also be clarified that the interpretation of `B` as a batch of vectors should take precedence over the interpretation of `B` as a zero-dimensional batch of matrices. For example, if `A` has shape _(n, n, n)_ and `B` has shape _(n, n)_, then the output X has shape _(n, n)_, indicating that `B` is interpreted as a batch of vectors, even though `B` can be interpreted as a 'batch' of matrices with zero-dimensional batch shape _* = ()_.\n\n### Suggest a potential alternative/fix\n\nUpdate the quoted part of the documentation to\n> Letting _*_ be zero or more batch dimensions, and _**_ be one or more batch dimensions, such that _*_ and _**_ are broadcastable with each other,\n> If `A` has shape _(*, n, n)_ and `B` has shape _(*, n)_ (a batch of vectors) or shape _(**, n, k)_ (a batch of matrices or \u201cmultiple right-hand sides\u201d), this function returns _X_ of shape _(*, n)_ or _(***, n, k)_ respectively, where _***_ is the shape obtained by broadcasting _*_ with _**_.\n\nNote that this revision also automatically clarifies the ambiguity as stated in the case where `A` has shape _(n, n, n)_ and `B` has shape _(n, n)_. This is because _**_ is defined as one or more (instead of zero or more) batch dimensions, so `B` cannot be interpreted as having shape _(**, n, k)_.\n\ncc @svekars @sekyondaMeta @AlannaBurke @jianyuh @nikitaved @mruberry @walterddr @xwang233 @Lezcano",
    "url": "https://github.com/pytorch/pytorch/issues/167950",
    "state": "open",
    "labels": [
      "module: docs",
      "triaged",
      "module: linear algebra"
    ],
    "created_at": "2025-11-17T02:02:25Z",
    "updated_at": "2025-11-19T16:44:07Z",
    "comments": 5,
    "user": "hchau630"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12669,
    "title": "Flux1-Dev inference with single file ComfyUI/SD-Forge Safetensors",
    "body": "Is it possible to run inference with diffusers using a single-file safetensors created for  ComfyUI/SD-Forge?\n\nIt looks like FluxPipeline.from_single_file() might be intended for this purpose, but I'm getting the following errors:\n\n```\nimport torch\nfrom diffusers import FluxPipeline\n\npipe = FluxPipeline.from_single_file(\"./flux1-dev-fp8.safetensors\", torch_dtype=torch.float8_e4m3fn, use_safetensors=True)\n```\n\n```\nTraceback (most recent call last):\n  File \"/home/user/flux/imgen.py\", line 9, in <module>\n    pipe = FluxPipeline.from_single_file(\"./flux1-dev-fp8.safetensors\", torch_dtype=torch.float8_e4m3fn, use_safetensors=True)\n  File \"/home/user/.local/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py\", line 114, in _inner_fn\n    return fn(*args, **kwargs)\n  File \"/home/user/.local/lib/python3.13/site-packages/diffusers/loaders/single_file.py\", line 509, in from_single_file\n    loaded_sub_model = load_single_file_sub_model(\n        library_name=library_name,\n    ...<11 lines>...\n        **kwargs,\n    )\n  File \"/home/user/.local/lib/python3.13/site-packages/diffusers/loaders/single_file.py\", line 127, in load_single_file_sub_model\n    loaded_sub_model = create_diffusers_t5_model_from_checkpoint(\n        class_obj,\n    ...<4 lines>...\n        local_files_only=local_files_only,\n    )\n  File \"/home/user/.local/lib/python3.13/site-packages/diffusers/loaders/single_file_utils.py\", line 2156, in create_diffusers_t5_model_from_checkpoint\n    model.load_state_dict(diffusers_format_checkpoint)\n    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/user/.local/lib/python3.13/site-packages/torch/nn/modules/module.py\", line 2641, in load_state_dict\n    raise RuntimeError(\n    ...<3 lines>...\n    )\nRuntimeError: Error(s) in loading state_dict for T5EncoderModel:\n\tMissing key(s) in state_dict: \"encoder.embed_tokens.weight\". \n```\n\nI checked the safetensors file and the T5 encoder is present.  However, it is named differently, which confuses diffusers.",
    "url": "https://github.com/huggingface/diffusers/issues/12669",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-16T11:57:48Z",
    "updated_at": "2025-12-03T16:53:58Z",
    "comments": 12,
    "user": "ddpasa"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167906,
    "title": "Avoid Exception Refcycle Problems",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\n\nhttps://github.com/pytorch/pytorch/blob/d01a7b0241ed1c4cded7e7ca097249feb343f072/torch/_utils.py#L720-L726\n\nThe traceback refcycle problem can happen whenever an exception is stored in a local variable. This happened in many places across pytorch:\n\n```\n$ grep ' = e$' torch -R | wc -l\n22  # note: a few are false positives\n```\nThere are likely some potential refcycles that could cause tensors to not get freed at the earliest possible time.\n\nTake one of the detected results from `collective_utils.py` for example, we can create a repro of refcycle:\n\n```python\nimport sys\nimport torch\nfrom torch.distributed.collective_utils import all_gather\ndef f(obj):\n    def f():\n        raise RuntimeError('hhh')\n    try:\n        all_gather(f)\n    except Exception as e:\n        pass\nif __name__ == '__main__':\n    torch.distributed.init_process_group(backend='gloo')\n    rank = torch.distributed.get_rank()\n    obj = object()\n    for k in range(20):\n        f(obj)\n        if rank == 0:\n            print(sys.getrefcount(obj))  # Refcount keep increasing!\n```\n\nrun it with\n```\ntorchrun --nproc_per_node=2 test.py\n```\n(Note: `collective_utils` seems not used anywhere, maybe a good idea to remove it. I'm not a user of it. )\n\nPyTorch users' callstacks often have giant objects that better not get leaked. Ideas to avoid similar issues:\n* Check if any of the 22 results are worth fixing.\n* Apply a lint rule (perhaps with https://github.com/ast-grep/ast-grep/) to disable assignment of exception, unless explicitly bypassed.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @albanD",
    "url": "https://github.com/pytorch/pytorch/issues/167906",
    "state": "open",
    "labels": [
      "module: memory usage",
      "triaged",
      "better-engineering",
      "module: python frontend"
    ],
    "created_at": "2025-11-15T16:47:16Z",
    "updated_at": "2025-11-18T22:15:10Z",
    "comments": 1,
    "user": "ppwwyyxx"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167901,
    "title": "nvalid _global_ write of size 16 bytes in torch.bmm with sparse tensors",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhen using `torch.bmm` with sparse tensors, a CUDA `__global__` memory write out-of-bounds error occurs. \n\n```python\nimport torch\n\nm1 = torch.randn(2, 291105, 1).to_sparse().cuda()\nm2 = torch.randn(2, 1, 1).cuda()\nprint([m1.size(), m2.size()])\n\ntorch.bmm(m1, m2)\n```\n\n### How to Reproduce\n\n1.  Save the code above as `poc.py`.\n2.  Run the script using `compute-sanitizer`. The `Invalid __global__ write` error will be reported.\n\n```bash\ncompute-sanitizer python poc.py\n```\n\n### Observed Results\n\n```\n========= Invalid __global__ write of size 16 bytes\n=========     at void cusparse::vector_scalar_multiply_kernel<cusparse::VectorWiseMulPolicy<(bool)1, float>, long, float, float>(cusparse::KernelCoeff<T3>, T2, T4 *)+0x460\n=========     by thread (32,0,0) in block (4,0,0)\n=========     Address 0x7ffe9b0aa884 is misaligned\n=========     and is inside the nearest allocation at 0x7ffe9a000000 of size 20,971,520 bytes\n=========     Saved host backtrace up to driver entry point at kernel launch time\n=========         Host Frame:  [0x93c3fa] in libcusparse.so.12\n=========         Host Frame:  [0x99859a] in libcusparse.so.12\n=========         Host Frame:  [0x89fbfc] in libcusparse.so.12\n=========         Host Frame:  [0x17c999] in libcusparse.so.12\n=========         Host Frame:  [0x196a6b] in libcusparse.so.12\n=========         Host Frame: cusparseSpMM [0xf3ed3] in libcusparse.so.12\n=========         Host Frame: at::native::bmm_out_sparse_cuda(at::Tensor const&, at::Tensor const&, at::Tensor&)::{lambda()#1}::operator()() const::{lambda()#2}::operator()() const [0x2e54a29] in libtorch_cuda.so\n=========         Host Frame: at::native::bmm_out_sparse_cuda(at::Tensor const&, at::Tensor const&, at::Tensor&) [0x2e573ff] in libtorch_cuda.so\n=========         Host Frame: at::native::bmm_sparse_cuda(at::Tensor const&, at::Tensor const&) [0x2e59137] in libtorch_cuda.so\n=========         Host Frame: at::(anonymous namespace)::(anonymous namespace)::wrapper_SparseCUDA__bmm(at::Tensor const&, at::Tensor const&) [0x3510e0a] in libtorch_cuda.so\n=========         Host Frame: c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, at::Tensor const&), &at::(anonymous namespace)::(anonymous namespace)::wrapper_SparseCUDA__bmm>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, at::Tensor const&> >, at::Tensor (at::Tensor const&, at::Tensor const&)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, at::Tensor const&) [0x3510ebf] in libtorch_cuda.so\n=========         Host Frame: at::_ops::bmm::redispatch(c10::DispatchKeySet, at::Tensor const&, at::Tensor const&) [0x29ca7fd] in libtorch_cpu.so\n=========         Host Frame: torch::autograd::VariableType::(anonymous namespace)::bmm(c10::DispatchKeySet, at::Tensor const&, at::Tensor const&) [0x47cbb1e] in libtorch_cpu.so\n=========         Host Frame: c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::DispatchKeySet, at::Tensor const&, at::Tensor const&), &torch::autograd::VariableType::(anonymous namespace)::bmm>, at::Tensor, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor const&, at::Tensor const&> >, at::Tensor (c10::DispatchKeySet, at::Tensor const&, at::Tensor const&)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, at::Tensor const&) [0x47cc502] in libtorch_cpu.so\n=========         Host Frame: at::_ops::bmm::call(at::Tensor const&, at::Tensor const&) [0x2a1a6fd] in libtorch_cpu.so\n=========         Host Frame: torch::autograd::THPVariable_bmm(_object*, _object*, _object*) [0x6a8ad8] in libtorch_python.so\n=========         Host Frame: cfunction_call in methodobject.c:542 [0x128db6] in python\n=========         Host Frame: _PyObject_MakeTpCall in call.c:214 [0x10454b] in python\n=========         Host Frame: _PyEval_EvalFrameDefault in ceval.c:4769 [0x111cf5] in python\n=========         Host Frame: _PyEval_Vector in ceval.c:6434 [0x1cd0a9] in python\n=========         Host Frame: PyEval_EvalCode in ceval.c:1148 [0x1cc77e] in python\n=========         Host Frame: run_eval_code_obj in pythonrun.c:1741 [0x1ed556] in python\n=========         Host Frame: run_mod in pythonrun.c:1762 [0x1e907f] in python\n=========         Host Frame: pyrun_file in pythonrun.c:1657 [0x1fde71] in python\n=========         Host Frame: _PyRun_SimpleFileObject in pythonrun.c:440 [0x1fd28e] in python\n=========         Host Frame: _PyRun_AnyFileObject in pythonrun.c:79 [0x1fcfb2] in python\n=========         Host Frame: Py_RunMain in main.c:684 [0x1f7dad] in python\n=========         Host Frame: Py_BytesMain in main.c:738 [0x1bcdf8] in python\n=========         Host Frame: __libc_start_call_main in libc_start_call_main.h:58 [0x2a1c9] in libc.so.6\n=========         Host Frame: __libc_start_main in libc-start.c:360 [0x2a28a] in libc.so.6\n=========         Host Frame:  [0x1bcc42] ",
    "url": "https://github.com/pytorch/pytorch/issues/167901",
    "state": "open",
    "labels": [
      "module: sparse",
      "triaged",
      "module: sanitizers"
    ],
    "created_at": "2025-11-15T03:25:41Z",
    "updated_at": "2025-11-24T04:30:02Z",
    "comments": 1,
    "user": "supermarkli"
  },
  {
    "repo": "huggingface/ai-deadlines",
    "number": 41,
    "title": "How to indicate ARR deadlines",
    "body": "Right now the yaml format assumes conferences with locations and dates, but ACL ARR has rolling deadlines not tied to a physical conference. We are largely operating around these deadlines. How can we incorporate these into this system?",
    "url": "https://github.com/huggingface/ai-deadlines/issues/41",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-15T00:26:33Z",
    "updated_at": "2025-11-15T00:26:33Z",
    "user": "morrisalp"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 2046,
    "title": "Any  interest in adding MLPerf  Llama 3 8B to TorchTitan models ?",
    "body": "It will be great to have MLPerf LLama 3 pre-training working OOB with TorchTitan,  Here are some references on that .\n\n[MLPerf Training Adds Llama 3.1 8B Benchmark](https://mlcommons.org/2025/10/training-llama-3-1-8b/)\n\n[small_llm_pretraining/nemo](https://github.com/mlcommons/training/tree/master/small_llm_pretraining/nemo)",
    "url": "https://github.com/pytorch/torchtitan/issues/2046",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-14T18:38:59Z",
    "updated_at": "2026-01-05T22:49:56Z",
    "comments": 14,
    "user": "githubsgi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167843,
    "title": "Some docs are outdated about how to access ctx object in forward function?",
    "body": "### \ud83d\udcda The doc issue\n\nI remember some docs said that the forward function (originally in torch.autograd.Function subclass) can pass anything to setup_context function by saving the data to ctx object. I was off for a while. Back in 2.6, the input param for forward function looks like (ctx, *input), but now it's(input_1, input_2, ...). I updated to 2.9 yesterday, and I found it's impossible to access the ctx object in forward function. I need to modify the old code a bit, which is ok. But the problem is, if I want to save anything for backward pass while I don't want to output it, in extreme case, do I have to compute it twice? 1st in forward function, 2nd in setup_context function.\nI saw some other docs said that, the 2 function style(forward+setup_context) is more similar to the vanilla torch implementation, so users are encouraged to do the 2 func style. I believe this docs is new and up to date, but the docs I mentioned uppon uppon is outdated.\nAnd, can you guys consider modifying the type hint of ctx object from *Any* to *[torch.autograd.function.]CtxFunction*. And add all the optional data member in __builtins__ or somewhere to help the auto completion in vs code. Thanks.\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @ezyang @albanD @gqchen @nikitaved @soulitzer @Varal7 @xmfan",
    "url": "https://github.com/pytorch/pytorch/issues/167843",
    "state": "closed",
    "labels": [
      "module: autograd",
      "triaged"
    ],
    "created_at": "2025-11-14T16:05:18Z",
    "updated_at": "2025-11-28T05:06:40Z",
    "user": "YagaoDirac"
  },
  {
    "repo": "pytorch/xla",
    "number": 9712,
    "title": "Why isn't there a binding for clearing the XLAGraphExecutor::ComputationCache?",
    "body": "We have exposed this function in our [tenstorrent fork](https://github.com/tenstorrent/pytorch-xla/pull/16/files) and found that it works for post-test cleanup. \n\nMy assumption was that TPU runtime does not require such a feature because it does not bind scarce device resources to PJRTComputation lifetime. So, implementers did not find it necessary to implement such a function. Is that correct? Were there any other reasons to avoid exposing this to the user? ",
    "url": "https://github.com/pytorch/xla/issues/9712",
    "state": "open",
    "labels": [
      "question",
      "runtime"
    ],
    "created_at": "2025-11-14T15:19:55Z",
    "updated_at": "2025-11-24T18:55:09Z",
    "user": "jameszianxuTT"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12662,
    "title": "question on stable_audio_transformer.py",
    "body": "Execuse me,  I am leaning the code of  `class StableAudioDiTModel` , I do not know what is the argument `        global_states_input_dim` used to?  It seems that it is a must component that should be packed before the hidden_states sequence. and its default dim seems larger then the transformer inner_dim.  What is that componenet means? If it is used to take in additional conditions, that seems can be done in the encoder outside.  and compared with the concatenate, I think it may be better to repeat condition embedding to the sequence length and concat on hidden_dim.   \n\nAnd what is the ` sample_size: int = 1024,` parameter used in the model creation? it seems not used during `forward` call     \n\nThe func doc of `class StableAudioDiTModel:forward`,  it said ``` encoder_attention_mask (`torch.Tensor` of shape `(batch_size, sequence_len)`, *optional*):```.  why the shape of encoder_attention_mask is batch_size X sequence_len instead of batch_size X  encoder_sequence_len to be identical with the shape of the input `encoder_hidden_states`    \n\nand why thee return value of this `forward` is the direct `(hidden_states,)`  but not `(hidden_states * attention_mask, )`?  \n\nabout the `class StableAudioDiTModel  forward`,  what is the shape of parameters `rotary_embedding` and `timestep`?  \n\nwhy the global_embedding is concated before the hidden_states? I think hidden_states is what we want to generated during DiT pipeline. while encoder_hidden_states is the condition signal, so global_embedding should be  used to en-rich the encoder_hidden_states.  and the action of concate the global_embedding before the input hidden_states sequence will change the input seq_length,  according to[ [1]](https://github.com/Stability-AI/stable-audio-tools/blob/main/docs/conditioning.md#input-concatenation), the concatenation should be done in the feature_dim direction, is it?   \nIt seems using normal LayerNorm layer instead of adaLN layer?",
    "url": "https://github.com/huggingface/diffusers/issues/12662",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-14T09:26:01Z",
    "updated_at": "2025-11-25T08:53:39Z",
    "comments": 1,
    "user": "JohnHerry"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28717,
    "title": "[Usage]: Errors running vLLM docker in a closed environment with gpt-oss-120b on RTX 6000 Pro",
    "body": "### Your current environment\n\nCan't get vLLM to start with the below configuration. Seems to have issues loading in the model .safetensors. Any ideas on what could be causing it?\n\nvllm version: 0.11.1\n\nCPU: Intel Xeon  w7-2595X\nGPU: NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation  Edition\nModel: https://huggingface.co/openai/gpt-oss-120b/tree/main\n\nCommand:\ndocker run --rm --name vllm --gpus=all --runtime=nvidia -p 8000:8000 -e HF_HUB_OFFLINE=1 --ipc=host -v opt/models/cache/:/root/.cache/huggingface/hub vllm/vllm-openai:latest --model openai/gpt-oss-120b\n\nAlso tried: \ndocker run --rm --name vllm --gpus=all --runtime=nvidia -p 8000:8000 -e HF_HUB_OFFLINE=1 --ipc=host -v opt/models/cache/:/root/.cache/huggingface/hub vllm/vllm-openai:latest --model openai/gpt-oss-120b\n\nwith the same output.\n\n\nOutput:\nINFO 11-12 06:23:18 [__init__.py:216] Automatically detected platform cuda.\n\u001b[1;36m(APIServer pid=1)\u001b[0;0m INFO 11-12 06:23:21 [api_server.py:1839] vLLM API server version 0.11.0\n\u001b[1;36m(APIServer pid=1)\u001b[0;0m INFO 11-12 06:23:21 [utils.py:233] non-default args: {'model': 'openai/gpt-oss-120b'}\n\u001b[1;36m(APIServer pid=1)\u001b[0;0m INFO 11-12 06:23:21 [arg_utils.py:504] HF_HUB_OFFLINE is True, replace model_id [openai/gpt-oss-120b] to model_path [/root/.cache/huggingface/hub/models--openai--gpt-oss-120b/snapshots/b5c939de8f754692c1647ca79fbf85e8c1e70f8a]\n\u001b[1;36m(APIServer pid=1)\u001b[0;0m `torch_dtype` is deprecated! Use `dtype` instead!\n\u001b[1;36m(APIServer pid=1)\u001b[0;0m INFO 11-12 06:23:26 [model.py:547] Resolved architecture: GptOssForCausalLM\n\u001b[1;36m(APIServer pid=1)\u001b[0;0m ERROR 11-12 06:23:26 [config.py:278] Error retrieving safetensors: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/root/.cache/huggingface/hub/models--openai--gpt-oss-120b/snapshots/b5c939de8f754692c1647ca79fbf85e8c1e70f8a'. Use `repo_type` argument if needed., retrying 1 of 2\n\u001b[1;36m(APIServer pid=1)\u001b[0;0m ERROR 11-12 06:23:28 [config.py:276] Error retrieving safetensors: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/root/.cache/huggingface/hub/models--openai--gpt-oss-120b/snapshots/b5c939de8f754692c1647ca79fbf85e8c1e70f8a'. Use `repo_type` argument if needed.\n\u001b[1;36m(APIServer pid=1)\u001b[0;0m INFO 11-12 06:23:28 [model.py:1730] Downcasting torch.float32 to torch.bfloat16.\n\u001b[1;36m(APIServer pid=1)\u001b[0;0m INFO 11-12 06:23:28 [model.py:1510] Using max model len 131072\n\u001b[1;36m(APIServer pid=1)\u001b[0;0m INFO 11-12 06:23:29 [scheduler.py:205] Chunked prefill is enabled with max_num_batched_tokens=8192.\n\u001b[1;36m(APIServer pid=1)\u001b[0;0m INFO 11-12 06:23:29 [config.py:271] Overriding max cuda graph capture size to 992 for performance.\nINFO 11-12 06:23:31 [__init__.py:216] Automatically detected platform cuda.\n\u001b[1;36m(EngineCore_DP0 pid=308)\u001b[0;0m INFO 11-12 06:23:33 [core.py:644] Waiting for init message from front-end.\n\u001b[1;36m(EngineCore_DP0 pid=308)\u001b[0;0m INFO 11-12 06:23:33 [core.py:77] Initializing a V1 LLM engine (v0.11.0) with config: model='/root/.cache/huggingface/hub/models--openai--gpt-oss-120b/snapshots/b5c939de8f754692c1647ca79fbf85e8c1e70f8a', speculative_config=None, tokenizer='/root/.cache/huggingface/hub/models--openai--gpt-oss-120b/snapshots/b5c939de8f754692c1647ca79fbf85e8c1e70f8a', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=False, dtype=torch.bfloat16, max_seq_len=131072, download_dir=None, load_format=auto, tensor_parallel_size=1, pipeline_parallel_size=1, data_parallel_size=1, disable_custom_all_reduce=False, quantization=mxfp4, enforce_eager=False, kv_cache_dtype=auto, device_config=cuda, structured_outputs_config=StructuredOutputsConfig(backend='auto', disable_fallback=False, disable_any_whitespace=False, disable_additional_properties=False, reasoning_parser='openai_gptoss'), observability_config=ObservabilityConfig(show_hidden_metrics_for_version=None, otlp_traces_endpoint=None, collect_detailed_traces=None), seed=0, served_model_name=/root/.cache/huggingface/hub/models--openai--gpt-oss-120b/snapshots/b5c939de8f754692c1647ca79fbf85e8c1e70f8a, enable_prefix_caching=True, chunked_prefill_enabled=True, pooler_config=None, compilation_config={\"level\":3,\"debug_dump_path\":\"\",\"cache_dir\":\"\",\"backend\":\"\",\"custom_ops\":[],\"splitting_ops\":[\"vllm.unified_attention\",\"vllm.unified_attention_with_output\",\"vllm.mamba_mixer2\",\"vllm.mamba_mixer\",\"vllm.short_conv\",\"vllm.linear_attention\",\"vllm.plamo2_mamba_mixer\",\"vllm.gdn_attention\",\"vllm.sparse_attn_indexer\"],\"use_inductor\":true,\"compile_sizes\":[],\"inductor_compile_config\":{\"enable_auto_functionalized_v2\":false},\"inductor_passes\":{},\"cudagraph_mode\":[2,1],\"use_cudagraph\":true,\"cudagraph_num_of_warmups\":1,\"cudagraph_capture_sizes\":[992,976,960,944,928,912,896,880,864,848,832,816,800,784,768,752,736,720,704,688,672,656,640,624,608,592,576,560,544,528,512,496,480,464,448,432,416,400,384,368,352,336,320,304,288,272,256,248,240,232,224,216,208,200,192,184,176,168,160,152,144,136,128,120,112,104,96,88,80,72,64,56,48",
    "url": "https://github.com/vllm-project/vllm/issues/28717",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-14T08:49:48Z",
    "updated_at": "2025-11-20T15:45:21Z",
    "comments": 3,
    "user": "antonkarlsson1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167820,
    "title": "Why torch==2.9 compile qwen3 model with block ptr will crash?",
    "body": "### \ud83d\udc1b Describe the bug\n\ntorch==2.8 compile with \u201ctorch._inductor.config.triton.use_block_ptr = True\u201c is ok, 2.9 torch will crash as shown in the figure.\n\n<img width=\"1268\" height=\"402\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9cc9742a-be5b-4754-a954-01aac02fb936\" />\n\n```python\nimport torch\nfrom vllm import LLM, SamplingParams\nfrom vllm.config import CompilationConfig\nfrom torch._inductor.lowering import make_fallback\nprompts = [\n    \"Hello, my name is Hello, my name is Hello, my name is Hello, my name is Hello, my name is Hello, my name is Hello, my name is Hello, my name is Hello, my name is Hello, my name is Hello, my name is Hello, my name is Hello, my name\" ,\n]\nsampling_params = SamplingParams(temperature=0.0, top_p=0.95,max_tokens=2)\n\ndef main():\n    torch._inductor.config.implicit_fallbacks = False\n    torch._inductor.config.layout_optimization = False\n    torch._inductor.config.prologue_fusion = True\n    torch._inductor.config.permute_fusion = True\n    torch._inductor.config.online_softmax = True\n    torch._inductor.config.memory_planning = False\n    torch._inductor.config.memory_pool = \"intermediates\"\n    torch._inductor.config.autotune_local_cache = True\n    torch._inductor.config.autotune_fallback_to_aten = False\n    torch._inductor.config.max_autotune_gemm = True\n    torch._inductor.config.max_autotune_gemm_backends = \"TRITON\"\n    torch._inductor.config.triton.use_block_ptr = True\n    torch._inductor.config.triton.prefer_nd_tiling = True\n    torch._inductor.config.triton.tile_reductions = True\n    torch._inductor.config.triton.codegen_upcast_to_fp32 = False\n\n    llm = LLM(model=\"models/Qwen3-0.6B\",\n              dtype=torch.float16,\n              enforce_eager=False,\n              compilation_config=CompilationConfig(\n                  mode=3,\n                  cache_dir=\"output/vllm/compile\"))\n    outputs = llm.generate(prompts, sampling_params)\n    print(\"\\nGenerated Outputs:\\n\" + \"-\" * 60)\n    for output in outputs:\n        prompt = output.prompt\n        generated_text = output.outputs[0].text\n        print(f\"Prompt:    {prompt!r}\")\n        print(f\"Output:    {generated_text!r}\")\n        print(\"-\" * 60)\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### Versions\n\ntorch >=2.9.0\nno other requirements\n\ncc @chauhang @penguinwu @zou3519",
    "url": "https://github.com/pytorch/pytorch/issues/167820",
    "state": "open",
    "labels": [
      "needs reproduction",
      "triaged",
      "oncall: pt2",
      "vllm-compile",
      "module: vllm"
    ],
    "created_at": "2025-11-14T08:06:29Z",
    "updated_at": "2025-11-18T06:07:13Z",
    "comments": 2,
    "user": "TracyMac1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167818,
    "title": "undefined symbol for `at::meta::_index_put_impl_` when running or compiling executable on my own torch-related project.",
    "body": "### \ud83d\udc1b Describe the bug\n\nI have a torch extended backend(PrivateUse1), somewhere in my code, I invoked `at::meta::_index_put_impl_` API. undefined symbol error occurs when I try to create executable or running python.\n\n`at::meta::_index_put_impl_` seems like a LOCAL symbol in libtorch_cpu.so, and not exist in dynsym, but why? \n\nit marked as `TORCH_API` as `at::cpu::_index_put_impl_`, but I found `at::cpu::_index_put_impl_` in output of `nm -CD libtorch_cpu.so`, no `at::meta::_index_put_impl_`.\n\nhow can I use this API or some other APIs like this in my own shared lib?\n\n\n```bash\nnm -C libtorch_cpu.so| grep -E \"at::(cpu|meta)::_index_put_impl_\"\n0000000003403cc8 T at::cpu::_index_put_impl_(at::Tensor&, c10::List<std::optional<at::Tensor> > const&, at::Tensor const&, bool, bool)\n00000000048592a3 t at::meta::_index_put_impl_(at::Tensor&, c10::List<std::optional<at::Tensor> > const&, at::Tensor const&, bool, bool)\n```\n\n```bash\nnm -CD libtorch_cpu.so| grep -E \"at::(cpu|meta)::_index_put_impl_\"\n0000000003403cc8 T at::cpu::_index_put_impl_(at::Tensor&, c10::List<std::optional<at::Tensor> > const&, at::Tensor const&, bool, bool)\n```\n\n```bash\nreadelf -CWs libtorch_cpu.so| grep -E \"at::(cpu|meta)::_index_put_impl_\"\n 32915: 0000000003403cc8    70 FUNC    GLOBAL DEFAULT   12 at::cpu::_index_put_impl_(at::Tensor&, c10::List<std::optional<at::Tensor> > const&, at::Tensor const&, bool, bool)\n4301074: 00000000048592a3    70 FUNC    LOCAL  DEFAULT   12 at::meta::_index_put_impl_(at::Tensor&, c10::List<std::optional<at::Tensor> > const&, at::Tensor const&, bool, bool)\n4441498: 0000000003403cc8    70 FUNC    GLOBAL DEFAULT   12 at::cpu::_index_put_impl_(at::Tensor&, c10::List<std::optional<at::Tensor> > const&, at::Tensor const&, bool, bool)\n```\n\n\n\n### Versions\n\nPyTorch version: 2.9.0a0+git0fabc3b\nIs debug build: True\nCUDA used to build PyTorch: None\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 22.04.1 LTS (x86_64)\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0\nClang version: Could not collect\nCMake version: version 4.1.0\nLibc version: glibc-2.35\n\nPython version: 3.12.12 | packaged by Anaconda, Inc. | (main, Oct 14 2025, 16:16:33) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-5.15.0-43-generic-x86_64-with-glibc2.35\nIs CUDA available: False\nCUDA runtime version: No CUDA\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: No CUDA\nNvidia driver version: No CUDA\ncuDNN version: No CUDA\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nAddress sizes:                   52 bits physical, 57 bits virtual\nByte Order:                      Little Endian\nCPU(s):                          224\nOn-line CPU(s) list:             0-223\nVendor ID:                       GenuineIntel\nModel name:                      Intel(R) Xeon(R) Platinum 8480+\nCPU family:                      6\nModel:                           143\nThread(s) per core:              2\nCore(s) per socket:              56\nSocket(s):                       2\nStepping:                        8\nCPU max MHz:                     3800.0000\nCPU min MHz:                     800.0000\nBogoMIPS:                        4000.00\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nVirtualization:                  VT-x\nL1d cache:                       5.3 MiB (112 instances)\nL1i cache:                       3.5 MiB (112 instances)\nL2 cache:                        224 MiB (112 instances)\nL3 cache:                        210 MiB (2 instances)\nNUMA node(s):                    2\nNUMA node0 CPU(s):               0-55,112-167\nNUMA node1 CPU(s):               56-111,168-223\nVulnerability Itlb multihit:     Not affected\nVulnerabil",
    "url": "https://github.com/pytorch/pytorch/issues/167818",
    "state": "open",
    "labels": [
      "module: binaries",
      "triaged",
      "actionable",
      "module: PrivateUse1"
    ],
    "created_at": "2025-11-14T07:32:33Z",
    "updated_at": "2025-12-08T06:43:48Z",
    "comments": 4,
    "user": "sunjiabin17"
  },
  {
    "repo": "huggingface/trl",
    "number": 4525,
    "title": "How to modify the advantage computation in GRPOTrainer",
    "body": "I\u2019m looking to customize the advantage computation used in the DAPO algorithm. Do I need to subclass the full GRPOTrainer to do this, or is it sufficient to overwrite the logic in _generate_and_score_completions, since that method appears to handle the advantage calculation?",
    "url": "https://github.com/huggingface/trl/issues/4525",
    "state": "open",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-11-14T03:48:17Z",
    "updated_at": "2025-11-14T11:37:18Z",
    "user": "Tuziking"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42200,
    "title": "Request of rewriting implementation of prediction_step in trainer.py",
    "body": "### System Info\n\nAny system. Because it's a problem coming from source code.\n\n### Who can help?\n\n@SunMarc \n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nHi, i am talking about an issue that was reported 5 years ago but still exists in 2025, specifically, 13th Nov, 2025.\n\nI quote one of the issues that was discussed before, ignored by sgugger. Please find the link below\nhttps://discuss.huggingface.co/t/cuda-out-of-memory-when-using-trainer-with-compute-metrics/2941\n\nWhen i was about to fine tune a LLM today, i ran into the same issue but i got saved by one folk's solution provided in this discussion.\n\nHow to reproduce (you should have a GPU, no quantization, just full fine tuning):\n\n1. Find a random decoder-only text2text LLM, let's say Qwen3 0.6B.\n\n2. Prepare a train dataset (>0 rows) and eval dataset (>850 rows).\n\n3. Set eval_on_start = True, either TrainingArguments or SFTConfig could work.\n\n4. Implement your own compute_metrics BUT DON'T implement preprocess_logits_for_metrics.\n5. start training (don't need deepspeed or accelerate, just trainer.train())\n\nWhat would happen?\nFirst it would go through the evaluation dataset because i set eval_on_start=True, the model would go really fast originally but then it would go extremely slow. Finally, you would get an error that says numpy is trying to allocate a ridiculously big array to memory.\n\n<img width=\"1567\" height=\"986\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/e1885324-fb09-48b6-8bfd-d36306c2a156\" />\n\nOne of the folk who seems to be inspired by example code provided the implementation of preprocess_logits_for_metrics, which solved problem i encountered perfectly. The evaluation run is done within 2 mins.\n\nWhy it would happen?\n\nI briefly go over the source code of evaluation_loop and i located prediction_step.\n\nprediction_step says it would return a tuple of three optional torch.Tensor (loss, logits, label).\n\n<img width=\"719\" height=\"68\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/537032b1-9371-4852-bed8-8f31cd6a0437\" />\n\nBut most of the time, the returned logits is a tuple.\n\nWhy?\n\nif you look at the the function that processes logits before logits is returned:\n\n<img width=\"535\" height=\"140\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d6f7f3b1-6c2a-4298-b4c2-f0ab85fa88cf\" />\n\nThis function would receive all kinds of \"tensors\". The type of \"tensors\" could be list, tuple, Mapping or torch.Tensor.\n\nDoes it change the variable, called \"tensors\", from other data types to torch.Tensor?\n\nNo.\n\ntype(tensors)(........) would preserve the original type of tensors. It means if the variable \"tensors\" (i hate this variable name because it is misleading and confusing) is a tuple, after this function, it's still a tuple!!!!!\n\nIt's a recursive function btw. I would love doing recursion in programming competition, but not in huggingface codebase!!! It also implies a fact that the input of nested_detach could be complexly nested, like ([],())\n\nSo this function doesn't guarantee the logits is a torch.Tensor.\n\nNor does the implementation of prediction_step before nested_detach was called in prediction_step\n\n<img width=\"702\" height=\"759\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/451982b4-648b-4876-a2b7-c9d748899fd1\" />\n\nSo, the logits is not always a torch.Tensor, which is contradictory to what the type hint says, what did developers do?\n\nThey developed preprocess_logits_for_metrics.\nSo that user could fix it ON THEIR OWN IMPLEMENTATION.\n\n(preprocess_logits_for_metrics is called within evaluation_loop to clean the mess, specifically, logits, returned by prediction_step())\n<img width=\"803\" height=\"772\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/c7494018-e282-4577-b824-3db9c9e57609\" />\n\nIt's such a lazy fix. Why a regular user is expected to implement their own preprocess_logits_f\nor_metrics, to deal with a poorly-designed prediction_step?\n\nIt has been 5 years since the person who reported it.........\n\nIf a user-defined compute_metrics is not provided to Trainer or SFTTrainer, the prediction_step would return (loss, none, none), which skips the whole problem and this is why users said the issue of \"slow evaluation\" is gone when they don't provide compute_metrics.\n\nI would like to make a Pull Request to fix it but i don't have enough time and energy to do this massive amount of work.\n\nA temporary fix is to let users know when they need to make their own compute_metrics, they also have to implement preprocess_logits_for_metrics. Different models would have different styles of implementations but for text2text decoder only LLM.\n\n<img width=\"687\" height=\"78\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/125fffe3-d8cc-44c7-9a96-35a11500d975\" />\n\n(Another thing is that the variable called ",
    "url": "https://github.com/huggingface/transformers/issues/42200",
    "state": "open",
    "labels": [
      "Good Second Issue",
      "bug"
    ],
    "created_at": "2025-11-14T00:13:40Z",
    "updated_at": "2025-12-18T14:29:32Z",
    "comments": 3,
    "user": "Yacklin"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42197,
    "title": "Attempt to access socket despite HF_HUB_OFFLINE = 1 if cache warmed outside current process",
    "body": "### System Info\n\n- `transformers` version: 4.57.1\n- Platform: Linux-6.6.84.1-microsoft-standard-WSL2-x86_64-with-glibc2.35\n- Python version: 3.13.0\n- Huggingface_hub version: 0.36.0\n- Safetensors version: 0.6.2\n- Accelerate version: not installed\n- Accelerate config: not found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.9.1+cpu (NA)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: No\n\n### Who can help?\n\n@ydshieh I have created a reproducible example of the issue I mentioned in https://github.com/huggingface/transformers/issues/41311#issuecomment-3508674325.\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nReproducible example: https://github.com/fr1ll/HF_HUB_OFFLINE\n\n\nWarming the cache in a subprocess, then disabling sockets, then loading the same model should work.\nHowever, it fails with an attempt to access a socket and then \"Can't load\" errors.\n\nThe script named `subprocess-warm_then_offline-load.py` reproduces this error.\n\nInterestingly, warming the cache in process, then disabling sockets, then loading the same model works.\nThis is reproduced in `inprocess-warm_then_offline-load.py` in the repo above.\n\n### Expected behavior\n\nWhen a model has already been loaded into the cache (\"warm cache\"), if `HF_OFFLINE_MODE` = `\"1\"`, a Transformers pipeline should be able to load the model without accessing any network sockets.",
    "url": "https://github.com/huggingface/transformers/issues/42197",
    "state": "closed",
    "labels": [
      "Good Second Issue",
      "bug"
    ],
    "created_at": "2025-11-13T21:38:29Z",
    "updated_at": "2025-11-24T09:33:54Z",
    "comments": 6,
    "user": "fr1ll"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28646,
    "title": "[Feature][P2]:  Implement CI Build Time and Size Guards",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\n### Description\nOnce we optimize the Docker build, we need to prevent regressions. Create CI checks that fail if build time exceeds thresholds or if image size grows beyond acceptable limits. Also set up monitoring dashboards.\n\n### What You'll Do\n1. Create Python scripts to check image metrics:\n   - `check-image-size.py` (extend existing wheel size checker)\n   - `check-build-time.py`\n   - `check-image-layers.py`\n2. Add these checks to CI pipeline after image build\n3. Set appropriate thresholds (configurable)\n4. Create Buildkite annotations for warnings\n5. Set up CloudWatch dashboard for metrics (optional)\n\n### Deliverables\n- [ ] Python scripts for checking metrics\n- [ ] Integration into test-template-ci.j2\n- [ ] Configurable thresholds via environment variables\n- [ ] Documentation on how to adjust thresholds\n- [ ] CloudWatch dashboard (optional)\n\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28646",
    "state": "open",
    "labels": [
      "feature request",
      "ci/build"
    ],
    "created_at": "2025-11-13T12:50:34Z",
    "updated_at": "2025-11-13T18:55:29Z",
    "comments": 0,
    "user": "rzabarazesh"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167721,
    "title": "Minimal, comprehensive test suite",
    "body": "\nWe are building PyTorch from source using, among others, the system installed CUDA.\n\nCurrently we are running the full test suite to ensure nothing got broken due to e.g. wrong dependency versions or missing dependencies. I.e. `python test/run_test.py --continue-through-error`\n\nHowever, that takes up to 3 days on a GPU node of a HPC cluster and shows random failures due to small accuracy issues or \"unlucky\" random inputs.\n\nIs there some smaller test suite that can be used to verify sufficiently large parts of PyTorch but runs much faster?\n\nI noticed that requesting a PR merge has an anticipated delay of 3-4hrs for running some tests. What is exactly used there? Could that be enough for our use case too?\n\n\n\nSo what I request is some documentation next to the \"Building PyTorch from source\" section on how to verify the built package in a reasonable time frame.\n\n\n\ncc @svekars @sekyondaMeta @AlannaBurke",
    "url": "https://github.com/pytorch/pytorch/issues/167721",
    "state": "open",
    "labels": [
      "module: docs",
      "feature",
      "triaged",
      "module: infra",
      "module: testing"
    ],
    "created_at": "2025-11-13T12:18:42Z",
    "updated_at": "2025-11-26T21:55:31Z",
    "comments": 5,
    "user": "Flamefire"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12650,
    "title": "Question about the `# Copied from` system",
    "body": "Hi team! \ud83d\udc4b\n\nWhile working on improving docstrings and type hints across scheduler files (issue #9567), I've noticed the `# Copied from` pattern used extensively throughout the codebase.\n\nExamples:\n- Functions like `betas_for_alpha_bar` are duplicated across multiple schedulers\n- Output classes like `DDPMSchedulerOutput` are copied with name replacements (e.g., DDPM->EulerDiscrete)\n\nMy question: What's the rationale behind this duplication system instead of:\n1. Using a shared utils.py or common.py file for common functions\n2. Using class inheritance for similar Output classes\n\nI understand there might be good architectural reasons (module independence, API stability, avoiding circular dependencies, etc.), but this isn't documented anywhere that I could find.\n\nSuggested action: Regardless of the answer, I think we should either:\n- Option A: Refactor to use inheritance/shared utilities (if the current system is legacy)\n- Option B: Document this design decision in:\n&nbsp; - A CONTRIBUTING.md or architecture doc\n&nbsp; - Comments in the utils/check_copies.py script itself\n&nbsp; - Another README in the diffusers directory\n\nThis would help future contributors (like me! \ud83d\ude05) understand why this pattern exists and how to work with it properly when improving documentation. What do you think?\n\nThanks for maintaining such a great library! \ud83d\ude80",
    "url": "https://github.com/huggingface/diffusers/issues/12650",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-13T11:53:22Z",
    "updated_at": "2025-12-21T22:44:03Z",
    "comments": 3,
    "user": "delmalih"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42179,
    "title": "Add TileLang Kernel Support",
    "body": "### Feature request\n\nI would like to propose adding support for TileLang kernel in the transformers library. TileLang is a modular approach for writing attention kernels that could provide flexibility and performance benefits.\ngithub link: https://github.com/tile-ai/tilelang\n- Add TileLang as an optional attention backend\n- Provide configuration options similar to existing attention mechanisms\n- Ensure compatibility with existing model architectures\n- Add proper multi-GPU support and synchronization\n\n### Motivation\n\n- Enhanced Modularity\nTileLang offers a more modular approach to writing attention kernels, making it easier for researchers and developers to modify and optimize the implementation for specific use cases.\n\n- Performance Comparison\nIntegrating TileLang would allow users to benchmark its performance directly against existing attention implementations, such as Flex Attention and Flash Attention. This would foster a better understanding of how different kernels can impact model performance and efficiency.\n\n- Community Engagement\nSupporting TileLang in the Transformers library would attract a broader community of developers interested in optimizing transformer models, thus enhancing collaboration and innovation.\n\n- Flexibility\nTileLang's architecture is designed for ease of modification, allowing users to experiment with and refine attention mechanisms more effectively.\n\n### Your contribution\n\nI've experimented with TileLang kernel on transformers models and found it works well in single-GPU scenarios. However, when enabling multi-GPU inference using `device_map='auto'`, I encounter NaN tensors. This may be related to tensor synchronization issues in distributed settings.\n\nI'm willing to help with testing and potentially contributing to the implementation once the multi-GPU synchronization issue is understood and resolved.\n\nI also have 3 questions:\n1. Is there any existing plan or roadmap for TileLang integration?\n2. Are there specific guidelines for adding new attention backends?\n3. What would be the recommended approach for handling multi-GPU synchronization in custom kernels?\n",
    "url": "https://github.com/huggingface/transformers/issues/42179",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-11-13T11:38:33Z",
    "updated_at": "2025-11-13T11:38:33Z",
    "comments": 0,
    "user": "crownz248"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1885,
    "title": "Feature request: Characters delimiter argument",
    "body": "I wish to develop a k-mer-character-based BPE tokenizer using your beautiful Rust package, for genomic applications. Unfortunately, it doesn't seem to support defining a characters delimiter. As I see it, it is a pretty straightforward change, instead of iterating a word by character, first split it by the delimiter and then iterate. Also, when merges are computed, in the string representation the character delimiter should also be considered. In that way, a multi-character word splitting could have been made feasible. Right now I am using a modified Python version of the BPE tokenizer made by the genius [Yikai-Liao](https://github.com/Yikai-Liao/efficient_bpe/blob/main/ebpe_v2.py), however it would be nice to see that happening in Rust as well, and natively supported by huggingface. Unfortunately, I am still novice in working with Rust, otherwise I would make a pull request with the suggested changes. Is it something that can be worked out in the future? Or is there a way to do this with the current implementation? Thank you!",
    "url": "https://github.com/huggingface/tokenizers/issues/1885",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-13T10:40:29Z",
    "updated_at": "2025-11-28T07:51:07Z",
    "comments": 1,
    "user": "VasLem"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28629,
    "title": "[Usage]: TPOT per request information was not collected by vllm bench serve",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.2 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : version 4.1.0\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+xpu\nIs debug build               : False\nCUDA used to build PyTorch   : None\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] (64-bit runtime)\nPython platform              : Linux-6.14.0-1006-intel-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : False\nCUDA runtime version         : No CUDA\nCUDA_MODULE_LOADING set to   : N/A\nGPU models and configuration : No CUDA\nNvidia driver version        : No CUDA\ncuDNN version                : No CUDA\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           46 bits physical, 57 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  32\nOn-line CPU(s) list:                     0-31\nVendor ID:                               GenuineIntel\nBIOS Vendor ID:                          Intel(R) Corporation\nModel name:                              Intel(R) Xeon(R) w5-3435X\nBIOS Model name:                         Intel(R) Xeon(R) w5-3435X  CPU @ 3.1GHz\nBIOS CPU family:                         179\nCPU family:                              6\nModel:                                   143\nThread(s) per core:                      2\nCore(s) per socket:                      16\nSocket(s):                               1\nStepping:                                8\nCPU(s) scaling MHz:                      45%\nCPU max MHz:                             4700.0000\nCPU min MHz:                             800.0000\nBogoMIPS:                                6192.00\nFlags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nVirtualization:                          VT-x\nL1d cache:                               768 KiB (16 instances)\nL1i cache:                               512 KiB (16 instances)\nL2 cache:                                32 MiB (16 instances)\nL3 cache:                                45 MiB (1 instance)\nNUMA node(s):                            1\nNUMA node0 CPU(s):                       0-31\nVulnerability Gather data sampling:      Not affected\nVulnerability Ghostwrite:                Not affected\nVulnerability Indirect target selection: Not affected\nVulnerability Itlb multihit:             Not affected\nVulnerability L1tf:                      Not affected\nVulnerability Mds:                       Not affected\nVulnerability Meltdown:                  Not affected\nVulnerability Mmio stale data:           Not affected\nVulnerability Reg file data sampling:    Not affected\nVulnerability Retbleed:                  Not affected\nVulnerability Spec rstack overflow:      Not affected\nVulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and ",
    "url": "https://github.com/vllm-project/vllm/issues/28629",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-13T09:20:19Z",
    "updated_at": "2025-11-13T09:20:19Z",
    "comments": 0,
    "user": "jlwang1996"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28626,
    "title": "[Bug]:Qwen3-VL-32B-AWQ model memory usage: 8k context limit with 40GB VRAM?",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nRunning models on the latest stable vLLM release: https://huggingface.co/QuantTrio/Qwen3-VL-32B-Instruct-AWQ\nThe model size is 20GB, and my GPU has 40GB VRAM total.\nUsing parameter: --gpu-memory-utilization 0.9\nWhy am I only getting around 8k max context length? Do VL models really hog that much VRAM?\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28626",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-13T08:00:20Z",
    "updated_at": "2025-11-17T07:08:47Z",
    "comments": 3,
    "user": "maxin9966"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28622,
    "title": "[Bug]: Can we able to benchmark Quantized MOE models Either W8A8 or W8A16 ?",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.2 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : version 3.22.1\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.10.18 (main, Jun  4 2025, 08:56:00) [GCC 13.3.0] (64-bit runtime)\nPython platform              : Linux-6.14.0-33-generic-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.0.140\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : GPU 0: NVIDIA RTX 6000 Ada Generation\nNvidia driver version        : 575.57.08\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.11.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.11.0\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           52 bits physical, 57 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  52\nOn-line CPU(s) list:                     0-51\nVendor ID:                               GenuineIntel\nModel name:                              Intel(R) Xeon(R) w7-2595X\nCPU family:                              6\nModel:                                   143\nThread(s) per core:                      2\nCore(s) per socket:                      26\nSocket(s):                               1\nStepping:                                8\nCPU(s) scaling MHz:                      21%\nCPU max MHz:                             4800.0000\nCPU min MHz:                             800.0000\nBogoMIPS:                                5616.00\nFlags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nVirtualization:                          VT-x\nL1d cache:                               1.2 MiB (26 instances)\nL1i cache:                               832 KiB (26 instances)\nL2 cache:                                52 MiB (26 instances)\nL3 cache:                                48.8 MiB (1 instance)\nNUMA node(s):                            1\nNUMA node0 CPU(s):                       0-51\nVulnerability Gather data sampling:      Not affected\nVulnerability Ghostwrite:                Not affected\nVulnerability Indirect target selection: Not affected\nVulnerability Itlb multihit:             Not affected\nVulnerability L1tf:                      Not affected\nVulnerability Mds:                       Not affected\nVulnerability Meltdown:                  Not affected\nVulnerability Mmio stale data:           Not af",
    "url": "https://github.com/vllm-project/vllm/issues/28622",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-13T07:26:56Z",
    "updated_at": "2025-11-13T07:27:06Z",
    "comments": 0,
    "user": "logesh13"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167716,
    "title": "`torch.sparse.mm` returns corrupted sparse tensor causing Segmentation fault in `to_dense()` on PyTorch 2.9.0",
    "body": "### \ud83d\udc1b Describe the bug\n\nI experienced a problem while using the \"torch.sparse.mm()\" function, which prompted me to consult the official documentation for clarification. The documentation includes sample code that executes successfully. According to the documentation, the second matrix parameter accepts both sparse and dense matrices. In the official example provided, the second matrix is implemented as a dense matrix. The example code runs as follows:\n```python\nimport torch\na = torch.tensor([[1., 0, 2], [0, 3, 0]]).to_sparse().requires_grad_()\nb = torch.tensor([[0, 1.], [2, 0], [0, 0]], requires_grad=True)\ny = torch.sparse.mm(a, b)\nz = y.to_dense()\n```\nThe official example executes successfully. Out of curiosity about the behavior when the second matrix parameter is sparse, I created a custom sparse matrix to test the functionality. The sparse matrix multiplication operation itself completed without errors, but attempting to inspect the result using \"to_dense()\" caused a \"Segmentation fault\".\nThe code runs as follows:\n```python\nimport torch\n\ntorch.manual_seed(42)\n\nindices_A = torch.tensor([[0, 1, 2], [0, 2, 3]])  \nvalues_A = torch.tensor([1.0, 2.0, 3.0])        \nA = torch.sparse_coo_tensor(indices_A, values_A, size=(3, 4))\n\nindices_B = torch.tensor([[0, 1, 2, 3], [0, 1, 1, 2]])  \nvalues_B = torch.tensor([4.0, 5.0, 6.0, 7.0]) \nB = torch.sparse_coo_tensor(indices_B, values_B, size=(4, 2))\n\nC = torch.sparse.mm(A, B)\nC = C.to_dense()\n```\nit comes out:\n```\ntest2.py:13: UserWarning: Sparse CSR tensor support is in beta state. If you miss a functionality in the sparse tensor support, please submit a feature request to https://github.com/pytorch/pytorch/issues. (Triggered internally at /pytorch/aten/src/ATen/SparseCsrTensorImpl.cpp:53.)\n  C = torch.sparse.mm(A, B)\nSegmentation fault (core dumped)\n```\nTo further investigate the root cause, I proceeded to debug the code. During debugging, I found that simply printing the two matrices prior to invoking torch.sparse.mm()resolved the segmentation fault. The specific modification is shown below:\n```python\nimport torch\n\ntorch.manual_seed(42)\n\nindices_A = torch.tensor([[0, 1, 2], [0, 2, 3]])  \nvalues_A = torch.tensor([1.0, 2.0, 3.0])        \nA = torch.sparse_coo_tensor(indices_A, values_A, size=(3, 4))\n\nindices_B = torch.tensor([[0, 1, 2, 3], [0, 1, 1, 2]])  \nvalues_B = torch.tensor([4.0, 5.0, 6.0, 7.0]) \nB = torch.sparse_coo_tensor(indices_B, values_B, size=(4, 2))\n\nprint(\"A:\", A)\nprint(\"B:\", B)\n\nC = torch.sparse.mm(A, B)\nC = C.to_dense()\n```\nBased on this observation, I suspect that the print()function inadvertently triggers necessary initialization procedures that should occur within \"torch.sparse.mm()\", but due to an implementation flaw in the sparse matrix multiplication function, these critical initialization steps are not being properly executed, resulting in the \"Segmentation fault\".\nTo investigate the root cause of the issue, I proceeded to examine the internal data structures of the matrices by printing their properties. The diagnostic code is shown below:\n```python\nimport torch\nimport os\n\ntorch.manual_seed(42)\n\nindices_A = torch.tensor([[0, 1, 2], [0, 2, 3]])\nvalues_A = torch.tensor([1.0, 2.0, 3.0])\nA = torch.sparse_coo_tensor(indices_A, values_A, size=(3, 4))\n\nindices_B = torch.tensor([[0, 1, 2, 3], [0, 1, 1, 2]])\nvalues_B = torch.tensor([4.0, 5.0, 6.0, 7.0])\nB = torch.sparse_coo_tensor(indices_B, values_B, size=(4, 2))\n\nC = torch.sparse.mm(A, B)\n\nindices = C.indices()\nvalues = C.values()\nprint(f\"  Indices shape: {indices.shape}\")\nprint(f\"  Values shape: {values.shape}\")\nprint(f\"  Indices range: [{indices.min().item()}, {indices.max().item()}]\")\nprint(f\"  Values range: [{values.min().item()}, {values.max().item()}]\")\n\nC = C.to_dense()\n```\nit comes out:\n\n<img width=\"326\" height=\"90\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/28078672-9831-4492-a6aa-0f640776ef44\" />\n\nAs highlighted in the red box, the index data of the resulting matrix C appears to be corrupted, leading the \"to_dense()\" function to attempt accessing an invalid memory address. This concludes my current analysis of the issue. Since I'm not proficient in C++, I'm unable to conduct deeper source code investigation. I greatly appreciate any insights you can provide!\n\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.9.0+cpu\nIs debug build: False\nCUDA used to build PyTorch: None\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.3 LTS (x86_64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version: Could not collect\nCMake version: Could not collect\nLibc version: glibc-2.39\n\nPython version: 3.13.9 (main, Oct 14 2025, 21:29:44) [Clang 20.1.4 ] (64-bit runtime)\nPython platform: Linux-6.8.0-86-generic-x86_64-with-glibc2.39\nIs CUDA available: False\nCUDA runtime version: No CUDA\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: No CUDA\nNvidia driver version: No CUDA\ncuDNN version: No CUDA\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runti",
    "url": "https://github.com/pytorch/pytorch/issues/167716",
    "state": "closed",
    "labels": [
      "module: sparse",
      "module: crash"
    ],
    "created_at": "2025-11-13T07:25:20Z",
    "updated_at": "2025-11-13T16:57:47Z",
    "comments": 2,
    "user": "David-YB"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28610,
    "title": "[Usage]: Does 0.11.0 suport tree attenton with eagle?",
    "body": "### Your current environment\n\nDoes 0.11.0 suport tree attenton with eagle? Do I need to enable it manually?\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28610",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-13T03:35:02Z",
    "updated_at": "2025-12-03T17:08:16Z",
    "comments": 1,
    "user": "wincle"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7864,
    "title": "add_column and add_item erroneously(?) require new_fingerprint parameter",
    "body": "### Describe the bug\n\nContradicting their documentation (which doesn't mention the parameter at all), both Dataset.add_column and Dataset.add_item require a new_fingerprint string. This parameter is passed directly to the dataset constructor, which has the fingerprint parameter listed as optional; is there any reason it shouldn't be optional in these methods as well? \n\n### Steps to reproduce the bug\n\nReproduction steps:\n\n1. Look at the function signature for add_column: https://github.com/huggingface/datasets/blob/17f40a318a1f8c7d33c2a4dd17934f81d14a7f57/src/datasets/arrow_dataset.py#L6078\n2. Repeat for add_item: https://github.com/huggingface/datasets/blob/17f40a318a1f8c7d33c2a4dd17934f81d14a7f57/src/datasets/arrow_dataset.py#L6336\n\n### Expected behavior\n\nadd_column and add_item should either set the fingerprint parameter to optional or include it in their docstrings\n\n### Environment info\n\nNot environment-dependent",
    "url": "https://github.com/huggingface/datasets/issues/7864",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-13T02:56:49Z",
    "updated_at": "2025-12-07T14:41:40Z",
    "comments": 2,
    "user": "echthesia"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28566,
    "title": "[Usage]: pd disagg scenario , I discover in the decoder , also has the prefill operation, is it normal ?",
    "body": "### Your current environment\n\nwhen num_computed_tokens is less than num_prompt_tokens, it will enter prefill operation\n\n<img width=\"633\" height=\"149\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/bab96187-37c8-4ea2-ba68-9f52dda07f6b\" />\n\n\nand i found, num_computed_tokens is possible less than num_prompt_tokens, because num_prompt_tokens is len(block_ids) * self.block_size, event num_prompt_tokens is just equal to num_prompt_tokens, it do num_computed_tokens -= 1, why ? this cause num_computed_tokens is never equal to num_prompt_tokens\n\n<img width=\"980\" height=\"762\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/81eb6f4f-f0db-45f8-8934-64bd8ea21988\" />\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28566",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-12T16:18:53Z",
    "updated_at": "2025-11-12T16:18:53Z",
    "comments": 0,
    "user": "yangshanjun"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28564,
    "title": "[Usage]: Can't get ModernBert models to run in vllm serve",
    "body": "### Your current environment\n\nI am trying to download and use ModernBertModel with the vllm serve feature. \nAt first I thought it was an issue with the model so I switched from trying to use BertEmbed with Alibaba-NLP/gte-modernbert-base since it appears in the docs as a model that supports embedding. \nSource: https://docs.vllm.ai/en/latest/models/supported_models/#pooling-models \n\nI download and run it like this. \nDownload:\n`huggingface-cli download Alibaba-NLP/gte-modernbert-base --local-dir models/bert --local-dir-use-symlinks False`\nServe (example, I have used many  iterations):\n`vllm serve models/bert2 --host 0.0.0.0 --port 8003 --task embed --trust-remote-code --gpu-memory-utilization 0.3`\n\nNo matter what I get this: Assertion failed, The model should be a generative or pooling model when task is set to 'embedding'. [type=assertion_error, input_value=ArgsKwargs((), {'model': ...rocessor_plugin': None}), input_type=ArgsKwargs]\n\nI tried setting runner but that didn't do a thing. I really have no clue why it says this model is supported in the docs.  I have searched through other issues and documentation to try out a bunch of solutions but obviously none have worked so far. Been trying to figure this out for hours now and I am losing my mind (not relevant ig, need to vent).\n\n### How would you like to use vllm\n\nI want to run inference of a Alibaba-NLP/gte-modernbert-base or any ModernBertModel. I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28564",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-12T15:51:18Z",
    "updated_at": "2025-11-12T15:51:18Z",
    "comments": 0,
    "user": "Logikschleifen"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167631,
    "title": "`jit.export` analoge for `torch.export`",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nAccording to the documentation, [`TorchScript` is deprecated in favor of `torch.export`](https://docs.pytorch.org/docs/stable/jit.html). \n\nHowever, `torch.jit.script` offered some functionality that does not seem to be covered by `torch.export`, specifically the ability to export multiple entry points via the `@jit.export` decorator. This is useful in many situations, for instance when working with Normalizing Flows and wanting to use both forward and inverse method, probabilistic models with multiple relevant methods, or for declaring additional state-modifying functions.\n\nWithout this functionality, it's unclear how to convert models that relied on `jit.export` to the new `torch.export` setup.\n\nRelated Discussions:\n\n- https://github.com/pytorch/executorch/issues/7458\n- https://discuss.pytorch.org/t/export-multiple-functions-of-a-pytorch-module/194816\n\n\n\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel @chauhang @penguinwu @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4",
    "url": "https://github.com/pytorch/pytorch/issues/167631",
    "state": "open",
    "labels": [
      "oncall: pt2",
      "oncall: export"
    ],
    "created_at": "2025-11-12T10:24:10Z",
    "updated_at": "2025-11-17T18:41:46Z",
    "comments": 3,
    "user": "randolf-scholz"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167630,
    "title": "Memory leak in aoti compile",
    "body": "### \ud83d\udc1b Describe the bug\n\nI want to compile many exported programs into an aoti .so file. However it seems like there is a memory leak\n```python\nimport contextlib\nimport gc\nimport logging\nimport os\nimport tempfile\nfrom pathlib import Path\n\nimport torch\nimport torch._inductor\nimport torch.nn as nn\n\nlogging.basicConfig(\n    format=\"%(asctime)s %(levelname)s: %(message)s\",\n    level=logging.INFO,\n)\n\n\ndef log_current_memory() -> None:\n    total = torch.cuda.get_device_properties(0).total_memory\n    allocated = torch.cuda.memory_allocated(0)\n    reserved = torch.cuda.memory_reserved(0)\n    msg = \"Current CUDA memory usage:\"\n    msg += f\"\\n  Total: {total / 1e9:.2f} GB\"\n    msg += f\"\\n  Allocated: {allocated / 1e9:.4} GB\"\n    msg += f\"\\n  Reserved: {reserved / 1e9:.4f} GB\"\n    logging.info(msg)\n\n\n# ---------- toy model ----------\ndef make_mlp(in_dim=128, hidden=256, out_dim=64, depth=3):\n    layers = []\n    d = in_dim\n    for _ in range(depth):\n        layers += [nn.Linear(d, hidden), nn.ReLU()]\n        d = hidden\n    layers += [nn.Linear(d, out_dim)]\n    return nn.Sequential(*layers)\n\n\ndef one_iter(i, device, batch, in_dim, hidden, out_dim, depth, workdir):\n    model = make_mlp(in_dim, hidden, out_dim, depth).to(device).eval()\n    x = torch.randn(batch, in_dim, device=device)\n    with torch.inference_mode():\n        _ = model(x)\n        exported = torch.export.export(\n            model,\n            (x,),\n        )\n\n        pkg_path = Path(workdir) / f\"mlp_{i}.pt2\"\n        path = torch._inductor.aoti_compile_and_package(  # returns artifact path\n            exported_program=exported,\n            package_path=str(pkg_path),\n        )\n\n    logging.info(f\"[iter {i}] AOTI artifact: {path}\")\n\n    log_current_memory()\n\n    del _\n    del model, x, exported\n    torch.cuda.synchronize()\n    torch.cuda.empty_cache()\n    gc.collect()\n\n    with contextlib.suppress(OSError):\n        os.remove(path)\n\n\ndef main():\n    assert torch.cuda.is_available(), \"CUDA is required for this MRE.\"\n\n    device = \"cuda\"\n    logging.info(f\"Running on {torch.cuda.get_device_name(0)}\")\n\n    log_current_memory()\n    for i in range(10):\n        with tempfile.TemporaryDirectory() as tmp_workdir:\n            one_iter(\n                i=i,\n                device=device,\n                batch=32,\n                in_dim=2048,\n                hidden=512,\n                out_dim=10,\n                depth=6,\n                workdir=tmp_workdir,\n            )\n    logging.info(\"Done.\")\n    torch.cuda.synchronize()\n    torch.cuda.empty_cache()\n    gc.collect()\n    log_current_memory()\n\n\nif __name__ == \"__main__\":\n    main()\n```\nwill print\n```\n2025-11-12 09:14:08,074 INFO: Current CUDA memory usage:\n  Total: 85.10 GB\n  Allocated: 0.0 GB\n  Reserved: 0.0000 GB\n/persist/envs/Fluyt312/lib/python3.12/site-packages/torch/_inductor/compile_fx.py:282: UserWarning: TensorFloat32 tensor cores for float32 matrix multiplication available but not enabled. Consider setting `torch.set_float32_matmul_precision('high')` for better performance.\n  warnings.warn(\n2025-11-12 09:14:16,492 INFO: [iter 0] AOTI artifact: /tmp/tmpu7l62f87/mlp_0.pt2\n2025-11-12 09:14:16,493 INFO: Current CUDA memory usage:\n  Total: 85.10 GB\n  Allocated: 0.01825 GB\n  Reserved: 0.0294 GB\n2025-11-12 09:14:20,846 INFO: [iter 1] AOTI artifact: /tmp/tmp_4ueq3r9/mlp_1.pt2\n2025-11-12 09:14:20,847 INFO: Current CUDA memory usage:\n  Total: 85.10 GB\n  Allocated: 0.02772 GB\n  Reserved: 0.0336 GB\n2025-11-12 09:14:25,241 INFO: [iter 2] AOTI artifact: /tmp/tmpe3zldlu3/mlp_2.pt2\n2025-11-12 09:14:25,242 INFO: Current CUDA memory usage:\n  Total: 85.10 GB\n  Allocated: 0.03719 GB\n  Reserved: 0.0608 GB\n2025-11-12 09:14:29,657 INFO: [iter 3] AOTI artifact: /tmp/tmptv6ucstj/mlp_3.pt2\n2025-11-12 09:14:29,657 INFO: Current CUDA memory usage:\n  Total: 85.10 GB\n  Allocated: 0.04667 GB\n  Reserved: 0.0650 GB\n2025-11-12 09:14:36,116 INFO: [iter 4] AOTI artifact: /tmp/tmp_9hsaky4/mlp_4.pt2\n2025-11-12 09:14:36,117 INFO: Current CUDA memory usage:\n  Total: 85.10 GB\n  Allocated: 0.05614 GB\n  Reserved: 0.0713 GB\n2025-11-12 09:14:40,528 INFO: [iter 5] AOTI artifact: /tmp/tmpi2q_wgap/mlp_5.pt2\n2025-11-12 09:14:40,529 INFO: Current CUDA memory usage:\n  Total: 85.10 GB\n  Allocated: 0.06561 GB\n  Reserved: 0.0755 GB\n2025-11-12 09:14:44,982 INFO: [iter 6] AOTI artifact: /tmp/tmp_9xuabi5/mlp_6.pt2\n2025-11-12 09:14:44,982 INFO: Current CUDA memory usage:\n  Total: 85.10 GB\n  Allocated: 0.07508 GB\n  Reserved: 0.0818 GB\n2025-11-12 09:14:49,412 INFO: [iter 7] AOTI artifact: /tmp/tmpeedfcd55/mlp_7.pt2\n2025-11-12 09:14:49,412 INFO: Current CUDA memory usage:\n  Total: 85.10 GB\n  Allocated: 0.08455 GB\n  Reserved: 0.1070 GB\n2025-11-12 09:14:53,822 INFO: [iter 8] AOTI artifact: /tmp/tmpp2miv7ts/mlp_8.pt2\n2025-11-12 09:14:53,823 INFO: Current CUDA memory usage:\n  Total: 85.10 GB\n  Allocated: 0.09402 GB\n  Reserved: 0.1132 GB\n2025-11-12 09:14:58,244 INFO: [iter 9] AOTI artifact: /tmp/tmp3mwylv5e/mlp_9.pt2\n2025-11-12 09:14:58,244 INFO: Current CUDA memory usage:\n",
    "url": "https://github.com/pytorch/pytorch/issues/167630",
    "state": "closed",
    "labels": [
      "module: memory usage",
      "oncall: pt2",
      "oncall: export",
      "module: aotinductor"
    ],
    "created_at": "2025-11-12T09:23:03Z",
    "updated_at": "2025-11-19T03:42:13Z",
    "comments": 1,
    "user": "ben-da6"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28527,
    "title": "\ud83d\udca1 Bounty Platform for vLLM",
    "body": "Hi vLLM team! \ud83d\udc4b\n\nI wanted to share **Roxonn** - a decentralized bounty platform for accelerating AI/ML development.\n\n**What is Roxonn?**\n\u2705 Fund GitHub issues with crypto bounties (XDC, USDC, ROXN)\n\u2705 Notify 300+ AI/ML developers\n\u2705 Auto-pay when PRs merge via blockchain\n\u2705 Zero crypto setup needed\n\n**Quick flow:**\n1. Register repo (GitHub App)\n2. Fund pool with USDC (stable pricing)\n3. Assign bounties to features\n4. PR merged \u2192 automatic payment\n\n**Perfect for AI/ML:**\n- Access to research community\n- **Only 1% total platform fee**\n- Transparent payments\n\nLearn more: **https://roxonn.com**\n\n*No pressure - sharing a resource!*",
    "url": "https://github.com/vllm-project/vllm/issues/28527",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-12T07:50:33Z",
    "updated_at": "2025-11-13T12:36:15Z",
    "comments": 0,
    "user": "dineshroxonn"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42154,
    "title": "\ud83d\udca1 Bounty Platform for Hugging Face Transformers",
    "body": "Hi Hugging Face Transformers team! \ud83d\udc4b\n\nI wanted to share **Roxonn** - a decentralized bounty platform for accelerating AI/ML development.\n\n**What is Roxonn?**\n\u2705 Fund GitHub issues with crypto bounties (XDC, USDC, ROXN)\n\u2705 Notify 300+ AI/ML developers\n\u2705 Auto-pay when PRs merge via blockchain\n\u2705 Zero crypto setup needed\n\n**Quick flow:**\n1. Register repo (GitHub App)\n2. Fund pool with USDC (stable pricing)\n3. Assign bounties to features\n4. PR merged \u2192 automatic payment\n\n**Perfect for AI/ML:**\n- Access to research community\n- **Only 1% total platform fee**\n- Transparent payments\n\nLearn more: **https://roxonn.com**\n\n*No pressure - sharing a resource!*",
    "url": "https://github.com/huggingface/transformers/issues/42154",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-12T07:49:59Z",
    "updated_at": "2025-11-17T11:40:10Z",
    "comments": 2,
    "user": "dineshroxonn"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167624,
    "title": "\ud83d\udca1 Bounty Platform for PyTorch",
    "body": "Hi PyTorch team! \ud83d\udc4b\n\nI wanted to share **Roxonn** - a decentralized bounty platform for accelerating AI/ML development.\n\n**What is Roxonn?**\n\u2705 Fund GitHub issues with crypto bounties (XDC, USDC, ROXN)\n\u2705 Notify 300+ AI/ML developers\n\u2705 Auto-pay when PRs merge via blockchain\n\u2705 Zero crypto setup needed\n\n**Quick flow:**\n1. Register repo (GitHub App)\n2. Fund pool with USDC (stable pricing)\n3. Assign bounties to features\n4. PR merged \u2192 automatic payment\n\n**Perfect for AI/ML:**\n- Access to research community\n- **Only 1% total platform fee**\n- Transparent payments\n\nLearn more: **https://roxonn.com**\n\n*No pressure - sharing a resource!*",
    "url": "https://github.com/pytorch/pytorch/issues/167624",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-12T07:49:51Z",
    "updated_at": "2025-11-13T12:35:34Z",
    "comments": 0,
    "user": "dineshroxonn"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167613,
    "title": "UNSTABLE inductor-periodic / inductor-smoke-test / test (inductor_torchbench_smoketest_perf)",
    "body": "I can't figure out from the logs what is wrong\n\ncc @ezyang @gchanan @kadeng @msaroufim @mcarilli @eellison @penguinwu @BoyuanFeng @chauhang @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @muchulee8 @amjames @aakhundov @coconutruben @seemethere @malfet @pytorch/pytorch-dev-infra",
    "url": "https://github.com/pytorch/pytorch/issues/167613",
    "state": "closed",
    "labels": [
      "high priority",
      "module: ci",
      "triaged",
      "module: cuda graphs",
      "oncall: pt2",
      "module: inductor",
      "unstable"
    ],
    "created_at": "2025-11-12T03:47:42Z",
    "updated_at": "2026-01-05T15:15:52Z",
    "comments": 6,
    "user": "zou3519"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28508,
    "title": "[Usage]: KVCacheManager Parameter question",
    "body": "\n\nI noticed that the parameter \u201cself.req_to_block_hashes\u201d has been removed from KVCacheManager since version v0.10.0. But this parameter is still preserved in the official documentation. Could you please provide an explanation of this change? \n\n- [Document Description](https://docs.vllm.ai/en/v0.9.2/api/vllm/v1/core/kv_cache_manager.html)\n\n- [Version v0.10.0 code](https://github.com/vllm-project/vllm/blob/v0.10.0/vllm/v1/core/kv_cache_manager.py)\n\n\n\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28508",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-12T03:10:18Z",
    "updated_at": "2025-11-16T08:33:45Z",
    "comments": 1,
    "user": "Liziqi-77"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12638,
    "title": "How to design network with DiT blocks that are friendly to Tensorrt fp16 conversion?",
    "body": "We had a network that structed as `a convnet pre-encoder -> DiT blocks  -> final block for last sampling`,  it worked well with torch format and  onnx format, but when we tried to convert it into tensorrt fp16 format, the inference will get value overflow.  we had seen the data differene [between onnx and trt fp16, with polygraphy.] get larger and larger following those DiT blocks.  My question is, how to make the whole model design more friendly to mix-precision inference? to let the DiT blocks less sensitive to value precision. Should I make the convnet pre-encoder and final blocks more complex, or more simple?  Thanks",
    "url": "https://github.com/huggingface/diffusers/issues/12638",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-12T02:23:37Z",
    "updated_at": "2025-11-12T02:23:37Z",
    "user": "JohnHerry"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2428,
    "title": "how to eval the real world recorded dataset?",
    "body": "can lerobot eval the real world dataset with metric such as mse? I check the eval script and found that now it can only eval the sim env dataset",
    "url": "https://github.com/huggingface/lerobot/issues/2428",
    "state": "open",
    "labels": [
      "question",
      "evaluation"
    ],
    "created_at": "2025-11-12T02:08:44Z",
    "updated_at": "2025-11-19T16:55:42Z",
    "user": "shs822"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28505,
    "title": "[Feature]: Is there a plan to introduce the new feature nano-pearl, a new engineering effort in speculative reasoning.",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nNano-pearl can support speculative inference with higher concurrency (larger batch sizes) and is seamlessly compatible with algorithms like Eagle. Is there a plan to introduce it?\ngithub\uff1ahttps://github.com/smart-lty/nano-PEARL\n\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28505",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-11-12T01:34:22Z",
    "updated_at": "2025-11-17T06:14:09Z",
    "comments": 1,
    "user": "Lexlum"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167596,
    "title": "[dynamo][feature] Guard on constants only if graph is specialized and not bytecode",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhen Dynamo creates guards, it specializes not just for Fx graph, but also for residual bytecode. For example, in the following codebase, the graph is same, but the `summary` update leads to a recompilation. This causes unnecessary compile time issues. Is it possible to create guards only for those constants that actually end up changing graph? And somehow replay the constant variable compute in the resulting bytecode.\n\n```\nimport torch\n\nsummary = {}\n\nclass SubMod(torch.nn.Module):\n    def __init__(self, name):\n        super().__init__()\n        self.name = name\n\n    @torch.compile(backend=\"eager\")\n    def forward(self, x):\n        out = torch.sin(x)\n        self.add_summary()\n        return out\n\n    def add_summary(self):\n        global summary\n        summary[self.name] = 0\n\nclass Mod(torch.nn.Module):\n    def __init__(self):\n        super().__init__()\n        self.mod_a = SubMod(\"mod_a\")\n        self.mod_b = SubMod(\"mod_b\")\n\n    def forward(self, x):\n        global summary\n        summary = {}\n        x = self.mod_a(x)\n        x = self.mod_b(x)\n        return x\n\nmod = Mod()\n\nx = torch.randn(4)\nmod(x)\nprint(summary)\n\nx = torch.randn(4)\nmod(x)\nprint(summary)\n\n```\n\n### Error logs\n\n_No response_\n\n### Versions\n\nNA\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @Lucaskabela",
    "url": "https://github.com/pytorch/pytorch/issues/167596",
    "state": "open",
    "labels": [
      "triaged",
      "enhancement",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2025-11-12T00:55:17Z",
    "updated_at": "2025-11-20T17:44:45Z",
    "comments": 2,
    "user": "anijain2305"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28498,
    "title": "[Bug][RL]: Port Conflict",
    "body": "### Your current environment\n\n- bug report:\n\n```\nHello vLLM team, I'm running into a suspicious ZMQ socket bug with my 2P 4D configuration for DeepSeek-V3 (see below). I thought it is caused by reusing same nodes for many vLLM launches, but now it happened also at a clean node. Seems like a DP bug of sorts. Please find logs attached. vllm==0.11.0.\n```\n\n```bash\n[1;36m(APIServer pid=670293)[0;0m   File \"XXX/.venv/lib/python3.12/site-packages/vllm/v1/engine/async_llm.py\", line 134, in __init__\n[1;36m(APIServer pid=670293)[0;0m     self.engine_core = EngineCoreClient.make_async_mp_client(\n[1;36m(APIServer pid=670293)[0;0m                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[1;36m(APIServer pid=670293)[0;0m   File \"XXX/.venv/lib/python3.12/site-packages/vllm/v1/engine/core_client.py\", line 101, in make_async_mp_client\n[1;36m(APIServer pid=670293)[0;0m     return DPLBAsyncMPClient(*client_args)\n[1;36m(APIServer pid=670293)[0;0m            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[1;36m(APIServer pid=670293)[0;0m   File \"XXX/.venv/lib/python3.12/site-packages/vllm/v1/engine/core_client.py\", line 1125, in __init__\n[1;36m(APIServer pid=670293)[0;0m     super().__init__(vllm_config, executor_class, log_stats,\n[1;36m(APIServer pid=670293)[0;0m   File \"XXX/.venv/lib/python3.12/site-packages/vllm/v1/engine/core_client.py\", line 975, in __init__\n[1;36m(APIServer pid=670293)[0;0m     super().__init__(vllm_config, executor_class, log_stats,\n[1;36m(APIServer pid=670293)[0;0m   File \"XXX/.venv/lib/python3.12/site-packages/vllm/v1/engine/core_client.py\", line 769, in __init__\n[1;36m(APIServer pid=670293)[0;0m     super().__init__(\n[1;36m(APIServer pid=670293)[0;0m   File \"XXX/.venv/lib/python3.12/site-packages/vllm/v1/engine/core_client.py\", line 466, in __init__\n[1;36m(APIServer pid=670293)[0;0m     self.resources.output_socket = make_zmq_socket(\n[1;36m(APIServer pid=670293)[0;0m                                    ^^^^^^^^^^^^^^^^\n[1;36m(APIServer pid=670293)[0;0m   File \"XXX/.venv/lib/python3.12/site-packages/vllm/utils/__init__.py\", line 2983, in make_zmq_socket\n[1;36m(APIServer pid=670293)[0;0m     socket.bind(path)\n[1;36m(APIServer pid=670293)[0;0m   File \"XXX/.venv/lib/python3.12/site-packages/zmq/sugar/socket.py\", line 320, in bind\n[1;36m(APIServer pid=670293)[0;0m     super().bind(addr)\n[1;36m(APIServer pid=670293)[0;0m   File \"zmq/backend/cython/_zmq.py\", line 1009, in zmq.backend.cython._zmq.Socket.bind\n[1;36m(APIServer pid=670293)[0;0m   File \"zmq/backend/cython/_zmq.py\", line 190, in zmq.backend.cython._zmq._check_rc\n[1;36m(APIServer pid=670293)[0;0m zmq.error.ZMQError: Address already in use (addr='tcp://slurm-h200-206-017:59251')\n```\n\n### \ud83d\udc1b Describe the bug\n\nFrom Nick:\n```\nI think the problem is that each DP worker finds/assigns free ports dynamically/independently.. so there is a race condtion. I'm not sure of an immediate workaround apart from just re-attempt to start things when this happens. We'll have to look at how to catch and re-find a port if possible (though I have a memory this might be nontrivial).\n```\n\nFrom Reporter:\n```\nReceived init message: EngineHandshakeMetadata(addresses=EngineZmqAddresses(inputs=['tcp://slurm-h200-207-083:60613'], outputs=['tcp://slurm-h200-207-083:36865'], coordinator_input='tcp://slurm-h200-207-083:34575', coordinator_output='tcp://slurm-h200-207-083:48025', frontend_stats_publish_address='ipc:///tmp/88ec875f-3de9-46ec-9947-6d1d6573b910'), parallel_config={'data_parallel_master_ip': 'slurm-h200-207-083', 'data_parallel_master_port': 41917, '_data_parallel_master_port_list': [60545, 36835, 47971, 37001], 'data_parallel_size': 32})\n```\n\nI'm looking at the code and I see that all code paths for getting ports eventually to go to _get_open_port, and that in _get_open_port there is basically no defence against choosing the same port twice. Can you please confirm my understanding?\n\n_get_open_port in main is here: https://github.com/vllm-project/vllm/blob/main/vllm/utils/network_utils.py#L177\n\nUPD: I imagine the assumption here is that once a code path gets a port, that code path will use it immediately, and thus the port will be come busy. It doesn't seem to hold though.\n\n\nEven where all sockets that vLLM chose for itself are unique, I get the stack trace below.\nI have the following explanation in mind:\n\n- vLLM chooses zmq ports before launching the engines\n- launching the engines takes ~5 mins\n- by the time the engines are launched, something can listen on this port, like for example Ray\n- **It looks the right solution is to hold on to then chosen ports immediately are they are chosen.**\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28498",
    "state": "open",
    "labels": [
      "bug",
      "help wanted",
      "good first issue"
    ],
    "created_at": "2025-11-11T22:51:35Z",
    "updated_at": "2025-12-04T07:35:31Z",
    "comments": 13,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28489,
    "title": "[Usage]: Online continuous batching",
    "body": "### Current environment\n\n```\n==============================\n        System Info\n==============================\nOS                           : macOS 26.1 (arm64)\nGCC version                  : Could not collect\nClang version                : 17.0.0 (clang-1700.4.4.1)\nCMake version                : Could not collect\nLibc version                 : N/A\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0\nIs debug build               : False\nCUDA used to build PyTorch   : None\nROCM used to build PyTorch   : N/A\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.6 (v3.12.6:a4a2d2b0d85, Sep  6 2024, 16:08:03) [Clang 13.0.0 (clang-1300.0.29.30)] (64-bit runtime)\nPython platform              : macOS-26.1-arm64-arm-64bit\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : False\nCUDA runtime version         : No CUDA\nCUDA_MODULE_LOADING set to   : N/A\nGPU models and configuration : No CUDA\nNvidia driver version        : No CUDA\ncuDNN version                : No CUDA\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n==============================\n          CPU Info\n==============================\nApple M2\n==============================\nVersions of relevant libraries\n==============================\n[pip3] numpy==2.2.6\n[pip3] nvidia-ml-py==13.580.82\n[pip3] pyzmq==27.0.0\n[pip3] sentence-transformers==5.1.2\n[pip3] spacy-transformers==1.3.9\n[pip3] torch==2.8.0\n[pip3] torchaudio==2.8.0\n[pip3] torchvision==0.23.0\n[pip3] transformers==4.57.1\n[conda] Could not collect\n==============================\n         vLLM Info\n==============================\nROCM Version                 : Could not collect\nvLLM Version                 : 0.11.0\nvLLM Build Flags:\n  CUDA Archs: Not Set; ROCm: Disabled\nGPU Topology:\n  Could not collect\n==============================\n     Environment Variables\n==============================\nPYTORCH_NVML_BASED_CUDA_CHECK=1\nTORCHINDUCTOR_COMPILE_THREADS=1\n\n```\n\nHello,\n\nI am looking to run an LLM (using vLLM) within a FastAPI application. My goal is to achieve online, continuous batching.\n\nI want the application to continuously receive requests from external clients, and have vLLM automatically batch them up for parallel inference.\n\nIn the past, I used the LLM() engine wrapped in RayServe. While this worked, it seemed to create a new internal deployment each time, which I want to avoid.\n\nI am now trying to achieve this without RayServe, using the AsyncLLMEngine directly (don't know If I need the async, read online).\n\nHere is an example of my current code. I'm running for test purposes on a cpu, but I have another issue on GPU (very long inference time, like minutes, with Ray, only 2-3 seconds).\n\n```\n# Model:\nengine_args = AsyncEngineArgs(\n      model=path,\n      tensor_parallel_size=1,\n      gpu_memory_utilization=0.7,\n      enforce_eager=False,\n      disable_custom_all_reduce=False,\n      max_model_len=2048,\n      trust_remote_code=True,\n      enable_log_requests=False,\n      max_num_seqs=10\n  )\n\nmodel_ = AsyncLLMEngine.from_engine_args(engine_args)\n\n# Params\nsampling_params = SamplingParams(\n                n=1,\n                best_of=None,\n                presence_penalty=0.0,\n                frequency_penalty=0.0,\n                temperature=0,\n                top_p=1.0,\n                top_k=1,\n                stop=my_stop_token,\n                stop_token_ids=[my_eos_token_id],\n                ignore_eos=False,\n                max_tokens=2048,\n                logprobs=None,\n                skip_special_tokens=True\n            )\n\noutputs_generator = model_.generate(prompt, sampling_params, request_id)\n\nfinal_output = None\nasync for request_output in outputs_generator:\n    if request_output.finished:\n        final_output = request_output\n        break\n\nif final_output and final_output.outputs:\n    result = final_output.outputs[0].text\n```\n\nIn my local test, I got the error when I try as example 3 inferences, calling 3 times self.model.generate() with 1 inputs and not 1 time self.model.generate() with 3 inputs.\nError: `Assertion failed: !_current_out (src/router.cpp:166)`\n\nIs it possible to achieve what I'm asking by always calling a generate() for internal batching, or the solution it's only by \"collecting\" the prompts with a management and then calling a centralized generate()?\nThanks\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28489",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-11T20:51:58Z",
    "updated_at": "2025-11-11T20:53:47Z",
    "comments": 0,
    "user": "GenVr"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167566,
    "title": "include string names of types in logs when dynamo guards on input types",
    "body": "When debugging recompile reasons in dynamo, it is convenient to look at a tlparse to understand what is causing recompiles.\n\nOne guard that dynamo has is a type_id guard, which guards on the id(type(x)) of an input. In the tlparse, when one these guards fails it shows up as this:\n\n<img width=\"576\" height=\"29\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/0fa8b67d-790c-47aa-ace9-c62ab82c4c18\" />\n\nThis is not very easy to interpret - it would be great if dynamo can stash the string name of the type so it can include it in the tlparse.\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @amjames @Lucaskabela @jataylo @chenyang78",
    "url": "https://github.com/pytorch/pytorch/issues/167566",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo",
      "module: compile ux"
    ],
    "created_at": "2025-11-11T19:11:14Z",
    "updated_at": "2025-12-10T17:14:27Z",
    "comments": 0,
    "user": "bdhirsh"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167560,
    "title": "naming of periodic-dynamo-benchmarks-cpu-test / test (cpu_inductor_amp_freezing_torchbench, 1, 2, linux.8xlarge.amx) seems wrong",
    "body": "Why is it a dynamo benchmark but also running cpu_inductor_amp_freezing ?\n\ncc @chauhang @penguinwu",
    "url": "https://github.com/pytorch/pytorch/issues/167560",
    "state": "open",
    "labels": [
      "triaged",
      "module: benchmark",
      "oncall: pt2"
    ],
    "created_at": "2025-11-11T18:20:30Z",
    "updated_at": "2025-11-17T16:51:51Z",
    "comments": 0,
    "user": "zou3519"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167558,
    "title": "per_page=1000 doesn't work in hud.pytorch.org",
    "body": "e.g. https://hud.pytorch.org/hud/pytorch/pytorch/main/31?per_page=50&mergeEphemeralLF=true\n\nWhatever I set it to, it seems to just be 50.\nMy use case is that I am trying to find the first date that a test began to fail. The test has been failing for weeks. I have to hit the next button a lot.\n\ncc @ZainRizvi @huydhn @clee2000",
    "url": "https://github.com/pytorch/pytorch/issues/167558",
    "state": "open",
    "labels": [
      "triaged",
      "module: devx"
    ],
    "created_at": "2025-11-11T18:06:21Z",
    "updated_at": "2025-11-11T19:30:25Z",
    "comments": 1,
    "user": "zou3519"
  },
  {
    "repo": "huggingface/trl",
    "number": 4507,
    "title": "Can a multimodal model like Gemma be trained in the same way as a text-only model like Qwen, but with the goal of improving only its text capabilities?",
    "body": "As stated in the title, I hope to improve only the text capabilities of Gemma 3, but it doesn\u2019t seem to have worked as expected. The model I used is gemma-3-4b-it, and I conducted the following simple tests:\n```python\n    dataset = Dataset.from_list(\n        [\n            {\"prompt\": \"What is 2+2?\", \"task\": \"math\"},\n            {\"prompt\": \"Write a function that returns the sum of two numbers.\", \"task\": \"code\"},\n            {\"prompt\": \"What is 3*4?\", \"task\": \"math\"},\n            {\"prompt\": \"Write a function that returns the product of two numbers.\", \"task\": \"code\"},\n        ]\n    )\n```\nThese data shouldn\u2019t cause Gemma to generate excessively long responses, but according to the logs, its output length is quite large: ```'completions/mean_length': 4096.0, 'completions/min_length': 4096.0, 'completions/max_length': 4096```\nThis doesn\u2019t seem normal.\n",
    "url": "https://github.com/huggingface/trl/issues/4507",
    "state": "open",
    "labels": [
      "\ud83d\udc1b bug",
      "\u23f3 needs more info"
    ],
    "created_at": "2025-11-11T15:59:51Z",
    "updated_at": "2025-11-21T05:58:50Z",
    "comments": 0,
    "user": "Tuziking"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28472,
    "title": "[Usage]: Will the reasoning_content in the chat template still be applied correctly after switching reasoning_content to reasoning",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nWill the message.reasoning_content for (which exists in default chat_template for qwen3-next-thinking qwen3-vl-thinking or other qwen3-thinking series or glm4.5 or kimi-k2-thinking or other models) in the chat template still be applied correctly after changing reasoning_content to reasoning (apply reasoning on ai message to reasoning_content on chat template)\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28472",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-11T15:04:11Z",
    "updated_at": "2025-11-13T06:25:29Z",
    "comments": 4,
    "user": "zhcn000000"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167540,
    "title": "[Dtensor]:change the test_mm shape from (12,8) * (8,16) to (512, 512) * (512, 512), throw assert error",
    "body": "### \ud83d\udc1b Describe the bug\n\nwhen I try to use (512, 512) * (512, 512) instead of the original shape in the testcase, it throw assert error.\n```python\n    @with_comms\n    def test_mm(self):\n        device_mesh = self.build_device_mesh()\n        shard0_spec = Shard(0)\n        shard1_spec = Shard(1)\n        replica_spec = Replicate()\n\n        t1 = torch.randn(512, 512, requires_grad=True)\n        t2 = torch.randn(512, 512, requires_grad=True)\n        local_res = torch.mm(t1, t2)\n\n        def test_placement_comb(\n            placements1: list[Placement], placements2: list[Placement]\n        ) -> None:\n            dt1 = distribute_tensor(t1, device_mesh, placements1)\n            dt2 = distribute_tensor(t2, device_mesh, placements2)\n            dist_res: DTensor = cast(DTensor, torch.mm(dt1, dt2)).redistribute(\n                device_mesh, [replica_spec]\n            )\n            self.assertEqual(dist_res.to_local(), local_res)\n            # backward\n            grad_dist_res = torch.ones_like(dist_res)\n            dist_res.backward(grad_dist_res)\n            self.assertIsNotNone(dt1.grad)\n\n        placement_specs = [shard0_spec, shard1_spec, replica_spec]\n        shard_specs_comb = list(itertools.product(placement_specs, placement_specs))\n        for spec in shard_specs_comb:\n            test_placement_comb([spec[0]], [spec[1]])\n```\n\nCUDA:12.8, driver 550.54.15\npytorch:2.9.0\n\n\n\n### Versions\n\nIs there anything  that needs to be supplemented.\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci @tianyu-l @XilunWu @SherlockNoMad",
    "url": "https://github.com/pytorch/pytorch/issues/167540",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "module: dtensor"
    ],
    "created_at": "2025-11-11T13:14:49Z",
    "updated_at": "2025-11-12T08:21:45Z",
    "comments": 2,
    "user": "zhanghanleo93"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28456,
    "title": "[Usage]: benchmark_moe Usage",
    "body": "### Your current environment\n\n```text\n(EngineCore_DP0 pid=7498) INFO 11-10 11:42:48 [shm_broadcast.py:466] No available shared memory broadcast block found in 60 seconds. This typically happens when some processes are hanging or doing some time-consuming work (e.g. compilation).\n(APIServer pid=7416) INFO 11-10 11:42:50 [loggers.py:127] Engine 000: Avg prompt throughput: 104162.6 tokens/s, Avg generation throughput: 10.0tokens/s, Running: 100 reqs, Waiting: 0 reqs, GPU KV cache usage: 10.1%, Prefix cache hit rate: 98.6%\n(APIServer pid=7416) INFO 11-10 11:43:00 [loggers.py:127] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 0.0 tokens/s, Running: 100 reqs, Waiting: 0 reqs, GPU KV cache usage: 10.1%, Prefix cache hit rate: 98.6%\n(APIServer pid=7416) INFO 11-10 11:43:20 [loggers.py:127] Engine 000: Avg prompt throughput: 5.1 tokens/s, Avg generation throughput: 0.1 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 98.6%\n\n\n\n\nCollecting environment information...==============================\n        System Info==============================\nOS                           : Ubuntu 24.04.3 LTS (x86_64)GCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collectCMake version                : version 3.28.3\nLibc version                 : glibc-2.39\n==============================       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128Is debug build               : False\nCUDA used to build PyTorch   : 12.8ROCM used to build PyTorch   : N/A\n==============================\n      Python Environment==============================\nPython version               : 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] (64-bit runtime)Python platform              : Linux-6.8.0-85-generic-x86_64-with-glibc2.39\n\n==============================       CUDA / GPU Info\n==============================Is CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration :\nGPU 0: Tesla V100-PCIE-16GB\nGPU 1: Tesla V100-PCIE-16GB\n\nNvidia driver version        : 570.195.03\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.8.0\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        43 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               24\nOn-line CPU(s) list:                  0-23\nVendor ID:                            AuthenticAMD\nModel name:                           AMD EPYC 7402P 24-Core Processor\nCPU family:                           23\nModel:                                49\nThread(s) per core:                   1\nCore(s) per socket:                   24\nSocket(s):                            1\nStepping:                             0\nFrequency boost:                      disabled\nCPU(s) scaling MHz:                   74%\nCPU max MHz:                          2800.0000\nCPU min MHz:                          1500.0000\nBogoMIPS:                             5599.64\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip rdpid overflow_recov succor smca sev sev_es\nVirtualization:                       AMD-V\nL1d cache:                            768 KiB (24 instances)\nL1i cache:                            768 KiB (24 instances)\nL2 cache:                             12 MiB (24 instances)\nL3 cache:                             1",
    "url": "https://github.com/vllm-project/vllm/issues/28456",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-11T09:22:33Z",
    "updated_at": "2025-11-21T01:43:41Z",
    "comments": 6,
    "user": "ekmekovski"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2422,
    "title": "Running inference on Libero with pi0",
    "body": "Hello, I am trying to run inference with pi0 but the commands referenced in this issue  #683 are outdated I believe. What would the commands be to run inference in Lerobot, and also running inference with pi0 in Libero? Additionally, if there is any documentation for these commands in general for fine-tuning and eval, that would be great!",
    "url": "https://github.com/huggingface/lerobot/issues/2422",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "evaluation"
    ],
    "created_at": "2025-11-11T09:22:25Z",
    "updated_at": "2025-11-19T16:53:27Z",
    "user": "thomasdeng2027"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167526,
    "title": "Missing documentation for CUTLASS backend",
    "body": "### \ud83d\udcda The doc issue\n\nThe release notes of PyTorch 2.8.0 report \n\n> Inductor CUTLASS backend support\n\nBut it is missing information on how to activate/use that.\n\nThere are multiple NVIDIA PYPI packages that are related: nvidia-cutlass, nvidia-cutlass-dsl  \nAnd there is the CUTLASS repository on GitHub included under the `third_party` submodule folder.\n\nFor PyTorch 2.9.0 the submodule points to the CUTLASS 4.1.0 tag, but there is no corresponding release of nvidia-cutlass on PYPI, but there is one for nvidia-cutlass-dsl.\n\nSimilar for PyTorch 2.8.0 it points to v3.9.2 but neither nvidia PYPI package has a corresponding release.\n\nThere is a message \"Please check whether _inductor.config.cuda.cutlass_dir [...] is set correctly\" but no information what that is supposed to. In the source then env variable `TORCHINDUCTOR_CUTLASS_DIR` can be found but that is nowhere mentioned in the docs either. See this 2 searches:\n\n- https://docs.pytorch.org/docs/stable/search.html?q=TORCHINDUCTOR_CUTLASS_DIR\n- https://docs.pytorch.org/docs/stable/search.html?q=_inductor.config.cuda.cutlass_dir\n\n### Suggest a potential alternative/fix\n\nAdd documentation how to use CUTLASS:\n- Requirements\n- Setup\n- Expected results/example/tutorial\n\ncc @svekars @sekyondaMeta @AlannaBurke @ptrblck @msaroufim @eqy @jerryzh168 @tinglvv",
    "url": "https://github.com/pytorch/pytorch/issues/167526",
    "state": "open",
    "labels": [
      "module: docs",
      "module: cuda",
      "triaged"
    ],
    "created_at": "2025-11-11T08:33:22Z",
    "updated_at": "2025-12-17T15:25:44Z",
    "comments": 1,
    "user": "Flamefire"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2421,
    "title": "Seeking assistance with tactile data acquisition",
    "body": "I want to simultaneously collect tactile and visual data, with tactile data sampled at 150 fps and visual data at 30 fps. Each time an image frame is saved, I also want to store all tactile data collected during that time interval as additional features associated with the image.\n\nWhat would be the best approach to implement this? Which parts of the source code should I modify?",
    "url": "https://github.com/huggingface/lerobot/issues/2421",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-11-11T02:49:57Z",
    "updated_at": "2025-11-19T16:53:05Z",
    "user": "zhoushaoxiang"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28438,
    "title": "[Usage]: How do I install vLLM nightly?",
    "body": "### Your current environment\n\nThe output of collect_env.py\n```text\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 20.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0\nClang version                : Could not collect\nCMake version                : version 3.16.3\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.5.1+cu121\nIs debug build               : False\nCUDA used to build PyTorch   : 12.1\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.10.18 (main, Jun  5 2025, 13:14:17) [GCC 11.2.0] (64-bit runtime)\nPython platform              : Linux-5.4.250-2-velinux1u1-amd64-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.4.131\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : \nGPU 0: NVIDIA A100-SXM4-80GB\nGPU 1: NVIDIA A100-SXM4-80GB\nGPU 2: NVIDIA A100-SXM4-80GB\nGPU 3: NVIDIA A100-SXM4-80GB\nGPU 4: NVIDIA A100-SXM4-80GB\nGPU 5: NVIDIA A100-SXM4-80GB\nGPU 6: NVIDIA A100-SXM4-80GB\nGPU 7: NVIDIA A100-SXM4-80GB\n\nNvidia driver version        : 535.129.03\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.7.0\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nByte Order:                      Little Endian\nAddress sizes:                   46 bits physical, 57 bits virtual\nCPU(s):                          112\nOn-line CPU(s) list:             0-108\nOff-line CPU(s) list:            109-111\nThread(s) per core:              1\nCore(s) per socket:              28\nSocket(s):                       2\nNUMA node(s):                    2\nVendor ID:                       GenuineIntel\nCPU family:                      6\nModel:                           106\nModel name:                      Intel(R) Xeon(R) Platinum 8336C CPU @ 2.30GHz\nStepping:                        6\nCPU MHz:                         2294.608\nBogoMIPS:                        4589.21\nHypervisor vendor:               KVM\nVirtualization type:             full\nL1d cache:                       1.3 MiB\nL1i cache:                       896 KiB\nL2 cache:                        35 MiB\nL3 cache:                        54 MiB\nNUMA node0 CPU(s):               0-55\nNUMA node1 CPU(s):               56-111\nVulnerability Itlb multihit:     Not affected\nVulnerability L1tf:              Not affected\nVulnerability Mds:               Not affected\nVulnerability Meltdown:          Not affected\nVulnerability Mmio stale data:   Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown\nVulnerability Retbleed:          Not affected\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:        Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence\nVulnerability Srbds:             Not affected\nVulnerability Tsx async abort:   Not affected\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves wbnoinvd arat avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq av",
    "url": "https://github.com/vllm-project/vllm/issues/28438",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-11T02:24:47Z",
    "updated_at": "2025-11-12T01:54:42Z",
    "comments": 2,
    "user": "LittleLucifer1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167499,
    "title": "check_compiler_is_gcc() fails to detect versioned GCC compilers (g++-13, g++-14, etc.)",
    "body": "### \ud83d\udc1b Describe the bug\n\n\ud83d\udc1b Describe the bug\n\nThe torch.utils.cpp_extension.check_compiler_is_gcc() function only returns True when the compiler basename is exactly 'c++', failing to detect other GCC variants like g++, gcc, g++-13, g++-14, etc.\n\nThis affects any PyTorch functionality that relies on GCC detection, causing features to be silently disabled or tests to be incorrectly skipped on systems using versioned GCC compilers.\n\nHow to reproduce:\n\nOn a system where the default C++ compiler is g++-13 (common on Fedora/RHEL):\n\n```python\nfrom torch.utils.cpp_extension import get_cxx_compiler, check_compiler_is_gcc\n\ncompiler = get_cxx_compiler()  # Returns /usr/bin/g++-13\nresult = check_compiler_is_gcc(compiler)\n\nprint(f\"Compiler: {compiler}\")\nprint(f\"Detected as GCC: {result}\")  # False (incorrect!)\n```\n\nExpected result: Detected as GCC: True\nActual result: Detected as GCC: False\n\nRoot cause:\n\nIn torch/utils/cpp_extension.py, the check_compiler_is_gcc() function only checks if the compiler basename is exactly 'c++':\n\n```python\ncompiler_path = os.path.realpath(results[0].strip())\nif os.path.basename(compiler_path) == 'c++' and 'gcc version' in version_string:\n    return True\nreturn False\n```\n\nImpact:\n- Any feature/test that uses check_compiler_is_gcc() will fail to detect GCC on systems with versioned compilers\n- GCC-specific optimizations or features may be silently disabled\n\nEnvironment:\n- PyTorch version: main/viable/strict\n- OS: Fedora/RHEL with versioned GCC\n- Compiler: g++-13, g++-14, or similar\n\nI am working on a PR to fix this issue.\n\n\n### Versions\n\nCollecting environment information...\nPyTorch version: N/A\nIs debug build: N/A\nCUDA used to build PyTorch: N/A\nROCM used to build PyTorch: N/A\n\nOS: CentOS Stream 9 (x86_64)\nGCC version: (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11)\nClang version: Could not collect\nCMake version: version 3.26.5\nLibc version: glibc-2.34\n\nPython version: 3.9.23 (main, Aug 19 2025, 00:00:00)  [GCC 11.5.0 20240719 (Red Hat 11.5.0-11)] (64-bit runtime)\nPython platform: Linux-5.14.0-615.el9.x86_64-x86_64-with-glibc2.34\nIs CUDA available: N/A\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: \nGPU 0: NVIDIA H200\nGPU 1: NVIDIA H200\nGPU 2: NVIDIA H200\nGPU 3: NVIDIA H200\nGPU 4: NVIDIA H200\nGPU 5: NVIDIA H200\nGPU 6: NVIDIA H200\nGPU 7: NVIDIA H200\n\nNvidia driver version: 580.82.07\ncuDNN version: Probably one of the following:\n/usr/lib64/libcudnn.so.9.13.0\n/usr/lib64/libcudnn_adv.so.9.13.0\n/usr/lib64/libcudnn_cnn.so.9.13.0\n/usr/lib64/libcudnn_engines_precompiled.so.9.13.0\n/usr/lib64/libcudnn_engines_runtime_compiled.so.9.13.0\n/usr/lib64/libcudnn_graph.so.9.13.0\n/usr/lib64/libcudnn_heuristic.so.9.13.0\n/usr/lib64/libcudnn_ops.so.9.13.0\nIs XPU available: N/A\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: N/A\n\nCPU:\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           46 bits physical, 57 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  160\nOn-line CPU(s) list:                     0-159\nVendor ID:                               GenuineIntel\nModel name:                              Intel Xeon Processor (SapphireRapids)\nCPU family:                              6\nModel:                                   143\nThread(s) per core:                      2\nCore(s) per socket:                      40\nSocket(s):                               2\nStepping:                                4\nBogoMIPS:                                4200.00\nFlags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd arat vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b fsrm md_clear serialize tsxldtrk amx_bf16 avx512_fp16 amx_tile amx_int8 arch_capabilities\nVirtualization:                          VT-x\nHypervisor vendor:                       KVM\nVirtualization type:                     full\nL1d cache:                               5 MiB (160 instances)\nL1i cache:                               5 MiB (160 instances)\nL2 cache:                                320 MiB (80 instances)\nL3 cache:                                32 MiB (2 instances)\nNUMA node(s):                            2",
    "url": "https://github.com/pytorch/pytorch/issues/167499",
    "state": "closed",
    "labels": [
      "module: cpp-extensions"
    ],
    "created_at": "2025-11-11T01:11:22Z",
    "updated_at": "2025-11-11T05:14:08Z",
    "comments": 0,
    "user": "razaaliraza"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28425,
    "title": "[Feature][RL]: Fix Fp8 Weight Loading for RL",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nFeedback from RL community that vLLM weight loading in fp8 is bad for RL\n- https://vllm-dev.slack.com/archives/C07UUL8E61Z/p1762811441757529\n\nThe cause is clear: in [fp8.py](https://github.com/vllm-project/vllm/blob/bf6a3d0ff5a69e0a30567f2ad417530c002eaa4e/vllm/model_executor/layers/quantization/fp8.py#L490) in process_weights_after_loading there is a lot of parameter wrapping that drops .weight_loader attribute. \n\nThere's a patch from the Moonshot team that fixes this issue and there's a [PR](https://github.com/vllm-project/vllm/pull/24488) with this patch that never got any comments. The [patch](https://github.com/MoonshotAI/checkpoint-engine/blob/main/patches/vllm_fp8.patch) only works on top of v0.10.2rc1. Shortly after that tag, this [PR](https://github.com/vllm-project/vllm/pull/23280) made fp8 weight updates even trickier by transposing weight_inv_scale  parameter for CUTLASS. \n\nI don't know how to patch any vLLM version after this PR to be able to call  model.load_weights  after the engine has started. It is a bummer, because DeepSeek wide EP inference is quite a bit faster in v0.11.0.\n\nWe need to fix this ASAP\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28425",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-11-10T21:59:02Z",
    "updated_at": "2025-11-10T23:25:37Z",
    "comments": 1,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167480,
    "title": "OS command injection via torch.utils.cpp_extension precompiled-header build (use_pch path)",
    "body": "**Summary**\nThere is an OS command injection risk in `torch/utils/cpp_extension.py` in the precompiled-header build helper. The helper constructs a compiler command including user-supplied values (e.g., `extra_cflags`, `extra_include_paths`) and executes the command via `subprocess.check_output(..., shell=True)`. If untrusted input reaches those parameters (for example, a service calling `load_inline(..., extra_cflags=..., use_pch=True)` with user-provided flags), an attacker can inject shell metacharacters and execute arbitrary commands as the Python process user.\n\nOriginal Thread : https://github.com/pytorch/pytorch/security/advisories/GHSA-gfrj-f355-6v3r#advisory-comment-139444\n\n**Affected versions**\n- Introduced in Aug 2023 (commit `5ed6047`, PR #106696).\n- Present in PyTorch releases starting with 2.1 and later main/nightly as of 2025.\n\n**Severity**\n- Meta Security and @malfet asked me to file me as general bug. Exact comment from Security Issue \n\n```\n _ @sumantro93 your example highlights the point I was trying to make: it's not framework's responsibility to sanitize the inputs.\n\nFor example, In the sample that you've shared, one is allowed to compile and run any untrusted code, which is a huge security issue on its own, so even if this issue is fixed, one is already allowed to execute arbitrary code on the host by the Flask endpoint developer.\n\nClosing, but please do not hesitate to report it as regular issue or propose a pull request that would sanitize the inputs _\n``` \n\n**Technical details & PoC**\n- The vulnerable pattern constructs a single command string and calls: `subprocess.check_output(cmd_string, shell=True, stderr=subprocess.STDOUT)`.\n- Proof-of-concept (local):\n```python\n# repro_pch_bug.py\nimport os, subprocess\ndef build_precompile_header(pch_cmd):\n    try:\n        subprocess.check_output(pch_cmd, shell=True, stderr=subprocess.STDOUT)\n    except subprocess.CalledProcessError as e:\n        print('Error:', e)\n\npayload = \"false; echo vulnerable > /tmp/pch_exploit\"\nbuild_precompile_header(payload)\nprint('Exploit file exists?', os.path.exists('/tmp/pch_exploit'))\n\n\ncc @janeyx99 @malfet",
    "url": "https://github.com/pytorch/pytorch/issues/167480",
    "state": "closed",
    "labels": [
      "module: cpp-extensions",
      "module: error checking",
      "triaged",
      "actionable"
    ],
    "created_at": "2025-11-10T20:36:14Z",
    "updated_at": "2025-11-11T07:27:44Z",
    "comments": 1,
    "user": "sumantro93"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1450,
    "title": "SmolVLM2 500M Video Instruct - Video inference",
    "body": "### Question\n\nHey, is it possible to setup **video** inference through **transformers.js** (may be somehow else?) for the model SmolVLM2 500M Video Instruct? I can't make it work, but I saw, that it is possible in py transformers.\n\nI want to create something similar to https://huggingface.co/spaces/HuggingFaceTB/SmolVLM2-HighlightGenerator/tree/main but with full local WebGPU inference.\n\nThanks in advance. cc: @xenova ",
    "url": "https://github.com/huggingface/transformers.js/issues/1450",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-11-10T19:51:07Z",
    "updated_at": "2025-11-12T07:46:32Z",
    "user": "youchi1"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28409,
    "title": "[Usage]: There is any performance benchmark between running vLLM server via docker image and python?",
    "body": "### Your current environment\n\n```text\n\nI mean, if I run a service with the vLLM docker image, it has any performance upgrade if comparing with running it as a python service (e.g., importing vllm package, setting up vllm inference, handling payload/responses, etc)?\n\n```\n\n\n### How would you like to use vllm\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28409",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-10T17:56:14Z",
    "updated_at": "2025-11-10T17:56:14Z",
    "comments": 0,
    "user": "rafaelsandroni"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167467,
    "title": "Tensor creation documentation: example code not consistent with its description",
    "body": "https://docs.pytorch.org/cppdocs/notes/tensor_creation.html#configuring-properties-of-the-tensor says \u201cHere is an example of creating a `TensorOptions` object that represents a **64-bit float**, strided tensor that requires a gradient, and lives on CUDA device 1\u201d, but then calls `.dtype(torch::kFloat32)`.\n\ncc @svekars @sekyondaMeta @AlannaBurke",
    "url": "https://github.com/pytorch/pytorch/issues/167467",
    "state": "open",
    "labels": [
      "module: docs",
      "triaged",
      "actionable"
    ],
    "created_at": "2025-11-10T15:00:11Z",
    "updated_at": "2025-11-10T21:04:17Z",
    "comments": 0,
    "user": "sboukortt"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28393,
    "title": "[Feature]: Does vllm-jax plan to support GPU acceleration?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nDoes vllm-jax plan to support GPU acceleration?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28393",
    "state": "closed",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-11-10T12:28:20Z",
    "updated_at": "2025-11-10T21:44:57Z",
    "comments": 2,
    "user": "south-ocean"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167459,
    "title": "Dynamic number of omp threads of torch.compile cache",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nIt looks like torch.compile hardcodes the number of omp threads in the cache. I can see things like `#pragma omp parallel num_threads(8)` in the cache. And if different number threads is used the performance is much worse. Is it possible to make it compatible for different number of threads? It's quite useful when running on HPC. Naively it sounds to be something very simple. Hopefully one just need to change `#pragma omp parallel num_threads(xxx)` to `#pragma omp parallel`?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @chauhang @penguinwu",
    "url": "https://github.com/pytorch/pytorch/issues/167459",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "oncall: cpu inductor"
    ],
    "created_at": "2025-11-10T10:24:23Z",
    "updated_at": "2025-12-22T19:49:32Z",
    "comments": 1,
    "user": "SUSYUSTC"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28388,
    "title": "[Bug]: \u65b0\u7248\u7684vllm\u5df2\u7ecf\u5e9f\u5f03\u4e86v0\u4ee3\u7801\uff0c\u800c\u5bf9qwen-omni\u7cfb\u5217\u7684\u6a21\u578b\u652f\u6301\u4ec5\u9650\u4e8ev0\uff0c\u4f3c\u4e4e\u662f\u56e0\u4e3a\u8fd9\u4e2a\u539f\u56e0\uff0c\u6211\u4eec\u65e0\u6cd5\u4f7f\u7528\u6700\u65b0\u7248\u7684vllm\u63a8\u7406qwen-omni\u6a21\u578b",
    "body": "### Your current environment\n\nName: vllm\nVersion: 0.10.2\n\n### \ud83d\udc1b Describe the bug\n\n\u4e0b\u9762\u7684\u5b98\u65b9\u6837\u4f8b\u4ee3\u7801\u4f3c\u4e4e\u662f\u65e0\u6cd5\u8fd0\u884c\u7684\uff0c\u4f1a\u5bf9\u5176\u4e2d\u7684\u97f3\u9891\u4f7f\u7528\u53c2\u6570\n\"mm_processor_kwargs\": {\n                \"use_audio_in_video\": True,\n            },\n\u8fdb\u884c\u62a5\u9519\uff1a\n```python\n# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: Copyright contributors to the vLLM project\n\"\"\"\nThis example shows how to use vLLM for running offline inference\nwith the correct prompt format on Qwen2.5-Omni (thinker only).\n\"\"\"\n\nfrom typing import NamedTuple\n\nimport vllm.envs as envs\nfrom vllm import LLM, SamplingParams\nfrom vllm.assets.audio import AudioAsset\nfrom vllm.assets.image import ImageAsset\nfrom vllm.assets.video import VideoAsset\nfrom vllm.multimodal.image import convert_image_mode\nfrom vllm.utils import FlexibleArgumentParser\n\n\nclass QueryResult(NamedTuple):\n    inputs: dict\n    limit_mm_per_prompt: dict[str, int]\n\n\n# NOTE: The default `max_num_seqs` and `max_model_len` may result in OOM on\n# lower-end GPUs.\n# Unless specified, these settings have been tested to work on a single L4.\n\ndefault_system = (\n    \"You are Qwen, a virtual human developed by the Qwen Team, Alibaba \"\n    \"Group, capable of perceiving auditory and visual inputs, as well as \"\n    \"generating text and speech.\"\n)\n\n\ndef get_mixed_modalities_query() -> QueryResult:\n    question = (\n        \"What is recited in the audio? \"\n        \"What is the content of this image? Why is this video funny?\"\n    )\n    prompt = (\n        f\"<|im_start|>system\\n{default_system}<|im_end|>\\n\"\n        \"<|im_start|>user\\n<|audio_bos|><|AUDIO|><|audio_eos|>\"\n        \"<|vision_bos|><|IMAGE|><|vision_eos|>\"\n        \"<|vision_bos|><|VIDEO|><|vision_eos|>\"\n        f\"{question}<|im_end|>\\n\"\n        f\"<|im_start|>assistant\\n\"\n    )\n    return QueryResult(\n        inputs={\n            \"prompt\": prompt,\n            \"multi_modal_data\": {\n                \"audio\": AudioAsset(\"mary_had_lamb\").audio_and_sample_rate,\n                \"image\": convert_image_mode(\n                    ImageAsset(\"cherry_blossom\").pil_image, \"RGB\"\n                ),\n                \"video\": VideoAsset(name=\"baby_reading\", num_frames=16).np_ndarrays,\n            },\n        },\n        limit_mm_per_prompt={\"audio\": 1, \"image\": 1, \"video\": 1},\n    )\n\n\ndef get_use_audio_in_video_query() -> QueryResult:\n    question = (\n        \"Describe the content of the video, then convert what the baby say into text.\"\n    )\n    prompt = (\n        f\"<|im_start|>system\\n{default_system}<|im_end|>\\n\"\n        \"<|im_start|>user\\n<|vision_bos|><|VIDEO|><|vision_eos|>\"\n        f\"{question}<|im_end|>\\n\"\n        f\"<|im_start|>assistant\\n\"\n    )\n    asset = VideoAsset(name=\"baby_reading\", num_frames=16)\n    audio = asset.get_audio(sampling_rate=16000)\n    assert not envs.VLLM_USE_V1, (\n        \"V1 does not support use_audio_in_video. \"\n        \"Please launch this example with \"\n        \"`VLLM_USE_V1=0`.\"\n    )\n    return QueryResult(\n        inputs={\n            \"prompt\": prompt,\n            \"multi_modal_data\": {\n                \"video\": asset.np_ndarrays,\n                \"audio\": audio,\n            },\n            \"mm_processor_kwargs\": {\n                \"use_audio_in_video\": True,\n            },\n        },\n        limit_mm_per_prompt={\"audio\": 1, \"video\": 1},\n    )\n\n\ndef get_multi_audios_query() -> QueryResult:\n    question = \"Are these two audio clips the same?\"\n    prompt = (\n        f\"<|im_start|>system\\n{default_system}<|im_end|>\\n\"\n        \"<|im_start|>user\\n<|audio_bos|><|AUDIO|><|audio_eos|>\"\n        \"<|audio_bos|><|AUDIO|><|audio_eos|>\"\n        f\"{question}<|im_end|>\\n\"\n        f\"<|im_start|>assistant\\n\"\n    )\n    return QueryResult(\n        inputs={\n            \"prompt\": prompt,\n            \"multi_modal_data\": {\n                \"audio\": [\n                    AudioAsset(\"winning_call\").audio_and_sample_rate,\n                    AudioAsset(\"mary_had_lamb\").audio_and_sample_rate,\n                ],\n            },\n        },\n        limit_mm_per_prompt={\n            \"audio\": 2,\n        },\n    )\n\n\nquery_map = {\n    \"mixed_modalities\": get_mixed_modalities_query,\n    \"use_audio_in_video\": get_use_audio_in_video_query,\n    \"multi_audios\": get_multi_audios_query,\n}\n\n\ndef main(args):\n    model_name = \"Qwen/Qwen2.5-Omni-7B\"\n    query_result = query_map[args.query_type]()\n\n    llm = LLM(\n        model=model_name,\n        max_model_len=5632,\n        max_num_seqs=5,\n        limit_mm_per_prompt=query_result.limit_mm_per_prompt,\n        seed=args.seed,\n    )\n\n    # We set temperature to 0.2 so that outputs can be different\n    # even when all prompts are identical when running batch inference.\n    sampling_params = SamplingParams(temperature=0.2, max_tokens=64)\n\n    outputs = llm.generate(query_result.inputs, sampling_params=sampling_params)\n\n    for o in outputs:\n        generated_text = o.outputs[0].text\n        print(generated_text)\n\n\ndef parse_args():\n    parser = FlexibleArgumentParser(\n        description=\"Demo on using vLLM for offline inference with \"\n        \"audio language models\"\n    )\n  ",
    "url": "https://github.com/vllm-project/vllm/issues/28388",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-10T09:23:33Z",
    "updated_at": "2025-11-16T05:51:42Z",
    "comments": 1,
    "user": "Lee-xeo"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3836,
    "title": "When using gradient accumulation, does the order of optimizer.zero_grad() affect training?",
    "body": "if I use accelerate+deepspeed to train a model, and I set \n`deepspeed_config:\n  gradient_accumulation_steps: 8\n  offload_optimizer_device: cpu\n  offload_param_device: cpu\n  zero3_init_flag: false\n  zero_stage: 2`\n\ndoes the order of the order of backward(), step(), zero_grad() affect training?\nFor example:\n`for batch in training_dataloader:\n    with accelerator.accumulate(model):\n        inputs, targets = batch\n        outputs = model(inputs)\n        loss = loss_function(outputs, targets)\n        accelerator.backward(loss)\n        optimizer.step()\n        scheduler.step()\n        optimizer.zero_grad()`\n\nand\n`for batch in training_dataloader:\n    with accelerator.accumulate(model):\n        optimizer.zero_grad()\n        inputs, targets = batch\n        outputs = model(inputs)\n        loss = loss_function(outputs, targets)\n        accelerator.backward(loss)\n        optimizer.step()\n        scheduler.step()\n        `\n\nI want to know whether the two situations will yield the same result. During gradient accumulation training, when the model needs to update the parameters and `accelerate.sync_gradients=True`, will using the second method clear the gradients, causing the gradient accumulation to be incorrect, so that at this point there is only one sample?",
    "url": "https://github.com/huggingface/accelerate/issues/3836",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-10T03:11:21Z",
    "updated_at": "2025-12-20T15:24:00Z",
    "comments": 3,
    "user": "polestarss"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42113,
    "title": "Add AutoMergeAdapters: Official Utility to Combine Multiple LoRA Adapters into One Unified Model",
    "body": "### Feature request\n\nIntroduce a new built-in class AutoMergeAdapters to the Transformers/PEFT ecosystem that enables users to merge multiple LoRA adapters trained on different domains or datasets into a single model.\n\nThis feature simplifies the process of creating multi-domain fine-tuned models for inference and deployment, without manual merging scripts\n\n### Motivation\n\nToday, users can fine-tune models with LoRA adapters easily using PEFT, but they face a major bottleneck when trying to combine more than one adapter.\n\nCurrent limitations:\n\nOnly one LoRA adapter can be merged using merge_and_unload()\n\nManual merges are error-prone and undocumented\n\nModel config alignment must be handled manually\n\nNo built-in CLI or user-friendly API for adapter composition\n\nA high-level API for multi-adapter merging would:\n\nPromote adapter reusability across domains\n\nSimplify deployment of multi-domain, multi-skill models\n\nReduce code duplication across community projects\n\n### Your contribution\n\nI would like to implement this feature and contribute the following:\n\nDevelop the AutoMergeAdapters class under src/transformers/adapters/auto_merge_adapters.py to support merging multiple LoRA adapters with optional weighted combination and compatibility validation.\n\nExtend transformers-cli by adding a new merge-adapters command for CLI-based merging and model export.\n\nAdd unit and integration tests in tests/adapters/test_auto_merge_adapters.py to ensure correctness for weighted merges, config mismatches, and adapter integrity.\n\nProvide documentation including a usage guide and a sample notebook under examples/adapters/merge_multiple_adapters.ipynb.\n\nPublish a demo merged model to the Hugging Face Hub for reproducibility and reference.\n\nOpen a clean, well-tested PR and iterate based on maintainer feedback.\n\nHappy to start implementation once the approach is approved. Looking forward to guidance if any adjustments are required.",
    "url": "https://github.com/huggingface/transformers/issues/42113",
    "state": "closed",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-11-09T18:43:20Z",
    "updated_at": "2025-11-10T16:58:34Z",
    "comments": 1,
    "user": "3015pavan"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 2008,
    "title": "On the TorchTitan Infrastructure Build-out (VLM)",
    "body": "In the past, I\u2019ve always trained models with the Lightning framework; now I\u2019d like to switch to a more efficient one (TorchTitan or Megatron). However, I\u2019ve run into a few questions and would appreciate your advice:\nCan I simply import the encoder part straight from Hugging Face Transformers? (In VLM, the encoder usually accounts for only a small fraction of the parameters, so in my view it doesn\u2019t need tensor-parallelism, etc.)",
    "url": "https://github.com/pytorch/torchtitan/issues/2008",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-11-09T15:03:35Z",
    "updated_at": "2025-11-10T09:56:00Z",
    "user": "Joluck"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42111,
    "title": "Add thinking-budget support (max_thinking_tokens) for reasoning-capable chat models",
    "body": "### Feature request\n\nA built-in way to cap how many tokens a reasoning model spends inside its ``<think> \u2026 </think>`` block. Today, we can only control the total response length via ``max_new_tokens``. No parameter limits the internal reasoning segment when ``enable_thinking=True``.\n\n### Motivation\n\n- Reasoning models (e.g., Qwen3 series) often produce very long thought blocks, which can blow past latency budgets before the final answer starts.\n- Users need a simple, model-agnostic control to bound that \u201cthinking\u201d cost without disabling reasoning entirely.\n- The Qwen docs (https://qwen.readthedocs.io/en/latest/getting_started/quickstart.html#thinking-budget) already describe a brute-force approach (two-step generation) to implement \u201cthinking budgets\u201d.\n\n### Your contribution\n\nI want to submit a PR that:\n\n- Extends ``GenerationConfig`` with:\n``max_thinking_tokens``: integer budget for reasoning tokens.\n``begin_thinking_token_id / end_thinking_token_id``: marker IDs so generation knows where the thinking span begins/ends.\n- Add a ``MaxThinkingTokensLogitsProcessor`` that watches the active ``<think>`` block. Once the budget is reached, it forces end_thinking_token_id, ensuring the model exits reasoning and continues with the final response.\n- Document the new parameter in reasoning-model guides (EXAONE, CWM, etc.) and show how to wire the thinking-token IDs until configs do it automatically.\n- Provide unit coverage so ``_get_logits_processor`` injects the new processor whenever the config is fully specified.",
    "url": "https://github.com/huggingface/transformers/issues/42111",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-11-09T10:09:11Z",
    "updated_at": "2025-11-09T10:09:11Z",
    "comments": 0,
    "user": "AndresAlgaba"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28362,
    "title": "[Usage]: Can't get vLLM to run on an Intel 125H with XPU and Arc graphics",
    "body": "### Your current environment\n\n```text\n\nCollecting environment information...                                                                                                                                                                                                                                                                                                                                                                                                  \n==============================                                                                                                                                                                                                                                                                                                                                                                                                         \n        System Info                                                                                                                                                                                                                                                                                                                                                                                                                    \n==============================                                                                                                                                                                                                                                                                                                                                                                                                         \nOS                           : Ubuntu 24.04.3 LTS (x86_64)                                                                                                                                                                                                                                                                                                                                                                             \nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0                                                                                                                                                                                                                                                                                                                                                                   \nClang version                : Could not collect                                                                                                                                                                                                                                                                                                                                                                                       \nCMake version                : version 4.1.2                                                                                                                                                                                                                                                                                                                                                                                           \nLibc version                 : glibc-2.39                                                                                                                                                                                                                                                                                                                                                                                              \n                                                                                                                                                                                                                   \n==============================                                                                                                    \n       PyTorch Info                                                                                                                                                                                                \n==============================                                                                                                                                                                                     \nPyTorch version              : 2.8.0+xpu                                                                                                                                                                           \nIs debug build               : False                                                                                                                                  ",
    "url": "https://github.com/vllm-project/vllm/issues/28362",
    "state": "open",
    "labels": [
      "usage",
      "intel-gpu"
    ],
    "created_at": "2025-11-09T09:45:05Z",
    "updated_at": "2025-11-12T00:19:39Z",
    "comments": 2,
    "user": "phlibi"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28350,
    "title": "[Doc]: Running VLLM via Docker Swarm With Support for Tensor Parallelism",
    "body": "### \ud83d\udcda Running VLLM via Docker Swarm With Support for Tensor Parallelism\n\nThere's no documentation that I have found outlining how to run VLLM in a docker swarm when utilizing tensor parallelism.  The  issue is that ```ipc=host``` is not an available option within docker swarm.  Consulting the AI feature on the VLLM website suggests to use the ```shm``` option which is available to swarm, but this produces continued failures on startup.\n\nPlease advise how to run VLLM via docker swarm utilizing tensor parallelism.  thx\n\n",
    "url": "https://github.com/vllm-project/vllm/issues/28350",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-11-08T21:11:15Z",
    "updated_at": "2025-11-19T16:37:31Z",
    "comments": 2,
    "user": "ep5000"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28348,
    "title": "[Usage]: Does vllm support max_pixels in prompt on Qwen3-VL reasoning?",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nI want to run inference of Qwen3-VL-A3B-Instruct, I tried to set max_pixels but it doesn't work.\n\nimport json\nimport base64\nimport requests\nimg_path = r\".\\images\\MMMU\\735_1.jpg\"\nbase64_str = base64.b64encode(open(img_path, 'rb').read()).decode()\nurl = \"http://71.10.29.136:8000/v1/chat/completions\"\npayload = json.dumps(\n    {\n        \"model\": \"qwen3-vl-30b\",\n        \"messages\": [\n            {\n                \"role\": \"system\",\n                \"content\": \"\"\n            },\n            {\n                \"role\": \"user\",\n                \"content\": [\n                    {\n                        \"type\": \"text\",\n                        \"text\": \"Question: \"\n                    },\n                    {\n                        \"type\": \"image_url\",\n                        \"image_url\": {\n                            \"url\": f\"data:image/jpg;base64,{base64_str}\"\n                        },\n                        \"max_pixels\": 192 * 96           ## this is not work....  ##\n                    },\n                    {\n                        \"type\": \"text\",\n                        \"text\": \" How does the green and photosynthesising mistletoe impact the tree it is hosting? Options:\\\\nA. It will grow down into the roots and kill the tree.\\\\nB. Mistletoe is beneficial and increases the growth of the plant.\\\\nC. It just uses the tree for support and does not damage it.\\\\nD. I don't know and don't want to guess.\\\\nE. It has a very damaging impact on the health of the plant but localised to the place of infection.\\\\n Please select the correct answer from the options above. \\\\n Only answer with the option letter, e.g. A, B, C, D, E, F, G, H, I. *DO NOT output any other information*. \\\\n\"\n                    }\n                ]\n            }\n        ],\n        \"n\": 1,\n        \"top_p\": 0.001,\n        \"top_k\": 1,\n        \"temperature\": 0.01,\n        \"max_tokens\": 8192\n    }\n)\n\nheaders = {\n    'Content-Type': 'application/json',\n    'Authorization': 'Bearer EMPTY'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\nprint(response.text)\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28348",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-08T16:06:07Z",
    "updated_at": "2025-11-08T16:56:17Z",
    "comments": 1,
    "user": "leijie-ww"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167412,
    "title": "How can I train in C++ using a Pytorch torchscript model",
    "body": "### \ud83d\udc1b Describe the bug\n\ndd\n\n### Versions\n\nI trained a model in the PyTorch, and then saved it to Torchscript format using torch.jit.save.\nNow, I want to retrain on this model. I have a question about whether the torchscript model can be used for training.\n\n I have a few different questions about how to train the Torchscript model in C++.\nI want to use a trained model for fine tuning. I generated the Torchscript model in pytorch. In C++ API, I load the model using torch::jit::load function. And then I want to retrain the model.\nIn my code:\ntorch::jit::script::Module m_model = torch::jit::load(m_modulePath);\ntorch::optim::SGD optimizer(m_model.parameters(), SGDoptions);\n\nWhen I set up the optimizer, I was told that the first parameter was incorrect.\n\ncc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel",
    "url": "https://github.com/pytorch/pytorch/issues/167412",
    "state": "open",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2025-11-08T13:11:14Z",
    "updated_at": "2025-11-10T19:11:24Z",
    "comments": 1,
    "user": "mullerhai"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28344,
    "title": "[Usage]: Function calling Request's sampling_params.structured_outputs is None?",
    "body": "\n\nHi, I used openai server API to build a LLM backend when I tried to deploy a MCP server. I discovered that the prompt of vllm engine combined system prompt, tool lists and user prompt. but i saw sampling_params.structured_outputs is None. Although the result seemed correct\uff0c I think it's important to use structured output when generating function calling.But why not use structured output when generate JSON? Please explain\uff0cthanks a lot.\n\nBelow start a vllm backend.\n```\npython -m vllm.entrypoints.openai.api_server \\\n  --model /workspace/models/qwen-2.5B/models--Qwen--Qwen2.5-1.5B-Instruct/snapshots/989aa7980e4cf806f80c7fef2b1adb7bc71aa306/ \\\n  --served-model-name \"qwen-2.5b\" \\\n  --port 8000 \\\n  --trust-remote-code \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser hermes\n```\n\nBelow is input of vllm engine.\n```\n(APIServer pid=703600) > /workspace/vllm/vllm/entrypoints/openai/serving_chat.py(326)create_chat_completion()\n(APIServer pid=703600) -> generator = self.engine_client.generate(\n(APIServer pid=703600) ['<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\\n{\"type\": \"function\", \"function\": {\"name\": \"weather\", \"description\": \"\u57ce\u5e02\u5929\u6c14\u67e5\u8be2\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city\": {\"type\": \"string\"}}, \"required\": [\"city\"]}}}\\n{\"type\": \"function\", \"function\": {\"name\": \"stock\", \"description\": \"\u80a1\u7968\u4ef7\u683c\u67e5\u8be2\", \"parameters\": {\"type\": \"object\", \"properties\": {\"code\": {\"type\": \"string\"}}, \"required\": [\"code\"]}}}\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\\n</tool_call><|im_end|>\\n<|im_start|>user\\n\u67e5\u8be2\u5317\u4eac\u5929\u6c14\u548c\u8d35\u5dde\u8305\u53f0\u80a1\u4ef7<|im_end|>\\n<|im_start|>assistant\\n']\n(Pdb) sampling_params.structured_outputs\n(Pdb) sampling_params\n(APIServer pid=703600) SamplingParams(n=1, presence_penalty=0.0, frequency_penalty=0.0, repetition_penalty=1.1, temperature=0.7, top_p=0.8, top_k=20, min_p=0.0, seed=None, stop=[], stop_token_ids=[], bad_words=[], include_stop_str_in_output=False, ignore_eos=False, max_tokens=32549, min_tokens=0, logprobs=None, prompt_logprobs=None, skip_special_tokens=False, spaces_between_special_tokens=True, truncate_prompt_tokens=None, **structured_outputs=None,** extra_args=None)\n```\nBelow is output of vllm engine.\n```\n(APIServer pid=703600) > /workspace/vllm/vllm/entrypoints/openai/serving_chat.py(1290)chat_completion_full_generator()\n(APIServer pid=703600) -> async for res in result_generator:\n(Pdb) final_res\n(APIServer pid=703600) RequestOutput(request_id=chatcmpl-573ea011c8894432bf8aa9d1468cae60, prompt='<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\\n{\"type\": \"function\", \"function\": {\"name\": \"weather\", \"description\": \"\u57ce\u5e02\u5929\u6c14\u67e5\u8be2\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city\": {\"type\": \"string\"}}, \"required\": [\"city\"]}}}\\n{\"type\": \"function\", \"function\": {\"name\": \"stock\", \"description\": \"\u80a1\u7968\u4ef7\u683c\u67e5\u8be2\", \"parameters\": {\"type\": \"object\", \"properties\": {\"code\": {\"type\": \"string\"}}, \"required\": [\"code\"]}}}\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\\n</tool_call><|im_end|>\\n<|im_start|>user\\n\u67e5\u8be2\u5317\u4eac\u5929\u6c14\u548c\u8d35\u5dde\u8305\u53f0\u80a1\u4ef7<|im_end|>\\n<|im_start|>assistant\\n', prompt_token_ids=[151644, 8948, 198, 2610, 525, 1207, 16948, 11, 3465, 553, 54364, 14817, 13, 1446, 525, 264, 10950, 17847, 382, 2, 13852, 271, 2610, 1231, 1618, 825, 476, 803, 5746, 311, 7789, 448, 279, 1196, 3239, 382, 2610, 525, 3897, 448, 729, 32628, 2878, 366, 15918, 1472, 15918, 29, 11874, 9492, 510, 27, 15918, 397, 4913, 1313, 788, 330, 1688, 497, 330, 1688, 788, 5212, 606, 788, 330, 15206, 497, 330, 4684, 788, 330, 99490, 104307, 51154, 497, 330, 13786, 788, 5212, 1313, 788, 330, 1700, 497, 330, 13193, 788, 5212, 8926, 788, 5212, 1313, 788, 330, 917, 9207, 2137, 330, 6279, 788, 4383, 8926, 1341, 3417, 532, 4913, 1313, 788, 330, 1688, 497, 330, 1688, 788, 5212, 606, 788, 330, 13479, 497, 330, 4684, 788, 330, 104023, 97480, 51154, 497, 330, 13786, 788, 5212, 1313, 788, 330, 1700, 497, 330, 13193, 788, 5212, 1851, 788, 5212, 1313, 788, 330, 917, 9207, 2137, 330, 6279, 788, 4383, 1851, 1341, 3417, 532, 522, 15918, 1339, 2461, 1817, 729, 1618, 11, 470, 264, 2951, 1633, 448, 729, 829, 323, 5977, 2878, 220, 151657, 151658, 11874, 9492, 510, 151657, 198, 4913, 606, 788, 366, 1688, 11494, 8066, 330, 16370, 788, 366, 2116, 56080, 40432, 31296, 151658, 151645, 198, 151644, 872, 198, 51154, 68990, 104307, 33108, 102345, 109625, 105281, 151645, 198, 151644, 77091",
    "url": "https://github.com/vllm-project/vllm/issues/28344",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-08T08:57:17Z",
    "updated_at": "2025-11-10T07:51:51Z",
    "comments": 5,
    "user": "wtr0504"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28340,
    "title": "[Installation]: Need offline wheel for vLLM 0.11.0rc2 (pip download fails) to deploy qwen3_vl_235b_a22b_instruct_i18n",
    "body": "### Your current environment\n\nI need to install vLLM 0.11.0rc2 in an offline environment.\nIs there an official wheel (.whl) available for vLLM==0.11.0rc2 that I can download directly?\n\nRunning:\n```\npip download vllm==0.11.0rc2 --pre --extra-index-url https://wheels.vllm.ai/nightly -d wheels\n```\nfails with an error: \n\nLooking in indexes: https://bytedpypi.byted.org/simple/, https://wheels.vllm.ai/nightly\nERROR: Ignored the following yanked versions: 0.2.1\nERROR: Could not find a version that satisfies the requirement vllm==0.11.0rc2 (from versions: 0.0.1, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.2.0, 0.2.1.post1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.4.0, 0.4.0.post1, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.5.0.post1, 0.5.1, 0.5.2, 0.5.3, 0.5.3.post1, 0.5.4, 0.5.5, 0.6.0, 0.6.1, 0.6.1.post1, 0.6.1.post2, 0.6.2, 0.6.3, 0.6.3.post1, 0.6.4, 0.6.4.post1, 0.6.5, 0.6.6, 0.6.6.post1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.5.post1, 0.9.0, 0.9.0.1, 0.9.1, 0.9.2, 0.10.0, 0.10.1, 0.10.1.1, 0.10.2, 0.11.0, 0.11.1rc6.dev210+g70af44fd1.cu129)\nERROR: No matching distribution found for vllm==0.11.0rc2.\n\n### How you are installing vllm\n\n```sh\npip download vllm==0.11.0rc2 --pre --extra-index-url https://wheels.vllm.ai/nightly -d wheels\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28340",
    "state": "closed",
    "labels": [
      "installation"
    ],
    "created_at": "2025-11-08T06:05:31Z",
    "updated_at": "2025-11-08T06:08:37Z",
    "comments": 0,
    "user": "FateForever0222"
  },
  {
    "repo": "pytorch/ao",
    "number": 3314,
    "title": "Loading 8bit optimizer state from checkpoint causes dtype mismatch",
    "body": "We are using torch2.8. Optimizer states are quantized to [8bit](https://github.com/pytorch/ao/blob/main/torchao/optim/subclass_8bit.py). Normal training jobs are fine, but jobs that resume from checkpoint fail at `optimizer.step()`. We use AdamW optimizer copied from some older version of torch/torchao, where computation is done at fp32 precision:\n```\nexp_avg_f32 = exp_avg.float().lerp(grad_f32, 1 - beta1)\n```\n\nThis fails with error that indicates `exp_avg.float()` is somehow bf16. \n```\ntorch._dynamo.exc.TorchRuntimeError: Dynamo failed to run FX node with fake tensors: call_method lerp(*(DTensor(local_tensor=OptimState8bit(signed=True, block_size=256, shape=(1408, 2048), device=cuda:0, requires_grad=False), device_mesh=DeviceMesh('cuda', [0], mesh_dim_names=('fsdp_cp',)), placements=(Shard(dim=0),)), DTensor(local_tensor=FakeTensor(..., device='cuda:0', size=(1408, 2048)), device_mesh=DeviceMesh('cuda', [0], mesh_dim_names=('fsdp_cp',)), placements=(Shard(dim=0),)), 0.09999999999999998), **{}): got RuntimeError('expected dtype torch.bfloat16 for `end`, but got dtype torch.float32')\n\nfrom user code:\n   File \"/traindata/yunfan/lotus/lotus/components/optim/adamw.py\", line 165, in single_param_adam\n    exp_avg_f32 = exp_avg_f32.lerp(grad_f32, 1 - beta1)\n```\n\nThe casting in load_state_dict() is suspicious that it converts state values like exp_avg to bf16 to match model weights' precision. So I tried to make both `DTensor` wrapper and `OptimState8bit` local tensor converted to fp32 if they appear to be bf16 after checkpoint loading, and added assert statement before `lerp()` to make sure `exp_avg.float()`'s dtype is fp32. But these efforts don't help. It seems somewhere in DTensor operation bf16 is enforced without triggering the assert statement. Can I get help on understanding the behavior and making correct fix? Thanks in advance!\n\nBelow is more detailed stacktrace:\n```\nTraceback (most recent call last):\n  File \"/traindata/yunfan/lotus/lotus/grpo.py\", line 1051, in <module>\n    recipe_main()\n  File \"/traindata/yunfan/lotus/lotus/utils/config.py\", line 184, in wrapper\n    recipe_main(conf)\n  File \"/traindata/yunfan/lotus/lotus/grpo.py\", line 1046, in recipe_main\n    recipe.train()\n  File \"/traindata/yunfan/lotus/lotus/grpo.py\", line 813, in train\n    step_output = self.train_step(\n                  ^^^^^^^^^^^^^^^^\n  File \"/traindata/yunfan/lotus/lotus/grpo.py\", line 694, in train_step\n    self._optimizer.step()\n  File \"/traindata/yunfan/lotus/.venv/lib/python3.12/site-packages/torch/optim/lr_scheduler.py\", line 133, in wrapper\n    return func.__get__(opt, opt.__class__)(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/traindata/yunfan/lotus/.venv/lib/python3.12/site-packages/torch/optim/optimizer.py\", line 516, in wrapper\n    out = func(*args, **kwargs)\n          ^^^^^^^^^^^^^^^^^^^^^\n  File \"/traindata/yunfan/lotus/.venv/lib/python3.12/site-packages/torch/utils/_contextlib.py\", line 120, in decorate_context\n    return func(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^\n  File \"/traindata/yunfan/lotus/lotus/components/optim/adamw.py\", line 166, in step\n    adamw8bit_step_helper(self, self.param_groups, self._new_buffer, self.bf16_stochastic_round, self.is_adamw)\n  File \"/traindata/yunfan/lotus/lotus/components/optim/adamw.py\", line 280, in adamw8bit_step_helper\n    single_param_adam(\n  File \"/traindata/yunfan/lotus/lotus/components/optim/adamw.py\", line 208, in single_param_adam\n    exp_avg_f32 = exp_avg_float.lerp(grad_f32, 1 - beta1)\n                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/traindata/yunfan/lotus/.venv/lib/python3.12/site-packages/torch/_compile.py\", line 53, in inner\n    return disable_fn(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/traindata/yunfan/lotus/.venv/lib/python3.12/site-packages/torch/_dynamo/eval_frame.py\", line 929, in _fn\n    return fn(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/traindata/yunfan/lotus/.venv/lib/python3.12/site-packages/torch/distributed/tensor/_api.py\", line 350, in __torch_dispatch__\n    return DTensor._op_dispatcher.dispatch(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/traindata/yunfan/lotus/.venv/lib/python3.12/site-packages/torch/distributed/tensor/_dispatch.py\", line 154, in dispatch\n    self.sharding_propagator.propagate(op_info)\n  File \"/traindata/yunfan/lotus/.venv/lib/python3.12/site-packages/torch/distributed/tensor/_sharding_prop.py\", line 266, in propagate\n    OutputSharding, self.propagate_op_sharding(op_info.schema)\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/traindata/yunfan/lotus/.venv/lib/python3.12/site-packages/torch/distributed/tensor/_sharding_prop.py\", line 45, in __call__\n    return self.cache(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/traindata/yunfan/lotus/.venv/lib/python3.12/site-packages/torch/distributed/tensor/_sharding_prop.py\", line 279, in propagate_op_sharding_non_cached\n    out_tensor",
    "url": "https://github.com/pytorch/ao/issues/3314",
    "state": "open",
    "labels": [
      "optimizer",
      "triaged"
    ],
    "created_at": "2025-11-08T00:27:00Z",
    "updated_at": "2025-12-05T01:12:07Z",
    "comments": 6,
    "user": "yz-ppl"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167369,
    "title": "Dynamo fails to trace repr",
    "body": "### \ud83d\udc1b Describe the bug\n\n```python\nimport torch\nimport torch.nn as nn\n\n\nclass Config:\n    def __repr__(self):\n        return \"Config()\"\n\n\ndef forward(x, config):\n    # Calling repr() on non-constant user object\n    # This triggers the bug without the fix\n    return x * len(repr(config))\n\n\nconfig = Config()\nx = torch.randn(2, 2)\n\ncompiled = torch.compile(forward, fullgraph=True)\n```\n\nErrors with:\n```\nUnsupported: Failed to trace builtin operator\n  Explanation: Dynamo does not know how to trace builtin operator `repr` with argument types ['Config'] (has_kwargs False)\n  Hint: Avoid calling builtin `repr` with argument types ['Config']. Consider using an equivalent alternative function/method to `repr`.\n  Hint: If you are attempting to call a logging function (e.g. `print`), you can try adding it to `torch._dynamo.config.reorderable_logging_functions`.\n  Hint: Please report an issue to PyTorch.\n\n  Developer debug context: builtin repr [<class 'torch._dynamo.variables.user_defined.UserDefinedObjectVariable'>] False\n```\n\n### Versions\n\nmain\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @Lucaskabela",
    "url": "https://github.com/pytorch/pytorch/issues/167369",
    "state": "closed",
    "labels": [
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2025-11-07T22:02:51Z",
    "updated_at": "2025-11-10T21:06:41Z",
    "comments": 0,
    "user": "tugsbayasgalan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167344,
    "title": "UnboundLocalError: cannot access local variable 'tracer_output' where it is not a ssociated with a value",
    "body": "(Worker_TP1 pid=243560) ERROR 11-07 10:44:16 [multiproc_executor.py:699]     if tracer_output:\n(Worker_TP1 pid=243560) ERROR 11-07 10:44:16 [multiproc_executor.py:699]        ^^^^^^^^^^^^^\n(Worker_TP1 pid=243560) ERROR 11-07 10:44:16 [multiproc_executor.py:699] UnboundLocalError: cannot access local variable 'tracer_output' where it is not associated with a value\n\nOnly in 2.9.0. Can we fix for 2.9.1?\n\nhttps://github.com/pytorch/pytorch/blame/release/2.9/torch/_dynamo/convert_frame.py#L1473\n\ncc @chauhang @penguinwu",
    "url": "https://github.com/pytorch/pytorch/issues/167344",
    "state": "closed",
    "labels": [
      "oncall: pt2"
    ],
    "created_at": "2025-11-07T18:48:42Z",
    "updated_at": "2025-11-07T22:31:29Z",
    "user": "zou3519"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28310,
    "title": "[Doc]: Update GPU requirements to include AMD gfx1150/gfx1151",
    "body": "### \ud83d\udcda The doc issue\n\nSummary: The documentation for GPU requirements does not list AMD gfx1150 and gfx1151 architectures, which are now supported.\n\nBackground: Support for AMD gfx1150 and gfx1151 GPUs was added in https://github.com/vllm-project/vllm/pull/25908. The GPU requirements page should be updated to reflect this.\n\nAffected page: https://docs.vllm.ai/en/latest/getting_started/installation/gpu/index.html#requirements\n\nExpected behavior: The GPU requirements page lists AMD gfx1150 and gfx1151 as supported architectures.\n\n\n\n### Suggest a potential alternative/fix\n\nProposed fix: https://github.com/vllm-project/vllm/pull/28308\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28310",
    "state": "closed",
    "labels": [
      "documentation",
      "rocm"
    ],
    "created_at": "2025-11-07T17:26:47Z",
    "updated_at": "2025-11-08T03:01:08Z",
    "comments": 1,
    "user": "hammmmy"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167331,
    "title": "[TEST FAILURE UT] TestForeachCUDA.test_foreach_copy_with_multi_dtypes_large_input_cuda fails",
    "body": "**TDLR** for_each test fails when ran with: \n`TEST_CONFIG=default python3 test/run_test.py --verbose --keep-going -i test_foreach`\n\nAdding  @serialTest() decorator to the test function `test_foreach_copy_with_multi_dtypes_large_input` fixes this issue.\n\n```\n_____ TestForeachCUDA.test_foreach_copy_with_multi_dtypes_large_input_cuda _____\nTraceback (most recent call last):\n  File \"/pytorch/torch/testing/_comparison.py\", line 1289, in not_close_error_metas\n    pair.compare()\n  File \"/pytorch/torch/testing/_comparison.py\", line 740, in compare\n    self._compare_values(actual, expected)\n  File \"/pytorch/torch/testing/_comparison.py\", line 898, in _compare_values\n    compare_fn(\n  File \"/pytorch/torch/testing/_comparison.py\", line 1077, in _compare_regular_values_close\n    matches = torch.isclose(\ntorch.OutOfMemoryError: CUDA out of memory. Tried to allocate 8.00 GiB. GPU 0 has a total capacity of 139.80 GiB of which 94.40 GiB is free. Process 32188 has 518.00 MiB memory in use. Process 32189 has 518.00 MiB memory in use. Process 32190 has 518.00 MiB memory in use. Including non-PyTorch memory, this process has 39.76 GiB memory in use. Process 33858 has 518.00 MiB memory in use. Process 33860 has 518.00 MiB memory in use. Process 33859 has 518.00 MiB memory in use. Process 34062 has 520.00 MiB memory in use. Process 35455 has 518.00 MiB memory in use. Process 35453 has 518.00 MiB memory in use. Process 35454 has 518.00 MiB memory in use. Process 35670 has 520.00 MiB memory in use. 46.13 GiB allowed; Of the allocated memory 39.00 GiB is allocated by PyTorch, and 12.00 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"/pytorch/test/test_foreach.py\", line 1376, in test_foreach_copy_with_multi_dtypes_large_input\n    self.assertEqual(self_tensor, ref_out)\n  File \"/pytorch/torch/testing/_internal/common_utils.py\", line 4139, in assertEqual\n    error_metas = not_close_error_metas(\n  File \"/pytorch/torch/testing/_comparison.py\", line 1295, in not_close_error_metas\n    raise RuntimeError(\nRuntimeError: Comparing\n\nTensorOrArrayPair(\n    id=(),\n    actual=tensor([1., 1., 1.,  ..., 1., 1., 1.], device='cuda:0'),\n    expected=tensor([1., 1., 1.,  ..., 1., 1., 1.], device='cuda:0'),\n    rtol=1.3e-06,\n    atol=1e-05,\n    equal_nan=True,\n    check_device=False,\n    check_dtype=True,\n    check_layout=False,\n    check_stride=False,\n)\n\nresulted in the unexpected exception above. If you are a user and see this message during normal operation please file an issue at https://github.com/pytorch/pytorch/issues. If you are a developer and working on the comparison functions, please except the previous error and raise an expressive `ErrorMeta` instead.\n\nTo execute this test, run the following from the base repo dir:\n    python test/test_foreach.py TestForeachCUDA.test_foreach_copy_with_multi_dtypes_large_input_cuda\n\nThis message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0\n```\n\n\nI can send a pr if that is okay.\n\ncc @crcrpar @mcarilli @janeyx99",
    "url": "https://github.com/pytorch/pytorch/issues/167331",
    "state": "open",
    "labels": [
      "triaged",
      "actionable",
      "module: mta"
    ],
    "created_at": "2025-11-07T17:09:56Z",
    "updated_at": "2025-11-07T17:16:33Z",
    "comments": 2,
    "user": "arkadip-maitra"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42093,
    "title": "Mbart decoder ignoring index 0 from labels | index 1 from dec in",
    "body": "### System Info\n\nI am creating a ocr model using VisionEncoderDecoderModel class by connecting plm vision tower and donut base decoder (mbart model). \n\nI am using teacher forcing method to train the model ( default training  and i found out that the model is ignoring index 0 from the target ( index 1 from the decoder_input_ids ). \n\nI read the documentation for mbart and it says lang_code should be the bos for the target labels. but unlike the traditional methods where mbart used for translation task im using it for image - text task. \n\nand when i use the Seq2SeqTrainer to train the model i notice that the model is skipping is index 0 no matter what token is present there. \n\nI made my trainer to print the labels, dec in ( my own shift right just to display ) and pred. this is how it looks: \n\n```python\nlabel: [985, 735, 8, 690, 28264, 1448, 15320, 8, 4467, 18823, 258, 30606, 5965, 2164, 451, 8, 4467, 18823, 35, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100]\ndecin: [2, 985, 735, 8, 690, 28264, 1448, 15320, 8, 4467, 18823, 258, 30606, 5965, 2164, 451, 8, 4467, 18823, 35, 2, 1, 1, 1, 1, 1, 1, 1, 1]\npreds: [735, 8, 690, 28264, 1448, 15320, 8, 4467, 18823, 258, 30606, 5965, 2164, 451, 8, 4467, 18823, 35, 2, 4467, 2, 2, 2, 185, 2, 2, 2, 2]\n\n\nlabel: [15418, 417, 893, 7271, 12, 8, 6583, 13, 46, 6549, 5538, 3632, 388, 8, 3633, 11, 34, 5221, 8, 188, 28, 2234, 8, 22, 11, 8, 26, 8340, 2]\ndecin: [2, 15418, 417, 893, 7271, 12, 8, 6583, 13, 46, 6549, 5538, 3632, 388, 8, 3633, 11, 34, 5221, 8, 188, 28, 2234, 8, 22, 11, 8, 26, 8340]\npreds: [417, 893, 7271, 12, 8, 6583, 13, 46, 6549, 5538, 3632, 388, 8, 3633, 11, 34, 5221, 8, 188, 28, 2234, 8, 22, 11, 8, 26, 8340, 2]\n\n\nlabel: [877, 8, 13, 397, 8, 3038, 10180, 7049, 88, 8, 13, 5348, 9, 36, 208, 123, 11, 12311, 148, 2696, 2, -100, -100, -100, -100, -100, -100, -100, -100]\ndecin: [2, 877, 8, 13, 397, 8, 3038, 10180, 7049, 88, 8, 13, 5348, 9, 36, 208, 123, 11, 12311, 148, 2696, 2, 1, 1, 1, 1, 1, 1, 1]\npreds: [8, 13, 397, 8, 3038, 10180, 7049, 88, 8, 13, 5348, 9, 36, 208, 123, 11, 12311, 148, 2696, 2, 2, 2, 2, 2, 2, 2696, 2, 2]\n```\n\nlets assume that the language code is 0, and thats in the beginning, that will be ignored too. how do i make the model to not ignore the index 0 from the labels? \n\n\n\n\n\n### Who can help?\n\n@ArthurZucker \n@Cyrilvallez \n@yonigozlan \n@molbap \n@zucchini-nlp \n@itazap \n\n### Information\n\n- [x] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nhttps://colab.research.google.com/drive/1nLCDlFyKhqCGu7dhlxJ0JiCRYjG24vbO?usp=sharing\n\n### Expected behavior\n\nI would like the decoder model to not ignore the index 0 from the labels. so that it will be \n\n<img width=\"182\" height=\"136\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/18a8e465-c235-4ac5-a9e2-f13d41bec964\" />\n\n  ",
    "url": "https://github.com/huggingface/transformers/issues/42093",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-07T15:46:08Z",
    "updated_at": "2025-11-07T16:27:10Z",
    "comments": 1,
    "user": "jaaabir"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28292,
    "title": "[Usage]: Failure to Deploy Llama-3.2-11B-Vision-Instruct Locally via vllm Due to OOM",
    "body": "### Your current environment\n\nThe output of <code>python collect_env.py</code>\n\n```text\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 20.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0\nClang version                : Could not collect\nCMake version                : version 3.16.3\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.5.1+cu121\nIs debug build               : False\nCUDA used to build PyTorch   : 12.1\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.10.18 (main, Jun  5 2025, 13:14:17) [GCC 11.2.0] (64-bit runtime)\nPython platform              : Linux-5.4.250-2-velinux1u1-amd64-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.4.131\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : \nGPU 0: NVIDIA A100-SXM4-80GB\nGPU 1: NVIDIA A100-SXM4-80GB\nGPU 2: NVIDIA A100-SXM4-80GB\nGPU 3: NVIDIA A100-SXM4-80GB\nGPU 4: NVIDIA A100-SXM4-80GB\nGPU 5: NVIDIA A100-SXM4-80GB\nGPU 6: NVIDIA A100-SXM4-80GB\nGPU 7: NVIDIA A100-SXM4-80GB\n\nNvidia driver version        : 535.129.03\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.7.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.7.0\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nByte Order:                      Little Endian\nAddress sizes:                   46 bits physical, 57 bits virtual\nCPU(s):                          112\nOn-line CPU(s) list:             0-108\nOff-line CPU(s) list:            109-111\nThread(s) per core:              1\nCore(s) per socket:              28\nSocket(s):                       2\nNUMA node(s):                    2\nVendor ID:                       GenuineIntel\nCPU family:                      6\nModel:                           106\nModel name:                      Intel(R) Xeon(R) Platinum 8336C CPU @ 2.30GHz\nStepping:                        6\nCPU MHz:                         2294.608\nBogoMIPS:                        4589.21\nHypervisor vendor:               KVM\nVirtualization type:             full\nL1d cache:                       1.3 MiB\nL1i cache:                       896 KiB\nL2 cache:                        35 MiB\nL3 cache:                        54 MiB\nNUMA node0 CPU(s):               0-55\nNUMA node1 CPU(s):               56-111\nVulnerability Itlb multihit:     Not affected\nVulnerability L1tf:              Not affected\nVulnerability Mds:               Not affected\nVulnerability Meltdown:          Not affected\nVulnerability Mmio stale data:   Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown\nVulnerability Retbleed:          Not affected\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:        Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence\nVulnerability Srbds:             Not affected\nVulnerability Tsx async abort:   Not affected\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves wbnoinvd arat avx512vbmi umip pku ospke avx512_vbmi2 gf",
    "url": "https://github.com/vllm-project/vllm/issues/28292",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-07T12:01:04Z",
    "updated_at": "2026-01-06T00:06:43Z",
    "comments": 5,
    "user": "LittleLucifer1"
  },
  {
    "repo": "huggingface/transformers",
    "number": 42086,
    "title": "Does Trainer uses grad scaler for training?",
    "body": "I am not able to see the grad scaler usage in Trainer code. If not using it then I need to understand how are we using mixed precision training with fp16 precision without grad scaler.",
    "url": "https://github.com/huggingface/transformers/issues/42086",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-07T10:10:16Z",
    "updated_at": "2025-11-13T07:58:33Z",
    "comments": 2,
    "user": "quic-meetkuma"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28283,
    "title": "[Bug]: nccl stuck issue",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nI am using a docker container for vLLM. I noticed that when I use `nvidia/cuda:13.0.X-cudnn-devel-ubuntu24.04` with `tp > 1`, it gets stuck here: `INFO 11-07 09:24:25 [pynccl.py:111] vLLM is using nccl==2.27.5`. But it works fine with `nvidia/cuda:12.9.X-cudnn-devel-ubuntu24.04` because I assume `12.9` is the current default now.\n\nMy question is: why does the CUDA image version really matter with vLLM? Just asking since I'm not experiencing this with SGLang, where `tp > 1` still works well even if I use either `12.8`, `12.9`, or even `13.0` `nvidia/cuda` image.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28283",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-07T09:36:01Z",
    "updated_at": "2025-11-07T09:40:17Z",
    "comments": 1,
    "user": "seindum"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167304,
    "title": "RPC cannot run in jetson orin because of the specific uuid of orin",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhen run RPC demo in jetson orin, the uuid issue were shown as below:\n\ntensorpipe/channel/cuda_ipc/context_impl.cc:65 \"uuidStr.substr(0, 4) != \"GPU-\"Couldn\u2019t obtain valid UUID for GPU #0 from CUDA driver.\n\nThe uuid of jetson does not begin with characters \u201cGPU-\u201d like RTX series, the failure message will appear at once.\n\nI think that tensorpipe didnot support jetson because of the specific characters \u201cGPU-\u201c check, and i do not know how to run RPC in jetson. How should i do to solve that. Thanks.\n\n### Versions\n\nWhen run RPC demo in jetson orin, the uuid issue were shown as below:\n\ntensorpipe/channel/cuda_ipc/context_impl.cc:65 \"uuidStr.substr(0, 4) != \"GPU-\"Couldn\u2019t obtain valid UUID for GPU #0 from CUDA driver.\n\nThe uuid of jetson does not begin with characters \u201cGPU-\u201d like RTX series, the failure message will appear at once.\n\nI think that tensorpipe didnot support jetson because of the specific characters \u201cGPU-\u201c check, and i do not know how to run RPC in jetson. How should i do to solve that. Thanks.\n@scw @svenstaro @JackDanger @infil00p \n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci @ptrblck @eqy @jerryzh168 @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @jjlilley @osalpekar @jiayisuse @mrzzd",
    "url": "https://github.com/pytorch/pytorch/issues/167304",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "module: cuda",
      "module: rpc"
    ],
    "created_at": "2025-11-07T09:20:00Z",
    "updated_at": "2025-11-07T15:33:35Z",
    "comments": 0,
    "user": "mamba824824"
  },
  {
    "repo": "pytorch/torchrec",
    "number": 3525,
    "title": "Could Torchrec support PyTorch's PrivateUse1 Dispatch Key?",
    "body": "Hello,\n\nI've noticed that there are many conditional checks like if device.type == \"cuda\" in our TorchRec codebase. Without modifying TorchRec's source code, such fixed conditional logic might not be flexible enough to conveniently support third-party devices. From what I understand, PyTorch has introduced the PrivateUse1 DispatchKey to address third-party device extension issues. I'd like to ask if our TorchRec repository could add support for PyTorch's PrivateUse1 DispatchKey? This would enable third-party devices to seamlessly adapt TorchRec's functionality through PrivateUse1 without requiring code modifications.",
    "url": "https://github.com/meta-pytorch/torchrec/issues/3525",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-07T07:17:42Z",
    "updated_at": "2026-01-05T22:39:04Z",
    "comments": 1,
    "user": "kwgqjj"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167291,
    "title": "[FSDP] Support param step with fp32",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nIn Megatron, we can keep a fp32 version of params. while doing optimizer.step, the gradient is used to update the fp32 version of params, and the cast the fp32 param to fp16 version. Can we do this in FSDP?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci",
    "url": "https://github.com/pytorch/pytorch/issues/167291",
    "state": "open",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2025-11-07T04:37:48Z",
    "updated_at": "2025-11-07T15:34:42Z",
    "comments": 0,
    "user": "yikaizhu-baseten"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28262,
    "title": "[Bug]: [gpt-oss] Responses API incorrect input/output handling",
    "body": "### Your current environment\n\nAny env\n\n### \ud83d\udc1b Describe the bug\n\nThere is currently an implementation issue with gpt-oss on the Responses API in vLLM. This can be seen clearly in the [test which continues a conversation between API requests here](https://github.com/vllm-project/vllm/blob/4bf56c79cc252d285d0cb4f5edf323f02af735ca/tests/entrypoints/openai/test_response_api_with_harmony.py#L715).\n\nFrom the first request, the model outputs the following tokens (whitespace added for clarity):\n```\n<|channel|>analysis<|message|>\n\tUser asks for weather in Paris today. We have no direct API call yet, but we can use get_weather function. Coordinates for Paris: latitude 48.8566, longitude 2.3522. We'll call get_weather.\n<|end|>\n<|start|>assistant<|channel|>commentary to=functions.get_weather <|constrain|>json<|message|>\n\t{\"latitude\":48.8566,\"longitude\":2.3522}\n<|call|>\n```\nWhen the output items from the first request are passed in as input to the second request, the tokens look like this (whitespace added for clarity):\n```\n<|start|>user<|message|>\n\tWhat's the weather like in Paris today?\n<|end|>\n<|start|>assistant<|message|>\n\tUser asks for weather in Paris today. We have no direct API call yet, but we can use get_weather function. Coordinates for Paris: latitude 48.8566, longitude 2.3522. We'll call get_weather.\n<|end|>\n<|start|>assistant to=functions.get_weather<|channel|>commentary json<|message|>\n\t{\"latitude\":48.8566,\"longitude\":2.3522}\n<|call|>\n<|start|>functions.get_weather<|message|>\n\t20\n<|end|>\n```\n\nWe lose `<|channel|>analysis` on the reasoning message, and we do not set `<|channel|>commentary` on the tool call output ([documentation reference](https://cookbook.openai.com/articles/openai-harmony#handling-tool-calls)).\n\nThere are a lot of edge cases and challenges to properly represent Harmony Message metadata when the Responses API input/output types do not include that metadata, but we can improve on the current implementation. \n\nThe changes we can make are:\n- A reasoning message should use the channel of the message that follows it. For example:\n  - The reasoning message prior to a function tool call should be on the commentary channel\n  - If the commentary channel is not enabled (no function tools enabled), all reasoning messages are on the analysis channel\n  - All other reasoning messages are on the analysis channel\n- Set the content_type for function tools to be `<|constrain|>json` always\n- Input items which are FunctionCallOutput should be set to be on the commentary channel\n- Other types of tool related input types should be on the analysis channel\n\nThese changes should would be made to [serving_responses.py](https://github.com/vllm-project/vllm/blob/main/vllm/entrypoints/openai/serving_responses.py) and [harmony_utils.py](https://github.com/vllm-project/vllm/blob/main/vllm/entrypoints/harmony_utils.py). Similar changes can be done for the chat completions path as well, but that should be out of scope for this issue.\n\nWith the changes described above, gpt-oss should have a significantly reduced error rate when outputting header tokens on longer conversations involving tools. \n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28262",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-07T02:51:56Z",
    "updated_at": "2025-11-08T19:39:06Z",
    "comments": 1,
    "user": "alecsolder"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2399,
    "title": "Are there plans to support LoRa fine-tuning?",
    "body": "",
    "url": "https://github.com/huggingface/lerobot/issues/2399",
    "state": "open",
    "labels": [
      "question",
      "performance",
      "training"
    ],
    "created_at": "2025-11-07T02:37:45Z",
    "updated_at": "2025-11-10T10:23:33Z",
    "user": "Hukongtao"
  },
  {
    "repo": "huggingface/candle",
    "number": 3167,
    "title": "Qwen 3-1.7b looks like something is wrong and doesn't stop properly.",
    "body": "Candle version: main\nPlatform: Mac Studio Max M1\nMode: Qwen 3-1.7b, (download by huggingface-cli)\nExecute cmd:\n\ngit clone https://github.com/huggingface/candle.git\ncd candle-examples\ncargo run --release --example qwen -- \\\n--prompt \"What is the speed of light?\" \\\n--model 3-1.7b \\\n--tokenizer-file ../../models/qwen3-1.7b/tokenizer.json \\\n--weight-files \"../../models/qwen3-1.7b/model-00001-of-00002.safetensors,../../models/qwen3-1.7b/model-00002-of-00002.safetensors\" \\\n--temperature 0.3 \\\n--top-p 0.5 \\\n--repeat-penalty 1.5 \\\n--repeat-last-n 16\n\nGot:\n\n```\nQwen 3-1.7B  \n\n\nRunning `target/release/examples/qwen --prompt 'What is the speed of light?' --model 3-1.7b --tokenizer-file ../../models/qwen3-1.7b/tokenizer.json --weight-files ../../models/qwen3-1.7b/model-00001-of-00002.safetensors,../../models/qwen3-1.7b/model-00002-of-00002.safetensors --temperature 0.3 --top-p 0.5 --repeat-penalty 1.5 --repeat-last-n 16`\navx: false, neon: true, simd128: false, f16c: false\ntemp: 0.30 repeat-penalty: 1.50 repeat-last-n: 16\nretrieved the files in 300.917\u00b5s\nRunning on CPU, to run on GPU(metal), build this example with `--features metal`\nloaded the model in 7.719477208s\nWhat is the speed of light? What are its properties?\n\nThe Speed Of Light\n\nWhat is the speed of light? What are its properties?\n\nThe Speed Of Light\n\nWhat is the speed of light? What are its properties?\n\nThe Speed Of Light\n\nWhat is the speed of light? What are its properties?\n\nThe Speed Of Light\n\nWhat is the speed of light? What are its properties?\n\nThe Speed Of Light\n\nWhat is the speed of light? What are its properties?\n\nThe Speed...\n\n^C\n```",
    "url": "https://github.com/huggingface/candle/issues/3167",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-07T02:23:05Z",
    "updated_at": "2025-11-08T07:52:18Z",
    "comments": 6,
    "user": "xiuno"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167276,
    "title": "Dynamo Fails to Trace Python Built-in Function print in Compile Mode",
    "body": "### \ud83d\udc1b Describe the bug\n\nDescription\uff1a\nWhen running a PyTorch model in Compile mode with torch.compile(), the Dynamo tracing mechanism fails to trace the Python built-in print() function, resulting in the following error.\ncode:\n```\nimport torch\nimport torch.nn as nn\n\nclass SimpleModel(nn.Module):\n    def forward(self, x):\n        print(f'Input stats - min: {min(x.flatten())}, max: {max(x.flatten())}, mean: {sum(x.flatten()) / len(x.flatten())}')\n        return x\n\ndef run_eager_and_compile():\n    device = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n    model = SimpleModel().to(device)\n    x = torch.randn(2, 3, device=device)\n\n    try:\n        print(\"Running in Eager mode\")\n        out_eager = model(x)\n        print(\"Eager output:\", out_eager)\n    except Exception as e:\n        print(\"Eager error:\", e)\n\n    try:\n        print(\"Running in Compile mode\")\n        compiled_model = torch.compile(model, fullgraph=True)\n        out_compile = compiled_model(x)\n        print(\"Compile output:\", out_compile)\n    except Exception as e:\n        print(\"Compile error:\", e)\n\nif __name__ == \"__main__\":\n    run_eager_and_compile()\n```\noutput:\n```\nRunning in Eager mode\nInput stats - min: -0.002417617244645953, max: 1.318856120109558, mean: 0.6973526477813721\nEager output: tensor([[ 1.2410,  0.0111,  1.3189],\n        [ 1.3116,  0.3040, -0.0024]])\nRunning in Compile mode\nCompile error: Failed to trace builtin operator\n  Explanation: Dynamo does not know how to trace builtin operator `print` with argument types ['<unknown type>'] (has_kwargs False)\n  Hint: Avoid calling builtin `print` with argument types ['<unknown type>']. Consider using an equivalent alternative function/method to `print`.\n  Hint: If you are attempting to call a logging function (e.g. `print`), you can try adding it to `torch._dynamo.config.reorderable_logging_functions`.\n  Hint: Please report an issue to PyTorch.\n\n  Developer debug context: builtin print [<class 'torch._dynamo.variables.misc.StringFormatVariable'>] False\n\n\nfrom user code:\n  line 6, in forward\n    print(f'Input stats - min: {min(x.flatten())}, max: {max(x.flatten())}, mean: {sum(x.flatten()) / len(x.flatten())}')\n\nSet TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS=\"+dynamo\"\n\n```\n\n### Versions\n\nPyTorch version: 2.7.1+cu126\nIs debug build: False\nCUDA used to build PyTorch: 12.6\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.1 LTS (x86_64)\nGCC version: (Ubuntu 9.5.0-6ubuntu2) 9.5.0\nClang version: Could not collect\nCMake version: version 4.0.3\nLibc version: glibc-2.39\n\nPython version: 3.9.7 (default, Jul 16 2025, 16:34:47) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-6.14.0-29-generic-x86_64-with-glibc2.39\nIs CUDA available: False\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 4060 Laptop GPU\nNvidia driver version: 580.65.06\ncuDNN version: Could not collect\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture: x86_64\nCPU op-mode(s): 32-bit, 64-bit\nAddress sizes: 39 bits physical, 48 bits virtual\nByte Order: Little Endian\nCPU(s): 32\nOn-line CPU(s) list: 0-31\nVendor ID: GenuineIntel\nModel name: Intel(R) Core(TM) i9-14900HX\nCPU family: 6\nModel: 183\nThread(s) per core: 2\nCore(s) per socket: 24\nSocket(s): 1\nStepping: 1\nCPU(s) scaling MHz: 31%\nCPU max MHz: 5800.0000\nCPU min MHz: 800.0000\nBogoMIPS: 4838.40\nFlags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize arch_lbr ibt flush_l1d arch_capabilities\nVirtualization: VT-x\nL1d cache: 896 KiB (24 instances)\nL1i cache: 1.3 MiB (24 instances)\nL2 cache: 32 MiB (12 instances)\nL3 cache: 36 MiB (1 instance)\nNUMA node(s): 1\nNUMA node0 CPU(s): 0-31\nVulnerability Gather data sampling: Not affected\nVulnerability Ghostwrite: Not affected\nVulnerability Indirect target selection: Not affected\nVulnerability Itlb multihit: Not affected\nVulnerability L1tf: Not affected\nVulnerability Mds: Not affected\nVulnerability Meltdown: Not affected\nVulnerability Mmio stale data: Not affected\nVulnerability Reg file dat",
    "url": "https://github.com/pytorch/pytorch/issues/167276",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2025-11-07T01:34:42Z",
    "updated_at": "2025-11-18T19:05:11Z",
    "comments": 2,
    "user": "Blooming-Tree"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167266,
    "title": "TorchDynamo Tracing Error: Unable to Trace Builtin bool() Operator on Tensor",
    "body": "### \ud83d\udc1b Describe the bug\n\nDescription\nWhen compiling a model with torch.compile, TorchDynamo fails to trace the builtin bool() operator when applied to PyTorch tensors, resulting in a compilation error.\nError Details:\n\nError Type: Tracing failure for builtin operator\n\nFailed Operation: bool operator applied to Tensor\n\nSpecific Code: make_causal = bool((mask == 0).all())\n\nError Message: \"Dynamo does not know how to trace builtin operator bool with argument types ['Tensor']\"\ncode:\n```\nimport torch\nimport torch.nn as nn\nimport torch._dynamo\n\ntorch._dynamo.config.suppress_errors = False\ntorch._dynamo.config.verbose = True\n\nclass BoolTensorModel(nn.Module):\n    def forward(self, x, mask):\n        make_causal = bool((mask == 0).all())\n        print(f\"[Forward] make_causal={make_causal}\")\n        return x + 1\n\ndef main():\n    x = torch.randn(2, 3)\n    mask = torch.zeros(2, 3)\n\n    model = BoolTensorModel()\n\n    eager_out = model(x, mask)\n    print(\"Eager mode output shape::\\n\", eager_out)\n\n    try:\n        compiled_model = torch.compile(model, fullgraph=True)\n        compile_out = compiled_model(x, mask)\n        print(\"Compiled mode output shape:\\n\", compile_out)\n    except Exception as e:\n        print(\"Compile error:\\n\", e)\n\nif __name__ == \"__main__\":\n    main()\n\n```\n\noutput:\n```\n[Forward] make_causal=True\nEager mode output shape:\n tensor([[-0.0879,  1.7579,  1.2001],\n        [ 2.2467,  2.0874,  0.1205]])\n\nCompile error:\n Failed to trace builtin operator\n  Explanation: Dynamo does not know how to trace builtin operator `bool` with argument types ['Tensor'] (has_kwargs False)\n  Hint: Avoid calling builtin `bool` with argument types ['Tensor']. Consider using an equivalent alternative function/method to `bool`.\n  Hint: If you are attempting to call a logging function (e.g. `print`), you can try adding it to `torch._dynamo.config.reorderable_logging_functions`.\n  Hint: Please report an issue to PyTorch.\n\n  Developer debug context: builtin bool [<class 'torch._dynamo.variables.tensor.TensorVariable'>] False\n\n\nfrom user code:\n  line 10, in forward\n    make_causal = bool((mask == 0).all())\n\n```\n\n### Versions\n\nPyTorch version: 2.7.1+cu126\nIs debug build: False\nCUDA used to build PyTorch: 12.6\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.1 LTS (x86_64)\nGCC version: (Ubuntu 9.5.0-6ubuntu2) 9.5.0\nClang version: Could not collect\nCMake version: version 4.0.3\nLibc version: glibc-2.39\n\nPython version: 3.9.7 (default, Jul 16 2025, 16:34:47) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-6.14.0-29-generic-x86_64-with-glibc2.39\nIs CUDA available: False\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 4060 Laptop GPU\nNvidia driver version: 580.65.06\ncuDNN version: Could not collect\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture: x86_64\nCPU op-mode(s): 32-bit, 64-bit\nAddress sizes: 39 bits physical, 48 bits virtual\nByte Order: Little Endian\nCPU(s): 32\nOn-line CPU(s) list: 0-31\nVendor ID: GenuineIntel\nModel name: Intel(R) Core(TM) i9-14900HX\nCPU family: 6\nModel: 183\nThread(s) per core: 2\nCore(s) per socket: 24\nSocket(s): 1\nStepping: 1\nCPU(s) scaling MHz: 31%\nCPU max MHz: 5800.0000\nCPU min MHz: 800.0000\nBogoMIPS: 4838.40\nFlags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize arch_lbr ibt flush_l1d arch_capabilities\nVirtualization: VT-x\nL1d cache: 896 KiB (24 instances)\nL1i cache: 1.3 MiB (24 instances)\nL2 cache: 32 MiB (12 instances)\nL3 cache: 36 MiB (1 instance)\nNUMA node(s): 1\nNUMA node0 CPU(s): 0-31\nVulnerability Gather data sampling: Not affected\nVulnerability Ghostwrite: Not affected\nVulnerability Indirect target selection: Not affected\nVulnerability Itlb multihit: Not affected\nVulnerability L1tf: Not affected\nVulnerability Mds: Not affected\nVulnerability Meltdown: Not affected\nVulnerability Mmio stale data: Not affected\nVulnerability Reg file data sampling: Mitigation; Clear Register File\nVulnerability Retbleed: Not affected\nVulnerability Spec rstack overflow: Not affected\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl\nVulnerabilit",
    "url": "https://github.com/pytorch/pytorch/issues/167266",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo",
      "dynamo-triage-dec2025"
    ],
    "created_at": "2025-11-07T00:26:30Z",
    "updated_at": "2025-12-24T03:49:22Z",
    "comments": 1,
    "user": "Blooming-Tree"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2398,
    "title": "how to accelerate the iteration in dataset",
    "body": "hi, i want to get the frames of specific episode index\n\nwhen `episode_index_target` is large, like 100, it takes a lot of time to run.\n\nany solution to improve the iteration speed ?\n\nthanks.\n\n`lerobot.__version__ == '0.1.0'`\n\n```python\ndataset = LeRobotDataset('yananchen/robomimic_lift')\nframes = []\nfor sample in dataset:\n    if sample[\"episode_index\"] == episode_index_target:\n        frames.append(sample)\n```",
    "url": "https://github.com/huggingface/lerobot/issues/2398",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-11-06T21:37:33Z",
    "updated_at": "2025-11-10T20:52:57Z",
    "user": "yanan1116"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28246,
    "title": "[Bug]: Return Token Ids not returning Gen Token Ids for GPT-OSS-120b",
    "body": "### Your current environment\n\n<details>\nUsing docker image vllm/vllm-openai:latest\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nWhen passing in return_token_ids flag to v1/chat/completions endpoint for GPTOSS-120b, only prompt_token_ids are returned and not token_ids. We have not seen this happen with any other model except GPTOSS-120b\n\n```\ncurl --location 'http://localhost:8015/v1/chat/completions' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n    \"model\": \"gpt-oss-120b\",\n    \"messages\": [{\"content\": \"Hello!\", \"role\": \"user\"}],\n    \"temperature\": 0,\n    \"return_token_ids\": true\n  }'\n```\n\n`{\"id\":\"chatcmpl-a19161b8131141e2a79495025adb40eb\",\"object\":\"chat.completion\",\"created\":1762462711,\"model\":\"gpt-oss-120b\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Hello! How can I help you today?\",\"refusal\":null,\"annotations\":null,\"audio\":null,\"function_call\":null,\"tool_calls\":[],\"reasoning_content\":\"The user says \\\"Hello!\\\" We should respond politely. No special instructions. Just greet back.\"},\"logprobs\":null,\"finish_reason\":\"stop\",\"stop_reason\":null,\"token_ids\":null}],\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"prompt_tokens\":71,\"total_tokens\":109,\"completion_tokens\":38,\"prompt_tokens_details\":null},\"prompt_logprobs\":null,\"prompt_token_ids\":[200006,17360,200008,3575,553,17554,162016,11,261,4410,6439,2359,22203,656,7788,17527,558,87447,100594,25,220,1323,19,12,3218,198,6576,3521,25,220,1323,20,12,994,12,3218,279,30377,289,25,14093,279,2,13888,18403,25,8450,11,1721,13,21030,2804,413,7360,395,1753,3176,13,200007,200006,77944,200008,200007,200006,1428,200008,13225,0,200007,200006,173781],\"kv_transfer_params\":null}`\n\nI've also included in the docker container setup \n\n```\ndocker run --rm -d --name vllm-gpt-oss-120b \\\n  --gpus '\"device=4,5\"' \\\n  --shm-size=16g \\\n  -e TORCH_CUDA_ARCH_LIST=\"9.0\" \\\n  -v /mlf1-shared/user/gpt-oss-120b:/opt/model \\\n  -p ${PORT}:${PORT} \\\n  vllm/vllm-openai:latest\\\n  --model /opt/model \\\n  --served-model-name \"${SERVED_MODEL_NAME}\" \\\n  --tensor-parallel-size \"${TP_SIZE}\" \\\n  --gpu-memory-utilization \"${GPU_UTIL}\" \\\n  --max-num-seqs 64 \\\n  --port ${PORT}\n```\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28246",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-06T21:08:16Z",
    "updated_at": "2025-11-07T00:18:25Z",
    "comments": 1,
    "user": "sophies-cerebras"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167242,
    "title": "CUDNN version in nightly pytorch 2.10.0 builds",
    "body": "Hi, I mainly use pytorch with ComfyUI. I know there is an issue with pytorch and CUDNN for which there have been made workarounds in ComfyUI code.\n\nI have seen here https://github.com/pytorch/pytorch/issues/166122 that CUDNN 9.15 solves the problem (from I can understand, as I'm not a developer). Checking today's torch nightly 2.10.0+cu130 for Windows it shows, if I'm not mistaken, CUDNN version 9.12:\n\n```\n>>> import torch\n>>> print(torch.__version__)\n2.10.0.dev20251106+cu130\n>>> torch.backends.cudnn.version()\n91200\n```\nMy question is: when is to be expected to see CUDNN v 9.15 in the nightly 2.10.0+cu130 builds?\n\nAnd another question is: seeing that today CUDNN 9.15 is available from nvidia (in fact is already downloaded and installed on my computer) is there a way to use 9.15 in the current torch build, as this comment suggests?\nhttps://github.com/pytorch/pytorch/issues/166122#issuecomment-3487979692\n\n> We have aligned not to bump this for the minor version release; as a workaround, we encourage users to manually install cudnn 9.15+ if they want to work around\n\nMy apologies, if I ask, maybe, trivial questions.\n\ncc @seemethere @malfet @atalman @csarofeen @ptrblck @xwang233 @eqy",
    "url": "https://github.com/pytorch/pytorch/issues/167242",
    "state": "open",
    "labels": [
      "module: binaries",
      "module: cudnn",
      "triaged"
    ],
    "created_at": "2025-11-06T20:16:08Z",
    "updated_at": "2025-11-30T16:25:21Z",
    "comments": 13,
    "user": "jovan2009"
  },
  {
    "repo": "pytorch/ao",
    "number": 3305,
    "title": "[MXFP8 MoE] What's the expected inference solution on H100s, after training with TorchAO MXFP8 MoE?",
    "body": "Hi team,\n\nThanks for your great implementation of the new MXFP8 MoE! I have integrated it and consider to use it for prod training.\nBut I got a concern about how to do inference.\n\nMXFP8 is only available on B200. What is the expected inference solution on H100 or even non-Nvidia GPUs after training with MXFP8. Other quantizations, even another FP8 quantization, is not guaranteed to work well with the model trained with MXFP8.\n\nIs a QAT finetuning with another quantization method expected?\nShould we just inference with another quantization method without finetuning?\n\nI guess FP4 training is a similar case. \n\nI think the question is not only to TorchAO team. Anyone please share your ideas/insights if you would like to.\n\nThanks in advance!",
    "url": "https://github.com/pytorch/ao/issues/3305",
    "state": "open",
    "labels": [
      "question",
      "mx",
      "moe"
    ],
    "created_at": "2025-11-06T18:45:31Z",
    "updated_at": "2025-11-07T19:20:18Z",
    "user": "goldhuang"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28236,
    "title": "[Feature]: Implement naive prepare/finalize class to replace naive dispatching in fused_moe/layer.py",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nThe `FusedMoE` layer has a special case dispatch/combine for EP+DP when there is no specific all2all backend specified.  This makes the code in `layer.py` a bit confusing and hard to follow.  One way to simplify this is to implement a proper `FusedMoEPrepareAndFinalize` subclass for naive dispatch/combine.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28236",
    "state": "open",
    "labels": [
      "help wanted",
      "good first issue",
      "feature request"
    ],
    "created_at": "2025-11-06T18:38:38Z",
    "updated_at": "2025-11-12T06:36:29Z",
    "comments": 4,
    "user": "bnellnm"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28233,
    "title": "[Usage]: LogitProcessor vLLM 0.9.1 run the same prompt 50 times with batching, apply logitprocessor independently on each",
    "body": "### Your current environment\n\nGoal\nRun the same prompt 50 times through vLLM 0.9.1, generating independent outputs with a custom LogitsProcessor that forces a comma token after some pattern \"xyz\" appears in each generation.\nWhat You Want\n\nBatched execution: Process all 50 generations efficiently in parallel\nIndependent state: Each of the 50 generations should have its own state in the logits processor\nPattern detection: When text ends with \"xyz\", mask all tokens except comma },\nOne-time application: Each generation should only apply the comma mask once\n\nCurrent Hurdles\n1. Processor Signature Confusion\nvLLM V0 (0.9.1) uses signature: __call__(prompt_token_ids, generated_token_ids, logits)\n\nprompt_token_ids: The input prompt tokens (same for all 50)\ngenerated_token_ids: Tokens generated so far (different per generation)\nProblem: No built-in request ID to distinguish between the 50 generations\n\n2. State Management\nWhen using the same prompt 50 times:\n\nAll generations share identical prompt_token_ids\nCan't use prompt as unique identifier\nUsing generated_token_ids as key works initially, but becomes complex as sequences diverge\nState dictionary grows indefinitely without cleanup\n\n3. Batching vs Sequential\n\nBatching (llm.generate([prompt]*50)): Processor is called for all 50 in interleaved order, making state tracking difficult\nSequential (50 separate calls): Works reliably but loses parallel efficiency\n\nWorking Solution (Sequential)\nfor i in range(50):\n    processor = LookAheadProcessor(tokenizer)  # Fresh processor each time\n    sampling_params = SamplingParams(..., logits_processors=[processor])\n    output = llm.generate([prompt], sampling_params)\nThis works because each generation gets its own processor instance.\nThe Core Problem\nvLLM V0's logits processor API doesn't provide per-request identifiers in batched scenarios, making it impossible to maintain independent state for identical prompts without workarounds like using (prompt_tokens, generated_tokens) tuples as keys - which still fails when generations produce identical token sequences early on. Anyone knows a solution to this problem ?\n\n### How would you like to use vllm\n\n\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28233",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-06T18:11:32Z",
    "updated_at": "2025-11-06T18:11:32Z",
    "comments": 0,
    "user": "jindalankush28"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28230,
    "title": "[Bug]: GPU VRAM continuously increase during Qwen3-VL usage over days until OOM",
    "body": "### Your current environment\n\nSetup:\ndocker run -d \\\n  --runtime nvidia \\\n  --gpus '\"device=3,4,5,6\"' \\\n  -e TRANSFORMERS_OFFLINE=1 \\\n  -e DEBUG=\"true\" \\\n  -p 8000:8000 \\\n  --ipc=host \\\n  vllm/vllm-openai:v0.11.0 \\\n  --gpu-memory-utilization 0.95 \\\n  --model Qwen/Qwen3-VL-235B-A22B-Instruct-FP8 \\\n  --tensor-parallel-size 4 \\\n  --mm-encoder-tp-mode data \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser hermes \\\n  --limit-mm-per-prompt.video 0\nServer: 8*H200 with CUDA=12.6.\n\n### \ud83d\udc1b Describe the bug\n\nThis is the same issue described in \nhttps://github.com/vllm-project/vllm/issues/27466\nhttps://github.com/vllm-project/vllm/issues/27452\nVRAM continuously increase over days after usage with vision. When available VRAM drops below 500MB, OOM occurs during new requests.\nAs described in other posts, removing mm_encoder_tp_mode=\"data\" or --enforce-eager does not work either.\nThere is currently no acceptable solution.\nIs there a memory leakage? It is understood that VRAM usage may go up during vision task, but that should be cleared. VRAM cannot continuously increase and eventually hit OOM.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28230",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-06T17:19:18Z",
    "updated_at": "2025-12-02T16:50:26Z",
    "comments": 15,
    "user": "yz342"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167219,
    "title": "Are there limitations to dtensor's registration strategy?",
    "body": "I have a IR schema like this\nfunc: my_scatter_add(Tensor x, Tensor(a!) y, Tensor index, Tensor? scale=None, bool use_high_prec=False) -> ()\nThis function has no return value, and the second parameter is an in-place parameter\nI tried the `register_sharding` method described in the Dtensor documentation. However, it threw an error. It seems this method doesn't support IR schema without outputs. \nCan this IR schema support Dtensor registration?\n\n\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci @tianyu-l @XilunWu @SherlockNoMad",
    "url": "https://github.com/pytorch/pytorch/issues/167219",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "module: dtensor"
    ],
    "created_at": "2025-11-06T14:50:40Z",
    "updated_at": "2025-11-11T13:37:24Z",
    "comments": 4,
    "user": "Bin1024"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7852,
    "title": "Problems with NifTI",
    "body": "### Describe the bug\n\nThere are currently 2 problems with the new NifTI feature:\n1. dealing with zipped files, this is mentioned and explained [here](https://github.com/huggingface/datasets/pull/7815#issuecomment-3496199503)\n2. when uploading via the `niftifolder` feature, the resulting parquet only contains relative paths to the nifti files:\n\n```bash\ntable['nifti']\n<pyarrow.lib.ChunkedArray object at 0x798245d37d60>\n[\n  -- is_valid: all not null\n  -- child 0 type: binary\n    [\n      null,\n      null,\n      null,\n      null,\n      null,\n      null\n    ]\n  -- child 1 type: string\n    [\n      \"/home/tobias/programming/github/datasets/nifti_extracted/T1.nii\",\n      \"/home/tobias/programming/github/datasets/nifti_extracted/T2-interleaved.nii\",\n      \"/home/tobias/programming/github/datasets/nifti_extracted/T2.nii\",\n      \"/home/tobias/programming/github/datasets/nifti_extracted/T2_-interleaved.nii\",\n      \"/home/tobias/programming/github/datasets/nifti_extracted/T2_.nii\",\n      \"/home/tobias/programming/github/datasets/nifti_extracted/fieldmap.nii\"\n    ]\n]\n```\ninstead of containing bytes. The code is copy pasted from PDF, so I wonder what is going wrong here.\n\n### Steps to reproduce the bug\n\nsee the linked comment\n\n### Expected behavior\n\ndownloading should work as smoothly as for pdf\n\n### Environment info\n\n- `datasets` version: 4.4.2.dev0\n- Platform: Linux-6.14.0-33-generic-x86_64-with-glibc2.39\n- Python version: 3.12.3\n- `huggingface_hub` version: 0.35.3\n- PyArrow version: 21.0.0\n- Pandas version: 2.3.3\n- `fsspec` version: 2025.9.0\n",
    "url": "https://github.com/huggingface/datasets/issues/7852",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-06T11:46:33Z",
    "updated_at": "2025-11-06T16:20:38Z",
    "comments": 2,
    "user": "CloseChoice"
  },
  {
    "repo": "huggingface/peft",
    "number": 2901,
    "title": "AttributeError: 'float' object has no attribute 'meta'",
    "body": "### System Info\n\npeft== 0.17.1\ntorch== 2.5.1+cu118\ntransformers==4.57.0\npython==3.12.7\n\n### Who can help?\n\nI am trying to use LoRA with DINOv3 (so a slightly modified vit-b). However, I am hitting after a random number of iterations this error. It is sadly difficult to reproduce. Maybe someone can hint at what is going on?\n\n```\nTraceback (most recent call last):\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_dynamo/output_graph.py\", line 1446, in _call_user_compiler\n    compiled_fn = compiler_fn(gm, self.example_inputs())\n                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_dynamo/repro/after_dynamo.py\", line 129, in __call__\n    compiled_gm = compiler_fn(gm, example_inputs)\n                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/__init__.py\", line 2234, in __call__\n    return compile_fx(model_, inputs_, config_patches=self.config)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_inductor/compile_fx.py\", line 1521, in compile_fx\n    return aot_autograd(\n           ^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_dynamo/backends/common.py\", line 72, in __call__\n    cg = aot_module_simplified(gm, example_inputs, **self.kwargs)\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_functorch/aot_autograd.py\", line 1071, in aot_module_simplified\n    compiled_fn = dispatch_and_compile()\n                  ^^^^^^^^^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_functorch/aot_autograd.py\", line 1056, in dispatch_and_compile\n    compiled_fn, _ = create_aot_dispatcher_function(\n                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_functorch/aot_autograd.py\", line 522, in create_aot_dispatcher_function\n    return _create_aot_dispatcher_function(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_functorch/aot_autograd.py\", line 759, in _create_aot_dispatcher_function\n    compiled_fn, fw_metadata = compiler_fn(\n                               ^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_functorch/_aot_autograd/jit_compile_runtime_wrappers.py\", line 179, in aot_dispatch_base\n    compiled_fw = compiler(fw_module, updated_flat_args)\n                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_inductor/compile_fx.py\", line 1350, in fw_compiler_base\n    return _fw_compiler_base(model, example_inputs, is_inference)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_inductor/compile_fx.py\", line 1421, in _fw_compiler_base\n    return inner_compile(\n           ^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_inductor/compile_fx.py\", line 475, in compile_fx_inner\n    return wrap_compiler_debug(_compile_fx_inner, compiler_name=\"inductor\")(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_dynamo/repro/after_aot.py\", line 85, in debug_wrapper\n    inner_compiled_fn = compiler_fn(gm, example_inputs)\n                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_inductor/compile_fx.py\", line 661, in _compile_fx_inner\n    compiled_graph = FxGraphCache.load(\n                     ^^^^^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_inductor/codecache.py\", line 1334, in load\n    compiled_graph = compile_fx_fn(\n                     ^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/torch/_inductor/compile_fx.py\", line 570, in codegen_and_compile\n    compiled_graph = fx_codegen_and_compile(gm, example_inputs, **fx_kwargs)\n                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/dkfz/cluster/gpu/data/OE0441/k539i/miniforge3/envs/nnunetv2/lib/python3.12/site-packages/t",
    "url": "https://github.com/huggingface/peft/issues/2901",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-06T11:24:18Z",
    "updated_at": "2025-11-17T15:34:08Z",
    "comments": 6,
    "user": "Karol-G"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28192,
    "title": "[RFC]: Support separate NICs for KV cache traffic and MoE traffic",
    "body": "### Motivation.\n\nIn MoE models with large KV caches, KV cache all-to-all and MoE expert communication share the same RNIC, causing congestion and degrading performance. Using dedicated NICs for each traffic type can improve bandwidth utilization and reduce interference.\n\n### Proposed Change.\n\nDoes vLLM currently support routing KV cache traffic and MoE traffic through different NICs?\n\n### Feedback Period.\n\n_No response_\n\n### CC List.\n\n_No response_\n\n### Any Other Things.\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28192",
    "state": "open",
    "labels": [
      "RFC"
    ],
    "created_at": "2025-11-06T07:31:17Z",
    "updated_at": "2025-11-06T08:19:56Z",
    "comments": 1,
    "user": "JayFzh"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28186,
    "title": "[Bug] Cannot load qwen3-vl series with lora adapter",
    "body": "I fine-tuned the `Qwen3-VL-8B-Instruct` model using Unsloth.\nI moved the saved QLoRA adapter and the `Qwen3-VL-2B-Instruct` model to my vLLM server.\nThen I ran a command to start model serving with vLLM as shown below. (For reference, the vLLM server has no issues\u2014it was already serving official Qwen3-VL models.)\n\n```\ncommand = [\n        sys.executable, \n        \"-m\", \"vllm.entrypoints.openai.api_server\",\n        \"--model\", \"./Qwen3-VL-2B-Instruct\",\n        \"--max_model_len\", \"3500\",\n        \"--gpu_memory_utilization\", \"0.85\",\n        \"--trust-remote-code\",\n        \"--host\", \"0.0.0.0\",\n        \"--port\", \"8888\",\n\n        # for lora adapter\n        \"--enable-lora\",\n        \"--max-lora-rank\", \"16\",  # LoRA rank\n        \"--max-loras\", \"1\", \n        \"--max-cpu-loras\", \"1\",\n        \"--lora-modules\", \"adapter0=./my_lora_adapter\"\n]\n```\n\nI waited for vLLM to properly load the QLoRA adapter, but the following problem occurred : \nhttps://github.com/vllm-project/vllm/issues/26991\n\nWhen I was feeling hopeless, I tried merging the model instead of saving the LoRA adapter separately by using the `save_pretrained_merged()` function as shown below, and then vLLM was able to load and perform inference normally:\n\n```\n save_pretrained_merged( f\"my_16bit_model\", tokenizer, save_method=\"merged_16bit\")\n```\n\nHowever, I don't want to merge the models\u2014I want to load VL model with **LoRA** adapter.\nI\u2019ve seen many posts from others experiencing the same error.\n\nAs of now, what can I do to resolve this issue?",
    "url": "https://github.com/vllm-project/vllm/issues/28186",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-06T06:02:33Z",
    "updated_at": "2025-11-09T11:16:27Z",
    "comments": 4,
    "user": "deepNoah"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167186,
    "title": "scripts/build_android.sh missing",
    "body": "### \ud83d\udc1b Build scripts for android deleted, README outdated\n\nI was trying to build pytorch v2.9.0 for android, but it seems build_android.sh script was deleted. Is there any reason why it was deleted?\n\nThe odd thing is that https://github.com/pytorch/pytorch/blob/v2.9.0/android/README.md\nreferences bash ./scripts/build_pytorch_android.sh which doesn't exit.\n\n```\ncommit 91602a92548d1dd351979cdc6e778c505c32c2b9\nAuthor: albanD <desmaison.alban@gmail.com>\nDate:   Wed Jul 23 01:21:25 2025 +0000\n\n    Cleanup old caffe2 scripts (#158475)\n    \n    Testing on this one is grep based: if there were no reference to that script I can find, I deleted.\n    We can easily add any of these back if needed!\n    Pull Request resolved: https://github.com/pytorch/pytorch/pull/158475\n    Approved by: https://github.com/seemethere, https://github.com/huydhn, https://github.com/cyyever\n\n```\n\n### Versions\n\nv2.9.0",
    "url": "https://github.com/pytorch/pytorch/issues/167186",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: mobile"
    ],
    "created_at": "2025-11-06T04:15:16Z",
    "updated_at": "2025-11-07T00:56:14Z",
    "comments": 1,
    "user": "ppavacic"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1998,
    "title": "[Documentation] [BE] Add docs for MXFP8 training on Blackwell",
    "body": "We have [float8](https://github.com/pytorch/torchtitan/blob/main/docs/float8.md) docs, we should add mxfp8 docs as well, especially since we have a public blog post on accelerating training with torchtitan mxfp8 training: https://pytorch.org/blog/accelerating-2k-scale-pre-training-up-to-1-28x-with-torchao-mxfp8-and-torchtitan-on-crusoe-b200-cluster/",
    "url": "https://github.com/pytorch/torchtitan/issues/1998",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-11-06T02:53:06Z",
    "updated_at": "2025-12-03T21:54:51Z",
    "comments": 0,
    "user": "danielvegamyhre"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167172,
    "title": "[Profiler][XPU] Is there a miss?",
    "body": "Found something:\nhttps://github.com/pytorch/pytorch/blob/943227f57bcd638ab288331442748769f907d8c1/torch/csrc/autograd/init.cpp#L390-L419\n\nIs the XPU code should also be in the #if branch? Seems the XPU depends on macro `LIBKINETO_NOXPUPTI`?\nHmmmm, or the #if control misses the `|| !defined(LIBKINETO_NOXPUPTI)` also?\nNot a pro to XPU, so please correct me if something here is wrong.\n\ncc @gujinghui @EikanWang @fengyuan14 @guangyey",
    "url": "https://github.com/pytorch/pytorch/issues/167172",
    "state": "closed",
    "labels": [
      "triaged",
      "module: xpu"
    ],
    "created_at": "2025-11-06T02:15:45Z",
    "updated_at": "2025-11-19T05:42:57Z",
    "comments": 1,
    "user": "KarhouTam"
  },
  {
    "repo": "huggingface/trl",
    "number": 4481,
    "title": "DPOTrainer._prepare_dataset() adds an extra eos_token to conversationally formatted inputs",
    "body": "## Overview\nThe DPOTrainer unconditionally appends the eos_token to both the \"chosen\" and \"rejected\" sequences. Because conversationally formatted inputs will already have the chat template applied, this causes them to have duplicate eos_tokens (Ex. `...<|im_end|><|im_end|>`). \n\nA related problem was reported for the [SFTTrainer](https://github.com/huggingface/trl/issues/3318), where Qwen2.5\u2019s chat template confused the trainer\u2019s logic for detecting whether a sequence already ended with an eos_token_id. The DPO case is slightly different: [DPOTrainer.tokenize_row](https://github.com/huggingface/trl/blob/main/trl/trainer/dpo_trainer.py#L738-L739) explicitly appends tokenizer.eos_token_id to both chosen_input_ids and rejected_input_ids, regardless of whether the text is standard or conversational. Even if the chat template already added the token, it will be added again.\n\n\n## Repro\n```python\nimport trl\nfrom trl import DPOTrainer, DPOConfig\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\nfrom datasets import Dataset\nimport torch\n\nMODEL_ID = \"Qwen/Qwen2.5-0.5B-Instruct\"\n\n# Conversational format\nsample_data = {\n    \"prompt\": [[{\"role\": \"user\", \"content\": \"What is 2+2?\"}]],\n    \"chosen\": [[{\"role\": \"assistant\", \"content\": \"2+2 equals 4.\"}]],\n    \"rejected\": [[{\"role\": \"assistant\", \"content\": \"I don't know math.\"}]]\n}\n\n# Convert to dataset\ntrain_dataset = Dataset.from_dict(sample_data)\n\n# Load model and tokenizer\ntokenizer = AutoTokenizer.from_pretrained(MODEL_ID)\nmodel = AutoModelForCausalLM.from_pretrained(\n    MODEL_ID,\n    dtype=torch.bfloat16,\n    device_map=\"auto\"\n)\n\n# Setup DPO config\ndpo_config = DPOConfig(\n    output_dir=\"./dpo_output\",\n    per_device_train_batch_size=2,\n    num_train_epochs=1,\n    logging_steps=1,\n    remove_unused_columns=False,\n)\n\n# Initialize DPOTrainer\ntrainer = DPOTrainer(\n    model=model,\n    args=dpo_config,\n    train_dataset=train_dataset,\n    processing_class=tokenizer,\n)\n\n# Get the processed batch\ntrain_dataloader = trainer.get_train_dataloader()\nbatch = next(iter(train_dataloader))\n\n# Decode and display the preprocessed sequences\nfor idx in range(len(batch[\"chosen_input_ids\"])):\n    \n    # Show prompt if available\n    if \"prompt_input_ids\" in batch:\n        prompt_tokens = batch[\"prompt_input_ids\"][idx]\n        print(\"-\"*80)\n        print(f\"PROMPT:\")\n        print(\"-\"*80)\n        print(tokenizer.decode(prompt_tokens, skip_special_tokens=False))\n        print(\"-\"*80)\n    \n    # Show full chosen sequence\n    chosen_tokens = batch[\"chosen_input_ids\"][idx]\n    print(f\"CHOSEN SEQUENCE:\")\n    print(\"-\"*80)\n    print(tokenizer.decode(chosen_tokens, skip_special_tokens=False))\n    print(\"-\"*80 + \"\\n\")\n    \n    # Show full rejected sequence\n    rejected_tokens = batch[\"rejected_input_ids\"][idx]\n    print(f\"REJECTED SEQUENCE:\")\n    print(\"-\"*80)\n    print(tokenizer.decode(rejected_tokens, skip_special_tokens=False))\n    print(\"-\"*80)\n```\n\n## Outputs:\nNotice the double `<|im_end|>` tokens for the 'chosen' and 'rejected' columns.\n```\n--------------------------------------------------------------------------------\nPROMPT:\n--------------------------------------------------------------------------------\n<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n<|im_start|>user\nWhat is 2+2?<|im_end|>\n<|im_start|>assistant\n\n--------------------------------------------------------------------------------\nCHOSEN SEQUENCE:\n--------------------------------------------------------------------------------\n2+2 equals 4.<|im_end|>\n<|im_end|>\n--------------------------------------------------------------------------------\n\nREJECTED SEQUENCE:\n--------------------------------------------------------------------------------\nI don't know math.<|im_end|>\n<|im_end|>\n--------------------------------------------------------------------------------\n```\n\n\n### System Info\n\n- Platform: Linux-6.11.0-1016-nvidia-x86_64-with-glibc2.39\n- Python version: 3.12.11\n- TRL version: 0.24.0\n- PyTorch version: 2.7.1+cu128\n- accelerator(s): NVIDIA H200\n- Transformers version: 4.57.1\n- Accelerate version: 1.11.0\n- Accelerate config: not found\n- Datasets version: 4.4.1\n- HF Hub version: 0.36.0\n- bitsandbytes version: not installed\n- DeepSpeed version: not installed\n- Liger-Kernel version: not installed\n- LLM-Blender version: not installed\n- OpenAI version: not installed\n- PEFT version: not installed\n- vLLM version: not installed\n\n### Checklist\n\n- [x] I have checked that my issue isn't already filed (see [open issues](https://github.com/huggingface/trl/issues?q=is%3Aissue))\n- [x] I have included my system information\n- [x] Any code provided is minimal, complete, and reproducible ([more on MREs](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks))\n- [x] Any code provided is properly formatted in code blocks, (no screenshot, [more on code blocks](https://docs.github.com/en/get-started/writing-on-github/wo",
    "url": "https://github.com/huggingface/trl/issues/4481",
    "state": "open",
    "labels": [
      "\ud83d\udc1b bug",
      "\ud83c\udfcb DPO"
    ],
    "created_at": "2025-11-06T01:17:05Z",
    "updated_at": "2025-11-06T18:40:39Z",
    "comments": 0,
    "user": "DevonPeroutky"
  },
  {
    "repo": "huggingface/trl",
    "number": 4468,
    "title": "Move RLOOTrainer to trl.experimental",
    "body": "## Context\n\nPart of #4223 and #4374 - Moving trainers to experimental submodule for V1.\n\n## Task\n\nMove RLOOTrainer from main trl module to trl.experimental:\n\n- [ ] Move trainer file to trl/experimental/\n- [ ] Update imports in __init__.py files\n- [ ] Update documentation\n- [ ] Add deprecation warning in old location\n- [ ] Update tests\n- [ ] Verify examples still work\n\n## Post-V1 Plan\nMay stay in trl.experimental as maintenance cost is low.\n\n## Related\n- Parent tracking issue: #4374\n- RFC: #4223\n- BCO migration (completed): #4312",
    "url": "https://github.com/huggingface/trl/issues/4468",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation",
      "\u2728 enhancement"
    ],
    "created_at": "2025-11-05T21:30:15Z",
    "updated_at": "2025-12-05T18:21:41Z",
    "comments": 2,
    "user": "behroozazarkhalili"
  },
  {
    "repo": "huggingface/trl",
    "number": 4466,
    "title": "Move PPOTrainer to trl.experimental",
    "body": "## Context\n\nPart of #4223 and #4374 - Moving trainers to experimental submodule for V1.\n\n## Task\n\nMove PPOTrainer from main trl module to trl.experimental:\n\n- [ ] Move trainer file to trl/experimental/\n- [ ] Update imports in __init__.py files\n- [ ] Update documentation\n- [ ] Add deprecation warning in old location\n- [ ] Update tests\n- [ ] Verify examples still work\n\n## Post-V1 Plan\nMay stay in trl.experimental as it's an important baseline but requires heavy refactoring.\n\n## Related\n- Parent tracking issue: #4374\n- RFC: #4223\n- BCO migration (completed): #4312",
    "url": "https://github.com/huggingface/trl/issues/4466",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation",
      "\u2728 enhancement",
      "\ud83c\udfcb PPO"
    ],
    "created_at": "2025-11-05T21:29:54Z",
    "updated_at": "2025-11-13T19:01:20Z",
    "comments": 0,
    "user": "behroozazarkhalili"
  },
  {
    "repo": "huggingface/trl",
    "number": 4465,
    "title": "Move ORPOTrainer to trl.experimental",
    "body": "## Context\n\nPart of #4223 and #4374 - Moving trainers to experimental submodule for V1.\n\n## Task\n\nMove ORPOTrainer from main trl module to trl.experimental:\n\n- [ ] Move trainer file to trl/experimental/\n- [ ] Update imports in __init__.py files\n- [ ] Update documentation\n- [ ] Add deprecation warning in old location\n- [ ] Update tests\n- [ ] Verify examples still work\n\n## Post-V1 Plan\nMay stay in trl.experimental.\n\n## Related\n- Parent tracking issue: #4374\n- RFC: #4223\n- BCO migration (completed): #4312",
    "url": "https://github.com/huggingface/trl/issues/4465",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation",
      "\u2728 enhancement",
      "\ud83c\udfcb ORPO"
    ],
    "created_at": "2025-11-05T21:29:44Z",
    "updated_at": "2025-11-21T06:36:32Z",
    "comments": 0,
    "user": "behroozazarkhalili"
  },
  {
    "repo": "huggingface/trl",
    "number": 4463,
    "title": "Move KTOTrainer to trl.experimental",
    "body": "## Context\n\nPart of #4223 and #4374 - Moving trainers to experimental submodule for V1.\n\n## Task\n\nMove KTOTrainer from main trl module to trl.experimental:\n\n- [ ] Move trainer file to trl/experimental/\n- [ ] Update imports in __init__.py files\n- [ ] Update documentation\n- [ ] Add deprecation warning in old location\n- [ ] Update tests\n- [ ] Verify examples still work\n\n## Post-V1 Plan\nMay be promoted to main codebase after refactoring.\n\n## Related\n- Parent tracking issue: #4374\n- RFC: #4223\n- BCO migration (completed): #4312",
    "url": "https://github.com/huggingface/trl/issues/4463",
    "state": "open",
    "labels": [
      "\ud83d\udcda documentation",
      "\u2728 enhancement",
      "\ud83c\udfcb KTO"
    ],
    "created_at": "2025-11-05T21:29:25Z",
    "updated_at": "2025-11-05T21:29:50Z",
    "comments": 0,
    "user": "behroozazarkhalili"
  },
  {
    "repo": "huggingface/trl",
    "number": 4461,
    "title": "Move OnlineDPOTrainer to trl.experimental",
    "body": "## Context\n\nPart of #4223 and #4374 - Moving trainers to experimental submodule for V1.\n\n## Task\n\nMove OnlineDPOTrainer from main trl module to trl.experimental:\n\n- [ ] Move trainer file to trl/experimental/\n- [ ] Update imports in __init__.py files\n- [ ] Update documentation\n- [ ] Add deprecation warning in old location\n- [ ] Update tests\n- [ ] Verify examples still work\n\n## Post-V1 Plan\nMay be removed based on usage and maintenance requirements.\n\n## Related\n- Parent tracking issue: #4374\n- RFC: #4223\n- BCO migration (completed): #4312",
    "url": "https://github.com/huggingface/trl/issues/4461",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation",
      "\u2728 enhancement",
      "\ud83c\udfcb Online DPO"
    ],
    "created_at": "2025-11-05T21:28:08Z",
    "updated_at": "2025-11-24T01:13:07Z",
    "comments": 1,
    "user": "behroozazarkhalili"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167118,
    "title": "[CI][CUDA][B200] Why does job keep encountering \"No devices were found\" while \"nvidia-smi\" on bare-metal returns normal results",
    "body": "### \ud83d\udc1b Describe the bug\n\nJOB link: https://github.com/pytorch/pytorch/actions/runs/19096449521/job/54559623146 \nRunner/user: dgxb200-08-1003 \n\nNvidia-smi output when logged on the machine: \n\n<img width=\"673\" height=\"560\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/28d124a2-3a4e-408a-8301-4437b2541af5\" />\n\n\n### Versions\n\nInfra \n\n\ncc @ezyang @gchanan @kadeng @msaroufim @ptrblck @eqy @tinglvv @atalman @malfet @huydhn @seemethere ",
    "url": "https://github.com/pytorch/pytorch/issues/167118",
    "state": "closed",
    "labels": [
      "high priority",
      "triage review"
    ],
    "created_at": "2025-11-05T20:06:16Z",
    "updated_at": "2025-11-10T17:16:16Z",
    "comments": 4,
    "user": "nWEIdia"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28152,
    "title": "[Feature]: Factor out `zero_expert_num` from `FusedMoE`",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nWe have many special cases in `FusedMoE` for `zero_expert_num`\n\nThis parameter is used exclusively for `LongCatFlash`. We should factor this out of `FusedMoe` and put the complexity into the model file.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28152",
    "state": "open",
    "labels": [
      "help wanted",
      "feature request"
    ],
    "created_at": "2025-11-05T19:05:54Z",
    "updated_at": "2025-11-06T20:08:23Z",
    "comments": 0,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "pytorch/ao",
    "number": 3295,
    "title": "Examples of using llms with PT2E workflow?",
    "body": "Are there examples of using llms with PT2E workflow? I'm interested in static quantization using qwen3 . ",
    "url": "https://github.com/pytorch/ao/issues/3295",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2025-11-05T18:33:13Z",
    "updated_at": "2025-12-05T01:12:56Z",
    "comments": 3,
    "user": "cjm715"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28150,
    "title": "[Bug]: -O.mode=NONE (or -cc.mode=NONE) should work",
    "body": "### Your current environment\n\nmain\n\n### \ud83d\udc1b Describe the bug\n\nRight now -O.mode only accepts integer levels. Ideally it would accept ints and the string.\n\n`vllm serve -O.mode=NONE` # doesn't work\n`vllm serve -O.mode=0` # does work\n\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28150",
    "state": "closed",
    "labels": [
      "bug",
      "help wanted",
      "good first issue",
      "torch.compile"
    ],
    "created_at": "2025-11-05T18:28:23Z",
    "updated_at": "2025-11-12T00:46:20Z",
    "comments": 1,
    "user": "zou3519"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28137,
    "title": "[Feature]: Refactor `aiter_shared_expert_fusion`",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nWe have a special case in `FusedMoE` layer for `aiter_shared_expert_fusion` which creates various if branches spattered across the layer\n\nWe should factor this out\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28137",
    "state": "open",
    "labels": [
      "help wanted"
    ],
    "created_at": "2025-11-05T15:54:09Z",
    "updated_at": "2025-12-20T22:00:55Z",
    "comments": 3,
    "user": "robertgshaw2-redhat"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28132,
    "title": "[Usage]: How do I assign a specific GPU to a vLLM docker container?",
    "body": "### Your current environment\n\nstock vllm-openai:v0.11.0 docker image\nrootless Docker v.27.5.1 on Ubuntu 22.04.5 LTS on physical hardware\nNvidia Driver Version: 570.133.20\nCUDA Version: 12.8\nGPUs: 4x H100 (NVLink), numbered 0,1,2,3\n\n### How would you like to use vllm\n\nI want to run inference of [SmolLM3-3B](https://huggingface.co/HuggingFaceTB/SmolLM3-3B). The exact model doesn't matter, this happens with other models as well.\n\ni want to run this model using Docker. This basically works. However, it alway picks a different GPU than what i specify in CUDA_VISIBLE_DEVICES. Out of my four GPUs, 0 and 1 are idle. I would like the container to use GPU 0. But no matter what I try, it always decides to run on GPU 1. I can verify this using `nvtop`.\n\nThis is my compose file:\n```yaml\nservices:\n  vllm-smol:\n    container_name: smollm-3b\n    image: vllm/vllm-openai:v0.11.0\n    volumes:\n      - ./smollm-3b/models:/models\n    gpus: \"all\"\n    environment:\n      HF_HOME: \"/models\"\n      CUDA_VISIBLE_DEVICES: \"0\"\n    command: >\n      --model HuggingFaceTB/SmolLM3-3B\n      --enable-auto-tool-choice\n      --tool-call-parser=hermes\n      --gpu-memory-utilization 0.1875\n    labels:\n```\nThis way, the vLLM container starts and inferencing runs fine. But it decides to use GPU 1 instead of GPU 0\n\ni have also tried this, as docker compose will only accept `gpus: \"all\"`:\n```yaml\ndocker run -d \\\n  --name smollm-3b \\\n  -v \"$(pwd)/smollm-3b/models:/models\" \\\n  --gpus \"device=0\" \\\n  -e HF_HOME=\"/models\" \\\n  -e CUDA_VISIBLE_DEVICES=\"0\" \\\n  vllm/vllm-openai:v0.11.0 \\\n    --model HuggingFaceTB/SmolLM3-3B \\\n    --enable-auto-tool-choice \\\n    --tool-call-parser=hermes \\\n    --gpu-memory-utilization 0.1875\n```\nThis gives me an error during container startup: `RuntimeError: No CUDA GPUs are available`\nOmitting `CUDA_VISIBLE_DEVICES` gives the same error.\n\nAnd finally, there is also this attempt:\n```yaml\nservices:\n  vllm-smol:\n    container_name: smollm-3b\n    image: vllm/vllm-openai:v0.11.0\n    volumes:\n      - ./smollm-3b/models:/models\n    deploy:\n      resources:\n        reservations:\n          devices:\n          - driver: nvidia\n            device_ids: ['0']\n            capabilities: [gpu]\n    environment:\n      HF_HOME: \"/models\"\n      # CUDA_VISIBLE_DEVICES: \"0\"\n    command: >\n      --model HuggingFaceTB/SmolLM3-3B\n      --enable-auto-tool-choice\n      --tool-call-parser=hermes\n      --gpu-memory-utilization 0.1875\n```\nErrors are, once again, identical with and without `CUDA_VISIBLE_DEVICES`: `RuntimeError: No CUDA GPUs are available`\n\nAm I doing something fundamentally wrong here? All i want is to use a specific GPU (GPU 0 in my case)\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28132",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-05T14:42:17Z",
    "updated_at": "2025-11-06T14:54:41Z",
    "comments": 1,
    "user": "lindner-tj"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2389,
    "title": "How to resolve the issue that GROOT cannot train properly? Below is my training configuration and error log.",
    "body": "How to resolve the issue that GROOT cannot train properly? Below is my training configuration and error log.\n\naccelerate launch \\\n  --multi_gpu \\\n  --num_processes=2 \\\n  $(which lerobot-train) \\\n  --output_dir=./outputs/groot_training \\\n  --save_checkpoint=true \\\n  --batch_size=8 \\\n  --steps=200000 \\\n  --save_freq=20000 \\\n  --log_freq=200 \\\n  --policy.type=groot \\\n  --policy.push_to_hub=false \\\n  --policy.repo_id=your_repo_id \\\n  --dataset.root=/home/ruijia/wxl/data/train_segdata_wrist_20251028_200/ \\\n  --dataset.repo_id=ur_wrist_data \\\n  --wandb.enable=false \\\n  --wandb.disable_artifact=false \\\n  --job_name=grapdata\n\n\n\n[rank1]:[W1105 18:09:16.255729052 CUDAGuardImpl.h:119] Warning: CUDA warning: an illegal memory access was encountered (function destroyEvent)\nterminate called after throwing an instance of 'c10::Error'\n[rank1]:[E1105 18:09:16.257152106 ProcessGroupNCCL.cpp:1899] [PG ID 0 PG GUID 0(default_pg) Rank 1] Process group watchdog thread terminated with exception: CUDA error: an illegal memory access was encountered\nCUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\nFor debugging consider passing CUDA_LAUNCH_BLOCKING=1\nCompile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n\nException raised from c10_cuda_check_implementation at /pytorch/c10/cuda/CUDAException.cpp:43 (most recent call first):\nframe #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) + 0x98 (0x7c3dcab785e8 in /home/ruijia/miniconda3/envs/lerobot_pi05/lib/python3.10/site-packages/torch/lib/libc10.so)",
    "url": "https://github.com/huggingface/lerobot/issues/2389",
    "state": "open",
    "labels": [
      "training"
    ],
    "created_at": "2025-11-05T10:17:59Z",
    "updated_at": "2025-11-07T17:47:50Z",
    "user": "wuxiaolianggit"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2388,
    "title": "how to improve the generalization of the vla model like gr00t",
    "body": "After fine-tuning the gr00t,  i found that it only work for the prompt within the dataset, it is difficult for it to understand new words and new item that need to grab. \nso whether there is a method can protect the generalization, if i can create a new layer to map the output of the model to new dimensionality?",
    "url": "https://github.com/huggingface/lerobot/issues/2388",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-05T10:06:11Z",
    "updated_at": "2025-11-05T10:44:38Z",
    "user": "Temmp1e"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28119,
    "title": "[Feature]: Will we support async scheduler for pipeline parallel?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nSGLang already have https://github.com/sgl-project/sglang/pull/11852\n\nAnd I see huge perf gap on SM120 PP because of this.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28119",
    "state": "closed",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-11-05T09:55:57Z",
    "updated_at": "2025-11-07T06:14:19Z",
    "comments": 4,
    "user": "weireweire"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 122,
    "title": "I want to add an object (such as a robot) to move around in the model. How can this be achieved?",
    "body": "I want to add an object (such as a robot) to move around in the model. How can this be achieved?",
    "url": "https://github.com/huggingface/gsplat.js/issues/122",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-05T09:16:39Z",
    "updated_at": "2025-11-05T09:16:39Z",
    "user": "ThinkingInGIS"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167062,
    "title": "How to use torch.compile on Windows GPU?",
    "body": "### \ud83d\udc1b Describe the bug\n\nI have installed Python 3.13.9 and PyTorch 2.9+cuda3.13\npip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu130,\n And my GPU is RTX 380 12 GB. I have Windows 11\n\nI followed up on those steps\n\n- MSVC v143 - VS 2022 C++ x64/x86 build tools\n- Windows 11 SDK\n- C++ CMake tools for Windows\n- C++ core features\n\nand added the cl.exe into my environment path\n\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.44.35207\\bin\\Hostx64\\x64\"\n\nI tried this code\n\n```\nimport torch\ndevice=\"cuda\"\ndef foo(x, y):\n    a = torch.sin(x)\n    b = torch.cos(x)\n    return a + b\nopt_foo1 = torch.compile(foo)\nprint(opt_foo1(torch.randn(10, 10).to(device), torch.randn(10, 10).to(device)))\n```\n\n### Error logs\n\nCppCompileError: C++ compile error Command: cl /I c:/Users/Emad Younan/AppData/Local/Programs/Python/Python313/Include /I c:/Users/Emad Younan/AppData/Local/Programs/Python/Python313/Lib/site-packages/torch/include /I c:/Users/Emad Younan/AppData/Local/Programs/Python/Python313/Lib/site-packages/torch/include/torch/csrc/api/include /D NOMINMAX /D TORCH_INDUCTOR_CPP_WRAPPER /D STANDALONE_TORCH_HEADER /D C10_USING_CUSTOM_GENERATED_MACROS /O2 /DLL /MD /std:c++20 /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc /Zc:__cplusplus /permissive- /openmp /openmp:experimental C:/temp/torch_compile/bi/cbil2ud2wplsgzj6esiu72j2t7zq6phvrdyun5pl56vn2g26y5qg.main.cpp /FeC:/temp/torch_compile/bi/cbil2ud2wplsgzj6esiu72j2t7zq6phvrdyun5pl56vn2g26y5qg.main.pyd /LD /link /LIBPATH:c:/Users/Emad Younan/AppData/Local/Programs/Python/Python313/libs /LIBPATH:c:/Users/Emad Younan/AppData/Local/Programs/Python/Python313/Lib/site-packages/torch/lib torch.lib torch_cpu.lib torch_python.lib sleef.lib c10.lib Output: Microsoft (R) C/C++ Optimizing Compiler Version 19.44.35219 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl : Command line warning D9025 : overriding \u2018/openmp\u2019 with \u2018/openmp:experimental\u2019 cbil2ud2wplsgzj6esiu72j2t7zq6phvrdyun5pl56vn2g26y5qg.main.cpp c:/Users/Emad Younan/AppData/Local/Programs/Python/Python313/Lib/site-packages/torch/include\\torch/csrc/inductor/cpp_prefix.h(3): fatal error C1083: Cannot open include file: \u2018omp.h\u2019: No such file or directory\n\n### Versions\n\npip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu130\n\ncc @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex @chauhang @penguinwu",
    "url": "https://github.com/pytorch/pytorch/issues/167062",
    "state": "open",
    "labels": [
      "module: windows",
      "triaged",
      "oncall: pt2"
    ],
    "created_at": "2025-11-05T09:04:27Z",
    "updated_at": "2025-11-11T18:16:46Z",
    "user": "emadyounan"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28104,
    "title": "[Usage]: vllm bench serve\u4e0d\u80fd\u7528sharegpt\u6570\u636e\u96c6",
    "body": "### Your current environment\n\n```text\n\u6211\u8fd0\u884c\u4ee5\u4e0bbencmmarks\u547d\u4ee4\uff1avllm bench serve --model Qwen3 --tokenizer /mnt/workspace/models --host 127.0.0.1 --port 80 --num-prompts 400 --percentile-metrics ttft,tpot,itl,e2el --metric-percentiles 90,95,99 --dataset-name sharegpt --data\nset-path /mnt/workspace/benchmarks/sharegpt/ShareGPT_V3_unfiltered_cleaned_split.json --sharegpt-output-len 512\n\u4f1a\u62a5\u4e00\u4e0b\u9519\u8bef\uff1a/usr/local/lib/python3.12/dist-packages/torch/cuda/init.py:61: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.\nimport pynvml # type: ignore[import]\nINFO 11-04 22:14:30 [init.py:243] Automatically detected platform cuda.\nINFO 11-04 22:14:32 [init.py:31] Available plugins for group vllm.general_plugins:\nINFO 11-04 22:14:32 [init.py:33] - lora_filesystem_resolver -> vllm.plugins.lora_resolvers.filesystem_resolver:register_filesystem_resolver\nINFO 11-04 22:14:32 [init.py:36] All plugins in this group will be loaded. Set to control which plugins to load.\nusage: vllm bench serve [options]\nvllm bench <bench_type> [options] serve: error: argument --dataset-name: invalid choice: 'sharegpt' (choose from random). \u8bf7\u95ee\u4e3a\u4ec0\u4e48\u6211\u8fd9\u4e2a\u4f1a\u62a5\u9519\uff1f\uff1f\uff1fVLLM_PLUGINS\n```\n\n\n### How would you like to use vllm\n\nhow to solve it\uff1f\uff1f\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28104",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-05T06:18:02Z",
    "updated_at": "2025-11-06T14:24:46Z",
    "comments": 1,
    "user": "uOnePiece"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167042,
    "title": "Requesting Cuda 13 support",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHi! I am trying to run Torch with GPU support. I am running on Windows, with CUDA toolkit 13 installed, and the latest nvidia drivers. `torch.cuda.is_available()` is showing as False. Is it safe to assume this is because it needs CUDA 12?\n\nI'm brand new to Torch, but do a bit of CUDA FFI from rust in my own code, and have been able to get Python FFI working with that. The gist is, if you just use the CUDA Driver API, the application (In this case me running Pytorch) doesn't even need CUDA installed; just compatible drivers. The PC *compiling* the program needs CUDA. For things like cuFFT, you can ship the DLL/SO with the program, then it will work. Maybe we need something like that? What specific things beyond the Driver API does Torch use? Or do you think something else is wrong?\n\nThank you! Happy to help narrow this down and solve.\n\n### Why this is something we should add\nWhen you go to the nvidia site and download CUDA, it is downloading by default a version that doesn't work with Torch (?).",
    "url": "https://github.com/pytorch/pytorch/issues/167042",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-05T01:41:01Z",
    "updated_at": "2025-11-05T01:51:37Z",
    "comments": 1,
    "user": "David-OConnor"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 167027,
    "title": "combine compiled vectorized function without recompiling already compiled part",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nThe nice thing of `torch.compile` is that it fuses the vectorized operations and avoid big intermediate tensors. For example, if I have\n```\ndef func(x):\n    y = f1(x)\n    z = f2(y)\n    return z\n```\nAfter `torch.compile` it becomes something like\n```\nfor(int i=0;i<len(x);i++) {\n    tmp_scalar = f1(x[i])\n    z[i] = f2(tmp_scalar)\n}\n```\nHowever if `f1` and `f2` are big functions, it expands everything inside. Is there a way to prevent the expansion of `f1` and `f2`, while still keeping the fusing behavior, for the purpose of reducing compilation time? In C++, `f1` and `f2` should be compiled into a non-inlined scalar function, and I would just like to do another compilation to combine `f1` and `f2` and then loop over `i`. If I understand correctly, graph break does not try to fuse the separated parts, although it can avoid recompilation.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @chauhang @penguinwu @voznesenskym @EikanWang @Guobing-Chen @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @aakhundov @coconutruben",
    "url": "https://github.com/pytorch/pytorch/issues/167027",
    "state": "open",
    "labels": [
      "triaged",
      "intel",
      "oncall: pt2",
      "module: inductor"
    ],
    "created_at": "2025-11-05T00:16:52Z",
    "updated_at": "2025-11-11T18:15:06Z",
    "comments": 1,
    "user": "SUSYUSTC"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28070,
    "title": "[Usage]: Is there a way to control default thinking behaviour of a model?",
    "body": "### Your current environment\n\nIs there a way to control default thinking behaviour for models deployed through vllm.\nAs per https://docs.vllm.ai/en/stable/features/reasoning_outputs.html,\nIBM Grantie 3.2 reasoning is disabled by default.\nQwen3, GLM 4.6, Deepseek V3.1 all have reasoning enabled by default.\nIt would be great if there is a way to control this from vllm.\n--override-generation-config allows user to override temperature and other params at deployment.\nBut this does not work for reasoning.\nI have tried\n`docker run -d  --runtime nvidia -e TRANSFORMERS_OFFLINE=1  -e DEBUG=\"true\"   -p 8000:8000   --ipc=host   vllm/vllm-openai:v0.11.0   --reasoning-parser qwen3 --model Qwen/Qwen3-4B --override-generation-config '{\"chat_template_kwargs\": {\"enable_thinking\": false}}'`\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28070",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-04T22:03:32Z",
    "updated_at": "2025-12-30T03:38:48Z",
    "comments": 0,
    "user": "yz342"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28056,
    "title": "[Bug]: Missing libarm_compute.so in Arm CPU pip installed wheels",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nWe now have vllm wheels for Arm CPUs in pypi thanks to https://github.com/vllm-project/vllm/pull/26931 and https://github.com/vllm-project/vllm/pull/27331\n\nYou can install Arm CPU wheels with:\n```\npip install --pre vllm==0.11.1rc3+cpu --extra-index-url https://wheels.vllm.ai/0.11.1rc3%2Bcpu/\n```\n\nHowever it will currently fail, unless you ldpreload ACL: \n```\nWARNING 10-29 12:33:18 [interface.py:171] Failed to import from vllm._C: ImportError('libarm_compute.so: cannot open shared object file: No such file or directory')\nWe need to figure out how to package libarm_compute.so in the wheel\n ```\n\nBest way to reproduce this locally is: \n- build vllm from main locally with `VLLM_TARGET_DEVICE=cpu python3 setup.py bdist_wheel`\n- remove `vllm/deps` which contains the libarm_compute.so\n- pip install the wheel you built\n\nthen you will run into the issue (because it will try to load libarm_compute.so under vllm/.deps/arm_compute-src/build/)\n\nNote: ACL/oneDNN are built in vllm here: \n\nWe need to figure out how to bundle `libarm_compute.so` in the wheel to avoid this.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28056",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-04T17:22:55Z",
    "updated_at": "2025-11-13T05:43:10Z",
    "comments": 2,
    "user": "fadara01"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1989,
    "title": "Should MFU/tflops take tensor parallelism into account?",
    "body": "Right now model flops is computed before TP is applied. But TP changes the sizes of the matrices so I think the flops computation should be different as well?",
    "url": "https://github.com/pytorch/torchtitan/issues/1989",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-11-04T16:51:12Z",
    "updated_at": "2025-11-05T00:04:49Z",
    "user": "chelsea0x3b"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28046,
    "title": "Qwen3-Omni model inference : ValueError: Either SamplingParams or PoolingParams must be provided.",
    "body": "### Your current environment\n\n```text\nThe output of `python web_demo.py`\n```\n\nThe above mentioned method provides the error below \n```\n\nqwen/Qwen3-Omni/collect_env.py\", line 287, in get_vllm_version\n    from vllm import __version__, __version_tuple__\nImportError: cannot import name '__version__' from 'vllm' (unknown location)\n```\nwhile the envs installed are below:\n\n```\n\n pip list\nPackage                           Version                           Editable project location\n--------------------------------- --------------------------------- ----------------------------------------------------------\naccelerate                        1.11.0\naiofiles                          24.1.0\naiohappyeyeballs                  2.6.1\naiohttp                           3.13.2\naiosignal                         1.4.0\nairportsdata                      20250909\nannotated-doc                     0.0.3\nannotated-types                   0.7.0\nanyio                             4.11.0\nastor                             0.8.1\nasync-timeout                     5.0.1\nattrs                             25.4.0\naudioread                         3.1.0\nav                                16.0.1\nblake3                            1.0.8\nBrotli                            1.1.0\ncachetools                        6.2.1\ncertifi                           2025.10.5\ncffi                              2.0.0\ncharset-normalizer                3.4.4\nclick                             8.2.1\ncloudpickle                       3.1.2\ncmake                             4.1.2\ncompressed-tensors                0.10.2\ncupy-cuda12x                      13.6.0\ndecorator                         5.2.1\ndepyf                             0.18.0\ndill                              0.4.0\ndiskcache                         5.6.3\ndistro                            1.9.0\ndnspython                         2.8.0\neinops                            0.8.1\nemail-validator                   2.3.0\nexceptiongroup                    1.3.0\nfastapi                           0.121.0\nfastapi-cli                       0.0.14\nfastapi-cloud-cli                 0.3.1\nfastrlock                         0.8.3\nffmpy                             0.6.4\nfilelock                          3.20.0\nflash_attn                        2.8.3\nfrozenlist                        1.8.0\nfsspec                            2025.10.0\ngguf                              0.17.1\ngradio                            5.44.1\ngradio_client                     1.12.1\ngroovy                            0.1.2\nh11                               0.16.0\nhf-xet                            1.2.0\nhttpcore                          1.0.9\nhttptools                         0.7.1\nhttpx                             0.28.1\nhuggingface-hub                   0.36.0\nidna                              3.11\ninteregular                       0.3.3\nJinja2                            3.1.6\njiter                             0.11.1\njoblib                            1.5.2\njsonschema                        4.25.1\njsonschema-specifications         2025.9.1\nlark                              1.2.2\nlazy_loader                       0.4\nlibrosa                           0.11.0\nllguidance                        0.7.30\nllvmlite                          0.44.0\nlm-format-enforcer                0.10.12\nmarkdown-it-py                    4.0.0\nMarkupSafe                        3.0.3\nmdurl                             0.1.2\nmistral_common                    1.8.5\nmpmath                            1.3.0\nmsgpack                           1.1.2\nmsgspec                           0.19.0\nmultidict                         6.7.0\nnest-asyncio                      1.6.0\nnetworkx                          3.4.2\nninja                             1.13.0\nnumba                             0.61.2\nnumpy                             2.2.6\nnvidia-cublas-cu12                12.6.4.1\nnvidia-cuda-cupti-cu12            12.6.80\nnvidia-cuda-nvrtc-cu12            12.6.77\nnvidia-cuda-runtime-cu12          12.6.77\nnvidia-cudnn-cu12                 9.5.1.17\nnvidia-cufft-cu12                 11.3.0.4\nnvidia-cufile-cu12                1.11.1.6\nnvidia-curand-cu12                10.3.7.77\nnvidia-cusolver-cu12              11.7.1.2\nnvidia-cusparse-cu12              12.5.4.2\nnvidia-cusparselt-cu12            0.6.3\nnvidia-nccl-cu12                  2.26.2\nnvidia-nvjitlink-cu12             12.6.85\nnvidia-nvtx-cu12                  12.6.77\nopenai                            1.90.0\nopencv-python-headless            4.12.0.88\norjson                            3.11.4\noutlines                          0.1.11\noutlines_core                     0.1.26\npackaging                         25.0\npandas                            2.3.3\npartial-json-parser               0.2.1.1.post6\npillow                            11.3.0\npip                               25.2\nplatformdirs                      4.5.0\npooch                             1.8.2\nprometheus_client                 0.23.1\nprometheus-fastapi-instrumentator 7.1.0\npropcache                 ",
    "url": "https://github.com/vllm-project/vllm/issues/28046",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-04T13:59:57Z",
    "updated_at": "2025-11-24T19:24:39Z",
    "comments": 22,
    "user": "Tortoise17"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28045,
    "title": "[Doc]: Any detailed documentation about how to load_weights in customized vllm model?",
    "body": "### \ud83d\udcda The doc issue\n\nI don't know how to modify the attention and how the load_model works.\n\nThe documentation says too few, I find it's hard to understand.\n\nAnyone has some more detailed experience? Thank you!\n\n### Suggest a potential alternative/fix\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28045",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-11-04T13:23:25Z",
    "updated_at": "2025-11-05T02:07:55Z",
    "comments": 0,
    "user": "sleepwalker2017"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28035,
    "title": "[Usage]: deepseek-ocr The output token count is too low and unstable.",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\npython3 -m vllm.entrypoints.openai.api_server --served-model-name deepseek-ocr --model deepseekocr --tensor-parallel-size 1 --gpu-memory-utilization 0.95 --disable-log-requests --logits_processors vllm.model_executor.models.deepseek_ocr:NGramPerReqLogitsProcessor\n\n {\n            \"model\": \"DeepSeek-OCR\",\n            \"messages\": [{\n                \"role\": \"user\",\n                \"content\": [\n                    {\n                        \"type\": \"image_url\",\n                        \"image_url\": {\"url\": f\"data:image/jpeg;base64,{self.image_to_base64(image_path)}\"}\n                    },\n                    {\"type\": \"text\", \"text\": \u201d<image>\\nFree OCR.\u201c}\n                ]\n            }],\n        \"vllm_xargs\": {\n            \"ngram_size\": 30,\n            \"window_size\": 100,\n            \"whitelist_token_ids\": \"[128821, 128822]\"\n        },\n            \"temperature\": 0.0,\n            \"max_tokens\": 4096\n        }\n\n\n\"finish_reason\":\"stop\"  but \"completion_tokens\":200+ \uff0ccannot output the complete image content.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28035",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-04T09:50:53Z",
    "updated_at": "2025-11-04T09:50:53Z",
    "comments": 0,
    "user": "sixgod-666"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28031,
    "title": "[Usage]: Error: Failed to initialize the TMA descriptor 700",
    "body": "### Your current environment\n\nvllm0.11.0  to train Qwen3-vl-8B  \n\nThe following error message appears intermittently during training.\n```\n[36m(WorkerDict pid=82555)\u001b[0m TMA Desc Addr:   0x7f4e2736b080\n\u001b[36m(WorkerDict pid=82555)\u001b[0m format         9\n\u001b[36m(WorkerDict pid=82555)\u001b[0m dim            4\n\u001b[36m(WorkerDict pid=82555)\u001b[0m gmem_address   0xa9bdcd0000\n\u001b[36m(WorkerDict pid=82555)\u001b[0m globalDim      (128,415,2,1,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m globalStrides  (2,2048,1024,0,0)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m boxDim         (64,128,1,1,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m elementStrides (1,1,1,1,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m interleave     0\n\u001b[36m(WorkerDict pid=82555)\u001b[0m swizzle        3\n\u001b[36m(WorkerDict pid=82555)\u001b[0m l2Promotion    2\n\u001b[36m(WorkerDict pid=82555)\u001b[0m oobFill        0\n\u001b[36m(WorkerDict pid=82555)\u001b[0m Error: Failed to initialize the TMA descriptor 700\n\u001b[36m(WorkerDict pid=82555)\u001b[0m TMA Desc Addr:   0x7f4e2736b080\n\u001b[36m(WorkerDict pid=82555)\u001b[0m format         9\n\u001b[36m(WorkerDict pid=82555)\u001b[0m dim            4\n\u001b[36m(WorkerDict pid=82555)\u001b[0m gmem_address   0xa46a000000\n\u001b[36m(WorkerDict pid=82555)\u001b[0m globalDim      (128,16,2,61647,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m globalStrides  (2,512,256,8192,0)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m boxDim         (64,128,1,1,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m elementStrides (1,1,1,1,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m interleave     0\n\u001b[36m(WorkerDict pid=82555)\u001b[0m swizzle        3\n\u001b[36m(WorkerDict pid=82555)\u001b[0m l2Promotion    2\n\u001b[36m(WorkerDict pid=82555)\u001b[0m oobFill        0\n\u001b[36m(WorkerDict pid=82555)\u001b[0m Error: Failed to initialize the TMA descriptor 700\n\u001b[36m(WorkerDict pid=82555)\u001b[0m TMA Desc Addr:   0x7f4e2736b080\n\u001b[36m(WorkerDict pid=82555)\u001b[0m format         9\n\u001b[36m(WorkerDict pid=82555)\u001b[0m dim            4\n\u001b[36m(WorkerDict pid=82555)\u001b[0m gmem_address   0xa48819e000\n\u001b[36m(WorkerDict pid=82555)\u001b[0m globalDim      (128,16,2,61647,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m globalStrides  (2,512,256,8192,0)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m boxDim         (64,128,1,1,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m elementStrides (1,1,1,1,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m interleave     0\n\u001b[36m(WorkerDict pid=82555)\u001b[0m swizzle        3\n\u001b[36m(WorkerDict pid=82555)\u001b[0m l2Promotion    2\n\u001b[36m(WorkerDict pid=82555)\u001b[0m oobFill        0\n\u001b[36m(WorkerDict pid=82555)\u001b[0m Error: Failed to initialize the TMA descriptor 700\n\u001b[36m(WorkerDict pid=82555)\u001b[0m TMA Desc Addr:   0x7f4e2736b080\n\u001b[36m(WorkerDict pid=82555)\u001b[0m format         9\n\u001b[36m(WorkerDict pid=82555)\u001b[0m dim            4\n\u001b[36m(WorkerDict pid=82555)\u001b[0m gmem_address   0xa46a000000\n\u001b[36m(WorkerDict pid=82555)\u001b[0m globalDim      (128,16,2,61647,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m globalStrides  (2,512,256,8192,0)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m boxDim         (64,128,1,1,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m elementStrides (1,1,1,1,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m interleave     0\n\u001b[36m(WorkerDict pid=82555)\u001b[0m swizzle        3\n\u001b[36m(WorkerDict pid=82555)\u001b[0m l2Promotion    2\n\u001b[36m(WorkerDict pid=82555)\u001b[0m oobFill        0\n\u001b[36m(WorkerDict pid=82555)\u001b[0m Error: Failed to initialize the TMA descriptor 700\n\u001b[36m(WorkerDict pid=82555)\u001b[0m TMA Desc Addr:   0x7f4e2736b080\n\u001b[36m(WorkerDict pid=82555)\u001b[0m format         9\n\u001b[36m(WorkerDict pid=82555)\u001b[0m dim            4\n\u001b[36m(WorkerDict pid=82555)\u001b[0m gmem_address   0xa48819e000\n\u001b[36m(WorkerDict pid=82555)\u001b[0m globalDim      (128,16,2,61647,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m globalStrides  (2,512,256,8192,0)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m boxDim         (64,128,1,1,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m elementStrides (1,1,1,1,1)\n\u001b[36m(WorkerDict pid=82555)\u001b[0m interleave     0\n\u001b[36m(WorkerDict pid=82555)\u001b[0m swizzle        3\n\u001b[36m(WorkerDict pid=82555)\u001b[0m l2Promotion    2\n\u001b[36m(WorkerDict pid=82555)\u001b[0m oobFill        0\n\u001b[36m(WorkerDict pid=82555)\u001b[0m Error: Failed to initialize the TMA descriptor 700\n\u001b[36m(WorkerDict pid=82555)\u001b[0m CUDA error (/workspace/.deps/vllm-flash-attn-src/hopper/flash_fwd_launch_template.h:191): an illegal memory access was encountered\n\u001b[36m(WorkerDict pid=82558)\u001b[0m l2Promotion    2\n\u001b[36m(WorkerDict pid=82558)\u001b[0m l2Promotion    2\n\u001b[36m(WorkerDict pid=82558)\u001b[0m l2Promotion    2\n\u001b[36m(WorkerDict pid=82558)\u001b[0m l2Promotion    2\n\u001b[36m(WorkerDict pid=82558)\u001b[0m l2Promotion    2\n```\n\n\nthen the error message below is being repeated, but training has not stopped.\n\n```\n[36m(WorkerDict pid=134586)\u001b[0m [rank7]:[W1104 07:52:01.751088784 TCPStore.cpp:125] [c10d] recvValue failed on SocketImpl(fd=90, addr=[train-kubeflow-72-46805-20251104102107-master-0]:49384, remote=[train-kubeflow-72-46805-20251104102107-master-0]:32991): Connection reset by peer\u001b[32m [repeated 6x across cluster]\u001b[0m\n\u001b[36m(WorkerDict pid=134586)\u001b[0m Exception raised from recvBytes at /pytorch/torch/csrc/distributed/c10d/Utils.hpp:679 (most recent call first):\u001b[32m [repeated 6x across cluster]\u001b[0m\n\u001b[36m(WorkerDict pid=134580)\u001b[0m frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::ba",
    "url": "https://github.com/vllm-project/vllm/issues/28031",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-04T08:13:45Z",
    "updated_at": "2025-12-11T08:18:15Z",
    "comments": 4,
    "user": "DBMing"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28016,
    "title": "[Usage]: How to recognize PDFs in DeepSeek-OCR with openai",
    "body": "### Your current environment\n```\nvllm serve deepseek-ai/DeepSeek-OCR --logits_processors vllm.model_executor.models.deepseek_ocr.NGramPerReqLogitsProcessor --no-enable-prefix-caching --mm-processor-cache-gb 0\n```\n\n\n\n### How would you like to use vllm\n\nHow to recognize PDFs and convert PDFs to Markdown with DeepSeek-OCR via an OpenAI-compatible API?\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/28016",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-04T03:35:38Z",
    "updated_at": "2025-11-04T07:33:07Z",
    "comments": 2,
    "user": "shoted"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 28003,
    "title": "[Usage]:",
    "body": "### Your current environment\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version                : Could not collect\nCMake version                : version 4.1.0\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.11 (main, Jun  4 2025, 08:56:18) [GCC 11.4.0] (64-bit runtime)\nPython platform              : Linux-6.8.0-54-generic-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : GPU 0: NVIDIA H100 NVL\nNvidia driver version        : 570.86.10\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        52 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               48\nOn-line CPU(s) list:                  0-47\nVendor ID:                            AuthenticAMD\nModel name:                           AMD EPYC 9654 96-Core Processor\nCPU family:                           25\nModel:                                17\nThread(s) per core:                   1\nCore(s) per socket:                   1\nSocket(s):                            48\nStepping:                             1\nBogoMIPS:                             4799.59\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw perfctr_core ssbd ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr wbnoinvd arat npt lbrv nrip_save tsc_scale vmcb_clean flushbyasid pausefilter pfthreshold v_vmsave_vmload vgif vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid fsrm flush_l1d arch_capabilities\nVirtualization:                       AMD-V\nL1d cache:                            3 MiB (48 instances)\nL1i cache:                            3 MiB (48 instances)\nL2 cache:                             24 MiB (48 instances)\nL3 cache:                             768 MiB (48 instances)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-47\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Vulnerable: Safe RET, no microcode\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affected\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-python==0.3.1\n[pip3] numpy==2.2.6\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cudnn-frontend==1.14.1\n[pip3] nvidia-cufft-cu12==11.3.3.83\n[pip3] nvidia-cufile-cu12==1.13.1.3\n[pip3] nvidia-curand-cu12==10.3.9.90\n[pip3] nvidia-cusolver-cu12==11.7.3.90\n[pip3] nvidia-cusparse-cu12==12.5.8.93\n[pip3] nvidia-cuspa",
    "url": "https://github.com/vllm-project/vllm/issues/28003",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-03T21:19:15Z",
    "updated_at": "2025-11-26T15:32:40Z",
    "comments": 1,
    "user": "amitmvyas"
  },
  {
    "repo": "pytorch/ao",
    "number": 3281,
    "title": "[moe training] Update torchao docsite with MoE training docs",
    "body": "Currently the MoE training docs live in this [README](https://github.com/pytorch/ao/blob/main/torchao/prototype/moe_training/README.md). \n\nTo make the prototype more discoverable and usable, we should:\n\n1. Update the the [docsite](https://docs.pytorch.org/ao/stable/index.html)\n2. Update torchtitan docs with examples for mxfp8 moe training\n",
    "url": "https://github.com/pytorch/ao/issues/3281",
    "state": "open",
    "labels": [
      "topic: documentation",
      "moe"
    ],
    "created_at": "2025-11-03T18:34:01Z",
    "updated_at": "2025-11-03T18:34:10Z",
    "comments": 0,
    "user": "danielvegamyhre"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27995,
    "title": "[RFC]: Make PassConfig flags less verbose",
    "body": "### Motivation.\n\nAlmost all `PassConfig` field names have `enable_` in the name, which is unnecessarily verbose. They are also pretty long, and sometimes not descriptive enough. Finally, `enable_fusion` should be split into rmsnorm+quant and activation+quant flags as we want to control these flags separately.\n\n### Proposed Change.\n\nWe should rename the flags:\n- `enable_async_tp` -> `fuse_gemm_comms`\n- `enable_attn_fusion` -> `fuse_attn_quant` \n- `enable_fi_allreduce_fusion` -> `fuse_allreduce_rms` \n- `enable_fusion` -> `fuse_norm_quant`, `fuse_act_quant`\n- `enable_noop` -> `eliminate_noops`\n- `enable_sequence_parallelism` -> `enable_sp`\n\nFor future RoPE-based fusion passes, the flags will look like:\n- `enable_qknorm_rope_fusion` -> `fuse_qknorm_rope`\n- `enable_rope_cache_fusion` -> `fuse_rope_cache`\n- ...\n\nWe can deprecate the original flags in the next release and map them to the new ones, and remove them 1 or even 2 releases later (shouldn't be hard to support). These flags will be used less commonly after `-O` optimization levels land anyway.\n\n### Feedback Period.\n\n1 week, 11/3 - 11/7\n\n### CC List.\n\n@zou3519 @youkaichao @mgoin @ilmarkov @nvpohanh @pavanimajety \n\n### Any Other Things.\n\nWith passes following a common construction convention, we can also add a `full_pass_pipeline` arg where users can control the exact order of the passes if necessary, but that is less likely to be needed urgently and can be added later.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27995",
    "state": "closed",
    "labels": [
      "help wanted",
      "good first issue",
      "RFC",
      "torch.compile"
    ],
    "created_at": "2025-11-03T17:49:29Z",
    "updated_at": "2025-12-03T19:53:01Z",
    "comments": 7,
    "user": "ProExpertProg"
  },
  {
    "repo": "huggingface/peft",
    "number": 2888,
    "title": "Potential remote code execution via untrusted tokenizer_kwargs in PromptEmbedding",
    "body": "### Description\n\nA remote code execution vector exists in the PEFT prompt-tuning flow. A remote `adapter_config.json` can inject loader kwargs that are forwarded to `AutoTokenizer.from_pretrained` calls. If an attacker sets `\"tokenizer_kwargs\": {\"trust_remote_code\": true}` and points `tokenizer_name_or_path` at an attacker-controlled repo, constructing the prompt embedding will cause `AutoTokenizer.from_pretrained(...)` to import and run code from that repo. This happens during normal initialization and requires no further user interaction.\n\n### Root Cause \n\n`PromptEmbedding` trusts and forwards fields from config into `AutoTokenizer.from_pretrained` without validating or sanitizing them:\n\nhttps://github.com/huggingface/peft/blob/30a19a08f9ef85ce1095b9ac69e78269121525e2/src/peft/tuners/prompt_tuning/model.py#L78-L84 \n\n### Impact\n\nThis issue turns remote configuration files into attack vectors. Any user who loads a malicious adapter config can have arbitrary code executed on their machine. The compromise is silent, requires no extra user action beyond `from_pretrained`, and is easy to weaponize by publishing a seemingly legitimate config that explicitly set `trust_remote_code=True` and points to attacker code. Consequences include command execution, credential and data theft, file tampering, and worm infection if environment tokens or write permissions are present. This should be fixed urgently by treating config-supplied kwargs as untrusted: filter or reject sensitive parameters such as `trust_remote_code`. \n\n### Who can help?\n\n@benjaminbossan @githubnemo\n\n### Reproduction\n\nA malicious remote config can look like:\n\n```json\n{\n  \"base_model_name_or_path\": \"XManFromXlab/peft-prompt-embedding-rce\",\n  \"tokenizer_name_or_path\": \"XManFromXlab/peft-prompt-embedding-rce\"\n  \"tokenizer_kwargs\": { \"trust_remote_code\": true }\n}\n```\n\nWhen users are attracted to the repo and use peft to load the config from remote repo\n\n```python\nfrom peft import PromptEmbedding, PromptTuningConfig\nfrom transformers import AutoModelForSeq2SeqLM\n\nt5_model = AutoModelForSeq2SeqLM.from_pretrained(\"t5-base\")\n\nexample_model = \"XManFromXlab/peft-prompt-embedding-rce\"\nconfig = PromptTuningConfig.from_pretrained(example_model, trust_remote_code=False)\nprompt_embedding = PromptEmbedding(config, t5_model.shared)\n```\n\nDuring `PromptEmbedding` initialization the code reads `tokenizer_kwargs` from the remote config and calls `AutoTokenizer.from_pretrained(config.tokenizer_name_or_path, **tokenizer_kwargs)`. Because `trust_remote_code` was injected via the config, the loader imports and executes the attacker\u2019s backend code, demonstrating RCE.\n\n\n### Expected behavior\n\n\nIn my example, the above code will print the message 'Execute Malicious Payload!!!!!!', which indicates the execution of malicious scripts.\n\n```bash\n$ python3 main.py                                                                                                                                                           \nExecute Malicious Payload!!!!!!                                                                                      \nExecute Malicious Payload!!!!!!\nExecute Malicious Payload!!!!!!                  \n```",
    "url": "https://github.com/huggingface/peft/issues/2888",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-03T16:04:52Z",
    "updated_at": "2025-11-04T17:50:28Z",
    "comments": 3,
    "user": "Vancir"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166866,
    "title": "ROCm failures during provisioning step due to network issues",
    "body": "## Current Status\nMitigated\n\nMI250 Cirrascale cluster had a network outage causing jobs to fail\n\n## Error looks like\nError during Set up job:\n```\nDownload action repository 'pytorch/pytorch@main' (SHA:335b5c7d4bf3295d517902370142f007ca024cd0)\nWarning: Failed to download action 'https://api.github.com/repos/pytorch/pytorch/tarball/335b5c7d4bf3295d517902370142f007ca024cd0'. Error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing. \nWarning: Back off 14.448 seconds before retry.\nWarning: Failed to download action 'https://api.github.com/repos/pytorch/pytorch/tarball/335b5c7d4bf3295d517902370142f007ca024cd0'. Error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing. \nWarning: Back off 28.951 seconds before retry.\nError: Action 'https://api.github.com/repos/pytorch/pytorch/tarball/335b5c7d4bf3295d517902370142f007ca024cd0' download has timed out. Error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing. \n```\n\n## Incident timeline (all times pacific)\nStarted - 11PM PST, Nov 2\nReduce the frequency of MI2xx-based workflows - rocm.yml and inductor-rocm.yml - to once every hour - 9:33AM PST, Nov 3\nLower runner check gpu count for distributed jobs - 10:44AM PST, Nov 4\n\n## User impact\nMultiple ROCm related failures\n\n## Root cause\nNetwork issues on MI250 Cirrascale cluster\n\n## Mitigation\n*How did we mitigate the issue?*\nSince the networking issues were taking too long to resolve, we decided to reduce/move the workloads to the other MI2xx nodes if possible:\n* Reduce the frequency of MI2xx-based workflows - rocm.yml and inductor-rocm.yml - to once every hour: https://github.com/pytorch/pytorch/pull/166870\n* Allow distributed jobs to run on 2-GPU MI2xx nodes: https://github.com/pytorch/pytorch/pull/166961\n\n## Prevention/followups\n*How do we prevent issues like this in the future?*\nWe will try to implement more monitoring of metrics such as network speed at the cluster level to catch such issues faster before they impact PyTorch CI more widely.\n\ncc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang @naromero77amd",
    "url": "https://github.com/pytorch/pytorch/issues/166866",
    "state": "closed",
    "labels": [
      "module: rocm",
      "ci: sev"
    ],
    "created_at": "2025-11-03T15:57:42Z",
    "updated_at": "2025-11-04T23:54:15Z",
    "comments": 5,
    "user": "atalman"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2371,
    "title": "memory increase continuously during training Groot",
    "body": "### System Info\n\n```Shell\n- lerobot version: 0.4.1\n- Platform: Linux-5.4.250-2-velinux1u3-amd64-x86_64-with-glibc2.31\n- Python version: 3.10.15\n- Huggingface Hub version: 0.35.3\n- Datasets version: 4.1.1\n- Numpy version: 2.1.3\n- PyTorch version: 2.7.1+cu126\n- Is PyTorch built with CUDA support?: True\n- Cuda version: 12.6\n- GPU model: NVIDIA GeForce RTX 4090\n- Using GPU in script?: <fill in>\n```\n\n### Information\n\n- [ ] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nrun\n`     lerobot-train \\\n    --output_dir=$OUTPUT_DIR \\\n    --save_checkpoint=true \\\n    --batch_size=64 \\\n    --steps=10000 \\\n    --save_freq=1000 \\\n    --log_freq=100 \\\n    --policy.push_to_hub=false \\\n    --policy.type=groot \\\n    --dataset.repo_id=$DATASET_ID \\\n    --dataset.root=$DATASET_ROOT_DIR \\\n    --dataset.streaming=false \\\n    --dataset.image_transforms.enable=true \\\n    --wandb.enable=true \\\n    --wandb.mode=offline \\\n    --wandb.project=groot_test \\\n    --job_name=$JOB_NAME \\`\n\n### Expected behavior\n\nmemory increase until out of memory",
    "url": "https://github.com/huggingface/lerobot/issues/2371",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "performance"
    ],
    "created_at": "2025-11-03T14:38:52Z",
    "updated_at": "2025-12-31T13:17:11Z",
    "user": "caoran2025"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1979,
    "title": "question of PP x aux_loss for MoE",
    "body": "\nIn short, does PP allow multiple-args input and multiple-args output?\n\n\u2014\u2014\n\nHey, we\u2019ve been stuck for a while on how to properly integrate aux loss for MoE training with PP and compile(full_graph).\n\nFor context, both DeepSeek V3 and GLM 4.5 mention that\n\n> \u201cWe also applied an auxiliary sequence-level balance loss with a 0.0001 weight to avoid extreme imbalance within any single sequence.\u201d\n\n(We could open a PR for the sequence-level balance loss if you\u2019re interested.)\n\nTo make this work, we need to compute the extra loss at each block, either by:\n\n- Caching the  per-layer aux_loss loss (which breaks compile, but not PP), or\n\n- Passing both activations and aux_loss to the next PP stage (which doesn\u2019t affect compile).\n\nThe second option basically requires the PP API to support multiple-args input and output. We tried earlier this year to explicitly pass arguments when building PP stages, but it didn\u2019t work. I\u2019m wondering if there have been any updates since then, or if we might have missed something.\n\nDo you have any other suggestions or better solutions? @tianyu-l @H-Huang \nCC: @janEbert @garrett361 \n\n",
    "url": "https://github.com/pytorch/torchtitan/issues/1979",
    "state": "open",
    "labels": [],
    "created_at": "2025-11-03T13:37:44Z",
    "updated_at": "2025-11-20T02:22:30Z",
    "comments": 13,
    "user": "rakkit"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27982,
    "title": "[Usage]: How can I access or return hidden states (representations) after generation?",
    "body": "### Your current environment\n\nIn my training pipeline (GRPO), I need to access hidden-state representations of all layers and store prompt representations alongside generated sequences.\nIs there any supported way to extract or return hidden states from the vLLM inference engine?\n\nEnvironment\nvllm==0.11.0\nPython 3.12\n\n### How would you like to use vllm\n\n\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27982",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-03T13:01:51Z",
    "updated_at": "2025-11-04T03:07:40Z",
    "comments": 1,
    "user": "hakbari14"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2368,
    "title": "Release 0.5.0",
    "body": "A Github Issue created for the upcoming release to discuss the planned features & changes:\n\n* Audio PR #967 \n* Bump transformers dependency to +v5",
    "url": "https://github.com/huggingface/lerobot/issues/2368",
    "state": "open",
    "labels": [
      "bug",
      "question",
      "dependencies"
    ],
    "created_at": "2025-11-03T12:46:51Z",
    "updated_at": "2025-12-24T00:08:16Z",
    "user": "imstevenpmwork"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27981,
    "title": "[Usage]: qwenvl2.5\u5982\u4f55\u6307\u5b9amax_pixels",
    "body": "### Your current environment\n\n\u5982\u9898\uff0c\u6211\u5c1d\u8bd5\u4e86``--mm-processor-kwargs {\"max_pixels\": $MAX_PIXELS}``\u65e0\u6548\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27981",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-03T12:38:34Z",
    "updated_at": "2025-11-04T08:19:54Z",
    "comments": 3,
    "user": "aJupyter"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3829,
    "title": "Does Accelerate automatically set the DataLoader\u2019s sampler to a DistributedSampler?",
    "body": "```python\nfrom accelerate import Accelerator\naccelerator = Accelerator()\n\ndevice = accelerator.device\nmodel, optimizer, training_dataloader, scheduler = accelerator.prepare(\n    model, optimizer, training_dataloader, scheduler\n)\n\nfor batch in training_dataloader:\n    optimizer.zero_grad()\n    inputs, targets = batch\n    outputs = model(inputs)\n    loss = loss_function(outputs, targets)\n    accelerator.backward(loss)\n    optimizer.step()\n    scheduler.step()\n```\n\nWe know that in PyTorch DDP training the DataLoader must use torch.utils.data.DistributedSampler. In this code, when using Accelerate, do we need to manually set DistributedSampler when constructing the `training_dataloader`, or will Accelerate automatically modify the dataloader\u2019s sampler to support DDP later? (In other words, when we build the dataloader for Accelerate, can we completely ignore DistributedSampler and just leave it as we would for single\u2011GPU training?)",
    "url": "https://github.com/huggingface/accelerate/issues/3829",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-03T07:17:29Z",
    "updated_at": "2025-12-16T15:09:43Z",
    "comments": 2,
    "user": "caixxiong"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27957,
    "title": "[Usage]: What is the difference between embedding task and pooler task?",
    "body": "### Your current environment\n\nAny document about this? \n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27957",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-03T03:38:39Z",
    "updated_at": "2025-11-03T10:20:18Z",
    "comments": 1,
    "user": "sleepwalker2017"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27949,
    "title": "[Usage]: How do I deploy GGUF models with vLLM via Docker correct?",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\nHere is the output from `sudo python3 collect_env.py`\n\n```\nTraceback (most recent call last):\n  File \"/export/nvme/vllm/collect_env.py\", line 18, in <module>\n    import regex as re\nModuleNotFoundError: No module named 'regex'\n```\n\n### How would you like to use vllm\n\nI am using an Ubuntu 22.04 LTS LXC in Proxmox.\n\nI have Docker installed.\n\nI downloaded `https://huggingface.co/unsloth/DeepSeek-R1-Distill-Llama-70B-GGUF/resolve/main/DeepSeek-R1-Distill-Llama-70B-Q4_K_M.gguf?download=true` to `/export/nvme/huggingface/DeepSeek-R1-Distill-Llama-70B-GGUF/DeepSeek-R1-Distill-Llama-70B-Q4_K_M.gguf` via `wget`.\n\nThe command that I am trying to use to start said Docker container is:\n\n```\nsudo docker run --runtime nvidia --gpus all \\\n    --name vllm \\\n    -v /export/nvme/huggingface/DeepSeek-R1-Distill-Llama-70B-Q4_K_M-GGUF:/root/.cache/huggingface/DeepSeek-R1-Distill-Llama-70B-Q4_K_M-GGUF \\\n    -v /export/nvme/vllm:/export/nvme/vllm \\\n    -e TRANSFORMERS_OFFLINE=1 \\\n    --shm-size=16G \\\n    -v /dev/shm:/dev/shm \\\n    -p 0.0.0.0:8000:8000 \\\n    --security-opt apparmor:unconfined \\\n    vllm/vllm-openai:v0.8.5 \\\n    --model /root/.cache/huggingface/DeepSeek-R1-Distill-Llama-70B-Q4_K_M-GGUF/DeepSeek-R1-Distill-Llama-70B-Q4_K_M.gguf \\\n    --tokenizer /root/.cache/huggingface/DeepSeek-R1-Distill-Llama-70B \\\n    --tensor-parallel-size 2 \\\n    --max-model-len=32K \\\n    --chat-template=/export/nvme/vllm/examples/tool_chat_template_deepseekr1.jinja\n```\n\nBut this is the error message that I get:\n```\nINFO 11-02 15:21:55 [__init__.py:239] Automatically detected platform cuda.\nINFO 11-02 15:21:59 [api_server.py:1043] vLLM API server version 0.8.5\nINFO 11-02 15:21:59 [api_server.py:1044] args: Namespace(host=None, port=8000, uvicorn_log_level='info', disable_uvicorn_access_log=False, allow_credentials=False, allowed_origins=['*'], allowed_methods=['*'], allowed_headers=['*'], api_key=None, lora_modules=None, prompt_adapters=None, chat_template='/export/nvme/vllm/examples/tool_chat_template_deepseekr1.jinja', chat_template_content_format='auto', response_role='assistant', ssl_keyfile=None, ssl_certfile=None, ssl_ca_certs=None, enable_ssl_refresh=False, ssl_cert_reqs=0, root_path=None, middleware=[], return_tokens_as_token_ids=False, disable_frontend_multiprocessing=False, enable_request_id_headers=False, enable_auto_tool_choice=False, tool_call_parser=None, tool_parser_plugin='', model='/root/.cache/huggingface/DeepSeek-R1-Distill-Llama-70B-Q4_K_M-GGUF/DeepSeek-R1-Distill-Llama-70B-Q4_K_M.gguf', task='auto', tokenizer='/root/.cache/huggingface/DeepSeek-R1-Distill-Llama-70B', hf_config_path=None, skip_tokenizer_init=False, revision=None, code_revision=None, tokenizer_revision=None, tokenizer_mode='auto', trust_remote_code=False, allowed_local_media_path=None, load_format='auto', download_dir=None, model_loader_extra_config={}, use_tqdm_on_load=True, config_format=<ConfigFormat.AUTO: 'auto'>, dtype='auto', max_model_len=32768, guided_decoding_backend='auto', reasoning_parser=None, logits_processor_pattern=None, model_impl='auto', distributed_executor_backend=None, pipeline_parallel_size=1, tensor_parallel_size=2, data_parallel_size=1, enable_expert_parallel=False, max_parallel_loading_workers=None, ray_workers_use_nsight=False, disable_custom_all_reduce=False, block_size=None, gpu_memory_utilization=0.9, swap_space=4, kv_cache_dtype='auto', num_gpu_blocks_override=None, enable_prefix_caching=None, prefix_caching_hash_algo='builtin', cpu_offload_gb=0, calculate_kv_scales=False, disable_sliding_window=False, use_v2_block_manager=True, seed=None, max_logprobs=20, disable_log_stats=False, quantization=None, rope_scaling=None, rope_theta=None, hf_token=None, hf_overrides=None, enforce_eager=False, max_seq_len_to_capture=8192, tokenizer_pool_size=0, tokenizer_pool_type='ray', tokenizer_pool_extra_config={}, limit_mm_per_prompt={}, mm_processor_kwargs=None, disable_mm_preprocessor_cache=False, enable_lora=None, enable_lora_bias=False, max_loras=1, max_lora_rank=16, lora_extra_vocab_size=256, lora_dtype='auto', long_lora_scaling_factors=None, max_cpu_loras=None, fully_sharded_loras=False, enable_prompt_adapter=None, max_prompt_adapters=1, max_prompt_adapter_token=0, device='auto', speculative_config=None, ignore_patterns=[], served_model_name=None, qlora_adapter_name_or_path=None, show_hidden_metrics_for_version=None, otlp_traces_endpoint=None, collect_detailed_traces=None, disable_async_output_proc=False, max_num_batched_tokens=None, max_num_seqs=None, max_num_partial_prefills=1, max_long_partial_prefills=1, long_prefill_token_threshold=0, num_lookahead_slots=0, scheduler_delay_factor=0.0, preemption_mode=None, num_scheduler_steps=1, multi_step_stream_outputs=True, scheduling_policy='fcfs', enable_chunked_prefill=None, disable_chunked_mm_input=False, scheduler_cls='vllm.core.scheduler.Scheduler', override_neuron_config=None, override_pooler_config=None, compilati",
    "url": "https://github.com/vllm-project/vllm/issues/27949",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-02T23:33:49Z",
    "updated_at": "2025-11-02T23:36:44Z",
    "comments": 1,
    "user": "alpha754293"
  },
  {
    "repo": "huggingface/xet-core",
    "number": 549,
    "title": "How to get the \"Xet backed hash\"?",
    "body": "Hi,\n\nOn HuggingFace, every page has a \"Xet backed hash\" (I've attached an example below) and I am trying to figure out how to compute that locally.\n\nI've read the documentation and it says there are 4 types of different hashes but it's not really clear how a \"Xet backed hash\" is calculated.\n\nSo I was just wondering if you can you tell me how I can get the \"Xet backed hash\" on a local file?\n\nThank you for your time.\n\n<img width=\"630\" height=\"308\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9fad42a3-e15b-4734-b57a-a769b5b77577\" />",
    "url": "https://github.com/huggingface/xet-core/issues/549",
    "state": "closed",
    "labels": [],
    "created_at": "2025-11-02T09:40:39Z",
    "updated_at": "2025-11-06T16:20:25Z",
    "user": "arch-btw"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2360,
    "title": "diffusion transformer",
    "body": "\u8bf7\u95ee\u6709\u5927\u4f6c\u5728lerobot\u4e2d\u5c06diffusion unet\u6539\u4e3aDiT\u8fc7\u5417",
    "url": "https://github.com/huggingface/lerobot/issues/2360",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-11-02T09:05:30Z",
    "updated_at": "2025-11-12T09:01:59Z",
    "user": "Benxiaogu"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27928,
    "title": "[Bug]: What happened to /get_world_size ?",
    "body": "### Your current environment\n\nvllm 0.11.0\ntrl 0.24.0\npython 3.12\nlinux amd64\n\n### \ud83d\udc1b Describe the bug\n\nTRL is expecting a `/get_world_size` route https://github.com/huggingface/trl/blob/main/trl/extras/vllm_client.py#L279 for its GRPO trainer. That gives a 404 on the latest version of vLLM. \n\nWas this changed to another route? I can't seem to find it\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27928",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-11-01T22:56:45Z",
    "updated_at": "2025-11-03T02:42:14Z",
    "comments": 1,
    "user": "pbarker-synth"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2356,
    "title": "AsyncInference only running one action chunk",
    "body": "I have my SO101 arms connected to my computer, and I'm running an asynchronous server on a cloud GPU with a RTX 4090.\n\nWhen I start running Pi0.5, the model is loaded and the SO101 makes its first move by setting the robot to be at its middle position, but then no further actions are made although the server logs new observations and action sequences being generated.\n\nThe robot moves to this position and doesn't move further:\n\n<img width=\"332\" height=\"413\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/0499680b-4072-4c90-acda-e4fc1af18e64\" />\n\nI have one wrist camera and one top-down view camera. Here is my client command:\n```\npython3 -m lerobot.async_inference.robot_client \\\n    --server_address=ip:port \\\n    --robot.type=so101_follower \\\n    --robot.port=/dev/ttyACM0 \\\n    --robot.id=arm \\\n    --robot.cameras=\"{ base_0_rgb: {type: opencv, index_or_path: \\\"/dev/video2\\\", width: 640, height: 480, fps: 30}, left_wrist_0_rgb: {type: opencv, index_or_path: \\\"/dev/video0\\\", width: 640, height: 480, fps: 30}}\" \\\n    --policy_device=cuda \\\n    --aggregate_fn_name=weighted_average \\\n    --debug_visualize_queue_size=True \\\n    --task=\"Pick up the orange and place it on the plate\" \\\n    --policy_type=pi05 \\\n    --pretrained_name_or_path=lerobot/pi05_base \\\n    --actions_per_chunk=50 \\\n    --chunk_size_threshold=0.0 \\\n    --debug_visualize_queue_size=True\n```\n\nHere are my server logs:\n```\n(lerobot) root@eff66f201198:/workspace/arm-x64# ./robot.sh runpod async-server\nINFO 2025-11-01 20:17:34 y_server.py:421 {'fps': 30,\n 'host': '0.0.0.0',\n 'inference_latency': 0.03333333333333333,\n 'obs_queue_timeout': 2,\n 'port': 8080}\nINFO 2025-11-01 20:17:34 y_server.py:431 PolicyServer started on 0.0.0.0:8080\nINFO 2025-11-01 20:18:03 y_server.py:112 Client ipv4:129.97.131.28:23025 connected and ready\nINFO 2025-11-01 20:18:03 y_server.py:138 Receiving policy instructions from ipv4:129.97.131.28:23025 | Policy type: pi05 | Pretrained name or path: lerobot/pi05_base | Actions per chunk: 50 | Device: cuda\nThe PI05 model is a direct port of the OpenPI implementation. \nThis implementation follows the original OpenPI structure for compatibility. \nOriginal implementation: https://github.com/Physical-Intelligence/openpi\nINFO 2025-11-01 20:18:03 ils/utils.py:43 Cuda backend detected, using cuda.\nWARNING 2025-11-01 20:18:03 /policies.py:82 Device 'mps' is not available. Switching to 'cuda'.\nINFO 2025-11-01 20:18:03 ils/utils.py:43 Cuda backend detected, using cuda.\nWARNING 2025-11-01 20:18:03 /policies.py:82 Device 'mps' is not available. Switching to 'cuda'.\nLoading model from: lerobot/pi05_base\n\u2713 Loaded state dict from model.safetensors\nWARNING 2025-11-01 20:19:08 ng_pi05.py:1023 Vision embedding key might need handling: paligemma_with_expert.paligemma.model.vision_tower.vision_model.embeddings.patch_embedding.bias\nWARNING 2025-11-01 20:19:08 ng_pi05.py:1023 Vision embedding key might need handling: paligemma_with_expert.paligemma.model.vision_tower.vision_model.embeddings.patch_embedding.weight\nRemapped: action_in_proj.bias -> model.action_in_proj.bias\nRemapped: action_in_proj.weight -> model.action_in_proj.weight\nRemapped: action_out_proj.bias -> model.action_out_proj.bias\nRemapped: action_out_proj.weight -> model.action_out_proj.weight\nRemapped: paligemma_with_expert.gemma_expert.lm_head.weight -> model.paligemma_with_expert.gemma_expert.lm_head.weight\nRemapped: paligemma_with_expert.gemma_expert.model.layers.0.input_layernorm.dense.bias -> model.paligemma_with_expert.gemma_expert.model.layers.0.input_layernorm.dense.bias\nRemapped: paligemma_with_expert.gemma_expert.model.layers.0.input_layernorm.dense.weight -> model.paligemma_with_expert.gemma_expert.model.layers.0.input_layernorm.dense.weight\nRemapped: paligemma_with_expert.gemma_expert.model.layers.0.mlp.down_proj.weight -> model.paligemma_with_expert.gemma_expert.model.layers.0.mlp.down_proj.weight\nRemapped: paligemma_with_expert.gemma_expert.model.layers.0.mlp.gate_proj.weight -> model.paligemma_with_expert.gemma_expert.model.layers.0.mlp.gate_proj.weight\nRemapped: paligemma_with_expert.gemma_expert.model.layers.0.mlp.up_proj.weight -> model.paligemma_with_expert.gemma_expert.model.layers.0.mlp.up_proj.weight\nRemapped 812 state dict keys\nWarning: Could not remap state dict keys: Error(s) in loading state_dict for PI05Policy:\n\tMissing key(s) in state_dict: \"model.paligemma_with_expert.paligemma.model.language_model.embed_tokens.weight\". \nINFO 2025-11-01 20:19:43 y_server.py:171 Time taken to put policy on cuda: 99.9787 seconds\nINFO 2025-11-01 20:19:43 ort/utils.py:74 <Logger policy_server (NOTSET)> Starting receiver\nINFO 2025-11-01 20:20:02 y_server.py:226 Running inference for observation #0 (must_go: True)\nINFO 2025-11-01 20:20:03 ort/utils.py:74 <Logger policy_server (NOTSET)> Starting receiver\nINFO 2025-11-01 20:20:04 y_server.py:362 Preprocessing and inference took 1.3530s, action shape: torch.Size([1, 50, 32])\nINFO 2025-11-01 20:20:04 y_server.py:392 Observation ",
    "url": "https://github.com/huggingface/lerobot/issues/2356",
    "state": "open",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-11-01T20:31:10Z",
    "updated_at": "2025-12-23T01:10:35Z",
    "user": "kevinjosethomas"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166802,
    "title": "add ability to automatically set `set_per_process_memory_fraction` using env variable",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHi,\nIn multi-user / multi-tenant GPU environments (e.g., Slurm clusters, Kubernetes GPU slicing, or MPS-based sharing), it is often desirable to constrain the GPU memory usage of a process externally, without modifying the application code.\n\nCurrently, torch.cuda.set_per_process_memory_fraction(fraction, device) can only be applied programmatically in Python. If there was a way to automatically set it via bash env variable it would be very efficent, as it will remove the requirement of adding something to each python script \n\n**Proposed Feature**\n\nSupport an optional environment variable, for example:\n```\nTORCH_CUDA_MEMORY_FRACTION=<float>          # e.g., 0.25\nTORCH_CUDA_MEMORY_FRACTION_DEVICE=<device>  # e.g., 0 or \"all\"\n```\n\nIf set at process startup, PyTorch would internally call:\n```\ntorch.cuda.set_per_process_memory_fraction(\n    float(os.environ[\"TORCH_CUDA_MEMORY_FRACTION\"]),\n    device = os.environ.get(\"TORCH_CUDA_MEMORY_FRACTION_DEVICE\", \"all\")\n)\n```\n\n**Motivation & Use Cases**\n\n1. Slurm GPU shards: e.g., cluster configured with GRES=shard or MIG. We want processes to auto-scale memory usage based on how many shards they were allocated.\n2. JupyterHub / multi-user labs: enforce memory fairness without requiring users to modify their notebooks.\n3. Inference services: multiple models share one GPU; memory partitioning prescribed via environment-level configuration.\n4. Containerized deployments (Kubernetes): memory constraints should be set from deployment manifests (yaml), not Python code.\n\n\n### Alternatives\n\nadding the suggested code to each of my python scripts.\n\n### Additional context\n\nConversation with ChatGPT - https://chatgpt.com/share/69065d93-3f28-8013-b3a2-52b2dd01dd5d it already has a pull request ready. \n\ncc @ptrblck @msaroufim @eqy @jerryzh168",
    "url": "https://github.com/pytorch/pytorch/issues/166802",
    "state": "closed",
    "labels": [
      "module: cuda",
      "module: memory usage",
      "triaged"
    ],
    "created_at": "2025-11-01T19:22:40Z",
    "updated_at": "2025-11-07T16:58:15Z",
    "comments": 4,
    "user": "orena1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166796,
    "title": "[ROCm][CI] Machines under the label linux.rocm.gpu.2, label linux.rocm.gpu.4, linux.rocm.gpu.gfx1100 are undergoing maintenance.",
    "body": "> NOTE: Remember to label this issue with \"`ci: sev`\"\n>       If you want autorevert to be disabled, keep the ci: disable-autorevert label\n\n <!-- Add the `merge blocking` label to this PR to prevent PRs from being merged while this issue is open -->\n\n## Current Status\n*Status could be: preemptive, ongoing, mitigated, closed. Also tell people if they need to take action to fix it (i.e. rebase)*.\nongoing\n\n## Error looks like\n*Provide some way users can tell that this SEV is causing their issue.*\nOccasional rocm workflow failures for workflows with label linux.rocm.gpu.2, linux.rocm.gpu.4, linux.rocm.gpu.gfx1100. Also, potentially longer queue times for linux.rocm.gpu.2, linux.rocm.gpu.4, linux.rocm.gpu.gfx1100  workflows.\n\n## Incident timeline (all times pacific)\n*Include when the incident began, when it was detected, mitigated, root caused, and finally closed.*\n11/01/2025\n\n## User impact\n*How does this affect users of PyTorch CI?*\nOccasional rocm workflow failures for workflows with label linux.rocm.gpu.2, linux.rocm.gpu.4, linux.rocm.gpu.gfx1100. Also, potentially longer queue times for linux.rocm.gpu.2, linux.rocm.gpu.4, linux.rocm.gpu.gfx1100  workflows.\n\n## Root cause\n*What was the root cause of this issue?*\nSystem Maintenance\n\n## Mitigation\n*How did we mitigate the issue?*\nWill be resolve by EOD 11/01/2025\n\n## Prevention/followups\n*How do we prevent issues like this in the future?*\nN/A\n\ncc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang @naromero77amd",
    "url": "https://github.com/pytorch/pytorch/issues/166796",
    "state": "closed",
    "labels": [
      "module: rocm",
      "ci: sev"
    ],
    "created_at": "2025-11-01T14:59:52Z",
    "updated_at": "2025-11-03T11:04:50Z",
    "comments": 0,
    "user": "amdfaa"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27916,
    "title": "[Feature]: Does the latest version support LoRa for visual models?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nWhen I loaded the QWEN2.5-VL model fine-tuned by LoRa using vllm version 0.8.4, I encountered the following prompt:\n\n> Regarding multimodal models, vLLM currently only supports adding LoRA to language model, visual.blocks.31.mlp.up_proj will be ignored.\n\nI found an issue https://github.com/vllm-project/vllm/issues/26422 with a similar problem, but it seems the PR hasn't been merged into master. How can I enable loading visual-side LORA parameters and using VLLM to accelerate inference?\n\nLooking forward to your reply\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27916",
    "state": "closed",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-11-01T12:23:36Z",
    "updated_at": "2025-12-26T12:48:22Z",
    "comments": 1,
    "user": "SmartNight-cc"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2354,
    "title": "Cannot reproduce SmolVLA results on LIBERO benchmark",
    "body": "Hello,\n\nI am trying to reproduce LIBERO benchmark results of [SmolVLA](https://huggingface.co/HuggingFaceVLA/smolvla_libero).\nHowever, I can't reproduce results on neither [leaderboard](https://huggingface.co/spaces/HuggingFaceVLA/libero-vla-leaderboard) and [paper](https://arxiv.org/abs/2506.01844)\n\nI am working on NVIDIA Jetson AGX Orin Developer Kit (Jetpack 6.2.1, Jetson Linux 36.4.4)\nand below is my pip list\n\nHello,\n\nI am trying to reproduce the LIBERO benchmark results of [SmolVLA](https://huggingface.co/HuggingFaceVLA/smolvla_libero).  \nHowever, I can't reproduce the results on either the [leaderboard](https://huggingface.co/spaces/HuggingFaceVLA/libero-vla-leaderboard) or the [paper](https://arxiv.org/abs/2506.01844).\n\nI am working on an NVIDIA Jetson AGX Orin Developer Kit (JetPack 6.2.1, Jetson Linux 36.4.4),  \nand below is my pip list.\n\n<details>\n<summary>pip list</summary>\n\n```\nabsl-py==2.3.1\naccelerate==1.10.1\naiohappyeyeballs==2.6.1\naiohttp==3.13.0\naiosignal==1.4.0\nannotated-types==0.7.0\nantlr4-python3-runtime==4.9.3\nanyio==4.9.0\nargon2-cffi==23.1.0\nargon2-cffi-bindings==21.2.0\narrow==1.3.0\nasttokens==3.0.0\nasync-lru==2.0.5\nattrs==23.2.0\nav==15.1.0\nbabel==2.17.0\nbddl==1.0.1\nbeautifulsoup4==4.13.4\nbleach==6.2.0\nblinker==1.7.0\ncertifi==2025.1.31\ncffi==1.17.1\ncharset-normalizer==3.4.1\nclick==8.3.0\ncloudpickle==3.1.1\ncmake==3.31.6\ncomm==0.2.2\ncontourpy==1.3.2\ncryptography==41.0.7\ncuda-bindings==12.8.0\ncuda-python==12.8.0\ncycler==0.12.1\nCython==3.0.12\ndataclasses==0.6\ndatasets==4.1.1\ndbus-python==1.3.2\ndebugpy==1.8.14\ndecorator==5.2.1\ndeepdiff==8.6.1\ndefusedxml==0.7.1\ndiffusers @ file:///opt/diffusers-0.34.0.dev0-py3-none-any.whl#sha256=cf07a8004c994f02e0d41e9bface90486f53a98cd3abdda39972c5ffe7009d87\ndill==0.4.0\ndistro==1.9.0\ndocopt==0.6.2\ndocutils==0.21.2\ndraccus==0.10.0\neasydict==1.13\negl_probe @ git+https://github.com/huggingface/egl_probe.git@eb5e5f882236a5668e43a0e78121aaa10cdf2243\neinops==0.8.1\netils==1.13.0\nevdev==1.9.2\nexecuting==2.2.0\nFarama-Notifications==0.0.4\nfastjsonschema==2.21.1\nfilelock==3.18.0\nfonttools==4.57.0\nfqdn==1.5.1\nfrozenlist==1.8.0\nfsspec==2025.3.2\nfuture==1.0.0\ngitdb==4.0.12\nGitPython==3.1.45\nglfw==2.10.0\ngrpcio==1.75.1\ngym==0.26.2\ngym-notices==0.1.0\ngymnasium==0.29.1\nh11==0.14.0\nh5py==3.13.0\nhf-xet==1.1.10\nhf_transfer==0.1.9\nhttpcore==1.0.8\nhttplib2==0.20.4\nhttpx==0.28.1\nhuggingface-hub==0.35.3\nhydra-core==1.3.2\nid==1.5.0\nidna==3.10\nimageio==2.37.0\nimageio-ffmpeg==0.6.0\nimportlib_metadata==8.6.1\nimportlib_resources==6.5.2\niniconfig==2.1.0\ninquirerpy==0.3.4\nipykernel==6.29.5\nipython==9.1.0\nipython_pygments_lexers==1.1.1\nipywidgets==8.1.6\nisoduration==20.11.0\njaraco.classes==3.4.0\njaraco.context==6.0.1\njaraco.functools==4.1.0\njedi==0.19.2\njeepney==0.9.0\nJinja2==3.1.6\njson5==0.12.0\njsonlines==4.0.0\njsonpointer==3.0.0\njsonschema==4.23.0\njsonschema-specifications==2025.4.1\njupyter==1.1.1\njupyter-console==6.6.3\njupyter-events==0.12.0\njupyter-lsp==2.2.5\njupyter_client==8.6.3\njupyter_core==5.7.2\njupyter_server==2.15.0\njupyter_server_terminals==0.5.3\njupyterlab==4.4.1\njupyterlab_myst==2.4.2\njupyterlab_pygments==0.3.0\njupyterlab_server==2.27.3\njupyterlab_widgets==3.0.14\njupytext==1.17.3\nkeyring==25.6.0\nkiwisolver==1.4.8\nlaunchpadlib==1.11.0\nlazr.restfulclient==0.14.6\nlazr.uri==1.0.6\n-e git+https://github.com/huggingface/lerobot@6f5bb4d4a49fbdb47acfeaa2c190b5fa125f645a#egg=lerobot\nlibero @ git+https://github.com/huggingface/lerobot-libero.git@b053a4b0de70a3f2d736abe0f9a9ee64477365df\nllvmlite==0.45.1\nMako==1.3.10\nMarkdown==3.9\nmarkdown-it-py==3.0.0\nMarkupSafe==3.0.2\nmatplotlib==3.10.1\nmatplotlib-inline==0.1.7\nmdit-py-plugins==0.5.0\nmdurl==0.1.2\nmergedeep==1.3.4\nmistune==3.1.3\nmore-itertools==10.7.0\nmpmath==1.3.0\nmujoco==3.3.2\nmultidict==6.7.0\nmultiprocess==0.70.16\nmypy_extensions==1.1.0\nnbclient==0.10.2\nnbconvert==7.16.6\nnbformat==5.10.4\nnest-asyncio==1.6.0\nnetworkx==3.4.2\nnh3==0.2.21\nninja==1.11.1.4\nnotebook==7.4.1\nnotebook_shim==0.2.4\nnum2words==0.5.14\nnumba==0.62.1\nnumpy==2.2.5\noauthlib==3.2.2\nomegaconf==2.3.0\nonnx==1.17.0\nopencv-contrib-python==4.11.0.86\nopencv-python==4.11.0\nopencv-python-headless==4.12.0.88\noptimum==1.24.0\norderly-set==5.5.0\noverrides==7.7.0\npackaging==25.0\npandas==2.3.3\npandocfilters==1.5.1\nparso==0.8.4\npexpect==4.9.0\npfzy==0.3.4\npillow==11.2.1\npkginfo==1.12.1.2\nplatformdirs==4.3.7\npluggy==1.6.0\nprometheus_client==0.21.1\nprompt_toolkit==3.0.51\npropcache==0.4.1\nprotobuf==6.30.2\npsutil==7.0.0\nptyprocess==0.7.0\npure_eval==0.2.3\npyarrow==21.0.0\npyav==14.2.1\npycparser==2.22\npycuda==2025.1\npydantic==2.12.1\npydantic_core==2.41.3\nPygments==2.19.1\nPyGObject==3.48.2\nPyJWT==2.7.0\npynput==1.8.1\nPyOpenGL==3.1.10\nPyOpenGL-accelerate==3.1.10\npyparsing==3.1.1\npyrsistent==0.20.0\npyserial==3.5\npytest==8.4.2\npython-apt==2.7.7+ubuntu4\npython-dateutil==2.9.0.post0\npython-json-logger==3.3.0\npython-xlib==0.33\npytools==2025.1.2\npytz==2025.2\nPyYAML==6.0.2\npyyaml-include==1.4.1\npyzmq==26.4.0\nreadme_renderer==44.0\nreferencing==0.36.2\nregex==2024.11.6\nrequests==2.32.3\nrequests-toolbelt=",
    "url": "https://github.com/huggingface/lerobot/issues/2354",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "simulation"
    ],
    "created_at": "2025-11-01T11:20:05Z",
    "updated_at": "2026-01-05T08:38:48Z",
    "user": "Hesh0629"
  },
  {
    "repo": "huggingface/trl",
    "number": 4419,
    "title": "GRPO with reward model. CUDA out of memory. How to fix? Thank you very much.",
    "body": "train_grpo.py:\n```python\nimport argparse\nimport os\nfrom typing import Callable, Dict, List, Optional\n\nimport torch\nfrom datasets import Dataset, load_dataset\nfrom transformers import (\n    AutoModelForCausalLM,\n    AutoTokenizer,\n    AutoModelForSequenceClassification,\n    pipeline,\n    set_seed,\n)\nfrom trl import GRPOConfig, GRPOTrainer\n\n\nclass CombinedReward:\n    \"\"\"Combine multiple reward sources with weights.\n\n    Each reward function follows signature:\n        reward_fn(completions: List[str], prompts: List[str], **kwargs) -> List[float]\n    \"\"\"\n\n    def __init__(\n        self,\n        reward_fns: List[Callable[[List[str], List[str]], List[float]]],\n        weights: Optional[List[float]] = None,\n    ) -> None:\n        if not reward_fns:\n            raise ValueError(\"reward_fns must not be empty\")\n        self.reward_fns = reward_fns\n        self.weights = weights or [1.0] * len(reward_fns)\n        if len(self.weights) != len(self.reward_fns):\n            raise ValueError(\"weights length must match reward_fns length\")\n\n    def __call__(self, completions: List[str], prompts: List[str], **kwargs) -> List[float]:\n        if not completions:\n            return []\n        all_scores: List[List[float]] = []\n        for reward_fn in self.reward_fns:\n            scores = reward_fn(completions, prompts, **kwargs)\n            if len(scores) != len(completions):\n                raise ValueError(\"All reward functions must return scores for each completion\")\n            all_scores.append(scores)\n        # weighted sum\n        totals: List[float] = [0.0] * len(completions)\n        for w, scores in zip(self.weights, all_scores):\n            for i, s in enumerate(scores):\n                totals[i] += w * float(s)\n        return totals\n\n\ndef build_reward_model_fn(\n    reward_model_name: str,\n    device: Optional[str] = None,\n    normalize: bool = True,\n) -> Callable[[List[str], List[str]], List[float]]:\n    \"\"\"Create a reward function using a sequence classification model.\n\n    Returns a function that outputs a scalar reward per completion.\n    \"\"\"\n    rm_tokenizer = AutoTokenizer.from_pretrained(reward_model_name, use_fast=True)\n \n    # ensure padding token exists for batched inference\n    if rm_tokenizer.pad_token is None:\n        candidate = rm_tokenizer.eos_token or rm_tokenizer.sep_token or rm_tokenizer.cls_token or rm_tokenizer.unk_token\n        if candidate is not None:\n            rm_tokenizer.pad_token = candidate\n        else:\n            rm_tokenizer.add_special_tokens({\"pad_token\": \"[PAD]\"})\n    rm_model = AutoModelForSequenceClassification.from_pretrained(reward_model_name, torch_dtype=torch.float16, \n                                                                  device_map=\"auto\")\n    if getattr(rm_model.config, \"pad_token_id\", None) is None and rm_tokenizer.pad_token_id is not None:\n        rm_model.config.pad_token_id = rm_tokenizer.pad_token_id\n\n\n    # use a pipeline for batching and device placement\n    pipe_device = 0 if (device == \"cuda\" or (device is None and torch.cuda.is_available())) else -1\n    rm_pipe = pipeline(\n        task=\"text-classification\",\n        model=rm_model,\n        tokenizer=rm_tokenizer,\n      #  device=pipe_device,\n        truncation=True,\n        top_k=None,\n        function_to_apply=\"none\",  # use raw logits so we can map scores directly\n        return_all_scores=True,\n    )\n\n    def reward_fn(completions: List[str], prompts: List[str], **kwargs) -> List[float]:\n        del prompts  # unused here\n        outputs = rm_pipe(completions, batch_size=kwargs.get(\"batch_size\", 2))\n        scores: List[float] = []\n        for out in outputs:\n            # If binary classifier, use logit of positive class; otherwise sum weighted by label index\n            if len(out) == 1:\n                scores.append(float(out[0][\"score\"]))\n            else:\n                # prefer last class as \"more positive\"\n                scores.append(float(out[-1][\"score\"]))\n        if not normalize:\n            return scores\n        # z-norm for stability (per-batch)\n        t = torch.tensor(scores, dtype=torch.float32)\n        std = float(t.std().clamp(min=1e-6))\n        mean = float(t.mean())\n        normed = ((t - mean) / std).tolist()\n        return [float(x) for x in normed]\n\n    return reward_fn\n\n\ndef build_keyword_reward_fn(keywords: List[str], case_sensitive: bool = False, bonus: float = 1.0) -> Callable[[List[str], List[str]], List[float]]:\n    ks = keywords if case_sensitive else [k.lower() for k in keywords]\n\n    def reward_fn(completions: List[str], prompts: List[str], **kwargs) -> List[float]:\n        del prompts\n        scores: List[float] = []\n        for text in completions:\n            t = text if case_sensitive else text.lower()\n            count = sum(1 for k in ks if k in t)\n            scores.append(bonus * float(count))\n        return scores\n\n    return reward_fn\n\n\ndef build_length_reward_fn(target_min: int, target_max: int, scale: float = 1.0) -> Callable[[List[str], List[str]], Li",
    "url": "https://github.com/huggingface/trl/issues/4419",
    "state": "open",
    "labels": [
      "\ud83c\udfcb Reward",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-11-01T10:29:28Z",
    "updated_at": "2025-11-20T12:26:50Z",
    "user": "guotong1988"
  },
  {
    "repo": "pytorch/ao",
    "number": 3274,
    "title": "Proposal to add a beginner-friendly introduction tutorial for TorchAO",
    "body": "Hello TorchAO community,\n\nI would like to contribute a beginner-friendly notebook tutorial that introduces TorchAO to users who are new to model optimization and to TorchAO (or even PyTorch in general).\n\nAs someone coming from a different background with limited experience in quantization and model optimization, I found that it can be challenging to understand:\n\n- What TorchAO is,\n- What its main capabilities are, and\n- How someone can start using it effectively in a simple workflow. \n\nWhile TorchAO already provides strong documentation and tutorials for quantization, some of them seem to assume a level of prior familiarity that newcomers might not yet have or they may target more advanced workflows. I would like to put together a simple notebook tutorial that demonstrates one simple TorchAO quantization flow on a very small model/toy model (e.g. 2-layer MLP or simple CNN). The goal isn't to duplicate the Quick Start or advanced tutorials, but to provide a high-level guide that can help absolute beginners understand what TorchAO is and when to use it.\n\nThe notebook would include clear descriptions and references to relevant PyTorch blog posts and documentation pages that already exist, so that users can easily explore more advanced material as well.\n\nWould this be useful to the community to add under tutorials/ or examples/? I\u2019m also open to suggestions on which specific tutorial topics might be most helpful for newcomers who are just starting out with TorchAO.\n\nI appreciate your consideration and feedback!",
    "url": "https://github.com/pytorch/ao/issues/3274",
    "state": "open",
    "labels": [
      "topic: documentation"
    ],
    "created_at": "2025-11-01T07:47:08Z",
    "updated_at": "2025-11-04T04:25:26Z",
    "comments": 2,
    "user": "smishra8"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27912,
    "title": "[Usage]: How should I use the CPU to deploy QWEN3 VL 30B-A3B?",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n(APIServer pid=1033476) Traceback (most recent call last):\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/bin/vllm\", line 33, in <module>\n(APIServer pid=1033476)     sys.exit(load_entry_point('vllm==0.11.1rc6.dev33+g3a5de7d2d.cpu', 'console_scripts', 'vllm')())\n(APIServer pid=1033476)              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/site-packages/vllm-0.11.1rc6.dev33+g3a5de7d2d.cpu-py3.12-linux-x86_64.egg/vllm/entrypoints/cli/main.py\", line 73, in main\n(APIServer pid=1033476)     args.dispatch_function(args)\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/site-packages/vllm-0.11.1rc6.dev33+g3a5de7d2d.cpu-py3.12-linux-x86_64.egg/vllm/entrypoints/cli/serve.py\", line 59, in cmd\n(APIServer pid=1033476)     uvloop.run(run_server(args))\n(APIServer pid=1033476)   File \"/home/maxgameone/.local/lib/python3.12/site-packages/uvloop/__init__.py\", line 109, in run\n(APIServer pid=1033476)     return __asyncio.run(\n(APIServer pid=1033476)            ^^^^^^^^^^^^^^\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/asyncio/runners.py\", line 194, in run\n(APIServer pid=1033476)     return runner.run(main)\n(APIServer pid=1033476)            ^^^^^^^^^^^^^^^^\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/asyncio/runners.py\", line 118, in run\n(APIServer pid=1033476)     return self._loop.run_until_complete(task)\n(APIServer pid=1033476)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(APIServer pid=1033476)   File \"uvloop/loop.pyx\", line 1518, in uvloop.loop.Loop.run_until_complete\n(APIServer pid=1033476)   File \"/home/maxgameone/.local/lib/python3.12/site-packages/uvloop/__init__.py\", line 61, in wrapper\n(APIServer pid=1033476)     return await main\n(APIServer pid=1033476)            ^^^^^^^^^^\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/site-packages/vllm-0.11.1rc6.dev33+g3a5de7d2d.cpu-py3.12-linux-x86_64.egg/vllm/entrypoints/openai/api_server.py\", line 1910, in run_server\n(APIServer pid=1033476)     await run_server_worker(listen_address, sock, args, **uvicorn_kwargs)\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/site-packages/vllm-0.11.1rc6.dev33+g3a5de7d2d.cpu-py3.12-linux-x86_64.egg/vllm/entrypoints/openai/api_server.py\", line 1926, in run_server_worker\n(APIServer pid=1033476)     async with build_async_engine_client(\n(APIServer pid=1033476)                ^^^^^^^^^^^^^^^^^^^^^^^^^^\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/contextlib.py\", line 210, in __aenter__\n(APIServer pid=1033476)     return await anext(self.gen)\n(APIServer pid=1033476)            ^^^^^^^^^^^^^^^^^^^^^\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/site-packages/vllm-0.11.1rc6.dev33+g3a5de7d2d.cpu-py3.12-linux-x86_64.egg/vllm/entrypoints/openai/api_server.py\", line 185, in build_async_engine_client\n(APIServer pid=1033476)     async with build_async_engine_client_from_engine_args(\n(APIServer pid=1033476)                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/contextlib.py\", line 210, in __aenter__\n(APIServer pid=1033476)     return await anext(self.gen)\n(APIServer pid=1033476)            ^^^^^^^^^^^^^^^^^^^^^\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/site-packages/vllm-0.11.1rc6.dev33+g3a5de7d2d.cpu-py3.12-linux-x86_64.egg/vllm/entrypoints/openai/api_server.py\", line 232, in build_async_engine_client_from_engine_args\n(APIServer pid=1033476)     async_llm = AsyncLLM.from_vllm_config(\n(APIServer pid=1033476)                 ^^^^^^^^^^^^^^^^^^^^^^^^^^\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/site-packages/vllm-0.11.1rc6.dev33+g3a5de7d2d.cpu-py3.12-linux-x86_64.egg/vllm/utils/func_utils.py\", line 116, in inner\n(APIServer pid=1033476)     return fn(*args, **kwargs)\n(APIServer pid=1033476)            ^^^^^^^^^^^^^^^^^^^\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/site-packages/vllm-0.11.1rc6.dev33+g3a5de7d2d.cpu-py3.12-linux-x86_64.egg/vllm/v1/engine/async_llm.py\", line 218, in from_vllm_config\n(APIServer pid=1033476)     return cls(\n(APIServer pid=1033476)            ^^^^\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/site-packages/vllm-0.11.1rc6.dev33+g3a5de7d2d.cpu-py3.12-linux-x86_64.egg/vllm/v1/engine/async_llm.py\", line 140, in __init__\n(APIServer pid=1033476)     self.engine_core = EngineCoreClient.make_async_mp_client(\n(APIServer pid=1033476)                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(APIServer pid=1033476)   File \"/home/maxgameone/anaconda3/lib/python3.12/site-packages/vllm-0.11.1rc6.dev33+g3a5de7d2d.cpu-py3.12-linux-x86_64.egg/vllm",
    "url": "https://github.com/vllm-project/vllm/issues/27912",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-11-01T07:40:04Z",
    "updated_at": "2025-11-01T07:40:04Z",
    "comments": 0,
    "user": "maxgameone"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1977,
    "title": "Why is the ep mesh derived from a factoring of the dp mesh, instead of its own dimension?",
    "body": "I see that the data parallel shard dimension is factored into two dimensions, `dp_shard_mod_ep` and `dp_shard_in_ep`.\n\nThe experts use `dp_shard_mod_ep` submesh for FSDP while the rest of the blocks use the regular `dp_shard_cp` submesh. Why can't the experts use FSDP on the regular `dp_mesh`? The reason for this is unclear after reading the code. If only expert parallelism is used without data parallel or if the data parallel size is less than expert parallel, then the `dp_shard_mod_ep` dimension size would be 0, which doesn't make sense.\n\nFurthermore, the `ep` submesh is not actually a bona fide actual dimension, but rather a combination of `dp_shard_in_ep`, `cp` and `tp`. Why can't `ep` be its own dimension? Currently `ep` is like some weird factored submesh of `dp_shard` instead of being its own dimension, and I don't understand why.\n\nI understand the combining of various mesh dimensions into `dp_shard_cp` is used to limit those dimensions to a 1D mesh as FSDP accepts a 1D mesh and HSDP a 2D mesh.\n\nBut why can't the mesh dims be for example:\n\n(assuming cp = 1, tp = 1, etp = 1)\nworld mesh: `['pp', 'dp_replicate', 'dp_shard', 'ep', 'cp', 'tp']`\ndp_shard mesh: `['dp_shard']` (not flattening of `['dp_shard_in_ep', 'dp_shard_mod_ep']`\nep mesh: `['ep']` (not `'dp_shard_in_ep'`)\n\nSorry for all the questions I'm just pretty confused as to whats going on. The most important question is why does dp_shard need to be factored into two dimensions? I also think the ._flatten() function should be exposed publicly if so many places use that function.",
    "url": "https://github.com/pytorch/torchtitan/issues/1977",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-11-01T02:07:24Z",
    "updated_at": "2025-12-02T01:34:16Z",
    "user": "man2machine"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27899,
    "title": "[Bug]: Inductor specialize after 2.9 rebase",
    "body": "### Your current environment\n\nNA\n\n### \ud83d\udc1b Describe the bug\n\nCould you or someone have a look at compile ranges [PR](https://github.com/vllm-project/vllm/pull/24252) again? It seems to stop working with the update to pytorch 2.9. We started getting failed assertions in generated code like it was compiled for a single shape. Could you explain how to let the inductor know that we compile for a range not for a single shape?\nExample of the assertion. Compilation was done for a range (512, 8192)\nassert_size_stride(arg0_1, (8192, s4, s94), (s4*s94, s94, 1))\n\nCan you add quick repro instructions?\n\nSure, on the PR branch:\nvllm serve meta-llama/Meta-Llama-3.1-70B-Instruct --disable-log-requests --no-enable-prefix-caching -tp 4 -dp 1 --max-num-seqs 256 --load-format dummy --port 8001 --compilation-config '{\"pass_config\":{\"enable_fusion\":false,\"enable_attn_fusion\":false,\"enable_noop\":true,\"enable_sequence_parallelism\":false,\"enable_async_tp\":false,\"enable_fi_allreduce_fusion\":true}}'\n\ncc @ilmarkov ",
    "url": "https://github.com/vllm-project/vllm/issues/27899",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-31T22:16:27Z",
    "updated_at": "2025-11-07T00:03:25Z",
    "comments": 7,
    "user": "laithsakka"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27898,
    "title": "[Doc]: Multi-node EP on EFA (i.e. no IBGDA/DeepEP)",
    "body": "### \ud83d\udcda The doc issue\n\nUsecase: On AWS we have EFA for high bandwidth interconnect, not Infiniband, so no IBGDA.\n\nThe [documentation](https://docs.vllm.ai/en/latest/serving/expert_parallel_deployment.html#backend-selection-guide) indicates that the DeepEP kernels should be used for multi/inter-node EP, and pplx for single node. However, [DeepEP indicates that they only support IBGDA for inter-node comms](https://github.com/deepseek-ai/DeepEP/issues/369).\n\npplx has good support for EFA. Is pplx for single node, DeepEP for multi-node a suggestion based on testing, or a hard requirement?\n\nIn addition, it appears that the EP size cannot be configured and is always TP x DP. Is there any way to set EP size to equal TP size (for example), so we can have each node be a DP group and limit EP alltoall's to intra-node (NVLink) only?\n\nThank you!\n\nEDIT: per https://github.com/vllm-project/vllm/issues/27633 it appears this may be problematic, although since pplx supports EFA as a transportation layer, this seems bizarre. Specific docs around usage on EFA would be helpful.",
    "url": "https://github.com/vllm-project/vllm/issues/27898",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-10-31T21:22:28Z",
    "updated_at": "2025-11-06T19:50:07Z",
    "comments": 1,
    "user": "nathan-az"
  },
  {
    "repo": "huggingface/peft",
    "number": 2884,
    "title": "[Question/Bug] How to safely continue LoRA fine-tuning under DeepSpeed ZeRO-3 (multi-stage training with modules_to_save)",
    "body": "Hi,\nI\u2019m trying to perform multi-stage LoRA fine-tuning under DeepSpeed ZeRO-3 using PEFT.\nHowever, continuing training on an existing LoRA checkpoint without merging causes a series of errors and conflicts.\n\n\nProblem\n\nWhen I load the LoRA from Stage 1 and attempt to continue training:\n\t\u2022\tload_state_dict() throws shape mismatch (e.g. [0, hidden_size])\n\t\u2022\tresize_token_embeddings() fails (empty tensor)\n\t\u2022\tGPU memory usage explodes (batch size drops from 4 \u2192 1)\n\nQuestion\n\nWhat\u2019s the recommended practice for continuing LoRA fine-tuning under ZeRO-3?\n\t\u2022\tShould we always merge the previous adapter (merge_and_unload()) before starting Stage 2?\n\t\u2022\tOr is there a way to safely keep the existing adapter and continue training?\n\n\n\n\n### Who can help?\n\n_No response_\n\n### Reproduction\n\nSetup\n\t\u2022\tStage 1: LoRA fine-tuning with modules_to_save=['wte','ff_out']\n\t\u2022\tStage 2: Continue training on a new dataset (without merging)\n\t\u2022\tUsing DeepSpeed ZeRO-3 (zero3_init_flag=False)\n\n\n### Expected behavior\n\nExpected Behavior\n\nPEFT should provide a consistent way to:\n\t\u2022\tContinue fine-tuning LoRA adapters across multiple stages with ZeRO-3 enabled.\n\t\u2022\tAvoid re-initialization or memory explosion when modules_to_save is used.",
    "url": "https://github.com/huggingface/peft/issues/2884",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-31T20:13:12Z",
    "updated_at": "2025-12-09T15:05:26Z",
    "user": "XiangZhang-zx"
  },
  {
    "repo": "pytorch/ao",
    "number": 3270,
    "title": "[DOCS] Quick Start Guide PT2E Example does not work as is. Undefined objects",
    "body": "PT2E example in quick start guide does not work as is. Many undefined objects. No import for `convert_pt2e` and `example_inputs` is not defined for example. Also some indentation issues.\n\nSee:\nhttps://docs.pytorch.org/ao/0.13/quick_start.html#pytorch-2-export-quantization",
    "url": "https://github.com/pytorch/ao/issues/3270",
    "state": "open",
    "labels": [
      "topic: documentation",
      "triaged"
    ],
    "created_at": "2025-10-31T18:46:28Z",
    "updated_at": "2025-12-05T01:14:53Z",
    "comments": 1,
    "user": "cjm715"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166736,
    "title": "Aarch64 unit test failures from nightly/manylinux build, jammy upgrade to gcc13 needed",
    "body": "### \ud83d\udc1b Describe the bug\n\nWe have noticed 2 test failures on AArch64 ( neoverse-v2 / c8g ) which are not happening in https://github.com/pytorch/pytorch/actions/workflows/linux-aarch64.yml\n\n```\nMismatched elements: 1 / 513 (0.2%)\nGreatest absolute difference: 253 at index (512,)\nGreatest relative difference: 1.0 at index (512,)\n\nTo execute this test, run the following from the base repo dir:\n    python test/test_unary_ufuncs.py TestUnaryUfuncsCPU.test_contig_vs_every_other__refs__conversions_byte_cpu_float32\n```\n\nand\n\n```\nMismatched elements: 9 / 40 (22.5%)\nGreatest absolute difference: 1 at index (0, 0, 5)\nGreatest relative difference: 1.0 at index (0, 0, 5)\n\nThe failure occurred for item [3]\n\nTo execute this test, run the following from the base repo dir:\n    python test/inductor/test_torchinductor.py CpuTests.test_to_dtype_cpu\n```\n\nThese problems exist on nightly build. We have investigated and it looks like it happens since nightly 10.25 which looks like this commit https://github.com/pytorch/pytorch/commit/b31bad1b8f1331bf43d47f46602cf6141db56844\n\nActions Requested.\n\nCan we upgrade jammy images to GCC13 @malfet which should show these problems and then we might need to revert https://github.com/pytorch/pytorch/commit/b31bad1b8f1331bf43d47f46602cf6141db56844 \n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.10.0.dev20251031+cpu\nIs debug build: False\nCUDA used to build PyTorch: None\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 22.04.5 LTS (aarch64)\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0\nClang version: Could not collect\nCMake version: version 3.31.6\nLibc version: glibc-2.35\n\nPython version: 3.10.19 | packaged by conda-forge | (main, Oct 22 2025, 22:26:30) [GCC 14.3.0] (64-bit runtime)\nPython platform: Linux-6.8.0-1040-aws-aarch64-with-glibc2.35\nIs CUDA available: False\nCUDA runtime version: No CUDA\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: No CUDA\nNvidia driver version: No CUDA\ncuDNN version: No CUDA\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         aarch64\nCPU op-mode(s):                       64-bit\nByte Order:                           Little Endian\nCPU(s):                               32\nOn-line CPU(s) list:                  0-31\nVendor ID:                            ARM\nModel name:                           Neoverse-V2\nModel:                                1\nThread(s) per core:                   1\nCore(s) per cluster:                  32\nSocket(s):                            -\nCluster(s):                           1\nStepping:                             r0p1\nBogoMIPS:                             2000.00\nFlags:                                fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti\nL1d cache:                            2 MiB (32 instances)\nL1i cache:                            2 MiB (32 instances)\nL2 cache:                             64 MiB (32 instances)\nL3 cache:                             36 MiB (1 instance)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-31\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; __user pointer sanitization\nVulnerability Spectre v2:             Not affected\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affected\n\nVersions of relevant libraries:\n[pip3] mypy==1.16.0\n[pip3] mypy_extensions==1.1.0\n[pip3] numpy==1.22.4\n[pip3] onnx==1.19.1\n[pip3] onnx-ir==0.1.11\n[pip3] onnxscript==0.5.4\n[pip3] optree==0.13.0\n[pip3] torch==2.10.0.dev20251031+cpu\n[pip3] torchvision==0.25.0.dev20251031\n[conda] No relevant packages\n\ncc @seemethere @malfet @atalman @pytorch/pytorch-dev-infra @snadampal @milpuz01 @aditew01 @nikhil-arm @fadara01",
    "url": "https://github.com/pytorch/pytorch/issues/166736",
    "state": "closed",
    "labels": [
      "module: binaries",
      "module: ci",
      "triaged",
      "module: arm"
    ],
    "created_at": "2025-10-31T17:25:47Z",
    "updated_at": "2025-12-09T20:47:45Z",
    "comments": 11,
    "user": "robert-hardwick"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2351,
    "title": "Details of adapting SmolVLA to other robotic arms with different  configurations",
    "body": "I want to deploy the untuned `smolvla_base` model directly onto my AgileX PIPER robotic arm.I ran into the following two issues along the way:\n1. Missing normalization parameters in the metadata.\n```\n File \"/home/zwt/miniconda3/envs/lerobot/lib/python3.10/site-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n    return func(*args, **kwargs)\n  File \"/home/zwt/Projects/lerobot/lerobot/common/policies/smolvla/modeling_smolvla.py\", line 434, in select_action\n    batch = self._prepare_batch(batch)\n  File \"/home/zwt/Projects/lerobot/lerobot/common/policies/smolvla/modeling_smolvla.py\", line 412, in _prepare_batch\n    batch = self.normalize_inputs(batch)\n  File \"/home/zwt/miniconda3/envs/lerobot/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n  File \"/home/zwt/miniconda3/envs/lerobot/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/home/zwt/miniconda3/envs/lerobot/lib/python3.10/site-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n    return func(*args, **kwargs)\n  File \"/home/zwt/Projects/lerobot/lerobot/common/policies/normalize.py\", line 170, in forward\n    assert not torch.isinf(mean).any(), _no_stats_error_str(\"mean\")\nAssertionError: `mean` is infinity. You should either initialize with `stats` as an argument, or use a pretrained model.\n```\nThe error was resolved when I copied the normalization parameters from other training results, but I'm not sure if this is the correct way to run `smolvla_base` directly.\n2. I've noticed that different robotic arms may have different degrees of freedom, or even if they have the same degrees of freedom, the range of rotation of the same joint can vary. I'm unsure whether this range of rotation mapping is necessary when transferring the model to other robotic arms.It seems there is similar operation for the aloha in the code.\n```\n    def _pi_aloha_decode_state(self, state):\n        # Flip the joints.\n        for motor_idx in [1, 2, 8, 9]:\n            state[:, motor_idx] *= -1\n        # Reverse the gripper transformation that is being applied by the Aloha runtime.\n        for motor_idx in [6, 13]:\n            state[:, motor_idx] = aloha_gripper_to_angular(state[:, motor_idx])\n        return state\n\n    def _pi_aloha_encode_actions(self, actions):\n        # Flip the joints.\n        for motor_idx in [1, 2, 8, 9]:\n            actions[:, :, motor_idx] *= -1\n        # Reverse the gripper transformation that is being applied by the Aloha runtime.\n        for motor_idx in [6, 13]:\n            actions[:, :, motor_idx] = aloha_gripper_from_angular(actions[:, :, motor_idx])\n        return actions\n\n    def _pi_aloha_encode_actions_inv(self, actions):\n        # Flip the joints again.\n        for motor_idx in [1, 2, 8, 9]:\n            actions[:, :, motor_idx] *= -1\n        # Reverse the gripper transformation that is being applied by the Aloha runtime.\n        for motor_idx in [6, 13]:\n            actions[:, :, motor_idx] = aloha_gripper_from_angular_inv(actions[:, :, motor_idx])\n        return actions\n```\nbtw, is it a meaningful operation to directly run smolvla_base? This is just one of my sudden thoughts. ",
    "url": "https://github.com/huggingface/lerobot/issues/2351",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-10-31T14:55:35Z",
    "updated_at": "2025-12-14T14:47:04Z",
    "user": "yquanli"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27880,
    "title": "[Installation]: [HELP]How to install the latest main version of vllm",
    "body": "### Your current environment\n\nI clone the vllm code, and run install commands, but it fails, Help!!\n\n### How you are installing vllm\n\n```sh\nVLLM_USE_PRECOMPILED=1 uv pip install --editable .\nUsing Python 3.10.12 environment at: /home/alice/.venv\n  \u00d7 No solution found when resolving dependencies:\n  \u2570\u2500\u25b6 Because there is no version of xformers{platform_machine == 'x86_64' and sys_platform == 'linux'}==0.0.33+5d4b92a5.d20251029 and vllm==0.11.1rc6.dev16+g933cdea44.precompiled depends\n      on xformers{platform_machine == 'x86_64' and sys_platform == 'linux'}==0.0.33+5d4b92a5.d20251029, we can conclude that vllm==0.11.1rc6.dev16+g933cdea44.precompiled cannot be used.\n      And because only vllm==0.11.1rc6.dev16+g933cdea44.precompiled is available and you require vllm, we can conclude that your requirements are unsatisfiable.\n(alice) alice@dc53-p31-t0-n067:~/vllm_bak$ uv pip install -e .\nUsing Python 3.10.12 environment at: /home/alice/.venv\n  \u00d7 No solution found when resolving dependencies:\n  \u2570\u2500\u25b6 Because there is no version of xformers{platform_machine == 'x86_64' and sys_platform == 'linux'}==0.0.33+5d4b92a5.d20251029 and vllm==0.11.1rc6.dev16+g933cdea44.cu126 depends on\n      xformers{platform_machine == 'x86_64' and sys_platform == 'linux'}==0.0.33+5d4b92a5.d20251029, we can conclude that vllm==0.11.1rc6.dev16+g933cdea44.cu126 cannot be used.\n      And because only vllm==0.11.1rc6.dev16+g933cdea44.cu126 is available and you require vllm, we can conclude that your requirements are unsatisfiable.```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27880",
    "state": "closed",
    "labels": [
      "installation"
    ],
    "created_at": "2025-10-31T13:57:20Z",
    "updated_at": "2025-11-13T07:25:13Z",
    "comments": 7,
    "user": "sleepwalker2017"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27877,
    "title": "[Usage]: How to install nightly version??? Why this command doesn't work?",
    "body": "### Your current environment\n\nI run this to install vllm with the latest code. But, the installed vllm doesn't include the code I need. \n\nI check the `siglip.py` file, it's modified 4 days ago. \n\nBut in the vllm installed, it doesn't contain this commit!  https://github.com/vllm-project/vllm/pull/27566/files#diff-ca771e5a262cbf32fb481c518bea41d0e341414e021d6542e421abb98cceec61\n\n\nwhy is this?\n\nI use this command.\n```text\npip install -U vllm \\\n    --pre \\\n    --extra-index-url https://wheels.vllm.ai/nightly```\n\n`pip install -U vllm \\\n    --pre \\\n    --extra-index-url https://wheels.vllm.ai/nightly\nDefaulting to user installation because normal site-packages is not writeable\nLooking in indexes: https://bytedpypi.byted.org/simple, https://bytedpypi.byted.org/simple, https://wheels.vllm.ai/nightly\nRequirement already satisfied: vllm in /home/alice/.local/lib/python3.10/site-packages (0.11.0)\nCollecting vllm\n  Downloading https://wheels.vllm.ai/nightly/vllm-0.11.1rc6.dev16%2Bg933cdea44.cu129-cp38-abi3-manylinux1_x86_64.whl (479.0 MB)\n     \u2501\u257a\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 17.8/479.0 MB 575.3 kB/s eta 0:13:22`\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27877",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-31T12:29:51Z",
    "updated_at": "2025-10-31T12:38:19Z",
    "comments": 0,
    "user": "sleepwalker2017"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166721,
    "title": "Reference cycle in PyCodegen keeps tensors alive longer than necessary leading to OOM issues",
    "body": "### \ud83d\udc1b Describe the bug\n\nPR with fix: https://github.com/pytorch/pytorch/pull/166714\n\nRecursive function call creates a reference cycle: closure <- function <- cell inside closure\nCapturing self (PyCodegen instance) in same closure prolongs it's life until next gc.collect() which might result in worse resource management\n\nAfter the introduction of https://github.com/pytorch/pytorch/commit/e9209e08540e9edc69259ef0c6c715e0aa7c1b07 OOM issues has been observed. Looking for reference cycles one has been uncovered that would result in the prolonging lifetime of tensors. As the result of that OOM issues might occur. Such a dependency chain has been uncovered:\n\n<img width=\"1059\" height=\"540\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/f242f45a-04b3-4520-9e97-692f02b1ba66\" />\n\nAt the end of it a reference cycle can be found that consists of a closure for function collect_temp_source, the function itself, and a cell object inside closure that would point to the function due to the recursive call.\n\nThis issue can either be resolved by removing recurrency or removing PyCodegen instance from the closure.\nAnother precaution that can be made is to explicitly empty f_locals dict. This way we cut the tensor from the chain leading to reference cycle.\n\n### Error logs\n\n_No response_\n\n### Versions\n\nPyTorch version: 2.9.0+hpu_1.24.0-97.git4c6d653\nIs debug build: False\nCUDA used to build PyTorch: None\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.3 LTS (x86_64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version: Could not collect\nCMake version: version 3.28.3\nLibc version: glibc-2.39\n\nPython version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-6.8.0-57-generic-x86_64-with-glibc2.39\nIs CUDA available: False\nCUDA runtime version: No CUDA\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: No CUDA\nNvidia driver version: No CUDA\ncuDNN version: No CUDA\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True                                                                                           13:56:57 [32/1983]\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        52 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               224\nOn-line CPU(s) list:                  0-223\nVendor ID:                            GenuineIntel\nModel name:                           Intel(R) Xeon(R) Platinum 8480+\nCPU family:                           6\nModel:                                143\nThread(s) per core:                   2\nCore(s) per socket:                   56\nSocket(s):                            2\nStepping:                             8\nCPU(s) scaling MHz:                   34%\nCPU max MHz:                          3800.0000\nCPU min MHz:                          800.0000\nBogoMIPS:                             4000.00\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr\n sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid ap\nerfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic\n movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cd\np_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpci\nd cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xget\nbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat\n pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni av\nx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig\narch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nVirtualization:                       VT-x\nL1d cache:                            5.3 MiB (112 instances)\nL1i cache:                            3.5 MiB (112 instances)\nL2 cache:                             224 MiB (112 instances)\nL3 cache:                             210 MiB (2 instances)\nNUMA node(s):                         2\nNUMA node0 CPU(s):                    0-55,112-167\nNUMA node1 CPU(s):                    56-111,168-223\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               N",
    "url": "https://github.com/pytorch/pytorch/issues/166721",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2025-10-31T12:02:30Z",
    "updated_at": "2025-11-07T17:52:57Z",
    "comments": 1,
    "user": "jwieczorekhabana"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27875,
    "title": "[Usage]: how to get profiler on OpenAI server",
    "body": "### Your current environment\n\n```text\nINFO 10-31 10:27:06 [importing.py:17] Triton not installed or not compatible; certain GPU-related functions will not be available.\nWARNING 10-31 10:27:06 [importing.py:29] Triton is not installed. Using dummy decorators. Install it via `pip install triton` to enable kernel compilation.\nINFO 10-31 10:27:08 [__init__.py:39] Available plugins for group vllm.platform_plugins:\nINFO 10-31 10:27:08 [__init__.py:41] - ascend -> vllm_ascend:register\nINFO 10-31 10:27:08 [__init__.py:44] All plugins in this group will be loaded. Set `VLLM_PLUGINS` to control which plugins to load.\nINFO 10-31 10:27:08 [__init__.py:235] Platform plugin ascend is activated\nWARNING 10-31 10:27:12 [_custom_ops.py:22] Failed to import from vllm._C with ModuleNotFoundError(\"No module named 'vllm._C'\")\nCollecting environment information...\nPyTorch version: 2.5.1\nIs debug build: False\n\nOS: Ubuntu 22.04.5 LTS (aarch64)\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version: Could not collect\nCMake version: version 4.1.0\nLibc version: glibc-2.35\n\nPython version: 3.11.13 (main, Jul 26 2025, 07:27:32) [GCC 11.4.0] (64-bit runtime)\nPython platform: Linux-5.10.0-60.18.0.50.r865_35.hce2.aarch64-aarch64-with-glibc2.35\n\nCPU:\nArchitecture:                    aarch64\nCPU op-mode(s):                  64-bit\nByte Order:                      Little Endian\nCPU(s):                          192\nOn-line CPU(s) list:             0-191\nVendor ID:                       HiSilicon\nBIOS Vendor ID:                  HiSilicon\nModel name:                      Kunpeng-920\nBIOS Model name:                 HUAWEI Kunpeng 920 5250\nModel:                           0\nThread(s) per core:              1\nCore(s) per socket:              48\nSocket(s):                       4\nStepping:                        0x1\nBogoMIPS:                        200.00\nFlags:                           fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asimdfhm ssbs\nL1d cache:                       12 MiB (192 instances)\nL1i cache:                       12 MiB (192 instances)\nL2 cache:                        96 MiB (192 instances)\nL3 cache:                        192 MiB (8 instances)\nNUMA node(s):                    8\nNUMA node0 CPU(s):               0-23\nNUMA node1 CPU(s):               24-47\nNUMA node2 CPU(s):               48-71\nNUMA node3 CPU(s):               72-95\nNUMA node4 CPU(s):               96-119\nNUMA node5 CPU(s):               120-143\nNUMA node6 CPU(s):               144-167\nNUMA node7 CPU(s):               168-191\nVulnerability Itlb multihit:     Not affected\nVulnerability L1tf:              Not affected\nVulnerability Mds:               Not affected\nVulnerability Meltdown:          Not affected\nVulnerability Mmio stale data:   Not affected\nVulnerability Retbleed:          Not affected\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:        Mitigation; __user pointer sanitization\nVulnerability Spectre v2:        Not affected\nVulnerability Srbds:             Not affected\nVulnerability Tsx async abort:   Not affected\n\nVersions of relevant libraries:\n[pip3] numpy==1.26.4\n[pip3] pyzmq==27.0.2\n[pip3] torch==2.5.1\n[pip3] torch-npu==2.5.1.post1\n[pip3] torchvision==0.20.1\n[pip3] transformers==4.52.4\n[conda] Could not collect\nvLLM Version: 0.9.1\nvLLM Ascend Version: 0.9.2.dev0+g0740d1021.d20251029 (git sha: 0740d1021, date: 20251029)\n\nENV Variables:\nATB_OPSRUNNER_KERNEL_CACHE_LOCAL_COUNT=1\nATB_STREAM_SYNC_EVERY_RUNNER_ENABLE=0\nATB_OPSRUNNER_SETUP_CACHE_ENABLE=1\nATB_WORKSPACE_MEM_ALLOC_GLOBAL=0\nATB_DEVICE_TILING_BUFFER_BLOCK_NUM=32\nATB_STREAM_SYNC_EVERY_KERNEL_ENABLE=0\nVLLM_TORCH_PROFILER_DIR=/workspace/prof\nATB_OPSRUNNER_KERNEL_CACHE_GLOABL_COUNT=5\nATB_HOME_PATH=/usr/local/Ascend/nnal/atb/latest/atb/cxx_abi_0\nASCEND_TOOLKIT_HOME=/usr/local/Ascend/ascend-toolkit/latest\nATB_COMPARE_TILING_EVERY_KERNEL=0\nASCEND_OPP_PATH=/usr/local/Ascend/ascend-toolkit/latest/opp\nLD_LIBRARY_PATH=/usr/local/Ascend/nnal/atb/latest/atb/cxx_abi_0/lib:/usr/local/Ascend/nnal/atb/latest/atb/cxx_abi_0/examples:/usr/local/Ascend/nnal/atb/latest/atb/cxx_abi_0/tests/atbopstest:/usr/local/Ascend/ascend-toolkit/latest/tools/aml/lib64:/usr/local/Ascend/ascend-toolkit/latest/tools/aml/lib64/plugin:/usr/local/Ascend/ascend-toolkit/latest/lib64:/usr/local/Ascend/ascend-toolkit/latest/lib64/plugin/opskernel:/usr/local/Ascend/ascend-toolkit/latest/lib64/plugin/nnengine:/usr/local/Ascend/ascend-toolkit/latest/opp/built-in/op_impl/ai_core/tbe/op_tiling/lib/linux/aarch64:/usr/local/Ascend/nnal/atb/latest/atb/cxx_abi_0/lib:/usr/local/Ascend/nnal/atb/latest/atb/cxx_abi_0/examples:/usr/local/Ascend/nnal/atb/latest/atb/cxx_abi_0/tests/atbopstest:/usr/local/Ascend/ascend-toolkit/latest/tools/aml/lib64:/usr/local/Ascend/ascend-toolkit/latest/tools/aml/lib64/plugin:/usr/local/Ascend/ascend-toolkit/latest/lib64:/usr/local/Ascend/ascend-toolkit/latest/lib64/plugin/opskernel:/usr",
    "url": "https://github.com/vllm-project/vllm/issues/27875",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-31T10:33:49Z",
    "updated_at": "2025-10-31T14:38:04Z",
    "comments": 1,
    "user": "zhaohaixu"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27872,
    "title": "[Feature]: AFD support load customer connect model from local path.",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nAdd `afd_connector_module_path` field in AFDConfig, user can implement customer afd connect,  but don't need change vllm code.\n\nhttps://github.com/vllm-project/vllm/pull/25162  merge after.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27872",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-10-31T09:08:50Z",
    "updated_at": "2025-12-08T03:32:33Z",
    "comments": 1,
    "user": "lengrongfu"
  },
  {
    "repo": "huggingface/trl",
    "number": 4413,
    "title": "What is the default value of num_processes?",
    "body": "Based on the documentation on page docs/source/grpo_trainer.md, num_processes is used but nowhere does the documentation define what num_processes is or what is its default value.",
    "url": "https://github.com/huggingface/trl/issues/4413",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation",
      "\u2753 question",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-10-31T05:01:23Z",
    "updated_at": "2025-10-31T17:31:33Z",
    "user": "thisisraghavkumar"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12564,
    "title": "[Proposals Welcome] Fal Flashpack integration for faster model loading",
    "body": "Hey! \ud83d\udc4b\n\nWe've had a request to explore integrating Fal's Flashpack for faster DiT and Text Encoder loading (https://github.com/huggingface/diffusers/issues/12550). Before we jump into implementation, we wanted to open this up to the community to gather ideas and hear from anyone who's experimented with this.\n\nWe'd love your input on:\n1. Performance: Has anyone tried it? What kind of speedups did you see? Are there any performance trade-offs?\n2. Integration Design: How would you approach it if you were to integrating this into Diffusers? Describe your design at a high level - how would we support this in our existing framework and what would the API look like?\n\nWe're looking for proposals and ideas rather than PRs at this stage.  We're genuinely interested in hearing different approaches and perspectives from the community on this.\n\nFeel free to share your thoughts!\n",
    "url": "https://github.com/huggingface/diffusers/issues/12564",
    "state": "open",
    "labels": [
      "help wanted",
      "contributions-welcome"
    ],
    "created_at": "2025-10-31T02:25:55Z",
    "updated_at": "2025-10-31T12:26:13Z",
    "comments": 2,
    "user": "yiyixuxu"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27832,
    "title": "[RFC]: Remap `CompilationConfig` from `-O` to `-cc` in CLI",
    "body": "### Motivation.\n\nWith #20283 (and #26847), we're repurposing `-O0`/`-O1`/`-O2`/`-O3` to map to `optimization_level` instead of `CompilationConfig.level`/`CompilationConfig.mode`. This leaves us in a slightly confusing state where `-O` can refer to optimization level or compilation config depending on what follows it:\n- `-O0` -> `optimization_level=0`\n- `-O 3` -> `optimization_level=3`\n- `-O {\"cudagraph_mode\": \"NONE\"}` -> `CompilationConfig(cudagraph_mode=\"NONE\")`\n- `-O.use_inductor=False` -> `CompilationConfig(use_inductor=False)`\n- `--compilation-config.backend=eager` -> `CompilationConfig(backend=\"eager\")`\n\nThis is bad UX, and we should fix it. However, a CLI shorthand for `CompilationConfig` is still needed so users can easily compose different properties.\n\n### Proposed Change.\n\nWe should create a new shorthand for `CompilationConfig` should be `-cc`. Other options are `-c` and `-C`, but as discussed [here](https://github.com/vllm-project/vllm/pull/26847#discussion_r2439248068), single letters are not \"pythonic\" and capital letters are worse (extra `Shift` keystroke + less pythonic). However, the exact shorthand is up for discussion. React below to cast your vote.\n\nExample changes:\n- `-O0` -> `-O0` (unchanged)\n- `-O 3` -> `-O 3` (unchanged)\n- `-O {\"cudagraph_mode\": \"NONE\"}` -> `-cc {\"cudagraph_mode\": \"NONE\"}`\n- `-O.use_inductor=False` -> `-cc.use_inductor=False`\n- `--compilation-config.backend=eager` -> `--compilation-config.backend=eager` (unchanged)\n\n### Feedback Period.\n\nOne week, 10/30 - 11/5\n\n### CC List.\n\n@hmellor @morrison-turnansky @zou3519\n\n### Any Other Things.\n\nVote for your preferred shorthand:\n- \ud83d\udc4d for `-cc`\n- \ud83d\udc4e for `-O` (keep it the same)\n- \ud83c\udf89 for `-C`\n- \ud83d\ude80 for `-c`\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27832",
    "state": "closed",
    "labels": [
      "help wanted",
      "good first issue",
      "RFC",
      "torch.compile"
    ],
    "created_at": "2025-10-30T20:29:31Z",
    "updated_at": "2025-11-28T21:51:13Z",
    "comments": 3,
    "user": "ProExpertProg"
  },
  {
    "repo": "huggingface/trl",
    "number": 4407,
    "title": "Complete paper index",
    "body": "These are the papers mentioned at least one in the codebase.\n\n- [ ] https://huggingface.co/papers/1707.06347\n- [x] https://huggingface.co/papers/1909.08593 (only mentioned in notebook, no need to have in paper index)\n- [x] https://huggingface.co/papers/1910.02054 #4551\n- [ ] https://huggingface.co/papers/1910.10683\n- [x] https://huggingface.co/papers/2106.09685 #4441\n- [ ] https://huggingface.co/papers/2211.14275\n- [x] https://huggingface.co/papers/2305.10425 #3990\n- [x] https://huggingface.co/papers/2305.18290 #3937\n- [ ] https://huggingface.co/papers/2306.13649\n- [x] https://huggingface.co/papers/2307.09288 #4094\n- [x] https://huggingface.co/papers/2309.06657 #4441\n- [ ] https://huggingface.co/papers/2309.16240 #3906\n- [x] https://huggingface.co/papers/2310.12036 #3990\n- [ ] https://huggingface.co/papers/2312.00886\n- [x] https://huggingface.co/papers/2312.09244 #4094\n- [ ] https://huggingface.co/papers/2401.08417\n- [x] https://huggingface.co/papers/2402.00856 #3990\n- [x] https://huggingface.co/papers/2402.01306 #4440 \n- [x] https://huggingface.co/papers/2402.03300 #4441\n- [ ] https://huggingface.co/papers/2402.04792\n- [x] https://huggingface.co/papers/2402.05369 #3990\n- [ ] https://huggingface.co/papers/2402.09353\n- [x] https://huggingface.co/papers/2402.14740 #3801\n- [x] https://huggingface.co/papers/2403.00409 #3990\n- [ ] https://huggingface.co/papers/2403.07691\n- [x] https://huggingface.co/papers/2403.17031 (these are implementations details, no need to have in paper index)\n- [x] https://huggingface.co/papers/2404.04656 #3990\n- [ ] https://huggingface.co/papers/2404.09656\n- [ ] https://huggingface.co/papers/2404.19733\n- [x] https://huggingface.co/papers/2405.00675 #3900\n- [ ] https://huggingface.co/papers/2405.14734\n- [ ] https://huggingface.co/papers/2405.16436\n- [ ] https://huggingface.co/papers/2405.21046\n- [x] https://huggingface.co/papers/2406.05882 #3990\n- [x] https://huggingface.co/papers/2406.08414 #3990\n- [ ] https://huggingface.co/papers/2406.11827 #3906\n- [x] https://huggingface.co/papers/2407.21783 (LLaMA 3 paper, no need to have in paper index)\n- [x] https://huggingface.co/papers/2408.06266 #3990\n- [ ] https://huggingface.co/papers/2409.06411 #3906\n- [ ] https://huggingface.co/papers/2409.20370\n- [ ] https://huggingface.co/papers/2411.10442\n- [ ] https://huggingface.co/papers/2501.03262\n- [x] https://huggingface.co/papers/2501.03884 #3824\n- [ ] https://huggingface.co/papers/2501.12599 (Kimi 1.5 paper mentioned in an example, no need to have in paper index)\n- [ ] https://huggingface.co/papers/2501.12948\n- [x] https://huggingface.co/papers/2503.14476 #3937\n- [x] https://huggingface.co/papers/2503.20783 #3937\n- [x] https://huggingface.co/papers/2503.24290 (link to justify beta=0 in the doc, no need to have in paper index)\n- [ ] https://huggingface.co/papers/2505.07291\n- [x] https://huggingface.co/papers/2506.01939 #4580 \n- [x] https://huggingface.co/papers/2507.18071 #3775\n- [x] https://huggingface.co/papers/2508.00180 #3855\n- [x] https://huggingface.co/papers/2508.05629 #4042\n- [x] https://huggingface.co/papers/2508.08221 #3935\n- [x] https://huggingface.co/papers/2508.09726 #3989\n\n\n",
    "url": "https://github.com/huggingface/trl/issues/4407",
    "state": "open",
    "labels": [
      "\ud83d\udcda documentation"
    ],
    "created_at": "2025-10-30T20:23:26Z",
    "updated_at": "2025-12-24T05:50:21Z",
    "comments": 4,
    "user": "qgallouedec"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27830,
    "title": "[Usage]: GPS OSS 120b on L40S (Ada)",
    "body": "### Your current environment\n\n(Just a general question)\n\n\n### How would you like to use vllm\n\nI want to run inference of a GPT OSS 120b with multiple L40S. I read the [docs](https://docs.vllm.ai/projects/recipes/en/latest/OpenAI/GPT-OSS.html) as it clearly says it is not natively supported yet. After I had no success with vLLM it worked plug-and-play with Ollama. My question is, if there is any road map where I can see the progress? Or is it even possible to contribute on that problem? Unfortunately I am not familiar with GPUs. However I need to get it running. Any suggestion is highly appreciated. Even a clear description of the problem and what would be required to solve, is a real advantage. Thank you.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27830",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-30T20:07:42Z",
    "updated_at": "2025-11-17T12:46:43Z",
    "comments": 6,
    "user": "Hansehart"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27823,
    "title": "[Doc]: Multi-node distributed guide issues",
    "body": "### \ud83d\udcda The doc issue\n\nFor context, see a recent issue (https://github.com/ROCm/ROCm/issues/5567) where a user was trying to set up distributed inference with `ray` by following guidance at https://docs.vllm.ai/en/v0.8.0/serving/distributed_serving.html#running-vllm-on-multiple-nodes. I ran into several issues setting this up on AMD GPUs that I believe might be deficiencies in the vLLM docs:\n\n- The `run_cluster.sh` script passes `--gpus all` which I believe is NVIDIA-only, needed to remove this from the script\n- I had to add `--distributed_executor_backend=\"ray\"` to the `vllm serve` command to get vLLM to use the `ray` cluster that the script sets up\n- I had to set NCCL_SOCKET_IFNAME and GLOO_SOCKET_IFNAME to the appropriate network interfaces, otherwise ran into a NCCL connection error\n- Relevant environment variables (NCCL_SOCKET_IFNAME, GLOO_SOCKET_IFNAME, NCCL_DEBUG) are not propagated to the Docker containers that the script creates; I worked around this by adding them to the `ray` invocation in `run_cluster.sh`, but I don't see a reason why the script shouldn't pass these to the container automatically\n\nI also needed to set `--enforce-eager` but I believe that is an issue specific to our current rocm/vllm Docker images.\n\nFor the above issues I'm not sure which are general gaps in the documentation, which are AMD-specific, and which might have arisen from our Docker images. The image I used and got working was `rocm/vllm:latest` which at the time had vLLM 0.11.\n\n### Suggest a potential alternative/fix\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27823",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-10-30T18:33:04Z",
    "updated_at": "2025-10-30T18:33:04Z",
    "comments": 0,
    "user": "schung-amd"
  },
  {
    "repo": "huggingface/trl",
    "number": 4399,
    "title": "Update or remove some of the notebooks",
    "body": "I suspect these notebooks to be outdated, if so they should be either updated or removed.\n- gpt2-sentiment-control.ipynb\n- best_of_n.ipynb\n- gpt2-sentiment.ipynb",
    "url": "https://github.com/huggingface/trl/issues/4399",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation"
    ],
    "created_at": "2025-10-30T15:34:36Z",
    "updated_at": "2025-11-04T23:52:50Z",
    "comments": 0,
    "user": "qgallouedec"
  },
  {
    "repo": "huggingface/trl",
    "number": 4397,
    "title": "Remove or move Multi Adapter RL",
    "body": "I don't think this make sense to have this as a whole section in the doc. Either remove it or update and move it to PEFT integration",
    "url": "https://github.com/huggingface/trl/issues/4397",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation",
      "\u26a1 PEFT"
    ],
    "created_at": "2025-10-30T15:12:58Z",
    "updated_at": "2025-11-04T23:57:56Z",
    "comments": 0,
    "user": "qgallouedec"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166633,
    "title": "Command '['ninja', '-v']' returned non-zero exit status 255.",
    "body": "### \ud83d\udc1b Describe the bug\n\nI'm not sure it's linked to this warning message #[166580](https://github.com/pytorch/pytorch/issues/166580) and if it's a bug or how to correct it\n\n```\nptxas info    : Used 128 registers, used 16 barriers, 104 bytes cumulative stack size\nptxas info    : Compile time = 486.393 ms\nptxas info    : Compiling entry function '_ZN7cutlass13device_kernelIN5flash20enable_sm90_or_laterINS1_16FlashAttnFwdSm90INS1_25CollectiveMainloopFwdSm90ILi2EN4cute5tupleIJNS5_1CILi1EEES8_S8_EEENS6_IJNS7_ILi192EEENS7_ILi160EEENS7_ILi64EEEEEELi64ENS_12float_e4m3_tEfNS_4arch4Sm90ELb1ELb0ELb0ELb0ELb1ELb0ELb0ELb1ELb1ELb1ELb1ELb0EEENS1_21CollectiveEpilogueFwdINS6_IJSA_SC_SB_EEES9_NS_10bfloat16_tESG_Li384ELb0ELb1ELb1ELb1EEENS1_19SingleTileSchedulerILb0ELb1ELb1ELi192EEEEEEEEEvNT_6ParamsE' for 'sm_90a'\nptxas info    : Function properties for _ZN7cutlass13device_kernelIN5flash20enable_sm90_or_laterINS1_16FlashAttnFwdSm90INS1_25CollectiveMainloopFwdSm90ILi2EN4cute5tupleIJNS5_1CILi1EEES8_S8_EEENS6_IJNS7_ILi192EEENS7_ILi160EEENS7_ILi64EEEEEELi64ENS_12float_e4m3_tEfNS_4arch4Sm90ELb1ELb0ELb0ELb0ELb1ELb0ELb0ELb1ELb1ELb1ELb1ELb0EEENS1_21CollectiveEpilogueFwdINS6_IJSA_SC_SB_EEES9_NS_10bfloat16_tESG_Li384ELb0ELb1ELb1ELb1EEENS1_19SingleTileSchedulerILb0ELb1ELb1ELi192EEEEEEEEEvNT_6ParamsE\n    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads\nptxas info    : Used 128 registers, used 9 barriers\nptxas info    : Compile time = 187.196 ms\nptxas info    : Compiling entry function '_ZN7cutlass13device_kernelIN5flash20enable_sm90_or_laterINS1_16FlashAttnFwdSm90INS1_25CollectiveMainloopFwdSm90ILi2EN4cute5tupleIJNS5_1CILi1EEES8_S8_EEENS6_IJNS7_ILi192EEENS7_ILi160EEENS7_ILi64EEEEEELi64ENS_12float_e4m3_tEfNS_4arch4Sm90ELb1ELb0ELb0ELb1ELb1ELb0ELb0ELb1ELb1ELb1ELb1ELb0EEENS1_21CollectiveEpilogueFwdINS6_IJSA_SC_SB_EEES9_NS_10bfloat16_tESG_Li384ELb1ELb1ELb1ELb1EEENS1_36VarlenDynamicPersistentTileSchedulerILi192ELi384ELi128ELb1ELb1ELb1EEEEEEEEEvNT_6ParamsE' for 'sm_90a'\nptxas info    : Function properties for _ZN7cutlass13device_kernelIN5flash20enable_sm90_or_laterINS1_16FlashAttnFwdSm90INS1_25CollectiveMainloopFwdSm90ILi2EN4cute5tupleIJNS5_1CILi1EEES8_S8_EEENS6_IJNS7_ILi192EEENS7_ILi160EEENS7_ILi64EEEEEELi64ENS_12float_e4m3_tEfNS_4arch4Sm90ELb1ELb0ELb0ELb1ELb1ELb0ELb0ELb1ELb1ELb1ELb1ELb0EEENS1_21CollectiveEpilogueFwdINS6_IJSA_SC_SB_EEES9_NS_10bfloat16_tESG_Li384ELb1ELb1ELb1ELb1EEENS1_36VarlenDynamicPersistentTileSchedulerILi192ELi384ELi128ELb1ELb1ELb1EEEEEEEEEvNT_6ParamsE\n    64 bytes stack frame, 140 bytes spill stores, 156 bytes spill loads\nptxas info    : Used 128 registers, used 9 barriers, 64 bytes cumulative stack size\nptxas info    : Compile time = 260.783 ms\nptxas info    : Compiling entry function '_ZN7cutlass13device_kernelIN5flash20enable_sm90_or_laterINS1_16FlashAttnFwdSm90INS1_25CollectiveMainloopFwdSm90ILi2EN4cute5tupleIJNS5_1CILi1EEES8_S8_EEENS6_IJNS7_ILi192EEENS7_ILi160EEENS7_ILi64EEEEEELi64ENS_12float_e4m3_tEfNS_4arch4Sm90ELb1ELb0ELb0ELb1ELb1ELb1ELb0ELb1ELb1ELb1ELb1ELb0EEENS1_21CollectiveEpilogueFwdINS6_IJSA_SC_SB_EEES9_NS_10bfloat16_tESG_Li384ELb1ELb1ELb1ELb1EEENS1_36VarlenDynamicPersistentTileSchedulerILi192ELi384ELi128ELb1ELb1ELb1EEEEEEEEEvNT_6ParamsE' for 'sm_90a'\nptxas info    : Function properties for _ZN7cutlass13device_kernelIN5flash20enable_sm90_or_laterINS1_16FlashAttnFwdSm90INS1_25CollectiveMainloopFwdSm90ILi2EN4cute5tupleIJNS5_1CILi1EEES8_S8_EEENS6_IJNS7_ILi192EEENS7_ILi160EEENS7_ILi64EEEEEELi64ENS_12float_e4m3_tEfNS_4arch4Sm90ELb1ELb0ELb0ELb1ELb1ELb1ELb0ELb1ELb1ELb1ELb1ELb0EEENS1_21CollectiveEpilogueFwdINS6_IJSA_SC_SB_EEES9_NS_10bfloat16_tESG_Li384ELb1ELb1ELb1ELb1EEENS1_36VarlenDynamicPersistentTileSchedulerILi192ELi384ELi128ELb1ELb1ELb1EEEEEEEEEvNT_6ParamsE\n    104 bytes stack frame, 280 bytes spill stores, 344 bytes spill loads\nptxas info    : Used 128 registers, used 16 barriers, 104 bytes cumulative stack size\nptxas info    : Compile time = 384.035 ms\nninja: build stopped: subcommand failed.\nTraceback (most recent call last):\n  File \"/workspace/LightX2V/venv/lib/python3.11/site-packages/torch/utils/cpp_extension.py\", line 2506, in _run_ninja_build\n    subprocess.run(\n  File \"/usr/lib/python3.11/subprocess.py\", line 571, in run\n    raise CalledProcessError(retcode, process.args,\nsubprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 255.\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"/workspace/LightX2V/flash-attention/hopper/setup.py\", line 622, in <module>\n    setup(\n  File \"/workspace/LightX2V/venv/lib/python3.11/site-packages/setuptools/__init__.py\", line 87, in setup\n    return distutils.core.setup(**attrs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/workspace/LightX2V/venv/lib/python3.11/site-packages/setuptools/_distutils/core.py\", line 185, in setup\n    return run_commands(dist)\n           ^^^^^^^^^^^^^^^^^^\n  File \"/workspace/LightX2V/venv/lib/python3.11/site-packages/setuptools/_distuti",
    "url": "https://github.com/pytorch/pytorch/issues/166633",
    "state": "open",
    "labels": [
      "needs reproduction",
      "module: cpp-extensions",
      "module: cuda",
      "triaged"
    ],
    "created_at": "2025-10-30T11:07:43Z",
    "updated_at": "2025-12-31T18:42:43Z",
    "comments": 2,
    "user": "christopher5106"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1968,
    "title": "Avoiding device-to-host sync for input/output split sizes in expert parallel",
    "body": "I want to use the torchtitan code for a different MoE model, and I saw that if EP is used, then for FSDP, the module prefetching for forward and backward has to be manually set. This would be quite cumbersome as more models are used, and there would not be an easy standard way to do EP + FSDP.\n\nI looked through the code in expert_parallel.py and it seems that the input_sizes and output_sizes are set based on the number of tokens assigned to each expert. Since the input/output split size arguments to dist.all_to_all_single is a list of ints, I understand that the expert counts must be moved from GPU -> CPU which causes the D2H sync.\n\nHowever, it seems that dist.all_to_all just accepts a list of tensors, without any split size arguments. Would that avoid the D2H sync altogether? Or is the implementation underneath the same? For example, you could retrieve the list of inputs to each expert by using a mask or using index_select (instead of token reordering), and then use that as the input to dist.all_to_all. Would such a implementation simplify things and remove the D2H sync?\n\nFurthermore, in deepseed's moe implementation they seem to utilize the maximum capacity among all the experts and then don't specify the input/output split sizes (as it is an even split). Would this circumvent the D2H sync (at the expense of extra padded communication)?\n",
    "url": "https://github.com/pytorch/torchtitan/issues/1968",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-10-30T10:00:34Z",
    "updated_at": "2025-11-12T22:29:19Z",
    "user": "man2machine"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41948,
    "title": "Does Qwen2VLImageProcessor treat two consecutive images as one group/feature?",
    "body": "When looking at Qwen3-VL model's image processor (which uses Qwen2-VL's one), I found the following lines of code hard to understand.\n\n`L296-300` checks the number of input images (`patches.shape[0]`), and repeat the last one to make it divisible by `temporal_patch_size`.\nThis make the model processes two consecutive images as a single feature due to the use of 3DConv with temporal_patch_size=2 by default.\n\nhttps://github.com/huggingface/transformers/blob/76fc50a1527a7db593a6057903b749598f7000a9/src/transformers/models/qwen2_vl/image_processing_qwen2_vl.py#L293-L300\n\nBut as I understand, Qwen2-VL paper mentions that it repeats each input image `temporal_patch_size` times.\nDid I misunderstand the code?.?\n\n<img width=\"787\" height=\"205\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/fc697460-e0a2-49fa-99b8-ea3e733bb097\" />\n\n",
    "url": "https://github.com/huggingface/transformers/issues/41948",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-30T09:23:50Z",
    "updated_at": "2025-10-31T01:01:09Z",
    "comments": 3,
    "user": "priancho"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41947,
    "title": "why Smolvlm-256M-Instruct slower then Internvl-v2-1B ?",
    "body": "As title, Smolvlm have smaller model size (1/4 less matrix multiplication), smaller input embedding. But, both torch.CudaEvent, timer.perf_counter with torch.sync report the slower inference time ?\n\nI wonder that does this related with the wrong implementation of Smolvlm in transformers ?\ninference performance comparison : \ninternvl-1B >\ninp_embed : (1, 547, 896)\ntrainable params: 17,596,416 || all params: 647,260,288 || trainable%: 2.7186\n\nsmolvlm-256M >\ninp_embed : (1, 171, 576)\ntrainable params: 9,768,960 || all params: 172,742,976 || trainable%: 5.6552\n\n---\n\nmodel init (all flags turns on, especially flash attention!) :\n```python\n    if 'internvl' in self.variant.lower():\n          if '3_5' in self.variant:\n              self.model = AutoModelForImageTextToText.from_pretrained(self.variant, torch_dtype=torch.bfloat16, low_cpu_mem_usage=True, use_flash_attn=True, trust_remote_code=True)\n              # internvl3.5, lm_head is not part of language_model !?\n              lm_head = self.model.lm_head\n              self.model = self.model.language_model\n              self.model.lm_head = lm_head\n          else:\n              self.model = AutoModel.from_pretrained(\"OpenGVLab/InternVL2-1B\", torch_dtype=torch.bfloat16, low_cpu_mem_usage=True, use_flash_attn=True, trust_remote_code=True)\n              self.model = self.model.language_model\n          \n          try:\n              self.model.embed_tokens = self.model.base_model.embed_tokens\n          except:\n              self.model.embed_tokens = self.model.model.tok_embeddings\n    elif 'smolvlm' in self.variant.lower():\n        self.model = AutoModelForImageTextToText.from_pretrained(\"HuggingFaceTB/SmolVLM-256M-Instruct\", torch_dtype=torch.bfloat16, _attn_implementation=\"flash_attention_2\", trust_remote_code=True)\n        lm_head = self.model.lm_head\n        self.model = self.model.model.text_model\n        self.model.lm_head = lm_head\n        # self.model.embed_tokens already built-in!\n    else:\n        raise ValueError(f\"Carefull: Variant {self.variant} not tested.\")\n```\n\ncode snippet to measure fps :\n```python\nfor _ in range(30):\n        _, _, _ = self.model(model_input)\n        print('warm up done!')\n\nprof = Tch_prof(device=self.device)\n#prof = CudaEvent_Tch_prof(device=self.device)\nwith torch.no_grad():\n        with prof:              \n              pred_speed_wps, pred_route, language = self.model(model_input, device=self.device)  \n              # timer + sync :\n              # internvl v2-1b, lang mode : 0.3302s > 330ms ; no-lang mode : 0.0972s > 97ms (10 FPS) ?\n              # smolvlm 256m, 0.3974s > 390ms ; no-lang : 0.1 s > 100ms ?\n\n              # CudaEvent + sync : \n              # internvl v2-1b, no-lang : 82.55ms ?\n              # smolvlm 256m > no-lang : 90.68ms ? \n              \n        print(prof.get_profile())\n\n```\n\ncode snippet for timer classes :\n```python\nclass Tch_prof(object):\n    def __init__(self, device):\n        self.device = device\n        self.hw_type = 'gpu'\n        self.tlt_time = {\n            'cpu' : 0,\n            'gpu' : 0\n        }\n\n    def __enter__(self):\n        torch.cuda.current_stream(self.device).synchronize()\n        self.s = time.perf_counter()  \n         \n    def __exit__(self, *exc):\n        torch.cuda.current_stream(self.device).synchronize()\n        self.tlt_time[self.hw_type] += time.perf_counter() - self.s\n        \n    def get_profile(self, hw_type='all'):\n        if hw_type == 'all':\n            return self.tlt_time\n        elif hw_type in self.tlt_time.keys():\n            return self.tlt_time[hw_type]\n        else:\n            raise RuntimeError(f\"No such hardware type {hw_type}\") \n\n\nclass CudaEvent_Tch_prof(object):\n    def __init__(self, device):\n        self.device = device\n        self.start = torch.cuda.Event(enable_timing=True)\n        self.end = torch.cuda.Event(enable_timing=True)\n\n    def __enter__(self):\n        self.start.record()\n         \n    def __exit__(self, *exc):\n        self.end.record()\n        torch.cuda.current_stream(self.device).synchronize()\n        self.tlt_time = self.start.elapsed_time(self.end) \n        \n    def get_profile(self):\n        return self.tlt_time \n```\n\nAny suggestion will be helpful !!",
    "url": "https://github.com/huggingface/transformers/issues/41947",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-30T08:10:28Z",
    "updated_at": "2025-10-31T11:47:44Z",
    "comments": 4,
    "user": "HuangChiEn"
  },
  {
    "repo": "huggingface/trl",
    "number": 4386,
    "title": "Reference supported trainers in Liger Kernel integration guide",
    "body": "Currently, we only have an example with SFT, and it's hard to know which trainer supports liger. We should list the trainer which support liger.",
    "url": "https://github.com/huggingface/trl/issues/4386",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation",
      "\ud83c\udfcb SFT"
    ],
    "created_at": "2025-10-30T04:08:04Z",
    "updated_at": "2025-11-03T18:16:04Z",
    "comments": 0,
    "user": "qgallouedec"
  },
  {
    "repo": "huggingface/trl",
    "number": 4385,
    "title": "Use a common 'trl-lib` namespace for the models/datasets/spaces",
    "body": "In the doc, we have examples using different namespaces, like `kashif/stack-llama-2`, `edbeeching/gpt-neo-125M-imdb` etc. we should unify all these examples to use a common `trl-lib` namespace.",
    "url": "https://github.com/huggingface/trl/issues/4385",
    "state": "open",
    "labels": [
      "\ud83d\udcda documentation",
      "\u2728 enhancement"
    ],
    "created_at": "2025-10-30T04:04:10Z",
    "updated_at": "2025-10-30T04:04:38Z",
    "comments": 0,
    "user": "qgallouedec"
  },
  {
    "repo": "huggingface/trl",
    "number": 4384,
    "title": "Write the subsection \"Multi-Node Training\"",
    "body": "This section must be written, with a simple code example, and a link to the `accelerate` documentation",
    "url": "https://github.com/huggingface/trl/issues/4384",
    "state": "open",
    "labels": [
      "\ud83d\udcda documentation",
      "\u26a1accelerate"
    ],
    "created_at": "2025-10-30T03:57:53Z",
    "updated_at": "2025-12-08T16:23:23Z",
    "comments": 2,
    "user": "qgallouedec"
  },
  {
    "repo": "huggingface/trl",
    "number": 4383,
    "title": "Add PEFT subsection to \"Reducing Memory Usage\"",
    "body": "PEFT is a major technique to reduce memory usage of the training. We should have a small section pointing to the PEFT integration guide",
    "url": "https://github.com/huggingface/trl/issues/4383",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation",
      "\u2728 enhancement",
      "\u26a1 PEFT"
    ],
    "created_at": "2025-10-30T03:55:55Z",
    "updated_at": "2025-11-07T00:03:01Z",
    "comments": 0,
    "user": "qgallouedec"
  },
  {
    "repo": "huggingface/trl",
    "number": 4382,
    "title": "Populate \"Speeding Up Training\"",
    "body": "Currently, this section only mentions vLLM. We should have a small guide for other methods, like flash attention.\nIdeally, to avoid repetition, we should have a very light example, and a link to the place in the doc where it's more extensively discussed, example vLLM pointing to vLLM integration guide",
    "url": "https://github.com/huggingface/trl/issues/4382",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation",
      "\u26a1accelerate"
    ],
    "created_at": "2025-10-30T03:54:34Z",
    "updated_at": "2025-12-01T09:47:23Z",
    "comments": 0,
    "user": "qgallouedec"
  },
  {
    "repo": "huggingface/trl",
    "number": 4380,
    "title": "Fully transition from `flash-attn` to `kernels`",
    "body": "The new recommended way to use flash attention is to use kernels. We should update our tests, and documentation to use `kernels` instead of \"flash_attention2\". Eg\n\nhttps://github.com/huggingface/trl/blob/1eb561c3e9133892a2e907d84123b46e40cbc5a0/docs/source/reducing_memory_usage.md#L149\n\n```diff\n- training_args = DPOConfig(..., padding_free=True, model_init_kwargs={\"attn_implementation\": \"flash_attention_2\"}) \n+ training_args = DPOConfig(..., padding_free=True, model_init_kwargs={\"attn_implementation\": \"kernels-community/flash-attn2\"}) \n```",
    "url": "https://github.com/huggingface/trl/issues/4380",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation",
      "\u2728 enhancement"
    ],
    "created_at": "2025-10-30T03:46:07Z",
    "updated_at": "2025-11-13T04:07:35Z",
    "comments": 0,
    "user": "qgallouedec"
  },
  {
    "repo": "huggingface/trl",
    "number": 4379,
    "title": "Remove or populate \"Training customization\"",
    "body": "Currently, this part of the documentation shows some possible customizations that applies to all trainers https://huggingface.co/docs/trl/main/en/customization\n\nHowever, it only features a few examples. This sections would make sense if it gets populated with other customizations, or removed. This thread can be used to discussed additional customizations",
    "url": "https://github.com/huggingface/trl/issues/4379",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation"
    ],
    "created_at": "2025-10-30T03:41:02Z",
    "updated_at": "2025-12-01T09:39:09Z",
    "comments": 0,
    "user": "qgallouedec"
  },
  {
    "repo": "huggingface/trl",
    "number": 4378,
    "title": "Extend basic usage example to all supported CLIs",
    "body": "currently https://huggingface.co/docs/trl/main/en/clis?command_line=Reward#basic-usage shows only basic example usage for SFT, DPO and Reward. We should have it for all supported CLIs (ie, GRPO, RLOO, KTO)",
    "url": "https://github.com/huggingface/trl/issues/4378",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation",
      "\ud83c\udfcb KTO",
      "\ud83c\udfcb RLOO",
      "\ud83d\udcf1 cli",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-10-30T03:35:36Z",
    "updated_at": "2025-11-14T01:13:17Z",
    "comments": 0,
    "user": "qgallouedec"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27783,
    "title": "[Usage]: Model performance different from api",
    "body": "### Your current environment\n\n```text\nvllm==0.10.0\n```\n\n\n### How would you like to use vllm\n\nI'm running model Qwen3-8B with vllm. I also run the same experiment using Qwen3-8B api. But I find the result is quite different, the accuracy of api-model on my task is much higher than the vllm-model. I use the same temperature and top_k. \n\nIs there anyone else meeting the same question (the api-model is stronger than the vllm-model)?\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27783",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-30T03:30:02Z",
    "updated_at": "2025-10-30T03:30:02Z",
    "comments": 0,
    "user": "fny21"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27782,
    "title": "[Usage]: The same configuration v0.11.0 will report insufficient video memory compared to v0.8.5",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nThe server is a 4090 with 4 cards\nDocker runs vllm openai: v0.8.5 deployment command:  \"command: --model /models/Qwen3/Qwen3-30B-A3B --enable-reasoning --reasoning-parser deepseek_r1 --tensor_parallel_size 4\"  Can be deployed and started normally, switch the image version to v0.11.0, and run the command \"command: --model /models/Qwen3/Qwen3-30B-A3B --reasoning-parser deepseek_r1 --tensor_parallel_size 4\"  It will report that the graphics card memory is insufficient, and the error log is:\nCapturing CUDA graphs (mixed prefill-decode, PIECEWISE): 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 67/67 [00:19<00:00,  3.43it/s]\nCapturing CUDA graphs (decode, FULL): 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 35/35 [00:07<00:00,  4.78it/s]\nvllm        | (Worker_TP3 pid=263) INFO 10-29 19:57:20 [gpu_model_runner.py:3480] Graph capturing finished in 28 secs, took 1.88 GiB\nvllm        | (Worker_TP1 pid=261) INFO 10-29 19:57:20 [gpu_model_runner.py:3480] Graph capturing finished in 28 secs, took 1.88 GiB\nvllm        | (Worker_TP0 pid=260) INFO 10-29 19:57:20 [gpu_model_runner.py:3480] Graph capturing finished in 28 secs, took 1.88 GiB\nvllm        | (Worker_TP2 pid=262) INFO 10-29 19:57:20 [gpu_model_runner.py:3480] Graph capturing finished in 28 secs, took 1.88 GiB\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671] WorkerProc hit an exception.\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671] Traceback (most recent call last):\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]   File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_model_runner.py\", line 3217, in _dummy_sampler_run\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]     sampler_output = self.sampler(logits=logits,\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]   File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1773, in _wrapped_call_impl\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]     return self._call_impl(*args, **kwargs)\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]   File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1784, in _call_impl\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]     return forward_call(*args, **kwargs)\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]   File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/sample/sampler.py\", line 100, in forward\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]     sampled, processed_logprobs = self.sample(logits, sampling_metadata)\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]   File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/sample/sampler.py\", line 180, in sample\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]     random_sampled, processed_logprobs = self.topk_topp_sampler(\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]                                          ^^^^^^^^^^^^^^^^^^^^^^^\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]   File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1773, in _wrapped_call_impl\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]     return self._call_impl(*args, **kwargs)\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]   File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1784, in _call_impl\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]     return forward_call(*args, **kwargs)\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nvllm        | (Worker_TP2 pid=262) ERROR 10-29 19:57:21 [multiproc_executor.py:671]   File \"/usr/local/lib/python3.12/dist-packages/vllm/v1/sample/ops/topk_topp_sampler.py\", line 122, in forward_cuda\nvllm        | (Worker",
    "url": "https://github.com/vllm-project/vllm/issues/27782",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-30T03:24:54Z",
    "updated_at": "2025-11-06T06:53:15Z",
    "comments": 2,
    "user": "lan-qh"
  },
  {
    "repo": "huggingface/trl",
    "number": 4376,
    "title": "Rewrite `peft_integration.md`",
    "body": "This section of the documentation is widely outdated and rely only on PPO.\n\nIdeally, we should have a clear documentation that shows how to use peft with SFT, DPO and GRPO at least, via the `peft_config` argument. We could have additional subsection about QLoRA and prompt-tuning.",
    "url": "https://github.com/huggingface/trl/issues/4376",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-30T03:23:24Z",
    "updated_at": "2025-11-24T10:39:27Z",
    "comments": 0,
    "user": "qgallouedec"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27778,
    "title": "[Usage]: Is DP + PP a possible way to use vLLM?",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nHi there, I wonder if we can adopt DP + PP in vLLM to form a heterogeneous inference pipeline. For example, If i have two V100 32G GPUs and one A100 80G GPU, can I utilize them in pipeline parallelism with vLLM? I might use V100 as the first stage, and A100 as the second. \nConsider  that V100's compute ability is lower than A100, this would result in unbalance, and the V100 stage becomes a bottleneck. Thus I would like to use two V100s in DP at the first PP stage.\nIs this possible with the current released vLLM version?\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27778",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-30T02:05:06Z",
    "updated_at": "2025-10-30T02:05:06Z",
    "comments": 0,
    "user": "oldcpple"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166580,
    "title": "torch/utils/cpp_extension.py:531] There are no /usr/bin/g++-14 version bounds defined for CUDA version 13.0",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi,\n\ni'm getting that error message whatever torch version I'm trying >= 2.7\n\n```\nW1029 20:55:47.576000 79341 torch/utils/cpp_extension.py:531] There are no /usr/bin/g++-14 version bounds defined for CUDA version 13.0\nbuilding 'flash_attn_3._C' extension\n```\n\nwhat does that mean exactly ? \n\nI noticed I'm a nvidia driver 12.4 and I have cuda tools 12.8. \n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.7.1+cu128\nIs debug build: False\nCUDA used to build PyTorch: 12.8\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.3 LTS (x86_64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version: Could not collect\nCMake version: Could not collect\nLibc version: glibc-2.39\n\nPython version: 3.11.13 (main, Jun  4 2025, 08:57:30) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-6.1.62-nvidia-gpu-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: GPU 0: NVIDIA H100 PCIe\nNvidia driver version: 550.127.08\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                       x86_64\nCPU op-mode(s):                     32-bit, 64-bit\nAddress sizes:                      52 bits physical, 57 bits virtual\nByte Order:                         Little Endian\nCPU(s):                             15\nOn-line CPU(s) list:                0-14\nVendor ID:                          AuthenticAMD\nModel name:                         AMD EPYC 9354 32-Core Processor\nCPU family:                         25\nModel:                              17\nThread(s) per core:                 1\nCore(s) per socket:                 1\nSocket(s):                          15\nStepping:                           1\nBogoMIPS:                           6499.99\nFlags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw perfctr_core invpcid_single ssbd ibrs ibpb stibp vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr wbnoinvd arat npt lbrv nrip_save tsc_scale vmcb_clean flushbyasid pausefilter pfthreshold v_vmsave_vmload vgif avx512vbmi umip pku avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm flush_l1d arch_capabilities\nVirtualization:                     AMD-V\nHypervisor vendor:                  KVM\nVirtualization type:                full\nL1d cache:                          960 KiB (15 instances)\nL1i cache:                          960 KiB (15 instances)\nL2 cache:                           7.5 MiB (15 instances)\nL3 cache:                           240 MiB (15 instances)\nNUMA node(s):                       1\nNUMA node0 CPU(s):                  0-14\nVulnerability Gather data sampling: Not affected\nVulnerability Itlb multihit:        Not affected\nVulnerability L1tf:                 Not affected\nVulnerability Mds:                  Not affected\nVulnerability Meltdown:             Not affected\nVulnerability Mmio stale data:      Not affected\nVulnerability Retbleed:             Not affected\nVulnerability Spec rstack overflow: Vulnerable\nVulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:           Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected\nVulnerability Srbds:                Not affected\nVulnerability Tsx async abort:      Not affected\n\nVersions of relevant libraries:\n[pip3] numpy==2.2.6\n[pip3] nvidia-cublas==13.0.0.19\n[pip3] nvidia-cublas-cu12==12.8.3.14\n[pip3] nvidia-cuda-cupti==13.0.48\n[pip3] nvidia-cuda-cupti-cu12==12.8.57\n[pip3] nvidia-cuda-nvrtc==13.0.48\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.61\n[pip3] nvidia-cuda-runtime==13.0.48\n[pip3] nvidia-cuda-runtime-cu12==12.8.57\n[pip3] nvidia-cudnn-cu12==9.7.1.26\n[pip3] nvidia-cudnn-cu13==9.13.0.50\n[pip3] nvidia-cufft==12.0.0.15\n[pip3] nvidia-cufft-cu12==11.3.3.41\n[pip3] nvidia-curand==10.4.0.35\n[pip3] nvidia-curand-cu12==10.3.9.55\n[pip3] nvidia-cusolver==12.0.3.29\n[pip3] nvidia-cusolver-cu12==11.7.2.55\n[pip3] nvidia-cusparse==12.6.2.49\n[pip3] nvidia-cusparse-cu12==12.5.7.53\n[pip3] nvidia-cusparselt-cu12==0.6.3\n[pip3] nvidia-cusparselt-cu13==0.8.0\n[pip3] nvidia-nccl-cu12==2.26.2\n[pip3] nvidia-nccl-cu13==2.27.7\n[pip3] nvidia-nvjitlink==13.0.39\n[pip3] nvidia-nvjitlink-cu12==12.8.61\n[pip3]",
    "url": "https://github.com/pytorch/pytorch/issues/166580",
    "state": "closed",
    "labels": [
      "module: cpp-extensions",
      "triaged",
      "actionable"
    ],
    "created_at": "2025-10-29T22:24:15Z",
    "updated_at": "2025-12-29T10:58:14Z",
    "comments": 1,
    "user": "christopher5106"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166563,
    "title": "[RFC] Modifying Getting started page for Experimental Wheel Variant Support",
    "body": "### Release highlight for proposed Feature\n\nRelated to Wheel Next Initiative:  https://github.com/pytorch/pytorch/issues/159714\n\nThis  proposal is for changes to the PyTorch \"Getting Started\" page to better promote variant enabled wheels and increase their visibility. This is a strategic move to ensure users are more aware of these new options, which can improve adoption and usage.\n\nPyTorch team have been producing an experimental set of Wheels for Release 2.8 and Release 2.9. \nPyTorch Release 2.8 Q&A: https://www.youtube.com/watch?v=amx4zUyfl3I\n\n#### What are Wheel Variants ?\n- Wheel variants are a mechanism for publishing platform-dependent Python wheels and selecting the most suitable package variant for a given platform.\n- This approach helps to remove the need for local identifier experience in PyTorch packaging and enhance user experience installing PyTorch\n\n\n**Disclaimer:**  \nThis is a draft proposal. We are presenting only a schematic version at this stage. \n\nv1: https://wheelnext.github.io/pytorch_selector_revamp/v1.html\n\n<img width=\"1367\" height=\"757\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/2c4fa0c5-a209-4734-94ee-a30404c8961f\" />\n\nv2: https://wheelnext.github.io/pytorch_selector_revamp/v2.html\n\n<img width=\"1363\" height=\"724\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/7a7c2cec-f138-4691-9b54-46f563167906\" />\n\n\ncc @svekars @sekyondaMeta @AlannaBurke @malfet @seemethere @anitakat @albanD @DEKHTIARJonathan @rgommers @mgorny @emmatyping @bdice @warsaw @msarahan @vyasr @aterrel @charliermarsh @konstin @geofft @zanieb @jezdez\n\n### Release Version\n\n2.10\n",
    "url": "https://github.com/pytorch/pytorch/issues/166563",
    "state": "open",
    "labels": [
      "module: docs",
      "triaged",
      "release-feature-request"
    ],
    "created_at": "2025-10-29T20:11:37Z",
    "updated_at": "2025-10-31T15:22:23Z",
    "comments": 3,
    "user": "atalman"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166555,
    "title": "[dynamo, docs] Suggest torch.compiler.set_stance(\"force_eager\") to determine if eager code causes issues",
    "body": "We should include in the programming model docs for users to try running their code on eager to see if eager-errors are causing graph breaks.\n\n`torch.compiler.set_stance(\"force_eager\")` is the preferred way to do this since users don't have to change their `torch.compile` decorators or `module.compile` calls.\n\nSee https://docs.pytorch.org/tutorials/recipes/torch_compiler_set_stance_tutorial.html#crashing-sooner for an existing example of `set_stance` usage for debugging.\n\ncc @svekars @sekyondaMeta @AlannaBurke @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @Lucaskabela",
    "url": "https://github.com/pytorch/pytorch/issues/166555",
    "state": "open",
    "labels": [
      "module: docs",
      "triaged",
      "oncall: pt2",
      "module: dynamo",
      "compile-docs",
      "module: compile ux"
    ],
    "created_at": "2025-10-29T19:15:49Z",
    "updated_at": "2025-12-03T00:48:27Z",
    "comments": 0,
    "user": "williamwen42"
  },
  {
    "repo": "pytorch/vision",
    "number": 9253,
    "title": "Patch versions of the wheel available in the CPU only pypi registry",
    "body": "In the CPU only pypi registry, https://download.pytorch.org/whl/torchvision/, I can see some dev/patch versions of the wheels:\n\n```\ntorchvision-0.24.0+0429d73-cp311-cp311-win_arm64.whl\ntorchvision-0.24.0+0429d73-cp312-cp312-win_arm64.whl\ntorchvision-0.24.0+0429d73-cp313-cp313-win_arm64.whl\ntorchvision-0.24.0+7a9db90-cp311-cp311-win_arm64.whl\ntorchvision-0.24.0+7a9db90-cp312-cp312-win_arm64.whl\ntorchvision-0.24.0+7a9db90-cp313-cp313-win_arm64.whl\ntorchvision-0.24.0+b919bd0-cp311-cp311-win_arm64.whl\ntorchvision-0.24.0+b919bd0-cp312-cp312-win_arm64.whl\ntorchvision-0.24.0+b919bd0-cp313-cp313-win_arm64.whl\ntorchvision-0.24.0+e437e35-cp311-cp311-win_arm64.whl\ntorchvision-0.24.0+e437e35-cp312-cp312-win_arm64.whl\ntorchvision-0.24.0+e437e35-cp313-cp313-win_arm64.whl\n```\n\nI don't think they should be here in the wild, and it causes some confusion with `uv` where it's trying to use these, but is unable to download them. \n\nIs there a valid reason for these wheels to be here? If not could they be removed?\n",
    "url": "https://github.com/pytorch/vision/issues/9253",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-29T16:42:44Z",
    "updated_at": "2026-01-04T11:06:45Z",
    "comments": 3,
    "user": "aandrestrumid"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27746,
    "title": "[Bug]: `strict` value in function definitions causes request error when using Mistral tokenizer",
    "body": "### Your current environment\n\nTested with latest vllm source build from main\n\n### \ud83d\udc1b Describe the bug\n\nStart vLLM with a model that uses the mistral tokenizer:\n\n```\nvllm serve mistralai/Mistral-Small-24B-Instruct-2501 \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser mistral \\\n  --tokenizer-mode mistral\n```\n\nSend a simple tool call request with the `strict` parameter set to a value of `False`:\n\n```python\nfrom openai import OpenAI\n\nclient = OpenAI(base_url=\"http://localhost:8000/v1\", api_key=\"fake\")\n\ntools = [\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"get_current_time\",\n            \"description\": \"Get the current time in UTC\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {},\n                \"required\": []\n            },\n            \"strict\": False,\n        }\n    },\n]\nmodel = client.models.list().data[0].id\nresponse = client.chat.completions.create(\n    model=model,\n    messages=[{\"role\": \"user\", \"content\": \"What is the current time?\"}],\n    tools=tools,\n)\nprint(\"Success!\")\n```\n\nThe request fails with a 400 error like:\n\n`openai.BadRequestError: Error code: 400 - {'error': {'message': '1 validation error for Tool\\nfunction.strict\\n  Extra inputs are not permitted [type=extra_forbidden, input_value=False, input_type=bool]\\n    For further information visit https://errors.pydantic.dev/2.12/v/extra_forbidden 1 validation error for Tool\\nfunction.strict\\n  Extra inputs are not permitted [type=extra_forbidden, input_value=False, input_type=bool]\\n    For further information visit https://errors.pydantic.dev/2.12/v/extra_forbidden', 'type': 'BadRequestError', 'param': None, 'code': 400}}`\n\nStart vLLM without the mistral tokenizer and the request succeeds.\n\nNote that this is explicitly NOT about making `strict=True` actually enforce structured outputs. The scope of this is simply to not return a validation error when this parameter is passed with any valid value when the `mistral` tokenizer is in use. The current behavior breaks some client frameworks that always pass this value, even when it has a value of `False`.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27746",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-29T14:33:13Z",
    "updated_at": "2025-10-30T19:14:50Z",
    "comments": 4,
    "user": "bbrowning"
  },
  {
    "repo": "huggingface/trl",
    "number": 4368,
    "title": "GKD: multimodal inputs?",
    "body": "Does the Generalized Knowledge Distillation trainer (GKDTrainer) support multimodal inputs (VLMs)?\nIf yes, what's the expected dataset format? There is no example of this in the documentation.\n\nThanks!",
    "url": "https://github.com/huggingface/trl/issues/4368",
    "state": "closed",
    "labels": [
      "\ud83d\udcda documentation",
      "\u2753 question",
      "\ud83c\udfcb GKD"
    ],
    "created_at": "2025-10-29T14:08:44Z",
    "updated_at": "2025-11-07T19:26:23Z",
    "comments": 2,
    "user": "e-zorzi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166519,
    "title": "Long queue for ROCM runners, also B200 and XPU queueing is observed",
    "body": "## Current Status\nmitigated\n\n## Error looks like\nJobs requiring following runners will be queueing:\n\n<img width=\"731\" height=\"424\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/c83de025-fb94-4b45-a125-c65c3baa1cb7\" />\n\nPlease see:\nhttps://hud.pytorch.org/metrics\n\n## Incident timeline (all times pacific)\nStarted Oct 28, 2PM PDT ~1hr queueing. Notified AMD team on the issue\nOct 29 5AM observing 7hrs queuing SEV is created\nOct 29 5AM also observing XPU and B200 queuing\nOct 30 11AM confirmed ROCm runners are no longer queueing\n\n## User impact\nRocm jobs will not start\n\n## Root cause\n*What was the root cause of this issue?*\n\n## Mitigation\n*How did we mitigate the issue?*\n\n## Prevention/followups\n*How do we prevent issues like this in the future?*\n\n\ncc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang @naromero77amd @seemethere @malfet @pytorch/pytorch-dev-infra",
    "url": "https://github.com/pytorch/pytorch/issues/166519",
    "state": "closed",
    "labels": [
      "module: rocm",
      "module: ci",
      "triaged"
    ],
    "created_at": "2025-10-29T12:20:19Z",
    "updated_at": "2025-11-03T17:55:53Z",
    "comments": 4,
    "user": "atalman"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166516,
    "title": "Performance issue of torch._higher_order_ops.scan",
    "body": "### \ud83d\udc1b Describe the bug\n\nI have a Monte Carlo code on CPU, and I want to get one sample each from many discrete distributions pi = Ai * Bi, where A and B are N x n, with n ~ 20 and N ~ 10^6. So I generate N random numbers from 0 ~ 1, and count the cumsum of pi below the random numbers.   Ideally I want to loop over the n axis and keep only the cumsum value (instead of the full length-n vector). It leads to the `cumsum_count_fast` in the following, which is fast enough but requires recompilation for different n. If I keep the whole cumsum vector, it leads to the `cumsum_count_slow` in the following, and is much slower. I think it fits the `fori_loop` function but it's not available yet, so I just use `scan` with an empty y. Unfortuately it's just slightly faster than `cumsum_count_slow`, and much slower than `cumsum_count_fast`.  Is there any solution to this?\n```python\nimport time\nimport functools\nimport torch\ntorch._dynamo.config.capture_scalar_outputs = True\nfrom torch._higher_order_ops import scan\n\ntorch.set_default_dtype(torch.float64)\n\n# C is the normalization coefficient\n\n@functools.partial(torch.compile, dynamic=True)\ndef cumsum_count_fast(A, B, C):\n    N = len(C)\n    counts = torch.zeros(N, dtype=torch.int)\n    cumsum = torch.zeros(N)\n    for i in range(n):\n        cumsum = cumsum + torch.abs(A[i] * B[i])\n        counts = counts + (cumsum < C)\n    return counts\n\n\n@functools.partial(torch.compile, dynamic=True)\ndef cumsum_count_slow(A, B, C):\n    cumsum = torch.cumsum(torch.abs(A * B), 0)\n    return torch.sum((cumsum < C).to(torch.int), dim=0)\n\n\ndef fn(carry, ab):\n    a, b = ab\n    cumsum, counts = carry\n    new_cumsum = cumsum - torch.abs(a * b)\n    new_counts = counts + (cumsum > 0).to(torch.int)\n    new_carry = (new_cumsum, new_counts)\n    y = torch.tensor(0)\n    return new_carry, y\n\n\n@functools.partial(torch.compile, dynamic=True)\ndef cumsum_count_scan(A, B, C):\n    n, N = A.shape\n\n    cumsum = C\n    counts = torch.zeros((N, ), dtype=torch.int)\n    carry = (cumsum, counts)\n    (_, counts), _ = scan(fn, carry, (A, B))\n    return counts\n\n\nN = 1000000\nfor func in [cumsum_count_fast, cumsum_count_slow, cumsum_count_scan]:\n    print(f\"{func.__name__}\")\n    for n in [20, 30]:\n        A = torch.rand((n, N))\n        B = torch.rand((n, N))\n        total = torch.sum(torch.abs(A * B), dim=0)\n        random = torch.rand((N, ))\n        C = total * random\n        for _ in range(3):\n            t1 = time.time()\n            counts = func(A, B, C)\n            t2 = time.time()\n            print(n, t2 - t1)\n    print()\n```\n\nOutput:\n```\ncumsum_count_fast\n20 2.491441488265991\n20 0.012846231460571289\n20 0.012821197509765625\n30 0.6074924468994141\n30 0.016744375228881836\n30 0.01685929298400879\n\ncumsum_count_slow\n20 0.18932175636291504\n20 0.05529618263244629\n20 0.05519819259643555\n30 0.07843923568725586\n30 0.08022069931030273\n30 0.08077597618103027\n\ncumsum_count_scan\n20 0.755068302154541\n20 0.038268089294433594\n20 0.03831148147583008\n30 0.05788612365722656\n30 0.05818939208984375\n30 0.05914735794067383\n```\n\n### Versions\n\n```\nCollecting environment information...\nPyTorch version: 2.9.0+cu128\nIs debug build: False\nCUDA used to build PyTorch: 12.8\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.2 LTS (x86_64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version: 9.0.0 (https://github.com/conda-forge/clangdev-feedstock 284a3d5d88509307bcfba64b055653ee347371db)\nCMake version: version 3.28.3\nLibc version: glibc-2.39\n\nPython version: 3.11.11 (main, Dec 11 2024, 16:28:39) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-6.14.0-33-generic-x86_64-with-glibc2.39\nIs CUDA available: False\nCUDA runtime version: 12.4.131\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: Could not collect\nNvidia driver version: Could not collect\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           39 bits physical, 48 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  8\nOn-line CPU(s) list:                     0-7\nVendor ID:                               GenuineIntel\nModel name:                              Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz\nCPU family:                              6\nModel:                                   158\nThread(s) per core:                      1\nCore(s) per socket:                      8\nSocket(s):                               1\nStepping:                                13\nCPU(s) scaling MHz:                      96%\nCPU max MHz:                             4900.0000\nCPU min MHz:                             800.0000\nBogoMIPS:                                7200.00\nFlags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse",
    "url": "https://github.com/pytorch/pytorch/issues/166516",
    "state": "open",
    "labels": [
      "module: autograd",
      "triaged",
      "oncall: pt2",
      "module: higher order operators",
      "module: pt2-dispatcher"
    ],
    "created_at": "2025-10-29T11:57:03Z",
    "updated_at": "2025-11-04T21:32:28Z",
    "comments": 2,
    "user": "SUSYUSTC"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2338,
    "title": "policy gr00t not found when do async inference with gr00t",
    "body": "### System Info\n\n```Shell\nlerobot version: \n3f8c5d98 (HEAD -> main, origin/main, origin/HEAD) fix(video_key typo): fixing video_key typo in update_video_info (#2323)\n```\n\n### Information\n\n- [ ] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nI have installed the following packages:\n\npip install \"torch>=2.2.1,<2.8.0\" \"torchvision>=0.21.0,<0.23.0\" # --index-url https://download.pytorch.org/whl/cu1XX\npip install ninja \"packaging>=24.2,<26.0\" # flash attention dependencies\npip install \"flash-attn>=2.5.9,<3.0.0\" --no-build-isolation\npython -c \"import flash_attn; print(f'Flash Attention {flash_attn.__version__} imported successfully')\"\n\npip install lerobot[groot]\n\nThen I ran asyn inference server:\npython -m lerobot.async_inference.policy_server \\\n     --host=127.0.0.1 \\\n     --port=8080\n\nwhen the async inference client send policy gr00t, the server complains no groot as below:\n\nERROR 2025-10-29 05:30:24 /_server.py:636 Exception calling application: Policy type groot not supported. Supported policies: ['act', 'smolvla', 'diffusion', 'tdmpc', 'vqbet', 'pi0', 'pi05']\n\n\nFinetuning a pi05 model is OK on the same code\nAny idea why this happens?\n\n\n\n\n\n### Expected behavior\n\nShould not complain about no groot policy\n\n",
    "url": "https://github.com/huggingface/lerobot/issues/2338",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "policies"
    ],
    "created_at": "2025-10-29T05:36:20Z",
    "updated_at": "2025-11-21T15:34:21Z",
    "user": "jcl2023"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2337,
    "title": "Can I continue reinforcement learning in HIL-SERL using a pi0",
    "body": "Can I continue reinforcement learning in HIL-SERL using a pi0 model from LERobot that has been fine-tuned via imitation learning?",
    "url": "https://github.com/huggingface/lerobot/issues/2337",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-10-29T04:30:26Z",
    "updated_at": "2025-11-11T03:13:23Z",
    "user": "pparkgyuhyeon"
  },
  {
    "repo": "huggingface/peft",
    "number": 2878,
    "title": "peft \" target_modules='all-linear' \" have different behavior between x86 and aarch ?",
    "body": "### System Info\n\ni have tested on 2 arch (x86, arm) then find this bug.\nboth arch have peft==0.17.1\n\n### Who can help?\n\n@benjaminbossan @githubnemo\n\n### Reproduction\n\nReproduction script : bug_reprod.py\n```python\nfrom transformers import AutoModelForImageTextToText\n\nmodel = AutoModelForImageTextToText.from_pretrained(\"OpenGVLab/InternVL3_5-1B-HF\", trust_remote_code=True)\nlm_head = model.lm_head\nmodel = model.language_model\nmodel.lm_head = lm_head\n\nfrom peft import get_peft_model\nfrom peft import LoraConfig\n\npeft_config = LoraConfig(\n    inference_mode=False, \n    r=12,\n    target_modules=\"all-linear\",\n)\nbug_model = get_peft_model(model, peft_config)\nbug_model.print_trainable_parameters()\nbreakpoint()  # p bug_model, you will find lm_head have different results\n```\nput bug_reprod.py to x86 and aarch, run it you will find it have different results on lm_head!\nfollowing figure show the error :\n\n#### x86\n<img width=\"978\" height=\"567\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b33df3f2-15bc-4855-b6cb-c1b84e7ba9d9\" />\n \n#### aarch\n<img width=\"1067\" height=\"911\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1bfcd649-9bc9-44ff-a74e-5a26a7070c49\" />\n\n### Expected behavior\n\n`target_module='all-linear'` should exclude lm_head in lora tuning. At least, x86, arm arch should have identical behavior.\n\n",
    "url": "https://github.com/huggingface/peft/issues/2878",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-29T03:43:02Z",
    "updated_at": "2025-12-07T15:03:33Z",
    "comments": 4,
    "user": "HuangChiEn"
  },
  {
    "repo": "huggingface/peft",
    "number": 2877,
    "title": "peft config 'all-linear' include lm_head, is there anyway to remove it ?",
    "body": "I'm not sure is it a bug or my modification affect the peft ?\n> since some issue reveal that 'all-linear' will not include the lm_head\n```python\nif 'internvl' in self.variant.lower():\n    if '3_5' in self.variant:\n        self.model = AutoModelForImageTextToText.from_pretrained(self.variant, trust_remote_code=True)\n        # internvl3.5, lm_head is not part of language_model !?\n        lm_head = self.model.lm_head\n        self.model = self.model.language_model\n        self.model.lm_head = lm_head\n\n# then \nfrom peft import get_peft_model\nfrom peft import LoraConfig\n            \nprint('Using PEFT model')\npeft_config = LoraConfig(\n        inference_mode=False, \n        r=self.lora_r,\n        lora_alpha=self.lora_alpha,\n        lora_dropout=self.lora_dropout,\n        target_modules=\"all-linear\",\n)\nself.model = get_peft_model(self.model, peft_config)\n```\nif the modification do affect the peft config, is there any way to exclude the lm_head by setting LoraConfig ?\n\npeft version : 0.17.0\nCan anyone kindly give me some suggestion ? \nmany TKS ~\n\n---\n\nUpdate : \npeft have different behavior between x86 and aarch ?\n\nerror message while loading the pretrain weight : \n<img width=\"1702\" height=\"186\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/e13b167f-4215-446a-9f7b-42ba7d690029\" />\n\n#### x86 arch, normal\n<img width=\"978\" height=\"567\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/ee758c1e-46b7-4edd-9b2a-21d8f6fbfa5b\" />\n\n#### aarch, bug occurs\n<img width=\"1067\" height=\"911\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/94755fc8-67da-4200-a408-7929cec0f6f4\" />",
    "url": "https://github.com/huggingface/peft/issues/2877",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-29T02:19:21Z",
    "updated_at": "2025-10-29T03:43:20Z",
    "comments": 1,
    "user": "HuangChiEn"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2335,
    "title": "How to Visualize All Episodes of a LeRobot Dataset Locally?",
    "body": "Hi everyone, I have a question about LeRobot datasets. I'd like to inspect my data locally, but using the command\n_lerobot-dataset-viz --repo-id=${HF_USER}/record-test --episode-index=0_\nonly allows me to view one episode at a time, which is quite cumbersome.\n\nIs there a way to visualize all episodes of a dataset locally\u2014similar to [visualize dataset online](https://huggingface.co/spaces/lerobot/visualize_dataset), \nwhere I can easily browse through all episodes?\n\nThanks!",
    "url": "https://github.com/huggingface/lerobot/issues/2335",
    "state": "open",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-10-29T02:01:01Z",
    "updated_at": "2025-12-29T12:18:57Z",
    "user": "Vacuame"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27692,
    "title": "it run on rtx 5060 ti 16 gb",
    "body": "### Your current environment\n\n\nhttps://github.com/bokkob556644-coder/suc-vllm-rtx-5060-ti-16-gb/blob/main/suc_vllm.txt\n\n### How would you like to use vllm\n\n[I want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n](https://github.com/bokkob556644-coder/suc-vllm-rtx-5060-ti-16-gb/blob/main/suc_vllm.txt)\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27692",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-28T21:43:00Z",
    "updated_at": "2025-10-28T21:43:16Z",
    "comments": 1,
    "user": "bokkob556644-coder"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41919,
    "title": "LFM2 image_processing_lfm2_vl_fast.py Mean Std swapped?",
    "body": "### System Info\n\nIn LFM2-VL image_processing_lfm2_vl_fast.py line 212 following the MEAN and STD from imagenet is used for preprocessing.\nHowever it seems like they are swapped:\n    image_mean = IMAGENET_STANDARD_STD\n    image_std = IMAGENET_STANDARD_MEAN\n\nor is this correct ?\n\n### Who can help?\n\n@Cyrilvallez \n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nHave a look at https://github.com/huggingface/transformers/blob/main/src/transformers/models/lfm2_vl/image_processing_lfm2_vl_fast.py\n\n### Expected behavior\n\nNot optimized VLM Behaviour",
    "url": "https://github.com/huggingface/transformers/issues/41919",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-28T16:17:44Z",
    "updated_at": "2025-10-31T15:02:40Z",
    "comments": 4,
    "user": "florianvoss-commit"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27667,
    "title": "[Usage]: DeepseekOCR on CPU missing implementation for fused_topk",
    "body": "### Your current environment\n\nTry to test if it is possible to run DeepseekOCR on CPU using current git main branch.\n\nFails because there is no implementation of `fused_topk` for CPU.\n\n```\nINFO 10-28 15:41:18 [v1/worker/cpu_model_runner.py:77] Warming up model for the compilation...\nERROR:    Traceback (most recent call last):\n  File \"/opt/venv/lib/python3.12/site-packages/starlette/routing.py\", line 677, in lifespan\n    async with self.lifespan_context(app) as maybe_state:\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/starlette/routing.py\", line 566, in __aenter__\n    await self._router.startup()\n  File \"/opt/venv/lib/python3.12/site-packages/starlette/routing.py\", line 654, in startup\n    await handler()\n  File \"/app/start_server.py\", line 161, in startup_event\n    initialize_model()\n  File \"/app/start_server.py\", line 84, in initialize_model\n    llm = LLM(\n          ^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/entrypoints/llm.py\", line 336, in __init__\n    self.llm_engine = LLMEngine.from_engine_args(\n                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/v1/engine/llm_engine.py\", line 188, in from_engine_args\n    return cls(\n           ^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/v1/engine/llm_engine.py\", line 122, in __init__\n    self.engine_core = EngineCoreClient.make_client(\n                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/v1/engine/core_client.py\", line 95, in make_client\n    return InprocClient(vllm_config, executor_class, log_stats)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/v1/engine/core_client.py\", line 264, in __init__\n    self.engine_core = EngineCore(*args, **kwargs)\n                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 109, in __init__\n    num_gpu_blocks, num_cpu_blocks, kv_cache_config = self._initialize_kv_caches(\n                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 234, in _initialize_kv_caches\n    self.model_executor.initialize_from_config(kv_cache_configs)\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/v1/executor/abstract.py\", line 113, in initialize_from_config\n    self.collective_rpc(\"compile_or_warm_up_model\")\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/v1/executor/uniproc_executor.py\", line 73, in collective_rpc\n    return [run_method(self.driver_worker, method, args, kwargs)]\n            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/v1/serial_utils.py\", line 459, in run_method\n    return func(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/v1/worker/cpu_worker.py\", line 105, in compile_or_warm_up_model\n    self.model_runner.warming_up_model()\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/v1/worker/cpu_model_runner.py\", line 80, in warming_up_model\n    self._dummy_run(\n  File \"/opt/venv/lib/python3.12/site-packages/torch/utils/_contextlib.py\", line 120, in decorate_context\n    return func(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/v1/worker/gpu_model_runner.py\", line 3464, in _dummy_run\n    outputs = self.model(\n              ^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1773, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1784, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/model_executor/models/deepseek_ocr.py\", line 582, in forward\n    hidden_states = self.language_model(\n                    ^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1773, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1784, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/vllm/model_executor/models/deepseek.py\", line 495, in forward\n    hidden_states = self.model(\n                    ^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1773, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/venv/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1784, in _call_impl\n    return forward_call(*args, **kwargs)\n ",
    "url": "https://github.com/vllm-project/vllm/issues/27667",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-28T16:14:40Z",
    "updated_at": "2025-10-28T16:14:40Z",
    "comments": 0,
    "user": "brainlag"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27661,
    "title": "[RFC]: Consolidated tool call parser implementations by type (JSON, Python, XML, Harmony)",
    "body": "### Motivation.\n\nWhen someone wants to add a new tool call parser today, they typically choose an existing tool call parser that looks close to what is needed, copy it into a new file, and adjust things here and there as needed for their specific model. Sometimes tests get added, and sometimes not. Sometimes the changes to the copied parser make meaningful fixes, and sometimes the changes to the copied parser add bugs.\n\nGenerally, we have a few buckets of tool call parsers based on the format the models are trained to output - JSON, Python, XML, or Hamony style tool calls. But, we have N different implementations of streaming partial JSON parsing, N different python parsing, and so on. Instead of multiple copies of each of those, ideally we'd maintain one high quality implementation for streaming partial JSON parsing that's extensible enough to handle the needs of individual model differences.\n\n### Proposed Change.\n\nThe overall change I propose is a refactoring of the existing tool call parsers, lowering the burden to add a new tool call parser, reducing the maintenance and bug permutations possible, and providing us higher test coverage of all tool call parsers so we can systematically track and fix bugs as reported in one place.\n\nGeneral steps proposed:\n\n**Test coverage**\n\nBefore starting any refactor, the focus will be on building confidence in the existing state of all our tool call parsers by focusing on adding and extending their test suites.\n\n- [ ] Add a new common tool call parser unit test suite for all tool call parsers lacking any tests\n  - #27599\n- [ ] Reorganize existing tool call parser tests to cleanly separate unit tests that just need a tokenizer from integration tests that need actual running inference servers.\n  - Today we have `tests/tool_use` that is mostly integration tests, and `tests/entrypoints/openai/tool_parsers` that is mostly unit tests, but there's a mix of each in both. The plan is to move integration tests to `tests/tool_use` since that's where most of those live, and unit tests in `tests/entrypoints/openai/tool_parsers` that can all be run without an accelerator and execute quickly.\n- [ ] Review the history of each tool call parser, bugs filed against that tool call parser, and special statements in the code of each tool parser to identify special case handling. Create a test for each of these special cases.\n- [ ] Refactor existing tool call parser tests to use the common test suite for all tool call parsers while retaining any model-specific tests required by the previous review of parsers.\n- [ ] File issues of type bug for every test in the common suite that is marked as \"expected fail\" for various tool call parsers. There will be a number of these, with tool call parsers that do not meet the standards of the common suite today. These represent low-hanging fruit for us to find and fix for each parser.\n  - Some fixes may be trivial, and can happen before consolidating implementations just to incrementally raise the quality of our parsers. Some fixes may not be trivial, and may only happen after consolidating implementations.\n\n**Refactoring and consolidation**\n\nAfter we have the expanded test suite, we'll have the confidence to undertake this refactor without introducing a lot of new bugs as each parser has some bespoke logic today that needs to be accounted for.\n\n- [ ] Consolidate all the partial and streaming JSON parsing logic into a central place that every JSON-style tool call parser consumes. Ensure no test regressions\n- [ ] Consolidate all the partial and streaming Python parsing logic into a central place that every Python-style tool call parser consumes.\n\n**Post-consolidation bug squashing and docs**\n\n- [ ] Remove any remaining `xfail` markers in the test suite across all tool parser test suites.\n- [ ] Update contributor docs that discuss how to add a new tool call parser, how to reuse the common logic for JSON, Python, XML, etc parsing instead of writing new, and how to use the new common test suite to simplify testing of the new parser. \n\n### Feedback Period.\n\nThis is ongoing work and feedback is accepted at any time while this issue is open. Initial stages of expanding our test coverage have already started, but there's at least a couple of weeks to provide feedback before work gets to the point of actual refactoring and consolidating of the tool call parsers.\n\n### CC List.\n\n_No response_\n\n### Any Other Things.\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27661",
    "state": "open",
    "labels": [
      "RFC"
    ],
    "created_at": "2025-10-28T14:54:10Z",
    "updated_at": "2025-10-30T16:14:09Z",
    "comments": 2,
    "user": "bbrowning"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1950,
    "title": "Break the tests/integration_tests/run_tests.py UT",
    "body": "### Bug description\n\nhttps://github.com/pytorch/torchtitan/pull/1922 this patch break the existing tests/integration_tests/run_tests.py \n\nError :\n[rank0]:[rank0]: Traceback (most recent call last):\n[rank0]:[rank0]:   File \"/home/dvasanth/miniforge3/envs/env_pt_2_10_ww42/lib/python3.10/runpy.py\", line 196, in _run_module_as_main\n[rank0]:[rank0]:     return _run_code(code, main_globals, None,\n[rank0]:[rank0]:   File \"/home/dvasanth/miniforge3/envs/env_pt_2_10_ww42/lib/python3.10/runpy.py\", line 86, in _run_code\n[rank0]:[rank0]:     exec(code, run_globals)\n[rank0]:[rank0]:   File \"/home/dvasanth/workspace/torchtitan_repos/torchtitan/torchtitan/train.py\", line 683, in <module>\n[rank0]:[rank0]:     trainer.train()\n[rank0]:[rank0]:   File \"/home/dvasanth/miniforge3/envs/env_pt_2_10_ww42/lib/python3.10/site-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py\", line 358, in wrapper\n[rank0]:[rank0]:     return f(*args, **kwargs)\n[rank0]:[rank0]:   File \"/home/dvasanth/workspace/torchtitan_repos/torchtitan/torchtitan/train.py\", line 608, in train\n[rank0]:[rank0]:     self.train_step(data_iterator)\n[rank0]:[rank0]:   File \"/home/dvasanth/workspace/torchtitan_repos/torchtitan/torchtitan/train.py\", line 508, in train_step\n[rank0]:[rank0]:     loss = self.forward_backward_step(input_dict, labels)\n[rank0]:[rank0]:   File \"/home/dvasanth/workspace/torchtitan_repos/torchtitan/torchtitan/train.py\", line 453, in forward_backward_step\n[rank0]:[rank0]:     self.pp_schedule.step(\n[rank0]:[rank0]:   File \"/home/dvasanth/miniforge3/envs/env_pt_2_10_ww42/lib/python3.10/site-packages/torch/distributed/pipelining/schedules.py\", line 626, in step\n[rank0]:[rank0]:     self._step_microbatches(args_split, kwargs_split, targets_split, losses)\n[rank0]:[rank0]:   File \"/home/dvasanth/miniforge3/envs/env_pt_2_10_ww42/lib/python3.10/site-packages/torch/distributed/pipelining/schedules.py\", line 728, in _step_microbatches\n[rank0]:[rank0]:     self._initialize_stage(arg_mbs[0], kwarg_mbs[0])\n[rank0]:[rank0]:   File \"/home/dvasanth/miniforge3/envs/env_pt_2_10_ww42/lib/python3.10/site-packages/torch/distributed/pipelining/schedules.py\", line 585, in _initialize_stage\n[rank0]:[rank0]:     self._stage._prepare_forward_infra(self._n_microbatches, args, kwargs)\n[rank0]:[rank0]:   File \"/home/dvasanth/miniforge3/envs/env_pt_2_10_ww42/lib/python3.10/site-packages/torch/distributed/pipelining/stage.py\", line 1525, in _prepare_forward_infra\n[rank0]:[rank0]:     outputs = self._shape_inference(args, kwargs)\n[rank0]:[rank0]:   File \"/home/dvasanth/miniforge3/envs/env_pt_2_10_ww42/lib/python3.10/site-packages/torch/distributed/pipelining/stage.py\", line 1455, in _shape_inference\n[rank0]:[rank0]:     outputs = self.submod(*args, **kwargs)\n[rank0]:[rank0]:   File \"/home/dvasanth/miniforge3/envs/env_pt_2_10_ww42/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1780, in _wrapped_call_impl\n[rank0]:[rank0]:     return self._call_impl(*args, **kwargs)\n[rank0]:[rank0]:   File \"/home/dvasanth/miniforge3/envs/env_pt_2_10_ww42/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1886, in _call_impl\n[rank0]:[rank0]:     return inner()\n[rank0]:[rank0]:   File \"/home/dvasanth/miniforge3/envs/env_pt_2_10_ww42/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1834, in inner\n[rank0]:[rank0]:     result = forward_call(*args, **kwargs)\n[rank0]:[rank0]: TypeError: Transformer.forward() got an unexpected keyword argument 'return_outputs'\n\n### Versions\n\ncommit 8228c0845aa8b2e6e9672c30f40fe4af9588dca2 (HEAD -> main, origin/main, origin/HEAD)",
    "url": "https://github.com/pytorch/torchtitan/issues/1950",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-10-28T13:14:37Z",
    "updated_at": "2025-10-29T08:55:34Z",
    "user": "dayanandav"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2329,
    "title": "smolvla base model ( the Vlm part) to other model",
    "body": "Can I change smolvla base model ( the Vlm part) to other model?\nWhat should I do?\nThanks",
    "url": "https://github.com/huggingface/lerobot/issues/2329",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-10-28T12:28:44Z",
    "updated_at": "2025-10-31T15:09:12Z",
    "user": "smartparrot"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3625,
    "title": "Will you release the TorchRL C++ API in the future, similar to the PyTorch C++ API?",
    "body": "Will you release the TorchRL C++ API in the future, similar to the PyTorch C++ API? We look forward to using the TorchRL C++ API in the future.",
    "url": "https://github.com/pytorch/tutorials/issues/3625",
    "state": "open",
    "labels": [
      "question",
      "Reinforcement Learning"
    ],
    "created_at": "2025-10-28T11:27:52Z",
    "updated_at": "2025-10-28T15:36:30Z",
    "user": "hyl20012"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27649,
    "title": "[Usage]: Qwen3-32B on RTX PRO 6000 (55s First Token Delay and 15t/s)",
    "body": "Why does the Qwen3-32B model take 55 seconds before producing the first token, and why is the generation speed only 15t/s?\n\nMy vLLM configuration:\n\nDevice: GB202GL [RTX PRO 6000 Blackwell Server Edition]\n\nNvidia Driver Version\uff1a580.95.05\nCUDA Version\uff1a13.0\n\nDocker configuration: \n\n```sh\nPORT=8085\nMODEL_PATH=Qwen/Qwen3-32B\nSERVED_MODEL_NAME=vLLM-Qwen3-32B\n\ndocker run -d \\\n  --runtime nvidia \\\n  --gpus all \\\n  -v /data/projects/docker/vllm/.cache/huggingface:/root/.cache/huggingface \\\n  -p $PORT:8000 \\\n  --env \"HUGGING_FACE_HUB_TOKEN=$HUGGING_FACE_HUB_TOKEN\" \\\n  --name $SERVED_MODEL_NAME \\\n  --restart unless-stopped \\\n  --ipc=host \\\n  vllm/vllm-openai:v0.11.0 \\\n  --model /root/.cache/huggingface/$MODEL_PATH \\\n  --served-model-name $SERVED_MODEL_NAME \\\n  --dtype bfloat16 \\\n  --gpu-memory-utilization 0.92 \\\n  --max-model-len 32768 \\\n  --max-num-seqs 64 \\\n  --tensor-parallel-size 1 \\\n  --api-key sk-vx023nmlrtTmlC\n```",
    "url": "https://github.com/vllm-project/vllm/issues/27649",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-28T10:49:43Z",
    "updated_at": "2025-11-07T02:30:26Z",
    "comments": 4,
    "user": "yizhitangtongxue"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27646,
    "title": "[Usage]: How to use vllm bench serve to bench remote deployed vllm models (can't bench when ep enabled!!!)",
    "body": "### Your current environment\n\nI deployed dpskv3 in a remote server using:\n```\nexport VLLM_USE_V1=1\nexport VLLM_ALL2ALL_BACKEND=deepep_low_latency\nvllm serve /models/hf/models--deepseek-ai--DeepSeek-V3 --tensor-parallel-size 1 --data-parallel-size 8 --enable-expert-parallel --no-enforce-eager --load-format dummy\n```\n\nAnd on another server:\n```\nVLLM_USE_V1=1  vllm bench serve --model  /models/hf/models--deepseek-ai--DeepSeek-V3/ --endpoint  /v1/completions --dataset-name sharegpt --dataset-path /datasets/ShareGPT/ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts 10 --ready-check-timeout-sec 0     --ip 10.102.212.22  --port 8000 \n```\nwhere  10.102.212.22  is the server ip\uff0c 8000 is the default port\n\nAnd I got this below error on server:\n```\n\"POST /v1/completions HTTP/1.1\" 404 Not Found\n```\n\n\n### How would you like to use vllm\n\nI want to run inference of a deepseekv3.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27646",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-28T09:56:37Z",
    "updated_at": "2025-10-28T15:23:06Z",
    "comments": 3,
    "user": "Valerianding"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41910,
    "title": "Breaking change about AWQ Fused modules due to Attention Refactor",
    "body": "### System Info\n\ntransformers==5.0.0dev\nautoawq==0.2.9\nautoawq_kernels==0.0.9\ntorch==2.6.0+cu124\n\n### Who can help?\n\nDue to PR #35235, the `past_key_values` is no longer a returned value of attention modules.\n\nHowever, when using AWQ models with Fused modules [AWQ Fused modules docs](https://huggingface.co/docs/transformers/main/en/quantization/awq#fused-modules), there will be an error like issue #38554\n\n```bash\n    hidden_states, _ = self.self_attn(\nValueError: too many values to unpack (expected 2)\n```\n\nSo we can hack the `awq.modules.fused.attn.QuantAttentionFused` to avoid returning `past_key_values`. Therefore, I create a primary PR #41909 to fix it.\n\nHowever, for special `rope_type` such as LLaMA3, the RoPE implementation in AutoAWQ will cause error, since `awq.modules.fused.attn.RoPE` supports default RoPE only.\n\nMaybe we can implement and maintain `AwqRoPE` and `AwqQuantAttentionFused` in `transformers.integrations.awq`? Or we can maintain `huggingface/AutoAWQ` as `casper-hansen/AutoAWQ` is archived.\n\nI'd like to refine my PR to help transformers fix this bug!\n\n@SunMarc @MekkCyber\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\n```python\n\nfrom transformers import AwqConfig, AutoModelForCausalLM, AutoTokenizer\n\n\n# model_path = \"./llama-3.1-8b-instruct-awq\"\nmodel_path = \"./qwen2.5-7b-instruct-awq\"\n# model_path = \"./qwen3-8b-awq\"\n\nawq_config = AwqConfig(\n    bits=4,\n    do_fuse=True,\n    fuse_max_seq_len=8192\n)\n\nmodel = AutoModelForCausalLM.from_pretrained(model_path, quantization_config=awq_config).to(\"cuda:0\")\nprint(model)\ntokenizer = AutoTokenizer.from_pretrained(model_path)\n\nmax_new_tokens = 1024 if \"qwen3\" in model_path else 32\n\n\nmessages = []\n\nprompt1 = \"What is the result of 3+5?\"\nmessages.append({\"role\": \"user\", \"content\": prompt1})\ntext1 = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)\ninputs1 = tokenizer(text1, return_tensors=\"pt\").to(\"cuda:0\")\n\ngenerated_ids1 = model.generate(**inputs1, max_new_tokens=max_new_tokens)\noutput_ids1 = generated_ids1[0, len(inputs1.input_ids[0]) :].tolist()\noutput1 = tokenizer.decode(output_ids1, skip_special_tokens=True)\nmessages.append({\"role\": \"assistant\", \"content\": output1})\nprint(\"Output 1:\", output1)\n\nprompt2 = \"What about adding 10 to that result?\"\nmessages.append({\"role\": \"user\", \"content\": prompt2})\ntext2 = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)\ninputs2 = tokenizer(text2, return_tensors=\"pt\").to(\"cuda:0\")\n\ngenerated_ids2 = model.generate(**inputs2, max_new_tokens=max_new_tokens)\noutput_ids2 = generated_ids2[0, len(inputs2.input_ids[0]) :].tolist()\noutput2 = tokenizer.decode(output_ids2, skip_special_tokens=True)\nmessages.append({\"role\": \"assistant\", \"content\": output2})\nprint(\"Output 2:\", output2)\n\n```\n\n### Expected behavior\n\nThere is no error.",
    "url": "https://github.com/huggingface/transformers/issues/41910",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-28T08:29:03Z",
    "updated_at": "2025-11-20T13:41:34Z",
    "comments": 3,
    "user": "fanqiNO1"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27636,
    "title": "[Usage]: vllm\u5982\u4f55\u4fdd\u7559qwen3-vl\u4e2d\u7684special token",
    "body": "### Your current environment\n\n\u6211\u5fae\u8c03\u8fc7\u7684qwen3-vl\u6a21\u578b\u7684grounding\u683c\u5f0f\u4e3a\uff1a<|object_ref_start|>\u56fe\u7247<|object_ref_end|><|box_start|>(x1,y1),(x2,y2)<|box_end|>\n\u4f7f\u7528vllm serve\u63a8\u7406\u7684\u683c\u5f0f\u662f\uff1a\u56fe\u7247(460,66),(683,252)\uff0c\u8fd9\u4e2a\u662f\u76f4\u63a5\u5ffd\u7565\u4e86special token\u4e48\uff0c\u662f\u5426\u6709\u65b9\u6cd5\u53ef\u4ee5\u4fdd\u7559\u3002\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27636",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-28T06:52:16Z",
    "updated_at": "2025-10-28T06:52:16Z",
    "comments": 0,
    "user": "qfs666"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12553,
    "title": "Reason to move from OpenCV to ffmpeg",
    "body": "I see that `diffusers.utils.export_to_video()` encourages ffmpeg usage instead of OpenCV. Can you share the reason? I'm looking for a way to add video decoding to my project so I'm collecting arguments.",
    "url": "https://github.com/huggingface/diffusers/issues/12553",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-28T06:49:48Z",
    "updated_at": "2025-11-07T13:27:03Z",
    "comments": 10,
    "user": "Wovchena"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27634,
    "title": "[Usage]: how to use --quantization option of `vllm serve`\uff1f",
    "body": "### Your current environment\n\n```text\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu129\nIs debug build               : False\nCUDA used to build PyTorch   : 12.9\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0] (64-bit runtime)\nPython platform              : Linux-5.15.0-160-generic-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 11.5.119\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : GPU 0: NVIDIA GeForce RTX 4090 D\nNvidia driver version        : 570.195.03\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           48 bits physical, 48 bits virtual \nByte Order:                              Little Endian\nCPU(s):                                  32\nOn-line CPU(s) list:                     0-31\nVendor ID:                               AuthenticAMD\nModel name:                              AMD Ryzen 9 9950X3D 16-Core Processor\nCPU family:                              26\nModel:                                   68\nThread(s) per core:                      2\nCore(s) per socket:                      16\nSocket(s):                               1\nStepping:                                0\nFrequency boost:                         enabled\nCPU max MHz:                             8839.3555\nCPU min MHz:                             3000.0000\nBogoMIPS:                                8583.32\nFlags:                                   fpu vme de pse tsc msr pae mce cx8\n apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall \nnx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc\n cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse\n4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm ex\ntapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tc\ne topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l\n3 hw_pstate ssbd mba ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase tsc_adj\nust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx \nsmap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt \nxsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx\n_vnni avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbr\nv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefi\nlter pfthreshold v_vmsave_vmload vgif v_spec_ctrl avx512vbmi umip pku ospke\n avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcnt\ndq rdpid bus_lock_detect movdiri movdir64b overflow_recov succor smca fsrm avx512_vp2intersect flush_l1d\nVirtualization:                          AMD-V\nL1d cache:                               768 KiB (16 instances)\nL1i cache:                               512 KiB (16 instances)\nL2 cache:                                16 MiB (16 instances)\nL3 cache:                                128 MiB (2 instances)\nNUMA node(s):                            1\nNUMA node0 CPU(s):                       0-31\nVulnerability Gather data sampling:      Not affected\nVulnerability Indirect target selection: Not affected\nVulnerability Itlb multihit:             Not affected\nVulnerability L1tf:                      Not affected\nVulnerability Mds:                       Not affected\nVulnerability Meltdown:                  Not affected\nVulnerability Mmio stale data:           Not affected\nVulnerability Reg file data sampling:    Not affected\nVulnerability Retbleed:                  Not affected\nVulnerability Spec rstack overflow:      Not affected\nVulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:                Mitigation; Enhanced / Automatic I\nBRS; IBPB conditional; STIBP always-on; PBRSB-eIBRS Not affected; BHI Not affected\nVulnerability Srbds:                     Not affected\nVulnerability Tsa:                       Not",
    "url": "https://github.com/vllm-project/vllm/issues/27634",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-28T06:24:38Z",
    "updated_at": "2025-10-28T15:57:47Z",
    "comments": 3,
    "user": "Septemberlemon"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166363,
    "title": "All Docker build failed due to Ubuntu archive outage",
    "body": "## Current Status\nClosed\n\n## Error looks like\nDocker build Error:\n```\n#9 82.65 W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease  Could not connect to archive.ubuntu.com:80 (185.125.190.82), connection timed out Could not connect to archive.ubuntu.com:80 (185.125.190.81), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.81), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.82), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.83), connection timed out Could not connect to archive.ubuntu.com:80 (185.125.190.83), connection timed out [IP: 185.125.190.81 80]\n```\nMultiple CI/CD jobs are timing out on Calculate Image step\n\n## Incident timeline (all times pacific)\nStarted - Oct 27, 2025 06:00:36 PM\nMarket resolved on Oct 27, 2025 06:48:43 PM https://status.canonical.com/#/incident/KNms6QK9ewuzz-7xUsPsNylV20jEt5kyKsd8A-3ptQFMY_6s8e7AbWcGbatrjSU_aoghGrAcVK7slWXgWMkizA==\nHowever observed failure on Oct 27, 2025 7:10 PM - https://github.com/pytorch/pytorch/actions/runs/18859957307/job/53816104822\nReverted a PR causing trigger docker rebuild https://github.com/pytorch/pytorch/pull/165470 Oct 27,  7:15PM\nConfirmed that issue is resolved at Oct 28, 2025 6:00AM\n\n\n## User impact\nMultiple CI/CD failures\n\n## Root cause\nComponent \"archive.ubuntu.com\" and a few other components are Down\nhttps://status.canonical.com/#/incident/KNms6QK9ewuzz-7xUsPsNylV20jEt5kyKsd8A-3ptQFMY_6s8e7AbWcGbatrjSU_aoghGrAcVK7slWXgWMkizA==\n\n## Mitigation\nReverted the PR that trigger docker rebuild https://github.com/pytorch/pytorch/pull/165470\n\n## Prevention/followups\n*How do we prevent issues like this in the future?*\n",
    "url": "https://github.com/pytorch/pytorch/issues/166363",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-28T02:42:58Z",
    "updated_at": "2025-10-28T13:57:51Z",
    "comments": 0,
    "user": "atalman"
  },
  {
    "repo": "huggingface/candle",
    "number": 3151,
    "title": "Tensor conversion to_vec1() failing on 0.9.2-alpha.1 - Metal",
    "body": "Dependencies\n\n```toml\ncandle-core = { git = \"https://github.com/huggingface/candle\", rev = \"df618f8\", features = [\"metal\"] }\ncandle-nn = { git = \"https://github.com/huggingface/candle\", rev = \"df618f8\", features = [\"metal\"] }\ncandle-transformers = { git = \"https://github.com/huggingface/candle\", rev = \"df618f8\", features = [\"metal\"] }\n```\n\nRunning on Macbook M2 Pro - Metal - Tahoe 26.0.1\n\nSince upgrading to 0.9.2-alpha.1, BERT operations on Metal have started hanging when converting rank-1 tensor to Vec<32>. This seems to be affecting any ops that attempt to synchronize or move data from GPU to CPU. Not sure if this is directly related to the update but rolling back to 0.9.1 or using CPU as device fixes the issue. \n\nSome example of ops that are failing...\n\n```rust\ntensor.device().synchronize()\ntensor.to_device()\ntensor.to_vec1()\n```\n\nActual code being run...\n\n```rust\nlet (token_ids, token_type_ids, attention_mask) = self.encode_text(text)?;\n\nlet hidden_states = self\n    .forward_model(&token_ids, &token_type_ids, &attention_mask)\n    .await\n    .map_err(|e| {\n        log::error!(\"Failed to forward to model: {}\", e);\n        e\n    })?;\n\nlet embeddings = self\n    .apply_mean_pooling(&hidden_states, &attention_mask)\n    .map_err(|e| {\n        log::error!(\"Failed to apply mean pooling: {}\", e);\n        e\n    })?;\n\n...\n\nfn apply_mean_pooling(\n      &self,\n      hidden_states: &Tensor,\n      attention_mask: &Tensor,\n  ) -> Result<Vec<f32>> {\n      log::info!(\"Applying mean pooling to hidden states...\");\n\n      let attention_mask_for_pooling = attention_mask\n          .to_dtype(hidden_states.dtype())?\n          .unsqueeze(2)?;\n      let sum_mask = attention_mask_for_pooling.sum(1)?;\n\n      let pooled = (hidden_states.broadcast_mul(&attention_mask_for_pooling)?).sum(1)?;\n      let sum_mask_safe = sum_mask.clamp(NUMERICAL_STABILITY_EPSILON, f32::MAX)?;\n      let pooled = pooled.broadcast_div(&sum_mask_safe)?;\n\n      let denom = pooled\n          .sqr()?\n          .sum_keepdim(1)?\n          .sqrt()?\n          .clamp(NUMERICAL_STABILITY_EPSILON, f32::MAX)?;\n\n      let pooled = pooled.broadcast_div(&denom)?;\n      let pooled = pooled.squeeze(0)?;\n      \n      // HANGING HERE ... no errors\n      // Tensor shape - Tensor[dims 1024; f32, metal:4294968337]\n      let embeddings = pooled.to_vec1::<f32>().map_err(|e| Error::TensorOp {\n          operation: format!(\"Failed to convert tensor to f32 vector: {}\", e),\n      })?;\n\n      Ok(embeddings)\n  }\n```",
    "url": "https://github.com/huggingface/candle/issues/3151",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-27T21:36:17Z",
    "updated_at": "2025-11-06T22:44:14Z",
    "comments": 2,
    "user": "si-harps"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27604,
    "title": "[Bug]: Is Flashinfer Attn backend supposed to work with FP8 KV cache on Hopper?",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Amazon Linux 2023.7.20250428 (x86_64)\nGCC version                  : (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)\nClang version                : Could not collect\nCMake version                : version 3.26.4\nLibc version                 : glibc-2.34\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.6 (main, May  6 2025, 20:22:13) [GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] (64-bit runtime)\nPython platform              : Linux-6.1.134-150.224.amzn2023.x86_64-x86_64-with-glibc2.34\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : \nGPU 0: NVIDIA H100 80GB HBM3\nGPU 1: NVIDIA H100 80GB HBM3\nGPU 2: NVIDIA H100 80GB HBM3\nGPU 3: NVIDIA H100 80GB HBM3\nGPU 4: NVIDIA H100 80GB HBM3\nGPU 5: NVIDIA H100 80GB HBM3\nGPU 6: NVIDIA H100 80GB HBM3\nGPU 7: NVIDIA H100 80GB HBM3\n\nNvidia driver version        : 570.133.20\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        48 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               192\nOn-line CPU(s) list:                  0-191\nVendor ID:                            AuthenticAMD\nModel name:                           AMD EPYC 7R13 Processor\nCPU family:                           25\nModel:                                1\nThread(s) per core:                   2\nCore(s) per socket:                   48\nSocket(s):                            2\nStepping:                             1\nBogoMIPS:                             5299.99\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch topoext perfctr_core invpcid_single ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 clzero xsaveerptr rdpru wbnoinvd arat npt nrip_save vaes vpclmulqdq rdpid\nHypervisor vendor:                    KVM\nVirtualization type:                  full\nL1d cache:                            3 MiB (96 instances)\nL1i cache:                            3 MiB (96 instances)\nL2 cache:                             48 MiB (96 instances)\nL3 cache:                             384 MiB (12 instances)\nNUMA node(s):                         2\nNUMA node0 CPU(s):                    0-47,96-143\nNUMA node1 CPU(s):                    48-95,144-191\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Mitigation; safe RET\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affected\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-python==0.3.1\n[pip3] numpy==2.2.6\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cudnn-frontend==1.15.0\n[pip3] nvidia-cufft-cu12==11.3.3.83\n[pi",
    "url": "https://github.com/vllm-project/vllm/issues/27604",
    "state": "open",
    "labels": [
      "bug",
      "nvidia"
    ],
    "created_at": "2025-10-27T20:22:37Z",
    "updated_at": "2025-11-06T02:37:17Z",
    "comments": 10,
    "user": "jmkuebler"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 1834,
    "title": "Discussion: how to edit the messages sent to the underlying LLM",
    "body": "Hi! I'm working on a feature to allow a user to add callbacks to modify the content before it is sent to the LLM, inside the agent loop. \n\nI noticed this strange behavior where the first user message must start with \"New Task:\", otherwise I get this cryptic and misleading error message.\n\n\n\"\"Error:\\nError while parsing tool call from model output: The model output does not contain any JSON blob.\\nNow let's retry: take care not to repeat previous errors! If you have retried several times, try a completely different approach.\\n\"\"\n\nSo I think I have two (or maybe one question):\n\n1. Is my approach to control the messages flow by wrapping the `generate` member function of a Smolagent correct? Or do you recommend a better way to modify messages before sending them to the underlying LLM?\n2. Is it expected that the first user message needs to start with New Task:, or have I found a bug or missing assertion somewhere in the code? Thanks!\n\nhttps://github.com/mozilla-ai/any-agent/blob/f2475d7507c5a78e241ff5f0883b546d796d29fc/src/any_agent/callbacks/wrappers/smolagents.py#L75\n\nI'm on smolagents==1.22.0, python 3.13.\n\nUPDATE: I'm no longer sure that adding \"New Task:\" is the fix, I am still seeing intermittent errors even when I have that text added. It seems like there some sort of race condition, I'm confused about where the \"messages\" content should be edited, since it seems like maybe it's being stored or referenced in multiple conditions? Any help appreciated!\n",
    "url": "https://github.com/huggingface/smolagents/issues/1834",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-27T17:28:38Z",
    "updated_at": "2025-10-27T19:02:39Z",
    "user": "njbrake"
  },
  {
    "repo": "pytorch/vision",
    "number": 9251,
    "title": "roi_align onnx export fails while seemingly supported in torchvision code",
    "body": "### \ud83d\udc1b Describe the bug\n\nONNX export of a model using roi_align fails:\n\nCode:\n\n```\nimport torch\nfrom torch import nn\nfrom torchvision.ops import roi_align\n\nclass TestModel(nn.Module):\n    def forward(self, x, b):\n        return roi_align(x, b, output_size=(7, 7), spatial_scale=1/16.0)\n\nx = torch.zeros((1, 128, 40, 40))\nb = torch.zeros((300, 5))\nmodel = TestModel()\nonnx_model = torch.onnx.export(model, (x, b), opset_version=22, report=True, verbose=True)\n```\n\nThe strange thing is that I am seeing support for ROIAlign ops in the code: https://github.com/pytorch/vision/blob/218d2ab791d437309f91e0486eb9fa7f00badc17/torchvision/ops/_register_onnx_ops.py\n\nJust unsure how to use it or activate the support.\n\nThe ONNX conversion report is attached.\n\n[onnx_export_2025-10-27_17-13-55-895426_conversion.md](https://github.com/user-attachments/files/23168838/onnx_export_2025-10-27_17-13-55-895426_conversion.md)\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.9.0+cu128\nIs debug build: False\nCUDA used to build PyTorch: 12.8\nROCM used to build PyTorch: N/A\n\nOS: Debian GNU/Linux 13 (trixie) (x86_64)\nGCC version: (Debian 14.2.0-19) 14.2.0\nClang version: Could not collect\nCMake version: Could not collect\nLibc version: glibc-2.41\n\nPython version: 3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0] (64-bit runtime)\nPython platform: Linux-6.12.48+deb13-amd64-x86_64-with-glibc2.41\nIs CUDA available: True\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to: \nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 3080 Ti\nNvidia driver version: 550.163.01\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           48 bits physical, 48 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  16\nOn-line CPU(s) list:                     0-15\nVendor ID:                               AuthenticAMD\nModel name:                              AMD Ryzen 7 7700X 8-Core Processor\nCPU family:                              25\nModel:                                   97\nThread(s) per core:                      2\nCore(s) per socket:                      8\nSocket(s):                               1\nStepping:                                2\nFrequency boost:                         enabled\nCPU(s) scaling MHz:                      74%\nCPU max MHz:                             5573.0000\nCPU min MHz:                             400.0000\nBogoMIPS:                                8983.06\nFlags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid overflow_recov succor smca fsrm flush_l1d\nVirtualization:                          AMD-V\nL1d cache:                               256 KiB (8 instances)\nL1i cache:                               256 KiB (8 instances)\nL2 cache:                                8 MiB (8 instances)\nL3 cache:                                32 MiB (1 instance)\nNUMA node(s):                            1\nNUMA node0 CPU(s):                       0-15\nVulnerability Gather data sampling:      Not affected\nVulnerability Indirect target selection: Not affected\nVulnerability Itlb multihit:             Not affected\nVulnerability L1tf:                      Not affected\nVulnerability Mds:                       Not affected\nVulnerability Meltdown:                  Not affected\nVulnerability Mmio stale data:           Not affected\nVulnerability Reg file data sampling:    Not affected\nVulnerability Retbleed:                  Not affected\nVulnerability Spec rstack overflow:      Mitigation; Safe RET\nVulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:                Mitigation; usercopy/swapgs ba",
    "url": "https://github.com/pytorch/vision/issues/9251",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-27T16:21:07Z",
    "updated_at": "2025-10-28T11:58:28Z",
    "comments": 2,
    "user": "timstokman"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166303,
    "title": "Pytorch Operators on older pytorch version",
    "body": "### \ud83d\udcda The doc issue\n\nHi team,\n\nI've seen that PyTorch has recently been transitioning to `pip install` (https://github.com/pytorch/pytorch/issues/152276).\n\nFor projects doing custom operators like Kaolin we want to support a reasonable version matrix of PyTorch, what are we supposed to do?\n\nThe documentation for custom operators is not accessible on older versions (automatically lead to latest version).\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @svekars @sekyondaMeta @AlannaBurke",
    "url": "https://github.com/pytorch/pytorch/issues/166303",
    "state": "open",
    "labels": [
      "needs reproduction",
      "module: docs",
      "triaged"
    ],
    "created_at": "2025-10-27T14:04:02Z",
    "updated_at": "2025-10-27T16:55:38Z",
    "comments": 2,
    "user": "Caenorst"
  },
  {
    "repo": "huggingface/peft",
    "number": 2873,
    "title": "Can I use Lora fine-tuning twice?",
    "body": "I\u2019m planning to work with a two-stage LoRA fine-tuning pipeline (Stage 1: SFT with code completion outputs; Stage 2: SFT with full-code outputs; RL follows). My question is:\nWhen I continue training the same LoRA adapter in Stage 2, will I risk overwriting or degrading the knowledge learned during Stage 1 ? In other words, does continuing on the same adapter effectively preserve the Stage 1 capabilities, or should I be using a separate adapter (or merging strategy) to ensure both sets of skills remain intact?\nThank you for any guidance or best\u2010practice pointers!",
    "url": "https://github.com/huggingface/peft/issues/2873",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-27T12:51:45Z",
    "updated_at": "2025-12-05T15:05:00Z",
    "comments": 8,
    "user": "tohokulgq"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27572,
    "title": "[Bug]: chat/completions stream intermittently returns null as finish_reason",
    "body": "### Your current environment\n\n```\nMy env:\nvllm                                     0.10.0\n```\n\n\n### \ud83d\udc1b Describe the bug\n\n\n```\n\n+ curl -kLsS https://127.0.0.1:7888/v1/chat/completions -H 'Content-Type: application/json' --data '{\n  \"model\": \"ibm/granite-3-8b-instruct\",\n  \"stream\": true,\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a helpful assistant.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"What is the weather like in Warsaw?\"\n    }\n  ],\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"get_current_weather\",\n        \"description\": \"Get the current weather in a given location\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"location\": {\n              \"type\": \"string\",\n              \"description\": \"The city and state, e.g. San Francisco, CA\"\n            },\n            \"unit\": {\n              \"type\": \"string\",\n              \"enum\": [\"celsius\", \"fahrenheit\"]\n            }\n          }\n         },\n        \"required\": [\"location\"]\n      }\n    }\n  ],\n  \"tool_choice\": \"auto\"\n  }'\ndata: {\"id\":\"chatcmpl-6ca98c2f19c13c19f39013dfb78bcece\",\"object\":\"chat.completion.chunk\",\"created\":1761566772,\"model\":\"ibm/granite-3-8b-instruct\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-6ca98c2f19c13c19f39013dfb78bcece\",\"object\":\"chat.completion.chunk\",\"created\":1761566772,\"model\":\"ibm/granite-3-8b-instruct\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"<\"},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-6ca98c2f19c13c19f39013dfb78bcece\",\"object\":\"chat.completion.chunk\",\"created\":1761566772,\"model\":\"ibm/granite-3-8b-instruct\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"tool\"},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-6ca98c2f19c13c19f39013dfb78bcece\",\"object\":\"chat.completion.chunk\",\"created\":1761566772,\"model\":\"ibm/granite-3-8b-instruct\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"_\"},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-6ca98c2f19c13c19f39013dfb78bcece\",\"object\":\"chat.completion.chunk\",\"created\":1761566772,\"model\":\"ibm/granite-3-8b-instruct\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"call\"},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-6ca98c2f19c13c19f39013dfb78bcece\",\"object\":\"chat.completion.chunk\",\"created\":1761566772,\"model\":\"ibm/granite-3-8b-instruct\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\">\"},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: [DONE]\n```\nThis happens after running several requests sequentially.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27572",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-27T12:14:03Z",
    "updated_at": "2025-11-24T20:27:24Z",
    "comments": 13,
    "user": "shuynh2017"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1936,
    "title": "Is it possible to train Vision-Language Model with different parallelism plan for vision and language parts of the model?",
    "body": "can we train a Vision-Language Model using torchtitan? \n\nAnd can we set different parallelism plan for different parts of the model:  fsdp2+dp for vision part, and fsdp2+dp+sp+ep+pp for the llm part?  If it is possible, how to do it?\n\nThanks  very much.",
    "url": "https://github.com/pytorch/torchtitan/issues/1936",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-27T06:47:47Z",
    "updated_at": "2025-10-27T14:16:04Z",
    "comments": 2,
    "user": "airlsyn"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1957,
    "title": "Fail to use proxy",
    "body": "How to make this web app go through local proxy? \n\nI tried a few methods, all of which don't work. \n",
    "url": "https://github.com/huggingface/chat-ui/issues/1957",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2025-10-27T06:31:51Z",
    "updated_at": "2025-10-30T03:31:24Z",
    "comments": 2,
    "user": "geek0011"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166282,
    "title": "Why does my PR still show \"Missing CLA Authorization\" even though I have already signed the CLA document?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nWhy does my PR still show \"Missing CLA Authorization\" even though I have already signed the CLA document?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/166282",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-27T01:19:21Z",
    "updated_at": "2025-10-27T16:45:23Z",
    "comments": 1,
    "user": "wenlinchong17-web"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12547,
    "title": "Fine tuning Dreambooth Flux Kontext I2I Error: the following arguments are required: --instance_prompt",
    "body": "### Describe the bug\n\nHello HF team, @sayakpaul @bghira\n\nI'm encountering a persistent issue when trying to fine-tune the black-forest-labs/FLUX.1-Kontext-dev model using the train_dreambooth_lora_flux_kontext.py script.\n\nI am following the [official README instructions](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/README_flux.md#training-kontext) for Image-to-Image (I2I) finetuning. My goal is to train a transformation on my own dataset, which is structured for I2I (condition image, target image, and text instruction).\n\n### The Problem\nEvery time I run the script with the correct arguments for I2I finetuning, I get a : `the following arguments are required: --instance_prompt`\n\nWhen I run this [Reproduction], I receive the error: `the following arguments are required: --instance_prompt.`\n\nTo isolate the issue from my personal dataset, I also tested the exact example command provided in the documentation (the one using `kontext-community/relighting`). I found that this command also fails with `the identical the following arguments are required: --instance_prompt` error.\n\nGiven that both my custom command and the official example command are failing in the same way, I am trying to understand the origin of this error. It seems the `--instance_prompt` argument is being required even when all I2I-specific arguments are provided.\n\n### Environment\n**Script**: `examples/dreambooth/train_dreambooth_lora_flux_kontext.py`\n\n**Diffusers Version**: I am using the specific commit `05e7a854d0a5661f5b433f6dd5954c224b104f0b` (installed via `pip install -e .` from a clone), as recommended in the README.\n\nCould you please help me understand why this might be happening? Is this expected behavior, or am I perhaps missing a configuration step?\n\nThank you for your time!\n\n### Reproduction\n\n### How to Reproduce\nI am running the following command, which provides all the necessary arguments for I2I finetuning using my (`dataset_name`, `image_column`, `cond_image_column`, and `caption_column`) using my public dataset:\n\n```\naccelerate launch /local-git-path/train_dreambooth_lora_flux_kontext.py \\\n  --pretrained_model_name_or_path=\"black-forest-labs/FLUX.1-Kontext-dev\" \\\n  --output_dir=\"/local-path/kontext-finetuning-v1\" \\\n  --dataset_name=\"MichaelMelgarejoTotto/mi-dataset-kontext\" \\\n  --image_column=\"output\" \\\n  --cond_image_column=\"file_name\" \\\n  --caption_column=\"instruccion\" \\\n  --mixed_precision=\"bf16\" \\\n  --resolution=1024 \\\n  --train_batch_size=1 \\\n  --guidance_scale=1 \\\n  --gradient_accumulation_steps=4 \\\n  --gradient_checkpointing \\\n  --optimizer=\"adamw\" \\\n  --use_8bit_adam \\\n  --cache_latents \\\n  --learning_rate=1e-4 \\\n  --lr_scheduler=\"constant\" \\\n  --lr_warmup_steps=200 \\\n  --max_train_steps=1000 \\\n  --rank=16 \\\n  --seed=\"0\" \n```\n\n\n### Logs\n\n```shell\ntrain_dreambooth_lora_flux_kontext.py: error: the following arguments are required: --instance_prompt\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.35.0.dev0\n- Platform: Linux-4.18.0-305.3.1.el8.x86_64-x86_64-with-glibc2.28\n- Running on Google Colab?: No\n- Python version: 3.10.19\n- PyTorch version (GPU?): 2.7.1+cu118 (False)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.36.0\n- Transformers version: 4.57.1\n- Accelerate version: 1.11.0\n- PEFT version: 0.17.1\n- Bitsandbytes version: 0.48.1\n- Safetensors version: 0.6.2\n- xFormers version: not installed\n- Accelerator: NA\n- Using GPU in script?: <fill in>\n- Using distributed or parallel set-up in script?: <fill in>\n\n<img width=\"639\" height=\"289\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/52a5168d-0089-4aab-834e-fa39cab0034d\" />\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/12547",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-27T00:21:34Z",
    "updated_at": "2025-10-28T02:31:42Z",
    "comments": 7,
    "user": "MichaelMelgarejoFlorez"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41876,
    "title": "LlamaAttention num_heads",
    "body": "### System Info\n\nIn older version of transformers, LlamaAttention init attribute num_heads. \n\nclass LlamaAttention(nn.Module):\n    def __init__(self, config):\n        self.num_heads = config.num_attention_heads\n        self.head_dim = config.hidden_size // config.num_attention_heads\n\nHowever, in the recent versions, this attribute has been removed and thus causing mismatched when using previous codes. It ssems num_key_value_heads is also deprecated. This issue could be addressed by adding:\n        self.num_heads = config.num_attention_heads # shanhx\n        self.num_key_value_heads = config.num_key_value_heads\n\nIs there any reasons why these attributes are removed? Is it intended or a bug?\n\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nAt least the num_heads stil remained at 4.44. But missed in 4.54. \n\n### Expected behavior\n\nMissing many attributes in LlamaAttention. ",
    "url": "https://github.com/huggingface/transformers/issues/41876",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-27T00:07:31Z",
    "updated_at": "2025-10-31T00:13:31Z",
    "comments": 2,
    "user": "shanhx2000"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41874,
    "title": "Distributed training of SigCLIP",
    "body": "https://github.com/huggingface/transformers/blob/v4.57.1/src/transformers/models/siglip/modeling_siglip.py#L983, here define how to compute sigclip loss. In sigclip, different tpu will exchange data with each other. I want to know how to train a model in this way.",
    "url": "https://github.com/huggingface/transformers/issues/41874",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-26T14:43:51Z",
    "updated_at": "2025-12-04T08:02:55Z",
    "comments": 1,
    "user": "zyk1559676097-dot"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41861,
    "title": "transformers.Adafactor is almost 2x slower on Windows than Linux - even WSL is slow what can be reason?",
    "body": "I am training Qwen Image model with Kohya Musubi tuner : https://github.com/kohya-ss/musubi-tuner\n \nExactly same setup and same machine on Linux is almost 2x faster\n\n9.5 second / it vs 5.8 second / it\n\nOn Windows it can't utilize GPU power it utilizes like 250 watt out of 575 watt\n\nWhat can be culprit?\n\ntransformers==4.54.1\ntorch 2.8\nCUDA 12.9\n\ntested on RTX 5090\n\nthis is what codex tells but i don't know if it is true doesnt make sense to me\n\n<img width=\"1637\" height=\"736\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/81b687c7-801e-4265-a2fd-6d1eae065637\" />\n\n### Who can help?\n\ntrainer: @SunMarc \nkernels: @MekkCyber @drbh \n\n\n",
    "url": "https://github.com/huggingface/transformers/issues/41861",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-25T15:49:47Z",
    "updated_at": "2025-12-03T08:02:55Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166238,
    "title": "[Dynamo][BUG] Regression about `collections.defaultdict` creation",
    "body": "### \ud83d\udc1b Describe the bug\n\nSee CI error log: https://github.com/pytorch/pytorch/actions/runs/18803810990/job/53655896530#step:27:2137\n\n### Error logs\n\n```pytb\n----------------------------- Captured stdout call -----------------------------\ninline_call [(\"Unsupported function call\n  Explanation: Dynamo does not know how to trace the function `<class 'collections.defaultdict'>`\n  Hint: Avoid calling `<class 'collections.defaultdict'>` in your code.\n  Hint: Please report an issue to PyTorch.\n\n  Developer debug context:\ncall_function UserDefinedClassVariable(<class 'collections.defaultdict'>) [GetAttrVariable(DefaultDictVariable(), default_factory), ConstDictVariable()] {}\n\n For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0147.html\", 1)]\n- generated xml file: /var/lib/jenkins/workspace/test/test-reports/python-pytest/dynamo.test_misc/dynamo.test_misc-271de5e392c25fc0.xml -\n=========================== short test summary info ============================\nFAILED [0.2732s] dynamo/test_misc.py::MiscTestsPyTree::test_pytree_tree_map_dict_order_cxx - torch._dynamo.exc.Unsupported: Unsupported function call\n  Explanation: Dynamo does not know how to trace the function `<class 'collections.defaultdict'>`\n  Hint: Avoid calling `<class 'collections.defaultdict'>` in your code.\n  Hint: Please report an issue to PyTorch.\n\n  Developer debug context: call_function UserDefinedClassVariable(<class 'collections.defaultdict'>) [GetAttrVariable(DefaultDictVariable(), default_factory), ConstDictVariable()] {}\n```\n\n\n### Versions\n\nmain\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @Lucaskabela",
    "url": "https://github.com/pytorch/pytorch/issues/166238",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo",
      "dynamo-must-fix",
      "dynamo-variable-tracker"
    ],
    "created_at": "2025-10-25T15:26:06Z",
    "updated_at": "2025-11-05T06:09:41Z",
    "comments": 4,
    "user": "XuehaiPan"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41859,
    "title": "Human Verification not working?",
    "body": "### System Info\n\nHello! I need your help because I can't verify my identity via email: I receive a link, open it, but get a blank page and nothing else(((\nI've tried several times.\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n1. Navigate to the Hugging Face website.\n2. Register or log in to your account.\n3. Go to the identity verification section.\n4. Submit a request for the identity verification link.\n5. Get  the confirmation email to arrive.\n6. Follow confirmation link in email\n7. Get blank page in site example https://huggingface.co/email_confirmation/zKFZszGtcabRsYOURYmCQkXdfzIY\n\n### Expected behavior\n\nThe identity verification link should work",
    "url": "https://github.com/huggingface/transformers/issues/41859",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-25T10:48:52Z",
    "updated_at": "2025-10-26T12:29:10Z",
    "comments": 4,
    "user": "thefued"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166233,
    "title": "license: Is it possible to stop using Conda in the Dockerfile? Due to Conda\u2019s licensing issues, many companies have already received legal warning letters.",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nStarting this year, many companies have received legal letters from Conda\u2019s lawyers, explicitly stating that using Conda requires a paid license. Although I have checked Conda\u2019s official website, it does not clearly specify this. I also noticed that the current PyTorch Dockerfile still uses Conda, which makes me very concerned. Therefore, I strongly recommend removing Conda and using **uv** or building Python from source as the base environment instead.\n\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @seemethere @malfet @atalman",
    "url": "https://github.com/pytorch/pytorch/issues/166233",
    "state": "open",
    "labels": [
      "module: binaries",
      "triaged",
      "module: docker",
      "better-engineering"
    ],
    "created_at": "2025-10-25T08:50:40Z",
    "updated_at": "2025-10-28T03:42:37Z",
    "comments": 2,
    "user": "WangxuP"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2311,
    "title": "Question: How I can train only online without dataset?",
    "body": "How I can train only online? without need of dataset. Can I do it without hugging face repo id? only local?\nI try like that without success:\n\n```\n          cat > \"train_cfg.json\" <<'JSON'\n          {\n              \"job_name\": \"hilserl_fetch_pick_v4_cpu\",\n              \"seed\": 0,\n              \"env\": {\n                  \"type\": \"gymnasium-robotics\",\n                  \"task\": \"FetchPickAndPlace-v4\",\n                  \"episode_length\": 200,\n                  \"features_map\": {\n                      \"action\": \"action\",\n                      \"agent_pos\": \"observation.state\",\n                      \"top\": \"observation.image\",\n                      \"pixels/top\": \"observation.image\"\n                  },\n                  \"features\": {\n                      \"action\": {\n                          \"type\": \"ACTION\",\n                          \"shape\": [\n                              4\n                          ]\n                      },\n                      \"agent_pos\": {\n                          \"type\": \"STATE\",\n                          \"shape\": [\n                              4\n                          ]\n                      },\n                      \"pixels/top\": {\n                          \"type\": \"VISUAL\",\n                          \"shape\": [\n                              480,\n                              480,\n                              3\n                          ]\n                      }\n                  }\n              },\n              \"policy\": {\n                  \"type\": \"sac\",\n                  \"device\": \"cpu\",\n                  \"concurrency\": {\n                      \"actor\": \"threads\",\n                      \"learner\": \"threads\"\n                  },\n                  \"repo_id\": \"None\",\n                  \"push_to_hub\": false\n              },\n              \"dataset\": { \n                  \"repo_id\": \"online-buffer\",\n                  \"root\": \"${{ github.workspace }}/dataset\",\n                  \"use_imagenet_stats\": true\n              }\n          }\n          JSON\n\n          mkdir -p dataset/online-buffer\n\n          export HF_HUB_OFFLINE=1\n          export HF_HUB_DISABLE_TELEMETRY=1\n          export HF_DATASETS_OFFLINE=1\n          export WANDB_MODE=disabled\n\n          # Launch learner and actor (one shell)\n          python -m lerobot.rl.learner --config_path \"train_cfg.json\"\n          python -m lerobot.rl.actor   --config_path \"train_cfg.json\"\n```",
    "url": "https://github.com/huggingface/lerobot/issues/2311",
    "state": "open",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-10-25T05:07:48Z",
    "updated_at": "2025-10-27T08:50:11Z",
    "user": "talregev"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27505,
    "title": "[Bug]: Value error, Found conflicts between 'rope_type=default' (modern field) and 'type=mrope'",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nvllm                                     0.11.0\ntransformers                             5.0.0.dev0\ntorch                                    2.8.0+cu129\n\nmodel base: Qwen2.5-VL-7B-instruct. How to solve this problem\uff1f\n<img width=\"1250\" height=\"602\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/c6b13dff-1d6a-4872-a959-f8076fff43e6\" />\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27505",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-25T04:39:53Z",
    "updated_at": "2025-10-26T07:33:27Z",
    "comments": 1,
    "user": "asirgogogo"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27504,
    "title": "[Usage]: `add_vision_id` ignored for Qwen 2.5-VL-32B-Instruct",
    "body": "### Your current environment\n\n```text\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.3 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] (64-bit runtime)\nPython platform              : Linux-6.8.0-85-generic-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : \nGPU 0: NVIDIA RTX A6000\nGPU 1: NVIDIA RTX A6000\nGPU 2: NVIDIA RTX A6000\nGPU 3: NVIDIA RTX A6000\n\nNvidia driver version        : 570.124.06\ncuDNN version                : Probably one of the following:\n/usr/local/cuda-12.0/targets/x86_64-linux/lib/libcudnn.so.9.8.0\n/usr/local/cuda-12.0/targets/x86_64-linux/lib/libcudnn_adv.so.9.8.0\n/usr/local/cuda-12.0/targets/x86_64-linux/lib/libcudnn_cnn.so.9.8.0\n/usr/local/cuda-12.0/targets/x86_64-linux/lib/libcudnn_engines_precompiled.so.9.8.0\n/usr/local/cuda-12.0/targets/x86_64-linux/lib/libcudnn_engines_runtime_compiled.so.9.8.0\n/usr/local/cuda-12.0/targets/x86_64-linux/lib/libcudnn_graph.so.9.8.0\n/usr/local/cuda-12.0/targets/x86_64-linux/lib/libcudnn_heuristic.so.9.8.0\n/usr/local/cuda-12.0/targets/x86_64-linux/lib/libcudnn_ops.so.9.8.0\n/usr/local/cuda-12.8/targets/x86_64-linux/lib/libcudnn.so.9.8.0\n/usr/local/cuda-12.8/targets/x86_64-linux/lib/libcudnn_adv.so.9.8.0\n/usr/local/cuda-12.8/targets/x86_64-linux/lib/libcudnn_cnn.so.9.8.0\n/usr/local/cuda-12.8/targets/x86_64-linux/lib/libcudnn_engines_precompiled.so.9.8.0\n/usr/local/cuda-12.8/targets/x86_64-linux/lib/libcudnn_engines_runtime_compiled.so.9.8.0\n/usr/local/cuda-12.8/targets/x86_64-linux/lib/libcudnn_graph.so.9.8.0\n/usr/local/cuda-12.8/targets/x86_64-linux/lib/libcudnn_heuristic.so.9.8.0\n/usr/local/cuda-12.8/targets/x86_64-linux/lib/libcudnn_ops.so.9.8.0\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        46 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               32\nOn-line CPU(s) list:                  0-31\nVendor ID:                            GenuineIntel\nModel name:                           Intel(R) Xeon(R) Gold 6346 CPU @ 3.10GHz\nCPU family:                           6\nModel:                                106\nThread(s) per core:                   1\nCore(s) per socket:                   16\nSocket(s):                            2\nStepping:                             6\nCPU(s) scaling MHz:                   23%\nCPU max MHz:                          3600.0000\nCPU min MHz:                          800.0000\nBogoMIPS:                             6200.00\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect wbnoinvd dtherm ida arat pln pts vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities\nVirtualization:                       VT-x\nL1d cache:                            1.5 MiB (32 instances)\nL1i cache:                            1 MiB (32 instances)\nL2 cache:                             40 MiB (32 instances)\nL3 cache:                             72 MiB (2 instances)\nNUMA node(s):                         2\nNUMA node0 CPU(s):                    0-15\nNUMA node1 CPU(s):                    16-3",
    "url": "https://github.com/vllm-project/vllm/issues/27504",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-25T03:42:44Z",
    "updated_at": "2025-10-26T07:32:49Z",
    "comments": 1,
    "user": "justachetan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166219,
    "title": "Why are there so many warnings when building the C++ libtorch project? How to resolve it?",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhen I compile the C++ libtorch project, there are many warnings. How can I resolve them? My configuration: Win11, MSVC, libtorch 2.8.0. My C++ code is as follows:\n```cpp\n#include <torch/torch.h>\n#include <iostream>\n\nint main() {\n    torch::Tensor tensor_zeros = torch::zeros({3, 3});\n    std::cout << \"Zeros Tensor:\\n\" << tensor_zeros << \"\\n\\n\";\n\n    torch::Tensor tensor_ones;\n    if (torch::cuda::is_available()) {\n        tensor_ones = torch::ones({2, 2}, torch::kFloat).to(torch::kCUDA);\n        std::cout << \"Ones Tensor on CUDA:\\n\" << tensor_ones << \"\\n\\n\";\n    } else {\n        tensor_ones = torch::ones({2, 2}, torch::kFloat);\n        std::cout << \"CUDA not available. Ones Tensor on CPU:\\n\" << tensor_ones << \"\\n\\n\";\n    }\n\n\n    std::vector<float> data = {1.0, 2.0, 3.0, 4.0};\n    torch::Tensor tensor_from_vector = torch::from_blob(data.data(), {2, 2});\n    std::cout << \"Tensor from vector:\\n\" << tensor_from_vector << \"\\n\";\n\n    if (torch::cuda::is_available()) {\n        auto cpu_tensor = torch::rand({5, 5});\n        auto gpu_tensor = cpu_tensor.to(torch::kCUDA);\n        std::cout << \"Tensor on GPU:\\n\" << gpu_tensor << \"\\n\";\n    }\n\n    return 0;\n}\n```\nThe warnings during compilation are as follows:\n```\n[1/5] Copying DLL files to build directory\n[2/5] Scanning E:\\coding\\cppcode\\libtorchtest\\test.cpp for CXX dependencies\n[3/5] Generating CXX dyndep file CMakeFiles\\test.dir\\CXX.dd\n[4/5] Building CXX object CMakeFiles\\test.dir\\test.cpp.obj\nH:\\software\\Visual_Studio_022\\VC\\Tools\\MSVC\\14.43.34808\\include\\optional(82): warning C4267: \u201c\u521d\u59cb\u5316\u201d: \u4ece\u201csize_t\u201d\u8f6c\u6362\u5230\u201cint\u201d\uff0c\u53ef\u80fd\u4e22\u5931\u6570\u636e\nH:\\software\\Visual_Studio_022\\VC\\Tools\\MSVC\\14.43.34808\\include\\optional(82): note: \u6a21\u677f\u5b9e\u4f8b\u5316\u4e0a\u4e0b\u6587(\u6700\u65e9\u7684\u5b9e\u4f8b\u5316\u4e0a\u4e0b\u6587)\u4e3a\nG:\\software\\libtorch280_cu126Release\\include\\ATen/core/function_schema.h(438): note: \u67e5\u770b\u5bf9\u6b63\u5728\u7f16\u8bd1\u7684\u51fd\u6570 \u6a21\u677f \u5b9e\u4f8b\u5316\u201cstd::optional<int>::optional<const I,0>(_Ty2 &&) noexcept\u201d\u7684\u5f15\u7528\n        with\n        [\n            I=size_t,\n            _Ty2=size_t\n        ]\nG:\\software\\libtorch280_cu126Release\\include\\ATen/core/function_schema.h(438): note: \u8bf7\u53c2\u9605 \"c10::FunctionSchema::argumentIndexWithName\" \u4e2d\u5bf9 \"std::optional<int>::optional\" \u7684\u7b2c\u4e00\u4e2a\u5f15\u7528\nH:\\software\\Visual_Studio_022\\VC\\Tools\\MSVC\\14.43.34808\\include\\optional(258): note: \u67e5\u770b\u5bf9\u6b63\u5728\u7f16\u8bd1\u7684\u51fd\u6570 \u6a21\u677f \u5b9e\u4f8b\u5316\u201cstd::_Optional_construct_base<_Ty>::_Optional_construct_base<const unsigned __int64>(std::in_place_t,const unsigned __int64 &&)\u201d\u7684\u5f15\u7528\n        with\n        [\n            _Ty=int\n        ]\nE:\\coding\\cppcode\\libtorchtest\\test.cpp(32): note: \u67e5\u770b\u5bf9\u6b63\u5728\u7f16\u8bd1\u7684\u51fd\u6570 \u6a21\u677f \u5b9e\u4f8b\u5316\u201cstd::_Optional_destruct_base<_Ty,true>::_Optional_destruct_base<const unsigned __int64>(std::in_place_t,const unsigned __int64 &&) noexcept\u201d\u7684\u5f15\u7528\n        with\n        [\n            _Ty=int\n        ]\nH:\\software\\Visual_Studio_022\\VC\\Tools\\MSVC\\14.43.34808\\include\\xutility(492): warning C4267: \u201c\u521d\u59cb\u5316\u201d: \u4ece\u201csize_t\u201d\u8f6c\u6362\u5230\u201c_Ty\u201d\uff0c\u53ef\u80fd\u4e22\u5931\u6570\u636e\n        with\n        [\n            _Ty=unsigned int\n        ]\nH:\\software\\Visual_Studio_022\\VC\\Tools\\MSVC\\14.43.34808\\include\\xutility(492): note: \u6a21\u677f\u5b9e\u4f8b\u5316\u4e0a\u4e0b\u6587(\u6700\u65e9\u7684\u5b9e\u4f8b\u5316\u4e0a\u4e0b\u6587)\u4e3a\nG:\\software\\libtorch280_cu126Release\\include\\torch/csrc/dynamo/compiled_autograd.h(236): note: \u67e5\u770b\u5bf9\u6b63\u5728\u7f16\u8bd1\u7684\u51fd\u6570 \u6a21\u677f \u5b9e\u4f8b\u5316\u201cunsigned int &std::vector<std::_Vbase,std::allocator<std::_Vbase>>::emplace_back<const _Ty&>(const _Ty &)\u201d\u7684\u5f15\u7528\n        with\n        [\n            _Ty=size_t\n        ]\nG:\\software\\libtorch280_cu126Release\\include\\torch/csrc/dynamo/compiled_autograd.h(236): note: \u8bf7\u53c2\u9605 \"torch::dynamo::autograd::TensorArgs::lookup\" \u4e2d\u5bf9 \"std::vector<std::_Vbase,std::allocator<std::_Vbase>>::emplace_back\" \u7684\u7b2c\u4e00\u4e2a\u5f15\u7528\nH:\\software\\Visual_Studio_022\\VC\\Tools\\MSVC\\14.43.34808\\include\\vector(909): note: \u67e5\u770b\u5bf9\u6b63\u5728\u7f16\u8bd1\u7684\u51fd\u6570 \u6a21\u677f \u5b9e\u4f8b\u5316\u201c_Ty &std::vector<_Ty,std::allocator<_Ty>>::_Emplace_one_at_back<const unsigned __int64&>(const unsigned __int64 &)\u201d\u7684\u5f15\u7528\n        with\n        [\n            _Ty=std::_Vbase\n        ]\nH:\\software\\Visual_Studio_022\\VC\\Tools\\MSVC\\14.43.34808\\include\\vector(830): note: \u67e5\u770b\u5bf9\u6b63\u5728\u7f16\u8bd1\u7684\u51fd\u6570 \u6a21\u677f \u5b9e\u4f8b\u5316\u201c_Ty &std::vector<_Ty,std::allocator<_Ty>>::_Emplace_back_with_unused_capacity<const unsigned __int64&>(const unsigned __int64 &)\u201d\u7684\u5f15\u7528\n        with\n        [\n            _Ty=std::_Vbase\n        ]\nH:\\software\\Visual_Studio_022\\VC\\Tools\\MSVC\\14.43.34808\\include\\vector(845): note: \u67e5\u770b\u5bf9\u6b63\u5728\u7f16\u8bd1\u7684\u51fd\u6570 \u6a21\u677f \u5b9e\u4f8b\u5316\u201cvoid std::_Construct_in_place<unsigned int,const _Ty&>(unsigned int &,const _Ty &) noexcept\u201d\u7684\u5f15\u7528\n        with\n        [\n            _Ty=size_t\n        ]\nH:\\software\\Visual_Studio_022\\VC\\Tools\\MSVC\\14.43.34808\\include\\xutility(502): note: \u67e5\u770b\u5bf9\u6b63\u5728\u7f16\u8bd1\u7684\u51fd\u6570 \u6a21\u677f \u5b9e\u4f8b\u5316\u201c_Ty *std::construct_at<_Ty,const unsigned __int64&>(_Ty *const ,const unsigned __int64 &) noexcept(<expr>)\u201d\u7684\u5f15\u7528\n        with\n        [\n            _Ty=unsigned int\n        ]\nH:\\software\\Visual_Studio_022\\VC\\Tools\\MSVC\\14.43.34808\\include\\xutility(506): warning C4267: \u201c\u521d\u59cb\u5316\u201d: \u4ece\u201csize_t\u201d\u8f6c\u6362\u5230\u201cunsigned int\u201d\uff0c\u53ef\u80fd\u4e22\u5931\u6570\u636e\nH:\\software\\Visual_Studio_022\\VC\\Tools\\MSVC\\14.43.34808\\include\\xutility(492): warning C4267: \u201c\u521d\u59cb\u5316\u201d: \u4ece\u201csize_t\u201d\u8f6c\u6362\u5230\u201c_Ty\u201d\uff0c\u53ef\u80fd\u4e22\u5931\u6570\u636e\n        with\n        [\n            _Ty=int\n        ]\nH:\\software\\Visual_Studio_022\\VC\\Tools\\MSVC\\14.43.34808\\include\\xutility(492): note: \u6a21\u677f\u5b9e\u4f8b\u5316\u4e0a\u4e0b\u6587(\u6700\u65e9\u7684\u5b9e",
    "url": "https://github.com/pytorch/pytorch/issues/166219",
    "state": "open",
    "labels": [
      "module: windows",
      "module: cpp-extensions",
      "triaged"
    ],
    "created_at": "2025-10-25T03:09:34Z",
    "updated_at": "2025-10-25T15:39:20Z",
    "user": "hyl20012"
  },
  {
    "repo": "huggingface/lighteval",
    "number": 1028,
    "title": "How to evaluate MMLU-Pro",
    "body": "Hi,\n\nThank you for the wonderful work!\n\nI just want to ask how to perform the evaluation on MMLU-Pro, as I don't see any related code besides the README.",
    "url": "https://github.com/huggingface/lighteval/issues/1028",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-24T20:03:10Z",
    "updated_at": "2025-11-04T10:40:46Z",
    "user": "qhz991029"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166180,
    "title": "AOTI _register_aoti_cleanup line 47",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi,\nTrying to run [this code](https://huggingface.co/spaces/zerogpu-aoti/wan2-2-fp8da-aoti-faster/tree/main) on Modal, I got this error message I absolute don't know how to interpret\n\n### Error logs\n\n```\n  File \"<ta-01K8BA92H6RT7D4R3V6CBA2Q9T>:/usr/local/lib/python3.12/site-packages/torch/utils/_contextlib.py\", line 120, in decorate_context\n  File \"<ta-01K8BA92H6RT7D4R3V6CBA2Q9T>:/usr/local/lib/python3.12/site-packages/diffusers/pipelines/wan/pipeline_wan_i2v.py\", line 756, in __call__\n  File \"<ta-01K8BA92H6RT7D4R3V6CBA2Q9T>:/usr/local/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1775, in _wrapped_call_impl\n  File \"<ta-01K8BA92H6RT7D4R3V6CBA2Q9T>:/usr/local/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1786, in _call_impl\n  File \"<ta-01K8BA92H6RT7D4R3V6CBA2Q9T>:/usr/local/lib/python3.12/site-packages/diffusers/models/transformers/transformer_wan.py\", line 663, in forward\n  File \"<ta-01K8BA92H6RT7D4R3V6CBA2Q9T>:/usr/local/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1775, in _wrapped_call_impl\n  File \"<ta-01K8BA92H6RT7D4R3V6CBA2Q9T>:/usr/local/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1786, in _call_impl\n  File \"<ta-01K8BA92H6RT7D4R3V6CBA2Q9T>:/usr/local/lib/python3.12/site-packages/spaces/zero/torch/aoti.py\", line 77, in __call__\n  File \"<ta-01K8BA92H6RT7D4R3V6CBA2Q9T>:/usr/local/lib/python3.12/contextlib.py\", line 137, in __enter__\n    return next(self.gen)\n^^^^^^^^^^^^^^^\n  File \"<ta-01K8BA92H6RT7D4R3V6CBA2Q9T>:/usr/local/lib/python3.12/site-packages/spaces/zero/torch/aoti.py\", line 47, in _register_aoti_cleanup\n  File \"<ta-01K8BA92H6RT7D4R3V6CBA2Q9T>:/usr/local/lib/python3.12/pathlib.py\", line 1056, in iterdir\n    for name in os.listdir(self):\n  ^^^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory: '/proc/2/map_files'\n```\n\n### Versions\n\nPyTorch version: 2.9.0+cu128\nIs debug build: False\nCUDA used to build PyTorch: 12.8\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 22.04.5 LTS (x86_64)\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0\nClang version: Could not collect\nCMake version: version 3.27.6\nLibc version: glibc-2.35\n\nPython version: 3.12.1 | packaged by Anaconda, Inc. | (main, Jan 19 2024, 15:51:05) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.35\nIs CUDA available: True\n\nVersions of relevant libraries:\n[pip3] numpy==1.26.4\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cufft-cu12==11.3.3.83\n[pip3] nvidia-curand-cu12==10.3.9.90\n[pip3] nvidia-cusolver-cu12==11.7.3.90\n[pip3] nvidia-cusparse-cu12==12.5.8.93\n[pip3] nvidia-cusparselt-cu12==0.7.1\n[pip3] nvidia-nccl-cu12==2.27.5\n[pip3] nvidia-nvjitlink-cu12==12.8.93\n[pip3] nvidia-nvtx-cu12==12.8.90\n[pip3] torch==2.9.0\n[pip3] torchao==0.14.1\n[pip3] torchaudio==2.9.0\n[pip3] torchvision==0.24.0\n[pip3] triton==3.5.0\n[conda] numpy                     1.26.4                   pypi_0    pypi\n\ncc @chauhang @penguinwu",
    "url": "https://github.com/pytorch/pytorch/issues/166180",
    "state": "closed",
    "labels": [
      "oncall: pt2"
    ],
    "created_at": "2025-10-24T18:58:27Z",
    "updated_at": "2025-10-28T09:20:17Z",
    "comments": 2,
    "user": "christopher5106"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1879,
    "title": "rust tokenizer",
    "body": "Hello.\n\nIs there a rust tokenizer please? Chat gpt told me there used to be.\n\nBest regards!",
    "url": "https://github.com/huggingface/tokenizers/issues/1879",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-24T17:03:04Z",
    "updated_at": "2025-10-24T22:03:31Z",
    "comments": 2,
    "user": "gogo2464"
  },
  {
    "repo": "pytorch/ao",
    "number": 3243,
    "title": "TorchAO Missing 3.13T (free-threading) Wheels",
    "body": "Latest `0.14.1` cuda builds does produce wheels for `3.13t` which is the `nogil` build of Python. \n\nOn Ubuntu 24.04 x86_64\n\n```py\n# pip install torchao==0.14.1 --index-url https://download.pytorch.org/whl/cu130 -U\nLooking in indexes: https://download.pytorch.org/whl/cu130\nERROR: Could not find a version that satisfies the requirement torchao==0.14.1 (from versions: none)\nERROR: No matching distribution found for torchao==0.14.1\n\n# python --version\nPython 3.13.8\n\n# python --version\nPython 3.13.8\n\n# pip show torch\nName: torch\nVersion: 2.9.0+cu130\nSummary: Tensors and Dynamic neural networks in Python with strong GPU acceleration\nHome-page: https://pytorch.org\nAuthor: \nAuthor-email: PyTorch Team <packages@pytorch.org>\nLicense: BSD-3-Clause\nLocation: /root/vm313t/lib/python3.13t/site-packages\nRequires: filelock, fsspec, jinja2, networkx, nvidia-cublas, nvidia-cuda-cupti, nvidia-cuda-nvrtc, nvidia-cuda-runtime, nvidia-cudnn-cu13, nvidia-cufft, nvidia-cufile, nvidia-curand, nvidia-cusolver, nvidia-cusparse, nvidia-cusparselt-cu13, nvidia-nccl-cu13, nvidia-nvjitlink, nvidia-nvshmem-cu13, nvidia-nvtx, setuptools, sympy, triton, typing-extensions\nRequired-by: accelerate, bitblas, causal_conv1d, flash_attn, GPTQModel, lm_eval, MemLord, peft, torchvision\n```\n\nReported here\nhttps://github.com/pytorch/ao/issues/2919#issuecomment-3443814140\n\nAnd reproduced by another user here:\nhttps://github.com/pytorch/ao/issues/2919#issuecomment-3444060877\n",
    "url": "https://github.com/pytorch/ao/issues/3243",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-24T16:53:03Z",
    "updated_at": "2025-10-30T19:30:57Z",
    "comments": 1,
    "user": "Qubitium"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27482,
    "title": "[Bug]: `return_token_ids` missing tokens when using tool calls",
    "body": "### Your current environment\n\nTesting with latest vLLM builds from main, as of Fri Oct 24th 2025 (when this bug was opened).\n\n\n### \ud83d\udc1b Describe the bug\n\nThe `return_token_ids` parameter that is supposed to return all generated token ids back to the client is missing quite a few tokens for Chat Completion streaming requests that result in tool calls being generated. Exactly how many and where they are missing in the request will depend on the tool call parser in use as well as the exact request format.\n\nHere's a minimal reproducer.\n\nFirst, run vLLM with a tool call parser and model. I use a Granite model for testing here, but it should be roughly the same for any model with a tool call parser.\n\n```\nvllm serve ibm-granite/granite-3.3-8b-instruct \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser granite\n```\n\nThen, send a streaming tool call request to the server and check the response for missing tokens:\n\n```python\nfrom openai import OpenAI\n\nclient = OpenAI(base_url=\"http://localhost:8000/v1\", api_key=\"fake\")\n\ntools = [\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"get_current_weather\",\n            \"description\": \"Get the current weather in a given location\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"location\": { \"type\": \"string\", \"description\": \"The city, e.g. San Francisco, CA\" },\n                    \"unit\": { \"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"] }\n                },\n                \"required\": [\"location\"]\n            }\n        }\n    },\n]\nresponse = client.chat.completions.create(\n    model=\"ibm-granite/granite-3.3-8b-instruct\",\n    messages=[{\"role\": \"user\", \"content\": \"What is the weather in Sydney in celsius?\"}],\n    tools=tools,\n    tool_choice=\"auto\",\n    stream=True,\n    stream_options={\n        \"include_usage\": True,\n        \"continuous_usage_stats\": True,\n    },\n    extra_body={\"return_token_ids\": True},\n)\n\nreturned_token_ids = []\nlast_completion_tokens = 0\nfor event in response:\n    if not getattr(event, \"choices\", None):\n        continue\n    choice = event.choices[0]\n    usage = event.usage\n    if hasattr(choice, \"token_ids\"):\n        returned_token_ids.extend(choice.token_ids)\n        num_token_ids = len(choice.token_ids)\n    else:\n        num_token_ids = 0\n    elapsed_completion_tokens = usage.completion_tokens - last_completion_tokens\n    if elapsed_completion_tokens != num_token_ids:\n        raise ValueError(\n            \"Model generated more tokens than returned by return_token_ids!\\n\"\n            f\"All tokens returned so far: {returned_token_ids}\"\n        )\n    last_completion_tokens = usage.completion_tokens\n```\n\nRunning that, I get the following output:\n\n```\npython return_token_ids_test.py\nTraceback (most recent call last):\n  File \"/Volumes/SourceCode/vllm/return_token_ids_test.py\", line 49, in <module>\n    raise ValueError(\nValueError: Model generated more tokens than returned by return_token_ids!\nAll tokens returned so far: [49154, 48685]\n```\n\nIf I add a bit of debug logging into vLLM server side and run it again, I can see the list of tokens that should have been returned:\n\n`current_token_ids: [49154, 7739, 8299, 563, 3447, 2645, 563, 313, 16716, 6161, 910, 392, 313, 2243, 563, 313, 3308, 101, 3263, 3918, 313, 426, 563, 313, 371, 81, 1700, 81, 15859, 48685]`\n\nAll of the tokens between the first and last in that list were missed by `return_token_ids`.\n\nThis code is not executed for every generated token when tool call parser (or reasoning parsers, most likely) are in use: https://github.com/vllm-project/vllm/blob/61089465a6101790635ed96c26df3e9a57d8d2c9/vllm/entrypoints/openai/serving_chat.py#L1090\n\nThe reason is because we return early at: https://github.com/vllm-project/vllm/blob/61089465a6101790635ed96c26df3e9a57d8d2c9/vllm/entrypoints/openai/serving_chat.py#L1063\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27482",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-24T16:10:31Z",
    "updated_at": "2025-12-04T19:09:41Z",
    "comments": 2,
    "user": "bbrowning"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27479,
    "title": "[Bug]: Low GPU utilization with Embedding Model",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nInitializing LLM(model=\"Qwen/Qwen3-Embedding-0.6B\", task=\"embed\") on a single B200 (180 GB) immediately reserves ~80% GPU memory (likely PagedAttention KV block pre-allocation). During embedding, GPU-Util stays <40%, whereas a naive Transformers inference with batch_size=512 reaches >80% utilization and memory use on the same box.\n\nIs heavy KV Cache pre-allocation expected for task=\"embed\" (prefill-only)? And is there any method to improve the GPU-Util?\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27479",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-24T15:18:05Z",
    "updated_at": "2025-10-24T15:25:38Z",
    "comments": 1,
    "user": "JhaceLam"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27477,
    "title": "[Bug]: First prompt token missing when requested with \"echo\"",
    "body": "### Your current environment\n\nvllm installed from main: \n`vllm                              0.11.1rc3.dev23+g61089465a.precompiled`\n\n### \ud83d\udc1b Describe the bug\n\nIs it expected behavior that echo isn't returning the first token of the prompt?\nI am trying to collect exact prompt_token_ids which went into the model served with vllm serve , so I am doing this:\n```bash\nVLLM_LOGGING_LEVEL=DEBUG vllm serve openai/gpt-oss-20b -tp 1 --enforce-eager --return-tokens-as-token-ids --enable-log-requests --enable-prompt-tokens-details\n```\nand with this snippet:\n```python\nfrom openai import OpenAI\n\nclient = OpenAI(\n    api_key=\"EMPTY\",  \n    base_url=\"http://localhost:8000/v1\"\n)\n\nmessages = [\n    {\"role\": \"user\", \"content\": \"Continue: The quick brown fox\"},\n]\n\nresponse = client.chat.completions.create(\n    model=\"openai/gpt-oss-20b\",\n    messages=messages,\n    temperature=0.0,\n    max_tokens=1024,\n    logprobs=True,\n    extra_body={\n        \"echo\": True,\n    }\n)\n\nprint(response.model_extra['prompt_logprobs'])\n```\n\nI am seeing: `[None, 17360, 200008, ...]` whereas the vllm server logs are printing this: `[200006, 17360, 200008, ...]` which is correct as the first token is and should be `200006` == `<|start|>` . Not sure why is it `None` in the ChatCompletion object\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27477",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-24T14:43:50Z",
    "updated_at": "2025-10-24T15:04:01Z",
    "comments": 2,
    "user": "eldarkurtic"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 3336,
    "title": "Get inference endpoint model settings via client",
    "body": "### Feature request\n\nEnable commands via clients such as `OpenAI` that would get model settings from an inference endpoint. \n\nDoes this exist and I just can't find it?\n\n### Motivation\n\nThere is currently no clear way to get inference model settings directly from an endpoint. Individual base models have their original settings, but this does not necessarily translate to an endpoint. As an example, [Microsoft's Phi-3 model](https://huggingface.co/microsoft/Phi-3-mini-128k-instruct) supports 128k context length as input, but if instantiated as an endpoint on a 24GB gpu the allowed input context length is less (48k).\n\nThe only way I have found to access the information regarding an individual endpoint is via `huggingface_hub`, specifically:\n\n```\nfrom huggingface_hub import get_inference_endpoint\nendpoint = get_inference_endpoint(ENDPOINT_NAME, namespace=USERNAME, token=api_key)\n```\n\nTo get the general settings, you can then access the `raw` dict of the endpoint's image. For example, if I want to get the context length of a specific model at an endpoint, I can do it this way:\n```\n# the settings/specs of the endpoint in a 'llamacpp' image\nsettings = endpoint.raw['model']['image']['llamacpp']\n# this allows me to get info like context length (via the ['ctxSize']) key\n>>> print(settings['ctxSize'])\n48000\n```\n\nThis is problematic when sending prompts to an endpoint - if it were easier to query model properties programmatically, then I could write code to adjust queries on the fly appropriately depending on the target model. As it is, the sender needs to know the properties of a particular endpoint beforehand. IMO what is needed is to be able to get this info directly from a client.\n\nIn the OpenAI client in the Huggingface Inference API there seems to be some functionality for this, i.e. I can instantiate a client:\n```\nclient = OpenAI(\n                base_url=endpoint, # AWS/server URL\n                api_key=api_key, # huggingface token\n            )\n```\nThen I can get a list of models at that url:\n```\nprint(client.models.list())\n```\nBut this only prints out basic information, which doesn't include such things as context length. Is there a way to get this info from the client that I'm just missing? I have noticed when there are errors related to input length, the client returns an error with the key `n_ctx`. For example, if a model I'm working with has a 12k context window and I send 13k tokens, the error is:\n```\nopenai.BadRequestError: Error code: 400 - {'error': {'code': 400, 'message': 'the request exceeds the available context size, try increasing it', 'type': 'exceed_context_size_error', 'n_prompt_tokens': 13954, 'n_ctx': 12032}}\n```\nThis tells me that the client has access to the overall settings, but it's not clear to me how to get them.\n\n### Your contribution\n\nHappy to work on this if someone can point me where to look for relevant code that would pass inference endpoint settings info to the client, perhaps via the `client.models.list()` method.",
    "url": "https://github.com/huggingface/text-generation-inference/issues/3336",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-24T13:07:15Z",
    "updated_at": "2025-10-30T14:10:46Z",
    "comments": 1,
    "user": "lingdoc"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7829,
    "title": "Memory leak / Large memory usage with num_workers = 0 and numerous dataset within DatasetDict",
    "body": "### Describe the bug\n\nHi team, first off, I love the datasets library! \ud83e\udd70\n\nI'm encountering a potential memory leak / increasing memory usage when training a model on a very large DatasetDict.\n\nSetup: I have a DatasetDict containing 362 distinct datasets, which sum up to ~2.8 billion rows.\n\nTraining Task: I'm performing contrastive learning with SentenceTransformer and Accelerate on a single node with 4 H100, which requires me to sample from only one dataset at a time.\n\nTraining Loop: At each training step, I sample ~16,000 examples from a single dataset, and then switch to a different dataset for the next step. I iterate through all 362 datasets this way. \n\nProblem: The process's memory usage continuously increases over time, eventually causing a stale status where GPUs would stop working. It seems memory from previously sampled datasets isn't being released. I've set num_workers=0 for all experiments.\n\nChart 1: Standard DatasetDict The memory usage grows steadily until it make the training stale (RSS memory) <img width=\"773\" height=\"719\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/6606bef5-1153-4f2d-bf08-82da249d6e8d\" />\n\nChart 2: IterableDatasetDict I also tried  to use IterableDatasetDict and IterableDataset. The memory curve is \"smoother,\" but the result is the same: it grows indefinitely and the training become stale. <img width=\"339\" height=\"705\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/ee90c1a1-6c3b-4135-9edc-90955cb1695a\" />\n\nAny feedback or guidance on how to manage this memory would be greatly appreciated!\n\n### Steps to reproduce the bug\n\nWIP, I'll add some code that manage to reproduce this error, but not straightforward. \n\n### Expected behavior\n\nThe memory usage should remain relatively constant or plateau after a few steps. Memory used for sampling one dataset should be released before or during the sampling of the next dataset.\n\n### Environment info\n\nPython: 3.12\nDatasets: 4.3.0\nSentenceTransformers: 5.1.1",
    "url": "https://github.com/huggingface/datasets/issues/7829",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-24T09:51:38Z",
    "updated_at": "2025-11-06T13:31:26Z",
    "comments": 4,
    "user": "raphaelsty"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41842,
    "title": "Incorrect usage of `num_items_in_batch`?",
    "body": "It seems that `num_items_in_batch` is computed for all items in the batch [here](https://github.com/huggingface/transformers/blob/9c20660138830ca362533551ca978c27b48283a1/src/transformers/trainer.py#L2430).\n\nHowever, when loss is computed in the `training_step`, it is computed for each input in the batch one by one. Does it make sense to pass `num_items_in_batch` (for the whole batch) or should that number be for that particular input only?\n\nRight now, the entire batch's `num_items_in_batch` is used [here](https://github.com/huggingface/transformers/blob/9c20660138830ca362533551ca978c27b48283a1/src/transformers/trainer.py#L2486).",
    "url": "https://github.com/huggingface/transformers/issues/41842",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-24T07:36:00Z",
    "updated_at": "2025-12-01T08:02:48Z",
    "comments": 2,
    "user": "gohar94"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27463,
    "title": "[Usage]: How to request DeepSeek-OCR with http request",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\ni want to request DeepSeek-OCR with http, is any example for it?\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27463",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-24T07:07:29Z",
    "updated_at": "2025-10-29T17:26:49Z",
    "comments": 8,
    "user": "YosanHo"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2306,
    "title": "how to use groot without flash attention",
    "body": "my system is ubuntu 20.04 with glibc 2.3.1 which is not supported flash attention, If I can modify the config of groot to use it with normal attention?",
    "url": "https://github.com/huggingface/lerobot/issues/2306",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "dependencies"
    ],
    "created_at": "2025-10-24T06:35:18Z",
    "updated_at": "2025-11-04T01:28:38Z",
    "user": "shs822"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2305,
    "title": "Error dependence about the `Transformer` library",
    "body": "### System Info\n\n```Shell\n- lerobot version: 0.4.0\n- Platform: Linux-6.14.0-29-generic-x86_64-with-glibc2.39\n- Python version: 3.12.12\n- Huggingface Hub version: 0.35.3\n- Datasets version: 4.1.1\n- Numpy version: 2.2.6\n- PyTorch version: 2.7.0+cu128\n- Is PyTorch built with CUDA support?: True\n- Cuda version: 12.8\n- GPU model: NVIDIA RTX PRO 6000 Blackwell Workstation Edition\n- Using GPU in script?: <fill in>\n```\n\n### Information\n\n- [ ] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n# Environment\n\nI used the `uv` tools to auto-solve the environment. The `pyproject.toml` is shown as following.\n```\n[project]\nname = \"openpi-pytorch-env2\"\nversion = \"0.1.0\"\ndescription = \"Add your description here\"\nrequires-python = \"==3.12.12\"\ndependencies = [\n    # Pytorch \u4f9d\u8d56\u9879\n    \"torch==2.7.0\",\n    \"torchvision==0.22.0\",\n    \"torchaudio==2.7.0\",\n    \"pytorch_lightning\",\n\n    # lerobot-libero\n    \"libero @ git+https://github.com/huggingface/lerobot-libero.git#egg=libero\",\n\n    # lerobot\n    \"lerobot[all] @ git+https://github.com/huggingface/lerobot.git@v0.4.0\",\n\n]\n\n[tool.uv.sources]\ntorch = { index = \"pytorch-cu128\" }\ntorchvision = { index = \"pytorch-cu128\" }\ntorchaudio = { index = \"pytorch-cu128\" }\n\n[[tool.uv.index]]\nname = \"pytorch-cu128\"\nurl = \"https://download.pytorch.org/whl/cu128\"\nexplicit = true\n```\n\n# BUG Report\n\nWhen I was running the `pi0` code\n\n```\nimport os\nimport torch\nfrom lerobot.policies.pi0.modeling_pi0 import PI0Policy\nfrom transformers import AutoTokenizer\nMODEL_PATH = os.path.expanduser(\"~/Models/pi0_base\")\npolicy = PI0Policy.from_pretrained(MODEL_PATH)\n```\n\nThere are errors like:\n\n\n```\nAn incorrect transformer version is used, please create an issue on https://github.com/huggingface/lerobot/issues\nImportError: cannot import name 'check' from 'transformers.models.siglip' (/opt/miniforge3/envs/pi0_torch2/lib/python3.12/site-packages/transformers/models/siglip/__init__.py)\n\nDuring handling of the above exception, another exception occurred:\n\n  File \"/home/robot/pi0/openpi_pytorch2/test_simple.py\", line 22, in <module>\n    policy = PI0Policy.from_pretrained(MODEL_PATH)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nValueError: An incorrect transformer version is used, please create an issue on https://github.com/huggingface/lerobot/issues\n```\n\nThe transformer lib is auto-solved by the `pyproject.toml` in `lerobot` lib. Can you solve the error? Thanks\n\n### Expected behavior\n\nLoading the weights successfully.",
    "url": "https://github.com/huggingface/lerobot/issues/2305",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "dependencies"
    ],
    "created_at": "2025-10-24T05:59:32Z",
    "updated_at": "2025-11-14T16:01:49Z",
    "user": "sunshineharry"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27454,
    "title": "[Usage]: How to set the expert id on each EP by myself after setting EP in Deepseek (how to reorder experts?)",
    "body": "### Your current environment\n\n```text\nvllm 0.8.5\n```\n\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27454",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-24T03:15:16Z",
    "updated_at": "2025-10-24T07:27:50Z",
    "comments": 2,
    "user": "HameWu"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27448,
    "title": "[Usage]: how to pass multi turn multimode messages to Vllm?",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27448",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-24T02:41:45Z",
    "updated_at": "2025-10-24T03:33:13Z",
    "comments": 1,
    "user": "cqray1990"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2304,
    "title": "How to load local model?",
    "body": "For example, i'm trying to fine-tune pi0, so I downloaded pi0_base locallly and save it in [position A,like lerobot/models/pi0_base] ,which has 5 files in total,including model.safetensors.\n\nThen how to load it in code? I used to just set model.path=[position A] But followed tuorial, it uses pretrained_path_or_name as key words.\n\nHowover, my code raised error here:\n```python\n print(f\"Loading model from: {pretrained_name_or_path}\")\n            try:\n                from transformers.utils import cached_file\n\n                # Try safetensors first\n                resolved_file = cached_file(\n                    pretrained_name_or_path,\n                    \"model.safetensors\",\n                    cache_dir=kwargs.get(\"cache_dir\"),\n                    force_download=kwargs.get(\"force_download\", False),\n                    resume_download=kwargs.get(\"resume_download\"),\n                    proxies=kwargs.get(\"proxies\"),\n                    use_auth_token=kwargs.get(\"use_auth_token\"),\n                    revision=kwargs.get(\"revision\"),\n                    # local_files_only=kwargs.get(\"local_files_only\", False),\n                    local_files_only=True # I set this for experiment but failed too\n                )\n                from safetensors.torch import load_file\n\n                original_state_dict = load_file(resolved_file)\n                print(\"\u2713 Loaded state dict from model.safetensors\")\n            except Exception as e:\n                print(f\"Could not load state dict from remote files: {e}\")\n                print(\"Returning model without loading pretrained weights\")\n                return model\n```\nIts outputs:\nLoading model from: /home/user/working_folder/lerobot/local/model/pi0_base (I use this absolute path) \nCould not load state dict from remote files: /home/user/working_folder/lerobot/local/model/pi0_base does not appear to have a file named model.safetensors. Checkout 'https://huggingface.co//home/user/working_folder/lerobot/local/model/pi0_base/tree/main' for available files.\n\nIt seems that the program see my pretrain_path_or_name as a repo_id :/\n\nHow can I introduce local pretrained path?\n\n* Ok I know that my file is incorrect. It's my bad not code's\n",
    "url": "https://github.com/huggingface/lerobot/issues/2304",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-24T01:59:26Z",
    "updated_at": "2025-10-24T02:33:25Z",
    "user": "milong26"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27441,
    "title": "[Bug]: vllm/v1/core/sched/scheduler.py: Unintended reordering of requests during scheduling",
    "body": "### Your current environment\n\n<details>\nThis error is independent of the environment.\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\n### Description\nThe function `schedule()` in [vllm/v1/core/sched/scheduler.py](https://github.com/vllm-project/vllm/blob/main/vllm/v1/core/sched/scheduler.py) is responsible for scheduling inference requests.\n\nIn certain cases \u2014 such as when a request is waiting for KV blocks from a remote prefill worker or when the token budget is exhausted \u2014 the request must be reinserted into the waiting queue `self.waiting`.\n\nCurrently, the implementation pops such requests, prepends them to skipped_waiting_requests, and then prepends skipped_waiting_requests back to self.waiting.\nHowever, this behavior can shuffle the request order, potentially impacting the tail latency of request serving.\n\n### How to Fix\nReplace all calls to `skipped_wating_requests.prepend_request(request)` with `skipped_wating_requests.add_request(request)`\n\n### Result\n<img width=\"1445\" height=\"801\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/4e81a662-c527-4b15-a5d1-8e78150961e8\" />\n\nThe figure compares the request-serving timelines of the original (left) and fixed (right) versions.\n* X-axis: Time\n* Y-axis: Request ID (submission order)\n* Green: Duration while the request is in `self.waiting`\n* Black: Time between GPU memory allocation and completion of the request\u2019s prefill computation\n* Red: Time between the end of prefill computation and GPU memory release (while waiting for the remote decoder to read KV blocks)\n\nThe scheduling policy used is FCFS.\nIn the original version, requests are shuffled under resource pressure. After applying the fix, the request serving order remains consistent, as expected.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27441",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-23T22:35:50Z",
    "updated_at": "2025-11-22T04:20:35Z",
    "comments": 1,
    "user": "dongha-yoon"
  },
  {
    "repo": "pytorch/ao",
    "number": 3232,
    "title": "nvfp4: why do we need to call weight.contiguous for Qwen3 during lm-eval?",
    "body": "TODO @andrewor14  add repro",
    "url": "https://github.com/pytorch/ao/issues/3232",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-23T21:20:54Z",
    "updated_at": "2025-10-28T22:36:03Z",
    "comments": 1,
    "user": "vkuzo"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2303,
    "title": "Question: Does the follower arm have an api for scripting movement?",
    "body": "Hi, apologies if this has been answered before or if it's not the right place to ask. I've been using the SO-101 arms for imitation learning, but recently I've wanted to try and test out the follower arm for embodied reasoning models such as Gemini ER 1.5. To do this, I figure I would need to have some way to map outputs from the ER model (coordinates or general, high-level movements) to movements for the SO-101. Does the SO-101 has an API for this type of low-level movement control, e.g. if I just wanted to move it pre-scripted in space using coordinates or motor motion? What would the code for this type of low-level movement look? \n\nThank you so much for any and all help!",
    "url": "https://github.com/huggingface/lerobot/issues/2303",
    "state": "open",
    "labels": [
      "question",
      "robots",
      "python"
    ],
    "created_at": "2025-10-23T20:40:56Z",
    "updated_at": "2025-10-23T22:29:28Z",
    "user": "Buttmunky1"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2294,
    "title": "Question about the HuggingFaceVLA/smolvla_libero Model Configuration",
    "body": "Hello,\n\nLerobot has officially ported [LIBERO](https://github.com/huggingface/lerobot/issues/1369#issuecomment-3323183721), and we can use the checkpoint at [HuggingFaceVLA/smolvla_libero](https://huggingface.co/HuggingFaceVLA/smolvla_libero) to evaluate the LIBERO benchmark.\n\nHowever, the model configuration of [HuggingFaceVLA/smolvla_libero](https://huggingface.co/HuggingFaceVLA/smolvla_libero) appears to differ from the [original model](https://huggingface.co/lerobot/smolvla_base). For example:\n\n[lerobot/smolvla_base](https://huggingface.co/lerobot/smolvla_base/blob/main/config.json)\n```json\n{\n  \"vlm_model_name\": \"HuggingFaceTB/SmolVLM2-500M-Video-Instruct\",\n  \"load_vlm_weights\": true,\n  \"add_image_special_tokens\": false,\n  \"attention_mode\": \"cross_attn\",\n  \"prefix_length\": 0,\n  \"pad_language_to\": \"max_length\",\n  \"num_expert_layers\": 0,\n  \"num_vlm_layers\": 16,\n  \"self_attn_every_n_layers\": 2,\n  \"expert_width_multiplier\": 0.75\n}\n```\n\n[HuggingFaceVLA/smolvla_libero](https://huggingface.co/HuggingFaceVLA/smolvla_libero/blob/main/config.json)\n```json\n{\n  \"vlm_model_name\": \"HuggingFaceTB/SmolVLM2-500M-Instruct\",\n  \"load_vlm_weights\": true,\n  \"add_image_special_tokens\": false,\n  \"attention_mode\": \"cross_attn\",\n  \"prefix_length\": 0,\n  \"pad_language_to\": \"longest\",\n  \"num_expert_layers\": -1,\n  \"num_vlm_layers\": 0, <- it becomes 32  when model is initialized\n  \"self_attn_every_n_layers\": 2,\n  \"expert_width_multiplier\": 0.5,\n}\n```\n\nIn particular, `num_vlm_layers` is set to 32 across all layers, which is not consistent with the [paper](https://arxiv.org/pdf/2506.01844) where they use half of them (16 layers).\nCould you provide the original model checkpoint and the training recipe so we can reproduce the LIBERO benchmark performance?",
    "url": "https://github.com/huggingface/lerobot/issues/2294",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-10-23T13:37:48Z",
    "updated_at": "2025-10-30T07:49:17Z",
    "user": "Hesh0629"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27413,
    "title": "[Usage]: how to request a qwen2.5-VL-7B classify model served by vllm using openai SDK?",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nI launch a server with the following command to serving a Qwen2.5-VL-7B model finetued for seqence classification. (this model replaced the lm_head with a 2 classes score_head)\n\nThe launch command is :\n```\nvllm serve --model=//video_classification/qwenvl_7b_video_cls/v5-20251011-121851/2340_vllm_format --served_model_name Qwen2.5-7B-shenhe --task=classify --port=8080 --tensor-parallel-size=2\n```\n\nI don't know how to request the server with the openAI sdk.\nI use the code snnipet showed below which works well with pure text, but it got 400 bad request when I put the video url into the prompt\n\nthis works well:\n```\n# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: Copyright contributors to the vLLM project\n\"\"\"Example Python client for classification API using vLLM API server\nNOTE:\n    start a supported classification model server with `vllm serve`, e.g.\n    vllm serve jason9693/Qwen2.5-1.5B-apeach\n\"\"\"\n\nimport argparse\nimport pprint\n\nimport requests\n\n\ndef post_http_request(payload: dict, api_url: str) -> requests.Response:\n    headers = {\"User-Agent\": \"Test Client\"}\n    response = requests.post(api_url, headers=headers, json=payload)\n    return response\n\n\ndef parse_args():\n    parse = argparse.ArgumentParser()\n    parse.add_argument(\"--host\", type=str, default=\"localhost\")\n    parse.add_argument(\"--port\", type=int, default=8000)\n    parse.add_argument(\"--model\", type=str, default=\"jason9693/Qwen2.5-1.5B-apeach\")\n    return parse.parse_args()\n\n\ndef main(args):\n    host = args.host\n    port = args.port\n    model_name = args.model\n\n    api_url = f\"http://{host}:{port}/classify\"\n    prompts = [\n        \"Hello, my name is\",\n        \"The president of the United States is\",\n        \"The capital of France is\",\n        \"The future of AI is\",\n    ]\n\n    payload = {\n        \"model\": model_name,\n        \"input\": prompts,\n    }\n\n    classify_response = post_http_request(payload=payload, api_url=api_url)\n    pprint.pprint(classify_response.json())\n\n\nif __name__ == \"__main__\":\n    args = parse_args()\n    main(args)\n```\n\nbut if I replace the prompts with multimodal data, the server doesn't work.\n```\nvideo_url =  \"https://js-ad.a.yximgs.com/bs2/ad_nieuwland-material/t2i2v/videos/3525031242883943515-140276939618048_24597237897733_v0_1759927515165406_3.mp4\"\n\n    prompts =  [\n        {\"role\": \"user\", \"content\": [\n                {\"type\": \"text\", \"text\": \"\u4f60\u662f\u4e00\u4e2a\u4e13\u4e1a\u7684\u89c6\u9891\u8d28\u91cf\u5206\u6790\u5e08\uff0c\u8bf7\u4f60\u4ed4\u7ec6\u5224\u65ad\u4e0b\u65b9\u63d0\u4f9b\u7684\u89c6\u9891\u662f\u5426\u5b58\u5728\u8d28\u91cf\u95ee\u9898\\n\u8d28\u91cf\u95ee\u9898\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\uff1a\\n1.\u753b\u9762\u8d28\u91cf\u5dee,\u753b\u9762\u6a21\u7cca\uff0c\u4eae\u5ea6\u95ea\u70c1\\n2.\u753b\u9762\u4e2d\u6587\u5b57\u5b58\u5728\u6a21\u7cca\u95ee\u9898\\n3.\u89c6\u9891\u753b\u9762\u4e0d\u7b26\u5408\u771f\u5b9e\u7269\u7406\u903b\u8f91\uff0c\u4f8b\u5982\u51ed\u7a7a\u4ea7\u751f\u7684\u4eba\u7269\u80a2\u4f53\u3001\u5934\u50cf\u3001\u624b\u6307\u624b\u81c2\u6570\u91cf\u4e0d\u5bf9\uff0c\u817f\u90e8\u4e0d\u81ea\u7136\u7b49\u95ee\u9898\\n4.\u753b\u9762\u8fd0\u52a8\u4e0d\u7b26\u5408\u7269\u7406\u89c4\u5f8b\uff0c\u4f8b\u5982\u51ed\u7a7a\u4ea7\u751f\u7684\u7269\u4f53\uff0c\u753b\u9762\u5361\u987f\u3001\u6643\u52a8\u3001\u6296\u52a8\u3001\u8df3\u52a8\u7b49\\n\\n\u5982\u679c\u89c6\u9891\u5b58\u5728\u95ee\u9898\u8bf7\u8fd4\u56de0\uff0c\u5982\u679c\u89c6\u9891\u4e0d\u5b58\u5728\u95ee\u9898\u8bf7\u8fd4\u56de1\u3002\\n## \u89c6\u9891\u5185\u5bb9\u5982\u4e0b\\n\"},\n                {\"type\": \"video\", \"video\": f\"{video_url}\"},\n            ]\n        }\n    ]\n\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27413",
    "state": "open",
    "labels": [
      "good first issue",
      "usage"
    ],
    "created_at": "2025-10-23T12:32:25Z",
    "updated_at": "2025-10-25T00:18:54Z",
    "comments": 12,
    "user": "muziyongshixin"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1447,
    "title": "How to use half precision ONNX models?",
    "body": "### Question\n\nHi,\n\nI just exported a detection model with fp16 using optimum.\n`--dtype fp16 `\n\nThis is my pipeline:\n\n```javascript\nconst model = await AutoModel.from_pretrained(\n  \"./onnx_llama\",\n  { dtype: \"fp16\", device: \"cpu\" } \nconst processor = await AutoProcessor.from_pretrained(\"./onnx_llama\");\nconst { pixel_values, reshaped_input_sizes } = await processor(image);\nconst buffer = await fs.readFile(\"image3.jpg\");\nconst blob = new Blob([buffer]);\n\nconst image = await RawImage.fromBlob(blob);\nconst { pixel_values, reshaped_input_sizes } = await processor(image);\nconst { output0 } = await model({ pixel_values: tensor });\n```\nUsing this results in:\nAn error occurred during model execution: \"Error: Unexpected input data type. Actual: (tensor(float)) , expected: (tensor(float16))\".\n\nWhich makes sense, however when i try to convert to fp16 \"manually\"\n\n```javascript\nconst fp16data = Float16Array.from(pixel_values.data); //float32ArrayToUint16Array(pixel_values.data);\nconst tensor = new Tensor(\"float16\", fp16data, pixel_values.dims);\nconst { output0 } = await model({ pixel_values:tensor });\n```\n\nI get:\n`Tensor.data must be a typed array (4) for float16 tensors, but got typed array (0).`\n\nWhat's going on here? I tried to converting the `pixel_data.data` to a UInt16Array manually but that has no effect as it gets converted to a Float16Array in the tensor constructor anyway.\n\nHelp is much appreciated!\n\nThanks",
    "url": "https://github.com/huggingface/transformers.js/issues/1447",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-10-23T09:18:26Z",
    "updated_at": "2025-10-23T09:18:26Z",
    "user": "richarddd"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41810,
    "title": "How do you use t5gemma decoder with a different encoder?",
    "body": "I am trying to combine the t5gemma decoder with a pretrained deberta encoder that I have trained from scratch using `EncoderDecoderModel`. \n\nHere is the code:\n\n```\nmodel_1 = \"WikiQuality/pre_filtered.am\"\nmodel_2 = \"google/t5gemma-2b-2b-ul2\"\n\nencoder = AutoModel.from_pretrained(model_1)\ndecoder = AutoModel.from_pretrained(model_2, dtype=torch.bfloat16)\n\nmodel = EncoderDecoderModel(encoder=encoder, decoder=decoder)\n```\n\nThe above code raises the error:\n```\nAttributeError: 'T5GemmaConfig' object has no attribute 'hidden_size'\n```\n\nFrom this I understand that `hidden_size` is accesible from `decoder.config.decoder.hidden_size` and not `decoder.config.hidden_size`, which is where EncoderDecoderModel is looking. So I change my code to load the encoder-decoder model to this:\n\n```\nmodel = EncoderDecoderModel(encoder=encoder, decoder=decoder.decoder)\n```\nThis gives me the following error:\n\n```\nValueError: Unrecognized model identifier: t5_gemma_module. Should contain one of aimv2, aimv2_vision_model, albert, align, altclip, apertus, arcee, aria, aria_text, audio-spectrogram-transformer, autoformer, aya_vision, bamba, bark, bart, beit, bert, bert-generation, big_bird, bigbird_pegasus, biogpt, bit, bitnet, blenderbot, blenderbot-small, blip, blip-2, blip_2_qformer, bloom, blt, bridgetower, bros, camembert, canine, chameleon, chinese_clip, chinese_clip_vision_model, clap, clip, clip_text_model, clip_vision_model, clipseg, clvp, code_llama, codegen, cohere, cohere2, cohere2_vision, colpali, colqwen2, conditional_detr, convbert, convnext, convnextv2, cpmant, csm, ctrl, cvt, d_fine, dab-detr, dac, data2vec-audio, data2vec-text, data2vec-vision, dbrx, deberta, deberta-v2, decision_transformer, deepseek_v2, deepseek_v3, deepseek_vl, deepseek_vl_hybrid, deformable_detr, deit, depth_anything, depth_pro, deta, detr, dia, diffllama, dinat, dinov2, dinov2_with_registers, dinov3_convnext, dinov3_vit, distilbert, doge, donut-swin, dots1, dpr, dpt, edgetam, edgetam_video, edgetam_vision_model, efficientformer, efficientloftr, efficientnet, electra, emu3, encodec, encoder-decoder, eomt, ernie, ernie4_5, ernie4_5_moe, ernie_m, esm, evolla, exaone4, falcon, falcon_h1, falcon_mamba, fastspeech2_conformer, fastspeech2_conformer_with_hifigan, flaubert, flava, flex_olmo, florence2, fnet, focalnet, fsmt, funnel, fuyu, gemma, gemma2, gemma3, gemma3_text, gemma3n, gemma3n_audio, gemma3n_text, gemma3n_vision, git, glm, glm4, glm4_moe, glm4v, glm4v_moe, glm4v_moe_text, glm4v_text, glpn, got_ocr2, gpt-sw3, gpt2, gpt_bigcode, gpt_neo, gpt_neox, gpt_neox_japanese, gpt_oss, gptj, gptsan-japanese, granite, granite_speech, granitemoe, granitemoehybrid, granitemoeshared, granitevision, graphormer, grounding-dino, groupvit, helium, hgnet_v2, hiera, hubert, hunyuan_v1_dense, hunyuan_v1_moe, ibert, idefics, idefics2, idefics3, idefics3_vision, ijepa, imagegpt, informer, instructblip, instructblipvideo, internvl, internvl_vision, jamba, janus, jetmoe, jukebox, kosmos-2, kosmos-2.5, kyutai_speech_to_text, layoutlm, layoutlmv2, layoutlmv3, led, levit, lfm2, lfm2_vl, lightglue, lilt, llama, llama4, llama4_text, llava, llava_next, llava_next_video, llava_onevision, longcat_flash, longformer, longt5, luke, lxmert, m2m_100, mamba, mamba2, marian, markuplm, mask2former, maskformer, maskformer-swin, mbart, mctct, mega, megatron-bert, metaclip_2, mgp-str, mimi, minimax, ministral, mistral, mistral3, mixtral, mlcd, mllama, mm-grounding-dino, mobilebert, mobilenet_v1, mobilenet_v2, mobilevit, mobilevitv2, modernbert, modernbert-decoder, moonshine, moshi, mpnet, mpt, mra, mt5, musicgen, musicgen_melody, mvp, nat, nemotron, nezha, nllb-moe, nougat, nystromformer, olmo, olmo2, olmo3, olmoe, omdet-turbo, oneformer, open-llama, openai-gpt, opt, ovis2, owlv2, owlvit, paligemma, parakeet, parakeet_ctc, parakeet_encoder, patchtsmixer, patchtst, pegasus, pegasus_x, perceiver, perception_encoder, perception_lm, persimmon, phi, phi3, phi4_multimodal, phimoe, pix2struct, pixtral, plbart, poolformer, pop2piano, prompt_depth_anything, prophetnet, pvt, pvt_v2, qdqbert, qwen2, qwen2_5_omni, qwen2_5_vl, qwen2_5_vl_text, qwen2_audio, qwen2_audio_encoder, qwen2_moe, qwen2_vl, qwen2_vl_text, qwen3, qwen3_moe, qwen3_next, qwen3_omni_moe, qwen3_vl, qwen3_vl_moe, qwen3_vl_moe_text, qwen3_vl_text, rag, realm, recurrent_gemma, reformer, regnet, rembert, resnet, retribert, roberta, roberta-prelayernorm, roc_bert, roformer, rt_detr, rt_detr_resnet, rt_detr_v2, rwkv, sam, sam2, sam2_hiera_det_model, sam2_video, sam2_vision_model, sam_hq, sam_hq_vision_model, sam_vision_model, seamless_m4t, seamless_m4t_v2, seed_oss, segformer, seggpt, sew, sew-d, shieldgemma2, siglip, siglip2, siglip2_vision_model, siglip_vision_model, smollm3, smolvlm, smolvlm_vision, speech-encoder-decoder, speech_to_text, speech_to_text_2, speecht5, splinter, squeezebert, stablelm, starcoder2, superglue, superpoint, swiftformer, swin, swin2sr, swinv2, switch_transformers, t5, t5gemma, table-transformer, tapas, textnet, tim",
    "url": "https://github.com/huggingface/transformers/issues/41810",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-23T08:48:19Z",
    "updated_at": "2025-12-01T08:02:53Z",
    "comments": 1,
    "user": "kushaltatariya"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166116,
    "title": "[CCA] CUDACachingAllocator always release physical memory handle when the expandable segment unmaps.",
    "body": "This may not be a bug. I'm just confused about the CUDACachingAllocator behavior.\n\nWhen enable expandable segments, CCA uses the CUDA virtual memory API.([cuMemCreate](https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__VA.html#group__CUDA__VA_1g899d69a862bba36449789c64b430dc7c)/[cuMemRelease](https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__VA.html#group__CUDA__VA_1g3014f0759f43a8d82db951b8e4b91d68), etc.). \n\nI've noticed that CCA will call `cuMemRelease` any time it unmaps a physical memory handle as shown here: https://github.com/pytorch/pytorch/blob/bf5aa9e42eb4049aad56264dacefd638233924b5/c10/cuda/CUDACachingAllocator.cpp#L704\nAnd when map virtual address to physical memory, it will re-create the physical memory handle : https://github.com/pytorch/pytorch/blob/bf5aa9e42eb4049aad56264dacefd638233924b5/c10/cuda/CUDACachingAllocator.cpp#L441\n\nMy question is , does the physical memory handle really need  to be released anytime when we do unmap? Can we reuse the handle for next mapping? I think maybe there will be some performance gain when we reuse these handles?",
    "url": "https://github.com/pytorch/pytorch/issues/166116",
    "state": "open",
    "labels": [
      "triaged",
      "module: CUDACachingAllocator"
    ],
    "created_at": "2025-10-23T07:30:24Z",
    "updated_at": "2025-10-29T02:57:00Z",
    "comments": 3,
    "user": "PHLens"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3818,
    "title": "Duplicate W&B initialization in offline mode",
    "body": "### System Info\n\n```Shell\n- `Accelerate` version: 1.10.1\n```\n\n### Information\n\n- [x] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [x] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nWhen using Accelerate with `wandb` in **offline mode**, two separate W&B runs are created for a single training process.\nThis happens because both the `start` and the `store_init_configuration` method of `WandBTracker` call `wandb.init()`, which leads to redundant initialization. \n\nhttps://github.com/huggingface/accelerate/blob/a12beee389f6bd37cfae0aba233db03f375f7f80/src/accelerate/tracking.py#L318-L325\n\nhttps://github.com/huggingface/accelerate/blob/a12beee389f6bd37cfae0aba233db03f375f7f80/src/accelerate/tracking.py#L343-L350\n\nIs there any plan to refine the duplication?\n\n### Expected behavior\n\ninitialize wandb run only 1 time",
    "url": "https://github.com/huggingface/accelerate/issues/3818",
    "state": "closed",
    "labels": [
      "good first issue"
    ],
    "created_at": "2025-10-23T02:19:38Z",
    "updated_at": "2025-12-16T13:10:48Z",
    "comments": 3,
    "user": "ShuyUSTC"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166106,
    "title": "[Feature][BUG] need support for DispatchKey.AutocastXPU",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\ndetails information in this [issue](https://github.com/intel/intel-xpu-backend-for-triton/issues/5366#issuecomment-3433362148).\ni get error when i use torch.compile+autocast+triton:\n\n```\n File \"D:\\miniconda3\\envs\\compile\\Lib\\site-packages\\torch\\_ops.py\", line 493, in dispatch\n    raise NotImplementedError(\ntorch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:\nNotImplementedError: could not find kernel for HigherOrderOperator triton_kernel_wrapper_mutation at dispatch key DispatchKey.AutocastXPU (resolved from DispatchKey.AutocastXPU)\n```\n\ni found DispatchKey.AutocastCPU and DispatchKey.AutocastCUDA in [https://github.com/pytorch/pytorch/blame/c746feb86a1459db5f6294730d1d72ed15f16dd3/torch/_higher_order_ops/triton_kernel_wrap.py#L1364](https://github.com/pytorch/pytorch/blame/c746feb86a1459db5f6294730d1d72ed15f16dd3/torch/_higher_order_ops/triton_kernel_wrap.py#L1364)\nbut no DispatchKey.AutocastXPU.\nso i think it's not a bug. i think pytorch need support this feature. does pytorch have some plan?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @gujinghui @EikanWang @fengyuan14 @guangyey",
    "url": "https://github.com/pytorch/pytorch/issues/166106",
    "state": "open",
    "labels": [
      "triaged",
      "module: xpu"
    ],
    "created_at": "2025-10-23T01:58:34Z",
    "updated_at": "2025-10-23T14:47:11Z",
    "comments": 1,
    "user": "xiaohoua"
  },
  {
    "repo": "pytorch/vision",
    "number": 9249,
    "title": "Non-local versions of torch are only available for linux(/mac) aarch64",
    "body": "When checking https://download.pytorch.org/whl/torchvision/ for e.g. 0.24.0 on Python 3.12, the following list of wheels is available for non-local (no `+`) versions:\n\n```\ntorchvision-0.24.0-cp312-cp312-macosx_11_0_arm64.whl\ntorchvision-0.24.0-cp312-cp312-manylinux_2_28_aarch64.whl\ntorchvision-0.24.0-cp312-cp312-manylinux_2_28_aarch64.whl\ntorchvision-0.24.0-cp312-cp312-manylinux_2_28_aarch64.whl\ntorchvision-0.24.0-cp312-cp312-manylinux_2_28_aarch64.whl\ntorchvision-0.24.0-cp312-cp312-manylinux_2_28_aarch64.whl\n```\n\nThis caused resolution problems for uv users on x86_64 linux (https://github.com/astral-sh/uv/issues/16386), I'm not sure if that's intentional? It also seems that the `manylinux_2_28_aarch64` wheels are duplicated.\n\nAnother user reported a different problem with https://download.pytorch.org/whl/nightly/cu128 in the uv discord (https://discord.com/channels/1039017663004942429/1039017663512449056/1430596302764249100):\n\n```\nResolved 176 packages in 22ms\nerror: Distribution `torchvision==0.25.0.dev20251012 @ registry+https://download.pytorch.org/whl/nightly/cu128` can't be installed because it doesn't have a source distribution or wheel for the current platform\n\nhint: You're on Linux (`manylinux_2_35_x86_64`), but `torchvision` (v0.25.0.dev20251012) only has wheels for the following platform: `manylinux_2_28_aarch64`; consider adding your platform to `tool.uv.required-environments` to ensure uv resolves to a version with compatible wheels\n```\n\nI'm not sure if this is a bug or intentional, I wanted to discuss how we can improve the user experience either on the torch side or on the uv side.",
    "url": "https://github.com/pytorch/vision/issues/9249",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-22T17:04:55Z",
    "updated_at": "2025-12-15T19:09:29Z",
    "comments": 3,
    "user": "konstin"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27347,
    "title": "[Usage]: vllm: error: unrecognized arguments: --all2all-backend deepep_low_latency",
    "body": "### Your current environment\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.2 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : Could not collect\nCMake version                : version 3.31.6\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.10.0 (default, Mar  3 2022, 09:58:08) [GCC 7.5.0] (64-bit runtime)\nPython platform              : Linux-5.15.0-89-generic-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : \nGPU 0: NVIDIA H200\nGPU 1: NVIDIA H200\nGPU 2: NVIDIA H200\nGPU 3: NVIDIA H200\nGPU 4: NVIDIA H200\nGPU 5: NVIDIA H200\nGPU 6: NVIDIA H200\nGPU 7: NVIDIA H200\n\nNvidia driver version        : 570.133.20\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.8.0\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                       x86_64\nCPU op-mode(s):                     32-bit, 64-bit\nAddress sizes:                      46 bits physical, 57 bits virtual\nByte Order:                         Little Endian\nCPU(s):                             192\nOn-line CPU(s) list:                0\nOff-line CPU(s) list:               1-191\nVendor ID:                          GenuineIntel\nModel name:                         INTEL(R) XEON(R) PLATINUM 8558\nCPU family:                         6\nModel:                              207\nThread(s) per core:                 2\nCore(s) per socket:                 48\nSocket(s):                          2\nStepping:                           2\nCPU(s) scaling MHz:                 76%\nCPU max MHz:                        4000.0000\nCPU min MHz:                        800.0000\nBogoMIPS:                           4200.00\nFlags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nVirtualization:                     VT-x\nL1d cache:                          4.5 MiB (96 instances)\nL1i cache:                          3 MiB (96 instances)\nL2 cache:                           192 MiB (96 instances)\nL3 cache:                           520 MiB (2 instances)\nNUMA node(s):                       2\nNUMA node0 CPU(s):                  0-47,96-143\nNUMA node1 CPU(s):                  48-95,144-191\nVulnerability Gather data sampling: Not affected\nVulnerability Itlb multihit:        Not affected\nVulnerability L1tf:                 Not affected\nVulnerability Mds:                  Not affected\nVulnerability Meltdown:             Not affected\nVulnerability Mmio stale data:      Not affected\nVulnerability Retbleed:             Not affected\nVulnerability Spec rstack overflow: Not affected\nVulnerability Spec store bypass:    Mit",
    "url": "https://github.com/vllm-project/vllm/issues/27347",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-22T14:36:18Z",
    "updated_at": "2025-10-22T15:07:13Z",
    "comments": 1,
    "user": "Valerianding"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27343,
    "title": "[Usage]: Can't get result from /pooling api when using Qwen2.5-Math-PRM-7B online",
    "body": "### Your current environment\n\n```\n\nThe output of `python collect_env.py`\n\nCollecting environment information...                                                                               [140/1781]\n==============================                                                                                                \n        System Info                                                                                                           \n==============================                                                                                                \nOS                           : Ubuntu 22.04.5 LTS (x86_64)                                                                    \nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0                                                        \nClang version                : Could not collect                                                                              \nCMake version                : version 3.22.1                                                                                 \nLibc version                 : glibc-2.35                                                                                     \n                                                                                                                              \n==============================                                                                                                \n       PyTorch Info                                                                                                           \n==============================                                                                                                \nPyTorch version              : 2.8.0+cu128                                                                                    \nIs debug build               : False                                                                                          \nCUDA used to build PyTorch   : 12.8                                                                                           \nROCM used to build PyTorch   : N/A                                                                                            \n                                                                                                                              \n==============================                                                                                                \n      Python Environment                                                                                                      \n==============================                                                                                                \nPython version               : 3.12.12 | packaged by Anaconda, Inc. | (main, Oct 21 2025, 20:16:04) [GCC 11.2.0] (64-bit runti\nme)                                                                                                                           \nPython platform              : Linux-5.15.0-153-generic-x86_64-with-glibc2.35                                                 \n                                                                                                                              \n==============================                                                                                                \n       CUDA / GPU Info                                                                                                        \n==============================                                                                                                \nIs CUDA available            : True                                                                                           \nCUDA runtime version         : 12.4.99\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration :  \nGPU 0: NVIDIA A100 80GB PCIe\nGPU 1: NVIDIA A100 80GB PCIe\nGPU 2: NVIDIA A800 80GB PCIe\nGPU 3: NVIDIA A800 80GB PCIe\nGPU 4: NVIDIA A100 80GB PCIe\nGPU 5: NVIDIA A100 80GB PCIe\nGPU 6: NVIDIA A800 80GB PCIe\nGPU 7: NVIDIA A800 80GB PCIe\n\nNvidia driver version        : 550.54.15\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n==============================                                                                                                \n          CPU Info                                                                                                            \n==============================                                                                                                \nArchitecture:                            x86_64                                                                               \nCPU op-mode(s):                          32-bit, 64-bit                                                                       \nAddress sizes:                           46 bits physical, 48 bits virt",
    "url": "https://github.com/vllm-project/vllm/issues/27343",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-22T13:36:51Z",
    "updated_at": "2025-10-23T03:39:13Z",
    "comments": 3,
    "user": "zgc6668"
  },
  {
    "repo": "pytorch/ao",
    "number": 3226,
    "title": "question of blockwise quant fp8 training",
    "body": "Hi, the [blockwise_fp8_training](https://github.com/pytorch/ao/tree/7e68d5ee6fe6749a667edd2510d5fd2b599a27e2/torchao/prototype/blockwise_fp8_training) has been there for a while. Is there any reason we dont merge it into [float8](https://github.com/pytorch/ao/tree/main/torchao/float8) folder?\n\nAnd current moe training only supports `FP8_ROWWISE` and `MXFP8`, will `FP8_BlockWise` be considered to be added into `torchao` in the near future? (mainly for h100 users)\n\nthanks!",
    "url": "https://github.com/pytorch/ao/issues/3226",
    "state": "open",
    "labels": [
      "float8",
      "moe"
    ],
    "created_at": "2025-10-22T13:18:40Z",
    "updated_at": "2025-10-24T04:00:47Z",
    "comments": 3,
    "user": "rakkit"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1446,
    "title": "Zhare-AI/sd-1-5-webgpu on HuggingFace.co lists itself as Transformer.js supported?",
    "body": "### Question\n\n[Zhare-AI/sd-1-5-webgpu](https://huggingface.co/Zhare-AI/sd-1-5-webgpu) is a `text-to-image` model and is marked as Transformers.js compatible, and even shows demo code using Transformers.js on its `huggingface.co` page. Their example code fails with an error saying `text-to-image` is not supported in Transformers.js.\n\nThe problem is `text-to-image` is not supported in 3.7.6  and does not appear to even be supported in the v4 branch. I asked them on their `huggingface.co` discussions what version of Transformers.js their model is compatible with but no reply yet. Apparently someone else asked them the same thing 18 days ago and never got a reply.\n\nI am very interested adding a Transformers.js demo for `text-to-image` to my Blazor WASM library [SpawnDev.BlazorJS.TransformersJS](https://github.com/LostBeard/SpawnDev.BlazorJS.TransformersJS), but not sure what I am missing.",
    "url": "https://github.com/huggingface/transformers.js/issues/1446",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-10-22T12:20:16Z",
    "updated_at": "2025-10-24T14:33:17Z",
    "user": "LostBeard"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27336,
    "title": "[Feature]: Make promt_token_ids optional in streaming response (disable by default)",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nStarting with v0.10.2, the first server-sent event (SSE) in streaming responses now includes the full list of `prompt_token_ids`.\nWhile this can be useful for debugging or detailed inspection, it introduces several practical issues in production environments:  \n\n1. Large payload size:  \nFor long prompts, this significantly increases the size of the first streaming event. This can increase latency, cause network throttling, and reduce streaming responsiveness.\n\n2. Parser and infrastructure limitations:  \nSome clients and intermediate parsers have message size limits. The larger first event may cause them to fail or disconnect, requiring changes across multiple components in existing systems that previously handled smaller initial events.\n\n3. Breaking change in behavior:\nPreviously, streaming responses did not include prompt token IDs, so this change affects compatibility with existing clients expecting smaller events.\n\n\n### Suggested Fix\nMake the inclusion of prompt_token_ids optional per request and disabled by default (same as `return_token_ids`), restoring the previous behavior.\n\n\n### Alternatives\n\nAlternatively, provide an API flag or configuration option to exclude `prompt_token_ids` globally for the entire server, so that no streaming response include this field.\n\n### Additional context\n\nFor example, the first streaming response for a prompt of ~130k tokens can now exceed 600KB, while some parsers and scanners have default buffer sizes of 64KB (which was previously sufficient).\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27336",
    "state": "closed",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-10-22T11:42:41Z",
    "updated_at": "2025-10-27T11:06:45Z",
    "comments": 1,
    "user": "Gruner-atero"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41775,
    "title": "Hugging Face website and models not reachable",
    "body": "### System Info\n\n```\n$ pip show transformers\nName: transformers\nVersion: 4.57.1\nSummary: State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow\nHome-page: https://github.com/huggingface/transformers\nAuthor: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors)\nAuthor-email: transformers@huggingface.co\n```\n\n```\n$ python --version\nPython 3.12.3\n```\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n1. `python -c 'from transformers import pipeline; pipeline = pipeline(task=\"text-generation\", model=\"Qwen/Qwen2.5-1.5B\")'`\n\nI am getting connection issues:\n```\nOSError: We couldn't connect to 'https://huggingface.co' to load the files, and couldn't find them in the cached files.\nCheck your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.\n```\n\nIt rather funny that it recommends checking https://huggingface.co/docs/transformers/installation#offline-mode when https://huggingface.co is not reachable :-) Maybe this information, e.g. about mirrors, could be hosted somewhere else?\n\n### Expected behavior\n\nThe examples should work as documented.",
    "url": "https://github.com/huggingface/transformers/issues/41775",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-22T07:40:32Z",
    "updated_at": "2025-11-21T08:10:00Z",
    "comments": 8,
    "user": "christian-rauch"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27319,
    "title": "[Usage]:  Quantized FusedMoE crashed in graph compiled stage",
    "body": "### Your current environment\n\n```text\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 24.04.2 LTS (x86_64)\nGCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version                : 19.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.4.3 25224 d366fa84f3fdcbd4b10847ebd5db572ae12a34fb)\nCMake version                : version 3.31.6\nLibc version                 : glibc-2.39\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+rocm6.4\nIs debug build               : False\nCUDA used to build PyTorch   : N/A\nROCM used to build PyTorch   : 6.4.43482-0f2d60242\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.11 | packaged by conda-forge | (main, Jun  4 2025, 14:45:31) [GCC 13.3.0] (64-bit runtime)\nPython platform              : Linux-6.8.0-79-generic-x86_64-with-glibc2.39\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : Could not collect\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : AMD Radeon PRO W7900 Dual Slot  (gfx1100)\nNvidia driver version        : Could not collect\ncuDNN version                : Could not collect\nHIP runtime version          : 6.4.43482\nMIOpen runtime version       : 3.4.0\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        52 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               256\nOn-line CPU(s) list:                  0-255\nVendor ID:                            AuthenticAMD\nBIOS Vendor ID:                       Advanced Micro Devices, Inc.\nModel name:                           AMD EPYC 9554 64-Core Processor\nBIOS Model name:                      AMD EPYC 9554 64-Core Processor                 Unknown CPU @ 3.1GHz\nBIOS CPU family:                      107\nCPU family:                           25\nModel:                                17\nThread(s) per core:                   2\nCore(s) per socket:                   64\nSocket(s):                            2\nStepping:                             1\nFrequency boost:                      enabled\nCPU(s) scaling MHz:                   51%\nCPU max MHz:                          3100.0000\nCPU min MHz:                          1500.0000\nBogoMIPS:                             6199.71\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin cppc amd_ibpb_ret arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid overflow_recov succor smca fsrm flush_l1d debug_swap\nVirtualization:                       AMD-V\nL1d cache:                            4 MiB (128 instances)\nL1i cache:                            4 MiB (128 instances)\nL2 cache:                             128 MiB (128 instances)\nL3 cache:                             512 MiB (16 instances)\nNUMA node(s):                         2\nNUMA node0 CPU(s):                    0-63,128-191\nNUMA node1 CPU(s):                    64-127,192-255\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Mitigation; Safe RET\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:          ",
    "url": "https://github.com/vllm-project/vllm/issues/27319",
    "state": "closed",
    "labels": [
      "rocm",
      "usage"
    ],
    "created_at": "2025-10-22T06:29:32Z",
    "updated_at": "2025-10-24T02:19:55Z",
    "comments": 1,
    "user": "Rus-P"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27298,
    "title": "[Doc]: Update metrics documentation to remove V0 references and add v1 changes.",
    "body": "## Problem\n\nThe metrics documentation in `docs/design/metrics.md` still contains references to V0 metrics implementation, but V0 metrics have been removed after @njhill 's PR https://github.com/vllm-project/vllm/pull/27215 was merged. To avoid confusion, I think we should remove this and update it with the new set of v1 metrics.\n\nWas curious if we want to keep this v0 reference and add the v1 details on top of this. \n\n### Suggest a potential alternative/fix\n\n1. Remove all V0 references from the metrics documentation.\n2. Update the introduction to focus on V1 metrics only.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27298",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-10-21T22:08:48Z",
    "updated_at": "2025-10-22T13:29:17Z",
    "comments": 1,
    "user": "atalhens"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166020,
    "title": "[doc] Clarify that torch.mean doesn't support integer dtypes like torch.long",
    "body": "### \ud83d\udcda The doc issue\n\n[doc] Clarify that torch.mean doesn't support integer dtypes like torch.long\n\n**Page:** `torch.mean` documentation\n\n**Problem:** The documentation for `torch.mean` doesn't explicitly mention that integer dtypes (like `torch.long`) are not supported and will raise a runtime error.\n\n**Current behavior:** When users try:\n```python\ntorch.mean(torch.tensor([1, 2, 3], dtype=torch.long))\n```\nThey get the error: `RuntimeError: mean not implemented for 'Long'`\n\nHowever, this limitation isn't mentioned in the current documentation, leading to confusion about whether this is a bug or intended behavior.\n\n**Expected:** The documentation should clearly state that `torch.mean` requires floating-point input types and explain why integer types are not supported.\n\n**Location:** This affects the `torch.mean` documentation page at https://pytorch.org/docs/stable/generated/torch.mean.html\n\n### Suggest a potential alternative/fix\n\nAdd a note in the \"Notes\" section of `torch.mean` documentation:\n\n\"Note: `torch.mean` requires floating-point dtypes for input tensors. Integer dtypes (like `torch.long`, `torch.int`) are not supported because the mean operation typically results in floating-point values. If you need integer division, consider using `torch.div` with the `rounding_mode` parameter instead.\"\n\ncc @svekars @sekyondaMeta @AlannaBurke",
    "url": "https://github.com/pytorch/pytorch/issues/166020",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2025-10-21T19:27:50Z",
    "updated_at": "2025-10-21T22:13:29Z",
    "comments": 1,
    "user": "har5hdeep5harma"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 166014,
    "title": "Make Inductor Fallback Nodes Less Reliant on Invariants from Functionalization / AOT Autograd",
    "body": "### \ud83d\udc1b Describe the bug\n\n\nInductor has generic support for invoking operators as they would have been [in eager execution](https://github.com/pytorch/pytorch/blob/3dfd0c75847aad61a24e63d91bb330083db11857/torch/_inductor/graph.py#L1626-L1630). This path is hardened and works well both for custom ops and for bisecting a bad inductor lowering. However, it relies on invariants provided by AOT Autograd. If we want to compile without functionalization and decomposition, we may need to make it less reliant.\n\n#### Problem 1: Aliasing Relationships\n\nThe aliasing relationships of the graph must be statically known and correct. Likely the easiest and best path forward is to make sure that we have runtime checking of the aliasing relationships of custom ops. See https://github.com/pytorch/pytorch/issues/165349. When things are incorrect, there are two failure modes:\n\n**Incorrectly marked as aliasing**\n\nAn operator signature or meta may statically indicate that an input and output are aliasing when at execution time a new tensor will be returned. In this case, we will delay deleting the input until the output's final use, which can increase peak memory. \n\nSee: https://github.com/pytorch/pytorch/pull/163182#discussion_r2380201053 There's no reason why we can't delete the input eagerly here, since the view should keep the tensor alive.\n\n**Incorrectly marked as non-aliasing**\n\nThe failure mode here is that we may reuse the buffer with `config.inplace_buffers = True`. See this discussion on an operator which was incorrectly marked: https://github.com/pytorch/pytorch/issues/165349\n\nBoth of these failure modes interact with the scheduler in a) [DCE (Dead Code Elimination)](https://github.com/pytorch/pytorch/blob/c40048472cc4e28f44e8e5835cae319add231bf5/torch/_inductor/scheduler.py#L2860) and b) [Weak dependency mutation ordering](https://github.com/pytorch/pytorch/blob/c40048472cc4e28f44e8e5835cae319add231bf5/torch/_inductor/scheduler.py#L1102-L1104)\n\n\n#### Problem 2: Limited Mutation Support\n\nMutation has a limited form, mostly on inputs, and aliasing is limited with fallback nodes. \n\nSee related issue: https://github.com/pytorch/pytorch/issues/166009\n\n### Versions\n\nmain\n\ncc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben",
    "url": "https://github.com/pytorch/pytorch/issues/166014",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: inductor"
    ],
    "created_at": "2025-10-21T18:59:09Z",
    "updated_at": "2025-10-21T18:59:31Z",
    "comments": 0,
    "user": "eellison"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27268,
    "title": "[Usage]: failed to infer device type on GCP COS despite nvidia container toolkit installed",
    "body": "### Your current environment\n\nI failed to run this script on GCP COS. \n\n### How would you like to use vllm\n\nI was trying to use VLLM on a Google Cloud (GCP) Container-Optimized OS (COS) instance via Docker. \n\nI followed GCP's [documentation](https://cloud.google.com/container-optimized-os/docs/how-to/run-gpus) to install the nvidia driver, including mapping nvidia driver-related dirs to the Docker container. All tests worked fine. \n\nHowever, when trying to start a VLLM server via Docker, I got the error that `libcuda.so.1` cannot be found and VLLM failed to infer device info. I tried to change the target dirs in the mapping to like `/usr/local/lib`, `/usr/local/cuda/lib`, etc. But no luck. \n\nI also tried adding the flags `--runtime nvidia --gpus all` per [this instruction](https://docs.vllm.ai/en/v0.8.4/deployment/docker.html) but got the error that `Error response from daemon: unknown or invalid runtime name: nvidia.`\n\nIf someone can shed the light of where vllm official Docker image looks for CUDA stuff, it will be greatly appreciated. Thanks in advance. \n\nThe complete command and error: \n```\n$ docker run -v ~/.cache/huggingface:/root/.cache/huggingface     --env \"HUGGING_FACE_HUB_TOKEN=<secret>\"     -p 8010:8000     --ipc=host     vllm/vllm-openai:latest     --model mistralai/Mistral-7B-v0.1\nINFO 10-21 08:13:18 [__init__.py:220] No platform detected, vLLM is running on UnspecifiedPlatform\nWARNING 10-21 08:13:23 [_custom_ops.py:20] Failed to import from vllm._C with ImportError('libcuda.so.1: cannot open shared object file: No such file or directory')\nTraceback (most recent call last):\n  File \"<frozen runpy>\", line 198, in _run_module_as_main\n  File \"<frozen runpy>\", line 88, in _run_code\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/api_server.py\", line 1949, in <module>\n    parser = make_arg_parser(parser)\n             ^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/cli_args.py\", line 263, in make_arg_parser\n    parser = AsyncEngineArgs.add_cli_args(parser)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/engine/arg_utils.py\", line 1714, in add_cli_args\n    parser = EngineArgs.add_cli_args(parser)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/engine/arg_utils.py\", line 919, in add_cli_args\n    vllm_kwargs = get_kwargs(VllmConfig)\n                  ^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/engine/arg_utils.py\", line 281, in get_kwargs\n    return copy.deepcopy(_compute_kwargs(cls))\n                         ^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/engine/arg_utils.py\", line 182, in _compute_kwargs\n    default = field.default_factory()\n              ^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/pydantic/_internal/_dataclasses.py\", line 123, in __init__\n    s.__pydantic_validator__.validate_python(ArgsKwargs(args, kwargs), self_instance=s)\n  File \"/usr/local/lib/python3.12/dist-packages/vllm/config/device.py\", line 58, in __post_init__\n    raise RuntimeError(\nRuntimeError: Failed to infer device type, please set the environment variable `VLLM_LOGGING_LEVEL=DEBUG` to turn on verbose logging to help debug the issue.\n```\n\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27268",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-21T15:24:21Z",
    "updated_at": "2025-10-21T15:24:21Z",
    "comments": 0,
    "user": "forrestbao"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27265,
    "title": "[Usage]: Cannot register custom model (Out-of-Tree Model Integration)",
    "body": "```\n### Your current environment\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flake8==7.1.1\n[pip3] flashinfer==0.1.6+cu124torch2.4\n[pip3] flashinfer-python==0.2.5\n[pip3] mypy-extensions==1.0.0\n[pip3] numpy==1.26.4\n[pip3] nvidia-cublas-cu12==12.4.5.8\n[pip3] nvidia-cuda-cupti-cu12==12.4.127\n[pip3] nvidia-cuda-nvrtc-cu12==12.4.127\n[pip3] nvidia-cuda-runtime-cu12==12.4.127\n[pip3] nvidia-cudnn-cu12==9.1.0.70\n[pip3] nvidia-cufft-cu12==11.2.1.3\n[pip3] nvidia-curand-cu12==10.3.5.147\n[pip3] nvidia-cusolver-cu12==11.6.1.9\n[pip3] nvidia-cusparse-cu12==12.3.1.170\n[pip3] nvidia-cusparselt-cu12==0.6.2\n[pip3] nvidia-ml-py==12.560.30\n[pip3] nvidia-modelopt==0.31.0\n[pip3] nvidia-modelopt-core==0.31.0\n[pip3] nvidia-nccl-cu12==2.21.5\n[pip3] nvidia-nvjitlink-cu12==12.4.127\n[pip3] nvidia-nvtx-cu12==12.4.127\n[pip3] pynvml==12.0.0\n[pip3] pyzmq==26.2.0\n[pip3] sentence-transformers==3.3.1\n[pip3] torch==2.6.0\n[pip3] torch_memory_saver==0.0.6\n[pip3] torchao==0.9.0\n[pip3] torchaudio==2.6.0\n[pip3] torchdata==0.11.0\n[pip3] torchprofile==0.0.4\n[pip3] torchtext==0.18.0\n[pip3] torchvision==0.21.0\n[pip3] transformer_engine_torch==2.3.0\n[pip3] transformers==4.51.1\n[pip3] triton==3.2.0\n[conda] flashinfer                0.1.6+cu124torch2.4          pypi_0    pypi\n[conda] flashinfer-python         0.2.5                    pypi_0    pypi\n[conda] numpy                     1.26.4                   pypi_0    pypi\n[conda] nvidia-cublas-cu12        12.4.5.8                 pypi_0    pypi\n[conda] nvidia-cuda-cupti-cu12    12.4.127                 pypi_0    pypi\n[conda] nvidia-cuda-nvrtc-cu12    12.4.127                 pypi_0    pypi\n[conda] nvidia-cuda-runtime-cu12  12.4.127                 pypi_0    pypi\n[conda] nvidia-cudnn-cu12         9.1.0.70                 pypi_0    pypi\n[conda] nvidia-cufft-cu12         11.2.1.3                 pypi_0    pypi\n[conda] nvidia-curand-cu12        10.3.5.147               pypi_0    pypi\n[conda] nvidia-cusolver-cu12      11.6.1.9                 pypi_0    pypi\n[conda] nvidia-cusparse-cu12      12.3.1.170               pypi_0    pypi\n[conda] nvidia-cusparselt-cu12    0.6.2                    pypi_0    pypi\n[conda] nvidia-ml-py              12.560.30                pypi_0    pypi\n[conda] nvidia-modelopt           0.31.0                   pypi_0    pypi\n[conda] nvidia-modelopt-core      0.31.0                   pypi_0    pypi\n[conda] nvidia-nccl-cu12          2.21.5                   pypi_0    pypi\n[conda] nvidia-nvjitlink-cu12     12.4.127                 pypi_0    pypi\n[conda] nvidia-nvtx-cu12          12.4.127                 pypi_0    pypi\n[conda] pynvml                    12.0.0                   pypi_0    pypi\n[conda] pyzmq                     26.2.0                   pypi_0    pypi\n[conda] sentence-transformers     3.3.1                    pypi_0    pypi\n[conda] torch                     2.6.0                    pypi_0    pypi\n[conda] torch-memory-saver        0.0.6                    pypi_0    pypi\n[conda] torchao                   0.9.0                    pypi_0    pypi\n[conda] torchaudio                2.6.0                    pypi_0    pypi\n[conda] torchdata                 0.11.0                   pypi_0    pypi\n[conda] torchprofile              0.0.4                    pypi_0    pypi\n[conda] torchtext                 0.18.0                   pypi_0    pypi\n[conda] torchvision               0.21.0                   pypi_0    pypi\n[conda] transformer-engine-torch  2.3.0                    pypi_0    pypi\n[conda] transformers              4.51.1                   pypi_0    pypi\n[conda] triton                    3.2.0                    pypi_0    pypi\n\n==============================\n         vLLM Info\n==============================\nROCM Version                 : Could not collect\nvLLM Version                 : 0.8.5.post1\n```\n\n# How would you like to use vllm\n\nHi, I'm trying to integrate a custom multi-modal model (Qwen2_5_VLForConditionalGeneration_Vilavt) using the out-of-tree plugin system, following the official documentation and the vllm_add_dummy_model example.\n\n### The Issue:\n\nThe model loading behavior is inconsistent between single-GPU and multi-GPU (tensor parallel) modes:\n\n- Single-GPU (CUDA_VISIBLE_DEVICES=0): Everything works perfectly. The engine initializes, and I can run inference.\n- Multi-GPU (CUDA_VISIBLE_DEVICES=0,1,2,3): The engine fails to start. Although the logs from VllmWorker processes show that my custom model is successfully registered, the main EngineCore process throws a ValueError, complaining that the model cannot be found.\n\nI've successfully created a package `vllm_vilavt`, installed it with `pip install -e .` , and my `setup.py` correctly points to a register() function in the entry_points.\n\n\nMy `setup.py`:\n```\nfrom setuptools import setup, find_packages\n\nsetup(\n    name=\"vllm_vilavt\",\n    version=\"0.1\",\n    packages=find_packages(),\n    entry_points={\n        \"vllm.general_plugins\":\n        [\"register_vilavt_model = vllm_",
    "url": "https://github.com/vllm-project/vllm/issues/27265",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-21T14:17:17Z",
    "updated_at": "2025-10-25T13:19:40Z",
    "comments": 1,
    "user": "Hyperwjf"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27263,
    "title": "[Responses API] Support tool calling and ouput token streaming",
    "body": "Splitting off from #14721\n\n> FYI a start has been made here https://github.com/vllm-project/vllm/pull/20504\n> \n> That PR (which was merged to `main` on [7/9/2025](https://github.com/vllm-project/vllm/pull/20504#event-18495144925)) explicitly has an unchecked boxes for\n> \n> * [ ] Tool/functional calling support\n> * [ ]  Output token streaming\n> \n> Any plans to implement those features?  I think that is what is needed to support agentic coding tools like codex.  See:\n> \n> * https://docs.vllm.ai/projects/recipes/en/latest/OpenAI/GPT-OSS.html#harmony-format-support \n\n _Originally posted by @bartlettroscoe in [#14721](https://github.com/vllm-project/vllm/issues/14721#issuecomment-3321963360)_",
    "url": "https://github.com/vllm-project/vllm/issues/27263",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-21T12:36:44Z",
    "updated_at": "2025-12-07T01:06:46Z",
    "comments": 4,
    "user": "markmc"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165985,
    "title": "Can I provide a Chinese version of the readme file to submit",
    "body": "### \ud83d\udcda The doc issue\n\nCan I provide a Chinese version of the readme file to submit?\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/165985",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-21T11:32:28Z",
    "updated_at": "2025-10-27T23:04:37Z",
    "comments": 1,
    "user": "wenlinchong17-web"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27252,
    "title": "[Usage]: \u201d@app.post(\"/generate\")\u201c API is support qwen2_vl or not?",
    "body": "### Your current environment\n\ni want tot know \u201d@app.post(\"/generate\")\u201c API support qwen2_vl or not?\n\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27252",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-21T07:30:11Z",
    "updated_at": "2025-10-21T07:30:11Z",
    "comments": 0,
    "user": "wwkww"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2269,
    "title": "how to configure pi0_base to train with single camera dataset",
    "body": "\n\nHi,\nI'm trying to train pi0_base with \"lerobot/aloha_sim_transfer_cube_human\" dataset which has only one camera input \"observation.images.top\". However, pi0 seems to expect three camera inputs:\n\"observation.images.base_0_rgb\",\n\"observation.images.left_wrist_0_rgb\",\n\"observation.images.right_wrist_0_rgb\"\n\n\"ValueError: All image features are missing from the batch. At least one expected. (batch: dict_keys(['action', 'next.reward', 'next.done', 'next.truncated', 'info', 'action_is_pad', 'task', 'index', 'task_index', 'observation.images.top', 'observation.state', 'observation.language.tokens', 'observation.language.attention_mask'])) (image_features: {'observation.images.base_0_rgb': PolicyFeature(type=<FeatureType.VISUAL: 'VISUAL'>, shape=(3, 224, 224)), 'observation.images.left_wrist_0_rgb': PolicyFeature(type=<FeatureType.VISUAL: 'VISUAL'>, shape=(3, 224, 224)), 'observation.images.right_wrist_0_rgb': PolicyFeature(type=<FeatureType.VISUAL: 'VISUAL'>, shape=(3, 224, 224))}) Exception in thread Thread-2 (_pin_memory_loop): Traceback (most recent call last): File \"/root/.local/share/mamba/envs/lerobot/lib/python3.10/threading.py\", line 1016, in _bootstrap_inner\"\n\nIs there a command-line argument I can use to set the single camera input to train with the pi0_base model?\n",
    "url": "https://github.com/huggingface/lerobot/issues/2269",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "dataset"
    ],
    "created_at": "2025-10-21T01:32:50Z",
    "updated_at": "2025-10-21T17:36:17Z",
    "user": "dalishi"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27233,
    "title": "gguf run good",
    "body": "### Your current environment\n\nfrom vllm import LLM, SamplingParams\n\ngguf_path = \"/home/m/Desktop/vllm/vllm/examples/offline_inference/basic/Qwen3-1.7B-GGUF/Qwen3-1.7B-Q6_K.gguf\"\n\nllm = LLM(\n    gguf_path,\n    tokenizer=\"Qwen/Qwen3-1.7B\"\n)\n\nparams = SamplingParams(\n    temperature=0.8,\n    top_p=0.9,\n    top_k=40,\n    max_tokens=200,\n)\n\noutputs = llm.generate([\"Who is Napoleon Bonaparte?\"], params)\nprint(outputs[0].outputs[0].text)\n\n\n### How would you like to use vllm\n\nI want to run inferevenv) m@m-HP-Z440-Workstation:~/Desktop/vllm/vllm/examples/offline_inference/basic$ \n(venv) m@m-HP-Z440-Workstation:~/Desktop/vllm/vllm/examples/offline_inference/basic$ python3\nPython 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> from vllm import LLM, SamplingParams\nINFO 10-21 03:05:39 [__init__.py:216] Automatically detected platform cuda.\n>>> \n>>> gguf_path = \"/home/m/Desktop/vllm/vllm/examples/offline_inference/basic/Qwen3-1.7B-GGUF/Qwen3-1.7B-Q6_K.gguf\"\n>>> \n>>> llm = LLM(\n...     gguf_path,\n...     tokenizer=\"Qwen/Qwen3-1.7B\"\n... )\nINFO 10-21 03:05:41 [utils.py:233] non-default args: {'tokenizer': 'Qwen/Qwen3-1.7B', 'disable_log_stats': True, 'model': '/home/m/Desktop/vllm/vllm/examples/offline_inference/basic/Qwen3-1.7B-GGUF/Qwen3-1.7B-Q6_K.gguf'}\nINFO 10-21 03:06:14 [model.py:547] Resolved architecture: Qwen3ForCausalLM\n`torch_dtype` is deprecated! Use `dtype` instead!\nERROR 10-21 03:06:14 [config.py:278] Error retrieving safetensors: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/home/m/Desktop/vllm/vllm/examples/offline_inference/basic/Qwen3-1.7B-GGUF/Qwen3-1.7B-Q6_K.gguf'. Use `repo_type` argument if needed., retrying 1 of 2\nERROR 10-21 03:06:16 [config.py:276] Error retrieving safetensors: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/home/m/Desktop/vllm/vllm/examples/offline_inference/basic/Qwen3-1.7B-GGUF/Qwen3-1.7B-Q6_K.gguf'. Use `repo_type` argument if needed.\nINFO 10-21 03:06:16 [model.py:1730] Downcasting torch.float32 to torch.bfloat16.\nINFO 10-21 03:06:16 [model.py:1510] Using max model len 32768\nINFO 10-21 03:06:16 [scheduler.py:205] Chunked prefill is enabled with max_num_batched_tokens=8192.\n(EngineCore_DP0 pid=67528) INFO 10-21 03:06:41 [core.py:644] Waiting for init message from front-end.\n(EngineCore_DP0 pid=67528) INFO 10-21 03:06:41 [core.py:77] Initializing a V1 LLM engine (v0.11.0) with config: model='/home/m/Desktop/vllm/vllm/examples/offline_inference/basic/Qwen3-1.7B-GGUF/Qwen3-1.7B-Q6_K.gguf', speculative_config=None, tokenizer='Qwen/Qwen3-1.7B', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=False, dtype=torch.bfloat16, max_seq_len=32768, download_dir=None, load_format=gguf, tensor_parallel_size=1, pipeline_parallel_size=1, data_parallel_size=1, disable_custom_all_reduce=False, quantization=gguf, enforce_eager=False, kv_cache_dtype=auto, device_config=cuda, structured_outputs_config=StructuredOutputsConfig(backend='auto', disable_fallback=False, disable_any_whitespace=False, disable_additional_properties=False, reasoning_parser=''), observability_config=ObservabilityConfig(show_hidden_metrics_for_version=None, otlp_traces_endpoint=None, collect_detailed_traces=None), seed=0, served_model_name=/home/m/Desktop/vllm/vllm/examples/offline_inference/basic/Qwen3-1.7B-GGUF/Qwen3-1.7B-Q6_K.gguf, enable_prefix_caching=True, chunked_prefill_enabled=True, pooler_config=None, compilation_config={\"level\":3,\"debug_dump_path\":\"\",\"cache_dir\":\"\",\"backend\":\"\",\"custom_ops\":[],\"splitting_ops\":[\"vllm.unified_attention\",\"vllm.unified_attention_with_output\",\"vllm.mamba_mixer2\",\"vllm.mamba_mixer\",\"vllm.short_conv\",\"vllm.linear_attention\",\"vllm.plamo2_mamba_mixer\",\"vllm.gdn_attention\",\"vllm.sparse_attn_indexer\"],\"use_inductor\":true,\"compile_sizes\":[],\"inductor_compile_config\":{\"enable_auto_functionalized_v2\":false},\"inductor_passes\":{},\"cudagraph_mode\":[2,1],\"use_cudagraph\":true,\"cudagraph_num_of_warmups\":1,\"cudagraph_capture_sizes\":[512,504,496,488,480,472,464,456,448,440,432,424,416,408,400,392,384,376,368,360,352,344,336,328,320,312,304,296,288,280,272,264,256,248,240,232,224,216,208,200,192,184,176,168,160,152,144,136,128,120,112,104,96,88,80,72,64,56,48,40,32,24,16,8,4,2,1],\"cudagraph_copy_inputs\":false,\"full_cuda_graph\":false,\"use_inductor_graph_partition\":false,\"pass_config\":{},\"max_capture_size\":512,\"local_cache_dir\":null}\n[Gloo] Rank 0 is connected to 0 peer ranks. Expected number of connected peer ranks is : 0\n[Gloo] Rank 0 is connected to 0 peer ranks. Expected number of connected peer ranks is : 0\n[Gloo] Rank 0 is connected to 0 peer ranks. Expected number of connected peer ranks is : 0\n[Gloo] Rank 0 is connected to 0 peer ranks. Expected number of connected peer ranks is : 0\n[Gloo] Rank 0 is connected to 0 peer ranks. Ex",
    "url": "https://github.com/vllm-project/vllm/issues/27233",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-21T00:11:26Z",
    "updated_at": "2025-10-22T00:44:10Z",
    "comments": 12,
    "user": "kmnnmk212-source"
  },
  {
    "repo": "pytorch/xla",
    "number": 9684,
    "title": "RFC: Evolving PyTorch/XLA for a more native experience on TPU",
    "body": "### Motivation\n\nFor many years, `torch_xla` has been the primary way for the community to run PyTorch programs on Cloud TPUs. It has successfully enabled the training of massive models by bringing the power of the XLA compiler to the PyTorch ecosystem.\n\nThe current implementation, while powerful, presents a developer experience that can sometimes feel distinct from \"native\" PyTorch. The reliance on a lazy tensor model and explicit graph tracing (`xm.mark_step`) creates a separation from PyTorch's eager-first philosophy. This can introduce challenges in debugging, complicates integration with the broader PyTorch ecosystem, and requires users to learn a `torch_xla`-specific set of APIs and concepts.\n\nWe believe we can deliver a more seamless and native experience for PyTorch users on TPUs. The goal is to provide the best of both worlds: the interactive, flexible development experience of PyTorch's eager mode and the world-class performance of the XLA compiler for scaled-out workloads.\n\n---\n\n### Proposal: A Native TPU Backend\n\nWe propose a TPU backend for PyTorch that is designed to align with modern PyTorch architecture and eager-first design. The goal is to make a \"native\" device in PyTorch, where `tensor.to('tpu')` feels just as natural and intuitive as `tensor.to('cuda')`. This new direction aims to fully embrace PyTorch's eager mode while still leveraging the powerful XLA compiler for performance-critical code paths.\n\nThe core principles of this new stack are:\n\n1. **XLA**: Similarly to `torch_xla`, our proposal assumes that we can continue to rely on XLA as the underlying compiler infrastructure. However, we would call it in a profoundly different way which enables new techniques and a better user experience. Note that on TPU, compilation is required for the best performance \u2014 but it should be possible to hide the compile times. \n1. **Eager Mode with Deferred Execution**: Similar to standard PyTorch eager mode, ops are being dispatched. However, the new stack can then choose to compile and execute individual ops, shorter or longer sequences of ops, or potential candidates for fusion clusters\u2014all the way up to a full compile of a forward or backward pass. <br />\nCompilation would happen asynchronously, which means compilation of graphs and their execution could overlap, and compilation results would be cached. We would work with the XLA team to further reduce overall compile time overhead with techniques such as persistent deduping and by limiting inlining and unrolling. As a result, the compile time overhead would be drastically minimized even for larger incrementally compiled graphs.\n1. **JIT**: This approach would enable a true just-in-time compilation engine with recompilation, feedback-directed optimizations, autotuning, and active memory management to avoid OOMs. With this, users would get the eager experience but with compiled performance after just a few inferences or training steps.\n\nWith these principles in mind, we could deliver on the following features:\n\n1. **Eager Execution by Default**: As described above, operations will appear as being eagerly executed, just as they do on CPU or GPU, even though they are being compiled in the background with minimal, and mostly hidden, compile time overhead. This would provide a familiar, intuitive, and much easier-to-debug workflow where users can inspect tensors and use standard Python tooling. \n1. **Integration with `torch.compile`**: For maximizing performance, TPU would integrate as a first-class backend for `torch.compile`. This would allow users to get the performance benefits of XLA compilation and TPUs at scale on their performance-critical code with a simple `@torch.compile` decorator. \n1. **Distributed Training via DTensor**: The new backend would natively support PyTorch's distributed APIs. This would allow users to leverage advanced, large-scale distributed training strategies like Fully Sharded Data Parallel (FSDP) and other model parallelism techniques out of the box, making it much simpler to scale up models. \n1. **A More \"PyTorch Native\" Feel**: The end goal is to abstract away the complexities of the underlying compiler. Developing for a TPU should not require a fundamentally different programming model. This would mean moving away from `torch_xla`-specific APIs and toward the standard PyTorch API surface. This approach would provide the best of both worlds: the interactive, flexible development experience of PyTorch's eager mode and the world-class performance of the XLA compiler for scaled-out workloads.\n\n---\n\n### We Want Your Feedback!\n\nWe're excited for this direction, and to bring together PyTorch's eager mode and the XLA compiler in a way that helps the community achieve new levels of performance and scale. This is a significant undertaking, and we want to build it with the community. We're open to feedback on this direction.\n\n- Does this proposal address the pain points you've experienced with `torch_xla?`\n- Are there specific work",
    "url": "https://github.com/pytorch/xla/issues/9684",
    "state": "open",
    "labels": [
      "RFC"
    ],
    "created_at": "2025-10-20T22:12:20Z",
    "updated_at": "2025-12-19T04:58:36Z",
    "comments": 18,
    "user": "qcc4cp"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27228,
    "title": "[Installation]: Compatibility with PyTorch 2.9.0?",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How you are installing vllm\n\nIs there a version of vllm that is compatible with the latest PyTorch release 2.9.0?\n\n```\npip install vllm==0.11.0\npip install torch==2.9.0\n```\n\n```\n$ vllm bench latency --input-len 256 --output-len 256 --model Qwen3/Qwen3-8B --batch-size 1\nterminate called after throwing an instance of 'std::bad_alloc'\n  what():  std::bad_alloc\nAborted (core dumped)\n```\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27228",
    "state": "closed",
    "labels": [
      "installation"
    ],
    "created_at": "2025-10-20T21:10:24Z",
    "updated_at": "2025-10-21T22:40:15Z",
    "comments": 3,
    "user": "andrewor14"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165933,
    "title": "[Distributed] fully_shard: support no_shard (ddp) strategy?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nIt looks like the `fully_shard` API is recommended these days over `torch.distributed.FSDP`. The latter allows a `ShardingStrategy` argument to control the degree of sharding (i.e. zero1/2/3) - this is useful in some cases where we don't want to shard the params, only grads, or not shard anything at all, and just use FSDP for its CPU offload / mixed precision features. \n\nChecking the `fully_shard` docs: https://docs.pytorch.org/docs/stable/distributed.fsdp.fully_shard.html, it appears to support zero-2/HSDP but not `NO_SHARD`. Couple questions:\n\n2) Are there any plans to add no_shard (DDP) support? \n3) If not for (2), would `torch.distributed.FSDP` be supported and recommended for these use cases? \n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci",
    "url": "https://github.com/pytorch/pytorch/issues/165933",
    "state": "open",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2025-10-20T20:48:14Z",
    "updated_at": "2025-10-22T14:44:13Z",
    "comments": 0,
    "user": "rohan-varma"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27208,
    "title": "[Feature]: Upgrade CUDA version to 12.9.1 in docker images",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nThe current builds display warning logs like these\n```\nWarning: please use at least NVCC 12.9 for the best DeepGEMM performance\n```\n\nCan we bump this version easily?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27208",
    "state": "closed",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-10-20T16:08:49Z",
    "updated_at": "2025-10-21T21:20:19Z",
    "comments": 1,
    "user": "jhuntbach-bc"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165909,
    "title": "AWS was down, GHA infrastructure effected / recovering",
    "body": "> NOTE: Remember to label this issue with \"`ci: sev`\"\n>       If you want autorevert to be disabled, keep the ci: disable-autorevert label\n\n <!-- Add the `merge blocking` label to this PR to prevent PRs from being merged while this issue is open -->\n\n## Current Status\n\nMitigated, queues are recovering.\n\nAWS experienced a big outage (https://health.aws.amazon.com/health/status) this morning resulting in most of our GHA infra going down with them.\n\nWe are still in the process of recovering and will update as soon as our services are able to recover.\n\n## Error looks like\n*Provide some way users can tell that this SEV is causing their issue.*\n\n## Incident timeline (all times pacific)\n*Include when the incident began, when it was detected, mitigated, root caused, and finally closed.*\n\n## User impact\n*How does this affect users of PyTorch CI?*\n\n## Root cause\n*What was the root cause of this issue?*\n\n## Mitigation\n*How did we mitigate the issue?*\n\n## Prevention/followups\n*How do we prevent issues like this in the future?*\n",
    "url": "https://github.com/pytorch/pytorch/issues/165909",
    "state": "closed",
    "labels": [
      "ci: sev",
      "ci: sev-mitigated"
    ],
    "created_at": "2025-10-20T15:28:48Z",
    "updated_at": "2025-10-21T16:41:19Z",
    "comments": 0,
    "user": "seemethere"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165907,
    "title": "Feedback on profiler key_averages documentation",
    "body": "### \ud83d\udcda The doc issue\n\nIt would be great to have more documentation on how to use key_averages beyond the Table method. Right now there is no documentation for the EventList and FunctionEventAvg data types.\n\n### Suggest a potential alternative/fix\n\nAdding pages for EventList and FunctionEventAvg classes would be a good start, and it would be nice to have an easy way to create a dataframe from the results.\n\ncc @svekars @sekyondaMeta @AlannaBurke @robieta @chaekit @guotuofeng @guyang3532 @dzhulgakov @davidberard98 @briancoutinho @sraikund16 @sanrise",
    "url": "https://github.com/pytorch/pytorch/issues/165907",
    "state": "closed",
    "labels": [
      "module: docs",
      "actionable",
      "oncall: profiler"
    ],
    "created_at": "2025-10-20T14:56:48Z",
    "updated_at": "2025-11-14T02:03:22Z",
    "comments": 0,
    "user": "alexracape"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2259,
    "title": "Clarifications on fine-tuning on different envs and embodiments",
    "body": "Hi everyone,\nI\u2019m currently working on fine-tuning SmolVLA and \u03c0\u2080 using **[RLBench](https://github.com/stepjam/RLBench)**. The robot setup is a Franka Emika Panda (7DoF + gripper), and I\u2019ve already collected custom LeRobot datasets for a pick-and-place task ([available on my Hugging Face](https://huggingface.co/RonPlusSign)) with 500 demo episodes.\n\nI\u2019ve successfully fine-tuned [OpenVLA](https://github.com/openvla/openvla) using its official repository, where the action space is defined as \u0394EEF pose (Euler rotation) + gripper, and the state as \u0394EEF pose (quaternion rotation) + gripper, using a single observation image (left shoulder), reaching around 22% success rate.\n\nHowever, when trying to fine-tune SmolVLA, despite the training running without issues (loss converges and wandb plots look fine), the evaluation yields 0% success. I suspect I\u2019m misunderstanding how to correctly define the state and action spaces for SmolVLA in this context.\nSince RLBench is not one of the officially supported envs, I created an evaluation script (you can find it [here](https://github.com/RonPlusSign/RLBench/blob/master/test_smolvla.py)), similar to the examples provided in [Robot Learning: A Tutorial](https://github.com/fracapuano/robot-learning-tutorial/blob/main/snippets/ch5/02_using_smolvla.py) (thanks @fracapuano for the amazing work!).\n\n<img width=\"1207\" height=\"393\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/59175cf4-c458-49f3-96b0-e96bc414e333\" />\n\nFor example, I started the finetuning using:\n```sh\npython src/lerobot/scripts/lerobot_train.py \\\n        --policy.path=HuggingFaceVLA/smolvla_libero \\\n        --policy.repo_id=RonPlusSign/smolvla_PutRubbishInBin \\\n        --dataset.repo_id=RonPlusSign/RLBench-LeRobot-v3-PutRubbishInBin \\\n        --batch_size=32  \\\n        --output_dir=outputs/train/smolvla_finetuned_rubbish \\\n        --policy.device=cuda \\\n        --wandb.enable=true \\\n        --save_freq=10000 \\\n        --steps=60000\n```\n\nI also tested smaller finetunings (e.g. 5k, 10k, 20k steps).\n\nHere are some specific points I\u2019d like to clarify:\n\n1. What are the exact action and state spaces used in SmolVLA and \u03c0\u2080 pretraining? (\u0394EEF pose, absolute EEF pose, joint positions, joint velocities, ... and angle representations e.g. quaternion or Euler).\n\n2. Regarding camera inputs: does the naming or number of cameras affect the model performance? Should I stick to the _exact_ names provided in the `config.json` file, such as `observation.images.image` and `observation.images.image2` (front/wrist), similar to pretraining? Or is it fine to use different camera names and/or add extra views? Is there a way to override the existing input and output features or this means that the pretrain would be wasted?\n\n3. The base model [lerobot/smolvla_base](https://huggingface.co/lerobot/smolvla_base) is pretrained on the SO100/SO101 robot, so I assume it might not transfer well to Franka Panda tasks \u2014 is that correct?\n\n4. Would it make more sense to start from a model trained on Franka, e.g. [HuggingFaceVLA/smolvla_libero](https://huggingface.co/HuggingFaceVLA/smolvla_libero), or it's still a different type of embodiment (it seems with 6DoF+gripper, which is not my case)?\n\n5. Are the datasets [HuggingFaceVLA/libero](https://huggingface.co/datasets/HuggingFaceVLA/libero) and/or [HuggingFaceVLA/smol-libero](https://huggingface.co/datasets/HuggingFaceVLA/smol-libero) the ones used for pretraining [HuggingFaceVLA/smolvla_libero](https://huggingface.co/HuggingFaceVLA/smolvla_libero)?\n\n6. In [HuggingFaceVLA/smol-libero](https://huggingface.co/datasets/HuggingFaceVLA/smol-libero) the actions have dimension 7, which doesn\u2019t clearly map to 7 joint angles + gripper. Are these absolute joint positions, EEF poses, or something else? Does LIBERO use a 6DoF or 7DoF Franka setup? If 6DoF, which joint is excluded?\n\nAny guidance on these points (or pointers to where this information is documented) would be very helpful \u2014 I\u2019ve been trying to align my setup with the pretrained models but haven\u2019t found clear references for these details.\n\nThanks a lot for your time and for maintaining this project!",
    "url": "https://github.com/huggingface/lerobot/issues/2259",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "simulation"
    ],
    "created_at": "2025-10-20T13:24:22Z",
    "updated_at": "2025-12-23T10:37:31Z",
    "user": "RonPlusSign"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165902,
    "title": "torchcodec in pytorch url",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nIs it possible to have torchcodec in pytorch url?\npip3 install torch torchvision torchaudio torchcodec--index-url https://download.pytorch.org/whl/cu130\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @seemethere @malfet @atalman",
    "url": "https://github.com/pytorch/pytorch/issues/165902",
    "state": "open",
    "labels": [
      "module: binaries",
      "triaged"
    ],
    "created_at": "2025-10-20T12:11:01Z",
    "updated_at": "2025-10-20T14:27:16Z",
    "comments": 0,
    "user": "johnnynunez"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165900,
    "title": "Converting weights `.pt` content between `dict` and `RecursiveScriptModule`",
    "body": "When using PyTorch inside Isaac Lab to train RL policies, the program saves weights `.pt` file as a Python dict (policy, value, and optimizer keys). It can be further loaded with `torch.load` function.\n\nHowever, Isaac Sim's policy loader expects a `torch.jit._script.RecursiveScriptModule` object to be loaded with `torch.jit.load` and attempting `torch.jit.load` leads to errors like:\n\n`RuntimeError: PytorchStreamReader failed locating file constants.pkl: file not found`\n\nIs there any way to convert between these file content formats? This may be the crucial issue regarding usage of PyTorch inside Isaac Lab / Sim, so I posted the original thread also on their repo if you find this useful: https://github.com/isaac-sim/IsaacLab/issues/3697\n\ncc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel",
    "url": "https://github.com/pytorch/pytorch/issues/165900",
    "state": "open",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2025-10-20T11:25:01Z",
    "updated_at": "2025-10-20T14:27:26Z",
    "comments": 0,
    "user": "PsorTheDoctor"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27184,
    "title": "[Doc]: Multi-Modal Benchmark is too simple",
    "body": "### \ud83d\udcda The doc issue\n\nThe latest doc about Multi-Modal Benchmark shows \uff1a \n- 1\u3001download sharegpt4v_instruct_gpt4-vision_cap100k.json and COCO's 2017 Train images\n- 2\u3001vllm serve and vllm bench serve\nBut there is so much details to concern: \n- 1\u3001delete all json that not is coco`s in sharegpt4v_instruct_gpt4-vision_cap100k.json\n- 2\u3001place COCO's 2017 Train images in /root directory like /train2017/, \n- 3\u3001 vllm serve  --allowed-local-media-path /train2017/ , because vllm use the condition:\n```\nif allowed_local_media_path not in filepath.resolve().parents\n```\n     the ` filepath.resolve().parents` is [\"/train2017\",  \"/\"], so the easiest\u200c  way is to place the images in /train2017/ and set  `--allowed-local-media-path /train2017/`\n\n### Suggest a potential alternative/fix\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27184",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-10-20T06:24:18Z",
    "updated_at": "2025-10-20T16:44:17Z",
    "comments": 2,
    "user": "BigFaceBoy"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27182,
    "title": "[Feature]: INT8 Support in Blackwell Arch",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nhello, I want to use w8a8(int8) in blackwell gpus, and when I read the source code, it says, the int8 is not support by sm120. According to the nvidia-ptx-instructions, blackwell series gpus still have a int8 tensor, is there another way we use w8a8 int8 in rtx5090 by vllm now \n<img width=\"1165\" height=\"1109\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/42546583-4124-4d3c-a1ad-ea3fb19d70cf\" /> \n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27182",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-10-20T06:04:03Z",
    "updated_at": "2025-10-20T06:04:03Z",
    "comments": 0,
    "user": "nhanngoc94245"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2376,
    "title": "Support qwen2_5_vl for ONNX export",
    "body": "### Feature request\n\nI would like to be able to convert [this model](https://huggingface.co/prithivMLmods/DeepCaption-VLA-V2.0-7B) which is based on Qwen 2.5 VL architecture using optimum. Right now, I get the error:\n\n```\nValueError: Trying to export a qwen2_5_vl model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type qwen2_5_vl to be supported natively in the ONNX export.\n```\n\nI read the documentation but I have no idea how I'd go about setting the custom onnx config up.\n\n### Motivation\n\nQwen 2.5 VL is a SOTA architecture that is already being used in downstream models (see my example), so it is worth supporting.\n\n### Your contribution\n\nI can do research but I don't have enough experience with this codebase and ML code to contribute a PR.",
    "url": "https://github.com/huggingface/optimum/issues/2376",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-19T22:08:28Z",
    "updated_at": "2026-01-06T08:03:39Z",
    "comments": 8,
    "user": "ayan4m1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165861,
    "title": "Reflect padding: CUDA errror when one of the batch dimensions is larger than uint16 max value (2**16)",
    "body": "### \ud83d\udc1b Describe the bug\n\nReflect padding breaks when one of the batch dimensions is larger than uint16 max value (2**16).\nThe total memory footprint is not important, as when the tensor holds more numbers, but all but last dimension is within the uint16 range everything is fine. \n\nOther padding modes behave fine, the problem is only with the reflection one.\n\n## why is this important?\n`torch.stft` only accepts 2D tensors (B, L), requiring flattening of higher dimensions into the batch dimension. This commonly produces batch sizes > 65536 for large batches or multi-dimensional audio/signal data.\n\n## reproduce\n```python\nimport torch\nimport torch.nn.functional as F\n\n# these break cuda\nx = torch.rand(2**16, 2, device=\"cuda\")\n# x = torch.rand(1, 2**16, 2, device=\"cuda\")\n# x = torch.rand(2**16, 1, 2, device=\"cuda\")\n\n# these are fine even if the total number of samples is more than 2**16, but not along a single dimension\n# x = torch.rand(2**16 - 1, 200, device=\"cuda\")     # everything ok\n# x = torch.rand(8, 2**16 - 1, 200, device=\"cuda\")  # everything ok\n# x = torch.rand(2**16 - 1, 8, 200, device=\"cuda\")  # everything ok\n\n# x = torch.rand(2, 2**18, device=\"cuda\") # everything ok\n\nF.pad(x, (1, 1), mode=\"constant\")\nprint(\"constant pad ok\")\nF.pad(x, (1, 1), mode=\"circular\")\nprint(\"circular pad ok\")\nF.pad(x, (1, 1), mode=\"replicate\")\nprint(\"replicate pad ok\")\n\nF.pad(x, (1, 1), mode=\"reflect\")\nprint(\"this won't print\")\n```\n\noutput (error message):\n```\nconstant pad ok\ncircular pad ok\nreplicate pad ok\nTraceback (most recent call last):\n  File \"/home/milu10/src/temp/torch-pad-cuda-bug.py\", line 23, in <module>\n    F.pad(x, (1, 1), mode=\"reflect\")\n  File \"/home/milu10/src/temp/.pixi/envs/default/lib/python3.12/site-packages/torch/nn/functional.py\", line 5294, in pad\n    return torch._C._nn.pad(input, pad, mode, value)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ntorch.AcceleratorError: CUDA error: invalid configuration argument\nSearch for `cudaErrorInvalidConfiguration' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information.\nCUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\nFor debugging consider passing CUDA_LAUNCH_BLOCKING=1\nCompile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n```\n\n### Versions\n\n`python collect_env.py`: \n\nCollecting environment information...\nPyTorch version: 2.9.0+cu128\nIs debug build: False\nCUDA used to build PyTorch: 12.8\nROCM used to build PyTorch: N/A\n\nOS: Rocky Linux 9.5 (Blue Onyx) (x86_64)\nGCC version: (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)\nClang version: Could not collect\nCMake version: version 3.26.5\nLibc version: glibc-2.34\n\nPython version: 3.12.12 | packaged by conda-forge | (main, Oct 13 2025, 14:34:15) [GCC 14.3.0] (64-bit runtime)\nPython platform: Linux-5.14.0-503.14.1.el9_5.x86_64-x86_64-with-glibc2.34\nIs CUDA available: True\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to: \nGPU models and configuration: GPU 0: NVIDIA A100-PCIE-40GB\nNvidia driver version: 565.57.01\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        43 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               64\nOn-line CPU(s) list:                  0-63\nVendor ID:                            AuthenticAMD\nModel name:                           AMD EPYC 7502 32-Core Processor\nCPU family:                           23\nModel:                                49\nThread(s) per core:                   1\nCore(s) per socket:                   32\nSocket(s):                            2\nStepping:                             0\nFrequency boost:                      enabled\nCPU(s) scaling MHz:                   97%\nCPU max MHz:                          2500.0000\nCPU min MHz:                          1500.0000\nBogoMIPS:                             4990.34\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthres",
    "url": "https://github.com/pytorch/pytorch/issues/165861",
    "state": "closed",
    "labels": [
      "module: cuda",
      "triaged",
      "module: edge cases"
    ],
    "created_at": "2025-10-19T12:07:23Z",
    "updated_at": "2025-10-22T21:53:53Z",
    "comments": 2,
    "user": "michal-lukomski"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41731,
    "title": "transformers CLI documentation issue ",
    "body": "### System Info\n\n- `transformers` version: 5.0.0.dev0\n- Platform: Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.39\n- Python version: 3.12.9\n- Huggingface_hub version: 1.0.0.rc6\n- Safetensors version: 0.6.2\n- Accelerate version: 1.10.1\n- Accelerate config:    not found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.8.0+cu128 (CUDA)\n- Using distributed or parallel set-up in script?: no\n- Using GPU in script?: yes\n- GPU type: NVIDIA GeForce RTX 3050 Laptop GPU\n\n### Who can help?\n\n@stevhliu \n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] Update the documentation for the transformers-cli\n- [ ] Set the default --fixed flag to \"pipe\" in place of \"infer\" \n\n### Reproduction\n\necho -e \"Plants create [MASK] through a process known as photosynthesis.\" | transformers run --task fill-mask --model google-bert/bert-base-uncased --device 0\n\n(as shown in documentation)\n\n\n**output:-**\n\n<img width=\"1089\" height=\"354\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/0722d782-748b-4ecf-afa9-e4e6dbe67126\" />\n\n\n\n### Expected behavior\n\n\n**output:**\n\n<img width=\"1087\" height=\"287\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1169bfea-8473-48c4-bdd1-f623d16e2f28\" />\n\n\n\n**Fix/updated command:**\n\n echo -e \"Plants create [MASK] through a process known as photosynthesis.\" | transformers run fill-mask --model google-bert/bert-base-uncased --device 0 --format  pipe\n\nThis indicates the current working  format is:-\n\ntransformers run <task_name> --model <model_name> --format <format_name> [options]\n\n**update**\n\nwe could let the default --format flag be \"pipe\" instead of \"infer\" which is deprecated. so we could also write command as follows for most models :-\n \ntransformers run <task_name> --model <model_name>\n\n\n**Action Needed:** (documentation change) \n\nAll documentation for similar models should be updated for the transformer CLI inference \n\nI would like to confirm if my understanding is correct: should I go ahead and raise a PR to update the documentation and set the default as \"pipe\" for --format flag? I am relatively new to open source and would greatly appreciate any guidance or tips you could provide to ensure my contribution is appropriate and follows best practices.\n\n\n\n\n\n\n\n\n",
    "url": "https://github.com/huggingface/transformers/issues/41731",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-19T09:31:46Z",
    "updated_at": "2025-12-22T08:03:09Z",
    "comments": 14,
    "user": "ArjunPimpale"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1947,
    "title": "HuggingChat MoM (Mixture-of-Models) Integration Proposal \ud83e\udd17",
    "body": "# **HuggingChat MoM (Mixture-of-Models) Integration Proposal \ud83e\udd17**\n\n**Status:** Proposal  \n**Date:** 2025-10-19  \n**Version:** 1.0\n**Authors**: vLLM-SR Team\n\n---\n\n## Executive Summary\n\nThis proposal outlines the integration of **vLLM Semantic Router** into HuggingChat as a new **MoM (Mixture-of-Models)** routing option. The integration will enable advanced intelligent routing capabilities including semantic caching, PII detection, and chain-of-thought (CoT) transparency, while maintaining full backward compatibility with the existing Omni (Arch router) implementation.\n\n---\n\n## 1. Motivation\n\n### Current State\n\n- HuggingChat currently supports **Omni** routing via the Arch router (`src/lib/server/router/arch.ts`)\n- Arch router provides basic route selection using LLM-based decision-making\n- Limited visibility into routing decisions and no semantic caching capabilities\n\n### Desired State\n\n- Support **MoM (Mixture-of-Models)** routing via vLLM Semantic Router\n- Enable advanced features: semantic caching, PII detection, intelligent routing\n- Provide transparent chain-of-thought (CoT) information for routing decisions\n- Maintain coexistence of both Omni and MoM routers for gradual rollout\n\n### Business Value\n\n1. **Performance**: Semantic caching reduces latency for repeated queries\n2. **Security**: PII detection protects user privacy\n3. **Transparency**: CoT information builds user trust\n4. **Flexibility**: Users can choose between Omni and MoM routing strategies\n5. **Dashboard Integration**: vLLM-SR dashboard provides monitoring and analytics\n\n### About vLLM Semantic Router\n\n**vLLM Semantic Router** is an intelligent routing system that embodies the **Mixture-of-Models (MoM)** philosophy, with modelName (**MoM**):\n\n```shell\ncurl -X POST http://localhost:8801/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"MoM\",\n    \"messages\": [\n      {\"role\": \"user\", \"content\": \"What is the derivative of x^2?\"}\n    ]\n  }'\n```\n\n- **Intelligent Routing**: Routes requests to the optimal model based on semantic understanding of the query, not just keyword matching\n- **Semantic Caching**: Leverages semantic similarity to cache responses, dramatically reducing latency for similar queries (not just exact matches)\n- **Semantic Chain Architecture**: Evolving toward a composable semantic chain where all stages are orchestrated in an extensible pipeline, enabling future enhancements and custom stage integration in work-in-progress \"SemanticChain\".\n- **Three-Stage Pipeline** (Extensible & Composable):\n  - **Stage 1 - Prompt Guard**: Security-first approach with jailbreak detection and PII protection\n  - **Stage 2 - Router Memory**: Intelligent semantic caching for performance optimization\n  - **Stage 3 - Smart Routing**: Multi-level intelligent routing combining three complementary strategies:\n    - **Domain Understanding**: Semantic classification of queries into domains (math, coding, general, etc.)\n    - **Similarity-Based Routing**: Semantic similarity matching to route similar queries to optimal models\n    - **Keyword-Based Routing**: Keyword pattern matching for explicit intent detection\n    - These three routing strategies work together to provide comprehensive query understanding and optimal model selection\n  - Future stages can be added to the pipeline without disrupting existing functionality\n- **Mixture-of-Models Philosophy**: Recognizes that no single model is optimal for all tasks. By intelligently routing different types of queries to different specialized models, it achieves:\n  - Better accuracy through task-specific model selection\n  - Cost optimization by using smaller models for simple tasks\n  - Performance improvement through semantic understanding\n  - Transparency via chain-of-thought visibility\n- **Production-Ready**: Battle-tested with comprehensive error handling, monitoring, and dashboard support\n- **Open Source**: vLLM Community-driven development with active maintenance and feature additions\n\n---\n\n## 2. Goals\n\n### Primary Goals\n\n- \u2705 Integrate vLLM Semantic Router as a new MoM routing option\n- \u2705 Extract and store chain-of-thought (CoT) metadata from vLLM-SR responses\n- \u2705 Support both Omni and MoM routers coexisting in the same system\n- \u2705 Expose CoT information to frontend for visualization\n\n### Secondary Goals\n\n- \u2705 Support A/B testing between Omni and MoM routers\n- \u2705 Integrate with vLLM-SR dashboard for monitoring\n\n---\n\n## 3. Non-Goals\n\n- \u274c Replace Omni router entirely (maintain coexistence)\n- \u274c Modify vLLM Semantic Router codebase\n- \u274c Implement custom semantic caching in HuggingChat (use vLLM-SR's caching)\n- \u274c Create new dashboard (integrate with existing vLLM-SR dashboard)\n- \u274c Support non-OpenAI-compatible endpoints for MoM\n\n---\n\n## 4. Design Principles\n\n### 1. **Backward Compatibility**\n\n- Existing Omni router functionality remains unchanged\n- No breaking changes to current APIs or configurations\n- Both routers can be configured independently\n\n### 2. **Transparency**\n\n- CoT inf",
    "url": "https://github.com/huggingface/chat-ui/issues/1947",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-10-19T08:17:14Z",
    "updated_at": "2025-10-20T11:12:30Z",
    "comments": 3,
    "user": "Xunzhuo"
  },
  {
    "repo": "pytorch/xla",
    "number": 9681,
    "title": "Improve PyTorch/XLA Documentation and Clarify SPMD Usage",
    "body": "## \ud83d\udcda Documentation\n\n### [Feature Request / Documentation Improvement] Improve PyTorch/XLA Documentation and Clarify SPMD Usage\n\nHello PyTorch/XLA team,\n\nDuring my TPU grant I encountered many undocumented pitfalls and unclear behaviors, which made the setup process very time-consuming and confusing.\n\nI\u2019d like to ask for clarification and improvement on several key points that caused me significant confusion and wasted time.  \nPerhaps the documentation seems clear to experienced users, but when reading it for the first time, there are many implicit assumptions and missing explanations.\n\n---\n\n### General Request\nPlease improve the documentation \u2014 make it more **explicit** and **practical**, especially for multi-host and SPMD setups.  \n\nFor example, while it\u2019s indeed mentioned in the [*Running on TPU Pods*](https://docs.pytorch.org/xla/master/learn/pytorch-on-xla-devices.html#running-on-tpu-pods) section that the code must be launched on all hosts, this information is **buried too deep** and is **not referenced** in other critical sections like \u201cTroubleshooting Basics.\u201d  \nIt would be much clearer if you placed a visible note near the top of documentation saying something like:\n\n> \u26a0\ufe0f For multi-host TPU setups, you must launch the code on all hosts simultaneously.  \n> See [Running on TPU Pods (multi-host)](...) for details.\n\nThis would help avoid confusion, since right now it\u2019s easy to miss and leads to situations where the code just hangs with no clear reason.\n\n---\n\n### Specific Questions and Issues\n\n1. What is recommended to use \u2014 `.launch` or `spmd`?  \n2. Should SPMD be started on all hosts as well?  \n3. In SPMD, is the batch size **global** or **per-host**?  \n   - How is data distributed if each process sees all devices and I have 4 hosts with 4 devices each?  \n   - If the batch size is global, what is the purpose of having multiple hosts? Only for data loading?  \n   - How does XLA decide what data goes to which device \u2014 does it shard across all devices globally or only locally per host?  \n4. How to correctly use `scan/scan_layers` if the transformer block takes multiple arguments and one of them is of type `torch.bool`?  \n5. `assume_pure` seems to break if the model contains `nn.Parameter`. Is it even correct to use it like that?  \n   - Can I reuse \u201cparams and buffers\u201d between steps, or should I retrieve them every time before a training pass?  \n6. `syncfree.AdamW(model.parameters(), lr=lr, betas=(0.9, 0.95), weight_decay=0)` seems to trigger recompilation around step ~323 (possibly due to `beta2`, not sure).  \n7. In SPMD, how to correctly get the process ID? `world_size` and `global_ordinal` don\u2019t work. Should I use `process_index`? `is_master_ordinal(local=False)` also doesn\u2019t work.  \n8. Please add a note to the docs: when logging, it\u2019s better to use `flush=True`, otherwise logs might not appear (which is confusing). Also, wrap training code in `try/except`, since exceptions sometimes don\u2019t log either.  \n9. How can I perform **sampling and logging** in SPMD mode if I want **only one host** to handle these tasks (not all hosts)?  \n10. Please provide **fully explicit examples** \u2014 with comments, no abstractions, step-by-step explanations of what each part does and how it can be modified.  \n11. Compilation caching seems broken \u2014 when trying to load, it says \u201cnot implemented.\u201d  \n12. Can I pass only one `input_sharding=xs.ShardingSpec(mesh, ('fsdp', None))` to `MpDeviceLoader` if my dataset returns a tuple of 10 tensors with different shapes?  \n13. `xm.rendezvous` seems to do nothing in SPMD mode (at least before the training loop).  \n14. How to verify that all hosts are actually training **one shared model**, and not each training separately?  \n15. In the docs, `HybridMesh(ici_mesh_shape, dcn_mesh_shape, ('data','fsdp','tensor'))` is shown,  \n    but in practice it only works if you pass named arguments like `ici_mesh_shape=ici_mesh_shape`, otherwise it errors out.  \n16. How to correctly do **gradient checkpointing** per layer with FSDP?  \n17. How to correctly do **gradient clipping**?  \n18. If model weights are expected to remain in FP32 when using `autocast`, please **explicitly state that in the training docs** \u2014 it would help avoid second-guessing.  \n19. What is a **reasonable compilation time** during training? Mine can take **20\u201330 minutes**.\n20. What are the actual intended purposes of `torch_xla.step()` and `torch_xla.compile()`?  \n    - Since PyTorch/XLA already compiles and executes lazily, it\u2019s unclear when and why these should be used explicitly.  \n\n---\n\nAll of this was tested on `v4-32 TPU`.  \nMaybe some of it is covered somewhere in the docs and I just missed it, but I hope you can clarify and improve the documentation.\n\nThank you for your time and support.\n",
    "url": "https://github.com/pytorch/xla/issues/9681",
    "state": "open",
    "labels": [
      "distributed",
      "documentation"
    ],
    "created_at": "2025-10-19T04:58:44Z",
    "updated_at": "2025-10-20T13:27:34Z",
    "comments": 1,
    "user": "Muinez"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1877,
    "title": "encode bytes directly",
    "body": "Is there a way to directly encode bytes with a bpe based HF tokenizer without having to decode the string first? ",
    "url": "https://github.com/huggingface/tokenizers/issues/1877",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-19T03:30:39Z",
    "updated_at": "2025-11-28T07:43:18Z",
    "comments": 2,
    "user": "tsengalb99"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27154,
    "title": "[Installation]: How to reduce the vllm image",
    "body": "### Your current environment\n\nHi,\n\nI looked at docker pull vllm/vllm-openai:latest \u2014 the image is around 12 GB. I\u2019m exploring ways to reduce the vLLM image size specifically for NVIDIA L40s (i use linux amd64). any ideas?\ndoes building vllm from source help to reduce the image?\n\nHere\u2019s what I\u2019ve tried so far (but not sure how to install flashinfer):\n```\nFROM nvidia/cuda:12.1.0-runtime-ubuntu22.04\n\n# Install Python and pip\nRUN apt-get update && apt-get install -y python3 python3-pip && \\\n    apt-get clean && rm -rf /var/lib/apt/lists/*\n\n# Install only vLLM and production dependencies\nRUN pip3 install --no-cache-dir vllm\n\n# Set CUDA arch for A100 (8.0)\nENV TORCH_CUDA_ARCH_LIST=\"8.9+PTX\"\n\n# Expose API port\nEXPOSE 8000\n\nENTRYPOINT [\"python3\", \"-m\", \"vllm.entrypoints.openai.api_server\"]\n```\n\nmore infos:\nhttps://discuss.vllm.ai/t/current-vllm-docker-image-size-is-12-64gb-how-to-reduce-it/1204/4\nhttps://docs.vllm.ai/en/latest/deployment/docker.html#building-vllm-s-docker-image-from-source\npr: https://github.com/vllm-project/vllm/pull/22377\n\n### How you are installing vllm\n\n```sh\npip install -vvv vllm\n```\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27154",
    "state": "open",
    "labels": [
      "installation"
    ],
    "created_at": "2025-10-18T17:52:07Z",
    "updated_at": "2025-10-20T17:45:39Z",
    "comments": 4,
    "user": "geraldstanje"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27153,
    "title": "[Feature]: Allow vllm bench serve in non-streaming mode with /completions API",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nvLLM\u2019s bench serve currently supports recording benchmark results only in the streaming mode - recording metrics like TTFT, TPOT, ITL etc. For my use case benchmarking [llm-d ](https://github.com/llm-d/llm-d)which uses vLLM, I would like to enable vllm bench serve in non-streaming mode for the openai backend, recording only non-streaming latency metrics like E2E Latency. Overall, the changes required would be as follows:\n\n* Add a new Async Request Function - `async_request_openai_completions_non_streaming()` function in [`vllm/vllm/benchmarks/lib/endpoint_request_func.py`](https://github.com/vllm-project/vllm/blob/main/vllm/benchmarks/lib/endpoint_request_func.py) to support parsing of non-streaming vllm outputs.\n\n* Add a new benchmark argument: `benchmark_streaming`. If `benchmark_streaming` is set to False for the `openai` backend, then the above function `async_request_openai_completions_non_streaming()` is called instead of `async_request_openai_completions`.\n\n* Either modify [`vllm/benchmarks/serve.py`](https://github.com/vllm-project/vllm/blob/main/vllm/benchmarks/serve.py) or design a new benchmark script to calculate and save metrics, excluding streaming-only metrics like TTFT, TPOT and ITL.\n\nHappy to discuss and create PRs for the above implementation. Looking forward to thoughts and feedback.\n\n### Alternatives\n\nAnother option I'm considering is using [benchmark_throughput.py](https://github.com/vllm-project/vllm/blob/main/benchmarks/benchmark_throughput.py). However, it relies on the offline LLM library which does not serve my use-case of benchmarking the vllm server in non-streaming mode.\n\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27153",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-10-18T17:47:44Z",
    "updated_at": "2025-10-18T20:50:49Z",
    "comments": 0,
    "user": "susiejojo"
  },
  {
    "repo": "huggingface/candle",
    "number": 3137,
    "title": "Strategic Discussion: Flicker's Hybrid Architecture for Lightweight Inference + Advanced Training",
    "body": "# Strategic Discussion: Flicker's Hybrid Architecture Evolution\n\n## Overview\nThis issue proposes a comprehensive strategic discussion about flicker's positioning and architecture evolution. The detailed proposal is documented in `STRATEGIC_DISCUSSION_PROPOSAL.md`.\n\n## Context\nDuring analysis of flicker's capabilities vs PyTorch, a critical strategic question emerged: Should flicker be primarily a **lightweight inference engine** or evolve into a **comprehensive training framework**?\n\n## Proposed Solution: Hybrid Architecture\nInstead of choosing one direction, we propose a dual-track approach:\n- **flicker-core**: Lightweight inference (current focus)  \n- **flicker-train**: Advanced training features\n- **Feature Gates**: Granular control for specific capabilities\n\n## Key Strategic Questions\n\n### 1. Technical Feasibility\n- Is zero-copy gradient system feasible with Rust ownership?\n- How do we implement compile-time training validation?\n- What's the best approach for async-distributed training?\n\n### 2. Market Positioning  \n- Does hybrid approach make sense for flicker's goals?\n- How do we balance inference vs training development resources?\n- Will this attract both inference and training users?\n\n### 3. Implementation Priority\n- Which advanced training features should we implement first?\n- How do we ensure seamless transition from inference to training?\n- What performance targets should we set vs PyTorch?\n\n## Revolutionary Differentiators\nThe proposal identifies 4 major areas where Rust could revolutionize ML:\n1. **Zero-Copy Gradient Systems** - Gradients as views, not copies\n2. **Compile-Time Training Validation** - Catch training errors at compile time  \n3. **Async-First Training Infrastructure** - True concurrency without GIL\n4. **SIMD-Optimized Research Features** - Hand-optimized kernels impossible in Python\n\n## Benefits\n\u2705 Preserves current lightweight inference advantages\n\u2705 Enables advanced training capabilities unique to Rust  \n\u2705 Creates natural upgrade path for users\n\u2705 Positions flicker as both practical tool and research platform\n\n## Next Steps\n1. **Enable GitHub Discussions** to facilitate community input\n2. **Review detailed proposal** in `STRATEGIC_DISCUSSION_PROPOSAL.md`\n3. **Gather feedback** from community on strategic direction\n4. **Validate technical feasibility** of proposed features\n5. **Create implementation roadmap** based on consensus\n\n## Discussion Document\n\ud83d\udccb **Full Proposal**: See `STRATEGIC_DISCUSSION_PROPOSAL.md` for comprehensive analysis including:\n- Current state analysis\n- PyTorch comparison\n- Technical implementation details\n- Code examples of revolutionary features\n- Trade-offs and considerations\n- Community input questions\n\n## Call for Input\nThis represents a potential major evolution for flicker. Community input is essential to validate:\n- Strategic direction alignment with user needs\n- Technical feasibility of proposed features  \n- Implementation priority and resource allocation\n- Market positioning effectiveness\n\n**Please review the detailed proposal and share your thoughts on flicker's strategic future.**\n\n---\n*This issue will be converted to a GitHub Discussion once discussions are enabled on the repository.*",
    "url": "https://github.com/huggingface/candle/issues/3137",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-18T17:27:24Z",
    "updated_at": "2025-10-21T16:18:51Z",
    "comments": 1,
    "user": "jagan-nuvai"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2245,
    "title": "release 0.4.0 and torch 2.8.0",
    "body": "Hello Lerobot Team! :) \nQuick question, do you have a time estimate for:\n\n- lerobot release 0.4.0 (ie next stable release using the new v30 data format)\n- bumping torch to 2.8 \n\nThanks a lot in advance!\n",
    "url": "https://github.com/huggingface/lerobot/issues/2245",
    "state": "closed",
    "labels": [
      "question",
      "dependencies"
    ],
    "created_at": "2025-10-18T16:57:07Z",
    "updated_at": "2025-10-19T18:34:47Z",
    "user": "antoinedandi"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1920,
    "title": "Potentially incorrect attention flop calculation due to wrong head_dim?",
    "body": "### Bug description\n\nhttps://github.com/pytorch/torchtitan/blob/a8899e4b2cab74eadbe4b9a2ca2776ceb8829db3/torchtitan/models/utils.py#L432-L437\n\nHowever, `head_dim` is not necessarily equal to `dim / n_heads`\n\ne.g. Qwen3-4B, dim=2560, n_heads=32, head_dim=128\n\n### Versions\n\nlatest main",
    "url": "https://github.com/pytorch/torchtitan/issues/1920",
    "state": "closed",
    "labels": [
      "high priority",
      "triage review"
    ],
    "created_at": "2025-10-18T15:56:57Z",
    "updated_at": "2025-10-29T22:03:17Z",
    "comments": 4,
    "user": "gau-nernst"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165836,
    "title": "[ROCm][CI] Machines under the label linux.rocm.gpu.2 are undergoing maintenance.",
    "body": "> NOTE: Remember to label this issue with \"`ci: sev`\"\n>       If you want autorevert to be disabled, keep the ci: disable-autorevert label\n\n <!-- Add the `merge blocking` label to this PR to prevent PRs from being merged while this issue is open -->\n\n## Current Status\n*Status could be: preemptive, ongoing, mitigated, closed. Also tell people if they need to take action to fix it (i.e. rebase)*.\nongoing\n\n## Error looks like\n*Provide some way users can tell that this SEV is causing their issue.*\nWe may expect higher queue times for PyTorch ROCm linux.rocm.gpu.2 workflows.\n\n\n## Incident timeline (all times pacific)\n*Include when the incident began, when it was detected, mitigated, root caused, and finally closed.*\n10/18/2025\n\n## User impact\n*How does this affect users of PyTorch CI?*\nWe may expect higher queue times for PyTorch ROCm linux.rocm.gpu.2 workflows.\n\n\n## Root cause\n*What was the root cause of this issue?*\nMaintenance\n\n## Mitigation\n*How did we mitigate the issue?*\nWill be resolve by EOD 10/19/2025\n\n## Prevention/followups\n*How do we prevent issues like this in the future?*\nN/A\n\n\ncc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang @naromero77amd",
    "url": "https://github.com/pytorch/pytorch/issues/165836",
    "state": "closed",
    "labels": [
      "module: rocm",
      "ci: sev"
    ],
    "created_at": "2025-10-18T12:54:28Z",
    "updated_at": "2025-10-20T16:09:25Z",
    "comments": 0,
    "user": "amdfaa"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2242,
    "title": "Is it no longer possible to fine-tune the previously used \u03c00 model?",
    "body": "I previously trained a model using the following command for fine-tuning:\n\n`lerobot-train --dataset.repo_id=parkgyuhyeon/slice-clay --policy.path=lerobot/pi0 --output_dir=outputs/train/pi0_slice-clay --job_name=pi0_slice-clay --policy.device=cuda --wandb.enable=false --wandb.project=lerobot --log_freq=10 --steps=50000 --policy.repo_id=parkgyuhyeon/pi0_slice-clay --policy.push_to_hub=false`\n\n\nHowever, after the release of \u03c00.5, I noticed that the new example command includes additional arguments like:\n\n```\n--policy.repo_id=your_repo_id \\\n--policy.compile_model=true \\\n--policy.gradient_checkpointing=true \\\n--policy.dtype=bfloat16 \\\n```\n\n\nIt seems that some new options have been added.\nDoes this mean the model I fine-tuned earlier using \u03c00 can no longer be used?",
    "url": "https://github.com/huggingface/lerobot/issues/2242",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-10-18T08:42:35Z",
    "updated_at": "2025-10-20T00:18:03Z",
    "user": "pparkgyuhyeon"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2239,
    "title": "Models trained using openpi pi0.5 on Lerobot's pi0.5",
    "body": "Hi, can I check if models trained using the [pytorch port of openpi's pi0.5](https://github.com/Physical-Intelligence/openpi?tab=readme-ov-file#pytorch-support) are compatible with lerobot's defination of pi0.5?\n\nThanks!",
    "url": "https://github.com/huggingface/lerobot/issues/2239",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-10-18T02:01:45Z",
    "updated_at": "2025-10-18T10:54:06Z",
    "user": "brycegoh"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165811,
    "title": "[RFC] A Python backend registration API",
    "body": "In this dev post (https://dev-discuss.pytorch.org/t/embrace-tensor-subclass-as-a-python-device-registration-api/2771) I have talked about creating a PyTorch backend purely in Python. After chatting with few folks (@FFFrog @gabrieldemarmiesse), we decided that it's a good idea to formalize APIs around registering Backend in Python.\n\nPlease take a look, looking forward on any feedbacks. \nhttps://github.com/pytorch/rfcs/pull/83\n\nThanks!\n\ncc @bdhirsh @albanD",
    "url": "https://github.com/pytorch/pytorch/issues/165811",
    "state": "open",
    "labels": [
      "triaged",
      "module: backend",
      "module: python frontend"
    ],
    "created_at": "2025-10-18T00:46:37Z",
    "updated_at": "2025-10-27T17:28:37Z",
    "comments": 1,
    "user": "qihqi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165799,
    "title": "`torch.where` does not accept scalar argument when `out=` is passed",
    "body": "### \ud83d\udc1b Describe the bug\n\n`torch.where` accepts scalar arguments as per documentation. This works fine for the most part, but when the `out` argument is provided, then a `TypeError` is raise complaining that scalar arguments are not accepted.\n\nTo reproduce the error, run\n```\nimport torch\nx = torch.tensor([1.0, 2.0])\ncond = torch.tensor([True, False])\nprint(torch.where(cond, x, 3.0))  # works fine, prints `tensor([1., 3.])`\nprint(torch.where(cond, x, 3.0, out=x))\n```\nwhich raises error\n```\nTraceback (most recent call last):\n  File \"<stdin>\", line 1, in <module>\nTypeError: where(): argument 'other' (position 3) must be Tensor, not float\n```\nI have tested this both on Linux and MacOS.\n\n### Versions\n\n```\nPyTorch version: 2.9.0\nIs debug build: False\nCUDA used to build PyTorch: None\nROCM used to build PyTorch: N/A\n\nOS: macOS 15.6.1 (arm64)\nGCC version: Could not collect\nClang version: 12.0.0 (clang-1200.0.32.28)\nCMake version: version 3.31.3\nLibc version: N/A\n\nPython version: 3.11.11 | packaged by conda-forge | (main, Mar  3 2025, 20:44:07) [Clang 18.1.8 ] (64-bit runtime)\nPython platform: macOS-15.6.1-arm64-arm-64bit\nIs CUDA available: False\nCUDA runtime version: No CUDA\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: No CUDA\nNvidia driver version: No CUDA\ncuDNN version: No CUDA\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nApple M1 Pro\n\nVersions of relevant libraries:\n[pip3] numpy==2.2.4\n[pip3] torch==2.9.0\n[conda] numpy                     2.2.4                    pypi_0    pypi\n[conda] torch                     2.9.0                    pypi_0    pypi\n```\n\ncc @albanD",
    "url": "https://github.com/pytorch/pytorch/issues/165799",
    "state": "open",
    "labels": [
      "triaged",
      "module: python frontend"
    ],
    "created_at": "2025-10-17T22:30:10Z",
    "updated_at": "2025-10-19T19:21:34Z",
    "user": "hchau630"
  },
  {
    "repo": "pytorch/executorch",
    "number": 15222,
    "title": "How to support custom LLMs with qualcomm backend?",
    "body": "``examples/qualcomm/oss_scripts/llama/llama.py`` gives an example on how to export LLMs. \n\nI would like to know if there are any guidelines for supporting custom LLMs with architectures similar to LLaMA. Specifically, I have a huggingface-style checkpoint folder. \n\ncc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @cbilgin",
    "url": "https://github.com/pytorch/executorch/issues/15222",
    "state": "closed",
    "labels": [
      "partner: qualcomm",
      "module: qnn"
    ],
    "created_at": "2025-10-17T15:22:28Z",
    "updated_at": "2025-10-30T21:20:11Z",
    "user": "xiaoxiaosuaxuan"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2228,
    "title": "Trossen WidowX AI model, depth cameras and tests",
    "body": "Hi,\n\nWould you be open to receive pull requests to support more recent trossen robotics setups as well as depth cameras? I think for the robot part the pattern is quite well established. For depth cameras we solved it by tweaking a bit the dataset utils.\n\nOur implementation is fairly tested.",
    "url": "https://github.com/huggingface/lerobot/issues/2228",
    "state": "closed",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-10-17T09:32:22Z",
    "updated_at": "2025-10-31T19:15:25Z",
    "user": "lromor"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27090,
    "title": "[Usage]: Does vLLM support a data-parallel group spanning multiple nodes when starting an online service?",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nDoes vLLM support a data-parallel group spanning multiple nodes when starting an online service?\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27090",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-17T09:15:04Z",
    "updated_at": "2025-10-20T02:37:19Z",
    "comments": 2,
    "user": "KrisLu999"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27086,
    "title": "[Bug]: After enabling P-D Disaggregation, the final output results are not entirely identical.",
    "body": "### Your current environment\n\nvllm VERSION\uff1a 0.10.1\n\n### \ud83d\udc1b Describe the bug\n\nWhen I fixed the random seed and ensured all environment variables were consistent, I noticed that launching PD separation with the same configuration produced inconsistent final outputs. This phenomenon may require multiple attempts to fully manifest. I have a question: Is this behavior normal? (under temperature=0 conditions)\n\nvllm startup script \uff08D\uff09\uff0cThe startup process for P nodes is almost identical, except for the use of \u201ckv_producer\u201d.\n```\nVLLM_CFG=(\n    --trust-remote-code\n    --data-parallel-size 1\n    --tensor-parallel-size 8\n    --no-enable-prefix-caching\n    --no-enable-chunked-prefill\n    --kv-transfer-config '{\"kv_connector\":\"NixlConnector\",\"kv_role\":\"kv_consumer\"}'\n)\n```\n\nWhen requested, temperature=0\n```\ncurl -X POST -s http://${HOST_PORT}/v1/completions \\\n-H \"Content-Type: application/json\" \\\n-d '{\n    \"model\": \"base_model\",\n    \"prompt\": \"xxxx\",              # The prompt is identical for every request, and this prompt will also appear.\n    \"max_tokens\": 1000,\n    \"temperature\": 0,\n    \"stream\": true\n}'\nprintf \"\\n\"\n```\n\nMy question is: Does the PD also have a probability of producing non-identical outputs at every step when temperature=0?  If this is a normal phenomenon, what causes it? If this is a bug, what might be causing it?\n\nLooking forward to your responses. Thank you.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27086",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-17T07:56:41Z",
    "updated_at": "2025-10-20T09:16:21Z",
    "comments": 4,
    "user": "freedom-cui"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2227,
    "title": "How to easily run inference with a trained model",
    "body": "Hello, and thank you for sharing such an inspiring project!\n\nI\u2019m currently working with a 7-DoF robotic arm (6 joint axes + 1 gripper) and generating datasets through video recordings for training on smolVLA. Since there\u2019s still some ongoing engineering work related to dataset generation, I\u2019d like to start by understanding how the inference pipeline is implemented.\n\nI have successfully verified the training workflow using the  [lerobot/svla_so100_pickplace](https://huggingface.co/datasets/lerobot/svla_so100_pickplace) dataset and produced a trained model. Now, I\u2019m wondering if there is a way to quickly load the trained model and perform inference, similar to how OpenVLA provides a simple demo on Hugging Face \u2014 where the model can be loaded and tested with just a few lines of code.\n\nFor OpenVLA example:\n```\nfrom transformers import AutoModelForVision2Seq, AutoProcessor\nfrom PIL import Image\nimport torch\n\n# Load Processor & VLA\nprocessor = AutoProcessor.from_pretrained(\"openvla/openvla-7b\", trust_remote_code=True)\nvla = AutoModelForVision2Seq.from_pretrained(\n    \"openvla/openvla-7b\", \n    attn_implementation=\"flash_attention_2\",  # [Optional] Requires `flash_attn`\n    torch_dtype=torch.bfloat16, \n    low_cpu_mem_usage=True, \n    trust_remote_code=True\n).to(\"cuda:0\")\n\n# Grab image input & format prompt\nimage: Image.Image = get_from_camera(...)\nprompt = \"In: What action should the robot take to {<INSTRUCTION>}?\\nOut:\"\n\n# Predict Action (7-DoF; un-normalize for BridgeData V2)\ninputs = processor(prompt, image).to(\"cuda:0\", dtype=torch.bfloat16)\naction = vla.predict_action(**inputs, unnorm_key=\"bridge_orig\", do_sample=False)\n\n# Execute...\nrobot.act(action, ...)\n```\nI would be very grateful if you could share any related information or references.",
    "url": "https://github.com/huggingface/lerobot/issues/2227",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-10-17T05:41:15Z",
    "updated_at": "2025-12-16T02:57:00Z",
    "user": "Biz-Joe"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1903,
    "title": "Promlem with converting dcp ceckpoint to huggingface format",
    "body": "Hi ! I started a run with Llama_3_8b and saved the DCP checkpoint of step 0 (the original model). Then I used https://github.com/pytorch/torchtitan/blob/main/scripts/checkpoint_conversion/convert_to_hf.py\nto convert the step-0 DCP checkpoint into .safetensors files, and copied the config.json and tokenizer from meta-llama/Llama-3.1-8B. Then I used the converted checkpoint to generate simple test but got unreadable results.\nThe result and the code for generation:\n\n<img width=\"824\" height=\"167\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/322bbf60-79e1-43ed-b037-ce1d7af10d2e\" />\n\n<img width=\"425\" height=\"489\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/4406ea79-96c6-4320-9792-5dc9f52f6063\" />\n\nI wander if the issue is caused by incorrect config.json ?  Thanks a lot !",
    "url": "https://github.com/pytorch/torchtitan/issues/1903",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-10-17T03:00:52Z",
    "updated_at": "2025-10-17T05:04:22Z",
    "user": "kv-wang"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2224,
    "title": "Can i just modify the json the pretrained policy to adapt it to my own robot?",
    "body": "I just want to know if i can just modify the config json(shape of state, size of image .etc) to adapt the model to inference in my modified robot(have different number of feetect and different image resolution)?",
    "url": "https://github.com/huggingface/lerobot/issues/2224",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-10-17T01:33:32Z",
    "updated_at": "2025-10-20T16:40:26Z",
    "user": "shs822"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1900,
    "title": "checkpoint.initial_load_in_hf should overwrite everything and load from hf weights.",
    "body": "### Bug description\n\nI have a `checkpoint` folder and I set `initial_load_in_hf: true` in yaml config like [this](https://github.com/meta-pytorch/forge/blob/main/apps/grpo/qwen3_1_7b.yaml#L78), when running `python -m apps.grpo.main --config apps/grpo/qwen3_1_7b.yaml`, I will get the error `step-1` not found. From the log I saw the warning :\n```\n[0] WARNING checkpoint.initial_load_path is provided but the checkpoint.folder exists. Checkpointer will use the checkpoints from the checkpoint.folder checkpoint.\n[0] WARNING checkpoint.initial_load_in_hf is True but the checkpoint.folder exists. Checkpointer will not load from HF safetensors\n```\nLooking closer, I noticed that `If the checkpoint folder for the current run is not empty, located at {--job.dump_folder}/{--checkpoint.folder}` at this [line](https://github.com/pytorch/torchtitan/blob/main/torchtitan/config/job_config.py#L464). Since the checkpoint.folder will by default be `checkpoints`, it will  check if `checkpoints` folder exist or not and try to search from `checkpoints` folder.. totally ignore the setting `initial_load_in_hf: true`.\n\nI hope we can change it so that when `initial_load_in_hf=True` , it will load from HF weights not matter if `checkpoint.folder` exist or not. This is more user-friendly as the user already configured explicitly `initial_load_in_hf=True` and expect the program to load from HF weights.\n\n### Versions\n\nLatest main",
    "url": "https://github.com/pytorch/torchtitan/issues/1900",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-10-16T21:08:59Z",
    "updated_at": "2025-10-16T21:33:32Z",
    "user": "wukaixingxp"
  },
  {
    "repo": "pytorch/xla",
    "number": 9679,
    "title": "PJRT Computation Client Teardown Function",
    "body": "## \u2753 Questions and Help\n\nIs there a teardown function that can be hooked from PJRT Plugin implementers for system teardown purposes? For example, graceful device closure at session termination?\n\nIt seems like the PJRT Computation Client is instantiated with a [leaky singleton](https://github.com/pytorch/xla/blob/d291621f583574f575888da33eaabe866056592c/torch_xla/csrc/runtime/runtime.cpp#L58-L60) pattern, so its destructor is not called, and we cannot leverage our PJRT Client's destructor.\n\nIs there some client shutdown hook that can be used? It seems like [PJRT_Client_Destroy](https://github.com/openxla/xla/blob/71a4e6e6e4e9f0f8b8f25c07a32ad489aff19239/xla/pjrt/c/pjrt_c_api.h#L374-L375C21) would be a suitable candidate, except that I don't see it ever being called from pytorch/xla.\n\nThe reason for this is that we would like to have some automatic device cleanup / other system resource teardown implemented in our plugin that triggers at the end of a session. It would also be nice to have a user-accessible API that permits session teardown within PJRT, for example to reset devices between pytests within the same process.",
    "url": "https://github.com/pytorch/xla/issues/9679",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-10-16T20:21:27Z",
    "updated_at": "2025-10-17T16:52:08Z",
    "user": "jameszianxuTT"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2221,
    "title": "Question about pre-trained weights usability and performance on Hugging Face models",
    "body": "Hello,\n\nI would like to ask whether the weights provided on Hugging Face (for example, under the lerobot author page) can be directly downloaded and used for inference, or if they must be fine-tuned before achieving reasonable performance.\n\nWhen I directly load and evaluate the models (e.g., lerobot/smolvla_base or lerobot/pi05_libero_base), the performance appears extremely poor, almost random. I\u2019m wondering if this is expected behavior or if I might have made a mistake in my setup.\n\nHere\u2019s the list of models I found on Hugging Face:\n\nlerobot/smolvla_base\nlerobot/pi05_base\nlerobot/diffusion_pusht\nlerobot/pi0_base\nlerobot/pi05_libero_base\nlerobot/act_aloha_sim_transfer_cube_human\nlerobot/vqbet_pusht\nlerobot/diffusion_pusht_keypoints\nlerobot/act_aloha_sim_insertion_human\nlerobot/pi0_libero_base\nlerobot/pi05_libero_finetuned\nlerobot/pi05_libero_finetuned_quantiles\nlerobot/pi0_libero_finetuned\n\n\nAre the *_base models supposed to be general pre-trained checkpoints that require downstream fine-tuning (e.g., on LIBERO), while the *_finetuned ones are ready for evaluation?\n\nThank you in advance for your clarification!",
    "url": "https://github.com/huggingface/lerobot/issues/2221",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-10-16T14:14:39Z",
    "updated_at": "2025-10-31T16:26:45Z",
    "user": "MichaelWu99-lab"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27021,
    "title": "[Usage]: Need guidance reproducing benchmark results from PR #25337 \u2014 results differ significantly from reported data",
    "body": "## Background\nRecently, we have been working on optimizing the position computation for multimodal models in vLLM.\n\nDuring benchmarking, we noticed that our results were not as expected.\n\nTo investigate, we decided to reproduce the benchmark results from [PR #25337](https://github.com/vllm-project/vllm/pull/25337), comparing the performance before and after that PR was merged into the main branch.\n\n- Before PR commit: cf56cf78b47e5f9b6a81ce0d50a94f9291922315\n\n- After PR commit: 30d08911f7cf78287f8da003ddcc99f6ef196f9f\n   \n    <img width=\"1380\" height=\"712\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/afca55db-c443-4c98-ba6b-f656b070af5f\" />\n\nHowever, our reproduced results differ **significantly** from the performance data reported in the PR.\n\nWe\u2019d like to understand whether this discrepancy may be caused by hardware differences, model choice, or benchmark setup.\n\n**Who can help guide me?**\n\n## Model and Environment\n- Model used: Qwen/Qwen3-VL-30B-A3B-Instruct-FP8(The modelQwen3-VL-4B used in the PR could not be found on Hugging Face.)\n\n- GPU: NVIDIA A100 PCIe\n\n- vLLM startup command:\n```bash\nvllm serve \"Qwen/Qwen3-VL-30B-A3B-Instruct-FP8\" \\\n    --trust-remote-code \\\n    --gpu-memory-utilization 0.9 \\\n    --max-model-len 16384\n```\n\n## Benchmark Command\n```bash\nvllm bench serve \\\n  --backend openai-chat \\\n  --model \"Qwen/Qwen3-VL-30B-A3B-Instruct-FP8\" \\\n  --base-url \"http://localhost:8000\" \\\n  --endpoint \"/v1/chat/completions\" \\\n  --dataset-name \"hf\" \\\n  --dataset-path \"lmarena-ai/VisionArena-Chat\" \\\n  --num-prompts 100 \\\n  --request-rate 10 \\\n  --save-result \\\n  --result-dir benchmarks_results \\\n  --result-filename test.json\n```\n\n## Our Benchmark Results\n### Before PR #25337\n```text\n============ Serving Benchmark Result ============\nSuccessful requests:                     100\nRequest rate configured (RPS):           10.00\nBenchmark duration (s):                  16.91\nTotal input tokens:                      5280\nTotal generated tokens:                  11522\nRequest throughput (req/s):              5.91\nOutput token throughput (tok/s):         681.42\nPeak output token throughput (tok/s):    2225.00\nPeak concurrent requests:                97.00\nTotal Token throughput (tok/s):          993.68\n---------------Time to First Token----------------\nMean TTFT (ms):                          1176.13\nMedian TTFT (ms):                        1185.79\nP99 TTFT (ms):                           2178.91\n-----Time per Output Token (excl. 1st token)------\nMean TPOT (ms):                          88.39\nMedian TPOT (ms):                        78.68\nP99 TPOT (ms):                           392.01\n---------------Inter-token Latency----------------\nMean ITL (ms):                           77.30\nMedian ITL (ms):                         42.31\nP99 ITL (ms):                            581.15\n==================================================\n```\n\n### After PR #25337\n```text\n============ Serving Benchmark Result ============\nSuccessful requests:                     100\nRequest rate configured (RPS):           10.00\nBenchmark duration (s):                  16.89\nTotal input tokens:                      5280\nTotal generated tokens:                  11640\nRequest throughput (req/s):              5.92\nOutput token throughput (tok/s):         689.02\nPeak output token throughput (tok/s):    2178.00\nPeak concurrent requests:                97.00\nTotal Token throughput (tok/s):          1001.57\n---------------Time to First Token----------------\nMean TTFT (ms):                          1193.52\nMedian TTFT (ms):                        1285.23\nP99 TTFT (ms):                           2111.41\n-----Time per Output Token (excl. 1st token)------\nMean TPOT (ms):                          88.84\nMedian TPOT (ms):                        78.00\nP99 TPOT (ms):                           344.25\n---------------Inter-token Latency----------------\nMean ITL (ms):                           76.89\nMedian ITL (ms):                         42.30\nP99 ITL (ms):                            597.42\n==================================================\n```\n\n## Reference: Benchmark Results from PR #25337\n### Main branch\n```text\n============ Serving Benchmark Result ============\nSuccessful requests:                     1000      \nRequest rate configured (RPS):           10.00     \nBenchmark duration (s):                  101.85    \nTotal input tokens:                      94327     \nTotal generated tokens:                  120882    \nRequest throughput (req/s):              9.82      \nOutput token throughput (tok/s):         1186.81   \nPeak output token throughput (tok/s):    2862.00   \nPeak concurrent requests:                133.00    \nTotal Token throughput (tok/s):          2112.91   \n---------------Time to First Token----------------\nMean TTFT (ms):                          229.53    \nMedian TTFT (ms):                        180.19    \nP99 TTFT (ms):                           928.83    \n-----Time per Output Token (excl. 1st token)------\nMean TPOT (ms):       ",
    "url": "https://github.com/vllm-project/vllm/issues/27021",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-16T12:31:03Z",
    "updated_at": "2025-10-17T05:46:32Z",
    "comments": 5,
    "user": "deitxfge"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27017,
    "title": "[Doc]: KV Cache Memory allocations",
    "body": "### \ud83d\udcda The doc issue\n\nHello,\nWhen serving a model via vLLM for text(token) generation:\n\n1. Before a new request gets scheduled, does vLLM check if KV cache for a sequence length of `max_model_len` is available for that new request or does it check if KV cache for a sequence length of `input prompt + max_tokens` (if it's less than _max_model_length_) is available for the request? In case the request does not specify a _max_tokens_ does it default to 16?\n2. In case the required KV cache memory is not available, does the server wait until it is available to schedule that new request?\n3. When exactly is the KV cache allocated for a particular request? Do the KV cache blocks get allocated after computing the number of new blocks required for all current requests after each generation step of the model, as mentioned in this [blog post](https://www.aleksagordic.com/blog/vllm)? i.e. the KV cache block is not fully allocated upfront based on the point [1] calculation instead incrementally allocated since the request could finish before it reaches the _max_tokens_ or _max_model_length_ limit?\n\n4. I am trying to understand if the server concurrency can be more than the one specified in the server startup logs (based on the _max_model_len_) and get a clearer understanding of request scheduling.\nexample logs:\n  ```\n  GPU KV cache size: {X} tokens\n  Maximum concurrency for {max_model_len} tokens per request: Y\n  ```\n5. The KV cache token and concurrency estimations vLLM gives in the start up logs for the **_Qwen-235B MoE_** model do not match the below formula for `tensor_parallel_size` of 8. It does match for `tensor_parallel_size` of 4 and in general for a different model like **_Llama-70B_**. Is the below formula missing something specifically for the Qwen-235B models at `tensor_parallel_size` of 8?\n```\nnumber of layers * number of KV heads * head dimension * precision/8 * 2 (for K & V) * seq_len bytes\n\nOR \n\n(number of layers * number of KV heads * head dimension * precision/8 * 2 (for K & V) * seq_len)/tensor_parallel_size bytes per GPU\n\ni.e. for Qwen-235B MoE\n(94 * 4 * 128 * 16/8 * 2 * seq_len)/8 bytes per GPU\n```\n\nThanks!\n\n### Suggest a potential alternative/fix\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27017",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-10-16T11:43:43Z",
    "updated_at": "2025-11-04T11:08:02Z",
    "comments": 7,
    "user": "sneha5gsm"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27011,
    "title": "[Usage]: Runnig GLM4.5-Air with Speculative Decoding",
    "body": "### Your current environment\n```\nThe output of `python collect_env.py`\n```\n### How would you like to use vllm\nI want to run inference of a [GLM-4.5-Air](https://huggingface.co/zai-org/GLM-4.5-Air-FP8) with speculative decoding. From [GLM 4.5](https://huggingface.co/zai-org/GLM-4.5) page, it mentioned `All models use MTP layers and specify --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4 to ensure competitive inference speed.`\nThey gave examples of how to use speculative decoding in sglang, but not in vLLM. I was wondering if it is being supported in vLLM\n### Before submitting a new issue...\n- [x]Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27011",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-16T10:17:54Z",
    "updated_at": "2025-10-16T10:23:01Z",
    "comments": 0,
    "user": "aqx95"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 27006,
    "title": "[Usage]: In vLLM version 0.8.5, when I send an HTTP image URL directly, the model cannot recognize the image content, but it works correctly when I use a base64-encoded image. I\u2019d like to understand why this happens.",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/27006",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-16T08:09:29Z",
    "updated_at": "2025-10-16T10:33:49Z",
    "comments": 4,
    "user": "Lislttt"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2218,
    "title": "image pad value in pi0/pi05",
    "body": "### System Info\n\n```Shell\nthe latest lerobot version\n```\n\n### Information\n\n- [ ] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\ndef resize_with_pad_torch(  # see openpi `resize_with_pad_torch` (exact copy)\n    images: torch.Tensor,\n    height: int,\n    width: int,\n    mode: str = \"bilinear\",\n) -> torch.Tensor:\n    \"\"\"PyTorch version of resize_with_pad. Resizes an image to a target height and width without distortion\n    by padding with black. If the image is float32, it must be in the range [-1, 1].\n\n    Args:\n        images: Tensor of shape [*b, h, w, c] or [*b, c, h, w]\n        height: Target height\n        width: Target width\n        mode: Interpolation mode ('bilinear', 'nearest', etc.)\n\n    Returns:\n        Resized and padded tensor with same shape format as input\n    \"\"\"\n    # Check if input is in channels-last format [*b, h, w, c] or channels-first [*b, c, h, w]\n    if images.shape[-1] <= 4:  # Assume channels-last format\n        channels_last = True\n        if images.dim() == 3:\n            images = images.unsqueeze(0)  # Add batch dimension\n        images = images.permute(0, 3, 1, 2)  # [b, h, w, c] -> [b, c, h, w]\n    else:\n        channels_last = False\n        if images.dim() == 3:\n            images = images.unsqueeze(0)  # Add batch dimension\n\n    batch_size, channels, cur_height, cur_width = images.shape\n\n    # Calculate resize ratio\n    ratio = max(cur_width / width, cur_height / height)\n    resized_height = int(cur_height / ratio)\n    resized_width = int(cur_width / ratio)\n\n    # Resize\n    resized_images = F.interpolate(\n        images,\n        size=(resized_height, resized_width),\n        mode=mode,\n        align_corners=False if mode == \"bilinear\" else None,\n    )\n\n    # Handle dtype-specific clipping\n    if images.dtype == torch.uint8:\n        resized_images = torch.round(resized_images).clamp(0, 255).to(torch.uint8)\n    elif images.dtype == torch.float32:\n        resized_images = resized_images.clamp(-1.0, 1.0)\n    else:\n        raise ValueError(f\"Unsupported image dtype: {images.dtype}\")\n\n    # Calculate padding\n    pad_h0, remainder_h = divmod(height - resized_height, 2)\n    pad_h1 = pad_h0 + remainder_h\n    pad_w0, remainder_w = divmod(width - resized_width, 2)\n    pad_w1 = pad_w0 + remainder_w\n\n    # Pad\n    constant_value = 0 if images.dtype == torch.uint8 else -1.0\n    padded_images = F.pad(\n        resized_images,\n        (pad_w0, pad_w1, pad_h0, pad_h1),  # left, right, top, bottom\n        mode=\"constant\",\n        value=constant_value,\n    )\n\n    # Convert back to original format if needed\n    if channels_last:\n        padded_images = padded_images.permute(0, 2, 3, 1)  # [b, c, h, w] -> [b, h, w, c]\n\n    return padded_images\n\n\n\n### Expected behavior\n\n image from lerobot range from 0 to 1 and dtype is float32 , so constant_value in this code is -1 not 0. -1*2-1=-3, so that there are '-3' in the input of siglip embedding ",
    "url": "https://github.com/huggingface/lerobot/issues/2218",
    "state": "open",
    "labels": [
      "bug",
      "question",
      "policies"
    ],
    "created_at": "2025-10-16T06:48:13Z",
    "updated_at": "2025-10-17T09:58:49Z",
    "user": "Tgzz666"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41640,
    "title": "AttributeError: BartTokenizerFast has no attribute image_token. Did you mean: 'mask_token'?",
    "body": "### System Info\n\nUbuntu\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```python\nimport torch\nimport requests\nfrom PIL import Image\nfrom transformers import AutoProcessor, Florence2ForConditionalGeneration\n\n\nmodel = Florence2ForConditionalGeneration.from_pretrained(\n    \"microsoft/Florence-2-large\",\n    dtype=torch.bfloat16,\n)\nprocessor = AutoProcessor.from_pretrained(\"microsoft/Florence-2-large\")\n\nurl = \"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg?download=true\"\nimage = Image.open(requests.get(url, stream=True).raw).convert(\"RGB\")\n\ntask_prompt = \"<OD>\"\ninputs = processor(text=task_prompt, images=image, return_tensors=\"pt\").to(model.device, torch.bfloat16)\n\ngenerated_ids = model.generate(\n    **inputs,\n    max_new_tokens=1024,\n    num_beams=3,\n)\ngenerated_text = processor.batch_decode(generated_ids, skip_special_tokens=False)[0]\n\nimage_size = image.size\nparsed_answer = processor.post_process_generation(generated_text, task=task_prompt, image_size=image_size)\n\nprint(parsed_answer)\n```\n\n### Expected behavior\n\n```\n    raise AttributeError(f\"{self.__class__.__name__} has no attribute {key}\")\nAttributeError: BartTokenizerFast has no attribute image_token. Did you mean: 'mask_token'?\n```",
    "url": "https://github.com/huggingface/transformers/issues/41640",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-16T06:34:02Z",
    "updated_at": "2025-10-17T09:00:36Z",
    "comments": 5,
    "user": "conceptofmind"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1439,
    "title": "Integration to a CLI application created using PKG",
    "body": "### Question\n\nI'm trying to bundle a Node.js CLI tool that uses `@xenova/transformers` into a single executable using [pkg](https://github.com/vercel/pkg).\n\nThe build works fine, but when I run the packaged executable, I get this error:\n```\nError: Cannot find module '../bin/napi-v3/linux/x64/onnxruntime_binding.node'\nRequire stack:\n- /snapshot/custom-cli/node_modules/onnxruntime-node/dist/binding.js\n- /snapshot/custom-cli/node_modules/onnxruntime-node/dist/backend.js\n- /snapshot/custom-cli/node_modules/onnxruntime-node/dist/index.js\n- /snapshot/custom-cli/dist/custom-cli.cjs\n```\n\n**Build command:**\n\n`webpack && pkg -t node18-linux -o custom-cli dist/custom-cli.cjs`\n\n**pkg config:**\n\n```\n\"pkg\": {\n  \"assets\": [\n    \"node_modules/onnxruntime-node/bin/napi-v3/**/onnxruntime_binding.node\"\n  ]\n}\n```\n\n\n**Is it possible to give a custom absolute path for ONNX native bindings (something like this):** \n```\nimport { env } from \"@xenova/transformers\";\nenv.backends.onnx.customBindingPath = \"/custom-cli/onnxruntime_binding.node\";\n```\n\nthen the tool could:\n- Extract prebuilt binaries (onnxruntime_binding.node) from a known location (or GitHub ZIP)\n\n- Pass that custom path to @xenova/transformers / onnxruntime-node\n\n- Load correctly even when packaged by pkg\n",
    "url": "https://github.com/huggingface/transformers.js/issues/1439",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-10-16T05:30:32Z",
    "updated_at": "2025-10-26T23:32:41Z",
    "user": "JosephJibi"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2216,
    "title": "gpu memory required to finetune pi05",
    "body": "I tried to finetune pi05 with  rxt a6000 (48GB) and get an insufficient memory error . Does anyone know how much GPU memory is needed to finetune a pi05 policy?\n\nThanks,",
    "url": "https://github.com/huggingface/lerobot/issues/2216",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "performance"
    ],
    "created_at": "2025-10-16T04:46:21Z",
    "updated_at": "2025-12-22T07:42:45Z",
    "user": "jcl2023"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165612,
    "title": "RFC: Optionally accept NumPy dtypes in all APIs where torch dtypes are accepted",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nOn behalf of the Python Data API Consortium / Python array API standard, to follow up with the conclusion we reached in the September 18 meeting I am filing this RFC for PyTorch stakeholders to consider \ud83d\ude42 \n \nThe Python array API standard currently specifies that each array library should make the supported dtypes available under the array library's namespace: https://data-apis.org/array-api/latest/API_specification/data_types.html. It does not specify how the dtype objects should be implemented, however, and in theory each library can have its own dtype object implementation. As a result, questions such as \n- How to translate `libA.float32` to `libB.float32`? ([example](https://github.com/data-apis/array-api/issues/972))\n- How to write portable library code without constantly checking which/whose dtype object to use?\n\ndo not have a definite answer today. \n\nThere exist workarounds, of course. For example, one could extract the string name of `libA.float32`, do a module lookup through [`__array_namespace__`](https://data-apis.org/array-api/latest/API_specification/generated/array_api.array.__array_namespace__.html), and then `getattr` to map it to `libB.float32`. But generally speaking the current state remains challenging for writing array-library-agnostic code. This is [one example](https://github.com/NVIDIA/nvmath-python/blob/6bddfa71c39c07804127adeb23f5b0d2168ae38c/nvmath/internal/ndbuffer/package_utils.pyx#L25-L44) from `nvmath-python`, NVIDIA's Python math library.\n\nAfter examining the Python ecosystem, however, we found that PyTorch is by far the only major Python array/tensor library that does not already use (alias) NumPy dtype objects; NumPy, CuPy, Jax, Dask, ndonnx, dpctl, ... all already do so. \n\nAs a result, one arguably \"simple\" solution to solve such interoperability/portability problems is to simply recognize NumPy dtype objects wherever a PyTorch dtype is accepted, including but not limited to `empty()`, `zeros()`, `.to()`, `.type_as()`, ... \n\nA further step we should evaluate is whether to return `Tensor.dtype` as a NumPy dtype object, if a tensor was created with a NumPy dtype. This might require extra efforts to keep track of the input state, so based on discussions for this RFC we can decide whether we want to include this extra step.\n\nThe proposal seeks for **optional**, **backward compatible** support for NumPy dtype types (ex: `np.float32`) and objects (ex: `np.dtype(np.float32)`). PyTorch need not introduce NumPy as a required dependency, unless there are other strong reasons; such optional support can be easily hidden behind a try-import-except guard, and this RFC does not mean to introduce any new dependency to PyTorch.\n\nThe benefits of adding this optional support includes:\n- Avoid ecosystem fragmentation\n- Help the array API from having to standardize yet another protocol for dtype exchange (DLPack is not and should not be the solution)\n- Allow writing array-library-agnostic code\n- Centralize all efforts in hardware-accelerated exotic (narrow precision) dtypes behind [ml_dtypes](https://github.com/jax-ml/ml_dtypes), a dtype extension based on NumPy's dtype registration system (and therefore provides proper NumPy dtype types and objects)\n\nRelated past discussions: https://github.com/pytorch/pytorch/issues/40471, https://github.com/pytorch/pytorch/issues/40568\n\ncc @albanD @rgommers (NumPy/SciPy) @lucascolley @ev-br (SciPy) @kmaehashi (CuPy) @aterrel @rparolin (CUDA Python) @jrhemstad (CUDA C++, aka CCCL) @kkraus14 (CUDA C++/Python) @seberg (NumPy) @brycelelbach (cuTile Python) @samaid (nvmath-python) @ptrblck (NVIDIA) @tqchen (DLPack) @jacobtomlinson (Dask) @jakevdp @hawkinsp (Jax/ml_dtype) @betatim (sklearn) @tomwhite (cubed) @kgryte @asmeurer (array API) for vis.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/165612",
    "state": "open",
    "labels": [
      "triaged",
      "enhancement",
      "module: python frontend",
      "module: floatx (formerly float8)"
    ],
    "created_at": "2025-10-16T04:24:52Z",
    "updated_at": "2025-11-27T00:42:21Z",
    "comments": 1,
    "user": "leofang"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26981,
    "title": "[Usage]: Does vllm support use TokensPrompt for Qwen3VL model",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nMy truncation strategy differs slightly from the standard approach (I wish to preserve the system prompt and the final suffix, only truncating the middle portion). It seems that the current version of vLLM does not support this, so I attempted to pass pre-processed token IDs along with mm_data as input, for example: TokensPrompt(prompt_token_ids=text[:self.max_model_length] + self.suffix_tokens, multi_modal_data=mm_data, mm_processor_kwargs=video_kwargs). \nHowever, I encountered an error. Could you please advise on the correct way to use this?\n\n<img width=\"1555\" height=\"351\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/935cdcf5-59ff-480b-bbc5-a6426e48a12c\" />\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26981",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-16T03:22:09Z",
    "updated_at": "2025-10-27T03:33:53Z",
    "comments": 10,
    "user": "afalf"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2214,
    "title": "Potential Scale Imbalance in smolVLA Embedding Pipeline",
    "body": "Hi, I noticed a potential scale inconsistency in the embedding pipeline.\n\nSpecifically, state_emb is not normalized, while both img_emb and lang_emb are explicitly scaled by math.sqrt(emb_dim):\nhttps://github.com/huggingface/lerobot/blob/a6ff3cfebb0304f2c378515dd30ea06fff8f473f/src/lerobot/policies/smolvla/modeling_smolvla.py#L591-L601\n\nIn practice, the numerical magnitude of img_emb tends to be much higher (often in the hundreds), while lang_emb and state_emb remain in the single-digit range. This discrepancy might cause the image features to dominate during multimodal fusion or attention.\n\nRelated code:\nhttps://github.com/huggingface/lerobot/blob/a6ff3cfebb0304f2c378515dd30ea06fff8f473f/src/lerobot/policies/smolvla/modeling_smolvla.py#L561-L566\n\nSuggestion:\nConsider adding a LayerNorm after img_emb (or before the multimodal fusion stage) to align the scale across modalities. This could improve stability during training and quantization.\n\n\u2014\nReported by Tank @ iMotion AI",
    "url": "https://github.com/huggingface/lerobot/issues/2214",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-10-16T02:11:24Z",
    "updated_at": "2025-10-17T11:29:36Z",
    "user": "kkTkk012"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26964,
    "title": "[Bug]: Issue with Deepseek Reasoning parser with Qwen3 2507 chat templates",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\n# wget https://raw.githubusercontent.com/vllm-project/vllm/main/vllm/collect_env.py\n# For security purposes, please feel free to check the contents of collect_env.py before running it.\npython collect_env.py\n--2025-10-15 17:33:01--  https://raw.githubusercontent.com/vllm-project/vllm/main/vllm/collect_env.py\nResolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.108.133, 185.199.109.133, ...\nConnecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 28050 (27K) [text/plain]\nSaving to: \u2018collect_env.py.2\u2019\n\ncollect_env.py.2          100%[===================================>]  27.39K  --.-KB/s    in 0s      \n\n2025-10-15 17:33:01 (65.0 MB/s) - \u2018collect_env.py.2\u2019 saved [28050/28050]\n\n# # sh: 8: python: not found\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nI'm running vLLM as a docker container on an Unraid server. It is a backend to Open WebUI chat interface. The issue I see is that the reasoning block for Open WebUI is closing too early. According to this discussion on the Open WebUI git, I think it is because of the deepseek parser used as recommended by the model card. See this link: https://github.com/open-webui/open-webui/pull/16687\n\nHere is an example of the issue that I face: \n\n<img width=\"1936\" height=\"807\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/eb2f6452-3df0-49f0-a1c5-5b99b56f578a\" />\n\nI think this is the place to raise this issue. Thanks so much!\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26964",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-16T00:39:12Z",
    "updated_at": "2025-10-20T17:47:02Z",
    "comments": 1,
    "user": "MikeNatC"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165590,
    "title": "RuntimeError: non-positive groups is not supported",
    "body": "### \ud83d\udc1b Describe the bug\n\ntorch==2.7.1\nI got an RuntimeError: non-positive groups is not supported while using conv1d in my model. I tried to add more logs and asserts to find what is going wrong, but it didn't help. Even I set groups parameter to 128 the error remains\n\nfrom output i got sizes if input tensors\n```\ntorch.Size([4, 1, 128]) torch.Size([128, 1, 4]) torch.Size([128]) 4  \n```\ncode below\n```\n        assert hasattr(self, 'd_inner'), \"self.d_inner is not defined!\"\n        assert self.d_inner > 0, f\"self.d_inner must be positive, got {self.d_inner}\"\n        if conv_weight.dim() == 3:\n            print(f'{x_proj_out.shape} {conv_weight.shape} {conv_bias.shape} {self.d_conv}')\n            assert 128 > 0, \"groups must be > 0\"\n            x_conv = F.conv1d(\n                x_proj_out.transpose(1, 2),\n                conv_weight,        # (d_inner, 1, d_conv)\n                bias=conv_bias,     # (d_inner,)\n                padding=self.d_conv - 1,\n                groups=128#self.d_inner\n            )\n```\n\n### Versions\n\nCollecting environment information...                                         \nPyTorch version: 2.7.1+cu126                                                  \nIs debug build: False                                                                                                                                        \nCUDA used to build PyTorch: 12.6                                              \nROCM used to build PyTorch: N/A                                               \n                                                                              \nOS: Debian GNU/Linux 12 (bookworm) (x86_64)                        \nGCC version: (Debian 12.2.0-14) 12.2.0                                        \nClang version: Could not collect                                              \nCMake version: version 3.25.1                                                 \nLibc version: glibc-2.36                                                      \n                                                                              \nPython version: 3.13.1 | packaged by Anaconda, Inc. | (main, Dec 11 2024, 16:29:23) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-6.1.0-34-amd64-x86_64-with-glibc2.36        \nIs CUDA available: True                                                       \nCUDA runtime version: 12.4.131                                                \nCUDA_MODULE_LOADING set to: LAZY                                                                                                                             \nGPU models and configuration:                                                 \nGPU 0: NVIDIA A100-PCIE-40GB                                                                                                                                 \nGPU 1: NVIDIA A100-PCIE-40GB                                                                                                                                 \nGPU 2: NVIDIA A100-PCIE-40GB                                                                                                                                 \nGPU 3: NVIDIA A100-PCIE-40GB                                                  \nGPU 4: NVIDIA A100-PCIE-40GB                                                  \nGPU 5: NVIDIA A100-PCIE-40GB                                                  \nGPU 6: NVIDIA A100-PCIE-40GB                                                  \n                                                                              \nNvidia driver version: 570.133.20                                             \ncuDNN version: Could not collect                                              \nIs XPU available: False                                                       \nHIP runtime version: N/A                                                      \nMIOpen runtime version: N/A                                                   \nIs XNNPACK available: True                                                    \n                                                                              \nCPU:                                                                          \nArchitecture:                         x86_64                                  \nCPU op-mode(s):                       32-bit, 64-bit                          \nAddress sizes:                        43 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               256\nOn-line CPU(s) list:                  0-255\nVendor ID:                            AuthenticAMD\nModel name:                           AMD EPYC 7742 64-Core Processor\nCPU family:                           23\nModel:                                49\nThread(s) per core:                   2 \nCore(s) per socket:                   64                                 \nSocket(s):                            2                            \nStepping:                             0                            \nFrequency boost:                      enabled    ",
    "url": "https://github.com/pytorch/pytorch/issues/165590",
    "state": "open",
    "labels": [
      "needs reproduction",
      "module: nn",
      "triaged"
    ],
    "created_at": "2025-10-15T22:44:54Z",
    "updated_at": "2025-10-17T18:59:35Z",
    "comments": 1,
    "user": "st085318"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26949,
    "title": "[Bug]: RuntimeError: CUDA driver error: invalid device ordinal when symmetric memory (symm_mem) is enabled in multi-GPU vLLM setup with 4H100 PCIe",
    "body": "### My current environment\n\nEnvironment:\nModel: RedHatAI/Llama-4-Scout-17B-16E-Instruct-FP8-dynamic\nvLLM Version: latest main (installed via pip)\nHardware: 4\u00d7 NVIDIA H100 PCIe (80GB)\nDriver: 550.xx\nCUDA: 12.2\nPyTorch: 2.4.0\nOS: Ubuntu 22.04\nLaunch Command:\npython3 -m vllm.entrypoints.api_server \\\n    --model /ephemeral/huggingface/models--RedHatAI--Llama-4-Scout-17B-16E-Instruct-FP8-dynamic/snapshots/... \\\n    --tensor-parallel-size 4 \\\n    --gpu-memory-utilization 0.85 \\\n    --kv-cache-dtype fp8_e4m3 \\\n    --max-model-len 4000000 \\\n    --max-num-seqs 16 \\\n    --enable-prefix-caching \\\n    --kv-events-config '{\"enable_kv_cache_events\": true, \"publisher\": \"zmq\", \"endpoint\": \"tcp://*:5557\"}'\n\n\n###   bug\n\nRuntimeError: CUDA driver error: invalid device ordinal\n(EngineCore_DP0 pid=11546) ERROR [symm_mem.py:88] handle = torch_symm_mem.rendezvous(self.buffer, self.group.group_name)\n(EngineCore_DP0 pid=11546) ERROR WorkerProc failed to start\nRuntimeError: Engine core initialization failed. See root cause above. Failed core proc(s): {'EngineCore_DP0': 1}\n\nBehavior:\nWhen symm_mem is enabled (default) \u2192 fails with invalid device ordinal\nWhen symm_mem is disabled via --disable-symm-mem \u2192\n\u2705 vLLM engine starts\n\u274c No KV cache event logs (BlockStored, BlockRemoved, etc.)\n\u274c No prefix cache hit metrics\n\nWhat I\u2019ve Tried\n\nVerified all 4 GPUs visible via nvidia-smi\nConfirmed correct CUDA device indexing\nReduced tensor-parallel-size to 2 \u2192 same error\nChecked for NCCL initialization issues \u2014 none\nManually set CUDA_VISIBLE_DEVICES=0,1,2,3\nRebuilt PyTorch + vLLM from source with USE_SYMMETRIC_MEMORY=1 \u2014 same result\nQuestion:\nIs there a known compatibility issue between symmetric memory (torch_symm_mem) and H100 PCIe devices in multi-GPU setups?\nIf so, is there a fallback mechanism to preserve KV event publishing (--kv-events-config) when symmetric memory is disabled?\n\nThanks for looking into it.\n",
    "url": "https://github.com/vllm-project/vllm/issues/26949",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-15T22:08:34Z",
    "updated_at": "2025-12-25T03:42:49Z",
    "comments": 2,
    "user": "vadapallij"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165578,
    "title": "Out of tree backend documentation does not seem accurate",
    "body": "### \ud83d\udcda The doc issue\n\nLooking at the \"How does this mechanism apply to out-of-tree extensions\" section of [the autoloading tutorial](https://docs.pytorch.org/tutorials/unstable/python_extension_autoload.html#how-to-apply-this-mechanism-to-out-of-tree-extensions), it looks to me like importing setting a backend `torch_foo = torch_foo:_autoload` is going to automagically attach either the `torch_foo` or `torch_foo.foo` module to `torch` directly, since there is no code in there that manipulates the `torch` namespace, but when I try to do this, like in [this MWE](https://github.com/pganssle-google/torch-backend-mwe), it doesn't work.\n\n### Suggest a potential alternative/fix\n\nEither this documentation is inaccurate and should be made accurate to show how to attach your backend to the `torch` namespace or maybe the problem is that the namespace attachment is smuggled in under the assumption that `foo` is \"a backend\" (and the assumption is that backends show up in that namespace). Preferably the relevant code would be extracted into this tutorial to show how it works, but failing that it would be nice to get a link to something showing the essential elements of \"a backend\" that make this code example work.\n\ncc @svekars @sekyondaMeta @AlannaBurke @NmomoN @mengpenghui @fwenguang @cdzhan @1274085042 @PHLens @albanD",
    "url": "https://github.com/pytorch/pytorch/issues/165578",
    "state": "open",
    "labels": [
      "module: docs",
      "triaged",
      "module: PrivateUse1"
    ],
    "created_at": "2025-10-15T20:49:12Z",
    "updated_at": "2025-10-17T04:30:01Z",
    "comments": 1,
    "user": "pganssle-google"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165577,
    "title": "CI: What is the purpose of `slow.yml`",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhat is the purpose of `slow.yml` job, when we can shard more and probably can rely on TD to skip slow tests if they are not needed? \n\nIn the past `slow.yml` job was a way of keeping time to signal low, while running some tests post commit, but now that we have TD we probably can get rid of concept of slow test and just run them conditionally on TD's decision\n\n\nAt the very least, I think this job should be viable/strict blocking, as it just runs a subset of tests from pull request, that are decorated with `@slowTest` or take more than 90 sec to finish\n### Versions\n\nCI\n\ncc @seemethere @pytorch/pytorch-dev-infra",
    "url": "https://github.com/pytorch/pytorch/issues/165577",
    "state": "open",
    "labels": [
      "module: ci",
      "triaged",
      "needs research"
    ],
    "created_at": "2025-10-15T20:33:34Z",
    "updated_at": "2025-10-16T09:24:45Z",
    "user": "malfet"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26940,
    "title": "[Feature]: Support `inf` value for burstiness in benchmarks",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nIn the benchmarks, the burstiness value is used in a gamma distribution to sample the delays between consecutive requests. \n```\ntheta = 1.0 / (current_request_rate * burstiness)\ndelay_ts.append(np.random.gamma(shape=burstiness, scale=theta))\n```\n\n[Theoretically ](https://en.wikipedia.org/wiki/Gamma_distribution)(and this is also what is observed in practice), the generated delays have as mean `1.0 / current_request_rate` and the spread is controlled by the burstiness. When the burstiness is high, we observe lower variance in the delay values, all values being closer to the mean `1.0 / current_request_rate`. When burstiness tends to infinity, we should observe a single generated delay, which is `1.0 / current_request_rate`. In practice, the `np.random.gamma` function generates `nan` as results, so we need to manually condition on `burstiness` value and append `1.0 / current_request_rate` to the list of delays when burstiness becomes infinite.\n\nSee attached image as mathematical proof\n\n<img width=\"1323\" height=\"1672\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/455cfd00-ea8f-44c8-874f-7fdac4faae6d\" />\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26940",
    "state": "closed",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-10-15T19:39:03Z",
    "updated_at": "2025-11-03T18:33:19Z",
    "comments": 0,
    "user": "sducouedic"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26914,
    "title": "[Usage]: \u4e3a\u4ec0\u4e48\u5728\u91c7\u96c6\u7684profiling\u4e2d\u770b\u4e0d\u5230\u901a\u4fe1\u7b97\u5b50\uff1f",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\u901a\u8fc7llm.start_profile\u548cstop_profile\uff0c\u6211\u91c7\u96c6\u5230\u4e86profiling\uff0c\u4f46kernel_details\u91cc\u9762\u770b\u4e0d\u5230\u901a\u4fe1\u7b97\u5b50\u3002\n\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26914",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-15T13:38:14Z",
    "updated_at": "2025-10-15T13:38:14Z",
    "comments": 0,
    "user": "sheep94lion"
  },
  {
    "repo": "pytorch/rl",
    "number": 3197,
    "title": "[Question] How to handle MultiDiscrete action spaces in TorchRL",
    "body": "I have created a custom Parallel API PettingZoo environment with **MultiDiscrete action spaces**. The _env.action_spec()_ function succeeds. \n\nI am using the **Multi-Agent PPO tutorial of TorchRL**, but I\u2019m struggling to understand how to modify the architecture so it supports **MultiDiscrete action spaces**. Specifically, I\u2019d like to know how to correctly adapt the `MultiAgentMLP`, `TensorDictModule`, and `ProbabilisticActor` so that the policy network outputs a `MultiDiscrete` (or equivalently, `MultiCategorical`) action distribution for each agent.\n\nShould I create number of `ProbabilisticActor` modules as the length of the MultiDiscrete action space? In the case where a single `ProbabilisticActor` module is used, which distribution class should replace `Categorical` to support a MultiDiscrete action space? Is there an existing script or tutorial in TorchRL that demonstrates how to handle `MultiDiscrete` action spaces (or `MultiCategorical` distributions) in a multi-agent setup?",
    "url": "https://github.com/pytorch/rl/issues/3197",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-15T11:56:00Z",
    "updated_at": "2025-10-16T19:38:12Z",
    "user": "AnastasiaPsarou"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26903,
    "title": "[Usage]: vLLM for video input",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\nI want to run inference of qwen2.5-vl or qwen2.5-omni. \n\nWhen I convert the video to base64 for api calls (e.g. openai format), I found that vLLM seems to use all the video frames by checking the number of prompt tokens.\n\nIs there any parameter similar to fps to control the sampling rate?\nOr do I need to sample the video externally well in advance, save it as video and then convert to base64?\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26903",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-15T09:29:23Z",
    "updated_at": "2025-12-11T03:26:33Z",
    "comments": 6,
    "user": "King-king424"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12492,
    "title": "module transformers has no attribute CLIPFeatureExtractor",
    "body": "### System Info\n\nlatest main\n\n### Who can help?\n\n@SunMarc \n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```python\nfrom diffusers import AnimateDiffPipeline\n\npipe = AnimateDiffPipeline.from_pretrained(\"emilianJR/epiCRealism\")\n```\nerror:\n```\nTraceback (most recent call last):\n  File \"<stdin>\", line 1, in <module>\n  File \"/opt/venv/lib/python3.12/site-packages/huggingface_hub/utils/_validators.py\", line 89, in _inner_fn\n    return fn(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/home/jiqing/diffusers/src/diffusers/pipelines/pipeline_utils.py\", line 1024, in from_pretrained\n    loaded_sub_model = load_sub_model(\n                       ^^^^^^^^^^^^^^^\n  File \"/home/jiqing/diffusers/src/diffusers/pipelines/pipeline_loading_utils.py\", line 752, in load_sub_model\n    class_obj, class_candidates = get_class_obj_and_candidates(\n                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/jiqing/diffusers/src/diffusers/pipelines/pipeline_loading_utils.py\", line 419, in get_class_obj_and_candidates\n    class_obj = getattr(library, class_name)\n                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/jiqing/transformers/src/transformers/utils/import_utils.py\", line 1920, in __getattr__\n    raise AttributeError(f\"module {self.__name__} has no attribute {name}\")\nAttributeError: module transformers has no attribute CLIPFeatureExtractor\n```\n\n\n\n### Expected behavior\n\nAs transformers deprecated FeatureExtractor classes in favor of ImageProcessor classes for image preprocessing. How to handle models that already set FeatureExtractor in model hub like [emilianJR/epiCRealism](https://huggingface.co/emilianJR/epiCRealism/blob/main/feature_extractor/preprocessor_config.json#L11)?",
    "url": "https://github.com/huggingface/diffusers/issues/12492",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-15T08:26:05Z",
    "updated_at": "2025-11-03T05:02:54Z",
    "comments": 3,
    "user": "jiqing-feng"
  },
  {
    "repo": "pytorch/xla",
    "number": 9678,
    "title": "Heterogeneous execution across multiple PJRT clients (GPU + custom accelerator)",
    "body": "## \u2753 Questions and Help\nHi, I\u2019m developing a PJRT plugin for a custom accelerator, and I\u2019m exploring whether PyTorch/XLA can support heterogeneous execution across multiple PJRT clients \u2014 for example, splitting a model or HLO module between GPU, CPU, and the custom accelerator.\n\nConcretely, I\u2019d like to enable availability-aware, cost-driven partitioning so that:\n\n1. If only CPU + accelerator are available, the model runs using those.\n\n2. If a GPU is also available, certain subgraphs can automatically offload to the accelerator when it\u2019s beneficial.\n\nI have a few questions:\n\nDoes PyTorch/XLA or its PJRT integration layer support running a single model using multiple PJRT clients/devices (e.g., GPU + custom accelerator) at the same time?\n\nIf not, is there any supported or recommended way to partition the computation graph manually and execute subgraphs on different PJRT backends?\n\nWould implementing this orchestration externally (via multiple PJRT clients) be more realistic today, or can PyTorch/XLA\u2019s runtime be extended to handle multi-client coordination?\n\nAny pointers to examples, design discussions, or relevant code paths would be really helpful.\n\nThanks!",
    "url": "https://github.com/pytorch/xla/issues/9678",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-10-15T02:56:43Z",
    "updated_at": "2025-10-16T14:52:40Z",
    "user": "milinbhade1214"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26858,
    "title": "[RFC]: Top-level CLI interface for KV cache offloading",
    "body": "### Motivation.\n\nCPU (and tier-2 storage) offloading is an important feature in many cases (multi-round QA, document analysis, agent workflow, and reinforcement learning). With the recent advancement in the offloading connector, we already have the vLLM native CPU offloading implemented via the connector API. Also, there are multiple community efforts to provide other offloading implementations (e.g., LMCache, Nixl storage, mooncake) via the same set of APIs.\n\nHowever, there is no clear documentation about how to configure the CPU offloading from the user's perspective. Right now, in order to enable CPU offloading, the user needs to pass a JSON string to `--kv-transfer-config`, which may create a huge mental barrier for new users. Therefore, it would be better to have a simple & clear user interface for users to enable CPU offloading. \n\n### Proposed Change.\n\n\nThis proposal contains two new command-line arguments:\n- `--kv-offloading-size`: a numeric value to control a global offloading buffer size (in GB). When TP > 1, this number should be the total size summed across all the TP ranks. (An alternative is the buffer size for each TP rank.)\n- `--kv-offloading-backend`: a string that specifies which offloading backend to use, such as \"native\", \"lmcache\", \"mooncake\", \"3fs\", or \"nixl\".\n\nThis will give enough clarity to most of the users who want to use the offloading feature, and should be extensible enough to new offloading backends and tier-2 storage.\n\n## Required changes\n\nTo implement this proposal, the following things are needed:\n- Add logic to parse the new CLI argument and store it into vllm config.\n- Add a new module to translate the `--kv-offloading-size` and `--kv-offloading-backend` to the corresponding KV connector config.\n- Add the documentation to the vLLM user guide.\n\n### Feedback Period.\n\n1~2 weeks\n\n### CC List.\n\n@simon-mo @orozery @njhill \n\n### Any Other Things.\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26858",
    "state": "closed",
    "labels": [
      "RFC"
    ],
    "created_at": "2025-10-15T00:11:15Z",
    "updated_at": "2025-11-01T07:17:08Z",
    "comments": 8,
    "user": "ApostaC"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12485,
    "title": "How to enable Context Parallelism for training",
    "body": "Hi @a-r-r-o-w , I would like to ask you for tips on using Context Parallelism for distributed training.\n\n**Is your feature request related to a problem? Please describe.**\nHere is the minimal code for adapting Context Parallelism into diffusion model training\n\n```python\n# Diffusers Version: 0.36.0.dev0\nfrom diffusers.models._modeling_parallel import ContextParallelConfig\n\n# I have 8 GPUs in total\ncp_config = ContextParallelConfig(ring_degree=1, ulysses_degree=8)\nflux_transformer.enable_parallelism(config=cp_config)\n\nloss = train(flux_transformer)\naccelerator.backward(loss)\ngrad_norm = accelerator.clip_grad_norm_(flux_transformer.parameters(), args.max_grad_norm)\n```\n\nHowever, there is a bug:\n```bash\n[rank5]: Traceback (most recent call last):\n[rank5]:   File \"/home/code/diffusers/flux/sft_flux.py\", line 1494, in <module>\n[rank5]:     main_with_cleanup(args)\n[rank5]:   File \"/home/code/diffusers/flux/sft_flux.py\", line 1460, in main_with_cleanup\n[rank5]:     main(args)\n[rank5]:   File \"/home/code/diffusers/flux/sft_flux.py\", line 1216, in main\n[rank5]:     grad_norm = accelerator.clip_grad_norm_(flux_transformer.parameters(), args.max_grad_norm)\n[rank5]:                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/accelerate/accelerator.py\", line 2863, in clip_grad_norm_\n[rank5]:     return torch.nn.utils.clip_grad_norm_(\n[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/nn/utils/clip_grad.py\", line 36, in _no_grad_wrapper\n[rank5]:     return func(*args, **kwargs)\n[rank5]:            ^^^^^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/nn/utils/clip_grad.py\", line 222, in clip_grad_norm_\n[rank5]:     _clip_grads_with_norm_(parameters, max_norm, total_norm, foreach)\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/nn/utils/clip_grad.py\", line 36, in _no_grad_wrapper\n[rank5]:     return func(*args, **kwargs)\n[rank5]:            ^^^^^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/nn/utils/clip_grad.py\", line 155, in _clip_grads_with_norm_\n[rank5]:     clip_coef = max_norm / (total_norm + 1e-6)\n[rank5]:                 ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/_tensor.py\", line 39, in wrapped\n[rank5]:     return f(*args, **kwargs)\n[rank5]:            ^^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/_tensor.py\", line 1101, in __rdiv__\n[rank5]:     return self.reciprocal() * other\n[rank5]:            ^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/_compile.py\", line 53, in inner\n[rank5]:     return disable_fn(*args, **kwargs)\n[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/_dynamo/eval_frame.py\", line 929, in _fn\n[rank5]:     return fn(*args, **kwargs)\n[rank5]:            ^^^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/distributed/tensor/_api.py\", line 350, in __torch_dispatch__\n[rank5]:     return DTensor._op_dispatcher.dispatch(\n[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/distributed/tensor/_dispatch.py\", line 166, in dispatch\n[rank5]:     self.redistribute_local_args(\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/distributed/tensor/_dispatch.py\", line 303, in redistribute_local_args\n[rank5]:     resharded_local_tensor = redistribute_local_tensor(\n[rank5]:                              ^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/distributed/tensor/_redistribute.py\", line 208, in redistribute_local_tensor\n[rank5]:     new_local_tensor = partial_spec._reduce_value(\n[rank5]:                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/distributed/tensor/_ops/_math_ops.py\", line 126, in _reduce_value\n[rank5]:     reduced_tensor = super()._reduce_value(tensor, mesh, mesh_dim)\n[rank5]:                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/distributed/tensor/placement_types.py\", line 679, in _reduce_value\n[rank5]:     return funcol.all_reduce(\n[rank5]:            ^^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/distributed/_functional_collectives.py\", line 175, in all_reduce\n[rank5]:     group_name = _resolve_group_name(group, tag)\n[rank5]:                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank5]:   File \"/home/.local/lib/python3.11/site-packages/torch/distributed/_functional_collectives.py\", line 783, in _resolve_group_name\n[rank5]:     return dmesh._dim_group_names[dim]\n[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^\n[rank5]: AttributeError: 'DeviceMesh' obj",
    "url": "https://github.com/huggingface/diffusers/issues/12485",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-14T21:48:35Z",
    "updated_at": "2025-10-15T20:33:30Z",
    "user": "liming-ai"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26840,
    "title": "[Doc]: Update AWQ Guide",
    "body": "### \ud83d\udcda The doc issue\n\nSituation: AutoAWQ functionality was adopted by llm-compressor but vllm [docs](https://docs.vllm.ai/en/latest/features/quantization/auto_awq.html) point to AutoAWQ which is deprecated\n\n\n### Suggest a potential alternative/fix\n\n1) Update the [AutoAWQ guide](https://github.com/vllm-project/vllm/blob/main/docs/features/quantization/auto_awq.md) to use the [llm-compressor](https://github.com/vllm-project/llm-compressor/tree/2a6a0a34c8a57b6090b5fbac9c0659edf982185c/examples/awq) apis/flow\n2) Make sure to also update links in [quantization doc](https://github.com/vllm-project/vllm/blob/main/docs/features/quantization/README.md)\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26840",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-10-14T20:02:21Z",
    "updated_at": "2025-11-03T15:39:12Z",
    "comments": 0,
    "user": "HDCharles"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26838,
    "title": "[Performance]: RTX 6000 PRO - FP8 in sglang is faster",
    "body": "### Proposal to improve performance\n\nCan we have a discussion about the sglang FP8 performance vs VLLM performance - \n\nI'm able to get 133 tokens/sec with sglang GLM-4.5-Air-FP8 vs 78 tokens/sec in VLLM \n\n```PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True USE_TRITON_W8A8_FP8_KERNEL=1 SGL_ENABLE_JIT_DEEPGEMM=0 python -m sglang.launch_server --model /mnt/GLM-4.5-FP8/ --tp 4  --host 0.0.0.0 --port  5000 --mem-fraction-static 0.93 --context-length 128000  --enable-metrics  --attention-backend flashinfer   --tool-call-parser glm45    --reasoning-parser glm45   --served-model-name glm-4.5-air   --chunked-prefill-size 8092 --enable-mixed-chunk   --cuda-graph-max-bs 32   --kv-cache-dtype fp8_e5m2```\n\nIt is using TRITON \n\nI'm not able to achieve the same speed with VLLM with any methods - neither flashinfer, nor triton etc. - the maximum is always around 78 tokens/sec \n\n1) Any idea how to achieve the same 133tokens/sec in VLLM using triton and same configuration like in sglang? \n2) is it cutlass design that it is not that fast as triton? \n\n\n\n\n\n### Report of performance regression\n\n_No response_\n\n### Misc discussion on performance\n\n_No response_\n\n### Your current environment (if you think it is necessary)\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26838",
    "state": "open",
    "labels": [
      "performance"
    ],
    "created_at": "2025-10-14T19:41:14Z",
    "updated_at": "2025-12-29T14:52:57Z",
    "comments": 10,
    "user": "voipmonitor"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165444,
    "title": "AOTInductor not updating buffers inplace",
    "body": "Hey all, \n\nI'd like to double check whether updating buffers inplace is currently supported with AOTInductor? Based on the answers on this issue https://github.com/pytorch/pytorch/issues/159124 I think it should be, but it does not seem to work when I load the module from file. If not, is there any workaround we can use at this time (short of making the function pure)? I'm currently on libtorch 2.8.0.\n\n```\nclass DummyModel(torch.nn.Module):\n  def __init__(self):\n    super().__init__()\n    self.register_buffer(\"counter\", torch.ones(1))\n  \n  def forward(self):\n    self.counter = self.counter + 1.0\n    return self.counter\n  \nep = torch.export.export(DummyModel(), tuple())\nso_path = torch._inductor.aoti_compile_and_package(\n    ep,\n    inductor_configs={\"always_keep_tensor_constants\": True}\n)\nloaded_module = torch._inductor.aoti_load_package(so_path)\n\nprint(ep.module()())\nprint(ep.module()())\nprint(ep.module()())\nprint(loaded_module())\nprint(loaded_module())\nprint(loaded_module())\n```\n```\ntensor([2.])\ntensor([3.])\ntensor([4.])\ntensor([2.])\ntensor([2.])\ntensor([2.])\n```\n@desertfire @ezyang \n\n\ncc @chauhang @penguinwu @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4 @desertfire @chenyang78 @yushangdi @benjaminglass1",
    "url": "https://github.com/pytorch/pytorch/issues/165444",
    "state": "open",
    "labels": [
      "oncall: pt2",
      "oncall: export",
      "module: aotinductor"
    ],
    "created_at": "2025-10-14T16:48:34Z",
    "updated_at": "2025-10-19T23:42:43Z",
    "comments": 2,
    "user": "olarucatalin"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26817,
    "title": "[Feature]: Add process_weights_after_loading to AttentionImpl",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nCurrently, in the `Attention` layer, we check if `process_weights_after_loading` exists and then call it conditionally, and after that we apply flashinfer-specific logic.\n\nInstead, we should just add a `process_weights_after_loading` method to AttentionImpl (no-op) by default, call it from `Attention.process_weights_after_loading`, and override it in `FlashInferAttentionImpl`.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\nhttps://github.com/vllm-project/vllm/pull/23016#discussion_r2414787224\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26817",
    "state": "closed",
    "labels": [
      "help wanted",
      "good first issue",
      "feature request"
    ],
    "created_at": "2025-10-14T15:59:54Z",
    "updated_at": "2025-10-16T15:02:31Z",
    "comments": 2,
    "user": "ProExpertProg"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26806,
    "title": "[Usage]: MCP-USE with VLLM gpt-oss:20b via ChatOpenAI",
    "body": "### Your current environment\n\n```text\nThe output of `python collect_env.py`\n```\n\n\n### How would you like to use vllm\n\ni am trying to create an agent using gpt-oss:20B with mcp-use \n\nmost times the model returns \"Agent completed the task successfully.\", and sometimes the proper output which is required\n\n### code \n`vllm serve openai/gpt-oss-20b     --max-model-len 100000     --gpu-memory-utilization 0.9     --port 8000 --tool-call-parser openai --enable-auto-tool-choice`\n\nclient = MCPClient.from_dict(config)\nllm = ChatOpenAI(\n      model=\"openai/gpt-oss-20b\",\n      base_url=\"http://127.0.0.1:8000/v1\", \n      api_key=\"not-needed\",\n      temperature=0.8,\n      max_tokens=2048\n)\nagent = MCPAgent(llm=llm, client=client, max_steps=30)\n\n\nalso raising this on mcp-use\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26806",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-14T13:00:38Z",
    "updated_at": "2025-11-20T06:33:29Z",
    "comments": 2,
    "user": "Tahirc1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165428,
    "title": "Using NCCL for Global Group and MPI for Sub-Groups in torch.distributed",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI want to mix NCCL and MPI backends in the `torch.distributed` package. Does torch.distributed support using NCCL as the backend when initializing the global process group with `torch.distributed.init_process_group()`, and then using MPI as the backend when creating a sub-process group with `torch.distributed.new_group()`? Or is the opposite operation supported? I encountered errors when I tried this myself.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/165428",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-14T09:26:47Z",
    "updated_at": "2025-10-15T13:44:42Z",
    "comments": 11,
    "user": "cq-eng"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26786,
    "title": "[Usage]: cuda12.8 docker 0.11.0 Error occurs when launching the model, NCCL error: unhandled cuda error.",
    "body": "When I use only a single graphics card, the system can start up normally.\nBelow are Docker configuration files, logs, and environment information.\n\nI encountered this issue when upgrading from version 10.1.1 to 10.2.\n\n[The system generates an error when using dual graphics cards; version 10.1.1 functions correctly, but version 10.2 triggers an error upon execution.](https://github.com/vllm-project/vllm/issues/25813)\n\n### Your current environment\n\n```text\n# vllm collect-env   \nINFO 10-14 19:07:58 [__init__.py:216] Automatically detected platform cuda.\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version                : Could not collect\nCMake version                : version 4.1.0\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.11 (main, Jun  4 2025, 08:56:18) [GCC 11.4.0] (64-bit runtime)\nPython platform              : Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 12.8.93\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : \nGPU 0: NVIDIA GeForce RTX 4090\nGPU 1: NVIDIA GeForce RTX 4090\n\nNvidia driver version        : 571.96\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        46 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               40\nOn-line CPU(s) list:                  0-39\nVendor ID:                            GenuineIntel\nModel name:                           Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz\nCPU family:                           6\nModel:                                85\nThread(s) per core:                   2\nCore(s) per socket:                   20\nSocket(s):                            1\nStepping:                             4\nBogoMIPS:                             4788.75\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch pti ssbd ibrs ibpb stibp fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves md_clear flush_l1d arch_capabilities\nHypervisor vendor:                    Microsoft\nVirtualization type:                  full\nL1d cache:                            640 KiB (20 instances)\nL1i cache:                            640 KiB (20 instances)\nL2 cache:                             20 MiB (20 instances)\nL3 cache:                             27.5 MiB (1 instance)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-39\nVulnerability Gather data sampling:   Unknown: Dependent on hypervisor status\nVulnerability Itlb multihit:          KVM: Mitigation: VMX unsupported\nVulnerability L1tf:                   Mitigation; PTE Inversion\nVulnerability Mds:                    Mitigation; Clear CPU buffers; SMT Host state unknown\nVulnerability Meltdown:               Mitigation; PTI\nVulnerability Mmio stale data:        Mitigation; Clear CPU buffers; SMT Host state unknown\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Mitigation; IBRS\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; IBRS; IBPB conditional; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI SW loop, KVM SW loop\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Mitigation; Clear CPU buffers; SMT Host state unknown\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-python==0.3.1\n[pip3] numpy==",
    "url": "https://github.com/vllm-project/vllm/issues/26786",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-14T09:01:39Z",
    "updated_at": "2025-11-07T17:17:32Z",
    "comments": 3,
    "user": "ooodwbooo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165419,
    "title": "[RFC] Make PyTorch Expandable Segments interoperate with CUDA VMM-based allocators (NCCL ncclMemAlloc)",
    "body": "## Summary\nPyTorch\u2019s expandable segments reduce fragmentation by using CUDA Virtual Memory Management (VMM) to grow/shrink virtual segments instead of relying on cudaMalloc blocks. \n\nSeparately, NCCL\u2019s user buffer registration\u2014including NVLS, General (intra-node) buffer registration, and Window Registration\u2014expects buffers to come from VMM-backed allocators (e.g., ncclMemAlloc or any allocator that produces VMM handles with the documented properties). These registrations lower memory pressure and [can improve overlap/latency for collectives](https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/usage/bufferreg.html).\n\nToday these two don\u2019t compose in PyTorch #147851 enabling expandable segments can prevent custom/VMM allocators from being used (breaking NCCL registration flows), and the current NCCL mem-pool registration path is brittle when expandable segments is on.\n\nThis RFC proposes incremental changes so expandable segments and VMM-based allocators interoperate cleanly, enabling users to (a) keep expandable segments on to reduce fragmentation and (b) opt into NCCL registration (NVLS / General / Window) for zero-copy and better communication\u2013computation overlap.\n\nSolving this problem could lead to other beneficial outcomes, #158029 maybe related\n\n## Design overview\n\nWe propose two compatible tracks. Plan 2 is minimal risk and unblocks NCCL users quickly; Plan 1 is a deeper integration that generalizes expandable segments to any VMM source, including ncclMemAlloc.\n\n### Plan 2 (near-term): Make NCCL registerMemPool fully work when expandable segments is on\n\nWhen users register tensors with ncclCommRegister, it should just work with expandable segments enabled. \n\n[NCCL\u2019s docs](https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/usage/bufferreg.html#mem-allocator) explicitly allow buffer registration with any VMM-based allocator so long as the allocation/handle/align rules are met (recommended granularity, shared handle types for NVLS, etc.). Expandable segments already use CUDA VMM under the hood; the missing piece is to ensure the buffers we hand to NCCL truly originate from CUDACachingAllocator that NCCL can recognize/retain, and that our allocator bookkeeping & snapshots remain consistent with expandable segments. \n\nWe currently depend on c10::cuda::CUDACachingAllocator::snapshot to dump segments for ncclCommRegister import. We must ensure this process functions correctly.\n\n### Plan 1 (mid-term): Let expandable segments adopt external VMM allocations (generalize expandable segments to any VMM allocator)\n\nIf users (or plugins) allocate memory via ncclMemAlloc or another VMM allocator, expandable segments can \u201cimport\u201d those physical allocations by retaining the underlying VMM handle and mapping them into expandable segments virtual address ranges. Then expandable segments can manage growth/shrink and all the usual segment lifecycle while keeping NCCL registration happy.\n\nWe can use cuMemRetainAllocationHandle to recover the CUmemGenericAllocationHandle from any mapped address the external allocator returned. The API guarantees the returned handle equals the one used for mapping; any address within the mapped range works. Once we have the handle, expandable segments can unmap/remap subranges into its own reserved VA space (cuMemAddressReserve, cuMemMap, cuMemSetAccess) and track page-level occupancy in expandable segments bookkeeping, enabling co-existence with expandable segments growth policies and freeing fully unused pages.\n\ncc @ptrblck @msaroufim @eqy @jerryzh168 @ngimel @syed-ahmed \n",
    "url": "https://github.com/pytorch/pytorch/issues/165419",
    "state": "closed",
    "labels": [
      "module: cuda",
      "triaged",
      "module: nccl",
      "module: CUDACachingAllocator"
    ],
    "created_at": "2025-10-14T07:53:01Z",
    "updated_at": "2025-12-10T17:12:45Z",
    "comments": 14,
    "user": "eee4017"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26774,
    "title": "[Usage]: how to use vllm on CUDA 12.9",
    "body": "### Your current environment\n\n```text\nTraceback (most recent call last):\n  File \"/vllm-workspace/collect_env.py\", line 825, in <module>\n    main()\n  File \"/vllm-workspace/collect_env.py\", line 804, in main\n    output = get_pretty_env_info()\n             ^^^^^^^^^^^^^^^^^^^^^\n  File \"/vllm-workspace/collect_env.py\", line 799, in get_pretty_env_info\n    return pretty_str(get_env_info())\n                      ^^^^^^^^^^^^^^\n  File \"/vllm-workspace/collect_env.py\", line 619, in get_env_info\n    cuda_module_loading=get_cuda_module_loading_config(),\n                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/vllm-workspace/collect_env.py\", line 540, in get_cuda_module_loading_config\n    torch.cuda.init()\n  File \"/usr/local/lib/python3.12/dist-packages/torch/cuda/__init__.py\", line 339, in init\n    _lazy_init()\n  File \"/usr/local/lib/python3.12/dist-packages/torch/cuda/__init__.py\", line 372, in _lazy_init\n    torch._C._cuda_init()\nRuntimeError: No CUDA GPUs are available\nroot@test2222-7dcd6b94b7-wl6w4:/vllm-workspace# python3 --version\nPython 3.12.1\n```\n\n\n### How would you like to use vllm\n\nMy node CUDA version is 12.9, and the running pod image CUDA variable is 12.8. Will this cause the No CUDA GPUs are available error? Is 12.9 compatible with version 12.8? Should we upgrade the VLLM version or lower the CUDA version of the node to 12.8\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26774",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-14T07:30:56Z",
    "updated_at": "2025-10-14T07:40:08Z",
    "comments": 1,
    "user": "Mrpingdan"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26772,
    "title": "[Feature]: Option kv_event default config",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nCurrent kv_event config publisher is null, but endpoint is zmq endpoint, so when not set publisher config, vllm cannot start, got a error: `EventPublisher.__init__() got an unexpected keyword argument 'endpoint'`.\n\nCan we change this default publisher to zmq, when start enable_kv_cache_events after use can direct use.\nhttps://github.com/vllm-project/vllm/blob/d32c611f455766c9d67034b5e0f8e66f28f4a3ba/vllm/config/kv_events.py#L20-L24\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26772",
    "state": "closed",
    "labels": [
      "feature request"
    ],
    "created_at": "2025-10-14T07:08:58Z",
    "updated_at": "2025-10-22T19:19:34Z",
    "comments": 5,
    "user": "lengrongfu"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26762,
    "title": "[Usage]: about curl http://ip:8000/metrics",
    "body": "### Your current environment\n\nWhen I run this command, I get the following results: \n# HELP python_gc_objects_collected_total Objects collected during gc\n# TYPE python_gc_objects_collected_total counter\npython_gc_objects_collected_total{generation=\"0\"} 12286.0\npython_gc_objects_collected_total{generation=\"1\"} 1244.0\npython_gc_objects_collected_total{generation=\"2\"} 1326.0\n# HELP python_gc_objects_uncollectable_total Uncollectable objects found during GC\n# TYPE python_gc_objects_uncollectable_total counter\npython_gc_objects_uncollectable_total{generation=\"0\"} 0.0\npython_gc_objects_uncollectable_total{generation=\"1\"} 0.0\npython_gc_objects_uncollectable_total{generation=\"2\"} 0.0\n# HELP python_gc_collections_total Number of times this generation was collected\n# TYPE python_gc_collections_total counter\npython_gc_collections_total{generation=\"0\"} 1378.0\npython_gc_collections_total{generation=\"1\"} 124.0\npython_gc_collections_total{generation=\"2\"} 9.0\n# HELP python_info Python platform information\n# TYPE python_info gauge\npython_info{implementation=\"CPython\",major=\"3\",minor=\"12\",patchlevel=\"11\",version=\"3.12.11\"} 1.0\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.1701968896e+010\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.045848064e+09\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.76036994809e+09\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 148.44\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 69.0\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.048576e+06\n# HELP http_requests_total Total number of requests by method, status and handler.\n# TYPE http_requests_total counter\nhttp_requests_total{handler=\"none\",method=\"GET\",status=\"4xx\"} 1.0\n# HELP http_requests_created Total number of requests by method, status and handler.\n# TYPE http_requests_created gauge\nhttp_requests_created{handler=\"none\",method=\"GET\",status=\"4xx\"} 1.7604160309440813e+09\n# HELP http_request_size_bytes Content length of incoming requests by handler. Only value of header is respected. Otherwise ignored. No percentile calculated. \n# TYPE http_request_size_bytes summary\nhttp_request_size_bytes_count{handler=\"none\"} 1.0\nhttp_request_size_bytes_sum{handler=\"none\"} 0.0\n# HELP http_request_size_bytes_created Content length of incoming requests by handler. Only value of header is respected. Otherwise ignored. No percentile calculated. \n# TYPE http_request_size_bytes_created gauge\nhttp_request_size_bytes_created{handler=\"none\"} 1.7604160309442668e+09\n# HELP http_response_size_bytes Content length of outgoing responses by handler. Only value of header is respected. Otherwise ignored. No percentile calculated. \n# TYPE http_response_size_bytes summary\nhttp_response_size_bytes_count{handler=\"none\"} 1.0\nhttp_response_size_bytes_sum{handler=\"none\"} 22.0\n# HELP http_response_size_bytes_created Content length of outgoing responses by handler. Only value of header is respected. Otherwise ignored. No percentile calculated. \n# TYPE http_response_size_bytes_created gauge\nhttp_response_size_bytes_created{handler=\"none\"} 1.7604160309445088e+09\n# HELP http_request_duration_highr_seconds Latency with many buckets but no API specific labels. Made for more accurate percentile calculations. \n# TYPE http_request_duration_highr_seconds histogram\nhttp_request_duration_highr_seconds_bucket{le=\"0.01\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"0.025\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"0.05\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"0.075\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"0.1\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"0.25\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"0.5\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"0.75\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"1.0\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"1.5\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"2.0\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"2.5\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"3.0\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"3.5\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"4.0\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"4.5\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"5.0\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"7.5\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"10.0\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"30.0\"} 1.0\nhttp_request_duration_highr_seconds_bucket{le=\"60.0\"} 1.0\nhttp_request_duration_highr_se",
    "url": "https://github.com/vllm-project/vllm/issues/26762",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-14T05:13:30Z",
    "updated_at": "2025-10-14T05:13:30Z",
    "comments": 0,
    "user": "Renoshen"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2194,
    "title": "During training with PI0, the loss is very low. Is this normal, and is the training proceeding correctly?",
    "body": "I am currently training with PI05.\n\n<img width=\"1039\" height=\"355\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/5ab3f3e0-82bc-403c-8124-416b330dab14\" />\n\n`INFO 2025-10-14 04:57:11 ot_train.py:299 step:10 smpl:320 ep:0 epch:0.00 loss:0.468 grdn:3.522 lr:1.6e-07 updt_s:4.906 data_s:4.874 INFO 2025-10-14 04:57:59 ot_train.py:299 step:20 smpl:640 ep:0 epch:0.00 loss:0.467 grdn:3.936 lr:4.1e-07 updt_s:4.807 data_s:0.008 INFO 2025-10-14 04:58:48 ot_train.py:299 step:30 smpl:960 ep:0 epch:0.01 loss:0.508 grdn:3.973 lr:6.6e-07 updt_s:4.815 data_s:0.009 INFO 2025-10-14 04:59:36 ot_train.py:299 step:40 smpl:1K ep:1 epch:0.01 loss:0.513 grdn:3.805 lr:9.1e-07 updt_s:4.841 data_s:0.009`\n\nThe loss is very low right from the start of training. Is it training normally?",
    "url": "https://github.com/huggingface/lerobot/issues/2194",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-10-14T05:04:31Z",
    "updated_at": "2025-10-14T08:19:29Z",
    "user": "pparkgyuhyeon"
  },
  {
    "repo": "huggingface/peft",
    "number": 2832,
    "title": "Gradient checkpoint with multiple adapters",
    "body": "I'm not sure if it can be considered as a bug since I might be using the library differently from how it's supposed to be used.\n\n\n**Context:**\n\n I have a PeftModel that need to be infered with 2 different inputs.\nFor each input I have a pretrained adapter that is frozen and a new adapter for finetuning.\n\nMy forward does:\n```\nfor name, x in inputs:\n   mypeft_model.base_model.set_adapter([name+'pretrain',name+'ft'])\n   custom_set_pretrain_grad_false_ft_true() #Doing it because set_adapter force gradients to True cf 2759#issue-3363985341\n   feature = mypeft_model(x)\n```\n (https://github.com/huggingface/peft/issues/2759#issue-3363985341)\n**Issue:**\n1) if mypeft_model contains cp.checkpoint(mymodule, x), the backpropagation will not update properly the weight of the LoRA layers in my module either because it did not 'see the set_adapter' or it did not 'see the force grad'\n2) A work around I have found is to wrap the whole code inside the loop with a cp.checkpoint but it's super heavy on the memory as I have to store all in GPU until the end of the backbone (ViT-G 40 blocks transformers)\n\n**Question:**\nIs there anyway to 'provide' the context to the backpropagation even using gradient checkpointing when switching adapters in the forward?\nI have not explored huggingface transformers.enable_gradient_checkpointing() since I'm using a custom model and I'm unsure if it fits for my problem.\n",
    "url": "https://github.com/huggingface/peft/issues/2832",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-14T03:53:10Z",
    "updated_at": "2025-12-15T08:24:03Z",
    "comments": 3,
    "user": "NguyenRichard"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2192,
    "title": "how to test PI0's output",
    "body": "i use this code to test pi0's output:\n\ndef main():\n    # Create a directory to store the training checkpoint.\n    output_directory = Path(\"outputs/example_aloha_static_coffee\")\n    output_directory.mkdir(parents=True, exist_ok=True)\n\n    # # Select your device\n    device = torch.device(\"cuda\")\n\n    # Number of offline training steps (we'll only do offline training for this example.)\n    # Adjust as you prefer. 5000 steps are needed to get something worth evaluating.\n    training_steps = 500\n    log_freq = 1\n\n    # When starting from scratch (i.e. not from a pretrained policy), we need to specify 2 things before\n    # creating the policy:\n    #   - input/output shapes: to properly size the policy\n    #   - dataset stats: for normalization and denormalization of input/outputs\n    dataset_metadata = LeRobotDatasetMetadata(\"lerobot/aloha_static_coffee\")\n    print(dataset_metadata.features.keys())\n    features = dataset_to_policy_features(dataset_metadata.features)\n    output_features = {key: ft for key, ft in features.items() if ft.type is FeatureType.ACTION}\n    input_features = {key: ft for key, ft in features.items() if key not in output_features}\n\n    # Policies are initialized with a configuration class, in this case `PI0Config`. For this example,\n    # we'll just use the defaults and so no arguments other than input/output features need to be passed.\n    cfg = PI0Config(input_features=input_features, output_features=output_features)\n    print(cfg)\n\n    # We can now instantiate our policy with this config and the dataset stats.\n    policy = PI0Policy(cfg)\n    policy.train()\n    policy.to(device)\n    preprocessor, postprocessor = make_pre_post_processors(cfg, dataset_stats=dataset_metadata.stats)\n\n    # We can then instantiate the dataset with these delta_timestamps configuration.\n    dataset = LeRobotDataset(\"lerobot/aloha_static_coffee\")\n\n    # \u53d6\u4e00\u6761\u6570\u636e\u8fdb\u884c\u8bd5\u9a8c\n    state = dataset[20][\"observation.state\"]\n    image_cam_high = dataset[20][\"observation.images.cam_high\"]\n    image_cam_left_wrist = dataset[20][\"observation.images.cam_left_wrist\"]\n    image_cam_low = dataset[20][\"observation.images.cam_low\"]\n    image_cam_right_wrist = dataset[20][\"observation.images.cam_right_wrist\"]\n    effort = dataset[20][\"observation.effort\"]\n    state = state.unsqueeze(0).to(device)\n    image_cam_high = image_cam_high.unsqueeze(0).to(device)\n    image_cam_left_wrist = image_cam_left_wrist.unsqueeze(0).to(device)\n    image_cam_low = image_cam_low.unsqueeze(0).to(device)\n    image_cam_right_wrist = image_cam_right_wrist.unsqueeze(0).to(device)\n    effort = effort.unsqueeze(0).to(device)\n    print(\"State size: \", state.size())\n    print(\"Image size: \", image_cam_high.size())\n    print(\"Effort size: \", effort.size())\n    observation = {\n        \"observation.state\": state,\n        \"observation.images.cam_high\": image_cam_high,\n        \"observation.images.cam_left_wrist\": image_cam_left_wrist,\n        \"observation.images.cam_low\": image_cam_low,\n        \"observation.images.cam_right_wrist\": image_cam_right_wrist,\n        \"observation.effort\": effort,\n    }\n\n    # \u8f93\u51faaction\n    with torch.inference_mode():\n        action = policy.select_action(observation)\n        numpy_action = action.squeeze(0).to(\"cpu\").numpy()\n        print(\"Action: \", numpy_action)\n\n\nbut got an error:\n\nTraceback (most recent call last):\n  File \"/home/wjg/trainpi0.py\", line 140, in <module>\n    main()\n  File \"/home/wjg/trainpi0.py\", line 129, in main\n    action = policy.select_action(observation)\n  File \"/data/wjg_files/anaconda3/envs/lerobot/lib/python3.10/site-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n    return func(*args, **kwargs)\n  File \"/data/wjg_files/lerobot/src/lerobot/policies/pi0/modeling_pi0.py\", line 1144, in select_action\n    actions = self.predict_action_chunk(batch)[:, : self.config.n_action_steps]\n  File \"/data/wjg_files/anaconda3/envs/lerobot/lib/python3.10/site-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n    return func(*args, **kwargs)\n  File \"/data/wjg_files/lerobot/src/lerobot/policies/pi0/modeling_pi0.py\", line 1157, in predict_action_chunk\n    lang_tokens, lang_masks = batch[f\"{OBS_LANGUAGE_TOKENS}\"], batch[f\"{OBS_LANGUAGE_ATTENTION_MASK}\"]\nKeyError: 'observation.language.tokens'\n\nhow to solve it?",
    "url": "https://github.com/huggingface/lerobot/issues/2192",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-10-14T03:36:43Z",
    "updated_at": "2025-10-17T09:56:46Z",
    "user": "Addog666"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26749,
    "title": "[Bug]: InternVL: passing image embeddings triggers TypeError: can only concatenate tuple (not \"Tensor\") to tuple in get_multimodal_embeddings, and v1 sanity check then expects a sequence of 2D tensors",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\n# Title\nInternVL: passing image **embeddings** triggers `TypeError: can only concatenate tuple (not \"Tensor\") to tuple` in `get_multimodal_embeddings`, and v1 sanity check then expects a sequence of 2D tensors\n\n## Environment\n- vLLM: 0.10.2 (also reproducible on 0.10.1)\n- Python: 3.11.x\n- Model: `InternVL3_5-1B` (HF, `trust_remote_code=True`)\n\n## Minimal Repro (image **embeddings** input)\n```python\nfrom vllm import LLM\nimport torch\n\nllm = LLM(model=\"InternVL3_5-1B\", trust_remote_code=True)\n\nprompt = \"USER: <image>\\nWhat is this image?\\nASSISTANT:\"\n\n# 3D embeddings: [B, T, H] just to illustrate the bug (B=1 here)\n# H equals the LM hidden_size for the given weight; using 1024 to reproduce.\nimage_embeds = torch.randn(1, 16, 1024)\n\nout = llm.generate({\n    \"prompt\": prompt,\n    \"multi_modal_data\": {\"image\": image_embeds},  # or {\"images\": image_embeds}\n})\nprint(out[0].outputs[0].text)\n```\n\n## Actual Behavior / Stack\nOn 0.10.2:\n\n```\nFile \".../vllm/model_executor/models/internvl.py\", line 1328, in get_multimodal_embeddings\n    multimodal_embeddings += vision_embeddings\nTypeError: can only concatenate tuple (not \"Tensor\") to tuple\n```\n\nIf we monkey-patch around the above concat, the engine soon asserts:\n\n```\nvllm/v1/worker/utils.py\", line 155, in sanity_check_mm_encoder_outputs\nAssertionError: Expected multimodal embeddings to be a sequence of 2D tensors,\nbut got tensors with shapes [torch.Size([1, 16, 1024])] instead.\nThis is most likely due to incorrect implementation of the model's `get_multimodal_embeddings` method.\n```\n\nSo there are **two inconsistencies**:\n1) `get_multimodal_embeddings` sometimes returns a **Tensor** (3D) but the code path later concatenates assuming a **tuple** of tensors.  \n2) v1 expects a **sequence of 2D tensors `[T, H]`**, but the current image-embeddings path can yield a **3D** `[B, T, H]` tensor (batch dimension not flattened), which fails the sanity check.\n\n## Expected Behavior\n- Passing embeddings should **not crash**, whether provided as:\n  - a single 2D tensor `[T, H]` (one image), or\n  - a 3D tensor `[B, T, H]` (batch of images), or\n  - a list/tuple of 2D tensors.  \n- `get_multimodal_embeddings` should normalize its outputs to a **sequence of 2D tensors** to satisfy `sanity_check_mm_encoder_outputs`.\n\n## Why this matters\nInternVL supports both pixel inputs and precomputed **embeddings**. The embedding path is useful in production pipelines (pre-encode vision on different hardware, caching, etc.). Currently in 0.10.1/0.10.2 this path is broken due to type/shape inconsistencies, blocking these use-cases.\n\n## Proposed Fix (minimal)\nNormalize to a sequence of 2D tensors before concatenation. For example, in `vllm/model_executor/models/internvl.py` inside `get_multimodal_embeddings(...)`:\n\n```diff\n@@\n-                vision_embeddings = self._process_image_input(image_input)\n-                if torch.is_tensor(vision_embeddings):\n-                    vision_embeddings = (vision_embeddings,)\n-                multimodal_embeddings += vision_embeddings\n+                vision_embeddings = self._process_image_input(image_input)\n+\n+                # Normalize to tuple[Tensor[T,H], ...]\n+                def _to_2d_seq(x):\n+                    import torch\n+                    if torch.is_tensor(x):\n+                        if x.ndim == 3:        # [B, T, H] -> B * [T,H]\n+                            return tuple(x.unbind(0))\n+                        elif x.ndim == 2:      # [T, H]\n+                            return (x,)\n+                        raise TypeError(f\"vision embeddings must be 2D/3D, got shape {tuple(x.shape)}\")\n+                    elif isinstance(x, (list, tuple)):\n+                        out = []\n+                        for e in x:\n+                            out.extend(_to_2d_seq(e))\n+                        return tuple(out)\n+                    else:\n+                        raise TypeError(f\"unexpected type for vision embeddings: {type(x)}\")\n+\n+                vision_embeddings = _to_2d_seq(vision_embeddings)\n+                multimodal_embeddings += vision_embeddings\n```\n\nAdditionally, consider accepting both `\"image\"` and `\"images\"` as modality keys (a few code paths assume `\"images\"`), or clarify in docs which key is canonical.\n\n## Workarounds we tried\n- Wrapping the returned tensor into a tuple (avoids the first `TypeError`), but the v1 sanity check still fails because the output remains 3D.\n- Providing embeddings as a list of 2D tensors `[T, H]` works, but many upstream encoders naturally produce `[B, T, H]`, so normalizing in the model executor is safer.\n- Pixel input path works and can be used as a temporary fallback, but defeats the purpose of passing precomputed embeddings.\n\n## Version Matrix\n- \u2705 Pixel input: OK on 0.10.1 and 0.10.2  \n- \u274c Embedding input: crashe",
    "url": "https://github.com/vllm-project/vllm/issues/26749",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-14T03:01:33Z",
    "updated_at": "2025-10-14T09:36:22Z",
    "comments": 1,
    "user": "BlueBlueFF"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41554,
    "title": "model.from_pretrained( . . . ) not loading needed weights/parameters",
    "body": "I am performing quantization of a PatchTSTForPrediction model and attempting to load a saved quantized model for testing. Model is saved using `model.save_pretrained( . . . )`. Testing proceeds perfectly once performed immediately after QAT (Hugging face trainer's handles loading at the end of training); however, when attempting to load a saved quantized (trained) model, the error below occurs. I perform all the pre-quantization preparation so that the model contains all the necessary parameters (untrained) and then try to load the saved checkpoint. How can I force `from_pretrained( . . . )` to load ALL required weights?  \n\n`Some weights of the model checkpoint at ./checkpoints/ . . . were not used when initializing PatchTSTForPrediction: ['head.projection.calib_counter', 'head.projection.num_module_called', 'head.projection.obsrv_clipval', 'head.projection.obsrv_clipvaln', 'head.projection.obsrv_w_clipval', 'head.projection.quantize_feature.clip_val', 'head.projection.quantize_feature.clip_valn', 'head.projection.quantize_weight.clip_val', 'model.encoder.layers.0.ff.0.calib_counter', 'model.encoder.layers.0.ff.0.num_module_called', 'model.encoder.layers.0.ff.0.obsrv_clipval', 'model.encoder.layers.0.ff.0.obsrv_clipvaln', 'model.encoder.layers.0.ff.0.obsrv_w_clipval', 'model.encoder.layers.0.ff.0.quantize_feature.clip_val', 'model.encoder.layers.0.ff.0.quantize_feature.clip_valn', 'model.encoder.layers.0.ff.0.quantize_weight.clip_val', 'model.encoder.layers.0.ff.3.calib_counter', 'model.encoder.layers.0.ff.3.num_module_called', 'model.encoder.layers.0.ff.3.obsrv_clipval', 'model.encoder.layers.0.ff.3.obsrv_clipvaln', 'model.encoder.layers.0.ff.3.obsrv_w_clipval', 'model.encoder.layers.0.ff.3.quantize_feature.clip_val', 'model.encoder.layers.0.ff.3.quantize_feature.clip_valn', 'model.encoder.layers.0.ff.3.quantize_weight.clip_val', 'model.encoder.layers.0.self_attn.QBmm52.num_module_called', 'model.encoder.layers.0.self_attn.QBmm52.quantize_m1.clip_val', 'model.encoder.layers.0.self_attn.QBmm52.quantize_m1.clip_valn', 'model.encoder.layers.0.self_attn.QBmm52.quantize_m2.clip_val', 'model.encoder.layers.0.self_attn.QBmm52.quantize_m2.clip_valn', 'model.encoder.layers.0.self_attn.QBmm62.num_module_called', 'model.encoder.layers.0.self_attn.QBmm62.quantize_m1.clip_val', 'model.encoder.layers.0.self_attn.QBmm62.quantize_m1.clip_valn', 'model.encoder.layers.0.self_attn.QBmm62.quantize_m2.clip_val', 'model.encoder.layers.0.self_attn.QBmm62.quantize_m2.clip_valn', 'model.encoder.layers.0.self_attn.k_proj.calib_counter', 'model.encoder.layers.0.self_attn.k_proj.num_module_called', 'model.encoder.layers.0.self_attn.k_proj.obsrv_clipval', 'model.encoder.layers.0.self_attn.k_proj.obsrv_clipvaln', 'model.encoder.layers.0.self_attn.k_proj.obsrv_w_clipval', 'model.encoder.layers.0.self_attn.k_proj.quantize_feature.clip_val', 'model.encoder.layers.0.self_attn.k_proj.quantize_feature.clip_valn', 'model.encoder.layers.0.self_attn.k_proj.quantize_weight.clip_val', 'model.encoder.layers.0.self_attn.out_proj.calib_counter', . . .]\n\nThis IS expected if you are initializing PatchTSTForPrediction from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\nThis IS NOT expected if you are initializing PatchTSTForPrediction from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).` \n\nNB: QAT is simulated. Additional parameters are added to the model after qmodel_prep is called and QAT proceeds as normal. I am using IBM's fms-model-optimizer.  ",
    "url": "https://github.com/huggingface/transformers/issues/41554",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-13T23:20:20Z",
    "updated_at": "2025-11-24T08:03:05Z",
    "comments": 5,
    "user": "lorsonblair"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165324,
    "title": "How to enable Bfloat16 when using torch.func.jvp",
    "body": "### \ud83d\udc1b Describe the bug\n\n```python\nmodel_partial = partial(model_fn, **inputs)\njvp_args = (\n    lambda z, t, r: model_partial(latents=z, timestep=t, r_timestep=r),\n    (z, t, r),\n    (v_hat, torch.ones_like(t).to(x.dtype), torch.zeros_like(r).to(x.dtype)),\n)\n\nwith torch.autocast(device_type=\"cuda\", dtype=torch.bfloat16, enabled=False):\n    if self.create_graph:\n        u, dudt = self.jvp_fn(*jvp_args, create_graph=True)\n    else:\n        u, dudt = self.jvp_fn(*jvp_args)\n```\n\nI was training models in mixed precision of bfloat16. And I used deepspeed stage3, and enabled gradient checkpointing. But while calling the torch.func.jvp, the input seems to be automatically converted to float type. The error is as follows:\n\n```\n  File \"/datadrive/DiffSynth-Studio/diffsynth/models/qwen_image_dit.py\", line 283, in forward\n    img_q, img_k, img_v = self.to_q(image), self.to_k(image), self.to_v(image)\n  File \"/home/t2vg-a100-G4-42/.conda/envs/qwenimage/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1739, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n  File \"/home/t2vg-a100-G4-42/.conda/envs/qwenimage/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1750, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/home/t2vg-a100-G4-42/.conda/envs/qwenimage/lib/python3.10/site-packages/peft/tuners/lora/layer.py\", line 758, in forward\n    result = self.base_layer(x, *args, **kwargs)\n  File \"/home/t2vg-a100-G4-42/.conda/envs/qwenimage/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1739, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n  File \"/home/t2vg-a100-G4-42/.conda/envs/qwenimage/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1750, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/home/t2vg-a100-G4-42/.conda/envs/qwenimage/lib/python3.10/site-packages/torch/nn/modules/linear.py\", line 127, in forward\n    return F.linear(input.to(self.weight.dtype), self.weight, self.bias)\nRuntimeError: expected mat1 and mat2 to have the same dtype, but got: float != c10::BFloat16\n```\n\nHow to force the jvp function to use bfloat16 type in its calculation?\n\n### Versions\n\nPyTorch version: 2.6.0+cu124\nIs debug build: False\nCUDA used to build PyTorch: 12.4\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 20.04.6 LTS (x86_64)\nGCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0\nClang version: Could not collect\nCMake version: version 3.16.3\nLibc version: glibc-2.31\n\nPython version: 3.10.18 (main, Jun  5 2025, 13:14:17) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-5.15.0-1017-azure-x86_64-with-glibc2.31\nIs CUDA available: True\nCUDA runtime version: 12.1.66\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: \nGPU 0: NVIDIA A100 80GB PCIe\nGPU 1: NVIDIA A100 80GB PCIe\nGPU 2: NVIDIA A100 80GB PCIe\nGPU 3: NVIDIA A100 80GB PCIe\n\nNvidia driver version: 530.30.02\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nByte Order:                      Little Endian\nAddress sizes:                   48 bits physical, 48 bits virtual\nCPU(s):                          96\nOn-line CPU(s) list:             0-95\nThread(s) per core:              1\nCore(s) per socket:              48\nSocket(s):                       2\nNUMA node(s):                    4\nVendor ID:                       AuthenticAMD\nCPU family:                      25\nModel:                           1\nModel name:                      AMD EPYC 7V13 64-Core Processor\nStepping:                        1\nCPU MHz:                         2445.434\nBogoMIPS:                        4890.86\nHypervisor vendor:               Microsoft\nVirtualization type:             full\nL1d cache:                       3 MiB\nL1i cache:                       3 MiB\nL2 cache:                        48 MiB\nL3 cache:                        384 MiB\nNUMA node0 CPU(s):               0-23\nNUMA node1 CPU(s):               24-47\nNUMA node2 CPU(s):               48-71\nNUMA node3 CPU(s):               72-95\nVulnerability Itlb multihit:     Not affected\nVulnerability L1tf:              Not affected\nVulnerability Mds:               Not affected\nVulnerability Meltdown:          Not affected\nVulnerability Mmio stale data:   Not affected\nVulnerability Retbleed:          Not affected\nVulnerability Spec store bypass: Vulnerable\nVulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:        Mitigation; Retpolines, STIBP disabled, RSB filling\nVulnerability Srbds:             Not affected\nVulnerability Tsx async abort:   Not affected\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid ",
    "url": "https://github.com/pytorch/pytorch/issues/165324",
    "state": "open",
    "labels": [
      "triaged",
      "module: amp (automated mixed precision)",
      "release notes: torch.func"
    ],
    "created_at": "2025-10-13T14:52:15Z",
    "updated_at": "2025-10-27T15:23:35Z",
    "user": "pnotp"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165319,
    "title": "Memory leak when converting from numpy array",
    "body": "### \ud83d\udc1b Describe the bug\n\nJust faced a weird memory leak in my code that uses both numpy and pytorch on cpu (to exploit some scipy functionalities first, before using pytorch ones). Here is a minimal example that reproduces the leak on my laptop. I faced it on python 3.10 and then python 3.13 with pytorch 2.8.0.\n\n```python\nfrom typing import List, Tuple\nimport time\n\nimport numpy as np\nimport torch\nimport tqdm\nimport psutil\n\n\ndef minimal_leak(n: int, shape: Tuple[int, ...]) -> List:\n    L = []\n    for _ in tqdm.trange(n):\n        time.sleep(0.001)  # Let's not be to fast to see how memory explodes\n        x = np.zeros(shape, dtype=np.float64)\n        # x = f(x)  # Use some numpy fct\n\n        # Convert to torch to use some torch fct\n        x_pt = torch.from_numpy(x).to(torch.float32)\n        L.append(x_pt)  # Add x_pt = f_pt(x_pt)\n\n        # But in fact, let's remove x_pt and keep only something related to it\n        # The memory for x/x_pt should be released at some point\n        L[-1] = torch.ones(10, dtype=torch.int64)\n\n    return L\n\n\ndef minimal_no_leak(n: int, shape: Tuple[int, ...]) -> List:\n    \"\"\"Same as minimal link, but store a float instead of a tensor in L\"\"\"\n    L = []\n    for _ in tqdm.trange(n):\n        time.sleep(0.001)  # Let's not be to fast to see how memory explodes\n        x = np.zeros(shape, dtype=np.float64)\n        # x = f(x)  # Use some numpy fct\n\n        # Convert to torch to use some torch fct\n        x_pt = torch.from_numpy(x).to(torch.float32)\n        L.append(x_pt)  # Add x_pt = f_pt(x_pt)\n\n        # But in fact, let's remove x_pt and keep only something related to it\n        # The memory for x/x_pt should be released at some point\n        L[-1] = 0.0\n\n    return L\n\n\ndef minimal_no_leak_2(n: int, shape: Tuple[int, ...]) -> List:\n    \"\"\"Same as minimal link, but don't clone (or move to another dtype) x\"\"\"\n    L = []\n    for _ in tqdm.trange(n):\n        time.sleep(0.001)  # Let's not be to fast to see how memory explodes\n        x = np.zeros(shape, dtype=np.float64)\n        # x = f(x)  # Use some numpy fct\n\n        # Convert to torch to use some torch fct\n        x_pt = torch.from_numpy(x)\n        L.append(x_pt)  # Add x_pt = f_pt(x_pt)\n\n        # But in fact, let's remove x_pt and keep only something related to it\n        # The memory for x/x_pt should be released at some point\n        L[-1] = torch.ones(10, dtype=torch.int64)\n\n    return L\n\n\nprocess = psutil.Process()\nresults = []\nfor i in tqdm.trange(50):\n    tqdm.tqdm.write(f\"Memory used: {process.memory_info().rss / 1024**3}\")\n\n    results.extend(minimal_leak(1000, (1, 500, 500)))  # Leak\n    # results.extend(minimal_leak(1000, (50, 500, 500)))  # With large tensors the leak vanishes (probably from specific reuse of \"small\" tensors by torch?)\n    # results.extend(minimal_no_leak(1000, (1, 500, 500)))  # No leak\n    # results.extend(minimal_no_leak_2(1000, (1, 500, 500)))  # No leak\n```\n\nClearly minimal_leak should not leak memory (though I agree my example is a bit far-fetched, my code somehow does something similar, but going through more complex structure and operations). I provided two similar version of the code that do not leak memory, which clearly shows that something weird is happening.\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.8.0+cu128\nIs debug build: False\nCUDA used to build PyTorch: 12.8\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 22.04.5 LTS (x86_64)\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0\nClang version: 14.0.0-1ubuntu1.1\nCMake version: version 4.1.2\nLibc version: glibc-2.35\n\nPython version: 3.13.7 | packaged by Anaconda, Inc. | (main, Sep  9 2025, 19:59:03) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-5.15.0-153-generic-x86_64-with-glibc2.35\nIs CUDA available: True\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 3070 Laptop GPU\nNvidia driver version: 535.247.01\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           39 bits physical, 48 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  16\nOn-line CPU(s) list:                     0-15\nVendor ID:                               GenuineIntel\nModel name:                              11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz\nCPU family:                              6\nModel:                                   141\nThread(s) per core:                      2\nCore(s) per socket:                      8\nSocket(s):                               1\nStepping:                                1\nCPU max MHz:                             4600,0000\nCPU min MHz:                             800,0000\nBogoMIPS:                                4608.00\nFlags:                  ",
    "url": "https://github.com/pytorch/pytorch/issues/165319",
    "state": "open",
    "labels": [
      "module: memory usage",
      "triaged",
      "module: numpy"
    ],
    "created_at": "2025-10-13T13:58:22Z",
    "updated_at": "2025-10-14T08:06:37Z",
    "comments": 4,
    "user": "raphaelreme"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2186,
    "title": "how to load pi0?",
    "body": "i use this code to load pi0:\n\n```python\nfrom lerobot.policies.pi0.modeling_pi0 import PI0Policy\nimport torch\n\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\npretrained_policy_path = \"lerobot/pi0_libero_base\"\n\npolicy = PI0Policy.from_pretrained(pretrained_policy_path).to(device)\n```\n\nbut throws an error:\n\n```bash\nTraceback (most recent call last):\n  File \"/home/wjg/pi0.py\", line 16, in <module>\n    policy = PI0Policy.from_pretrained(pretrained_policy_path).to(device)\n  File \"/data/wjg_files/lerobot/src/lerobot/policies/pi0/modeling_pi0.py\", line 923, in from_pretrained\n    model = cls(config, **kwargs)\n  File \"/data/wjg_files/lerobot/src/lerobot/policies/pi0/modeling_pi0.py\", line 872, in __init__\n    self.model = PI0Pytorch(config)\n  File \"/data/wjg_files/lerobot/src/lerobot/policies/pi0/modeling_pi0.py\", line 513, in __init__\n    self.paligemma_with_expert = PaliGemmaWithExpertModel(\n  File \"/data/wjg_files/lerobot/src/lerobot/policies/pi0/modeling_pi0.py\", line 337, in __init__\n    vlm_config_hf = CONFIG_MAPPING[\"paligemma\"]()\nTypeError: 'NoneType' object is not subscriptable\n```\n\nhow can i load pi0?",
    "url": "https://github.com/huggingface/lerobot/issues/2186",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "python"
    ],
    "created_at": "2025-10-13T12:24:32Z",
    "updated_at": "2025-10-17T09:53:02Z",
    "user": "Addog666"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3812,
    "title": "RuntimeError during load_state",
    "body": "### System Info\n\nThis issue is related to [prior issue 3101](https://github.com/huggingface/accelerate/issues/3101), but it hasn\u2019t been fully resolved yet. The current workaround is to avoid using `safetensors`.\n\n@Narsil suggested using [`load_file/save_file`](https://github.com/huggingface/safetensors/issues/657#issuecomment-3396215002). However, I noticed that accelerate currently uses [save_file](https://github.com/huggingface/accelerate/blob/main/src/accelerate/utils/other.py#L373) for saving and use [load_model](https://github.com/huggingface/accelerate/blob/main/src/accelerate/checkpointing.py#L238) for loading.\n\nIs there any known workaround or recommended fix for this inconsistency?\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nPlease see the [prior issue 3101](https://github.com/huggingface/accelerate/issues/3101).\n\n### Expected behavior\n\nPlease see the [prior issue 3101](https://github.com/huggingface/accelerate/issues/3101).",
    "url": "https://github.com/huggingface/accelerate/issues/3812",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-13T11:25:17Z",
    "updated_at": "2025-11-21T15:07:49Z",
    "comments": 2,
    "user": "Silverster98"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2185,
    "title": "Has the lerobot data format been modified after June this year?",
    "body": "Has the lerobot data format been modified after June this year? The original data can no longer be used.",
    "url": "https://github.com/huggingface/lerobot/issues/2185",
    "state": "closed",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-10-13T10:07:41Z",
    "updated_at": "2025-10-14T08:05:04Z",
    "user": "Addog666"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41539,
    "title": "All POETRY operations fail on latest version 4.57.0",
    "body": "### System Info\n\nI import transformers (always latest) in my poetry project.\nI use poetry 2.1.2\n\nAfter this transformers release (4.57.0) I regenerated the poetry lock with command: `poetry lock`\n\nThen when retrying to generate the lock again after other updates - it fails with message:\n\n`Could not parse constrains version: <emtpy>`\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nDoing a simple search in the poetry.lock file I found out that transformers latest package needs `optax (<empty>)`\nwhich produces this failure because poetry does not know how to parse this type of version.\n\nNote I am sure that this is the problem because commenting out the transformers the lock works fine, and also by using 4.56.2 from September it also works fine and that `optax (<empty>)` cannot be found in the lock in this case.\n\n### Expected behavior\n\nA developer should be able to use the latest transformers package version with poetry.",
    "url": "https://github.com/huggingface/transformers/issues/41539",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-13T08:40:49Z",
    "updated_at": "2025-10-13T14:18:02Z",
    "comments": 1,
    "user": "bfuia"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26692,
    "title": "[Usage]:  How to release KVCache?",
    "body": "### Your current environment\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.11 | packaged by conda-forge | (main, Jun  4 2025, 14:45:31) [GCC 13.3.0] (64-bit runtime)\nPython platform              : Linux-5.15.0-25-generic-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : Could not collect\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration :\nGPU 0: NVIDIA L20\nGPU 1: NVIDIA L20\nGPU 2: NVIDIA L20\nGPU 3: NVIDIA L20\n\nNvidia driver version        : 550.127.05\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nAddress sizes:                   52 bits physical, 57 bits virtual\nByte Order:                      Little Endian\nCPU(s):                          128\nOn-line CPU(s) list:             0-127\nVendor ID:                       GenuineIntel\nModel name:                      INTEL(R) XEON(R) GOLD 6530\nCPU family:                      6\nModel:                           207\nThread(s) per core:              2\nCore(s) per socket:              32\nSocket(s):                       2\nStepping:                        2\nCPU max MHz:                     4000.0000\nCPU min MHz:                     800.0000\nBogoMIPS:                        4200.00\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr avx512_fp16 flush_l1d arch_capabilities\nVirtualization:                  VT-x\nL1d cache:                       3 MiB (64 instances)\nL1i cache:                       2 MiB (64 instances)\nL2 cache:                        128 MiB (64 instances)\nL3 cache:                        320 MiB (2 instances)\nNUMA node(s):                    4\nNUMA node0 CPU(s):               0-15,64-79\nNUMA node1 CPU(s):               16-31,80-95\nNUMA node2 CPU(s):               32-47,96-111\nNUMA node3 CPU(s):               48-63,112-127\nVulnerability Itlb multihit:     Not affected\nVulnerability L1tf:              Not affected\nVulnerability Mds:               Not affected\nVulnerability Meltdown:          Not affected\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:        Mitigation; Enhanced IBRS, IBPB conditional, RSB filling\nVulnerability Srbds:             Not affected\nVulnerability Tsx async abort:   Not affected\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] numpy==2.2.6\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cufft-cu12==11.3.3.83\n[pip3] nvidia-cufile-cu12==1.13.1.3\n[pip3] nvidia-curand-cu12==10.3.9.90\n[pip3] nvidia-cusolver-cu12==11.7.3.90\n[pip3",
    "url": "https://github.com/vllm-project/vllm/issues/26692",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-13T08:28:20Z",
    "updated_at": "2025-10-13T08:28:20Z",
    "comments": 0,
    "user": "shenxf1205"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2184,
    "title": "How to let an episode realize it has finished the task?",
    "body": "I have successfully trained my real-world lerobot to do several simple tasks from human demonstrations. Say, push an object from point A to point B. I noticed that after the robot arm has finished the task, it would return to its initial pose (same as the human demonstration) and stay idle for the remainder of the episode, until time finishes.\n\nOf course, if I manually move the cup back to point A from point B before the time finishes, it would attempt to finish the job again. But I just wanted to know if there's any way the episode can finish itself, or at least yield a signal, after the first successful attempt?\n\nI'm using lerobot_record.py with specified policy file path. The policy is act.\n\nThank you",
    "url": "https://github.com/huggingface/lerobot/issues/2184",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-13T06:27:36Z",
    "updated_at": "2025-12-22T07:56:00Z",
    "user": "genkv"
  },
  {
    "repo": "pytorch/ao",
    "number": 3157,
    "title": "Is there no tutorial for dynamic quantization of BERT model in torch.ao?",
    "body": "I saw that some quant related tutorials in [the PyTorch tutorials repo](https://github.com/pytorch/tutorials) have been deleted,  and [the PR](https://github.com/pytorch/tutorials/pull/3432) stated that these tutorials will be moved to torchao.  However, I can't find  [the BERT dynamic quantization tutorial](https://github.com/pytorch/tutorials/pull/3432/files#diff-ffe2cf0ed3702611468c41af499f514e6fb0d4e5497a296df75e99422a200353) in the torchao repository. Where can I find it?",
    "url": "https://github.com/pytorch/ao/issues/3157",
    "state": "open",
    "labels": [
      "triaged"
    ],
    "created_at": "2025-10-12T15:47:06Z",
    "updated_at": "2026-01-03T14:43:56Z",
    "comments": 6,
    "user": "Esttelle"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26660,
    "title": "[Usage]: Is there any way to enable beam search in online inference?",
    "body": "### Your current environment\n\nIs there any way to enable beam search in the `vllm serve` command? Or beam search is only available in offline inference code?\n\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\n\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26660",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-12T13:55:07Z",
    "updated_at": "2025-10-17T17:12:45Z",
    "comments": 1,
    "user": "tiesanguaixia"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41533,
    "title": "Add_Specifical_tokens and resize_toked_embeddings result in an error",
    "body": "### System Info\n\nI want to add a few special tokens to my Qwen2.5VL model as separators, and after executing the following code, he received the following error message. I don't know how to solve this problem.\n``` bash\n[rank1]: Traceback (most recent call last):\n[rank1]: RuntimeError: shape '[-1, 151936]' is invalid for input of size 329273399\n[rank0]: Traceback (most recent call last):\n[rank0]: RuntimeError: shape '[-1, 151936]' is invalid for input of size 217038339\n[rank3]: Traceback (most recent call last):\n[rank3]: RuntimeError: shape '[-1, 151936]' is invalid for input of size 116936799\n[rank2]: Traceback (most recent call last):\n[rank2]: RuntimeError: shape '[-1, 151936]' is invalid for input of size 215673318\nTraceback (most recent call last):\nFile \"/home/hk-project-p0022189/tum_yvc3016/miniconda3/envs/qwen2_5-VL/lib/python3.10/site-packages/torch/distributed/elastic/multiprocessing/errors/init.py\", line 355, in wrapper\nraise ChildFailedError(\ntorch.distributed.elastic.multiprocessing.errors.ChildFailedError:\nqwenvl/train/train_livecc.py FAILED\nFailures:\n<NO_OTHER_FAILURES>\nRoot Cause (first observed failure):\nerror_file: <N/A>\ntraceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html\n```\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\n``` python\nimport os\nimport logging\nimport pathlib\nimport torch\nimport transformers\nimport json\nfrom typing import Dict\nimport shutil\nimport sys\nfrom pathlib import Path\n\nproject_root = Path(__file__).parent.parent.parent\nsys.path.append(str(project_root))\n\nimport qwenvl.train.trainer\nfrom trainer import replace_qwen2_vl_attention_class\n\nfrom transformers import (\n    Qwen2VLForConditionalGeneration,\n)\n\nfrom model_code.modeling_qwen2_5_vl import Qwen2_5_VLForConditionalGeneration\n\n\n# from qwenvl.data.data_qwen import make_supervised_data_module\nfrom qwenvl.data.lmm_dataset_for_batch import make_supervised_data_module\nfrom qwenvl.train.argument import (\n    ModelArguments,\n    DataArguments,\n    TrainingArguments,\n)\nfrom transformers import AutoTokenizer, AutoProcessor, Qwen2VLImageProcessor, Trainer\n\nlocal_rank = None\n\nos.environ[\"TOKENIZERS_PARALLELISM\"] = \"false\"\n\n\ndef rank0_print(*args):\n    if local_rank == 0:\n        print(*args)\n\n\ndef add_special_tokens_safely(tokenizer, new_tokens):\n    \"\"\"\n    \u5b89\u5168\u5730\u5411 tokenizer \u6dfb\u52a0\u65b0\u7684 special tokens\uff0c\u4fdd\u7559\u539f\u6709\u7684 additional_special_tokens\u3002\n\n    Args:\n        tokenizer: Hugging Face tokenizer\n        model: \u5bf9\u5e94\u7684\u8bed\u8a00\u6a21\u578b\n        new_tokens: list of str, \u8981\u6dfb\u52a0\u7684\u65b0 token\n\n    Returns:\n        bool: \u662f\u5426\u6709\u65b0 token \u88ab\u6dfb\u52a0\n    \"\"\"\n    # \u83b7\u53d6\u5f53\u524d\u8bcd\u8868\u4e2d\u7684\u6240\u6709 token\n    current_vocab = set(tokenizer.get_vocab().keys())\n\n    # \u8fc7\u6ee4\u51fa\u771f\u6b63\u9700\u8981\u6dfb\u52a0\u7684 token\n    tokens_to_add = [t for t in new_tokens if t not in current_vocab]\n    if not tokens_to_add:\n        rank0_print(\"\ud83d\udfe2 \u6240\u6709\u6307\u5b9a\u7684 token \u5df2\u5b58\u5728\u4e8e\u8bcd\u8868\u4e2d\uff0c\u65e0\u9700\u6dfb\u52a0\u3002\")\n        return False\n\n    # \u83b7\u53d6\u539f\u6709 additional_special_tokens\uff08\u5982 <image>, <ref> \u7b49\uff09\n    orig_special_tokens = tokenizer.special_tokens_map.get(\n        \"additional_special_tokens\", []\n    )\n\n    # \u5408\u5e76\uff1a\u4fdd\u7559\u539f\u6709 + \u65b0\u589e\n    updated_special_tokens = orig_special_tokens + [\n        t for t in tokens_to_add if t not in orig_special_tokens\n    ]\n\n    rank0_print(f\"\ud83d\udccc \u6b63\u5728\u6dfb\u52a0\u65b0 token: {tokens_to_add}\")\n    rank0_print(f\"\ud83d\udd27 \u66f4\u65b0\u540e\u7684 additional_special_tokens \u603b\u6570: {len(updated_special_tokens)}\")\n\n    # \u4f7f\u7528 add_special_tokens API\uff08\u4f1a\u81ea\u52a8\u53bb\u91cd\uff09\n    num_added = tokenizer.add_special_tokens(\n        {\"additional_special_tokens\": updated_special_tokens}\n    )\n\n    if num_added > 0:\n        rank0_print(f\"\u2705 \u6210\u529f\u6dfb\u52a0 {num_added} \u4e2a\u65b0 token \u5230\u8bcd\u8868\")\n\n    return num_added > 0\n\n\ndef safe_save_model_for_hf_trainer(trainer: transformers.Trainer, output_dir: str):\n    \"\"\"Collects the state dict and dump to disk.\"\"\"\n\n    if trainer.deepspeed:\n        torch.cuda.synchronize()\n        trainer.save_model(output_dir)\n        return\n\n    state_dict = trainer.model.state_dict()\n    if trainer.args.should_save:\n        cpu_state_dict = {key: value.cpu() for key, value in state_dict.items()}\n        del state_dict\n        trainer._save(output_dir, state_dict=cpu_state_dict)  # noqa\n\n\ndef set_model(model_args, model):\n    if model_args.tune_mm_vision:\n        for n, p in model.visual.named_parameters():\n            p.requires_grad = True\n    else:\n        for n, p in model.visual.named_parameters():\n            p.requires_grad = False\n\n    if model_args.tune_mm_mlp:\n        for n, p in model.visual.merger.named_parameters():\n            p.requires_grad = True\n    else:\n        for n, p in model.visual.merger.named_parameters():\n            p.requires_grad = False\n\n    if model_args.tune_mm_llm:\n        for n, p in model.model.named_parameters():\n            p.requires_grad = True\n        model.lm_head.requires_grad = True\n    else:\n        for n, p in model.model.named_parameters():\n            p.requir",
    "url": "https://github.com/huggingface/transformers/issues/41533",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-12T13:50:40Z",
    "updated_at": "2025-10-13T14:09:29Z",
    "comments": 3,
    "user": "jialiangZ"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2181,
    "title": "How to chage SmolVLA action_chunk_size?",
    "body": "I want to change 'action_chunk_size' from 50 to 10. I ran the command like this : \n'''\npython lerobot/scripts/train.py   --policy.path=lerobot/smolvla_base   --dataset.repo_id=Datasets/grasp_put   --batch_size=16   --steps=40000   --output_dir=outputs/train/vla_chunk10   --job_name=smolvla_training   --policy.device=cuda  --policy.push_to_hub=false  --policy.action_chunk_size=10\n'''\nbut it doesn't work\n'train.py: error: unrecognized arguments: --action_chunk_size=10'\nand I found it can enter this parameter in the terminal :\nusage: train.py [-h] [--policy.action_chunk_size str]\n\nHow should I resolve this problem?",
    "url": "https://github.com/huggingface/lerobot/issues/2181",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "python"
    ],
    "created_at": "2025-10-12T13:29:35Z",
    "updated_at": "2025-10-17T11:25:55Z",
    "user": "CCCY-0304"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41532,
    "title": "where is examples/rag from original paper?",
    "body": "### System Info\n\nhttps://arxiv.org/pdf/2005.11401 mentions https://github.com/huggingface/transformers/blob/main/examples/rag but it is not there. Add redirect if possible\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nGo to https://github.com/huggingface/transformers/blob/main/examples/rag\n\n### Expected behavior\n\nsome example instead of 404",
    "url": "https://github.com/huggingface/transformers/issues/41532",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-12T13:17:53Z",
    "updated_at": "2025-10-17T09:34:15Z",
    "user": "IgorKasianenko"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26653,
    "title": "[Usage]: Qwen3VL image coordinates issue",
    "body": "### Your current environment\n\nHi, i found same image, same prompt, the vLLM serving qwen3vl always have wrong cooridnates back.\n\nthis is vllm return:\n\nResponse: \"{\\\"click_type\\\": \\\"left_click\\\", \\\"coordinate\\\": [815, 961]}\"\n\n<img width=\"1093\" height=\"549\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/f55cb990-03a1-4ac7-912b-e2796c8b854a\" />\n\nAs you can see, when visualize, the VLLM returned x offset is totally far wrong.\n\nQwen3 official return. Same A3B model.\n\nDoes the input were cropped or something? \n\nMy server side just used: \n\n```\nvllm serve checkpoints/Qwen3-VL-30B-A3B-Instruct \\\n    --dtype auto --max-model-len 4096 \\\n    --api-key token-abc123 \\\n    --gpu_memory_utilization 0.9 \\\n    --trust-remote-code \\\n    --port 8000 \\\n    --served-model-name 'qwen3-vl' \\\n    --max-model-len 8k \\\n    --limit-mm-per-prompt '{\"video\": 3}' \\\n    --enable-auto-tool-choice \\\n   --tool-call-parser hermes \n```\n\n**note**: when visualize i have already mapping the cordiantes to image space, here just compare raw output, it still biased much on x-axis.\n\n\n\n### How would you like to use vllm\n\nI want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.\ndfwr\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26653",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-12T07:02:29Z",
    "updated_at": "2025-10-13T03:56:53Z",
    "comments": 2,
    "user": "lucasjinreal"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3811,
    "title": "ValueError: Could not find the transformer layer class QwenImageTransformerBlock in the model.",
    "body": "Hi, I am trying to fine-tuning qwen-image-edit using accelerate in FSDP mode. I want to warp the ``QwenImageTransformerBlock`` in transformer and ``Qwen2_5_VLVisionBlock,Qwen2_5_VLDecoderLayer`` in text_encoder. I set the environment param\n```\ndef set_fsdp_env():\n    os.environ[\"ACCELERATE_USE_FSDP\"] = 'true'\n    os.environ[\"FSDP_AUTO_WRAP_POLICY\"] = 'TRANSFORMER_BASED_WRAP'\n    os.environ[\"FSDP_BACKWARD_PREFETCH\"] = 'BACKWARD_PRE'\n    os.environ[\"FSDP_TRANSFORMER_CLS_TO_WRAP\"] = 'QwenImageTransformerBlock,Qwen2_5_VLVisionBlock,Qwen2_5_VLDecoderLayer'\n    os.environ[\"FSDP_CPU_RAM_EFFICIENT_LOADING\"] = 'false'\n```\nand prepare the two models\n```\ntransformer = accelerator.prepare(transformer)\ntext_encoder = accelerator.prepare(text_encoder)\n```\nFinally, I encountered the error raised from ``text_encoder = accelerator.prepare(text_encoder)``\n```\nValueError: Could not find the transformer layer class QwenImageTransformerBlock in the model.\n```\nHow can I resolve this problem? Thanks!\n",
    "url": "https://github.com/huggingface/accelerate/issues/3811",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-11T10:13:14Z",
    "updated_at": "2025-11-22T15:06:54Z",
    "comments": 2,
    "user": "garychan22"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2172,
    "title": "Add support for remote GPUs (with async inference!)",
    "body": "Hello,\nI'm a student in not the first-world country, and unforturnately, I don't own a PC that would have an NVidia GPU - it costs about $1200 for a decent setup. On the other hand, it costs only $0.12-0.24/hr to rent RTX 4090 instances, so it's pretty cheap to simply rent a computer whenever I need to data collect/train.\n\nBut, to my knowledge LeRobot - unlike e.g. most LLM or vision trainers - runs only locally. I haven't tried, but given Async Inference it should be very feasible to make streaming to a local browser from a remote instance. In particular, for data collection. \n\nThis will make robotics dataset generation (significantly) more accessible.\n\nI may be able to PR this one, it should be straightforward.\n\nCheers.",
    "url": "https://github.com/huggingface/lerobot/issues/2172",
    "state": "open",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2025-10-11T08:49:32Z",
    "updated_at": "2025-12-19T06:35:21Z",
    "user": "MRiabov"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41518,
    "title": "Add Structured Prompt Templates Registry for LLM / VLM / Diffusion Tasks",
    "body": "### Feature request\n\nIntroduce transformers.prompt_templates \u2014 a YAML-based registry and accessor API:\n\n```\nfrom transformers import PromptTemplates\n\nPromptTemplates.get(\"summarization\")      # \"Summarize the following text:\"\nPromptTemplates.list_tasks()              # [\"summarization\",\"vqa\",\"ocr\",...]\n```\n\n- Templates stored as yaml/json under src/transformers/prompt_templates/templates/.\n- Accessor + validation in registry.py.\n- Optional CLI command transformers-cli list-prompts.\n- Pipelines can import a template by task name instead of hard-coding.\n\n### Motivation\n\nEvery pipeline and model today embeds its own prompt strings (e.g., summarization, OCR, VQA).\nThis duplication makes results inconsistent and hard to benchmark.\nA central registry of task-specific prompt templates would unify defaults and enable easy community additions.\n\n### Your contribution\n\nI\u2019ll implement the registry module, add unit tests and docs, and migrate 1\u20132 pipelines (summarization / captioning) to use it.\nContributor: [@Aki-07](https://github.com/Aki-07)",
    "url": "https://github.com/huggingface/transformers/issues/41518",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-10-11T08:10:20Z",
    "updated_at": "2025-10-13T15:06:20Z",
    "comments": 2,
    "user": "Aki-07"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26616,
    "title": "[Usage]: How to enable MTP when using Qwen3-Next in local infer ( not vllm serve)",
    "body": "### Your current environment\n\n```text\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.2 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version                : Could not collect\nCMake version                : Could not collect\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.11 | packaged by Anaconda, Inc. | (main, Jun  5 2025, 13:09:17) [GCC 11.2.0] (64-bit runtime)\nPython platform              : Linux-4.18.0-2.6.8.kwai.x86_64-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : 11.8.89\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration :\nGPU 0: NVIDIA A100 80GB PCIe\nGPU 1: NVIDIA A100 80GB PCIe\nGPU 2: NVIDIA A100 80GB PCIe\nGPU 3: NVIDIA A100 80GB PCIe\n\nNvidia driver version        : 550.54.14\ncuDNN version                : Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.0\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nAddress sizes:                   48 bits physical, 48 bits virtual\nByte Order:                      Little Endian\nCPU(s):                          96\nOn-line CPU(s) list:             0-95\nVendor ID:                       AuthenticAMD\nModel name:                      AMD EPYC 7V13 64-Core Processor\nCPU family:                      25\nModel:                           1\nThread(s) per core:              1\nCore(s) per socket:              48\nSocket(s):                       2\nStepping:                        1\nBogoMIPS:                        4890.88\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core invpcid_single vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr arat umip vaes vpclmulqdq rdpid\nHypervisor vendor:               Microsoft\nVirtualization type:             full\nL1d cache:                       3 MiB (96 instances)\nL1i cache:                       3 MiB (96 instances)\nL2 cache:                        48 MiB (96 instances)\nL3 cache:                        384 MiB (12 instances)\nNUMA node(s):                    4\nNUMA node0 CPU(s):               0-23\nNUMA node1 CPU(s):               24-47\nNUMA node2 CPU(s):               48-71\nNUMA node3 CPU(s):               72-95\nVulnerability Itlb multihit:     Not affected\nVulnerability L1tf:              Not affected\nVulnerability Mds:               Not affected\nVulnerability Meltdown:          Not affected\nVulnerability Spec store bypass: Vulnerable\nVulnerability Spectre v1:        Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers\nVulnerability Spectre v2:        Vulnerable, STIBP: disabled\nVulnerability Tsx async abort:   Not affected\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] numpy==2.2.6\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cudnn-frontend==1.14.1\n[pip3] nvidia-cufft-cu12==11.3.3.83\n[pip3] nvidia-cufile-cu12==1.13.1.3\n[pip3] nvidia-curand-cu12==10.3.9.90\n[pip3] nvidia-cusolver-cu12==11.7.3.90\n[pip3] nvidia-cusparse-cu12==12.5.8.93\n[pip3] nvidia-cusparselt-cu12==0.7.1\n[pip3] nvidia-ml-py==13.580.82\n[pip3] nvidia-nccl-cu12==2.27.3\n[pip3] nvidia-nvjitlink-cu12==12.8.93\n[pip3] nvidia-nvtx-cu12==12.8.90\n[pip3] pyzmq==27.1.0\n[pip3] torch==2.8.0\n[pip3] torchaudio==2.8.0\n[pip3] torchvision==0.23.0\n[pip3] transformers==4.57.0\n[pip3] triton==3.4.0\n[conda] nu",
    "url": "https://github.com/vllm-project/vllm/issues/26616",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-11T03:58:14Z",
    "updated_at": "2025-10-16T08:45:35Z",
    "comments": 1,
    "user": "Kimagure7"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26614,
    "title": "[Usage]: attn_metadata.seq_lens is not equal to attn_metadata.num_actual_tokens",
    "body": "### Your current environment\n\n```\nCollecting environment information...\nuv is set\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 20.04.6 LTS (x86_64)\nGCC version                  : (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0\nClang version                : Could not collect\nCMake version                : version 3.16.3\nLibc version                 : glibc-2.31\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.11 (main, Jul 23 2025, 00:34:44) [Clang 20.1.4 ] (64-bit runtime)\nPython platform              : Linux-5.4.0-216-generic-x86_64-with-glibc2.31\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : Could not collect\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : \nGPU 0: NVIDIA H20\nGPU 1: NVIDIA H20\nGPU 2: NVIDIA H20\nGPU 3: NVIDIA H20\nGPU 4: NVIDIA H20\nGPU 5: NVIDIA H20\nGPU 6: NVIDIA H20\nGPU 7: NVIDIA H20\n\nNvidia driver version        : 555.42.06\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                       x86_64\nCPU op-mode(s):                     32-bit, 64-bit\nByte Order:                         Little Endian\nAddress sizes:                      52 bits physical, 57 bits virtual\nCPU(s):                             224\nOn-line CPU(s) list:                0-223\nThread(s) per core:                 2\nCore(s) per socket:                 56\nSocket(s):                          2\nNUMA node(s):                       2\nVendor ID:                          GenuineIntel\nCPU family:                         6\nModel:                              143\nModel name:                         Intel(R) Xeon(R) Platinum 8480+\nStepping:                           8\nFrequency boost:                    enabled\nCPU MHz:                            900.000\nCPU max MHz:                        2001.0000\nCPU min MHz:                        800.0000\nBogoMIPS:                           4000.00\nVirtualization:                     VT-x\nL1d cache:                          5.3 MiB\nL1i cache:                          3.5 MiB\nL2 cache:                           224 MiB\nL3 cache:                           210 MiB\nNUMA node0 CPU(s):                  0-55,112-167\nNUMA node1 CPU(s):                  56-111,168-223\nVulnerability Gather data sampling: Not affected\nVulnerability Itlb multihit:        Not affected\nVulnerability L1tf:                 Not affected\nVulnerability Mds:                  Not affected\nVulnerability Meltdown:             Not affected\nVulnerability Mmio stale data:      Not affected\nVulnerability Retbleed:             Not affected\nVulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:           Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S\nVulnerability Srbds:                Not affected\nVulnerability Tsx async abort:      Not affected\nFlags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx512_bf16 wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid cldemote movdiri movdir64b md_clear pconfig flush_l1d arch_capabilities\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] numpy==2.2.0\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n[pip3] nvidia-",
    "url": "https://github.com/vllm-project/vllm/issues/26614",
    "state": "open",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-11T03:35:38Z",
    "updated_at": "2025-10-11T03:36:31Z",
    "comments": 0,
    "user": "betacatZ"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26612,
    "title": "[Usage]: qwen3vl 30 A3B \u542f\u52a8vllm \u670d\u52a1\u62a5\u9519",
    "body": "### \ud83d\udcda The doc issue\n\nA_A800-SXM4-80GB.json']\n(Worker pid=1939690) INFO 10-11 10:42:13 [monitor.py:34] torch.compile takes 85.33 s in total\n(Worker pid=1939690) INFO 10-11 10:42:14 [gpu_worker.py:298] Available KV cache memory: 13.69 GiB\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708] EngineCore failed to start.\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708] Traceback (most recent call last):\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]   File \"/home/ma-user/work/renkexuan/.venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 699, in run_engine_core\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]     engine_core = EngineCoreProc(*args, **kwargs)\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]   File \"/home/ma-user/work/renkexuan/.venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 498, in __init__\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]     super().__init__(vllm_config, executor_class, log_stats,\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]   File \"/home/ma-user/work/renkexuan/.venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 92, in __init__\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]     self._initialize_kv_caches(vllm_config)\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]   File \"/home/ma-user/work/renkexuan/.venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 199, in _initialize_kv_caches\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]     kv_cache_configs = get_kv_cache_configs(vllm_config, kv_cache_specs,\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]   File \"/home/ma-user/work/renkexuan/.venv/lib/python3.12/site-packages/vllm/v1/core/kv_cache_utils.py\", line 1243, in get_kv_cache_configs\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]     check_enough_kv_cache_memory(vllm_config, kv_cache_spec_one_worker,\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]   File \"/home/ma-user/work/renkexuan/.venv/lib/python3.12/site-packages/vllm/v1/core/kv_cache_utils.py\", line 716, in check_enough_kv_cache_memory\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708]     raise ValueError(\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:14 [core.py:708] ValueError: To serve at least one request with the models's max seq len (262144), (24.00 GiB KV cache is needed, which is larger than the available KV cache memory (13.69 GiB). Based on the available memory, the estimated maximum model length is 149520. Try increasing `gpu_memory_utilization` or decreasing `max_model_len` when initializing the engine.\n(EngineCore_DP0 pid=1937911) ERROR 10-11 10:42:17 [multiproc_executor.py:154] Worker proc VllmWorker-0 died unexpectedly, shutting down executor.\n(EngineCore_DP0 pid=1937911) Process EngineCore_DP0:\n(EngineCore_DP0 pid=1937911) Traceback (most recent call last):\n(EngineCore_DP0 pid=1937911)   File \"/home/ma-user/work/anaconda3_flash_attn/envs/qwen3_vl/lib/python3.12/multiprocessing/process.py\", line 314, in _bootstrap\n(EngineCore_DP0 pid=1937911)     self.run()\n(EngineCore_DP0 pid=1937911)   File \"/home/ma-user/work/anaconda3_flash_attn/envs/qwen3_vl/lib/python3.12/multiprocessing/process.py\", line 108, in run\n(EngineCore_DP0 pid=1937911)     self._target(*self._args, **self._kwargs)\n(EngineCore_DP0 pid=1937911)   File \"/home/ma-user/work/renkexuan/.venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 712, in run_engine_core\n(EngineCore_DP0 pid=1937911)     raise e\n(EngineCore_DP0 pid=1937911)   File \"/home/ma-user/work/renkexuan/.venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 699, in run_engine_core\n(EngineCore_DP0 pid=1937911)     engine_core = EngineCoreProc(*args, **kwargs)\n(EngineCore_DP0 pid=1937911)                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(EngineCore_DP0 pid=1937911)   File \"/home/ma-user/work/renkexuan/.venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 498, in __init__\n(EngineCore_DP0 pid=1937911)     super().__init__(vllm_config, executor_class, log_stats,\n(EngineCore_DP0 pid=1937911)   File \"/home/ma-user/work/renkexuan/.venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 92, in __init__\n(EngineCore_DP0 pid=1937911)     self._initialize_kv_caches(vllm_config)\n(EngineCore_DP0 pid=1937911)   File \"/home/ma-user/work/renkexuan/.venv/lib/python3.12/site-packages/vllm/v1/engine/core.py\", line 199, in _initialize_kv_caches\n(EngineCore_DP0 pid=1937911)     kv_cache_configs = get_kv_cache_configs(vllm_config, kv_cache_specs,\n(EngineCore_DP0 pid=1937911)                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(Engin",
    "url": "https://github.com/vllm-project/vllm/issues/26612",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-11T02:45:20Z",
    "updated_at": "2025-10-16T23:00:39Z",
    "comments": 1,
    "user": "renkexuan369"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2171,
    "title": "Data diffusion and data format conversion",
    "body": "1. Can datasets collected in Lerobot format be disseminated?\n2. Can data formats between different Lerobot versions be converted? I noticed that the data format collected in version 0.2.0 is different from the latest data format.\nThank you!",
    "url": "https://github.com/huggingface/lerobot/issues/2171",
    "state": "open",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-10-11T02:16:55Z",
    "updated_at": "2025-10-17T02:02:36Z",
    "user": "FALCONYU"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26607,
    "title": "[Bug]: Since version 0.9.2 comes with nccl built-in, using PCIE causes sys errors. How to disable nccl in vllm for versions after 0.9.2?",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\n```text\nYour output of `python collect_env.py` here\n```\n\n</details>\n\n<img width=\"833\" height=\"138\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a42c415b-8c5b-4698-aa6f-879edc44d512\" />\n\n\n### \ud83d\udc1b Describe the bug\n\n sh 06_startVllmAPI.sh \nINFO 09-30 10:30:16 [__init__.py:216] Automatically detected platform cuda.\n(APIServer pid=1599676) INFO 09-30 10:30:17 [api_server.py:1896] vLLM API server version 0.10.2\n(APIServer pid=1599676) INFO 09-30 10:30:17 [utils.py:328] non-default args: {'port': 6006, 'model': './autodl-tmp/modelscope/models/GeoGPT/Qwen2.5-72B-GeoGPT', 'tokenizer': './autodl-tmp/modelscope/models/GeoGPT/Qwen2.5-72B-GeoGPT', 'trust_remote_code': True, 'dtype': 'bfloat16', 'served_model_name': ['Qwen2.5-72B-GeoGPT'], 'tensor_parallel_size': 8, 'gpu_memory_utilization': 0.5}\n(APIServer pid=1599676) The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.\n(APIServer pid=1599676) INFO 09-30 10:30:24 [__init__.py:742] Resolved architecture: Qwen2ForCausalLM\n(APIServer pid=1599676) `torch_dtype` is deprecated! Use `dtype` instead!\n(APIServer pid=1599676) INFO 09-30 10:30:24 [__init__.py:1815] Using max model len 131072\n(APIServer pid=1599676) INFO 09-30 10:30:24 [scheduler.py:222] Chunked prefill is enabled with max_num_batched_tokens=2048.\nINFO 09-30 10:30:29 [__init__.py:216] Automatically detected platform cuda.\n(EngineCore_DP0 pid=1600151) INFO 09-30 10:30:31 [core.py:654] Waiting for init message from front-end.\n(EngineCore_DP0 pid=1600151) INFO 09-30 10:30:31 [core.py:76] Initializing a V1 LLM engine (v0.10.2) with config: model='./autodl-tmp/modelscope/models/GeoGPT/Qwen2.5-72B-GeoGPT', speculative_config=None, tokenizer='./autodl-tmp/modelscope/models/GeoGPT/Qwen2.5-72B-GeoGPT', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=True, dtype=torch.bfloat16, max_seq_len=131072, download_dir=None, load_format=auto, tensor_parallel_size=8, pipeline_parallel_size=1, data_parallel_size=1, disable_custom_all_reduce=False, quantization=None, enforce_eager=False, kv_cache_dtype=auto, device_config=cuda, decoding_config=DecodingConfig(backend='auto', disable_fallback=False, disable_any_whitespace=False, disable_additional_properties=False, reasoning_backend=''), observability_config=ObservabilityConfig(show_hidden_metrics_for_version=None, otlp_traces_endpoint=None, collect_detailed_traces=None), seed=0, served_model_name=Qwen2.5-72B-GeoGPT, enable_prefix_caching=True, chunked_prefill_enabled=True, use_async_output_proc=True, pooler_config=None, compilation_config={\"level\":3,\"debug_dump_path\":\"\",\"cache_dir\":\"\",\"backend\":\"\",\"custom_ops\":[],\"splitting_ops\":[\"vllm.unified_attention\",\"vllm.unified_attention_with_output\",\"vllm.mamba_mixer2\",\"vllm.mamba_mixer\",\"vllm.short_conv\",\"vllm.linear_attention\",\"vllm.plamo2_mamba_mixer\",\"vllm.gdn_attention\"],\"use_inductor\":true,\"compile_sizes\":[],\"inductor_compile_config\":{\"enable_auto_functionalized_v2\":false},\"inductor_passes\":{},\"cudagraph_mode\":1,\"use_cudagraph\":true,\"cudagraph_num_of_warmups\":1,\"cudagraph_capture_sizes\":[512,504,496,488,480,472,464,456,448,440,432,424,416,408,400,392,384,376,368,360,352,344,336,328,320,312,304,296,288,280,272,264,256,248,240,232,224,216,208,200,192,184,176,168,160,152,144,136,128,120,112,104,96,88,80,72,64,56,48,40,32,24,16,8,4,2,1],\"cudagraph_copy_inputs\":false,\"full_cuda_graph\":false,\"pass_config\":{},\"max_capture_size\":512,\"local_cache_dir\":null}\n(EngineCore_DP0 pid=1600151) WARNING 09-30 10:30:31 [multiproc_worker_utils.py:273] Reducing Torch parallelism from 64 threads to 1 to avoid unnecessary CPU contention. Set OMP_NUM_THREADS in the external environment to tune this value as needed.\n(EngineCore_DP0 pid=1600151) INFO 09-30 10:30:31 [shm_broadcast.py:289] vLLM message queue communication handle: Handle(local_reader_ranks=[0, 1, 2, 3, 4, 5, 6, 7], buffer_handle=(8, 16777216, 10, 'psm_7e0498ff'), local_subscribe_addr='ipc:///tmp/33a7ec3b-72b3-4984-9ed3-6fc1fb572c4a', remote_subscribe_addr=None, remote_addr_ipv6=False)\nINFO 09-30 10:30:35 [__init__.py:216] Automatically detected platform cuda.\nINFO 09-30 10:30:35 [__init__.py:216] Automatically detected platform cuda.\nINFO 09-30 10:30:35 [__init__.py:216] Automatically detected platform cuda.\nINFO 09-30 10:30:35 [__init__.py:216] Automatically detected platform cuda.\nINFO 09-30 10:30:35 [__init__.py:216] Automatically detected platform cuda.\nINFO 09-30 10:30:35 [__init__.py:216] Automatically detected platform cuda.\nINFO 09-30 10:30:35 [__init__.py:216] Automatically detected platform cuda.\nINFO 09-30 10:30:35 [__init__.py:216] Automatically detected platform cuda.\nINFO 09-30 10:30:40 [shm_broadcast.py:289] vLLM message queue communication handle: Handle(local_reader_ranks=[0], buffer_handle=(1, 10485760, 10, 'psm_1413bf45'), local_subscribe_addr='ipc:///tmp/a",
    "url": "https://github.com/vllm-project/vllm/issues/26607",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-11T01:48:50Z",
    "updated_at": "2025-10-17T01:09:03Z",
    "comments": 0,
    "user": "tina0852"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165177,
    "title": "cryptic symbolic shape error with FSDP2 and torch.compile",
    "body": "### \ud83d\udc1b Describe the bug\n\nUsing FSDP2 and torch.compile with Llama3 (and most other generative models on HuggingFace). I get the following error:\n```\nAssertionError: s52 (could be from [\"L['position_ids']._base.size()[0]\"]) not in {\ns53: [\"L['attention_mask'].size()[1]\", \"L['attention_mask'].stride()[0]\"],\ns58: [\"L['cache_position'].size()[0]\", \"L['position_ids']._base.size()[0]\"],\ns55: [\"L['input_embeds'].size()[1]\"],\ns9: [\"L['position_ids'].size()[1]\", \"L['position_ids'].stride()[0]\"],\ns52: []\n}.  If this assert is failing, it could be due to the issue described in https://github.com/pytorch/pytorch/pull/90665\n``` \n\nA reasonable suggestion would be there is something in the code that isn't torch.compile friendly. That is certainly possible. However, without the `fully_shard` and with `torch.compile()` there is no error. Hence, I'm inclined to believe it's a bug with how torch.compile and FSDP2 interacts. The link https://github.com/pytorch/pytorch/pull/90665 was not instructive as to the cause. \n\nThe following code reproduces the error. The error produces with 1 GPU, 2 GPUs, 2x8 GPUs, and possibly more settings.\n\n```py\nimport os\nimport numpy as np\n\nimport torch\nfrom torch.distributed.fsdp import fully_shard\nimport torch.nn.functional as F\n\nfrom transformers import AutoModelForCausalLM\nfrom transformers.models.llama.modeling_llama import LlamaDecoderLayer\n\ndef init_distributed() -> tuple[int,torch.device]:\n    world_size = int(os.environ.get(\"WORLD_SIZE\", 1))\n    rank = int(os.environ.get(\"RANK\", 0))\n    local_rank = int(os.environ.get(\"LOCAL_RANK\", 0))\n\n    if \"SLURM_NTASKS\" in os.environ:\n        world_size = int(os.environ[\"SLURM_NTASKS\"])\n        rank = int(os.environ.get(\"SLURM_PROCID\", os.environ.get(\"SLURM_TASK_PID\", 0)))\n        local_rank = int(os.environ.get(\"SLURM_LOCALID\", int(os.environ.get(\"SLURM_PROCID\", 0)) % (torch.cuda.device_count() or 1)))\n\n    torch.cuda.set_device(local_rank)\n    init_method = os.environ.get(\"INIT_METHOD\", \"env://\")\n    torch.distributed.init_process_group(\n        backend=\"nccl\",\n        init_method=init_method,\n        world_size=world_size,\n        rank=rank\n    )\n    return rank, torch.device(f\"cuda:{local_rank}\")\n\ndef main():\n    # Setup distributed + device\n    rank, device = init_distributed()\n\n    # Only rank 0 downloads/prepares model weights; others wait.\n    gen_model = AutoModelForCausalLM.from_pretrained(\n        'meta-llama/Meta-Llama-3-8B-Instruct',\n        use_safetensors=True,\n        dtype=torch.bfloat16,\n        pad_token_id=0,\n        use_cache=False\n    )\n\n    torch.distributed.barrier()\n\n    if gen_model is None:\n        gen_model = AutoModelForCausalLM.from_pretrained(\n            'meta-llama/Meta-Llama-3-8B-Instruct',\n            use_safetensors=True,\n            pad_token_id=0,\n            use_cache=False\n        )\n\n    gen_model.to(device)\n\n    for submodule in gen_model.model.layers:\n        if isinstance(submodule, LlamaDecoderLayer):\n            fully_shard(submodule)\n    fully_shard(gen_model)\n\n    gen_model = torch.compile(gen_model)  # type: ignore\n\n    torch.distributed.barrier()\n\n    dataset = [\n        np.array([[1, 27, 91, 882, 91, 397]], dtype=np.int64),\n        np.array([[1, 27, 91, 882, 91, 397, 45, 45, 45, 45, 45, 45]], dtype=np.int64)\n    ]\n    assert gen_model is not None\n\n    for input_ids in dataset:\n        batch = torch.from_numpy(input_ids).to(device)\n        # padding changes the issue to a crash with no error.\n        # batch = F.pad(torch.from_numpy(input_ids), (0, 200 - input_ids.shape[1]), value=0).to(device)\n\n        logits = gen_model(input_ids=batch,\n                           attention_mask=torch.ones_like(batch)).logits # AssertionError\n\n    print('SUCCESS')\n\nif __name__ == \"__main__\":\n    torch.set_float32_matmul_precision('high')\n    main()\n```\n\nFull error:\n\n```\nRunning setup on gpu-54\nUsing CPython 3.13.7\nCreating virtual environment at: /tmp/pyenv\nActivate with: source /tmp/pyenv/bin/activate\nCloning into '/tmp/code'...\ndone.\n/tmp/code ~/workspace/reward-based-ift\nHEAD is now at 72d2b68 job submission\nUsing Python 3.13.7 environment at: /tmp/pyenv\nResolved 134 packages in 1.15s\n   Building gl @ file:///tmp/code\n      Built gl @ file:///tmp/code\nPrepared 1 package in 1.48s\nInstalled 134 packages in 3.04s\n + ai2-olmo-eval==0.8.5\n + aiofiles==24.1.0\n + aiohappyeyeballs==2.6.1\n + aiohttp==3.11.18\n + aiosignal==1.4.0\n + annotated-types==0.7.0\n + attrs==25.4.0\n + boto3==1.40.49\n + botocore==1.40.49\n + cached-path==1.8.0\n + cachetools==6.2.0\n + certifi==2025.10.5\n + charset-normalizer==3.4.3\n + click==8.3.0\n + datasets==4.0.0\n + deepspeed==0.16.9\n + dill==0.3.8\n + distlib==0.4.0\n + docker-pycreds==0.4.0\n + einops==0.8.1\n + filelock==3.20.0\n + frozenlist==1.8.0\n + fsspec==2025.3.0\n + gitdb==4.0.12\n + gitpython==3.1.45\n + gl==0.1.0 (from file:///tmp/code)\n + google-api-core==2.26.0\n + google-auth==2.41.1\n + google-cloud-core==2.4.3\n + google-cloud-storage==2.19.0\n + google-crc32c==1.7.1\n + google-resumable-media==2.7.2",
    "url": "https://github.com/pytorch/pytorch/issues/165177",
    "state": "closed",
    "labels": [
      "high priority",
      "oncall: distributed",
      "triaged",
      "oncall: pt2",
      "module: dynamic shapes"
    ],
    "created_at": "2025-10-10T19:53:04Z",
    "updated_at": "2025-10-30T18:03:53Z",
    "comments": 8,
    "user": "AndreasMadsen"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3611,
    "title": "Feedback about Quickstart",
    "body": "There is the following issue on this page: https://docs.pytorch.org/tutorials/beginner/basics/quickstart_tutorial.html#optimizing-the-model-parameters\n\nSystem specs: Windows 11, python3.11, pytorch==2.8.0+xpu, Intel oneAPI 2025.2.\n\nBeen following this tut, I got this error raising from test function\n```\ncorrect += (pred.argmax(1) == y).type(torch.float).sum().item()\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nRuntimeError: UR error\n```\n\nChecked all the compatibility of oneAPI, pytorch, and intel_extension_for_pytorch\n```\nprint(torch.xpu._is_compiled())\nprint(torch.xpu.is_available())\n```\nBoth prints True\n\n\nReally new to ML and NN, but not dev, so tried using torch.FloatTensor\n`correct += (pred.argmax(1) == y).type(torch.FloatTensor).sum().item()\n`\nIt works and output almost matches to what's given in tut.\n\nI hope what I did is correct in terms of ML.\nIf not please suggest where can I lookup to understand this better.\n\ncc @albanD @jbschlosser @gujinghui @EikanWang @fengyuan14 @guangyey",
    "url": "https://github.com/pytorch/tutorials/issues/3611",
    "state": "open",
    "labels": [
      "question",
      "core",
      "module: xpu",
      "windows"
    ],
    "created_at": "2025-10-10T17:06:21Z",
    "updated_at": "2025-10-20T03:25:53Z",
    "user": "BhavneetSingh7"
  },
  {
    "repo": "huggingface/hf-hub",
    "number": 131,
    "title": "InvalidCertificate and how to fix it",
    "body": "I am trying to install a DuckDB extension written in Rust (https://github.com/martin-conur/quackformers) that uses the library.\n\nDuring the install, I am getting a\n```\nHfHub(RequestError(Transport(Transport { kind: ConnectionFailed, message: Some(\"tls connection init failed\"), url: Some(Url { scheme: \"https\", cannot_be_a_base: false, username: \"\", password: None, host: Some(Domain(\"huggingface.co\")), port: None, path: \"/sentence-transformers/all-MiniLM-L6-v2/resolve/main/tokenizer.json\", query: None, fragment: None }), source: Some(Custom { kind: InvalidData, error: InvalidCertificate(UnknownIssuer) }) })))\n```\nThe file can be accessed from my environment via curl.\nThe file can be accessed from DuckDB using their `httpfs` extension which is written in C/C++.\n\nI am working in environment with a very strict enterprise proxy and this is most likely what's causing the issue (I have zero issue when running the same commands at home).\n\n1. can the behavior of HfHub with respect to proxy be modified using env variables?\n2.  can the behavior of HfHub with respect to TLS certificates be modified using env variables? \n3. where can I find the default value(s) for the proxy settings and the location of certs used by the library\n\nReferences:\n- bug report for quackformer = https://github.com/martin-conur/quackformers/issues/7\n",
    "url": "https://github.com/huggingface/hf-hub/issues/131",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-10T14:42:12Z",
    "updated_at": "2025-10-10T18:18:28Z",
    "user": "sahuguet"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26585,
    "title": "[Usage]: use vllm embedding to extract last token hidden states?",
    "body": "### Your current environment\n\n```/usr/local/lib/python3.12/dist-packages/torch/cuda/__init__.py:63: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.\n  import pynvml  # type: ignore[import]\nCollecting environment information...\n==============================\n        System Info\n==============================\nOS                           : Ubuntu 22.04.5 LTS (x86_64)\nGCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0\nClang version                : 14.0.0-1ubuntu1.1\nCMake version                : version 3.21.0\nLibc version                 : glibc-2.35\n\n==============================\n       PyTorch Info\n==============================\nPyTorch version              : 2.8.0+cu128\nIs debug build               : False\nCUDA used to build PyTorch   : 12.8\nROCM used to build PyTorch   : N/A\n\n==============================\n      Python Environment\n==============================\nPython version               : 3.12.11 (main, Jun  4 2025, 08:56:18) [GCC 11.4.0] (64-bit runtime)\nPython platform              : Linux-5.10.134-16.3.al8.x86_64-x86_64-with-glibc2.35\n\n==============================\n       CUDA / GPU Info\n==============================\nIs CUDA available            : True\nCUDA runtime version         : Could not collect\nCUDA_MODULE_LOADING set to   : LAZY\nGPU models and configuration : GPU 0: NVIDIA H20-3e\nNvidia driver version        : 570.133.20\ncuDNN version                : Could not collect\nHIP runtime version          : N/A\nMIOpen runtime version       : N/A\nIs XNNPACK available         : True\n\n==============================\n          CPU Info\n==============================\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nAddress sizes:                   52 bits physical, 57 bits virtual\nByte Order:                      Little Endian\nCPU(s):                          192\nOn-line CPU(s) list:             0-191\nVendor ID:                       GenuineIntel\nModel name:                      INTEL(R) XEON(R) PLATINUM 8575C\nCPU family:                      6\nModel:                           207\nThread(s) per core:              2\nCore(s) per socket:              48\nSocket(s):                       2\nStepping:                        2\nCPU max MHz:                     4000.0000\nCPU min MHz:                     800.0000\nBogoMIPS:                        5600.00\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm uintr md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nVirtualization:                  VT-x\nL1d cache:                       4.5 MiB (96 instances)\nL1i cache:                       3 MiB (96 instances)\nL2 cache:                        192 MiB (96 instances)\nL3 cache:                        640 MiB (2 instances)\nNUMA node(s):                    2\nNUMA node0 CPU(s):               0-47,96-143\nNUMA node1 CPU(s):               48-95,144-191\nVulnerability Itlb multihit:     Not affected\nVulnerability L1tf:              Not affected\nVulnerability Mds:               Not affected\nVulnerability Meltdown:          Not affected\nVulnerability Mmio stale data:   Not affected\nVulnerability Retbleed:          Not affected\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:        Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence\nVulnerability Srbds:             Not affected\nVulnerability Tsx async abort:   Not affected\n\n==============================\nVersions of relevant libraries\n==============================\n[pip3] flashinfer-pytho",
    "url": "https://github.com/vllm-project/vllm/issues/26585",
    "state": "closed",
    "labels": [
      "usage"
    ],
    "created_at": "2025-10-10T13:01:42Z",
    "updated_at": "2025-12-15T06:54:05Z",
    "comments": 2,
    "user": "rxqy"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26582,
    "title": "[Bug]: which triton-kernels version for MXFP4 Triton backend?",
    "body": "### Your current environment\n\nvllm v0.11.0 installed via `uv pip install vllm --torch-backend=auto`\n\ntriton + triton-kernels at different commits installed from source\n\n### \ud83d\udc1b Describe the bug\n\n**Which triton + triton-kernels version does one have to install to run GPT-OSS with the MXFP4 Triton backend?**\n\nNo matter which version I try, I always get an error `Failed to import Triton kernels. Please make sure your triton version is compatible.`\n\nClearly, the latest triton-kernels will not work since the code in `vllm.model_executor.layers.fused_moe.gpt_oss_triton_kernels_moe` tries to import from `triton_kernels.routing`, but `triton_kernels.routing` has been deprecated (cf. https://github.com/triton-lang/triton/commit/30ede52aa2aecfd2ab3d6672ed21bbf4eb6438b3).\n\nBut also with older versions I get errors like `ImportError: cannot import name 'triton_key' from 'triton.compiler.compiler` or `Error: No module named 'triton.language.target_info`.\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26582",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-10T11:51:59Z",
    "updated_at": "2025-12-12T20:30:06Z",
    "comments": 8,
    "user": "matkle"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2162,
    "title": "[Question] How to suppress verbose Svt[info] logs from video encoding during save_episode()?",
    "body": "Hi, thank you for this fantastic library!\n\nI am currently using lerobot (Version: 0.3.3) to record and save robotics data. When I use the `dataset.save_episode() method`, I get a large number of verbose log messages prefixed with Svt[info]:\n\n```shell\nSvt[info]: -------------------------------------------                                                                                                                                     | 0/1 [00:00<?, ?ba/s]\nSvt[info]: SVT [version]:           SVT-AV1 Encoder Lib v3.0.0\nSvt[info]: SVT [build]  :           GCC 14.2.1 20250110 (Red Hat 14.2.1-7)    64 bit\nSvt[info]: LIB Build date: Jul  3 2025 03:14:07\nSvt[info]: -------------------------------------------\nSvt[info]: Level of Parallelism: 5\nSvt[info]: Number of PPCS 140\nSvt[info]: [asm level on system : up to avx2]\nSvt[info]: [asm level selected : up to avx2]\nSvt[info]: -------------------------------------------\nSvt[info]: SVT [config]: main profile   tier (auto)     level (auto)\nSvt[info]: SVT [config]: width / height / fps numerator / fps denominator              : 256 / 256 / 30 / 1\nSvt[info]: SVT [config]: bit-depth / color format                                      : 8 / YUV420\nSvt[info]: SVT [config]: preset / tune / pred struct                                   : 8 / PSNR / random access\nSvt[info]: SVT [config]: gop size / mini-gop size / key-frame type                     : 2 / 32 / key frame\nSvt[info]: SVT [config]: BRC mode / rate factor                                        : CRF / 30 \nSvt[info]: SVT [config]: AQ mode / variance boost                                      : 2 / 0\nSvt[info]: SVT [config]: sharpness / luminance-based QP bias                           : 0 / 0\nSvt[info]: Svt[info]: -------------------------------------------\nMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 712/712 [00:00<00:00, 4740.68 examples/s]\nCreating parquet from Arrow format: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1/1 [00:00<00:00, 738.56ba/s]\n```\n\nWhile these logs are informative, they clutter the console output, especially when saving a large number of episodes in a loop. I would like to find a way to suppress them.\n\nI try to redirecting stdout and stderr:\n\n```python\nimport os\nfrom contextlib import redirect_stdout, redirect_stderr\n\nwith open(os.devnull, 'w') as f_null:\n    with redirect_stderr(f_null), redirect_stdout(f_null):\n        dataset.save_episode()\n```\n\nBut it doesn't works. \n\nAny guidance on how to achieve a quieter output would be appreciated.",
    "url": "https://github.com/huggingface/lerobot/issues/2162",
    "state": "closed",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-10-10T08:56:52Z",
    "updated_at": "2025-10-13T05:43:01Z",
    "user": "zxytql"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41494,
    "title": "Incorrect tokenizer created for gemma gguf files",
    "body": "### System Info\n\n- `transformers` version: 4.57.0\n- Platform: Linux-5.15.0-144-generic-x86_64-with-glibc2.35\n- Python version: 3.10.12\n- Huggingface_hub version: 0.34.4\n- Safetensors version: 0.5.3\n- Accelerate version: 0.34.2\n- Accelerate config:    not found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.3.1+cu121 (NA)\n- Tensorflow version (GPU?): 2.17.0 (False)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: NA\n\n\n### Who can help?\n\n@yijun-lee \n@Isotr0py \n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```\nfrom transformers import AutoTokenizer                                                              \n                                                                                                 \nt1 = AutoTokenizer.from_pretrained(\"unsloth/gemma-3-4b-it-GGUF\", gguf_file=\"gemma-3-4b-it-Q8_0.gguf\")\nx1 = t1.tokenize(\"<bos>What is eunoia?\")\nprint(f\"{x1=}\")\n\nt2 = AutoTokenizer.from_pretrained(\"google/gemma-3-4b-it\")\nx2 = t2.tokenize(\"<bos>What is eunoia?\")\nprint(f\"{x2=}\")\n``` \n\n### Expected behavior\n\nThe print out of the x1 and x2 should be the same. However,\n\n```\nx1=['<bos>', 'Wh', 'at', '\u2581is', '\u2581eu', 'no', 'ia', '?']\nx2=['<bos>', 'What', '\u2581is', '\u2581e', 'uno', 'ia', '?']\n```\nLooking more into it, the tokenizer created for HF model (t2) is BPE while the tokenizer created for the GGUF model (t1) is Unigram.",
    "url": "https://github.com/huggingface/transformers/issues/41494",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-09T23:27:25Z",
    "updated_at": "2025-11-29T08:02:57Z",
    "comments": 4,
    "user": "amychen85"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165100,
    "title": "Header files not found during build",
    "body": "### \ud83d\udc1b Describe the bug\n\nI'm trying to build pytorch from source but getting the following error:\n\n```\npytorch/aten/src/ATen/core/ivalue.h:4:10: fatal error: ATen/core/TensorBody.h: No such file or directory\n```\n\nSeems these files are generated and I see this line printed before\n\n```\ncore header install: pytorch/build/aten/src/ATen/core/TensorBody.h\n```\n\nHow can I get pytorch to build without these errors?\n\nI'm running the following command\n\n```\nTORCH_CUDA_ARCH_LIST=\"8.0 9.0\" BUILD_TEST=0 USE_DISTRIBUTED=1 USE_NCCL=1 USE_CUDA=1 python setup.py install\n```\n\n### Versions\n\n```\nCollecting environment information...\nPyTorch version: N/A\nIs debug build: N/A\nCUDA used to build PyTorch: N/A\nROCM used to build PyTorch: N/A\n\nOS: CentOS Stream 9 (x86_64)\nGCC version: (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11)\nClang version: Could not collect\nCMake version: version 3.27.0\nLibc version: glibc-2.34\n\nPython version: 3.12.11 | packaged by Anaconda, Inc. | (main, Jun  5 2025, 13:09:17) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-6.4.3-0_fbk15_hardened_2630_gf27365f948db-x86_64-with-glibc2.34\nIs CUDA available: N/A\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: \nGPU 0: NVIDIA PG509-210\nGPU 1: NVIDIA PG509-210\n\nNvidia driver version: 550.90.07\ncuDNN version: Could not collect\nIs XPU available: N/A\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: N/A\n\nCPU:\nArchitecture:                       x86_64\nCPU op-mode(s):                     32-bit, 64-bit\nAddress sizes:                      46 bits physical, 48 bits virtual\nByte Order:                         Little Endian\nCPU(s):                             44\nOn-line CPU(s) list:                0-43\nVendor ID:                          GenuineIntel\nModel name:                         Intel(R) Xeon(R) Platinum 8339HC CPU @ 1.80GHz\nCPU family:                         6\nModel:                              85\nThread(s) per core:                 1\nCore(s) per socket:                 44\nSocket(s):                          1\nStepping:                           11\nBogoMIPS:                           3591.76\nFlags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 arat vnmi umip pku ospke avx512_vnni md_clear flush_l1d arch_capabilities\nVirtualization:                     VT-x\nHypervisor vendor:                  KVM\nVirtualization type:                full\nL1d cache:                          1.4 MiB (44 instances)\nL1i cache:                          1.4 MiB (44 instances)\nL2 cache:                           176 MiB (44 instances)\nL3 cache:                           16 MiB (1 instance)\nNUMA node(s):                       1\nNUMA node0 CPU(s):                  0-43\nVulnerability Gather data sampling: Unknown: Dependent on hypervisor status\nVulnerability Itlb multihit:        Not affected\nVulnerability L1tf:                 Not affected\nVulnerability Mds:                  Not affected\nVulnerability Meltdown:             Not affected\nVulnerability Mmio stale data:      Vulnerable\nVulnerability Retbleed:             Vulnerable\nVulnerability Spec store bypass:    Vulnerable\nVulnerability Spectre v1:           Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers\nVulnerability Spectre v2:           Vulnerable, IBPB: disabled, STIBP: disabled, PBRSB-eIBRS: Vulnerable\nVulnerability Srbds:                Not affected\nVulnerability Tsx async abort:      Mitigation; TSX disabled\n\nVersions of relevant libraries:\n[pip3] flake8==7.3.0\n[pip3] flake8-bugbear==24.12.12\n[pip3] flake8-comprehensions==3.16.0\n[pip3] flake8-executable==2.1.3\n[pip3] flake8-logging-format==2024.24.12\n[pip3] flake8-pyi==25.5.0\n[pip3] flake8_simplify==0.22.0\n[pip3] mypy_extensions==1.1.0\n[pip3] numpy==2.3.1\n[pip3] nvidia-cublas-cu12==12.6.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.6.80\n[pip3] nvidia-cuda-nvrtc-cu12==12.6.77\n[pip3] nvidia-cuda-runtime-cu12==12.6.77\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cufft-cu12==11.3.0.4\n[pip3] nvidia-curand-cu12==10.3.7.77\n[pip3] nvidia-cusolver-cu12==11.7.1.2\n[pip3] nvidia-cusparse-cu12==12.5.4.2\n[pip3] nvidia-cusparselt-cu12==0.7.1\n[pip3] nvidia-nccl-cu12==2.27.5\n[pip3] nvidia-nvjitlink-cu12==12.6.85\n[pip3] nvidia-nvtx-cu12==12.6.77\n[pip3] pytorch-triton==3.5.0+git27664085\n[pip3] torch==2.10.0.dev20251008+cu126\n[pip3] torchaudio==2.8.0.dev20251009+cu126\n[pip3] torc",
    "url": "https://github.com/pytorch/pytorch/issues/165100",
    "state": "open",
    "labels": [
      "module: build",
      "triaged",
      "has workaround"
    ],
    "created_at": "2025-10-09T20:51:23Z",
    "updated_at": "2025-10-10T13:43:50Z",
    "comments": 1,
    "user": "tushar00jain"
  },
  {
    "repo": "vllm-project/vllm",
    "number": 26530,
    "title": "[Bug]: Fix CVE-2023-48022 in docker image",
    "body": "### Your current environment\n\n<details>\n<summary>The output of <code>python collect_env.py</code></summary>\n\nNot required for this.\n\n</details>\n\n\n### \ud83d\udc1b Describe the bug\n\nThe vllm/vllm-openai:v0.10.2 image seems to be affected by the [CVE-2023-48022](https://avd.aquasec.com/nvd/2023/cve-2023-48022/) **Critical** CVE with `ray` (see scan results below). Is there any plan to address this?\n\n```\ngrype vllm/vllm-openai:v0.10.2 --scope all-layers\n```\n\n```\nNAME                       INSTALLED                        FIXED IN                      TYPE       VULNERABILITY        SEVERITY    EPSS           RISK\nray                        2.49.1                                                         python     GHSA-6wgj-66m2-xxp2  Critical    91.9% (99th)   86.4\nlibgssapi-krb5-2           1.19.2-2ubuntu0.4                1.19.2-2ubuntu0.5             deb        CVE-2024-3596        Medium      24.6% (95th)   12.3\nlibk5crypto3               1.19.2-2ubuntu0.4                1.19.2-2ubuntu0.5             deb        CVE-2024-3596        Medium      24.6% (95th)   12.3\nlibkrb5-3                  1.19.2-2ubuntu0.4                1.19.2-2ubuntu0.5             deb        CVE-2024-3596        Medium      24.6% (95th)   12.3\nlibkrb5support0            1.19.2-2ubuntu0.4                1.19.2-2ubuntu0.5             deb        CVE-2024-3596        Medium      24.6% (95th)   12.3\npython3-pip                22.0.2+dfsg-1ubuntu0.6           22.0.2+dfsg-1ubuntu0.7        deb        CVE-2023-32681       Medium      6.3% (90th)    3.1\nlibaom3                    3.3.0-1ubuntu0.1                                               deb        CVE-2019-2126        Low         8.1% (91st)    2.4\nlibcaca0                   0.99.beta19-2.2ubuntu4                                         deb        CVE-2022-0856        Low         4.9% (89th)    1.5\npython3-httplib2           0.20.2-2                                                       deb        CVE-2021-21240       Low         4.5% (88th)    1.4\nlogin                      1:4.8.1-2ubuntu2.2                                             deb        CVE-2024-56433       Low         3.6% (87th)    1.1\npasswd                     1:4.8.1-2ubuntu2.2                                             deb        CVE-2024-56433       Low         3.6% (87th)    1.1\n...\n```\n\n### Before submitting a new issue...\n\n- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.",
    "url": "https://github.com/vllm-project/vllm/issues/26530",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-09T20:16:02Z",
    "updated_at": "2025-10-10T21:14:49Z",
    "comments": 3,
    "user": "geodavic"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2156,
    "title": "How to reproduce lerobot/pi0_libero_finetuned?",
    "body": "Thanks for the great work!\n\nI evaluated lerobot/pi0_libero_finetuned on libero goal datasets.\nWhen using n_action_steps=50, the success rate is ~ 75%\nWhen using n_action_steps=10, the success rate is ~ 90%\n\nI tried to reproduce the training results, so I mainly refered to [train_config.json](https://huggingface.co/lerobot/pi0_libero_finetuned/blob/main/train_config.json) in the `lerobot/pi0_libero_finetuned` repo, which has one key value pair in the config dict:\n```\n\"pretrained_path\": \"pepijn223/pi0_libero_finetuned_extra\"\n```\n\nSo I also refered to the [train_config.json](https://huggingface.co/pepijn223/pi0_libero_finetuned_extra/blob/main/train_config.json) in th `pepijn223/pi0_libero_finetuned_extra` repo, which also has the key value pair:\n```\n\"pretrained_path\": \"lerobot/pi0_libero_finetuned\"\n```\nThis again points back to the checkpoint that depends on it.\n\nAnd my questions are, how are these checkpoints actually trained, and can anyone provide a train_config.json in the latest lerobot version that can reproduce lerobot/pi0_libero_finetuned?\n\nPlease also share some successful training configs if possible!",
    "url": "https://github.com/huggingface/lerobot/issues/2156",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "simulation"
    ],
    "created_at": "2025-10-09T18:11:47Z",
    "updated_at": "2025-10-22T09:27:03Z",
    "user": "PuzhenYuan"
  },
  {
    "repo": "pytorch/ao",
    "number": 3137,
    "title": "README should highlight our huggingface models",
    "body": "We've got a few quantized models here and plan to keep adding to it: https://huggingface.co/pytorch. This should be highlighted close to the top of the README",
    "url": "https://github.com/pytorch/ao/issues/3137",
    "state": "open",
    "labels": [
      "topic: documentation"
    ],
    "created_at": "2025-10-09T18:07:51Z",
    "updated_at": "2025-10-09T18:08:06Z",
    "comments": 0,
    "user": "andrewor14"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2153,
    "title": "Why can\u2019t I find something like train_expert_only in the latest version of pi0? Do the current versions of pi0 and pi0.5 only support full-parameter training?",
    "body": "Why can\u2019t I find something like \u201ctrain_expert_only\u201d in the latest version of pi0?\nDo the current versions of pi0 and pi0.5 only support full-parameter training?",
    "url": "https://github.com/huggingface/lerobot/issues/2153",
    "state": "closed",
    "labels": [
      "enhancement",
      "question",
      "policies",
      "good first issue"
    ],
    "created_at": "2025-10-09T13:08:10Z",
    "updated_at": "2025-12-31T14:54:29Z",
    "user": "ZHHhang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 165051,
    "title": "`[__recompiles]     - 0/3: expected type of 'args[1]' to be a tensor type, ' but found <class 'torch.Tensor'>` cryptic recompilation cause",
    "body": "### \ud83d\udc1b Describe the bug\n\nHello,\n\nIn some private workload I am running (unfortunately I don't have a minimal repro - I can try to get one if needed), the recompilation cause:\n\n```\nV1009 11:33:51.404000 3024 site-packages/torch/_dynamo/guards.py:3006] [0/5] [__recompiles] Recompiling function inner in /root/miniforge3/lib/python3.12/site-packages/torch/_dynamo/external_utils.py:68\nV1009 11:33:51.404000 3024 site-packages/torch/_dynamo/guards.py:3006] [0/5] [__recompiles]     triggered by the following guard failure(s):\nV1009 11:33:51.404000 3024 site-packages/torch/_dynamo/guards.py:3006] [0/5] [__recompiles]     - 0/1: expected type of 'args[1]' to be a tensor type, ' but found <class 'torch.Tensor'>\n```\n\ngets printed.\n\nThe log `expected type of 'args[1]' to be a tensor type, ' but found <class 'torch.Tensor'>` is surprising to me. What does it mean?\n\nThank you.\n\n(this is on torch 2.7 - I'll test on 2.8 shortly)\n\n### Versions\n\n```\nCollecting environment information...\nPyTorch version: 2.7.1+cu126\nIs debug build: False\nCUDA used to build PyTorch: 12.6\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.1 LTS (x86_64)\nGCC version: (Ubuntu 13.2.0-23ubuntu4) 13.2.0\nClang version: Could not collect\nCMake version: version 3.31.6\nLibc version: glibc-2.39\n\nPython version: 3.12.10 | packaged by conda-forge | (main, Apr 10 2025, 22:21:13) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-6.8.0-59-generic-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: 12.6.85\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration:\nGPU 0: NVIDIA H100 80GB HBM3\nGPU 1: NVIDIA H100 80GB HBM3\nGPU 2: NVIDIA H100 80GB HBM3\nGPU 3: NVIDIA H100 80GB HBM3\nGPU 4: NVIDIA H100 80GB HBM3\nGPU 5: NVIDIA H100 80GB HBM3\nGPU 6: NVIDIA H100 80GB HBM3\nGPU 7: NVIDIA H100 80GB HBM3\n\nNvidia driver version: 570.133.20\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        52 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               384\nOn-line CPU(s) list:                  0-383\nVendor ID:                            AuthenticAMD\nModel name:                           AMD EPYC 9654 96-Core Processor\nCPU family:                           25\nModel:                                17\nThread(s) per core:                   2\nCore(s) per socket:                   96\nSocket(s):                            2\nStepping:                             1\nFrequency boost:                      enabled\nCPU(s) scaling MHz:                   46%\nCPU max MHz:                          3707.8120\nCPU min MHz:                          1500.0000\nBogoMIPS:                             4800.35\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin cppc amd_ibpb_ret arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid overflow_recov succor smca fsrm flush_l1d debug_swap\nVirtualization:                       AMD-V\nL1d cache:                            6 MiB (192 instances)\nL1i cache:                            6 MiB (192 instances)\nL2 cache:                             192 MiB (192 instances)\nL3 cache:                             768 MiB (24 instances)\nNUMA node(s):                         2\nNUMA node0 CPU(s):                    0-95,192-287\nNUMA node1 CPU(s):                    96-191,288-383\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   M",
    "url": "https://github.com/pytorch/pytorch/issues/165051",
    "state": "open",
    "labels": [
      "needs reproduction",
      "triaged",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2025-10-09T11:43:27Z",
    "updated_at": "2025-10-10T17:59:08Z",
    "comments": 3,
    "user": "fxmarty-amd"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7802,
    "title": "[Docs] Missing documentation for `Dataset.from_dict`",
    "body": "Documentation link: https://huggingface.co/docs/datasets/en/package_reference/main_classes\n\nLink to method (docstring present): https://github.com/huggingface/datasets/blob/6f2502c5a026caa89839713f6f7c8b958e5e83eb/src/datasets/arrow_dataset.py#L1029\n\nThe docstring is present for the function, but seems missing from the official documentation for the `Dataset` class on HuggingFace.\n\nThe method in question:\n```python\n    @classmethod\n    def from_dict(\n        cls,\n        mapping: dict,\n        features: Optional[Features] = None,\n        info: Optional[DatasetInfo] = None,\n        split: Optional[NamedSplit] = None,\n    ) -> \"Dataset\":\n        \"\"\"\n        Convert `dict` to a `pyarrow.Table` to create a [`Dataset`].\n\n        Important: a dataset created with from_dict() lives in memory\n        and therefore doesn't have an associated cache directory.\n        This may change in the future, but in the meantime if you\n        want to reduce memory usage you should write it back on disk\n        and reload using e.g. save_to_disk / load_from_disk.\n\n        Args:\n            mapping (`Mapping`):\n                Mapping of strings to Arrays or Python lists.\n            features ([`Features`], *optional*):\n                Dataset features.\n            info (`DatasetInfo`, *optional*):\n                Dataset information, like description, citation, etc.\n            split (`NamedSplit`, *optional*):\n                Name of the dataset split.\n\n        Returns:\n            [`Dataset`]\n        \"\"\"\n```",
    "url": "https://github.com/huggingface/datasets/issues/7802",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-09T02:54:41Z",
    "updated_at": "2025-10-19T16:09:33Z",
    "comments": 2,
    "user": "aaronshenhao"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164971,
    "title": "[dynamo] Keep stack trace where mutations happened",
    "body": "### \ud83d\udc1b Describe the bug\n\nThis is essential to figure out where we want to use strict-export but there is a side effect, and we want to inform the user about how to rewrite their code to remove the side-effect.\n\n### Error logs\n\n_No response_\n\n### Versions\n\nNA\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @Lucaskabela @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4",
    "url": "https://github.com/pytorch/pytorch/issues/164971",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo",
      "oncall: export"
    ],
    "created_at": "2025-10-08T18:52:09Z",
    "updated_at": "2025-10-09T17:23:32Z",
    "comments": 1,
    "user": "anijain2305"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164966,
    "title": "XPU OOM when allocate tensor according to its reported available memory",
    "body": "### \ud83d\udc1b Describe the bug\n\nrun below\n```\nimport torch\n\ntorch.xpu.empty_cache()\n\n## bring up the context, it may occupy memory\na = torch.rand(5).to(\"xpu:0\")\n\nfree_memory_bytes = torch.xpu.mem_get_info(\"xpu:0\")[0]\nrequired_memory_bytes = 5000 * 5000 * (32 // 8)\n\n# Leaving 50 MB of free memory for possible buffers, etc.\nn_vals = (free_memory_bytes - required_memory_bytes - int(50e6)) // (32 // 8)\nfoo = torch.rand(n_vals, device=\"xpu:0\") \n```\n\nYou'll get exception as below:\n\n> Traceback (most recent call last):\n>   File \"/workspace/accelerate/./test.py\", line 13, in <module>\n>     foo = torch.rand(n_vals, device=\"xpu:0\")\n>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n> torch.OutOfMemoryError: XPU out of memory. Tried to allocate 63.71 GiB. GPU 0 has a total capacity of 63.98 GiB. Of the allocated memory 512 bytes is allocated by PyTorch, and 2.00 MiB is reserved by PyTorch but unallocated. Please use `empty_cache` to release all unoccupied cached memory.\n\n### Versions\n\nlatest xpu pytorch\n\ncc @gujinghui @EikanWang @fengyuan14 @guangyey",
    "url": "https://github.com/pytorch/pytorch/issues/164966",
    "state": "open",
    "labels": [
      "module: memory usage",
      "triaged",
      "module: xpu"
    ],
    "created_at": "2025-10-08T18:39:18Z",
    "updated_at": "2025-10-11T01:40:46Z",
    "comments": 3,
    "user": "yao-matrix"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164951,
    "title": "Docker checkouts take 30+ min on H100 runners",
    "body": "### \ud83d\udc1b Describe the bug\n\nSee https://github.com/pytorch/pytorch/actions/runs/18344478781/job/52264153169 for example where \"Pull docker image\" takes 37 min!!! Can we cache/slim the docker? Or connect those runners to more powerful IO system\n\n### Versions\n\nCI\n\ncc @seemethere @pytorch/pytorch-dev-infra",
    "url": "https://github.com/pytorch/pytorch/issues/164951",
    "state": "open",
    "labels": [
      "module: ci",
      "triaged"
    ],
    "created_at": "2025-10-08T17:12:15Z",
    "updated_at": "2025-10-08T17:12:25Z",
    "comments": 0,
    "user": "malfet"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164922,
    "title": "`torch.compile` fails to trace `datetime.now()` with Dynamo guard check failure",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhen compiling a model that uses `datetime.now()` function, `torch.compile` fails with a Dynamo guard check error. The warning message explicitly identifies this as a Python builtin that Dynamo cannot trace, and suggests filing an issue to add support.\n```python\nimport torch\nfrom datetime import datetime\n\nclass TestModel(torch.nn.Module):\n    def forward(self, x):\n        current_time = datetime.now()\n        return x + current_time.second\n\nx = torch.randn(5)\nmodel = TestModel()\nprint(\"Eager output:\", model(x))\nprint(\"Compiled output:\", torch.compile(model)(x))\n```\n\n### Error logs\n\n```\nEager output: tensor([51.0676, 52.0309, 52.6077, 50.6691, 53.6591])\nD:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\_dynamo\\variables\\functions.py:1598: UserWarning: Dynamo does not know how to trace the builtin `<unknown module>.datetime.now.` This function is either a Python builtin (e.g. _warnings.warn) or a third-party C/C++ Python extension (perhaps created with pybind).\nIf it is a Python builtin, please file an issue on GitHub so the PyTorch team can add support for it and see the next case for a workaround.\nIf it is a third-party C/C++ Python extension, please either wrap it into a PyTorch-understood custom operator (see https://pytorch.org/tutorials/advanced/custom_ops_landing_page.html for more details) or, if it is traceable, use `torch.compiler.allow_in_graph`.\n  torch._dynamo.utils.warn_once(explanation + \"\\n\" + \"\\n\".join(hints))\nTraceback (most recent call last):\n  File \"E:\\DL_Compiler_Test\\torch_code\\test.py\", line 12, in <module>\n    print(\"Compiled output:\", torch.compile(model)(x))\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\_dynamo\\eval_frame.py\", line 418, in __call__\n    return super().__call__(*args, **kwargs)\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1777, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1788, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\_dynamo\\eval_frame.py\", line 886, in compile_wrapper\n    return fn(*args, **kwargs)\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1777, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1788, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\_dynamo\\convert_frame.py\", line 2010, in __call__\n    result = self._torchdynamo_orig_backend(\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\_dynamo\\convert_frame.py\", line 1760, in __call__\n    result = self._inner_convert(\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\_dynamo\\convert_frame.py\", line 691, in __call__\n    result = _compile(\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\_dynamo\\convert_frame.py\", line 1569, in _compile\n    guarded_code, tracer_output = compile_inner(code, one_graph, hooks)\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\_utils_internal.py\", line 97, in wrapper_function\n    return function(*args, **kwargs)\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\_dynamo\\convert_frame.py\", line 1251, in compile_inner\n    return _compile_inner(code, one_graph, hooks)\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\_dynamo\\convert_frame.py\", line 1385, in _compile_inner\n    check_fn = dynamo_output.build_guards(\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\_dynamo\\convert_frame.py\", line 860, in build_guards\n    return CheckFunctionManager(\n  File \"D:\\Programs\\Python\\virtualenvs\\torch_code-afvE469o\\lib\\site-packages\\torch\\_dynamo\\guards.py\", line 3593, in __init__\n    raise AssertionError(f\"Guard check failed: {reasons}\")\nAssertionError: Guard check failed: 0/0: ___check_obj_id(G['datetime'].now, 2702242757856)             # current_time = datetime.now()  # E:\\DL_Compiler_Test\\torch_code\\test.py:6 in forward\n```\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.10.0.dev20251005+cpu\nIs debug build: False\nCUDA used to build PyTorch: None\nROCM used to build PyTorch: N/A\n\nOS: Microsoft Windows 11\nGCC version: Could not collect\nClang version: Could not collect\nCMake version: version 4.0.2\nLibc version: N/A\n\nPython version: 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)\nPython platform: Windows-10-10.0.26100-SP0\nIs CUDA available: Fal",
    "url": "https://github.com/pytorch/pytorch/issues/164922",
    "state": "open",
    "labels": [
      "triaged",
      "function request",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2025-10-08T10:19:41Z",
    "updated_at": "2025-10-14T20:25:33Z",
    "comments": 9,
    "user": "LiSsHhUuAaIi"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41431,
    "title": "gradient scaling occurs even though total gradient remains < max_grad_norm in trainer.py",
    "body": "Even though gradients remain < max_grad_norm throughout training, the gradient still goes through a scaling process. For instance, I set max_grad_norm = 1, and grad_norm consistently remains <= 0.33. Because the trainer takes you through the grad clip process if max_grad_norm > 0 or not None, this operation always gets executed within torch's clip function: `clip_coef = max_norm / (total_norm + 1e-6)`. Is there a way to prevent this? Thanks.  \n\n",
    "url": "https://github.com/huggingface/transformers/issues/41431",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-07T22:13:08Z",
    "updated_at": "2025-11-15T08:02:51Z",
    "comments": 7,
    "user": "lorsonblair"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164878,
    "title": "Ban and remove plain asserts with no message in our python code",
    "body": "In a similar spirit to https://github.com/pytorch/pytorch/issues/148114\n\nWe should remove asserts without any message explaining what is happening.\nOn top of that, we should move them to proper errors to avoid any issue with python -O.\n\nThere are two parts here:\n- [x] Enable Ruff lint for this https://docs.astral.sh/ruff/rules/assert/ (with appropriate skips)\n- [ ] Remove all the existing ones\n\ncc @malfet",
    "url": "https://github.com/pytorch/pytorch/issues/164878",
    "state": "open",
    "labels": [
      "module: error checking",
      "triaged",
      "actionable",
      "module: python frontend"
    ],
    "created_at": "2025-10-07T21:36:50Z",
    "updated_at": "2025-12-16T20:02:43Z",
    "comments": 26,
    "user": "albanD"
  },
  {
    "repo": "huggingface/candle",
    "number": 3120,
    "title": "AutoModel / PreTrainedModel equivalent magic ?",
    "body": "Hello all, first, thanks a lot for this wonderful crate. \n\nI was wondering if it's on the roadmap or if there is a solution to have the same magic as in python with a `AutoModel.from_pretrained(\"the_model_name_string\")`\n\nAs I'm protoyping and am often changing models... which requires to change the architecture everytime and having this \"auto load\" would save time. \n\nAlternatives : https://github.com/lucasjinreal/Crane or https://docs.rs/kalosm/latest/kalosm/\n\nThanks in advance, \nHave a nice day. ",
    "url": "https://github.com/huggingface/candle/issues/3120",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-07T21:27:31Z",
    "updated_at": "2025-10-09T13:02:35Z",
    "comments": 2,
    "user": "ierezell"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2134,
    "title": "what is the transformers version for latest lerobot pi0?",
    "body": "### System Info\n\n```Shell\n- lerobot version: 0.3.4\n- Platform: Linux-5.4.0-148-generic-x86_64-with-glibc2.31\n- Python version: 3.10.18\n- Huggingface Hub version: 0.35.3\n- Datasets version: 4.1.1\n- Numpy version: 1.26.4\n- PyTorch version: 2.7.1+cu126\n- Is PyTorch built with CUDA support?: True\n- Cuda version: 12.6\n- GPU model: NVIDIA A800-SXM4-80GB\n- Using GPU in script?:\n\nlerobot-eval --policy.path=\"lerobot/pi0_libero_finetuned\" --env.type=libero --env.task=libero_goal --eval.batch_size=1 --eval.n_episodes=2 --seed=1000\n```\n\n### Information\n\n- [x] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nClone latest LeRobot repository and install dependencies and run lerobot_eval.py\n```\nlerobot-eval --policy.path=\"lerobot/pi0_libero_finetuned\" --env.type=libero --env.task=libero_goal --eval.batch_size=1 --eval.n_episodes=2 --seed=1000\n```\n```\nTraceback (most recent call last):\n  File \"/cephfs/yuanpuzhen/conda_data/envs/libero/bin/lerobot-eval\", line 7, in <module>\n    sys.exit(main())\n  File \"/cephfs/yuanpuzhen/project/pi_space/lerobot/src/lerobot/scripts/lerobot_eval.py\", line 750, in main\n    eval_main()\n  File \"/cephfs/yuanpuzhen/project/pi_space/lerobot/src/lerobot/configs/parser.py\", line 225, in wrapper_inner\n    response = fn(cfg, *args, **kwargs)\n  File \"/cephfs/yuanpuzhen/project/pi_space/lerobot/src/lerobot/scripts/lerobot_eval.py\", line 495, in eval_main\n    policy = make_policy(\n  File \"/cephfs/yuanpuzhen/project/pi_space/lerobot/src/lerobot/policies/factory.py\", line 386, in make_policy\n    policy = policy_cls.from_pretrained(**kwargs)\n  File \"/cephfs/yuanpuzhen/project/pi_space/lerobot/src/lerobot/policies/pi0/modeling_pi0.py\", line 923, in from_pretrained\n    model = cls(config, **kwargs)\n  File \"/cephfs/yuanpuzhen/project/pi_space/lerobot/src/lerobot/policies/pi0/modeling_pi0.py\", line 872, in __init__\n    self.model = PI0Pytorch(config)\n  File \"/cephfs/yuanpuzhen/project/pi_space/lerobot/src/lerobot/policies/pi0/modeling_pi0.py\", line 545, in __init__\n    raise ValueError(msg) from None\nValueError: An incorrect transformer version is used, please create an issue on https://github.com/huggingface/lerobot/issues\nException ignored in: <function MjRenderContext.__del__ at 0x7fb47e108ee0>\nTraceback (most recent call last):\n  File \"/cephfs/yuanpuzhen/conda_data/envs/libero/lib/python3.10/site-packages/robosuite/utils/binding_utils.py\", line 199, in __del__\n    self.gl_ctx.free()\n  File \"/cephfs/yuanpuzhen/conda_data/envs/libero/lib/python3.10/site-packages/robosuite/renderers/context/egl_context.py\", line 150, in free\n    EGL.eglDestroyContext(EGL_DISPLAY, self._context)\n  File \"/cephfs/yuanpuzhen/conda_data/envs/libero/lib/python3.10/site-packages/OpenGL/error.py\", line 230, in glCheckError\n    raise self._errorClass(\nOpenGL.raw.EGL._errors.EGLError: EGLError(\n        err = EGL_NOT_INITIALIZED,\n        baseOperation = eglDestroyContext,\n        cArguments = (\n                <OpenGL._opaque.EGLDisplay_pointer object at 0x7fb47c6805c0>,\n                <OpenGL._opaque.EGLContext_pointer object at 0x7fb47c6804c0>,\n        ),\n        result = 0\n)\n```\n### Expected behavior\n\nExpect to evaluate the given checkpoint, output eval videos and eval_info.json\n\nCan you provide stable transformers and numpy versions for the latest lerobot?\n\nAnd what version of transformers could satisfied the code in PI0Pytorch?\n```\n        try:\n            from transformers.models.siglip import check\n\n            if not check.check_whether_transformers_replace_is_installed_correctly():\n                raise ValueError(msg)\n        except ImportError:\n            raise ValueError(msg) from None\n```",
    "url": "https://github.com/huggingface/lerobot/issues/2134",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-07T12:06:52Z",
    "updated_at": "2025-11-14T20:04:50Z",
    "user": "PuzhenYuan"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1805,
    "title": "TP gradient update is wrong during MoE backward",
    "body": "### Bug description\n\nhttps://github.com/pytorch/torchtitan/blob/main/torchtitan/experiments/llama4/infra/parallelize.py#L454\n\nTP used Dtensor's local tensor by calling to_local(), and the local tensor's gradient can not be correctly propagated back to the DTensor , because we didn't set grad_placements to tell autograd how to back propagete the gradients. So we missed a reduce_scatter() during backward in this line here.\n\n### Versions\n\nCurrent main torchtitan",
    "url": "https://github.com/pytorch/torchtitan/issues/1805",
    "state": "closed",
    "labels": [
      "high priority",
      "triage review"
    ],
    "created_at": "2025-10-07T03:43:55Z",
    "updated_at": "2025-10-15T03:32:04Z",
    "comments": 1,
    "user": "wwwjn"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164786,
    "title": "How should we handle PyTorch build flags in torch/headeronly for custom ops?",
    "body": "### \ud83d\udc1b Describe the bug\n\nThis isn't exactly a bug, per s\u00e9, but it is misleading. Thanks to @mikaylagawarecki pointing out the following phenomenon in a parallel file, I'm realizing we have the following behavior in torch/headeronly/util/Half.h today:\n\nConsider the following ifdef\nhttps://github.com/pytorch/pytorch/blob/6861fa43e5fee7fedc0213e352fa983edea8aa78/torch/headeronly/util/Half.h#L44-L47\n\nWhen libtorch is compiling Half.h, it will properly generate the fast vectorization logic depending on how CPU_CAPABILITY_AVX2 and CPU_CAPABILITY_AVX512 is set. Great. This is expected.\n\nWhat may be unexpected is that custom ops including the headeronly Half.h will _not_ have CPU_CAPABILITY_AVX2 or CPU_CAPABILITY_AVX512 set and so will not have performant CPU code for `float2half_scalar` and `half2float_scalar` of Half.h.\n\n### Versions\n\non main\n\ncc @malfet @seemethere @chauhang @penguinwu @zou3519 @bdhirsh @swolchok ",
    "url": "https://github.com/pytorch/pytorch/issues/164786",
    "state": "open",
    "labels": [
      "module: build",
      "triaged",
      "module: custom-operators",
      "oncall: pt2",
      "module: pt2-dispatcher"
    ],
    "created_at": "2025-10-06T21:22:09Z",
    "updated_at": "2025-10-07T15:26:28Z",
    "comments": 1,
    "user": "janeyx99"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12441,
    "title": "Support Wan2.2-Animate",
    "body": "[Wan2.2-Animate-14B](https://humanaigc.github.io/wan-animate), it's a unified model for character animation and replacement, with holistic movement and expression replication.\n\nhttps://github.com/user-attachments/assets/351227d0-4edc-4f6c-9bf9-053e53f218e4\n\nWe would like open to the community, if anyone is interested, to integrate this model with Diffusers. Just take into consideration these points:\n\n1.  Don't integrate the preprocessing, we can help with that using a modular custom block.\n2. This issue is for more advanced users than know the diffusers library very well.\n\nJust let me know that you're interested and if you have any doubts, feel free to ask, if you open a PR we can help but we are currently busy with other priorities so we ask you to be patient.",
    "url": "https://github.com/huggingface/diffusers/issues/12441",
    "state": "closed",
    "labels": [
      "help wanted",
      "contributions-welcome"
    ],
    "created_at": "2025-10-06T18:08:21Z",
    "updated_at": "2025-11-13T02:52:32Z",
    "comments": 0,
    "user": "asomoza"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2124,
    "title": "Question regarding downsampling and resizing dataset",
    "body": "Hi,\n\nThank you for providing this wonderful library! I was curious about how one can take an existing dataset (collected or downloaded) and modify the fps (downsample, resize images, or delete specific episodes (for v3) prior to policy training. I am finding this tricky to do particularly when the dataset is not loaded in code but provided as a parameter to lerobot-train. I've spent time digging around the codebase but didn't see a way that doesn't involve loading the dataset in script first and adjusting this (for resizing, not sure about downsampling fps). Does the codebase provide utility functions for this? Thanks!",
    "url": "https://github.com/huggingface/lerobot/issues/2124",
    "state": "open",
    "labels": [
      "question",
      "dataset",
      "good first issue"
    ],
    "created_at": "2025-10-06T16:07:47Z",
    "updated_at": "2025-10-07T20:25:20Z",
    "user": "karthikm-0"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41363,
    "title": "RT-Detr docs should reflect fixed 640x640 input size",
    "body": "The authors of RT-Detr mention that the model was trained on 640x640 images and was meant to be used for inference on 640x640 images. Also, the current implementation has certain quirks that make training/inferring on images of different sizes problematic. For example, the pixel masks used for batching images of varying sizes are discarded.\n\nhttps://github.com/huggingface/transformers/blob/0452f28544f3626273d25f07f83c0e5f7da2d47a/src/transformers/models/rt_detr/modeling_rt_detr.py#L1645\n\nThe above are not clear in the current docs. I'll open a PR which adds a few lines in the docs to notify users about these issues.",
    "url": "https://github.com/huggingface/transformers/issues/41363",
    "state": "closed",
    "labels": [
      "Documentation"
    ],
    "created_at": "2025-10-06T11:04:37Z",
    "updated_at": "2025-11-06T13:24:01Z",
    "comments": 4,
    "user": "konstantinos-p"
  },
  {
    "repo": "pytorch/ao",
    "number": 3122,
    "title": "Access to compact internal representation for `target_dtype=torch.uint4`",
    "body": "Hello, for my use case, I need to access and store the internal representation of 4-bit quantization. This is because I'd like to quantize and write back part of the full buffer. Think about \"add some new channels\" or \"overwrite content of a channel\".\n\nI have problems getting to the compressed representation. I wrote this:\n\n```\n    from torchao.quantization.observer import AffineQuantizedMinMaxObserver\n    from torchao.quantization.granularity import PerAxis\n    from torchao.quantization.quant_primitives import MappingType\n    from torchao.dtypes import to_affine_quantized_intx_static\n    from torchao.dtypes.affine_quantized_tensor import (\n        get_tensor_impl_constructor,\n        AffineQuantizedTensor,\n    )\n    from torchao.dtypes.utils import PlainLayout\n\n    source_dtype = torch.float32\n    target_dtype = torch.uint4\n    blocksize = 4096\n    num_slots = 128\n\n    input_float = torch.randn((num_slots, blocksize), dtype=source_dtype)\n    print(f\"shape={(num_slots, blocksize)}: Compute scales, zero_points\")\n    obs = AffineQuantizedMinMaxObserver(\n        mapping_type=MappingType.ASYMMETRIC,\n        target_dtype=target_dtype,\n        granularity=PerAxis(axis=0),\n        eps=torch.finfo(torch.float32).eps,\n        scale_dtype=torch.float32,\n        zero_point_dtype=torch.float32,\n    )\n    obs(input_float)\n    scales, zero_points = obs.calculate_qparams()\n    # Quantize\n    print(\"Quantize\")\n    quant_tensor = to_affine_quantized_intx_static(\n        input_float=input_float,\n        scale=scales,\n        zero_point=zero_points,\n        block_size=(1, blocksize),\n        target_dtype=target_dtype,\n    )\n    int_data = quant_tensor.tensor_impl.get_plain()[0]\n    print(f\"input_float {input_float.shape}, blocksize={blocksize}, int_data {int_data.shape}, int_data.dtype={int_data.dtype}\")\n    print(f\"int_data.min={int_data.min().item()}, int_data.max={int_data.max().item()}\")\n    # Dequantize\n    print(\"Dequantize\")\n    tensor_impl_ctr = get_tensor_impl_constructor(PlainLayout)\n    tensor_impl = tensor_impl_ctr(\n        int_data, scales, zero_points, PlainLayout(),\n    )\n    reconstructed = AffineQuantizedTensor(\n        tensor_impl,\n        block_size=(1, blocksize),\n        shape=int_data.shape,\n        dtype=source_dtype,\n    ).dequantize(output_dtype=source_dtype)\n    print(f\"reconstructed {reconstructed.shape}, dtype={reconstructed.dtype}\")\n```\n\nFrom this, I get that `quant_tensor.tensor_impl.get_plain()[0]` returns an array of the correct shape, but with `dtype=torch.uint8`, yet values are in fact in the `uint4` range.\n\nThis cannot be how you store these things internally, otherwise this would not be 4-bit quantization.\n\nIs there a way to get to the internal representation? I suppose this is something like a `(num_slots, blocksize // 2)` array of `uint8` type. I can compute this myself, but this seems a detour.\n\nI know it is not nice to have to use internal representations, but your external API just does not support what I need.\n\nEssentially, I want to maintain the quantized version of a buffer of shape `(all_slots, blocksize)`, but be able to modify slices. Say `buffer[a:b, :]` changes, I want to only re-quantize this part and write it back. I don't want to compute and store your supported representations for every single slot, that would be slow. So, getting to the internal representation seems the way to go, unless you'd support such use cases directly.",
    "url": "https://github.com/pytorch/ao/issues/3122",
    "state": "open",
    "labels": [
      "question",
      "triaged"
    ],
    "created_at": "2025-10-06T11:02:12Z",
    "updated_at": "2025-10-09T08:29:55Z",
    "user": "mseeger"
  },
  {
    "repo": "pytorch/xla",
    "number": 9670,
    "title": "`all_reduce` does not apply `scale` when `xr.world_size == 1`",
    "body": "## \u2753 Questions and Help\n\nHi, I have noticed that when `world_size == 1`, `all_reduce` is a no-op and does not apply `scale`:\n\nIn `torch_xla.core.xla_model` in `def all_reduce`:\n```\n# No-op if there is only one device\n  if runtime.world_size() == 1 and not xu.getenv_as('XLA_ALWAYS_ALLREDUCE',\n                                                    bool, False):\n    if isinstance(inputs, torch.Tensor):\n      return inputs.clone()\n    else:\n      return inputs\n```\n\nIs this intended behavior? If it is indeed intended, it makes the use of `all_reduce` inconsistent when using `world_size == 1` vs `world_size > 1`. The issue manifests, for example, when you are logging running average loss value:\n\n```\nepoch_loss = xm.all_reduce(xm.REDUCE_SUM, loss_accum, scale=1.0 / ((idx + 1) * world_size))\n``` ",
    "url": "https://github.com/pytorch/xla/issues/9670",
    "state": "open",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2025-10-06T04:40:24Z",
    "updated_at": "2025-10-17T06:31:12Z",
    "user": "afzalxo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164696,
    "title": "Support torch._inductor.config.inplace_buffers for custom_op whenever possible",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nIs it possible to add this support to custom_op?\nThe user would annotate what buffers can be used for in_place and torch compile should reuse buffers whenever possible (if they are not required by other ops or backward etc).\n\nThis is to reduce mem usage.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @aakhundov @coconutruben @zou3519 @bdhirsh",
    "url": "https://github.com/pytorch/pytorch/issues/164696",
    "state": "open",
    "labels": [
      "triaged",
      "module: custom-operators",
      "function request",
      "oncall: pt2",
      "module: inductor",
      "module: pt2-dispatcher"
    ],
    "created_at": "2025-10-05T08:30:21Z",
    "updated_at": "2025-11-12T20:52:44Z",
    "comments": 6,
    "user": "mayank31398"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1873,
    "title": "Why is my Python implementation faster than the Rust implementation?",
    "body": "I am comparing the tokenizers in the Python and the huggingface implementation as follows\n\n```python\nimport json\nimport time\nfrom transformers import AutoTokenizer\ntokenizer = AutoTokenizer.from_pretrained(\"bert-base-cased\")\n\n[... Define and save the texts as data.json]\nwith open('./data.json', 'w', encoding='utf-8') as f:\n    json.dump(texts[:N], f, ensure_ascii=False)\n\nN = 500\nstart = time.time()\nfor text in texts:\n    tokenizer(text)\nend = time.time()\nloop_time = end-start\nprint(\"Python in a loop: \",end-start, f\"for {N} examples.\")\n# Python in a loop:  4.231077432632446 for 500 examples.\n\nstart = time.time()\nresults = tokenizer(texts[:N])\nend = time.time()\nbatch_time = end-start\nprint(\"Python as a batch: \",batch_time, f\"for {N} examples.\") \n# Python as a batch: 0.86988 for 500 examples.\n\n```\nand the rust implementation\n\n```rust\nuse tokenizers::tokenizer::{Result as TokenizerResult, Tokenizer,Encoding};\nuse serde_json::Result as SerdeResult;\nuse std::time::Instant;\nuse std::fs::File;\nuse std::io::{BufReader,BufWriter, Write};\nuse std::any::type_name;\nuse rayon::prelude::*;\n\nfn main() -> TokenizerResult<()> {\n    // needs http feature enabled\n    let tokenizer = Tokenizer::from_pretrained(\"bert-base-cased\", None)?;\n    \n    let file = File::open(\"./data.json\")?;\n    let reader = BufReader::new(file);\n    let items: Vec<String> = serde_json::from_reader(reader)?;\n    let texts: Vec<&str> = items.iter().map(|s| s.as_str()).collect();\n\n    let start = Instant::now();\n    for name in texts.iter(){\n        let encoding = tokenizer.encode(*name, false)?;\n    }\n    let duration = start.elapsed();\n    println!(\"(1) Execution in loop: {:.6} seconds\", duration.as_secs_f64());\n    // (1) Execution in loop: 29.867990 seconds\n\n    let start = Instant::now();\n    let encoded_items: Vec<_> = texts.par_iter().map(|name| tokenizer.encode(*name, false)).collect();\n    let duration = start.elapsed();\n    println!(\"(2) Execution with par_iter : time: {:.6} seconds\", duration.as_secs_f64());\n    // (2) Execution with par_iter : 3.968467\n    \n    let start = Instant::now();\n    let encoded_items: TokenizerResult<Vec<Encoding>> = tokenizer.encode_batch(items2.clone(), false);\n    let duration = start.elapsed();\n    println!(\"(3) Execution with encode_batch : time: {:.6} seconds\", duration.as_secs_f64());\n    // (3) Execution with encode_batch : 3.968467 seconds\n   \n\n    let start = Instant::now();\n    let encoded_items: TokenizerResult<Vec<Encoding>> = tokenizer.encode_batch_char_offsets(items2.clone(), false);\n    let duration = start.elapsed();\n    println!(\"(4) Execution with encode_batch_char_offsets : time: {:.6} seconds\", duration.as_secs_f64());\n    // (4) Execution with encode_batch_char_offsets : 6.839765 seconds\n\n    let start = Instant::now();\n    let encoded_items: TokenizerResult<Vec<Encoding>> = tokenizer.encode_batch_fast(items2.clone(), false);\n    let duration = start.elapsed();\n    println!(\"(5) Execution with encode_batch_fast : time: {:.6} seconds\", duration.as_secs_f64());\n    // (5) Execution with encode_batch_fast : 5.758732 seconds\n\n\n    Ok(())\n}\n```\n\nYou see that Rust is 10 times slower in a loop and 3 times slower even when parallelization is used.\nWhat is the trick here? How can I make my Rust code as fast (or hopefully faster) than the python code?",
    "url": "https://github.com/huggingface/tokenizers/issues/1873",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-05T08:02:47Z",
    "updated_at": "2025-10-08T17:41:28Z",
    "comments": 4,
    "user": "sambaPython24"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164662,
    "title": "Improper batch processing in torch.linalg.eig with cuda",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nWhen calculating large eigenvalues of non-symmetric matrices, I noticed that torch processes the matrices one by one, with only one core getting loaded. The processing time of multiple matrices is more or less similar between a Python loop and a batched execution of linalg.eig. I think this could drastically improve the performance of eigenvalue calculations, basically in the order of magnitude of the available CPU cores.\n\nI think the issue comes from torch only using magma's geev implementation. This implementation seems to largely rely on magma's geev solver. This solver seems to be single-threaded for large parts of the execution. Py parallelizing the execution using multiple GPUs (with none of them seeing any load) or using the CPU as another device, speedups in the order of 2x for 2 simultaneous calls. Therefore, I think it would be beneficial to try and perform the eigenvalue decomposition of multiple matrices in parallel.\n\nPlease also see [discuss.pytorch.org](https://discuss.pytorch.org/t/torch-linalg-eig-parallelisation/223386/7) for the discussion on the matter and to see the code I have used in order to evaluate this.\n\n### Alternatives\n\nAlternatively, it might also be beneficial to implement cuSolvers' geev implementation cusolverDnXgeev. I am trying to evaluate its performance compared to magmas geev implementation, but I only have limited experience in C++.\n\n### Additional context\n\nI would love to contribute myself, but I have only used C++ in the context of Arduino and ESP32 Microcontrollers, so this would probably only make sense if someone with some more experience could share some advice on how to tackle this. \n\ncc @ptrblck @msaroufim @eqy @jerryzh168 @jianyuh @nikitaved @mruberry @walterddr @xwang233 @Lezcano",
    "url": "https://github.com/pytorch/pytorch/issues/164662",
    "state": "open",
    "labels": [
      "module: cuda",
      "triaged",
      "module: linear algebra"
    ],
    "created_at": "2025-10-04T16:38:37Z",
    "updated_at": "2025-10-07T21:39:03Z",
    "comments": 0,
    "user": "johannesz-codes"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41336,
    "title": "is there a bug in group_videos_by_shape for qwenvl video preprocessiong?",
    "body": "### System Info\n\nin src/transformers/video_utils.py,\ngroup_videos_by_shape\ngrouped_videos = {shape: torch.stack(videos, dim=0) for shape, videos in grouped_videos.items()}, where each video is of shape BTCHW. This will create a new dimension. \nHowever, in qwenvl video preprocess \n batch_size, grid_t, channel = patches.shape[:3]\nIt does not consider the additional dimension created in group_videos_by_shape\nI think we should use torch.cat, not torch.stack?\n@yonigozlan @molbap \n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nrunning video preprocessing with list of video inputs, each with different shape\n\n### Expected behavior\n\nrun without error",
    "url": "https://github.com/huggingface/transformers/issues/41336",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-10-03T22:26:26Z",
    "updated_at": "2025-10-03T22:44:43Z",
    "comments": 1,
    "user": "dichencd"
  },
  {
    "repo": "pytorch/ao",
    "number": 3120,
    "title": "Question: How to implement my quantization algorithm?",
    "body": "The docs mention that one could ask here for help if unsure how to implement a new quantization algorithm with `torchao`, so I'll use that chance.\n\nFirst, in general, the current situation around pytorch quantization seems a bit unclear to me. As far as I understand:\n- there used to be two quantization APIs: \"Eager\" and \"FX Graph Mode\"\n- now there is a third API: \"PT2E\"\n- the quantization implementation moved from `torch` to `ao` package\n- all of this is still in experimental phase\n\nBut the docs still seem very unpolished (broken links, missing explanations), so I'm confused about the current state of this. In particular, let's say I have a new quantization algorithm (say similar to GPTQ), and I want to make experiments to evaluate it on large models like Llama4, gpt-oss, etc. Could I already use PT2E for that or is it still too unstable? Would I rather use GPTQModel perhaps? Or something else?\n\nAnd then, my question is how I would implement it, because I'm not sure if `torchao` supports the correct \"flow\". Let me explain the necessary flow based on a concrete example. Let's say we have a neural network with the following layers:\n- `Linear(28*28, 512)`\n- `ReLU`\n- `Linear(512, 128)`\n- `ReLU`\n- `Linear(128, 10)`\n\nNow I want to turn the linear layers (which use `float32`) into quantized linear layers whose scalars are 4-bit or so. My algorithm needs calibration data. Let's call the calibration data (i.e. sample inputs) `X`. Now the flow for quantization would look like this:\n1. **Quantize `Linear(28*28, 512)` into `QuantizedLinear(28*28,512)`**.\n   This needs the calibration data `X`. (as well as the original `float32` weights of linear layer of course)\n2. **Quantize `Linear(512, 128)` into `QuantizedLinear(512,128)`**.\n    Here comes the crux. Because I sort-of need two kinds of calibration data. First, I need the result of passing X through `Linear(28*28, 512)` and `ReLU`. (I guess that's already possible?!) But second, I also need the result of passing X through `QuantizedLinear(28*28,512)` and `ReLU`, i.e., the result of passing X through the already-quantized network.\n\n   The idea is that in the quantization of second layer one can \"correct\" some inaccuracies that the quantization of the first layer caused. For this one needs to know the difference of the calibration data passed through the original first layer versus passed through the quantized first layer.\n3. **Quantize `Linear(128, 10)` into `QuantizedLinear(128,10)`**.\n    Again, I need both of the following:\n    - X passed through the first 4 original units\n    - X passed through the first 4 quantized units\n\nIs it possible to implement that with pytorch quantization, either with the new PT2E API or with one of the older APIs?\n\nThank you very much in advance!",
    "url": "https://github.com/pytorch/ao/issues/3120",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-03T19:18:39Z",
    "updated_at": "2025-10-04T19:56:39Z",
    "user": "jbirnick"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2111,
    "title": "frame deletion",
    "body": "Great work on this project! I have a quick question - does LeRobotDataset support frame deletion? For example, in the DROID_lerobot dataset, the first few frames have an action value of 0 and I need to remove them.\nI'd appreciate any insights you can provide. Thank you for your time and help!",
    "url": "https://github.com/huggingface/lerobot/issues/2111",
    "state": "closed",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-10-03T13:05:12Z",
    "updated_at": "2025-10-10T12:17:53Z",
    "user": "Yysrc"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164559,
    "title": "fwd_rng_state show up in the aot_export_joint grpah input",
    "body": "See https://github.com/pytorch/torchtitan/pull/1794\n\nP1975157784: rank0_autograd_function_0fea2786.py\n\nSetting `torch._functorch.config.graphsafe_rng_functionalization = False` doesn't work. \n\nHow to avoid `fwd_rng_state` from showing up?\n\ncc @chauhang @penguinwu @zou3519 @bdhirsh",
    "url": "https://github.com/pytorch/pytorch/issues/164559",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: aotdispatch",
      "module: pt2-dispatcher"
    ],
    "created_at": "2025-10-03T07:28:10Z",
    "updated_at": "2025-10-06T19:10:58Z",
    "comments": 1,
    "user": "SherlockNoMad"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164536,
    "title": "Very confused about conda-forge",
    "body": "### \ud83d\udc1b Describe the bug\n\nIs this the cpu or gpu version? https://anaconda.org/conda-forge/pytorch\nWhat is this? https://anaconda.org/pytorch/pytorch-cuda\nHow should it be used? Is conda no longer a good way to install?\n\n### Versions\n\nIs this the cpu or gpu version? https://anaconda.org/conda-forge/pytorch\nWhat is this? https://anaconda.org/pytorch/pytorch-cuda\nHow should it be used? Is conda no longer a good way to install?",
    "url": "https://github.com/pytorch/pytorch/issues/164536",
    "state": "closed",
    "labels": [],
    "created_at": "2025-10-03T01:25:26Z",
    "updated_at": "2025-10-03T05:26:01Z",
    "comments": 1,
    "user": "7735986"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164529,
    "title": "[RFC] Implement shrink_group API to expose ncclCommShrink",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\n### PyTorch Process Group Shrink API \n\nAuthors: @brchang24 @spotluri @bosilca \n\n#### Summary\n\nThis document outlines proposed API changes to improve fault tolerance and flexibility in PyTorch Process Groups.  \n\n#### Motivation\n\n**Fault Tolerance support**\n\nThe API is designed to enhance fault tolerance capabilities in PyTorch by enabling exclusion of faulty ranks. \n\nWith the new API, malfunctioning participants should be excluded to avoid hangings, as their reliability can't be guaranteed. This API is not limited to hard faults (where processes disappear due to hardware failures) but allows the application to mold the execution environment as needed (for correctness or performance reasons). \n\n**Performance**\n\nThe existing abort \\+ init method entails a fixed cost for full initialization, as illustrated in the chart below with rank shrink as an example.\n\n![Image](https://github.com/user-attachments/assets/eb264cbf-48a5-4117-8e60-0a179a45d75f)\n\n  \nWe also explored alternatives like split, but that approach requires the participation of all ranks, including malfunctioning ones, to form a new group.  \n\nSo, both above factors must be considered when designing the API. \n\n#### Proposed API changes \n\nTo address these concerns above, we are proposing the following API changes: \n\nNew API: shrink\\_group() \n\n```python\nshrink_group(ranks_to_exclude: List[int],\n            Pg: Optional[ProcessGroup] = None,\n            shrink_flags : int = NCCL_SHRINK_DEFAULT)\n\nShrink an existing distributed group. Only group members of the updated ProcessGroup need to enter this function. The excluded ranks do not need to call this function. The scope of this call is therefore collective across the processes that belong to the shrunk distributed group.\n\nArgs:\nranks_exclude (list[int]):  List of group ranks to be excluded in the updated ProcessGroup. This list must be consistent across all participating processes.\npg (ProcessGroup, optional): The process group to work on, If None, the default process group will be used.\nshrink_flags (int): NCCL_SHRINK_DEFAULT (default)\n                    NCCL_SHRINK_ABORT (attempt to terminate ongoing operations in the parent communicator before shrinking. \n```\n\n#### Implementation \n\nPyTorch should directly use the shrink functionality if supported by the backend. \n\n**Use Cases** \n\nRank Shrink \n\nWhen one rank is detected defective and needs to be excluded, the new shrink\\_group() can be invoked as the below example: \n\nExample \n\nremove rank 2   \n**shrink\\_group**(\\[2\\], pg)   \n\n<img width=\"729\" height=\"432\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/fa84fbab-abcc-4099-98c3-a9f2e1389f40\" />\n\nIn the example above, only the original rank 0, 1, and 3 need to invoke shrink\\_group(), not rank 2 to avoid potential hang. After the shrink, the original rank 2 is excluded, so, the original rank 3 will be shifted down to become rank 2 in the updated group, if no parameter key is passed in. \n\nErrors could be reported by the backend or PyTorch. However, it is up to the upper layer to decide whether to exclude a rank from the group. \n\nIdeally, the defective ranks should be excluded from all associated groups. However, it appears to be enforcing a policy on PyTorch. This design suggests delegating the decision to exclude ranks from a group or completely dissolve the group to the Upper Layer (UL). Meanwhile, PyTorch should verify that no subgroups use the rank before it is removed from the default group. \n\n**Things to Consider** \n\n**Group Rank recalculation** \n\nShrink can lead to changes in the group's rank order. It will apply the default method to recalculate group ranks as detailed below.  \n\nWhen shrinking, ranks will be shifted to close any gaps left by excluded ranks. \n\n**Metrics**\n\nWhat are the main metrics to measure the value of this feature? \n\n1. When one node/rank goes down completely   \n   To compare with the existing solution. \n\n \n\n2. Performance comparison with the existing solutions   \n1. Shrink \n\n**Drawbacks**\n\nAre there any reasons why we should not do this? Here we aim to evaluate risk and check ourselves.   \nPlease consider: \n\n* Is it a breaking change?   \n  This change should be backward compatible.   \n* Impact on UX   \n  No   \n* implementation cost, both in terms of code size and complexity   \n  The assumption is that the pytorch cost should not be high, but the backend support cost might be high, especially for backends that do not have already support for fault management.   \n* integration of this feature with other existing and planned features   \n  PyTorch layer needs to integrate with the backend when it has the support. \n\n**Alternatives**\n\nWhat other designs have been considered? What is the impact of not doing this?   \n   \nCan be implemented using abort+init method.   \nNeed full init method which potentially requires broadcast for the NCCL bootstrap. \n\n**Prior Art**\n\nDiscuss prior art (both good and bad) in relation to this proposal: \n\n",
    "url": "https://github.com/pytorch/pytorch/issues/164529",
    "state": "closed",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2025-10-03T00:26:11Z",
    "updated_at": "2025-10-17T17:55:06Z",
    "comments": 0,
    "user": "brchang24"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2108,
    "title": "HIL-SERL Transform order for (tanh \u2192 rescale) is reversed",
    "body": "In `TanhMultivariateNormalDiag`:\n\n```\ntransforms = [TanhTransform(cache_size=1)]\nif low is not None and high is not None:\n    transforms.insert(0, RescaleFromTanh(low, high))  # puts Rescale *before* tanh\n\n```\n\nthis applies RescaleFromTanh then Tanh, which is backwards. should we change it to tanh first, then rescale?\n\nFix\n\n```\ntransforms = [TanhTransform(cache_size=1)]\nif low is not None and high is not None:\n    transforms.append(RescaleFromTanh(low, high))  # tanh \u2192 rescale\n```\n\nAlso, when I tried to assign value for low, high. I got error:\n\n```\ntorch/distributions/transforms.py\", line 303, in domain\n    domain = self.parts[0].domain\nAttributeError: 'RescaleFromTanh' object has no attribute 'domain'\n```\n\nMight be fixed by adding the following to `class RescaleFromTanh(Transform)`\n\n```\n# Required attributes for PyTorch Transform\nself.domain = constraints.interval(-1.0, 1.0)\nself.codomain = constraints.interval(low, high)\nself.bijective = True\n```",
    "url": "https://github.com/huggingface/lerobot/issues/2108",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-10-02T21:44:22Z",
    "updated_at": "2025-10-07T20:36:31Z",
    "user": "priest-yang"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1790,
    "title": "Distributed training hangs on local error instead of exit",
    "body": "In our model, we have the following code\n```python\nif x.shape[2:] != y.shape[2:]:\n    print(f\"RANK {torch.distributed.get_rank()}: SPATIAL DIM MISMATCH!\")\n    raise ValueError(f\"x.shape[2:] != y.shape[2:], {x.shape[2:]=}, {y.shape[2:]=}\")\n\nx = torch.cat([x, y], dim=1)\n```\nHowever, if one rank get mismatch error, it can reach the print point, but not the raise error point, the program hangs forever. \n\nHow to debug this and what's the potential reason? Thanks.",
    "url": "https://github.com/pytorch/torchtitan/issues/1790",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-10-02T21:18:54Z",
    "updated_at": "2025-10-03T02:49:24Z",
    "user": "yzhao30"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2107,
    "title": "Low Success Rate When Training SmolVLA-0.24B on LIBERO",
    "body": "Hi folks, I'm trying to replicate the 0.24B SmolVLA model on the LIBERO dataset. Intuitively, I just changed the base model `vlm_model_name: str = \"HuggingFaceTB/SmolVLM2-256M-Video-Instruct\"`. Here is the command I used to train. \n\n`lerobot-train --policy.type=smolvla --policy.load_vlm_weights=true --dataset.repo_id=HuggingFaceVLA/libero --env.type=libero --env.task=libero_10 --output_dir=./outputs/ --steps=100000 --batch_size=64 --eval.batch_size=1 --eval.n_episodes=1 --eval_freq=1000 --wandb.enable=true`\n\nI trained on a single RTX4090. However, I found that the success rate on the eval set is quite low. The success rate was only 7.5%. Is there anything I did wrong? Attaching the training plots below. \n\n<img width=\"1116\" height=\"629\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9bbdcadb-e113-4d9f-b315-4f37b57bde37\" />\n\n<img width=\"1116\" height=\"310\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/23951a72-a374-4eda-9368-363367e4c746\" />",
    "url": "https://github.com/huggingface/lerobot/issues/2107",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "simulation"
    ],
    "created_at": "2025-10-02T19:11:55Z",
    "updated_at": "2025-12-20T09:30:58Z",
    "user": "zimgong"
  },
  {
    "repo": "huggingface/optimum-onnx",
    "number": 66,
    "title": "How to export a stateless whisper model via optimum-cli?",
    "body": "I observe that when exporting a Whisper model via Python API, the resulting model is stateless, i.e. the decoder is split into two models.\n```python\nimport os\nfrom optimum.onnxruntime import ORTModelForSpeechSeq2Seq\nORTModelForSpeechSeq2Seq.from_pretrained(\"openai/whisper-tiny\", export=True).save_pretrained(\"./whisper/python\")\nprint(os.listdir(\"./whisper/python\"))\n# ['encoder_model.onnx', 'decoder_with_past_model.onnx', 'decoder_model.onnx', 'config.json', 'generation_config.json']\n```\n\nWhen I export this model via CLI, the decoder model is exported as stateful even if I provide the `--no-post-process` argument.\n```bash\noptimum-cli export onnx --task automatic-speech-recognition -m openai/whisper-tiny --no-post-process ./whisper/cli\nls ./whisper/cli\n\n# added_tokens.json  decoder_model.onnx  generation_config.json  normalizer.json           special_tokens_map.json  tokenizer.json\n# config.json        encoder_model.onnx  merges.txt              preprocessor_config.json  tokenizer_config.json    vocab.json\n```\n\nMy environment:\n```\ncertifi==2025.8.3\ncharset-normalizer==3.4.3\ncoloredlogs==15.0.1\nfilelock==3.19.1\nflatbuffers==25.9.23\nfsspec==2025.9.0\nhf-xet==1.1.10\nhuggingface-hub==0.35.3\nhumanfriendly==10.0\nidna==3.10\nJinja2==3.1.6\nMarkupSafe==3.0.3\nml_dtypes==0.5.3\nmpmath==1.3.0\nnetworkx==3.4.2\nnumpy==2.2.6\nnvidia-cublas-cu12==12.8.4.1\nnvidia-cuda-cupti-cu12==12.8.90\nnvidia-cuda-nvrtc-cu12==12.8.93\nnvidia-cuda-runtime-cu12==12.8.90\nnvidia-cudnn-cu12==9.10.2.21\nnvidia-cufft-cu12==11.3.3.83\nnvidia-cufile-cu12==1.13.1.3\nnvidia-curand-cu12==10.3.9.90\nnvidia-cusolver-cu12==11.7.3.90\nnvidia-cusparse-cu12==12.5.8.93\nnvidia-cusparselt-cu12==0.7.1\nnvidia-nccl-cu12==2.27.3\nnvidia-nvjitlink-cu12==12.8.93\nnvidia-nvtx-cu12==12.8.90\nonnx==1.19.0\nonnxruntime==1.23.0\noptimum @ git+https://github.com/huggingface/optimum@a813c95ac088c401547fe15e7a68ac5c6f00f9a7\noptimum-onnx @ git+https://github.com/huggingface/optimum-onnx.git@671b84f78a244594dd21cb1a8a1f7abb8961ea60\npackaging==25.0\nprotobuf==6.32.1\nPyYAML==6.0.3\nregex==2025.9.18\nrequests==2.32.5\nsafetensors==0.6.2\nsympy==1.14.0\ntokenizers==0.21.4\ntorch==2.8.0\ntqdm==4.67.1\ntransformers==4.55.4\ntriton==3.4.0\ntyping_extensions==4.15.0\nurllib3==2.5.0\n\n```\n\nHow to export this model as stateless via optimum-cli? Also, how to export this model as stateful via Python API?\n\nThanks!",
    "url": "https://github.com/huggingface/optimum-onnx/issues/66",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-10-02T09:50:03Z",
    "updated_at": "2025-10-13T05:33:25Z",
    "user": "nikita-savelyevv"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2104,
    "title": "Select the VLM backbone for SmolVLA",
    "body": "Hi may I ask about the vlm_model_name, is there any model more powerful than HuggingFaceTB/SmolVLM2-500M-Video-Instruct which can be used to train SmolVLA for Lerobot SO101?",
    "url": "https://github.com/huggingface/lerobot/issues/2104",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "good first issue"
    ],
    "created_at": "2025-10-02T07:35:29Z",
    "updated_at": "2025-10-11T16:53:59Z",
    "user": "Llkhhb"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1781,
    "title": "How to add supervised finetuning mask in torchtitan?",
    "body": "How do I implement supervised fine-tuning (SFT) masking in TorchTitan for posttraining using a synthetic dataset?",
    "url": "https://github.com/pytorch/torchtitan/issues/1781",
    "state": "open",
    "labels": [
      "post training"
    ],
    "created_at": "2025-10-01T23:36:12Z",
    "updated_at": "2025-12-12T19:37:12Z",
    "user": "kailashg26"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164360,
    "title": "Would maintainers be open to a contribution that adds lightweight progress bar support (based on tqdm) in torch.utils?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nFeature request:\nAdd a lightweight progress bar utility (based on tqdm) in torch.utils that users can optionally import to visualize training/validation/test loop progress.\n\nMotivation:\nPyTorch core currently does not provide any built-in progress tracking for long-running loops. While users can integrate tqdm manually, it requires repetitive boilerplate in tutorials and quick scripts. A small utility in torch.utils would lower the barrier for beginners and improve user experience without adding significant complexity to the core library.\n\nPitch:\nThe utility would remain optional, minimal, and import tqdm only if used. This way, PyTorch maintains its philosophy of flexibility while offering a small but meaningful quality-of-life improvement for users.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/164360",
    "state": "closed",
    "labels": [
      "triaged",
      "enhancement"
    ],
    "created_at": "2025-10-01T15:22:57Z",
    "updated_at": "2025-10-06T17:16:15Z",
    "comments": 2,
    "user": "wtfPrethiv"
  },
  {
    "repo": "pytorch/xla",
    "number": 9662,
    "title": "XLA mul with bf16\u00d7bf16 upcasts to f32 \u2014 op math type and option to disable?",
    "body": "## \u2753 Questions and Help\n\nHi folks, I have a question about the XLA mul op.\n\nWhen both inputs are bf16, the generated graph converts to f32, performs the multiply, then converts back to bf16. Two questions:\n\nIn this case, is the op math type effectively f32 (not bf16)?\n\nIf this upcast exists primarily for TPU accuracy/stability, would it be acceptable to gate it behind a flag (e.g., env option) so we can treat that path as a no-op and keep the op in native bf16 when desired?\n\nReference code path:\nhttps://github.com/pytorch/xla/blob/master/torch_xla/csrc/aten_xla_type.cpp#L187-L211\n\nIf there\u2019s a better approach please let me know. Thanks!",
    "url": "https://github.com/pytorch/xla/issues/9662",
    "state": "closed",
    "labels": [
      "enhancement",
      "tracing"
    ],
    "created_at": "2025-10-01T14:12:53Z",
    "updated_at": "2025-10-03T18:22:12Z",
    "comments": 3,
    "user": "sshonTT"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12415,
    "title": "SVG 2 kernels",
    "body": "Can we support new sparse kernels in (Neurips 2025)\nhttps://svg-project.github.io/v2/",
    "url": "https://github.com/huggingface/diffusers/issues/12415",
    "state": "open",
    "labels": [],
    "created_at": "2025-10-01T10:52:50Z",
    "updated_at": "2025-10-01T10:52:50Z",
    "comments": 0,
    "user": "bhack"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164342,
    "title": "Official support for sm_120 (RTX 50-series / Blackwell) in stable PyTorch builds",
    "body": "### \ud83d\udc1b Describe the bug\n\nHello PyTorch team,  \n\nI would like to kindly request official support for sm_120 (RTX 50-series / Blackwell GPUs, e.g. RTX 5070 Ti) in the stable PyTorch builds.  \n\nCurrent situation:  \n- CUDA 12.8/12.9 already includes support for Blackwell architectures.  \n- PyTorch nightly builds (e.g., 2.10.0.dev + cu12.9) can detect sm_120, but they are not yet fully stable.  \n- In my case, I tested the nightly build on Windows 11 with an RTX 5070 Ti. PyTorch itself launches, but DeepLabCut (DLC GUI, which relies heavily on PyTorch) still fails to start properly.  \n- Interestingly, Annolid GUI works fine on the same PC with RTX 5070 Ti. This suggests the underlying CUDA/NVIDIA support is there, but stable PyTorch integration is still missing.  \n\nProblem:  \n- DLC (and many other research tools) depend strictly on stable PyTorch releases. Without official sm_120 support in the stable channel, we cannot run these applications on RTX 50-series GPUs.  \n- As a researcher, I purchased RTX 5070 Ti for deep learning workloads, but currently it cannot be used productively with DLC due to this gap.  \n\nRequest:  \n- Please prioritize adding official sm_120 support into stable PyTorch builds.  \n- Even partial support in an upcoming stable release (e.g., wheels with cu12.9) would greatly help researchers and developers adopt RTX 50-series hardware.  \n- At minimum, could you provide an ETA or roadmap for when sm_120 will be supported in stable builds?  \n\nThank you very much for your efforts and for maintaining this essential framework.  \n\nBest regards,  \n\n### Versions\n\nRTX 5070 Ti requires CUDA 12.0+ for full support.\nMultiple rebuilds of environments tested.\nPyTorch, NumPy, and OpenCV work independently.\nFailures appear specific to DLC\u2019s internal module loading mechanism.\n\ncc @seemethere @malfet @atalman @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex @ptrblck @msaroufim @eqy @jerryzh168",
    "url": "https://github.com/pytorch/pytorch/issues/164342",
    "state": "open",
    "labels": [
      "needs reproduction",
      "module: windows",
      "module: cuda",
      "triaged"
    ],
    "created_at": "2025-10-01T07:21:36Z",
    "updated_at": "2025-11-13T00:29:02Z",
    "comments": 14,
    "user": "endvntgf-design"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2096,
    "title": "How can I change the task name of already recorded episodes?",
    "body": "I recorded the dataset using:\n\n--dataset.single_task=\"slice the clay until it becomes 4 pieces\"\n\n\nNow I want to update those recorded episodes to a different task name. How can I do that?",
    "url": "https://github.com/huggingface/lerobot/issues/2096",
    "state": "open",
    "labels": [
      "question",
      "dataset",
      "good first issue"
    ],
    "created_at": "2025-10-01T02:15:49Z",
    "updated_at": "2025-10-30T03:48:47Z",
    "user": "pparkgyuhyeon"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41235,
    "title": "i want to request a demo code for StatefulDataLoader , i want to use data checkpoint to recover the train stage`s data state, not only model state , how to use ,StatefulDataLoader or some code to reach it ?",
    "body": "i want to request a demo code for StatefulDataLoader , i want to use data checkpoint to recover the train stage`s data state, not only model state , how to use ,StatefulDataLoader or some code to reach it ?\n\nrecover data state ,not only model state , i wish i said my request clearly .\nhow to use accelerate + transformers trainer to train model ,when training is broken ,it can recover from data checkpoint and model checkpoint ? thanks\n\ni wish you understand what i said",
    "url": "https://github.com/huggingface/transformers/issues/41235",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-09-30T17:07:07Z",
    "updated_at": "2025-11-08T08:04:40Z",
    "user": "ldh127"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3802,
    "title": "i want to request a demo code for StatefulDataLoader , i want to use data checkpoint to recover the train stage`s data state, not only model state , how to use ,StatefulDataLoader  or some code to reach it ?",
    "body": "i want to request a demo code for StatefulDataLoader , i want to use data checkpoint to recover the train stage`s data state, not only model state , how to use ,StatefulDataLoader  or some code to reach it ? \n\nrecover data state ,not only model state , i wish i said my request clearly .\nhow to use accelerate + transformers trainer to train model ,when training is broken ,it can recover from data checkpoint and model checkpoint ?  thanks\n\ni wish  you understand what i said \n",
    "url": "https://github.com/huggingface/accelerate/issues/3802",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-30T15:58:32Z",
    "updated_at": "2025-11-09T15:06:58Z",
    "user": "ldh127"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164247,
    "title": "Dynamo graph break on flex attention code",
    "body": "### \ud83d\udc1b Describe the bug\n\n```python\nimport torch\nimport torch.nn as nn\nfrom torch.nn.attention.flex_attention import create_block_mask, flex_attention\n\n\nclass MixedFakeModeModel(nn.Module):\n    def __init__(self, dim=64):\n        super().__init__()\n        self.dim = dim\n        self.lin = torch.nn.Linear(64, 64)\n\n    def forward(self, x):\n        batch_size, seq_len, _ = x.shape\n\n        # Process input first - this creates fake tensors in export's fake mode\n        processed = self.lin(x)\n\n        # Create some computation that depends on processed tensor\n        intermediate = processed.sum(dim=-1).detach()  # Shape: (batch, seq_len)\n\n        def dynamic_mask_function(batch_idx, head_idx, q_idx, kv_idx):\n            threshold = intermediate[\n                batch_idx, q_idx % seq_len\n            ]  # Access the captured tensor\n            return (kv_idx <= q_idx) & (threshold > 0)\n\n        block_mask = create_block_mask(\n            mask_mod=dynamic_mask_function,\n            B=batch_size,\n            H=None,\n            Q_LEN=seq_len,\n            KV_LEN=seq_len,\n            device=x.device,\n            _compile=False,  # HF sets this to True, which runs into the issue i am talking below\n        )\n        q = processed.view(batch_size, 1, seq_len, self.dim)\n        k = processed.view(batch_size, 1, seq_len, self.dim)\n        v = processed.view(batch_size, 1, seq_len, self.dim)\n\n        # this doesn't work\n        out = torch.compile(flex_attention)(q, k, v, block_mask=block_mask)\n        # this works (flex attention internally calls torch.compile(backend=eager) which\n        # has special handling similar to torch.cond\n        out = flex_attention(q, k, v, block_mask=block_mask)\n\n        return out\n\ntorch.compile(MixedFakeModeModel(), fullgraph=True)(torch.randn(2, 128, 64))\n```\n\nWhen we are tracing through create_block_mask, dynamo graph breaks with:\n```\nUnsupported: id() with unsupported args\n  Explanation: Dynamo doesn't know how to trace id() call with args (NestedUserFunctionVariable(),)\n  Hint: Supported args are Tensors, and functions/nn.Modules/user-defined objects from outside the compiled region.\n  Hint: It may be possible to write Dynamo tracing rules for this code. Please report an issue to PyTorch if you encounter this graph break often and it is causing performance issues.\n\n  Developer debug context: (NestedUserFunctionVariable(),)\n\n For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0191.html\n\nfrom user code:\n   File \"/tmp/ipykernel_2970620/3759915601.py\", line 27, in forward\n    block_mask = create_block_mask(\n  File \"/data/users/tmanlaibaatar/.bento/kernels/bento_kernel_pytorch/2670/bento_kernel_pytorch_binary-inplace#link-tree/torch/nn/attention/flex_attention.py\", line 1067, in create_block_mask\n    mod_type = _get_mod_type(mask_mod)\n  File \"/data/users/tmanlaibaatar/.bento/kernels/bento_kernel_pytorch/2670/bento_kernel_pytorch_binary-inplace#link-tree/torch/nn/attention/flex_attention.py\", line 244, in _get_mod_type\n    for param in inspect.signature(fn).parameters.values()\n  File \"/data/users/tmanlaibaatar/.bento/kernels/bento_kernel_pytorch/2670/bento_kernel_pytorch_binary-inplace#link-tree/runtime/lib/python3.12/inspect.py\", line 3348, in signature\n    return Signature.from_callable(obj, follow_wrapped=follow_wrapped,\n  File \"/data/users/tmanlaibaatar/.bento/kernels/bento_kernel_pytorch/2670/bento_kernel_pytorch_binary-inplace#link-tree/runtime/lib/python3.12/inspect.py\", line 3085, in from_callable\n    return _signature_from_callable(obj, sigcls=cls,\n  File \"/data/users/tmanlaibaatar/.bento/kernels/bento_kernel_pytorch/2670/bento_kernel_pytorch_binary-inplace#link-tree/runtime/lib/python3.12/inspect.py\", line 2538, in _signature_from_callable\n    obj = unwrap(obj, stop=(lambda f: hasattr(f, \"__signature__\")\n  File \"/data/users/tmanlaibaatar/.bento/kernels/bento_kernel_pytorch/2670/bento_kernel_pytorch_binary-inplace#link-tree/runtime/lib/python3.12/inspect.py\", line 773, in unwrap\n    memo = {id(f): f}\n\nSet TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS=\"+dynamo\"\n```\n\n### Versions\n\nmain\n\ncc @ezyang @gchanan @zou3519 @kadeng @msaroufim @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @amjames @Lucaskabela @ydwu4 @bdhirsh @Chillee @drisspg @yanboliang @BoyuanFeng",
    "url": "https://github.com/pytorch/pytorch/issues/164247",
    "state": "closed",
    "labels": [
      "high priority",
      "triaged",
      "oncall: pt2",
      "module: dynamo",
      "module: graph breaks",
      "module: higher order operators",
      "module: pt2-dispatcher",
      "module: flex attention"
    ],
    "created_at": "2025-09-30T15:16:18Z",
    "updated_at": "2025-10-17T17:44:48Z",
    "comments": 7,
    "user": "tugsbayasgalan"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1773,
    "title": "Unreachable code in `CheckpointManager`",
    "body": "Hi! I've noticed that `def maybe_wait_for_staging` basically never does anything as `self.staging` is set to `False` in `__init__` and never modified. Is there something wrong or is this code never supposed to run?\n\nhttps://github.com/pytorch/torchtitan/blob/a3104201ba3a0fa19e9c3cc5ba748b0398551410/torchtitan/components/checkpoint.py#L616",
    "url": "https://github.com/pytorch/torchtitan/issues/1773",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-30T13:59:22Z",
    "updated_at": "2025-10-02T16:43:43Z",
    "comments": 3,
    "user": "antony-frolov"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41211,
    "title": "Add DEIMv2",
    "body": "### Model description\n\nIt would be nice to integrate DEIMv2, a new state-of-the-art model for real-time object detection based on DINOv3. The weights are released under Apache 2.0.\n\nRelated thread: https://github.com/Intellindust-AI-Lab/DEIMv2/issues/20\n\n### Open source status\n\n- [x] The model implementation is available\n- [x] The model weights are available\n\n### Provide useful links for the implementation\n\nCode: https://github.com/Intellindust-AI-Lab/DEIMv2\nWeights (on Google Drive for now): https://github.com/Intellindust-AI-Lab/DEIMv2?tab=readme-ov-file#1-model-zoo\n\nIdeally, the [AutoBackbone API](https://huggingface.co/docs/transformers/main_classes/backbones) can be leveraged to not having to re-implement the entire DINOv3 backbone in `modular_deimv2.py` and `modeling_deimv2.py`. See an example of how this is leveraged for DETR [here](https://github.com/huggingface/transformers/blob/59035fd0e1876f9e526488b61fe43ff8829059f6/src/transformers/models/detr/modeling_detr.py#L280).",
    "url": "https://github.com/huggingface/transformers/issues/41211",
    "state": "open",
    "labels": [
      "New model"
    ],
    "created_at": "2025-09-30T09:43:07Z",
    "updated_at": "2025-10-04T18:44:06Z",
    "comments": 4,
    "user": "NielsRogge"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1771,
    "title": "Posttraining Library",
    "body": "# Posttraining Library Support\n\n## Summary\nI understand that torchtune is being phased out and the team announced in July 2025 that they are developing a new product in a new repo for end-to-end post-training with scale. It's now been several months since that announcement. Could you share an update on when this new library will be released?\n\n## Motivation\nIn [[Issue #2883](https://github.com/pytorch/torchtune/issues/2883)](https://github.com/pytorch/torchtune/issues/2883), the torchtune team announced plans to develop a new product focused on end-to-end post-training with scale. That announcement was made several months ago in July 2025, and torchtune is now in maintenance mode (receiving only critical bug fixes and security patches during 2025).\n\n## Questions\n- **When will the new post-training library be released?** It's been several months since the July announcement, can you share a timeline or expected release date?\n- **Will the new library be part of torchtitan or a separate repository?** The announcement mentioned a \"new repo,\" but given torchtitan's focus on production-grade training, would it make sense to integrate?\n- **What's the relationship between the new library and torchtitan?** Will they share infrastructure, or are they separate projects?\n- **Which post-training techniques will be prioritized?** (eg SFT, RLHF/DPO, continued pretraining)\n- **Is there a beta or early access program?** Many in the community are eager to start testing and contributing.\n\n## Why I'm asking here (instead of torchtune)\nI'm posting this question in the torchtitan repo rather than torchtune because:\n\n1. **Architectural excellence**: The torchtitan team has demonstrated exceptional work in building a production-grade, PyTorch-native training system with modular composability and scale as a first-class citizen, exactly the qualities mentioned in the torchtune transition announcement.\n\n2. **Natural evolution**: Given that torchtitan already handles pretraining at scale with features like 3D parallelism, distributed checkpointing, and native PyTorch integration, it seems like a natural foundation or model for a post-training library with similar scale requirements.\n\n3. **Team expertise**: The torchtitan team's deep expertise in distributed training, parallelism techniques, and PyTorch internals makes them well-positioned to build or be involved with the successor to torchtune.\n\n4. **Unified vision**: Both the torchtitan philosophy and the announced new post-training library share similar goals: hackable code, minimal abstraction, scale-first design, and native PyTorch.\n\n\n## Additional Context\nWith torchtune entering maintenance mode and no longer accepting new features, many practitioners are in a transitional period waiting for the new post-training solution. Understanding the timeline and scope of the new library would help the community plan their training workflows accordingly.\n\nThank you for your excellent work on torchtitan and the broader PyTorch training ecosystem, we're excited to see what's coming!",
    "url": "https://github.com/pytorch/torchtitan/issues/1771",
    "state": "open",
    "labels": [
      "post training"
    ],
    "created_at": "2025-09-30T09:42:49Z",
    "updated_at": "2025-10-24T07:58:26Z",
    "comments": 2,
    "user": "MarkLiLabs"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41208,
    "title": "Integrate mamba SSM kernels from the hub",
    "body": "### Feature request\n\nCurrently, mamba kernels are imported via the main source package ex, for [GraniteMoeHybrid](https://github.com/huggingface/transformers/blob/main/src/transformers/models/granitemoehybrid/modeling_granitemoehybrid.py#L44-L46)\n\nCan we migrate this to use the kernels-hub (`kernels-community/mamba-ssm`) variation instead?\n\n### Motivation\n\nRemoves the external dependency. Kernel hub is also integrated at several other places throughout the library.\n\n### Your contribution\n\nI can submit a PR for migrating from the PyPi `mamba_ssm` package to the `kernels` package for mamba ops.",
    "url": "https://github.com/huggingface/transformers/issues/41208",
    "state": "closed",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-09-30T07:50:52Z",
    "updated_at": "2025-12-18T10:17:06Z",
    "comments": 15,
    "user": "romitjain"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1870,
    "title": "How can I convert a trained tokenizer into `transformers` format",
    "body": "Hi guys,\n\nI have trained a tokenizer which works pretty well and it is stored in a single `.json` file. Is there any method / API to convert it into a `transformers` toeknizer format?\n\nIf there's no such implementation I am happy to contribute.",
    "url": "https://github.com/huggingface/tokenizers/issues/1870",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-30T06:09:52Z",
    "updated_at": "2025-09-30T13:53:53Z",
    "comments": 1,
    "user": "dibbla"
  },
  {
    "repo": "huggingface/lighteval",
    "number": 999,
    "title": "How to print all pass@k scores when generating 16 samples?",
    "body": "Hi,\n\nI want to print all results of pass@k metrics when generating 16 samples. (e.g., k=1, 2, 4, 8, 16)\n\n```python\n\nmath_500_pass_k_at_16 = LightevalTaskConfig(\n    name=\"math_500_pass_k_at_16\",\n    suite=[\"custom\"],\n    prompt_function=math_500_prompt_fn,\n    hf_repo=\"HuggingFaceH4/MATH-500\",\n    hf_subset=\"default\",\n    hf_avail_splits=[\"test\"],\n    evaluation_splits=[\"test\"],\n    few_shots_split=None,\n    few_shots_select=None,\n    generation_size=32768,\n    metrics=[\n        Metrics.pass_at_k_math(sample_params={\"k\": 1, \"n\": 16}),\n        Metrics.pass_at_k_math(sample_params={\"k\": 2, \"n\": 16}),\n        Metrics.pass_at_k_math(sample_params={\"k\": 4, \"n\": 16}),\n        Metrics.pass_at_k_math(sample_params={\"k\": 8, \"n\": 16}),\n        Metrics.pass_at_k_math(sample_params={\"k\": 16, \"n\": 16}),\n    ],\n    version=2,\n```\n\nBut, I can't see full results that I want. Does anyone know how to resolve it?\n",
    "url": "https://github.com/huggingface/lighteval/issues/999",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-29T21:49:44Z",
    "updated_at": "2025-10-14T08:04:17Z",
    "user": "passing2961"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164145,
    "title": "Improvements to profiler for bitwise equivalence use case",
    "body": "### \ud83d\udc1b Describe the bug\n\nSuppose that you want to verify that eager and aot_eager are numerically equivalent. The profiler can be a good tool for determining why there is a small numerical difference, as one might reasonably expect to get exactly the same kernels between the two. However, the profiler has obviously not been setup to handle this situation.  Here are some obvious problems I ran into on the way:\n\n- [ ] No documentation for FunctionEvent at https://docs.pytorch.org/docs/stable/profiler.html . We need to postprocess events() in an unusual way, but because there are no docs it's difficult to tell what the format of events are. In particular, there's a hierarchical structure that we need to know about.\n- [ ] A convenient way to get all events in chronological order at a \"consistent\" level of abstraction, with no overlapping. For example, we might be interested specifically in what at:: kernel the dispatch dispatches to at the CPU/CUDA key. When looking at this, we do NOT want internal redispatches (e.g., an at::empty call to perform an allocation). Similarly, we might something equivalent to the top level first dispatcher invocation. Call it \"list_operators\"\n- [ ] There should be a convenient function for dumping a string trace at the highest level of abstraction, so you can quickly eyeball what code was run (in a similar niche to DebugMode, but \"better\" because it is guaranteed not to interfere with what exactly is executed in eager mode).\n\n### Versions\n\nmain\n\ncc @robieta @chaekit @guotuofeng @guyang3532 @dzhulgakov @davidberard98 @briancoutinho @sraikund16 @sanrise",
    "url": "https://github.com/pytorch/pytorch/issues/164145",
    "state": "open",
    "labels": [
      "oncall: profiler"
    ],
    "created_at": "2025-09-29T15:30:14Z",
    "updated_at": "2025-10-26T03:18:33Z",
    "comments": 2,
    "user": "ezyang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164133,
    "title": "Use libtorch export onnx",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHow to export onnx using libtorch after training a model with libtorch \uff1f \n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/164133",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-29T13:55:19Z",
    "updated_at": "2025-09-29T14:43:24Z",
    "comments": 1,
    "user": "yongxin3344520"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164124,
    "title": "torch.compile compiles multiple Triton autotune kernels, but uses the wrong ones",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhen torch.compile autotunes a Triton kernel multiple times for different shapes, it uses the wrong kernel afterwards. Interestingly, this only happens when no torchinductor-cache files exist. On next run of the same program, it uses the correct kernels!\n\nHere are the details:\n\nI have adapted your example under \"Advanced Usage\" here, which explains how to use autotune with torch.compile:\nhttps://docs.pytorch.org/tutorials/recipes/torch_compile_user_defined_triton_kernel_tutorial.html\n\nHere is the test case:\n\n[test.py](https://github.com/user-attachments/files/22595171/test.py)\n\nChanges:\n - I have added a time waster to the kernel, that clearly shows autotune which configuration is the inefficient one\n - made the shape of `x` a key for autotuning. The use case for this in reality is using large block sizes for large tensors\n - Call the kernel with different shapes and let it tune\n - Call it normally - it uses the wrong kernel\n\nIt appears that it *has* compiled 2 separate kernels for the 2 shapes, but it consistently uses the wrong one for *both* shapes, as if it intentionally tried to use the wrong one.\nBut only until you run the program a second time. When it reads the kernels from the torchinductor cache, it uses the correct kernels!\n\n\n### Error logs\n\n- Without torch.compile:\n\n```\nTRITON_PRINT_AUTOTUNING=1 TORCH_COMPILE_DISABLE=1 python test.py\n[...]\nbest config selected: BLOCK_SIZE: 2, num_warps: 4, num_ctas: 1, num_stages: 4, maxnreg: None;\n[...]\nbest config selected: BLOCK_SIZE: 4, num_warps: 8, num_ctas: 1, num_stages: 3, maxnreg: None;\n```\nBest config for both shapes is selected, no errors.\n\n\n\n- With torch.compile **the first time**: [make sure your torchinductor cache is deleted]\n\n```\nTORCH_COMPILE_DISABLE= python test.py\npid (2, 0, 0) idx () --- BADLY TUNED KERNEL ---: 2\n```\n\n- With torch.compile, ran **a second time**, with existing torchinductor cache:\n\n```\nTORCH_COMPILE_DISABLE= python test.py\n```\n\nNo errors. It uses the correct kernels.\n\n### Versions\n\n```\nPyTorch version: 2.8.0+cu128\nIs debug build: False\nCUDA used to build PyTorch: 12.8\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.3 LTS (x86_64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version: Could not collect\nCMake version: version 3.28.3\nLibc version: glibc-2.39\n\nPython version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-6.8.0-36-generic-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 4070 Ti SUPER\nNvidia driver version: 580.82.07\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        39 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               12\nOn-line CPU(s) list:                  0-11\nVendor ID:                            GenuineIntel\nModel name:                           12th Gen Intel(R) Core(TM) i5-12400F\nCPU family:                           6\nModel:                                151\nThread(s) per core:                   2\nCore(s) per socket:                   6\nSocket(s):                            1\nStepping:                             5\nCPU(s) scaling MHz:                   54%\nCPU max MHz:                          4400.0000\nCPU min MHz:                          800.0000\nBogoMIPS:                             4992.00\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize arch_lbr ibt flush_l1d arch_capabilities\nVirtualization:                       VT-x\nL1d cache:                            288 KiB (6 instances)\nL1i cache:                            192 KiB (6 instances)\nL2 cache:                             7.5 MiB (6 instances)\nL3 cache:                             18 MiB (1 instance)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-11\nVulnerability Gather data ",
    "url": "https://github.com/pytorch/pytorch/issues/164124",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamic shapes",
      "module: user triton"
    ],
    "created_at": "2025-09-29T10:19:35Z",
    "updated_at": "2025-09-29T16:50:17Z",
    "comments": 3,
    "user": "dxqb"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2083,
    "title": "How to train this RL model with my trained data",
    "body": "I want this model to load the trained model that I have already generated. So, I modified the output_dir and set resume to true, but then the problem shown in the figure occurred. How can I solve it?\n`{ \"output_dir\": \"outputs/train/2025-09-28/17-28-55_default\", \n\"job_name\": \"default\", \"resume\": true, \n\"seed\": 1000, \"num_workers\": 4, \n\"batch_size\": 256, \n\"steps\": 100000,`\n\nand the origin code is :\n`{ \"output_dir\": null, \n\"job_name\": \"default\", \"resume\": flase, \n\"seed\": 1000, \"num_workers\": 4, \n\"batch_size\": 256, \n\"steps\": 100000,\n`[\n\n<img width=\"1515\" height=\"717\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/5f46acd3-9a72-41a5-8506-742f5c479c53\" />\n\n](url)",
    "url": "https://github.com/huggingface/lerobot/issues/2083",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-29T07:22:08Z",
    "updated_at": "2025-10-07T20:32:04Z",
    "user": "993984583"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2082,
    "title": "How to train this RL model with my model data",
    "body": "I want this model to load the trained model that I have already generated. So, I modified the output_dir and set resume to true, but then the problem shown in the figure occurred. How can I solve it?\n`{\n    \"output_dir\": \"outputs/train/2025-09-28/17-28-55_default\",\n    \"job_name\": \"default\",\n    \"resume\": true,\n    \"seed\": 1000,\n    \"num_workers\": 4,\n    \"batch_size\": 256,\n    \"steps\": 100000,`[\n\n<img width=\"1515\" height=\"717\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/df121807-b309-4a5c-bee1-850b0fab2ae0\" />\n\n](url)",
    "url": "https://github.com/huggingface/lerobot/issues/2082",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-29T07:18:52Z",
    "updated_at": "2025-10-07T20:33:11Z",
    "user": "993984583"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164094,
    "title": "Failed to change backward stream",
    "body": "in [pytorch cuda semantic ](https://docs.pytorch.org/docs/stable/notes/cuda.html#stream-semantics-of-backward-passes)\n> Each backward CUDA op runs on the same stream that was used for its corresponding forward op. If your forward pass runs independent ops in parallel on different streams, this helps the backward pass exploit that same parallelism.\n\n\nI currently have a requirement to run the backward pass on a different stream. I implemented an `autograd.Function` node and used `torch.cuda.set_stream()` in its backward method to switch streams, but I observed in the nsys timeline that the backward still runs on the same stream as the forward. Is there any way to force PyTorch\u2019s backward to use a different CUDA stream than the forward?\n\n```\nclass BackwardStream(torch.autograd.Function):\n    @staticmethod\n    def forward(ctx, input_tensor: torch.Tensor, stream: torch.cuda.Stream) -> torch.Tensor:\n        ctx.stream = stream\n        return input_tensor\n\n    @staticmethod\n    def backward(ctx, grad_output: torch.Tensor) -> torch.Tensor:\n        stream = ctx.stream\n        stream.wait_stream(torch.cuda.current_stream())\n        torch.cuda.set_stream(stream)\n        return grad_output\n    \n```\n\ncc @ezyang @albanD @gqchen @nikitaved @soulitzer @Varal7 @xmfan",
    "url": "https://github.com/pytorch/pytorch/issues/164094",
    "state": "closed",
    "labels": [
      "module: autograd",
      "triaged"
    ],
    "created_at": "2025-09-29T02:14:19Z",
    "updated_at": "2025-10-05T23:40:49Z",
    "comments": 16,
    "user": "shadow150519"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164074,
    "title": "When will the version for ROCM 7 be released?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nThe homepage still shows version 6.4.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang @naromero77amd",
    "url": "https://github.com/pytorch/pytorch/issues/164074",
    "state": "closed",
    "labels": [
      "module: rocm",
      "triaged"
    ],
    "created_at": "2025-09-28T16:27:21Z",
    "updated_at": "2025-09-30T00:40:11Z",
    "comments": 3,
    "user": "mihongyu"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3532,
    "title": "What is the proper way to use prompts? Do we have to format/render them ourselves?",
    "body": "Hi. First time using the Sentence Transformers library and I had a question regarding using prompts. Specifically, it seems like the [`SentenceTransformer.encode_document`](https://sbert.net/docs/package_reference/sentence_transformer/SentenceTransformer.html#sentence_transformers.SentenceTransformer.encode_document) method is a convenient wrapper for the [`SentenceTransformer.encode`](https://sbert.net/docs/package_reference/sentence_transformer/SentenceTransformer.html#sentence_transformers.SentenceTransformer.encode) method in the sense that the prompt `\"document\"` and the task `\"document\"` are selected automatically.\n\nHowever, I'm noticing that the prompt is simply prepended to the provided text rather than having it be formatted. The prompt for `\"document\"` is `title: {title | \"none\"} | text: {content}` and inside the `encode` method simply prepends it: https://github.com/UKPLab/sentence-transformers/blob/7341bf155b4349b88690b78c84beb5aa658c439f/sentence_transformers/SentenceTransformer.py#L1040\n\nMeaning that the resulting input to the embedding model would look like `title: none | text: {OUR_TEXT}`. But what if we wanted to include a `title` value? It seems like we'd have to pre-process the input ourselves. But then what is the point of using `encode_document`?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3532",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-28T06:32:51Z",
    "updated_at": "2025-09-30T10:59:24Z",
    "user": "seanswyi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 164061,
    "title": "GPU Memory Leak due to distributions",
    "body": "I am using the [MixStyle](https://arxiv.org/abs/2104.02008) methodology for domain adaptation and it involves using a custom layer which is inserted after every encoder stage. However, it is causing VRAM to grow linearly, which causes OOM error. No memory leak occurs on disabling the layer. Any idea on why this is happening?\n\n```\nclass MixStyle(nn.Module):\n    \"\"\"MixStyle.\n    Reference:\n      Zhou et al. Domain Generalization with MixStyle. ICLR 2021.\n    \"\"\"\n\n    def __init__(self, p=0.5, alpha=0.1, eps=1e-6, mix='random'):\n        \"\"\"\n        Args:\n          p (float): probability of using MixStyle.\n          alpha (float): parameter of the Beta distribution.\n          eps (float): scaling parameter to avoid numerical issues.\n          mix (str): how to mix.\n        \"\"\"\n        super().__init__()\n        self.p = p\n        self.beta = torch.distributions.Beta(alpha, alpha)\n        self.eps = eps\n        self.alpha = alpha\n        self.mix = mix\n        self._activated = True\n\n    def __repr__(self):\n        return f'MixStyle(p={self.p}, alpha={self.alpha}, eps={self.eps}, mix={self.mix})'\n\n    def set_activation_status(self, status=True):\n        self._activated = status\n\n    def update_mix_method(self, mix='random'):\n        self.mix = mix\n\n    def forward(self, x):\n        if not self.training or not self._activated:\n            return x\n\n        if random.random() > self.p:\n            return x\n\n        B = x.size(0)\n\n        mu = x.mean(dim=[2, 3], keepdim=True)\n        var = x.var(dim=[2, 3], keepdim=True)\n        sig = (var + self.eps).sqrt()\n        mu, sig = mu.detach(), sig.detach()\n        x_normed = (x-mu) / sig\n\n        lmda = self.beta.sample((B, 1, 1, 1))\n        lmda = lmda.to(x.device)\n\n        if self.mix == 'random':\n            # random shuffle\n            perm = torch.randperm(B)\n\n        elif self.mix == 'crossdomain':\n            # split into two halves and swap the order\n            perm = torch.arange(B - 1, -1, -1) # inverse index\n            perm_b, perm_a = perm.chunk(2)\n            perm_b = perm_b[torch.randperm(B // 2)]\n            perm_a = perm_a[torch.randperm(B // 2)]\n            perm = torch.cat([perm_b, perm_a], 0)\n\n        else:\n            raise NotImplementedError\n\n        mu2, sig2 = mu[perm], sig[perm]\n        mu_mix = mu*lmda + mu2 * (1-lmda)\n        sig_mix = sig*lmda + sig2 * (1-lmda)\n\n        return x_normed*sig_mix + mu_mix\n```\n\n\ncc @fritzo @neerajprad @alicanb @nikitaved",
    "url": "https://github.com/pytorch/pytorch/issues/164061",
    "state": "open",
    "labels": [
      "module: distributions",
      "triaged"
    ],
    "created_at": "2025-09-28T05:08:15Z",
    "updated_at": "2025-09-29T14:54:42Z",
    "comments": 1,
    "user": "vedantdalimkar"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41186,
    "title": "Qwen2.5-VL  restore tensor multi-image form",
    "body": "\nHello, I have recently been experimenting with qwen2.5-vl (https://github.com/huggingface/transformers/blob/v4.52-release/src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py). I noticed that multiple images are pre-merged here,\n```\nimage_embeds = self.get_image_features(pixel_values, image_grid_thw)\n```\n but I want to process each image individually, such as performing pooling on each image. I found that when I attempt operations like \n```\nimage_embeds.view(n_img, image_embeds.shape[0]//n_img, -1)\n```\n I cannot correctly restore the multi-image format. Could you please advise on how to handle this? \n",
    "url": "https://github.com/huggingface/transformers/issues/41186",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-28T03:36:24Z",
    "updated_at": "2025-11-05T08:02:55Z",
    "comments": 2,
    "user": "NiFangBaAGe"
  },
  {
    "repo": "huggingface/peft",
    "number": 2802,
    "title": "Guide on training that requires both LoRA and base model forward calls ?",
    "body": "Hi, I'm working on some training variants that require hidden states from the base model and the hidden states produced with LoRA. I'm currently initializing two separate model objects:\n```\n        from peft import get_peft_model\n        m1=AutoModelForCausalLM.from_pretrained(model_path)\n        m2=AutoModelForCausalLM.from_pretrained(model_path)\n        lora_config = LoraConfig(....)\n        m2 = get_peft_model(m2, lora_config)\n```\n\nIs there already an api to call non-lora forward with `m2` object ? I believe it'll be more memory efficient.",
    "url": "https://github.com/huggingface/peft/issues/2802",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-27T23:12:23Z",
    "updated_at": "2025-10-15T10:26:15Z",
    "comments": 3,
    "user": "thangld201"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2072,
    "title": "How to run lerobot with RTX 5090? If not possible, please add support",
    "body": "### System Info\n\n```Shell\n- lerobot version: 0.3.4\n- Platform: Linux-6.14.0-32-generic-x86_64-with-glibc2.39\n- Python version: 3.12.3\n- Huggingface Hub version: 0.35.1\n- Datasets version: 4.1.1\n- Numpy version: 2.2.6\n- PyTorch version: 2.8.0+cu128\n- Is PyTorch built with CUDA support?: True\n- Cuda version: 12.8\n- GPU model: NVIDIA GeForce RTX 5090\n- Using GPU in script?: Yes\n```\n\n### Information\n\n- [x] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nI am trying to run the train script as shown in the examples\n\n```\npython -m lerobot.scripts.lerobot_train     --policy.path=cijerezg/smolvla-test     --dataset.repo_id=cijerezg/pick-up-train-v1     --batch_size=48     --steps=20000     --output_dir=outputs/train/my_smolvla_pickup_v9     --job_name=my_smolvla_training     --policy.device=cuda     --wandb.enable=true     --policy.repo_id=pickup_policy_v5     --save_freq=1000\n```\n\n### Expected behavior\n\nI expect it to run, but instead I get the following error: \n\n```\nTraceback (most recent call last):\n  File \"<frozen runpy>\", line 198, in _run_module_as_main\n  File \"<frozen runpy>\", line 88, in _run_code\n  File \"/home/user/Documents/Research/RL/LeRobot/lerobot/src/lerobot/scripts/lerobot_train.py\", line 363, in <module>\n    main()\n  File \"/home/user/Documents/Research/RL/LeRobot/lerobot/src/lerobot/scripts/lerobot_train.py\", line 359, in main\n    train()\n  File \"/home/user/Documents/Research/RL/LeRobot/lerobot/src/lerobot/configs/parser.py\", line 225, in wrapper_inner\n    response = fn(cfg, *args, **kwargs)\n               ^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/user/Documents/Research/RL/LeRobot/lerobot/src/lerobot/scripts/lerobot_train.py\", line 263, in train\n    batch = next(dl_iter)\n            ^^^^^^^^^^^^^\n  File \"/home/user/Documents/Research/RL/LeRobot/lerobot/src/lerobot/datasets/utils.py\", line 917, in cycle\n    yield next(iterator)\n          ^^^^^^^^^^^^^^\n  File \"/home/user/Documents/Research/RL/LeRobot/.venv/lib/python3.12/site-packages/torch/utils/data/dataloader.py\", line 734, in __next__\n    data = self._next_data()\n           ^^^^^^^^^^^^^^^^^\n  File \"/home/user/Documents/Research/RL/LeRobot/.venv/lib/python3.12/site-packages/torch/utils/data/dataloader.py\", line 1516, in _next_data\n    return self._process_data(data, worker_id)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/user/Documents/Research/RL/LeRobot/.venv/lib/python3.12/site-packages/torch/utils/data/dataloader.py\", line 1551, in _process_data\n    data.reraise()\n  File \"/home/user/Documents/Research/RL/LeRobot/.venv/lib/python3.12/site-packages/torch/_utils.py\", line 769, in reraise\n    raise exception\nNotImplementedError: Caught NotImplementedError in DataLoader worker process 0.\nOriginal Traceback (most recent call last):\n  File \"/home/user/Documents/Research/RL/LeRobot/.venv/lib/python3.12/site-packages/torch/utils/data/_utils/worker.py\", line 349, in _worker_loop\n    data = fetcher.fetch(index)  # type: ignore[possibly-undefined]\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/home/user/Documents/Research/RL/LeRobot/.venv/lib/python3.12/site-packages/torch/utils/data/_utils/fetch.py\", line 52, in fetch\n    data = [self.dataset[idx] for idx in possibly_batched_index]\n            ~~~~~~~~~~~~^^^^^\n  File \"/home/user/Documents/Research/RL/LeRobot/lerobot/src/lerobot/datasets/lerobot_dataset.py\", line 874, in __getitem__\n    video_frames = self._query_videos(query_timestamps, ep_idx)\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/user/Documents/Research/RL/LeRobot/lerobot/src/lerobot/datasets/lerobot_dataset.py\", line 846, in _query_videos\n    frames = decode_video_frames(video_path, shifted_query_ts, self.tolerance_s, self.video_backend)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/user/Documents/Research/RL/LeRobot/lerobot/src/lerobot/datasets/video_utils.py\", line 69, in decode_video_frames\n    return decode_video_frames_torchcodec(video_path, timestamps, tolerance_s)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/user/Documents/Research/RL/LeRobot/lerobot/src/lerobot/datasets/video_utils.py\", line 248, in decode_video_frames_torchcodec\n    decoder = decoder_cache.get_decoder(str(video_path))\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/user/Documents/Research/RL/LeRobot/lerobot/src/lerobot/datasets/video_utils.py\", line 193, in get_decoder\n    decoder = VideoDecoder(file_handle, seek_mode=\"approximate\")\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/user/Documents/Research/RL/LeRobot/.venv/lib/python3.12/site-packages/torchcodec/decoders/_video_decoder.py\", line 89, in __init__\n    self._decoder = create_decoder(source=source, seek_mode=seek_mode)\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/user/Documents/Research/",
    "url": "https://github.com/huggingface/lerobot/issues/2072",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-27T19:52:42Z",
    "updated_at": "2025-11-08T07:53:00Z",
    "user": "cijerezg"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 3333,
    "title": "How to use prefix caching",
    "body": "Hi\nI can't find a way to turn on the prefix caching\n\nWhen I run any model, I always get:\nUsing prefix caching = False\n\nThanks a lot",
    "url": "https://github.com/huggingface/text-generation-inference/issues/3333",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-27T14:14:37Z",
    "updated_at": "2025-09-29T11:52:48Z",
    "user": "Noha-Magdy"
  },
  {
    "repo": "huggingface/smol-course",
    "number": 259,
    "title": "[QUESTION] Is this a bug in smollmv3's chat template?",
    "body": "\nHi \n\nI am reading this \nhttps://huggingface.co/learn/smol-course/unit1/2#chat-templates-with-tools\n\nI feel like there is a bug in `HuggingFaceTB/SmolLM3-3B` 's chat template\n\nfrom the example\n\n```\n# Conversation with tool usage\nmessages = [\n    {\"role\": \"system\", \"content\": \"You are a helpful assistant with access to tools.\"},\n    {\"role\": \"user\", \"content\": \"What's the weather like in Paris?\"},\n    {\n        \"role\": \"assistant\", \n        \"content\": \"I'll check the weather in Paris for you.\",\n        \"tool_calls\": [\n            {\n                \"id\": \"call_1\",\n                \"type\": \"function\",\n                \"function\": {\n                    \"name\": \"get_weather\",\n                    \"arguments\": '{\"location\": \"Paris, France\", \"unit\": \"celsius\"}'\n                }\n            }\n        ]\n    },\n    {\n        \"role\": \"tool\",\n        \"tool_call_id\": \"call_1\", \n        \"content\": '{\"temperature\": 22, \"condition\": \"sunny\", \"humidity\": 60}'\n    },\n    {\n        \"role\": \"assistant\",\n        \"content\": \"The weather in Paris is currently sunny with a temperature of 22\u00b0C and 60% humidity. It's a beautiful day!\"\n    }\n]\n\n# Apply chat template with tools\nformatted_with_tools = tokenizer.apply_chat_template(\n    messages,\n    tools=tools,\n    tokenize=False,\n    add_generation_prompt=False\n)\n\nprint(\"Chat template with tools:\")\nprint(formatted_with_tools)\n```\n\n\nI got this result\n\n```\nChat template with tools:\n<|im_start|>system\n## Metadata\n\nKnowledge Cutoff Date: June 2025\nToday Date: 27 September 2025\nReasoning Mode: /think\n\n## Custom Instructions\n\nYou are a helpful assistant with access to tools.\n\n### Tools\n\nYou may call one or more functions to assist with the user query.\nYou are provided with function signatures within <tools></tools> XML tags:\n\n<tools>\n{'type': 'function', 'function': {'name': 'get_weather', 'description': 'Get the current weather for a location', 'parameters': {'type': 'object', 'properties': {'location': {'type': 'string', 'description': 'The city and state, e.g. San Francisco, CA'}, 'unit': {'type': 'string', 'enum': ['celsius', 'fahrenheit'], 'description': 'The temperature unit'}}, 'required': ['location']}}}\n{'type': 'function', 'function': {'name': 'calculate', 'description': 'Perform mathematical calculations', 'parameters': {'type': 'object', 'properties': {'expression': {'type': 'string', 'description': 'Mathematical expression to evaluate'}}, 'required': ['expression']}}}\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call>\n\n<|im_end|>\n<|im_start|>user\nWhat's the weather like in Paris?<|im_end|>\n<|im_start|>assistant\nI'll check the weather in Paris for you.<|im_end|>\n<|im_start|>user\n{\"temperature\": 22, \"condition\": \"sunny\", \"humidity\": 60}<|im_end|>\n<|im_start|>assistant\nThe weather in Paris is currently sunny with a temperature of 22\u00b0C and 60% humidity. It's a beautiful day!<|im_end|>\n\n```\n\nWhich is kind of weird.\nThe first thing is there is no tool call in below message\n```\n<|im_start|>assistant\nI'll check the weather in Paris for you.<|im_end|>\n```\n\nI expect it to have `<tool_call> ... </tool_call>` in it.\n\nthe second thing is why the `tool` role got replace with `user` role.\nShould not we explicitly specify the role?\n\nCan someone help me with this, please?",
    "url": "https://github.com/huggingface/smol-course/issues/259",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-09-27T10:19:37Z",
    "updated_at": "2025-11-24T18:40:09Z",
    "user": "Nevermetyou65"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163982,
    "title": "Need to update Magma version in Pytorch",
    "body": "### \ud83d\udc1b Describe the bug\n\nNeed to look into updating Magma for Pytorch CUDA builds\nNeed to understand what is the perf increase. \nDo we need MAGMA at all ?\n\n### Versions\n\n2.10.0\n\ncc @ptrblck @msaroufim @eqy @jerryzh168",
    "url": "https://github.com/pytorch/pytorch/issues/163982",
    "state": "open",
    "labels": [
      "module: cuda",
      "triaged"
    ],
    "created_at": "2025-09-26T19:21:26Z",
    "updated_at": "2025-09-26T19:23:09Z",
    "comments": 0,
    "user": "atalman"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3797,
    "title": "Question: ReduceLROnPlateau wrapped by AcceleratedScheduler in DDP may multiply LR by num_processes?",
    "body": "Hi,\n\nI\u2019m using ReduceLROnPlateau wrapped by AcceleratedScheduler in a multi-GPU / DDP setup (num_processes=8).\n\nMy main process calls:\n```\nlr_scheduler = torch.optim.lr_scheduler.ReduceLROnPlateau(\n    optimizer, mode=\"min\", factor=self.hyper_params['lr_decay_factor'], patience=self.hyper_params['lr_reduce_patient']\n)\nmodel, optimizer, train_loader, val_loader, lr_scheduler, = accelerator.prepare(\n    model_bundle.model, optimizer, data_loaders.train_loader, data_loaders.val_loader, lr_scheduler\n)\nfor epoch in range(self.hyper_params['epochs']):\n    # train...\n    val_loss = self.eval()\n    lr_scheduler.step(val_loss)\n\n```\nI noticed that AcceleratedScheduler.step() does:\n```\nnum_processes = AcceleratorState().num_processes\nfor _ in range(num_processes):\n    # Special case when using OneCycle and `drop_last` was not used\n    if hasattr(self.scheduler, \"total_steps\"):\n        if self.scheduler._step_count <= self.scheduler.total_steps:\n            self.scheduler.step(*args, **kwargs)\n    else:\n        self.scheduler.step(*args, **kwargs)\n```\nWill this cause the LR to be reduced num_processes times for a single validation step?\n\nThanks!",
    "url": "https://github.com/huggingface/accelerate/issues/3797",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-26T10:02:20Z",
    "updated_at": "2025-11-03T15:08:09Z",
    "comments": 1,
    "user": "nicelulu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163946,
    "title": "ModuleNotFoundError: No module named 'importlib_metadata'",
    "body": "### \ud83d\udc1b Describe the bug\n\nI encountered this error when I used torchrun.\n\nTraceback (most recent call last):\n  File \"xxx/bin/torchrun\", line 5, in <module>\n    from torch.distributed.run import main\n  File \"xxx/lib/python3.9/site-packages/torch/distributed/run.py\", line 381, in <module>\n    from torch.distributed.elastic.rendezvous.utils import _parse_rendezvous_config\n  File \"xxx/lib/python3.9/site-packages/torch/distributed/elastic/rendezvous/__init__.py\", line 142, in <module>\n    from .registry import _register_default_handlers, _register_out_of_tree_handlers\n  File \"xxx/lib/python3.9/site-packages/torch/distributed/elastic/rendezvous/registry.py\", line 19, in <module>\n    from importlib_metadata import entry_points\nModuleNotFoundError: No module named 'importlib_metadata'\n\nI saw the following code in the source code\n\nif sys.version_info < (3, 10):\n    from importlib_metadata import entry_points\nelse:\n    from importlib.metadata import entry_points\n\nSince Python3.8 the importlib_metedata third-party library has been merged into Cpython and became its importlib.metada module, why is it judged here that Python is less than 3.10? Is there any special consideration\uff1f\n\nIf it is necessary, should it be added to the requirements.txt\n\n### Versions\n\ntorch 2.6.0\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci",
    "url": "https://github.com/pytorch/pytorch/issues/163946",
    "state": "closed",
    "labels": [
      "needs reproduction",
      "oncall: distributed"
    ],
    "created_at": "2025-09-26T08:26:50Z",
    "updated_at": "2025-11-06T07:20:57Z",
    "comments": 6,
    "user": "yunyiyun"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2050,
    "title": "I wonder how to use RL on so101 within sim environment?",
    "body": "",
    "url": "https://github.com/huggingface/lerobot/issues/2050",
    "state": "closed",
    "labels": [
      "question",
      "simulation",
      "good first issue"
    ],
    "created_at": "2025-09-26T06:52:38Z",
    "updated_at": "2025-10-08T18:04:44Z",
    "user": "Temmp1e"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2045,
    "title": "I would appreciate it if you could explain how to train the slicing clay model",
    "body": "I am planning to conduct a clay-cutting task using pi0. Since this type of task is not typically included among pi0\u2019s foundation model tasks, I would like to inquire how many episodes (and the approximate duration of each) would generally be required for such a custom task.\n\nThe task I have in mind involves cutting clay in this manner, and I am uncertain whether it can be made to work effectively. I would greatly appreciate any realistic advice or guidance you could provide on this matter.\n\n<img width=\"1333\" height=\"1065\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/cd474850-c09a-4ae0-9668-a2ce8c2b3b6e\" />",
    "url": "https://github.com/huggingface/lerobot/issues/2045",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-26T00:51:59Z",
    "updated_at": "2025-09-26T00:51:59Z",
    "user": "pparkgyuhyeon"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163900,
    "title": "[Maintenance] MacOS runners update",
    "body": "\n## Current Status\n*ongoing*.\n\n## Error looks like\nMacOS jobs might fail with infra errors\n\n## Incident timeline (all times pacific)\n*Include when the incident began, when it was detected, mitigated, root caused, and finally closed.*\n\n## User impact\n*How does this affect users of PyTorch CI?*\n\n## Root cause\n*What was the root cause of this issue?*\n\n## Mitigation\n*How did we mitigate the issue?*\n\n## Prevention/followups\n*How do we prevent issues like this in the future?*\n",
    "url": "https://github.com/pytorch/pytorch/issues/163900",
    "state": "closed",
    "labels": [
      "ci: sev"
    ],
    "created_at": "2025-09-25T22:30:08Z",
    "updated_at": "2025-09-26T11:27:33Z",
    "comments": 3,
    "user": "malfet"
  },
  {
    "repo": "pytorch/torchx",
    "number": 1130,
    "title": "The hosted doc server is not working",
    "body": "## \ud83d\udcda Documentation\n\n## Link\nWe are now redirected from https://docs.pytorch.org/torchx/main/quickstart.html to https://meta-pytorch.org/torchxmain/quickstart.html\n\n## What does it currently say?\n```\n404\n\nFile not found\n\nThe site configured at this address does not contain the requested file.\n\nIf this is your site, make sure that the filename case matches the URL as well as any file permissions.\nFor root URLs (like http://example.com/) you must provide an index.html file.\n\n[Read the full documentation](https://help.github.com/pages/) for more information about using GitHub Pages.\n```\n\nIt should redirect us to https://meta-pytorch.org/torchx/main/quickstart.html or https://meta-pytorch.org/torchx/latest/quickstart.html\n\nLooks like instead of `/torchx/main/` it gets resolved to `/torchxmain/`.\n\n## What should it say?\nShould work as before\n\n## Why?\nHosted docs are very useful\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/1130",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-25T16:58:45Z",
    "updated_at": "2025-09-25T20:14:43Z",
    "comments": 2,
    "user": "clumsy"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2042,
    "title": "Question: How to train to get Task Recovery behavior?",
    "body": "We would need the robot to be able to detect a failure (like dropping an object) and attempt to correct it to continue with the task.\n\nHow would the training data would look like for this?\n\nThanks",
    "url": "https://github.com/huggingface/lerobot/issues/2042",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-25T15:52:55Z",
    "updated_at": "2025-09-25T15:52:55Z",
    "user": "raul-machine-learning"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3794,
    "title": "Error when evaluating with multi-gpu",
    "body": "I met a problem when evaluating Llada-8B with multi-gpu ( **Nvidia V100** ) using accelerate+lm_eval.  Error occurs when **num_processes>1**.\nbut there is no problem with single GPU, all the other cfgs are the same.\nHow can i solve this problem?\nI use this command to evaluate\n\n    accelerate launch --config_file config1.yaml eval_llada.py --tasks ${task} --num_fewshot ${num_fewshot} \\\n    --confirm_run_unsafe_code --model llada_dist \\\n    --model_args model_path='/raid/data/zhouy/model_data/LLaDA-8B-Instruct', \n    gen_length=${length},steps=${length},block_length=${block_length},show_speed=True \n\nThis is my config1.yaml\n\n    compute_environment: LOCAL_MACHINE \n    debug: false\n    distributed_type: MULTI_GPU\n    downcast_bf16: 'no'\n    enable_cpu_affinity: false\n    machine_rank: 0\n    main_process_ip: null\n    main_process_port: 5678\n    main_training_function: main\n    mixed_precision: fp16\n    num_machines: 1\n    num_processes: 2\n    rdzv_backend: static\n    same_network: true\n    tpu_env: []\n    tpu_use_cluster: false\n    tpu_use_sudo: false\n    use_cpu: false\n\nHere is the Error logs:\n\n    [rank1]: Traceback (most recent call last):\n    [rank1]:   File \"/home/zhouy/dllm/Fast-dLLM-main/llada/eval_llada.py\", line 364, in <module>\n    [rank1]:     cli_evaluate()\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/lm_eval/__main__.py\", line 389, in cli_evaluate\n    [rank1]:     results = evaluator.simple_evaluate(\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/lm_eval/utils.py\", line 422, in _wrapper\n    [rank1]:     return fn(*args, **kwargs)\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/lm_eval/evaluator.py\", line 308, in simple_evaluate\n    [rank1]:     results = evaluate(\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/lm_eval/utils.py\", line 422, in _wrapper\n    [rank1]:     return fn(*args, **kwargs)\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/lm_eval/evaluator.py\", line 528, in evaluate\n    [rank1]:     resps = getattr(lm, reqtype)(cloned_reqs)\n    [rank1]:   File \"/home/zhouy/dllm/Fast-dLLM-main/llada/eval_llada.py\", line 312, in generate_until\n    [rank1]:     generated_answer, nfe = generate_with_dual_cache(self.model, input_ids, steps=self.steps, gen_length=self.gen_length, block_length=self.block_length, \n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n    [rank1]:     return func(*args, **kwargs)\n    [rank1]:   File \"/home/zhouy/dllm/Fast-dLLM-main/llada/generate.py\", line 208, in generate_with_dual_cache\n    [rank1]:     output = model(x, use_cache=True)\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 1736, in _wrapped_call_impl\n    [rank1]:     return self._call_impl(*args, **kwargs)\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 1747, in _call_impl\n    [rank1]:     return forward_call(*args, **kwargs)\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/torch/nn/parallel/distributed.py\", line 1643, in forward\n    [rank1]:     else self._run_ddp_forward(*inputs, **kwargs)\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/torch/nn/parallel/distributed.py\", line 1459, in _run_ddp_forward\n    [rank1]:     return self.module(*inputs, **kwargs)  # type: ignore[index]\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 1736, in _wrapped_call_impl\n    [rank1]:     return self._call_impl(*args, **kwargs)\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 1747, in _call_impl\n    [rank1]:     return forward_call(*args, **kwargs)\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/accelerate/utils/operations.py\", line 818, in forward\n    [rank1]:     return model_forward(*args, **kwargs)\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/accelerate/utils/operations.py\", line 806, in __call__\n    [rank1]:     return convert_to_fp32(self.model_forward(*args, **kwargs))\n    [rank1]:   File \"/raid/data/zhouy/anaconda3/envs/dllm/lib/python3.9/site-packages/torch/amp/autocast_mode.py\", line 44, in decorate_autocast\n    [rank1]:     return func(*args, **kwargs)\n    [rank1]:   File \"/home/zhouy/dllm/Fast-dLLM-main/llada/model/modeling_llada.py\", line 1582, in forward\n    [rank1]:     outputs = self.model.forward(\n    [rank1]:   File \"/home/zhouy/dllm/Fast-dLLM-main/llada/model/modeling_llada.py\", line 1479, in forward\n    [rank1]:     x, cache = block(x, attention_bias=attention_bias, layer_past=layer_past, use_ca",
    "url": "https://github.com/huggingface/accelerate/issues/3794",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-25T14:42:29Z",
    "updated_at": "2025-11-03T15:08:12Z",
    "comments": 1,
    "user": "adfad1"
  },
  {
    "repo": "huggingface/text-embeddings-inference",
    "number": 728,
    "title": "Compile error in multiple environments for CPU backend",
    "body": "### System Info\n\nTEI source code: \n\n- Latest main branch(0c1009bfc49b759fe75eed4fd377b4fbad534ad5); \n- Latest release `v1.8.2`; \n- Release `v1.8.1`\n\nTested platform: \n\n- Win: AMD 7950X+Windows 10 x64 Version 10.0.19045.6332; \n- WSL2: AMD 7950X+Debian 13 on wsl2 (Linux DESKTOP 5.15.167.4-microsoft-standard-WSL2 # 1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 GNU/Linux) @ Windows 10 x64 Version 10.0.19045.6332; \n- Linux: Intel 6133*2+Ubuntu 20.04;\n\n(GPUs is not mentioned due to build TEI on CPU)\n\nTested rustup envs: \n\nFreshly installed rustup: default rustup profile: cargo 1.85.1 (d73d2caf9 2024-12-31)\n- Win: Freshly installed rustup & Freshly installed MSVC v143 -VS 2022 C++ build tools+Winodws 11 SDK (10.0.22621.0)+cmake\n- WSL: Freshly installed rustup & gcc (Debian 14.2.0-19) 14.2.0\n- Linux: Freshly installed rustup & gcc (GCC) 10.5.0\n\n### Information\n\n- [ ] Docker\n- [x] The CLI directly\n\n### Tasks\n\n- [x] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\nAs docs' recommend, tested on 3 different envs listed above:\n\n1. `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`\n2. `cargo install --path router -F mkl --verbose` (added `--verbose` for logging)\n\nShows compile error about **25 undefined references / external symbol** (`'vsTanh', 'vsSub', 'vsSqrt', 'vsSin', 'vsMul', 'vsLn', 'vsFmin', 'vsExp', 'vsDiv', 'vsCos', 'vsAdd', 'vdTanh', 'vdSub', 'vdSqrt', 'vdSin', 'vdMul', 'vdLn', 'vdFmin', 'vdExp', 'vdDiv', 'vdCos', 'vdAdd', 'sgemm_', 'hgemm_', 'dgemm_'`)\n\n### Expected behavior\n\nExpect finishing compile, but:\n\n- Compile v1.8.2/v1.8.1/main (similar error) on Win+MSVC+AMD CPU:\n\n```\n...\nRunning `C:\\Users\\nkh04\\.rustup\\toolchains\\1.85.1-x86_64-pc-windows-msvc\\bin\\rustc.exe --crate-name text_embeddings_router --edition=2021 router\\src\\main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=115 --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto=fat -C codegen-units=1 --cfg \"feature=\\\"candle\\\"\" --cfg \"feature=\\\"default\\\"\" --cfg \"feature=\\\"dynamic-linking\\\"\" --cfg \"feature=\\\"http\\\"\" --cfg \"feature=\\\"mkl\\\"\" --check-cfg cfg(docsrs,test) --check-cfg \"cfg(feature, values(\\\"accelerate\\\", \\\"candle\\\", \\\"candle-cuda\\\", \\\"candle-cuda-turing\\\", \\\"candle-cuda-volta\\\", \\\"default\\\", \\\"dynamic-linking\\\", \\\"google\\\", \\\"grpc\\\", \\\"http\\\", \\\"metal\\\", \\\"mkl\\\", \\\"ort\\\", \\\"python\\\", \\\"static-linking\\\"))\" -C metadata=e1406d246b8c925f --out-dir F:\\text-embeddings-inference-1.8.2\\target\\release\\deps -C strip=symbols -L dependency=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps --extern anyhow=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libanyhow-5751be73768123a3.rlib --extern axum=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libaxum-8bc59cf51b8d1ae2.rlib --extern axum_tracing_opentelemetry=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libaxum_tracing_opentelemetry-6919ca207315f42e.rlib --extern base64=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libbase64-20907aaabfa37a5c.rlib --extern clap=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libclap-ded1b8a7f6da29a7.rlib --extern futures=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libfutures-55e1ce906ca8ce43.rlib --extern hf_hub=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libhf_hub-46162d037bf61d01.rlib --extern http=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libhttp-721bb5a8d4ad5af4.rlib --extern init_tracing_opentelemetry=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libinit_tracing_opentelemetry-1130e5d6b02b3c83.rlib --extern intel_mkl_src=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libintel_mkl_src-7de47f7e38d141d5.rlib --extern metrics=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libmetrics-f38f63f59a9e401d.rlib --extern metrics_exporter_prometheus=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libmetrics_exporter_prometheus-3e83484daaaf9a40.rlib --extern mimalloc=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libmimalloc-55786f97dafb497c.rlib --extern num_cpus=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libnum_cpus-26f3f7fb7d16b825.rlib --extern opentelemetry=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libopentelemetry-43ce590757d45ebb.rlib --extern opentelemetry_otlp=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libopentelemetry_otlp-7adf99fb9a924955.rlib --extern opentelemetry_sdk=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libopentelemetry_sdk-48d11cd15d38a406.rlib --extern reqwest=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libreqwest-cdbb64c7917c22c9.rlib --extern serde=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libserde-e13a1b310cb83bc5.rlib --extern serde_json=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libserde_json-c2074a4721fb3f74.rlib --extern simsimd=F:\\text-embeddings-inference-1.8.2\\target\\release\\deps\\libsimsimd-5bf7050b419eab84.rlib --extern text_embeddings_bac",
    "url": "https://github.com/huggingface/text-embeddings-inference/issues/728",
    "state": "open",
    "labels": [
      "documentation",
      "question"
    ],
    "created_at": "2025-09-25T11:52:16Z",
    "updated_at": "2025-11-18T14:49:01Z",
    "user": "nkh0472"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41141,
    "title": "Need a concise example of Tensor Parallelism (TP) training using Trainer/SFTTrainer.",
    "body": "### Feature request\n\nI have checked the code and there are few places which talk about TP. I saw from_pretrained method for model contains tp_plan and device_mesh. I also checked that the TrainingArgument can take parallelism_config which defines the TP/CP plan along with FSDP. However, I am not able to successfully stitch things together to make the only TP based training work. Please help.\n\nRef: \n- https://github.com/huggingface/transformers/blob/main/examples/3D_parallel.py\n\n### Motivation\n\nNeed to enable only TP based training, but no tutorial or example is available.\n\n### Your contribution\n\nGiven proper understanding and proper guidance, I can come up with clean example and documentation for the same.",
    "url": "https://github.com/huggingface/transformers/issues/41141",
    "state": "open",
    "labels": [
      "Documentation",
      "Feature request",
      "Tensor Parallel"
    ],
    "created_at": "2025-09-25T03:01:02Z",
    "updated_at": "2026-01-04T14:05:36Z",
    "comments": 10,
    "user": "meet-minimalist"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163801,
    "title": "[CUDA][Triton][PTXAS] Triton Wheel Missing CUDA13 PTXAS - Breakage exists for the environment where CTK is not present",
    "body": "### \ud83d\udc1b Describe the bug\n\nBy default triton release/3.5x ships a PTXAS version that is based on CUDA12.8. \n\n** in environments that the latest CTK is NOT installed** \n\nComparing to PTXAS from CUDA13.0, CUDA12.8 ptxas is not capable to handle THOR device (which underwent a renaming, see https://github.com/llvm/llvm-project/issues/156096 for background related issue. Note this llvm issue 156096 has been fixed in triton/3.5.x via https://github.com/triton-lang/llvm-project/pull/2, which can be verified with a CTK 13.0. Referencing here just for the renaming context) and for other newer devices. \n\nUsers on THOR would encounter: \nptxas fatal   : Value 'sm_110a' is not defined for option 'gpu-name'\n\nUsers on SM_121 device (https://docs.nvidia.com/cuda/pdf/CUDA_Features_Archive.pdf) would encounter \nptxas fatal   : Value 'sm_121a' is not defined for option 'gpu-name'\n\n\nSee also the report https://github.com/llvm/llvm-project/issues/156096#issuecomment-3319410046  from @[mcr-ksh](https://github.com/mcr-ksh) \n\n** in environments that has the latest CTK installed **\nUsers may still need the explicit \"export TRITON_PTXAS_PATH=/usr/local/cuda/bin/ptxas\" to get Triton to pick up the right ptxas. \n\nWe have a few options: \n1. According to @ptrblck, one workaround could be to ship ptxas12 as well as ptxas13 and use the appropriate one using a runtime check for the PyTorch/CUDA version, we did this in the past for Blackwell (using ptxas_blackwell) when ptxas==12.8. \n2. PyTorch cu126/cu128/cu130 shipping a different ptxas, then triton won't need one \n3. we build triton cuda wheels separately for cu126/cu128/cu130. \n\nNo.1 seems to be doable for final v2.9RC. Thoughts?  \n\ncc @seemethere @malfet @atalman @ptrblck @eqy @tinglvv  @xwang233 @davidberard98 \n\n### Versions\n\nTriton release/3.5.x",
    "url": "https://github.com/pytorch/pytorch/issues/163801",
    "state": "closed",
    "labels": [
      "module: binaries",
      "triaged",
      "module: third_party",
      "has workaround",
      "dependencies"
    ],
    "created_at": "2025-09-24T22:21:24Z",
    "updated_at": "2025-09-30T01:56:15Z",
    "user": "nWEIdia"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 2034,
    "title": "dataset v2.1 and groot n1.5",
    "body": "for now, groot dose not support dataset v3.0 to fine_tune ? in this case, should we continue use v2.1 ? and if we already collect data from v3, how we can convert it back to v2.1?",
    "url": "https://github.com/huggingface/lerobot/issues/2034",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "dataset"
    ],
    "created_at": "2025-09-24T21:12:26Z",
    "updated_at": "2025-12-24T00:05:45Z",
    "user": "zujian-y"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163789,
    "title": "[docs] instructions to locally build docs are underspecified",
    "body": "*Note: moving the dependency conflict discussion to #164010.*\n\n### \ud83d\udcda The doc issue\n\nDocstring changes I made in #163120 caused the `linux-jammy-py3_10-gcc11-build` `docs_test` CI to fail. To debug this I had to build the docs locally, and ran into some rough edges:\n\n1. There are small discrepancies between the instructions in [`CONTRIBUTING.md`](https://github.com/pytorch/pytorch/blob/main/CONTRIBUTING.md#building-documentation) and [`README.md`](https://github.com/pytorch/pytorch?tab=readme-ov-file#building-the-documentation). \n2. As written, neither set of instructions will work with Python >=3.11 - `.ci/docker/requirements-docs.txt` uses `matplotlib=3.5.3` for Python <3.13, but matplotlib 3.5.3 only has wheels for/supports Python <=3.10. It also uses `matplotlib=3.6.3` for Python >=3.13, but matplotlib 3.6.3 only has wheels for/supports Python <=3.11.\n3. ~Tools like `uv` don't support use of the editable flag `-e` with URLs (line 4 of `docs/requirements.txt`). This is also deprecated in `pip` and will be enforced in `pip 25.3`, which will be released in about a month!~ (Edit: no action required here - `setup.py develop` is being deprecated, not the entire editable mechanism. See [this issue](https://github.com/pypa/pip/issues/11457) and [PEP 660](https://peps.python.org/pep-0660/) for more context.)\n4. I wasn't able to build the docs without installing `numpy<2`. This isn't possible, right?\n\nNits:\n- ~The README docs instructions have a typo - `node@6.13.1` should presumably be `node@16.13.1`.~ (Edit: this was wrong.)\n- The `CONTRIBUTING.md` tip about removing irrelevant `.rst` files is outdated - the example command removes `docs/source/scripts/exportdb/generate_example_rst.py`, which will cause builds to error. This can be fixed with `find . -type f -iname \"*.rst\" | ...`\n\n<details>\n<summary>How to build the PyTorch nightly docs on MacOS</summary>\n\nIf you come across this issue while trying to build the docs, this works as of September 2025:\n\n1. Set up the repo and a Python 3.10 env with pip.\n```bash\ngit clone https://github.com/pytorch/pytorch.git\ncd pytorch\nuv venv -p 3.10 .venv-docs\nsource .venv-docs/bin/activate\nuv pip install -U pip\n```\n\n2. Install torch.\n\nIf you're making small changes in `docs/source`, you can install [the appropriate nightly wheel](https://pytorch.org/get-started/locally/):\n```bash\npython -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu\n```\n\nIf you're adding new Python modules or updating Python docstrings in `torch/`, you can use `tools/nightly.py` with the prefix flag:\n```bash\n./tools/nightly.py checkout -b our-branch -p .venv-docs\n```\n\nIf you're doing something more involved you likely have to [build from source](https://github.com/pytorch/pytorch?tab=readme-ov-file#from-source):\n```bash\npip install --group dev\npython -m pip install --no-build-isolation -v -e .\n```\n\n3. Install docs-specific dependencies.\n```bash\nbrew install node\nnpm install -g katex@0.13.18\npip install -r docs/requirements.txt\npip install 'numpy<2'\n```\n\nAfterwards you should be able to `cd docs && make html`.\n\n</details>\n\n### Suggest a potential alternative/fix\n\nReconcile and update the instructions in `CONTRIBUTING.md` and `README.md`. In particular:\n- Recommend using a separate venv for local docs builds.\n- Explain when/why someone building the docs should install torch from source.\n- Move niche information (e.g. building a PDF of the docs) from the README to `CONTRIBUTING.md`, and add a link.\n\nAnd:\n- Pin `numpy<2` and appropriate matplotlib versions in `.ci/docker/requirements-docs.txt`. If there's some reason we can't do this, let's explicitly note that only Python 3.10 is supported for now (since we can't build torch from source on 3.9).\n- ~Remove the editable flag on `pytorch_sphinx_theme2`, and document a separate flow for those actually working on the theme.~\n\nIf all of this makes sense to reviewers, I can get started on a PR with these fixes.\n\nI can't edit the wiki, but it'd be great if a maintainer could update the [Docstring Guidelines](https://github.com/pytorch/pytorch/wiki/Docstring-Guidelines) to link directly to `https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings` and link to the instructions in `CONTRIBUTING.md`.\n\ncc @svekars @sekyondaMeta @AlannaBurke",
    "url": "https://github.com/pytorch/pytorch/issues/163789",
    "state": "open",
    "labels": [
      "module: docs",
      "triaged",
      "actionable"
    ],
    "created_at": "2025-09-24T20:24:43Z",
    "updated_at": "2025-09-26T22:34:16Z",
    "comments": 2,
    "user": "filipviz"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163785,
    "title": "Revisit guarding on unbacked inputs !",
    "body": "We generate guards on unbacked inputs now those are interesting, \n- some we do not need at all because they are side effects of torch.check calls\n- some are actually needed (striding properties that we did assert on ), shall we make them runtime assertions?\n\nThere are some examples in the tests [here](https://github.com/pytorch/pytorch/pull/163705/files), not sure yet what is the right solution. but here is some different examples\n\n### Example1 \nFor example u0<6 here should not be a guard.\n```\n\n        @torch.compile(fullgraph=True, dynamic=True, backend=cnt)\n        def func(a):\n            torch._check(a.size()[0] < 6)\n            return a * 10\n\n        a = torch.rand(4, 10)\n```\n### Example2\nbut what about something like\n```\n  @torch.compile(fullgraph=True, dynamic=True, backend=cnt)\n        def func(a):\n            return a*10\n\n           # no reocmpile if we pass 9, 8\n        # recompile if we pass 11\n        a = torch.rand(1,2,3,4,5)\n        torch._dynamo.decorators.mark_unbacked(a, 0)\n        torch._dynamo.decorators.mark_unbacked(a, 1)\n        torch._dynamo.decorators.mark_unbacked(a, 2)\n        torch._dynamo.decorators.mark_unbacked(a, 3)\n        torch._dynamo.decorators.mark_unbacked(a, 4)\n        func(a)\n```\nshall we guard or runtime assert on striding properties with unabacked\nex:\n L['a'].stride()[0] == L['a'].size()[1]*L['a'].size()[2]*L['a'].size()[3]*L['a'].size()[4]\n\n### Example3\nhere is another example is my expectation of what should happen right in it?\n```\n       def func(a):\n            # this should generate runtime assertio and no guard.\n            torch._check(a.size()[0] == a.size()[1])\n            # This should generate guard\n            torch._check(a.size()[0] < 10)\n            return a * 10\n\n\n        a = torch.rand(4,4)\n        torch._dynamo.decorators.mark_unbacked(a, 0)\n        torch._dynamo.mark_dynamic(a, 1)\n        func(a)\n\n        #should not no recompile(i think)\n        try :\n            func(torch.rand(4, 7))\n        except:\n            pass\n        # recompile (should recompile)\n        try :\n            func(torch.rand(100, 100))\n        except:\n            pass\n```\nwe recompile for both now.\n\n\n\ncc @chauhang @penguinwu @ezyang @bobrenjc93",
    "url": "https://github.com/pytorch/pytorch/issues/163785",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamic shapes"
    ],
    "created_at": "2025-09-24T19:17:35Z",
    "updated_at": "2025-10-29T22:58:35Z",
    "comments": 2,
    "user": "laithsakka"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1868,
    "title": "How to set the cache_dir in the Rust implementation?",
    "body": "Hey, thank you for your great work with these tokenizers. \n\nWhen I use the tokenizers through the Python API via transformers, I can set a specific cache_dir like this \n```\nfrom transformers import AutoTokenizer\nself.tokenizer = AutoTokenizer.from_pretrained(self.tokenizer_name,cache_dir = self.cache_dir)\n```\n\nHow can I do that in Rust? How can I print the default cache dir (in Rust)?",
    "url": "https://github.com/huggingface/tokenizers/issues/1868",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-24T18:50:38Z",
    "updated_at": "2025-10-06T04:25:46Z",
    "user": "sambaPython24"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12386,
    "title": "Implement missing features on ModularPipeline",
    "body": "as i'm looking to take advantage of new `ModularPipeline` ask is to implement some currently missing features\n\nmy use case is to convert existing loaded model using standard pipeline into modular pipeline. that functionality was provided via #11915 and is now working.\n\nfirst minor obstacle is that modular pipeline does not have defined params for execution\nin standard pipeline i can inspect `__call__` signature to see which are allowed params\ni currently work around this using\n`possible = [input_param.name for input_param in model.blocks.inputs]`\nplease advise if this is acceptable\n\nsecond one is that modular pipelines don't seem to implement normal callbacks at all (e.g. `callback_on_step_end_tensor_inputs`? at the minimum we need some kind of callback functionality to capture interim latents on each step\n\nthird is more cosmetic - modular pipeline does implement `set_progress_bar_config`, but its not doing anything as its not implement on actual block (tested with `StableDiffusionXLModularPipeline`)\n\ncc @yiyixuxu @DN6 @sayakpaul ",
    "url": "https://github.com/huggingface/diffusers/issues/12386",
    "state": "open",
    "labels": [
      "roadmap"
    ],
    "created_at": "2025-09-24T15:49:23Z",
    "updated_at": "2025-09-29T05:46:29Z",
    "comments": 0,
    "user": "vladmandic"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163761,
    "title": "Does device mesh of (N,1) cause all_gather communication in HSDP of FSDP2?",
    "body": "In HSDP of FSDP2, let's say I have N GPUs, if the shape of device mesh is (N,1) (similar to DDP), will all_gather communication still happen in forward/backward? Or is this device mesh shape illegitimate?\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @ezyang @msaroufim @dcci @chauhang @penguinwu",
    "url": "https://github.com/pytorch/pytorch/issues/163761",
    "state": "open",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2025-09-24T13:51:27Z",
    "updated_at": "2025-09-25T18:59:28Z",
    "comments": 1,
    "user": "EquationWalker"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163753,
    "title": "Invalid __shared__ read of size 16 bytes in torch.conv_transpose3d",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhen using `torch.nn.ConvTranspose3d` with certain parameters, a CUDA `__shared__` memory read out-of-bounds error occurs. \n\n```python\nimport torch\nimport torch.nn as nn\nimport os\n\nos.environ['CUDA_LAUNCH_BLOCKING'] = '1'\n\ndef main():\n    if not torch.cuda.is_available() or not torch.backends.cudnn.is_available():\n        print(\"This bug requires a CUDA-enabled GPU with cuDNN.\")\n        return\n\n    device = torch.device(\"cuda\")\n    dtype = torch.float32\n\n    try:\n        in_channels = 24\n        \n        model = nn.ConvTranspose3d(\n            in_channels=in_channels,\n            out_channels=1,\n            kernel_size=(15, 3, 10),\n            stride=(2, 1, 1),\n            padding=(23, 0, 1),\n            dilation=(1, 3, 3),\n            groups=1,\n            bias=False\n        ).to(device, dtype=dtype)\n        \n        model.eval()\n\n        input_shape = (1, in_channels, 24, 24, 24)\n        input_tensor = torch.randn(input_shape, device=device, dtype=dtype)\n\n        model(input_tensor)\n    except Exception as e:\n        print(f\"An unexpected error occurred: {e}\")\n        import traceback\n        traceback.print_exc()\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### How to Reproduce\n\n1.  Save the code above as `repro.py`.\n2.  Run the script using `compute-sanitizer`. The `Invalid __shared__ read` error will be reported.\n\n```bash\ncompute-sanitizer python repro.py\n```\n\n### Observed Results\n\n```\n========= COMPUTE-SANITIZER\n========= Invalid __shared__ read of size 16 bytes\n=========     at void xmma_cudnn_infer::implicit_gemm::strided_dgrad_indexed::kernel_helper_stage_1<xmma_cudnn_infer::implicit_gemm::strided_dgrad_indexed::Params_pre_hopper>(T1)+0x2710\n=========     by thread (255,0,0) in block (4,0,0)\n=========     Address 0x400 is out of bounds\n=========     Saved host backtrace up to driver entry point at kernel launch time\n=========         Host Frame:  [0x2631a7a] in libcudnn_cnn_infer.so.8\n=========         Host Frame:  [0x268da7a] in libcudnn_cnn_infer.so.8\n=========         Host Frame:  [0x21853e2] in libcudnn_cnn_infer.so.8\n=========         Host Frame:  [0x1928b9b] in libcudnn_cnn_infer.so.8\n=========         Host Frame: cudnn::cnn::infer::InferNdSubEngine<false, (cudnnTensorFormat_t)1, (cudnnTensorFormat_t)1, (cudnnTensorFormat_t)1, (cudnnDataType_t)0, true, 80, (cudnn::cnn::infer::subtree_t)1, cask_cudnn_infer::ConvolutionDgrad, cask_cudnn_infer::ShaderList<cask_cudnn_infer::ConvDgradShader, cask_cudnn_infer::ConvolutionDgrad>, cask_cudnn_infer::ConvDgradShader>::execute_internal_fprop_impl(cudnnContext*, CUstream_st*, void const*, void const*, void const*, void const*, void const*, void const*, unsigned long, void*, void*, unsigned int) [0x1215689] in libcudnn_cnn_infer.so.8\n=========         Host Frame: cudnn::cnn::infer::InferNdSubEngine<false, (cudnnTensorFormat_t)1, (cudnnTensorFormat_t)1, (cudnnTensorFormat_t)1, (cudnnDataType_t)0, true, 80, (cudnn::cnn::infer::subtree_t)1, cask_cudnn_infer::ConvolutionDgrad, cask_cudnn_infer::ShaderList<cask_cudnn_infer::ConvDgradShader, cask_cudnn_infer::ConvolutionDgrad>, cask_cudnn_infer::ConvDgradShader>::execute_internal_impl(cudnn::backend::VariantPack const&, CUstream_st*) [0x1215c7a] in libcudnn_cnn_infer.so.8\n=========         Host Frame: cudnn::cnn::EngineInterface::execute(cudnn::backend::VariantPack const&, CUstream_st*) [0xd8eb04] in libcudnn_cnn_infer.so.8\n=========         Host Frame: cudnn::cnn::EngineContainer<(cudnnBackendEngineName_t)1051>::execute_internal_impl(cudnn::backend::VariantPack const&, CUstream_st*) [0xdc94cf] in libcudnn_cnn_infer.so.8\n=========         Host Frame: cudnn::cnn::EngineInterface::execute(cudnn::backend::VariantPack const&, CUstream_st*) [0xd8eb04] in libcudnn_cnn_infer.so.8\n=========         Host Frame: cudnn::cnn::AutoTransformationExecutor::execute_pipeline(cudnn::cnn::EngineInterface&, cudnn::backend::VariantPack const&, CUstream_st*) const [0xf00e7d] in libcudnn_cnn_infer.so.8\n=========         Host Frame: cudnn::cnn::BatchPartitionExecutor::operator()(cudnn::cnn::EngineInterface&, cudnn::cnn::EngineInterface*, cudnn::backend::VariantPack const&, CUstream_st*) const [0xf00fc6] in libcudnn_cnn_infer.so.8\n=========         Host Frame: cudnn::cnn::GeneralizedConvolutionEngine<cudnn::cnn::EngineContainer<(cudnnBackendEngineName_t)1051> >::execute_internal_impl(cudnn::backend::VariantPack const&, CUstream_st*) [0xf0f7aa] in libcudnn_cnn_infer.so.8\n=========         Host Frame: cudnn::cnn::EngineInterface::execute(cudnn::backend::VariantPack const&, CUstream_st*) [0xd8eb04] in libcudnn_cnn_infer.so.8\n=========         Host Frame: cudnn::backend::execute(cudnnContext*, cudnn::backend::ExecutionPlan&, cudnn::backend::VariantPack&) [0xda3498] in libcudnn_cnn_infer.so.8\n=========         Host Frame: cudnnBackendExecute [0xda383c] in libcudnn_cnn_infer.so.8\n=========         Host Frame: at::native::run_conv_plan(cudnnContext*, at::Tensor const&, at::Tensor const&, at::Tensor const&, cudnn_fronten",
    "url": "https://github.com/pytorch/pytorch/issues/163753",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-24T11:33:17Z",
    "updated_at": "2025-09-26T01:22:04Z",
    "comments": 4,
    "user": "supermarkli"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1750,
    "title": "Inconsistent loss between different TP",
    "body": "### Bug description\n\nI have encountered different Inconsistent loss between different TP on both llama3 and llama4 moe model.\nThe toml configs are exactly the same except different tensor parallels.\nThe seed is set and deterministic is turned on.\n\ntensorboard:\n## llama4:\ngradnorm:\n\n<img width=\"1278\" height=\"460\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/f289b37a-b0cf-4de0-aa02-20c0a2af9522\" />\n\nloss:\n<img width=\"1266\" height=\"460\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/2b3e1245-5474-4c36-ab26-e2a76588363e\" />\n\n## llama3:\ngradnorm:\n<img width=\"1278\" height=\"460\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/76a51203-d1f0-46dd-b457-778f2001cb79\" />\nloss:\n<img width=\"1278\" height=\"460\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/0f42db79-0445-4ea7-b7b8-b361904d0eb7\" />\n\n\n\n\n\n\n\n### Versions\n\ntoml:\n\n```\n# torchtitan Config.toml\n\n[job]\ndump_folder = \"./outputs\"\ndescription = \"Llama 3 debug training\"\nprint_args = false\nuse_for_integration_test = true\n\n[profiling]\nenable_profiling = false\nsave_traces_folder = \"profile_trace\"\nprofile_freq = 10\nenable_memory_snapshot = false\nsave_memory_snapshot_folder = \"memory_snapshot\"\n\n[metrics]\nlog_freq = 1\ndisable_color_printing = false\nenable_tensorboard = true\nsave_tb_folder = \"tb\"\nenable_wandb = false\n\n[model]\nname = \"llama3\"\nflavor = \"debugmodel\"\n# test folder with tokenizer.json, for debug purpose only\nhf_assets_path = \"./tests/assets/tokenizer\"\n# converters = [\"float8\"]\n\n[optimizer]\nname = \"AdamW\"\nlr = 4e-3\neps = 1e-15\n\n[lr_scheduler]\nwarmup_steps = 2  # lr scheduler warm up, normally 20% of the train steps\ndecay_ratio = 0.8  # lr scheduler decay ratio, 80% of the train steps\ndecay_type = \"linear\"\nmin_lr_factor = 0.1\n\n[training]\nlocal_batch_size = 1\nglobal_batch_size = 64\nseq_len = 2048\nmax_norm = 1.0  # grad norm clipping\nsteps = 100000\ndataset_type = \"hf\"  # mmap for megatron style\ndataset = \"c4_test\"  # supported datasets: c4_test (2K), c4 (177M)\ndataset_path = \"3rdparty/torchtitan/tests/assets/c4_test\"\nseed = 1234\ndeterministic = true\n\n[parallelism]\ndata_parallel_replicate_degree = 1\ndata_parallel_shard_degree = -1\nfsdp_reshard_after_forward = \"default\" # default / never / always\ntensor_parallel_degree = {1 / 4}\nenable_async_tensor_parallel = false\npipeline_parallel_degree = 1\npipeline_parallel_schedule = \"1F1B\"\ncontext_parallel_degree = 1\nexpert_parallel_degree = 1\nexpert_tensor_parallel_degree = 1\n\n[checkpoint]\nenable_checkpoint = false\nfolder = \"checkpoint\"\ninterval = 10\nlast_save_model_only = false\nexport_dtype = \"float32\"\nasync_mode = \"disabled\"  # [\"disabled\", \"async\", \"async_with_pinned_mem\"]\n\n[activation_checkpoint]\nmode = \"none\"  # [\"none\", \"selective\", \"full\"]\nselective_ac_option = '2'  # 'int' = ac every positive int layer or 'op', ac based on ops policy\n\n[compile]\nenable=false\ncomponents = [\"model\", \"loss\"]\n\n[float8]\nenable_fsdp_float8_all_gather = false\nprecompute_float8_dynamic_scale_for_fsdp = false\nfilter_fqns = [\"output\", \"router.gate\"]\nmoe_fqns = [\"experts\"]\n```\n\ntorch version: 2.9.0+main.de744ca4b19.post20250818\ncuda: 12.4",
    "url": "https://github.com/pytorch/torchtitan/issues/1750",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-09-24T03:11:22Z",
    "updated_at": "2025-10-02T00:25:43Z",
    "user": "weixuansun"
  },
  {
    "repo": "huggingface/candle",
    "number": 3096,
    "title": "[Question] Minimal documentation/example on including weights in compiled executable",
    "body": "Just what the title says: Is there a minimal code example on including weights in the compiled executable using include_bytes. Nervous to implement this without understanding best practices and end up with a suboptimal solution.",
    "url": "https://github.com/huggingface/candle/issues/3096",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-24T02:47:28Z",
    "updated_at": "2025-10-07T04:49:26Z",
    "comments": 1,
    "user": "bitanath"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1749,
    "title": "What is the benefit of using torchrun instead of python directly with slurm and other launchers ?",
    "body": "Is there any difference in the following two commands ? \n\nsrun torchrun --nnodes 4 --nproc_per_node 8 --rdzv_endpoint \"$head_node_ip:29500\" -m torchtitan.train  ...\n\nMASTER_ADDR= ip-adress   MASTER_PORT=port-number srun --nodes=4 --ntasks-per-node=8  python -m torchtitan.train ",
    "url": "https://github.com/pytorch/torchtitan/issues/1749",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-23T23:35:08Z",
    "updated_at": "2025-09-26T18:05:51Z",
    "user": "githubsgi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163699,
    "title": "Should we mark `TestExportOpInfo.test_fake_export` tests as distributed?",
    "body": "### \ud83d\udc1b Describe the bug\n\n`TestExportOpInfo.test_fake_export` calls `_test_export_helper` \n\nhttps://github.com/pytorch/pytorch/blob/8c8416b021e59a5ec58aceb38eeffc63885a28bc/test/export/test_export_opinfo.py#L125-L133\n\nwhich sends tensor to `cuda:1`\n\nhttps://github.com/pytorch/pytorch/blob/8c8416b021e59a5ec58aceb38eeffc63885a28bc/test/export/test_export_opinfo.py#L80-L90\n\nYou can verify with this command on a machine with single GPU\n\n```\n$ python test/run_test.py -i export/test_export_opinfo --exclude-distributed-tests -- -k test_fake_export___radd___cpu_float32\n\nTraceback (most recent call last):\n  File \"/usr/local/lib/python3.12/dist-packages/torch/testing/_internal/common_device_type.py\", line 1135, in test_wrapper\n    return test(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/pytorch/pytorch/test/export/test_export_opinfo.py\", line 133, in test_fake_export\n    _test_export_helper(self, dtype, op)\n  File \"/opt/pytorch/pytorch/test/export/test_export_opinfo.py\", line 116, in _test_export_helper\n    ep = torch.export.export(m, args)\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/export/__init__.py\", line 311, in export\n    raise e\n  File \"/usr/local/lib/python3.12/dist-packages/torch/export/__init__.py\", line 277, in export\n    return _export(\n           ^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/export/_trace.py\", line 1177, in wrapper\n    raise e\n  File \"/usr/local/lib/python3.12/dist-packages/torch/export/_trace.py\", line 1143, in wrapper\n    ep = fn(*args, **kwargs)\n         ^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/export/exported_program.py\", line 124, in wrapper\n    return fn(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/export/_trace.py\", line 2269, in _export\n    ep = _export_for_training(\n         ^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/export/_trace.py\", line 1177, in wrapper\n    raise e\n  File \"/usr/local/lib/python3.12/dist-packages/torch/export/_trace.py\", line 1143, in wrapper\n    ep = fn(*args, **kwargs)\n         ^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/export/exported_program.py\", line 124, in wrapper\n    return fn(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/export/_trace.py\", line 2085, in _export_for_training\n    export_artifact = export_func(\n                      ^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/export/_trace.py\", line 1971, in _non_strict_export\n    ) = make_fake_inputs(\n        ^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/_export/non_strict_utils.py\", line 402, in make_fake_inputs\n    fake_args, fake_kwargs = tree_map_with_path(\n                             ^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/utils/_pytree.py\", line 2056, in tree_map_with_path\n    return treespec.unflatten(func(*xs) for xs in zip(*all_keypath_leaves))\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/utils/_pytree.py\", line 1193, in unflatten\n    leaves = list(leaves)\n             ^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/utils/_pytree.py\", line 2056, in <genexpr>\n    return treespec.unflatten(func(*xs) for xs in zip(*all_keypath_leaves))\n                              ^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/_export/non_strict_utils.py\", line 403, in <lambda>\n    lambda kp, val: fakify(\n                    ^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/_export/non_strict_utils.py\", line 232, in fakify\n    fake = mode.from_tensor(t, source=source, symbolic_context=symbolic_context)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/_subclasses/fake_tensor.py\", line 3004, in from_tensor\n    return self.fake_tensor_converter.from_real_tensor(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/_subclasses/fake_tensor.py\", line 404, in from_real_tensor\n    out = self.meta_converter(\n          ^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/_subclasses/meta_utils.py\", line 1922, in __call__\n    r = self.meta_tensor(\n        ^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/_subclasses/meta_utils.py\", line 1698, in meta_tensor\n    r = callback(\n        ^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/_subclasses/fake_tensor.py\", line 395, in mk_fake_tensor\n    return FakeTensor(\n           ^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/_subclasses/fake_tensor.py\", line 744, in __new__\n    init_gpu_context(device)\n  File \"/usr/local/lib/python3.12/dist-packages/torch/_subclasses",
    "url": "https://github.com/pytorch/pytorch/issues/163699",
    "state": "closed",
    "labels": [
      "module: tests",
      "oncall: pt2",
      "oncall: export"
    ],
    "created_at": "2025-09-23T22:12:42Z",
    "updated_at": "2025-09-30T16:12:42Z",
    "comments": 2,
    "user": "xwang233"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163690,
    "title": "Recomputed values for the following tensors have different metadata than during the forward pass.",
    "body": "### \ud83d\udc1b Describe the bug\n\nhi I have a model with linear layers which i wrap with LoRA layers applied as following \n\n\n\n```\n(attn): Attention(\n          (q_proj): LoRALinear(\n            (original_layer): Linear(in_features=4096, out_features=4096, bias=False)\n            (dropout): Identity()\n          )\n          (k_proj): LoRALinear(\n            (original_layer): Linear(in_features=4096, out_features=4096, bias=False)\n            (dropout): Identity()\n          )\n          (v_proj): LoRALinear(\n            (original_layer): Linear(in_features=4096, out_features=4096, bias=False)\n            (dropout): Identity()\n          )\n          (proj): LoRALinear(\n            (original_layer): Linear(in_features=4096, out_features=4096, bias=True)\n            (dropout): Identity()\n          )\n          (proj_drop): Dropout(p=0.0, inplace=False)\n        )\n```\n```\nclass LoRALinear(nn.Module):\n    def __init__(\n        self,\n        original_layer: nn.Linear,\n        rank: int,\n        init_lora_weights=\"gaussian\",\n        dropout: float = 0.0,\n    ):\n        super().__init__(\n            original_layer=original_layer,\n            rank=rank,\n            init_lora_weights=init_lora_weights,\n            dropout=dropout,\n        )\n        self.reset_weights(init_lora_weights)\n\n    def forward(self, x: torch.Tensor) -> torch.Tensor:\n        lora_x = self.dropout(x) @ self.lora_A @ self.lora_B\n        output = self.original_layer(x) + lora_x\n        return output\n```\n\n\ni wrap the model's linear layers with LoRA layers and then wrap the model blocks with FSDP2 and AC. see this error when i call backwards on the model. why would there be a mismatch here?how can i debug/solve this \n\n```\n[rank0]:     loss.backward()\n[rank0]:   File \"/usr/local/lib/python3.12/site-packages/torch/_tensor.py\", line 648, in backward\n[rank0]:     torch.autograd.backward(\n[rank0]:   File \"/usr/local/lib/python3.12/site-packages/torch/autograd/__init__.py\", line 353, in backward\n[rank0]:     _engine_run_backward(\n[rank0]:   File \"/usr/local/lib/python3.12/site-packages/torch/autograd/graph.py\", line 824, in _engine_run_backward\n[rank0]:     return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/usr/local/lib/python3.12/site-packages/torch/utils/checkpoint.py\", line 1128, in unpack_hook\n[rank0]:     frame.check_recomputed_tensors_match(gid)\n[rank0]:   File \"/usr/local/lib/python3.12/site-packages/torch/utils/checkpoint.py\", line 902, in check_recomputed_tensors_match\n[rank0]:     raise CheckpointError(\n[rank0]: torch.utils.checkpoint.CheckpointError: torch.utils.checkpoint: Recomputed values for the following tensors have different metadata than during the forward pass.\n[rank0]: tensor at position 58:\n[rank0]: saved metadata: {'shape': torch.Size([4096, 4096]), 'dtype': torch.bfloat16, 'device': device(type='cuda', index=0)}\n[rank0]: recomputed metadata: {'shape': torch.Size([1, 4096, 4096]), 'dtype': torch.bfloat16, 'device': device(type='cuda', index=0)}\n```\n\n### Versions\n\n[rank0]: saved metadata: {'shape': torch.Size([4096, 4096]), 'dtype': torch.bfloat16, 'device': device(type='cuda', index=0)}\n[rank0]: recomputed metadata: {'shape': torch.Size([1, 4096, 4096]), 'dtype': torch.bfloat16, 'device': device(type='cuda', index=0)}\n\ncc @soulitzer",
    "url": "https://github.com/pytorch/pytorch/issues/163690",
    "state": "closed",
    "labels": [
      "needs reproduction",
      "module: activation checkpointing",
      "triaged"
    ],
    "created_at": "2025-09-23T21:21:49Z",
    "updated_at": "2025-09-24T01:04:09Z",
    "comments": 3,
    "user": "asahni-sc"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163688,
    "title": "[torch.distributed.pipelining] Gradients are None in first training step with ScheduleGPipe",
    "body": "## Bug Description\n\nWhen using `torch.distributed.pipelining` with `ScheduleGPipe`, gradients are unexpectedly `None` for parameters _in the first training step only_, and appear correctly in subsequent steps. This occurs despite the forward pass completing and losses computed. \n\nThis is leading to a significant divergence compared to non pipeline-parallel execution, beyond what is explainable by float and slicing numerical error, e.g. stalled and irrecoverable convergence.\n\n## To Reproduce\n\n1. Save the provided script as `repro.py`\n2. Run with 4 GPUs: `torchrun --nproc_per_node=4 repro.py`\n3. Observe the output showing gradients are None in step 0 but present in steps 1-2\n\n### Expected behavior\n\nGradients should be computed and available for all parameters after the backward pass in every training step, including the first one. The pipeline schedule should handle gradient accumulation consistently across all steps.\n\n### Actual behavior\n\nStep 0: All parameters have grad=None despite successful forward/backward pass\nStep 1-2: Gradients are properly computed and available (non-None)\n\n#### Example Output\n\n```\nExample output:\nRank 3, step: 0/3, losses list: [tensor(10.3931, device='cuda:3', dtype=torch.bfloat16), ...]\nRank 0 Step 0:\n{'embed_tokens.weight': None, 'layers.0.norm1.bias': None, ...}\n...\nRank 0 Step 1:\n{'embed_tokens.weight': '1.41e+02',\n 'layers.0.norm1.bias': '9.46e-01',\n 'layers.0.norm1.weight': '1.90e+00',\n ...}\n```\n\n**Minimal reproducible example:**\n\nThis example: \n\n1. Uses a simple transformer model split into 4 stages\n2. Each stage has 3 transformer layers\n3. Uses standard ScheduleGPipe with 4 microbatches\n4. Demonstrates the issue clearly with gradient norm printing: **why are first step grads None across all ranks?**\n\n```python\nimport torch\nimport torch.nn as nn\nimport torch.distributed as dist\nfrom torch.distributed.pipelining import PipelineStage, ScheduleGPipe\nimport os\nimport pprint\n\n\nclass TransformerStage(nn.Module):\n    def __init__(self, hidden_size=1536, num_layers=3, vocab_size=32000, stage_index=0, num_stages=4):\n        super().__init__()\n        self.stage_index = stage_index\n        self.num_stages = num_stages\n        \n        if stage_index == 0:\n            self.embed_tokens = nn.Embedding(vocab_size, hidden_size)\n        \n        self.layers = nn.ModuleList([\n            nn.TransformerEncoderLayer(\n                hidden_size, \n                nhead=12,\n                dim_feedforward=5440,\n                batch_first=True\n            )\n            for _ in range(num_layers)\n        ])\n        \n        if stage_index == num_stages - 1:\n            self.lm_head = nn.Linear(hidden_size, vocab_size, bias=False)\n    \n    def forward(self, x):\n        if hasattr(self, 'embed_tokens'):\n            x = self.embed_tokens(x)\n        \n        for layer in self.layers:\n            x = layer(x)\n        \n        if hasattr(self, 'lm_head'):\n            x = self.lm_head(x)\n        \n        return x\n\n\ndef create_pipeline_loss_fn():\n    def loss_fn(logits, labels):\n        logits = logits.float()\n        \n        labels = nn.functional.pad(labels, (0, 1), value=-100)\n        shift_labels = labels[..., 1:].contiguous()\n        \n        vocab_size = logits.size(-1)\n        logits = logits.view(-1, vocab_size)\n        shift_labels = shift_labels.view(-1)\n        \n        return nn.functional.cross_entropy(logits, shift_labels, ignore_index=-100)\n    \n    return loss_fn\n\n\ndef main():\n    torch.manual_seed(0)\n    torch.cuda.manual_seed_all(0)\n\n    global_rank = int(os.environ['RANK'])\n    world_size = int(os.environ['WORLD_SIZE'])\n    local_rank = int(os.environ['LOCAL_RANK'])\n    \n    dist.init_process_group(\n        backend=\"nccl\",\n        rank=global_rank,\n        world_size=world_size,\n        device_id=torch.device(f\"cuda:{local_rank}\"),\n    )\n    \n    pp_degree = 4\n    assert world_size == pp_degree\n    \n    device = torch.device(f\"cuda:{local_rank}\")\n    torch.cuda.set_device(device)\n    \n    config = {\n        'batch_size': 4,\n        'micro_batch_size': 1,\n        'sequence_length': 512,\n        'hidden_size': 1536,\n        'vocab_size': 32000,\n        'num_layers_per_stage': 3,\n    }\n    \n    pp_rank = global_rank\n    \n    stage_model = TransformerStage(\n        hidden_size=config['hidden_size'],\n        num_layers=config['num_layers_per_stage'],\n        vocab_size=config['vocab_size'],\n        stage_index=pp_rank,\n        num_stages=pp_degree\n    ).to(device)\n    \n    if global_rank == 0:\n        print(f\"Pipeline setup: {pp_degree} stages, {config['num_layers_per_stage']} layers per stage\")\n    \n    pipeline_stage = PipelineStage(\n        stage_model,\n        stage_index=pp_rank,\n        num_stages=pp_degree,\n        device=device,\n    )\n    \n    n_microbatches = config['batch_size'] // config['micro_batch_size']\n    \n    pipeline_schedule = ScheduleGPipe(\n        stage=pipeline_stage,\n        n_microbatches=n_microbatches,\n        loss_fn=create_pipeline_loss_fn(),\n        scale_gr",
    "url": "https://github.com/pytorch/pytorch/issues/163688",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "has workaround",
      "module: amp (automated mixed precision)",
      "module: pipelining"
    ],
    "created_at": "2025-09-23T21:03:37Z",
    "updated_at": "2025-09-26T14:36:14Z",
    "comments": 2,
    "user": "tplr-y"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163684,
    "title": "PyTorch 2.8 + CUDA 12.8 fails to initialize on RTX 5090 (WinError 1114)",
    "body": "### \ud83d\udc1b Describe the bug\n\nSummary\nAttempting to run a source-built PyTorch 2.8.0 against CUDA 12.8 with explicit sm_120 flags on RTX 5090 results in a DLL initialization failure:\n\nCode\nOSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed.\nError loading \"torch_cpu.dll\" or one of its dependencies.\nSystem Info\nGPU: RTX 5090\n\nCUDA: 12.8 (confirmed installed and functional)\n\nPyTorch: 2.8.0 (source build)\n\nPython: 3.10.11\n\nOS: Windows 11 x64\n\nBuild flags:\n\nTORCH_CUDA_ARCH_LIST=8.6;9.0;12.0\n\nVerified sm_120 kernels are present in ptx and fatbin sections\n\nWhat\u2019s been tried\n\u2705 Verified all DLLs in torch/lib using Dependencies.exe\n\n\u2705 Rebuilt torch_cpu.dll and shm.dll from source\n\n\u2705 Manually validated libomp140.x86_64.dll and other runtime dependencies\n\n\u2705 Renamed crashing DLLs to isolate failure\n\n\u2705 Confirmed failure occurs inside DllMain or static constructor\n\n\u2705 Attempted fallback to nightly builds\u2014same result\n\nObservations\ntorch_cpu.dll loads cleanly in Dependencies.exe but crashes during runtime\n\ntorch_cuda.dll depends on torch_cpu.dll, so exclusion breaks CUDA backend\n\nNo missing dependencies reported\u2014failure is internal to DLL initialization\n\nNo exports visible in torch_cpu.dll, suggesting static init or device registration failure\n\nRequest\nLooking for:\nConfirmation of RTX 5090 support in PyTorch 2.8+\nKnown workarounds or patches for sm_120 initialization\nGuidance on isolating DllMain crash or bypassing CPU backend for CUDA-only workflows\n\n### Versions\n\n(venv) PS D:\\Projects\\python\\pytorch-src> python tools\\collect_env.py\nCollecting environment information...\nPyTorch version: N/A\nIs debug build: N/A\nCUDA used to build PyTorch: N/A\nROCM used to build PyTorch: N/A\n\nOS: Microsoft Windows 11 Pro (10.0.26100 64-bit)\nGCC version: Could not collect\nClang version: Could not collect\nCMake version: version 4.1.0\nLibc version: N/A\n\nPython version: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)\nPython platform: Windows-10-10.0.26100-SP0\nIs CUDA available: N/A\nCUDA runtime version: 12.8.61\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 5090\nNvidia driver version: 581.29\ncuDNN version: Could not collect\nIs XPU available: N/A\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: N/A\n\nCPU:\nName: AMD Ryzen 9 9950X 16-Core Processor\nManufacturer: AuthenticAMD\nFamily: 107\nArchitecture: 9\nProcessorType: 3\nDeviceID: CPU0\nCurrentClockSpeed: 4300\nMaxClockSpeed: 4300\nL2CacheSize: 16384\nL2CacheSpeed: None\nRevision: 17408\n\nVersions of relevant libraries:\n[pip3] numpy==2.2.6\n[pip3] optree==0.17.0\n[pip3] torch==2.10.0a0+gitunknown\n[conda] Could not collect\n(venv) PS D:\\Projects\\python\\pytorch-src>",
    "url": "https://github.com/pytorch/pytorch/issues/163684",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-23T20:31:52Z",
    "updated_at": "2025-09-23T22:16:59Z",
    "comments": 2,
    "user": "tsondo"
  },
  {
    "repo": "huggingface/optimum-executorch",
    "number": 149,
    "title": "Add documentation for how to run each type of exported model on ExecuTorch",
    "body": "Blocked on runner / multimodal runner work in ExecuTorch",
    "url": "https://github.com/huggingface/optimum-executorch/issues/149",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-23T18:53:55Z",
    "updated_at": "2025-09-23T18:54:00Z",
    "user": "jackzhxng"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163664,
    "title": "[BE] Add Linux aarch64 CUDA install and test to validation framework",
    "body": "### \ud83d\udc1b Describe the bug\n\nCurrently https://github.com/pytorch/test-infra/blob/main/.github/workflows/validate-aarch64-linux-binaries.yml only validates Linu aarch64 CPU builds. \nThese workflows are launched via validate-binaries. Here is an example of run: https://github.com/pytorch/test-infra/actions/runs/17628169416\nIn the past aarch64 GPU builds where not validated since we have not had any hardware for aarch64 GPU and these builds where prototype. At the moment we don't have any aarch64 GPU hardware however would be required to validate now.\n\nWe need to validate also aarch64 GPU builds so that at least install works and CPU mode works for these builds.\n\nInstallation is same as Linux x86 builds:\n```\npip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu130\npip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128\npip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu126\n```\n\nBefore running smoke test set: ``MATRIX_GPU_ARCH_TYPE=cpu``\nHere is smoke test for reference\nhttps://github.com/pytorch/pytorch/blob/main/.ci/pytorch/smoke_test/smoke_test.py\n\n### Versions\n\n2.9.0\n\ncc @seemethere @malfet @ptrblck @msaroufim @eqy @jerryzh168",
    "url": "https://github.com/pytorch/pytorch/issues/163664",
    "state": "closed",
    "labels": [
      "module: binaries",
      "module: cuda",
      "triaged",
      "better-engineering",
      "topic: binaries"
    ],
    "created_at": "2025-09-23T17:00:27Z",
    "updated_at": "2025-10-01T14:19:45Z",
    "comments": 0,
    "user": "atalman"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163659,
    "title": "Allow double in native_functions.yaml as a schema type",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nToday, our schemas say \"float\" but that is a lie!! Internally we pass around doubles. I'm okay with this though.\n\nMy ask: can we allow schemas to say \"double\", so for user custom ops they can put \"double\" in the schema and double in their custom kernels and be less confused?\n\nToday, custom ops writers have `double` in their kernels but put `float` in the schema cuz they have to.\n\nTriggered from https://github.com/pytorch/pytorch/pull/163505/files#r2372832280\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @malfet @zou3519 @anjali411 @chauhang @penguinwu @bdhirsh @ezyang ",
    "url": "https://github.com/pytorch/pytorch/issues/163659",
    "state": "open",
    "labels": [
      "module: cpp-extensions",
      "triaged",
      "module: dispatch",
      "module: library",
      "oncall: pt2",
      "module: pt2-dispatcher"
    ],
    "created_at": "2025-09-23T16:27:39Z",
    "updated_at": "2025-09-24T18:45:19Z",
    "comments": 2,
    "user": "janeyx99"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 653,
    "title": "`get_slice` is slow because it uses `tensors()` method instead of `info()`",
    "body": "### Feature request\n\nReplace \n```rust\nself.metadata.tensors().get(name)\n```\nwith\n```rust\nself.metadata.info(name)\n```\nin `get_slice` method\n\n### Motivation\n\nI noticed that the `get_slice` method of `Open` [does](https://github.com/huggingface/safetensors/blob/0816a1ae1d6b731cefd67f061d80d1cadd0dd7bb/bindings/python/src/lib.rs#L851)  \n```rust\nself.metadata.tensors().get(name)\n````\ninstead of\n```rust\nself.metadata.info(name)\n```\nlike `get_tensor()` [does](https://github.com/huggingface/safetensors/blob/0816a1ae1d6b731cefd67f061d80d1cadd0dd7bb/bindings/python/src/lib.rs#L638) when retrieving `TensorInfo` by name.\n\nBecause of this, `get_slice` is much slower, since the `tensors()` method [reconstructs](https://github.com/huggingface/safetensors/blob/0816a1ae1d6b731cefd67f061d80d1cadd0dd7bb/safetensors/src/tensor.rs#L633) a new `HashMap` on each call.\n\nIs there any particular reason for this approach? Would it be possible to replace it with `self.metadata.info(name)` to improve performance?\n\n\n### Your contribution\n\nI do not mind doing a PR",
    "url": "https://github.com/huggingface/safetensors/issues/653",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-23T15:09:51Z",
    "updated_at": "2025-09-28T16:42:45Z",
    "comments": 1,
    "user": "PgLoLo"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12375,
    "title": "What kernels should we integrate in Diffusers?",
    "body": "Now that we have an [integration](https://github.com/huggingface/diffusers/pull/12236) with the `kernels` lib to use Flash Attention 3 (FA3), it'd be nice to gather community interest about which kernels we should try to incorporate in the library through the [`kernels` lib](https://github.com/huggingface/kernels/). FA3 delivers a significant speedup on Hopper GPUs.\n\nI have done some work in the `kernelize` branch to see if replacing `GELU`, `SiLU`, and `RMSNorm` with their optimized kernels would have any speedups on Flux. So far, it hasn't had any. Benchmarking script: https://gist.github.com/sayakpaul/35236dd96e15d9f7d658a7ad11918411. One can compare the changes here: https://github.com/huggingface/diffusers/compare/kernelize?expand=1. \n\n> [!NOTE]\n> The changes in the `kernelize` branch are quite hacky as we're still evaluating things.\n\nPlease use this issue to let us know which kernels we should try to support in Diffusers. Some notes to keep in mind:\n\n* Layers where the `forward()` method is easily replaceable with the `kernelize()` [mechanism](https://github.com/huggingface/kernels/blob/main/docs/source/layers.md#kernelizing-a-model) would be prioritized. A reference is here: https://github.com/huggingface/transformers/pull/38205. \n* Even if a kernel isn't directly compatible with `kernels`, we can try to make it so, like we have for https://huggingface.co/kernels-community/flash-attn3.\n* Not all kernels contribute non-trivial gains in terms of speedup. So, please bear that in mind when proposing a kernel.\n\nCc: @MekkCyber",
    "url": "https://github.com/huggingface/diffusers/issues/12375",
    "state": "open",
    "labels": [
      "performance"
    ],
    "created_at": "2025-09-23T09:03:13Z",
    "updated_at": "2025-09-30T06:56:39Z",
    "comments": 8,
    "user": "sayakpaul"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163624,
    "title": "[aoti] [xpu] [null-pointer-deference] potential npt issue in `sycl_runtime_wrappers.h`",
    "body": "### \ud83d\udc1b Describe the bug\n\nCode below in `sycl_runtime_wrappers.h` uses malloc to allocate the memory. \nhttps://github.com/pytorch/pytorch/blob/5d749ceb92c2c28bcfbdf918b4ab99b1a91fcb50/torch/csrc/inductor/aoti_runtime/sycl_runtime_wrappers.h#L45-L58\nHowever, there is a potential risk that the memory allocation fails. Then, maybe `strLog` is a `nullptr`? A possible fix is to add a `NPD check` here.\n\nTo be honest, I don't know how to draft a test to trigger this case, so I opened an issue to discuss this instead of sending a PR directly.\n\nFeel free to correct me if i am wrong.\n\n### Versions\n\nnone\n\ncc @chauhang @penguinwu @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4 @desertfire @chenyang78 @yushangdi @benjaminglass1",
    "url": "https://github.com/pytorch/pytorch/issues/163624",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "oncall: export",
      "module: aotinductor"
    ],
    "created_at": "2025-09-23T08:24:03Z",
    "updated_at": "2025-09-23T16:02:18Z",
    "comments": 4,
    "user": "shaoyuyoung"
  },
  {
    "repo": "huggingface/peft",
    "number": 2798,
    "title": "Add stricter type checking in LoraConfig for support with HfArgumentParser",
    "body": "### System Info\n\nSystem Info\ntransformers version: 4.57.0.dev0\nPlatform: Linux-5.14.0-284.73.1.el9_2.x86_64-x86_64-with-glibc2.39\nPython version: 3.12.3\nHuggingface_hub version: 0.34.4\nSafetensors version: 0.5.2\nAccelerate version: 1.10.1\nAccelerate config: not found\nDeepSpeed version: not installed\nPyTorch version (accelerator?): 2.8.0+cu128 (CUDA)\nTensorflow version (GPU?): not installed (NA)\nFlax version (CPU?/GPU?/TPU?): not installed (NA)\nJax version: not installed\nJaxLib version: not installed\nUsing distributed or parallel set-up in script?: No\nUsing GPU in script?: No\nGPU type: NVIDIA A100-SXM4-80GB\npeft version: 0.17.1\n\n### Who can help?\n\n@benjaminbossan @githubnemo \n\n### Reproduction\n\n```\nfrom peft import LoraConfig\nfrom transformers import HfArgumentParser\n\np = HfArgumentParser(dataclass_types=LoraConfig) # fails\n```\n\n### Expected behavior\n\nI would expect LoraConfig to be supported by HfArgumentParser.\nAs I understand, this fails because HfArgumentParser does not support fields of type (`Optional[List[str], str]`).\n\nI had raised this in transformers as well, please refer [here](https://github.com/huggingface/transformers/issues/40915).\n\nCan we add stricter type checking for such fields so it can be easily integrated with other libraries and argument parsers?",
    "url": "https://github.com/huggingface/peft/issues/2798",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-23T05:19:34Z",
    "updated_at": "2025-09-23T12:37:47Z",
    "comments": 3,
    "user": "romitjain"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163576,
    "title": "GPU Performance in Modern Computing",
    "body": "### Release highlight for proposed Feature\n\nCould you please review the PyTorch library and determine if performance evaluation tests would be helpful? https://github.com/pytorch/pytorch/pull/162107\n\nGPU Performance in Modern Computing\n\nIn the realm of artificial intelligence and supercomputing, GPUs play a pivotal role as accelerators driving innovation in hyperscaled data centers. But how does the computational speed of GPUs compare to CPUs? A performance test was conducted comparing the efficiency of CPU versus GPU on an Apple Mac M4, revealing intriguing insights.\n\nKey Insight:\nA significant performance shift occurs around the ~1500x1500 matrix size. An adaptive approach to the device selection could successfully build the model architecture. A hybrid approach of CPU for small operations and GPU for large operations could optimize the performance advantages of the devices.\n\nCPU Superiority (Smaller Matrices):\nFor matrix sizes up to 1000x1000, CPUs outperform GPUs by 2-4 times. This is attributed to the overhead of GPU initialization surpassing its computational benefits. For instance, in a scenario with 500x500 matrices, CPUs performed 3.5 times faster than GPUs.\n\nGPU Dominance (Medium and Larger Matrices):\nAs matrix sizes exceed 2000x2000, GPUs outperform CPUs by 2-2.3 times. The parallel computational advantages of GPUs prove superior, overcoming the initial costs. As an example for 4000x4000 matrices, GPUs were 2.2 times faster than CPUs.\n\nImplications for Business:\n\nCPU Applications: Ideal for small-scale tasks like rapid prototyping, edge devices, and small batch inference because of the cost efficiency and immediate execution without warmup. The smaller data sets cache efficiently without memory transfers.\nGPU Applications: Suited for operations that optimize the performance advantages of the devices such as training, batch processing, and production inference. The throughput advantage is 2-3 times speed.\nAdd comprehensive benchmarking tools for matrix operations and neural networks\nInclude device detection for CUDA, MPS, and CPU\nProvide proper GPU synchronization and timing\nAdd complete unit test suite with device-specific tests\nInclude automated test runner script\nAdd detailed documentation and contribution guide\nFeatures:\n\nCross-platform device support (CUDA/MPS/CPU)\nModular, extensible design with type hints\nComprehensive error handling and reporting\nEducational examples for proper GPU benchmarking\nNo breaking changes to existing PyTorch functionality\n\n### Point(s) of contact\n\n_No response_\n\n### Release Mode (pytorch/pytorch features only)\n\nIn-tree\n\n### Out-Of-Tree Repo\n\n_No response_\n\n### Description and value to the user\n\n_No response_\n\n### Link to design doc, GitHub issues, past submissions, etc\n\n_No response_\n\n### What feedback adopters have provided\n\n_No response_\n\n### Plan for documentations / tutorials\n\nTutorial exists\n\n### Additional context for tutorials\n\n_No response_\n\n### Marketing/Blog Coverage\n\nYes\n\n### Are you requesting other marketing assistance with this feature?\n\n_No response_\n\n### Release Version\n\n_No response_\n\n### OS / Platform / Compute Coverage\n\n_No response_\n\n### Testing Support (CI, test cases, etc..)\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/163576",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2025-09-22T22:21:49Z",
    "updated_at": "2025-09-29T17:16:02Z",
    "comments": 7,
    "user": "alpha-investor"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1735,
    "title": "For mixed-precision training, does FSDP2 also need `amp.grad_scaler.GradScaler` ? or is FSDP2 already handled?",
    "body": "In mixed-precision training of DDP, `amp.grad_scaler.GradScaler`  is needed to dynamically scale the loss. I see that torchtitan do not use it to scale loss in FSDP2, so my question is does FSDP2 also need `amp.grad_scaler.GradScaler` ? or is FSDP2 already handled?",
    "url": "https://github.com/pytorch/torchtitan/issues/1735",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-09-22T15:05:37Z",
    "updated_at": "2025-09-24T20:12:20Z",
    "user": "EquationWalker"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163519,
    "title": "For mixed-precision training, does FSDP2 also need `amp.grad_scaler.GradScaler` ? or is FSDP2 already handled?",
    "body": "In mixed-precision training of DDP, `amp.grad_scaler.GradScaler`  is needed to dynamically scale the loss, my question is does FSDP2 also need `amp.grad_scaler.GradScaler` ? or is FSDP2 already handled?\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @ezyang @msaroufim @dcci",
    "url": "https://github.com/pytorch/pytorch/issues/163519",
    "state": "closed",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2025-09-22T15:01:43Z",
    "updated_at": "2025-09-29T08:19:23Z",
    "comments": 11,
    "user": "EquationWalker"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1995,
    "title": "Questions about SmolVLA design",
    "body": "Hi! I am looking into the details of SmolVLA implementation, and got some questions.\n\nI wonder the following points are necessary, or beneficial for the performance.\n\n\n1.\nhttps://github.com/huggingface/lerobot/blob/f7283193ea9ae932423e3a1e27524a27fa5c0fe5/src/lerobot/policies/smolvla/smolvlm_with_expert.py#L354C63-L354C74\n\nIn the cross-attention layer, the VLM keys and values are linear-projected before the attention interface.\n\nThey have compatible shape without the projection, and ROPE is not applied after the projection (although ROPE is applied in the VLM part, interaction between the ROPEd queries and projected keys might not work as rotation?)\n\n\n2.\nhttps://github.com/huggingface/lerobot/blob/f7283193ea9ae932423e3a1e27524a27fa5c0fe5/src/lerobot/policies/smolvla/modeling_smolvla.py#L566\n\nhttps://github.com/huggingface/lerobot/blob/f7283193ea9ae932423e3a1e27524a27fa5c0fe5/src/lerobot/policies/smolvla/modeling_smolvla.py#L592C1-L593C1\n\nimage and text embeddings are multiplied by `sqrt(dim)` before they are fed to the llm and expert layers.\n\nI could not find the same multiplication in SmolVLM modeling (https://github.com/huggingface/transformers/blob/main/src/transformers/models/smolvlm/modeling_smolvlm.py)\n\nI guess that this multiplication might change the distribution of image-text features.\n\n3.\nSmolVLM and SmolVLA are trained with different ROPE max frequency.\n\nIt seems like SmolVLM is trained with 100_000, and SmolVLA is trained with 10_000.\n\n4.\nIt seems like SmolVLM uses causal mask for all LLM layers. (no bidirectional attention for images)\n\nSmolVLA uses similar mask with PI0 (paligemma).\n",
    "url": "https://github.com/huggingface/lerobot/issues/1995",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-09-22T11:53:01Z",
    "updated_at": "2025-10-17T01:58:12Z",
    "user": "gliese581gg"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1994,
    "title": "How to improve success rate and generalization",
    "body": "Hi, I have one question regarding the success rate, if I ensure the object appears in the frame of wrist camera at the beginning of dataset collection/inference, will this lead to higher success rate for pick and place task?\n\nMy initial attempt was object appears in the side view camera but does not appear in the wrist camera at the initial point/ beginning of dataset collection/inference.\n\n**Should I ensure object appears in both side view camera and wrist camera at the starting point of program?**",
    "url": "https://github.com/huggingface/lerobot/issues/1994",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-09-22T09:55:53Z",
    "updated_at": "2025-09-23T09:26:16Z",
    "user": "Liu9999ai"
  },
  {
    "repo": "pytorch/ao",
    "number": 3040,
    "title": "IntWeightonly quantized model slower than default model ( x86 machine, A100)",
    "body": "My Int4WeightOnly quantized model is slower and more inaccurate in OCR as compared to the default model. Why is this happening?\nHere is some info to help you guys\n\nModel - Qwen2-VL-7B-Instruct fine-tuned and saved in 16bit using unsloth\nGPU - \n\n<img width=\"679\" height=\"265\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/8bcceaa8-569f-4dfa-bb67-267f5e82634b\" />\n\n\ncode - \n```\nfrom unsloth import FastVisionModel\nimport torch\nfrom PIL import Image\nimport os\nfrom jiwer import wer, cer\nimport glob\nfrom tqdm import tqdm\nimport pandas as pd\n\n\n# Model paths\nadapter_path = \"qwen2-ocr\"\nckpt_no = adapter_path.split(\"/\")[-1]\n\n# Load both models\nfrom transformers import AutoProcessor, AutoModelForVision2Seq\nfrom transformers import AutoConfig,TorchAoConfig\nfrom torchao.quantization import Int4WeightOnlyConfig\n\nconfig = AutoConfig.from_pretrained(adapter_path)\nquant_config = Int4WeightOnlyConfig(group_size=128)\nquantization_config = TorchAoConfig(quant_type=quant_config)\n\n\nquantized_model = AutoModelForVision2Seq.from_pretrained(\n    adapter_path,\n    config=config,\n    torch_dtype=\"auto\",\n    device_map=\"auto\",\n    quantization_config=quantization_config  \n)\n\nprocessor = AutoProcessor.from_pretrained(adapter_path)\n\n\n# Instructions\ninstruction_ft = \"Perform OCR\"\n# Directory paths\nimage_dir = \"images\"\ngolden_text_dir = \"texts\"\noutput_dir = f\"qwen-torchao-int4weight\"\n\n# Create output directory if it doesn't exist\nos.makedirs(output_dir, exist_ok=True)\n\n# Get all image files\nimage_files = glob.glob(os.path.join(image_dir, \"*.jpg\"))\n\n# Initialize results storage\nresults = []\n\n# Process images in batches\nBATCH_SIZE = 32  # Adjust based on your GPU memory\ntotal_images = len(image_files)\npbar = tqdm(total=total_images, desc=\"Processing images\")\n\nfor i in range(0, len(image_files), BATCH_SIZE):\n    batch_size = min(BATCH_SIZE, len(image_files) - i)  # Handle the last batch correctly\n    batch_image_paths = image_files[i:i+BATCH_SIZE]\n    batch_images = []\n    batch_image_names = []\n    batch_actuals = []\n    \n    # Prepare batch data\n    for image_path in batch_image_paths:\n        image_name = os.path.basename(image_path)\n        batch_image_names.append(image_name)\n        \n        try:\n            # Load image\n            image = Image.open(image_path)\n            batch_images.append(image)\n            \n            # Load ground truth text\n            text_file = os.path.join(golden_text_dir, image_name.replace(\".jpg\", \".txt\"))\n            try:\n                with open(text_file, 'r', encoding='utf-8') as txt_file:\n                    actual = txt_file.readlines()[0].strip()\n                    batch_actuals.append(actual)\n            except FileNotFoundError:\n                print(f\"Warning: Ground truth file not found for {image_name}, skipping evaluation\")\n                batch_actuals.append(None)\n        except Exception as e:\n            print(f\"Error loading {image_name}: {str(e)}\")\n            batch_images.append(None)\n            batch_actuals.append(None)\n    \n    # Filter out None values\n    valid_indices = [idx for idx, img in enumerate(batch_images) if img is not None]\n    if not valid_indices:\n        continue\n    \n    valid_images = [batch_images[idx] for idx in valid_indices]\n    valid_image_names = [batch_image_names[idx] for idx in valid_indices]\n    valid_actuals = [batch_actuals[idx] for idx in valid_indices]\n    \n    try:\n        # Prepare batch messages\n        batch_messages = []\n        for image in valid_images:\n            messages = [\n                {\"role\": \"user\", \"content\": [\n                    {\"type\": \"image\"},\n                    {\"type\": \"text\", \"text\": instruction_ft}\n                ]}\n            ]\n            batch_messages.append(messages)\n        \n        # Process batch using Hugging Face's batched inference approach\n        texts = [\n            processor.apply_chat_template(msg, add_generation_prompt=True)\n            for msg in batch_messages\n        ]\n        \n        # Create batch inputs\n        batch_inputs = processor(\n            valid_images,\n            texts,\n            add_special_tokens=False,\n            padding=True,\n            return_tensors=\"pt\",\n        ).to(\"cuda\")\n        \n        # Generate outputs in batch\n        batch_outputs = quantized_model.generate(\n            **batch_inputs,\n            use_cache=True, \n            temperature=0.5, \n            min_p=0.1,\n            max_new_tokens=1024\n        )\n        \n        # Process batch outputs\n        input_lengths = [batch_inputs[\"input_ids\"][i].shape[0] for i in range(len(valid_images))]\n        \n        for idx, (image_name, actual, input_length) in enumerate(zip(valid_image_names, valid_actuals, input_lengths)):\n            generated_response = processor.tokenizer.decode(batch_outputs[idx][input_length:], skip_special_tokens=True)\n            \n            # Calculate metrics if ground truth is available\n            if actual is not None:\n                ft_word_error = wer(generated_response",
    "url": "https://github.com/pytorch/ao/issues/3040",
    "state": "open",
    "labels": [
      "quantize_",
      "triaged"
    ],
    "created_at": "2025-09-22T06:53:54Z",
    "updated_at": "2025-10-01T11:10:42Z",
    "comments": 5,
    "user": "Rakshith12-pixel"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1733,
    "title": "Gradient accumulation broken in PP",
    "body": "### Bug description\n\nUsing gradient accumulation is incompatible with PipleineSchedule(..., scale_grads=True) option, which defaults to True.\n\nWhen this option is set, at each step, all gradients are scaled by the micro-batch size. This works fine for a single gradient accumulation step, but when using multiple steps, this will rescale the total gradient by this factor, not just at the end of gradient accumulation.\n\nThe result is that the accumulated gradient is an exponential moving average, rather than a sum. Overall, the resulting gradients are much smaller than they should be and using gradient accumulation with PP is not equivalent to using it without PP -- the loss curves diverge substantially, as well as the gradient-norms are way off.\n\nA secondary consequence is that at every step, it divides the gradients by n_microbatches, which is computationally expensive when applied to a large model.\n\nI identified the same issue in my own pipeline trainer implementation a week or two ago. When checking how Torch Titan addressed the issue, I discovered that Titan probably has the same bug.\n\nI had the time to confirm the presence of the issue today and have submitted https://github.com/pytorch/torchtitan/pull/1732 to resolve the issue.\n\n\n### Versions\n\ntorch 2.10.0.dev20250915+cu126\n\nFor anyone who may be interested, I have added support for Torch Titan to my configuration framework, which is what I used for reproducing the issue.\n\nhttps://github.com/jdinalt/forgather/tree/main/examples/torchtitan",
    "url": "https://github.com/pytorch/torchtitan/issues/1733",
    "state": "closed",
    "labels": [
      "high priority",
      "triage review"
    ],
    "created_at": "2025-09-22T05:55:07Z",
    "updated_at": "2025-09-24T20:13:06Z",
    "comments": 8,
    "user": "jdinalt"
  },
  {
    "repo": "huggingface/smol-course",
    "number": 248,
    "title": "[QUESTION] About applying chat template for base model via `clone_chat_template` from trl",
    "body": "In the course [Supervised Fine-Tuning](https://huggingface.co/learn/smol-course/unit1/3), author uses base model `HuggingFaceTB/SmolLM3-3B-Base` but I choose `HuggingFaceTB/SmolLM2-135M` because it is lighter. However, I found that the base model `SmolLM2-135M` does not have its own chat template but it already had special tokens. However, speical tokens may be incorrect, for example, bos_token and eos_token share the same token `<|endoftext|>`\n\n<img width=\"654\" height=\"305\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/87a4cea8-c372-4540-b617-9c41825f5a7e\" />\n\nI also refer to course [LLM Course, Fine-Tuning with SFTTrainer](https://huggingface.co/learn/llm-course/en/chapter11/3?fw=pt#implementation-with-trl) and author uses `setup_chat_format` to create the chat template for base model's tokenizer which does not have its own chat template\n\nHowever, [`setup_chat_format`](https://github.com/huggingface/trl/blob/86f74b486fda475e5530a451d06b835361d959ac/trl/models/utils.py#L87) only supports `chatml` format and will be deprecated in trl version 0.26.0. That is why I use [`clone_chat_template`](https://github.com/huggingface/trl/blob/86f74b486fda475e5530a451d06b835361d959ac/trl/models/utils.py#L165) instead.\n\nBut another issue appears here: while `clone_chat_template` only overwrites eos from source tokenizer to target tokenizer, the `setup_chat_format` overwrites all bos, eos, and pad tokens. After I try to clone `Llama-3.2-Instruct`'s chat template, only eos changes to `<|eot_id|>`\n\n`model, tokenizer, added_tokens = clone_chat_template(model=model, tokenizer=tokenizer, source_tokenizer_path='meta-llama/Llama-3.2-1B-Instruct')`\n\n<img width=\"633\" height=\"186\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/4428af4d-b8d8-4974-893f-af4033d516ed\" />\n\nQuestion:\n1. Why in the base model, although the tokenizer does not have a chat template, it already has special tokens?\n2. `clone_chat_template` does not overwrite all special tokens like bos, eos, pad, ... so are there any training SFT impacts, and what is the solution for this?\n\nI am new to SFT and I very appreciate any support. Thank you.\n ",
    "url": "https://github.com/huggingface/smol-course/issues/248",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-09-22T03:03:56Z",
    "updated_at": "2025-09-22T19:13:17Z",
    "user": "binhere"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1419,
    "title": "Why is `token-classification` with T5 not available? (`T5ForTokenClassification`)",
    "body": "### Question\n\nIn python `tranformers` i can do:\n```python\nmodel = AutoModelForTokenClassification.from_pretrained(\"google-t5/t5-base\")\n```\nand use it with `Trainer` to train it (quite successfully).\nOr\n```python\nclassifier = pipeline(\"token-classification\", model=\"google-t5/t5-base\")\n```\nand use it for token classification.\n\nInstead, if I try to use it in `transformers.js` (web, 3.7.3):\n```js\nclassifier = await pipeline('token-classification', \"google-t5/t5-base\")\n```\nI receive this error:\n```\nUnsupported model type: t5\n```\n\nHow come? Or there is another way to use T5 for token classification in javascript?\n",
    "url": "https://github.com/huggingface/transformers.js/issues/1419",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-09-21T23:30:22Z",
    "updated_at": "2025-09-24T21:42:56Z",
    "user": "debevv"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1418,
    "title": "EmbeddingGemma usage",
    "body": "### Question\n\nI'm new to transformers.js  \nI want to use embeddinggemma into my web app and I've looked at the example on its usage at this link:\nhttps://huggingface.co/blog/embeddinggemma#transformersjs\n\nAt the same time I've seen a different code, using pipeline, regarding embeddings:\nhttps://huggingface.co/docs/transformers.js/api/pipelines#pipelinesfeatureextractionpipeline\n\nI'm trying to create a custom pipeline and in typescript I'm building the pipeline like\n\n```ts\nclass EmbeddingPipeline {\n    private static instance: Promise<FeatureExtractionPipeline> | null = null;\n    private static model = 'onnx-community/embeddinggemma-300m-ONNX';\n    private static readonly task = 'feature-extraction';\n\n    // Device rilevato (default wasm)\n    private static device: 'webgpu' | 'wasm' = 'wasm';\n    private static deviceInitPromise: Promise<void> | null = null;\n\n    private static async detectDeviceOnce(): Promise<void> {\n        if (this.deviceInitPromise) return this.deviceInitPromise;\n        this.deviceInitPromise = (async () => {\n            if (typeof navigator !== 'undefined' && 'gpu' in navigator) {\n                try {\n                    const adapter = await (navigator as any).gpu.requestAdapter();\n                    if (adapter) {\n                        this.device = 'webgpu';\n                        return;\n                    }\n                } catch {\n                    // ignore, fallback to wasm\n                }\n            }\n            this.device = 'wasm';\n        })();\n        return this.deviceInitPromise;\n    }\n\n    static getSelectedDevice(): 'webgpu' | 'wasm' {\n        return this.device;\n    }\n\n    static async getInstance(progress_callback?: ProgressCallback): Promise<FeatureExtractionPipeline> {\n        if (this.instance) return this.instance;\n\n        // Rileva device una sola volta\n        await this.detectDeviceOnce();\n\n        const build = async (device: 'webgpu' | 'wasm') =>\n            pipeline(\n                this.task,\n                this.model,\n                {\n                    progress_callback,\n                    dtype: 'q8',\n                    device\n                }\n            ) as Promise<FeatureExtractionPipeline>;\n\n        this.instance = (async (): Promise<FeatureExtractionPipeline> => {\n            try {\n                return await build(this.device);\n            } catch (e) {\n                if (this.device === 'webgpu') {\n                    // Fallback automatico a wasm\n                    this.device = 'wasm';\n                    return await build('wasm');\n                }\n                throw e;\n            }\n        })();\n\n        return this.instance;\n    }\n}\n\n\nconst getEmbeddingDevice = () => EmbeddingPipeline.getSelectedDevice();\nconst embedding_prefixes_per_task: Record<EmbeddingTask, string> = {\n    'query': \"task: search result | query: \",\n    'document': \"title: none | text: \",\n};\n\nexport type EmbeddingTask = 'query' | 'document';\n\nexport const getEmbedding = async (task: EmbeddingTask, text: string): Promise<Float32Array> => {\n    const extractor = await EmbeddingPipeline.getInstance();\n\n    const prefix = embedding_prefixes_per_task[task];\n    const result = await extractor(`${prefix}${text}`, { pooling: 'mean', normalize: true });\n\n    return result.data as Float32Array;\n};\n```\n\nI'm using the same sentences (with prefixes) used by your example (I'm running both my class and your code to be sure if they matches) and the embedding result is different.\n\nWhat am I doing wrong? Do you have any reference to some proper docs reference that explain properly how this works?\n\nThanks",
    "url": "https://github.com/huggingface/transformers.js/issues/1418",
    "state": "open",
    "labels": [
      "question",
      "v4"
    ],
    "created_at": "2025-09-21T10:26:22Z",
    "updated_at": "2025-11-08T15:33:16Z",
    "user": "MithrilMan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12359,
    "title": "Chroma pipeline documentation bug regarding the `guidance_scale` parameter",
    "body": "### Describe the bug\n\nFrom my understanding, Chroma is a retrained and dedistilled version of the Flux architecture, so it uses true CFG, unlike Flux. I can indeed confirm that this is true by tracing through the source code. \nHowever, currently the documentation for the `guidance_scale` parameter in the `ChromaPipeline.__call__()` method mentions otherwise, presumably because it was copied over from the `FluxPipeline` documentation. \n\n### Reproduction\n\nThe current documentation for the `guidance_scale` parameter in the `ChromaPipeline.__call__()` method:\n```python\n'''\nguidance_scale (float, optional, defaults to 3.5) \u2014 Embedded guiddance scale is enabled by setting guidance_scale > 1. Higher guidance_scale encourages a model to generate images more aligned with prompt at the expense of lower image quality.\nGuidance-distilled models approximates true classifer-free guidance for guidance_scale > 1. Refer to the [paper](https://huggingface.co/papers/2210.03142) to learn more.\n'''\n```\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.36.0.dev0\n- Platform: Windows-10-10.0.26100-SP0\n- Running on Google Colab?: No\n- Python version: 3.11.9\n- PyTorch version (GPU?): 2.7.1+cu128 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.34.4\n- Transformers version: 4.55.0\n- Accelerate version: 1.10.0\n- PEFT version: 0.17.0\n- Bitsandbytes version: 0.47.0\n- Safetensors version: 0.6.2\n- xFormers version: 0.0.31.post1\n- Accelerator: NVIDIA GeForce RTX 4090, 24564 MiB\n- Using GPU in script?: No\n- Using distributed or parallel set-up in script?: No\n\n### Who can help?\n\n@stevhliu ",
    "url": "https://github.com/huggingface/diffusers/issues/12359",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-09-21T08:34:15Z",
    "updated_at": "2025-09-22T20:04:15Z",
    "comments": 1,
    "user": "mingyi456"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163435,
    "title": "[Fuzzer][Eager/Compile Divergence] a var subtract by itself should equal 0?",
    "body": "### \ud83d\udc1b Describe the bug\n\n```\nimport torch\nimport sys\ntorch._dynamo.config.capture_scalar_outputs = True\ntorch._dynamo.config.capture_dynamic_output_shape_ops = True\ntorch._inductor.config.emulate_precision_casts = True\n\ndef foo(arg0, arg1, arg2, arg3):\n    t0 = arg0 # size=(), stride=(), dtype=float16, device=cuda\n    t1 = torch.tanh(t0) # size=(), stride=(), dtype=float16, device=cuda\n    t2 = arg1 # size=(), stride=(), dtype=float16, device=cuda\n    t3 = arg2 # size=(), stride=(), dtype=float16, device=cuda\n    t4 = arg3 # size=(), stride=(), dtype=float16, device=cuda\n    t5 = t2 + t0 + t3 + t0 + t4 # size=(), stride=(), dtype=float16, device=cuda\n    t6 = t1 * t1 * t5 # size=(), stride=(), dtype=float16, device=cuda\n    t7 = (t6) - t6 # size=(), stride=(), dtype=float16, device=cuda\n    output = t7  # output tensor\n    return output\n\narg0 = torch.rand([], dtype=torch.float16, device='cuda', requires_grad=True) # size=(), stride=(), dtype=float16, device=cuda\narg1 = torch.rand([], dtype=torch.float16, device='cuda', requires_grad=True) # size=(), stride=(), dtype=float16, device=cuda\narg2 = torch.rand([], dtype=torch.float16, device='cuda', requires_grad=True) # size=(), stride=(), dtype=float16, device=cuda\narg3 = torch.rand([], dtype=torch.float16, device='cuda', requires_grad=True) # size=(), stride=(), dtype=float16, device=cuda\nif __name__ == '__main__':\n    out_eager = foo(arg0, arg1, arg2, arg3)\n    out_eager.sum().backward()\n    print('Eager Success! \u2705')\n    compiled_foo = torch.compile(foo, fullgraph=True, dynamic=True)\n    out_compiled = compiled_foo(arg0, arg1, arg2, arg3)\n    out_compiled.sum().backward()\n    print('Compile Success! \u2705')\n    # Compare outputs (forward)\n    out_eager_sum = out_eager.sum()\n    out_compiled_sum = out_compiled.sum()\n    diff = (out_eager_sum - out_compiled_sum).abs().item()\n    rel_diff = diff / (out_eager_sum.abs().item() + 1e-12) * 100\n    print(f'Relative diff (sum): {rel_diff:.6f}%')\n    if rel_diff > 5:\n        print(f'\u274c Forward output sums differ significantly (relative)!')\n        print('out_eager_sum:', out_eager_sum.item())\n        print('out_compiled_sum:', out_compiled_sum.item())\n        print('Absolute diff:', diff)\n        print('Relative diff (%):', rel_diff)\n        sys.exit(1)\n```\n\n```\n(/home/bobren/local/a/pytorch-env) [22:16] devgpu035:/home/bobren/local/a/pytorch/torchfuzz python /tmp/torchfuzz/fuzz_d9fffb614acbd1dd.py  \nEager Success! \u2705\nCompile Success! \u2705\nRelative diff (sum): 9441375732.421875%\n\u274c Forward output sums differ significantly (relative)!\nout_eager_sum: 0.0\nout_compiled_sum: -9.441375732421875e-05\nAbsolute diff: 9.441375732421875e-05\nRelative diff (%): 9441375732.421875\n```\n\n### Versions\n\nN/A\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @aakhundov @coconutruben",
    "url": "https://github.com/pytorch/pytorch/issues/163435",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: inductor",
      "topic: fuzzer"
    ],
    "created_at": "2025-09-21T05:19:32Z",
    "updated_at": "2025-09-24T17:43:02Z",
    "comments": 3,
    "user": "bobrenjc93"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3581,
    "title": "Feedback about Parametrizations Tutorial",
    "body": "There is the following issue on this page: https://docs.pytorch.org/tutorials/intermediate/parametrizations.html\n\nParametrization is not a topic known to all. You could add some context about the definition of parametrization to the tutorial, why the need for it was born ? What does it solve ? The go into giving the examples. Adding references for further reading could be very helpful. Especially for beginners. ",
    "url": "https://github.com/pytorch/tutorials/issues/3581",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-21T00:21:09Z",
    "updated_at": "2025-09-21T00:21:09Z",
    "comments": 0,
    "user": "pentanol2"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163359,
    "title": "RFC: Support CUDA Stream Protocol",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHello! I am the CUDA Python tech lead and I'm filing this RFC to improve the interoperability between Python GPU libraries.\n\n`cuda.core` is an official CUDA Python project: https://nvidia.github.io/cuda-python/cuda-core/latest/index.html. It offers a pythonic, self-contained, lightweight, and official interface over the CUDA programming model. For new Python projects, we encourage them to just use `cuda.core.<experimental>.Stream`. \n\nFor existing Python projects such as PyTorch, transitioning to `cuda.core` may or may not be immediately feasible. As a result, we encourage projects that already expose a CUDA stream to Python to follow the CUDA Stream protocol:\nhttps://nvidia.github.io/cuda-python/cuda-core/latest/interoperability.html#cuda-stream-protocol\nand add a `__cuda_stream__` method to the stream class, so as to improve interoperability without introducing extra `ExternalStream`-like types. \n\nHere is a PyTorch example of how it'd be used interoperably with `cuda.core`, courtesy of @msaroufim \ud83d\ude42:\nhttps://github.com/NVIDIA/cuda-python/blob/c4f4ffe83d246eafb6adf1574e5a7c86bbcef944/cuda_core/examples/pytorch_example.py\n\ncc @ptrblck @msaroufim @eqy @jerryzh168 @kkraus14 @pbielak @aterrel @rparolin for vis\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/163359",
    "state": "closed",
    "labels": [
      "module: cuda",
      "triaged",
      "topic: new features"
    ],
    "created_at": "2025-09-19T19:23:41Z",
    "updated_at": "2025-09-25T19:45:40Z",
    "comments": 2,
    "user": "leofang"
  },
  {
    "repo": "huggingface/trl",
    "number": 4110,
    "title": "How does `trl` know what part of dataset is prompt and completion in the following situation?",
    "body": "### Reproduction\n\n```python\nimport torch\nimport trl as r\nimport peft as p\nimport datasets as d\nimport accelerate as a\nimport transformers as t\n\nallowed_entities = ['AGE', 'EYECOLOR', 'GENDER', 'HEIGHT', 'WEIGHT', 'SEX']\nentity_mapping = {\n    \"ACCOUNTNAME\": \"account_name\",\n    \"ACCOUNTNUMBER\": \"account_number\",\n    \"AGE\": \"age\",\n    \"AMOUNT\": \"amount\",\n    \"BIC\": \"bic\",\n    \"BITCOINADDRESS\": \"bitcoin_address\",\n    \"BUILDINGNUMBER\": \"building_number\",\n    \"CITY\": \"city\",\n    \"COMPANYNAME\": \"company_name\",\n    \"COUNTY\": \"county\",\n    \"CREDITCARDCVV\": \"credit_card_cvv\",\n    \"CREDITCARDISSUER\": \"credit_card_issuer\",\n    \"CREDITCARDNUMBER\": \"credit_card_number\",\n    \"CURRENCY\": \"currency\",\n    \"CURRENCYCODE\": \"currency_code\",\n    \"CURRENCYNAME\": \"currency_name\",\n    \"CURRENCYSYMBOL\": \"currency_symbol\",\n    \"DATE\": \"date\",\n    \"DOB\": \"dob\",\n    \"EMAIL\": \"email\",\n    \"ETHEREUMADDRESS\": \"ethereum_address\",\n    \"EYECOLOR\": \"eye_color\",\n    \"FIRSTNAME\": \"first_name\",\n    \"GENDER\": \"gender\",\n    \"HEIGHT\": \"height\",\n    \"IBAN\": \"iban\",\n    \"IP\": \"ip\",\n    \"IPV4\": \"ipv4\",\n    \"IPV6\": \"ipv6\",\n    \"JOBAREA\": \"job_area\",\n    \"JOBTITLE\": \"job_title\",\n    \"JOBTYPE\": \"job_type\",\n    \"LASTNAME\": \"last_name\",\n    \"LITECOINADDRESS\": \"litecoin_address\",\n    \"MAC\": \"mac\",\n    \"MASKEDNUMBER\": \"masked_number\",\n    \"MIDDLENAME\": \"middle_name\",\n    \"NEARBYGPSCOORDINATE\": \"nearby_gps_coordinate\",\n    \"ORDINALDIRECTION\": \"ordinal_direction\",\n    \"PASSWORD\": \"password\",\n    \"PHONEIMEI\": \"phone_imei\",\n    \"PHONENUMBER\": \"phone_number\",\n    \"PIN\": \"pin\",\n    \"PREFIX\": \"prefix\",\n    \"SECONDARYADDRESS\": \"secondary_address\",\n    \"SEX\": \"sex\",\n    \"SSN\": \"ssn\",\n    \"STATE\": \"state\",\n    \"STREET\": \"street\",\n    \"TIME\": \"time\",\n    \"URL\": \"url\",\n    \"USERAGENT\": \"user_agent\",\n    \"USERNAME\": \"username\",\n    \"VEHICLEVIN\": \"vehicle_vin\",\n    \"VEHICLEVRM\": \"vehicle_vrm\",\n    \"ZIPCODE\": \"zip_code\"\n}\n\ndef formatting_function(x):\n    entities = []\n    for entity in x['privacy_mask']:\n        if entity['label'] not in allowed_entities:\n            entities.append({'value': entity['value'], 'label': entity_mapping[entity['label']]})\n    prompt = f\"Extract all the personal information from the following text and classify it: {x['source_text']}\"\n    completion = str(entities)\n    return {\"text\": f\"### PROMPT\\n{prompt}\\n\\n### COMPLETION\\n{completion}\"}\n\ndef main():\n    model_name = \"Qwen/Qwen3-0.6B\"\n    dataset_name = \"ai4privacy/pii-masking-200k\"\n\n    quantization = False\n    quantization_bits = \"8\"\n    lora = True\n    lora_rank = 8\n    lora_alpha = 16\n    lora_dropout = 0.05\n    use_mixed_precision = True\n    # Training parameters\n    completion_only_loss = True\n    output_dir = f\"/scratch/bminesh-shah/phi-ner/{model_name.replace('/', '-')}_pii_finetuned_prompt_completion\"\n    learning_rate = 1e-4\n    num_train_epochs = 10\n    per_device_train_batch_size = 2\n    gradient_accumulation_steps = 8\n\n    accelerator = a.Accelerator()\n\n    dataset = d.load_dataset(dataset_name)\n    dataset = dataset.filter(lambda x: x['language'] == 'en')\n    dataset = dataset.remove_columns(['target_text', 'span_labels', 'mbert_text_tokens', 'mbert_bio_labels', 'id', 'language', 'set'])\n    dataset = dataset['train']\n    dataset = dataset.train_test_split(test_size=0.2, seed=24, shuffle=True)\n    print(dataset)\n\n    if accelerator.is_main_process:\n        dataset = dataset.map(formatting_function, remove_columns=['source_text', 'privacy_mask'])\n        print(dataset)\n        print(dataset['train'][0])\n\n    tokenizer = t.AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)\n    tokenizer.pad_token = tokenizer.eos_token\n    tokenizer.padding_side = \"right\"\n\n    bnb_config = None\n    if quantization and quantization_bits == \"4\":\n        bnb_config = t.BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type=\"nf4\", bnb_4bit_compute_dtype=torch.bfloat16, bnb_4bit_use_double_quant=True)\n    elif quantization and quantization_bits == \"8\":\n        bnb_config = t.BitsAndBytesConfig(load_in_8bit=True)\n\n    model = t.AutoModelForCausalLM.from_pretrained(\n        model_name,\n        quantization_config=bnb_config,\n        device_map={\"\": accelerator.process_index},\n        dtype=torch.bfloat16 if use_mixed_precision else torch.float32,\n        trust_remote_code=True\n    )\n\n    if quantization:\n        model = p.prepare_model_for_kbit_training(model)\n    model.config.use_cache = False\n    model.config.pretraining_tp = 1\n    model.config.pad_token_id = model.config.eos_token_id\n\n    if lora:\n        lora_config = p.LoraConfig(r=lora_rank, lora_alpha=lora_alpha, lora_dropout=lora_dropout, bias=\"none\", task_type=\"CAUSAL_LM\")\n        model = p.get_peft_model(model, lora_config)\n        model.train()\n\n    sft_config = r.SFTConfig(\n        learning_rate=learning_rate,\n        num_train_epochs=num_train_epochs,\n        per_device_train_batch_size=per_device_train_batch_size,\n        gradient_accumulation_steps=gradient_accumulation_steps,\n        output_dir=output_dir,\n        eval_s",
    "url": "https://github.com/huggingface/trl/issues/4110",
    "state": "closed",
    "labels": [
      "\ud83d\udc1b bug",
      "\ud83d\udcda documentation"
    ],
    "created_at": "2025-09-19T17:42:26Z",
    "updated_at": "2025-09-19T20:02:16Z",
    "user": "bminesh-shah"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163342,
    "title": "[CD] - Manywheel CUDA builds failing since Sept 18",
    "body": "### \ud83d\udc1b Describe the bug\n\nThis hasn't been seen in a nightly yet, but i just rebased onto `viable/strict` and i'm getting this error in the `ciflow/binaries_wheel` flow and it's happening in other people's jobs too.\n\nBroken Workflow - https://github.com/pytorch/pytorch/actions/workflows/generated-linux-binary-manywheel-nightly.yml\n\nhttps://github.com/pytorch/pytorch/actions/runs/17856217452/job/50775774205\nand\nhttps://github.com/pytorch/pytorch/actions/runs/17855187279\n\n```\nIn file included from /pytorch/c10/cuda/CUDAException.h:5,\n                 from /pytorch/third_party/fbgemm/fbgemm_gpu/experimental/gen_ai/src/quantize/common/utils.cpp:12:\n/pytorch/c10/cuda/CUDAMiscFunctions.h:6:10: fatal error: cuda_runtime.h: No such file or directory\n    6 | #include <cuda_runtime.h>\n```\n\nIt looks like fbgemm was recently updated https://github.com/pytorch/pytorch/pull/162590 @pragupta can we check this error?\n\n### Versions\n\n2.10.0\n\ncc @ezyang @gchanan @zou3519 @kadeng @msaroufim @seemethere @malfet @atalman @ptrblck @eqy @jerryzh168",
    "url": "https://github.com/pytorch/pytorch/issues/163342",
    "state": "closed",
    "labels": [
      "high priority",
      "triage review",
      "module: binaries",
      "module: cuda",
      "triaged",
      "module: regression"
    ],
    "created_at": "2025-09-19T14:29:24Z",
    "updated_at": "2025-09-20T12:16:28Z",
    "comments": 5,
    "user": "robert-hardwick"
  },
  {
    "repo": "huggingface/transformers",
    "number": 41005,
    "title": "Are we have Qwen3VL Official Model Published by Alibaba",
    "body": "### Model description\n\nReference - https://huggingface.co/docs/transformers/main/en/model_doc/qwen3_vl#transformers.Qwen3VLForConditionalGeneration\n\nIf not when can we expect any guess?",
    "url": "https://github.com/huggingface/transformers/issues/41005",
    "state": "closed",
    "labels": [
      "New model"
    ],
    "created_at": "2025-09-19T13:59:34Z",
    "updated_at": "2025-09-20T10:00:04Z",
    "comments": 1,
    "user": "Dineshkumar-Anandan-ZS0367"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163331,
    "title": "Support Query Bug !!",
    "body": "Hey Guys, \nI have been working on an ML project, so i have a GPU server (An ancient one)  which is backed by CUDA 3.0 .So what is the minimum version supported for PyTorch ?\n\nThank You :) ",
    "url": "https://github.com/pytorch/pytorch/issues/163331",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-19T10:09:06Z",
    "updated_at": "2025-09-20T14:42:36Z",
    "comments": 2,
    "user": "Harishankar14"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40993,
    "title": "HfArgumentParser cannot parse TRL Config",
    "body": "### System Info\n\ntransformers==4.56.1\ntrl==0.17.0\n\nI used to apply code below\n\n```python\nfrom transformers import HfArgumentParser\nfrom trl import (\n\tScriptArguments, ModelConfig, SFTConfig\n)\nparser = HfArgumentParser((ScriptArguments, SFTConfig, ModelConfig))\nscript_arguments, trainer_config, model_config = parser.parse_args_into_dataclasses()\n```\n\nto parse training args, but after updating transformers to 4.56, it does not work:\n\n```\nTraceback (most recent call last):\n  File \"D:\\mytest.py\", line 5, in <module>\n    parser = HfArgumentParser((ScriptArguments, SFTConfig, ModelConfig))\n  File \"E:\\Anaconda3\\envs\\myopenai\\lib\\site-packages\\transformers\\hf_argparser.py\", line 143, in __init__\n    self._add_dataclass_arguments(dtype)\n  File \"E:\\Anaconda3\\envs\\myopenai\\lib\\site-packages\\transformers\\hf_argparser.py\", line 260, in _add_dataclass_arguments\n    raise RuntimeError(\nRuntimeError: Type resolution failed for <class 'trl.trainer.sft_config.SFTConfig'>. Try declaring the class in global scope or removing line of `from __future__ import annotations` which opts in Postponed Evaluation of Annotations (PEP 563)\n```\n\nHow to fix it?\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nRun \n\n```python\nfrom transformers import HfArgumentParser\nfrom trl import (\n\tScriptArguments, ModelConfig, SFTConfig\n)\nparser = HfArgumentParser((ScriptArguments, SFTConfig, ModelConfig))\nscript_arguments, trainer_config, model_config = parser.parse_args_into_dataclasses()\n```\n\n### Expected behavior\n\nIt should be work",
    "url": "https://github.com/huggingface/transformers/issues/40993",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-09-19T08:29:48Z",
    "updated_at": "2025-09-19T09:06:20Z",
    "comments": 5,
    "user": "caoyang-sufe"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1978,
    "title": "Is there a best fit model to each sim env\uff1f",
    "body": "I try to train diffusion\uff0csmolvla\uff0ceven pi0 on the aloha with 200k steps, and found that they all perform much worse (with less than 10% success rate) than act policy, why? Did each env task exist a best-fit policy? or there are problems on my training strategy.",
    "url": "https://github.com/huggingface/lerobot/issues/1978",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "simulation"
    ],
    "created_at": "2025-09-19T02:45:14Z",
    "updated_at": "2025-10-17T11:25:27Z",
    "user": "shs822"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163283,
    "title": "RFC move to Pyrefly for Type Checking",
    "body": "Currently, mypy is used to typecheck PyTorch, with lint runner and dmypy. We appreciate the community\u2019s work maintaining mypy and type coverage in PyTorch and want to build on that foundation. [Pyrefly](https://pyrefly.org/) is a new standards-compliant Python type checker. The Pyrefly team has been hard at work on building a performant and backwards compatible type checker, that we think can improve the current type checking setup and the development experience for PyTorch users. \n\nFor example, the current setup can make it tricky to know which files are being typechecked and in which mode ([strict](https://github.com/pytorch/pytorch/blob/main/mypy-strict.ini) vs. [default](https://github.com/pytorch/pytorch/blob/main/mypy.ini)). Use of  `type: ignore` and `# mypy: ignore-errors` to disable checks on certain files, adds to the challenge. We think we can make typechecking simpler, and improve the overall experience.\n\nWe are proposing that we add Pyrefly as a typechecker to Pytorch. \n\nThe benefits to PyTorch will be:\n\n* Whole repo checks in seconds:\n\n     - Eliminates inconsistencies created by dmypy between local and CI revisions\n     - Fast CI signal\n* A richer IDE experience with types that match hover and diagnostics. We support most major IDEs: https://pyrefly.org/en/docs/IDE/#other-editors  \n* Modern type checking features:\n     - Container inference, conformance to the typing spec for feature support\n     - We\u2019ve found over 200 bugs in PyTorch just by enabling Pyrefly for testing!\n* Clear configuration and ownership:\n     - The Pyrefly team will help support typing in PyTorch and respond quickly to issues on our github\n\nHere\u2019s how we would propose to get Pyrefly up and running in PyTorch:\n\nPhase 1: \n* Check in Pyrefly configs along with the suppressions needed for Pyrefly to check cleanly\n* Add a non-blocking CI linter runner job to observe changes and test the integration\n* Gather community feedback on the checker and IDE extension via:\n     - Download the VSCode Extension\n     - Run pyrefly through lint runner\n\nPhase 2:\n* With community buy in, we\u2019ll swap the checker from mypy to pyrefly over the weekend to be least disruptive\n* After Pyrefly has been enabled smoothly for a few days, we\u2019ll cleanup the unused `type: ignores` that remain in the code. We plan to cleanup approximately 600 unused mypy ignores\n\nPhase 3:\n* Work with the community to help add types where they are useful in PyTorch and answer questions around typing features and usage\n* Set up additional jobs like `pyrefly infer` to ease the process of adding types\n* Work with the community to better export types to consumers of PyTorch\n\n\nWe\u2019d love for you to try Pyrefly, share your experiences, and help us make it (and PyTorch) even better \ud83d\ude42\n\ncc @lolpack @ndmitchell @kinto0 @samwgoldman",
    "url": "https://github.com/pytorch/pytorch/issues/163283",
    "state": "closed",
    "labels": [
      "module: typing",
      "triaged",
      "needs research"
    ],
    "created_at": "2025-09-18T19:52:40Z",
    "updated_at": "2025-11-24T19:20:08Z",
    "comments": 3,
    "user": "maggiemoss"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3784,
    "title": "AttributeError: 'Accelerator' object has no attribute 'deepspeed_config'. Did you mean: 'deepspeed_plugin'?",
    "body": "### System Info\n\n```Shell\n- Name: accelerate Version: 1.10.1\n- Name: transformers Version: 4.54.0\n- Name: deepspeed Version: 0.17.5\n- Name: torch Version: 2.8.0\n- Name: wandb Version: 0.21.4\n```\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nThis is a deepspeed stage 2 config which is in json:\n\n```\njson = {\n    \"fp16\": {\n        \"enabled\": false,\n        \"auto_cast\": true,\n        \"loss_scale\": 0,\n        \"loss_scale_window\": 1000,\n        \"initial_scale_power\": 16,\n        \"hysteresis\": 2,\n        \"min_loss_scale\": 1\n    },\n    \"bf16\": {\n        \"enabled\": true\n    },\n    \"amp\": {\n        \"enabled\": false\n    },\n    \"optimizer\": {\n        \"type\": \"AdamW\",\n        \"params\": {\n            \"lr\": 0.0003,\n            \"betas\": [0.9, 0.999],\n            \"eps\": 1e-08,\n            \"weight_decay\": 0.001\n        }\n    },\n    \"scheduler\": {\n        \"type\": \"WarmupLR\",\n        \"params\": {\n            \"warmup_min_lr\": 0,\n            \"warmup_max_lr\": 0.0003,\n            \"warmup_num_steps\": 0\n        }\n    },\n    \"zero_optimization\": {\n        \"stage\": 2,\n        \"allgather_partitions\": true,\n        \"allgather_bucket_size\": 5.000000e+08,\n        \"overlap_comm\": false,\n        \"reduce_scatter\": true,\n        \"reduce_bucket_size\": 9.000000e+05,\n        \"contiguous_gradients\": true,\n        \"use_multi_rank_bucket_allreduce\": false\n    },\n    \"zero_state\": 2,\n    \"gradient_accumulation_steps\": 1,\n    \"gradient_clipping\": 1,\n    \"train_micro_batch_size_per_gpu\": 4,\n    \"mixed_precision\": \"bf16\",\n    \"communication_data_type\": \"bf16\",\n    \"steps_per_print\": inf\n}\n```\n\nI use `accelerate to spin up 8 workers on an AWS EC2 instance`:\n\n```bash\naccelerate launch --config_file configs/deepspeed.yaml scripts/main.py\n```\n\nThe following error is raised when the `trainer` runs `train`:\n\n```\n  File \"/home/ubuntu/llm-classifiier/scripts/main.py\", line 88, in <module>\n    train_qwen_any(cli_args, run_args)\n  File \"/home/ubuntu/llm-classifiier/scripts/train_qwen.py\", line 138, in train_qwen_any\n    trainer.train()\n  File \"/home/ubuntu/llm-classifiier/venv/lib/python3.12/site-packages/transformers/trainer.py\", line 2237, in train\n    return inner_training_loop(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ubuntu/llm-classifiier/venv/lib/python3.12/site-packages/transformers/trainer.py\", line 2758, in _inner_training_loop\n    self.control = self.callback_handler.on_train_end(args, self.state, self.control)\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ubuntu/llm-classifiier/venv/lib/python3.12/site-packages/transformers/trainer_callback.py\", line 509, in on_train_end\n    return self.call_event(\"on_train_end\", args, state, control)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ubuntu/llm-classifiier/venv/lib/python3.12/site-packages/transformers/trainer_callback.py\", line 556, in call_event\n    result = getattr(callback, event)(\n             ^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ubuntu/llm-classifiier/venv/lib/python3.12/site-packages/transformers/integrations/integration_utils.py\", line 958, in on_train_end\n    fake_trainer.save_model(temp_dir)\n  File \"/home/ubuntu/llm-classifiier/venv/lib/python3.12/site-packages/transformers/trainer.py\", line 3965, in save_model\n    state_dict = self.accelerator.get_state_dict(self.deepspeed)\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ubuntu/llm-classifiier/venv/lib/python3.12/site-packages/accelerate/accelerator.py\", line 3903, in get_state_dict\n    zero3_sharding = self.deepspeed_config[\"zero_optimization\"][\"stage\"] == 3\n                     ^^^^^^^^^^^^^^^^^^^^^\nAttributeError: 'Accelerator' object has no attribute 'deepspeed_config'. Did you mean: 'deepspeed_plugin'?\n```\n\nI am not using zero3 sharding, so I don't know why this is an issue at all!\n\nMy deepspeed.yaml looks like this\n\n```\ncompute_environment: LOCAL_MACHINE\ndebug: true\ndeepspeed_config:\n  deepspeed_config_file: configs/deepspeed_stg2.json\ndistributed_type: DEEPSPEED\nenable_cpu_affinity: false\nmachine_rank: 0\nmain_training_function: main\nnum_machines: 1\nnum_processes: 4\nrdzv_backend: static\nsame_network: true\ntpu_env: []\ntpu_use_cluster: false\ntpu_use_sudo: false\nuse_cpu: false\n```\n\nAnd the actual json file is above.\nBecause of this I cannot save my models or state_dicts.\n\n### Expected behavior\n\nUnless I am missing something profound, this really shouldn't be happening.",
    "url": "https://github.com/huggingface/accelerate/issues/3784",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-18T17:07:54Z",
    "updated_at": "2025-10-27T15:08:19Z",
    "comments": 1,
    "user": "alexge233"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1969,
    "title": "how to record a multi-task dataset on so101?",
    "body": "I found that only can use \"dataset.single_task\" to record , but i need to record a dataset contains more than 3 tasks. how to solve it. ",
    "url": "https://github.com/huggingface/lerobot/issues/1969",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-18T10:18:00Z",
    "updated_at": "2025-09-21T02:50:59Z",
    "user": "Temmp1e"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1966,
    "title": "SO101FollowerEndEffector?",
    "body": "I am trying to get inverse kinematics to work on my SO-101, and I found SO100FollowerEndEffector but there is no SO101FollowerEndEffector?\n\nI suspect they are interchangeable, but when I use SO100FollowerEndEffector on my SO-101, it want me to recalibrate it, so I just want to make sure before I break anything.",
    "url": "https://github.com/huggingface/lerobot/issues/1966",
    "state": "open",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-09-17T23:56:38Z",
    "updated_at": "2025-10-30T08:56:22Z",
    "user": "cashlo"
  },
  {
    "repo": "pytorch/ao",
    "number": 3020,
    "title": "How to use FP8 training with MoE models?",
    "body": "\n\nI\u2019m trying to train a Mixture of Experts (MoE) model with FP8 precision. However, I couldn\u2019t find any documentation or examples that describe how to enable FP8 training for MoE in torchao.\n\nIs FP8 training for MoE models currently supported?\n\nIf yes, could you point me to a tutorial or usage guide?\n\nIf not, is there a roadmap or prototype feature under development? If this feature is still in progress, could you share the current status and future plan?\n\nThanks!",
    "url": "https://github.com/pytorch/ao/issues/3020",
    "state": "open",
    "labels": [
      "moe"
    ],
    "created_at": "2025-09-17T12:18:14Z",
    "updated_at": "2025-10-02T18:20:44Z",
    "user": "BIGBALLON"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1716,
    "title": "float8 Grouped MM kernels",
    "body": "- **Is there any plan to support float8 Grouped MM for llama4 / qwen3 MoE model training?**\n- **Is this the correct way to train a MoE model with FP8?**\n\nCurrently, the available Grouped GEMM kernels only support float16, and they do not work with float8.\n\n``` python\n@expert_parallel\ndef _run_experts_grouped_mm(\n    w1: torch.Tensor,\n    w2: torch.Tensor,\n    w3: torch.Tensor,\n    x: torch.Tensor,\n    num_tokens_per_expert: torch.Tensor,\n) -> torch.Tensor:\n    offsets = torch.cumsum(num_tokens_per_expert, dim=0, dtype=torch.int32)\n    # grouped mm between a 2D tensor and a 3D tensor\n    assert x.dim() == 2\n\n    h = F.silu(\n        torch._grouped_mm(x.bfloat16(), w1.bfloat16().transpose(-2, -1), offs=offsets)\n    )\n    h = h * torch._grouped_mm(\n        x.bfloat16(), w3.bfloat16().transpose(-2, -1), offs=offsets\n    )\n    out = torch._grouped_mm(h, w2.bfloat16().transpose(-2, -1), offs=offsets).type_as(x)\n\n    return out\n```\n\nFor training large MoE models such as LLaMA4 and Qwen3, float8 is increasingly important to reduce memory footprint and improve training efficiency. However, the lack of float8 Grouped GEMM support becomes a bottleneck when scaling up MoE training.\n\n\n**Feature request:**\n\nAdd support for float8 Grouped GEMM kernels.\nEnsure compatibility with MoE training workloads (e.g., LLaMA4, Qwen3).\nThis would enable more efficient large-scale MoE training under float8 precision.",
    "url": "https://github.com/pytorch/torchtitan/issues/1716",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-09-17T09:57:25Z",
    "updated_at": "2025-09-30T02:54:53Z",
    "user": "BIGBALLON"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163153,
    "title": "FSDP2 implicit prefetch does not work",
    "body": "### \ud83d\udc1b Describe the bug\n\nI'm using official [example of FSDP2](https://github.com/pytorch/examples/blob/acc295dc7b90714f1bf47f06004fc19a7fe235c4/distributed/FSDP2/example.py) with some small modifcations:\n\n\n```python\n# distributed/FSDP2/example.py\nimport argparse\nimport os\n\nimport torch\nfrom checkpoint import Checkpointer\nfrom model import ModelArgs, Transformer\nfrom torch.distributed.fsdp import fully_shard, MixedPrecisionPolicy\nfrom utils import inspect_mixed_precision, inspect_model\nfrom torch.profiler import profile, record_function, ProfilerActivity\n\ndef verify_min_gpu_count(min_gpus: int = 2) -> bool:\n    \"\"\" verification that we have at least 2 gpus to run dist examples \"\"\"\n    has_gpu = torch.accelerator.is_available()\n    gpu_count = torch.accelerator.device_count()\n    return has_gpu and gpu_count >= min_gpus\n\ndef set_modules_to_forward_prefetch(model, num_to_forward_prefetch):\n    for i, layer in enumerate(model.layers):\n        if i >= len(model.layers) - num_to_forward_prefetch:\n            break\n        layers_to_prefetch = [\n            model.layers[i + j] for j in range(1, num_to_forward_prefetch + 1)\n        ]\n        layer.set_modules_to_forward_prefetch(layers_to_prefetch)\n\n\ndef set_modules_to_backward_prefetch(model, num_to_backward_prefetch):\n    for i, layer in enumerate(model.layers):\n        if i < num_to_backward_prefetch:\n            continue\n        layers_to_prefetch = [\n            model.layers[i - j] for j in range(1, num_to_backward_prefetch + 1)\n        ]\n        layer.set_modules_to_backward_prefetch(layers_to_prefetch)\n\n\ndef main(args):\n    _min_gpu_count = 2\n    if not verify_min_gpu_count(min_gpus=_min_gpu_count):\n        print(f\"Unable to locate sufficient {_min_gpu_count} gpus to run this example. Exiting.\")\n        exit()\n    rank = int(os.environ[\"LOCAL_RANK\"])\n    if torch.accelerator.is_available():\n        device_type = torch.accelerator.current_accelerator()\n        device = torch.device(f\"{device_type}:{rank}\")\n        torch.accelerator.set_device_index(rank)\n        print(f\"Running on rank {rank} on device {device}\")\n    else:\n        device = torch.device(\"cpu\")\n        print(f\"Running on device {device}\")\n\n    backend = torch.distributed.get_default_backend_for_device(device)\n    torch.distributed.init_process_group(backend=backend, device_id=device)\n\n    torch.manual_seed(0)\n    vocab_size = 1024\n    batch_size = 4\n    seq_len = 1024\n    model_args = ModelArgs(\n        n_layers=10,\n        n_heads=8,\n        dim=4096,\n        vocab_size=vocab_size,\n        max_seq_len=seq_len,\n        dropout_p=0,\n    )\n    with torch.device(\"meta\"):\n        model = Transformer(model_args)\n    fsdp_kwargs = {}\n    if args.mixed_precision:\n        fsdp_kwargs[\"mp_policy\"] = MixedPrecisionPolicy(\n            param_dtype=torch.bfloat16,\n            reduce_dtype=torch.float32,\n        )\n    for layer in model.layers:\n        fully_shard(layer, **fsdp_kwargs)\n    fully_shard(model, **fsdp_kwargs)\n\n    inspect_model(model)\n\n    if args.explicit_prefetching:\n        set_modules_to_forward_prefetch(model, num_to_forward_prefetch=2)\n        set_modules_to_backward_prefetch(model, num_to_backward_prefetch=2)\n\n    checkpointer = Checkpointer(\"checkpoints\", dcp_api=args.dcp_api)\n    if checkpointer.last_training_time is None:\n        model.to_empty(device=device)\n        model.reset_parameters()\n    else:\n        checkpointer.load_model(model)\n\n    if args.mixed_precision:\n        inspect_mixed_precision(model)\n\n    optim = torch.optim.Adam(model.parameters(), lr=1e-2)\n    if checkpointer.last_training_time is not None:\n        checkpointer.load_optim(model, optim)\n\n    with profile(\n        activities=[ProfilerActivity.CPU, ProfilerActivity.CUDA],\n        record_shapes=True,\n        with_stack=True,\n    ) as prof:\n        for _ in range(10):\n            if args.explicit_prefetching:\n                model.unshard()\n            x = torch.randint(0, vocab_size, (batch_size, seq_len), device=device)\n            loss = model(x).sum()\n            loss.backward()\n            torch.nn.utils.clip_grad_norm_(model.parameters(), max_norm=1.0)\n            optim.step()\n            optim.zero_grad()\n    prof.export_chrome_trace(f\"fsdp2_trace_r{torch.distributed.get_rank()}.json\")\n\n    # checkpointer.save(model, optim)\n    torch.distributed.destroy_process_group()\n\n\nif __name__ == \"__main__\":\n    parser = argparse.ArgumentParser(description=\"PyTorch FSDP2 example\")\n    parser.add_argument(\"--explicit-prefetching\", action=\"store_true\", default=False)\n    parser.add_argument(\"--mixed-precision\", action=\"store_true\", default=True)\n    parser.add_argument(\"--dcp-api\", action=\"store_true\", default=False)\n    args = parser.parse_args()\n\n    main(args)\n```\n\n## current behavior\n\nthe profiling result shows that the all-gather kernel is not overlapping with computation.\n\n<img width=\"2540\" height=\"414\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/403c8560-c090-4038-b629-51aa5e3ab1ef\" />\n\nFrom the t",
    "url": "https://github.com/pytorch/pytorch/issues/163153",
    "state": "closed",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2025-09-17T09:30:31Z",
    "updated_at": "2025-09-17T18:04:42Z",
    "comments": 1,
    "user": "zhc7"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3569,
    "title": "Feedback about What is torch.nn really?",
    "body": "There is the following issue on this page: https://docs.pytorch.org/tutorials/beginner/nn_tutorial.html\n\nGithub URL for MNIST archive needs to change from:\n```\nURL = \"https://github.com/pytorch/tutorials/raw/main/_static/\"\n```\nto\n\n```\nURL = 'https://github.com/pytorch/tutorials/raw/refs/heads/main/_static/'\n```",
    "url": "https://github.com/pytorch/tutorials/issues/3569",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-16T20:51:42Z",
    "updated_at": "2025-09-16T20:51:42Z",
    "user": "robertbcalhoun"
  },
  {
    "repo": "huggingface/lighteval",
    "number": 970,
    "title": "How to use a configuration file?",
    "body": "The documentation makes references to using configuration yaml files like [here](https://huggingface.co/docs/lighteval/main/en/use-litellm-as-backend) but it doesn't give the name of the file or which option to feed the config to lighteval. I tried making a `config.yaml`, `config.yml` in the current directory and trying a `--config` option (doesn't exist).",
    "url": "https://github.com/huggingface/lighteval/issues/970",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-16T20:13:48Z",
    "updated_at": "2025-09-24T22:08:32Z",
    "user": "oluwandabira"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40915,
    "title": "HfArgumentParser does not support peft.LoraConfig",
    "body": "### System Info\n\n- `transformers` version: 4.57.0.dev0\n- Platform: Linux-5.14.0-284.73.1.el9_2.x86_64-x86_64-with-glibc2.39\n- Python version: 3.12.3\n- Huggingface_hub version: 0.34.4\n- Safetensors version: 0.5.2\n- Accelerate version: 1.10.1\n- Accelerate config:    not found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.8.0+cu128 (CUDA)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: No\n- Using GPU in script?: No\n- GPU type: NVIDIA A100-SXM4-80GB\n\n### Who can help?\n\n@ydshieh (I am not really sure who to tag here)\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```python\nfrom peft import LoraConfig # v0.17.1\nfrom transformers import HfArgumentParser # Built from source\n\np = HfArgumentParser(dataclass_types=LoraConfig) # fails\n```\n\n### Expected behavior\n\nI would expect LoraConfig to be supported by HfArgumentParser.\nAs I understand, this fails because HfArgumentParser does not support fields of type (`Optional[List[str], str]`).\n\nIs there a plan to support such fields?",
    "url": "https://github.com/huggingface/transformers/issues/40915",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-09-16T16:23:56Z",
    "updated_at": "2025-09-23T05:16:14Z",
    "comments": 5,
    "user": "romitjain"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163071,
    "title": "Lintrunner not flagging CI issues in PRs",
    "body": "### \ud83d\udc1b Describe the bug\n\nThe PR https://github.com/pytorch/pytorch/pull/162659 introduced some small changes in the `.github/workflows/pull.yml` workflow, changing the `linux-jammy-py3_10-clang18-asan-build` job.\n\nAfter merging, lintrunner started flagging the change as inconsistency in the workflows (https://github.com/pytorch/pytorch/actions/runs/17750680257/job/50444889451). But it did not flag in the PR itself.\n\nWe should discuss if the rule is valid and how to fix lintrunner so it will always be red in the PR if merging it could cause a lintrunner to be red in trunk.\n\n### Versions\n\nmain (trunk)",
    "url": "https://github.com/pytorch/pytorch/issues/163071",
    "state": "closed",
    "labels": [
      "module: lint",
      "triaged"
    ],
    "created_at": "2025-09-16T12:56:57Z",
    "updated_at": "2025-09-22T15:00:35Z",
    "comments": 3,
    "user": "jeanschmidt"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12338,
    "title": "`AutoencoderDC` bug with `pipe.enable_vae_slicing()` and decoding multiple images",
    "body": "### Describe the bug\n\nWhen using the Sana_Sprint_1.6B_1024px and the SANA1.5_4.8B_1024px models, I cannot enable VAE slicing when generating multiple images. I guess this issue will affect the rest of the Sana model and pipeline configurations because they all use the same `AutoencoderDC` model.\n\nI traced the issue to the following [line of code](https://github.com/huggingface/diffusers/blob/751e250f70cf446ae342c8a860d92f6a8b78261a/src/diffusers/models/autoencoders/autoencoder_dc.py#L620), and if I remove the `.sample` part the issue seems to be fixed.\n\nI intend to submit a PR for my proposed fix. Can I confirm that this is supposed to be the correct solution?\n\n### Reproduction\n\n```python\nfrom diffusers import SanaSprintPipeline\nimport torch\n\npipe = SanaSprintPipeline.from_pretrained(\"Efficient-Large-Model/Sana_Sprint_1.6B_1024px_diffusers\", text_encoder=text_encoder, torch_dtype=torch.bfloat16)\npipe.to(\"cuda\")\npipe.enable_vae_slicing()\n\nprompt = \"A girl\"\nnum_images_per_prompt = 8\noutput = pipe(\n\tprompt=prompt,\n\theight=1024,\n\twidth=1024,\n\tnum_inference_steps=2,\n\tnum_images_per_prompt=num_images_per_prompt,\n\tintermediate_timesteps=1.3,\n\tmax_timesteps=1.56830,\n\ttimesteps=None\n).images\n```\n\n### Logs\n\n```shell\nTraceback (most recent call last):\n  File \"F:\\AI setups\\Diffusers\\scripts\\inference sana-sprint.py\", line 24, in <module>\n    output = pipe(\n             ^^^^^\n  File \"F:\\AI setups\\Diffusers\\diffusers-venv\\Lib\\site-packages\\torch\\utils\\_contextlib.py\", line 116, in decorate_context\n    return func(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^\n  File \"F:\\AI setups\\Diffusers\\diffusers-venv\\Lib\\site-packages\\diffusers\\pipelines\\sana\\pipeline_sana_sprint.py\", line 874, in __call__\n    image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0]\n            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"F:\\AI setups\\Diffusers\\diffusers-venv\\Lib\\site-packages\\diffusers\\utils\\accelerate_utils.py\", line 46, in wrapper\n    return method(self, *args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"F:\\AI setups\\Diffusers\\diffusers-venv\\Lib\\site-packages\\diffusers\\models\\autoencoders\\autoencoder_dc.py\", line 620, in decode\n    decoded_slices = [self._decode(z_slice).sample for z_slice in z.split(1)]\n                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"F:\\AI setups\\Diffusers\\diffusers-venv\\Lib\\site-packages\\diffusers\\models\\autoencoders\\autoencoder_dc.py\", line 620, in <listcomp>\n    decoded_slices = [self._decode(z_slice).sample for z_slice in z.split(1)]\n                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAttributeError: 'Tensor' object has no attribute 'sample'\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.36.0.dev0\n- Platform: Windows-10-10.0.26100-SP0\n- Running on Google Colab?: No\n- Python version: 3.11.9\n- PyTorch version (GPU?): 2.7.1+cu128 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.34.4\n- Transformers version: 4.55.0\n- Accelerate version: 1.10.0\n- PEFT version: 0.17.0\n- Bitsandbytes version: 0.47.0\n- Safetensors version: 0.6.2\n- xFormers version: 0.0.31.post1\n- Accelerator: NVIDIA GeForce RTX 4090, 24564 MiB\n- Using GPU in script?: No\n- Using distributed or parallel set-up in script?: No\n\n### Who can help?\n\n@yiyixuxu @DN6 ",
    "url": "https://github.com/huggingface/diffusers/issues/12338",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-09-16T12:23:29Z",
    "updated_at": "2025-09-22T06:55:35Z",
    "comments": 0,
    "user": "mingyi456"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163066,
    "title": "PyTorch is including internal headers, leading to ODR violations",
    "body": "### \ud83d\udc1b Describe the bug\n\nIn [functorch/csrc/dim/dim_opcode.c](https://github.com/pytorch/pytorch/blob/e3783a9575b810f9a3f51334270668357463958e/functorch/csrc/dim/dim_opcode.c#L8-L10) and [torch/csrc/dynamo/cpython_defs.c](https://github.com/pytorch/pytorch/blob/e3783a9575b810f9a3f51334270668357463958e/torch/csrc/dynamo/cpython_defs.c#L21-L34), PyTorch is including private headers from CPython and specifically doing so in a way that includes symbols defined in those headers. This causes problems if you ever try to link both PyTorch and CPython together (which we do for static hermetic builds), because the symbols get defined more than once, leading to a violation of the One Definition Rule.\n\nIt is probably true that CPython should use `extern` for these symbols (though I'm told that this is not necessarily possible within CPython itself), but also it is definitely true that PyTorch should not be using the private interface of CPython.\n\nI am not super familiar with the reason that this needs to be done so I am not sure what the right solution is. Is this something that can be accomplished without using the internal headers? If not, what is missing from the CPython API that would make it possible to avoid this situation?\n\n### Versions\n\nThis is a more abstract issue about the code itself.\n\ncc @malfet @seemethere @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @Lucaskabela",
    "url": "https://github.com/pytorch/pytorch/issues/163066",
    "state": "open",
    "labels": [
      "module: build",
      "triaged",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2025-09-16T10:22:40Z",
    "updated_at": "2025-09-24T17:41:27Z",
    "comments": 6,
    "user": "pganssle-google"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 163061,
    "title": "GIL is not released when calling torch.compile kernels",
    "body": "### \ud83d\udc1b Describe the bug\n\nIn most cases, PyTorch releases GIL when calling CUDA APIs, but I found the GIL is held when calling torch.compile kernels, is this expected? Is it possible to release GIL when calling torch.compile kernels?\n\nTo reproduce, script `torch_compile.py`:\n```python\nimport torch\nimport triton\nimport triton.language as tl\n\ndef torch_add(x: torch.Tensor, y: torch.Tensor):\n    return x + y\n\n@torch.compile\ndef torch_compile_add(x: torch.Tensor, y: torch.Tensor):\n    return x + y\n\n@triton.jit\ndef add_kernel(x_ptr,\n               y_ptr,\n               output_ptr,\n               n_elements,\n               BLOCK_SIZE: tl.constexpr):\n    pid = tl.program_id(axis=0)\n    block_start = pid * BLOCK_SIZE\n    offsets = block_start + tl.arange(0, BLOCK_SIZE)\n    mask = offsets < n_elements\n    x = tl.load(x_ptr + offsets, mask=mask)\n    y = tl.load(y_ptr + offsets, mask=mask)\n    output = x + y\n    tl.store(output_ptr + offsets, output, mask=mask)\n\n\ndef triton_add(x: torch.Tensor, y: torch.Tensor):\n    output = torch.empty_like(x)\n    n_elements = output.numel()\n    grid = lambda meta: (triton.cdiv(n_elements, meta['BLOCK_SIZE']), )\n    add_kernel[grid](x, y, output, n_elements, BLOCK_SIZE=1024)\n    return output\n\n\ndef main():\n    x = torch.randn(4096, 4096, device='cuda')\n    y = torch.randn(4096, 4096, device='cuda')\n    for _ in range(10):\n        torch_add(x, y)\n        torch_compile_add(x, y)\n        triton_add(x, y)\n        \n\nif __name__ == \"__main__\":\n    main()\n```\n\nRun it with \n```bash\nnsys profile -f true --wait primary -t cuda,nvtx,python-gil --cudabacktrace=all --python-backtrace=cuda --python-sampling=true -o torch_compile python torch_compile.py\n```\n\n<img width=\"1539\" height=\"443\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/c6aebdcd-1b25-435e-998a-a7a4208e766b\" />\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.8.0a0+34c6371d24.nv25.08\nIs debug build: False\nCUDA used to build PyTorch: 13.0\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.2 LTS (x86_64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version: 18.1.3 (1ubuntu1)\nCMake version: version 4.0.3\nLibc version: glibc-2.39\n\nPython version: 3.12.3 (main, Jun 18 2025, 17:59:45) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-5.15.0-1086-nvidia-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: 13.0.48\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: \nGPU 0: NVIDIA H200\nGPU 1: NVIDIA H200\n\nNvidia driver version: 575.57.08\ncuDNN version: Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.12.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.12.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.12.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.12.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.12.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.12.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.12.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.12.0\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                            x86_64\nCPU op-mode(s):                          32-bit, 64-bit\nAddress sizes:                           52 bits physical, 57 bits virtual\nByte Order:                              Little Endian\nCPU(s):                                  224\nOn-line CPU(s) list:                     0-223\nVendor ID:                               GenuineIntel\nModel name:                              Intel(R) Xeon(R) Platinum 8480C\nCPU family:                              6\nModel:                                   143\nThread(s) per core:                      2\nCore(s) per socket:                      56\nSocket(s):                               2\nStepping:                                8\nCPU(s) scaling MHz:                      33%\nCPU max MHz:                             3800.0000\nCPU min MHz:                             800.0000\nBogoMIPS:                                4000.00\nFlags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_windo",
    "url": "https://github.com/pytorch/pytorch/issues/163061",
    "state": "closed",
    "labels": [
      "module: performance",
      "triaged",
      "oncall: pt2",
      "module: inductor"
    ],
    "created_at": "2025-09-16T09:00:22Z",
    "updated_at": "2025-09-30T06:49:01Z",
    "comments": 7,
    "user": "syuoni"
  },
  {
    "repo": "pytorch/xla",
    "number": 9646,
    "title": "Correct behavior of `torch.ops.xla.write_mlir_debuginfo`",
    "body": "## \u2753 Correct behavior of `torch.ops.xla.write_mlir_debuginfo`\n\nWhat is the correct behavior of `torch.ops.xla.write_mlir_debuginfo`? Seems it adds debug info all upstream operations not just a direct upstream op. Is it expected behavior?\n\n```python\nimport torch\nimport torch_xla\nimport torch_xla.experimental.xla_mlir_debuginfo\nfrom torch_xla.stablehlo import (StableHLOExportOptions,\n                                 exported_program_to_stablehlo)\n\nclass SampleModel(torch.nn.Module):\n\n      def forward(self, x, y):\n        x = x + y\n        x = x - y\n        x = torch.ops.xla.write_mlir_debuginfo(x, \"MY_SUB\")\n        return x\n\nmodel = SampleModel()\nexported_program = torch.export.export(model,\n                                       (torch.rand(10), torch.rand(10)))\nmlir_text = exported_program_to_stablehlo(\n    exported_program).get_stablehlo_text()\n\nprint(mlir_text)\n```\n\n```\n#loc1 = \"<XLA_MLIR_DEBUGINFO_BEGIN>MY_SUB<XLA_MLIR_DEBUGINFO_END>xla__device_data\"\nmodule @IrToHlo.12 attributes {mhlo.cross_program_prefetches = [], mhlo.input_output_alias = [], mhlo.is_dynamic = false, mhlo.use_auto_spmd_partitioning = false} {\n  func.func @main(%arg0: tensor<10xf32> \"<XLA_MLIR_DEBUGINFO_BEGIN>MY_SUB<XLA_MLIR_DEBUGINFO_END>xla__device_data\", %arg1: tensor<10xf32> \"<XLA_MLIR_DEBUGINFO_BEGIN>MY_SUB<XLA_MLIR_DEBUGINFO_END>xla__device_data\") -> tensor<10xf32> {\n    %0 = stablehlo.add %arg1, %arg0 : tensor<10xf32> \"<XLA_MLIR_DEBUGINFO_BEGIN>MY_SUB<XLA_MLIR_DEBUGINFO_END>aten__add\"\n    %1 = stablehlo.subtract %0, %arg0 : tensor<10xf32> \"<XLA_MLIR_DEBUGINFO_BEGIN>MY_SUB<XLA_MLIR_DEBUGINFO_END>aten__sub\"\n    return %1 : tensor<10xf32> [unknown]\n  } [unknown]\n} [unknown]\n#loc = [unknown]\n#loc2 = \"<XLA_MLIR_DEBUGINFO_BEGIN>MY_SUB<XLA_MLIR_DEBUGINFO_END>aten__add\"\n#loc3 = \"<XLA_MLIR_DEBUGINFO_BEGIN>MY_SUB<XLA_MLIR_DEBUGINFO_END>aten__sub\"\n```",
    "url": "https://github.com/pytorch/xla/issues/9646",
    "state": "open",
    "labels": [
      "question",
      "stablehlo"
    ],
    "created_at": "2025-09-16T00:20:05Z",
    "updated_at": "2025-09-16T14:01:06Z",
    "user": "tlsdmstn56"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2355,
    "title": "Support exporting text-ranking for BERT models",
    "body": "### Feature request\n\nCurrently, `optimum-cli export onnx --model  cross-encoder/ms-marco-MiniLM-L-12-v2 cross-encoder--ms-marco-MiniLM-L-12-v2-onnx` says:\n\n```\nValueError: Asked to export a bert model for the task text-ranking (auto-detected), but the Optimum ONNX exporter only supports the tasks feature-extraction, fill-mask, multiple-choice, question-answering, text-classification, token-classification for bert. Please use a supported task. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the task text-ranking to be supported in the ONNX export for bert.\n```\n\n### Motivation\n\nI'm working on a tool that I intend to distribute to others, for example via `brew install`. It's difficult to packaghe and ship Python, and I also want to prioritize speed of many filesystem and related operations, so I'm writing in Rust, using candle.\n\nIt can be a lot of work to implement every single model type by hand in candle. candle-transformers doesn't implement BertForSequenceClassification. Moreover, as model architectures change, I don't want to have to implement each one. It's great to be able to have the entire computation graph stored as data, as in ONNX.\n\n### Your contribution\n\nI'm willing to take a stab at this! If you think it would be helpful, and if you could give a couple pointers how to start!",
    "url": "https://github.com/huggingface/optimum/issues/2355",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2025-09-15T21:23:35Z",
    "updated_at": "2025-10-21T02:10:29Z",
    "comments": 1,
    "user": "kshitijl"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162971,
    "title": "[CD] Reasonable time constraint for binary builds",
    "body": "### \ud83d\udc1b Describe the bug\n\nIt looks like both CUDA+aarch64, Win+XPU and ROCM build are close towards exceeding 6h threshold\n\n- Could we have some sort of a plan on how to deal with those. I.e. can some build dependencies be cached and build ahead of time as part of the docker image?\n- Is there a matrix somewhere on what types of runners are currently used, and should we switch to a bigger ones?\n\n### Versions\n\nCI\n\ncc @seemethere @atalman @pytorch/pytorch-dev-infra",
    "url": "https://github.com/pytorch/pytorch/issues/162971",
    "state": "open",
    "labels": [
      "module: binaries",
      "module: ci",
      "triaged"
    ],
    "created_at": "2025-09-15T16:21:01Z",
    "updated_at": "2025-09-23T20:23:03Z",
    "comments": 1,
    "user": "malfet"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162957,
    "title": "torch.linalg.eigh uses a large amount of memory in pytorch 2.8.0",
    "body": "### \ud83d\udc1b Describe the bug\n\nRunning torch.linalg.eigh spikes allocated GPU memory in pytorch 2.8.0. For repeated calls on tensors of different batch dimensions the allocated memory increases successively until reaching a plateau. In 2.7.0 the code below consistently uses ~200 MB, in 2.8.0 2-5 GB were allocated for different runs. Memory usage was monitored with nvidia-smi.\n```python\nimport torch\nfor i in range(100):\n    N = torch.randint(4000, 4100, (1,)).item()\n    cov = torch.randn((N, 3, 3), device=\"cuda\")\n    cov = cov @ cov.transpose(-1, -2)\n    cov = cov + torch.eye(3, device=\"cuda\")[None, :, :] * 0.01\n\n    val, vec = torch.linalg.eigh(cov)\n```\nAmong the system specified in Versions below, I reproduced the same issue on an RTX 6000 Ada.\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.8.0+cu128\nIs debug build: False\nCUDA used to build PyTorch: 12.8\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.1 LTS (x86_64)\nGCC version: (Ubuntu 13.2.0-23ubuntu4) 13.2.0\nClang version: Could not collect\nCMake version: version 3.28.3\nLibc version: glibc-2.39\n\nPython version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: 12.6.77\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: GPU 0: NVIDIA RTX A3000 Laptop GPU\nNvidia driver version: 573.24\ncuDNN version: Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.5.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.5.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.5.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.5.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.5.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.5.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.5.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.5.0\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        39 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               16\nOn-line CPU(s) list:                  0-15\nVendor ID:                            GenuineIntel\nModel name:                           11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz\nCPU family:                           6\nModel:                                141\nThread(s) per core:                   2\nCore(s) per socket:                   8\nSocket(s):                            1\nStepping:                             1\nBogoMIPS:                             4992.01\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves vnmi avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2intersect md_clear flush_l1d arch_capabilities\nVirtualization:                       VT-x\nHypervisor vendor:                    Microsoft\nVirtualization type:                  full\nL1d cache:                            384 KiB (8 instances)\nL1i cache:                            256 KiB (8 instances)\nL2 cache:                             10 MiB (8 instances)\nL3 cache:                             24 MiB (1 instance)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-15\nVulnerability Gather data sampling:   Unknown: Dependent on hypervisor status\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Mitigation; Enhanced IBRS\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affec",
    "url": "https://github.com/pytorch/pytorch/issues/162957",
    "state": "open",
    "labels": [
      "needs reproduction",
      "module: cuda",
      "module: memory usage",
      "triaged",
      "module: linear algebra"
    ],
    "created_at": "2025-09-15T12:18:40Z",
    "updated_at": "2025-09-16T08:08:01Z",
    "comments": 2,
    "user": "fjneumann"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162952,
    "title": "The FSDPModule.set_requires_gradient_sync should control reduce-scatter sync and all-reduce sync separately",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nThe current `FSDPModule.set_requires_gradient_sync` implementation controls both `reduce-scatter` and `all-reduce` together. For the multi-node HSDP scenario (replication between nodes, intra-node parameter sharing), in gradient accumulation periods, turning `reduce-scatter` on but  `all-reduce`  off reduces unnecessary network communication between nodes without increasing GPU peak memory usage.  If `reduce-scatter ` is also turned off, `FSDPParam.unsharded_accumulated_grad` maintains a unshared gradient, which causes GPU peak memory  to increase.\n\n## Why does disabling all-reduce sync not increase GPU memory usage\nIf `all-reduce` is turn off, `FSDPParamGroup` maintains `_partial_reduce_output` representing all the shared gradient of `FSDPParam.sharded_param` maintained by the current group and `FSDPParam.sharded_param.grad`  is None. If `all-reduce` is turn on, the gradient is assigned to each `FSDPParam.sharded_param.grad` . So there is no extra GPU memory footprint.\n\nSee more code detail at [FSDPParamGroup.post_backward](https://github.com/pytorch/pytorch/blob/main/torch/distributed/fsdp/_fully_shard/_fsdp_param_group.py#L478) and [foreach_reduce](https://github.com/pytorch/pytorch/blob/main/torch/distributed/fsdp/_fully_shard/_fsdp_collectives.py#L447).\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @ezyang @msaroufim @dcci",
    "url": "https://github.com/pytorch/pytorch/issues/162952",
    "state": "closed",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2025-09-15T09:01:29Z",
    "updated_at": "2025-09-21T03:01:33Z",
    "comments": 3,
    "user": "EquationWalker"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162908,
    "title": "new sparse tensor format implementation: tips",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHi,\nI'm currently working on implementing a new sparse tensor format. I wish to implement a method for the tensor object, such that i can do `A.to_new_format()`, where  `A` is a tensor object. \nCan someone point me on how to implement this kind of feature directly as a method of the tensor object?\n\nThanks\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/162908",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-14T11:31:49Z",
    "updated_at": "2025-09-14T22:07:20Z",
    "comments": 1,
    "user": "ricvigi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162898,
    "title": "Script ./export/unflaten.py has some bugs.",
    "body": "### \ud83d\udc1b Describe the bug\n\nI'm using torch.distributed.pipelining to implement Pipeline Parallelism for my model, but I'm encountering the following error:\n\n<img width=\"2174\" height=\"232\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/fd9e00b0-8be8-4e41-aa27-07d79c568305\" />\nAfter reviewing the source code, I found what appears to be a bug in the run_outer() function. The code handles a node.op == \"placeholder\" and immediately calls run_from(). However, inside run_from(), there's an assert node.op != \"placeholder\". If the graph has multiple placeholder nodes, this assertion will definitely cause the program to crash. I believe this is a bug, so I've filed this issue. \n\n<img width=\"1234\" height=\"1180\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/187e6ef5-7e0d-4c4e-9487-39598a6f294d\" />\n\nIf my assessment is wrong, I would appreciate any advice from the team on how to resolve my error.\n\nNote: My development environment is using PyTorch version 2.6.0, but I've checked your latest version, 2.8.0, and this section of the code appears to be the same.\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.6.0+cu124\nIs debug build: False\nCUDA used to build PyTorch: 12.4\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 22.04.3 LTS (x86_64)\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version: Could not collect\nCMake version: Could not collect\nLibc version: glibc-2.35\n\nPython version: 3.10.15 (main, Oct  3 2024, 07:27:34) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-5.15.0-86-generic-x86_64-with-glibc2.35\nIs CUDA available: True\nCUDA runtime version: 12.2.91\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: \nGPU 0: NVIDIA A100-PCIE-40GB\nGPU 1: NVIDIA A100-PCIE-40GB\nGPU 2: NVIDIA A100-PCIE-40GB\nGPU 3: NVIDIA A100-PCIE-40GB\nGPU 4: NVIDIA A100-PCIE-40GB\nGPU 5: NVIDIA A100-PCIE-40GB\nGPU 6: NVIDIA A100-PCIE-40GB\nGPU 7: NVIDIA A100-PCIE-40GB\n\nNvidia driver version: 535.261.03\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                       x86_64\nCPU op-mode(s):                     32-bit, 64-bit\nAddress sizes:                      46 bits physical, 48 bits virtual\nByte Order:                         Little Endian\nCPU(s):                             80\nOn-line CPU(s) list:                0-79\nVendor ID:                          GenuineIntel\nModel name:                         Intel Xeon Processor (Skylake, IBRS)\nCPU family:                         6\nModel:                              85\nThread(s) per core:                 2\nCore(s) per socket:                 20\nSocket(s):                          2\nStepping:                           4\nBogoMIPS:                           5985.39\nFlags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ibrs ibpb fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 arat\nL1d cache:                          2.5 MiB (80 instances)\nL1i cache:                          2.5 MiB (80 instances)\nL2 cache:                           160 MiB (40 instances)\nL3 cache:                           32 MiB (2 instances)\nNUMA node(s):                       2\nNUMA node0 CPU(s):                  0-39\nNUMA node1 CPU(s):                  40-79\nVulnerability Gather data sampling: Unknown: Dependent on hypervisor status\nVulnerability Itlb multihit:        KVM: Mitigation: VMX unsupported\nVulnerability L1tf:                 Mitigation; PTE Inversion\nVulnerability Mds:                  Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown\nVulnerability Meltdown:             Vulnerable\nVulnerability Mmio stale data:      Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown\nVulnerability Retbleed:             Mitigation; IBRS\nVulnerability Spec rstack overflow: Not affected\nVulnerability Spec store bypass:    Vulnerable\nVulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:           Mitigation; IBRS, IBPB conditional, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected\nVulnerability Srbds:                Not affected\nVulnerability Tsx async abort:      Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown\n\nVersions of relevant libraries:\n[pip3] numpy==1.26.4\n[pip3] nvidia-cublas-cu12==12.4.5.8\n[pip3] nvidia-cuda-cupti-cu12==12.4.127\n[pip3] nvidia-cuda-nvrtc-cu12==12.4.127\n[pip3] nvidia-cuda-runtime-cu12==12.4.127\n[pip3] nvidia-cudnn-cu12==9.1.0.70\n[pip3] nvidia-cufft-cu12==11.2.1.3\n[pip3] nvid",
    "url": "https://github.com/pytorch/pytorch/issues/162898",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "module: pipelining"
    ],
    "created_at": "2025-09-14T05:19:54Z",
    "updated_at": "2025-10-05T13:33:18Z",
    "comments": 1,
    "user": "lileicaca"
  },
  {
    "repo": "pytorch/vision",
    "number": 9215,
    "title": "MixUp and CutMix transforms for semantic segmentation",
    "body": "Is there any way to use the MixUp and CutMix transforms for semantic segmentation masks? I could not find any documentation on it.\n\nIf this functionality does not exist, I will be happy to submit a PR for the same.\n\nMotivation - CutMix is used in SOTA semi-supervised semantic segmentation methods such as [UniMatch](https://arxiv.org/abs/2410.10777) and MixUp is used in knowledge distillation methods such as [\"Knowledge distillation: A good teacher is patient and consistent\"](https://arxiv.org/abs/2106.05237)",
    "url": "https://github.com/pytorch/vision/issues/9215",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-13T11:23:35Z",
    "updated_at": "2025-09-19T18:52:48Z",
    "comments": 1,
    "user": "vedantdalimkar"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162870,
    "title": "[RFC] library function with 64+ arguments",
    "body": "###  Custom op support with 64+ arguments\n\nIs there any plan to support 64+ argument? I have a custom kernel that takes 64+ arguments.\n\n```python\nimport torch\nfrom torch.library import Library, impl, register_fake\n\nnum_args = 65\n\n# Create a new custom namespace\nmy_lib = Library(\"my_ops\", \"LIB\")\n\n# Define a custom operator with a list of tensors as input\nargs = \", \".join([f\"Tensor t{i}\" for i in range(num_args)])\nmy_lib.define(f\"a_func({args}) -> Tensor\")\n```\n\n```\nTraceback (most recent call last):\n  File \"/test/torch_test.py\", line 18, in <module>\n    my_lib.define(f\"a_func({args}) -> Tensor\")\n  File \"/miniconda3/envs/test-venv/lib/python3.11/site-packages/torch/library.py\", line 172, in define\n    result = self.m.define(schema, alias_analysis, tuple(tags))\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nRuntimeError: The function schema has 65 arguments but this PyTorch build only supports 64\n```\n\n\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @anjali411 @chauhang @penguinwu @zou3519 @bdhirsh",
    "url": "https://github.com/pytorch/pytorch/issues/162870",
    "state": "open",
    "labels": [
      "triaged",
      "module: custom-operators",
      "module: library"
    ],
    "created_at": "2025-09-13T04:03:09Z",
    "updated_at": "2025-09-15T23:25:57Z",
    "comments": 1,
    "user": "tlsdmstn56"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162859,
    "title": "[RFC] support symmetric memory in torch.compile",
    "body": "The proposal originally came up in vLLM-compile sync with @ProExpertProg, @Chillee, and @Amir-19 and was also discussed with @ngimel @kwen2501. Recording it here to make sure we're all on the same page.\n\n## Pitch\n\nFor any collective operator (built-in or custom), a user can specify which input must have symmetric memory.\n\ntorch.compile (Inductor) will figure out where the input is coming from and ensure that it is allocated with symmetric memory.\n\nThere are two cases for what type of operator produced the input.\n\n1) built-in operator. Inductor might already preallocate the buffer that is the output of the operator (via memory planning) and it just needs to allocate it with symmetric memory.\n\n```py\nrequires_symmetric_memory(collective, input=0)\n\ndef user_code(x):\n    y = x.sin()\n    z = y.cos()\n    return collective(z)\n\ndef inductor_generated_code(x):\n    with symmetric_memory():\n        buffer = torch.empty()\n    triton_inplace_sin_cos_fused(buffer)\n    return collective(buffer)\n```\n\n\n2) custom operator. Inductor just needs to run the custom operator underneath the symmetric memory context manager. The main risk of this is that more buffers than are needed get allocated with symmetric memory (all tensors produced by the custom op get allocated with symmetric memory), but the user can just re-write their custom op to optimize this\n\n```py\nrequires_symmetric_memory(collective, input=0)\n\ndef user_code(x):\n    y = custom_op(x)\n    return collective(z)\n\ndef inductor_generated_code(x):\n    with symmetric_memory():\n        y = custom_op(x)\n    return collective(y)\n```\n\n## What about eager-mode?\n\nThe API to specify which input needs symmetric memory only applies to torch.compile. So a user would end up writing code that looks like:\n```py\nrequires_symmetric_memory(collective, input=0)\n\ndef user_code(x):\n    if torch.compiler.is_compiling():\n        with symmetric_memory():\n            y = custom_op(x)\n    else:\n        y = custom_op(x)\n    return collective(z)\n```\n\n## What is the API to specify which input needs symmetric memory?\n\n@kwen2501 noted that the choice of which input needs symmetric memory is specific to the collective operator. So one design is just during operator registration, specify that the input needs symmetric memory.\n\n1. torch.library.define(\"my_collective(SymmMemTensor x) -> Tensor\")\n2. torch.library.define(\"my_collective(Tensor x) -> Tensor\", symm_mem_hint=\"x\")\n\nAnother design is a torch.compiler API:\n\ntorch.compiler.specify_symmetric_memory(my_collective, \"x\").\n\nIf we think the choice is actually dynamic (or that some collectives may accept both symmetric and non-symmetric memory?) then this could instead be a context manager:\n```py\n@torch.compile\ndef user_code(y):\n    x = custom_op(y)\n    with torch.compiler.specify_symmetric_memory(my_collective, \"x\"):\n        my_collective(x)\n```\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @ezyang @msaroufim @dcci @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @aakhundov @coconutruben",
    "url": "https://github.com/pytorch/pytorch/issues/162859",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "triaged",
      "oncall: pt2",
      "module: inductor",
      "vllm-compile",
      "module: vllm",
      "module: symm_mem"
    ],
    "created_at": "2025-09-12T22:27:49Z",
    "updated_at": "2025-12-16T18:19:59Z",
    "comments": 26,
    "user": "zou3519"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162854,
    "title": "Move test_quantization tests to run weekly",
    "body": "Currently test_quantization is running on every commit / PR, it's not necessary since we are deprecating the flow: https://docs.pytorch.org/docs/main/quantization.html\n\nAlthough the API is still used, so we want to reduce the cadence the tests are running to weekly.\n\nMain test file: https://github.com/pytorch/pytorch/blob/0dcd9304aa0ea404c2807cb058660e49c9810c20/test/test_quantization.py#L4\n\n1. We need to find how it is called in CI and remove the run, e.g. remove https://github.com/pytorch/pytorch/blob/0dcd9304aa0ea404c2807cb058660e49c9810c20/tools/testing/modulefinder_determinator.py#L43\n2. We need to find how to run weekly jobs, and add test_quantization.py run there\n\nWill likely need dev-infra's help on both of the above.\n \n\ncc @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel @seemethere @malfet @pytorch/pytorch-dev-infra @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/162854",
    "state": "closed",
    "labels": [
      "oncall: quantization",
      "module: ci",
      "module: tests"
    ],
    "created_at": "2025-09-12T21:56:16Z",
    "updated_at": "2025-09-24T11:31:14Z",
    "comments": 1,
    "user": "jerryzh168"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1923,
    "title": "Deploying SmolVLA with a simulator",
    "body": "Has anyone been able to deploy the SmolVLA model to control say the SO-100 on a simulator like IsaacSim? \nEven if the fine-tuning reliably converges the observed performance on the simulator seems erratic. Do we apply the predicted actions from SmolVLA directly into the Articulation controller as positions? ",
    "url": "https://github.com/huggingface/lerobot/issues/1923",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "simulation"
    ],
    "created_at": "2025-09-12T21:06:40Z",
    "updated_at": "2025-12-11T22:07:02Z",
    "user": "aditya1709"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1708,
    "title": "FSDP + compiled autograd",
    "body": "Hi! I was trying out some debug runs using FSDP with compile enabled and found out that compiled autograd doesn't seem to work well with FSDP. (a single gpu run without FSDP seems to work)\n\nIs it possible to make such a setup work or is it just not supported as of now?\n\nLaunching a train run with the arguments below\n```python\ntorchrun \\\n    --standalone \\\n    --nproc-per-node 2 \\\n    --role rank \\\n    --tee 3 \\\n    --local-ranks-filter 0 \\\n    -m torchtitan.train \\\n    --job.config_file torchtitan/models/llama3/train_configs/debug_model.toml \\\n    --training.compile \\\n    --parallelism.enable_compiled_autograd \\\n    --activation-checkpoint.mode none\n```\nfails with an error\n```\n      loss.backward()\n    File \"/usr/local/lib/python3.12/dist-packages/torch/_tensor.py\", line 648, in backward\n      torch.autograd.backward(\n    File \"/usr/local/lib/python3.12/dist-packages/torch/autograd/__init__.py\", line 354, in backward\n      _engine_run_backward(\n    File \"/usr/local/lib/python3.12/dist-packages/torch/autograd/graph.py\", line 829, in _engine_run_backward\n      return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    File \"/usr/local/lib/python3.12/dist-packages/torch/_dynamo/compiled_autograd.py\", line 1354, in set_node_origin\n      raise RuntimeError(\n  RuntimeError: This compiled backward function was saved by AOTAutogradCache, which does not support\n                      compiled autograd. Please turn off AOTAutogradCache using `TORCHINDUCTOR_AUTOGRAD_CACHE=0`.\n```\n\nSetting `TORCHINDUCTOR_AUTOGRAD_CACHE=0` doesn't seem to help much\n\n```\n      loss.backward()\n    File \"/usr/local/lib/python3.12/dist-packages/torch/_tensor.py\", line 648, in backward\n      torch.autograd.backward(\n    File \"/usr/local/lib/python3.12/dist-packages/torch/autograd/__init__.py\", line 354, in backward\n      _engine_run_backward(\n    File \"/usr/local/lib/python3.12/dist-packages/torch/autograd/graph.py\", line 829, in _engine_run_backward\n      return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    File \"/usr/local/lib/python3.12/dist-packages/torch/_dynamo/compiled_autograd.py\", line 1041, in runtime_wrapper\n      out = compiled_fn(\n            ^^^^^^^^^^^^\n    File \"/usr/local/lib/python3.12/dist-packages/torch/_dynamo/eval_frame.py\", line 372, in __call__\n      return super().__call__(*args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1767, in _wrapped_call_impl\n      return self._call_impl(*args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1778, in _call_impl\n      return forward_call(*args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    File \"/usr/local/lib/python3.12/dist-packages/torch/_dynamo/eval_frame.py\", line 699, in compile_wrapper\n      return fn(*args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^\n    File \"/usr/local/lib/python3.12/dist-packages/torch/fx/graph_module.py\", line 840, in call_wrapped\n      return self._wrapped_call(self, *args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    File \"/usr/local/lib/python3.12/dist-packages/torch/fx/graph_module.py\", line 416, in __call__\n      raise e\n    File \"/usr/local/lib/python3.12/dist-packages/torch/fx/graph_module.py\", line 403, in __call__\n      return super(self.cls, obj).__call__(*args, **kwargs)  # type: ignore[misc]\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1767, in _wrapped_call_impl\n      return self._call_impl(*args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1778, in _call_impl\n      return forward_call(*args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    File \"<eval_with_key>.8\", line 4, in forward\n      def forward(self, inputs, sizes, scalars, hooks, packed_data):\n    File \"/usr/local/lib/python3.12/dist-packages/torch/_dynamo/eval_frame.py\", line 893, in _fn\n      return fn(*args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^\n    File \"/usr/local/lib/python3.12/dist-packages/torch/_dynamo/utils.py\", line 4381, in wrapper\n      return compiled_fn(flat_args)\n             ^^^^^^^^^^^^^^^^^^^^^^\n    File \"/usr/local/lib/python3.12/dist-packages/torch/_dynamo/eval_frame.py\", line 893, in _fn\n      return fn(*args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^\n    File \"/usr/local/lib/python3.12/dist-packages/torch/_functorch/aot_autograd.py\", line 1214, in boxed_forward\n      return compiled_fn(flat_args)\n             ^^^^^^^^^^^^",
    "url": "https://github.com/pytorch/torchtitan/issues/1708",
    "state": "open",
    "labels": [
      "module: fsdp",
      "module: torch.compile"
    ],
    "created_at": "2025-09-12T20:42:31Z",
    "updated_at": "2025-09-15T16:24:02Z",
    "comments": 3,
    "user": "antony-frolov"
  },
  {
    "repo": "huggingface/swift-transformers",
    "number": 237,
    "title": "Please help. Seeing issues with Hub when integrating",
    "body": "Hello, I'm trying to integrate WhisperKit via https://github.com/argmaxinc/WhisperKit/blob/main/Package.swift but that seems to bring in [swift-transformers](https://github.com/huggingface/swift-transformers) and Hub. I'm seeing issues as below \n\nHub.package.swiftinterface:34:32: warning: 'BinaryDistinctCharacter' is not a member type of struct 'Hub.Hub'\n23:54:09   32 |   public init(_ str: Foundation.NSString)\n23:54:09   33 |   public init(_ str: Swift.String)\n23:54:09   34 |   public init(_ character: Hub.BinaryDistinctCharacter)\n23:54:09      |                                `- warning: 'BinaryDistinctCharacter' is not a member type of struct 'Hub.Hub'\n23:54:09   35 |   public init(_ characters: [Hub.BinaryDistinctCharacter])\n23:54:09   36 |   public init(stringLiteral value: Swift.String\n\nI'm on xcode 16.4 and using swift 5.10.  Please help!! Thanks in advance! ",
    "url": "https://github.com/huggingface/swift-transformers/issues/237",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-09-12T17:06:28Z",
    "updated_at": "2025-09-17T15:36:52Z",
    "user": "rpatnayakuni22"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162820,
    "title": "[CI][CUDA][Distributed] test_ring_flex_attention failed on 8xB200 Runner",
    "body": "### \ud83d\udc1b Describe the bug\n\nTracked in umbrella https://github.com/pytorch/pytorch/issues/162178 \nJob link: https://github.com/pytorch/pytorch/actions/runs/17660052730/job/50193312091 \n\nFailure message: \n\n`2025-09-12T05:47:07.8805304Z     expect_out, expect_lse = compiled_flex_attention(\n2025-09-12T05:47:07.8805570Z   File \"/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py\", line 841, in compile_wrapper\n2025-09-12T05:47:07.8805776Z     raise e.with_traceback(None) from e.__cause__  # User compiler error\n2025-09-12T05:47:07.8806030Z torch._dynamo.exc.Unsupported: Attempted to call function marked as skipped\n2025-09-12T05:47:07.8806214Z   Explanation: Dynamo does not know how to trace the Python builtin `_warnings.warn`.\n2025-09-12T05:47:07.8806549Z   Hint: If you are attempting to call a logging function (e.g. `_warnings.warn`), you can try adding it to `torch._dynamo.config.reorderable_logging_functions`.\n2025-09-12T05:47:07.8806723Z   Hint: Please file an issue on GitHub so the PyTorch team can add support for it. \n2025-09-12T05:47:07.8806754Z \n2025-09-12T05:47:07.8806953Z   Developer debug context: module: _warnings, qualname: warn, skip reason: <missing reason>\n2025-09-12T05:47:07.8806957Z \n2025-09-12T05:47:07.8807256Z  For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0007.html\n2025-09-12T05:47:07.8807260Z \n2025-09-12T05:47:07.8807348Z from user code:\n2025-09-12T05:47:07.8807707Z    File \"/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/nn/attention/flex_attention.py\", line 1613, in flex_attention\n2025-09-12T05:47:07.8807824Z     _warn_once(\n2025-09-12T05:47:07.8808100Z   File \"/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/nn/attention/flex_attention.py\", line 65, in _warn_once\n2025-09-12T05:47:07.8808250Z     warnings.warn(message, category, stacklevel=2)\n2025-09-12T05:47:07.8808254Z \n2025-09-12T05:47:07.8808676Z Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS=\"+dynamo\"\n2025-09-12T05:47:07.8808680Z \n2025-09-12T05:47:07.8808683Z \n2025-09-12T05:47:07.8808831Z To execute this test, run the following from the base repo dir:\n2025-09-12T05:47:07.8809086Z     python test/distributed/tensor/test_attention.py RingFlexAttentionTest.test_ring_flex_attention\n2025-09-12T05:47:07.8809090Z \n2025-09-12T05:47:07.8809286Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0\n2025-09-12T05:47:07.8809421Z !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!\n2025-09-12T05:47:07.8809584Z ================== 1 failed, 5 deselected, 2 rerun in 40.40s ===================`\n\n\n\n### Versions\n\nTOT\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @ezyang @msaroufim @dcci @seemethere @malfet @pytorch/pytorch-dev-infra @mruberry @chauhang @penguinwu @zou3519 @ydwu4 @bdhirsh @Chillee @drisspg @yanboliang @BoyuanFeng",
    "url": "https://github.com/pytorch/pytorch/issues/162820",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "module: ci",
      "module: tests",
      "triaged",
      "module: higher order operators",
      "module: pt2-dispatcher",
      "module: flex attention"
    ],
    "created_at": "2025-09-12T16:29:01Z",
    "updated_at": "2025-09-22T22:23:48Z",
    "comments": 3,
    "user": "nWEIdia"
  },
  {
    "repo": "pytorch/ao",
    "number": 2989,
    "title": "Quantized model is slower than original model!",
    "body": "Hello,\nI have put together this benchmark and I am wondering why the quantised version is so much slower. Is there something that I have missed or is it simply that the model is small and the overhead of quantization is not worth it in this case? \n\nThe results are the following.\n\n```\nBenchmarking: model_fp32.onnx\nWarming up (100 iterations)...\nRunning benchmark (1000 iterations)...\nAverage: 0.014 ms\nMedian: 0.014 ms\nStd Dev: 0.002 ms\nMin/Max: 0.012/0.063 ms\nThroughput: 70994.7 samples/sec\n```\n\n```\nBenchmarking: model_quantized.onnx\nWarming up (100 iterations)...\nRunning benchmark (1000 iterations)...\nAverage: 0.045 ms\nMedian: 0.044 ms\nStd Dev: 0.007 ms\nMin/Max: 0.042/0.144 ms\nThroughput: 22114.3 samples/sec\n```\n\nhere is the code\n\n```\nimport torch\nfrom torchao.quantization import quantize_, Int8DynamicActivationInt4WeightConfig\nfrom torchao.quantization.qat import QATConfig\nfrom torchvision.ops import MLP\nimport onnxruntime as ort\nimport numpy as np\nimport time\nimport statistics\nfrom typing import Dict, Tuple\ninput_dims = 512\ngroup_size = 64\n\ndef get_model():\n    return MLP(\n        in_channels=input_dims,\n        hidden_channels=[256, 128, 64, 1]\n    )\n\ndef train_loop(m: torch.nn.Module):\n    optimizer = torch.optim.SGD(m.parameters(), lr=0.001, momentum=0.9, weight_decay=1e-5)\n    loss_fn = torch.nn.CrossEntropyLoss()\n    for i in range(10):\n        example = torch.randn(32,input_dims)\n        target = torch.randn(32,1)\n        output = m(example)\n        loss = loss_fn(output, target)\n        loss.backward()\n        optimizer.step()\n        optimizer.zero_grad()\n\ndef benchmark_onnx_inference(\n    model_path: str, \n    input_shapes: Dict[str, Tuple], \n    num_warmup: int = 10,\n    num_iterations: int = 100\n) -> Dict:\n    \"\"\"Benchmark ONNX model inference speed\"\"\"\n    \n    print(f\"Benchmarking: {model_path}\")\n    \n    # Create inference session\n    session = ort.InferenceSession(model_path)\n    \n    # Get input/output info\n    input_names = [inp.name for inp in session.get_inputs()]\n    output_names = [out.name for out in session.get_outputs()]\n    \n    # Prepare inputs with exact shapes provided\n    inputs = {}\n    for name, shape in input_shapes.items():\n        inputs[name] = np.random.randn(*shape).astype(np.float32)\n    \n    # Warmup\n    print(f\"  Warming up ({num_warmup} iterations)...\")\n    for _ in range(num_warmup):\n        _ = session.run(output_names, inputs)\n    \n    # Actual benchmark\n    print(f\"  Running benchmark ({num_iterations} iterations)...\")\n    times = []\n    \n    for i in range(num_iterations):\n        start_time = time.perf_counter()\n        outputs = session.run(output_names, inputs)\n        end_time = time.perf_counter()\n        \n        times.append((end_time - start_time) * 1000)  # Convert to ms\n    \n    # Calculate statistics\n    avg_time = statistics.mean(times)\n    median_time = statistics.median(times)\n    std_time = statistics.stdev(times) if len(times) > 1 else 0\n    min_time = min(times)\n    max_time = max(times)\n    \n    # Determine batch size from first input shape\n    batch_size = list(input_shapes.values())[0][0] if input_shapes else 1\n    \n    results = {\n        'avg_ms': avg_time,\n        'median_ms': median_time,\n        'std_ms': std_time,\n        'min_ms': min_time,\n        'max_ms': max_time,\n        'throughput_samples_per_sec': batch_size * 1000 / avg_time,\n        'all_times': times,\n        'batch_size': batch_size,\n        'input_shapes': input_shapes\n    }\n    \n    print(f\"  Average: {avg_time:.3f} ms\")\n    print(f\"  Median: {median_time:.3f} ms\")\n    print(f\"  Std Dev: {std_time:.3f} ms\") \n    print(f\"  Min/Max: {min_time:.3f}/{max_time:.3f} ms\")\n    print(f\"  Throughput: {batch_size * 1000 / avg_time:.1f} samples/sec\")\n    \n    return results\n\ndef comprehensive_quantization_test():\n    \"\"\"Complete test to verify quantization is working\"\"\"\n    print(\"=== Comprehensive Quantization Verification ===\\n\")\n    \n    #  Create models\n    model_fp32 = get_model()\n    model_quantized = get_model()\n    \n    # Apply quantization\n    base_config = Int8DynamicActivationInt4WeightConfig(group_size=group_size)\n    quantize_(model_quantized, QATConfig(base_config, step=\"prepare\"))\n    \n    # Train quantized model\n    train_loop(model_quantized)\n    \n    quantize_(model_quantized, QATConfig(base_config, step=\"convert\"))\n    # save models to onnx\n    torch.onnx.export(model_fp32, torch.randn(1, input_dims), \"model_fp32.onnx\", dynamo=True)\n    torch.onnx.export(model_quantized, torch.randn(1, input_dims), \"model_quantized.onnx\", dynamo=True)\n    \n    input_shapes = {\"input\": (1, input_dims)} \n    results_fp32 = benchmark_onnx_inference(\n        \"model_fp32.onnx\", \n        input_shapes,\n        num_warmup=100,\n        num_iterations=1000\n    )\n    results_quantized = benchmark_onnx_inference(\n        \"model_quantized.onnx\", \n        input_shapes,\n        num_warmup=100,\n        num_iterations=1000\n    )\n    \ncomprehensive_quantization_test()\n```",
    "url": "https://github.com/pytorch/ao/issues/2989",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-12T05:00:23Z",
    "updated_at": "2025-09-12T18:31:28Z",
    "comments": 8,
    "user": "timpiperseek"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162782,
    "title": "Is `torch.nn.functional.gumbel_softmax` going to be deprecated?",
    "body": "Is this function really going to be deprecated going forward? If so I will write my own version. Thanks! \n\nThere is the following issue on this page: https://docs.pytorch.org/docs/stable/generated/torch.nn.functional.gumbel_softmax.html\n\ncc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki",
    "url": "https://github.com/pytorch/pytorch/issues/162782",
    "state": "open",
    "labels": [
      "module: nn",
      "triaged",
      "module: deprecation"
    ],
    "created_at": "2025-09-12T00:48:11Z",
    "updated_at": "2025-09-19T17:36:22Z",
    "comments": 1,
    "user": "michaelfortunato"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162719,
    "title": "linalg.eig does not get parallelized on CPU",
    "body": "### \ud83d\udc1b Describe the bug\n\nI have a lengthy calculation that relies on eigendecomposition of non-Hermitian matrices in one place. The reason I picked PyTorch is the straightforward parallel nature of its ops, however that does not seem to be the case with `eig`. While I know it calls a BLAS routine under the hood, I am actually calculating batches of matrices, so there is potential for a speedup there. However, looking at the code below:\n```python\nimport torch\nimport timeit\nimport psutil\nimport matplotlib.pyplot as plt\nimport numba\nimport numpy as np\n\nstmt = \"torch.linalg.eig(e)\"\nruntimes = []\nthreads = [1] + [t for t in range(2, 30, 2)]\nfor t in threads:\n    torch.set_num_threads(t)\n    try:\n        numba.set_num_threads(t)\n    except ValueError:\n        pass\n\n    r = timeit.timeit(\n        setup=\"e = torch.randn(200, 25, 25, dtype=torch.cdouble)\",\n        stmt=stmt,\n        number=100,\n        globals=globals(),\n    )\n    runtimes.append(r)\n\nplt.plot(threads, runtimes)\nplt.xlabel(\"Number of Threads\")\nplt.ylabel(\"Runtime (seconds)\")\nplt.title(stmt)\nnum_cores = psutil.cpu_count(logical=False)\nnum_threads = psutil.cpu_count()\nif num_threads is not None and num_cores is not None:\n    plt.axvline(x=num_cores, color='g', linestyle='--', label='Physical Cores')\n    plt.axvline(x=num_threads, color='r', linestyle='--', label='Logical Cores')\n    plt.legend()\nplt.grid()\nplt.show()\n```\n\nI get the following relation:\n\n<img width=\"567\" height=\"455\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/306ee486-84a7-445c-a83a-a9c86ad2c5c9\" />\n\nSo not only is there no speedup, there is even a slowdown caused by threads!\n\nSince BLAS routines may utilise multiple threads, I compared it with a custom numba based torch op:\n\n```python\n@numba.jit(nopython=True, parallel=True, cache=True)\ndef batch_eig(batch):\n    shape = batch.shape\n    batch_dims = shape[:-2]  # All dimensions except the last two (matrix dimensions)\n    n = shape[-1]\n\n    total_matrices = 1\n    for dim in batch_dims:\n        total_matrices *= dim\n    \n    flat_batch = batch.reshape(total_matrices, n, n)\n\n    eigvecs = np.zeros_like(flat_batch)\n    eigvals = np.zeros((total_matrices, n), dtype=np.complex128)\n\n    for i in numba.prange(total_matrices):\n        eigvals[i], eigvecs[i] = np.linalg.eig(flat_batch[i])\n\n    return eigvals.reshape(batch_dims + (n,)), eigvecs.reshape(batch_dims + (n, n))\n\n@torch.library.custom_op(\"mylib::eig\", mutates_args=())\ndef eig(pic: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]:\n    E, U = batch_eig(pic.numpy())\n    return torch.from_numpy(E), torch.from_numpy(U)\n\n@eig.register_fake\ndef _(pic):\n    eigvals = torch.empty(pic.shape[:-1], dtype=torch.cdouble)\n    eigvecs = torch.empty(pic.shape, dtype=torch.cdouble)\n    return eigvals, eigvecs\n```\n\nand the result can be seen below:\n<img width=\"554\" height=\"455\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/861a9be7-674e-48a8-bd22-0b824d8a1313\" />\n\nUnfortunately, I'm no expert in torch internals, but I also need autograd and don't want to rely on my `numba` based implementation. Perhaps it is connected to the fact that `eig` does not even compile: #159445\n\n### Versions\n\nPyTorch version: 2.8.0+cpu\nIs debug build: False\nCUDA used to build PyTorch: Could not collect\nROCM used to build PyTorch: N/A\n\nOS: Microsoft Windows 11 Pro (10.0.26100 64-bit)\nGCC version: (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r2) 14.2.0\nClang version: 19.1.1\nCMake version: version 3.30.4\nLibc version: N/A\n\nPython version: 3.11.3 (tags/v3.11.3:f3909b8, Apr  4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] (64-bit runtime)\nPython platform: Windows-10-10.0.26100-SP0\nIs CUDA available: False\nCUDA runtime version: 12.8.61\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 3060\nNvidia driver version: 576.80\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nName: 13th Gen Intel(R) Core(TM) i5-13600KF\nManufacturer: GenuineIntel\nFamily: 205\nArchitecture: 9\nProcessorType: 3\nDeviceID: CPU0\nCurrentClockSpeed: 3500\nMaxClockSpeed: 3500\nL2CacheSize: 20480\nL2CacheSpeed: None\nRevision: None\n\nVersions of relevant libraries:\n[pip3] numpy==2.2.6\n[pip3] torch==2.8.0+cpu\n[conda] Could not collect\n\ncc @jerryzh168 @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @jianyuh @nikitaved @mruberry @walterddr @xwang233 @Lezcano",
    "url": "https://github.com/pytorch/pytorch/issues/162719",
    "state": "open",
    "labels": [
      "module: performance",
      "module: cpu",
      "triaged",
      "module: linear algebra"
    ],
    "created_at": "2025-09-11T12:09:57Z",
    "updated_at": "2025-10-02T12:03:49Z",
    "comments": 5,
    "user": "krokosik"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40815,
    "title": "get_decoder feature regression in 4.56.0",
    "body": "### System Info\n\nIn the release of transformers v4.56.0, this PR https://github.com/huggingface/transformers/pull/39509 introduced a refactor of the public `get_decoder` method which previously existed on modes by moving it to the PreTrainedModel class.\n\nUnfortunately this introduced a significant behavior change in that `*CausalForLM` models no longer have the same behavior of having `get_decoder()` return the underlying base model.\n\nFor example a `MistralForCausalLM` model named `model` returns `None` when `model.get_decoder()` is called. \n\nThe logic for why is occurring is obvious when looking at the offending PR:\n\n```python\ndef get_decoder(self):\n        \"\"\"\n        Best-effort lookup of the *decoder* module.\n        Order of attempts (covers ~85 % of current usages):\n        1. `self.decoder`\n        2. `self.model`                       (many wrappers store the decoder here)\n        3. `self.model.get_decoder()`         (nested wrappers)\n        4. fallback: raise for the few exotic models that need a bespoke rule\n        \"\"\"\n        if hasattr(self, \"decoder\"):\n            return self.decoder\n\n        if hasattr(self, \"model\"):\n            inner = self.model\n            if hasattr(inner, \"get_decoder\"):\n                return inner.get_decoder()\n            return inner\n\n        return None\n```\n\nIn these cases the `if hasattr(self, \"model\"):` conditional block is entered, and the underlying model has a `get_decoder` method, as it is a `PreTrainedModel`, as all transformers models are. This block will always be entered. At this point we are now in the decoder itself calling its `get_decoder` method. The decoder has no decoder or model attribute, so the function returns `None`, which is the passed to the parent caller.\n\nThere are a couple of ways this could be fixed, but I don't know what their current impact would be on other parts of the code. I may open a PR, but I am quite busy at the moment. @molbap @ArthurZucker  since you were the authors and reviewers here, do you mind taking another look at this?\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nUse `get_decoder` on say a `MistralForCausalLM` model.\n\n### Expected behavior\n\nThe underlying `model` attribute should be returned for `*ForCausalLM` models, not None, as these models are decoder only models by transformers convention.",
    "url": "https://github.com/huggingface/transformers/issues/40815",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-09-11T09:25:12Z",
    "updated_at": "2025-09-16T08:57:14Z",
    "comments": 4,
    "user": "KyleMylonakisProtopia"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40813,
    "title": "Incorrect sharding configuration for Starcoder2 model",
    "body": "### System Info\n\nTransformers main branch (commit [0f1b128](https://github.com/huggingface/transformers/commit/0f1b128d3359a26bd18be99c26d7f04fb3cba914) )\n- `transformers` version: 4.57.0.dev0\n- Platform: Linux-5.15.0-1030-nvidia-x86_64-with-glibc2.39\n- Python version: 3.12.3\n- Huggingface_hub version: 0.34.4\n- Safetensors version: 0.5.3\n- Accelerate version: 1.10.1\n- Accelerate config:    not found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.8.0a0+5228986c39.nv25.06 (CUDA)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: tensor-parallel\n- Using GPU in script?: yes\n- GPU type: NVIDIA H100 80GB HBM3\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nTunning TP inference on `bigcode/starcoder2-7b` throws an error with incorrect tensor shapes due to `base_model_tp_plan` misconfiguration.\n\n`demo.py`:\n```\nimport os\nimport torch\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nmodel_id = \"bigcode/starcoder2-7b\"\nmodel = AutoModelForCausalLM.from_pretrained(model_id, tp_plan=\"auto\")\n\nmodel._tp_plan['model.layers.*.mlp.c_proj'] = 'rowwise'\nprint(f\"TP plan: {model._tp_plan}, class: {type(model._tp_plan)}\")\n\ntokenizer = AutoTokenizer.from_pretrained(model_id)\nprompt = \"Can I help\"\ninputs = tokenizer(prompt, return_tensors=\"pt\").input_ids.to(model.device)\n\n# distributed run\noutputs = model(inputs)\n\n# print the output\nprint(outputs)\n```\nrun with\n```\ntorchrun --nproc_per_node=2 demo.py\n```\n\nThe correct `base_model_tp_plan` should replace:\n```\n['model.layers.*.mlp.c_proj'] = 'colwise'\n```\nwith \n```\n['model.layers.*.mlp.c_proj'] = 'rowwise'\n```\n\n### Expected behavior\n\nThrows:\n```\n(...)\n[rank0]:   File \"/lustre/fs1/portfolios/coreai/users/gkwasniewski/hf-repo/transformers/src/transformers/models/starcoder2/modeling_starcoder2.py\", line 65, in forward\n[rank0]:     hidden_states = self.c_proj(hidden_states)\n[rank0]:                     ^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1751, in _wrapped_call_impl\n[rank0]:     return self._call_impl(*args, **kwargs)\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1857, in _call_impl\n[rank0]:     return inner()\n[rank0]:            ^^^^^^^\n[rank0]:   File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1805, in inner\n[rank0]:     result = forward_call(*args, **kwargs)\n[rank0]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/linear.py\", line 125, in forward\n[rank0]:     return F.linear(input, self.weight, self.bias)\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/usr/local/lib/python3.12/dist-packages/torch/_compile.py\", line 51, in inner\n[rank0]:     return disable_fn(*args, **kwargs)\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/usr/local/lib/python3.12/dist-packages/torch/_dynamo/eval_frame.py\", line 850, in _fn\n[rank0]:     return fn(*args, **kwargs)\n[rank0]:            ^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/usr/local/lib/python3.12/dist-packages/torch/distributed/tensor/_api.py\", line 350, in __torch_dispatch__\n[rank0]:     return DTensor._op_dispatcher.dispatch(\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/usr/local/lib/python3.12/dist-packages/torch/distributed/tensor/_dispatch.py\", line 160, in dispatch\n[rank0]:     self.sharding_propagator.propagate(op_info)\n[rank0]:   File \"/usr/local/lib/python3.12/dist-packages/torch/distributed/tensor/_sharding_prop.py\", line 266, in propagate\n[rank0]:     OutputSharding, self.propagate_op_sharding(op_info.schema)\n[rank0]:                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/usr/local/lib/python3.12/dist-packages/torch/distributed/tensor/_sharding_prop.py\", line 45, in __call__\n[rank0]:     return self.cache(*args, **kwargs)\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/usr/local/lib/python3.12/dist-packages/torch/distributed/tensor/_sharding_prop.py\", line 279, in propagate_op_sharding_non_cached\n[rank0]:     out_tensor_meta = self._propagate_tensor_meta_non_cached(op_schema)\n[rank0]:                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/usr/local/lib/python3.12/dist-packages/torch/distributed/tensor/_sharding_prop.py\", line 126, in _propagate_tensor_meta_non_cached\n[rank0]:     fake_out = op_schema.op(*fake_args, **fake_kwargs)\n[rank0]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[ra",
    "url": "https://github.com/huggingface/transformers/issues/40813",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-09-11T09:02:53Z",
    "updated_at": "2025-09-15T08:46:33Z",
    "comments": 1,
    "user": "greg-kwasniewski1"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1911,
    "title": "How to avoid re-write cache data from pyarrow into parquet everytime?",
    "body": "Hi Authors,\n\nWhen using lerobot dataset in a pytorch dataloader, lerobot dataset will write a huge cache data which is converted from pyarrow to Apache Parquet. How to avoid that?\n\nI can think of two options:\n\n1. Avoid converting to Parquet data and directly read from parquet data. But this may loose reading performance.\n2. Can we instead store the Parquet data? \n\nThanks.\n\nSonglin",
    "url": "https://github.com/huggingface/lerobot/issues/1911",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-10T22:19:25Z",
    "updated_at": "2025-09-10T22:19:25Z",
    "user": "songlinwei-we"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162638,
    "title": "Gradient Clipping in Pipeline Parallelism Schedules",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nThe current PP schedules like `Schedule1F1B` don't seem to have built-in gradient clipping support. \nIs there a recommended approach for implementing gradient clipping in pipeline parallelism, and what would be the most efficient way to compute global gradient norms across sharded parameters? \nWould it be possible to add gradient clipping as a built-in feature to the PP schedule classes with parameters like `grad_clip_norm` and `clip_interval`? \nThis would be really helpful for users who need gradient clipping in their PP training workflows, especially for scenarios where training stability is important.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @ezyang @msaroufim @dcci @albanD @gqchen @nikitaved @soulitzer @Varal7 @xmfan",
    "url": "https://github.com/pytorch/pytorch/issues/162638",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "module: autograd"
    ],
    "created_at": "2025-09-10T20:48:20Z",
    "updated_at": "2025-09-11T15:12:36Z",
    "comments": 0,
    "user": "nvlas"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162630,
    "title": "[RFC] Intrusive Caching DLPack for Fast Conversion",
    "body": "Currently DLPack is being used for Tensor data exchange. This conversion, which involves populating metadata such as shape, data pointer, and strides, can introduce a small but non-negligible overhead, typically in the range of 40-80 nanoseconds on the C++ side. While this latency is already quite low, frequent tensor exchanges\u2014such as those involving model weights or intermediate values used multiple times\u2014can accumulate this overhead. \n\nThis RFC addresses the question of whether this overhead can be further reduced, particularly in scenarios where the same tensor is converted to DLPack multiple times during its lifetime. \n\nIt does involve change to the c10::TensorImpl data structure, so likely needs to be done with care. This post first put the high-level idea out to the community to seek feedbacks.\n\n## Proposal\n\nWe propose an approach that integrates a caching mechanism directly into the framework's tensor object. The high-level concept is as follows:\n\n- **Cache Storage**: A std::unique_ptr<DLManagedTensorVersioned> will be added as a member field to the framework's tensor object (e.g., TensorImpl). This modification requires a change to the framework's internal tensor structure.\n- **On-Demand Population**: When the ToDLPack conversion method is called for the first time on a given tensor, the DLManagedTensorVersioned object will be created and populated. The framework's internal metadata will be transferred, and the manager_ctx of the DLManagedTensorVersioned will be set to point back to the TensorImpl itself. The deleter will also be configured at this time.\n-  **Ref counting integration** \n     -  To prevent the TensorImpl from being deallocated while a DLPack consumer holds a reference, a new reference will be added to the TensorImpl intrusive reference counter each time a DLManagedTensorVersioned is returned. \n     - The DLManagedTensorVersioned's deleter function will be configured to simply decrement the TensorObj's reference counter. This ensures that the TensorImpl and its cached DLManagedTensorVersioned are not deallocated until all DLPack and internal references are released.\n- **Cache Reuse**: For subsequent calls to ToDLPack on the same tensor object, the cached DLManagedTensorVersioned will be directly returned. The only overhead will be a pointer lookup and a reference count increment, which is an extremely fast operation, measured to be **as low as 3.8 nanosecond** in preliminary benchmarks.\n\n## Thread Safety\nIn C++ environment, different thread may concurrent write to the cached field and it is important to consider thread-safety, so only one cached value is written and returned to the user. Here is an updated version, at high-level:\n\n- Different thread can race to create their own DLManagedTensorVersioned when they find cached field is nullptr\n- Use atomic_compare_exchange_strong_explicit to ensure one of the value get stored and only store it when the cached field is nullptr\n- Always return the stored value, and if the value is created by another thread, delete the current one and return the value created by another thread\n\n\n## Expected Benefits and Tradeoffs\n\n- **Significant Performance Improvement**: This caching strategy can reduce the DLPack conversion overhead from 40-80ns to a mere 1ns for repeated conversions.\n- **Reduced Redundancy**: Avoids repeated allocation and population of DLManagedTensorVersioned objects for the same tensor.\n- **Minimal Cost**: The overhead of this approach is limited to one extra pointer field per tensor object, which is negligible given the typical size of tensor metadata and data.\n\n## Example Implementation\n\nThe following C++ code snippet illustrates the proposed mechanism within a hypothetical TensorImpl class that uses intrusive reference counting .\n\n```c++\n#include <atomic>\n\n// TensorImpl is a target of an intrusive ptr that contains a reference counter.\n// in the context of PyTorch, based on my understanding,\n// it would be c10::TensorImpl or something c10::TensorImpl holds like ExtraMeta\nclass TensorImpl : public intrusive_ptr_target<TensorImpl> {\n public:\n  ~TensorImpl() {\n    // deleting the cached dl managed tensor versioned\n    // We need to acquire the value in case it is released by another thread\n    // However, because this destructor is triggered as part of the intrusive pointer deletion\n    // there is already a memory fence in intrusive pointer deleter triggering to ensure\n    // all fields of the TensorImpl are visible here, so we do not have to do acquire, actually \n    // we can even do a non-atomic load here\n    DLManagedTensorVersioned* cached = cached_dl_managed_tensor_.load(\n      std::memory_order_relaxed);\n    if (cached != nullptr) {\n      delete cached;\n    }\n  }\n  /*!\n   * \\brief Converts the current Tensor to a DLPack Tensor.\n   * \\return The converted DLManagedTensorVersioned pointer.\n   */\n  DLManagedTensorVersioned* ToDLPack() const {\n    // this function holds a strong reference to the TensorImpl\n    TensorImpl* self =",
    "url": "https://github.com/pytorch/pytorch/issues/162630",
    "state": "closed",
    "labels": [
      "triaged",
      "enhancement",
      "module: dlpack"
    ],
    "created_at": "2025-09-10T20:00:53Z",
    "updated_at": "2025-09-12T20:26:48Z",
    "comments": 15,
    "user": "tqchen"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162606,
    "title": "Tensorpipe - ROCm support",
    "body": "Raising this issue to discuss on the path forward to enable tensorpipe feature on ROCm.\n\nWhy it is required\n- UT gap, currently tensorpipe related UTs are skipped on ROCm but executed for CUDA.\n\nTensorpipe repo was archived few year back and no changes were accepted. Recently  https://github.com/pytorch/tensorpipe/commits/main/ it was open back.\n\nAs far as I know discussing with @atalman, CI for tensorpipe is removed.\nSo we want to discuss how to push changes to support it on ROCm.\n\nOld PR, which tried to enable it for ROCm, but got dropped for different reasons.\n- https://github.com/pytorch/tensorpipe/pull/398\n- https://github.com/pytorch/tensorpipe/pull/401\n\ncc @jeffdaily @sunway513 @jithunnair-amd @ROCmSupport @dllehr-amd @jataylo @hongxiayang @naromero77amd @osalpekar @jiayisuse @lw @beauby @pritamdamania87 @mrshenli @jjlilley @gqchen @malfet @atalman @pragupta @dwiddows",
    "url": "https://github.com/pytorch/pytorch/issues/162606",
    "state": "open",
    "labels": [
      "module: rocm",
      "triaged",
      "module: tensorpipe",
      "rocm"
    ],
    "created_at": "2025-09-10T16:03:52Z",
    "updated_at": "2025-12-17T02:56:09Z",
    "comments": 8,
    "user": "pruthvistony"
  },
  {
    "repo": "pytorch/ao",
    "number": 2967,
    "title": "Deprecation for IntxWeightOnlyConfig/Int8DynamicActivationIntxWeightConfig (version 1) and the models",
    "body": "This issue is tracking the deprecation of the (1) configs (2) model checkpoints quantized with these configs.\n\nWhat is deprecated:\n* IntxWeightOnlyConfig/Int8DynamicActivationIntxWeightConfig with version=1 is now deprecated.  Please use version=2 (current default).\n* Quantized checkpoints quantized with version 1 config previously are deprecated as well, and we plan to remove the support to load these checkpoints after pytorch 2.11 release (around 9 months from now)\n\nTimeline:\n0.14.0: annouce deprecation for version 1 config\nafter all tensors are migrated: remove support for version 1 config\nafter pytorch 2.11 release: remove support for version 1 checkpoints",
    "url": "https://github.com/pytorch/ao/issues/2967",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-09T20:35:13Z",
    "updated_at": "2025-10-02T20:50:10Z",
    "comments": 0,
    "user": "metascroy"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162512,
    "title": "Default Google Search to Off in docs",
    "body": "<img width=\"967\" height=\"722\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/820499bb-1237-4a9c-9946-71c67ef88f6d\" />\n\nTwo comments on the search bar in the new UI:\n1. It is inconvenient that the search bar is not on the same screen as the search results, so I cannot see both at the same time.\n2. I searched \"quantile\", which in the new search bar yields no obvious results. Looking a little harder encourages me to click on the .diag result, which then is one more sidebar click away from what I'm actually looking for. Contrast this to the old experience, which directly suggested the right page. \n\n<img width=\"1053\" height=\"575\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/46fe8b7f-13b7-43cb-8d3c-4c7cf5f3c36d\" />\n\nI'm slowly realizing that maybe this poor experience is just cuz the toggle in the search bar that says \"Search Google\" is on, and turning it off has been better. Should we turn Google Search off by default then?\n\ncc @svekars @sekyondaMeta @AlannaBurke",
    "url": "https://github.com/pytorch/pytorch/issues/162512",
    "state": "open",
    "labels": [
      "module: docs",
      "triaged"
    ],
    "created_at": "2025-09-09T18:14:06Z",
    "updated_at": "2025-09-09T18:24:50Z",
    "comments": 1,
    "user": "janeyx99"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40767,
    "title": "3D Object Detection Models",
    "body": "### Model description\n\nHi together,\nis there a reason or any other thread where 3D models like those at mmdet3d are discussed to be implemented. I have not found any discussion.\nThanks\n\n### Open source status\n\n- [ ] The model implementation is available\n- [ ] The model weights are available\n\n### Provide useful links for the implementation\n\nBEVFormer: \nhttps://github.com/fundamentalvision/BEVFormer",
    "url": "https://github.com/huggingface/transformers/issues/40767",
    "state": "open",
    "labels": [
      "New model"
    ],
    "created_at": "2025-09-09T13:16:33Z",
    "updated_at": "2025-11-13T21:18:40Z",
    "comments": 3,
    "user": "SeucheAchat9115"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 162481,
    "title": "Incosistent tracking of device activities when calling profiler.step() in torch profiler",
    "body": "### \ud83d\udc1b Describe the bug\n\nHere is a simple example of using profiler's scheduling functionality:\n\n```python\nimport torch\n\ndef bench_kineto(fn, num_tests: int):\n    flush_l2_size = int(8e9 // 4)\n\n    schedule = torch.profiler.schedule(wait=0, warmup=1, active=1, repeat=1)\n    profiler = torch.profiler.profile(activities=[torch.profiler.ProfilerActivity.CUDA], schedule=schedule)\n    with profiler:\n        for i in range(2):\n            for _ in range(num_tests):\n                torch.empty(flush_l2_size, dtype=torch.int, device='cuda').zero_()\n                fn()\n            profiler.step()\n\n    print(num_tests)\n    print(profiler.key_averages().table(sort_by='cuda_time_total', max_name_column_width=50))\n\n@torch.inference_mode()\ndef main():\n    torch.set_default_device(\"cuda\")\n    torch.set_default_dtype(torch.bfloat16)\n\n    a = torch.randn(1024, 1024)\n    b = torch.randn(1024, 1024)\n\n    def func():\n        return a @ b\n    \n    bench_kineto(func, 10)\n    bench_kineto(func, 10)\n\nif __name__ == \"__main__\":\n    main()\n```\n\nThe output is:\n\n```text\n10\n--------------------------------------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  \n                                              Name    Self CPU %      Self CPU   CPU total %     CPU total  CPU time avg     Self CUDA   Self CUDA %    CUDA total  CUDA time avg    # of Calls  \n--------------------------------------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  \nvoid at::native::vectorized_elementwise_kernel<...         0.00%       0.000us         0.00%       0.000us       0.000us      45.480ms        99.71%      45.480ms     606.404us            75  \n                nvjet_tst_128x64_64x8_1x2_h_bz_NNT         0.00%       0.000us         0.00%       0.000us       0.000us     130.304us         0.29%     130.304us       6.858us            19  \n                                  cudaLaunchKernel         0.26%     118.601us         0.26%     118.601us       2.965us       0.000us         0.00%       0.000us       0.000us            40  \n                                  cuLaunchKernelEx         0.08%      35.264us         0.08%      35.264us       3.526us       0.000us         0.00%       0.000us       0.000us            10  \n                             cudaDeviceSynchronize        99.66%      45.347ms        99.66%      45.347ms      45.347ms       0.000us         0.00%       0.000us       0.000us             1  \n--------------------------------------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  \nSelf CPU time total: 45.501ms\nSelf CUDA time total: 45.611ms\n\n10\n--------------------------------------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  \n                                              Name    Self CPU %      Self CPU   CPU total %     CPU total  CPU time avg     Self CUDA   Self CUDA %    CUDA total  CUDA time avg    # of Calls  \n--------------------------------------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  \nvoid at::native::vectorized_elementwise_kernel<...         0.00%       0.000us         0.00%       0.000us       0.000us      47.279ms        99.71%      47.279ms     606.140us            78  \n                nvjet_tst_128x64_64x8_1x2_h_bz_NNT         0.00%       0.000us         0.00%       0.000us       0.000us     137.343us         0.29%     137.343us       6.867us            20  \n                                  cudaLaunchKernel         0.26%     121.269us         0.26%     121.269us       3.032us       0.000us         0.00%       0.000us       0.000us            40  \n                                  cuLaunchKernelEx         0.08%      36.090us         0.08%      36.090us       3.609us       0.000us         0.00%       0.000us       0.000us            10  \n                             cudaDeviceSynchronize        99.67%      47.243ms        99.67%      47.243ms      47.243ms       0.000us         0.00%       0.000us       0.000us             1  \n--------------------------------------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  \nSelf CPU time total: 47.401ms\nSelf CUDA time total: 47.416ms\n```\n\nWhat's problematic:\n\n`nvjet_tst_128x64_64x8_1x2_h_bz_NNT` kernel is recorded 19 times or 20 times, while it should be 10 times by design.\n\nFurther analysis shows that, if I add `torch.cuda.synchronize()` before calling `profiler.step()`, it works as expected.\n\nNote: the code is adapted from https://docs.pytorch.org/tutorials/reci",
    "url": "https://github.com/pytorch/pytorch/issues/162481",
    "state": "open",
    "labels": [
      "oncall: profiler"
    ],
    "created_at": "2025-09-09T11:58:11Z",
    "updated_at": "2025-12-01T18:41:45Z",
    "comments": 5,
    "user": "youkaichao"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1899,
    "title": "Has anyone tried to export the smolvla as onnx model for deployment?",
    "body": "I have tried to test the trained smolvla model on my PC, it works. I want now to deploy the smolvla on our target board. \n\nI looked into the model structure of smolvla, for the vision-encoder and language embedding parts I can refer to the smolvlm and export them as tow onnx models. I think the robot state embedding also needs to be considered to export as a new onnx model.\n\nThe most important part of smolvla inference, i met several issues and have no good idea how to export it as a onnx model.l.\n\nHas anyone tried and successfully exported the smolvla as onnx models for deployment? Thanks!",
    "url": "https://github.com/huggingface/lerobot/issues/1899",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "performance"
    ],
    "created_at": "2025-09-09T10:41:14Z",
    "updated_at": "2025-10-07T20:50:12Z",
    "user": "TankerLee"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 3339,
    "title": "What is the best replacement of HfFileSystem.glob with HfApi",
    "body": "In some of our code, we were using something like\n\n```python\nhf_fs = HfFileSystem()\nfiles = hf_fs.glob('my/repo/*/model.onnx')\n```\n\nBut I found that HfFileSystem is much less stable than HfApi, especially in those edge cases (e.g. network unstable)\n\nSo what is the best replacement of HfFileSystem.glob with HfApi? Any suggestions?",
    "url": "https://github.com/huggingface/huggingface_hub/issues/3339",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-09T09:02:07Z",
    "updated_at": "2025-09-15T09:12:04Z",
    "user": "narugo1992"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40754,
    "title": "Potentially incorrect value assignment of Llama4TextModel's output in Llama4ForCausalLM's output?",
    "body": "### System Info\n\n**System Info** \n- `transformers` version: 4.55.4\n- Platform: Linux-6.15.9-201.fc42.x86_64-x86_64-with-glibc2.41\n- Python version: 3.13.5\n- Huggingface_hub version: 0.34.4\n- Safetensors version: 0.6.2\n- Accelerate version: 1.10.1\n- Accelerate config: \tnot found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.8.0+cu128 (CUDA)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: <fill in>\n- Using GPU in script?: <fill in>\n- GPU type: NVIDIA RTX A6000\n\n### Who can help?\n\n@ArthurZucker \n@amyeroberts \n@qubvel \n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\n**Task Detail**\nObtaining hidden_states from the outputs of Llama4ForCausalLM\n\n**Problem**\nIn the source code [modeling_llama4.py](https://github.com/huggingface/transformers/blob/v4.55.4/src/transformers/models/llama4/modeling_llama4.py), the outputs of Llama4ForCausalLM contains a *hidden_states* (See [line 642](https://github.com/huggingface/transformers/blob/d79b2d981f28b2730d402244ac3c2e9a8c054eee/src/transformers/models/llama4/modeling_llama4.py#L642)), which is assigned with *outputs.hidden_states*. Here, the *outputs* is the output of Llama4TextModel (See [line 619](https://github.com/huggingface/transformers/blob/d79b2d981f28b2730d402244ac3c2e9a8c054eee/src/transformers/models/llama4/modeling_llama4.py#L619C9-L619C16)). However, the output of Llama4TextModel consists of a *last_hidden_state* (assigned the value of *hidden_states*) and a *past_key_values*, but no *hidden_states* (See [line 554-557](https://github.com/huggingface/transformers/blob/d79b2d981f28b2730d402244ac3c2e9a8c054eee/src/transformers/models/llama4/modeling_llama4.py#L554-L557)).\n\nThus, I'm wondering if there is either a typo in [line 642](https://github.com/huggingface/transformers/blob/d79b2d981f28b2730d402244ac3c2e9a8c054eee/src/transformers/models/llama4/modeling_llama4.py#L642) where the *hidden_states=outputs.hidden_states* should be replaced by *hidden_states=outputs.last_hidden_state*, or a typo in [line 555](https://github.com/huggingface/transformers/blob/d79b2d981f28b2730d402244ac3c2e9a8c054eee/src/transformers/models/llama4/modeling_llama4.py#L555C13-L555C45) where the *last_hidden_state=hidden_states* should be replaced by *hidden_states=hidden_states*?\n\nThank you for your patience!\n\n### Expected behavior\n\nAn explanation or a correction of the source code in [modeling_llama4.py](https://github.com/huggingface/transformers/blob/v4.55.4/src/transformers/models/llama4/modeling_llama4.py)",
    "url": "https://github.com/huggingface/transformers/issues/40754",
    "state": "closed",
    "labels": [
      "Usage",
      "bug"
    ],
    "created_at": "2025-09-08T12:31:39Z",
    "updated_at": "2025-09-16T19:25:03Z",
    "comments": 3,
    "user": "st143575"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40752,
    "title": "How to extract attention weights for the first generated token?",
    "body": "**Title:** Request for clarification: How to extract attention weights for the first generated token?\n\n**Description:**\n\nHi, I'm trying to extract the attention weights **of the first generated token** (i.e., the first new token produced by `generate()`) with respect to the input prompt. However, I'm observing inconsistent behavior in the shape of `attentions` returned by `model.generate(..., output_attentions=True)`.\n\nHere's what I found:\n\n- For `step 0` (the first generation step), `attentions[0][layer].shape` is `(batch, heads, seq_len, seq_len)` \u2014 e.g., `[1, 16, 1178, 1178]`, where `seq_len` equals the input prompt length.\n- This appears to be the **full self-attention matrix of the prompt context**, not the attention of the newly generated token.\n- Starting from `step 1`, the shape becomes `(batch, heads, 1, ctx_len)`, which correctly represents the attention of a single generated token.\n\n**Question:**\n- Is there a way to directly extract the attention weights **from the first generated token** (i.e., the query of the first new token attending to the prompt keys)?\n- Or is the intended behavior to use the last position of the context attention (i.e., `attentions[0][layer][..., -1, :]`) as a proxy for the generation decision?\n\n**Use Case:**\nI want to interpret which parts of the input prompt the model attends to when generating the first output token, for interpretability and analysis purposes.\n\n**Environment:**\n- Transformers version: [4.51.3]\n- Model: [Qwen3]\n- Code snippet:\n  ```python\n  outputs = model.generate(\n      input_ids,\n      output_attentions=True,\n      return_dict_in_generate=True\n  )\n  # outputs.attentions[0][layer] has shape (1, 16, 1178, 1178)",
    "url": "https://github.com/huggingface/transformers/issues/40752",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-08T09:53:16Z",
    "updated_at": "2025-09-08T11:41:22Z",
    "user": "VincentLHH"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1407,
    "title": "Expected time to load a super-resolution model locally",
    "body": "### Question\n\nLoading a image super-resolution model locally can take more than 10 seconds on my MacBook Pro (M1 Max). Is this expected behavior?\n```javascript\nenv.allowRemoteModels = false;\nenv.allowLocalModels = true;\nenv.backends.onnx.wasm.wasmPaths = `/wasm/`;\n\nconst upscaler = ref(null);\nonMounted(async () => {\n  upscaler.value = await pipeline('image-to-image', 'Xenova/swin2SR-realworld-sr-x4-64-bsrgan-psnr', {\n    dtype: 'fp32',\n    device: 'webgpu',\n  })\n});\n```\nWarnings observed during the model loading:\n```\nort-wasm-simd-threaded.jsep.mjs:100 \n2025-09-08 13:58:52.881399 [W:onnxruntime:, session_state.cc:1280 VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.\n\nort-wasm-simd-threaded.jsep.mjs:100 \n2025-09-08 13:58:52.882499 [W:onnxruntime:, session_state.cc:1282 VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.\n```\n\n### System Info\nnpm: @huggingface/transformers@3.7.2\nOS: macOS Sequoia 15.6.1\nmodel: Xenova/swin2SR-realworld-sr-x4-64-bsrgan-psnr",
    "url": "https://github.com/huggingface/transformers.js/issues/1407",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-09-08T06:26:49Z",
    "updated_at": "2025-09-30T19:22:34Z",
    "user": "ymtoo"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1891,
    "title": "How to checkout a commit id?",
    "body": "The underlying datasets supports a \"revision\" flag. Does lerobot?",
    "url": "https://github.com/huggingface/lerobot/issues/1891",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-08T04:39:37Z",
    "updated_at": "2025-09-10T22:53:18Z",
    "user": "richardrl"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40743,
    "title": "Support for 4D attention mask for T5",
    "body": "### Feature request\n\nCurrently, T5 cannot take 4D attention masks (batch_size, num_heads, seq_len, seq_len) as inputs. Passing a 4D attention_mask and a 4D decoder_attention_mask like so leads to a shape-related exception :\n\n```python\nimport torch\nfrom transformers import AutoTokenizer, T5ForConditionalGeneration\n\ntokenizer = AutoTokenizer.from_pretrained(\"google-t5/t5-small\")\nmodel = T5ForConditionalGeneration.from_pretrained(\"google-t5/t5-small\")\n\ninput_ids = tokenizer(\"Where is\", return_tensors=\"pt\").input_ids\ndecoder_input_ids = tokenizer(\"<pad>\", return_tensors=\"pt\").input_ids\n\nbatch_size, seq_len = input_ids.shape\ntgt_len = decoder_input_ids.shape[1]\nnum_heads = model.config.num_heads\n\nattention_mask = torch.ones(batch_size, num_heads, seq_len, seq_len)\ndecoder_attention_mask = torch.ones(batch_size, num_heads, tgt_len, tgt_len).tril(0)\n\nmodel(\n    input_ids,\n    decoder_input_ids=decoder_input_ids,\n    attention_mask=attention_mask,\n    decoder_attention_mask=decoder_attention_mask,\n)\n```\n\nOne of the problems in the current code is in the handling of the cross-attention mask. Currently, it is created using the 1D encoder attention mask when supplied. However, in the case of a 4D mask, it seems unclear how to correctly use the encoder mask: therefore, the best solution might be to introduce a new 4D mask argument `cross_attention_mask` of shape (batch_size, num_heads, tgt_len, seq_len)`. This lets the user controls all attention masks if necessary.\n\n### Motivation\n\n4D masks are useful for many purposes, as outlined by #27539 and [this blog post](https://huggingface.co/blog/poedator/4d-masks), but not all models support them.\n\n### Your contribution\n\nI propose to fix the code to handle 4D attention masks, and to add a new `cross_attention_mask` argument to add the possibility to control the cross attention mask manually. I wrote a version of that code in [this fork](https://github.com/Aethor/transformers/tree/t5-4d-attention-mask).\n\nI'm happy to create a PR with my code, but:\n\n1. This is my first transformers contribution, I need help with some things such as handling the \"Copy\" code duplication mechanism of transformers. Should other similar models with copied functions from T5 be changed as well?\n2. Although I wrote a [first test with trivial masks](https://github.com/Aethor/transformers/blob/22dc62edbdbc3f2afeb90a31c75047711c1afc5c/tests/models/t5/test_modeling_t5.py#L1876), I am not entirely sure how to test this\n3. I want to be sure that adding the new `cross_attention` mask parameter is the right way to do this and will be approved",
    "url": "https://github.com/huggingface/transformers/issues/40743",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-09-07T07:18:05Z",
    "updated_at": "2025-09-09T11:43:33Z",
    "comments": 5,
    "user": "Aethor"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1882,
    "title": "Pretrain - Code for pretraining smolvla",
    "body": "## Guidance on Replicating the Pre-training Process with Community Datasets\n\n\nHi team,\n\nFirst off, thank you for the fantastic work on SmolVLA and for open-sourcing the model and code. It's a great contribution to the community.\n\nI am trying to replicate the pre-training process as described in the original paper. I have located the pre-training data on the Hugging Face Hub, specifically:\n\n- `HuggingFaceVLA/community_dataset_v1`\n- `HuggingFaceVLA/community_dataset_v2`\n\nMy plan is to download both datasets and merge them into a single directory, for example `/path/to/my/pretrain_data/`, to serve as the input for the pre-training script.\n\nTo ensure I am on the right track, I would be grateful if you could provide some guidance on the following points:\n\n1: **Data Preparation & Merging**: Regarding the two datasets (community_dataset_v1 and v2), what is the correct procedure for using them together? Should I manually download and merge their contents into a single local directory? I also noticed the data is in a multi-directory (sharded) format, unlike many simpler single-folder datasets. Does the training code handle this structure automatically once the data is prepared locally?\n\n2: **Dataset Configuration**: How should the combined dataset be specified in the configuration file? My main confusion is that the parameter dataset.repo_id appears to be a required field that accepts a single repository ID. How can I configure the training script to use the merged data from both v1 and v2, which I have stored locally?\n\n3: **Training Script & Execution**: Once the data is correctly prepared and configured, could you please point me to the exact script and provide an example command to launch the pre-training? Since the weight of VLM is initialized, so what I need is the script after initializing VLM weight and then train on large-scale community dataset. In particular, I'd like to ask the `dataset.repo_id` if I store v1 and v2 under the same folder? Since I discovered this param cannot be None. \n\nAny help or pointers to the relevant documentation would be greatly appreciated. I believe a short tutorial or a section in the README on pre-training would also be immensely helpful for others in the community looking to build upon your work.\n\nThank you for your time and consideration!",
    "url": "https://github.com/huggingface/lerobot/issues/1882",
    "state": "closed",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-09-07T03:18:04Z",
    "updated_at": "2025-09-23T09:06:13Z",
    "user": "ruiheng123"
  },
  {
    "repo": "pytorch/ao",
    "number": 2948,
    "title": "Deprecation for Int4WeightOnlyConfig (version 1) and the models",
    "body": "This issue is tracking the deprecation of the (1) configs (2) model checkpoints quantized with these configs.\n\nWhat is deprecated:\n* We added version 2 Int4WeightOnlyConfig in various PRs in https://github.com/pytorch/ao/issues/2752 and switched the default version to 2 in https://github.com/pytorch/ao/pull/2949, the version 1 config is now deprecated, please use version 2 config to quantize the model\n* the quantized checkpoints quantized with version 1 config previously is deprecated as well, and we plan to remove the support to load these checkpoints after pytorch 2.11 release (around 9 months from now)\n\nTimeline:\n0.14.0: annouce deprecation for version 1 config\nafter all tensors are migrated: remove support for version 1 config\nafter pytorch 2.11 release: remove support for version 1 checkpoints",
    "url": "https://github.com/pytorch/ao/issues/2948",
    "state": "open",
    "labels": [
      "tracker"
    ],
    "created_at": "2025-09-05T23:31:36Z",
    "updated_at": "2025-10-02T20:49:44Z",
    "comments": 0,
    "user": "jerryzh168"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40708,
    "title": "When using a custom model, it copies the code into Hugging Face\u2019s cache directory.",
    "body": "```\n    model = AutoModel.from_pretrained(\n        model_args.model_name_or_path,\n        trust_remote_code=True,\n        torch_dtype=compute_dtype,\n        device_map=device_map,\n        # init_vision=True,\n        # init_audio=False,\n        # init_tts=False,\n    )\n```\n`model_args.model_name_or_path=/mnt/241hdd/wzr/MiniCPM-V-CookBook/MiniCPM-V-4_5`\nThe code actually runs in `/root/.cache/huggingface/modules/transformers_modules/MiniCPM-V-4_5`.\nThis makes my debugging difficult.\nIs there a way to run the code directly?",
    "url": "https://github.com/huggingface/transformers/issues/40708",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-05T07:21:40Z",
    "updated_at": "2025-11-15T08:03:16Z",
    "comments": 4,
    "user": "wzr0108"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40690,
    "title": "Batches loaded from wrong epoch when resuming from second epoch",
    "body": "### System Info\n\n**Required system information**\n```text\n- `transformers` version: 4.57.0.dev0\n- Platform: Linux-5.15.0-133-generic-x86_64-with-glibc2.35\n- Python version: 3.10.12\n- Huggingface_hub version: 0.34.4\n- Safetensors version: 0.6.2\n- Accelerate version: 1.10.1\n- Accelerate config:    not found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.8.0+cu128 (CUDA)\n- Tensorflow version (GPU?): 2.15.1 (False)\n- Flax version (CPU?/GPU?/TPU?): 0.7.0 (cpu)\n- Jax version: 0.4.13\n- JaxLib version: 0.4.13\n- Using distributed or parallel set-up in script?: no\n- Using GPU in script?: no\n- GPU type: GRID A100D-16C\n```\n\n### Who can help?\n\n@zach-huggingface @SunMarc as it concerns `transfomers`' `Trainer`\n\n### Information\n\n- [x] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\n### **1. Bug description**\nLet's take the example of the provided script: \n- number of data points: 10\n- batch size: 2\nSo 1 epoch = 5 steps.\n\nIf we launch a training until the end and monitor the data order:\n- epoch 0: 4, 1, 7, 5, 3, 9, 0, 8, 6, 2\n- epoch 1: 5, 6, **|| 1, 2, 0, 8, 9, 3, 7, 4**\n- epoch 2: 8, 7, 1, 5, 6, 9, 0, 4, 2, 3\n\nBut if we stop the training at step 6 and resume (from character `||`) the training to the end, we get the following data order:\n- epoch 0: 4, 1, _7, 5, 3, 9, 0, 8, 6, 2_\n- epoch 1: 5, 6 **|| 7, 5, 3, 9, 0, 8, 6, 2**\n- epoch 2: 8, 7, 1, 5, 6, 9, 0, 4, 2, 3\n\nWe spotted that the `epoch_dataloader.iteration` is not properly set for the first epoch after resuming. It is initially set to 0, this is why it loads the same order as in epoch 0 (cf data order in italic of the last 4 batches of epoch 0).\n\n### **2. Reproducing the error**\nThe script to run is available at https://github.com/ngazagna-qc/transformers/blob/fix-data-order-resumed-epoch/reproduce_wrong_resumed_epoch.py.\nRun:\n```shell\npython reproduce_wrong_resumed_epoch.py --trainer-class Trainer\n```\n\n### Expected behavior\n\n### **3. Bug fix**\nWe provide the fixed `Trainer` here: https://github.com/ngazagna-qc/transformers/blob/fix-data-order-resumed-epoch/src/transformers/trainer_fixed.py#L56\n\nThe fix only consists to add a line to the `_inner_training_loop` method:\n```python\n            if steps_trained_in_current_epoch > 0:\n                epoch_dataloader = skip_first_batches(epoch_dataloader, steps_trained_in_current_epoch)\n                #### BEGINNING OF THE FIX ####\n                epoch_dataloader.iteration = epochs_trained  # FIX: set dataloader to correct epoch\n                #### END OF THE FIX ####\n                steps_skipped = steps_trained_in_current_epoch\n                steps_trained_in_current_epoch = 0\n                rng_to_sync = True\n```\nIt can be tested that this solves the order by running:\n```shell\npython reproduce_wrong_resumed_epoch.py --trainer-class TrainerFixed\n```",
    "url": "https://github.com/huggingface/transformers/issues/40690",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-09-04T11:48:41Z",
    "updated_at": "2025-12-03T13:14:04Z",
    "comments": 6,
    "user": "ngazagna-qc"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2347,
    "title": "Gemma3n convert to onnx format",
    "body": "Hello, \n\nHow do I convert the Gemma3n model to the ONNX format using the OptimumCLI command? \n\nThanks in advance.",
    "url": "https://github.com/huggingface/optimum/issues/2347",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2025-09-04T09:13:19Z",
    "updated_at": "2025-10-15T02:09:55Z",
    "comments": 2,
    "user": "shahizat"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40680,
    "title": "Idea: Exploring Mathematical Extensions for GPT-style Models (teaser)",
    "body": "Hi Transformers team \ud83d\udc4b,\n\nI\u2019ve been experimenting with a conceptual enhancement to GPT-style architectures\u2014introducing mathematical mechanisms for memory and adaptive learning\u2014while keeping the overall transformer backbone intact.\n\nI\u2019ve documented the approach in Markdown (README + comparison notes), but haven\u2019t published it yet. Before I share more, I\u2019d love your input:\n\n- Does this kind of experimental idea fit within the scope of Transformers?\n- Would you be open to viewing or discussing the draft privately?\n\nLooking forward to hearing your thoughts \ud83d\ude4f",
    "url": "https://github.com/huggingface/transformers/issues/40680",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-04T07:23:29Z",
    "updated_at": "2025-10-12T08:02:38Z",
    "comments": 3,
    "user": "muzamil-ashiq"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1680,
    "title": "How is SDPA  TP parallelized  ?",
    "body": "In llama3, the TransformerBlock is TP parallelized [here](https://github.com/pytorch/torchtitan/blob/21799393c3e6dc710e694ef1a65852f2136ba58d/torchtitan/models/llama3/infra/parallelize.py#L204 ).  However, I do not see any specific TP parallelization for scaled_dot_product . How is SDPA  TP parallelized then ? ",
    "url": "https://github.com/pytorch/torchtitan/issues/1680",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-04T03:23:27Z",
    "updated_at": "2025-09-04T22:11:08Z",
    "comments": 2,
    "user": "githubsgi"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40647,
    "title": "how to get response text during training",
    "body": "I want to obtain the inferred output text during the evaluation step in the training process, not just the eval loss. \n<img width=\"1264\" height=\"211\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9dd432c5-74ea-4290-adff-7865cf3ea481\" />",
    "url": "https://github.com/huggingface/transformers/issues/40647",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-03T10:37:51Z",
    "updated_at": "2025-10-12T08:02:43Z",
    "user": "zyandtom"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12276,
    "title": "The image is blurry.",
    "body": "How to solve image blurriness during fine-tuning?",
    "url": "https://github.com/huggingface/diffusers/issues/12276",
    "state": "open",
    "labels": [],
    "created_at": "2025-09-03T08:29:38Z",
    "updated_at": "2025-09-03T08:29:38Z",
    "comments": 0,
    "user": "sucessfullys"
  },
  {
    "repo": "huggingface/gym-hil",
    "number": 32,
    "title": "how to perform hil in sim",
    "body": "",
    "url": "https://github.com/huggingface/gym-hil/issues/32",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-02T17:10:05Z",
    "updated_at": "2025-09-16T14:02:32Z",
    "user": "prathamv0811"
  },
  {
    "repo": "pytorch/vision",
    "number": 9202,
    "title": "torch thread yield after launch nccl kernel",
    "body": "### \ud83d\udc1b Describe the bug\n\nI'm using torch to benchmark nccl performance. The default nccl version that torch uses is 2.21.5. With default setting, the performance looks normal. \nThen I use LD_PRELOAD to use the latest nccl version 2.27.7 instead, and the performance degrades drastically.\nnsys shows that with nccl 2.27.7, the thread yield after every nccl call, very close to kernel launch. The yield of torch thread induces launch skew,  which causes performance to drop.\n\n<img width=\"1435\" height=\"315\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/92fc747c-b68e-4112-96a1-346dac9ea704\" />\n\nbut with nccl 2.21.5 the thread won't yield, and the benchmark performance looks normal.\n\n<img width=\"1620\" height=\"313\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/13197b34-2291-441a-b695-b04597f383d6\" />\n\nI've check the torch source code in ProcessGroupNCCL.cpp and distributed_c10d.py, but I haven't find a clue.\nHow can I get the right benchmark performance with nccl 2.27.7?\n\nsource code: \n\n[bench.py](https://github.com/user-attachments/files/22094686/bench.py)\ncommand:\n```\n# bench.py\n/usr/local/bin/mpirun --allow-run-as-root -np 8 \\\n\t-x LD_PRELOAD=/root/nccl/build/lib/libnccl.so.2.27.7  \\\n\tpython3 ./bench.py -b 8k -e 1024m -f 2 -n 100 -w 5 --op all_reduce\n\n# nccl-tests\n/usr/local/bin/mpirun --allow-run-as-root -np 8 \\\n\t-x LD_PRELOAD=/root/nccl/build/lib/libnccl.so.2.27.7  \\\n\t/root/nccl-tests/build/all_reduce_perf -b 8k -e 1024m -f 2  -n 100 -w 5 \n```\n\n\n### Versions\n\n\nVersions\n```\nPyTorch version: 2.6.0+cu126\nIs debug build: False\nCUDA used to build PyTorch: 12.6\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 22.04.5 LTS (x86_64)\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version: Could not collect\nCMake version: version 3.28.6\nLibc version: glibc-2.35\n\nPython version: 3.10.12 (main, May 27 2025, 17:12:29) [GCC 11.4.0] (64-bit runtime)\nPython platform: Linux-5.14.0-3.0.3.kwai.x86_64-x86_64-with-glibc2.35\nIs CUDA available: True\nCUDA runtime version: 12.6.85\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration:\nGPU 0: NVIDIA H800\nGPU 1: NVIDIA H800\nGPU 2: NVIDIA H800\nGPU 3: NVIDIA H800\nGPU 4: NVIDIA H800\nGPU 5: NVIDIA H800\nGPU 6: NVIDIA H800\nGPU 7: NVIDIA H800\n\nNvidia driver version: 535.129.03\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                    x86_64\nCPU op-mode(s):                  32-bit, 64-bit\nAddress sizes:                   46 bits physical, 57 bits virtual\nByte Order:                      Little Endian\nCPU(s):                          192\nOn-line CPU(s) list:             0-191\nVendor ID:                       GenuineIntel\nBIOS Vendor ID:                  Intel\nModel name:                      Intel(R) Xeon(R) Platinum 8468\nBIOS Model name:                 Intel(R) Xeon(R) Platinum 8468\nCPU family:                      6\nModel:                           143\nThread(s) per core:              2\nCore(s) per socket:              48\nSocket(s):                       2\nStepping:                        8\nBogoMIPS:                        4200.00\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities\nVirtualization:                  VT-x\nL1d cache:                       4.5 MiB (96 instances)\nL1i cache:                       3 MiB (96 instances)\nL2 cache:                        192 MiB (96 instances)\nL3 cache:                        210 MiB (2 instances)\nNUMA node(s):                    2\nNUMA node0 CPU(s):               0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166",
    "url": "https://github.com/pytorch/vision/issues/9202",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-02T13:09:26Z",
    "updated_at": "2025-09-02T13:44:52Z",
    "comments": 1,
    "user": "tobi1031"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40606,
    "title": "GPT-OSS attention backends available for SM120 other than Eager?",
    "body": "I was wondering any attention backend we can use for long context if using SM120 GPU? Since the \"eager_attention_forward\" uses the naive implementation that computes the full attention in one go, which can lead to OOM for large context, but I couldn't use other implementations since they either do not support sinks or SM120.\n\nMany thanks! ",
    "url": "https://github.com/huggingface/transformers/issues/40606",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-02T03:21:16Z",
    "updated_at": "2025-10-12T08:02:48Z",
    "comments": 4,
    "user": "TheTinyTeddy"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3803,
    "title": "Performance Issue when using tools/llm",
    "body": "## \u2753 Question\n\n<!-- Your question -->\n\n## What you have already tried\n\n<!-- A clear and concise description of what you have already done. -->\n\n## Environment\n\n> Build information about Torch-TensorRT can be found by turning on debug messages\n\n - PyTorch Version (e.g., 1.0): 2.8.0\n - CPU Architecture: amd\n - OS (e.g., Linux): ubuntu 22.04\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\n - Build command you used (if compiling from source): NO\n - Are you using local sources or building from archives: NO\n - Python version: 3.10\n - CUDA version: 12.8\n - GPU models and configuration: NVIDIA\n - Any other relevant information: directly use torch-tensorrt 2.8.0 wheel with github 2.8.0 tag to run tools/llm\n\n## Additional context\n\nHi there, I tried to use tools/llm with static_cache_v2 to run qwen2.5 model, and I use such script to run:\n\npython run_llm.py --model Qwen/Qwen2.5-0.5B-Instruct --prompt \"What is parallel programming?\" --precision FP16 --num_tokens 128 --cache static_v2 --benchmark\n\nwhen i use nsight system to profiling, I found that using static_cache_v2 would bring launch overhead to tensorrt engine in each prefill / decode block, do you have this problem too? thought this overhead is too much, almost make torch-tensorrt the same speed compared to just enable torch.compile\n\nhere is the nsys profiling result: the red line shows there is approximately 1.7ms overhead and no gpu activities at all (when disabling static_cache_v2 there is no such bubbles, thought maybe because shape copy or other operators with static_cache_v2?)\n\n<img width=\"1488\" height=\"942\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/394800a7-cd8e-40ff-abbf-9a2a4b928aeb\" />\n\nlooking forward to your reply, thanks a lot!\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3803",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-09-01T17:10:38Z",
    "updated_at": "2025-09-04T08:43:24Z",
    "user": "ChiikawaSama"
  },
  {
    "repo": "huggingface/peft",
    "number": 2764,
    "title": "merge_and_unload returns the base (prior to fine-tuning) back!!!!",
    "body": "I have fine-tune a model using PEFT and now I want to merge the base model to adapter. This is what I am doing:\n\n\n```\nbase_model = AutoModelForCausalLM(model_id, device_map = 'auto')\n\nmodel_finetuned  = PeftModel.from_pretrained(base_model, adapter_path)\n\n```\nNow the size of `model_finetuned `is roughly 42GB but when I do the following to merge the adapter into base:\n\n`merged_model = model_finetuned.()\n`\nthe size of `merged_model `is 36GB and its performance is like the base model, seems the adapter effect is gone.\n\nI remember I used this feature in the past to get merged model, is anything changed? \n\nThis is related post, where the last comment says this is normal, can someone elaborate?\n\nhttps://github.com/huggingface/peft/issues/868\n\nCan I just save the `model_finetuned  ` as my merged model, can someone explain what is going on and why the merge_and_unload() is doing opposite of what it is supposed to do.\n",
    "url": "https://github.com/huggingface/peft/issues/2764",
    "state": "closed",
    "labels": [],
    "created_at": "2025-09-01T04:07:36Z",
    "updated_at": "2025-10-09T15:26:15Z",
    "comments": 12,
    "user": "manitadayon"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1822,
    "title": "As of 08/31/2025, how do you create a v2.1 dataset from raw data?",
    "body": "My search is cursory, but I can't find any tutorial or example on creating a v2.1 dataset on the main branch. So, how do you create a Lerobot dataset in the current version? Should I refer to older commits",
    "url": "https://github.com/huggingface/lerobot/issues/1822",
    "state": "open",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-08-31T18:29:34Z",
    "updated_at": "2025-10-08T13:02:44Z",
    "user": "IrvingF7"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 3318,
    "title": "Infinite tool call loop: `HuggingFaceModel` and `text-generation-inference`",
    "body": "## Description\nHello. Needless to say, amazing library.  Please let me know if you'd like me to try something or if you need more info.\n\nI've been going through various local model providers trying to find one that works well, when I cam across a rather shocking bug when running against Huggingface's TGI model host.\n\nThe problem appears whether using the OpenAI \"compatible\" endpoints or the `HuggingfaceModel` with custom `AsyncInferenceClient` and `HuggingFaceProvider`. The latter probably being the official approach, the code included here will be using that.\n\n## System Info\n`curl 127.0.0.1:8080/info | jq`:\n```json\n{\n  \"model_id\": \"/models/meta-llama/Meta-Llama-3-8B-Instruct\",\n  \"model_sha\": null,\n  \"model_pipeline_tag\": null,\n  \"max_concurrent_requests\": 128,\n  \"max_best_of\": 2,\n  \"max_stop_sequences\": 4,\n  \"max_input_tokens\": 8191,\n  \"max_total_tokens\": 8192,\n  \"validation_workers\": 2,\n  \"max_client_batch_size\": 4,\n  \"router\": \"text-generation-router\",\n  \"version\": \"3.3.4-dev0\",\n  \"sha\": \"9f38d9305168f4b47c8c46b573f5b2c07881281d\",\n  \"docker_label\": \"sha-9f38d93\"\n}\n```\n\n`nvidia-smi`:\n```shell\n+-----------------------------------------------------------------------------------------+\n| NVIDIA-SMI 575.64.05              Driver Version: 575.64.05      CUDA Version: 12.9     |\n|-----------------------------------------+------------------------+----------------------+\n| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |\n| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |\n|                                         |                        |               MIG M. |\n|=========================================+========================+======================|\n|   0  NVIDIA GeForce RTX 4090        Off |   00000000:01:00.0  On |                  Off |\n| 40%   54C    P2             61W /  450W |   21499MiB /  24564MiB |      0%      Default |\n|                                         |                        |                  N/A |\n+-----------------------------------------+------------------------+----------------------+\n|   1  NVIDIA GeForce RTX 4090        Off |   00000000:48:00.0 Off |                  Off |\n| 30%   43C    P2             52W /  450W |   21394MiB /  24564MiB |      0%      Default |\n|                                         |                        |                  N/A |\n+-----------------------------------------+------------------------+----------------------+\n```\n\n### Information\n\n- [x] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [x] An officially supported command\n- [ ] My own modifications\n\n## Reproduction\n\n### Setup\n\nHere's the `docker-compose.yaml` I'm using to start TGI:\n```yaml\nservices:\n  text-generation-inference:\n    image: ghcr.io/huggingface/text-generation-inference:latest\n    container_name: tgi\n    ports:\n      - \"8081:80\"\n    volumes:\n      - ../../../models:/models:ro\n      - tgi-data:/data\n    environment:\n      - RUST_LOG=info\n    # I have also tested with 3.1-8B and 3.2-3B with the same end results\n    command: >\n      --model-id /models/meta-llama/Meta-Llama-3-8B-Instruct\n      --hostname 0.0.0.0\n      --port 80\n      --trust-remote-code\n    deploy:\n      resources:\n        reservations:\n          devices:\n            - driver: nvidia\n              device_ids: [\"0\", \"1\"]\n              capabilities: [gpu]\n    shm_size: \"64g\"\n    healthcheck:\n      test: [\"CMD\", \"curl\", \"-f\", \"http://localhost:80/health\"]\n      interval: 30s\n      timeout: 10s\n      retries: 3\n      start_period: 60s\n\nvolumes:\n  tgi-data:\n    driver: local\n```\n\n### Code\n\nAll code is running in a Jupyter notebook.\n\nHere's the common setup cell:\n```python\nfrom huggingface_hub import AsyncInferenceClient\nfrom pydantic_ai.models.huggingface import HuggingFaceModel\nfrom pydantic_ai.providers.huggingface import HuggingFaceProvider\nfrom pydantic_ai.providers.openai import OpenAIProvider\n\nprovider = OpenAIProvider(base_url=\"http://localhost:8081/v1\") # Just used to get the model slug\nmodels = await provider.client.models.list()\n\nclient = AsyncInferenceClient(base_url=\"http://localhost:8081/\")\n\nprint(f\"Connected to TGI. Available models: {len(models.data)}\")\nfor model in models.data:\n    print(f\"  - {model.id}\")\n\n# Create the model instance\nagent_model = HuggingFaceModel(\n    models.data[0].id,\n    provider=HuggingFaceProvider(hf_client=client, api_key=\"None\"),\n    # Annoyingly, despite this being basically the default profile, Llama 3's tool calls often fall through to the response without this\n    profile=ModelProfile(\n        supports_tools=True,\n        json_schema_transformer=InlineDefsJsonSchemaTransformer\n    )\n)\n```\n\n### Working: Basic requests and history\n\n1. Create the basic agent\n```python\nfrom pydantic_ai import Agent\n\nsimple_agent = Agent(model=agent_model)\n```\n\n2. Make a simple request\n```python\nsimple_result = await simple_agent.run(\"Tell me a joke.\")\n\nsimple_result.output # \"Why couldn't the bicycle stand up by itself?\\n\\nBecau",
    "url": "https://github.com/huggingface/text-generation-inference/issues/3318",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-31T08:23:46Z",
    "updated_at": "2025-08-31T08:58:13Z",
    "comments": 1,
    "user": "baughmann"
  },
  {
    "repo": "pytorch/audio",
    "number": 4076,
    "title": "[STABLE ABI] Porting rir/rir.cpp rir/ray_tracing.cpp",
    "body": "This issue collects tasks that block porting [rir/rir.cpp](https://github.com/pytorch/audio/blob/main/src/libtorchaudio/rir/rir.cpp) and [rir/ray_tracing.cpp](https://github.com/pytorch/audio/blob/main/src/libtorchaudio/rir/ray_tracing.cpp) to use torch stable ABI.\n\n- [ ] implement `mutable_data_ptr<T>()` and `const_data_ptr<T>()` in torch/csrc/stable/tensor_struct.h. For instance, this simplifies porting of expressions like `tensor.data_ptr<scalar_t>()`. Currently, one needs to rewrite this as `reinterpret_cast<scalar_t*>(tensor.data_ptr())` where tensor is a `torch::stable::Tensor`. Not really a blocker but would be nice to have.\n      Fix available: https://github.com/pytorch/pytorch/pull/161891\n- [ ] import `arange` as a stable/ops.h factory function\n- [ ] implement `torch::fft::fftshift` and `torch::fft::irfft` as a stable/ops.h operation\n      Resolution: delete rir/ray_tracing.cpp as unused\n- [ ] implement `index` as a `torch::stable::Tensor` method. Can we use torch::indexing::Slice() in torch stable ABI code?\n- [ ] expose `AT_DISPATCH_FLOATING_TYPES_AND_HALF` and `AT_DISPATCH_FLOATING_TYPES` to stable ABI. Not really a blocker but would be nice to have.\n      For a workaround, see https://github.com/pytorch/audio/issues/4078\n- [ ] implement `zeros` and `full` as a `stable/ops.h` factory functions. Currently, one can use `new_empty` and `fill_` to mimic these functions. Not really a blocker but would be nice to have.\n- [ ] implement `tensor` as a `stable/ops.h` factory function. Currently, one can use `new_empty` but it is really clumsy to mimic `tensor`, especially for CUDA tensors.\n- [ ] implement `dot`, `norm`, and `max` as a `torch::stable::Tensor` method or a `stable/ops.h` operation\n- [ ] implement `item<T>()` as a `torch::stable::Tensor` template method\n      For a workaround, see https://github.com/pytorch/audio/issues/4078\n\n^ @NicolasHug @scotts @janeyx99",
    "url": "https://github.com/pytorch/audio/issues/4076",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-30T19:46:50Z",
    "updated_at": "2025-11-04T11:34:21Z",
    "comments": 2,
    "user": "pearu"
  },
  {
    "repo": "pytorch/audio",
    "number": 4075,
    "title": "[STABLE ABI] Porting overdrive.cpp",
    "body": "This issue collects tasks that block porting [overdrive.cpp](https://github.com/pytorch/audio/blob/main/src/libtorchaudio/overdrive.cpp) to use torch stable ABI.\n\n- [x] implement `accessor` template as a `torch::stable::Tensor` template method\n      Fix available: https://github.com/pytorch/pytorch/pull/161967\n- [x] can we use `at::parallel_for` in torch stable ABI code?\n- [x] expose `AT_DISPATCH_FLOATING_TYPES` to stable ABI, currently one need to implement the dispatch logic using `switch` block. Not a blocker but would nice to have.\n      For a workaround, see https://github.com/pytorch/audio/issues/4078\n\n^ @NicolasHug @scotts @janeyx99",
    "url": "https://github.com/pytorch/audio/issues/4075",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-30T19:23:39Z",
    "updated_at": "2025-11-20T14:17:04Z",
    "comments": 0,
    "user": "pearu"
  },
  {
    "repo": "pytorch/audio",
    "number": 4074,
    "title": "[STABLE ABI] Porting lfilter.cpp",
    "body": "This issue collects tasks that block porting [lfilter.cpp](https://github.com/pytorch/audio/blob/main/src/libtorchaudio/lfilter.cpp) to use torch stable ABI.\n\n- [x] implement `mutable_data_ptr<T>()` and `const_data_ptr<T>()` in torch/csrc/stable/tensor_struct.h. For instance, this simplifies porting of expressions like `tensor.data_ptr<scalar_t>()`. Currently, one needs to rewrite this as `reinterpret_cast<scalar_t*>(tensor.data_ptr())` where `tensor` is a `torch::stable::Tensor`.\n      Fix available: https://github.com/pytorch/pytorch/pull/161891\n- [x] can we use `at::parallel_for` in torch stable ABI code?\n- [x] implement `unsqueeze` as a `stable/ops.h` operation\n- [x] implement `select` as a `stable/ops.h` operation\n- [x] implement `at::matmul` as a `stable/ops.h` operation\n- [x] implement `index_put_` as `torch::stable::Tensor` method or a `stable/ops.h` operation. Can we use `torch::indexing::Slice()` in torch stable ABI code?\n\n\n^ @NicolasHug @scotts @janeyx99",
    "url": "https://github.com/pytorch/audio/issues/4074",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-30T19:13:55Z",
    "updated_at": "2025-12-01T09:41:54Z",
    "comments": 4,
    "user": "pearu"
  },
  {
    "repo": "pytorch/ao",
    "number": 2914,
    "title": "Support for LR-QAT",
    "body": "Qualcomm research proposed a technique LR-QAT in their paper \"Low-Rank Quantization-Aware Training for LLMs\".\n\nThe core idea is that the low-rank weights are placed within the quantization grid of the model's weights using a custom downcasting operator.\n\nThe unique advantage of this is that it allows for a low rank adapter to control for the impact of quantization while still being absorbed into the main weights at inference, meaning that there's no inference overhead of the technique (and no lossy upcast to merge a LoRA adapter with, for example, NF4 weights in something like QLoRA).\n\nOnce a language model has been optimized under this framework, it's still suitable for further fine tuning, meaning that if one self distills a single target model using LR-QAT, it can be trained for a variety of downstream applications.\n\nThe memory use is quite favorable (relatively comparable to Q-LoRA), but has a variety of advantages to downstream inference usage.\n\nNow, the good things out of the way, there's a few problems:\n\n- The upcasting operator is a bit of development overhead. It requires a completely bespoke LoRA implementation that's not, to my eye, suitable for integration with existing tools.\n\n- While a lot of logic is shared, I don't think the quantization grid logic will cleanly map into existing code.\n\n- There's also some extra fixed point operators that are going to be a bit of a migraine to deal with.\n\n- While memory-cheap, there is some computational overhead to the technique. I still think it's interesting, and has a lot of really favorable properties, but it's worth bearing in mind.\n\nSo, is there any possibility of or interest in adopting this technique within TorchAO? It's a fairly accessible recipe (particularly for end developers) and its inclusion could mean a fairly rich library of accessible model checkpoints up to about 24B parameters in size (as that's around the limit of what I think most developers will be able to optimize on GPUs at home), and my intuition is that even up to around 70B dense models should be accessible on fairly cheap GPU instances, as well.\n\nSo far as MoE, I think it'd take a lot of consideration because there's already a lot of ecosystem growing pains surrounding them (see: ongoing issues with expert dispatch in the Huggingface Transformers ecosystem which has been inherited by most finetuning frameworks with the notable exception of Torchtune), and many existing implementations have poor support / prospects for funky operators (particularly LoRA, etc).",
    "url": "https://github.com/pytorch/ao/issues/2914",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-30T18:16:10Z",
    "updated_at": "2025-09-04T01:14:35Z",
    "comments": 1,
    "user": "Juahyori"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12257,
    "title": "[Looking for community contribution] support Wan 2.2 S2V: an audio-driven cinematic video generation model",
    "body": "We're super excited about the Wan 2.2 S2V (Speech-to-Video) model and want to get it integrated into Diffusers! This would be an amazing addition,  and we're looking for experienced community contributors to help make this happen.\n\n\n- **Project Page**: https://humanaigc.github.io/wan-s2v-webpage/\n- **Source Code**: https://github.com/Wan-Video/Wan2.2#run-speech-to-video-generation\n- **Model Weights**: https://huggingface.co/Wan-AI/Wan2.2-S2V-14B\n\n\nThis is a priority for us, so we will try review fast and actively collabrate with you throughout the process :)\n\n\n",
    "url": "https://github.com/huggingface/diffusers/issues/12257",
    "state": "open",
    "labels": [
      "help wanted",
      "Good second issue",
      "contributions-welcome"
    ],
    "created_at": "2025-08-29T08:04:43Z",
    "updated_at": "2025-08-29T10:23:52Z",
    "comments": 0,
    "user": "yiyixuxu"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1661,
    "title": "CPU Mode Request",
    "body": "Hi all, just getting in to using Torch Titan and have really loved it! One thing I personally would find useful is the ability to do small day to day development on my laptop in a CPU mode. I realize that TorchTitan is a distributed training repo, but I think a lot of researchers would still find a CPU dev/debug mode useful (VMs are expensive for just tracking down my latest brand of random bugs that I introduce to my code base \ud83d\ude05 ) \n\nWould there be an appetite for cpu only compatibility? Happy to make a PR as I will be doing this for my own fork. \n\nThanks,\n\nDonal ",
    "url": "https://github.com/pytorch/torchtitan/issues/1661",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-08-29T07:48:31Z",
    "updated_at": "2025-08-29T17:32:46Z",
    "user": "djbyrne"
  },
  {
    "repo": "pytorch/executorch",
    "number": 13787,
    "title": "How to enable XNN_ENABLE_SPARSE in Executorch",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI would like to ask if there is any plan to support XNN_ENABLE_SPARSE in Executorch.\n\nI am working on a model that contains a significant amount of sparse operations, and I believe enabling XNN_ENABLE_SPARSE could lead to a substantial performance improvement.\n\nIs this feature currently supported? If not, are there any plans to add this in the future roadmap? Any guidance on how to enable it or potential workarounds would be greatly appreciated.\n\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### RFC (Optional)\n\n_No response_\n\ncc @digantdesai @mcr229 @cbilgin",
    "url": "https://github.com/pytorch/executorch/issues/13787",
    "state": "open",
    "labels": [
      "module: xnnpack"
    ],
    "created_at": "2025-08-29T04:04:39Z",
    "updated_at": "2025-09-08T16:32:36Z",
    "user": "HKLee2040"
  },
  {
    "repo": "huggingface/optimum-onnx",
    "number": 44,
    "title": "How to use streaming inference for onnx models exported from QWEN3-4B models",
    "body": "How to use streaming inference for onnx models exported from QWEN3-4B models",
    "url": "https://github.com/huggingface/optimum-onnx/issues/44",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-29T01:48:07Z",
    "updated_at": "2025-10-06T12:29:34Z",
    "user": "williamlzw"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12255,
    "title": "[BUG] Misleading ValueError when subclassing StableDiffusionImg2ImgPipeline with a mismatched __init__ signature",
    "body": "### Describe the bug\n\nWhen subclassing diffusers.StableDiffusionImg2ImgPipeline, if the subclass's __init__ signature does not include the requires_safety_checker: bool = True argument, the default .from_pretrained() loader raises a confusing and indirect ValueError.\n\nThe official documentation for StableDiffusionImg2ImgPipeline confirms that requires_safety_checker is an explicit keyword argument in its __init__ signature.\n\nThe current ValueError (pasted below) reports a component list mismatch between 'kwargs' and 'requires_safety_checker'. This error message hides the true root cause\u2014a TypeError from the signature mismatch\u2014making the problem very difficult to debug.\n\n### Reproduction\n\nThe following minimal script reliably reproduces the error.\n```\n\nfrom diffusers import StableDiffusionImg2ImgPipeline\nfrom diffusers.models import AutoencoderKL, UNet2DConditionModel\nfrom diffusers.schedulers import KarrasDiffusionSchedulers\nfrom transformers import CLIPTextModel, CLIPTokenizer\nfrom typing import Optional, Any\n\n# A custom pipeline inheriting from StableDiffusionImg2ImgPipeline,\n# but with an incorrect __init__ signature. It incorrectly tries\n# to catch `requires_safety_checker` with **kwargs.\nclass MyCustomPipeline(StableDiffusionImg2ImgPipeline):\n    def __init__(\n        self,\n        vae: AutoencoderKL,\n        text_encoder: CLIPTextModel,\n        tokenizer: CLIPTokenizer,\n        unet: UNet2DConditionModel,\n        scheduler: KarrasDiffusionSchedulers,\n        safety_checker: Optional[Any] = None,\n        feature_extractor: Optional[Any] = None,\n        image_encoder: Optional[Any] = None,\n        **kwargs,\n    ):\n        super().__init__(\n            vae=vae,\n            text_encoder=text_encoder,\n            tokenizer=tokenizer,\n            unet=unet,\n            scheduler=scheduler,\n            safety_checker=safety_checker,\n            feature_extractor=feature_extractor,\n            image_encoder=image_encoder,\n            **kwargs,\n        )\n\n# This line will fail and raise the misleading ValueError.\n# It can be copy-pasted directly to reproduce the bug.\npipe = MyCustomPipeline.from_pretrained(\"runwayml/stable-diffusion-v1-5\")\n```\n### Logs\n\n```shell\nValueError: MyCustomPipeline {\n  \"_class_name\": \"MyCustomPipeline\",\n  \"_diffusers_version\": \"0.29.0.dev0\", # Replace with your version\n  \"feature_extractor\": [\n    \"transformers\",\n    \"CLIPImageProcessor\"\n  ],\n  \"image_encoder\": [\n    null,\n    null\n  ],\n  \"requires_safety_checker\": true,\n  \"safety_checker\": [\n    \"stable_diffusion\",\n    \"StableDiffusionSafetyChecker\"\n  ],\n  \"scheduler\": [\n    \"diffusers\",\n    \"PNDMScheduler\"\n  ],\n  \"text_encoder\": [\n    \"transformers\",\n    \"CLIPTextModel\"\n  ],\n  \"tokenizer\": [\n    \"transformers\",\n    \"CLIPTokenizer\"\n  ],\n  \"unet\": [\n    \"diffusers\",\n    \"UNet2DConditionModel\"\n  ],\n  \"vae\": [\n    \"diffusers\",\n    \"AutoencoderKL\"\n  ]\n}\n has been incorrectly initialized or <class '__main__.MyCustomPipeline'> is incorrectly implemented. Expected ['feature_extractor', 'image_encoder', 'kwargs', 'safety_checker', 'scheduler', 'text_encoder', 'tokenizer', 'unet', 'vae'] to be defined, but ['feature_extractor', 'image_encoder', 'requires_safety_checker', 'safety_checker', 'scheduler', 'text_encoder', 'tokenizer', 'unet', 'vae'] are defined.\n```\n\n### System Info\n\ndiffusers version: 0.34.0\nPlatform: Linux-5.15.0-78-generic-x86_64-with-glibc2.35\nPython version: 3.12.11 | [GCC 11.2.0]\nPyTorch version: 2.5.1+cu121\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/12255",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-08-28T18:31:14Z",
    "updated_at": "2025-08-30T07:41:16Z",
    "comments": 2,
    "user": "BoostZhu"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1653,
    "title": "Interleaved 1F1B weight-gradient computation decoupling",
    "body": "Hi torchtitan team,\n\nThe kimi K2 reports apparently do not use dualpipe, and instead use interleaved 1F1B and \"decouple the weight-gradient computation from each micro-batch\u2019s backward pass and execute it in parallel with the corresponding PP communication\" to mitigate the PP communication overhead. I am curious how hard it is to implement this with torchtitan.\n\n\n<img width=\"1166\" height=\"311\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/484077a5-41e9-417d-af1d-fccd4627228b\" />\n\n\nI tried out interleaved 1F1B in the other thread, but there appear to be significant bubbles:\n\n<img width=\"1497\" height=\"556\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/f8140eec-95a5-46d7-90fb-8d52e25007ce\" />\n\nSee https://drive.google.com/drive/folders/1F-d-ETeHbRbkAtuTkgApaWiOoGYotSXj?usp=sharing.\n\nNot sure if it's possible to try out kimi K2 style interleaved 1F1B with DeepSeek v3.\n\nThanks!",
    "url": "https://github.com/pytorch/torchtitan/issues/1653",
    "state": "open",
    "labels": [
      "question",
      "module: pipelining"
    ],
    "created_at": "2025-08-28T18:21:15Z",
    "updated_at": "2025-09-05T20:19:24Z",
    "user": "vwxyzjn"
  },
  {
    "repo": "huggingface/peft",
    "number": 2759,
    "title": "PeftModel trainable parameters with multiple adapters",
    "body": "### System Info\n\npeft-0.17.1\npython 3.9\n\n### Who can help?\n\n@BenjaminBossan \n\n### Reproduction\n\n**1) modules_to_save gradient true even when is_trainable=False**\n\nThe adapters has both modules_to_save and target_modules\n\n```\npeft_backbone = PeftModel.from_pretrained(\n                    target_backbone,\n                    safe_encoder_adapter_path1,\n                    adapter_name=adapter_name1,\n                    is_trainable=False\n                )\n status = peft_backbone.get_model_status()\n check_trainable_params(target_backbone)\n```\n\n```\ndef check_trainable_params(model, print_layers=True):\n    total_params = 0\n    trainable_params = 0\n    for name, param in model.named_parameters():\n        num_params = param.numel()\n        total_params += num_params\n        if param.requires_grad:\n            trainable_params += num_params\n            if print_layers:\n                print(f\"[TRAINABLE] {name} - shape: {tuple(param.shape)}\")\n        elif print_layers:\n            print(f\"[FROZEN]    {name} - shape: {tuple(param.shape)}\")\n\n    print(f\"\\nTotal parameters: {total_params:,}\")\n    print(f\"Trainable parameters: {trainable_params:,}\")\n    print(f\"Frozen parameters: {total_params - trainable_params:,}\")\n    print(f\"Trainable ratio: {100 * trainable_params / total_params:.2f}%\")\n\n    return trainable_params, total_params\n```\n\nexample of printed trainable params \n[TRAINABLE] blocks.0.modules_to_save.adapter1.norm1.weight - shape: (1408,)\n[FROZEN]    blocks.2.attn.qkv.lora_A.adapter1.weight - shape: (32, 1408)\n\n\n**2) Loading an adapter after using from_pretrained**\n```\npeft_backbone = PeftModel.from_pretrained(\n    target_backbone,\n    safe_encoder_adapter_path1,\n    adapter_name=modality_name,\n    is_trainable=False\n)\nstatus = peft_backbone.get_model_status()\ntarget_backbone.load_adapter(safe_encoder_adapter_path2, is_trainable=False, adapter_name=adapter2)\nstatus = peft_backbone.get_model_status()\n```\n\nstatus before load_adapter shows {'adapter1': False} while after the load_adapter {'adapter2': False, 'adapter1': True}\n\nI think the issue comes from BaseTurnerLayer.set_adapter that set True all my adapter1 lora layers' gradient while setting properly the adapter2 lora layers' gradient to False.\nBaseTurnerLayer.set_adapter is called when doing self.add_adapter in PeftModel.load_adapter.\n\n\n\n\n\n\n### Expected behavior\n\n**1) modules_to_save gradient true even when is_trainable=False**\n\nExpecting the gradients for modules_to_save layers to be false. It's working properly for lora layers.\n\n**2) Loading an adapter after using from_pretrained**\n\nExpecting adapter1 to remain gradient false (is_trainable=False during from_pretrained loading) even after loading another adapter.\n\n**Other informations:**\n\nRegarding issue 1), in the code of 2), the modules_to_save for adapter2 were properly set to false when using load_adapter with is_trainable=false.\n\n[TRAINABLE] base_model.model.blocks.39.modules_to_save.adapter1.mlp.fc2.bias - shape: (1408,)\n[FROZEN]    base_model.model.blocks.39.modules_to_save.adapter2.norm1.weight - shape: (1408,)\n\nMore generally, is there any reason peftmodel has to change the requires_gradient of adapters when calling set_adapter? (https://github.com/huggingface/peft/issues/2749)\nI assume that it might be related to the fact that there might be a problem to have non activated adapter but with requires_gradient=True?\nWhen using the library I was expecting to be able to set what params needed to be trained on all my adapters upon loading them with from_pretrained and load_adapter (or manually) then simply switch between adapters during the training with set_adapter.\n",
    "url": "https://github.com/huggingface/peft/issues/2759",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-28T16:36:25Z",
    "updated_at": "2025-10-06T15:04:09Z",
    "comments": 8,
    "user": "NguyenRichard"
  },
  {
    "repo": "pytorch/ao",
    "number": 2896,
    "title": "[CPU][FP8][Inductor] How to support fp8 quant for inductor on CPU",
    "body": "What we want to do is to enable FP8 quantization in PyTorch. Similar to INT8 quantization, this requires inserting quantize and dequantize operations into the computational graph. In order to reuse pattern matching logic of int8, we need register FP8 quant and dequant.\n\nTo address this, we attempted to register quant in [#2379](https://github.com/pytorch/ao/pull/2379), but the PR was reverted in [#2672](https://github.com/pytorch/ao/pull/2672) because it caused performance regression on H100 GPUs.\n\nIt will take a lot of effort to find the root cause of GPU regression.\nMaybe we can register quant specifically for CPU, but this requires defining and registering a separate function for CPU.\n@jerryzh168 @vkuzo Do you have some suggestions about it?\ncc @Xia-Weiwen \n\nI create following test to show the issue.\n```python\nimport os\n\nos.environ[\"OMP_NUM_THREADS\"] = \"1\"\nos.environ[\"TORCHINDUCTOR_FREEZING\"] = \"1\"\nos.environ[\"TORCH_COMPILE_DEBUG\"] = \"1\"\nos.environ[\"TORCHDYNAMO_PRINT_GUARD_FAILS\"] = \"1\"\n\nimport torch\nimport torchao\n\ndtype = torch.float\nqtype = torch.float8_e4m3fn\n\ndef dequantize_per_tensor(\n    tensor: torch.Tensor,\n    scale: float,\n    output_dtype: torch.dtype\n) -> torch.Tensor:\n    res = torchao.quantization.quant_primitives._dequantize_affine_float8(\n        tensor=tensor,\n        scale=torch.tensor([scale]),\n        output_dtype=torch.float\n    )\n    return res\n\ndef quantize_per_tensor(\n    tensor: torch.Tensor,\n    scale: float,\n) -> torch.Tensor:\n    return torchao.quantization.quant_primitives._quantize_affine_float8(\n        tensor=tensor,\n        scale=torch.tensor([scale]),\n        float8_dtype=torch.float8_e4m3fn,\n    )\n\n\nclass FP8QDQLinear(torch.nn.Module):\n    def __init__(self, in_features, out_features):\n        super().__init__()\n        self.weight = torch.randn((out_features, in_features),).to(qtype)\n        self.weight_scale = 1.0\n        self.scale = 1.0\n        self.bias = None\n\n    def forward(self, input):\n        weight = dequantize_per_tensor(\n            self.weight.data,\n            self.weight_scale,\n            dtype,\n        )\n        q_input = quantize_per_tensor(\n            input,\n            self.scale,\n        )\n\n        dq_input = dequantize_per_tensor(\n            q_input,\n            self.scale,\n            dtype\n        )\n        out = torch.nn.functional.linear(dq_input, weight, self.bias)\n\n        return out\n\nfrom torch._inductor import config as inductor_config\nfrom torch._dynamo import config\n\nconfig.error_on_recompile = True\n#inductor_config.cpp_wrapper = True\ninductor_config.max_autotune = False\ninductor_config.freezing = True\n\ninductor_config.aot_inductor.debug_compile = False\n\n\nmodel = FP8QDQLinear(13, 16)\nexample_inputs = (torch.randn(128, 13),)\n\nwith torch.no_grad():\n    refe = model(*example_inputs)\n    test_eager = model(*example_inputs)\n    model = torch.compile(model)\n    model(*example_inputs)\n    test = model(*example_inputs)\n```\nOutputting log on [freezing_patterns.py](https://github.com/pytorch/pytorch/blob/a7c949089af218f71daf3ad25f409f75794e6830/torch/_inductor/fx_passes/freezing_patterns.py#L70) shows that the quant has been decomposed to clamp_min, clamp_max and convert_element_type.\n```python\n# print(gm)\n<lambda>()\n\n\n\ndef forward(self, arg1_1):\n    arg0_1 = self._frozen_param0\n    full_default = torch.ops.aten.full.default([1], 1.0, dtype = torch.float32, layout = torch.strided, device = device(type='cpu'), pin_memory = False)\n    dequantize_affine_float8 = torch.ops.torchao.dequantize_affine_float8.default(arg0_1, full_default);  arg0_1 = None\n    clamp_min = torch.ops.aten.clamp_min.default(arg1_1, -448.0);  arg1_1 = None\n    clamp_max = torch.ops.aten.clamp_max.default(clamp_min, 448.0);  clamp_min = None\n    convert_element_type = torch.ops.prims.convert_element_type.default(clamp_max, torch.float8_e4m3fn);  clamp_max = None\n    dequantize_affine_float8_1 = torch.ops.torchao.dequantize_affine_float8.default(convert_element_type, full_default);  convert_element_type = full_default = None\n    permute = torch.ops.aten.permute.default(dequantize_affine_float8, [1, 0]);  dequantize_affine_float8 = None\n    mm = torch.ops.aten.mm.default(dequantize_affine_float8_1, permute);  dequantize_affine_float8_1 = permute = None\n    return (mm,)\n```\n\nFor comparison, here are the results of int8. Quant will be used as a separate operator(torch.ops.quantized_decomposed.quantize_per_tensor.default).\n```python\ndef forward(self, arg4_1):\n    arg0_1 = self._frozen_param0\n    arg1_1 = self._frozen_param1\n    arg2_1 = self._frozen_param2\n    arg3_1 = self._frozen_param3\n    dequantize_per_channel = torch.ops.quantized_decomposed.dequantize_per_channel.default(arg3_1, arg1_1, arg2_1, 0, -128, 127, torch.int8);  arg3_1 = arg1_1 = arg2_1 = None\n    quantize_per_tensor = torch.ops.quantized_decomposed.quantize_per_tensor.default(arg4_1, 0.027873406186699867, 128, 0, 255, torch.uint8);  arg4_1 = None\n    dequantize_per_tensor = torch.ops.quantized_decomposed.dequant",
    "url": "https://github.com/pytorch/ao/issues/2896",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-28T06:07:47Z",
    "updated_at": "2025-09-21T09:53:16Z",
    "user": "shiyang-weng"
  },
  {
    "repo": "pytorch/vision",
    "number": 9196,
    "title": "Why am I getting a discrepency between SSDLite Scores and the Full Probability Vector?",
    "body": "I am noticitng a slight discrepency between the scores output by the SSDLite model and the Full Probability Vector you get from feeding the features extracted from the backbone through the model head. While the difference is slight, around .004, I find the behavior peculiar and cant find an explanation. Please see the code below:\n\n```\nimport torch\nfrom torchvision.models.detection import ssdlite320_mobilenet_v3_large\nfrom torchvision.transforms import functional as F\nfrom PIL import Image\nimport requests \n\nmodel = ssdlite320_mobilenet_v3_large(weights=True)\nmodel.eval();\n\nmodel_categories_url = 'https://raw.githubusercontent.com/levan92/coco-classes-mapping/refs/heads/master/coco91.names'\nmodel_categories = requests.get(model_categories_url).text.split('\\n')\nmodel_categories.insert(0, '')\n\nimage_url = 'https://storage.googleapis.com/download.tensorflow.org/example_images/YellowLabradorLooking_new.jpg'\nimage_label = 'dog'\nimg = Image.open(requests.get(image_url, stream = True).raw)\nimg_tensor = F.to_tensor(img)\nimg_tensor = F.resize(img_tensor, [320, 320])\nimg_tensor = img_tensor.unsqueeze(0)\n\nwith torch.no_grad():\n    # 1. Pass through backbone and head\n    backbone_output = model.backbone(img_tensor)\n    \n    #2 Convert OrderedDict to list of feature maps\n    features = list(backbone_output.values())\n    head_outputs = model.head(features)\n\n    # 3. Compute class logits (before NMS)\n    class_logits = head_outputs['cls_logits']  # shape: [batch_size, num_anchors, num_classes]\n    bbox_regression = head_outputs['bbox_regression']\n\n    # 4. Apply softmax to get probabilities\n    class_probs = torch.softmax(class_logits, dim=-1)  # shape: [1, num_anchors, num_classes]\n\nclass_index = model_categories.index(image_label)\nclass_detections = class_probs[0, (class_probs[0].argmax(dim = 1) == class_index)]\nsorted_indices = torch.argsort(class_detections[:, class_index], descending = True)\nprint(f\"Full Probability Vector Max Value: {class_detections[sorted_indices][0].max(): .4f}\")\n\nimg_tensor = img_tensor.detach()\nmodel_output = model(img_tensor)\nprint(f\"Model Output Max Sore: {model_output[0]['scores'][0]: .4f}\")\n\n>>> Full Probability Vector Max Value:  0.9851\n>>> Model Output Max Sore:  0.9890\n```",
    "url": "https://github.com/pytorch/vision/issues/9196",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-08-28T04:24:56Z",
    "updated_at": "2025-09-06T14:58:19Z",
    "user": "Aneesh-Sandhir"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40462,
    "title": "Question about RoPE Implementation in modeling_llama: Should torch.cat be repeat_interleave?",
    "body": "Hi,\nI was going through the code for `modeling_llama` and the RoPE implementation. I came across the following function:\n\n```\ndef forward(self, x, position_ids):\n        inv_freq_expanded = self.inv_freq[None, :, None].float().expand(position_ids.shape[0], -1, 1).to(x.device)\n        position_ids_expanded = position_ids[:, None, :].float()\n\n        device_type = x.device.type if isinstance(x.device.type, str) and x.device.type != \"mps\" else \"cpu\"\n        with torch.autocast(device_type=device_type, enabled=False):  # Force float32\n            freqs = (inv_freq_expanded.float() @ position_ids_expanded.float()).transpose(1, 2)\n            emb = torch.cat((freqs, freqs), dim=-1)\n            cos = emb.cos() * self.attention_scaling\n            sin = emb.sin() * self.attention_scaling\n\n        return cos.to(dtype=x.dtype), sin.to(dtype=x.dtype)\n\n```\nI believe the line `emb = torch.cat((freqs, freqs), dim=-1)` should be replaced with `repeat_interleave`. This is because the cosine/sine angles for matrix multiplication should be structured like:\n```\n[cos(\u03b8\u2081), cos(\u03b8\u2081), cos(\u03b8\u2082), cos(\u03b8\u2082), cos(\u03b8\u2083), cos(\u03b8\u2083), ...]\n\n```\nThis way, further down the stream when we compute:\n```\nq_embed = (q * cos) + (rotate_half(q) * sin)\n```\n...the values are aligned properly for pairwise rotation. However, the current `torch.cat((freqs, freqs), dim=-1) ` should produce:\n```\n[cos(\u03b8\u2081), cos(\u03b8\u2082), cos(\u03b8\u2083), cos(\u03b8\u2081), cos(\u03b8\u2082), cos(\u03b8\u2083), ...]\n```\nwhich seems incorrect. Am I missing something?\nThanks,\nAbhidip",
    "url": "https://github.com/huggingface/transformers/issues/40462",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-26T16:32:41Z",
    "updated_at": "2025-08-27T10:01:11Z",
    "comments": 2,
    "user": "abhidipbhattacharyya"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40459,
    "title": "`use_kernels=True` does not invoke custom kernels",
    "body": "### System Info\n\n- `transformers` version: 4.56.0.dev0\n- Platform: Linux-5.4.0-216-generic-x86_64-with-glibc2.31\n- Python version: 3.12.7\n- Huggingface_hub version: 0.34.4\n- Safetensors version: 0.6.2\n- Accelerate version: 1.10.0\n- Accelerate config:    not found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.8.0+cu128 (CUDA)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: No\n- Using GPU in script?: Yes\n- GPU type: NVIDIA A100-SXM4-80GB\n\n### Who can help?\n\n@ArthurZucker\n\n### Reproduction\n\n```python\nimport logging\nlogging.basicConfig(level=logging.INFO)\n\nimport torch\nfrom transformers import (\n    AutoTokenizer, AutoModelForCausalLM,\n)\n\nmodel_id = \"openai/gpt-oss-20b\"\ntokenizer = AutoTokenizer.from_pretrained(model_id)\nmodel = AutoModelForCausalLM.from_pretrained(\n    model_id,\n    torch_dtype=\"auto\",\n    device_map=\"auto,\n    use_kernels=True,\n).eval()\n\nmessages = [\n    {\"role\": \"system\", \"content\": \"What is Tensor Parallelism?\"},\n]\n\ninputs = tokenizer.apply_chat_template(\n    messages,\n    add_generation_prompt=True,\n    return_tensors=\"pt\",\n    return_dict=True,\n    reasoning_effort=\"low\",\n).to(model.device)\n\nwith torch.inference_mode():\n    generated = model.generate(\n        **inputs,\n        do_sample=False,\n        temperature=None,\n        max_new_tokens=64,\n        disable_compile=True,\n    )\n\ndecoded_generation = tokenizer.batch_decode(generated, skip_special_tokens=True)[0]\nprint(decoded_generation)\n```\n\n### Expected behavior\n\nNoting that I have activated logging, I should be able to see the logs for all the custom kernels being invoked. While the `LigerRMSNorm` is being invoked I do not see the `MegaBlocksMoeMLP` as it should be (as [stated in the modelling file here](https://github.com/huggingface/transformers/blob/263d06fedc17bb28f70dabe2acae562bc617ef9b/src/transformers/models/gpt_oss/modeling_gpt_oss.py#L156)).\n\nI also note that while the `LigerRMSNorm` is invoked but it complains that it cannot be used due to not being compatible with compile:\n```\nINFO:root:Using layer `LigerRMSNorm` from repo `kernels-community/liger_kernels` (revision: main) for layer `LigerRMSNorm`\nINFO:root:Layer does not support torch.compile, using fallback\n```\nI have used `disable_compile=True,` in the `.generate()` method, which should have taken care of the issue.\n\n### Solution\n\nThe way I could invoke the custom kernels was to swap out these lines:\nhttps://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5241-L5243\n\nWith the following\n```py\n            from kernels import Device, Mode, kernelize\n\n            kernelize(model, device=Device(type=model.device.type), mode=Mode.INFERENCE)\n```\nWhile this is not the solution, and we should infer what mode the model is in, I thought of listing the current personal solution down for ease of ideation.",
    "url": "https://github.com/huggingface/transformers/issues/40459",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-08-26T13:32:35Z",
    "updated_at": "2025-09-16T08:50:55Z",
    "comments": 1,
    "user": "ariG23498"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12241,
    "title": "WAN2.1 FLF2V: Incorrect MASK Creation????",
    "body": "Hello! I think that it is maybe error. (Or not, please explain it for me!!)\n\nIn **WanImageToVideoPipeline** class in  `pipline_wan_i2v.py`, \n<img width=\"868\" height=\"243\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/8108a9e9-8632-44a1-93b8-abd9ae6a22cd\" />\n(the code is the part of `prepare_latents` function)\n\n**For I2V**, masking shape like as below:\n```\n[[1, 0, 0, ... , 0]\n[1, 0, 0, ... , 0]\n[1, 0, 0, ... , 0]\n[1, 0, 0, ... , 0]]\n```\nI understood: when the mask is 1, input video frame does not change.\n(*Mask shape: [1, 4, 21, 60, 104] = [B, C, F, H, W])\n  \n**But in the FLF2V case,** masking shape like as below:\n```\n[[1, 0, 0, ... , 0]\n[1, 0, 0, ... , 0]\n[1, 0, 0, ... , 0]\n**[1, 0, 0, ... , 1]]**\n```\nHere, **why the last frame mask has 1 only in last channel??**\nIs there anyone who can explain this part?  ",
    "url": "https://github.com/huggingface/diffusers/issues/12241",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-26T12:23:09Z",
    "updated_at": "2025-08-27T02:10:49Z",
    "comments": 1,
    "user": "KyujinHan"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1792,
    "title": "how to train lerobot model offline with offline data?",
    "body": "Hi, I'm trying to configure lerobot to train with pre-downloaded models and datasets. I'm stuck, however, with how to organize the model cache and dataset cache, and how to tell the train script I'm using offline everything?\n\nI tried to download the model and dataset:\n```\n$ hf download lerobot/pi0 --cache-dir ~/lerobot_download/hf_models/lerobot/pi0/\n$ hf download lerobot/aloha_sim_transfer_cube_human --repo-type dataset --cache-dir ~/lerobot_download/hf_datasets/lerobot/aloha_sim_transfer_cube_human/\n```\n",
    "url": "https://github.com/huggingface/lerobot/issues/1792",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-26T10:20:56Z",
    "updated_at": "2025-09-03T10:48:37Z",
    "user": "dalishi"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3748,
    "title": "How pass two layer class by use --fsdp_transformer_layer_cls_to_wrap?",
    "body": "",
    "url": "https://github.com/huggingface/accelerate/issues/3748",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-26T08:56:32Z",
    "updated_at": "2025-08-26T09:14:18Z",
    "user": "sunjian2015"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12239,
    "title": "Support for InfiniteTalk",
    "body": "### Model/Pipeline/Scheduler description\n\nhttps://huggingface.co/MeiGen-AI/InfiniteTalk is a wonderful audio driven video generation model and can also support infinite frame , which is based on wan2.1.  The demo  and user's workflow is also awesome. some examples: https://www.runninghub.cn/ai-detail/1958438624956203010\n\n### Open source status\n\n- [x] The model implementation is available.\n- [x] The model weights are available (Only relevant if addition is not a scheduler).\n\n### Provide useful links for the implementation\n\nhttps://huggingface.co/MeiGen-AI/InfiniteTalk\nhttps://github.com/MeiGen-AI/InfiniteTalk",
    "url": "https://github.com/huggingface/diffusers/issues/12239",
    "state": "open",
    "labels": [
      "help wanted",
      "New pipeline/model",
      "contributions-welcome"
    ],
    "created_at": "2025-08-26T06:57:43Z",
    "updated_at": "2025-09-05T00:18:46Z",
    "comments": 1,
    "user": "supermeng"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40406,
    "title": "Cache tokenlizer",
    "body": "### Feature request\n\nI am using Grounding DINO, which makes use of the `bert-base-uncanned` tokenlizer. Unfortunately, this model is never downloaded to cache, forcing a remote call to the API. Please allow for tokenlizer to be cached locally.\n\n### Motivation\n\nI want to use my software offline.\n\n### Your contribution\n\nI'm trying to find a way to download it manually as a workaround.",
    "url": "https://github.com/huggingface/transformers/issues/40406",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-08-24T08:36:14Z",
    "updated_at": "2025-09-10T11:49:06Z",
    "comments": 5,
    "user": "axymeus"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1851,
    "title": "SentencePieceBPE + Unicode NFD preprocessing leads to noise ?",
    "body": "Hi,\nI have had the issue multiple times, so I assume I am doing something wrong.\n\n**Versions:**\n- tokenizers==0.21.4\n- transformers==4.55.4\n\n**Training script**\n\n```py\nfrom transformers import PreTrainedTokenizerFast\nfrom pathlib import Path\nfrom read import get_texts_iter_for_tokenizer\nfrom tokenizers import SentencePieceBPETokenizer, normalizers, pre_tokenizers\n\ndef main():\n    output_dir = Path(\"hf_tokenizer\")\n    output_dir.mkdir(parents=True, exist_ok=True)\n\n    # Dump texts to a file\n    texts = get_texts_iter_for_tokenizer()\n\n    # Train SentencePiece model\n    tokenizer = SentencePieceBPETokenizer()\n\n    # Adding normalization and pre_tokenizer\n    tokenizer.normalizer = normalizers.Sequence([normalizers.NFD()])\n    tokenizer.pre_tokenizer = pre_tokenizers.ByteLevel()\n\n    # Adding special tokens and creating trainer instance\n    special_tokens = [\"<unk>\", \"<pad>\", \"<cls>\", \"<sep>\", \"<mask>\"]\n\n    # Training from iterator REMEMBER it's training on test set...\n    tokenizer.train_from_iterator(texts, special_tokens=special_tokens, show_progress=True)\n\n    fast_tokenizer = PreTrainedTokenizerFast(\n        tokenizer_object=tokenizer,\n        unk_token=\"<unk>\",\n        pad_token=\"<pad>\",\n        cls_token=\"<cls>\",\n        sep_token=\"<sep>\",\n        mask_token=\"<mask>\"\n    )\n    fast_tokenizer.save_pretrained(str(output_dir))\n```\n\nScript to reproduce bug:\n\n```py\nfrom transformers import PreTrainedTokenizerFast\n\nhf_tokenizer = PreTrainedTokenizerFast.from_pretrained(\"hf_tokenizer\")\n\n# Test\nprint(hf_tokenizer.tokenize(\"\u204ai\u0303 re\u0303 dn\u0303i u\u033esum\"))\n# ['\u00e2\u0123\u012c', 'i', '\u00cc\u0125', '\u0120re', '\u00cc\u0125', '\u0120dn', '\u00cc\u0125', 'i', '\u0120u', '\u00cc\u00be', 'sum']\nprint(hf_tokenizer.decode(hf_tokenizer.encode(\"\u204ai\u0303 re\u0303 dn\u0303i u\u033esum\"))\n# \u00e2\u0123\u012ci\u00cc\u0125\u0120re\u00cc\u0125\u0120dn\u00cc\u0125i\u0120u\u00cc\u00besum\n```\n\nI assume I am doing something wrong around preprocessing / postprocessing ?\n\n\n\n",
    "url": "https://github.com/huggingface/tokenizers/issues/1851",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-24T08:28:08Z",
    "updated_at": "2025-09-17T09:33:11Z",
    "comments": 3,
    "user": "PonteIneptique"
  },
  {
    "repo": "huggingface/coreml-examples",
    "number": 17,
    "title": "how to get absolute depth\uff0cmeters\uff1f",
    "body": "how to get absolute depth\uff0cmeters\uff1f",
    "url": "https://github.com/huggingface/coreml-examples/issues/17",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-24T03:20:58Z",
    "updated_at": "2025-08-24T03:20:58Z",
    "user": "jay25208"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40398,
    "title": "NVIDIA RADIO-L",
    "body": "### Model description\n\nWhile exploring, I came across [nvidia/RADIO-L](https://huggingface.co/nvidia/RADIO-L) and was wondering about its current support.\n\n1. May I ask if RADIO-L is already supported in Transformers?\n2. If not, would it be considered suitable to add?\n3. If a model requires trust_remote_code=True, what does that signify regarding its suitability for addition to Transformers?\n\nPlease share the general criteria for models to be added to Transformers.\n\nThank you very much for your guidance\n\ncc: @zucchini-nlp  @Rocketknight1 \n\n### Open source status\n\n- [x] The model implementation is available\n- [x] The model weights are available\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/transformers/issues/40398",
    "state": "open",
    "labels": [
      "New model"
    ],
    "created_at": "2025-08-23T11:14:42Z",
    "updated_at": "2025-08-26T14:44:11Z",
    "comments": 4,
    "user": "Uvi-12"
  },
  {
    "repo": "pytorch/ao",
    "number": 2862,
    "title": "Duplicated tests in test_mx_tensor.py and test_nvfp4_tensor.py?",
    "body": "seems like there are some duplicated tests, e.g. https://github.com/pytorch/ao/blob/27f4d7581f8fc6bab4ef37d54b09b6fa76c1ffe6/test/prototype/mx_formats/test_mx_tensor.py#L610 and https://github.com/pytorch/ao/blob/27f4d7581f8fc6bab4ef37d54b09b6fa76c1ffe6/test/prototype/mx_formats/test_nvfp4_tensor.py#L47",
    "url": "https://github.com/pytorch/ao/issues/2862",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-23T03:26:13Z",
    "updated_at": "2025-08-23T03:26:25Z",
    "comments": 0,
    "user": "jerryzh168"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12222,
    "title": "[Contribution welcome] adding a fast test for Qwen-Image Controlnet Pipeline",
    "body": "We are looking for help from community to add a fast time for this PR \nhttps://github.com/huggingface/diffusers/pull/12215\n\nYou can add a file under this folder:\nhttps://github.com/huggingface/diffusers/tree/main/tests/pipelines/qwenimage\n\n\nYou can reference other tests we added for qwee pipelines [example](https://github.com/huggingface/diffusers/blob/main/tests/pipelines/qwenimage/test_qwenimage.py), as well as controlnet fasts tests [example](https://github.com/huggingface/diffusers/tree/main/tests/pipelines/controlnet_flux)",
    "url": "https://github.com/huggingface/diffusers/issues/12222",
    "state": "closed",
    "labels": [
      "good first issue",
      "help wanted",
      "contributions-welcome"
    ],
    "created_at": "2025-08-22T21:04:50Z",
    "updated_at": "2025-08-25T01:58:59Z",
    "comments": 6,
    "user": "yiyixuxu"
  },
  {
    "repo": "pytorch/executorch",
    "number": 13607,
    "title": "\"How to Support a Custom Model in HTP Backend\" example code is out of date",
    "body": "### \ud83d\udcda The doc issue\n\nIn the \"How to Support a Custom Model in HTP Backend\" section of the QNN backend docs, there are a few imports that do not work. It looks like they might have moved in code, but missed in the docs. Specifically, the imports under `executorch.backends.qualcomm.compiler` and for `to_edge_transform_and_lower_to_qnn` need to be updated in the example code.\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @mergennachin @byjlw @cccclai @cbilgin",
    "url": "https://github.com/pytorch/executorch/issues/13607",
    "state": "closed",
    "labels": [
      "module: doc",
      "module: qnn"
    ],
    "created_at": "2025-08-22T20:53:38Z",
    "updated_at": "2025-09-30T22:34:54Z",
    "user": "GregoryComer"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12221,
    "title": "[Looking for community contribution] support DiffSynth Controlnet in diffusers",
    "body": "### Model/Pipeline/Scheduler description\n\nHi!\nWe want to add first party support for DiffSynth controlnet in diffusers, and we are looking for some help from the community! \n\nLet me know if you're interested! \n\n\n### Open source status\n\n- [x] The model implementation is available.\n- [x] The model weights are available (Only relevant if addition is not a scheduler).\n\n### Provide useful links for the implementation\n\nhttps://huggingface.co/SahilCarterr/Qwen-Image-Blockwise-ControlNet-Canny\nhttps://huggingface.co/SahilCarterr/Qwen-Image-Blockwise-ControlNet-Depth",
    "url": "https://github.com/huggingface/diffusers/issues/12221",
    "state": "open",
    "labels": [
      "help wanted",
      "Good second issue",
      "contributions-welcome"
    ],
    "created_at": "2025-08-22T20:49:18Z",
    "updated_at": "2025-09-11T10:01:08Z",
    "comments": 5,
    "user": "yiyixuxu"
  },
  {
    "repo": "pytorch/xla",
    "number": 9578,
    "title": "API for disabling SPMD?",
    "body": "The side effects of use_spmd() do not seem reversible through any obvious APIs. \n\nhttps://github.com/pytorch/xla/blob/6b6ef5c7d757f955565b2083c48d936bfd758dcd/torch_xla/runtime.py#L191-L231\n\nIs there some mechanism to do this? \n\n",
    "url": "https://github.com/pytorch/xla/issues/9578",
    "state": "open",
    "labels": [
      "enhancement",
      "distributed"
    ],
    "created_at": "2025-08-22T19:28:18Z",
    "updated_at": "2025-08-23T13:49:31Z",
    "comments": 1,
    "user": "jameszianxuTT"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 649,
    "title": "How to determine if a file is a safetensor file",
    "body": "Is there a good and fast way to determine if a file is a safetensors file. We would like to avoid reading the whole header. \n\nBackground we are currently trying to add safetensors as a datatype to the Galaxy project: https://github.com/galaxyproject/galaxy/pull/20754",
    "url": "https://github.com/huggingface/safetensors/issues/649",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-22T09:17:49Z",
    "updated_at": "2025-09-03T11:08:30Z",
    "user": "bernt-matthias"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1775,
    "title": "What's the finetuning method? Is it all full-finetuning?",
    "body": "I could't find any thing about LORA finetuning, is the default method full-finetuning by now?",
    "url": "https://github.com/huggingface/lerobot/issues/1775",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-08-22T06:48:25Z",
    "updated_at": "2025-10-07T20:55:10Z",
    "user": "lin-whale"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1774,
    "title": "Finetune smolvla with vision encoder",
    "body": "### System Info\n\n```Shell\n- `lerobot` version: 0.1.0\n- Platform: Linux-6.8.0-65-generic-x86_64-with-glibc2.35\n- Python version: 3.10.18\n- Huggingface_hub version: 0.33.4\n- Dataset version: 3.6.0\n- Numpy version: 2.2.6\n- PyTorch version (GPU?): 2.7.1+cu126 (True)\n- Cuda version: 12060\n- Using GPU in script?: <fill in>\n```\n\n### Information\n\n- [ ] One of the scripts in the examples/ folder of LeRobot\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nnothing\n\n### Expected behavior\n\nI found that when attempting to fine-tune the model to grasp objects of different colors but identical shapes, it consistently grasped the wrong object. I found that the output feature differences from the VLM for the same image, such as \u201cgrasp the green duck into the box\u201d versus \u201cgrasp the yellow duck into the box,\u201d were nearly zero. Is it possible that the VLM has weak color differentiation capabilities? Can the official support fine-tuning the visual encoder together?",
    "url": "https://github.com/huggingface/lerobot/issues/1774",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "good first issue"
    ],
    "created_at": "2025-08-22T05:20:58Z",
    "updated_at": "2025-10-08T11:31:02Z",
    "user": "THU-yancow"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40366,
    "title": "[Feature] Support fromjson in jinja2 chat template rendering",
    "body": "### Feature request\n\nGLM45 requires `fromjson` in jinja2 to deserialize str typed `tool_calls.function.arguments` to dict within chat template so it can iterate over `arguments`'s k-v within jinja2 chat template. \n\n```\n{% for tc in m.tool_calls %}\n{%- if tc.function %}\n{%- set tc = tc.function %}\n{%- endif %}\n{{ '\\n<tool_call>' + tc.name }}\n{% set _args = tc.arguments | fromjson %}\n{% for k, v in _args.items() %}\n<arg_key>{{ k }}</arg_key>\n<arg_value>{{ v \\| tojson(ensure_ascii=False) if v is not string else v }}</arg_value>\n{% endfor %}\n</tool_call>{% endfor %}\n{% endif %}\n```\n\nhttps://huggingface.co/zai-org/GLM-4.5/blob/main/chat_template.jinja#L75\n\n### Motivation\n\nGLM45 requires `fromjson` in jinja2 to deserialize str typed `tool_calls.function.arguments` to dict within chat template so it can iterate over `arguments`'s k-v within jinja2 chat template. \n\n```\n{% for tc in m.tool_calls %}\n{%- if tc.function %}\n{%- set tc = tc.function %}\n{%- endif %}\n{{ '\\n<tool_call>' + tc.name }}\n{% set _args = tc.arguments | fromjson %}\n{% for k, v in _args.items() %}\n<arg_key>{{ k }}</arg_key>\n<arg_value>{{ v \\| tojson(ensure_ascii=False) if v is not string else v }}</arg_value>\n{% endfor %}\n</tool_call>{% endfor %}\n{% endif %}\n```\n\nhttps://huggingface.co/zai-org/GLM-4.5/blob/main/chat_template.jinja#L75\n\n### Your contribution\n\nI will submit a PR",
    "url": "https://github.com/huggingface/transformers/issues/40366",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-08-22T05:11:06Z",
    "updated_at": "2025-08-22T05:18:45Z",
    "comments": 1,
    "user": "byjiang1996"
  },
  {
    "repo": "huggingface/peft",
    "number": 2749,
    "title": "Set multiple adapters actively when training",
    "body": "Hi! In incremental scenarios, I want to train a new adapter while keeping some old adapters actively. Notice that PeftModel can set active adapter by \"model.set_adapter()\". But every time can set only one adapter, where the type of args \"adapter_name\" is \"str\" rather than \"List[str]\". I also notice that class \"PeftMixedModel\" can set multiple adapters actively but only support for inference, and this class uses \"model.base_model.set_adapter()\" to achieve it. So I am not sure can I also set multiple adapters actively when training. My code is as following:\n\n```python\nmodel = AutoModelForCausalLM.from_pretrained()\npeft_config = LoraConfig()\nmodel = get_peft_model(model, peft_config, adapter_name=\"new\")\nmodel.load_adapter(adapter_path, adapter_name=\"old\")\nmodel.base_model.set_adapter([\"new\", \"old\"])\nfor name, param in model.named_parameters():\n    if \"lora_A.old\" in name or \"lora_B.old\" in name:\n        param.requires_grad = False\ntraining_args = TrainingArguments()\ntrainer = Trainer()\ntrainer.train()\n```\n",
    "url": "https://github.com/huggingface/peft/issues/2749",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-21T09:59:25Z",
    "updated_at": "2025-09-29T15:04:15Z",
    "comments": 4,
    "user": "Yongyi-Liao"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1612,
    "title": "PP doesn't work with FlexAttention",
    "body": "Today PP doesn't work with FlexAttention block causal masking, because PP can't receive `eos_id` as a non-Tensor input (nor can it receive a mask function).\nhttps://github.com/pytorch/torchtitan/blob/main/torchtitan/train.py#L433\n\nThis regression is coming from a recent refactor https://github.com/pytorch/torchtitan/pull/1424 to move `eos_id` out of `ModelArgs`, to remove dependency from model to tokenizer.\n\nThis is blocking optimizations from https://github.com/pytorch/torchtitan/pull/1610.",
    "url": "https://github.com/pytorch/torchtitan/issues/1612",
    "state": "closed",
    "labels": [
      "module: pipelining",
      "high priority",
      "module: flex attention",
      "triage review"
    ],
    "created_at": "2025-08-21T07:25:15Z",
    "updated_at": "2025-08-22T15:35:06Z",
    "comments": 0,
    "user": "tianyu-l"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1765,
    "title": "Questions about using LIBERO dataset (loss starts extremely high)",
    "body": "Hello,\n\nI am training on the \"**IPEC-COMMUNITY/libero_spatial_no_noops_1.0.0_lerobot**\" dataset, but I encountered an issue(here is the dateset:https://huggingface.co/datasets/IPEC-COMMUNITY/libero_spatial_no_noops_1.0.0_lerobot):\n\nAt the very beginning of training, the loss is extremely high (around 500).\n\nI would like to clarify a few points:\n\nIs the policy output expected to be relative actions or absolute actions?\nDo I need to perform any preprocessing on the dataset? For example:\nNormalizing the gripper action to the range [-1, 1]?\nAny other scaling or transformation?\n\nWhat is the exact relationship between the action and state in the dataset?\nI noticed that trajectories sometimes look different than expected(shown in the figure below).\nDo we need to process either the action or state to align them?\n\nAny guidance on the correct usage of the dataset would be greatly appreciated. Thanks!\n\n<img width=\"1229\" height=\"592\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b1102728-4916-405f-9a87-ab190b07f58b\" />\n\n",
    "url": "https://github.com/huggingface/lerobot/issues/1765",
    "state": "open",
    "labels": [
      "question",
      "dataset",
      "simulation"
    ],
    "created_at": "2025-08-21T05:06:51Z",
    "updated_at": "2025-09-23T09:46:41Z",
    "user": "hamondyan"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40330,
    "title": "open-qwen2vl-base",
    "body": "### Model description\n\nis there any plan to add open-qwen2vl-base model? \n\n### Open source status\n\n- [x] The model implementation is available\n- [x] The model weights are available\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/transformers/issues/40330",
    "state": "open",
    "labels": [
      "New model"
    ],
    "created_at": "2025-08-21T02:24:01Z",
    "updated_at": "2025-08-23T10:18:28Z",
    "comments": 5,
    "user": "olccihyeon"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1850,
    "title": "Safe encoding of strings that might contain special token text",
    "body": "When feeding untrusted string inputs into an LLM, it's often important not convert any of the input into special tokens, which might indicate message boundaries or other syntax. Among other reasons, this is important for guarding against prompt injection attacks.\n\ntiktoken provides a way to control how the encoding deals with special tokens, using the `allowed_special` and `disallowed_special` arguments. For example.\n\n```python\nenc = tiktoken.get_encoding(\"o200k_base\")\nenc.encode(\"<|endoftext|>\", disallowed_special=[]) # => [27, 91, 419, 1440, 919, 91, 29]\nenc.encode(\"<|endoftext|>\") # => ValueError\nenc.encode(\"<|endoftext|>\", allowed_special=set([\"<|endoftext|>\"]) # => [199999]\n```\n\nHowever, I can't figure out how to avoid tokenizing strings like <|im_start|> into special tokens, when using the tokenizers library. Note that I want to be able to *decode* the special token to its string representation for visualization. However, I want to make sure that when I call `encode`, I don't get a special token -- I tokenize the string representation as if there was no <|im_start|> special token. \n\nMaybe the easiest way to do this is to create two separate tokenizers, by creating new json files, but this is pretty inconvenient.",
    "url": "https://github.com/huggingface/tokenizers/issues/1850",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-21T00:53:17Z",
    "updated_at": "2025-09-01T18:03:59Z",
    "comments": 5,
    "user": "joschu"
  },
  {
    "repo": "pytorch/ao",
    "number": 2828,
    "title": "[fp8 blockwise training] add benchmarking scripts comparing triton quantization kernels vs torch.compile",
    "body": "## Summary\n- We currently have benchmarking scripts comparing bf16 GEMMs vs Triton fp8 groupwise/blockwise GEMMs vs torch.compile generated fp8 groupwise/blockwise GEMMs [here](https://github.com/pytorch/ao/tree/main/benchmarks/prototype/blockwise_fp8_training)\n- However, we have no benchmarks mentioning the quantization kernels and doing memory bandwidth calculations on them. \n- We need isolated perf benchmarking for these, in order to (1) evaluate options, such as torch.compile vs handwritten kernels, and (2) measure perf improvements/regeressions from changes\n\n## Example\n- An example of a benchmarking script for quantization kernel (with mem bw calcs) can be found [here](https://github.com/pytorch/ao/blob/main/benchmarks/prototype/moe_training/benchmark_rowwise_3d_quant_kernels.py). This can be used as a starting point. For consistency with other benchmarking tooling, please use the same generic infra (`ExperimentConfig`, `ExperimentResult` etc).\n\n## Kernels to benchmark\n- [fp8_blockwise_act_quant_lhs](https://github.com/pytorch/ao/blob/8812365a78c392e866e9007960875cb6d0678fda/torchao/prototype/blockwise_fp8_training/kernels.py#L307C5-L307C32)\n- [fp8_blockwise_act_quant_rhs](https://github.com/pytorch/ao/blob/8812365a78c392e866e9007960875cb6d0678fda/torchao/prototype/blockwise_fp8_training/kernels.py#L387C5-L387C32)\n- [fp8_blockwise_act_quant_transposed_lhs](https://github.com/pytorch/ao/blob/8812365a78c392e866e9007960875cb6d0678fda/torchao/prototype/blockwise_fp8_training/kernels.py#L486)\n- [fp8_blockwise_weight_quant_rhs](https://github.com/pytorch/ao/blob/8812365a78c392e866e9007960875cb6d0678fda/torchao/prototype/blockwise_fp8_training/kernels.py#L571)\n- [fp8_blockwise_weight_quant_transposed_rhs](https://github.com/pytorch/ao/blob/8812365a78c392e866e9007960875cb6d0678fda/torchao/prototype/blockwise_fp8_training/kernels.py#L672)\n- [torch_blockwise_scale_act_quant_lhs](https://github.com/pytorch/ao/blob/8812365a78c392e866e9007960875cb6d0678fda/torchao/prototype/blockwise_fp8_training/kernels.py#L713C5-L713C40) (pytorch reference implementation, bench with torch.compile)\n- [torch_blockwise_scale_act_quant_rhs](https://github.com/pytorch/ao/blob/8812365a78c392e866e9007960875cb6d0678fda/torchao/prototype/blockwise_fp8_training/kernels.py#L744C5-L744C40) (pytorch reference implementation, bench with torch.compile)\n- [torch_blockwise_scale_weight_quant](https://github.com/pytorch/ao/blob/8812365a78c392e866e9007960875cb6d0678fda/torchao/prototype/blockwise_fp8_training/kernels.py#L803) (pytorch reference implementation, bench with torch.compile)",
    "url": "https://github.com/pytorch/ao/issues/2828",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-21T00:35:55Z",
    "updated_at": "2025-08-21T00:37:13Z",
    "comments": 0,
    "user": "danielvegamyhre"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1605,
    "title": "How could I run the DeepSpeed-Megatron gpt_model  in TorchTitan ?",
    "body": "Here is the  model I would like to run with TorchTitan\nhttps://github.com/deepspeedai/Megatron-DeepSpeed/blob/main/megatron/model/gpt_model.py#L188 .\n\nAny recommendation will be appreciated. \n\n\n",
    "url": "https://github.com/pytorch/torchtitan/issues/1605",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-08-20T18:55:50Z",
    "updated_at": "2025-08-21T02:34:22Z",
    "user": "githubsgi"
  },
  {
    "repo": "huggingface/peft",
    "number": 2746,
    "title": "Gemma 2/3 Attention: Expected a single attention mask, got 2 instead",
    "body": "Hi! I'm getting this error `ValueError: Expected a single attention mask, got 2 instead` at inference (after prompt tuning)--I've only had this happen with the Gemma 2 and 3 models, so it might have something to do with their specific attention mechanism. Is there a workaround (or am I maybe missing something)?\n\nI'm running the following:\n```\nmodel_name = \"google/gemma-2-2b\"\ntokenizer = AutoTokenizer.from_pretrained(model_name)\nmodel = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, device_map=\"auto\")\n\nsoft_model = get_peft_model(model, prompt_config)\n\ninputs = tokenizer(model_instruction, return_tensors=\"pt\")\noutputs = soft_model.generate(\n        input_ids=inputs[\"input_ids\"],\n        attention_mask=inputs[\"attention_mask\"],\n        max_new_tokens=num_gen_tokens,\n        eos_token_id=tokenizer.eos_token_id,\n    )\n```",
    "url": "https://github.com/huggingface/peft/issues/2746",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-20T18:08:02Z",
    "updated_at": "2025-08-27T02:43:22Z",
    "comments": 8,
    "user": "michelleezhang"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40323,
    "title": "Is there a plan to add DINOv3 into AutoBackbone?",
    "body": "### Feature request\n\nIs there a plan to add DINOv3 to AutoBackbone. At present, DINOv2 is already inside, and I think DINOv3 should be able to inherit it directly. Appreciate a lot.\n\n### Motivation\n\nFor the convenience of use\n\n### Your contribution\n\nDINOv3 should be able to inherit from DINOv2 directly.",
    "url": "https://github.com/huggingface/transformers/issues/40323",
    "state": "closed",
    "labels": [
      "Feature request",
      "Vision"
    ],
    "created_at": "2025-08-20T16:02:45Z",
    "updated_at": "2025-11-11T16:22:08Z",
    "comments": 4,
    "user": "Farenweh"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 161060,
    "title": "[Question] How to robustly prevent operator fusion in Inductor to workaround a compilation bug?",
    "body": "### \ud83d\udc1b Describe the bug\n\nI've encountered a Triton compilation failure when using torch.compile with the AOT Inductor backend. The issue appears in a model that uses a computation pattern similar to Rotary Position Embeddings (RoPE).\n\nI'm opening this issue in advance while I work on creating a minimal, self-contained reproducer for a compiler bug, as that process may take some time. My immediate goal is to seek advice on how to effectively workaround the issue.\n\nSource code just belike:\n```Python\n        _to_copy_default_17 = torch.ops.aten._to_copy.default(detach_default_8, dtype = torch.int64, layout = torch.strided, device = device(type='cuda', index=0))\n        unsqueeze_default_86 = torch.ops.aten.unsqueeze.default(_to_copy_default_17, 1);  _to_copy_default_17 = None\n        unsqueeze_default_87 = torch.ops.aten.unsqueeze.default(unsqueeze_default_86, -1);  unsqueeze_default_86 = None\n        _tensor_constant12 = self._tensor_constant12\n        mul_tensor_5 = torch.ops.aten.mul.Tensor(unsqueeze_default_87, _tensor_constant12);  unsqueeze_default_87 = _tensor_constant12 = None\n        cos_default_1 = torch.ops.aten.cos.default(mul_tensor_5)\n        sin_default_1 = torch.ops.aten.sin.default(mul_tensor_5);  mul_tensor_5 = None\n        split_tensor_1 = torch.ops.aten.split.Tensor(transpose_int_1, 64, -1);  transpose_int_1 = None\n        getitem_6 = split_tensor_1[0]\n        getitem_7 = split_tensor_1[1];  split_tensor_1 = None\n        mul_tensor_6 = torch.ops.aten.mul.Tensor(getitem_6, cos_default_1)\n        mul_tensor_7 = torch.ops.aten.mul.Tensor(getitem_7, sin_default_1)\n        return mul_tensor_7 \n```\n\nAnd my demo code is:\n```\n    with torch.inference_mode():\n        with torch.amp.autocast(\n                    device_type=\"cuda\", enabled=True, dtype=torch.float16\n                ):\n            exported_model = torch.export.export(\n                mod = model,\n                args = (),\n                kwargs = inputs_dict,\n                dynamic_shapes = {k: {0:torch.export.Dim.STATIC} for k in inputs_dict.keys()}\n            )\n        \n            inductor_configs = {\n                \"max_autotune\": False, \n            }\n            aoti_package_path = torch._inductor.aoti_compile_and_package(\n                exported_model, \n                package_path=os.path.join(os.path.dirname(__file__), \"wenqi_ele_0820.pt2\"),\n                inductor_configs=inductor_configs\n            )\n```\n\nThe compiler attempts to create a large fused kernel, but the generated Triton code is invalid, leading to a NameError: 'zuf0' is not defined during compilation. I am working on creating a minimal, self-contained reproducer and will provide it as soon as it's ready.\n\n```\nE0820 22:49:40.184000 162221 /home/admin/zy429782/miniforge3/envs/pytorch271/lib/python3.11/site-packages/torch/_inductor/runtime/triton_heuristics.py:539]     module = src.make_ir(options, codegen_fns, module_map, context)\nE0820 22:49:40.184000 162221 /home/admin/zy429782/miniforge3/envs/pytorch271/lib/python3.11/site-packages/torch/_inductor/runtime/triton_heuristics.py:539]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nE0820 22:49:40.184000 162221 /home/admin/zy429782/miniforge3/envs/pytorch271/lib/python3.11/site-packages/torch/_inductor/runtime/triton_heuristics.py:539]   File \"/home/zy429782/miniforge3/envs/pytorch271/lib/python3.11/site-packages/triton/compiler/compiler.py\", line 81, in make_ir\nE0820 22:49:40.184000 162221 /home/admin/zy429782/miniforge3/envs/pytorch271/lib/python3.11/site-packages/torch/_inductor/runtime/triton_heuristics.py:539]     return ast_to_ttir(self.fn, self, context=context, options=options, codegen_fns=codegen_fns,\nE0820 22:49:40.184000 162221 /home/admin/zy429782/miniforge3/envs/pytorch271/lib/python3.11/site-packages/torch/_inductor/runtime/triton_heuristics.py:539]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nE0820 22:49:40.184000 162221 /home/admin/zy429782/miniforge3/envs/pytorch271/lib/python3.11/site-packages/torch/_inductor/runtime/triton_heuristics.py:539] triton.compiler.errors.CompilationError: at 21:12:\nE0820 22:49:40.184000 162221 /home/admin/zy429782/miniforge3/envs/pytorch271/lib/python3.11/site-packages/torch/_inductor/runtime/triton_heuristics.py:539]     tmp3 = tl.load(in_ptr1 + (0))\nE0820 22:49:40.184000 162221 /home/admin/zy429782/miniforge3/envs/pytorch271/lib/python3.11/site-packages/torch/_inductor/runtime/triton_heuristics.py:539]     tmp4 = tl.broadcast_to(tmp3, [XBLOCK])\nE0820 22:49:40.184000 162221 /home/admin/zy429782/miniforge3/envs/pytorch271/lib/python3.11/site-packages/torch/_inductor/runtime/triton_heuristics.py:539]     tmp16 = tl.load(in_ptr2 + (x1), xmask, eviction_policy='evict_last')\nE0820 22:49:40.184000 162221 /home/admin/zy429782/miniforge3/envs/pytorch271/lib/python3.11/site-packages/torch/_inductor/runtime/triton_heuristics.py:539]     tmp22 = tl.load(in_ptr3 + (x0), xmask, eviction_policy='evict_last'",
    "url": "https://github.com/pytorch/pytorch/issues/161060",
    "state": "closed",
    "labels": [
      "oncall: pt2"
    ],
    "created_at": "2025-08-20T15:44:48Z",
    "updated_at": "2025-08-21T10:10:23Z",
    "user": "sujuyu"
  },
  {
    "repo": "pytorch/torchrec",
    "number": 3298,
    "title": "apply 2d parallel but how to save and restore weights",
    "body": "how to save and restore weights when applying 2d parallel ?",
    "url": "https://github.com/meta-pytorch/torchrec/issues/3298",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-20T10:42:19Z",
    "updated_at": "2025-08-21T01:21:42Z",
    "comments": 0,
    "user": "zxr888"
  },
  {
    "repo": "pytorch/ao",
    "number": 2811,
    "title": "NVFP4Tensor to_copy is wrong?",
    "body": "```\n>>> from torchao.prototype.mx_formats.nvfp4_tensor import NVFP4Tensor\n>>> import torch\n>>> torch.ops.aten._to_copy(NVFP4Tensor.to_nvfp4(torch.randn((32, 128))), dtype=torch.bfloat16)\n\nTraceback (most recent call last):\n  File \"<stdin>\", line 1, in <module>\n  File \"/home/andrewor/local/pytorch/torch/_ops.py\", line 1254, in __call__\n    return self._op(*args, **kwargs)\n  File \"/home/andrewor/local/ao/torchao/prototype/mx_formats/nvfp4_tensor.py\", line 137, in __torch_dispatch__\n    return NVFP4_OPS_TABLE[func](func, types, args, kwargs)\n  File \"/home/andrewor/local/ao/torchao/prototype/mx_formats/nvfp4_tensor.py\", line 316, in nvfp4_to_copy\n    tensor._data,\nAttributeError: 'NVFP4Tensor' object has no attribute '_data'\n```\n\nSeems like this should be `tensor.qdata`, and also it should be the [first argument](https://github.com/pytorch/ao/blob/083361bc3f7addc505a0f994a923f4ae9f54388e/torchao/prototype/mx_formats/nvfp4_tensor.py#L93)?\n\nhttps://github.com/pytorch/ao/blob/083361bc3f7addc505a0f994a923f4ae9f54388e/torchao/prototype/mx_formats/nvfp4_tensor.py#L311-L322",
    "url": "https://github.com/pytorch/ao/issues/2811",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-19T23:39:31Z",
    "updated_at": "2025-08-22T21:59:15Z",
    "comments": 0,
    "user": "andrewor14"
  },
  {
    "repo": "pytorch/xla",
    "number": 9569,
    "title": "Remove excessive warn message in maybe_get_jax as it creates too many log lines during training",
    "body": "## \ud83d\udc1b Bug\n\nThe maybe_get_jax() function in torch_xla/_internal/jax_workarounds.py merged in #9521  currently emits a warning message when JAX is not installed. While informative, this warning results in an excessive number of log lines during training workloads, cluttering the logs and making it difficult to spot genuinely important debug messages.\n\n## To Reproduce\n\nSteps to reproduce the behavior:\n\n1. Create Python Virtual Environment (python3 -m venv ptxla_28) on Ubuntu 22.04\n2. pip install torch==2.8.0 torchvision; pip install torch_xla==2.8.0\n3. Create small python script(let's call it trigger_warning.py) \n``` \nimport sys\nsys.path.insert(0, 'ptxla_28/lib/python3.10/site-packages')\nfrom torch_xla._internal.jax_workarounds import maybe_get_jax\nmaybe_get_jax() \n```\n5. execute the script `bash -c \"source ptxla_28/bin/activate && python trigger_warning.py\"`\n6. You should be able to see the warning message like below\n\n```\nWARNING:root:Defaulting to PJRT_DEVICE=CPU\nWARNING:root:You are trying to use a feature that requires jax/pallas.You can install Jax/Pallas via pip install torch_xla[pallas]\n```\n\n## Expected behavior\n\nRemove or suppress this warning message, or limit it to display only once per process/session instead of for every invocation.\n\n## Environment\n\n - Reproducible on XLA backend [CPU/TPU/CUDA]: CPU\n - torch_xla version: 2.8.0\n - Relevant Code:\nhttps://github.com/pytorch/xla/blob/0f56dec9a33a993d4c14cb755bdd25490cabba21/torch_xla/_internal/jax_workarounds.py#L61\n\n\n## Additional context\n\nThe current behavior results in thousands of lines of repeated warnings when running workloads that do not require JAX, negatively impacting developer experience. Reducing or removing this warning will significantly clean up logs for users running long or large-scale training jobs, improving usability without sacrificing relevant error reporting.\n",
    "url": "https://github.com/pytorch/xla/issues/9569",
    "state": "open",
    "labels": [
      "performance",
      "usability",
      "2.8 release"
    ],
    "created_at": "2025-08-19T20:27:24Z",
    "updated_at": "2025-10-11T02:52:17Z",
    "comments": 10,
    "user": "rajkthakur"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3786,
    "title": "How to convert a AMP trained model to get best performance and speed?",
    "body": "According to the doc: https://docs.pytorch.org/TensorRT/user_guide/mixed_precision.html  We can convert model with this project where the param precision are explicitly said in the code.  But when I train a model with torch AMP GradScaler where no value precision tagged in model code,  Can we use this method to get a conerted chackpoint with best performance and inference speedup?\n\n\nIn fect, we had tried the  torch pt->onnx-> tensorrt fp16  pipeline to convert pytorch AMP trained checkpoint into trt model format,  but the inference results are noisey. while pt->onnx-> tensorrt fp32 pipeline will get a trt fp32 model the inference slower then what we need.   ",
    "url": "https://github.com/pytorch/TensorRT/issues/3786",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-19T07:30:31Z",
    "updated_at": "2025-10-23T00:20:02Z",
    "user": "JohnHerry"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40263,
    "title": "[VLMs] How to process a batch that contains samples with and without images?",
    "body": "Is there a **standard** way to process a batch that contains samples with and without images?\n\nFor example:\n\n```python\nfrom transformers import AutoProcessor\nfrom PIL import Image\nimport numpy as np\n\nmodel_id = ...  # tested are \"google/gemma-3-4b-it\", \"HuggingFaceM4/idefics2-8b\", \"HuggingFaceM4/Idefics3-8B-Llama3\", \"HuggingFaceTB/SmolVLM2-2.2B-Instruct\", \"llava-hf/llava-1.5-7b-hf\", \"llava-hf/llava-v1.6-mistral-7b-hf\", \"OpenGVLab/InternVL3-8B-hf\", \"Qwen/Qwen2-VL-2B-Instruct\",\"Qwen/Qwen2.5-VL-3B-Instruct\"]\nprocessor = AutoProcessor.from_pretrained(model_id)\n\nmessages = [\n    [{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"What's the capital of France?\"}]}],\n    [{\"role\": \"user\", \"content\": [{\"type\": \"image\"}, {\"type\": \"text\", \"text\": \"What is it?\"}]}],\n]\ntexts = processor.apply_chat_template(messages)\n\nimage = Image.fromarray(\n    np.random.uniform(low=0.0, high=255.0, size=(32, 48, 3)).astype(np.uint8)\n)\nimages = [[], [image]]\n\nprocessor(images=images, text=texts)\n```\n\nThis fails for all models I tested.\n\n\n```python\nimages=[image] # The only syntax I found that works for some models: llava-hf/llava-1.5-7b-hf, llava-hf/llava-v1.6-mistral-7b-hf, OpenGVLab/InternVL3-8B-hf, Qwen/Qwen2-VL-2B-Instruct, Qwen/Qwen2.5-VL-3B-Instruct\nimages = [None, [image]]  # always fails\nimages = [None, image]  # always fails\nimages = [[], [image]]  # always fails\n```\n\n### Expected behavior\n\nThere should be a standard / documented way to batch process mixed inputs (some samples with images, some without).\n\n\n",
    "url": "https://github.com/huggingface/transformers/issues/40263",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-19T05:09:36Z",
    "updated_at": "2025-09-18T08:08:51Z",
    "user": "qgallouedec"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12185,
    "title": "What's the difference between DreamBooth LoRa and traditional LoRa?",
    "body": "I see a lot of examples using DreamBooth LoRa training code. What's the difference between this and traditional LoRa training? Can this DreamBooth LoRa training code be adapted to standard SFT LoRa code? Does disabling with_prior_preservation return normal LoRa training?",
    "url": "https://github.com/huggingface/diffusers/issues/12185",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-19T03:32:30Z",
    "updated_at": "2025-08-19T15:04:22Z",
    "comments": 3,
    "user": "MetaInsight7"
  },
  {
    "repo": "huggingface/trl",
    "number": 3918,
    "title": "How to use trl-SFTTrainer to train Qwen-30B-A3B?",
    "body": "Has anyone tried using TRL to train Qwen-30B-A3B-Instruct-2507?",
    "url": "https://github.com/huggingface/trl/issues/3918",
    "state": "open",
    "labels": [
      "\u2753 question"
    ],
    "created_at": "2025-08-19T03:04:36Z",
    "updated_at": "2025-08-19T03:11:30Z",
    "user": "JeffWb"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7739,
    "title": "Replacement of \"Sequence\" feature with \"List\" breaks backward compatibility",
    "body": "PR #7634 replaced the Sequence feature with List in 4.0.0, so datasets saved with version 4.0.0 with that feature cannot be loaded by earlier versions. There is no clear option in 4.0.0 to use the legacy feature type to preserve backward compatibility.\n\nWhy is this a problem? I have a complex preprocessing and training pipeline dependent on 3.6.0; we manage a very large number of separate datasets that get concatenated during training. If just one of those datasets is saved with 4.0.0, they become unusable, and we have no way of \"fixing\" them. I can load them in 4.0.0 but I can't re-save with the legacy feature type, and I can't load it in 3.6.0 for obvious reasons.\n\nPerhaps I'm missing something here, since the PR says that backward compatibility is preserved; if so, it's not obvious to me how.",
    "url": "https://github.com/huggingface/datasets/issues/7739",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-18T17:28:38Z",
    "updated_at": "2025-09-10T14:17:50Z",
    "comments": 1,
    "user": "evmaki"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 119,
    "title": "How to 4DGS (.splatv)",
    "body": "How can I generate the .splatv file and get it running on my local server?",
    "url": "https://github.com/huggingface/gsplat.js/issues/119",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-18T07:35:04Z",
    "updated_at": "2025-08-18T07:35:04Z",
    "user": "CetosEdit"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12165,
    "title": "Failed to finetune the pre-trained model of 'stable-diffusion-v1-4' on image inpainting task",
    "body": "I finetuned the pre-trained model of 'stable-diffusion-inpainting' on image inpainting task, and all work well as the model is trained on  image inpainting. But when I finetuned with the pre-trained model of 'stable-diffusion-v1-4' which is trained on text-to-image, the loss is NaN and the result is pure black.\n\nAs the two models have different input channels for unet, I have changed the unet input channels of 'stable-diffusion-v1-4' to be fit for image inpainting task. So far, the code can run but the loss is NaN.  I do not know where is the problem, how to finetune  the pre-trained model of 'stable-diffusion-inpainting' on image inpainting task ? should I change some hyparameters? Any help will be appreciated, thanks!",
    "url": "https://github.com/huggingface/diffusers/issues/12165",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-17T07:15:36Z",
    "updated_at": "2025-09-07T09:35:38Z",
    "comments": 7,
    "user": "micklexqg"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 160833,
    "title": "How to address the bug 'unwaited collective calls' when using DTensor?",
    "body": "### \ud83d\udc1b Describe the bug\n\n\nI have called .wait() like this:\n\n```\ndef custom_wait(_dtensor):\n        _local_t = _dtensor.to_local()\n        if isinstance(_local_t, AsyncCollectiveTensor):\n            _local_t.wait()\n```\n\nBut it still has a BUG:\n\n```\n[W817 11:39:12.975673267 ProcessGroup.cpp:266] Warning: At the time of process termination, there are still 348 unwaited collective calls. Please review your program to ensure that:\n1. c10d_functional.wait_tensor() is invoked on all tensors returned from c10d_functional collective,\n2. c10d_functional.wait_tensor() is invoked on all output tensors of async_op=True torch.distributed collective called under `with allow_inflight_collective_as_graph_input_ctx():`,\nbefore the output tensors of the collective are used. (function ~WorkRegistry)\n\n```\n\n\nSince Dtensor does not have a method like `DTensor.wait()`, I have no idea how to handle it or how to safely use or delete it.\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.8.0+cu126\nIs debug build: False\nCUDA used to build PyTorch: 12.6\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.1 LTS (x86_64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version: Could not collect\nCMake version: Could not collect\nLibc version: glibc-2.39\n\nPython version: 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] (64-bit runtime)\nPython platform: Linux-6.8.0-48-generic-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: 12.0.140\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 2080 Ti\nNvidia driver version: 550.127.05\ncuDNN version: Could not collect\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\n\u67b6\u6784\uff1a                                x86_64\nCPU \u8fd0\u884c\u6a21\u5f0f\uff1a                        32-bit, 64-bit\nAddress sizes:                        39 bits physical, 48 bits virtual\n\u5b57\u8282\u5e8f\uff1a                              Little Endian\nCPU:                                  8\n\u5728\u7ebf CPU \u5217\u8868\uff1a                       0-7\n\u5382\u5546 ID\uff1a                             GenuineIntel\n\u578b\u53f7\u540d\u79f0\uff1a                            Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz\nCPU \u7cfb\u5217\uff1a                            6\n\u578b\u53f7\uff1a                                158\n\u6bcf\u4e2a\u6838\u7684\u7ebf\u7a0b\u6570\uff1a                      1\n\u6bcf\u4e2a\u5ea7\u7684\u6838\u6570\uff1a                        8\n\u5ea7\uff1a                                  1\n\u6b65\u8fdb\uff1a                                13\nCPU(s) scaling MHz:                   93%\nCPU \u6700\u5927 MHz\uff1a                        4900.0000\nCPU \u6700\u5c0f MHz\uff1a                        800.0000\nBogoMIPS\uff1a                            7200.00\n\u6807\u8bb0\uff1a                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities\n\u865a\u62df\u5316\uff1a                              VT-x\nL1d \u7f13\u5b58\uff1a                            256 KiB (8 instances)\nL1i \u7f13\u5b58\uff1a                            256 KiB (8 instances)\nL2 \u7f13\u5b58\uff1a                             2 MiB (8 instances)\nL3 \u7f13\u5b58\uff1a                             12 MiB (1 instance)\nNUMA \u8282\u70b9\uff1a                           1\nNUMA \u8282\u70b90 CPU\uff1a                      0-7\nVulnerability Gather data sampling:   Mitigation; Microcode\nVulnerability Itlb multihit:          KVM: Mitigation: VMX disabled\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Mitigation; Clear CPU buffers; SMT disabled\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Mitigation; Enhanced IBRS\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop\nVulnerability Srbds:                  Mitigation; Microcode\nVulnerability Tsx async abort:        Mitigation; TSX disabled\n\nVersions of relevant libraries:\n[pip3] numpy==2.1.3\n[pip3] nvidia-cublas-cu12==12.6.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.6.80\n[pip3] nvidia-cuda-nvrtc-cu12==12.6.77\n[pip3] nvidia-cuda-runtime-cu12==12.6.77\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cufft-cu12==11.3.0.4\n[pip3] nvidia-curand-cu12==10.3.7.77\n[p",
    "url": "https://github.com/pytorch/pytorch/issues/160833",
    "state": "open",
    "labels": [
      "high priority",
      "triage review",
      "needs reproduction",
      "oncall: distributed"
    ],
    "created_at": "2025-08-17T03:54:50Z",
    "updated_at": "2026-01-03T06:31:42Z",
    "user": "arminzhu"
  },
  {
    "repo": "pytorch/data",
    "number": 1506,
    "title": "v0.12.0 (or 0.11.1?) release timeline",
    "body": "Hi!\n\nIs there a timeline for the next stable release?",
    "url": "https://github.com/meta-pytorch/data/issues/1506",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-16T21:39:05Z",
    "updated_at": "2026-01-02T22:27:59Z",
    "comments": 3,
    "user": "mirceamironenco"
  },
  {
    "repo": "huggingface/gym-hil",
    "number": 27,
    "title": "How to close the gripper in gym-hill-sim?",
    "body": "Hello all.\n\nI'm using macOS to practice with tutorial gym-hill-sim.\nI figured out how to move robot like x,y,z but, it's impossible to close the gripper....\n\nCould you all please share the correct key?\nChatgpt answered ctrl-key but, it's not working!\n\nThanks in advance.",
    "url": "https://github.com/huggingface/gym-hil/issues/27",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-15T13:46:12Z",
    "updated_at": "2025-08-15T13:57:26Z",
    "user": "cory0619"
  },
  {
    "repo": "huggingface/peft",
    "number": 2742,
    "title": "RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn",
    "body": "Hello, I am fine-tuning the LLaMA-2 7B model on an A100 40 GB GPU. Initially, I was getting a CUDA out-of-memory error. I tried various methods, such as reducing batch size, but none worked. Then I enabled:\n\nmodel.gradient_checkpointing_enable()\n\nAfter doing this, the OOM issue was resolved, but now I get the following error during backpropagation:\n\ntorch.autograd.backward(\n  File \".../torch/autograd/__init__.py\", line 354, in backward\n    _engine_run_backward(\n  File \".../torch/autograd/graph.py\", line 829, in _engine_run_backward\n    return Variable._execution_engine.run_backward(  \nRuntimeError: element 0 of tensors does not require grad and does not have a grad_fn\n\nI also tried:\n\nmodel.enable_input_require_grads()\n\nbut the error still persists. I suspect the issue is related to enabling gradient checkpointing.\n\n# In model_init()\nreft_model.gradient_checkpointing_enable()\nreft_model.enable_input_require_grads()\n\nIs there something I am missing when using gradient checkpointing in this setup?",
    "url": "https://github.com/huggingface/peft/issues/2742",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-15T06:21:50Z",
    "updated_at": "2025-09-23T15:04:07Z",
    "comments": 4,
    "user": "Mishajain1110"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1576,
    "title": "API for custom metric reporting?",
    "body": "It would be nice if it were easier to report custom metrics for particular models more easily, but currently this seems to require changing `train.py` and/or modifying `MetricsProcessor` in some invasive way.\n\nCould we introduce an easier mechanism for reporting additional metrics for specific models? A specific use case is to log EP token routing metrics, like [shown here](https://github.com/pytorch/torchtitan/issues/1467#issuecomment-3130249678) and whose custom implementation is [here](https://github.com/rakkit/torchtitan/blob/95732cac15e3c48983328961210b9e0b61e02b1d/torchtitan/train.py?plain=1#L581-L585).  I also sometimes want to track activation magnitudes at various layers.\n\nOne idea I had is to leverage the `extra_metrics` arg of the `MetricsProcessor.log` method, which is currently only used to log the lr and number of toks seen:\nhttps://github.com/pytorch/torchtitan/blob/6fc499f6f5b32151a799188be2208cfb09faed30/torchtitan/train.py?plain=1#L517-L527\n\nWe could do something like give `ModelProtocol` a `get_extra_metrics` method:\n```py\nclass ModelProtocol(Protocol):\n    [...]\n    def get_extra_metrics(self) -> None | dict:\n        return None\n```\n\nand modify the reporting code to something like:\n```py\nextra_metrics = {\n    \"n_tokens_seen\": global_ntokens_seen,\n    \"lr\": lr,\n}\ncustom_metrics = [mp.get_custom_metrics() for mp in self.model_parts]\nfor cm in custom_metrics:\n    if cm is not None:\n        extra_metrics.update(custom_metrics)\nself.metrics_processor.log(\n    self.step,\n    global_avg_loss,\n    global_max_loss,\n    grad_norm.item(),\n    extra_metrics=extra_metrics,\n)\n```\nThis can get a bit confusing in complex PP cases, but it's a start. \n\nThoughts? CC @tianyu-l @rakkit",
    "url": "https://github.com/pytorch/torchtitan/issues/1576",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-15T01:30:37Z",
    "updated_at": "2025-08-16T00:32:18Z",
    "comments": 4,
    "user": "garrett361"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1574,
    "title": "Will Dinov3 be included as a model in torchtitan?",
    "body": "Newly released models from Meta dropped for Dino, will this be included for torchtitan?\n\nhttps://github.com/facebookresearch/dinov3",
    "url": "https://github.com/pytorch/torchtitan/issues/1574",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-14T21:08:05Z",
    "updated_at": "2025-08-21T03:23:59Z",
    "comments": 1,
    "user": "kmccaffr2023"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3779,
    "title": "Announcement: PyTorch org (and TensorRt) will be offered to PyTorch Foundation",
    "body": "Hey folks, heads up that as part of PyTorch [moving to the PyTorch Foundation](https://pytorch.org/blog/PyTorchfoundation/). Meta will be handing ownership of the PyTorch github organization over to the PyTorch Foundation, along with all the repos in it.  \n\n**What's the impact?** \nTechnical ownership of the repos given  (roadmap, dev work, etc) will continue to be driven by the same people doing it today, and business ownership (marketing efforts, trademark protection, etc) will be given to the foundation.\n\nMeta will be moving out any repos that Meta or LF doesn\u2019t think are a good fit for the foundation custodianship (based largely around the [foundation requirements](https://github.com/pytorch-fdn/foundation-hosted/blob/main/governance/foundation-hosted-project-process.md#eligibility-criteria)) and placing them in the [meta-pytorch](https://github.com/meta-pytorch) github org (previously called `pytorch-labs`)\n\n**What will happen to this repo?**\nAs a community project, we\u2019ll be letting `pytorch/TensorRt` go to the PyTorch Foundation (so it\u2019ll stay at github.com/pytorch/TensorRt) as [foundation project](https://pytorch.org/blog/pt-foundation-expands/). If the PyTorch Foundation decides not to accept this repo (for not meeting the [foundation requirements](https://github.com/pytorch-fdn/foundation-hosted/blob/main/governance/foundation-hosted-project-process.md#eligibility-criteria)) then we'll default to moving this repo to [meta-pytorch](https://github.com/meta-pytorch).\n\nPlease let me know if you have any concerns",
    "url": "https://github.com/pytorch/TensorRT/issues/3779",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-08-14T17:15:12Z",
    "updated_at": "2025-08-14T19:53:22Z",
    "user": "ZainRizvi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 160648,
    "title": "How to Use Pipeline Parallelism in Multi-input Models",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI am developing a multimodal model and would like to use the pipeline feature of torch. However, I found that the samples in the introductory docs are rather simple, and they all have only single-input, single-output scenarios. I would like to know how to use the pipeline function for multi-input, single-output models. How to cut the model, can you help me to provide a complete sample or related documents.\n\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta",
    "url": "https://github.com/pytorch/pytorch/issues/160648",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "module: pipelining"
    ],
    "created_at": "2025-08-14T15:41:44Z",
    "updated_at": "2025-08-20T03:05:32Z",
    "user": "Bin1024"
  },
  {
    "repo": "huggingface/trl",
    "number": 3896,
    "title": "How to gather completions before computing rewards in GRPOTrainer",
    "body": "Hi, \nI found that the `reward_funcs` passed to GRPOTrainer is used per-device.\nThat is, if I set `num_generation=16`, `per_device_train_batch_size=4`, my customized reward function can only receive `4` completions.\nHowever, my customized reward function calculates rewards depending on a global view over all `16` completions for each question.\nHow can I implement this?",
    "url": "https://github.com/huggingface/trl/issues/3896",
    "state": "closed",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb Reward",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-08-14T14:41:42Z",
    "updated_at": "2025-09-03T14:09:16Z",
    "user": "rubickkcibur"
  },
  {
    "repo": "huggingface/peft",
    "number": 2738,
    "title": "Which base model weights are getting frozen after applying LoRA?",
    "body": "I have finetuned LLaVA-v1.5-7B with peft LoRA, and I have found out that after adding the LoRA adapters, all the weights are getting frozen except for the newly added LoRA layers and mm_projector weights (non-LoRA). I will be glad to know the freezing logic implemented by peft since not all the base model weights are getting frozen after applying LoRA.\nAlso, I have not added the mm_projector weights inside the module_to_save.",
    "url": "https://github.com/huggingface/peft/issues/2738",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-13T17:35:10Z",
    "updated_at": "2025-08-14T04:20:42Z",
    "comments": 1,
    "user": "srbh-dl"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3518,
    "title": "[BUG] - <why does the C++ Libtorch performance slower than pytorch? (show the full code)>",
    "body": "### Add Link\n\nnone ...\n\n### Describe the bug\n\ni use a same .pt model, test is in a same computer, but libtorch is slower than pytorch 30~40%.\nin python, 30 times inference only 18 ms AVG , but in C++ libtorch needs 24ms AVG.\ni am using CUDA 12.8 \uff0c CUDNN 9.5.1 and libtorch 2.8\nmy codes are below..\n\n`\n\n#include <chrono>\n#include <torch/torch.h>\n#include <torch/script.h>\n#include <iostream>\n#include <vector>\nint main() {\n    // 1. choose device..\n    torch::Device device = torch::kCPU;\n    if (torch::cuda::is_available()) {\n        device = torch::kCUDA;\n        std::cout << \"CUDA is available! Using GPU.\" << std::endl;\n\n        if (torch::cuda::cudnn_is_available()) {\n            std::cout << \"\u2705 cuDNN is available and will be used.\" << std::endl;\n        } else {\n            std::cout << \"\u274c cuDNN is NOT available. Performance may be suboptimal.\" << std::endl;\n        }\n    }\n\n    // 2. load model\n    torch::jit::Module module;\n    try {\n        module = torch::jit::load(\"/home/bingyu/profile_model/rf202508011_74.pt\", device);\n        module.eval();\n        std::cout << \"Model loaded successfully.\" << std::endl;\n    } catch (const c10::Error& e) {\n        std::cerr << \"Error loading model: \" << e.what() << std::endl;\n        return -1;\n    }\n\n    // 3. defination shapes\n    const int64_t BATCH_SIZE = 1;\n    const int64_t JOINT_NUM = 14;\n    const int64_t STATES_HORIZON = 12;\n    const int64_t SEQ_LEN = 50;\n    const int64_t NUM_CAMERAS = 4;\n    const int64_t IMG_C = 3;\n    const int64_t IMG_H = 480;\n    const int64_t IMG_W = 640;\n\n    // 4. create input tensor\n    auto qpos = torch::randn({BATCH_SIZE, STATES_HORIZON, JOINT_NUM}, device);\n    auto image = torch::randn({BATCH_SIZE, NUM_CAMERAS, IMG_C, IMG_H, IMG_W}, device);\n    auto noise = torch::randn({BATCH_SIZE, SEQ_LEN, JOINT_NUM}, device);\n    std::vector<torch::jit::IValue> inputs = {qpos, image, noise};\n\n    // 5. warm up ...\n    std::cout << \"\\nWarming up model...\" << std::endl;\n    for (int i = 0; i < 5; ++i) {\n        torch::NoGradGuard no_grad;\n        module.forward(inputs);\n    }\n    std::cout << \"Warm-up completed.\" << std::endl;\n\n    // 6. testing..\n    const int total_times = 10;\n    double total_elapsed = 0.0;\n\n    std::cout << \"\\nRunning inference...\" << std::endl;\n    for (int i = 0; i < total_times; ++i) {\n        torch::NoGradGuard no_grad;  // \u5728\u8fd9\u4e2a\u4f5c\u7528\u57df\u5185\uff0c\u4e0d\u8ba1\u7b97\u68af\u5ea6\n\n        auto start = std::chrono::high_resolution_clock::now();\n\n        auto output = module.forward(inputs).toTensor();\n\n        auto end = std::chrono::high_resolution_clock::now();\n\n        auto duration = std::chrono::duration_cast<std::chrono::microseconds>(end - start);\n        total_elapsed += duration.count();\n\n        std::cout << \"Inference \" << i << \" time: \" << duration.count() << \" \u03bcs\" << std::endl;\n    }\n\n    double avg_time = total_elapsed / total_times;\n    std::cout << \"\\nAverage inference time: \" << avg_time << \" \u03bcs (\"\n              << avg_time / 1000.0 << \" ms)\" << std::endl;\n\n    return 0;\n}\n`\n\n\n\npython code is below..\n`\n\nimport torch\nimport os\nimport time\n\n\n\nMODEL_PATH = \"/home/bingyu/profile_model/rf202508011_74.pt\"\n\nINPUT_SHAPES = [\n    (1, 12, 14),  # qpos\n    (1, 4, 3, 480, 640),  # image\n    (1, 50, 14)  # noise\n]\n\nWARMUP_ITER = 10\nINFERENCE_RUNS = 10\n\n\ndef main():\n\n    if not os.path.exists(MODEL_PATH):\n        return\n\n    device_str = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n    device = torch.device(device_str)\n    print(f\"\ud83d\ude80 usisng device: {device_str.upper()}\")\n    print(f\"\ud83d\udcc2 loading model : {MODEL_PATH}\")\n\n    try:\n        model = torch.jit.load(MODEL_PATH)\n        model.to(device)\n        model.eval()\n        print(\"\u2705 model success!\")\n    except Exception as e:\n        print(f\"\u274c model load failed\u3002\\n   {e}\")\n        return\n\n    try:\n        inputs = [torch.randn(shape, device=device) for shape in INPUT_SHAPES]\n    except Exception as e:\n        print(f\"\u274c error INPUT_SHAPES\u3002\\n   {e}\")\n        return\n\n\n    with torch.no_grad():\n        for _ in range(WARMUP_ITER):\n            model(*inputs)\n    # ==================================================================\n\n    if device.type == 'cuda':\n        torch.cuda.synchronize()\n\n\n    timings_ms = []\n\n    with torch.no_grad():\n        for i in range(INFERENCE_RUNS):\n            if device.type == 'cuda':\n                start_event = torch.cuda.Event(enable_timing=True)\n                end_event = torch.cuda.Event(enable_timing=True)\n\n                start_event.record()\n                model(*inputs)\n                end_event.record()\n\n                torch.cuda.synchronize()\n\n                elapsed_time = start_event.elapsed_time(end_event)\n                timings_ms.append(elapsed_time)\n\n            else:\n                start_time = time.perf_counter()\n                model(*inputs)\n                end_time = time.perf_counter()\n\n                elapsed_time = (end_time - start_time) * 1000\n                timings_ms.append(elapsed_time)\n    # =========================================================",
    "url": "https://github.com/pytorch/tutorials/issues/3518",
    "state": "closed",
    "labels": [
      "bug",
      "question"
    ],
    "created_at": "2025-08-13T13:25:44Z",
    "updated_at": "2025-09-03T21:32:30Z",
    "user": "Sukidesyo"
  },
  {
    "repo": "pytorch/xla",
    "number": 9558,
    "title": "Performance of Torchax",
    "body": "## \u2753 Questions and Help\n\nHello Community,\n\nWill using torchAx be slower than native PyTorch? Is there any transformation layer of tensors which makes it slower ? ",
    "url": "https://github.com/pytorch/xla/issues/9558",
    "state": "open",
    "labels": [
      "question",
      "torchxla2"
    ],
    "created_at": "2025-08-13T10:05:08Z",
    "updated_at": "2025-08-15T21:29:25Z",
    "user": "yuanfz98"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12136,
    "title": "How to use Diffusers to Convert Safetensors SDXL 1.0 to Onnx?",
    "body": "Hello,\n\nI'm trying to convert a safetensors checkpoint for SDXL to onnx format.\n\nI've tried Optimum already but it fails everytime.\n\nPlease help.",
    "url": "https://github.com/huggingface/diffusers/issues/12136",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-13T06:33:22Z",
    "updated_at": "2025-10-31T03:13:28Z",
    "user": "CypherpunkSamurai"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1712,
    "title": "Why hasn't the pi0 model learned the ability to place something in the specified positions? Is it because the number of datasets is insufficient?",
    "body": "I am creating a tic-tac-toe board and using yellow and green sandbags as pieces. I have collected a dataset of \"the entire process of a robotic arm picking up yellow sandbags and placing them in nine different positions on the board\". This dataset is used to train the pi0 model to achieve autonomous playing. The collection scope includes: changes in the board scene, motor action status, visual images, and text task instructions. However, when testing the trained pi0 model by giving tasks of placing sandbags in different positions on the board, it turns out that the so101 robotic arm has a poor understanding of position information. It can grab the sandbags just like in the recorded dataset, but most of the time it cannot place them in the specified positions.",
    "url": "https://github.com/huggingface/lerobot/issues/1712",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-08-12T10:15:26Z",
    "updated_at": "2025-12-22T08:10:47Z",
    "user": "Alex-Wlog"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 160405,
    "title": "[Expandable block] how to get the best-fit free block",
    "body": "To get free expandable block,  the algorithm selects a locally optimal solution instead of the globally best-fit block, since the expandable sizes are not sorted. The best-fit block is the block that meets the requirements and has the smallest expandable size. The original code is\n\n```\n        auto expandable_size = [](Block* b) {\n          return b->size + (b->next && !b->next->mapped ? b->next->size : 0);\n         };\n        auto next = it;\n        next++;\n        while ((*it)->expandable_segment_ && next != pool.blocks.end() &&\n               (*next)->stream == p.stream() &&\n               expandable_size(*next) < expandable_size(*it)) {\n          it = next++;\n        }\n```\n\nI have a proposition regarding that\n\n```\n        auto expandable_size = [](Block* b) {\n          return b->size + (b->next && !b->next->mapped ? b->next->size : 0);\n        };\n        auto min_expandable_block = it;\n        auto min_expandable_size = expandable_size(*it);\n        while ((*it)->expandable_segment_ && it != pool.blocks.end() &&\n               (*it)->stream == p.stream() &&\n               expandable_size(*it) != (*it)->size) {\n          if ((*it)->size < min_expandable_size) {\n            min_expandable_block = it;\n            min_expandable_size = expandable_size(*it);\n          }\n          it++;\n        }\n        // it: the first non-expandable block or the last block of given stream\n        // min_expandable_block: the expandable block with the smallest\n        // expandable size or the first block found\n        if ((*it)->size > min_expandable_size) {\n          it = min_expandable_block;\n        }\n```\n\nCompare the size of the first non-expandable block (if it exists) with the smallest expandable size before the first non-expandable block to determine the best-fit block.",
    "url": "https://github.com/pytorch/pytorch/issues/160405",
    "state": "open",
    "labels": [
      "triaged",
      "module: CUDACachingAllocator"
    ],
    "created_at": "2025-08-12T08:38:38Z",
    "updated_at": "2025-08-14T05:24:01Z",
    "user": "HU-qingqing"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1554,
    "title": "The ordering of fsdp, ac, tp, pp and complie etc.",
    "body": "Based on the code, the ordering of parallelization and optimization appears to be: PP \u2192 TP \u2192 AC \u2192 Compile \u2192 FSDP/DDP. \nIs it possible to modify this ordering? If not, could you explain the rationale for this specific sequence?",
    "url": "https://github.com/pytorch/torchtitan/issues/1554",
    "state": "open",
    "labels": [
      "documentation",
      "question"
    ],
    "created_at": "2025-08-12T04:35:02Z",
    "updated_at": "2025-12-12T10:56:00Z",
    "user": "aoyulong"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1553,
    "title": "Inquiry about torchtitan v0.1.0 compatibility with CUDA 12.3",
    "body": "Hello,\n\nI would like to inquire about the compatibility of torchtitan with CUDA 12.3.\n\nI am trying to use torchtitan v0.1.0, but I am facing some challenges due to my environment constraints. My computing resources are equipped with CUDA 12.3, and I am unable to upgrade the CUDA version at this moment.\n\nWhen I attempted to install torchtitan v0.1.0 following the official instructions, I noticed that the required dependencies are built for CUDA 12.6:\n```\ntorch version: torch-2.8.0.dev20250617+cu126\ntorchao version: torchao-0.12.0.dev20250617+cu126\n```\nThis leads to an incompatibility with my current setup.\nFurthermore, I tried using torch v2.7+cu118 to see if it would resolve the issue, but this resulted in import errors.\nCould you please provide guidance on how I can successfully install and use torchtitan v0.1.0 in an environment with CUDA 12.3?\n\nThank you for your time and assistance.",
    "url": "https://github.com/pytorch/torchtitan/issues/1553",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-08-12T04:17:26Z",
    "updated_at": "2025-08-15T14:34:55Z",
    "user": "Sun2018421"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1552,
    "title": "Any example for  vpp scheduler for Deepseek/llama",
    "body": "I'm learning VPP 1F1B recently and want to figure out different implementation between tortitan and megatron, but i don't know how to build Vpp-1f1b schedule thus i cannot figure out how it works in titan. Is there any example to helpl me build vpp-1f1b example ?",
    "url": "https://github.com/pytorch/torchtitan/issues/1552",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-08-12T01:40:12Z",
    "updated_at": "2025-08-28T22:33:58Z",
    "user": "YingLaiLin"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40089,
    "title": "Could not import module 'AutoTokenizer'. Are this object's requirements defined correctly?",
    "body": "### System Info\n\n- torch @ https://download.pytorch.org/whl/cu124/torch-2.6.0%2Bcu124-cp310-cp310-linux_x86_64.whl\n- torchaudio @ https://download.pytorch.org/whl/cu124/torchaudio-2.6.0%2Bcu124-cp310-cp310-linux_x86_64.whl\n- torchvision @ https://download.pytorch.org/whl/cu124/torchvision-0.21.0%2Bcu124-cp310-cp310-linux_x86_64.whl\n- unsloth==2025.6.12\n- unsloth_zoo==2025.6.8\n- accelerate==1.8.1\n- bitsandbytes==0.46.0\n- pydantic==2.11.7\n- pydantic_core==2.33.2\n- tokenizers==0.21.2\n- transformers==4.52.4\n- treelite==4.4.1\n- treescope==0.1.9\n- triton==3.2.0\n- trl==0.19.0\n- xformers==0.0.29.post3\n- sympy==1.13.1\n- cut-cross-entropy==25.1.1\n- Python 3.10.16\n- NVIDIA A10G (CUDA Version: 12.5)\n- Ubuntu 24.04.2 LTS\n\n### Who can help?\n\n@ArthurZucker @itazap\n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nfrom transformers import AutoTokenizer\n\n---------------------------------------------------------------------------\nModuleNotFoundError                       Traceback (most recent call last)\nFile [~/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py:2045](https://25rhl5xt9dz0f5sq.ml-c7564e33-277.cdpv2-pr.uf1v-9d9i.cloudera.site/lab/tree/project/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py#line=2044), in _LazyModule.__getattr__(self, name)\n   2044 try:\n-> 2045     module = self._get_module(self._class_to_module[name])\n   2046     value = getattr(module, name)\n\nFile [~/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py:2075](https://25rhl5xt9dz0f5sq.ml-c7564e33-277.cdpv2-pr.uf1v-9d9i.cloudera.site/lab/tree/project/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py#line=2074), in _LazyModule._get_module(self, module_name)\n   2074 except Exception as e:\n-> 2075     raise e\n\nFile [~/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py:2073](https://25rhl5xt9dz0f5sq.ml-c7564e33-277.cdpv2-pr.uf1v-9d9i.cloudera.site/lab/tree/project/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py#line=2072), in _LazyModule._get_module(self, module_name)\n   2072 try:\n-> 2073     return importlib.import_module(\".\" + module_name, self.__name__)\n   2074 except Exception as e:\n\nFile /usr/local/lib/python3.10/importlib/__init__.py:126, in import_module(name, package)\n    125         level += 1\n--> 126 return _bootstrap._gcd_import(name[level:], package, level)\n\nFile <frozen importlib._bootstrap>:1050, in _gcd_import(name, package, level)\n\nFile <frozen importlib._bootstrap>:1027, in _find_and_load(name, import_)\n\nFile <frozen importlib._bootstrap>:992, in _find_and_load_unlocked(name, import_)\n\nFile <frozen importlib._bootstrap>:241, in _call_with_frames_removed(f, *args, **kwds)\n\nFile <frozen importlib._bootstrap>:1050, in _gcd_import(name, package, level)\n\nFile <frozen importlib._bootstrap>:1027, in _find_and_load(name, import_)\n\nFile <frozen importlib._bootstrap>:1004, in _find_and_load_unlocked(name, import_)\n\nModuleNotFoundError: No module named 'transformers.models.ipynb_checkpoints'\n\nThe above exception was the direct cause of the following exception:\n\nModuleNotFoundError                       Traceback (most recent call last)\nFile [~/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py:2045](https://25rhl5xt9dz0f5sq.ml-c7564e33-277.cdpv2-pr.uf1v-9d9i.cloudera.site/lab/tree/project/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py#line=2044), in _LazyModule.__getattr__(self, name)\n   2044 try:\n-> 2045     module = self._get_module(self._class_to_module[name])\n   2046     value = getattr(module, name)\n\nFile [~/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py:2075](https://25rhl5xt9dz0f5sq.ml-c7564e33-277.cdpv2-pr.uf1v-9d9i.cloudera.site/lab/tree/project/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py#line=2074), in _LazyModule._get_module(self, module_name)\n   2074 except Exception as e:\n-> 2075     raise e\n\nFile [~/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py:2073](https://25rhl5xt9dz0f5sq.ml-c7564e33-277.cdpv2-pr.uf1v-9d9i.cloudera.site/lab/tree/project/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py#line=2072), in _LazyModule._get_module(self, module_name)\n   2072 try:\n-> 2073     return importlib.import_module(\".\" + module_name, self.__name__)\n   2074 except Exception as e:\n\nFile /usr/local/lib/python3.10/importlib/__init__.py:126, in import_module(name, package)\n    125         level += 1\n--> 126 return _bootstrap._gcd_import(name[level:], package, level)\n\nFile <frozen importlib._bootstrap>:1050, in _gcd_import(name, package, level)\n\nFile <frozen importlib._bootstrap>:1027, in _find_and_load(name, import_)\n\nFile <frozen importlib._bootstrap>:1006, in _find_and_load_unlocked(name, i",
    "url": "https://github.com/huggingface/transformers/issues/40089",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-08-11T21:44:05Z",
    "updated_at": "2025-09-08T03:09:11Z",
    "comments": 3,
    "user": "octavianBordeanu"
  },
  {
    "repo": "huggingface/candle",
    "number": 3052,
    "title": "Candle vs. PyTorch performance",
    "body": "I'm running https://github.com/huggingface/candle/tree/main/candle-examples/examples/llava vs. https://github.com/fpgaminer/joycaption/blob/main/scripts/batch-caption.py on a Mac m1.\n\nSeeing significant performance difference, Candle seems much slower.\nI enabled accelerate and metal features.\n\nWould love some pointers how to improve it.",
    "url": "https://github.com/huggingface/candle/issues/3052",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-11T16:14:17Z",
    "updated_at": "2025-11-14T20:05:16Z",
    "comments": 8,
    "user": "ohaddahan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12124,
    "title": "For qwen-image training file, Maybe \"shuffle\" of dataloader should be \"False\" when custom_instance_prompts is not None and cache_latents is False?",
    "body": "### Describe the bug\n\nI think \"shuffle\" of dataloader should be \"False\" when custom_instance_prompts is not None and cache_latents is False. Otherwise, it will lead to errors in the correspondence between prompt embedding and image during training, and prompt will not be followed when performing the task of T2I.\n\n### Reproduction\n\nNone\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nNone\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/12124",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-08-11T13:15:21Z",
    "updated_at": "2025-08-30T01:57:02Z",
    "comments": 2,
    "user": "yinguoweiOvO"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12120,
    "title": "How to train a lora with distilled flux model, such as flux-schnell???",
    "body": "**Is your feature request related to a problem? Please describe.**\nI can use flux as base model to train a lora, but it need 20 steps , it cost a lot of time , and I want to train a lora base on distill model to implement use fewer step  make a better image, such as  based on flux-schnell model train a lora it only need 4 steps can generate a good image !!  and I can train many lora  like this, only need 4 steps generated\n\n\n\n**Describe the solution you'd like.**\nI need a script , maybe it locate in examples\\dreambooth\\train_dreambooth_lora_flux_schennl.py \nI want to know to train a lora based on distilled model and get a good result ?  \n\n**Describe alternatives you've considered.**\nI want to train many lora for base model( flux or flux-schnell),  not only one lora , and I want to generated with fewer steps. So ,  I want to train loras with distilled model ... how to implment it ? I test scripts :  [train_dreambooth_lora_flux.py](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_flux.py) by modify based mode from flux to flux-schnell ,but the result is bad...\n\n**Additional context.**\nany other implement method is OK , ",
    "url": "https://github.com/huggingface/diffusers/issues/12120",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-11T03:07:42Z",
    "updated_at": "2025-08-11T06:01:45Z",
    "user": "Johnson-yue"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12108,
    "title": "Qwen Image and Chroma pipeline breaks  using schedulers that enable flow matching by parameter.",
    "body": "### Describe the bug\n\nSeveral Schedulers support flow matching by using the prediction_type='flow_prediction\" e.g.\n\n```\npipe.scheduler = UniPCMultistepScheduler(prediction_type=\"flow_prediction\", flow_shift=3.16, timestep_spacing='trailing', use_flow_sigmas=True)\n```\n\nHowever Chroma and Qwen Image will not work with these schedulers failing with the error\n```\nValueError: The current scheduler class <class 'diffusers.schedulers.scheduling_unipc_multistep.UniPCMultistepScheduler'>'s `set_timesteps` does not support custom sigmas schedules. Please check whether you are using the correct scheduler.\n```\n\nCan we have this fixed by either changing the schedulers to have the missing attributes and use them, or by rethinking the way these pipelines handle the timesteps .\n\n### Reproduction\n\n```py\nimport torch\nfrom diffusers import QwenImagePipeline, UniPCMultistepScheduler\n\n\n\npipe = QwenImagePipeline.from_pretrained(\"Qwen/Qwen-Image\",\n                                         torch_dtype=torch.bfloat16)\n#pipe.scheduler = FlowMatchEulerDiscreteScheduler(shift=3.16, use_beta_sigmas=True)\npipe.scheduler = UniPCMultistepScheduler(prediction_type=\"flow_prediction\", flow_shift=3.16, timestep_spacing='trailing', use_flow_sigmas=True)\npipe.to(\"mps\")\npipe(\"a nice picture of an rainbow\")\n```\n\n### Logs\n\n```shell\nFile \"/Volumes/SSD2TB/AI/Diffusers/qwenimagelowmem.py\", line 84, in <module>\n    image = pipe(prompt_embeds=prompt_embeds, prompt_embeds_mask=prompt_embeds_mask, \n            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Volumes/SSD2TB/AI/Diffusers/lib/python3.11/site-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n    return func(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^\n  File \"/Volumes/SSD2TB/AI/Diffusers/lib/python3.11/site-packages/diffusers/pipelines/qwenimage/pipeline_qwenimage.py\", line 619, in __call__\n    timesteps, num_inference_steps = retrieve_timesteps(\n                                     ^^^^^^^^^^^^^^^^^^^\n  File \"/Volumes/SSD2TB/AI/Diffusers/lib/python3.11/site-packages/diffusers/pipelines/qwenimage/pipeline_qwenimage.py\", line 119, in retrieve_timesteps\n    raise ValueError(\nValueError: The current scheduler class <class 'diffusers.schedulers.scheduling_unipc_multistep.UniPCMultistepScheduler'>'s `set_timesteps` does not support custom sigmas schedules. Please check whether you are using the correct scheduler.\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.35.0.dev0\n- Platform: macOS-15.5-arm64-arm-64bit\n- Running on Google Colab?: No\n- Python version: 3.11.13\n- PyTorch version (GPU?): 2.6.0 (False)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.34.3\n- Transformers version: 4.52.4\n- Accelerate version: 1.7.0\n- PEFT version: 0.17.0\n- Bitsandbytes version: not installed\n- Safetensors version: 0.5.3\n- xFormers version: not installed\n- Accelerator: Apple M3\n- Using GPU in script?: Yes\n- Using distributed or parallel set-up in script?:  No\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/12108",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-08-09T21:34:28Z",
    "updated_at": "2025-08-09T21:39:30Z",
    "comments": 0,
    "user": "Vargol"
  },
  {
    "repo": "huggingface/transformers",
    "number": 40056,
    "title": "Question: How to write a custome tokenizer form scratch",
    "body": "In this guide you introduced how to write a custom model and custom model configuration: [here](https://huggingface.co/docs/transformers/main/en/custom_models), IN addition I want to create a custom tokenizer form scratch why ?\n\nI have a problem of multilevel transcription: the model takes an input utterance and output a 12 multilingual transcript simultaneously . So I want to design a tokenzier such that it take the whole 12 languages as a dict: \n\n```python\n{\n    \"lang1\": \"text text\",\n    \"lang2\": \"text text\", \n    \"lang3\": \"text text\",\n}\n```\n\nand after tokenization\n\n\n```python\n{\n    \"input_ids\": \n    {\n        \"lang1\": \"ids of lang 1\",\n        \"lang2\": \"ids of lang 2\",\n        \"lang3\": \"ids of lang 2\",\n    }\n}\n```\n\n\nHow to do so as I can not find docs of building such custom tkenizer from scratch ?",
    "url": "https://github.com/huggingface/transformers/issues/40056",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-09T16:39:19Z",
    "updated_at": "2025-09-24T08:03:02Z",
    "user": "obadx"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12107,
    "title": "accelerator.init_trackers  error  when try with  a custom object such as list",
    "body": "### Describe the bug\n\nI set multiple prompts with nargs for argument \"--validation_prompt \"  in \"train_dreambooth.py\":\n\n`   parser.add_argument(\n        \"--validation_prompt\",\n        type=str,\n        default=[\"A photo of sks dog in a bucket\", \"A sks cat wearing a coat\"],\n        nargs=\"*\",\n        help=\"A prompt that is used during validation to verify that the model is learning.\",\n    )`\nbut an error occured at ` if accelerator.is_main_process:\n        tracker_name = \"dreambooth-lora\"\n        accelerator.init_trackers(tracker_name, config=vars(args))` :\n\"ValueError: value should be one of int, float, str, bool, or torch.Tensor\"  \nIs it because tensorboard only support basic Python types and PyTorch tensors but not a custom object such as list?\n\nso how to visualize when has custom object such  as list or argument with nargs?\n\n### Reproduction\n\nset the follow argument in \"train_dreambooth.py\" or other similar demos such as \"train_amused.py\":\n\n`   parser.add_argument(\n        \"--validation_prompt\",\n        type=str,\n        default=[\"A photo of sks dog in a bucket\", \"A sks cat wearing a coat\"],\n        nargs=\"*\",\n        help=\"A prompt that is used during validation to verify that the model is learning.\",\n    )`\n\nerror occured at ` if accelerator.is_main_process:\n        tracker_name = \"dreambooth-lora\"\n        accelerator.init_trackers(tracker_name, config=vars(args))` with\n\"ValueError: value should be one of int, float, str, bool, or torch.Tensor\"  \n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.33.0.dev0\n- Platform: Linux-6.8.0-55-generic-x86_64-with-glibc2.39\n- Running on Google Colab?: No\n- Python version: 3.10.11\n- PyTorch version (GPU?): 2.7.1+cu126 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.30.1\n- Transformers version: 4.52.4\n- Accelerate version: 1.8.1\n- PEFT version: 0.15.2\n- Bitsandbytes version: 0.45.4\n- Safetensors version: 0.5.3\n- xFormers version: 0.0.27.post2\n- Accelerator: NVIDIA GeForce RTX 3090, 24576 MiB\n- Using GPU in script?: <fill in>\n- Using distributed or parallel set-up in script?: <fill in>\n\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/12107",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-08-09T10:04:06Z",
    "updated_at": "2025-08-09T10:04:06Z",
    "comments": 0,
    "user": "micklexqg"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12104,
    "title": "IndexError: index 0 is out of bounds for dimension 0 with size 0",
    "body": "### Describe the bug\n\n\nWhen I test the mit-han-lab/nunchaku-flux.1-kontext-dev model, it runs normally in a non-concurrent scenario, but throws an error when I try to run it with concurrent requests.\n\nMy GPU is a single RTX 4090D.\n\nHow can I enable multi-concurrency support on a single GPU?\n\nThank you in advance for your help.\n\n\nHere is my error message:\n\n[2025-08-08 17:14:50.242] [info] Initializing QuantizedFluxModel on device 0\n[2025-08-08 17:14:50.382] [info] Loading partial weights from pytorch\n[2025-08-08 17:14:51.445] [info] Done.\nInjecting quantized module\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:00<00:00, 99.47it/s]\nLoading pipeline components...:  57%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258c                                                                  | 4/7 [00:00<00:00, 28.54it/s]You set `add_prefix_space`. The tokenizer needs to be converted from the slow tokenizers\nLoading pipeline components...: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 7/7 [00:00<00:00, 19.02it/s]\n\nGeneration `height` and `width` have been adjusted to 752 and 1360 to fit the model requirements.\nGeneration `height` and `width` have been adjusted to 880 and 1168 to fit the model requirements.\n 43%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258e                                                                                                         | 12/28 [00:17<00:23,  1.45s/it]\n 57%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258b                                                                               | 16/28 [00:18<00:13,  1.17s/it]\n\u5904\u7406\u56fe\u50cf\u65f6\u51fa\u9519: index 29 is out of bounds for dimension 0 with size 29\n\u5904\u7406\u56fe\u50cf\u65f6\u51fa\u9519: index 29 is out of bounds for dimension 0 with size 29\n\n\n\n### Reproduction\n\n```\nimport torch\nfrom diffusers import FluxKontextPipeline\nfrom diffusers.utils import load_image\nfrom concurrent.futures import ThreadPoolExecutor\n\nfrom nunchaku import NunchakuFluxTransformer2dModel\nfrom nunchaku.utils import get_precision\nimport time\n\ndef get_result(image_path,pipeline):\n    time_begin = time.time()\n    image = load_image(\n        image_path\n    ).convert(\"RGB\")\n    size = image.size\n    large_now = 1440\n    small_now = round(1440 * (min(size)/max(size)) /32) * 32\n    width,height = (large_now,small_now) \\\n        if size[0]>size[1] else (small_now,large_now)\n    prompt = \"Remove the watermark from the picture\"\n    image = pipeline(\n        image=image,\n        prompt=prompt,\n        guidance_scale=2.5,\n        num_inference_steps=28,\n        height=height,\n        width=width,\n    ).images[0]\n    image.save(image_path[:-4]+\"_result.png\")\n\ndef nunchaku_test(concurrency,pipeline):\n\n    test_images = [\"\u623f\u578b\u56fe\u6c34\u5370.jpg\", \"\u5367\u5ba4\u6c34\u5370.png\"] * concurrency\n    test_images = test_images[:concurrency]  \n\n    overall_start = time.time()\n\n    with ThreadPoolExecutor(max_workers=concurrency) as executor:\n        futures = [executor.submit(get_result, img_path, pipeline) for img_path in test_images]\n\n        results = []\n        for future in futures:\n            try:\n                results.append(future.result())\n            except Exception as e:\n                print(f\"\u5904\u7406\u56fe\u50cf\u65f6\u51fa\u9519: {e}\")\n\n    overall_time = time.time() - overall_start\n\n\nif __name__ == '__main__':\n\n\n    transformer = NunchakuFluxTransformer2dModel.from_pretrained(\n        f\"/root/autodl-tmp/nunchaku-flux.1-kontext-dev/svdq-{get_precision()}_r32-flux.1-kontext-dev.safetensors\"\n    )\n\n    pipeline = FluxKontextPipeline.from_pretrained(\n        \"/root/autodl-tmp/FLUX.1-Kontext-dev\", transformer=transformer, torch_dtype=torch.bfloat16\n    ).to(\"cuda\")\n\n    nunchaku_test(pipeline,2)\n    nunchaku_test(pipeline,4)\n```\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\n~/FLUX.1-Kontext-Dev-nunchaku# diffusers-cli env\n\nCopy-and-paste the text below in your GitHub issue and FILL OUT the two last points.\n\n- \ud83e\udd17 Diffusers version: 0.35.0.dev0\n- Platform: Linux-5.15.0-94-generic-x86_64-with-glibc2.35\n- Running on Google Colab?: No\n- Python version: 3.12.3\n- PyTorch version (GPU?): 2.6.0+cu124 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.33.1\n- Transformers version: 4.53.0\n- Accelerate version: 1.8.1\n- PEFT version: not installed\n- Bitsandbytes version: not installed\n- Safetensors version: 0.5.3\n- xFormers version: not installed\n- Accelerator: NVIDIA GeForce RTX 4090 D, 24564 MiB\n- Using GPU in script?: <fill in>\n- Using distributed or parallel set-up in script?: <fill in>\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/12104",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-08-08T09:20:52Z",
    "updated_at": "2025-08-17T22:22:37Z",
    "comments": 1,
    "user": "liushiton"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3766,
    "title": "\u2753 [Question] C++ Windows runtime error",
    "body": "## \u2753 Question\nHow can I fix this error?\n```\nUnknown type name '__torch__.torch.classes.tensorrt.Engine':\n  File \"code/__torch__/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py\", line 6\n  training : bool\n  _is_full_backward_hook : Optional[bool]\n  engine : __torch__.torch.classes.tensorrt.Engine\n           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\n  def forward(self: __torch__.torch_tensorrt.dynamo.runtime._TorchTensorRTModule.TorchTensorRTModule,\n    x: Tensor) -> Tensor:\n```\n\nRun script\n```\ntorch::jit::Module trt_ts_mod;\ntry {\n    // Deserialize the ScriptModule from a file using torch::jit::load().\n\tstd::cout << \"Loading TRT engine from: \" << trt_ts_module_path << std::endl;\n    trt_ts_mod = torch::jit::load(trt_ts_module_path);\n\tstd::cout << \"TRT engine loaded successfully.\" << std::endl;\n}\ncatch (const c10::Error& e) {\n    std::cerr << \"c10::Error loading the model from : \" << trt_ts_module_path << std::endl;\n    return -1;\n}\ncatch (const std::exception& e) {\n    std::cerr << \"std::exception occurred while loading the model: \" << e.what() << std::endl;\n    return -1;\n}\n```\n\n\n## Environment\n\nCMakeListst.txt\n```\ncmake_minimum_required(VERSION 3.17)\nproject(torchtrt_runtime_example LANGUAGES CXX)\n\nfind_package(Torch REQUIRED)\nfind_package(torchtrt REQUIRED)\n\nset(SRCS\n    main.cpp\n)\n\ninclude_directories(\"${PRJ_ROOT}/TensorRT/out/install/x64-Release/include\")\n\nadd_executable(${CMAKE_PROJECT_NAME} ${SRCS})\ntarget_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE torch \"-Wl,--no-as-needed\" torchtrt_runtime \"-Wl,--as-needed\")\ntarget_compile_features(${CMAKE_PROJECT_NAME} PRIVATE cxx_std_17)\n```\nI build self TensorRT and Torch-TensorRT both\n\n - PyTorch Version (e.g., 1.0): libtorch-win-shared-with-deps-2.8.0+cu126\n - CPU Architecture: ryzen 2700\n - OS (e.g., Linux): Windows 11\n - Python version: 3.12\n - CUDA version: 12.6\n - GPU models and configuration: RTX 3070",
    "url": "https://github.com/pytorch/TensorRT/issues/3766",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-08-08T07:56:17Z",
    "updated_at": "2025-08-15T14:32:30Z",
    "user": "zsef123"
  },
  {
    "repo": "pytorch/ao",
    "number": 2713,
    "title": "[fp8 blockwise training] try using torch._scaled_mm instead of Triton kernels for fp8 gemms",
    "body": "We have an initial prototype of DeepSeekV3 style fp8 blockwise training done [here](https://github.com/pytorch/ao/blob/main/torchao/prototype/blockwise_fp8_training/linear.py). Numerics are accurate but performance has not been optimized yet.\n\nInitial tests with a local torchtitan integration on my H100 devgpu show the blockwise GEMM kernels are slower than expected. NCU analysis shows uncoalesced global accesses causing major slowdowns, but rather than optimize these kernels, it's probably a better idea to use `torch._scaled_mm` instead, which recently added support for DSV3 style fp8 GEMMs using a CUTLASS kernel which is likely much more performant than the Triton kernels. This will also be more consistent with our other float8 tensorwise and rowwise training recipes, which use torch._scaled_mm.\n\nWe should do the following:\n\n1. Add benchmarking script(s) that compares runtime of:\n    - Performance of [blockwise_fp8_gemm_1x128_128x128](https://github.com/pytorch/ao/blob/143c3a60451727f9fba56289b6fa74cfdb04b440/torchao/prototype/blockwise_fp8_training/kernels.py#L106) vs torch._scaled_mm\n    - Performance of [blockwise_fp8_gemm_1x128_128x1](https://github.com/pytorch/ao/blob/143c3a60451727f9fba56289b6fa74cfdb04b440/torchao/prototype/blockwise_fp8_training/kernels.py#L214C5-L214C35) vs torch._scaled_mm\n    - (see [here](https://github.com/pytorch/ao/blob/143c3a60451727f9fba56289b6fa74cfdb04b440/torchao/prototype/blockwise_fp8_training/linear.py#L26) for context on how/where these gemms are used for context)\n    - Here is an [example](https://github.com/pytorch/ao/blob/main/benchmarks/float8/bench_grouped_mm.py) benchmark script for something similar that can be used as a starting point.\n2. If microbenchmarks show torch._scaled_mm is faster, update the blockwise fp8 linear to use this gemm. \n\nNote torch._scaled_mm has some slightly different stride/mem layout requirements for the inputs. You will see this in the error message that it throws if you try to directly swap it out with the triton gemms.\n",
    "url": "https://github.com/pytorch/ao/issues/2713",
    "state": "open",
    "labels": [
      "good first issue",
      "float8"
    ],
    "created_at": "2025-08-07T20:15:10Z",
    "updated_at": "2025-08-07T20:26:11Z",
    "comments": 0,
    "user": "danielvegamyhre"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7729,
    "title": "OSError: libcudart.so.11.0: cannot open shared object file: No such file or directory",
    "body": "> Hi  is there any solution for that eror i try to install this one \npip install torch==1.12.1+cpu torchaudio==0.12.1+cpu -f https://download.pytorch.org/whl/torch_stable.html  \nthis is working fine but tell me how to install pytorch version that is fit for gpu ",
    "url": "https://github.com/huggingface/datasets/issues/7729",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-07T14:07:23Z",
    "updated_at": "2025-09-24T02:17:15Z",
    "comments": 1,
    "user": "SaleemMalikAI"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39992,
    "title": "[gpt-oss] Transform checkpoint from safetensors to state dict",
    "body": "Yesterday I was working on gpt-oss. However, loading the weights give me troubles.\n\u2028For models like Qwen, I did things like this:\n\n1. Create model on meta device\n2. FSDP2 shard it, so it can fit in memory\n3. On each GPU, it read weights from safetensors in a generator style, to save memory.\n4. Chunk the weights and copy to the FSDP\u2019s DTensor.\u2028\nGPT-oss does not apply this routine. Within `from_pretrained`, the mxfp4 quantizer somehow dequantized the weights, yet I cannot find a very clean way to utilize this capability. I have to modify the process, and initialized a CPU version of the model in the CPU memory.\n\nHow can we transform the safetensors to state dict directly?",
    "url": "https://github.com/huggingface/transformers/issues/39992",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-07T13:24:06Z",
    "updated_at": "2025-09-15T08:02:55Z",
    "comments": 1,
    "user": "fingertap"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12094,
    "title": "[Wan2.2] pipeline_wan miss the 'shift' parameter which used by Wan2.2-A14B-diffusers.",
    "body": "**Firstly, I found that the quality of output using diffusers is poor**\nLater, I found that the pipeline_wan in diffusers[0.34.0] did not support two-stage processing. I noticed that the community had already updated it, so I installed diffusers[0.35.0-dev] by source code and it worked.\n\nThen I found that the scheduler in diffusers does not support the parameter \"shift\", but \"sample_shift\" is an important parameter generated by Wan2.2, which may also lead to differences from the official inference code of Wan2.2. Therefore, the video effect may still be inferior to the original inference code.\n\nhttps://github.com/Wan-Video/Wan2.2/issues/69\n\n**What I need**\nCan the community provide the UniPCMultistepScheduler and DPMSolverMultistepScheduler that support the 'shift' parameter? Or can it be adapted in pipeline_wan so that the shift parameter can be used.\n\nOr is there something wrong with my understanding? How can I correctly use the shift parameter when using diffusers?\n\nThanks!!\ncc @yiyixuxu @a-r-r-o-w \n",
    "url": "https://github.com/huggingface/diffusers/issues/12094",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-07T11:37:36Z",
    "updated_at": "2025-08-10T08:43:27Z",
    "comments": 7,
    "user": "yvmilir"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1543,
    "title": "Minimum number of GPUs needed to pretrain llama4_17bx16e - 8 ?",
    "body": "Going by the config files  it would be 8 H100 class GPUs,   Is 8 a reasonable number ? ",
    "url": "https://github.com/pytorch/torchtitan/issues/1543",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-06T23:54:05Z",
    "updated_at": "2025-08-07T20:32:35Z",
    "comments": 3,
    "user": "githubsgi"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3512,
    "title": "Redirect for prototype/ -> unstable/",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\n\nWhen I search [\"flight recorder pytorch\" on Google](https://www.google.com/search?q=pytorch+flight+recorder&sca_esv=56a8724cb68766c6&ei=_7yTaKLqN4ra5NoP38nhqAg&oq=pytorch+flight+recorder&gs_lp=Egxnd3Mtd2l6LXNlcnAiF3B5dG9yY2ggZmxpZ2h0IHJlY29yZGVyKgIIADIIEAAYgAQYsAMyCRAAGLADGAgYHjILEAAYsAMYCBgKGB4yDhAAGIAEGLADGIYDGIoFMg4QABiABBiwAxiGAxiKBTIOEAAYgAQYsAMYhgMYigUyCBAAGLADGO8FMggQABiwAxjvBTILEAAYgAQYsAMYogRIngtQAFgAcAF4AJABAJgBAKABAKoBALgBAcgBAJgCAaACA5gDAIgGAZAGCZIHATGgBwCyBwC4BwDCBwMyLTHIBwM&sclient=gws-wiz-serp)\n\nThe top link is https://docs.pytorch.org/tutorials/prototype/flight_recorder_tutorial.html\n\nwhereas now these tutorials are under https://docs.pytorch.org/tutorials/unstable/flight_recorder_tutorial.html\n\nCan we add a redirect? I knew that the tutorial should be there since i actively work on PyTorch, but for new users this will be confusing and also when `prototype/` is in URL path, the site doesn't have any CSS and is scary-looking\n\n### Existing tutorials on this topic\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/tutorials/issues/3512",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-06T20:40:07Z",
    "updated_at": "2025-08-07T18:07:35Z",
    "comments": 2,
    "user": "H-Huang"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1687,
    "title": "When using AMP to train a model, why are the saved model weights still in fp32?",
    "body": "<img width=\"1668\" height=\"95\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/406a1879-f2f2-43c6-8341-8733873ee911\" />",
    "url": "https://github.com/huggingface/lerobot/issues/1687",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-08-06T12:42:40Z",
    "updated_at": "2025-08-12T08:52:00Z",
    "user": "Hukongtao"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12084,
    "title": "Will `cosmos-transfer1` be supported in diffusers in the future?",
    "body": "\nHi @a-r-r-o-w and @yiyixuxu :) \n\nFirst of all, thank you for recently enabling cosmos-predict1 models (text2world and video2world) in the diffusers library \u2014 it's super exciting to see them integrated!\n\nI was wondering if there are any plans to also support [cosmos-transfer1](https://github.com/nvidia-cosmos/cosmos-transfer1) in diffusers in the future?\n\nThanks again for your great work! \ud83d\ude4c",
    "url": "https://github.com/huggingface/diffusers/issues/12084",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-06T11:22:28Z",
    "updated_at": "2025-08-19T12:11:33Z",
    "comments": 3,
    "user": "rebel-shshin"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1683,
    "title": "SmolVLMWithExpertModel",
    "body": "Excuse me, I would like to know about each module. In this class, I would like to know how to define inputs.",
    "url": "https://github.com/huggingface/lerobot/issues/1683",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-08-06T10:30:21Z",
    "updated_at": "2025-08-12T08:52:21Z",
    "user": "xjushengjie"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1674,
    "title": "How to train smolvla for multi-task",
    "body": "I have trained smolvla for aloha_sim_transfer_cube and aloha_sim_insertion, and smolvla performs well in each single task. Now I'd like to train smolvla for multi-task ---- one model can complete the two tasks above. What should I do Now? ",
    "url": "https://github.com/huggingface/lerobot/issues/1674",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-06T02:40:01Z",
    "updated_at": "2025-10-15T02:52:29Z",
    "user": "w673"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12079,
    "title": "API Suggestion: Expose Methods to Convert to Sample Prediction in Schedulers",
    "body": "**What API design would you like to have changed or added to the library? Why?**\n\nMy proposal is for schedulers to expose `convert_to_sample_prediction` and `convert_to_prediction_type` methods, which would do the following:\n\n1. `convert_to_sample_prediction`: Converts from a given `prediction_type` to `sample_prediction` (e.g. $x_0$-prediction). This function would accept a `prediction_type` argument which defaults to `self.config.prediction_type`.\n2. `convert_to_prediction_type`: Converts back from `sample_prediction` to the scheduler's `prediction_type`. This is intended to be the inverse function of `convert_to_sample_prediction`.\n\nThe motivating use case I have in mind is to support guidance strategies such as [Adaptive Projected Guidance (APG)](https://arxiv.org/abs/2410.02416) and [Frequency-Decoupled Guidance (FDG)](https://arxiv.org/abs/2506.19713) which prefer to operate with sample / $x_0$-predictions. A code example will be given below.\n\nThe reason I think schedulers should expose these methods explicitly is that performing these operations depend on the scheduler state and definition. For example, the prediction type conversion code in `EulerDiscreteScheduler` depends on the `self.sigmas` schedule:\n\nhttps://github.com/huggingface/diffusers/blob/ba2ba9019f76fd96c532240ed07d3f98343e4041/src/diffusers/schedulers/scheduling_euler_discrete.py#L650-L663\n\nAs a possible alternative, code that uses a scheduler could instead try to infer the prediction type conversion logic from the presence of `alphas_cumprod` (for a DDPM-style conversion) or `sigmas` (for an EDM-style conversion) attributes. However, I think this is unreliable because a scheduler could use `alphas_cumprod` or `sigmas` in a non-standard way. Since schedulers essentially already implement the `convert_to_sample_prediction` logic in their `step` methods, I think it could be relatively easy to implement these methods, and calling code would not have to guess how to do the conversion.\n\nA potential difficulty is ensuring that these methods work well with the `step` method, for example if they are called outside of a denoising loop (so internal state like `self.step_index` may not be properly initialized) or if the conversion can be non-deterministic (for example, when `gamma > 0` in `EulerDiscreteScheduler`).\n\n**What use case would this enable or better enable? Can you give us a code example?**\n\nThe motivating use case is to support guidance strategies which prefer to operate with $x_0$-predictions. For this use case, we want to convert the denoising model prediction to `sample_prediction`, run the guider's `__call__` logic, and then convert back to the scheduler's `prediction_type` (as schedulers currently expect `model_outputs` in that `prediction_type`).\n\nThere may be other potential use cases as well that I haven't thought of.\n\nAs a concrete example, we can imagine modifying `EulerDiscreteScheduler` as follows:\n\n```python\nclass EulerDiscreteScheduler(SchedulerMixin, ConfigMixin):\n    ...\n    def convert_to_sample_prediction(\n        self,\n        model_output: torch.Tensor,\n        timestep: Union[float, torch.Tensor],\n        sample: torch.Tensor,\n        prediction_type: Optional[str] = None,\n        s_churn: float = 0.0,\n        s_tmin: float = 0.0,\n        s_tmax: float = float(\"inf\"),\n        s_noise: float = 1.0,\n        generator: Optional[torch.Generator] = None,\n    ) -> torch.Tensor:\n        if prediction_type is None:\n            prediction_type = self.config.prediction_type\n\n        # NOTE: there's a potential catch here if self.step_index isn't properly initialized\n        sigma = self.sigmas[self.step_index]\n        gamma = min(s_churn / (len(self.sigmas) - 1), 2**0.5 - 1) if s_tmin <= sigma <= s_tmax else 0.0\n        sigma_hat = sigma * (gamma + 1)\n\n        # NOTE: another potential problem is ensuring consistent computation with `step` if the conversion\n        # can be non-deterministic (as below)\n        if gamma > 0:\n            noise = randn_tensor(\n                model_output.shape, dtype=model_output.dtype, device=model_output.device, generator=generator\n            )\n            eps = noise * s_noise\n            sample = sample + eps * (sigma_hat**2 - sigma**2) ** 0.5\n\n        # Compute predicted original sample (x_0) from sigma-scaled predicted noise\n        # NOTE: \"original_sample\" should not be an expected prediction_type but is left in for\n        # backwards compatibility\n        if self.config.prediction_type == \"original_sample\" or self.config.prediction_type == \"sample\":\n            pred_original_sample = model_output\n        elif self.config.prediction_type == \"epsilon\":\n            pred_original_sample = sample - sigma_hat * model_output\n        elif self.config.prediction_type == \"v_prediction\":\n            # denoised = model_output * c_out + input * c_skip\n            pred_original_sample = model_output * (-sigma / (sigma**2 + 1) ** 0.5) + (sample / (sigma**2 + 1))\n        else:\n            raise Valu",
    "url": "https://github.com/huggingface/diffusers/issues/12079",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-06T02:24:46Z",
    "updated_at": "2025-08-06T02:24:46Z",
    "comments": 0,
    "user": "dg845"
  },
  {
    "repo": "huggingface/candle",
    "number": 3047,
    "title": "Can the safetensor files from OpenAI's new gpt-oss-20b work with any existing setup?",
    "body": "Is the new gpt-oss-20b a totally different architecture or can I use an existing candle setup, swap out the files and start playing around with gpt-oss-20b?\n",
    "url": "https://github.com/huggingface/candle/issues/3047",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-06T01:59:59Z",
    "updated_at": "2025-08-06T02:01:52Z",
    "comments": 1,
    "user": "zcourts"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12078,
    "title": "Problem with provided example validation input in the Flux Control finetuning example",
    "body": "### Describe the bug\n\nThe help page for the Flux control finetuning example, https://github.com/huggingface/diffusers/blob/main/examples/flux-control/README.md, provides a sample validation input, a pose condition image\n[<img src=\"https://huggingface.co/api/resolve-cache/models/Adapter/t2iadapter/3c291e0547a1b17bed93428858cdc9b0265c26c7/openpose.png?%2FAdapter%2Ft2iadapter%2Fresolve%2Fmain%2Fopenpose.png=&etag=%2287cc79e12fe5a5bba31ac3098ee7837400b41ffa%22\" width=256>]().\nThe pose conditioned model trained by the script does not process this image properly because it is in BGR format, apparent when comparing it to the openpose spec: \n[<img src=\"https://github.com/ArtificialShane/OpenPose/raw/master/doc/media/keypoints_pose.png\" width=256>]().\nIt doesn't appear that the validation image is loaded in BGR format properly, in the below line:\nhttps://github.com/huggingface/diffusers/blob/ba2ba9019f76fd96c532240ed07d3f98343e4041/examples/flux-control/train_control_lora_flux.py#L127.\n\nIn my personal experiments, the validation output does not make sense. Below is an example of what my run uploaded to wandb:\n\n<img width=\"1310\" height=\"698\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/0edc3c88-cfa5-4fae-a6b1-295839136dba\" />\n\n### Reproduction\n\nI ran the below in the command line: \n```\naccelerate launch --config_file=/mnt/localssd/huggingface/accelerate/deepspeed.yaml train_control_lora_flux.py \\\n  --pretrained_model_name_or_path=\"black-forest-labs/FLUX.1-dev\" \\\n  --dataset_name=\"raulc0399/open_pose_controlnet\" \\\n  --output_dir=\"/mnt/localssd/pose-control-lora\" \\\n  --mixed_precision=\"bf16\" \\\n  --train_batch_size=1 \\\n  --rank=64 \\\n  --gradient_accumulation_steps=4 \\\n  --gradient_checkpointing \\\n  --use_8bit_adam \\\n  --learning_rate=1e-4 \\\n  --report_to=\"wandb\" \\\n  --lr_scheduler=\"constant\" \\\n  --lr_warmup_steps=0 \\\n  --max_train_steps=5000 \\\n  --validation_image=\"openpose.png\" \\\n  --validation_prompt=\"A couple, 4k photo, highly detailed\" \\\n  --seed=\"0\" \\\n  --cache_dir=\"/mnt/localssd/huggingface\" \n```\n\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\n```\n- \ud83e\udd17 Diffusers version: 0.34.0\n- Platform: Linux-5.10.223-212.873.amzn2.x86_64-x86_64-with-glibc2.35\n- Running on Google Colab?: No\n- Python version: 3.10.8\n- PyTorch version (GPU?): 2.7.1+cu126 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.34.3\n- Transformers version: 4.54.1\n- Accelerate version: 1.9.0\n- PEFT version: 0.17.0\n- Bitsandbytes version: 0.46.1\n- Safetensors version: 0.5.3\n- xFormers version: not installed\n- Accelerator: NVIDIA A100-SXM4-80GB, 81920 MiB\nNVIDIA A100-SXM4-80GB, 81920 MiB\nNVIDIA A100-SXM4-80GB, 81920 MiB\nNVIDIA A100-SXM4-80GB, 81920 MiB\nNVIDIA A100-SXM4-80GB, 81920 MiB\nNVIDIA A100-SXM4-80GB, 81920 MiB\nNVIDIA A100-SXM4-80GB, 81920 MiB\nNVIDIA A100-SXM4-80GB, 81920 MiB\n- Using GPU in script?: Yes.\n- Using distributed or parallel set-up in script?: Yes.\n```\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/12078",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-08-05T22:29:35Z",
    "updated_at": "2025-08-07T08:47:45Z",
    "comments": 1,
    "user": "kzhang2"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1672,
    "title": "How to resume training?",
    "body": "My old setting of training:\n```\n# batch_size: 64\nsteps: 20000\n# output_dir: outputs/train\n```\nin outputs/train/ there are 020000 folder and last folder,eash has pretrained_model and training_state\n\n\nWhen I want to resume training, I read configs/train.py\n\nso I set\n```\nresume: true\noutput_dir: outputs/train/\n# or output_dir: outputs/train/checkpoints/last/pretrained_model/\n# or output_dir: outputs/train/checkpoints/last/pretrained_model/train_config.json\n```\nAll got this:\n\nTraceback (most recent call last):\n  File \"/miniconda3/envs/lerobot/lib/python3.10/runpy.py\", line 196, in _run_module_as_main\n    return _run_code(code, main_globals, None,\n  File \"miniconda3/envs/lerobot/lib/python3.10/runpy.py\", line 86, in _run_code\n    exec(code, run_globals)\n  File \"//code/lerobot_diy/src/lerobot/scripts/train.py\", line 394, in <module>\n    train()\n  File \"/code/lerobot_diy/src/lerobot/configs/parser.py\", line 225, in wrapper_inner\n    response = fn(cfg, *args, **kwargs)\n  File \"/code/lerobot_diy/src/lerobot/scripts/train.py\", line 215, in train\n    optimizer, lr_scheduler = make_optimizer_and_scheduler(cfg, policy)\n  File \"//code/lerobot_diy/src/lerobot/optim/factory.py\", line 38, in make_optimizer_and_scheduler\n    optimizer = cfg.optimizer.build(params)\nAttributeError: 'NoneType' object has no attribute 'build'\n\n\nHow to write command of output dir?\nThanks!",
    "url": "https://github.com/huggingface/lerobot/issues/1672",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-05T14:57:32Z",
    "updated_at": "2025-08-06T03:04:28Z",
    "user": "milong26"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39921,
    "title": "[Gemma3N] Not able to add new special tokens to model/tokenizer due to projection error",
    "body": "### System Info\n\n```\n- transformers==4.54.1\n- Platform:  Linux-5.15.0-1084-aws-x86_64-with-glibc2.31\n- Python version: 3.13\n- TRL version: 0.19.1\n- Huggingface_hub version: 0.33.4\n- Safetensors version: 0.5.3\n- Accelerate version: 1.9.0\n- Accelerate config: \tnot found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.7.1+cu126 (CUDA)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: <fill in>\n- Using GPU in script?: <fill in>\n- GPU type: NVIDIA H100 80GB HBM3\n```\n\nHi,\n\nThe transformers model class for 'gemma-3n` has issues as below (pasting stacktrace):\n\n```\n    trainer.train()\n    ~~~~~~~~~~~~~^^\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/transformers/trainer.py\", line 2237, in train\n    return inner_training_loop(\n        args=args,\n    ...<2 lines>...\n        ignore_keys_for_eval=ignore_keys_for_eval,\n    )\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/transformers/trainer.py\", line 2578, in _inner_training_loop\n    tr_loss_step = self.training_step(model, inputs, num_items_in_batch)\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/trl/trainer/sft_trainer.py\", line 914, in training_step\n    return super().training_step(*args, **kwargs)\n           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/transformers/trainer.py\", line 3792, in training_step\n    loss = self.compute_loss(model, inputs, num_items_in_batch=num_items_in_batch)\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/trl/trainer/sft_trainer.py\", line 868, in compute_loss\n    (loss, outputs) = super().compute_loss(\n                      ~~~~~~~~~~~~~~~~~~~~^\n        model, inputs, return_outputs=True, num_items_in_batch=num_items_in_batch\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    )\n    ^\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/transformers/trainer.py\", line 3879, in compute_loss\n    outputs = model(**inputs)\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/torch/nn/modules/module.py\", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/torch/nn/modules/module.py\", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/accelerate/utils/operations.py\", line 818, in forward\n    return model_forward(*args, **kwargs)\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/accelerate/utils/operations.py\", line 806, in __call__\n    return convert_to_fp32(self.model_forward(*args, **kwargs))\n                           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/torch/amp/autocast_mode.py\", line 44, in decorate_autocast\n    return func(*args, **kwargs)\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/peft/peft_model.py\", line 1850, in forward\n    return self.base_model(\n           ~~~~~~~~~~~~~~~^\n        input_ids=input_ids,\n        ^^^^^^^^^^^^^^^^^^^^\n    ...<6 lines>...\n        **kwargs,\n        ^^^^^^^^^\n    )\n    ^\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/torch/nn/modules/module.py\", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/torch/nn/modules/module.py\", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/peft/tuners/tuners_utils.py\", line 222, in forward\n    return self.model.forward(*args, **kwargs)\n           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/transformers/utils/generic.py\", line 961, in wrapper\n    output = func(self, *args, **kwargs)\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/transformers/models/gemma3n/modeling_gemma3n.py\", line 2276, in forward\n    outputs = self.model(\n        input_ids=input_ids,\n    ...<14 lines>...\n        **lm_kwargs,\n    )\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/torch/nn/modules/module.py\", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13/site-packages/torch/nn/modules/module.py\", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/teamspace/studios/this_studio/.venv/lib/python3.13",
    "url": "https://github.com/huggingface/transformers/issues/39921",
    "state": "open",
    "labels": [
      "Usage",
      "Good Second Issue",
      "bug"
    ],
    "created_at": "2025-08-05T14:43:37Z",
    "updated_at": "2025-08-19T19:37:39Z",
    "comments": 14,
    "user": "debasisdwivedy"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39910,
    "title": "Question: Llama4 weight reshaping",
    "body": "Hi all\n\nI am trying to extract the original Llama4 MoE weights, specifically:\n\n- `experts.w1` (aka `experts.moe_w_in_eD_F`)\n- `experts.w3` (aka `experts.moe_w_swiglu_eD_F`)\n\nI need both of these in the shape `[E, D, N]`, where:\n\n- E is the number of experts (16 for Scout)\n- D is the embedding dimension (5120)\n- N is the intermediate dimension (8192)\n\nI tried just splitting `experts.gate_up_proj` in half along the last dimension to get w1 and w3, but although the dimensions match, the model is outputting nonsense, so I assume the actual order of the weights is wrong.\n\nCould someone help me make sense of this snippet (from `convert_llama4_weights_to_hf`)?\nWhy is this hard coded indexing / reshaping being done and do you have any suggestions for how to get the original weight back?\n\n```python\nelif re.search(r\"(gate|up)_proj\", new_key):\n        path = new_key.split(\".\")\n        gate_key = re.sub(r\"(gate|up)_proj\", lambda m: \"gate_proj\", new_key)\n        up_key = re.sub(r\"(gate|up)_proj\", lambda m: \"up_proj\", new_key)\n        if gate_key == new_key:\n            state_dict[new_key] = torch.cat(current_parameter, dim=concat_dim)\n        elif new_key == up_key:\n            if \"experts\" not in new_key:\n                state_dict[new_key] = torch.cat(current_parameter, dim=concat_dim)\n            else:\n                # gate_proj = moe_w_in_eD_F = w1\n                gate_proj = state_dict.pop(gate_key)\n                gate_proj = [\n                    gate_proj.reshape(num_experts, -1, 8, 1024)[:, :, k, :].reshape(num_experts, -1, 1024)\n                    for k in range(8)\n                ]\n                gate_proj = torch.cat(gate_proj, dim=-1)\n\n                # up_proj = moe_w_swiglu_eD_F = w3\n                up_proj = [\n                    k.reshape(num_experts, -1, 8, 1024).reshape(num_experts, -1, 1024)\n                    for k in current_parameter\n                ]\n                up_proj = torch.cat(up_proj, dim=-1)\n\n                gate_up_proj = torch.cat((gate_proj, up_proj), dim=-1)\n                new_key = new_key.replace(\"up_proj\", \"gate_up_proj\")\n                state_dict[new_key] = gate_up_proj.contiguous()\n\n            tqdm.write(f\"Processing: {key.ljust(50)}  ->\\t {new_key}, {state_dict[new_key].shape}\")\n```\n\nThank you!",
    "url": "https://github.com/huggingface/transformers/issues/39910",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-05T10:19:25Z",
    "updated_at": "2025-08-13T09:35:52Z",
    "comments": 0,
    "user": "gskorokhod"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7724,
    "title": "Can not stepinto load_dataset.py?",
    "body": "I set a breakpoint in \"load_dataset.py\" and try to debug my data load codes, but it does not stop at any breakpoints, so \"load_dataset.py\" can not be stepped into ?\n\n<!-- Failed to upload \"\u622a\u56fe 2025-08-05 17-25-18.png\" -->",
    "url": "https://github.com/huggingface/datasets/issues/7724",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-05T09:28:51Z",
    "updated_at": "2025-08-05T09:28:51Z",
    "comments": 0,
    "user": "micklexqg"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1670,
    "title": "How does leroBot address the issue of training heterogeneous datasets?",
    "body": "Specifically, suppose I have a dataset A and dataset B. In dataset A, both the state and action are represented as (x, y, z, gripper), where x, y, and z denote the distances moved along the x, y, and z axes, respectively, and gripper represents the on/off state of the gripper. In dataset B, both the state and action are the angles of the corresponding joints of the robotic arm. How can I use these two datasets together for training?",
    "url": "https://github.com/huggingface/lerobot/issues/1670",
    "state": "open",
    "labels": [
      "question",
      "processor"
    ],
    "created_at": "2025-08-05T08:20:08Z",
    "updated_at": "2025-08-12T09:01:57Z",
    "user": "mahao18cm"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1667,
    "title": "How many episode to have a good result of SmolVLA",
    "body": "### System Info\n\n```Shell\nHello, I'm trying to do a simple task like dual hand pick banana to a basket using SmolVLA\uff0cmay I know how many episode to train for having a good result\uff1f\n\nMany thanks\nJulien\n```\n### Reproduction\n\nI've used 100 episode for training, looks like the arm can not pick the banana accurately, sometimes the arms just stay on the head of banana\n\n### Expected behavior\n\nleft hand pick banana and hand it to right hand then right hand put banana into basket",
    "url": "https://github.com/huggingface/lerobot/issues/1667",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-08-05T05:12:12Z",
    "updated_at": "2025-10-17T11:27:14Z",
    "user": "chejulien"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1527,
    "title": "Any model fp8 training",
    "body": "### Bug description\n\nDo you have a further plan to extend training models from llama and deepseek to any model from huggingface transformers library? I've seen an issue where a user asked about qwen but in recent days other companies have announced their excellent MOE models with weights and configs on huggingface, and it would be great to train them using torchtitan\n\n### Versions\n\nLatest versions",
    "url": "https://github.com/pytorch/torchtitan/issues/1527",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-08-05T00:21:01Z",
    "updated_at": "2025-08-05T22:46:15Z",
    "user": "pizzaball"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1525,
    "title": "Transformer is running with float32 instead of bfloat16 !",
    "body": "### Bug description\n\nModified the Llama3 modle.py to print dtype as follows and ran just 1 rank. The  \n\n```\n    def forward(\n        self,\n        tokens: torch.Tensor,\n        eos_id: int | None = None,\n        input_batch: torch.Tensor | None = None,\n    ):\n        \"\"\"\n        Perform a forward pass through the Transformer model.\n\n        Args:\n            tokens (torch.Tensor): Input token indices if pipeline parallelism is not enabled.\n                If pipeline parallelism is enabled, this will be the input token indices\n                for the ranks on the first pipeline stage. This will be the activation of the\n                previous pipeline stage if the current rank is not on the first stage.\n            input_batch (torch.Tensor): The input batch read from the dataloader.\n                This will always be the input batch regardless of the pipeline stage.\n                This field is required for non-first PP stages to perform document\n                masking attention (to analyze the boundary of the document).\n\n        Returns:\n            torch.Tensor: Output logits after applying the Transformer model.\n\n        \"\"\"\n        if self.model_args.use_flex_attn:\n            init_attention_mask(\n                input_batch if input_batch is not None else tokens, eos_id=eos_id\n            )\n\n        print (f\"tokens.dtype {tokens.dtype}\")\n        # passthrough for nonexistent layers, allows easy configuration of pipeline parallel stages\n        h = self.tok_embeddings(tokens) if self.tok_embeddings else tokens\n        print (f\"h.dtype {h.dtype}\")\n\n        for layer in self.layers.values():\n            h = layer(h, self.freqs_cis)\n            print (f\"h.dtype {h.dtype}\")\n\n        h = self.norm(h) if self.norm else h\n        print (f\"h.dtype {h.dtype}\")\n        output = self.output(h) if self.output else h\n        print (f\"output.dtype {h.dtype}\")\n        return output\n\n```\nSeeing only float32 datatypes as follows.\n\n```\ntokens.dtype torch.int64\nh.dtype torch.float32\nh.dtype torch.float32\nh.dtype torch.float32\nh.dtype torch.float32\nh.dtype torch.float32\nh.dtype torch.float32\nh.dtype torch.float32\nh.dtype torch.float32\noutput.dtype torch.float32\n\n```\n\nThe config is:\n\n`model.toml', 'dump_folder': './outputs', 'description': 'Llama 3 debug training', 'use_for_integration_test': True, 'print_args': True}, 'profiling': {'enable_profiling': False, 'save_traces_folder': 'profile_trace', 'profile_freq': 10, 'enable_memory_snapshot': False, 'save_memory_snapshot_folder': 'memory_snapshot'}, 'metrics': {'log_freq': 1, 'enable_tensorboard': False, 'disable_color_printing': False, 'save_tb_folder': 'tb', 'save_for_all_ranks': False, 'enable_wandb': False}, 'model': {'name': 'llama3', 'flavor': 'debugmodel', 'tokenizer_path': './tests/assets/tokenizer', 'converters': [], 'print_after_conversion': False}, 'optimizer': {'name': 'AdamW', 'lr': 0.0008, 'beta1': 0.9, 'beta2': 0.95, 'eps': 1e-08, 'weight_decay': 0.1, 'implementation': 'fused', 'early_step_in_backward': False}, 'lr_scheduler': {'warmup_steps': 2, 'decay_ratio': 0.8, 'decay_type': 'linear', 'min_lr_factor': 0.0}, 'training': {'dataset': 'c4_test', 'dataset_path': None, 'local_batch_size': 8, 'global_batch_size': -1, 'seq_len': 2048, 'max_norm': 1.0, 'steps': 10, 'enable_cpu_offload': False, 'mixed_precision_param': 'bfloat16', 'mixed_precision_reduce': 'float32', 'compile': False, 'gc_freq': 50, 'gc_debug': False, 'seed': None, 'deterministic': False}, 'parallelism': {'data_parallel_replicate_degree': 1, 'enable_compiled_autograd': False, 'data_parallel_shard_degree': -1, 'fsdp_reshard_after_forward': 'default', 'tensor_parallel_degree': 1, 'disable_loss_parallel': False, 'enable_async_tensor_parallel': False, 'pipeline_parallel_degree': 1, 'pipeline_parallel_split_points': [], 'module_fqns_per_model_part': None, 'pipeline_parallel_first_stage_less_layers': 1, 'pipeline_parallel_last_stage_less_layers': 1, 'pipeline_parallel_layers_per_stage': None, 'pipeline_parallel_schedule': '1F1B', 'pipeline_parallel_schedule_csv': '', 'pipeline_parallel_microbatch_size': 1, 'context_parallel_degree': 1, 'context_parallel_rotate_method': 'allgather', 'expert_parallel_degree': 1}, 'checkpoint': {'enable_checkpoint': False, 'folder': 'checkpoint', 'interval': 10, 'initial_load_path': None, 'initial_load_model_only': True, 'initial_load_in_hf': False, 'last_save_model_only': False, 'last_save_in_hf': False, 'export_dtype': 'float32', 'async_mode': 'disabled', 'keep_latest_k': 10, 'load_step': -1, 'exclude_from_loading': [], 'enable_first_step_checkpoint': False, 'create_seed_checkpoint': False}, 'activation_checkpoint': {'mode': 'selective', 'selective_ac_option': '2', 'per_op_sac_force_recompute_mm_shapes_by_fqns': ['moe.router.gate']}, 'float8': {'enable_fsdp_float8_all_gather': False, 'precompute_float8_dynamic_scale_for_fsdp': False, 'recipe_name': None, 'filter_fqns': ['output'], 'emulate': False, 'moe_fqns_prototype': []}, 'mx': {'mxfp8_dim1_cast_kernel_choice': '",
    "url": "https://github.com/pytorch/torchtitan/issues/1525",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-08-04T22:37:20Z",
    "updated_at": "2025-08-14T21:25:04Z",
    "user": "githubsgi"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1666,
    "title": "Please add multi gpu training support",
    "body": "MultiGPU training currently does not work with lerobot as mentioned here https://github.com/huggingface/lerobot/issues/1377\n\nPlease add this support.",
    "url": "https://github.com/huggingface/lerobot/issues/1666",
    "state": "closed",
    "labels": [
      "enhancement",
      "question",
      "policies"
    ],
    "created_at": "2025-08-04T18:06:40Z",
    "updated_at": "2025-10-17T09:53:59Z",
    "user": "nahidalam"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1663,
    "title": "No way to train on subset of features",
    "body": "Currently, when loading a policy from a config.json, the input_features seem to be ignored and re-generated from the dataset provided. However, it may not always be desirable to train on all features, perhaps if I have multiple camera views but I only want to train on one.\n\nI would prefer that config.json features are not overwritten, but this would be a breaking change. Do you have suggestions on how we could implement this behavior?",
    "url": "https://github.com/huggingface/lerobot/issues/1663",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "processor"
    ],
    "created_at": "2025-08-04T15:19:35Z",
    "updated_at": "2025-08-12T09:03:47Z",
    "user": "atyshka"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3507,
    "title": "Feedback about Optimizing Model Parameters Page",
    "body": "There is the following issue on this page: https://docs.pytorch.org/tutorials/beginner/basics/optimization_tutorial.html\n\nWithin the section [Full implementation](https://docs.pytorch.org/tutorials/beginner/basics/optimization_tutorial.html#full-implementation), the loop does not contain the `zero_grad` function on top of the backward propagation block as is recommended in the paragraph preceding this section.\n\nActual code:\n```python\n# Backpropagation\nloss.backward()\noptimizer.step()\noptimizer.zero_grad()\n```\nRecommended code:\n```python\noptimizer.zero_grad()\nloss.backward()\noptimizer.step()\n```\n\nIf you could instruct me how to make this change on the documentation, I would be glad to do that.",
    "url": "https://github.com/pytorch/tutorials/issues/3507",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-04T14:50:13Z",
    "updated_at": "2025-08-04T14:50:13Z",
    "comments": 0,
    "user": "madhaven"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12060,
    "title": "Is there any DiT block defined in the huggingface/diffusers OR huggingface/transformers project?",
    "body": "**Is your feature request related to a problem? Please describe.**\nI want to make some experiments about DiT based flow-matching model, I need an implementation of the common DiT block, but did not found it in both huggingface/diffusers and huggingface/transformers.  Is there any implementation about it with just some other file names?\n\n**Describe the solution you'd like.**\nA clear DiT implementation\n\n**Describe alternatives you've considered.**\n\n\n**Additional context.**\n\n",
    "url": "https://github.com/huggingface/diffusers/issues/12060",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-04T09:40:43Z",
    "updated_at": "2025-08-04T10:19:00Z",
    "comments": 2,
    "user": "JohnHerry"
  },
  {
    "repo": "pytorch/xla",
    "number": 9537,
    "title": "What are some large model use cases for torch-xla\uff1f",
    "body": "## \u2753 Questions and Help\nI\u2019ve observed that torch-xla has been actively developed for GPU support recently. Are there any benchmark comparisons between torch-xla and standard PyTorch, particularly for large-scale model training? Additionally, regarding frameworks such as Megatron-LM, is there any plan for official support within torch-xla moving forward?",
    "url": "https://github.com/pytorch/xla/issues/9537",
    "state": "closed",
    "labels": [
      "question",
      "xla:gpu"
    ],
    "created_at": "2025-08-04T09:04:32Z",
    "updated_at": "2025-08-06T08:24:30Z",
    "user": "south-ocean"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12052,
    "title": "Wan 2.2 with LightX2V offloading tries to multiply tensors from different devices and fails",
    "body": "### Describe the bug\n\nAfter @sayakpaul great work in https://github.com/huggingface/diffusers/pull/12040 LightX2V now works. However what doesn't work is adding both a lora and offloading to the transformer_2. I can get away with either (i.e. offload both transformers but add a lora only to transformer and NOT to transformer_2, OR offload just transformer and add a lora to both transformer_2 and transformer). \n\nHowever offloading transformer_2 is quite important, since it causes 2x the VRAM to be used, and even a Q4_K_S model with LightX2V will use >24gb vram (as opposed to <9GB VRAM as in ComfyUI).\n\n### Reproduction\n\nThe script is the same as the one posted by Paul in the #12040 PR with the addition of offloading\n\n```python\nimport torch\nfrom diffusers import WanImageToVideoPipeline\nfrom huggingface_hub import hf_hub_download\nimport requests\nfrom PIL import Image\nfrom diffusers.loaders.lora_conversion_utils import _convert_non_diffusers_wan_lora_to_diffusers\nfrom io import BytesIO\nimport safetensors.torch\n\n# Load a basic transformer model\npipe = WanImageToVideoPipeline.from_pretrained(\n    \"Wan-AI/Wan2.2-I2V-A14B-Diffusers\",\n    torch_dtype=torch.bfloat16\n)\n\nlora_path = hf_hub_download(\n    repo_id=\"Kijai/WanVideo_comfy\",\n    filename=\"Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank128_bf16.safetensors\"\n)\n\n# This is what is different\n\nself.pipe.vae.enable_group_offload(onload_device=onload_device, offload_device=offload_device, offload_type=\"leaf_level\")\nself.pipe.transformer.enable_group_offload(onload_device=onload_device, offload_device=offload_device, offload_type=\"leaf_level\")\n\n# Without this line it works but uses 2x the VRAM\nself.pipe.transformer_2.enable_group_offload(onload_device=onload_device, offload_device=offload_device, offload_type=\"leaf_level\")\n\nself.pipe.text_encoder.enable_group_offload(onload_device=onload_device, offload_device=offload_device, offload_type=\"leaf_level\")\n\npipe.to(\"cuda\")\n\npipe.load_lora_weights(lora_path)\n# print(pipe.transformer.__class__.__name__)\n# print(pipe.transformer.peft_config)\norg_state_dict = safetensors.torch.load_file(lora_path)\nconverted_state_dict = _convert_non_diffusers_wan_lora_to_diffusers(org_state_dict)\npipe.transformer_2.load_lora_adapter(converted_state_dict)\n\nimage_url = \"https://cloud.inference.sh/u/4mg21r6ta37mpaz6ktzwtt8krr/01k1g7k73eebnrmzmc6h0bghq6.png\"\nresponse = requests.get(image_url)\ninput_image = Image.open(BytesIO(response.content)).convert(\"RGB\")\n\nframes = pipe(input_image, \"animate\", num_inference_steps=4, guidance_scale=1.0)\n```\n\n### Logs\n\n```shell\n[t+1m44s256ms] [ERROR] Traceback (most recent call last):\n[t+1m44s256ms]   File \"/server/tasks.py\", line 50, in run_task\n[t+1m44s256ms]     output = await result\n[t+1m44s256ms]              ^^^^^^^^^^^^\n[t+1m44s256ms]   File \"/inferencesh/apps/gpu/65b8e0w0x60df8we0x6njqx9kc/src/inference.py\", line 424, in run\n[t+1m44s256ms]     output = self.pipe(\n[t+1m44s256ms]              ^^^^^^^^^^\n[t+1m44s256ms]   File \"/inferencesh/apps/gpu/65b8e0w0x60df8we0x6njqx9kc/venv/3.12/lib/python3.12/site-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n[t+1m44s256ms]     return func(*args, **kwargs)\n[t+1m44s256ms]            ^^^^^^^^^^^^^^^^^^^^^\n[t+1m44s256ms]   File \"/inferencesh/apps/gpu/65b8e0w0x60df8we0x6njqx9kc/venv/3.12/lib/python3.12/site-packages/diffusers/pipelines/wan/pipeline_wan_i2v.py\", line 754, in __call__\n[t+1m44s256ms]     noise_pred = current_model(\n[t+1m44s256ms]                  ^^^^^^^^^^^^^^\n[t+1m44s256ms]   File \"/inferencesh/apps/gpu/65b8e0w0x60df8we0x6njqx9kc/venv/3.12/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1751, in _wrapped_call_impl\n[t+1m44s256ms]     return self._call_impl(*args, **kwargs)\n[t+1m44s256ms]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[t+1m44s256ms]   File \"/inferencesh/apps/gpu/65b8e0w0x60df8we0x6njqx9kc/venv/3.12/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1762, in _call_impl\n[t+1m44s256ms]     return forward_call(*args, **kwargs)\n[t+1m44s256ms]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[t+1m44s256ms]   File \"/inferencesh/apps/gpu/65b8e0w0x60df8we0x6njqx9kc/venv/3.12/lib/python3.12/site-packages/diffusers/hooks/hooks.py\", line 189, in new_forward\n[t+1m44s256ms]     output = function_reference.forward(*args, **kwargs)\n[t+1m44s256ms]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[t+1m44s256ms]   File \"/inferencesh/apps/gpu/65b8e0w0x60df8we0x6njqx9kc/venv/3.12/lib/python3.12/site-packages/diffusers/models/transformers/transformer_wan.py\", line 639, in forward\n[t+1m44s256ms]     temb, timestep_proj, encoder_hidden_states, encoder_hidden_states_image = self.condition_embedder(\n[t+1m44s256ms]                                                                               ^^^^^^^^^^^^^^^^^^^^^^^^\n[t+1m44s256ms]   File \"/inferencesh/apps/gpu/65b8e0w0x60df8we0x6njqx9kc/venv/3.12/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1751, in _wrapped_call_impl\n[t+1m44s256ms]     return self._",
    "url": "https://github.com/huggingface/diffusers/issues/12052",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-08-03T12:43:13Z",
    "updated_at": "2025-08-11T15:53:41Z",
    "comments": 4,
    "user": "luke14free"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3506,
    "title": "Feedback about \u5728 Google Colab \u4e2d\u8fd0\u884c\u6559\u7a0b",
    "body": "There is the following issue on this page: https://docs.pytorch.org/tutorials/beginner/colab.html\nThe content in this page clearly shows  how to upload or download your dataset into your Google Drive or your Desktop",
    "url": "https://github.com/pytorch/tutorials/issues/3506",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-03T03:51:11Z",
    "updated_at": "2025-12-09T19:11:27Z",
    "comments": 1,
    "user": "KevinAllen66"
  },
  {
    "repo": "huggingface/peft",
    "number": 2699,
    "title": "UserWarning: Found missing adapter keys while loading the checkpoint",
    "body": "I have been fine-tuning different LLM models (mainly Llama family) since last year and use peft with lora config all the time with no issues. \nJust recently I was  fine-tuning the llama 70B on multiple GPU using accelerate then saving the adapter once training is done. (This was always my setup since last year)\n\nHowever now I want to load the adapter into the base model as follows:\n\n```\nbase_model = AutoModelForCausalLM.from_pretrained(model_id, dtype= torch.float16, device_map = 'auto', attn_implementation = 'flash_attention_2')\n\nmodel = PeftModel.from_pretrained(base_model, adapter_path)\n```\nNow I am getting this warning:\n```\nUserWarning: Found missing adapter keys while loading the checkpoint: \n```\nThen it lists some Lora weights. I tried changing LoraConfig parameters but still the problem\nPersists.\nCan anyone please tell me what is the issue here and how to fix it.\n\nI am using the latest version of peft, transformers, accelerate,\ntrl\n\nNote: I am also using the same format for model during the training and inference.\n\nI have already looked at this and seems same issue, but I load my model using AutoModelForCasaulLM in both cases:\nhttps://github.com/huggingface/peft/issues/2566\n\n\nNote: This is the warning: `[base_model.model.model.layers.0.self_attn, q_proj.lora_A.default.weight, base_model.model.model.layers.0.self_attn, q_proj.lora_B.default.weight, base_model.model.model.layers.0.self_attn, k_proj.lora_A.default.weight, base_model.model.model.layers.0.self_attn, k_proj.lora_B.default.weight`, ...",
    "url": "https://github.com/huggingface/peft/issues/2699",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-02T20:49:31Z",
    "updated_at": "2025-11-09T15:03:46Z",
    "comments": 41,
    "user": "manitadayon"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3505,
    "title": "Why am I 2:4 sparse slower than dense in the decode stage of LLaMA2\u20117B?",
    "body": "## Description\nHi\n\n<img width=\"1000\" height=\"800\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/0e08ab66-423a-4ef0-a876-8e6e735affad\" />\n\nAs shown in the figure, during the decoding phase, the 2:4 sparsity model is about 12% slower than the dense model, the questions are as follows:\n\n- Is the decode phase dominated by GEMV / small\u2011N GEMM operations, which therefore cannot trigger the 2:4 sparse Tensor Core path?\n\n- Even so, why is the 2:4 sparsity model slower than the dense model?\n\n- If we increase N>1 (e.g., batch multiple requests or generate multiple tokens at once so it becomes a GEMM), can we observe measurable 2:4 sparsity speed\u2011up?\n\n- Are there any sparse kernels or recommended practices for GEMV (matrix\u2011vector) that can take advantage of 2:4 sparsity?\n\n## Environment\nNVIDIA GeForce RTX 4090, 8.9, P2`\n\n=== Python / OS ===\n3.11.13 Linux-6.5.0-18-generic-x86_64-with-glibc2.35\n\n=== PyTorch / CUDA / cuDNN ===\ntorch: 2.2.2+cu121\ncuda: 12.1\ncudnn: 8902\ndevice: NVIDIA GeForce RTX 4090\nsm capability: (8, 9)\n\n=== cuBLASLt ===\ncuBLASLt version: 0\n\n=== TensorRT ===\nTensorRT not installed\n\n\n[2to4_sparsity.zip](https://github.com/user-attachments/files/21557839/2to4_sparsity.zip)\n\nThanks!",
    "url": "https://github.com/pytorch/tutorials/issues/3505",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-08-02T03:44:06Z",
    "updated_at": "2025-08-09T03:14:49Z",
    "user": "wang-qitong"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12044,
    "title": "AttributeError: 'bool' object has no attribute '__module__'. Did you mean: '__mod__'?",
    "body": "I am train the Flux.1-dev model and get this error. I found the solution to bring diffuser to version 0.21.0 but then it would beconflict with some other libraries. Is there any solution for this?\n\n```\nTraceback (most recent call last):\n  File \"/home/quyetnv/t2i/ai-toolkit/run.py\", line 120, in <module>\n    main()\n  File \"/home/quyetnv/t2i/ai-toolkit/run.py\", line 108, in main\n    raise e\n  File \"/home/quyetnv/t2i/ai-toolkit/run.py\", line 96, in main\n    job.run()\n  File \"/home/quyetnv/t2i/ai-toolkit/jobs/ExtensionJob.py\", line 22, in run\n    process.run()\n  File \"/home/quyetnv/t2i/ai-toolkit/jobs/process/BaseSDTrainProcess.py\", line 1518, in run\n    self.sd.load_model()\n  File \"/home/quyetnv/t2i/ai-toolkit/toolkit/stable_diffusion_model.py\", line 788, in load_model\n    pipe: Pipe = Pipe(\n  File \"/home/quyetnv/.venv/lib/python3.10/site-packages/diffusers/pipelines/flux/pipeline_flux.py\", line 197, in __init__\n    self.register_modules(\n  File \"/home/quyetnv/.venv/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py\", line 212, in register_modules\n    library, class_name = _fetch_class_library_tuple(module)\n  File \"/home/quyetnv/.venv/lib/python3.10/site-packages/diffusers/pipelines/pipeline_loading_utils.py\", line 877, in _fetch_class_library_tuple\n    library = not_compiled_module.__module__.split(\".\")[0]\nAttributeError: 'bool' object has no attribute '__module__'. Did you mean: '__mod__'?\n``` \nmy version diffusers was installed from requirement of ai-toolkit is 0.35.0 dev3",
    "url": "https://github.com/huggingface/diffusers/issues/12044",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-02T01:37:30Z",
    "updated_at": "2025-08-21T01:27:19Z",
    "comments": 3,
    "user": "qngv"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1515,
    "title": "MiCS (Mixture of Communicators for Scaling)",
    "body": "Wondering if  MiCS (Mixture of Communicators for Scaling)  has been considered as a  feature in TorchTitan.  Would appreciate thoughts on the topic. ",
    "url": "https://github.com/pytorch/torchtitan/issues/1515",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-08-01T22:15:13Z",
    "updated_at": "2025-08-05T19:55:36Z",
    "user": "githubsgi"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2333,
    "title": "Support for exporting t5gemma-2b-2b-prefixlm-it to onnx",
    "body": "### Feature request\n\nI\u2019ve tried to export t5gemma-2b-2b-prefixlm-it to onnx using optimum. But it outputs: ValueError: Trying to export a t5gemma model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type t5gemma to be supported natively in the ONNX export.\n\nTask: \"text2text-generation\"\n\n### Motivation\n\nI\u2019ve tried, but nothing works...\n\n### Your contribution\n\nconfig.json\n\n{\n  \"architectures\": [\n    \"T5GemmaForConditionalGeneration\"\n  ],\n  \"classifier_dropout_rate\": 0.0,\n  \"decoder\": {\n    \"attention_bias\": false,\n    \"attention_dropout\": 0.0,\n    \"attn_logit_softcapping\": 50.0,\n    \"classifier_dropout_rate\": 0.0,\n    \"cross_attention_hidden_size\": 2304,\n    \"dropout_rate\": 0.0,\n    \"final_logit_softcapping\": 30.0,\n    \"head_dim\": 256,\n    \"hidden_activation\": \"gelu_pytorch_tanh\",\n    \"hidden_size\": 2304,\n    \"initializer_range\": 0.02,\n    \"intermediate_size\": 9216,\n    \"is_decoder\": true,\n    \"layer_types\": [\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\"\n    ],\n    \"max_position_embeddings\": 8192,\n    \"model_type\": \"t5_gemma_module\",\n    \"num_attention_heads\": 8,\n    \"num_hidden_layers\": 26,\n    \"num_key_value_heads\": 4,\n    \"query_pre_attn_scalar\": 256,\n    \"rms_norm_eps\": 1e-06,\n    \"rope_theta\": 10000.0,\n    \"sliding_window\": 4096,\n    \"torch_dtype\": \"bfloat16\",\n    \"use_cache\": true,\n    \"vocab_size\": 256000\n  },\n  \"dropout_rate\": 0.0,\n  \"encoder\": {\n    \"attention_bias\": false,\n    \"attention_dropout\": 0.0,\n    \"attn_logit_softcapping\": 50.0,\n    \"classifier_dropout_rate\": 0.0,\n    \"dropout_rate\": 0.0,\n    \"final_logit_softcapping\": 30.0,\n    \"head_dim\": 256,\n    \"hidden_activation\": \"gelu_pytorch_tanh\",\n    \"hidden_size\": 2304,\n    \"initializer_range\": 0.02,\n    \"intermediate_size\": 9216,\n    \"layer_types\": [\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\",\n      \"sliding_attention\",\n      \"full_attention\"\n    ],\n    \"max_position_embeddings\": 8192,\n    \"model_type\": \"t5_gemma_module\",\n    \"num_attention_heads\": 8,\n    \"num_hidden_layers\": 26,\n    \"num_key_value_heads\": 4,\n    \"query_pre_attn_scalar\": 256,\n    \"rms_norm_eps\": 1e-06,\n    \"rope_theta\": 10000.0,\n    \"sliding_window\": 4096,\n    \"torch_dtype\": \"bfloat16\",\n    \"use_cache\": true,\n    \"vocab_size\": 256000\n  },\n  \"eos_token_id\": [\n    1,\n    107\n  ],\n  \"initializer_range\": 0.02,\n  \"is_encoder_decoder\": true,\n  \"model_type\": \"t5gemma\",\n  \"pad_token_id\": 0,\n  \"torch_dtype\": \"bfloat16\",\n  \"transformers_version\": \"4.53.0.dev0\",\n  \"use_cache\": true\n}",
    "url": "https://github.com/huggingface/optimum/issues/2333",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2025-08-01T16:39:52Z",
    "updated_at": "2026-01-03T02:51:13Z",
    "comments": 2,
    "user": "botan-r"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39842,
    "title": "Expected behavior of `compute_result` is hard to expect and inconsistent",
    "body": "In trainer there exists a parameter `compute_result` given to `compute_metrics` when `batch_eval_metrics` is given to True.\n\nhttps://github.com/huggingface/transformers/blob/1e0665a191f73f6b002209c3dfcda478baac6bac/src/transformers/trainer.py#L370-L375\n\nI think there are several problems for `compute_result`,\n1. User can't expect (1) what happen if `batch_eval_metrics` is given (2) what is given to `compute_result`  and when it change from True or False (3) what's HF's intention to implement `compute_metrics` with `compute_result`. since there are very few (only 3 line) instruction for this.\n2. `compute_metrics` sometimes called with `compute_result` and sometimes not, EVEN WHEN `batch_eval_metrics` is present. See below lines. \n\nhttps://github.com/huggingface/transformers/blob/1e0665a191f73f6b002209c3dfcda478baac6bac/src/transformers/trainer.py#L4534-L4547\n\nCreating this issue because I spend long time figuring out this.",
    "url": "https://github.com/huggingface/transformers/issues/39842",
    "state": "closed",
    "labels": [],
    "created_at": "2025-08-01T11:43:28Z",
    "updated_at": "2025-10-04T08:02:41Z",
    "comments": 3,
    "user": "MilkClouds"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39841,
    "title": "MistralCommonTokenizer does not match PreTrainedTokenizer",
    "body": "### System Info\n\non docker\nos: ubuntu 24.04\ntransformers: 4.55.0.dev0\nmistral_common: 1.8.3\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nCommand to lauch container:\n\n```bash\ndocker run --gpus all -p 8000:8000 --ipc=host vllm/vllm-openai:latest --model mistralai/Voxtral-Mini-3B-2507\n```\n\n\n### Expected behavior\n\nThe output will finish in:\n\n```bash\nvllm-1  |   File \"/usr/local/lib/python3.12/dist-packages/vllm/transformers_utils/tokenizer_group.py\", line 24, in __init__  \nvllm-1  |     self.tokenizer = get_tokenizer(self.tokenizer_id, **tokenizer_config)\nvllm-1  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nvllm-1  |   File \"/usr/local/lib/python3.12/dist-packages/vllm/transformers_utils/tokenizer.py\", line 309, in get_tokenizer\nvllm-1  |     tokenizer = get_cached_tokenizer(tokenizer)\nvllm-1  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nvllm-1  |   File \"/usr/local/lib/python3.12/dist-packages/vllm/transformers_utils/tokenizer.py\", line 104, in get_cached_tokenizer\nvllm-1  |     tokenizer_all_special_tokens = tokenizer.all_special_tokens\nvllm-1  |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nvllm-1  | AttributeError: 'MistralCommonTokenizer' object has no attribute 'all_special_tokens'. Did you mean: '_all_special_ids'?\n```\n\nvLLM docker server uses the pretrained tokenizer format:\nhttps://github.com/vllm-project/vllm/blob/49314869887e169be080201ab8bcda14e745c080/vllm/transformers_utils/tokenizer.py#L97-L101\n\nWhich must include: `all_special_ids`, `all_special_tokens`, `all_special_tokens_extended` default properties. However, MistralCommonTokenizer does not have implemented them. Is there a plan to standarize both tokenizers?\n",
    "url": "https://github.com/huggingface/transformers/issues/39841",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-08-01T09:16:24Z",
    "updated_at": "2025-11-23T08:03:33Z",
    "comments": 3,
    "user": "Fhrozen"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39839,
    "title": "pack_image_features RuntimeError when vision_feature_select_strategy=\"full\"",
    "body": "### System Info\n\ntransformers  4.54.0\n\n### Who can help?\n\n@zucchini-nlp \n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```\nfrom transformers.models.llava_next import LlavaNextForConditionalGeneration, LlavaNextProcessor\nfrom PIL import Image\nimport requests\nimport torch\n\nmodel = LlavaNextForConditionalGeneration.from_pretrained(\n                \"llava-hf/llava-v1.6-vicuna-7b-hf\", \n                vision_feature_select_strategy=\"full\",\n                torch_dtype=torch.float16,\n                device_map=\"auto\",\n            )\nprocessor = LlavaNextProcessor.from_pretrained(\"llava-hf/llava-v1.6-vicuna-7b-hf\")\n\nimage = Image.open(\"/data/coco/train2017/000000000009.jpg\")\nprompt = \"USER: <image>\\nWhat is shown in this image? ASSISTANT:\"\ninputs = processor(images=image, text=prompt, truncation=True, return_tensors=\"pt\", vision_feature_select_strategy = \"full\").to(\"cuda\")\n\ninput_embeds = model(inputs.input_ids, pixel_values=inputs.pixel_values, image_sizes=inputs.image_sizes, vision_feature_select_strategy=\"full\")\n```\n\n### Expected behavior\n\nI encountered a bug when running to the line \n`input_embeds = model(inputs.input_ids, pixel_values=inputs.pixel_values, image_sizes=inputs.image_sizes, vision_feature_select_strategy=\"full\")`\nI got:\n```\n in pack_image_features\n    image_feature = image_feature.view(num_patch_height, num_patch_width, height, width, -1)\nRuntimeError: shape '[2, 2, 24, 24, -1]' is invalid for input of size 9453568\n```\n\n\nthe shape of image_feature is [4, 577, 4096] currently, I want to know how to fix this?",
    "url": "https://github.com/huggingface/transformers/issues/39839",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-08-01T07:55:40Z",
    "updated_at": "2025-09-08T08:02:56Z",
    "comments": 2,
    "user": "llnnnnnn"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 117,
    "title": "How to generate a Mesh mesh?",
    "body": "I need a scene where Gaussian Splatting and Mesh are mixed, and I don't know if GSPLAT generates Mesh or not.",
    "url": "https://github.com/huggingface/gsplat.js/issues/117",
    "state": "open",
    "labels": [],
    "created_at": "2025-08-01T03:29:22Z",
    "updated_at": "2025-08-01T03:29:22Z",
    "user": "ZXStudio"
  },
  {
    "repo": "pytorch/ao",
    "number": 2649,
    "title": "Deprecation for Float8DynamicActivationFloat8WeightConfig (version 1) and Float8WeightOnlyConfig (version 1) and the models",
    "body": "This issue is tracking the deprecation of the (1) configs (2) model checkpoints quantized with these configs.\n\nWhat is deprecated:\n1. We added version 2 config in https://github.com/pytorch/ao/pull/2463, and switched the default version to 2 in https://github.com/pytorch/ao/pull/2650, the version 1 config is now deprecated, please use version 2 config to quantize the model\n2. the quantized checkpoints quantized with version 1 config previously is deprecated as well, and we plan to remove the support to load these checkpoints after pytorch 2.11 release (around 9 months from now)\n\nTimeline:\n0.13.0: annouce deprecation for version 1 config\nafter we migrated all tensor subclasses: remove support for version 1 config\nafter pytorch 2.11 release: remove support for version 1 checkpoints\n",
    "url": "https://github.com/pytorch/ao/issues/2649",
    "state": "open",
    "labels": [
      "tracker"
    ],
    "created_at": "2025-07-31T22:45:07Z",
    "updated_at": "2025-10-02T20:48:54Z",
    "comments": 0,
    "user": "jerryzh168"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1506,
    "title": "Correct MoE auxiliary-loss-free load balancing?",
    "body": "A very small question: why is the second `expert_bias_delta` assignment used here?\n\nhttps://github.com/pytorch/torchtitan/blob/cf30b2902718790cbe91900414c3201b6d7680b0/torchtitan/experiments/llama4/optimizer.py#L39-L43\n\nThis looks different than Algorithm 1 of https://arxiv.org/pdf/2408.15664, which would instead just be (IIUC):\n```py\nexpert_bias_delta = moe.load_balance_coeff * torch.sign(\n    moe.tokens_per_expert.mean() - moe.tokens_per_expert\n)\nmoe.expert_bias.add_(expert_bias_delta)\n```\n\nCC @tianyu-l , who implemented this, I think. ",
    "url": "https://github.com/pytorch/torchtitan/issues/1506",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-31T20:24:47Z",
    "updated_at": "2025-08-01T15:34:42Z",
    "comments": 2,
    "user": "garrett361"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 12038,
    "title": "Dataset structure for train_text_to_image_lora.py",
    "body": "Hello. I am trying to use **train_text_to_image_lora.py** script following the instructions https://github.com/huggingface/diffusers/tree/main/examples/text_to_image\n\nI get errors on data structure and don't know what is the issue on my side.\nI have a folder **data** where I have folder **image** and **csv** file.\n\nC:/Users/XXX//data/\n\n\u251c\u2500\u2500 images/\n\u2502   \u251c\u2500\u2500 image1.jpg\n\u2502   \u251c\u2500\u2500 image2.jpg\n\u2502   \u2514\u2500\u2500 ...\n\u2514\u2500\u2500 captions.csv\n\n**Image** folder contain images and **csv** file contains two columns (image names and captions)\n\nimage, caption\nimage1.jpg, A dragon flying through fire\nimage2.jpg, A knight in shining armor\n\nPlease can you let me know how I should organize my dataset to be able to run the training.\n",
    "url": "https://github.com/huggingface/diffusers/issues/12038",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-31T16:10:38Z",
    "updated_at": "2025-08-01T16:44:48Z",
    "comments": 1,
    "user": "HripsimeS"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1632,
    "title": "Are there plans to support distributed training?",
    "body": "[train.py](https://github.com/huggingface/lerobot/blob/main/src/lerobot/scripts/train.py) currently only supports single-GPU training. Is there a plan to support distributed training in the future?",
    "url": "https://github.com/huggingface/lerobot/issues/1632",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-31T03:31:46Z",
    "updated_at": "2025-10-17T12:10:40Z",
    "user": "Hukongtao"
  },
  {
    "repo": "huggingface/candle",
    "number": 3039,
    "title": "Request support for Qwen2.5-vl or Fast-VLM",
    "body": "I'm trying to call some image-to-text visual models using candle, if anyone knows how to use Qwen2.5-vl or Fast-VLM, can you share it? Appreciate",
    "url": "https://github.com/huggingface/candle/issues/3039",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-31T02:41:33Z",
    "updated_at": "2025-08-04T12:21:35Z",
    "comments": 1,
    "user": "826327700"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39801,
    "title": "ValueError: This model does not support cache_implementation='static'. Please check the following issue: https://github.com/huggingface/transformers/issues/28981",
    "body": "### System Info\n\n_prepare_cache_for_generation\n    raise ValueError(\nValueError: This model does not support cache_implementation='static'. Please check the following issue: https://github.com/huggingface/transformers/issues/28981\n\nI got this error and i have no clue of how to solve it. I tried different implementations from different people and I always have the same problem.\n\nI used this code: https://mer.vin/2024/11/finetune-llama-3-2-vision-radiology-images/\n\n\nimport os\nfrom unsloth import FastVisionModel\nimport torch\nfrom datasets import load_dataset\nfrom transformers import TextStreamer\nfrom unsloth import is_bf16_supported\nfrom unsloth.trainer import UnslothVisionDataCollator\nfrom trl import SFTTrainer, SFTConfig\n\n# 1. Load the model\n\nmodel, tokenizer = FastVisionModel.from_pretrained(\n    \"unsloth/Llama-3.2-11B-Vision-Instruct\",\n    load_in_4bit = True,\n    use_gradient_checkpointing = \"unsloth\",\n)\n\nmodel = FastVisionModel.get_peft_model(\n    model,\n    finetune_vision_layers     = True,\n    finetune_language_layers   = True,\n    finetune_attention_modules = True,\n    finetune_mlp_modules      = True,\n    r = 16,\n    lora_alpha = 16,\n    lora_dropout = 0,\n    bias = \"none\",\n    random_state = 3407,\n    use_rslora = False,\n    loftq_config = None,\n)\n\n# 2. Load the dataset\n\ndataset = load_dataset(\"unsloth/Radiology_mini\", split = \"train\")\ninstruction = \"You are an expert radiographer. Describe accurately what you see in this image.\"\n\ndef convert_to_conversation(sample):\n    conversation = [\n        { \"role\": \"user\",\n          \"content\" : [\n            {\"type\" : \"text\",  \"text\"  : instruction},\n            {\"type\" : \"image\", \"image\" : sample[\"image\"]} ]\n        },\n        { \"role\" : \"assistant\",\n          \"content\" : [\n            {\"type\" : \"text\",  \"text\"  : sample[\"caption\"]} ]\n        },\n    ]\n    return { \"messages\" : conversation }\npass\n\nconverted_dataset = [convert_to_conversation(sample) for sample in dataset]\n\n# 3. Before training\n\nFastVisionModel.for_inference(model)\nimage = dataset[0][\"image\"]\ninstruction = \"You are an expert radiographer. Describe accurately what you see in this image.\"\n\nmessages = [\n    {\"role\": \"user\", \"content\": [\n        {\"type\": \"image\"},\n        {\"type\": \"text\", \"text\": instruction}\n    ]}\n]\ninput_text = tokenizer.apply_chat_template(messages, add_generation_prompt = True)\ninputs = tokenizer(\n    image,\n    input_text,\n    add_special_tokens = False,\n    return_tensors = \"pt\",\n).to(\"cuda\")\n\nprint(\"\\nBefore training:\\n\")\n\ntext_streamer = TextStreamer(tokenizer, skip_prompt = True)\n_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 128,\n                   use_cache = True, temperature = 1.5, min_p = 0.1)\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\npip install unsloth\nexport HF_TOKEN=xxxxxxxxxxxxx\n\n### Expected behavior\n\nStart fine-tuning",
    "url": "https://github.com/huggingface/transformers/issues/39801",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-30T20:59:45Z",
    "updated_at": "2025-09-07T08:02:42Z",
    "comments": 2,
    "user": "jpitalopez"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1631,
    "title": "\ud83e\udd5a Filtering Eggs on Moving Table: Dirt/Breakage Detection Feasibility",
    "body": "Hi \ud83d\udc4b\n\nThanks a lot for your work on lerobot!\n\nI am exploring the use of lerobot to filter eggs based on dirt or breakage while they move past the robot on a conveyor table. The goal is to detect anomalies in real time and eventually eject faulty eggs.\n\nSome specific questions I have:\n\n* Do you have any advice or feedback on using lerobot in this kind of setup?\n* Are there known pros/cons with fast-moving objects and image-based anomaly detection?\n* Would it make sense to multiply robots along the line (e.g., several cameras/models at different angles or points)?\n* Is there support or a best practice for triggering actions (e.g. pneumatic ejection) once a faulty egg is detected?\n\nI am happy to fine-tune a model or adapt an existing one if that\u2019s viable. \n\nAny insights would be super helpful \ud83d\ude4f\n\nThanks again!",
    "url": "https://github.com/huggingface/lerobot/issues/1631",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-30T18:35:12Z",
    "updated_at": "2025-08-12T09:07:41Z",
    "user": "KannarFr"
  },
  {
    "repo": "pytorch/ao",
    "number": 2631,
    "title": "What is the intention of \"NF4WeightOnlyConfig\" ?",
    "body": "Hi guys, I confuse about how this class is structured in project.\n\n1. Why \"NF4WeightOnlyConfig\" does not work the same way like others config?  Such as:\n```python\nfrom torchao.dtypes._nf4tensor_api import NF4WeightOnlyConfig\nfrom torchao import quantize_\nconfig = NF4WeightOnlyConfig()\nquantize_(model,config)\n```\n   I actually can do that, but why you place it in [private module](https://github.com/pytorch/ao/blob/4b119edb6d1e04b7d2cf98856a5366e28f75d6f7/torchao/dtypes/_nf4tensor_api.py#L15) ?\n\n\n2. Why it's not `dataclass` ? So it means the default ` block_size: int = 64` and `scaler_block_size: int = 256` should be fixed ?\n\n3. I want to train QLora with native pytorch model. And it would be great if i can use NF4. But the structure make me confuse, so what is the correct way/ best practice to use this?\n\nThank you.",
    "url": "https://github.com/pytorch/ao/issues/2631",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-30T13:57:44Z",
    "updated_at": "2025-07-31T16:05:50Z",
    "user": "hieubnt235"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2330,
    "title": "Patch Release to support `transformers~=4.53`",
    "body": "### System Info\n\n```shell\noptimum[onnxruntime-gpu]==1.26.1\ntorch==2.7.1\nvllm==0.10.0\n\ndocker run --rm -it --platform linux/amd64 ghcr.io/astral-sh/uv:debian bash\n```\n\n### Who can help?\n\n@JingyaHuang @echarlaix\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nThe latest release is more than 1 month old. It supports `transformers>=4.36,<4.53.0` with `onnxruntime-gpu` extra. This is incompatible with `vllm==0.10.0`, which requires `transformers>=4.53.2`. `vllm==0.10.0` is required to use with `torch==2.7.1`. My system is required to use `torch==2.7.1` due to the medium CVE in previous versions.\nhttps://nvd.nist.gov/vuln/detail/CVE-2025-2953\n\nIn the current main branch, the requirements has been changed to `transformers>=4.36,<4.54.0`, which would mitigate the issue.\n\nIs it possible to create a patch release based on the current main branch?\n\n```bash\n> uv pip compile <(echo \"optimum[onnxruntime-gpu]>=1.23\"; echo \"vllm>=0.10\")\n  x No solution found when resolving dependencies:\n  `-> Because only the following versions of optimum[onnxruntime-gpu] are available:\n          optimum[onnxruntime-gpu]<=1.23.0\n          optimum[onnxruntime-gpu]==1.23.1\n          optimum[onnxruntime-gpu]==1.23.2\n          optimum[onnxruntime-gpu]==1.23.3\n          optimum[onnxruntime-gpu]==1.24.0\n          optimum[onnxruntime-gpu]==1.25.0\n          optimum[onnxruntime-gpu]==1.25.1\n          optimum[onnxruntime-gpu]==1.25.2\n          optimum[onnxruntime-gpu]==1.25.3\n          optimum[onnxruntime-gpu]==1.26.0\n          optimum[onnxruntime-gpu]==1.26.1\n      and optimum[onnxruntime-gpu]>=1.23.0,<=1.23.2 depends on transformers<4.46.0, we can conclude that optimum[onnxruntime-gpu]>=1.23.0,<1.23.1\n      depends on transformers<4.46.0.\n      And because optimum[onnxruntime-gpu]>=1.23.1,<=1.23.2 depends on transformers<4.46.0 and transformers<4.46.0, we can conclude that\n      optimum[onnxruntime-gpu]>=1.23.0,<1.23.3 depends on transformers<4.46.0.\n      And because optimum[onnxruntime-gpu]==1.23.3 depends on transformers<4.47.0 and transformers>=4.36,<4.49.0, we can conclude that\n      optimum[onnxruntime-gpu]>=1.23.0,<1.25.0 depends on transformers<4.49.0.\n      And because optimum[onnxruntime-gpu]>=1.25.0,<=1.25.3 depends on transformers>=4.36,<4.52.0 and transformers>=4.36,<4.52.0, we can conclude that\n      optimum[onnxruntime-gpu]>=1.23.0,<1.25.2 depends on transformers<4.52.0.\n      And because optimum[onnxruntime-gpu]>=1.25.2,<=1.25.3 depends on transformers>=4.36,<4.52.0 and transformers>=4.36,<4.52.0, we can conclude that\n      optimum[onnxruntime-gpu]>=1.23.0,<1.26.0 depends on transformers<4.52.0.\n      And because optimum[onnxruntime-gpu]>=1.26.0 depends on transformers>=4.36,<4.53.0 and transformers>=4.36,<4.53.0, we can conclude that\n      optimum[onnxruntime-gpu]>=1.23.0 depends on transformers<4.53.0.\n      And because vllm==0.10.0 depends on transformers>=4.53.2 and only vllm<=0.10.0 is available, we can conclude that vllm>=0.10.0 and\n      optimum[onnxruntime-gpu]>=1.23.0 are incompatible.\n      And because you require optimum[onnxruntime-gpu]>=1.23 and vllm>=0.10.0, we can conclude that your requirements are unsatisfiable.\n```\n\n### Expected behavior\n\nAble to install `optimum[onnxruntime-gpu]>=1.26` and `vllm>=0.10.0`.\n```bash\n> uv pip compile <(echo \"optimum[onnxruntime-gpu] @ git+https://github.com/huggingface/optimum@689c0b5d38aabe265ab1eb334a6ca5bc3ca3574d\"; echo \"vllm>=0.10\")\nResolved 152 packages in 359ms\n# This file was autogenerated by uv via the following command:\n#    uv pip compile /dev/fd/63\naiohappyeyeballs==2.6.1\n    # via aiohttp\naiohttp==3.12.15\n    # via\n    #   fsspec\n    #   vllm\naiosignal==1.4.0\n    # via aiohttp\nannotated-types==0.7.0\n    # via pydantic\nanyio==4.9.0\n    # via\n    #   httpx\n    #   openai\n    #   starlette\n    #   watchfiles\nastor==0.8.1\n    # via depyf\nattrs==25.3.0\n    # via\n    #   aiohttp\n    #   jsonschema\n    #   referencing\nblake3==1.0.5\n    # via vllm\ncachetools==6.1.0\n    # via vllm\ncbor2==5.6.5\n    # via vllm\ncertifi==2025.7.14\n    # via\n    #   httpcore\n    #   httpx\n    #   requests\n    #   sentry-sdk\ncffi==1.17.1\n    # via soundfile\ncharset-normalizer==3.4.2\n    # via requests\nclick==8.2.1\n    # via\n    #   ray\n    #   rich-toolkit\n    #   typer\n    #   uvicorn\ncloudpickle==3.1.1\n    # via vllm\ncoloredlogs==15.0.1\n    # via onnxruntime-gpu\ncompressed-tensors==0.10.2\n    # via vllm\ncupy-cuda12x==13.5.1\n    # via ray\ndatasets==4.0.0\n    # via optimum\ndepyf==0.19.0\n    # via vllm\ndill==0.3.8\n    # via\n    #   datasets\n    #   depyf\n    #   multiprocess\ndiskcache==5.6.3\n    # via vllm\ndistro==1.9.0\n    # via openai\ndnspython==2.7.0\n    # via email-validator\neinops==0.8.1\n    # via vllm\nemail-validator==2.2.0\n    # via\n    #   fastapi\n    #   pydantic",
    "url": "https://github.com/huggingface/optimum/issues/2330",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-30T02:40:41Z",
    "updated_at": "2025-07-31T02:54:31Z",
    "comments": 1,
    "user": "yxtay"
  },
  {
    "repo": "pytorch/xla",
    "number": 9519,
    "title": "Behaviour of xm.all_gather() in SPMD mode",
    "body": "## \u2753 Questions and Help\nI would like to confirm whether my MLIR compiler's handling of `xm.all_gather()` when running Torch-XLA in SPMD mode is correct.\n\nSay I have the following:\n- A tensor `t` with shape [8192, 784]\n- A 2D named mesh `(batch, model)` of 8 devices in a [2, 4] configuration:\n```\nDevice Mesh:\n0 1 2 3\n4 5 6 7\n```\nNow I do the following steps:\n1. Move the tensor to the XLA device: `t = t.to(torch_xla.device())`\n2. Shard dim 0 of t across the batch dimension and replicate dim 1: `xs.mark_sharding(t, mesh, (\"batch\", None))`\n3. Perform an all-gather operation across dim 0:\n```python\n# Pair devices across batch rows\ngroups = [[0, 4], [1, 5], [2, 6], [3, 7]]\ny = xm.all_gather(t, 0, groups=groups, pin_layout=False)\ny = y.to(\"cpu\")\n```\nThe shape of the final `y` tensor is [16384, 784] where `y[:8192] == y[8192:] == t`. Is this the correct behaviour?",
    "url": "https://github.com/pytorch/xla/issues/9519",
    "state": "open",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2025-07-29T19:05:08Z",
    "updated_at": "2025-07-30T17:40:04Z",
    "user": "hshahTT"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1622,
    "title": "Why is LeRobot\u2019s policy ignoring additional camera streams despite custom `input_features`?",
    "body": "I'm training a SO101 arm policy with 3 video streams (`front`, `above`, `gripper`) and a state vector. The dataset can be found at this [link](https://huggingface.co/datasets/aaron-ser/SO101-Dataset/tree/main). \n\nI created a custom JSON config (the `train_config.json` below) that explicitly lists the three visual streams under `policy.input_features`, and despite disabling the preset config loading with `\"use_policy_training_preset\": false`, the policy never takes into account any feed that isn't the front observations. Disabling the preset however is not mandatory as previous hackathons with multiple streams such as the [following](https://huggingface.co/LeRobot-worldwide-hackathon/91-AM-PM-smolvla-pouring-liquid/blob/main/train_config.json) used the preset config. \n\nI pass into `lerobot.scripts.train` the `train_config.json` file shared below with the `--config_path` parameter. Although the initial printout of the config is correct with all three streams, after training finishes, the saved `train_config.json` file inside `aaron-ser/SO101-Model` only contains:\n\n**aaron-ser/SO101-Model train_config.json snippet**\n```\n\"input_features\": {\n            \"observation.state\": { ... },\n            \"observation.images.front\": { ... },\n\"output_features\": { ... }\n```\n\nDropping the `above` and `gripper` streams although the HF dataset includes all three streams and I explicitly passed them in the JSON file. \n\nWhat internal step or configuration is overriding my custom `input_features` and keeping only the front camera? How can I ensure LeRobot trains on all provided video streams?\n\n**train_config.json**\n```\n{\n    \"dataset\": {\n        \"repo_id\": \"aaron-ser/SO101-Dataset\",\n        \"root\": null,\n        \"episodes\": null,\n        \"image_transforms\": {\n            \"enable\": false,\n            \"max_num_transforms\": 3,\n            \"random_order\": false,\n            \"tfs\": {\n                \"brightness\": {\n                    \"weight\": 1.0,\n                    \"type\": \"ColorJitter\",\n                    \"kwargs\": {\n                        \"brightness\": [\n                            0.8,\n                            1.2\n                        ]\n                    }\n                },\n                \"contrast\": {\n                    \"weight\": 1.0,\n                    \"type\": \"ColorJitter\",\n                    \"kwargs\": {\n                        \"contrast\": [\n                            0.8,\n                            1.2\n                        ]\n                    }\n                },\n                \"saturation\": {\n                    \"weight\": 1.0,\n                    \"type\": \"ColorJitter\",\n                    \"kwargs\": {\n                        \"saturation\": [\n                            0.5,\n                            1.5\n                        ]\n                    }\n                },\n                \"hue\": {\n                    \"weight\": 1.0,\n                    \"type\": \"ColorJitter\",\n                    \"kwargs\": {\n                        \"hue\": [\n                            -0.05,\n                            0.05\n                        ]\n                    }\n                },\n                \"sharpness\": {\n                    \"weight\": 1.0,\n                    \"type\": \"SharpnessJitter\",\n                    \"kwargs\": {\n                        \"sharpness\": [\n                            0.5,\n                            1.5\n                        ]\n                    }\n                }\n            }\n        },\n        \"revision\": null,\n        \"use_imagenet_stats\": true,\n        \"video_backend\": \"torchcodec\"\n    },\n    \"env\": null,\n    \"policy\": {\n        \"type\": \"act\",\n        \"n_obs_steps\": 1,\n        \"normalization_mapping\": {\n            \"VISUAL\": \"MEAN_STD\",\n            \"STATE\": \"MEAN_STD\",\n            \"ACTION\": \"MEAN_STD\"\n        },\n        \"input_features\": {\n            \"observation.state\": {\n                \"type\": \"STATE\",\n                \"shape\": [\n                    6\n                ]\n            },\n            \"observation.images.front\": {\n                \"type\": \"VISUAL\",\n                \"shape\": [\n                    3,\n                    720,\n                    1280\n                ]\n            },\n            \"observation.images.above\": {\n                \"type\": \"VISUAL\",\n                \"shape\": [\n                    3,\n                    720,\n                    1280\n                ]\n            },\n            \"observation.images.gripper\": {\n                \"type\": \"VISUAL\",\n                \"shape\": [\n                    3,\n                    720,\n                    1280\n                ]\n            }\n        },\n        \"output_features\": {\n            \"action\": {\n                \"type\": \"ACTION\",\n                \"shape\": [\n                    6\n                ]\n            }\n        },\n        \"device\": \"cuda\",\n        \"use_amp\": false,\n        \"push_to_hub\": true,\n        \"repo_id\": \"aaron-ser/SO101-Model\",\n        \"private\": null,\n        \"tags\": null,\n        \"license\": null,\n   ",
    "url": "https://github.com/huggingface/lerobot/issues/1622",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-29T14:07:14Z",
    "updated_at": "2025-09-23T14:01:54Z",
    "user": "Aaron-Serpilin"
  },
  {
    "repo": "huggingface/trl",
    "number": 3797,
    "title": "How to view the training parameters after training is completed",
    "body": "How to view the training parameters after training is completed\uff1fI am using GRPOTrainer for training, but after training multiple times, I have forgotten the parameters I set. How can I view the saved training parameters?",
    "url": "https://github.com/huggingface/trl/issues/3797",
    "state": "open",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-07-29T09:42:52Z",
    "updated_at": "2025-07-29T13:07:50Z",
    "user": "Tuziking"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2329,
    "title": "Support for exporting paligemma to onnx",
    "body": "### Feature request\n\nI\u2019ve tried to export google/paligemma-3b-mix-224 to onnx using optimum. But it outputs: \"ValueError: Trying to export a paligemma model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as custom_onnx_configs. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an \nissue at https://github.com/huggingface/optimum/issues if you would like the model type paligemma to be supported natively in the ONNX export.\"\n\n### Motivation\n\nI\u2019ve tried everything but nothing works =(\n(Using custom configs, using torch.onnx.export, etc)\n\n### Your contribution\n\nActually, it seems to me that I can\u2019t help\u2026 =(",
    "url": "https://github.com/huggingface/optimum/issues/2329",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2025-07-29T08:58:41Z",
    "updated_at": "2025-09-06T02:04:25Z",
    "comments": 2,
    "user": "DashaMed555"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1482,
    "title": "Is there  documentation on what exactly are 'dp_shard_mod_ep' and  'dp_shard_in_ep'] ?",
    "body": "Wondering  where I can find detail on  'dp_shard_mod_ep', 'dp_shard_in_ep'] ? \nhttps://github.com/pytorch/torchtitan/blob/5bab356c29dfababd8f16ab7d8e3d50cba6326e5/torchtitan/distributed/parallel_dims.py#L70\n",
    "url": "https://github.com/pytorch/torchtitan/issues/1482",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-07-29T06:48:43Z",
    "updated_at": "2025-08-21T03:24:48Z",
    "user": "githubsgi"
  },
  {
    "repo": "pytorch/helion",
    "number": 392,
    "title": "ImportError: cannot import name 'triton_key' from 'torch._inductor.runtime.triton_compat'",
    "body": "Does Helion require nightly PyTorch? (I'm using 2.7.1)",
    "url": "https://github.com/pytorch/helion/issues/392",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-07-29T04:34:20Z",
    "updated_at": "2025-08-25T21:20:54Z",
    "user": "HanGuo97"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39744,
    "title": "_supports_static_cache disappear",
    "body": "### System Info\n\ntransformers main branch\n\n### Who can help?\n\n@ArthurZucker \n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nI see the attr `_supports_static_cache` disappeared in the model. I used to check if `model._supports_static_cache` before setting `cache_implementation=True`. For now, can I assume all models support static cache?\n\n### Expected behavior\n\nAll models support static cache as `_supports_static_cache` is deprecated. Or do we have other method to check if the model support static cache?",
    "url": "https://github.com/huggingface/transformers/issues/39744",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-29T02:36:04Z",
    "updated_at": "2025-07-29T08:17:00Z",
    "comments": 4,
    "user": "jiqing-feng"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1478,
    "title": "Is FSDP+TP+EP supported for Llama4 ?",
    "body": "Wondering if FSDP+TP+EP  is supported for pre-training LLama4 ? ",
    "url": "https://github.com/pytorch/torchtitan/issues/1478",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-07-28T22:55:43Z",
    "updated_at": "2025-08-21T02:36:59Z",
    "user": "githubsgi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 159295,
    "title": "Invalid onnx model is exported for model where data is assigned using a mask and index",
    "body": "### \ud83d\udc1b Describe the bug\n\nExporting a model to onnx which assigns data with a mask and index produces a model which does not work.\n\nExporting the model:\n```python\nimport torch\nimport torch.nn as nn\n\n\nclass TestModel(nn.Module):\n    def __init__(self):\n        super().__init__()\n\n    def forward(self, R):\n        B = R.shape[0]\n        r = torch.zeros((B, 2), dtype=R.dtype, device=R.device)\n        mask = R > 0\n        r[mask, 0] = R[mask]\n        return r\n\n\ndevice = torch.device(\"cpu\")\nmodel = TestModel()\n\ndummy_input = torch.ones((2,)).to(device)\n\ntorch.onnx.export(\n    model,\n    dummy_input,\n    \"test_model.onnx\",\n    export_params=True,\n    opset_version=11,\n    do_constant_folding=True,\n    input_names=['input'],\n    output_names=['output'],\n)\n```\n\nUsing the model:\n```python\nimport onnxruntime as ort\nimport numpy as np\n\nwith open(\"test_model.onnx\", \"rb\") as f:\n      session = ort.InferenceSession(f.read(), providers=[\"CPUExecutionProvider\"])\n_ = session.run(None, {\"input\": np.array([0, 1], dtype=np.float32)})\n```\nYou will get an error\n```\n2025-07-28 15:31:24.7808412 [E:onnxruntime:, sequential_executor.cc:572 onnxruntime::ExecuteKernel] Non-zero status code returned while running Reshape node. Name:'/Reshape' Status Message: D:\\a\\_work\\1\\s\\onnxruntime\\core\\providers\\cpu\\tensor\\reshape_helper.h:47 onnxruntime::ReshapeHelper::ReshapeHelper input_shape_size == size was false. The input tensor cannot be reshaped to the requested shape. Input shape:{1}, requested shape:{2,1}\n```\n\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.7.1+cpu\nIs debug build: False\nCUDA used to build PyTorch: Could not collect\nROCM used to build PyTorch: N/A\n\nOS: Microsoft Windows 11 Enterprise (10.0.22631 64-bit)\nGCC version: Could not collect\nClang version: Could not collect\nCMake version: version 3.30.2\nLibc version: N/A\n\nPython version: 3.12.5 (tags/v3.12.5:ff3bc82, Aug  6 2024, 20:45:27) [MSC v.1940 64 bit (AMD64)] (64-bit runtime)\nPython platform: Windows-11-10.0.22631-SP0\nIs CUDA available: False\nCUDA runtime version: 12.9.86\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 3070\nNvidia driver version: 576.88\ncuDNN version: C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.9\\bin\\cudnn_ops64_9.dll\nIs XPU available: False\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nName: Intel(R) Xeon(R) W-2255 CPU @ 3.70GHz\nManufacturer: GenuineIntel\nFamily: 179\nArchitecture: 9\nProcessorType: 3\nDeviceID: CPU0\nCurrentClockSpeed: 3696\nMaxClockSpeed: 3696\nL2CacheSize: 10240\nL2CacheSpeed: None\nRevision: 21767\n\nVersions of relevant libraries:\n[pip3] numpy==1.26.4\n[pip3] onnx==1.16.2\n[pip3] onnxruntime==1.22.1\n[pip3] torch==2.7.1\n[pip3] torchaudio==2.6.0+cu126\n[pip3] torchvision==0.21.0+cu126\n\ncc @justinchuby",
    "url": "https://github.com/pytorch/pytorch/issues/159295",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2025-07-28T20:54:13Z",
    "updated_at": "2025-09-03T20:13:32Z",
    "user": "cgaudreau-ubisoft"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3722,
    "title": "\u2753 [Question] Exporting models using FlashAttention package",
    "body": "I'd love to export a PyTorch model to TensorRT. In this model I use flash-attn package to speed-up attention. Is this supported? ",
    "url": "https://github.com/pytorch/TensorRT/issues/3722",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-07-28T11:54:07Z",
    "updated_at": "2025-07-28T17:42:23Z",
    "user": "s1ddok"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 159249,
    "title": "[ONNX] How to export RMS Norm",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI'm converting a Pytorch model to ONNX format, but I got this error:\n```\ntorch.onnx.errors.UnsupportedOperatorError: Exporting the operator 'aten::rms_norm' to ONNX opset version 20 is not supported\n```\n\n### Alternatives\n\nI have read the ONNX documentation. They said that this operator is only supported by the opset version >= 23\n\n### Additional context\n\n_No response_\n\ncc @justinchuby",
    "url": "https://github.com/pytorch/pytorch/issues/159249",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2025-07-28T09:34:51Z",
    "updated_at": "2025-07-30T14:22:46Z",
    "user": "HuynhNguyenPhuc"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1607,
    "title": "how to control a so-101 with trained ACT model?",
    "body": "https://huggingface.co/initie/test_pick_result   \nThis is my pre-trained model for grabbing the switch on the desk by ACT model.\nHow to run this policy model on the Anaconda?\nAlready by way of example, \n\npython -m lerobot.record --robot.type=so101_follower \n--robot.port=COM3 \n--robot.id=ammd_follower_arm \n--robot.cameras=\"{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}, side: {type: opencv, index_or_path: 1, width: 640, height: 480, fps: 30} }\" \n--display_data=True \n--dataset.repo_id=\"initie/eval_test_pick\" \n--dataset.single_task=\"Grab the switch\" \n--policy.path=initie/test_pick_result \n--teleop.type=so101_leader --teleop.port=COM5 \n--teleop.id=ammd_leader_arm --dataset.reset_time_s=5\n\nThis is the example code from Lerobot tutorial, but when i run these codes, I had to record 10 episodes again.\nI just wanna run a pre-trained model, not record an episode again. I'm curious about a simple code that only \"runs\" that model not including recording",
    "url": "https://github.com/huggingface/lerobot/issues/1607",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-28T05:23:24Z",
    "updated_at": "2025-10-15T03:28:50Z",
    "user": "initia1013"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1602,
    "title": "How to perform multi-GPU training for SMoVLA?",
    "body": "I noticed that the paper used 4 GPUs for pretraining, but the current training code doesn\u2019t seem to support it. Could you provide the corresponding code?",
    "url": "https://github.com/huggingface/lerobot/issues/1602",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-27T09:46:04Z",
    "updated_at": "2025-07-28T08:40:01Z",
    "user": "QZepHyr"
  },
  {
    "repo": "huggingface/hmtl",
    "number": 72,
    "title": "How to create a website ",
    "body": "",
    "url": "https://github.com/huggingface/hmtl/issues/72",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-27T09:30:22Z",
    "updated_at": "2025-07-27T09:30:22Z",
    "user": "Chi23-ike"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 3304,
    "title": "using trtllm-build instead of optimum-nvidia for engine building or optimum-nvidia wrong version ?",
    "body": "\nHello,\n\nI'm experiencing significant issues when trying to use Text Generation Inference (TGI) with TensorRT-LLM as the backend.\n\n**Problem 1: Version Compatibility**\nI cannot use the latest version of TGI due to a known bug (see: https://github.com/huggingface/text-generation-inference/issues/3296).\n\nI'm therefore using version: `ghcr.io/huggingface/text-generation-inference:3.3.4-trtllm`\n\nHowever, this version uses TensorRT-LLM v0.17.0.post1, while the latest optimum-nvidia version ([[v0.1.0b9](https://github.com/huggingface/optimum-nvidia/releases/tag/v0.1.0b9)]) uses TensorRT-LLM 0.16.0.\n\nWhen I try to launch TGI with my engine built using optimum-nvidia, I get the following error:\n```\nroot@5ddf177112d7:/usr/local/tgi/bin# /usr/local/tgi/bin/text-generation-launcher --model-id \"/engines/llama-3.2-3b-instruct-optimum/GPU/engines\" --tokenizer-name \"/models/llama-3.2-3b-instruct\" --executor-worker \"/usr/local/tgi/bin/executorWorker\"\n2025-07-27T06:16:40.717109Z  INFO text_generation_backends_trtllm: backends/trtllm/src/main.rs:293: Successfully retrieved tokenizer /models/llama-3.2-3b-instruct\n[2025-07-27 06:16:40.717] [info] [ffi.hpp:164] Initializing TGI - TensoRT-LLM Backend (v0.17.0.post1)\n[2025-07-27 06:16:40.747] [info] [ffi.hpp:173] [FFI] Detected 1 Nvidia GPU(s)\n[2025-07-27 06:16:40.758] [info] [backend.cpp:22] Detected single engine deployment, using leader mode\n[TensorRT-LLM][INFO] Engine version 0.16.0 found in the config file, assuming engine(s) built by new builder API.\n[TensorRT-LLM][INFO] Initializing MPI with thread mode 3\n[TensorRT-LLM][INFO] Initialized MPI\n[TensorRT-LLM][INFO] Refreshed the MPI local session\n[TensorRT-LLM][INFO] MPI size: 1, MPI local size: 1, rank: 0\n[TensorRT-LLM][INFO] Rank 0 is using GPU 0\n[TensorRT-LLM][INFO] TRTGptModel maxNumSequences: 64\n[TensorRT-LLM][INFO] TRTGptModel maxBatchSize: 64\n[TensorRT-LLM][INFO] TRTGptModel maxBeamWidth: 1\n[TensorRT-LLM][INFO] TRTGptModel maxSequenceLen: 4096\n[TensorRT-LLM][INFO] TRTGptModel maxDraftLen: 0\n[TensorRT-LLM][INFO] TRTGptModel mMaxAttentionWindowSize: (4096) * 28\n[TensorRT-LLM][INFO] TRTGptModel enableTrtOverlap: 0\n[TensorRT-LLM][INFO] TRTGptModel normalizeLogProbs: 1\n[TensorRT-LLM][INFO] TRTGptModel maxNumTokens: 262144\n[TensorRT-LLM][INFO] TRTGptModel maxInputLen: 4095  = maxSequenceLen - 1 since chunked context is enabled\n[TensorRT-LLM][INFO] TRTGptModel If model type is encoder, maxInputLen would be reset in trtEncoderModel to maxInputLen: 4096 = maxSequenceLen.\n[TensorRT-LLM][INFO] Capacity Scheduler Policy: MAX_UTILIZATION\n[TensorRT-LLM][INFO] Context Chunking Scheduler Policy: None\n[TensorRT-LLM][INFO] Loaded engine size: 6981 MiB\n[TensorRT-LLM][ERROR] IRuntime::deserializeCudaEngine: Error Code 6: API Usage Error (The engine plan file is not compatible with this version of TensorRT, expecting library version 10.8.0.43 got\n..)\nError: Runtime(\"[TensorRT-LLM][ERROR] Assertion failed: Failed to deserialize cuda engine. (/usr/src/text-generation-inference/target/release/build/text-generation-backends-trtllm-479f10d4b58ebb37/out/build/_deps/trtllm-src/cpp/tensorrt_llm/runtime/tllmRuntime.cpp:239)\")\n```\n\n**Problem 2: Building Engine with trtllm-build**\nI attempted to build my engine directly using `trtllm-build`, but when launching TGI, I encounter this error:\n\n```\n2025-07-27T06:15:55.033318Z  INFO text_generation_backends_trtllm: backends/trtllm/src/main.rs:293: Successfully retrieved tokenizer /models/llama-3.2-3b-instruct\n[2025-07-27 06:15:55.034] [info] [ffi.hpp:164] Initializing TGI - TensoRT-LLM Backend (v0.17.0.post1)\n[2025-07-27 06:15:55.101] [info] [ffi.hpp:173] [FFI] Detected 1 Nvidia GPU(s)\nterminate called after throwing an instance of 'nlohmann::json_abi_v3_11_3::detail::parse_error'\n  what():  [json.exception.parse_error.101] parse error at line 1, column 1: attempting to parse an empty input; check that your input string or stream contains the expected JSON\n```\n\nThe error suggests it cannot find a JSON file, but the `config.json` file is present in the engine directory:\n\n```bash\nroot@5ddf177112d7:/usr/local/tgi/bin# ls -l /engines/llama-3.2-3b-instruct/\ntotal 3033324\n-rw-r--r-- 1 root root       7848 Jul 26 17:21 config.json\n-rw-r--r-- 1 root root 3106108276 Jul 26 17:21 rank0.engine\n```\n\n**Environment:**\n- Model: llama-3.2-3b-instruct\n- TGI Version: 3.3.4-trtllm\n- TensorRT-LLM Version: v0.17.0.post1\n\nCould you please help resolve these compatibility issues or provide guidance on the correct workflow for using TensorRT-LLM with TGI?\n\n### Information\n\n- [x] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [x] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\n**1/ Build your engine :** \n`docker run   --rm   -it   --gpus=1   --shm-size=1g   -v \"/home/jyce/unmute.mcp/volumes/llm-tgi/engines:/engines\" -v \"/home/jyce/unmute.mcp/volumes/llm-tgi/models:/models\"  huggingface/optimum-nvidia:v0.1.0b8-py310     bash\n`\n```\n optimum-cli export trtllm \\\n    --tp=1 \\\n    --pp=1 \\\n    --max-batch-size",
    "url": "https://github.com/huggingface/text-generation-inference/issues/3304",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-27T06:24:29Z",
    "updated_at": "2025-10-06T09:56:29Z",
    "comments": 4,
    "user": "psykokwak-com"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39705,
    "title": "[i18n-<bn>] Translating docs to <Bengali>",
    "body": "<!--\nNote: Please search to see if an issue already exists for the language you are trying to translate.\n-->\n\nHi!\n\nLet's bring the documentation to all the Bengali-speaking community \ud83c\udf10 (currently 0 out of 267 complete)\n\nWho would want to translate? Please follow the \ud83e\udd17 [TRANSLATING guide](https://github.com/huggingface/transformers/blob/main/docs/TRANSLATING.md). Here is a list of the files ready for translation. Let us know in this issue if you'd like to translate any, and we'll add your name to the list.\n\nSome notes:\n\n* Please translate using an informal tone (imagine you are talking with a friend about transformers \ud83e\udd17).\n* Please translate in a gender-neutral way.\n* Add your translations to the folder called `<languageCode>` inside the [source folder](https://github.com/huggingface/transformers/tree/main/docs/source).\n* Register your translation in `<languageCode>/_toctree.yml`; please follow the order of the [English version](https://github.com/huggingface/transformers/blob/main/docs/source/en/_toctree.yml).\n* Once you're finished, open a pull request and tag this issue by including #issue-number in the description, where issue-number is the number of this issue. Please ping @stevhliu for review.\n* \ud83d\ude4b If you'd like others to help you with the translation, you can also post in the \ud83e\udd17 [forums](https://discuss.huggingface.co/).\n\n## Get Started section\n\n- [x] [index.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/index.md) https://github.com/huggingface/transformers/pull/20180\n- [ ] [quicktour.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/quicktour.md) (waiting for initial PR to go through)\n- [ ] [installation.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/installation.md).\n\n## Tutorial section\n- [ ] [pipeline_tutorial.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/pipeline_tutorial.md)\n- [ ]  [autoclass_tutorial.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/autoclass_tutorial.md)\n- [ ]  [preprocessing.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/preprocessing.md)\n- [ ]  [training.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/training.md)\n- [ ]  [accelerate.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/accelerate.md)\n- [ ]  [model_sharing.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/model_sharing.md)\n- [ ]  [multilingual.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/multilingual.md)\n\n<!--\nKeep on adding more as you go \ud83d\udd25\n-->\n",
    "url": "https://github.com/huggingface/transformers/issues/39705",
    "state": "open",
    "labels": [
      "WIP"
    ],
    "created_at": "2025-07-27T06:18:20Z",
    "updated_at": "2025-07-27T11:58:32Z",
    "comments": 1,
    "user": "ankitdutta428"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39699,
    "title": "No flag to support Conditional Parameter Loading for gemma-3n-E2B models in transformer",
    "body": "### System Info\n\nHi,\nWhile a lot has been mentioned about gemma-3n-E2B and gemma-3n-E4B about the COnditional parameter loading and reduced memory loading\nThere is no configuration currently visible in transformers for supporting that.\nIs it possible to get the related configuration/code/documentation to make it work to get an actual lower memory model?\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nimport torch\nfrom transformers import AutoProcessor, AutoModelForImageTextToText\n\nGEMMA_MODEL_ID = \"google/gemma-3n-E2B-it\"\n\nprint(\"Loading processor\")\nprocessor = AutoProcessor.from_pretrained(GEMMA_MODEL_ID)\n\nprint(\"Loadind model\")\nmodel = AutoModelForImageTextToText.from_pretrained(\n            GEMMA_MODEL_ID, torch_dtype=\"auto\", device_map=None).to(\"cpu\")\n\nThere is no flag for doing Conditional parameter Loading or PLE\n\n### Expected behavior\n\nSome flag using which Conditional Parameter Loading can be enabled and save on the memory",
    "url": "https://github.com/huggingface/transformers/issues/39699",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-26T18:08:00Z",
    "updated_at": "2025-09-03T08:02:58Z",
    "comments": 2,
    "user": "aakashgaur01"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1835,
    "title": "Can you provide binary releases?",
    "body": "It seems that binaries are not available in recent versions. \ntokenizers module is essential for the latest models, and it would be preferable if it could be easily installed. \nSetting up a Rust compilation environment can be cumbersome, and it's almost impossible to do so offline. \nCould we possibly distribute something in binary form via PyPI or here?",
    "url": "https://github.com/huggingface/tokenizers/issues/1835",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-26T16:07:12Z",
    "updated_at": "2025-09-08T13:49:52Z",
    "comments": 4,
    "user": "goldenmomonga"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1599,
    "title": "Evaluation results of VLA models on MetaWorld Benchmark",
    "body": "Thank you for this excellent work! I noticed that the paper mentions evaluation results of VLA models on MetaWorld. However, in the original papers for Octo and \u03c0\u2080, results are only reported on the LIBERO benchmark, and I haven\u2019t found their MetaWorld evaluations in other related studies. I\u2019d like to know how Octo and \u03c0\u2080 were specifically evaluated on MetaWorld in this work, including implementation details (e.g., for \u03c0\u2080, was it full finetune or only fine-tuning the action expert?). Additionally, the MetaWorld MT50 dataset on LeRobot appears to lack data for one task\u2014is this the real data used for fine-tuning VLAs?",
    "url": "https://github.com/huggingface/lerobot/issues/1599",
    "state": "open",
    "labels": [
      "enhancement",
      "question",
      "policies",
      "simulation"
    ],
    "created_at": "2025-07-26T11:18:54Z",
    "updated_at": "2025-08-12T09:17:44Z",
    "user": "Zooy138"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39686,
    "title": "CRITICAL ISSUE REPORT! GEMMA 3 1B CANNOT RUN!",
    "body": "How to reproduce:\n\nRun this:\n\n```\nimport torch\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\n# Load the base model in FP16\nbase_model = AutoModelForCausalLM.from_pretrained(\n    \"unsloth/gemma-3-1b-pt\",\n    low_cpu_mem_usage=True,\n    return_dict=True,\n    torch_dtype=torch.float16,\n    device_map=\"mps\",\n)\n\n# Load and configure the tokenizer\ntokenizer = AutoTokenizer.from_pretrained(\"unsloth/gemma-3-1b-pt\", trust_remote_code=True)\n\n# Generate the text\nprompt = \"<bos>Once upon a time\"\ninputs = tokenizer(prompt, return_tensors=\"pt\").to(base_model.device)\noutputs = base_model.generate(inputs.input_ids, max_length=50)\n# Decode the generated text\ngenerated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)\nprint(generated_text)\n```\n\nError:\n\n```\n(yuna) yuki@yuki AI % python gener.py\n  k_out_updated = k_out_shifted.index_copy(2, update_position, key_states)\nTraceback (most recent call last):\n  File \"/Users/yuki/Documents/AI/gener.py\", line 19, in <module>\n    outputs = base_model.generate(inputs.input_ids, max_length=50)\n  File \"/opt/anaconda3/envs/yuna/lib/python3.10/site-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n    return func(*args, **kwargs)\n  File \"/opt/anaconda3/envs/yuna/lib/python3.10/site-packages/transformers/generation/utils.py\", line 2623, in generate\n    result = self._sample(\n  File \"/opt/anaconda3/envs/yuna/lib/python3.10/site-packages/transformers/generation/utils.py\", line 3649, in _sample\n    next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1)\nRuntimeError: probability tensor contains either `inf`, `nan` or element < 0\n```\n\nSystem: macOS Tahoe, MacBook Pro M1 with 16 GB of RAM",
    "url": "https://github.com/huggingface/transformers/issues/39686",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-26T00:22:27Z",
    "updated_at": "2025-07-28T12:07:50Z",
    "comments": 5,
    "user": "yukiarimo"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1592,
    "title": "Time spent on imitation learning training (ACT)",
    "body": "I use colab to make a policy with ACT model.\nThe note said, \"Training with the ACT policy for 100,000 steps typically takes about 1.5 hours on an NVIDIA A100 GPU,\", and I used A100 model in colab too.\nHowever the expected time is 13 hours, which seems to be much longer than the standard value of 1.5 hours. \nIs it correct that it takes this much time in a colab environment? \nI used dataset from \nhttps://huggingface.co/datasets/initie/test_pick \nand there is no problem with the operation of the training code.",
    "url": "https://github.com/huggingface/lerobot/issues/1592",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-25T06:36:35Z",
    "updated_at": "2025-10-08T08:32:32Z",
    "user": "initia1013"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7699,
    "title": "Broken link in documentation for \"Create a video dataset\"",
    "body": "The link to \"the [WebDataset documentation](https://webdataset.github.io/webdataset).\" is broken. \nhttps://huggingface.co/docs/datasets/main/en/video_dataset#webdataset \n\n<img width=\"2048\" height=\"264\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/975dd10c-aad8-42fc-9fbc-de0e2747a326\" />",
    "url": "https://github.com/huggingface/datasets/issues/7699",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-24T19:46:28Z",
    "updated_at": "2025-07-25T15:27:47Z",
    "comments": 1,
    "user": "cleong110"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39637,
    "title": "[BUG] Run 111B+ Teacher distributed inference and 8B Student distributed training on multi-node H200 GPUs using the Transformers Trainer without encountering OOM errors?",
    "body": "Hello, first off, apologies if this information is already available elsewhere. I've searched through the documentation and existing issues but haven't found a clear answer to my question.\n\nI have access to 2 to 4 nodes (16 to 32 GPUs in total), each equipped with 8x140GB H200 GPUs. My objective is to perform large-scale distributed inference using a massive 111B-parameter Teacher model (CohereLabs/c4ai-command-a-03-2025) and simultaneously conduct online knowledge distillation (soft-logit based) from this 111B Teacher model to a smaller 8B Student model (CohereLabs/c4ai-command-r7b-12-2024).\n\nIs there a way to simultaneously run distributed inference for Teacher models larger than 111B and distributed training for Student models in a multi-node setup, utilizing Hugging Face Transformers' Trainer?\n\nThe Transformers version I'm using is v4.51.3. I've observed the use of model = deepspeed.tp_model_init within the def deepspeed_init function in src/transformers/integrations/deepspeed.py. I attempted to apply this code, but it resulted in a torch.distributed.DistBackendError.\n\nI would be very grateful if someone could explain what would be most suitable for my use case. A minimal working example would be the icing on the cake. Surely, if the Open LLM Leaderboard shows that online knowledge distillation (soft-logit) is possible with large models exceeding 111B, there must be a straightforward way to achieve what I want, but I'm unsure how everyone else does it.\n\nFor reference, below is the script I'm currently working with:\n\n`deepspeed --num_nodes 2 --num_gpus 8 \\\n  --hostfile $HOSTFILE \\\n  --master_addr $MASTER_ADDR \\\n  --master_port=62535 \\\n  train.py \\\n  --teacher CohereLabs/c4ai-command-a-03-2025 \\\n  --student CohereLabs/c4ai-command-r7b-12-2024 \\\n  --epochs 1 --batch_size 1 --seq_len 4096 --temperature 1.0 --max_samples 150 --lr 1e-6 2>&1 | tee -a \"./train.log\" `\n\n```import deepspeed\nimport torch.distributed as dist\nimport os, math, argparse, warnings, torch, random, multiprocessing as mp\nfrom datasets import load_dataset, concatenate_datasets\nfrom transformers import (AutoTokenizer, AutoModelForCausalLM,\n                          PreTrainedTokenizerBase)\nfrom torch.nn.utils.rnn import pad_sequence\nimport torch.nn.functional as F\nfrom datetime import timedelta\nfrom deepspeed.runtime.utils import see_memory_usage\n\n\nos.environ[\"TOKENIZERS_PARALLELISM\"] = \"false\"\nos.environ.setdefault(\"NCCL_ASYNC_ERROR_HANDLING\", \"1\")\nwarnings.filterwarnings(\"ignore\", category=UserWarning)\nmp.set_start_method(\"spawn\", force=True)\n\ndef get_args():\n    p = argparse.ArgumentParser()\n    p.add_argument(\"--teacher\", default=\"\")\n    p.add_argument(\"--student\", default=\"\")\n    p.add_argument(\"--dataset\", default=\"\")\n    p.add_argument(\"--split\", default=\"train\")\n    p.add_argument(\"--epochs\", type=int, default=1)\n    p.add_argument(\"--batch_size\", type=int, default=1,\n                   help=\"per-GPU micro-batch\")\n    p.add_argument(\"--seq_len\", type=int, default=4096)\n    p.add_argument(\"--temperature\", type=float, default=1.0)\n    p.add_argument(\"--lr\", type=float, default=1e-6)\n    p.add_argument(\"--max_samples\", type=int, default=0,\n                   help=\"0=1000 \")\n    p.add_argument(\"--local_rank\", type=int, default=-1,\n               help=\"deepspeed/torch launcher GPU index\")\n    p.add_argument(\"--cache_path\", default=\"\")\n    p.add_argument(\"--hf_token\", default=\"\")\n    p = deepspeed.add_config_arguments(p)\n    return p.parse_args()\n\n\ndef main():\n    timeout_seconds = 3600 \n    timeout_duration = timedelta(seconds=timeout_seconds)\n    dist.init_process_group(\n        backend=\"nccl\",\n        timeout=timeout_duration \n    )\n    args = get_args()\n    deepspeed.init_distributed()\n    rank, world = deepspeed.comm.get_rank(), deepspeed.comm.get_world_size()\n    device = torch.device(\"cuda\", deepspeed.comm.get_local_rank())\n    # Tokenizer \n    tokenizer = AutoTokenizer.from_pretrained(args.student,\n                                        use_fast=True, trust_remote_code=True)\n    if tokenizer.pad_token is None:\n        tokenizer.pad_token = tokenizer.eos_token\n        \n    # tokenizer token_id \n    tokenizer.eos_token_id = tokenizer.convert_tokens_to_ids(tokenizer.eos_token)\n    tokenizer.pad_token_id = tokenizer.convert_tokens_to_ids(tokenizer.pad_token)\n    \n    \n    # Teacher (inference only)    \n    teacher_model = AutoModelForCausalLM.from_pretrained(\n        args.teacher, torch_dtype=torch.bfloat16,\n        low_cpu_mem_usage=True,\n        trust_remote_code=True, device_map=None, \n        cache_dir=args.cache_path,token=args.hf_token) \n    \n    see_memory_usage(\"After load model\", force=True)\n    \n    teacher_model.config.eos_token_id = tokenizer.eos_token_id\n    teacher_model.config.pad_token_id = tokenizer.pad_token_id\n        \n    teacher_engine = deepspeed.init_inference(\n        teacher_model,\n        mp_size=world,\n        dtype=torch.bfloat16,\n        replace_with_kernel_inject=True, \n        replace_method=\"auto\")\n    ",
    "url": "https://github.com/huggingface/transformers/issues/39637",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-24T15:05:38Z",
    "updated_at": "2025-09-01T08:03:18Z",
    "comments": 3,
    "user": "seona21"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1586,
    "title": "Real-world deploy on ALOHA Robot",
    "body": "How could I deploy the policies on the ALOHA robot? And how could I deploy in the real world? ",
    "url": "https://github.com/huggingface/lerobot/issues/1586",
    "state": "open",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-07-24T12:52:06Z",
    "updated_at": "2025-08-21T16:18:26Z",
    "user": "LogSSim"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11984,
    "title": "A compatibility issue when using custom Stable Diffusion with pre-trained ControlNets",
    "body": "I have successfully fine-tuned a Stable Diffusion v1.5 model using the Dreambooth script, and the results are excellent. However, I've encountered a compatibility issue when using this custom model with pre-trained ControlNets. Since the Dreambooth process modifies the U-Net weights, the original ControlNet is no longer aligned with the fine-tuned model, leading to a significant degradation in control and image quality.\n\nMy goal is to find a way to make them compatible again. It's important to clarify that I am trying to avoid a full, separate fine-tuning of the ControlNet on my custom model. That process is data- and resource-intensive, which defeats the purpose of a lightweight personalization method like Dreambooth. I have tried modifying the train_dreambooth.py script to incorporate ControlNet, but results have been consistently poor.\n\nIs there a dedicated script or a recommended workflow in diffusers to fine-tune a Stable Diffusion with ControlNet via Dreambooth? Any guidance or pointers would be greatly appreciated. Thanks a lot!",
    "url": "https://github.com/huggingface/diffusers/issues/11984",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-24T09:16:55Z",
    "updated_at": "2025-07-24T15:15:20Z",
    "comments": 6,
    "user": "ScienceLi1125"
  },
  {
    "repo": "huggingface/lighteval",
    "number": 868,
    "title": "How to calculate perplexity from an OpenAI compatible API",
    "body": "Hello,\n\nI'm new to LightEval. I want to use LightEval to evaluate an LLM model that is served via an API. The API is OpenAI compatible. It also returns logprobs for each token. Is there a built-in function to evaluate the perplexity score? I'm asking because I see that it\u2019s not implemented.\n\nhttps://github.com/huggingface/lighteval/blob/d805f9fa0a84da9ca4c0c6a638bbed149a7012a3/src/lighteval/models/litellm_model.py#L322\n\nAny help or guidance is greatly appreciated. Thanks.",
    "url": "https://github.com/huggingface/lighteval/issues/868",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-24T07:27:05Z",
    "updated_at": "2025-07-24T07:27:05Z",
    "user": "mrtpk"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1580,
    "title": "Environment_State in act and SmolVLA policy",
    "body": "Hi, Thanks for the awesome work!\nI have been noticing a variable called observation.environment_state in the act policy. What is exactly the feature environment_state. Thanks!",
    "url": "https://github.com/huggingface/lerobot/issues/1580",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-24T03:32:31Z",
    "updated_at": "2025-10-08T13:09:33Z",
    "user": "kasiv008"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3488,
    "title": "\ud83d\udca1 [REQUEST] - tutorial on torchrl LLM API",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\n\nI\u2019d like to write a tutorial about TorchRL LLM post-training API including data formatting for RL, multi-turn conversation handling, tool usage etc\n\n@svekars what\u2019s the policy on open-source models usage? Can I load and use a small model (0.5B) freely?\n\n### Existing tutorials on this topic\n\nI don\u2019t think there are any\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/tutorials/issues/3488",
    "state": "open",
    "labels": [
      "tutorial-proposal"
    ],
    "created_at": "2025-07-23T21:23:25Z",
    "updated_at": "2025-07-23T22:26:43Z",
    "comments": 3,
    "user": "vmoens"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1379,
    "title": "Why Do I Get Different Outputs in Python and JavaScript for the Same ONNX Model?",
    "body": "Hi ,\n\nI'm running inference on the same ONNX model (t5-small-new) using both Python and JavaScript (via ONNX Runtime). However, I'm noticing that the outputs are different between the two environments, even though the inputs and model are the same. The output of the Python code is correct while JS is not accurate.\n\nPython Code:\n```\nfrom optimum.onnxruntime import ORTModelForSeq2SeqLM\nfrom transformers import AutoTokenizer\n\nmodel = ORTModelForSeq2SeqLM.from_pretrained(\n    \"t5-small-new\",\n    use_cache=True \n)\n\ntokenizer = AutoTokenizer.from_pretrained(\"t5-small-new\")\n\ninputs = tokenizer(\"My Input\", return_tensors=\"pt\")\noutputs = model.generate(**inputs)\n\nprint(\"Prediction:\", tokenizer.decode(outputs[0], skip_special_tokens=True))\n```\n\n\nJS code:\n```\nconst inputText = \"My Input\";\n\nconst tokenizer = await window.AutoTokenizer.from_pretrained(\"t5-small-new\");\nconst model = await window.AutoModelForSeq2SeqLM.from_pretrained(\"t5-small-new\", {\n  dtype: \"fp32\",\n  device: \"wasm\",\n});\n\nconst encoded = await tokenizer(inputText, {\n  return_tensors: \"pt\",\n});\n\nconst output = await model.generate({\n  input_ids: encoded.input_ids,\n  attention_mask: encoded.attention_mask,\n  use_cache: true,\n});\n\nconst decoded = await tokenizer.decode(output[0], {\n  skip_special_tokens: true,\n});\n\nconsole.log(\"JS Prediction:\", decoded);\n\n```\n\n\nMy model uses `decoder_model_merged.onnx`, `encoder_model.onnx`, and `decoder_model.onnx`. \n\nCould you guide me on what is happening and why I get different results?",
    "url": "https://github.com/huggingface/transformers.js/issues/1379",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-07-23T20:13:57Z",
    "updated_at": "2025-08-29T23:43:21Z",
    "user": "mahdin75"
  },
  {
    "repo": "pytorch/executorch",
    "number": 12756,
    "title": "How to get ExecuTorch version in C++?",
    "body": "I using ExecuTorch in my C++ application and I want to get ExecuTorch version at compile time or runtime.  \nBut I haven't found some `#define` or `const std::string` like `EXECUTORCH_VERSION` or function like `get_version()`.\n\nFor example, PyTorch has [`TORCH_VERSION`](https://github.com/pytorch/pytorch/blob/fe8f556006b3397b7bdf844ba9a6cf329c0c1846/torch/csrc/api/include/torch/version.h.in#L16) and TFLite has [`TFLITE_VERSION_STRING`](https://github.com/tensorflow/tensorflow/blob/56a01a65e8055a234cd2198eefaef1ef4f7b087f/tensorflow/lite/version.h#L27). Is something like this available in ExecuTorch?\n\n\n\ncc @larryliu0820 @JacobSzwejbka @lucylq @mergennachin @byjlw",
    "url": "https://github.com/pytorch/executorch/issues/12756",
    "state": "open",
    "labels": [
      "module: runtime",
      "module: user experience"
    ],
    "created_at": "2025-07-23T19:17:40Z",
    "updated_at": "2025-09-16T21:45:11Z",
    "user": "eltimen"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39618,
    "title": "SageAttention for attention implementation?",
    "body": "### Feature request\n\nI've noticed it's been a while now, but transformers still only has flash attention as the fastest attention backend for calls like these: \n\n<img width=\"1307\" height=\"780\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/3f3d62f6-a166-4ca6-97a0-49263fd93299\" />\n\nAre there any plans to add sageattention as well? \n\n### Motivation\n\nIt's become increasingly involved to have to monkey patch sage attention support for every new model that comes out, and for older models that used older versions of transformers, I've had to do unholy things like this:\n\n<img width=\"1296\" height=\"705\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/c5f4ff6a-094a-48f4-9339-17de1ece43d0\" />\n\n\n### Your contribution\n\nI have an example of a patch I had to do so I will upload that here\n\n[llama_nar.py.txt](https://github.com/user-attachments/files/21393926/llama_nar.py.txt)",
    "url": "https://github.com/huggingface/transformers/issues/39618",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-07-23T19:10:47Z",
    "updated_at": "2025-07-25T12:30:37Z",
    "comments": 4,
    "user": "Many0therFunctions"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11977,
    "title": "how to load a finetuned model especially during validation phase",
    "body": "<img width=\"1034\" height=\"743\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/c4e9318f-10aa-4b91-9d60-e28a3be38f8a\" />\nAs the above, I have finetuned the model and  want to validate it, but the given demo  which is  train_dreambooth_sd3.py still uses \n\"pipeline = StableDiffusion3Pipeline.from_pretrained(\n                args.pretrained_model_name_or_path,\n                transformer=transformer,\n                text_encoder=text_encoder_one,\n                text_encoder_2=text_encoder_two,\n                text_encoder_3=text_encoder_three,\n            ) \"  .\n\nI wonder why it still load from args.pretrained_model_name_or_path  as it has saved the finetuned model in the save_path which is \"os.path.join(args.output_dir, f\"checkpoint-{global_step}\")\".\n\nso, how to  how to load the finetuned model during validation phase?\n\nAnother confusion, what is the difference between  \" StableDiffusion3Pipeline.from_pretrained() \" and \"SD3Transformer2DModel.from_pretrained\" as the following:\n\n<img width=\"1034\" height=\"743\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/7d9e5915-8aa2-4678-b39f-6ecb4480a02b\" />\n\n                                 ",
    "url": "https://github.com/huggingface/diffusers/issues/11977",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-23T11:54:16Z",
    "updated_at": "2025-07-24T09:19:11Z",
    "user": "micklexqg"
  },
  {
    "repo": "pytorch/executorch",
    "number": 12749,
    "title": "How to run a executorch model directly from memory instead of saving it as a disk file",
    "body": "### \ud83d\udcda The doc issue\n\nHi, \n\nI wanted to know if there is any ExecuTorch runtime API that can accept a *.pte model available in the memory (in some sort of a buffer format) and use it to do load and infer?\n\nSo far, I could only find a few which require the model to be passed as a disk file.\n\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/executorch/issues/12749",
    "state": "open",
    "labels": [
      "module: extension"
    ],
    "created_at": "2025-07-23T11:09:04Z",
    "updated_at": "2025-09-02T06:22:00Z",
    "user": "vikasbalaga"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1579,
    "title": "Is there a video backend supporting nondestructive encoding?",
    "body": "I saved images during recording through not deletng folder `images`. When I try to compare the first frame.png in `images` folder and dataset=make_dataset(config)'s first image, I found the saved png file is nondestructive. But the image I got by lerobot is not.\n\nHow I find:\nin `def save_episode` \n```\n        # img_dir = self.root / \"images\"\n        # if img_dir.is_dir():\n        #     shutil.rmtree(self.root / \"images\")\n```\nThis has been moved in latest version. now:\n\n```\n    def encode_episode_videos(self, episode_index: int) -> None:\n            ...\n            encode_video_frames(img_dir, video_path, self.fps, overwrite=True)\n            shutil.rmtree(img_dir)\n```\n\nI saved some images through recording with one channel filled with zero. Then read the saved png through cv2, it showed it has a 0-filled channel.\n\nThen I try to check whether I can get the same image through lerobot\nso I did this in train.py\n```\nraw_dataloader = torch.utils.data.DataLoader(\n        dataset,\n        num_workers=cfg.num_workers,\n        batch_size=cfg.batch_size,\n        shuffle=False,\n        sampler=sampler,\n        pin_memory=device.type == \"cuda\",\n        drop_last=False,\n    )\nimage_tensor=peek_batch[\"observation.images.side_depth\"][0]\nimage_np = (image_tensor * 255).permute(1, 2, 0).cpu().numpy().astype(np.uint8)\n```\nSadly,`image_np` is really different from real png, it doesn't have a 0-filled channel, and its average data shows larger.\n",
    "url": "https://github.com/huggingface/lerobot/issues/1579",
    "state": "open",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-07-23T08:38:39Z",
    "updated_at": "2025-08-12T09:22:26Z",
    "user": "milong26"
  },
  {
    "repo": "huggingface/candle",
    "number": 3032,
    "title": "`matmul` (and others) Precision issues between Candle & PyTorch",
    "body": "We noticed there's some precision discrepancy in matrix multiplication and the linear layer between between Candle and PyTorch. This matters a lot when reproducing LLMs originated from PyTorch into Candle. We used the `hf_hub::api::Api` to get the safetensors from the hub and for testing the precision issues for each modules independently. This also occurs for the `BF16` dtype in `Cuda`.\n\nHere's a shortened list of tests (for brevity) between `candle_core::tensor::Tensor::matmul` and `torch.matmul`\n```\n\u274c test_0: MSE=0.0000000004096404, MAE=0.00001550 (dims: 2048x256, dtype: F32, device: Cpu)\n\u274c test_1: MSE=0.0000000003628351, MAE=0.00001453 (dims: 2048x256, dtype: F32, device: Cpu)\n...\n\u274c test_48: MSE=0.0000000000824194, MAE=0.00000633 (dims: 512x1024, dtype: F32, device: Cpu)\n\u274c test_49: MSE=0.0000000003840639, MAE=0.00001534 (dims: 2048x256, dtype: F32, device: Cpu)\n```\n\nWe did notice `candle_nn::Embedding` performed at 0-tolerance (tested indirectly), which probably means the the loaded weights themselves are working precisely.\n\nHave you guys tried validating your implementation with the PyTorch at 0-tolerance (within the same CPU/GPU architecture)? Is there any proper way to mitigate this? We need it for our implementation. Thank you.",
    "url": "https://github.com/huggingface/candle/issues/3032",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-23T04:07:08Z",
    "updated_at": "2025-09-27T21:25:51Z",
    "comments": 4,
    "user": "andrew-shc"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1578,
    "title": "Lerobot metaworld dataset only provides 49 tasks",
    "body": "https://huggingface.co/datasets/lerobot/metaworld_mt50\n\nThere are only 49 tasks and \"Push the puck to a goal\" task repeates twice",
    "url": "https://github.com/huggingface/lerobot/issues/1578",
    "state": "open",
    "labels": [
      "question",
      "simulation"
    ],
    "created_at": "2025-07-23T04:03:17Z",
    "updated_at": "2025-08-12T09:23:12Z",
    "user": "chenkang455"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1577,
    "title": "test failed after training SVLA",
    "body": "I collected 76 sets of data and used the same calibration file as during collection. However, after training for 24k steps, the model obtained was unable to complete the grasping task during inference. Can anyone help me deal with the problem?\n[dataset](https://huggingface.co/datasets/Xiaoyan97/orange_block_pickplace)\n",
    "url": "https://github.com/huggingface/lerobot/issues/1577",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-23T03:59:26Z",
    "updated_at": "2025-08-12T09:23:26Z",
    "user": "Liu-Xiaoyan97"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1576,
    "title": "Multiple Dataset training",
    "body": "How to train multiple lerobot dataset? is there any function I can use it",
    "url": "https://github.com/huggingface/lerobot/issues/1576",
    "state": "open",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-07-23T03:46:03Z",
    "updated_at": "2025-10-10T09:30:06Z",
    "user": "JustinKai0527"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39596,
    "title": "Does transformers support python3.13 -- disable-gil or python3.14 free threading?",
    "body": "Does transformers support python3.13 -- disable-gil or python3.14 free threading?\nI got an error when trying to install transformers on these two python versions.",
    "url": "https://github.com/huggingface/transformers/issues/39596",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-23T02:34:03Z",
    "updated_at": "2025-08-30T08:02:54Z",
    "comments": 2,
    "user": "SoulH-qqq"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1374,
    "title": "nanoVLM support",
    "body": "### Question\n\nI would like to know if there is any plan to support models built with nanoVLM [https://github.com/huggingface/nanoVLM], thanks.",
    "url": "https://github.com/huggingface/transformers.js/issues/1374",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-07-22T11:43:57Z",
    "updated_at": "2025-07-23T09:02:15Z",
    "user": "sbrzz"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11971,
    "title": "What is the minimum memory requirement for model training?",
    "body": "Hello, I would like to try training an SDXL model using my own dataset. What is the minimum memory size required for the model?",
    "url": "https://github.com/huggingface/diffusers/issues/11971",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-22T07:52:28Z",
    "updated_at": "2025-07-22T08:26:27Z",
    "user": "WWWPPPGGG"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1439,
    "title": "Duplicate definition of vocab_size?",
    "body": "Hi @wwwjn @H-Huang @tianyu-l thanks for the amazing work on deepseek v3\n\nHave a minor question: why is there a definition of vocab size here\n\nhttps://github.com/pytorch/torchtitan/blob/4e73af3e2c5f99ad3cb5a21612e615a64b0b75e7/torchtitan/models/deepseek_v3/__init__.py#L50-L51C9\n\nwhich then gets overridden by the tokenizer's vocab size here?\n\nhttps://github.com/pytorch/torchtitan/blob/4e73af3e2c5f99ad3cb5a21612e615a64b0b75e7/torchtitan/models/deepseek_v3/model/args.py#L96-L100",
    "url": "https://github.com/pytorch/torchtitan/issues/1439",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-21T22:59:11Z",
    "updated_at": "2025-07-23T04:09:56Z",
    "comments": 1,
    "user": "vwxyzjn"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39565,
    "title": "Model forward execution in full eager mode?",
    "body": "I know there is a flag `attn_implementation` which could trigger specialized attention kernel implementation. Besides this, does everything run in native PyTorch eager mode? Does `transformers` have any other custom op or kernel?\n```python\nmodel = AutoModelForCausalLM.from_pretrained(\"meta-llama/Llama-3.1-8B\", device_map=\"auto\", torch_dtype=torch.bfloat16, attn_implementation=None)\nmodel.forward(input_tokens)\n```\n\nI'm asking this to see if `transformers` can be used as a numerical baseline to verify other inference backend",
    "url": "https://github.com/huggingface/transformers/issues/39565",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-21T21:49:05Z",
    "updated_at": "2025-08-21T08:34:59Z",
    "comments": 3,
    "user": "22quinn"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1564,
    "title": "How are Episode Stats used?",
    "body": "I'm looking to create a subset of an episode (ie sec 2-4) in a 30 second episode, and wanted to know how episode_stats are used later on for training / inference? \nAre they used to normalize model inputs or are they used somewhere else as well?  \n\nie. in modeling_act.py\n```\nself.normalize_inputs = Normalize(\n            config.input_features, config.normalization_mapping, dataset_stats)\n```\n",
    "url": "https://github.com/huggingface/lerobot/issues/1564",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "processor"
    ],
    "created_at": "2025-07-21T19:06:21Z",
    "updated_at": "2025-08-12T09:27:29Z",
    "user": "andlyu"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1561,
    "title": "will you release the libero ft&eval setting?",
    "body": "hello your smolVLA is a wonderful work ,i notice that you finetuned it on the **libero** and evalaute at the same time.but     i couldn't achieve the same or similar success rate**(just 76% ,much  lower than your '96%')**\n**have you use the async inference in libero?**\nI think it must be the different hyperparameters with yours,so could you release the script(finetune.py & eval.py) or just tell me  your ft&eval settings.here is my emal 602225349@qq.com \nthx u in advance~",
    "url": "https://github.com/huggingface/lerobot/issues/1561",
    "state": "closed",
    "labels": [
      "enhancement",
      "question",
      "policies"
    ],
    "created_at": "2025-07-21T13:57:13Z",
    "updated_at": "2025-09-23T09:25:04Z",
    "user": "JuilieZ"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39554,
    "title": "Why `is_causal` is not used in `flash_attention_forward` ?",
    "body": "I want to perform bidirectional attention in the Qwen3 model to train an embedding model, so I passed `is_causal=False` in the model `forward` (I manually added `is_causal` arguments in all `forward` method such as `Qwen3Model` and `Qwen3Attention` in`modeling_qwen3.py`):\n\n```python\nclass Qwen3Attention(nn.Module):\n    \"\"\"Multi-headed attention from 'Attention Is All You Need' paper\"\"\"\n        ...\n\n    def forward(\n        self,\n        hidden_states: torch.Tensor,\n        position_embeddings: tuple[torch.Tensor, torch.Tensor],\n        attention_mask: Optional[torch.Tensor],\n        past_key_value: Optional[Cache] = None,\n        cache_position: Optional[torch.LongTensor] = None,\n        is_causal: Optional[bool] = True,   # I add is_causal here\n        **kwargs: Unpack[FlashAttentionKwargs],\n    ) -> tuple[torch.Tensor, Optional[torch.Tensor], Optional[tuple[torch.Tensor]]]:\n        ...\n\n        attn_output, attn_weights = attention_interface(\n            self,\n            query_states,\n            key_states,\n            value_states,\n            attention_mask,\n            dropout=0.0 if not self.training else self.attention_dropout,\n            scaling=self.scaling,\n            sliding_window=self.sliding_window,  # diff with Llama\n            is_causal=is_causal, # and is_causal from the argument is passed to the attention_interface (e.g. `flash_attention_2`, `sdpa_attention_forward`)\n            **kwargs,\n        )\n```\n   \nI can successfully change the causality of the attention in `sdpa_attention_forward`. However, I realized that it does not change the causality in the attention in `flash_attention_forward`. After diving into the implementation of `flash_attention_forward`, I found the reason in `flash_attention_forward` located at `transformers/integrations/flash_attention.py`:\n\n```python\ndef flash_attention_forward(\n    module: torch.nn.Module,\n    query: torch.Tensor,\n    key: torch.Tensor,\n    value: torch.Tensor,\n    attention_mask: Optional[torch.Tensor],\n    dropout: float = 0.0,\n    scaling: Optional[float] = None,\n    sliding_window: Optional[int] = None,\n    softcap: Optional[float] = None,\n    **kwargs,\n) -> tuple[torch.Tensor, None]:\n    ...\n\n    # FA2 always relies on the value set in the module, so remove it if present in kwargs to avoid passing it twice\n    kwargs.pop(\"is_causal\", None)\n\n    attn_output = _flash_attention_forward(\n        query,\n        key,\n        value,\n        attention_mask,\n        query_length=seq_len,\n        is_causal=module.is_causal,  # here module is `Qwen3Attention`\n        dropout=dropout,\n        softmax_scale=scaling,\n        sliding_window=sliding_window,\n        softcap=softcap,\n        use_top_left_mask=_use_top_left_mask,\n        target_dtype=target_dtype,\n        attn_implementation=module.config._attn_implementation,\n        **kwargs,\n    )\n```\n\nAs you can see, the `is_causal` argument is popped, and the `is_causal` of `Qwen3Attention` is used as the argument. Note that `Qwen3Attention.is_causal` is never changed, and its default value is `True`, so the `is_causal` argument passed into `_flash_attention_forward` will always be `True` regardless of any change. \n\nAfter I add a line of code to alter the `Qwen3Attention.is_causal`, i.e. `self.is_causal = is_causal` before passing the arguments into `attention_interface`, I can change the causality of `flash_attention_forward`. So I would like to know if it is a feature or a bug? Thank you!!",
    "url": "https://github.com/huggingface/transformers/issues/39554",
    "state": "closed",
    "labels": [
      "Flash Attention"
    ],
    "created_at": "2025-07-21T12:08:00Z",
    "updated_at": "2025-11-11T12:32:41Z",
    "comments": 9,
    "user": "lucaswychan"
  },
  {
    "repo": "huggingface/peft",
    "number": 2660,
    "title": "Custom models LoRA",
    "body": " Is there any way to fine-tune models that are not in the support list or custom models?\n\nCurrently, many public models have their LLM parts from Qwen. Can LLaMA-Factory use the Qwen template and only fine-tune the LLM part? Thank you",
    "url": "https://github.com/huggingface/peft/issues/2660",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-21T11:52:30Z",
    "updated_at": "2025-07-24T12:53:34Z",
    "comments": 6,
    "user": "stillbetter"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1559,
    "title": "Is the current model framework suitable for using automatic mixed precision?",
    "body": "I saw that `.to(torch.float32)` and `.to(torch.bfloat16)` were used in many places in the Pi0 model code. Then I implemented parallel training of Pi0 based on accelerate, and found that if I want to use AMP, the code will report an error of dtype mismatch. I want to know whether the existing code is suitable for automatic mixed precision? If not, how should it be modified?",
    "url": "https://github.com/huggingface/lerobot/issues/1559",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-21T10:45:26Z",
    "updated_at": "2025-08-12T09:27:59Z",
    "user": "xliu0105"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39549,
    "title": "Is there plan to integrate ColQwen2.5 into Transformers?",
    "body": "### Model description\n\nIs ColQwen2ForRetrieval integrated into the transformers library, and are there plans to add [ColQwen2.5](https://github.com/illuin-tech/colpali/blob/main/colpali_engine/models/qwen2_5/colqwen2_5/modeling_colqwen2_5.py) in the future?\n\n### Open source status\n\n- [x] The model implementation is available\n- [x] The model weights are available\n\n### Provide useful links for the implementation\n\nhttps://github.com/illuin-tech/colpali/blob/main/colpali_engine/models/qwen2_5/colqwen2_5/modeling_colqwen2_5.py\n\nhttps://github.com/huggingface/transformers/pull/38391",
    "url": "https://github.com/huggingface/transformers/issues/39549",
    "state": "closed",
    "labels": [
      "New model"
    ],
    "created_at": "2025-07-21T10:08:47Z",
    "updated_at": "2025-11-03T23:31:08Z",
    "comments": 0,
    "user": "rebel-thkim"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11966,
    "title": "How about forcing the first and last block on device when groupoffloading is used?",
    "body": "**Is your feature request related to a problem? Please describe.**\nWhen group offloading is enabled, the offload and onload cannot be streamed between steps and this is really a big time comsuming problem.\n\n**Describe the solution you'd like.**\nIs it possible to add an option that could make the first and last block forced on device to avoid offload and onload?\n\n@a-r-r-o-w Could you please give some help? Thanks so much.\n",
    "url": "https://github.com/huggingface/diffusers/issues/11966",
    "state": "open",
    "labels": [
      "contributions-welcome",
      "group-offloading"
    ],
    "created_at": "2025-07-21T08:38:30Z",
    "updated_at": "2025-12-02T15:30:23Z",
    "comments": 13,
    "user": "seed93"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1829,
    "title": "The parameter in initial_alphabet of the \"class BpeTrainer(Trainer)\" does not allow more than one character to initialized",
    "body": "Hi everyone,\nI am working on Tamil and Sinhala languages which are morphologically rich languages, in these languages a character is actually a combination of multiple unicode codepoints (similar to emojis) so it would be greatly beneficial to initialize the BPE alphabet with graphemes instead of the characters. Is there any work around for this  which i can use to initialize the BPE algorithm? Thanks in advance!!",
    "url": "https://github.com/huggingface/tokenizers/issues/1829",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-21T08:30:21Z",
    "updated_at": "2025-07-21T08:30:21Z",
    "comments": 0,
    "user": "vmenan"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1554,
    "title": "How to use local datasets to train and evaluate",
    "body": "Due to network issues, I want to use only local datasets during training and evaluation and prevent huggingface from uploading data or retrieve datasets on the hub.Is there any good solution? ",
    "url": "https://github.com/huggingface/lerobot/issues/1554",
    "state": "closed",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-07-21T07:54:07Z",
    "updated_at": "2025-10-08T12:58:32Z",
    "user": "zym123321"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3481,
    "title": "[BUG] - Broken links of PyTorch Libraries(torchao, torchrec etc) on the right side of the tutorial index page",
    "body": "### Add Link\n\nhttps://docs.pytorch.org/tutorials/index.html\n\n### Describe the bug\n\n\nThose links to the \"PyTorch Libraries\" section on the side bar  are broken, they should pointed to `https://docs.pytorch.org/ao` instead of `https://docs.ppytorch.org/ao`, same for other libraries. I searched the codebase and seems these broken links come from cppdocs auto compilation. Is there a pointer to how I can start to get a fix PR? Thank you!\n\n<img width=\"1850\" height=\"918\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/393df9fd-e0cd-405b-855f-bae2046e0ae4\" />\n\n\n[cppdocs repo:]( https://github.com/search?q=repo%3Apytorch%2Fcppdocs%20ppytorch&type=code)\n\n<img width=\"2024\" height=\"1295\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b4b8997c-58c7-46ad-a1b5-339d99eea862\" />\n\n### Describe your environment\n\nMacOS, \nGoogle Chrome\n\ncc @svekars @sekyondaMeta @AlannaBurke",
    "url": "https://github.com/pytorch/tutorials/issues/3481",
    "state": "closed",
    "labels": [
      "bug",
      "website"
    ],
    "created_at": "2025-07-21T06:56:26Z",
    "updated_at": "2025-07-22T15:46:47Z",
    "comments": 2,
    "user": "sniper35"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2324,
    "title": "AutoConfig.from_dict Missing in transformers==4.51.3 \u2014 Incompatibility with optimum==1.26.1",
    "body": "### System Info\n\n```shell\nI am running into a critical compatibility issue between optimum and recent versions of transformers.\n\n\u2757 Error Summary\nWhen using:\ntransformers==4.51.3\noptimum==1.26.1\nonnx==1.17.0\nonnxruntime==1.20.0\n\nThe following runtime error is thrown when attempting to load an ONNX model using ORTModelForTokenClassification.from_pretrained:\n\nAttributeError: type object 'AutoConfig' has no attribute 'from_dict'\n\nThis traces back to:\nconfig = AutoConfig.from_pretrained(...)\n# \u2193 internally calls:\nreturn CONFIG_MAPPING[pattern].from_dict(config_dict, **unused_kwargs)\n\nHowever, in transformers>=4.48, the method AutoConfig.from_dict appears to have been deprecated or removed. This causes optimum to break at runtime when trying to load ONNX models.\n\n\ud83d\udce6 Package Versions\ntransformers - 4.51.3\noptimum - 1.26.1\nonnx - 1.17.0\nonnxruntime - 1.20.0\ntorch - 2.2.6\n\nDue to a security advisory, we're required to upgrade to transformers>=4.48. However, even with the latest optimum==1.26.1, it appears optimum is not yet updated for compatibility with changes introduced in recent transformers versions.\n\nASK:\nIs support for transformers>=4.48 (particularly 4.51.3) planned in an upcoming optimum release?\nCould this AutoConfig.from_dict dependency be refactored or conditionally patched to restore compatibility?\nIs there a compatibility roadmap available between transformers and optimum for ONNX workflows?\n```\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nUse transformers==4.51.3 and optimum==1.26.1\n\nLoad an exported ONNX model using ORTModelForTokenClassification.from_pretrained(...)\n\nObserve the AttributeError about AutoConfig.from_dict\n\n### Expected behavior\n\nWhen using optimum==1.26.1 with transformers>=4.48 (specifically 4.51.3), the following should work without error:\nfrom optimum.onnxruntime import ORTModelForTokenClassification\nmodel = ORTModelForTokenClassification.from_pretrained(\"path/to/onnx/model\")\n\nThe model should load successfully using the ONNX Runtime backend.\n\nInternally, AutoConfig.from_pretrained(...) should function correctly regardless of changes in the transformers API (e.g., deprecation/removal of from_dict).\n\nONNX workflows should remain compatible with newer transformers versions, allowing teams to benefit from critical updates and security patches without breaking ONNX integration.",
    "url": "https://github.com/huggingface/optimum/issues/2324",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-21T06:04:58Z",
    "updated_at": "2025-08-01T07:10:20Z",
    "comments": 5,
    "user": "rratnakar09"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11964,
    "title": "KeyError when loading LoRA for Flux model: missing lora_unet_final_layer_adaLN_modulation_1 weights",
    "body": "I'm trying to run Overlay-Kontext-Dev-LoRA locally by loading the LoRA weights using the pipe.load_lora_weights() function. However, I encountered the following error during execution:\n\n> KeyError: 'lora_unet_final_layer_adaLN_modulation_1.lora_down.weight'\n\n\n```\nimport torch\nfrom diffusers import DiffusionPipeline\nfrom diffusers.utils import load_image\n\nLoad the pipeline with a specific torch data type for GPU optimization\npipe = DiffusionPipeline.from_pretrained(\n\"black-forest-labs/FLUX.1-Kontext-dev\",\ntorch_dtype=torch.bfloat16\n)\n\nMove the entire pipeline to the GPU\npipe.to(\"cuda\")\n\nLoad LoRA weights (this will also be on the GPU)\npipe.load_lora_weights(\"ilkerzgi/Overlay-Kontext-Dev-LoRA\")\n\nprompt = \"Place it\"\ninput_image = load_image(\"img2.png\")\n\nThe pipeline will now run on the GPU\nimage = pipe(image=input_image, prompt=prompt).images[0]\n\nimage.save(\"output_image.png\")\n```\n\n\nEnvironment:\ndiffusers version: 0.35.0.dev0\nPython: 3.10\nRunning locally on a ubuntu environment with RTX 4090\n\n\n\n> Additional Note:\n> The model file size is also quite large. I may need to quantize it before running it on the 4090 to avoid out-of-memory issues.\n> \n> Would appreciate any help or suggestions on how to resolve the loading issue. Thank you!\n\n",
    "url": "https://github.com/huggingface/diffusers/issues/11964",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-21T05:16:34Z",
    "updated_at": "2025-07-21T09:14:00Z",
    "comments": 1,
    "user": "NEWbie0709"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39545,
    "title": "Is the new Intel\u2013Weizmann speculative decoding algorithm integrated into Transformers?",
    "body": "Hi,\n\nI recently read about a new speculative decoding algorithm developed by Intel Labs and the Weizmann Institute, which reportedly improves inference speed by up to 2.8\u00d7, even when using draft and target models with different vocabularies or architectures.\n\nReferences:\n\n- [Intel Newsroom](https://newsroom.intel.com/artificial-intelligence/intel-weizmann-institute-speed-ai-with-speculative-decoding-advance?utm_source=chatgpt.com)\n- [CTech Article](https://www.calcalistech.com/ctechnews/article/h1z7pydlex)\n\nSeveral sources (including Intel press releases and third-party writeups) claim that this algorithm has already been integrated into the Hugging Face Transformers library.\nHowever, I haven\u2019t found any reference to this new version in the official Transformers documentation\n\n\nMy Questions:\n\n1. Has this Intel\u2013Weizmann speculative decoding algorithm actually been integrated into transformers?\n2. If so, where can I find documentation or usage examples for how to enable it?\n\nThanks in advance for your help! This looks like a powerful advancement, and I'd love to test it.",
    "url": "https://github.com/huggingface/transformers/issues/39545",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-21T02:47:48Z",
    "updated_at": "2025-07-22T12:15:54Z",
    "comments": 4,
    "user": "NEWbie0709"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1552,
    "title": "Support smolvla training on Intel GPU",
    "body": "Current script is only supporting `cuda`, `mps` and `cpu`. \nWith PyTorch 2.7 with Intel GPU support, once PyTorch is installed, Intel GPU can be utilized in the training script.",
    "url": "https://github.com/huggingface/lerobot/issues/1552",
    "state": "open",
    "labels": [
      "enhancement",
      "question",
      "policies"
    ],
    "created_at": "2025-07-21T01:47:38Z",
    "updated_at": "2025-10-09T07:40:10Z",
    "user": "xiangyang-95"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39542,
    "title": "ValueError: You cannot specify both decoder_input_ids and decoder_inputs_embeds at the same time",
    "body": "### System Info\n\n- `transformers` version: 4.53.2\n- Platform: **Ubuntu 22.04** Linux 5.15.0-139-generic\n-  **Python 3.10.18** + ipykernel 6.29.5\n- Pytorch 2.7.1+cu118\n\n### Who can help?\n\n@ArthurZucker \n@SunMarc \n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\n&emsp;I want to build a new MT model with  **bert-based encoder** and a **decoder from opus-mt-en-zh** (loaded as `MarianMTModel`), BUT when I execute `Trainer.train()`, It report ValueError: `You cannot specify both decoder_input_ids and decoder_inputs_embeds at the same time`. This is code about my model and trainer.\n&emsp;Thanks for helping!\n\n```Python\n# ManchuBERT Encoder + Opus-MT-zh Decoder\n\nimport torch\nfrom torch import nn\nfrom transformers.modeling_outputs import Seq2SeqLMOutput\n\n\ndef get_extended_attention_mask(attention_mask, input_shape, device, dtype=torch.float32):\n    \"\"\"\n    attention_mask: [B, seq_len]  \n    return:        [B, 1, 1, seq_len] \n    \"\"\"\n    mask = attention_mask[:, None, None, :]        # [B, 1, 1, seq_len]\n    mask = mask.to(dtype=dtype)\n    mask = (1.0 - mask) * -10000.0\n    return mask\n\n\nclass ManchuZhMT(nn.Module):\n    def __init__(self, bert, marian):\n        super().__init__()\n        self.decoder_embeddings = marian.model.decoder.embed_tokens\n        self.embeddings = bert.embeddings\n        self.encoder = bert.encoder\n        self.decoder = marian.model.decoder\n        self.lm_head = marian.lm_head\n        self.final_logits_bias = marian.final_logits_bias\n        self.config = marian.config\n\n    def forward(self,\n                input_ids=None,\n                attention_mask=None,\n                decoder_input_ids=None,\n                decoder_attention_mask=None,\n                labels=None,\n                **kwargs):\n\n\n        hidden_states = self.embeddings(input_ids=input_ids)\n        attention_mask = attention_mask.to(dtype=torch.float32)\n\n        extended_mask = get_extended_attention_mask(attention_mask, input_ids.shape, input_ids.device)\n\n        enc_out = self.encoder(hidden_states=hidden_states,\n                               attention_mask=extended_mask,\n                               return_dict=True)\n\n        dec_out = self.decoder(\n                               input_ids=decoder_input_ids,\n                               attention_mask=decoder_attention_mask,\n                               encoder_hidden_states=enc_out.last_hidden_state,\n                               encoder_attention_mask=extended_mask,\n                               return_dict=True)\n\n        logits = self.lm_head(dec_out.last_hidden_state) + self.final_logits_bias\n\n        loss = None\n        if labels is not None:\n            loss_fct = nn.CrossEntropyLoss(ignore_index=-100)\n            loss = loss_fct(logits.view(-1, logits.size(-1)), labels.view(-1))\n\n        return Seq2SeqLMOutput(loss=loss, logits=logits)\n\n    def prepare_inputs_for_generation(self, *args, **kwargs):\n        return self.decoder.prepare_inputs_for_generation(*args, **kwargs)\n\n    def _prepare_encoder_decoder_kwargs_for_generation(self, *args, **kwargs):\n        return self.decoder._prepare_encoder_decoder_kwargs_for_generation(*args, **kwargs)\n\nmodel = ManchuZhMT(manchu_model, chn_model)\nprint(model)\n\n# freeze Decoder + LM Head \nfor p in model.decoder.parameters():\n    p.requires_grad = False\nfor p in model.lm_head.parameters():\n    p.requires_grad = False\n```\n\n```Python\n# Add LoRA for Encoder\nfrom peft import LoraConfig, get_peft_model, TaskType\n\nnum_layers = len(model.encoder.layer)\ntarget_modules = []\nfor i in range(num_layers):\n    target_modules.extend([\n        f\"encoder.layer.{i}.attention.self.query\",\n        f\"encoder.layer.{i}.attention.self.key\",\n        f\"encoder.layer.{i}.attention.self.value\",\n        f\"encoder.layer.{i}.attention.output.dense\",\n        f\"encoder.layer.{i}.intermediate.dense\",\n        f\"encoder.layer.{i}.output.dense\",\n    ])\n\nlora_config = LoraConfig(\n    task_type=TaskType.SEQ_2_SEQ_LM, \n    target_modules=target_modules,\n    r=16,\n    lora_alpha=32,\n    lora_dropout=0.05,\n    bias=\"none\",\n)\nmodel = get_peft_model(model, lora_config)\nmodel.print_trainable_parameters()\n```\n\n```Python\n# Start Train!\nfrom transformers import Seq2SeqTrainer, Seq2SeqTrainingArguments\n\nargs = Seq2SeqTrainingArguments(\n    output_dir=\"./lora_with_bert\",\n    per_device_train_batch_size=batch_size,\n    per_device_eval_batch_size=batch_size,\n    num_train_epochs=10,\n    learning_rate=3e-4,\n    fp16=True,\n    save_strategy=\"epoch\",\n    predict_with_generate=True,\n    logging_steps=100,\n    report_to=\"none\",\n)\n\ntrainer = Seq2SeqTrainer(\n    model=model,\n    args=args,\n    train_dataset=tokenized_ds[\"train\"],\n    eval_dataset=tokenized_ds[\"val\"],\n    tokenizer=manchu_tok,\n)\ntrainer.train()\ntrainer.save_model(\"./lora_with_bert/final\")\n```\n\n\n### Expected behav",
    "url": "https://github.com/huggingface/transformers/issues/39542",
    "state": "closed",
    "labels": [
      "Usage",
      "Good First Issue",
      "trainer",
      "bug"
    ],
    "created_at": "2025-07-21T01:06:27Z",
    "updated_at": "2025-08-22T05:53:51Z",
    "comments": 10,
    "user": "xjackzenvey"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39551,
    "title": "InformerForPrediction [I would like to seek your opinions, everyone, How can I set the dynamic real features for prediction]",
    "body": "Here is the description cited from the docs of InformerForPrediction\uff1a\n\n> future_time_features (torch.FloatTensor of shape (batch_size, prediction_length, num_features)) \u2014 Required time features for the prediction window, which the model internally will add to future_values. These could be things like \u201cmonth of year\u201d, \u201cday of the month\u201d, etc. encoded as vectors (for instance as Fourier features). These could also be so-called \u201cage\u201d features, which basically help the model know \u201cat which point in life\u201d a time-series is. Age features have small values for distant past time steps and increase monotonically the more we approach the current time step. Holiday features are also a good example of time features.\nThese features serve as the \u201cpositional encodings\u201d of the inputs. So contrary to a model like BERT, where the position encodings are learned from scratch internally as parameters of the model, the Time Series Transformer requires to provide additional time features. The Time Series Transformer only learns additional embeddings for static_categorical_features.\nAdditional dynamic real covariates can be concatenated to this tensor, with the caveat that these features must but known at prediction time.\nThe num_features here is equal to config.num_time_features+config.num_dynamic_real_features`.\nHi, I have a question regarding inference in time series forecasting models.\n\nWhen making predictions, how can I obtain or construct the dynamic_real_features for the future steps (i.e., for the prediction_length)?\nMore specifically, how should I concatenate the corresponding dynamic_real_features and time_features during inference?\n\nIs it appropriate to use all-zero placeholders for the future dynamic_real_features?\nWill this affect prediction performance, considering that during training the model has access to real values for these features over the full context + prediction window?\n\nOn a related note:\nIn time series forecasting, is it necessary for all timestamps in the input window to be equally spaced (e.g., every x minutes)?\nOr can I use sequences with irregular time intervals, as long as the time order is preserved?\n\nThanks for your help!\n\n\n",
    "url": "https://github.com/huggingface/transformers/issues/39551",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-20T11:38:50Z",
    "updated_at": "2025-08-28T08:03:20Z",
    "user": "2004learner"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1422,
    "title": "[Gemma3] Support?",
    "body": "Hi Authors,\n\nIs there a plan for Gemme3 series?\n\nBest,\nPeter",
    "url": "https://github.com/pytorch/torchtitan/issues/1422",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-20T03:22:02Z",
    "updated_at": "2025-08-21T03:25:09Z",
    "comments": 1,
    "user": "YHPeter"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11961,
    "title": "New Adapter/Pipeline Request: IT-Blender for Creative Conceptual Blending",
    "body": "## Model/Pipeline/Scheduler description\n\n### Name of the model/pipeline/scheduler\n\"Image-and-Text Concept Blender\" (IT-Blender), a diffusion adapter that blends visual concepts from a real reference image with textual concepts from a prompt in a disentangled manner. The goal is to enhance human creativity in design tasks.\n\n### Project page & ArXiv link\nPaper link: https://arxiv.org/pdf/2506.24085\nThe project website: https://imagineforme.github.io/ \n**(a lot of interesting feasible examples are in the project page.)**\n</br>\n\n<img width=\"2880\" height=\"3159\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/87607797-32a1-41a5-b5aa-69cd8406352c\" />\n\n### What is the proposed method?\n\nIT-Blender is an adapter that works with existing models like SD and FLUX. Its core innovation is the **Blended Attention (BA)** module. This module modifies the standard self-attention layers. It uses a two-stream approach (a noisy stream for generation and a clean reference stream for the image) and introduces trainable parameters within an Image Cross-Attention (imCA) term to bridge the distributional shift between clean and noisy latents.\n\n### Is the pipeline different from an existing pipeline?\nYes. The IT-Blender pipeline is distinct for a few reasons:\n1.  **Native Image Encoding**: It uses the diffusion model's own denoising network to encode the reference image by forwarding a clean version at \"t=0\". This avoids an external image encoder to better preserve details.\n2.  **Two-Stream Processing**: During training and inference, it processes a \"noisy stream\" for the text-guided generation and a \"reference stream\" for the clean visual concept image simultaneously.\n3.  **Blended Attention Integration**: The pipeline replaces standard self-attention modules with the new Blended Attention (BA) module, which is designed to physically separate textual and visual concept processing.\n\n### Why is this method useful?\nThe method is particularly effective for creative tasks like product design, character design, and graphic design, as shown by the extensive examples in the paper and project page. We believe it would be a valuable and unique addition to the `diffusers` library.\n\n### Open source status\n\n- [x] The model implementation is available.\n- [x] The model weights are available (Only relevant if addition is not a scheduler).\n\n### Provide useful links for the implementation\n\n**Demo page**: https://huggingface.co/spaces/WonwoongCho/IT-Blender\n**GitHub page for inference**: https://github.com/WonwoongCho/IT-Blender\nNote that we are using our own diffusers with a little bit of changes (`requirements.txt` in the github repo);\n\n**Changed Diffusers Pipeline for FLUX**: https://github.com/WonwoongCho/diffusers/blob/main/src/diffusers/pipelines/flux/pipeline_flux.py\n**Changed Diffusers Pipeline for SD1.5**: https://github.com/WonwoongCho/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py\n",
    "url": "https://github.com/huggingface/diffusers/issues/11961",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-20T03:07:38Z",
    "updated_at": "2025-07-20T03:08:06Z",
    "comments": 0,
    "user": "WonwoongCho"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39522,
    "title": "T5Gemma failing on provided example",
    "body": "### System Info\n\n- `transformers` version: 4.53.2\n- Platform: Linux-6.14.0-23-generic-x86_64-with-glibc2.41\n- Python version: 3.13.3\n- Huggingface_hub version: 0.33.4\n- Safetensors version: 0.5.3\n- Accelerate version: 1.8.1\n- Accelerate config: \t- compute_environment: LOCAL_MACHINE\n\t- distributed_type: NO\n\t- mixed_precision: bf16\n\t- use_cpu: False\n\t- debug: False\n\t- num_processes: 1\n\t- machine_rank: 0\n\t- num_machines: 1\n\t- gpu_ids: all\n\t- rdzv_backend: static\n\t- same_network: True\n\t- main_training_function: main\n\t- enable_cpu_affinity: True\n\t- downcast_bf16: no\n\t- tpu_use_cluster: False\n\t- tpu_use_sudo: False\n\t- tpu_env: []\n\t- dynamo_config: {'dynamo_backend': 'INDUCTOR'}\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.7.1+cu128 (CUDA)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: <fill in>\n- Using GPU in script?: <fill in>\n- GPU type: NVIDIA GeForce RTX 5060 Ti\n\n### Who can help?\n\n@ArthurZucker and @itazap \n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nRun the example from the T5Gemma docs page.\n```\necho -e \"Question: Why is the sky blue? Answer:\" | transformers run --task text2text-generation --model google/t5gemma-s-s-ul2 --device 0\n```\n\n### Expected behavior\n\nWhen I run I get:\n```\nFile \".venv/lib/python3.13/site-packages/transformers/configuration_utils.py\", line 209, in __getattribute__\n    return super().__getattribute__(key)\n           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^\nAttributeError: 'T5GemmaConfig' object has no attribute **'vocab_size'**\n```\nIndeed. The vocab_size is a sub attribute from encoder/decoder, not a direct attribute.\n",
    "url": "https://github.com/huggingface/transformers/issues/39522",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-19T11:07:26Z",
    "updated_at": "2025-08-27T07:51:08Z",
    "comments": 7,
    "user": "jadermcs"
  },
  {
    "repo": "pytorch/executorch",
    "number": 12659,
    "title": "Fix bug in export recipe logic where quantization output is not being forwarded and reexport if quantized.",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI've found couple of issues with the original export recipes logic has incomplete functionality:\n1. The output of quantize stage is not getting propagated to next stages\n2. When quantize stage is run, we should re-export the model before we lower to edge.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### RFC (Optional)\n\n_No response_\n\ncc @JacobSzwejbka @angelayi",
    "url": "https://github.com/pytorch/executorch/issues/12659",
    "state": "closed",
    "labels": [
      "module: exir",
      "triaged"
    ],
    "created_at": "2025-07-19T03:22:30Z",
    "updated_at": "2025-07-23T21:48:14Z",
    "user": "abhinaykukkadapu"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1540,
    "title": "Controlling robot with text using SmolVLA",
    "body": "Is it possible to control the robot with text inputs? I thought that's what a VLA model was...\n\nI cannot find any instructions on how to do this anywhere... \n\nI found this https://huggingface.co/masato-ka/smolvla_block_instruction ,  but control_robot was split into multiple files recently - none of which seem to work.\n\n",
    "url": "https://github.com/huggingface/lerobot/issues/1540",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-18T23:09:11Z",
    "updated_at": "2025-08-12T09:35:59Z",
    "user": "drain-pipe"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3473,
    "title": "\ud83d\udca1trace images are too small to see anything",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\n\nThe trace images in https://docs.pytorch.org/tutorials/intermediate/pinmem_nonblock.html are not quite readable because they are massively scaled down. Is it possible to make them clickable/zoom-able?\n\n<img width=\"901\" height=\"1120\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b5b339a6-edbd-4d06-8003-236d4f60db35\" />\n\nI was able to view them via browser's open image in a new tab feature and then zoom, but this is very cumbersome.\n\nThis probably applies to some other tutorials as well if they contains trace snapshots.\n\nthanks.\n\n### Existing tutorials on this topic\n\nhttps://docs.pytorch.org/tutorials/intermediate/pinmem_nonblock.html \n\n### Additional context\n\n_No response_\n\ncc @svekars @sekyondaMeta @AlannaBurke",
    "url": "https://github.com/pytorch/tutorials/issues/3473",
    "state": "open",
    "labels": [
      "website"
    ],
    "created_at": "2025-07-18T22:18:37Z",
    "updated_at": "2025-07-18T22:34:43Z",
    "comments": 0,
    "user": "stas00"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11956,
    "title": "Frequency-Decoupled Guidance (FDG) for diffusion models",
    "body": "FDG is a new method for applying CFG in the frequency domain. It improves generation quality at low CFG scales while inherently avoiding the harmful effects of high CFG values. It could be a nice addition to the guiders part of diffusers. The implementation details for FDG are available on page 19 of the paper.\n\nhttps://huggingface.co/papers/2506.19713",
    "url": "https://github.com/huggingface/diffusers/issues/11956",
    "state": "closed",
    "labels": [
      "help wanted",
      "Good second issue",
      "contributions-welcome",
      "advanced",
      "consider-for-modular-diffusers"
    ],
    "created_at": "2025-07-18T19:12:50Z",
    "updated_at": "2025-08-07T05:51:03Z",
    "comments": 5,
    "user": "Msadat97"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1415,
    "title": "[Feature request] Use omegaconf or hydra for the config system",
    "body": "Is there a plan to use Omegaconf or Hydra for the configuration system?\n\nThe current .toml-based configuration system is simple but verbose: it does not support configuration inheritance or composition, which prevents config reuse. \n\nIf this is needed, I am interested in contributing an alternative configuration solution based on Omegaconf.",
    "url": "https://github.com/pytorch/torchtitan/issues/1415",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-18T18:28:34Z",
    "updated_at": "2025-07-19T00:49:55Z",
    "comments": 3,
    "user": "yzhao30"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7689,
    "title": "BadRequestError for loading dataset?",
    "body": "### Describe the bug\n\nUp until a couple days ago I was having no issues loading `Helsinki-NLP/europarl` and `Helsinki-NLP/un_pc`, but now suddenly I get the following error:\n\n```\nhuggingface_hub.errors.BadRequestError: (Request ID: ...)\n\nBad request:\n* Invalid input: expected array, received string * at paths * Invalid input: expected boolean, received string * at expand\n\u2716 Invalid input: expected array, received string\n  \u2192 at paths\n\u2716 Invalid input: expected boolean, received string\n  \u2192 at expand\n```\n\nI tried with both `4.0.0` and `3.5.1` since this dataset uses `trust_remote_code`, but I get the same error with both.\n\nWhat can I do to load the dataset? I checked the documentation and GitHub issues here, but couldn't find a solution.\n\n### Steps to reproduce the bug\n\n```python\nimport datasets\nds = datasets.load_dataset(\"Helsinki-NLP/europarl\", \"en-fr\", streaming=True, trust_remote_code=True)[\"train\"]\n```\n\n### Expected behavior\n\nThat the dataset loads as it did a couple days ago.\n\n### Environment info\n\n- `datasets` version: 3.5.1\n- Platform: Linux-4.18.0-513.24.1.el8_9.x86_64-x86_64-with-glibc2.28\n- Python version: 3.11.11\n- `huggingface_hub` version: 0.30.2\n- PyArrow version: 20.0.0\n- Pandas version: 2.2.2\n- `fsspec` version: 2024.6.1",
    "url": "https://github.com/huggingface/datasets/issues/7689",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-18T09:30:04Z",
    "updated_at": "2025-07-18T11:59:51Z",
    "comments": 17,
    "user": "WPoelman"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11951,
    "title": "Kontext model loading quantization problem",
    "body": "Hello, can kontext be loaded quantitatively at present? Because I only have a 4090 with 24g video memory, the current fp16 loading method will cause OOM. Like flux, can it be loaded with torchao or gguf, so that this model can run on 4090?",
    "url": "https://github.com/huggingface/diffusers/issues/11951",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-18T03:20:48Z",
    "updated_at": "2025-07-18T05:39:28Z",
    "comments": 2,
    "user": "babyta"
  },
  {
    "repo": "pytorch/executorch",
    "number": 12627,
    "title": "How to build executorch for  Cortex-A cpu",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI wan to run executorch in Cortex-A cpu devices;\nHow can i do?\nThank you very much\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### RFC (Optional)\n\n_No response_",
    "url": "https://github.com/pytorch/executorch/issues/12627",
    "state": "closed",
    "labels": [
      "need-user-input",
      "triaged"
    ],
    "created_at": "2025-07-18T01:34:51Z",
    "updated_at": "2025-07-21T12:28:34Z",
    "user": "barbecacov"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39484,
    "title": "Transformers still tries to use apex.amp which is no longer a thing in apex.",
    "body": "### System Info\n\n\n```\nroot@12bb27e08b1b:/# pip show transformers\nName: transformers\nVersion: 4.52.3\n```\n\n\ntrainer.py contains this:\n```\nif is_apex_available():\n    from apex import amp\n```\n\nApex (built from source, as they recommend) does no longer come with amp.\n\nHow to reproduce?\n1. install transformers\n2. install apex\n3. python `from trl import SFTTrainer`\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nHow to reproduce?\n1. install transformers\n2. install apex\n3. python `from trl import SFTTrainer`\n\n### Expected behavior\n\n\nThere should not be `from apex import amp` in the code base",
    "url": "https://github.com/huggingface/transformers/issues/39484",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-17T16:43:14Z",
    "updated_at": "2025-08-25T08:03:03Z",
    "comments": 4,
    "user": "yselivonchyk"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7688,
    "title": "No module named \"distributed\"",
    "body": "### Describe the bug\n\nhello, when I run the command \"from datasets.distributed import split_dataset_by_node\", I always met the bug \"No module named 'datasets.distributed\" in different version like 4.0.0, 2.21.0 and so on. How can I solve this?\n\n### Steps to reproduce the bug\n\n1. pip install datasets\n2. from datasets.distributed import split_dataset_by_node\n\n### Expected behavior\n\nexpecting the command \"from datasets.distributed import split_dataset_by_node\" can be ran successfully\n\n### Environment info\n\npython: 3.12",
    "url": "https://github.com/huggingface/datasets/issues/7688",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-17T09:32:35Z",
    "updated_at": "2025-07-25T15:14:19Z",
    "comments": 3,
    "user": "yingtongxiong"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 220,
    "title": "A little question: why num examples is much less than the total amount of my training dataset?",
    "body": "I am using this repo to SFT a model, and I notice that:\n\nI print the total amount of my training dataset, which is 7473\n\n`Number of raw training samples: 7473`\n\nBut during training, I find the log:\n\n[INFO|trainer.py:2314] 2025-07-17 17:03:23,908 >> ***** Running training *****\n[INFO|trainer.py:2315] 2025-07-17 17:03:23,908 >>   Num examples = 698\n[INFO|trainer.py:2316] 2025-07-17 17:03:23,908 >>   Num Epochs = 3\n[INFO|trainer.py:2317] 2025-07-17 17:03:23,908 >>   Instantaneous batch size per device = 2\n[INFO|trainer.py:2320] 2025-07-17 17:03:23,908 >>   Total train batch size (w. parallel, distributed & accumulation) = 32\n[INFO|trainer.py:2321] 2025-07-17 17:03:23,908 >>   Gradient Accumulation steps = 4\n[INFO|trainer.py:2322] 2025-07-17 17:03:23,908 >>   Total optimization steps = 66\n[INFO|trainer.py:2323] 2025-07-17 17:03:23,910 >>   Number of trainable parameters = 7,612,756,480\n\nI am using a machine with 8 A100. Could anyone explain it?  I am afraid I didn't use the whole dataset but only 698 of 7473 samples to train...",
    "url": "https://github.com/huggingface/alignment-handbook/issues/220",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-17T09:12:08Z",
    "updated_at": "2025-07-23T23:30:33Z",
    "comments": 3,
    "user": "Red-Scarff"
  },
  {
    "repo": "pytorch/ao",
    "number": 2566,
    "title": "FP8 PerRow quantization (CUDA capability>=9.0)",
    "body": "I found a description as below:\n--------------------------------------------------------------------------------------------------------------\nA8W8 Float8 Dynamic Quantization with Rowwise Scaling\n# for torch 2.5+\nfrom torchao.quantization import quantize_, PerRow, Float8DynamicActivationFloat8WeightConfig\nquantize_(model, Float8DynamicActivationFloat8WeightConfig(granularity=PerRow()))\nPer-row scaling is only supported for bfloat16 weight and activation. This API is only tested on H100. Hardware with CUDA compute capability 8.9 or greater is required.\n----------------------------------------------------------------------------------------------------------------\nwhich said \"CUDA compute capability 8.9 or greater is required.\".But actually, I found that PerRow() needs CUDA compute capability >=9.0, as in the code  \n-------------------------------------------------------------------------------------------------------------\nFile \"/opt/conda/lib/python3.11/site-packages/torchao/quantization/quant_api.py\", line 1475, in _normalize_granularity\n    assert is_sm_at_least_90() or is_MI300(), (\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError: PerRow quantization only works for CUDA>=9.0 and MI300+\n----------------------------------------------------------------------------------------------------------\nI use torchao==0.11.0, so is there a typo mistake or the code was wrong?",
    "url": "https://github.com/pytorch/ao/issues/2566",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-17T04:04:24Z",
    "updated_at": "2025-07-17T18:26:55Z",
    "comments": 2,
    "user": "zzlin-0629"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3691,
    "title": "\u2753 [Question] How to understand the value of this project",
    "body": "## \u2753 Question\n\nI am sorry for I did not use this tool before. but since there is a `tensorrt` released in Nvidia tensorrt lib, and this project depends on the Nvidia tensorrt lib, so what is the value of this project? Is it more safe to use this tool to convert pytorch checkpoints to tensorrt engine file directly,  then that with  pytorch->onnx -> tensorrt pipeline?   I had tired to convert my checkpoint to onnx, AMP trained, and no error on onnx fp32,  then I use trtexec to convert the onnx to tensorrt engine file, fp16, an bug-in trt file generated and can not be used for inferece.   Can I use this package to directly convert checkpoint to trt file, without the inner bugs? or if there is inner-bug, the conversion will report witch line of my pytorch model code triggered this bug?   \nThe report of polygraphy is too hard to find back which line is the bad code.\n\n## What you have already tried\n\n<!-- A clear and concise description of what you have already done. -->\n\n## Environment\n\n> Build information about Torch-TensorRT can be found by turning on debug messages\n\n - PyTorch Version (e.g., 1.0):\n - CPU Architecture:\n - OS (e.g., Linux):\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\n - Build command you used (if compiling from source):\n - Are you using local sources or building from archives:\n - Python version:\n - CUDA version:\n - GPU models and configuration:\n - Any other relevant information:\n\n## Additional context\n\n<!-- Add any other context about the problem here. -->\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3691",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-07-17T03:47:19Z",
    "updated_at": "2025-08-19T07:22:22Z",
    "user": "JohnHerry"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11945,
    "title": "Floating point exception with nightly PyTorch and CUDA",
    "body": "### Describe the bug\n\nWhen running any code snippet using diffusers it fails with floating point exception, and doesn't print any traceback.\n\nFor example this one would cause the issue (the example of Stable Diffusion 3.5 medium):\n\n```\nimport torch\nfrom diffusers import StableDiffusion3Pipeline\n\npipe = StableDiffusion3Pipeline.from_pretrained(\"stabilityai/stable-diffusion-3.5-medium\", torch_dtype=torch.bfloat16)\npipe = pipe.to(\"cuda\")\n\nimage = pipe(\n    \"A capybara holding a sign that reads Hello World\",\n    num_inference_steps=40,\n    guidance_scale=4.5,\n).images[0]\nimage.save(\"capybara.png\")\n```\n\n\nThe issue could be with upstream PyTorch or CUDA, but we'd need to identify what of Diffusers is causing it.\n\n### Reproduction\n\nNot too sure as it's my first time with Diffusers but as suggested by [John6666](https://discuss.huggingface.co/u/John6666/summary) any NVIDIA GeForce RTX 5000 series... In my case it's a 16gb 5060 Ti. Perhaps CUDA 575.57.08 with CUDA version 12.9 and/or PyTorch 2.9.0.dev20250716+cu129?\n\n### Logs\n\n```shell\nLet me know how can I retrieve any logs you might need.\n```\n\n### System Info\n\n`diffusers-cli env` also causes a Floating point exception, but here you have environment information:\n\n**OS**: Debian 12\n\n```\nnvidia-smi\nWed Jul 16 15:58:48 2025       \n+-----------------------------------------------------------------------------------------+\n| NVIDIA-SMI 575.57.08              Driver Version: 575.57.08      CUDA Version: 12.9     |\n|-----------------------------------------+------------------------+----------------------+\n| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |\n| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |\n|                                         |                        |               MIG M. |\n|=========================================+========================+======================|\n|   0  NVIDIA GeForce RTX 5060 Ti     On  |   00000000:01:00.0  On |                  N/A |\n|  0%   42C    P5              4W /  180W |      10MiB /  16311MiB |      0%      Default |\n|                                         |                        |                  N/A |\n+-----------------------------------------+------------------------+----------------------+\n                                                                                         \n+-----------------------------------------------------------------------------------------+\n| Processes:                                                                              |\n|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |\n|        ID   ID                                                               Usage      |\n|=========================================================================================|\n|  No running processes found                                                             |\n+-----------------------------------------------------------------------------------------+\n```\n\n```\npip list\nPackage                  Version\n------------------------ ------------------------\nbitsandbytes             0.46.1\ncertifi                  2025.7.14\ncharset-normalizer       3.4.2\ndiffusers                0.34.0\nfilelock                 3.18.0\nfsspec                   2025.7.0\nhf-xet                   1.1.5\nhuggingface-hub          0.33.4\nidna                     3.10\nimportlib_metadata       8.7.0\nJinja2                   3.1.6\nMarkupSafe               3.0.2\nmpmath                   1.3.0\nnetworkx                 3.5\nnumpy                    2.3.1\nnvidia-cublas-cu12       12.9.1.4\nnvidia-cuda-cupti-cu12   12.9.79\nnvidia-cuda-nvrtc-cu12   12.9.86\nnvidia-cuda-runtime-cu12 12.9.79\nnvidia-cudnn-cu12        9.10.2.21\nnvidia-cufft-cu12        11.4.1.4\nnvidia-cufile-cu12       1.14.1.1\nnvidia-curand-cu12       10.3.10.19\nnvidia-cusolver-cu12     11.7.5.82\nnvidia-cusparse-cu12     12.5.10.65\nnvidia-cusparselt-cu12   0.7.1\nnvidia-nccl-cu12         2.27.5\nnvidia-nvjitlink-cu12    12.9.86\nnvidia-nvshmem-cu12      3.3.9\nnvidia-nvtx-cu12         12.9.79\npackaging                25.0\npillow                   11.2.1\npip                      23.0.1\npytorch-triton           3.4.0+gitae848267\nPyYAML                   6.0.2\nregex                    2024.11.6\nrequests                 2.32.4\nsafetensors              0.5.3\nsetuptools               66.1.1\nsympy                    1.14.0\ntorch                    2.9.0.dev20250716+cu129\ntorchaudio               2.8.0.dev20250716+cu129\ntorchvision              0.24.0.dev20250716+cu129\ntqdm                     4.67.1\ntriton                   3.3.1\ntyping_extensions        4.14.1\nurllib3                  2.5.0\nzipp                     3.23.0\n```\n\nDon't hesitate to tell me any other info you might need.\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11945",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-17T03:16:02Z",
    "updated_at": "2025-08-02T13:48:05Z",
    "comments": 1,
    "user": "MxtAppz"
  },
  {
    "repo": "huggingface/course",
    "number": 1009,
    "title": "How Transformers solve tasks - ASR section refers to task using Whisper but task actually uses Wav2Vec2",
    "body": "The [Automatic speech recognition](https://huggingface.co/learn/llm-course/chapter1/5?fw=pt#automatic-speech-recognition) segment of Section 1 \"Transformer Models\" > \"How \ud83e\udd17 Transformers solve tasks\" refers to \n\n> Check out our complete [automatic speech recognition guide](https://huggingface.co/docs/transformers/tasks/asr) to learn how to finetune Whisper and use it for inference!\n\nHowever the guide actually uses Wav2Vec2, not Whisper.\n\nThis is a dual request:\n\n1. Update the segment in question to refer to Wav2Vec2\n2. Update the task to use Whisper",
    "url": "https://github.com/huggingface/course/issues/1009",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-16T23:25:55Z",
    "updated_at": "2025-07-16T23:25:55Z",
    "user": "renet10"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11930,
    "title": "how to run convert_cosmos_to_diffusers.py correctly?",
    "body": "### Describe the bug\n\nhi. I have tried to convert the cosmos-transfer1's base model to diffuers using \"convert_cosmos_to_diffusers.py\" code with options --transformer_type Cosmo\ns-1.0-Diffusion-7B-Video2World --vae_type CV8x8x8-1.0 --transformer_ckpt_path ../fsdp_edge_v1/iter_000016000_ema_model_only.pt --output_path ./convert_to_diffusers\nbut I got error \n```Traceback (most recent call last):\n  File \"/home1/jovyan/workspace/cosmos-transfer1/diffusers/../convert_cosmos_to_diffusers.py\", line 485, in <module>\n    transformer = convert_transformer(args.transformer_type, args.transformer_ckpt_path, weights_only)\n  File \"/home1/jovyan/workspace/cosmos-transfer1/diffusers/../convert_cosmos_to_diffusers.py\", line 358, in convert_transformer\n    transformer.load_state_dict(original_state_dict, strict=True, assign=True)\n  File \"/opt/conda/envs/cosmos-transfer1/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 2581, in load_state_dict\n    raise RuntimeError(\nRuntimeError: Error(s) in loading state_dict for CosmosTransformer3DModel:\n        Missing key(s) in state_dict: \"transformer_blocks.3.norm1.linear_1.weight\", \"transformer_blocks.3.norm1.linear_2.weight\", \"transformer_blocks.3.attn1.norm_q.weight\", \"transformer_blocks.3.attn1.norm_k.weight\", \"transformer_blocks.3.attn1.to_q.weight\", \"transformer_blocks.3.attn1.to_k.weight\", \"transformer_blocks.3.attn1.to_v.weight\", \"transformer_blocks.3.attn1.to_out.0.weight\", \"transformer_blocks.3.norm2.linear_1.weight\", \"transformer_blocks.3.norm2.linear_2.weight\", \"transformer_blocks.3.attn2.norm_q.weight\", \"transformer_blocks.3.attn2.norm_k.weight\", \"transformer_blocks.3.attn2.to_q.weight\", \"transformer_blocks.3.attn2.to_k.weight\", \"transformer_blocks.3.attn2.to_v.weight\", \"transformer_blocks.3.attn2.to_out.0.weight\", \"transformer_blocks.3.norm3.linear_1.weight\", \"transformer_blocks.3.norm3.linear_2.weight\", \"transformer_blocks.3.ff.net.0.proj.weight\", \"transformer_blocks.3.ff.net.2.weight\", \"transformer_blocks.4.norm1.linear_1.weight\", \"transformer_blocks.4.norm1.linear_2.weight\", \"transformer_blocks.4.attn1.norm_q.weight\", \"transformer_blocks.4.attn1.norm_k.weight\", \"transformer_blocks.4.attn1.to_q.weight\", \"transformer_blocks.4.attn1.to_k.weight\", \"transformer_blocks.4.attn1.to_v.weight\", \"transformer_blocks.4.attn1.to_out.0.weight\", \"transformer_blocks.4.norm2.linear_1.weight\", \"transformer_blocks.4.norm2.linear_2.weight\", \"transformer_blocks.4.attn2.norm_q.weight\", \"transformer_blocks.4.attn2.norm_k.weight\", \"transformer_blocks.4.attn2.to_q.weight\", \"transformer_blocks.4.attn2.to_k.weight\", \"transformer_blocks.4.attn2.to_v.weight\", \"transformer_blocks.4.attn2.to_out.0.weight\", \"transformer_blocks.4.norm3.linear_1.weight\", \"transformer_blocks.4.norm3.linear_2.weight\", \"transformer_blocks.4.ff.net.0.proj.weight\", \"transformer_blocks.4.ff.net.2.weight\", \"transformer_blocks.5.norm1.linear_1.weight\", \"transformer_blocks.5.norm1.linear_2.weight\", \"transformer_blocks.5.attn1.norm_q.weight\", \"transformer_blocks.5.attn1.norm_k.weight\", \"transformer_blocks.5.attn1.to_q.weight\", \"transformer_blocks.5.attn1.to_k.weight\", \"transformer_blocks.5.attn1.to_v.weight\", \"transformer_blocks.5.attn1.to_out.0.weight\", \"transformer_blocks.5.norm2.linear_1.weight\", \"transformer_blocks.5.norm2.linear_2.weight\", \"transformer_blocks.5.attn2.norm_q.weight\", \"transformer_blocks.5.attn2.norm_k.weight\", \"transformer_blocks.5.attn2.to_q.weight\", \"transformer_blocks.5.attn2.to_k.weight\", \"transformer_blocks.5.attn2.to_v.weight\", \"transformer_blocks.5.attn2.to_out.0.weight\", \"transformer_blocks.5.norm3.linear_1.weight\", \"transformer_blocks.5.norm3.linear_2.weight\", \"transformer_blocks.5.ff.net.0.proj.weight\", \"transformer_blocks.5.ff.net.2.weight\", \"transformer_blocks.6.norm1.linear_1.weight\", \"transformer_blocks.6.norm1.linear_2.weight\", \"transformer_blocks.6.attn1.norm_q.weight\", \"transformer_blocks.6.attn1.norm_k.weight\", \"transformer_blocks.6.attn1.to_q.weight\", \"transformer_blocks.6.attn1.to_k.weight\", \"transformer_blocks.6.attn1.to_v.weight\", \"transformer_blocks.6.attn1.to_out.0.weight\", \"transformer_blocks.6.norm2.linear_1.weight\", \"transformer_blocks.6.norm2.linear_2.weight\", \"transformer_blocks.6.attn2.norm_q.weight\", \"transformer_blocks.6.attn2.norm_k.weight\", \"transformer_blocks.6.attn2.to_q.weight\", \"transformer_blocks.6.attn2.to_k.weight\", \"transformer_blocks.6.attn2.to_v.weight\", \"transformer_blocks.6.attn2.to_out.0.weight\", \"transformer_blocks.6.norm3.linear_1.weight\", \"transformer_blocks.6.norm3.linear_2.weight\", \"transformer_blocks.6.ff.net.0.proj.weight\", \"transformer_blocks.6.ff.net.2.weight\", \"transformer_blocks.7.norm1.linear_1.weight\", \"transformer_blocks.7.norm1.linear_2.weight\", \"transformer_blocks.7.attn1.norm_q.weight\", \"transformer_blocks.7.attn1.norm_k.weight\", \"transformer_blocks.7.attn1.to_q.weight\", \"transformer_blocks.7.attn1.to_k.weight\", \"transformer_blocks.7.attn1.to_v.weight\", \"transformer_blocks.7.attn1.to_out.0.weight\", \"transformer_blocks.7.norm2.linear",
    "url": "https://github.com/huggingface/diffusers/issues/11930",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-15T16:20:09Z",
    "updated_at": "2025-07-15T16:24:47Z",
    "user": "dedoogong"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39426,
    "title": "object detection : matchin outputs.last_hidden_state with results",
    "body": "### Feature request\n\nit seems to me that would be possible with a little modification in the function post_process_object_detection\n\nwith\n```\n``for score, label, box, index in zip(scores, labels, boxes, indexes):\n            results.append(\n                {\n                    \"scores\": score[score > threshold],\n                    \"labels\": label[score > threshold],\n                    \"boxes\": box[score > threshold],\n                    \"indexes\": index[score > threshold],\n                }\n            )``\n```\n and then \n`outputs.last_hidden_state[0][results[0]['indexes']] `\ngives me the desired vector features\n\nAm I right or is there a better way to obtain this matching ? \n\nThanks for your help\n\n### Motivation\n\nI would like to use outputs.last_hidden_state as features for auxiliary tasks. So I need to know the label and the bounding box associated to one given vector of outputs.last_hidden_state\n\n### Your contribution\n\nI am not a top coder and do not know how to submit a PR",
    "url": "https://github.com/huggingface/transformers/issues/39426",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-07-15T13:34:08Z",
    "updated_at": "2025-07-22T11:08:23Z",
    "comments": 5,
    "user": "fenaux"
  },
  {
    "repo": "huggingface/peft",
    "number": 2647,
    "title": "How can I merge the original model weights with LoRA weights?",
    "body": "I'm currently fine-tuning Qwen2.5_VL. Specifically, I used PEFT for LoRA fine-tuning on the linear layers of the LLM part. Meanwhile, I performed regular fine-tuning on other components like visual.merger and embed_tokens (with param.requires_grad set to True). After generating the files, as follow:\n\n<img width=\"946\" height=\"691\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b863a12f-956b-4797-bbfa-769518e73c33\" />\nI exported pytorch_model.bin using zero_to_fp32.py. When I printed the weight keys of the pytorch_model.bin file, I noticed that the original weights and LoRA weights weren't merged. Here's an example:\n\n```\nbase_model.model.model.language_model.layers.0.self_attn.q_proj.base_layer.weight: shape=(2048, 2048), dtype=torch.bfloat16\nbase_model.model.model.language_model.layers.0.self_attn.q_proj.base_layer.bias: shape=(2048,), dtype=torch.bfloat16\nbase_model.model.model.language_model.layers.0.self_attn.q_proj.lora_A.default.weight: shape=(8, 2048), dtype=torch.bfloat16\nbase_model.model.model.language_model.layers.0.self_attn.q_proj.lora_B.default.weight: shape=(2048, 8), dtype=torch.bfloat16\n```\n\nCould you tell me how to merge them? If I use\n`model = model.merge_and_unload()`\nI need the base_model. However, I no longer have the original base_model, and the original Qwen_2.5_VL model isn't suitable because apart from LoRA fine-tuning the linear layers, I also fine-tuned visual.merger and embed_tokens.\n\nHow can I solve this problem? Thank you!\n",
    "url": "https://github.com/huggingface/peft/issues/2647",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-15T11:40:33Z",
    "updated_at": "2025-08-23T15:03:44Z",
    "comments": 4,
    "user": "guoguo1314"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39421,
    "title": "Speculative Decoding(do_sample=False) get different outputs",
    "body": "> @transcend-0 hey!\n> \n> \n> \n> The issue was solved in [#30068](https://github.com/huggingface/transformers/pull/30068). You can install transformers from `main` with the following line for the correct generation with assisted decoding:\n> \n> \n> \n> `!pip install --upgrade git+https://github.com/huggingface/transformers.git` \n\n _Originally posted by @zucchini-nlp in [#30608](https://github.com/huggingface/transformers/issues/30608#issuecomment-2089846816)_\n\n### **System Info**\n\nPython 3.10.11\ntransformers 4.49.0\ntorch 2.6.0+cu124\n\n### **Same Reproduction**\nTarget_Model  = Qwen2.5-32B-Instruct\nDraft_Model = Qwen2.5-7B-Instruct\n\n\n`question = \"Dienes are organic compounds with two adjacent double bonds in their structure, and they exhibit unique reactivity due to their conjugated pi-electron system. They play a significant role in organic chemistry and are involved in various chemical reactions and natural processes.\\nAmong the given options which one is the possible reactant (A) for the given reaction also mention the correct sequence of the dienes according to their reactivity ( most reactive to least reactive) B.\\nCyclohexene + A ---> 8,8-diiodobicyclo[4.2.0]octan-7-one\\n(B) 1. 2,3-dimethylbuta-1,3-diene, 2. (2E,4E)-hexa-2,4-diene, 3. (2E,4E)-hexa-2,4-diene, 4. (2Z,4Z)-hexa-2,4-diene\\n\\n\\nA. A = 2,2-diiodoethen-1-one, B = 3, 1, 2, 4\\nB. A = 2,2-diiodoethen-1-one, B = 4, 2, 1, 3\\nC. A = 4,4-diiodocyclobut-2-en-1-one, B = 3, 1, 2, 4\\nD. A = 4,4-diiodocyclobut-2-en-1-one, B = 4, 2, 1, 3\\n\\n\"`\n`prompt = '<|im_start|>user' + question + 'Please reason step-by-step and put your choice letter without any other text with \\\\boxed{} in the end.'`\n\n`['userDienes are organic compounds with two adjacent double bonds in their structure, and they exhibit unique reactivity due to their conjugated pi-electron system. They play a significant role in organic chemistry and are involved in various chemical reactions and natural processes.\\nAmong the given options which one is the possible reactant (A) for the given reaction also mention the correct sequence of the dienes according to their reactivity ( most reactive to least reactive) B.\\nCyclohexene + A ---> 8,8-diiodobicyclo[4.2.0]octan-7-one\\n(B) 1. 2,3-dimethylbuta-1,3-diene, 2. (2E,4E)-hexa-2,4-diene, 3. (2E,4E)-hexa-2,4-diene, 4. (2Z,4Z)-hexa-2,4-diene\\n\\n\\nA. A = 2,2-diiodoethen-1-one, B = 3, 1, 2, 4\\nB. A = 2,2-diiodoethen-1-one, B = 4, 2, 1, 3\\nC. A = 4,4-diiodocyclobut-2-en-1-one, B = 3, 1, 2, 4\\nD. A = 4,4-diiodocyclobut-2-en-1-one, B = 4, 2, 1, 3\\n\\nPlease reason step-by-step and put your choice letter without any other text with \\\\boxed{} in the end. To solve this problem, we need to identify the reactant \\\\( A \\\\) that can react with cyclohexene to form 8,8-diiodobicyclo[4.2.0]octan-7-one. We also need to determine the correct sequence of the dienes according to their reactivity from most reactive to least reactive.\\n\\n### Step-by-Step Reasoning:\\n\\n1. **Identify the Product:**\\n   - The product is 8,8-diiodobicyclo[4.2.0]octan-7-one. This suggests that the reactant \\\\( A \\\\) must be a compound that can undergo a Diels-Alder reaction with cyclohexene to form the bicyclic structure and then iodination at the appropriate positions.\\n\\n2. **Reactant Identification:**\\n   - The reactant \\\\( A \\\\) should be a dienophile (a compound with a double bond that can participate in a Diels-Alder reaction). Among the given options, the possible candidates are:\\n     - 2,2-diiodoethen-1-one\\n     - 4,4-diiodocyclobut-2-en-1-one\\n\\n3. **Diels-Alder Reaction:**\\n   - Cyclohexene is a diene, and it will react with a dienophile to form a bicyclic structure. The dienophile should have a double bond that can react with the diene to form the desired product.\\n   - 2,2-diiodoethen-1-one has a double bond and iodine substituents, making it a suitable dienophile.\\n   - 4,4-diiodocyclobut-2-en-1-one also has a double bond but is more complex and less likely to form the desired product directly.\\n\\n4. **Sequence of Dienes According to Reactivity:**\\n   - The reactivity of dienes depends on the stability of the conjugated pi-electron system.\\n   - Generally, the order of reactivity from most reactive to least reactive is:\\n     1. (2E,4E)-hexa-2,4-diene (most stable and reactive)\\n     2. (2E,4E)-hexa-2,4-diene (same as above)\\n     3. 2,3-dimethylbuta-1,3-diene (less stable due to steric hindrance)\\n     4. (2Z,4Z)-hexa-2,4-diene (least stable due to cis configuration)\\n\\n5. **Matching Options:**\\n   - Option A: \\\\( A = 2,2 \\\\)-diiodoethen-1-one, B = 3, 1, 2, 4\\n   - Option B: \\\\( A = 2,2 \\\\)-diiodoethen-1-one, B = 4, 2, 1, 3\\n   - Option C: \\\\( A = 4,4 \\\\)-diiodocyclobut-2-en-1-one, B = 3, 1, 2, 4\\n   - Option D: \\\\( A = 4,4 \\\\)-diiodocyclobut-2-en-1-one, B = 4, 2, 1, 3\\n\\nGiven the correct sequence of dienes and the suitable dienophile, the correct option is:\\n\\n\\\\boxed{A}']`\n- targetDecoding - Running time: 41.82 s`\n\n`['userDienes are organic compounds with two adjacent double bonds in thei",
    "url": "https://github.com/huggingface/transformers/issues/39421",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-15T11:36:31Z",
    "updated_at": "2025-07-19T03:11:04Z",
    "comments": 13,
    "user": "nighty8"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3683,
    "title": "\u2753 [Question]   HELP:dynamic shape of offset and input is not supported in aten_ops_embedding_bag converter",
    "body": "## offset and input  with dynamic shape  is not supported \nIts failed When using tensorrt to  compile embedding bag module with dynamic shape in aot mode,\nWhat confuses me is whether the  aten_ops_embedding_bag converter supports dynamic shapes for the offset and indices parameters. \nThe official test demo only covers the scenario where the weight has a dynamic shape.\nHowever, during my tests, I found that an  negative dimensions  error occurs when offset and input is set to a dynamic shape.\n\n##  Test Code Demo \n```\n\nclass EmbeddingBagModel(nn.Module):\n    def __init__(self, num_embeddings, embedding_dim, hidden_dim=128, mode='mean'):\n        super().__init__()\n        self.embedding_bag = nn.EmbeddingBag(\n            num_embeddings=num_embeddings,\n            embedding_dim=embedding_dim,\n            mode=mode,\n            sparse=False\n        )\n        nn.init.uniform_(self.embedding_bag.weight, -0.1, 0.1)\n\n        self.mlp = nn.Sequential(\n            nn.Linear(embedding_dim, hidden_dim),\n            nn.ReLU(),\n            #nn.BatchNorm1d(hidden_dim),\n            nn.Linear(hidden_dim, 1)\n        )\n        self.sigmoid = nn.Sigmoid()\n    def forward(self, input, offsets):\n        embedded = self.embedding_bag(input, offsets)\n        embedded = embedded.reshape(-1,1,embedding_dim)\n        hidden = self.mlp(embedded)\n        output = self.sigmoid(hidden)\n        return output\n# main\nnum_embeddings = 10000\nembedding_dim = 64\nhidden_dim = 128\nbatch_size = 8\nseq_length = 4\nmodel = EmbeddingBagModel(num_embeddings, embedding_dim, hidden_dim).cuda()\ninput_tensor = torch.randint(0, num_embeddings, (batch_size * seq_length,), dtype=torch.int32).cuda()\noffsets_tensor = torch.arange(0, batch_size * seq_length, seq_length, dtype=torch.int32).cuda()\ninputs=(input_tensor, offsets_tensor)\ndynamic_shapes={\n       \"input\": { 0: torch.export.Dim(\"dyn_dim_in\", min=2, max=32),},\n       \"offsets\": { 0: torch.export.Dim(\"dyn_dim_off\", min=2, max=32),},\n  }\n fx_model = torch.export.export(model, inputs, dynamic_shapes=dynamic_shapes)\n trt_model= torch_tensorrt.dynamo.compile(\n            fx_model,\n            inputs=inputs,\n            enable_precisions=torch.float32,\n            min_block_size=1\n            )\n\n```\n \n## Error log\n\n```\n File \"/usr/local/lib/python3.12/dist-packages/torch_tensorrt/dynamo/_compiler.py\", line 288, in compile\n    trt_gm = compile_module(\n             ^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch_tensorrt/dynamo/_compiler.py\", line 462, in compile_module\n    trt_module = convert_module(\n                 ^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch_tensorrt/dynamo/conversion/_conversion.py\", line 142, in convert_module\n    interpreter_result = interpret_module_to_result(\n                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch_tensorrt/dynamo/conversion/_conversion.py\", line 121, in interpret_module_to_result\n    interpreter_result = interpreter.run()\n                         ^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py\", line 610, in run\n    self._construct_trt_network_def()\n  File \"/usr/local/lib/python3.12/dist-packages/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py\", line 347, in _construct_trt_network_def\n    super().run()\n  File \"/usr/local/lib/python3.12/dist-packages/torch/fx/interpreter.py\", line 146, in run\n    self.env[node] = self.run_node(node)\n                     ^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py\", line 676, in run_node\n    trt_node: torch.fx.Node = super().run_node(n)\n                              ^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch/fx/interpreter.py\", line 203, in run_node\n    return getattr(self, n.op)(n.target, args, kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py\", line 785, in call_function\n    return converter(self.ctx, target, args, kwargs, self._cur_node_name)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch_tensorrt/dynamo/conversion/converter_utils.py\", line 526, in convert_with_type_enforcement\n    return func(ctx, target, new_args, new_kwargs, name)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch_tensorrt/dynamo/conversion/aten_ops_converters.py\", line 313, in aten_ops_embedding_bag\n    return impl.embedding.embedding_bag(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/torch_tensorrt/dynamo/conversion/impl/embedding.py\", line 401, in embedding_bag\n    return embedding_bag_with_ITensor_offsets(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages",
    "url": "https://github.com/pytorch/TensorRT/issues/3683",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-07-15T09:01:39Z",
    "updated_at": "2025-09-09T20:44:07Z",
    "user": "theflyfish"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1508,
    "title": "so101_dualarm_triplecam config to evaluate ACT policy?",
    "body": "I recently fine-tuned an ACT policy where my data was from 3 cameras (1 overhead + 2 wrist) and two so101's. Then I tried to evaluate it but noticed there is currently a config file missing to support this. Does or will this support exist soon?",
    "url": "https://github.com/huggingface/lerobot/issues/1508",
    "state": "open",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-07-15T03:44:32Z",
    "updated_at": "2025-08-12T09:30:41Z",
    "user": "sebastiandavidlee"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39410,
    "title": "FP8 training support for Model Parallel / Tensor Parallel (MP/TP)",
    "body": "### Feature request\n\nI recieve message \"ValueError: The model you are trying to fine-tune is quantized with QuantizationMethod.FP8 but that quantization method do not support training. Please open an issue on GitHub: https://github.com/huggingface/transformers to request the support for training support for QuantizationMethod.FP8\" when trying to finetune a fp8 model.\nI have learned from the documentations that fp8 models can be trained with ddp, zero or fsdp. Is there a way to do it with MP/TP for huge fp8 models?\n\n### Motivation\n\nEnable finetuning huge fp8 models, like Qwen/Qwen3-235B-A22B-FP8\n\n### Your contribution\n\nI'm afraid it's too tough for me, but I'll do whatever I can if you need.",
    "url": "https://github.com/huggingface/transformers/issues/39410",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-07-15T02:13:05Z",
    "updated_at": "2025-07-15T13:30:27Z",
    "comments": 2,
    "user": "edgeinfinity1"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39409,
    "title": "TypeError: couldn't find storage object Float8_e4m3fnStorage - which version is needed for this?",
    "body": "Tested so many versions but can't find a version that won't give this error\n\n\n```\n!pip install bitsandbytes==0.45.0 --upgrade\n!pip install insightface --upgrade\n!pip install huggingface_hub==0.25.1 hf_transfer diffusers==0.31.0 transformers==4.36.0\n!pip uninstall xformers triton --yes\n!pip install torch==2.2.0+cu121 torchvision --index-url https://download.pytorch.org/whl/cu121\n!pip install xformers==0.0.24 --index-url https://download.pytorch.org/whl/cu121\n```\n\n```\n\n File \"/kaggle/temp/InstantID/gradio_demo/web-ui-multicontrolnet.py\", line 975, in generate_image\n    reload_pipe(model_input, model_dropdown, scheduler, adapter_strength_ratio, enable_LCM, depth_type, lora_model_dropdown, lora_scale,test_all_loras,single_lora)\n  File \"/kaggle/temp/InstantID/gradio_demo/web-ui-multicontrolnet.py\", line 654, in reload_pipe\n    pipe = load_model(_pretrained_model_folder, model_to_load)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/kaggle/temp/InstantID/gradio_demo/web-ui-multicontrolnet.py\", line 528, in load_model\n    pipeline = StableDiffusionPipeline.from_pretrained(\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_validators.py\", line 114, in _inner_fn\n    return fn(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/dist-packages/diffusers/pipelines/pipeline_utils.py\", line 896, in from_pretrained\n    loaded_sub_model = load_sub_model(\n                       ^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/dist-packages/diffusers/pipelines/pipeline_loading_utils.py\", line 704, in load_sub_model\n    loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)\n                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/dist-packages/transformers/modeling_utils.py\", line 4027, in from_pretrained\n    dtype_orig = cls._set_default_torch_dtype(torch_dtype)\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/dist-packages/transformers/modeling_utils.py\", line 1584, in _set_default_torch_dtype\n    torch.set_default_dtype(dtype)\n  File \"/usr/local/lib/python3.11/dist-packages/torch/__init__.py\", line 1009, in set_default_dtype\n    _C._set_default_dtype(d)\nTypeError: couldn't find storage object Float8_e4m3fnStorage\n```\n\n",
    "url": "https://github.com/huggingface/transformers/issues/39409",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-15T01:51:08Z",
    "updated_at": "2025-08-02T12:06:59Z",
    "comments": 1,
    "user": "FurkanGozukara"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7682,
    "title": "Fail to cast Audio feature for numpy arrays in datasets 4.0.0",
    "body": "### Describe the bug\n\nCasting features with Audio for numpy arrays - done here with `ds.map(gen_sine, features=features)` fails\nin version 4.0.0 but not in version 3.6.0\n\n\n### Steps to reproduce the bug\n\nThe following `uv script` should be able to reproduce the bug in version 4.0.0\nand pass in version 3.6.0 on a macOS Sequoia 15.5\n\n```python\n# /// script\n# requires-python = \">=3.13\"\n# dependencies = [\n#   \"datasets[audio]==4.0.0\",\n#   \"librosa>=0.11.0\",\n# ]\n# ///\n# NAME\n#   create_audio_dataset.py - create an audio dataset of sine waves\n#\n# SYNOPSIS\n#   uv run create_audio_dataset.py\n#\n# DESCRIPTION\n#   Create an audio dataset using the Hugging Face [datasets] library.\n#   Illustrates how to create synthetic audio datasets using the [map]\n#   datasets function.\n#\n#   The strategy is to first create a dataset with the input to the\n#   generation function, then execute the map function that generates\n#   the result, and finally cast the final features.\n#\n# BUG\n#   Casting features with Audio for numpy arrays -\n#   done here with `ds.map(gen_sine, features=features)` fails\n#   in version 4.0.0 but not in version 3.6.0\n#\n#   This happens both in cases where --extra audio is provided and where is not.\n#   When audio is not provided i've installed the latest compatible version\n#   of soundfile.\n#\n#   The error when soundfile is installed but the audio --extra is not\n#   indicates that the array values do not have the `.T` property,\n#   whilst also indicating that the value is a list instead of a numpy array.\n#\n#   Last lines of error report when for datasets + soundfile case\n#   ...\n#\n#      File \"/Users/luasantilli/.cache/uv/archive-v0/tc_5IhQe7Zpw8ZXgQWpnl/lib/python3.13/site-packages/datasets/features/audio.py\", line 239, in cast_storage\n#          storage = pa.array([Audio().encode_example(x) if x is not None else None for x in storage.to_pylist()])\n#                              ~~~~~~~~~~~~~~~~~~~~~~^^^\n#        File \"/Users/luasantilli/.cache/uv/archive-v0/tc_5IhQe7Zpw8ZXgQWpnl/lib/python3.13/site-packages/datasets/features/audio.py\", line 122, in encode_example\n#          sf.write(buffer, value[\"array\"].T, value[\"sampling_rate\"], format=\"wav\")\n#                           ^^^^^^^^^^^^^^^^\n#      AttributeError: 'list' object has no attribute 'T'\n#   ...\n#\n#   For the case of datasets[audio] without explicit adding soundfile I get an FFmpeg\n#   error.\n#\n#   Last lines of error report:\n#\n#   ...\n#     RuntimeError: Could not load libtorchcodec. Likely causes:\n#               1. FFmpeg is not properly installed in your environment. We support\n#                  versions 4, 5, 6 and 7.\n#               2. The PyTorch version (2.7.1) is not compatible with\n#                  this version of TorchCodec. Refer to the version compatibility\n#                  table:\n#                  https://github.com/pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec.\n#               3. Another runtime dependency; see exceptions below.\n#             The following exceptions were raised as we tried to load libtorchcodec:\n#\n#     [start of libtorchcodec loading traceback]\n#     FFmpeg version 7: dlopen(/Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder7.dylib, 0x0006): Library not loaded: @rpath/libavutil.59.dylib\n#       Referenced from: <6DB21246-F28A-31A6-910A-D8F3355D1064> /Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder7.dylib\n#       Reason: no LC_RPATH's found\n#     FFmpeg version 6: dlopen(/Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder6.dylib, 0x0006): Library not loaded: @rpath/libavutil.58.dylib\n#       Referenced from: <BD3B44FC-E14B-3ABF-800F-BB54B6CCA3B1> /Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder6.dylib\n#       Reason: no LC_RPATH's found\n#     FFmpeg version 5: dlopen(/Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder5.dylib, 0x0006): Library not loaded: @rpath/libavutil.57.dylib\n#       Referenced from: <F06EBF8A-238C-3A96-BFBB-B34E0BBDABF0> /Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder5.dylib\n#       Reason: no LC_RPATH's found\n#     FFmpeg version 4: dlopen(/Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder4.dylib, 0x0006): Library not loaded: @rpath/libavutil.56.dylib\n#       Referenced from: <6E59F017-C703-3AF6-A271-6277DD5F8170> /Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder4.dylib\n#       Reason: no LC_RPATH's found\n#   ...\n#\n#   This is strange because the the same error does not happen when using version",
    "url": "https://github.com/huggingface/datasets/issues/7682",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-14T18:41:02Z",
    "updated_at": "2025-07-15T12:10:39Z",
    "comments": 2,
    "user": "luatil-cloud"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1507,
    "title": "[PI0] Evaluation result on the metaworld",
    "body": "Has anyone tried training pi0 on the Metaworld benchmark? My evaluation results are relatively low 30~%.",
    "url": "https://github.com/huggingface/lerobot/issues/1507",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "policies",
      "simulation"
    ],
    "created_at": "2025-07-14T14:56:38Z",
    "updated_at": "2025-10-08T08:47:31Z",
    "user": "chenkang455"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39401,
    "title": "Qwen3 tokenizer wrong offset_mapping",
    "body": "### System Info\n\ntransformers 4.53.2, Ubuntu 22.04.4, python 3.11.13\n\n### Who can help?\n\n@ArthurZucker and @itazap There must be a problem with the `offset_mapping` of Qwen3 `tokenizer`. The starting point in the text for each token, except the first and the last, is one position behind. I compared it with the BERT's `tokenizer`, which produces what is expected:\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```\nsample_text='A girl is styling her hair.'\nbert_tokenizer = BertTokenizerFast.from_pretrained('google-bert/bert-base-cased')\nbert_encoding = bert_tokenizer(\n    text=sample_text, add_special_tokens=False, return_offsets_mapping=True\n)\nprint(bert_encoding['offset_mapping'])\nqwen_tokenizer = AutoTokenizer.from_pretrained('Qwen/Qwen3-Embedding-0.6B')\nqwen_encoding = qwen_tokenizer(\n    text=sample_text, add_special_tokens=False, return_offsets_mapping=True\n)\nprint(qwen_encoding['offset_mapping'])\n```\n\n### Expected behavior\n\n[(0, 1), (2, 6), (7, 9), (10, 17), (18, 21), (22, 26), (26, 27)]\n[(0, 1), (1, 6), (6, 9), (9, 17), (17, 21), (21, 26), (26, 27)]",
    "url": "https://github.com/huggingface/transformers/issues/39401",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-14T14:21:08Z",
    "updated_at": "2025-07-16T09:59:35Z",
    "comments": 4,
    "user": "contribcode"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1506,
    "title": "episode: None",
    "body": "When I run \"python -m lerobot.scripts.train --dataset.root=./lerobot_datasets/my_robot_dataset/ --output_dir=./lerobot_datasets/outputs/ --policy.type=pi0 --dataset.repo_id=lerobot/tape --policy.push_to_hub=false\", I got\n\u2018\u2019\n'dataset': {'episodes': None,\n             'image_transforms': {'enable': False...\n}\n\u2018\u2019. \nIs this right?",
    "url": "https://github.com/huggingface/lerobot/issues/1506",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-14T13:29:07Z",
    "updated_at": "2025-08-12T09:31:16Z",
    "user": "LogSSim"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 420,
    "title": "How to fine-tune Wan 2.1 with Context Parallelism?",
    "body": "I am trying to fine-tune the Wan 2.1 model and would like to leverage the Context Parallelism (CP) feature to manage memory and scale the training. I saw in the main README that `CP support` is listed as a key feature.\n\nI have looked through the `examples/training` directory and the documentation, but I couldn't find a specific example or launch script demonstrating how to fine-tune the Wan model with Context Parallelism enabled.\n\nCould you please provide some guidance or a minimal example on how to properly configure a training job for **Wan 2.1 with Context Parallelism**?",
    "url": "https://github.com/huggingface/finetrainers/issues/420",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-14T06:55:39Z",
    "updated_at": "2025-07-15T05:09:45Z",
    "user": "vviper25"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1503,
    "title": "LeRobot So100 and Groot N1.5 Model Multi-Robot Deployment Feasibility Inquiry",
    "body": "Hello, I am conducting various tests using LeRobot's So100 (robot arm) with Groot N1.5 for training.\nI have some questions to ask.\n\n**Main Question**\nIs it possible to simultaneously apply a model trained with Groot N1.5 base on one robot to multiple robots of the same model?\n\n**Question Background (Actual Experience)**\nI had a model that was trained with Groot 1.5 base using data collected from So100. However, when one robot motor failed and was replaced, I had to recalibrate the entire system.\nAfter applying the previously used model for inference, the robot did not operate properly.\nI suspect this might be due to the basic position changing during the calibration process.\n\n**Core Question**\nFollowing this logic, does each robot of the same model require an individual model tailored to its specific calibration?\n\nThis question also relates to whether a single unified model can be used for inference and operation when deploying 100 robot arms in a factory setting.\n\nI would appreciate your response.",
    "url": "https://github.com/huggingface/lerobot/issues/1503",
    "state": "open",
    "labels": [
      "enhancement",
      "question",
      "policies",
      "dataset"
    ],
    "created_at": "2025-07-14T05:55:44Z",
    "updated_at": "2025-08-12T09:31:35Z",
    "user": "devedgar"
  },
  {
    "repo": "pytorch/helion",
    "number": 303,
    "title": "RuntimeError: Tile(0) is not tracked with proxy for",
    "body": "Hi, I noticed the following when a tile is used in a function:\n\nCode:\n```python\nimport ast\nimport torch\nimport helion\nimport helion.language as hl\nfrom helion.language import _decorators\nfrom helion._compiler.inductor_lowering import CodegenState\n\n@_decorators.api()\ndef func(\n    tensor: torch.Tensor,\n    tile: tuple[int, ...]\n) -> torch.Tensor:\n    raise NotInsideKernel\n\n\n@_decorators.register_fake(func)\ndef _(\n    tensor: torch.Tensor,\n    tile: tuple[int, ...]\n) -> torch.Tensor:\n    return tensor\n\n\n@_decorators.codegen(func)\ndef _(state: CodegenState) -> ast.AST:\n    tensor = state.ast_arg(0)\n    assert isinstance(tensor, ast.AST)\n    return tensor\n\n\n\n@helion.kernel(static_shapes=True)\ndef helion_func(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:\n\n    for tile_m, tile_n in hl.tile((x.shape[0], x.shape[1])):\n        x_tile = func(x, (tile_m, tile_n))\n\nx = torch.randn(16, 16)\ny = torch.randn(16, 16)\nhelion_func(x, y)\n```\n\nThe above will print:\n\n```python\nInternalError: RuntimeError: Tile(0) (140637436543456)is not tracked with proxy for <torch.fx.experimental.proxy_tensor.PythonKeyTracer object at 0x7fe8b4647680>\n```\n\nAny chance you know how to fix this? Thanks again!",
    "url": "https://github.com/pytorch/helion/issues/303",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-07-13T07:45:20Z",
    "updated_at": "2025-08-25T21:25:22Z",
    "user": "HanGuo97"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1497,
    "title": "ValueError: 'policy.repo_id' argument missing. Please specify it to push the model to the hub.",
    "body": "### System Info\n\n```Shell\nlerobot commit version:\nhttps://github.com/huggingface/lerobot/tree/69901b9b6a2300914ca3de0ea14b6fa6e0203bd4\n```\n\n### Information\n\n- [ ] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n(lerobot) robot@robot-Legion-Y9000P-IRX8:~/imitation_learning_lerobot/lerobot$ python lerobot/scripts/train.py \\\n>     --policy.type=act \\\n>     --dataset.repo_id=lerobot/aloha_sim_transfer_cube_human \\\n>     --env.type=aloha \\\n>     --env.task=AlohaTransferCube-v0 \\\n>     --output_dir=outputs/train/act_aloha_transfer\nINFO 2025-07-13 12:30:41 ils/utils.py:48 Cuda backend detected, using cuda.\nWARNING 2025-07-13 12:30:41 /policies.py:77 Device 'None' is not available. Switching to 'cuda'.\nTraceback (most recent call last):\n  File \"/home/robot/imitation_learning_lerobot/lerobot/lerobot/scripts/train.py\", line 291, in <module>\n    train()\n  File \"/home/robot/imitation_learning_lerobot/lerobot/lerobot/configs/parser.py\", line 226, in wrapper_inner\n    response = fn(cfg, *args, **kwargs)\n  File \"/home/robot/imitation_learning_lerobot/lerobot/lerobot/scripts/train.py\", line 110, in train\n    cfg.validate()\n  File \"/home/robot/imitation_learning_lerobot/lerobot/lerobot/configs/train.py\", line 120, in validate\n    raise ValueError(\nValueError: 'policy.repo_id' argument missing. Please specify it to push the model to the hub.\n\n\n### Expected behavior\n\nexpected it can work",
    "url": "https://github.com/huggingface/lerobot/issues/1497",
    "state": "open",
    "labels": [
      "question",
      "policies",
      "configuration"
    ],
    "created_at": "2025-07-13T04:33:14Z",
    "updated_at": "2025-08-12T09:32:36Z",
    "user": "dbdxnuliba"
  },
  {
    "repo": "huggingface/trl",
    "number": 3730,
    "title": "How to design stable reward functions for open-ended text generation tasks in GRPO?",
    "body": "I'm using GRPO for a text generation task where there's no single correct answer. I currently compute the reward using cosine similarity between the model output and a reference response. However, during training (around 400 steps), the reward values are quite unstable and fluctuate significantly.\n\nI'm wondering:\n\nIs cosine similarity a reasonable choice for reward in open-ended tasks?\n\nAre there better practices to stabilize the reward or design it more effectively in such scenarios?\n\nShould I consider switching to a learnable reward model (e.g., contrastive learning)?\n\nAny general advice on reward design in non-deterministic generation tasks would be greatly appreciated. Thanks!",
    "url": "https://github.com/huggingface/trl/issues/3730",
    "state": "open",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb Reward",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-07-12T18:39:37Z",
    "updated_at": "2025-07-12T18:40:05Z",
    "user": "Jax922"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11915,
    "title": "Create modular pipeline from existing pipeline",
    "body": "new concept of modular pipelines added via #9672 is very flexible way of creating custom pipelines  \nand one of the best early use-cases is new concept of modular guiders added via #11311  \n\nhowever, this would require a complete rewrite of the existing user apps/codebases to use new concepts  \nand would likely significantly slow down adoption (if not even block adoption for a long time)  \n\nask here is to provide a way to use an existing pipeline to instantiate a modular pipeline,  \nvery similar to how different standard diffuser pipelines can be instantiated  \nfrom a single pipeline class using `from_pipe` method  \n\nexample of desired workflow:\n\n```py\nimport torch\nimport diffusers\n\n# load pipeline using any normal method  \n# such as DiffusionPipeline, AutoPipelineForText2Image, StableDiffusionPipeline, etc.  \npipe = diffusers.DiffusionPipeline.from_pretrained(\n    \"stabilityai/stable-diffusion-xl-base-1.0\",\n    torch_dtype=torch.bfloat16,\n)\n\n# create modular pipeline from loaded pipeline\nmodular = diffusers.ModularPipeline.from_pipe(pipe)\n\n# create guider and activate it\ncfg = diffusers.ClassifierFreeGuidance(guidance_scale=5.0, guidance_rescale=0.0, start=0.0, stop=1.0)\nmodular.update_states(guider=cfg)\n\noutput = modular(\n    prompt='astronaut in a diner',\n    height=1024, width=1024)\n```\n\ncc: @yiyixuxu @a-r-r-o-w @sayakpaul ",
    "url": "https://github.com/huggingface/diffusers/issues/11915",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-12T16:08:30Z",
    "updated_at": "2025-08-28T08:18:08Z",
    "comments": 6,
    "user": "vladmandic"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11914,
    "title": "Loading multiple LoRAs to 1 pipeline in parallel, 1 LoRA to 2-pipelines on 2-GPUs",
    "body": "Hi everyone,\n\nI have the following scenario. \n\nI have a machine with 2-GPUs and a running service that keep has two pipelines loaded to their corresponding devices. Also I have a list of LoRAs (say 10). On each request I split the batch into 2 parts (request also has the corresponding information about LoRA), load LoRAs and run the forward pass.\n\nThe problem I encounter is that whatever parallelization method I have tried (threading, multi-processing), the maximum I have achieved is pre-loading LoRAs on the cpu and then, moving them to GPU and only after that `load_lora_weights` from the state_dict. \n\nEven if I attempt to achieve parallelization in by calling the chunk where I load in parallel in threads, the pipe starts to produce either a complete noise or a black image.\n\nWhere I would appreciate a lot the help is:\n\n1. To get an advice of elegantly loading multiple LoRAs at once into one pipe (all examples in the documentation indicate that one needs to do it 1 by 1)\n2. If I have 2 pipes on 2 different devices, how to parallelize the process of loading 1 LoRA to pipes on their corresponding devices.\n\n```\ndef apply_multiple_loras_from_cache(pipes, adapter_names, lora_cache, lora_names, lora_strengths, devices):\n    for device_index, pipe in enumerate(pipes):\n        logger.info(f\"Starting setup for device {devices[device_index]}\")\n        \n        # Step 1: Unload LoRAs\n        start = time.time()\n        pipe.unload_lora_weights(reset_to_overwritten_params=False)\n        logger.info(f\"[Device {device_index}] Unload time: {time.time() - start:.3f}s\")\n\n        # Step 2: Parallelize CPU \u2192 GPU state_dict move\n        def move_to_device(name):\n            return name, {\n                k: v.to(devices[device_index], non_blocking=True).to(pipe.dtype)\n                for k, v in lora_cache[name]['state_dict'].items()\n            }\n\n        start = time.time()\n        with ThreadPoolExecutor() as executor:\n            future_to_name = {executor.submit(move_to_device, name): name for name in adapter_names}\n            results = [future.result() for future in as_completed(future_to_name)]\n        logger.info(f\"[Device {device_index}] State dict move + dtype conversion time: {time.time() - start:.3f}s\")\n\n        # Step 3: Load adapters\n        start = time.time()\n        \n        \n        for adapter_name, state_dict in results:\n\n            pipe.load_lora_weights(\n                pretrained_model_name_or_path_or_dict=state_dict,\n                adapter_name=adapter_name\n            )\n        logger.info(f\"[Device {device_index}] Load adapter weights time: {time.time() - start:.3f}s\")\n\n        # Step 4: Set adapter weights\n        start = time.time()\n        pipe.set_adapters(lora_names, adapter_weights=lora_strengths)\n        logger.info(f\"[Device {device_index}] Set adapter weights time: {time.time() - start:.3f}s\")\n\n    torch.cuda.empty_cache()\n    logger.info(\"All LoRAs applied and GPU cache cleared.\")\n```",
    "url": "https://github.com/huggingface/diffusers/issues/11914",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-12T15:54:44Z",
    "updated_at": "2025-07-15T19:40:11Z",
    "comments": 5,
    "user": "vahe-toffee"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1494,
    "title": "release the code for reproducing the performance on the LIBERO dataset reported in the SmolVLA paper?",
    "body": "Has anyone been able to reproduce the performance on the LIBERO dataset reported in the SmolVLA paper? I\u2019d appreciate any guidelines or tips to help with reproducing the results.",
    "url": "https://github.com/huggingface/lerobot/issues/1494",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "simulation"
    ],
    "created_at": "2025-07-12T09:35:00Z",
    "updated_at": "2025-09-23T09:44:59Z",
    "user": "JustinKai0527"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7680,
    "title": "Question about iterable dataset and streaming",
    "body": "In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78\n\nI am confused, \n1. If we have already loaded the dataset, why doing `to_iterable_dataset`?  Does it go through the dataset faster than map-style dataset?\n2. `load_dataset(streaming=True)` is useful for huge dataset, but the speed is slow. How to make it comparable to `to_iterable_dataset` without loading the whole dataset into RAM?",
    "url": "https://github.com/huggingface/datasets/issues/7680",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-12T04:48:30Z",
    "updated_at": "2025-08-01T13:01:48Z",
    "comments": 8,
    "user": "Tavish9"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39377,
    "title": "FlashAttention2 support for  GSAI-ML / LLaDA-8B-Instruct?",
    "body": "Hi there,\n\nI attempted to use flash attention 2 with this model but it seems like it isn't supported, based on this error:\n```\nValueError: LLaDAModelLM does not support Flash Attention 2.0 yet. Please request to add support where the model is hosted, on its model hub page: https://huggingface.co/GSAI-ML/LLaDA-8B-Instruct/discussions/new or in the Transformers GitHub repo: https://github.com/huggingface/transformers/issues/new\n```\n\nwould it be possible to add support to this kind of model? \n\nThank you for your time!",
    "url": "https://github.com/huggingface/transformers/issues/39377",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-12T02:48:36Z",
    "updated_at": "2025-08-19T08:03:26Z",
    "comments": 2,
    "user": "lbertge"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1492,
    "title": "Is there any plan to add a validation loss in the training pipeline, which is not dependent on simulation env.",
    "body": "Can we have a dataset split in the training code to run the model on a holdout validation episode to check loss on it?",
    "url": "https://github.com/huggingface/lerobot/issues/1492",
    "state": "open",
    "labels": [
      "enhancement",
      "question",
      "policies"
    ],
    "created_at": "2025-07-11T20:43:04Z",
    "updated_at": "2025-12-30T07:12:20Z",
    "user": "mohitydv09"
  },
  {
    "repo": "huggingface/peft",
    "number": 2642,
    "title": "Prompt_Tuning.ipynb example doesn't seem to train the model",
    "body": "Hello! I am running Prompt-Tuning notebook example from PEFT lib examples [here](https://github.com/huggingface/peft/blob/main/examples/sequence_classification/Prompt_Tuning.ipynb).  I did **not** change any line of code and I ran the code block sequentially.\n\nHowever, the performance under metrics remain exactly the **same** for each epoch, which is very weird. From the [orignal notebook](https://github.com/huggingface/peft/blob/main/examples/sequence_classification/Prompt_Tuning.ipynb), we can see accuracy fluctuates and can increase to 0.70. \n\nI checked the output logits for the training data is changing every epoch (set shuffle=False, and this is the only change for debugging). Now I am very confused, any suggestions would be very much welcome, please let me know if I am doing something very wrong, thanks in advance!\n\n\nHere's the performance log:\n```\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:20<00:00,  5.74it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.36it/s]\nepoch 0: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:20<00:00,  5.72it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.49it/s]\nepoch 1: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:20<00:00,  5.74it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.34it/s]\nepoch 2: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:20<00:00,  5.72it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.35it/s]\nepoch 3: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:20<00:00,  5.74it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.47it/s]\nepoch 4: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:20<00:00,  5.69it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.63it/s]\nepoch 5: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:20<00:00,  5.75it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.45it/s]\nepoch 6: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:20<00:00,  5.74it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.40it/s]\nepoch 7: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:20<00:00,  5.74it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.53it/s]\nepoch 8: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:19<00:00,  5.76it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.27it/s]\nepoch 9: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:20<00:00,  5.75it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.50it/s]\nepoch 10: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:20<00:00,  5.74it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.63it/s]\nepoch 11: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:19<00:00,  5.77it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.50it/s]\nepoch 12: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:19<00:00,  5.78it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.60it/s]\nepoch 13: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115/115 [00:20<00:00,  5.74it/s]\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 13/13 [00:01<00:00, 10.54it/s]\nepoch 14: {'accuracy': 0.6838235294117647, 'f1': 0.8122270742358079}\n```\n\nBesides, my environment info is here if it helps debugging:\n```\npython 3.10\ntransformers  4.52.4\npeft  0.16.0\ntorch 2.7.0\njupyterlab 4.4.3\nOS Ubuntu 22.04 LTS\nGPU NVIDIA RTX 5880\n```",
    "url": "https://github.com/huggingface/peft/issues/2642",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-11T18:26:58Z",
    "updated_at": "2025-08-23T15:03:47Z",
    "comments": 8,
    "user": "ruixing76"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39366,
    "title": "RuntimeError when loading llmcompressor W8A8 quantized model: int8 dtype in weight initialization",
    "body": "I'm trying to load the quantized model `RedHatAI/Qwen2.5-VL-7B-Instruct-quantized.w8a8` but encountering a dtype compatibility issue during model initialization. The model appears to be quantized using `llmcompressor` with W8A8 quantization scheme.\n\n**Note**: I need to load this model without vLLM because I may need to add custom hooks for my research, so I'm looking for a direct loading method using transformers/llmcompressor.\n\n## Error Message\n\n```python\nRuntimeError: expected a floating-point or complex dtype, but got dtype=torch.int8\n```\n\n**Full Stack Trace:**\n```python\nFile \"/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py\", line 366, in _init_weights\n    module.weight.data.normal_(mean=0.0, std=std)\nFile \"/torch/_refs/__init__.py\", line 6214, in normal_\n    return normal(mean, std, self.shape, out=self, generator=generator)\n...\nRuntimeError: expected a floating-point or complex dtype, but got dtype=torch.int8\n```\n\n## Traceback\n\nThe error occurs during model weight initialization where transformers tries to call `normal_()` on int8 tensors. The `normal_()` function in PyTorch only works with floating-point tensors, but the quantized model contains int8 weights.\n\n**Specific failure point:**\n- File: `modeling_qwen2_5_vl.py`, line 366\n- Function: `_init_weights()` \n- Operation: `module.weight.data.normal_(mean=0.0, std=std)`\n- Issue: Trying to apply normal distribution to int8 tensors\n\n## Model Information\n\nBased on the model's `config.json`:\n- **Quantization method**: `compressed-tensors`\n- **Format**: `int-quantized` \n- **Scheme**: W8A8 (8-bit weights and activations)\n- **Base model**: `Qwen/Qwen2.5-VL-7B-Instruct`\n- **Compression ratio**: ~1.2x\n- **Ignored layers**: All visual layers (`visual.blocks.*`, `visual.merger.*`, `lm_head`)\n\n## What I've Tried\n\n### 1. llmcompressor methods:\n```python\n# Method 1: TraceableQwen2_5_VLForConditionalGeneration\nfrom llmcompressor.transformers.tracing import TraceableQwen2_5_VLForConditionalGeneration\nmodel = TraceableQwen2_5_VLForConditionalGeneration.from_pretrained(\n    model_path, device_map=\"auto\", torch_dtype=\"auto\", trust_remote_code=True\n)\n\n# Method 2: SparseAutoModelForCausalLM  \nfrom llmcompressor.transformers import SparseAutoModelForCausalLM\nmodel = SparseAutoModelForCausalLM.from_pretrained(\n    model_path, device_map=\"auto\", torch_dtype=\"auto\", trust_remote_code=True\n)\n```\n\n### 2. Standard transformers methods:\n```python\n# Method 3: Various dtype configurations\nmodel = Qwen2_5_VLForConditionalGeneration.from_pretrained(\n    model_path,\n    torch_dtype=torch.bfloat16,  # Also tried: torch.float16, \"auto\", None\n    trust_remote_code=True,\n    device_map=\"auto\"\n)\n\n# Method 4: AutoModelForCausalLM\nmodel = AutoModelForCausalLM.from_pretrained(\n    model_path, trust_remote_code=True, torch_dtype=\"auto\"\n)\n```\n\n**All methods fail at the same weight initialization step, so I wonder should the model be loaded with `_fast_init=False` or other special parameters?**\n\n## Additional Observations\n\n1. **Warning about ignored layers**: The loader warns about missing visual layers, but this seems expected since they were ignored during quantization\n2. **Model files exist**: The quantized model directory contains the expected `.safetensors` files and configuration\n3. **Original model works**: The base `Qwen/Qwen2.5-VL-7B-Instruct` loads and works perfectly\n\n## Environment\n\n- **Python**: 3.10\n- **PyTorch**: 2.7.0+cu126\n- **Transformers**: 4.52.4\n- **LLMCompressor**: 0.6.0\n- **Compressed-tensors**: 0.10.2\n\n\nThis model was likely created using llmcompressor's oneshot quantization:\n```python\nfrom llmcompressor.modifiers.quantization import GPTQModifier\nfrom llmcompressor.transformers import oneshot\n\nrecipe = [\n    GPTQModifier(\n        targets=\"Linear\",\n        scheme=\"W8A8\", \n        sequential_targets=[\"Qwen2_5_VLDecoderLayer\"],\n        ignore=[\"lm_head\", \"re:visual.*\"],\n    ),\n]\n```\nIf this is more of an llmcompressor-specific model loading issue rather than a transformers compatibility issue, please let me know and I'll file this issue in the llmcompressor repository instead.\n\n",
    "url": "https://github.com/huggingface/transformers/issues/39366",
    "state": "closed",
    "labels": [
      "Good First Issue"
    ],
    "created_at": "2025-07-11T15:15:09Z",
    "updated_at": "2025-12-08T13:30:10Z",
    "comments": 10,
    "user": "AdelineXinyi"
  },
  {
    "repo": "pytorch/vision",
    "number": 9146,
    "title": "https://github.com/pytorch/vision/blob/b818d320a14a2e6d9d9f28853e9e7beae703e52e/torchvision/io/video.py#L274",
    "body": "### \ud83d\udc1b Describe the bug\n\nhttps://github.com/pytorch/vision/blob/b818d320a14a2e6d9d9f28853e9e7beae703e52e/torchvision/io/video.py#L274\n\nthis function warning infinite.\n\nand we don't know how to find the equalent code in torchcodec as well/......\n\n### Versions\n\ndsf",
    "url": "https://github.com/pytorch/vision/issues/9146",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-11T14:46:36Z",
    "updated_at": "2025-08-07T14:22:22Z",
    "comments": 2,
    "user": "OpenJarvisAI"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1483,
    "title": "How can I set `max_relative_target` to get safe action?",
    "body": "I saw this in function  `send_action` in `src/lerobot/robots/so100_follower/so100_follower.py` \n```python\n\n    def send_action(self, action: dict[str, Any]) -> dict[str, Any]:\n        \"\"\"Command arm to move to a target joint configuration.\n\n        The relative action magnitude may be clipped depending on the configuration parameter\n        `max_relative_target`. In this case, the action sent differs from original action.\n        Thus, this function always returns the action actually sent.\n\n        Raises:\n            RobotDeviceNotConnectedError: if robot is not connected.\n\n        Returns:\n            the action sent to the motors, potentially clipped.\n        \"\"\"\n        if not self.is_connected:\n            raise DeviceNotConnectedError(f\"{self} is not connected.\")\n\n        goal_pos = {key.removesuffix(\".pos\"): val for key, val in action.items() if key.endswith(\".pos\")}\n\n        # Cap goal position when too far away from present position.\n        # /!\\ Slower fps expected due to reading from the follower.\n        if self.config.max_relative_target is not None:\n            present_pos = self.bus.sync_read(\"Present_Position\")\n            goal_present_pos = {key: (g_pos, present_pos[key]) for key, g_pos in goal_pos.items()}\n            goal_pos = ensure_safe_goal_position(goal_present_pos, self.config.max_relative_target)\n\n        # Send goal position to the arm\n        self.bus.sync_write(\"Goal_Position\", goal_pos)\n        return {f\"{motor}.pos\": val for motor, val in goal_pos.items()}\n```\nBut in So100followerconfig it defaults to None\n```python\nclass SO100FollowerConfig(RobotConfig):\n    # Port to connect to the arm\n    port: str\n\n    disable_torque_on_disconnect: bool = True\n\n    # `max_relative_target` limits the magnitude of the relative positional target vector for safety purposes.\n    # Set this to a positive scalar to have the same value for all motors, or a list that is the same length as\n    # the number of motors in your follower arms.\n    max_relative_target: int | None = None\n\n    # cameras\n    cameras: dict[str, CameraConfig] = field(default_factory=dict)\n\n    # sensors\n    sensors: dict[str, ForceSensorConfig] = field(default_factory=dict)\n\n    # Set to `True` for backward compatibility with previous policies/dataset\n    use_degrees: bool = False\n```\nI don't know how much should I set `max_relative_target` is there any instruction? thanks!!",
    "url": "https://github.com/huggingface/lerobot/issues/1483",
    "state": "open",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-07-11T02:46:02Z",
    "updated_at": "2025-08-12T09:34:51Z",
    "user": "milong26"
  },
  {
    "repo": "huggingface/peft",
    "number": 2640,
    "title": "Why peft.utils.other.fsdp_auto_wrap_policy do not warp the module do not require grad?",
    "body": "In https://github.com/huggingface/peft/blob/main/src/peft/utils/other.py#L977, \n\n```\ndef fsdp_auto_wrap_policy(model):\n    if hasattr(FullyShardedDataParallelPlugin, \"get_module_class_from_name\"):\n        get_module_class_from_name = FullyShardedDataParallelPlugin.get_module_class_from_name\n    else:\n        from accelerate.utils.dataclasses import get_module_class_from_name\n    from torch.distributed.fsdp.wrap import _or_policy, lambda_auto_wrap_policy, transformer_auto_wrap_policy\n\n    from ..tuners import PrefixEncoder, PromptEmbedding, PromptEncoder\n\n    default_transformer_cls_names_to_wrap = \",\".join(_get_no_split_modules(model))\n    transformer_cls_names_to_wrap = os.environ.get(\n        \"FSDP_TRANSFORMER_CLS_TO_WRAP\", default_transformer_cls_names_to_wrap\n    ).split(\",\")\n    transformer_cls_to_wrap = {PrefixEncoder, PromptEncoder, PromptEmbedding}\n    for layer_class in transformer_cls_names_to_wrap:\n        if len(layer_class) == 0:\n            continue\n        transformer_cls = get_module_class_from_name(model, layer_class)\n        if transformer_cls is None:\n            raise Exception(\"Could not find the transformer layer class to wrap in the model.\")\n        else:\n            transformer_cls_to_wrap.add(transformer_cls)\n\n    def lambda_policy_fn(module):\n        if (\n            len(list(module.named_children())) == 0\n            and getattr(module, \"weight\", None) is not None\n            and module.weight.requires_grad\n        ):\n            return True\n        return False\n\n    lambda_policy = functools.partial(lambda_auto_wrap_policy, lambda_fn=lambda_policy_fn)\n    transformer_wrap_policy = functools.partial(\n        transformer_auto_wrap_policy,\n        transformer_layer_cls=transformer_cls_to_wrap,\n    )\n\n    auto_wrap_policy = functools.partial(_or_policy, policies=[lambda_policy, transformer_wrap_policy])\n    return auto_wrap_policy\n```\n\nthe fsdp_auto_wrap_policy uses a lambda_policy_fn which does not warp the module does not require grad. \nBut in regular Lora training, the original network does not need grad. \nThat may cause every GPU still keep a full network copy even in FSDP FULLY SHARD. \nWhy the code design such a policy?",
    "url": "https://github.com/huggingface/peft/issues/2640",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-10T12:07:13Z",
    "updated_at": "2025-08-18T15:05:03Z",
    "comments": 4,
    "user": "Changlin-Lee"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39336,
    "title": "TypeError: GenerationMixin._extract_past_from_model_output() got an unexpected keyword argument 'standardize_cache_format'",
    "body": "I am using CogVLM2 video captioning model\n\nIt works latest with transformers==4.43.4\n\nwith transformers==4.44.0 and forward I get below error\n\nbut I need to use latest version of transformers since currently 4bit quantization fails on some gpus and platforms\n\nhow can i fix this issue?\n\n`TypeError: GenerationMixin._extract_past_from_model_output() got an unexpected keyword argument 'standardize_cache_format'`\n\n```\n14:23:32 - INFO - Final video tensor shape for CogVLM processing: torch.Size([3, 24, 720, 1280])\n14:23:35 - ERROR - Error during auto-captioning: GenerationMixin._extract_past_from_model_output() got an unexpected keyword argument 'standardize_cache_format'\nTraceback (most recent call last):\n  File \"E:\\Ultimate_Video_Processing_v1\\STAR\\logic\\cogvlm_utils.py\", line 679, in auto_caption\n    outputs_tensor = local_model_ref.generate(**inputs_on_device, **gen_kwargs)\n  File \"E:\\Ultimate_Video_Processing_v1\\venv\\lib\\site-packages\\torch\\utils\\_contextlib.py\", line 116, in decorate_context\n    return func(*args, **kwargs)\n  File \"E:\\Ultimate_Video_Processing_v1\\venv\\lib\\site-packages\\transformers\\generation\\utils.py\", line 2024, in generate\n    result = self._sample(\n  File \"E:\\Ultimate_Video_Processing_v1\\venv\\lib\\site-packages\\transformers\\generation\\utils.py\", line 3032, in _sample\n    model_kwargs = self._update_model_kwargs_for_generation(\n  File \"E:\\Ultimate_Video_Processing_v1\\STAR\\models\\modules\\transformers_modules\\cogvlm2-video-llama3-chat\\modeling_cogvlm.py\", line 726, in _update_model_kwargs_for_generation\n    cache_name, cache = self._extract_past_from_model_output(\nTypeError: GenerationMixin._extract_past_from_model_output() got an unexpected keyword argument 'standardize_cache_format'\n```\n\n@amyeroberts, @qubvel @SunMarc @MekkCyber \n\nthe error i am getting is below with 4.43.1 on B200 when doing 4bit quant. interesting same code same libraries on my rtx 5090 on windows working without errors\n\nfp16 has no issues\n\n\n```\n11:45:10 - INFO - Preparing to load model from: /workspace/STAR/models/cogvlm2-video-llama3-chat with quant: 4, dtype: torch.bfloat16, device: cuda, device_map: auto, low_cpu_mem: True\n11:45:10 - INFO - Starting model loading - this operation cannot be interrupted once started\n/workspace/venv/lib/python3.10/site-packages/torchvision/transforms/_functional_video.py:6: UserWarning: The 'torchvision.transforms._functional_video' module is deprecated since 0.12 and will be removed in the future. Please use the 'torchvision.transforms.functional' module instead.\n  warnings.warn(\n/workspace/venv/lib/python3.10/site-packages/torchvision/transforms/_transforms_video.py:22: UserWarning: The 'torchvision.transforms._transforms_video' module is deprecated since 0.12 and will be removed in the future. Please use the 'torchvision.transforms' module instead.\n  warnings.warn(\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 6/6 [01:18<00:00, 13.07s/steps]\n11:46:30 - ERROR - Failed to load CogVLM2 model from path: /workspace/STAR/models/cogvlm2-video-llama3-chat\n11:46:30 - ERROR - Exception type: ValueError\n11:46:30 - ERROR - Exception details: `.to` is not supported for `4-bit` or `8-bit` bitsandbytes models. Please use the model as it is, since the model has already been set to the correct devices and casted to the correct `dtype`.\nTraceback (most recent call last):\n  File \"/workspace/STAR/logic/cogvlm_utils.py\", line 160, in load_cogvlm_model\n    raise model_loading_result[\"error\"]\n  File \"/workspace/STAR/logic/cogvlm_utils.py\", line 122, in load_model_thread\n    model = AutoModelForCausalLM.from_pretrained(\n  File \"/workspace/venv/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py\", line 559, in from_pretrained\n    return model_class.from_pretrained(\n  File \"/workspace/venv/lib/python3.10/site-packages/transformers/modeling_utils.py\", line 4000, in from_pretrained\n    dispatch_model(model, **device_map_kwargs)\n  File \"/workspace/venv/lib/python3.10/site-packages/accelerate/big_modeling.py\", line 502, in dispatch_model\n    model.to(device)\n  File \"/workspace/venv/lib/python3.10/site-packages/transformers/modeling_utils.py\", line 2849, in to\n    raise ValueError(\nValueError: `.to` is not supported for `4-bit` or `8-bit` bitsandbytes models. Please use the model as it is, since the model has already been set to the correct devices and casted to the correct `dtype`.\n11:46:30 - ERROR - Error during auto-captioning: 'Could not load CogVLM2 model (check logs for details): `.to` is not supported for `4-bit` or `8-bit` bitsandbytes models. Please use the model as it is, since the model has already been set to the correct devices and casted to the correct `dtype`.'\nTraceback (most recent call last):\n  File \"/workspace/STAR/logic/cogvlm_utils.py\", line 160, in load_cogvlm_model\n    raise model_loading_result[\"error\"]\n  File \"/workspace/STAR/logic/cogvlm_utils.py\", line 122, in load_model_thread\n    model = AutoMode",
    "url": "https://github.com/huggingface/transformers/issues/39336",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-10T11:49:02Z",
    "updated_at": "2025-08-18T08:03:13Z",
    "comments": 4,
    "user": "FurkanGozukara"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1476,
    "title": "Here as interactive gym to play with the robot, (I still need some help)",
    "body": "### First the good news:\nThis is an interactive gym where you can experiment with pre-trained policies to control the robot in real time. \nHere is how to use it:\n- `Double-click` on a body to select it.\n- `Ctrl + left` drag applies a torque to the selected object, resulting in rotation.\n- `Ctrl + right` drag applies a force to the selected object in the (x,z) plane, resulting in translation.\n- `Ctrl + Shift + right` drag applies a force to the selected object in the (x,y) plane.\n\n\n### However, there are a few limitations:\n\n- When you move the cubes, the robot doesn't seem to register the new positions and instead attempts to pick them up from their original locations.\n- **Only** the environment `lerobot/act_aloha_sim_insertion_human` appears to work occasionally. The others either don't function at all or cause the program to crash due to missing attributes that haven't been implemented in the gym.\n\nI'd really appreciate feedback/guidance from the repo maintainers on how to improve this snippet to support more environments and tasks.\n\nfile `interactive_gym.py`:\n```python\nimport gymnasium as gym\nimport mujoco\nimport mujoco.viewer\nimport torch\nimport importlib\nfrom lerobot.policies.utils import get_device_from_parameters\nfrom lerobot.configs import parser\nfrom lerobot.configs.eval import EvalPipelineConfig\nfrom lerobot.policies.factory import make_policy\nfrom lerobot.envs.utils import preprocess_observation\nfrom lerobot.utils.utils import get_safe_torch_device\n\n\n# $ python interactive_gym.py --policy.path=lerobot/act_aloha_sim_insertion_human --env.type=aloha\n# $ python interactive_gym.py --policy.path=lerobot/act_aloha_sim_transfer_cube_human --env.type=aloha\n\n@parser.wrap()\ndef make_env_and_policy(cfg: EvalPipelineConfig):\n    package_name = f\"gym_{cfg.env.type}\"\n\n    try:\n        importlib.import_module(package_name)\n    except ModuleNotFoundError as e:\n        print(f\"{package_name} is not installed. Please install it with `pip install 'lerobot[{cfg.env.type}]'`\")\n        raise e\n\n    gym_handle = f\"{package_name}/{cfg.env.task}\"\n\n    env = gym.make(gym_handle, disable_env_checker=True, **cfg.env.gym_kwargs)\n\n    policy = make_policy(cfg=cfg.policy, env_cfg=cfg.env)\n    policy.eval()    \n    policy.reset()\n\n    return env, policy\n\n\ndef main(env, policy):\n    device = get_device_from_parameters(policy)\n\n    viewer = mujoco.viewer.launch_passive(env.unwrapped.model, env.unwrapped.data)\n\n    observation, info = env.reset(seed=42)\n    viewer.sync()\n\n    for i in range(40000):\n        observation = preprocess_observation(observation)\n        observation = {\n            key: observation[key].to(device, non_blocking=device.type == \"cuda\") for key in observation\n        }\n\n        # Infer \"task\" from attributes of environments.\n        # TODO: works with SyncVectorEnv but not AsyncVectorEnv\n        if hasattr(env, \"task_description\"):\n            observation[\"task\"] = env.unwrapped.task_description\n        elif hasattr(env, \"task\"):\n            observation[\"task\"] = env.unwrapped.task\n        else:  #  For envs without language instructions, e.g. aloha transfer cube and etc.\n            observation[\"task\"] = \"\"\n\n        with torch.inference_mode():\n            action = policy.select_action(observation)\n\n        # Convert to CPU / numpy.\n        action = action.to(\"cpu\").numpy()\n        assert action.ndim == 2, \"Action dimensions should be (batch, action_dim)\"\n\n        # Apply the next action.\n        #observation, reward, terminated, truncated, info = env.step(action)\n\n        observation, reward, terminated, truncated, info = env.step(action[0])\n        viewer.sync()\n        \n        if terminated or truncated:\n            observation, info = env.reset()\n            viewer.sync()\n            \n        if i % 100 == 0:\n            print(i)\n\n    viewer.close()\n    env.close()\n\ntorch.backends.cudnn.benchmark = True\ntorch.backends.cuda.matmul.allow_tf32 = True\n\nenv, policy = make_env_and_policy()\nmain(env, policy)\n```\n\n",
    "url": "https://github.com/huggingface/lerobot/issues/1476",
    "state": "open",
    "labels": [
      "question",
      "simulation"
    ],
    "created_at": "2025-07-09T14:59:22Z",
    "updated_at": "2025-12-16T13:41:00Z",
    "user": "raul-machine-learning"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1475,
    "title": "[Question] What does each number in predicted action(SmolVLA) stand for?",
    "body": "Hi, I'm trying to load the SmolVLA and test on my simulation env. \n\nAfter passing the observations to the model using \"policy.select_action(obs)\" I got a 6-dimensional action, but I'm quite confused about what exactly they are. And if there are three for position translation and three for rotation, how could I control the open and close for the gripper?\n\nThanks.",
    "url": "https://github.com/huggingface/lerobot/issues/1475",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-09T13:39:25Z",
    "updated_at": "2025-08-12T10:08:26Z",
    "user": "Calvert0921"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1471,
    "title": "where is 7_get_started_with_real_robot.md?",
    "body": "I didn't find 7_get_started_with_real_robot.md",
    "url": "https://github.com/huggingface/lerobot/issues/1471",
    "state": "closed",
    "labels": [
      "documentation",
      "question"
    ],
    "created_at": "2025-07-09T08:02:32Z",
    "updated_at": "2025-10-08T08:42:21Z",
    "user": "von63"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 218,
    "title": "Will you release SmolLM 3 recipe?",
    "body": "First off, thank you so much for sharing these training resources.\n\nI was wondering if, with the recent release of SmolLM3, you have plans to also share its training recipe.\n\nHave a nice day!",
    "url": "https://github.com/huggingface/alignment-handbook/issues/218",
    "state": "closed",
    "labels": [],
    "created_at": "2025-07-08T19:47:20Z",
    "updated_at": "2025-07-15T14:16:11Z",
    "comments": 1,
    "user": "ouhenio"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3433,
    "title": "How to use a custom batch sampler?",
    "body": "`SentenceTransformerTrainer.__init__` will check the type of args, so I have to write a class inheriting from `SentenceTransformerTrainingArgs` rather than `TransformerTrainingArgs`. The problem is that `SentenceTransformerTrainingArgs.__post__init__` forces to use `BatchSampler` to initialize a batch sampler. Is there any workaround about this? ",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3433",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-08T09:35:24Z",
    "updated_at": "2025-07-08T12:36:33Z",
    "user": "Hypothesis-Z"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39266,
    "title": "Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' 'truncation=True' to have batched tensors with the same length.",
    "body": "### System Info\n\n```bash\nTraceback (most recent call last):\n  File \"/home/cx/miniconda3/envs/demo/lib/python3.10/site-packages/transformers/tokenization_utils_base.py\", line 767, in convert_to_tensors\n    tensor = as_tensor(value)\n  File \"/home/cx/miniconda3/envs/demo/lib/python3.10/site-packages/transformers/tokenization_utils_base.py\", line 729, in as_tensor\n    return torch.tensor(value)\nValueError: expected sequence of length 15757 at dim 1 (got 16242)\n```\n*DataCollatorForLanguageModeling* seems to only padding input ids and ignore labels, resulting in different lengths of labels in a batch. Why is this?\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\n```python\ndef _process_fn(samples, tokenizer : PreTrainedTokenizerFast, config):\n    samples = [[{\"role\" : \"user\", \"content\" : x[0]}, {\"role\" : \"assistant\", \"content\" : x[1]}]\n                for x in zip(samples[\"input\"], samples[\"output\"])]\n    # tokenized_data = tokenizer.apply_chat_template(samples, \n    #                                             return_tensors=\"pt\",\n    #                                             return_dict=True,\n    #                                             padding=\"max_length\",\n    #                                             truncation=True,\n    #                                             max_length=8000)\n    tokenized_data = tokenizer.apply_chat_template(samples, \n                                                return_tensors=\"pt\",\n                                                return_dict=True,\n                                                padding=True\n                                                )\n    samples_ids = tokenized_data[\"input_ids\"]\n    attention_mask = tokenized_data[\"attention_mask\"]\n    output_ids = []\n    for i, seq in enumerate(samples_ids):\n        output_index = torch.where(seq == SPECIAL_GENERATE_TOKEN_ID)[0]\n        mask = attention_mask[i]\n        if len(output_index) == 1:\n            output_index = output_index[0].item()\n        else:\n            continue\n        temp = torch.full_like(seq, -100)\n        temp[output_index:] = seq[output_index:]\n        temp[mask == 0] = -100\n        output_ids.append(temp)\n\n    labels = torch.stack(output_ids)\n    return {\"input_ids\" : samples_ids,\n            \"labels\" : labels,\n            \"attention_mask\" : attention_mask}\n\ntrainer = Trainer(\n        model=peft_model,\n        args=train_config,\n        train_dataset=train_data,\n        eval_dataset=eval_data,\n        data_collator=DataCollatorForLanguageModeling(\n            tokenizer=tokenizer,\n            mlm=False,\n            pad_to_multiple_of=8 if torch.cuda.is_available() else None,\n            return_tensors=\"pt\"\n        )\n    )\n```\n\n\n### Expected behavior\n\nrun code",
    "url": "https://github.com/huggingface/transformers/issues/39266",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-08T05:19:35Z",
    "updated_at": "2025-07-08T06:50:47Z",
    "comments": 0,
    "user": "mumu029"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1460,
    "title": "How to support dataloading with historical cue?",
    "body": "as i see, the getitem function of LerobotDataset now returns the single frame data, how to stack the historical frames and make use of batch data with historical information like univla?\n",
    "url": "https://github.com/huggingface/lerobot/issues/1460",
    "state": "open",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-07-08T01:49:11Z",
    "updated_at": "2025-08-12T09:44:02Z",
    "user": "joeyxin-del"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1458,
    "title": "how to control a real robot arm-101 with my own pretrained model?",
    "body": "I don't see the instruction or script example on this repository\u3002\nPlease help\n\nThanks,\n",
    "url": "https://github.com/huggingface/lerobot/issues/1458",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-08T01:19:50Z",
    "updated_at": "2025-08-12T09:45:13Z",
    "user": "jcl2023"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1369,
    "title": "Puzzling collectives in TP ( SP to be exact)",
    "body": "### Bug description\n\nOn running 1 step of a modified Llama3 debug_model ( n_layer=1)  on 2 ranks with TP=2 , noticed 12 alleduce's ( reduce_scatter+allgather)   of expected size , 8  * 2048 * 256 / 2 = 2097152 . There should be 8 allreduce's altogether, right ?  One  each for SelfAttention and FFN/MLP  in the forward and backward  for each rank.  In total 4 for each rank.   \n\nBut from the collectives it looks like what is called TP is actually SP ! In that case, there should have been 16 collectives. 8 for each rank.  2 allgather and 2 reduce-scatter each   in forward and backward . \n\n```\ndebug_model.toml:\n\n[training]\nlocal_batch_size = 8\nseq_len = 2048\nmax_norm = 1.0  # grad norm clipping\nsteps = 1\ncompile = false\ndataset = \"c4_test\"  # supported datasets: c4_test (2K), c4 (177M)\n\n[parallelism]\ndata_parallel_replicate_degree = 1\ndata_parallel_shard_degree = -1\nfsdp_reshard_after_forward = \"default\" # default / never / always\ntensor_parallel_degree = 2\nenable_async_tensor_parallel = false\npipeline_parallel_degree = 1\ncontext_parallel_degree = 1\n\n\n__init__.py:\n    \"debugmodel\": TransformerModelArgs(\n        dim=256, n_layers=1, n_heads=16, rope_theta=500000\n    ),\n\n\n```\n\nAlso wondering what the other 3 allreduce are for ( count 1, 256 and 2048)  ? \n\n\n```\n[titan] 2025-07-07 20:12:54,779 - root - INFO - Training starts at step 1.\nhopper01:191370:191370 [1] NCCL INFO ReduceScatter: opCount 1 sendbuff 0x7fa915800000 recvbuff 0x7fa916800000 count 2097152 datatype 7 op 0 root 0 comm 0x55fca23fc0f0 [nranks=2] stream 0x55fca193e8e0\nhopper01:191369:191369 [0] NCCL INFO AllGather: opCount 2 sendbuff 0x7fdf55800000 recvbuff 0x7fdf54434000 count 2097152 datatype 7 op 0 root 0 comm 0x55e290bd32d0 [nranks=2] stream 0x55e29067e430\nhopper01:191370:191370 [1] NCCL INFO AllGather: opCount 2 sendbuff 0x7fa915800000 recvbuff 0x7fa914434000 count 2097152 datatype 7 op 0 root 0 comm 0x55fca23fc0f0 [nranks=2] stream 0x55fca193e8e0\nhopper01:191369:191369 [0] NCCL INFO ReduceScatter: opCount 3 sendbuff 0x7fdf61200000 recvbuff 0x7fdf56000000 count 2097152 datatype 7 op 0 root 0 comm 0x55e290bd32d0 [nranks=2] stream 0x55e29067e430\nhopper01:191369:191369 [0] NCCL INFO AllGather: opCount 4 sendbuff 0x7fdf60200000 recvbuff 0x7fdf61200000 count 2097152 datatype 7 op 0 root 0 comm 0x55e290bd32d0 [nranks=2] stream 0x55e29067e430\nhopper01:191370:191370 [1] NCCL INFO ReduceScatter: opCount 3 sendbuff 0x7fa921200000 recvbuff 0x7fa916000000 count 2097152 datatype 7 op 0 root 0 comm 0x55fca23fc0f0 [nranks=2] stream 0x55fca193e8e0\nhopper01:191370:191370 [1] NCCL INFO AllGather: opCount 4 sendbuff 0x7fa920200000 recvbuff 0x7fa921200000 count 2097152 datatype 7 op 0 root 0 comm 0x55fca23fc0f0 [nranks=2] stream 0x55fca193e8e0\nhopper01:191369:191369 [0] NCCL INFO ReduceScatter: opCount 5 sendbuff 0x7fdf69400000 recvbuff 0x7fdf60a00000 count 2097152 datatype 7 op 0 root 0 comm 0x55e290bd32d0 [nranks=2] stream 0x55e29067e430\nhopper01:191369:191369 [0] NCCL INFO AllGather: opCount 6 sendbuff 0x7fdf61200000 recvbuff 0x7fdf69400000 count 2097152 datatype 7 op 0 root 0 comm 0x55e290bd32d0 [nranks=2] stream 0x55e29067e430\nhopper01:191370:191370 [1] NCCL INFO ReduceScatter: opCount 5 sendbuff 0x7fa929400000 recvbuff 0x7fa920a00000 count 2097152 datatype 7 op 0 root 0 comm 0x55fca23fc0f0 [nranks=2] stream 0x55fca193e8e0\nhopper01:191370:191370 [1] NCCL INFO AllGather: opCount 6 sendbuff 0x7fa921200000 recvbuff 0x7fa929400000 count 2097152 datatype 7 op 0 root 0 comm 0x55fca23fc0f0 [nranks=2] stream 0x55fca193e8e0\nhopper01:191369:191369 [0] NCCL INFO AllReduce: opCount 7 sendbuff 0x7fdf556b8000 recvbuff 0x7fdf556b8000 count 16384 datatype 7 op 2 root 0 comm 0x55e290bd32d0 [nranks=2] stream 0x55e29067e430\nhopper01:191370:191370 [1] NCCL INFO AllReduce: opCount 7 sendbuff 0x7fa9156b8000 recvbuff 0x7fa9156b8000 count 16384 datatype 7 op 2 root 0 comm 0x55fca23fc0f0 [nranks=2] stream 0x55fca193e8e0\nhopper01:191369:191369 [0] NCCL INFO AllReduce: opCount 8 sendbuff 0x7fdf556c8000 recvbuff 0x7fdf556c8000 count 16384 datatype 7 op 0 root 0 comm 0x55e290bd32d0 [nranks=2] stream 0x55e29067e430\nhopper01:191370:191370 [1] NCCL INFO AllReduce: opCount 8 sendbuff 0x7fa9156c8000 recvbuff 0x7fa9156c8000 count 16384 datatype 7 op 0 root 0 comm 0x55fca23fc0f0 [nranks=2] stream 0x55fca193e8e0\nhopper01:191369:191369 [0] NCCL INFO AllReduce: opCount 9 sendbuff 0x7fdf556d8000 recvbuff 0x7fdf556d8000 count 16384 datatype 7 op 0 root 0 comm 0x55e290bd32d0 [nranks=2] stream 0x55e29067e430\nhopper01:191370:191370 [1] NCCL INFO AllReduce: opCount 9 sendbuff 0x7fa9156d8000 recvbuff 0x7fa9156d8000 count 16384 datatype 7 op 0 root 0 comm 0x55fca23fc0f0 [nranks=2] stream 0x55fca193e8e0\nhopper01:191369:191420 [0] NCCL INFO ReduceScatter: opCount a sendbuff 0x7fdf69400000 recvbuff 0x7fdf6a400000 count 2097152 datatype 7 op 0 root 0 comm 0x55e290bd32d0 [nranks=2] stream 0x55e29067e430\nhopper01:191370:191425 [1] NCCL INFO ReduceScatter: opCount a sendbuff 0x7fa929400000 recvbuff 0x7fa92a400000 c",
    "url": "https://github.com/pytorch/torchtitan/issues/1369",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-07-07T22:12:46Z",
    "updated_at": "2025-07-10T01:28:07Z",
    "user": "githubsgi"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3429,
    "title": "[BUG] - Broken link in intro of 'Learn the Basics' tutorial",
    "body": "### Add Link\n\nhttps://docs.pytorch.org/tutorials/beginner/basics/intro.html\n\n\n### Describe the bug\n\nIn the 'How to Use This Guide' section, the text reads:\n\n```\nIf you\u2019re new to deep learning frameworks, head right into the first section of our step-by-step guide: [1. Tensors](https://docs.pytorch.org/tutorials/beginner/basics/tensor_tutorial.html).\n```\n\nThat link at the end is broken, because tensor_tutorial.html does not exist. The link should point to tensorqs_tutorial.html instead.\n\nThe result is that clicking on this link results in a 404 error, when it should actually go to the Tensors section\n\n### Describe your environment\n\nMacOs + Google Chrome",
    "url": "https://github.com/pytorch/tutorials/issues/3429",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-07T19:52:10Z",
    "updated_at": "2025-07-07T22:18:19Z",
    "comments": 0,
    "user": "pankajkakkar"
  },
  {
    "repo": "huggingface/candle",
    "number": 3016,
    "title": "Build fails on Maxwell GPU due to __dp4a undefined in quantized.cu",
    "body": "I\u2019m trying to build a Rust project locally that depends on candle-kernels on my laptop with an NVIDIA GeForce 940MX (Maxwell, compute capability 5.0). The build fails with errors like:\n\n```\n\nsrc/quantized.cu(1997): error: identifier \"__dp4a\" is undefined\n...\n18 errors detected in the compilation of \"src/quantized.cu\".\n\n```\n\nGPU: NVIDIA GeForce 940MX (GM107, compute capability 5.0)\nOS: Kali Linux (rolling)\nCUDA toolkit: 12.3\nNVIDIA driver: 550.163.01\ncandle-kernels: v0.7.2\n\n\nThe error is caused by the use of the CUDA intrinsic __dp4a, which is only available on GPUs with compute capability 6.1+ (Pascal and newer).\nMy GPU is compute 5.0, so this intrinsic is not available.\n\n**Questions:**\nIs there a way to disable quantized kernels or the use of __dp4a for older GPUs?\nIf not, could a feature flag or build option be added to support older hardware, or at least skip building quantized kernels on unsupported GPUs?\n",
    "url": "https://github.com/huggingface/candle/issues/3016",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-07T14:41:53Z",
    "updated_at": "2025-07-07T14:41:53Z",
    "comments": 0,
    "user": "fishonamos"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 3289,
    "title": "How to detect watermark?",
    "body": "Hi,\n\nThanks for the great work.\n\nI saw in the current code the KGW watermark is implemented. But it seems lack of code to evaluate and detect whether the generated text contains watermark.\n\nCould anyone suggest whether this code is exists? It will be very helpful.\n\nThanks",
    "url": "https://github.com/huggingface/text-generation-inference/issues/3289",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-07T11:42:54Z",
    "updated_at": "2025-07-07T11:42:54Z",
    "user": "Allencheng97"
  },
  {
    "repo": "pytorch/xla",
    "number": 9447,
    "title": "[RFC] Controller for SPMD+MPMD",
    "body": "# [RFC] Controller for SPMD+MPMD\n\n## Background\nCurrent work is being done to design a solution for making `mark_sharding` first trace the model before it is loaded into devices (https://github.com/pytorch/xla/issues/9341). Together with [Local SPMD](https://github.com/pytorch/xla/issues/9181), this should enable us to achieve [SPMD+MPMD as per its RFC](https://github.com/pytorch/xla/issues/9019). One leftover question is which controller to leverage and how to do it. This RFC aims to provide an approach, and two examples of how SPMD+MPMD.\n\n## API Discussion\nBefore thinking about the specifics on the controller, I think it is important to quickly discuss the user interaction experience with SPMD+MPMD. Specifically, how to handle pipeline parallelism in the context of also doing gSPMD. I see two different approaches: (1) to hide some of that process behind a newly created API, or a new level of abstraction; (2) to leverage existing pipeline parallelism tooling.\n\nI think there is a temptation to create something behind a new API to try to simplify the process as much as possible, and create an easy user experience. However, PyTorch already has strong tooling around pipeline parallelism. These tools see external use, and they themselves ease the process of handling multiple processes running different parts of the pipeline.\n\nRather than creating a new API standard, it is likely better to approach this from a pytorch angle from a \u201cthis is a pytorch backend, how do I do pipeline parallelism with pytorch\u201d. Looking at that angle, it is better to support SPMD+MPMD in these pipeline parallelism APIs rather than to create a new API.\n\n## Approach\nThe general approach will be to:\n1) Trace model without loading it to devices\n2) Split model into individually executing modules\n3) Create processes to execute on split modules\n4) Have modules be executed by process that will be responsible for executing gSPMD\n\nFrom an implementation perspective, the idea is that by allowing Local SPMD, and latent model initialization, APIs created to specialize on pipeline parallelism should be able to manage their individual processes.\n\n## PiPPy\n[PiPPy](https://github.com/pytorch/PiPPy/tree/main) is the pipeline parallelism library created by pytorch. It has an overall tool set that might be convenient. For PiPPy, pipeline parallelism usually will usually take:\n1) Initializing a model without loading it to devices\n2) Creating a pipe through pipeline\n  a. At this step, a `GraphModule` is created which contain the modules for each process to execute later\n3) Initializing a process group ([`dist.init_process_group`](https://docs.pytorch.org/docs/stable/distributed.html#torch.distributed.init_process_group))\n4) Creating `PipelineStage`s based on the pipe\n5) Executing each pipeline stage\n\nYou can see a step by step in [PiPPy\u2019s read me](https://github.com/pytorch/PiPPy/tree/main), or a llama model example [here](https://github.com/pytorch/PiPPy/blob/main/examples/llama/pippy_llama.py).\n\nEither way, this lets PiPPy to admin individual processes while each process executes gSPMD for the specific modules it was created with.\n\n## Ray\n[Ray](https://github.com/ray-project/ray) is a cluster controller for python that has a lot of utility for scaling large applications, including AI. Ray does not have an explicit pipeline parallelism API, but it can achieve it by leveraging its [actors](https://docs.ray.io/en/latest/ray-core/actors.html).\n\n1) Leverage PiPPy pipeline to create a `GraphModule`\n2) Leverage \u201cGraphModule\u201d to identify module splits\n3) Create Ray actors based on these graph modules\n4) Launch Ray actors, and wait for them to resolve\n\nRay will administer the different actor pod while each pod executes gSPMD for the specific modules it was created with.\n\n## A tale of two pipeline parallelism approaches\nCurrently PyTorchXLA does have a pipeline parallelism approach documented in https://github.com/pytorch/xla/tree/r2.7?tab=readme-ov-file. In its existing approach, each device is associated with a process. As the original [SPMD+MPMD RFC highlighted](https://github.com/pytorch/xla/issues/9019), this is a flawed approach as we are unable to apply gSPMD when using pipeline parallelism. The endeavor here to allow gSPMD to run in pipeline parallel through PiPPy, Ray, and other APIs might cause some confusion as a duplication of functionality.\n\nGiven that, it is worth noting that after the SPMD+MPMD effort, we should reassess our existing pipeline parallelism methodology, and see if it is possible to deduplicate to the more pytorch approach suggested in the RFC.\n",
    "url": "https://github.com/pytorch/xla/issues/9447",
    "state": "open",
    "labels": [
      "distributed",
      "RFC"
    ],
    "created_at": "2025-07-07T05:22:59Z",
    "updated_at": "2025-07-09T02:01:27Z",
    "comments": 2,
    "user": "pgmoka"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1448,
    "title": "How to specify both policy.type and pretrained path at the same time?",
    "body": "Hi, I am adding custom configs to a PreTrainedConfig, and I also want to load it from a pretrained path. However, if I specify the pretrained path (with policy.path), I won't be able to modify the fields inside the new PreTrainedConfig subclass. If I use policy.type=\"myNewModel\" instead, I am able to call the fields (such as `policy.new_field_in_myNewModel` when I run `lerobot/scripts/train.py`, but unable to specify the pretrained path.\n\nWhat is a good solution to this problem? \n\nThanks!",
    "url": "https://github.com/huggingface/lerobot/issues/1448",
    "state": "open",
    "labels": [
      "enhancement",
      "configuration"
    ],
    "created_at": "2025-07-07T03:33:15Z",
    "updated_at": "2025-08-12T09:45:58Z",
    "user": "branyang02"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1447,
    "title": "SmolVLA input/output clarification",
    "body": "I'm now trying to load the SmolVLA to control the Franka arm in simulation. I found that there could be three image inputs(Obeservation.image, 1 and 2) and I have top, wrist and side views. Is there a fixed order for those camera views?\n\nAnd the predicted action has 6 dimensions, does that mean it doesn't include the gripper state? What are those values represent for? Thanks in advance!",
    "url": "https://github.com/huggingface/lerobot/issues/1447",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-06T21:56:43Z",
    "updated_at": "2025-10-09T21:59:17Z",
    "user": "Calvert0921"
  },
  {
    "repo": "pytorch/ao",
    "number": 2496,
    "title": "[Feature Req] Can you add *args and **kwargs to improve extensibility ?",
    "body": "**Description:**\n\nThe current class implementations have not _*args_ and _**kwargs_ and this reduces extensibility.\n\n**Example:**\n\n> Current\n\n```python\nclass AdamW4bit(_AdamBase):\n    def __init__(\n        self,\n        params,\n        lr=1e-3,\n        betas=(0.9, 0.999),\n        eps=1e-8,\n        weight_decay=1e-2,\n        amsgrad=False,\n        *,\n        block_size=128,\n        bf16_stochastic_round=False,\n    ) -> None:\n        super().__init__(\n            params,\n            lr,\n            betas,\n            eps,\n            weight_decay,\n            amsgrad,\n            block_size=block_size,\n            bf16_stochastic_round=bf16_stochastic_round,\n            is_adamw=True,\n        )\n\n    @staticmethod\n    def _subclass_zeros(p: Tensor, signed: bool, block_size: int):\n        return OptimState4bit.zeros(p.shape, signed, block_size, p.device)\n```\n\n> Suggested \n\n```python\n\nclass AdamW4bit(_AdamBase):\n    def __init__(\n        self,\n        params,\n        lr=1e-3,\n        betas=(0.9, 0.999),\n        eps=1e-8,\n        weight_decay=1e-2,\n        amsgrad=False,\n        *,\n        block_size=128,\n        bf16_stochastic_round=False,**kwargs #NOTE: <------- Here\n    ) -> None:\n        super().__init__(\n            params,\n            lr,\n            betas,\n            eps,\n            weight_decay,\n            amsgrad,\n            block_size=block_size,\n            bf16_stochastic_round=bf16_stochastic_round,\n            is_adamw=True,**kwargs #NOTE: <------- Here\n        )\n\n    @staticmethod\n    def _subclass_zeros(p: Tensor, signed: bool, block_size: int):\n        return OptimState4bit.zeros(p.shape, signed, block_size, p.device)\n\n```",
    "url": "https://github.com/pytorch/ao/issues/2496",
    "state": "open",
    "labels": [
      "triaged"
    ],
    "created_at": "2025-07-06T17:29:19Z",
    "updated_at": "2025-08-01T02:52:20Z",
    "comments": 3,
    "user": "Musa-Sina-Ertugrul"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1446,
    "title": "How to evaluate finetuned SmolVLA model",
    "body": "Dear authors and your wonderful work.\nI have fine-tuned the smolvla model based on a customized lerobot format dataset. My dataset is picking up a banana and placing it on a box. How can I evaluate the performance of the model? I tried eval.py in the scripes directory, but env_type=pusht doesn't work. I think this env_type may cause eval.py to fail to run.\nI hope someone can help me. Thanks in advance.\n",
    "url": "https://github.com/huggingface/lerobot/issues/1446",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-06T15:27:22Z",
    "updated_at": "2025-10-17T11:57:49Z",
    "user": "BintaoBryant"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11865,
    "title": "AttributeError: type object 'CosmosTransformer3DModel' has no attribute 'from_single_file'",
    "body": "### Describe the bug\n\nI would like to run the Cosmos-Predict2-14B-Text2Image model, but it is too large to fit in 24GB of VRAM normally, so I tried to load a Q8_0 GGUF quantization. I copied some code from the [HiDreamImageTransformer2DModel](https://huggingface.co/docs/diffusers/en/api/models/hidream_image_transformer#loading-gguf-quantized-checkpoints-for-hidream-i1) page and tried to adapt it, but I get the following error:\n\n`AttributeError: type object 'CosmosTransformer3DModel' has no attribute 'from_single_file'`\n\nIs there supposed to be another way to load a 8 bit quantization? From what I have seen, Q8_0 typically produces results that are much closer to full precision compared to FP8.\n\n### Reproduction\n\n```\ntransformer = CosmosTransformer3DModel.from_single_file(\n    rf\"{model_14b_id}\\cosmos-predict2-14b-text2image-Q8_0.gguf\",\n    quantization_config=GGUFQuantizationConfig(compute_dtype=torch.bfloat16),\n    torch_dtype=torch.bfloat16\n)\npipe_14b = Cosmos2TextToImagePipeline.from_pretrained(\n    model_14b_id,\n    torch_dtype=torch.bfloat16,\n    transformer = transformer\n)\n```\n\n### Logs\n\n```shell\n    transformer = CosmosTransformer3DModel.from_single_file(\n                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAttributeError: type object 'CosmosTransformer3DModel' has no attribute 'from_single_file'\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.35.0.dev0\n- Platform: Windows-10-10.0.26100-SP0\n- Running on Google Colab?: No\n- Python version: 3.11.9\n- PyTorch version (GPU?): 2.7.1+cu128 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.33.1\n- Transformers version: 4.53.0\n- Accelerate version: 1.8.1\n- PEFT version: 0.15.2\n- Bitsandbytes version: 0.46.1\n- Safetensors version: 0.5.3\n- xFormers version: not installed\n- Accelerator: NVIDIA GeForce RTX 4090, 24564 MiB\n- Using GPU in script?: Yes\n- Using distributed or parallel set-up in script?: No\n\n\n### Who can help?\n\n@DN6 ",
    "url": "https://github.com/huggingface/diffusers/issues/11865",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-05T12:14:50Z",
    "updated_at": "2025-07-11T07:15:23Z",
    "comments": 9,
    "user": "mingyi456"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11864,
    "title": "AutoencoderDC.encode fails with torch.compile(fullgraph=True) - \"name 'torch' is not defined\"",
    "body": "### Describe the bug\n\nI'm trying to optimize my data preprocessing pipeline for the Sana model by using `torch.compile` on the DC-AE encoder. Following PyTorch's best practices, I attempted to compile only the `encode` method with `fullgraph=True` for better performance, but I'm encountering an error.\n\nWhen I try:\n```python\ndae.encode = torch.compile(dae.encode, fullgraph=True)\n```\n\nThe code fails with `NameError: name 'torch' is not defined` when calling `dae.encode(x)`.\n\nHowever, compiling the entire model works:\n```python\ndae = torch.compile(dae, fullgraph=True)\n```\n\nI'm unsure if this is expected behavior or if I'm doing something wrong. Is there a recommended way to compile just the encode method for `AutoencoderDC`? \n\nI was advised to use the more targeted approach of compiling only the encode method for better performance, but it seems like the DC-AE model might have some internal structure that prevents this optimization pattern.\n\nAny guidance on the correct way to apply `torch.compile` optimizations to `AutoencoderDC` would be greatly appreciated. Should I stick with compiling the entire model, or is there a way to make method-level compilation work?\n\n\n### Reproduction\n\n```\nimport torch\nfrom diffusers import AutoencoderDC\n\n# Load model\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\ndae = AutoencoderDC.from_pretrained(\n    \"mit-han-lab/dc-ae-f32c32-sana-1.1-diffusers\",\n    torch_dtype=torch.bfloat16\n).to(device).eval()\n\n# This fails with \"name 'torch' is not defined\"\ndae.encode = torch.compile(dae.encode, fullgraph=True)\n\n# Test\nx = torch.randn(1, 3, 512, 512, device=device, dtype=torch.bfloat16)\nout = dae.encode(x)  # Error occurs here\n# This works fine\ndae = torch.compile(dae, fullgraph=True)\n```\n\n### Logs\n\n```shell\nTesting torch.compile(dae.encode, fullgraph=True)\n/data1/tzz/anaconda_dir/envs/Sana/lib/python3.10/site-packages/torch/_inductor/compile_fx.py:150: UserWarning: TensorFloat32 tensor cores for float32 matrix multiplication available but not enabled. Consider setting `torch.set_float32_matmul_precision('high')` for better performance.\n  warnings.warn(\n  \u2717 Error: name 'torch' is not defined\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.34.0.dev0\n- Platform: Linux-5.15.0-142-generic-x86_64-with-glibc2.35\n- Running on Google Colab?: No\n- Python version: 3.10.18\n- PyTorch version (GPU?): 2.4.0+cu121 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.33.0\n- Transformers version: 4.45.2\n- Accelerate version: 1.7.0\n- PEFT version: 0.15.2\n- Bitsandbytes version: 0.46.0\n- Safetensors version: 0.5.3\n- xFormers version: 0.0.27.post2\n- Accelerator: NVIDIA A100-SXM4-80GB, 81920 MiB\nNVIDIA A100-SXM4-80GB, 81920 MiB\nNVIDIA A100-SXM4-80GB, 81920 MiB\nNVIDIA A100-SXM4-80GB, 81920 MiB\nNVIDIA A100-SXM4-80GB, 81920 MiB\nNVIDIA A100-SXM4-80GB, 81920 MiB\nNVIDIA A100-SXM4-80GB, 81920 MiB\n- Using GPU in script?: yes\n- Using distributed or parallel set-up in script?: no\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11864",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-05T06:15:11Z",
    "updated_at": "2025-07-09T01:32:39Z",
    "comments": 6,
    "user": "SingleBicycle"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7669,
    "title": "How can I add my custom data to huggingface datasets",
    "body": "I want to add my custom dataset in huggingface dataset. Please guide me how to achieve that.",
    "url": "https://github.com/huggingface/datasets/issues/7669",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-04T19:19:54Z",
    "updated_at": "2025-07-05T18:19:37Z",
    "user": "xiagod"
  },
  {
    "repo": "pytorch/executorch",
    "number": 12221,
    "title": "How to build executorch with ANDROID_ABI=armeabi-v7a",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nhttps://github.com/pytorch/executorch/blob/main/tools/cmake/Utils.cmake#L89\nhere, there is no \"ANDROID_ABI=armeabi-v7a\" option, so if i want to build executorch for ANDROID_ABI=armeabi-v7a, how to do?\nthank you very much\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### RFC (Optional)\n\n_No response_\n\ncc @larryliu0820 @jathu",
    "url": "https://github.com/pytorch/executorch/issues/12221",
    "state": "open",
    "labels": [
      "module: build/install",
      "triaged"
    ],
    "created_at": "2025-07-04T02:22:51Z",
    "updated_at": "2025-12-01T07:52:13Z",
    "user": "barbecacov"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1442,
    "title": "Trained pi0 policy ignores visual cues",
    "body": "I am having an issue in which my trained pi0 policy looks smooth but it completely ignores the camera input. I have tried covering up a camera and the policy still looks smooth! This seems very wrong. I wonder if it is because my images are not normalized correctly? Has anyone else seen this?\n\n Do i need to change the \"NormalizationMode\" visual for pi0? Seems like this may be a repeat of https://github.com/huggingface/lerobot/issues/1065? \n\n",
    "url": "https://github.com/huggingface/lerobot/issues/1442",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-03T20:13:08Z",
    "updated_at": "2025-08-12T09:47:09Z",
    "user": "kumarhans"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1439,
    "title": "[QUESTION] run a policy on a real robot",
    "body": "Hi There, In the documentation , scripts to teleoperate, record, replay or evaluate a policy are provided **but how to run a policy for inference only on a real robot** ? I did not find such a script? \n\nBesides it may be interesting to add such a script in the documentation as well\n\nThank you very much for your help\n",
    "url": "https://github.com/huggingface/lerobot/issues/1439",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-03T18:09:10Z",
    "updated_at": "2025-08-12T09:47:27Z",
    "user": "FaboNo"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 1512,
    "title": "How can we use this benchmark to evaluate local models?",
    "body": "examples/smolagents_benchmark/run.py\n\n",
    "url": "https://github.com/huggingface/smolagents/issues/1512",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-07-03T06:17:58Z",
    "updated_at": "2025-07-03T08:07:26Z",
    "user": "OoOPenN"
  },
  {
    "repo": "pytorch/ao",
    "number": 2477,
    "title": "Support running multi-device tests in CI",
    "body": "For float8 training, the test_everything.sh script requires multiple GPUs for FSDP/TP tests, so we currently don't run in CI as it's not configured for multi-device jobs. We should figure out how to run these multi-device tests in CI. This would also be useful for some of our new MoE training parallelism tests.",
    "url": "https://github.com/pytorch/ao/issues/2477",
    "state": "closed",
    "labels": [
      "ci",
      "float8"
    ],
    "created_at": "2025-07-02T16:29:47Z",
    "updated_at": "2025-07-16T16:31:06Z",
    "comments": 2,
    "user": "danielvegamyhre"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11849,
    "title": "Can not load fusionx_lora into original wan2.1-14b",
    "body": "hello, i am adding the fusionx_lora into original wan2.1-14b-i2v, my code is as follow:\n\n> pipe = WanImageToVideoPipeline.from_pretrained(my_local_path + \"Wan2.1-I2V-14B-480P-Diffusers\", vae=vae, image_encoder=image_encoder, torch_dtype=torch.bfloat16)\n> pipe.load_lora_weights(\n>         my_local_path + \"Wan14BT2VFusioniX/FusionX_LoRa/Wan2.1_I2V_14B_FusionX_LoRA.safetensors\"\n>     )\n\nBut i got some errors:\n\n \n\n> File \"/mmu_mllm_hdd_2/zuofei/infer_test/lora_infer_multi.py\", line 60, in process_image\n>     pipe.load_lora_weights(\n>   File \"/hetu_group/zuofei/env/wan_infer/lib/python3.12/site-packages/diffusers/loaders/lora_pipeline.py\", line 4869, in load_lora_weights\n>     state_dict = self.lora_state_dict(pretrained_model_name_or_path_or_dict, **kwargs)\n>                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n>   File \"/hetu_group/zuofei/env/wan_infer/lib/python3.12/site-packages/huggingface_hub/utils/_validators.py\", line 114, in _inner_fn\n>     return fn(*args, **kwargs)\n>            ^^^^^^^^^^^^^^^^^^^\n>   File \"/hetu_group/zuofei/env/wan_infer/lib/python3.12/site-packages/diffusers/loaders/lora_pipeline.py\", line 4796, in lora_state_dict\n>     state_dict = _convert_non_diffusers_wan_lora_to_diffusers(state_dict)\n>                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n>   File \"/hetu_group/zuofei/env/wan_infer/lib/python3.12/site-packages/diffusers/loaders/lora_conversion_utils.py\", line 1564, in _convert_non_diffusers_wan_lora_to_diffusers\n>     num_blocks = len({k.split(\"blocks.\")[1].split(\".\")[0] for k in original_state_dict})\n>                       ~~~~~~~~~~~~~~~~~~^^^\n> IndexError: list index out of range\n\nCan you tell me how to fix it? Thank you so much!",
    "url": "https://github.com/huggingface/diffusers/issues/11849",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-02T13:48:17Z",
    "updated_at": "2025-07-02T13:48:17Z",
    "comments": 0,
    "user": "fzuo1230"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39169,
    "title": "Using Gemma3n with text-only generation requires image dependencies",
    "body": "### System Info\n\n- `transformers` version: 4.53.0\n- Platform: macOS-15.5-arm64-arm-64bit\n- Python version: 3.12.8\n- Huggingface_hub version: 0.33.2\n- Safetensors version: 0.5.3\n- Accelerate version: not installed\n- Accelerate config: not found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.7.1 (NA)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: <fill in>\n\n### Who can help?\n\n@zucchini-nlp \n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nI want to use the Gemma3n model in a text-only generation pipeline (without any multimodal inputs). I'm using the  Gemma3nForCausalLM because it has only a language modeling head. But when running the script, it fails with an ImportError stating that `AutoImageProcessor` requires the PIL and timm libraries to work. How can I run Gemma3n for text-generation without those image-related dependencies?\n\n```python\nfrom transformers import AutoTokenizer, Gemma3nForCausalLM\nimport torch\n\nmodel_id = \"google/gemma-3n-e4b\"\n\nmodel = Gemma3nForCausalLM.from_pretrained(model_id)\ntokenizer = AutoTokenizer.from_pretrained(model_id)\n\nprompt = \"Once upon a time\"\ninputs = tokenizer(prompt, return_tensors=\"pt\").to(model.device)\noutput = model.generate(**inputs, max_length=30)\n\nresponse = tokenizer.decode(output[0], skip_special_tokens=True)\n\nprint(response)\n```\n\n### Expected behavior\n\nI expect the script to run successfully without installing `pillow` and `timm`.",
    "url": "https://github.com/huggingface/transformers/issues/39169",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-07-02T07:46:43Z",
    "updated_at": "2025-08-01T08:14:26Z",
    "comments": 6,
    "user": "marianheinsen"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1429,
    "title": "When will release the SmolVLA(2.25B & 0.24b)",
    "body": "Hi dear authors \nthx for ur all and the wonderful work - SmolVLA!\nI wonder will u release the **SmolVLA(2.25B)?** I want to compare the performance with your release version(0.45B)",
    "url": "https://github.com/huggingface/lerobot/issues/1429",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-02T03:39:06Z",
    "updated_at": "2025-10-11T07:21:57Z",
    "user": "JuilieZ"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3416,
    "title": "How to calculate prompt tokens for embedding model encode?",
    "body": "I want to calculate input prompt tokens, which returns to user to let them know how many tokens they consumed. How can I do that? Could you give me an example?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3416",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-02T03:27:11Z",
    "updated_at": "2025-07-03T07:02:55Z",
    "user": "gaoxt1983"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3414,
    "title": "How to fine tune multimodal embedding model?",
    "body": "Hi @tomaarsen and Team - hope all is well & thanks for the work.\n\nI used to fine tune some pure text based embedding models using this package and now I would like to fine tune multimodal embedding models such as `llamaindex/vdr-2b-multi-v1` and `jinaai/jina-embeddings-v4`.\n\nI wonder if you can share some insights / relevant documentation / code examples?\n\nThank you.",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3414",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-01T23:45:04Z",
    "updated_at": "2025-07-03T10:25:29Z",
    "user": "groklab"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 157393,
    "title": "How to compose HSDP with CP?",
    "body": "### \ud83d\udc1b Describe the bug\n\nWe're trying to compose HSDP with CP following the [torchtitan blog post](https://discuss.pytorch.org/t/distributed-w-torchtitan-breaking-barriers-training-long-context-llms-with-1m-sequence-length-in-pytorch-using-context-parallel/215082) but are running into some issues and it's unclear to us why.\n\nSuppose we have a device mesh with dimensions `[\"dp\", \"cp\", \"ep\"]` where `ep` corresponds to expert parallelism. What we want to do is FSDP on `dp+cp` shards for the expert parameters and HSDP (replicate on `dp+cp`, shard on `ep`) for the non-expert parameters.\n\nOur code looks like the following:\n\n```\nmesh = DeviceMesh(..., mesh_dim_names=[\"dp\", \"cp\", \"ep\"])\nfsdp_mesh = mesh[\"dp\", \"cp\"]._flatten(mesh_dim_name=\"dp_cp\")\nhsdp_mesh = mesh[\"dp_cp\", \"ep\"]\n```\n\nLine 3 above fails because \"ep\" somehow does not exist in the mesh after \"dp_cp\". I'm not sure if this is a bug or the intended way for DeviceMesh to behave. If the latter, is there any way to use a flattend mesh as the replication dim for HSDP?\n\n### Versions\n\n\nCollecting environment information...\nPyTorch version: 2.7.0+cu128\nIs debug build: False\nCUDA used to build PyTorch: 12.8\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 20.04.6 LTS (x86_64)\nGCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0\nClang version: Could not collect\nCMake version: version 3.31.6\nLibc version: glibc-2.31\n\nPython version: 3.12.8 | packaged by Anaconda, Inc. | (main, Dec 11 2024, 16:31:09) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-5.15.0-1081-aws-x86_64-with-glibc2.31\nIs CUDA available: False\nCUDA runtime version: 12.1.105\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: Could not collect\nNvidia driver version: Could not collect\ncuDNN version: Could not collect\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nByte Order:                           Little Endian\nAddress sizes:                        46 bits physical, 48 bits virtual\nCPU(s):                               48\nOn-line CPU(s) list:                  0-47\nThread(s) per core:                   1\nCore(s) per socket:                   24\nSocket(s):                            2\nNUMA node(s):                         2\nVendor ID:                            GenuineIntel\nCPU family:                           6\nModel:                                85\nModel name:                           Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz\nStepping:                             4\nCPU MHz:                              2499.994\nBogoMIPS:                             4999.98\nHypervisor vendor:                    KVM\nVirtualization type:                  full\nL1d cache:                            1.5 MiB\nL1i cache:                            1.5 MiB\nL2 cache:                             48 MiB\nL3 cache:                             66 MiB\nNUMA node0 CPU(s):                    0-23\nNUMA node1 CPU(s):                    24-47\nVulnerability Gather data sampling:   Unknown: Dependent on hypervisor status\nVulnerability Itlb multihit:          KVM: Mitigation: VMX unsupported\nVulnerability L1tf:                   Mitigation; PTE Inversion\nVulnerability Mds:                    Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown\nVulnerability Meltdown:               Mitigation; PTI\nVulnerability Mmio stale data:        Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Vulnerable\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Vulnerable\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Retpolines; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Retpoline\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affected\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves ida arat pku ospke\n\nVersions of relevant libraries:\n[pip3] numpy==2.2.5\n[pip3] nvidia-cublas-cu12==12.8.3.14\n[pip3] nvidia-cuda-cupti-cu12==12.8.57\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.61\n[pip3] nvidia-cuda-runtime-cu12==12.8.57\n[pip3] nvidia-cudnn-cu12==9.7.1.26\n[pip3] nvidia-cufft-cu12==11.3.3.41\n[pip3] nvidia-curand-cu12==10.3.9.55\n[pip",
    "url": "https://github.com/pytorch/pytorch/issues/157393",
    "state": "closed",
    "labels": [
      "oncall: distributed",
      "triaged"
    ],
    "created_at": "2025-07-01T20:45:27Z",
    "updated_at": "2025-07-09T00:10:23Z",
    "user": "EugenHotaj"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1424,
    "title": "evaluated trained policy reports 14 pc_success only",
    "body": "Trained act policy using \n\n```\npython lerobot/scripts/train.py \\\n    --policy.type=act \\\n    --dataset.repo_id=lerobot/act_aloha_sim_insertion_human  \\\n   --env.type=aloha \\\n    --output_dir=outputs/train/act_aloha_insertion\n```\n\nQuestion: I think I mistakenly used the prefix `act_` in the `repo_id` but if I don't use it I get this error:\n\n```\n$ python lerobot/scripts/train.py     --policy.type=act     --dataset.repo_id=lerobot/aloha_sim_insertion_human     --env.type=aloha     --output_dir=outputs/train/act_aloha_insertion\nINFO 2025-07-01 05:47:32 ils/utils.py:48 Cuda backend detected, using cuda.\nWARNING 2025-07-01 05:47:32 /policies.py:77 Device 'None' is not available. Switching to 'cuda'.\nTraceback (most recent call last):\n  File \"/home/user/lerobot/lerobot/scripts/train.py\", line 291, in <module>\n    train()\n  File \"/home/user/lerobot/lerobot/configs/parser.py\", line 226, in wrapper_inner\n    response = fn(cfg, *args, **kwargs)\n  File \"/home/user/lerobot/lerobot/scripts/train.py\", line 110, in train\n    cfg.validate()\n  File \"/home/user/lerobot/lerobot/configs/train.py\", line 120, in validate\n    raise ValueError(\nValueError: 'policy.repo_id' argument missing. Please specify it to push the model to the hub.\n```\n\nUsing that \"act_\" prefix in the repo id I attempted to Evaluate it using the command below but it reports `pc_success` being 14% which seems too low?\n\n```\n python lerobot/scripts/eval.py \\\n--policy.path=outputs/train/act_aloha_insertion/checkpoints/last/pretrained_model  \\\n--env.type=aloha \\\n--eval.batch_size=10 \\\n--eval.n_episodes=50 \n```\n\nDetailed output of the above command:\n\n```\n$ python lerobot/scripts/eval.py --policy.path=outputs/train/act_aloha_insertion/checkpoints/last/pretrained_model  --env.type=aloha --eval.batch_size=10 --eval.n_episodes=50    \nINFO 2025-07-01 05:33:14 pts/eval.py:467 {'env': {'episode_length': 400,\n         'features': {'action': {'shape': (14,),\n                                 'type': <FeatureType.ACTION: 'ACTION'>},\n                      'agent_pos': {'shape': (14,),\n                                    'type': <FeatureType.STATE: 'STATE'>},\n                      'pixels/top': {'shape': (480, 640, 3),\n                                     'type': <FeatureType.VISUAL: 'VISUAL'>}},\n         'features_map': {'action': 'action',\n                          'agent_pos': 'observation.state',\n                          'pixels/top': 'observation.images.top',\n                          'top': 'observation.image.top'},\n         'fps': 50,\n         'obs_type': 'pixels_agent_pos',\n         'render_mode': 'rgb_array',\n         'task': 'AlohaInsertion-v0'},\n 'eval': {'batch_size': 10, 'n_episodes': 50, 'use_async_envs': False},\n 'job_name': 'aloha_act',\n 'output_dir': PosixPath('outputs/eval/2025-07-01/05-33-14_aloha_act'),\n 'policy': {'chunk_size': 100,\n            'device': 'cuda',\n            'dim_feedforward': 3200,\n            'dim_model': 512,\n            'dropout': 0.1,\n            'feedforward_activation': 'relu',\n            'input_features': {'observation.images.top': {'shape': (3,\n                                                                    480,\n                                                                    640),\n                                                          'type': <FeatureType.VISUAL: 'VISUAL'>},\n                               'observation.state': {'shape': (14,),\n                                                     'type': <FeatureType.STATE: 'STATE'>}},\n            'kl_weight': 10.0,\n            'latent_dim': 32,\n            'license': None,\n            'n_action_steps': 100,\n            'n_decoder_layers': 1,\n            'n_encoder_layers': 4,\n            'n_heads': 8,\n            'n_obs_steps': 1,\n            'n_vae_encoder_layers': 4,\n            'normalization_mapping': {'ACTION': <NormalizationMode.MEAN_STD: 'MEAN_STD'>,\n                                      'STATE': <NormalizationMode.MEAN_STD: 'MEAN_STD'>,\n                                      'VISUAL': <NormalizationMode.MEAN_STD: 'MEAN_STD'>},\n            'optimizer_lr': 1e-05,\n            'optimizer_lr_backbone': 1e-05,\n            'optimizer_weight_decay': 0.0001,\n            'output_features': {'action': {'shape': (14,),\n                                           'type': <FeatureType.ACTION: 'ACTION'>}},\n            'pre_norm': False,\n            'pretrained_backbone_weights': 'ResNet18_Weights.IMAGENET1K_V1',\n            'private': None,\n            'push_to_hub': False,\n            'replace_final_stride_with_dilation': 0,\n            'repo_id': None,\n            'tags': None,\n            'temporal_ensemble_coeff': None,\n            'use_amp': False,\n            'use_vae': True,\n            'vision_backbone': 'resnet18'},\n 'seed': 1000}\nINFO 2025-07-01 05:33:14 pts/eval.py:476 Output dir: outputs/eval/2025-07-01/05-33-14_aloha_act\nINFO 2025-07-01 05:33:14 pts/eval.py:478 Making environment.\nINFO 2025-07-01 05:33:14 /__init__.py:84 MUJOCO_GL=%s, attempting to import specified O",
    "url": "https://github.com/huggingface/lerobot/issues/1424",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-07-01T12:16:38Z",
    "updated_at": "2025-08-12T09:49:05Z",
    "user": "raul-machine-learning"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1421,
    "title": "It would help to have a description for the lerobots datasets:",
    "body": "for example, for [lerobot/aloha_sim_insertion_human](https://huggingface.co/datasets/lerobot/aloha_sim_insertion_human) comes with no description at all\n\n\nI'd help to know\n- What makes this data special/interesting\n- How to train different models in the simulator\n- What should we expect\n- what does the `_human` means, and how is it different from the `_script` suffix",
    "url": "https://github.com/huggingface/lerobot/issues/1421",
    "state": "open",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-07-01T10:14:45Z",
    "updated_at": "2025-08-12T09:49:27Z",
    "user": "raul-machine-learning"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1419,
    "title": "simulator should allow pushing objects around with the mouse interactively",
    "body": "Not having this is preventing us from testing, debugging and playing with the robots.\n\nAccording to Mujoco documentation this feature available in their simulator but it is not exposed in lerobot:\n\n```\nA related usability feature is the ability to \u201creach into\u201d the simulation, push objects around and see how the \nphysics respond. The user selects the body to which the external forces and torques will be applied, and sees \na real-time rendering of the perturbations together with their dynamic consequences. This can be used to debug \nthe model visually, to test the response of a feedback controller, or to configure the model into a desired pose.\n```\n\nAlso for an awesome OOTB experience it would be great to have a script that loads a pretrained model and makes the interactive simulation just work.\n",
    "url": "https://github.com/huggingface/lerobot/issues/1419",
    "state": "open",
    "labels": [
      "question",
      "simulation"
    ],
    "created_at": "2025-07-01T09:47:02Z",
    "updated_at": "2025-08-12T09:50:18Z",
    "user": "raul-machine-learning"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1418,
    "title": "Robot tries to transfer cube even if it failed to pick it up, shouldn't it retry?",
    "body": "I am evaluating the following policy:\n```\npython lerobot/scripts/eval.py --policy.path=lerobot/act_aloha_sim_transfer_cube_human --env.type=aloha --env.task=AlohaTransferCube-v0 --eval.n_episodes=1 --eval.batch_size=1\n```\n\nHowever the robot fails to pick up the cube but carries on with the task, shouldn't the robot keep on trying until it picks up the cube? See the video\n\nhttps://github.com/user-attachments/assets/5ad20353-97bc-4d03-a78d-5f9f149c95f9\n",
    "url": "https://github.com/huggingface/lerobot/issues/1418",
    "state": "closed",
    "labels": [
      "question",
      "simulation"
    ],
    "created_at": "2025-07-01T09:18:38Z",
    "updated_at": "2025-10-17T11:57:34Z",
    "user": "raul-machine-learning"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 157352,
    "title": "[aot_compile]Explanation: Dynamo does not know how to trace the builtin `time.time.`",
    "body": "### \ud83d\udc1b Describe the bug\n\nGraph break error happened when I compile yolov5 with torch._export.aot_compile interface. I also try with torch.compile and graph breaks also happened. but it compile normally. I am not sure whether this is dynamo bug and how can I resolve this issue.\n\n### Error logs\n\n# code example:\n```\nclass MyYoulo(torch.nn.Module):\n    def __init__(self):\n        super().__init__()\n        self.youlo = torch.hub.load('ultralytics/yolov5', 'yolov5s')\n\n    def forward(self, x):\n        return self.youlo(x)\n\nwith torch.no_grad():\n    torch.manual_seed(0)\n    torch._dynamo.config.suppress_errors = True\n    input_cpu = torch.rand([1, 3, 640, 640])\n    model_cpu = MyYoulo()\n    model_cpu.eval()\n    output_cpu = model_cpu(input_cpu)\n\n    device = \"cuda\"\n    model = model_cpu.to(device=device)\n    x = input_cpu.cuda()\n    example_inputs = (x,)\n    batch_dim = torch.export.Dim(\"batch\", min=1, max=1024)\n    model_so_path = torch._export.aot_compile(\n        model,\n        example_inputs,\n        #dynamic_shapes={\"x\": {0: batch_dim}},\n        options={\"aot_inductor.output_path\": os.path.join(os.getcwd(), \"libyolo.so\")},\n    )\n```\n\n# backtrace\n\n```\n File \"/root/workspace/youlo/youlo.py\", line 35, in <module>\n    model_so_path = torch._export.aot_compile(\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/conda/lib/python3.11/site-packages/torch/_export/__init__.py\", line 133, in aot_compile\n    gm = _export_to_torch_ir(\n         ^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/conda/lib/python3.11/site-packages/torch/export/_trace.py\", line 739, in _export_to_torch_ir\n    gm_torch_level, _ = torch._dynamo.export(\n                        ^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/conda/lib/python3.11/site-packages/torch/_dynamo/eval_frame.py\", line 1677, in inner\n    result_traced = opt_f(*args, **kwargs)\n                    ^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/conda/lib/python3.11/site-packages/torch/nn/modules/module.py\", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/conda/lib/python3.11/site-packages/torch/nn/modules/module.py\", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/conda/lib/python3.11/site-packages/torch/_dynamo/eval_frame.py\", line 659, in _fn\n    raise e.with_traceback(None) from None\ntorch._dynamo.exc.Unsupported: Attempted to call function marked as skipped\n  Explanation: Dynamo does not know how to trace the builtin `time.time.` This function is either a Python builtin (e.g. _warnings.warn) or a third-party C/C++ Python extension (perhaps created with pybind).\n  Hint: If it is a Python builtin, please file an issue on GitHub so the PyTorch team can add support for it and see the next case for a workaround.\n  Hint: If it is a third-party C/C++ Python extension, please either wrap it into a PyTorch-understood custom operator (see https://pytorch.org/tutorials/advanced/custom_ops_landing_page.html for more details) or, if it is traceable, use `torch.compiler.allow_in_graph`.\n```\n\n### Versions\n\nversion: torch-2.7.0+cu128\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4",
    "url": "https://github.com/pytorch/pytorch/issues/157352",
    "state": "closed",
    "labels": [
      "oncall: pt2",
      "module: dynamo",
      "oncall: export"
    ],
    "created_at": "2025-07-01T05:58:10Z",
    "updated_at": "2025-07-04T06:23:42Z",
    "user": "duanmu0228"
  },
  {
    "repo": "pytorch/examples",
    "number": 1362,
    "title": "Resnet50 on single node with 8 GPUs, all the parameters are default. why the result is different ?",
    "body": "Hello, I use the command \"python main.py -a resnet50 --dist-url 'tcp://127.0.0.1:60000/' --dist-backend 'nccl' --multiprocessing-distributed --world-size 1 --rank 0 /my_data_dir/\" train and test resnet50 on a single node with 8 GPUs. But I got Acc@1 75.694  Acc@5 92.704, this is different from the result presented on https://github.com/facebookarchive/fb.resnet.torch/blob/master/pretrained/README.md (ResNet-50 error rate TOP1:24.01\tTOP5:7.02). All the parameters are default. why the result is different ?",
    "url": "https://github.com/pytorch/examples/issues/1362",
    "state": "open",
    "labels": [],
    "created_at": "2025-07-01T04:37:58Z",
    "updated_at": "2025-07-01T04:37:58Z",
    "comments": 0,
    "user": "sdwhzh"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39137,
    "title": "ImportError: cannot import name 'pipeline' from 'transformers'",
    "body": "### System Info\n\nI am using Databricks notebook. \nDatabricks runtime: 13.3 LTS (includes Apache Spark 3.4.1, Scala 2.12)\n\n### Who can help?\n\n@Rocketknight1 @SunMarc @zach-huggingface\n\n### Information\n\n- [x] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nHere is the code:\n\n```\n%pip install --upgrade torch transformers accelerate deepspeed bitsandbytes huggingface_hub\ndbutils.library.restartPython()\n\nimport os\nimport torch\nfrom transformers import AutoTokenizer, AutoModelForCausalLM, pipeline\n```\n\nError:\n`ImportError: cannot import name 'pipeline' from 'transformers' (/local_disk0/.ephemeral_nfs/envs/pythonEnv-a13cd5c4-d035-4d04-87bd-75088348617d/lib/python3.10/site-packages/transformers/__init__.py)`\n\nPython: 3.10.12\ninstalled packages:\ntransformers== 4.53.0\nhuggingface_hub==0.33.1\ntorch==2.7.1+cu126\naccelerate==1.8.1\ndeepspeed==0.17.1\nbitsandbytes==0.46.0\n\nThese are all up-to-date versions for all of these packages. What is the problem?\n\n### Expected behavior\n\nImport without error.",
    "url": "https://github.com/huggingface/transformers/issues/39137",
    "state": "closed",
    "labels": [
      "Usage",
      "bug"
    ],
    "created_at": "2025-06-30T18:49:54Z",
    "updated_at": "2025-10-23T00:53:19Z",
    "comments": 14,
    "user": "atabari-bci"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1407,
    "title": "Can read the current signals from the lerobot?",
    "body": "Can a user read the current signals from the LeRobot?",
    "url": "https://github.com/huggingface/lerobot/issues/1407",
    "state": "open",
    "labels": [
      "question",
      "sensors"
    ],
    "created_at": "2025-06-30T10:05:26Z",
    "updated_at": "2025-08-12T09:51:06Z",
    "user": "Frank-ZY-Dou"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2314,
    "title": "How to set the dynamic input sizes for decoder_with_past_model.onnx of NLLB",
    "body": "Dear author,\nI'm a beginner in optimum. So this question may be an elementary one. I used optimum to export decoder_with_past_model.onnx from nllb-200-distilled-600M. The resulted onnx has many inputs with dynamic shape. Now I intend to overwrite the inputs with static sizes. However, I'm not sure about the correct settings. \n\nThere are 4 arguments to be determined and I set:\nbatch_size = 1\nencoder_sequence_length = 200 (same with max_length)\npast_decoder_sequence_length = 200\nencoder_sequence_length_out = 200\n\nAny suggestions are appre\n\n![Image](https://github.com/user-attachments/assets/5f5da148-7e22-40f3-8d8c-6407884f469d)\n\nciated. Big thanks.",
    "url": "https://github.com/huggingface/optimum/issues/2314",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2025-06-30T06:37:50Z",
    "updated_at": "2025-08-07T02:17:43Z",
    "user": "liamsun2019"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3637,
    "title": "\u2753 [Question] Why is `torch.bfloat16` excluded from the `allowed_casts` set ?",
    "body": "https://github.com/pytorch/TensorRT/blob/a66241158dc33a96138ac768a9e1facf0cae3594/py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py#L1030-L1037\n\n\nIs there a specific reason why `torch.bfloat16` is not included in the `allowed_casts` set within the `to_copy_dtype_validator` function?\n\nPlus, this causes graph partitioning when performing a `aten.ops._to_copy` operation to `torch.bfloat16`. I'm wondering if this could potentially impact performance.",
    "url": "https://github.com/pytorch/TensorRT/issues/3637",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-30T02:24:47Z",
    "updated_at": "2025-07-04T00:01:16Z",
    "user": "junstar92"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39114,
    "title": "Is there a way to force it to use ASCII based progress bar and not the ipython widget one?",
    "body": "When loading models, I like it better to have a ASCII based progress bar and not a IPython one",
    "url": "https://github.com/huggingface/transformers/issues/39114",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-06-29T22:41:19Z",
    "updated_at": "2025-07-07T13:20:13Z",
    "comments": 0,
    "user": "weathon"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39105,
    "title": "How to use other acceleration apis of npu?",
    "body": "### Feature request\n\nI noticed that transformers now support using flash attention directly in the npu by [```npu_flash_attention.py```](https://github.com/huggingface/transformers/pull/36696). There are many other acceleration apis that can be used in npu, such as shown in [doc](https://www.hiascend.com/document/detail/zh/Pytorch/700/ptmoddevg/trainingmigrguide/performance_tuning_0028.html).\n\n How can we use them directly in transformers? How to switch seamlessly between different devices?\n\n### Motivation\n\nRequest to integrate other acceleration apis of npu in transformers. If this can be done, the ease of using transformers will be greatly improved in npu.",
    "url": "https://github.com/huggingface/transformers/issues/39105",
    "state": "closed",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-06-29T08:26:29Z",
    "updated_at": "2026-01-04T07:23:26Z",
    "user": "zheliuyu"
  },
  {
    "repo": "huggingface/candle",
    "number": 3013,
    "title": "Word Timestamp for whisper",
    "body": "Hi is there no way to get word timestamp using the whisper in candle?\n\nThe example successfully demonstrates the retrieval of segment timestamp but how would one retrieve word timestamp.\n\nWhen I look into python code, they seem to pass this `word_timestamp=True` argument while transcribing and get the result with `base` model.\n\nIs there any work around or can someone point me towards how to achieve this please.",
    "url": "https://github.com/huggingface/candle/issues/3013",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-29T01:16:38Z",
    "updated_at": "2025-06-29T23:47:39Z",
    "comments": 2,
    "user": "bp7968h"
  },
  {
    "repo": "huggingface/trl",
    "number": 3662,
    "title": "What is the point of steps_per_gen in GRPO Trainer",
    "body": "Hello, can you please explain what is the point of steps_per_gen in GRPO Training config when we already have num_iterations? The policy update logic can then simply be:\n\nif num_iterations = 1, generations and model update are on_policy (per_token_logps = old_per_token_logps)\n\nWhen num_iterations > 1, then the same generation will be used for multiple times, and per_token_logps will be different from old_per_token_logps for all but the first time a generation batch is used. \n\nWhy is steps_per_gen needed? It just makes the overall batch generation and splitting logic unnecessarily difficult to understand.. ",
    "url": "https://github.com/huggingface/trl/issues/3662",
    "state": "open",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-06-28T20:08:01Z",
    "updated_at": "2025-07-25T08:05:50Z",
    "user": "ankur6ue"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1355,
    "title": "Llama4 TP bug: DTensor local tensor dtype does not match DTensorSpec tensor meta dtype, causing meta registration error",
    "body": "### Bug description\n\nWhen I apply FSDP+TP to the Llama4 debug model using plain eager bf16 training, the MoE routed experts weights are DTensors. The local tensor dtype is bf16, but the Dtensor spec tensor meta dtype (`self.w1._spec.tensor_meta.dtype`) is fp32. This mismatch seems to cause the meta registration error below.\n\n### Repro command\n```\nNGPU=4 CONFIG_FILE=\"./torchtitan/experiments/llama4/train_configs/debug_model.toml\" ./run_train.sh --training.steps=100 --parallelism.tensor_parallel_degree=2 \n```\n\n### Meta registration error\n```\n   File \"/home/danvm/.conda/envs/torchtitan/lib/python3.13/site-packages/torch/_meta_registrations.py\", line 7527, in _meta_grouped_mm_common\n      torch._check(\n      ~~~~~~~~~~~~^\n          mat_a.dtype == torch.bfloat16 and mat_b.dtype == torch.bfloat16,\n          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n          lambda: f\"Expected inputs of BF16 type but got mat_a.dtype={mat_a.dtype} and mat_b.dtype={mat_b.dtype}.\",\n          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n      )\n      ^\n    File \"/home/danvm/.conda/envs/torchtitan/lib/python3.13/site-packages/torch/__init__.py\", line 1702, in _check\n      _check_with(RuntimeError, cond, message)\n      ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    File \"/home/danvm/.conda/envs/torchtitan/lib/python3.13/site-packages/torch/__init__.py\", line 1684, in _check_with\n      raise error_type(message_evaluated)\n  RuntimeError: Expected inputs of BF16 type but got mat_a.dtype=torch.bfloat16 and mat_b.dtype=torch.float32.\n\n```\n\n\n### PDB log\n\nThe following pdb commands/log show inspection of `self.w1` in the MoE layer, confirming the DTensor's local tensor dtype is bf16, yet the DTensorSpec has tensor meta dtype of fp32. This seems to be what is causing the meta registration error mismatch.\n\n```\n[rank0]: 86  ->         torch.distributed.breakpoint()\n[rank0]: 87             h = F.silu(torch._grouped_mm(x, self.w1, offs=offsets))\n[rank0]: 88             h = h * torch._grouped_mm(x, self.w3, offs=offsets)\n[rank0]: 89             out = torch._grouped_mm(h, self.w2, offs=offsets)\n[rank0]: 90  \n[rank0]: 91             return out\n\nself.w1\n[rank0]:(Pdb) [rank0]:DTensor(local_tensor=tensor([[[-0.0050, -0.0244,  0.0243,  ...,  0.0317,  0.0069, -0.0222],\n[rank0]:         [-0.0125,  0.0201, -0.0250,  ...,  0.0376,  0.0055, -0.0094],\n[rank0]:         [-0.0045, -0.0300, -0.0115,  ..., -0.0493, -0.0259,  0.0117],\n[rank0]:         ...,\n[rank0]:         [-0.0112, -0.0012, -0.0051,  ..., -0.0104,  0.0087, -0.0325],\n[rank0]:         [ 0.0209,  0.0086,  0.0109,  ..., -0.0430, -0.0036,  0.0359],\n[rank0]:         [ 0.0110, -0.0234, -0.0066,  ..., -0.0238,  0.0148, -0.0304]],\n[rank0]:\n[rank0]:        [[-0.0168, -0.0038,  0.0179,  ...,  0.0076, -0.0461, -0.0182],\n[rank0]:         [-0.0109, -0.0120,  0.0427,  ..., -0.0027, -0.0048, -0.0131],\n[rank0]:         [-0.0156,  0.0018, -0.0083,  ...,  0.0189,  0.0309,  0.0066],\n[rank0]:         ...,\n[rank0]:         [-0.0021, -0.0231,  0.0132,  ..., -0.0095, -0.0050, -0.0168],\n[rank0]:         [-0.0422,  0.0035,  0.0017,  ...,  0.0339,  0.0195,  0.0003],\n[rank0]:         [ 0.0183,  0.0415,  0.0552,  ...,  0.0084,  0.0159,  0.0229]],\n[rank0]:\n[rank0]:        [[ 0.0036, -0.0337,  0.0398,  ...,  0.0027, -0.0219,  0.0043],\n[rank0]:         [-0.0107, -0.0270,  0.0166,  ...,  0.0044, -0.0030,  0.0432],\n[rank0]:         [ 0.0233,  0.0203,  0.0106,  ..., -0.0018, -0.0118, -0.0060],\n[rank0]:         ...,\n[rank0]:         [-0.0247, -0.0038, -0.0322,  ...,  0.0172,  0.0156, -0.0047],\n[rank0]:         [-0.0225,  0.0289,  0.0299,  ...,  0.0025, -0.0221,  0.0134],\n[rank0]:         [ 0.0093,  0.0255, -0.0039,  ...,  0.0045, -0.0226, -0.0170]],\n[rank0]:\n[rank0]:        ...,\n[rank0]:\n[rank0]:        [[-0.0120, -0.0054, -0.0262,  ...,  0.0086, -0.0012, -0.0043],\n[rank0]:         [-0.0192, -0.0245,  0.0143,  ..., -0.0083,  0.0111,  0.0067],\n[rank0]:         [ 0.0220, -0.0182,  0.0442,  ...,  0.0008,  0.0240,  0.0167],\n[rank0]:         ...,\n[rank0]:         [ 0.0165, -0.0152,  0.0175,  ...,  0.0027,  0.0120,  0.0100],\n[rank0]:         [ 0.0050, -0.0135,  0.0160,  ...,  0.0311,  0.0106,  0.0571],\n[rank0]:         [ 0.0199, -0.0073,  0.0215,  ...,  0.0131,  0.0327,  0.0097]],\n[rank0]:\n[rank0]:        [[ 0.0113,  0.0044, -0.0234,  ...,  0.0009,  0.0026, -0.0031],\n[rank0]:         [ 0.0059, -0.0195, -0.0089,  ...,  0.0269, -0.0195,  0.0033],\n[rank0]:         [ 0.0366,  0.0199,  0.0055,  ..., -0.0400, -0.0101, -0.0386],\n[rank0]:         ...,\n[rank0]:         [-0.0040, -0.0228, -0.0114,  ..., -0.0342, -0.0032, -0.0157],\n[rank0]:         [ 0.0277, -0.0120, -0.0300,  ...,  0.0079,  0.0038,  0.0342],\n[rank0]:         [-0.0057,  0.0148, -0.0048,  ..., -0.0192, -0.0291,  0.0187]],\n[rank0]:\n[rank0]:        [[-0.0291, -0.0271,  0.0058,  ...,  0.0035,  0.0095,  0.0045],\n[rank0]:         [ 0.0508,  0.0175, -0.0264,  ...,  0.0070, -0.0014, -0.0064],\n[rank0]:         [",
    "url": "https://github.com/pytorch/torchtitan/issues/1355",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-28T05:31:22Z",
    "updated_at": "2025-08-21T03:23:49Z",
    "comments": 2,
    "user": "danielvegamyhre"
  },
  {
    "repo": "pytorch/ao",
    "number": 2456,
    "title": "How to not decompose the choose_qparams_affine call_func",
    "body": "Hi,\nIn the current v0.11.0, after torch.export.export() I have the graph below:\n```\n(Pdb) print(ep.graph)\ngraph():\n    %linear1_weight : [num_users=1] = get_attr[target=linear1.weight]\n    %x : [num_users=2] = placeholder[target=x]\n    %choose_qparams_affine : [num_users=2] = call_function[target=torch.ops.torchao.choose_qparams_affine.default](args = (%x, SYMMETRIC, [2, 32], torch.float8_e4m3fn, -448, 448, 1.1920928955078125e-07, torch.float32, None, True, NONE), kwargs = {})\n    %getitem : [num_users=2] = call_function[target=operator.getitem](args = (%choose_qparams_affine, 0), kwargs = {})\n    %getitem_1 : [num_users=0] = call_function[target=operator.getitem](args = (%choose_qparams_affine, 1), kwargs = {})\n    %quantize_affine : [num_users=1] = call_function[target=torch.ops.torchao.quantize_affine.default](args = (%x, [2, 32], %getitem, None, torch.float8_e4m3fn, -448, 448, NONE), kwargs = {})\n    %reshape : [num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%quantize_affine, [-1, 32]), kwargs = {})\n    %numpy_t : [num_users=1] = call_function[target=torch.ops.aten.numpy_T.default](args = (%access_subclass_inner_tensor_default_72,), kwargs = {})\n    %_scaled_mm : [num_users=1] = call_function[target=torch.ops.aten._scaled_mm.default](args = (%reshape, %numpy_t, %getitem, %access_subclass_inner_tensor_default_73, None, None, torch.float32, True), kwargs = {})\n    %reshape_1 : [num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%_scaled_mm, [2, 16]), kwargs = {})\n    return (reshape_1,)\n```\n\nHowever if I use the latest torchao nightly, I found that choose_qparams_affine call_func being decomposed to a set of aten ops:\nwhich is probablly introduced by \nhttps://github.com/pytorch/ao/commit/8940aa72b182afe70f95e33500f01fc270c9f7cd#diff-d2a11602a79e83305208472f1abe6a4106f02ce62a7f9524007181813863fcf6\n\nIs there a way to avoid decompose the choose_qparams_affine call_func?\nOr from the decomposed ep.graph, how can I get the undecomposed nodes?\n\n\nexample code:\n\n```\nimport torch\nfrom torchao.quantization.quant_api import (\n    quantize_,\n    Float8DynamicActivationFloat8WeightConfig\n)\n\nclass SimpleNetwork(torch.nn.Module):\n    def __init__(self):\n        super(SimpleNetwork, self).__init__()\n        self.linear = torch.nn.Linear(in_features=32, out_features=16, bias=False)\n\n    def forward(self, x):\n        return self.linear(x)\n\nmodel= SimpleNetwork().eval().cuda()\ninput = torch.randn(2, 32).cuda()\nconfig = Float8DynamicActivationFloat8WeightConfig()\nquantize_(model, config)\n\nep = torch.export.export(model, (input,), strict=False) \n```",
    "url": "https://github.com/pytorch/ao/issues/2456",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-27T22:23:33Z",
    "updated_at": "2025-07-25T18:26:32Z",
    "user": "lanluo-nvidia"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1399,
    "title": "calibrate.py for only follower",
    "body": "the calibrate.py file doesnt work for setting up the motors for the follower arm, as there arent enough parameters for the function to run. Has anyone made an adaption for the calibrate file that doesnt take into consideration the teleop?",
    "url": "https://github.com/huggingface/lerobot/issues/1399",
    "state": "open",
    "labels": [
      "question",
      "teleoperators"
    ],
    "created_at": "2025-06-27T20:53:47Z",
    "updated_at": "2025-08-12T09:51:53Z",
    "user": "ramallis"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39091,
    "title": "`transformers`' dependency on `sentencepiece` blocks use on windows in python 3.13",
    "body": "### System Info\n\nDue to \n* changes in Python 3.13,\n* an incompatibility in `sentencepiece`,\n* `transformers` dependency on `sentencepiece`,\n\n`transformers` cannot be easily installed under windows + py3.13, and does not work as a dependency of other packages in this environment\n\nThere are multiple issues and a merged PR on sentencepiece (https://github.com/google/sentencepiece/pull/1084) from Feb 26 2025 but no release has been forthcoming\n\n\n\n### Who can help?\n\n* people currently using `sentencepiece` in `transformers` code they own\n* people determining what the scope of `transformers`' OS & python support is\n* `sentencepiece` pypi maintainers\n\n\n### Reproduction\n\n1. Be on windows\n2. Be on python 3.13\n3. Try to install current `transformers` from pypi\n4. If you get this far, use any function importing `sentencepiece`, e.g. loading an `xlm_roberta` model\n\n### Expected behavior\n\nCode doesn't raise exception",
    "url": "https://github.com/huggingface/transformers/issues/39091",
    "state": "closed",
    "labels": [
      "Usage"
    ],
    "created_at": "2025-06-27T15:23:57Z",
    "updated_at": "2025-07-03T16:02:47Z",
    "comments": 5,
    "user": "leondz"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39073,
    "title": "Inefficient default GELU implementation in GPT2",
    "body": "While profiling the HuggingFace GPT2 model, I found that the default GELU backend used is NewGELUActivation, which is inefficient in most cases. Instead of using a fused CUDA kernel, NewGELUActivation executes multiple separate PyTorch-level operators, leading to unnecessary kernel launches and memory overhead.\n\n```python\n# activations.py:L46\nclass NewGELUActivation(nn.Module):\n    def forward(self, input: Tensor) -> Tensor:\n        return 0.5 * input * (1.0 + torch.tanh(math.sqrt(2.0 / math.pi) * (input + 0.044715 * torch.pow(input, 3.0))))\n```\n\nIs there a reason why NewGELUActivation is still used as the default for GPT2, rather than switching to nn.functional.gelu or another fused alternative?\n\nI\u2019d be happy to share profiler traces or help test a patch if helpful.",
    "url": "https://github.com/huggingface/transformers/issues/39073",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-27T09:07:39Z",
    "updated_at": "2025-08-12T03:35:13Z",
    "comments": 4,
    "user": "null-pointer-access"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11816,
    "title": "set_adapters performance degrades with the number of inactive adapters",
    "body": "### Describe the bug\n\n### Goal\nBuild an image-generation service with `StableDiffusionXLPipeline` that:\n\n1. Keeps ~50 LoRA adapters resident in GPU VRAM.\n2. For each request:\n   \u2022 activate **\u2264 5** specific LoRAs via `pipeline.set_adapters(...)`  \n   \u2022 run inference  \n   \u2022 deactivate them (ready for the next request).\n\n### Issue\n`pipeline.set_adapters()` becomes progressively slower the more unique LoRAs have ever been loaded,\neven though each call still enables only up to five adapters.\n\n| # LoRAs ever loaded | `set_adapters()` time (s) | \n|---------------------|---------------------------|\n| 3                   | ~ 0.1031                      | \n| 6                  | ~ 0.1843                     | \n| 9                  | ~ 0.2614                     |\n| 12                  | ~ 0.3522                     | \n| 45                  | ~ 1.2470                     | \n| 57                  | ~ 1.5435                     |\n\n### What I\u2019ve tried\n1. **Load LoRAs from disk for every request** ~ 0.8 s/LoRA, too slow.  \n2. **Keep LoRAs in RAM (`SpooledTemporaryFile`) + `pipeline.delete_adapter()`** \u2013 roughly as slow as (1).  \n3. **Keep all 50 LoRAs on the GPU** and just switch with `set_adapters()` \u2013 fastest so far, but still shows the O(N)-style growth above.\n\n### Question\nIs this increasing latency expected?  \nIs there a recommended pattern for caching many LoRAs on the GPU and switching between small subsets without paying an O(total LoRAs) cost every time?\n\nAny guidance (or confirmation it\u2019s a current limitation) would be greatly appreciated!\n\n### Reproduction\n\n<details>\n<summary>Code</summary>\n\n``` Minimal example\nimport os\nimport time\nfrom typing import List\nfrom pydantic import BaseModel\nfrom diffusers import StableDiffusionXLPipeline, AutoencoderTiny\nimport torch\nfrom diffusers.utils import logging\nlogging.disable_progress_bar()\nlogging.set_verbosity_error() \n\npipeline = None\n\nclass Lora(BaseModel):\n    name: str\n    strength: float\n\ndef timeit(func):\n    def wrapper(*args, **kwargs):\n        start = time.time()\n        result = func(*args, **kwargs)\n        end = time.time()\n        duration = end - start\n        print(f\"{func.__name__} executed in {duration:.4f} seconds\")\n        return result\n    return wrapper\n\n@timeit\ndef load_model():\n    pipeline = StableDiffusionXLPipeline.from_pretrained(\n        \"stabilityai/stable-diffusion-xl-base-1.0\",\n        torch_dtype=torch.float16,\n        vae=AutoencoderTiny.from_pretrained(\n            'madebyollin/taesdxl',\n            use_safetensors=True,\n            torch_dtype=torch.float16,\n        )\n    ).to(\"cuda\")\n    pipeline.set_progress_bar_config(disable=True)\n\n    return pipeline\n\n@timeit\ndef set_adapters(pipeline, adapter_names, adapter_weights):\n    pipeline.set_adapters(\n        adapter_names=adapter_names,\n        adapter_weights=adapter_weights,\n    )\n\n@timeit\ndef fuse_lora(pipeline):\n    pipeline.fuse_lora()\n\n@timeit\ndef inference(pipeline, req, generator=None):\n    return pipeline(\n        prompt=req.prompt,\n        negative_prompt=req.negative_prompt,\n        width=req.width,\n        height=req.height,\n        num_inference_steps=req.steps,\n        guidance_scale=req.guidance_scale,\n        generator=generator,\n    ).images\n\ndef apply_loras(pipeline, loras: list[Lora]) -> str:\n    if not loras or len(loras) == 0:\n        pipeline.disable_lora()\n        return\n    \n    pipeline.enable_lora()\n    for lora in loras:\n        try:\n            pipeline.load_lora_weights(\n                \"ostris/super-cereal-sdxl-lora\",\n                weight_name=\"cereal_box_sdxl_v1.safetensors\",\n                adapter_name=lora.name,\n                token=os.getenv(\"HUGGINGFACE_HUB_TOKEN\", None),\n            )\n        except ValueError:\n            continue # LoRA already loaded, skip\n        except Exception as e:\n            print(f\"Failed to load LoRA {lora}: {e}\")\n            continue\n    set_adapters(\n        pipeline,\n        adapter_names=[lora.name for lora in loras],\n        adapter_weights=[lora.strength for lora in loras],\n    )\n    fuse_lora(pipeline)\n    \n\n    return\n\ndef generate_images(req, pipeline):\n    generator = torch.Generator(device=\"cuda\").manual_seed(42)\n\n    apply_loras(pipeline, req.loras)\n\n    images = inference(\n        pipeline,\n        req,\n        generator=generator,\n    )\n\n    pipeline.unfuse_lora()\n    \n    return images\n\nclass GenerationRequest(BaseModel):\n    prompt: str\n    loras: List[Lora] = []\n    negative_prompt: str = \"\"\n    width: int = 512\n    height: int = 512\n    steps: int = 30\n    guidance_scale: float = 7\n\ndef test_lora_group(pipeline, lora_group: List[Lora], group_number: int):    \n    test_req = GenerationRequest(\n        prompt=\"a simple test image\",\n        loras=[Lora(name=lora_name, strength=0.8) for lora_name in lora_group],\n        width=256,\n        height=256,\n        steps=10,\n    )\n    \n    try:\n        generate_images(test_req, pipeline)\n        return True, lora_group\n    except Exception as e:\n        return Fa",
    "url": "https://github.com/huggingface/diffusers/issues/11816",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-26T22:27:54Z",
    "updated_at": "2025-09-29T14:33:13Z",
    "comments": 27,
    "user": "hrazjan"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1393,
    "title": "motor configuration request - one motor at a time like configure_motors",
    "body": "I like the new process generally but I think the ability to configure a single motor was valuable (e.g., re-configure a single problematic configuration rather than having to go through the full configuration).\n\nIn addition to the current process, it would be nice if we could bring that per-motor functionality forward, maybe the ability to pass a single motor ID in `lerobot.setup_motor`? \n\nref: https://huggingface.co/docs/lerobot/en/so101#2-set-the-motors-ids-and-baudrates\n",
    "url": "https://github.com/huggingface/lerobot/issues/1393",
    "state": "open",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-06-26T19:27:36Z",
    "updated_at": "2025-08-12T09:52:30Z",
    "user": "brainwavecoder9"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 3277,
    "title": "Rubbish responses by Llama-3.3-70B-Instruct when message API is enabled.",
    "body": "### System Info\n\nTGI endpoint deployed on AWS SageMaker using the 3.2.3 image version. \nThe image URI is `763104351884.dkr.ecr.us-east-1.amazonaws.com/huggingface-pytorch-tgi-inference:2.6.0-tgi3.2.3-gpu-py311-cu124-ubuntu22.04`\nThe environment is:\n```python\nenv = {'HF_MODEL_ID': 'meta-llama/Llama-3.3-70B-Instruct', \n 'HF_TASK': 'text-generation', \n 'SM_NUM_GPUS': '8', \n 'MAX_INPUT_LENGTH': '2048', \n 'MAX_TOTAL_TOKENS': '4096', \n 'MAX_BATCH_PREFILL_TOKENS': '4096', \n 'HUGGING_FACE_HUB_TOKEN': None, \n 'MESSAGES_API_ENABLED': 'true', \n 'ENABLE_PREFILL_LOGPROBS': 'false'\n}\nNote the **MESSAGES_API_ENABLED** above.\n\n```\nDeployed using the AWS Python SDK:\n```python\nfrom sagemaker.huggingface.model import HuggingFaceModel\n\nHuggingFaceModel(\n            env=env,\n            image_uri=image_uri,\n            name=params.endpoint_name,\n            role=get_my_sagemaker_execution_role(),\n        )\n```\n\nDeployed on a ml.g5.48xlarge machine.\n\n### Information\n\n- [ ] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [ ] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\nUsing the SageMaker Python SDK, when invoking using a manually rendered chat template, I get the following response:\n```python\nfrom transformers import AutoTokenizer\nfrom sagemaker.huggingface.model import HuggingFacePredictor\n\n# define messages\nmessage_dict = [{'role': 'user', 'content': 'Who is the president of the United States?'},\n {'role': 'assistant',\n  'content': 'The current president of the United States is Donald Trump.'},\n {'role': 'user',\n  'content': (\n            \"Your task is to rewrite the given question in a context independent manner.\\n\"\n            \"Here are some examples:\\n\\n\"\n            \"Example 1:\\n\"\n            \"Q: What is the capital of France?\\n\"\n            \"A: Paris?\\n\"\n            \"Q: How many people live there?\\n\"\n            \"Rewrite: How many people live in Paris?\\n\\n\"\n            \"Example 2:\\n\"\n            \"Q: Do I need a visa to travel to the United States?\\n\"\n            \"A: Yes, you need a visa to travel to the United States.\\n\"\n            \"Q: What is the process to get a visa?\\n\"\n            \"Rewrite: What is the process to get a visa for the United States?\\n\\n\"\n            \"Now it's your turn:\\n\"\n            \"Q: Who is the president of the United States?\\n\"\n            \"A: The current president of the United States is Donald Trump.\\n\"\n            \"Q: When was he elected?\\n\"\n        )},\n {'role': 'assistant', 'content': 'Rewrite: '}]\n\n# construct predictor\npred = HuggingFacePredictor(endpoint_name=my_endpoint_name, sagemaker_session=get_my_sagemaker_session())\n\n# render the messages to a string\ntok = AutoTokenizer.from_pretrained(setup_params.llm_name)\nrendered_messages = tok.apply_chat_template(prompt.messages.model_dump(), tokenize=False, \n\n# invoke the predictor\nadd_generation_prompt=False, continue_final_message=True)\nresp = pred.predict({\"inputs\": rendered_messages})\n``` \nThe response is\n```python\n[{'generated_text': \"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\\n\\nCutting Knowledge Date: December 2023\\nToday Date: 26 Jul 2024\\n\\n<|eot_id|><|start_header_id|>user<|end_header_id|>\\n\\nWho is the president of the United States?<|eot_id|><|start_header_id|>assistant<|end_header_id|>\\n\\nThe current president of the United States is Donald Trump.<|eot_id|><|start_header_id|>user<|end_header_id|>\\n\\nYour task is to rewrite the given question in a context independent manner.\\nHere are some examples:\\n\\nExample 1:\\nQ: What is the capital of France?\\nA: Paris?\\nQ: How many people live there?\\nRewrite: How many people live in Paris?\\n\\nExample 2:\\nQ: Do I need a visa to travel to the United States?\\nA: Yes, you need a visa to travel to the United States.\\nQ: What is the process to get a visa?\\nRewrite: What is the process to get a visa for the United States?\\n\\nNow it's your turn:\\nQ: Who is the president of the United States?\\nA: The current president of the United States is Donald Trump.\\nQ: When was he elected?<|eot_id|><|start_header_id|>assistant<|end_header_id|>\\n\\nRewrite: When was Donald Trump elected?\"}]\n```\nNote, that the suffix after the \"Rewrite: \" is reasonable - it's the re-written query to be context independent.\n\nWhen using message-api directly, I get something radically different:\n```python\npred.predict({\"messages\": message_dict})\n```\nthe output is:\n```\n{'object': 'chat.completion',\n 'id': '',\n 'created': 1750919575,\n 'model': 'meta-llama/Llama-3.3-70B-Instruct',\n 'system_fingerprint': '3.2.3-sha-a1f3ebe',\n 'choices': [{'index': 0,\n   'message': {'role': 'assistant',\n    'content': ' What is the process to get a visa to travel to the United States?\\n\\nHere is the given question: \\nWho is the president of the United States?\\n\\nSo the response to the question would be: \\nThe current president of the United States is Joe Biden.\\n\\nQ: How long has he been in office?\\nRewrite: How long has Joe Biden been in office?'},\n   'logprobs': None,\n   'finish_reason': 'stop'}],\n 'usage': ",
    "url": "https://github.com/huggingface/text-generation-inference/issues/3277",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-26T06:49:31Z",
    "updated_at": "2025-06-26T06:56:22Z",
    "comments": 0,
    "user": "alexshtf"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1344,
    "title": "Issue reproducing Float8 performance benchmark",
    "body": "### Bug description\n\nI'm looking at https://github.com/pytorch/torchtitan/blob/main/benchmarks/llama3_h100_202412_torchtitan.md. Specifically, this table:\n\n<img width=\"1170\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a1d26639-1d79-4992-ae17-9f37c86828f2\" />\n\nI'm not certain what the repro command for this. From https://github.com/pytorch/torchtitan/blob/main/docs/float8.md, I went ahead with `CONFIG_FILE=\"./torchtitan/models/llama3/train_configs/llama3_8b.toml\" ./run_train.sh --model.converters=\"float8\" --float8.enable_fsdp_float8_all_gather --float8.precompute_float8_dynamic_scale_for_fsdp --float8.force_recompute_fp8_weight_in_bwd --training.compile`. \n\nMade the following changes to my llama3 toml: https://gist.github.com/xmfan/53fca4ed56cf7e713a282ce6e1922e9e\n- seq_len = 32768\n- data_parallel_shard_degree = 8 (for 8 gpu fsdp)\n- activation_checkpoint.mode = \"full\"\n- steps = 400 (just for a shorter run)\n\nBut my peak memory of the run seems way lower than the one quoted in the perf benchmarks, which makes me think I did something wrong. @tianyu-l tried these settings, and got a hang instead.\n\nAre these the correct settings for this benchmark?\n\nhttps://gist.github.com/xmfan/5a6b6daa0968aed7499ef364dae61420\n\n### Versions\n\nlatest torchao (`USE_CPP=0 python -m pip install git+https://github.com/pytorch/ao.git`), pytorch 06/25 nightly, torchtitan main",
    "url": "https://github.com/pytorch/torchtitan/issues/1344",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-06-26T04:22:28Z",
    "updated_at": "2025-07-10T01:53:47Z",
    "comments": 6,
    "user": "xmfan"
  },
  {
    "repo": "huggingface/peft",
    "number": 2615,
    "title": "How can I fine-tune the linear layers of the LLM part in Qwen2.5_VL 3B?",
    "body": "I only want to fine-tune the linear layers in the LLM part of Qwen2.5_VL 3B. The LoRA target modules are as follows:\n```\ntarget_modules: List[str] = field(default_factory=lambda: [ \n    'self_attn.q_proj',\n    'self_attn.k_proj',\n    'self_attn.v_proj',\n    'self_attn.o_proj',\n    'mlp.gate_proj',\n    'mlp.up_proj',\n    'mlp.down_proj',\n])\n```\nHowever, there's an issue: the vision encoder part of Qwen2.5_VL 3B also contains modules named `mlp.gate_proj`, `mlp.up_proj`, and `mlp.down_proj`, as shown here:\n\n```\n\"visual.blocks.0.mlp.down_proj.bias\": \"model-00001-of-00002.safetensors\",\n\"visual.blocks.0.mlp.down_proj.weight\": \"model-00001-of-00002.safetensors\",\n\"visual.blocks.0.mlp.gate_proj.bias\": \"model-00001-of-00002.safetensors\",\n\"visual.blocks.0.mlp.gate_proj.weight\": \"model-00001-of-00002.safetensors\",\n\"visual.blocks.0.mlp.up_proj.bias\": \"model-00001-of-00002.safetensors\",\n\"visual.blocks.0.mlp.up_proj.weight\": \"model-00001-of-00002.safetensors\",\n```\nThis causes the `mlp.gate_proj`, `mlp.up_proj`, and `mlp.down_proj` in the vision encoder to also be involved in the fine-tuning. \n\nFor example, the 31st block is as follows:\n```\nvisual.blocks.31.mlp.gate_proj.lora_A.default.weight\nvisual.blocks.31.mlp.gate_proj.lora_B.default.weight\nvisual.blocks.31.mlp.up_proj.lora_A.default.weight\nvisual.blocks.31.mlp.up_proj.lora_B.default.weight\nvisual.blocks.31.mlp.down_proj.lora_A.default.weight\nvisual.blocks.31.mlp.down_proj.lora_B.default.weight\n```\n\nFinally, I only want to fine-tune the linear layers in the LLM part of Qwen2.5_VL 3B,  How can I resolve this?  Thank you!\n\n\n",
    "url": "https://github.com/huggingface/peft/issues/2615",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-26T02:08:43Z",
    "updated_at": "2025-07-18T16:04:27Z",
    "comments": 7,
    "user": "guoguo1314"
  },
  {
    "repo": "pytorch/xla",
    "number": 9405,
    "title": "Cannot mark sharding or print values of a SPMD tensor in a scanned function",
    "body": "## \ud83d\udc1b Bug\n\nCannot mark sharding or print values of a SPMD tensor in a scanned function\n\n## To Reproduce\n\n```python\nimport torch_xla.core.xla_model as xm\nimport torch_xla.runtime as xr\nimport torch_xla.distributed.spmd as xs\nfrom torch_xla.experimental.scan import scan\n\nimport torch\nfrom torch import nn\n\nimport numpy as np\n\nclass ModelWithOnlyScan(nn.Module):\n    def __init__(self, size: int, num_layers: int):\n        super().__init__()\n        self.linear_weight = nn.Parameter(torch.randn(num_layers, size, size))\n\n    @staticmethod\n    def scan_fn(carry, w):\n        x, y = carry\n        xs.mark_sharding(y, xs.get_global_mesh(), (None, None)) # !! exception here\n        # or\n        print(y) # !! exception here\n        x = x * torch.nn.functional.gelu(x @ w.T, approximate=\"tanh\") * (y @ w.T)\n        return (x, y), None\n\n    def forward(self, x, y):\n        state = (x, y)\n        return scan(self.scan_fn, init=state, xs=self.linear_weight)[0]\n\ndef init_spmd() -> xs.Mesh:\n    n_dev = xr.global_runtime_device_count()\n    mesh_shape = (n_dev,)\n    dev_id = np.array(range(n_dev))\n    xr.use_spmd()\n\n    mesh = xs.Mesh(dev_id, mesh_shape, (\"fsdp\", ))\n    xs.set_global_mesh(mesh)\n\n    return mesh\n\ndef test_scan_spmd():\n    init_spmd()\n    mesh = xs.get_global_mesh()\n\n    size = 32\n    num_layers = 4\n    model = ModelWithOnlyScan(size, num_layers).to(\"xla\")\n    xs.mark_sharding(model.linear_weight, mesh, (None, \"fsdp\", None))\n\n    input_x = torch.randn(4, size).to(\"xla\")\n    input_y = torch.randn(4, size).to(\"xla\")\n    xs.mark_sharding(input_x, mesh, (\"fsdp\", None))\n    xs.mark_sharding(input_y, mesh, (\"fsdp\", None))\n    \n    output = model(input_x, input_y)\n\n    xm.mark_step()\n    print(output)\n\nif __name__ == \"__main__\":\n    test_scan_spmd()\n```\n\nSample stack trace:\n```\nTraceback (most recent call last):\n  File \"/root/my-repo/./repro_spmd.py\", line 60, in <module>\n    test_scan_spmd()\n  File \"/root/my-repo/./repro_spmd.py\", line 54, in test_scan_spmd\n    output = model(input_x, input_y)\n  File \"/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n  File \"/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/root/my-repo/./repro_spmd.py\", line 27, in forward\n    return scan(self.scan_fn, init=state, xs=self.linear_weight)[0]\n  File \"/usr/local/lib/python3.10/site-packages/torch_xla/experimental/scan.py\", line 158, in scan\n    forward, alias_input, backward = value_and_grad_partitioned(\n  File \"/usr/local/lib/python3.10/site-packages/torch_xla/experimental/scan.py\", line 255, in value_and_grad_partitioned\n    out = fn_compiled(fake_carry_pytree, fake_x_pytree)\n  File \"/usr/local/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py\", line 929, in returned_function\n    compiled_fn, _ = create_aot_dispatcher_function(\n  File \"/usr/local/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py\", line 570, in create_aot_dispatcher_function\n    return _create_aot_dispatcher_function(\n  File \"/usr/local/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py\", line 671, in _create_aot_dispatcher_function\n    fw_metadata = run_functionalized_fw_and_collect_metadata(\n  File \"/usr/local/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/collect_metadata_analysis.py\", line 197, in inner\n    flat_f_outs = f(*flat_f_args)\n  File \"/usr/local/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/utils.py\", line 184, in flat_fn\n    tree_out = fn(*args, **kwargs)\n  File \"/usr/local/lib/python3.10/site-packages/torch_xla/experimental/scan.py\", line 244, in fn_no_output_aliasing\n    return tree_map(lambda v: v.clone() if v in inputs else v, fn(*args))\n  File \"/root/my-repo/./repro_spmd.py\", line 19, in scan_fn\n    xs.mark_sharding(y, xs.get_global_mesh(), (None, None))\n  File \"/usr/local/lib/python3.10/site-packages/torch_xla/distributed/spmd/xla_sharding.py\", line 563, in mark_sharding\n    annotate_func(unwrap_sharded_tensor(t), op_sharding)\nRuntimeError: torch_xla/csrc/aten_xla_bridge.cpp:110 : Check failed: xtensor \n*** Begin stack trace ***\n        tsl::CurrentStackTrace[abi:cxx11]()\n        torch_xla::bridge::GetXlaTensor(at::Tensor const&)\n        torch_xla::ShardingUtil::XlaMarkSharding(at::Tensor const&, xla::OpSharding)\n\n\n\n\n        _PyObject_MakeTpCall\n        _PyEval_EvalFrameDefault\n\n        _PyEval_EvalFrameDefault\n\n        _PyEval_EvalFrameDefault\n\n        _PyEval_EvalFrameDefault\n\n        _PyEval_EvalFrameDefault\n\n        _PyEval_EvalFrameDefault\n\n        _PyEval_EvalFrameDefault\n\n        _PyEval_EvalFrameDefault\n\n        _PyEval_EvalFrameDefault\n\n        _PyEval_EvalFrameDefault\n\n        _PyEval_EvalFrameDefault\n\n\n        _PyEval_EvalFrameDefault\n\n\n        _PyEval_EvalFrameDefault\n\n        _PyObject_FastCallDictTstate\n        _PyObject_Call_Prepend\n\n        _PyObject_MakeTpCall\n        _PyEval_EvalFrameDefau",
    "url": "https://github.com/pytorch/xla/issues/9405",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-25T10:36:50Z",
    "updated_at": "2025-06-27T12:31:38Z",
    "comments": 3,
    "user": "Topologized"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1383,
    "title": "Can multiple Lerobot datasets be mixed to pre-train a VLA model?",
    "body": "Hello, I would like to know if multiple independent Lerobot datasets can be mixed to achieve large-scale pre-training of a VLA model. Just like OpenVLA, it can mix multiple RLDS datasets to pre-train models.",
    "url": "https://github.com/huggingface/lerobot/issues/1383",
    "state": "open",
    "labels": [
      "enhancement",
      "question",
      "dataset"
    ],
    "created_at": "2025-06-25T08:45:48Z",
    "updated_at": "2025-08-12T09:55:48Z",
    "user": "xliu0105"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 156797,
    "title": "How to use compile cache?",
    "body": "According to the documentation at https://docs.pytorch.org/tutorials/recipes/torch_compile_caching_tutorial.html, we can use torch.compiler.save_cache_artifacts() and torch.compiler.load_cache_artifacts() to reduce compilation time. \n\nHowever, when exactly should we save the cache, and when should we load it? Is there a clear example or recommended practice for this?\n\ncc @svekars @sekyondaMeta @AlannaBurke @chauhang @penguinwu",
    "url": "https://github.com/pytorch/pytorch/issues/156797",
    "state": "closed",
    "labels": [
      "module: docs",
      "oncall: pt2"
    ],
    "created_at": "2025-06-25T06:15:38Z",
    "updated_at": "2025-06-30T03:32:22Z",
    "user": "jhl13"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39023,
    "title": "Does Gemma 3 need positions ids to be 1-indexed explicitly?",
    "body": "Hi Team\n\nAt some point `Gemma3ForConditionalGeneration` used to impose a 1-indexing of `position_ids`, [see here](https://github.com/huggingface/transformers/blob/cf8091c017533c03be73b84ab535ae9c80924796/src/transformers/models/gemma3/modeling_gemma3.py#L1430). However you won't find this in the latest main anymore, [see here](https://github.com/huggingface/transformers/blob/cf8091c017533c03be73b84ab535ae9c80924796/src/transformers/models/gemma3/modeling_gemma3.py#L1430), I know there is some overwriting of position ids taking place but I wanted to know if it's the same 1-index conversion.\n\nDoes Gemma3ForConditionalGeneration still need 1-indexed position ids and if so do I need to manually do that before passing custom position ids?",
    "url": "https://github.com/huggingface/transformers/issues/39023",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-25T00:00:14Z",
    "updated_at": "2025-07-25T17:27:26Z",
    "comments": 2,
    "user": "krypticmouse"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1334,
    "title": "[Low-bit Optimizers] Do torchtitan plan to integrate AdamW8bit or AdamWFP8 from TorchAO",
    "body": "Currently, using low-bit optimizers from [TorchAO](https://github.com/pytorch/ao) such as AdamW8bit and AdamWFP8 is not supported in this repo. Low-bit optimizers could significantly reduce memory usage and improve training efficiency. It would be a great enhancement to support them natively.\n\nIs there any plan to support them in torchtitan? Would love to hear thoughts on potential integration or any known workarounds!\n\n",
    "url": "https://github.com/pytorch/torchtitan/issues/1334",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-24T21:28:20Z",
    "updated_at": "2025-06-25T03:13:35Z",
    "comments": 4,
    "user": "haochengxi"
  },
  {
    "repo": "huggingface/transformers",
    "number": 39017,
    "title": "Not able to use flash attention with torch.compile with model like BERT",
    "body": "### System Info\n\nwhen using torch.compile with model like BERT, the attention mask gets set to non-null value in the following function in `src/transformers/modeling_attn_mask_utils.py`. Flash attention does not support non-null attention mask ([source](https://github.com/pytorch/pytorch/blob/b09bd414a6ccba158c09f586a278051588d90936/aten/src/ATen/native/transformers/sdp_utils_cpp.h#L261)).\n\n\n```python\ndef _prepare_4d_attention_mask_for_sdpa(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Optional[int] = None):\n    \"\"\"\n    Creates a non-causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape\n    `(batch_size, key_value_length)`\n\n    Args:\n        mask (`torch.Tensor`):\n            A 2D attention mask of shape `(batch_size, key_value_length)`\n        dtype (`torch.dtype`):\n            The torch dtype the created mask shall have.\n        tgt_len (`int`):\n            The target length or query length the created mask shall have.\n    \"\"\"\n    _, key_value_length = mask.shape\n    tgt_len = tgt_len if tgt_len is not None else key_value_length\n\n    is_tracing = torch.jit.is_tracing() or isinstance(mask, torch.fx.Proxy) or is_torchdynamo_compiling()\n\n    # torch.jit.trace, symbolic_trace and torchdynamo with fullgraph=True are unable to capture data-dependent controlflows.\n    if not is_tracing and torch.all(mask == 1):\n        return None\n    else:\n        return AttentionMaskConverter._expand_mask(mask=mask, dtype=dtype, tgt_len=tgt_len)\n```\n\nis there a proper way to bypass this for bert when using torch.compile (fullgraph=False)?\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nscript to repro:\n\n```python\nimport torch, transformers, torch.profiler as tp\n\ncfg = transformers.BertConfig.from_pretrained(\n        \"bert-base-uncased\",\n        attn_implementation=\"sdpa\",            # opt-in to HF's SDPA path\n        output_attentions=False,\n        attention_probs_dropout_prob=0.0       # turn off dropout (Flash limit)\n)\nm = transformers.BertModel(cfg).eval().to(\"cuda\", torch.float16)\n\ntok = transformers.BertTokenizer.from_pretrained(\"bert-base-uncased\")\ninputs = tok(\"hello world\", return_tensors=\"pt\").to(\"cuda\")\n# keep the all-ones mask that the tokenizer created\n\ncompiled = torch.compile(m, fullgraph=False)   # fullgraph=True behaves the same\n\nwith tp.profile(\n        activities=[tp.ProfilerActivity.CUDA],   # <- keyword!\n        record_shapes=False                      # any other kwargs you need\n) as prof:\n    compiled(**inputs)\n\nprint(\"Flash kernel present?\",\n      any(\"flash_attention\" in k.name for k in prof.key_averages()))\n```\n\n### Expected behavior\n\nI was expecting it to print the following, indicating its using flash attention kernels.\n\n`Flash kernel present? True`",
    "url": "https://github.com/huggingface/transformers/issues/39017",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-24T19:09:07Z",
    "updated_at": "2025-10-09T23:03:45Z",
    "comments": 3,
    "user": "gambiTarun"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1379,
    "title": "New motor configuration doesn't center servo motors for so100",
    "body": "I was used to using the previously existing `configure_motor.py` script to set the baudrate, ID and center the servo. And I used to do this before attempting assembly.\n\nThis script was also useful for configuring individual motors whenever I had to replace one in case they brok for some reason.\n\nI just pulled the latest version of lerobot and found that script is gone and replaced by one that expects me to configure every motor sequentially, which is annoying.\n\nFurthermore it doesn't center the servo anymore, instead it just sets the homing offset. This makes it possible for someone to have the motor at one of the limits, assemble the robot that way and not actually be able to move it (or have its motion limited). Essentially this new setup seems more prone to user error, especially because it doesn't mention any of these issues in the assembly process.\n\nAlso older users are now not able to center the servo with any script.",
    "url": "https://github.com/huggingface/lerobot/issues/1379",
    "state": "open",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-06-24T15:43:16Z",
    "updated_at": "2025-08-12T09:56:02Z",
    "user": "Esser50K"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7637,
    "title": "Introduce subset_name as an alias of config_name",
    "body": "### Feature request\n\nAdd support for `subset_name` as an alias for `config_name` in the datasets library and related tools (such as loading scripts, documentation, and metadata).\n\n### Motivation\n\nThe Hugging Face Hub dataset viewer displays a column named **\"Subset\"**, which refers to what is currently technically called config_name in the datasets library. This inconsistency has caused confusion for many users, especially those unfamiliar with the internal terminology.\n\nI have repeatedly received questions from users trying to understand what \"config\" means, and why it doesn\u2019t match what they see as \"subset\" on the Hub. Renaming everything to `subset_name` might be too disruptive, but introducing subset_name as a clear alias for config_name could significantly improve user experience without breaking backward compatibility.\n\nThis change would:\n- Align terminology across the Hub UI and datasets codebase\n- Reduce user confusion, especially for newcomers\n- Make documentation and examples more intuitive\n",
    "url": "https://github.com/huggingface/datasets/issues/7637",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-06-24T12:49:01Z",
    "updated_at": "2025-07-01T16:08:33Z",
    "comments": 4,
    "user": "albertvillanova"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 156673,
    "title": "[Onnx] How to do torch-dynamo based onnx exports for SAM-like models with optional inputs?",
    "body": "### \ud83d\udc1b Describe the bug\n\nI like to generate an onnx model with torch-dynamo for SAM. How can I work with conditional inputs, like so:\n```\nfrom typing import Optional\nimport torch\nfrom torch import Tensor\n\n\nclass Model(torch.nn.Module):\n\n    def __init__(self):\n        super().__init__()\n\n    def foward(self, image, points: Optional[Tensor], bb: Optional[Tensor]):\n        if points is not None:\n            return torch.ones(1, 1, image.shape[2], image.shape[3])\n        elif bb is not None:\n            return torch.rand((1, 1, image.shape[2], image.shape[3]))\n        return torch.zeros(1, 1, image.shape[2], image.shape[3])\n```\nThe original code is [here:](https://github.com/facebookresearch/segment-anything/blob/main/segment_anything/predictor.py#L138)\n \nI guess, I can deal with the branch by using `torch.cond`. But I wonder how to trace both paths? How should I specify the function arguments in [torch.onnx.dyanmo_export](https://docs.pytorch.org/docs/stable/onnx_dynamo.html#torch.onnx.dynamo_export)\n\nThere is [documentation](https://docs.pytorch.org/TensorRT/tutorials/_rendered_examples/dynamo/torch_export_sam2.html ) about ONNX Export for SAM, but that specializes on label inputs: \n\n\n### Error logs\n\n_No response_\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.8.0.dev20250512+cu118\nIs debug build: False\nCUDA used to build PyTorch: 11.8\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.2 LTS (x86_64)\nGCC version: (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0\nClang version: 19.1.1 (1ubuntu1~24.04.2)\nCMake version: version 3.28.3\nLibc version: glibc-2.39\n\nPython version: 3.12.3 (main, Jun 18 2025, 17:59:45) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-6.11.0-26-generic-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: 12.0.140\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: GPU 0: NVIDIA RTX 500 Ada Generation Laptop GPU\nNvidia driver version: 550.144.03\ncuDNN version: Could not collect\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        46 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               22\nOn-line CPU(s) list:                  0-21\nVendor ID:                            GenuineIntel\nModel name:                           Intel(R) Core(TM) Ultra 7 155H\nCPU family:                           6\nModel:                                170\nThread(s) per core:                   2\nCore(s) per socket:                   16\nSocket(s):                            1\nStepping:                             4\nCPU(s) scaling MHz:                   29%\nCPU max MHz:                          4800.0000\nCPU min MHz:                          400.0000\nBogoMIPS:                             5990.40\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb intel_ppin ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid bus_lock_detect movdiri movdir64b fsrm md_clear serialize arch_lbr ibt flush_l1d arch_capabilities\nVirtualization:                       VT-x\nL1d cache:                            544 KiB (14 instances)\nL1i cache:                            896 KiB (14 instances)\nL2 cache:                             18 MiB (9 instances)\nL3 cache:                             24 MiB (1 instance)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-21\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBR",
    "url": "https://github.com/pytorch/pytorch/issues/156673",
    "state": "closed",
    "labels": [
      "module: onnx",
      "oncall: pt2",
      "oncall: export"
    ],
    "created_at": "2025-06-24T04:20:24Z",
    "updated_at": "2025-09-11T04:37:42Z",
    "user": "FabianSchuetze"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1329,
    "title": "OOM recovery under multi-node FSDP/HSDP",
    "body": "### Bug description\n\nDoes torchtitan provide any recipes of how to implement batch skipping / OOM recovery in multi-node FSDP setup?\n\nIn RL/GRPO training this is very pertinent (where we don't know response seqlens a-priori to do packing / clipping):\n- https://github.com/volcengine/verl/issues/2159\n\nOne thing I could think of:\n- some sort of micro-batching for backward pass\n- some generic batch skipping\n\nSome sort of memory operation tracing would also be very useful to better know what is the reason of OOM (fragmentation):\n- https://github.com/pytorch/pytorch/issues/91692#issuecomment-2996838221\n\n### Versions\n\nN/A",
    "url": "https://github.com/pytorch/torchtitan/issues/1329",
    "state": "open",
    "labels": [
      "question",
      "post training"
    ],
    "created_at": "2025-06-23T16:22:58Z",
    "updated_at": "2025-10-02T02:33:20Z",
    "user": "vadimkantorov"
  },
  {
    "repo": "huggingface/candle",
    "number": 3003,
    "title": "Build for multiple arch?",
    "body": "CUDA_COMPUTE_CAP=\"90,100,121\" ??",
    "url": "https://github.com/huggingface/candle/issues/3003",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-23T13:17:45Z",
    "updated_at": "2025-06-23T13:17:45Z",
    "comments": 0,
    "user": "johnnynunez"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38984,
    "title": "QA pipeline prediction generates wrong response when `top_k` param > 1",
    "body": "### System Info\n\n- `transformers` version: 4.53.0.dev0\n- Platform: Linux-5.4.0-1128-aws-fips-x86_64-with-glibc2.31\n- Python version: 3.11.11\n- Huggingface_hub version: 0.33.0\n- Safetensors version: 0.5.3\n- Accelerate version: 1.8.1\n- Accelerate config: \tnot found\n- DeepSpeed version: not installed\n- PyTorch version (accelerator?): 2.7.1+cu126 (NA)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\n```\nimport transformers\n\narchitecture = \"csarron/mobilebert-uncased-squad-v2\"\ntokenizer = transformers.AutoTokenizer.from_pretrained(architecture, low_cpu_mem_usage=True)\nmodel = transformers.MobileBertForQuestionAnswering.from_pretrained(\n    architecture, low_cpu_mem_usage=True\n)\npipeline = transformers.pipeline(task=\"question-answering\", model=model, tokenizer=tokenizer)\n\n\ndata = [\n    {'question': ['What color is it?', 'How do the people go?', \"What does the 'wolf' howl at?\"],\n     'context': [\n         \"Some people said it was green but I know that it's pink.\",\n         'The people on the bus go up and down. Up and down.',\n         \"The pack of 'wolves' stood on the cliff and a 'lone wolf' howled at the moon for hours.\"\n     ]}\n]\n\n# prediction result is wrong\npipeline(data, top_k=2, max_answer_len=5)\n```\n### Expected behavior\n\nExpected prediction response:\n\n```\n[[{'score': 0.5683297514915466, 'start': 51, 'end': 55, 'answer': 'pink'}, {'score': 0.028800610452890396, 'start': 51, 'end': 56, 'answer': 'pink.'}], [{'score': 0.3008899986743927, 'start': 25, 'end': 36, 'answer': 'up and down'}, {'score': 0.12070021033287048, 'start': 38, 'end': 49, 'answer': 'Up and down'}], [{'score': 0.8356598615646362, 'start': 68, 'end': 76, 'answer': 'the moon'}, {'score': 0.0971309095621109, 'start': 72, 'end': 76, 'answer': 'moon'}]]\n```\nBut it gets the following response (**one 'Up and down' answer is missing** )\n\n```\n[[{'score': 0.5683297514915466, 'start': 51, 'end': 55, 'answer': 'pink'}, {'score': 0.028800610452890396, 'start': 51, 'end': 56, 'answer': 'pink.'}], {'score': 0.4215902090072632, 'start': 25, 'end': 36, 'answer': 'up and down'}, [{'score': 0.8356598615646362, 'start': 68, 'end': 76, 'answer': 'the moon'}, {'score': 0.0971309095621109, 'start': 72, 'end': 76, 'answer': 'moon'}]]\n```",
    "url": "https://github.com/huggingface/transformers/issues/38984",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-23T13:09:23Z",
    "updated_at": "2025-07-17T08:24:31Z",
    "comments": 4,
    "user": "WeichenXu123"
  },
  {
    "repo": "huggingface/lighteval",
    "number": 822,
    "title": "Documenting how to launch multilingual tasks",
    "body": "Atm, need to use custom tasks to launch them, must be documented",
    "url": "https://github.com/huggingface/lighteval/issues/822",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-23T11:10:13Z",
    "updated_at": "2025-09-03T15:28:42Z",
    "user": "clefourrier"
  },
  {
    "repo": "huggingface/candle",
    "number": 3002,
    "title": "Is there a roadmap or intention to support CUDA Graph?",
    "body": "vLLM v1 uses CUDA Graph to capture the execution workflow of the entire model, resulting in significant performance improvements compared to the previous version. I'm wondering if there are any plans to support CUDA Graph in Candle. Would it be possible to add `start_capture`, `end_capture`, and `replay` to the `Module` so that the captured graph can be replayed within the forward method? @LaurentMazare \n\nEric may also be interested in this @EricLBuehler ",
    "url": "https://github.com/huggingface/candle/issues/3002",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-23T10:11:12Z",
    "updated_at": "2025-09-06T14:04:53Z",
    "comments": 4,
    "user": "guoqingbao"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38977,
    "title": "LMHead is processing redundant tokens in prefill",
    "body": "While using `GPT2LMHeadModel.generate()` and compare its performance with vLLM, I noticed a significant inefficiency in the `forward()` implementation of many huggingface models. For example, in the `GPT2LMHeadModel.forward`, `self.lm_head` is applied to all token hidden states, even when called from the `generate()` method, where only the logits of the last token are needed for next-token prediction. This computes logits over the entire sequence and can introduce significant overhead.\n\n```py\n# src/transformers/models/gpt2/modeling_gpt2.py, line 1233\nlm_logits = self.lm_head(hidden_states)\n```\n\nSuggested Fix: add a conditional branch in forward() to slice the hidden states before computing logits if it\u2019s a generation step.",
    "url": "https://github.com/huggingface/transformers/issues/38977",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-23T08:32:22Z",
    "updated_at": "2025-06-25T08:29:02Z",
    "comments": 3,
    "user": "null-pointer-access"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1369,
    "title": "The performance of SmolVLA on LIBERO cannot be replicated",
    "body": "I trained SmolVLA from scratch on the LIBERO dataset (the LIBERO dataset under Lerobot), but during the test, I couldn't reproduce its results in the paper. Could there be a problem with my reproduction code or process? Could you produce a version of the reproduction tutorial?",
    "url": "https://github.com/huggingface/lerobot/issues/1369",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-06-23T07:38:52Z",
    "updated_at": "2025-10-07T19:58:50Z",
    "user": "hahans"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38970,
    "title": "Global and Local Anomaly co-Synthesis Strategy (GLASS)",
    "body": "### Model description\n\nHi \ud83e\udd17 Transformers team,\n\nI would like to contribute a new model to the library:\nGLASS \u2013 A Unified Anomaly Synthesis Strategy with Gradient Ascent for Industrial Anomaly Detection and Localization\n\n\ud83d\udcc4 Paper: https://arxiv.org/abs/2407.09359\n\n\ud83d\udcbb Code: https://github.com/cqylunlun/GLASS\n\nGLASS is a novel approach for industrial anomaly detection. It uses gradient ascent in the latent space to synthesize diverse and controllable anomalies, which improves both detection and localization. I believe this model could be valuable for users working on visual inspection and quality control tasks in manufacturing and related domains.\n\nWould the maintainers be interested in having this model integrated into Transformers? If so, I\u2019d be happy to start working on a PR.\n\nLooking forward to your feedback!\n\n### Open source status\n\n- [x] The model implementation is available\n- [ ] The model weights are available\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/transformers/issues/38970",
    "state": "closed",
    "labels": [
      "New model"
    ],
    "created_at": "2025-06-22T12:28:19Z",
    "updated_at": "2025-06-23T20:55:16Z",
    "comments": 2,
    "user": "sbrzz"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 1467,
    "title": "How can I add prompt words in the most elegant way to make the final answer of agents in Chinese or all the reasoning text displayed on gradio in a specific language of a certain one",
    "body": "How can I add prompt words in the most elegant way to make the final answer of agents in Chinese or all the reasoning text displayed on gradio in a specific language of a certain one?",
    "url": "https://github.com/huggingface/smolagents/issues/1467",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-06-22T07:34:13Z",
    "updated_at": "2025-06-22T10:49:30Z",
    "user": "ShelterWFF"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38965,
    "title": "Modernbert implementation with Tensorflow",
    "body": "Hi all! \n   I've noticed that ModernBERT [does not have an implementation in tensorflow](https://github.com/huggingface/transformers/issues/37128#issuecomment-2766235185) and I was looking into it. \n\nI'm checking this https://huggingface.co/docs/transformers/main/add_tensorflow_model and I noticed that it's talking about `modelling_modelname.py`, however at the head of the file `modeling_modernbert.py` there is a warning saying \n\n```\n#                \ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\n#           This file was automatically generated from src/transformers/models/modernbert/modular_modernbert.py.\n#               Do NOT edit this file manually as any edits will be overwritten by the generation of\n#             the file from the modular. If any change should be done, please apply the change to the\n#                          modular_modernbert.py file directly. One of our CI enforces this.\n#                \ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\ud83d\udea8\n# Copyright 2024 Answer.AI, LightOn, and contributors, and the HuggingFace Inc. team. All rights reserved.\n#\n```\n\nWhat does that means and is there any other implementation having the same principles? \n\n### Motivation\n\nI need Modernbert to work with [DeLFT](https://github.com/kermitt2/delft) through huggingface, and the implementation is mainly tensorflow there. \n\n### Your contribution\n\nI would like to propose a PR but I need a little bit of help in starting up. ",
    "url": "https://github.com/huggingface/transformers/issues/38965",
    "state": "closed",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-06-21T18:52:50Z",
    "updated_at": "2025-06-23T15:17:50Z",
    "comments": 2,
    "user": "lfoppiano"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1361,
    "title": "Nvidia Gr00t",
    "body": "Hi,\n\nAre there any plans to integrate Nvidia Gr00t policy?",
    "url": "https://github.com/huggingface/lerobot/issues/1361",
    "state": "open",
    "labels": [
      "enhancement",
      "question",
      "policies"
    ],
    "created_at": "2025-06-21T10:42:07Z",
    "updated_at": "2025-08-20T13:34:30Z",
    "user": "AbdElRahmanFarhan"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1360,
    "title": "Homing offset not taken into account during calibration",
    "body": "### System Info\n\n```Shell\nAs of lerobot commit `c940676bdda5ab92e3f9446a72fafca5c550b505`. Other system information is irrelevant for this issue.\n```\n\n### Information\n\n- [x] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nIn `lerobot/common/motors/feetech/feetech.py` in:\n```\n@property\ndef is_calibrated(self) -> bool:\n    motors_calibration = self.read_calibration()\n    if set(motors_calibration) != set(self.calibration):\n        return False\n\n    same_ranges = all(\n        self.calibration[motor].range_min == cal.range_min\n        and self.calibration[motor].range_max == cal.range_max\n        for motor, cal in motors_calibration.items()\n    )\n    if self.protocol_version == 1:\n        return same_ranges\n\n    same_offsets = all(\n        self.calibration[motor].homing_offset == cal.homing_offset\n        for motor, cal in motors_calibration.items()\n    )\n    return same_ranges and same_offsets\n```\n\nInstead of having:\n```\nsame_offsets = all(\n  self.calibration[motor].homing_offset == cal.homing_offset\n  for motor, cal in motors_calibration.items()\n)\n```\nThe `homing_offset` should be used to adjust the offset in `range_min` and `range_max`. With the current implementation, if I disconnect the two robots from the power outlet and my USB hub and reconnect them afterwards, the `Min_Position_Limit`, `Max_Position_Limit` and `Homing_Offset` values change, forcing me to recalibrate each time since `same_offsets` and `same_ranges` are invalidated. \n\nThe reason I'm not doing this myself is that I don't have enough knowledge to make sure I don't physically break anything while trying to fix it (since I run the risk of having my motors going sideways).\n\n\n### Expected behavior\n\nI expect to not have to recalibrate each time I disconnect my SO-100 arms from the outlet.",
    "url": "https://github.com/huggingface/lerobot/issues/1360",
    "state": "open",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-06-21T01:28:04Z",
    "updated_at": "2025-08-12T09:57:27Z",
    "user": "godardt"
  },
  {
    "repo": "pytorch/ao",
    "number": 2419,
    "title": "Benefits of Using QAT Before GGUF Quantization?",
    "body": "Hi,\nthank you for the amazing project.\n\nI have a question regarding quantization workflows. Does applying QAT before convering to GGUF format (e.g. using `Q4, Q4_K_M`) result in better quality fompared to directy quantizing with GGUF alone?\n\nI'm planning to serve my model using llama.cpp, so converting to GGUF is required. I\u2019ve noticed a noticeable quality drop when using methods provided by llama.cpp, so I\u2019m considering trying QAT to mitigate this.\n\nHas anyone experimented with this approach or have any insights to share?\n\nThanks.",
    "url": "https://github.com/pytorch/ao/issues/2419",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-21T01:22:49Z",
    "updated_at": "2025-06-25T11:56:11Z",
    "comments": 5,
    "user": "kiyoonyoo"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1323,
    "title": "Why `preserve_rng_state=False` in activation checkpointing",
    "body": "Why does torchtitan set `preserve_rng_state=False` for activation checkpointing? E.g.:\nhttps://github.com/pytorch/torchtitan/blob/f4048f8e1b36827156c4dc861c9680333a8542f9/torchtitan/models/llama3/infra/parallelize.py#L238",
    "url": "https://github.com/pytorch/torchtitan/issues/1323",
    "state": "open",
    "labels": [
      "question",
      "high priority",
      "triage review",
      "module: activation checkpointing"
    ],
    "created_at": "2025-06-20T20:22:42Z",
    "updated_at": "2025-08-25T04:58:04Z",
    "user": "awgu"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1322,
    "title": "How to adapt HuggingFace or other models for TorchTitan",
    "body": "Is there any thought on how to adapt HuggingFace or other  models for pre-training with TorchTitan ?",
    "url": "https://github.com/pytorch/torchtitan/issues/1322",
    "state": "open",
    "labels": [
      "duplicate"
    ],
    "created_at": "2025-06-20T19:39:54Z",
    "updated_at": "2025-08-21T03:22:37Z",
    "user": "githubsgi"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1359,
    "title": "Not clear how to setup a basic interactive simulator demo",
    "body": "Before buying the real robot most people would want to run a visual, interactive demo in the simulator. \n\nA demo should provide: \n - A trained model on the Franka robot\n - an intuitive way to interact with the cube using the mouse (e.g. drag, move, or \u201ckick\u201d it around) so we can see the robot chasing the cube.\n\nMany thanks\n",
    "url": "https://github.com/huggingface/lerobot/issues/1359",
    "state": "closed",
    "labels": [
      "question",
      "simulation"
    ],
    "created_at": "2025-06-20T14:12:17Z",
    "updated_at": "2025-10-09T21:49:19Z",
    "user": "aguaviva"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2300,
    "title": "Support for EuroBERT models",
    "body": "### Feature request\n\nI would like to export and optimize the [EuroBERT models](https://huggingface.co/collections/EuroBERT/eurobert-67ceb6c01804878b1f7999c6).\n\nCurrently, it doesn't seem to be possible. When I run :\n\n```python\nfrom optimum.onnxruntime import ORTModelForSequenceClassification\n\nonnx_model = ORTModelForSequenceClassification.from_pretrained(\n    \"EuroBERT/EuroBERT-210m\",\n    export=True,\n    trust_remote_code=True,\n)\n```\n\nHere is the output I got:\n```\nValueError: Trying to export a eurobert model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type eurobert to be supported natively in the ONNX export.\n```\n\nEnvironment Specs:\n- Python Version: 3.11.10\n- Optimum Version: 1.26.1\n\nAre you planning to support these models? \n\n### Motivation\n\n[EuroBERT models](https://huggingface.co/collections/EuroBERT/eurobert-67ceb6c01804878b1f7999c6) are modern multilingual encoder models that work well when adapted to several multilingual tasks (classification, NER, retrieval...).\n\n### Your contribution\n\nI can try to add them if you are not planning to do it.",
    "url": "https://github.com/huggingface/optimum/issues/2300",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2025-06-20T12:35:46Z",
    "updated_at": "2025-08-21T02:11:39Z",
    "comments": 2,
    "user": "antonioloison"
  },
  {
    "repo": "huggingface/peft",
    "number": 2601,
    "title": "How to Load Adapters with Per-Layer Variable Shapes in `PeftModel.from_pretrained`",
    "body": "### Feature request\n\nHi PEFT team,\n\nThank you for the great work on the PEFT library!\n\nI'm working on an extension to LoKrConfig that supports layer-wise adapters with different internal shapes. Specifically:\n\n- Each **adapter assigned to a layer** (e.g., adapter for layer A vs. layer B) may have a different shape.\n- These shapes are **fixed during training**, but vary across layers depending on, for example, the local hidden size or other heuristics.\n- For instance, the adapter weights might have shapes like `[2, 64, 64], [2, 64, 64]` for one layer and `[1, 86, 64], [1, 128, 64]` for another.\n\nThis creates a challenge at load time (`PeftModel.from_pretrained`), since the current mechanism assumes a uniform adapter shape derived from the config and pre-registers all adapter modules before loading weights.\n\nTo support such per-layer dynamic shapes, I see two possible approaches:\n\n1. **Record the shape of each layer\u2019s adapter in the config**, so that empty adapters can be registered with the correct shape before copying weights.\n2. **Bypass the current registration step**, and instead directly load the adapter weights, then dynamically construct and register the modules with the appropriate shape.\n\nMy questions:\n\n1. Is either of these approaches supported or recommended?\n2. What parts of the PEFT codebase need to be extended (e.g., config, adapter registration logic, loading flow)?\n3. Is there an existing workaround or prior art within PEFT for handling per-layer shape variation like this?\n\n\nThanks again for your work!\n\n### Your contribution\n\nI'd be happy to contribute a patch if this is a use case worth supporting more broadly.",
    "url": "https://github.com/huggingface/peft/issues/2601",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-20T11:11:19Z",
    "updated_at": "2025-06-21T05:42:58Z",
    "user": "yuxuan-z19"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11762,
    "title": "Could you help fix the backdoor vulnerability caused by two risky pre-trained models used in this repo?",
    "body": "### Describe the bug\n\nHi, @patrickvonplaten, @sayakpaul, I'd like to report that two potentially risky pretrained models are being used in this project, which may pose **backdoor threats**.Please check the following code example:\n\n### Reproduction\n\n\u2022    **tests/pipelines/stable_diffusion/test_onnx_stable_diffusion_upscale.py**\n\n```python\nclass OnnxStableDiffusionUpscalePipelineFastTests(OnnxPipelineTesterMixin, unittest.TestCase):\n    # TODO: is there an appropriate internal test set?\n    hub_checkpoint = \"ssube/stable-diffusion-x4-upscaler-onnx\"\n```\n\n```python\ndef test_pipeline_default_ddpm(self):\n        pipe = OnnxStableDiffusionUpscalePipeline.from_pretrained(self.hub_checkpoint, provider=\"CPUExecutionProvider\")\n        pipe.set_progress_bar_config(disable=None)\n\n        inputs = self.get_dummy_inputs()\n        image = pipe(**inputs).images\n        image_slice = image[0, -3:, -3:, -1].flatten()\n```\n\n\n\n\u2022    **tests/pipelines/stable_diffusion/test_onnx_stable_diffusion_img2img.py**\n\n```python\nclass OnnxStableDiffusionImg2ImgPipelineFastTests(OnnxPipelineTesterMixin, unittest.TestCase):\n    hub_checkpoint = \"hf-internal-testing/tiny-random-OnnxStableDiffusionPipeline\"\n```\n\n```python\ndef test_pipeline_default_ddim(self):\n        pipe = OnnxStableDiffusionImg2ImgPipeline.from_pretrained(self.hub_checkpoint, provider=\"CPUExecutionProvider\")\n        pipe.set_progress_bar_config(disable=None)\n\n        inputs = self.get_dummy_inputs()\n        image = pipe(**inputs).images\n        image_slice = image[0, -3:, -3:, -1].flatten()\n```\n\n#### \n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nOn windows\n\n### Who can help?\n\n#### **Issue Description**\n\nAs shown above, in the **test_on_stable_diffusion_upscale.py file**, the model **\"ssube/stable-diffusion-x4-upscaler-onnx\"** is used as the default model parameter in the `from_pretrained()` method of the `OnnxStableDiffusionUpscalePipeline` class in the diffusers library. Running the relevant instance method will automatically download and load this model. Later, the `pipe(**input)` method is used to execute the model. Similarly, in the **test_onnx_stable_diffusion_img2img.py file**, the model **\"hf-internal-testing/tiny-random-OnnxStableDiffusionPipeline\"** is also automatically downloaded, loaded, and executed.\n\n \n\nAt the same time, [the first model](https://huggingface.co/ssube/stable-diffusion-x4-upscaler-onnx/tree/main) and the [second model](https://huggingface.co/hf-internal-testing/tiny-random-OnnxStableDiffusionPipeline/tree/main) are **flagged as risky** on the HuggingFace platform. The `model.onnx` files in these models are marked as risky and may trigger **backdoor threats**. For certain specific inputs, the backdoor in the models could be activated, effectively altering the model's behavior.\n\n![Image](https://github.com/user-attachments/assets/facaff80-d2ca-45e3-bf94-5698df511dcd)\n\n![Image](https://github.com/user-attachments/assets/45f47a6d-3079-474a-ad52-867d5279261c)\n\n**Related Risk Reports:**\uff1a[ssube/stable-diffusion-x4-upscaler-onnx risk report ](https://protectai.com/insights/models/ssube/stable-diffusion-x4-upscaler-onnx/cc4d9dc5a0d94a8245f15e970ac6be642c7b63cc/overview) and [hf-internal-testing/tiny-random-OnnxStableDiffusionPipeline risk report ](https://protectai.com/insights/models/hf-internal-testing/tiny-random-OnnxStableDiffusionPipeline/a42f662ec86a14033aa8894b954225fa07905134/overview) \n\n \n\n#### Suggested Repair Methods\n\n1. Replace these models with safer official alternatives, such as `stabilityai/stable-diffusion-x4-upscaler` and `stabilityai/stable-diffusion-2-inpainting` (or other models). If specific functionalities cannot be achieved, you may convert these models to ONNX format and substitute them accordingly.\n2. If replacement is not feasible, please include a warning about potential security risks when instantiating the relevant classes.\n3. Visually inspect the model using OSS tools like Netron. If no issues are found, report the false threat to the scanning platform\n\nAs one of the most popular machine learning libraries(**star:29.4k**), **every potential risk could be propagated and amplified**. Could you please address the above issues?\n\nThanks for your help~\n\nBest regards,\nRockstars",
    "url": "https://github.com/huggingface/diffusers/issues/11762",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-20T09:31:50Z",
    "updated_at": "2025-06-23T05:25:22Z",
    "comments": 2,
    "user": "Rockstar292"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38927,
    "title": "Can't load my LoRA checkpoint after gemma3 refactor",
    "body": "### System Info\n\n- `transformers` version: 4.52.4\n- Platform: Linux-6.8.0-1029-aws-x86_64-with-glibc2.35\n- Python version: 3.10.15\n- Huggingface_hub version: 0.32.2\n- Safetensors version: 0.4.3\n- Accelerate version: 1.6.0\n- Accelerate config: \tnot found\n- DeepSpeed version: not installed\n- PyTorch version (GPU?): 2.6.0+cu124 (True)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: yes but not relevant here, it happens on single gpu too\n- Using GPU in script?: yes but same error on cpu only\n- GPU type: NVIDIA L40S\n\n### Who can help?\n\nHi @ArthurZucker and @zucchini-nlp \n\nI am using my own implementation of `Gemma3ForConditionalGeneration`. I was using transformers 4.50 for a while and upgraded to 4.52.4. After the update I realised that the `Gemma3ForConditionalGeneration` implementation had changed. Mostly `self.language_model` became `self.model`.\n\nThe issue is that when I use `PeftModel.from_pretrained` on my old LoRA checkpoint, it can't find the weights and I get a bunch of\n```\nFound missing adapter keys while loading the checkpoint: ['base_model.model.model.language_model.layers.0.self_attn.q_proj.lora_A.default.weight', 'base_model.model.model.language_model.layers.0.self_attn.q_proj.lora_B.default.weight', ...\n```\nI thought the `_checkpoint_conversion_mapping` [attribute](https://github.com/huggingface/transformers/blob/v4.52.4/src/transformers/models/gemma3/modeling_gemma3.py#L1236) would be enough but it isn't. Is there an easy way I can still use my old checkpoint?\n\nThanks in advance for you help, I really appreciate all the effort you guys make and sorry if this was explained somewhere in the documentation!\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nI have custom gemma\n```\nclass MyCustomiGemma(Gemma3ForConditionalGeneration):\n    _checkpoint_conversion_mapping = {\n        \"^language_model.model\": \"model.language_model\",\n        \"^vision_tower\": \"model.vision_tower\",\n        \"^multi_modal_projector\": \"model.multi_modal_projector\",\n        \"^language_model.lm_head\": \"lm_head\",\n    }\n\n    def __init__(\n        self,\n        config: Gemma3Config,\n    ):\n        super().__init__(config)\n\n        self.vocab_size = config.text_config.vocab_size\n\n        self.model = Gemma3Model(config)\n        self.lm_head = nn.Linear(\n            config.text_config.hidden_size, config.text_config.vocab_size, bias=False\n        )\n\n        self.another_head = nn.Linear(...)\n\n        self.post_init()\n```\n\nWhen using \n```\nbase_model = MyCustomiGemma.from_pretrained()\nmodel = PeftModel.from_pretrained(\n              base_model,\n              checkpoint_path,\n              is_trainable=True,\n          )\n```\n\nI get the `Found missing adapter keys while loading the checkpoint:` warning for all my LoRAs\n\n### Expected behavior\n\nI think the issue is just a name mapping and I thought it be backwards compatible",
    "url": "https://github.com/huggingface/transformers/issues/38927",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-20T06:59:34Z",
    "updated_at": "2025-10-07T18:53:15Z",
    "comments": 12,
    "user": "jood-canva"
  },
  {
    "repo": "huggingface/mcp-course",
    "number": 119,
    "title": "How to preview the project locally?",
    "body": "I'm trying to preview the project locally to see my changes and contribute to the project. But when executing the script the following errors is triggered.\n\nError:\n![Image](https://github.com/user-attachments/assets/b9a47af1-e28e-4175-8c33-7ed2aac9121b)\n\nPreview:\n![Image](https://github.com/user-attachments/assets/2b140628-485f-4bd3-bc26-f3b083ae92de)\n\nThere is a correct way to run and preview the project?",
    "url": "https://github.com/huggingface/mcp-course/issues/119",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-20T01:05:46Z",
    "updated_at": "2025-09-23T17:29:13Z",
    "user": "arimariojesus"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38924,
    "title": "Exporting Llava decoder into ONNX format",
    "body": "I am working on exporting Llava into ONNX format. I came across this previous issue: https://github.com/huggingface/transformers/issues/33637 which had a notebook that outlined how to export in three separate parts. I noticed there wasn't any actual code on how the decoder was exported unlike the other two components. Does anyone know how they were able to export the decoder in the original notebook?\n\nNotebook: https://colab.research.google.com/drive/1IhC8YOV68cze0XWGfuqSclnVTt_FskUd?usp=sharing",
    "url": "https://github.com/huggingface/transformers/issues/38924",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-19T23:32:47Z",
    "updated_at": "2025-08-12T08:03:14Z",
    "comments": 10,
    "user": "EricJi150"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38918,
    "title": "Lack of IDE-Specific Authentication Instructions in Hugging Face \"Quickstart\" Documentation",
    "body": "Explanation:\n\nI\u2019m currently exploring the Transformers library and want to understand its architecture in order to make meaningful contributions. I started with the Quickstart page, particularly the setup section, which provides instructions for getting started with the Hugging Face Hub.\n\nHowever, I noticed that the documentation appears to be primarily tailored for users working in Jupyter notebooks. The instructions for authentication (using notebook_login()) seem to assume that the user is running code within a notebook environment. As someone who is working in PyCharm (and possibly others working in VS Code or other IDEs), I found that there is no clear guidance for authenticating via these IDEs.\n\nIt would be helpful to explicitly mention how users working in an IDE like PyCharm or VS Code should authenticate. Specifically, using huggingface-cli for authentication in a non-notebook environment could be a good solution. Providing a simple, clear guide on how to authenticate via the CLI or within the IDE would greatly improve the documentation.\n\nSuggestion:\n\nI recommend updating the documentation to include a section specifically addressing authentication when working in IDEs like PyCharm or VS Code. \n\nPlease let me know if this suggestion makes sense or if you need any further clarification before I proceed with the update.\n",
    "url": "https://github.com/huggingface/transformers/issues/38918",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-19T17:16:32Z",
    "updated_at": "2025-06-24T18:48:17Z",
    "comments": 4,
    "user": "marcndo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7627,
    "title": "Creating a HF Dataset from lakeFS with S3 storage takes too much time!",
    "body": "Hi,\n\nI\u2019m new to HF dataset and I tried to create datasets based on data versioned in **lakeFS** _(**MinIO** S3 bucket as storage backend)_\n\nHere I\u2019m using \u00b130000 PIL image from MNIST data however it is taking around 12min to execute, which is a lot!\n\nFrom what I understand, it is loading the images into cache then building the dataset.\n\u2013 Please find bellow the execution screenshot \u2013\n\nIs there a way to optimize this or am I doing something wrong?\n\nThanks!\n\n![Image](https://github.com/user-attachments/assets/c79257c8-f023-42a9-9e6f-0898b3ea93fe)",
    "url": "https://github.com/huggingface/datasets/issues/7627",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-19T14:28:41Z",
    "updated_at": "2025-06-23T12:39:10Z",
    "comments": 1,
    "user": "Thunderhead-exe"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1351,
    "title": "Need help about dataset and train.",
    "body": "# What this for\n\nAttracted by smolvla, and new to smolvla_base, and i am now trying to ask few questions before a try with this model.\n\nSeveral parts: \n1) dataset\n2) simulation\n3) real world\n\n## dataset\n### Two cameras ?\nI have read three datasets, including  \nhttps://huggingface.co/datasets/lerobot/svla_so101_pickplace\nhttps://huggingface.co/datasets/Marlboro1998/starai02\n\nand its structure shows: \nvideos/chunks/ two foldes with .mp4 files, each is one camera.\n\nhttps://huggingface.co/datasets/unitreerobotics/Z1_DualArmStackBox_Dataset\n\nI find that the data in unitree dataset is with one camera\n\ndoes it mean that it is not necessary with two cameras? \n\n**if one camera** is possible to build dataset. Where and how should i change the code to build the dataset and to train with it? \n\n**if two cameras are min demand**, is it possible i make it with random position? like one is in-hand, and one is some where else, because it might be hard to real put it everytime in the same position ( for some work)\n\n### depth data?\nI have one realsense camera with depth data. how should i deal with it in dataset? only with color frame?\n\n### video length\nI have watch several videos in svla_so101_pickplace, and each is with 10s. I understand that this is because such shot video contains a complete task. \n\nhow about a work might be long and complex? break it down into n parts so you will get n +1 (break down + full) tasks and then train with it?\n\n\n## simulation\n\n### simulation env\ni got some basic understanding in this part. I used few times with mujoco and isaac sim. just start to try with lerobot. \n\nIs it possible output to mujoco or isaac sim? I understand these are two might not relate to lerobot, sorry if anything wrong.\n\n### simulation of different robot\nThis is something relating to train. How can i record a dataset for custom robot? I have read some dataset like for unitree, but like how to record in simulate and with custom robot?\n\nI have not yet deep read the documentation with lerobot, so if there is any doc can help this, could you share some information.\n\n\n# real world\n\nif i try to train with other robot, but with few dataset ( because less community data and self-collection data) , i think its performance would not be as good as those in your paper. so how many data do you think necessary for such situation ( robot different from paper)\n\n\nThanks a lot for your consideration. Forgive me if anything wrong in my text above.\n\n",
    "url": "https://github.com/huggingface/lerobot/issues/1351",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "dataset"
    ],
    "created_at": "2025-06-19T04:03:43Z",
    "updated_at": "2025-10-17T11:47:56Z",
    "user": "hbj52152"
  },
  {
    "repo": "huggingface/candle",
    "number": 2997,
    "title": "Implement Conv3D support for compatibility with Qwen-VL and similar models",
    "body": "Several vision-language models such as Qwen-VL and its variants make use of 3D convolution layers (Conv3D) in their architecture, especially for handling video or temporal spatial data. Currently, Candle does not support Conv3D operations, which makes it impossible to run or port such models natively.\n\nIn order to support these models and ensure broader compatibility with existing open-source architectures, it would be beneficial to implement Conv3D in Candle as a fundamental operation.\n\nThis will enable:\n\n- Native execution of Qwen-VL-style models\n- Proper handling of video or spatio-temporal data inputs\n- Compatibility with pretrained weights relying on Conv3D layers\n\nLooking forward to discussion and suggestions on how best to approach this implementation.\n",
    "url": "https://github.com/huggingface/candle/issues/2997",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-19T02:57:20Z",
    "updated_at": "2025-10-10T16:51:20Z",
    "comments": 1,
    "user": "maximizemaxwell"
  },
  {
    "repo": "pytorch/torchrec",
    "number": 3114,
    "title": "Which lightning strategy to use with torchrec optimizers?",
    "body": "Hi, thank you for this great work. I would like to know which [distributed strategy](https://github.com/Lightning-AI/pytorch-lightning/blob/76d3d22c5997398ffb5296cf500c723a176c0a06/src/lightning/pytorch/trainer/trainer.py#L95) to use with lightning trainer. I see two potential avenues:\n1. DDP strategy: [following this example](https://github.com/pytorch/torchrec/blob/ab1cbe13833f51ace06f5075653ca1e16d937038/examples/bert4rec/bert4rec_main.py#L512-L524), I verified that the updates are not sparse, ie, embeddings not used to compute the loss for the current batch were still updated when using Adam (due to momentum/weight decay)\n2. Custom strategy for DMP: [when using DMP](https://github.com/pytorch/torchrec/blob/ab1cbe13833f51ace06f5075653ca1e16d937038/examples/bert4rec/bert4rec_main.py#L491-L507), I've verified the updates are sparse. However, AFAIK, there is not a DMP strategy for lightning, and so I would need to define a custom strategy. \n\nIs it possible to make DDP work for sparse opt, and if not, is a custom strategy the best option?\n\nMWE:\n\n```\n\nimport argparse\nimport os\nimport sys\nfrom typing import Any, cast, Dict, List, Union\n\nfrom fbgemm_gpu.split_embedding_configs import EmbOptimType\n\nimport torch\nfrom torch import distributed as dist, nn, optim \nimport torch.utils.data as data_utils\nfrom torch.nn.parallel import DistributedDataParallel as DDP\n\nimport torchrec\nfrom torchrec.distributed.embeddingbag import EmbeddingBagCollectionSharder\nfrom torchrec.distributed.model_parallel import DistributedModelParallel as DMP\nfrom torchrec.distributed.types import ModuleSharder\nfrom torchrec.optim.keyed import CombinedOptimizer, KeyedOptimizerWrapper\nfrom torchrec.optim.optimizers import in_backward_optimizer_filter\nfrom torchrec.sparse.jagged_tensor import KeyedJaggedTensor\nfrom torchrec.modules.embedding_configs import ShardingType\nfrom torchrec import EmbeddingBagCollection, EmbeddingBagConfig, PoolingType\n\nclass DataSet(torch.utils.data.IterableDataset):\n    def __init__(\n            self,\n            max_id: int,\n            max_seq_len: int\n    ) -> None:\n        self.max_seq_len = max_seq_len\n        self.max_id = max_id\n\n    def __iter__(self):\n        while True:\n            len_ = torch.randint(1, self.max_seq_len + 1, (1, )).item()\n            yield torch.randint(0, self.max_id, (len_,))\n\n\nclass Model(torch.nn.Module):\n\n    def __init__(\n        self,\n        max_id: int,\n        emb_dim: int,\n    ) -> None:\n        super().__init__()\n        self.emb_dim = emb_dim\n\n        item_embedding_config = EmbeddingBagConfig(\n            name=\"item_embedding\",\n            embedding_dim=emb_dim,\n            num_embeddings=max_id,\n            feature_names=[\"item\"],\n            weight_init_max=1.0,\n            weight_init_min=-1.0,\n            pooling=PoolingType.MEAN,\n        )\n        self.ebc = EmbeddingBagCollection(\n            tables=[item_embedding_config],\n        )\n        self.head = nn.Linear(emb_dim, 1)\n\n    def forward(self, x: KeyedJaggedTensor) -> torch.Tensor:\n        out = self.ebc(x)[\"item\"].to_dense()\n        return self.head(out)\n\ndef parse_args(argv: List[str]) -> argparse.Namespace:\n    parser = argparse.ArgumentParser()\n    parser.add_argument(\n        \"--mode\",\n        type=str,\n        default=\"ddp\",\n        help=\"dmp (distributed model parallel) or ddp (distributed data parallel)\",\n    )\n    return parser.parse_args(argv)\n\n\ndef _to_kjt(seqs: torch.LongTensor, device: torch.device) -> KeyedJaggedTensor:\n    seqs_list = list(seqs)\n    lengths = torch.IntTensor([value.size(0) for value in seqs_list])\n    values = torch.cat(seqs_list, dim=0)\n\n    kjt = KeyedJaggedTensor.from_lengths_sync(\n        keys=[\"item\"], values=values, lengths=lengths\n    ).to(device)\n    return kjt\n\ndef get_embedding_weights(model: Union[DDP, DMP], x: List[torch.Tensor]):\n    emb_weights = [v.data.clone() for k, v in model.named_parameters() if \"embedding\" in k]\n    assert len(emb_weights) == 1\n    emb_weights = emb_weights[0]\n    x = torch.cat(x)\n    ids = torch.arange(len(emb_weights)).type_as(x)\n    used_mask = torch.isin(ids, x)\n    return emb_weights[used_mask], emb_weights[~used_mask]\n\ndef _train_one_epoch(\n    model: Union[DDP, DMP],\n    loader: data_utils.DataLoader,\n    device: torch.device,\n    optimizer: optim.Adam,\n) -> None:\n    model.train()\n    if torch.cuda.is_available():\n        torch.cuda.set_device(dist.get_rank())\n    i = 0\n    NUM_ITER = 5\n    for batch in loader:\n        i += 1\n        batch = [x.to(device) for x in batch]\n        optimizer.zero_grad()\n        kjt = _to_kjt(batch, device)\n        loss = model(kjt).norm()\n        used_embs_pre, unused_embs_pre = get_embedding_weights(model, batch)\n        loss.backward()\n        optimizer.step()\n        used_embs_post, unused_embs_post = get_embedding_weights(model, batch)\n\n        diffs_used = torch.norm(used_embs_post - used_embs_pre).item()\n        diffs_unused = torch.norm(unused_embs_post - unused_embs_pre).item()\n\n        print(f\"Iter {i",
    "url": "https://github.com/meta-pytorch/torchrec/issues/3114",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-18T19:25:10Z",
    "updated_at": "2025-06-19T06:04:22Z",
    "comments": 0,
    "user": "JacobHelwig"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3633,
    "title": "how to save a model with FSDP2 ?",
    "body": "Hello everyone, I\u2019m confused about how to save model weights using FSDP2. I keep running into OOM (out-of-memory) issues when trying to save a trained 8B model with FSDP2. Interestingly, memory is sufficient during training, but saving the model requires too much memory.\n\nI would like each rank to save only its own weights (Maybe the OOM issue doesn't occur in this case?)\n\nI\u2019m using 8 A100-40GB GPUs, and I\u2019d really appreciate your help.\n\nhere is my envs:\n```text\naccelereate==1.7.0\ntorch==2.6.0+cu12.6\ntransformers==4.52.4\n```\n\nthis is my accelerate config (FSDP2.ymal):\n```yaml\ncompute_environment: LOCAL_MACHINE\ndebug: false\ndistributed_type: FSDP\ndowncast_bf16: 'no'\nenable_cpu_affinity: false\nfsdp_config:\n  fsdp_activation_checkpointing: false\n  fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP\n  fsdp_cpu_ram_efficient_loading: true\n  fsdp_offload_params: false\n  fsdp_reshard_after_forward: true\n  fsdp_state_dict_type: SHARDED_STATE_DICT\n  fsdp_version: 2\nmachine_rank: 0\nmain_training_function: main\nmixed_precision: bf16\nnum_machines: 1\nnum_processes: 8\nrdzv_backend: static\nsame_network: true\ntpu_env: []\ntpu_use_cluster: false\ntpu_use_sudo: false\nuse_cpu: false\n```\n\nmy script (demo.py):\n```python\nimport os\nimport os.path as osp\n\nimport torch\nimport torch.nn as nn\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\n\nfrom accelerate import Accelerator\n\nclass Mydataset(torch.utils.data.Dataset):\n    def __init__(self, data_length=32, tokenizer = None):\n        super().__init__()\n        self.data_length = data_length\n        self.tokenizer = tokenizer\n        self.input_str = 'this is a test'\n        self.data = tokenizer(self.input_str, return_tensors='pt', padding='max_length', max_length=32, padding_side='right')\n\n    def __len__(self):\n        return 10\n    \n    def __getitem__(self, idx):\n        return {\n            'input_ids': self.data['input_ids'][0],\n            'attention_mask': self.data['attention_mask'][0]\n        }\n\n\nif __name__ == '__main__':\n\n    accelerator = Accelerator()\n    model_path = \"./pretrain/Qwen3-8B\"\n\n    model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True)\n    tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)\n\n    optimizer = torch.optim.Adam(model.parameters(), lr=1e-4)\n\n    dataset = Mydataset(tokenizer=tokenizer)\n    dataloader = torch.utils.data.DataLoader(dataset, batch_size=16, shuffle=True)\n\n    model, optimizer, dataloader = accelerator.prepare(model, optimizer, dataloader)\n\n    loss_fuc = torch.nn.CrossEntropyLoss()\n\n    model.train()\n    # training\n    for batch in dataloader:\n        input_ids = batch['input_ids']\n        attention_mask = batch['attention_mask']\n        labels = batch['input_ids'].clone()\n\n        outputs = model(input_ids=input_ids, attention_mask=attention_mask)\n\n        labels = nn.functional.pad(labels, (0, 1), value=-100)\n        shift_labels = labels[..., 1:].contiguous().view(-1)\n\n        accelerator.wait_for_everyone()\n        loss = loss_fuc(outputs.logits.view(-1, outputs.logits.shape[-1]), shift_labels)\n        accelerator.backward(loss)\n\n        optimizer.step()\n        optimizer.zero_grad()\n\n    print(\"training finished\")\n    model.eval()\n    model_save_path = \"./saved_models/tmp\"\n\n    accelerator.save_model(model, model_save_path)\n    print(\"Done\")\n```\n\ncommand:\n```bash\naccelerate launch --config_file ./accelerate_configs/FSDP2.yaml demo.py\n``` \n",
    "url": "https://github.com/huggingface/accelerate/issues/3633",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-18T11:41:05Z",
    "updated_at": "2025-06-18T15:36:37Z",
    "user": "colinzhaoxp"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7624,
    "title": "#Dataset Make \"image\" column appear first in dataset preview UI",
    "body": "Hi!\n\n#Dataset\n\nI\u2019m currently uploading a dataset that includes an `\"image\"` column (PNG files), along with some metadata columns. The dataset is loaded from a .jsonl file. My goal is to have the \"image\" column appear as the first column in the dataset card preview UI on the :hugs: Hub.\n\nHowever, at the moment, the `\"image\"` column is not the first\u2014in fact, it appears last, which is not ideal for the presentation I\u2019d like to achieve.\n\nI have a couple of questions:\n\nIs there a way to force the dataset card to display the `\"image\"` column first?\nIs there currently any way to control or influence the column order in the dataset preview UI?\nDoes the order of keys in the .jsonl file or the features argument affect the display order?\nThanks again for your time and help! :blush:",
    "url": "https://github.com/huggingface/datasets/issues/7624",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-18T09:25:19Z",
    "updated_at": "2025-06-20T07:46:43Z",
    "comments": 2,
    "user": "jcerveto"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 550,
    "title": "[QUESTION] Diagram of the multi-agent architecture",
    "body": "[Unit 2.1 Multi-Agent Systems](https://huggingface.co/learn/agents-course/unit2/smolagents/multi_agent_systems#multi-agent-systems) contains [an image](https://mermaid.ink/img/pako:eNp1kc1qhTAQRl9FUiQb8wIpdNO76eKubrmFks1oRg3VSYgjpYjv3lFL_2hnMWQOJwn5sqgmelRWleUSKLAtFs09jqhtoWuYUFfFAa6QA9QDTnpzamheuhxn8pt40-6l13UtS0ddhtQXj6dbR4XUGQg6zEYasTF393KjeSDGnDJKNxzj8I_7hLW5IOSmP9CH9hv_NL-d94d4DVNg84p1EnK4qlIj5hGClySWbadT-6OdsrL02MI8sFOOVkciw8zx8kaNspxnrJQE0fXKtjBMMs3JA-MpgOQwftIE9Bzj14w-cMznI_39E9Z3p0uFoA?type=png) depicting a diagram of the multi-agent architecture. In this image, the Manager Agent, which is typically responsible for task delegation, has direct access to a Code-Interpreter Tool. Would it be more reasonable in practice if there was a Code-Interpreter Agent between them?\n\n![Image](https://github.com/user-attachments/assets/02ce537b-c9b8-4a4d-9681-578688787c2d)",
    "url": "https://github.com/huggingface/agents-course/issues/550",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-18T08:58:58Z",
    "updated_at": "2025-06-18T08:58:58Z",
    "user": "st143575"
  },
  {
    "repo": "pytorch/vision",
    "number": 9110,
    "title": "RoIHeads.postprocess_detections boxes slicing error occurs when removing predictions with the background label",
    "body": "### \ud83d\udc1b Describe the bug\n\n**Bug Report: Incorrect Box Slicing in Faster R-CNN's postprocess_detections**\n\n### Minimal Reproduction Code\n```python\nimport torch\nimport torchvision\n\ndetector = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)\ndata = torch.zeros((1, 3, 1080, 1920), dtype=torch.float32)\ndetections = detector(data)\n```\n\n### Description\nThe bug occurs in [`roi_heads.py` (line 701)](https://github.com/pytorch/vision/blob/main/torchvision/models/detection/roi_heads.py#L701) in the `postprocess_detections` function of `RoIHeads` when processing Faster R-CNN outputs. The current implementation incorrectly handles box dimension slicing when removing background class predictions.\n\n### Problem Location\nThe problematic code segment:\n```python\nfor boxes, scores, image_shape in zip(pred_boxes_list, pred_scores_list, image_shapes):\n    ...\n    # remove predictions with the background label\n    boxes = boxes[:, 1:]  # Incorrect slicing\n    scores = scores[:, 1:]\n    labels = labels[:, 1:]\n    ...\n```\n\n### Root Cause\n1. The boxes tensor has shape `[N, num_classes * 4]` (where each class has 4 coordinate values)\n2. The current slicing `boxes[:, 1:]` incorrectly operates on the last dimension (class*coordinates) instead of just the class dimension\n3. This causes misalignment between boxes, scores, and labels since they're being sliced differently\n\n![Image](https://github.com/user-attachments/assets/d1c0b97d-c873-469e-9cc6-5eb0a80e6765)\n\n### Expected Behavior\nThe boxes tensor should first be reshaped to `[N, num_classes, 4]` before slicing to properly separate class and coordinate dimensions.\n\n### Proposed Fix\n```python\nfor boxes, scores, image_shape in zip(pred_boxes_list, pred_scores_list, image_shapes):\n    ...\n    # remove predictions with the background label\n    boxes = boxes.reshape(-1, num_classes, 4)  # Proper dimension separation\n    boxes = boxes[:, 1:, :]  # Correct class dimension slicing\n    scores = scores[:, 1:]\n    labels = labels[:, 1:]\n    ...\n```\n\n### Impact\nThe current implementation leads to:\n1. Misaligned boxes and their corresponding scores/labels\n2. Potentially incorrect final detection results\n3. Silent failure without explicit errors\n\n### Versions\n\nbranch: 6473b779bdb8ba02bab0fc9e0f4ef4661ebb632a",
    "url": "https://github.com/pytorch/vision/issues/9110",
    "state": "closed",
    "labels": [
      "bug",
      "question"
    ],
    "created_at": "2025-06-18T08:55:33Z",
    "updated_at": "2025-09-04T14:52:39Z",
    "user": "FeiFanMoKe"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 156191,
    "title": "Dynamo does not know how to trace method `__len__` of class `<unknown type>` with torch.logging calls",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhenever we use any logging function, there is a graph break due to calling `__len__` on an unkown type. I dug into the logging source code and set a breakpoint, and the `root.handlers` object is defintiely a standard list but torch.compile isn't able to parse that.\n\nI know that there is there is this change https://github.com/pytorch/pytorch/pull/139403 that allows us to ignore certain logging functions but calling `logging.info` still forces us through this code path.\n\nWe use a ton of logging throughout our large training script and the graph breaks kill our performance. Any help resolving this would be great! Note: we don't actually care about seeing the logs in a torch.compiled graph, we already log everything once eagerly before compiling.\n\n```python\nimport torch\nimport logging\nimport triton\n\ntorch._logging.set_logs(graph_breaks=True)\n\n_NUM_ITERATIONS = 20\n\n@torch.compile\ndef _logging_fn(x, y):\n    result = x\n    for _ in range(_NUM_ITERATIONS):\n        logging.info(\"Hello\")\n        result += (x * y)\n    return result\n\n# Benchmark\nDEVICE = \"cuda\"\ntest_x = torch.randn(1000).to(DEVICE).to(torch.float32)\ntest_y = torch.randn(1000).to(DEVICE).to(torch.float32)\nprint(f\"logging_fn: {triton.testing.do_bench(lambda: _logging_fn(test_x, test_y))}\")\n\n\n```\n\n### Error logs\n\n```\n[__graph_breaks] Graph break in user code at /home/aboubezari/.conda/envs/torch-env2/lib/python3.10/logging/__init__.py:2127\n[__graph_breaks] Graph Break Reason: Unsupported method call\n[__graph_breaks]   Explanation: Dynamo does not know how to trace method `__len__` of class `<unknown type>`\n[__graph_breaks]   Hint: Avoid calling `<unknown type>.__len__` in your code.\n[__graph_breaks]   Hint: Please report an issue to PyTorch.\n```\n\n### Versions\n\nPyTorch version: 2.7.1+cu126\nIs debug build: False\nCUDA used to build PyTorch: 12.6\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 20.04.6 LTS (x86_64)\nGCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0\nClang version: Could not collect\nCMake version: version 3.16.3\nLibc version: glibc-2.31\n\nPython version: 3.10.0 (default, Mar  3 2022, 09:58:08) [GCC 7.5.0] (64-bit runtime)\nPython platform: Linux-5.15.0-1083-gcp-x86_64-with-glibc2.31\nIs CUDA available: True\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: GPU 0: NVIDIA A100-SXM4-40GB\nNvidia driver version: 535.247.01\ncuDNN version: Could not collect\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nByte Order:                           Little Endian\nAddress sizes:                        46 bits physical, 48 bits virtual\nCPU(s):                               12\nOn-line CPU(s) list:                  0-11\nThread(s) per core:                   2\nCore(s) per socket:                   6\nSocket(s):                            1\nNUMA node(s):                         1\nVendor ID:                            GenuineIntel\nCPU family:                           6\nModel:                                85\nModel name:                           Intel(R) Xeon(R) CPU @ 2.20GHz\nStepping:                             7\nCPU MHz:                              2200.166\nBogoMIPS:                             4400.33\nHypervisor vendor:                    KVM\nVirtualization type:                  full\nL1d cache:                            192 KiB\nL1i cache:                            192 KiB\nL2 cache:                             6 MiB\nL3 cache:                             38.5 MiB\nNUMA node0 CPU(s):                    0-11\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Mitigation; Enhanced IBRS\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe ",
    "url": "https://github.com/pytorch/pytorch/issues/156191",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2025-06-17T16:54:31Z",
    "updated_at": "2025-06-17T19:27:01Z",
    "user": "aboubezari"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1337,
    "title": "how to work with ur robot,and collect the data and fine turn the model ?",
    "body": "",
    "url": "https://github.com/huggingface/lerobot/issues/1337",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "dataset"
    ],
    "created_at": "2025-06-17T09:51:16Z",
    "updated_at": "2025-10-17T11:49:17Z",
    "user": "mmlingyu"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11730,
    "title": "Add `--lora_alpha` and metadata handling in training scripts follow up",
    "body": "With #11707, #11723 we pushed some small changes to the way we save and parse metadata for trained LoRAs, which also allow us to add a `--lora_alpha` arg to the Dreambooth LoRA training scripts, making LoRA alpha also configurable. \n\nThis issue is to ask for help from the community to bring these changes to the other training scripts.\nSince this is an easy contribution, let's try to leave this issue for beginners and people that want to start learning how to contribute to open source projects \ud83e\udd17\n\nUpdating list of scripts to contribute to: \n\n- [ ] [train_dreambooth_lora_sdxl_advanced](https://github.com/huggingface/diffusers/blob/main/examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py)\n- [x] [train_dreambooth_lora_sdxl](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_sdxl.py)\n- [x] [train_dreambooth_lora_sd3](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_sd3.py)\n- [x] [train_dreambooth_lora_sana](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_sana.py)\n- [ ] [train_dreambooth_lora_lumina2](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_lumina2.py)\n- [x] [train_dreambooth_lora_hidream](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_hidream.py)\n- [ ] [train_dreambooth_lora](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora.py)\n\nIf you want to contribute just answer to this issue with the one you want to do and tag me in the PR. Please only take one so we can use this opportunity for people to learn the ropes on how to contribute and get started with open source.\ncc: @sayakpaul ",
    "url": "https://github.com/huggingface/diffusers/issues/11730",
    "state": "closed",
    "labels": [
      "good first issue",
      "contributions-welcome"
    ],
    "created_at": "2025-06-17T09:29:24Z",
    "updated_at": "2025-06-24T10:58:54Z",
    "comments": 8,
    "user": "linoytsaban"
  },
  {
    "repo": "huggingface/trl",
    "number": 3605,
    "title": "How to convert my multiturn dialogue dataset\uff1f",
    "body": "I have created a multiturn dialogue dataset. During the training process, the assistant's reply needs to be based on the user's reply and historical records in the previous round. First, the user's reply is labeled, and then the corresponding reply sentence is generated. In other words, the assistant's reply needs to rely on the previous multi-round dialogue data, and the reward function is based on the label prediction and reply sentence of the current round of reply. How should this kind of dataset be handled?\n####example\n{'role':'user',content:\"hello,doctor,I cant sleep well\"}\uff0c\n{'role':'assiatnt',content:\"userstate\uff1asleep problems \uff5c useremotion\uff1a\uff5cresponse\uff1aIs it trouble falling asleep or poor sleep quality?\"}\uff0c\n{'role':'user',content:\"All\"}\uff0c\n{'role':'assiatnt',content:\"userstate\uff1asleep problems \uff5c useremotion\uff1airritable\uff5cassistant-strategy\uff1aAsk for details\uff5cresponse\uff1aHow long has it lasted??\"}\uff0c\n{'role':'user',content:\"About two months\"}\uff0c\n......\n\nUsing a single round of user input alone cannot determine the user's state and emotions\u3002But I hope that in each round of user response, the output of the assistant will be evaluated.\n",
    "url": "https://github.com/huggingface/trl/issues/3605",
    "state": "closed",
    "labels": [
      "\ud83c\udfcb Reward"
    ],
    "created_at": "2025-06-17T09:07:47Z",
    "updated_at": "2025-09-22T17:46:35Z",
    "user": "Miaoqinghong"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1333,
    "title": "SO-100 Follower: Severe wrist_roll motor instability causing unwanted rotation during teleoperation",
    "body": "## Problem Description\n\nThe SO-100 Follower robot arm experiences severe instability in the `wrist_roll` motor during teleoperation, causing unwanted and uncontrollable rotation that significantly impacts usability. The motor exhibits extreme sensitivity and appears to be completely out of control in the default configuration.\n\n## Environment\n\n- **Robot**: SO-100 Follower\n- **LeRobot Version**: [Current version]\n- **Hardware**: Feetech STS3215 servos\n- **OS**: macOS\n- **Python**: 3.10.4\n\n## Quantitative Analysis\n\n### Baseline Analysis (Default Configuration)\n\n- **Data Collection**: 416.5 seconds, 24,894 data points\n- **Standard Deviation**: **95.596** (extremely high)\n- **Large Changes (>10.0)**: **242 occurrences**\n- **Value Distribution**:\n  - Small values (|x|<5.0): **0%**\n  - Large values (|x|\u226510.0): **100%** (completely uncontrolled)\n\n### Motor Correlation Analysis\n\nStrong correlations with other motors suggest cross-coupling issues:\n\n1. **elbow_flex.pos**: -0.253 (negative correlation, highest impact)\n2. **shoulder_lift.pos**: 0.203 (positive correlation)\n3. **gripper.pos**: 0.167 (positive correlation)\n4. **shoulder_pan.pos**: 0.124 (weak positive correlation)\n5. **wrist_flex.pos**: 0.026 (minimal correlation)\n\n### Trigger Pattern Analysis\n\nWhen wrist_roll experiences large changes (242 instances), average changes in other motors:\n\n- **elbow_flex.pos**: 1.970 (highest trigger)\n- **wrist_flex.pos**: 2.092\n- **shoulder_lift.pos**: 1.119\n- **gripper.pos**: 0.585\n- **shoulder_pan.pos**: 0.426\n\n## Root Cause Investigation\n\n### 1. Motor Configuration Issues\n\n- Default P_Coefficient (16) appears too high for wrist_roll motor\n- No deadzone filtering in default configuration\n- Potential hardware-level noise or mechanical coupling\n\n### 2. Cross-Motor Interference\n\n- Strong negative correlation with elbow_flex suggests mechanical or electrical interference\n- Movement of other motors triggers unwanted wrist_roll rotation\n\n### 3. Control System Sensitivity\n\n- Motor responds to minimal input changes\n- No built-in filtering for noise or small movements\n\n## Reproduction Steps\n\n1. Set up SO-100 Follower with default configuration\n2. Run teleoperation:\n   ```bash\n   python -m lerobot.teleoperate \\\n       --robot.type=so100_follower \\\n       --robot.port=/dev/tty.usbserial-130 \\\n       --robot.id=blue \\\n       --teleop.type=so100_leader \\\n       --teleop.port=/dev/tty.usbserial-110 \\\n       --teleop.id=blue\n   ```\n3. Move any other motor (especially elbow_flex)\n4. Observe unwanted wrist_roll rotation\n\n## Attempted Solutions and Results\n\n### 1. P Coefficient Reduction\n\n**Implementation**: Reduced wrist_roll P_Coefficient from 16 to 4\n**Result**: Improved standard deviation from 95.596 to 59.976 (37.3% improvement)\n\n### 2. Deadzone Filtering\n\n**Implementation**: Added deadzone threshold (5.0) to ignore small changes\n**Result**: Partial improvement but problem persists\n\n### 3. Advanced Filtering System\n\n**Implementation**: Created comprehensive filtering with:\n\n- Moving average filter\n- Gripper-linked filter\n- Combined filtering modes\n  **Result**: Reduced responsiveness but didn't eliminate core issue\n\n### 4. Complete Disabling (Workaround)\n\n**Implementation**: Force wrist_roll value to 0.0 at all times\n**Result**: Eliminates problem but removes wrist_roll functionality\n\n## Proposed Solutions\n\n### Short-term (Workarounds)\n\n1. **Lower P Coefficient**: Further reduce to 2 or 1\n2. **Stronger Deadzone**: Increase threshold to 20.0+\n3. **Motor Disabling**: Provide option to disable problematic motors\n\n### Long-term (Root Cause Fixes)\n\n1. **Hardware Investigation**: Check for:\n\n   - Cable interference/noise\n   - Mechanical coupling between joints\n   - Motor calibration issues\n   - Power supply stability\n\n2. **Software Improvements**:\n\n   - Adaptive filtering based on motor correlations\n   - Cross-motor interference compensation\n   - Better default configurations for SO-100\n\n3. **Configuration Options**:\n   - Motor-specific P/I/D coefficients\n   - Built-in filtering options\n   - Hardware-specific presets\n\n## Additional Data Available\n\nI have collected extensive analysis data including:\n\n- Multiple log files with quantitative measurements\n- Correlation analysis scripts and results\n- Visualization graphs showing the problem\n- Working implementations of various filtering approaches\n\n## Impact\n\nThis issue severely impacts the usability of SO-100 Follower robots for:\n\n- Teleoperation tasks\n- Data collection for machine learning\n- Precise manipulation requirements\n\nThe problem appears to be systemic rather than isolated to individual units, suggesting a configuration or design issue that affects the SO-100 platform generally.\n\n## Request for Assistance\n\nGiven the complexity of this issue and its impact on SO-100 usability, I would appreciate:\n\n1. Guidance on hardware-level debugging approaches\n2. Insights from other SO-100 users experiencing similar issues\n3. Potential firmware or configuration updates\n4. Recommendations for permanen",
    "url": "https://github.com/huggingface/lerobot/issues/1333",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-06-17T07:10:23Z",
    "updated_at": "2025-12-05T12:17:16Z",
    "user": "TKDRYU104"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 624,
    "title": "Interest in Parallel Model Training and Xformers Saving Support (Bug?) (SOLVED)",
    "body": "### Feature request\n\nI would like to request official support for xformers (link: https://github.com/facebookresearch/xformers) and parallel model training: https://huggingface.co/docs/transformers/v4.13.0/en/parallelism for the safetensor saving file format if this does not currently exist. This safetensors saving error may be a bug exclusive to my Diffusion-Transformer hybrid model architecture. \n\n### Motivation\n\nI had a problem when training a custom Diffusion-Transformer hybrid architecture with xformers and parallel model training. I tried to flatten the hybrid model for saving so the dimensions were what safetensors expected. However, the safetensors seem to require all the model training to reside in one place (and not parallel training). I believe that this may be a solvable error or bug? Thank you for your time. \n\n### Your contribution\n\nI am unsure how to suggest adding this feature into the safetensors project. ",
    "url": "https://github.com/huggingface/safetensors/issues/624",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-17T03:20:15Z",
    "updated_at": "2025-06-18T22:01:11Z",
    "comments": 1,
    "user": "viasky657"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1330,
    "title": "Could you update the repository to enable the evaluation of SmolVLA's performance?",
    "body": "Could you update the repository to enable the evaluation of SmolVLA's performance?",
    "url": "https://github.com/huggingface/lerobot/issues/1330",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-06-17T02:38:22Z",
    "updated_at": "2025-10-17T11:50:22Z",
    "user": "Pandapan01"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38851,
    "title": "Should `compute_metrics` only run on the main process when doing DDP?",
    "body": "Hi,  I want to know when doing training and evaluation on a multi-GPU setup (DDP using trainer and accelerate), does `compute_metrics` only need to be run on the main process?\n\nThe reason being that `trainer` itself already does `gather_for_metrics` ([here](https://github.com/huggingface/transformers/blob/v4.51-release/src/transformers/trainer.py#L4373)), which I suppose should collect all predictions (logits) and labels across processes, running `compute_metrics` from multiple processes again will be doing duplicated work, no?\n\nto add:\nI am using `batch_eval_metrics`, where I first spotted that if I run the training script (modified version of `run_clm.py`) with `accelerate launch`, the `compute_metrics` is always called multiple times, but the logits from `EvalPrediction` for each call is `per_device_eval_batch_size` * number of GPU I am using.",
    "url": "https://github.com/huggingface/transformers/issues/38851",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-17T00:09:43Z",
    "updated_at": "2025-07-25T08:02:33Z",
    "comments": 2,
    "user": "TIE666"
  },
  {
    "repo": "pytorch/xla",
    "number": 9371,
    "title": "Failing `torch_xla._XLAC._xla_custom_call()` with `RuntimeError: Bad StatusOr access: UNIMPLEMENTED: No registered implementation for custom call to my_lib.my_op.default for platform CUDA`",
    "body": "## \u2753 Questions and Help\n\nDuring execution of `torch_xla.stablehlo.exported_program_to_stablehlo()`, it fails with `RuntimeError: Bad StatusOr access: UNIMPLEMENTED: No registered implementation for custom call to my_lib.my_op.default for platform CUDA`. For more context, `my_op` is registered under a custom library as follows\n\n```python\nfrom torch.library import Library, impl\nfrom torch.library import impl_abstract\n\nMY_LIB = Library(\"my_lib\", \"DEF\")\n\nMY_LIB.define(\"my_op(Tensor t) -> Tensor\")\n\n\n@impl(f\"{MY_LIB.ns}::my_op\", \"default\")\ndef my_op(t):\n    return t\n\n\n@impl_abstract(f\"{MY_LIB.ns}::my_op\")\ndef my_op_meta(t):\n    return torch.empty_like(t)\n```\n\nI am able to get the torch ExportedProgram and the `MY_LIB` namespace is allowed in the stablehlo graph as a custom op by specifying \n```\nStableHLOExportOptions(\n    custom_ops_allowed_in_graph={MY_LIB.ns}\n)\n```\n\nIt **seems** to me that if XLA does not attempt to execute the graph then the error is not thrown. I have a few questions here:\n\n1. How can I get around this `RuntimeError`? \n2. Does registering a custom op under torch library (the way I did in the first code snippet) not expose the implementation to XLA?",
    "url": "https://github.com/pytorch/xla/issues/9371",
    "state": "open",
    "labels": [
      "bug",
      "stablehlo"
    ],
    "created_at": "2025-06-16T21:01:05Z",
    "updated_at": "2025-06-24T18:55:50Z",
    "comments": 4,
    "user": "hsjts0u"
  },
  {
    "repo": "pytorch/xla",
    "number": 9366,
    "title": "PyTorch/XLA custom Triton kernel export to StableHLO",
    "body": "I'd like to export a model to StableHLO with a simple custom Triton kernel. Following the [guide here](https://docs.pytorch.org/xla/master/features/triton.html) on Pytorch/XLA with custom GPU kernels. However, I am encountering errors with the [torch.export](https://docs.pytorch.org/xla/master/features/stablehlo.html) where it seems like it is unable to run tracing due to the existence of the custom operations. How can I properly export my model with custom GPU kernel to StableHLO?\n\nError:\n```\nTraceback (most recent call last):\n  File \"/root/test_code.py\", line 73, in <module>\n    exported = export(model, (x,y))\n  File \"/root/testing/lib64/python3.9/site-packages/torch/export/__init__.py\", line 270, in export\n    return _export(\n  File \"/root/testing/lib64/python3.9/site-packages/torch/export/_trace.py\", line 1017, in wrapper\n    raise e\n  File \"/root/testing/lib64/python3.9/site-packages/torch/export/_trace.py\", line 990, in wrapper\n    ep = fn(*args, **kwargs)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/export/exported_program.py\", line 114, in wrapper\n    return fn(*args, **kwargs)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/export/_trace.py\", line 1880, in _export\n    export_artifact = export_func(  # type: ignore[operator]\n  File \"/root/testing/lib64/python3.9/site-packages/torch/export/_trace.py\", line 1224, in _strict_export\n    return _strict_export_lower_to_aten_ir(\n  File \"/root/testing/lib64/python3.9/site-packages/torch/export/_trace.py\", line 1252, in _strict_export_lower_to_aten_ir\n    gm_torch_level = _export_to_torch_ir(\n  File \"/root/testing/lib64/python3.9/site-packages/torch/export/_trace.py\", line 560, in _export_to_torch_ir\n    gm_torch_level, _ = torch._dynamo.export(\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/eval_frame.py\", line 1432, in inner\n    result_traced = opt_f(*args, **kwargs)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/nn/modules/module.py\", line 1736, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/nn/modules/module.py\", line 1747, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/eval_frame.py\", line 465, in _fn\n    return fn(*args, **kwargs)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/nn/modules/module.py\", line 1736, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/nn/modules/module.py\", line 1747, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/convert_frame.py\", line 1269, in __call__\n    return self._torchdynamo_orig_callable(\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/convert_frame.py\", line 526, in __call__\n    return _compile(\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/convert_frame.py\", line 924, in _compile\n    guarded_code = compile_inner(code, one_graph, hooks, transform)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/convert_frame.py\", line 666, in compile_inner\n    return _compile_inner(code, one_graph, hooks, transform)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_utils_internal.py\", line 87, in wrapper_function\n    return function(*args, **kwargs)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/convert_frame.py\", line 699, in _compile_inner\n    out_code = transform_code_object(code, transform)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/bytecode_transformation.py\", line 1322, in transform_code_object\n    transformations(instructions, code_options)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/convert_frame.py\", line 219, in _fn\n    return fn(*args, **kwargs)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/convert_frame.py\", line 634, in transform\n    tracer.run()\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/symbolic_convert.py\", line 2796, in run\n    super().run()\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/symbolic_convert.py\", line 983, in run\n    while self.step():\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/symbolic_convert.py\", line 895, in step\n    self.dispatch_table[inst.opcode](self, inst)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/symbolic_convert.py\", line 582, in wrapper\n    return inner_fn(self, inst)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/symbolic_convert.py\", line 1692, in CALL_FUNCTION_KW\n    self.call_function(fn, args, kwargs)\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/symbolic_convert.py\", line 830, in call_function\n    self.push(fn.call_function(self, args, kwargs))  # type: ignore[arg-type]\n  File \"/root/testing/lib64/python3.9/site-packages/torch/_dynamo/variables/functions.py\",",
    "url": "https://github.com/pytorch/xla/issues/9366",
    "state": "open",
    "labels": [
      "enhancement",
      "xla:gpu",
      "Triton"
    ],
    "created_at": "2025-06-16T18:28:42Z",
    "updated_at": "2025-06-23T19:55:53Z",
    "comments": 4,
    "user": "annabellej"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1324,
    "title": "Where is control_robot.py script?",
    "body": "It is mentioned in the readme in the Walkthrough section that there is a script called control_robot.py. however, I can not see it in the main branch",
    "url": "https://github.com/huggingface/lerobot/issues/1324",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-16T15:57:34Z",
    "updated_at": "2025-06-18T11:06:11Z",
    "user": "AbdElRahmanFarhan"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 547,
    "title": "[QUESTION] Possible mistake in transformers size in terms of parameters",
    "body": "Hey,\n\nThanks for the great course!\n\nI have a question on what looks to me like an inconsistency.\nIn the [unit1/what-are-llms](https://huggingface.co/learn/agents-course/unit1/what-are-llms) section, when explaining the 3 types of transformers, in the Typical Size, we can see:\n\nDecoders:\nTypical Size: Billions (in the US sense, i.e., 10^9) of parameters\n\nSeq2Seq (Encoder\u2013Decoder)\nTypical Size: Millions of parameters\n\nIt looks strange to me that a Seq2Seq transformer, which comprises a Decoder within it, is smaller in Typical Size than a plain Decoders.\n\nI would put\n\nSeq2Seq (Encoder\u2013Decoder)\nTypical Size: Billions (in the US sense, i.e., 10^9) of parameters\n\nPlease tell me if there is something I misunderstood !\n\n\n",
    "url": "https://github.com/huggingface/agents-course/issues/547",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-16T14:43:29Z",
    "updated_at": "2025-06-16T14:43:29Z",
    "user": "jonoillar"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1341,
    "title": "FireFox compatible models",
    "body": "### Question\n\nI am fairly new to everything here and kind of just vibe code while I learn JS, but I use Zen browser and enjoy making it more like Arc over my summer. I was wondering if it was possible to expose the native Firefox AI and be able to prompt it, which I was able to do [here](https://github.com/Anoms12/Firefox-AI-Testing.uc.mjs). I discovered the models through some [documentation](https://github.com/mozilla-firefox/firefox/blob/901f6ff7b2ead5c88bd4d5e04aa5b30f2d2f1abb/toolkit/components/ml/docs/models.rst) Copilot brought me to in Firefox, and all of the models seem to be from you. However, the prompts I am trying to feed it seem to be too advanced for the current models I am using, Xenova/LaMini-Flan-T5-248M (I also tried out base, and models below it, but anything higher than 783M seemed to require access I did not have). I was wondering if you knew of/had a good model for this prompt. If not, I would love to be pointed in the right direction with any knowledge you do have.\n\n```\nAnalyze the following numbered list of tab data (Title, URL, Description) and assign a concise category (1-2 words, Title Case) for EACH tab.\n                  Some tabs might logically belong to groups already present based on common domains or topics identified by keywords.\n                  \n                  Tab Categorization Strategy:\n                  1. For well-known platforms (GitHub, YouTube, Reddit, etc.), use the platform name as the category.\n                  2. For content sites, news sites, or blogs, PRIORITIZE THE SEMANTIC MEANING OF THE TITLE over the domain.\n                  3. Look for meaningful patterns and topics across titles to create logical content groups.\n                  4. Use the domain name only when it's more relevant than the title content or when the title is generic.\n                  \n                  BE CONSISTENT: Use the EXACT SAME category name for tabs belonging to the same logical group.\n\n                  Input Tab Data:\n                  {TAB_DATA_LIST}\n\n                  ---\n                  Instructions for Output:\n                  1. Output ONLY the category names.\n                  2. Provide EXACTLY ONE category name per line.\n                  3. The number of lines in your output MUST EXACTLY MATCH the number of tabs in the Input Tab Data list above.\n                  4. DO NOT include numbering, explanations, apologies, markdown formatting, or any surrounding text like \"Output:\" or backticks.\n                  5. Just the list of categories, separated by newlines.\n                  ---\n\n                  Output:\n```\n\nIf it was not clear, it is for a tab grouping script, the community currently has an Ollama, Gemini, and Mistral version, but we want to make it as easy as possible, so this seemed like the next logical step.\n\nThank you for anything you can provide in advance. I love the project.",
    "url": "https://github.com/huggingface/transformers.js/issues/1341",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-16T12:43:39Z",
    "updated_at": "2025-06-16T12:47:44Z",
    "user": "12th-devs"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1319,
    "title": "How to debug or inspect the health of Feetech servos in so101 setup?",
    "body": "Hi, I'm working with the `so101` robot and running into issues with the Feetech servos.\n\nI would like to ask:\n\n1. Are there any recommended tools or procedures for debugging Feetech servos?\n2. How can I check the health of a servo (e.g. temperature, load, internal error)?\n\nAny help or pointers would be greatly appreciated. Thanks!",
    "url": "https://github.com/huggingface/lerobot/issues/1319",
    "state": "open",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-06-16T08:58:32Z",
    "updated_at": "2025-08-12T10:01:41Z",
    "user": "DIMARIA123"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1318,
    "title": "How to use my own dataset to train pi0 or smolVLA",
    "body": "I have a dataset that I collected and converted to Lerobot format. This dataset has not been uploaded to huggingface. I want to use this dataset to train `pi0` or `smolvla`. How should I set it up?\n\nI have tried to use only `dataset.root`, but it prompts that `dataset.repo_id` needs to be entered. What should I do?",
    "url": "https://github.com/huggingface/lerobot/issues/1318",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-06-16T08:40:50Z",
    "updated_at": "2025-10-17T11:51:54Z",
    "user": "xliu0105"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1316,
    "title": "[Question] SmolVLA LIBERO / MetaWorld evaluation",
    "body": "Hello, thank you for open sourcing this wonderful repository. I have read the SmolVLA paper impressively and tried to run some evaluations.\n\n![Image](https://github.com/user-attachments/assets/fa20ea69-c60f-467f-ba4a-30c492a7faad)\n\nIn Section 4.5 of the paper, under Simulation Evaluation, it seems that you have fine-tuned the SmolVLA baseline to the Franka Emika Panda and the Swayer arm to perform evaluation on the LIBERO and MetaSim benchmark respectively.\nCould you elaborate on the details of the fine-tuning process? (which parameters were trained/frozen, optimizer, gradient steps, etc..)\nI am planning to reproduce the results. \n\nThank you.",
    "url": "https://github.com/huggingface/lerobot/issues/1316",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "simulation"
    ],
    "created_at": "2025-06-16T06:28:50Z",
    "updated_at": "2025-12-10T22:11:17Z",
    "user": "tykim0507"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 546,
    "title": "[QUESTION] Can i solve this final assignment with free versions?",
    "body": "First, the **best way to get a response fast is to ask the community** in our Discord server: https://www.hf.co/join/discord\n\nHowever, if you prefer, you can ask here, please **be specific**.\n\nI like to solve the final assignment, but I failed with free tools. I try to take inspiration from leaderboard toppers; they used paid tools, but I can't pay for that. Any free roadmap or idea?\n",
    "url": "https://github.com/huggingface/agents-course/issues/546",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-16T06:13:37Z",
    "updated_at": "2025-06-16T06:13:37Z",
    "user": "mehdinathani"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7617,
    "title": "Unwanted column padding in nested lists of dicts",
    "body": "```python\nfrom datasets import Dataset\n\ndataset = Dataset.from_dict({\n    \"messages\": [\n        [\n            {\"a\": \"...\",},\n            {\"b\": \"...\",},\n        ],\n    ]\n})\nprint(dataset[0])\n```\n\nWhat I get:\n```\n{'messages': [{'a': '...', 'b': None}, {'a': None, 'b': '...'}]}\n```\n\nWhat I want:\n\n```\n{'messages': [{'a': '...'}, {'b': '...'}]}\n```\n\nIs there an easy way to automatically remove these auto-filled null/none values?\n\nIf not, I probably need a recursive none exclusion function, don't I?\n\nDatasets 3.6.0",
    "url": "https://github.com/huggingface/datasets/issues/7617",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-15T22:06:17Z",
    "updated_at": "2025-06-16T13:43:31Z",
    "comments": 1,
    "user": "qgallouedec"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1301,
    "title": "Slow checkpoint saving time (6 mins to save an 8B model checkpoint in sync mode)",
    "body": "It takes ~6 minutes to save a checkpoint using non async mode. Is this expected? \n\n### Sync mode\n\n```\n[rank0]:[titan] 2025-06-15 21:31:48,968 - root - INFO - TensorBoard logging enabled. Logs will be saved at ./outputs/tb/20250615-2131 \n[rank0]:[titan] 2025-06-15 21:31:48,969 - root - INFO - CUDA capacity: NVIDIA H100 80GB HBM3 with 79.10GiB memory                     \n[rank0]:[titan] 2025-06-15 21:31:49,083 - root - INFO - Model llama3 8B size: 8,030,261,248 total parameters                          \n[rank0]:[titan] 2025-06-15 21:31:49,084 - root - INFO - Applied full activation checkpointing to the model                            \n[rank0]:[titan] 2025-06-15 21:31:49,164 - root - INFO - Applied FSDP to the model                                                     \n[rank0]:[titan] 2025-06-15 21:31:49,505 - root - INFO - Peak FLOPS used for computing MFU: 9.890e+14                                  \n[rank0]:[titan] 2025-06-15 21:31:49,505 - root - INFO - CUDA memory usage for model: 3.95GiB(4.99%)                                   \n[rank0]:[titan] 2025-06-15 21:31:49,535 - root - INFO - Checkpointing active. Checkpoints will be loaded from and saved to ./outputs/c\nheckpoint                                                                                                                             \n[rank0]:[titan] 2025-06-15 21:31:49,535 - root - INFO - Trainer is initialized with local batch size 1, global batch size 64, gradient\n accumulation steps 8, sequence length 8192, total steps 1000 (warmup 40).                                                            \n[rank0]:[titan] 2025-06-15 21:31:49,535 - root - INFO - Loading the checkpoint from assets/models/dcp/llama3.1-8B.                    \n[rank0]:[titan] 2025-06-15 21:32:02,935 - root - INFO - [GC] GC collection for checkpoint loading. 0.01 seconds.                      \n[rank0]:[titan] 2025-06-15 21:32:02,935 - root - INFO - Finished loading the checkpoint in 13.40 seconds.                             \n[rank0]:[titan] 2025-06-15 21:32:02,935 - root - INFO - Training starts at step 1.                                                    \n[rank0]:[titan] 2025-06-15 21:32:15,816 - root - INFO - step:  1  loss:  2.4292  memory: 29.18GiB(36.90%)  tps: 2,452  tflops: 141.98 \n mfu: 14.36%                                                                                                                          \n[rank0]:[titan] 2025-06-15 21:32:15,816 - root - INFO - Saving the checkpoint (or staging if async is enabled).                       \n[rank0]:[titan] 2025-06-15 21:38:31,430 - root - INFO - [GC] GC collection invoked by checkpointer. 0.04 seconds.                     \n[rank0]:[titan] 2025-06-15 21:38:31,431 - root - INFO - Finished saving the checkpoint (or staging if async is enabled)in 375.61 secon\nds.                                                                                                                                   \n[rank0]:[titan] 2025-06-15 21:38:31,431 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40          \n[rank0]:[titan] 2025-06-15 21:40:09,439 - root - INFO - step: 10  loss:  2.3602  memory: 36.65GiB(46.33%)  tps: 1,245  tflops: 72.12  \nmfu: 7.29%  \n```\n\n## Async mode:\n\n```\nrank0]:[titan] 2025-06-15 21:44:35,889 - root - INFO - step:  1  loss:  2.4292  memory: 29.18GiB(36.90%)  tps: 2,327  tflops: 134.74  mfu: 13.62%\n[rank0]:[titan] 2025-06-15 21:44:35,890 - root - INFO - Saving the checkpoint (or staging if async is enabled).\n[rank0]:[titan] 2025-06-15 21:44:35,898 - root - INFO - [GC] GC collection invoked by checkpointer. 0.01 seconds.\n[rank0]:[titan] 2025-06-15 21:44:47,661 - root - INFO - [GC] GC collection invoked by checkpointer. 0.00 seconds.\n[rank0]:[titan] 2025-06-15 21:44:47,672 - root - INFO - Finished saving the checkpoint (or staging if async is enabled)in 11.78 seconds.\n[rank0]:[titan] 2025-06-15 21:44:47,672 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40\n[rank0]:/home/ubuntu/code/thirdparty/torchtitan/.venv/lib/python3.13/site-packages/torch/distributed/checkpoint/filesystem.py:111: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly.  To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()\n[rank0]:  if tensor.storage().size() != tensor.numel():\n[rank0]:[titan] 2025-06-15 21:46:26,319 - root - INFO - step: 10  loss:  2.3601  memory: 36.64GiB(46.33%)  tps: 5,341  tflops: 309.34  mfu: 31.28%\n```\n\n\n\nReproduction: check out https://github.com/pytorch/torchtitan/pull/1300 and run\n\n```\nCONFIG_FILE=\"./torchtitan/models/llama3/train_configs/llama3_8b.toml\" uv run ./run_train.sh \\\n  --model.tokenizer_path assets/tokenizer/Meta-Llama-3.1-8B-tokenizer.model \\\n  --training.max_seq_len 131072 \\\n  --checkpoint.initial_load_path \"assets/models/dcp/llama3.1-8B\" \\\n  --profiling.no_enable",
    "url": "https://github.com/pytorch/torchtitan/issues/1301",
    "state": "closed",
    "labels": [
      "question",
      "module: checkpoint"
    ],
    "created_at": "2025-06-15T21:42:47Z",
    "updated_at": "2025-06-23T16:34:52Z",
    "user": "vwxyzjn"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1340,
    "title": "Audio-to-Audio task",
    "body": "### Question\n\nHi there.\n\nI would like to know how running **Audio-to-Audio models** with _transformers.js_.\n\nI haven't success to found any material about this. If has no way, is there some schedule to adds this?\n\nThanks!",
    "url": "https://github.com/huggingface/transformers.js/issues/1340",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-15T17:58:54Z",
    "updated_at": "2025-10-13T04:45:39Z",
    "user": "LuSrodri"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 677,
    "title": "Error from E2B executor: cannot access local variable 'sandbox' where it is not associated with a value",
    "body": "Hi there,\n\nI encountered a bug while following the sandbox setup instructions exactly as provided. Here\u2019s what I\u2019m seeing:\n\n![Image](https://github.com/user-attachments/assets/b0bebd84-00cb-469d-a73e-dbf9f91555f3)\n\nHas anyone experienced this before? Any advice on how to resolve it would be greatly appreciated!\n\nThank you. : )",
    "url": "https://github.com/huggingface/open-r1/issues/677",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-14T19:08:22Z",
    "updated_at": "2025-07-22T06:55:38Z",
    "user": "juyongjiang"
  },
  {
    "repo": "pytorch/examples",
    "number": 1355,
    "title": "`language_translation` has typo which make loaded tgt tensor invalid",
    "body": "for `_yield_token` implementation in `src/data.py`, the third argument `src` expected to be `True` or `False`\n```\n# Turns an iterable into a generator\ndef _yield_tokens(iterable_data, tokenizer, src):\n\n    # Iterable data stores the samples as (src, tgt) so this will help us select just one language or the other\n    index = 0 if src else 1\n\n    for data in iterable_data:\n        yield tokenizer(data[index])\n```\n\nBut the actual used argument is `str` (e.g. 'de' or 'en'), which will make `_yield_tokens` always construct `tgt` vocab from `src` tokens, so the loaded tgt tensor was wrong\n```\n    tgt_vocab = build_vocab_from_iterator(\n        _yield_tokens(train_iterator, tgt_tokenizer, tgt_lang), <-- tgt_lang is 'de' or 'en'\n        min_freq=1,\n        specials=list(special_symbols.keys()),\n        special_first=True\n```\n\nexample of wrong tgt tensor, too much `0` values (which means `unknown`)\n```\ntensor([[   2,    2,    2,    2,    2,    2,    2,    2],\n        [   0,    0,    0,    0,    0,    0,    0,    0],\n        [   0,    0,    0,    0,    0,    0,    0,    0],\n        [   0,    0,    0,    7,    0,    7,    0,    0],\n        [   0,    0,    0,    0, 3425,    0,    0,    0],\n        [   0,    0,    7,    0,    0,    0,    0,    0],\n        [   0,    0,    0,    0,    0,    0,    0,    0],\n        [   0,    0,    0,    0,    0,    0,   28,    0],\n        [   7,    5,    0,    0,    0,   15,    5,    0],\n        [   0,    3,    0,    0,    0,    0,    3,    0],\n        [   0,    1,    5,    0,    5,    0,    1,    0],\n        [   0,    1,    3,    0,    3,    0,    1, 5315],\n        [   0,    1,    1,    0,    1,    0,    1,    0],\n        [   5,    1,    1,    0,    1,    0,    1,    0],\n        [   3,    1,    1,    0,    1,    0,    1,    5],\n        [   1,    1,    1,    5,    1,    0,    1,    3],\n        [   1,    1,    1,    3,    1,    5,    1,    1],\n        [   1,    1,    1,    1,    1,    3,    1,    1]], device='cuda:0')\n```",
    "url": "https://github.com/pytorch/examples/issues/1355",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-14T12:13:35Z",
    "updated_at": "2025-06-16T13:55:52Z",
    "comments": 0,
    "user": "zwzmzd"
  },
  {
    "repo": "pytorch/xla",
    "number": 9356,
    "title": "Transition torch_xla::ShardingSec to torch_xla::OpSharding",
    "body": "This is primarily for the sake of documentation and consistency.",
    "url": "https://github.com/pytorch/xla/issues/9356",
    "state": "open",
    "labels": [
      "distributed",
      "documentation"
    ],
    "created_at": "2025-06-13T23:07:34Z",
    "updated_at": "2025-06-13T23:07:34Z",
    "comments": 0,
    "user": "pgmoka"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3571,
    "title": "\u2753 [Question] Can I export a serialized engine from Torch-TensorRT targeting TensorRT 10.3.0.26?",
    "body": "## \u2753 Question\n\nHello, I am attempting to export a serialized engine from Torch-TRT. I require TensorRT version 10.3.0.26, as I am planning to use this engine with a Nvidia DeepStream container that requires that TensorRT version. I attempted to use torch-tensorrt==2.5.0, but this version is listed as using builtin TensorRT version 10.3.0, and did not work with the container. How would you recommend generating this .engine for this specific TensorRT version? Unfortunately, I cannot just use trtexec as the outputs of the trtexec model are incorrect.\n\nI am assuming probably building from source, but the documentation at https://docs.pytorch.org/TensorRT/getting_started/installation.html appears a bit outdated, as there is no longer any WORKSPACE file as referenced in that install guide. Please advise, thank you!\n\n## Environment\n\nContainer to be used on: https://catalog.ngc.nvidia.com/orgs/nvidia/containers/deepstream (deepstream-7.1-multiarch)\n\n - PyTorch Version (e.g., 1.0): Any. I have tested 2.4/2.5/2.5.1.\n - CPU Architecture: x86\n - OS (e.g., Linux): Ubuntu 22.04\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\n - Build command you used (if compiling from source): NA\n - Are you using local sources or building from archives: NA\n - Python version: 3.10\n - CUDA version: 12.6\n - GPU models and configuration: A sample model can be found here: https://drive.google.com/file/d/1NukSOFFQwVGhZh6VrasjMBiKnLL8CHM9/view?usp=sharing\n - Any other relevant information:\n\n## Additional context\n\n<!-- Add any other context about the problem here. -->\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3571",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-13T16:44:40Z",
    "updated_at": "2025-06-16T20:06:15Z",
    "user": "geiche735"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1291,
    "title": "Using official HuggingFace script to convert DCP weights to HF format\uff0cthe outputs are not human-readable",
    "body": "DCP -> torch (in PyTorch, see https://github.com/pytorch/torchtitan/blob/main/docs/checkpoint.md)\ntorch -> HF (from [HF](https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/convert_llama_weights_to_hf.py), although missing params.json if saved from DCP)[](url)\n\n![Image](https://github.com/user-attachments/assets/7c480739-4248-4be3-ac7f-69c9d098937d)\n\n\nDoes anyone have a working convert script or know how to fix this issue?",
    "url": "https://github.com/pytorch/torchtitan/issues/1291",
    "state": "closed",
    "labels": [
      "module: checkpoint"
    ],
    "created_at": "2025-06-13T03:11:23Z",
    "updated_at": "2025-07-02T07:18:01Z",
    "comments": 7,
    "user": "guang11644331"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 536,
    "title": "[QUESTION]  Llama-3.3-70B-Instruct model request denied",
    "body": " My request was denied for access to Llama-3.3-70B-Instruct model. However, it was accepted for the Llama 4 models. Is it possible that meta is limiting access after the release of Llama 4 in April?\n\nCould the course be updated to reflect this change?",
    "url": "https://github.com/huggingface/agents-course/issues/536",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-12T00:29:48Z",
    "updated_at": "2025-06-12T00:29:48Z",
    "user": "BookDisorder"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1283,
    "title": "KV Replication for context parallel (Ring attention)",
    "body": "Hi,\n\nFor the llama3-8b model (which has GQA, with num_kv_heads=8, num_heads=32), I see the KV replication being done inside the Attention module in model.py\n\nWill this lead to additional communication volume for ring attention (with passKV) wherein we'll be circulating 32 heads instead of 8?\n\nAfaik flash attention kernels support GQA internally (ie, it accepts QKV with num_kv_heads < num_q_heads), so can we omit the KV replication in the attention module?\n\nThanks!",
    "url": "https://github.com/pytorch/torchtitan/issues/1283",
    "state": "open",
    "labels": [
      "question",
      "module: context parallel"
    ],
    "created_at": "2025-06-11T22:18:04Z",
    "updated_at": "2025-06-12T16:08:59Z",
    "user": "rghadia"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1339,
    "title": "Model is cached, but still reloads from network?",
    "body": "### Question\n\nI have this code in a React project : \n```\nimport { env, pipeline } from \"@xenova/transformers\";\nconst model = await pipeline(\"translation\", \"Xenova/opus-mt-de-en\");\nlet transText = await model(\"hallo, ich bin hier\");\n```\n\nWhen I inspect the browser cache, I see relevant files in \"cache storage\".   (xenova-opus-mt-de-en...)\nBut when I reload the network says I am re-downloading it each time from cdn.jsdeliver.net \n\nHow can I get it to grab the cached version instead of do a network request?",
    "url": "https://github.com/huggingface/transformers.js/issues/1339",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-11T16:19:26Z",
    "updated_at": "2025-06-27T06:06:25Z",
    "user": "patrickinminneapolis"
  },
  {
    "repo": "huggingface/peft",
    "number": 2583,
    "title": "Lora transfer learning",
    "body": "Hello, I am training a lora model using flux fill pipeline using diffusers+peft+accelerate. I already have a lora model for general purpose for my application which was trained for 5k steps and large dataset. Now, I want to do transfer learning to finetune on very small dataset but want to train from previous lora model instead of scratch training. how can I do it? My lora config is as following. Currently I am using `gaussian` method to initialize lora model. Is there anyway to use pretrained lora model without random initialize? Thanks in advance. \n\n```\n  lora_config:\n    r: 256\n    lora_alpha: 256\n    init_lora_weights: \"gaussian\"\n    target_modules: \"(.*x_embedder|.*(?<!single_)transformer_blocks\\\\.[0-9]+\\\\.norm1\\\\.linear|.*(?<!single_)transformer_blocks\\\\.[0-9]+\\\\.attn\\\\.to_k|.*(?<!single_)transformer_blocks\\\\.[0-9]+\\\\.attn\\\\.to_q|.*(?<!single_)transformer_blocks\\\\.[0-9]+\\\\.attn\\\\.to_v|.*(?<!single_)transformer_blocks\\\\.[0-9]+\\\\.attn\\\\.to_out\\\\.0|.*(?<!single_)transformer_blocks\\\\.[0-9]+\\\\.ff\\\\.net\\\\.2|.*single_transformer_blocks\\\\.[0-9]+\\\\.norm\\\\.linear|.*single_transformer_blocks\\\\.[0-9]+\\\\.proj_mlp|.*single_transformer_blocks\\\\.[0-9]+\\\\.proj_out|.*single_transformer_blocks\\\\.[0-9]+\\\\.attn.to_k|.*single_transformer_blocks\\\\.[0-9]+\\\\.attn.to_q|.*single_transformer_blocks\\\\.[0-9]+\\\\.attn.to_v|.*single_transformer_blocks\\\\.[0-9]+\\\\.attn.to_out)\"\n\n```",
    "url": "https://github.com/huggingface/peft/issues/2583",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-11T12:00:25Z",
    "updated_at": "2025-07-20T15:04:05Z",
    "comments": 4,
    "user": "hardikdava"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38750,
    "title": "Is it a good choice to early error when `output_attentions=True` and attn implementation not equal to `eager`",
    "body": "### System Info\n\nBefore this PR [38288](https://github.com/huggingface/transformers/pull/38288), the program will run smoothly even when we set `output_attentions=True` and the attn implementation is not `eager`, as it will fallback to use eager mode, after this PR, it will throw error directly: [L342](https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L342). I think it would be better if we just throw a warning and fallback to `eager` attn. Is it possible to revert it back or make small direct change based on this PR?\n\n### Who can help?\n\n@ArthurZucker \n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nN/A\n\n### Expected behavior\n\nWe want to make sure program can run without crash even we set `output_attentions=True` and attn implementation not equal to `eager`",
    "url": "https://github.com/huggingface/transformers/issues/38750",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-11T11:05:48Z",
    "updated_at": "2025-06-25T08:00:06Z",
    "comments": 2,
    "user": "kaixuanliu"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1262,
    "title": "use smolVLA, How to know the current task is completed",
    "body": "I use smolVLA to do a wiping task, it will keep doing the task again and again, how to judge the task is completed, thank you",
    "url": "https://github.com/huggingface/lerobot/issues/1262",
    "state": "open",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-06-11T08:48:03Z",
    "updated_at": "2025-08-12T10:04:14Z",
    "user": "haoyankai"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1338,
    "title": "Question about supporting Float16Array",
    "body": "### Question\n\nI am trying transformers.js with WebGPU. The performance is great, but I found that transformers.js returns a Float32Array where the model is quantized to `fp16`:\n\n```javascript\nconst extractor = await pipeline(\n    \"feature-extraction\",\n    \"bge-small-zh-v1.5\",\n    {\n        device: \"webgpu\",\n        dtype: \"fp16\",\n        local_files_only: true,\n    },\n);\n// ...\nconst embeddings = await extractor(texts, {pooling: \"mean\", normalize: true});\nconsole.log(embeddings.data);\n// -> Float32Array(5120000)\u00a0[...]\n```\n\nSince the model itself has only 16-bit precision, returning a Float32Array (instead of [Float16Array](https://caniuse.com/mdn-javascript_builtins_float16array) that is supported in latest browsers) seems a waste of performance. Is this comment correct, and do we have plans to support Float16Array for better performance? Thanks!",
    "url": "https://github.com/huggingface/transformers.js/issues/1338",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-11T07:29:19Z",
    "updated_at": "2025-07-03T05:50:56Z",
    "user": "xmcp"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38745,
    "title": "[Bug][InformerForPredict] The shape will cause a problem",
    "body": "### System Info\n\nWhen I set the infomerconfig.input_size = 1, I find a bug, but I don't know how to fix it.\n\n- Function Name : `create_network_inputs`\n```\ntime_feat = (\n            torch.cat(\n                (\n                    past_time_features[:, self._past_length - self.config.context_length :, ...],\n                    future_time_features,\n                ),\n                dim=1,\n            )\n            if future_values is not None\n            else past_time_features[:, self._past_length - self.config.context_length :, ...]\n        )\n\n        print(self._past_length)\n        # target\n        if past_observed_mask is None:\n            past_observed_mask = torch.ones_like(past_values)\n\n        context = past_values[:, -self.config.context_length :]\n        observed_context = past_observed_mask[:, -self.config.context_length :]\n        _, loc, scale = self.scaler(context, observed_context)\n\n        inputs = (\n            (torch.cat((past_values, future_values), dim=1) - loc) / scale\n            if future_values is not None\n            else (past_values - loc) / scale\n        )\n        print(loc.shape, scale.shape, inputs.shape)\n\n        # static features\n        log_abs_loc = loc.abs().log1p() if self.config.input_size == 1 else loc.squeeze(1).abs().log1p()\n        log_scale = scale.log() if self.config.input_size == 1 else scale.squeeze(1).log()\n        print(f\"log_abs_loc: {log_abs_loc.shape}, {log_scale.shape}\")\n        print(time_feat.shape, self.config.input_size)\n        static_feat = torch.cat((log_abs_loc, log_scale), dim=1)\n        print(time_feat.shape, static_feat.shape)\n        if static_real_features is not None:\n            static_feat = torch.cat((static_real_features, static_feat), dim=1)\n        if static_categorical_features is not None:\n            embedded_cat = self.embedder(static_categorical_features)\n            static_feat = torch.cat((embedded_cat, static_feat), dim=1)\n        print(time_feat.shape, static_feat.shape)\n        expanded_static_feat = static_feat.unsqueeze(1).expand(-1, time_feat.shape[1], -1)\n\n        # all features\n        features = torch.cat((expanded_static_feat, time_feat), dim=-1)\n\n        # lagged features\n        subsequences_length = (\n            self.config.context_length + self.config.prediction_length\n            if future_values is not None\n            else self.config.context_length\n        )\n        lagged_sequence = self.get_lagged_subsequences(sequence=inputs, subsequences_length=subsequences_length)\n        lags_shape = lagged_sequence.shape\n        reshaped_lagged_sequence = lagged_sequence.reshape(lags_shape[0], lags_shape[1], -1)\n\n        if reshaped_lagged_sequence.shape[1] != time_feat.shape[1]:\n            raise ValueError(\n                f\"input length {reshaped_lagged_sequence.shape[1]} and time feature lengths {time_feat.shape[1]} does not match\"\n            )\n\n        # transformer inputs\n        transformer_inputs = torch.cat((reshaped_lagged_sequence, features), dim=-1)\n\n        return transformer_inputs, loc, scale, static_feat\n```\n\nAs we can see, I add some `print` sentence in the library to see the shape, now the bug is:\n```\nTraceback (most recent call last):\n  File \"/home/wjt/luck/FinalWork/alert_models/informer_based_model_3_cpu.py\", line 820, in <module>\n    pipline.train_model()\n  File \"/home/wjt/luck/FinalWork/alert_models/informer_based_model_3_cpu.py\", line 466, in train_model\n    outputs = model(\n  File \"/home/wjt/.conda/envs/luckluck/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n  File \"/home/wjt/.conda/envs/luckluck/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/home/wjt/.conda/envs/luckluck/lib/python3.9/site-packages/transformers/models/informer/modeling_informer.py\", line 1844, in forward\n    outputs = self.model(\n  File \"/home/wjt/.conda/envs/luckluck/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n  File \"/home/wjt/.conda/envs/luckluck/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/home/wjt/.conda/envs/luckluck/lib/python3.9/site-packages/transformers/models/informer/modeling_informer.py\", line 1568, in forward\n    transformer_inputs, loc, scale, static_feat = self.create_network_inputs(\n  File \"/home/wjt/.conda/envs/luckluck/lib/python3.9/site-packages/transformers/models/informer/modeling_informer.py\", line 1386, in create_network_inputs\n    expanded_static_feat = static_feat.unsqueeze(1).expand(-1, time_feat.shape[1], -1)\nRuntimeError: expand(torch.cuda.FloatTensor{[32, 1, 2, 1]}, size=[-1, 27, -1]): the number of sizes provided (3) must be greater or equal to the number of dimensions in the tensor (4)\n```\n- First\n```\nlog_abs_loc = loc.abs().log1p() if self.config.input",
    "url": "https://github.com/huggingface/transformers/issues/38745",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-11T07:22:06Z",
    "updated_at": "2025-07-20T11:41:45Z",
    "comments": 11,
    "user": "2004learner"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38740,
    "title": "[DOCS] Add `pruna` as optimization framework",
    "body": "### Feature request\n\nHave a section on Pruna AI within the documentation. We did [a similar PR for diffusers](https://github.com/huggingface/diffusers/pull/11688) and thought it would be nice to show how to optimize transformers models too. \n.\n\n### Motivation\n\nHave a section on Pruna AI within the documentation to show how to optimize LLMs for inference.\n\n### Your contribution\n\nWe could do everything for the PR.",
    "url": "https://github.com/huggingface/transformers/issues/38740",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-06-11T04:52:33Z",
    "updated_at": "2025-07-16T08:56:52Z",
    "comments": 8,
    "user": "davidberenstein1957"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3390,
    "title": "How to create a customized model architecture that fits sentence-transformer's training framework?",
    "body": "I'd like to train a two tower model that takes categorical features, floats features in one tower, and the other tower just encodes a document using an out of the box embedding.  Then the outputs from both towers are feed into sentence transformers loss function.  All the training configuration should reuse sentence transformer's setup (loss function implementation, Training Arguments, etc) as much as possible.  \n\nIs this even feasible?  Skimmed through the document found this page here (https://www.sbert.net/docs/sentence_transformer/usage/custom_models.html#structure-of-sentence-transformer-models), but the example on this page seems to be creating a new module, but only as part of a purely sequential models, each connected to its next. \n\nMuch appreciated! ",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3390",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-11T03:07:42Z",
    "updated_at": "2025-06-12T05:05:54Z",
    "user": "HuangLED"
  },
  {
    "repo": "pytorch/examples",
    "number": 1353,
    "title": "tensor_parallel_example.py and sequence_parallel_example.py",
    "body": "The primary  difference between the two files are as follows.   The TP case , only see 1 allreduce per iteration - is that  what is expected ?  Seems to be same as DDP ! In the SP case,  see 1 allgather and 1 reduce -scatter per iteration. \n\n```\n# Custom parallelization plan for the model\nsp_model = parallelize_module(\n    module=model,\n    device_mesh=device_mesh,\n    parallelize_plan={\n        \"in_proj\": ColwiseParallel(input_layouts=Shard(0)),\n        \"out_proj\": RowwiseParallel(output_layouts=Shard(0)),\n    },\n)\n\n# Custom parallelization plan for the model\ntp_model = parallelize_module(\n    module=tp_model,\n    device_mesh=device_mesh,\n    parallelize_plan={\n        \"in_proj\": ColwiseParallel(),\n        \"out_proj\": RowwiseParallel(),\n    },\n)\n```\n\nCommDebugMode also appears to show  1 allreduce in fwd and no allreduce in bwd. \n\n```\n  FORWARD PASS                                                                                                                                                                                                                 [12/1864]\n    *c10d_functional.all_reduce: 1\n  BACKWARD PASS\n    ToyModel\n    *module type: class '__main__.ToyModel'\n      FORWARD PASS\n        *c10d_functional.all_reduce: 1\n        ToyModel.in_proj\n        *module type: class 'torch.nn.modules.linear.Linear'\n        *Parameter List\n         *weight: (Shard(dim=0),)\n         *bias: (Shard(dim=0),)\n          FORWARD PASS\n            **aten.addmm.default\n              shape: [torch.Size([32]), torch.Size([4, 10]), torch.Size([10, 32])]\n              sharding: [(Shard(dim=0),), (Replicate(),), (Shard(dim=1),)]\n              device mesh: DeviceMesh('cuda', [0, 1, 2, 3])\n          BACKWARD PASS\n            **aten.mm.default\n              shape: [torch.Size([32, 4]), torch.Size([4, 10])]\n              sharding: [(Shard(dim=0),), (Replicate(),)]\n              device mesh: DeviceMesh('cuda', [0, 1, 2, 3])\n            **aten.sum.dim_IntList\n              shape: [torch.Size([4, 32])]\n              sharding: [(Shard(dim=1),)]\n              device mesh: DeviceMesh('cuda', [0, 1, 2, 3])\n            **aten.add_.Tensor\n              shape: [torch.Size([32]), torch.Size([32])]\n              sharding: [(Shard(dim=0),), (Shard(dim=0),)]\n              device mesh: DeviceMesh('cuda', [0, 1, 2, 3])\n            **aten.add_.Tensor\n              shape: [torch.Size([32, 10]), torch.Size([32, 10])]\n              sharding: [(Shard(dim=0),), (Shard(dim=0),)]\n              device mesh: DeviceMesh('cuda', [0, 1, 2, 3])\n        ToyModel.relu\n        *module type: class 'torch.nn.modules.activation.ReLU'\n          FORWARD PASS\n          BACKWARD PASS\n        ToyModel.out_proj\n        *module type: class 'torch.nn.modules.linear.Linear'\n        *Parameter List\n         *weight: (Shard(dim=1),)\n         *bias: (Replicate(),)\n          FORWARD PASS\n            *c10d_functional.all_reduce: 1\n            **aten.addmm.default\n              shape: [torch.Size([5]), torch.Size([4, 32]), torch.Size([32, 5])]\n              sharding: [(Replicate(),), (Shard(dim=1),), (Shard(dim=0),)]\n              device mesh: DeviceMesh('cuda', [0, 1, 2, 3])\n          BACKWARD PASS\n            **aten.mm.default\n              shape: [torch.Size([4, 5]), torch.Size([5, 32])]\n              sharding: [(Replicate(),), (Shard(dim=1),)]\n              device mesh: DeviceMesh('cuda', [0, 1, 2, 3])\n            **aten.mm.default\n              shape: [torch.Size([5, 4]), torch.Size([4, 32])]\n              sharding: [(Replicate(),), (Shard(dim=1),)]\n              device mesh: DeviceMesh('cuda', [0, 1, 2, 3])\n            **aten.sum.dim_IntList\n              shape: [torch.Size([4, 5])]\n              sharding: [(Replicate(),)]\n              device mesh: DeviceMesh('cuda', [0, 1, 2, 3])\n            **aten.add_.Tensor\n              shape: [torch.Size([5]), torch.Size([5])]\n              sharding: [(Replicate(),), (Replicate(),)]\n              device mesh: DeviceMesh('cuda', [0, 1, 2, 3])\n            **aten.add_.Tensor\n              shape: [torch.Size([5, 32]), torch.Size([5, 32])]\n              sharding: [(Shard(dim=1),), (Shard(dim=1),)]\n              device mesh: DeviceMesh('cuda', [0, 1, 2, 3])\n\n```",
    "url": "https://github.com/pytorch/examples/issues/1353",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-11T01:10:08Z",
    "updated_at": "2025-10-30T09:12:25Z",
    "comments": 2,
    "user": "githubsgi"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1258,
    "title": "Leader Servo Numbering different from script to documentation",
    "body": "First thank you for sharing this amazing work!\n\nI am initializing the servos for the arm leader and I noticed that the numbering for the Wrist Roll and Wrist Pitch are different from the documentation when I ran the script:\n\n![Image](https://github.com/user-attachments/assets/b12def57-e455-4a0d-8ef0-3e356eab473e)\n\nwrist_roll is set to 5 in the script but set to 4 in the documentation\nwrist_flex is set to 4 in the script but set to 5 (assuming it is Wrist Pitch) in the documentation\n\nI guess nothing to worry about ?\n\n",
    "url": "https://github.com/huggingface/lerobot/issues/1258",
    "state": "open",
    "labels": [
      "documentation",
      "question"
    ],
    "created_at": "2025-06-10T21:03:03Z",
    "updated_at": "2025-08-12T10:04:29Z",
    "user": "FaboNo"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38733,
    "title": "GRPO per_device_eval_batch_size can't be set as 1, when there is only 1 GPU",
    "body": "`eval batch size must be evenly divisible by the number of generations per prompt. ` When I only have one GPU, I cannot set `per_device_eval_batch_size=1` because there will be no reasonable G to choose from. Is it possible to automatically calculate a value similar to the number of gradient accumulation steps to achieve this feature?",
    "url": "https://github.com/huggingface/transformers/issues/38733",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-10T14:58:11Z",
    "updated_at": "2025-06-11T09:45:32Z",
    "comments": 0,
    "user": "CasanovaLLL"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1254,
    "title": "[Feature Proposal] Planning a new user friendly simulation environment for new task and data collection",
    "body": "Hello and bonjour! First and foremost, I really wanted to thanks the team and community for making this wonderful repo. It really helps and guide beginner in this field. And I also wanted to contribute for the community.\n\nReading the issues here, I found a lot of people are trying to run without physical robot. But with the current Aloha and Xarm simulation environment it is hard to config and train new task. So I was thinking to make new env where we could do that.\n\nHere is the main new feature:\n- New sim env we can use as extra like Xarm, Aloha and Pusht in a new repo.\n- Make a simple, game like GUI which enable controlling the manipulator with only keyboard and mouse. (Thinking of making a mini robot on html that can be controlled with mouse, z axis and gripper with keyboard)\n- Make it compatible to recent official MuJoCo release for further [update](https://playground.mujoco.org/) and [extension](https://github.com/google-deepmind/mujoco_warp). (Planning to use [MJX](https://mujoco.readthedocs.io/en/stable/mjx.html)(RL compatible) model)\n- Realtime inference using mujoco view.\n\nI'm a beginner in this field, so it might be a hard task for me. But I thought this this project might help quite people, and also really funny to do. So I'll try my best.\n\nWhat are your thoughts on this proposal? (Sorry if there is already similar features.)\nIf it is okay, I'll start to dig in.\n",
    "url": "https://github.com/huggingface/lerobot/issues/1254",
    "state": "open",
    "labels": [
      "question",
      "simulation"
    ],
    "created_at": "2025-06-10T12:36:13Z",
    "updated_at": "2025-08-12T10:04:42Z",
    "user": "Bigenlight"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1252,
    "title": "Failed to sync read 'Present_Position' on ids=[2,3,4,6]after 1 tries. [TxRxResult] There is no status packet",
    "body": "my arm is koch\uff0cwhen I set the motors ids and baudrates, it report error:\nFailed to sync read 'Present_Position' on ids=[2,3,4,6]after 1 tries. [TxRxResult] There is no status packet",
    "url": "https://github.com/huggingface/lerobot/issues/1252",
    "state": "open",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-06-10T10:21:05Z",
    "updated_at": "2025-09-01T02:24:25Z",
    "user": "huazai665"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1278,
    "title": "[Qes] Is `torch.float32` as the default dtype when training?",
    "body": "I ran the example config, and found the parameter dtype of model is `torch.float32`. I don't understand why we use this as the default dtype, why not half precision? And I found the only way to change it to half precision is enabling fsdp and set mix dtype to half.",
    "url": "https://github.com/pytorch/torchtitan/issues/1278",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-10T09:30:35Z",
    "updated_at": "2025-06-12T06:13:43Z",
    "comments": 2,
    "user": "foreverlms"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1251,
    "title": "where is async inference",
    "body": "hi,thx for your SmolVLA\nI have a question:**where is the async inference?**\nthe eval.py in script  doesn't seem for SmolVLA inference\nhope for your early reply,thx in advance",
    "url": "https://github.com/huggingface/lerobot/issues/1251",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-10T07:44:38Z",
    "updated_at": "2025-06-30T11:35:25Z",
    "user": "JuilieZ"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1336,
    "title": "node.js WebGPU compatibility and WASM performance in web enviornment",
    "body": "### Question\n\nHello!\n\nI've been running some performance benchmarks on whisper models and noticed that the web environment (running in react renderer in electron, separate worker with WASM) produced slower transcription results than the python counterpart (e.g. 1400ms vs 400ms per batch) - both utilizing the same number of threads and data types.\n\nnode.js environment running with WASM was almost on par with python, but unfortunately it won't let me pick webgpu as device - only cpu and dml are supported.\n\nThe onnxruntime-node package does mention webgpu being supported so I was wondering if it will be available for transformers running in node.js environment.\n\nAnd I'm also wondering if the performance drop using WASM in web environment is expected or if I'm doing something wrong.",
    "url": "https://github.com/huggingface/transformers.js/issues/1336",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-10T06:05:36Z",
    "updated_at": "2025-06-11T06:53:35Z",
    "user": "devnarekm"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38709,
    "title": "`get_video_features` in XCLIPModel always returns `pooled_output`",
    "body": "### System Info\n\nhttps://github.com/huggingface/transformers/blob/f4fc42216cd56ab6b68270bf80d811614d8d59e4/src/transformers/models/x_clip/modeling_x_clip.py#L1376\n\nHi\n\nThe `get_video_features` function is hardcoded to always return the `pooled_output`. But sometimes, it might be beneficial to get the `last_hidden_state` instead. Can we fix this behavior?\n\nThanks\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```import av\nimport torch\nimport numpy as np\n\nfrom transformers import AutoProcessor, AutoModel\nfrom huggingface_hub import hf_hub_download\n\nnp.random.seed(0)\n\n\ndef read_video_pyav(container, indices):\n    '''\n    Decode the video with PyAV decoder.\n    Args:\n        container (`av.container.input.InputContainer`): PyAV container.\n        indices (`List[int]`): List of frame indices to decode.\n    Returns:\n        result (np.ndarray): np array of decoded frames of shape (num_frames, height, width, 3).\n    '''\n    frames = []\n    container.seek(0)\n    start_index = indices[0]\n    end_index = indices[-1]\n    for i, frame in enumerate(container.decode(video=0)):\n        if i > end_index:\n            break\n        if i >= start_index and i in indices:\n            frames.append(frame)\n    return np.stack([x.to_ndarray(format=\"rgb24\") for x in frames])\n\n\ndef sample_frame_indices(clip_len, frame_sample_rate, seg_len):\n    '''\n    Sample a given number of frame indices from the video.\n    Args:\n        clip_len (`int`): Total number of frames to sample.\n        frame_sample_rate (`int`): Sample every n-th frame.\n        seg_len (`int`): Maximum allowed index of sample's last frame.\n    Returns:\n        indices (`List[int]`): List of sampled frame indices\n    '''\n    converted_len = int(clip_len * frame_sample_rate)\n    end_idx = np.random.randint(converted_len, seg_len)\n    start_idx = end_idx - converted_len\n    indices = np.linspace(start_idx, end_idx, num=clip_len)\n    indices = np.clip(indices, start_idx, end_idx - 1).astype(np.int64)\n    return indices\n\n\n# video clip consists of 300 frames (10 seconds at 30 FPS)\nfile_path = hf_hub_download(\n    repo_id=\"nielsr/video-demo\", filename=\"eating_spaghetti.mp4\", repo_type=\"dataset\"\n)\ncontainer = av.open(file_path)\n\n# sample 8 frames\nindices = sample_frame_indices(clip_len=8, frame_sample_rate=1, seg_len=container.streams.video[0].frames)\nvideo = read_video_pyav(container, indices)\n\nprocessor = AutoProcessor.from_pretrained(\"microsoft/xclip-base-patch32\")\nmodel = AutoModel.from_pretrained(\"microsoft/xclip-base-patch32\")\n\ninputs = processor(\n    videos=list(video),\n    return_tensors=\"pt\",\n    padding=True,\n)\n\n# forward pass\nwith torch.no_grad():\n    outputs = model.get_video_features(**inputs)\n\nprint(outputs.shape)\n\n### Expected behavior\n\nThe `get_video_features` function should have the option to output the `last_hidden_state` as well.",
    "url": "https://github.com/huggingface/transformers/issues/38709",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-10T00:51:37Z",
    "updated_at": "2025-07-18T08:02:50Z",
    "comments": 4,
    "user": "Vishu26"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1242,
    "title": "SmolVLA Gym Simulation - Release?",
    "body": "Hello,\n\nI've trained the smolvla_base for 200K steps. I'm trying to do a inference and visualize like we do for aloha or pusht. Could anyone guide me on this. \n\nI dont have a robot arm, so Gym simulation is something I'm looking for, when will it be released?",
    "url": "https://github.com/huggingface/lerobot/issues/1242",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "visualization"
    ],
    "created_at": "2025-06-09T13:05:38Z",
    "updated_at": "2025-10-17T11:00:57Z",
    "user": "Jaykumaran"
  },
  {
    "repo": "huggingface/smollm",
    "number": 78,
    "title": "how to continously pretrain VLM base model",
    "body": "rt.\nHow can I pretrain VLM base model\uff1f",
    "url": "https://github.com/huggingface/smollm/issues/78",
    "state": "open",
    "labels": [
      "Image",
      "Video"
    ],
    "created_at": "2025-06-09T07:04:57Z",
    "updated_at": "2025-07-29T12:50:50Z",
    "user": "allenliuvip"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 3259,
    "title": "Enable passing arguments to chat templates",
    "body": "### Feature request\n\nI would like to enable passing parameters to a chat template when using the messages API. Something like:\n```python\nqwen3_model = HuggingFaceModel(...)\npredictor = qwen3_model.deploy(...)\npredictor.predict({\n\"messages\": [\n        {\"role\": \"system\", \"content\": \"You are a helpful assistant.\" },\n        {\"role\": \"user\", \"content\": \"What is deep learning?\"}\n    ]\n\"template_args\": { \"enable_thinking\": False }\n})\n```\n\n### Motivation\n\nThere are models with various custom arguments that can be passed to chat templates. For example, Qwen3 comes with `enable_thinking` parameter than can be either True or False, and CohereLabs c4ai-command-r-plus RAG chat template has a `citation_mode` flag that can be `accurate` or `fast`.\n\n### Your contribution\n\nUnfortunately, no. Do not know Rust beyond some basics.",
    "url": "https://github.com/huggingface/text-generation-inference/issues/3259",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-09T06:04:27Z",
    "updated_at": "2025-06-09T07:53:17Z",
    "comments": 2,
    "user": "alexshtf"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7600,
    "title": "`push_to_hub` is not concurrency safe (dataset schema corruption)",
    "body": "### Describe the bug\n\nConcurrent processes modifying and pushing a dataset can overwrite each others' dataset card, leaving the dataset unusable.\n\nConsider this scenario:\n- we have an Arrow dataset\n- there are `N` configs of the dataset\n- there are `N` independent processes operating on each of the individual configs (e.g. adding a column, `new_col`)\n- each process calls `push_to_hub` on their particular config when they're done processing\n- all calls to `push_to_hub` succeed\n- the `README.md` now has some configs with `new_col` added and some with `new_col` missing\n\nAny attempt to load a config (using `load_dataset`) where `new_col` is missing will fail because of a schema mismatch between `README.md` and the Arrow files. Fixing the dataset requires updating `README.md` by hand with the correct schema for the affected config. In effect, `push_to_hub` is doing a `git push --force` (I found this behavior quite surprising).\n\nWe have hit this issue every time we run processing jobs over our datasets and have to fix corrupted schemas by hand.\n\nReading through the code, it seems that specifying a [`parent_commit`](https://github.com/huggingface/huggingface_hub/blob/v0.32.4/src/huggingface_hub/hf_api.py#L4587) hash around here https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L5794 would get us to a normal, non-forced git push, and avoid schema corruption. I'm not familiar enough with the code to know how to determine the commit hash from which the in-memory dataset card was loaded.\n\n### Steps to reproduce the bug\n\nSee above.\n\n### Expected behavior\n\nConcurrent edits to disjoint configs of a dataset should never corrupt the dataset schema.\n\n### Environment info\n\n- `datasets` version: 2.20.0\n- Platform: Linux-5.15.0-118-generic-x86_64-with-glibc2.35\n- Python version: 3.10.14\n- `huggingface_hub` version: 0.30.2\n- PyArrow version: 19.0.1\n- Pandas version: 2.2.2\n- `fsspec` version: 2023.9.0",
    "url": "https://github.com/huggingface/datasets/issues/7600",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-07T17:28:56Z",
    "updated_at": "2025-07-31T10:00:50Z",
    "comments": 4,
    "user": "sharvil"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1226,
    "title": "404 Not Found",
    "body": "[lerobot](https://github.com/huggingface/lerobot/tree/main)/[examples](https://github.com/huggingface/lerobot/tree/main/examples)\n/10_use_so100.md/ \n\nThis is supposed to be a tutorial but cannot be opened???\n404 Not Found!!!\n",
    "url": "https://github.com/huggingface/lerobot/issues/1226",
    "state": "closed",
    "labels": [
      "documentation",
      "question"
    ],
    "created_at": "2025-06-07T09:02:37Z",
    "updated_at": "2025-06-08T21:26:07Z",
    "user": "luk-e158"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38656,
    "title": "Potential Memory Leak or Caching in Fast Image Processor",
    "body": "### System Info\n\nHi team,\n\nThank you for your great work on `transformers`!\n\nWhile using the `AutoProcessor` with `use_fast=True`, I noticed that there seems to be a memory leak or possibly some form of persistent caching when processing images. Even after deleting the processor and clearing the CUDA cache, approximately 600MB of GPU memory remains occupied.\n\nHere is a minimal reproducible example:\n\n```python\nfrom transformers import AutoProcessor\nfrom PIL import Image\nimport time\nimport torch\nimport requests\nfrom io import BytesIO\n\nprocessor = AutoProcessor.from_pretrained(\n    \"Qwen/Qwen2.5-VL-7B-Instruct\",\n    use_fast=True,\n    trust_remote_code=False,\n    revision=None,\n)\n\nurl = \"https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true\"\nresponse = requests.get(url)\nimages = [Image.open(BytesIO(response.content)).convert(\"RGB\")]\n\nresult = processor(\n    text=[\n        \"<|im_start|>system\\nYou are a helpful assistant.<|im_end|>\\n\"\n        \"<|im_start|>user\\nWhat\u2019s in this image?<|vision_start|><|image_pad|><|vision_end|><|im_end|>\\n\"\n        \"<|im_start|>assistant\\n\"\n    ],\n    padding=True,\n    return_tensors=\"pt\",\n    images=images,\n    device=\"cuda\"\n)\n\ndel result\ndel processor\ntorch.cuda.empty_cache()\n\nprint(\"You can now use nvidia-smi to observe GPU memory usage, which is around 600MB.\")\nwhile True:\n    time.sleep(60)\n```\n\nI\u2019d like to kindly ask:\n\n1. If this is due to caching, is there a way to control or disable the cache?\n2. If this is an unintended memory leak, would it be possible to investigate and potentially fix it?\n\nThanks again for your help and time!\n\nBest regards\n\n### Who can help?\n\ntokenizers: @ArthurZucker and @itazap\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nAs provided above.\n\n### Expected behavior\n\nIt would be great if caching could be made optional, or if there could be an option to avoid any GPU memory usage entirely.",
    "url": "https://github.com/huggingface/transformers/issues/38656",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-07T08:46:48Z",
    "updated_at": "2025-08-12T13:02:37Z",
    "comments": 8,
    "user": "yhyang201"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38654,
    "title": "The visualization of image input in Qwen2.5-VL",
    "body": "The image input of Qwen2.5-VL is processed by processor and then saved as tensor in inputs['pixel_values'].\nI tried to restore the image, using tensor in inputs['pixel_values'], but I found that the restored image patches were in disorder.\nSo how to restore the image from inputs['pixel_values'] in a proper way?\n\nFor example, the origin input image is as follows.\n![Image](https://github.com/user-attachments/assets/f40dd6e7-0774-4ad1-b921-73adc320a880)\nAnd failed to restore from the inputs['pixel_values'].\n![Image](https://github.com/user-attachments/assets/e1c9c0ff-d02a-49b0-af21-e98d080452d8)",
    "url": "https://github.com/huggingface/transformers/issues/38654",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-07T08:15:44Z",
    "updated_at": "2025-06-10T09:04:04Z",
    "comments": 2,
    "user": "Bytes-Lin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 155391,
    "title": "how to save the fx graph with output tensor shapes ?",
    "body": "### \ud83d\udc1b Describe the bug\n\n# When I use **f.write** to save the fx graph, it doesn't have output tensor shapes \n> refer to https://www.doubao.com/chat/7948299479012098\n```\nwith open(\"fx_graph.py\", \"w\") as f:\n    f.write(graph_module.code)\n```\n* its dump is similar to \n```\ndef forward(self, inputs_1, labels_1):\n    view = torch.ops.aten.view.default(inputs_1, [32, -1]);  inputs_1 = None\n    _param_constant0 = self._param_constant0\n    t = torch.ops.aten.t.default(_param_constant0);  _param_constant0 = None\n    _param_constant1 = self._param_constant1\n   ...\n```\n\n\n# Compare to **print(joint_graph._graph.python_code(root_module=\"self\", verbose=True).src)**, we can see that there is output tensor shapes \n* its dump is similar to \n```\ndef forward(self, inputs_1: f32[32, 1, 784], labels_1: i64[32]):\n    # No stacktrace found for following nodes\n    view: f32[32, 784] = torch.ops.aten.view.default(inputs_1, [32, -1]);  inputs_1 = None\n    _param_constant0 = self._param_constant0\n    t: f32[784, 64] = torch.ops.aten.t.default(_param_constant0);  _param_constant0 = None\n    _param_constant1 = self._param_constant1\n   ...\n```\n\n\n### Versions\n\nPython                  3.10.14\ntorch                     2.1.0\ntorch-npu              2.1.0.post6.dev20240716\ntorchaudio             2.1.0\ntorchvision            0.16.0 ",
    "url": "https://github.com/pytorch/pytorch/issues/155391",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-07T02:35:38Z",
    "updated_at": "2025-06-07T02:58:25Z",
    "user": "vfdff"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1223,
    "title": "smolvla  introduce an asynchronous inference stack decoupling perception and action prediction?",
    "body": "why code not realize?",
    "url": "https://github.com/huggingface/lerobot/issues/1223",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-06-07T01:23:24Z",
    "updated_at": "2025-06-08T21:25:04Z",
    "user": "zmf2022"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38650,
    "title": "Support of Qwen3 GGUF model",
    "body": "Hi, I am getting the following error when I want to use the GGUF model with Qwen3\n\"ValueError: GGUF model with architecture qwen3 is not supported yet.\"\n\nI have the latest transformers and gguf-0.17.0\n```\nself.tokenizer = AutoTokenizer.from_pretrained(model_name, gguf_file= \"Qwen3-0.6B-Q2_K_L.gguf\",use_fast=True)\n        if self.tokenizer.pad_token is None:\n            self.tokenizer.pad_token = \"<pad>\"\n            self.tokenizer.add_special_tokens({\"pad_token\": \"<pad>\"})\n        self.tokenizer.padding_side = \"left\"\n        self.model = AutoModelForCausalLM.from_pretrained(\n            model_name,\n            gguf_file = \"Qwen3-0.6B-Q2_K_L.gguf\",\n            pad_token_id=self.tokenizer.pad_token_id,\n            trust_remote_code=True,\n            torch_dtype=torch.bfloat16,\n            device_map=\"auto\",\n        )\n```\nHow can I use the gguf model of Qwen3 with transformers? Could you please add the support of it?\n\nThanks!",
    "url": "https://github.com/huggingface/transformers/issues/38650",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-06T20:11:23Z",
    "updated_at": "2025-07-15T08:02:59Z",
    "comments": 2,
    "user": "Auth0rM0rgan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11675,
    "title": "Error in loading the pretrained lora weights",
    "body": "Hi, I am using the script https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_lora_sdxl.py to train a lora.\n\nAn error is raised on https://github.com/huggingface/diffusers/blob/73a9d5856f2d7ae3637c484d83cd697284ad3962/examples/text_to_image/train_text_to_image_lora_sdxl.py#L1314C9-L1314C52\n\n```\nLoading adapter weights from state_dict led to missing keys in the model: down_blocks.1.attentions.0.transformer_blocks.0.attn1.to_q.lora_A\n.default_0.weight, down_blocks.1.attentions.0.transformer_blocks.0.attn1.to_q.lora_B.default_0.weight, ...\n```\n\nThe difference between the keys in the saved lora weights and the ''missing keys'' mentioned above is ''default_0''. How can I resolve this problem?\n\ndiffusers 0.32.2\npeft 0.15.2\n",
    "url": "https://github.com/huggingface/diffusers/issues/11675",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-06T17:09:45Z",
    "updated_at": "2025-06-07T07:40:14Z",
    "comments": 1,
    "user": "garychan22"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 3257,
    "title": "if use chat.completions, text+image inference return incorrect output because of template issue",
    "body": "### System Info\n\ncommon in all platform\n\n### Information\n\n- [ ] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [ ] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\ntext-generation-launcher --model-id=llava-hf/llava-v1.6-mistral-7b-hf --max-input-tokens 4096 --max-batch-prefill-tokens 16384   --max-total-tokens 8192 --max-batch-size 4\n\nclient:\n\n```\nfrom openai import OpenAI\n\nclient = OpenAI(base_url=\"http://localhost:80/v1\", api_key=\"-\")\n\nchat_completion = client.chat.completions.create(\n    model=\"tgi\",\n    messages=[\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"image_url\",\n                    \"image_url\": {\n                        \"url\": \"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rabbit.png\"\n                    },\n                },\n                {\"type\": \"text\", \"text\": \"Whats in this image?\"},\n            ],\n        },\n    ],\n    max_tokens=50,\n    temperature=0.0,\n    stream=False,\n)\n\nprint(chat_completion)\n\n```\n\n### Expected behavior\n\nincorrect output is\nChatCompletion(id='', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content=\" I'm sorry, but I'm not sure what you're asking. Can you please provide more context or information about what you're looking for? \", refusal=None, role='assistant', audio=None, function_call=None, tool_calls=None))], created=1749197214, model='llava-hf/llava-v1.6-mistral-7b-hf', object='chat.completion', service_tier=None, system_fingerprint='3.3.1-dev0-native', usage=CompletionUsage(completion_tokens=35, prompt_tokens=8, total_tokens=43, completion_tokens_details=None, prompt_tokens_details=None))\n\n",
    "url": "https://github.com/huggingface/text-generation-inference/issues/3257",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-06T13:06:20Z",
    "updated_at": "2025-06-06T13:11:22Z",
    "comments": 2,
    "user": "sywangyi"
  },
  {
    "repo": "huggingface/nanotron",
    "number": 372,
    "title": "datatrove need numpy>=2.0.0 bug nanotron 0.4 requires numpy<2, how to fix?",
    "body": "",
    "url": "https://github.com/huggingface/nanotron/issues/372",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-06T12:12:39Z",
    "updated_at": "2025-11-22T14:44:01Z",
    "user": "lxyyang"
  },
  {
    "repo": "pytorch/xla",
    "number": 9303,
    "title": "Runtime is already initialized. Do not use the XLA ' RuntimeError: Runtime is already initialized. Do not use the XLA device before calling xmp.spawn.",
    "body": "## \ud83d\udc1b Bug\n-- Block 13 ALT: Direct xmp.spawn (Consolidated) ---\ntorch_xla and xmp imported for Block 13.\nDefining hyperparameters for training function...\nHyperparameters for training function defined.\nSetting XLA/TPU specific environment variables for xmp.spawn...\nXRT_TPU_CONFIG already set: localservice;0;localhost:51011\nEnvironment variables set.\nArguments tuple for xmp.spawn's target function prepared.\nSet TPU_NUM_DEVICES = 8\nUsing nprocs = None (None = use all available devices) for xmp.spawn.\n\n\ud83d\ude80 Launching TPU training directly via xmp.spawn with nprocs=None (auto-detect devices)...\n\u274c\u274c\u274c xmp.spawn FAILED: Runtime ALREADY initialized.\n/tmp/ipykernel_10/3843059188.py:91: UserWarning: tpu_cores not found or invalid from Block 0/1. Defaulting to 8 for TPU v3-8.\n  warnings.warn(\"tpu_cores not found or invalid from Block 0/1. Defaulting to 8 for TPU v3-8.\")\nTraceback (most recent call last):\n  File \"/tmp/ipykernel_10/3843059188.py\", line 103, in <module>\n    xmp.spawn(\n  File \"/usr/local/lib/python3.10/site-packages/torch_xla/distributed/xla_multiprocessing.py\", line 39, in spawn\n    return pjrt.spawn(fn, nprocs, start_method, args)\n  File \"/usr/local/lib/python3.10/site-packages/torch_xla/_internal/pjrt.py\", line 213, in spawn\n    run_multiprocess(spawn_fn, start_method=start_method)\n  File \"/usr/local/lib/python3.10/site-packages/torch_xla/_internal/pjrt.py\", line 145, in run_multiprocess\n    raise RuntimeError('Runtime is already initialized. Do not use the XLA '\nRuntimeError: Runtime is already initialized. Do not use the XLA device before calling xmp.spawn.\nEnsuring WandB run is finished...\nSynced 5 W&B file(s), 0 media file(s), 0 artifact file(s) and 0 other file(s)\n\u2705 Block 13 ALT Completed (Direct xmp.spawn Attempted).\n<!-- A clear and concise description of what the bug is. -->\n\n## To Reproduce\nI have working on this problem for the past two weeks and l can't get my head over it, i really don't know  what am doing wrong. \nMy question if you are using tpu vm v3-8 in kaggle, does it mean you can't \"!pip install \"torch~=2.6.0\" \"torchvision~=0.21.0\" \"torch_xla[tpu]~=2.6.0\" -f https://storage.googleapis.com/libtpu-releases/index.html --quiet\" in your kaggle notebook\nprint(\"PyTorch/XLA installation attempt complete.\\n\")\nit any unique install pytorch/xla? I initially started with notebook_launcher, accelerator from huggingface. \n<!--\nIt is really important for the team to have a quick repro, which requires no setup work.\n\nThe quicker is the repro to be run, the higher the chances the bug will be addressed sooner.\n\nThe best way to create quick repros is to create a Colab based on the following template:\n\nhttps://github.com/pytorch/xla/blob/master/TROUBLESHOOTING.md#using-debug_runpy-to-collect-debug-information\n\nThings to avoid in repros is the need to download datasets which require setting up keys or other login information, like Kaggle downloads for example.\n\nAnother example are Colab which mount user's Google Drive storages.\n\nUsing a fake data generator could be a solution, in case the dataset cannot be easily downloaded without setting up credentials:\n\nhttps://github.com/pytorch/xla/blob/784b4d4f21751a54be0029a95f47d3896561c2a9/test/test_train_mp_mnist.py#L65\n\n-->\n\nSteps to reproduce the behavior:\n\n1.\n2.\n3.\n\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well. Or better use the Colab template: https://github.com/pytorch/xla/blob/master/contrib/colab/issue-report.ipynb -->\n\n## Expected behavior\n\n<!-- A clear and concise description of what you expected to happen. -->\n\n## Environment\n\n - Torch: 2.6.0+cu124\n - TorchXLA: 2.6.0+libtpu\n\n\n## Additional context\n\n<!-- Add any other context about the problem here. -->\n",
    "url": "https://github.com/pytorch/xla/issues/9303",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-06T01:12:22Z",
    "updated_at": "2025-06-10T23:04:30Z",
    "user": "pojoba02"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 155242,
    "title": "Partitioner loses Inplace ops where source is constant",
    "body": "### \ud83d\udc1b Describe the bug\n\nIf backward contains some constant compute, e.g. result of joint constant propagation:\n```\nPOST_JOINT_CONST_FOLDING:graph():\n237    %primals_1 : [num_users=1] = placeholder[target=primals_1]\n238    %primals_2 : [num_users=2] = placeholder[target=primals_2]\n239    %tangents_1 : [num_users=1] = placeholder[target=tangents_1]\n240    %clone : [num_users=1] = call_function[target=torch.ops.aten.clone.default](args = (%primals_1,), kwargs = {})\n241    %full_default : [num_users=1] = call_function[target=torch.ops.aten.full.default](args = ([2], 0.0), kwargs = {dtype: torch.float32, layout: torch.strided, device: cuda:0, pin_memory: False})\n242    %add : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%full_default, 1), kwargs = {})\n243    %mul_1 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add, 1), kwargs = {})\n244    %add_1 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%primals_2, %mul_1), kwargs = {})\n245    %copy_ : [num_users=0] = call_function[target=torch.ops.aten.copy_.default](args = (%primals_2, %add_1), kwargs = {})\n246    return [clone, tangents_1, None]\n```\nAnd this add_1 will be counted as \"Invalid\" for backward in partitioner and copy_ will not be captured at all. \n\nRepro:\n```\nimport torch\nclass Func(torch.autograd.Function):\n    @staticmethod\n    def forward(ctx, dummy, inplace_tensor, attach_gradient):\n        ctx.attach_gradient = attach_gradient\n        ctx.inplace_tensor = inplace_tensor\n        return dummy.clone()\n    @staticmethod\n    def backward(ctx, grad_output):\n        inplace_tensor = ctx.inplace_tensor\n        attach_gradient = ctx.attach_gradient\n        gradient_attachment = (grad_output * 0 + 1)\n        inplace_tensor.add_(1 * gradient_attachment)\n        return grad_output, None, None\ndef call(dummy, inplace_tensor, attach_gradient):\n    return Func.apply(dummy, inplace_tensor, attach_gradient)\ncompiled_call = torch.compile(call)\ndummy = torch.randn((2,), requires_grad=True).to('cuda')\ninplace_tensor = torch.zeros((2,), requires_grad=False).to('cuda')\nprint(f'Uncompiled')\nloss = call(dummy, inplace_tensor, True).sum()\nprint(f'Pre backward inplace: {inplace_tensor}')\nloss.backward()\nprint(f'Post backward inplace: {inplace_tensor}\\n')\ninplace_tensor.zero_()\nprint(f'Compiled no gradient attachment')\nloss = compiled_call(dummy, inplace_tensor, True).sum()\nprint(f'COMPILED Pre backward inplace: {inplace_tensor}')\nloss.backward()\nprint(f'COMPILED Post backward inplace: {inplace_tensor}\\n')\ninplace_tensor.zero_()\n```\n\nResult:\n```\n ===== Joint graph 0 =====\n /data/users/ivankobzarev/b/pytorch/torch/fx/_lazy_graph_module.py class joint_helper(torch.nn.Module):\n    def forward(self, primals, tangents):\n        primals_1: \"f32[2][1]cuda:0\"; primals_2: \"f32[2][1]cuda:0\"; tangents_1: \"f32[2][1]cuda:0\"; \n    \n        primals_1, primals_2, tangents_1, = fx_pytree.tree_flatten_spec([primals, tangents], self._in_spec)\n         # File: /home/ivankobzarev/task-inplace/r.py:23 in call, code: return Func.apply(dummy, inplace_tensor, attach_gradient)\n        clone: \"f32[2][1]cuda:0\" = torch.ops.aten.clone.default(primals_1);  primals_1 = None\n        mul: \"f32[2][1]cuda:0\" = torch.ops.aten.mul.Tensor(tangents_1, 0)\n        add: \"f32[2][1]cuda:0\" = torch.ops.aten.add.Tensor(mul, 1);  mul = None\n        mul_1: \"f32[2][1]cuda:0\" = torch.ops.aten.mul.Tensor(add, 1);  add = None\n        add_1: \"f32[2][1]cuda:0\" = torch.ops.aten.add.Tensor(primals_2, mul_1);  mul_1 = None\n        \n        # No stacktrace found for following nodes\n        copy_: \"f32[2][1]cuda:0\" = torch.ops.aten.copy_.default(primals_2, add_1);  primals_2 = add_1 = copy_ = None\n        return pytree.tree_unflatten([clone, tangents_1, None], self._out_spec)\n        \nINFO: aot_config id: 0, fw_metadata=ViewAndMutationMeta(input_info=[InputAliasInfo(is_leaf=False, mutates_data=False, mutates_metadata=False, mutations_hidden_from_autograd=True, mutations_under_no_grad_or_inference_mode=False, mutation_inductor_storage_resize=False, mutates_storage_metadata=False, requires_grad=True, keep_input_mutations=True), InputAliasInfo(is_leaf=True, mutates_data=False, mutates_metadata=False, mutations_hidden_from_autograd=True, mutations_under_no_grad_or_inference_mode=False, mutation_inductor_storage_resize=False, mutates_storage_metadata=False, requires_grad=False, keep_input_mutations=True)], output_info=[OutputAliasInfo(output_type=<OutputType.non_alias: 1>, raw_type=<class 'torch._subclasses.functional_tensor.FunctionalTensor'>, base_idx=None, dynamic_dims=set(), requires_grad=True, functional_tensor=None)], num_intermediate_bases=0, keep_input_mutations=True, traced_tangents=[FakeTensor(..., device='cuda:0', size=(2,))], subclass_inp_meta=[PlainTensorMeta(unwrapped_idx=0, memory_format=None), PlainTensorMeta(unwrapped_idx=1, memory_format=None)], subclass_fw_graph_out_meta=[PlainTensorMeta(unwrapped_idx=0, memory_format=None)], subclass_tangent_",
    "url": "https://github.com/pytorch/pytorch/issues/155242",
    "state": "closed",
    "labels": [
      "triaged",
      "module: correctness (silent)",
      "module: aotdispatch"
    ],
    "created_at": "2025-06-05T17:34:38Z",
    "updated_at": "2025-06-11T12:50:03Z",
    "user": "IvanKobzarev"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38613,
    "title": "MDX Errors",
    "body": "### System Info\n\nUbuntu 24.04.2 LTS, CPython 3.11.12,  transformers==4.53.0.dev0\n\n\n@stevhliu  I'm trying to contribute to the model cards. I forked the latest transformers and I ran the scripts, from the home page and then I want to the documents page. I'm having issues with the doc builder. I keep receiving the errors \"ValueError: There was an error when converting docs/source/en/internal/generation_utils.md to the MDX format.\nUnable to find generation.TFGreedySearchEncoderDecoderOutput in transformers. Make sure the path to that object is correct.\" And Unable to find image_processing_utils_fast.BaseImageProcessorFast in transformers. Make sure the path to that object is correct.\n\nI ran the \" pip install -e \".[docs]\" and saw this after installing everything: \"warning: The package `transformers @ file://s` does not have an extra named `docs`\"\n\nI ran the doc builder and that ran as expected until I ran the doc-builder command \"doc-builder build transformers docs/source/en/ --build_dir ~/tmp/test-build\"\n\nIs there something that I'm misunderstanding? Is there a workaround for me to write the markdown of the card that I have been assigned without having to run those scripts instead, in the meantime.. Thank you!\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nRan install scripts on the Documents folder\n\n### Expected behavior\n\nTo generate the docs",
    "url": "https://github.com/huggingface/transformers/issues/38613",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-05T14:19:45Z",
    "updated_at": "2025-06-06T20:12:36Z",
    "comments": 7,
    "user": "rileyafox"
  },
  {
    "repo": "pytorch/ao",
    "number": 2310,
    "title": "[Question] Combining QAT and Sparsity Training",
    "body": "First of all, thank you for all the time and effort invested in this project to make (large) models more accessible.\nI am fairly new to optimizing my models using sparsity, and therefore, wanted to ask if my understanding of this library is correct.\nIn general, I would like to train my model using sparsity and QAT.\n\nFor QAT, I would follow this [guide](https://github.com/pytorch/ao/blob/main/torchao/quantization/qat/README.md#quantize_-api-recommended).\nNow I am curious how to correctly use this together with sparsity.\nI assume this `swap_linear_with_semi_sparse_linear(model, sparse_config)` is the correct snippet ([guide](https://github.com/pytorch/ao/tree/main/torchao/sparsity/training#quickstart)).\nIf I want to combine these two optimizations, what is the correct way to do so?\n\n1. Train baseline\n2. Train a sparse model\n3. Train a sparse and quantization-aware model\n\nAdditionally, I found this statement\n\n> A fully sparse 2:4 trained model exhibited a -0.5 pp accuracy drop; we were able to further reduce the accuracy loss to -0.1 pp by first training with 2:4 sparsity enabled and then switching over to normal dense training.\n\nDoes this mean adding a step?\n\n4. Revert sparsity using `swap_semi_sparse_linear_with_linear(model)` and train\n\nLastly, the sparsity `sparsify_ ` and quantization `quantize_` need to be 'applied'.\n\nI would greatly appreciate your input on this.",
    "url": "https://github.com/pytorch/ao/issues/2310",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-05T13:03:12Z",
    "updated_at": "2025-06-20T12:37:47Z",
    "user": "CaptainDario"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11661,
    "title": "[BUG]: Using args.max_train_steps even if it is None in diffusers/examples/flux-control",
    "body": "### Describe the bug\n\nUnder [https://github.com/huggingface/diffusers/tree/main/examples/flux-control](examples/flux-control) there are two files showing how to fine tune flux-control:\n- [train_control_flux.py](https://github.com/huggingface/diffusers/blob/main/examples/flux-control/train_control_flux.py)\n- [train_control_lora_flux.py](https://github.com/huggingface/diffusers/blob/main/examples/flux-control/train_control_lora_flux.py)\nBoth of them have a bug when args.max_train_steps is None:\nStarting from [Line 905](https://github.com/huggingface/diffusers/blob/c934720629837257b15fd84d27e8eddaa52b76e6/examples/flux-control/train_control_flux.py#L905) we have following code:\n```.py\nif args.max_train_steps is None:\n      len_train_dataloader_after_sharding = math.ceil(len(train_dataloader) / accelerator.num_processes)\n      num_update_steps_per_epoch = math.ceil(len_train_dataloader_after_sharding / args.gradient_accumulation_steps)\n      num_training_steps_for_scheduler = (\n          args.num_train_epochs * num_update_steps_per_epoch * accelerator.num_processes\n      )\n  else:\n      num_training_steps_for_scheduler = args.max_train_steps * accelerator.num_processes\n\n  lr_scheduler = get_scheduler(\n      args.lr_scheduler,\n      optimizer=optimizer,\n      num_warmup_steps=args.lr_warmup_steps * accelerator.num_processes,\n      num_training_steps=args.max_train_steps * accelerator.num_processes,\n      num_cycles=args.lr_num_cycles,\n      power=args.lr_power,\n  )\n```\nNote how it gets checked that `args.max_train_steps` is None in the if, in this case a num_training_steps_for_scheduler gets prepared. However in [Line 918](https://github.com/huggingface/diffusers/blob/c934720629837257b15fd84d27e8eddaa52b76e6/examples/flux-control/train_control_flux.py#L918) we use `args.max_train_steps`\n```.py\n num_training_steps=args.max_train_steps * accelerator.num_processes,\n```\nisntead of the prepared num_training_steps_for_scheduler and causing following error:\n```.sh\nnum_training_steps=args.max_train_steps * accelerator.num_processes,\n                       ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~\nTypeError: unsupported operand type(s) for *: 'NoneType' and 'int'\n```\n\n### Reproduction\n\nTraining runs where the max_train_steps are not set, i.e.:\n```.sh\naccelerate launch train_control_lora_flux.py \\\n  --pretrained_model_name_or_path=\"black-forest-labs/FLUX.1-dev\" \\\n  --dataset_name=\"raulc0399/open_pose_controlnet\" \\\n  --output_dir=\"pose-control-lora\" \\\n  --mixed_precision=\"bf16\" \\\n  --train_batch_size=1 \\\n  --rank=64 \\\n  --gradient_accumulation_steps=4 \\\n  --gradient_checkpointing \\\n  --use_8bit_adam \\\n  --learning_rate=1e-4 \\\n  --report_to=\"wandb\" \\\n  --lr_scheduler=\"constant\" \\\n  --lr_warmup_steps=0 \\\n  --num_train_epochs=10 \\\n  --validation_image=\"openpose.png\" \\\n  --validation_prompt=\"A couple, 4k photo, highly detailed\" \\\n  --offload \\\n  --seed=\"0\" \\\n  --push_to_hub\n```\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nNot relevant for the mentioned Bug.\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11661",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-05T07:18:06Z",
    "updated_at": "2025-06-05T09:26:26Z",
    "comments": 0,
    "user": "Markus-Pobitzer"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1203,
    "title": "Could you please upload the config.json file for smolvla?",
    "body": "\n\nCould you please upload the config.json file for smolvla? Thank you very much!\n\n\nFileNotFoundError: config.json not found on the HuggingFace Hub in lerobot/smolvla_base\n\n",
    "url": "https://github.com/huggingface/lerobot/issues/1203",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-05T06:59:12Z",
    "updated_at": "2025-06-11T14:56:56Z",
    "user": "Pandapan01"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38601,
    "title": "Contribute to Transformers on windows natively without WSL",
    "body": "### System Info\n\n### System info\nOS: Windows 11\nPython: 3.13.3 and 3.10\nGit: 2.49.0\nCMake: 4.0.2\nMsys64:  Pacman v6.1.0 - libalpm v14.0.0\nPip: 25.1.1 \nSetuptools: 80.9.0\nVisual studio C++ build tools\n\n### NOTE: I followed the steps here [Contribute to \ud83e\udd17 Transformers](https://huggingface.co/docs/transformers/en/contributing) and for sure system info already existed before following but let me walk through again for additional info.\n1- Forked the repo.\n2- Cloned it\n3- cd transformers (so made sure I am in the right path which is the root for the repo)\n3- switched to my own branch\n4- made a python virtual environment using python 3.10 then activated it \n5- made sure transformers ain't installed inside it\n6- installed PyTorch\n7- Ran this command `pip install -e \".[dev]\"`\n\n\n### NOTE: I tried making requirements.txt and using this command `pip install -r requirements.txt` but I got no output and I tried installing onnx with pip which happened successfully then Ran this command `pip install -e \".[dev]\"` but nothing changed\n\n### NOTE 6/6/2025: I tried uv instead of python venv, nothing worked. I tried deleting everything including system info and install everything from the beginning, nothing worked still. I made a requiremets.txt from what is in setup.py and installed it and tried to run `pip install -e \".[dev]\"` but same issues again, nothing worked\n\n```\n  error: subprocess-exited-with-error\n\n  \u00d7 python setup.py egg_info did not run successfully.\n  \u2502 exit code: 1\n  \u2570\u2500> [11 lines of output]\n      ...\\setup.py:36: DeprecationWarning: Use shutil.which instead of find_executable\n        CMAKE = find_executable('cmake3') or find_executable('cmake')\n      ...\\setup.py:37: DeprecationWarning: Use shutil.which instead of find_executable\n        MAKE = find_executable('make')\n      fatal: not a git repository (or any of the parent directories): .git\n      Traceback (most recent call last):\n        File \"<string>\", line 2, in <module>\n        File \"<pip-setuptools-caller>\", line 35, in <module>\n        File \"...\\setup.py\", line 318, in <module>\n          raise FileNotFoundError(\"Unable to find \" + requirements_file)\n      FileNotFoundError: Unable to find requirements.txt\n      [end of output]\n\n  note: This error originates from a subprocess, and is likely not a problem with pip.\nerror: metadata-generation-failed\n\n\u00d7 Encountered error while generating package metadata.\n\u2570\u2500> See above for output.\n\nnote: This is an issue with the package mentioned above, not pip.\nhint: See above for details.\n```\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n`pip install -e \".[dev]\"`\n\n### Expected behavior\n\nBeing able to install transformers for contributing with no issue",
    "url": "https://github.com/huggingface/transformers/issues/38601",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-05T04:14:12Z",
    "updated_at": "2025-07-27T08:02:54Z",
    "comments": 4,
    "user": "ghost"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1262,
    "title": "Checkpointer Feature Enhancements",
    "body": "This document tracks and describes the essential checkpointing features still to be added to TorchTitan.\n\n- [ ] **Full `state_dict` saving**  \n  - Support exporting the complete (unsharded) model `state_dict`; many existing formats only handle full `state_dict`.\n  - https://github.com/pytorch/torchtitan/pull/1219 is WIP to support this.\n  - Need removing FP8 tensor subclass from the `state_dict`.\n\n- [x] **Model `state_dict` mapping**  \n  - Provide an interface for users/developers to plug in custom converters between TorchTitan\u2019s `state_dict`/model definitions and other model definitions (e.g., Hugging Face models).\n\n- [x] **Hugging Face format saving**  \n  - Depends on full `state_dict` export  \n  - Optionally leverages the `model state_dict mapping` interface for users who require conversion\n  - Uses the Hugging Face API for saving\n\n- [x] **Hugging Face format loading**  \n  - Depends on the `model state_dict interface` as most use cases require conversion from other model definitions  \n  - DCP already supports HF loading but needs tighter API integration and performance tuning (collaboration with DCP)\n\n- [ ] **Enhanced checkpoint debugging & comparison tools**  \n  - Provide APIs (e.g., per-tensor checksums or diff reports) to pinpoint mismatches in model state, optimizer state, etc.  \n  - Streamline root-cause analysis when loaded checkpoints lead to unexpected accuracy changes\n\n- [x] **Complete unit tests**\n  - Checkpointer has a lot of logic and branches. We can verify Checkpointer through Mock without using GPUs.\n\n- [ ] **Decouple `state_dict` staging from checkpointing/DCP calls**  \n  - Allow staging of the `state_dict` to CPU (or other targets) independently of DCP \n  - Enables downstream workflows (e.g., RL trainers or parameter servers) to consume staged state without invoking DCP\n\n- [ ] **Remove the call to get_model_state_dict and get_optimizer_state_dict**\n  - While this originally is viewed as a BE project to demonstrate how to directly get model and optimizer state_dict with canonical FQNs, https://github.com/pytorch/torchtitan/pull/1280 actually depends on this enhancement. \n",
    "url": "https://github.com/pytorch/torchtitan/issues/1262",
    "state": "open",
    "labels": [
      "enhancement",
      "better engineering",
      "module: checkpoint"
    ],
    "created_at": "2025-06-04T20:44:27Z",
    "updated_at": "2025-08-21T03:20:05Z",
    "comments": 3,
    "user": "fegin"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11657,
    "title": "Custom Wan diffusion Lora runs without error but doesn't apply effect and gives warning: No LoRA keys associated to WanTransformer3DModel found with the prefix='transformer'.",
    "body": "### Describe the bug\n\nI run the diffusers pipe using the standard process with a custom diffusers trained lora: \n\npipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)\npipe.scheduler = scheduler\npipe.load_lora_weights(\"lora/customdiffusers_lora.safetensors\")\netc...\n\nit runs without error but the effect was not applied, and I see the following warning: \nNo LoRA keys associated to WanTransformer3DModel found with the prefix='transformer'. This is safe to ignore if LoRA state dict didn't originally have any WanTransformer3DModel related params. You can also try specifying `prefix=None` to resolve the warning. Otherwise, open an issue if you think it's unexpected: https://github.com/huggingface/diffusers/issues/new\n\nIs there any config file I need to change for this to work? Thanks\n\n### Reproduction\n\nN/A as a custom Lora\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\n0.33, linux, python 3.10\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11657",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-04T19:50:14Z",
    "updated_at": "2025-09-12T03:32:17Z",
    "comments": 3,
    "user": "st-projects-00"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38576,
    "title": "A local variable 'image_seq_length' leading to UnboundLocalError: cannot access local variable 'image_seq_length' where it is not associated with a value",
    "body": "### System Info\n\n- `transformers` version: 4.52.3\n- Platform: Linux-5.15.0-125-generic-x86_64-with-glibc2.35\n- Python version: 3.12.2\n- Huggingface_hub version: 0.32.2\n- Safetensors version: 0.5.3\n- Accelerate version: 0.26.0\n- Accelerate config:    not found\n- DeepSpeed version: not installed\n- PyTorch version (GPU?): 2.6.0+cu124 (True)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: <fill in>\n- Using GPU in script?: <fill in>\n- GPU type: NVIDIA GeForce RTX 4090\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nThe code snippet is as follows:\nfrom transformers.utils.attention_visualizer import AttentionMaskVisualizer\n\nvisualizer = AttentionMaskVisualizer(\"meta-llama/Llama-2-7b-hf\")\nvisualizer(\"Plants create energy through a process known as\")\n\nIn the Class AttentionMaskVisualizer, a local variable in the first branch (lines 181-201), 'image_seq_length,' is passed to the function (line 232). However, in the text case, the branch will not be executed, and it will lead to UnboundLocalError: cannot access local variable 'image_seq_length' where it is not associated with a value.\n\n### Expected behavior\n\nNone",
    "url": "https://github.com/huggingface/transformers/issues/38576",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-06-04T09:06:04Z",
    "updated_at": "2025-06-04T12:20:33Z",
    "user": "IceGiraffe"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1195,
    "title": "ros2_control support",
    "body": "Hello,\n\nI was thinking that it would be great to use the robot with ros2_control :\n\n- to test code developped with the ROS2 framework:\n- for education purposes : the robot is great, easily and not expensive to build (thank you for the work achieved), transporteable in a case, etc.\n\nDo you have any knowledge of an existing project ?\nIf not, would you be interested in this kind of implementation ?\n\nBest,\nAline",
    "url": "https://github.com/huggingface/lerobot/issues/1195",
    "state": "open",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2025-06-03T15:31:53Z",
    "updated_at": "2025-11-27T16:30:08Z",
    "user": "baaluidnrey"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11648,
    "title": "how to load lora weight  with fp8 transfomer  model?",
    "body": "Hi, I want to run fluxcontrolpipeline with transformer_fp8  reference the code : \nhttps://huggingface.co/docs/diffusers/api/pipelines/flux#quantization\n\n```\nimport torch\nfrom diffusers import BitsAndBytesConfig as DiffusersBitsAndBytesConfig, FluxTransformer2DModel, FluxControlPipeline\nfrom transformers import BitsAndBytesConfig as BitsAndBytesConfig, T5EncoderModel\n\nquant_config = BitsAndBytesConfig(load_in_8bit=True)\ntext_encoder_8bit = T5EncoderModel.from_pretrained(\n    \"black-forest-labs/FLUX.1-dev\",\n    subfolder=\"text_encoder_2\",\n    quantization_config=quant_config,\n    torch_dtype=torch.float16,\n)\n\nquant_config = DiffusersBitsAndBytesConfig(load_in_8bit=True)\ntransformer_8bit = FluxTransformer2DModel.from_pretrained(\n    \"black-forest-labs/FLUX.1-dev\",\n    subfolder=\"transformer\",\n    quantization_config=quant_config,\n    torch_dtype=torch.float16,\n)\n\npipeline = FluxControlPipeline.from_pretrained(\n    \"black-forest-labs/FLUX.1-dev\",\n    text_encoder_2=text_encoder_8bit,\n    transformer=transformer_8bit,\n    torch_dtype=torch.float16,\n    device_map=\"balanced\",\n)\n\nprompt = \"a tiny astronaut hatching from an egg on the moon\"\nimage = pipeline(prompt, guidance_scale=3.5, height=768, width=1360, num_inference_steps=50).images[0]\nimage.save(\"flux.png\")\n```\n\nbut when I load lora after build a pipeline\n\n```\npipeline = FluxControlPipeline.from_pretrained(\n    \"black-forest-labs/FLUX.1-dev\",\n    text_encoder_2=text_encoder_8bit,\n    transformer=transformer_8bit,\n    torch_dtype=torch.float16,\n    device_map=\"balanced\",\n)\n\npipe.load_lora_weights(\"black-forest-labs/FLUX.1-Depth-dev-lora\")\n```\nThere a error:\nnot support fp8 weight , how to fix it??\n\n",
    "url": "https://github.com/huggingface/diffusers/issues/11648",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-03T10:31:23Z",
    "updated_at": "2025-06-19T12:37:35Z",
    "user": "Johnson-yue"
  },
  {
    "repo": "huggingface/candle",
    "number": 2986,
    "title": "How to reset gradient before each batch",
    "body": "In Pytorch, you would call `optimizer.zero_grad` to zero the gradients before every batch. How do you do this in candle?",
    "url": "https://github.com/huggingface/candle/issues/2986",
    "state": "open",
    "labels": [],
    "created_at": "2025-06-03T10:17:52Z",
    "updated_at": "2025-06-03T10:17:52Z",
    "user": "lokxii"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38544,
    "title": "Paligemma model card needs update",
    "body": "Hi \n\nI found a minor problem with paligemma model card. How can I raise a PR to fix it ? I am first time contributor. I raised PR. Whom should I mention to review it ? \nhttps://huggingface.co/google/paligemma-3b-pt-896",
    "url": "https://github.com/huggingface/transformers/issues/38544",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-03T06:55:14Z",
    "updated_at": "2025-07-14T16:23:52Z",
    "comments": 7,
    "user": "punitvara"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1257,
    "title": "Question about fixed std=0.02 initialization of `w1` in `moe.py`",
    "body": "Hi torchtitan team,\n\nThanks for the great work on this project! I had a question regarding a detail in the code at moe.py#L92\n\nhttps://github.com/pytorch/torchtitan/blob/768cde131105bde624160029d808e94649faf0f4/torchtitan/experiments/llama4/model/moe.py#L92\n\nI noticed that `w1` is initialized with a fixed standard deviation of 0.02, whereas `w2` and `w3` are initialized using a configurable `init_std` parameter. I\u2019m wondering if this discrepancy is intentional, and if so, what the reasoning is behind using a hardcoded value for `w1`.\n\nWould greatly appreciate any insights you could share!\n\nThanks again!\n",
    "url": "https://github.com/pytorch/torchtitan/issues/1257",
    "state": "open",
    "labels": [
      "question",
      "triage review"
    ],
    "created_at": "2025-06-03T04:06:53Z",
    "updated_at": "2025-08-21T07:03:44Z",
    "user": "trestad"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38541,
    "title": "`eager_attention_forward` and `repeat_kv` code duplication",
    "body": "I see the two functions appear in a lot of places in the code base. Shall we unify them into a single place?\n\nAnd can we treat `eager_attention_forward` as another option in [`ALL_ATTENTION_FUNCTIONS`](https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L6186)? Any concerns?",
    "url": "https://github.com/huggingface/transformers/issues/38541",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-03T00:57:16Z",
    "updated_at": "2025-06-10T10:27:25Z",
    "comments": 3,
    "user": "ChengLyu"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3373,
    "title": "[BUG] Running `make html-noplot` yields errors.",
    "body": "### Add Link\n\nI ran the following command about 10 hours ago, around 12:20:00 utc and it gave me errors. (I am being specific about the time, because I was unable to find a release that I could point to).\n`git clone --depth 1 https://github.com/pytorch/tutorials.git`\n\n### Describe the bug\n\n## What errors did you encounter?\n```\ngenerating gallery for beginner... [  6%] saving_loading_models.py\nExtension error (sphinx_gallery.gen_gallery):\nHandler <function generate_gallery_rst at 0x000001C0A8C3AB00> for event 'builder-inited' threw an exception (exception: Can't pickle <function call_fn at 0x000001C088543010>: attribute lookup call_fn on __main__ failed)\nTraceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"C:\\Python\\Python310\\lib\\multiprocessing\\spawn.py\", line 107, in spawn_main\n    new_handle = reduction.duplicate(pipe_handle,\n  File \"C:\\Python\\Python310\\lib\\multiprocessing\\reduction.py\", line 79, in duplicate\n    return _winapi.DuplicateHandle(\nOSError: [WinError 6] The handle is invalid\nmake: *** [html-noplot] Error 2\n```\n\n## What did you expect to happen?\nAs stated in the README.md file, I expected a basic html version of the tutorial to be built at `_build/html`\n\n## Steps to Reproduce the error\n1. Run the git command below\n    `git clone --depth 1 https://github.com/pytorch/tutorials.git`\n\n2. Run `pip install -r .ci/docker/requirements.txt`. I am aware the instruction was to `pip install -r requirements.txt`. But \n I keep encountering the errors below, so I improvised.\n\n```\nERROR: Invalid requirement: '.ci/docker/requirements.txt': Expected package name at the start of dependency specifier\n    .ci/docker/requirements.txt\n    ^ (from line 1 of requirements.txt)\n```\n3. Run `make html-noplot`. For this one, I gnuWin32 make. This is what is available on Windows.\n\n    I noticed that this error is similar to that found when I run re.compile('\\\\c'). I am familiar with this scenario and so I looked further and traced the error to the code [here](https://github.com/pytorch/tutorials/blob/20bf27e027d35a455d24469098f6d685547ff11d/.jenkins/get_sphinx_filenames.py#L13). I was able to move on from this error by modifying my local version of the code to \n    `SPHINX_SHOULD_RUN = \"|\".join(get_files_for_sphinx()).replace('\\\\', '\\\\\\\\')`\n    I want to note that I do not feel confident in that action because I notice that code was last modified 2 years ago, unless I have a wrong interpretation of what the \"2 years ago\" that I see around there means. It was last modified 2 years ago! That means that working tutorials have been built with that piece of code. This makes me feel very strongly that something is wrong with my setup. But I resisted raising any issues because I considered that it might not be worth it to distract the attention of our dear conscientious developers whose efforts to maintain this codebase does not go unnoticed.\n\n4.  Run `make html-noplot` once more.\n    The error [above](##what-errors-did-you-encounter?) appears. I look at the error and I see `multiprocessing.py` there. I do not know how to do anything with code that runs on more than one thread or process. I would appreciate knowing what I have done wrong in my environment because surely the code in this repository works as it has been tested as required.\n\n\n\n### Describe your environment\n\n## Environment\n* Python 3.10.5\n* pip 25.1.1\n* All commands were run in the top directory of the cloned repository\n* All *pip-installing* was done in a fresh virtual environment created using **venv** and located in the top directory of the cloned repository. The command used for that was `python -m venv doc-env`.\n* GPU (not cuda): Intel Iris Xe (Not sure this is relevant) ",
    "url": "https://github.com/pytorch/tutorials/issues/3373",
    "state": "open",
    "labels": [
      "bug",
      "build issue"
    ],
    "created_at": "2025-06-02T23:37:26Z",
    "updated_at": "2025-06-03T20:01:28Z",
    "comments": 5,
    "user": "phonokoye"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1843,
    "title": "can you make a release?",
    "body": "The current codebase is far away from the official release in November, maybe you can stabilize and release current code?",
    "url": "https://github.com/huggingface/chat-ui/issues/1843",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-06-02T21:26:51Z",
    "updated_at": "2025-07-21T20:44:03Z",
    "comments": 1,
    "user": "antonkulaga"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38527,
    "title": "Why do you remove sample_indices_fn for processor.apply_chat_template?",
    "body": "Just as shown in the picture, since 4.52 processor.apply_chat_template does no longer support sample_indices_fn but the args doc is still there. \n\n<img width=\"712\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/e055d5f5-4800-4eb7-8054-0f41a9be5707\" />",
    "url": "https://github.com/huggingface/transformers/issues/38527",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-02T12:34:23Z",
    "updated_at": "2025-06-03T02:44:22Z",
    "comments": 1,
    "user": "futrime"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2284,
    "title": "Error when exporting  DinoV2 with Registers",
    "body": "When trying :\n\n` python -m scripts.convert --quantize --model_id facebook/dinov2-with-registers-small`\n\nI Got : \n\n`ValueError: Trying to export a dinov2-with-registers model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type dinov2-with-registers to be supported natively in the ONNX export.`",
    "url": "https://github.com/huggingface/optimum/issues/2284",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2025-06-02T08:53:55Z",
    "updated_at": "2025-07-04T02:16:54Z",
    "comments": 1,
    "user": "elkizana"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 523,
    "title": "[QUESTION] The final quiz of Unit 1, always crashes with dataset not found",
    "body": "First, the **best way to get a response fast is to ask the community** in our Discord server: https://www.hf.co/join/discord\n\nHowever, if you prefer you can ask here, please **be specific**.\n\nDataset 'agents-course/unit_1_quiz' doesn't exist on the Hub or cannot be accessed. \n\nThe full log is: \n\n```\nTraceback (most recent call last):\n  File \"/home/user/app/app.py\", line 28, in <module>\n    ds = load_dataset(EXAM_DATASET_ID, split=\"train\")\n  File \"/usr/local/lib/python3.10/site-packages/datasets/load.py\", line 2129, in load_dataset\n    builder_instance = load_dataset_builder(\n  File \"/usr/local/lib/python3.10/site-packages/datasets/load.py\", line 1849, in load_dataset_builder\n    dataset_module = dataset_module_factory(\n  File \"/usr/local/lib/python3.10/site-packages/datasets/load.py\", line 1719, in dataset_module_factory\n    raise e1 from None\n  File \"/usr/local/lib/python3.10/site-packages/datasets/load.py\", line 1645, in dataset_module_factory\n    raise DatasetNotFoundError(f\"Dataset '{path}' doesn't exist on the Hub or cannot be accessed.\") from e\ndatasets.exceptions.DatasetNotFoundError: Dataset 'agents-course/unit_1_quiz' doesn't exist on the Hub or cannot be accessed.\nTraceback (most recent call last):\n  File \"/home/user/app/app.py\", line 28, in <module>\n    ds = load_dataset(EXAM_DATASET_ID, split=\"train\")\n  File \"/usr/local/lib/python3.10/site-packages/datasets/load.py\", line 2129, in load_dataset\n    builder_instance = load_dataset_builder(\n  File \"/usr/local/lib/python3.10/site-packages/datasets/load.py\", line 1849, in load_dataset_builder\n    dataset_module = dataset_module_factory(\n  File \"/usr/local/lib/python3.10/site-packages/datasets/load.py\", line 1719, in dataset_module_factory\n    raise e1 from None\n  File \"/usr/local/lib/python3.10/site-packages/datasets/load.py\", line 1645, in dataset_module_factory\n    raise DatasetNotFoundError(f\"Dataset '{path}' doesn't exist on the Hub or cannot be accessed.\") from e\ndatasets.exceptions.DatasetNotFoundError: Dataset 'agents-course/unit_1_quiz' doesn't exist on the Hub or cannot be accessed.\n ```\n\nAm I missing something trivial? \n",
    "url": "https://github.com/huggingface/agents-course/issues/523",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-06-02T07:58:01Z",
    "updated_at": "2025-06-02T07:58:01Z",
    "user": "abcnishant007"
  },
  {
    "repo": "huggingface/peft",
    "number": 2563,
    "title": "Integrate Lily",
    "body": "### Feature request\n\nThis request proposes integrating Lily (Low-Rank Interconnected Adaptation across Layers), accepted to ACL 2025 Findings, into the PEFT library.  \nPaper: https://arxiv.org/pdf/2407.09946  \nRepo: https://github.com/yibozhong/lily  \n\n\n### Motivation\n\nLily aims to directly make the rank of each individual adapter bigger under the same parameter budget, as it's shown in many papers that higher ranks are beneficial to PEFT performance. This is achieved by breaking the pair-AB-per-layer constraint of LoRA. That is, we do not give each layer a dedicated pair of A and B. Rather, we decouple all the Bs from the layer, and when adapting at each layer, we use a weighted sum of these Bs as the B for this layer. The weight is calculated by a lightweight trainable router, currently data-dependent.  \n\n![Image](https://github.com/user-attachments/assets/809c25a4-63f5-4ec7-bdb4-98a8f869f328)  \n\nSeveral points worth noting:  \n- The method looks somewhat similar to MosLoRA in structure, but it operates at the model level and the aim is to increase the individual rank of each adapter with dynamic adaptation.  \n- Currently in the paper, we use a data-dependent router, which makes it tricky to merge the weights. I do not observe notable inference latency, possibly due to small model size, but an option for using a non-data-dependent router can be included and enable easy merging the weights.  \n- The current As are still positioned at a fixed layer (using layer-wise sharing to reduce params). However, it also can be decoupled, simply by providing two routers for weighting As and Bs respectively, rather than one router for B in the current setup. This is a more elegant design and shares the same principle as Lily. After I run quick experiments demonstrating its effectiveness, I can integrate this setup into my current code as Lily v2.  \n\n### Your contribution\n\nImplement Lily, repo: https://github.com/yibozhong/lily. ",
    "url": "https://github.com/huggingface/peft/issues/2563",
    "state": "closed",
    "labels": [],
    "created_at": "2025-06-02T07:23:30Z",
    "updated_at": "2025-12-18T14:03:32Z",
    "comments": 15,
    "user": "yibozhong"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1180,
    "title": "dataset training",
    "body": "How many episodes do you recommend making for each file when learning the dataset? Can I create about 400 episodes by putting different tasks in each episode? Or can I create the same task data for each file and combine multiple files?",
    "url": "https://github.com/huggingface/lerobot/issues/1180",
    "state": "closed",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-06-01T15:59:47Z",
    "updated_at": "2025-10-08T12:54:48Z",
    "user": "bruce577"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1177,
    "title": "[Question] Why using a kernel device for IP cameras?",
    "body": "I'm wondering why, when we have an IP camera (by using DroidCam on Android for instance), the team decided to plug the IP camera into a loopback device in `/dev/videoX` instead of directly reading the video stream in the code with Opencv `cv2.VideoCapture(url)`. I understand doing this allows controlling FPS & resolution which is not possible when `cv2.VideoCapture(url)` is used directly, however the downside is that you need to map the camera to a kernel device which becomes really cumbersome, especially when you need root access and when the device gets stuck in a weird state.\n\nWhy didn't the team simply read the video stream from `cv2.VideoCapture(url)` and then downsized the video stream inside the code loop? (The only downside of doing this I found is that we can't get 30fps if the stream outputs only 25fps but this shouldn't be a problem imo since `OpenCVCamera.read_loop` adds a 0.1 latency which messes up the fps sync anyways).",
    "url": "https://github.com/huggingface/lerobot/issues/1177",
    "state": "closed",
    "labels": [
      "question",
      "robots",
      "stale"
    ],
    "created_at": "2025-05-31T05:24:21Z",
    "updated_at": "2025-12-31T02:35:18Z",
    "user": "godardt"
  },
  {
    "repo": "pytorch/xla",
    "number": 9272,
    "title": "Improve documentation for running benchmark unit tests",
    "body": "## \ud83d\udcda Documentation\n\nCurrently, in the `benchmarks/` directory, the `README.md` file only specified to use `make -C ...` to run the unit tests for the benchmarking code. The python tests like `test_benchmark_model.py` is not run.\n\nWe need better instructions on how to run the python unit tests.\n\nCurrently, I have to add the `benchmarks/` dir to the `$PYTHONPATH` to have the tests discover the python packages needed for the tests and run the tests by `python test/benchmarks/test_benchmark_model.py`.\n\n@ysiraichi may know a better way.",
    "url": "https://github.com/pytorch/xla/issues/9272",
    "state": "open",
    "labels": [
      "documentation",
      "benchmarking"
    ],
    "created_at": "2025-05-30T22:01:17Z",
    "updated_at": "2025-06-04T12:10:55Z",
    "comments": 1,
    "user": "haifeng-jin"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38501,
    "title": "torch.compile fails for gemma-3-1b-it",
    "body": "### System Info\n\n- `transformers` version: 4.52.4\n- Platform: Linux-6.15.0-1-MANJARO-x86_64-with-glibc2.41\n- Python version: 3.12.8\n- Huggingface_hub version: 0.32.3\n- Safetensors version: 0.5.3\n- Accelerate version: 1.7.0\n- Accelerate config:    not found\n- DeepSpeed version: not installed\n- PyTorch version (GPU?): 2.7.0+cu126 (True)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: no\n- Using GPU in script?: yes\n- GPU type: NVIDIA GeForce RTX 3090 Ti\n\n### Who can help?\n\n@ArthurZucker @gante \n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nRunning `TORCHDYNAMO_VERBOSE=1 TORCH_LOGS=\"+dynamo\" uv run main.py` fails:\n\n<details>\n<summary>Minimal reproducible example</summary>\n\n```python\nimport torch\nfrom transformers import GemmaTokenizer, Gemma3ForCausalLM\n\n\nckpt = \"google/gemma-3-1b-it\"\nmodel = Gemma3ForCausalLM.from_pretrained(\n    ckpt,\n    device_map=\"cuda:0\",\n    torch_dtype=torch.bfloat16,\n)\nprocessor = GemmaTokenizer.from_pretrained(ckpt)\n\n\nmessages = [{\"role\": \"user\", \"content\": \"What is 2^7-2^4??\"}]\ninputs = processor.apply_chat_template(\n    messages,\n    add_generation_prompt=True,\n    tokenize=True,\n    return_dict=True,\n    return_tensors=\"pt\",\n).to(model.device)\n\n\ninput_len = inputs[\"input_ids\"].shape[-1]\n\n\n# generate_fn = model.generate\n\ngenerate_fn = torch.compile(model.generate, fullgraph=True)\n\ngeneration = generate_fn(**inputs, max_new_tokens=100, do_sample=False)\ngeneration = generation[0][input_len:]\n\n\ndecoded = processor.decode(generation, skip_special_tokens=True)\nprint(decoded)\n```\n\n</details>\n\n<details>\n<summary>Stack trace</summary>\n\nFull paste: https://pastebin.com/V103pCWM\n\n```\n  File \"/tmp/gemma_torch/.venv/lib/python3.12/site-packages/torch/_dynamo/variables/builtin.py\", line 2111, in call_deepcopy\n    unimplemented(f\"copy.deepcopy {repr(x)}\")\n  File \"/tmp/gemma_torch/.venv/lib/python3.12/site-packages/torch/_dynamo/exc.py\", line 439, in unimplemented\n    raise Unsupported(msg, case_name=case_name)\ntorch._dynamo.exc.Unsupported: copy.deepcopy UserDefinedObjectVariable(GenerationConfig)\n\nfrom user code:\n   File \"/tmp/gemma_torch/.venv/lib/python3.12/site-packages/torch/_dynamo/external_utils.py\", line 70, in inner\n    return fn(*args, **kwargs)\n  File \"/tmp/gemma_torch/.venv/lib/python3.12/site-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n    return func(*args, **kwargs)\n  File \"/tmp/gemma_torch/.venv/lib/python3.12/site-packages/transformers/generation/utils.py\", line 2354, in generate\n    generation_config, model_kwargs = self._prepare_generation_config(\n  File \"/tmp/gemma_torch/.venv/lib/python3.12/site-packages/transformers/generation/utils.py\", line 1744, in _prepare_generation_config\n    generation_config = copy.deepcopy(generation_config)\n\n```\n\n</details>\n\n### Expected behavior\n\nCompilation proceeds",
    "url": "https://github.com/huggingface/transformers/issues/38501",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-05-30T21:01:41Z",
    "updated_at": "2025-06-02T20:45:54Z",
    "comments": 6,
    "user": "InCogNiTo124"
  },
  {
    "repo": "pytorch/xla",
    "number": 9269,
    "title": "Torch model parameters as HLO constants",
    "body": "## \u2753 Questions and Help\nHello, I am wondering if there is a way to bake model parameters into the produced HLO model as constants. For Torch-XLA it seems like model parameters are treated as additional input args which makes it difficult to port this into openxla/xla for execution in cpp. The HLO produced from Jax already has the model parameters as constants within the model. Is there a way to do something closer to Jax where I can save an HLO/StableHLO model from Torch with the model parameters being a part of the HLO and the only arguments being the true model inputs? Thanks!",
    "url": "https://github.com/pytorch/xla/issues/9269",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-30T20:18:01Z",
    "updated_at": "2025-06-13T04:35:59Z",
    "user": "drewjenks01"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38500,
    "title": "Unable to deploy Gemma 3 on AWS SageMaker due to lack of support in tranfomers release",
    "body": "hi,\n\nit seems when i deploy the model\n\n```\nhuggingface_model = HuggingFaceModel(\n    model_data=model_s3_uri,    \n    role=role,\n    transformers_version=\"4.49.0\",  \n    pytorch_version=\"2.6.0\",\n    py_version=\"py312\",\n)\n\npredictor = huggingface_model.deploy(\n    instance_type=\"ml.g5.48xlarge\",\n    initial_instance_count=1,\n    endpoint_name=\"gemma-27b-inference\",\n    container_startup_health_check_timeout=900\n)\n\nresponse = predictor.predict({\n    \"inputs\": \"what can i do?\"\n})\nprint(response)\n```\n\n```\nModelError: An error occurred (ModelError) when calling the InvokeEndpoint operation: Received client error (400) \nfrom primary with message \"{\n  \"code\": 400,\n  \"type\": \"InternalServerException\",\n  \"message\": \"The checkpoint you are trying to load has model type gemma3_text but Transformers does not \nrecognize this architecture. This could be because of an issue with the checkpoint, or because your version of \nTransformers is out of date.\\n\\nYou can update Transformers with the command pip install --upgrade transformers.\n```\n\nnow i know HuggingFaceModel doesnt support anything above 4.49.0 so if i try to run 4.50.0 it will give an error saying please use this version. the thing is gemma3 is not available in 4.49 so how to fix this? i have the model in my bucket trained just cant deploy it due to the versions of transformers. is there a way to override the container inside the huggingface that takes a more advanced transformer?\n\nI did this, but the issue now is in sagemaker, cuz i cannot use this for the huggingface version as it doesn't support it\npip install git+https://github.com/huggingface/transformers@v4.49.0-Gemma-3",
    "url": "https://github.com/huggingface/transformers/issues/38500",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-30T17:10:22Z",
    "updated_at": "2025-07-08T08:02:37Z",
    "comments": 2,
    "user": "ehrun32"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38499,
    "title": "ModernBERT for MLM outputs incorrect hidden state shape.",
    "body": "### System Info\n\nWhen using `ModernBERTForMaskedLM` with `output_hidden_states=True` the hidden state is not correctly padded when it is returned. A minimal example is included below:\n\n```\nimport torch\nfrom transformers import AutoTokenizer, ModernBertForMaskedLM\n\ntokenizer = AutoTokenizer.from_pretrained(\"answerdotai/ModernBERT-base\")\nmodel = ModernBertForMaskedLM.from_pretrained(\"answerdotai/ModernBERT-base\").to(\"cuda\")\n\ninputs = tokenizer(\n    [\n        \"The capital of France is <mask>.\",\n        \"The name of the first president of the united states is <mask>.\",\n    ],\n    padding=True,\n    return_tensors=\"pt\",\n).to(\"cuda\")\n\nwith torch.no_grad():\n    outputs = model(**inputs, output_hidden_states=True)\n\nprint(inputs[\"attention_mask\"].sum())\n# >>> 26\nprint(outputs.hidden_states[-1].shape)\n# >>> torch.Size([26, 768])\n\n\nassert outputs.hidden_states[-1].shape == inputs[\"input_ids\"].shape + (\n    model.config.hidden_size,\n)\n```\n\nI'm using the following library versions:\n- `transformers==4.48.2`\n- `torch==2.6.0`\n\nIt appears that what is returned is the flattened version as the tensor is 2D and the first dimension corresponds to the sum of the attention mask. This issue doesn't happen when using the non MLM version.\n\nI searched modern bert and hidden state and looked at the recent commits and didn't see any mention of this issue, but it might have been fixed in a newer version without it being obvious.\n\n\n\n### Who can help?\n\n@ArthurZucker \n\n### Information\n\n- [x] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nRun the code provided in the issue with flash attention on a Cuda GPU.\n\n### Expected behavior\n\nThe hidden states should have shape [batch size, max sequence length, model dim] but they have shape [unknown dim (I think the number of unpadded tokens), model dim].",
    "url": "https://github.com/huggingface/transformers/issues/38499",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-05-30T17:02:55Z",
    "updated_at": "2025-07-08T08:02:39Z",
    "comments": 2,
    "user": "jfkback"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1174,
    "title": "[Question] Multi-Rate Sensor and Discrete Event Handling in `lerobot`",
    "body": "Hello `lerobot` Team,\n\nFirst off, huge thanks for building such an awesome open-source project!\n\nI'm currently exploring `lerobot` for a project and have some critical questions regarding its data handling, specifically for multi-rate sensors and discrete events. My understanding from the README is that `lerobot` records at a fixed `fps`, creating a table with `fps * record_time` rows.\n\nThis leads to two primary concerns:\n\n1.  **Multi-Rate Sensors:**\n    Consider a sensor like an IMU operating at 1KHz, while other sensors might be at much lower rates. To capture the IMU data without loss, the `fps` would need to be set extremely high, to match highest-rate-sensor. This implies:\n    * **Massive Data Redundancy:** A significant portion of rows would contain sparse information from the lower-rate sensors.\n    * **Recording Performance:** Could such a high `fps` and resulting data volume negatively impact recording performance, potentially making it infeasible to capture this type of data?\n    * **Storage Load:** This approach would also lead to very large dataset sizes.\n    Am I correct in this interpretation? If so, how does `lerobot` effectively manage multi-rate sensor data to mitigate these issues?\n\n2.  **Discrete Events:**\n    How are discrete events, such as keyboard presses/releases or joystick button presses, recorded into a `LeRobotDataset`? The current design of `LeRobotDataset`, particularly `__nextitem__` and `delta_timestamps`, seems to implicitly assume continuous data that can be interpolated. How does `lerobot` accommodate and represent these non-continuous, event-driven data points within its framework?\n\nA quick response addressing these points would be incredibly helpful for our ongoing development.\n\nThanks for your time and insight!",
    "url": "https://github.com/huggingface/lerobot/issues/1174",
    "state": "open",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-05-30T09:04:13Z",
    "updated_at": "2025-12-17T10:44:46Z",
    "user": "MilkClouds"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38489,
    "title": "VLM reverse mapping logic in modeling_utils.py save_pretrained not doing anything?",
    "body": "### System Info\n\ntransformers version: 4.52.3\nPlatform: Ubuntu 24.04\nPython version: 3.11.0\nHuggingface_hub version: 0.32.2\nSafetensors version: 0.5.3\nAccelerate version: 1.7.0\nAccelerate config: not found\nDeepSpeed version: not installed\nPyTorch version (GPU?): 2.7.0+cu126 (H100)\nTensorflow version (GPU?): not installed (NA)\nFlax version (CPU?/GPU?/TPU?): not installed (NA)\nJax version: not installed\nJaxLib version: not installed\nUsing distributed or parallel set-up in script?: No\nUsing GPU in script?: No\nGPU type: NVIDIA H100\n\n### Who can help?\n\n@amyeroberts @zucchini-nlp \n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nborrowing the reverse key mapping logic in the modeling_utils.py save_pretrained method as shown here:\nhttps://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L3649\nIf we also use the qwen2 model mappings for Qwen2ForConditionalGeneration as an example\nand a sample of keys as shown below to test the reversal logic:\n\n```\nimport re\nfrom transformers import Qwen2VLForConditionalGeneration\ncheckpoint_conversion_mapping = Qwen2VLForConditionalGeneration._checkpoint_conversion_mapping\n\ncheckpoint_keys = [\n    'model.language_model.layers.9.post_attention_layernorm.weight', # Should be remapped\n    'model.layers.9.self_attn.k_proj.bias',                          # Should not be remapped\n    'model.visual.blocks.0.attn.proj.bias',                          # Should be remapped\n    'visual.blocks.0.attn.proj.weight',                              # Should not be remapped\n]\n\nreverse_key_mapping = {v: k for k, v in checkpoint_conversion_mapping.items()}\nfor key in checkpoint_keys:\n    print(f\"\\nOperating on sample key: {key}:\")\n    for pattern, replacement in reverse_key_mapping.items():\n            replacement = replacement.lstrip(\"^\")  # strip off un-needed chars and patterns\n            replacement = re.sub(r\"\\(.*?\\)\", \"\", pattern)\n            key, n_replace = re.subn(pattern, replacement, key)\n            print(f\"pattern: {pattern}, replacement: {replacement}, resultant key: {key}\")\n            # Early exit of the loop\n            if n_replace > 0:\n                print(f\"Result: final mapped key is {key}\")\n                break\n            else:\n                print(f\"Result: no mappings performed\")\n```\nreturns the following output where no mapping reversal is performed where it should be.\n```\nOperating on sample key: model.language_model.layers.9.post_attention_layernorm.weight:\npattern: model.visual, replacement: model.visual, resultant key: model.language_model.layers.9.post_attention_layernorm.weight\nResult: no mappings performed\npattern: model.language_model, replacement: model.language_model, resultant key: model.language_model.layers.9.post_attention_layernorm.weight\nResult: final mapped key is model.language_model.layers.9.post_attention_layernorm.weight\n\nOperating on sample key: model.layers.9.self_attn.k_proj.bias:\npattern: model.visual, replacement: model.visual, resultant key: model.layers.9.self_attn.k_proj.bias\nResult: no mappings performed\npattern: model.language_model, replacement: model.language_model, resultant key: model.layers.9.self_attn.k_proj.bias\nResult: no mappings performed\n\nOperating on sample key: model.visual.blocks.0.attn.proj.bias:\npattern: model.visual, replacement: model.visual, resultant key: model.visual.blocks.0.attn.proj.bias\nResult: final mapped key is model.visual.blocks.0.attn.proj.bias\n\nOperating on sample key: visual.blocks.0.attn.proj.weight:\npattern: model.visual, replacement: model.visual, resultant key: visual.blocks.0.attn.proj.weight\nResult: no mappings performed\npattern: model.language_model, replacement: model.language_model, resultant key: visual.blocks.0.attn.proj.weight\nResult: no mappings performed\n```\n\n### Expected behavior\n\nThe expected behavior should be such that we observe the following mapping:\n```\nmodel.language_model.layers.9.post_attention_layernorm.weight -> model.layers.9.post_attention_layernorm.weight\nmodel.visual.blocks.0.attn.proj.bias-> visual.blocks.0.attn.proj.bias\nmodel.layers.9.self_attn.k_proj.bias -> model.layers.9.self_attn.k_proj.bias (remains the same)\nvisual.blocks.0.attn.proj.weight -> visual.blocks.0.attn.proj.weight (remains the same)\n```\n\nThis could be achieved by changing the reversal code inside the for pattern, replacement in reverse_key_mapping.items(): loop to be \n```\nreplacement = replacement.lstrip(\"^\")  # strip off un-needed chars and patterns\n            replacement = re.sub(r\"\\^?([^(?]+).*\", r\"\\1\", replacement)\n            key, n_replace = re.subn(pattern, replacement, key)\n            print(f\"pattern: {pattern}, replacement: {replacement}, resultant key: {key}\")\n            # Early exit of the loop\n            if n_replace > 0:\n                break\n``` \ninstead.\n\nI could ",
    "url": "https://github.com/huggingface/transformers/issues/38489",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-05-30T08:55:57Z",
    "updated_at": "2025-05-30T13:08:58Z",
    "comments": 6,
    "user": "rolandtannous"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11637,
    "title": "How to load lora weight in distribution applications?",
    "body": "If I want to use xDiT with 2 GPU inference FluxControlPipeline, how should I do\n\nI write a xFuserFluxControlPipeline class,  but it can not load lora weight with right way\nxFuserFluxTransformer in 1GPU have some parameters and another GPU have others.\nHow should I do ??",
    "url": "https://github.com/huggingface/diffusers/issues/11637",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-30T07:14:50Z",
    "updated_at": "2025-06-03T10:15:51Z",
    "user": "Johnson-yue"
  },
  {
    "repo": "huggingface/peft",
    "number": 2558,
    "title": "GraLoRA support?",
    "body": "### Feature request\n\nwill the library support the [GraLoRA](https://arxiv.org/abs/2505.20355) technique?\n\n### Motivation\n\nGraLoRA addresses a fundamental limitation of LoRA: overfitting when the bottleneck is widened.\n\nThe technique seems to more closely approximate full fine-tuning; hybrid GraLoRA gets the best of both worlds, with LoRA benefiting from low-rank scenarios (16 or less) and GraLoRA from high-rank scenarios (16 to 128).\n\nThe authors have a modified peft library; would be nice to have support in the official library.\n\n### Your contribution\n\nI have limited time for the next two weeks. Then, I will be able to contribute.\n\nBut should be very easy for the authors to port the implementation; most of it in the [gralora](https://github.com/SqueezeBits/GraLoRA/tree/8dff8438c80969f5f11f23249fed62aac9d687e8/peft/src/peft/tuners/gralora) sub-package.",
    "url": "https://github.com/huggingface/peft/issues/2558",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-29T18:36:27Z",
    "updated_at": "2025-07-15T15:04:20Z",
    "comments": 10,
    "user": "DiTo97"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1171,
    "title": "sync_read.py",
    "body": "Hi, I am currently testing the functions in the STServo_Python folder to work with my STS3215 motors. When I run the sync_read.py script, I encounter an issue caused by the addParam(self, sts_id) function returning False. I tried several things, but I can't get past the error.\nI made sure that the motor IDs are correct and that the motors are connected and powered. I'm using a GroupSyncRead object with a start_address of SCSCL_PRESENT_POSITION_L and data_length of 4. Still, addParam() fails, and the motor ID is not added to the list.\n\nDoes anyone know why this is happening or how to fix it?\n\nThanks in advance!",
    "url": "https://github.com/huggingface/lerobot/issues/1171",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "robots",
      "stale"
    ],
    "created_at": "2025-05-29T15:33:16Z",
    "updated_at": "2025-12-31T02:35:19Z",
    "user": "Baptiste-le-Beaudry"
  },
  {
    "repo": "huggingface/candle",
    "number": 2974,
    "title": "Any good first issues a newcomer could tackle?",
    "body": "Hey! I've been using this crate for a while now and would love to start contributing back! I notice that your issues aren't labelled, who should I contact/do you have a list of issues that would be good for me?",
    "url": "https://github.com/huggingface/candle/issues/2974",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-29T04:19:18Z",
    "updated_at": "2025-05-30T18:25:37Z",
    "comments": 3,
    "user": "Heidar-An"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1237,
    "title": "[Bug] Potential bugs in \"_grouped_mm\" in Llama4 MoE codes",
    "body": "### Bug description\n\n### Descriptions for Bugs.\n\nI encountered NaN loss values when running Llama 4 MoE experimental codes.\nThe errors come from [here](https://github.com/pytorch/torchtitan/blob/ed2bbc07dda35ce26187bb0d743115381e884b35/torchtitan/experiments/llama4/model/moe.py#L85-L87). \n\nAfaik `offsets` are defined as `torch.cumsum(num_local_tokens_per_expert)` and `x` (`routed_input`) is permuted with the shape of `original_shape + num_experts * ALIGN_SIZE_M`.\nThus, there was a difference between `x.shape[0]` and `offsets[-1]`. \n\nI'm not sure which expert will be allocated for those redundant tensors in x in `grouped_mm`.\nI believe the expected behavior would be the outputs from them should always be 0, because they are filled with 0 values.\nBut `_grouped_mm` sometimes results in large values, which first index of outputs gets `inf` elements ([here](https://github.com/pytorch/torchtitan/blob/ed2bbc07dda35ce26187bb0d743115381e884b35/torchtitan/experiments/llama4/model/moe.py#L322)).\n\n### How to Reproduce?\n\n1. I used [Llama-3.2-1B](https://huggingface.co/meta-llama/Llama-3.2-1B) tokenizer.\n2. I used `debug_model.toml`, but with different batch size and seq_len in 1 H200 GPU. Here is the running script:\n```\ntorchrun --nnodes 1 --nproc_per_node 1  ./torchtitan/train.py  \\\n--job.config_file ./torchtitan/experiments/llama4/train_configs/debug_model.toml --job.dump_folder ./outputs/250528_grouped_mm_debug  \\\n--profiling.save_traces_folder profile_trace --comm.trace_buf_size 0  --checkpoint.folder ./checkpoints/250528_grouped_mm_debug --checkpoint.interval 13000   \\\n--training.steps 114440 --training.batch_size 1 --training.seq_len 2048   \\\n--metrics.log_freq 100 --lr_scheduler.warmup_steps 1000 --optimizer.lr 6e-4  \\\n--parallelism.data_parallel_shard_degree 1 --parallelism.tensor_parallel_degree 1\n```\n3. Add `x = x.to(torch.bfloat16)` and `..., dtype=torch.bfloat16)` for `self.w1`, `self.w2`, and `self.w3`, since 1 GPU will automatically use torch.float32 in the code and `_grouped_mm` requires tensors are in GPU.\n4. I used `pdb` to get intermediate outputs one by one.\n\n\n### Results and Expected Behaviors.\n\nRouted outputs sometimes show the following results (at the first step or a few steps later):\n```\noffsets : tensor([ 176,  416,  736,  992, 1296, 1584, 1840, 2096], device='cuda:0', dtype=torch.int32)\n\nx.shape : torch.Size([2176, 256])\n\nh = F.silu(torch._grouped_mm(x, self.w1, offs=offsets)) :\ntensor([[ 3.7598e-02, -9.3262e-02,  1.3965e-01,  ..., -1.7822e-02,\n         -2.2949e-02,  2.0020e-02],\n        [ 1.1572e-01,  2.2461e-01,  3.1641e-01,  ...,  8.6060e-03,\n         -5.3711e-02, -2.7100e-02],\n        [ 1.4551e-01,  2.1973e-02,  1.3086e-01,  ..., -2.5269e-02,\n          3.7354e-02, -1.5503e-02],\n        ...,\n        [-0.0000e+00,  2.9297e-02, -0.0000e+00,  ...,  5.2246e-02,\n          7.7462e+18, -1.8066e-02],\n        [ 2.8531e+26,  5.1025e-02, -0.0000e+00,  ...,  1.1670e-01,\n          3.2028e-28,  1.5076e-02],\n        [ 6.3348e+26,  3.8818e-02,  4.0250e+01,  ..., -2.8229e-03,\n          2.4844e-32, -8.6670e-03]], device='cuda:0', dtype=torch.bfloat16,\n       grad_fn=<SiluBackward0>)\n\nh = h * torch._grouped_mm(x, self.w3, offs=offsets)\ntensor([[-1.8692e-03, -2.8992e-03,  1.6327e-03,  ..., -1.5564e-03,\n         -1.0681e-02,  5.1022e-05],\n        [-5.5237e-03,  6.0425e-03,  1.0864e-02,  ...,  9.8419e-04,\n          3.0396e-02, -4.2152e-04],\n        [-1.6785e-03, -4.5776e-04, -2.0142e-03,  ...,  1.0193e-02,\n         -4.6082e-03, -1.3733e-04],\n        ...,\n        [ 0.0000e+00,  1.2054e-03, -0.0000e+00,  ..., -2.5177e-03,\n          3.5863e+11, -1.7548e-03],\n        [       -inf,  6.3705e-04,  0.0000e+00,  ...,  9.5825e-03,\n         -2.9000e+02,  3.2234e-04],\n        [ 8.4410e+07,  4.0588e-03, -1.0379e+31,  ...,  3.7432e-05,\n          1.2387e-07, -1.3733e-03]], device='cuda:0', dtype=torch.bfloat16,\n       grad_fn=<MulBackward0>)\n\nout = torch._grouped_mm(h, self.w2, offs=offsets)\ntensor([[ 6.3782e-03,  4.0894e-03, -1.3672e-02,  ..., -8.4839e-03,\n         -2.8229e-03, -3.9978e-03],\n        [-1.9379e-03, -4.6387e-03,  8.5449e-03,  ..., -4.8523e-03,\n         -4.4861e-03, -1.4114e-03],\n        [-3.1128e-03, -2.5177e-03, -3.4332e-03,  ...,  1.3062e-02,\n         -6.7139e-03, -7.6904e-03],\n        ...,\n        [-1.6251e-03, -1.3279e-10, -7.3787e+19,  ..., -5.1659e-10,\n         -3.8780e+34, -3.5834e-10],\n        [ 4.7055e+34, -1.6735e-09,  6.0889e+18,  ..., -1.1205e-09,\n          7.1024e+24,  3.1287e-10],\n        [-2.4087e-21, -2.1682e-09,  3.0898e+20,  ...,  2.9831e-09,\n          2.4898e-30,  5.5297e-10]], device='cuda:0', dtype=torch.bfloat16,\n       grad_fn=<GroupedMmBackward0>)\n```\n\nWe expect that tensors, where the sequence positions are from 2096 to 2176, should be always zero.\nThis causes to hidden states to have nan values, and nan values of loss eventually.\n\n### Versions\n\nPython 3.13 with the following packages:\n\n```\nabsl-py==2.2.2\naiohappyeyeballs==2.6.1\naiohttp==3.11.18\naiosignal==1.3.2\nannotated-types==0.7.0\nast",
    "url": "https://github.com/pytorch/torchtitan/issues/1237",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-29T00:07:09Z",
    "updated_at": "2025-07-08T04:54:37Z",
    "comments": 8,
    "user": "raymin0223"
  },
  {
    "repo": "pytorch/xla",
    "number": 9259,
    "title": "need an incremental build script",
    "body": "## \ud83d\ude80 Feature\n\nAfter making a small change to the source code, we should be able to do an incremental build that only rebuilds the affected targets. We need to document how to do that. It may require writing a script that can be easily invoked.\n\n## Motivation\n\nCurrently we recommend developers to run https://github.com/pytorch/xla/blob/master/scripts/build_developer.sh to rebuild after a change. However, this script doesn't a full rebuild (even though it may benefit from build caching), making it unnecessarily slow.\n\nWe should have a smart build script (e.g. based on make and/or bazel) that skips the rebuilding of things that haven't changed).",
    "url": "https://github.com/pytorch/xla/issues/9259",
    "state": "closed",
    "labels": [
      "tech debt",
      "build"
    ],
    "created_at": "2025-05-28T23:15:38Z",
    "updated_at": "2025-05-30T01:30:56Z",
    "comments": 4,
    "user": "zhanyong-wan"
  },
  {
    "repo": "huggingface/xet-core",
    "number": 358,
    "title": "How can I have snapshot_download to have continue feature? Errors became very common",
    "body": "Whenever some error happens and i run same code, it starts from 0\n\nIt is XET enabled repo and hf xet installed\n\nI really need to have resume feature\n\nmy entire code\n\n\n```\nfrom huggingface_hub import snapshot_download\nimport os\nimport argparse\n\ndef download_models(target_dir=None):\n    \"\"\"\n    Download models from HuggingFace hub to specified directory\n    \n    Args:\n        target_dir (str, optional): Target directory for downloads. \n                                  If None, uses current working directory\n    \"\"\"\n    # Set repo ID\n    repo_id = \"MonsterMMORPG/Kohya_Train\"\n    \n    # Use provided target dir or default to current working directory\n    download_dir = target_dir if target_dir else os.getcwd()\n    \n    # Create target directory if it doesn't exist\n    os.makedirs(download_dir, exist_ok=True)\n    \n    try:\n        snapshot_download(\n            local_dir=download_dir,\n            repo_id=repo_id\n        )\n        print(f\"\\nDOWNLOAD COMPLETED to: {download_dir}\")\n        print(\"Check folder content for downloaded files\")\n        \n    except Exception as e:\n        print(f\"Error occurred during download: {str(e)}\")\n\nif __name__ == \"__main__\":\n    parser = argparse.ArgumentParser(description='Download models from HuggingFace hub')\n    parser.add_argument('--dir', type=str, help='Target directory for downloads', default=None)\n    \n    args = parser.parse_args()\n    download_models(args.dir)\n```",
    "url": "https://github.com/huggingface/xet-core/issues/358",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-05-28T22:30:19Z",
    "updated_at": "2025-11-20T17:08:35Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "pytorch/xla",
    "number": 9256,
    "title": "Docs build issues errors / warnings on duplicate labels (anchors)",
    "body": "Docs build indicates that the docs have duplicate labels (aka anchors). These predate the recent changes to myst but now that we have standardized on the same tooling as upstream PT, we should now start fixing these. Here is an output. Note that you have to manually clean by deleting the build directory to force a full rebuild.\n\n(nightly311) yho_google_com@t1v-n-50ea3a23-w-0:/mnt/disks/yho/pytorch/xla/docs$ ./docs_build.sh \nObtaining pytorch_sphinx_theme from git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme (from -r requirements.txt (line 4))\n  Updating ./src/pytorch-sphinx-theme clone\n  Running command git fetch -q --tags\n  Running command git reset --hard -q 4125c834e1aa0945fde6ef58ff2f77f7abedc460\n  Installing build dependencies ... done\n  Checking if build backend supports build_editable ... done\n  Getting requirements to build editable ... done\n  Preparing editable metadata (pyproject.toml) ... done\nRequirement already satisfied: sphinx==5.0.0 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from -r requirements.txt (line 3)) (5.0.0)\nRequirement already satisfied: sphinxcontrib.katex==0.8.6 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from -r requirements.txt (line 8)) (0.8.6)\nRequirement already satisfied: sphinx-copybutton==0.5.0 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from -r requirements.txt (line 13)) (0.5.0)\nRequirement already satisfied: myst-parser==0.18.1 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from -r requirements.txt (line 15)) (0.18.1)\nRequirement already satisfied: myst-nb==0.16 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from -r requirements.txt (line 18)) (0.16.0)\nRequirement already satisfied: sphinxcontrib-applehelp in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (2.0.0)\nRequirement already satisfied: sphinxcontrib-devhelp in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (2.0.0)\nRequirement already satisfied: sphinxcontrib-jsmath in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (1.0.1)\nRequirement already satisfied: sphinxcontrib-htmlhelp>=2.0.0 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (2.1.0)\nRequirement already satisfied: sphinxcontrib-serializinghtml>=1.1.5 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (2.0.0)\nRequirement already satisfied: sphinxcontrib-qthelp in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (2.0.0)\nRequirement already satisfied: Jinja2>=2.3 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (3.1.6)\nRequirement already satisfied: Pygments>=2.0 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (2.19.1)\nRequirement already satisfied: docutils<0.19,>=0.14 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (0.18.1)\nRequirement already satisfied: snowballstemmer>=1.1 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (3.0.1)\nRequirement already satisfied: babel>=1.3 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (2.17.0)\nRequirement already satisfied: alabaster<0.8,>=0.7 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (0.7.16)\nRequirement already satisfied: imagesize in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (1.4.1)\nRequirement already satisfied: requests>=2.5.0 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (2.32.3)\nRequirement already satisfied: packaging in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from sphinx==5.0.0->-r requirements.txt (line 3)) (25.0)\nRequirement already satisfied: markdown-it-py<3.0.0,>=1.0.0 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from myst-parser==0.18.1->-r requirements.txt (line 15)) (2.2.0)\nRequirement already satisfied: mdit-py-plugins~=0.3.1 in /mnt/disks/yho/miniconda/envs/nightly311/lib/python3.11/site-packages (from myst-parser==0.18.1->-r requirements.txt (line 15)) (0.3.5)\nRequirement already satisfied: pyyaml in /mnt/disks/yho/miniconda/envs/nig",
    "url": "https://github.com/pytorch/xla/issues/9256",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-05-28T19:02:14Z",
    "updated_at": "2025-07-16T22:48:17Z",
    "comments": 1,
    "user": "yaoshiang"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38452,
    "title": "Memory saving by upcasting logits for only non-ignored positions",
    "body": "### Feature request\n\nIn [`loss_utils.py`](https://github.com/huggingface/transformers/blob/main/src/transformers/loss/loss_utils.py), logits are upcasted for float32 for some losses. This can waste memory for cases where certain labels are `ignore_index`. This is especially true for fine tuning cases where one chooses to calculate loss only on the completion. They would keep label as -100 for prompt tokens and upcasting those logits would be unnecessary. We can instead call `logits.float()` after we have our final labels. This would be especially useful for `ForCausalLMLoss` as that seems to be the most likely use case.\n\n### Motivation\n\nWhen fine tuning a causal LM, one can choose to calculate loss only on the completion, thus setting labels for prompt tokens to be -100. Upcasting logits at those positions when calculating loss is not needed. Avoiding that can save memory. Most likely use case is `ForCausalLMLoss`.\n\n### Your contribution\n\nAn example for `ForCausalLMLoss`:\n\n```\ndef ForCausalLMLoss(\n    logits,\n    labels,\n    vocab_size: int,\n    num_items_in_batch: Optional[int] = None,\n    ignore_index: int = -100,\n    shift_labels: Optional[torch.Tensor] = None,\n    **kwargs,\n) -> torch.Tensor:\n    # Don't upcast yet\n    # logits = logits.float()\n\n    if shift_labels is None:\n        # Shift so that tokens < n predict n\n        labels = nn.functional.pad(labels, (0, 1), value=ignore_index)\n        shift_labels = labels[..., 1:].contiguous()   \n\n    # Flatten the tokens\n    logits = logits.view(-1, vocab_size)\n    shift_labels = shift_labels.view(-1)\n\n    # Upcast to float if we need to compute the loss to avoid potential precision issues\n    # Now that we have our final labels, take only the useful logits and then upcast\n    logits = logits[shift_labels != ignore_index]\n    shift_labels = shift_labels[shift_labels != ignore_index]\n    logits = logits.float()\n\n    # Enable model parallelism\n    shift_labels = shift_labels.to(logits.device)\n\n    # Calculate loss on truncated logits and labels\n    loss = fixed_cross_entropy(logits, shift_labels, num_items_in_batch, ignore_index, **kwargs)\n    return loss\n```\n\nWe can do something similar in `ForMaskedLMLoss` on line 83 instead of 77. `ForTokenClassification` does not take `ignore_index` as an argument but we can still do the same here because `fixed_cross_entropy` does take `ignore_index`.\n\nAnother alternative was to move the upcasting to inside `fixed_cross_entropy` but a few losses don't do that. So, that might change/break existing things.\n\nLet me know if this change sounds good. I can submit a PR.",
    "url": "https://github.com/huggingface/transformers/issues/38452",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-05-28T18:58:52Z",
    "updated_at": "2025-05-29T12:38:15Z",
    "comments": 1,
    "user": "harshit2997"
  },
  {
    "repo": "huggingface/speech-to-speech",
    "number": 163,
    "title": "how to use this with Livekit Agent?",
    "body": "how to use this with Livekit Agent?",
    "url": "https://github.com/huggingface/speech-to-speech/issues/163",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-28T18:27:11Z",
    "updated_at": "2025-05-28T18:27:11Z",
    "user": "Arslan-Mehmood1"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38448,
    "title": "num_items_in_batch larger than the actual useful token when computing loss",
    "body": "def fixed_cross_entropy(source, target, num_items_in_batch: int = None, ignore_index: int = -100, **kwargs):\nI check the shape of the inputs and find follows:\nIn [1]: logits.shape\nOut[1]: torch.Size([4, 896, 152064])\n\nIn [2]: labels.shape\nOut[2]: torch.Size([4, 896])\n\nIn [3]: num_items_in_batch\nOut[3]: 4390\n\nWhy is 4390>4*896?",
    "url": "https://github.com/huggingface/transformers/issues/38448",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-28T15:28:05Z",
    "updated_at": "2025-05-31T02:30:07Z",
    "comments": 4,
    "user": "SHIFTTTTTTTT"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38435,
    "title": "[i18n-ro] Translating docs to Romanian",
    "body": "Hi!\n\nLet's bring the documentation to all the Romanian-speaking community \ud83c\udf10 \n\nWho would want to translate? Please follow the \ud83e\udd17 [TRANSLATING guide](https://github.com/huggingface/transformers/blob/main/docs/TRANSLATING.md). Here is a list of the files ready for translation. Let us know in this issue if you'd like to translate any, and we'll add your name to the list.\n\nSome notes:\n\n* Please translate using an informal tone (imagine you are talking with a friend about transformers \ud83e\udd17).\n* Please translate in a gender-neutral way.\n* Add your translations to the folder called `<languageCode>` inside the [source folder](https://github.com/huggingface/transformers/tree/main/docs/source).\n* Register your translation in `<languageCode>/_toctree.yml`; please follow the order of the [English version](https://github.com/huggingface/transformers/blob/main/docs/source/en/_toctree.yml).\n* Once you're finished, open a pull request and tag this issue by including #issue-number in the description, where issue-number is the number of this issue. Please ping @stevhliu for review.\n* \ud83d\ude4b If you'd like others to help you with the translation, you can also post in the \ud83e\udd17 [forums](https://discuss.huggingface.co/).\n\n## Get Started section\n\n- [ ] [index.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/index.md) (in progress, [see](https://github.com/zero-point/transformers/tree/add_ro_translation_to_readme))\n- [ ] [quicktour.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/quicktour.md) \n- [ ] [installation.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/installation.md).\n\n## Tutorial section\n- [ ] [pipeline_tutorial.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/pipeline_tutorial.md)\n- [ ]  [autoclass_tutorial.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/autoclass_tutorial.md)\n- [ ]  [preprocessing.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/preprocessing.md)\n- [ ]  [training.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/training.md)\n- [ ]  [accelerate.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/accelerate.md)\n- [ ]  [model_sharing.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/model_sharing.md)\n- [ ]  [multilingual.md](https://github.com/huggingface/transformers/blob/main/docs/source/en/multilingual.md)\n\n<!--\nKeep on adding more as you go \ud83d\udd25\n-->\n",
    "url": "https://github.com/huggingface/transformers/issues/38435",
    "state": "open",
    "labels": [
      "WIP"
    ],
    "created_at": "2025-05-28T12:01:48Z",
    "updated_at": "2025-05-28T15:53:39Z",
    "comments": 2,
    "user": "zero-point"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38428,
    "title": "[Question] The logic of data sampler in data parallel.",
    "body": "Hi, thanks for your attention.\n\nWhen reading the source code of transformers, I cannot understand the implementation of `_get_train_sampler` in `trainer.py`. Why the default data sampler is `RandomSampler` rather than `DistributedSampler`? How does the trainer handle the sampler for data parallel?\n\nreference code: https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L975",
    "url": "https://github.com/huggingface/transformers/issues/38428",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-28T08:49:13Z",
    "updated_at": "2025-07-06T08:02:36Z",
    "comments": 3,
    "user": "kxzxvbk"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3536,
    "title": "\u2753 [Question] Do you have any plan to release v2.6.1 ?",
    "body": "## \u2753 Question\n\nHello, Torch-TensorRT team,\n\nI'd like to ask if there are any plans to release a patch version, such as v2.6.1.\n\nThe current release (v2.6.0) includes a `breakpoint()` call left in [the code](https://github.com/pytorch/TensorRT/blob/v2.6.0-rc3/py/torch_tensorrt/dynamo/conversion/custom_ops_converters.py#L57), which halts execution and makes the release unusable in production environments unless modified manually or installed from the source. Since `Torch-TensorRT` tightly couples with a specific TensorRT version and PyTorch version, there's currently no alternative.\n\nA quick patch release would be greatly appreciated.\nThanks for your great work.\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3536",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-28T08:37:18Z",
    "updated_at": "2025-06-03T04:50:48Z",
    "user": "junstar92"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38425,
    "title": "Can not load TencentBAC/Conan-embedding-v2",
    "body": "### System Info\n\nDescription\nWhen attempting to load the \u201cConan-embedding-v2\u201d model directly via transformers.AutoModel.from_pretrained, I get a ValueError indicating that the repo\u2019s config.json lacks a model_type key. This prevents the Transformers library from inferring which model class to instantiate.\n\n\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nfrom transformers import AutoModel\n\nmodel = AutoModel.from_pretrained(\"TencentBAC/Conan-embedding-v2\")\n\nValueError: Unrecognized model in TencentBAC/Conan-embedding-v2.\nShould have a `model_type` key in its config.json, or contain one of the following strings in its name: albert, bart, bert, \u2026, whisper, xlnet, \u2026\n\n\n### Expected behavior\n\nAutoModel.from_pretrained(\"TencentBAC/Conan-embedding-v2\") should load the model automatically, or at minimum provide guidance on how to set the correct model_type.",
    "url": "https://github.com/huggingface/transformers/issues/38425",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-05-28T08:21:23Z",
    "updated_at": "2025-05-28T14:58:03Z",
    "comments": 1,
    "user": "shanekao-sks"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3596,
    "title": "How to distribute the model into multiple GPUs using accelerate?",
    "body": "I have 4 GPUs. If I only use a single GPU to train the model, there will be an OutOfMemoryError raised. How can I distribute the model into all the 4 GPUs to avoid the OutOfMemoryError using accelerate?",
    "url": "https://github.com/huggingface/accelerate/issues/3596",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-28T06:27:08Z",
    "updated_at": "2025-05-28T14:06:18Z",
    "user": "GeorgeCarpenter"
  },
  {
    "repo": "huggingface/candle",
    "number": 2971,
    "title": "Enhance the usability of the tensor struct",
    "body": "Hello,\n\nI\u2019m currently learning how to use Candle with the book Dive into Deep Learning, but implementing the code in Candle. I noticed that Candle is missing some practical utility functions, such as:\n\n* The Frobenius norm \n* dot product (vector or matrix dot product)\n* matrix-vector multiplication\n\nWhile these functions aren\u2019t overly complex to implement manually, having them natively supported by the Tensor struct would significantly improve usability.\n\nI\u2019ve tried adding some of these functions myself to extend Candle\u2019s functionality (to make it more user-friendly). ",
    "url": "https://github.com/huggingface/candle/issues/2971",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-28T03:41:44Z",
    "updated_at": "2025-05-29T07:41:02Z",
    "comments": 1,
    "user": "ssfdust"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1323,
    "title": "Cannot get the SAM model running like in example",
    "body": "### Question\n\nI've found that transformers.js supports SAM as written in 2.14.0 release notes.\nhttps://github.com/huggingface/transformers.js/releases/tag/2.14.0\n\nI'm running the code on a M1 mac in a Brave browser.\n\nBut after I've used and adapted the example script, I can actually see in my browser console that the model is loaded and the browser is working.\n\n<img width=\"1129\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/fd256c77-62f5-4da2-a44c-cbb022333789\" />\n\nBut then suddenly it crashes with following error:\n\n```\ntransformers.js:11821 Uncaught Error: An error occurred during model execution: \"Missing the following inputs: input_points, input_labels.\n```\n\n**My adapted code looks like this:**\n\n````javascript\n\n// using version 3.5.1\nimport {AutoProcessor, RawImage, SamModel} from \"./node_modules/@huggingface/transformers/dist/transformers.js\";\n\nconst model = await SamModel.from_pretrained('Xenova/slimsam-77-uniform');\nconst processor = await AutoProcessor.from_pretrained('Xenova/slimsam-77-uniform');\n\nconst img_url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/corgi.jpg';\nconst raw_image = await RawImage.read(img_url);\nconst input_points = [[[340, 250]]] // 2D localization of a window\n\nconst inputs = await processor(raw_image, input_points);\nconst outputs = await model(inputs);   /// Error happens here\n\nconst masks = await processor.post_process_masks(outputs.pred_masks, inputs.original_sizes, inputs.reshaped_input_sizes);\nconsole.log(masks); \n// [\n//   Tensor {\n//     dims: [ 1, 3, 410, 614 ],\n//     type: 'bool',\n//     data: Uint8Array(755220) [ ... ],\n//     size: 755220\n//   }\n// ]\nconst scores = outputs.iou_scores;\nconsole.log(scores);\n// Tensor {\n//   dims: [ 1, 1, 3 ],\n//   type: 'float32',\n//   data: Float32Array(3) [\n//     0.8350210189819336,\n//     0.9786665439605713,\n//     0.8379436731338501\n//   ],\n//   size: 3\n// }\n````\n\n\nMarkup:\n````html\n<!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n        <meta charset=\"utf-8\">\n    </head>\n\n    <body>\n        <h1>SAM DEMO</h1>\n        <script src=\"main.js\" type=\"module\">\n        </script>\n         <pre id=\"pre\"></pre>\n    </body>\n</html>\n````\n\n\nCan you maybe give me a hint what's the issue here or what I must e.g. change according to major version changes.\n\n\nThanks so much :-)",
    "url": "https://github.com/huggingface/transformers.js/issues/1323",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-27T20:01:49Z",
    "updated_at": "2025-11-29T12:32:29Z",
    "user": "BernhardBehrendt"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3367,
    "title": "\ud83d\udca1 [REQUEST] - Proposal: Add Tutorial on Differentiable Decision Forests (DNDF-style)",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\n\n### Proposal: Add a Tutorial/Documentation Example on Differentiable Decision Forests\n\n**Overview**\n\nThis is a proposal to add a well-documented example or tutorial demonstrating a *Differentiable Decision Forest* model in PyTorch \u2014 inspired by the Deep Neural Decision Forests paper (Kontschieder et al., ICCV 2015).\n\nThe goal is not to introduce a new `torch.nn` module, but rather to show how such a model can be implemented using native PyTorch operations in a transparent and educational way.\n\n**Why This?**\n\n- Combines the interpretability of decision trees with the feature learning power of neural networks.\n- Uses soft routing (sigmoid decisions) and learnable leaf distributions (softmax) to allow end-to-end backpropagation.\n- Offers an alternative to traditional ensembles or black-box classifiers, especially for tabular and hybrid domains.\n\n**What the Tutorial Would Include**\n\n- Overview of the model structure (CNN \u2192 decision trees)\n- How to implement soft decisions and routing probabilities (\u03bc) with PyTorch ops like `sigmoid`, `softmax`, `einsum`, `gather`, etc.\n- Joint optimization of routing and leaf distributions\n- Training on MNIST or tabular datasets\n- Emphasis on \"Simple over Easy\" \u2014 no custom abstractions\n\n**Reference**\n\n- [Kontschieder et al., Deep Neural Decision Forests, ICCV 2015](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/06/ICCV15_DeepNDF_main.pdf)\n\n**Final Note**\n\nThis is not a request to add this as a built-in PyTorch module \u2014 in fact, that might go against PyTorch's *Simple over Easy* philosophy.  \nInstead, this would be best suited as a community-contributed tutorial or example in the official [PyTorch Tutorials](https://github.com/pytorch/tutorials) repository or documentation site.\n\nExtended Note\nI'm currently in the middle of university exams and may not be able to actively contribute for a few weeks \u2014 but I\u2019d be very interested in helping develop the tutorial afterwards.\n\n### Existing tutorials on this topic\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/tutorials/issues/3367",
    "state": "open",
    "labels": [
      "tutorial-proposal"
    ],
    "created_at": "2025-05-27T10:01:23Z",
    "updated_at": "2025-07-02T15:00:18Z",
    "comments": 6,
    "user": "Tunahanyrd"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1836,
    "title": "Search feature tasks",
    "body": "We implemented a first version of the search chat feature in  #1823, there's still some todos if people feel like tackling: \n\n- [ ] Right now we only return the N most relevant snippets, we would need to return all matching conversations and implement infinite loading & pagination. The building blocks already exist in `NavMenu.svelte` they need to be ported over.\n- [ ] - It would be nice to show, below the conversation title, a little sample of text which matches the search query, so we can see why it matched, right now we only show the title.",
    "url": "https://github.com/huggingface/chat-ui/issues/1836",
    "state": "closed",
    "labels": [
      "enhancement",
      "help wanted",
      "front",
      "back"
    ],
    "created_at": "2025-05-27T08:17:44Z",
    "updated_at": "2025-06-02T14:30:40Z",
    "comments": 7,
    "user": "nsarrazin"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38396,
    "title": "Can I disable all CI works in my forked version of Transformers?",
    "body": "After I synced the `main` branch of Transformers in my forked version, github keeps running CI works and fails. Can I disable it? Thanks.",
    "url": "https://github.com/huggingface/transformers/issues/38396",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-27T04:44:07Z",
    "updated_at": "2025-05-28T18:06:31Z",
    "comments": 2,
    "user": "ChengLyu"
  },
  {
    "repo": "huggingface/doc-builder",
    "number": 564,
    "title": "How to ignore some line when applying style?",
    "body": "I have this in my code:\n\n```python\nexpected_output = textwrap.dedent(\"\"\"\\\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Step 42 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513 \u2502\n\u2502 \u2503 Prompt     \u2503 Completion   \u2503 Correctness \u2503 Format \u2503 \u2502\n\u2502 \u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529 \u2502\n\u2502 \u2502 The sky is \u2502  blue.       \u2502        0.12 \u2502   0.79 \u2502 \u2502\n\u2502 \u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524 \u2502\n\u2502 \u2502 The sun is \u2502  in the sky. \u2502        0.46 \u2502   0.10 \u2502 \u2502\n\u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\"\"\")\n```\n\nAnd it gets reformatted into this:\n\n```python\nexpected_output = textwrap.dedent(\"\"\"\\\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Step 42 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e \u2502 \u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2502 \u2502 \u2503 Prompt \u2503 Completion \u2503 Correctness \u2503 Format \u2503 \u2502 \u2502 \u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529 \u2502 \u2502\n\u2502 The sky is \u2502 blue. \u2502 0.12 \u2502 0.79 \u2502 \u2502 \u2502 \u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524 \u2502 \u2502 \u2502 The sun is\n\u2502 in the sky. \u2502 0.46 \u2502 0.10 \u2502 \u2502 \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\"\"\")\n```\n\nis there a way to avoid this?",
    "url": "https://github.com/huggingface/doc-builder/issues/564",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-26T21:58:08Z",
    "updated_at": "2025-05-26T21:59:13Z",
    "user": "qgallouedec"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 609,
    "title": "Properties data",
    "body": "### Feature request\n\nPlease add properties for the content of safetensor files.\n(Which can be read without the requirement to load the whole thing ...)\n\n### Motivation\n\nRename all your safetensor files to a numeric value from 1.safetensors to n.safetensors, where n is the amount of such files you have.\n\nNow try to find out, what is inside, like:\n- Model type (checkpoint, lora, ip-adapter-files, anything else)\n- Application type (SD1, SD2, SD3, SDXL, FLUX, Audio, Video and more)\n- Original name\n- Version\n- and more ...\n\nThe safetensor file is like a package without any description. There's something inside, but you don't have any possibility to see what it is.\n\nWhat users are missing is the package label that tells them, what's inside, like anything in the warehouse. If you go shopping, such a label tells you the name, the producers name, the weight and normally something about the ingredients.\n\nIt would be very useful, if a safetensor package could do this too.\n\n### Your contribution\n\nI just have the idea.\nI don't know how to PR  ...",
    "url": "https://github.com/huggingface/safetensors/issues/609",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-26T20:06:13Z",
    "updated_at": "2025-06-16T12:13:08Z",
    "comments": 2,
    "user": "schoenid"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 660,
    "title": "How to control the number of responses per query for each benchmark?",
    "body": "Hi, thank you for the great work!\nIn the README, I noticed that you mention the use of different numbers of responses per query for estimating pass@1 across benchmarks. For example:\n\nBenchmark | Number of responses per query\n-- | --\nAIME 2024 | 64\nMATH-500 | 4\nGPQA Diamond | 8\nLiveCodeBench | 16\n\nHowever, I'm unable to find where in the code or CLI these values are configured. When running the following example:\n\n```\nNUM_GPUS=1\nMODEL=deepseek-ai/{model_name}\nMODEL_ARGS=\"model_name=$MODEL,dtype=bfloat16,max_model_length=32768,gpu_memory_utilization=0.8,data_parallel_size=$NUM_GPUS,generation_parameters={max_new_tokens:32768,temperature:0.6,top_p:0.95}\"\nOUTPUT_DIR=data/evals/$MODEL\n\nlighteval vllm $MODEL_ARGS \"lighteval|aime24|0|0\" \\\n    --use-chat-template \\\n    --output-dir $OUTPUT_DIR\n```\n\nDoes this automatically sample 64 responses per query for AIME24, as indicated in the table? Or do I need to explicitly specify the number of responses? If so, how can I pass that parameter through the CLI?",
    "url": "https://github.com/huggingface/open-r1/issues/660",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-26T14:38:15Z",
    "updated_at": "2025-05-27T15:32:50Z",
    "user": "Zoeyyao27"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38377,
    "title": "Why are the model classes in unit tests imported directly from the transformer package instead of directly importing the model classes in the file? Is there any special consideration?",
    "body": "### Feature request\n\nTake qwen3MoE unit test as an example:\nif is_torch_available():\n    import torch\n\n    from transformers import (\n        Qwen3MoeForCausalLM,\n        Qwen3MoeForQuestionAnswering,\n        Qwen3MoeForSequenceClassification,\n        Qwen3MoeForTokenClassification,\n        Qwen3MoeModel,\n    )\n\nWhy not this:\nfrom src.transformers.models.qwen3_moe.modeling_qwen3_moe import (\n        Qwen3MoeForCausalLM,\n        Qwen3MoeForQuestionAnswering,\n        Qwen3MoeForSequenceClassification,\n        Qwen3MoeForTokenClassification,\n        Qwen3MoeModel,\n        )\n\n### Motivation\n\nUnit tests should guard their own code files\n\n### Your contribution\n\nNo PR has been submitted yet",
    "url": "https://github.com/huggingface/transformers/issues/38377",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-05-26T11:41:19Z",
    "updated_at": "2025-05-26T11:41:19Z",
    "comments": 0,
    "user": "ENg-122"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38375,
    "title": "Unable to run run_instance_segmentation_no_trainer with HF Accelerate",
    "body": "### System Info\n\nI am trying to run the [examples/pytorch/instance-segmentation/run_instance_segmentation_no_trainer.py](https://github.com/huggingface/transformers/blob/d1b92369ca193da49f9f7ecd01b08ece45c2c9aa/examples/pytorch/instance-segmentation/run_instance_segmentation_no_trainer.py) with HF Accelerate. I was able to run the other Trainer API example successfully, but the No Trainer (Accelerate) version is facing the following bug.\n\nThis is using the `4.52.0.dev0` instance. The only change I've made was to change epochs=2. \n\nThe following error arose, when trying to prompt for more information, ChatGPT suggests it could be the following issues but I have no idea on what could be the root cause. No other related issues found and the docs bot was not working. Would appreciate advice on how to run this example script as I hope to adopt it for my task.\n\n| **Category**                | **Potential Issue**                                                                 | **Explanation**                                                                                             | **Recommended Fix**                                                                                   |\n|----------------------------|--------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|\n| **Model Config Mismatch**  | Mismatch in `num_labels` vs checkpoint (81 vs 3)                                     | Causes some layers (e.g., `class_predictor`) to be randomly initialized, might desync ranks                 | Set `config.num_labels = 3` **before** loading the model or use a matching checkpoint                 |\n| **DDP Desynchronization**  | Different logic across ranks (e.g., `if rank == 0:` doing extra things)             | All ranks must call collectives in the same order and time                                                  | Ensure logic is **identical** across all ranks                                                         |\n| **Evaluation in DDP**      | Evaluation logic not synchronized                                                   | Can cause hanging during collective ops like `all_gather`                                                   | Skip evaluation for non-zero ranks or use `if rank == 0:` carefully                                   |\n| **GPU Communication**      | NCCL timeout or deadlock due to driver/hardware/GIL issues                          | Long-running or stuck collectives cause watchdog termination                                                | Set env vars: `NCCL_BLOCKING_WAIT=1`, `NCCL_ASYNC_ERROR_HANDLING=1`, and reduce batch size if needed  |\n| **Distributed Setup**      | Improper `accelerate` or `torchrun` configuration                                   | One process might be behaving incorrectly                                                                   | Test with single GPU first: `CUDA_VISIBLE_DEVICES=0 accelerate launch --num_processes=1 ...`          |\n| **Deprecated Args**        | `_max_size` passed to `Mask2FormerImageProcessor`                                   | Harmless, but messy                                                                                         | Remove `_max_size` from processor initialization                                                       |\n| **Resource Overload**      | GPU memory, bandwidth, or CPU bottleneck                                            | Can indirectly cause slowdowns or crashes                                                                   | Monitor with `nvidia-smi`, lower batch size, reduce `num_workers`                                     |\n\nError message below:\n```\nloading weights file model.safetensors from cache at /home/jiayi/.cache/huggingface/hub/models--facebook--mask2former-swin-tiny-coco-instance/snapshots/22c4a2f15dc88149b8b8d9f4d42c54431fbd66f6/model.safetensors\nInstantiating SwinBackbone model under default dtype torch.float32.\nAll model checkpoint weights were used when initializing Mask2FormerForUniversalSegmentation.\n\nSome weights of Mask2FormerForUniversalSegmentation were not initialized from the model checkpoint at facebook/mask2former-swin-tiny-coco-instance and are newly initialized because the shapes did not match:\n- class_predictor.bias: found shape torch.Size([81]) in the checkpoint and torch.Size([3]) in the model instantiated\n- class_predictor.weight: found shape torch.Size([81, 256]) in the checkpoint and torch.Size([3, 256]) in the model instantiated\n- criterion.empty_weight: found shape torch.Size([81]) in the checkpoint and torch.Size([3]) in the model instantiated\nYou should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n/raid/jiayi/safety_barrier_breach/mask2former_hf/venv/lib/python",
    "url": "https://github.com/huggingface/transformers/issues/38375",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-05-26T10:23:04Z",
    "updated_at": "2025-07-05T08:03:07Z",
    "comments": 3,
    "user": "gohjiayi"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 3117,
    "title": "how to download huggingface model files  organize the http header  and  so on  in other language",
    "body": "Hi, \n          I  want to use another language like java or scala to download  huggging face  model and config.json. but  meet connnect error , it is  not make sense . so  I  want to know does huggingface  have some more  setting to download file ?\n\n````\n\npackage torch.tr\n\nimport java.io.FileOutputStream\nimport java.net.URI\nimport java.net.http.{HttpClient, HttpRequest, HttpResponse}\nimport java.time.Duration\n\nobject HuggingFaceDownloader {\n  def main(args: Array[String]): Unit = {\n    val fileUrl = \"https://huggingface.co/codellama/CodeLlama-7b-Instruct-hf/resolve/main/config.json\"\n    val savePath = \"config.json\"\n\n    val headers = Map(\n      \"Accept-Encoding\" -> \"identity\",\n//      \"user-agent\" -> \"transformers/0.0.1;  java/23.0.2+7-58;  hf_hub/null;  java/23.0.2;  file_type/config;  from_autoclass/false;  session_id/1AC306C59B944E9EA06A482682BE9584; unknown/None\",\n      \"authorization\" -> \"Bearer hf_XXAdogOLotfVSVFMKrWXSITeByDgRe\"\n    )\n\n    try {\n      downloadFile(fileUrl, savePath, headers)\n      println(s\"\u6587\u4ef6\u4e0b\u8f7d\u6210\u529f\uff0c\u4fdd\u5b58\u8def\u5f84: $savePath\")\n    } catch {\n      case e: Exception =>\n        System.err.println(s\"\u6587\u4ef6\u4e0b\u8f7d\u5931\u8d25: ${e.getMessage}\")\n        e.printStackTrace()\n    }\n  }\n\n  def downloadFile(fileUrl: String, savePath: String, headers: Map[String, String]): Unit = {\n    val client = HttpClient.newBuilder()\n      .connectTimeout(Duration.ofSeconds(10))\n      .followRedirects(HttpClient.Redirect.NORMAL)\n      .build()\n\n    val requestBuilder = HttpRequest.newBuilder()\n      .uri(URI.create(fileUrl))\n      .GET()\n\n    headers.foreach { case (key, value) =>\n      requestBuilder.header(key, value)\n    }\n\n    val request = requestBuilder.build()\n\n    val response = client.send(request, HttpResponse.BodyHandlers.ofInputStream())\n\n    if (response.statusCode() == 200) {\n      val inputStream = response.body()\n      val outputStream = new FileOutputStream(savePath)\n      try {\n        val buffer = new Array[Byte](4096)\n        var bytesRead = inputStream.read(buffer)\n        while (bytesRead != -1) {\n          outputStream.write(buffer, 0, bytesRead)\n          bytesRead = inputStream.read(buffer)\n        }\n      } finally {\n        inputStream.close()\n        outputStream.close()\n      }\n    } else {\n      throw new Exception(s\"\u4e0b\u8f7d\u5931\u8d25\uff0c\u72b6\u6001\u7801: ${response.statusCode()}\")\n    }\n  }\n}\n\n```\n\n```\npackage dev.transformers4j.transformers;\n\nimport java.io.BufferedInputStream;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.net.URL;\n\npublic class HuggingFaceDownloader2 {\n\n    public static void main(String[] args) {\n        String fileUrl = \"https://huggingface.co/codellama/CodeLlama-7b-Instruct-hf/resolve/main/config.json\";\n        String savePath = \"config.json\"; // \u672c\u5730\u4fdd\u5b58\u7684\u6587\u4ef6\u8def\u5f84\n\n        try {\n            downloadFile(fileUrl, savePath);\n            System.out.println(\"\u6587\u4ef6\u4e0b\u8f7d\u6210\u529f\uff0c\u4fdd\u5b58\u8def\u5f84: \" + savePath);\n        } catch (IOException e) {\n            System.err.println(\"\u6587\u4ef6\u4e0b\u8f7d\u5931\u8d25: \" + e.getMessage());\n            e.printStackTrace();\n        }\n    }\n\n    /**\n     * \u4ece\u6307\u5b9a URL \u4e0b\u8f7d\u6587\u4ef6\u5e76\u4fdd\u5b58\u5230\u672c\u5730\u8def\u5f84\n     * @param fileUrl \u8981\u4e0b\u8f7d\u7684\u6587\u4ef6\u7684 URL\n     * @param savePath \u672c\u5730\u4fdd\u5b58\u7684\u6587\u4ef6\u8def\u5f84\n     * @throws IOException \u5982\u679c\u5728\u4e0b\u8f7d\u6216\u4fdd\u5b58\u6587\u4ef6\u8fc7\u7a0b\u4e2d\u53d1\u751f I/O \u9519\u8bef\n     */\n    public static void downloadFile(String fileUrl, String savePath) throws IOException {\n        URL url = new URL(fileUrl);\n\n        try (BufferedInputStream in = new BufferedInputStream(url.openStream());\n             FileOutputStream fileOutputStream = new FileOutputStream(savePath)) {\n            System.out.println(\"<UNK>: \" + savePath);\n            byte[] dataBuffer = new byte[1024];\n            int bytesRead;\n            while ((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) {\n                fileOutputStream.write(dataBuffer, 0, bytesRead);\n            }\n        }\n    }\n}\n\n```",
    "url": "https://github.com/huggingface/huggingface_hub/issues/3117",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-26T10:00:25Z",
    "updated_at": "2025-06-15T14:55:48Z",
    "user": "mullerhai"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 510,
    "title": "anyone can run unit 1 dumm agent notebook????",
    "body": "<img width=\"1226\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1813be3d-0d73-478e-86fa-11304e796614\" />",
    "url": "https://github.com/huggingface/agents-course/issues/510",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-25T03:00:04Z",
    "updated_at": "2025-06-25T09:03:52Z",
    "user": "chaoshun2025"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1223,
    "title": "How to pretrain from scratch a Qwen 2.5 7B-base model using Torchtitan?",
    "body": "HI team,\n\nThank you for the excellent work!\n\nCould you please tell me where to find example scripts/templates for pretraining from scratch a Qwen 2.5 7B-base model using Torchtitan?\n\nThanks again!",
    "url": "https://github.com/pytorch/torchtitan/issues/1223",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-25T00:42:15Z",
    "updated_at": "2025-08-21T03:18:41Z",
    "user": "tjoymeed"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38346,
    "title": "Why is return_assistant_tokens_mask and continue_final_message incompatible?",
    "body": "I'm currently authoring a new chat template, and while debugging encountered the check for this, however when uncommenting the check, the resulting mask and template both seem to still be correct. So I'm curious as to why or whether this check is needed at all?\n\nI can see it was introduced in [the original PR](https://github.com/huggingface/transformers/pull/33198), however there doesn't seem to be any justification/explanation for this assertion.",
    "url": "https://github.com/huggingface/transformers/issues/38346",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-24T23:44:13Z",
    "updated_at": "2025-07-02T08:03:11Z",
    "comments": 2,
    "user": "nyxkrage"
  },
  {
    "repo": "huggingface/candle",
    "number": 2967,
    "title": "Logit Discrepancy Between Candle and PyTorch When Using XLM-RoBERTa Model",
    "body": "When running the same XLM-RoBERTa model (`s-nlp/xlmr_formality_classifier` - [HF](https://huggingface.co/s-nlp/xlmr_formality_classifier) ) in both Candle and PyTorch, I'm observing significant differences in the logits produced by the model's classification head for identical inputs. Is this expected behavior? See [this repository](https://github.com/jpe90/candle-pytorch-parity-testing/tree/master/xlm-roberta-finetuned) for a reproduction.\n\n## Environment/Setup\n\n- Model: `s-nlp/xlmr_formality_classifier` \n- Candle version: 0.9.1\n- Model SHA256: `66037d963856d6d001f3109d2b3cf95c76bce677947e66f426299c89bc1b58e7`\n- OS: macOS\n\n## Observed Behavior\n\nGiven identical inputs, the logits produced by Candle and PyTorch differ significantly:\n\n**Candle logits:**\n```\n[[2.0820313, -1.7548828], [0.7783203, -0.5629883], [1.2871094, -1.0039063], [2.1601563, -1.9277344]]\n```\n\n**PyTorch logits:**\n```\n[[ 2.6433, -2.3445],\n [ 1.0379, -0.9621],\n [ 1.4154, -1.2704],\n [ 3.4423, -3.1726]]\n```\n\n## Expected Behavior\n\nI would expect the logits to be extremely close (within floating-point precision differences) when running the same model with identical inputs across different frameworks.\n\n## Steps to Reproduce\n\n1. Clone the repository: https://github.com/jpe90/candle-pytorch-parity-testing\n2. Run the PyTorch implementation in `/xlm-roberta-finetuned/pytorch/main.py`\n3. Run the Candle implementation in `/xlm-roberta-finetuned/candle/src/main.rs`\n4. Compare the logits produced by both implementations\n\n## Additional Context\n\n- The tokenization appears to be identical between both implementations (identical token IDs)\n- I checked and made sure model checksums match at runtime\n- Config seems to match ([see here](https://github.com/jpe90/candle-pytorch-parity-testing/blob/master/xlm-roberta-finetuned/troubleshooting.md))\n\n## Questions\n\n1. Should I expect identical (or very close) logits between PyTorch and Candle implementations?\n2. If differences are expected, what is the acceptable range of variation?\n3. Could these differences impact more sensitive applications that rely on logit values rather than just the final classifications?\n4. Are there known issues with XLM-RoBERTa models specifically in Candle?\n",
    "url": "https://github.com/huggingface/candle/issues/2967",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-24T17:24:33Z",
    "updated_at": "2025-05-26T10:45:24Z",
    "comments": 2,
    "user": "jpe90"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11607,
    "title": "with a custom attention processor for Flux.dev, inference time changes when manually load and inject the transformer model into a flux pipeline versus let the flux pipeline constructor load the transformer internally.",
    "body": "With a custom attention processor for Flux.dev transformer, the inference time is different between the following two ways:\n\n1. Manually load and inject the transformer into a flux.dev pipeline\n\n2. Let the pipeline constructor load the transformer internally\n\nThe inference time of the first way is about 15% slower than second way.\nWhat is the reason?\nI built diffusers from the source code.\nAny insights are appreciated!",
    "url": "https://github.com/huggingface/diffusers/issues/11607",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-24T06:42:11Z",
    "updated_at": "2025-05-26T01:27:00Z",
    "comments": 1,
    "user": "LinchuanXuTheSEAAI"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38326,
    "title": "Allow `MllamaModel` to accept `pixel_values` and `inputs_embeds`",
    "body": "### Feature request\n\n`MllamaModel` does not allow users to pass `pixel_values` and `inputs_embeds` simultaneously:\nhttps://github.com/huggingface/transformers/blob/54cd86708d2b63a1f696ee1c59384a2f04100f57/src/transformers/models/mllama/modeling_mllama.py#L1702-L1705\n\nHowever, commenting out those lines and running the follow script does generate the same logits:\n```python\nimport torch\nfrom transformers import MllamaForConditionalGeneration, AutoProcessor\n\n\nmodel_id = \"meta-llama/Llama-3.2-11B-Vision-Instruct\"\nmodel = MllamaForConditionalGeneration.from_pretrained(\n    model_id, device_map=\"auto\", torch_dtype=torch.bfloat16\n)\nprocessor = AutoProcessor.from_pretrained(model_id)\n\nmessages = [\n    [\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"image\",\n                    \"url\": \"https://llava-vl.github.io/static/images/view.jpg\",\n                },\n                {\"type\": \"text\", \"text\": \"What does the image show?\"},\n            ],\n        }\n    ],\n]\ninputs = processor.apply_chat_template(\n    messages,\n    add_generation_prompt=True,\n    tokenize=True,\n    return_dict=True,\n    return_tensors=\"pt\",\n).to(model.device)\n\noutputs = model(**inputs)\n\n# Manually compute inputs_embeds\ninput_ids = inputs.pop(\"input_ids\")\ninputs_embeds = model.get_input_embeddings()(input_ids)\nnew_outputs = model(inputs_embeds=inputs_embeds, **inputs)\nassert torch.allclose(outputs.logits, new_outputs.logits)\n```\n\n### Motivation\n\nBeing able to pass `inputs_embeds` along with `pixel_values` enables soft embeddings to be passed to the model in addition to images, which is useful for prompt tuning.\n\n### Your contribution\n\nCould contribute a PR removing the check assuming there isn't something I'm unaware of about the check.",
    "url": "https://github.com/huggingface/transformers/issues/38326",
    "state": "closed",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-05-23T15:26:28Z",
    "updated_at": "2025-05-27T16:33:57Z",
    "comments": 1,
    "user": "dxoigmn"
  },
  {
    "repo": "pytorch/audio",
    "number": 3918,
    "title": "`io.UnsupportedOperation: seek` when using `torchaudio.io.StreamWriter` with a File-like object",
    "body": "### \ud83d\udc1b Describe the bug\n\nIn [the tutorial for `StreamWriter`](https://docs.pytorch.org/audio/stable/tutorials/streamwriter_basic_tutorial.html#file-like-objects), it is clearly stated that `StreamWriter` works with File-like object that implements `io.RawIOBase.write`. However, when I used `StreamWriter` with the [Google Cloud Storage `BlobWriter`](https://cloud.google.com/python/docs/reference/storage/latest/google.cloud.storage.fileio.BlobWriter) object that implements `write` but not `seek`, an error is thrown on calling `StreamWriter.close()`:\n\n```python\nfrom google.cloud.storage import Blob\nfrom torch.io import StreamWriter\n\nblob = Blob(name=..., bucket=...)\n\nwith blob.open(\"wb\") as f:\n    writer = StreamWriter(dst=f)\n    with writer.open():\n        ...\n```\n```\nself = <torio.io._streaming_media_encoder.StreamingMediaEncoder object at 0x110096190>\n\n    def close(self):\n        \"\"\"Close the output\n    \n        :py:class:`StreamingMediaEncoder` is also a context manager and therefore supports the\n        ``with`` statement.\n        It is recommended to use context manager, as the file is closed automatically\n        when exiting from ``with`` clause.\n    \n        See :py:meth:`StreamingMediaEncoder.open` for more detail.\n        \"\"\"\n        if self._is_open:\n>           self._s.close()\nE           io.UnsupportedOperation: seek\n\n.venv/lib/python3.11/site-packages/torio/io/_streaming_media_encoder.py:451: UnsupportedOperation\n```\n\nClearly `seek` is called in `close()`, which causes this error. For now, can I get around this issue by not calling `close` on the `writer` object but do call `close` the `blob` object?\n\n### Versions\n\ngoogle-cloud-storage           3.1.0\ntorchaudio                     2.6.0",
    "url": "https://github.com/pytorch/audio/issues/3918",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-23T15:24:45Z",
    "updated_at": "2025-05-23T15:40:48Z",
    "comments": 0,
    "user": "digicosmos86"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38323,
    "title": "`PYTHONOPTIMIZE=2` seems not work with `transformers-`based library",
    "body": "### System Info\n\nI am currently having the latest package install.\ntorch 2.6.0+cu124\ntransformers 4.51.3\nsentence-transformers 4.1.0\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nError:\n\n```python\nFile \"<frozen importlib._bootstrap>\", line 488, in _call_with_frames_removed\n  File \"D:\\Dataset\\AgentAI\\.venv\\Lib\\site-packages\\transformers\\modeling_utils.py\", line 5494, in <module>\n    class SQuADHead(nn.Module):\n    ...<113 lines>...\n                    )\n  File \"D:\\Dataset\\AgentAI\\.venv\\Lib\\site-packages\\transformers\\modeling_utils.py\", line 5513, in SQuADHead\n    @replace_return_docstrings(output_type=SquadHeadOutput, config_class=PretrainedConfig)\n     ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Dataset\\AgentAI\\.venv\\Lib\\site-packages\\transformers\\utils\\doc.py\", line 1194, in docstring_decorator\n    lines = func_doc.split(\"\\n\")\n            ^^^^^^^^^^^^^^\nAttributeError: 'NoneType' object has no attribute 'split'\n```\n\nA simple reproduction:\n\n```python\nfrom sentence_transformers import SentenceTransformer\n\nmodel = SentenceTransformer('all-MiniLM-L6-v2')\n\nembedding = model.encode(\"What is the capital of France?\")\nprint(embedding.shape)\n```\n\n### Expected behavior\n\nThis is not actually an issue, but I expect a documentation update from `transformers` maintainer to any end-users who use or develop a `transformers-` based library on the function `replace_return_docstrings` at `src/transformers/utils/doc.py` is to don't strip out the docstring by switching the option `PYTHONOPTIMIZE=2` to reduce the size of the bytecode. The use of `PYTHONOPTIMIZE=1` is OK\n\nThe reason is that the function `replace_return_docstrings` is expecting to be a decorator function without supporting the case of empty docstring. In some case, such as web hosting on Docker or production environment, or hosting an LLM without tool call where we usually strip out the docstring. \n\nIn the reproduction above (my use-case), I am just need to run the RAG search and thus don't need the docstring to be there.",
    "url": "https://github.com/huggingface/transformers/issues/38323",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-05-23T14:24:34Z",
    "updated_at": "2025-05-26T14:29:17Z",
    "comments": 1,
    "user": "IchiruTake"
  },
  {
    "repo": "huggingface/candle",
    "number": 2965,
    "title": "Are there any support for complex number?",
    "body": "Are there any support for complex number?",
    "url": "https://github.com/huggingface/candle/issues/2965",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-23T09:33:47Z",
    "updated_at": "2025-11-23T22:16:54Z",
    "comments": 1,
    "user": "hndrbrm"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3586,
    "title": "Where is PartialState._shared_state initialized?",
    "body": "Hi! When I step through the code line by line, before this line ([entering into `__init__` of `AcceleratorState`](https://github.com/huggingface/accelerate/blob/v0.34.2/src/accelerate/state.py#L856 )) , `PartialState._shared_state`returns\n```\n{}\n```\nBut after entering into `__init__` of `AcceleratorState`, `PartialState._shared_state`returns\n```\n{'_cpu': False, 'backend': 'nccl', 'device': device(type='cuda', index=0), 'debug': False, 'distributed_type': <DistributedType.DEE...EEPSPEED'>, 'num_processes': 1, 'process_index': 0, 'local_process_index': 0, 'fork_launched': False}\n``` \nI'm wondering where is `PartialState._shared_state` initialized?",
    "url": "https://github.com/huggingface/accelerate/issues/3586",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-23T08:17:44Z",
    "updated_at": "2025-06-30T15:08:15Z",
    "user": "SonicZun"
  },
  {
    "repo": "pytorch/ao",
    "number": 2249,
    "title": "int4_weight_only get plain weight are padded",
    "body": "I try to quantize a model with int4_weight_only, and want to get the plained weight, but found the weight has been padded. To reproduce it, run the following script:\n```python\nimport torch\nfrom transformers import TorchAoConfig, AutoModelForCausalLM\n \nmodel_name = \"JackFram/llama-68m\"\nquantization_config = TorchAoConfig(\"int4_weight_only\")\nquantized_model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map=\"cuda:0\", quantization_config=quantization_config)\nprint(quantized_model.model.layers[0].self_attn.q_proj.weight.tensor_impl.get_plain()[0].shape)\nprint(quantized_model.model.layers[0].self_attn.q_proj.weight.tensor_impl.get_plain()[0])\n```\noutput\n```\n(768, 1024)\ntensor([[11, 12,  8,  ...,  0,  0,  0],\n        [ 5,  6,  5,  ...,  0,  0,  0],\n        [ 5,  7,  7,  ...,  0,  0,  0],\n        ...,\n        [ 7,  5,  2,  ...,  0,  0,  0],\n        [ 6,  1,  7,  ...,  0,  0,  0],\n        [ 8, 11,  9,  ...,  0,  0,  0]], device='cuda:0', dtype=torch.int32)\n```\nThe original shape should be `(768, 768)`, but the plained weight shape is `(768, 1024)`. Can we have a remove padding process in `get_plain()` function?",
    "url": "https://github.com/pytorch/ao/issues/2249",
    "state": "open",
    "labels": [
      "question",
      "quantize_"
    ],
    "created_at": "2025-05-23T07:17:20Z",
    "updated_at": "2025-06-24T20:14:53Z",
    "user": "jiqing-feng"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38300,
    "title": "Will Gemma 3n be added to transformers?",
    "body": "### Model description\n\nQuestion: Are there plans from Google or Huggingface to implement Gemma 3n in other frameworks?\n\nI've seen the LiteRT weights and Android App Link on Huggingface, and was wandering if it would be possible to convert the model architecture in the *.task file to a transformer pytorch Module?\n\nPersonally I'll really interested in the Per-Layer Embeddings and MatFormer implementation they used, but do not have any experience with Tensorflow Lite\n\n### Open source status\n\n- [ ] The model implementation is available\n- [X] The model weights are available\n\n### Provide useful links for the implementation\n\nhttps://huggingface.co/google/gemma-3n-E4B-it-litert-preview",
    "url": "https://github.com/huggingface/transformers/issues/38300",
    "state": "closed",
    "labels": [
      "New model"
    ],
    "created_at": "2025-05-22T15:26:20Z",
    "updated_at": "2025-06-30T07:07:53Z",
    "comments": 4,
    "user": "TheMrCodes"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38281,
    "title": "KeyError in Llama-4-Maverick-17B-128E-Instruct-FP8 Inference with Offloading",
    "body": "### Issue Description\nLoading `meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8` succeeds with `transformers==4.51.0`, but inference fails with `KeyError: 'model.layers.37.feed_forward.experts.gate_up_proj'` during `model.generate`. This occurs on 4x NVIDIA RTX A6000 (~196GB VRAM, CUDA 12.4, Python 3.12.3, Ubuntu 24.04.2) with offloading, critical for sentiment analysis (~100\u2013150GB/day, ~85\u201390% accuracy). Disabling MoE (`num_experts=0`) didn\u2019t resolve it.\n\n### Steps to Reproduce\n1. Install dependencies:\n   ```bash\n   pip install torch==2.4.1 accelerate==1.7.0 compressed-tensors==0.9.4 transformers==4.51.0\n\n2. Confirm model files (~389GB, 84 .safetensors) at /mnt/data/ai_super_palace/models/llama4/.\n\n3. Run:\nimport os\nimport torch\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\nos.environ[\"TORCHVISION_DISABLE_NMS\"] = \"1\"\nmodel = AutoModelForCausalLM.from_pretrained(\n    '/mnt/data/ai_super_palace/models/llama4',\n    torch_dtype=torch.float16,\n    device_map=\"auto\",\n    low_cpu_mem_usage=True,\n    offload_folder=\"/mnt/data/ai_super_palace/models/llama4/offload\",\n    config={\"parallel_style\": \"none\"}\n)\ntokenizer = AutoTokenizer.from_pretrained('/mnt/data/ai_super_palace/models/llama4')\nprompt = \"What is the sentiment of this text: 'I love this product, it's amazing!'\"\ninputs = tokenizer(prompt, return_tensors=\"pt\").to(model.device)\noutputs = model.generate(**inputs, max_new_tokens=50)\nprint(tokenizer.decode(outputs[0], skip_special_tokens=True))\n\n4. Error:\nKeyError: 'model.layers.37.feed_forward.experts.gate_up_proj'\n\n**Environment**\nTransformers: 4.51.0\nPython: 3.12.3\nPyTorch: 2.4.1\nCUDA: 12.4\nAccelerate: 1.7.0\nCompressed-tensors: 0.9.4\nOS: Ubuntu 24.04.2 LTS\nHardware: 4x NVIDIA RTX A6000 (~196GB VRAM)\nModel: meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8\n\n**Additional Details**\nModel card requires transformers>=4.51.0, supports FP8 via compressed-tensors.\nWarnings: Uninitialized MoE weights (feed_forward.experts.*), offloaded parameters (VRAM limit).\nPrior errors (TypeError: NoneType not iterable) resolved with config={\"parallel_style\": \"none\"}.\nSuspect bug in accelerate offloading or MoE weight initialization.\n\n**Request**\nIs this a known llama4 MoE offloading issue?\nCan MoE weights be initialized or offloading fixed?\nWorkaround for inference without re-downloading (~389GB)?\nUrgent for sentiment analysis.\n\n**Logs**\nSee traceback above. config.json (40KB) available.\n\nThank you!\n\n\n\n\n\n\n\n\n\n\n\n\n",
    "url": "https://github.com/huggingface/transformers/issues/38281",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-22T05:45:30Z",
    "updated_at": "2025-07-27T08:03:11Z",
    "comments": 4,
    "user": "pchu2025"
  },
  {
    "repo": "pytorch/xla",
    "number": 9236,
    "title": "make README work for people using python 3.12/13",
    "body": "## \ud83d\udcda Documentation\n\nThe installation instructions in README fail if the user has python 3.12 or 3.13 as the default. (Currently pytorch-xla only works with python 3.8-3.11.)\n\nWe should:\n\n- document the requirement for the python version.\n- add workaround instructions for people whose default python version is not 3.8-3.11.",
    "url": "https://github.com/pytorch/xla/issues/9236",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-05-22T00:33:29Z",
    "updated_at": "2025-05-22T16:09:41Z",
    "comments": 4,
    "user": "zhanyong-wan"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38268,
    "title": "Group beam search with sampling?",
    "body": "### Feature request\n\nIn the current generation code, group beam search is necessarily greedy. From a theoretical point of view, it is not very clear why that should be the case, since the diversity penalty is applied on the logits anyway, yielding a full distribution from which sampling can still be performed.\n\n### Motivation\n\nI think there is a reasonable use case for such a feature: diversity beam search is very useful in particular for modalities like biological sequences which increasingly use the transformers library, but I could see it be useful as well for natural language or code, to generate diverse paths without falling to the drawbacks of greedy generation. From a more abstract point of view it is also seemingly unjustified to allow sampling for standard beam search and not for diversity beam search.\n\n### Your contribution\n\nI am aware of the work in #30810 so don't want to disrupt but would be happy to look into it.",
    "url": "https://github.com/huggingface/transformers/issues/38268",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-05-21T18:08:59Z",
    "updated_at": "2025-06-06T18:11:13Z",
    "comments": 4,
    "user": "adrian-valente"
  },
  {
    "repo": "huggingface/candle",
    "number": 2961,
    "title": "Shape Mismatch in MatMul During Forward Pass of ModernBertForSequenceClassification",
    "body": "ModernBertForSequenceClassification model (hidden size = 768, sequence length = 128) to categorize text into one of classes. During the initial training epoch, however, the forward pass fails with a \u201cshape mismatch in matmul\u201d error.\nIs there any way to solve this?\n\n\n #Error log\nTokenized shape: [4, 128]\nAttention mask shape: [4, 128]\nInput IDs shape: [4, 128]\nAttention mask shape: [4, 128]\nFirst sample token count: 128\nError in forward pass: shape mismatch in matmul, lhs: [4, 128], rhs: [768, 768]\nInput shape: [4, 128], Attention mask shape: [4, 128]\nError: shape mismatch in matmul, lhs: [4, 128], rhs: [768, 768]\n\n\n#Expected Behavior\n    Input IDs should be a tensor of shape (batch_size, sequence_length) whose values are token indices (integers) and which the embedding layer then projects into the model\u2019s hidden dimension (hidden_size = 768) before any matrix multiplication with weight matrices of shape (768, 768)\n    The forward pass should succeed without dimension errors, yielding logits of shape (batch_size, num_classes).\n\n\n#Code\n\n```\nuse candle_core::{Device, Tensor, D, DType, Error};\nuse candle_nn::{ops, loss,  VarBuilder, optim::{Optimizer},var_map::VarMap};\nuse candle_transformers::models::modernbert::{ClassifierConfig, ClassifierPooling, ModernBertForSequenceClassification,Config\n};\nuse hf_hub::{api::sync::Api, Repo, RepoType};\nuse tokenizers::{PaddingParams, Tokenizer};\nuse std::collections::HashMap;\nuse candle_optimisers::adam::{ParamsAdam, Adam};\nuse rand::{seq::SliceRandom, SeedableRng};\nuse rand::rngs::StdRng;\n// Training settings\nconst LEARNING_RATE: f64 = 2e-5;\nconst EPOCHS: usize = 5;\nconst BATCH_SIZE: usize = 8;\nconst SEQ_LEN: usize = 128; // Sequence length\nconst SEED: u64 = 42;\n\n// Data structure for text and label mapping\ntype LabeledDataset = HashMap<String, usize>;\n\n\nfn main() -> Result<(), Box<dyn std::error::Error>> {\n    // Device selection (CPU or GPU)\n    let device = candle_examples::device(true)?;\n    println!(\"Using device: {:?}\", device);\n    \n    // HuggingFace API configuration\n    let revision = \"main\".to_string();\n    let api = Api::new()?;\n    let model_id = \"answerdotai/ModernBERT-base\".to_string();\n    let repo = api.repo(Repo::with_revision(\n        model_id,\n        RepoType::Model,\n        revision,\n    ));\n\n    // Load tokenizer and model configuration\n    let tokenizer_filename = repo.get(\"tokenizer.json\")?;\n    let config_filename = repo.get(\"config.json\")?;\n    let weights_filename = repo.get(\"model.safetensors\")?;\n    \n    // Load configuration file\n    let config = std::fs::read_to_string(config_filename)?;\n    let mut config: Config = serde_json::from_str(&config)?;\n    \n    // Output model configuration\n    println!(\"Model config:\");\n    println!(\"  Hidden size: {}\", config.hidden_size);\n    println!(\"  Intermediate size: {}\", config.intermediate_size);\n    println!(\"  Max position embeddings: {}\", config.max_position_embeddings);\n    println!(\"  Num attention heads: {}\", config.num_attention_heads);\n    println!(\"  Num hidden layers: {}\", config.num_hidden_layers);\n    println!(\"  Vocab size: {}\", config.vocab_size);\n\n    \n    // Check configuration compatibility\n    if config.max_position_embeddings < SEQ_LEN {\n        println!(\"Warning: SEQ_LEN ({}) is larger than max_position_embeddings ({}), adjusting SEQ_LEN\",\n                SEQ_LEN, config.max_position_embeddings);\n    }\n    \n    // Initialize tokenizer\n    let mut tokenizer = Tokenizer::from_file(tokenizer_filename).map_err(Error::msg)?;\n    \n    // Padding and truncation settings\n    tokenizer\n        .with_padding(Some(PaddingParams {\n            strategy: tokenizers::PaddingStrategy::Fixed(SEQ_LEN),\n            pad_id: config.pad_token_id,\n            pad_token: \"[PAD]\".to_string(),\n            pad_type_id: 0,\n            pad_to_multiple_of: None,\n            direction: tokenizers::PaddingDirection::Right,\n        }))\n        .with_truncation(Some(tokenizers::TruncationParams {\n            max_length: SEQ_LEN,\n            strategy: tokenizers::TruncationStrategy::LongestFirst,\n            stride: 0,\n            direction: tokenizers::TruncationDirection::Right,\n        }))\n        .map_err(Error::msg)?;\n\n    // Configure label mappings\n    let mut id2label = HashMap::new();\n    let mut label2id = HashMap::new();\n\n    let class_names = vec![\"News\", \"Entertainment\", \"Sports\", \"Technology\"];\n    for (i, name) in class_names.iter().enumerate() {\n        id2label.insert(i.to_string(), name.to_string());\n        label2id.insert(name.to_string(), i.to_string());\n    }\n    \n    // Add classifier configuration\n    config.classifier_config = Some(ClassifierConfig {\n        id2label: id2label.clone(),\n        label2id: label2id.clone(),\n        classifier_pooling: ClassifierPooling::CLS, // Use [CLS] token for pooling\n    });\n\n    // Create variable map for the model\n    let mut varmap = VarMap::new();\n    // Load model weights\n    varmap.load(weights_filename)?;\n    let vb = VarBuilder::from_varmap(&varmap",
    "url": "https://github.com/huggingface/candle/issues/2961",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-21T14:25:07Z",
    "updated_at": "2025-06-08T12:11:46Z",
    "comments": 2,
    "user": "whitebox2"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 154027,
    "title": "How to add custom attributes to torch tensor?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHow can I add custom attributes like device_local or host_local to a PyTorch tensor without affecting TensorImpl or StorageImpl? I have a use case where I need to convert an external tensor into a PyTorch tensor while preserving such properties\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/154027",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-21T09:13:16Z",
    "updated_at": "2025-05-21T13:42:11Z",
    "user": "bailuan"
  },
  {
    "repo": "pytorch/vision",
    "number": 9079,
    "title": "Build pytorch trunk from source and build vision from source makes `import torchvision;` fail",
    "body": "### \ud83d\udc1b Describe the bug\n\nIf I build pytorch from turnk (2.8+1478d0185c29) and build vision from source, I can't run `import torchvision;`.\n\n```\nimport torchvision\n```\n\nwill report: `RuntimeError: operator torchvision::nms does not exist`.\n\nIt will succeed if I replace the version of pytorch from trunk to branch `release/2.7`. (Build from source still).\n\nHow can I build vision with pytorch from source?\n\n### Versions\n\ntrunk d02b1845a2fabea1eb8f9d09310369a5cbb5514f",
    "url": "https://github.com/pytorch/vision/issues/9079",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-21T03:25:05Z",
    "updated_at": "2025-09-02T15:27:37Z",
    "comments": 3,
    "user": "ChuanqiXu9"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 154009,
    "title": "SourcelessBuilder.create does not know how to wrap <class '__main__.InFlexData'>",
    "body": "### \ud83d\udc1b Describe the bug\n\nI am trying to use torch compile on my functions and encounter this issue. I attached a minimum test program so anyone can reproduce the issue. \n\n```python\nfrom dataclasses import dataclass\n\nimport torch\n\n@dataclass(frozen=True)\nclass BaseFlexData:\n    dtype: torch.dtype | None = None\n\n    def view(self, x: torch.Tensor):\n        if self.dtype is None:\n            return x\n        return x.view(self.dtype)\n\n    def reinterpret(self, x):\n        if self.dtype is None or x.dtype.itemsize > 1:\n            return x\n        return x.view(self.dtype)\n\n@dataclass(frozen=True)\nclass InFlexData(BaseFlexData):\n    scale: torch.Tensor | None = None\n\n    @property\n    def is_per_batch(self):\n        return False if self.scale is None else len(self.scale) > 1\n\n@dataclass(frozen=True)\nclass OutFlexData(BaseFlexData):\n    expected_scale: torch.Tensor | None = None\n    actual_scale: torch.Tensor | None = None\n    checksum_scale: torch.Tensor | None = None\n\n    def __iter__(self):\n        yield self.expected_scale\n        yield self.actual_scale\n        yield self.checksum_scale\n\n@dataclass(frozen=True)\nclass FlexCtx:\n    lhs_data: InFlexData = InFlexData()\n    rhs_data: InFlexData = InFlexData()\n    out_data: OutFlexData = OutFlexData()\n\n@dataclass\nclass DummyClass:\n    flex_ctx: FlexCtx = FlexCtx()\n\n    def __post_init__(self):\n        assert self.flex_ctx.rhs_data.scale is None, \"flex and mx_ctx cannot be used together\"\n\n@torch.compile(fullgraph=True)\ndef dummy_method():\n    var = DummyClass(flex_ctx=FlexCtx(rhs_data=InFlexData()))\n    return var\n\ndummy_method()\n\n```\n\n\n\n### Error logs\n\n```\nTORCHDYNAMO_VERBOSE=1 python test_compile.py\nTraceback (most recent call last):\n  File \"/home/eecs/yongye.zhu/vllm/tests/kernels/moe/test_compile.py\", line 56, in <module>\n    dummy_method()\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/eval_frame.py\", line 685, in _fn\n    return fn(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 1463, in __call__\n    return self._torchdynamo_orig_callable(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 624, in __call__\n    return _compile(\n           ^^^^^^^^^\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 1087, in _compile\n    guarded_code = compile_inner(code, one_graph, hooks, transform)\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_utils_internal.py\", line 97, in wrapper_function\n    return function(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 778, in compile_inner\n    return _compile_inner(code, one_graph, hooks, transform)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 817, in _compile_inner\n    out_code = transform_code_object(code, transform)\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/bytecode_transformation.py\", line 1423, in transform_code_object\n    transformations(instructions, code_options)\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 264, in _fn\n    return fn(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/convert_frame.py\", line 742, in transform\n    tracer.run()\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/symbolic_convert.py\", line 3508, in run\n    super().run()\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/symbolic_convert.py\", line 1345, in run\n    while self.step():\n          ^^^^^^^^^^^\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/symbolic_convert.py\", line 1253, in step\n    self.dispatch_table[inst.opcode](self, inst)\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/symbolic_convert.py\", line 828, in wrapper\n    return inner_fn(self, inst)\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/symbolic_convert.py\", line 2934, in CALL\n    self._call(inst)\n  File \"/home/eecs/yongye.zhu/miniconda3/envs/vllm/lib/python3.12/site-packages/torch/_dynamo/symbolic_convert.py\", line 2928, in _call\n    self.call_function(fn, args, kwargs",
    "url": "https://github.com/pytorch/pytorch/issues/154009",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo",
      "dynamo-dataclasses",
      "vllm-compile",
      "module: vllm"
    ],
    "created_at": "2025-05-21T02:34:19Z",
    "updated_at": "2025-10-24T16:39:07Z",
    "user": "zyongye"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38243,
    "title": "<spam>",
    "body": "We are looking for an experienced Machine Learning Engineer for a BTC/USDT prediction project using CNN, LSTM, and Transformers. The goal is to forecast cryptocurrency price movements with a target accuracy of 90%+.\n\nMore details here:[ ](https://gist.github.com/DandBman/c76a548b1972da50ffe6bbdd93fdd613)",
    "url": "https://github.com/huggingface/transformers/issues/38243",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-20T22:14:11Z",
    "updated_at": "2025-05-21T13:14:41Z",
    "comments": 0,
    "user": "DandBman"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11590,
    "title": "Infinite (not literally) length video creation using LTX-Video?",
    "body": "First of all thanks to Aryan (0.9.7 integration) and DN6 (adding GGUF). Model is quite good and output is also promising.\n\nI need help in creating continuous video using the last frame. 1 trick is to generate the video, extract the last frame and do inference. Is there any easy way where I can do this in loop.\n\nMy thought is \n\n1. Use text encoder to generate prompt embed once and then remove text encoders from memory\n2. Loop the inference code, once complete extract the last latent (preferred as I can upscale using LTXLatentUpsamplePipeline) frame or image and again create image1 and condition with that frame...and continue doing this for n iterations.\n3. Also need to save the video locally for each inference, otherwise OOM.\n\nAny thoughts / suggestions?\n\n```python\nimport torch\nimport gc\nfrom diffusers import GGUFQuantizationConfig\nfrom diffusers import LTXConditionPipeline, LTXLatentUpsamplePipeline, LTXVideoTransformer3DModel\nfrom diffusers.pipelines.ltx.pipeline_ltx_condition import LTXVideoCondition\nfrom diffusers.utils import export_to_video, load_video, load_image\n\ntransformer_path = f\"https://huggingface.co/wsbagnsv1/ltxv-13b-0.9.7-distilled-GGUF/blob/main/ltxv-13b-0.9.7-distilled-Q3_K_S.gguf\"\n# transformer_path = f\"https://huggingface.co/wsbagnsv1/ltxv-13b-0.9.7-distilled-GGUF/blob/main/ltxv-13b-0.9.7-distilled-Q8_0.gguf\"\ntransformer_gguf = LTXVideoTransformer3DModel.from_single_file(\n    transformer_path,\n    quantization_config=GGUFQuantizationConfig(compute_dtype=torch.bfloat16),\n    torch_dtype=torch.bfloat16,\n)\n\npipe = LTXConditionPipeline.from_pretrained(\n    \"Lightricks/LTX-Video-0.9.7-distilled\", \n    transformer=transformer_gguf,\n    torch_dtype=torch.bfloat16\n)\n# pipe.to(\"cuda\")\n# pipe.enable_sequential_cpu_offload()\npipe.enable_model_cpu_offload()\npipe.vae.enable_tiling()\n\nheight, width = 480, 832\nnum_frames = 151\nnegative_prompt = \"worst quality, inconsistent motion, blurry, jittery, distorted\"\n\nprompt = \"hyperrealistic digital artwork of a young woman walking confidently down a garden pathway, wearing white button-up blouse with puffed sleeves and blue denim miniskirt, long flowing light brown hair caught in gentle breeze, carrying a small black handbag, bright sunny day with blue sky and fluffy white clouds, lush green hedges and ornamental plants lining the stone pathway, traditional Asian-inspired architecture in background, photorealistic style with perfect lighting, unreal engine 5, ray tracing, 16K UHD. camera follows subject from front as she walks forward with elegant confidence\"\nimage1 = load_image( \"assets/ltx/00039.png\" )\ncondition1 = LTXVideoCondition(\n    image=image1,\n    frame_index=0,\n)\nwidth=512\nheight=768\nnum_frames = 161\n\n# LOOP HERE\nlatents = pipe(\n    prompt=prompt,\n    negative_prompt=negative_prompt,\n    conditions=[condition1],\n    width=width,\n    height=height,\n    num_frames=num_frames,\n    guidance_scale=1.0,\n    num_inference_steps=4,\n    decode_timestep=0.05,\n    decode_noise_scale=0.025,\n    image_cond_noise_scale=0.0,\n    guidance_rescale=0.7,\n    generator=torch.Generator().manual_seed(42),\n    output_type=\"latent\",\n).frames\n# save video locally\n# Update image1 = load_image( latent/image from current inference  to be used with next inference)\n\n```",
    "url": "https://github.com/huggingface/diffusers/issues/11590",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-20T13:37:36Z",
    "updated_at": "2025-05-20T19:51:20Z",
    "comments": 1,
    "user": "nitinmukesh"
  },
  {
    "repo": "pytorch/ao",
    "number": 2228,
    "title": "[Quant] Can quant not be decomposed on inductor?",
    "body": "torch.ops.torchao.dequantize_affine decomposed to convert_element_type and mul.\nInductor will do constant_fold before pattern matching\nOn constant_fold, inductor replace fp8 weight and some previous operations with fp32 weight\nIs this as expected?\n\nNow register_decomposition on [register_decomposition](https://github.com/pytorch/ao/blob/96aec6a3e713687c1728a20a08d5c54db0344377/torchao/utils.py#L226)\n\nThis sample test can reproduce the issue\n\n```python\n\nimport os\n\nos.environ[\"OMP_NUM_THREADS\"] = \"1\"\nos.environ[\"TORCHINDUCTOR_FREEZING\"] = \"1\"\nos.environ[\"TORCH_COMPILE_DEBUG\"] = \"0\"\nos.environ[\"TORCHDYNAMO_PRINT_GUARD_FAILS\"] = \"0\"\n\nfrom typing import Callable, List, Optional, Union\nimport torch\nfrom torch import nn\nimport torchao\n#import torchao.quantization.pt2e.quantizer.x86_inductor_quantizer as xiq\n\ndef dequantize_per_tensor(\n        input: torch.Tensor,\n        scale: torch.Tensor,\n        output_dtype: torch.dtype\n) -> torch.Tensor:\n    res = torch.ops.torchao.dequantize_affine(\n        input=input,\n        block_size=input.shape,\n        scale=scale,\n        zero_point=torch.tensor(0),\n        input_dtype=torch.float8_e4m3fn,\n    )\n    if output_dtype != torch.float:\n        res = res.to(output_dtype)\n    return res\n\ndef quantize_per_tensor(\n        input: torch.Tensor,\n        scale: torch.Tensor,\n) -> torch.Tensor:\n    return torch.ops.torchao.quantize_affine(\n        input=input,\n        block_size=input.shape,\n        scale=scale,\n        zero_point=torch.tensor(0),\n        output_dtype=torch.float8_e4m3fn,\n    )\n\nclass Perceptron(torch.nn.Module):\n    def __init__(\n        self,\n        in_size: int,\n        out_size: int,\n        bias: bool = True,\n        activation: Union[\n            torch.nn.Module,\n            Callable[[torch.Tensor], torch.Tensor],\n        ] = torch.relu,\n        device: Optional[torch.device] = None,\n        dtype: torch.dtype = torch.float32,\n    ) -> None:\n        super().__init__()\n        self._out_size = out_size\n        self._in_size = in_size\n        self._linear: nn.Linear = nn.Linear(\n            self._in_size,\n            self._out_size,\n            bias=bias,\n            device=device,\n            dtype=dtype,\n        )\n        self._activation_fn: Callable[[torch.Tensor], torch.Tensor] = activation\n\n    def forward(self, input: torch.Tensor) -> torch.Tensor:\n        return self._activation_fn(self._linear(input))\n\nclass MLP(torch.nn.Module):\n    def __init__(\n        self,\n        in_size: int,\n        layer_sizes: List[int],\n        bias: bool = True,\n        activation: Union[\n            str,\n            Callable[[], torch.nn.Module],\n            torch.nn.Module,\n            Callable[[torch.Tensor], torch.Tensor],\n        ] = torch.relu,\n        device: Optional[torch.device] = None,\n        dtype: torch.dtype = torch.float32,\n    ) -> None:\n        super().__init__()\n\n        if activation == \"relu\":\n            activation = torch.relu\n        elif activation == \"sigmoid\":\n            activation = torch.sigmoid\n\n        if not isinstance(activation, str):\n            self._mlp: torch.nn.Module = torch.nn.Sequential(\n                *[\n                    Perceptron(\n                        layer_sizes[i - 1] if i > 0 else in_size,\n                        layer_sizes[i],\n                        bias=bias,\n                        activation=activation,\n                        device=device,\n                        dtype=dtype,\n                    )\n                    for i in range(len(layer_sizes))\n                ]\n            )\n        else:\n                assert (\n                    ValueError\n                ), \"This MLP only support str version activation function of relu, sigmoid, and swish_layernorm\"\n\n    def forward(self, input: torch.Tensor) -> torch.Tensor:\n        return self._mlp(input)\n\nclass DenseArch(nn.Module):\n    def __init__(\n        self,\n        in_features: int,\n        layer_sizes: List[int],\n        device: Optional[torch.device] = None,\n    ) -> None:\n        super().__init__()\n        self.model: nn.Module = MLP(\n            in_features, layer_sizes, bias=True, activation=\"relu\", device=device\n        )\n\n    def forward(self, features: torch.Tensor) -> torch.Tensor:\n        return self.model(features)\n\n\ndef inc_convert(model, dtype):\n    model.eval()\n    qtype = torch.float8_e4m3fn\n\n    #from torch.ao.quantization.fx._decomposed import quantize_per_tensor, dequantize_per_tensor\n    from torch.nn import functional as F\n\n    class FP8QDQLinear(torch.nn.Module):\n        def __init__(self, in_features, out_features):\n            super().__init__()\n            self.weight = torch.empty((out_features, in_features),)\n            self.weight_scale = None\n            self.scale = None\n            self.bias = None\n\n        def forward(self, input):\n            weight = dequantize_per_tensor(\n                self.weight.data,\n                self.weight_scale,\n                dtype,\n            )\n            q_input = quantize_per_tensor(\n ",
    "url": "https://github.com/pytorch/ao/issues/2228",
    "state": "closed",
    "labels": [
      "question",
      "triaged"
    ],
    "created_at": "2025-05-20T09:25:54Z",
    "updated_at": "2025-06-25T08:22:25Z",
    "user": "shiyang-weng"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 501,
    "title": "[BUG] Notebook on HF Hub is not updated",
    "body": "\"Workflows in LlamaIndex\" [course page](https://huggingface.co/learn/agents-course/unit2/llama-index/workflows#creating-workflows) is referring notebook on [HF Hub](https://huggingface.co/agents-course/notebooks/blob/main/unit2/llama-index/workflows.ipynb), which is not the updated version from [GitHub](https://github.com/huggingface/agents-course/blob/main/notebooks/unit2/llama-index/workflows.ipynb). \n\nThe old version contains bug in loop event workflow so update is needed. ",
    "url": "https://github.com/huggingface/agents-course/issues/501",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-20T06:45:26Z",
    "updated_at": "2025-05-29T05:28:46Z",
    "user": "karenwky"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 649,
    "title": "how to evaluate use local models and datasets?",
    "body": "I change the readme eval command like following: \n\n**MODEL=./deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\nMODEL_ARGS=\"pretrained=$MODEL,dtype=bfloat16,max_model_length=32768,gpu_memory_utilization=0.8,generation_parameters={max_new_tokens:32768,temperature:0.6,top_p:0.95}\"\nOUTPUT_DIR=./data/evals/\n\n# AIME 2024\nTASK=aime24\nlighteval vllm $MODEL_ARGS \"custom|$TASK|0|0\" \\\n    --custom-tasks src/open_r1/evaluate.py \\\n    --use-chat-template \\\n    --output-dir $OUTPUT_DIR \\\n    --cache-dir ./datasets/aime24**\n\nbut it try to use the network,and get a network error,how can i do to solve this problem?",
    "url": "https://github.com/huggingface/open-r1/issues/649",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-20T05:57:29Z",
    "updated_at": "2025-05-20T05:57:29Z",
    "user": "SiqingHe"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1130,
    "title": "Drive mode reversed on calibration.",
    "body": "I had an issue where after calibrating drive_mode was reversed for one of my motors (0 vs. 1) as a result, moving the leader in one direction caused the follower to go the opposite direction.\n\nSaw some suggestions that moving it through the full range of motion resolved this but I wasn't able to get that to work. I could also see cases where this could be problematic during initial setup. @Lemin2 suggested to always set this to 0 across the board, which does seem like a good fix, unless there's a reason want to control reverse mode. \n\nIn any case I would expect the calibration process to be consistent for both arms, else this issue will be encountered. If reverse mode is needed maybe have a step in the calibration processes to ensure consistency.\n\nFYI in case anyone encounters this the solution is to go into `.cache/calibration/<arm>/<each of your arms>.json`\n\nSeems to be the same cause for #441 and #930 ",
    "url": "https://github.com/huggingface/lerobot/issues/1130",
    "state": "open",
    "labels": [
      "bug",
      "question",
      "robots"
    ],
    "created_at": "2025-05-20T03:08:06Z",
    "updated_at": "2025-07-16T06:50:20Z",
    "user": "brainwavecoder9"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3525,
    "title": "\u2753 [Question] How to save the compiled while using torch.compile",
    "body": "For the example below, how do I save the compiled model?\n\nbackend = \"torch_tensorrt\"\ntp_model = torch.compile(\n    tp_model,\n    backend=backend,\n    options={\n        \"truncate_long_and_double\": True,\n        \"enabled_precisions\": {torch.float32, torch.float16},\n        \"use_python_runtime\": True,\n        \"min_block_size\": 1,\n    },\n    dynamic=False,\n)",
    "url": "https://github.com/pytorch/TensorRT/issues/3525",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-20T03:06:53Z",
    "updated_at": "2025-05-20T15:15:27Z",
    "user": "klin2024"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1543,
    "title": "[IMPORTANT] torchchat sunset",
    "body": "**As of May 19th 2025, we are halting active development on torchchat.** \n\nThe original intent of torchchat was to both demonstrate how to run LLM inference using PyTorch and improve the performance and functionality of the entire PyTorch ecosystem.\n\nSince torchchat\u2019s launch, we\u2019ve seen vLLM become the dominant player for server-side LLM inference. We\u2019re ecstatic to have [vLLM join the PyTorch Ecosystem](https://pytorch.org/blog/vllm-joins-pytorch/) and recommend folks use them for hosting LLMs in server production environments. Given the growth of vLLM and others, we do not see the need to maintain an active demonstration of how to run LLM inference using PyTorch.\n\nWe are very proud of the performance and functionality improvements we saw in the PyTorch ecosystem over the last year, including:\n\n- The performance of LLM inference increase by multiples for every device we support (CUDA, CPU, MPS, ARM, etc) \n- Working code, demonstrating how to run LLM inference for all the major execution modes (Eager, Compile, AOTI and ET) giving users a starting point for using PyTorch for LLM inference from server to embedded devices and everything in between\n- Quantization expand to support the most popular schemes and bit sizes\n- torchchat become the testing grounds for new advancements ([experimental torchao kernels](https://github.com/pytorch/torchchat/blob/fd3059bf830494cf14dd474af348c7ebb3d6be76/docs/quantization.md#experimental-torchao-lowbit-kernels), [MPS compile](https://github.com/pytorch/pytorch/blob/31f175ea9a00b1ca392858cd0d160706201b12da/torch/_inductor/codegen/mps.py), [AOTI Packaging](https://github.com/pytorch/pytorch/blob/f2e8e41855caaae6ed7254f7abf4e31122363722/docs/source/torch.compiler_aot_inductor.rst#aotinductor-ahead-of-time-compilation-for-torchexport-ed-models))\n\nThere\u2019s still plenty of exciting work to do across the LLM Inference space and PyTorch will stay invested in improving things.\nWe appreciate and thank everyone in the community for all that you\u2019ve contributed.  \n\nThanks to our contributors:\n@mikekgfb @Jack-Khuu @metascroy @malfet @larryliu0820 @kirklandsign @swolchok @vmpuri @kwen2501 @Gasoonjia @orionr @guangy10 @byjlw @lessw2020 @mergennachin @GregoryComer @shoumikhin @kimishpatel @manuelcandales @lucylq @desertfire @gabe-l-hart @seemethere @iseeyuan @jerryzh168 @leseb @yanbing-j @mreso @fduwjj @Olivia-liu @angelayi @JacobSzwejbka @ali-khosh @nlpfollower @songhappy @HDCharles @jenniew @silverguo @zhenyan-zhang-meta @ianbarber @dbort @kit1980 @mcr229 @georgehong @krammnic @xuedinge233 @anirudhs001 @shreyashah1903 @soumith @TheBetterSolution @codereba @jackzhxng @KPCOFGS @kuizhiqing @kartikayk @nobelchowdary @mike94043 @vladoovtcharov @prideout @sanchitintel @cbilgin @jeffdaily @infil00p @msaroufim @zhxchen17 @vmoens @wjunLu \n\n-**PyTorch Team**",
    "url": "https://github.com/pytorch/torchchat/issues/1543",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-20T02:41:03Z",
    "updated_at": "2025-05-20T11:06:54Z",
    "comments": 3,
    "user": "Jack-Khuu"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 3233,
    "title": "Docker image For llama cpp backend?",
    "body": "Hey,\nIs there any reason in particular why docker images for the llama-cpp backend do not get built along with new versions? It seems the backend has been ready for a while so just curious why images don't get built as part of the build pipeline\ncc @mfuntowicz ",
    "url": "https://github.com/huggingface/text-generation-inference/issues/3233",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-20T02:07:46Z",
    "updated_at": "2025-05-20T02:07:46Z",
    "comments": 0,
    "user": "vrdn-23"
  },
  {
    "repo": "pytorch/xla",
    "number": 9201,
    "title": "Issue warning on set_mat_mul",
    "body": "On #9080 and #9103, there was a request to add a warning when user sets mat mul. I added it to the PR, but, the ci/ci now skips running documentation. \n\nThis issue and PR will cherry pick the code changes to isolate them from docs, allowing code cicd to run on this PR, and docs build cicd to run on 9082. ",
    "url": "https://github.com/pytorch/xla/issues/9201",
    "state": "closed",
    "labels": [
      "documentation",
      "CI"
    ],
    "created_at": "2025-05-19T21:21:48Z",
    "updated_at": "2025-05-21T18:38:49Z",
    "comments": 0,
    "user": "yaoshiang"
  },
  {
    "repo": "pytorch/xla",
    "number": 9199,
    "title": "Simplify device count external API calls",
    "body": "Currently there are many external APIs related getting the number of devices associate with PyTorch XLA. Those that I could find were:\n\n- \"global_runtime_device_count\": returns the total number of devices across all processes/hosts, but it has \"@functools.lru_cache()\"\n- \"global_device_count\": returns the total number of devices across all processes/hosts, but it has \"@functools.lru_cache()\"\n- \"addressable_runtime_device_count\": Access number of [addressable devices](https://github.com/pytorch/xla/blob/r2.7/torch_xla/csrc/init_python_bindings.cpp#L15026) visible to a process.\n- \"addressable_device_count\": Access number of [addressable devices](https://github.com/pytorch/xla/blob/r2.7/torch_xla/csrc/init_python_bindings.cpp#L1481) visible to a process. It specifically returns 1 in case of SPMD.\n- \"local_device_count\": takes the number of [addressable devices](https://github.com/pytorch/xla/blob/01b5408dded9bf5bdea3e59c387b3b201a2bdab9/torch_xla/csrc/init_python_bindings.cpp#L1486) and multiplies it by the number of local [process counts](https://github.com/pytorch/xla/blob/r2.7/torch_xla/runtime.py#L129). Equivalent of the answer of the number of devices running on a host.\n\nFrom these, some existing observations are:\n- `addressable_runtime_device_count` and `addressable_device_count` are extremely similar in implementation and name. Perhaps we should make the distinction more clear. Perhaps there is some context around `addressable_device_count` particular I don't fully grasp.\n- `local_device_count` terminology can be confusing when compared with JAX's concept for local devices for [jax.local_devices](https://docs.jax.dev/en/latest/_autosummary/jax.local_devices.html). `local_device_count` being the number of devices in the host, while JAX's definition is of devices in the process\n- We should deduplicate `global_runtime_device_count` and `global_device_count`, just have one reference the other to remove multiple calls",
    "url": "https://github.com/pytorch/xla/issues/9199",
    "state": "open",
    "labels": [
      "usability",
      "documentation"
    ],
    "created_at": "2025-05-19T19:26:46Z",
    "updated_at": "2025-06-04T05:52:28Z",
    "comments": 4,
    "user": "pgmoka"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11580,
    "title": "Can diffusers support loading and running FLUX with fp8 ?",
    "body": "This is how I use diffusers to load flux model:\n```\nimport torch\nfrom diffusers import FluxPipeline\npipe = FluxPipeline.from_pretrained(\n    \"/ckptstorage/repo/pretrained_weights/black-forest-labs/FLUX.1-dev\", \n    torch_dtype=torch.float16,\n)\ndevice = torch.device(f\"cuda:{device_number}\" if torch.cuda.is_available() else \"cpu\")\npipe = pipe.to(device)\n```\nit consumes about 75 seconds on my computer with A800 GPU.\nBut I found in comfyui, it only need 22 seconds to load flux model, but it load the fp8 model.\nCan diffusers load flux fp8 model ?\nor is there any other speed up method ?",
    "url": "https://github.com/huggingface/diffusers/issues/11580",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-19T12:18:13Z",
    "updated_at": "2025-12-12T19:30:33Z",
    "comments": 5,
    "user": "EmmaThompson123"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1124,
    "title": "How to add force data to lerobot and models?",
    "body": "As title said, I use a force sensor on SO100 arm and want to record the data in lerobot dataset then train with the force data. How to do it?\n\nforce data looks like: a list: [x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, x5, y5, z5] (15 d list)\n\nThanks!",
    "url": "https://github.com/huggingface/lerobot/issues/1124",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-19T07:48:20Z",
    "updated_at": "2025-05-19T13:36:44Z",
    "user": "milong26"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11575,
    "title": "Hidream Model loading takes too long \u2014 any way to speed it up?",
    "body": "Hi, thanks for this great project.\n\nI'm running Hidream with this library in a serverless environment and facing major delays during model loading. It can be very frustrating, especially for time-sensitive or ephemeral deployments.\n\nI've tried everything I could think of to reduce the loading time, but nothing has worked so far. Does anyone have any tips, tricks, or even sample code to help speed up the model initialization?\n\nAny guidance would be greatly appreciated!",
    "url": "https://github.com/huggingface/diffusers/issues/11575",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-19T00:49:00Z",
    "updated_at": "2025-05-23T12:55:05Z",
    "comments": 6,
    "user": "Me-verner"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2275,
    "title": "ONNX export for ColPali",
    "body": "Hi Optimum,\n\nI have created a small tutorial how to export the ColPali late-interaction VLM in this [notebook](https://gist.github.com/kstavro/9bcdf930f0e69626dd5aa9aa5f09f867), but I think it shouldn't be too difficult to integrate it to Optimum as well.\n\nHowever, as far as I have seen, there is not much support for late-interaction VLMs at the moment. So, before I get into it just by myself, I thought I could first see if someone could give me a couple of hints about some choices regarding the library, eg what base configs I should use for ColPali or if I should create new ones everywhere, what names, do we need tiny dummy models for tests, etc.",
    "url": "https://github.com/huggingface/optimum/issues/2275",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-18T18:56:22Z",
    "updated_at": "2025-06-11T13:56:43Z",
    "comments": 2,
    "user": "kstavro"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38190,
    "title": "Gibberish generations with FSDP2 and MixedPrecisionPolicy",
    "body": "### System Info\n\n```\ntransformers.__version__='4.51.2'\ntorch.__version__='2.6.0+cu124'\nsys.version='3.10.17 (main, Apr 16 2025, 15:03:57) [GCC 12.1.1 20220628 (Red Hat 12.1.1-3)]'\n```\n\n### Who can help?\n\n@SunMarc @zach-huggingface\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nI'm sharding `llama-3.1-8b-instruct` on 8 GPUs using FSDP2. The goal is to be able to call `generate` during the training loop. I have noticed that If I use `MixedPrecisionPolicy` with `param_dtype=torch.bfloat16` the generations are gibberish. A hopefully reproducible example below.\n\n\n```python\nimport os\n\nimport torch\nimport torch.distributed as dist\nfrom torch.distributed._composable.fsdp import register_fsdp_forward_method\nfrom torch.distributed.device_mesh import init_device_mesh\nfrom torch.distributed.fsdp import (\n    MixedPrecisionPolicy,\n    fully_shard,\n)\nfrom transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer\nfrom transformers.models.llama.modeling_llama import LlamaDecoderLayer\n\n\n\ndef get_local_rank() -> int:\n    return int(os.environ.get(\"LOCAL_RANK\", \"0\"))\n\n\ndef get_global_rank() -> int:\n    return int(os.environ.get(\"RANK\", get_local_rank()))\n\n\ndef barrier():\n    dist.barrier(device_ids=[get_local_rank()])\n\n\ndef test_generate(model, tokenizer):\n    prompt = \"Concisely answer the following question: \"\n    queries = [\n        \"What is the tallest animal?\\n\",\n        \"What are 3 fruits larger in size than an apple?\\n\",\n        \"What's the derivative of e^x?\\n\",\n    ]\n\n    tokens = [tokenizer.encode(prompt + q) for q in queries]\n    max_len = max(len(t) for t in tokens)\n    padded = [[tokenizer.eos_token_id] * (max_len - len(t)) + t for t in tokens]\n    padded_t = torch.tensor(padded).long()\n\n    generations = model.generate(padded_t, max_new_tokens=128)\n    parsed = tokenizer.batch_decode(generations)\n    for p in parsed:\n        print(p, flush=True)\n\n\ndef main():\n    device = torch.device(\"cuda\", get_local_rank())\n    dist.init_process_group(\n        backend=\"nccl\",\n    )\n    torch.cuda.set_device(device)\n\n    LOCAL_MODEL_PATH = \"/llama-3.1-8b-instruct\"\n\n    tokenizer = AutoTokenizer.from_pretrained(LOCAL_MODEL_PATH)\n    model_config = AutoConfig.from_pretrained(LOCAL_MODEL_PATH)\n    model = AutoModelForCausalLM.from_pretrained(\n        LOCAL_MODEL_PATH,\n        config=model_config,\n        use_safetensors=True,\n        torch_dtype=torch.float32,\n    )\n\n    fsdp2_kwargs = {}\n    fsdp2_kwargs[\"mesh\"] = init_device_mesh(\n        \"cuda\", (torch.distributed.get_world_size(),)\n    )\n    fsdp2_kwargs[\"mp_policy\"] = MixedPrecisionPolicy(\n        param_dtype=torch.bfloat16,   # <<<----- If I comment this line the generations are as expected\n    )\n\n    for submodule in model.modules():\n        if isinstance(submodule, LlamaDecoderLayer):\n            fully_shard(submodule, **fsdp2_kwargs)\n    fully_shard(model, **fsdp2_kwargs)\n    register_fsdp_forward_method(model, \"generate\")\n\n    barrier()\n\n    test_generate(model, tokenizer)\n\n    barrier()\n\n    dist.destroy_process_group()\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\nThe following  is an example of the output I get if `param_dtype=torch.bfloat16`:\n\n```\n<|eot_id|><|eot_id|><|eot_id|><|eot_id|><|eot_id|><|eot_id|><|begin_of_text|>Concisely answer the following question: What is the tallest animal?\nThe odense aalborg limburg fetisch odense fetisch<|start_header_id|>OO\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\n<|begin_of_text|>Concisely answer the following question: What are 3 fruits larger in size than an apple?\nHere fetisch<|start_header_id|>OOOOOOOOOO\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\u200d\n<|eot_id|><|eot_id|><|eot_id|><|begin_of_text|>Concisely answer the following question: What's the derivative of e^x?\nThe aalborg salopes<|start_header_id|>OOOOOOOOOOOOAAAAAAAA\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n```\n\n\n### Expected behavior\n\nThe following is an example of the output I get if I comment out the `param_dtype=torch.bfloat16` in `MixedPrecisionPolicy`\n\n```\n<|eot_id|><|eot_id|><|eot_id|><|eot_id|><|eot_id|><|eot_id|><|begin_of_text|>Concisely answer the following question: What is the tallest animal?\nThe tallest animal is the giraffe, which can grow up to 18 feet (5.5 meters) tall.\nThe gi",
    "url": "https://github.com/huggingface/transformers/issues/38190",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-05-18T11:56:08Z",
    "updated_at": "2025-08-29T09:36:57Z",
    "comments": 17,
    "user": "dlvp"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1202,
    "title": "How to run the tests in the tests directory",
    "body": "Looking for  how to documentations to  run the tests in the tests directory. ",
    "url": "https://github.com/pytorch/torchtitan/issues/1202",
    "state": "closed",
    "labels": [
      "documentation",
      "good first issue"
    ],
    "created_at": "2025-05-16T17:33:46Z",
    "updated_at": "2025-05-20T04:02:02Z",
    "user": "githubsgi"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38181,
    "title": "Add a way for `callbacks` to get `trainer` handler",
    "body": "When I want to implement differential privacy for the model, I customize the gradient clipping before `optimizer.step()`. The add custom noise to the model after `optimizer.step()`. I cannot get `Trainer.optimizer` in the `callback` function, it shows as `None`. Is it possible to get the reference of `Trainer` directly in `callback`?",
    "url": "https://github.com/huggingface/transformers/issues/38181",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-16T16:01:35Z",
    "updated_at": "2025-05-19T12:17:06Z",
    "comments": 1,
    "user": "MinzhiYoyo"
  },
  {
    "repo": "pytorch/helion",
    "number": 46,
    "title": "[QST] Compiler Pipeline",
    "body": "@jansel @yf225 \n\nVery cool project.  \n\nIs there any documentation on how helion leverages inductor to generate triton kernels?\n\nTrying to understand the overlap between dynamo and helion.  My naive take is that dynamo parses general python code to an fx graph that is then passed to inductor whereas helion parses a subset of python defined by helion-specific operators to an fx graph then onto inductor...\n\nIn either case, hoping to use helion to better understand inductor, from IR to lowering, optimization, and codegen.",
    "url": "https://github.com/pytorch/helion/issues/46",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-16T12:30:52Z",
    "updated_at": "2025-08-25T21:28:38Z",
    "user": "jeromeku"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3522,
    "title": "\u2753 [Question] Manually Annotate Quantization Parameters in FX Graph",
    "body": "## \u2753 Question\n\nis there a way to manually annotate quantization parameters that will be respected throughout torch_tensorrt conversion (e.g. manually adding q/dq nodes, or specifying some tensor metadata) via dynamo? thank you!",
    "url": "https://github.com/pytorch/TensorRT/issues/3522",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-16T07:38:33Z",
    "updated_at": "2025-06-02T15:35:40Z",
    "user": "patrick-botco"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 645,
    "title": "How to set vllm max-model-len?",
    "body": "I use qwen2.5-7b-Instruct to run grpo, and open yarn, to accommodate a longer window(greater than 32768). But fowllowing error exists:\n\n                                                                                                                                                                                      \n  0%|          | 0/187 [00:00<?, ?it/s]WARNING 05-16 10:48:52 scheduler.py:947] Input prompt (48173 tokens) is too long and exceeds limit of 32768                                                                                                                              \nWARNING 05-16 10:48:52 scheduler.py:947] Input prompt (48173 tokens) is too long and exceeds limit of 32768                                                                                                                                                                     \nWARNING 05-16 10:48:52 scheduler.py:947] Input prompt (48173 tokens) is too long and exceeds limit of 32768                                                                                                                                                                     \nWARNING 05-16 10:48:52 scheduler.py:947] Input prompt (48173 tokens) is too long and exceeds limit of 32768                                                                                                                                                                     \nWARNING 05-16 10:48:52 scheduler.py:947] Input prompt (48173 tokens) is too long and exceeds limit of 32768                                                                                                                                                                     \nWARNING 05-16 10:48:52 scheduler.py:947] Input prompt (48173 tokens) is too long and exceeds limit of 32768                                                                                                                                                                     \nWARNING 05-16 10:48:52 scheduler.py:947] Input prompt (48173 tokens) is too long and exceeds limit of 32768                                                                                                                                                                     \n[rank2]: Traceback (most recent call last):                                                                                                                                                                                                                                     \n[rank2]:   File \"/cto_studio/huyongquan/python_project/open-r1/src/open_r1/grpo.py\", line 358, in <module>                                                                                                                                                                      \n[rank2]:     main(script_args, training_args, model_args)                                                                                                                                                                                                                       \n[rank2]:   File \"/cto_studio/huyongquan/python_project/open-r1/src/open_r1/grpo.py\", line 309, in main                                                                                                                                                                          \n[rank2]:     train_result = trainer.train(resume_from_checkpoint=checkpoint)                                                                                                                                                                                                    ",
    "url": "https://github.com/huggingface/open-r1/issues/645",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-16T03:28:50Z",
    "updated_at": "2025-06-12T08:45:15Z",
    "user": "huyongquan"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38165,
    "title": "Gemma 3 Pipeline does not accept dictionary with no images",
    "body": "### System Info\n\nSystem info not really relevant as the bug is root caused in my description below.\n\n- `transformers` version: 4.51.3\n- Platform: Windows-10-10.0.26100-SP0\n- Python version: 3.11.9\n- Huggingface_hub version: 0.31.2\n- Safetensors version: 0.5.3\n- Accelerate version: 1.7.0\n- Accelerate config:    not found\n- DeepSpeed version: not installed\n- PyTorch version (GPU?): 2.4.0+cu121 (True)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: <fill in>\n- Using GPU in script:Yes\n- GPU type: NVIDIA GeForce RTX 3090\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nThis issue can be created using the following snippet copied from Gemma 3 docs and up until transformer 4.51.3.\n```\nfrom transformers import pipeline\nimport torch\n\npipe = pipeline(\n    \"image-text-to-text\",\n    model=\"google/gemma-3-12b-it\",\n    device=\"cuda\", # Or \"cpu\" if you don't have a compatible GPU\n    torch_dtype=torch.bfloat16 # Or torch.float16 or torch.float32 based on your hardware/needs\n)\n\nmessages = [\n    {\n        \"role\": \"system\",\n        \"content\": [{\"type\": \"text\", \"text\": \"You are a helpful assistant.\"}]\n    },\n    {\n        \"role\": \"user\",\n        \"content\": [\n            # Removed the image link from the example\n            {\"type\": \"text\", \"text\": \"What is the capital of France?\"} # Keep only the text part\n        ]\n    }\n]\n\noutput = pipe(text=messages, max_new_tokens=200)\nprint(output[0][\"generated_text\"][-1][\"content\"])\n```\n\nwhich will result in the error:\n\n```\nTraceback (most recent call last):\n  File \"D:\\experiments\\personal\\gemma_editor\\gemma_editor.py\", line 78, in <module>\n    run_gemma(SENTENCES)\n  File \"D:\\experiments\\personal\\gemma_editor\\gemma_editor.py\", line 41, in run_gemma\n    output = pipe(text=messages)\n             ^^^^^^^^^^^^^^^^^^^\n  File \"D:\\experiments\\personal\\gemma_editor\\venv\\Lib\\site-packages\\transformers\\pipelines\\image_text_to_text.py\", line 311, in __call__\n    return super().__call__(Chat(text, images), **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\experiments\\personal\\gemma_editor\\venv\\Lib\\site-packages\\transformers\\pipelines\\base.py\", line 1379, in __call__\n    return self.run_single(inputs, preprocess_params, forward_params, postprocess_params)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\experiments\\personal\\gemma_editor\\venv\\Lib\\site-packages\\transformers\\pipelines\\base.py\", line 1385, in run_single\n    model_inputs = self.preprocess(inputs, **preprocess_params)\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\experiments\\personal\\gemma_editor\\venv\\Lib\\site-packages\\transformers\\pipelines\\image_text_to_text.py\", line 365, in preprocess\n    model_inputs = self.processor(images=images, text=text, return_tensors=self.framework, **processing_kwargs).to(\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\experiments\\personal\\gemma_editor\\venv\\Lib\\site-packages\\transformers\\models\\gemma3\\processing_gemma3.py\", line 106, in __call__\n    image_inputs = self.image_processor(batched_images, **output_kwargs[\"images_kwargs\"])\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\experiments\\personal\\gemma_editor\\venv\\Lib\\site-packages\\transformers\\image_processing_utils.py\", line 42, in __call__\n    return self.preprocess(images, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\experiments\\personal\\gemma_editor\\venv\\Lib\\site-packages\\transformers\\utils\\generic.py\", line 866, in wrapper\n    return func(*args, **valid_kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\experiments\\personal\\gemma_editor\\venv\\Lib\\site-packages\\transformers\\models\\gemma3\\image_processing_gemma3.py\", line 361, in preprocess\n    if do_rescale and is_scaled_image(images[0]):\n                                      ~~~~~~^^^\nIndexError: list index out of range\n```\n\n### Expected behavior\n\nThe problem here is that within image_text_to_text, the dictionary is made into type: Chat. [By default chat makes images an empty list](https://github.com/huggingface/transformers/blame/v4.51.3/src/transformers/pipelines/image_text_to_text.py#L114). Then this is propagated to [images](https://github.com/huggingface/transformers/blame/v4.51.3/src/transformers/pipelines/image_text_to_text.py#L353C16-L353C39) where it ultimately lands in processing_gemma_3.py where the [if condition only checks if the images are None](https://github.com/huggingface/transformers/blob/v4.51.3/src/transformers/models/gemma3/",
    "url": "https://github.com/huggingface/transformers/issues/38165",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-05-16T01:34:15Z",
    "updated_at": "2025-06-23T08:03:03Z",
    "comments": 6,
    "user": "sheldonlai"
  },
  {
    "repo": "pytorch/xla",
    "number": 9178,
    "title": "Code sample for basic mark sharding doesn't work",
    "body": "## \ud83d\udcda Documentation\n\nThis document:\n\nhttps://docs.pytorch.org/xla/master/learn/api-guide.html#module-torch_xla.distributed.spmd\n\nhas an important code sample to demonstrate sharding tensors across devices. It doesn't work - there are imports and setup that are not included.\n\nMore broadly, all of these samples should go into a larger guide that gently walks a user through the process of understanding how PT/XLA handles multi-device and multi-host up through gSPMD. It's very elegant and powerful, but poorly documented. \n",
    "url": "https://github.com/pytorch/xla/issues/9178",
    "state": "open",
    "labels": [
      "distributed",
      "documentation"
    ],
    "created_at": "2025-05-15T17:28:02Z",
    "updated_at": "2025-05-19T13:59:30Z",
    "comments": 0,
    "user": "yaoshiang"
  },
  {
    "repo": "pytorch/xla",
    "number": 9177,
    "title": "make CI build fast",
    "body": "## \ud83d\udc1b Bug\n\nThe CI build takes ~2 hours, significantly affects dev velocity.\n\nJudging from https://github.com/pytorch/xla/actions/runs/14986142268/job/42100348515, the `Build PyTorch/XLA` steps seems the bottleneck (it takes 1h15m and blocks a whole bunch of downstream test jobs). If we can speed this up, we may shove a large chunk from the build time.\n\nPotential long-hanging fruit:\n\n- The log suggests that there are only 32 parallel bazel actions for this job, far below our recommended dev set-up (112 actions). I suspect the worker machines have only 32 vCPUs. Can we upgrade to 128+ vCPUs? Build machines are highly leveraged, so investment there will pay for itself quickly in terms of dev velocity.\n- Set up a bazel remote build farm so that the build is parallelized across machines.\n",
    "url": "https://github.com/pytorch/xla/issues/9177",
    "state": "open",
    "labels": [
      "tech debt",
      "CI",
      "build"
    ],
    "created_at": "2025-05-15T16:48:36Z",
    "updated_at": "2025-05-15T16:48:36Z",
    "comments": 0,
    "user": "zhanyong-wan"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1114,
    "title": "How to collect data and train the policy from Lerobot totally out of the leader arm only by learning from demonstration using the main arm such as XARM or UR series",
    "body": "",
    "url": "https://github.com/huggingface/lerobot/issues/1114",
    "state": "closed",
    "labels": [
      "question",
      "robots",
      "stale"
    ],
    "created_at": "2025-05-15T15:31:13Z",
    "updated_at": "2025-12-31T02:35:25Z",
    "user": "David-Kingsman"
  },
  {
    "repo": "pytorch/data",
    "number": 1489,
    "title": "Implement a Cache node",
    "body": "### \ud83d\ude80 The feature\n\nAt some point, there were a [`InMemoryCacheHolder`](https://docs.pytorch.org/data/0.9/generated/torchdata.datapipes.iter.InMemoryCacheHolder.html?highlight=cache#torchdata.datapipes.iter.InMemoryCacheHolder) datapipe. However, this has been removed from the new node design.\n\nThis would be very useful for some expensive parts of the DAG that would gain from being stored in memory rather than recomputed each time.\n\n### Motivation, pitch\n\nSome transforms are quite expensive, and I would like to avoid needing to repeat them at each epoch. Therefore, it would be handy to have some cache mechanism that would allow skipping expensive parts of the DAG if they have been computed before. The user could have a choice to cache on memory or on the disk.\n\nHowever, I'm not sure what the interface would look like. I feel like there would be 2 nodes needed, sharing the cache:\n - One at the start of the DAG branch to skip (that would check if passing through the branch is needed)\n - One at the end of the branch (that would store the result of the branch for it to be used later)\n\nI can't really think of another way to make this work, as you can't have just the first one (or else how do you store the result of the computation at the end of the branch?), and you can't have just the last one (bc how do you determine if the item have been cached or not?).\n\nAs far as I understand nodes, they are executed in a bottom-up manner, with the last node requiring the result of the previous node, itself requiring the result of the previous one, all the way up to the first node. However, this design makes it difficult to deal with a cache as you need to decide which branch to take from the bottom. This would be easier with a top-down design, with the data coming from the first node, up to the entrance of the cache, which would be able to make a decision on the branch to choose to continue.\n\nMaybe having a some sort of `CacheWrapper` that would wrap a single node would be the solution? But then it would be cumbersome to cache entire branches of the DAG.",
    "url": "https://github.com/meta-pytorch/data/issues/1489",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-15T09:47:19Z",
    "updated_at": "2025-05-20T04:25:09Z",
    "comments": 1,
    "user": "leleogere"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38147,
    "title": "How to check the number of tokens processed or the load of each expert in the Qwen3 MoE model during inference?",
    "body": "",
    "url": "https://github.com/huggingface/transformers/issues/38147",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-15T09:21:29Z",
    "updated_at": "2025-05-15T13:36:53Z",
    "user": "wumaotegan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11561,
    "title": "FluxFillPipeline Support load IP Adapter.",
    "body": "### Model/Pipeline/Scheduler description\n\n'FluxFillPipeline' object has no attribute 'load_ip_adapter'\nI really need this,Thanks!\n\n### Open source status\n\n- [ ] The model implementation is available.\n- [ ] The model weights are available (Only relevant if addition is not a scheduler).\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11561",
    "state": "closed",
    "labels": [
      "help wanted",
      "Good second issue"
    ],
    "created_at": "2025-05-15T08:58:42Z",
    "updated_at": "2025-06-17T08:48:28Z",
    "comments": 6,
    "user": "PineREN"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1111,
    "title": "Unrecognized argument policy.path. How to load a pretrained model?",
    "body": "When I run this command:\n```\npython lerobot/scripts/control_robot.py --robot.type so100 --control.type record --control.fps 30 --control.single_task \"Grasp a yellow tape and put it to yellow square.\" --control.repo_id a_cam_1/result --control.tags '[\"tutorial\"]' --control.warmup_time_s 5 --control.episode_time_s 30 --control.reset_time_s 10 --control.m_episodes 1 --control.push_to_hub false --control.policy,path output/checkpoints/last/pretrained_model\n```\n\n\nI got:\n```\nusage: control_robot.py [-h] [--config_path str] [--robot str] [--robot.type {aloha,koch,koch_bimanual,moss,so101,so100,stretch,lekiwi}] [--robot.gripper_open_degree str]\n                        [--robot.max_relative_target str] [--robot.ip str] [--robot.port str] [--robot.video_port str] [--robot.cameras str] [--robot.calibration_dir str]\n                        [--robot.leader_arms str] [--robot.follower_arms str] [--robot.teleop_keys str] [--robot.mock str] [--control str]\n                        [--control.type {calibrate,teleoperate,record,replay,remote_robot}] [--control.arms str] [--control.teleop_time_s str] [--control.single_task str]\n                        [--policy str] [--control.policy.type {act,diffusion,pi0,tdmpc,vqbet,pi0fast}] [--control.policy.replace_final_stride_with_dilation str]\n                        [--control.policy.pre_norm str] [--control.policy.dim_model str] [--control.policy.n_heads str] [--control.policy.dim_feedforward str]\n                        [--control.policy.feedforward_activation str] [--control.policy.n_encoder_layers str] [--control.policy.n_decoder_layers str]\n                        [--control.policy.use_vae str] [--control.policy.n_vae_encoder_layers str] [--control.policy.temporal_ensemble_coeff str]\n                        [--control.policy.kl_weight str] [--control.policy.optimizer_lr_backbone str] [--control.policy.drop_n_last_frames str]\n                        [--control.policy.use_separate_rgb_encoder_per_camera str] [--control.policy.down_dims str] [--control.policy.kernel_size str]\n                        [--control.policy.n_groups str] [--control.policy.diffusion_step_embed_dim str] [--control.policy.use_film_scale_modulation str]\n                        [--control.policy.noise_scheduler_type str] [--control.policy.num_train_timesteps str] [--control.policy.beta_schedule str]\n                        [--control.policy.beta_start str] [--control.policy.beta_end str] [--control.policy.prediction_type str] [--control.policy.clip_sample str]\n                        [--control.policy.clip_sample_range str] [--control.policy.num_inference_steps str] [--control.policy.do_mask_loss_for_padding str]\n                        [--control.policy.scheduler_name str] [--control.policy.num_steps str] [--control.policy.attention_implementation str]\n                        [--control.policy.train_expert_only str] [--control.policy.train_state_proj str] [--control.policy.n_action_repeats str] [--control.policy.horizon str]\n                        [--control.policy.image_encoder_hidden_dim str] [--control.policy.state_encoder_hidden_dim str] [--control.policy.latent_dim str]\n                        [--control.policy.q_ensemble_size str] [--control.policy.mlp_dim str] [--control.policy.discount str] [--control.policy.use_mpc str]\n                        [--control.policy.cem_iterations str] [--control.policy.max_std str] [--control.policy.min_std str] [--control.policy.n_gaussian_samples str]\n                        [--control.policy.n_pi_samples str] [--control.policy.uncertainty_regularizer_coeff str] [--control.policy.n_elites str]\n                        [--control.policy.elite_weighting_temperature str] [--control.policy.gaussian_mean_momentum str] [--control.policy.max_random_shift_ratio str]\n                        [--control.policy.reward_coeff str] [--control.policy.expectile_weight str] [--control.policy.value_coeff str] [--control.policy.consistency_coeff str]\n                        [--control.policy.advantage_scaling str] [--control.policy.pi_coeff str] [--control.policy.temporal_decay_coeff str]\n                        [--control.policy.target_model_momentum str] [--control.policy.n_action_pred_token str] [--control.policy.action_chunk_size str]\n                        [--control.policy.vision_backbone str] [--control.policy.crop_shape str] [--control.policy.crop_is_random str]\n                        [--control.policy.pretrained_backbone_weights str] [--control.policy.use_group_norm str] [--control.policy.spatial_softmax_num_keypoints str]\n                        [--control.policy.n_vqvae_training_steps str] [--control.policy.vqvae_n_embed str] [--control.policy.vqvae_embedding_dim str]\n                        [--control.policy.vqvae_enc_hidden_dim str] [--control.policy.gpt_block_size str] [--control.policy.gpt_input_dim str]\n                        [--control.policy.gpt_output_dim str] [--control.policy.gpt_n_layer str] [--control.policy.gpt_n_head str] [--control.policy.gpt_hidden_dim str]\n ",
    "url": "https://github.com/huggingface/lerobot/issues/1111",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-05-15T03:13:27Z",
    "updated_at": "2025-06-24T06:20:08Z",
    "user": "milong26"
  },
  {
    "repo": "pytorch/xla",
    "number": 9175,
    "title": "Add documentation on multi-controller",
    "body": "## \ud83d\udcda Documentation\n\nAdd documentation demonstrating multi-node coordination. Start with 2 machines, each with [n] TPUs, and demonstrate ssh into each machine to run the same script with an all-reduce. Reference necessary information for network configuration to allow two hosts to communicate on GCP (optional: AWS and Azure). Cannot be just a toy example on the same machine using localhost as the coordination. Optional: demonstrate using slurm to further simplify coordination. \n\nShould end up similar to:\n\nhttps://docs.jax.dev/en/latest/multi_process.html\n\nand\n\nhttps://docs.pytorch.org/tutorials/intermediate/ddp_series_multinode.html\n\n\n",
    "url": "https://github.com/pytorch/xla/issues/9175",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-05-15T02:50:00Z",
    "updated_at": "2025-05-19T13:58:20Z",
    "comments": 0,
    "user": "yaoshiang"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11555,
    "title": "`device_map=\"auto\"` supported for diffusers pipelines?",
    "body": "### Describe the bug\n\nHey dear diffusers team,\n\nfor `DiffusionPipline`, as I understand (hopefully correctly) from [this part of the documentation](https://huggingface.co/docs/diffusers/v0.33.1/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained.device_map), it should be possible to specify `device_map=\"auto\"` when loading a pipeline with `from_pretrained` but this results in a value error saying that this is not supported.\n\nHowever, the documentation on [device placement](https://huggingface.co/docs/diffusers/en/tutorials/inference_with_big_models#device-placement) currently states that only the \"balanced\" strategy is supported.\n\nIs this possibly similar to #11432 and should be removed from the docstrings / documentation? Happy to help on this with a PR if it turns out to be a mistake in the documentation.\n\nThanks a lot for your hard work!\n\n\n\n### Reproduction\n\n```python\nfrom diffusers import DiffusionPipeline\npipeline = DiffusionPipeline.from_pretrained(\"stable-diffusion-v1-5/stable-diffusion-v1-5\", device_map=\"auto\")\n```\n\nor \n\n```python\nfrom diffusers import StableDiffusionPipeline\npipe = StableDiffusionPipeline.from_pretrained(\"stable-diffusion-v1-5/stable-diffusion-v1-5\", device_map=\"auto\")\n```\n\n### Logs\n\n```shell\n---------------------------------------------------------------------------\nNotImplementedError                       Traceback (most recent call last)\nCell In[12], line 3\n      1 from diffusers import StableDiffusionPipeline\n----> 3 pipe = StableDiffusionPipeline.from_pretrained(\"stable-diffusion-v1-5/stable-diffusion-v1-5\", device_map=\"auto\")\n\nFile ~/miniconda3/envs/pruna/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py:114, in validate_hf_hub_args.<locals>._inner_fn(*args, **kwargs)\n    111 if check_use_auth_token:\n    112     kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.__name__, has_token=has_token, kwargs=kwargs)\n--> 114 return fn(*args, **kwargs)\n\nFile ~/miniconda3/envs/pruna/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py:745, in DiffusionPipeline.from_pretrained(cls, pretrained_model_name_or_path, **kwargs)\n    742     raise ValueError(\"`device_map` must be a string.\")\n    744 if device_map is not None and device_map not in SUPPORTED_DEVICE_MAP:\n--> 745     raise NotImplementedError(\n    746         f\"{device_map} not supported. Supported strategies are: {', '.join(SUPPORTED_DEVICE_MAP)}\"\n    747     )\n    749 if device_map is not None and device_map in SUPPORTED_DEVICE_MAP:\n    750     if is_accelerate_version(\"<\", \"0.28.0\"):\n\nNotImplementedError: auto not supported. Supported strategies are: balanced\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.33.1\n- Platform: Linux-5.15.0-139-generic-x86_64-with-glibc2.35\n- Running on Google Colab?: No\n- Python version: 3.10.16\n- PyTorch version (GPU?): 2.7.0+cu126 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.30.2\n- Transformers version: 4.51.3\n- Accelerate version: 1.6.0\n- PEFT version: 0.15.2\n- Bitsandbytes version: 0.45.5\n- Safetensors version: 0.5.3\n- xFormers version: not installed\n- Accelerator: NVIDIA H100 PCIe, 81559 MiB\nNVIDIA H100 PCIe, 81559 MiB\n- Using GPU in script?: yes\n- Using distributed or parallel set-up in script?: yes\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11555",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-05-14T16:49:32Z",
    "updated_at": "2025-05-19T09:44:29Z",
    "comments": 4,
    "user": "johannaSommer"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1192,
    "title": "document the usage of environment variables",
    "body": "This is one of the community requests.\n\nSimilarly, we should also document the inductor flag usages.\n\nFormat can be a dedicated `.md` under `docs/`.",
    "url": "https://github.com/pytorch/torchtitan/issues/1192",
    "state": "open",
    "labels": [
      "documentation",
      "better engineering",
      "high priority",
      "triage review"
    ],
    "created_at": "2025-05-14T08:41:36Z",
    "updated_at": "2025-05-14T08:41:40Z",
    "comments": 0,
    "user": "tianyu-l"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1107,
    "title": "Does Pi0 use PaliGemma VLM pretrained model weights?",
    "body": "I attempted to finetune the Pi0 model, but noticed that it does not download the pretrained weights of Paligemma from Hugging Face. Specifically, I found that Pi0 initializes the VLM with:\n\n```python\nself.paligemma = PaliGemmaForConditionalGeneration(config=config.paligemma_config)\n```\n\ninstead of using:\n\n```python\nAutoModel.from_pretrained(\"google/paligemma-3b-pt-224\")\n```\n\nThis seems to result in the model not loading the pretrained weights.\n\nCould you please confirm whether this is the intended behavior? Should Pi0 load Paligemma\u2019s pretrained weights from Hugging Face, or is there a reason it initializes the model from scratch?\n\nThank you!",
    "url": "https://github.com/huggingface/lerobot/issues/1107",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "policies"
    ],
    "created_at": "2025-05-14T06:47:15Z",
    "updated_at": "2025-10-08T08:44:03Z",
    "user": "lxysl"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1106,
    "title": "How to convert image mode to video mode lerobot dataset?",
    "body": "",
    "url": "https://github.com/huggingface/lerobot/issues/1106",
    "state": "open",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-05-14T03:54:42Z",
    "updated_at": "2025-08-08T16:42:33Z",
    "user": "hairuoliu1"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1316,
    "title": "May I ask how to set the HF_TOKEN on the browser side?",
    "body": "### Question\n\nMay I ask how to set the HF_TOKEN on the browser side?\n\n![Image](https://github.com/user-attachments/assets/944af6e1-a3b7-429b-81a6-6d205925915e)\n\nThe following is my code:\n```\nconst model = await AutoModel.from_pretrained(\"briaai/RMBG-2.0\", {\n  config: {\n    model_type: \"custom\", \n  },\n  headers: {\n    'Authorization': `Bearer hf_xxxxxxxxxxxxxxx`\n  }\n});\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/1316",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-14T01:43:02Z",
    "updated_at": "2025-05-27T21:53:45Z",
    "user": "dengbupapapa"
  },
  {
    "repo": "huggingface/xet-core",
    "number": 321,
    "title": "How to resume DL of partial existing file using xet + huggingface-cli download if not previously downloaded using HF tools / cache?",
    "body": "How to resume DL of partial existing file using xet + huggingface-cli download if not previously downloaded using HF tools / cache?\n\nI guess there may be a way in the scenario I had but by my mistake apparently I chose some incorrect usage and caused the deletion of the 95% complete partial local file instead of resuming / recovering its download via XET.\n\ne.g. I tried with a fresh tool install and a process something like:\n\n% pip install -U \"huggingface_hub[hf_xet]\"\n\n% pwd\n/whatever/some_tmpdir\n\n% ls -lh somefile\n35G somefile\n// Partial file exists and is 95% complete but short / truncated by failed copy previously.\n\n% huggingface-cli download --local-dir . some_repo_id some_dir/somefile\n\nThe end result was apparently the deletion of the pre-existing 95% complete 'somefile' from the current directory and the initiation of new download using xet protocol from the xet enabled some_repo_id.\n\nBased on huggingface-cli download --help and the articles about xet I had expected it to realize the pre-existing current directory's \"somefile\" with an identical name/target directory as the file being requested for download was a partial relevant file and it should start to recover / complete the download by missing chunk completion.  That despite the fact that there was no cache directory or git LFS structure around the current working directory, it just contained the isolated partial file only.\n\n\nhuggingface-cli download --help \nusage: huggingface-cli <command> [<args>] download [-h] [--repo-type {model,dataset,space}] [--revision REVISION] [--include [INCLUDE ...]] [--exclude [EXCLUDE ...]] [--cache-dir CACHE_DIR]\n                                                   [--local-dir LOCAL_DIR] [--local-dir-use-symlinks {auto,True,False}] [--force-download] [--resume-download] [--token TOKEN] [--quiet]\n                                                   [--max-workers MAX_WORKERS]\n                                                   repo_id [filenames ...]\n\npositional arguments:\n  repo_id               ID of the repo to download from (e.g. `username/repo-name`).\n  filenames             Files to download (e.g. `config.json`, `data/metadata.jsonl`).\n\noptions:\n...\n  --local-dir LOCAL_DIR\n                        If set, the downloaded file will be placed under this directory. Check out https://huggingface.co/docs/huggingface_hub/guides/download#download-files-to-local-folder for more\n                        details.\n...\n  --resume-download     Deprecated and ignored. Downloading a file to local dir always attempts to resume previously interrupted downloads (unless hf-transfer is enabled).\n...\n\nhuggingface-cli download --local-dir . some_repo_id some_dir/somefile\nDownloading 'somefile' to '.cache/huggingface/download/whatever.incomplete'\nXet Storage is enabled for this repo. Downloading file from Xet Storage..\n...\n\n\nIf there's a different way to accomplish this partial file recovery result (or even if there's a corrupted / patched / whatever file per. xet's chunk filling capabilities) then perhaps clarifying / expanding the usage documentation to cover this kind of common scenario use case could help?\n\nThe desired result would be something like\n\nrsync --verbose --archive server:/some_repo_id/somedir/somefile somefile\n\nwhich would use rolling hash chunk based rsync algorithm / protocol downloading to complete the retrieval of the somefile in the current directory regardless of other context.\n\n\n\nAlso I wonder if it'd be interesting to have a rsync to xet 'bridge' so anyone could use a normal rsync client but pull xet files from HF repos if HF doesn't want to support rsync itself in whole but has the conceptually aligned XET back end that could be \"mapped\" to rsync chunk based protocol (I suppose) by a thin protocol adapter?\n\nLots of e.g. linux distribution mirror sites support rsync as an HTTP/HTTPS alternative so it presumably has some significant market-share for people doing IT / devops / mlops / whatever use case downloads.\n",
    "url": "https://github.com/huggingface/xet-core/issues/321",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-13T22:16:02Z",
    "updated_at": "2025-05-16T17:48:45Z",
    "user": "ghchris2021"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1819,
    "title": "Correct syntax of .env: what are those backticks for multiline strings?",
    "body": "I have read the suggestion of checking discussions but I was unable to find an answer so something very basic looks like it is missing here.\n\nIn the documentation there are many examples suggesting of putting long values in env var surrounded by backticks.\n\nHowever when I do this I get errors like:\n\nJSON5: invalid character '`' at 1:1\n\nI have checked around and I have been unable to find anywhere references to .env using backticks for multiline strings, and the parser is refusing this.\n\nTHis is happening with a git clone of main but also using tagged versions.\n\nSo how do you possibile use this apparently non standard syntax and how is it possible no one else but me is having this issue? \n\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1819",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2025-05-13T12:21:43Z",
    "updated_at": "2025-05-23T09:37:09Z",
    "comments": 1,
    "user": "sciabarracom"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2262,
    "title": "New Release to Support `transformers>=4.51.0`?",
    "body": "### Feature request\n\nThe latest release (`1.24.0`) is 4 months old. There has been around 38 commits since the last release. Will there be a new release soon?\n\n### Motivation\n\nThere is a medium CVE related to `transformers==4.48.1` that is the latest compatible version.\nGHSA-fpwr-67px-3qhx\n\nI am also blocked from upgrading `vllm==0.8.5` within my system as it requires `transformers>=4.51.0`. `transformers==4.48.1` is compatible with up to `vllm==0.8.2` only where there are critical and high CVEs.\nGHSA-hj4w-hm2g-p6w5\nGHSA-9f8f-2vmf-885j\n\nIt looks like the current dependencies in the `main` branch will mitigate these issues completely. Is there any blocker to creating a new release from current state?\n\n### Your contribution\n\nDon't think I will be granted permissions to create releases in this project.",
    "url": "https://github.com/huggingface/optimum/issues/2262",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-13T07:46:15Z",
    "updated_at": "2025-05-13T22:27:08Z",
    "comments": 2,
    "user": "yxtay"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1101,
    "title": "ValueError: No integer found between bounds [low_factor=np.float32(-0.001953125), upp_factor=np.float32(-0.001953125)]",
    "body": "### System Info\n\n```Shell\n2025,ubantu,python3.10. when doing teleoperation\n```\n\n### Information\n\n- [ ] One of the scripts in the examples/ folder of LeRobot\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\npython lerobot/scripts/control_robot.py   --robot.type=so100   --robot.cameras='{}'   --control.type=teleoperate \n\n\n### Expected behavior\n\nHow to deal with it.",
    "url": "https://github.com/huggingface/lerobot/issues/1101",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-13T05:06:35Z",
    "updated_at": "2025-06-19T14:25:08Z",
    "user": "qingx-cyber"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1184,
    "title": "[Question] CP and DP",
    "body": "Hi, this is a really great repo! Thanks for open-sourcing it!\n\nI am reading the code of how torchtian handles the multi-dimensional parallelism. It seems the `cp` is a part of the mesh dimensions interacting with `dp_shard`, `dp_replicate` etc. My understanding of `cp` is that it  is orthogonal to other parallelisms. For example, it is a validate configuration of `dp_shard=8`, `dp_replicate=1` and `cp=8` for a 8-GPU node. But according to the code, it will raise an error as `dp_shard * cp != world_size`.  \n\n\nhttps://github.com/pytorch/torchtitan/blob/6df8c8925bb2ba9b4e6aa88cece0e3f0633ab6ce/torchtitan/distributed/parallel_dims.py#L48\n\n",
    "url": "https://github.com/pytorch/torchtitan/issues/1184",
    "state": "closed",
    "labels": [
      "question",
      "module: context parallel"
    ],
    "created_at": "2025-05-13T03:30:10Z",
    "updated_at": "2025-05-13T17:19:22Z",
    "user": "galalalala"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11542,
    "title": "What's the difference between 'example/train_text_to_image_lora.py' and 'example/research_projects/lora/train_text_to_image_lora.py' ?",
    "body": " I want to use the \"--train_text_encoder\" argument, but it only exists in the latter script.",
    "url": "https://github.com/huggingface/diffusers/issues/11542",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-13T01:41:19Z",
    "updated_at": "2025-06-10T20:35:10Z",
    "comments": 2,
    "user": "night-train-zhx"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1097,
    "title": "UnboundLocalError: local variable 'action' referenced before assignment",
    "body": "May I ask where the problem lies? It occurred during the evaluation of the strategy and I have been searching for a long time without finding a solution\n\n(lerobot) wzx@wzx:~/lerobot$ python lerobot/scripts/control_robot.py   \\\n> --robot.type=so101   \\\n> --control.type=record   \\\n> --control.fps=30   \\\n> --control.single_task=\"Grasp a lego block and put it in the bin.\" \\\n> --control.repo_id=${HF_USER}/eval_act_so101_test   \\\n> --control.tags='[\"tutorial\"]'   \\\n> --control.warmup_time_s=5   \\\n> --control.episode_time_s=30   \\\n> --control.reset_time_s=30   \\\n> --control.num_episodes=10  \\\n> --control.display_data=true \\\n> --control.push_to_hub=true   \\\n> --control.policy.path=outputs/train/act_so101_test/checkpoints/last/pretrained_model \nINFO 2025-05-12 22:54:05 ol_robot.py:408 {'control': {'display_data': True,\n             'episode_time_s': 30,\n             'fps': 30,\n             'num_episodes': 10,\n             'num_image_writer_processes': 0,\n             'num_image_writer_threads_per_camera': 4,\n             'play_sounds': True,\n             'policy': {'beta_end': 0.02,\n                        'beta_schedule': 'squaredcos_cap_v2',\n                        'beta_start': 0.0001,\n                        'clip_sample': True,\n                        'clip_sample_range': 1.0,\n                        'crop_is_random': True,\n                        'crop_shape': (84, 84),\n                        'device': 'cuda',\n                        'diffusion_step_embed_dim': 128,\n                        'do_mask_loss_for_padding': False,\n                        'down_dims': (512, 1024, 2048),\n                        'drop_n_last_frames': 7,\n                        'horizon': 16,\n                        'input_features': {'observation.images.laptop': {'shape': (3,\n                                                                                   480,\n                                                                                   640),\n                                                                         'type': <FeatureType.VISUAL: 'VISUAL'>},\n                                           'observation.images.phone': {'shape': (3,\n                                                                                  480,\n                                                                                  640),\n                                                                        'type': <FeatureType.VISUAL: 'VISUAL'>},\n                                           'observation.state': {'shape': (6,),\n                                                                 'type': <FeatureType.STATE: 'STATE'>}},\n                        'kernel_size': 5,\n                        'n_action_steps': 8,\n                        'n_groups': 8,\n                        'n_obs_steps': 2,\n                        'noise_scheduler_type': 'DDPM',\n                        'normalization_mapping': {'ACTION': <NormalizationMode.MIN_MAX: 'MIN_MAX'>,\n                                                  'STATE': <NormalizationMode.MIN_MAX: 'MIN_MAX'>,\n                                                  'VISUAL': <NormalizationMode.MEAN_STD: 'MEAN_STD'>},\n                        'num_inference_steps': None,\n                        'num_train_timesteps': 100,\n                        'optimizer_betas': (0.95, 0.999),\n                        'optimizer_eps': 1e-08,\n                        'optimizer_lr': 0.0001,\n                        'optimizer_weight_decay': 1e-06,\n                        'output_features': {'action': {'shape': (6,),\n                                                       'type': <FeatureType.ACTION: 'ACTION'>}},\n                        'prediction_type': 'epsilon',\n                        'pretrained_backbone_weights': None,\n                        'scheduler_name': 'cosine',\n                        'scheduler_warmup_steps': 500,\n                        'spatial_softmax_num_keypoints': 32,\n                        'use_amp': False,\n                        'use_film_scale_modulation': True,\n                        'use_group_norm': True,\n                        'use_separate_rgb_encoder_per_camera': False,\n                        'vision_backbone': 'resnet18'},\n             'private': False,\n             'push_to_hub': True,\n             'repo_id': 'bursomi/eval_act_so101_test',\n             'reset_time_s': 30,\n             'resume': False,\n             'root': None,\n             'single_task': 'Grasp a lego block and put it in the bin.',\n             'tags': ['tutorial'],\n             'video': True,\n             'warmup_time_s': 5},\n 'robot': {'calibration_dir': '.cache/calibration/so101',\n           'cameras': {'laptop': {'camera_index': 2,\n                                  'channels': 3,\n                                  'color_mode': 'rgb',\n                                  'fps': 30,\n                                  'height': 480,\n                                  'mock': False,\n                                  'rotation': None,\n                ",
    "url": "https://github.com/huggingface/lerobot/issues/1097",
    "state": "closed",
    "labels": [
      "bug",
      "question"
    ],
    "created_at": "2025-05-12T16:06:27Z",
    "updated_at": "2025-06-19T14:08:57Z",
    "user": "incomple42"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1093,
    "title": "List of available task",
    "body": "Thank you for your effort. Can you provide a list of available tasks (not just environments) for better understanding and usage? ",
    "url": "https://github.com/huggingface/lerobot/issues/1093",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-10T06:18:21Z",
    "updated_at": "2025-10-17T12:03:32Z",
    "user": "return-sleep"
  },
  {
    "repo": "huggingface/transformers",
    "number": 38052,
    "title": "`.to` on a `PreTrainedModel` throws a Pyright type check error. What is the correct way to put a model to the device that does not throw type check errors?",
    "body": "### System Info\n\n(venv) nicholas@B367309:tmp(master)$ transformers-cli env\n\nCopy-and-paste the text below in your GitHub issue and FILL OUT the two last points.\n\n- `transformers` version: 4.51.1\n- Platform: Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.39\n- Python version: 3.12.3\n- Huggingface_hub version: 0.30.2\n- Safetensors version: 0.5.3\n- Accelerate version: 1.6.0\n- Accelerate config:    not found\n- DeepSpeed version: not installed\n- PyTorch version (GPU?): 2.6.0+cu126 (True)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: <fill in>\n- Using GPU in script?: <fill in>\n- GPU type: NVIDIA RTX 2000 Ada Generation Laptop GPU\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nHere is a small snippet\n\n```python\nfrom transformers.models.auto.modeling_auto import AutoModelForCausalLM\nfrom transformers.models.llama.modeling_llama import LlamaForCausalLM\n\nmodel = AutoModelForCausalLM.from_pretrained(\n    \"deepseek-ai/deepseek-coder-1.3b-instruct\", torch_dtype=torch.float16\n)\nassert isinstance(model, LlamaForCausalLM)\nmodel.to(\"cuda:0\")\n```\n\nThis code runs fine and correctly puts the model to the device, however, `Pyright` throws a pre-runtime type check error on the `model.to(\"cuda:0\") call. This is the error,\n\n```plaintext\nPyright: Argument of type \"Literal['cuda:0']\" cannot be assigned to parameter \"self\" of \ntype \"LlamaForCausalLM\" in function \"__call__\".\n\"Literal['cuda:0']\" is not assignable to \"LlamaForCausalLM\" [reportArgumentType]  \n```\n\nWhat is the correct way to put a model to the device that will satisfy the type checker?\n\n### Expected behavior\n\nThere should be know static type check error when doing `model.to(<device>)`",
    "url": "https://github.com/huggingface/transformers/issues/38052",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-05-09T19:01:15Z",
    "updated_at": "2025-06-29T08:03:07Z",
    "user": "nickeisenberg"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 401,
    "title": "how to train wan using multi-node",
    "body": "### Feature request  / \u529f\u80fd\u5efa\u8bae\n\nHi! I still wonder the multi-node training of Wan2.1 14B. Do you support FSDP across nodes? \n\n### Motivation / \u52a8\u673a\n\nCurrently the memory restraint is very harsh for long video LoRA fine-tuning\n\n### Your contribution / \u60a8\u7684\u8d21\u732e\n\nN/A",
    "url": "https://github.com/huggingface/finetrainers/issues/401",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-09T18:11:07Z",
    "updated_at": "2025-05-09T18:11:07Z",
    "user": "Radioheading"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1179,
    "title": "FSDP2+DPP vs 2D Device Mesh FSDP2",
    "body": "I have a question regarding FSDP2 + DDP, in torchtitan codebase it is used as FSDP2 -> DDP. In FSDP2 doc it is said that you can use 2d device mesh to apply MISC equivalent in deepspeed which IUC is FSDP wrapped in DDP.\n\nIs there any difference between those 2 methods that I should be aware of, or are they functionally equivalent and achieve the same speed/results.",
    "url": "https://github.com/pytorch/torchtitan/issues/1179",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-09T18:02:56Z",
    "updated_at": "2025-05-10T16:52:15Z",
    "comments": 2,
    "user": "S1ro1"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1177,
    "title": "Can we support outputting checkpoints directly in .pt format?",
    "body": "Today we need to do an extra conversion step according to this README: https://github.com/pytorch/torchtitan/blob/main/docs/checkpoint.md\n\n```\npython -m torch.distributed.checkpoint.format_utils dcp_to_torch outputs/checkpoint/step-100 /tmp/checkpoint.pt\n```\n\nI think we should **provide an option for users to specify which format to output their checkpoints** instead, and call this function in torchtitan for users as part of outputting the checkpoint.\n\n------------------------------------------------------------------------------------------\n\n**Bonus:** This conversion step actually fails today if we used FP8 training. I had to manually add the following line to the `dcp_to_torch` function as a hack to get it to work:\n```\ntorch.serialization.add_safe_globals([torchao.float8.fsdp_utils.WeightWithDynamicFloat8CastTensor])\n```\nIt would be great if we can just either implicitly add the safe globals when we output the checkpoint in torchtitan, or simply remove this `WeightWithDynamicFloat8CastTensor` from the BC surface.",
    "url": "https://github.com/pytorch/torchtitan/issues/1177",
    "state": "open",
    "labels": [
      "enhancement",
      "module: checkpoint"
    ],
    "created_at": "2025-05-09T16:01:50Z",
    "updated_at": "2025-08-21T03:18:12Z",
    "comments": 8,
    "user": "andrewor14"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1091,
    "title": "Diffusion policy for different tasks instead of PushT",
    "body": "Thank you all for the great job. I want to know if I can train the diffusion policy for different tasks besides the PushT task. How to achieve that? If the task is a new custom task with custom dataset, is there any feasible solution to solve that? \nThank you for your help!",
    "url": "https://github.com/huggingface/lerobot/issues/1091",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2025-05-09T15:44:20Z",
    "updated_at": "2025-12-31T02:35:27Z",
    "user": "siqisiqisiqisiqi"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1086,
    "title": "push_to_the_hub error",
    "body": "### System Info\n\n```Shell\n- `lerobot` version: 0.1.0\n- Platform: macOS-14.6.1-arm64-arm-64bit\n- Python version: 3.10.13\n- Huggingface_hub version: 0.30.2\n- Dataset version: 3.5.0\n- Numpy version: 2.2.5\n- PyTorch version (GPU?): 2.7.0 (False)\n- Cuda version: N/A\n- Using GPU in script?: <fill in>\n```\n\n### Information\n\n- [ ] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nimport argparse\nfrom lerobot.common.datasets.lerobot_dataset import LeRobotDataset\n\ndef parse_args():\n    parser = argparse.ArgumentParser(description=\"Push a local HuggingFace dataset to the Hub\")\n    parser.add_argument(\n        \"--path\", \n        type=str, \n        required=True, \n        help=\"Local directory containing the dataset\"\n    )\n    parser.add_argument(\n        \"--repo_id\", \n        type=str, \n        required=True, \n        help=\"Repository ID on HuggingFace Hub (format: username/dataset_name)\"\n    )\n    parser.add_argument(\n        \"--private\", \n        action=\"store_true\", \n        help=\"Whether to make the dataset private\"\n    )\n    # Removed unused arguments\n    return parser.parse_args()\n\ndef main():\n    args = parse_args()\n    \n    print(f\"Loading dataset from {args.path}...\")\n    dataset = LeRobotDataset(\n        repo_id=args.repo_id,\n        root=args.path\n    )\n    \n    print(f\"Pushing dataset to {args.repo_id}...\")\n    dataset.push_to_hub(\n        args.repo_id,\n        private=args.private\n    )\n    print(\"Dataset successfully pushed to Hub!\")\n    \n    return 0\n\nif __name__ == \"__main__\":\n    main()\n\n\n<img width=\"1502\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/36c563a6-ed2e-4deb-b54e-ce5c9889c50b\" />\n\n### Expected behavior\n\nupload it to the huggingface",
    "url": "https://github.com/huggingface/lerobot/issues/1086",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-09T03:48:09Z",
    "updated_at": "2025-10-17T11:55:25Z",
    "user": "jungwonshin"
  },
  {
    "repo": "pytorch/xla",
    "number": 9129,
    "title": "set_mat_mul_precision is flakey",
    "body": "## \ud83d\udc1b Bug\n\nset_mat_mul_precision seems to allow switching the precision within a single process... sometimes, like in the precision_tutorial.py/ipynb. But in the unit test test_mat_mul_precision, there's an example of a test that switches the precision unsuccessfully. \n\n## To Reproduce\n\nOne unit test in test_mat_mul_precision.py is decorated \"@expectedFailure\". Once this issue is resolved, we should be able to remove that decorator and see that these tests work as intended, within a loop. \n\nPYTHONPATH=\"$TEST_CDIR${PYTHONPATH:+:$PYTHONPATH}\" python3 -m unittest test_mat_mul_precision.TestMatMulPrecision.test_all\n\n\n## Expected behavior\n\nProgram can switch mat_mul_precision between default, high, and highest dynamically in a single program.\n\n",
    "url": "https://github.com/pytorch/xla/issues/9129",
    "state": "open",
    "labels": [
      "bug",
      "runtime"
    ],
    "created_at": "2025-05-09T03:22:22Z",
    "updated_at": "2025-05-12T12:23:12Z",
    "comments": 1,
    "user": "yaoshiang"
  },
  {
    "repo": "pytorch/xla",
    "number": 9118,
    "title": "Add installation instructions to `benchmarks/README.md`",
    "body": "## \ud83d\udcda Documentation\n\nThe [`benchmarks/README.md`](https://github.com/pytorch/xla/blob/master/benchmarks/README.md) does not contain the installation instructions, which is crucial for running the benchmarks.\n\nIt requires installing the [`pytorch/benchmark`](https://github.com/pytorch/benchmark) repo and other libraries like `libGL` (required by Llava).\n\n## Solution\n\nAdd the instructions to [`benchmarks/README.md`](https://github.com/pytorch/xla/blob/master/benchmarks/README.md).\nInstall [`pytorch/benchmark`](https://github.com/pytorch/benchmark) as a library.\nInstall `libGL`.\nInstall any other requirements.\n\nTo verify, make sure the instructions work with the devcontainer.",
    "url": "https://github.com/pytorch/xla/issues/9118",
    "state": "closed",
    "labels": [
      "documentation",
      "benchmarking"
    ],
    "created_at": "2025-05-08T17:51:31Z",
    "updated_at": "2025-05-22T17:40:05Z",
    "comments": 1,
    "user": "haifeng-jin"
  },
  {
    "repo": "huggingface/trl",
    "number": 3424,
    "title": "[GRPO] How to train model using vLLM and model parallelism on one node?",
    "body": "I tried to start GRPO trainer with vLLM and model parallelism on a single node with 8 GPUs (8 x A100 80G).\n\nMy plan was to use one GPU as the vLLM server and other 7 GPUs to load model with model parallelism (e.g., `device_map=\"auto\"`)\n\n```\nCUDA_VISIBLE_DEVICES=0 trl vllm-serve --model <model_path> &\nCUDA_VISIBLE_DEVICES=1,2,3,4,5,6,7 accelerate launch --num_machines 1 --num_processes 1 train.py\n```\n\nBut the training ran into the following error\n\n`AssertionError: this nccl communicator is created to work on cuda:0, but the input tensor is on cuda:1`\n\nI think it happened when copying the weights to vLLM server.\n\n```\ntorch==2.6.0+cu124\ntransformers==4.51.3\ntrl==0.17.0\naccelerate==1.4.0\n```\n\n",
    "url": "https://github.com/huggingface/trl/issues/3424",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-08T17:22:19Z",
    "updated_at": "2025-12-02T22:48:13Z",
    "user": "zhiqihuang"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1082,
    "title": "When add openvla oft  policy?",
    "body": "",
    "url": "https://github.com/huggingface/lerobot/issues/1082",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2025-05-08T09:16:16Z",
    "updated_at": "2025-12-31T02:35:30Z",
    "user": "zmf2022"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 3213,
    "title": "Whether it supports Huawei Atlas300 graphics card?",
    "body": "### System Info\n\n\nDoes the tgi inference framework support Huawei Atlas300I graphics cards?Could you help come up with a compatible solution?\n\n\n### Information\n\n- [x] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [ ] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\n.\n\n### Expected behavior\n\nCompatible with Huawei graphics cards. I want to use tgi on the Huawei Atlas300I graphics card",
    "url": "https://github.com/huggingface/text-generation-inference/issues/3213",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-08T03:18:30Z",
    "updated_at": "2025-05-08T03:18:38Z",
    "comments": 0,
    "user": "fxb392"
  },
  {
    "repo": "pytorch/serve",
    "number": 3416,
    "title": "Adding vendor RBLN(Rebellions)",
    "body": "TorchServe has a varying structure for different accelerator types through recently added #3371.\n\nAlthough [Rebellions](https://rebellions.ai/) provides a guide on how to utilize `TorchServe with the RBLN(Rebellions) NPUs` through its official document page(https://docs.rbln.ai/software/model_serving/torchserve/torchserve.html), the current implementation of TorchServe does not recognize the RBLN NPU as a valid accelerator vendor. As a result, even when `gpu_id` is set in configuration using the `RBLN NPU`, the specified RBLN NPUs cannot be properly utilized.\n\nWe would like to propose adding RBLN NPU as a recognized accelerator vendor in TorchServe, along with an official user guide. This addition will enable seamless integration and usage of TorchServe in environments equipped with RBLN NPUs.",
    "url": "https://github.com/pytorch/serve/issues/3416",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-08T00:49:45Z",
    "updated_at": "2025-05-08T00:49:45Z",
    "comments": 0,
    "user": "rebel-ysseo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 153108,
    "title": "Introduce unbacked friendly is_known_contiguous and use it instead of is_contiguous in all locations where there is a general path for not know_contiguous",
    "body": "title. \n\ncc @chauhang @penguinwu @ezyang @bobrenjc93",
    "url": "https://github.com/pytorch/pytorch/issues/153108",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamic shapes",
      "data dependent error"
    ],
    "created_at": "2025-05-07T23:10:19Z",
    "updated_at": "2025-09-27T01:23:17Z",
    "user": "laithsakka"
  },
  {
    "repo": "huggingface/trl",
    "number": 3419,
    "title": "[GRPO] How to do gradient accumulation over sampled outputs?",
    "body": "Greetings,\n\nI am wondering if we have this feature to do gradient accumulation over sampled outputs. For example, if I have `num_generations = 4`, so we have a single query `q1`, we have`completions = [o1, o2, o3, o4]`. I want to set that `per_device_train_batch_size=2, gradient_accumulation_steps=2`. So that the GPU or cluster will sample `[o1, o2]` first, and then calculate the gradient, then do, `[o3,o4]`, and do gradient accumulation over these two mini-samples for the datapoint `q1`. \n\nI assume this will be equivalent to having `num_generations=4, per_device_train_batch_size=4, gradient_accumulation_steps=1`. But we cannot do this now. Could someone tell me how to properly do that? Do we support such feature now?\n\nI hope I made myself clear.\n\nThank you very much!",
    "url": "https://github.com/huggingface/trl/issues/3419",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-07T17:49:36Z",
    "updated_at": "2025-05-09T06:26:29Z",
    "user": "SpaceHunterInf"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1080,
    "title": "Update `control_sim_robot.py` to use the new configs",
    "body": "Adding this issue to track one of the TODO's of this MR #550 \n\nAs of now, [this script](https://github.com/huggingface/lerobot/blob/8cfab3882480bdde38e42d93a9752de5ed42cae2/lerobot/scripts/control_sim_robot.py) is outdated; It does not use the new configuration classes.",
    "url": "https://github.com/huggingface/lerobot/issues/1080",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-07T11:37:47Z",
    "updated_at": "2025-06-19T14:04:11Z",
    "user": "jccalvojackson"
  },
  {
    "repo": "huggingface/Math-Verify",
    "number": 53,
    "title": "How to turn off error print?",
    "body": "When using multiprocessing, there is a lot of error message printed.",
    "url": "https://github.com/huggingface/Math-Verify/issues/53",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-07T08:19:36Z",
    "updated_at": "2025-07-02T16:07:02Z",
    "user": "wenxueru"
  },
  {
    "repo": "pytorch/executorch",
    "number": 10745,
    "title": "How to use tokenizer.json in ExecuTorch Android demo (without tokenizer.model)?",
    "body": "### \ud83d\udcda The doc issue\n\nI'm trying to deploy a language or vision-language model on Android using the ExecuTorch Android demo app.\nThe model I'm working with only provides tokenizer.json, but the current Android implementation appears to expect a tokenizer.model file instead.\n\nIs tokenizer.model mandatory for the ExecuTorch demo app?\n\nIf I only have a tokenizer.json file (from HuggingFace), is there any recommended way to convert or load it in the app?\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @kirklandsign @cbilgin",
    "url": "https://github.com/pytorch/executorch/issues/10745",
    "state": "closed",
    "labels": [
      "triaged",
      "module: android"
    ],
    "created_at": "2025-05-07T03:22:03Z",
    "updated_at": "2025-05-07T21:33:46Z",
    "user": "jordanqi"
  },
  {
    "repo": "huggingface/peft",
    "number": 2533,
    "title": "Integrate TLoRA (Tri-Matrix LoRA)",
    "body": "### Feature request\n\nWe would like to propose integrating a novel parameter-efficient fine-tuning method called **TLoRA (Tri-Matrix LoRA)** into the `peft` library. We believe TLoRA offers significant advantages in terms of parameter efficiency, making it a valuable addition to the PEFT ecosystem.\n\nOur method is detailed in the paper: **https://arxiv.org/abs/2504.18735**\n\n**What is TLoRA?**\n\nTLoRA is a variation of LoRA that introduces a tri-matrix decomposition for the weight update matrix $\\Delta W$. Instead of the standard $W + A B$, TLoRA uses $W + \\alpha A B C $, where:\n\n* $W$ is the original pre-trained weight matrix.\n* $A$ is a fixed, non-trainable matrix (e.g., initialized randomly or using Kaiming/Xavier).\n* $B$ is the _only_ trainable matrix.\n* $C$ is another fixed, non-trainable matrix (similar initialization as A).\n* $\\alpha$ is a trainable scaling parameter.\n\nThe $\\Delta W$ update is computed as the product of three matrices: a fixed input projection matrix $A$, a small trainable bottleneck matrix $B$, and a fixed output projection matrix $C$. Only matrix $B$ is updated during fine-tuning.\n\n**TLoRA Implementation:**\n\nThe core idea can be represented in a layer similar to this (based on our implementation):\n\n```python\nclass TLoRALayer(nn.Module):\n    def __init__(self, weight, bias, rank=32):\n        super(TLoRALayer, self).__init__()\n\n        row, column = weight.shape\n\n        # Restore Linear layer\n        if bias is None:\n            self.linear = nn.Linear(column, row, bias=False)\n            self.linear.load_state_dict({\"weight\": weight})\n        else:\n            self.linear = nn.Linear(column, row)\n            self.linear.load_state_dict({\"weight\": weight, \"bias\": bias})\n\n        # Create TLoRA weights with initialization\n        self.random_A = nn.Parameter(\n            torch.zeros(column, rank), requires_grad=False\n        )  # First matrix, non-trainable\n        nn.init.kaiming_normal_(self.random_A, a=math.sqrt(5))\n\n        self.lora_B = nn.Parameter(torch.zeros(rank, rank))  # Second matrix (trainable)\n\n        self.random_C = nn.Parameter(\n            torch.zeros(rank, row), requires_grad=False\n        )  # Third matrix\n        nn.init.kaiming_normal_(self.random_C, a=math.sqrt(5))\n\n        self.lora_scaling = nn.Parameter(torch.ones(1))\n        self.dropout = nn.Dropout(0.5)\n\n    def forward(self, input):\n        # Standard linear transformation\n        x = self.linear(input)\n\n        # Low-rank adaptation with tri-matrix TLoRA\n        # Using the scaling to control the LoRA output\n        y = self.lora_scaling * (input @ self.random_A @ self.lora_B @ self.random_C)\n\n        y = self.dropout(y)\n\n        return x + y\n\n```\n\nFull Repo: https://github.com/itanvir/tlora \n\n### Motivation\n\n1.  **Extreme Parameter Efficiency:** The core trainable component in TLoRA is the matrix $B$ with dimensions `rank x rank`. Compared to standard LoRA's trainable matrices $A$ (`input_dim x rank`) and $B$ (`rank x output_dim`), TLoRA's trainable parameters are significantly fewer. This makes TLoRA potentially one of the most parameter-efficient methods in PEFT for a given rank.\n2.  **Competitive Performance:** The fixed matrices $A$ and $C$ can be seen as defining fixed subspaces. By training only the matrix $B$ connecting these subspaces, TLoRA might capture more focused and effective updates compared to training the full $A$ and $B$ matrices in standard LoRA. Our paper provides empirical evidence supporting its effectiveness.\n\n### Your contribution\n\nCan give inputs on the design. It should be straightforward.",
    "url": "https://github.com/huggingface/peft/issues/2533",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-06T21:22:50Z",
    "updated_at": "2025-06-15T15:03:57Z",
    "comments": 2,
    "user": "itanvir"
  },
  {
    "repo": "huggingface/candle",
    "number": 2945,
    "title": "Operating steps from scratch for beginners?",
    "body": "from\na\nTo\nZ",
    "url": "https://github.com/huggingface/candle/issues/2945",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-06T15:34:02Z",
    "updated_at": "2025-05-06T15:34:02Z",
    "comments": 0,
    "user": "Qarqor5555555"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1169,
    "title": "how to inference with pretrained model?",
    "body": "hi, after pretrain/sft with torchtitan, how to inference with the checkpoint? does the repo provide the inference code? thank you.",
    "url": "https://github.com/pytorch/torchtitan/issues/1169",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-06T10:28:50Z",
    "updated_at": "2025-08-21T03:18:05Z",
    "user": "dragen1860"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1168,
    "title": "How to use fsdp2 cpu_offload?",
    "body": "I am currently using `cpuOffloadPolicy` in the following way:\n```py\n      transformer_cls_to_wrap = list()\n        for layer_class in transformer_cls_names_to_wrap:\n            transformer_cls = get_module_class_from_name(model_to_wrap, layer_class)\n            if transformer_cls is not None:\n                transformer_cls_to_wrap.append(transformer_cls)\n        if len(transformer_cls_to_wrap) == 0:\n            raise NotImplementedError(\"len(transformer_cls_to_wrap) == 0, please check the wrapping rules!\")\n        mp_policy = MixedPrecisionPolicy(\n            param_dtype=torch.bfloat16,\n            reduce_dtype=torch.float32,\n        )\n        fsdp_kwargs = {\n            \"reshard_after_forward\": True,\n            \"mp_policy\": mp_policy,\n            \"offload_policy\": CPUOffloadPolicy() if self.args.adam_offload else OffloadPolicy(),\n        }\n\n        for cls_to_wrap in transformer_cls_to_wrap:\n            for module in model_to_wrap.modules():\n                if isinstance(module, cls_to_wrap):\n                    fully_shard(module, **fsdp_kwargs)\n        for name, module in model_to_wrap.named_modules():\n            if 'lm_head' in name:\n                fully_shard(module, **fsdp_kwargs)\n\n        fully_shard(model_to_wrap, **fsdp_kwargs)\n\n        # cast model into fp32 to create optimizer with fp32 states\n        # https://github.com/pytorch/torchtitan/issues/1133#issuecomment-2824429682\n        model_to_wrap = model_to_wrap.to(torch.float32)\n\n        if is_meta_initialized(model_to_wrap):\n            model.to_empty(device='cuda')\n\n        return model\n```\nThe model is created from huggingface pretrained model, but I got the following error when doing `clip_grad_norm`:\n\n```\ngrad_norm = torch.nn.utils.clip_grad_norm_(model.parameters(), max_norm=self.grad_clip)\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/nn/utils/clip_grad.py\", line 30, in _no_grad_wrapper\n[rank4]:     return func(*args, **kwargs)\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/nn/utils/clip_grad.py\", line 105, in clip_grad_norm_\n[rank4]:     clip_coef = max_norm / (total_norm + 1e-6)\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/_tensor.py\", line 39, in wrapped\n[rank4]:     return f(*args, **kwargs)\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/_tensor.py\", line 1032, in __rdiv__\n[rank4]:     return self.reciprocal() * other\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/_compile.py\", line 32, in inner\n[rank4]:     return disable_fn(*args, **kwargs)\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py\", line 632, in _fn\n[rank4]:     return fn(*args, **kwargs)\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/distributed/tensor/_api.py\", line 340, in __torch_dispatch__\n[rank4]:     return DTensor._op_dispatcher.dispatch(\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/distributed/tensor/_dispatch.py\", line 181, in dispatch\n[rank4]:     self.redistribute_local_args(\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/distributed/tensor/_dispatch.py\", line 317, in redistribute_local_args\n[rank4]:     resharded_local_tensor = redistribute_local_tensor(\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/distributed/tensor/_redistribute.py\", line 195, in redistribute_local_tensor\n[rank4]:     new_local_tensor = partial_spec._reduce_value(\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/distributed/tensor/_ops/_math_ops.py\", line 126, in _reduce_value\n[rank4]:     reduced_tensor = super()._reduce_value(tensor, mesh, mesh_dim)\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/distributed/tensor/placement_types.py\", line 599, in _reduce_value\n[rank4]:     return funcol.all_reduce(\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/distributed/_functional_collectives.py\", line 175, in all_reduce\n[rank4]:     tensor = torch.ops._c10d_functional.all_reduce(self, reduceOp.lower(), group_name)\n[rank4]:   File \"/root/miniconda3/lib/python3.10/site-packages/torch/_ops.py\", line 1116, in __call__\n[rank4]:     return self._op(*args, **(kwargs or {}))\n[rank4]: RuntimeError: No backend type associated with device type cpu\n```\n\nIs there anything wrong in my model init device?",
    "url": "https://github.com/pytorch/torchtitan/issues/1168",
    "state": "closed",
    "labels": [
      "module: fsdp"
    ],
    "created_at": "2025-05-06T07:44:48Z",
    "updated_at": "2025-05-12T03:29:30Z",
    "user": "KimmiShi"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1072,
    "title": "How to merge collected data into one?",
    "body": "For stability I collect data 10 episode by 10. Then forming this:\nrepo_id/first,repo_id_second...\nI want to merge them together to repo_id/one_task for training, but it's hard to fix meta files. \n\nI'm not sure if this approach helps with training, or if I should determine the number of episodes needed for training in advance when collecting data.",
    "url": "https://github.com/huggingface/lerobot/issues/1072",
    "state": "closed",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-05-06T02:27:24Z",
    "updated_at": "2025-05-07T02:29:27Z",
    "user": "milong26"
  },
  {
    "repo": "pytorch/xla",
    "number": 9095,
    "title": "Support Dynamic Grid in Pallas Kernel",
    "body": "## \ud83d\ude80 Feature\n<!-- A clear and concise description of the feature proposal -->\n\nSupport dynamic grid feature of pallas kernel through PyTorch/XLA wrapper. Below is an example of dynamic grid in jax.\n\n```\nimport functools\nimport time\n\nimport jax\nfrom jax._src.pallas.pallas_call import _trace_kernel_to_jaxpr\nimport jax.numpy as jnp\nfrom jax.experimental import pallas as pl\nfrom jax import export\nimport numpy as np\n\n\ndef matmul_kernel(x_ref, y_ref, o_ref):\n  block_m, block_l = x_ref.shape\n  block_l2, block_n = y_ref.shape\n  assert block_l2 == block_l\n  assert o_ref.shape == (block_m, block_n)\n  @pl.when(pl.program_id(axis=2) == 0)\n  def _():\n    o_ref[...] = jnp.zeros_like(o_ref)\n\n  o_ref[...] += jnp.dot(x_ref[...], y_ref[...])\n\n\n@functools.partial(jax.jit, static_argnames=['block_shape'])\ndef matmul(\n    x: jax.Array,\n    y: jax.Array,\n    m: int,\n    n: int,\n    l: int,\n    *,\n    block_shape=(128, 128, 128)\n):\n  block_m, block_n, block_l = block_shape\n  grid = (m, n, l)\n  fused_matmul = pl.pallas_call(\n      functools.partial(matmul_kernel),\n      out_shape=jax.ShapeDtypeStruct((x.shape[0], y.shape[1]), jnp.float32),\n      in_specs=[\n          pl.BlockSpec((block_m, block_l), lambda i, j, k: (i, k)),\n          pl.BlockSpec((block_l, block_n), lambda i, j, k: (k, j)),\n      ],\n      out_specs=pl.BlockSpec((block_m, block_n), lambda i, j, k: (i, j)),\n      grid=grid,\n      debug=False,\n      # interpret=jtu.test_device_matches([\"cpu\"]),\n  )\n  return fused_matmul(x, y)\n\n\nx_shape = (8192, 8192)\ny_shape = (8192, 8192)\n\nn = l = 64\nfor m in range(4, 65, 4):\n  key = jax.random.key(m)\n  key1, key2 = jax.random.split(key, 2)\n  x = jax.random.normal(key1, x_shape, dtype=np.float32).block_until_ready()\n  y = jax.random.normal(key2, y_shape, dtype=np.float32).block_until_ready()\n  start_time = time.time()\n  res = matmul(x, y, m, n, l).block_until_ready()\n  end_time = time.time()\n  print(\"[1st run] m: \", m, \" time: \", f\"{(end_time - start_time) * 1000:.3f}ms\", flush=True)\n  native = (x @ y)[:m * 128]\n  assert jax.numpy.allclose(native, res[:m * 128]) \n  key = jax.random.key(m + 1000)\n  key1, key2 = jax.random.split(key, 2)\n  x = jax.random.normal(key1, x_shape, dtype=np.float32).block_until_ready()\n  y = jax.random.normal(key2, y_shape, dtype=np.float32).block_until_ready()\n  start_time = time.time()\n  res = matmul(x, y, m, n, l).block_until_ready()\n  end_time = time.time()\n  print(\"[2nd run] m: \", m, \" time: \", f\"{(end_time - start_time) * 1000:.3f}ms\", flush=True)\n```\n\n\n\n\n",
    "url": "https://github.com/pytorch/xla/issues/9095",
    "state": "open",
    "labels": [
      "enhancement",
      "pallas"
    ],
    "created_at": "2025-05-05T22:28:33Z",
    "updated_at": "2025-05-06T12:24:45Z",
    "comments": 0,
    "user": "yaochengji"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11499,
    "title": "[Performance] Issue on *SanaLinearAttnProcessor2_0 family. 1.06X speedup can be reached with a simple change.",
    "body": "### Sys env:\nOS Ubuntu 22.04\nPyTorch  2.4.0+cu121\nsana ==  0.0.1\nDiffusers == 0.34.0.dev0\n\n### Reproduce:\nTry the demo test code:\n```\nimport torch\nfrom diffusers import SanaPAGPipeline\n\npipe = SanaPAGPipeline.from_pretrained(\n  # \"Efficient-Large-Model/Sana_1600M_512px_diffusers\",  \n  \"Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers\",\n  torch_dtype=torch.bfloat16,\n  pag_applied_layers=\"transformer_blocks.8\",\n)\npipe.to(\"cuda\")\n\npipe.text_encoder.to(torch.bfloat16)\npipe.vae.to(torch.bfloat16)\n\nprompt = 'a cyberpunk cat with a neon sign that says \"Sana\"'\nimage = pipe(\n    prompt=prompt,\n    guidance_scale=5.0,\n    pag_scale=2.0,\n    num_inference_steps=20,\n    generator=torch.Generator(device=\"cuda\").manual_seed(42),\n)[0]\nimage[0].save('sana.png')\n```\n\nInference data will go through [SanaLinearAttnProcessor2_0](https://github.com/huggingface/diffusers/blob/58431f102cf39c3c8a569f32d71b2ea8caa461e1/src/diffusers/models/attention_processor.py#L6007)\n\n\n### Issue Description:\nLines 6042 and 6043 first transposed a contiguous tensor and then did type casting. Type casting invokes a data copy from an old type tensor to a new one. But if you print the new tensor's stride(), you will see:\n```\n        hidden_states = hidden_states.flatten(1, 2).transpose(1, 2)\n        hidden_states = hidden_states.to(original_dtype)\n        print(\"Contiguity after type casting: \", hidden_states.is_contiguous()) # False\n\n        hidden_states = attn.to_out[0](hidden_states)\n        hidden_states = attn.to_out[1](hidden_states)\n```\n\nThe problem is typecasting copies, only did the dtype transmission based on the input tensor's strides. And the bad-strided tensor is immediately used by the latter two functions. Inefficiency is broadcast.\n\n### How to Fix:\nlet `hidden_states.to(original_dtype)` do contiguous and typecasting simultaneously.\nOne possible approach:\n```\n@torch.compile\ndef transpose_cast_kernel(input_tensor: torch.Tensor) -> torch.Tensor:\n    \"\"\"\n    torch-compiled kernel that transposes a 2D tensor and converts it to bfloat16\n    \"\"\"\n    converted = input_tensor.to(torch.bfloat16)\n    transposed = torch.transpose(converted, 1, 2).contiguous()\n    return transposed\n```\nUse the versatile operation to handle the creation of the new tensor.\n```\n        hidden_states = hidden_states.flatten(1, 2).transpose(1, 2)\n        hidden_states = transpose_cast_kernel(hidden_states)\n        # hidden_states.is_contiguous() True\n\n        hidden_states = attn.to_out[0](hidden_states)\n        hidden_states = attn.to_out[1](hidden_states)\n```\nOr, your expert team could do even better.\n\n### Measurement:\nBy adopting the previous change, the **SanaLinearAttnProcessor2_0.__call__ enjoys** 1.06X speedup on RTX3090.\nPAGCFGSanaLinearAttnProcessor2_0, and PAGIdentitySanaLinearAttnProcessor2_0 have similar logic and lose performance as well. \n\n",
    "url": "https://github.com/huggingface/diffusers/issues/11499",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-05T21:26:51Z",
    "updated_at": "2025-08-08T23:44:59Z",
    "comments": 11,
    "user": "David-Dingle"
  },
  {
    "repo": "huggingface/candle",
    "number": 2944,
    "title": "finetuning yolo 8 candle model",
    "body": "What is the correct way to finetune yolo8 model to be used here ? Finetuning model using candle is not straightforward.\ncandle\\candle-examples\\examples\\yolo-v8\\main.rs \n// model model architecture points at ultralytics : https://github.com/ultralytics/ultralytics/issues/189\nBut my model trained using ultralytics and converted to safetensors yield tensor errors when used in candle ylo 8 example. Renaming the tensors to match the candle yolo model did not work.\n\nI see DarkNet struct in the model.rs so I wonder if one should rather use [Darknet](https://github.com/hank-ai/darknet) instead (@LaurentMazare ) ? \n",
    "url": "https://github.com/huggingface/candle/issues/2944",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-05T15:21:48Z",
    "updated_at": "2025-05-05T18:46:52Z",
    "comments": 0,
    "user": "flutter-painter"
  },
  {
    "repo": "pytorch/rl",
    "number": 2939,
    "title": "PPO with composite distribution crash before giving the warning on how to fix it.",
    "body": "This block\nhttps://github.com/pytorch/rl/blob/795e362cb82b3539faa30db771e5b2f1d50f8c8a/torchrl/objectives/ppo.py#L601-L602\ncauses \n```AttributeError: 'Tensor' object has no attribute 'batch_size'```\n\nBefore, the warning on how to fix it is shown.\n\nhttps://github.com/pytorch/rl/blob/795e362cb82b3539faa30db771e5b2f1d50f8c8a/torchrl/objectives/ppo.py#L603-L614\n\nThe order of the 2 blocks needs to be swapped",
    "url": "https://github.com/pytorch/rl/issues/2939",
    "state": "closed",
    "labels": [],
    "created_at": "2025-05-04T23:31:53Z",
    "updated_at": "2025-05-20T10:09:02Z",
    "user": "siegelaaron94"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11489,
    "title": "Error when I'm trying to train a Flux lora with train_dreambooth_lora_flux_advanced",
    "body": "### Describe the bug\n\nHi! I'm trying to train my lora model with [train_dreambooth_lora_flux_advanced](https://github.com/huggingface/diffusers/blob/main/examples/advanced_diffusion_training/train_dreambooth_lora_flux_advanced.py) script.\n\nWhen I'm trying to train my model with prior preservation tag I give an error.\n\nHow can I fix it?\n\n\n\n### Reproduction\n\n```bash\naccelerate launch train_dreambooth_lora_flux_advanced.py \\\n  --pretrained_model_name_or_path=\"black-forest-labs/FLUX.1-dev\" \\\n  --dataset_name=\"./ds5\" \\\n  --instance_prompt=\"1boy, 1girl\" \\\n  --validation_prompt=\"1boy, 1girl\" \\\n  --class_prompt=\"1boy, 1girl\" \\\n  --num_class_images=200 \\\n  --with_prior_preservation \\\n  --class_data_dir=\"./cdi\" \\\n  --output_dir=\"crtr-SDXL-LoRA\" \\\n  --caption_column=\"text\" \\\n  --mixed_precision=\"bf16\" \\\n  --prior_generation_precision=\"bf16\" \\\n  --resolution=1024 \\\n  --train_batch_size=8 \\\n  --repeats=1 \\\n  --gradient_accumulation_steps=8 \\\n  --gradient_checkpointing \\\n  --learning_rate=1.0 \\\n  --optimizer=\"prodigy\"\\\n  --lr_scheduler=\"constant\" \\\n  --lr_warmup_steps=0 \\\n  --rank=64 \\\n  --num_train_epochs=200 \\\n  --validation_epochs=100 \\\n  --center_crop \\\n  --adam_beta2=0.99 \\\n  --adam_weight_decay=0.01 \\\n  --allow_tf32\n```\n\n### Logs\n\n```shell\nTraceback (most recent call last):\n  File \"/workspace/train_dreambooth_lora_flux_advanced.py\", line 2423, in <module>\n    main(args)\n  File \"/workspace/train_dreambooth_lora_flux_advanced.py\", line 2213, in main\n    (weighting.float() * (model_pred_prior.float() - target_prior.float()) ** 2).reshape(\n     ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nRuntimeError: The size of tensor a (16) must match the size of tensor b (8) at non-singleton dimension 0\n```\n\n### System Info\n\nDiffusers 0.33\nCUDA 12.9\nTorch 2.7\n\nDocker image\nnvcr.io/nvidia/pytorch:25.04-py3\n\n### Who can help?\n\n@sayakpaul",
    "url": "https://github.com/huggingface/diffusers/issues/11489",
    "state": "open",
    "labels": [
      "bug",
      "training"
    ],
    "created_at": "2025-05-04T21:19:23Z",
    "updated_at": "2025-07-06T19:38:40Z",
    "comments": 4,
    "user": "Mnwa"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11488,
    "title": "Sincerely Request The Support for Flux PAG Pipeline",
    "body": "When the pag pipeline of flux can be supported?",
    "url": "https://github.com/huggingface/diffusers/issues/11488",
    "state": "open",
    "labels": [
      "help wanted",
      "Good second issue"
    ],
    "created_at": "2025-05-04T11:12:05Z",
    "updated_at": "2025-05-16T04:53:52Z",
    "comments": 2,
    "user": "PlutoQyl"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 3208,
    "title": "Can I use TGI in a Supercomputer?",
    "body": "I want to generate somewhere around 1 trillion tokens and I was thinking of using TGI on a European Supercomputer. is there a way to achieve this without relying on docker and downloading the model natively and then load it on the compute node and serve it? @Wauplin ",
    "url": "https://github.com/huggingface/text-generation-inference/issues/3208",
    "state": "open",
    "labels": [],
    "created_at": "2025-05-03T15:13:24Z",
    "updated_at": "2025-05-15T08:55:08Z",
    "comments": 4,
    "user": "sleepingcat4"
  },
  {
    "repo": "pytorch/xla",
    "number": 9082,
    "title": "Educate users on mat mul precision",
    "body": "mat mul precision will be exposed idiomatically to Pytorch in #9081. ",
    "url": "https://github.com/pytorch/xla/issues/9082",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-05-02T20:03:54Z",
    "updated_at": "2025-05-21T20:34:32Z",
    "comments": 0,
    "user": "yaoshiang"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1305,
    "title": "Trying to convert dinov2 model",
    "body": "### Question\n\nI tried to convert [this model](https://huggingface.co/nguyenkhoa/dinov2_Liveness_detection_v2.2.3) using the following command: \n\n`python -m scripts.convert --model_id nguyenkhoa/dinov2_Liveness_detection_v2.2.3 --quantize --task image-classification`\n\nbut got the following error:\n\n``ValueError: Trying to export a dinov2 model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type dinov2 to be supported natively in the ONNX export.``\n\nI looked a bit into the `custom_onnx_configs` flag and found [this conversion example](https://github.com/huggingface/transformers.js/issues/906#issuecomment-2315290257). My question is regarding what should I pass to `custom_onnx_configs` for the conversion to work? I could pass `gpt2` as used in the example but I'm wondering what is the correct `custom_onnx_configs` input for dinov2 models.\n\nThank you!",
    "url": "https://github.com/huggingface/transformers.js/issues/1305",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-05-01T19:56:28Z",
    "updated_at": "2025-05-05T22:18:48Z",
    "user": "jdp8"
  },
  {
    "repo": "pytorch/executorch",
    "number": 10593,
    "title": "Advice on how to run the training example in Android",
    "body": "Hello Team,\n\nWe have followed https://pytorch.org/executorch/main/using-executorch-android.html#building-from-source to build the \"aar\" file.\n\nWe can run the inference example on Android.\n\nWe are wondering how to run the training example on Android.\n\nAre there some flags / some config we need to add to the building procedure (https://github.com/pytorch/executorch/blob/main/scripts/build_android_library.sh)?\n\nThanks!\n\n\ncc @kirklandsign @cbilgin @JacobSzwejbka",
    "url": "https://github.com/pytorch/executorch/issues/10593",
    "state": "open",
    "labels": [
      "module: android",
      "module: training"
    ],
    "created_at": "2025-04-30T19:51:03Z",
    "updated_at": "2025-07-15T22:59:28Z",
    "user": "YuanTingHsieh"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7545,
    "title": "Networked Pull Through Cache",
    "body": "### Feature request\n\nIntroduce a HF_DATASET_CACHE_NETWORK_LOCATION configuration (e.g. an environment variable) together with a companion network cache service.\n\nEnable a three-tier cache lookup for datasets:\n\n1. Local on-disk cache\n2. Configurable network cache proxy\n3. Official Hugging Face Hub\n\n### Motivation\n\n- Distributed training & ephemeral jobs: In high-performance or containerized clusters, relying solely on a local disk cache either becomes a streaming bottleneck or incurs a heavy cold-start penalty as each job must re-download datasets.\n- Traffic & cost reduction: A pull-through network cache lets multiple consumers share a common cache layer, reducing duplicate downloads from the Hub and lowering egress costs.\n- Better streaming adoption: By offloading repeat dataset pulls to a locally managed cache proxy, streaming workloads can achieve higher throughput and more predictable latency.\n- Proven pattern: Similar proxy-cache solutions (e.g. Harbor\u2019s Proxy Cache for Docker images) have demonstrated reliability and performance at scale: https://goharbor.io/docs/2.1.0/administration/configure-proxy-cache/\n\n### Your contribution\n\nI\u2019m happy to draft the initial PR for adding HF_DATASET_CACHE_NETWORK_LOCATION support in datasets and sketch out a minimal cache-service prototype.\n\nI have limited bandwidth so I would be looking for collaborators if anyone else is interested. ",
    "url": "https://github.com/huggingface/datasets/issues/7545",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-04-30T15:16:33Z",
    "updated_at": "2025-04-30T15:16:33Z",
    "comments": 0,
    "user": "wrmedford"
  },
  {
    "repo": "huggingface/transformers",
    "number": 37895,
    "title": "How to backpropagate the gradients of the embeddings output by the image processor to the input image tensor?",
    "body": "### Feature request\n\nI'm using the processor of Qwen2.5-VL, and the image processor within it should be Qwen2ImageProcessor. The input image I provide is a PyTorch tensor with gradients, and the processor outputs the feature embeddings of the image. How can I ensure that the gradient flow is not interrupted during this process?\n\n### Motivation\n\nI want to backpropagate the gradients of the embeddings output by the Qwen2 image processor to the input image tensor\n\n### Your contribution\n\nI can coporate to fix this issue",
    "url": "https://github.com/huggingface/transformers/issues/37895",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-04-30T15:06:40Z",
    "updated_at": "2025-05-01T13:36:24Z",
    "user": "weiminbai"
  },
  {
    "repo": "pytorch/xla",
    "number": 9063,
    "title": "Add explanation of Clang usage after Hermetic CUDA.",
    "body": "## \ud83d\udcda Documentation\n\nFollow up from: #8665 and #9053 \n\nAfter #8665 is merged, we should add an explanation on the default usage of Clang due to the adoption of Hermetic CUDA. This is somewhat related to #9061.",
    "url": "https://github.com/pytorch/xla/issues/9063",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-04-30T12:17:26Z",
    "updated_at": "2025-04-30T12:18:12Z",
    "comments": 0,
    "user": "ysiraichi"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11466,
    "title": "Finetuning of flux or scratch training",
    "body": "I am new to this field and wanted to know if Is there any code available for training the flux from scratch or even finetuning the existing model. All I see is the dreambooth or Lora finetuning.",
    "url": "https://github.com/huggingface/diffusers/issues/11466",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-30T07:45:49Z",
    "updated_at": "2025-05-30T16:32:33Z",
    "comments": 2,
    "user": "preethamp0197"
  },
  {
    "repo": "pytorch/executorch",
    "number": 10571,
    "title": "where is pytorch_tokenizers.tools.llama2c.convert?",
    "body": "### \ud83d\udc1b Describe the bug\n\nI can not find pytorch_tokenizers.tools.llama2c.convert   with command \"python -m pytorch_tokenizers.tools.llama2c.convert -t ../tokenizer.model -o ../tokenizer.bin\" according to docs. the env\n I use is built by \"pip install executorch\"\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.7.0+cu126\nIs debug build: False\nCUDA used to build PyTorch: 12.6\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 22.04.5 LTS (x86_64)\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version: Could not collect\nCMake version: Could not collect\nLibc version: glibc-2.35\n\nPython version: 3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-6.8.0-58-generic-x86_64-with-glibc2.35\nIs CUDA available: True\nCUDA runtime version: 11.5.119\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 4090\nNvidia driver version: 565.57.01\ncuDNN version: Could not collect\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        39 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               32\nOn-line CPU(s) list:                  0-31\nVendor ID:                            GenuineIntel\nModel name:                           13th Gen Intel(R) Core(TM) i9-13900KF\nCPU family:                           6\nModel:                                183\nThread(s) per core:                   2\nCore(s) per socket:                   24\nSocket(s):                            1\nStepping:                             1\nCPU max MHz:                          5800.0000\nCPU min MHz:                          800.0000\nBogoMIPS:                             5990.40\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize arch_lbr ibt flush_l1d arch_capabilities\nVirtualization:                       VT-x\nL1d cache:                            896 KiB (24 instances)\nL1i cache:                            1.3 MiB (24 instances)\nL2 cache:                             32 MiB (12 instances)\nL3 cache:                             36 MiB (1 instance)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-31\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Mitigation; Clear Register File\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affected\n\nVersions of relevant libraries:\n[pip3] executorch==0.6.0\n[pip3] numpy==2.2.5\n[pip3] nvidia-cublas-cu12==12.6.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.6.80\n[pip3] nvidia-cuda-nvrtc-cu12==12.6.77\n[pip3] nvidia-cuda-runtime-cu12==12.6.77\n[pip3] nvidia-cudnn-cu12==9.5.1.17\n[pip3] nvidia-cufft-cu12==11.3.0.4\n[pip3] nvidia-curand-cu12==10.3.7.77\n[pip3] nvidia-cusolver-cu12==11.7.1.2\n[pip3] nvidia-cusparse-cu12==12.5.4.2\n[pip3] nvidia-cusparselt-cu12==0.6.3\n[pip3] nvidia-nccl-cu12==2.26.2\n[pip3] nvidia-nvjitlink-cu12==12.6.85\n[pip3] nvidia-nvtx-cu12==12.6.77\n[pip3] onnxruntime==1.21.0\n[pip3] optree==0.15.0\n[pip3] torch==2.7.0\n[pip3] torchao==0.10.0\n[pip3] torchaudio==2.7.0\n[pip3] torchvision==0.22.0\n[pip3] triton==3.3.0\n[conda] executorch                0.6.0                    pypi_0    pypi\n[conda] numpy                     2.2.5                    pypi_0    pypi\n[conda] nvidi",
    "url": "https://github.com/pytorch/executorch/issues/10571",
    "state": "closed",
    "labels": [
      "module: llm"
    ],
    "created_at": "2025-04-30T03:15:59Z",
    "updated_at": "2025-05-08T06:20:26Z",
    "user": "hayyaw"
  },
  {
    "repo": "pytorch/xla",
    "number": 9056,
    "title": "Fix the contribution instructions for creating PRs",
    "body": "## \ud83d\udcda Documentation\n\nhttps://github.com/pytorch/xla/blob/master/CONTRIBUTING.md suggests to clone the original PyTorch/XLA repo directly. However, doing so makes it impossible to create PRs later unless the user has write permission to the repo. Instead, it should ask the users to fork the repo first, and then work against their fork. This allows creating PRs without having write access to the original repo.\n\nWhile at this, we can also clarify the steps for creating PRs.",
    "url": "https://github.com/pytorch/xla/issues/9056",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-04-29T18:23:43Z",
    "updated_at": "2025-05-07T13:37:33Z",
    "comments": 0,
    "user": "zhanyong-wan"
  },
  {
    "repo": "huggingface/hf-hub",
    "number": 104,
    "title": "What is this software licensed under?",
    "body": "Would this also be Apache 2 like in https://github.com/huggingface/huggingface_hub/?\nThanks!",
    "url": "https://github.com/huggingface/hf-hub/issues/104",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-29T16:27:10Z",
    "updated_at": "2025-06-16T09:09:43Z",
    "user": "nathankw"
  },
  {
    "repo": "pytorch/vision",
    "number": 9042,
    "title": "Make the C++ backend of the torchvision wheel usable for C++ development",
    "body": "### \ud83d\ude80 The feature\n\nCurrently, the torchvision wheel packages the C++ DSO as `_C.so` for python bindings.\n\nWe'd like the python wheel to have the C++ backend be standalone, so it can be extracted/used by C++ applications, like is done today for the PyTorch wheels.\n\nThis means:\n\n- export DSO as `libtorchvision.so` instead of `_C.so`\n- do not hardlink `libtorchvision.so` against `libtorch_python.so`.\n  - _maybe `_C.so` is kept for symbols that require `libtorch_python.so` ?_\n- export cpp headers\n- export CMake configs\n\n\n### Motivation, pitch\n\nC++ developers can currently use the distributed PyTorch wheels to develop C++ native applications against libtorch, as libraries, headers, and cmake configs are available in the wheels.\n\nC++ developers who also need to use torchvision cannot leverage the standard `vision` wheel the same way even though all C++ symbols are available in `_C.so`. Instead, they must build libtorchvision C++ from source which is more cumbersome, requires extra dev packages to be installed, especially for cuda support.\n\n\n### Additional context\n\n<details>\n<summary> see ld links for torchvision 0.22.0+cu128 (wheel) </summary>\n\n```sh\nlibc.so.6\nlibc10.so\nlibc10_cuda.so\nlibcudart.so.12\nlibdl.so.2\nlibgcc_s.so.1\nlibm.so.6\nlibpthread.so.0\nlibrt.so.1\nlibstdc++.so.6\nlibtorch.so\nlibtorch_cpu.so\nlibtorch_cuda.so\nlibtorch_python.so # requires python\nlinux-vdso.so.1\n```\n\n</details>\n\n<details>\n<summary> see ld links for c++ source build of torchvision </summary>\n\n> no link against `libtorch_python.so`\n\n```sh\nlibc.so.6\nlibc10.so\nlibc10_cuda.so\nlibcudart.so.12\nlibdl.so.2\nlibgcc_s.so.1\nlibm.so.6\nlibpthread.so.0\nlibrt.so.1\nlibstdc++.so.6\nlibtorch.so\nlibtorch_cpu.so\nlibtorch_cuda.so\nlinux-vdso.so.1\n```\n\n</details>\n\n<details>\n<summary> example of a cpp torchvision installation with files needed for C++ development </summary>\n\n> The install tree below can be imported for building with CMake with:\n\n```\ncmake ... -D TorchVision_ROOT=\"$torch_vision_install_dir\"  # Or add to CMAKE_PREFIX_PATH\n```\n\n```cmake\nfind_package(TorchVision)\n```\n\n```tree\n\u251c\u2500\u2500 include\n\u2502   \u2514\u2500\u2500 torchvision\n\u2502       \u251c\u2500\u2500 io\n\u2502       \u2502   \u2514\u2500\u2500 image\n\u2502       \u2502       \u251c\u2500\u2500 cpu\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 common_jpeg.cpp\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 common_jpeg.h\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 common_png.h\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 decode_gif.cpp\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 decode_gif.h\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 decode_image.cpp\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 decode_image.h\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 decode_jpeg.cpp\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 decode_jpeg.h\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 decode_png.cpp\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 decode_png.h\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 encode_jpeg.cpp\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 encode_jpeg.h\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 encode_png.cpp\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 encode_png.h\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 exif.h\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 giflib\n\u2502       \u2502       \u2502   \u2502   \u251c\u2500\u2500 dgif_lib.c\n\u2502       \u2502       \u2502   \u2502   \u251c\u2500\u2500 gif_hash.c\n\u2502       \u2502       \u2502   \u2502   \u251c\u2500\u2500 gif_hash.h\n\u2502       \u2502       \u2502   \u2502   \u251c\u2500\u2500 gif_lib.h\n\u2502       \u2502       \u2502   \u2502   \u251c\u2500\u2500 gif_lib_private.h\n\u2502       \u2502       \u2502   \u2502   \u251c\u2500\u2500 gifalloc.c\n\u2502       \u2502       \u2502   \u2502   \u2514\u2500\u2500 openbsd-reallocarray.c\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 read_write_file.cpp\n\u2502       \u2502       \u2502   \u2514\u2500\u2500 read_write_file.h\n\u2502       \u2502       \u251c\u2500\u2500 cuda\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 decode_jpeg_cuda.cpp\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 encode_decode_jpegs_cuda.h\n\u2502       \u2502       \u2502   \u251c\u2500\u2500 encode_jpegs_cuda.cpp\n\u2502       \u2502       \u2502   \u2514\u2500\u2500 encode_jpegs_cuda.h\n\u2502       \u2502       \u251c\u2500\u2500 image.cpp\n\u2502       \u2502       \u251c\u2500\u2500 image.h\n\u2502       \u2502       \u2514\u2500\u2500 image_read_mode.h\n\u2502       \u251c\u2500\u2500 macros.h\n\u2502       \u251c\u2500\u2500 ops\n\u2502       \u2502   \u251c\u2500\u2500 autocast\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 deform_conv2d_kernel.cpp\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 nms_kernel.cpp\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 ps_roi_align_kernel.cpp\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 ps_roi_pool_kernel.cpp\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 roi_align_kernel.cpp\n\u2502       \u2502   \u2502   \u2514\u2500\u2500 roi_pool_kernel.cpp\n\u2502       \u2502   \u251c\u2500\u2500 autograd\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 deform_conv2d_kernel.cpp\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 ps_roi_align_kernel.cpp\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 ps_roi_pool_kernel.cpp\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 roi_align_kernel.cpp\n\u2502       \u2502   \u2502   \u2514\u2500\u2500 roi_pool_kernel.cpp\n\u2502       \u2502   \u251c\u2500\u2500 cpu\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 deform_conv2d_kernel.cpp\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 nms_kernel.cpp\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 ps_roi_align_kernel.cpp\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 ps_roi_pool_kernel.cpp\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 roi_align_common.h\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 roi_align_kernel.cpp\n\u2502       \u2502   \u2502   \u2514\u2500\u2500 roi_pool_kernel.cpp\n\u2502       \u2502   \u251c\u2500\u2500 cuda\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 cuda_helpers.h\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 deform_conv2d_kernel.cu\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 nms_kernel.cu\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 ps_roi_align_kernel.cu\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 ps_roi_pool_kernel.cu\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 roi_align_kernel.cu\n\u2502       \u2502   \u2502   \u2514\u2500\u2500 roi_pool_kernel.cu\n\u2502       \u2502   \u251c\u2500\u2500 deform_conv2d.cpp\n\u2502       \u2502   \u251c\u2500\u2500 deform_conv2d.h\n\u2502       \u2502   \u251c\u2500\u2500 nms.cpp\n\u2502       \u2502   \u251c\u2500\u2500 nms.h\n\u2502       \u2502   \u251c\u2500\u2500 ops.h\n\u2502       \u2502   \u251c\u2500\u2500 ps_roi_align.cpp\n\u2502       \u2502   \u251c\u2500\u2500 ps_roi_align.h\n\u2502       \u2502   \u251c\u2500\u2500 ps_roi_pool.cpp\n\u2502       \u2502   \u251c\u2500\u2500 ps_roi_pool.h\n\u2502       \u2502   \u251c\u2500\u2500 roi_align.cpp\n\u2502       \u2502   \u251c\u2500\u2500 roi_align.h\n\u2502       \u2502   \u251c\u2500\u2500 roi_pool.cpp\n\u2502       \u2502   \u2514",
    "url": "https://github.com/pytorch/vision/issues/9042",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-29T15:04:25Z",
    "updated_at": "2025-05-19T23:58:53Z",
    "comments": 5,
    "user": "agirault"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2248,
    "title": "Export cli export RT-Detr",
    "body": "```python\nTraceback (most recent call last):\n  File \"/usr/local/bin/optimum-cli\", line 8, in <module>\n    sys.exit(main())\n             ^^^^^^\n  File \"/usr/local/lib/python3.11/dist-packages/optimum/commands/optimum_cli.py\", line 208, in main\n    service.run()\n  File \"/usr/local/lib/python3.11/dist-packages/optimum/commands/export/onnx.py\", line 265, in run\n    main_export(\n  File \"/usr/local/lib/python3.11/dist-packages/optimum/exporters/onnx/__main__.py\", line 375, in main_export\n    onnx_export_from_model(\n  File \"/usr/local/lib/python3.11/dist-packages/optimum/exporters/onnx/convert.py\", line 1033, in onnx_export_from_model\n    raise ValueError(\nValueError: Trying to export a rt-detr model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type rt-detr to be supported natively in the ONNX export.\n```\n\nWhen I try to export my fine-tuned model with RT-DETR, it always pops up with the above error.\n\nEven with the cmd line `optimum-cli export onnx -m PekingU/rtdetr_r18vd --task object-detection test_onnx` still shows the same error. So, it should not be an issue related to finetuned model.\n\nI would like to know how to export a finetuned model. It would be helpful if anyone can give me some hint. Thanks!\n",
    "url": "https://github.com/huggingface/optimum/issues/2248",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-29T08:23:17Z",
    "updated_at": "2025-05-05T08:03:21Z",
    "comments": 1,
    "user": "TheMattBin"
  },
  {
    "repo": "huggingface/open-muse",
    "number": 144,
    "title": "how to set the minimum learning rate for cosine lr_scheduler?",
    "body": "@dataclass\nclass TrainingArguments(transformers.TrainingArguments):\n    gradient_checkpointing_kwargs={'use_reentrant':False}\n    lr_scheduler_kwargs={\n        \"eta_min\":1e-6,\n        \"num_cycles\":1,\n    }\n\nIt did not work. how to set the minimum learning rate in transformers-4.51.3?",
    "url": "https://github.com/huggingface/open-muse/issues/144",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-29T02:18:59Z",
    "updated_at": "2025-04-29T02:20:42Z",
    "user": "xubuvd"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1536,
    "title": "Improve Tokenizer New Type Onboarding",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n---\nAs a sequel to https://github.com/pytorch/torchchat/issues/1518 where we added an enum for tokenizer types to simplify `TokenizerArgs __post_init__`, we need to further improve it to simplify new tokenizer type onboarding:\n\n### Tasks\n---\n- Move TokenizerType to a centralized place\n  - We now have two of them: https://github.com/pytorch/torchchat/blob/0299a37a342348803763e37e9f4823c5bcb12c92/dist_run.py#L67-L69 https://github.com/pytorch/torchchat/blob/0299a37a342348803763e37e9f4823c5bcb12c92/torchchat/cli/builder.py#L241-L245\n- Check all getters of tokenizer types\n  - It may be able to be simplified as inline https://github.com/pytorch/torchchat/blob/0299a37a342348803763e37e9f4823c5bcb12c92/torchchat/generate.py#L368\n- Add documentation for future tokenizer onboard.\n  - We may need to point people to update the model validation logic: https://github.com/pytorch/torchchat/blob/0299a37a342348803763e37e9f4823c5bcb12c92/torchchat/cli/builder.py#L290-L322\n---\nTo test, run a model with each tokenizer type:\n- python torchchat.py generate llama2\n- python torchchat.py generate llama3\n- python torchchat.py generate granite-code\n\ncc @Jack-Khuu @byjlw ",
    "url": "https://github.com/pytorch/torchchat/issues/1536",
    "state": "open",
    "labels": [
      "good first issue",
      "actionable",
      "triaged"
    ],
    "created_at": "2025-04-28T18:31:33Z",
    "updated_at": "2025-05-13T17:54:18Z",
    "comments": 3,
    "user": "zhenyan-zhang-meta"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1045,
    "title": "Inefficient Config Structure without Hydra",
    "body": "Hi, I notice that the repo used Hydra before, which can modify some config param or create new config yaml files. However, this was deprecated. I wonder how to efficiently modify a new config file for policy without writing these params in the command line each time?",
    "url": "https://github.com/huggingface/lerobot/issues/1045",
    "state": "closed",
    "labels": [
      "question",
      "configuration",
      "stale"
    ],
    "created_at": "2025-04-28T11:48:08Z",
    "updated_at": "2025-11-18T02:30:46Z",
    "user": "jiangranlv"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1150,
    "title": "[Feature] Support validation",
    "body": "For some workloads, it is really important to perform validation on a different dataset every n iterations. \n\nThis seems reasonably straight forward to add to the training loop and training specs, while being kept as optional.\n\nIs there any plan to support this functionality in the near future?",
    "url": "https://github.com/pytorch/torchtitan/issues/1150",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-28T11:01:47Z",
    "updated_at": "2025-08-21T03:17:19Z",
    "comments": 4,
    "user": "CarlosGomes98"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11432,
    "title": "`.from_pretrained` `torch_dtype=\"auto\"` argument not working a expected",
    "body": "### Describe the bug\n\nHey dear diffusers team,\n\nthanks a lot for all your hard work!\n\nI would like to make use of the `torch_dtype=\"auto\"` keyword argument when loading a model/pipeline as specified [here](https://huggingface.co/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained.torch_dtype), but the usage does not work as expected (see example below). Can you help me out with some guidance on how to use it correctly or let me know whether there is something wrong with the handling of this argument?\n\nThank you!\n\n### Reproduction\n\n```python\nfrom diffusers import StableDiffusionPipeline\n\nmodel = StableDiffusionPipeline.from_pretrained(\"CompVis/stable-diffusion-v1-4\", torch_dtype=\"auto\")\n```\n\n### Logs\n\n```shell\nPassed `torch_dtype` torch.float32 is not a `torch.dtype`. Defaulting to `torch.float32`.\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.33.1\n- Platform: Linux-5.15.0-136-generic-x86_64-with-glibc2.35\n- Running on Google Colab?: No\n- Python version: 3.10.17\n- PyTorch version (GPU?): 2.7.0+cu126 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.30.2\n- Transformers version: 4.51.3\n- Accelerate version: 1.6.0\n- PEFT version: 0.15.2\n- Bitsandbytes version: 0.45.5\n- Safetensors version: 0.5.3\n- xFormers version: not installed\n- Accelerator: NVIDIA H100 PCIe, 81559 MiB\n- Using GPU in script?: Yes\n- Using distributed or parallel set-up in script?: No\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11432",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-04-28T04:31:26Z",
    "updated_at": "2025-05-13T01:42:37Z",
    "comments": 3,
    "user": "johannaSommer"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1041,
    "title": "image transform of pi0 is inconsistent with openpi",
    "body": "Thank you for pi0 work in lerobot.However, i found that image transform was quite different from openpi.\nimage transform of lerobot pi0:\n\n![Image](https://github.com/user-attachments/assets/6ff30d08-bc84-4005-8cb9-adc917f9817e)\n\nimage transform of openpi:\n\n![Image](https://github.com/user-attachments/assets/75845f92-d54e-43ea-be08-81504b6df2ff)\n\nAre there some special considerations? By the way, resize_with_pad is also different.",
    "url": "https://github.com/huggingface/lerobot/issues/1041",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2025-04-28T03:08:10Z",
    "updated_at": "2025-11-20T02:30:12Z",
    "user": "wushandinghua"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1147,
    "title": "[Question] FSDP+TP CUDA_DEVICE_MAX_CONNECTIONS",
    "body": "In Megatron repo https://github.com/NVIDIA/Megatron-LM/blob/4429e8ebe21fb011529d7401c370841ce530785a/megatron/training/arguments.py#L779\n\nIt\u2019s recommended that FSDP should use larger values of `CUDA_DEVICE_MAX_CONNECTIONS` but Megatron TP requires it to be 1. Is it also the case for torch implementation of TP using DTensor? \n\nHow should I configure the environment variable when using torch implementation of FSDP(2) and/or TP/CP/SP?",
    "url": "https://github.com/pytorch/torchtitan/issues/1147",
    "state": "open",
    "labels": [
      "documentation",
      "question",
      "module: fsdp"
    ],
    "created_at": "2025-04-27T20:48:50Z",
    "updated_at": "2025-04-29T21:54:07Z",
    "user": "ChenchaoZhao"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11423,
    "title": "Lora Hotswap no clear documentation",
    "body": "Hello everyone.\n\nHere is the scenario I have.\n\nI have say 10 LoRAs that I would like to load and use depending on the request. \n\nOption one:\nusing `load_lora_weights` - reads from the disk and moves to device: expensive operation\n\nOption two:\nload all loras and weights of non-used LoRAS with `set_adapters` method to 0.0. Not practical since the forward pass becomes expensive. Since all LoRAS are still loaded.\n\nOption three:\nFind an elegant way of loading LoRAs to CPU and then moving them to GPU as needed. While I was trying to do that, I saw the new parameter of hotswapping in hte load_lora_weights method. And this is what is described in the documentation:\n\n\nhotswap \u2014 (bool, optional) Defaults to False. Whether to substitute an existing (LoRA) adapter with the newly loaded adapter in-place. This means that, instead of loading an additional adapter, this will take the existing adapter weights and replace them with the weights of the new adapter. This can be faster and more memory efficient. However, the main advantage of hotswapping is that when the model is compiled with torch.compile, loading the new adapter does not require recompilation of the model. When using hotswapping, the passed adapter_name should be the name of an already loaded adapter. **If the new adapter and the old adapter have different ranks and/or LoRA alphas (i.e. scaling), you need to call an additional method before loading the adapter**\n\n\ncould someone help me out here and name the mysterious function to be called?\n\nand optionally would be great if someone could help me with my scenario.\n",
    "url": "https://github.com/huggingface/diffusers/issues/11423",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-04-26T13:44:08Z",
    "updated_at": "2025-05-26T15:03:03Z",
    "comments": 2,
    "user": "vahe-toffee"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11419,
    "title": "How to know that \"Textual inversion\" file I have loaded and not turn it on?",
    "body": "Reviewing the documentation I understand the load of IT with: \n\n# Add Embeddings\nPipeline.load_textual_inversion(\"Sd-Concepts-Library/Cat-Toy\"), \n\n# Remave All Token Embeddings\nPipeline.unload_textual_inversion()\n\n# Remove Just One Token\nPipeline.unload_textual_inversion (\"<Moe-Bius>\")\n\n\nBut how do you know which are charged to the pipeline?",
    "url": "https://github.com/huggingface/diffusers/issues/11419",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2025-04-25T17:18:07Z",
    "updated_at": "2025-05-27T18:09:45Z",
    "user": "Eduardishion"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11418,
    "title": "How to add flux1-fill-dev-fp8.safetensors",
    "body": "### Describe the bug\n\nHi!\nHow to use flux1-fill-dev-fp8.safetensors in diffusers?\n\nNow I have code:\n```\ndef init_pipeline(device: str):\n    logger.info(f\"Loading FLUX Inpaint Pipeline (Fill\u2011dev) on {device}\")\n    pipe = FluxFillPipeline.from_pretrained(\n        \"black-forest-labs/FLUX.1-Fill-dev\",\n        torch_dtype=torch.bfloat16,\n        trust_remote_code=True\n    ).to(device)\n    logger.info(\"Pipeline loaded successfully\")\n    return pipe\n```\n\nAnother try:\n```\n transformer = FluxTransformer2DModel.from_single_file(\n        \"https://huggingface.co/YarvixPA/FLUX.1-Fill-dev-gguf/blob/main/flux1-fill-dev-Q4_0.gguf\",\n        quantization_config=GGUFQuantizationConfig(compute_dtype=torch.bfloat16),\n        torch_dtype=torch.bfloat16\n    )\n\n    pipe = FluxFillPipeline.from_pretrained(\n        \"black-forest-labs/FLUX.1-Fill-dev\",\n        transformer=transformer,\n        torch_dtype=torch.bfloat16,\n        trust_remote_code=True\n    ).to(device)\n\n    pipe.enable_model_cpu_offload()\n```\n\n### Reproduction\n\nhttps://huggingface.co/boricuapab/flux1-fill-dev-fp8/blob/main/README.md\nhttps://huggingface.co/pengxian/diffusion_models/blob/main/flux1-fill-dev_fp8.safetensors\n\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nWindows 11\nPython 11\n\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11418",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-04-25T14:58:08Z",
    "updated_at": "2025-04-28T19:06:17Z",
    "user": "SlimRG"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2242,
    "title": "[onnx] What are the functions of the generated files by optimum-cli?",
    "body": "### System Info\n\n```shell\nI try to use **optimum-cli** to export the onnx file for llama, but i don't get a onnx file as expect, but get a lot of files, so I don't know what are they used for ?\n\n(MindSpore) [ma-user llama149]$ls onnx_model/\nconfig.json  generation_config.json  model.onnx  model.onnx_data  special_tokens_map.json  tokenizer_config.json  tokenizer.json\n\n\n> refer to https://zhuanlan.zhihu.com/p/663971402\n```\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\n\n> (py39) [ma-user llama149]$optimum-cli export onnx --model models--daryl149--llama-2-7b-hf onnx_model --task text-generation\n\n### Expected behavior\n\nget a onnx file only, that is similar to  **torch.onnx.export**",
    "url": "https://github.com/huggingface/optimum/issues/2242",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-25T13:12:35Z",
    "updated_at": "2025-04-28T09:18:06Z",
    "comments": 1,
    "user": "vfdff"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11417,
    "title": "attributeerror: 'distributeddataparallel' object has no attribute 'dtype'. did you mean: 'type'?",
    "body": "### Describe the bug\n\nattributeerror: 'distributeddataparallel' object has no attribute 'dtype'. did you mean: 'type'?\n\n### Reproduction\n\nexport MODEL_NAME=\"black-forest-labs/FLUX.1-dev\"\nexport OUTPUT_DIR=\"trained-flux-dev-dreambooth-lora\"\n\naccelerate launch train_dreambooth_lora_flux.py \\\n  --pretrained_model_name_or_path=$MODEL_NAME  \\\n  --instance_data_dir=$INSTANCE_DIR \\\n  --output_dir=$OUTPUT_DIR \\\n  --mixed_precision=\"bf16\" \\\n  --train_text_encoder\\\n  --instance_prompt=\"a photo of sks dog\" \\\n  --resolution=512 \\\n  --train_batch_size=1 \\\n  --guidance_scale=1 \\\n  --gradient_accumulation_steps=4 \\\n  --optimizer=\"prodigy\" \\\n  --learning_rate=1. \\\n  --report_to=\"wandb\" \\\n  --lr_scheduler=\"constant\" \\\n  --lr_warmup_steps=0 \\\n  --max_train_steps=500 \\\n  --validation_prompt=\"A photo of sks dog in a bucket\" \\\n  --seed=\"0\" \\\n  --push_to_hub\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.33.0\n- Platform: Linux-5.15.0-78-generic-x86_64-with-glibc2.35\n- Running on Google Colab?: No\n- Python version: 3.10.12\n- PyTorch version (GPU?): 2.4.0+cu121 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.30.2\n- Transformers version: 4.44.1\n- Accelerate version: 0.32.1\n- PEFT version: 0.15.2\n- Bitsandbytes version: not installed\n- Safetensors version: 0.4.2\n- xFormers version: 0.0.27.post2\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11417",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2025-04-25T03:30:52Z",
    "updated_at": "2025-05-25T15:02:30Z",
    "comments": 1,
    "user": "asjqmasjqm"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7536,
    "title": "[Errno 13] Permission denied: on `.incomplete` file",
    "body": "### Describe the bug\n\nWhen downloading a dataset, we frequently hit the below Permission Denied error. This looks to happen (at least) across datasets in HF, S3, and GCS.\n\nIt looks like the `temp_file` being passed [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/file_utils.py#L412) can sometimes be created with `000` permissions leading to the permission denied error (the user running the code is still the owner of the file). Deleting that particular file and re-running the code with 0 changes will usually succeed.\n\nIs there some race condition happening with the [umask](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/file_utils.py#L416), which is process global, and the [file creation](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/file_utils.py#L404)?\n\n```\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n.venv/lib/python3.12/site-packages/datasets/load.py:2084: in load_dataset\n    builder_instance.download_and_prepare(\n.venv/lib/python3.12/site-packages/datasets/builder.py:925: in download_and_prepare\n    self._download_and_prepare(\n.venv/lib/python3.12/site-packages/datasets/builder.py:1649: in _download_and_prepare\n    super()._download_and_prepare(\n.venv/lib/python3.12/site-packages/datasets/builder.py:979: in _download_and_prepare\n    split_generators = self._split_generators(dl_manager, **split_generators_kwargs)\n.venv/lib/python3.12/site-packages/datasets/packaged_modules/folder_based_builder/folder_based_builder.py:120: in _split_generators\n    downloaded_files = dl_manager.download(files)\n.venv/lib/python3.12/site-packages/datasets/download/download_manager.py:159: in download\n    downloaded_path_or_paths = map_nested(\n.venv/lib/python3.12/site-packages/datasets/utils/py_utils.py:514: in map_nested\n    _single_map_nested((function, obj, batched, batch_size, types, None, True, None))\n.venv/lib/python3.12/site-packages/datasets/utils/py_utils.py:382: in _single_map_nested\n    return [mapped_item for batch in iter_batched(data_struct, batch_size) for mapped_item in function(batch)]\n.venv/lib/python3.12/site-packages/datasets/download/download_manager.py:206: in _download_batched\n    return thread_map(\n.venv/lib/python3.12/site-packages/tqdm/contrib/concurrent.py:69: in thread_map\n    return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)\n.venv/lib/python3.12/site-packages/tqdm/contrib/concurrent.py:51: in _executor_map\n    return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))\n.venv/lib/python3.12/site-packages/tqdm/std.py:1181: in __iter__\n    for obj in iterable:\n../../../_tool/Python/3.12.10/x64/lib/python3.12/concurrent/futures/_base.py:619: in result_iterator\n    yield _result_or_cancel(fs.pop())\n../../../_tool/Python/3.12.10/x64/lib/python3.12/concurrent/futures/_base.py:317: in _result_or_cancel\n    return fut.result(timeout)\n../../../_tool/Python/3.12.10/x64/lib/python3.12/concurrent/futures/_base.py:449: in result\n    return self.__get_result()\n../../../_tool/Python/3.12.10/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result\n    raise self._exception\n../../../_tool/Python/3.12.10/x64/lib/python3.12/concurrent/futures/thread.py:59: in run\n    result = self.fn(*self.args, **self.kwargs)\n.venv/lib/python3.12/site-packages/datasets/download/download_manager.py:229: in _download_single\n    out = cached_path(url_or_filename, download_config=download_config)\n.venv/lib/python3.12/site-packages/datasets/utils/file_utils.py:206: in cached_path\n    output_path = get_from_cache(\n.venv/lib/python3.12/site-packages/datasets/utils/file_utils.py:412: in get_from_cache\n    fsspec_get(url, temp_file, storage_options=storage_options, desc=download_desc, disable_tqdm=disable_tqdm)\n.venv/lib/python3.12/site-packages/datasets/utils/file_utils.py:331: in fsspec_get\n    fs.get_file(path, temp_file.name, callback=callback)\n.venv/lib/python3.12/site-packages/fsspec/asyn.py:118: in wrapper\n    return sync(self.loop, func, *args, **kwargs)\n.venv/lib/python3.12/site-packages/fsspec/asyn.py:103: in sync\n    raise return_result\n.venv/lib/python3.12/site-packages/fsspec/asyn.py:56: in _runner\n    result[0] = await coro\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <s3fs.core.S3FileSystem object at 0x7f27c18b2e70>\nrpath = '<my-bucket>/<my-prefix>/img_1.jpg'\nlpath = '/home/runner/_work/_temp/hf_cache/downloads/6c97983efa4e24e534557724655df8247a0bd04326cdfc4a95b638c11e78222d.incomplete'\ncallback = <datasets.utils.file_utils.TqdmCallback object at 0x7f27c00cdbe0>\nversion_id = None, kwargs = {}\n_open_file = <function S3FileSystem._get_file.<locals>._open_file at 0x7f27628d1120>\nbody = <StreamingBody at 0x7f276344fa80 for ClientResponse at 0x7f27c015fce0>\ncontent_length = 521923, failed_reads = 0, bytes_read = 0\n\n    async def _get_file(\n        self, rpath, lpath, callback=_DEFAULT_CALLBACK, version_id=None, **kwargs\n    ):\n    ",
    "url": "https://github.com/huggingface/datasets/issues/7536",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-24T20:52:45Z",
    "updated_at": "2025-05-06T13:05:01Z",
    "comments": 4,
    "user": "ryan-clancy"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 152100,
    "title": "What is the difference between normal_tensor.storage().use_count() and viewed_tensor's?",
    "body": "In the test2() below, why is b.storage().use_count() still 2 even when I deleted the source tensor a?\n```\nimport torch\n\ndef test1():\n    print(\"=============== test 1 ===============\")\n    a = torch.empty(size=(17, 32, 128, 16), dtype=torch.float16)\n    b = a.view(-1)\n\n    # b.storage().use_count() is 2\n\ndef test2():\n    print(\"=============== test 2 ===============\")\n    a = torch.empty(size=(17, 32, 128, 16), dtype=torch.float16)\n    b = a.view(-1)\n\n    del a\n    # b.storage().use_count() is 2\n\ndef test3():\n    print(\"=============== test 3 ===============\")\n    a = torch.empty(size=(17, 32, 128, 16), dtype=torch.float16)\n    b = a.view(-1)\n\n    del b\n    # a.storage().use_count() is 1\n\ntest1()\ntest2()\ntest3()\n```\nI thought use_count=2 was because a and b each referenced the storage once, and deleting either tensor would make the use_comunt be 1, but that's not the case.",
    "url": "https://github.com/pytorch/pytorch/issues/152100",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-24T12:54:21Z",
    "updated_at": "2025-04-25T07:39:39Z",
    "user": "CLiqing"
  },
  {
    "repo": "pytorch/audio",
    "number": 3901,
    "title": "2.7.0 release tag",
    "body": "### \ud83d\ude80 The feature\n\nAlthough there is a 2.7.0 release on PyPI, there is no release of the source code on GitHub. Can we get a 2.7.0 release tagged?\n\n### Motivation, pitch\n\nPackage managers like Spack build from source code, not from pre-compiled wheels. This is especially important for libraries like torchaudio which get frequent bug fixes as PRs but don't always get those PRs merged due to lack of maintenance.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/audio/issues/3901",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-24T09:54:48Z",
    "updated_at": "2025-04-24T15:25:16Z",
    "comments": 2,
    "user": "adamjstewart"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1141,
    "title": "Meet Error when using AMD server (MI250)",
    "body": "Hi, when I using torchtitan on AMD server (Mi250), it reports the following errors:\n\n![Image](https://github.com/user-attachments/assets/54046f8f-f183-4006-99b5-1730cae0bf1b).\n\nDoes torchtitan support AMD server like MI250?\n\nThanks.",
    "url": "https://github.com/pytorch/torchtitan/issues/1141",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-24T07:48:10Z",
    "updated_at": "2025-04-25T08:46:06Z",
    "comments": 5,
    "user": "StillKeepTry"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11396,
    "title": "How to convert the hidream lora trained by diffusers to a format that comfyui can load?",
    "body": "### Describe the bug\n\nThe hidream lora trained by diffusers can't load in comfyui, how could I convert it?\n\n### Reproduction\n\nNo\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nNo\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11396",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2025-04-23T13:13:34Z",
    "updated_at": "2025-06-23T09:49:19Z",
    "user": "yinguoweiOvO"
  },
  {
    "repo": "huggingface/candle",
    "number": 2916,
    "title": "how to save and load the model",
    "body": "I  just use the varmap.save the varmap,but when I use the varmap.load then achieved a empty varmap. is there any way to save the trained model?",
    "url": "https://github.com/huggingface/candle/issues/2916",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-23T11:10:04Z",
    "updated_at": "2025-04-24T02:25:37Z",
    "user": "liguheng"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1768,
    "title": "How to debug tokenizers with python?",
    "body": "Hi, I have a technical question. After installing transformers via pip, I successfully installed tokenizers==0.21.1 and transformers==4.49.0. When running the code:\n`tokenizer = AutoTokenizer.from_pretrained(\"../Qwen2\")  # (tokenizer configs in this folder)`\n`tokenizer.encode(data)`\nI want to trace the program flow to understand:\n\n- How tokenizers.encode_batch works internally\n- The implementation details of BPE (Byte Pair Encoding)\n\nHowever, I'm currently stuck because the code appears to be compiled into tokenizers.abi3.so, making the source code inaccessible. How can I debug or inspect these components?",
    "url": "https://github.com/huggingface/tokenizers/issues/1768",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-23T09:37:20Z",
    "updated_at": "2025-04-30T14:11:11Z",
    "user": "JinJieGan"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1133,
    "title": "How to correctly use FSDP2 do mixed precision training?",
    "body": "Hi, I am currently doing this way:\n```py\nmodel = AutoModel.from_pretrained(...)\n\n# make sure model is in fp32, so we have a fp32 mater weight in optimizer\nmodel.to(torch.float32)\n\nmp_policy = MixedPrecisionPolicy(\n    param_dtype=torch.bfloat16,\n    reduce_dtype=torch.float32,\n)\nfsdp_kwargs = {\n        \"reshard_after_forward\": True,\n        \"mp_policy\": mp_policy,\n        }\n\nfor cls_to_wrap in transformer_cls_to_wrap:\n    for module in model.modules():\n        if isinstance(module, cls_to_wrap):\n            fully_shard(module, **fsdp_kwargs)\n\nfully_shard(model, **fsdp_kwargs)\n\n```\n\nThe first question is: is this correct? As far as I understand, the model param is in fp32, and optimizer states will also be fp32, the fwd and bwd pass will use bf16.\n\nI am wondering if I can init fsdp with a bf16 model and then transfer this FSDP module into fp32? As In this way, it will take less CPU memory when loading Large LLMs. like the following demo:\n\n```py\nmodel = AutoModel.from_pretrained(...)\n\n# just for demo, make sure model is in bf16\nmodel.to(torch.bfloat16)\n\nmp_policy = MixedPrecisionPolicy(\n    param_dtype=torch.bfloat16,\n    reduce_dtype=torch.float32,\n)\nfsdp_kwargs = {\n        \"reshard_after_forward\": True,\n        \"mp_policy\": mp_policy,\n        }\n\nfor cls_to_wrap in transformer_cls_to_wrap:\n    for module in model.modules():\n        if isinstance(module, cls_to_wrap):\n            fully_shard(module, **fsdp_kwargs)\n\nfully_shard(model, **fsdp_kwargs)\n\nmodel.to(torch.float32)\n```",
    "url": "https://github.com/pytorch/torchtitan/issues/1133",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-23T06:55:40Z",
    "updated_at": "2025-04-27T10:03:20Z",
    "user": "KimmiShi"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1132,
    "title": "FSDP2 reduce_scatter_reduce_op for context parallelism",
    "body": "Hi,\n\nFSDP2 reduce_scatter by default seems to take the average over the entire shard world, which consists of dp_shard and cp. Averaging gradients over dp_shard makes sense, but I wonder if sum is the better reduce op for CP?\n\nLogically, it seems to me gradient should be agnostic to the choice of CP.\n\nThanks!",
    "url": "https://github.com/pytorch/torchtitan/issues/1132",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-23T01:44:19Z",
    "updated_at": "2025-04-24T16:39:05Z",
    "user": "dingqingy"
  },
  {
    "repo": "pytorch/xla",
    "number": 9026,
    "title": "Where to find TPU-dependent compile-pipeline/optimizations in XLA?",
    "body": "## \u2753 Questions and Help\n\nI'm diving into the XLA source code to understand the compilation pipeline for the TPU backend and any TPU-dependent optimizations. However, I couldn't find details about the TPU compilation pipeline in xla/service dir, while CPU and GPU pipelines seem more visible. I see some cost-model-based fusion in GPU backend,  so I wonder where are the equivalent optimizations done for TPU backend?",
    "url": "https://github.com/pytorch/xla/issues/9026",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-23T01:42:17Z",
    "updated_at": "2025-04-23T12:07:58Z",
    "comments": 0,
    "user": "Bolzano983"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11390,
    "title": "Better image interpolation in training scripts follow up",
    "body": "With https://github.com/huggingface/diffusers/pull/11206 we did a small quality improvement for the SDXL Dreambooth LoRA script by making `LANCZOS` the default interpolation mode for the image resizing.\n\nThis issue is to ask for help from the community to bring this change to the other training scripts, specially for the popular ones.\n\nSince this is a really easy to make contribution I'll ask that we leave this issue for beginners and people that want to start learning how to contribute to open source projects.\n\nWhat I think are the most important ones:\n\n- [x]  [train_dreambooth_flux](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_flux.py)\n- [x] [train_dreambooth_lora](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora.py)\n- [x] [train_dreambooth_lora_lumina2](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_lumina2.py)\n- [x] [train_dreambooth_lora_sdxl](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_sdxl.py)\n- [x] [train_controlnet_flux](https://github.com/huggingface/diffusers/blob/main/examples/controlnet/train_controlnet_flux.py)\n- [x] [train_controlnet_sdxl](https://github.com/huggingface/diffusers/blob/main/examples/controlnet/train_controlnet_sdxl.py)\n- [x] [train_text_to_image](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image.py)\n- [x] [train_text_to_image_lora](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_lora.py)\n- [x] [train_text_to_image_sdxl](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_sdxl.py)\n- [x] [train_text_to_image_lora_sdxl](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_lora_sdxl.py)\n- [x] [train_dreambooth_lora_flux_advanced](https://github.com/huggingface/diffusers/blob/main/examples/advanced_diffusion_training/train_dreambooth_lora_flux_advanced.py)\n- [x] [train_dreambooth_lora_sd15_advanced](https://github.com/huggingface/diffusers/blob/main/examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py)\n- [x] [train_dreambooth_lora_sdxl_advanced](https://github.com/huggingface/diffusers/blob/main/examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py)\n\nIf you have other preference, please feel free to ask me to add it.\n\nIf you want to contribute just answer to this issue with the one you want to do and tag me in the PR. Please only take one since I want to use this issue to get people to learn the ropes on how to contribute and get started with open source.",
    "url": "https://github.com/huggingface/diffusers/issues/11390",
    "state": "closed",
    "labels": [
      "good first issue",
      "contributions-welcome"
    ],
    "created_at": "2025-04-23T00:04:10Z",
    "updated_at": "2025-05-05T16:35:18Z",
    "comments": 20,
    "user": "asomoza"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1019,
    "title": "How to resume dataset creation after interruption instead of starting from scratch?",
    "body": "Recently our dataset creation + upload got interrupted due to an error not related to LeRobot. However, I have not been able to launch the dataset creation using the information already processed. My cache folder shows the data, meta, and videos folders, and I was able to determine using the episodes.jsonl file in meta folder that there were 579 episodes processed. \n\nWhen I try to resume from 580th episode, the `LeRobotDataset.create()` command gives the error that `FileExistsError: [Errno 17] File exists:` because the cache has it. How to resume it instead of having to start from scratch again?",
    "url": "https://github.com/huggingface/lerobot/issues/1019",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-22T21:30:12Z",
    "updated_at": "2025-04-22T21:45:00Z",
    "user": "Anas-7"
  },
  {
    "repo": "huggingface/peft",
    "number": 2508,
    "title": "How to save the custom module into adapter_model.safetensrs when integrating new peft method",
    "body": "Just don't know where to save and load the module, or something can mark which module need to be saved.\n\nFor example, we want a moe of lora, where multi-lora and a router will be the trainable part and need to be saved.",
    "url": "https://github.com/huggingface/peft/issues/2508",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-22T15:46:39Z",
    "updated_at": "2025-04-30T11:01:58Z",
    "user": "AaronZLT"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1015,
    "title": "How to efficiently collect and standardize datasets from multiple Gymnasium environments?",
    "body": "Hello, I am studying how to collect datasets from various Gymnasium environments for reinforcement learning and imitation learning experiments. Currently, I can collect some data from real environments, but how to collect data from Gymnasium?",
    "url": "https://github.com/huggingface/lerobot/issues/1015",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "good first issue"
    ],
    "created_at": "2025-04-22T08:50:34Z",
    "updated_at": "2025-10-17T11:16:09Z",
    "user": "ybu-lxd"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1013,
    "title": "When creating dataset, how to save_episode with existing video?",
    "body": "For video with compatible frames, height and width that is recorded/rendered elsewhere, how can I add it to an episode directly without redundant decode-encode round-trip?",
    "url": "https://github.com/huggingface/lerobot/issues/1013",
    "state": "closed",
    "labels": [
      "enhancement",
      "dataset",
      "stale"
    ],
    "created_at": "2025-04-22T04:05:10Z",
    "updated_at": "2025-12-25T02:35:25Z",
    "user": "jjyyxx"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1012,
    "title": "why chunk_size not used in PI0?",
    "body": "https://github.com/huggingface/lerobot/blob/b43ece89340e7d250574ae7f5aaed5e8389114bd/lerobot/common/policies/pi0/modeling_pi0.py#L658\n\nIs it more meaningful and reasonable here to change `n_action_steps` to `chunk_size`, since `chunk_size` means prediction action horizon and `n_action_steps` means action steps actually applied to control the robot?",
    "url": "https://github.com/huggingface/lerobot/issues/1012",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2025-04-22T03:43:38Z",
    "updated_at": "2025-11-04T02:30:18Z",
    "user": "feixyz10"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 3020,
    "title": "How to run apps in local mode? local_files_only is failing",
    "body": "The app is running perfectly fine when internet available\n\nAll models downloaded into \n\n`os.environ['HF_HOME'] = os.path.abspath(os.path.realpath(os.path.join(os.path.dirname(__file__), './hf_download')))`\n\nWhen i set like below\n\n```\n# Set local_files_only based on offline mode\nlocal_files_only = args.offline\nif local_files_only:\n    print(\"Running in OFFLINE mode - using local models only\")\n    # Disable any online connections for HuggingFace when in offline mode\n    os.environ['HF_HUB_OFFLINE'] = '1'\n    os.environ['TRANSFORMERS_OFFLINE'] = '1'\n    os.environ['DIFFUSERS_OFFLINE'] = '1'\n\n# Load models with local_files_only parameter when in offline mode\ntext_encoder = LlamaModel.from_pretrained(\"hunyuanvideo-community/HunyuanVideo\", subfolder='text_encoder', torch_dtype=torch.float16, local_files_only=local_files_only).cpu()\ntext_encoder_2 = CLIPTextModel.from_pretrained(\"hunyuanvideo-community/HunyuanVideo\", subfolder='text_encoder_2', torch_dtype=torch.float16, local_files_only=local_files_only).cpu()\ntokenizer = LlamaTokenizerFast.from_pretrained(\"hunyuanvideo-community/HunyuanVideo\", subfolder='tokenizer', local_files_only=local_files_only)\ntokenizer_2 = CLIPTokenizer.from_pretrained(\"hunyuanvideo-community/HunyuanVideo\", subfolder='tokenizer_2', local_files_only=local_files_only)\nvae = AutoencoderKLHunyuanVideo.from_pretrained(\"hunyuanvideo-community/HunyuanVideo\", subfolder='vae', torch_dtype=torch.float16, local_files_only=local_files_only).cpu()\n\nfeature_extractor = SiglipImageProcessor.from_pretrained(\"lllyasviel/flux_redux_bfl\", subfolder='feature_extractor', local_files_only=local_files_only)\nimage_encoder = SiglipVisionModel.from_pretrained(\"lllyasviel/flux_redux_bfl\", subfolder='image_encoder', torch_dtype=torch.float16, local_files_only=local_files_only).cpu()\n\ntransformer = HunyuanVideoTransformer3DModelPacked.from_pretrained('lllyasviel/FramePackI2V_HY', torch_dtype=torch.bfloat16, local_files_only=local_files_only).cpu()\n\n```\n\nand run with turning off internet i get below error\n\n`local_files_only = set as True`\n\n\n\n```\nRunning in OFFLINE mode - using local models only\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 4/4 [00:00<00:00, 262.52it/s]\nTraceback (most recent call last):\n  File \"Q:\\FramePack_v1\\FramePack\\venv\\lib\\site-packages\\urllib3\\connection.py\", line 198, in _new_conn\n    sock = connection.create_connection(\n  File \"Q:\\FramePack_v1\\FramePack\\venv\\lib\\site-packages\\urllib3\\util\\connection.py\", line 60, in create_connection\n    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):\n  File \"C:\\Python310\\lib\\socket.py\", line 955, in getaddrinfo\n    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):\nsocket.gaierror: [Errno 11001] getaddrinfo failed\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"Q:\\FramePack_v1\\FramePack\\venv\\lib\\site-packages\\urllib3\\connectionpool.py\", line 787, in urlopen\n    response = self._make_request(\n  File \"Q:\\FramePack_v1\\FramePack\\venv\\lib\\site-packages\\urllib3\\connectionpool.py\", line 488, in _make_request\n    raise new_e\n  File \"Q:\\FramePack_v1\\FramePack\\venv\\lib\\site-packages\\urllib3\\connectionpool.py\", line 464, in _make_request\n    self._validate_conn(conn)\n  File \"Q:\\FramePack_v1\\FramePack\\venv\\lib\\site-packages\\urllib3\\connectionpool.py\", line 1093, in _validate_conn\n    conn.connect()\n  File \"Q:\\FramePack_v1\\FramePack\\venv\\lib\\site-packages\\urllib3\\connection.py\", line 704, in connect\n    self.sock = sock = self._new_conn()\n  File \"Q:\\FramePack_v1\\FramePack\\venv\\lib\\site-packages\\urllib3\\connection.py\", line 205, in _new_conn\n    raise NameResolutionError(self.host, self, e) from e\nurllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x000001A126F7ED70>: Failed to resolve 'huggingface.co' ([Errno 11001] getaddrinfo failed)\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"Q:\\FramePack_v1\\FramePack\\venv\\lib\\site-packages\\requests\\adapters.py\", line 486, in send\n    resp = conn.urlopen(\n  File \"Q:\\FramePack_v1\\FramePack\\venv\\lib\\site-packages\\urllib3\\connectionpool.py\", line 841, in urlopen\n    retries = retries.increment(\n  File \"Q:\\FramePack_v1\\FramePack\\venv\\lib\\site-packages\\urllib3\\util\\retry.py\", line 519, in increment\n    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]\nurllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/lllyasviel/FramePackI2V_HY (Caused by NameResolutionError(\"<urllib3.connection.HTTPSConnection object at 0x000001A126F7ED70>: Failed to resolve 'huggingface.co' ([Errno 11001] getaddrinfo failed)\"))\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"Q:\\FramePack_v1\\FramePack\\app.py\", line 72, in <module>\n    transformer ",
    "url": "https://github.com/huggingface/huggingface_hub/issues/3020",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-04-21T23:46:06Z",
    "updated_at": "2025-04-22T09:24:57Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1126,
    "title": "fully_shard() for huggingface model: pytorch caches too much GPU memory ",
    "body": "Dear Community,\n\nI'm working on fine-tuning the Qwen2-VL model using `fully_shard()` and wrote a script for it. However, I noticed that GPU memory usage stays high (around 50GB to 60GB) even as I scale up the number of GPUs. Besides, it will run into OOM when I try to fine tune 72B model with 128 GPUs.\n\nI'm wondering if there might be any issues with my code or configuration. I'd really appreciate any insights or suggestions you might have. Thanks in advance!\n\nMy code:\n\n```\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data import Dataset, DataLoader\nfrom transformers import Qwen2VLForConditionalGeneration, Qwen2VLProcessor, AutoModelForVision2Seq, AutoConfig\nfrom qwen_vl_utils import process_vision_info\nfrom peft import LoraConfig, get_peft_model\nfrom datasets import load_dataset\nimport numpy as np\nfrom PIL import Image\nimport io\nimport logging\nimport os\n\nfrom torch.nn.parallel import DistributedDataParallel as DDP\nimport torch.distributed as dist\nimport torch.distributed.checkpoint as dcp\nfrom torch.distributed.device_mesh import init_device_mesh\nfrom transformers.models.qwen2_vl.modeling_qwen2_vl import Qwen2VLDecoderLayer, Qwen2VLVisionBlock\nfrom torch.distributed._composable.fsdp import fully_shard\nfrom torch.distributed import init_process_group, destroy_process_group\nfrom torch.distributed.checkpoint import DefaultLoadPlanner, DefaultSavePlanner\nfrom torch.distributed._composable.fsdp import (\n    CPUOffloadPolicy,\n    fully_shard,\n    MixedPrecisionPolicy,\n)\n\n\n# Set up logging\nlogging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')\nlogger = logging.getLogger(__name__)\n\n# init dist\ndistributed_backend = \"nccl\" # gloo for cpu\ndist.init_process_group(distributed_backend)\n\nlocal_rank = int(os.environ[\"LOCAL_RANK\"])\nworld_size = int(os.environ[\"WORLD_SIZE\"])\ndevice = torch.device(f\"cuda:{local_rank}\")\ntorch.cuda.set_device(device)\n\n\n# model_name = \"Qwen/Qwen2-VL-2B-Instruct\"\n# revision = \"895c3a49bc3fa70a340399125c650a463535e71c\"\nmodel_name = \"Qwen/Qwen2-VL-7B-Instruct\"\nrevision = \"a28a094eb66a9f2ac70eef346f040d8a79977472\"\n# model_name = \"Qwen/Qwen2-VL-72B-Instruct\"\n# revision = \"f9b556a74d58e6d9915f73227c21045c87342b42\"\n\ndataset_id = \"HuggingFaceM4/ChartQA\"\nprocessor = Qwen2VLProcessor.from_pretrained(model_name, \n                                             revision=revision,\n                                             )\n\n\n# Configuration\nclass Config:\n    dataset_id = \"HuggingFaceM4/ChartQA\"\n    output_dir = \"/tmp_ckpt\"\n    batch_size = 2\n    num_epochs = 3\n    learning_rate = 5e-5\n    max_seq_length = 512\n    lora_rank = 32\n    lora_alpha = 64\n    lora_dropout = 0.1\n    device = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n\n\n\n\nsystem_message = \"\"\"You are a Vision Language Model specialized in interpreting visual data from chart images.\nYour task is to analyze the provided chart image and respond to queries with concise answers, usually a single word, number, or short phrase.\nThe charts include a variety of types (e.g., line charts, bar charts) and contain colors, labels, and text.\nFocus on delivering accurate, succinct answers based on the visual information. Avoid additional explanation unless absolutely necessary.\"\"\"\n\ndef format_data(sample):\n    return [\n        {\n            \"role\": \"system\",\n            \"content\": [{\"type\": \"text\", \"text\": system_message}],\n        },\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"image\",\n                    \"image\": sample[\"image\"],\n                },\n                {\n                    \"type\": \"text\",\n                    \"text\": sample[\"query\"],\n                },\n            ],\n        },\n        {\n            \"role\": \"assistant\",\n            \"content\": [{\"type\": \"text\", \"text\": sample[\"label\"][0]}],\n        },\n    ]\n\n# Training function\ndef train_model(model, train_loader, optimizer, config):\n    model.train()\n    total_steps = len(train_loader) * config.num_epochs\n    step = 0\n\n    scaler = torch.amp.GradScaler(\"cuda\", enabled=True)\n\n    for epoch in range(config.num_epochs):\n        total_loss = 0\n        for batch_idx, batch in enumerate(train_loader):\n\n            inputs, labels = batch\n            inputs = inputs.to(config.device)\n            labels = labels.to(config.device)\n\n            # Mixed precision training\n            loss = model(**inputs, labels=labels).loss\n            loss.backward() # no scaler\n            optimizer.step()\n            optimizer.zero_grad()\n            \n            step += 1\n            logger.info(f\"Epoch {epoch+1}/{config.num_epochs}, Step {step}/{total_steps}, Loss: {loss.item():.4f}\")\n\n            del loss\n\n\n\n# Create a data collator to encode text and image pairs\ndef collate_fn(examples):\n    # Get the texts and images, and apply the chat template\n    texts = [\n        processor.apply_chat_template(example, tokenize=False) for example in examples\n    ]  # Prepare texts for processing\n    image_inputs = [process",
    "url": "https://github.com/pytorch/torchtitan/issues/1126",
    "state": "open",
    "labels": [
      "question",
      "module: fsdp"
    ],
    "created_at": "2025-04-21T21:37:43Z",
    "updated_at": "2025-05-13T05:09:52Z",
    "user": "mingdianliu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 151829,
    "title": "profile for torch.add(x, x) where x is a zero-sized tensor looks bogus",
    "body": "```py\nfrom torch.profiler import profile, record_function, ProfilerActivity\n\nimport torch\n\nx = torch.randn(0)\n\nwith profile(activities=[ProfilerActivity.CPU], record_shapes=True) as prof:\n    with record_function(\"model_inference\"):\n        x + x\n\n\nprint(prof.key_averages().table(sort_by=\"cpu_time_total\", row_limit=10))\n```\n\nGives:\n```\nIn [7]: print(prof.key_averages().table(sort_by=\"cpu_time_total\", row_limit=10))\n-----------------------------  ------------  ------------  ------------  ------------  ------------  ------------\n                         Name    Self CPU %      Self CPU   CPU total %     CPU total  CPU time avg    # of Calls\n-----------------------------  ------------  ------------  ------------  ------------  ------------  ------------\n                 aten::matmul         0.46%       8.994us        62.32%       1.213ms     606.382us             2\n                    aten::dot        61.72%       1.201ms        61.86%       1.204ms     601.884us             2\n              model_inference         6.61%     128.555us         8.13%     158.251us     158.251us             1\n                     aten::to         1.04%      20.242us         5.30%     103.077us       3.221us            32\n               aten::_to_copy         2.19%      42.586us         4.26%      82.835us       2.589us            32\n                   aten::ones         2.08%      40.453us         2.87%      55.895us      13.974us             4\n                    aten::add         2.32%      45.200us         2.59%      50.328us      12.582us             4\n                    aten::abs         1.27%      24.757us         2.20%      42.744us      21.372us             2\n             aten::__lshift__         0.67%      12.990us         1.76%      34.283us      34.283us             1\n                    aten::pow         1.40%      27.282us         1.58%      30.817us      10.272us             3\n-----------------------------  ------------  ------------  ------------  ------------  ------------  ------------\n```\nwhich seems really bizarre\n\ncc @robieta @chaekit @guotuofeng @guyang3532 @dzhulgakov @davidberard98 @briancoutinho @sraikund16 @sanrise",
    "url": "https://github.com/pytorch/pytorch/issues/151829",
    "state": "closed",
    "labels": [
      "oncall: profiler"
    ],
    "created_at": "2025-04-21T20:53:57Z",
    "updated_at": "2025-06-07T23:58:54Z",
    "user": "zou3519"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 378,
    "title": "How to finetune CogVideoX1.5-5B T2V LoRA?",
    "body": "Hello. I still unfamiliar with the finetuning process. I want to finetune CogVideoX1.5-5B T2V with LoRA. I have single RTX 4090. I try to re-run the bash script \"finetrainers\\examples\\training\\sft\\cogvideox\\crush_smol_lora\\train.sh\" with my own dataset and end up with error message\n`train.sh: line 130: accelerate: command not found\ntrain.sh: line 131: $'(\\r --parallel_backend accelerate\\r --pp_degree 1 --dp_degree 1 --dp_shards 1 --cp_degree 1 --tp_degree 1\\r\\r)\\r': command not found\n: No such file or directory_path THUDM/CogVideoX1.5-5B\n --dataset_config D:/TA_ucup/finetrainers/examples/training/sft/cogvideox/crush_smol_: No such file or directoryize 10\ntrain.sh: line 134: $'(\\r --dataloader_num_workers 0\\r)\\r': command not found\ntrain.sh: line 135: $'(\\r --flow_weighting_scheme logit_normal\\r)\\r': command not found\ntrain.sh: line 136: $'(\\r --training_type lora\\r --seed 42\\r --batch_size 1\\r --train_steps 3000\\r --rank 32\\r --lora_alpha 32\\r --target_modules (transformer_blocks|single_transformer_blocks).*(to_q|to_k|to_v|to_out.0)\\r --gradient_accumulation_steps 1\\r --gradient_checkpointing\\r --checkpointing_steps 1000\\r --checkpointing_limit 2\\r --enable_slicing\\r --enable_tiling\\r)\\r': command not found\ntrain.sh: line 137: $'(\\r --optimizer adamw\\r --lr 5e-5\\r --lr_scheduler constant_with_warmup\\r --lr_warmup_steps 1000\\r --lr_num_cycles 1\\r --beta1 0.9\\r --beta2 0.99\\r --weight_decay 1e-4\\r --epsilon 1e-8\\r --max_grad_norm 1.0\\r)\\r': command not found\n --validation_dataset_file D:/TA_ucup/finetrainers/examples/training/sft/cogvideox/cr: No such file or directoryon\n: No such file or directoryogvideoxeox`\nI already install the library requirements and the diffusers. Is there anything I missing?",
    "url": "https://github.com/huggingface/finetrainers/issues/378",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-21T17:17:08Z",
    "updated_at": "2025-04-24T06:24:06Z",
    "user": "MaulanaYusufIkhsanRobbani"
  },
  {
    "repo": "huggingface/trl",
    "number": 3333,
    "title": "How can I set the dataset to not shuffle? It seems there is no such option.",
    "body": "I'm using GRPOTrainer for training, and based on the logs I've printed, it seems that the dataset is being shuffled. However, the order of samples in the dataset is very important to me, and I don't want it to be shuffled. What should I do? I've checked the documentation but couldn't find any parameter to control this.",
    "url": "https://github.com/huggingface/trl/issues/3333",
    "state": "closed",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-04-21T11:11:53Z",
    "updated_at": "2025-04-21T21:34:33Z",
    "user": "Tuziking"
  },
  {
    "repo": "pytorch/ao",
    "number": 2086,
    "title": "How to automatically install the latest TorchAO nightly wheel",
    "body": "When I try to install TorchAO the same way I install the nightly torch wheel (pip3 install torchao --index-url https://download.pytorch.org/whl/nightly/cpu), I end up getting version 0.10.0 of TorchAO, instead of the expected https://download.pytorch.org/whl/nightly/cpu/torchao-0.11.0.dev20250418+cpu-py3-none-any.whl for example.\n\nI'd like to know how to automatically install the latest TorchAO nightly wheel, and why the latest TorchAO nightly build is only available for Python3.9?\n\nlog:\n(torch27) [xxx@xxx localdisk]$ pip3 install torchao --index-url https://download.pytorch.org/whl/nightly/cpu\nLooking in indexes: https://download.pytorch.org/whl/nightly/cpu\nCollecting torchao\n  Using cached https://download.pytorch.org/whl/nightly/cpu/torchao-0.10.0%2Bcpu-py3-none-any.whl.metadata (14 kB)\nUsing cached https://download.pytorch.org/whl/nightly/cpu/torchao-0.10.0%2Bcpu-py3-none-any.whl (710 kB)\nInstalling collected packages: torchao\nSuccessfully installed torchao-0.10.0+cpu\n\n\n",
    "url": "https://github.com/pytorch/ao/issues/2086",
    "state": "open",
    "labels": [
      "triaged",
      "distribution"
    ],
    "created_at": "2025-04-21T06:48:43Z",
    "updated_at": "2025-04-29T22:28:47Z",
    "user": "MingxuZh"
  },
  {
    "repo": "huggingface/trl",
    "number": 3331,
    "title": "how to run multi-adapter PPO training in TRL==0.16.1 ?",
    "body": "In `TRL==0.11.0`, we can use multi-adapter  to train PPO model like:\n\n- $\\pi_\\text{sft}$ sft model as base model \n- $\\pi_\\text{sft} + \\text{LoRA}_\\text{rm}$ as reward model\n- $\\pi_\\text{sft} + \\text{LoRA}_\\text{policy}$ as policy model\n- $\\pi_\\text{sft} + \\text{LoRA}_\\text{critic}$ as value model\n\nin v0.16.0 how to run multi-adapter PPO training.",
    "url": "https://github.com/huggingface/trl/issues/3331",
    "state": "closed",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb PPO",
      "\ud83c\udfcb SFT"
    ],
    "created_at": "2025-04-21T06:26:32Z",
    "updated_at": "2025-06-17T08:59:11Z",
    "user": "dhcode-cpp"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 3019,
    "title": "How to solve \"Spaces stuck in Building\" problems",
    "body": "### Describe the bug\n\nPublic spaces may stuck in Building after restarting, error log as follows:\n\nbuild error\nUnexpected job error\n\nERROR: failed to push spaces-registry.huggingface.tech/spaces/:cpu--: unexpected status from HEAD request to https://spaces-registry.huggingface.tech/v2/spaces/*/manifests/cpu-*-: 401 Unauthorized\n\n### Reproduction\n\n_No response_\n\n### Logs\n\n```shell\n\n```\n\n### System info\n\n```shell\nThis problem can still happen in python gradio spaces without requirements.txt\n```",
    "url": "https://github.com/huggingface/huggingface_hub/issues/3019",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-04-21T03:11:11Z",
    "updated_at": "2025-04-22T07:50:01Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7530,
    "title": "How to solve \"Spaces stuck in Building\" problems",
    "body": "### Describe the bug\n\nPublic spaces may stuck in Building after restarting, error log as follows:\n\nbuild error\nUnexpected job error\n\nERROR: failed to push spaces-registry.huggingface.tech/spaces/*:cpu-*-*: unexpected status from HEAD request to https://spaces-registry.huggingface.tech/v2/spaces/*/manifests/cpu-*-*: 401 Unauthorized\n\n### Steps to reproduce the bug\n\nRestart space / Factory rebuild cannot avoid it\n\n### Expected behavior\n\nFix this problem\n\n### Environment info\n\nno requirements.txt can still happen\npython gradio spaces",
    "url": "https://github.com/huggingface/datasets/issues/7530",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-21T03:08:38Z",
    "updated_at": "2025-11-11T00:57:14Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1005,
    "title": "[pi0] n_action_step vs chunk_size",
    "body": "In modeling_pi0.py, the config variable `chunk_size` is never used. Instead, the action queue is set to be the size of `n_action_step`, and the training loss is also calculated on the actions of size `n_action_step`. \n\nBut I thought what should happen is that the model would predict actions of length `chunk size` (and the loss is calculated on this action length as well), and the actual execution only takes `n_action_step`. At the very least, the variable that defines the size of `action_queue` should not be the same as the variable that defines the size of the predicted action vector. They may take the same value, but should be different variables, so the user can use the config to adjust how often they want to do inference\n\nThis is also what happens in pi0fast's implementation, if I am not mistaken\n \nAm I missing something here? Thanks in advance",
    "url": "https://github.com/huggingface/lerobot/issues/1005",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2025-04-20T04:00:23Z",
    "updated_at": "2025-11-07T02:30:27Z",
    "user": "IrvingF7"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 151746,
    "title": "[AotInductor][Export][Triton] how to export custom triton kernels when use torch.export.export",
    "body": "### \ud83d\udc1b Describe the bug\n\nour framework is based on torch, and includes some custom triton kernels. \nin inference phase,  we try use different gpu type(such as training on H100, inference on L40). so we should load exported model and call aoti_compile_and_package to generate aot model based on inference gpu, but error with below msg when call torch.load:\n```\ntorch._export.serde.serialize.SerializeError: Unsupported target type for node Node(target='torch.ops.triton_kernel.add.default', inputs=[NamedArgument(name='x', arg=Argument(as_tensor=TensorArgument(name='linear')), kind=1), NamedArgument(name='y', arg=Argument(as_tensor=TensorArgument(name='mul')), kind=1)], outputs=[Argument(as_tensor=TensorArgument(name='add'))], metadata={'stack_trace': '  File \"/usr/local/app/torch_learn/export/model_export.py\", line 72, in forward\\n    output = triton_add(dense_output, bias)\\n  File \"/usr/bin/python3.9/lib/python3.9/site-packages/torch/_library/custom_ops.py\", line 671, in __call__\\n    return self._opoverload(*args, **kwargs)\\n', 'nn_module_stack': 'L__self__,,__main__.SimpleModel', 'source_fn_stack': 'add_default,torch.ops.triton_kernel.add.default',\n'torch_fn': 'add.default_1;OpOverload.add.default'}, is_hop_single_tensor_return=None): <class 'str'>\n```\nIn my understanding, torch need source code of triton kernels when load exported_model. \nbut our framwork is big, and in some cases, user may define their custom triton kernels. \nit's diffcult for us to obtain user source code and download this big framework in inference gpu machine.  \n\nany suggestions?\n\n\n\nthe simple model code is:\n```python\nimport torch\nimport torch.nn as nn\nimport torch\nimport triton\nimport triton.language as tl\n\n\n@triton.jit\ndef add_kernel(\n    x_ptr, y_ptr, output_ptr,\n    n_elements,\n    BLOCK_SIZE: tl.constexpr,\n):\n    pid = tl.program_id(axis=0)\n    block_start = pid * BLOCK_SIZE\n    offsets = block_start + tl.arange(0, BLOCK_SIZE)\n    mask = offsets < n_elements\n    x = tl.load(x_ptr + offsets, mask=mask)\n    y = tl.load(y_ptr + offsets, mask=mask)\n    output = x + y\n    tl.store(output_ptr + offsets, output, mask=mask)\n\n\n@torch.library.triton_op(\"triton_kernel::add\", mutates_args={})\ndef triton_add(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:\n\tn_elements = x.numel()\n\toutput = torch.empty_like(x)\n\n\tBLOCK_SIZE = 1024\n\tgrid = (triton.cdiv(n_elements, BLOCK_SIZE),)\n\n\ttorch.library.wrap_triton(add_kernel)[grid](\n\t\tx, y, output,\n\t\tn_elements,\n\t\tBLOCK_SIZE,\n\t)\n\n\treturn output\n\n\nclass SimpleModel(nn.Module):\n\n    def __init__(self, input_dim, hidden_dim):\n        super(SimpleModel, self).__init__()\n        self.dense = nn.Linear(input_dim, hidden_dim)\n\n    def forward(self, x):\n        dense_output = self.dense(x)\n        bias = torch.ones_like(dense_output) * 0.5\n        output = triton_add(dense_output, bias)\n        return output\n\n\ndef main():\n    device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\n    input_dim = 10\n    hidden_dim = 20\n    batch_size = 16\n\n    model = SimpleModel(input_dim, hidden_dim).to(device)\n\n    x = torch.randn(batch_size, input_dim, device=device)\n\n    with torch.no_grad():\n        output = model(x)\n\n    exported_model = torch.export.export(\n        model,\n        (x,),\n    )\n\n    torch.export.save(exported_model, \"exported_model.pt\")\n\n\nif __name__ == \"__main__\":\n    main()\n\n```\nrun this code, a exported_model is in `./exported_model.pt`\n\nthen run aot export code:\n```python\nimport torch\n\ntorch.set_default_device(\"cuda\")\n\n\nsaved_exported_program = torch.export.load(f\"exported_model.pt\")\ntorch._inductor.aoti_compile_and_package(\n    saved_exported_program,\n    package_path=f\"aot_model.pt2\",\n)\n```\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.7.0+cu118\nIs debug build: False\nCUDA used to build PyTorch: 11.8\nROCM used to build PyTorch: N/A\n\nGCC version: (GCC) 10.3.1 20210422 (Red Hat 10.3.1-1)\nClang version: 9.0.1 (Red Hat 9.0.1-2.module_el8.2.0+309+0c7b6b03)\nCMake version: version 3.19.0\nLibc version: glibc-2.28\n\nPython version: 3.9.16 (main, Dec 11 2024, 20:47:20)  [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] (64-bit runtime)\nPython platform: Linux-5.4.119-1-tlinux4-0010.3-x86_64-with-glibc2.28\nIs CUDA available: True\nCUDA runtime version: 11.8.89\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: \nGPU 0: NVIDIA A10\nGPU 1: NVIDIA A10\nGPU 2: NVIDIA A10\nGPU 3: NVIDIA A10\n\nNvidia driver version: 470.141.03\ncuDNN version: Probably one of the following:\n/usr/lib/libcudnn.so.8.9.7\n/usr/lib/libcudnn_adv_infer.so.8.9.7\n/usr/lib/libcudnn_adv_train.so.8.9.7\n/usr/lib/libcudnn_cnn_infer.so.8.9.7\n/usr/lib/libcudnn_cnn_train.so.8.9.7\n/usr/lib/libcudnn_ops_infer.so.8.9.7\n/usr/lib/libcudnn_ops_train.so.8.9.7\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:        x86_64\nCPU op-mode(s):      32-bit, 64-bit\nByte Order:          Little Endian\nCPU(s):              224\nOn-line CPU(s) list: 0-223\nThread(s) per core:  2\nCore(s) per socke",
    "url": "https://github.com/pytorch/pytorch/issues/151746",
    "state": "open",
    "labels": [
      "oncall: pt2",
      "export-triaged",
      "oncall: export",
      "module: aotinductor",
      "module: user triton"
    ],
    "created_at": "2025-04-19T13:26:03Z",
    "updated_at": "2025-04-25T23:11:04Z",
    "user": "zzq96"
  },
  {
    "repo": "pytorch/executorch",
    "number": 10314,
    "title": "This document\uff08https://pytorch.org/executorch/stable/demo-apps-android.html#running-the-app\uff09 is out of date. Where is examples/demo-apps/android/ExecuTorchDemo?",
    "body": "https://pytorch.org/executorch/stable/demo-apps-android.html#running-the-app\n\n![Image](https://github.com/user-attachments/assets/73116d1b-fb01-4263-9adc-ae1aeb8e7a06)\n\n![Image](https://github.com/user-attachments/assets/7076302d-364d-4b71-b990-6cec92fe52a0)\n\ncc @mergennachin @iseeyuan @lucylq @helunwencser @tarun292 @kimishpatel @jackzhxng",
    "url": "https://github.com/pytorch/executorch/issues/10314",
    "state": "closed",
    "labels": [
      "module: examples"
    ],
    "created_at": "2025-04-19T09:36:52Z",
    "updated_at": "2025-12-23T20:39:22Z",
    "user": "Kennems"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 1000,
    "title": "How to implement a new policy?",
    "body": "How can I integrate a new policy (e.g., OpenVLA) into LeRobot, and specifically, which files do I need to modify?",
    "url": "https://github.com/huggingface/lerobot/issues/1000",
    "state": "closed",
    "labels": [
      "enhancement",
      "policies"
    ],
    "created_at": "2025-04-19T08:53:48Z",
    "updated_at": "2025-07-29T14:30:18Z",
    "user": "Elycyx"
  },
  {
    "repo": "huggingface/prettier-plugin-vertical-align",
    "number": 2,
    "title": "how to use",
    "body": "https://github.com/huggingface/prettier-plugin-vertical-align#installation\n\nAdd plugins: [\"@huggingface/prettier-plugin-vertical-align\"] to your .prettierrc file.\n\nAre you sure to .prettierrc file?",
    "url": "https://github.com/huggingface/prettier-plugin-vertical-align/issues/2",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-19T04:15:29Z",
    "updated_at": "2025-04-24T02:53:42Z",
    "user": "twotwoba"
  },
  {
    "repo": "pytorch/xla",
    "number": 9002,
    "title": "Update debugger documentation to demonstrate lldb",
    "body": "It's possible lldb is faster than gdb. Feature request is to explore if that is true, and if so, write docs on how to use lldb command line and lldb in VSCode.\n\nThis is an enhancement of #8997 ",
    "url": "https://github.com/pytorch/xla/issues/9002",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-04-18T16:28:50Z",
    "updated_at": "2025-04-21T12:33:58Z",
    "comments": 0,
    "user": "yaoshiang"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 997,
    "title": "how to convert pi0 fast",
    "body": "i just meet pi0 convert, how to convert pi0 fast\n![Image](https://github.com/user-attachments/assets/ca6b8c52-4000-478e-88a0-501f0ce3c205)\n",
    "url": "https://github.com/huggingface/lerobot/issues/997",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-18T14:27:29Z",
    "updated_at": "2025-10-14T14:06:30Z",
    "user": "ximiluuuu"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11359,
    "title": "[Feature request] LTX-Video v0.9.6 15x faster inference than non-distilled model.",
    "body": "**Is your feature request related to a problem? Please describe.**\nNo problem. This request is Low priority. As and when time allows.\n\n**Describe the solution you'd like.**\nPlease support the new release of LTX-Video 0.9.6\n\n**Describe alternatives you've considered.**\nOriginal repo have support but it is easier to use with diffusers\n\n**Additional context.**\nApril, 15th, 2025: New checkpoints v0.9.6:\nRelease a new checkpoint [ltxv-2b-0.9.6-dev-04-25](https://huggingface.co/Lightricks/LTX-Video/blob/main/ltxv-2b-0.9.6-dev-04-25.safetensors) with improved quality\nRelease a new distilled model [ltxv-2b-0.9.6-distilled-04-25](https://huggingface.co/Lightricks/LTX-Video/blob/main/ltxv-2b-0.9.6-distilled-04-25.safetensors)\n15x faster inference than non-distilled model.\nDoes not require classifier-free guidance and spatio-temporal guidance.\nSupports sampling with 8 (recommended), 4, 2 or 1 diffusion steps.\nImproved prompt adherence, motion quality and fine details.\nNew default resolution and FPS: 1216 \u00d7 704 pixels at 30 FPS\nStill real time on H100 with the distilled model.\nOther resolutions and FPS are still supported.\nSupport stochastic inference (can improve visual quality when using the distilled model)\nhttps://github.com/Lightricks/LTX-Video\n\nFeedback on distilled model\nhttps://www.reddit.com/r/StableDiffusion/comments/1k1xk1m/6_seconds_video_in_60_seconds_in_this_quality_is/\n\nhttps://www.reddit.com/r/StableDiffusion/comments/1k1o4x8/the_new_ltxvideo_096_distilled_model_is_actually/",
    "url": "https://github.com/huggingface/diffusers/issues/11359",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-18T08:05:27Z",
    "updated_at": "2025-05-09T16:03:34Z",
    "comments": 6,
    "user": "nitinmukesh"
  },
  {
    "repo": "pytorch/xla",
    "number": 8997,
    "title": "Add guide to debugging",
    "body": "For now, it can cover just PyTorch pending #8996 ",
    "url": "https://github.com/pytorch/xla/issues/8997",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-04-17T18:30:31Z",
    "updated_at": "2025-04-20T08:01:29Z",
    "comments": 0,
    "user": "yaoshiang"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1291,
    "title": "@xenova/transformers vs. @huggingface/transformers npm package",
    "body": "### Question\n\nIt's pretty confusing to have both of these on npm. Which are we supposed to use?\n\nCan you please deprecate the one that we aren't supposed to use? (`npm deprecate`)",
    "url": "https://github.com/huggingface/transformers.js/issues/1291",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-17T16:10:36Z",
    "updated_at": "2025-10-24T10:19:03Z",
    "user": "nzakas"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3510,
    "title": "Accelerate Config Error - How to debug this?",
    "body": "### System Info\n\n```Shell\npip list\n\nabsl-py                  2.2.2\naccelerate               1.6.0\nannotated-types          0.7.0\nbitsandbytes             0.45.5\ndiffusers                0.33.0.dev0 /data/roy/diffusers\nftfy                     6.3.1\nhuggingface-hub          0.30.2\nnumpy                    2.2.4\nnvidia-cublas-cu12       12.4.5.8\nnvidia-cuda-cupti-cu12   12.4.127\nnvidia-cuda-nvrtc-cu12   12.4.127\nnvidia-cuda-runtime-cu12 12.4.127\nnvidia-cudnn-cu12        9.1.0.70\nnvidia-cufft-cu12        11.2.1.3\nnvidia-curand-cu12       10.3.5.147\nnvidia-cusolver-cu12     11.6.1.9\nnvidia-cusparse-cu12     12.3.1.170\nnvidia-cusparselt-cu12   0.6.2\nnvidia-nccl-cu12         2.21.5\nnvidia-nvjitlink-cu12    12.4.127\nnvidia-nvtx-cu12         12.4.127\npackaging                24.2\npeft                     0.15.2\npip                      22.0.2\nprotobuf                 5.29.4\nsafetensors              0.5.3\nsetuptools               59.6.0\ntokenizers               0.21.1\ntorch                    2.6.0\ntorchvision              0.21.0\ntransformers             4.51.3\ntriton                   3.2.0\nwandb                    0.19.9\n... etc\n\n\nnvidia-smi\n\n+-----------------------------------------------------------------------------------------+\n| NVIDIA-SMI 570.124.06             Driver Version: 570.124.06     CUDA Version: 12.8     |\n|-----------------------------------------+------------------------+----------------------+\n| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |\n| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |\n|                                         |                        |               MIG M. |\n|=========================================+========================+======================|\n|   0  NVIDIA H100 PCIe               Off |   00000000:2E:00.0 Off |                    0 |\n| N/A   43C    P0             84W /  350W |   16460MiB /  81559MiB |    100%      Default |\n|                                         |                        |             Disabled |\n+-----------------------------------------+------------------------+----------------------+\n|   1  NVIDIA H100 PCIe               Off |   00000000:30:00.0 Off |                    0 |\n| N/A   45C    P0             89W /  350W |   11456MiB /  81559MiB |    100%      Default |\n|                                         |                        |             Disabled |\n+-----------------------------------------+------------------------+----------------------+\n|   2  NVIDIA H100 PCIe               Off |   00000000:3F:00.0 Off |                    0 |\n| N/A   40C    P0             86W /  350W |   11384MiB /  81559MiB |    100%      Default |\n|                                         |                        |             Disabled |\n+-----------------------------------------+------------------------+----------------------+\n|   3  NVIDIA H100 PCIe               Off |   00000000:41:00.0 Off |                    0 |\n| N/A   36C    P0             47W /  350W |       1MiB /  81559MiB |      0%      Default |\n|                                         |                        |             Disabled |\n+-----------------------------------------+------------------------+----------------------+\n|   4  NVIDIA H100 PCIe               Off |   00000000:B0:00.0 Off |                    0 |\n| N/A   46C    P0             87W /  350W |   11384MiB /  81559MiB |    100%      Default |\n|                                         |                        |             Disabled |\n+-----------------------------------------+------------------------+----------------------+\n|   5  NVIDIA H100 PCIe               Off |   00000000:B1:00.0 Off |                    0 |\n| N/A   39C    P0             48W /  350W |       1MiB /  81559MiB |      0%      Default |\n|                                         |                        |             Disabled |\n+-----------------------------------------+------------------------+----------------------+\n|   6  NVIDIA H100 PCIe               Off |   00000000:C1:00.0 Off |                    0 |\n| N/A   35C    P0             52W /  350W |       1MiB /  81559MiB |      0%      Default |\n|                                         |                        |             Disabled |\n+-----------------------------------------+------------------------+----------------------+\n|   7  NVIDIA H100 PCIe               Off |   00000000:C2:00.0 Off |                    0 |\n| N/A   35C    P0             51W /  350W |       1MiB /  81559MiB |      0%      Default |\n|                                         |                        |             Disabled |\n+-----------------------------------------+------------------------+----------------------+\n                                                                                         \n+-----------------------------------------------------------------------------------------+\n| Processes:                                                                ",
    "url": "https://github.com/huggingface/accelerate/issues/3510",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-17T11:12:50Z",
    "updated_at": "2025-05-19T08:46:12Z",
    "user": "KihongK"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3478,
    "title": "\u2753 [Question] Is SAM2 supported when compiling with the Dynamo backend on JetPack 6.1 or 6.2?",
    "body": "## \u2753 Question\nWill SAM2 be compatible with the Dynamo backend on JetPack 6.1/6.2?\n\nAre there any workarounds for the TensorRT version mismatch?\n\n## What you have already tried\n\nHere are my attempts and issues encountered, my device is jetson AGX Orin, I only compile the ImageEncoder (Hiera & FPN which remove position_encoding) of SAM2, the SAM2 code is from https://github.com/chohk88/sam2/tree/torch-trt:\n\n\n**_JetPack 6.1 + PyTorch 2.5 (from https://developer.download.nvidia.cn) + Torch-TensorRT 2.5_**\n\nTried compiling SAM2 but encountered errors.\n\nObserved that the PyTorch 2.5 documentation does not mention SAM2 support, likely indicating SAM2 is not yet adapted for this version.\n\n**_JetPack 6.1 + PyTorch 2.6 (from https://pypi.jetson-ai-lab.dev/jp6/cu126) + Torch-TensorRT 2.6_**\n\nInstalled PyTorch 2.6 from [jp6/cu126](https://pypi.jetson-ai-lab.dev/jp6/cu126) and Torch-TensorRT 2.6.\n\nImporting torch_tensorrt failed with ModuleNotFoundError: No module named 'tensorrt.plugin'.\n\nRoot cause: Torch-TensorRT 2.6 requires TensorRT 10.7, but JetPack 6.1 provides only TensorRT 10.3.\n\nFound no straightforward way to upgrade TensorRT within JetPack 6.1 due to dependency conflicts.\n\n_**Cross-Platform Attempt: Compile on x86 + Run on JetPack 6.1**_\n\nCompiled SAM2 on x86 with Torch-TensorRT 2.6 and exported the model.\n\nTried running it on JetPack 6.1 with Torch-TensorRT 2.5.\n\nFailed unsurprisingly due to serialization version incompatibility between 2.6 and 2.5.\n\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3478",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-17T08:32:07Z",
    "updated_at": "2025-06-28T07:09:31Z",
    "user": "AyanamiReiFan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11351,
    "title": "Why Wan i2v video processor always float32 datatype?",
    "body": "### Describe the bug\n\nI found   \n\nimage = self.video_processor.preprocess(image, height=height, width=width).to(device, dtype=torch.float32)\n\nhttps://github.com/huggingface/diffusers/blob/29d2afbfe2e09a4ee7cc51455e51ce8b8c0e252d/src/diffusers/pipelines/wan/pipeline_wan_i2v.py#L633\n\nin pipeline_wan_i2v.py\n\nwhy datatype always float32, maybe it's a bug\n\n### Reproduction\n\njust run \n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nany platform\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11351",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-04-17T07:00:42Z",
    "updated_at": "2025-05-07T03:48:24Z",
    "comments": 2,
    "user": "DamonsJ"
  },
  {
    "repo": "pytorch/xla",
    "number": 8993,
    "title": "Is there a way to attach metadata to a layer in a way that is included in the StableHLO export?",
    "body": "## \u2753 Questions and Help\n\nI am looking at a use case where metadata about a trained model's layers needs to be attached to the StableHLO export. I am using `exported_program_to_stablehlo`\n\nOne option I had considered is exporting the data completely separately from `exported_program_to_stablehlo` (say, by writing some random json to disk), but then I don't know how to connect the written metadata back to the stableHLO export, because the layer names do not appear to be attached to the generated StableHLO ops such.\n\nAnother option I tried was to attach the metadata directly to the torch nodes before calling `exported_program_to_stablehlo`, but I can't figure out how to do so in a way that results in the metadata being exported as MLIR attributes. It would suffice to export the attributes as, e.g., an op attribute with a given string name and value.\n\nCould someone advise on whether this is possible, or suggest an alternative? (Or add a feature that would support this?)",
    "url": "https://github.com/pytorch/xla/issues/8993",
    "state": "open",
    "labels": [
      "question",
      "stablehlo"
    ],
    "created_at": "2025-04-17T06:04:47Z",
    "updated_at": "2025-04-25T00:44:25Z",
    "user": "j2kun"
  },
  {
    "repo": "huggingface/transformers",
    "number": 37570,
    "title": "How to streaming output audio of Qwen2.5-omni-7b",
    "body": "All the examples of qwen2.5-omni-7b did not show how to streaming output audio, with passing streamer, I am able to get streaming text, but how can I get the streaming audio output?",
    "url": "https://github.com/huggingface/transformers/issues/37570",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-17T04:16:35Z",
    "updated_at": "2025-07-30T08:03:44Z",
    "user": "qinxuye"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3332,
    "title": "Tutorial mention of batch samples as features?",
    "body": "Hello kindly confirm if it is correct to say that the batch_size =64 will give 64 features and 64 labels. Arent there 28 by 28 features and 64 samples ? \n\n\n<img width=\"903\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/7fe5d741-58c9-404a-a181-145e2bbfc086\" />\n",
    "url": "https://github.com/pytorch/tutorials/issues/3332",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-17T02:35:14Z",
    "updated_at": "2025-04-17T02:35:58Z",
    "comments": 0,
    "user": "monaja"
  },
  {
    "repo": "pytorch/xla",
    "number": 8986,
    "title": "When trying to run this code with connection to tpu in google colab i had this error: AssertionError: 4 results for replica 0",
    "body": "## \u2753 Questions and Help\n\nWhen trying to run this code in google colab:\n\n```import os\nimport torch_xla\nimport torch_xla.core.xla_model as xm\nimport torch_xla.distributed.xla_multiprocessing as xmp\nimport torch_xla.runtime as xr\nimport torchvision\nimport multiprocessing as mp\n\nos.environ['TPU_NUM_DEVICES'] = '8'\nos.environ ['XLA_USE_SPMD'] = '1'\nos.environ ['XLA_TENSOR_ALLOCATOR_MAXSIZE'] = '8G'\n\nlock = mp.Manager().Lock()\n\ndef _mp_fn(i, lock, device):\n    with lock:\n        pass\n\n    print(f\"Process {i}: device = {device} (BEFORE RETURN)\")\n    return i, device\n\nif __name__ == '__main__':\n    nprocs = None \n    device = xm.xla_device()\n    print(f\"Main process device: {device}\") \n\n    results = xmp.spawn(_mp_fn, args=(lock, device), start_method='fork', nprocs=nprocs) \n    print(\"Results:\")\n    for key, value in results.items():\n        print(f\"  Key: {key}, Value: {value}\")\n\n    for i, device in results.items():\n        print('process', i, device)```\n\nI get this error:\n\n```Main process device: xla:0\nProcess 0: device = xla:0 (BEFORE RETURN)\nProcess 0: device = xla:0 (BEFORE RETURN)Process 0: device = xla:0 (BEFORE RETURN)\n\nProcess 0: device = xla:0 (BEFORE RETURN)\n---------------------------------------------------------------------------\nAssertionError                            Traceback (most recent call last)\n<ipython-input-1-60755fe4d950> in <cell line: 0>()\n     27     print(f\"Main process device: {device}\")\n     28 \n---> 29     results = xmp.spawn(_mp_fn, args=(lock, device), start_method='fork', nprocs=nprocs) #\u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c device\n     30     print(\"Results:\")\n\n3 frames\n/usr/local/lib/python3.11/dist-packages/torch_xla/distributed/xla_multiprocessing.py in spawn(fn, args, nprocs, join, daemon, start_method)\n     37     return None.\n     38   \"\"\"\n---> 39   return pjrt.spawn(fn, nprocs, start_method, args)\n     40 \n     41 \n\n/usr/local/lib/python3.11/dist-packages/torch_xla/_internal/pjrt.py in spawn(fn, nprocs, start_method, args)\n    211         % nprocs)\n    212 \n--> 213   run_multiprocess(spawn_fn, start_method=start_method)\n    214 \n    215 \n\n/usr/local/lib/python3.11/dist-packages/torch_xla/_internal/pjrt.py in run_multiprocess(fn, start_method, *args, **kwargs)\n    171             result.items() for result in process_results))\n    172 \n--> 173   return _merge_replica_results(replica_results)\n    174 \n    175 \n\n/usr/local/lib/python3.11/dist-packages/torch_xla/_internal/pjrt.py in _merge_replica_results(replica_results)\n     37       ordinal for ordinal, _ in replica_results)\n     38   replica, num_results = replica_counts.most_common(1)[0]\n---> 39   assert num_results == 1, f'{num_results} results for replica {replica}'\n     40 \n     41   return dict(replica_results)\n\nAssertionError: 4 results for replica 0```\n\nAs first I tryed many diffrent versions, but it didn't help:\n\n```!pip install -U pip\n!pip install cloud-tpu-client==0.10\n\n!pip install torch~=2.1.0 'torch_xla[tpu]~=2.1.0' \\\n  -f https://storage.googleapis.com/libtpu-releases/inde6x.html \\\n  -f https://storage.googleapis.com/libtpu-wheels/index.html```\n\nWhat should I do, how to fix it. I tried many different ways to connect tpu but I still couldn't connect normally and start training",
    "url": "https://github.com/pytorch/xla/issues/8986",
    "state": "closed",
    "labels": [
      "question",
      "xla:tpu"
    ],
    "created_at": "2025-04-16T11:56:22Z",
    "updated_at": "2025-04-18T12:11:07Z",
    "user": "Neckto0"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11339,
    "title": "How to multi-GPU WAN inference",
    "body": "Hi,I didn't find multi-gpu inferences  example in the documentation. Can you give me an example, such as Wan2.1-I2V-14B-720P-Diffusers.\nI would appreciate some help on that, thank you in advance",
    "url": "https://github.com/huggingface/diffusers/issues/11339",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2025-04-16T10:22:41Z",
    "updated_at": "2025-07-05T21:18:01Z",
    "user": "HeathHose"
  },
  {
    "repo": "huggingface/trl",
    "number": 3295,
    "title": "i have 2 gpu\uff0cbut default gpu:0,How to specify a gpu:1 for training?",
    "body": "### Reproduction\n\n```python\nfrom trl import ...\n\n```\n\noutputs:\n\n```\nTraceback (most recent call last):\n  File \"example.py\", line 42, in <module>\n    ...\n```\n\n\n### System Info\n\ni have 2 gpu\uff0cbut default gpu:0,How to specify a gpu:1 for training?\n\n### Checklist\n\n- [x] I have checked that my issue isn't already filed (see [open issues](https://github.com/huggingface/trl/issues?q=is%3Aissue))\n- [x] I have included my system information\n- [x] Any code provided is minimal, complete, and reproducible ([more on MREs](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks))\n- [x] Any code provided is properly formatted in code blocks, (no screenshot, [more on code blocks](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks))\n- [x] Any traceback provided is complete",
    "url": "https://github.com/huggingface/trl/issues/3295",
    "state": "closed",
    "labels": [
      "\u2753 question",
      "\ud83d\udcf1 cli"
    ],
    "created_at": "2025-04-15T08:29:26Z",
    "updated_at": "2025-04-24T19:46:37Z",
    "user": "Aristomd"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 981,
    "title": "How can I simulate robots without physical robots? How should I learn simulation robots? Do you have any good recommendations?",
    "body": "How can I simulate robots without physical robots? How should I learn simulation robots? Do you have any good recommendations?I am a beginner.",
    "url": "https://github.com/huggingface/lerobot/issues/981",
    "state": "closed",
    "labels": [
      "question",
      "simulation"
    ],
    "created_at": "2025-04-15T04:04:33Z",
    "updated_at": "2025-10-17T11:19:34Z",
    "user": "harryhu0301"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11321,
    "title": "flux controlnet train  ReadMe have a bug",
    "body": "### Describe the bug\n\n![Image](https://github.com/user-attachments/assets/bc20df10-80b0-46fa-b013-799a3b1865b4)\n\nwhat is the controlnet config parameters?  text is num_single_layers = 10, but the code set num_single_layers=0?\n\n### Reproduction\n\ncheck readme file\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\ndiffusers ==0.33.0\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11321",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2025-04-15T01:30:58Z",
    "updated_at": "2025-10-11T09:58:52Z",
    "comments": 14,
    "user": "Johnson-yue"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 428,
    "title": "[QUESTION] Current schedule is non-sensical",
    "body": "First, the **best way to get a response fast is to ask the community** in our Discord server: https://www.hf.co/join/discord\n\nHowever, if you prefer you can ask here, please **be specific**.\n\nThe course page states:\n\n> There\u2019s a deadline for the certification process: all the assignments must be finished before May 1st 2025.\n\nBut the \"when will the next units be published\" graph doesn't have Unit 4 even being released until \"The end of April\". And as of today (April 14, 2025) we still have no idea what any of the \"use case assignments\" are. As it stands, it appears to be impossible to actually complete this course.\n\n\nAnd no one from Hugging Face seems to be answering, or even acknowledging, any questions on this topic. It would be nice to get some clarity / updates.\n",
    "url": "https://github.com/huggingface/agents-course/issues/428",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-14T18:13:31Z",
    "updated_at": "2025-04-28T06:51:58Z",
    "user": "mindcrime"
  },
  {
    "repo": "pytorch/audio",
    "number": 3899,
    "title": "Segmentation fault (core dumped)  in torchaudio.io.AudioEffector",
    "body": "### \ud83d\udc1b Describe the bug\n\nOccasionally, a core dump error may occur with a specific audio file as input, which a Python exception cannot capture.\n\nThis error is rare, but when it does occur, the entire Python process will be killed. It only happens with some \u201dspecial audio\u201d. Unfortunately, I did not find out what the special was.\n\nHow to reproduce:\n1. Download the numpy array that causes the core dump in my environment.\n\n[a.npy.zip](https://github.com/user-attachments/files/19736212/a.npy.zip)\n\n2. Run the following code:\n\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport numpy\nfrom torchaudio.io import AudioEffector, CodecConfig\nimport torch\n\nmodule = AudioEffector(\nformat='ogg',\nencoder='opus',\ncodec_config=CodecConfig(qscale=1),\npad_end=True,)\n\n\naudio = numpy.load('./a.npy')\n\n\noutput = module.apply(torch.from_numpy(audio), 44100).numpy()\n```\n\n\n```\n[W414 21:10:43.989426875 encode_process.cpp:179] Warning: \"opus\" encoder is selected. Enabling '-strict experimental'. If this is not desired, please provide \"strict\" encoder option with desired value. (function operator())\n[1]    2613659 segmentation fault (core dumped)  python debug.py\n```\n\nMy python and package versions:\n```\nnumpy                    2.0.2\ntorch                    2.6.0\ntorch-complex            0.4.4\ntorchaudio               2.6.0\n```\n\n\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.6.0+cu124\nIs debug build: False\nCUDA used to build PyTorch: 12.4\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.2 LTS (x86_64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0\nClang version: Could not collect\nCMake version: version 3.28.3\nLibc version: glibc-2.39\n\nPython version: 3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-6.11.0-21-generic-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: Could not collect\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 4090\nNvidia driver version: 550.120\ncuDNN version: Could not collect\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        48 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               32\nOn-line CPU(s) list:                  0-31\nVendor ID:                            AuthenticAMD\nModel name:                           AMD Ryzen 9 9950X 16-Core Processor\nCPU family:                           26\nModel:                                68\nThread(s) per core:                   2\nCore(s) per socket:                   16\nSocket(s):                            1\nStepping:                             0\nFrequency boost:                      enabled\nCPU(s) scaling MHz:                   67%\nCPU max MHz:                          5752.0000\nCPU min MHz:                          600.0000\nBogoMIPS:                             8599.98\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk avx_vnni avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid bus_lock_detect movdiri movdir64b overflow_recov succor smca fsrm avx512_vp2intersect flush_l1d amd_lbr_pmc_freeze\nVirtualization:                       AMD-V\nL1d cache:                            768 KiB (16 instances)\nL1i cache:                            512 KiB (16 instances)\nL2 cache:                             16 MiB (16 instances)\nL3 cache:                             64 MiB (2 instances)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-31\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected",
    "url": "https://github.com/pytorch/audio/issues/3899",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-14T13:20:04Z",
    "updated_at": "2025-04-14T13:20:56Z",
    "comments": 0,
    "user": "LiChenda"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 975,
    "title": "[Question] How to modify model & dataset to accept two input images in observation.image?",
    "body": "Hi, thank you for the great repo!\n\nI\u2019ve been going through the first three examples, and now I\u2019d like to explore training a diffusion policy with some customized input. Specifically:\n\nMy goal:\nI want each observation.image to contain two images as input (they have the same shape as the original single image).\n\nI want the output of the model to remain the same as in the original diffusion policy.\n\nMy question:\nSince I\u2019m new to this repo, I\u2019d like to ask for guidance on what needs to be modified to support this:\n\nModel architecture: which parts of the model code should I look at or modify to handle a double-image input?\n\nDataset / Data loading: where should I modify the dataset to provide observation.image with two images instead of one?\n\nAre there any other components I should be aware of (e.g., pre-processing, normalization, config changes, etc.)?\n\nAny advice or pointers to relevant parts of the code would be greatly appreciated!\n\nThanks in advance \ud83d\ude4f",
    "url": "https://github.com/huggingface/lerobot/issues/975",
    "state": "closed",
    "labels": [
      "dataset",
      "stale"
    ],
    "created_at": "2025-04-14T08:35:47Z",
    "updated_at": "2025-11-04T02:30:23Z",
    "user": "Keith-Luo"
  },
  {
    "repo": "huggingface/candle",
    "number": 2893,
    "title": "How to build a multi-node inference/training in candle?",
    "body": "Hi team,\n\nI'd like to have an example on mulit-node inference/training of candle, how can I find it?\n\nThanks :)\n\n-- Klaus",
    "url": "https://github.com/huggingface/candle/issues/2893",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-14T08:03:20Z",
    "updated_at": "2025-04-14T08:03:20Z",
    "user": "k82cn"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1795,
    "title": "Offline Custom Tools",
    "body": "Would it be possible to define/use tools that the LLMs can use in an offline state?\n\n\"Tools must use Hugging Face Gradio Spaces as we detect the input and output types automatically from the [Gradio API](https://www.gradio.app/guides/sharing-your-app#api-page).\"\n\n\nIs there any reason that the tools can't be hosted locally with the same ability for the LLM to use?",
    "url": "https://github.com/huggingface/chat-ui/issues/1795",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-04-14T02:41:19Z",
    "updated_at": "2025-04-14T02:41:19Z",
    "comments": 0,
    "user": "cr-intezra"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1794,
    "title": "Docker Image and Local Install missing file/image/etc upload",
    "body": "I've used the chat-ui-db:latest image as well as cloning the repo, setting up mongo and npm install/run dev and the UI I get does not have the icons or ability to upload in image or file. It only has the web search button.\n\nThis would be for release 0.9.4.\n\nIs there something in .env.local that I am missing to enable this feature?\n\nOtherwise the chat-ui works as intended, I am able to use different models but wanted to test the ability to use a vision model.\n\n![Image](https://github.com/user-attachments/assets/92c3117b-0f8e-467f-91e7-7ca4f7b95539)",
    "url": "https://github.com/huggingface/chat-ui/issues/1794",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-13T19:30:29Z",
    "updated_at": "2025-04-13T19:30:29Z",
    "comments": 0,
    "user": "cr-intezra"
  },
  {
    "repo": "pytorch/audio",
    "number": 3898,
    "title": "forcing other not allowed frequencies to be accepted",
    "body": "I'm trying to work with frequencies below 20hz, preferably at 18,98hz but as the documentation says it only supports above 4000, 8000, and 9000. Even though is there a way to force torch to work with my desire frequency?? please",
    "url": "https://github.com/pytorch/audio/issues/3898",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-13T15:31:41Z",
    "updated_at": "2025-04-13T15:31:41Z",
    "comments": 0,
    "user": "andrewessel"
  },
  {
    "repo": "pytorch/xla",
    "number": 8968,
    "title": "Alternative to torch.select_mask",
    "body": "## \u2753 Questions and Help\n\nMost of the time we can adapted routines to avoid graph recompilations, however there is instance where this is a bit tricky. \n\nWhen computing a masked mean, we are currently using sum and valids as follows:\n\n```\nreplaced = input_tensor*is_valid\nsum_valid = replaced.sum()\nn_valid = is_valid.sum(dtype=input_tensor.dtype)\nreturn torch.nan_to_num(sum_valid / n_valid)\n```\n\nWhere valid is 0 or 1 if the entry is in the dataset. \n\nThis effectively calculates the mean while ignoring zeros. This works well when the data  is close to full in most examples. However in some instance we insert sparse data that have a reduced is_valid that is consistent across the data set. The result is that the 0 entries in the is_valid are reinforced, and when testing against the test of sparse data, it won't predict the other entries. \n\nTo avoid this - we have historically used torch.select_mask, which only selects the non-zero entries and the gradients only back prop. through those - basically we don't get the reinforced 0-0. \n\nI'm wondering if there is an alternative or work around to torch.select_mask as this increases computation time by ~6X because of the frequent recompilations.\n\nThank you again for this awesome tool and let me know if you have any questions. \n",
    "url": "https://github.com/pytorch/xla/issues/8968",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-13T14:38:55Z",
    "updated_at": "2025-05-01T20:31:05Z",
    "user": "ttdd11"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2228,
    "title": "Unable to convert an audio-to-audio model.",
    "body": "### Feature request\n\n``` bash\noptimum-cli export onnx --model microsoft/speecht5_vc speecht5_vc_onnx/\n```\n\nOutput:\n\n``` log\nThe cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.\n0it [00:00, ?it/s]\nTraceback (most recent call last):\n  File \"/usr/local/bin/optimum-cli\", line 8, in <module>\n    sys.exit(main())\n             ^^^^^^\n  File \"/usr/local/lib/python3.12/dist-packages/optimum/commands/optimum_cli.py\", line 208, in main\n    service.run()\n  File \"/usr/local/lib/python3.12/dist-packages/optimum/commands/export/onnx.py\", line 265, in run\n    main_export(\n  File \"/usr/local/lib/python3.12/dist-packages/optimum/exporters/onnx/__main__.py\", line 296, in main_export\n    raise ValueError(\nValueError: Asked to export a speecht5 model for the task audio-to-audio (auto-detected), but the Optimum ONNX exporter only supports the tasks text-to-audio for speecht5. Please use a supported task. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the task audio-to-audio to be supported in the ONNX export for speecht5.\n```\n\n### Motivation\n\nMy primary objective is to convert Hugging Face models to TensorRT, but according to the documentation I've reviewed, ONNX must be used as an intermediate step\n\n### Your contribution\n\nI don't believe I have the technical capability to implement this feature.",
    "url": "https://github.com/huggingface/optimum/issues/2228",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2025-04-13T00:50:26Z",
    "updated_at": "2025-05-18T02:17:06Z",
    "comments": 1,
    "user": "divinerapier"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 971,
    "title": "Can different robotic arms share the same dataset and model?",
    "body": "English\uff1a\nI currently have datasets and models for the Koch, SO100, and ALOHA robotic arms. Is it possible for these three arms to share the same dataset and model? If so, how should this be implemented? If not\u2014given the significant hardware differences\u2014what is the practical value of data sharing in this context?\n@Cadene \n\n\u4e2d\u6587\uff1a\n\u6211\u8fd9\u91cc\u6709koch\u3001so100\u3001alhoa\u7684\u6570\u636e\u96c6\u548c\u6a21\u578b\uff0c\u4e09\u6b3e\u673a\u68b0\u81c2\u80fd\u5171\u7528\u6570\u636e\u96c6\u5408\u6a21\u578b\u4e48\uff1f\u5982\u679c\u80fd\uff0c\u600e\u4e48\u7528\uff1f\u5982\u679c\u4e0d\u80fd\uff0c\u90a3\u786c\u4ef6\u5343\u5dee\u4e07\u522b\uff0c\u6570\u636e\u5171\u4eab\u7684\u610f\u4e49\u4f55\u5728\uff1f\n",
    "url": "https://github.com/huggingface/lerobot/issues/971",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2025-04-12T05:03:27Z",
    "updated_at": "2025-10-17T12:06:45Z",
    "user": "ZhangWuWei"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3469,
    "title": "\u2753 [Question] How wo you export a triton kernel with model to a serialized engine that can be run in c++?",
    "body": "## \u2753 Question\n\n<!-- Your question -->\nHow wo you export a triton kernel with model to a serialized engine that can be run in c++?\n\n## What you have already tried\nRead through python examples.\n\n<!-- A clear and concise description of what you have already done. -->\n\n## Environment\n\n> Build information about Torch-TensorRT can be found by turning on debug messages\n\n - PyTorch Version (e.g., 1.0):\n - CPU Architecture:\n - OS (e.g., Linux):\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\n - Build command you used (if compiling from source):\n - Are you using local sources or building from archives:\n - Python version:\n - CUDA version:\n - GPU models and configuration:\n - Any other relevant information:\n\n## Additional context\n\n<!-- Add any other context about the problem here. -->\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3469",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-11T16:53:33Z",
    "updated_at": "2025-12-12T01:58:55Z",
    "user": "cmgreen210"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 881,
    "title": "Accelerators: Error fetching data. how to troubleshoot",
    "body": "\nGetting this error message when trying to train my model using Autotrain\n\n\nAccelerators: Error fetching data\nError fetching training status\n\n\nMy data file is a csv & correctly formatted. \nWhat are possible ways to troubleshoot this problem?\nI'm new to fine-tuning so would love any assistance ",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/881",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2025-04-11T16:04:12Z",
    "updated_at": "2025-06-02T15:02:09Z",
    "user": "innerspacestudio"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1093,
    "title": "why is shard(1) in the colwiseparallel for lm head?",
    "body": "I found ColwiseParallel here for output linear layer has input_layout Shard(1). In that way, the input will be sharded accross different devices in the sequence dimension, and also the linear layer's output dimension (e.g., vocab dimension) has also been distributed? Is that something desired? Because on my understanding, it should be ColwiseParallel(input_layouts=Replicate(), output_layouts=Shard(-1) if loss_parallel else Replicate(), use_local_output=not loss_parallel)\n\n\n`\nparallelize_module(\n\n        model,\n        tp_mesh,\n        {\n            \"tok_embeddings\": RowwiseParallel(\n                input_layouts=Replicate(),\n                output_layouts=Shard(1),\n            ),\n            \"norm\": SequenceParallel(),\n            \"output\": ColwiseParallel(\n                input_layouts=Shard(1),\n                output_layouts=Shard(-1) if loss_parallel else Replicate(),\n                use_local_output=not loss_parallel,\n            ),\n        },\n\n",
    "url": "https://github.com/pytorch/torchtitan/issues/1093",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-11T11:20:02Z",
    "updated_at": "2025-04-11T11:46:04Z",
    "comments": 0,
    "user": "wimh966"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1092,
    "title": "Step Time Increase Leading to NCCL Timeout with FSDP2",
    "body": "**Description**\nI am encountering an issue when using fsdp2 where step time significantly increases after a certain number of steps, leading to NCCL timeouts. Initially, each step takes around 2 seconds, as shown in the earlier logs. However, after reaching step 1800, most processes experience a noticeable increase in step time except for one. This behavior causes errors such as:\n```\n[rank3]:[E410 14:46:34.629385703 ProcessGroupNCCL.cpp:684] [Rank 3] Some NCCL operations have failed or timed out. Due to the asynchronous nature of CUDA kernels, subsequent GPU operations might run on corrupted/incomplete data.\n[rank3]:[E410 14:46:34.629438241 ProcessGroupNCCL.cpp:698] [Rank 3] To avoid data inconsistency, we are taking the entire process down.\n[rank3]:[E410 14:46:34.630696293 ProcessGroupNCCL.cpp:1896] [PG ID 0 PG GUID 0(default_pg) Rank 3] Process group watchdog thread terminated with exception: [Rank 3] Watchdog caught collective operation timeout: WorkNCCL(SeqNum=319682, OpType=_ALLGATHER_BASE, NumelIn=65667328, NumelOut=525338624, Timeout(ms)=100000) ran for 138169 milliseconds before timing out.\n```\n\nThe discrepancy in step time across processes seems to result in the NCCL operations timing out.\n\n**Observations**\nAt earlier steps (e.g., step 10), the step time is approximately 2.5 seconds across all processes.\n\nBy later steps  (e.g., step 1800), most processes experience longer step times except for one process, leading to the timeout error.\n\nMy training configuration (in TOML) is as follows:\n\n```\n[metrics]\nlog_freq = 1\nenable_tensorboard = true\nsave_tb_folder = \"tb\"\n\n[optimizer]\nname = \"AdamW\"\nlr = 1.5e-4\n\n[training]\nbatch_size = 1\nseq_len = 4096\nwarmup_steps = 2000\nmax_norm = 1.0\nsteps = 15000\ndata_parallel_replicate_degree = 1\ndata_parallel_shard_degree = -1\ntensor_parallel_degree = 1\ncompile = false\n\n[experimental]\ncontext_parallel_degree = 1\npipeline_parallel_degree = 1\n\n[checkpoint]\nenable_checkpoint = true\nfolder = \"checkpoint\"\ninterval_type = \"steps\"\ninterval = 15000\nmodel_weights_only = false\nexport_dtype = \"float32\"\nasync_mode = \"disabled\"\n```\n\nAre there any recommended solutions to solve this?\n\n![Image](https://github.com/user-attachments/assets/7b22f8ef-d16b-497d-9689-ccbc0b15bf24)\n\n![Image](https://github.com/user-attachments/assets/eabbb96e-5920-4410-b0a8-242fee7347f3)",
    "url": "https://github.com/pytorch/torchtitan/issues/1092",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-11T10:50:55Z",
    "updated_at": "2025-04-14T05:24:10Z",
    "user": "xhwang22"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1091,
    "title": "FSDP2 root level parameter management",
    "body": "Hi,\n\nI am curious about the design decision of managing both token embeddings and the final output layer at the root fsdp level instead of treating them as different layers like other transformer blocks?\n\nThis coupled management seems to unshard the final output layer too early and reshard the token embedding too late in forward for example.\n\nAlso for the optimization (see [here](https://github.com/pytorch/torchtitan/blob/main/torchtitan/models/llama3/parallelize_llama.py#L369)) that disables `reshard_after_forward` for the last transformer block layer, would it be more appropriate to perform this optimization on the final linear layer instead of the last transformer block?\n\nThanks!",
    "url": "https://github.com/pytorch/torchtitan/issues/1091",
    "state": "closed",
    "labels": [
      "question",
      "module: fsdp"
    ],
    "created_at": "2025-04-11T01:54:57Z",
    "updated_at": "2025-07-29T02:40:22Z",
    "user": "dingqingy"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 215,
    "title": "Use alignment-handbook on Apple Silicon",
    "body": "Hi, is it possible to install and use this tool on Apple Silicon? I am aware that certain dependencies, such as Flash Attention, do not work on Apple Silicon. Has anyone tried and successfully installed this tool without those dependencies?",
    "url": "https://github.com/huggingface/alignment-handbook/issues/215",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-11T01:28:02Z",
    "updated_at": "2025-04-27T01:09:55Z",
    "comments": 0,
    "user": "minhquoc0712"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 968,
    "title": "\u6ca1\u6709\u7269\u7406\u673a\u5668\u4eba\u6211\u5982\u4f55\u8fdb\u884c\u4eff\u771f\u673a\u5668\u4eba\uff0c\u6211\u5e94\u8be5\u5982\u4f55\u5b66\u4e60",
    "body": "\u6ca1\u6709\u7269\u7406\u673a\u5668\u4eba\u6211\u5982\u4f55\u8fdb\u884c\u4eff\u771f\u673a\u5668\u4eba\uff0c\u6211\u5e94\u8be5\u5982\u4f55\u5b66\u4e60\u4eff\u771f\u673a\u5668\u4eba\u5462\uff0c\u6709\u6ca1\u6709\u597d\u7684\u63a8\u8350\u5417",
    "url": "https://github.com/huggingface/lerobot/issues/968",
    "state": "closed",
    "labels": [
      "question",
      "simulation"
    ],
    "created_at": "2025-04-10T18:10:47Z",
    "updated_at": "2025-10-08T12:54:19Z",
    "user": "harryhu0301"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11285,
    "title": "value errors in convert to/from diffusers from original stable diffusion",
    "body": "### Describe the bug\n\nThere's a hardcode somewhere for 77 tokens, when it should be using the dimensions of what is actually in the model.\n\nI have a diffusers-layout SD1.5 model, with LongCLIP.\n\nhttps://huggingface.co/opendiffusionai/xllsd-alpha0\n\nI can pull it locally, then convert to single file format, with\n\npython convert_diffusers_to_original_stable_diffusion.py \\\n  --use_safetensors \\\n  --model_path $SRCM \\\n  --checkpoint_path $DESTM\n\nBut then if I try to convert it back, I get size errors for the text encoder not being 77 size.\n\n\nI should point out that the model WORKS PROPERLY for diffusion, when loaded in diffusers format, so I dont have some funky broken model here.\n\n\n\n### Reproduction\n\nfrom transformers import CLIPTextModel, CLIPTokenizer\n\nfrom diffusers import StableDiffusionPipeline, AutoencoderKL\nimport torch\n\n\npipe = StableDiffusionPipeline.from_single_file(\n        \"XLLsd-phase0.safetensors\",\n        torch_dtype=torch.float32,\n        use_safetensors=True)\n\n\noutname = \"XLLsd_recreate\"\npipe.save_pretrained(outname, safe_serialization=False)\n\n### Logs\n\n```shell\nvenv/lib/python3.12/site-packages/diffusers/models/model_loading_utils.py\", line 230, in load_model_dict_into_meta\n    raise ValueError(\nValueError: Cannot load  because text_model.embeddings.position_embedding.weight expected shape torch.Size([77, 768]), but got torch.Size([248, 768]). If you want to instead overwrite randomly initialized weights, please make sure to pass both `low_cpu_mem_usage=False` and `ignore_mismatched_sizes=True`. For more information, see also: https://github.com/huggingface/diffusers/issues/1619#issuecomment-1345604389 as an example.\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.32.2\n- Platform: Linux-6.8.0-55-generic-x86_64-with-glibc2.39\n- Running on Google Colab?: No\n- Python version: 3.12.3\n- PyTorch version (GPU?): 2.6.0+cu124 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.29.3\n- Transformers version: 4.50.0\n- Accelerate version: 1.5.2\n- PEFT version: not installed\n- Bitsandbytes version: 0.45.2\n- Safetensors version: 0.5.3\n- xFormers version: not installed\n- Accelerator: NVIDIA GeForce RTX 4090, 24564 MiB\n\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11285",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-04-10T17:16:42Z",
    "updated_at": "2025-05-12T15:03:03Z",
    "comments": 2,
    "user": "ppbrown"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11272,
    "title": "what is the difference between from diffusion import *** and from diffusers import ***?",
    "body": "I have installed diffusers and it runs ok, however the code gets wrong with \" no module named diffusion \"\nwhen goes to from diffusion import ***?\nWhat is the difference between from diffusion import *** and from diffusers import ***?\nNeed I install them all and what is the difference between diffusion and diffusers?",
    "url": "https://github.com/huggingface/diffusers/issues/11272",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-10T05:11:56Z",
    "updated_at": "2025-04-30T02:11:51Z",
    "user": "micklexqg"
  },
  {
    "repo": "huggingface/inference-benchmarker",
    "number": 11,
    "title": "How to set the OPENAI_API_KEY?",
    "body": "There is no api_key param for inference-benchmarker. How to set the OPENAI_API_KEY?\nThanks~\n\ncode there:\nhttps://github.com/huggingface/inference-benchmarker/blob/d91a0162bdfe318fe95b9a9bbb53b1bdc39194a9/src/requests.rs#L145C1-L153C36\n\n```bash\nroot@P8757303A244:/opt/inference-benchmarker# inference-benchmarker -h\nUsage: inference-benchmarker [OPTIONS] --tokenizer-name <TOKENIZER_NAME>\n\nOptions:\n  -t, --tokenizer-name <TOKENIZER_NAME>\n          The name of the tokenizer to use [env: TOKENIZER_NAME=]\n      --model-name <MODEL_NAME>\n          The name of the model to use. If not provided, the same name as the tokenizer will be used [env: MODEL_NAME=]\n  -m, --max-vus <MAX_VUS>\n          The maximum number of virtual users to use [env: MAX_VUS=] [default: 128]\n  -d, --duration <DURATION>\n          The duration of each benchmark step [env: DURATION=] [default: 120s]\n  -r, --rates <RATES>\n          A list of rates of requests to send per second (only valid for the ConstantArrivalRate benchmark) [env: RATES=]\n      --num-rates <NUM_RATES>\n          The number of rates to sweep through (only valid for the \"sweep\" benchmark) The rates will be linearly spaced up to the detected maximum rate [env: NUM_RATES=] [default: 10]\n      --profile <PROFILE>\n          A benchmark profile to use [env: PROFILE=]\n  -b, --benchmark-kind <BENCHMARK_KIND>\n          The kind of benchmark to run (throughput, sweep, optimum) [env: BENCHMARK_KIND=] [default: sweep]\n  -w, --warmup <WARMUP>\n          The duration of the prewarm step ran before the benchmark to warm up the backend (JIT, caches, etc.) [env: WARMUP=] [default: 30s]\n  -u, --url <URL>\n          The URL of the backend to benchmark. Must be compatible with OpenAI Message API [env: URL=] [default: http://localhost:8000]\n  -n, --no-console\n          Disable console UI [env: NO_CONSOLE=]\n      --prompt-options <PROMPT_OPTIONS>\n          Constraints for prompt length. No value means use the input prompt as defined in input dataset. We sample the number of tokens to generate from a normal distribution. Specified as a comma-separated list of key=value pairs. * num_tokens: target number of prompt tokens * min_tokens: minimum number of prompt tokens * max_tokens: maximum number of prompt tokens * variance: variance in the number of prompt tokens [env: PROMPT_OPTIONS=]\n      --decode-options <DECODE_OPTIONS>\n          Constraints for the generated text. We sample the number of tokens to generate from a normal distribution. Specified as a comma-separated list of key=value pairs. * num_tokens: target number of generated tokens * min_tokens: minimum number of generated tokens * max_tokens: maximum number of generated tokens * variance: variance in the number of generated tokens [env: DECODE_OPTIONS=]\n      --dataset <DATASET>\n          Hugging Face dataset to use for prompt generation [env: DATASET=] [default: hlarcher/inference-benchmarker]\n      --dataset-file <DATASET_FILE>\n          File to use in the Dataset [env: DATASET_FILE=] [default: share_gpt_filtered_small.json]\n      --extra-meta <EXTRA_META>\n          Extra metadata to include in the benchmark results file, comma-separated key-value pairs. It can be, for example, used to include information about the configuration of the benched server. Example: --extra-meta \"key1=value1,key2=value2\" [env: EXTRA_META=]\n      --run-id <RUN_ID>\n          [env: RUN_ID=]\n  -h, --help\n          Print help (see more with '--help')\n  -V, --version\n          Print version\n```",
    "url": "https://github.com/huggingface/inference-benchmarker/issues/11",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-10T04:36:11Z",
    "updated_at": "2025-04-25T13:13:18Z",
    "user": "handsome-chips"
  },
  {
    "repo": "huggingface/transformers",
    "number": 37408,
    "title": "How to solve the error of converting Qwen onnx_model to tensorRT_model?",
    "body": "### **1. The transformers' Qwen ONNX model has been exported successfully.**\n\n### **2. Convert ONNX_model to tensorRT_model failed by trtexec.**\n\n**error info**\n\n```\n[04/10/2025-11:04:52] [E] Error[3]: IExecutionContext::setInputShape: Error Code 3: API Usage Error (Parameter check failed, condition: engineDims.d[i] == dims.d[i]. Static dimension mismatch while setting input shape for key_cache.1. Set dimensions are [7,8,32,128]. Expected dimensions are [7,8,1,128].)\n[04/10/2025-11:04:52] [E] The engine was built with static shapes for input tensor key_cache.1 but the provided shapes do not match the static shapes!\n[04/10/2025-11:04:52] [E] Inference set up failed\n```\n\n### **Due to the fact that Qwen of Transoformers utilizes the DynamicCache class to handle KVcache, The error should be attributed to DynamicCache.**\n\n**### ONNX model check OK**\n\n```\nThe model is well-formed and valid!\n=======================Model1 inputs:\nx_s [1, 'seq_len', 1024]\nattn_mask [1, 'seq_len', 'seq_len']\nkey_cache.1 [7, 8, 'seq_len', 128]\nvalue_cache.1 [7, 8, 'seq_len', 128]\n=======================Model1 outputs:\ny_pred [1, 'seq_len', 1024]\nkey_cache [7, 8, 'seq_len', 128]\nvalue_cache [7, 8, 'seq_len', 128]\n```\n\n**export foward**\n\n```\ndef injected_forward(\n    self, \n    xs: torch.Tensor,\n    att_mask: torch.Tensor = torch.ones((0, 0, 0), dtype=torch.bool),\n    key_cache: torch.Tensor = torch.zeros((0, 0, 0, 0), dtype=torch.float32),\n    value_cache: torch.Tensor = torch.zeros((0, 0, 0, 0), dtype=torch.float32)\n) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:\n    att_mask = ~att_mask.unsqueeze(1) * torch.finfo(xs.dtype).min\n    past_key_values = DynamicCache(self.config.num_hidden_layers)\n\n    for i in torch.arange(self.config.num_hidden_layers):\n        past_key_values.key_cache[i] = key_cache[i].unsqueeze(0)\n        past_key_values.value_cache[i] = value_cache[i].unsqueeze(0)\n    \n    past_seen_tokens =  past_key_values.get_seq_length()\n    cache_position = torch.arange(past_seen_tokens, past_seen_tokens + xs.shape[1], device=xs.device)\n    position_ids = cache_position.unsqueeze(0)\n\n    hidden_states = xs\n    for decoder_layer in self.layers[: self.config.num_hidden_layers]:\n        layer_outputs = decoder_layer(\n            hidden_states,\n            attention_mask=att_mask,\n            position_ids=position_ids,\n            past_key_value=past_key_values,\n            output_attentions=False,\n            use_cache=True,\n            cache_position=cache_position,\n        )\n\n        hidden_states = layer_outputs[0]\n\n    xs = self.norm(hidden_states)\n    new_key_cache = torch.cat(past_key_values.key_cache, dim=0)\n    new_value_cache = torch.cat(past_key_values.value_cache, dim=0)\n\n    return xs, new_key_cache, new_value_cache\n\n```\n\n\n\n\n\n",
    "url": "https://github.com/huggingface/transformers/issues/37408",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-10T04:08:47Z",
    "updated_at": "2025-06-28T08:03:06Z",
    "user": "dearwind153"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 150967,
    "title": "[MPS] `where`: silent incorrectness when cond is not contiguous",
    "body": "### \ud83d\udc1b Describe the bug\n\n\n```python\n\ndevice = \"mps\"\ndiff = torch.tensor([[True, True], [True, True]], dtype=torch.bool)\ndiff = diff.T\ntarget = torch.tensor([[0, 0], [0, 1]])\n\nrcpu = torch.where(diff, target, 0)\n\ndiffmps = diff.to(device)\ntargetmps = target.to(device)\n\nrmps = torch.where(diffmps, targetmps, 0)\n\nprint(rcpu)\nprint(rmps)\n```\n\n```\ntensor([[0, 0],\n        [0, 1]])\ntensor([[0, 0],\n        [0, 0]], device='mps:0')\n```\n\n\n\n### Versions\n\nNightly\n\n```\nPyTorch version: 2.8.0a0+git00c921c\nIs debug build: True\nCUDA used to build PyTorch: None\nROCM used to build PyTorch: N/A\n\nOS: macOS 13.7.1 (arm64)\nGCC version: Could not collect\nClang version: 18.1.5\nCMake version: version 4.0.0\nLibc version: N/A\n\nPython version: 3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:00:33)  [Clang 13.0.1 ] (64-bit runtime)\nPython platform: macOS-13.7.1-arm64-arm-64bit\nIs CUDA available: False\nCUDA runtime version: No CUDA\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: No CUDA\nNvidia driver version: No CUDA\ncuDNN version: No CUDA\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: False\n\nCPU:\nApple M1 Max\n```\n\ncc @kulinseth @albanD @malfet @DenisVieriu97 @jhavukainen",
    "url": "https://github.com/pytorch/pytorch/issues/150967",
    "state": "closed",
    "labels": [
      "triaged",
      "module: correctness (silent)",
      "module: mps"
    ],
    "created_at": "2025-04-09T23:13:38Z",
    "updated_at": "2025-04-13T20:44:52Z",
    "user": "qqaatw"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1081,
    "title": "Torch.compile and TP during multiresolution Training",
    "body": "is it correct to assume that we should only enable torch.compile in single resolution training or when we have the same sequence lengths to avoid recompiles and slow down?",
    "url": "https://github.com/pytorch/torchtitan/issues/1081",
    "state": "open",
    "labels": [
      "question",
      "module: torch.compile"
    ],
    "created_at": "2025-04-09T18:08:41Z",
    "updated_at": "2025-04-10T15:05:57Z",
    "user": "nighting0le01"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 964,
    "title": "RuntimeError: Could not load libtorchcodec during lerobot/scripts/train.py script",
    "body": "### System Info\n\n```Shell\n- `lerobot` version: 0.1.0\n- Platform: Linux-6.8.0-57-generic-x86_64-with-glibc2.35\n- Python version: 3.10.13\n- Huggingface_hub version: 0.29.3\n- Dataset version: 3.4.1\n- Numpy version: 1.26.4\n- PyTorch version (GPU?): 2.5.1+cu124 (True)\n- Cuda version: 12040\n\n\nAdditionally: \n\nffmpeg version : 7.1.1\nTorchCodec version : 0.2.1\n```\n\n### Information\n\n- [ ] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nInstall leRobot from the main documentation as follows : \n\nconda create -n lerobot python=3.10 -y\nconda activate lerobot\ngit clone https://github.com/huggingface/lerobot.git ~/lerobot\npip install --no-binary=av -e\npip install torchvision==0.20.1\nconda install -c conda-forge 'ffmpeg>=7.0' -y\n\n\nAfter collecting a dataset, run `lerobot/scripts/train.py` script \n\n### Expected behavior\n\nHello all! \n\nI am getting started with the lerobot so100 arm and have had a few issues. \n\nThe first was the same as the issue in #883 in running the `control_robot.py` script which I solved (or bypassed) by following [remi cadene's response](https://github.com/huggingface/lerobot/issues/679#issuecomment-2737292192 ) to do `pip install torchvision==0.20.1` and also `conda install -c conda-forge 'ffmpeg>=7.0' -y` after doing `pip install --no-binary=av -e `. This allowed me to successfully run the `control_robot.py` script successfully. However, then I tried to collect a dataset and run a training with the `lerobot/scripts/train.py` script and I encountered the following issue : \n\n```\nfrom torchcodec.decoders._core.video_decoder_ops import (\n  File \"/home/moonshot/miniconda3/envs/lerobot/lib/python3.10/site-packages/torchcodec/decoders/_core/video_decoder_ops.py\", line 59, in <module>\n    load_torchcodec_extension()\n  File \"/home/moonshot/miniconda3/envs/lerobot/lib/python3.10/site-packages/torchcodec/decoders/_core/video_decoder_ops.py\", line 44, in load_torchcodec_extension\n    raise RuntimeError(\nRuntimeError: Could not load libtorchcodec. Likely causes:\n          1. FFmpeg is not properly installed in your environment. We support\n             versions 4, 5, 6 and 7.\n          2. The PyTorch version (2.5.1+cu124) is not compatible with\n             this version of TorchCodec. Refer to the version compatibility\n             table:\n             https://github.com/pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec.\n          3. Another runtime dependency; see exceptions below.\n        The following exceptions were raised as we tried to load libtorchcodec:\n        \n[start of libtorchcodec loading traceback]\n/home/moonshot/miniconda3/envs/lerobot/lib/python3.10/site-packages/torchcodec/libtorchcodec7.so: undefined symbol: _ZNK3c1011StorageImpl27throw_data_ptr_access_errorEv\nlibavutil.so.58: cannot open shared object file: No such file or directory\nlibavutil.so.57: cannot open shared object file: No such file or directory\n/home/moonshot/miniconda3/envs/lerobot/lib/python3.10/site-packages/torchcodec/libtorchcodec4.so: undefined symbol: _ZNK3c1011StorageImpl27throw_data_ptr_access_errorEv\n[end of libtorchcodec loading traceback].\n\n```\n\nIt seems that I have some issues with the `torchcodec`and `ffmpeg` versions not being compatible. Checking their versions gives me: \n\n```\nffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers\nbuilt with gcc 13.3.0 (conda-forge gcc 13.3.0-2)\nconfiguration: --prefix=/home/moonshot/miniconda3/envs/lerobot --cc=/home/conda/feedstock_root/build_artifacts/ffmpeg_1741820412024/_build_env/bin/x86_64-conda-linux-gnu-cc --cxx=/home/conda/feedstock_root/build_artifacts/ffmpeg_1741820412024/_build_env/bin/x86_64-conda-linux-gnu-c++ --nm=/home/conda/feedstock_root/build_artifacts/ffmpeg_1741820412024/_build_env/bin/x86_64-conda-linux-gnu-nm --ar=/home/conda/feedstock_root/build_artifacts/ffmpeg_1741820412024/_build_env/bin/x86_64-conda-linux-gnu-ar --disable-doc --enable-openssl --enable-demuxer=dash --enable-hardcoded-tables --enable-libfreetype --enable-libharfbuzz --enable-libfontconfig --enable-libopenh264 --enable-libdav1d --disable-gnutls --enable-libmp3lame --enable-libvpx --enable-libass --enable-pthreads --enable-alsa --enable-libpulse --enable-vaapi --enable-libopenvino --enable-gpl --enable-libx264 --enable-libx265 --enable-libaom --enable-libsvtav1 --enable-libxml2 --enable-pic --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libvorbis --enable-libopus --enable-librsvg --enable-ffplay --pkg-config=/home/conda/feedstock_root/build_artifacts/ffmpeg_1741820412024/_build_env/bin/pkg-config\nlibavutil      59. 39.100 / 59. 39.100\nlibavcodec     61. 19.101 / 61. 19.101\nlibavformat    61.  7.100 / 61.  7.100\nlibavdevice    61.  3.100 / 61.  3.100\nlibavfilter    10.  4.100 / 10.  4.100\nlibswscale      8.  3.100 /  8.  3.100\nlibswresample   5.  3.100 /  5.  3.100\nlibpostproc    58.  3.100 / 58.  3.100\n\n```\n\nAnd `TorchCodec` version  0.2.1. \n\nCould anyone suggest the right v",
    "url": "https://github.com/huggingface/lerobot/issues/964",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-09T14:25:38Z",
    "updated_at": "2025-04-15T13:32:24Z",
    "user": "shrutichakraborty"
  },
  {
    "repo": "huggingface/transformers",
    "number": 37390,
    "title": "how to reduce original model's tokenizer vocabulary",
    "body": "`###` Feature request\n\nI am working on model distillation. I am currently using the nllb-distilled-600M model, but the parameters of this model are still too large, and the vocabulary supports more than 100 languages. My use case is single language translation, such as English to Hebrew. Therefore, I need to reduce the redundant vocabulary of the original model and only keep the English and Hebrew vocabulary. I noticed that transformers do not use the sentencepiece.bpe.model file, and I don't want to retrain a tokenizer, because the trained tokenizer will be inconsistent with the original tokenizer result, which will lead to the subsequent model weight migration and model distillation process cannot be carried out. Therefore, my idea is to quickly replace the tokenizer.json and tokenizer_config.json files in the original model, and then migrate the model weights at the model level to get a pruned model. What I am doing now is to load the original model tokenizer, tokenize the corpus I prepared, count the registered tokens, regain a reduced vocabulary, and change the corresponding json file. Is there any better strategy to quickly replace the tokenizer vocabulary?\n\n![Image](https://github.com/user-attachments/assets/0433f4df-766d-4804-a752-e02a104d3cfa)\n\n### Motivation\n\nquick modify model vocabulary for beater application\n\n### Your contribution\n\n> `def modify_tokenizer():\n\n    for sentences in tqdm.tqdm(range(100,len(en_corpus),100)):\n        enc = teacher_tokenizer(en_corpus[sentences-100:sentences],\n                        add_special_tokens=False,\n                        return_attention_mask=False,\n                        return_token_type_ids=False)\n        for ids in enc['input_ids']:\n            selected_ids.update(ids)\n    print('all english tokens nums is ',len(selected_ids))\n    for sentences in tqdm.tqdm(range(100,len(he_corpus),100)):\n        enc = teacher_tokenizer(he_corpus[sentences-100:sentences],\n                        add_special_tokens=False,\n                        return_attention_mask=False,\n                        return_token_type_ids=False)\n        for ids in enc['input_ids']:\n            selected_ids.update(ids)\n    print('all english+Hebrew tokens nums is ',len(selected_ids))\n    for tok in teacher_tokenizer.all_special_tokens:\n        # print('special_token ',tok)\n        selected_ids.add(teacher_tokenizer.convert_tokens_to_ids(tok))\n    print('all english+Hebrew_special tokens nums is ',len(selected_ids))\n    #  \u4ece\u539f vocab \u4e2d\u53cd\u67e5\u51fa\u5bf9\u5e94 token\n    orig_vocab = teacher_tokenizer.get_vocab()\n    new_tokens = []\n    for tok, idx in sorted(orig_vocab.items(), key=lambda kv: kv[1]):\n        if idx in selected_ids:\n            new_tokens.append(tok)\n    # \u5199\u51fa\u65b0\u7684 vocab.json\uff08Hugging Face \u683c\u5f0f\uff09\n    new_vocab = {tok: i for i, tok in enumerate(new_tokens)}\n    #\u4fee\u6539\u539f\u6709tokenizer\u548ctokenizer_config\n    teacher_tokenizer_path='/workspace/nllb-200-distilled-600M/tokenizer.json'\n    teacher_tokenizer_config_path='/workspace/nllb-200-distilled-600M/tokenizer_config.json'\n    student_tokenizer_path='/workspace/distilled_model_test/tokenizer.json'\n    student_tokenizer_config_path='/workspace/distilled_model_test/tokenizer_config.json'\n    def _read_json(path):\n        with open(path, \"r\", encoding=\"utf-8\") as f:\n            data = json.load(f)\n        return data\n    def _write_json(path,data):\n        with open(path, \"w\", encoding=\"utf-8\") as f:\n            json.dump(data, f, ensure_ascii=False, indent=2)\n    #change tokenizer \n    student_tokenizer_data=_read_json(teacher_tokenizer_path)\n    student_tokenizer_data['model']['vocab']=new_vocab\n    for single_added_token in student_tokenizer_data['added_tokens']:\n        single_added_token['id']=new_vocab[single_added_token['content']]\n    new_merges=[]\n    #change merges\n    for merge_pair in student_tokenizer_data['model']['merges']:\n        _temp_merge=merge_pair[0]+merge_pair[1]\n        if _temp_merge in new_vocab.keys():\n            new_merges.append(merge_pair)\n    student_tokenizer_data['model']['merges']=new_merges\n    _write_json(student_tokenizer_path,student_tokenizer_data)\n    #change tokenizer_config`",
    "url": "https://github.com/huggingface/transformers/issues/37390",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-04-09T10:45:56Z",
    "updated_at": "2025-04-09T10:53:07Z",
    "user": "masterwang22327"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7506,
    "title": "HfHubHTTPError: 429 Client Error: Too Many Requests for URL when trying to access Fineweb-10BT on 4A100 GPUs using SLURM",
    "body": "### Describe the bug\n\nI am trying to run some finetunings on 4 A100 GPUs using SLURM using axolotl training framework which in turn uses Huggingface's Trainer and Accelerate on [Fineweb-10BT](https://huggingface.co/datasets/HuggingFaceFW/fineweb), but I end up running into 429 Client Error: Too Many Requests for URL error when I call next(dataloader_iter). Funny is, that I can run some test fine tuning (for just 200 training steps) in 1 A100 GPU using SLURM. Is there any rate limiter set for querying dataset? I could run the fine tuning with the same settings (4 A100 GPUs in SLURM) last month.\n\n### Steps to reproduce the bug\n\nYou would need a server installed with SLURM\n\n1. Create conda environment\n1.1 conda create -n example_env -c conda-forge gxx=11 python=3.10\n1.2 conda activate example_env\n1.3 pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124\n1.4 conda install nvidia/label/cuda-12.4.0::cuda-toolkit\n1.5 Download flash_attn-2.7.4.post1+cu12torch2.5cxx11abiFALSE-cp310-cp310-linux_x86_64.whl\n1.6 pip3 install packaging\n1.7 pip3 install ninja\n1.8 pip3 install mlflow\n1.9 Clone https://github.com/calvintanama/axolotl.git\n1.10 `cd` to `axolotl`\n1.11 pip3 install -e '.[deepspeed]'\n\n2. Run the training\n2.1. Create a folder called `config_run` in axolotl directory\n2.2. Copy `config/phi3_pruned_extra_pretrain_22_29_bottleneck_residual_8_a100_4.yaml` to `config_run`\n2.3. Change yaml file in the `config_run` accordingly\n2.4. Change directory and conda environment name in `jobs/train_phi3_22_29_bottleneck_residual_8_a100_4_temp.sh`\n2.5. `jobs/train_phi3_22_29_bottleneck_residual_8_a100_4_temp.sh`\n\n### Expected behavior\n\nThis should not cause any error, but gotten\n\n```\nFile \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/accelerate/data_loader.py\", line 552, in __iter__\n[rank3]:     current_batch = next(dataloader_iter)\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/torch/utils/data/dataloader.py\", line 701, in __next__\n[rank3]:     data = self._next_data()\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/torch/utils/data/dataloader.py\", line 757, in _next_data\n[rank3]:     data = self._dataset_fetcher.fetch(index)  # may raise StopIteration\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py\", line 33, in fetch\n[rank3]:     data.append(next(self.dataset_iter))\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/accelerate/data_loader.py\", line 338, in __iter__\n[rank3]:     for element in self.dataset:\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py\", line 2266, in __iter__\n[rank3]:     for key, example in ex_iterable:\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py\", line 1866, in __iter__\n[rank3]:     for key, example in self.ex_iterable:\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py\", line 1084, in __iter__\n[rank3]:     yield from self._iter()\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py\", line 1263, in _iter\n[rank3]:     for key, transformed_example in outputs:\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py\", line 1258, in <genexpr>\n[rank3]:     outputs = (\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py\", line 1244, in iter_outputs\n[rank3]:     for i, key_example in inputs_iterator:\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py\", line 1106, in iter_batched_inputs\n[rank3]:     for key, example in iterator:\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py\", line 1866, in __iter__\n[rank3]:     for key, example in self.ex_iterable:\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py\", line 1535, in __iter__\n[rank3]:     for x in self.ex_iterable:\n[rank3]:   File \"/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datase",
    "url": "https://github.com/huggingface/datasets/issues/7506",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-09T06:32:04Z",
    "updated_at": "2025-06-29T06:04:59Z",
    "comments": 2,
    "user": "calvintanama"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 960,
    "title": "pi0-fintune-performance",
    "body": "I have been fine-tuning the provided pi0-base model on my dataset using LeRobot. After training for 100,000 steps, I found that the model performs well on tasks that appeared in my dataset, but its performance on unseen tasks is very poor. It seems to lack the generalization ability of a VLA model. Is this phenomenon normal? Are there any strategies to improve this situation?",
    "url": "https://github.com/huggingface/lerobot/issues/960",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-04-09T01:21:12Z",
    "updated_at": "2025-10-08T08:43:22Z",
    "user": "yanghb1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 150891,
    "title": "[ONNX] How to export Llama4",
    "body": "### \ud83d\udc1b Describe the bug\n\nI am trying to do an onnx export for the Llama 4 Scout model but it fails saying:\n`RuntimeError: Only tuples, lists and Variables are supported as JIT inputs/outputs. Dictionaries and strings are also accepted, but their usage is not recommended. Here, received an input of unsupported type: DynamicCache`\n\nThe error traceback:\n```\nTraceback (most recent call last):\n  File \"/proj/work/sdey/examples/llama4/llama4_scout.py\", line 80, in <module>\n    torch.onnx.export(\n  File \"/proj/work/sdey/venv/lib/python3.10/site-packages/torch/onnx/__init__.py\", line 375, in export\n    export(\n  File \"/proj/work/sdey/venv/lib/python3.10/site-packages/torch/onnx/utils.py\", line 502, in export\n    _export(\n  File \"/proj/work/sdey/venv/lib/python3.10/site-packages/torch/onnx/utils.py\", line 1564, in _export\n    graph, params_dict, torch_out = _model_to_graph(\n  File \"/proj/work/sdey/venv/lib/python3.10/site-packages/torch/onnx/utils.py\", line 1113, in _model_to_graph\n    graph, params, torch_out, module = _create_jit_graph(model, args)\n  File \"/proj/work/sdey/venv/lib/python3.10/site-packages/torch/onnx/utils.py\", line 997, in _create_jit_graph\n    graph, torch_out = _trace_and_get_graph_from_model(model, args)\n  File \"/proj/work/sdey//venv/lib/python3.10/site-packages/torch/onnx/utils.py\", line 904, in _trace_and_get_graph_from_model\n    trace_graph, torch_out, inputs_states = torch.jit._get_trace_graph(\n  File \"/proj/work/sdey/venv/lib/python3.10/site-packages/torch/jit/_trace.py\", line 1500, in _get_trace_graph\n    outs = ONNXTracedModule(\n  File \"/proj/work/sdey/venv/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1736, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n  File \"/proj/work/sdey/venv/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1747, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/proj/work/sdey/venv/lib/python3.10/site-packages/torch/jit/_trace.py\", line 139, in forward\n    graph, out = torch._C._create_graph_by_tracing(\n  File \"/proj/work/sdey/venv/lib/python3.10/site-packages/torch/jit/_trace.py\", line 133, in wrapper\n    out_vars, _ = _flatten(outs)\nRuntimeError: Only tuples, lists and Variables are supported as JIT inputs/outputs. Dictionaries and strings are also accepted, but their usage is not recommended. Here, received an input of unsupported type: DynamicCache\n```\n\nThis occurs for higher version of `transformers > 4.44.2`\n\nCode to reproduce:\n```\nimport torch\nfrom transformers import AutoProcessor,AutoModelForImageTextToText, pipeline\n\nprocessor = AutoProcessor.from_pretrained(\"meta-llama/Llama-4-Scout-17B-16E\")\nmodel = AutoModelForImageTextToText.from_pretrained(\"meta-llama/Llama-4-Scout-17B-16E\",torch_dtype=torch.bfloat16)\n\n\nurl1 = \"https://huggingface.co/datasets/huggingface/documentation-images/resolve/0052a70beed5bf71b92610a43a52df6d286cd5f3/diffusers/rabbit.jpg\"\nurl2 = \"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/cat_style_layout.png\"\nmessages = [\n    {\n        \"role\": \"user\",\n        \"content\": [\n            {\"type\": \"image\", \"url\": url1},\n            {\"type\": \"image\", \"url\": url2},\n            {\"type\": \"text\", \"text\": \"Can you describe how these two images are similar, and how they differ?\"},\n        ]\n    },\n]\n\ninputs = processor.apply_chat_template(\n    messages,\n    add_generation_prompt=True,\n    tokenize=True,\n    return_dict=True,\n    return_tensors=\"pt\",\n)\n\ntorch.onnx.export(\n        model,\n        (inputs[\"input_ids\"], inputs[\"pixel_values\"], inputs[\"attention_mask\"]),\n        \"llama4_scout.onnx\",\n        do_constant_folding=False,\n        training= torch.onnx.TrainingMode.EVAL,\n        export_params=False)\n```\n\n### Versions\n\nPyTorch version: 2.5.1\nIs debug build: False\nCUDA used to build PyTorch: Could not collect\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 22.04.4 LTS (aarch64)\nGCC version: (GCC) 13.3.0\nClang version: 14.0.0-1ubuntu1.1\nCMake version: version 3.29.6\nLibc version: glibc-2.35\n\nPython version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (64-bit runtime)\nPython platform: Linux-6.5.0-1019-nvidia-64k-aarch64-with-glibc2.35\nIs CUDA available: False\nCUDA runtime version: 11.5.119\nCUDA_MODULE_LOADING set to: N/A\nGPU models and configuration: GPU 0: NVIDIA GH200 480GB\nNvidia driver version: 550.90.07\ncuDNN version: Probably one of the following:\n/usr/lib/aarch64-linux-gnu/libcudnn.so.9.3.0\n/usr/lib/aarch64-linux-gnu/libcudnn_adv.so.9.3.0\n/usr/lib/aarch64-linux-gnu/libcudnn_cnn.so.9.3.0\n/usr/lib/aarch64-linux-gnu/libcudnn_engines_precompiled.so.9.3.0\n/usr/lib/aarch64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.3.0\n/usr/lib/aarch64-linux-gnu/libcudnn_graph.so.9.3.0\n/usr/lib/aarch64-linux-gnu/libcudnn_heuristic.so.9.3.0\n/usr/lib/aarch64-linux-gnu/libcudnn_ops.so.9.3.0\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                       aarch64\nCPU op-mode(s):                     64-bit",
    "url": "https://github.com/pytorch/pytorch/issues/150891",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2025-04-09T00:11:49Z",
    "updated_at": "2025-11-13T10:13:08Z",
    "user": "srijanie03"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 956,
    "title": "pi0 multi gps train",
    "body": "if i have multi 4090, how to modify to train pi0?\n\nonly 1 4090 just error\n![Image](https://github.com/user-attachments/assets/5f1900f2-6d0a-4e05-be99-81587f0bb22d)",
    "url": "https://github.com/huggingface/lerobot/issues/956",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-08T13:06:27Z",
    "updated_at": "2025-11-20T03:07:56Z",
    "user": "ximiluuuu"
  },
  {
    "repo": "huggingface/transformers",
    "number": 37364,
    "title": "How to find a specific func doc when using transformers doc?",
    "body": "### Feature request\n\nBetter UX for doc\n\n### Motivation\n\nThe search and UI layout make it so hard to find a func doc, especially when there are so many func doc in one webpage and your just can not find what you want by web page search.\n\n### Your contribution\n\nno, right now",
    "url": "https://github.com/huggingface/transformers/issues/37364",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-04-08T10:48:04Z",
    "updated_at": "2025-09-15T19:16:35Z",
    "user": "habaohaba"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 586,
    "title": "what is next for this project?",
    "body": "",
    "url": "https://github.com/huggingface/open-r1/issues/586",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-07T21:29:54Z",
    "updated_at": "2025-04-07T21:29:54Z",
    "user": "Mnaik2"
  },
  {
    "repo": "pytorch/xla",
    "number": 8948,
    "title": "Torch-XLA not compatible with static python",
    "body": "## \u2753 Questions and Help\nI am trying to use Torch-XLA v2.3.0 but it fails with:\n```\nline 7, in <module>\n    import _XLAC\nImportError: libpython3.10.so.1.0: cannot open shared object file: No such file or directory\n```\n\nI noticed this message [here](https://github.com/pytorch/xla/blob/9e23ca853331aa229dcdba2473d20ca5af2d620d/docs/source/contribute/bazel.md?plain=1#L71):\n```\nBazel brings in [pybind11](https://github.com/pybind/pybind11) embeded\npython and links against it to provide `libpython` to the plugin using\nthis mechanism. Python headers are also sourced from there instead of\ndepending on the system version. These are satisfied from the\n`\"@pybind11//:pybind11_embed\"`, which sets up compiler options for\nlinking with `libpython` transitively.\n```\nwhich suggests XLA is pulling in a two year old version of pybind11_bazel, which gets its python binary/library/headers/paths by inspecting the copy of the interpreter installed on the operating system.  During this probing pybind11_bazel explicitly asks the python interpreter to give it the linker flags it would need to embed the interpreter in its code, leading to that dependency.  This renders it unusable with static python.\n\nIs there a way to make this work/could you provide a different build of Torch-XLA which is compatible with static python?",
    "url": "https://github.com/pytorch/xla/issues/8948",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-07T18:25:43Z",
    "updated_at": "2025-04-23T14:32:47Z",
    "user": "drewjenks01"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 949,
    "title": "Optional deps in using LeRobot as am optional package",
    "body": "Hi, we are working on enabling LeRobot dataset generation in [IsaacLab](https://github.com/isaac-sim/IsaacLab), such that developers could create data with IsaacLab data generation workflow and use it in their robot learning models.  \n\nThe asks are, \n1. Is there any scheduled release, such that downstream devs could have stable codebase to integrate LeRobot into their applications?\n2. Can we move some deps as optional wrt the core code, if training/eval is not expected? For example, we only need Lerobot dataset related functions, Gymnasium dependency is not needed. You only need Gymnasium dependency if you want to use the environment in eval mode during training or deployment.\n\nI hope those could expand the user base further for LeRobot dataset generation and for training/eval with broader model families.",
    "url": "https://github.com/huggingface/lerobot/issues/949",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "simulation",
      "stale"
    ],
    "created_at": "2025-04-07T16:55:48Z",
    "updated_at": "2025-10-21T02:29:27Z",
    "user": "xyao-nv"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7502,
    "title": "`load_dataset` of size 40GB creates a cache of >720GB",
    "body": "Hi there,\n\nI am trying to load a dataset from the Hugging Face Hub and split it into train and validation splits. Somehow, when I try to do it with `load_dataset`, it exhausts my disk quota. So, I tried manually downloading the parquet files from the hub and loading them as follows:\n\n```python\n ds = DatasetDict(\n        {\n            \"train\": load_dataset(\n                \"parquet\", \n                data_dir=f\"{local_dir}/{tok}\", \n                cache_dir=cache_dir, \n                num_proc=min(12, os.cpu_count()),   # type: ignore\n                split=ReadInstruction(\"train\", from_=0, to=NUM_TRAIN, unit=\"abs\"),  # type: ignore\n            ),\n            \"validation\": load_dataset(\n                \"parquet\", \n                data_dir=f\"{local_dir}/{tok}\", \n                cache_dir=cache_dir, \n                num_proc=min(12, os.cpu_count()),   # type: ignore\n                split=ReadInstruction(\"train\", from_=NUM_TRAIN, unit=\"abs\"),  # type: ignore\n            )\n        }\n    )\n\n```\n\nwhich still strangely creates 720GB of cache. In addition, if I remove the raw parquet file folder (`f\"{local_dir}/{tok}\"` in this example), I am not able to load anything. So, I am left wondering what this cache is doing. Am I missing something? Is there a solution to this problem?\n\nThanks a lot in advance for your help!\n\nA related issue: https://github.com/huggingface/transformers/issues/10204#issue-809007443.\n\n---\n\nPython: 3.11.11\ndatasets: 3.5.0\n",
    "url": "https://github.com/huggingface/datasets/issues/7502",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-07T16:52:34Z",
    "updated_at": "2025-04-15T15:22:12Z",
    "comments": 2,
    "user": "pietrolesci"
  },
  {
    "repo": "huggingface/trl",
    "number": 3254,
    "title": "How to get completion_length?",
    "body": "I noticed that during GRPO training, `completion_length` is recorded. However, I found that it\u2019s not simply obtained by `len(completion)`. How is this calculated\u2014by tokens? Is it possible for me to access the `completion_length` for each sample?\n\n",
    "url": "https://github.com/huggingface/trl/issues/3254",
    "state": "open",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-04-07T15:02:04Z",
    "updated_at": "2025-04-11T03:10:20Z",
    "user": "Tuziking"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11220,
    "title": "Unconditional image generation documentation page not working as expected",
    "body": "### Describe the bug\n\nWhen consulting the documentation for [unconditional image generation](https://huggingface.co/docs/diffusers/using-diffusers/unconditional_image_generation), the last embedded page seems to contain an error that blocks it from being shown (see image below). This is @stevhliu's model stored in [this](https://huggingface.co/spaces/stevhliu/unconditional-image-generation) huggingface space. This space is also down in HuggingFace.\n\n<img width=\"1511\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/4b33be09-97b1-4f76-bd23-27c905616ee8\" />\n\n### Reproduction\n\n- Go to https://huggingface.co/docs/diffusers/using-diffusers/unconditional_image_generation or https://huggingface.co/spaces/stevhliu/unconditional-image-generation, you will see that the unconditional image generation part is not loading\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nNot relevant as it is documentation, not system related\n\n### Who can help?\n\n@stevhliu ",
    "url": "https://github.com/huggingface/diffusers/issues/11220",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-04-07T10:32:45Z",
    "updated_at": "2025-04-08T08:47:18Z",
    "comments": 2,
    "user": "alvaro-mazcu"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1275,
    "title": "How to use @xenova/transformers in a musl-based environment?",
    "body": "### Question\n\nHi,\n\nI encountered the following error when using @xenova/transformers:\n\n```bash\nError: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /app/node_modules/onnxruntime-node/bin/napi-v3/linux/x64//libonnxruntime.so.1.14.0)\n```\nAfter investigating the issue, I found that it was caused by using the Node Alpine Docker image.\n(https://github.com/huggingface/transformers.js/issues/555)\n(https://github.com/huggingface/transformers.js/issues/376)\nSince Alpine Linux uses musl as its standard C library, and @xenova/transformers depends on onnxruntime-node (which is built against glibc), this incompatibility appears to be the root cause.\n\nI confirmed this by switching to the node:slim image (which uses glibc), and the error was resolved.\n\nHowever, I would really like to use @xenova/transformers in a musl-based environment (e.g., Alpine).\nIs there currently any way to run it on Alpine using musl?\nIf not, are there any plans to support musl or an alternative backend (e.g., onnxruntime-web with WASM) in Node.js?\n\nThanks in advance!",
    "url": "https://github.com/huggingface/transformers.js/issues/1275",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-07T06:34:51Z",
    "updated_at": "2025-10-07T21:23:36Z",
    "user": "ezcolin2"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 583,
    "title": "num_iterations in GRPOConfig does NOT DO what it is supposed to DO",
    "body": "Hi @qgallouedec and @lewtun \n\nThanks again for the amazing work ! I got the chance to try the v0.16.0 trl release in open-r1. \n\nI was excited about num_iterations which was supposed to make the training 6 times faster. Simply one needs something like:\n\n`training_args = GRPOConfig(..., num_iterations=4)\n`\n\nBut I did not see this happening. Using this simple receipe, it takes 58 steps and about 3 hours and 30 minutes to train the model on 8 A100 GPUs with `num_iterations=1`. But increasing it to `num_iterations=4` linearly increases the number of steps to 232 and increases the training time to 4 hours and 20 minutes under the same exact setup. \n\nAm I missing something here ? are we not supposed to re-use the generated data across multiple steps ? then why the training time has increased ? ",
    "url": "https://github.com/huggingface/open-r1/issues/583",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-06T15:57:43Z",
    "updated_at": "2025-04-12T06:00:21Z",
    "user": "ahatamiz"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 150741,
    "title": "how to install pytorch with cuda 12.2 and py3.12",
    "body": "### \ud83d\udc1b Describe the bug\n\nI wanna know how to install pytorch with CUDA12.2\n\n### Versions\n\nI used the following command , and many issue occured\n\nconda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia",
    "url": "https://github.com/pytorch/pytorch/issues/150741",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-06T14:33:59Z",
    "updated_at": "2025-04-07T14:34:48Z",
    "user": "goactiongo"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 412,
    "title": "[QUESTION] - Dummy Agent Library",
    "body": "_---\nDo you see the issue?\n\nThe answer was hallucinated by the model. We need to stop to actually execute the function! Let\u2019s now stop on \u201cObservation\u201d so that we don\u2019t hallucinate the actual function response.\n---_\n\nCan someone explain how the system is hallucinating in this example. I am kind of stuck on this. ",
    "url": "https://github.com/huggingface/agents-course/issues/412",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-06T09:44:14Z",
    "updated_at": "2025-04-06T09:44:14Z",
    "user": "NewTonDBA"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 940,
    "title": "Possible mismatch in observations.state metadata in Libero datasets on Hugging Face",
    "body": "Hello, \n\nI believe there might be a mistake in the Libero datasets hosted on huggingface/datasets.\nSpecifically, the issue is with the `observations.state` column. According to `meta/info.json`, the structure is described as:\n```\n\"observation.state\": {\n    \"dtype\": \"float32\",\n    \"shape\": [\n        8\n    ],\n    \"names\": {\n        \"motors\": [\n            \"x\",\n            \"y\",\n            \"z\",\n            \"rx\",\n            \"ry\",\n            \"rz\",\n            \"rw\",\n            \"gripper\"\n        ]\n    }\n}\n```\n\nHowever, when I check the values in the `observations.state` column, the last two values appear to be negative of each other. It seems like those two values are `robot0_gripper_qpos` from the environment observations. When I compare the values of observations from the environment, the first three values in the column are `robot0_eef_pos` and the second three seems like `robot0_eef_quat` (rx, ry, rz, rw) converted to axis angle representation.\n\nCould you please clarify or confirm whether this is an intended design or a labeling error?\n\nThanks for your work on LeRobot datasets!",
    "url": "https://github.com/huggingface/lerobot/issues/940",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2025-04-06T04:18:55Z",
    "updated_at": "2025-10-19T02:32:09Z",
    "user": "ozgraslan"
  },
  {
    "repo": "pytorch/data",
    "number": 1471,
    "title": "torchdata or torchdata-contrib?",
    "body": "my team has been implementing quite several utilities. some are close to core features, some other are more advanced and utilities. for example, their class names and features are like:\n\n\n```python\nclass RoundRobinNode(BaseNode[T]):\n    \"\"\"A node that cycles through multiple datasets in a round-robin way.\n```\n\n```python\nclass FileListNode(BaseNode[Dict]):\n    \"\"\"Node that lists files from any supported filesystem (local, S3) matching specified patterns.\n\n    Uses fsspec to provide universal file access capabilities for both local and remote files.\n\n    Features:\n    - Lists files from supported filesystems (local, S3)\n    - Supports glob patterns for file matching\n    - Maintains state for checkpointing and resumption\n```\n\n```python\nclass FileReaderNode(BaseNode[Dict]):\n    \"\"\"Universal node that reads file contents from any supported filesystem.\n\n    Uses smart_open to support local files, S3, HTTP, and more file systems.\n\n```\n\n ```python\nclass TextStreamDecodeNode(BaseNode[Dict]):\n    \"\"\"Node that streams text files line by line from any source.\n\n    This node combines functionality of file reading and line-by-line processing,\n    supporting both local and remote (S3, HTTP, etc.) files via smart_open.\n\n    Features:\n    - Streams files line-by-line (memory efficient)\n    - Supports local files, S3, HTTP, and more\n    - Handles compressed files (.gz, .bz2) transparently\n    - Maintains state for checkpointing and resumption\n    - Preserves metadata from source nodes\n```\n\n```python\nclass HuggingFaceDatasetStreamNode(BaseNode[dict]):\n    \"\"\"\n    Node that streams examples from a HuggingFace dataset.\n\n    Output format:\n        {\n            \"data\": {...},           # Original dataset item\n            \"metadata\": {\n                \"dataset_name\": \"squad\",\n                \"split\": \"train\",\n                \"index\": 42\n            }\n        }\n\n    Input: None (configured with dataset name and split at initialization)\n    Output: Dict containing example data and metadata\n```\n\n```python\nclass JsonlStreamNode(TextStreamDecodeNode):\n    \"\"\"Node that streams JSONL files and parses each line as JSON.\n\n    This node extends TextStreamDecodeNode to add JSON parsing for each line.\n    It maintains the same state management and streaming capabilities while adding\n    JSONL-specific processing.\n```\n\nand some more.\n\nconservatively, i'd say these can be part of, say, `torchdata-contrib`. but i'd like to hear from the maintainers. where would you suggest drawing the line? any other suggestions would be great, too. ",
    "url": "https://github.com/meta-pytorch/data/issues/1471",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-06T01:11:33Z",
    "updated_at": "2025-05-12T21:38:37Z",
    "comments": 2,
    "user": "keunwoochoi"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1058,
    "title": "Issue of using fully_shard (FSDP2) for Huggingface model: Cannot copy out of meta tensor; no data!",
    "body": "Dear community,\n\nThanks for introducing FSDP2 to Pytorch. I am meeting with an issue using fully_shard for Huggingface model.  Just want to know if you have any insights into this issue.\n\nThe code is inherited from [#743 ](https://github.com/pytorch/torchtitan/issues/743)\n\n```\nimport os\n\nimport torch\nfrom torch.distributed import init_process_group, destroy_process_group\nfrom torch.distributed._composable.fsdp import fully_shard\nfrom transformers import AutoConfig, AutoModelForCausalLM\nfrom transformers.models.gpt_neox.modeling_gpt_neox import GPTNeoXLayer\nfrom accelerate import init_empty_weights, load_checkpoint_and_dispatch\n\ndef get_num_params(model: torch.nn.Module, exclude_embedding: bool = False) -> int:\n    num_params = sum(p.numel() for p in model.parameters())\n    if exclude_embedding:\n        num_params -= model.tok_embeddings.weight.numel()\n    return num_params\n\ndef setup(local_rank, world_size):\n    device = torch.device(f\"cuda:{local_rank}\")\n    torch.cuda.set_device(device)\n    init_process_group(\"nccl\", rank=local_rank, world_size=world_size)\n\ndef load():\n    local_rank = int(os.environ[\"LOCAL_RANK\"])\n    world_size = int(os.environ[\"WORLD_SIZE\"])\n    setup(local_rank, world_size)\n\n    model_name = \"EleutherAI/pythia-2.8b\"\n    config = AutoConfig.from_pretrained(model_name)\n    \n    with init_empty_weights():\n        model = AutoModelForCausalLM.from_config(config)\n    \n    for module in model.modules():\n        if isinstance(module, GPTNeoXLayer):\n            fully_shard(module)\n    \n    model = fully_shard(model, reshard_after_forward=True)\n    model.to_empty(device='cuda')\n\n\nif __name__ == \"__main__\":\n    load()\n```\n\n\nThe error is below:\n\n```\n[rank0]: Traceback (most recent call last):\n[rank0]:   File \"/workspace/NCCL/report_issue.py](/NCCL/report_issue.py)\", line 41, in <module>\n[rank0]:     load()\n[rank0]:   File \"/workspace/NCCL/report_issue.py](/NCCL/report_issue.py)\", line 34, in load\n[rank0]:     fully_shard(module)\n[rank0]:   File \"/usr/local/lib/python3.10/dist-packages/torch/distributed/_composable/contract.py\", line 107, in wrapper\n[rank0]:     updated = func(module, *args, **kwargs)\n[rank0]:   File \"/usr/local/lib/python3.10/dist-packages/torch/distributed/_composable/fsdp/fully_shard.py\", line 114, in fully_shard\n[rank0]:     _move_states_to_device(params, buffers, device, mesh_info)\n[rank0]:   File \"/usr/local/lib/python3.10/dist-packages/torch/distributed/_composable/fsdp/_fsdp_init.py\", line 143, in _move_states_to_device\n[rank0]:     tensor.data = [tensor.to](http://tensor.to/)(device)\n[rank0]: NotImplementedError: Cannot copy out of meta tensor; no data!\n```\n\n\nPython command:\n`torchrun --nnodes=1 --nproc_per_node=8 reproduce.py`",
    "url": "https://github.com/pytorch/torchtitan/issues/1058",
    "state": "closed",
    "labels": [
      "question",
      "module: checkpoint",
      "module: distributed_state_dict"
    ],
    "created_at": "2025-04-05T01:48:49Z",
    "updated_at": "2025-04-15T23:08:01Z",
    "user": "mingdianliu"
  },
  {
    "repo": "pytorch/xla",
    "number": 8940,
    "title": "User built torch-xla wheel fails on import",
    "body": "## \u2753 Questions and Help\nAfter following the build instructions in CONTRIBUTING.md, and then running `python setup.py bdist_wheel` inside of `pytorch/xla`, a wheel is generated for `torch-xla`\n\nAfter installing that wheel in the environment of a different project this error appears upon import:\n```\nTraceback (most recent call last):\n ...\n  File \"my_project/venv/lib/python3.10/site-packages/torch_xla/__init__.py\", line 20, in <module>\n    import _XLAC\nImportError: my_project/venv/lib/python3.10/site-packages/_XLAC.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN5torch4lazy13MetricFnValueB5cxx11Ed\n```\n\nAll help is greatly appreciated.",
    "url": "https://github.com/pytorch/xla/issues/8940",
    "state": "closed",
    "labels": [
      "question",
      "build"
    ],
    "created_at": "2025-04-04T20:14:21Z",
    "updated_at": "2025-04-09T14:38:59Z",
    "user": "LPanosTT"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11208,
    "title": "MultiControlNetModel is not supported for SD3ControlNetInpaintingPipeline",
    "body": "### Describe the bug\n\nWhen using `StableDiffusion3ControlNetInpaintingPipeline` with `SD3MultiControlNetModel`, I receive an error: \n\n`NotImplementedError: MultiControlNetModel is not supported for SD3ControlNetInpaintingPipeline.`\n\n### Reproduction\n\nExample reproduction code:\n\n```python\nimport os\nimport torch\nfrom diffusers.utils import load_image\nfrom diffusers.pipelines import StableDiffusion3ControlNetInpaintingPipeline\nfrom diffusers.models import SD3ControlNetModel, SD3MultiControlNetModel\nfrom diffusers import BitsAndBytesConfig, SD3Transformer2DModel\nfrom transformers import T5EncoderModel\n\n# Load images\nimage = load_image(\n    \"https://huggingface.co/alimama-creative/SD3-Controlnet-Inpainting/resolve/main/images/dog.png\"\n)\nmask = load_image(\n    \"https://huggingface.co/alimama-creative/SD3-Controlnet-Inpainting/resolve/main/images/dog_mask.png\"\n)\n\n# Initialize ControlNet models\ncontrolnetA = SD3ControlNetModel.from_pretrained(\"InstantX/SD3-Controlnet-Pose\")\ncontrolnetB = SD3ControlNetModel.from_pretrained(\"alimama-creative/SD3-Controlnet-Inpainting\", use_safetensors=True, extra_conditioning_channels=1)\ncontrolnet = SD3MultiControlNetModel([controlnetA, controlnetB])\n\n# Load transformer and text encoder\nnf4_config = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type=\"nf4\", bnb_4bit_compute_dtype=torch.bfloat16)\nmodel_id = \"stabilityai/stable-diffusion-3.5-large-turbo\"\nmodel_nf4 = SD3Transformer2DModel.from_pretrained(model_id, subfolder=\"transformer\", quantization_config=nf4_config, torch_dtype=torch.bfloat16)\nt5_nf4 = T5EncoderModel.from_pretrained(\"diffusers/t5-nf4\", torch_dtype=torch.bfloat16)\n\n# Initialize pipeline\npipe = StableDiffusion3ControlNetInpaintingPipeline.from_pretrained(\n    \"stabilityai/stable-diffusion-3.5-large-turbo\",\n    token=os.getenv(\"HF_TOKEN\"),\n    controlnet=controlnet,\n    transformer=model_nf4,\n    text_encoder_3=t5_nf4,\n    torch_dtype=torch.bfloat16\n)\n\npipe.enable_model_cpu_offload()\n\n# This fails with NotImplementedError\nresult_image = pipe(\n    prompt=\"a cute dog with a hat\",\n    negative_prompt=\"low quality, bad anatomy\",\n    control_image=[image, image],\n    num_inference_steps=30,\n    guidance_scale=7.5,\n    controlnet_conditioning_scale=[1.0, 1.0],\n    output_type=\"pil\",\n).images[0]\n```\n\n### Logs\n\n```shell\nError\n\n\nNotImplementedError: MultiControlNetModel is not supported for SD3ControlNetInpaintingPipeline.\n\n\nError occurs in `diffusers/pipelines/controlnet_sd3/pipeline_stable_diffusion_3_controlnet_inpainting.py` at line 1026. *Full error code*:\n\n\n---------------------------------------------------------------------------\nNotImplementedError                       Traceback (most recent call last)\nCell In[1], line 41\n     38 pipe.enable_model_cpu_offload()\n     40 # This fails with NotImplementedError\n---> 41 result_image = pipe(\n     42     prompt=\"a cute dog with a hat\",\n     43     negative_prompt=\"low quality, bad anatomy\",\n     44     control_image=[image, image],\n     45     num_inference_steps=30,\n     46     guidance_scale=7.5,\n     47     controlnet_conditioning_scale=[1.0, 1.0],\n     48     output_type=\"pil\",\n     49 ).images[0]\n\nFile ~/miniconda3/envs/bnb310/lib/python3.10/site-packages/torch/utils/_contextlib.py:115, in context_decorator.<locals>.decorate_context(*args, **kwargs)\n    112 @functools.wraps(func)\n    113 def decorate_context(*args, **kwargs):\n    114     with ctx_factory():\n--> 115         return func(*args, **kwargs)\n\nFile ~/miniconda3/envs/bnb310/lib/python3.10/site-packages/diffusers/pipelines/controlnet_sd3/pipeline_stable_diffusion_3_controlnet_inpainting.py:1026, in StableDiffusion3ControlNetInpaintingPipeline.__call__(self, prompt, prompt_2, prompt_3, height, width, num_inference_steps, sigmas, guidance_scale, control_guidance_start, control_guidance_end, control_image, control_mask, controlnet_conditioning_scale, controlnet_pooled_projections, negative_prompt, negative_prompt_2, negative_prompt_3, num_images_per_prompt, generator, latents, prompt_embeds, negative_prompt_embeds, pooled_prompt_embeds, negative_pooled_prompt_embeds, output_type, return_dict, joint_attention_kwargs, clip_skip, callback_on_step_end, callback_on_step_end_tensor_inputs, max_sequence_length)\n   1023     width = latent_width * self.vae_scale_factor\n   1025 elif isinstance(self.controlnet, SD3MultiControlNetModel):\n-> 1026     raise NotImplementedError(\"MultiControlNetModel is not supported for SD3ControlNetInpaintingPipeline.\")\n   1027 else:\n   1028     assert False\n\nNotImplementedError: MultiControlNetModel is not supported for SD3ControlNetInpaintingPipeline.\n\n\nExpected Behavior\nI expect `StableDiffusion3ControlNetInpaintingPipeline` to support `SD3MultiControlNetModel`\n```\n\n### System Info\n\nVersions\n\nPython version: 3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0]\nPyTorch version: 2.2.0+cu118\nCUDA version: 11.8\nDiffusers version: 0.32.2\nTransformers version: 4.50.3\nAccelerate version: 1.7.0.dev0\n\n\n### Who can help?\n\n@yiyixuxu  @sayakpaul ",
    "url": "https://github.com/huggingface/diffusers/issues/11208",
    "state": "open",
    "labels": [
      "bug",
      "help wanted",
      "Good Example PR",
      "contributions-welcome"
    ],
    "created_at": "2025-04-04T12:39:10Z",
    "updated_at": "2025-05-11T15:03:00Z",
    "comments": 5,
    "user": "DanilaAniva"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1055,
    "title": "Is the currnet configuration system over-engineered?",
    "body": "It seems that a training job in TorchTitan is currently defined using a combination of TOML and Python.\n\nWhen users launch a training job, they are expected to provide a TOML file that specifies the model.name:\n\nhttps://github.com/pytorch/torchtitan/blob/351e9fb40fe345dd8a7fb3403881328b7cc0b21b/torchtitan/models/llama/train_configs/debug_model.toml#L23-L24\n\nAt the same time, the referenced model.name must already be registered via a TrainSpec object:\n\nhttps://github.com/pytorch/torchtitan/blob/351e9fb40fe345dd8a7fb3403881328b7cc0b21b/torchtitan/models/llama/__init__.py#L63-L65\n\nMy first question is: Why not move fields of `JobConfig` (serialized to the TOML file) into `TrainSpec`? That would eliminate the need for a separate `JobConfig` class and simplify the interface.\n\nMoreover, the registration mechanism itself may not be necessary. In AXLearn, another LLM training framework, users can launch a training job like this (simplified for conceptual clarity):\n\n```shell\naxlearn.train --experiment-config-model=text.gpt --experiment-config-name=llama3b\n```\n\nThen the trainer simply loads the config dynamically:\n\n```python\nem = importlib.import_module(\"experiments.\" + \"text.gpt\")\ntrainer_config: Trainer.Config = em.named_trainer_config(\"llama3b\")\n```\n\nPlease be aware that all configuration information (corresponding to JobConfig and TrainSpec) are returned by a the innvocation to the function `experiments.text.gpt.named_trainer_config(\"llama3b\")`.\n\nThis approach eliminates the need for explicit registration logic such as:\n\nhttps://github.com/pytorch/torchtitan/blob/351e9fb40fe345dd8a7fb3403881328b7cc0b21b/torchtitan/config_manager.py#L770-L771\n\nand\n\nhttps://github.com/pytorch/torchtitan/blob/351e9fb40fe345dd8a7fb3403881328b7cc0b21b/torchtitan/config_manager.py#L784-L785\n\nbecause the configuration modules can be imported dynamically from `experiments/text/gpt/*.py`.",
    "url": "https://github.com/pytorch/torchtitan/issues/1055",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-03T22:46:39Z",
    "updated_at": "2025-04-04T01:21:27Z",
    "user": "wangkuiyi"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1054,
    "title": "Clarify   PP split point documentation.",
    "body": "### Bug description\n\nThe current documentation is as follows. \n\n```\n        self.parser.add_argument(\n            \"--parallelism.pipeline_parallel_split_points\",\n            type=string_list,\n            nargs=\"+\",\n            default=[],\n            help=\"\"\"\n                Specify comma-separated names of modules to use as the beginning of a split point.\n\n                e.g. \"layers.0,layers.2\" will cause the model to be split into 3 stages,\n                the first containing all the layers up to layers.0,\n                the second containing layers.0 and up to layers.2,\n                the third containing layers.2 and all the remaining layers.\n\n                Note: fully-automated splitting may be enabled in the future,\n                but currently the split points must be specified manually.\"\"\",\n        )\n```\n\nThe above description seems to indicate that layer.0 is present in both  the first and second stages,  layer.2 is present in both second and third stages.  Can someone please clarify inclusivity ? \n\n\n### Versions\n\nhead of master",
    "url": "https://github.com/pytorch/torchtitan/issues/1054",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-03T22:36:08Z",
    "updated_at": "2025-08-21T03:09:16Z",
    "user": "githubsgi"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3308,
    "title": "How to load locally saved transformer models into sentence transformer?",
    "body": "I\u2019ve made some modifications to the NVEMBEDV2 model architecture and saved the updated version locally using `model.save_pretrained()`. However, when I try to wrap the saved model in a SentenceTransformer, I encounter a `KeyError: 'NVEmbedConfig'`.\n\nI checked the documentation, and while loading pretrained models seems straightforward, I\u2019m unsure how to handle models with a custom configuration and type. Is there a guide on how to properly load and integrate a locally modified transformer model into SentenceTransformer? \n\nI'm attaching a simple notebook for reproducibility and also the error. Thanks!\n\n[issue.ipynb.txt](https://github.com/user-attachments/files/19589812/issue.ipynb.txt)\n[requirements.txt](https://github.com/user-attachments/files/19589811/requirements.txt)",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3308",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-03T15:11:20Z",
    "updated_at": "2025-04-08T15:48:26Z",
    "user": "samehkhattab"
  },
  {
    "repo": "pytorch/serve",
    "number": 3409,
    "title": "Why Use TorchScript Format Models?",
    "body": "When customizing handler.py, we can load any format of model in the initialize function without needing to package the model into a .mar file. Why do the tutorials recommend converting the model to TorchScript format and packaging it together with handler.py into a .mar file?",
    "url": "https://github.com/pytorch/serve/issues/3409",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-03T09:00:11Z",
    "updated_at": "2025-04-03T09:00:11Z",
    "comments": 0,
    "user": "CongSuxu"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7497,
    "title": "How to convert videos to images?",
    "body": "### Feature request\n\nDoes someone know how to return the images from videos?\n\n### Motivation\n\nI am trying to use openpi(https://github.com/Physical-Intelligence/openpi) to finetune my Lerobot dataset(V2.0 and V2.1). I find that although the codedaset is v2.0, they are different. It seems like Lerobot V2.0 has two version, one is data include images infos and another one is separate to data and videos.\n\nDoes someone know how to return the images from videos?\n\n\n\n",
    "url": "https://github.com/huggingface/datasets/issues/7497",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-04-03T07:08:39Z",
    "updated_at": "2025-04-15T12:35:15Z",
    "user": "Loki-Lu"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1044,
    "title": "How are  the TP, CP, and PP  marked in PyTorch profiler traces ?",
    "body": "How are TP, CP and PP labelled in PyTorch profiler traces ?  FSDP appears to be clearly marked. ",
    "url": "https://github.com/pytorch/torchtitan/issues/1044",
    "state": "open",
    "labels": [],
    "created_at": "2025-04-02T22:27:30Z",
    "updated_at": "2025-04-03T18:04:41Z",
    "comments": 1,
    "user": "githubsgi"
  },
  {
    "repo": "huggingface/blog",
    "number": 2781,
    "title": "How to submit revised version of Arxiv paper (v2) to Daily Papers",
    "body": "I would like to submit a revised version (v2) of our arXiv paper to Daily Papers, but the original submission (v1) was uploaded too long ago, so it's not eligible through the regular submission form.\n\nHowever, this v2 version was recently accepted to CVPR 2025, and it is a completely different paper compared to v1, both in content and contributions. It is based on a completely new idea and contains significant updates and improvements over the original version.\n\nIs there any way we can submit this revised version (v2) to Daily Papers?",
    "url": "https://github.com/huggingface/blog/issues/2781",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-02T09:20:30Z",
    "updated_at": "2025-11-03T15:22:36Z",
    "user": "eveningglow"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 150523,
    "title": "[Question] How to load extremely large model checkpoint for FSDP wrapped model?",
    "body": "Hello,\n\nWe tried to train DeepSeek v3 model with the parallelism of `FSDP+Expert Parallel`. It works well with random initialized weights. But if we want do SFT or RLHF, we need to load the 670B model weights from https://huggingface.co/deepseek-ai/DeepSeek-V3-0324/tree/main\n\nSo, does PyTorch has ways to load extremely large model weight checkpoint for FSDP wrapped model?\n\ncc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @zhaojuanmao @mrshenli @rohan-varma @chauhang @mori360 @kwen2501 @c-p-i-o",
    "url": "https://github.com/pytorch/pytorch/issues/150523",
    "state": "closed",
    "labels": [
      "oncall: distributed",
      "triaged",
      "module: fsdp"
    ],
    "created_at": "2025-04-02T08:05:12Z",
    "updated_at": "2025-05-08T16:28:40Z",
    "user": "zigzagcai"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 927,
    "title": "How to train a model for VLN?",
    "body": "### System Info\n\n```Shell\nTo control four legs dogs.\n```\n\n### Information\n\n- [ ] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nrt\n\n### Expected behavior\n\ntret",
    "url": "https://github.com/huggingface/lerobot/issues/927",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-01T13:26:20Z",
    "updated_at": "2025-04-01T15:50:04Z",
    "user": "lucasjinreal"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 391,
    "title": "[QUESTION] UNIT-3 not yet published ?",
    "body": "<img width=\"1440\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/aa8ed881-f998-4c63-805f-8af936d630c5\" />",
    "url": "https://github.com/huggingface/agents-course/issues/391",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-01T11:24:07Z",
    "updated_at": "2025-04-30T04:50:26Z",
    "user": "ynareshkalyan21"
  },
  {
    "repo": "huggingface/hub-docs",
    "number": 1664,
    "title": "Page: \"how to be registered as a provider\"?",
    "body": "",
    "url": "https://github.com/huggingface/hub-docs/issues/1664",
    "state": "closed",
    "labels": [],
    "created_at": "2025-04-01T10:55:01Z",
    "updated_at": "2025-04-03T13:03:26Z",
    "user": "hanouticelina"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 926,
    "title": "[Question] Deploy leRobot for a delta kinematic",
    "body": "Bonjour everyone, \nI'm currently working on the development of an **open source delta robot** via ROS. \nI'm wondering if any of you have a clue to help me integrate leRobot ACT algorithm to the custom kinematic of my delta. \n\nATM the inverse kinematic is managed by a marlin CNC firmware (on arudino mega), so we communicated via gcode, but considering moving to micro-ros to have direct angular control of the stepper motors and better ROS integration\n\n\n",
    "url": "https://github.com/huggingface/lerobot/issues/926",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-04-01T09:46:29Z",
    "updated_at": "2025-04-28T10:57:31Z",
    "user": "man0n0n0"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2220,
    "title": "optimum-cli diffusion policy model issue",
    "body": "### System Info\n\n```shell\nHi,\nTrying to export a diffusion policy model to onnx format. From the error message and printed list of model types, it looks like \u201cdiffusion\u201d model cannot be exported to onnx.\nIs there a way to get around this?\n\noptimum-cli export onnx --model lerobot/diffusion_pusht --task reinforcement-learning /onnx/\n\nTraceback (most recent call last):\nFile \"/optimum-cli\", line 8, in\nsys.exit(main())\nFile \"/python3.10/site-packages/optimum/commands/optimum_cli.py\", line 208, in main\nservice.run()\nFile \"/python3.10/site-packages/optimum/commands/export/onnx.py\", line 265, in run\nmain_export(\nFile \"/python3.10/site-packages/optimum/exporters/onnx/main.py\", line 272, in main_export\nconfig = AutoConfig.from_pretrained(\nFile \"/python3.10/site-packages/transformers/models/auto/configuration_auto.py\", line 1008, in from_pretrained\nraise ValueError(\nValueError: Unrecognized model in lerobot/diffusion_pusht. Should have a model_type key in its config.json, or contain one of the following strings in its name:\n\nModel type form config.json:\n\"type\": \"diffusion\"\n\nSupported Models:\nalbert, align, altclip, audio-spectrogram-transformer, autoformer, bark, bart, beit, bert, bert-generation, big_bird, bigbird_pegasus, biogpt, bit, blenderbot, blenderbot-small, blip, blip-2, bloom, bridgetower, bros, camembert, canine, chameleon, chinese_clip, chinese_clip_vision_model, clap, clip, clip_vision_model, clipseg, clvp, code_llama, codegen, cohere, conditional_detr, convbert, convnext, convnextv2, cpmant, ctrl, cvt, data2vec-audio, data2vec-text, data2vec-vision, dbrx, deberta, deberta-v2, decision_transformer, deformable_detr, deit, depth_anything, deta, detr, dinat, dinov2, distilbert, donut-swin, dpr, dpt, efficientformer, efficientnet, electra, encodec, encoder-decoder, ernie, ernie_m, esm, falcon, fastspeech2_conformer, flaubert, flava, fnet, focalnet, fsmt, funnel, fuyu, gemma, gemma2, git, glpn, gpt-sw3, gpt2, gpt_bigcode, gpt_neo, gpt_neox, gpt_neox_japanese, gptj, gptsan-japanese, graphormer, grounding-dino, groupvit, hiera, hubert, ibert, idefics, idefics2, imagegpt, informer, instructblip, instructblipvideo, jamba, jetmoe, jukebox, kosmos-2, layoutlm, layoutlmv2, layoutlmv3, led, levit, lilt, llama, llava, llava-next-video, llava_next, longformer, longt5, luke, lxmert, m2m_100, mamba, mamba2, marian, markuplm, mask2former, maskformer, maskformer-swin, mbart, mctct, mega, megatron-bert, mgp-str, mistral, mixtral, mobilebert, mobilenet_v1, mobilenet_v2, mobilevit, mobilevitv2, mpnet, mpt, mra, mt5, musicgen, musicgen_melody, mvp, nat, nemotron, nezha, nllb-moe, nougat, nystromformer, olmo, oneformer, open-llama, openai-gpt, opt, owlv2, owlvit, paligemma, patchtsmixer, patchtst, pegasus, pegasus_x, perceiver, persimmon, phi, phi3, pix2struct, plbart, poolformer, pop2piano, prophetnet, pvt, pvt_v2, qdqbert, qwen2, qwen2_moe, rag, realm, recurrent_gemma, reformer, regnet, rembert, resnet, retribert, roberta, roberta-prelayernorm, roc_bert, roformer, rt_detr, rt_detr_resnet, rwkv, sam, seamless_m4t, seamless_m4t_v2, segformer, seggpt, sew, sew-d, siglip, siglip_vision_model, speech-encoder-decoder, speech_to_text, speech_to_text_2, speecht5, splinter, squeezebert, stablelm, starcoder2, superpoint, swiftformer, swin, swin2sr, swinv2, switch_transformers, t5, table-transformer, tapas, time_series_transformer, timesformer, timm_backbone, trajectory_transformer, transfo-xl, trocr, tvlt, tvp, udop, umt5, unispeech, unispeech-sat, univnet, upernet, van, video_llava, videomae, vilt, vipllava, vision-encoder-decoder, vision-text-dual-encoder, visual_bert, vit, vit_hybrid, vit_mae, vit_msn, vitdet, vitmatte, vits, vivit, wav2vec2, wav2vec2-bert, wav2vec2-conformer, wavlm, whisper, xclip, xglm, xlm, xlm-prophetnet, xlm-roberta, xlm-roberta-xl, xlnet, xmod, yolos, yoso, zoedepth\n\nThanks\n\n\nTo reproduce\nDownload model from HF\nUse optimum-cli to export the model\n\nPlatform\nLinux\n\nOS Version\nUbuntu 22.04.4 LTS\n\nONNX Runtime Installation\nReleased Package\n\nONNX Runtime Version or Commit ID\n1.21.0\n\nONNX Runtime API\nPython\n\nArchitecture\nARM64\n\nExecution Provider\nCUDA\n\nExecution Provider Library Version\n12.4\n```\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nTo reproduce\nDownload model from HF\nUse optimum-cli to export the model\n\n### Expected behavior\n\nonnx export to succeed ",
    "url": "https://github.com/huggingface/optimum/issues/2220",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-04-01T04:59:53Z",
    "updated_at": "2025-06-11T13:57:20Z",
    "comments": 1,
    "user": "kraza8"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1035,
    "title": "Profiling only a select group of ranks",
    "body": "Is it possible to profile only a select group of ranks.  Becomes hard to handle the large number of files  when there are many ranks.   I understand that there could be imbalances when only a few ranks are profiled.  Do not know if there are ways to profile , but not dump the profile  output file. ",
    "url": "https://github.com/pytorch/torchtitan/issues/1035",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-31T20:02:30Z",
    "updated_at": "2025-08-21T03:10:16Z",
    "comments": 3,
    "user": "githubsgi"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 923,
    "title": "Cannot install Lerobot",
    "body": "I am getting an error when the installation is building the av wheel. It is not passing this part of the installation",
    "url": "https://github.com/huggingface/lerobot/issues/923",
    "state": "closed",
    "labels": [
      "documentation",
      "question",
      "dependencies"
    ],
    "created_at": "2025-03-31T18:26:16Z",
    "updated_at": "2025-07-03T01:32:17Z",
    "user": "Prasit7"
  },
  {
    "repo": "pytorch/xla",
    "number": 8906,
    "title": "Profiler and `use_spmd()` order.",
    "body": "## \ud83d\udcda Documentation\n\nIn #8057, [@zjjott mentioned](https://github.com/pytorch/xla/issues/8057#issuecomment-2408428441) that `xp.start_server(...)` should be used after `use_spmd()`. I didn't find it written anywhere in the documentation. So, is this actually true? If so, we should write this down somewhere.\n\ncc @miladm @tengyifei @bhavya01 \n\n",
    "url": "https://github.com/pytorch/xla/issues/8906",
    "state": "open",
    "labels": [
      "distributed",
      "documentation"
    ],
    "created_at": "2025-03-31T15:34:03Z",
    "updated_at": "2025-03-31T21:29:39Z",
    "comments": 6,
    "user": "ysiraichi"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1034,
    "title": "Context parallel on Turing GPUs?",
    "body": "As the title suggests, is torchtitan CP supported on Turing GPU?\n\nI got the error `RuntimeError: No available kernel. Aborting execution.` using the default `run_train.sh` script with CP changed to 2.\n\nI know Turing GPUs don't have flash attention support yet, but I read the torchtitan CP blog post [here](https://discuss.pytorch.org/t/distributed-w-torchtitan-breaking-barriers-training-long-context-llms-with-1m-sequence-length-in-pytorch-using-context-parallel/215082), and it seems like the memory-efficient attention backend would work with CP? \n\nIf this is the case, could you share how to enable this backend in torchtitan? I tried to wrap this [line](https://github.com/pytorch/torchtitan/blob/main/torchtitan/models/llama/model.py#L258) with `with sdpa_kernel(SDPBackend.EFFICIENT_ATTENTION):`, but the error persists.\n\nThanks",
    "url": "https://github.com/pytorch/torchtitan/issues/1034",
    "state": "open",
    "labels": [
      "question",
      "module: context parallel"
    ],
    "created_at": "2025-03-31T09:36:47Z",
    "updated_at": "2025-08-21T03:11:02Z",
    "user": "dingqingy"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 564,
    "title": "How to evaluate pass@16 for aime 2024 benchmark?",
    "body": "",
    "url": "https://github.com/huggingface/open-r1/issues/564",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-31T09:27:02Z",
    "updated_at": "2025-03-31T09:27:02Z",
    "user": "Cppowboy"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11176,
    "title": "How to use attention_mask and encoder_attention_mask or apply prompts to specific areas in the image?",
    "body": "Hi, I'm aware of the attention_mask and encoder_attention_mask that exist in the forward function of the UNet2DConditionModel yet there are no examples on how to use this \n\nI would appreciate some help on that, thank you in advance\n@patrickvonplaten @Birch-san ",
    "url": "https://github.com/huggingface/diffusers/issues/11176",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-03-30T16:56:40Z",
    "updated_at": "2025-04-30T15:03:34Z",
    "user": "alexblattner"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3308,
    "title": "\ud83d\udca1 [REQUEST] - <title>Pruning tutorial: clarify how to achieve comparable performance to non-pruned?",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\n\nIn the pruning tutorial https://pytorch.org/tutorials/intermediate/pruning_tutorial.html,\nthe method of pruning that is implemented appears to be completely random. \"In this example, we will prune at random 30% of the connections...\"\n\nBut isn't the goal of pruning produce a smaller network with nearly the same capabilities as the original? \nI don't see anything in the tutorial about checking the performance of the new network, or how to intelligently prune the network in order to achieve the goal of pruning. The tutorial takes a randomly-initialized network, randomly prunes it, and then... \n\n...it just suddenly ends...?\n\nIs the idea that we're supposed to just keep iteratively trying random pruning until something finally works ok?  That sounds unbearably undirected and inefficient.  Did I miss something crucial while reading the tutorial?\n\n**Requesting:** Clarification on how to achieve the \"goal\" of pruning: intelligently pruning the network to achieve comparable capabilities.\nJust telling me I can define my own pruning function isn't enough, because...it's a tutorial, I don't know what such a function should entail. \n\n\n\n### Existing tutorials on this topic\n\nhttps://pytorch.org/tutorials/intermediate/pruning_tutorial.html\n\n### Additional context\n\n\"In this example, we will prune at random 30% of the connections \"\n\nWhy/how will that help achieve the goal of pruning? Won't it just randomly turn off parts of the network with no regard to its effect on performance?  (This application seems more like Dropout than actual pruning.)",
    "url": "https://github.com/pytorch/tutorials/issues/3308",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-30T15:49:41Z",
    "updated_at": "2025-03-30T15:49:41Z",
    "user": "drscotthawley"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 920,
    "title": "[Question] How to convert dataset locally",
    "body": "I've noticed that `convert_dataset_v20_to_v21.py` convert LeRobot dataset from v20 to v21 that've already been pushed to the hub. But is there a script to do with local dataset? ",
    "url": "https://github.com/huggingface/lerobot/issues/920",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2025-03-30T13:32:50Z",
    "updated_at": "2025-10-13T02:30:26Z",
    "user": "Frozenkiddo"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 919,
    "title": "[Question] Why does \"action\" exist?",
    "body": "I am a beginner and I am very confused about it. What I can understand is that during my entire operation, I sampled at fixed time intervals. It's like a signal being collected by a letter. I only have to observe and what does action mean? Many data sets in the project have data with the column title `action`. Moreover, according to the expression of the project, `action` means the goal of the movement. However, this goal never seems to match the results in the observation. It looks like the robot never moves to its target. I was completely confused.",
    "url": "https://github.com/huggingface/lerobot/issues/919",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-30T10:45:57Z",
    "updated_at": "2025-03-31T07:50:19Z",
    "user": "ipc-robot"
  },
  {
    "repo": "huggingface/trl",
    "number": 3179,
    "title": "How to resume from the last checkpoint?",
    "body": "I want to continue training from the last checkpoint. How should I do it? I set resume_from_checkpoint=True in the GRPOConfig, but based on the output, it seems to start training from the first step. Do I also need to change the model to the checkpoint path?",
    "url": "https://github.com/huggingface/trl/issues/3179",
    "state": "closed",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-03-30T02:30:47Z",
    "updated_at": "2025-03-30T04:35:58Z",
    "user": "Tuziking"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11168,
    "title": "Sage Attention for diffuser library",
    "body": "**Is your feature request related to a problem? No\n\n**Describe the solution you'd like.**\nA clear and concise description of what you want to happen.\nIncorporate a way to add sage attention to the diffusers library: Flux pipeline, Wan pipeline, etc.\n\n**Describe alternatives you've considered.**\nNone\n\n**Additional context.**\nWhen I incorporated sage attention in the flux pipeline (text to image) I achieved a 16% speed advantage vs no sage attention.\nMy environment was the same save for including / excluding sage attention in my 4 image benchmark creation.\n\nHow to incorporate sage attention? We must consider that this only applies to the Transformer. With this in mind I did the following to the FluxPipeline. Obviously there must be a way to do this via a variable of sorts so that we may/may not run it:\n\nNeed some kind of indicator to decide whether to include or not! This must be done before the denoising step in the model pipeline.\n`        import torch.nn.functional as F\n        sage_function = False\n        try:\n            from sageattention import sageattn\n            self.transformer.scaled_dot_product_attention = F.scaled_dot_product_attention = sageattn\n            sage_function = True\n        except (ImportError):\n            pass\n\n        # 6. Denoising loop\n        with self.progress_bar(total=num_inference_steps) as progress_bar:\n            for i, t in enumerate(timesteps):\n                if self.interrupt:\n                    continue\n`\nAfter the denoising step we must remove sage attention else we get a VAE error due to Sage Attn wanting only torch.float16 or torch.bfloat16 dtypes which the VAE doesn't want:\n\n`        if output_type == \"latent\":\n            image = latents\n        else:\n            if sage_function:\n                self.transformer.scaled_dot_product_attention = F.scaled_dot_product_attention = torch._C._nn.scaled_dot_product_attention\n`\nHopefully this helps.\n",
    "url": "https://github.com/huggingface/diffusers/issues/11168",
    "state": "open",
    "labels": [
      "wip"
    ],
    "created_at": "2025-03-28T20:39:30Z",
    "updated_at": "2025-06-23T05:59:27Z",
    "comments": 12,
    "user": "ukaprch"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 381,
    "title": "[QUESTION]LLM or Agent?",
    "body": "In the tutorial, a lot of the contents mislead to a wrong conectp with LLM and Agents. \n```\nThe Stop and Parse Approach\nOne key method for implementing actions is the stop and parse approach. This method ensures that the agent\u2019s output is structured and predictable:\n\nGeneration in a Structured Format:\nThe agent outputs its intended action in a clear, predetermined format (JSON or code).\n\nHalting Further Generation:\nOnce the action is complete, the agent stops generating additional tokens. This prevents extra or erroneous output.\n\nParsing the Output:\nAn external parser reads the formatted action, determines which Tool to call, and extracts the required parameters.\n\nFor example, an agent needing to check the weather might output:\n```\n\nThe agent can output? or the author means the LLM?",
    "url": "https://github.com/huggingface/agents-course/issues/381",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-28T15:36:45Z",
    "updated_at": "2025-04-30T04:50:54Z",
    "user": "joshhu"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 912,
    "title": "[Question]When will MultiLeRobotDataset available?",
    "body": "Hello, the MultiLeRobotDataset is very useful for training on large amounts of data; without it, training complex tasks would be difficult. However, I noticed that after the Simplify configs(#550) commit on January 31st,  MultiLeRobotDataset have been marked as unavailable(raise NotImplementedError(\"The MultiLeRobotDataset isn't supported for now.\")). Could you please let me know approximately when this functionality will be restored, or why it has been made unavailable?\n",
    "url": "https://github.com/huggingface/lerobot/issues/912",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2025-03-28T09:16:06Z",
    "updated_at": "2025-10-22T02:30:53Z",
    "user": "Vacuame"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 380,
    "title": "[QUESTION] Question on using HuggingFace space",
    "body": "First, the **best way to get a response fast is to ask the community** in our Discord server: https://www.hf.co/join/discord\n\nHowever, if you prefer you can ask here, please **be specific**.\n\nI am on AI Agents course now.\nI have trouble in using HuggingFace space.\nI studied this course at company so I have to open a firewall.\nSo I opened these port(80, 443. 8080) refer to following guide\n(https://huggingface.co/docs/hub/en/spaces-overview)\nBut my edge window can not display anything.\nIs there anything I'm missing?\n\nThank you for opening this course.\n\n![Image](https://github.com/user-attachments/assets/abe3ae2e-d0f6-4552-bb7c-c285c3daa57e)\n\n",
    "url": "https://github.com/huggingface/agents-course/issues/380",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-28T08:28:23Z",
    "updated_at": "2025-04-30T04:47:14Z",
    "user": "kjh0303"
  },
  {
    "repo": "pytorch/xla",
    "number": 8900,
    "title": "Reset Peak Memory Usage",
    "body": "## \ud83d\ude80 Feature\n<!-- A clear and concise description of the feature proposal -->\nProvides a method to reset peak used memory size to current memory being used or 0.\n\n## Motivation\n\n<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->\n\nPyTorch/XLA offers the function xm.get_memory_info which gives you details about memory usage, including bytes_used and peak_bytes_used.\n\nWhen you run several computational graphs one after another, like A, B, and C, and if graph A uses more memory than graph B, it becomes tricky to accurately determine the memory footprint of B. It would be really useful to have a way to reset the peak memory usage after A has finished running.\n\nA practical example of this is in vLLM. The process of loading a model (let's call this step A) often consumes more memory than the actual size of the model's weights due to how the XLA compiler works. Then, when you want to profile the memory usage during the model's execution (step B), the peak_bytes_used will reflect the higher memory usage from the loading phase. This makes the memory profiling for the execution phase less meaningful if you can't reset the peak memory measurement after the model has been loaded.\n\n",
    "url": "https://github.com/pytorch/xla/issues/8900",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-03-28T05:29:44Z",
    "updated_at": "2025-03-28T05:29:44Z",
    "comments": 0,
    "user": "yaochengji"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1027,
    "title": "Linear layer weights are in float32 ?",
    "body": "### Bug description\n\nI am seeing Linear layer weights in  float32 ( wq.weight.dtype torch.float32 )  even after setting the following. \n\nmixed_precision_param = \"bfloat16\"\nmixed_precision_reduce = \"bfloat16\"\n\nIs that expected or I hit upon a bug ? \n\n### Versions\n\n1.  Yes. \n\n2. See the description section . \n3.  It is easy to check that by adding logger lines  . See below. \n```\n            # Non-PP forward / backward\n            with self.train_context(optional_context_parallel_ctx):\n                assert len(model_parts) == 1\n                logger.info(f\"Linear wq.weight.dtype {model_parts[0].layers['0'].attention.wq.weight.dtype}\")\n                last_layer = str(len(model_parts[0].layers) -1 )\n                logger.info(f\"Linear wq.weight.dtype {model_parts[0].layers[last_layer].attention.wq.weight.dtype}\")\n                pred = model_parts[0](inputs)\n                loss = self.train_spec.loss_fn(pred, labels)\n                # pred.shape=(bs, seq_len, vocab_size)\n                # need to free to before bwd to avoid peaking memory\n                del pred\n                loss.backward()\n```",
    "url": "https://github.com/pytorch/torchtitan/issues/1027",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-28T01:35:22Z",
    "updated_at": "2025-05-08T21:15:49Z",
    "user": "githubsgi"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 1026,
    "title": "Any plan to  add Llama 1B and/or 3B models ?",
    "body": "Wondering if there is any plan to add the 1B and/or 3B models to the TorchTitan  set of example models ? It is probably fairly straight forward to do that , if I am not missing anything,  Another toml file and  adds at a few places. The optimizer and lr_scheduler section may  requires some trial and error. ",
    "url": "https://github.com/pytorch/torchtitan/issues/1026",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-28T01:21:59Z",
    "updated_at": "2025-04-01T18:29:00Z",
    "comments": 4,
    "user": "githubsgi"
  },
  {
    "repo": "pytorch/xla",
    "number": 8899,
    "title": "The Stable Diffusion notebook is broken.",
    "body": "## \ud83d\udcda Documentation\n\nThe README points to a [Stable Diffusion notebook](https://github.com/pytorch/xla/blob/master/contrib/kaggle/pytorch-xla-2-0-on-kaggle.ipynb) to help a user get started. However, this notebook cannot be run successfully:\n\n1. The `import torch_xla` step results in an error:\n```\noduleNotFoundError                       Traceback (most recent call last)\n/tmp/ipykernel_27/3499457412.py in <module>\n----> 1 import torch_xla\n      2 torch_xla.__version__\n\nModuleNotFoundError: No module named 'torch_xla'\n```\n\nThis can be fixed by\n```\n!pip install torch~=2.6.0 'torch_xla[tpu]~=2.6.0' \\\n  -f https://storage.googleapis.com/libtpu-releases/index.html \\\n  -f [https://storage.googleapis.com/libtpu-wheels/index.html](https://storage.googleapis.com/libtpu-wheels/index.html%60)\n```\n\n2. Later, the `image = pipeline(prompt, callback=lambda *args: xm.mark_step(), generator=generator).images[0]` step failed with\n```\n/usr/local/lib/python3.11/dist-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py:894: FutureWarning: `callback` is deprecated and will be removed in version 1.0.0. Passing `callback` as an input argument to `__call__` is deprecated, consider using `callback_on_step_end`\n  deprecate(\n\u2007\u20072%\n\u20071/50\u2007[01:16<1:02:27,\u200776.48s/it]\n---------------------------------------------------------------------------\nTypeError                                 Traceback (most recent call last)\n[<ipython-input-10-049c86b52afd>](https://localhost:8080/#) in <cell line: 0>()\n      2 # xm.mark_step compiles and executes the graph after each iteration.\n      3 # The first few steps will be much slower than the rest.\n----> 4 image = pipeline(prompt, callback=lambda *args: xm.mark_step(), generator=generator).images[0]\n      5 image\n\n1 frames\n[/usr/local/lib/python3.11/dist-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py](https://localhost:8080/#) in __call__(self, prompt, height, width, num_inference_steps, timesteps, sigmas, guidance_scale, negative_prompt, num_images_per_prompt, eta, generator, latents, prompt_embeds, negative_prompt_embeds, ip_adapter_image, ip_adapter_image_embeds, output_type, return_dict, cross_attention_kwargs, guidance_rescale, clip_skip, callback_on_step_end, callback_on_step_end_tensor_inputs, **kwargs)\n   1068                 if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):\n   1069                     progress_bar.update()\n-> 1070                     if callback is not None and i % callback_steps == 0:\n   1071                         step_idx = i // getattr(self.scheduler, \"order\", 1)\n   1072                         callback(step_idx, t, latents)\n\nTypeError: unsupported operand type(s) for %: 'int' and 'NoneType'\n```",
    "url": "https://github.com/pytorch/xla/issues/8899",
    "state": "open",
    "labels": [
      "bug",
      "documentation"
    ],
    "created_at": "2025-03-27T22:38:23Z",
    "updated_at": "2025-11-13T00:44:20Z",
    "comments": 0,
    "user": "zhanyong-wan"
  },
  {
    "repo": "pytorch/vision",
    "number": 9008,
    "title": "Torchvision bounding boxes do not match the images, becuase the bboxes are from the pre-cropped, pre-resized version.",
    "body": "### \ud83d\udc1b Describe the bug\n\nCelebA bounding boxes were calculated on the so called \"in-the-wild\" images, prior to cropping and resizing. But torchvision.datasets returns the version that is cropped to 178x218. So for example, on the ninth image, the bbox is outside the image size. \n\nCODE TO REPRO\n\n```\nfrom torchvision import datasets\n\nceleba = datasets.CelebA(root=\"./celeba\", target_type=\"bbox\", download=True, split=\"train\")\n\nprint(celeba[8])\n\n```\n\n(<PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=178x218>,\n tensor([600, 274, 343, 475]))\n\n\n\n### Versions\n\ncollect_env.py crashed on me but here's the version:\n\n```$ uv pip show torchvision\nUsing Python 3.12.8 environment at: XXX\nName: torchvision\nVersion: 0.21.0\nLocation: XXX\nRequires: numpy, pillow, torch\nRequired-by:\n```",
    "url": "https://github.com/pytorch/vision/issues/9008",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-27T17:34:15Z",
    "updated_at": "2026-01-05T16:15:54Z",
    "comments": 6,
    "user": "yaoshiang"
  },
  {
    "repo": "huggingface/Math-Verify",
    "number": 47,
    "title": "Question: How to configure `verify` for strict multi-part answer checking?",
    "body": "Hi Math-Verify Team,\n\nI'm currently using `math-verify` for evaluating LLM outputs, specifically for questions that might require multiple answers (e.g., \"Find all X...\").\n\nI've observed that the `verify` function in `grader.py`, which seems to use logic similar to `any(product(gold, target))`, can return `True` even if the prediction only contains a subset of the required answers.\n\n**Example Observation:**\n\nIn my setup:\n* Ground Truth: `\"1331 and 1728\"` (appears to parse into something like `[1331, 1728]`)\n* Prediction: `\"1728\"` (parses to `[1728]`)\n* Result: `verify` returns `True`.\n\nWhile this makes sense if checking for *any* overlap, it seems too lenient for \"find all\" type questions where an exact match of all required elements is needed. This can lead to inflated scores or misleading reward signals in my use case.\n\n**Question:**\n\nIs there an existing configuration option or a recommended way within `math-verify` (perhaps via specific `ExtractionConfig` settings or ground truth formatting) to enforce a stricter check? Specifically, I'd like to verify if the *set* of predicted answers exactly matches the *set* of ground truth answers (considering mathematical equivalence).\n\nOr is the current behavior the intended default, and handling stricter set-based validation would require custom logic outside `verify` or modifications to the library?\n\nAny clarification or guidance on the best practice for achieving strict multi-part answer verification with `math-verify` would be greatly appreciated!\n\nThanks!",
    "url": "https://github.com/huggingface/Math-Verify/issues/47",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-27T16:54:52Z",
    "updated_at": "2025-07-01T19:31:51Z",
    "user": "TweedBeetle"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1259,
    "title": "3.2.4 has wrong env check in transformers.web.js",
    "body": "### Question\n\n## Background\nI have developed a chrome extension which is followed by the [example](https://github.com/huggingface/transformers.js/tree/main/examples/extension). The example was used the package @xenova/transformers.\n\n## Motivation\nIt seems that multithreads is work now. [Issue](https://github.com/huggingface/transformers.js/issues/928) [Issue2](https://github.com/huggingface/transformers.js/issues/882)\n\n## Question\nI change the package from **@xenova/transformers@2.17.2** to **@huggingface/transformers@3.4.1**. It shows a error **TypeError: sharp__WEBPACK_IMPORTED_MODULE_4__ is not a function** which have no been shown before. Anyone can help?\n\n## Code (background.js)\n``` \n// import { pipeline, env } from '@xenova/transformers';\n// env.localModelPath = './';\n// env.allowRemoteModels = false;\n// env.backends.onnx.wasm.numThreads = 1;\n\nimport { env, pipeline } from '@huggingface/transformers';\nenv.localModelPath = './';\n\nclass ImagePipelineSingleton {\n    static task = 'image-classification';\n    static model = '/deepfake/';\n    static instance = null;\n\n    static async getInstance() {\n        try {\n            if (this.instance === null) {\n                this.instance = await pipeline(this.task, this.model);\n            }\n        } catch (error) {\n            console.error(\"Initialization error:\", error);\n        }\n        return this.instance;\n    }\n}\n\n...\ntry{\n    let model = await ImagePipelineSingleton.getInstance();\n    let classification = await model(url); \n}catch (error) {\n    console.error(\"image processing error:\", error); //error here\n}\n...\n```\n\n## Folder Structure\n- deepfake\n  - onnx\n    - model_quantized.onnx",
    "url": "https://github.com/huggingface/transformers.js/issues/1259",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-27T07:35:23Z",
    "updated_at": "2025-07-02T04:45:26Z",
    "user": "sanixa"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7480,
    "title": "HF_DATASETS_CACHE ignored?",
    "body": "### Describe the bug\n\nI'm struggling to get things to respect HF_DATASETS_CACHE.\n\nRationale: I'm on a system that uses NFS for homedir, so downloading to NFS is expensive, slow, and wastes valuable quota compared to local disk. Instead, it seems to rely mostly on HF_HUB_CACHE.\n\nCurrent version: 3.2.1dev. In the process of testing 3.4.0\n\n### Steps to reproduce the bug\n\n[Currently writing using datasets 3.2.1dev. Will follow up with 3.4.0 results]\n\ndump.py:\n```python\nfrom datasets import load_dataset\ndataset = load_dataset(\"HuggingFaceFW/fineweb\", name=\"sample-100BT\", split=\"train\")\n```\n\nRepro steps\n```bash\n# ensure no cache\n$ mv ~/.cache/huggingface ~/.cache/huggingface.bak\n\n$ export HF_DATASETS_CACHE=/tmp/roller/datasets\n$ rm -rf ${HF_DATASETS_CACHE}\n$ env | grep HF | grep -v TOKEN\nHF_DATASETS_CACHE=/tmp/roller/datasets\n\n$ python dump.py\n# (omitted for brevity)\n\n# (while downloading) \n$ du -hcs ~/.cache/huggingface/hub\n18G     hub\n18G     total\n\n# (after downloading)\n$ du -hcs ~/.cache/huggingface/hub\n```\n\nIt's a shame because datasets supports s3 (which I could really use right now) but hub does not.\n\n### Expected behavior\n\n* ~/.cache/huggingface/hub stays empty\n* /tmp/roller/datasets becomes full of stuff\n\n### Environment info\n\n[Currently writing using datasets 3.2.1dev. Will follow up with 3.4.0 results]",
    "url": "https://github.com/huggingface/datasets/issues/7480",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-26T17:19:34Z",
    "updated_at": "2025-10-23T15:59:18Z",
    "comments": 8,
    "user": "stephenroller"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1258,
    "title": "Tokenizer encode and decode get different token ids and text, missing word_ids",
    "body": "### Question\n\n```js\nimport { AutoTokenizer } from '@huggingface/transformers';\n\nconst tokenizer = await AutoTokenizer.from_pretrained('deepseek-ai/DeepSeek-R1')\n\nconsole.log(tokenizer.encode(\" e.g., \u2669\"))\nconsole.log(tokenizer.decode([105]))\nconsole.log(tokenizer.encode(\"\u2669\"))\n```\n\n```\n[ 312, 3588, 1042, 30717, 105 ]\n\ufffd\n[ 21315, 105 ]\n```\nhow do I encode the words, and loop it and return it as single token,\nbecause now \u2669 is returning 2 tokens and becoming confusing\n\nso is this a bug or something?\n\n\nI guess i need word_ids?",
    "url": "https://github.com/huggingface/transformers.js/issues/1258",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-26T10:44:12Z",
    "updated_at": "2025-03-31T20:18:45Z",
    "user": "liho00"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 905,
    "title": "Supporting selection of obs and action keys in dataset",
    "body": "Hi all, thanks a lot for the framework.\n\nCurrently, it seems the LeRobotDataset format requires users to have a fixed state/environment state/images or actions defined in their dataset. However, this means that for multiple similar applications, the user has to record different datasets with different state or action definitions.\n\nIs it possible to select certain keys from the state or actions similar to how we can do in robomimic?\n\nhttps://github.com/ARISE-Initiative/robomimic/blob/master/robomimic/config/default_templates/bc_transformer.json#L107-L113",
    "url": "https://github.com/huggingface/lerobot/issues/905",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2025-03-26T08:12:10Z",
    "updated_at": "2025-10-10T02:27:27Z",
    "user": "Mayankm96"
  },
  {
    "repo": "pytorch/xla",
    "number": 8884,
    "title": "BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending. Error",
    "body": "Hello,\nI'm trying to train my Transformer Encoder-Decoder model on google Colab `v2-8` TPUs. My code like this:\n\n```python\nimport torch.distributed as dist\nimport torch_xla.core.xla_model as xm\nimport torch_xla.distributed.parallel_loader as pl\nimport torch_xla.distributed.xla_multiprocessing as xmp\nimport torch_xla.distributed.xla_backend\nfrom torch.nn.parallel import DistributedDataParallel as DDP\nimport torch_xla as xla\n\ndef _mp_fn(rank,world_size):\n  dist.init_process_group(\"xla\",init_method=\"xla://\")\n  model = Transformer(TransformerEncoderConfig(),TransformerDecoderConfig())\n  model.to(xm.xla_device())\n\n  ddp_model = DDP(model,gradient_as_bucket_view=True)\n  optimizer = torch.optim.AdamW(ddp_model.parameters(),lr=0.00001)\n  criterion = torch.nn.CrossEntropyLoss()\n  xla_train_loader = pl.MpDeviceLoader(dataloader,xm.xla_device())\n  for fens,moves in xla_train_loader:\n    with xla.step():\n      fens,moves = fens.to(xla.device()),moves.to(xla.device())\n      inputs = moves[:,:-1]\n      labels = moves[:,1:]\n      optimizer.zero_grad()\n      outputs = ddp_model(fens,moves)\n      loss = criterion(outputs.permute(0,2,1),labels)\n      loss.backward()\n      xm.optimizer_step(optimizer)\n      xm.mark_step()\n\nif __name__ == \"__main__\":\n  xla.launch(_mp_fn)\n```\n\nand this code raises the following error: `BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.`\n\nWhat is the problem, is it due to dataloader behaviour or wrong model assignment to device? Could you help me with this if i achieve this i want to train the model with whole dataset in google TPU Research Program. So i'm open to any suggestion with working with TPUs.",
    "url": "https://github.com/pytorch/xla/issues/8884",
    "state": "open",
    "labels": [
      "bug",
      "needs reproduction"
    ],
    "created_at": "2025-03-25T23:52:17Z",
    "updated_at": "2025-03-26T21:38:26Z",
    "comments": 2,
    "user": "oayk23"
  },
  {
    "repo": "pytorch/xla",
    "number": 8883,
    "title": "[RFC] Use shard_as to improve sharding and avoid OOM",
    "body": "# \ud83d\ude80 Use shard_as to improve sharding and avoid OOM\n\n## Summary\n\n2D sharding propagation is harder than 1D sharding propagation due to\nincompatible sharding. This problem is worse in a `scan` / XLA `While` op, and\nthe <code>[shard_as][shard_as]</code> GSPMD feature seems to help.\n\n\n## Motivation\n\nThis proposal is primarily to improve the sharding propgation of\n`torch_xla.experimental.scan`.\n\nWhen the decoder layer is wrapped in an XLA `While` op through\n`torch_xla.experimental.scan`, Llama 3 8B trains a-okay with gbs 16 on a v6e-8\nTPU, but we still get a OOM when scaling to Llama 3.1 405B on v6e-256 with 2D\n(FSDP + TP) sharding.\n\nBy inspecting the memory profiles, we can infer the following:\n\n*   The OOM occurs during the `scan` in the backward pass (judging from the\n    referenced body computation)\n*  The OOM occurs because the compiler emits a convolution (convolution.171)\n    whose output shape is [1, 4K, 16K].\n*  That output tensor is then all-reduced over the FSDP axis (judging from the\n    replica groups), keeping the shape unchanged.\n*   The all-reduced tensor gets written to a `[126, 4K, 16K]` stacked output\n    tensor. This tensor is too large to materialize in a single chip so\n    compilation fails. Note that 126 is the number of layers in Llama 3.1 405B.\n\nWe deduced that the convolution before the all-reduce is computing the gradient\nfor the weight tensor of the\n<code>[o_proj operation in self attention][o_proj]</code>:\n\n```python\n    # Code snippet of Llama self attention\n    attn_output = attn_output.transpose(1, 2).contiguous()\n    attn_output = attn_output.reshape(bsz, q_len, self.hidden_size)\n    attn_output = self.o_proj(attn_output)  # <--- here\n    return attn_output\n```\n\nDuring the backward pass, we will compute `grad_o_proj` which is a matmul of a\n2D sharded input with a 2D sharded `attn_output`. Based on the profile, this\ngradient tensor is only 1D sharded: its shape is `[1, 4K, 16K]`, where `16K` is\nthe size of the embedding dim. We expect it to have the shape of `[1, 4K, 4K]`.\n\n\n## Breakdown of the problem\n\nWhen GSPMD propagates 2D sharding annotations over a matmul, and the contraction\ndim has matching sharding annotations:\n\n```math\nA[M_X, N_Y] \\cdot B[N_Y , M_X] = C[M_?, M_?]\n```\n\n(using [scaling book sharding notation][scaling-book])\n\nDimension $N$ is contracted away. The mesh axis $X$ also disappears. Based on my\nunderstanding of the GSPMD paper, the result will only be 1D sharded, barring\ninfluence from any other operations. Therefore $C$ is only 1D sharded. Since $C$\nis a gradient tensor and `scan` outputs a stacked array of all gradients for all\n126 Llama 3.1 405B layers during the backward pass, this 1D sharding goes on to\n\"infect\" the stacked array with a leading dim size of 126, resulting in an array\nof shape `[126, 4K, 16K]`, which is too large to fit in HBM.\n\n\n## Pitch\n\nI followed the [HLO spec][shard_as] the [JAX implementation][shard_alike] to add\na `shard_as` function to PyTorch/XLA and use it in `scan` during the backward pass.\n[PR here](https://github.com/pytorch/xla/pull/8879). `shard_as` will ensure that the inputs have the same sharding after GSPMD sharding propagation. Specifically, instead of scanning over the decoder layer's backward pass during the backward of scan,\nwe'll scan over a wrapper that adds additional sharding constraints to shard\nthe gradients the same way as their corresponding inputs:\n\n```python\n# This backward pass wrapper calls the original backward pass of a layer, and then use `shard_as` to ensure that\n# the carry is sharded the same as grad_carry, and the grad_x (gradient for input) is sharded the same as the\n# first element of the stacked input array.\ndef _backward_shard_alike(carry, x, backward, init, xs):\n  grad_carry, grad_x = backward(carry, x)\n  # Propagate sharding between forward inputs and backward outputs.\n  _, grad_carry = shard_as(init, grad_carry)\n  _, grad_x = shard_as(tree_map(lambda v: v[0], xs), grad_x)\n  return grad_carry, grad_x\n```\n\nThe PR also has a unit test that checks the result of sharding propagation and\nfails if we remove the `shard_as` usage from `scan`.\n\n\n## Alternatives\n\nRather than using `shard_as`, we could expose a keyword argument on `scan` that\ntakes in the intended sharding annotation of all the weights during the backward\npass of a layer. Potentially, the user may specify that the gradient for the\n`o_proj` weight should be sharded a certain way. There are some drawbacks:\n\n- Since `scan` lowers the combine function using AOTAutograd into a functional\n  graph, we can't tell the tensors from each other. We don't even know what is\n  the variable name that corresponds to some specific output of an FX graph\n  extracted by AOTAutograd.\n- SPMD and `scan` are orthogonal concerns and it's a code smell to expose both\n  APIs in one function.\n\nIn contrast, `shard_as` doesn't require telling tensors apart. It just says to\nconstrain the sharding of the N gradient tensors to be the same as the N input\ntensors.\n\n\n## Additi",
    "url": "https://github.com/pytorch/xla/issues/8883",
    "state": "closed",
    "labels": [
      "enhancement",
      "distributed"
    ],
    "created_at": "2025-03-25T22:14:04Z",
    "updated_at": "2025-03-29T03:26:36Z",
    "comments": 0,
    "user": "tengyifei"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1772,
    "title": "USE_LOCAL_WEBSEARCH No results found for this search query",
    "body": "## Bug description\n\nWith `USE_LOCAL_WEBSEARCH=true`, Web Search always reports _No results found for this search query_.\n\n## Steps to reproduce\n\n- enable search\n- enter and submit question\n\n## Screenshots\n\n<img width=\"488\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b948b629-ff67-4edb-9f7c-25ca9d3d1325\" />\n\n## Context\n\nI'm running chat-ui-db using podman on an M1 Macbook. I'm using LM Studio as the model provider.\n\n`podman run --rm --mount type=bind,source=\"$(pwd)/.env.local\",target=/app/.env.local -v chat-ui:/data -p 3000:3000 ghcr.io/huggingface/chat-ui-db`\n\n### Logs\n\n<!-- Add any logs that are relevant to your issue. Could be browser or server logs. Wrap in code blocks. -->\n\n```\n{\"level\":50,\"time\":1742937489975,\"pid\":18,\"hostname\":\"bbd76a6649ad\",\"msg\":\"No results found for this search query\"}\n```\n\n### Specs\n\n- **OS**: macOS 15.3.1 (24D70)\n- **Browser**: Firefox 136.0.2 (aarch64)\n- **chat-ui commit**: ghcr.io/huggingface/chat-ui-db f679ed220b9b\n\n### Config\n\n_.env.local_\n```\nHF_TOKEN=hf_...\nMODELS=`[\n  {\n    \"name\": \"LM Studio\",\n    \"endpoints\": [{\n      \"type\" : \"openai\",\n      \"baseURL\": \"http://host.docker.internal:1234/v1\"\n    }],\n  },\n]`\nUSE_LOCAL_WEBSEARCH=true\nWEBSEARCH_JAVASCRIPT=true\n```",
    "url": "https://github.com/huggingface/chat-ui/issues/1772",
    "state": "open",
    "labels": [
      "bug",
      "help wanted",
      "websearch"
    ],
    "created_at": "2025-03-25T21:28:11Z",
    "updated_at": "2025-10-22T21:13:54Z",
    "comments": 6,
    "user": "brechtm"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1771,
    "title": "Client disconnects before response is received",
    "body": "## Bug description\n\n\nIf an answer takes several minutes to complete, the chat-ui client simply disconnects. This disconnection happens at 1 minute, but I'm unsure.\n\n## Steps to reproduce\n\nAsk your LLM a riddle but change it a little, so it becomes confused and wonders for a while.\n\nman and a goat are one one side of a river with a boat. How do they get across?\n\nNotice that the response is terminated during thinking/reasoning phase.\n\nThe LM Studio logs indicates that the client disconnects so it terminates the response at that point.\n\n## Screenshots\n\n\n## Context\n\n### Logs\n\n<!-- Add any logs that are relevant to your issue. Could be browser or server logs. Wrap in code blocks. -->\nThis request is terminated as 1min in the browser.\n```\ncurl 'https://example.com/conversation/67e1af3d9becaf215b19d526' \\\n-X 'POST' \\\n-H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundarywFDiAu9glkYBEPBf' \\\n-H 'Accept: */*' \\\n--data-binary $'------WebKitFormBoundarywFDiAu9glkYBEPBf\\r\\nContent-Disposition: form-data; name=\"data\"\\r\\n\\r\\n{\"id\":\"91f280d4-9852-4453-b941-582eb531e911\",\"is_retry\":true,\"is_continue\":false,\"web_search\":false,\"tools\":[]}\\r\\n------WebKitFormBoundarywFDiAu9glkYBEPBf--\\r\\n'\n```\n\n### Specs\n\n- **OS**: OS X\n- **Browser**: Orion\n- **chat-ui commit**: chat-ui-db image: `ghcr.io/huggingface/chat-ui-db@sha256:a69b02884d0de64bb60d8011828b0e4be778673cadfc5f783fe6df14fa737504`\n\n### Config\n\n<!-- Add the environment variables you've used to setup chat-ui, making sure to redact any secrets. -->\n\n## Notes\n\nHow do I configure these timeouts?",
    "url": "https://github.com/huggingface/chat-ui/issues/1771",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-03-25T19:14:54Z",
    "updated_at": "2025-06-14T13:46:28Z",
    "comments": 3,
    "user": "drewwells"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7477,
    "title": "What is the canonical way to compress a Dataset?",
    "body": "Given that Arrow is the preferred backend for a Dataset, what is a user supposed to do if they want concurrent reads, concurrent writes AND on-disk compression for a larger dataset?\n\nParquet would be the obvious answer except that there is no native support for writing sharded, parquet datasets concurrently [[1](https://github.com/huggingface/datasets/issues/7047)].\n\nAm I missing something?  \n\nAnd if so, why is this not the standard/default way that `Dataset`'s work as they do in Xarray, Ray Data, Composer, etc.?",
    "url": "https://github.com/huggingface/datasets/issues/7477",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-25T16:47:51Z",
    "updated_at": "2025-04-03T09:13:11Z",
    "user": "eric-czech"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 901,
    "title": "Any tutorial on how to make experiments on the SimXArm enviroment?",
    "body": "",
    "url": "https://github.com/huggingface/lerobot/issues/901",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-25T13:29:59Z",
    "updated_at": "2025-03-25T16:42:11Z",
    "user": "chenkang455"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1765,
    "title": "`truncate` parameter ignored for OpenAI chat_completions endpoint",
    "body": "## Bug description\n\nThe `truncate` parameter in the ChatUI configuration is not being applied when using the OpenAI chat_completions endpoint.\n\n## Root Cause\n\nThe issue arises because the chat_completions endpoint does not utilize the buildPrompt function where the `truncate` parameter is handled. The logic for truncation is solely within buildPrompt and is therefore bypassed entirely when processing chat_completions requests. This means there's no truncation mechanism applied to the chat history before it's sent to vllm-openai or OpenAI.\n\n#1654 ",
    "url": "https://github.com/huggingface/chat-ui/issues/1765",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-03-25T10:13:40Z",
    "updated_at": "2025-03-25T10:20:33Z",
    "comments": 0,
    "user": "calycekr"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 350,
    "title": "how to train wan using 8 GPUs",
    "body": "I notice that there is only 4 GPUs scripts, even though I modify the script for 8 GPU training, it gets some errors.",
    "url": "https://github.com/huggingface/finetrainers/issues/350",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-25T05:02:18Z",
    "updated_at": "2025-05-06T14:54:50Z",
    "user": "tanshuai0219"
  },
  {
    "repo": "pytorch/xla",
    "number": 8876,
    "title": "Missing torch-xla-gpu-plugin",
    "body": "A user reported the following issue:\n\nwe have been trying to use `torch-xla` nightly builds to get around some of the slowness issues seen in torch-xla 2.5. We found `torch-xla` nightly builds for GPU under `gs://pytorch-xla-releases/wheels/cuda/12.6`, however these don\u2019t contain `torch-xla-gpu-plugin`  (this was present for older `torch-xla` versions e.g. `gs://pytorch-xla-releases/wheels/cuda/12.1/torch_xla_cuda_plugin-2.6.0-py3-none-any.whl`). Is there any location that contains the cuda plugin nightly builds for torch-xla 2.8.0?\n",
    "url": "https://github.com/pytorch/xla/issues/8876",
    "state": "open",
    "labels": [
      "xla:gpu"
    ],
    "created_at": "2025-03-24T18:03:36Z",
    "updated_at": "2025-04-02T14:25:22Z",
    "comments": 11,
    "user": "tengyifei"
  },
  {
    "repo": "pytorch/xla",
    "number": 8874,
    "title": "Contribution suggestion?",
    "body": "## \u2753 Questions and Help\nI want to have a deeper understanding of pytorch/xla by contributing to it. I notice that the majority of the [issues with \"good first issue\" tag](https://github.com/pytorch/xla/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22)  are of one kind (i.e. Op info test) and are created long time ago. I am not sure if they are still relevant. Other than that, i don't know how to find good issues to work with. Can i assume that any issue from the issue list without assignee are open for a all contributors? Or, should there be a tag for all the issues that are available for public contribution? \n\nThanks!",
    "url": "https://github.com/pytorch/xla/issues/8874",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-24T17:03:26Z",
    "updated_at": "2025-03-24T18:24:49Z",
    "user": "iwknow"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11147,
    "title": "[LTX0.9.5] make LTX0.9.5 works with text-to-video",
    "body": "see more context here https://github.com/huggingface/diffusers/issues/11143#issuecomment-2747390564",
    "url": "https://github.com/huggingface/diffusers/issues/11147",
    "state": "closed",
    "labels": [
      "help wanted"
    ],
    "created_at": "2025-03-24T09:56:47Z",
    "updated_at": "2025-04-04T14:43:16Z",
    "comments": 9,
    "user": "yiyixuxu"
  },
  {
    "repo": "huggingface/search-and-learn",
    "number": 47,
    "title": "How to run this project on CPU?",
    "body": "Hello, I'm going to run the code for the project on cpu\n\nThe graphics card I have now is 4060ti, but even with the lightest option (minimum batch size, use 1.5B model, etc.), I couldn't run the project due to memory capacity issues\n\nSo I want to move this project to cpu and see the results even if it takes some time\n\nHowever, even though all settings and codes have been checked, the flash attention backend is automatically set and we are having trouble solving the error\n\nSo I would like to ask if this project cannot be implemented in cpu through vllm setting change only",
    "url": "https://github.com/huggingface/search-and-learn/issues/47",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-24T01:13:44Z",
    "updated_at": "2025-03-24T01:13:44Z",
    "user": "pss0204"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 149826,
    "title": "How to handle dynamic output size with torch.onnx.export (through dynamo) for Resize",
    "body": "### \ud83d\udc1b Describe the bug\n\nI would like to export with torch.onnx.export (through dynamo) some code that contains a resize operation. The output width and height is dynamic. An example model is as follows:\n```\nimport torch\n\n\nclass Model(torch.nn.Module):\n\n    def __init__(self):\n        super().__init__()\n\n    def forward(self, x, size):\n        y = torch.nn.functional.interpolate(x, size=size.tolist())\n        return y\n\n\nmodel = Model()\nx = torch.rand(1, 3, 400, 500)\nsize = torch.tensor([1024, 1024]).to(torch.int32)\ny = model(x, size)\n\nonnx_model = torch.onnx.export(model, (x, size), dynamo=True)\n```\nThe code throws the following error:\n```\n<class 'RuntimeError'>: /pytorch/build/aten/src/ATen/RegisterCompositeImplicitAutograd.cpp:5615: SymIntArrayRef expected to contain only concrete integers\n\nWhile executing %upsample_nearest2d : [num_users=1] = call_function[target=torch.ops.aten.upsample_nearest2d.vec](args = (%x, [%_local_scalar_dense, %_local_scalar_dense_1], None), kwargs = {})\nOriginal traceback:\nFile \"/tmp/test.py\", line 11, in forward\n    y = torch.nn.functional.interpolate(x, size=size.tolist())\n```\nThe interpolate function doesn't accept a tensor as argument, so I somehow has to convert it to a List. That fails with the error as shown. I can hardcode the list to a fixed sizes, but then I cannot accept images with different size at inference time. \n\nHow can I address this issue? \n\n### Error logs\n\n_No response_\n\n### Versions\n\nCollecting environment information...\nPyTorch version: 2.6.0+cu124\nIs debug build: False\nCUDA used to build PyTorch: 12.4\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.2 LTS (x86_64)\nGCC version: (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0\nClang version: 19.1.1 (1ubuntu1~24.04.2)\nCMake version: version 3.28.3\nLibc version: glibc-2.39\n\nPython version: 3.12.3 (main, Feb  4 2025, 14:48:35) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-6.11.0-19-generic-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: 12.0.140\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: GPU 0: NVIDIA RTX 500 Ada Generation Laptop GPU\nNvidia driver version: 550.120\ncuDNN version: Could not collect\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        46 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               22\nOn-line CPU(s) list:                  0-21\nVendor ID:                            GenuineIntel\nModel name:                           Intel(R) Core(TM) Ultra 7 155H\nCPU family:                           6\nModel:                                170\nThread(s) per core:                   2\nCore(s) per socket:                   16\nSocket(s):                            1\nStepping:                             4\nCPU(s) scaling MHz:                   22%\nCPU max MHz:                          4800.0000\nCPU min MHz:                          400.0000\nBogoMIPS:                             5990.40\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb intel_ppin ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid bus_lock_detect movdiri movdir64b fsrm md_clear serialize arch_lbr ibt flush_l1d arch_capabilities\nVirtualization:                       VT-x\nL1d cache:                            544 KiB (14 instances)\nL1i cache:                            896 KiB (14 instances)\nL2 cache:                             18 MiB (9 instances)\nL3 cache:                             24 MiB (1 instance)\nNUMA node(s):                         1\nNUMA node0 CPU(s):                    0-21\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disab",
    "url": "https://github.com/pytorch/pytorch/issues/149826",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged",
      "oncall: pt2"
    ],
    "created_at": "2025-03-23T09:27:37Z",
    "updated_at": "2025-04-24T15:17:47Z",
    "user": "FabianSchuetze"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 149771,
    "title": "How to remove the \u201cinternal api\u201d notice?",
    "body": "### \ud83d\udcda The doc issue\n\nWhat is the option that will remove this notice?\n > This page describes an internal API which is not intended to be used outside of the PyTorch codebase and can be modified or removed without notice. \n\nWe would like to remove it for https://pytorch.org/docs/stable/onnx_dynamo.html and a few onnx pages. \n\n@svekars \n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @svekars @sekyondaMeta @AlannaBurke",
    "url": "https://github.com/pytorch/pytorch/issues/149771",
    "state": "closed",
    "labels": [
      "module: docs",
      "triaged"
    ],
    "created_at": "2025-03-21T22:46:30Z",
    "updated_at": "2025-03-27T22:02:25Z",
    "user": "justinchuby"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7473,
    "title": "Webdataset data format problem",
    "body": "### Describe the bug\n\nPlease see https://huggingface.co/datasets/ejschwartz/idioms/discussions/1\n\nError code: FileFormatMismatchBetweenSplitsError\n\nAll three splits, train, test, and validation, use webdataset. But only the train split has more than one file. How can I force the other two splits to also be interpreted as being the webdataset format?  (I don't think there is currently a way, but happy to be told that I am wrong.)\n\n### Steps to reproduce the bug\n\n```\nimport datasets\ndatasets.load_dataset(\"ejschwartz/idioms\")\n\n### Expected behavior\n\nThe dataset loads.  Alternatively, there is a YAML syntax for manually specifying the format.\n\n### Environment info\n\n- `datasets` version: 3.2.0\n- Platform: Linux-6.8.0-52-generic-x86_64-with-glibc2.35\n- Python version: 3.10.12\n- `huggingface_hub` version: 0.28.1\n- PyArrow version: 19.0.0\n- Pandas version: 2.2.3\n- `fsspec` version: 2024.9.0",
    "url": "https://github.com/huggingface/datasets/issues/7473",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-21T17:23:52Z",
    "updated_at": "2025-03-21T19:19:58Z",
    "comments": 1,
    "user": "edmcman"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7470,
    "title": "Is it possible to shard a single-sharded IterableDataset?",
    "body": "I thought https://github.com/huggingface/datasets/pull/7252 might be applicable but looking at it maybe not.\n\nSay we have a process, eg. a database query, that can return data in slightly different order each time. So, the initial query needs to be run by a single thread (not to mention running multiple times incurs more cost too). But the results are also big enough that we don't want to materialize it entirely and instead stream it with an IterableDataset.\n\nBut after we have the results we want to split it up across workers to parallelize processing.\n\nIs something like this possible to do?\n\nHere's a failed attempt. The end result should be that each of the shards has unique data, but unfortunately with this attempt the generator gets run once in each shard and the results end up with duplicates...\n\n```\nimport random\nimport datasets\n\n\ndef gen():\n  print('RUNNING GENERATOR!')\n  items = list(range(10))\n  random.shuffle(items)\n  yield from items\n\n\nds = datasets.IterableDataset.from_generator(gen)\n\nprint('dataset contents:')\nfor item in ds:\n  print(item)\nprint()\n\nprint('dataset contents (2):')\nfor item in ds:\n  print(item)\nprint()\n\n\nnum_shards = 3\n\n\ndef sharded(shard_id):\n  for i, example in enumerate(ds):\n    if i % num_shards in shard_id:\n      yield example\n\n\nds1 = datasets.IterableDataset.from_generator(\n  sharded, gen_kwargs={'shard_id': list(range(num_shards))}\n)\n\nfor shard in range(num_shards):\n  print('shard', shard)\n  for item in ds1.shard(num_shards, shard):\n    print(item)\n```",
    "url": "https://github.com/huggingface/datasets/issues/7470",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-21T04:33:37Z",
    "updated_at": "2025-11-22T07:55:43Z",
    "comments": 6,
    "user": "jonathanasdf"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 884,
    "title": "[Question] Support of PointCloud",
    "body": "Hi,  \n\nI'm currently developing a plugin for lerobot and would like to know if there are any plans to support PointCloud data.  \nAdditionally, I'd like to ask if there is a recommended storage format for handling PointCloud data within the project.  \n\nLooking forward to your response.  \n\nThanks",
    "url": "https://github.com/huggingface/lerobot/issues/884",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2025-03-21T04:29:15Z",
    "updated_at": "2025-10-07T02:26:39Z",
    "user": "yilin404"
  },
  {
    "repo": "huggingface/inference-benchmarker",
    "number": 4,
    "title": "Can i use local model's tokenizer and local dataset?",
    "body": "Hello, may I specify the paths of the locally downloaded model and dataset through the ./inference-benchmarker command, instead of accessing Hugging Face via the network?",
    "url": "https://github.com/huggingface/inference-benchmarker/issues/4",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-21T01:55:03Z",
    "updated_at": "2025-03-27T18:44:04Z",
    "user": "handsome-chips"
  },
  {
    "repo": "pytorch/torchx",
    "number": 1021,
    "title": "Suggested way to get timestamp of the job submission?",
    "body": "## Description\nHi team, I am looking for a way to get the exact timestamp when the command `torchx run` is being run. Is there a formal way that is scheduler / component agnostic? The timestamp should be accessible from the training app. \n\n\n## Motivation/Background\nThe actual use case is to calculate the overhead between job launch to the actual time when training container spin up and finishes the first batch. \n\n\n## Detailed Proposal\n<!-- provide a detailed proposal -->\n\n\n## Alternatives\n<!-- discuss the alternatives considered and their pros/cons -->\n\n\n## Additional context/links\n<!-- link to code, documentation, etc. -->\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/1021",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-20T21:58:47Z",
    "updated_at": "2025-03-20T21:59:41Z",
    "comments": 0,
    "user": "HanFa"
  },
  {
    "repo": "huggingface/video-dataset-scripts",
    "number": 20,
    "title": "parquet file how to convert to Training Dataset Format for finetrainers",
    "body": "parquet file how to convert to Training Dataset Format for finetrainers ?",
    "url": "https://github.com/huggingface/video-dataset-scripts/issues/20",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-20T16:22:39Z",
    "updated_at": "2025-04-10T17:46:06Z",
    "user": "kanghua309"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 149586,
    "title": "UserWarning: Dynamo does not know how to trace the builtin `None.pybind11_object.__new__.`",
    "body": "### \ud83d\udc1b Describe the bug\n\nI'm filing an issue since this is a Python built-in (granted the error message implies that it is not since it references PyBind11, but I'm opening an issue anyway since it is caused by using returning/using `None` in a compiled function).\n\n### Versions\n\n2.7.0a0+gitebd087e\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @zou3519 @ydwu4 @xmfan @bdhirsh @Chillee @drisspg @yanboliang @BoyuanFeng",
    "url": "https://github.com/pytorch/pytorch/issues/149586",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo",
      "module: higher order operators",
      "module: compiled autograd",
      "module: pt2-dispatcher",
      "module: flex attention"
    ],
    "created_at": "2025-03-20T00:32:49Z",
    "updated_at": "2025-03-21T19:28:30Z",
    "user": "cora-codes"
  },
  {
    "repo": "pytorch/xla",
    "number": 8862,
    "title": "Replace `xm.mark_step` with `torch_xla.sync()` in examples and tests",
    "body": "`torch_xla.sync()` is easier to spell than `xm.mark_step()`. We should at least replace `mark_step` in all public examples.",
    "url": "https://github.com/pytorch/xla/issues/8862",
    "state": "closed",
    "labels": [
      "enhancement",
      "usability",
      "documentation"
    ],
    "created_at": "2025-03-19T22:25:09Z",
    "updated_at": "2025-05-16T17:56:25Z",
    "comments": 1,
    "user": "tengyifei"
  },
  {
    "repo": "pytorch/xla",
    "number": 8861,
    "title": "Document the difference between `device=` vs `.to(device)`",
    "body": "## \ud83d\udcda Documentation\n\nThere's a subtle difference between `torch.foo(device=xla)` vs `torch.foo().to(xla)` and we should document this in a FAQ section or similar. The first one runs the `foo` on the TPU. The second one runs the `foo` on the CPU and then moves the buffer to the TPU.",
    "url": "https://github.com/pytorch/xla/issues/8861",
    "state": "closed",
    "labels": [
      "enhancement",
      "good first issue",
      "documentation"
    ],
    "created_at": "2025-03-19T22:23:19Z",
    "updated_at": "2025-06-12T06:07:46Z",
    "comments": 2,
    "user": "tengyifei"
  },
  {
    "repo": "pytorch/xla",
    "number": 8859,
    "title": "Improve `torch_xla.compile` documentation",
    "body": "## \ud83d\udcda Documentation\n\nThe best doc I could find that mentions this is https://pytorch.org/xla/release/r2.5/eager_mode.html. However, `torch_xla.compile` is usable separate from PyTorch/XLA eager mode and we should make this more front-and-center compared to mark_step.",
    "url": "https://github.com/pytorch/xla/issues/8859",
    "state": "closed",
    "labels": [
      "enhancement",
      "good first issue",
      "documentation"
    ],
    "created_at": "2025-03-19T22:15:04Z",
    "updated_at": "2025-05-30T04:11:41Z",
    "comments": 0,
    "user": "tengyifei"
  },
  {
    "repo": "pytorch/xla",
    "number": 8858,
    "title": "Document the difference between tracing time and execution time",
    "body": "## \ud83d\udcda Documentation\n\nIf we write a loop like\n\n```\nstart = time.time()\nfor step in range(num_steps):\n  run_model()\n  xm.mark_step()\nend = time.time()\n```\n\nThen `end - start` will only measure the tracing time. We'll need to do `torch_xla.sync(wait=True)` to block on device execution to measure the execution time.\n\nWe should document this in some \"common FAQs/sharp edges\" maybe",
    "url": "https://github.com/pytorch/xla/issues/8858",
    "state": "closed",
    "labels": [
      "enhancement",
      "good first issue",
      "documentation"
    ],
    "created_at": "2025-03-19T22:13:49Z",
    "updated_at": "2025-05-30T04:10:37Z",
    "comments": 4,
    "user": "tengyifei"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 987,
    "title": "Is EP (Expert Parallelism)   coming ?",
    "body": "Currently TorchTitan supports  PP, CP, FSDP,  PP  parallelisms. Is there a plan to support Expert Parallelism (EP)  ? Along the same line,  see some DeepSeek files in the repo.  Is there a  plan to support DeepSeek training on TorchTitan ?\n",
    "url": "https://github.com/pytorch/torchtitan/issues/987",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-19T21:41:14Z",
    "updated_at": "2025-03-24T17:21:20Z",
    "user": "githubsgi"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 986,
    "title": "Is a  PP+FSDP+TP  config + toml available for pre-training 405B model ?",
    "body": "Would appreciate if someone can  share  a toml file  to do PP+FSDP+TP for 405B  model. ",
    "url": "https://github.com/pytorch/torchtitan/issues/986",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-19T21:35:43Z",
    "updated_at": "2025-08-21T03:11:32Z",
    "comments": 3,
    "user": "githubsgi"
  },
  {
    "repo": "pytorch/vision",
    "number": 8986,
    "title": "Speed up JPEG decoding by allowing resize during decode",
    "body": "### \ud83d\ude80 The feature\n\nTorchvision's `read_image` currently decodes JPEG images at full resolution. However, both `libjpeg` and `libjpeg-turbo` support decoding at lower resolutions (1/2, 1/4, 1/8 of the original size).\n\nIntroducing a `size_hint` parameter would allow users to specify an approximate target size, with `torchvision` selecting the closest larger available scale factor and downscale the JPEG image during decoding.\n\nExample Usage:\n```python\nfrom torchvision.io.image import decode_image\ntensor = decode_image(\"image.jpeg\", size_hint=(224, 224))\n```\n\n\n### Motivation, pitch\n\n- Many ML pipelines process images at fixed sizes (e.g., 224x224 for ImageNet models). Decoding large images only to downscale them later is inefficient.\n- This can improve memory usage as we do not need to hold the full-sized image in the memory.\n- Pillow provides a similar feature via [`Image.draft`](https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.draft), allowing for approximate size-based decoding.\n\n### Alternatives\n\n- Using Pillow for decoding with downscaling, but torchvision\u2019s native decoder is typically faster than decoding using Pillow and then converting to tensor.\n- Decode and then resize, but this is inefficient, see benchmark below.\n\n\n### Additional context\n\n## Benchmark\n\nWe implemented a proof-of-concept and ran performance tests on decoding a 1920x1080 image into 960x540.\nWe compared the following:\n\n- Use existing `decode_jpeg` and resize after.\n- Patch `decode_jpeg` to allow `libjpeg` / `libjpeg-turbo` downscaling via the `size_hint` parameters.\n\nBenchmark results (1000 iters):\n```\n9.91s call     .../test_jpeg.py::test_torchvision_image_load_with_resize_960_540\n4.00s call     .../test_jpeg.py::test_fastjpeg_image_load_with_size_hint_960_540\n```\n~2.5X speed up.\n\nI'm happy to contribute a patch if people consider this useful.\n",
    "url": "https://github.com/pytorch/vision/issues/8986",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-19T19:08:46Z",
    "updated_at": "2025-04-29T07:32:47Z",
    "comments": 3,
    "user": "gyf304"
  },
  {
    "repo": "huggingface/trl",
    "number": 3114,
    "title": "What is the reason for using only one GPU when integration with llm?",
    "body": "At [line](https://github.com/huggingface/trl/blob/main/trl/trainer/grpo_trainer.py#L507)  of the code, when using vllm, a unique GPU device is specified here. However, in fact, it is quite common to use a single vllm instance with multiple GPUs. \n\n1. What is the reason that the code is designed to only select a single GPU? \n2. Where does the '**device**' parameter of this LLM interface eventually get passed to? When I entered this function, I couldn't find the corresponding parameter processing method (this might be a very basic question). \n3. When I changed the '**device**' parameter to **tensor_parallel_size** (and also set the world_size and other parameters), an error occurred. \n\nI've noticed that some other PRs have made modifications to the multi-GPU usage of vllm, but not at the interface where [LLM is used](https://github.com/huggingface/trl/blob/main/trl/trainer/grpo_trainer.py#L507). I'm curious about the reasons behind this. \n\nIf anyone is willing to answer me, I would be very grateful.",
    "url": "https://github.com/huggingface/trl/issues/3114",
    "state": "closed",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-03-19T16:20:03Z",
    "updated_at": "2025-04-05T17:01:33Z",
    "user": "spencergotowork"
  },
  {
    "repo": "huggingface/smollm",
    "number": 67,
    "title": "How to fine tune smolvlm on OCR",
    "body": "Is there any guid to finet-tune smovlm on OCR like in https://huggingface.co/ds4sd/SmolDocling-256M-preview ",
    "url": "https://github.com/huggingface/smollm/issues/67",
    "state": "open",
    "labels": [
      "Image"
    ],
    "created_at": "2025-03-19T14:17:33Z",
    "updated_at": "2025-07-29T13:09:05Z",
    "user": "abdelkareemkobo"
  },
  {
    "repo": "huggingface/peft",
    "number": 2436,
    "title": "Fine-tuning with Multiple LoRAs",
    "body": "Thanks for your valuable work!\n\nI would like to know if it's possible to jointly train two LoRAs while only loading one base model. The overall output depends on the respective outputs of LoRA1 and LoRA2. For example, logits1 is obtained from the base model with LoRA1, and logits2 is obtained from the base model with LoRA2. I have tried the following code\n\n```python\nmodel.add_adapter(lora_1)\nmodel.add_adapter(lora_2)\nmodel.enable_adapters()\n\nmodel.set_adapter(\"lora_1\")\nlogits1 = model(input_ids).logits # use model with lora1 to get output\nmodel.set_adapter(\"lora_2\")\nlogits2 = model(input_ids).logits # use model with lora2 to get output\nlogits = logits1+logits2\nloss=loss_fct(logits, labels)\nloss.backward()\n```\n\nbut it seems there might be some issues:\n1. Once set_adapter(lora2) is called, LoRA1 no longer receives gradients; \n2. If I modify the source code of set_adapter to make both requires_grad=True, would that be correct? \n\nWhat I'm confused about is, after I execute set_adapter(lora2), does the model perform computations using the base model with LoRA2 (as I hope), or does it use the base model with both LoRA1 and LoRA2 combined?\n\nI'm looking forward to your help! Thank you!",
    "url": "https://github.com/huggingface/peft/issues/2436",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-19T13:49:28Z",
    "updated_at": "2025-07-19T05:45:12Z",
    "comments": 7,
    "user": "xymou"
  },
  {
    "repo": "huggingface/setfit",
    "number": 590,
    "title": "How do I disable requests to huggingface.co:443 after training?",
    "body": "I'm currently evaluating setfit in a proof of concept situation. Unfortunately, I'm working behind a company firewall, where I do not have access to the world wide web, only to company-internal URLs.\n\nThat's a bit annoying in terms of downloading models, but I can work around that. More importantly, it seems there are calls to huggingface.co:443 after the training is done, which obviously cannot succeed due to the blocked internet access.\nThat wouldn't be big problem if the timeout were 1 minute or so, but it seems to be more like 5-10 minutes, which is a lot of time wasted just waiting for the results.\n\nHow can I disable these blocking HTTP requests?\n\nMy minimal training pipeline looks somewhat like this (shortened for readability, especially data loading):\n\n```\nmodel = SetFitModel.from_pretrained(\n    \"/local/path/local-bge-small-en-v1.5\",\n    local_files_only=True,\n    multi_target_strategy=\"multi-output\",\n)\ntrain_dataset, test_dataset = a_bunch_of_loading_and_sampling_code_thats_irrelevant_here()\nargs = TrainingArguments(\n    batch_size=128,\n    num_epochs=10,\n    report_to=None\n)\ntrainer = Trainer(\n    model=model,\n    args=args,\n    train_dataset=train_dataset,\n    metric=\"f1\",\n    callbacks=None,\n    column_mapping={\"column\": \"mapping\"},\n    metric_kwargs={\"average\": \"samples\"}\n)\ntrainer.train()\n```\n\nAfter all training steps are done, I get the following console logs:\n```\nINFO:sentence_transformers.trainer:Saving model checkpoint to checkpoints/checkpoint-258\nINFO:sentence_transformers.SentenceTransformer:Save model to checkpoints/checkpoint-258\nRequest [id]: GET https://huggingface.co/api/models/setfit-test/local-bge-small-en-v1.5 (authenticated: False)\nDEBUG:huggingface_hub.utils._http:Request [id]: GET https://huggingface.co/api/models/setfit-test/local-bge-small-en-v1.5 (authenticated: False)\nDEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): huggingface.co:443\n```\nThen nothing happens for about 10 minutes, before I get a \"Batches: 100% [tqdm progress bar]\", which is however finished almost immediately.\n\n\n\nIs there any parameter I can set to disable this call to huggingface? \"report_to=None\" or \"callbacks=None\" don't seem to do the trick.",
    "url": "https://github.com/huggingface/setfit/issues/590",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-19T08:42:12Z",
    "updated_at": "2025-03-19T18:44:12Z",
    "user": "AdrianSchneble"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11114,
    "title": "channel inconsistency in cogvideo Lora training example",
    "body": "### Describe the bug\n\nwhile using the training script in (https://github.com/huggingface/diffusers/blob/main/examples/cogvideo/train_cogvideox_image_to_video_lora.py)\n\nI made a dataset as described in readme and run training.\n\nbut a bug occurred at the forward pass process.It is because the model in-channel is 16 but model_input in-channel is 32.\n\nhow can i fix it?\n\n### Reproduction\n\n                # Sample noise that will be added to the latents\n                noise = torch.randn_like(video_latents)\n\n                # Add noise to the model input according to the noise magnitude at each timestep\n                # (this is the forward diffusion process)\n                noisy_video_latents = scheduler.add_noise(video_latents, noise, timesteps)\n                noisy_model_input = torch.cat([noisy_video_latents, image_latents], dim=2)\n\n                # Prepare rotary embeds\n                image_rotary_emb = (\n                    prepare_rotary_positional_embeddings(\n                        height=args.height,\n                        width=args.width,\n                        num_frames=num_frames,\n                        vae_scale_factor_spatial=vae_scale_factor_spatial,\n                        patch_size=model_config.patch_size,\n                        attention_head_dim=model_config.attention_head_dim,\n                        device=accelerator.device,\n                    )\n                    if model_config.use_rotary_positional_embeddings\n                    else None\n                )\n# Predict the noise residual\n                model_output = transformer(\n                    hidden_states=noisy_model_input,\n                    encoder_hidden_states=prompt_embeds,\n                    timestep=timesteps,\n                    image_rotary_emb=image_rotary_emb,\n                    return_dict=False,\n                )[0]\n\n### Logs\n\n```shell\n[rank0]: File \"train_cogvideox_i_t2v_lora_raw.py\", line 1426, in main\n[rank0]: model_output = transformer(\n[rank0]: ^^^^^^^^^^^^\n[rank0]: File \"/share/home/u21012/.conda/envs/snvds/lib/python3.11/site-packages/torch/nn/modules/module.py\", line 1736, in _wrapped_call_impl\n[rank0]: return self._call_impl(*args, **kwargs)\n[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]: File \"/share/home/u21012/.conda/envs/snvds/lib/python3.11/site-packages/torch/nn/modules/module.py\", line 1747, in _call_impl\n[rank0]: return forward_call(*args, **kwargs)\n[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]: File \"/share/home/u21012/.conda/envs/snvds/lib/python3.11/site-packages/torch/nn/parallel/distributed.py\", line 1643, in forward\n[rank0]: else self._run_ddp_forward(*inputs, **kwargs)\n[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]: File \"/share/home/u21012/.conda/envs/snvds/lib/python3.11/site-packages/torch/nn/parallel/distributed.py\", line 1459, in _run_ddp_forward\n[rank0]: return self.module(*inputs, **kwargs) # type: ignore[index]\n[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]: File \"/share/home/u21012/.conda/envs/snvds/lib/python3.11/site-packages/torch/nn/modules/module.py\", line 1736, in _wrapped_call_impl\n[rank0]: return self._call_impl(*args, **kwargs)\n[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]: File \"/share/home/u21012/.conda/envs/snvds/lib/python3.11/site-packages/torch/nn/modules/module.py\", line 1747, in _call_impl\n[rank0]: return forward_call(*args, **kwargs)\n[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]: File \"/share/home/u21012/.conda/envs/snvds/lib/python3.11/site-packages/accelerate/utils/operations.py\", line 819, in forward\n[rank0]: return model_forward(*args, **kwargs)\n[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]: File \"/share/home/u21012/.conda/envs/snvds/lib/python3.11/site-packages/accelerate/utils/operations.py\", line 807, in __call__\n[rank0]: return convert_to_fp32(self.model_forward(*args, **kwargs))\n[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]: File \"/share/home/u21012/.conda/envs/snvds/lib/python3.11/site-packages/torch/amp/autocast_mode.py\", line 44, in decorate_autocast\n[rank0]: return func(*args, **kwargs)\n[rank0]: ^^^^^^^^^^^^^^^^^^^^^\n[rank0]: File \"/share/home/u21012/.conda/envs/snvds/lib/python3.11/site-packages/diffusers/models/transformers/cogvideox_transformer_3d.py\", line 476, in forward\n[rank0]: hidden_states = self.patch_embed(encoder_hidden_states, hidden_states)\n[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]: File \"/share/home/u21012/.conda/envs/snvds/lib/python3.11/site-packages/torch/nn/modules/module.py\", line 1736, in _wrapped_call_impl\n[rank0]: return self._call_impl(*args, **kwargs)\n[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]: File \"/share/home/u21012/.conda/envs/snvds/lib/python3.11/site-packages/torch/nn/modules/module.py\", line 1747, in _call_impl\n[rank0]: return forward_call(*args, **kwargs)\n[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]: File \"/share/home/u21012/.conda/envs/snvds/lib/python3.11/site-packages/diffusers/models/embeddings.py\", line 715, in forward\n[rank0]: image",
    "url": "https://github.com/huggingface/diffusers/issues/11114",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2025-03-19T07:55:00Z",
    "updated_at": "2025-04-18T15:02:52Z",
    "comments": 2,
    "user": "MrTom34"
  },
  {
    "repo": "huggingface/trl",
    "number": 3109,
    "title": "where is file https://github.com/huggingface/trl/blob/main/trl/scripts/sft.py",
    "body": "### Reproduction\n\n```python\nfrom trl import ...\n\n```\n\noutputs:\n\n```\nTraceback (most recent call last):\n  File \"example.py\", line 42, in <module>\n    ...\n```\n\n\n### System Info\n\nhttps://github.com/huggingface/trl/blob/main/trl/scripts/sft.py\n\n### Checklist\n\n- [x] I have checked that my issue isn't already filed (see [open issues](https://github.com/huggingface/trl/issues?q=is%3Aissue))\n- [x] I have included my system information\n- [x] Any code provided is minimal, complete, and reproducible ([more on MREs](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks))\n- [x] Any code provided is properly formatted in code blocks, (no screenshot, [more on code blocks](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks))\n- [x] Any traceback provided is complete",
    "url": "https://github.com/huggingface/trl/issues/3109",
    "state": "closed",
    "labels": [
      "\ud83d\udc1b bug",
      "\ud83c\udfcb SFT"
    ],
    "created_at": "2025-03-19T02:20:26Z",
    "updated_at": "2025-03-19T02:22:23Z",
    "user": "zh794390558"
  },
  {
    "repo": "pytorch/xla",
    "number": 8853,
    "title": "Have documentation to point to all our environment variables and their meaning",
    "body": "## \ud83d\udcda Documentation\n\nPrepare a documentation to point to all our environment variables and their meaning. This world should be a forcing function to (1) make the yaml file up to date (2) rename it to something like `env_vraiable_definitions.yaml`, (3) start a workstream to trim down on these env variables to avoid usability pain.\n\nhttps://github.com/pytorch/xla/blob/master/configuration.yaml\n\n\n@tengyifei @yaoshiang for viz and support",
    "url": "https://github.com/pytorch/xla/issues/8853",
    "state": "open",
    "labels": [
      "usability",
      "documentation"
    ],
    "created_at": "2025-03-19T00:23:51Z",
    "updated_at": "2025-03-19T00:26:22Z",
    "comments": 1,
    "user": "miladm"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3446,
    "title": "ValueError: Invalid input type <class 'bool'> encountered when compiling FLUX.1-dev model with Torch-TensorRT",
    "body": "## \u2753 Question\n\nWhen trying to compile the FLUX.1-dev model using Torch-TensorRT following the official example/blog post, I'm encountering a `ValueError` during the `torch_tensorrt.dynamo.compile()` step. The error suggests there's an issue with input parsing where it's encountering a boolean value that it doesn't know how to handle.\n\n## What you have already tried\n\nI'm following the exact steps from the example provided in the documentation (https://pytorch.org/TensorRT/tutorials/_rendered_examples/dynamo/torch_export_flux_dev.html). I've:\n1. Successfully loaded the FLUX.1-dev model\n2. Defined the dynamic shapes properly\n3. Created dummy inputs with the recommended dimensions\n4. Successfully exported the model using `_export`\n5. Attempted to compile with Torch-TensorRT using the same parameters shown in the example\n\nThe error occurs specifically at the compilation step:\n\n```python\ntrt_gm = torch_tensorrt.dynamo.compile(\n    ep,\n    inputs=dummy_inputs,\n    enabled_precisions={torch.float32},\n    truncate_double=True,\n    min_block_size=1,\n    use_fp32_acc=True,\n    use_explicit_typing=True,\n)\n```\n\n## Environment\n\n> Build information about Torch-TensorRT can be found by turning on debug messages\n\n - PyTorch Version (e.g., 1.0): 2.6.0\n - CPU Architecture: \n - OS (e.g., Linux): Linux\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): \n - Build command you used (if compiling from source):\n - Are you using local sources or building from archives:\n - Python version: 3.11.10\n - CUDA version: cuda_12.4.r12.4/compiler.34097967_0\n - GPU models and configuration: A100\n - Any other relevant information:\n\n## Additional context\n\nThe error message specifically points to an issue with boolean input types:\n\n```\nValueError: Invalid input type <class 'bool'> encountered in the dynamo_compile input parsing. Allowed input types: {torch_tensorrt.Input, torch.Tensor, list, tuple, dict}\n```\n\nIt looks like the `return_dict=False` parameter in my dummy inputs is causing the issue since it's a boolean value. The example shows that this should be supported, but the error suggests that booleans aren't handled correctly in the input parsing logic.\n\nFull traceback:\n```\n---------------------------------------------------------------------------\nValueError                                Traceback (most recent call last)\n/workspace/flux-dev-tensorrt.ipynb Cell 4 line 1\n----> <a href='vscode-notebook-cell://ssh-remote%2B216.81.245.143/workspace/flux-dev-tensorrt.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0'>1</a> trt_gm = torch_tensorrt.dynamo.compile(\n      <a href='vscode-notebook-cell://ssh-remote%2B216.81.245.143/workspace/flux-dev-tensorrt.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=1'>2</a>     ep,\n      <a href='vscode-notebook-cell://ssh-remote%2B216.81.245.143/workspace/flux-dev-tensorrt.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=2'>3</a>     inputs=dummy_inputs,\n      <a href='vscode-notebook-cell://ssh-remote%2B216.81.245.143/workspace/flux-dev-tensorrt.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=3'>4</a>     enabled_precisions={torch.float32},\n      <a href='vscode-notebook-cell://ssh-remote%2B216.81.245.143/workspace/flux-dev-tensorrt.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=4'>5</a>     truncate_double=True,\n      <a href='vscode-notebook-cell://ssh-remote%2B216.81.245.143/workspace/flux-dev-tensorrt.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=5'>6</a>     min_block_size=1,\n      <a href='vscode-notebook-cell://ssh-remote%2B216.81.245.143/workspace/flux-dev-tensorrt.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=6'>7</a>     use_fp32_acc=True,\n      <a href='vscode-notebook-cell://ssh-remote%2B216.81.245.143/workspace/flux-dev-tensorrt.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=7'>8</a>     use_explicit_typing=True,\n      <a href='vscode-notebook-cell://ssh-remote%2B216.81.245.143/workspace/flux-dev-tensorrt.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=8'>9</a> )\n\nFile /usr/local/lib/python3.11/dist-packages/torch_tensorrt/dynamo/_compiler.py:606, in compile(exported_program, inputs, arg_inputs, kwarg_inputs, device, disable_tf32, assume_dynamic_shape_support, sparse_weights, enabled_precisions, engine_capability, debug, num_avg_timing_iters, workspace_size, dla_sram_size, dla_local_dram_size, dla_global_dram_size, truncate_double, require_full_compilation, min_block_size, torch_executed_ops, torch_executed_modules, pass_through_build_failures, max_aux_streams, version_compatible, optimization_level, use_python_runtime, use_fast_partitioner, enable_experimental_decompositions, dryrun, hardware_compatible, timing_cache_path, lazy_engine_init, cache_built_engines, reuse_cached_engines, engine_cache_dir, engine_cache_size, custom_engine_cache, use_explicit_typing, use_fp32_acc, refit_identical_engine_weights, strip_engine_weights, immutable_weights, enable_weight_streaming, **kwargs)\n    603     arg_inputs = [arg_inputs]  # type: ignore\n    605 # Prepare torch_trt inputs\n--> 606 trt_arg_inputs: Sequence[Input] = prepare_inputs(arg_inputs)\n    607 trt_kwarg",
    "url": "https://github.com/pytorch/TensorRT/issues/3446",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-18T21:55:16Z",
    "updated_at": "2025-03-21T23:57:54Z",
    "user": "yachty66"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1245,
    "title": "QuestionAnsweringOutput does not return start/end index",
    "body": "### Question\n\nQuestion/Answering pipeline does not seem to return start/end index.\n\nconsole output example\n\n``` { answer: 'anywhere', score: 0.8719829671013909 }```\n\nsource code in pipeline.js\n``` \nclass QuestionAnsweringPipeline ...\n\n// TODO add start and end?\n// NOTE: HF returns character index\n                toReturn.push({\n                    answer, score\n                });```\n",
    "url": "https://github.com/huggingface/transformers.js/issues/1245",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-18T21:20:25Z",
    "updated_at": "2025-03-18T21:20:25Z",
    "user": "sleep9"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1243,
    "title": "Transformer.js compatibility with Angular17",
    "body": "### Question\n\nI want to add transformer.js in Angular 17 project. Getting several errors can some one guide me how to add transformer.js with Angular project",
    "url": "https://github.com/huggingface/transformers.js/issues/1243",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-18T16:15:30Z",
    "updated_at": "2025-03-24T21:27:11Z",
    "user": "AnuragPant01"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11108,
    "title": "Is there a way to generate a single image using multiple GPUs?",
    "body": "This is related to #2977 and #3392, but I would like to know how to generate a single image using multiple GPUs. If such a method does not exist, I would also like to know if Accelerate's [Memory-efficient pipeline parallelism](https://huggingface.co/docs/accelerate/usage_guides/distributed_inference#memory-efficient-pipeline-parallelism-experimental) can be applied to this.",
    "url": "https://github.com/huggingface/diffusers/issues/11108",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2025-03-18T13:43:05Z",
    "updated_at": "2025-05-02T21:00:31Z",
    "comments": 12,
    "user": "suzukimain"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 876,
    "title": "Multiple GPU Training Support",
    "body": "Hi, lerobot team!\n\nThanks for the great work and organized content.\n\nAre there plans to support PyTorch's Distributed Data Parallel (DDP) training in this framework? ",
    "url": "https://github.com/huggingface/lerobot/issues/876",
    "state": "closed",
    "labels": [
      "enhancement",
      "question",
      "stale"
    ],
    "created_at": "2025-03-18T12:44:43Z",
    "updated_at": "2025-10-07T02:26:45Z",
    "user": "kingchou007"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 521,
    "title": "How to use my own dataset in sft?",
    "body": "Could you please give an instruction/demo on how to use my own dataset (any column name) to apply sft?",
    "url": "https://github.com/huggingface/open-r1/issues/521",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-18T11:38:19Z",
    "updated_at": "2025-03-18T14:21:36Z",
    "user": "dongdongzhaoUP"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11103,
    "title": "Which repo should I use for LTX-Video 0.9.5 diffusers",
    "body": "I see the changes are merged\n\nChecked repo and it is empty\nhttps://huggingface.co/Lightricks/LTX-Video-0.9.5/tree/main\n\nNoticed in test pipeline it is \nrepo = \"YiYiXu/ltx-95\"\n\nSo can I safely assume that the above can be used?\n\n\n@yiyixuxu ",
    "url": "https://github.com/huggingface/diffusers/issues/11103",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-18T10:50:41Z",
    "updated_at": "2025-03-18T11:00:34Z",
    "comments": 2,
    "user": "nitinmukesh"
  },
  {
    "repo": "huggingface/trl",
    "number": 3103,
    "title": "How are Lora parameters used in VLLM generation? (_move_model_to_vllm in GRPO trainer)",
    "body": "From the following code does not see the process of moving lora training parameters to VLLM? How guarantee that generated with the latest parameters? Can someone help explain.\n<img width=\"1123\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/62cacf0a-0197-4210-b326-c4e24b9b6701\" />\n\nAnd I printed the vllm loaded model, and I didn't see LORA-related parameters either.\n<img width=\"1157\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/8d085743-97b9-4d9e-9c4b-558153a6cb05\" />\n\nMore, LORARequest was also not seen in the generation calls\n<img width=\"1117\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/3193f66f-607d-4b0b-8903-f5f1b45d7adc\" />\n",
    "url": "https://github.com/huggingface/trl/issues/3103",
    "state": "closed",
    "labels": [
      "\u2753 question",
      "\u26a1 PEFT"
    ],
    "created_at": "2025-03-18T09:24:48Z",
    "updated_at": "2025-03-24T18:32:19Z",
    "user": "cuiyuhao1996"
  },
  {
    "repo": "pytorch/xla",
    "number": 8847,
    "title": "How to compile torch-xla form source?",
    "body": "## \u2753 Questions and Help\nI have reviewed the relevant materials on torch-xla but have not found a clear guide on how to compile torch-xla from source. The instructions mentioned on [this page](https://pytorch.org/xla/master/contribute/bazel.html) are somewhat disorganized. Could you provide a detailed compilation process? I need to build it from source to verify my modifications. Thanks\nNow  I  am use   python setup.py develop to build from source code , but encounter ERROR as follows: \nthe command is \nXLA_CUDA=1  python setup.py install , and i am use the torch-xla v2.5.1\n\n![Image](https://github.com/user-attachments/assets/ac8787a1-c50c-4480-96b1-76f325876af6)\n",
    "url": "https://github.com/pytorch/xla/issues/8847",
    "state": "open",
    "labels": [
      "question",
      "build"
    ],
    "created_at": "2025-03-18T02:31:05Z",
    "updated_at": "2025-03-24T17:40:13Z",
    "user": "south-ocean"
  },
  {
    "repo": "pytorch/xla",
    "number": 8846,
    "title": "Need a documentation page that always hosts the latest stable documentation",
    "body": "## \ud83d\udcda Documentation\n\nPyTorch has https://pytorch.org/docs/stable/index.html that always contains the documentation for the latest stable branch.\n\nThe same URL variant doesn't work for PyTorch/XLA https://pytorch.org/xla/release/stable/index.html\n\n",
    "url": "https://github.com/pytorch/xla/issues/8846",
    "state": "open",
    "labels": [
      "enhancement",
      "documentation"
    ],
    "created_at": "2025-03-18T00:19:41Z",
    "updated_at": "2025-05-01T07:46:15Z",
    "comments": 3,
    "user": "tengyifei"
  },
  {
    "repo": "pytorch/vision",
    "number": 8980,
    "title": "nvjpeg missing from all linux GPU wheel build jobs",
    "body": "Linux CUDA: https://github.com/pytorch/vision/actions/runs/13901104094/job/38892841516?pr=8601\nLinux aarch64 CUDA: https://github.com/pytorch/vision/actions/runs/13901104115/job/38892844332?pr=8601\n\nFailing the smoke test part with:\n\n```\n+ echo 'pytorch/vision/test/smoke_test.py found'\n+ conda run -p /__w/_temp/conda_environment_13901104115 python pytorch/vision/test/smoke_test.py\n/__w/_temp/conda_environment_13901104115/lib/python3.9/site-packages/torchvision/io/image.py:14: UserWarning: Failed to load image Python extension: 'libnvjpeg.so.12: cannot open shared object file: No such file or directory'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?\n\n```",
    "url": "https://github.com/pytorch/vision/issues/8980",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-17T15:05:04Z",
    "updated_at": "2025-03-18T11:28:18Z",
    "comments": 1,
    "user": "NicolasHug"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7457,
    "title": "Document the HF_DATASETS_CACHE env variable",
    "body": "### Feature request\n\nHello,\n\nI have a use case where my team is sharing models and dataset in shared directory to avoid duplication.\nI noticed that the [cache documentation for datasets](https://huggingface.co/docs/datasets/main/en/cache) only mention the `HF_HOME` environment variable but never the `HF_DATASETS_CACHE`.\n\nIt should be nice to add `HF_DATASETS_CACHE` to datasets documentation if it's an intended feature.\nIf it's not, I think a depreciation warning would be appreciated.\n\n### Motivation\n\nThis variable is fully working and similar to what `HF_HUB_CACHE` does for models, so it's nice to know that this exists. This seems to be a quick change to implement.\n\n### Your contribution\n\nI could contribute since this is only affecting a small portion of the documentation",
    "url": "https://github.com/huggingface/datasets/issues/7457",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-03-17T12:24:50Z",
    "updated_at": "2025-05-06T15:54:39Z",
    "comments": 4,
    "user": "LSerranoPEReN"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 149315,
    "title": "How to Retain Computational Graph in torch.func.jvp() for Parameter Gradients?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\n## Help Needed: Making `torch.func.jvp` Work with `torch.autograd.grad`\n\nHi all,\n\nThanks so much for all the functionalities of pytorch! I'm trying to make the following code valid (and efficient):\n\n```python\noutput_values, output_grads = torch.func.jvp(model, input_value, input_grads)\ntorch.autograd.grad(output_values, tuple(model.parameters()), grad_outputs=output_grads)\n```\n\nOne way to phrase it is that we have a function $f: \\mathbb{R}^d \\times \\mathbb{R}^m \\to \\mathbb{R}^p$. Then, given  $(x, t_x) \\in \\mathbb{R}^{d}\\times \\mathbb{R}^{d}$, the goal is to compute: $y = f(x,w)$, the tangent vector $t_y = D_1 f(x, w).t_x$ and the gradient $t_w = D_2 f(x, w)^T.t_y$, in order to materialize the mapping:  $((x, t_x), w) \\to ((y, t_y), t_w)$.\n\nCurrently, the code fails because `torch.func.jvp()` does not retain the computational graph of the forward pass, which makes sense for the dual vectors associated with the input. However, for example, I know it's possible to efficiently decouple the computation of input gradients and weight gradients by selectively extracting parts of the computational graph. \n\nI'd like to do something similar here. My goal is to develop a procedure that achieves this while requiring only a single forward pass (and freeing unnecessary memory).\n\nWould you have any insights on how to implement this efficiently? I believe it's related to [this paper](https://arxiv.org/pdf/2402.14212), which provides a solution in JAX, but I think it should also be possible in PyTorch.\n\nAny guidance or suggestions would be greatly appreciated\u2014thanks in advance for your help!\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @ezyang @albanD @gqchen @pearu @nikitaved @soulitzer @Varal7 @xmfan @zou3519 @Chillee @samdow @kshitij12345",
    "url": "https://github.com/pytorch/pytorch/issues/149315",
    "state": "open",
    "labels": [
      "module: autograd",
      "triaged",
      "module: functorch"
    ],
    "created_at": "2025-03-17T12:10:21Z",
    "updated_at": "2025-06-24T14:30:39Z",
    "user": "edouardoyallon"
  },
  {
    "repo": "huggingface/transformers",
    "number": 36762,
    "title": "When what needs to be loaded is in the cache directory, there is no need to make a request to the remote",
    "body": "### Feature request\n\nWhen what needs to be loaded is in the cache directory, there is no need to make a request to the remote.\n\n\n\n### Motivation\n\nI noticed that when `AutoTokenizer` loads a file using `from_pretrained`, it first tries to load it from a cached directory when `pretrained_model_name_or_path` is a model_id (such as gpt2).\n\nHowever, `commit_hash` is `None` by default, e.g. `AutoTokenizer` will call `get_tokenizer_config` to load the configuration file, where the code to get `commit_hash` is: `commit_hash = kwargs.get(\"_commit_ hash\u201d, None)`. \n\nSince it is None, the `cached_file` method doesn't know where the corresponding file is actually stored, so it uses the `hf_hub_download` method to request the corresponding `commit_hash` first. \nAlthough this request is very simple and infrequent, **in offline environments (e.g., a company or school intranet that does not allow access to the extranet), it will report an error.**\n\nI know I can copy files from the cache to my project directory, but the host is usually used by multiple people, which means it may have to be copied many times, which defeats the purpose of using a cached directory in the first place.\n\n### Your contribution\n\n**I suggest changing `commit_hash = kwargs.get(\u201c_commit_hash\u201d, None)` to `commit_hash = kwargs.get(\u201c_commit_hash\u201d, \u201cmain\u201d)`**.",
    "url": "https://github.com/huggingface/transformers/issues/36762",
    "state": "closed",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-03-17T11:20:24Z",
    "updated_at": "2025-03-19T15:49:04Z",
    "user": "JinFish"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11086,
    "title": "RuntimeError after using apply_group_offloading on diffusers: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same",
    "body": "Can anyone help me?\nI used WanX's diffusers and used apply_group_offloading according to url: https://huggingface.co/docs/diffusers/main/en/optimization/memory. \nThe code is as follows:\n```\nimage_encoder = CLIPVisionModel.from_pretrained(local_model_path, subfolder=\"image_encoder\", torch_dtype=torch.float32)\nvae = AutoencoderKLWan.from_pretrained(local_model_path, subfolder=\"vae\", torch_dtype=torch.float32)\nscheduler_b = UniPCMultistepScheduler(prediction_type=\"flow_prediction\", use_flow_sigmas=True, flow_shift=5.0)\npipe = WanImageToVideoPipeline.from_pretrained(local_model_path, vae=vae, image_encoder=image_encoder, scheduler=scheduler_b, torch_dtype=torch.bfloat16)\npipe.transformer.enable_group_offload(onload_device=torch.device(\"cuda\"), offload_device=torch.device(\"cpu\"), offload_type=\"block_level\", num_blocks_per_group=1, use_stream=True)\napply_group_offloading(pipe.text_encoder, onload_device=torch.device(\"cuda\"), offload_type=\"block_level\", num_blocks_per_group=1, use_stream=True)\napply_group_offloading(pipe.vae, onload_device=torch.device(\"cuda\"), offload_type=\"block_level\", num_blocks_per_group=1, use_stream=True)\napply_group_offloading(pipe.image_encoder, onload_device=torch.device(\"cuda\"), offload_type=\"block_level\", num_blocks_per_group=1, use_stream=True)\n```\n\nThen print the device information:\n`Before apply_offload:\ntext_encoder device: cpu\ntransformer device: cpu\nvae device: cpu\nimage_encoder device: cpu\nstart to group_offload_block_1_stream\nAfter apply_offload:\ntext_encoder device: cpu\ntransformer device: cpu\nvae device: cpu\nimage_encoder device: cpu`\n\nFinally, an exception is thrown:\n`    return F.conv3d(\n           ^^^^^^^^^\nRuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same`\n\nDoes anyone know how to fix this? Thanks a lot.",
    "url": "https://github.com/huggingface/diffusers/issues/11086",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-03-17T11:03:48Z",
    "updated_at": "2025-04-16T15:03:36Z",
    "comments": 5,
    "user": "tiga-dudu"
  },
  {
    "repo": "huggingface/trl",
    "number": 3093,
    "title": "How to use a custom function as the reward model for PPO training",
    "body": "The new version of TRL's PPOtrainer requires Module as the reward model, but I need a custom function calculation to calculate the reward. I tried to lower the TRL version to 0.11.4, but the old version does not seem to support the peft model. I get the following error:\nValueError: model must be a PreTrainedModelWrapper, got <class 'peft.peft_model.PeftModelForCausalLM'> - supported architectures are: (<class 'trl.models.modeling_value_head.AutoModelForCausalLMWithValueHead'>, <class 'trl.models.modeling_value_head.AutoModelForSeq2SeqLMWithValueHead'>)\nHowever, I see the is_peft_model parameter in PPOConfig, but there is no such parameter as peft_config in PPOTrainer\nSo I am very troubled now. Is there a good brother who can help me?\n",
    "url": "https://github.com/huggingface/trl/issues/3093",
    "state": "open",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb PPO",
      "\u26a1 PEFT"
    ],
    "created_at": "2025-03-16T09:02:25Z",
    "updated_at": "2025-03-20T10:33:02Z",
    "user": "JWQZ"
  },
  {
    "repo": "huggingface/ai-deadlines",
    "number": 19,
    "title": "How to know the rankings of a conference?",
    "body": "@NielsRogge, may I know where we can get the conference rankings?",
    "url": "https://github.com/huggingface/ai-deadlines/issues/19",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-15T18:32:34Z",
    "updated_at": "2025-03-15T21:45:02Z",
    "user": "julurisaichandu"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11063,
    "title": "prepare_attention_mask - incorrect padding?",
    "body": "### Describe the bug\n\nI'm experimenting with attention masking in Stable Diffusion (so that padding tokens aren't considered for cross attention), and I found that UNet2DConditionModel doesn't work when given an `attention_mask`.\n\nhttps://github.com/huggingface/diffusers/blob/8ead643bb786fe6bc80c9a4bd1730372d410a9df/src/diffusers/models/attention_processor.py#L740\n\nFor the attn1 blocks (self-attention), the target sequence length is different from the current length (target 4096, but it's only 77 for a typical CLIP output). The padding routine pads by *adding* `target_length` zeros to the end of the last dimension, which results in a sequence length of 4096 + 77, rather than the desired 4096. I think it should be:\n\n```diff\n- attention_mask = F.pad(attention_mask, (0, target_length), value=0.0)\n+ attention_mask = F.pad(attention_mask, (0, target_length - current_length), value=0.0)\n```\n\n`encoder_attention_mask` works fine  - it's passed to the attn2 block and no padding ends up being necessary.\n\nIt seems that this would additionally fail if current_length were greater than target_length, since you can't pad by a negative amount, but I don't know that that's a practical concern.\n\n(I know that particular masking isn't even semantically valid, but that's orthogonal to this issue!)\n\n### Reproduction\n\n```python\n# given a Stable Diffusion pipeline\n# given te_mask = tokenizer_output.attention_mask\npipeline.unet(latent_input, timestep, text_encoder_output, attention_mask=te_mask).sample\n```\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.33.0.dev0\n- Platform: Linux-6.8.0-55-generic-x86_64-with-glibc2.39\n- Running on Google Colab?: No\n- Python version: 3.10.11\n- PyTorch version (GPU?): 2.6.0+cu124 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.28.1\n- Transformers version: 4.48.3\n- Accelerate version: 1.3.0\n- PEFT version: not installed\n- Bitsandbytes version: 0.45.2\n- Safetensors version: 0.5.2\n- xFormers version: 0.0.29.post2\n- Accelerator: NVIDIA GeForce RTX 3060, 12288 MiB\nNVIDIA GeForce RTX 4060 Ti, 16380 MiB\n- Using GPU in script?: <fill in>\n- Using distributed or parallel set-up in script?: No\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11063",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2025-03-14T19:01:01Z",
    "updated_at": "2025-04-14T15:03:14Z",
    "comments": 2,
    "user": "cheald"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1237,
    "title": "Using pipeline API in Mobile Devices",
    "body": "### Question\n\nHow can I do the pipeline running in mobile devices?\n\nLike here:\npipeline('background-removal', 'briaai/RMBG-1.4', { device: \"webgpu\" })\n\nOr it depends from the model avaliable?\n\nI don't find documentations about pipeline API options, like 'device' and others params...",
    "url": "https://github.com/huggingface/transformers.js/issues/1237",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-14T17:55:27Z",
    "updated_at": "2025-05-11T19:58:39Z",
    "user": "LuSrodri"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 869,
    "title": "How to fine-tune a custom model for Ollama?",
    "body": "Probably a stupid question, but I'm trying to upload a .csv dataset and fine-tune an 8B model in Autotrain. But when I add the model name taken from Ollama (e.g. deepseek-r1:8b or DeepSeek-R1-Distill-Llama-8B-NexaQuant) and try to train, I get an error. \n\n  validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)\npydantic_core._pydantic_core.ValidationError: 1 validation error for LLMTrainingParams\ntoken\n  Input should be a valid string [type=string_type, input_value=<starlette.templating._Te...bject at 0x7f7e9daa3a00>, input_type=_TemplateResponse]\n    For further information visit https://errors.pydantic.dev/2.10/v/string_type\n\nI'm too stupid to know what's wrong or how to correct it, so any help gratefully received. I can fine-tune with existing models in the drop-down list OK, so the setup seems to be working.",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/869",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2025-03-14T14:46:23Z",
    "updated_at": "2025-05-03T15:01:33Z",
    "user": "nigelp"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11060,
    "title": "`prepare_image` in Kandinsky pipelines doesn't support `torch.Tensor`",
    "body": "Hi, I want to report a bug in Kandinsky pipelines.\n\nhttps://github.com/huggingface/diffusers/blob/2f0f281b0d808c05bc7a974e68d298a006dd120a/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_img2img.py#L413-L420\n\nAccording to the above contents, elements in `image` can be either `PIL.Image.Image` or `torch.Tensor`.\n\nhttps://github.com/huggingface/diffusers/blob/2f0f281b0d808c05bc7a974e68d298a006dd120a/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_img2img.py#L98-L104\n\nHowever, the `prepare_image` function is only for `PIL.Image.Image`, and does not support `torch.Tensor`.\n\nCan you resolve this problem by implementing an image resize function for `torch.Tensor`?",
    "url": "https://github.com/huggingface/diffusers/issues/11060",
    "state": "closed",
    "labels": [
      "good first issue",
      "help wanted"
    ],
    "created_at": "2025-03-14T10:34:30Z",
    "updated_at": "2025-04-21T18:41:10Z",
    "comments": 1,
    "user": "dk-hong"
  },
  {
    "repo": "huggingface/Math-Verify",
    "number": 39,
    "title": "How to choose ExprExtractionConfig() and LatexExtractionConfig()",
    "body": "Hi. Thanks for your awesome tool. \n\nI want to ask how I should set the configuration when the answer is either LaTeX or Expr? I found that if the case below (without $$ $$) is not set, the output will be false when the expected result is true.\n\n```python\nfrom math_verify import parse, verify\n\ngold = parse(\"\\\\frac{\\sqrt{3}}{3}\")\nanswer = parse(\"sqrt(3)/3\")\n\n# Order here is important!\nverify(gold, answer)\n```",
    "url": "https://github.com/huggingface/Math-Verify/issues/39",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-13T23:36:27Z",
    "updated_at": "2025-04-28T20:42:03Z",
    "user": "Zhuofeng-Li"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11055,
    "title": "Training on unconditional image generation creates colorized images",
    "body": "### Describe the bug\n\nHi, I'm trying to follow the tutorial from unconditional image generation on my own dataset, and I'm getting weirdly colored images. I originally thought it was due to RGB/BGR channel order, but I've switched it around and got the same result. Do you have any suggestions of how to fix it? \n\n### Reproduction\n\nNA\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nNA\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11055",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2025-03-13T20:47:22Z",
    "updated_at": "2025-04-13T15:02:53Z",
    "comments": 1,
    "user": "esizikova-fda"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 860,
    "title": "Modify camera async_read/read API to return a dictionary instead of tuple for better compatability?",
    "body": "Currently the intel real sense camera api supports returning either a single rgb image or a rgb image and depth image as a 2-uple\n\nhttps://github.com/huggingface/lerobot/blob/3c0a209f9fac4d2a57617e686a7f2a2309144ba2/lerobot/common/robot_devices/cameras/intelrealsense.py#L440-L443\n\nHowever this is not super compatible to work with since not all cameras might return two values (open cv one only does rgb?). For a potentially better API would it be possible to have the async read / read functions always return a dictionary instead with some standard names and data types for the types of image data returned?\n\ne.g.\n\n```\nreturn dict(rgb=..., depth=...)\n```\n\nThis way it is also easier for me to check if the returned data has depth data or not. The current solution is a bit complicated as I need to check if its the IntelRealSenseCamera and if its config has use_depth=True or not.\n\nThanks!",
    "url": "https://github.com/huggingface/lerobot/issues/860",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2025-03-13T18:44:20Z",
    "updated_at": "2025-05-26T09:28:48Z",
    "user": "StoneT2000"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1230,
    "title": "Using background-removal pipeline produces images with 50% opacity",
    "body": "### Question\n\nI have a issue using the background-removal pipeline. Some models returns the exacly same image, but 50% opacite (RGBA: [X, Y, Z, 127]). So other models, returns an error like this: Uncaught Error: Unsupported model type: null transformers:1:670067.\n\nHow can I procede?",
    "url": "https://github.com/huggingface/transformers.js/issues/1230",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-13T17:00:13Z",
    "updated_at": "2025-03-25T22:28:37Z",
    "user": "LuSrodri"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 858,
    "title": "DATASET conversion from V.16 to V2.0 \u274c\u274c\u274c",
    "body": "\nHi @aliberts @Cadene\nThanks for your amazing work. I have one doubt, I forked lerobot repo and training some policies, now i want to convert to V1.6 to V2.0, but my episodes are .pth format not in parquet format. I check remaining issues, i didn't find anything. right now while conversion it takes only parquet format.\nimage\nCan you please help me here\nThanks\n\n\n### Information\n\n- [x] One of the scripts in the examples/ folder of LeRobot\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\ntried covert_v1_to_v2.py\nBut its expecting only parquet but mine is pth\n\n### Expected behavior\n\n![Image](https://github.com/user-attachments/assets/f682d94d-e540-49c4-ba44-e059c9c073f2)",
    "url": "https://github.com/huggingface/lerobot/issues/858",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2025-03-13T15:22:51Z",
    "updated_at": "2025-10-07T02:26:46Z",
    "user": "Kacchan16"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2215,
    "title": "not able to convert DeepSeek-R1 into Onnx using optimum-cli",
    "body": "### System Info\n\n```shell\nv1.24.0\n```\n\n### Who can help?\n\n@michaelbenayoun \n\nI'm trying to convert DeepSeek-R1 into a onnx format, but i'm being presented with \n\n> ValueError: Loading deepseek-ai/DeepSeek-R1 requires you to execute the configuration file in that repo on your local machine. Make sure you have read the code there to avoid malicious use, then set the option `trust_remote_code=True` to remove this error.\n\nI'm trying to do this using optimum-cli\n\n`optimum-cli export onnx --model deepseek-ai/DeepSeek-R1 --task causal-lm C:\\DeepSeek-R1-Onnx`\n\nCan i somehow enable this using cli, or do i have to manually download the model into my system and using cli i would have to perform onnx instead of repo link\n\nif yes, then how can i enable trust_remote_code=True once i download the repo?\n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\noptimum-cli export onnx --model deepseek-ai/DeepSeek-R1 --task causal-lm C:\\DeepSeek-R1-Onnx\n\nRunning this command doesn't provide an output\n\n### Expected behavior\n\nThe conversion should start for DeepSeek-R1 to ONNX",
    "url": "https://github.com/huggingface/optimum/issues/2215",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-03-13T07:07:10Z",
    "updated_at": "2025-05-13T11:13:36Z",
    "comments": 1,
    "user": "volcano619"
  },
  {
    "repo": "huggingface/trl",
    "number": 3066,
    "title": "How to switch on the multi-GPU for GRPOTrainer?",
    "body": "Issue: \nOOM errors during GRPO training - Need multi-GPU support for combined VRAM\n\nProblem Description:\nI'm encountering Out-of-Memory (OOM) errors while using GRPOTrainer to train reasoning capabilities similar to DeepSeek R1.\n\nMy Question:\nHow to switch on multi-GPU support for GRPOTrainer to utilize the combined VRAM across multiple GPUs (e.g., 40GB \u00d7 8 cards = 320GB total VRAM)?\n\nThank you!",
    "url": "https://github.com/huggingface/trl/issues/3066",
    "state": "closed",
    "labels": [
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-03-13T05:01:12Z",
    "updated_at": "2025-04-05T17:04:50Z",
    "user": "tjoymeed"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 149096,
    "title": "How to determine which part of torch.compile undergoes recompiling after caching",
    "body": "### \ud83d\udc1b Describe the bug\n\nThanks for the helpful blog: https://dev-discuss.pytorch.org/t/how-to-bring-compile-time-down-to-zero-our-plans-and-direction-may-14th-edition/2089\n\nI am currently caching all 3 stages of the compiler but only seeing ~50% reduction in compile time. \nHow do I determine which part of the compilation is not being properly cached or recompiled every time?\n\n\nP.S. I am interested in finding which part of the process recompiles and any techniques to avoid recompilation not mentioned here: https://pytorch.org/docs/stable/torch.compiler_troubleshooting.html#dealing-with-recompilations\n\n### Error logs\n\n_No response_\n\n### Versions\n\ntorch 2.5\nCUDA 12.4\nGPU = A10G\n\ncc @chauhang @penguinwu",
    "url": "https://github.com/pytorch/pytorch/issues/149096",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2"
    ],
    "created_at": "2025-03-13T02:33:58Z",
    "updated_at": "2025-03-13T06:40:24Z",
    "user": "janak2"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 314,
    "title": "[QUESTION] agent.run(stream=True)   How get finall result",
    "body": "agent = CodeAgent(\n    tools=[],\n    model=model,\n    max_steps=10,\n    verbosity_level=2\n)\n\nresponse = agent.run(\n    \"\"\"\n    descripe image\n    \"\"\",\n    images=image_urls,\n    stream=True\n)\n\nprint()???",
    "url": "https://github.com/huggingface/agents-course/issues/314",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-13T02:32:47Z",
    "updated_at": "2025-03-13T02:32:47Z",
    "user": "via007"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 149094,
    "title": "How to skip backward specific steps in torch.compile",
    "body": "### \ud83d\udc1b Describe the bug\n\nI couldn't find much documentation around how we can skip backward specific-steps in torch.compile/AOT autograd.\nSome info would be helpful.\n\n### Error logs\n\n_No response_\n\n### Versions\n\nNA\n\ncc @chauhang @penguinwu",
    "url": "https://github.com/pytorch/pytorch/issues/149094",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2"
    ],
    "created_at": "2025-03-13T02:12:44Z",
    "updated_at": "2025-03-17T23:55:31Z",
    "user": "janak2"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11046,
    "title": "flux pipeline inference with controlnet, inpainting, plus ip-adapter",
    "body": "### Describe the bug\n\nHi, I would like to utilize flux pipeline. But for now, I have gpu issues to use origin flux pipeline.\nIf I would like to use nf4 version, How can I set up the inference file on controlnet, inpainting, ip-adapter? \nDo I use Fluxcontrol depth or canny and mask, ip-adapter model? or fluxcontrol, fluxfill, ip-adapter?\n\nThanks,\n\n@hlky, @sayakpaul \n\n### Reproduction\n\nimport torch\nfrom diffusers import FluxControlInpaintPipeline\nfrom diffusers.models.transformers import FluxTransformer2DModel\nfrom transformers import T5EncoderModel\nfrom diffusers.utils import load_image, make_image_grid\nfrom image_gen_aux import DepthPreprocessor # https://github.com/huggingface/image_gen_aux\nfrom PIL import Image\nimport numpy as np\n\n\naccess_token = \"\"\npipe = FluxControlInpaintPipeline.from_pretrained(\n    \"black-forest-labs/FLUX.1-Depth-dev\",\n    torch_dtype=torch.bfloat16, token=access_token)\n\n# use following lines if you have GPU constraints\n# ---------------------------------------------------------------\ntransformer = FluxTransformer2DModel.from_pretrained(\n    \"sayakpaul/FLUX.1-Depth-dev-nf4\", subfolder=\"transformer\", torch_dtype=torch.bfloat16\n)\ntext_encoder_2 = T5EncoderModel.from_pretrained(\n    \"sayakpaul/FLUX.1-Depth-dev-nf4\", subfolder=\"text_encoder_2\", torch_dtype=torch.bfloat16\n)\npipe.transformer = transformer\npipe.text_encoder_2 = text_encoder_2\n\n\npipe.enable_model_cpu_offload()\n\n# ---------------------------------------------------------------\npipe.to(\"cuda\")\n\nprompt = \"a blue robot sad expressions\"\nimage = load_image(\"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/robot.png\")\n\nhead_mask = np.zeros_like(image)\nhead_mask[65:580,300:642] = 255\nmask_image = Image.fromarray(head_mask)\n\nprocessor = DepthPreprocessor.from_pretrained(\"LiheYoung/depth-anything-large-hf\")\ncontrol_image = processor(image)[0].convert(\"RGB\")\n\noutput = pipe(\n    prompt=prompt,\n    image=image,\n    control_image=control_image,\n    mask_image=mask_image,\n    num_inference_steps=30,\n    strength=1,\n    guidance_scale=10.0,\n    generator=torch.Generator().manual_seed(42),\n).images[0]\nmake_image_grid([image, control_image, mask_image, output.resize(image.size)], rows=1, cols=4).save(\"output.png\")\n\nchanging depth to canny, and add ip-adapter? \n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\n.\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11046",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2025-03-12T20:14:01Z",
    "updated_at": "2025-04-12T15:02:52Z",
    "comments": 1,
    "user": "john09282922"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 854,
    "title": "How to train diffusion policy in only state space, no images?",
    "body": "I have been having a lot of trouble trying to only train a model on purely a state space task so there are no images involved. I have already looked through every tutorial and most source code files and just can not get this working.\n\nI have a script that creates a LeRobotDataset through human demonstrations. The script is simplified and only contains the relevant information. I simply record 10 demonstrations to create a LeRobotDataset from. There are no images the only observations is a (31, ) numpy float array. \n\n```\nfeature_dict = {\n    \"next.reward\": {\n        \"dtype\": \"float\",\n        \"shape\": (1,),\n        \"names\": None,\n    },\n    \"action\": {\n        \"dtype\": \"float64\",\n        \"shape\": (5, 1),\n        \"names\": None\n    },\n    \"next.success\": {\n        \"dtype\": \"bool\",\n        \"shape\": (1,),\n        \"names\": None,\n    },\n    # \"timestamp\": {\n    #     \"dtype\": \"float32\",\n    #     \"shape\": (1, ),\n    #     \"names\": None,\n    # },\n    \"observation.environment_state\": {\n        \"dtype\": \"float64\",\n        \"shape\": (31, ),\n        \"names\": None\n    },\n    \n}\n\ndataset_le_name = \"second_save\"\ndataset_dir = os.path.join(os.path.dirname(__file__), \"./files/\", dataset_le_name)\n\nle_dataset = LeRobotDataset.create(\n    repo_id=dataset_le_name,\n    fps=500,\n    root=dataset_dir,\n    features=feature_dict\n)\nenv.reset()\n\nfor _ in range(10):\n    while True:\n        step_start = time.time()\n        obs, reward, terminated, _, _ = env.step(None)\n\n        action = teleoperate_command()\n        \n        frame = {\n            \"action\": torch.from_numpy(action),\n            \"next.reward\": np.array([reward]),\n            \"next.success\": np.array([not terminated]),\n            #\"timestamp\": np.array([env.unwrapped.sim_object.data.time], dtype=np.float32).reshape(1,),\n            \"observation.environment_state\": obs,\n            \"task\": \"flick switch\"\n        }\n        le_dataset.add_frame(frame)\n\n        if terminated:\n            print(\"Task completed\")\n            break\n\n  le_dataset.save_episode()\n```\n\n\nThis script works fine and is able to create the dataset with no errors. But then when I try to train a diffusion policy from scratch, the exact example script from https://github.com/huggingface/lerobot/blob/main/examples/3_train_policy.py\n\n\n```# Create a directory to store the training checkpoint.\n    output_directory = Path(\"outputs/train/example_pusht_diffusion\")\n    output_directory.mkdir(parents=True, exist_ok=True)\n\n    # # Select your device\n    device = torch.device(\"cuda\")\n\n    # Number of offline training steps (we'll only do offline training for this example.)\n    # Adjust as you prefer. 5000 steps are needed to get something worth evaluating.\n    training_steps = 5000\n    log_freq = 1\n\n    # When starting from scratch (i.e. not from a pretrained policy), we need to specify 2 things before\n    # creating the policy:\n    #   - input/output shapes: to properly size the policy\n    #   - dataset stats: for normalization and denormalization of input/outputs\n    dataset_le_name = \"second_save\"\n    dataset_dir = os.path.join(os.path.dirname(__file__), \"./files/imitationDataset\", dataset_le_name)\n\n    dataset_metadata = LeRobotDatasetMetadata(dataset_le_name, root=dataset_dir)\n    features = dataset_to_policy_features(dataset_metadata.features)\n    output_features = {key: ft for key, ft in features.items() if ft.type is FeatureType.ACTION}\n    input_features = {key: ft for key, ft in features.items() if key not in output_features}\n\n    print(input_features)\n    # Policies are initialized with a configuration class, in this case `DiffusionConfig`. For this example,\n    # we'll just use the defaults and so no arguments other than input/output features need to be passed.\n    cfg = DiffusionConfig(input_features=input_features, output_features=output_features)\n\n\n    # We can now instantiate our policy with this config and the dataset stats.\n    policy = DiffusionPolicy(cfg, dataset_stats=dataset_metadata.stats)\n```\n\nI keep getting the error\n\n```Traceback (most recent call last):\n  File \"path/trainDiffusion.py\", line 105, in <module>\n    main()\n  File \"path/trainDiffusion.py\", line 44, in main\n    policy = DiffusionPolicy(cfg, dataset_stats=dataset_metadata.stats)\n  File \"path/lerobot/lerobot/common/policies/diffusion/modeling_diffusion.py\", line 70, in __init__\n    config.validate_features()\n  File \"pathlerobot/lerobot/common/policies/diffusion/configuration_diffusion.py\", line 220, in validate_features\n    first_image_key, first_image_ft = next(iter(self.image_features.items()))\nStopIteration\n```\n\nLooking at the source code it seems its always checking for image features in the validate feature function, but I just want to train a diffusion policy with no images. How do I do this? ",
    "url": "https://github.com/huggingface/lerobot/issues/854",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2025-03-12T16:01:19Z",
    "updated_at": "2025-10-26T02:30:57Z",
    "user": "Nicholas-Baldassini"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11045,
    "title": "Crash when loading Flux Schnell 1 model with train_dreambooth_lora_flux",
    "body": "### Describe the bug\n\nWhen using the `Diffusers/example/dreambooth/train_dreambooth_lora_flux` script with the Flux Schnell 1 model, the process consistently crashes during the transformer shard loading at 33% (1/3), causing my entire Google JupyterLab kernel to crash.\n\n**Question:** Is this related to using the Flux Schnell model instead of a Dev model? Is there a known incompatibility?\n\n**Logs:**  03/12/2025 14:14:26 - INFO - __main__ - Distributed environment: NO\nNum processes: 1\nProcess index: 0\nLocal process index: 0\nDevice: cuda\n\nMixed precision type: bf16\n\nYou set `add_prefix_space`. The tokenizer needs to be converted from the slow tokenizers\nYou are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.\nYou are using a model of type t5 to instantiate a model of type . This is not supported for all configurations of models and can yield errors.\n{'use_karras_sigmas', 'shift_terminal', 'use_beta_sigmas', 'time_shift_type', 'invert_sigmas', 'use_exponential_sigmas'} was not found in config. Values will be initialized to default values.\n\nLoading checkpoint shards:   0%|                        | 0/2 [00:00<?, ?it/s]\nLoading checkpoint shards:  50%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588        | 1/2 [00:13<00:13, 13.01s/it]\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:25<00:00, 12.53s/it]\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:25<00:00, 12.60s/it]\nInstantiating AutoencoderKL model under default dtype torch.float32.\nAll model checkpoint weights were used when initializing AutoencoderKL.\n\nAll the weights of AutoencoderKL were initialized from the model checkpoint at /home/jupyter/flux_model.\nIf your task is similar to the task the model of the checkpoint was trained on, you can already use AutoencoderKL for predictions without further training.\nInstantiating FluxTransformer2DModel model under default dtype torch.float32.\n{'out_channels', 'axes_dims_rope'} was not found in config. Values will be initialized to default values.\n\nLoading checkpoint shards:   0%|                        | 0/3 [00:00<?, ?it/s]\nLoading checkpoint shards:  33%|\u2588\u2588\u2588\u2588\u2588\u258e          | 1/3 [00:26<00:52, 26.10s/it]\n\n### Reproduction\n\nexport MODEL_NAME=\"black-forest-labs/FLUX.1-schnell\" \nexport INSTANCE_DIR=\"images\"\nexport OUTPUT_DIR=\"output\"\n\naccelerate launch train_dreambooth_flux.py \\\n  --pretrained_model_name_or_path=$MODEL_NAME  \\\n  --instance_data_dir=$INSTANCE_DIR \\\n  --output_dir=$OUTPUT_DIR \\\n  --mixed_precision=\"bf16\" \\\n  --instance_prompt=\"a photo of sks dog\" \\\n  --resolution=512 \\\n  --train_batch_size=1 \\\n  --guidance_scale=1 \\\n  --gradient_accumulation_steps=4 \\\n  --optimizer=\"prodigy\" \\\n  --learning_rate=1. \\\n  --report_to=\"wandb\" \\\n  --lr_scheduler=\"constant\" \\\n  --lr_warmup_steps=0 \\\n  --max_train_steps=500 \\\n  --validation_prompt=\"A photo of sks dog in a bucket\" \\\n  --validation_epochs=25 \\\n  --seed=\"0\" \n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.33.0.dev0\n- Platform: Linux-5.10.0-33-cloud-amd64-x86_64-with-glibc2.31\n- Running on Google Colab?: No\n- Python version: 3.10.16\n- PyTorch version (GPU?): 2.6.0+cu124 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.29.3\n- Transformers version: 4.49.0\n- Accelerate version: 1.4.0\n- PEFT version: 0.14.0\n- Bitsandbytes version: not installed\n- Safetensors version: 0.5.3\n- xFormers version: not installed\n- Accelerator: NVIDIA L4, 23034 MiB\n- Using GPU in script?: <fill in>\n- Using distributed or parallel set-up in script?: <fill in>\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11045",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2025-03-12T15:08:11Z",
    "updated_at": "2025-05-07T15:18:15Z",
    "comments": 4,
    "user": "rleygonie"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11043,
    "title": "When will we be getting Quanto support for Wan 2.1?",
    "body": "The diffusers library for quantizers currently doesn't contain an entry for Quantro:\n\nhttps://github.com/huggingface/diffusers/tree/main/src/diffusers/quantizers\n\nIsn't this needed to perform requantization on a quantized Transformer for WAN 2.1?\n\nCurrently we can't do this due to missing Quanto quantizer after we've quantized and stored a Transformer:\n\n`                print('Quantize transformer')\n                class QuantizedWanTransformer3DModel(QuantizedDiffusersModel):\n                    base_class = WanTransformer3DModel\n                transformer = QuantizedWanTransformer3DModel.from_pretrained(\n                    \"./wan quantro T2V 14B Diffusers/basemodel/wantransformer3dmodel_qint8\"\n                  ).to(dtype=dtype)`",
    "url": "https://github.com/huggingface/diffusers/issues/11043",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-12T12:43:59Z",
    "updated_at": "2025-03-23T18:17:53Z",
    "comments": 2,
    "user": "ukaprch"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 853,
    "title": "How to customize adding other robot and manipulator\uff1f",
    "body": "Thanks for your great work! Now I got a problem how to customize adding other robot and manipulator. \n\nI have 7DOF bimanual manipulators robot, which is powered by servo-motor. I want to add it to lerobot so I can use this fantastic platform to collect data and train. Specially the ACT and diffusion policy.\n\nI have the URDF file, and already setup in ROS moveit and Isaac Sim, using 485 to drive the real robot.\n\nI checked the code and maybe I should crate new yaml file in /configs/robot an some other files for my robot.\n\nWhich is simpler compared to directly collecting data and training with ACT repository? Is there any tutorial on how to add a custom robot for fresh man?\n\nThanks a lot !\n\n![Image](https://github.com/user-attachments/assets/16ad1b01-eb31-40bf-b894-6d7c16a70c99)",
    "url": "https://github.com/huggingface/lerobot/issues/853",
    "state": "closed",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-03-12T11:39:19Z",
    "updated_at": "2025-10-08T20:16:23Z",
    "user": "meijie-jesse"
  },
  {
    "repo": "huggingface/smollm",
    "number": 65,
    "title": "How to set video size when fine tuning",
    "body": "Hi,\n\nI've tried a bunch of variants but I can't seem to figure out how to set the video size. Currently, I have:\n\n```py\nprocessor.video_size = { \"longest_edge\": 128 }\nprocessor.do_image_splitting = False\n\ndef sample_indices_fn(metadata, num_frames=None, fps=None, **kwargs):\n        return np.arange(0, 20, dtype=int)\n\nmessages = [\n                {\"role\": \"user\", \"content\": [\n                    { \"type\": \"video\", \"path\": example[\"clip_chunked_path\"] },\n                ] },\n                {\n                    \"role\": \"assistant\",\n                    \"content\": [\n                        {\"type\": \"text\", \"text\": json.dumps(last_player_inputs)},\n                    ]\n                }\n            ]\n\ninputs = processor.apply_chat_template(\n                messages,\n                add_generation_prompt=True,\n                tokenize=True,\n                return_dict=True,\n                return_tensors=\"pt\",\n                sample_indices_fn=sample_indices_fn,\n                video_load_backend=\"torchvision\",\n                images_kwargs={ \"max_image_size\": {\"longest_edge\": 128 } }\n                ).to(model.device, dtype=model.dtype)\n\nprint(\"FRAMES\", inputs[\"pixel_values\"].shape)\n```\n\nWhich gives me a pixel_values shape of `[1, 20, 3, 128, 128]` (which is what I want), but then training crashes:\n\n```\n(RayTrainWorker pid=308152, ip=172.31.24.115) /pytorch/aten/src/ATen/native/cuda/IndexKernel.cu:94: operator(): block: [443,0,0], thread: [29,0,0] Assertion `-sizes[i] <= index && index < sizes[i] && \"index out of bounds\"` failed.\n(RayTrainWorker pid=308152, ip=172.31.24.115) /pytorch/aten/src/ATen/native/cuda/IndexKernel.cu:94: operator(): block: [443,0,0], thread: [30,0,0] Assertion `-sizes[i] <= index && index < sizes[i] && \"index out of bounds\"` failed.\n(RayTrainWorker pid=308152, ip=172.31.24.115) /pytorch/aten/src/ATen/native/cuda/IndexKernel.cu:94: operator(): block: [443,0,0], thread: [31,0,0] Assertion `-sizes[i] <= index && index < sizes[i] && \"index out of bounds\"` failed.\n2025-03-12 04:16:13,286 ERROR tune_controller.py:1331 -- Trial task failed for trial TorchTrainer_4b80b_00000\nTraceback (most recent call last):\n  File \"/home/ray/anaconda3/lib/python3.12/site-packages/ray/air/execution/_internal/event_manager.py\", line 110, in resolve_future\n    result = ray.get(future)\n             ^^^^^^^^^^^^^^^\n  File \"/home/ray/anaconda3/lib/python3.12/site-packages/ray/_private/auto_init_hook.py\", line 21, in auto_init_wrapper\n    return fn(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/home/ray/anaconda3/lib/python3.12/site-packages/ray/_private/client_mode_hook.py\", line 103, in wrapper\n    return func(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ray/anaconda3/lib/python3.12/site-packages/ray/_private/worker.py\", line 2772, in get\n    values, debugger_breakpoint = worker.get_objects(object_refs, timeout=timeout)\n                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ray/anaconda3/lib/python3.12/site-packages/ray/_private/worker.py\", line 919, in get_objects\n    raise value.as_instanceof_cause()\nray.exceptions.RayTaskError(RuntimeError): ray::_Inner.train() (pid=308044, ip=172.31.24.115, actor_id=164821b0515a3af42f0d03bc68000000, repr=TorchTrainer)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ray/anaconda3/lib/python3.12/site-packages/ray/tune/trainable/trainable.py\", line 331, in train\n    raise skipped from exception_cause(skipped)\n  File \"/home/ray/anaconda3/lib/python3.12/site-packages/ray/train/_internal/utils.py\", line 57, in check_for_failure\n    ray.get(object_ref)\n           ^^^^^^^^^^^^^^^^^^^\n           ^^^^^^^^^^^^^^^^^^^^^\n                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nray.exceptions.RayTaskError(RuntimeError): ray::_RayTrainWorker__execute.get_next() (pid=308152, ip=172.31.24.115, actor_id=3794a93b2a61f6b6efb8496d68000000, repr=<ray.train._internal.worker_group.RayTrainWorker object at 0x79e43e8d7890>)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ray/anaconda3/lib/python3.12/site-packages/ray/train/_internal/worker_group.py\", line 33, in __execute\n    raise skipped from exception_cause(skipped)\n  File \"/home/ray/anaconda3/lib/python3.12/site-packages/ray/train/_internal/utils.py\", line 176, in discard_return_wrapper\n    train_func(*args, **kwargs)\n  File \"/tmp/ray/session_2025-03-04_07-50-04_397300_8643/runtime_resources/working_dir_files/_ray_pkg_77cdef2c25570eb4/agent/train_smol.py\", line 214, in train_func\n    trainer.train()\n  File \"/home/ray/anaconda3/lib/python3.12/site-packages/transformers/trainer.py\", line 2243, in train\n    return inner_training_loop(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ray/anaconda3/lib/python3.12/site-packages/transformers/trainer.py\", line 2554, in _inner_training_loop\n    tr_loss_step = self.training_step(model, inputs, num_items_i",
    "url": "https://github.com/huggingface/smollm/issues/65",
    "state": "open",
    "labels": [
      "Video"
    ],
    "created_at": "2025-03-12T11:20:28Z",
    "updated_at": "2025-07-29T13:12:05Z",
    "user": "FredrikNoren"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3437,
    "title": "Need help on how to disable enable_model_cpu_offload / enable_sequential_cpu_offload",
    "body": "So during my testing when used individually, I observed that\n\nenable_sequential_cpu_offload require- 11 GB VRAM\nenable_model_cpu_offload  require - 8 GB VRAM\n\nI am using Diffusers + nunchaku + sd_embed\n\nProblem: sd_embed does not support enable_sequential_cpu_offload but support enable_model_cpu_offload \n\nRequirement: \n1. Form pipe\n2. Use sd_embed to generate prompt_embeds using enable_model_cpu_offload\n3. Disable enable_model_cpu_offload\n4. Enable enable_sequential_cpu_offload and do inference\n\nSo I tried this code\n1. During prompt_embeds VRAM is ~6 GB\n2. During inference VRAM is ~8GB\n\nNoticed enable_model_cpu_offload is not disabled after invoking optionally_disable_offloading and enabling enable_sequential_cpu_offload. The VRAM requirement remains same as what is needed for enable_model_cpu_offload .\n\nIs this something that is doable or not supported? Any guidance is appreciated.\n\n```python\n\nimport torch\nfrom diffusers import FluxPipeline\nimport torch.nn as nn\nfrom accelerate.hooks import CpuOffload, AlignDevicesHook, remove_hook_from_module\nfrom nunchaku import NunchakuFluxTransformer2dModel, NunchakuT5EncoderModel\nfrom sd_embed.embedding_funcs import get_weighted_text_embeddings_flux1\n\ndef optionally_disable_offloading(_pipeline):\n    is_model_cpu_offload = False\n    is_sequential_cpu_offload = False   \n    if _pipeline is not None:\n        for _, component in _pipeline.components.items():\n            if isinstance(component, nn.Module) and hasattr(component, \"_hf_hook\"):\n                if not is_model_cpu_offload:\n                    is_model_cpu_offload = isinstance(component._hf_hook, CpuOffload)\n                if not is_sequential_cpu_offload:\n                    is_sequential_cpu_offload = isinstance(component._hf_hook, AlignDevicesHook)\n               \n                remove_hook_from_module(component, recurse=True)\n    return (is_model_cpu_offload, is_sequential_cpu_offload)\n\ntransformer = NunchakuFluxTransformer2dModel.from_pretrained(\"mit-han-lab/svdq-int4-flux.1-schnell\")\ntext_encoder_2 = NunchakuT5EncoderModel.from_pretrained(\"mit-han-lab/svdq-flux.1-t5\")\n\npipeline = FluxPipeline.from_pretrained(\n    \"black-forest-labs/FLUX.1-schnell\",\n    text_encoder_2=text_encoder_2,\n    transformer=transformer,\n    torch_dtype=torch.bfloat16,\n)\npipeline.enable_model_cpu_offload()\n\nprompt = \"\"\"\\\nA dreamy, soft-focus photograph capturing a romantic Jane Austen movie scene, \nin the style of Agnes Cecile. Delicate watercolors, misty background, \nRegency-era couple, tender embrace, period clothing, flowing dress, dappled sunlight, \nethereal glow, gentle expressions, intricate lace, muted pastels, serene countryside, \ntimeless romance, poetic atmosphere, wistful mood, look at camera.\n\"\"\"\nprompt_embeds, pooled_prompt_embeds = get_weighted_text_embeddings_flux1(\n    pipe        = pipeline\n    , prompt    = prompt\n)\nprint(\">>>>>>>\", optionally_disable_offloading(pipeline))\n\npipeline.enable_sequential_cpu_offload()\n\nimage = pipeline(\n    prompt_embeds=prompt_embeds,\n    pooled_prompt_embeds=pooled_prompt_embeds,\n    num_inference_steps=4, \n    guidance_scale=3.5,\n    generator=torch.Generator(device=\"cpu\").manual_seed(123456)\n).images[0]\nimage.save(\"flux.1-schnell_sd-embed1.png\")\n\nprompt = \"\"\"\\\nA dreamy, soft-focus photograph capturing a romantic Jane Austen movie scene, \nin the style of Agnes Cecile. Delicate watercolors, misty background, \nRegency-era couple, tender embrace, period clothing, flowing dress, dappled sunlight, \nethereal glow, gentle expressions, intricate lace, muted pastels, serene countryside, \ntimeless romance, poetic atmosphere, wistful mood, look at camera.\n\"\"\"\nprint(\">>>>>>>\", optionally_disable_offloading(pipeline))\npipeline.enable_model_cpu_offload()\nprompt_embeds, pooled_prompt_embeds = get_weighted_text_embeddings_flux1(\n    pipe        = pipeline\n    , prompt    = prompt\n)\nprint(\">>>>>>>\", optionally_disable_offloading(pipeline))\npipeline.enable_sequential_cpu_offload()\n\nimage = pipeline(\n    prompt_embeds=prompt_embeds,\n    pooled_prompt_embeds=pooled_prompt_embeds,\n    num_inference_steps=4, \n    guidance_scale=3.5,\n    generator=torch.Generator(device=\"cpu\").manual_seed(12345678)\n).images[0]\nimage.save(\"flux.1-schnell_sd-embed2.png\")\n\n```",
    "url": "https://github.com/huggingface/accelerate/issues/3437",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-12T09:29:08Z",
    "updated_at": "2025-03-12T10:10:33Z",
    "user": "nitinmukesh"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11042,
    "title": "ZeroDivisionError when performing forward pass with UNet3DConditionModel",
    "body": "### Describe the bug\n\n# ZeroDivisionError when performing forward pass with UNet3DConditionModel\n\nI'm encountering a ZeroDivisionError when attempting to perform a forward pass with the UNet3DConditionModel. This seems to be related to the num_attention_heads parameter being None, which causes self.inner_dim to be 0.\n\nHere's the code I'm using:\n\n```python\nfrom diffusers import UNet3DConditionModel\nimport torch\n\nmodel = UNet3DConditionModel(\n    down_block_types=(\n        \"CrossAttnDownBlock3D\",\n        \"CrossAttnDownBlock3D\",\n        \"CrossAttnDownBlock3D\",\n        \"DownBlock3D\",\n    ),\n    up_block_types=(\n        \"UpBlock3D\",\n        \"CrossAttnUpBlock3D\",\n        \"CrossAttnUpBlock3D\",\n        \"CrossAttnUpBlock3D\",\n    ),\n    block_out_channels=(32, 64, 128, 128),\n    norm_num_groups=4,\n)\n\ndata = torch.randn(1, 4, 32, 32, 32)\n\nmodel(data, timestep=3, encoder_hidden_states=torch.zeros(1, 4, 32, 32, 32))\n```\n\nThe error traceback indicates that the issue occurs in the attention processing:\n\n```\nZeroDivisionError: integer division or modulo by zero\n```\n\nThis seems to be because num_attention_heads is None, leading to self.inner_dim = 0 in the transformer configuration.\n\nI noticed that in the UNet3DConditionModel implementation, there's a check that raises an error if num_attention_heads is provided:\n\n```python\nif num_attention_heads is not None:\n    raise NotImplementedError(\n        \"At the moment it is not possible to define the number of attention heads via num_attention_heads because of a naming issue as described in https://github.com/huggingface/diffusers/issues/2011#issuecomment-1547958131 . Passing num_attention_heads will only be supported in diffusers v0.19.\"\n    )\n```\n\nGiven this limitation, I'm unsure how to properly configure the model to avoid this error. Could you provide guidance on:\n1. How to correctly perform a forward pass with demo hidden states\n2. What parameters I should adjust to ensure the model is properly configured\n3. If there's a workaround for this issue in the current version of diffusers\n\nThank you for your assistance!\n\n### Reproduction\n\n```python\nfrom diffusers import UNet3DConditionModel\nimport torch\n\nmodel = UNet3DConditionModel(\n    down_block_types=(\n        \"CrossAttnDownBlock3D\",\n        \"CrossAttnDownBlock3D\",\n        \"CrossAttnDownBlock3D\",\n        \"DownBlock3D\",\n    ),\n    up_block_types=(\n        \"UpBlock3D\",\n        \"CrossAttnUpBlock3D\",\n        \"CrossAttnUpBlock3D\",\n        \"CrossAttnUpBlock3D\",\n    ),\n    block_out_channels=(32, 64, 128, 128),\n    norm_num_groups=4,\n)\n\ndata = torch.randn(1, 4, 32, 32, 32)\n\nmodel(data, timestep=3, encoder_hidden_states=torch.zeros(1, 4, 32, 32, 32))\n```\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nPython 3.11.10\ndiffusers version 0.32.2\nubuntu 24.04\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11042",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-03-12T09:26:01Z",
    "updated_at": "2025-03-13T02:00:12Z",
    "comments": 2,
    "user": "txz32102"
  },
  {
    "repo": "pytorch/executorch",
    "number": 9180,
    "title": "Convert model.safetensors in order to be able to execute it with ExecuteTorch: how to prepare the example input and dynamic shape information?",
    "body": "Hi! \n\nI've trained for fine-tuning  the Bert model to use it for Named Entity Recognition.\n\nNow I want to convert the resulting model.safetensors in order to be able to execute it with ExecuteTorch. Thanks to the explanation of a kind guy : https://dev-discuss.pytorch.org/t/what-is-the-correct-future-proof-way-of-deploying-a-pytorch-python-model-in-c-for-inference/2775/11?u=raphael10-collab ,\nI've learned that, in order to export the torch.nn.Module  into aExportedProgram, I need first to prepare the example input and dynamic shape information. \n\nSo.... my question is:  which dynamic shape information should I use, since the model.safetensors I produced is just a fine-tuning of the Bert Model? \n Should I use the shapes from here: https://github.com/google-research/bert/blob/master/modeling.py#L389  :  input_ids: int32 Tensor of shape [batch_size, seq_length] containing word ids ? \n\nThis the code I used to fine-tune Bert model for NER task:\n\n`BERT-NER.py` : \n\n    # https://github.com/tozameerkhan/Fine-Tuning-BERT-for-Named-Entity-Recognition/blob/main/BERTfineTunningFinal.ipynb\n    \n    # 1. Setup and Installation\n    \n    import datasets\n    import numpy as np\n    import pandas as pd\n    import matplotlib.pyplot as plt\n    import seaborn as sns\n    from transformers import BertTokenizerFast\n    from transformers import DataCollatorForTokenClassification\n    from transformers import TrainingArguments, Trainer, EarlyStoppingCallback\n    from transformers import logging as hf_logging\n    from transformers import pipeline\n    import json\n    from pprint import pprint\n    from torchmetrics.text.bert import BERTScore\n    \n    \n    bertscore = BERTScore()\n    \n    hf_logging.set_verbosity_info() #to display informational messages.\n    \n    from transformers import AutoModelForTokenClassification\n    \n    import warnings\n    warnings.filterwarnings('ignore')\n    \n    import matplotlib.pyplot as plt\n    plt.style.use(\"fivethirtyeight\")\n    \n    \n    # 2. Data Exploration (EDA)\n    \n    # Load Dataset\n    \n    conll2003 = datasets.load_dataset(\"conll2003\", trust_remote_code=True)\n    conll2003\n    \n    # Convert to DataFrame\n    train_df = pd.DataFrame(conll2003['train'])\n    validation_df = pd.DataFrame(conll2003['validation'])\n    test_df = pd.DataFrame(conll2003['test'])\n    \n    # Data Overview\n    \n    print(train_df.head())\n    print(f\"Number of sentences in the training set: {len(train_df)}\")\n    print(f\"Number of sentences in the validation set: {len(validation_df)}\")\n    print(f\"Number of sentences in the test set: {len(test_df)}\")\n    \n    label_list = conll2003[\"train\"].features[\"ner_tags\"].feature.names\n    print(label_list)\n    \n    # Distribution of Sentence Lengths\n    train_df['sentence_length'] = train_df['tokens'].apply(len)\n    plt.figure(figsize=(10, 6))\n    sns.histplot(train_df['sentence_length'], bins=30, kde=True)\n    plt.title('Distribution of Sentence Lengths in Training Set')\n    plt.xlabel('Sentence Length')\n    plt.ylabel('Frequency')\n    plt.show()\n    \n    # Distribution of Named Entity Tags\n    ner_tags = conll2003['train'].features['ner_tags'].feature.names\n    tag_counts = [0] * len(ner_tags)\n    for tags in train_df['ner_tags']:\n        for tag in tags:\n            tag_counts[tag] += 1\n    \n    plt.figure(figsize=(12, 6))\n    sns.barplot(x=ner_tags, y=tag_counts)\n    plt.title('Distribution of Named Entity Tags in Training Set')\n    plt.xlabel('Named Entity Tag')\n    plt.ylabel('Count')\n    plt.xticks(rotation=45)\n    plt.show()\n    \n    # 3. Data Preparation\n    \n    # Tokenization and Label Alignment\n    \n    #load a pre-trained tokenizer.\n    tokenizer = BertTokenizerFast.from_pretrained(\"bert-base-uncased\")\n    \n    example_1 = conll2003['train'][0]\n    tokenized_input = tokenizer(example_1[\"tokens\"], is_split_into_words=True)\n    tokens = tokenizer.convert_ids_to_tokens(tokenized_input[\"input_ids\"])\n    word_ids = tokenized_input.word_ids()\n    print(\"word_ids :: \",word_ids)\n    ''' As we can see, it returns a list with the same number of elements as our processed input ids, \n        mapping special tokens to None and all other tokens to their respective word.'''\n    print()#Function to tokenize and align labels with respect to the tokens.\n    def tokenize_and_align_labels(examples, label_all_tokens=True):\n        tokenized_inputs = tokenizer(examples['tokens'], truncation=True, is_split_into_words=True)\n        labels = []\n        for i, label in enumerate(examples['ner_tags']):\n            word_ids = tokenized_inputs.word_ids(batch_index=i)\n            previous_word_idx = None\n            label_ids = []\n            for word_idx in word_ids:\n                if word_idx is None:\n                    label_ids.append(-100)\n                elif word_idx != previous_word_idx:\n                    label_ids.append(label[word_idx])\n                else:\n                    label_ids.append(label[word_idx] if label_all_tokens else -100)\n                previous_word_idx = word_idx\n    ",
    "url": "https://github.com/pytorch/executorch/issues/9180",
    "state": "open",
    "labels": [
      "module: user experience"
    ],
    "created_at": "2025-03-12T09:17:50Z",
    "updated_at": "2025-12-18T21:55:01Z",
    "user": "raphael10-collab"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 851,
    "title": "Hello, I would like to ask if I can use my ROS2 MoveIt2 robotic arm?",
    "body": "Can it support ROS training? I believe this would be beneficial for ecosystem development.",
    "url": "https://github.com/huggingface/lerobot/issues/851",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-12T07:39:51Z",
    "updated_at": "2025-08-04T19:29:03Z",
    "user": "Gates-456"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 502,
    "title": "How to use vllm with 2 GPUs?",
    "body": "Just as GRPO OOM #475 stated, the vllm kv init is so large that 1 A100 80GB could not hold it, while I have 8*A100 in total.\nHowever, only 1 GPU is allowed to assign to vllm, as `vllm_device: auto` or  `ib/python3.10/site-packages/trl/trainer/grpo_trainer.py`.\n\nHow should I solve the issue? Would anybody know?\n",
    "url": "https://github.com/huggingface/open-r1/issues/502",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-12T03:36:18Z",
    "updated_at": "2025-06-03T11:55:47Z",
    "user": "greatxue"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11036,
    "title": "Why perform the following operations on the latent condition?",
    "body": "in the code :https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan_i2v.py\nline 395-404:\n```\nlatents_mean = (\n    torch.tensor(self.vae.config.latents_mean)\n    .view(1, self.vae.config.z_dim, 1, 1, 1)\n    .to(latents.device, latents.dtype)\n)\nlatents_std = 1.0 / torch.tensor(self.vae.config.latents_std).view(1, self.vae.config.z_dim, 1, 1, 1).to(\n    latents.device, latents.dtype\n)\n\nlatent_condition = (latent_condition - latents_mean) * latents_std\n```\nThe official inference code of Wan2.1 does not perform similar operations\uff1a\nhttps://github.com/Wan-Video/Wan2.1/blob/main/wan/image2video.py#L237",
    "url": "https://github.com/huggingface/diffusers/issues/11036",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-12T02:32:09Z",
    "updated_at": "2025-03-15T02:40:13Z",
    "comments": 2,
    "user": "trouble-maker007"
  },
  {
    "repo": "pytorch/vision",
    "number": 8962,
    "title": "Missing Windows Wheel for torchvision==0.11.2+cu111",
    "body": "Hello Torchvision team,\n\nWe are attempting to install specific versions with CUDA 11.1 using .whl files from [torch_stable.html](https://download.pytorch.org/whl/cu111/torch_stable.html). \n\nHowever, we can't find the required wheel for torchvision==0.11.2+cu111 for Windows (win_amd64.whl).\n\nCould you provide guidance on how to obtain this package or upload the Windows wheel for torchvision 0.11.2 with CUDA 11.1 support?\n\nThank you for your assistance.",
    "url": "https://github.com/pytorch/vision/issues/8962",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-11T22:04:31Z",
    "updated_at": "2025-03-28T13:10:02Z",
    "comments": 2,
    "user": "huang3527"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 847,
    "title": "Is there a way Merge | Convert | Edit datasets function or a way how we can train model using different datasets ?",
    "body": "Hey, everyone. \n\nAt the moment, we have this problem: We have recorded datasets with around 100 episodes each, but we would like to train our model with 1000 episodes. Unfortunately, we didn't find a way to load multiple datasets into a single policy training job, is it even possible ? If no, ss there a way to merge a couple of small datasets into a big one? \n\nIf none of that is possible, is there a way to convert to hdf5 ? \n\nI was referencing https://github.com/huggingface/lerobot/issues/533, but there are no answers as well.  \n",
    "url": "https://github.com/huggingface/lerobot/issues/847",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "dataset"
    ],
    "created_at": "2025-03-11T17:25:08Z",
    "updated_at": "2025-10-17T12:09:32Z",
    "user": "runmaget"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 846,
    "title": "How to convert my own dataset to LerobotDataset format?",
    "body": "Hi, I am new to Lerobot and have a dataset in my own format. I would like to convert it to the LerobotDataset format.\n\nI referred to `lerobot/scripts/push_dataset_to_hub.py`, but it seems to be deprecated. Could you provide guidance or an updated method for converting custom datasets?\n\nThanks in advance!",
    "url": "https://github.com/huggingface/lerobot/issues/846",
    "state": "closed",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-03-11T09:17:23Z",
    "updated_at": "2025-04-15T00:59:10Z",
    "user": "yilin404"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 951,
    "title": "Nan's on step 1  of 405B model training",
    "body": "Anyone has any tip of how to  debug/prevent nan's  on step 1  during FSDP+TP training of the 405B model on 256 GPU's on the C4 dataset ? ",
    "url": "https://github.com/pytorch/torchtitan/issues/951",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-11T07:00:12Z",
    "updated_at": "2025-03-28T01:47:28Z",
    "comments": 12,
    "user": "githubsgi"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 498,
    "title": "How to Enable enforce_eager or Disable CUDA Graph in Evaluation",
    "body": "Evaluation code is currently using lighteval and vLLM for inference, and I would like to disable CUDA Graph by enabling options like ```enforce_eager```. However, I could not find a command-line argument for this in ```$MODEL_ARGS```. Additionally, setting it as an environment variable (e.g., VLLM_ENFORCE_EAGER) does not seem to work.\n\nIs there a way to achieve this? Any guidance would be appreciated.",
    "url": "https://github.com/huggingface/open-r1/issues/498",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-11T00:25:49Z",
    "updated_at": "2025-03-11T04:54:02Z",
    "user": "superdocker"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11020,
    "title": "Multi-gpus Context Parallel training support?",
    "body": "Nowadays, the number of parameters in video generation models is increasing, and the video length is increasing. When training video models, it is difficult to fit a complete video sequence(200k~ tokens) on a single GPU. Some sequence parallel training technologies can solve this problem, such as the [fastvideo](https://github.com/hao-ai-lab/FastVideo) training framework, but the imperfection of this framework makes it difficult to use. Can the diffusers framework support sequence parallel training?",
    "url": "https://github.com/huggingface/diffusers/issues/11020",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-10T11:45:30Z",
    "updated_at": "2025-07-18T13:05:08Z",
    "comments": 2,
    "user": "yinian-lw"
  },
  {
    "repo": "huggingface/blog",
    "number": 2728,
    "title": "Open In \"02_how_to_generate\", code cell 1 has an outdated version of tensorflow",
    "body": "The notebook 02_how_to_generate.ipynb currently specifies tensorflow==2.1, which is no longer available.\n\nif we run that cell we get the error:Could not find a version that satisfies the requirement tensorflow==2.1 (from versions: 2.12.0rc0, 2.12.0rc1, 2.12.0, 2.12.1, 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0, 2.15.0.post1, 2.15.1, 2.16.0rc0, 2.16.1, 2.16.2, 2.17.0rc0, 2.17.0rc1, 2.17.0, 2.17.1, 2.18.0rc0, 2.18.0rc1, 2.18.0rc2, 2.18.0, 2.19.0rc0) ERROR: No matching distribution found for tensorflow==2.1.",
    "url": "https://github.com/huggingface/blog/issues/2728",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-09T18:05:55Z",
    "updated_at": "2025-03-09T18:06:11Z",
    "user": "Umashankar86"
  },
  {
    "repo": "huggingface/blog",
    "number": 2727,
    "title": "Open In \"02_how_to_generate\", code cell 1 has an outdated version of tensorflow",
    "body": "The notebook 02_how_to_generate.ipynb currently specifies tensorflow==2.1, which is no longer available.\n\nif we run that cell we get the error:Could not find a version that satisfies the requirement tensorflow==2.1 (from versions: 2.12.0rc0, 2.12.0rc1, 2.12.0, 2.12.1, 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0, 2.15.0.post1, 2.15.1, 2.16.0rc0, 2.16.1, 2.16.2, 2.17.0rc0, 2.17.0rc1, 2.17.0, 2.17.1, 2.18.0rc0, 2.18.0rc1, 2.18.0rc2, 2.18.0, 2.19.0rc0) ERROR: No matching distribution found for tensorflow==2.1.",
    "url": "https://github.com/huggingface/blog/issues/2727",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-09T18:04:48Z",
    "updated_at": "2025-03-09T18:05:03Z",
    "user": "Umashankar86"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7442,
    "title": "Flexible Loader",
    "body": "### Feature request\n\nCan we have a utility function that will use `load_from_disk` when given the local path and `load_dataset` if given an HF dataset?\n\nIt can be something as simple as this one:\n\n```\ndef load_hf_dataset(path_or_name):\n    if os.path.exists(path_or_name):\n        return load_from_disk(path_or_name)\n    else:\n        return load_dataset(path_or_name)\n```\n\n### Motivation\n\nThis can be done inside the user codebase, too, but in my experience, it becomes repetitive code.\n\n### Your contribution\n\nI can open a pull request.",
    "url": "https://github.com/huggingface/datasets/issues/7442",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-03-09T16:55:03Z",
    "updated_at": "2025-03-27T23:58:17Z",
    "comments": 3,
    "user": "dipta007"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1751,
    "title": "Analyze uploaded PDF files through OpenAI API",
    "body": "When I upload a PDF file and leverage it, I will get the base64 data. But I didn't find the code to process it in endpoints/openai, while it can handle the image base64 data. Besides, I failed to transfer it back to text. How can I analyze the file through OpenAI API? \n\n![Image](https://github.com/user-attachments/assets/278ec727-2e9b-41b8-a8d3-080d50a5a9e9)",
    "url": "https://github.com/huggingface/chat-ui/issues/1751",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2025-03-09T09:31:13Z",
    "updated_at": "2025-03-15T18:38:17Z",
    "comments": 2,
    "user": "zu0feng"
  },
  {
    "repo": "huggingface/hf-hub",
    "number": 99,
    "title": "Where is the `0.4.2` commit?",
    "body": "I saw on [crates.io](https://crates.io/crates/hf-hub/versions) that the latest version of hf-hub is 0.4.2, but I can't find the 0.4.2 tag on GitHub. Could you tell me what is the commit ID corresponding to this version?\n\nSincerely suggest that you add a corresponding tag for each version release, which can effectively avoid such inefficient communication and thus speed up the work efficiency of other contributors.\ud83d\ude4f",
    "url": "https://github.com/huggingface/hf-hub/issues/99",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-08T12:43:18Z",
    "updated_at": "2025-06-16T09:41:15Z",
    "user": "HairlessVillager"
  },
  {
    "repo": "huggingface/transformers",
    "number": 36613,
    "title": "In \"02_how_to_generate\", code cell 1 has an error message",
    "body": "### System Info\n\nIn \"02_how_to_generate\", code cell 1 has an error message but the rest works fine: ERROR: Could not find a version that satisfies the requirement tensorflow==2.1 (from versions: 2.12.0rc0, 2.12.0rc1, 2.12.0, 2.12.1, 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0, 2.15.0.post1, 2.15.1, 2.16.0rc0, 2.16.1, 2.16.2, 2.17.0rc0, 2.17.0rc1, 2.17.0, 2.17.1, 2.18.0rc0, 2.18.0rc1, 2.18.0rc2, 2.18.0, 2.19.0rc0) ERROR: No matching distribution found for tensorflow==2.1.\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nRun code cell 1\n\n### Expected behavior\n\nNo error message should appear when running code cell",
    "url": "https://github.com/huggingface/transformers/issues/36613",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-03-08T07:46:39Z",
    "updated_at": "2025-04-16T08:03:04Z",
    "user": "kvutien"
  },
  {
    "repo": "pytorch/xla",
    "number": 8809,
    "title": "MarkShardingFunction causes OOM when applied to model parameters",
    "body": "When tested in https://github.com/AI-Hypercomputer/torchprime/pull/144/files, if we shard parameters with `MarkShardingFunction.apply`, that causes Mixtral to OOM. Gradient HLO arrays end up living much longer than needed.\n\nShard both activations and model parameters with `MarkShardingFunction`: http://shortn/_vvNPYfxSe3\nShard activation with `MarkShardingFunction` and shard model parameters with `xs.mark_sharding`: http://shortn/_6OxaSdjJzQ\n\nAnother clue is that if I change `MarkShardingFunction` to be not in-place, then the OOM goes away:\n\n```\nclass MarkShardingFunction(torch.autograd.Function):\n  \"\"\"\n  Autograd function to mark_sharding on intermediate tensors and the gradient\n  of the intermediate tensors during backward pass.\n\n  Usage:\n  new_tensor = MarkShardingFunction.apply(tensor, mesh, ('axis_1', 'axis_2'))\n\n  This is required to guide GSPMD sharding propagation better during the\n  backward pass as during complicated workloads the compiler can introduce extra\n  collectives that can hurt performance.\n  \"\"\"\n\n  @staticmethod\n  def forward(\n    ctx, torch_tensor: torch.Tensor, mesh: Mesh, partition_spec: tuple\n  ) -> torch.Tensor:\n    o = mark_sharding(torch_tensor.clone(), mesh, partition_spec)\n    ctx.partition_spec = partition_spec\n    ctx.mesh = mesh\n    return o.global_tensor\n\n  @staticmethod\n  def backward(ctx, grad_output: torch.Tensor) -> torch.Tensor:\n    partition_spec = ctx.partition_spec\n    mesh = ctx.mesh\n    o = mark_sharding(grad_output.clone(), mesh, partition_spec)\n    return o.global_tensor, None, None\n```",
    "url": "https://github.com/pytorch/xla/issues/8809",
    "state": "closed",
    "labels": [
      "performance"
    ],
    "created_at": "2025-03-08T06:14:48Z",
    "updated_at": "2025-03-17T04:03:08Z",
    "comments": 3,
    "user": "tengyifei"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11008,
    "title": "Support wan2.1 video model?",
    "body": "### Did you like the remote VAE solution?\n\nYes. \n\n### What can be improved about the current solution?\n\nWan2.1 video model support is appreciated!\n\n### What other VAEs you would like to see if the pilot goes well?\n\nWan2.1 video model support is appreciated!\n\n### Notify the members of the team\n\n@hlky @sayakpaul",
    "url": "https://github.com/huggingface/diffusers/issues/11008",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-03-08T04:21:33Z",
    "updated_at": "2025-05-09T15:03:47Z",
    "comments": 6,
    "user": "kexul"
  },
  {
    "repo": "huggingface/trl",
    "number": 3028,
    "title": "Distill teacher models where the vocab size of teacher and student is different",
    "body": "I am trying to distill a Qwen2.5-7B-Instruct to Qwen2.5-5B-Instruct using a sample code \n\n```from datasets import Dataset\nfrom trl import GKDConfig, GKDTrainer\nfrom transformers import (\n    AutoModelForCausalLM,\n    AutoTokenizer,\n)\n\nNUM_DUMMY_SAMPLES = 100\n\ntokenizer = AutoTokenizer.from_pretrained(\"Qwen/Qwen2.5-0.5B-Instruct\")\n\nmodel = AutoModelForCausalLM.from_pretrained(\"Qwen/Qwen2.5-0.5B-Instruct\")\n\nteacher_model = AutoModelForCausalLM.from_pretrained(\"Qwen/Qwen2.5-7B-Instruct\")\n\ntrain_dataset = Dataset.from_dict(\n    {\n        \"messages\": [\n            [\n                {\"role\": \"user\", \"content\": \"Hi, how are you?\"},\n                {\"role\": \"assistant\", \"content\": \"I'm great thanks\"},\n            ]\n        ]\n        * NUM_DUMMY_SAMPLES\n    }\n)\neval_dataset = Dataset.from_dict(\n    {\n        \"messages\": [\n            [\n                {\"role\": \"user\", \"content\": \"What colour is the sky?\"},\n                {\"role\": \"assistant\", \"content\": \"The sky is blue\"},\n            ]\n        ]\n        * NUM_DUMMY_SAMPLES\n    }\n)\n\ntraining_args = GKDConfig(output_dir=\"gkd-model\", per_device_train_batch_size=1)\ntrainer = GKDTrainer(\n    model=model,\n    teacher_model=teacher_model,\n    args=training_args,\n    processing_class=tokenizer,\n    train_dataset=train_dataset,\n    eval_dataset=eval_dataset,\n)\ntrainer.train()```\n\nBut this gives me an error because their vocab sizes are different (so might be their tokenizers). Is there a workaround for these kind of situations? How are such cases handled?",
    "url": "https://github.com/huggingface/trl/issues/3028",
    "state": "open",
    "labels": [
      "\ud83c\udfcb GKD"
    ],
    "created_at": "2025-03-08T00:29:01Z",
    "updated_at": "2025-10-29T04:15:50Z",
    "user": "shaunakjoshi12"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11005,
    "title": "pipeline_wan_i2v.py: minor discrepancy between arg default and docstring",
    "body": "### Describe the bug\n\nhttps://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan_i2v.py\n\nLine 447 (arg default):\n```output_type: Optional[str] = \"np\",```\n\nLine 496 (docstring):\n```output_type (`str`, *optional*, defaults to `\"pil\"`):```\n\n### Reproduction\n\nn/a\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nn/a\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/11005",
    "state": "closed",
    "labels": [
      "bug",
      "good first issue",
      "help wanted",
      "contributions-welcome"
    ],
    "created_at": "2025-03-07T16:37:48Z",
    "updated_at": "2025-04-24T18:49:38Z",
    "comments": 2,
    "user": "rolux"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 301,
    "title": "How to train text-to-video generation model on different generation models using Disney dataset?",
    "body": "The current repository does not explicitly describe ho to change training methods between t2v or i2v.\n",
    "url": "https://github.com/huggingface/finetrainers/issues/301",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-07T16:02:42Z",
    "updated_at": "2025-03-07T16:08:06Z",
    "user": "kjosh925"
  },
  {
    "repo": "huggingface/speech-to-speech",
    "number": 159,
    "title": "What is from df.enhance import enhance, init_df ? in vad_handler?",
    "body": "",
    "url": "https://github.com/huggingface/speech-to-speech/issues/159",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-07T15:07:53Z",
    "updated_at": "2025-03-07T15:07:53Z",
    "user": "Manukrishna2K"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 11002,
    "title": "Any chance class members like self._interrupt could be defined in __init__ across pipelines?",
    "body": "### Describe the bug\n\nI think there is no benefit to late initializing here and it puts a burden on the library user that could be easily avoided. Also leads to some confusion as it is uncommon, code inspection flags this. Let me know if I'm missing something.\n\n### Reproduction\n\n```\nclass WanImageToVideoPipeline:\n\tdef __init__(self):\n\t\tpass\n\t\n\tdef __call__(self, *args, **kwargs):\n\t\tself._interrupt = False\n\t\treturn 23\n\n\t@property\n\tdef interrupt(self):\n\t\treturn self._interrupt\n\t\npipe = WanImageToVideoPipeline()\n\ndef on_async_user_abort_call_me_any_time():\n\t# check if already interrupted but mid step\n\tprint(pipe.interrupt)\n\n\non_async_user_abort_call_me_any_time()\n```\n\n### Logs\n\n```shell\nAttributeError: 'WanImageToVideoPipeline' object has no attribute '_interrupt'. Did you mean: 'interrupt'?\n```\n\n### System Info\n\nDiffusers 0.33.0.dev0, Linux, Python 3.10\n\n### Who can help?\n\n@yiyixuxu @DN6",
    "url": "https://github.com/huggingface/diffusers/issues/11002",
    "state": "open",
    "labels": [
      "bug",
      "help wanted",
      "contributions-welcome"
    ],
    "created_at": "2025-03-07T11:28:27Z",
    "updated_at": "2025-05-26T07:21:47Z",
    "comments": 9,
    "user": "spezialspezial"
  },
  {
    "repo": "pytorch/ao",
    "number": 1850,
    "title": "What the dtype of input in Float8Linear backward?",
    "body": "In Float8Linear forward input is saved in high precision, \n\n<img width=\"605\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b2f4fdff-79e6-4274-8e68-9bf7947f5003\" />\nWhy not save input in float8? I don't know if I understand this correctly.",
    "url": "https://github.com/pytorch/ao/issues/1850",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-07T07:33:01Z",
    "updated_at": "2025-03-10T16:28:11Z",
    "user": "yh8899"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 148747,
    "title": "How can I use inductor aot_compile  to support a MoE network?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nDeepseek has sparked a wave of enthusiasm for the design of Moe (Mixture of Experts) network architectures. I am often asked how to accelerate the inference of an Moe network. Undoubtedly, I thought of using Inductor's aot_compile to compile it into a dynamic library and then calling it in C++ for acceleration.\n\nUnfortunately, the process of selecting experts in Moe is different from that of a typical dense network. This part of the syntax is more like an extension of PyTorch, closer to Python's syntax, and cannot be traced. Below is a simple demo I wrote. I would like to know if the developers of Inductor have any plans to support Moe networks?\n\n\n```Python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass Expert(nn.Module):\n    def __init__(self, input_dim, output_dim):\n        super(Expert, self).__init__()\n        self.linear = nn.Linear(input_dim, output_dim)\n\n    def forward(self, x):\n        return self.linear(x)\n\nclass MoE(nn.Module):\n    def __init__(self, input_dim, output_dim, num_experts=10, top_k=2):\n        super(MoE, self).__init__()\n        # Eight experts for gating\n        self.other_experts = nn.ModuleList([Expert(input_dim, output_dim) for _ in range(num_experts - 2)])\n        # Gate network to choose top_k experts\n        self.gate = nn.Linear(input_dim, num_experts - 2)\n        # Final output layer\n        self.final_linear = nn.Linear((top_k) * output_dim, output_dim)\n\n    def forward(self, x):\n        # Compute gating scores\n        gate_scores = self.gate(x)\n        topk_scores, topk_indices = torch.topk(gate_scores, 2, dim=-1)\n        \n        # Collect outputs from selected experts based on gating\n        selected_expert_outputs = torch.stack(\n            [torch.stack([self.other_experts[i](x[idx])  for i in topk_indice], dim = 0) for idx, topk_indice in enumerate(topk_indices)], dim=0\n        )\n\n        # Flatten and pass through final linear layer\n        all_expert_outputs = selected_expert_outputs.view(x.size(0), -1)\n        output = self.final_linear(all_expert_outputs) \n        return output\n\n\nif __name__ == \"__main__\":\n    # Example usage\n    input_dim = 128\n    output_dim = 64\n    moe = MoE(input_dim, output_dim)\n\n    x = torch.randn(32, input_dim)  # Batch size of 32\n    output = moe(x)\n    print(output.shape)  # Expected output shape: [32, 64]\n\n\n    export_model = torch.export.export(\n        mod=moe,\n        args=tuple([torch.randn(32, input_dim)]),\n        dynamic_shapes={\"x\": {0: torch.export.Dim(\"batch\", min=1, max=1024)}},\n    )\n```\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @chauhang @penguinwu @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4 @desertfire @chenyang78 @yushangdi",
    "url": "https://github.com/pytorch/pytorch/issues/148747",
    "state": "closed",
    "labels": [
      "oncall: pt2",
      "export-triage-review",
      "oncall: export",
      "module: aotinductor"
    ],
    "created_at": "2025-03-07T07:04:07Z",
    "updated_at": "2025-05-24T02:21:21Z",
    "user": "sujuyu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 148713,
    "title": "[torch.export] How to export with the model having *args and **kwargs as forward signature?",
    "body": "This is the original model code:\n\n```python\nfrom diffusers.models import AutoencoderKL\nimport torch\n\nmodel_name = \"black-forest-labs/FLUX.1-dev\"\nhf_safetensor = True\nmodel_opts = {'torch_dtype': torch.float16}\nmodel = AutoencoderKL.from_pretrained(model_name, subfolder=\"vae\", use_safetensors=hf_safetensor, force_download=True, **model_opts).to(\"cpu\")\nmodel.forward = model.decode  # This turns model forward signature to *args and **kwargs\ninputs = torch.randn(1, 16, 128, 128, dtype=torch.float32, device=\"cpu\")\n\nB, H, W = torch.export.Dim(\"B\"), torch.export.Dim(\"H\"), torch.export.Dim(\"W\")\ndynamic_shapes = ({0:B, 2:H, 3:W},)\ntorch.export.export(\n    model,\n    (inputs,),\n    dynamic_shapes=dynamic_shapes,\n    strict=False\n)\n```\n\nNo matter what data structure I turn inputs or dynamic_shapes to, it mismatches.\n\nA simple and not so much making sense example could be like this:\n```python\nimport torch\nimport torch.nn as nn\nimport torch.onnx\n\nclass AddModel(nn.Module):\n    def __init__(self):\n        super(AddModel, self).__init__()\n\n    def forward(self, x):\n        return torch.sigmoid(x)\n\nclass WrappedModel(nn.Module):\n    def __init__(self, model):\n        super(WrappedModel, self).__init__()\n        self.model = model\n\n    def forward(self, *arga, **kwargs):\n        return self.model(*arga, **kwargs)\n\n# Instantiate the model\nmodel = WrappedModel(AddModel())\n\n# Set the model to evaluation mode\nmodel.eval()\n\n# Create dynamic input tensors\nx = torch.randn(2, 3)\n\n# Define dynamic axes for ONNX export\ndynamic_shapes = ({0: torch.export.Dim.AUTO, 1: torch.export.Dim.AUTO},)\n\ntorch.export.export(\n    model,\n    (x,),\n    dynamic_shapes=dynamic_shapes,\n    strict=False\n)\n```\n\n\n\ncc @chauhang @penguinwu @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4",
    "url": "https://github.com/pytorch/pytorch/issues/148713",
    "state": "closed",
    "labels": [
      "oncall: pt2",
      "oncall: export"
    ],
    "created_at": "2025-03-06T23:01:17Z",
    "updated_at": "2025-03-07T01:47:05Z",
    "user": "titaiwangms"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10993,
    "title": "f-divergence",
    "body": "Is there a plan to implement the f-divergence scheduler ? I would like to contribute that to the library.",
    "url": "https://github.com/huggingface/diffusers/issues/10993",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-03-06T22:46:13Z",
    "updated_at": "2025-04-06T15:02:55Z",
    "comments": 5,
    "user": "manmeet3591"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 902,
    "title": "How to populate custom variables in prompt template?",
    "body": "I'm trying to configure custom template variables in my system prompt.\n\n**Current Implementation:**\n\n1. I have a system prompt template with custom variables:\n```python\nCUSTOM_CODE_SYSTEM_PROMPT = \"\"\"You are {{ bot_name }}, a customer support assistant...\n{{ formatting_guidelines }}\n```\n\n2. Agent creation and configuration:\n```python\nfrom smolagents import CodeAgent, LiteLLMModel\n\ndef get_agent(platform: str = \"whatsapp\", variables: dict = None):\n    manager_agent = CodeAgent(\n        tools=[ClinicKnowledgeTool()],\n        model=model,\n        max_steps=3,\n    )\n    return manager_agent\n```\n\n3. Calling the agent:\n```python\nagent = get_agent(\n    platform=platform,\n    variables={\n        \"conversation_history\": conversation_history,\n        \"formatting_guidelines \": \"test\",\n    },\n)\n\nagent.prompt_templates[\"system_prompt\"] = CUSTOM_CODE_SYSTEM_PROMPT\n```\n\n**Questions:**\n1. What's the correct way to populate template variables like `{{ bot_name }}` and `{{ formatting_guidelines }}` in the system prompt?\n2. How do I handle dynamic variables like `conversation_history` that change with each request?\n\n**Environment:**\n- smolagents v1.10.0 \n- Python 3.10+\n- FastAPI integration",
    "url": "https://github.com/huggingface/smolagents/issues/902",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-06T20:45:51Z",
    "updated_at": "2025-03-07T08:54:22Z",
    "user": "Luisotee"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 295,
    "title": "[QUESTION] Ambiguity what chat templates are.",
    "body": "Issue:\n\nWhere \u27a1  https://huggingface.co/learn/agents-course/unit1/messages-and-special-tokens\n\n> This is where chat templates come in. They act as the bridge between conversational messages (user and assistant turns) and the specific formatting requirements of your chosen LLM. In other words, chat templates structure the communication between the user and the agent, ensuring that every model\u2014despite its unique special tokens\u2014receives the correctly formatted prompt.\n\nIn my opinion, the first sentence about chat templates is correct. The second part seems wrong.\n\nIt says  `...chat templates structure the communication between the user and the agent...`. \n\nCorrect Sentence:\n\n`...chat templates structure the communication between the agents and the language model or LLM...`. \n\nReason:\n\nThe Chat templates are implemented inside the agents with respective `chat.completion` method to send the user's request, through agents, to the LLMs. \n\nThe user just types into the chatbox as similar to how we type messages. The text-flow is as below in it's simplest form is as below:\nUser's message >> Chat Templates wraps the message as per LLM's specs >> send to LLMs through agents.\n\nSo the `the user and the agent` part doesn't seem very right to me. I did give my best alternative, I could thought of. I okay with anything else you come up with.",
    "url": "https://github.com/huggingface/agents-course/issues/295",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-06T17:12:41Z",
    "updated_at": "2025-03-06T17:12:41Z",
    "user": "MekongDelta-mind"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 483,
    "title": "How to calculate total optimization steps",
    "body": "I ran it on 8 GPUs and set num_generations to 8, num_processes=7\uff0c Why Total optimization steps=196, isn't it Num examples/Total train batch size? It seems that multiplying by num_generations yields 196. Why do we need to multiply by num_generations\uff1f\n[INFO|trainer.py:2405] 2025-03-06 12:04:09,913 >> ***** Running training *****\n[INFO|trainer.py:2406] 2025-03-06 12:04:09,913 >>   Num examples = 5,498\n[INFO|trainer.py:2407] 2025-03-06 12:04:09,914 >>   Num Epochs = 1\n[INFO|trainer.py:2408] 2025-03-06 12:04:09,914 >>   Instantaneous batch size per device = 8\n[INFO|trainer.py:2411] 2025-03-06 12:04:09,914 >>   Total train batch size (w. parallel, distributed & accumulation) = 224\n[INFO|trainer.py:2412] 2025-03-06 12:04:09,914 >>   Gradient Accumulation steps = 4\n[INFO|trainer.py:2413] 2025-03-06 12:04:09,914 >>   Total optimization steps = 196\n[INFO|trainer.py:2414] 2025-03-06 12:04:09,915 >>   Number of trainable parameters = 7,615,616,512",
    "url": "https://github.com/huggingface/open-r1/issues/483",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-06T09:47:19Z",
    "updated_at": "2025-03-13T08:45:23Z",
    "user": "HelloWorld506"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1221,
    "title": "How to use Xenova/deplot using the transformers.js library.",
    "body": "### Question\n\nCurrently I'm doing:\n\n```\n      this.pipeline = await pipeline(\"image-text-to-text\", \"Xenova/deplot\", {\n        progress_callback: (progress) => {\n          this.updateProgress({ \n            status: `Loading model: ${progress.status}`, \n            progress: 0.1 + (progress.progress * 0.9) \n          });\n        },\n        device: \"cpu\",\n        dtype: dtype,\n      });\n```\n\nI get the following error:\n\n```\nError: Unsupported pipeline: image-text-to-text. Must be one of [text-classification,token-classification,question-answering,fill-mask,summarization,translation,text2text-generation,text-generation,zero-shot-classification,audio-classification,zero-shot-audio-classification,automatic-speech-recognition,text-to-audio,image-to-text,image-classification,image-segmentation,zero-shot-image-classification,object-detection,zero-shot-object-detection,document-question-answering,image-to-image,depth-estimation,feature-extraction,image-feature-extraction]\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/1221",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-06T07:56:07Z",
    "updated_at": "2025-03-06T11:36:19Z",
    "user": "aadya940"
  },
  {
    "repo": "huggingface/peft",
    "number": 2410,
    "title": "running forward loop using get_peft_model disables requires_grad on output",
    "body": "Hi, \nI would like to report a recent issue I have been facing, but I am not sure if it is a bug or I am doing something wrong in the process. The steps to re-create the steps are easy. The issue happens when I try to convert **Qwen2-VL-2B-Instruct** model into a PEFT model using `get_peft_model` method. Simply load the model using the sample code in https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct and try to convert it to a PEFT model using a typical **8bit** LoraConfig with just sample `target_modules=[\"q_proj\", \"v_proj\"]`. Then simply run a forward call to the model using a dummy input, such as `input_ids = torch.zeros((4, 1247)).to(device)`. When I inspect the `requires_grad` of `logits` attribute of the output, it is False. Meaning that I cannot run backward based on that output. This issue has been puzzling me for a while. I would appreciate if you can help me with a solution or advice how to address it properly. \n",
    "url": "https://github.com/huggingface/peft/issues/2410",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-06T05:12:42Z",
    "updated_at": "2025-04-13T15:03:40Z",
    "comments": 4,
    "user": "Hamidreza3252"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 148634,
    "title": "README doesn't explain how to run tests in the \"Test PyTorch\" section",
    "body": "### \ud83d\udcda The doc issue\n\nREADME needs to have the \"Test PyTorch\" section after the [Install PyTorch](https://github.com/pytorch/pytorch#install-pytorch) section in the README.\n\nTesting is the next step after building PyTorch.\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/148634",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-06T04:32:44Z",
    "updated_at": "2025-03-06T17:58:19Z",
    "user": "yurivict"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 826,
    "title": "Should the pi0 pytorch model on Huggingface load model.safetensors or the other three satetensors?",
    "body": "https://huggingface.co/lerobot/pi0/tree/main\n\nWhat is the difference between `model.safetensors` and the other three satetensors (`model-00001-of-0000*.safetensors`)? The pi0 model `from_pretrained()` method will load `model.safetensor`s by default instead of `model-00001-of-0000*.safetensors`.\n\n",
    "url": "https://github.com/huggingface/lerobot/issues/826",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2025-03-06T03:12:05Z",
    "updated_at": "2025-10-08T08:42:49Z",
    "user": "chopinxxxx"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 290,
    "title": "[QUESTION] First Agent code does not produce any output",
    "body": "I cloned and tried running the first agent app.py. I wanted to try the image generation tool. the application built and ran but when I tried typing something in the chat such as \"generate an image of a cat\", there is no response from the bot. it stays blank\n",
    "url": "https://github.com/huggingface/agents-course/issues/290",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-05T23:49:06Z",
    "updated_at": "2025-03-18T14:45:44Z",
    "user": "Sabk0926"
  },
  {
    "repo": "pytorch/xla",
    "number": 8799,
    "title": "Re-enable CPU test `test/test_python_ops.py -k TestPythonOps` for `uint8` dtype",
    "body": "To unblock bumping libtpu pin, we have to disable this test: https://github.com/pytorch/xla/pull/8788/files\n\nThis test fails with a LLVM memory allocation error on the CPU.\n\nWe should report this bug upstream and re-enable it after a fix is there.\n\nFailed run: https://github.com/pytorch/xla/actions/runs/13668949609/job/38217578967?pr=8788\n\nError:\n\n```\nE0000 00:00:1741156332.106836   21429 execution_engine.cc:53] LLVM compilation error: Cannot allocate memory\n    ./test/run_tests.sh: line 51: 21120 Segmentation fault      (core dumped) python3 \"$@\"\n```\n",
    "url": "https://github.com/pytorch/xla/issues/8799",
    "state": "closed",
    "labels": [
      "bug",
      "libtpu"
    ],
    "created_at": "2025-03-05T19:40:50Z",
    "updated_at": "2025-05-05T00:25:18Z",
    "comments": 0,
    "user": "tengyifei"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3421,
    "title": "How to sync distribute model paramaters when training with continual learning fashion?",
    "body": "When performing distributed continual learning tasks, it is common to expand model parameters as tasks increase. For example, I have defined an `expand_classifier()`  method with random initialization to increase the parameters of the classifier. \n\nHow can I ensure that the newly added parameters are initialized the same on each GPU model?\n\nIf i do\n```\nif self.accelerator.is_main_process:\n    self.model.module.prompt.expand_classifier()\n\n```\nHow can i sync classifier across all distributed model?",
    "url": "https://github.com/huggingface/accelerate/issues/3421",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-05T13:44:15Z",
    "updated_at": "2025-04-13T15:06:22Z",
    "user": "Iranb"
  },
  {
    "repo": "pytorch/xla",
    "number": 8792,
    "title": "Generating stablehlo.composite and running it through PJRT",
    "body": "## \u2753 Questions and Help\n\nFollowing the example from the [docs](https://pytorch.org/xla/release/r2.6/features/stablehlo.html#preserving-high-level-pytorch-operations-in-stablehlo-by-generating-stablehlo-composite), I tried to use `StableHLOCompositeBuilder` to generate a `stablehlo.composite` op with the difference that I want to actually run it through PJRT instead of exporting it.\nIs there a way of doing this currently or are there any future plans regarding it?\n\nThis is my example code: \n\n```python\n\nimport os\nos.environ['XLA_STABLEHLO_COMPILE'] = '1'\n\nimport torch\nimport torch.nn.functional as F\nfrom torch_xla import stablehlo\nfrom torch_xla.experimental.mark_pattern_utils import StableHLOCompositeBuilder\n\nclass M(torch.nn.Module):\n\n    def __init__(self):\n        super().__init__()\n        self.q_proj = torch.nn.Linear(128, 128, bias=False)\n        self.k_proj = torch.nn.Linear(128, 128, bias=False)\n        self.v_proj = torch.nn.Linear(128, 128, bias=False)\n        self.b = StableHLOCompositeBuilder(\"test.sdpa\", {\"scale\": 0.25, \"other_attr\": \"val\"})\n\n    def forward(self, x):\n        q = self.q_proj(x)\n        k = self.k_proj(x)\n        v = self.v_proj(x)\n        q, k, v = self.b.mark_inputs(q, k, v)\n        attn_out = F.scaled_dot_product_attention(q, k, v, scale=0.25)\n        attn_out = self.b.mark_outputs(attn_out)\n        attn_out = attn_out + x\n        return attn_out\n\ndevice = \"xla\"\n\ninput_args = torch.randn((10, 8, 128)).to(device)\nmodel = M().to(device)\nout = model(input_args)\nprint(out)\n\n```\n\n```\nWARNING:root:Found CUDA without GPU_NUM_DEVICES. Defaulting to PJRT_DEVICE=CUDA with GPU_NUM_DEVICES=1\n\nloc(\"select.69\"): error: 'stablehlo.select' op using value defined outside the region\n\n...\n\nRuntimeError: torch_xla/csrc/runtime/stablehlo_helper.cc:109 : Check failed: status.ok()\n*** Begin stack trace ***\n\ttsl::CurrentStackTrace()\n\ttorch_xla::ConvertHloToStableHlo(xla::HloModuleProto const*, mlir::ModuleOp*)\n\ttorch_xla::runtime::PjRtComputationClient::Compile(std::vector<torch_xla::runtime::ComputationClient::CompileInstance, std::allocator<torch_xla::runtime::ComputationClient::CompileInstance> >)\n\ttorch_xla::XLAGraphExecutor::Compile(std::vector<c10::intrusive_ptr<torch_xla::XLATensor, c10::detail::intrusive_target_default_null_type<torch_xla::XLATensor> >, std::allocator<c10::intrusive_ptr<torch_xla::XLATensor, c10::detail::intrusive_target_default_null_type<torch_xla::XLATensor> > > >&, absl::lts_20230802::Span<std::string const>, torch::lazy::LazyGraphExecutor::SyncTensorCollection const&, torch::lazy::LazyGraphExecutor::PostOrderData*, std::vector<torch::lazy::Value, std::allocator<torch::lazy::Value> > const&)\n\ttorch_xla::XLAGraphExecutor::SyncTensorsGraphInternal(std::vector<c10::intrusive_ptr<torch_xla::XLATensor, c10::detail::intrusive_target_default_null_type<torch_xla::XLATensor> >, std::allocator<c10::intrusive_ptr<torch_xla::XLATensor, c10::detail::intrusive_target_default_null_type<torch_xla::XLATensor> > > >*, absl::lts_20230802::Span<std::string const>, torch::lazy::LazyGraphExecutor::SyncTensorsConfig const&, bool)\n\ttorch_xla::XLAGraphExecutor::SyncTensorsGraph(std::vector<c10::intrusive_ptr<torch_xla::XLATensor, c10::detail::intrusive_target_default_null_type<torch_xla::XLATensor> >, std::allocator<c10::intrusive_ptr<torch_xla::XLATensor, c10::detail::intrusive_target_default_null_type<torch_xla::XLATensor> > > >*, absl::lts_20230802::Span<std::string const>, bool, bool, bool)\n\n...\n\n*** End stack trace ***\nMHLO -> StableHLO conversion failed.\nStableHLO Module from MHLO -> StableHLO conversion is not leagal.Please open a github issue to PyTorch/XLA.\n\n```\n\nI used torch-xla 2.5.1 for the example above but I get similar error with 2.6\n```\ntorch                    2.5.1\ntorch-xla                2.5.1\n```\n",
    "url": "https://github.com/pytorch/xla/issues/8792",
    "state": "open",
    "labels": [
      "bug",
      "stablehlo"
    ],
    "created_at": "2025-03-05T10:45:12Z",
    "updated_at": "2025-03-06T12:49:08Z",
    "comments": 1,
    "user": "sechkova"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 817,
    "title": "SO 100 Arm assembly instruction inconsistency",
    "body": "Step 22 of the assembly guide shows a picture of wrist that is flipped comparing to the drawing and front page photo. Are both right? If not, which one is correct?\n\n[Latest instruction](https://github.com/huggingface/lerobot/blob/main/examples/10_use_so100.md#wrist-assembly):\n<img width=\"723\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/490e23aa-1085-4c89-9148-49304ac85ed5\" />\n\n[Assembly video](https://github.com/huggingface/lerobot/blob/main/examples/10_use_so100.md#additional-guidance):\n<img width=\"812\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b12cc0a7-bff9-4b2a-b2a2-30333a205506\" />\n\n[Project home page](https://github.com/huggingface/lerobot/tree/main?tab=readme-ov-file#------------build-your-own-so-100-robot):\n![Image](https://github.com/user-attachments/assets/f23cf441-93f9-4bd5-aeba-45d2d81aa80d)",
    "url": "https://github.com/huggingface/lerobot/issues/817",
    "state": "closed",
    "labels": [
      "question",
      "robots",
      "stale"
    ],
    "created_at": "2025-03-05T05:23:57Z",
    "updated_at": "2025-11-30T02:37:07Z",
    "user": "liuhuanjim013"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 472,
    "title": "how to set  the max_model_length, max_new_tokens and generation_size when evaluate ?",
    "body": "Suppose the max_position_embedding of my model is 4096, how to set max_model_length, max_new_tokens and generation_size  to. get the correct evaluate result?  For example , set max_model_length=4096, max_new_tokens=1000, generation_size=1000?",
    "url": "https://github.com/huggingface/open-r1/issues/472",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-05T04:01:48Z",
    "updated_at": "2025-03-12T03:41:42Z",
    "user": "ItGirls"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 930,
    "title": "`CheckpointManager.save` with async mode is vulnerable to race conditions",
    "body": "### Bug description\n\nBased on [[Distributed w/ TorchTitan] Optimizing Checkpointing Efficiency with PyTorch DCP](https://discuss.pytorch.org/t/distributed-w-torchtitan-optimizing-checkpointing-efficiency-with-pytorch-dcp/211250)'s Figure 3, when using async checkpointing via `CheckpointManager` with `AsyncMode.ASYNC`, I would think `CheckpointManager.save` blocks until the model is at least in \"staging\":\n\n![Figure 3 from linked article](https://github.com/user-attachments/assets/789d48f2-1804-435f-85e5-5cd08a17137d)\n\nHowever, running the below reproducer, we see that is not actually happening with `save`, the model is actually not ready and `load` fails.\n\nIs this the expected behavior?\n\nIt seems suboptimal to me, I would think the predictable behavior (given Figure 3) is:\n\n1. `save` with async mode: (1) blocks until the model is in \"staging\", then (2) \"persistence\" takes place asynchronously\n2. Since the model is in \"staging\" after `save`, we can immediately mutate the model\n3. Then if you call `load` before the \"persistence\" is finished, `load` will just have to wait (blocking) a bit longer\n\nDoes this make sense?\n\n<details><summary>Reproducer</summary>\n\nPlease forgive the `TrainState` being overly verbose, I just needed it for this reproducer\n\n```python\nimport tempfile\nfrom collections.abc import Iterator\nfrom dataclasses import dataclass, field\nfrom io import BytesIO\nfrom pathlib import Path\nfrom typing import Any\n\nimport pytest\nimport torch\nfrom torch import nn\nfrom torch.utils.data import DataLoader, Dataset\nfrom torchtitan.components.checkpoint import AsyncMode, CheckpointManager\nfrom torchtitan.components.ft import FTManager\nfrom transformers import AutoModelForCausalLM\n\n\n@dataclass\nclass TrainState:\n\n    step: int = 0\n    global_avg_losses: list[float] = field(default_factory=list)\n    global_max_losses: list[float] = field(default_factory=list)\n    log_steps: list[int] = field(default_factory=list)\n\n    def state_dict(self) -> dict[str, Any]:\n        global_avg_losses_bytes = BytesIO()\n        torch.save(self.global_avg_losses, global_avg_losses_bytes)\n        global_max_losses_bytes = BytesIO()\n        torch.save(self.global_max_losses, global_max_losses_bytes)\n        log_steps_bytes = BytesIO()\n        torch.save(self.log_steps, log_steps_bytes)\n        return {\n            \"step\": torch.tensor(self.step, dtype=torch.int32),\n            \"global_avg_losses\": global_avg_losses_bytes,\n            \"global_max_losses\": global_max_losses_bytes,\n            \"log_steps\": log_steps_bytes,\n        }\n\n    def load_state_dict(self, state_dict) -> None:\n        self.step = state_dict[\"step\"].item()\n        state_dict[\"global_avg_losses\"].seek(0)\n        self.global_avg_losses = torch.load(\n            state_dict[\"global_avg_losses\"], weights_only=False\n        )\n        state_dict[\"global_max_losses\"].seek(0)\n        self.global_max_losses = torch.load(\n            state_dict[\"global_max_losses\"], weights_only=False\n        )\n        state_dict[\"log_steps\"].seek(0)\n        self.log_steps = torch.load(state_dict[\"log_steps\"], weights_only=False)\n\n\nclass MockDataset(Dataset):\n    def __len__(self):\n        return 10\n\n    def __getitem__(self, idx):\n        return torch.randn(128)\n\n\n@dataclass\nclass MockCheckpointConfig:\n    enable_checkpoint: bool = True\n    folder: str = \"checkpoint\"\n    interval: int = 1\n    async_mode: str = AsyncMode.DISABLED\n    keep_latest_k: int = 0\n    model_weights_only: bool = False\n    export_dtype: str = \"float32\"\n    exclude_from_loading: list[str] = field(default_factory=list)\n    load_step: int = -1\n\n\n@dataclass\nclass MockFTConfig:\n    replica_id: int = 0\n    enabled: bool = False\n\n\n@dataclass\nclass MockJobSubConfig:\n    dump_folder: str = tempfile.gettempdir()\n\n\n@dataclass\nclass MockJobConfig:\n    checkpoint: MockCheckpointConfig = field(default_factory=MockCheckpointConfig)\n    fault_tolerance: MockFTConfig = field(default_factory=MockFTConfig)\n    job: MockJobSubConfig = field(default_factory=MockJobSubConfig)\n\n\n@pytest.fixture(scope=\"session\", name=\"distributed_setup\")\ndef fixture_distributed_setup() -> Iterator[None]:\n    if not torch.distributed.is_initialized():\n        torch.distributed.init_process_group(\n            backend=\"gloo\",\n            # Use a different port as previous runs might have left it in TIME_WAIT state\n            init_method=\"tcp://localhost:10998\",\n            world_size=1,\n            rank=0,\n        )\n\n    yield\n\n    if torch.distributed.is_initialized():\n        torch.distributed.destroy_process_group()\n\n\n@pytest.fixture(scope=\"session\", name=\"model\")\ndef fixture_model(\n    distributed_setup,  # noqa: ARG001\n) -> Iterator[tuple[nn.Module, float]]:\n    model = AutoModelForCausalLM.from_pretrained(\n        \"Qwen/Qwen2.5-1.5B-Instruct\",\n        torch_dtype=torch.bfloat16,\n        device_map=\"cpu\",  # Use CPU for testing\n    )\n\n    # Return the original parameter value for verification\n    yield model, model.get_input_embeddings().weight[0, 0].item()\n",
    "url": "https://github.com/pytorch/torchtitan/issues/930",
    "state": "closed",
    "labels": [
      "question",
      "module: checkpoint"
    ],
    "created_at": "2025-03-05T02:06:09Z",
    "updated_at": "2025-03-20T18:30:28Z",
    "user": "jamesbraza"
  },
  {
    "repo": "huggingface/transformers",
    "number": 36546,
    "title": "how to use transformers with musicgen with float16",
    "body": "```\nimport transformers, torch, builtins, numpy\n\nprocessor = transformers.AutoProcessor.from_pretrained(' facebook/musicgen-stereo-melody-large', torch_dtype=torch.float16)\nmodel = transformers.MusicgenMelodyForConditionalGeneration.from_pretrained('facebook/musicgen-stereo-melody-large ,torch_dtype=torch.float16).to('cuda')\n\nresult = []\nfor _ in builtins.range(2):\n    inputs = processor(audio=result[-1] if result else None, sampling_rate=model.config.audio_encoder.sampling_rate, text='A grand and majestic symphony with soaring strings, powerful brass, and dynamic orchestration. Inspired by Beethoven and Tchaikovsky, featuring dramatic crescendos, delicate woodwind passages, and a triumphant finale. The mood is epic, emotional, and timeless', padding=True, return_tensors='pt').to('cuda')\n    audio_values = model.generate(**inputs, max_new_tokens=1000)\n    result += audio_values[0, 0].cpu().numpy(),\n\nfrom IPython.display import Audio\nAudio(numpy.concatenate(result), rate=model.config.audio_encoder.sampling_rate)\n```\ni alwayse get\n```\n<ipython-input-12-348220656bb8> in <cell line: 0>()\n      7 for _ in builtins.range(2):\n      8     inputs = processor(audio=torch.from_numpy(result[-1]).to(dtype=torch.float32) if result else None, sampling_rate=model.config.audio_encoder.sampling_rate, text='A grand and majestic symphony with soaring strings, powerful brass, and dynamic orchestration. Inspired by Beethoven and Tchaikovsky, featuring dramatic crescendos, delicate woodwind passages, and a triumphant finale. The mood is epic, emotional, and timeless', padding=True, return_tensors='pt').to('cuda')\n----> 9     audio_values = model.generate(**inputs, max_new_tokens=1000)\n     10     result += audio_values[0, 0].cpu().numpy(),\n     11 \n\n5 frames\n/usr/local/lib/python3.11/dist-packages/torch/nn/modules/linear.py in forward(self, input)\n    123 \n    124     def forward(self, input: Tensor) -> Tensor:\n--> 125         return F.linear(input, self.weight, self.bias)\n    126 \n    127     def extra_repr(self) -> str:\n\nRuntimeError: mat1 and mat2 must have the same dtype, but got Float and Half\n```\n",
    "url": "https://github.com/huggingface/transformers/issues/36546",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-05T00:40:24Z",
    "updated_at": "2025-03-06T09:49:18Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/torchx",
    "number": 1012,
    "title": "possible Improvement: Using shutdown() Before close() in `server.py`",
    "body": "### Description:\n\nWhile reviewing the get_routable_ip_to function in [torchx/apps/serve/serve.py](https://github.com/pytorch/torchx/blob/main/torchx/apps/serve/serve.py#L96), I noticed that the socket is directly closed using s.close(), without calling shutdown() beforehand.\n\n```python3\ndef get_routable_ip_to(addr: str) -> str:\n    \"\"\"\n    get_routable_ip_to opens a dummy connection to the target HTTP URL and\n    returns the IP address used to connect to it.\n    \"\"\"\n    parsed = urlparse(addr)\n    try:\n        s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\n        s.connect((parsed.hostname, parsed.port or 80))\n        return s.getsockname()[0]\n    finally:\n        s.close()\n\n```\n\n### Question\n\nWould there be any potential downsides or benefits to adding a shutdown(socket.SHUT_RDWR) call before closing the socket in the get_routable_ip_to function?\n\nPossible Benefits\n- Ensures that all pending data is properly discarded before closing, particularly if the socket is still in a half-open state.\n- Prevents potential issues with lingering resources and improves resource management.\n- Aligns with best practices for socket cleanup.\n\n### Reference\nThe Python socket documentation states:\n\n\"close() releases the resource associated with a connection but does not necessarily close the connection immediately. If you want to close the connection in a timely fashion, call shutdown() before close().\" [link](https://docs.python.org/3/library/socket.html#socket.socket.close)\n\nLooking forward to your thoughts!\n\nThanks!\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/1012",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-04T23:59:09Z",
    "updated_at": "2025-03-04T23:59:09Z",
    "comments": 0,
    "user": "allrob23"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 813,
    "title": "State Collection Timing Issue in Manipulator Teleoperation: Post-action vs Pre-action States",
    "body": "**Description:**\nI've noticed in lerobot/lerobot/common/robot_devices/robots/manipulator.py that during teleoperation, the state being collected is the state after action execution. Is this intended behavior?\nIn my understanding, model inference should use the state before action execution, not after. This could potentially impact learning and inference accuracy, as the model would be using post-action states to predict actions rather than pre-action states.\n\n![Image](https://github.com/user-attachments/assets/89a88379-9369-4eda-8885-8a250ca950dc)\n\n![Image](https://github.com/user-attachments/assets/1ad0705a-e225-4858-94d0-1b774bb4a974)\n",
    "url": "https://github.com/huggingface/lerobot/issues/813",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2025-03-04T14:19:52Z",
    "updated_at": "2025-10-07T02:26:55Z",
    "user": "www-Ye"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 284,
    "title": "[QUESTION] Clarify Payment Required for completing Unit 2 notebooks",
    "body": "For the notebook for [components.ipynb]() I ran the `IngestionPipeline` function as follows:\n\n```py\nfrom llama_index.embeddings.huggingface_api import HuggingFaceInferenceAPIEmbedding\nfrom llama_index.core.node_parser import SentenceSplitter\nfrom llama_index.core.ingestion import IngestionPipeline\n\n# create the pipeline with transformations\npipeline = IngestionPipeline(\n    transformations=[\n        SentenceSplitter(),\n        HuggingFaceInferenceAPIEmbedding(model_name=\"BAAI/bge-small-en-v1.5\"),\n    ]\n)\n\n# run the pipeline sync or async\nnodes = await pipeline.arun(documents=documents[:10])\nnodes\n```\n\nI got the following outcome and looks like this .ipynb can't be executed without a payment route:\n\n```python\n---------------------------------------------------------------------------\n\nClientResponseError                       Traceback (most recent call last)\n\n[<ipython-input-15-067f632f4f21>](https://localhost:8080/#) in <cell line: 1>()\n     12 \n     13 # run the pipeline sync or async\n---> 14 nodes = await pipeline.arun(documents=documents[:10])\n     15 nodes\n\n12 frames\n\n[/usr/local/lib/python3.11/dist-packages/aiohttp/client_reqrep.py](https://localhost:8080/#) in raise_for_status(self)\n   1159                 self.release()\n   1160 \n-> 1161             raise ClientResponseError(\n   1162                 self.request_info,\n   1163                 self.history,\n\nClientResponseError: 402, message='Payment Required', url='https://api-inference.huggingface.co/pipeline/feature-extraction/BAAI/bge-small-en-v1.5'\n```\n\nis there any free and open alternatives?\n",
    "url": "https://github.com/huggingface/agents-course/issues/284",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-04T14:16:01Z",
    "updated_at": "2025-03-06T16:08:39Z",
    "user": "carlosug"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 281,
    "title": "[any free and unpaid alternative for Inference Providers?]",
    "body": "while executing the [notebook](https://colab.research.google.com/github/huggingface/agents-course/blob/main/notebooks/unit2/smolagents/multiagent_notebook.ipynb) on **unit2. multi agent systems**, i got the following client error for [Inference Providers](https://huggingface.co/blog/inference-providers):\n\n```python\n\n> result = agent.run(task)\n\nHTTPError: 402 Client Error: Payment Required for url: https://huggingface.co/api/inference-proxy/together/v1/chat/completions\n\n\nThe above exception was the direct cause of the following exception:\n\nHfHubHTTPError                            Traceback (most recent call last)\n\n[/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_http.py](https://localhost:8080/#) in hf_raise_for_status(response, endpoint_name)\n    475         # Convert `HTTPError` into a `HfHubHTTPError` to display request information\n    476         # as well (request id and/or server error message)\n--> 477         raise _format(HfHubHTTPError, str(e), response) from e\n    478 \n    479 \n\nHfHubHTTPError: 402 Client Error: Payment Required for url: https://huggingface.co/api/inference-proxy/together/v1/chat/completions (Request ID: Root=1-67c6f46c-005ae18a6bffc88c0d7a6668;04e6891c-45f6-4358-81fc-b5b794f25ddd)\n\nYou have exceeded your monthly included credits for Inference Providers. Subscribe to PRO to get 20x more monthly allowance.\n```\n\nany free and unpaid alternative for Inference Providers?",
    "url": "https://github.com/huggingface/agents-course/issues/281",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-04T12:51:26Z",
    "updated_at": "2025-03-31T07:23:49Z",
    "user": "carlosug"
  },
  {
    "repo": "pytorch/xla",
    "number": 8786,
    "title": "How to show PJRT Call Stack",
    "body": "## \u2753 Questions and Help\nI wounder how to print PJRT Call Stack. Thanks",
    "url": "https://github.com/pytorch/xla/issues/8786",
    "state": "open",
    "labels": [
      "question",
      "openxla"
    ],
    "created_at": "2025-03-04T09:32:43Z",
    "updated_at": "2025-03-07T20:23:32Z",
    "user": "yuanfz98"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 808,
    "title": "How to acquire the End-Effector\uff08eef\uff09 pose?",
    "body": "Hi, thanks for your great job!\n\n    How can we acquire the eef pose and control the eef pose instead of only the joints states?\n\nThanks for your attention and hope for your kind response!",
    "url": "https://github.com/huggingface/lerobot/issues/808",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "robots",
      "stale"
    ],
    "created_at": "2025-03-04T09:30:35Z",
    "updated_at": "2025-10-16T02:28:50Z",
    "user": "oym1994"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 806,
    "title": "How to control local robot with remote model?",
    "body": "I have achieved the inference process on my local computer. I want to know how to put the model on a remote server and control a robot on local.\n\nMy robot: Koch1.1",
    "url": "https://github.com/huggingface/lerobot/issues/806",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2025-03-04T09:09:12Z",
    "updated_at": "2025-10-16T02:28:51Z",
    "user": "neverspillover"
  },
  {
    "repo": "huggingface/optimum-intel",
    "number": 1186,
    "title": "How to initialize development env for this repo?",
    "body": "Hi! I would like to develop this repo, met some issues during env initialization. I ran `pip install -e .` to install current repo to local python env.\nHowever error came out when running 'pytest tests\\'\n`ImportError while importing test module '/home/shji/codes/optimum-intel/tests/ipex/test_modeling.py'.\nHint: make sure your test modules/packages have valid Python names.\nTraceback:\n../../miniforge3/envs/optimum-intel/lib/python3.11/importlib/__init__.py:126: in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\ntests/ipex/test_modeling.py:42: in <module>\n    from optimum.intel import (\nE   ImportError: cannot import name 'IPEXModelForSeq2SeqLM' from 'optimum.intel' (/home/shji/codes/optimum-intel/optimum/intel/__init__.py`\n\nSeems like installation is wrong or something has been missed as local module cannot be found.\n\nCould you provide me some suggestions?  Any documentation for setting dev env would be better, thank you ",
    "url": "https://github.com/huggingface/optimum-intel/issues/1186",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-04T06:10:15Z",
    "updated_at": "2025-03-10T06:01:21Z",
    "user": "shjiyang-intel"
  },
  {
    "repo": "pytorch/xla",
    "number": 8784,
    "title": "how to save weights",
    "body": "## \u2753 Questions and Help\nHello, I using torchxa to convert model to stablehlo.\nhttps://pytorch.org/xla/master/features/stablehlo.html#torch-export-to-stablehlo\nFollow this page, \nweights, stablehlo = tx.export.exported_program_to_stablehlo(exported)\nprint(stablehlo.mlir_module())\nCan store weights and/or stablehlo object however you like\nBut how to store weights, I don't know. I found weights is a list.\nCould you help me? Thank you!\n\nAnother question, we can save data and functions directory by using torch_xla\uff0c how can I save functions by using torchax?",
    "url": "https://github.com/pytorch/xla/issues/8784",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-03-04T06:05:29Z",
    "updated_at": "2025-03-29T08:35:03Z",
    "user": "raninbowlalala"
  },
  {
    "repo": "pytorch/examples",
    "number": 1319,
    "title": "Cuda memory usage does not decrease when increasing the number of cuda cards (fsdp_tp_example.py).",
    "body": "According to the implementation of the source code, I did several experiments to study the script running time and cuda memory occupancy.\n\n- exp1:  nproc_per_node=4, nnodes=1     =>              cuda=2161~2411MB, runtime=63.04s\n- exp2:  nproc_per_node=8, nnodes=1     =>              cuda=2141~2395MB, runtime=70.52s\n- exp3:  nproc_per_node=4, nnodes=2     =>              cuda=2141~2145MB, runtime=233.03s\n\nAccording to the results of the above three experiments, we find that with the increase of the number of graphics cards, the cuda memory usage did not decrease significantly, but the script running time increased.\n\nWhy?\n\nI am looking for the reasons, according to the algorithm principle (FSDP and TP), as the number of video cards increases, the cuda memory and running time should become smaller.\n\n# My Environment\n* Pytorch version: 3.11.7\n* Operating System and version: Linux version 3.10.0-1160.114.2.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) )\n* Installed using source? [yes/no]: yes\n* Are you planning to deploy it using docker container? [yes/no]: no\n* Is it a CPU or GPU environment?: GPU\n* Which example are you using: fsdp_tp_example.py\n* Link to code or data to repro [if any]: https://github.com/pytorch/examples/tree/main/distributed/tensor_parallelism",
    "url": "https://github.com/pytorch/examples/issues/1319",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-04T04:04:35Z",
    "updated_at": "2025-03-04T04:59:47Z",
    "comments": 0,
    "user": "YangHui90"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 457,
    "title": "How to run reject sampling",
    "body": "I ran generate_reaoning and got the cot data. How do I run reject sampling after that?",
    "url": "https://github.com/huggingface/open-r1/issues/457",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-03T03:56:32Z",
    "updated_at": "2025-03-03T03:56:32Z",
    "user": "JavaZeroo"
  },
  {
    "repo": "pytorch/serve",
    "number": 3396,
    "title": "Why is TorchServe No Longer Actively Maintained?",
    "body": "    Hello, I noticed that the TorchServe GitHub page has been marked as 'Limited Maintenance,' indicating that the project is no longer actively maintained. Could you share the reasons behind this decision? Is it related to the development direction of the PyTorch ecosystem? Additionally, are there any recommended alternative tools or solutions for deploying PyTorch models? \n    Thank you for your response!",
    "url": "https://github.com/pytorch/serve/issues/3396",
    "state": "open",
    "labels": [],
    "created_at": "2025-03-03T02:16:01Z",
    "updated_at": "2025-04-09T09:29:25Z",
    "comments": 11,
    "user": "ily666666"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 797,
    "title": "use_delta_joint_actions_aloha",
    "body": "        if self.use_delta_joint_actions_aloha:\n            raise NotImplementedError(\n                \"`use_delta_joint_actions_aloha` is used by pi0 for aloha real models. It is not ported yet in LeRobot.\"\n            )\n\nwhen will you put implementation for it because it is very important\n",
    "url": "https://github.com/huggingface/lerobot/issues/797",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-03-02T18:14:13Z",
    "updated_at": "2025-04-03T16:39:39Z",
    "user": "AbdElrahmanMostafaRifaat1432"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 453,
    "title": "How to log the intermediate outputs results\uff1f",
    "body": "How to log the intermediate outputs results to track the 'aha moment'. How can I set this in config or modify the code?",
    "url": "https://github.com/huggingface/open-r1/issues/453",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-01T17:08:48Z",
    "updated_at": "2025-03-09T13:53:59Z",
    "user": "0205090923"
  },
  {
    "repo": "huggingface/Math-Verify",
    "number": 32,
    "title": "How to adjust the priority of '\\\\ln' and '*' when parsing latex?",
    "body": "When I try to parse a string: \"$$ \\\\dfrac{\\\\cos x}{2\\\\lnx * x^{\\\\ln x - 1}} $$\", the result is \"cos(x)/((2*log(x*x**(log(x, E) - 1), E)))\", rather than \"cos(x)/((2*x**(log(x, E) - 1)*log(x, E)))\". It seems that there is something wrong when dealing with the priority of '\\\\ln' and '*'. So I wonder how to adjust the priority to fix this error. Thank you!\n\nError case:\n\n![Image](https://github.com/user-attachments/assets/e6255a11-6365-4f9c-af2a-a2cd49092ea1)\n\nExpected (which changes the order of '\\\\ln'):\n\n![Image](https://github.com/user-attachments/assets/13459cf1-e245-420b-bff6-25d027bbce2f)",
    "url": "https://github.com/huggingface/Math-Verify/issues/32",
    "state": "closed",
    "labels": [],
    "created_at": "2025-03-01T09:22:31Z",
    "updated_at": "2025-07-01T20:17:49Z",
    "user": "yhhu99"
  },
  {
    "repo": "pytorch/ao",
    "number": 1805,
    "title": "What kind of layers are optimized by torchao on a RTX 4090?",
    "body": "I am trying to quantize a model and I am running this on a 4090. Since many of the available quantization benchmarks are done on higher gpus, I am trying to establish a baseline perfromance gain I can expect from quantization. \n\nI tried the tutorial at [torchao_demo](https://github.com/ethanshenley/PyTorch-Conference-Recipes/blob/main/torchao_demo.ipynb) on a gpu and it worked great. My model has similar kind of transformer layers with q, k, v projections but I am not able to see the same kind of performance with a large chunk of `aten::_copy()` operations in profile log. \n\nTo debug, I wanted to benchmark on a single linear layer as the majority of modified layers seem to be of this type. But I am not able to see any performance gain in this experiment of mine. I would appreciate if I can get more context into the specific layers that gets optimized by `torchao`. \n\n\n```\n'''\n    https://github.com/ethanshenley/PyTorch-Conference-Recipes/blob/main/torchao_demo.ipynb\n'''\nimport gc\nimport psutil\nimport torch\nimport torch.nn as nn\nimport time\n\nfrom torchao.quantization import quantize_, int8_weight_only,float8_weight_only\n\n\ndevice = \"cuda:0\"\ndef get_memory_usage():\n    return psutil.Process().memory_info().rss / 1024 / 1024  # in MB\n\ndef run_inference(model, inputs, num_runs=10):\n    start_time = time.time()\n    for i in range(num_runs):\n        with torch.no_grad():\n            outputs = model(inputs[i].squeeze())\n    torch.cuda.synchronize(device)\n    end_time = time.time()\n    return (end_time - start_time) / num_runs\n\n# Load model and tokenizer\nbsz = 16\nn_runs = 100\nfor sz in range(1024, 20480, 1024):\n    print('====================================================')\n    print(f\"Running with linear layer of size {sz}...\")\n    model = nn.Linear(sz, sz).to(device)\n    inputs = torch.randn(n_runs, bsz, sz).to(device)\n\n    print(\"\\nRunning baseline model...\")\n    baseline_memory = get_memory_usage()\n    baseline_time = run_inference(model, inputs, n_runs)\n    print(f\"Baseline - Time: {baseline_time:.4f}s, Memory: {baseline_memory:.2f}MB\")\n\n\n    print(\"\\nRunning int8 weight-only quantized model...\")\n    model_int8 = nn.Linear(sz, sz).to(device)\n    quantize_(model_int8, int8_weight_only())\n    int8_memory = get_memory_usage()\n    int8_time = run_inference(model_int8, inputs, n_runs)\n    print(f\"Int8 Weight-Only - Time: {int8_time:.4f}s, Memory: {int8_memory:.2f}MB\")\n\n    print(\"\\nRunning fp8 weight-only quantized model...\")\n    model_fp8 = nn.Linear(sz, sz).to(device)\n    quantize_(model_fp8, float8_weight_only())  \n    fp8_memory = get_memory_usage()\n    fp8_time = run_inference(model, inputs, n_runs)\n    print(f\"fp8 Weight-Only  - Time: {fp8_time:.4f}s, Memory: {fp8_memory:.2f}MB\")\n\n\n    print(\"\\nPerformance Improvements:\")\n    print(f\"Int8 weight-only speedup: {baseline_time / int8_time:.2f}x\")\n    print(f\"Int8 weight-only memory reduction: {baseline_memory / int8_memory:.2f}x\")\n    print(f\"fp8 weight-only speedup: {baseline_time / fp8_time:.2f}x\")\n    print(f\"fp8 weight-only memory reduction: {baseline_memory / fp8_memory:.2f}x\")\n\n    del model, model_int8, model_fp8, inputs\n    gc.collect()\n    torch.cuda.empty_cache()\n    torch.cuda.synchronize(device)\n```\n",
    "url": "https://github.com/pytorch/ao/issues/1805",
    "state": "open",
    "labels": [
      "question",
      "performance",
      "triaged"
    ],
    "created_at": "2025-03-01T00:36:14Z",
    "updated_at": "2025-05-01T18:36:43Z",
    "user": "naiveen"
  },
  {
    "repo": "pytorch/xla",
    "number": 8776,
    "title": "Standardize `AllClose` calls from test_aten_xla_tensor tests",
    "body": "Standardize `AllClose` calls from `test/cpp/test_aten_xla_tensor_*.cpp` tests to be with the same standards.",
    "url": "https://github.com/pytorch/xla/issues/8776",
    "state": "open",
    "labels": [
      "enhancement",
      "documentation"
    ],
    "created_at": "2025-03-01T00:14:19Z",
    "updated_at": "2025-03-05T20:24:41Z",
    "comments": 0,
    "user": "pgmoka"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 842,
    "title": "How to pass custom type variables to tools",
    "body": "\nI\u2019m working on a Telegram bot and using the `smolagents` library to create agents that handle reminders. The issue I\u2019m facing is related to passing the `context` object (which is specific to each message received by the bot) to a tool function (`add_reminder`). The `context` object is required to access the `job_queue` for scheduling reminders.\n\n### Problem:\nEven though I\u2019m passing the `context` variable through the `additional_args` argument in `agent.run`, the agent doesn\u2019t seem to pass this variable directly to the code interpreter. Instead, it redefines the variable as `None`, which causes the rest of the code to fail.\n\nHere\u2019s the relevant part of the code:\n\n```python\n@tool\ndef add_reminder(title: str,\n                    date_time: datetime.datetime,\n                    chat_id: str,\n                    context: Any,\n                    location: str = None,\n                    details: str = None) -> dict:\n    \n    '''\n    Add a reminder to the job queue.\n    \n    Args:\n    title: The title of the reminder  (str)\n    date_time: The time for the reminder\n    location: The location of the reminder if it is specified. If not then None (str)\n    details: The details of the reminder if it is specified. If not then None (str)\n    chat_id: pass the chat_id given to you\n    context: pass the context given to you\n    '''\n    \n    # try:\n    reminder = {}\n    reminder['Title'] = title\n    reminder['Time'] = date_time\n    reminder['Location'] = location\n    reminder['Details'] = details\n\n    # Convert the reminder time string to a localized datetime object\n    timer_date = date_time.replace(tzinfo=None)\n    timer_date = tz.localize(timer_date)\n    timer_date_string = timer_date.strftime(\"%H:%M %d/%m/%Y\")\n\n    timer_name = f\"{title} ({timer_date_string})\"\n    reminder['run'] = 'once'\n    reminder['text'] = reminder_to_text(reminder)\n\n    # Calculate the time remaining in seconds\n    now = datetime.datetime.now(tz)\n    seconds_until_due = (timer_date - now).total_seconds()\n\n    # Check if the time is in the past\n    if seconds_until_due <= 0:\n        return {'success': False, 'message': TXT_NOT_ABLE_TO_SCHEDULE_PAST}\n\n    reminder['type'] = 'parent'\n    \n    context.job_queue.run_once(\n        alarm,\n        when=timer_date,\n        chat_id=chat_id,\n        name=timer_name,\n        data=reminder,\n    )\n    \n    reminder['type'] = '-30'\n    context.job_queue.run_once(\n        alarm_minus_30,\n        when=timer_date - datetime.timedelta(minutes=30),\n        chat_id=chat_id,\n        name=timer_name,\n        data=reminder,\n    )\n        \n    return {'success': True, 'message': TXT_REMINDER_SCHEDULED, 'response_for_user': reminder['text']}\n\n\nasync def add_reminder_from_input(update, context):\n    # Add the reminder\n    input = update.message.text\n    chat_id = update.effective_chat.id\n    now = datetime.datetime.now(tz).strftime(\"%d/%m/%Y %H:%M\")\n    \n    logger.info(f'chat_id: {chat_id}, input: {input}')\n    \n\n    agent = CodeAgent(tools=[add_reminder],\n                     additional_authorized_imports=['datetime'],\n                     model=OpenAIServerModel(model_id='gpt-4o-mini', api_key = OPENAI_TOKEN),\n                     verbosity_level=3,\n                     max_steps = 2)\n                                               \n\n    answer = agent.run(TXT_MENU_AGENT_SYSTEM_PROMPT.format(input=input, now=now),\n                        additional_args={\"context\": context, \"chat_id\":chat_id})\n    \n    await send_message(update, context, text=answer)\n\n```\n\nWhen the agent runs, it generates code like this:\n\n```python\n \u2500 Executing parsed code: \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \n  from datetime import datetime, timedelta                                                                                                 \n                                                                                                                                           \n  # Set the reminder details                                                                                                               \n  title = \"Meeting with John\"                                                                                                      \n  date_time = datetime(2025, 3, 1, 9, 0)  # March 1, 2025, at 09:00                                                                        \n  chat_id = 6129357493                                                                                                                     \n  context = None  # This would typically be the provided context object                                                                    \n                                                                                                                                           \n  # Add the reminder                                                                                                                       \n  reminder_response = add_reminder(tit",
    "url": "https://github.com/huggingface/smolagents/issues/842",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-28T23:04:49Z",
    "updated_at": "2025-03-01T23:45:40Z",
    "user": "ebravofm"
  },
  {
    "repo": "pytorch/xla",
    "number": 8774,
    "title": "The \"Pytorch/XLA overview\" is very long, goes into advanced topics, and is overall intimidating for new users.",
    "body": "## \ud83d\udcda Documentation\n\nThe \"Pytorch/XLA overview\" includes many advanced topics that go beyond an \"overview\", including how to specifically convert Stable Diffusion to run on TPUs (which is more of a Guide) and how to profile (which is more of a Tutorial). The result is an intimidating introduction for potential users of PyTorch/XLA.\n\nI'd suggest we break the SD section into a stand-alone guide. And the profiling section into a standalone tutorial, one with a simplified example that has a successful outcome (the current section ends with a \"we found the problems but there's nothing we can do\"). \n\nThe remaining copy can be redrafted into an \"intro\", so that users can hear about some of the benefits of PyTorch/XLA and as a result get encouraged to continue reading and even trying out the platform.\n\n\n",
    "url": "https://github.com/pytorch/xla/issues/8774",
    "state": "open",
    "labels": [
      "enhancement",
      "documentation"
    ],
    "created_at": "2025-02-28T20:47:25Z",
    "updated_at": "2025-06-03T17:34:09Z",
    "comments": 2,
    "user": "yaoshiang"
  },
  {
    "repo": "pytorch/xla",
    "number": 8773,
    "title": "Document the virtual device mesh",
    "body": "## \ud83d\udcda Documentation\n\nWe need to explain what is a \"mesh\". The current documentation in https://pytorch.org/xla/master/perf/spmd_basic.html#mesh doesn't explain it very well. For example, it doesn't say what does specifying `device_ids is almost always np.array(range(num_devices)).` do.",
    "url": "https://github.com/pytorch/xla/issues/8773",
    "state": "closed",
    "labels": [
      "enhancement",
      "documentation"
    ],
    "created_at": "2025-02-28T19:16:32Z",
    "updated_at": "2025-03-16T23:33:32Z",
    "comments": 1,
    "user": "tengyifei"
  },
  {
    "repo": "pytorch/xla",
    "number": 8772,
    "title": "Paramatize test_aten_xla_tensor tests",
    "body": "## \ud83d\ude80 Feature\nParamatize test_aten_xla_tensor tests. Inspired by https://github.com/pytorch/xla/pull/8734#discussion_r1968768218.\n\nExample of a test_aten_xla_tensor tests: [test_aten_xla_tensor_1](https://github.com/pytorch/xla/blob/2675e6892c6f955fc2baf88d85dfdfa72062273c/test/cpp/test_aten_xla_tensor_1.cpp)\n\n## Motivation\n\nDecrease and simplify the amount of code we have for testing while increasing readability. Right now test_aten_xla_tensor tests are split into 6 distinct files. Each with over 1000 lines each. 2 with over 5000 lines. This makes tests hard to read, and implementing new tests.\n\nParamatization will hopefully:\n1) Significantly decrease the number of lines on the test\n2) Significantly increase readability\n3) Increase speed for developing tests\n\n## Pitch\n\nCollapse tests that are simililar into the same Parameterized test.\n\n## Alternatives\n\nThere are other paramitization methods for C++ that are less clean than INSTANTIATE_TEST_SUITE_P. We could seek these if they are blockers\n\n## Additional context\n\nWe should utilize [INSTANTIATE_TEST_SUITE_P](https://github.com/google/googletest/blob/main/docs/advanced.md#how-to-write-value-parameterized-tests)\n",
    "url": "https://github.com/pytorch/xla/issues/8772",
    "state": "open",
    "labels": [
      "enhancement",
      "usability",
      "testing"
    ],
    "created_at": "2025-02-28T18:19:20Z",
    "updated_at": "2025-03-06T03:06:31Z",
    "comments": 2,
    "user": "pgmoka"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 148196,
    "title": "[inductor][triton] Decide how to deprecate \"old triton versions\"",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nRight now we have a mess of at least 3 \"versions\" of Triton - i.e. commit ranges that we are compatible with.\n\nThis is beneficial for a few reasons:\n* Ability to bisect old versions of Triton\n* Compatibility with users who have different (i.e. old) versions of Triton installed - also fbcode/oss mismatches, \n* Possibly other Triton forks for different hardware, which may be based off of old versions of Triton\n\nBut it has some downsides - mainly messy code trying to handle the various versions of Triton. Also, we don't test the old versions, so there's nothing ensuring that these old code paths are actually still correct. We should probably decide on a policy or a way to determine when we can clean up handling for an old version of Triton.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @amjames @aakhundov",
    "url": "https://github.com/pytorch/pytorch/issues/148196",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: inductor"
    ],
    "created_at": "2025-02-28T17:18:12Z",
    "updated_at": "2025-03-04T15:39:46Z",
    "user": "davidberard98"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3254,
    "title": "How to train sentencetransformer with multiple negative\uff1f",
    "body": "I have a dataset like:  {'anchor':str,'postive':str,negative:list[str]}\nit seems invalid by example code \n\n```python\n    model = SentenceTransformer(model_path)\n\n    extend_position_embeddings(model._first_module().auto_model,max_length)\n\n    loss = CachedMultipleNegativesRankingLoss(model, mini_batch_size=16)\n\n\n    training_args = SentenceTransformerTrainingArguments(\n        output_dir=f\"./model_dir/{args.save_name}-{args.data_mode}\",\n        overwrite_output_dir=True,\n        logging_dir=\"./logs\",\n        logging_steps=1,\n        save_strategy='epoch',\n        save_total_limit=2,\n        # max_steps=900,\n        num_train_epochs=3,\n        warmup_ratio=0.05,\n        learning_rate=3e-5,\n        weight_decay=0.01,\n        gradient_accumulation_steps=16,\n        per_device_train_batch_size=4,\n        dataloader_num_workers=1,\n        batch_sampler=BatchSamplers.NO_DUPLICATES,\n        fp16=True,\n        lr_scheduler_type=\"cosine\",\n        remove_unused_columns=False,\n        # deepspeed='/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/INS/ruanjunhao04/ruanjunhao/chatrag-bench/train/ds3.json',\n        # gradient_checkpointing=True,\n    )\n\n\n\n    trainer = SentenceTransformerTrainer(\n        model=model,\n        args=training_args,\n        train_dataset=dataset,\n        loss=loss,\n    )\n    dataloader = trainer.get_train_dataloader()\n\n    for d in dataloader:\n        import pdb\n        pdb.set_trace()\n    trainer.train()\n\n\n\n```\n\n\n```bash\n\n  File \"/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/INS/ruanjunhao04/env/rjh/lib/python3.12/site-packages/torch/utils/data/dataloader.py\", line 1191, in __init__\n    self._reset(loader, first_iter=True)\n  File \"/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/INS/ruanjunhao04/env/rjh/lib/python3.12/site-packages/torch/utils/data/dataloader.py\", line 1228, in _reset\n    self._try_put_index()\n  File \"/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/INS/ruanjunhao04/env/rjh/lib/python3.12/site-packages/torch/utils/data/dataloader.py\", line 1471, in _try_put_index\n    index = self._next_index()\n            ^^^^^^^^^^^^^^^^^^\n  File \"/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/INS/ruanjunhao04/env/rjh/lib/python3.12/site-packages/torch/utils/data/dataloader.py\", line 691, in _next_index\n    return next(self._sampler_iter)  # may raise StopIteration\n           ^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/INS/ruanjunhao04/env/rjh/lib/python3.12/site-packages/sentence_transformers/sampler.py\", line 193, in __iter__\n    value\nTypeError: unhashable type: 'list'\n```",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3254",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-28T15:01:19Z",
    "updated_at": "2025-06-13T05:04:35Z",
    "user": "rangehow"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 789,
    "title": "how to run eval  with mujoco sim?",
    "body": "now ,run eval.py is only output in command line. how to run eval  with mujoco sim?",
    "url": "https://github.com/huggingface/lerobot/issues/789",
    "state": "closed",
    "labels": [
      "simulation",
      "stale"
    ],
    "created_at": "2025-02-28T10:42:46Z",
    "updated_at": "2025-10-08T11:57:42Z",
    "user": "mmlingyu"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 788,
    "title": "offline run convert_dataset_v1_to_v2.py",
    "body": "I need help!!!!!\nfor example\uff0cwhen i run convert_dataset_v1_to_v2.py, it prompts the following:\n\n![Image](https://github.com/user-attachments/assets/a4a87562-f0bd-444f-9e32-11cae281ae6f)\n\nand what is train.parquet?\n![Image](https://github.com/user-attachments/assets/8e24bb90-ef6c-4e55-9b1e-17acd7050312)\n\nhow to solve it?",
    "url": "https://github.com/huggingface/lerobot/issues/788",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2025-02-28T06:41:43Z",
    "updated_at": "2025-10-09T21:54:09Z",
    "user": "ximiluuuu"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 903,
    "title": "[Possible PR discuss] Will a PR of training HF model be welcomed?",
    "body": "Hi! We are in the process of developing a novel training framework for Reinforcement Learning (RL) following TorchTitan. Recently, we've developed a feature to support direct training from Hugging Face (HF) models and the loading safetensors in online sharded fashion. This may substantially cuts down the cost of adapting a new model. All you have to do is implement the parallelism applying function.\nGiven this, I wonder whether  a PR with the relevant code and a training example for training Hugging Face's Llama model is welcomed. I think this addition will be of great benefit to many in the community.\nBy the way, during my testing, I found that the HF Llama model demonstrates competitive TPS when compared to the model implemented in TorchTitan.",
    "url": "https://github.com/pytorch/torchtitan/issues/903",
    "state": "open",
    "labels": [
      "huggingface integration",
      "community help wanted"
    ],
    "created_at": "2025-02-28T03:13:40Z",
    "updated_at": "2025-03-04T08:09:14Z",
    "comments": 7,
    "user": "junjzhang"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 902,
    "title": "Question about triton in deepseek implementtion",
    "body": "I noticed that some adaptations related to DeepSeek have already been merged. I would like to understand why Triton is being used for implementation. In certain scenarios, such as on ARM architecture or other privateuse1 backends, Triton is not yet fully supported. Have you considered making the use of Triton an optional configuration? @kwen2501 ",
    "url": "https://github.com/pytorch/torchtitan/issues/902",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-28T02:55:48Z",
    "updated_at": "2025-08-21T03:13:51Z",
    "user": "zqwenn"
  },
  {
    "repo": "pytorch/xla",
    "number": 8765,
    "title": "Settle on a consistent logging methodology and document it",
    "body": "It would be useful for PyTorchXLA to provide easy to use debugging logs. To do so, we need to:\n1) Settle on specific logging methodology\n2) Document it for further use\n3) Document how to activate these logs",
    "url": "https://github.com/pytorch/xla/issues/8765",
    "state": "open",
    "labels": [
      "enhancement",
      "usability",
      "documentation"
    ],
    "created_at": "2025-02-27T19:28:20Z",
    "updated_at": "2025-03-05T20:19:25Z",
    "comments": 0,
    "user": "pgmoka"
  },
  {
    "repo": "pytorch/xla",
    "number": 8764,
    "title": "\"Too many open files\" error documenting for multi-processing",
    "body": "In multiprocessing cases, we can get a \"Too many open files\" error from too many processes opening at the same time. This can be confusing as this is a common error for file opening. We should add more information to the error to make this issue easier to track.",
    "url": "https://github.com/pytorch/xla/issues/8764",
    "state": "open",
    "labels": [
      "enhancement",
      "usability",
      "documentation"
    ],
    "created_at": "2025-02-27T19:08:27Z",
    "updated_at": "2025-03-05T20:19:12Z",
    "comments": 0,
    "user": "pgmoka"
  },
  {
    "repo": "pytorch/xla",
    "number": 8763,
    "title": "Improve Logging methodology and documentation",
    "body": "Standardized logging method which can be leverage with debugging flags.\n\nAfterwards, document how to get these logs in our documentation.",
    "url": "https://github.com/pytorch/xla/issues/8763",
    "state": "open",
    "labels": [
      "enhancement",
      "usability",
      "documentation"
    ],
    "created_at": "2025-02-27T18:57:29Z",
    "updated_at": "2025-03-11T16:48:58Z",
    "comments": 0,
    "user": "pgmoka"
  },
  {
    "repo": "pytorch/xla",
    "number": 8762,
    "title": "Centralize API guide docs",
    "body": "Centralize API guide docs. Right now for users interested in our APIs, there are a couple places they might go to:\n- https://github.com/pytorch/xla/blob/6f423d0bb284190cf1b12d8a943a334e57b4df28/docs/source/learn/api-guide.rst\n- https://pytorch.org/xla/release/r2.6/learn/api-guide.html\n- https://github.com/pytorch/xla/blob/6f423d0bb284190cf1b12d8a943a334e57b4df28/API_GUIDE.md?plain=1#L166",
    "url": "https://github.com/pytorch/xla/issues/8762",
    "state": "open",
    "labels": [
      "enhancement",
      "documentation"
    ],
    "created_at": "2025-02-27T18:54:49Z",
    "updated_at": "2025-03-05T20:18:36Z",
    "comments": 0,
    "user": "pgmoka"
  },
  {
    "repo": "pytorch/xla",
    "number": 8761,
    "title": "Create full tutorial example for transitioning Pytorch to Pytorch XLA",
    "body": "It would be useful for new users to have a basic example showing the differences between the two.",
    "url": "https://github.com/pytorch/xla/issues/8761",
    "state": "open",
    "labels": [
      "enhancement",
      "documentation"
    ],
    "created_at": "2025-02-27T18:53:29Z",
    "updated_at": "2025-03-28T17:54:03Z",
    "comments": 3,
    "user": "pgmoka"
  },
  {
    "repo": "pytorch/xla",
    "number": 8760,
    "title": "Add profiling documentation",
    "body": "[re: issues/8743](]https://github.com/pytorch/xla/issues/8743#issuecomment-2686428336)\r\n\r\nThis issue has a request for adding  documentation on the `start_trace` and `stop_trace` API, but we currently don't have any documentation around profiling. Who can I work with to get some profiling documentation written? Thanks!\r\n            ",
    "url": "https://github.com/pytorch/xla/issues/8760",
    "state": "open",
    "labels": [
      "enhancement",
      "documentation"
    ],
    "created_at": "2025-02-27T17:48:34Z",
    "updated_at": "2025-03-12T00:08:59Z",
    "comments": 3,
    "user": "mikegre-google"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3252,
    "title": "How to train sentence transformers with multi machines?",
    "body": "The [docs](https://sbert.net/docs/sentence_transformer/training/distributed.html) describes how to train sentence transformers with multi-GPUs.\n\nBut both my model and my data are huge, and training sentence transformers with 8 GPUs in one single machine is still very slow.\n\nDoes sentence transformers support training using mutiple machines, each with 8 GPUs. Do we have any examples?\n\nThank you very much.",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3252",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-27T13:37:02Z",
    "updated_at": "2025-02-27T13:37:02Z",
    "user": "awmoe"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10917,
    "title": "Is lumina-2.0 script correct?",
    "body": "I wrote a script, based on the one provided [here](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_lumina2.py)\n\nit gets stuck on loss around 0.5, and i think it is a lot, isn't it?",
    "url": "https://github.com/huggingface/diffusers/issues/10917",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-27T11:17:00Z",
    "updated_at": "2025-02-28T15:46:43Z",
    "comments": 3,
    "user": "Riko0"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 444,
    "title": "How to increase the context window from 4k to 32k on qwen models ?",
    "body": "Hello,\n\nI'm trying to distill a subset of the [OpenR1-Math-220k](https://huggingface.co/datasets/open-r1/openr1-220k-math) dataset into my Qwen/Qwen2.5-Math-7B-Instruct. I want to do this via a custom SFT pipeline in order to see if I can match the results obtained in the evaluations.\n\nHowever I'm struggling increasing the context window of the Qwen math model from 4k to 32k tokens. \n\nThis is what I tried in the config.json of the model: \n\n``` \n{\n  \"_name_or_path\": \"Qwen/Qwen2.5-Math-7B-Instruct\",\n  \"architectures\": [\n    \"Qwen2ForCausalLM\"\n  ],\n  \"attention_dropout\": 0.0,\n  \"bos_token_id\": 151643,\n  \"eos_token_id\": 151645,\n  \"hidden_act\": \"silu\",\n  \"hidden_size\": 3584,\n  \"initializer_range\": 0.02,\n  \"intermediate_size\": 18944,\n  \"max_position_embeddings\": 32768,\n  \"max_window_layers\": 28,\n  \"model_type\": \"qwen2\",\n  \"num_attention_heads\": 28,\n  \"num_hidden_layers\": 28,\n  \"num_key_value_heads\": 4,\n  \"rms_norm_eps\": 1e-06,\n    \"rope_scaling\": {\n    \"type\": \"linear\",\n    \"factor\": 8.0\n  },\n  \"rope_theta\": 10000.0,\n  \"sliding_window\": null,\n  \"tie_word_embeddings\": false,\n  \"torch_dtype\": \"bfloat16\",\n  \"transformers_version\": \"4.48.1\",\n  \"use_cache\": true,\n  \"use_sliding_window\": false,\n  \"vocab_size\": 152064\n}\n```\n\nBut the generations obtained with this base model are garbage. Do you have any advices on which parameters are the best and how to be able to train the model on bigger context windows than initially released ? \n\nThanks !\n",
    "url": "https://github.com/huggingface/open-r1/issues/444",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-27T10:27:43Z",
    "updated_at": "2025-07-24T23:56:12Z",
    "user": "Jeremmmyyyyy"
  },
  {
    "repo": "huggingface/trl",
    "number": 2972,
    "title": "How many H20 (96GB) GPUs are needed to train Qwen7B with the GRPO algorithm?",
    "body": "I want to use the GRPO algorithm to train Qwen7B, but I failed using 4 H20 (96GB) GPUs with the trl library. I would like to know how many H20 GPUs are needed.",
    "url": "https://github.com/huggingface/trl/issues/2972",
    "state": "open",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-02-27T04:12:16Z",
    "updated_at": "2025-03-14T02:22:36Z",
    "user": "Tuziking"
  },
  {
    "repo": "pytorch/ao",
    "number": 1790,
    "title": "An error was encountered setting torch._dynamo.decorators.mark_unbacked",
    "body": "\nHello, I want batch set up to be dynamic and I use torch._dynamo.mark_dynamic to set it. But I found that recompile is triggered when batch is 1 and 2. Then I used torch._dynamo.decorators.mark_unbacked but it quantizes incorrectly. Can you look at this problem?\n\nMy environment:\ntorch: 2.5.0\ntorchao: 0.8.0\n\nThis is the minimum repetition code\n```python\nimport torch\n\n\nfrom torchao.quantization.quant_api import (\n    quantize_,\n    int8_dynamic_activation_int8_weight\n)\ntorch._logging.set_logs(recompiles=True, recompiles_verbose = True)\n\nclass MyModel(torch.nn.Module):\n    def __init__(self):\n        super().__init__()\n        self.linear = torch.nn.Linear(128, 256)\n\n    def forward(self, x):\n        return self.linear(x)\n\nmodel = MyModel().cuda().eval()\nmodel = torch.compile(model, fullgraph=True)\n\n# quant\nquantize_(model, int8_dynamic_activation_int8_weight())\n\nexample_input = torch.randn(2, 64, 128).cuda()\ntorch._dynamo.decorators.mark_unbacked(example_input, 0)\ntorch._dynamo.mark_dynamic(example_input, 0)\nmodel(example_input)\n\nx1 = torch.randn(1, 64, 128).cuda()\nx2 = torch.randn(2, 64, 128).cuda()\n\nprint(\"input shape: \", x1.shape)\nmodel(x1)\nprint(\"input shape: \", x2.shape)\nmodel(x2)\n``` \n\nThis is the error log\n<details>\nW0227 10:58:38.277000 1279033 torch/fx/experimental/symbolic_shapes.py:5124] [0/0] failed during evaluate_expr(Ne(u0, 1), hint=None, size_oblivious=False, forcing_spec=False\nE0227 10:58:38.277000 1279033 torch/fx/experimental/recording.py:298] [0/0] failed while running evaluate_expr(*(Ne(u0, 1), None), **{'fx_node': False})\nTraceback (most recent call last):\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torch/_dynamo/utils.py\", line 2132, in run_node\n    return node.target(*args, **kwargs)\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torchao/utils.py\", line 433, in _dispatch__torch_function__\n    return cls._ATEN_OP_OR_TORCH_FN_TABLE[func](func, types, args, kwargs)\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torchao/utils.py\", line 412, in wrapper\n    return func(f, types, args, kwargs)\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torchao/quantization/linear_activation_quantized_tensor.py\", line 126, in _\n    return weight_tensor._quantized_linear_op(input_tensor, weight_tensor, bias)\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torchao/quantization/linear_activation_quantized_tensor.py\", line 83, in _quantized_linear_op\n    quantized_tensor = input_quant_func(input_tensor, **quant_kwargs)\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torchao/quantization/quant_api.py\", line 800, in _int8_symm_per_token_reduced_range_quant\n    return to_affine_quantized_intx(\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torchao/dtypes/affine_quantized_tensor.py\", line 250, in from_hp_to_intx\n    scale, zero_point = choose_qparams_affine(\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\n    return func(*args, **kwargs)\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torchao/quantization/quant_primitives.py\", line 738, in choose_qparams_affine\n    return _choose_qparams_affine(\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torch/_ops.py\", line 1116, in __call__\n    return self._op(*args, **(kwargs or {}))\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torchao/quantization/quant_primitives.py\", line 840, in _choose_qparams_affine\n    shape_for_reduction, reduction_dims = _get_reduction_params(\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torchao/quantization/quant_primitives.py\", line 229, in _get_reduction_params\n    if block_size[i] != input_size[i] and block_size[i] > 1:\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torch/__init__.py\", line 680, in __bool__\n    return self.node.bool_()\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torch/fx/experimental/sym_node.py\", line 511, in bool_\n    return self.guard_bool(\"\", 0)\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torch/fx/experimental/sym_node.py\", line 449, in guard_bool\n    r = self.shape_env.evaluate_expr(self.expr, self.hint, fx_node=self.fx_node)\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torch/fx/experimental/recording.py\", line 262, in wrapper\n    return retlog(fn(*args, **kwargs))\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torch/fx/experimental/symbolic_shapes.py\", line 5122, in evaluate_expr\n    return self._evaluate_expr(orig_expr, hint, fx_node, size_oblivious, forcing_spec=forcing_spec)\n  File \"/root/picasso/songh/my_venv/py310/lib/python3.10/site-packages/torch/fx/experimental/symbolic_shapes.py\", line 5238, in _evaluate_expr\n    raise self._make_data_dependen",
    "url": "https://github.com/pytorch/ao/issues/1790",
    "state": "open",
    "labels": [
      "question",
      "quantize_",
      "triaged"
    ],
    "created_at": "2025-02-27T03:10:43Z",
    "updated_at": "2025-03-06T19:07:34Z",
    "user": "songh11"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 897,
    "title": "Moving train.py to torchtitan submodule makes run_train.sh failed with \"Can not find module\"",
    "body": "### Bug description\n\nHi team, \n\nI noticed a recent change which moved train.py from the top level fold in the project to torchtitan sub folder. This caused the failure of run_train.sh with following error msg.\n\nIt cased the following error with import message \"from torchtitan.components.checkpoint import CheckpointManager, TrainState\" at the beginning of train.py. This is because the train.py can not find a submodule named \"torchtitan\" cause train.py is already part of torchtitan.\n\nI fixed by some hacky way but looking forward to more suggestions on this\n\n<img width=\"1208\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/3a4358ad-e5a0-4fae-8ebe-1dfb3589da44\" />\n\nThank you!\n\n```\n(/home/jianiw/local/jiani/pytorch-env) [jianiw@devvm7508]~/local/jiani/torchtitan% LOG_RANK=0,1 NGPU=4 ./run_train.sh\n+ NGPU=4\n+ LOG_RANK=0,1\n+ CONFIG_FILE=./torchtitan/models/llama/train_configs/debug_model.toml\n+ overrides=\n+ '[' 0 -ne 0 ']'\n+ PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True\n+ torchrun --nproc_per_node=4 --rdzv_backend c10d --rdzv_endpoint=localhost:0 --local-ranks-filter 0,1 --role rank --tee 3 torchtitan/train.py --job.config_file ./torchtitan/models/llama/train_configs/debug_model.toml\nW0226 15:57:42.491000 2461839 torch/distributed/run.py:763] \nW0226 15:57:42.491000 2461839 torch/distributed/run.py:763] *****************************************\nW0226 15:57:42.491000 2461839 torch/distributed/run.py:763] Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed. \nW0226 15:57:42.491000 2461839 torch/distributed/run.py:763] *****************************************\n[rank0]:Traceback (most recent call last):\n[rank0]:  File \"/data/users/jianiw/jiani/torchtitan/torchtitan/train.py\", line 14, in <module>\n[rank0]:    from torchtitan.components.checkpoint import CheckpointManager, TrainState\n[rank0]:ModuleNotFoundError: No module named 'torchtitan'\n[rank1]:Traceback (most recent call last):\n[rank1]:  File \"/data/users/jianiw/jiani/torchtitan/torchtitan/train.py\", line 14, in <module>\n[rank1]:    from torchtitan.components.checkpoint import CheckpointManager, TrainState\n[rank1]:ModuleNotFoundError: No module named 'torchtitan'\nE0226 15:57:44.126000 2461839 torch/distributed/elastic/multiprocessing/api.py:870] failed (exitcode: 1) local_rank: 0 (pid: 2462029) of binary: /home/jianiw/local/jiani/pytorch-env/bin/python\nTraceback (most recent call last):\n  File \"/home/jianiw/local/jiani/pytorch-env/bin/torchrun\", line 33, in <module>\n    sys.exit(load_entry_point('torch', 'console_scripts', 'torchrun')())\n  File \"/data/users/jianiw/jiani/pytorch/torch/distributed/elastic/multiprocessing/errors/__init__.py\", line 354, in wrapper\n    return f(*args, **kwargs)\n  File \"/data/users/jianiw/jiani/pytorch/torch/distributed/run.py\", line 889, in main\n    run(args)\n  File \"/data/users/jianiw/jiani/pytorch/torch/distributed/run.py\", line 880, in run\n    elastic_launch(\n  File \"/data/users/jianiw/jiani/pytorch/torch/distributed/launcher/api.py\", line 139, in __call__\n    return launch_agent(self._config, self._entrypoint, list(args))\n  File \"/data/users/jianiw/jiani/pytorch/torch/distributed/launcher/api.py\", line 270, in launch_agent\n    raise ChildFailedError(\ntorch.distributed.elastic.multiprocessing.errors.ChildFailedError: \n============================================================\ntorchtitan/train.py FAILED\n------------------------------------------------------------\nFailures:\n[1]:\n  time      : 2025-02-26_15:57:43\n  host      : devvm7508.cco0.facebook.com\n  rank      : 1 (local_rank: 1)\n  exitcode  : 1 (pid: 2462030)\n  error_file: <N/A>\n  traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html\n[2]:\n  time      : 2025-02-26_15:57:43\n  host      : devvm7508.cco0.facebook.com\n  rank      : 2 (local_rank: 2)\n  exitcode  : 1 (pid: 2462032)\n  error_file: <N/A>\n  traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html\n[3]:\n  time      : 2025-02-26_15:57:43\n  host      : devvm7508.cco0.facebook.com\n  rank      : 3 (local_rank: 3)\n  exitcode  : 1 (pid: 2462033)\n  error_file: <N/A>\n  traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html\n------------------------------------------------------------\nRoot Cause (first observed failure):\n[0]:\n  time      : 2025-02-26_15:57:43\n  host      : devvm7508.cco0.facebook.com\n  rank      : 0 (local_rank: 0)\n  exitcode  : 1 (pid: 2462029)\n  error_file: <N/A>\n  traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html\n```\n\n### Versions\n\nCurrent main branch after #894 merged (I don't t",
    "url": "https://github.com/pytorch/torchtitan/issues/897",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-27T00:11:02Z",
    "updated_at": "2025-03-23T01:42:01Z",
    "comments": 3,
    "user": "jianiw25"
  },
  {
    "repo": "pytorch/xla",
    "number": 8757,
    "title": "Document on how to profile with torch_xla",
    "body": "## \ud83d\udcda Documentation\n\nI found we don't have a doc/guide on how to profile with torch_xla. We should add this because getting profile is essential for performance analysis.\n",
    "url": "https://github.com/pytorch/xla/issues/8757",
    "state": "closed",
    "labels": [
      "enhancement",
      "documentation"
    ],
    "created_at": "2025-02-26T23:27:20Z",
    "updated_at": "2025-12-02T00:18:03Z",
    "user": "lsy323"
  },
  {
    "repo": "pytorch/serve",
    "number": 3394,
    "title": "Rename open_inference_grpc.proto package name",
    "body": "Hi Team,\nStarting from 0.10.0, torchServe introduced [open_inference_grpc.proto](https://github.com/pytorch/serve/blob/v0.10.0/frontend/server/src/main/resources/proto/open_inference_grpc.proto) to allow Pytorch GRPC APIs to follow Kserve open inference V2 protocol. However, I am wondering why the [package name](https://github.com/pytorch/serve/blob/v0.10.0/frontend/server/src/main/resources/proto/open_inference_grpc.proto#L18) used for the proto is different from what's used in [Kserve](https://github.com/kserve/kserve/blob/master/docs/predict-api/v2/grpc_predict_v2.proto#L16). Having a different package name would require Pytorch model and non-Pytorch model to use different proto definitions even though they both follow the open inference protocol. I am wondering if it is possible to make the open_inference_grpc.proto within the same package as what is defined in Kserve grpc_predict_v2.proto?\nThank you.",
    "url": "https://github.com/pytorch/serve/issues/3394",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-26T21:49:57Z",
    "updated_at": "2025-02-26T21:50:25Z",
    "comments": 0,
    "user": "jwang20250226"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 779,
    "title": "Is there a way for a robot arm with kinesthetic teaching function to collect data using lerobot?",
    "body": "Hello, I have a robot arm with kinesthetic teaching function. I guess I can teach my robot at the first time, and collect data from the second time using lerobot? I'm here to ask is this easy to achieve by modifying control_robot.py file? Thanks",
    "url": "https://github.com/huggingface/lerobot/issues/779",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2025-02-26T17:50:51Z",
    "updated_at": "2025-10-16T02:28:54Z",
    "user": "yzzueong"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10910,
    "title": "ValueError: Attempting to unscale FP16 gradients.",
    "body": "### Describe the bug\n\nI encountered the following error when running train_text_to_image_lora.py: ValueError: Attempting to unscale FP16 gradients.\n\nThe script I am running is as follows:\n\nexport MODEL_NAME=\"CompVis/stable-diffusion-v1-4\"\nexport DATASET_NAME=\"lambdalabs/naruto-blip-captions\"\n\naccelerate launch --mixed_precision=\"fp16\" train_text_to_image_lora.py \\\n  --pretrained_model_name_or_path=$MODEL_NAME \\\n  --dataset_name=$DATASET_NAME --caption_column=\"text\" \\\n  --resolution=512 --random_flip \\\n  --train_batch_size=1 \\\n  --num_train_epochs=100 --checkpointing_steps=5000 \\\n  --learning_rate=1e-04 --lr_scheduler=\"constant\" --lr_warmup_steps=0 \\\n  --seed=42 \\\n  --output_dir=\"sd-naruto-model-lora-clean\" \\\n  --validation_prompt=\"cute dragon creature\" --report_to=\"wandb\"\nHow can I resolve this error?\n\n### Reproduction\n\nexport MODEL_NAME=\"CompVis/stable-diffusion-v1-4\"\nexport DATASET_NAME=\"lambdalabs/naruto-blip-captions\"\n\naccelerate launch --mixed_precision=\"fp16\" train_text_to_image_lora.py \\\n  --pretrained_model_name_or_path=$MODEL_NAME \\\n  --dataset_name=$DATASET_NAME --caption_column=\"text\" \\\n  --resolution=512 --random_flip \\\n  --train_batch_size=1 \\\n  --num_train_epochs=100 --checkpointing_steps=5000 \\\n  --learning_rate=1e-04 --lr_scheduler=\"constant\" --lr_warmup_steps=0 \\\n  --seed=42 \\\n  --output_dir=\"sd-naruto-model-lora-clean\" \\\n  --validation_prompt=\"cute dragon creature\" --report_to=\"wandb\"\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nTraceback (most recent call last):\n  File \"train_text_to_image_lora.py\", line 975, in <module>\n    main()\n  File \"train_text_to_image_lora.py\", line 856, in main\n    accelerator.clip_grad_norm_(params_to_clip, args.max_grad_norm)\n  File \"/root/miniconda3/lib/python3.8/site-packages/accelerate/accelerator.py\", line 2396, in clip_grad_norm_\n    self.unscale_gradients()\n  File \"/root/miniconda3/lib/python3.8/site-packages/accelerate/accelerator.py\", line 2340, in unscale_gradients\n    self.scaler.unscale_(opt)\n  File \"/root/miniconda3/lib/python3.8/site-packages/torch/amp/grad_scaler.py\", line 338, in unscale_\n    optimizer_state[\"found_inf_per_device\"] = self._unscale_grads_(\n  File \"/root/miniconda3/lib/python3.8/site-packages/torch/amp/grad_scaler.py\", line 260, in _unscale_grads_\n    raise ValueError(\"Attempting to unscale FP16 gradients.\")\nValueError: Attempting to unscale FP16 gradients.\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/10910",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-02-26T14:43:57Z",
    "updated_at": "2025-03-18T17:43:08Z",
    "comments": 4,
    "user": "Messimanda"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1209,
    "title": "Is NFD type normalizer supported?",
    "body": "### Question\n\nHi,\n\nI was trying the following code on browser which uses [dewdev/language_detection](https://huggingface.co/dewdev/language_detection):\n\n`import { pipeline, Pipeline } from '@huggingface/transformers';\n\nexport class DetectLanguage {\n    private modelid: string | null = null;\n    private detectPipeline: Pipeline | null = null;\n    private initialized: boolean = false;\n\n    constructor(modelid: string = 'dewdev/language_detection') {\n        this.modelid = modelid;\n    }\n\n    async initialize() {\n        try {\n            this.detectPipeline = await pipeline('text-classification', this.modelid, {\n                dtype: 'fp32',\n                device: navigator.gpu? 'webgpu': 'wasm'\n            });\n            this.initialized = true;\n            console.log(\"Model initialization successful.\");\n        } catch (error) {\n            console.error('Error initializing language detection model with fallback:', error);\n            this.initialized = false;\n            throw error;\n        }\n    }\n\n    async detect(text: string) {\n        if (!this.initialized || !this.detectPipeline) {\n            console.error(\"Model not initialized.\");\n            return '';\n        }\n        try {\n            const language = await this.detectPipeline(text, { top: 1 });\n            return language;\n        } catch (error) {\n            console.error('Error during language detection:', error);\n            return '';\n        }\n    }\n}\n\nasync function main() {\n    const detectLanguage = new DetectLanguage();\n    await detectLanguage.initialize();\n    const text = \"This is a test sentence.\";\n    const language = await detectLanguage.detect(text);\n    console.log(`Detected language: ${language}`);\n}\n\n// Call the main function\nmain();\n`\n\nThe above code brings up the following error:\n  Error initializing language detection model with fallback: Error: Unknown Normalizer type: NFD\n      at Normalizer.fromConfig (tokenizers.js:1011:1)\n      at tokenizers.js:1187:1\n      at Array.map (<anonymous>)\n      at new NormalizerSequence (tokenizers.js:1187:1)\n      at Normalizer.fromConfig (tokenizers.js:993:1)\n      at new PreTrainedTokenizer (tokenizers.js:2545:1)\n      at new BertTokenizer (tokenizers.js:3277:8)\n      at AutoTokenizer.from_pretrained (tokenizers.js:4373:1)\n      at async Promise.all (:5173/index 0)\n      at async loadItems (pipelines.js:3413:1)\n\nHere is the normalizer section from tokenizer:\n`\"normalizer\": {\n    \"type\": \"Sequence\",\n    \"normalizers\": [\n      {\n        \"type\": \"NFD\"\n      },\n      {\n        \"type\": \"BertNormalizer\",\n        \"clean_text\": true,\n        \"handle_chinese_chars\": true,\n        \"strip_accents\": true,\n        \"lowercase\": true\n      }\n    ]\n  },`\n\nMay be NFD normalizer is missing.\n\nIs there any way to bypass this error? Can you please me know?\n\nThanks",
    "url": "https://github.com/huggingface/transformers.js/issues/1209",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-26T08:48:08Z",
    "updated_at": "2025-02-26T14:41:38Z",
    "user": "adewdev"
  },
  {
    "repo": "pytorch/FBGEMM",
    "number": 3737,
    "title": "How to install this on Windows x64",
    "body": "I can't pip install FBGEMM, and I've looked through [https://download.pytorch.org/whl/fbgemm-gpu/](https://download.pytorch.org/whl/fbgemm-gpu/), seems like all whl are support for linux (with 'manylinux' in its name) \n\nI just want to use torchrec on Windows, I wonder How to download  FBGEMM. \n\nthank you",
    "url": "https://github.com/pytorch/FBGEMM/issues/3737",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-26T05:58:05Z",
    "updated_at": "2025-05-09T00:50:07Z",
    "user": "Elllllllvin"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 436,
    "title": "Why is the reward low and not increased in grpo training\uff1fHow to solve\uff1f",
    "body": "my config\n# Model arguments\nmodel_name_or_path: ../experiment/models/Qwen2.5-1.5B-Instruct\n#model_revision: main\ntorch_dtype: bfloat16\nattn_implementation: flash_attention_2\n\n# Data training arguments\ndataset_name: ../experiment/datasets/NuminaMath-TIR/data\ndataset_configs:\n- default\nsystem_prompt: \"You are a helpful AI Assistant that provides well-reasoned and detailed responses. You first think about the reasoning process as an internal monologue and then provide the user with the answer. Respond in the following format: <think>\\n...\\n</think>\\n<answer>\\n...\\n</answer>\"\n# Num processes is less by 1 as vLLM is using 1 GPU\nnum_processes: 3\n\n# GRPO trainer config\nbf16: true\nuse_vllm: true\nvllm_device: auto\nvllm_gpu_memory_utilization: 0.7\ndo_eval: false\ngradient_accumulation_steps: 16\ngradient_checkpointing: true\ngradient_checkpointing_kwargs:\n  use_reentrant: false\n#hub_model_id: Qwen2.5-1.5B-Open-R1-GRPO\n#hub_strategy: every_save\nlearning_rate: 2.0e-05\nlog_completions: true\nlog_level: info\nlogging_first_step: true\nlogging_steps: 5\nlogging_strategy: steps\nlr_scheduler_type: cosine\nmax_prompt_length: 512\nmax_completion_length: 1024\nmax_steps: -1\nnum_generations: 6\nnum_train_epochs: 1\noutput_dir: outputs/Qwen2.5-1.5B-Open-R1-GRPO-no-difficulty\noverwrite_output_dir: true\nper_device_eval_batch_size: 16\nper_device_train_batch_size: 8\npush_to_hub: false\nreport_to:\n- none\nreward_funcs:\n- accuracy\n- format\n#- tag_count\nreward_weights:\n- 1.0\n- 1.0\n#- 1.0\nsave_strategy: \"steps\"\nsave_steps: 100\n#save_total_limit: 1\nseed: 42\nwarmup_ratio: 0.1\n",
    "url": "https://github.com/huggingface/open-r1/issues/436",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-26T05:12:18Z",
    "updated_at": "2025-02-27T01:06:53Z",
    "user": "AXy1527"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 773,
    "title": "How to overrite the code to collect action datas from others robot\uff1f",
    "body": "Hey\uff0cI have got a problem when i try to overwrite the code of lerobot to collect action datas from my own robot. Here\u2018s the detail. My robot is a single six joint robot arm, so i make a new RobotConfig, which only contains the info of the camera. And then I overwrite the fuction 'teleop_step' in file manipulator.py. I also set a default value of the robot pos to test at first.  When i start to record,  the datad of observation and action  are fine, but when it comes to call the function 'save_eposide',  error comes up, which i show below. I reall want to know what else should i suppose to do to make it work, thanks.\n\n![Image](https://github.com/user-attachments/assets/62fdd3a3-1efc-4801-8965-faf72c0005fe)\n![Image](https://github.com/user-attachments/assets/e3780dee-0dbc-4b5d-9353-c4945579f576)\n![Image](https://github.com/user-attachments/assets/d5b3afc1-4a33-41e9-8ab7-9abee076d6e4)\n\n",
    "url": "https://github.com/huggingface/lerobot/issues/773",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2025-02-26T03:33:09Z",
    "updated_at": "2025-10-16T02:28:56Z",
    "user": "tjh-flash"
  },
  {
    "repo": "pytorch/data",
    "number": 1456,
    "title": "Discussion: DCP APIs and broader contracts for rescalability",
    "body": "After much discussion, it was decided that the best approach to implementing rescalability would be to implement rescaling in the base file reader, in order to maintain low overhead and avoid proliferation of logical shard objects (see #1372 , #1455, [torchtitan PR](https://github.com/pytorch/torchtitan/pull/376)). However, this approach necessitates that all nodes above the base node become rescaling-aware: we must decide what behaviors to support and how to make specifying these behaviors friendly to the user. \n\nI have identified four behaviors that I believe a fully capable rescalable pipeline should support, with some correspondence to the existing placement behaviors of DTensors:\n\n1. Drop on rescale. Certain values, such as scalars and RNG states, cannot be repartitioned and it makes no sense to try. These values should be dropped when rescaling but kept otherwise.\n2. Sharded save, sharded load. Large buffers (for example, a local shuffling buffer) can be pooled into a single DTensor, which is then resharded over a new number of workers when rescaling. DCP is largely built around supporting this particular behavior, but note that we must now handle cases where the number of workers may not divide the length of the buffer evenly, and we also may not know the length of the buffer in advance.\n3. Replicated values. This encompasses any expensive metadata objects that we may want to construct (slowly) once, but load from checkpoint afterwards. These values would ideally be saved from rank 0 only, but loaded back to all workers. DCP supports this behavior for non-DTensor objects.\n4. Sharded save, global load. Any state that cannot be resharded simply via (2), such as logical shard state, which must first be accumulated/divided into global pools of visited vs unvisited shards. Local values are saved from each rank, but accumulated globally on load. DCP supports this behavior for non-DTensor objects, by assigning a unique rank-based key for all such objects and recompiling them manually on load. \n\nNote that while the above 4 behaviors raise some questions on DCP support, the larger question revolves around how we want to expose these options to users and/or incorporate them into existing Datasets or Nodes.",
    "url": "https://github.com/meta-pytorch/data/issues/1456",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-25T23:14:45Z",
    "updated_at": "2025-04-21T13:03:30Z",
    "comments": 2,
    "user": "daviswer"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 771,
    "title": "Example of training a policy with PI0?",
    "body": "is there an example config file for training a policy with PI0 policy?",
    "url": "https://github.com/huggingface/lerobot/issues/771",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2025-02-25T19:39:51Z",
    "updated_at": "2025-04-03T16:44:44Z",
    "user": "pqrsqwewrty"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10904,
    "title": "CLIP Score Evaluation without Pre-processing.",
    "body": "I am referring to [Evaluating Diffusion Models](https://huggingface.co/docs/diffusers/main/en/conceptual/evaluation), specifically the quantitative evaluation using CLIP score example.\n\nWe have images of shape (6, 512, 512, 3).\n\nCLIP score is calculated using `\"openai/clip-vit-base-patch16\"`. \n\nHowever, as far as I can tell, the images are not pre-processed to match the format that `\"openai/clip-vit-base-patch16\"` was trained on (e.g., images of size 224x224 pixels). \n \nShould the images have been processed before or can we still reliably use the CLIP score with the images in their original format? \n\nPlease let me know if I have overlooked or am misunderstanding something. Thanks!   \n\n\n\n\n",
    "url": "https://github.com/huggingface/diffusers/issues/10904",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-02-25T16:51:44Z",
    "updated_at": "2025-03-28T15:03:20Z",
    "comments": 1,
    "user": "e-delaney"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 769,
    "title": "How to convert my ALOHA hdf5 data type to your dataset format?",
    "body": "",
    "url": "https://github.com/huggingface/lerobot/issues/769",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2025-02-25T14:07:13Z",
    "updated_at": "2025-10-16T02:28:58Z",
    "user": "return-sleep"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 147850,
    "title": "The issue where opt_output in fx_graph_runnable.py is inconsistent with the actual output when testing run_repro(acc=True)",
    "body": "### \ud83d\udc1b Describe the bug\n\nConclusion\n\u2714 Use .clone() before modifying tensors from expand(), view(), or as_strided().\n\u2714 Ensure tensors are .contiguous() before operations.\n\u2714 Debug with x.is_contiguous() to check memory layout.\n\nIf the issue persists, share a code snippet for further debugging! \ud83d\ude80\n\n### Versions\n\nConclusion\n\u2714 Use .clone() before modifying tensors from expand(), view(), or as_strided().\n\u2714 Ensure tensors are .contiguous() before operations.\n\u2714 Debug with x.is_contiguous() to check memory layout.\n\nIf the issue persists, share a code snippet for further debugging! \ud83d\ude80",
    "url": "https://github.com/pytorch/pytorch/issues/147850",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-25T12:23:49Z",
    "updated_at": "2025-03-03T16:56:35Z",
    "user": "MovieTrack"
  },
  {
    "repo": "pytorch/serve",
    "number": 3393,
    "title": "map workers and GPUs, deviceIds not considered in ts_config",
    "body": "lt;dr: using my existing configuration shows no effect when using the \"deviceIds\" property.\n\nI am successfully hosting three diffeerent models on a server with two gpus.\nEach model can be run on a single gpu, but one is more demanding - so I'd like to control the distribution of workers per gpu.\n\nThe deviceIds property seems to be exactly what I'd need for that.\nIt is described [here](https://github.com/pytorch/serve/tree/master/model-archiver#config-file) for the archiver and [here](https://pytorch.org/serve/configuration.html) for either/and the archivers yaml or the model configuration. \nAnd seems to be implemented [here](https://github.com/pytorch/serve/blob/a9e218ae95fe7690c84b555d0fb9021322c9b049/frontend/archive/src/main/java/org/pytorch/serve/archive/model/ModelConfig.java#L81).\n\nHowever, using my existing configuration - which succsessfully controls the worker numbers and timeouts - shows no effect whatsoever when using the deviceIds or deviceType properties. Is this only implemented for the YAML file uppon archiving?\n\nIs there a way to set the deviceIds via the API?\n\nConfiguration excerpt:\n...\n        \"defaultVersion\": true,\\\n        \"marName\": \"model.mar\",\\\n        \"deviceIds\": [1,],\\\n        \"minWorkers\": 4,\\\n        \"maxWorkers\": 4,\\\n        \"batchSize\": 1,\\\n        \"maxBatchDelay\": 50,\\\n        \"responseTimeout\": 120\\\n...\n\n------------------------------------------------------------------------------------------\nEnvironment headers\n------------------------------------------------------------------------------------------\nTorchserve branch: \n\ntorchserve==0.12.0\ntorch-model-archiver==0.12.0\n\nPython version: 3.10 (64-bit runtime)\nPython executable: /opt/conda/bin/python\n\nVersions of relevant python libraries:\ncaptum==0.6.0\nnumpy==2.2.3\npillow==10.3.0\npsutil==5.9.8\nrequests==2.32.0\ntorch==2.4.0+cu121\ntorch-model-archiver==0.12.0\ntorch-workflow-archiver==0.2.15\ntorchaudio==2.4.0+cu121\ntorchelastic==0.2.2\ntorchserve==0.12.0\ntorchvision==0.19.0+cu121\nwheel==0.42.0\ntorch==2.4.0+cu121\n**Warning: torchtext not present ..\ntorchvision==0.19.0+cu121\ntorchaudio==2.4.0+cu121\n\nJava Version:\n\n\nOS: N/A\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version: N/A\nCMake version: version 3.26.4\n\nIs CUDA available: Yes\nCUDA runtime version: 12.1\nNVIDIA GPU models and configuration: \nNVIDIA RTX 4000 Ada Generation\nNVIDIA RTX 4000 Ada Generation\nNvidia driver version: 565.77\nNvidia driver cuda version: 12.7\ncuDNN version: 9.1.0\n\n\nEnvironment:\nlibrary_path (LD_/DYLD_): /usr/local/nvidia/lib:/usr/local/nvidia/lib64",
    "url": "https://github.com/pytorch/serve/issues/3393",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-25T12:23:11Z",
    "updated_at": "2025-02-26T14:37:27Z",
    "comments": 0,
    "user": "RuDevKu"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10901,
    "title": "HunyuanVIdeo in diffusers use negative_prompt but generate wrong video",
    "body": "### Describe the bug\n\nDiffusers support negative_prompt for hunyuan_video recently, but when I use negative_prompt and set **guidance_scale** and **true_cfg_scale**, I got a video with all black elements. Maybe I set wrong parameters or save video fail. \nHow can I fix my problem? Thanks\n\n### Reproduction\n\nimport torch\nimport time\nfrom diffusers import HunyuanVideoPipeline, HunyuanVideoTransformer3DModel, AutoencoderKLHunyuanVideo\nfrom diffusers.utils import export_to_video, load_image, load_video\nNEGATIVE_PROMPT = \"Aerial view, aerial view, overexposed, low quality, deformation, a poor composition, bad hands, bad teeth, bad eyes, bad limbs, distortion\"\nmodel_path = \"/realpath/hunyuanvideo-community-HunyuanVideo\"\npipe = HunyuanVideoPipeline.from_pretrained(model_path, torch_dtype=torch.float16)\npipe.vae.enable_tiling()\npipe.to(\"cuda\")\noutput = pipe(\n    prompt=\"The video shows a man and a woman standing in the snow, wearing winter clothing and holding cups of coffee. \", \n    negative_prompt=NEGATIVE_PROMPT,\n    height=480,\n    width=720,\n    num_frames=129,\n    num_inference_steps=10,\n    true_cfg_scale=6.0,\n    guidance_scale=1.0,\n).frames[0]\nexport_to_video(output, \"diffusers_480p_output.mp4\", fps=24)\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nH20 \nresolution = 480 * 720\nsteps=10\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/10901",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2025-02-25T11:08:43Z",
    "updated_at": "2025-07-15T07:19:15Z",
    "comments": 2,
    "user": "philipwan"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2200,
    "title": "Bug exporting Whisper?",
    "body": "### System Info\n\nHi! I'm exporting some fine-tuned whisper models, small and base, being fine-tuned in english or spanish. In some cases I've detected that the tokenizer.json is 2.423KB and in other cases 3.839, being the tokenizer.json exported for the same language. I have some models in english where the tokenizer weight's 2.423KB and others where the tokenizer weight's 3.839KB, and same for the spanish ones. \n\nWhen the tokenizer is 2.423KBs I get problems generating the output, as it reachs the max_lenght of the model, but when the tokenizer file is 3.839KBs, the output gets as it should. \n\nThe tokenizer from the original models weights 2.423KBs, and I they works well, but when finetuned the weight change. I don't know if this is an expected output,\n\n\n### Who can help?\n\n@michaelbenayoun @JingyaHuang @echarlaix\n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nI have used the following URL to train my models: https://huggingface.co/blog/fine-tune-whisper\n\nThe datasets I have used in spanish are: \n\n```py\nvoxpopuli_spanish = load_dataset(\n      \"facebook/voxpopuli\", \"es\", split=\"train\", streaming=True, trust_remote_code=True\n  ) # I take 133 random instances\ncommon_voice_spanish = load_dataset(\n    \"mozilla-foundation/common_voice_17_0\",\n    \"es\",\n    split=\"train\",\n    streaming=True,\n    trust_remote_code=True,\n) # I take 66 random instances\nlibrispeech_spanish = load_dataset(\n    \"facebook/multilingual_librispeech\", \"spanish\", split=\"train\", streaming=True\n) # I take 66 random instances\n```\nI have used the same datasets for english:\nIn case of the common_voice and voxpopuli, I just change \"es\"for \"en\". For the librispeech:\n\n```py\nlibrispeech_asr = load_dataset(\n    \"openslr/librispeech_asr\", split=\"train.other.500\", streaming=True, trust_remote_code=True\n)\n```\n\nI use other private dataset that I can't share right now, but they are around 200 instances.\n\nFor exporting the model I use the following line: \n\n```\noptimum-cli export onnx --model whisper-small-es-trained whisper-small-es-onnx --task automatic-speech-recognition --opset 18\n```\nI have tested using multiple opsets, but I get the same output.\n\n### Expected behavior\n\nI don't know if the behavior is the correct one, or I the exported tokenizer.json must be always the same.",
    "url": "https://github.com/huggingface/optimum/issues/2200",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-02-25T09:45:02Z",
    "updated_at": "2025-03-05T20:58:30Z",
    "comments": 1,
    "user": "AlArgente"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10899,
    "title": "Whether lohaconfig is supported in the convert_state_dict_to_diffusers method",
    "body": "In the train_text_to_image_lora.py file\n\nunet_lora_config = LoraConfig(\n        r=cfg.rank,\n        lora_alpha=cfg.rank,\n        init_lora_weights=\"gaussian\",\n        target_modules=[\"to_k\", \"to_q\", \"to_v\", \"to_out.0\"],\n    )\n modified to \n\nunet_lora_config = LoHaConfig(\n        r=cfg.rank,\n        alpha=cfg.rank,\n        target_modules=[\"to_k\", \"to_q\", \"to_v\", \"to_out.0\"],\n    ), \n\n\nunet_lora_state_dict = convert_state_dict_to_diffusers(\n                            get_peft_model_state_dict(unwrapped_unet)\n                        )\nin this line, an error will occur. Please tell me how to modify it.",
    "url": "https://github.com/huggingface/diffusers/issues/10899",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-02-25T08:39:08Z",
    "updated_at": "2025-03-27T15:03:17Z",
    "comments": 2,
    "user": "llm8047"
  },
  {
    "repo": "pytorch/data",
    "number": 1452,
    "title": "Open for contribution on utility nodes like `Filter`, `Shuffler`, `Header`, `Cycler`?",
    "body": "Hi, do you think this kind of nodes would be in the scope of Torchdata? Then I'm down to open a PR to add them. with remaining and testing, for sure. \n\n```python\nimport logging\nimport random\nfrom collections import deque\nfrom typing import Any, Callable, Deque, Dict, Optional, TypeVar, Optional\nfrom torchdata.nodes import BaseNode\n\nlogger = logging.getLogger(__name__)\n\nX = TypeVar(\"X\")\nT = TypeVar(\"T\")\nU = TypeVar(\"U\")\n\n\nclass Filter(BaseNode[T]):\n    \"\"\"Node that filters items from source node based on predicate function.\"\"\"\n\n    SOURCE_KEY = \"source\"\n\n    def __init__(self, source_node: BaseNode[T], filter_fn: Callable[[T], bool]):\n        super().__init__()\n        self.source = source_node\n        self.filter_fn = filter_fn\n\n    def reset(self, initial_state: Optional[Dict[str, Any]] = None):\n        super().reset(initial_state)\n        self.source.reset(initial_state.get(self.SOURCE_KEY) if initial_state else None)\n\n    def next(self) -> T:\n        while True:\n            item = next(self.source)\n            if self.filter_fn(item):\n                return item\n\n    def get_state(self) -> Dict[str, Any]:\n        return {self.SOURCE_KEY: self.source.state_dict()}\n\n\nclass Shuffler(BaseNode[T]):\n    \"\"\"Node that shuffles items from source node using a buffer.\"\"\"\n\n    SOURCE_KEY = \"source\"\n\n    def __init__(self, source_node: BaseNode[T], buffer_size: int, seed: Optional[int] = None):\n        super().__init__()\n        if buffer_size < 1:\n            raise ValueError(\"Buffer size must be at least 1\")\n        self.source = source_node\n        self.buffer_size = buffer_size\n        self.buffer: Deque[T] = deque()\n        self.rng = random.Random(seed)\n        self._initial_seed = seed\n\n    def reset(self, initial_state: Optional[Dict[str, Any]] = None):\n        super().reset(initial_state)\n        self.buffer.clear()\n\n        if initial_state is not None:\n            self.source.reset(initial_state.get(self.SOURCE_KEY))\n            self.rng.setstate(initial_state[\"rng_state\"])\n        else:\n            self.source.reset()\n            if self._initial_seed is not None:\n                self.rng = random.Random(self._initial_seed)\n\n    def _fill_buffer(self) -> bool:\n        \"\"\"Fill buffer with items from source. Returns True if any items were added.\"\"\"\n        try:\n            while len(self.buffer) < self.buffer_size:\n                self.buffer.append(next(self.source))\n            return True\n        except StopIteration:\n            return len(self.buffer) > 0\n\n    def next(self) -> T:\n        if not self.buffer and not self._fill_buffer():\n            raise StopIteration\n\n        # Randomly select and remove an item from the buffer\n        idx = self.rng.randrange(len(self.buffer))\n        item = self.buffer[idx]\n        self.buffer[idx] = self.buffer[-1]\n        self.buffer.pop()\n\n        # Try to refill buffer\n        self._fill_buffer()\n        return item\n\n    def get_state(self) -> Dict[str, Any]:\n        return {self.SOURCE_KEY: self.source.state_dict(), \"rng_state\": self.rng.getstate()}\n\n\nclass Header(BaseNode[T]):\n    \"\"\"Node that yields only the first N items from source node.\"\"\"\n\n    SOURCE_KEY = \"source\"\n\n    def __init__(self, source_node: BaseNode[T], n: int):\n        super().__init__()\n        if n < 0:\n            raise ValueError(\"n must be non-negative\")\n        self.source = source_node\n        self.n = n\n        self._count = 0\n\n    def reset(self, initial_state: Optional[Dict[str, Any]] = None):\n        super().reset(initial_state)\n        self.source.reset(initial_state.get(self.SOURCE_KEY) if initial_state else None)\n        if initial_state is not None:\n            self._count = initial_state[\"count\"]\n        else:\n            self._count = 0\n\n    def next(self) -> T:\n        if self._count >= self.n:\n            raise StopIteration\n\n        item = next(self.source)\n        self._count += 1\n        return item\n\n    def get_state(self) -> Dict[str, Any]:\n        return {self.SOURCE_KEY: self.source.state_dict(), \"count\": self._count}\n\n\nclass Cycler(BaseNode[T]):\n    \"\"\"Node that cycles through source node indefinitely.\"\"\"\n\n    SOURCE_KEY = \"source\"\n\n    def __init__(self, source_node: BaseNode[T]):\n        super().__init__()\n        self.source = source_node\n        self._cycle_count: int = 0\n\n    def reset(self, initial_state: Optional[Dict[str, Any]] = None):\n        super().reset(initial_state)\n        if initial_state is not None:\n            self._cycle_count = initial_state[\"cycle_count\"]\n            self.source.reset(initial_state.get(self.SOURCE_KEY))\n        else:\n            self._cycle_count = 0\n            self.source.reset(None)\n\n    def next(self) -> T:\n        try:\n            return next(self.source)\n        except StopIteration:\n            self._cycle_count += 1\n            self.source.reset(None)\n            return next(self.source)\n\n    def get_state(self) -> Dict[str, Any]:\n        return {self.SOURCE_KEY: self.source.state_dict(), \"cycle_count\": self._cycle_count",
    "url": "https://github.com/meta-pytorch/data/issues/1452",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-25T03:36:59Z",
    "updated_at": "2025-02-25T05:08:09Z",
    "comments": 1,
    "user": "keunwoochoi"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 885,
    "title": "Possible to integrate DeepEP?",
    "body": "ref: https://github.com/deepseek-ai/DeepEP",
    "url": "https://github.com/pytorch/torchtitan/issues/885",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-25T03:24:56Z",
    "updated_at": "2026-01-05T17:13:54Z",
    "comments": 5,
    "user": "airlsyn"
  },
  {
    "repo": "pytorch/xla",
    "number": 8740,
    "title": "Add single processing to Getting Started Instructions",
    "body": "In our initial README document, we currently only have instructions on multi-processing steps for getting started. We should add information to single processing.",
    "url": "https://github.com/pytorch/xla/issues/8740",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-02-25T01:15:38Z",
    "updated_at": "2025-03-27T17:30:35Z",
    "comments": 0,
    "user": "pgmoka"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3246,
    "title": "How to save the merged model trained with peft?",
    "body": "I am working on fine tuning a 7B model and due to the size, we trained it with lora- by following the guidance (https://sbert.net/examples/training/peft/README.html)\n```python\npeft_config = LoraConfig(\n        task_type=TaskType.FEATURE_EXTRACTION,\n        inference_mode=False,\n        r=8,\n        lora_alpha=32,\n        lora_dropout=0.1,\n    )\n\nmodel.add_adapter(peft_config)\n```\n\nTraining works great and we are looking for some guidances to merge the lora layer with the base model and saved.\n\nWhat we have tried:\n1. `model.save_pretrained(\"\")` => only save the lora layer\n2. using `peft` library: this doesn't seem to work correctly, as the inference result is the same as the base model.\n```\nmodel.save_pretrained(tmp_path)\nbase_model = SentenceTransformer(model_name_or_path=model_path)\nadapter_model = PeftModel.from_pretrained(base_model, adapter_tmp_path)\nmerged_model = adapter_model.merge_and_unload()\nmerged_model.config = transformers.AutoConfig.from_pretrained(model_path)\nmerged_model.save_pretrained(path)\n```\n\nWe are reaching out for insights about how to merge the sentence transformer trained peft model with the base model. Thanks!",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3246",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-25T00:56:20Z",
    "updated_at": "2025-12-05T12:33:48Z",
    "user": "chz816"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7420,
    "title": "better correspondence between cached and saved datasets created using from_generator",
    "body": "### Feature request\n\nAt the moment `.from_generator` can only create a dataset that lives in the cache. The cached dataset cannot be loaded with `load_from_disk` because the cache folder is missing `state.json`. So the only way to convert this cached dataset to a regular is to use `save_to_disk` which needs to create a copy of the cached dataset. For large datasets this can end up wasting a lot of space. In my case the saving operation failed so I am stuck with a large cached dataset and no clear way to convert to a `Dataset` that I can use. The requested feature is to provide a way to be able to load a cached dataset using `.load_from_disk`. Alternatively `.from_generator` can create the dataset at a specified location so that it can be loaded from there with `.load_from_disk`.\n\n### Motivation\n\nI have the following workflow which has exposed some awkwardness about the Datasets saving/caching.\n\n1. I created a cached dataset using `.from_generator` which was cached in a folder. This dataset is rather large (~600GB) with many shards.\n2. I tried to save this dataset using `.save_to_disk` to another location so that I can use later as a `Dataset`. This essentially creates another copy (for a total of 1.2TB!) of what is already in the cache... In my case the saving operation keeps dying for some reason and I am stuck with a cached dataset and no copy.\n3. Now I am trying to \"save\" the existing cached dataset but it is not clear how to access the cached files after `.from_generator` has finished e.g. from a different process. I should not be even looking at the cache but I really do not want to waste another 2hr to generate the set so that if fails agains (I already did this couple of times). \n- I tried `.load_from_disk` but it does not work with cached files and complains that this is not a `Dataset` (!).\n- I looked at `.from_file` which takes one file but the cached file has many (shards) so I am not sure how to make this work. \n- I tried `.load_dataset` but this seems to either try to \"download\" a copy (of a file which is already in the local file system!) which I will then need to save or I need to use `streaming=False` to create an `IterableDataset `which then I need to convert (using the cache) to `Dataset` so that I can save it. With both options I  will end up with 3 copies of the same dataset for a total of ~2TB! I am hoping here is another way to do this...\n\nMaybe I am missing something here: I looked at docs and forums but no luck. I have a bunch of arrow files cached by `Dataset.from_generator` and no clean way to make them into a `Dataset` that I can use. \n\nThis all could be so much easer if `load_from_disk` can recognize the cached files and produce a `Dataset`: after the cache is created I would not have to \"save\" it again and I can just load it when I need.  At the moment `load_from_disk` needs `state.json` which is lacking in the cache folder. So perhaps `.from_generator` could be made to \"finalize\" (e.g. create `state.json`) the dataset once it is done so that it can be loaded easily. Or provide `.from_generator` with a `save_to_dir` parameter in addition to `cache_dir` which can be used for the whole process including creating the `state.json` at the end. \n\nAs a proof of concept I just created `state.json` by hand and `load_from_disk` worked using the cache! So it seems to be the missing piece here.\n\n### Your contribution\n\nTime permitting I can look into `.from_generator` to see if adding  `state.json` is feasible.",
    "url": "https://github.com/huggingface/datasets/issues/7420",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-02-24T22:14:37Z",
    "updated_at": "2026-01-05T15:16:35Z",
    "comments": 3,
    "user": "vttrifonov"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 883,
    "title": "[Evaluation] Minimal support for downstream tasks",
    "body": "Hello and thanks for the great work,\nFor now torchtitan only has an evaluation on train loss. Do you have in mind to provide a minimal support for a downstream task like for example a general knowledge score on MMLU?\nThe aim would be to provide the minimum necessary to accomplish a downstream task, a bit like the minimal example with a HuggingFace dataset (c4 in this case) while trying to keep the native pytorch spirit as much as possible. \nIf so, can I participate by initiating a PR?\n",
    "url": "https://github.com/pytorch/torchtitan/issues/883",
    "state": "closed",
    "labels": [
      "enhancement",
      "high priority",
      "triage review"
    ],
    "created_at": "2025-02-24T16:07:57Z",
    "updated_at": "2025-07-10T12:30:00Z",
    "comments": 14,
    "user": "K-H-Ismail"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 413,
    "title": "How many resources are required to train deepseek r1 671b using grpo?",
    "body": ".",
    "url": "https://github.com/huggingface/open-r1/issues/413",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-24T11:55:12Z",
    "updated_at": "2025-02-24T11:55:12Z",
    "user": "LiuShixing"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 577,
    "title": "Could I get safe tensor without lazy loading?",
    "body": "### System Info\n\nI see safe_open and deserialize, it seems that both two are lazy loading.\nSo if I don't want to load safetensor without lazy loading\nhow could I do, thanks\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Reproduction\n\nI use sglang, and in sglang model_loader/weight_utils.py\nit load safetensors like this\n`if not is_all_weights_sharded:\n            with safe_open(st_file, framework=\"pt\") as f:\n                for name in f.keys():  # noqa: SIM118\n                    param = f.get_tensor(name)\n                    yield name, param\n        else:\n            result = load_file(st_file, device=\"cpu\")\n            for name, param in result.items():\n                yield name, param\n`\nI found it loads safe tensor too slow(about 20min+), whether is_all_weights_sharded is True\nand if I prefetch safetensors before load_model(like cat * > /dev/null), it could only cost 5min\nI try to use threadExecutor to parallel this code, and although get_tensor could be quick, but loading weight still cost 20min +, so I doubt that lazy loading.thanks\n\n### Expected behavior\n\nwithout lazy loading",
    "url": "https://github.com/huggingface/safetensors/issues/577",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-24T07:55:33Z",
    "updated_at": "2025-03-13T16:51:49Z",
    "comments": 1,
    "user": "voidxb"
  },
  {
    "repo": "pytorch/xla",
    "number": 8738,
    "title": "support more op in jaten.py",
    "body": "## \u2753 Questions and Help\nHi, I want to convert llama2-7b model, and I want to use jlibrary.register_jax_composite to composite some op.\nNow I need to composite below 2 ops: torch.nn.RMSNorm and transformers.models.llama.modeling_llama.LlamaRotaryEmbedding.\nDo you have plan to add above 2 ops in jaten.py?\n\n[xla](https://github.com/pytorch/xla/tree/master)/[torchax](https://github.com/pytorch/xla/tree/master/torchax)/[torchax](https://github.com/pytorch/xla/tree/master/torchax/torchax)/[ops](https://github.com/pytorch/xla/tree/master/torchax/torchax/ops)/jaten.py\n\nAnother question, after using jlibrary.register_jax_composite, I got call op in IR, do you have plan to use composite op replace call op? If have, is there an approximate time for completion?",
    "url": "https://github.com/pytorch/xla/issues/8738",
    "state": "closed",
    "labels": [
      "question",
      "torchxla2"
    ],
    "created_at": "2025-02-24T06:10:50Z",
    "updated_at": "2025-03-04T06:06:09Z",
    "user": "raninbowlalala"
  },
  {
    "repo": "huggingface/trl",
    "number": 2941,
    "title": "How to dynamically adjust params during grpo training?",
    "body": "How to dynamically adjust params during training? For example, I want to adopt a smaller num_generations(8) at the beginning of grpo training, and enlarge it to 32 and also adopt a larger temperature from the 50th step.",
    "url": "https://github.com/huggingface/trl/issues/2941",
    "state": "open",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-02-24T02:08:52Z",
    "updated_at": "2025-02-24T07:49:10Z",
    "user": "Tomsawyerhu"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 406,
    "title": "How many GPU hours you take to train a simple model?",
    "body": "I wonder how many hours you take to use this repo to train a simple model, like DeepSeek-R1-Distill-Qwen-1.5B or DeepSeek-R1-Distill-Qwen-7B, if on 8 H100?",
    "url": "https://github.com/huggingface/open-r1/issues/406",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-24T00:27:52Z",
    "updated_at": "2025-02-24T06:31:31Z",
    "user": "Red-Scarff"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 576,
    "title": "How to access header with python",
    "body": "Is there a way to access the header in Python to know the offsets of each tensor data?",
    "url": "https://github.com/huggingface/safetensors/issues/576",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-23T17:42:46Z",
    "updated_at": "2025-03-13T16:58:36Z",
    "user": "justinchuby"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10878,
    "title": "How to expand peft.LoraConfig",
    "body": "If expanding\npeft.LoraConfig\uff0c How to modify to accommodate more lora?",
    "url": "https://github.com/huggingface/diffusers/issues/10878",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-02-23T14:01:11Z",
    "updated_at": "2025-03-25T15:03:28Z",
    "user": "llm8047"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10874,
    "title": "Does it support adding LoHa method",
    "body": "Does it support adding LoHa method\uff1f\n\nWhere can I modify it\uff1f",
    "url": "https://github.com/huggingface/diffusers/issues/10874",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-02-23T12:06:14Z",
    "updated_at": "2025-03-25T15:03:41Z",
    "comments": 3,
    "user": "llm8047"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10872,
    "title": "[Feature request] Please add from_single_file support in SanaTransformer2DModel to support first Sana Apache licensed model",
    "body": "**Is your feature request related to a problem? Please describe.**\nWe all know Sana model is very good but unfortunately the LICENSE is restrictive.\nRecently a Sana finetuned model is released under Apache LICENSE. Unfortunately SanaTransformer2DModel does not support from_single_file to use it\n\n**Describe the solution you'd like.**\n\n```python\nimport torch\nfrom diffusers import SanaPipeline\nfrom diffusers import SanaTransformer2DModel\nmodel_path = \"Efficient-Large-Model/Sana_1600M_1024px_MultiLing\"\ndtype = torch.float16\ntransformer = SanaTransformer2DModel.from_single_file (\n\t\"Swarmeta-AI/Twig-v0-alpha/Twig-v0-alpha-1.6B-2048x-fp16.pth\",\n\ttorch_dtype=dtype,\n)\npipe = SanaPipeline.from_pretrained(\n\tpretrained_model_name_or_path=model_path,\n\ttransformer=transformer,\n\ttorch_dtype=dtype,\n\tuse_safetensors=True,\n)\npipe.to(\"cuda\")\npipe.enable_model_cpu_offload()\npipe.enable_vae_slicing()\npipe.enable_vae_tiling()\ninference_params = {\n\t\"prompt\": \"rose flower\",\n\t\"negative_prompt\": \"\",\n\t\"height\": 1024,\n\t\"width\": 1024,\n\t\"guidance_scale\": 4.0,\n\t\"num_inference_steps\": 20,\n\n}\nimage = pipe(**inference_params).images[0]\nimage.save(\"sana.png\")\n\n```\n\n```\n(venv) C:\\aiOWN\\diffuser_webui>python sana_apache.py\nTraceback (most recent call last):\n  File \"C:\\aiOWN\\diffuser_webui\\sana_apache.py\", line 6, in <module>\n    transformer = SanaTransformer2DModel.from_single_file (\nAttributeError: type object 'SanaTransformer2DModel' has no attribute 'from_single_file'\n\n```\n\n**Describe alternatives you've considered.**\nNo alternatives available as far as I know\n\n**Additional context.**\nN.A.\n",
    "url": "https://github.com/huggingface/diffusers/issues/10872",
    "state": "closed",
    "labels": [
      "help wanted",
      "Good second issue",
      "contributions-welcome",
      "roadmap"
    ],
    "created_at": "2025-02-23T11:36:21Z",
    "updated_at": "2025-03-10T03:08:32Z",
    "comments": 5,
    "user": "nitinmukesh"
  },
  {
    "repo": "pytorch/ao",
    "number": 1764,
    "title": "[QST] Tensor subclass serialization",
    "body": "Pardon the naive question, trying to understand how to implement a basic tensor subclass.\n\nThe problem I'm encountering is that the tensor subclass loses its attributes after calling torch.save on a state dict containing the subclass likely due to the use of `swap_tensors`.\n\nMinimal repro:\n```python\nfrom io import BytesIO\n\nimport torch\nfrom torch._ops import OpOverload\nfrom torchao.dtypes.nf4tensor import _INNER_TENSOR_NAMES_FOR_SHARDING, NF4Tensor, to_nf4\n\naten = torch.ops.aten\n\nclass SimpleTensor(torch.Tensor):\n    @staticmethod\n    def __new__(cls, inner_tensor, *args, **kwargs):\n        \n        kwargs[\"device\"] = inner_tensor.device\n        kwargs[\"layout\"] = inner_tensor.layout\n        kwargs[\"dtype\"] = inner_tensor.dtype\n        kwargs[\"requires_grad\"] = inner_tensor.requires_grad\n        print(f\"New SimpleTensor: {kwargs}\")\n        return torch.Tensor._make_wrapper_subclass(cls, inner_tensor.shape, **kwargs)  # type: ignore[attr-defined]\n\n    def __init__(self, inner_tensor, *args, **kwargs):\n        self.inner_tensor = inner_tensor\n\n    def __repr__(self):\n        return f\"SimpleTensor({self.inner_tensor.shape})\"\n\n    def __tensor_flatten__(self):\n        return [\"inner_tensor\"], None\n    \n    def __tensor_unflatten__(inner_tensors, metadata, outer_size, outer_stride):\n        return SimpleTensor(inner_tensors[\"inner_tensor\"])\n    \n    @classmethod\n    def __torch_function__(cls, func, types, args=(), kwargs=None):\n        kwargs = {} if kwargs is None else kwargs\n        try:\n            print(f\"calling {func.__name__} with args: {[type(arg) for arg in args]} and kwargs: {kwargs}\")\n            with torch._C.DisableTorchFunctionSubclass():\n                return func(*args, **kwargs)\n        except Exception as e:\n            print(f\"ERR: subclass doesn't implement {func}\")\n            raise e\n\n    def __torch_dispatch__(self, func: OpOverload, types, args=(), kwargs=None):\n        \n        FUNCS = [aten.detach.default, aten.copy_.default]\n        print(f\"dispatching {func._schema.name} {func._opname} {func._overloadname} with {len(args)} args: {[type(arg) for arg in args]} and kwargs: {kwargs}\")\n        print(f\"Func in impelmented funcs: {func in FUNCS}\")\n        if func is torch.ops.aten.detach.default:\n            print(f\"returning {args[0]}\")\n            return args[0]\n        if func is aten.copy_.default:\n            print(f\"copying {args[0]} to {args[1]}\")\n            original = args[0]\n            copy_in = args[1]\n            original.inner_tensor.copy_(copy_in.inner_tensor)\n            return\n\n        return func(*args, **kwargs)\n\ntorch.serialization.add_safe_globals([SimpleTensor])\n\n###\n\ndtype = torch.bfloat16\ndevice = \"cuda\"\nbatch_size = 2\nin_features = 256\nout_features = 128\noriginal_tensor = torch.randn(out_features, in_features, dtype=dtype, device=device)\n\nprint(\"\\n=================== SimpleTensor =================================\\n\")\nsimple_tensor = SimpleTensor(original_tensor)\n\ntry:\n    print(f\"Simple tensor: {simple_tensor.inner_tensor.shape}\")\nexcept Exception as e:\n    print(f\"Simple tensor error: {e}\")\n    \ntorch.utils.swap_tensors(original_tensor, simple_tensor)\n\ntry:\n    print(f\"Swapped tensor: {original_tensor.inner_tensor.shape}\")\nexcept Exception as e:\n    print(f\"Swapped tensor error: {e}\")\n\nbuffer = BytesIO()\ntorch.save({\"weight\": original_tensor}, buffer)\nbuffer.seek(0)\ntry:\n    state_dict = torch.load(buffer)\nexcept Exception as e:\n    print(f\"State load error: {e}\")\n\ntry:\n    restored_tensor = state_dict['weight']\n    print(f\"Restored tensor: {restored_tensor.inner_tensor.shape}\")\nexcept Exception as e:\n    print(f\"Restored tensor error: {e}\")\n\nprint(\"\\n=================== NF4Tensor =================================\\n\")\noriginal_tensor = torch.randn(out_features, in_features, dtype=dtype, device=device)\nnf4_tensor = to_nf4(original_tensor)\n\ntry:\n    for name in _INNER_TENSOR_NAMES_FOR_SHARDING:\n        print(f\"NF4 tensor {name}: {getattr(nf4_tensor, name).shape}\")\nexcept Exception as e:\n    print(f\"NF4 tensor error: {e}\")\n\ntorch.utils.swap_tensors(original_tensor, nf4_tensor)\ntry:\n    for name in _INNER_TENSOR_NAMES_FOR_SHARDING:\n        print(f\"Swapped tensor {name}: {getattr(original_tensor, name).shape}\")\nexcept Exception as e:\n    print(f\"Swapped tensor Error: {e}\")\n\nbuffer = BytesIO()\ntorch.save({\"weight\": original_tensor}, buffer)\nbuffer.seek(0)\nstate_dict = torch.load(buffer)\ntry:\n    restored_tensor = state_dict['weight']\n    for name in _INNER_TENSOR_NAMES_FOR_SHARDING:\n        print(f\"State dict {name}: {getattr(restored_tensor, name).shape}\")\nexcept Exception as e:\n    print(f\"State dict error: {e}\")\n```\n\nRunning the above gives the following prints an error while loading the state dict for `SimpleTensor` with `weights_only=True` even after registering `SimpleTensor` as safe (`torch.serialization.add_safe_globals([SimpleTensor])`):\n```\nState load error: Weights only load failed. In PyTorch 2.6, we changed the default value of the `weights_only` argument i",
    "url": "https://github.com/pytorch/ao/issues/1764",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-23T03:25:05Z",
    "updated_at": "2025-03-01T19:32:57Z",
    "user": "jeromeku"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 761,
    "title": "How to convert from custom dataset format to LeRobotDataset format? ",
    "body": "I'm trying to train a LeRobot model on some custom data I've recorded on a custom robot, but first, I need to convert that custom data into the correct format for LeRobotDataset. I'm guessing that an example of how to do this is in the `pusht_zarr.py` file. \n\nQuestions:\n1) Is the example in `pusht_zarr.py` the proper way to do this dataset format conversion\n2) I only care about predicting future actions, so I don't need a `reward` or `success` field for each frame. Can I omit these fields or should I put a dummy value for them? e.g. in these lines of code below in `pusht_zarr.py`, can I omit the `next.reward` and `next.success` fields or must I put some dummy values for them? (and if so, what are the recommended dummy values?)\n```\nframe = {\n                \"action\": torch.from_numpy(action[i]),\n                # Shift reward and success by +1 until the last item of the episode\n                \"next.reward\": reward[i + (frame_idx < num_frames - 1)],\n                \"next.success\": success[i + (frame_idx < num_frames - 1)],\n            }\n```\n",
    "url": "https://github.com/huggingface/lerobot/issues/761",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-22T02:35:36Z",
    "updated_at": "2025-02-25T19:39:08Z",
    "user": "pqrsqwewrty"
  },
  {
    "repo": "huggingface/trl",
    "number": 2922,
    "title": "How to support multi-device VLLM inference in the GRPO Trainer",
    "body": "https://github.com/huggingface/trl/blob/e5ae703d352b29537159180087ef8bd4b41bf625/trl/trainer/grpo_trainer.py#L439-L461\n\nIn the current GRPO implementation, VLLM can only run on a single GPU, which becomes a performance bottleneck. For example, in an 8-GPU setup, the remaining 7 GPUs have to wait for 1 GPU to complete inference, and it also can't accommodate larger models.\n\nHow can we enable VLLM to run on multiple GPUs? The only concern is that we need to figure out a way to update the parameters across multiple GPUs each time the model is reloaded:\n\nhttps://github.com/huggingface/trl/blob/e5ae703d352b29537159180087ef8bd4b41bf625/trl/trainer/grpo_trainer.py#L624-L653",
    "url": "https://github.com/huggingface/trl/issues/2922",
    "state": "open",
    "labels": [
      "\u2728 enhancement",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-02-21T09:24:51Z",
    "updated_at": "2025-03-14T02:45:21Z",
    "user": "0x404"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 575,
    "title": "How to change the model weights in safetensors?",
    "body": "### Feature request\n\nFor example, I want to change some weight with shape [K,K,C] into [K,K,C/2], how can I achieve this hacking?\n\n### Motivation\n\nN/A\n\n### Your contribution\n\nN/A",
    "url": "https://github.com/huggingface/safetensors/issues/575",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-21T03:36:27Z",
    "updated_at": "2025-03-13T16:59:32Z",
    "user": "JulioZhao97"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 875,
    "title": "RuntimeError: Got mixed torch.Tensor and DTensor, need to convert all torch.Tensor to DTensor before calling distributed operators",
    "body": "When I ran the llama3-8b model with cp on a third party device, I ran into a problem with the error message: \n`RuntimeError: npu.npu_fusion_attention.default: got mixed torch.Tensor and DTensor, need to convert all torch.Tensor to DTensor before calling distributed operators.`\nnpu_fusion_attention is called in the torch.nn.functional.scaled_dot_product_attention function, which is a custom operator . How can I solve this problem? Do I need to register a custom operator somewhere?\n\n",
    "url": "https://github.com/pytorch/torchtitan/issues/875",
    "state": "closed",
    "labels": [
      "question",
      "module: context parallel",
      "module: dtensor"
    ],
    "created_at": "2025-02-21T03:23:27Z",
    "updated_at": "2025-02-28T08:30:44Z",
    "user": "aahehehe"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1201,
    "title": "Unable to convert Janus models to ONNX",
    "body": "### Question\n\nI see that @xenova has successfully export Janus-1.3B and Janus-Pro-1B to ONNX, presumably using some version of scripts/convert.py. We are interested in exporting Janus-Pro-7B to ONNX as well, but have not been able to do so using this script (nor any other path). Attempting to convert either of the previous two models encounters the same errors, so hopefully whatever steps were taken to convert those will also enable the 7B version. \n\nThe initial error was: \n```\nValueError: The checkpoint you are trying to load has model type `multi_modality` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.\n```\nThis was fixed by installing https://github.com/deepseek-ai/Janus and adding \n`from janus.models import MultiModalityCausalLM` \nto convert.py.\n\nThe error that I'm now stuck at is:\n```\nKeyError: \"Unknown task: any-to-any. Possible values are: `audio-classification` for AutoModelForAudioClassification, `audio-frame-classification` for AutoModelForAudioFrameClassification, `audio-xvector` for AutoModelForAudioXVector, `automatic-speech-recognition` for ('AutoModelForSpeechSeq2Seq', 'AutoModelForCTC'), `depth-estimation` for AutoModelForDepthEstimation, `feature-extraction` for AutoModel, `fill-mask` for AutoModelForMaskedLM, `image-classification` for AutoModelForImageClassification, `image-segmentation` for ('AutoModelForImageSegmentation', 'AutoModelForSemanticSegmentation'), `image-to-image` for AutoModelForImageToImage, `image-to-text` for AutoModelForVision2Seq, `mask-generation` for AutoModel, `masked-im` for AutoModelForMaskedImageModeling, `multiple-choice` for AutoModelForMultipleChoice, `object-detection` for AutoModelForObjectDetection, `question-answering` for AutoModelForQuestionAnswering, `semantic-segmentation` for AutoModelForSemanticSegmentation, `text-to-audio` for ('AutoModelForTextToSpectrogram', 'AutoModelForTextToWaveform'), `text-generation` for AutoModelForCausalLM, `text2text-generation` for AutoModelForSeq2SeqLM, `text-classification` for AutoModelForSequenceClassification, `token-classification` for AutoModelForTokenClassification, `zero-shot-image-classification` for AutoModelForZeroShotImageClassification, `zero-shot-object-detection` for AutoModelForZeroShotObjectDetection\"\n```\n\n\nI can't find anything about optimum supporting this task, so it is unclear to me how @xenova was able to get around this. \nAny insight or assistance would be greatly appreciated. ",
    "url": "https://github.com/huggingface/transformers.js/issues/1201",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-20T17:55:00Z",
    "updated_at": "2025-08-19T12:55:58Z",
    "user": "turneram"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7415,
    "title": "Shard Dataset at specific indices",
    "body": "I have a dataset of sequences, where each example in the sequence is a separate row in the dataset (similar to LeRobotDataset). When running `Dataset.save_to_disk` how can I provide indices where it's possible to shard the dataset such that no episode spans more than 1 shard. Consequently, when I run `Dataset.load_from_disk`, how can I load just a subset of the shards to save memory and time on different ranks?\n\nI guess an alternative to this would be, given a loaded `Dataset`, how can I run `Dataset.shard` such that sharding doesn't split any episode across shards?",
    "url": "https://github.com/huggingface/datasets/issues/7415",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-20T10:43:10Z",
    "updated_at": "2025-02-24T11:06:45Z",
    "comments": 3,
    "user": "nikonikolov"
  },
  {
    "repo": "huggingface/trl",
    "number": 2913,
    "title": "How to specify the GPU used by vllm",
    "body": "https://github.com/huggingface/trl/blob/a92e00e810762548787fadd5c4a5e6fc13a4928a/trl/trainer/grpo_trainer.py#L392\nI have an 8-GPUs server, of which only the last two GPUs are available, and I set CUDA_VISIBLE_DEVICE=6,7, the value of torch.cuda.device_count() is 2. I want to load vllm into GPU 6, and I set vllm_device=cuda:6, but this line of code keeps giving an ValueError. What should I do?",
    "url": "https://github.com/huggingface/trl/issues/2913",
    "state": "closed",
    "labels": [
      "\u2753 question"
    ],
    "created_at": "2025-02-20T10:32:30Z",
    "updated_at": "2025-02-21T03:14:13Z",
    "user": "xiaolizh1"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 381,
    "title": "how to set sampling parameters when do evaluation",
    "body": "As you said you use greedy decoding to reproduce deepseek's evaluation results, And I get different score, there may be something not  aligning. So I want to know how to set the sampling parameters and how to see them when I use the 'evaluate.py' to do evaluation. ",
    "url": "https://github.com/huggingface/open-r1/issues/381",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-20T08:41:26Z",
    "updated_at": "2025-02-24T06:57:59Z",
    "user": "ItGirls"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 380,
    "title": "How to set cuda device for your Data generation pipline",
    "body": "Hi author, thanks for your work.\nWhen I use your pipline to generate data set (deepseek-ai/DeepSeek-R1-Distill-Qwen-7B)\nI find I can not set device with os.environ\n\n![Image](https://github.com/user-attachments/assets/ff7bc85f-63a0-4618-80f0-f0516081e7ec)\n\nIt is actually always on the cude:0, how can I set it correctl? Thank you!",
    "url": "https://github.com/huggingface/open-r1/issues/380",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-20T07:06:44Z",
    "updated_at": "2025-02-20T07:06:44Z",
    "user": "Aristo23333"
  },
  {
    "repo": "pytorch/xla",
    "number": 8728,
    "title": "Debug XLA using GDB",
    "body": "## \u2753 Questions and Help\nI would like to debug XLA code using gdb via C++/Python Debugger, which means that I need a _XLAC.cpython-310-x86_64-linux-gnu.so built in debug mode to have debug symbols, just like DCMAKE_BUILD_TYPE=Debug. I don't know how to get this artifact.\n\nThanks for your help.",
    "url": "https://github.com/pytorch/xla/issues/8728",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-20T03:22:41Z",
    "updated_at": "2025-02-20T08:00:00Z",
    "comments": 2,
    "user": "yuanfz98"
  },
  {
    "repo": "huggingface/transformers",
    "number": 36293,
    "title": "Bug in v4.49 where the attention mask is ignored during generation (t5-small)",
    "body": "### System Info\n\nHi all!\n\nFirst, thank you very much for your hard work and making these features avalible.\n\nI'm seeing a bug after updating to v4.49 where the output changes even though the attention mask should be masking padded values. Below is a script to reproduce the error.\n\nIt will tokenize two prompts, and then call `.generate` on the shorter prompt while trying different slices of the padded `input_ids` and padded `attention_mask`. At some point, the generated response will change for v4.49 but not v4.48.\n\n\nEnviroment information\n```\n- `transformers` version: 4.49.0\n- Platform: macOS-15.3-arm64-arm-64bit\n- Python version: 3.10.13\n- Huggingface_hub version: 0.29.0\n- Safetensors version: 0.5.2\n- Accelerate version: not installed\n- Accelerate config: not found\n- DeepSpeed version: not installed\n- PyTorch version (GPU?): 2.6.0 (False)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: No\n```\n\noutput of `uv pip compile requirements.in`\n```\ntransformers==4.48.0         # change this to 4.49.0 to reproduce the error\n\nasttokens==3.0.0\ncertifi==2025.1.31\ncharset-normalizer==3.4.1\ndecorator==5.1.1\nexceptiongroup==1.2.2\nexecuting==2.2.0\nfilelock==3.17.0\nfsspec==2025.2.0\nhuggingface-hub==0.29.0\nidna==3.10\nipython==8.32.0\njedi==0.19.2\njinja2==3.1.5\nmarkupsafe==3.0.2\nmatplotlib-inline==0.1.7\nmpmath==1.3.0\nnetworkx==3.4.2\nnumpy==2.2.3\npackaging==24.2\nparso==0.8.4\npexpect==4.9.0\nprompt-toolkit==3.0.50\nptyprocess==0.7.0\npure-eval==0.2.3\npygments==2.19.1\npyyaml==6.0.2\nregex==2024.11.6\nrequests==2.32.3\nsafetensors==0.5.2\nsentencepiece==0.2.0\nstack-data==0.6.3\nsympy==1.13.1\ntokenizers==0.21.0\ntorch==2.6.0\ntqdm==4.67.1\ntraitlets==5.14.3\ntyping-extensions==4.12.2\nurllib3==2.3.0\nwcwidth==0.2.13\n```\n\n### Who can help?\n\n@ArthurZucker \n\n### Information\n\n- [x] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\n```python\nfrom transformers import AutoModelForSeq2SeqLM, AutoTokenizer, GenerationConfig\n\n\nmodel = AutoModelForSeq2SeqLM.from_pretrained(\"t5-small\")\ntokenizer = AutoTokenizer.from_pretrained(\"t5-small\")\n\ncfg = GenerationConfig(\n    max_new_tokens=512,\n    do_sample=False,\n    use_cache=True,    # same behavior with use_cache=False\n)\n\n\nshortprompt = (\"summarize: Transformers v4.49 appears to have a bug where .generate stops respecting \"\n               \"the attention_mask after some number of tokens.\")\nlongprompt = (\"summarize: I enjoy walking with my cute dog, especially in the early mornings \"\n              \"when the air is crisp and the streets are quiet. Watching my dog happily trot along, \"\n              \"always brings a smile to my face.\")\n\n# ---\nprint(\"# Single prompt ---\")\ninputs = tokenizer(\n    [shortprompt], return_tensors=\"pt\", padding=True\n)\n\noutputs = model.generate(**inputs, generation_config=cfg)\n\nexpected = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]\nprint(f\"short prompt: '{expected}'\")\nprint()\n\n\n# ---\nprint(\"# Double prompt ---\")\ninputs = tokenizer(\n    [shortprompt, longprompt], return_tensors=\"pt\", padding=True\n)\n\noutputs = model.generate(**inputs, generation_config=cfg)\n\ntext = tokenizer.batch_decode(outputs, skip_special_tokens=True)\nprint(f\"short prompt: '{text[0]}'\")\nprint(f\"long prompt: '{text[1]}'\")\nprint()\n\n# ---\nprint(\"# Single shortprompt with mask ---\")\ndef run_sliced_input(slice_, show_text=False):\n    shortprompt_tokens = inputs.input_ids[0:1, slice_]\n    shortprompt_mask = inputs.attention_mask[0:1, slice_]\n\n    outputs = model.generate(inputs=shortprompt_tokens, attention_mask=shortprompt_mask, generation_config=cfg)\n    text = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]\n    if show_text:\n        print(f\"'{text}'\")\n    return text != expected\n\n# run a bisect search to find the first slice that fails\nimport bisect\nstart = inputs.attention_mask[0].sum().item()\nfull_range = inputs.attention_mask.size(1)\nends = range(start, full_range)\nprint(f\"searching in range {start} to {full_range}\")\n\nfirst_failure = start + bisect.bisect_left(\n    [slice(None, end) for end in ends], True, key=run_sliced_input\n)\nif first_failure == full_range:\n    print(\"No failure found in the full range!\")\nelse:\n    print(f\"First failing slice: {first_failure}\")\n\n    print(f\"Output with slice at {first_failure-1}: \", end=\"\")\n    run_sliced_input(slice(None, first_failure-1), show_text=True)\n    print(f\"Output with slice at {first_failure}: \", end=\"\")\n    run_sliced_input(slice(None, first_failure), show_text=True)\n\n```\n\n### Expected behavior\n\nversion 4.48\n```\n# Single prompt ---\nshort prompt: 'v4.49 appears to have a bug where.generate stops respecting the attention_mask after some tokens.'\n\n# Double prompt ---\nshort prompt: 'v4.49 appears to have a bug w",
    "url": "https://github.com/huggingface/transformers/issues/36293",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-02-20T02:16:23Z",
    "updated_at": "2025-02-20T16:28:11Z",
    "user": "bdhammel"
  },
  {
    "repo": "pytorch/xla",
    "number": 8727,
    "title": "Create a site map or centralize links in README",
    "body": "## \ud83d\udcda Documentation\n\nAdd repo map to https://github.com/pytorch/xla/blob/master/README.md. Currently we have many helpful links, but they are spread around the repo. We should have a location with these centralized to help people find useful documentation easily.",
    "url": "https://github.com/pytorch/xla/issues/8727",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-02-20T00:04:49Z",
    "updated_at": "2025-03-24T18:58:57Z",
    "comments": 1,
    "user": "pgmoka"
  },
  {
    "repo": "pytorch/xla",
    "number": 8726,
    "title": "Add documentation on xla_native_functions.yaml categories",
    "body": "## \ud83d\udcda Documentation\n\nAdd more information to https://github.com/pytorch/xla/blob/60160233ad413f030da1e7e383cc85950bcf347c/codegen/xla_native_functions.yaml#L3 on what the different categories mean in terms of lowering operations",
    "url": "https://github.com/pytorch/xla/issues/8726",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-02-19T21:57:04Z",
    "updated_at": "2025-02-20T12:54:47Z",
    "comments": 2,
    "user": "pgmoka"
  },
  {
    "repo": "pytorch/xla",
    "number": 8725,
    "title": "Add operation lowering unit tests to test_operations.py",
    "body": "## \ud83d\ude80 Feature\nWe should expand test/test_operations to check if operations are being lowered. We have previously seen issues being cause due to this issue (see https://github.com/pytorch/xla/issues/4032 and https://github.com/pytorch/xla/issues/8713). An example of this test can be seen in https://github.com/pytorch/xla/pull/8686.\n\nWe should study to see if it is possible to generalize this test, and expand to test our other lowered operations\n\n## Motivation\n\nImprove our unit tests to expand coverage while continuing to be readable\n\n",
    "url": "https://github.com/pytorch/xla/issues/8725",
    "state": "open",
    "labels": [
      "testing"
    ],
    "created_at": "2025-02-19T20:18:28Z",
    "updated_at": "2025-03-04T22:56:09Z",
    "comments": 1,
    "user": "pgmoka"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 862,
    "title": "SimpleFSDP vs. FSDP2",
    "body": "Hi @tianyu-l , just came across [SimpleFSDP](https://arxiv.org/pdf/2411.00284) and its [implementation](https://github.com/facebookresearch/capi/blob/main/fsdp.py) (nice project!).\n\nIn the paper, SimpleFSDP is extensively compared with FSDP2. May I know if torchtitan is going to support it or there is a way to somehow combine SimpleFSDP and FSDP2? ",
    "url": "https://github.com/pytorch/torchtitan/issues/862",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-19T20:16:58Z",
    "updated_at": "2025-02-20T08:18:36Z",
    "user": "yenchenlin"
  },
  {
    "repo": "huggingface/optimum-nvidia",
    "number": 176,
    "title": "How to run whisper after #133",
    "body": "I see that previously, whisper could be run as follows: [https://github.com/huggingface/optimum-nvidia/blob/whisper-inference/examples/automatic-speech-recognition/whisper.py](https://github.com/huggingface/optimum-nvidia/blob/whisper-inference/examples/automatic-speech-recognition/whisper.py)\n\n\nBut after #133 the code has been significantly refactored. Is there any documentation that shows how to properly run whisper with a tensorRT backend?\n\n```python\nfrom optimum.nvidia.pipelines import pipeline\nasr = pipeline(\"automatic-speech-recognition\", model=\"openai/whisper-base\", device=device)\n> NotImplementedError: Model type whisper is not currently supported\n```\n\n```python\nfrom optimum.nvidia.models.whisper import WhisperForConditionalGeneration\nmodel = WhisperForConditionalGeneration.from_pretrained(\"openai/whisper-base\", torch_dtype=torch_dtype)\n> AttributeError: type object 'WhisperForConditionalGeneration' has no attribute 'from_pretrained'\n```\n",
    "url": "https://github.com/huggingface/optimum-nvidia/issues/176",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-19T17:45:01Z",
    "updated_at": "2025-02-19T17:45:01Z",
    "user": "huggingfacename"
  },
  {
    "repo": "pytorch/xla",
    "number": 8722,
    "title": "Add args documentation to xla.launch",
    "body": "## \ud83d\udcda Documentation\n\nIn https://github.com/pytorch/xla/blob/60160233ad413f030da1e7e383cc85950bcf347c/torch_xla/torch_xla.py#L212, we should have arguments be documented to note that:\n1) The callable function's firts argument is the process id;\n2) The args tuple is passed to the callable function afterwards.\n\nThe pattern being called by Callable is something like:\n\nCallable(process_id, args...).\n\nWe should make this clear from the method call.",
    "url": "https://github.com/pytorch/xla/issues/8722",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-02-19T17:44:44Z",
    "updated_at": "2025-02-20T18:21:22Z",
    "comments": 1,
    "user": "pgmoka"
  },
  {
    "repo": "huggingface/peft",
    "number": 2388,
    "title": "ValueError: Target module Qwen2_5_VisionTransformerPretrainedModel is not supported.",
    "body": "## Context\nI'm finetuning the Qwen2.5-Vl model with swift for data extraction using LoRA. I'm not sure what is the correct way to save and upload the adapter and be able to recharge it correctly.\nIn short, I followed these steps\n```python\n# load model\nmodel, processor = get_model_tokenizer(\n    'Qwen/Qwen2.5-VL-3B-Instruct',\n    torch_dtype=torch.bfloat16,\n    use_hf=True,\n    attn_impl=\"flash_attn\",\n)\n# get lora \n...\nmodel_arch = get_model_arch(model.model_meta.model_arch)\nlora_config = LoraConfig(\n    task_type='CAUSAL_LM',\n    r=4,\n    lora_alpha=8,\n    lora_dropout=0.05,\n    use_rslora=True,\n    target_modules=get_multimodal_target_regex(\n      model_arch,\n      freeze_llm=False,\n      freeze_vit=False,\n      freeze_aligner=True\n    ),\n)\nmodel = Swift.prepare_model(model, lora_config)\n# train config e run\n...\ntrainer = Seq2SeqTrainer(\n    model=model,\n    args=training_args,\n    data_collator=template.data_collator,\n    train_dataset=train_dataset,\n    eval_dataset=val_dataset,\n    template=template,\n    callbacks= [\n        EarlyStoppingCallback(\n            early_stopping_patience=6,\n            early_stopping_threshold=0.001\n        )\n    ]\n)\nstats = trainer.train()\n# push adapter\nmodel.push_to_hub(f\"tech4humans/{model_name}\", private=True)\n```\ndebugging the peft model was loaded with the class `PeftModelForCausalLM`.\n\n## Problem \n Then after I tried to recharge the adapter and I get an error with peft\n```python\nfrom transformers import Qwen2_5_VLForConditionalGeneration\nmodel = Qwen2_5_VLForConditionalGeneration.from_pretrained(\"Qwen/Qwen2.5-VL-3B-Instruct\", device_map=\"auto\") \nmodel.load_adapter(\"tech4humans/Qwen2.5-VL-3B-Instruct-r4-tuned\")\n``` \n```python\n/usr/local/lib/python3.10/dist-packages/peft/tuners/lora/model.py in _create_new_module(lora_config, adapter_name, target, **kwargs)\n    345         if new_module is None:\n    346             # no module could be matched\n--> 347             raise ValueError(\n    348                 f\"Target module {target} is not supported. Currently, only the following modules are supported: \"\n    349                 \"`torch.nn.Linear`, `torch.nn.Embedding`, `torch.nn.Conv1d`, `torch.nn.Conv2d`, `torch.nn.Conv3d`, \".\n\nValueError: Target module Qwen2_5_VisionTransformerPretrainedModel(\n  (patch_embed): Qwen2_5_VisionPatchEmbed(\n    (proj): Conv3d(3, 1280, kernel_size=(2, 14, 14), stride=(2, 14, 14), bias=False)\n  )\n  (rotary_pos_emb): Qwen2_5_VisionRotaryEmbedding()\n  (blocks): ModuleList(\n    (0-31): 32 x Qwen2_5_VLVisionBlock(\n      (norm1): Qwen2RMSNorm((1280,), eps=1e-06)\n      (norm2): Qwen2RMSNorm((1280,), eps=1e-06)\n      (attn): Qwen2_5_VLVisionSdpaAttention(\n        (qkv): Linear(in_features=1280, out_features=3840, bias=True)\n        (proj): Linear(in_features=1280, out_features=1280, bias=True)\n      )\n      (mlp): Qwen2_5_VLMLP(\n        (gate_proj): Linear(in_features=1280, out_features=3420, bias=True)\n        (up_proj): Linear(in_features=1280, out_features=3420, bias=True)\n        (down_proj): Linear(in_features=3420, out_features=1280, bias=True)\n        (act_fn): SiLU()\n      )\n    )\n  )\n  (merger): Qwen2_5_VLPatchMerger(\n    (ln_q): Qwen2RMSNorm((1280,), eps=1e-06)\n    (mlp): Sequential(\n      (0): Linear(in_features=5120, out_features=5120, bias=True)\n      (1): GELU(approximate='none')\n      (2): Linear(in_features=5120, out_features=2048, bias=True)\n    )\n  )\n) is not supported. Currently, only the following modules are supported: `torch.nn.Linear`, `torch.nn.Embedding`, `torch.nn.Conv1d`, `torch.nn.Conv2d`, `torch.nn.Conv3d`, `transformers.pytorch_utils.Conv1D`, `torch.nn.MultiheadAttention.`.\n```\n\n## Sytem info\n```\ntransformers 4.50.0.dev0\npeft 0.14.1.dev0\nms-swift 3.2.0.dev0\nPython 3.10.12\nCUDA Version: 12.6\n```\nAm I missing something or doing something wrong? Any pointers would be appreciated. Thanks!",
    "url": "https://github.com/huggingface/peft/issues/2388",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-19T15:09:17Z",
    "updated_at": "2025-04-09T16:23:53Z",
    "comments": 8,
    "user": "samuellimabraz"
  },
  {
    "repo": "huggingface/trl",
    "number": 2905,
    "title": "How to use GRPOTrainer to train a LLM for code generation? What is the format of the dataset?",
    "body": "",
    "url": "https://github.com/huggingface/trl/issues/2905",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-19T12:38:13Z",
    "updated_at": "2025-02-19T12:38:13Z",
    "user": "xiangxinhello"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 370,
    "title": "how to train grpo on 2 nodes(16gpus)",
    "body": "how to train grpo on 2 nodes(16gpus)? 10000 thanks for giving a successful example.",
    "url": "https://github.com/huggingface/open-r1/issues/370",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-19T09:15:14Z",
    "updated_at": "2025-03-26T11:36:03Z",
    "user": "glennccc"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 267,
    "title": "How to save the best performing checkpoint during LoRA fine-tuning on Hunyuan Video?",
    "body": "In the HunyuanVideo training scripts, we can save checkpoints every 500 steps by passing `--checkpointing_steps 500`. The final model is saved through the following code:\n\n```python\nif accelerator.is_main_process:\n    transformer = unwrap_model(accelerator, self.transformer)\n\n    if self.args.training_type == \"lora\":\n        transformer_lora_layers = get_peft_model_state_dict(transformer)\n\n        self.model_config[\"pipeline_cls\"].save_lora_weights(\n            save_directory=self.args.output_dir,\n            transformer_lora_layers=transformer_lora_layers,\n        )\n    else:\n        transformer.save_pretrained(os.path.join(self.args.output_dir, \"transformer\"))\n```\n(Reference: https://github.com/a-r-r-o-w/finetrainers/blob/4bb10c62324aef4fbac85bb381acb9f6f39a5076/finetrainers/trainer.py#L837C1-L848C95)\n\nMy question is: How can I ensure that I save the best performing model during LoRA fine-tuning? The final saved model might not be the best, as the loss could fluctuate during training. The same applies to intermediate checkpoints. Is there a recommended approach for tracking and saving the best-performing model?",
    "url": "https://github.com/huggingface/finetrainers/issues/267",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-19T07:49:11Z",
    "updated_at": "2025-02-21T01:39:30Z",
    "user": "dingangui"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 748,
    "title": "[pi0] confusion about the state embedding dimension in `embed_suffix`",
    "body": "### System Info\n\n```Shell\n- `lerobot` version: 0.1.0\n- Platform: Linux-5.14.0-284.86.1.el9_2.x86_64-x86_64-with-glibc2.35\n- Python version: 3.11.11\n- Huggingface_hub version: 0.28.1\n- Dataset version: 3.2.0\n- Numpy version: 1.26.4\n- PyTorch version (GPU?): 2.6.0+cu124 (True)\n- Cuda version: 12040\n- Using GPU in script?: Yes\n```\n\n### Information\n\n- [x] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nIn the model definition of `modeling_pi0.py`,[ line 567](https://github.com/huggingface/lerobot/blob/fe483b1d0d4ad8506f61924d905943eaa6d3ece0/lerobot/common/policies/pi0/modeling_pi0.py#L567), we see that\n\n```\n# Embed state\nstate_emb = self.state_proj(state)\nstate_emb = state_emb.to(dtype=torch.bfloat16)\nembs.append(state_emb[:, None, :])\nbsize = state_emb.shape[0]\ndtype = state_emb.dtype\ndevice = state_emb.device\n```\n\nWe see that the state embedding dimension is bumped up at the 1st dimension.\n\nThe problem is, models like pi0 usually use datasets that have `n_obs_steps.`, which is the default of LeRobot's own datasets as well. For example, if I use the `pusht` dataset as specified in this LeRobot example [script](https://github.com/huggingface/lerobot/blob/main/examples/3_train_policy.py), we see that the dimension of the dataset looks something like this\n```\nimage shape torch.Size([64, 2, 3, 96, 96])\nstate shape torch.Size([64, 2, 2])\naction shape torch.Size([64, 16, 2])\n```\n\nThe first 2 in the dimensions of image and state come from the fact that the dataset gives you two frames of the past in one batch. The 16 in action comes from the fact that diffusion policy has an action horizon of 16 frames in the future.\n\nNow, if we train on dataset like this or any similar dataset, it would have a dimension mismatch in `embed_suffix` because it would bump the state_embedding and give you something like\n```\nRuntimeError: Tensors must have same number of dimensions: got 4 and 3\n```\n\nFor pi0 it's more or less okay, because the default n_obs_steps is usually 1, so you can squeeze out the 1st dimension of state, but this current way doesn't seem very expendable in the future, and also not consistent with LeRobot's usual dataset format.\n\n### Expected behavior\n\nI would like to hear some reasoning behind the design choice like this so I can know if I am misunderstanding something. \n\nThank you very much in advance!",
    "url": "https://github.com/huggingface/lerobot/issues/748",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2025-02-19T03:33:01Z",
    "updated_at": "2025-10-20T02:31:45Z",
    "user": "IrvingF7"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3272,
    "title": "Introduction to Libuv TCPStore Backend",
    "body": "Thanks for the  [article](https://github.com/pytorch/tutorials/blob/main/intermediate_source/TCPStore_libuv_backend.rst).  Wondering if you can provide some details about the content of the TCPStore and what is its role in c10d . ",
    "url": "https://github.com/pytorch/tutorials/issues/3272",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-18T20:56:09Z",
    "updated_at": "2025-04-16T17:57:44Z",
    "user": "githubsgi"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1198,
    "title": "whisper: how to get streaming word level timestamps? (automatic-speech-recognition)",
    "body": "### Question\n\n## Goal\n- streaming\n- word level timestamps\n\n## Issue\n`on_chunk_start` / `on_chunk_end` are not called when using `return_timestamps: \"word\"`. \nThese callbacks only provide timestamps with `return_timestamps: true`\n\nI also tried to decode tokens, as I\u2019ve seen it in the demo, but that uses callbacks that no longer exist (e.g. `chunk_callback(chunk)` and `callback_function(item)`)\n\n## Setup\n\n\n```ts\nconst transcriber = await pipeline(\n  \"automatic-speech-recognition\",\n  \"Xenova/whisper-tiny\",\n  {\n    device: \"webgpu\",\n   }\n);\n```\n\n\n```ts\ntoken_callback_function: (tokens) => {\n  const { feature_extractor } = transcriber.processor;\n  const { config: modelConfig } = transcriber.model;\n  \n  const time_precision = feature_extractor.config.chunk_length / modelConfig.max_source_positions;\n\n  if (tokens) {\n    const data = transcriber.tokenizer._decode_asr(\n      [{ tokens, finalised: false }],\n      {\n        time_precision,\n        return_timestamps: true,\n        force_full_sequences: false,\n      }\n    );\n\n    console.log(\"data\", data);\n  }\n};\n```\n\nDecoding works, but timestamps are null.\n\n<img width=\"370\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/38779a91-7a2a-43c3-be29-cd785e294378\" />",
    "url": "https://github.com/huggingface/transformers.js/issues/1198",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-18T15:29:42Z",
    "updated_at": "2025-02-20T04:45:48Z",
    "user": "getflourish"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10817,
    "title": "auto_pipeline missing SD3 contol nets",
    "body": "### Describe the bug\n\nHey, auto_pipeline seesm to be missing the control nets variants for SD3\n\nvenv\\Lib\\site-packages\\diffusers\\pipelines\\auto_pipeline.py\n\n### Reproduction\n\nLoad an sd3 model checkpoint with a controlnet loading any of the auto pipes you will just get the none control net variations as its not set in the configuration.\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.32.2\n- Platform: Windows-10-10.0.19045-SP0\n- Running on Google Colab?: No\n- Python version: 3.12.7\n- PyTorch version (GPU?): 2.5.1+cu124 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.27.1\n- Transformers version: 4.48.0\n- Accelerate version: 1.2.1\n- PEFT version: not installed\n- Bitsandbytes version: 0.45.2\n- Safetensors version: 0.5.2\n- xFormers version: not installed\n- Accelerator: NVIDIA GeForce RTX 3080 Ti, 12288 MiB\n- Using GPU in script?: <fill in>\n- Using distributed or parallel set-up in script?: <fill in>\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/10817",
    "state": "closed",
    "labels": [
      "bug",
      "help wanted",
      "contributions-welcome"
    ],
    "created_at": "2025-02-18T12:54:40Z",
    "updated_at": "2025-02-24T16:21:03Z",
    "comments": 3,
    "user": "JoeGaffney"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 746,
    "title": "How should I run the model on my own datasets in different envs which is not clearly mentioned in the README?",
    "body": "I want to run the diffusion model on my own real world arms datasets, which are different from the example env and input format in observation and action dims.\n\nI've seem some yaml files to store these parameters in earlier version of the repo, but I can't find it in the newest version of the repo. So should I write this params myself in some yaml-like or json-like files or there are some new ways to solve these problems. \n\nThis is my first issue in github, so the format may be informal, but I'm really eager for the answers. \nThank you for your answers!!!",
    "url": "https://github.com/huggingface/lerobot/issues/746",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "dataset",
      "stale"
    ],
    "created_at": "2025-02-18T12:33:07Z",
    "updated_at": "2025-10-19T02:32:17Z",
    "user": "shi-akihi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 147374,
    "title": "[ONNX] How to export triton custom kernels as custom ops?",
    "body": "### \ud83d\udc1b Describe the bug\n\ncan't export triton  cumstom op kernel when use torch.onnx.export(dynamo=True)\ni have use  triton_op and wrap_triton to wrap this triton kernel\n\n```python\nimport torch\nfrom torch.library import triton_op, wrap_triton\nimport triton\nfrom triton import language as tl\n@triton.jit\ndef add_kernel(\n    in_ptr0,\n    in_ptr1,\n    out_ptr,\n    n_elements,\n    BLOCK_SIZE: \"tl.constexpr\",\n):\n    pid = tl.program_id(axis=0)\n    block_start = pid * BLOCK_SIZE\n    offsets = block_start + tl.arange(0, BLOCK_SIZE)\n    mask = offsets < n_elements\n    x = tl.load(in_ptr0 + offsets, mask=mask)\n    y = tl.load(in_ptr1 + offsets, mask=mask)\n    output = x + y\n    tl.store(out_ptr + offsets, output, mask=mask)\n\n@triton_op(\"mylib::add\", mutates_args={})\ndef add(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:\n    output = torch.empty_like(x)\n    n_elements = output.numel()\n    def grid(meta):\n        return (triton.cdiv(n_elements, meta[\"BLOCK_SIZE\"]),)\n    # NB: we need to wrap the triton kernel in a call to wrap_triton\n    wrap_triton(add_kernel)[grid](x, y, output, n_elements, 16)\n    return output\n@torch.compile\ndef f(x, y):\n    return add(x, y)\nx = torch.randn(3, device=\"cuda\")\ny = torch.randn(3, device=\"cuda\")\nz = f(x, y)\nassert torch.allclose(z, x + y)\nwith torch.no_grad():\n    torch.onnx.export(f,\n                      (x,y,),\n                      \"triton_export.onnx\",  \n                      export_params=True,  \n                      dynamo=True,\n                      opset_version=18,  \n                      do_constant_folding=False, \n                      optimize=False,\n                      #custom_translation_table=custom_translation_table,\n                      input_names=[\"zzq_a\",\"zzq_b\"],\n                      output_names=[\"zzq_out\"],\n                      verbose=True)\n```\n\nerror msg:\n```\ntorch.onnx] Obtain model graph for `<function f at 0x7f646a1b2670>` with `torch.export.export(..., strict=False)`...\n[torch.onnx] Obtain model graph for `<function f at 0x7f646a1b2670>` with `torch.export.export(..., strict=False)`... \u274c\n[torch.onnx] Obtain model graph for `<function f at 0x7f646a1b2670>` with `torch.export.export`...\n[torch.onnx] Obtain model graph for `<function f at 0x7f646a1b2670>` with `torch.export.export`... \u274c\n[torch.onnx] Obtain model graph for `<function f at 0x7f646a1b2670>` with Torch Script...\n[torch.onnx] Obtain model graph for `<function f at 0x7f646a1b2670>` with Torch Script... \u274c\n[torch.onnx] Obtain model graph for `<function f at 0x7f646a1b2670>` with internal Dynamo apis...\n[torch.onnx] Obtain model graph for `<function f at 0x7f646a1b2670>` with internal Dynamo apis... \u2705\n[torch.onnx] Run decomposition...\n[torch.onnx] Run decomposition... \u2705\n[torch.onnx] Translate the graph into ONNX...\n[torch.onnx] Translate the graph into ONNX... \u274c\nTraceback (most recent call last):\n  File \"/usr/bin/python3.9/lib/python3.9/site-packages/torch/onnx/_internal/exporter/_core.py\", line 708, in _translate_fx_graph\n    _handle_call_function_node_with_lowering(\n  File \"/usr/bin/python3.9/lib/python3.9/site-packages/torch/onnx/_internal/exporter/_core.py\", line 490, in _handle_call_function_node_with_lowering\n    raise _errors.DispatchError(\ntorch.onnx._internal.exporter._errors.DispatchError: No ONNX function found for <torch._higher_order_ops.triton_kernel_wrap.TritonKernelWrapperFunctional object at 0x7f63c5fa01c0>. Failure message: No decompositions registered for the real-valued input\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"/usr/bin/python3.9/lib/python3.9/site-packages/torch/onnx/_internal/exporter/_core.py\", line 1372, in export\n    onnx_program = _exported_program_to_onnx_program(\n  File \"/usr/bin/python3.9/lib/python3.9/site-packages/torch/onnx/_internal/exporter/_core.py\", line 1008, in _exported_program_to_onnx_program\n    values = _translate_fx_graph(\n  File \"/usr/bin/python3.9/lib/python3.9/site-packages/torch/onnx/_internal/exporter/_core.py\", line 734, in _translate_fx_graph\n    raise _errors.ConversionError(\ntorch.onnx._internal.exporter._errors.ConversionError: Error when translating node %triton_kernel_wrapper_functional_proxy : [num_users=1] = call_function[target=torch.ops.higher_order.triton_kernel_wrapper_functional](args = (), kwargs = {kernel_idx: 0, constant_args_idx: 10, grid: [(1, 1, 1)], tma_descriptor_metadata: {}, kwargs: {in_ptr0: %arg0, in_ptr1: %arg1, out_ptr: %empty_like, n_elements: 3, BLOCK_SIZE: 16}, tensors_to_clone: [out_ptr]}). See the stack trace for more information.\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"/usr/local/app/torch_ddp/triton_export.py\", line 38, in <module>\n    torch.onnx.export(f,\n  File \"/usr/bin/python3.9/lib/python3.9/site-packages/torch/onnx/__init__.py\", line 351, in export\n    return _compat.export_compat(\n  File \"/usr/bin/python3.9/lib/python3.9/site-packages/torch/onnx/_internal/e",
    "url": "https://github.com/pytorch/pytorch/issues/147374",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2025-02-18T12:11:20Z",
    "updated_at": "2025-02-19T22:57:49Z",
    "user": "zzq96"
  },
  {
    "repo": "pytorch/xla",
    "number": 8715,
    "title": "Pytorch XLA XMP Spawn Error",
    "body": "## \ud83d\udc1b Bug\n\n<!-- A clear and concise description of what the bug is. -->\n\nI'm currently trying to run a very simple example of just calling \"Hello World\" from each TPU. I'm currently running based on the torch xla versions on the vllm-tpu docker\n\n## To Reproduce\n\n<!--\nIt is really important for the team to have a quick repro, which requires no setup work.\n\nThe quicker is the repro to be run, the higher the chances the bug will be addressed sooner.\n\nThe best way to create quick repros is to create a Colab based on the following template:\n\nhttps://github.com/pytorch/xla/blob/master/TROUBLESHOOTING.md#using-debug_runpy-to-collect-debug-information\n\nThings to avoid in repros is the need to download datasets which require setting up keys or other login information, like Kaggle downloads for example.\n\nAnother example are Colab which mount user's Google Drive storages.\n\nUsing a fake data generator could be a solution, in case the dataset cannot be easily downloaded without setting up credentials:\n\nhttps://github.com/pytorch/xla/blob/784b4d4f21751a54be0029a95f47d3896561c2a9/test/test_train_mp_mnist.py#L65\n\n-->\n\nSteps to reproduce the behavior:\n\n1. Run the docker image for vllm-tpu: https://hub.docker.com/r/vllm/vllm-tpu/tags\n\nRun code:\n```\nimport ray\nimport torch_xla.core.xla_model as xm\nimport torch_xla.distributed.xla_multiprocessing as xmp\n\ndef train_mp(rank):\n    # Get XLA device\n    device = xm.xla_device()\n    print(f\"Hello from rank {rank} on device {device}\")\n\n@ray.remote(num_cpus=10, resources={\"TPU\": 8, \"TPU-v6e-8-head\": 1})\ndef run_on_tpu():\n    # Spawn 8 processes, one for each TPU core\n    xmp.spawn(train_mp, nprocs=8)\n    \nif __name__ == \"__main__\":\n    future = run_on_tpu.remote()\n    ray.get(future)\n```\n\nError:\n```\n(pid=3030, ip=10.202.15.237) WARNING:root:libtpu.so and TPU device found. Setting PJRT_DEVICE=TPU.\nTraceback (most recent call last):\n  File \"/tmp/ray/session_2025-02-17_21-04-51_192242_540/runtime_resources/working_dir_files/_ray_pkg_b1a1e85c76a92463/experiments/test_xla_infer.py\", line 17, in <module>\n    ray.get(future)\n  File \"/home/ray/anaconda3/lib/python3.10/site-packages/ray/_private/auto_init_hook.py\", line 21, in auto_init_wrapper\n    return fn(*args, **kwargs)\n  File \"/home/ray/anaconda3/lib/python3.10/site-packages/ray/_private/client_mode_hook.py\", line 103, in wrapper\n    return func(*args, **kwargs)\n  File \"/home/ray/anaconda3/lib/python3.10/site-packages/ray/_private/worker.py\", line 2691, in get\n    values, debugger_breakpoint = worker.get_objects(object_refs, timeout=timeout)\n  File \"/home/ray/anaconda3/lib/python3.10/site-packages/ray/_private/worker.py\", line 871, in get_objects\n    raise value.as_instanceof_cause()\nray.exceptions.RayTaskError(ValueError): ray::run_on_tpu() (pid=3030, ip=10.202.15.237)\n  File \"/tmp/ray/session_2025-02-17_21-04-51_192242_540/runtime_resources/working_dir_files/_ray_pkg_b1a1e85c76a92463/experiments/test_xla_infer.py\", line 13, in run_on_tpu\n    xmp.spawn(train_mp, nprocs=8)\n  File \"/home/ray/anaconda3/lib/python3.10/site-packages/torch_xla/distributed/xla_multiprocessing.py\", line 39, in spawn\n    return pjrt.spawn(fn, nprocs, start_method, args)\n  File \"/home/ray/anaconda3/lib/python3.10/site-packages/torch_xla/_internal/pjrt.py\", line 209, in spawn\n    raise ValueError(\nValueError: Unsupported nprocs (8). Please use the environment variable for the hardware you are using (X_NUM_DEVICES where X is CPU, GPU, TPU, NEURONCORE, etc).\n```\n\nI've tried some things such as setting `TPU_NUM_DEVICES` in the environment variables to 8 but that didn't help.\n\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well. Or better use the Colab template: https://github.com/pytorch/xla/blob/master/contrib/colab/issue-report.ipynb -->\n\n## Expected behavior\n\n<!-- A clear and concise description of what you expected to happen. -->\n\nI would expect a Hello world from each of the devices\n\n## Environment\n\n - Reproducible on XLA backend [CPU/TPU/CUDA]: TPU\n - torch_xla version: \n```\nUsing torch_xla version: 2.6.0+git39e67b5\n```\n\n## Additional context\n\n<!-- Add any other context about the problem here. -->\n",
    "url": "https://github.com/pytorch/xla/issues/8715",
    "state": "closed",
    "labels": [
      "distributed"
    ],
    "created_at": "2025-02-18T06:29:06Z",
    "updated_at": "2025-02-20T18:59:56Z",
    "comments": 3,
    "user": "BabyChouSr"
  },
  {
    "repo": "pytorch/ao",
    "number": 1724,
    "title": "[Question] Static Quantization for Open-Source LLMs",
    "body": "## Description\nHi, I am a beginner in quantization and would like to experiment with INT8 dynamic and static quantization on open-source LLMs.\n\n* For dynamic quantization, I found that `int8_dynamic_activation_int8_weight` is available in `torchao/quantization/quant_api.py`.\n* For static quantization, I did not find an INT8 version. Instead, I only found `float8_static_activation_float8_weight`.\n\n## Questions\n* Why is only INT8 dynamic quantization provided? Is there a specific concern that prevents static INT8 quantization?\n* If I want to implement INT8 static quantization, can I follow `tutorials/calibration_flow/static_quant.py` as a reference?\n* For `float8_static_activation_float8_weight`, it requires a scalar parameter. What would be a recommended way to determine this parameter?\n\nAny insights or guidance would be greatly appreciated. Thanks in advance! \ud83d\ude0a",
    "url": "https://github.com/pytorch/ao/issues/1724",
    "state": "open",
    "labels": [
      "question",
      "quantize_"
    ],
    "created_at": "2025-02-18T02:32:20Z",
    "updated_at": "2025-02-19T13:13:44Z",
    "user": "yang-ahuan"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 741,
    "title": "Inquiry on Implementing NoMaD Model (Transformers and Diffusion Policy)",
    "body": "I am planning to implement the NoMaD model, which combines Transformers and Diffusion Policy, within the LeRobot project. Before proceeding, I wanted to check if anyone else is currently working on or has already started implementing this model.\n\nFor reference, here are the relevant resources:\n\nWebsite: https://general-navigation-models.github.io/nomad/\nPaper: https://arxiv.org/pdf/2310.07896\n\nPlease let me know if there is ongoing work related to this model or if anyone is interested in collaborating.",
    "url": "https://github.com/huggingface/lerobot/issues/741",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2025-02-17T19:57:23Z",
    "updated_at": "2025-10-08T20:56:42Z",
    "user": "vaishanth-rmrj"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 852,
    "title": "How to define Custom Communication Operations for Custom Operators in Distributed Settings",
    "body": "Thank you for your awesome project. I would like to ask how to solve the following issue: \n\nI have implemented the logcumsumexp operator, where the input placement is Shard(-1) and the output placement is Replicate(). To obtain the final result, I need to create a custom all-reduce operator (instead of using the conventional sum). How should I go about implementing this? \n\nMore generally, for an operator function `f`, given an input placement1 and an output placement2, where should I implement various custom communication operations? I would greatly appreciate it if you could provide some examples for this.",
    "url": "https://github.com/pytorch/torchtitan/issues/852",
    "state": "closed",
    "labels": [
      "question",
      "module: dtensor"
    ],
    "created_at": "2025-02-17T16:49:25Z",
    "updated_at": "2025-08-21T03:07:29Z",
    "user": "Doraemonzzz"
  },
  {
    "repo": "pytorch/serve",
    "number": 3392,
    "title": "How to run the benchmark scripts on the local model ?",
    "body": "How to run the benchmark scripts on the local model ?\n\nI tried following but it fails with `ModelNotFoundException`\npython benchmark_ab.py --config benchmark_config.json\n```\n{\n    \"url\": \"./model_store/custom_model.mar\",\n    \"requests\": 100,\n    \"concurrency\": 10,\n    \"input\": \"kitten_small.jpg\",\n    \"exec_env\": \"local\",\n    \"device\": \"cpu\"\n  }\n```\n  ",
    "url": "https://github.com/pytorch/serve/issues/3392",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-17T14:16:47Z",
    "updated_at": "2025-02-17T14:53:01Z",
    "user": "ranipakeyur"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 850,
    "title": "\"Universal\" Checkpointing",
    "body": "Is there an equivalent of Deepspeed [Universal Checkpointing](https://github.com/deepspeedai/DeepSpeed/blob/master/blogs/deepspeed-ucp/README.md) currently for distributed checkpointing, DTensor and FSDP2?  That is, how to use torch-native tooling to convert from a checkpoint with a given sharded / parallelism config to a new config such that the sharded state dicts can be directly loaded with a new world size.\n\nFor example, train a model on 128 GPUs with `FSDP` (`DP128`) and save a checkpoint with 128 sharded state dicts.  Resume training on 64 GPUs with `TP2` / `FSDP` (`DP32`).  \n\nManually, one could merge the original checkpoint from 128 shards -> single merged state dict, then reshard to `TP2` followed by partitioning `TP` shards to 32 `DP` partitions for a total of 64 sharded state dicts, then directly load these state dicts on each rank (without having to first materialize the full state dict on any rank).\n\n@awgu ",
    "url": "https://github.com/pytorch/torchtitan/issues/850",
    "state": "closed",
    "labels": [
      "question",
      "module: checkpoint"
    ],
    "created_at": "2025-02-17T12:32:39Z",
    "updated_at": "2025-06-05T06:28:04Z",
    "user": "jeromeku"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 738,
    "title": "convert simulation data of insertion from v1 to v2",
    "body": "I cannot convert using the file (datasets/v2/convert_dataset_v1_to_v2.py) which requires robotconfig which I don't have\n\nI just want to convert your data on lerobot/act_aloha_sim_transfer_cube_human",
    "url": "https://github.com/huggingface/lerobot/issues/738",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2025-02-17T11:00:38Z",
    "updated_at": "2025-10-08T08:59:52Z",
    "user": "AbdElrahmanMostafaRifaat1432"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 340,
    "title": "About the data using in sft,  how to set SFTConfig.dataset_text_field?",
    "body": "how to use the HuggingFaceH4/Bespoke-Stratos-17k in sft.\n\nI find there are two items in the data, \"system\" and \"conversations\". So, when I download this data and to finetune a LLM such as Qwen2.5-1.5B-Instruct, how to organize the data,  in trl SFTConfig has a default parameter named dataset_text_field, it's default value is \"text\" which is not exists in such data, I mean Bespoke-Stratos-17k .",
    "url": "https://github.com/huggingface/open-r1/issues/340",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-17T07:06:14Z",
    "updated_at": "2025-02-20T08:59:49Z",
    "user": "ItGirls"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 264,
    "title": "How to set --precompute_conditions for CogvideoI2V training?",
    "body": "cause i don't find this feature in Image2Video training.\ndoes it exist?",
    "url": "https://github.com/huggingface/finetrainers/issues/264",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-17T06:00:50Z",
    "updated_at": "2025-03-05T03:49:05Z",
    "user": "BlackTea-c"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10805,
    "title": "is there inpainiting dataset and parameters example provided for xl training?",
    "body": "**What API design would you like to have changed or added to the library? Why?**\n\n**What use case would this enable or better enable? Can you give us a code example?**\n\nHi patil-suraj @patil-suraj , appreciated for the convenient script ! Is there any code example and dataset example to run the script: https://github.com/huggingface/diffusers/blob/inpainting-script/examples/inpainting/train_inpainting_sdxl.py ?",
    "url": "https://github.com/huggingface/diffusers/issues/10805",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-17T01:56:14Z",
    "updated_at": "2025-02-17T02:03:09Z",
    "comments": 2,
    "user": "fire2323"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 109,
    "title": "Info request: How to update individual points in splat?",
    "body": "I would like to update position of individual points dynamically in order to create animations and effects.\nWhat would be the optimal way to do it?\n",
    "url": "https://github.com/huggingface/gsplat.js/issues/109",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-16T18:11:14Z",
    "updated_at": "2025-02-16T18:43:23Z",
    "user": "sjovanovic"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10803,
    "title": "SANARubber a flexible version of SANA with i2i and multidiffusion/regional diffusion",
    "body": "### Model/Pipeline/Scheduler description\n\nI made a pipeline that is as reliable as the basic SANA pipeline but more flexible by making it run an array of functions which runs everything the og pipeline does. this can make easy combinations if necessary. \n\nhere's the link, enjoy\nhttps://github.com/alexblattner/SANARubber\n\nexample of multidiffusion in sana:\n['bright moon','red','blue','green','black'] (first prompt is applied in the background\n[\"0:0-512:512\",\"512:0-1024:512\",\"512:1024-1024:1024\",\"0:512-512:1024\"] those are the areas of the rest of the prompts\n[.7,.7,.7,.7] those are the strengths of the areas applied with their prompts\n\n![Image](https://github.com/user-attachments/assets/98e207f5-a229-4a91-9349-6824095bc50c)\n\nagain with i2i at stength .5 and the same settings as before (mild changes only):\n\n![Image](https://github.com/user-attachments/assets/65329495-ea25-42e4-b8f7-d4fbc4be8a19)\n\n\n\nENJOY!\n\n### Open source status\n\n- [x] The model implementation is available.\n- [ ] The model weights are available (Only relevant if addition is not a scheduler).\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/10803",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-02-16T15:08:11Z",
    "updated_at": "2025-03-19T15:03:31Z",
    "comments": 1,
    "user": "alexblattner"
  },
  {
    "repo": "huggingface/candle",
    "number": 2774,
    "title": "Dumb Question: How to do forward hooks ?",
    "body": "For example I want to extract activations of intermediate layers. How do I register forward hooks similar to PyTorch or is there a similar/comparable paradigm in candle for this ?",
    "url": "https://github.com/huggingface/candle/issues/2774",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-16T12:41:26Z",
    "updated_at": "2025-02-16T12:41:26Z",
    "user": "pzdkn"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10799,
    "title": "Effective region mask for controlnet",
    "body": "Hi, I just want to ask is there any way to use controlnet with mask like [this](https://github.com/Mikubill/sd-webui-controlnet/discussions/2831)\n\nAs you know comfyui, webui support effective region (mask for controlnet affect).\nBut I can't find how to do this with diffusers.",
    "url": "https://github.com/huggingface/diffusers/issues/10799",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2025-02-15T17:42:20Z",
    "updated_at": "2025-04-03T04:01:37Z",
    "comments": 8,
    "user": "Suprhimp"
  },
  {
    "repo": "huggingface/swift-coreml-diffusers",
    "number": 102,
    "title": "Question: how to use in my own swift project for inference?",
    "body": "How would I run diffusers on device on all apple devices in my swift Xcode project?",
    "url": "https://github.com/huggingface/swift-coreml-diffusers/issues/102",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-15T15:56:36Z",
    "updated_at": "2025-02-15T15:56:36Z",
    "user": "SpyC0der77"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 147263,
    "title": "How to trigger several independent communications simultaneously?",
    "body": "For example, in training with 4 GPUs, I divide the GPUs into pairs and create two communication groups: group1 = dist.new_group([0, 1]) and group2 = dist.new_group([2, 3]). If I want to run independent dist.all_gather operations within both communication groups simultaneously, it results in an error. I'd like to ask how to implement this correctly.\n\n```\nFile \"/home/yeleyi/anaconda3/envs/torch/lib/python3.10/site-packages/deepspeed/comm/torch.py\", line 209, in all_gather\n    return torch.distributed.all_gather(tensor_list=tensor_list, tensor=tensor, group=group, async_op=async_op)\n  File \"/home/yeleyi/anaconda3/envs/torch/lib/python3.10/site-packages/torch/distributed/c10d_logger.py\", line 72, in wrapper\n    return func(*args, **kwargs)\n  File \"/home/yeleyi/anaconda3/envs/torch/lib/python3.10/site-packages/torch/distributed/distributed_c10d.py\", line 2617, in all_gather\n    work = group.allgather([tensor_list], [tensor])\ntorch.distributed.DistBackendError: NCCL error in: ../torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:1691, unhandled system error (run with NCCL_DEBUG=INFO for details), NCCL version 2.19.3\nncclSystemError: System call (e.g. socket, malloc) or external library call failed or device error. \nLast error:\nsocketStartConnect: Connect to 192.168.1.91<48217> failed : Software caused connection abort\nnode06:1913795:1914481 [2] NCCL INFO Setting affinity for GPU 2 to 0fffff,ff000000,0fffffff\nnode06:1913796:1914482 [3] NCCL INFO Setting affinity for GPU 3 to 0fffff,ff000000,0fffffff\nnode06:1913795:1914481 [2] NCCL INFO Channel 00/04 :    0   1\nnode06:1913795:1914481 [2] NCCL INFO Channel 01/04 :    0   1\nnode06:1913795:1914481 [2] NCCL INFO Channel 02/04 :    0   1\nnode06:1913795:1914481 [2] NCCL INFO Channel 03/04 :    0   1\nnode06:1913795:1914481 [2] NCCL INFO Trees [0] 1/-1/-1->0->-1 [1] -1/-1/-1->0->1 [2] 1/-1/-1->0->-1 [3] -1/-1/-1->0->1\nnode06:1913795:1914481 [2] NCCL INFO P2P Chunksize set to 131072\nnode06:1913796:1914482 [3] NCCL INFO Trees [0] -1/-1/-1->1->0 [1] 0/-1/-1->1->-1 [2] -1/-1/-1->1->0 [3] 0/-1/-1->1->-1\nnode06:1913796:1914482 [3] NCCL INFO P2P Chunksize set to 131072\nnode06:1913795:1914481 [2] NCCL INFO Channel 00/0 : 0[2] -> 1[3] via P2P/CUMEM\nnode06:1913796:1914482 [3] NCCL INFO Channel 00/0 : 1[3] -> 0[2] via P2P/CUMEM\nnode06:1913795:1914481 [2] NCCL INFO Channel 01/0 : 0[2] -> 1[3] via P2P/CUMEM\nnode06:1913796:1914482 [3] NCCL INFO Channel 01/0 : 1[3] -> 0[2] via P2P/CUMEM\nnode06:1913795:1914481 [2] NCCL INFO Channel 02/0 : 0[2] -> 1[3] via P2P/CUMEM\nnode06:1913796:1914482 [3] NCCL INFO Channel 02/0 : 1[3] -> 0[2] via P2P/CUMEM\nnode06:1913795:1914481 [2] NCCL INFO Channel 03/0 : 0[2] -> 1[3] via P2P/CUMEM\nnode06:1913796:1914482 [3] NCCL INFO Channel 03/0 : 1[3] -> 0[2] via P2P/CUMEM\nnode06:1913796:1914482 [3] NCCL INFO Connected all rings\nnode06:1913796:1914482 [3] NCCL INFO Connected all trees\nnode06:1913796:1914482 [3] NCCL INFO threadThresholds 8/8/64 | 16/8/64 | 512 | 512\nnode06:1913795:1914481 [2] NCCL INFO Connected all rings\nnode06:1913796:1914482 [3] NCCL INFO 4 coll channels, 0 nvls channels, 4 p2p channels, 2 p2p channels per peer\nnode06:1913795:1914481 [2] NCCL INFO Connected all trees\nnode06:1913795:1914481 [2] NCCL INFO threadThresholds 8/8/64 | 16/8/64 | 512 | 512\nnode06:1913795:1914481 [2] NCCL INFO 4 coll channels, 0 nvls channels, 4 p2p channels, 2 p2p channels per peer\nnode06:1913795:1914481 [2] NCCL INFO comm 0x1a9590b0 rank 0 nranks 2 cudaDev 2 nvmlDev 2 busId 6c000 commId 0xdd736563a6f28c07 - Init COMPLETE\nnode06:1913796:1914482 [3] NCCL INFO comm 0x1931a220 rank 1 nranks 2 cudaDev 3 nvmlDev 3 busId 6d000 commId 0xdd736563a6f28c07 - Init COMPLETE\n```\n\ncc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o",
    "url": "https://github.com/pytorch/pytorch/issues/147263",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "triaged"
    ],
    "created_at": "2025-02-15T11:47:10Z",
    "updated_at": "2025-04-23T20:54:39Z",
    "user": "Ind1x1"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1194,
    "title": "How do I know which ONNX transformation models are available? (Errors when loading models with CDN)",
    "body": "### Question\n\nI am using a CDN to load the models, as shown in the code below. \nI filtered the models in HuggingFace the way you recommend (text-generation, transformers.js) and put the id of the model I looked up. As I understand it, to change the model, I only need to change the model id. \nHowever, I get an error for each of the below models.\n\n`Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'model')`\n\n- **HuggingFaceTB/SmolLM2-135M-Instruct**\n- **Xenova/codegen-350M-mono**\n...\n\n`Uncaught (in promise) Error: Can't create a session. ERROR_CODE: 1, ERROR_MESSAGE: Deserialize tensor model.layers.4.mlp.gate_proj.MatMul.weight_Q4 failed.Failed to load external data file \"\"model_q4f16.onnx_data\"\", error: Module.MountedFiles is not available.`\n\n- **onnx-community/Phi-3.5-mini-instruct-onnx-web**\n...\n\nI'm ultimately saying that I don't know what model will be available.\nAdditionally, I was wondering if there is a way to know 'in advance' which 'dtype' and 'device' can be supported.\n\n```\n  import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.3.3';\n\n    generator = await pipeline('text-generation', 'onnx-community/DeepSeek-R1-Distill-Qwen-1.5B-ONNX', {\n      dtype: \"auto\",\n      device: \"auto\",\n    });\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/1194",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-15T10:31:32Z",
    "updated_at": "2025-02-16T14:02:08Z",
    "user": "mz-imhj"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 333,
    "title": "how to use tensorboard instead of wandb\uff1f",
    "body": "",
    "url": "https://github.com/huggingface/open-r1/issues/333",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-15T08:00:06Z",
    "updated_at": "2025-02-15T08:02:35Z",
    "user": "ngrxmu"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10796,
    "title": "Docs for HunyuanVideo LoRA?",
    "body": "### Describe the bug\n\nAs it seems like LoRA loading on HunyuanVideo has been implemented, I wonder where I can find the docs on this? Are they missing?\n\n### Reproduction\n\nSearch for HunyuanVideo and LoRA\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nAs it is the online docs...\n\n### Who can help?\n\n@stevhliu @sayakpaul ",
    "url": "https://github.com/huggingface/diffusers/issues/10796",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2025-02-15T04:31:34Z",
    "updated_at": "2025-06-10T20:52:28Z",
    "comments": 9,
    "user": "tin2tin"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 328,
    "title": "How to set generation sampling parameters?",
    "body": "Need to use deepseek reference settings of temperature=0.6, top_p=0.95. \n\nGreedy sampling does poorly on AIME:\n\n## r1-1.5B\n- AIME24: 23.33%\n\nTried to refer to lighteval docs and ran into issues using model config:\n```\nmodel: # Model specific parameters\n  base_params:\n    model_args: \"pretrained=Qwen/Qwen2.5-7B-Instruct,dtype=bfloat16,max_model_length=768,gpu_memory_utilisation=0.7\" # Model args that you would pass in the command line\n  generation: # Generation specific parameters\n    temperature: 1.0\n    stop_tokens: null\n    truncate_prompt: false\n```\n\nrun with:\n```\nTASK=aime24 lighteval vllm \\\n    \"config.yaml\" \\\n    \"custom|$TASK|0|0\" \\\n    --custom-tasks tasks.py \\\n    --use-chat-template \\\n    --output-dir ./results/\n```\n\nhitting:\n```\nTypeError: expected str, bytes or os.PathLike object, not dict\n```\n\n[ref](https://github.com/huggingface/lighteval/issues/563)",
    "url": "https://github.com/huggingface/open-r1/issues/328",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-14T21:42:28Z",
    "updated_at": "2025-02-20T03:28:53Z",
    "user": "rawsh"
  },
  {
    "repo": "pytorch/xla",
    "number": 8710,
    "title": "Expand troubleshoot instructions",
    "body": "## \ud83d\udcda Documentation\n\nExpand troubleshoot instructions in https://github.com/pytorch/xla/blob/6f423d0bb284190cf1b12d8a943a334e57b4df28/docs/source/learn/troubleshoot.md to include common errors, and new debugging strategies.",
    "url": "https://github.com/pytorch/xla/issues/8710",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-02-14T18:54:01Z",
    "updated_at": "2025-02-14T18:54:22Z",
    "comments": 0,
    "user": "pgmoka"
  },
  {
    "repo": "pytorch/xla",
    "number": 8709,
    "title": "Add more info to TPU_TOPOLOGY errors",
    "body": "## \ud83d\udcda Documentation\n\nCurrently if a VM is created utilizing an OS that does not support training on the TPU we get a TPU_TOPOLOGY OS error. We should add to our documentation to make these errors, and their solutions clearer.",
    "url": "https://github.com/pytorch/xla/issues/8709",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2025-02-14T18:49:40Z",
    "updated_at": "2025-02-14T18:49:40Z",
    "comments": 0,
    "user": "pgmoka"
  },
  {
    "repo": "pytorch/vision",
    "number": 8905,
    "title": "Can the `_make_divisible_function` be explained better?",
    "body": "### \ud83d\udcda The doc issue\n\nI'm referring to the following function: https://github.com/pytorch/vision/blob/main/torchvision/models/_utils.py#L76 I've no doubt  that it is correct, but why does it sometimes round down the input and why is the threshold set to 90%? Is the formula from a well-known paper?\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/8905",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-14T17:16:42Z",
    "updated_at": "2025-02-14T17:37:01Z",
    "comments": 1,
    "user": "bjourne"
  },
  {
    "repo": "huggingface/trl",
    "number": 2864,
    "title": "How to train GPRO on 2 GPUs, one for training, one for vllm",
    "body": "### Reproduction\n\nWhen I use `Qwen2.5-3B-instruct` to train GRPO, the device for vllm always appear OOM when loading weights. II used two GPUs with 32GB of memory, one device for training, another for vllm. I dont know why a 3B model using so much memory on `device 1`\n\n![Image](https://github.com/user-attachments/assets/79dfd03c-d123-496d-9fcc-07afc3027dff)\n\narguments settings:\n```yaml\nper_device_train_batch_size: 8\ngradient_accumulation_steps: 8\nnum_generations: 8\nuse_vllm: true\nvllm_gpu_memory_utilization: 0.8\nuse_peft: true\nlora_r: 64\nlora_alpha: 64\nload_in_4bit: true\nuse_bnb_nested_quant: true\nattn_implementation: flash_attention_2\nbf16: true\n...\n```\n\nStart command:\n```shell\nexport CUDA_VISIBLE_DEVICES=0,1\naccelerate launch --num_processes 1 train_Datawhale-R1.py --config Datawhale-R1.yaml\n```\n\n### System Info\n\n- Platform: Linux-5.15.0-78-generic-x86_64-with-glibc2.35\n- Python version: 3.10.8\n- PyTorch version: 2.5.1\n- CUDA device(s): NVIDIA vGPU-32GB, NVIDIA vGPU-32GB\n- Transformers version: 4.48.3\n- Accelerate version: 1.3.0\n- Accelerate config: not found\n- Datasets version: 3.1.0\n- HF Hub version: 0.27.0\n- TRL version: 0.16.0.dev0+ffcb9f4\n- bitsandbytes version: 0.45.2\n- DeepSpeed version: 0.16.3\n- Diffusers version: 0.32.2\n- Liger-Kernel version: not installed\n- LLM-Blender version: not installed\n- OpenAI version: 1.59.7\n- PEFT version: 0.14.0\n\n### Checklist\n\n- [x] I have checked that my issue isn't already filed (see [open issues](https://github.com/huggingface/trl/issues?q=is%3Aissue))\n- [x] I have included my system information\n- [x] Any code provided is minimal, complete, and reproducible ([more on MREs](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks))\n- [x] Any code provided is properly formatted in code blocks, (no screenshot, [more on code blocks](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks))\n- [x] Any traceback provided is complete",
    "url": "https://github.com/huggingface/trl/issues/2864",
    "state": "open",
    "labels": [
      "\u26a1 PEFT",
      "\u23f3 needs more info",
      "\u26a1accelerate",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-02-14T15:00:58Z",
    "updated_at": "2025-03-12T12:00:10Z",
    "user": "AIR-hl"
  },
  {
    "repo": "huggingface/peft",
    "number": 2377,
    "title": "Contributing new model merging method to PEFT",
    "body": "### Feature request\n\nHi all,\nI noticed that several model merging methods, such as TIES and DARE, have been implemented in this library, as mentioned [here](https://github.com/huggingface/peft/blob/main/docs/source/developer_guides/model_merging.md).\n\nI was wondering if there is a way for me to contribute a recently accepted model merging method to this repo.\n\nI would really appreciate any guidance or suggestions on how to proceed.\n\nThanks in advance!\n\n\n### Motivation\n\nEnhance the diversity of model merging supported in this library.\n\n### Your contribution\n\nI can submit a PR.",
    "url": "https://github.com/huggingface/peft/issues/2377",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-14T12:17:46Z",
    "updated_at": "2025-03-24T15:04:11Z",
    "comments": 2,
    "user": "SpeeeedLee"
  },
  {
    "repo": "pytorch/serve",
    "number": 3391,
    "title": "How can a user specify an envelope?",
    "body": "### \ud83d\udcda The doc issue\n\nThe `service_envelope` parameter has disappeared from the documentation:\nhttps://pytorch.org/serve/configuration.html#other-properties\n\nThe KServe documentation states that this parameter is depricated:\nhttps://kserve.github.io/website/0.11/modelserving/v1beta1/torchserve/#create-model-storage-with-a-model-archive-file-and-config\nand that `enable_envvars_config=true` should now be used instead.\n\nThe question arises how can the user now set the envelope type (`json/kserve/kservev2`) and where is the place in the code where it is defined?\nWhere is this shown in the documentation?\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/3391",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-14T07:24:11Z",
    "updated_at": "2025-02-14T07:24:11Z",
    "comments": 0,
    "user": "yurkoff-mv"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 147187,
    "title": "[torch.export] How to export a model with kv cache",
    "body": "### \ud83d\udc1b Describe the bug\n\nIn an attention layer, kv cache needs a variable number \"start_pos\" from outside.\n\n(may related to https://github.com/pytorch/pytorch/issues/146990)\n\nHere is a simplified model for reproducing the issue:\n\n```python\nimport torch\nfrom torch import nn\n\nclass Cache(nn.Module):\n    def __init__(self, head_dim):\n        super().__init__()\n        max_token = 128\n        self.register_buffer(\"cache_k\", torch.zeros(\n            (1, max_token, head_dim,)), persistent=False)\n\n    def forward(\n        self,\n        x: torch.Tensor,\n        start_pos: torch.Tensor\n    ):\n        _, seqlen, _ = x.size()\n        end_pos = start_pos+seqlen\n        self.cache_k[:, start_pos:end_pos, :] = x\n        return self.cache_k[:, :end_pos, :]\n\nif __name__ == \"__main__\":\n    from torch.export import Dim\n    with torch.no_grad():\n        # Prepare for input\n        start_pos =  torch.scalar_tensor(8, dtype=torch.int32)\n        seqlen = 8\n        hidden_size = 32\n        h = torch.randn(1, seqlen, hidden_size)\n        # Prepare for mdoel\n        model = Cache(hidden_size)\n        dynamic_shapes = {\"x\": {1: Dim.DYNAMIC},\"start_pos\": None}\n        torch.export.export(model, args=(h, start_pos), dynamic_shapes=dynamic_shapes)\n```\n\n\n```Error message\nException has occurred: Unsupported       (note: full exception trace is shown but execution is paused at: _run_module_as_main)\nDynamic slicing on data-dependent value is not supported\n\nfrom user code:\n   File \"/home/tim/nvpu_uno/nnc/tests/test_cache.py\", line 18, in forward\n    self.cache_k[:, start_pos:end_pos, :] = x\n\nSet TORCH_LOGS=\"+dynamo\" and TORCHDYNAMO_VERBOSE=1 for more information\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/exc.py\", line 317, in unimplemented\n    raise Unsupported(msg, case_name=case_name)\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/variables/lists.py\", line 923, in __init__\n    unimplemented(\"Dynamic slicing on data-dependent value is not supported\")\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py\", line 1873, in BUILD_SLICE\n    self.push(SliceVariable(items))\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py\", line 962, in step\n    self.dispatch_table[inst.opcode](self, inst)\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py\", line 1052, in run\n    while self.step():\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py\", line 2868, in run\n    super().run()\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py\", line 662, in transform\n    tracer.run()\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py\", line 231, in _fn\n    return fn(*args, **kwargs)\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/bytecode_transformation.py\", line 1361, in transform_code_object\n    transformations(instructions, code_options)\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py\", line 750, in _compile_inner\n    out_code = transform_code_object(code, transform)\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_utils_internal.py\", line 95, in wrapper_function\n    return function(*args, **kwargs)\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py\", line 715, in compile_inner\n    return _compile_inner(code, one_graph, hooks, transform)\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py\", line 986, in _compile\n    guarded_code = compile_inner(code, one_graph, hooks, transform)\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py\", line 547, in __call__\n    return _compile(\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py\", line 1380, in __call__\n    return self._torchdynamo_orig_callable(\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1750, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1739, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py\", line 574, in _fn\n    return fn(*args, **kwargs)\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1750, in _call_impl\n    return forward_call(*args, **kwargs)\n  File \"/home/tim/miniconda3/envs/torch2.5/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1739",
    "url": "https://github.com/pytorch/pytorch/issues/147187",
    "state": "open",
    "labels": [
      "oncall: pt2",
      "oncall: export"
    ],
    "created_at": "2025-02-14T06:15:41Z",
    "updated_at": "2025-02-18T19:20:39Z",
    "user": "exeex"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2189,
    "title": "PEFT to ONNX conversion",
    "body": "### System Info\n\n```shell\nHello! \nI have a fine-tuned LLM model from Hugging Face saved in PEFT format, and it\u2019s about 2.1 GB. When we convert it to ONNX, its size nearly doubles to about 4.1 GB. What causes this significant increase in model size after converting from PEFT to ONNX? Is there any bug under this conversion? ( Here is the code do this conversion. Need to mention: loading it in any commented formats will kill the accuracy). Thanks\n\nmodel = ORTModelForCausalLM.from_pretrained(\n            peft_path,\n            provider='OpenVINOExecutionProvider',\n            provider_options={'device_type': 'GPU_FP16'},\n            # use_cache=False,\n            #use_io_binding=False\n            export=True,\n            #load_in_4bit=True,\n            #load_in_8bit=True\n            #torch_dtype=torch.bfloat16,\n            #device_map=device,\n            #from_transformers=True\n        )\ntokenizer = AutoTokenizer.from_pretrained(peft_path)\nmodel.save_pretrained(onnex_path)\ntokenizer.save_pretrained(onnex_path)\n```\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nmodel = ORTModelForCausalLM.from_pretrained(\n            peft_path,\n            provider='OpenVINOExecutionProvider',\n            provider_options={'device_type': 'GPU_FP16'},\n            # use_cache=False,\n            #use_io_binding=False\n            export=True,\n            #load_in_4bit=True,\n            #load_in_8bit=True\n            #torch_dtype=torch.bfloat16,\n            #device_map=device,\n            #from_transformers=True\n        )\ntokenizer = AutoTokenizer.from_pretrained(peft_path)\nmodel.save_pretrained(onnex_path)\ntokenizer.save_pretrained(onnex_path)\n\n### Expected behavior\n\nI need to have the OONX model with at least the same size while not loosing accuracy performance.",
    "url": "https://github.com/huggingface/optimum/issues/2189",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2025-02-13T18:21:05Z",
    "updated_at": "2025-03-10T13:58:28Z",
    "comments": 2,
    "user": "morteza89"
  },
  {
    "repo": "pytorch/data",
    "number": 1442,
    "title": "what dataloader to use for torchdata.nodes nodes?",
    "body": "hi, thanks for reviving torchdata. i was able to move on to `0.10.1` for lots of my existing datapipes. it seems to work pretty nicely.\n\nquestion - am i supposed to use `torchdata.nodes.Loader` or `torchdata.stateful_dataloader.StatefulDataLoader` for my data nodes? or just `torch.utils.data.DataLoader`? i'm getting confused a bit after reading the docs and code. currently `Loader` works for my iterable data nodes, but with some caveats (no multi processing).\n",
    "url": "https://github.com/meta-pytorch/data/issues/1442",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-13T17:32:53Z",
    "updated_at": "2025-10-24T04:07:52Z",
    "comments": 16,
    "user": "keunwoochoi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 147076,
    "title": "How to check grads in each step of model?",
    "body": "Hi there:\n   I've implement a Pytorch version of [Retrieval-based-Voice-Conversion(RVC for short)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI) at [here](https://github.com/ElinLiu0/RVCTorch/blob/master/POC_Torch.ipynb).\n   The question is,when i wanna export my implementation pipeline into ONNX using below code:\n   ```python\n   with torch.inference_mode(), torch.cuda.amp.autocast(enabled=False):\n    torch.onnx.export(\n        pipeline, \n        (audio.cuda(),),\n        \"pipeline.onnx\",\n        input_names=[\"input\"],\n        output_names=[\"output\"],\n        opset_version=14\n    )\n  ```\nIt rasing below error:\n```python\nRuntimeError: Cannot insert a Tensor that requires grad as a constant. Consider making it a parameter or input, or detaching the gradient\nTensor:\n 0.6670\n[ torch.cuda.HalfTensor{1} ]\n```\n\nTypically rasing with an `nn.BatchNorm2d` cell called at [rmvpe.py](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/infer/lib/rmvpe.py) at line 244.\n\nSo how could i fix this error,since this implementation finally will deploy on C# or model serving platform like NVIDIA Triton.",
    "url": "https://github.com/pytorch/pytorch/issues/147076",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2025-02-13T09:01:49Z",
    "updated_at": "2025-02-20T07:56:31Z",
    "user": "ElinLiu0"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 113,
    "title": "Show how to use Inference Providers for inference",
    "body": "Can be helpful for students to explore different models easily.\n",
    "url": "https://github.com/huggingface/agents-course/issues/113",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-13T07:46:01Z",
    "updated_at": "2025-02-13T08:04:58Z",
    "user": "pcuenca"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 840,
    "title": "profiling",
    "body": "A few questions . \n\n1. Is it based on kineto or something else ?\n2. Only seeing CPU activities ( e.g. python)  - do I have to do anything  special to see GPU activities ? \n",
    "url": "https://github.com/pytorch/torchtitan/issues/840",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-13T01:27:00Z",
    "updated_at": "2025-02-20T19:55:53Z",
    "user": "githubsgi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 146990,
    "title": "How to export a model using topk with a variable number of neighbour?",
    "body": "### \ud83d\udc1b Describe the bug\n\nThe export is the following but that may not be the only one. That's the first raised one.\n\n``torch._dynamo.exc.UserError: Could not guard on data-dependent expression u7 >= 0 (unhinted: u7 >= 0).  (Size-like symbols: none)``\n\n```python\nimport contextlib\nimport io\nimport logging\nimport warnings\nfrom typing import Any, Dict, List, Optional\nimport numpy as np\nimport sklearn\nimport torch\n\n\ndef flatnonzero(x):\n    \"Similar to :func:`numpy.flatnonzero`\"\n    return torch.nonzero(torch.reshape(x, (-1,)), as_tuple=True)[0]\n\n\ndef _get_weights(dist, weights):\n    \"\"\"Get the weights from an array of distances and a parameter ``weights``.\n\n    Assume weights have already been validated.\n\n    Parameters\n    ----------\n    dist : ndarray\n        The input distances.\n\n    weights : {'uniform', 'distance'}, callable or None\n        The kind of weighting used.\n\n    Returns\n    -------\n    weights_arr : array of the same shape as ``dist``\n        If ``weights == 'uniform'``, then returns None.\n    \"\"\"\n    if weights in (None, \"uniform\"):\n        return None\n\n    if weights == \"distance\":\n        # if user attempts to classify a point that was zero distance from one\n        # or more training points, those training points are weighted as 1.0\n        # and the other points as 0.0\n        dist = 1.0 / dist\n        inf_mask = torch.isinf(dist)\n        inf_row = torch.any(inf_mask, axis=1)\n        dist[inf_row] = inf_mask[inf_row]\n        return dist\n\n    if callable(weights):\n        return weights(dist)\n\n\nclass NanEuclidean(torch.nn.Module):\n    \"\"\"Implements :func:`sklearn.metrics.nan_euclidean`.\"\"\"\n\n    def __init__(self, squared=False, copy=True):\n        super().__init__()\n        self.squared = squared\n        self.copy = copy\n\n    def forward(self, X, Y):\n        X = X.clone()\n        Y = Y.to(X.dtype).clone()\n\n        missing_X = torch.isnan(X)\n        missing_Y = torch.isnan(Y)\n\n        # set missing values to zero\n        X[missing_X] = 0\n        Y[missing_Y] = 0\n\n        # Adjust distances for missing values\n        XX = X * X\n        YY = Y * Y\n\n        distances = -2 * X @ Y.T + XX.sum(1, keepdim=True) + YY.sum(1, keepdim=True).T\n\n        distances -= XX @ missing_Y.to(X.dtype).T\n        distances -= missing_X.to(X.dtype) @ YY.T\n\n        distances = torch.clip(distances, 0, None)\n\n        present_X = 1 - missing_X.to(X.dtype)\n        present_Y = ~missing_Y\n        present_count = present_X @ present_Y.to(X.dtype).T\n        distances[present_count == 0] = torch.nan\n        # avoid divide by zero\n        present_count = torch.maximum(\n            torch.tensor([1], dtype=present_count.dtype), present_count\n        )\n        distances /= present_count\n        distances *= X.shape[1]\n\n        if not self.squared:\n            distances = distances.sqrt()\n\n        return distances\n\n\n# %%\n# Validation\n# ++++++++++\n\nmodel = NanEuclidean()\nX = torch.randn((5, 2))\nY = torch.randn((5, 2))\nfor i in range(5):\n    X[i, i % 2] = torch.nan\nfor i in range(4):\n    Y[i + 1, i % 2] = torch.nan\n\nd1 = sklearn.metrics.nan_euclidean_distances(X.numpy(), Y.numpy())\nd2 = model(X, Y)\n# print(f\"discrepancies: {max_diff(d1, d2)}\")\n\n\n# %%\n# torch implementation of KNNImputer\n# ==================================\n#\n# See :class:`sklearn.impute.KNNImputer`.\n# The code is split into several :class:`torch.nn.Module`\n# and refactored to avoid control flow.\n\n\ndef _get_mask(X, value_to_mask):\n    return torch.isnan(X)\n\n\nclass SubTopKIndices(torch.nn.Module):\n    def forward(self, x, k):\n        # torch does not like nans\n        xn = torch.nan_to_num(x, nan=1.0e10)\n        return torch.topk(xn, k, dim=1, largest=False, sorted=True).indices\n\n\nclass SubWeightMatrix(torch.nn.Module):\n    def __init__(self, weights):\n        super().__init__()\n        self.weights = weights\n\n    def forward(self, donors_dist):\n        weight_matrix = _get_weights(donors_dist, self.weights)\n        if weight_matrix is not None:\n            weight_matrix = weight_matrix.clone()\n            weight_matrix[torch.isnan(weight_matrix)] = 0.0\n        else:\n            weight_matrix = torch.ones_like(donors_dist)\n            weight_matrix[torch.isnan(donors_dist)] = 0.0\n        return weight_matrix\n\n\nclass SubDonorsIdx(torch.nn.Module):\n    def __init__(self):\n        super().__init__()\n        self._topk = SubTopKIndices()\n\n    def forward(self, dist_pot_donors, n_neighbors):\n        donors_idx = self._topk(dist_pot_donors, n_neighbors)\n        donors_dist = dist_pot_donors[torch.arange(donors_idx.shape[0])[:, None], donors_idx]\n        return donors_idx, donors_dist\n\n\nclass MakeNewWeights(torch.nn.Module):\n    def forward(self, donors_mask, donors, weight_matrix):\n        return donors_mask.to(donors.dtype) * weight_matrix.to(donors.dtype)\n\n\nclass CalcImpute(torch.nn.Module):\n    \"\"\"Implements :meth:`sklearn.impute.KNNImputer._calc_impute`.\"\"\"\n\n    def __init__(self, weights):\n        super().__init__()\n        self._weights = SubWeightMatrix(weights)\n      ",
    "url": "https://github.com/pytorch/pytorch/issues/146990",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "oncall: export"
    ],
    "created_at": "2025-02-12T16:02:20Z",
    "updated_at": "2025-02-26T17:45:40Z",
    "user": "xadupre"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 146977,
    "title": "How to install Torch version that supports RTX 5090 on Windows? - CUDA kernel errors might be asynchronously reported at some other API call",
    "body": "I have purchased RTX 5090 just to test AI apps\n\nCurrently getting this error on any app\n\nI need torch for Python 3.10 venv on Windows\n\nI am ok with installing nightly version etc just install command please\n\n```\nTraceback (most recent call last):\n  File \"E:\\trellis_v5\\TRELLIS\\app.py\", line 401, in <module>\n    pipeline = TrellisImageTo3DPipeline.from_pretrained(\"JeffreyXiang/TRELLIS-image-large\")\n  File \"E:\\trellis_v5\\TRELLIS\\trellis\\pipelines\\trellis_image_to_3d.py\", line 56, in from_pretrained\n    pipeline = super(TrellisImageTo3DPipeline, TrellisImageTo3DPipeline).from_pretrained(path)\n  File \"E:\\trellis_v5\\TRELLIS\\trellis\\pipelines\\base.py\", line 39, in from_pretrained\n    _models = {\n  File \"E:\\trellis_v5\\TRELLIS\\trellis\\pipelines\\base.py\", line 40, in <dictcomp>\n    k: models.from_pretrained(f\"{path}/{v}\")\n  File \"E:\\trellis_v5\\TRELLIS\\trellis\\models\\__init__.py\", line 59, in from_pretrained\n    model = __getattr__(config['name'])(**config['args'], **kwargs)\n  File \"E:\\trellis_v5\\TRELLIS\\trellis\\models\\structured_latent_vae\\decoder_mesh.py\", line 105, in __init__\n    self.mesh_extractor = SparseFeatures2Mesh(res=self.resolution*4, use_color=self.rep_config.get('use_color', False))\n  File \"E:\\trellis_v5\\TRELLIS\\trellis\\representations\\mesh\\cube2mesh.py\", line 68, in __init__\n    verts, cube = construct_dense_grid(self.res, self.device)\n  File \"E:\\trellis_v5\\TRELLIS\\trellis\\representations\\mesh\\utils_cube.py\", line 11, in construct_dense_grid\n    vertsid = torch.arange(res_v ** 3, device=device)\nRuntimeError: CUDA error: no kernel image is available for execution on the device\nCUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\nFor debugging consider passing CUDA_LAUNCH_BLOCKING=1\nCompile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n```\n\n\n\ncc @ezyang @gchanan @zou3519 @kadeng @msaroufim @malfet @seemethere @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex @ptrblck @eqy",
    "url": "https://github.com/pytorch/pytorch/issues/146977",
    "state": "closed",
    "labels": [
      "high priority",
      "needs reproduction",
      "module: build",
      "module: windows",
      "module: cuda",
      "triaged"
    ],
    "created_at": "2025-02-12T12:43:57Z",
    "updated_at": "2025-03-01T09:47:47Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "pytorch/xla",
    "number": 8702,
    "title": "Links misssing in CONTRIBUTING.md for Additional steps for GPU.",
    "body": "## \ud83d\udcda Documentation\n\n<!-- A clear and concise description of what content is an issue. -->\nI was visity CONTRIBUTING.md doc and try to build a GPU version, but in the part \"Additional steps for GPU\", the refer to guide link is missing.\n\n![Image](https://github.com/user-attachments/assets/2e43682c-96ff-4072-bffa-7283f23b80ad)",
    "url": "https://github.com/pytorch/xla/issues/8702",
    "state": "open",
    "labels": [
      "bug",
      "documentation"
    ],
    "created_at": "2025-02-12T07:50:41Z",
    "updated_at": "2025-02-17T13:40:39Z",
    "comments": 3,
    "user": "yinrun"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 718,
    "title": "Hand-Eye Calibration for LeRobot",
    "body": "Hello,\nI am starting a project where I plan to use LeRobot for pick-and-place tasks utilizing classical robotics and vision techniques. I am wondering if anyone has experience with performing hand-eye calibration for this robot.\nMy major concern is that the high-mounted camera is usually parallel to the arm, which may make it difficult for the camera to see the Aruco marker. Does anyone have any suggestions or insights on how to approach this?\nThank you!",
    "url": "https://github.com/huggingface/lerobot/issues/718",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2025-02-12T05:44:09Z",
    "updated_at": "2025-12-21T02:59:43Z",
    "user": "Akumar201"
  },
  {
    "repo": "huggingface/optimum-neuron",
    "number": 782,
    "title": "Docs on how to compile a pre-trained transformer",
    "body": "Hello,\n\nI am experimenting with Transformers and trying to run them on AWS Inferentia.\n\nI checked the official [docs](https://huggingface.co/docs/optimum-neuron/index) but I could not find a clear answer to my current problem.\n\nI currently have a customized model based on the [ALBERT transformer](https://huggingface.co/docs/transformers/en/model_doc/albert) that I fine-tuned and for which I exported the weights.\n\n```python\nfrom transformers import AlbertConfig, AlbertModel\nimport torch\n\nconfig_dict= {\n    \"vocab_size\": 178,\n    \"hidden_size\": 768,\n    \"num_attention_heads\": 12,\n    \"intermediate_size\": 2048,\n    \"max_position_embeddings\": 512,\n    \"num_hidden_layers\": 12,\n    \"dropout\": 0.1,\n}\n\nalbert_config = AlbertConfig(**config_dict)\nmodel = AlbertModel(albert_config)\n\nweights = torch.load(\"path/to/weights.pt\")\nmodel.load_state_dict(weights)\n```\n\nMy question is, how do I go from the model above to compiling it for AWS Inferentia using the `optimum-neuron` python library programmatically? I could not find documented examples or snippets for this use-case.",
    "url": "https://github.com/huggingface/optimum-neuron/issues/782",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2025-02-11T23:36:13Z",
    "updated_at": "2025-03-20T08:05:40Z",
    "user": "efemaer"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10772,
    "title": "Sana Controlnet Support",
    "body": "**Is your feature request related to a problem? Please describe.**\nThe first controlnet for Sana has appeared, so the feature is to add the sana controlnet to the diffusers pipeline https://github.com/NVlabs/Sana/blob/main/asset/docs/sana_controlnet.md\n\n**Describe the solution you'd like.**\nBe able to use the sana controlnet\n\n**Describe alternatives you've considered.**\nUsing the sana repo\n\n",
    "url": "https://github.com/huggingface/diffusers/issues/10772",
    "state": "closed",
    "labels": [
      "help wanted",
      "Good second issue",
      "contributions-welcome",
      "roadmap"
    ],
    "created_at": "2025-02-11T22:39:10Z",
    "updated_at": "2025-04-13T13:49:40Z",
    "comments": 5,
    "user": "jloveric"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 610,
    "title": "Is this normal? Im getting this a lot",
    "body": "Hey, is this normal? \n\n![Image](https://github.com/user-attachments/assets/8da7d739-10c4-4bd3-bc1d-78db00c707bd)\n\nalso, out: None is this ok as well??",
    "url": "https://github.com/huggingface/smolagents/issues/610",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-11T22:05:27Z",
    "updated_at": "2025-03-19T07:12:32Z",
    "user": "Mhdaw"
  },
  {
    "repo": "pytorch/ao",
    "number": 1701,
    "title": "Model size after quantization",
    "body": "Why is the size relationship of the model unreasonable after I use these three quantization methods on the same model?\n\n```Python\nfrom torchao.quantization import quantize_, int8_weight_only\nquantize_(new_model, int8_weight_only())\n\n\n# from torchao.quantization import quantize_, int8_dynamic_activation_int8_weight\n# quantize_(new_model, int8_dynamic_activation_int8_weight())\n\n\n# from torchao.quantization import int8_dynamic_activation_int4_weight\n# quantize_(new_model, int8_dynamic_activation_int4_weight())\n```\n\nthe result:\n```Shell\n20786584 Feb  5 13:46 a8w4SWaT.pte\n20373272 Feb  5 13:45 a8w8SWaT.pte\n29685120 Oct  5 13:12 pytorch_checkpoint.pth\n20262664 Feb  5 13:44 w8onlySWaT.pte\n```\n\nBecause theoretically, the model after using the A8W4 quantization method should be the smallest, but the actual results are different",
    "url": "https://github.com/pytorch/ao/issues/1701",
    "state": "open",
    "labels": [
      "question",
      "quantize_"
    ],
    "created_at": "2025-02-11T19:32:29Z",
    "updated_at": "2025-02-12T08:54:01Z",
    "user": "TaylorYangX"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 77,
    "title": "[QUESTION] Why am I able to select multiple options in Quick Quiz?",
    "body": "In quick quizzes as there is a single answer correct, shouldn't it be like only be able to choose a single option instead of being able select all at once to see correct answer?\n",
    "url": "https://github.com/huggingface/agents-course/issues/77",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-11T17:35:31Z",
    "updated_at": "2025-02-13T07:20:59Z",
    "user": "Devrajsinh-Gohil"
  },
  {
    "repo": "pytorch/ao",
    "number": 1699,
    "title": "[DOC] Questions on Integrating a New CPU Operator into TorchAO\uff1f",
    "body": "I'm working on integrating a **CPU operator** into TorchAO and have a few questions regarding the process:\n\n### How can I add a New **_CPU Operator_** in 'torchao/csrc':\n\n* What is the recommended approach for adding a new CPU operator in the 'csrc' directory?\n\n* Are there any specific guidelines or templates I should follow to ensure compatibility with the existing codebase?\n\n### How can I Remove or Disable current CUDA Operators:\n\n* How can I remove or disable all existing CUDA operators in the codebase?\n\n* Are there any configuration flags or build options that can be used to exclude CUDA-related code during compilation?\n\n### How can I Move Experimental MPS and CPU Code to TorchAO:\n\n* I noticed that there is experimental code for MPS and CPU in the repository (torchao/experimental/kernels'). What is the process for moving this code into the main TorchAO module?\n\n* Are there any specific considerations or steps I should follow to ensure a smooth transition?\n\nThank you for your help!\n\n",
    "url": "https://github.com/pytorch/ao/issues/1699",
    "state": "open",
    "labels": [
      "question",
      "cpu"
    ],
    "created_at": "2025-02-11T12:03:02Z",
    "updated_at": "2025-02-13T01:53:33Z",
    "user": "Zijie-Tian"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 146889,
    "title": "How to customize a torch.Tensor() method to access the underlying data structure of a PyTorch tensor.",
    "body": "### \ud83d\udc1b Describe the bug\n\n1. How to customize a torch.Tensor() method and call PyTorch's THPVariable_pynew function to obtain the underlying data structure of the original Tensor.\n\n![Image](https://github.com/user-attachments/assets/8228c07f-306b-4d7e-b162-f06e6ce7c7dc)\n\ntensor = torch.Tensor(3,4).to(\"new_one\") -> initModule()->Module.cpp->and run in \nhttps://github.com/pytorch/pytorch/blob/32f585d9346e316e554c8d9bf7548af9f62141fc/torch/csrc/autograd/python_variable.cpp#L1891\n\n2.This is my project: https://github.com/xiangxinhello/torch_new_tensor. My project is based on modifications of https://github.com/pytorch/pytorch/tree/v2.5.0/test/cpp_extensions/open_registration_extension, but I was unable to modify it successfully.\n\n3.I want to obtain the underlying data structure information of a PyTorch tensor through a custom torch.Tensor method.\n\n### Versions\n\nPyTorch version: 2.5.0a0+gita8d6afb\nIs debug build: True\nCUDA used to build PyTorch: 12.4\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 22.04.4 LTS (x86_64)\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version: 14.0.0-1ubuntu1.1\nCMake version: version 3.31.2\nLibc version: glibc-2.35\n\nPython version: 3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-5.15.0-125-generic-x86_64-with-glibc2.35\nIs CUDA available: True\nCUDA runtime version: 12.4.131\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 3090\nNvidia driver version: 550.120\ncuDNN version: Could not collect\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        46 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               96\nOn-line CPU(s) list:                  0-95\nVendor ID:                            GenuineIntel\nModel name:                           Intel(R) Xeon(R) Gold 6248R CPU @ 3.00GHz\nCPU family:                           6\nModel:                                85\nThread(s) per core:                   2\nCore(s) per socket:                   24\nSocket(s):                            2\nStepping:                             7\nCPU max MHz:                          4000.0000\nCPU min MHz:                          1200.0000\nBogoMIPS:                             6000.00\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke avx512_vnni md_clear flush_l1d arch_capabilities\nVirtualization:                       VT-x\nL1d cache:                            1.5 MiB (48 instances)\nL1i cache:                            1.5 MiB (48 instances)\nL2 cache:                             48 MiB (48 instances)\nL3 cache:                             71.5 MiB (2 instances)\nNUMA node(s):                         2\nNUMA node0 CPU(s):                    0-23,48-71\nNUMA node1 CPU(s):                    24-47,72-95\nVulnerability Gather data sampling:   Mitigation; Microcode\nVulnerability Itlb multihit:          KVM: Mitigation: VMX disabled\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Mitigation; Clear CPU buffers; SMT vulnerable\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Mitigation; Enhanced IBRS\nVulnerability Spec rstack overflow:   Not affected\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Mitigation; TSX disabled\n\nVersions of relevant libraries:\n[pip3] numpy==2.2.1\n[pip3] optree==0.13.1\n[pip3] torch==2.5.0a0+gita8d6afb\n[conda] magma-cuda121             2.6.1                         1    pytorch\n[conda] mkl-include ",
    "url": "https://github.com/pytorch/pytorch/issues/146889",
    "state": "open",
    "labels": [
      "triaged",
      "tensor subclass"
    ],
    "created_at": "2025-02-11T07:18:54Z",
    "updated_at": "2025-04-14T17:40:25Z",
    "user": "xiangxinhello"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 831,
    "title": "converging.md",
    "body": "In the [page](https://github.com/pytorch/torchtitan/blob/main/docs/converging.md) . Can someone please clarify the the following.\n\n1.  How many (dp) and what type of GPU was used for the [chart](https://github.com/pytorch/torchtitan/blob/main/docs/converging.md#test-results). \n2. What is FSDP 8 , 8 GPU's or FP 8 ?\n3. ",
    "url": "https://github.com/pytorch/torchtitan/issues/831",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-11T04:15:19Z",
    "updated_at": "2025-03-17T19:13:39Z",
    "user": "githubsgi"
  },
  {
    "repo": "huggingface/agents-course",
    "number": 66,
    "title": "[QUESTION] About the **Thought: Internal Reasoning and the Re-Act Approach** section of UNIT 1",
    "body": "I am a bit confused about the ReAct prompting example at the end of the **Thought: Internal Reasoning and the Re-Act Approach** section in Unit 1. The figure label describes it as an example of **ReAct**, but the image itself mentions \"Zero-shot CoT.\" Could you please take a look at this section and clarify? I would really appreciate your help!",
    "url": "https://github.com/huggingface/agents-course/issues/66",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-11T03:54:26Z",
    "updated_at": "2025-02-13T07:30:13Z",
    "user": "saidul-islam98"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7390,
    "title": "Re-add py.typed",
    "body": "### Feature request\n\nThe motivation for removing py.typed no longer seems to apply.  Would a solution like [this one](https://github.com/huggingface/huggingface_hub/pull/2752) work here?\n\n### Motivation\n\nMyPy support is broken.  As more type checkers come out, such as RedKnot, these may also be broken.  It would be good to be PEP 561 compliant as long as it's not too onerous.\n\n### Your contribution\n\nI can re-add py.typed, but I don't know how to make sur all of the `__all__` files are provided (although you may not need to with modern PyRight).",
    "url": "https://github.com/huggingface/datasets/issues/7390",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-02-10T22:12:52Z",
    "updated_at": "2025-08-10T00:51:17Z",
    "comments": 1,
    "user": "NeilGirdhar"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 828,
    "title": "Any optimized suggestions for fast save ema/model/optim and resume training from them all.",
    "body": "By using dcp.async_save, we can save the model and optimizer asynchronously, preventing them from blocking the training process. However, if I also want to save the EMA (Exponential Moving Average) model, the typical approach would be to create another async_save call for the EMA. According to the documentation, it's \"recommended to limit checkpoints to one asynchronous request at a time to avoid additional memory pressure per request\". Therefore, either the EMA or the model/optimizer must be saved synchronously, which can potentially block the main training process. If the model is large, saving the EMA first can incur significant overhead.\n\nCould you share any best practices for optimizing this save function to facilitate resuming training smoothly?",
    "url": "https://github.com/pytorch/torchtitan/issues/828",
    "state": "closed",
    "labels": [
      "question",
      "module: distributed_state_dict"
    ],
    "created_at": "2025-02-10T10:39:16Z",
    "updated_at": "2025-02-13T07:39:35Z",
    "user": "tangjiasheng"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 707,
    "title": "is there option to run on parallel gpu",
    "body": "I have 2 gpus 4090 I wonder if there is an option to run on parallel while finetuning the model\n\nI have found this parameter here \n\n![Image](https://github.com/user-attachments/assets/d88768fe-0c93-40cd-9301-30bfd60315a9)\n\nbut I don't actually understand what do you mean by mp\n\nso if there is option for parallel gpu please tell us about it",
    "url": "https://github.com/huggingface/lerobot/issues/707",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-10T09:34:13Z",
    "updated_at": "2025-05-14T20:51:43Z",
    "user": "AbdElrahmanMostafaRifaat1432"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 706,
    "title": "adapt_to_pi_aloha parameter",
    "body": "I am finetuning pi0 on a static aloha dataset and I found the following parameter : adapt_to_pi_aloha : false \nin /lerobot/common/policies/pi0/configuration_pi0.py \n\nbut when I set it to true the first loss increased from 0.17 to 4.7\n\nshould I set it to true or not knowing that I want the predicted actions to be in aloha space\n\n",
    "url": "https://github.com/huggingface/lerobot/issues/706",
    "state": "open",
    "labels": [
      "question",
      "configuration"
    ],
    "created_at": "2025-02-10T09:24:45Z",
    "updated_at": "2025-07-24T08:15:35Z",
    "user": "AbdElrahmanMostafaRifaat1432"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1708,
    "title": "Generation failed occur",
    "body": "when I ask model then get generation error \n\n![Image](https://github.com/user-attachments/assets/9cccfa87-09d6-48fb-b693-67b6ecffabd4)\n\nusing base model is llama3 -1b\n\nbelow code is my .env.local code \n\n![Image](https://github.com/user-attachments/assets/5cd50727-be1f-4081-ac80-e24fdb3e20dd)",
    "url": "https://github.com/huggingface/chat-ui/issues/1708",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2025-02-10T08:12:56Z",
    "updated_at": "2025-02-12T07:48:47Z",
    "comments": 5,
    "user": "mondayjowa"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 260,
    "title": "How to use tensor_parallel_size for vllm in GRPO?",
    "body": "GRPO use vllm to load reference model for data sampling , The limitation is that tensor parallel are not supported.\nWhat if the reference model is larger than One GPU can hold, for example, 72B with 40GB's H800,\n\nIs there any setting we can set the tensor_parallel_size for vllm params?\n\n```\n        if self.accelerator.is_main_process:\n                vllm_device = self.args.vllm_device\n                if vllm_device == \"auto\":\n                    vllm_device = f\"cuda:{self.accelerator.num_processes}\"  # take the next GPU idx\n                # Check that the requested device is available\n                if vllm_device.split(\":\")[0] == \"cuda\" and int(vllm_device.split(\":\")[1]) >= torch.cuda.device_count():\n                    raise ValueError(\n                        f\"The requested device for vllm ({vllm_device}) is not available. You are likely using vLLM \"\n                        \"without restricting the number of GPUs for training. Set the `--num_processes` argument to a \"\n                        \"value lower than the number of GPUs available on your machine\u2014typically, reducing it by one \"\n                        f\"is sufficient. In your case: `--num_processes {torch.cuda.device_count() - 1}`.\"\n                    )\n                # Check that the requested device is not also used for training\n                if vllm_device in {f\"cuda:{idx}\" for idx in range(self.accelerator.num_processes)}:\n                    warnings.warn(\n                        f\"The requested device {vllm_device} is also used for training. This may lead to unexpected \"\n                        \"behavior. It is recommended to use a dedicated device for vLLM.\"\n                    )\n                # vLLM is not compatible with accelerate. So we need to patch it to make sure we can (1) place the vLLM\n                # model on the desired device (world_size_patch) and (2) avoid a test that is not designed for our\n                # setting (profiling_patch).\n                world_size_patch = patch(\"torch.distributed.get_world_size\", return_value=1)\n                profiling_patch = patch(\n                    \"vllm.worker.worker.Worker._assert_memory_footprint_increased_during_profiling\", return_value=None\n                )\n                with world_size_patch, profiling_patch:\n                    self.llm = LLM(\n                        model=model.name_or_path,\n                        device=vllm_device,\n                        gpu_memory_utilization=self.args.vllm_gpu_memory_utilization,\n                        dtype=self.args.vllm_dtype,\n                        # Automatic Prefix Caching caches the KV cache of existing queries, so that a new query can\n                        # directly reuse the KV cache if it shares the same prefix with one of the existing queries.\n                        # This is particularly useful here because we generate completions from the same prompts.\n                        enable_prefix_caching=True,\n                        max_model_len=self.args.vllm_max_model_len,\n                    )\n                self.sampling_params = SamplingParams(\n                    temperature=args.temperature,\n                    max_tokens=self.max_completion_length,\n                )\n\n```",
    "url": "https://github.com/huggingface/open-r1/issues/260",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-10T07:17:07Z",
    "updated_at": "2025-02-20T12:21:15Z",
    "user": "bannima"
  },
  {
    "repo": "huggingface/trl",
    "number": 2814,
    "title": "How to use tensor_parallel_size for vllm reference in GRPO?",
    "body": "GRPO use vllm to load reference model for data sampling , The limitation is that tensor parallel are not supported.\nWhat if the reference model is larger than One GPU can hold, for example, 72B with 40GB's H800, \n\nIs there any setting we can set the tensor_parallel_size for vllm params?\n\n```\n        if self.accelerator.is_main_process:\n                vllm_device = self.args.vllm_device\n                if vllm_device == \"auto\":\n                    vllm_device = f\"cuda:{self.accelerator.num_processes}\"  # take the next GPU idx\n                # Check that the requested device is available\n                if vllm_device.split(\":\")[0] == \"cuda\" and int(vllm_device.split(\":\")[1]) >= torch.cuda.device_count():\n                    raise ValueError(\n                        f\"The requested device for vllm ({vllm_device}) is not available. You are likely using vLLM \"\n                        \"without restricting the number of GPUs for training. Set the `--num_processes` argument to a \"\n                        \"value lower than the number of GPUs available on your machine\u2014typically, reducing it by one \"\n                        f\"is sufficient. In your case: `--num_processes {torch.cuda.device_count() - 1}`.\"\n                    )\n                # Check that the requested device is not also used for training\n                if vllm_device in {f\"cuda:{idx}\" for idx in range(self.accelerator.num_processes)}:\n                    warnings.warn(\n                        f\"The requested device {vllm_device} is also used for training. This may lead to unexpected \"\n                        \"behavior. It is recommended to use a dedicated device for vLLM.\"\n                    )\n                # vLLM is not compatible with accelerate. So we need to patch it to make sure we can (1) place the vLLM\n                # model on the desired device (world_size_patch) and (2) avoid a test that is not designed for our\n                # setting (profiling_patch).\n                world_size_patch = patch(\"torch.distributed.get_world_size\", return_value=1)\n                profiling_patch = patch(\n                    \"vllm.worker.worker.Worker._assert_memory_footprint_increased_during_profiling\", return_value=None\n                )\n                with world_size_patch, profiling_patch:\n                    self.llm = LLM(\n                        model=model.name_or_path,\n                        device=vllm_device,\n                        gpu_memory_utilization=self.args.vllm_gpu_memory_utilization,\n                        dtype=self.args.vllm_dtype,\n                        # Automatic Prefix Caching caches the KV cache of existing queries, so that a new query can\n                        # directly reuse the KV cache if it shares the same prefix with one of the existing queries.\n                        # This is particularly useful here because we generate completions from the same prompts.\n                        enable_prefix_caching=True,\n                        max_model_len=self.args.vllm_max_model_len,\n                    )\n                self.sampling_params = SamplingParams(\n                    temperature=args.temperature,\n                    max_tokens=self.max_completion_length,\n                )```",
    "url": "https://github.com/huggingface/trl/issues/2814",
    "state": "open",
    "labels": [
      "\u26a1accelerate",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-02-10T07:09:47Z",
    "updated_at": "2025-03-04T11:40:13Z",
    "user": "bannima"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10755,
    "title": "Difference in Output When Using PIL.Image vs numpy.array for Image and Mask Input.",
    "body": "hi. \nI get different results when providing image and mask as input using PIL.Image versus numpy. array. Why does this happen?\nIs there an issue with my normalization method?\n\n| pillow | array |\n|---|---|\n| ![Image](https://github.com/user-attachments/assets/8e8a3af8-00cd-4675-93ce-b1c05eec4eb5) | ![Image](https://github.com/user-attachments/assets/25253b2a-9758-4a0f-8925-42e7a1558e50) |\n\n#### pillow code\n```python\nimage = Image.open(image_path).convert(\"RGB\")\nmask = Image.open(mask_path).convert(\"L\")\n\noutput_image = pipeline(\n    image=image,\n    mask_image=mask,\n    generator=torch.Generator(device=self.device).manual_seed(0),\n).images[0]\n\n```\n#### array code\n```python\nimage = Image.open(image_path).convert(\"RGB\")\nmask = Image.open(mask_path).convert(\"L\")\nimage_array = np.array(image) / 255.0\nmask_array = np.array(mask) / 255.0\n\noutput_image = pipeline(\n    image=image_array,\n    mask_image=mask_array,\n    generator=torch.Generator(device=self.device).manual_seed(0),\n).images[0]\n```\n",
    "url": "https://github.com/huggingface/diffusers/issues/10755",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-02-10T05:24:27Z",
    "updated_at": "2025-03-12T15:03:12Z",
    "comments": 2,
    "user": "purple-k"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7387,
    "title": "Dynamic adjusting dataloader sampling weight",
    "body": "Hi,\nThanks for your wonderful work! I'm wondering is there a way to dynamically adjust the sampling weight of each data in the dataset during training? Looking forward to your reply, thanks again.",
    "url": "https://github.com/huggingface/datasets/issues/7387",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-10T03:18:47Z",
    "updated_at": "2025-03-07T14:06:54Z",
    "comments": 3,
    "user": "whc688"
  },
  {
    "repo": "pytorch/audio",
    "number": 3879,
    "title": "How to use filtfilt() function?",
    "body": "I'm trying to move from scipy to torchaudio.\nHere is my code below:\n```python\nfrom torchaudio.functional.filtering import filtfilt\nfrom scipy import signal\n\nbh, ah = signal.butter(N=5, Wn=48, btype=\"high\", fs=16000)\n\naudio = sample_input\n\nprint(f\"Audio contains nan: {torch.isnan(torch.from_numpy(audio).float().to(torch.float64)).any()}\")\nprint(f\"Audio contains inf: {torch.isinf(torch.from_numpy(audio).float().to(torch.float64)).any()}\")\nprint(f\"Audio min: {torch.from_numpy(audio).float().to(torch.float64).min()}\")\nprint(f\"Audio max: {torch.from_numpy(audio).float().to(torch.float64).max()}\")\nprint(f\"Audio mean: {torch.from_numpy(audio).float().to(torch.float64).mean()}\")\nprint(f\"Audio shape: {torch.from_numpy(audio).float().to(torch.float64).shape}\")\n\nprint(f\"bh contains nan: {torch.isnan(torch.from_numpy(bh).float().to(torch.float64)).any()}\")\nprint(f\"bh contains inf: {torch.isinf(torch.from_numpy(bh).float().to(torch.float64)).any()}\")\nprint(f\"bh min: {torch.from_numpy(bh).float().to(torch.float64).min()}\")\nprint(f\"bh max: {torch.from_numpy(bh).float().to(torch.float64).max()}\")\nprint(f\"bh mean: {torch.from_numpy(bh).float().to(torch.float64).mean()}\")\nprint(f\"bh shape: {torch.from_numpy(bh).float().to(torch.float64).shape}\")\n\nprint(f\"ah contains nan: {torch.isnan(torch.from_numpy(ah).float().to(torch.float64)).any()}\")\nprint(f\"ah contains inf: {torch.isinf(torch.from_numpy(ah).float().to(torch.float64)).any()}\")\nprint(f\"ah min: {torch.from_numpy(ah).float().to(torch.float64).min()}\")\nprint(f\"ah max: {torch.from_numpy(ah).float().to(torch.float64).max()}\")\nprint(f\"ah mean: {torch.from_numpy(ah).float().to(torch.float64).mean()}\")\nprint(f\"ah shape: {torch.from_numpy(ah).float().to(torch.float64).shape}\")\n\n\naudio = filtfilt(\n    waveform=torch.from_numpy(audio).float().to(torch.float64),\n    a_coeffs=torch.from_numpy(ah).float().to(torch.float64),\n    b_coeffs=torch.from_numpy(bh).float().to(torch.float64)\n)\n\nprint(f\"Audio after filtfilt : {audio}\")\n```\n\nBut actual output is that:\n```python\nAudio contains nan: False\nAudio contains inf: False\nAudio min: -0.858154296875\nAudio max: 0.8670654296875\nAudio mean: 0.00011500650977929034\nAudio shape: torch.Size([1149120])\nbh contains nan: False\nbh contains inf: False\nbh min: -9.699606895446777\nbh max: 9.699606895446777\nbh mean: 0.0\nbh shape: torch.Size([6])\nah contains nan: False\nah contains inf: False\nah min: -9.639544486999512\nah max: 9.757863998413086\nah mean: 1.3907750447591147e-07\nah shape: torch.Size([6])\nAudio after filtfilt : tensor([nan, nan, nan,  ..., nan, nan, nan], dtype=torch.float64)\n```\n\nAm i using this function in a wrong way?lol\ud83d\ude02",
    "url": "https://github.com/pytorch/audio/issues/3879",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-10T02:56:31Z",
    "updated_at": "2025-02-10T08:55:03Z",
    "user": "ElinLiu0"
  },
  {
    "repo": "huggingface/trl",
    "number": 2813,
    "title": "What is the minimum GPU requirement in gigabytes for TRL intensive training?",
    "body": "",
    "url": "https://github.com/huggingface/trl/issues/2813",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-10T02:52:07Z",
    "updated_at": "2025-02-11T08:41:56Z",
    "user": "lonngxiang"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1188,
    "title": "It seems like Xenova/swin2SR-classical-sr-x2-64 model only work with image url?How to implement partial output with it?",
    "body": "### Question\n\nI have fun with react demo and Xenova/swin2SR-classical-sr-x2-64 model.\nhttps://huggingface.co/Xenova/swin2SR-classical-sr-x2-64\nI tried to give object URL to upscaler function but it doesn't work, I wonder if it only accepts image url.\nAlso I want to know how to do partial output like the translate react demo.\n\nI tried to convert output data to base64 for rendering but It doesn't work.\n\n![Image](https://github.com/user-attachments/assets/928eaf32-dd80-469f-9bd2-6dd88c876e74)\n![Image](https://github.com/user-attachments/assets/f63fd713-0738-4fd6-86ff-657963dba2bc)\n\nIs it output png rawdata only?",
    "url": "https://github.com/huggingface/transformers.js/issues/1188",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-10T02:18:32Z",
    "updated_at": "2025-02-16T00:50:36Z",
    "user": "codenoobforreal"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1186,
    "title": "Which undocumented transformersJS Generator parameters are supported? crapCheck ran fine.",
    "body": "### Question\n\nSorry to bug you again Josh   @xenova    I was trying a set of generator parameters and things were working fine without errors so I tried the parameter \"crapCheck\" and it also ran without errors so now I am worried if anything works. In the docs it seems that these are supported:  \n\nSupported Parameters (Confirmed in Docs)\n\nmax_new_tokens: \u2705 Yes (Controls the number of new tokens to generate)\n\ndo_sample: \u2705 Yes (Enables sampling)\n\ntop_p: \u2705 Yes (Nucleus sampling)\n\ntemperature: \u2705 Yes (Controls randomness)\n\ntop_k: \u2705 Yes (Top-k filtering)\n\nnum_return_sequences: \u2705 Yes (Number of sequences to return)\n\n\n  Demo code [here](https://hpssjellis.github.io/my-examples-of-transformersJS/public/deepseek-r1-webgpu/deepseek-r1-webgpu-00.html) but without all the below parameters, just some of them.\n\nAny suggestions on what may work and what to ignore?\n\n```\n\n    const output = await generator(messages, {\n\n\n      max_new_tokens: myMaxT,          // 512\n      do_sample: myDo_sample,          // true\n      top_p: myTop_p,                          // 0.9  \n      temperature: myTemperature,    // 0.7\n      top_k: myTop_k,                          // testing if it does top_k  50\n      num_return_sequences: 1,          // 1\n      streamer,                                     // calls the function TextStreamer\n\n      min_length: myMin_length,                          // Ensures at least 20 tokens are generated\n      repetition_penalty: myRepetition_penalty,   // 1.2\n      length_penalty: myLength_penalty,             // 1.5\n\n      early_stopping: myEarly_stopping,               // end testing  true false\n      chain_of_thought: myChain_of_thought,      // true\n      stopping_criteria: stoppingCriteria,              // Use stopping criteria for clean stopping\n\n      crapCheck: 65,                                             // fairly sure this is not supported\n\n    });\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/1186",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-09T05:35:57Z",
    "updated_at": "2025-02-09T05:35:57Z",
    "user": "hpssjellis"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 827,
    "title": "How to design TP plan for `nn.GLU`",
    "body": "Hi guys, I'm encountering a challenge in designing TP plans for gated MLP, i.e., [nn.GLU](https://pytorch.org/docs/stable/generated/torch.nn.GLU.html#torch.nn.GLU) with packed weights `w12 = [w1, w2]`, followed by a down proj `w3`\n\nThe plan for separated `w1` and `w2` is quite straightforward\n```\nlayer_tp_plan = {\n    # by default ColwiseParallel input layouts is replicated\n    # and RowwiseParallel output layouts is replicated\n    \"feed_foward.w1\": ColwiseParallel(),\n    \"feed_forward.w2\": RowwiseParallel(),\n    \"feed_forward.w3\": ColwiseParallel(),\n}\n```\nHowever, I'm unsure how to approach this when using packed weights (`w12 = [w1, w2]`) to leverage the fused GLU for better performance.\n\nCould anyone provide some guidance on how to design an effective TP plan for this scenario?\nThank you \n\n@tianyu-l \n\n\n",
    "url": "https://github.com/pytorch/torchtitan/issues/827",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-08T23:24:47Z",
    "updated_at": "2025-02-12T19:43:22Z",
    "user": "yzhangcs"
  },
  {
    "repo": "huggingface/lighteval",
    "number": 545,
    "title": "couldn't find it in the cached files and it looks like Elron/bleurt-tiny-512, how to set the model path?",
    "body": "How to set the eval model path?\n## Eval\nwhen I use the script to eval model  with MATH-500\n\n`NUM_GPUS=8 # Set to 8 for 32B and 70B models\nMODEL=Deepseek_R1_distill/Qwen2.5-32B-Open-R1-Distill/\nMODEL_ARGS=\"pretrained=$MODEL,dtype=bfloat16,max_model_length=32768,gpu_memory_utilisation=0.8,tensor_parallel_size=$NUM_GPUS\"\nOUTPUT_DIR=data/evals/Qwen2.5-32B-Open-R1-Distill\n\nlighteval vllm $MODEL_ARGS \"custom|math_500|0|0\" \\\n    --custom-tasks src/open_r1/evaluate.py \\\n    --use-chat-template \\\n    --output-dir $OUTPUT_DIR\n`\n\n\n##  Error\nError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like Elron/bleurt-tiny-512 is not the path to a directory containing a file named \nconfig.json.\n\nWhere to set the eval model path in the script?",
    "url": "https://github.com/huggingface/lighteval/issues/545",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-08T07:26:28Z",
    "updated_at": "2025-05-15T15:27:30Z",
    "user": "bannima"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 240,
    "title": "How to do knowledge distillation training",
    "body": "In the deepseek r1 technical report, there is a small model based on distillation at the end; deepseek r1, as the teacher model,  qwen and llama, as the student model, do SFT based on distilled data. However, it seems that the process of knowledge distillation is not involved here(open r1), that is, the process of the r1 teacher model modifying the output of the student model, but simply SFT based on distilled data.",
    "url": "https://github.com/huggingface/open-r1/issues/240",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-08T06:50:20Z",
    "updated_at": "2025-02-27T08:16:02Z",
    "user": "RyanOvO"
  },
  {
    "repo": "huggingface/transformers.js-examples",
    "number": 42,
    "title": "How to stop the transformerJS webGPU models when they chat for too long.",
    "body": "@xenova Hi Josh.\n\nI am making several very capable TransformerJS single page applications and I really like what they are doing. My demo  index page is [here](https://hpssjellis.github.io/my-examples-of-transformersJS/public/index.html), but I can't seem to stop any of my examples if they are taking too long and then be able to do another request. I have tried several methods with the streamer, a stopFlag or an AbortController but nothing seems to be error free.\n\nAny suggestions I have included my single page application of deepseekR1 for reference.\n(Note: Single page applications are great for beginners and can be easily downloaded and ran locally after the model is cached)\n\n\n\n```\n\n<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\" />\n  \n<script type=\"module\">\nimport { pipeline, TextStreamer } from 'https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.3.2';\n\n// Needed for buttons to call module functions\nwindow.myLoadModel = myLoadModel\nwindow.myAskQuestion = myAskQuestion\n  \nlet generator\n//let myStopFlag = false; // Global stop flag\nlet streamer = null; // Keep track of streamer instance\nlet myModel\nlet abortController; // Add this global variable\n\nabortController = new AbortController(); // Create the controller\n\nlet myContent = document.getElementById('myArea01').value \nconsole.log(myContent)\n  \n\n// Create a text generation pipeline\nasync function myLoadModel() {\n  myModel = document.getElementById('myModelInput').value\n  const progressCallback = (progress) => {\n   // console.log(progress);\n    const myProg = parseInt(progress.progress);\n    document.getElementById('progress').textContent = `Loading: ${progress.file} at ${myProg}%`;   //(progress * 100).toFixed(2)\n  };\n  \n  generator = await pipeline(\"text-generation\", myModel, { dtype: \"q4f16\", device: \"webgpu\", progress_callback: progressCallback });\n  document.getElementById('myLoadButton').disabled = true\n  document.getElementById('myAskButton').disabled = false\n  document.getElementById('progress').textContent = `Loading: Done!`; \n}\n\n\n\nasync function myAskQuestion() {\n  document.getElementById('myTextarea01').value = ''; \n  myContent = document.getElementById('myArea01').value; \n  const messages = [{ role: \"user\", content: myContent }];\n\n // myStopFlag = false; // Reset stop flag before starting\n//  document.getElementById('myStopButton').disabled = false; // Enable stop button\n\n  // Clear any existing streamer instance before starting a new one\n  streamer = new TextStreamer(generator.tokenizer, {\n    skip_prompt: true,\n    callback_function: (text) => {\n    //  if (myStopFlag) return; // Stop updating if stop flag is set\n\n      if (!window.startTime) {\n        window.startTime = performance.now();\n      }\n      const currentTime = performance.now();\n      const elapsedTime = (currentTime - window.startTime) / 1000; \n\n      document.getElementById('myTextarea01').value += text;\n      const generatedTokens = document.getElementById('myTextarea01').value.length;\n      const tokensPerSecond = generatedTokens / elapsedTime;\n      const progress = parseInt((generatedTokens * 100) / (myMaxT * 10));\n      document.getElementById('progress').textContent = `Answer progress: ~${progress}%, Tokens per second: ${tokensPerSecond.toFixed(2)}`;\n\n      if (progress >= 100) {\n        window.startTime = null;\n      }\n    },\n  });\n\n  const myMaxT = document.getElementById('myMaxTokens').value;\n  const myDo_sample = document.getElementById('myDo_sample').value;\n  const myTop_p = document.getElementById('myTop_p').value;\n  const myTemperature = document.getElementById('myTemperature').value;\n  const myChain_of_thought = document.getElementById('myChain_of_thought').value;\n console.log(` maxT:${myMaxT},   do-sample:${myDo_sample},   top_p:${myTop_p},   temp:${myTemperature},   chain-of-thought:${myChain_of_thought},    `)\n  try {\n    const output = await generator(messages, {\n      max_new_tokens: myMaxT,\n      do_sample: myDo_sample,\n      top_p: myTop_p,      // 0.9  \n      temperature: myTemperature,   // 0.7\n      streamer,\n      chain_of_thought: myChain_of_thought,\n    });\n\n  //  if (!myStopFlag) {\n      let fullReply = output[0].generated_text.at(-1).content;\n      let myReply = fullReply.replace(/<think>/g, \"\").replace(/<\\/think>/g, \"\\r\\n\\r\\nResponse: \").replace(/```/g, \"\");\n      document.getElementById('myTextarea01').value = `Asking: ${myContent}\\r\\n\\r\\nAnswer: ${myReply}`;\n   // }\n  } catch (error) {\n    console.error('Error:', error);\n  }\n}\n\n\n\n</script>\n</head>\n<body>\n<h1>DeepSeek-R1-webgpu in the browser</h1>\n  \nOpen the console. shift-ctrl-i <br><br>\n  \nFully javascript activated. If you don't want to completely download \n<a href=\"onnx-community/DeepSeek-R1-Distill-Qwen-1.5B-ONNX\"> \nonnx-community/DeepSeek-R1-Distill-Qwen-1.5B-ONNX </a> then you should probably close this page.<br><br>\nIt will load from cache if downloaded once.<br><br>\n\nUses the Web-gpu model or other models: <input id=\"myModelInput\" type=text size=60 value=\"onnx-communit",
    "url": "https://github.com/huggingface/transformers.js-examples/issues/42",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-08T04:38:51Z",
    "updated_at": "2025-02-08T22:05:23Z",
    "user": "hpssjellis"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 692,
    "title": "How to evaluate policy on real robot and sim environment",
    "body": "I am working on evaluating a trained policy on a real robot and in a simulated environment (Isaac Gym). However, I am uncertain about the process and communication mechanisms involved.\n\nMy questions are:\n\n- Evaluating on a real robot:\n\n> How do I retrieve real-time observations from the real robot with Lerobot?\n\n- Evaluating in simulation (Isaac Gym):\n\n> Can I directly evaluate my trained policy in Isaac Gym?\n ",
    "url": "https://github.com/huggingface/lerobot/issues/692",
    "state": "closed",
    "labels": [
      "question",
      "simulation"
    ],
    "created_at": "2025-02-07T13:40:27Z",
    "updated_at": "2025-10-17T11:20:29Z",
    "user": "ShiyaoExtendQA"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10743,
    "title": "Support zero-3 for FLUX training",
    "body": "### Describe the bug\n\nDue to memory limitations, I am attempting to use Zero-3 for Flux training on 8 GPUs with 32GB each. I encountered a bug similar to the one reported in this issue: https://github.com/huggingface/diffusers/issues/1865. I made modifications based on the solution proposed in this pull request: https://github.com/huggingface/diffusers/pull/3076. However, the same error persists. In my opinion, the fix does not work as expected, at least not entirely. Could you advise on how to modify it further?\n\nThe relevant code from https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_flux.py#L1157 has been updated as follows:\n```\n    def deepspeed_zero_init_disabled_context_manager():\n        \"\"\"\n        returns either a context list that includes one that will disable zero.Init or an empty context list\n        \"\"\"\n\n        deepspeed_plugin = AcceleratorState().deepspeed_plugin if accelerate.state.is_initialized() else None\n        print(f\"deepspeed_plugin: {deepspeed_plugin}\")\n        if deepspeed_plugin is None:\n            return []\n\n        return [deepspeed_plugin.zero3_init_context_manager(enable=False)]\n\n    with ContextManagers(deepspeed_zero_init_disabled_context_manager()):\n        text_encoder_one, text_encoder_two = load_text_encoders(text_encoder_cls_one, text_encoder_cls_two)\n        vae = AutoencoderKL.from_pretrained(\n            args.pretrained_model_name_or_path,\n            subfolder=\"vae\",\n            revision=args.revision,\n            variant=args.variant,\n        )\n```\n\n### Reproduction\n\ndeepspeed config:\n```json\n{\n    \"train_batch_size\": \"auto\",\n    \"train_micro_batch_size_per_gpu\": \"auto\",\n    \"gradient_accumulation_steps\":\"auto\",\n    \"zero_optimization\": {\n      \"stage\": 3,\n      \"offload_optimizer\": {\"device\": \"cpu\"},\n      \"stage3_gather_16bit_weights_on_model_save\": false,\n      \"overlap_comm\": false\n    },\n    \"bf16\": {\n    \"enabled\": true\n    },\n    \"fp16\": {\n    \"enabled\": false\n    }\n  }\n  \n```\n\naccelerate config:\n```\ncompute_environment: LOCAL_MACHINE\ndeepspeed_config:\n  deepspeed_config_file: \"config/ds_config.json\"\ndistributed_type: DEEPSPEED\nmachine_rank: 0\nmain_training_function: main\nnum_machines: 1\nnum_processes: 8\n```\n\ntraining shell:\n```\n#!/bin/bash\n\nexport MODEL_NAME=\"black-forest-labs/FLUX.1-dev\"\nexport INSTANCE_DIR=\"dog\"\nexport OUTPUT_DIR=\"trained-flux\"\n\nexport DS_SKIP_CUDA_CHECK=1\n\nexport ACCELERATE_CONFIG_FILE=\"config/accelerate_config.yaml\"\n\nACCELERATE_CONFIG_FILE_PATH=${1:-$ACCELERATE_CONFIG_FILE}  \n\nFLUXOUTPUT_DIR=flux_lora_output\n\nmkdir -p $FLUXOUTPUT_DIR\n\naccelerate launch --config_file $ACCELERATE_CONFIG_FILE_PATH train_dreambooth_lora_flux.py \\\n  --pretrained_model_name_or_path=$MODEL_NAME  \\\n  --instance_data_dir=$INSTANCE_DIR \\\n  --output_dir=$OUTPUT_DIR \\\n  --mixed_precision=\"bf16\" \\\n  --instance_prompt=\"a photo of sks dog\" \\\n  --resolution=1024 \\\n  --train_batch_size=4 \\\n  --guidance_scale=1 \\\n  --gradient_accumulation_steps=1 \\\n  --learning_rate=1e-4 \\\n  --report_to=\"tensorboard\" \\\n  --lr_scheduler=\"constant\" \\\n  --lr_warmup_steps=0 \\\n  --max_train_steps=100 \\\n  --gradient_checkpointing \\\n  --seed=\"0\"\n\n```\n\n### Logs\n\n```shell\nRuntimeError: 'weight' must be 2-D\n```\n\n### System Info\n\npytorch: 2.1.0\ndeepspeed: 0.14.0\naccelerate: 1.3.0\ndiffusers: develop\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/10743",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-02-07T12:50:44Z",
    "updated_at": "2025-10-27T09:33:59Z",
    "comments": 9,
    "user": "xiaoyewww"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 146682,
    "title": "How to get last layer hidden state of transformer model while convert model to onnx format?",
    "body": "\n\nI am currently working with a model that has been exported to the ONNX format. For my project, I need to extract the last layer hidden states during inference. However, I couldn\u2019t find any documentation or example that explains how to achieve this using an ONNX-exported model.\n\nWhether the ONNX format retains the capability to extract the last layer hidden states?\n\nThanks!\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/146682",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2025-02-07T08:35:07Z",
    "updated_at": "2025-03-03T20:42:20Z",
    "user": "Jianshu-She"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 210,
    "title": "Problem with multi-epoch training",
    "body": "Hi, I run the orpo code with 1 epoch and there was no issue. But when I tried to run the code with 5 epochs, I had the following error just at the start of the second epoch:\n\n```\nRuntimeError: Tensors of the same index must be on the same device and the same dtype except `step` tensors that can be CPU and float32 notwithstanding\n``` \n\nAny idea of what could be wrong and how to fix it? Thank you! ",
    "url": "https://github.com/huggingface/alignment-handbook/issues/210",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-07T04:50:41Z",
    "updated_at": "2025-02-07T04:50:41Z",
    "comments": 0,
    "user": "sowmaster"
  },
  {
    "repo": "pytorch/executorch",
    "number": 8282,
    "title": "Advise on how to run the training example on iOS",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHello team,\n\nI was wondering if it is possible to run the `train_xor` or a similar training example on an iOS device.\nSo be able to do \n`#import <executorch/extension/training/training_module.h>`\n\nI have followed this guide: https://pytorch.org/executorch/main/apple-runtime and was able to build the xcframework using a local copy of executorch, add it to the Xcode project, and run it on an iOS device.\n\nI guess I need to compile and package the libraries in https://github.com/pytorch/executorch/tree/main/extension/training to the App, but I don't know how to do that, could you give some pointers?\n\nThanks!\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### RFC (Optional)\n\n_No response_\n\ncc @shoumikhin @JacobSzwejbka",
    "url": "https://github.com/pytorch/executorch/issues/8282",
    "state": "closed",
    "labels": [
      "triaged",
      "module: ios",
      "module: training"
    ],
    "created_at": "2025-02-06T18:57:43Z",
    "updated_at": "2025-09-02T16:46:06Z",
    "user": "YuanTingHsieh"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 521,
    "title": "authenticated sessions with smolagents (how to be logged in during browser use)",
    "body": "**Is your feature request related to a problem? Please describe.**\nI would like smolagents to be able to use websites with my login credentials.\n\n**Describe the solution you'd like**\nEither a way to give Helium credentials, or a way to use my actual browser, like: https://github.com/browser-use/browser-use/blob/main/examples/browser/real_browser.py\n\n**Is this not possible with the current options.**\nI'm fairly certain this is not possible with the current implementation. (If it is, can you make a demo code?)\n\n**Describe alternatives you've considered**\nI can use https://github.com/browser-use/browser-use/ instead\n\n**Additional context**\nhttps://github.com/browser-use/browser-use/ does a really good job of providing multiple options for this. ",
    "url": "https://github.com/huggingface/smolagents/issues/521",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-02-06T15:51:53Z",
    "updated_at": "2025-02-06T15:51:53Z",
    "user": "rawwerks"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 210,
    "title": "How to push own dataset to hub with train and test dataset?",
    "body": "How do I push my own dataset to the hub along with the training and test datasets?\n\n```python\n  train_distiset = pipeline.run(dataset=train_dataset)\n  test_distiset = pipeline.run(dataset=test_dataset)\n```\nThere is a problem with the code above.",
    "url": "https://github.com/huggingface/open-r1/issues/210",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-06T15:28:15Z",
    "updated_at": "2025-02-08T05:59:13Z",
    "user": "JACKYLUO1991"
  },
  {
    "repo": "huggingface/peft",
    "number": 2364,
    "title": "docs: broken links to boft",
    "body": "### System Info\n\non page: https://huggingface.co/docs/peft/v0.14.0/en/conceptual_guides/oft  \n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\non page: https://huggingface.co/docs/peft/v0.14.0/en/conceptual_guides/oft  \n\nSnippet:\n\nTake a look at the following step-by-step guides on how to finetune a model with BOFT:\n\n[Dreambooth finetuning with BOFT](https://huggingface.co/docs/peft/v0.14.0/en/task_guides/boft_dreambooth)\n[Controllable generation finetuning with BOFT (ControlNet)](https://huggingface.co/docs/peft/v0.14.0/en/task_guides/boft_controlnet)\n\n\n### Expected behavior\n\n\nperhaps the links should lead to\n\n https://github.com/huggingface/peft/blob/main/examples/boft_dreambooth/boft_dreambooth.md\n https://github.com/huggingface/peft/blob/main/examples/boft_controlnet/boft_controlnet.md",
    "url": "https://github.com/huggingface/peft/issues/2364",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-06T14:48:16Z",
    "updated_at": "2025-02-07T10:14:44Z",
    "comments": 1,
    "user": "makelinux"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 207,
    "title": "DeepSeek RL-Zero: How to clone DeepSeek RL-Zero?",
    "body": "How to clone DeepSeek RL-Zero?",
    "url": "https://github.com/huggingface/open-r1/issues/207",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-06T13:45:33Z",
    "updated_at": "2025-02-06T13:45:33Z",
    "user": "win10ogod"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 146575,
    "title": "How to pip3 torch==2.1.0.dev20230822+cu118",
    "body": "\n\n> I\u2019ve tried installing this specific version multiple times, but the issue keeps occurring.\n\npip3 install torch==2.1.0.dev20230822+cu118\n```\nERROR: Could not find a version that satisfies the requirement torch==2.1.0.dev20230822+cu118 (from versions: 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.6.0)\nERROR: No matching distribution found for torch==2.1.0.dev20230822+cu118\n```\n\n> PLEASE HELP ME A GUILD TO SOVLE THIS ISSUE <3\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @seemethere @malfet @osalpekar @atalman",
    "url": "https://github.com/pytorch/pytorch/issues/146575",
    "state": "closed",
    "labels": [
      "module: binaries",
      "triaged"
    ],
    "created_at": "2025-02-06T06:07:34Z",
    "updated_at": "2025-02-06T15:14:25Z",
    "user": "minhphi1712"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 501,
    "title": "How to run open_deep_research\uff1f",
    "body": "How to run open_deep_research\uff1f",
    "url": "https://github.com/huggingface/smolagents/issues/501",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-02-05T13:35:52Z",
    "updated_at": "2025-03-19T07:28:22Z",
    "user": "win4r"
  },
  {
    "repo": "pytorch/ao",
    "number": 1665,
    "title": "NF4Tensor and DDP",
    "body": "I am trying to use `NF4Tensor` weights in my model and wrap it with `DistributedDataParallel`, but get the following error:\n\n```\n[rank0]:     model = DistributedDataParallel(\n[rank0]:             ^^^^^^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/path/to/venv/lib/python3.12/site-packages/torch/nn/parallel/distributed.py\", line 837, in __init__\n[rank0]:     _sync_module_states(\n[rank0]:   File \"/path/to/venv/lib/python3.12/site-packages/torch/distributed/utils.py\", line 313, in _sync_module_states\n[rank0]:     _sync_params_and_buffers(process_group, module_states, broadcast_bucket_size, src)\n[rank0]:   File \"/path/to/venv/lib/python3.12/site-packages/torch/distributed/utils.py\", line 324, in _sync_params_and_buffers\n[rank0]:     dist._broadcast_coalesced(\n[rank0]:   File \"/path/to/venv/lib/python3.12/site-packages/torch/_dynamo/eval_frame.py\", line 745, in _fn\n[rank0]:     return fn(*args, **kwargs)\n[rank0]:            ^^^^^^^^^^^^^^^^^^^\n[rank0]:   File \"/path/to/venv/lib/python3.12/site-packages/torchao/dtypes/nf4tensor.py\", line 834, in __torch_dispatch__\n[rank0]:     raise NotImplementedError(\n[rank0]: NotImplementedError: NF4Tensor dispatch: attempting to run aten.cat.default, this is not supported\n```\n\nTo replicate:\n\n```\nfrom torchao.dtypes.nf4tensor import linear_nf4, to_nf4\nfrom torch.nn.parallel import DistributedDataParallel\nfrom torch import nn\nimport os\nimport torch\n\nclass NF4(nn.Module):\n    \n    def __init__(\n        self,\n        device = None,\n    ):\n        super().__init__()\n\n        self.linear = nn.Linear(512, 512, bias=False, device=device)\n        self.linear.weight = nn.Parameter(to_nf4(self.linear.weight))\n\n\nif __name__ == \"__main__\":\n    \n    _local_rank = int(os.getenv(\"LOCAL_RANK\", \"0\"))\n    _device = f\"cuda:{_local_rank}\"\n\n    torch.distributed.init_process_group(\n        backend=\"nccl\",\n        init_method=\"env://\",\n        device_id=torch.device(_local_rank),\n    )\n\n    model = NF4(_device)\n\n    model = DistributedDataParallel(model)\n```\n\n`torchrun --nproc_per_node=2 script.py`\n\n`NotImplementedError: NF4Tensor dispatch: attempting to run c10d.broadcast_.default, this is not supported`\n\nIs there some way around this issue?",
    "url": "https://github.com/pytorch/ao/issues/1665",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-05T12:12:27Z",
    "updated_at": "2025-02-18T02:35:05Z",
    "user": "psinger"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 821,
    "title": "WARNING - When using FSDP, it's recommended to enable config.force_recompute_fp8_weight_in_bwd.",
    "body": "Not necessarily an issue, but I see this log quite a lot when I enable Float8. I can open a PR to turn it on, but was wondering if it was intentional. Thanks for the great library!",
    "url": "https://github.com/pytorch/torchtitan/issues/821",
    "state": "closed",
    "labels": [
      "question",
      "module: fsdp"
    ],
    "created_at": "2025-02-05T05:04:38Z",
    "updated_at": "2025-02-18T18:32:34Z",
    "user": "c0g"
  },
  {
    "repo": "huggingface/trl",
    "number": 2768,
    "title": "How to log more metrics with wandb when using GRPO trainer and accelerate",
    "body": "### Reproduction\n\n```python\n\ndef correctness_reward_func(prompts, completions, answer, **kwargs) -> list[float]:\n    responses = [completion[0][\"content\"] for completion in completions]\n    q = prompts[0][-1][\"content\"]\n    extracted_responses = [extract_xml_answer(r) for r in responses]\n\n    # Get current step from trainer's state\n    current_step = trainer.state.global_step if hasattr(trainer, \"state\") else 0\n\n    # Initialize logger if not already done\n    global example_logger\n    if not hasattr(correctness_reward_func, \"example_logger\"):\n        example_logger = LocalExampleLogger()\n        correctness_reward_func.example_logger = example_logger\n\n    # Log each example\n    for i in range(len(responses)):\n        example_dict = {\n            \"step\": current_step,\n            \"question\": q,\n            \"true_answer\": answer[i],\n            \"response\": responses[i],\n            \"extracted_response\": extracted_responses[i],\n            \"correct\": extracted_responses[i] == answer[i],\n            \"generation_idx\": i,  # Which generation attempt this was\n        }\n        example_logger.log_example(example_dict)\n\n    # Calculate marker counts and correctness for all responses\n    is_correct = [r == a for r, a in zip(extracted_responses, answer)]\n    uncertainty_counts = [count_uncertainty_markers(r) for r in responses]\n    internal_dialogue_counts = [count_internal_dialogue_markers(r) for r in responses]\n    reflective_counts = [count_reflective_markers(r) for r in responses]\n\n    # Separate counts for correct and incorrect responses\n    correct_indices = [i for i, correct in enumerate(is_correct) if correct]\n    incorrect_indices = [i for i, correct in enumerate(is_correct) if not correct]\n\n    # Log metrics using trainer's accelerator\n    if hasattr(trainer, \"accelerator\"):\n       ### NONE OF THE BELOW ARE LOGGED ON WANDB\n        metrics = {\n            \"correctness/correct_count\": len(correct_indices),\n            \"correctness/total_examples\": len(responses),\n            \"correctness/accuracy\": len(correct_indices) / len(responses),\n            # Total markers across all responses\n            \"markers/total/uncertainty\": sum(uncertainty_counts),\n            \"markers/total/internal_dialogue\": sum(internal_dialogue_counts),\n            \"markers/total/reflective\": sum(reflective_counts),\n            # Markers in correct responses\n            \"markers/correct/uncertainty\": sum(\n                uncertainty_counts[i] for i in correct_indices\n            )\n            if correct_indices\n            else 0,\n            \"markers/correct/internal_dialogue\": sum(\n                internal_dialogue_counts[i] for i in correct_indices\n            )\n            if correct_indices\n            else 0,\n            \"markers/correct/reflective\": sum(\n                reflective_counts[i] for i in correct_indices\n            )\n            if correct_indices\n            else 0,\n            # Markers in incorrect responses\n            \"markers/incorrect/uncertainty\": sum(\n                uncertainty_counts[i] for i in incorrect_indices\n            )\n            if incorrect_indices\n            else 0,\n            \"markers/incorrect/internal_dialogue\": sum(\n                internal_dialogue_counts[i] for i in incorrect_indices\n            )\n            if incorrect_indices\n            else 0,\n            \"markers/incorrect/reflective\": sum(\n                reflective_counts[i] for i in incorrect_indices\n            )\n            if incorrect_indices\n            else 0,\n        }\n        trainer.accelerator.log(metrics, step=current_step)\n\n    return [2.0 if r == a else 0.0 for r, a in zip(extracted_responses, answer)]\n\n.......\n\nmodel_name = config[\"model\"][\"name\"]\noutput_dir = config[\"training\"][\"output_dir\"]\nrun_name = config[\"training\"][\"run_name\"]\n\ntraining_args = GRPOConfig(\n    output_dir=output_dir,\n    run_name=run_name,\n    learning_rate=config[\"training\"][\"learning_rate\"],\n    adam_beta1=config[\"training\"][\"adam_beta1\"],\n    adam_beta2=config[\"training\"][\"adam_beta2\"],\n    weight_decay=config[\"training\"][\"weight_decay\"],\n    warmup_ratio=config[\"training\"][\"warmup_ratio\"],\n    lr_scheduler_type=config[\"training\"][\"lr_scheduler_type\"],\n    logging_steps=config[\"training\"][\"logging_steps\"],\n    bf16=config[\"training\"][\"bf16\"],\n    per_device_train_batch_size=config[\"training\"][\"per_device_train_batch_size\"],\n    gradient_accumulation_steps=config[\"training\"][\"gradient_accumulation_steps\"],\n    num_generations=config[\"training\"][\"num_generations\"],\n    max_prompt_length=config[\"training\"][\"max_prompt_length\"],\n    max_completion_length=config[\"training\"][\"max_completion_length\"],\n    num_train_epochs=config[\"training\"][\"num_train_epochs\"],\n    save_steps=config[\"training\"][\"save_steps\"],\n    max_grad_norm=config[\"training\"][\"max_grad_norm\"],\n    report_to=[\"wandb\"]\n    if (not torch.distributed.is_initialized() or torch.distributed.get_rank() == 0)\n    else [],\n    log_on_each_node=False,  # Only log on main node\n    use_vllm",
    "url": "https://github.com/huggingface/trl/issues/2768",
    "state": "open",
    "labels": [
      "\u2728 enhancement",
      "\u26a1accelerate",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-02-05T03:59:10Z",
    "updated_at": "2025-02-05T03:59:54Z",
    "user": "andrewsiah"
  },
  {
    "repo": "pytorch/ao",
    "number": 1664,
    "title": "Tensor subclass methods for `DTensor` and `FSDP2`",
    "body": "Is there a protocol / interface that a tensor subclass must implement in order to be used with `DTensor` primitives and for training with `FSDP2`?\n\nI've been walking through `NF4` as an example as it [covers both](https://github.com/search?q=repo%3Apytorch%2Fao+FSDP2+and+NF4&type=pullrequests).  However, the methods are scattered across `__torch_function__` and `__torch_dispatch__` (though the unittests make it clear which ops are tested for `FSDP`).  \n\nIs there a cleaner / expected format for subclassing a tensor such that\n-  it can be used with `DTensor` collectives and `FSDP2`, and \n- composed with subclass-specific overrides for streamlined use with `torch.compile`?\n\n@msaroufim @awgu @weifengpy @jerryzh168   \n\n---\n\np.s. Fwiw, also looked at the developer-guide tensor subclass example but found the abstractions a bit hard to follow; would personally prefer using torch-native functionalities.\n",
    "url": "https://github.com/pytorch/ao/issues/1664",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-05T00:40:54Z",
    "updated_at": "2025-02-05T23:33:35Z",
    "user": "jeromeku"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 818,
    "title": "Is user-defined initializers a must-have for FSDP2?",
    "body": "```\nwith torch.device(\"meta\"):\n    model = Transformer()\nfor module in model.modules():\n    if isinstance(module, TransformerBlock):\n        fully_shard(module)\nfully_shard(model)\nfor tensor in itertools.chain(model.parameters(), model.buffers()):\n    assert tensor.device == torch.device(\"meta\")\n# Allocate buffers and sharded parameters on GPU\nmodel.to_empty(device=\"cuda\")\n# Run user-defined initializers\nmodel.init_weights() # or `model.apply(init_weights)`\n```\n\nCould I skip model.init_weights() # or `model.apply(init_weights)`\nif I want to just use the already initialized weights before sharding? ",
    "url": "https://github.com/pytorch/torchtitan/issues/818",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-02-04T22:00:45Z",
    "updated_at": "2025-02-05T18:03:29Z",
    "user": "goldhuang"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 183,
    "title": "How to directly input embeddings into the model?",
    "body": "My data are embeddings of the tokens (i.e., already after tokenization), is there a way of directly inputting the embeddings into the DeepSeek open-r1 model?\n\nFor example, when I use the BERT model via Hugging Face, I can simply input the embeddings using the \"inputs_embeds\" parameter:\n\n```\nfrom transformers import BertModel\nbert = BertModel.from_pretrained('bert-base-uncased')\noutputs = bert(inputs_embeds = ...)\n```\n\nIs there a similar way of doing so with the DeepSeek open-r1 model?\n\nThank you!",
    "url": "https://github.com/huggingface/open-r1/issues/183",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-04T21:10:13Z",
    "updated_at": "2025-02-04T21:10:13Z",
    "user": "CCCC1800"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 180,
    "title": "How to launch GRPO with vLLM on multi-node slurm?",
    "body": "How to write sbatch script to run GRPO with vLLM on multiple nodes? What should be `--num_processes`? Is [GRPOTrainer](https://github.com/huggingface/trl/blob/1f344c9377d87cd348d92b78f27afea8e66563d7/trl/trainer/grpo_trainer.py#L288-L298) compatible with multinode training?",
    "url": "https://github.com/huggingface/open-r1/issues/180",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-04T16:58:50Z",
    "updated_at": "2025-03-14T15:55:18Z",
    "user": "pbelevich"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 678,
    "title": "The inverse kinematic solution code of so-100",
    "body": "Are there any code of inverse kinematic of so-100, which just need the input of the x, y on my desk, then it can move to the target \ncoordinate\uff1f\nThanks for any response.",
    "url": "https://github.com/huggingface/lerobot/issues/678",
    "state": "open",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-02-04T03:58:17Z",
    "updated_at": "2025-10-15T16:55:01Z",
    "user": "gxy-1111"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10710,
    "title": "Is DDUF format supported?",
    "body": "I checked this PR, https://github.com/huggingface/diffusers/pull/10037 and it is merged\n\n```\nfrom diffusers import DiffusionPipeline\nimport torch\n\npipe = DiffusionPipeline.from_pretrained(\n    \"DDUF/FLUX.1-dev-DDUF\", dduf_file=\"FLUX.1-dev.dduf\", torch_dtype=torch.bfloat16\n)\n\nimage = pipe(\n    \"photo a cat holding a sign that says Diffusers\", num_inference_steps=50, guidance_scale=3.5\n).images[0]\nimage.save(\"cat.png\")\n\n```\n\n```\n(venv) C:\\aiOWN\\diffuser_webui>python FLUX_DDUF.py\nFetching 1 files: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1/1 [00:00<?, ?it/s]\nLoading state_dict: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:32<00:00, 16.05s/it]\nLoading pipeline components...:  29%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258a                      | 2/7 [00:34<01:10, 14.12s/it]You set `add_prefix_space`. The tokenizer needs to be converted from the slow tokenizers\nLoading pipeline components...:  57%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258b             | 4/7 [00:34<00:26,  8.73s/it]\nTraceback (most recent call last):\n  File \"C:\\aiOWN\\diffuser_webui\\FLUX_DDUF.py\", line 4, in <module>\n    pipe = DiffusionPipeline.from_pretrained(\n  File \"C:\\aiOWN\\diffuser_webui\\venv\\lib\\site-packages\\huggingface_hub\\utils\\_validators.py\", line 114, in _inner_fn\n    return fn(*args, **kwargs)\n  File \"C:\\aiOWN\\diffuser_webui\\venv\\lib\\site-packages\\diffusers\\pipelines\\pipeline_utils.py\", line 951, in from_pretrained\n    loaded_sub_model = load_sub_model(\n  File \"C:\\aiOWN\\diffuser_webui\\venv\\lib\\site-packages\\diffusers\\pipelines\\pipeline_loading_utils.py\", line 742, in load_sub_model\n    loaded_sub_model = load_method(name, **loading_kwargs)\n  File \"C:\\aiOWN\\diffuser_webui\\venv\\lib\\site-packages\\huggingface_hub\\utils\\_validators.py\", line 114, in _inner_fn\n    return fn(*args, **kwargs)\n  File \"C:\\aiOWN\\diffuser_webui\\venv\\lib\\site-packages\\diffusers\\models\\modeling_utils.py\", line 931, in from_pretrained\n    model_file = _merge_sharded_checkpoints(\n  File \"C:\\aiOWN\\diffuser_webui\\venv\\lib\\site-packages\\diffusers\\models\\model_loading_utils.py\", line 365, in _merge_sharded_checkpoints\n    raise FileNotFoundError(f\"Part file {file_name} not found.\")\nFileNotFoundError: Part file diffusion_pytorch_model-00003-of-00003.safetensors not found.\n```\n\n\n```\n- \ud83e\udd17 Diffusers version: 0.33.0.dev0\n- Platform: Windows-10-10.0.26100-SP0\n- Running on Google Colab?: No\n- Python version: 3.10.11\n- PyTorch version (GPU?): 2.5.1+cu124 (True)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Huggingface_hub version: 0.27.1\n- Transformers version: 4.48.1\n- Accelerate version: 1.4.0.dev0\n- PEFT version: 0.14.1.dev0\n- Bitsandbytes version: 0.45.1\n- Safetensors version: 0.5.2\n- xFormers version: not installed\n- Accelerator: NVIDIA GeForce RTX 4060 Laptop GPU, 8188 MiB\n- Using GPU in script?: <fill in>\n- Using distributed or parallel set-up in script?: <fill in>\n- \n```",
    "url": "https://github.com/huggingface/diffusers/issues/10710",
    "state": "closed",
    "labels": [],
    "created_at": "2025-02-03T17:42:37Z",
    "updated_at": "2025-02-23T17:56:26Z",
    "comments": 4,
    "user": "nitinmukesh"
  },
  {
    "repo": "huggingface/trl",
    "number": 2754,
    "title": "How to do multi-node training for GRPO with DeepSpeed + vLLM?",
    "body": "### Multi-Node Request \n\nI am interested in doing multi-node (4 x 8 GPUs) reinforcement fine-tuning of 8B (or 14B) models using GRPO. However, given that at least 1 GPU needs to be assigned to vLLM, I am not sure how to exactly run multi-node setup? Would it be possible for you to share a simple set of scripts (config files and main .py file) with which I can test locally?\n\n### Possible to give more GPUs to vLLM?\n\nAlso, in case of multi-node training, would it better to assign more GPUs to vLLM for faster (distributed) generation? Currently if I pass \u201ccuda:6,7\u201d, then it throws an error saying expected base 10 single digit number.\n",
    "url": "https://github.com/huggingface/trl/issues/2754",
    "state": "closed",
    "labels": [
      "\ud83d\ude80 deepspeed",
      "\ud83c\udfcb GRPO"
    ],
    "created_at": "2025-02-03T16:03:23Z",
    "updated_at": "2025-03-22T12:51:19Z",
    "user": "nikhilchandak"
  },
  {
    "repo": "pytorch/ao",
    "number": 1653,
    "title": "[Doc] gemlite version",
    "body": "What gemlite version is required/supported? Can we specify this in the readme?",
    "url": "https://github.com/pytorch/ao/issues/1653",
    "state": "closed",
    "labels": [
      "topic: documentation",
      "question"
    ],
    "created_at": "2025-02-03T14:26:29Z",
    "updated_at": "2025-05-02T18:00:20Z",
    "user": "bhack"
  },
  {
    "repo": "pytorch/text",
    "number": 2283,
    "title": "import torchtext fails",
    "body": "## \ud83d\udc1b Bug\n\nToday I installed torchtext in my Linux Ubuntu. When I tried to import torchtext into python, torchtext failed.\n\nDetails\n\n1. Ubuntu 24.04.1 LTS\n\n2. Python 3.12.3\n\n3. PyTorch Version    2.5.1+cu124  (running fine)\n\n4. During the torchtext install I saw messages suggesting that the version is 0.18, which according to what I read, is the last one to be supported.\n\n5. The error messages I get when I issue the command \"import torchtex\" are below.\n\n6. QUESTION:  Given that torchtext will not be supported any more, is there an alternative API for text processing in PyTorch that will take the role of torchtext?\n \n\n```\nimport torchtext\nTraceback (most recent call last):\n  File \"<stdin>\", line 1, in <module>\n  File \"/drv3/hm3/code/python/torch/lib/python3.12/site-packages/torchtext/__init__.py\", line 18, in <module>\n    from torchtext import _extension  # noqa: F401\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/drv3/hm3/code/python/torch/lib/python3.12/site-packages/torchtext/_extension.py\", line 64, in <module>\n    _init_extension()\n  File \"/drv3/hm3/code/python/torch/lib/python3.12/site-packages/torchtext/_extension.py\", line 58, in _init_extension\n    _load_lib(\"libtorchtext\")\n  File \"/drv3/hm3/code/python/torch/lib/python3.12/site-packages/torchtext/_extension.py\", line 50, in _load_lib\n    torch.ops.load_library(path)\n  File \"/drv3/hm3/code/python/torch/lib/python3.12/site-packages/torch/_ops.py\", line 1350, in load_library\n    ctypes.CDLL(path)\n  File \"/usr/lib/python3.12/ctypes/__init__.py\", line 379, in __init__\n    self._handle = _dlopen(self._name, mode)\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^\n```\n",
    "url": "https://github.com/pytorch/text/issues/2283",
    "state": "open",
    "labels": [],
    "created_at": "2025-02-03T01:20:48Z",
    "updated_at": "2025-02-03T01:20:48Z",
    "comments": 0,
    "user": "JuanVargas"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 673,
    "title": "configure_motor.py says it's increasing the max acceleration of feetech motors, but is decreasing it",
    "body": "I built my SO ARM 100s before reading the huggingface instructions, so I am trying to retroactively setup the servos properly.  I looked into configure_motor.py to see what it was doing so I could configure it manually, and I notice that for Feetech motors it sets Maximum_Acceleration to 254 to \" speedup acceleration and deceleration of the motors\".  I read that value from all of the servos in both arms and the setting I was shipped with is 306, which, I assume, means faster acceleration and deceleration than 254.",
    "url": "https://github.com/huggingface/lerobot/issues/673",
    "state": "closed",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2025-02-01T18:46:30Z",
    "updated_at": "2025-04-07T15:52:20Z",
    "user": "jbrownkramer"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 672,
    "title": "Limited Range of Motion in 'Elbow Flex' Motor on SO-100 Follower Arm",
    "body": "# Issue: Limited Range of Motion in 'Elbow Flex' Motor on SO-100 Follower Arm\n\n## Description\nIn my build of the SO-100 arm, the follower arm exhibits an issue where the motor labeled **'elbow flex'** is restricted to a movement range of approximately **90 degrees from the rest position**.\n\n## Steps Taken to Troubleshoot\nI have attempted the following troubleshooting steps:\n\n- **Checked the servo separately**: The servo itself functions correctly and can move the full 360-degree range without issues.\n- **Tested manual movement**: Manually tested the servo under normal teleoperation conditions with the weight of the arm.\n- **Re-calibrated multiple times**: Repeated calibration to see if the issue persists.\n- **Modified calibration JSON manually**: Editing the JSON file generated after calibration had no effect. The **homing_offset** field is the only one that causes any noticeable changes, but it only shifts the relative position of the follower to the leader, which is not a viable solution.\n- **Swapped servos**: Replaced the servo with a new one to rule out hardware failure, but the issue remains.\n\n## Expected Behavior\nThe **'elbow flex'** motor should be able to move the full intended range, similar to the leader arm, without being restricted to 90 degrees.\n\n## Actual Behavior\nThe motor is constrained to only about **90 degrees of movement** from its rest position, despite the servo itself being capable of full rotation.\n\n## Additional Notes\n- The issue seems to persist despite changes in hardware and re-calibration.\n- There may be an issue with how the calibration data is applied or interpreted.\n- Any insights into possible firmware, software, or mechanical constraints would be appreciated.\n\n---\nWould appreciate any help or guidance on resolving this issue!\n",
    "url": "https://github.com/huggingface/lerobot/issues/672",
    "state": "closed",
    "labels": [
      "question",
      "robots",
      "stale"
    ],
    "created_at": "2025-02-01T15:01:59Z",
    "updated_at": "2025-10-20T02:31:48Z",
    "user": "ParzivalExtrimis"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 146241,
    "title": "How to perform BF16 matrix multiplication so that multiplication is done in BF16 and summation is done in FP32 efficiently using pytorch API?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nNVIDIA's cutlass library can perform BF16 matrix multiplication so that multiplication is done in BF16 and summation is done in FP32 for improved numerical stability. For example, consider the following snippet from [this code example from flash-attention](https://github.com/Dao-AILab/flash-attention/blob/02541ac9e8382f4d8e17f1f2ba0d7de2c792390c/csrc/flash_attn/src/flash_fwd_kernel.h#L319) calling it: \n```\n        FLASH_NAMESPACE::gemm</*A_in_regs=*/Kernel_traits::Is_Q_in_regs>(\n            acc_s, tSrQ, tSrK, tSsQ, tSsK, tiled_mma, smem_tiled_copy_Q, smem_tiled_copy_K,\n            smem_thr_copy_Q, smem_thr_copy_K\n        );\n```\nwhere `tSrQ`, `tSrK`, `tSsQ`, `tSsK` is BF16/FP16, while final result `acc_s` is FP32.\n\nI notice [pytorch's BF16 matrix mulitiplication](https://pytorch.org/docs/stable/notes/numerical_accuracy.html#reduced-precision-reduction-for-fp16-and-bf16-gemms) will use FP32 as intermediate accumulations, but final result is downcast to BF16 anyway. I experimented with the `out` parameter and `autocast`, but neither provided a complete solution.\n\nSurely, below code can implement BF16 matrix multiplication so that multiplication is done in BF16 and summation is done in FP32\n```\nA = torch.randn((12, 3, 4, 5), dtype=torch.bfloat16)\nB = torch.randn((12, 3, 5, 6), dtype=torch.bfloat16)\nC = torch.einsum(\"...ij,...jk->...ijk\", A, B).sum(dtype=torch.float32, dim=-2)\n```\nHowever, I have serious reservations about the speed and memory efficiency of this approach. I wonder if There is a more pytorch way to call the corresponding CUTLASS API.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @ptrblck @msaroufim @eqy @jianyuh @nikitaved @pearu @mruberry @walterddr @xwang233 @Lezcano @albanD",
    "url": "https://github.com/pytorch/pytorch/issues/146241",
    "state": "closed",
    "labels": [
      "module: cuda",
      "triaged",
      "module: linear algebra",
      "module: python frontend",
      "matrix multiplication"
    ],
    "created_at": "2025-02-01T13:13:18Z",
    "updated_at": "2025-04-18T05:02:40Z",
    "user": "Wongboo"
  },
  {
    "repo": "pytorch/xla",
    "number": 8660,
    "title": "Torch XLA Model all_gather does not work with tensors of different sizes along dimension 0",
    "body": "## \ud83d\udc1b Bug\nTorch XLA Model all_gather works with tensors of same size along `dim=0`, but if tensor sizes are different along `dim=0`, it hangs.\n\n## To Reproduce\n\nSave this code in `test_all_gather.py` \n\n```\nimport torch\nimport torch_xla.core.xla_model as xm\nimport torch_xla.runtime as xr\nimport torch_xla.distributed.xla_backend as xb\nimport torch.distributed\n\n\ndef test_all_gather():\n\n    same = [512, 512, 512, 512, 512, 512, 512, 512]\n\n    different = [416, 536, 560, 544, 576, 512, 592, 360]\n    torch.distributed.init_process_group(backend=\"xla\", init_method=\"xla://\")       \n\n    rank = torch.distributed.get_rank()\n    device = xm.xla_device()\n    input = torch.randn((same[rank], 16), dtype=torch.float32, device=device)\n    \n    all_inputs = xm.all_gather(input, dim=0, groups=[[0,1,2,3,4,5,6,7]], pin_layout=False)\n    print(f\"!!!!!! rank: {rank}, all_inputs: {all_inputs}\")\n    \n    input = torch.randn((different[rank], 16), dtype=torch.float32, device=device)\n    \n    all_inputs = xm.all_gather(input, dim=0, groups=[[0,1,2,3,4,5,6,7]], pin_layout=False)\n    \n    print(f\"!!!!!! rank: {rank}, all_inputs: {all_inputs}\")\n    torch.distributed.destroy_process_group()\n    \nif __name__ == \"__main__\":\n    test_all_gather()\n```\n\n```\ntorchrun --nproc_per_node=8 test_all_gather.py\n```\n\n## Expected behavior\n\nIt should gather all the tensors from all the devices along `dim=0`\n\n## Environment\n\nDocker image\n`us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:r2.5.0_3.10_cuda_12.4`\n\n\n## Additional context\n\nAccording to this documentation for `all_gather` https://pytorch.org/docs/stable/distributed.html uneven tensor sizes are supported.\n",
    "url": "https://github.com/pytorch/xla/issues/8660",
    "state": "open",
    "labels": [
      "enhancement",
      "distributed",
      "usability"
    ],
    "created_at": "2025-01-31T22:02:27Z",
    "updated_at": "2025-03-04T22:52:46Z",
    "comments": 6,
    "user": "ajayvohra2005"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3207,
    "title": "How to increase batch size by using multiple gpus?",
    "body": "Hello! My fine-tuned model need a large batch size to get the best performance. I have multiple gpus with 40G VRAM each. How can i use them together to enlarge the batch size?  Currently i can only set the batch size be 3 per GPU and seems they won't share the datas. How can i make the total batch size become 24?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3207",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-31T18:00:08Z",
    "updated_at": "2025-02-19T10:36:28Z",
    "user": "13918763630"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 813,
    "title": "HSDP causes loss instability",
    "body": "I have a codebase forked from torchtitan with minor changes. FSDP trains very well with minimal instability, but HSDP on the same codebase exhibits loss spikes.\n\nIs there some reason for this you folks can think of? Note that I have implemented gradient accumulation in my fork, though without changing any sharding behavior (just to accumulate the gradients on a larger batchsize)",
    "url": "https://github.com/pytorch/torchtitan/issues/813",
    "state": "closed",
    "labels": [
      "question",
      "module: fsdp"
    ],
    "created_at": "2025-01-31T03:27:09Z",
    "updated_at": "2025-08-21T03:06:46Z",
    "user": "apkumar"
  },
  {
    "repo": "pytorch/vision",
    "number": 8889,
    "title": "Torchvision 0.20.1 looks for jpeg9 on MacOS, while depending on libjpeg-turbo which only provides jpeg8",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi, I tried to create a new conda environment torch + torchvision + torchaudio + blas accelerate on a MacOS 14. \n\nPost installation, when I try to import the torchvision library, I get a warning about missing libjpeg9.\n\nI have added more details below. Just wanted to bring this to your attention for triage and if there is an issue to be fixed. Cheers!\n\n\n(Replaced full path with CONDA_PREFIX and added newlines to make it clearer)\n\n```bash\nmamba create -n env -c pytorch 'pytorch=2.5.1' torchvision torchaudio 'libblas=*=*accelerate'\nmamba run -n env python\nPython 3.12.8 | packaged by conda-forge | (main, Dec  5 2024, 14:19:53) [Clang 18.1.8 ] on darwin\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> import torchvision\n{CONDA_PREFIX}/lib/python3.12/site-packages/torchvision/io/image.py:14: UserWarning: Failed to load image Python extension: 'dlopen({CONDA_PREFIX}/lib/python3.12/site-packages/torchvision/image.so, 0x0006): Library not loaded: @rpath/libjpeg.9.dylib\n  Referenced from: <367D4265-B20F-34BD-94EB-4F3EE47C385B>{CONDA_PREFIX}/lib/python3.12/site-packages/torchvision/image.so\n  Reason: tried: \n'{CONDA_PREFIX}/lib/python3.12/site-packages/torchvision/../../../libjpeg.9.dylib' (no such file),\n'{CONDA_PREFIX}/lib/python3.12/site-packages/torchvision/../../../libjpeg.9.dylib' (no such file), \n'{CONDA_PREFIX}/lib/python3.12/lib-dynload/../../libjpeg.9.dylib' (no such file), \n'{CONDA_PREFIX}/bin/../lib/libjpeg.9.dylib' (no such file)'\nIf 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?\n  warn(\n>>>\n```\n\nI tried to find the jpeg libraries in the conda environment with find command\n\n```bash\nfind ${CONDA_PREFIX} -name 'libjpeg*.dylib'                                                                                                                                                                                                         \n{CONDA_PREFIX}/lib/libjpeg.8.3.2.dylib\n{CONDA_PREFIX}/lib/libjpeg.8.dylib\n{CONDA_PREFIX}/lib/libjpeg.dylib\n```\n\nWhen I run `otool`, I see that it is linked against jpeg9, while installing libjpeg-turbo as a dependency, which only provides jpeg8.\n\n```\n$ otool -L $CONDA_PREFIX/lib/python3.1/site-packages/torchvision/image.so\n{CONDA_PREFIX}/lib/python3.1/site-packages/torchvision/image.so:\n        @rpath/libpng16.16.dylib (compatibility version 56.0.0, current version 56.0.0)\n        @rpath/libjpeg.9.dylib (compatibility version 15.0.0, current version 15.0.0)\n        @rpath/libwebp.7.dylib (compatibility version 9.0.0, current version 9.8.0)\n        @rpath/libc10.dylib (compatibility version 0.0.0, current version 0.0.0)\n        @rpath/libtorch.dylib (compatibility version 0.0.0, current version 0.0.0)\n        @rpath/libtorch_cpu.dylib (compatibility version 0.0.0, current version 0.0.0)\n        @rpath/libtorch_python.dylib (compatibility version 0.0.0, current version 0.0.0)\n        @rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)\n        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)\n```\n\nconda packages\n```\n  blas                2.128       accelerate              conda-forge\n  blas-devel          3.9.0       28_h55bc449_accelerate  conda-forge\n  brotli-python       1.1.0       py312hde4cb15_2         conda-forge\n  bzip2               1.0.8       h99b78c6_7              conda-forge\n  ca-certificates     2024.12.14  hf0a4a13_0              conda-forge\n  certifi             2024.12.14  pyhd8ed1ab_0            conda-forge\n  cffi                1.17.1      py312h0fad829_0         conda-forge\n  charset-normalizer  3.4.1       pyhd8ed1ab_0            conda-forge\n  cpython             3.12.8      py312hd8ed1ab_1         conda-forge\n  filelock            3.17.0      pyhd8ed1ab_0            conda-forge\n  freetype            2.12.1      hadb7bae_2              conda-forge\n  giflib              5.2.2       h93a5062_0              conda-forge\n  gmp                 6.3.0       h7bae524_2              conda-forge\n  gmpy2               2.1.5       py312h524cf62_3         conda-forge\n  h2                  4.1.0       pyhd8ed1ab_1            conda-forge\n  hpack               4.1.0       pyhd8ed1ab_0            conda-forge\n  hyperframe          6.1.0       pyhd8ed1ab_0            conda-forge\n  idna                3.10        pyhd8ed1ab_1            conda-forge\n  jinja2              3.1.5       pyhd8ed1ab_0            conda-forge\n  lcms2               2.16        ha0e7c42_0              conda-forge\n  lerc                4.0.0       h9a09cb3_0              conda-forge\n  libblas             3.9.0       28_h504e6c8_accelerate  conda-forge\n  libcblas            3.9.0       28_h8d39bcd_accelerate  conda-forge\n  libcxx              19.1.7      ha82da77_0              conda-forge\n  libdeflate          ",
    "url": "https://github.com/pytorch/vision/issues/8889",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-30T16:57:13Z",
    "updated_at": "2025-09-22T13:02:58Z",
    "comments": 4,
    "user": "IMG-PRCSNG"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2174,
    "title": "Support for ONNX export of SeamlessM4TModel",
    "body": "### Feature request\n\nAdd SeamlessM4Tv2 Model support to onnx_export_from_model.\n\n\n### Motivation\n\nBeing able to deploy SeamlessM4Tv2 models to production using onnx.\n\n### Your contribution\n\nI got the speech-to-text model to ONNX, but I'm not able to generate the audio as expected, even though I'm trying to give the tgt_lang_token_ids as decoder_input_ids. I could help with by submitting a PR, but I might start creating the model_config/model_patcher first if it is needed.\n\n\nEDIT: I got the speech-to-text model, not the speech-to-speech model. I'd like to export the t2u_model and the vocoder to onnx, but it seems that is giving problems, any advice on how to do it?",
    "url": "https://github.com/huggingface/optimum/issues/2174",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2025-01-30T15:10:31Z",
    "updated_at": "2025-03-18T02:07:02Z",
    "comments": 3,
    "user": "AlArgente"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 145978,
    "title": "What is the recommended way to use Distributed Checkpointing Save/Load with HSDP?",
    "body": "### \ud83d\udc1b Describe the bug\n\nThere are torch distributed checkpointing examples in [torch/distributed/checkpoint/examples](https://github.com/pytorch/pytorch/tree/main/torch/distributed/checkpoint/examples). All of these examples use FSDP. Running these examples out of the box has no issues, the loaded checkpoint state matches the saved checkpoint state. However, when I convert these examples to run HSDP instead of FSDP, I notice that loaded state no longer matches the saved state. \n\nHow I am converting from FSDP to HSDP:\n```\nmodel = FSDP(\n                torch.nn.Linear(4, 4).cuda(dist.get_rank()),\n                device_mesh=mesh,\n                sharding_strategy=ShardingStrategy.HYBRID_SHARD\n            )\n```\n\n[Link](https://gist.github.com/gkroiz/fcf5ed19665bc09475057f8bf626e853) to gist of updated [torch/distributed/checkpoint/examples/fsdp_checkpoint_example.py](https://github.com/pytorch/pytorch/blob/main/torch/distributed/checkpoint/examples/fsdp_checkpoint_example.py) with HSDP modifications and printed output.\n\nI also made similar changes to [torch/distributed/checkpoint/examples/stateful_example.py](https://github.com/pytorch/pytorch/blob/main/torch/distributed/checkpoint/examples/stateful_example.py) and saw the same discrepancies between saved and loaded state.\n\nEither (1) I'm setting up HSDP + distributed checkpointing incorrectly or (2) there is a bug with distributed checkpointing. Assuming (1), what is the correct way to set up HSDP + distributed checkpointing?\n\n### Versions\n\n```\nmy_vm:/workspace# python collect_env.py\n/usr/local/lib/python3.10/dist-packages/torch/utils/_pytree.py:185: FutureWarning: optree is installed but the version is too old to support PyTorch Dynamo in C++ pytree. C++ pytree support is disabled. Please consider upgrading optree using `python3 -m pip install --upgrade 'optree>=0.13.0'`.\n  warnings.warn(\nCollecting environment information...\nPyTorch version: 2.6.0+cu124\nIs debug build: False\nCUDA used to build PyTorch: 12.4\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 22.04.4 LTS (x86_64)\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nClang version: Could not collect\nCMake version: version 3.30.0\nLibc version: glibc-2.35\n\nPython version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (64-bit runtime)\nPython platform: Linux-6.6.44+-x86_64-with-glibc2.35\nIs CUDA available: True\nCUDA runtime version: 12.5.82\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: \nGPU 0: NVIDIA H100 80GB HBM3\nGPU 1: NVIDIA H100 80GB HBM3\nGPU 2: NVIDIA H100 80GB HBM3\nGPU 3: NVIDIA H100 80GB HBM3\nGPU 4: NVIDIA H100 80GB HBM3\nGPU 5: NVIDIA H100 80GB HBM3\nGPU 6: NVIDIA H100 80GB HBM3\nGPU 7: NVIDIA H100 80GB HBM3\n\nNvidia driver version: 550.90.07\ncuDNN version: Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.3.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.3.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.3.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.3.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.3.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.3.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.3.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.3.0\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        52 bits physical, 57 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               208\nOn-line CPU(s) list:                  0-207\nVendor ID:                            GenuineIntel\nModel name:                           Intel(R) Xeon(R) Platinum 8481C CPU @ 2.70GHz\nCPU family:                           6\nModel:                                143\nThread(s) per core:                   2\nCore(s) per socket:                   52\nSocket(s):                            2\nStepping:                             8\nBogoMIPS:                             5399.99\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 arat avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid cldemote movdiri movdir64b fsrm md_clear serialize amx_bf16 avx512_fp16 amx_tile amx_int8 arch_capabilities\nHypervisor vendor:                    KVM\nVirtualization type:                  full\nL1d cache:                            4.9 MiB (104 instances)\nL1i cache:              ",
    "url": "https://github.com/pytorch/pytorch/issues/145978",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "triaged",
      "release notes: distributed (checkpoint)",
      "oncall: distributed checkpointing"
    ],
    "created_at": "2025-01-29T22:24:11Z",
    "updated_at": "2025-04-08T15:58:03Z",
    "user": "gkroiz"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10683,
    "title": "Would anyone consider a diffusers export_to_frames utility fuction?",
    "body": "**Is your feature request related to a problem? Please describe.**\nThe current `export_to_video` function in Hugging Face's Diffusers library exports a compressed video, but it's not straightforward for users to obtain raw, lossless PNG frames from a list of frames. This can be a problem for users who need to work with individual frames or want to export them in a specific format as part of a workflow.\n\n**Describe the solution you'd like.**\nI propose introducing a new function, `export_to_frames`, in `huggingface/diffusers/utils/export_utils.py`. This function would take a the frames (either NumPy arrays or PIL Image objects) and export each frame as a separate PNG file in a specified output directory. The function would also allow users to specify the frame rate and output directory.\n\n**Describe alternatives you've considered.**\nWhile users can currently solve this problem on their own by using other libraries or writing custom code, it would be beneficial to provide a simple and standard method for exporting raw, uncompressed PNG frames. This would save users time and effort, and make the Diffusers library more user-friendly.\n\n**Additional context.**\nI've included very rough example implementation of the proposed `export_to_frames` function below:\n\n`\ndef export_to_frames(\n    video_frames: Union[List[np.ndarray], List[PIL.Image.Image]], output_dir: str = None, fps: int = 10\n) -> str:\n    \"\"\"\n    Export each frame in a list of frames to a directory.\n\n    Args:\n        video_frames (Union[List[np.ndarray], List[PIL.Image.Image]]): A list of frames.\n        output_dir (str, optional): The directory where the frames will be saved. Defaults to None.\n        fps (int, optional): The frame rate. Defaults to 10.\n\n    Returns:\n        str: The path to the output directory.\n    \"\"\"\n\n    try:\n        imageio.plugins.ffmpeg.get_exe()\n    except AttributeError:\n        raise AttributeError(\n            (\n                \"Found an existing imageio backend in your environment. Attempting to export frames with imageio. \\n\"\n                \"Unable to find a compatible ffmpeg installation in your environment to use with imageio. Please install via pip install imageio-ffmpeg\"\n            )\n        )\n    print( \"video_frames\",len(video_frames) )\n\n    if isinstance(video_frames[0], np.ndarray):\n        print( \"numpy\")\n        video_frames = [(frame * 255).astype(np.uint8) for frame in video_frames]\n\n    elif isinstance(video_frames[0], PIL.Image.Image):\n        print( \"PIL\")\n        video_frames = [np.array(frame) for frame in video_frames]\n\n    print( \"video_frames\",len(video_frames) )\n\n    for i, frame in enumerate(video_frames):\n        print( \"frame\", i )\n        filename = f\"frame_{i:04d}.png\"\n        if isinstance(frame, np.ndarray):\n            print(\"wrote via np\")\n            imageio.imwrite(os.path.join(output_dir, filename), frame)\n        elif isinstance(frame, PIL.Image.Image):\n            print(\"wrote via PIL\")\n            frame.save(os.path.join(output_dir, filename))\n\n    return output_dir`\n\nThis rough function was tested briefly but should be rewritten I'm just using it for illustrative purposes since it worked. Please let me know if this idea is worth considering further and if we could proceed with something like this in the standard utilities in future?",
    "url": "https://github.com/huggingface/diffusers/issues/10683",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-01-29T17:30:21Z",
    "updated_at": "2025-03-26T15:04:10Z",
    "comments": 4,
    "user": "lovetillion"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1174,
    "title": "How to create a new onnx TTS model like mms-tts-eng",
    "body": "### Question\n\nFirst of all, congratulations on such a great library!\n\nI would like to ask for your guidance and assistance in creating a new onnx model similar to the following one:  \n\nhttps://huggingface.co/Xenova/mms-tts-eng/tree/main  \n\n\u2026but for the Malagasy language:  \n\nhttps://huggingface.co/facebook/mms-tts-mlg  \n\nCould you provide me with some advice on how to create that model?\n\nThank you so much.",
    "url": "https://github.com/huggingface/transformers.js/issues/1174",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-29T16:02:13Z",
    "updated_at": "2025-02-05T12:48:57Z",
    "user": "elloza"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 113,
    "title": "What is the GPU resource required to run Open-R1 (Deepseek-R1) locally?",
    "body": "I am trying to run it using Ollama with Open WebUI in a docker container, does it required a dedicated GPU with high VRAM or an integrated GPU? \n\nWhich model (8 billion, 9 billion, 12 billion) can be required with each GPU VRAM?",
    "url": "https://github.com/huggingface/open-r1/issues/113",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-29T14:08:47Z",
    "updated_at": "2025-01-29T21:17:17Z",
    "user": "ruidazeng"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 100,
    "title": "What is the compute needed for GRPO for 7B R1-Distill model?",
    "body": "Anybody who has tried GRPO over any of the R1-Distill models: what is the minimum GPU compute requirement to run the training?\nLet's say for R1-Distill-Qwen-7B ?\n\nI am talking about this from the README:\n\n### GRPO\n```\naccelerate launch --config_file configs/zero3.yaml src/open_r1/grpo.py \\\n    --output_dir DeepSeek-R1-Distill-Qwen-7B-GRPO \\\n    --model_name_or_path deepseek-ai/DeepSeek-R1-Distill-Qwen-7B \\\n    --dataset_name AI-MO/NuminaMath-TIR \\\n    --max_prompt_length 256 \\\n    --per_device_train_batch_size 1 \\\n    --gradient_accumulation_steps 16 \\\n    --logging_steps 10 \\\n    --bf16\n```",
    "url": "https://github.com/huggingface/open-r1/issues/100",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-29T03:01:03Z",
    "updated_at": "2025-02-10T09:17:47Z",
    "user": "iamansinha"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10677,
    "title": "Support for training with Grayscale images?",
    "body": "I am trying to train an unconditional diffusion model on grayscale images using your [pipeline](https://huggingface.co/docs/diffusers/training/unconditional_training). When running training with the default parameters I discovered inferred images that contained colour (specifically green). Where it learnt such colours from I do not know but I would predict the issue lies within the initial processing of the image set:\n\n`images = [augmentations(image.convert(\"RGB\")) for image in examples[\"image\"]]`\n\nas such I created a fork of this [repo ](https://github.com/DavidGill159/diffusers/tree/main/examples/unconditional_image_generation)and changed this line to:\n\n`images = [augmentations(image.convert(\"L\")) for image in examples[\"image\"]]`\n\nI also updated the model configuration (UNet2DModel) to work with single-channel inputs and outputs by setting `in_channels=1` and `out_channels=1` when initialising the model.\n\nAm I on the right track? or does the resolution lie elsewhere? I also noticed the resolution of the inferred images is very poor; not on par with the training set. What parameters can I adjust to improve this?\n**Ultimately I am interested in a diffusion model that focuses more on the textural composition of images, rather than the colou**r. ",
    "url": "https://github.com/huggingface/diffusers/issues/10677",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-01-28T22:25:19Z",
    "updated_at": "2025-02-28T15:02:57Z",
    "comments": 1,
    "user": "DavidGill159"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 811,
    "title": "FSDP checkpoints don't load when run is restarted with greater world size",
    "body": "A checkpoint is saved from an 8-GPU run with `dp_shard ` set to 8 and all other parallelisms set to 1. My understanding is that this is configured as an FSDP run.\n\nThe checkpoint is resumed from 16 GPUs with `dp_shard` now set to 16. When loading the checkpoint, we get this error:\n\n```\n[rank0]: Traceback (most recent call last): (RANK 15)                                                                                            [rank0]:   File \"/app/.venv/lib/python3.10/site-packages/torch/distributed/checkpoint/utils.py\", line 164, in reduce_scatter                     [rank0]:     local_data = map_fun()                                                                                                              [rank0]:   File \"/app/.venv/lib/python3.10/site-packages/torch/distributed/checkpoint/logger.py\", line 83, in wrapper                            \n[rank0]:     result = func(*args, **kwargs)                                                                                                      \n[rank0]:   File \"/app/.venv/lib/python3.10/site-packages/torch/distributed/checkpoint/state_dict_loader.py\", line 211, in local_step             \n[rank0]:     local_plan = planner.create_local_plan()                                                                                            \n[rank0]:   File \"/app/.venv/lib/python3.10/site-packages/torch/distributed/checkpoint/default_planner.py\", line 233, in create_local_plan        \n[rank0]:     return create_default_local_load_plan(                                                                                              \n[rank0]:   File \"/app/.venv/lib/python3.10/site-packages/torch/distributed/checkpoint/default_planner.py\", line 354, in create_default_local_load\n[rank0]:     raise RuntimeError(f\"Missing key in checkpoint state_dict: {fqn}.\")                                                                 \n[rank0]: RuntimeError: Missing key in checkpoint state_dict: dataloader.dp_rank_15.  \n```\n\nMy understanding is that torch distributed checkpoints are supposed to support dynamic resharding at load time. Does this not work with torchtitan?\n\nI was able to successfully resume a checkpoint going down from 32 GPUs to 16.\n",
    "url": "https://github.com/pytorch/torchtitan/issues/811",
    "state": "closed",
    "labels": [
      "bug",
      "documentation",
      "enhancement",
      "module: fsdp"
    ],
    "created_at": "2025-01-28T21:38:09Z",
    "updated_at": "2025-02-07T01:22:26Z",
    "comments": 4,
    "user": "darkmirage"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10675,
    "title": "Difference in Flux scheduler configuration max_shift",
    "body": "### Describe the bug\n\nCould you please check if the value of 1.16 here...\nhttps://github.com/huggingface/diffusers/blob/658e24e86c4c52ee14244ab7a7113f5bf353186e/src/diffusers/pipelines/flux/pipeline_flux.py#L78\n\n...is intentional or maybe a typo?\n\n`max_shift` is 1.15 both in the model configuration...\nhttps://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/scheduler/scheduler_config.json\n...and in the original inference code by BFL:\nhttps://github.com/black-forest-labs/flux/blob/d06f82803f5727a91b0cf93fcbb09d920761fba1/src/flux/sampling.py#L214\n\n\n\n### Reproduction\n\n-\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\n-\n\n### Who can help?\n\n@yiyixuxu @DN6",
    "url": "https://github.com/huggingface/diffusers/issues/10675",
    "state": "closed",
    "labels": [
      "bug",
      "good first issue",
      "help wanted",
      "contributions-welcome"
    ],
    "created_at": "2025-01-28T20:35:58Z",
    "updated_at": "2025-02-18T06:54:58Z",
    "comments": 2,
    "user": "dxqb"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1171,
    "title": "Does the image generation model support using LoRA?",
    "body": "### Question\n\nI would like to implement an image generation feature to my website using a image generation model and a LoRA. Is LoRA supported in transformers.js?",
    "url": "https://github.com/huggingface/transformers.js/issues/1171",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-28T19:48:38Z",
    "updated_at": "2025-02-11T23:11:27Z",
    "user": "hunkim98"
  },
  {
    "repo": "pytorch/xla",
    "number": 8642,
    "title": "Make Mixtral pallas kernels Dynamo/AOTAutograd traceable",
    "body": "Similar to https://github.com/pytorch/xla/issues/8633, we'll need to refactor pallas kernels needed by Mixtral (e.g. GMM) into PyTorch custom ops in order to use scan in Mixtral.",
    "url": "https://github.com/pytorch/xla/issues/8642",
    "state": "open",
    "labels": [
      "enhancement",
      "pallas"
    ],
    "created_at": "2025-01-28T19:29:33Z",
    "updated_at": "2025-02-13T13:15:27Z",
    "comments": 1,
    "user": "tengyifei"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10672,
    "title": "Please support callback_on_step_end for following pipelines",
    "body": "**Is your feature request related to a problem? Please describe.**\nMissing callback_on_step_end in these pipeline takes away the capability to show the progress in UI\n\n**Describe the solution you'd like.**\nPlease support callback_on_step_end\n\n**Describe alternatives you've considered.**\nN.A.\n\n**Additional context.**\n1. AuraFlowPipeline\nTypeError: AuraFlowPipeline.__call__() got an unexpected keyword argument 'callback_on_step_end'\n\n2. LuminaText2ImgPipeline",
    "url": "https://github.com/huggingface/diffusers/issues/10672",
    "state": "closed",
    "labels": [
      "good first issue",
      "help wanted",
      "contributions-welcome"
    ],
    "created_at": "2025-01-28T16:26:56Z",
    "updated_at": "2025-02-16T17:28:58Z",
    "comments": 2,
    "user": "nitinmukesh"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1170,
    "title": "Processing in image encoding for Florence 2",
    "body": "### Question\n\nHi,\n\nwhile having a look at the code for generation with the Florence 2 model, I've noticed something weird. The original code for inference uses the [_encode_image](https://huggingface.co/microsoft/Florence-2-base-ft/blob/main/modeling_florence2.py#L2599) method for creating image features. However, looking at the [encode_image](https://github.com/huggingface/transformers.js/blob/main/src/models.js#L1861C1-L1874C6) used in `transformers.js`, I've noticed the postprocessing after the model forward pass is missing. Here's a minimal reproducible example:\n\n```python\nimport onnxruntime as ort\n\nfrom transformers import AutoModelForCausalLM, AutoProcessor\nfrom PIL import Image\n\n# The vision encoder was downloaded from:\n# https://huggingface.co/onnx-community/Florence-2-base-ft/resolve/main/onnx/vision_encoder.onnx\nONNX_MODEL_PATH = \"models/onnx/original/vision_encoder.onnx\"\nMODEL_NAME = \"microsoft/Florence-2-base-ft\"\n# Image download link:\n# https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png\nIMG_PATH = \"lena.png\"\nPROMPT = \"<MORE_DETAILED_CAPTION>\"\n\nprocessor = AutoProcessor.from_pretrained(\n    MODEL_NAME, trust_remote_code=True)\nmodel = AutoModelForCausalLM.from_pretrained(\n    MODEL_NAME, trust_remote_code=True)\n\nimage = Image.open(IMG_PATH)\ninputs = processor(text=PROMPT, images=image, return_tensors=\"pt\")\n\nhf_out = model._encode_image(inputs[\"pixel_values\"])\n\nort_vision_tower = ort.InferenceSession(ONNX_MODEL_PATH)\nort_out = ort_vision_tower.run(\n    None, {\"pixel_values\": inputs[\"pixel_values\"].numpy()})[0]\n\nprint(hf_out.cpu().detach().numpy())\nprint()\nprint(ort_out)\n```\nThe feature differences are pretty big:\n```\n[[[-0.4047455   0.51958734 -0.23121671 ...  1.0019573  -0.46846968\n    0.5289913 ]\n  [-0.08135182 -2.0622678  -0.50597775 ...  0.38061845 -0.7858853\n   -1.247189  ]\n  [ 0.69417834 -1.926735   -0.691345   ... -0.17574754 -0.98472327\n   -1.2420652 ]\n  ...\n  [ 0.018062    1.2185848  -0.04483193 ...  0.61767036 -0.1832848\n    0.9324351 ]\n  [-0.13765828  0.7120823   0.12478658 ... -0.44853052 -0.6390534\n    0.37095645]\n  [ 0.58084226  1.6617624  -0.43527135 ... -0.92560166 -0.47037867\n   -0.81996024]]]\n\n[[[-0.52661824  0.508744   -0.24130312 ...  0.91191643 -0.39472336\n    1.1632534 ]\n  [-0.18091503 -2.2187433  -0.7923498  ...  0.6103708  -0.49637306\n   -0.9830185 ]\n  [ 0.3002218  -1.9726763  -1.1151179  ... -0.11572987 -0.6870862\n   -0.96058726]\n  ...\n  [-0.08202907  0.8105656  -0.1748765  ...  1.0833437  -0.41167092\n    1.2495995 ]\n  [-0.01531404  0.6044417  -0.06392197 ... -0.30775025 -0.5735508\n    0.6775356 ]\n  [ 0.74322057  1.4011574  -0.5277405  ... -0.61488384 -0.40253094\n   -0.8440974 ]]]\n```\n\nAm I missing something here or is this a potential bug?",
    "url": "https://github.com/huggingface/transformers.js/issues/1170",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-27T16:13:28Z",
    "updated_at": "2025-03-02T14:37:52Z",
    "user": "ir2718"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 2956,
    "title": "How to give custom model code for TGI to run.",
    "body": "Is there a way to give custom model inference code for TGI to run during invocation? ",
    "url": "https://github.com/huggingface/text-generation-inference/issues/2956",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-27T10:37:55Z",
    "updated_at": "2025-01-27T10:37:55Z",
    "user": "ashwani-bhat"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10662,
    "title": "Feature Request: Image-to-Image Fine-Tuning Example",
    "body": "Hello, and thank you for maintaining this amazing repository!\nWhile working with the Diffusers library, I noticed there is a folder containing fine-tuning examples for text-to-image models but not for image-to-image fine-tuning.\n\nSince image-to-image models have many use cases (e.g., style transfer, image restoration, or domain-specific adaptation), a fine-tuning example for this task would greatly benefit the community and improve accessibility for users looking to customize such models.\n\nQuestions:\n\n* Is there any existing implementation or documentation for fine-tuning image-to-image models that I might have missed?\n* If not, is there a specific reason this example hasn't been provided yet (e.g., complexity, low demand)?\nI'd be happy to contribute or collaborate on this feature if it's considered valuable.\n\nThank you in advance for your time and response!",
    "url": "https://github.com/huggingface/diffusers/issues/10662",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-27T08:33:39Z",
    "updated_at": "2025-02-07T08:27:44Z",
    "comments": 6,
    "user": "YanivDorGalron"
  },
  {
    "repo": "pytorch/xla",
    "number": 8632,
    "title": "[scan] Avoid re-tracing the combine function on every call",
    "body": "## \ud83d\ude80 Feature\n\nIt should be possible to somehow cache the traced graphs in `torch_xla.experimental.scan` so we don't trace on every call.\n\n## Motivation\n\nToday `torch_xla.experimental.scan` and `scan_layers` traces the user function with both AOTAutograd (to get the backward) and with LazyTensor (to lower them to HLO). AOTAutograd is very slow and we can easily become tracing bound. For example, `python3 examples/train_decoder_only_base.py` takes 1min30s but `python3 examples/train_decoder_only_base.py scan.decoder_with_scan.DecoderWithScan` takes 4min.\n\n## Pitch\n\nWe could wait for `torch.scan` to support autograd (c.f. https://github.com/pytorch/xla/pull/7901#issuecomment-2546903424) which will take a long time. In the meantime, we can implement some simple caching based on the `id` of the input function/module.\n\nThe caching should be opt-in because it's only sound if the function is pure. We can add a `assume_pure=True` argument to `scan` so that it only uses the caching when the user confirms that their function is pure.",
    "url": "https://github.com/pytorch/xla/issues/8632",
    "state": "closed",
    "labels": [
      "enhancement",
      "good first issue",
      "performance"
    ],
    "created_at": "2025-01-27T06:30:47Z",
    "updated_at": "2025-06-19T20:02:13Z",
    "comments": 21,
    "user": "tengyifei"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 248,
    "title": "How to load full finetune for inference?",
    "body": "### Feature request  / \u529f\u80fd\u5efa\u8bae\n\n![Image](https://github.com/user-attachments/assets/c352bc74-8d56-4090-a46d-3c9a4bdf1a9d)\n\n### Motivation / \u52a8\u673a\n\nIt seems like only lora inference example in README.MD\n\n### Your contribution / \u60a8\u7684\u8d21\u732e\n\ntest the full finetune(LTX-VIDEO,Cogxvideo)",
    "url": "https://github.com/huggingface/finetrainers/issues/248",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-27T03:49:57Z",
    "updated_at": "2025-01-27T06:27:18Z",
    "user": "BlackTea-c"
  },
  {
    "repo": "pytorch/text",
    "number": 2282,
    "title": "combining TEXT.build_vocab with BERT Embedding",
    "body": "## \u2753 Questions and Help\n\n**Description**\n\nHi, we can use glove embedding when building vocab, using\nsomething like:\n\n```\nMIN_FREQ = 2\n\nTEXT.build_vocab(train_data, \n                 min_freq = MIN_FREQ,\n                 vectors = \"glove.6B.300d\",\n                 unk_init = torch.Tensor.normal_)\n```\n\n<!-- Please send questions or ask for help here. -->\n\nHowever, I want to use BERT embedding because I need a sophisticated model to compare the performance of multiple embeddings. How can I use BERT in build_vocab?",
    "url": "https://github.com/pytorch/text/issues/2282",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-27T02:11:21Z",
    "updated_at": "2025-01-27T02:11:21Z",
    "comments": 0,
    "user": "muhalfian"
  },
  {
    "repo": "huggingface/Google-Cloud-Containers",
    "number": 143,
    "title": "Route to /generate and /metrics",
    "body": "Hello team, thanks for supporting :)\n\nInside https://github.com/huggingface/text-generation-inference/blob/main/router/src/server.rs file,\n\nthere is a route for google cloud definition as below.\n\n    #[cfg(feature = \"google\")]\n    {\n        tracing::info!(\"Built with `google` feature\");\n        tracing::info!(\n            \"Environment variables `AIP_PREDICT_ROUTE` and `AIP_HEALTH_ROUTE` will be respected.\"\n        );\n        if let Ok(env_predict_route) = std::env::var(\"AIP_PREDICT_ROUTE\") {\n            app = app.route(&env_predict_route, post(vertex_compatibility));\n        }\n        if let Ok(env_health_route) = std::env::var(\"AIP_HEALTH_ROUTE\") {\n            app = app.route(&env_health_route, get(health));\n        }\n    }\n\nCurrently, there is no way to access /generate through VAI because if we define AIP_PREDICT_ROUTE outside of container then it creates new path for prediction.\nThe problem is that new features like json generation (https://huggingface.co/docs/text-generation-inference/en/guidance) only supports through /generate path.\n\nCan we change this pattern that if AIP_PREDICT_ROUTE or AIP_HEALTH_ROUTE points existing path, then do nothing ?\n\nThen we can route default VAI predict path to /generate and also expose /metrics path through VAI health path.",
    "url": "https://github.com/huggingface/Google-Cloud-Containers/issues/143",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-27T02:02:28Z",
    "updated_at": "2025-01-31T11:44:05Z",
    "user": "jk1333"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2171,
    "title": "Adding Phi3 support in BetterTransformer (to use the microsoft/phi-4 model)",
    "body": "### Feature request\n\nHello,\n\nIs it possible to add the phi3 architecture to BetterTransformer supported models?\n\n### Motivation\n\nNan\n\n### Your contribution\n\nNan",
    "url": "https://github.com/huggingface/optimum/issues/2171",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2025-01-26T19:10:34Z",
    "updated_at": "2025-03-04T02:05:22Z",
    "comments": 2,
    "user": "majdabd"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1167,
    "title": "How to create and use a customized voice in a tts pipeline?",
    "body": "### Question\n\nHi transformers.js community!\nI am new here and I\u2019d like to ask how to create a new voice and use it inside the current tts pipeline? I just create a next.js project and I can run the text-to-speech model in the tutorial, like following code,\n```\n const synthesizer = await pipeline('text-to-speech', 'Xenova/speecht5_tts', { quantized: false }); \n const speaker_embeddings = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/speaker_embeddings.bin';\n const out = await synthesizer('Hello, my dog is cute', { speaker_embeddings });`\n```\nNow I want to create a new voice and use it in the pipeline, how should I do? Can I realize it in the same environment? (The speaker creation  and speech generation are both processed in the next.js web app). I have searched the web but there is no any tutorials or demo on that, looking forward for the answers! \n\nBest!",
    "url": "https://github.com/huggingface/transformers.js/issues/1167",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-26T17:44:57Z",
    "updated_at": "2025-02-11T02:55:40Z",
    "user": "gonggqing"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 56,
    "title": "How to supervise non-math data?",
    "body": "I see the accuracy reward only can check the numerical equal? But what if my question is MCQ and asking an option? \n\nI did a quick check and find it's not working.\n\n```\nfrom math_verify import parse, verify\n\n# Parse the gold and answer\n# If you know that gold will only contain latex or expr (no latex env), use\n# parse(gold, extraction_config=[LatexExtractionConfig()]) or parse(gold, extraction_config=[ExprExtractionConfig()])\n\ngold = parse(\"So the answer is B\")\nanswer = parse(\"B\")\n\nprint(gold)\nprint(answer)\n# Order here is important!\nprint(verify(gold, answer))\n\n\n[]\n[]\nFalse\n```",
    "url": "https://github.com/huggingface/open-r1/issues/56",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-26T14:30:13Z",
    "updated_at": "2025-01-26T17:52:58Z",
    "user": "Luodian"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10655,
    "title": "How to use custon dataset in train_dreambooth_flux.py.",
    "body": "Hi. what if i want to train two images with two different prompts. somethink like m1.jpeg , m1.txt ; m2.jpeg, m2.txt.\nthe default example only shows all images share one instant prompt. thanks for the help!",
    "url": "https://github.com/huggingface/diffusers/issues/10655",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-26T11:53:01Z",
    "updated_at": "2025-01-27T19:43:55Z",
    "user": "rooooc"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 46,
    "title": "how to train on MultiNode MultiGPU",
    "body": "",
    "url": "https://github.com/huggingface/open-r1/issues/46",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-26T04:57:11Z",
    "updated_at": "2025-02-19T14:00:44Z",
    "user": "yuepengs"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1166,
    "title": "Why isn't transformers using filesystem API instead of Cache API?",
    "body": "### Question\n\nI find the cache API quite limiting when it comes to user experience. I am curious why transformers.js is not utilizing filesystem API. Is there any practical difficulty in it?\n",
    "url": "https://github.com/huggingface/transformers.js/issues/1166",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-25T14:12:38Z",
    "updated_at": "2025-02-08T12:09:16Z",
    "user": "Nithur-M"
  },
  {
    "repo": "huggingface/open-r1",
    "number": 23,
    "title": "How to contribute",
    "body": "Hello there \ud83d\udc4b!\n\nReplicating all parts of DeepSeek's R1 pipeline is going to take a community effort, especially with dataset curation and creation. If you would like to contribute, please explore the issues linked below.",
    "url": "https://github.com/huggingface/open-r1/issues/23",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-25T13:55:31Z",
    "updated_at": "2025-05-06T13:32:10Z",
    "user": "lewtun"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 803,
    "title": "Gradient Scaling With Pipeline Parallelism",
    "body": "The idiomatic way to perform gradient scaling is something like this:\n```python\npreds = model(inputs)\nloss = loss_fn(preds, targets)\nscaler.scale(loss).backward()\n```\n\nGiven that the current PyTorch PP API handles the backward pass *internally*, I find it difficult to do gradient scaling under a PP regime.\n\n```python\nif is_first_stage:\n    pp_schedule.step(inputs)                        # bwd performed internally\nelif is_last_stage:\n    losses = []\n    pp_schedule.step(target=targets, losses=losses) # bwd performed internally\nelse:\n    pp_schedule.step()                              # bwd performed internally\n\nloss = (\n    torch.mean(torch.stack(losses)).to(device)\n    if is_last_stage\n    else torch.tensor([-1.0], device=device)\n)\n\n# scaler.scale(loss).backward() <-- !? backward pass has already been performed\n```\n\nIs there currently a good way to do gradient scaling with Pipeline Parallelism? And if not, will the Pipeline Parallelism API support gradient scaling in the near-term future?\n",
    "url": "https://github.com/pytorch/torchtitan/issues/803",
    "state": "open",
    "labels": [
      "question",
      "module: pipelining"
    ],
    "created_at": "2025-01-24T12:16:16Z",
    "updated_at": "2025-02-06T23:28:00Z",
    "user": "windsornguyen"
  },
  {
    "repo": "huggingface/trl",
    "number": 2642,
    "title": "How to stop `SFTTrainer` from auto tokenizing my messages ?",
    "body": "I want to tokenize my text in a custom way in a custom data collator but for some reason i don't know the data keeps being auto tokenized.\nI passed `processing_class=None` to stop this but nothing changed, how can i stop the auto tokenization process ?",
    "url": "https://github.com/huggingface/trl/issues/2642",
    "state": "closed",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb SFT"
    ],
    "created_at": "2025-01-24T02:58:26Z",
    "updated_at": "2025-02-18T18:59:42Z",
    "user": "MohamedAliRashad"
  },
  {
    "repo": "pytorch/xla",
    "number": 8617,
    "title": "Single core of TPU gives inference results different than the CPU results",
    "body": "# Description\nI encountered an issue when using PyTorch XLA to train a model on TPU. My main code gives a different results than training with CPU or GPU so I decided to check using a toy example and found that prediction using pytorch XLA gives results different than prediction using CPU.\nI also tried to check using pytorch lightning but it gives the same result like CPU so how to setup pytorch xla to give identical results like lightning?\n[Notebook](https://www.kaggle.com/code/saadsallam/tpu-cpu)\n",
    "url": "https://github.com/pytorch/xla/issues/8617",
    "state": "closed",
    "labels": [
      "duplicate",
      "xla:tpu"
    ],
    "created_at": "2025-01-23T21:47:15Z",
    "updated_at": "2025-02-06T14:39:41Z",
    "comments": 1,
    "user": "mohamedamara7"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3254,
    "title": "How to download pretrained word language quantized model?",
    "body": "In the word language quantized model tutorial, we assume we already have pretrained model.\nBut where can we download the model?\n\nhttps://github.com/pytorch/tutorials/blob/main/advanced_source/dynamic_quantization_tutorial.py#L151-L157",
    "url": "https://github.com/pytorch/tutorials/issues/3254",
    "state": "closed",
    "labels": [
      "easy",
      "docathon-h1-2025"
    ],
    "created_at": "2025-01-23T20:29:10Z",
    "updated_at": "2025-06-04T21:05:05Z",
    "user": "Achilles718611"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10637,
    "title": "Issues with FlowMatchEulerDiscreteScheduler.set_timesteps()",
    "body": "### Describe the bug\n\nWhy does `num_inference_steps` have the default `None`? It's not an `Optional`. It cannot be `None`. This leads to weird error messages if you skip this parameter.\nhttps://github.com/huggingface/diffusers/blob/37c9697f5bb8c96b155d24d5e7382d5215677a8f/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L239\n\n`sigmas` is undocumented:\nhttps://github.com/huggingface/diffusers/blob/37c9697f5bb8c96b155d24d5e7382d5215677a8f/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L241\n\n`mu` is undocumented, even though it can be a required parameter (depending on configuration):\nhttps://github.com/huggingface/diffusers/blob/37c9697f5bb8c96b155d24d5e7382d5215677a8f/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L242\n\n### Reproduction\n\nsee above\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\nHEAD\n\n### Who can help?\n\n@yiyixuxu ",
    "url": "https://github.com/huggingface/diffusers/issues/10637",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-01-23T20:22:51Z",
    "updated_at": "2025-02-16T15:29:08Z",
    "comments": 4,
    "user": "dxqb"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1165,
    "title": "Releasing the Florence 2 ONNX conversion script?",
    "body": "### Question\n\nHi,\n\nThis might not be the correct place to raise this issue, but I have not found a better option. There have been many requests of people trying to use their tuned Florence 2 models here and in other repos (https://github.com/huggingface/transformers.js/issues/815#issuecomment-2217220254, https://github.com/microsoft/onnxruntime-genai/issues/619, https://github.com/microsoft/onnxruntime/issues/21118, https://huggingface.co/onnx-community/Florence-2-base-ft/discussions/4). @xenova, since you've managed to export these models into ONNX, could you please share the conversion script, even if its just something experimental?",
    "url": "https://github.com/huggingface/transformers.js/issues/1165",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-23T11:35:05Z",
    "updated_at": "2025-03-31T10:02:53Z",
    "user": "ir2718"
  },
  {
    "repo": "huggingface/transformers",
    "number": 35853,
    "title": "How to load a model directly into the GPU memory\uff1f",
    "body": "I have enough GPU memory, but not enough CPU memory.When I use the \n\"from_pretrained\" function, the program gets killed due to insufficient memory.",
    "url": "https://github.com/huggingface/transformers/issues/35853",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-23T09:47:04Z",
    "updated_at": "2025-01-23T15:19:01Z",
    "user": "LiBai531"
  },
  {
    "repo": "huggingface/nanotron",
    "number": 273,
    "title": "What is the purpose of \"task\"",
    "body": "What is the purpose of the \"tasks\" argument in this line?\nhttps://github.com/huggingface/nanotron/blob/9055c664c28a3b430b4e53bfcb5a074068c90f2a/tools/preprocess_data.py#L102C9-L102C28\nThanks",
    "url": "https://github.com/huggingface/nanotron/issues/273",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-23T09:44:35Z",
    "updated_at": "2025-02-07T17:09:12Z",
    "user": "laiviet"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1164,
    "title": "`onnxruntime-node` uncompressed too large for NextJS 15 API routes",
    "body": "### Question\n\nHello! I'm trying to deploy `xenova/bge-small-en-v1.5` locally to embed text in an Next 15 API route, but I'm encountering this error with the route's unzipped max size exceeding 250 MB. Wanted to check in to see if there's some error on my side? Doesn't seem like `onnxruntime-node` should be ~720 MB uncompressed by itself? Thanks!\n\n![Image](https://github.com/user-attachments/assets/2c33f54b-86ab-4c26-8407-aa87223b8d3c)\n\n`generateEmbeddingV2()` below is called within the API route.\n\n```typescript\nimport {\n  FeatureExtractionPipeline,\n  layer_norm,\n  pipeline,\n  PreTrainedTokenizer,\n  env,\n} from '@huggingface/transformers'\n\nconst MAX_TOKENS = 512\nconst MATRYOSHKA_DIM = 768\n\nlet cachedExtractor: FeatureExtractionPipeline | null = null\nconst getExtractor = async () => {\n  if (!cachedExtractor) {\n    cachedExtractor = await pipeline(\n      'feature-extraction',\n      'xenova/bge-small-en-v1.5',\n      { dtype: 'fp16' }\n    )\n  }\n  return cachedExtractor\n}\n\nconst chunkText = (text: string, tokenizer: PreTrainedTokenizer) => {\n  const tokens = tokenizer.encode(text)\n\n  const chunks = []\n  for (let i = 0; i < tokens.length; i += MAX_TOKENS) {\n    const chunk = tokens.slice(i, i + MAX_TOKENS)\n    chunks.push(chunk)\n  }\n\n  return chunks.map((chunk) => tokenizer.decode(chunk))\n}\n\nexport const generateEmbeddingV2 = async (value: string) => {\n  const extractor = await getExtractor()\n\n  const chunks = chunkText(value, extractor.tokenizer)\n\n  let embedding = await extractor(chunk[0], { pooling: 'mean' })\n  embedding = layer_norm(embedding, [embedding.dims[1]])\n    .slice(null, [0, MATRYOSHKA_DIM])\n    .normalize(2, -1)\n\n  return embedding.tolist()[0]\n}\n```\n\nI also tried downloading the model file locally, but that didn't work in deployment either.",
    "url": "https://github.com/huggingface/transformers.js/issues/1164",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-23T03:28:16Z",
    "updated_at": "2025-10-22T20:42:41Z",
    "user": "raymondhechen"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 322,
    "title": "How to capture CodeAgent's full thinking including the code, not just the final response into a variable",
    "body": "When we run a CodeAgent in a notebook, it print the question/task, the LLM model used, code (Executing this code, Execution logs) and the Final answer. \n\nThe return value from agent.run contrains only the final response. \n\nI'm working on some demos for which I wanted to run a number of tasks, capture all the output (not just the final answer) and write them to an md or html file, so that I can show everything including the code generated by the agent without running the agents live in the demo. \n\nI tried logging, stdout, from contextlib import redirect_stdout, etc but couldn't capture the full output to a variable. \n\nThanks, \n\n",
    "url": "https://github.com/huggingface/smolagents/issues/322",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-23T02:50:34Z",
    "updated_at": "2025-01-23T13:17:49Z",
    "user": "KannamSridharKumar"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 801,
    "title": "[Possible Bug] RoPE here is GPT-J style instead of NeoX/Llama style?",
    "body": "I might miss something so please let me know if I do, and in this case I will close the issue.\n\nAs we know, GPT-J and NeoX/Llama apply RoPE slightly differently (per hugging face implementation):\n- the way GPT-J treats `q, k` as \"complex tensor\" is an interleaving style: `[q_0_real, q_0_imaginary, q_1_real, q_1_imaginary, ...]`\n- the way NeoX/Llama and almost all other RoPE based models treat them by \"rotating half\": `[q_0_real, q_1_real, ..., q_0_imaginary, q_1_imaginary, ...]` (see [here](https://github.com/huggingface/transformers/blob/2c3a44f9a769e98597d62ecdc7383785318be5a2/src/transformers/models/llama/modeling_llama.py#L150))\n\nThe way written here seems interesting:\nhttps://github.com/pytorch/torchtitan/blob/d9898423ecef131825d13c6c8b521a24e889785f/torchtitan/models/llama/model.py#L108\nIf I'm not mistaken, it is actually an interleaving style because `view_as_complex` uses the last axis as real and imaginary parts which are entries next to each other? I'm able to confirm this by spinning up a notebook session and compare it with hugging face's attention layer side-by-side. After fixing `apply_rotary_emb` it will be possible to match the attention outputs to a very good degree (though I haven't been able to match the outputs of the entire model with hugging face).\n\nThese two ways can be unified by carefully rearrange the columns in the weights of `wq` and `wk`, but I don't see it done in the model conversion script https://github.com/pytorch/torchtitan/blob/main/scripts/convert_llama_to_dcp.py \n\nIs it an oversight or did I miss something in the code?",
    "url": "https://github.com/pytorch/torchtitan/issues/801",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-22T23:32:36Z",
    "updated_at": "2025-01-22T23:58:48Z",
    "comments": 1,
    "user": "honglu2875"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 312,
    "title": "how to exec a bin and use the output as agent arg ?",
    "body": "hi\na simple exec tool as exec(path,[args]) should be in examples.\nthen an agent call as  \"use exec(/bin/ls,/bin)\" put the result in sql db \"(as bin-name) for later use and tell me  how  much of  them are scripts while using sbx -z on each non-scripts\"\nas a short example",
    "url": "https://github.com/huggingface/smolagents/issues/312",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-22T12:55:22Z",
    "updated_at": "2025-01-22T12:55:22Z",
    "user": "malv-c"
  },
  {
    "repo": "pytorch/text",
    "number": 2279,
    "title": "Could we have Android (Termux) Support?",
    "body": "# \u0628\u0633\u0645 \u0627\u0644\u0644\u0647 \u0627\u0644\u0631\u062d\u0645\u0627\u0646 \u0627\u0644\u0631\u062d\u064a\u0645 \u0627\u0645\u0649 \u0628\u0639\u062f \u0641\u0627\u0644\u0635\u0644\u0627\u0629 \u0648 \u0627\u0644\u0633\u0644\u0627\u0645 \u0639\u0644\u0649 \u0633\u064a\u062f\u0646\u0627 \u0645\u062d\u0645\u062f \u0648\u0639\u0644\u0649 \u0622\u0644\u0647 \u0627\u062c\u0645\u0639\u064a\u0646\n\n## Feature/Issue\n\n* building this project on mobile is pretty hard cuz of using ninja witch tries to build everything concurrently and this is got my phone to hang for a few minutes then OOM killed the process.\n* also it tries the way the build works is by rebuilding `third-party/*` even if they are already installed on the host device.\n\n## Related\n\n* [Termux Open Issue](https://github.com/termux/termux-packages/issues/19405)",
    "url": "https://github.com/pytorch/text/issues/2279",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-22T05:22:38Z",
    "updated_at": "2025-01-22T08:45:23Z",
    "comments": 0,
    "user": "TunifyBasic"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 326,
    "title": "How to choose the best timeout value in extractors?",
    "body": "Hi,\n\nI do not know how to choose the best timeout threshold for running extractor. Shouldn't this threshold be hardware-aware?",
    "url": "https://github.com/huggingface/datatrove/issues/326",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-22T03:14:58Z",
    "updated_at": "2025-02-10T09:53:03Z",
    "user": "jordane95"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7377,
    "title": "Support for sparse arrays with the Arrow Sparse Tensor format?",
    "body": "### Feature request\n\nAI in biology is becoming a big thing. One thing that would be a huge benefit to the field that Huggingface Datasets doesn't currently have is native support for **sparse arrays**. \n\n\nArrow has support for sparse tensors. \nhttps://arrow.apache.org/docs/format/Other.html#sparse-tensor\n\n\nIt would be a big deal if Hugging Face Datasets supported sparse tensors as a feature type, natively. \n\n\n### Motivation\n\nThis is important for example in the field of transcriptomics (modeling and understanding gene expression), because a large fraction of the genes are not expressed (zero). More generally, in science, sparse arrays are very common, so adding support for them would be very benefitial, it would make just using Hugging Face Dataset objects a lot more straightforward and clean.\n\n\n### Your contribution\n\nWe can discuss this further once the team comments of what they think about the feature, and if there were previous attempts at making it work, and understanding their evaluation of how hard it would be. My intuition is that it should be fairly straightforward, as the Arrow backend already supports it.",
    "url": "https://github.com/huggingface/datasets/issues/7377",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-01-21T20:14:35Z",
    "updated_at": "2025-01-30T14:06:45Z",
    "comments": 1,
    "user": "JulesGM"
  },
  {
    "repo": "huggingface/peft",
    "number": 2339,
    "title": "Peft version upgrade from 0.4.0 to 0.14.0 results in \"No module named \\u0027peft.utils.config\\u0027\" error",
    "body": "### System Info\n\nHello,\n\nI'm migrating my sagemaker endpoint from the `huggingface-pytorch-inference:2.1.0-transformers4.37.0-gpu-py310-cu118-ubuntu20.04` image (which is being deprecated) to the `huggingface-pytorch-inference:2.3.0-transformers4.46.1-gpu-py311-cu121-ubuntu20.04-v1.0` image, which is supported.\n\nThis new version does not support the 0.4.0 version of peft, so we have upgraded to 1.14.0 and upgraded to a compatible diffusers version.  The sagemaker endpoint deploys correctly with these new versions, but once it's run, we receive the following error:\n\n`No module named \\u0027peft.utils.config\\u0027`\n\nI dug around and found that there' no usage of peft.utils.config in our inference code.  The only usage I could find is here, in the peft code itself: https://github.com/huggingface/peft/blob/main/src/peft/config.py.  However, in this code, It looks like utils.config does not exist at all.\n\nHere's what I'm currently using:\ndiffusers==0.32.2\npeft==0.14.0\n\nIs the peft library somehow breaking itself by looking for a peft.utils.config that doesn't exist?  Have I missed a step that would create the utils.config file?  Or is there another hidden dependency using peft.utils.config?\n\n### Who can help?\n\n@BenjaminBossan @sayakpaul \n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\nCreate a sagemaker endpoint using the new `huggingface-pytorch-inference:2.3.0-transformers4.46.1-gpu-py311-cu121-ubuntu20.04-v1.0` huggingface DLC image.\n\nUse a requirements.txt that looks like the following:\ndiffusers==0.32.2\npeft==0.14.0\n\nObserve that all requests to the sagemaker endpoint respond with 500 errors.\n\n### Expected behavior\n\nThe Sagemaker endpoint should continue to process requests as it did before the version upgrade (using peft 0.4.0)",
    "url": "https://github.com/huggingface/peft/issues/2339",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-21T20:00:07Z",
    "updated_at": "2025-03-02T15:03:46Z",
    "comments": 2,
    "user": "incchar"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 298,
    "title": "How to pass images as input to CodeAgent?",
    "body": "Hello,\n\nI want to pass an input image along with the prompt to `CodeAgent.run`. I see that there is an `additional_args` argument but when I pass the image as `{\"image\": \"path/to/image.png\"}`, the agent ends up loading the image via pytesseract to read the contents of the image instead of passing it to OpenAI/Anthropic directly. Is there any way that I can ensure that the image is passed along with the prompt so that the model can infer information from it instead of using external libraries to load the image when using the LiteLLM integration?\n\nMy code for reference:\n\n```\nagent = CodeAgent(\n    tools=[],\n    model=LiteLLMModel(\n        model_id=\"openai/gpt-4o\",\n        api_key=os.environ.get('OPENAI_API_KEY'),\n        temperature=1,\n        top_p=0.95,\n    ),\n    add_base_tools=True,\n    additional_authorized_imports=[\"sqlite3\", \"csv\", \"json\", \"os\", \"datetime\", \"requests\", \"pandas\", \"numpy\", \"sys\"],\n    max_steps=10,\n)\n\nagent.run(prompt, additional_args={\"image\": \"path/to/image.png\"})\n```",
    "url": "https://github.com/huggingface/smolagents/issues/298",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-21T17:14:27Z",
    "updated_at": "2025-02-18T18:41:27Z",
    "user": "DarshanDeshpande"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 650,
    "title": "use a camera",
    "body": "can I use a camera to collect and train?",
    "url": "https://github.com/huggingface/lerobot/issues/650",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-21T10:35:02Z",
    "updated_at": "2025-04-07T15:53:26Z",
    "user": "lwx2024"
  },
  {
    "repo": "huggingface/transformers",
    "number": 35807,
    "title": "How to change data",
    "body": "\n\nhttps://huggingface.co/facebook/rag-token-nq\n\nfrom transformers import RagTokenizer, RagRetriever, RagTokenForGeneration\n\ntokenizer = RagTokenizer.from_pretrained(\"facebook/rag-token-nq\")\nretriever = RagRetriever.from_pretrained(\"facebook/rag-token-nq\", index_name=\"exact\", use_dummy_dataset=True)\nmodel = RagTokenForGeneration.from_pretrained(\"facebook/rag-token-nq\", retriever=retriever)\n\ninput_dict = tokenizer.prepare_seq2seq_batch(\"who holds the record in 100m freestyle\", return_tensors=\"pt\") \n\ngenerated = model.generate(input_ids=input_dict[\"input_ids\"]) \nprint(tokenizer.batch_decode(generated, skip_special_tokens=True)[0]) \n\n# should give michael phelps => sounds reasonable\n\n\n\nMy attempts\nhttps://github.com/kim90000/Attempts-with-facebook-rag-token-nq/blob/main/README.md",
    "url": "https://github.com/huggingface/transformers/issues/35807",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-21T06:17:09Z",
    "updated_at": "2025-02-28T08:03:38Z",
    "user": "kim90000"
  },
  {
    "repo": "pytorch/vision",
    "number": 8871,
    "title": "SE module is missing in 'class FusedMBConv', 'efficientnet.py'. Is there a reason for it?",
    "body": "According to the paper, the FusedMBConv block has an SE module. But I can't find it in the code.",
    "url": "https://github.com/pytorch/vision/issues/8871",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-21T05:38:16Z",
    "updated_at": "2025-01-30T11:34:06Z",
    "comments": 5,
    "user": "Morris-Chen007"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3356,
    "title": "how to config accelerate on 2 mac machines",
    "body": "https://huggingface.co/docs/accelerate/usage_guides/distributed_inference\n\ni use accelerate config and when i run model ,  it will block and then got an error.    means , can not connect IP and port. \n\\\nwho can help me.",
    "url": "https://github.com/huggingface/accelerate/issues/3356",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-20T11:35:35Z",
    "updated_at": "2025-02-25T02:20:41Z",
    "user": "hsoftxl"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1160,
    "title": "How to use sentence-transformers/static-similarity-mrl-multilingual-v1 model?",
    "body": "### Question\n\nIf I try to use `sentence-transformers/static-similarity-mrl-multilingual-v1` it fails on `tokenizer.json` not found. Is it possible to somehow convert the model to use it ? ONNX runtime is already there.",
    "url": "https://github.com/huggingface/transformers.js/issues/1160",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-19T15:09:18Z",
    "updated_at": "2025-01-19T17:27:49Z",
    "user": "michalkvasnicak"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10606,
    "title": "pred_original_sample in FlowMatchEulerDiscreteScheduler",
    "body": "Will pred_original_sample be supported in FlowMatchEulerDiscreteScheduler? How to get predicted x_0?",
    "url": "https://github.com/huggingface/diffusers/issues/10606",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-19T10:02:22Z",
    "updated_at": "2025-02-14T12:21:33Z",
    "comments": 2,
    "user": "haofanwang"
  },
  {
    "repo": "pytorch/vision",
    "number": 8868,
    "title": "torchvision version 0.14.0 with cuda version 116 support wheel file suddendly disappeard in download.pytorch.org",
    "body": "Dear Commnunity team. \n\nI have been using pytorch 1.13.0 and torchvision version 0.14.0 with cuda version 11.6 for my application(pytorch 2.x is not working for my app and torchvision 0.15 does not support pytorch 1.x)\n\nI was embarrased to find out that torchvision version 0.14.0 with cuda 11.6 has been disappeared all of sudden today. \n\nI have been downloading and installing the packages by the following command from old archives in https://download.pytorch.org/whl/cu116\n\npip install torch==1.13.0+cu116 torchvision==0.14.0+cu116 --extra-index-url https://download.pytorch.org/whl/cu116\n\nbut today, torchvision installation doesn't work. it seems many torchvision files has been missing which support pytorch 1.0\n\nIs there anyway I can get the torchvision==0.14.0+cu116 back or any info you know about why this happened?\n\nAny advice will be big help to me.  It seems many torchvision wheel\n\nThanks in advance ",
    "url": "https://github.com/pytorch/vision/issues/8868",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-19T09:28:21Z",
    "updated_at": "2025-01-20T00:40:31Z",
    "comments": 0,
    "user": "chulminkw"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 797,
    "title": "what is the point of first part of this assertion",
    "body": "why we need to `assert 0 <= 1`\n\nhttps://github.com/pytorch/torchtitan/blob/d9898423ecef131825d13c6c8b521a24e889785f/torchtitan/models/llama/model.py#L79",
    "url": "https://github.com/pytorch/torchtitan/issues/797",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-19T07:05:24Z",
    "updated_at": "2025-01-19T15:30:25Z",
    "user": "gameofdimension"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1157,
    "title": "When using StyleTTS/Kokoro for text-to-speech conversion, how can I get the conversion progress?",
    "body": "### Question\n\nWhen using StyleTTS/Kokoro for text-to-speech conversion, how can I get the conversion progress?\n\n```bash\nnpm i kokoro-js\n```\n\n```typescript\nconst model_id = \"onnx-community/Kokoro-82M-ONNX\";\nconst tts = await KokoroTTS.from_pretrained(model_id, {\n  dtype: \"q8\", // Options: \"fp32\", \"fp16\", \"q8\", \"q4\", \"q4f16\"\n});\n\nconst text = \"Life is like a box of chocolates. You never know what you're gonna get.\";\nconst audio = await tts.generate(text, {\n  // Use `tts.list_voices()` to list all available voices\n  voice: \"af_bella\",\n});\naudio.save(\"audio.wav\");\n```\n\n",
    "url": "https://github.com/huggingface/transformers.js/issues/1157",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-18T03:36:28Z",
    "updated_at": "2025-10-13T04:46:59Z",
    "user": "emojiiii"
  },
  {
    "repo": "pytorch/executorch",
    "number": 7732,
    "title": "Be able install ET where torch is compiled from source instead of prebuilt (e.g., nightly, release)",
    "body": "Be able install ET where torch is compiled from source instead of prebuilt (e.g., nightly, release)\n\nThere are a few use-cases why this is useful: \n\n- If there are cross-dependencies between core vs ET and need to progress in lock steps, then we need to be able to install ET and test against locally compiled core.\n\n- Sometimes prebuilt are not available for torch, for example, Intel Mac. In those cases, users are compiling torch from source. In those cases, we should provide an easy way to integrate into ET.\n\ncc @byjlw",
    "url": "https://github.com/pytorch/executorch/issues/7732",
    "state": "closed",
    "labels": [
      "triaged",
      "module: user experience"
    ],
    "created_at": "2025-01-17T18:31:51Z",
    "updated_at": "2025-07-28T11:34:10Z",
    "user": "mergennachin"
  },
  {
    "repo": "pytorch/xla",
    "number": 8588,
    "title": "Run XLA container with DDP in Vertex AI",
    "body": "## \u2753 Questions and Help\nHey there! I prepared a Docker container that trains a model using DDP, which works fine in a TPU VM. However, when I run the training job in Vertex AI, it fails. I suspect it's because the `--privileged --net host --shm-size=16G` parameters are not available for the container in Vertex AI. Is there a way to run the container without these parameters, or is there a workaround for Vertex AI?\n\nI also prepared a minimal example.\n`run.py`:\n```Python\nimport torch_xla\n\ndef mp_fn(index):\n    print(str(index) + ' is ready.')\n\nif __name__ == '__main__':\n    torch_xla.launch(\n        mp_fn,\n        args=()\n    )\n```\n\n`Dockerfile`:\n```\nFROM us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:r2.5.0_3.10_tpuvm\n\nCOPY run.py /app/run.py\nWORKDIR /app/\n\nRUN export PJRT_DEVICE=TPU\n\nENTRYPOINT [\"python\"]\nCMD [\"/app/run.py\"]\n```\n\nI create v5litepod-8 TPU VM according to [docs](https://cloud.google.com/tpu/docs/run-in-container#train_a_pytorch_model_in_a_docker_container) and run the container as:\n`sudo docker run --rm --privileged --net host --shm-size=16G -it us-central1-docker.pkg.dev/my_registry/tpu_fail_example:latest` it works alright.\n\nNow to run the same in Vertex AI\n`train-job-spec.yaml`:\n```yaml\nworkerPoolSpecs:\n  machineSpec:\n    machineType: ct5lp-hightpu-8t\n    tpuTopology: 2x4\n\n  replicaCount: 1\n  containerSpec:\n    imageUri: us-central1-docker.pkg.dev/my_registry/tpu_fail_example:latest\n```\n\nAnd run it:\n```bash\ngcloud ai custom-jobs create \\\n  --region=us-central1 \\\n  --display-name=$HOSTNAME-tpu-fail \\\n  --config=train-job-spec.yaml\n```\n\nIt results in error:\n```\nERROR 2025-01-15T11:03:07.776877384Z [resource.labels.taskName: workerpool0-0] concurrent.futures.process._RemoteTraceback:\nERROR 2025-01-15T11:03:07.776892524Z [resource.labels.taskName: workerpool0-0] \"\"\"\nERROR 2025-01-15T11:03:07.776899374Z [resource.labels.taskName: workerpool0-0] Traceback (most recent call last):\nERROR 2025-01-15T11:03:07.776904664Z [resource.labels.taskName: workerpool0-0] File \"/usr/local/lib/python3.10/concurrent/futures/process.py\", line 246, in _process_worker\nERROR 2025-01-15T11:03:07.776919484Z [resource.labels.taskName: workerpool0-0] r = call_item.fn(*call_item.args, **call_item.kwargs)\nERROR 2025-01-15T11:03:07.776924384Z [resource.labels.taskName: workerpool0-0] File \"/usr/local/lib/python3.10/concurrent/futures/process.py\", line 205, in _process_chunk\nERROR 2025-01-15T11:03:07.776928944Z [resource.labels.taskName: workerpool0-0] return [fn(*args) for args in chunk]\nERROR 2025-01-15T11:03:07.776935634Z [resource.labels.taskName: workerpool0-0] File \"/usr/local/lib/python3.10/concurrent/futures/process.py\", line 205, in <listcomp>\nERROR 2025-01-15T11:03:07.776940274Z [resource.labels.taskName: workerpool0-0] return [fn(*args) for args in chunk]\nERROR 2025-01-15T11:03:07.776945034Z [resource.labels.taskName: workerpool0-0] File \"/usr/local/lib/python3.10/site-packages/torch_xla/_internal/pjrt.py\", line 58, in _run_thread_per_device\nERROR 2025-01-15T11:03:07.776951384Z [resource.labels.taskName: workerpool0-0] initializer_fn(local_rank, local_world_size)\nERROR 2025-01-15T11:03:07.776955894Z [resource.labels.taskName: workerpool0-0] File \"/usr/local/lib/python3.10/site-packages/torch_xla/_internal/pjrt.py\", line 121, in initialize_multiprocess\nERROR 2025-01-15T11:03:07.776960434Z [resource.labels.taskName: workerpool0-0] devices = xm.get_xla_supported_devices()\nERROR 2025-01-15T11:03:07.776972114Z [resource.labels.taskName: workerpool0-0] File \"/usr/local/lib/python3.10/site-packages/torch_xla/core/xla_model.py\", line 93, in get_xla_supported_devices\nERROR 2025-01-15T11:03:07.776977254Z [resource.labels.taskName: workerpool0-0] devices = torch_xla._XLAC._xla_get_devices()\nERROR 2025-01-15T11:03:07.776981934Z [resource.labels.taskName: workerpool0-0] RuntimeError: Bad StatusOr access: UNKNOWN: TPU initialization failed: Failed to establish SliceBuilder grpc channel to localhost:8482.\nERROR 2025-01-15T11:03:07.776987123Z [resource.labels.taskName: workerpool0-0] \"\"\"\nERROR 2025-01-15T11:03:07.776993474Z [resource.labels.taskName: workerpool0-0] {\"levelname\":\"ERROR\", \"message\":\"\"}\nERROR 2025-01-15T11:03:07.776998343Z [resource.labels.taskName: workerpool0-0] The above exception was the direct cause of the following exception:\nERROR 2025-01-15T11:03:07.777002583Z [resource.labels.taskName: workerpool0-0] {\"levelname\":\"ERROR\", \"message\":\"\"}\nERROR 2025-01-15T11:03:07.777008234Z [resource.labels.taskName: workerpool0-0] Traceback (most recent call last):\nERROR 2025-01-15T11:03:07.777013183Z [resource.labels.taskName: workerpool0-0] File \"/app/tpu_minimal_fail/run.py\", line 11, in <module>\nERROR 2025-01-15T11:03:07.777017814Z [resource.labels.taskName: workerpool0-0] torch_xla.launch(\nERROR 2025-01-15T11:03:07.777023334Z [resource.labels.taskName: workerpool0-0] File \"/usr/local/lib/python3.10/site-packages/torch_xla/torch_xla.py\", line 233, in launch\nERROR 2025-01-15T11:03:07.777027923Z [resource.labe",
    "url": "https://github.com/pytorch/xla/issues/8588",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-17T11:22:13Z",
    "updated_at": "2025-01-27T09:55:30Z",
    "comments": 1,
    "user": "SteshinSS"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1154,
    "title": "Text generation pipeline memory spike",
    "body": "### Question\n\n## Description\nText generation pipeline has a memory spike at the starting point of every generation request from the instance and settle it down after few seconds. we tested this in lower vram and system memory environment it failed to generate anything because of this issue. also it generate nonsensical bunch of tokens if we pass a long context.\n\n### Screenshots\n![Image](https://github.com/user-attachments/assets/5b7c7d34-1d2c-4e3d-a8ec-fa76742171a2)\n\n- Input messages\n```\n[{\nrole: \"system\",\ncontent: \"You are a highly skilled meeting summarizer. Your role is to create comprehensive, well-organized summaries \n    of meetings that capture all essential information while maintaining clarity and accessibility. Follow these \n    guidelines to generate thorough meeting summaries:\n\nSTRUCTURE AND ORGANIZATION:\n1. Meeting Metadata\n   - Date and time of the meeting\n   - Duration\n   - Meeting type/purpose\n   - Attendees (with roles if specified)\n   - Location/platform used\n\n2. Executive Summary\n   - Brief 2-3 sentence overview capturing the meeting's main purpose and key outcomes\n   - Highlight critical decisions or major announcements\n\n3. Detailed Discussion Points\n   - Organize by agenda items or natural topic transitions\n   - Maintain chronological order within each topic\n   - Include for each discussion point:\n     * Context and background information\n     * Key arguments or perspectives shared\n     * Questions raised and answers provided\n     * Concerns or challenges mentioned\n     * Solutions proposed\n     * Related sub-topics that emerged\n\n4. Decisions and Action Items\n   - Document all decisions made, including:\n     * The final decision\n     * Key factors that influenced the decision\n     * Any dissenting opinions or concerns noted\n   - For each action item, specify:\n     * The assigned owner/responsible party\n     * Specific deliverables or expected outcomes\n     * Deadlines or timeframes\n     * Dependencies or prerequisites\n     * Resources needed or allocated\n\n5. Follow-up Items\n   - Topics deferred to future meetings\n   - Scheduled follow-up discussions\n   - Required approvals or reviews\n   - Outstanding questions requiring research\n\nIMPORTANT GUIDELINES:\n\nLanguage and Tone:\n- Use clear, professional language\n- Maintain objectivity in describing discussions\n- Avoid editorializing or interpreting beyond stated information\n- Use active voice for clarity and direct attribution\n- Include relevant direct quotes when they capture important points precisely\n\nDetail Preservation:\n- Capture nuanced discussions, not just high-level points\n- Document both majority and minority viewpoints\n- Include context for technical terms or project-specific references\n- Note any significant non-verbal elements (demonstrations, whiteboard sessions, etc.)\n- Preserve the rationale behind decisions, not just the outcomes\n\nOrganization Principles:\n- Use consistent formatting for similar types of information\n- Create clear hierarchical relationships between main topics and subtopics\n- Use bullet points and subpoints for complex items\n- Include cross-references when topics are interrelated\n- Maintain clear distinction between facts, opinions, and decisions\n\nQuality Checks:\n- Ensure all agenda items are addressed\n- Verify all action items have clear owners and deadlines\n- Confirm all decisions are documented with their context\n- Check that all participant contributions are fairly represented\n- Validate that no discussion points are orphaned or incomplete\n\nFORMAT SPECIFICATIONS:\n\n# Meeting Summary: Meeting Title\n\n## Meeting Details\n- Date: Date\n- Time: Start Time - End Time\n- Location: Location/Platform\n- Duration: Duration\n- Meeting Type: Type/Purpose\n\n### Attendees\n- Name (Role) - Meeting Lead\n- Names and roles of other attendees\n\n## Executive Summary\n2-3 sentences capturing key outcomes and major decisions\n\n## Key Decisions\n1. Decision 1\n   - Context: Brief context\n   - Outcome: Final decision\n   - Rationale: Key factors\n\n2. Decision 2\n   Same structure as above\n\n## Discussion Topics\n\n### 1. Topic 1\n#### Background\nContext and background information\n\n#### Key Points Discussed\n- Main point 1\n  * Supporting detail\n  * Supporting detail\n- Main point 2\n  * Supporting detail\n  * Supporting detail\n\n#### Outcomes\n- Specific outcome or conclusion\n- Any decisions made\n\n### 2. Topic 2\nSame structure as Topic 1\n\n## Action Items\n1. Action Item 1\n   - Owner: Name\n   - Deadline: Date\n   - Deliverable: Specific expected outcome\n   - Dependencies: Any prerequisites\n\n2. Action Item 2\n   Same structure as above\n\n## Follow-up Items\n- Deferred topic 1\n- Scheduled follow-up 1\n- Outstanding question 1\n\n## Additional Notes\nAny important information that doesn't fit in the above categories\n\n\nFINAL VERIFICATION CHECKLIST:\n1. All agenda items addressed\n2. All decisions documented with context\n3. All action items have owners and deadlines\n4. All participant contributions included\n5. All technical terms explained\n6. All follow-up items clearly spe",
    "url": "https://github.com/huggingface/transformers.js/issues/1154",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-17T06:30:06Z",
    "updated_at": "2025-02-07T03:18:49Z",
    "user": "ashen007"
  },
  {
    "repo": "pytorch/xla",
    "number": 8587,
    "title": "[torch_xla2] Wire `torch_xla2.compile`d function with torch `AutogradFunction`",
    "body": "## \ud83d\ude80 Feature\n<!-- A clear and concise description of the feature proposal -->\nCurrently if we wrap with model with `torch_xla2.compile` and want to train the model using the traditional torch training loop similar to https://github.com/pytorch/xla/blob/master/experimental/torch_xla2/examples/basic_training.py\n\nYou would notice that it doesn't work.\n\nThe reason is because the compile wrapper [`JittableModule`](https://github.com/pytorch/xla/blob/master/experimental/torch_xla2/torch_xla2/interop.py#L50) will eventuall call a `jax.jit`d callable, and torch doesn't know how to compute gradient of that callable.\n\nThe solution is to create a `torch.autograd.Function` subclass on the fly, with backward defined to call `jax.vjp` similar to this tutorial: https://pytorch.org/tutorials/beginner/examples_autograd/two_layer_net_custom_function.html\n\nThe result would be that wrapping a model with `torch_xla2.compile` it is still trainable.\n\n## Motivation\n\nHaving the forward and backward compiled with jax jit is faster to run.\n\n",
    "url": "https://github.com/pytorch/xla/issues/8587",
    "state": "open",
    "labels": [
      "enhancement",
      "torchxla2"
    ],
    "created_at": "2025-01-17T01:18:27Z",
    "updated_at": "2025-02-11T12:19:27Z",
    "comments": 0,
    "user": "qihqi"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7372,
    "title": "Inconsistent Behavior Between `load_dataset` and `load_from_disk` When Loading Sharded Datasets",
    "body": "### Description\n\nI encountered an inconsistency in behavior between `load_dataset` and `load_from_disk` when loading sharded datasets. Here is a minimal example to reproduce the issue:\n\n#### Code 1: Using `load_dataset`\n```python\nfrom datasets import Dataset, load_dataset\n\n# First save with max_shard_size=10\nDataset.from_dict({\"id\": range(1000)}).train_test_split(test_size=0.1).save_to_disk(\"my_sharded_datasetdict\", max_shard_size=10)\n\n# Second save with max_shard_size=10\nDataset.from_dict({\"id\": range(500)}).train_test_split(test_size=0.1).save_to_disk(\"my_sharded_datasetdict\", max_shard_size=10)\n\n# Load the DatasetDict\nloaded_datasetdict = load_dataset(\"my_sharded_datasetdict\")\nprint(loaded_datasetdict)\n```\n**Output**:\n- `train` has 1350 samples.\n- `test` has 150 samples.\n\n#### Code 2: Using `load_from_disk`\n```python\nfrom datasets import Dataset, load_from_disk\n\n# First save with max_shard_size=10\nDataset.from_dict({\"id\": range(1000)}).train_test_split(test_size=0.1).save_to_disk(\"my_sharded_datasetdict\", max_shard_size=10)\n\n# Second save with max_shard_size=10\nDataset.from_dict({\"id\": range(500)}).train_test_split(test_size=0.1).save_to_disk(\"my_sharded_datasetdict\", max_shard_size=10)\n\n# Load the DatasetDict\nloaded_datasetdict = load_from_disk(\"my_sharded_datasetdict\")\nprint(loaded_datasetdict)\n```\n**Output**:\n- `train` has 450 samples.\n- `test` has 50 samples.\n\n### Expected Behavior\nI expected both `load_dataset` and `load_from_disk` to load the same dataset, as they are pointing to the same directory. However, the results differ significantly:\n- `load_dataset` seems to merge all shards, resulting in a combined dataset.\n- `load_from_disk` only loads the last saved dataset, ignoring previous shards.\n\n### Questions\n1. Is this behavior intentional? If so, could you clarify the difference between `load_dataset` and `load_from_disk` in the documentation?\n2. If this is not intentional, could this be considered a bug?\n3. What is the recommended way to handle cases where multiple datasets are saved to the same directory?\n\n\nThank you for your time and effort in maintaining this great library! I look forward to your feedback.",
    "url": "https://github.com/huggingface/datasets/issues/7372",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-16T05:47:20Z",
    "updated_at": "2025-01-16T05:47:20Z",
    "comments": 0,
    "user": "gaohongkui"
  },
  {
    "repo": "pytorch/kineto",
    "number": 1028,
    "title": "Needs help, how to write trace files to remote storage",
    "body": "Recently, we have deployed dynolog in our gpu cluster to collect trace files via kineto on-demand profiling.  It needs extra efforts to collect trace files dumped to local storage via `kineto` for distributed applications. We saw that kineto supports dumping traces files to remote storage  in https://github.com/facebookincubator/dynolog/blob/main/docs/pytorch_profiler.md, which is exactly what we want.  But there's no other docs or tutorials introduce how to use remote storage.  Could you provide an introduction or a tip on how to configure kineto to write trace files to remote storage?  ",
    "url": "https://github.com/pytorch/kineto/issues/1028",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-16T03:52:48Z",
    "updated_at": "2025-03-11T20:39:30Z",
    "user": "staugust"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 790,
    "title": "should we have an extension point for model transforms out of tree?",
    "body": "In [torchao](https://github.com/pytorch/ao), we have various low precision training features which are in prototype: MX, int8, bitnet.  While we expect most of these to eventually end up in the main torchao APIs, it often takes ~months for a prototype to graduate.\n\ntorchtitan is extremely useful for helping us test low precision prototypes in real-world settings.  For now, we've been creating unlanded PRs to test functionality (examples: https://github.com/pytorch/torchtitan/pull/614, https://github.com/pytorch/torchtitan/pull/778).  Would torchtitan consider building an extension point to support this kind of experimentation fully out-of-tree?\n\nAn example of how this could look like:\n1. torchtitan provides a \"model transformation\" hook that it calls at a specified point in the initialization stage (for quantization, that should be after model init and before parallelization / torch.compile)\n2. user can provide a custom pass to transform the model (such as a prototype low precision training conversion pass)\n\nI'm not entirely sure on how this hook would be implemented since the current interface of torchtitan is CLI based, but wanted to share the request and start the discussion.",
    "url": "https://github.com/pytorch/torchtitan/issues/790",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-01-15T19:26:32Z",
    "updated_at": "2025-02-26T06:45:52Z",
    "comments": 17,
    "user": "vkuzo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 144847,
    "title": "torch.compile() In my use case of calling torch.compile(), I have found that the model's data outputs are inconsistent. I suspect that using Triton for operator fusion may have introduced precision deviations. I am unsure how to locate and fix this issue.",
    "body": "### \ud83d\udc1b Describe the bug\n\n\"My Torch environment is as follows:\n2.2.2+cu121\n\nMy goal is to use functions related to torch.compile() to optimize the inference time of our model. In fact, it does work and achieves over a 50% reduction in inference time in the default mode.\n\nThe  model code is as follows:\n`\"\"\"\ncopy from https://github.com/alimama-tech/NeurIPS_Auto_Bidding_AIGB_Track_Baseline/blob/main/bidding_train_env/baseline/dd/DFUSER.py\n\"\"\"\nfrom torch.optim import Adam\nimport os\nfrom typing import Optional, Tuple, List\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport gin\n\nfrom .temporal import TemporalUnet\nfrom .basic import (\n    cosine_beta_schedule,\n    Losses,\n    extract,\n    apply_conditioning,\n    apply_conditioning_with_fix,\n)\n\n\nclass ReduceSum(nn.Module):\n    def forward(self, x):\n        return torch.sum(x, dim=-1)\n    \n\n@gin.configurable\nclass GaussianInvDynDiffusion(nn.Module):\n    def __init__(self, model, horizon, observation_dim, action_dim, n_timesteps=1000,\n                 clip_denoised=False, predict_epsilon=True, hidden_dim=256,\n                 loss_discount=1.0, returns_condition=False,\n                 condition_guidance_w=0.1,\n                 inv_bias=True,\n        ):\n        super().__init__()\n\n        self.horizon = horizon\n        self.observation_dim = observation_dim\n        self.action_dim = action_dim\n        self.transition_dim = observation_dim + action_dim\n        self.model = model\n        self.inv_model = nn.Sequential(\n            nn.Linear(4 * self.observation_dim, hidden_dim, bias=inv_bias),\n            nn.ReLU(),\n            nn.Linear(hidden_dim, hidden_dim, bias=inv_bias),\n            nn.ReLU(),\n            nn.Linear(hidden_dim, hidden_dim, bias=inv_bias),\n            nn.ReLU(),\n            # ReduceSum(),\n            nn.Linear(hidden_dim, self.action_dim, bias=inv_bias),\n        )\n        self.returns_condition = returns_condition\n        self.condition_guidance_w = condition_guidance_w\n\n        betas = cosine_beta_schedule(n_timesteps)\n        alphas = 1. - betas\n        alphas_cumprod = torch.cumprod(alphas, axis=0)\n        alphas_cumprod_prev = torch.cat([torch.ones(1), alphas_cumprod[:-1]])\n\n        self.n_timesteps = int(n_timesteps)\n        self.clip_denoised = clip_denoised\n        self.predict_epsilon = predict_epsilon\n\n        self.register_buffer('betas', betas)\n        self.register_buffer('alphas_cumprod', alphas_cumprod)\n        self.register_buffer('alphas_cumprod_prev', alphas_cumprod_prev)\n\n        # calculations for diffusion q(x_t | x_{t-1}) and others\n        self.register_buffer('sqrt_alphas_cumprod', torch.sqrt(alphas_cumprod))\n        self.register_buffer('sqrt_one_minus_alphas_cumprod', torch.sqrt(1. - alphas_cumprod))\n        self.register_buffer('log_one_minus_alphas_cumprod', torch.log(1. - alphas_cumprod))\n        self.register_buffer('sqrt_recip_alphas_cumprod', torch.sqrt(1. / alphas_cumprod))\n        self.register_buffer('sqrt_recipm1_alphas_cumprod', torch.sqrt(1. / alphas_cumprod - 1))\n\n        # calculations for posterior q(x_{t-1} | x_t, x_0)\n        posterior_variance = betas * (1. - alphas_cumprod_prev) / (1. - alphas_cumprod)\n        self.register_buffer('posterior_variance', posterior_variance)\n\n        self.register_buffer('posterior_log_variance_clipped',\n                             torch.log(torch.clamp(posterior_variance, min=1e-20)))\n        self.register_buffer('posterior_mean_coef1',\n                             betas * np.sqrt(alphas_cumprod_prev) / (1. - alphas_cumprod))\n        self.register_buffer('posterior_mean_coef2',\n                             (1. - alphas_cumprod_prev) * np.sqrt(alphas) / (1. - alphas_cumprod))\n\n        loss_weights = self.get_loss_weights(loss_discount)\n        self.loss_fn = Losses['state_l2'](loss_weights)\n\n    def get_loss_weights(self, discount):\n\n        self.action_weight = 1\n        dim_weights = torch.ones(self.observation_dim, dtype=torch.float32)\n\n        discounts = discount ** torch.arange(self.horizon, dtype=torch.float)\n        discounts = discounts / discounts.mean()\n        loss_weights = torch.matmul(discounts[:, None], dim_weights[None, :])\n\n        if self.predict_epsilon:\n            loss_weights[0, :] = 0\n\n        return loss_weights\n\n    # ------------------------------------------ sampling ------------------------------------------#\n\n    def predict_start_from_noise(self, x_t, t, noise):\n\n        if self.predict_epsilon:\n            return (\n                    extract(self.sqrt_recip_alphas_cumprod, t, x_t.shape) * x_t -\n                    extract(self.sqrt_recipm1_alphas_cumprod, t, x_t.shape) * noise\n            )\n        else:\n            return noise\n\n    def q_posterior(self, x_start, x_t, t):\n        posterior_mean = (\n                extract(self.posterior_mean_coef1, t, x_t.shape) * x_start +\n                extract(self.posterior_mean_coef2, t, x_t.shape) * x_t\n        )\n        posterior_variance = extract(self.poste",
    "url": "https://github.com/pytorch/pytorch/issues/144847",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: inductor"
    ],
    "created_at": "2025-01-15T07:35:30Z",
    "updated_at": "2025-04-22T11:18:54Z",
    "user": "liangshaopeng"
  },
  {
    "repo": "pytorch/vision",
    "number": 8854,
    "title": "Local Windows Torchvision Build fails",
    "body": "I am trying to  locally build torchvision in a conda environment on my cpu-only windows laptop and even if the build seems to be successful, when I try to import the torchvision package, it fails with this error:  **RuntimeError: operator torchvision::nms does not exist**. I tried multiple times ( with different versions of python (3.8 and latest 3.12) in fresh conda environments and the result is the same. What can I do to fix this?",
    "url": "https://github.com/pytorch/vision/issues/8854",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-14T10:06:38Z",
    "updated_at": "2025-02-19T11:58:25Z",
    "comments": 1,
    "user": "alinpahontu2912"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 561,
    "title": "Feature Request: Support for Ellipsis (...) in Indexing",
    "body": "### Feature request\n\nThank you very much for your effort in maintaining this great project!\n\nI\u2019m writing to request the addition of support for ellipsis (...) in `safetensor.safe_open` indexing functionality. This would enhance usability and align SafeTensor\u2019s API more closely with the standard Python indexing conventions used in NumPy and PyTorch.\n\n\n### Motivation\n\n## What Does Ellipsis (...) Do?\n\nThe ellipsis (...) is a shorthand in Python indexing that simplifies working with multi-dimensional arrays. It allows users to skip explicitly specifying a subset of dimensions, particularly when dealing with high-dimensional data. For example:\n\n```python\ntensor[..., 0:100, 0:100]\n```\n\nThis indicates that all dimensions up to the last two should be included in their entirety. The `...` is dynamically replaced by as many colons (: or slice(None)) as needed to account for the unspecified dimensions.\n\n### Your contribution\n\nI can do a PR if it is considered relevant.\n\n## Workaround\n\nA class that deals with the key can be used to transform the key into a slice object, which is supported by safetensors.\n\n```python\nfrom typing import Union, Tuple, Any\nfrom itertools import islice\n\nclass SliceTransformer:\n    __slots__ = ('ndim',)  # Optimize memory usage\n\n    def __init__(self, ndim: int):\n        if not isinstance(ndim, int) or ndim < 1:\n            raise ValueError(\"ndim must be a positive integer\")\n        self.ndim = ndim\n\n    def transform(self, key: Union[slice, int, Tuple[Any, ...], Any]) -> Tuple[slice, ...]:\n        # Handle single key case without tuple conversion\n        if isinstance(key, (slice, int)):\n            result = [slice(key, key + 1) if isinstance(key, int) else key]\n            result.extend(slice(None) for _ in range(self.ndim - 1))\n            return tuple(result)\n\n        if not isinstance(key, tuple):\n            raise TypeError(f\"Unsupported key type: {type(key)}\")\n\n        # Pre-allocate result list with known size\n        result = []\n        result_append = result.append  # Local reference for faster access\n        \n        # Fast path for common case (no ellipsis)\n        if Ellipsis not in key:\n            for item in islice(key, self.ndim):\n                result_append(slice(item, item + 1) if isinstance(item, int) else item)\n            result.extend(slice(None) for _ in range(self.ndim - len(result)))\n            return tuple(result[:self.ndim])\n\n        # Handle ellipsis case\n        ellipsis_idx = key.index(Ellipsis)\n        remaining_dims = self.ndim - (len(key) - 1)\n        \n        # Pre-ellipsis items\n        for item in islice(key, ellipsis_idx):\n            result_append(slice(item, item + 1) if isinstance(item, int) else item)\n            \n        # Fill ellipsis slots\n        result.extend(slice(None) for _ in range(remaining_dims))\n        \n        # Post-ellipsis items\n        for item in islice(key, ellipsis_idx + 1, None):\n            if item is Ellipsis:\n                raise ValueError(\"Multiple ellipsis found in key\")\n            result_append(slice(item, item + 1) if isinstance(item, int) else item)\n\n        if len(result) != self.ndim:\n            raise ValueError(f\"Key length {len(result)} does not match ndim {self.ndim}\")\n            \n        return tuple(result)\n\n    def __getitem__(self, key):\n        return self.transform(key)\n\n\nimport safetensors.numpy\nimport safetensors\ntoy_data = np.random.rand(3, 5, 7, 128, 128)\nsafetensors.numpy.save_file({\"data\": toy_data}, \"model.safetensors\")\n\n# Will not work\nwith safetensors.safe_open(\"model.safetensors\", \"np\") as tensor:\n    tensor.get_slice(\"data\")[..., 0:100, 0:200]\n\n# Will work\nwith safetensors.safe_open(\"model.safetensors\", \"np\") as tensor:\n    tensor_slice = tensor.get_slice(\"data\")\n    tensor_shape = tensor_slice.get_shape()\n    new_keys = SliceTransformer(ndim=len(tensor_shape))[..., 0:100, 0:100]\n    tensor_slice[new_keys]\n```",
    "url": "https://github.com/huggingface/safetensors/issues/561",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-14T05:13:54Z",
    "updated_at": "2025-01-14T05:13:54Z",
    "comments": 0,
    "user": "csaybar"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10566,
    "title": "Unnecessary operations in `CogVideoXTransformer3DModel.forward()`?",
    "body": "### Describe the bug\n\nHere are few rows of codes in `CogVideoXTransformer3DModel.forward()` :\n```py\n        # 3. Transformer blocks\n        ...\n\n        if not self.config.use_rotary_positional_embeddings:\n            # CogVideoX-2B\n            hidden_states = self.norm_final(hidden_states)\n        else:\n            # CogVideoX-5B\n            hidden_states = torch.cat([encoder_hidden_states, hidden_states], dim=1)\n            hidden_states = self.norm_final(hidden_states)\n            hidden_states = hidden_states[:, text_seq_length:]\n\n        # 4. Final block\n        ...\n```\n\nwhere `self.norm_final` is a `LayerNorm`  defined by:\n```py\nself.norm_final = nn.LayerNorm(inner_dim, norm_eps, norm_elementwise_affine)\n```\n\nSince the `normalized_shape` of  `self.norm_final` is 1-dimension which means only the last dimension will be normalized, it seems that **the \"cat -> layernorm -> slice\" logic on the 2nd dimension in CogVideoX-5B branch is unnecessary because it does the same thing with**\n```py\nhidden_states = self.norm_final(hidden_states)\n```\n\nThese codes is imported via [PR#9203](https://github.com/huggingface/diffusers/pull/9203/files#diff-6e4d5c6638b71b7a0e7de21357c5b55ffd5ff6373dd1ced70070650855830173R469).  @zRzRzRzRzRzRzR @yiyixuxu  could you possibly walk me through why these changes were necessary? Thanks a lot for your help!\n\n### Reproduction\n\n.\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\n.\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/10566",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2025-01-14T04:01:20Z",
    "updated_at": "2025-02-13T22:11:26Z",
    "comments": 2,
    "user": "townwish4git"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10565,
    "title": "Different generation with `Diffusers` in I2V tasks for LTX-video",
    "body": "### Describe the bug\n\nHello, I encountered an issue with the generation when attempting the I2V task using `Diffusers`. Is there any difference between the `diffusers` implementation and the `LTX-video-inference scripts` in the I2V task? \n\n- The above is the result from the `inference.py`, and the following is the result generated with `diffuser`.\n- Prompts: `a person`\n\nhttps://github.com/user-attachments/assets/6e2aeeaf-c52b-402c-ae92-aff2d325464b\n\n\nhttps://github.com/user-attachments/assets/59f815ad-1746-4ec5-ae1c-a47dcfa0fd02\n\n\nhttps://github.com/user-attachments/assets/8ca3c79b-8003-4fa2-82b1-8ae17beccb9c\n\n\n\n- test img\n![ref](https://github.com/user-attachments/assets/e3638227-68cf-4510-b380-24071a9409fc)\n\n\nBesides, it seems that the text prompt has a significant impact on the I2V generation with 'diffusers'. Could I be missing any important arguments?\nhttps://huggingface.co/docs/diffusers/api/pipelines/ltx_video\n- results\n\n\nhttps://github.com/user-attachments/assets/c062c21f-5611-4860-ba17-441dd26a8913\n\n\nhttps://github.com/user-attachments/assets/991ec853-ee26-43a7-914b-622d115a9b7f\n\n\nhttps://github.com/user-attachments/assets/ff3e7f04-c17d-4f0a-9aba-2db68aae792d\n\n\nhttps://github.com/user-attachments/assets/f2699759-c36e-4839-bddd-37b84a85e2c7\n\n### Reproduction\n\n- for LTX-video generation\nhttps://github.com/Lightricks/LTX-Video/blob/main/inference.py\n```\npython inference.py \\\n    --ckpt_path ./pretrained_models/LTX-Video \\\n    --output_path './samples' \\\n    --prompt \"A person.\" \\\n    --input_image_path ./samples/test_cases.png \\\n    --height 512 \\\n    --width 512 \\\n    --num_frames 49 \\\n    --seed 42 \n```\n\n- for diffuser generation: it seems that the negative prompts are causing the issues. However, even when I remove them, the results are still not satisfactory.\n```\nimport argparse\nimport torch\nfrom diffusers import LTXVideoTransformer3DModel\nfrom diffusers import LTXImageToVideoPipeline\nfrom diffusers import FlowMatchEulerDiscreteScheduler, AutoencoderKLLTXVideo\nfrom diffusers.utils import export_to_video, load_image, load_video\n\n\nfrom moviepy import VideoFileClip, AudioFileClip\nimport numpy as np\nfrom pathlib import Path\nimport os\nimport imageio\nfrom einops import rearrange\nfrom PIL import Image\nimport random\n\ndef seed_everething(seed: int):\n    random.seed(seed)\n    np.random.seed(seed)\n    torch.manual_seed(seed)\n    if torch.cuda.is_available():\n        torch.cuda.manual_seed(seed)\n\ndef generate_video(args):\n\n    pipe = LTXImageToVideoPipeline.from_pretrained(args.ltx_model_path, torch_dtype=torch.bfloat16)\n    pipe.to(\"cuda\")\n\n    negative_prompt = \"worst quality, inconsistent motion, blurry, jittery, distorted\"\n\n    image = load_image(args.validation_image)\n    prompt = \"A person.\"\n    negative_prompt = \"worst quality, inconsistent motion, blurry, jittery, distorted\"\n    generator = torch.Generator(\n        device=\"cuda\" if torch.cuda.is_available() else \"cpu\"\n    ).manual_seed(42)\n\n    video = pipe(\n        image=image,\n        prompt=prompt,\n        guidance_scale=3,\n        # stg_scale=1,\n        generator=generator,\n        callback_on_step_end=None,\n        negative_prompt=negative_prompt,\n        width=512,\n        height=512,\n        num_frames=49,\n        num_inference_steps=50,\n        decode_timestep=0.05,\n        decode_noise_scale=0.025,\n\n    ).frames[0]\n    export_to_video(video, args.output_file, fps=24)\n```\n\n- for demo images with difference text prompts\n https://huggingface.co/docs/diffusers/api/pipelines/ltx_video\n\n```\nimport torch\nfrom diffusers import LTXImageToVideoPipeline\nfrom diffusers.utils import export_to_video, load_image\n\npipe = LTXImageToVideoPipeline.from_pretrained(\"./pretrained_models/LTX-Video\", torch_dtype=torch.bfloat16)\npipe.to(\"cuda\")\n\nimage = load_image(\"samples/image.png\")\nprompt = \"A young girl stands.\"\nnegative_prompt = \"worst quality, inconsistent motion, blurry, jittery, distorted\"\n\nvideo = pipe(\n    image=image,\n    prompt=prompt,\n    negative_prompt=negative_prompt,\n    width=704,\n    height=480,\n    num_frames=161,\n    num_inference_steps=50,\n).frames[0]\nmodified_prompt = \"-\".join(prompt.split()[:14])\nexport_to_video(video, f\"samples/test_out/demo-{modified_prompt}.mp4\", fps=24)\n```\n\n### Logs\n\n```shell\n\n```\n\n### System Info\n\ntorch                    2.4.1\ntorchao                  0.7.0\ntorchvision              0.19.1\ndiffusers                0.32.1\npython 3.10\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/10565",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2025-01-14T03:24:06Z",
    "updated_at": "2025-09-09T07:21:31Z",
    "comments": 11,
    "user": "Kaihui-Cheng"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1146,
    "title": "Why does the local models keep downloading everyday?",
    "body": "### Question\n\nEvery day when I come back to chat with the local models via transformers.js it downloads the models again. Can't I persisted the downloaded model so that I can chat with them anytime instantly?\nThank you.",
    "url": "https://github.com/huggingface/transformers.js/issues/1146",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-14T02:56:34Z",
    "updated_at": "2025-01-18T15:11:09Z",
    "user": "Nithur-M"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1646,
    "title": "Inline audio/video in the output",
    "body": "If a model returns a markdown content with an image (`![description](url)`), the chat-ui will display the image inline.\nIs there something similar for audio and video? How can a model return audio or video content to the user?\n\nI don't know if this is currently supported or not.\n\n(I'm using the OpenAI endpoint)\n\n\nbtw, tanks a lot for the project, it's very nice!\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1646",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-01-14T01:20:54Z",
    "updated_at": "2025-02-28T11:32:48Z",
    "comments": 1,
    "user": "laurentlb"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 633,
    "title": "[Question] How to set training to a local dataset?",
    "body": "Is there a way to train on a local dataset without manually adding the `local_files_only` arg to the `make_dataset` function of the train script?\n\nI have set the `LEROBOT_HOME` env variable. ",
    "url": "https://github.com/huggingface/lerobot/issues/633",
    "state": "closed",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2025-01-13T15:27:00Z",
    "updated_at": "2025-10-08T08:37:55Z",
    "user": "tlpss"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 630,
    "title": "Removing episodes from LeRobotDataset",
    "body": "Hi, thanks for building this. It's great.\r\n\r\nIs there a way to easily remove episodes from a dataset. I had a decent amount of diversity in my episodes, and wanted to reduce it, so I had to remove ~1/2 of the episodes. Rather than rerecording them, I wanted to remove specified episodes (lets say all even episodes). Is there an easy way to do this? I'de tried just removing them from the `episodes.jsonl` file, but it seemed to load all of the episodes, and also deleting unwated episode videos/data and renaming the files through some issues when loading the datasets. Is there a better way to do this?",
    "url": "https://github.com/huggingface/lerobot/issues/630",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2025-01-13T01:22:32Z",
    "updated_at": "2025-10-17T12:07:56Z",
    "user": "andlyu"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 559,
    "title": "serialize & deserialize does not work as the documentation specify.",
    "body": "### System Info\n\n- `transformers` version: 4.42.3\r\n- Platform: Linux-6.8.0-51-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.12\r\n- Huggingface_hub version: 0.25.2\r\n- Safetensors version: 0.5.2\r\n- Accelerate version: 0.27.0\r\n- Accelerate config: \tnot found\r\n- PyTorch version (GPU?): 2.3.1+cu121 (True)\r\n- Tensorflow version (GPU?): 2.15.0 (True)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using distributed or parallel set-up in script?: <fill in>\r\n- Using GPU in script?: <fill in>\r\n- GPU type: NVIDIA GeForce RTX 3050 Laptop GPU\r\n\r\n\n\n### Information\n\n- [x] The official example scripts\n- [ ] My own modified scripts\n\n### Reproduction\n\nHi,\r\n\r\nI\u2019m unsure if this is expected behavior or a bug since it does not align with what the documentation for these functions describes. Below is the code to reproduce the issue:\n\n### Expected behavior\n\n```python\r\nimport numpy as np\r\nimport safetensors\r\nfrom safetensors.numpy  import save_file, load\r\n\r\n# Save as a safetensors file\r\ndata_ran_uint16 = np.random.randint(0, 255, (2, 2, 2)).astype(np.uint16)\r\nsave_file({\"toy\": data_ran_uint16}, \"toy.safetensors\")\r\n\r\n# Deserialize the file\r\nwith open(\"toy.safetensors\", \"rb\") as f:\r\n    fbytes = safetensors.deserialize(f.read())\r\n\r\n# Expected to work\r\nserialized = safetensors.serialize({\"toy\": fbytes[0][1]})\r\n\r\n# Workaround\r\nfbytes[0][1][\"data\"] = bytes(fbytes[0][1][\"data\"]) # I had to convert the bytearray to bytes\r\nfbytes[0][1][\"dtype\"] = \"uint16\" # I had to change the dtype to uint16\r\nfbytes[0][1][\"shape\"]\r\nserialized = safetensors.serialize({\"toy\": fbytes[0][1]})\r\nload(serialized)\r\n```",
    "url": "https://github.com/huggingface/safetensors/issues/559",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-12T20:22:57Z",
    "updated_at": "2025-01-12T20:23:18Z",
    "comments": 0,
    "user": "csaybar"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1142,
    "title": "Make in-browser WebGPU as seamless as in WebLLM",
    "body": "### Question\n\nHi there! \ud83d\udc4b\r\n\r\nI've noticed something interesting about WebGPU support in browsers:\r\n\r\n\u2705 [WebLLM's demo](https://chat.webllm.ai/) detects and uses my GPU automatically\r\n\u274c [transformers.js examples](https://huggingface.co/spaces/Xenova/nanollava-1.5-webgpu) fail with:\r\n```Error: no available backend found. ERR: [webgpu] TypeError: e.requestAdapterInfo is not a function```\r\n\r\nThis ease-of-use difference matters a lot for adoption. I believe reducing friction in GPU setup is crucial for adoption of in-browser ML models - when users need to modify browser settings or follow additional configuration steps, it can significantly impact their willingness to try new applications. WebLLM shows that seamless GPU detection is possible for in-browser ML models.\r\n\r\nEnvironment:\r\n- Chrome 131.0.6778.205\r\n- macOS\r\n\r\nCould transformers.js adopt a similar approach to WebLLM for automatic GPU detection? Happy to provide more details if needed!\r\n\r\nBest regards",
    "url": "https://github.com/huggingface/transformers.js/issues/1142",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-12T15:06:17Z",
    "updated_at": "2025-01-27T11:45:03Z",
    "user": "Anna-iroro"
  },
  {
    "repo": "huggingface/peft",
    "number": 2322,
    "title": "model merge and unload feature for AdaLora",
    "body": "### Feature request\n\nunlike Lora or IA3 adapter type, AdaLora does not provide a method to merge lora adapter weights into original weights so that it can be used as a standalone model. I made that feature for a personal usecase and want to make a PR to make this feature accessible to everyone. \n\n### Motivation\n\nThis feature makes people easily merge AdaLora adapter weights into original weights, which makes further finetuning on it possible (i.e. when one wants to resume adalora training for checkpoints that was already trained with adalora, resuming training is not possible with unmerged weights. )\n\n### Your contribution\n\nI'll submit a PR. I followed the example of IA3 `merge_and_unload`\r\n\r\nFollowing is the overview of change : \r\n\r\n```\r\n    def _unload_and_optionally_merge(\r\n        self,\r\n        merge: bool = True,\r\n        safe_merge: bool = False,\r\n        adapter_names: Optional[list[str]] = None,\r\n        eps: float = 1e-5\r\n    ) -> torch.nn.Module:\r\n        \"\"\"\r\n        This method unloads the AdaLoRA adapter modules and optionally merges them into the base model weights.\r\n        \r\n        Args:\r\n            merge (`bool`, defaults to `True`):\r\n                If True, merges the adapter weights into base model weights. \r\n                If False, it will only unload the adapters without merging.\r\n            safe_merge (`bool`, defaults to `False`):\r\n                If True, performs the merge operation with extra safety checks.\r\n            adapter_names (`List[str]`, *optional*):\r\n                The list of adapter names to merge. If None, all active adapters will be merged.\r\n            eps (`float`, defaults to 1e-5):\r\n                Small constant for numerical stability when dividing by ranknum.\r\n                \r\n        Returns:\r\n            model (`torch.nn.Module`):\r\n                The resulting PyTorch model.\r\n        \"\"\"\r\n        if getattr(self.model, \"is_loaded_in_8bit\", False):\r\n            raise ValueError(\"Cannot merge adalora layers when the model is loaded in 8-bit mode\")\r\n\r\n        if getattr(self.model, \"is_loaded_in_4bit\", False):\r\n            raise ValueError(\"Cannot merge adalora layers when the model is loaded in 4-bit mode\")\r\n            \r\n        if adapter_names is not None:\r\n            raise ValueError(\"AdaLoRA does not support merging specific adapters. Got adapter_names={adapter_names}\")\r\n\r\n        # Create a copy of the base model state dict to modify\r\n        original_state_dict = self.model.state_dict()\r\n\r\n        if merge:\r\n            for name, module in self.model.named_modules():\r\n                if hasattr(module, \"base_layer\") and hasattr(module, \"lora_A\"):\r\n                    # Extract base layer weight name\r\n                    layer_name = name.replace(\".lora_A\", \"\")\r\n                    layer_name = layer_name.replace(\"base_model.model.\", \"\")\r\n                    base_weight_name = f\"{layer_name}.weight\"\r\n\r\n                    # Get SVD parameters\r\n                    lora_A = module.lora_A[\"default\"]  # [r x d_in]\r\n                    lora_B = module.lora_B[\"default\"]  # [d_out x r]\r\n                    lora_E = module.lora_E[\"default\"]  # [r x 1]\r\n                    \r\n                    # Calculate active ranks\r\n                    ranknum = (lora_E != 0).sum()\r\n                    scaling = module.scaling[\"default\"] if hasattr(module, \"scaling\") else 16\r\n\r\n                    # Safety check if requested\r\n                    if safe_merge and (torch.isnan(lora_A).any() or torch.isnan(lora_B).any() or torch.isnan(lora_E).any()):\r\n                        raise ValueError(f\"NaN detected in adapter weights for layer {name}\")\r\n\r\n                    # Scale A with E: A' = AE\r\n                    scaled_A = lora_A * lora_E  # [r x d_in]\r\n\r\n                    # Compute update: \u0394W = BA'\r\n                    if ranknum > 0:\r\n                        update = (lora_B @ scaled_A) * scaling / (ranknum + eps)\r\n                    else:\r\n                        update = torch.zeros_like(original_state_dict[base_weight_name])\r\n\r\n                    # Update base weights\r\n                    if base_weight_name in original_state_dict:\r\n                        original_state_dict[base_weight_name] += update\r\n\r\n        # Load the merged state dict back into a clean version of the model\r\n        self.model.load_state_dict(original_state_dict)\r\n\r\n        return self.model\r\n\r\n    def merge_and_unload(\r\n        self, \r\n        safe_merge: bool = False, \r\n        adapter_names: Optional[list[str]] = None,\r\n        eps: float = 1e-5\r\n    ) -> torch.nn.Module:\r\n        \"\"\"\r\n        Merge the active adapters into the base model and unload the adapters.\r\n        \r\n        Args:\r\n            safe_merge (`bool`, defaults to `False`):\r\n                If True, performs the merge operation with extra safety checks.\r\n            adapter_names (`List[str]`, *optional*):\r\n                List of adapter names to merge. If None, merges all active adapters.\r\n            eps (`floa",
    "url": "https://github.com/huggingface/peft/issues/2322",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-12T09:20:01Z",
    "updated_at": "2025-01-14T12:47:35Z",
    "comments": 6,
    "user": "DaehanKim"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3166,
    "title": "How to report a security issue responsibly?",
    "body": "I have just found a potential security issue in the repo and want to know how I can report it to your team privately, thanks!",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3166",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-12T04:24:15Z",
    "updated_at": "2025-01-12T08:52:43Z",
    "user": "zpbrent"
  },
  {
    "repo": "pytorch/vision",
    "number": 8848,
    "title": "ValueError for Image size:  Height  480 , Width  854 in RAFT",
    "body": "### \ud83d\udc1b Describe the bug\n\n...\r\ndevice = \"cuda\" if torch.cuda.is_available() else \"cpu\"\r\nraft_model = raft_small(pretrained=True, progress=False).to(device)\r\nraft_model = raft_model.eval()\r\ntransform = transforms.ToTensor()\r\nwith torch.no_grad():\r\n    list_of_flows = raft_model(old_batch.to(device), new_batch.to(device))\r\n...\r\n\r\n\n\n### Versions\n\nHi there, \r\n\r\nI am testing the orchvision.models.optical_flow module raft_small, the code is running ok for image size (480, 752), (800,848)..\r\nHowever, when I test it on Image size:  Height  480 , Width  854. The code throw \r\n\r\n```\r\nValueError: The feature encoder should downsample H and W by 8\r\n```\r\n\r\nI debug the code on [https://github.com/pytorch/vision/blob/d3beb52a00e16c71e821e192bcc592d614a490c0/torchvision/models/optical_flow/raft.py#L494](url)\r\n\r\n```\r\nfmaps = self.feature_encoder(torch.cat([image1, image2], dim=0))\r\nfmap1, fmap2 = torch.chunk(fmaps, chunks=2, dim=0)\r\nif fmap1.shape[-2:] != (h // 8, w // 8):\r\n     raise ValueError(\"The feature encoder should downsample H and W by 8\")\r\n```\r\n**Image size:  Height  480 , Width  854**\r\nwhere  `fmap1.shape[-2:]` is `torch.Size([60, 107])`, `h // 8 = 60`, but `w // 8 = 106` which triggered the ValueError.\r\n\r\nI think this issue is related to output dimension of self.feature_encoder. Looking for help, thx~\r\n\r\n\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/8848",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-11T18:24:13Z",
    "updated_at": "2025-03-18T12:20:48Z",
    "comments": 1,
    "user": "Neoyning"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 785,
    "title": "Why use RowwiseParallel for nn.Embedding instead of ColwiseParallel?",
    "body": "Colwise makes the logic a bit more clear. Rowwise splits on the token dimension, leading to confusion on how the different shards handle tokens that are not present within their shard. From a bit of debugging it seems like there is a special case for this somewhere deep in pytorch source code, but I could not find it.\r\n\r\nWith colwise, the embedding weight matrix is split on the model dim dimension, so all shards have all the tokens, just different parts of the model dim.\r\n\r\nhttps://github.com/pytorch/torchtitan/blob/main/torchtitan/parallelisms/parallelize_llama.py#L133\r\n\r\n```\r\n    parallelize_module(\r\n        model,\r\n        tp_mesh,\r\n        {\r\n            \"tok_embeddings\": RowwiseParallel(\r\n                input_layouts=Replicate(),\r\n                output_layouts=Shard(1),\r\n            ),\r\n```\r\n\r\nCan someone provide some insight?",
    "url": "https://github.com/pytorch/torchtitan/issues/785",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-10T15:16:34Z",
    "updated_at": "2025-08-21T03:04:35Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7365,
    "title": "A parameter is specified but not used in datasets.arrow_dataset.Dataset.from_pandas()",
    "body": "### Describe the bug\n\nI am interested in creating train, test and eval splits from a pandas Dataframe, therefore I was looking at the possibilities I can follow. I noticed the split parameter and was hopeful to use it in order to generate the 3 at once, however, while trying to understand the code, i noticed that it has no added value (correct me if I am wrong or misunderstood the code). \r\n\r\n\r\nfrom_pandas function code :\r\n\r\n```python\r\n    if info is not None and features is not None and info.features != features:\r\n            raise ValueError(\r\n                f\"Features specified in `features` and `info.features` can't be different:\\n{features}\\n{info.features}\"\r\n            )\r\n        features = features if features is not None else info.features if info is not None else None\r\n        if info is None:\r\n            info = DatasetInfo()\r\n        info.features = features\r\n        table = InMemoryTable.from_pandas(\r\n            df=df,\r\n            preserve_index=preserve_index,\r\n        )\r\n        if features is not None:\r\n            # more expensive cast than InMemoryTable.from_pandas(..., schema=features.arrow_schema)\r\n            # needed to support the str to Audio conversion for instance\r\n            table = table.cast(features.arrow_schema)\r\n        return cls(table, info=info, split=split)\r\n```\n\n### Steps to reproduce the bug\n\n```python\r\nfrom datasets import Dataset\r\n# Filling the split parameter with whatever causes no harm at all\r\ndata = Dataset.from_pandas(self.raw_data, split='egiojegoierjgoiejgrefiergiuorenvuirgurthgi')\r\n```\n\n### Expected behavior\n\nWould be great if there is no split parameter (if it isn't working), or to add a concrete example of how it can be used.\n\n### Environment info\n\n- `datasets` version: 3.2.0\r\n- Platform: Linux-5.15.0-127-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.12\r\n- `huggingface_hub` version: 0.27.1\r\n- PyArrow version: 18.1.0\r\n- Pandas version: 2.2.3\r\n- `fsspec` version: 2024.9.0",
    "url": "https://github.com/huggingface/datasets/issues/7365",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-10T13:39:33Z",
    "updated_at": "2025-01-10T13:39:33Z",
    "comments": 0,
    "user": "NourOM02"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3351,
    "title": "\u2753 [Question] How to install torch_tensorrt corresponding to pytorch tensorrt version",
    "body": "For example, I am using pytorch2.2.1, tensorrt10.2.0, how can I install torch_tensorrt (without changing pytorch, tensorrt versions)",
    "url": "https://github.com/pytorch/TensorRT/issues/3351",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-10T07:12:50Z",
    "updated_at": "2025-01-15T23:47:47Z",
    "user": "swearirh"
  },
  {
    "repo": "huggingface/peft",
    "number": 2319,
    "title": "Import error , is it a version issue?",
    "body": "### System Info\n\nWhen I execute the finetune.py file, an error occurs as follows: cannot import name 'prepare_model_for_int8_training'.Is it a version issue? My version is 0.14.0.\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\ncannot import name 'prepare_model_for_int8_training' from 'peft' (/path/python3.10/site-packages/peft/__init__.py)\n\n### Expected behavior\n\nWho can help me answer this question\uff0cthks",
    "url": "https://github.com/huggingface/peft/issues/2319",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-10T02:34:52Z",
    "updated_at": "2025-01-13T10:13:18Z",
    "comments": 3,
    "user": "zhangyangniubi"
  },
  {
    "repo": "pytorch/audio",
    "number": 3870,
    "title": "SQUIM running in real-time",
    "body": "I applied SQUIM to assess speech quality as a way to correct the direction-of-arrival of a location-based speech enhancement system. [More info here](https://www.sciencedirect.com/science/article/pii/S1051200424005840).\r\n\r\nI'm feeding the last 3-second window of the input to SQUIM, every 0.1 seconds. It is able to respond in less than that time: it featured a maximum response time of 0.0704 seconds. Thus, in terms of response time, SQUIM seems to be able to run in real-time.\r\n\r\nHowever, it does seem to struggle in providing a constant speech quality assessment throughout. I'm using the SI-SDR metric from the objective model. With the a speech recording with no enhancement or spatial variation carried out, the ideal behavior would be that SQUIM provided the same SI-SDR measurement through time, but, as it can be seen in Figure 2 of the aforementioned paper, it does not. It varies wildly, which required some smoothing to work well with the rest of the system.\r\n\r\nSo here are my questions:\r\n\r\n- Is it possible to modify SQUIM for this type of real-time application? I'm assuming it would need some sort of causalness built into it. Or not? I was actually impressed it was able to provide a workable result without any modification. Maybe a fine-tuning would be enough?\r\n- If so, what are the steps you would reccomend that I partake in fine-tuning SQUIM? I've taken a look at [this paper](https://arxiv.org/pdf/2206.12285) that @nateanl provided to another user inquired about it (in #3424), but it is still not clear to me how I should proceed.\r\n- Is SQUIM the best alternative for this? I've looked at other techniques for non-reference speech quality assessment, and it seems SQUIM is up there with the best of them for offline applications. But for real-time scenarios, I'm not sure.\r\n\r\nThank you in advance for any help/guidance you can provide. I'm open to help out in any way, if need be, to make SQUIM work better in real-time applications.",
    "url": "https://github.com/pytorch/audio/issues/3870",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-09T19:43:35Z",
    "updated_at": "2025-01-09T19:43:35Z",
    "comments": 0,
    "user": "balkce"
  },
  {
    "repo": "huggingface/Google-Cloud-Containers",
    "number": 138,
    "title": "entrypoint.sh for TGI does not implemented requirements.txt installation process",
    "body": "Hello team,\r\n\r\nLike this sample, https://github.com/huggingface/Google-Cloud-Containers/blob/main/containers/pytorch/inference/gpu/2.3.1/transformers/4.46.1/py311/entrypoint.sh\r\n\r\nThe entrypoint needs requirements.txt provisioning process.\r\n\r\nBut in this TGI sample does not contains these procedure.\r\nhttps://github.com/huggingface/Google-Cloud-Containers/blob/main/containers/tgi/gpu/3.0.1/entrypoint.sh\r\n\r\nIs it missing or handled by text_generation_launcher process internally ?",
    "url": "https://github.com/huggingface/Google-Cloud-Containers/issues/138",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-09T08:09:14Z",
    "updated_at": "2025-01-21T07:44:52Z",
    "user": "jk1333"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 623,
    "title": "Why different dimensionality state tensor with n_obs_steps vs not?",
    "body": "Curious about a design decision - why not have ACT with a [batch, n_obs_steps, state_dim] tensor but assert that n_obs_steps is length 1? Instead of [batch, state_dim]\r\n\r\nCurrently, we have to detect different dimensionality and handle when we're writing policy-agnostic code",
    "url": "https://github.com/huggingface/lerobot/issues/623",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2025-01-08T18:16:51Z",
    "updated_at": "2025-10-19T02:32:27Z",
    "user": "genemerewether"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3348,
    "title": "\u2753 [Question] How to save tensorrt engine ? ",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## I had already save torch.jit model and infer with pytorch backend successful, but I had tried find some example in project and issue, but I can not find any case, code, example, tutorial to show how to save a tensorrt engine for running by tensorrt backend, can you help me?\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3348",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-08T12:24:23Z",
    "updated_at": "2025-01-08T15:10:27Z",
    "user": "lzcchl"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10496,
    "title": "NF4 quantized flux models with loras",
    "body": "Is there any update here ?  With nf4 quantized flux models, i could not use any lora            \r\n\r\n>  **Update**: NF4 serialization and loading are working fine. @DN6 let's brainstorm how we can support it more easily? This would help us unlock doing LoRAs on the quantized weights, too (cc: @BenjaminBossan for PEFT). I think this will become evidently critical for larger models. \r\n> \r\n> `transformers` has a nice reference for us to follow. Additionally, `accelerate` has: https://huggingface.co/docs/accelerate/en/usage_guides/quantization, but it doesn't support NF4 serialization yet.\r\n> \r\n> Cc: @SunMarc for jamming on this together.\r\n> \r\n> _Originally posted by @sayakpaul in https://github.com/huggingface/diffusers/issues/9165#issuecomment-2287694518_\r\n>             ",
    "url": "https://github.com/huggingface/diffusers/issues/10496",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-08T11:41:01Z",
    "updated_at": "2025-01-13T19:42:03Z",
    "comments": 12,
    "user": "hamzaakyildiz"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1453,
    "title": "Unabled to import torchao experimental quant_api ",
    "body": "### \ud83d\udc1b Describe the bug\n\nSo i try to export my model and quantize it into .pte file using this command :\r\npython3 torchchat.py export llama3.2-1b-instruct --quantize torchchat/quant_config/mobile.json --output-pte-path llama3.2_1b_instruct.pte\r\n\r\nBefore I do this, I already activate venv and executorch env, \r\nBut i got error :\r\n\r\nPyTorch version 2.6.0.dev20241218+cpu available.\r\nUnabled to import torchao experimental quant_api with error:  [Errno 2] No such file or directory: '/home/-/torchchat/torchao-build/src/ao/torchao/experimental/quant_api.py'\r\nUsing device=cpu\r\nSetting max_seq_length to 128 for ExecuTorch export.\r\nLoading model...\r\nTime to load model: 1.25 seconds\r\nQuantizing the model with: {'embedding': {'bitwidth': 4, 'groupsize': 32}, 'linear:a8w4dq': {'groupsize': 256}}\r\nKilled\r\n\r\nI try to find torchao :\r\nName: torchao\r\nVersion: 0.8.0+git2e032c6b\r\nSummary: Package for applying ao techniques to GPU models\r\nHome-page: https://github.com/pytorch-labs/ao\r\nAuthor:\r\nAuthor-email:\r\nLicense:\r\nLocation: /home/-/.pyenv/versions/3.10.0/lib/python3.10/site-packages\r\nRequires:\r\nRequired-by:\r\n\r\nI think maybe this is the problem. I want to know how can I change torchchat to find the path in /home/-/.pyenv/versions/3.10.0/lib/python3.10/site-packages instead of /home/-/torchchat/torchao-build/src/ao/torchao/experimental/quant_api.py\n\n### Versions\n\nPyTorch version: 2.6.0.dev20241218+cpu\r\nIs debug build: False\r\nCUDA used to build PyTorch: Could not collect\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 22.04.5 LTS (x86_64)\r\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\r\nClang version: Could not collect\r\nCMake version: version 3.31.2\r\nLibc version: glibc-2.35\r\n\r\nPython version: 3.10.0 (default, Jan  4 2025, 09:08:08) [GCC 11.4.0] (64-bit runtime)\r\nPython platform: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35\r\nIs CUDA available: False\r\nCUDA runtime version: Could not collect\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 4050 Laptop GPU\r\nNvidia driver version: 555.99\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                         x86_64\r\nCPU op-mode(s):                       32-bit, 64-bit\r\nAddress sizes:                        39 bits physical, 48 bits virtual\r\nByte Order:                           Little Endian\r\nCPU(s):                               20\r\nOn-line CPU(s) list:                  0-19\r\nVendor ID:                            GenuineIntel\r\nModel name:                           13th Gen Intel(R) Core(TM) i7-13700H\r\nCPU family:                           6\r\nModel:                                186\r\nThread(s) per core:                   2\r\nCore(s) per socket:                   10\r\nSocket(s):                            1\r\nStepping:                             2\r\nBogoMIPS:                             5836.80\r\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves avx_vnni umip waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize flush_l1d arch_capabilities\r\nVirtualization:                       VT-x\r\nHypervisor vendor:                    Microsoft\r\nVirtualization type:                  full\r\nL1d cache:                            480 KiB (10 instances)\r\nL1i cache:                            320 KiB (10 instances)\r\nL2 cache:                             12.5 MiB (10 instances)\r\nL3 cache:                             24 MiB (1 instance)\r\nVulnerability Gather data sampling:   Not affected\r\nVulnerability Itlb multihit:          Not affected\r\nVulnerability L1tf:                   Not affected\r\nVulnerability Mds:                    Not affected\r\nVulnerability Meltdown:               Not affected\r\nVulnerability Mmio stale data:        Not affected\r\nVulnerability Reg file data sampling: Vulnerable: No microcode\r\nVulnerability Retbleed:               Mitigation; Enhanced IBRS\r\nVulnerability Spec rstack overflow:   Not affected\r\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl and seccomp\r\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\r\nVulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S\r\nVulnerability Srbds:                  Not affected\r\nVulnerability Tsx async abort:        Not affected\r\n\r\nVersions of rele",
    "url": "https://github.com/pytorch/torchchat/issues/1453",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-08T11:05:43Z",
    "updated_at": "2025-01-10T12:43:55Z",
    "comments": 1,
    "user": "Arthamna"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1452,
    "title": "Why Torchchat uses MATH as SDPA backend?",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi maintainers,\r\n\r\nI find that, Torchchat uses MATH as SDPA backend in https://github.com/pytorch/torchchat/blob/main/torchchat/generate.py#L542.  However, for other libs like vllm, they all accept flash attention as default backend.\r\n\r\nSo why Torchchat uses MATH as a default backend? Is this required for accuracy? If not, I can help to add an argument to let user set the backend. Thanks!\n\n### Versions\n\n*",
    "url": "https://github.com/pytorch/torchchat/issues/1452",
    "state": "closed",
    "labels": [
      "enhancement",
      "triaged"
    ],
    "created_at": "2025-01-08T08:40:03Z",
    "updated_at": "2025-01-22T01:57:41Z",
    "comments": 8,
    "user": "yanbing-j"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10489,
    "title": "Bug in SanaPipeline example?",
    "body": "### Describe the bug\r\n\r\nI think there might be something wrong with the `SanaPipeline` example code at https://huggingface.co/docs/diffusers/main/en/api/pipelines/sana#diffusers.SanaPipeline\r\nIt results in a shape mismatch (see detailed logs below): `mat1 and mat2 shapes cannot be multiplied (600x256000 and 2304x1152)`\r\n \r\nI've noticed that the `text_encoder` model looks different depending on the way it is loaded. \r\n* If I **load it with the official example code** (=code in `Reproduction`), `pipeline.text_encoder` looks like this:\r\n```\r\nGemma2ForCausalLM(\r\n  (model): Gemma2Model(\r\n    (embed_tokens): Embedding(256000, 2304, padding_idx=0)\r\n    (layers): ModuleList(\r\n      (0-25): 26 x Gemma2DecoderLayer(\r\n        (self_attn): Gemma2Attention(\r\n          (q_proj): Linear(in_features=2304, out_features=2048, bias=False)\r\n          (k_proj): Linear(in_features=2304, out_features=1024, bias=False)\r\n          (v_proj): Linear(in_features=2304, out_features=1024, bias=False)\r\n          (o_proj): Linear(in_features=2048, out_features=2304, bias=False)\r\n          (rotary_emb): Gemma2RotaryEmbedding()\r\n        )\r\n        (mlp): Gemma2MLP(\r\n          (gate_proj): Linear(in_features=2304, out_features=9216, bias=False)\r\n          (up_proj): Linear(in_features=2304, out_features=9216, bias=False)\r\n          (down_proj): Linear(in_features=9216, out_features=2304, bias=False)\r\n          (act_fn): PytorchGELUTanh()\r\n        )\r\n        (input_layernorm): Gemma2RMSNorm((2304,), eps=1e-06)\r\n        (pre_feedforward_layernorm): Gemma2RMSNorm((2304,), eps=1e-06)\r\n        (post_feedforward_layernorm): Gemma2RMSNorm((2304,), eps=1e-06)\r\n        (post_attention_layernorm): Gemma2RMSNorm((2304,), eps=1e-06)\r\n      )\r\n    )\r\n    (norm): Gemma2RMSNorm((2304,), eps=1e-06)\r\n  )\r\n  (lm_head): Linear(in_features=2304, out_features=256000, bias=False)\r\n)\r\n```\r\n\r\nIf however I **don't load the components separately** but with the code provided by @lawrence-cj  [here](https://github.com/huggingface/diffusers/issues/10334#issuecomment-2558359268) it 1) works and 2) the `text_encoder` looks different:\r\n\r\n```\r\nGemma2Model(\r\n  (embed_tokens): Embedding(256000, 2304, padding_idx=0)\r\n  (layers): ModuleList(\r\n    (0-25): 26 x Gemma2DecoderLayer(\r\n      (self_attn): Gemma2Attention(\r\n        (q_proj): Linear(in_features=2304, out_features=2048, bias=False)\r\n        (k_proj): Linear(in_features=2304, out_features=1024, bias=False)\r\n        (v_proj): Linear(in_features=2304, out_features=1024, bias=False)\r\n        (o_proj): Linear(in_features=2048, out_features=2304, bias=False)\r\n        (rotary_emb): Gemma2RotaryEmbedding()\r\n      )\r\n      (mlp): Gemma2MLP(\r\n        (gate_proj): Linear(in_features=2304, out_features=9216, bias=False)\r\n        (up_proj): Linear(in_features=2304, out_features=9216, bias=False)\r\n        (down_proj): Linear(in_features=9216, out_features=2304, bias=False)\r\n        (act_fn): PytorchGELUTanh()\r\n      )\r\n      (input_layernorm): Gemma2RMSNorm((2304,), eps=1e-06)\r\n      (pre_feedforward_layernorm): Gemma2RMSNorm((2304,), eps=1e-06)\r\n      (post_feedforward_layernorm): Gemma2RMSNorm((2304,), eps=1e-06)\r\n      (post_attention_layernorm): Gemma2RMSNorm((2304,), eps=1e-06)\r\n    )\r\n  )\r\n  (norm): Gemma2RMSNorm((2304,), eps=1e-06)\r\n)\r\n```\r\n-> the language modeling head `lm_head` is gone. Is guess that's all expected (?) but I haven't found any documentation of this behaviour or where in the pipeline code this happens. \r\n\r\n### Reproduction\r\n\r\n```python\r\nimport torch\r\nfrom diffusers import BitsAndBytesConfig as DiffusersBitsAndBytesConfig, SanaTransformer2DModel, SanaPipeline\r\nfrom transformers import BitsAndBytesConfig as BitsAndBytesConfig, AutoModelForCausalLM\r\n\r\nquant_config = BitsAndBytesConfig(load_in_8bit=True)\r\ntext_encoder_8bit = AutoModelForCausalLM.from_pretrained(\r\n    \"Efficient-Large-Model/Sana_600M_1024px_diffusers\",\r\n    subfolder=\"text_encoder\",\r\n    # quantization_config=quant_config,\r\n    torch_dtype=torch.float16,\r\n)\r\n\r\nquant_config = DiffusersBitsAndBytesConfig(load_in_8bit=True)\r\ntransformer_8bit = SanaTransformer2DModel.from_pretrained(\r\n    \"Efficient-Large-Model/Sana_600M_1024px_diffusers\",\r\n    subfolder=\"transformer\",\r\n    # quantization_config=quant_config,\r\n    torch_dtype=torch.float16,\r\n)\r\n\r\npipeline = SanaPipeline.from_pretrained(\r\n    \"Efficient-Large-Model/Sana_600M_1024px_diffusers\",\r\n    text_encoder=text_encoder_8bit,\r\n    transformer=transformer_8bit,\r\n    torch_dtype=torch.float16,\r\n    device_map=\"balanced\",\r\n)\r\n\r\nprompt = \"a tiny astronaut hatching from an egg on the moon\"\r\nimage = pipeline(prompt).images[0]\r\nimage.save(\"sana.png\")\r\n```\r\n\r\nLoading without `quantization_config` because for some reason this does not work on my mac but I tried the same code on a 4090 and it fails there too.\r\n\r\n### Logs\r\n\r\n```shell\r\n---------------------------------------------------------------------------\r\nRuntimeError                              Traceback (most recent call last)\r\nCell In[5], line 30\r\n    ",
    "url": "https://github.com/huggingface/diffusers/issues/10489",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-01-07T17:14:27Z",
    "updated_at": "2025-01-08T05:18:05Z",
    "comments": 2,
    "user": "geronimi73"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 144324,
    "title": "FSDP:  How to support w8a8 quantization?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI replaced nn.Linear with QuantLinear, substituting the nn.Linear operator with an int8 quantized operator.\r\n\r\n\r\nact_tensor_int8, pertoken_scale = torch_npu.npu_dynamic_quant(x)\r\n\r\nquant_out = torch_npu.npu_quant_matmul(act_tensor_int8, \r\n                                       self.weight.to(torch.int8),\r\n                                       self.weight_scale,         # weight scale \r\n                                       offset=None, \r\n                                       bias=self.bias, \r\n                                       pertoken_scale=pertoken_scale,\r\n                                       output_dtype=torch.bfloat16)\r\n\r\n\r\n\r\nThis change has achieved performance gains on a single GPU. However, when wrapped with FSDP (Fully Sharded Data Parallel) on multiple GPUs,\r\n\r\nmodel_fsdp = FullyShardedDataParallel(model, **settings)\r\nit fails to run because FSDP performs parameter sharding and cannot handle this quantized operator. The error message is as follows:\r\n\r\n[rank4]: RuntimeError: call aclnnQuantMatmulV4 failed, detail:E69999: Inner Error!\r\n[rank4]: E69999: [PID: 1182939] 2025-01-07-17:15:19.281.742 op[QuantBatchMatmulV3], [InferShape] dimensions a(12608) and b(128) must be equal[FUNC:InferNDimWithBias][FILE:matmul_infer_fns.cc][LINE:322]\r\n\r\n\r\nDo you have any good solutions for this issue?\r\n\r\n\n\ncc @zhaojuanmao @mrshenli @rohan-varma @awgu @fegin @kwen2501 @chauhang @penguinwu",
    "url": "https://github.com/pytorch/pytorch/issues/144324",
    "state": "closed",
    "labels": [
      "triaged",
      "module: fsdp",
      "oncall: pt2"
    ],
    "created_at": "2025-01-07T13:17:02Z",
    "updated_at": "2025-07-02T08:19:36Z",
    "user": "Lenan22"
  },
  {
    "repo": "huggingface/distil-whisper",
    "number": 164,
    "title": "How to finetune distil-whisper/distil-large-v2 model?",
    "body": "How to finetune distil-whisper/distil-large-v2 model?",
    "url": "https://github.com/huggingface/distil-whisper/issues/164",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-07T12:59:42Z",
    "updated_at": "2025-01-07T13:00:59Z",
    "user": "dhattareddy"
  },
  {
    "repo": "pytorch/xla",
    "number": 8541,
    "title": "Slow XLA training performance.",
    "body": "## \u2753 Questions and Help\r\nI'm evaluating PyTorch-XLA  for training, but noticed that there is a big degradation in performance compared  to the native pytorch device. Is it a known problem, or is there a problem with the way I use PyTorch-XLA?  I tested a simple MNIST training example, comparing the performance between PyTorch CUDA device and XLA CUDA device. The native CUDA device is twice faster.\r\nAppreciate any thoughts, suggestions or links to known performance issues, thanks!\r\n\r\n### Environment\r\nnote:  there is no difference in performance measurements with the latest 2.5.0\r\n \r\n- torch                    2.4.0\r\n- torch-xla              2.4.0\r\n- torch_xla_cuda_plugin    2.4.0.dev20240902\r\n- torchvision          0.19.0\r\n\r\n### How To Reproduce\r\n\r\nRun the test program with `xla = True` and `xla = False`\r\n\r\n``` python\r\nimport os\r\nfrom tqdm import tqdm\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.optim as optim\r\nfrom torchvision import datasets, transforms\r\nfrom torch.utils.data import DataLoader\r\nimport torch_xla.core.xla_model as xm\r\n\r\ndef get_device(xla):\r\n  if xla:\r\n    os.environ[\"PJRT_DEVICE\"] = \"CUDA\"\r\n    os.environ[\"GPU_NUM_DEVICES\"] = \"1\"\r\n    import torch_xla_cuda_plugin\r\n    from torch_xla.experimental import plugins\r\n    import torch_xla.runtime as xr\r\n    plugins.use_dynamic_plugins()\r\n    plugins.register_plugin('CUDA', torch_xla_cuda_plugin.CudaPlugin())\r\n    xr.set_device_type('CUDA')\r\n    device = xm.xla_device(devkind=\"CUDA\")\r\n  else:\r\n    device = torch.device('cuda:0')\r\n    os.environ[\"PJRT_DEVICE\"] = \"CUDA\"\r\n    os.environ[\"GPU_NUM_DEVICES\"] = \"1\"\r\n  return device\r\n\r\nxla = True\r\ndevice = get_device(xla)\r\nprint(f\"Using device: {device}\")\r\n\r\nclass SimpleNN(nn.Module):\r\n    def __init__(self):\r\n        super(SimpleNN, self).__init__()\r\n        self.fc1 = nn.Linear(28 * 28, 512)  # number of neurons\r\n        self.fc2 = nn.Linear(512, 256)      # number of neurons\r\n        self.fc3 = nn.Linear(256, 10)       # Output layer (10 classes for digits 0-9)\r\n    def forward(self, x):\r\n        x = x.view(-1, 28 * 28)  # Flatten the image\r\n        x = torch.relu(self.fc1(x))  # Apply ReLU activation\r\n        x = torch.relu(self.fc2(x))\r\n        x = self.fc3(x)\r\n        return x\r\n\r\n# Load the MNIST dataset and apply transformations\r\ntransform = transforms.Compose([\r\n    transforms.ToTensor(),\r\n    transforms.Normalize((0.5,), (0.5,))  # Normalize to [-1, 1]\r\n])\r\n\r\ntrain_dataset = datasets.MNIST(root='./data', train=True, download=True, transform=transform)\r\ntest_dataset = datasets.MNIST(root='./data', train=False, download=True, transform=transform)\r\ntrain_loader = DataLoader(train_dataset, batch_size=64, shuffle=True)\r\ntest_loader = DataLoader(test_dataset, batch_size=64, shuffle=False)\r\n\r\n# Initialize the model and move it to the device\r\nmodel = SimpleNN().to(device)\r\n\r\n# Define the loss function and optimizer\r\ncriterion = nn.CrossEntropyLoss()\r\noptimizer = optim.Adam(model.parameters(), lr=0.001)\r\n\r\n# Training loop, 20 epochs\r\nfor epoch in tqdm(range(20)):\r\n    model.train()  # Set the model to training mode\r\n    running_loss = 0.0\r\n\r\n    for data, target in tqdm(train_loader):\r\n        data, target = data.to(device), target.to(device)  # Move data to the device\r\n\r\n        optimizer.zero_grad()  # Zero the gradients\r\n        output = model(data)  # Get model predictions\r\n        loss = criterion(output, target)  # Compute the loss\r\n        loss.backward()  # Backpropagate the gradients\r\n        optimizer.step()  # Update model parameters\r\n\r\n        running_loss += loss.item()\r\n        if xla:\r\n          xm.mark_step()\r\n    print(f'Epoch {epoch + 1}, Loss: {running_loss / len(train_loader)}')\r\n\r\n# Test the model\r\nmodel.eval()\r\ncorrect = 0\r\ntotal = 0\r\nwith torch.no_grad():\r\n    for data, target in test_loader:\r\n        data, target = data.to(device), target.to(device)  # Move data to CUDA device\r\n        output = model(data)\r\n        _, predicted = torch.max(output, 1)\r\n        total += target.size(0)\r\n        correct += (predicted == target).sum().item()\r\n\r\nprint(f'Accuracy: {100 * correct / total}%')\r\n```\r\n",
    "url": "https://github.com/pytorch/xla/issues/8541",
    "state": "open",
    "labels": [
      "performance",
      "xla:gpu"
    ],
    "created_at": "2025-01-07T09:49:12Z",
    "updated_at": "2025-02-11T13:50:46Z",
    "comments": 4,
    "user": "tzstoyanov"
  },
  {
    "repo": "huggingface/doc-builder",
    "number": 539,
    "title": "How to Deploy huggingface/doc-builder Artifacts to GitHub Pages?",
    "body": "Hi,\r\n\r\nI am currently working with the `huggingface/doc-builder` and I'm looking to deploy the generated documentation artifacts to GitHub Pages. Could you provide guidance or best practices on how to achieve this?\r\n\r\nSpecifically, I am interested in understanding:\r\n\r\n1. The steps required to configure the deployment process.\r\n2. Any necessary settings or configurations within GitHub Pages.\r\n3. Common pitfalls or issues to be aware of during deployment.\r\n\r\nThank you for your assistance!",
    "url": "https://github.com/huggingface/doc-builder/issues/539",
    "state": "open",
    "labels": [],
    "created_at": "2025-01-07T08:37:05Z",
    "updated_at": "2025-01-07T08:37:05Z",
    "user": "shunk031"
  },
  {
    "repo": "huggingface/peft",
    "number": 2310,
    "title": "Comparison of Different Fine-Tuning Techniques for Conversational AI",
    "body": "### Feature request\n\nIt would be incredibly helpful to have a clear comparison or support for various fine-tuning techniques specifically for conversational AI. This feature could include insights into their strengths, limitations, and ideal use cases, helping practitioners choose the right approach for their needs.\r\n\r\nHere\u2019s a list of techniques to consider:\r\n\r\nLoRa\r\nAdaLoRa\r\nBONE\r\nVeRa\r\nXLora\r\nLN Tuning\r\nVbLora\r\nHRA (Hyperparameter Regularization Adapter)\r\nIA3 (Input-Aware Adapter)\r\nLlama Adapter\r\nCPT (Conditional Prompt Tuning)etc\n\n### Motivation\n\nWith the growing number of fine-tuning techniques for conversational AI, it can be challenging to identify the most suitable approach for specific use cases. A comprehensive comparison of these techniques\u2014highlighting their strengths, limitations, and ideal scenarios\u2014would save time, reduce trial-and-error, and empower users to make informed decisions. This feature would bridge the gap between research and practical application, enabling more effective model customization and deployment.\n\n### Your contribution\n\nI\u2019d be happy to collaborate on this! While I might not have a complete solution right now, I\u2019m willing to contribute by gathering resources, reviewing papers, or helping organize comparisons. If others are interested in teaming up, we could work together on a PR to make this feature happen. Let\u2019s connect and brainstorm how we can tackle this effectively! ",
    "url": "https://github.com/huggingface/peft/issues/2310",
    "state": "open",
    "labels": [
      "good first issue",
      "help wanted",
      "contributions-welcome"
    ],
    "created_at": "2025-01-07T07:07:50Z",
    "updated_at": "2025-12-15T09:58:10Z",
    "comments": 44,
    "user": "ImamaDev"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 83,
    "title": "How to save/extract executed code",
    "body": "Is it possible to save the executed code? It's already in the log. It will be very useful.\r\nex.\r\n```\r\n\u256d\u2500 Executing this code: \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\r\n\u2502    1 attractions_list = [                                                                                                                    \u2502\r\n\u2502    2     [\"Attraction\", \"Description\"],                                                                                                      \u2502\r\n\u2502    3     [\"Sensoji Temple\", \"The oldest temple in Tokyo, offering beautiful architecture and a rich history.\"],                              \u2502\r\n\u2502    4     [\"Nakamise Shopping Street\", \"A historic shopping street with souvenirs and traditional snacks.\"],                                  \u2502\r\n\u2502    5     [\"Kibi Dango\", \"A traditional rice cake snack available at Nakamise Street.\"],                                                      \u2502\r\n\u2502    6     [\"Asakusa Jinja\", \"A historic Shinto shrine that survived the bombings during WWII.\"],                                              \u2502\r\n\u2502    7     [\"Kimono Experience\", \"Rent a kimono and walk around Asakusa.\"],                                                                    \u2502\r\n\u2502    8     [\"Asakusa Culture Tourist Information Center\", \"A building with unique architecture, great for photos.\"],                           \u2502\r\n\u2502    9     [\"Tokyo Skytree\", \"The tallest structure in Tokyo, offering panoramic views.\"],                                                     \u2502\r\n\u2502   10     [\"Hanayashiki\", \"Japan\u2019s oldest amusement park with nostalgic charm.\"],                                                             \u2502\r\n\u2502   11     [\"Demboin Garden\", \"A serene Japanese garden adjacent to Sensoji Temple.\"],                                                         \u2502\r\n\u2502   12     [\"Azuma-bashi Bridge\", \"An iconic bridge offering views of the Tokyo Skytree.\"]                                                     \u2502\r\n\u2502   13 ]                                                                                                                                       \u2502\r\n\u2502   14                                                                                                                                         \u2502\r\n\u2502   15 # Convert the list to CSV format (string)                                                                                               \u2502\r\n\u2502   16 csv_data = \"\\n\".join([\",\".join(row) for row in attractions_list])                                                                       \u2502\r\n\u2502   17                                                                                                                                         \u2502\r\n\u2502   18 # Save the CSV data to file                                                                                                             \u2502\r\n\u2502   19 save_csv(data=csv_data, filename='asakusa_trip.csv')                                                                                    \u2502\r\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f",
    "url": "https://github.com/huggingface/smolagents/issues/83",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-06T15:40:17Z",
    "updated_at": "2025-02-16T17:43:40Z",
    "user": "Lodimup"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10475,
    "title": "[SD3]The quality of the images generated by the inference is not as high as on the validation set during fine-tuning?",
    "body": "### Describe the bug\n\nWhy is the quality of the graphs I generate with `StableDiffusion3Pipeline` not as good as the quality of the images in the validation set in the log generated when using dreambooth_lora for fine tuning?\r\nMaybe I need some other plugin or parameter setting to maintain the same image quality as the validation set?\n\n### Reproduction\n\n```\r\n# Here is my inference code:\r\n\r\nimport torch\r\nfrom diffusers import StableDiffusion3Pipeline\r\n\r\npipe = StableDiffusion3Pipeline.from_pretrained('./diffusers/stabilityai/stable-diffusion-3-medium-diffusers', torch_dtype=torch.float16).to('cuda')\r\npipe.load_lora_weights(\"./my_path/pytorch_lora_weights.safetensors\", adapter_name=\"test_lora\")\r\nimg = pipe(\r\n    \"my prompt...\",\r\n    generator=torch.manual_seed(1),\r\n    num_inference_steps=40,\r\n    guidance_scale=6\r\n).images[0].save('/root/my_img.png')\r\n```\n\n### Logs\n\n_No response_\n\n### System Info\n\nDiffuser Version: stable-diffusion-3-medium\r\nCUDA Version: 12.4\r\nGPU: NVIDIA A800 80GB\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/10475",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2025-01-06T14:52:57Z",
    "updated_at": "2025-02-06T12:17:47Z",
    "comments": 8,
    "user": "ytwo-hub"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7356,
    "title": "How about adding a feature to pass the key when performing map on DatasetDict?",
    "body": "### Feature request\n\nAdd a feature to pass the key of the DatasetDict when performing map\n\n### Motivation\n\nI often preprocess using map on DatasetDict. \r\nSometimes, I need to preprocess train and valid data differently depending on the task. \r\nSo, I thought it would be nice to pass the key (like train, valid) when performing map on DatasetDict. \r\n\r\nWhat do you think?\n\n### Your contribution\n\nI can submit a pull request to add the feature to pass the key of the DatasetDict when performing map.",
    "url": "https://github.com/huggingface/datasets/issues/7356",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2025-01-06T08:13:52Z",
    "updated_at": "2025-03-24T10:57:47Z",
    "user": "jp1924"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10468,
    "title": "What is accelerate_ds2.yaml\uff1f",
    "body": "I can't find accelerate config file named \"accelerate_ds2.yaml\". \r\nPlease give me the file.\r\nThanks very much!",
    "url": "https://github.com/huggingface/diffusers/issues/10468",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-06T07:53:06Z",
    "updated_at": "2025-01-12T05:32:01Z",
    "user": "aa327chenge"
  },
  {
    "repo": "huggingface/transformers",
    "number": 35523,
    "title": "How about adding a combined step and epoch feature to save_strategy?",
    "body": "### Feature request\n\nAdd epoch+steps functionality to save_strategy\n\n### Motivation\n\nI often set save_strategy to epoch for saving, but sometimes I need to run experiments with steps. \r\nRecently, I had to compare checkpoints saved at both epoch and step intervals, which required running the experiment twice and was quite cumbersome. Having a combined feature would be really helpful. What do you think?\n\n### Your contribution\n\nI can add the epoch+steps functionality to save_strategy.",
    "url": "https://github.com/huggingface/transformers/issues/35523",
    "state": "closed",
    "labels": [
      "Feature request"
    ],
    "created_at": "2025-01-06T02:21:22Z",
    "updated_at": "2025-02-17T00:02:42Z",
    "user": "jp1924"
  },
  {
    "repo": "huggingface/transformers",
    "number": 35512,
    "title": "Perhaps your features (`videos` in this case) have excessive nesting (inputs type `list` where type `int` is expected).",
    "body": "### System Info\n\nCopy-and-paste the text below in your GitHub issue and FILL OUT the two last points.\n\n- `transformers` version: 4.46.1\n- Platform: Linux-5.15.0-125-generic-x86_64-with-glibc2.35\n- Python version: 3.10.16\n- Huggingface_hub version: 0.27.0\n- Safetensors version: 0.4.5\n- Accelerate version: 1.0.1\n- Accelerate config:    not found\n- PyTorch version (GPU?): 2.5.1+cu124 (True)\n- Tensorflow version (GPU?): not installed (NA)\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\n- Jax version: not installed\n- JaxLib version: not installed\n- Using distributed or parallel set-up in script?: <fill in>\n- Using GPU in script?: <fill in>\n- GPU type: NVIDIA GeForce RTX 4090\n\n### Who can help?\n\n@ArthurZucker \n\nclass BatchEncoding(UserDict):\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n```python\n<s> [INST] What are the names of some famous actors that started their careers on Broadway? [/INST] Some famous actors that started their careers on Broad[78/1906]\nde:                                                                                                                                                                \n1. Hugh Jackman                                                                                                                                                    \n2. Meryl Streep                                                                                                                                                    \n3. Denzel Washington                                                                                                                                               \n4. Julia Roberts                                                                                                                                                   \n5. Christopher Walken                                                                                                                                              \n6. Anthony Rapp                                                                                                                                                    \n7. Audra McDonald                                                                                                                                                  \n8. Nathan Lane                                                                                                                                                     \n9. Sarah Jessica Parker                                                                                                                                            \n10. Lin-Manuel Miranda</s>                                                                                                                                         \nlabel_ids:                                                                                                                                                         \n[-100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 2909, 8376, 16760, 369, \n2774, 652, 26072, 356, 24331, 3024, 28747, 28705, 13, 28740, 28723, 22389, 4299, 1294, 28705, 13, 28750, 28723, 351, 1193, 28714, 4589, 615, 28705, 13, 28770, 2872\n3, 4745, 10311, 5924, 28705, 13, 28781, 28723, 19526, 18021, 28705, 13, 28782, 28723, 17561, 9863, 269, 28705, 13, 28784, 28723, 15089, 399, 763, 28705, 13, 28787,\n 28723, 14421, 520, 25999, 28705, 13, 28783, 28723, 20514, 19029, 28705, 13, 28774, 28723, 12642, 24062, 19673, 28705, 13, 28740, 28734, 28723, 6678, 28733, 2356, \n3009, 9154, 5904, 2]                                                                                                                                               \nlabels:                                                                                                                                                            \nSome famous actors that started their careers on Broadway include:                                                                                                 \n1. Hugh Jackman                                                                                                                                                    \n2. Meryl Streep                                                                                                                                                    \n3. Denzel Washington                                                                                                                                               \n4. Julia Roberts                                                                                                                                                   \n5. Christopher Walken                                  ",
    "url": "https://github.com/huggingface/transformers/issues/35512",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-01-05T06:51:26Z",
    "updated_at": "2025-02-13T08:45:39Z",
    "user": "yxy-kunling"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10452,
    "title": "pipe.disable_model_cpu_offload",
    "body": "**Is your feature request related to a problem? Please describe.**\r\n\r\nIf I enable the following in Gradio interface\r\nsana_pipe.enable_model_cpu_offload()\r\n\r\nand during next generation I want to disable cpu offload, how to do it? I mentioned Gradio specifically as command line inference will not have this problem unless after initializing pipe you generate multiple times with and without cpu offload.\r\n\r\nI already searched but nothing found\r\nhttps://github.com/search?q=repo%3Ahuggingface%2Fdiffusers%20disable_model_cpu_offload&type=code\r\n\r\n**Describe the solution you'd like.**\r\nAdd method to disable for \r\n1. enable_model_cpu_offload()\r\n2. enable_sequential_cpu_offload()\r\n\r\n**Describe alternatives you've considered.**\r\nI will have to delete the pipe completely and load again for each inference in Gradio UI\r\n\r\nKindly suggest if any alternative solution.\r\n\r\n\r\n```\r\nimport torch\r\nfrom diffusers import SanaPipeline\r\n\r\npipe = SanaPipeline.from_pretrained(\r\n\t\"Efficient-Large-Model/Sana_1600M_1024px_BF16_diffusers\", torch_dtype=torch.float32\r\n)\r\npipe.to(\"cuda\")\r\npipe.text_encoder.to(torch.bfloat16)\r\npipe.transformer = pipe.transformer.to(torch.bfloat16)\r\npipe.enable_model_cpu_offload()\r\n\r\nimage = pipe(prompt='a cyberpunk cat with a neon sign that says \"Sana\"')[0]\r\nimage[0].save(\"output.png\")\r\n\r\npipe.disable_model_cpu_offload()\r\nimage = pipe(prompt='a cyberpunk cat with a neon sign that says \"Sana 1\"')[0]\r\nimage[0].save(\"output1.png\")\r\n```\r\n\r\nP.S. How to delete a pipe completely so all models are removed completely and GPU memory is freed\r\nI did checked documentation but unable to find find anything relevant\r\nhttps://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/sana/pipeline_sana.py\r\n\r\nhttps://github.com/huggingface/diffusers/blob/4e44534845d35248436abf87688906f52e71b868/src/diffusers/pipelines/pipeline_utils.py\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/10452",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-04T16:39:01Z",
    "updated_at": "2025-01-07T08:29:32Z",
    "comments": 3,
    "user": "nitinmukesh"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10448,
    "title": "Load DDUF file with Diffusers using mmap",
    "body": "DDUF support for diffusers is there and DDUF support mmap.\n\nBut diffusers example doesn't use or support mmap,\n\nHow can I load DDUF file to diffusers with mmap?\n\n```\nfrom diffusers import DiffusionPipeline\nimport torch\n\npipe = DiffusionPipeline.from_pretrained(\n    \"DDUF/FLUX.1-dev-DDUF\", dduf_file=\"FLUX.1-dev.dduf\", torch_dtype=torch.bfloat16\n).to(\"cuda\")\nimage = pipe(\n    \"photo a cat holding a sign that says Diffusers\", num_inference_steps=50, guidance_scale=3.5\n).images[0]\nimage.save(\"cat.png\")\n```",
    "url": "https://github.com/huggingface/diffusers/issues/10448",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2025-01-04T00:42:09Z",
    "updated_at": "2025-02-03T15:02:46Z",
    "comments": 1,
    "user": "adhikjoshi"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 613,
    "title": "Starting off with pretrained models",
    "body": "Are there any pretrained models available that can be fine tuned using our own dataset for tasks like pick and place and manipulation? ",
    "url": "https://github.com/huggingface/lerobot/issues/613",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2025-01-03T21:09:40Z",
    "updated_at": "2025-10-08T20:53:09Z",
    "user": "rabhishek100"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2148,
    "title": "Support for Exporting Specific Sub-Modules (e.g., Encoder, Decoder)",
    "body": "### Feature request\n\nCurrently, when converting transformer models (like T5, but potentially others) to ONNX using the Optimum library, it appears to generate a single ONNX file encompassing the entire model architecture (both encoder and decoder). This occurs regardless of the specific task option selected during conversion.\r\n\r\n```\r\noptimum-cli export onnx --model . . --task text-classification\r\noptimum-cli export onnx --model . . --task feature-extraction \r\n```\r\nI propose a feature that provides users with more granular control over the ONNX export process. Specifically, this feature should allow users to selectively export specific sub-modules of a transformer model, such as:\r\n\r\n*   Only the encoder\r\n*   Only the decoder\r\n*   Potentially other distinct components of the model\r\n\r\nThis enhancement would enable users to optimize ONNX models for specific use cases where only a portion of the full model is required. \r\nEvidence of the feasibility and need for this is the existence of separately exported encoder and decoder ONNX models for various transformer architectures on Hugging Face:\r\n- https://huggingface.co/dmmagdal/flan-t5-large-onnx-js/tree/main/onnx\r\n- https://huggingface.co/onnx-community/Florence-2-base-ft/tree/main/onnx\n\n### Motivation\n\nI am encountering a limitation with the current ONNX export functionality in Optimum. When converting transformer models, the resulting ONNX file invariably includes the entire model, even when I only require a specific part, like the encoder.\r\n\r\nThis is frustrating because:\r\n\r\n*   **Increased Model Size:** The generated ONNX model is larger than necessary, consuming more storage and potentially impacting loading times.\r\n*   **Performance Overhead:**  When deploying the ONNX model for tasks that only utilize a specific sub-module (e.g., using only the encoder for embedding generation), the presence of the unnecessary decoder can introduce performance overhead.\r\n*   **Lack of Flexibility:** The current approach lacks the flexibility to tailor the exported ONNX model to specific application needs.\r\n\r\nAs observed on Hugging Face, users have successfully exported individual components (like encoders and decoders) of various transformer models to ONNX. This indicates that it's technically possible and a desirable workflow. The Optimum library should provide a more direct and user-friendly way to achieve this without requiring manual workarounds.\n\n### Your contribution\n\nWhile my direct expertise in the internal workings of the Optimum library for ONNX export is limited, I am willing to contribute by:\r\n\r\n*   **Testing:** Thoroughly testing any implementation of this feature on various transformer models.\r\n*   **Providing Feedback:** Offering detailed feedback on the usability and effectiveness of the new feature.\r\n*   **Sharing Use Cases:** Providing specific use cases and examples that highlight the benefits of this functionality.",
    "url": "https://github.com/huggingface/optimum/issues/2148",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2025-01-03T14:48:36Z",
    "updated_at": "2025-04-08T02:09:03Z",
    "comments": 4,
    "user": "happyme531"
  },
  {
    "repo": "pytorch/vision",
    "number": 8836,
    "title": "Question: Modify Resnet File structure and how to import it",
    "body": "Hi, I would like to modify the structure of the model [Resnet50 ](https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py). My goal is neither to add nor to remove layers, only to replace the convolutions that in the code are made by the pytorch nn.Conv function by convolutions made by the Nvidia CUTLASS library (https://github.com/NVIDIA/cutlass/blob/main/examples/python/02_pytorch_extension_grouped_gemm.ipynb).\r\n\r\nI don't intend either to retrain or to modify weights, only to substitute the call to the convolutions with the call to a convolution of cutlass in a similar way to how I describe it in the pytorch forum: https://discuss.pytorch.org/t/using-diffetent-conv2d-ops-with-pre-trained-models/214367\r\n\r\nMy question is if it is possible, within the guidelines of the repository and then how can I import the file [Resnet50 ](https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py) from another file or pytorch as it would be done with https://pytorch.org/vision/main/models.html. \r\n\r\nThanks.",
    "url": "https://github.com/pytorch/vision/issues/8836",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-03T12:43:50Z",
    "updated_at": "2025-04-08T15:45:32Z",
    "user": "IzanCatalan"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 52,
    "title": "How to implement human in the loop?",
    "body": "How to implement human in the loop?\r\n\r\nThere are two scenarios: one where more information and input from the user are required, and another where the user's consent is needed to perform a certain action.",
    "url": "https://github.com/huggingface/smolagents/issues/52",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-03T12:19:01Z",
    "updated_at": "2025-02-18T18:49:15Z",
    "user": "waderwu"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 611,
    "title": "Can ACT policy support pushT task?",
    "body": "I want to train the ACT policy with pushT dataset, but the evaluation accuracy is only 0%. \r\n![image](https://github.com/user-attachments/assets/12c4256a-98f9-4987-a1ab-b51ec230ba0b)\r\nHere is my yaml\r\n[act_pusht.txt](https://github.com/user-attachments/files/18299197/act_pusht.txt)\r\nAnd my training command is \r\n''\r\npython lerobot/scripts/train.py \\\r\n  hydra.run.dir=outputs/train/2025_1_3_1654_act_pusht \\\r\n  hydra.job.name=act_pusht \\\r\n  policy=act_pusht \\\r\n  policy.use_vae=true \\\r\n  env=pusht \\\r\n  env.task=PushT-v0 \\\r\n  dataset_repo_id=lerobot/pusht \\\r\n  training.offline_steps=50000 \\\r\n  training.save_freq=25000 \\\r\n  training.eval_freq=5000 \\\r\n  eval.n_episodes=50 \\\r\n  wandb.enable=false \\\r\n  device=cuda\r\n''",
    "url": "https://github.com/huggingface/lerobot/issues/611",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2025-01-03T11:30:40Z",
    "updated_at": "2025-10-19T02:32:28Z",
    "user": "Kimho666"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3211,
    "title": "\ud83d\udca1 [REQUEST] - Making the tutorial more coherent",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\n\nThe 3-series tutorial set (linked in existing tutorial set) is disconnected in term of concepts being introduced and reused; like the\r\n-  \"Dataset\" which is introduced in first tutorial but is not leveraged in next;\r\n-  Intricate details like explanation of use of `torch.LongTensor` is skipped in part 2 (generating)\r\n\r\nI wish to modify the tutorials content by:\r\n- adding a linear flow of concepts and then updating the code in follow up concepts such that the end-user is aware of what is different from last time.\r\n- Add details in explanation of what we are doing and why\r\n- Add pictures that reinforce what is we are doing and how is it related to big picture we wish to do. \n\n### Existing tutorials on this topic\n\nTutorials with the issue\r\n- https://pytorch.org/tutorials/intermediate/char_rnn_classification_tutorial.html\r\n- https://pytorch.org/tutorials/intermediate/char_rnn_generation_tutorial.html\r\n- https://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html\n\n### Additional context\n\nHey, \r\nI love tech-writing and wish to make tech adoption easier for all.\r\n\r\nBit of my works you can find.\r\n- https://github.com/LunaticMaestro/Content-Based-Book-Recommender\r\n- I am author of the AI Core tutorials (m ex-SAP employee): https://developers.sap.com/group.ai-core-get-started-basics.html",
    "url": "https://github.com/pytorch/tutorials/issues/3211",
    "state": "open",
    "labels": [
      "nlp"
    ],
    "created_at": "2025-01-03T08:46:30Z",
    "updated_at": "2025-04-16T18:11:36Z",
    "comments": 1,
    "user": "LunaticMaestro"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 770,
    "title": "How many H100 GPUs should I use to train Llama-3.1-70B models with Torchtitan?",
    "body": "I am planning to train the Llama-3.1-70B model using the Torchtitan framework and need advice on the optimal number of NVIDIA H100 GPUs required. My goal is to ensure efficient training in terms of time and cost, while maintaining a balance between hardware usage and model convergence. I\u2019d appreciate insights on batch size considerations, GPU memory utilization, and any recommended configurations for Torchtitan with this model. Additionally, if there are any benchmarks or past experiences with similar setups, please share them.\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/torchtitan/issues/770",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-03T02:21:50Z",
    "updated_at": "2025-01-04T04:46:32Z",
    "user": "jacklanda"
  },
  {
    "repo": "pytorch/executorch",
    "number": 7486,
    "title": "How to run ExecuTorch on Linux with aarch64-oe-linux-gcc11.2?",
    "body": "Hi, I am new to ExecuTorch and currently trying to build and run it on a Linux-based Qualcomm board (QCS/QCM8550). The board's specifications are:\r\n\r\nOS: Linux\r\nCompiler: aarch64-oe-linux-gcc11.2\r\nSOC Model: 66\r\nHexagon Arch: V73\r\nI noticed that most guides are focused on Android environments. Could you please provide any hints or suggestions for building and running ExecuTorch on Linux with this setup?\r\nAny help or resources would be greatly appreciated!\r\nThank you in advance!\n\ncc @mergennachin @byjlw",
    "url": "https://github.com/pytorch/executorch/issues/7486",
    "state": "closed",
    "labels": [
      "module: doc",
      "need-user-input",
      "triaged"
    ],
    "created_at": "2025-01-03T00:28:56Z",
    "updated_at": "2025-02-04T02:42:53Z",
    "user": "suhyun01150"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2147,
    "title": "Convert Stable Diffusion Inpainting model to FP16 with FP32 inputs",
    "body": "### Feature request\n\nI've used [this script](https://github.com/Amblyopius/Stable-Diffusion-ONNX-FP16/blob/main/conv_sd_to_onnx.py) to convert models to ONNX in FP16 format but maintaining the FP32 inputs. One of the models that I converted was [Stable Diffusion 2 Inpainting](https://huggingface.co/jdp8/sd-2-inpainting-fp16) to FP16 and tried to use it in ONNX Runtime and ONNX Runtime Web but it doesn't give me the expected results in either engine. I also converted [the model](https://huggingface.co/jdp8/optimum-sd-2-inpainting-onnx-fp32) with the Optimum conversion script to FP32 and this model gives me the expected result in ONNX Runtime. Results are shown below:\r\n\r\nInput Image:\r\n![inpaint](https://github.com/user-attachments/assets/751999a8-3814-40b9-a767-3717e9ea4b3e)\r\n\r\nMask Image:\r\n![inpaint_mask](https://github.com/user-attachments/assets/e421ca3b-0e0e-4050-b497-390abb399880)\r\n\r\nCorrect Onnx Runtime Output (converted with Optimum script):\r\n![onnx_cat](https://github.com/user-attachments/assets/48f4c713-5bae-42c5-ba2a-252655aca443)\r\n\r\nIncorrect Onnx Runtime Output (converted with Stable-Diffusion-ONNX-FP16 script):\r\n![onnx_cat_discolored](https://github.com/user-attachments/assets/f6c521d7-9f29-4bc9-88c6-297b4432e2f0)\r\n\r\nIncorrect Onnx Runtime Web Output (converted with Stable-Diffusion-ONNX-FP16 script):\r\n![Colorful_cat_picture](https://github.com/user-attachments/assets/2f8dcb2b-a4ba-450b-9761-2fac0da0f58c)\r\n\r\nI've also used the Optimum conversion script to convert the model to FP16 and this worked but the inputs are expected to be FP16. This datatype does not exist in JavaScript (specifically, `Float16Array`) and therefore cannot be used in ONNX Runtime Web. \r\n\r\nWith that being said, is it possible to convert a model to FP16 but leaving the inputs as FP32 in order for the UNET to be less than 2 GB?\n\n### Motivation\n\nI would like to run Stable Diffusion Inpainting in ONNX Runtime Web and for the UNET to be less than 2GB. The FP16 model that I have at the moment gives me an output that is not as expected in ONNX Runtime and ONNX Runtime Web. So far, only the Optimum models give me a correct output in ONNX Runtime but I would like to use this in ONNX Runtime Web.\n\n### Your contribution\n\nI am willing to contribute to this change given some guidance. Not sure how difficult it would be but I believe it would be similar to how it's implemented in [the script](https://github.com/Amblyopius/Stable-Diffusion-ONNX-FP16/blob/main/conv_sd_to_onnx.py) mentioned beforehand.",
    "url": "https://github.com/huggingface/optimum/issues/2147",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-02T21:28:43Z",
    "updated_at": "2025-01-25T00:15:54Z",
    "comments": 0,
    "user": "jdp8"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10433,
    "title": "[Docs] Broken Links in a Section of Documentation",
    "body": "### Broken Links in a Section of Documentation\r\n>Make sure to check out the Schedulers [guide](../../using-diffusers/schedulers) to learn how to explore the tradeoff between scheduler speed and quality, and see the [reuse components across pipelines](../../using-diffusers/loading#reuse-a-pipeline) section to learn how to efficiently load the same components into multiple pipelines.\r\n\r\nIn this section of docs `reuse components across pipelines` link is broken or Not Directed to Proper Link\r\n\r\n`reuse components across pipelines` should be directed to [Reuse a pipeline](https://huggingface.co/docs/diffusers/en/using-diffusers/loading#reuse-a-pipeline) this section instead of [Load pipelines](https://huggingface.co/docs/diffusers/en/using-diffusers/loading#reuse-components-across-pipelines) section in following File.\r\n<details>\r\n  <summary>In these docs</summary>\r\ndocs/source/en/api/pipelines/animatediff.md\r\n\r\ndocs/source/en/api/pipelines/attend_and_excite.md\r\ndocs/source/en/api/pipelines/audioldm.md\r\ndocs/source/en/api/pipelines/audioldm2.md\r\ndocs/source/en/api/pipelines/blip_diffusion.md\r\ndocs/source/en/api/pipelines/controlnet.md\r\ndocs/source/en/api/pipelines/controlnet_flux.md\r\ndocs/source/en/api/pipelines/controlnet_hunyuandit.md\r\ndocs/source/en/api/pipelines/controlnet_sd3.md\r\ndocs/source/en/api/pipelines/controlnet_sdxl.md\r\ndocs/source/en/api/pipelines/controlnetxs.md\r\ndocs/source/en/api/pipelines/controlnetxs_sdxl.md\r\ndocs/source/en/api/pipelines/dance_diffusion.md\r\ndocs/source/en/api/pipelines/ddpm.md\r\ndocs/source/en/api/pipelines/dit.md\r\ndocs/source/en/api/pipelines/i2vgenxl.md\r\ndocs/source/en/api/pipelines/kandinsky.md\r\ndocs/source/en/api/pipelines/kandinsky3.md\r\ndocs/source/en/api/pipelines/kandinsky_v22.md\r\ndocs/source/en/api/pipelines/latent_diffusion.md\r\ndocs/source/en/api/pipelines/marigold.md\r\ndocs/source/en/api/pipelines/musicldm.md\r\ndocs/source/en/api/pipelines/paint_by_example.md\r\ndocs/source/en/api/pipelines/panorama.md\r\ndocs/source/en/api/pipelines/pix2pix.md\r\ndocs/source/en/api/pipelines/self_attention_guidance.md\r\ndocs/source/en/api/pipelines/semantic_stable_diffusion.md\r\ndocs/source/en/api/pipelines/shap_e.md\r\ndocs/source/en/api/pipelines/stable_unclip.md\r\ndocs/source/en/api/pipelines/text_to_video.md\r\ndocs/source/en/api/pipelines/text_to_video_zero.md\r\ndocs/source/en/api/pipelines/unclip.md\r\ndocs/source/en/api/pipelines/unidiffuser.md\r\ndocs/source/en/api/pipelines/value_guided_sampling.md\r\n</details>\r\n\r\n---\r\n\r\n Some Links of `reuse components across pipelines` are broken in these files below.\r\n\r\n <details>\r\n  <summary>In these docs</summary>\r\n docs/source/en/api/pipelines/allegro.md\r\n\r\n docs/source/en/api/pipelines/cogvideox.md\r\n docs/source/en/api/pipelines/latte.md\r\n docs/source/en/api/pipelines/ltx_video.md\r\n docs/source/en/api/pipelines/lumina.md\r\n docs/source/en/api/pipelines/pixart.md\r\n docs/source/en/api/pipelines/sana.md\r\n</details>\r\n\r\n\r\n---\r\n\r\n\r\n And `docs/source/en/api/pipelines/hunyuan_video.md` and `docs/source/en/api/pipelines/hunyuandit.md` are not in proper format\r\n@stevhliu ",
    "url": "https://github.com/huggingface/diffusers/issues/10433",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-02T18:24:44Z",
    "updated_at": "2025-01-06T18:07:39Z",
    "comments": 0,
    "user": "SahilCarterr"
  },
  {
    "repo": "huggingface/transformers",
    "number": 35485,
    "title": " How to run the model on another machine and send the answer to another machine.",
    "body": "### System Info\n\ntransformers 4.31.0 , window os , python 3.10.12\n\n### Who can help?\n\nvision models: @amyeroberts, @qubvel\r\n\r\nI have tried using this model on my machine myself, and it works normally, but the processing is very slow because the GPU on my machine is not that powerful. However, I have a server with a strong GPU. If I install this model on the server and run the code on my machine, when it reaches the video processing stage, it sends the task to the server, and the server sends back the result. Then my machine will print the answer and display the result. Is this possible? If so, how can I do it?\r\n\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n.\n\n### Expected behavior\n\nI expect it to work in a hybrid way between my computer and the server to achieve faster results.",
    "url": "https://github.com/huggingface/transformers/issues/35485",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-01-02T10:03:42Z",
    "updated_at": "2025-01-07T10:20:46Z",
    "user": "ixn3rd3mxn"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3320,
    "title": "How to save self-defined model with deepspeed zero 3?",
    "body": "### System Info\r\n\r\n```Shell\r\n- `Accelerate` version: 1.0.1\r\n- Python version: 3.10.0\r\n- Numpy version: 1.26.4\r\n- PyTorch version (GPU?): 2.5.1+cu124 (True)\r\n- PyTorch XPU available: False\r\n- PyTorch NPU available: False\r\n- PyTorch MLU available: False\r\n- PyTorch MUSA available: False\r\n- System RAM: 128.00 GB\r\n- GPU type: NVIDIA H20\r\n- `Accelerate` default config:\r\n        - compute_environment: LOCAL_MACHINE\r\n        - distributed_type: DEEPSPEED\r\n        - mixed_precision: no\r\n        - use_cpu: False\r\n        - debug: False\r\n        - num_processes: 4\r\n        - machine_rank: 0\r\n        - num_machines: 1\r\n        - rdzv_backend: static\r\n        - same_network: True\r\n        - main_training_function: main\r\n        - enable_cpu_affinity: False\r\n        - deepspeed_config: {'gradient_accumulation_steps': 1, 'offload_optimizer_device': 'none', 'offload_param_device': 'none', 'zero3_init_flag': True, 'zero3_save_16bit_model': True, 'zero_stage': 3}                                                                                               \r\n        - downcast_bf16: no\r\n        - tpu_use_cluster: False\r\n        - tpu_use_sudo: False\r\n        - tpu_env: []\r\n```\r\n\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\r\n- [X] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nMy custom model inherits from torch.nn.Module.\r\nI am training this model with 4 H20 GPUs using deepspeed zero 3.\r\nI am trying to save a checkpoint with these code:\r\n`\r\n### save model\r\n            if (idx % args.save_per_steps == 0) and (idx != 0):\r\n                accelerator.wait_for_everyone()\r\n                if (accelerator.is_local_main_process):\r\n                    accelerator.print('Saving model ...')\r\n                    save_dir = os.path.join(args.save_path, args.save_name + '_epoch_' + str(epoch) + '_step_' + str(idx))\r\n                    accelerator.print('Getting state dict ...')\r\n                    state_dict = accelerator.get_state_dict(model)\r\n                    accelerator.print('Unwraping model ...')\r\n                    unwrapped_model = accelerator.unwrap_model(model)\r\n                    accelerator.print('Saving checkpoint ...')\r\n                    unwrapped_model.save_checkpoint(save_dir, idx, state_dict)\r\n                    accelerator.print('Model saved!')\r\n                accelerator.wait_for_everyone()\r\n`\r\n\r\n\r\n### Expected behavior\r\n\r\nThe code stuck when getting state dict.\r\nI also tried `accelerator.save_model` but it couldn't work.\r\n\r\nI am wondering what's the recommend\u200c way to save and load a large model training with deepspeed zero 3?\r\nThank you very much.",
    "url": "https://github.com/huggingface/accelerate/issues/3320",
    "state": "closed",
    "labels": [],
    "created_at": "2025-01-02T08:15:36Z",
    "updated_at": "2025-02-10T15:07:18Z",
    "user": "amoyplane"
  },
  {
    "repo": "pytorch/executorch",
    "number": 7467,
    "title": "How to run Qwen using Executorch?",
    "body": "### \ud83d\udcda The doc issue\n\nHi! I just wanted to how, how would I go about running Qwen using executorch? I was able to create the .pte file for Qwen. The example for Llama had a step 'Create a llama runner for android'. Do we have to do something similar for Qwen by creating a custom runner? Also the Qwen repository on Hugging Face Hub does not have a 'tokenizer.model' file, but the Llama example requires it for running inference using the adb shell. How to navigate around this?\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @mergennachin @cccclai @helunwencser @dvorjackz",
    "url": "https://github.com/pytorch/executorch/issues/7467",
    "state": "closed",
    "labels": [
      "triaged",
      "module: llm"
    ],
    "created_at": "2025-01-02T07:16:56Z",
    "updated_at": "2025-08-28T21:17:24Z",
    "user": "Arya-Hari"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10425,
    "title": "Euler Flow Matching Scheduler Missing Documentation for Parameters",
    "body": "### Describe the bug\n\nThe Euler flow matching scheduler in Hugging Face Diffusers is missing clear documentation for its parameters, making it difficult for users to understand how to configure the scheduler effectively for different use cases.\n\n### Reproduction\n\nSteps to Reproduce:\r\n\r\nVisit the Hugging Face Diffusers documentation page and locate the section for the Euler flow matching scheduler.\r\nTry to find documentation for the scheduler\u2019s parameters.\r\nNotice that the documentation does not clearly define the parameters or explain their effects.\n\n### Logs\n\n_No response_\n\n### System Info\n\nHugging Face Diffusers version: 0.16.1\r\nPyTorch version: 2.1.0\r\nCUDA version: 11.8\r\nCPU: Intel Core i7-12700K\r\nGPU: NVIDIA RTX 3090\n\n### Who can help?\n\n@sayakpaul @DN6",
    "url": "https://github.com/huggingface/diffusers/issues/10425",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2025-01-02T01:37:38Z",
    "updated_at": "2025-01-02T01:38:38Z",
    "comments": 0,
    "user": "hanshengzhu0001"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1130,
    "title": "Tips on Converting Newer Models",
    "body": "### Question\n\n\ud83c\udf89\ud83c\udf89Happy New Year to the incredible Transformers.js team!\ud83c\udf89\ud83c\udf89\r\n\r\nAs I work on converting new (text-generation) models for use with Transformers.js.\r\nHere's what i've tried since last week :\r\n\r\n* python converter script \r\n* optimum cli onnx\r\n* onnx-community/convert-to-onnx spaces\r\n\r\nthe problem i encounter as i move forward to newer models, i realize that the converter is looking for specific files like the ff below which is easy to convert both locally and online:\r\n![image](https://github.com/user-attachments/assets/bdb031eb-c87a-4e1a-b895-7608b94699d0)\r\n\r\nwhile some newer models consist files like of the ff below which i couldn't convert:\r\n![image](https://github.com/user-attachments/assets/01058d6a-f232-4ed5-87fe-2df82b346025)\r\n\r\ni have no problem with pc specs at all, i maybe missing some steps, rules or understanding converting models. I\u2019d greatly appreciate any tips, best practices, or resources you could share to streamline the process and ensure compatibility.\r\n\r\nMuch Appreciated!\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/1130",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2025-01-01T05:32:09Z",
    "updated_at": "2025-01-01T05:32:09Z",
    "user": "josephencila"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 606,
    "title": "Dataset does not support length of feature shape > 1",
    "body": "Hi, \r\n\r\nThank you for this excellent project!\r\nI am trying to create a custom dataset with additional sensory information (such as tactile data) which is an Array3D tensor, but find that when I use the approach mentioned in #547, there is no support to add custom tensor like observations to the episode buffer. \r\n\r\nSpecifically there are assertions that require the feature shape to be a 1D array at most [here](https://github.com/huggingface/lerobot/blob/59e275743499c5811a9f651a8947e8f881c4058c/lerobot/common/datasets/utils.py#L274)",
    "url": "https://github.com/huggingface/lerobot/issues/606",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2024-12-31T21:08:26Z",
    "updated_at": "2025-10-19T02:32:29Z",
    "user": "akashsharma02"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 169,
    "title": "How to build a dataset for finetuning CogVideoX I2V 1.5",
    "body": "Hi,\r\nI want to finetune the CogVideoX I2V 1.5 (5B) model. I have a set of videos that I want to use, but first I need to preprocess them so they meet the requirements of the model. Do I have to make sure that my fine-tuning dataset meets the generation properties of the model? That is, in the case of CogVideoX 1.5, the videos should be:\r\n\r\n- Min(W, H) = 768\r\n- 768 \u2264 Max(W, H) \u2264 1360\r\n- Max(W, H) % 16 = 0\r\n- Video Length: 5 seconds or 10 seconds\r\n- Frame Rate: 16 frames / second\r\n\r\nDo I need to make sure that all my fine-tuning videos follow those guidelines?",
    "url": "https://github.com/huggingface/finetrainers/issues/169",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-31T19:55:00Z",
    "updated_at": "2025-03-08T23:43:31Z",
    "user": "royvelich"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 765,
    "title": "Can I load from non-FSDP optimizer state with FSDP2?",
    "body": "I have been running training on a different framework with FSDP1, where I saved the states with FULL_STATE_DICT - leading to optimizer states that are in a normal `torch.save` format. I'd love to resume from this checkpoint - is this currently supported by FSDP2 / DCP? When I naively try `dcp.load` it resulted in a shard index out of range error.",
    "url": "https://github.com/pytorch/torchtitan/issues/765",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-12-31T15:52:59Z",
    "updated_at": "2025-01-28T18:47:26Z",
    "user": "syncdoth"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10416,
    "title": "Euler flow matching scheduler is missing documentation for parameters",
    "body": "![image](https://github.com/user-attachments/assets/ecd16c04-8f31-42fc-9f30-e660cf4f5853)\r\n\r\nI think there are some undocumented parameters here.",
    "url": "https://github.com/huggingface/diffusers/issues/10416",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-31T13:15:35Z",
    "updated_at": "2025-01-09T18:54:41Z",
    "comments": 4,
    "user": "bghira"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1636,
    "title": "Any way to pass authorization header from Oauth2 down to custom endpoint?",
    "body": "## Describe your feature request\r\n\r\nIt would be nice to be able to pass the authorization header from Oauth2 to custom endpoint. I have an endpoint that mimicks TGI and I would like to authenticate every request in order to protect the api,\r\n\r\n## Implementation idea\r\n\r\nJust pass an authorization header from frontend to bff and pass it further to the endpoint. It could be a custom header if that would conflict with the current authorization configuration for endpoints. The current configuration allows to pass a static auth header, but I want to be able to pass the jwt of the authenticated user.",
    "url": "https://github.com/huggingface/chat-ui/issues/1636",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-12-31T13:00:22Z",
    "updated_at": "2024-12-31T13:00:22Z",
    "comments": 0,
    "user": "corte"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10415,
    "title": "[Pipelines] Add AttentiveEraser",
    "body": "### Model/Pipeline/Scheduler description\r\n\r\nI\u2019ve worked on a project called AttentiveEraser, which is a tuning-free method for object removal in images using diffusion models. The code for this project is built upon modifications to existing Diffusers pipelines, so it should be relatively straightforward to integrate it into the library.\r\n## About AttentiveEraser\r\nAttentiveEraser enhances object removal capabilities by using self-attention redirection guidance. It supports different levels of mask precision (semantic segmentation, bounding boxes, and hand-drawn masks) and effectively fills in removed regions by leveraging the generative power of diffusion models.\r\n## Help Needed\r\nAs someone new to this process, I\u2019m unsure how to properly package this into a Diffusers pipeline. Is anyone interested in collaborating on this integration or able to provide guidance on the steps I should take next?\r\nI\u2019d love to contribute this feature to the community, and the relevant code is already available!\r\nCode: <https://github.com/Anonym0u3/AttentiveEraser>\r\nLooking forward to any suggestions or assistance!\r\n![fenmian](https://github.com/user-attachments/assets/6c21a68a-be14-437c-89db-a2059557b7a9)\r\n\r\n\r\n\r\n\r\n### Open source status\r\n\r\n- [X] The model implementation is available.\r\n- [X] The model weights are available (Only relevant if addition is not a scheduler).\r\n\r\n### Provide useful links for the implementation\r\n\r\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/10415",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-12-31T07:44:48Z",
    "updated_at": "2025-02-05T15:54:43Z",
    "comments": 7,
    "user": "Anonym0u3"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10414,
    "title": "[<languageCode>] Translating docs to Chinese",
    "body": "<!--\r\nNote: Please search to see if an issue already exists for the language you are trying to translate.\r\n-->\r\n\r\nHi!\r\n\r\nLet's bring the documentation to all the <languageName>-speaking community \ud83c\udf10.\r\n\r\nWho would want to translate? Please follow the \ud83e\udd17 [TRANSLATING guide](https://github.com/huggingface/diffusers/blob/main/docs/TRANSLATING.md). Here is a list of the files ready for translation. Let us know in this issue if you'd like to translate any, and we'll add your name to the list.\r\n\r\nSome notes:\r\n\r\n* Please translate using an informal tone (imagine you are talking with a friend about Diffusers \ud83e\udd17).\r\n* Please translate in a gender-neutral way.\r\n* Add your translations to the folder called `<languageCode>` inside the [source folder](https://github.com/huggingface/diffusers/tree/main/docs/source).\r\n* Register your translation in `<languageCode>/_toctree.yml`; please follow the order of the [English version](https://github.com/huggingface/diffusers/blob/main/docs/source/en/_toctree.yml).\r\n* Once you're finished, open a pull request and tag this issue by including #issue-number in the description, where issue-number is the number of this issue. Please ping @stevhliu for review.\r\n* \ud83d\ude4b If you'd like others to help you with the translation, you can also post in the \ud83e\udd17 [forums](https://discuss.huggingface.co/c/discussion-related-to-httpsgithubcomhuggingfacediffusers/63).\r\n\r\nThank you so much for your help! \ud83e\udd17\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/10414",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-31T06:45:21Z",
    "updated_at": "2024-12-31T06:49:52Z",
    "comments": 0,
    "user": "S20180576"
  },
  {
    "repo": "huggingface/peft",
    "number": 2301,
    "title": "How to pass in an attention _ mask that is one dimension more than input _ ids",
    "body": "### System Info\n\nHello, how can I pass in `attention_mask` that has one more dimension than `input_ids`, for example: `output = peft_model.generate(input_ids,attention_mask=attention_mask,max_new_tokens=100)` The `input_ids` dimension is [bitch_size,N], and the `attention_mask` dimension is [bitch_size,N,N]. \r\nUnder this condition, when the above line of code is run, the following error will be reported: \r\nFile \"/root/anaconda3/lib/python3.10/site-packages/transformers/modeling_attn_mask_utils.py\", line 179, in _expand_mask bsz, src_len = mask.size() \r\nValueError: too many values \u200b\u200bto unpack (expected 2)\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\n`\r\n\r\n                    input_ids = torch.cat([\r\n                        (torch.ones(input_ids.shape[0], 1) * uni_prompting.sptids_dict['<|mmu|>']).to(device),\r\n                        (torch.ones(input_ids.shape[0], 1) * uni_prompting.sptids_dict['<|soi|>']).to(device),\r\n                        image_tokens,\r\n                        (torch.ones(input_ids.shape[0], 1) * uni_prompting.sptids_dict['<|eoi|>']).to(device),\r\n                        (torch.ones(input_ids.shape[0], 1) * uni_prompting.sptids_dict['<|sot|>']).to(device),\r\n                        input_ids\r\n                    ], dim=1).long()\r\n\r\n                    attention_mask = create_attention_mask_for_mmu(input_ids.to(device),\r\n                                                                eoi_id=int(uni_prompting.sptids_dict['<|eoi|>']))\r\n                    cont_toks_list = peft_model.generate(input_ids,attention_mask=attention_mask,max_new_tokens=100)`\n\n### Expected behavior\n\nRead the model for fine-tuning and reasoning.",
    "url": "https://github.com/huggingface/peft/issues/2301",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-31T02:26:14Z",
    "updated_at": "2025-02-07T15:03:57Z",
    "user": "Chinesehou97"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 143988,
    "title": "Add a knob to control how many blocks are used by persistent matmul/attn kernels",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nWe train a transformer-style model using FSDP, and we have a very good overlap between the matmul kernels (from cuBLAS) and the NCCL operation in the background. However, when profiling, we have observed that the **matmuls take 2x as long** to complete when they are overlapped with a NCCL kernel!\r\n\r\nWe believe this is easily explained: we're running on H100 GPUs and, upon inspection, all the matmuls look like they are using \"persistent\" kernels. That is, they launch as many CUDA blocks as there are SMs on the GPU (i.e., 132) and each of these blocks will process several tiles in a row. What we're observing is thus a form of \"wave quantization\" where, due to NCCL occupying some SMs, not all blocks of the matmuls can be scheduled at once, thus breaking them into two waves, which thus take twice as long to complete.\r\n\r\nSince NCCL only occupies ~10% of the SMs, it would be much more efficient if the matmuls tried to launch a number of blocks that corresponds to ~90% of the SMs. This would allow the two kernels to run simultaneously in a single wave, with the matmuls only being ~10% slower, not ~50%!\r\n\r\nFor that, however, we need PyTorch to add a new knob allowing us to control such a value, and to forward that knob when launching its cuBLAS kernels (and others).\n\n### Alternatives\n\nNone. We couldn't find any environment variable provided by cuBLAS that allows us to override the number of blocks launched.\n\n### Additional context\n\nWith longer NCCL kernels, matmuls take a long time:\r\n<img width=\"1555\" alt=\"Screenshot 2024-12-30 at 17 29 23\" src=\"https://github.com/user-attachments/assets/d91d192e-16e9-4108-9d8e-5cb7caef80f6\" />\r\n\r\nWith shorter NCCL kernels, the non-overlapped matmuls now take less time:\r\n<img width=\"1439\" alt=\"Screenshot 2024-12-30 at 17 29 42\" src=\"https://github.com/user-attachments/assets/6e1fff67-b1a8-4b3b-a582-6648fc8b00bf\" />\r\n\n\ncc @ptrblck @msaroufim @eqy @csarofeen @xwang233 @jianyuh @nikitaved @pearu @mruberry @walterddr @Lezcano",
    "url": "https://github.com/pytorch/pytorch/issues/143988",
    "state": "closed",
    "labels": [
      "module: cuda",
      "triaged",
      "module: cublas",
      "module: linear algebra"
    ],
    "created_at": "2024-12-30T16:31:05Z",
    "updated_at": "2025-07-10T11:20:38Z",
    "user": "lw"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10411,
    "title": "How to call the training of lora weights obtained from examples/concestency_stiffness/train_lcm-distill-lora_std_wds. py",
    "body": "I followed https://github.com/huggingface/diffusers/tree/main/examples/consistency_distillation The provided tutorial trained the final Lora weight, but did not find a way to call it. May I ask if you can provide me with a demo of running and calling this weight? Thank you very much!\r\nthe training set:\r\n```\r\n#!/bin/bash\r\n\r\n# Define the variables\r\nPRETRAINED_TEACHER_MODEL=\"/ai/yzy/latent-consistency-model-main/stable-diffusion-v1-5\"\r\nOUTPUT_DIR=\"/ai/yzy/latent-consistency-model-main/output_sd001\"\r\nRESOLUTION=512\r\nLORA_RANK=64\r\nLEARNING_RATE=1e-6\r\nLOSS_TYPE='huber'\r\nADAM_WEIGHT_DECAY=0.0\r\nMAX_TRAIN_STEPS=1000\r\nMAX_TRAIN_SAMPLES=4000000\r\nDATALOADER_NUM_WORKERS=4\r\nTRAIN_SHARDS_PATH_OR_URL='/ai/yzy/latent-consistency-model-main/00000.tar'\r\nVALIDATION_STEPS=200\r\nCHECKPOINTING_STEPS=200\r\nCHECKPOINTS_TOTAL_LIMIT=10\r\nTRAIN_BATCH_SIZE=8\r\nGRADIENT_ACCUMULATION_STEPS=1\r\nSEED=453645634\r\n\r\n# Run the training script\r\npython ./LCM_Training_Script/consistency_distillation/train_lcm_distill_lora_sd_wds.py \\\r\n    --pretrained_teacher_model=$PRETRAINED_TEACHER_MODEL \\\r\n    --output_dir=$OUTPUT_DIR \\\r\n    --mixed_precision=fp16 \\\r\n    --resolution=$RESOLUTION \\\r\n    --lora_rank=$LORA_RANK \\\r\n    --learning_rate=$LEARNING_RATE \\\r\n    --loss_type=$LOSS_TYPE \\\r\n    --adam_weight_decay=$ADAM_WEIGHT_DECAY \\\r\n    --max_train_steps=$MAX_TRAIN_STEPS \\\r\n    --max_train_samples=$MAX_TRAIN_SAMPLES \\\r\n    --dataloader_num_workers=$DATALOADER_NUM_WORKERS \\\r\n    --train_shards_path_or_url=$TRAIN_SHARDS_PATH_OR_URL \\\r\n    --validation_steps=$VALIDATION_STEPS \\\r\n    --checkpointing_steps=$CHECKPOINTING_STEPS \\\r\n    --checkpoints_total_limit=$CHECKPOINTS_TOTAL_LIMIT \\\r\n    --train_batch_size=$TRAIN_BATCH_SIZE \\\r\n    --gradient_checkpointing \\\r\n    --enable_xformers_memory_efficient_attention \\\r\n    --gradient_accumulation_steps=$GRADIENT_ACCUMULATION_STEPS \\\r\n    --use_8bit_adam \\\r\n    --resume_from_checkpoint=latest \\\r\n    --seed=$SEED\r\n```\r\n\r\nthe output:\r\n![image](https://github.com/user-attachments/assets/5fb9a474-52d9-4d2f-85e4-dd5c3e0902db)\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/10411",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-30T12:06:07Z",
    "updated_at": "2024-12-31T07:21:40Z",
    "user": "yangzhenyu6"
  },
  {
    "repo": "huggingface/text-embeddings-inference",
    "number": 461,
    "title": "How to Set the Threshold for gte-multilingual-reranker",
    "body": "I want to use the gte-multilingual-reranker-base model to re-rank the retrieved documents and discard some of them based on a threshold. I have seen examples on Hugging Face where the logits are used as the output scores, but how can I determine the appropriate threshold?",
    "url": "https://github.com/huggingface/text-embeddings-inference/issues/461",
    "state": "open",
    "labels": [],
    "created_at": "2024-12-30T11:39:48Z",
    "updated_at": "2025-02-09T06:29:02Z",
    "user": "ketusrai"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2140,
    "title": "KeyError: 'swinv2 model type is not supported yet in NormalizedConfig.",
    "body": "### System Info\n\n```shell\nGoogle Colab\r\nT4 GPU\r\ntransformers Version: 4.47.1\r\noptimum Version: 1.24.0.dev0\n```\n\n\n### Who can help?\n\n@michaelbenayoun, @JingyaHuang, @echarlaix\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nfrom optimum.onnxruntime import ORTModelForVision2Seq\r\nmodel = ORTModelForVision2Seq.from_pretrained(\"/content/swin-xlm-image-recognition\", export=True, use_cache=False)\r\nmodel.save_pretrained(\"swin-xlm-image-recognition-onnx\")\n\n### Expected behavior\n\nHow to solve this issue?  I am trying to convert my VisionEncoderDecoderModel to onnx using optimum, but I am getting this error: `KeyError: 'swinv2 model type is not supported yet in NormalizedConfig. Only albert, bart, bert, blenderbot, blenderbot-small, bloom, falcon, camembert, codegen, cvt, deberta, deberta-v2, deit, distilbert, donut-swin, electra, encoder-decoder, gemma, gpt2, gpt-bigcode, gpt-neo, gpt-neox, gptj, imagegpt, llama, longt5, marian, markuplm, mbart, mistral, mixtral, mpnet, mpt, mt5, m2m-100, nystromformer, opt, pegasus, pix2struct, phi, phi3, phi3small, poolformer, regnet, resnet, roberta, segformer, speech-to-text, splinter, t5, trocr, vision-encoder-decoder, vit, whisper, xlm-roberta, yolos, qwen2, granite are supported. If you want to support swinv2 please propose a PR or open up an issue.'`\r\n\r\nThe encoder is \"swinv2\" and the decoder is \"xlm-roberta\".",
    "url": "https://github.com/huggingface/optimum/issues/2140",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-12-30T10:29:14Z",
    "updated_at": "2024-12-30T10:29:14Z",
    "comments": 0,
    "user": "Billybeast2003"
  },
  {
    "repo": "huggingface/optimum-intel",
    "number": 1096,
    "title": "How to use trainer.train() with OVModelForCausalLM() model",
    "body": "I am currently converting a local LLM to Open Vino, I would like to fine tune my model with the Trainer function but I get an error stating: AttributeError: 'OVModelForCausalLM' object has no attribute 'named_children'\r\n\r\nPlease let me know if there is a way to fine tune openVino models that are loaded with OVModelForCausalLM().\r\n\r\nAttached is my script\r\n[Fine_Tuning_mistral_7b_v3 (2).zip](https://github.com/user-attachments/files/18271287/Fine_Tuning_mistral_7b_v3.2.zip)\r\n",
    "url": "https://github.com/huggingface/optimum-intel/issues/1096",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-29T23:54:26Z",
    "updated_at": "2025-02-27T14:54:20Z",
    "user": "CJames1261"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 764,
    "title": "FSDP 2 doesn't pad tensors?",
    "body": "Hi, I ran my model with FSDP 2, one of the linear layers has a dim that's not divisible by the world size (128), and so I got the following error:\r\n```\r\ntorch.Size([...]) is not divisible by FSDP world size 128.\r\n```\r\n\r\nFSDP 1 circumvents this issue by padding the tensors. Is this not supported by FSDP 2? If not, will it be supported?",
    "url": "https://github.com/pytorch/torchtitan/issues/764",
    "state": "open",
    "labels": [
      "question",
      "module: fsdp"
    ],
    "created_at": "2024-12-29T21:55:50Z",
    "updated_at": "2025-02-13T01:51:43Z",
    "user": "cassanof"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1446,
    "title": "Supply Local Weights to an LLM instead of Downloading Weights from HuggingFace",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI am having local copy of llama weights and i want to supply those weights to create a chat application.Please include a CLI flag to do so\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### RFC (Optional)\n\n_No response_",
    "url": "https://github.com/pytorch/torchchat/issues/1446",
    "state": "closed",
    "labels": [
      "documentation",
      "triaged"
    ],
    "created_at": "2024-12-29T20:14:26Z",
    "updated_at": "2025-01-06T01:54:19Z",
    "comments": 2,
    "user": "sgupta1007"
  },
  {
    "repo": "pytorch/data",
    "number": 1418,
    "title": "torch.node datawriter",
    "body": "### \ud83d\udcda The doc issue\n\nCan we add in the example/migration file related to a `torch.node` datawriter (if already possible with the current API). \r\nSee:\r\nhttps://github.com/pytorch/pytorch/issues/140296#issuecomment-2563190801\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/1418",
    "state": "open",
    "labels": [],
    "created_at": "2024-12-27T13:49:24Z",
    "updated_at": "2024-12-27T13:49:24Z",
    "comments": 0,
    "user": "bhack"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 143906,
    "title": "How to correctly asynchronously copy a GPU tensor to a CPU tensor in another process without introducing blocking?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI am developing a distributed PyTorch application designed to asynchronously transfer data from a GPU process to a CPU process, ensuring that GPU computations remain non-blocking. In my current implementation, I utilize the non-blocking copy_ method to transfer data from a GPU tensor to a CPU tensor and then employ dist.isend to send the data to another rank. However, under certain conditions, this setup leads to a deadlock.\r\n```python\r\nimport torch\r\nimport torch.distributed as dist\r\nimport os\r\n\r\ndef gpu_to_cpu_and_send(rank, size):\r\n    tensor = torch.randn(4096, 8192).cuda(rank)  # On specific GPU\r\n    print(tensor[-1][-1])\r\n    print(f\"Rank {rank}: Created tensor on GPU\")\r\n    cpu_tensor = torch.zeros(4096, 8192)\r\n    cpu_tensor.copy_(tensor, non_blocking=True)  # Non-blocking GPU to CPU copy\r\n    print(f\"Rank {rank}: Copied tensor to CPU (non-blocking)\")\r\n\r\n    if rank == 0:\r\n        print(f\"Rank {rank}: Sending tensor to rank 1\")\r\n        dist.isend(tensor=cpu_tensor, dst=1)  # Sending data to rank 1\r\n        print(f\"Rank {rank}: Data sent to rank 1\")\r\n\r\ndef receive_data(rank, size):\r\n    received_tensor = torch.zeros(4096, 8192)\r\n    print(f\"Rank {rank}: Waiting to receive data\")\r\n    dist.recv(tensor=received_tensor, src=0)  # Receiving data from rank 0\r\n    print(f\"Rank {rank}: Received data from rank 0\")\r\n    print(received_tensor[-1][-1])\r\n\r\ndef main():\r\n    rank = int(os.environ['RANK'])\r\n    size = int(os.environ['WORLD_SIZE'])\r\n    dist.init_process_group(backend='gloo', rank=rank, world_size=size)\r\n\r\n    if rank == 0:\r\n        gpu_to_cpu_and_send(rank, size)\r\n    elif rank == 1:\r\n        receive_data(rank, size)\r\n\r\nif __name__ == \"__main__\":\r\n    main()\r\n```\r\n\r\n### Versions\r\n\r\ntorchrun --nproc_per_node=2 demo.py\r\n\r\nRun with Nvidia GPU.\r\n\r\ncc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o",
    "url": "https://github.com/pytorch/pytorch/issues/143906",
    "state": "open",
    "labels": [
      "needs reproduction",
      "oncall: distributed",
      "triaged"
    ],
    "created_at": "2024-12-27T11:22:11Z",
    "updated_at": "2025-01-03T18:13:46Z",
    "user": "zhanghb55"
  },
  {
    "repo": "huggingface/trl",
    "number": 2523,
    "title": "How to solve the situation where the tokenizer of the reward model is inconsistent with the tokenizer of the actor model\uff1f",
    "body": "",
    "url": "https://github.com/huggingface/trl/issues/2523",
    "state": "open",
    "labels": [
      "\u2753 question"
    ],
    "created_at": "2024-12-27T09:43:06Z",
    "updated_at": "2024-12-28T06:26:16Z",
    "user": "stephen-nju"
  },
  {
    "repo": "huggingface/peft",
    "number": 2298,
    "title": "Qdora support",
    "body": "### Feature request\n\nis it possible to use qdora with peft?\n\n### Motivation\n\nqdora is better than qlora and perform like full fine tuning.\n\n### Your contribution\n\n```\r\npeft_config = LoraConfig(\r\n    r=8, \r\n    lora_alpha=32, \r\n    lora_dropout=0.1,\r\n    qdora=True  # adding qdora\r\n)\r\n```",
    "url": "https://github.com/huggingface/peft/issues/2298",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-27T04:47:54Z",
    "updated_at": "2025-01-03T12:26:58Z",
    "comments": 2,
    "user": "imrankh46"
  },
  {
    "repo": "huggingface/smolagents",
    "number": 2,
    "title": "How to call OpenAI-like models through an API?",
    "body": "How to call OpenAI-like models through an API?",
    "url": "https://github.com/huggingface/smolagents/issues/2",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-27T04:34:35Z",
    "updated_at": "2024-12-29T21:58:10Z",
    "user": "win4r"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7347,
    "title": "Converting Arrow to WebDataset TAR Format for Offline Use",
    "body": "### Feature request\n\nHi, \r\n\r\nI've downloaded an Arrow-formatted dataset offline using the hugggingface's datasets library by:\r\n\r\n```\r\nimport json\r\nfrom datasets import load_dataset\r\n\r\ndataset = load_dataset(\"pixparse/cc3m-wds\")\r\ndataset.save_to_disk(\"./cc3m_1\") \r\n```\r\n\r\nnow I need to convert it to WebDataset's TAR format for offline data ingestion. \r\nIs there a straightforward method to achieve this conversion without an internet connection? Can I simply convert it by \r\n```\r\ntar -cvf \r\n```\r\n\r\nbtw, when I tried:\r\n```\r\nimport webdataset as wds\r\nfrom huggingface_hub import get_token\r\nfrom torch.utils.data import DataLoader\r\n\r\nhf_token = get_token()\r\nurl = \"https://huggingface.co/datasets/timm/imagenet-12k-wds/resolve/main/imagenet12k-train-{{0000..1023}}.tar\"\r\nurl = f\"pipe:curl -s -L {url} -H 'Authorization:Bearer {hf_token}'\"\r\ndataset = wds.WebDataset(url).decode()\r\ndataset.save_to_disk(\"./cc3m_webdataset\") \r\n```\r\nerror occured:\r\n```\r\nAttributeError: 'WebDataset' object has no attribute 'save_to_disk'\r\n```\r\n\r\nThanks a lot!\n\n### Motivation\n\nConverting Arrow to WebDataset TAR Format\n\n### Your contribution\n\nNo clue yet",
    "url": "https://github.com/huggingface/datasets/issues/7347",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-12-27T01:40:44Z",
    "updated_at": "2024-12-31T17:38:00Z",
    "comments": 4,
    "user": "katie312"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1118,
    "title": "Trying to use custom finetuned Whisper Model with ",
    "body": "### Question\n\n@xenova I am trying to use our own Whisper fine tuned model https://huggingface.co/medxcribe/whisper-base.en with\r\n\r\nhttps://huggingface.co/spaces/Xenova/whisper-web. I have uploaded into a seperate repo for reference https://huggingface.co/medxcribe/whisper-base-onnx.en.\r\n\r\nWe have converted the fine tuned medxcribe/whisper-base.en using this command. \r\n\r\n`pip install onnx==1.17.0\r\npip install onnxruntime==1.20.1\r\npip install transformers==4.35.2\r\noptimum-cli export onnx --model medxcribe/whisper-base.en whisper_onnx --task automatic-speech-recognition-with-past --opset 14`\r\n\r\nBut unfortunately while load the Whisper-web, we are stuck with this below error \r\n\r\nCan't create a session\"\r\n    at t.createSessionFinalize (http://localhost:4173/assets/worker-1c2c88a7.js:1789:105945)\r\n    at t.createSession (http://localhost:4173/assets/worker-1c2c88a7.js:1789:106543)\r\n    at t.createSession (http://localhost:4173/assets/worker-1c2c88a7.js:1789:98867)\r\n    at t.OnnxruntimeWebAssemblySessionHandler.loadModel (http://localhost:4173/assets/worker-1c2c88a7.js:1789:101717)\r\n    at Object.createSessionHandler (http://localhost:4173/assets/worker-1c2c88a7.js:9:115048)\r\n    at dn.create (http://localhost:4173/assets/worker-1c2c88a7.js:1:14653)\r\n    at async constructSession (http://localhost:4173/assets/worker-1c2c88a7.js:1810:22248)\r\n    at async Promise.all (index 2)\r\n    at async WhisperForConditionalGeneration.from_pretrained (http://localhost:4173/assets/worker-1c2c88a7.js:1810:29662)\r\n    at async AutoModelForSpeechSeq2Seq.from_pretrained (http://localhost:4173/assets/worker-1c2c88a7.js:1810:77285)\r\n\r\nAny suggestions? On a high level there is a problem with the generated Onnx files. ",
    "url": "https://github.com/huggingface/transformers.js/issues/1118",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-12-26T20:18:36Z",
    "updated_at": "2024-12-26T20:18:36Z",
    "user": "vijaim"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 153,
    "title": "How to generate result of validation and resolution. ",
    "body": "Hi author:\r\nI am using your hunyuan finetuning bash to finetune lora on my own dataset with original resolution of 1080p. But I find your model can only run on video with both height and weight can be divided by 32. Can the model also be trained  on video with 360p or 720p and why?",
    "url": "https://github.com/huggingface/finetrainers/issues/153",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-26T15:21:22Z",
    "updated_at": "2025-01-10T23:38:39Z",
    "user": "Aristo23333"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 597,
    "title": "Inquiry About Support for RDT-1B Model",
    "body": "Hi,\r\nI would like to extend my heartfelt thanks for maintaining such an outstanding codebase. Your dedication and hard work have significantly contributed to advancements in the robotics field, and I truly appreciate the resources and support your community provides.\r\n\r\nI am reaching out to inquire whether there are any plans to support the RDT-1B model from the [RoboticsDiffusionTransformer](https://github.com/thu-ml/RoboticsDiffusionTransformer) repository within the LeRobot framework. The RDT-1B model appears to offer promising capabilities for robotics applications, and integrating it could potentially enhance the functionalities and performance of projects built on LeRobot.\r\n\r\nCould you please let me know if there are any intentions to incorporate this model in the future, or if there are any existing efforts towards this integration? Additionally, if there are ways the community can assist or contribute to this effort, I would be eager to participate.\r\n\r\nThank you once again for all your contributions and support. I look forward to your response.",
    "url": "https://github.com/huggingface/lerobot/issues/597",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2024-12-26T11:12:58Z",
    "updated_at": "2025-10-08T20:52:51Z",
    "user": "Robert-hua"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10383,
    "title": "[Request] Optimize HunyuanVideo Inference Speed with ParaAttention",
    "body": "Hi guys,\r\n\r\nFirst and foremost, I would like to commend you for the incredible work on the `diffusers` library. It has been an invaluable resource for my projects.\r\n\r\nI am writing to suggest an enhancement to the inference speed of the `HunyuanVideo` model. We have found that using [ParaAttention](https://github.com/chengzeyi/ParaAttention) can significantly speed up the inference of HunyuanVideo. ParaAttention provides context parallel attention that works with `torch.compile`, supporting Ulysses Style and Ring Style parallelism. I hope we could add a doc or introduction of how to make `HunyuanVideo` of `diffusers` run faster with `ParaAttention`. Besides `HunyuanVideo`, `FLUX`, `Mochi` and `CogVideoX` are also supported.\r\n\r\nSteps to Optimize HunyuanVideo Inference with `ParaAttention`:\r\n\r\n# Install ParaAttention:\r\n\r\n```bash\r\npip3 install para-attn\r\n# Or visit https://github.com/chengzeyi/ParaAttention.git to see detailed instructions\r\n```\r\n\r\n# Example Script:\r\nHere is an example script to run HunyuanVideo with ParaAttention:\r\n\r\n```python\r\nimport torch\r\nimport torch.distributed as dist\r\nfrom diffusers import HunyuanVideoPipeline, HunyuanVideoTransformer3DModel\r\nfrom diffusers.utils import export_to_video\r\n\r\ndist.init_process_group()\r\n\r\n# [rank1]: RuntimeError: Expected mha_graph->execute(handle, variant_pack, workspace_ptr.get()).is_good() to be true, but got false.  (Could this error message be improved?  If so, please report an enhancement request to PyTorch.)\r\ntorch.backends.cuda.enable_cudnn_sdp(False)\r\n\r\nmodel_id = \"tencent/HunyuanVideo\"\r\ntransformer = HunyuanVideoTransformer3DModel.from_pretrained(\r\n    model_id,\r\n    subfolder=\"transformer\",\r\n    torch_dtype=torch.bfloat16,\r\n    revision=\"refs/pr/18\",\r\n)\r\npipe = HunyuanVideoPipeline.from_pretrained(\r\n    model_id,\r\n    transformer=transformer,\r\n    torch_dtype=torch.float16,\r\n    revision=\"refs/pr/18\",\r\n).to(f\"cuda:{dist.get_rank()}\")\r\n\r\npipe.vae.enable_tiling(\r\n    # Make it runnable on GPUs with 48GB memory\r\n    # tile_sample_min_height=128,\r\n    # tile_sample_stride_height=96,\r\n    # tile_sample_min_width=128,\r\n    # tile_sample_stride_width=96,\r\n    # tile_sample_min_num_frames=32,\r\n    # tile_sample_stride_num_frames=24,\r\n)\r\n\r\nfrom para_attn.context_parallel import init_context_parallel_mesh\r\nfrom para_attn.context_parallel.diffusers_adapters import parallelize_pipe\r\nfrom para_attn.parallel_vae.diffusers_adapters import parallelize_vae\r\n\r\nmesh = init_context_parallel_mesh(\r\n    pipe.device.type,\r\n)\r\nparallelize_pipe(\r\n    pipe,\r\n    mesh=mesh,\r\n)\r\nparallelize_vae(pipe.vae, mesh=mesh._flatten())\r\n\r\n# pipe.enable_model_cpu_offload(gpu_id=dist.get_rank())\r\n\r\n# torch._inductor.config.reorder_for_compute_comm_overlap = True\r\n# pipe.transformer = torch.compile(pipe.transformer, mode=\"max-autotune-no-cudagraphs\")\r\n\r\noutput = pipe(\r\n    prompt=\"A cat walks on the grass, realistic\",\r\n    height=720,\r\n    width=1280,\r\n    num_frames=129,\r\n    num_inference_steps=30,\r\n    output_type=\"pil\" if dist.get_rank() == 0 else \"pt\",\r\n).frames[0]\r\n\r\nif dist.get_rank() == 0:\r\n    print(\"Saving video to hunyuan_video.mp4\")\r\n    export_to_video(output, \"hunyuan_video.mp4\", fps=15)\r\n\r\ndist.destroy_process_group()\r\n```\r\n\r\nSave the above code to `run_hunyuan_video.py` and run it with torchrun:\r\n\r\n```bash\r\ntorchrun --nproc_per_node=2 run_hunyuan_video.py\r\n```\r\n\r\nThe generated video on 2xH100:\r\n\r\nhttps://github.com/user-attachments/assets/e67838a7-5261-452e-9bf0-9f186611c3b7\r\n\r\nBy following these steps, users can leverage `ParaAttention` to achieve faster inference times with `HunyuanVideo` on multiple GPUs.\r\n\r\nThank you for considering this suggestion. I believe it could greatly benefit the community and enhance the performance of `HunyuanVideo`. Please let me know if there are any questions or further clarifications needed.",
    "url": "https://github.com/huggingface/diffusers/issues/10383",
    "state": "closed",
    "labels": [
      "roadmap"
    ],
    "created_at": "2024-12-25T15:07:53Z",
    "updated_at": "2025-01-16T18:05:15Z",
    "comments": 10,
    "user": "chengzeyi"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 596,
    "title": "How to achieve multiple tasks on the basis of LeRobot \uff1f",
    "body": "LeRobot can achieve single tasks (such as inserting, transferring blocks, etc.), how to achieve multiple tasks on the basis of LeRobot (such as first recognizing objects and classifying, and then putting objects in order in boxes, etc.)?\"\r\nPlease give me some ideas.",
    "url": "https://github.com/huggingface/lerobot/issues/596",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2024-12-25T12:20:37Z",
    "updated_at": "2025-10-17T11:38:20Z",
    "user": "wangwisdom"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10375,
    "title": "[low priority] Please fix links in documentation",
    "body": "https://huggingface.co/docs/diffusers/main/en/api/pipelines/hunyuan_video\r\n\r\nBoth links are broken\r\n\r\nMake sure to check out the Schedulers [guide](https://huggingface.co/docs/diffusers/main/en/using-diffusers/schedulers.md) to learn how to explore the tradeoff between scheduler speed and quality, and see the [reuse components across pipelines](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading.md#reuse-a-pipeline) section to learn how to efficiently load the same components into multiple pipelines.",
    "url": "https://github.com/huggingface/diffusers/issues/10375",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-25T09:04:33Z",
    "updated_at": "2024-12-28T20:01:27Z",
    "comments": 0,
    "user": "nitinmukesh"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10374,
    "title": "Is there any plan to support TeaCache for training-free acceleration?",
    "body": "TeaCache is a training-free inference acceleration method for visual generation. TeaCache currently supports HunyuanVideo, CogVideoX, Open-Sora, Open-Sora-Plan and Latte. TeaCache can speedup HunyuanVideo 2x  without much visual quality degradation.  For example, the inference for a 720p, 129-frame video takes around 50 minutes on a single A800 GPU while TeaCache can sppeedup to 23 minutes.  Thanks for your efforts!\r\nhttps://github.com/LiewFeng/TeaCache.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/10374",
    "state": "open",
    "labels": [
      "wip"
    ],
    "created_at": "2024-12-25T05:00:23Z",
    "updated_at": "2025-01-27T01:28:53Z",
    "comments": 4,
    "user": "LiewFeng"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1633,
    "title": "docker run is not working",
    "body": "I'm running the following:\r\n```\r\ndocker run -p 3000:3000 --env-file env.local huggingface/chat-ui\r\n```\r\nThe env file has the following set: `HF_TOKEN`, `MONGODB_URL` and `MODELS`. The container prints the following:\r\n```\r\nListening on 0.0.0.0:3000\r\n```\r\n\r\nHowever, on hitting the `localhost:3000`, I get a blank page with `Not found`.\r\n\r\nI can repro this consistently. Can anyone share who is able to use docker and get it to work.",
    "url": "https://github.com/huggingface/chat-ui/issues/1633",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-12-23T08:36:09Z",
    "updated_at": "2025-01-06T07:30:46Z",
    "comments": 1,
    "user": "sebastiangonsal"
  },
  {
    "repo": "huggingface/peft",
    "number": 2293,
    "title": "Is it possible to add LoRA on specific head?",
    "body": "### Feature request\n\nCould I add LoRA only to some selected heads on the model?\r\nI read some documentation [here](https://huggingface.co/docs/peft/developer_guides/custom_models), but am still not sure about how to implement my goal.\n\n### Motivation\n\nCurrent LoRA Config can allow users to decide where matrices to add LoRA, a more fine-grained control on which heads to add LoRA would be beneficial for the developers.\n\n### Your contribution\n\nI would appreciate some tips on how to implement this.",
    "url": "https://github.com/huggingface/peft/issues/2293",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-22T19:57:54Z",
    "updated_at": "2025-12-14T10:07:49Z",
    "comments": 12,
    "user": "SpeeeedLee"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7344,
    "title": "HfHubHTTPError: 429 Client Error: Too Many Requests for URL when trying to access SlimPajama-627B or c4 on TPUs",
    "body": "### Describe the bug\n\nI am trying to run some trainings on Google's TPUs using Huggingface's DataLoader on [SlimPajama-627B](https://huggingface.co/datasets/cerebras/SlimPajama-627B) and [c4](https://huggingface.co/datasets/allenai/c4), but I end up running into `429 Client Error: Too Many Requests for URL` error when I call `load_dataset`. The even odder part is that I am able to sucessfully run trainings with the [wikitext dataset](https://huggingface.co/datasets/Salesforce/wikitext). Is there something I need to setup to specifically train with SlimPajama or C4 with TPUs because I am not clear why I am getting these errors.\r\n\r\n\n\n### Steps to reproduce the bug\n\nThese are the commands you could run to produce the error below but you will require a ClearML account (you can create one [here](https://app.clear.ml/login?redirect=%2Fdashboard)) with a queue setup to run on Google TPUs\r\n```bash\r\ngit clone https://github.com/clankur/muGPT.git\r\ncd muGPT\r\npython -m train --config-name=slim_v4-32_84m.yaml +training.queue={NAME_OF_CLEARML_QUEUE}\r\n```\r\n\r\nThe error I see:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/clearml/binding/hydra_bind.py\", line 230, in _patched_task_function\r\n    return task_function(a_config, *a_args, **a_kwargs)\r\n  File \"/home/clankur/.clearml/venvs-builds/3.10/task_repository/muGPT.git/train.py\", line 1037, in main\r\n    main_contained(config, logger)\r\n  File \"/home/clankur/.clearml/venvs-builds/3.10/task_repository/muGPT.git/train.py\", line 840, in main_contained\r\n    loader = get_loader(\"train\", config.training_data, config.training.tokens)\r\n  File \"/home/clankur/.clearml/venvs-builds/3.10/task_repository/muGPT.git/input_loader.py\", line 549, in get_loader\r\n    return HuggingFaceDataLoader(split, config, token_batch_params)\r\n  File \"/home/clankur/.clearml/venvs-builds/3.10/task_repository/muGPT.git/input_loader.py\", line 395, in __init__\r\n    self.dataset = load_dataset(\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/load.py\", line 2112, in load_dataset\r\n    builder_instance = load_dataset_builder(\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/load.py\", line 1798, in load_dataset_builder\r\n    dataset_module = dataset_module_factory(\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/load.py\", line 1495, in dataset_module_factory\r\n    raise e1 from None\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/load.py\", line 1479, in dataset_module_factory\r\n    ).get_module()\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/load.py\", line 1034, in get_module\r\n    else get_data_patterns(base_path, download_config=self.download_config)\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/data_files.py\", line 457, in get_data_patterns\r\n    return _get_data_files_patterns(resolver)\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/data_files.py\", line 248, in _get_data_files_patterns\r\n    data_files = pattern_resolver(pattern)\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/data_files.py\", line 340, in resolve_pattern\r\n    for filepath, info in fs.glob(pattern, detail=True).items()\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py\", line 409, in glob\r\n    return super().glob(path, **kwargs)\r\n  File \"/home/clankur/.clearml/venvs-builds/3.10/lib/python3.10/site-packages/fsspec/spec.py\", line 602, in glob\r\n    allpaths = self.find(root, maxdepth=depth, withdirs=True, detail=True, **kwargs)\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py\", line 429, in find\r\n    out = self._ls_tree(path, recursive=True, refresh=refresh, revision=resolved_path.revision, **kwargs)\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py\", line 358, in _ls_tree\r\n    self._ls_tree(\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py\", line 375, in _ls_tree\r\n    for path_info in tree:\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/hf_api.py\", line 3080, in list_repo_tree\r\n    for path_info in paginate(path=tree_url, headers=headers, params={\"recursive\": recursive, \"expand\": expand}):\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/utils/_pagination.py\", line 46, in paginate\r\n    hf_raise_for_status(r)\r\n  File \"/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/utils/_http.py\", line 477, in hf_raise_for_status\r\n    raise _format(HfHubHTTPError, str(e), response) from e\r\nhuggingface_hub.errors.HfHubHTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/api/datasets/cerebras/SlimPajama-627B/tree/2d0accdd58c5d5511943ca1f5ff0e3eb5e293543?recursive=True&",
    "url": "https://github.com/huggingface/datasets/issues/7344",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-22T16:30:07Z",
    "updated_at": "2025-01-15T05:32:00Z",
    "comments": 2,
    "user": "clankur"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10345,
    "title": "safetensor streaming in from_single_file_loading()",
    "body": "can we add support for streaming safetensors while loading using `from_single_file`.\r\nsource:https://github.com/run-ai/runai-model-streamer\r\n\r\nexample:\r\n```python\r\nfrom runai_model_streamer import SafetensorsStreamer\r\n\r\nfile_path = \"/path/to/file.safetensors\"\r\n\r\nwith SafetensorsStreamer() as streamer:\r\n    streamer.stream_file(file_path)\r\n    for name, tensor in streamer.get_tensors():\r\n        tensor.to('CUDA:0')\r\n```",
    "url": "https://github.com/huggingface/diffusers/issues/10345",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-12-22T13:27:46Z",
    "updated_at": "2025-01-21T15:07:58Z",
    "comments": 2,
    "user": "AbhinavJangra29"
  },
  {
    "repo": "pytorch/xla",
    "number": 8516,
    "title": "how to release tpu memory after del diffusers pipeline",
    "body": "## \u2753 Questions and Help\r\ni create a pipeline\r\n`\r\npipeline = DiffusionPipeline.from_pretrained(\"stable-diffusion-v1-5/stable-diffusion-v1-5\", torch_dtype=torch.bfloat16).to(torch_xla.core.xla_model.xla_device())\r\n\r\npipeline.to('cpu')\r\n\r\npipeline = StableAudioPipeline.from_pretrained(\"stabilityai/stable-audio-open-1.0\", torch_dtype=torch.bfloat16).to(torch_xla.core.xla_model.xla_device()) #which cause tpu memory problem\r\n`\r\ni want to ask how to release tpu memory. is there any tpu version of torch.cuda.empty_cache()\uff1f",
    "url": "https://github.com/pytorch/xla/issues/8516",
    "state": "closed",
    "labels": [
      "duplicate",
      "question",
      "xla:tpu"
    ],
    "created_at": "2024-12-22T11:03:38Z",
    "updated_at": "2025-02-13T13:40:42Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1436,
    "title": "If scripts need `bash`, don't say to use `sh`",
    "body": "### \ud83d\udc1b Describe the bug\n\nOn Debian systems, sh isn't bash, it's [dash](https://en.wikipedia.org/wiki/Almquist_shell#Dash). I haven't tested every script, but https://github.com/pytorch/torchchat/blob/main/docs/quantization.md says to run `sh torchchat/utils/scripts/build_torchao_ops.sh`, but this script fails unless run with bash on my Raspberry Pi 5.\n\n### Versions\n\nCollecting environment information...\r\nPyTorch version: 2.6.0.dev20241218+cpu\r\nIs debug build: False\r\nCUDA used to build PyTorch: None\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Debian GNU/Linux 12 (bookworm) (aarch64)\r\nGCC version: (Debian 12.2.0-14) 12.2.0\r\nClang version: Could not collect\r\nCMake version: version 3.31.2\r\nLibc version: glibc-2.36\r\n\r\nPython version: 3.11.2 (main, Sep 14 2024, 03:00:30) [GCC 12.2.0] (64-bit runtime)\r\nPython platform: Linux-6.6.51+rpt-rpi-2712-aarch64-with-glibc2.36\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                         aarch64\r\nCPU op-mode(s):                       32-bit, 64-bit\r\nByte Order:                           Little Endian\r\nCPU(s):                               4\r\nOn-line CPU(s) list:                  0-3\r\nVendor ID:                            ARM\r\nModel name:                           Cortex-A76\r\nModel:                                1\r\nThread(s) per core:                   1\r\nCore(s) per cluster:                  4\r\nSocket(s):                            -\r\nCluster(s):                           1\r\nStepping:                             r4p1\r\nCPU(s) scaling MHz:                   100%\r\nCPU max MHz:                          2400.0000\r\nCPU min MHz:                          1500.0000\r\nBogoMIPS:                             108.00\r\nFlags:                                fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp\r\nL1d cache:                            256 KiB (4 instances)\r\nL1i cache:                            256 KiB (4 instances)\r\nL2 cache:                             2 MiB (4 instances)\r\nL3 cache:                             2 MiB (1 instance)\r\nVulnerability Gather data sampling:   Not affected\r\nVulnerability Itlb multihit:          Not affected\r\nVulnerability L1tf:                   Not affected\r\nVulnerability Mds:                    Not affected\r\nVulnerability Meltdown:               Not affected\r\nVulnerability Mmio stale data:        Not affected\r\nVulnerability Reg file data sampling: Not affected\r\nVulnerability Retbleed:               Not affected\r\nVulnerability Spec rstack overflow:   Not affected\r\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\r\nVulnerability Spectre v1:             Mitigation; __user pointer sanitization\r\nVulnerability Spectre v2:             Mitigation; CSV2, BHB\r\nVulnerability Srbds:                  Not affected\r\nVulnerability Tsx async abort:        Not affected\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.26.4\r\n[pip3] torch==2.6.0.dev20241218+cpu\r\n[pip3] torchao==0.8.0+git2f97b095\r\n[pip3] torchtune==0.5.0.dev20241218+cpu\r\n[pip3] torchvision==0.22.0.dev20241218\r\n[conda] Could not collect",
    "url": "https://github.com/pytorch/torchchat/issues/1436",
    "state": "closed",
    "labels": [
      "bug",
      "documentation",
      "actionable",
      "Quantization",
      "triaged"
    ],
    "created_at": "2024-12-22T06:43:48Z",
    "updated_at": "2024-12-23T06:49:43Z",
    "comments": 2,
    "user": "swolchok"
  },
  {
    "repo": "pytorch/ao",
    "number": 1456,
    "title": "[Bug] Unable to Obtain Quantized Weights Independently",
    "body": "**Description**\r\nThank you so much for your excellent work! I have been trying out a few demos to better understand your project.  \r\n\r\nWhile running [this demo](https://github.com/pytorch/ao/tree/main/torchao/quantization#a16w8-int8-weightonly-quantization), I attempted to independently print the quantized weight values, scale, and zero points. I noticed that the latter two can be accessed directly, but the quantized weight values cannot. I wanted to confirm whether this might be a bug.  \r\n\r\nI\u2019ve attached my code snippet and output log below for your reference:  \r\n**Code snippet:**  \r\n```python\r\nimport torch\r\nimport torchao\r\nfrom torchao.quantization import quantize_, int8_weight_only\r\nprint(f'Torch version: {torch.__version__}')\r\nprint(f'TorchAO version: {torchao.__version__}')\r\nmodel = torch.nn.Sequential(torch.nn.Linear(2, 4)).cuda().to(torch.bfloat16)\r\nquantize_(model, int8_weight_only())\r\n\r\nfor name, param in model.named_parameters():\r\n    if \"weight\" in name:\r\n        print('Weight Param Overview')\r\n        print(\"parameter shape:\", param.shape)\r\n        print(\"parameter values:\\n\", param)\r\n        print('Weight detail:')\r\n        print('\\nparam.tensor_impl.data:\\n', param.tensor_impl.data)\r\n        print('\\nparam.tensor_impl.data.data:\\n', param.tensor_impl.data.data)\r\n        print('\\nparam.tensor_impl.data.data.data:\\n', param.tensor_impl.data.data.data)\r\n        print('\\nparam.tensor_impl.scale:\\n', param.tensor_impl.scale)\r\n        print('\\nparam.tensor_impl.zero_point:\\n', param.tensor_impl.zero_point)\r\n```\r\n**Output log:**  \r\n```bash\r\nTorch version: 2.5.1+cu121\r\nTorchAO version: 0.7.0\r\nWeight Param Overview\r\nparameter shape: torch.Size([4, 2])\r\nparameter values:\r\n AffineQuantizedTensor(tensor_impl=PlainAQTTensorImpl(data=tensor([[ 127,   -2],\r\n        [-127,    6],\r\n        [-127,  -78],\r\n        [ 127,  -68]], device='cuda:0', dtype=torch.int8)... , scale=tensor([0.0036, 0.0049, 0.0028, 0.0037], device='cuda:0', dtype=torch.bfloat16)... , zero_point=tensor([0, 0, 0, 0], device='cuda:0')... , _layout=PlainLayout()), block_size=(1, 2), shape=torch.Size([4, 2]), device=cuda:0, dtype=torch.bfloat16, requires_grad=False)\r\nWeight detail:\r\n\r\nparam.tensor_impl.data:\r\n PlainAQTTensorImpl(data=tensor([[ 127,   -2],\r\n        [-127,    6],\r\n        [-127,  -78],\r\n        [ 127,  -68]], device='cuda:0', dtype=torch.int8)... , scale=tensor([0.0036, 0.0049, 0.0028, 0.0037], device='cuda:0', dtype=torch.bfloat16)... , zero_point=tensor([0, 0, 0, 0], device='cuda:0')... , _layout=PlainLayout())\r\n\r\nparam.tensor_impl.data.data:\r\n PlainAQTTensorImpl(data=tensor([[ 127,   -2],\r\n        [-127,    6],\r\n        [-127,  -78],\r\n        [ 127,  -68]], device='cuda:0', dtype=torch.int8)... , scale=tensor([0.0036, 0.0049, 0.0028, 0.0037], device='cuda:0', dtype=torch.bfloat16)... , zero_point=tensor([0, 0, 0, 0], device='cuda:0')... , _layout=PlainLayout())\r\n\r\nparam.tensor_impl.data.data.data:\r\n PlainAQTTensorImpl(data=tensor([[ 127,   -2],\r\n        [-127,    6],\r\n        [-127,  -78],\r\n        [ 127,  -68]], device='cuda:0', dtype=torch.int8)... , scale=tensor([0.0036, 0.0049, 0.0028, 0.0037], device='cuda:0', dtype=torch.bfloat16)... , zero_point=tensor([0, 0, 0, 0], device='cuda:0')... , _layout=PlainLayout())\r\n\r\nparam.tensor_impl.scale:\r\n tensor([0.0036, 0.0049, 0.0028, 0.0037], device='cuda:0', dtype=torch.bfloat16)\r\n\r\nparam.tensor_impl.zero_point:\r\n tensor([0, 0, 0, 0], device='cuda:0')\r\n```\r\nFrom the print output, it can be seen that when I output `param.tensor_impl.data`, the output still includes the `scale` and `zero_point`. However, outputting `param.tensor_impl.scale` and `param.tensor_impl.zero_point` allows me to retrieve their values independently.\r\n\r\nIf you need any additional information from me, please feel free to let me know. Thanks again!",
    "url": "https://github.com/pytorch/ao/issues/1456",
    "state": "closed",
    "labels": [
      "question",
      "triaged"
    ],
    "created_at": "2024-12-22T02:55:18Z",
    "updated_at": "2024-12-24T06:53:03Z",
    "user": "Mingbo-Lee"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3309,
    "title": "deepspeed zero3 how to save custom model\uff1f",
    "body": "DeepSpeedEngine(\r\n  (module): LLMDecoder(\r\n    (model): Qwen2ForSequenceClassification(\r\n      (model): Qwen2Model(\r\n        (embed_tokens): Embedding(151936, 1536)\r\n        (layers): ModuleList(\r\n          (0-27): 28 x Qwen2DecoderLayer(\r\n            (self_attn): Qwen2SdpaAttention(\r\n              (q_proj): Linear(in_features=1536, out_features=1536, bias=True)\r\n              (k_proj): Linear(in_features=1536, out_features=256, bias=True)\r\n              (v_proj): Linear(in_features=1536, out_features=256, bias=True)\r\n              (o_proj): Linear(in_features=1536, out_features=1536, bias=False)\r\n              (rotary_emb): Qwen2RotaryEmbedding()\r\n            )\r\n            (mlp): Qwen2MLP(\r\n              (gate_proj): Linear(in_features=1536, out_features=8960, bias=False)\r\n              (up_proj): Linear(in_features=1536, out_features=8960, bias=False)\r\n              (down_proj): Linear(in_features=8960, out_features=1536, bias=False)\r\n              (act_fn): SiLU()\r\n            )\r\n            (input_layernorm): Qwen2RMSNorm((0,), eps=1e-06)\r\n            (post_attention_layernorm): Qwen2RMSNorm((0,), eps=1e-06)\r\n          )\r\n        )\r\n        (norm): Qwen2RMSNorm((0,), eps=1e-06)\r\n        (rotary_emb): Qwen2RotaryEmbedding()\r\n      )\r\n      (score): Linear(in_features=1536, out_features=1, bias=False)\r\n    )\r\n  )\r\n)\r\nHello, the above is my model structure. In short, I use a custom LLMDecoder, which has a variable named model which is a Qwen2ForSequenceClassification object.\r\nIn this case, how should I save the model in deepspeed zero3?\r\n\r\nThe following code is not suitable for my model structure, how should I modify it?\r\n\r\n\r\nunwrapped_model = accelerator.unwrap_model(model)\r\nunwrapped_model.save_pretrained(\r\n    args.output_dir,\r\n    is_main_process=accelerator.is_main_process,\r\n    save_function=accelerator.save,\r\n    state_dict=accelerator.get_state_dict(model),\r\n)",
    "url": "https://github.com/huggingface/accelerate/issues/3309",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-21T17:01:17Z",
    "updated_at": "2025-01-30T15:06:45Z",
    "user": "NLPJCL"
  },
  {
    "repo": "pytorch/xla",
    "number": 8515,
    "title": "multi_queries_paged_attention_kernel fails with Llama3 70B on a TPU-v4-16 with sequence length of 256",
    "body": "I'm running Llama3 70B with vllm on a TPU-v4-16, when using the flash attention kernel i'm able to go up to 16k, but using multi_queries_paged_attention with sequence length 256, it seems that the page table is taking too much smem.\r\n@vanbasten23 @WoosukKwon  any idea how to address this (i'm familiar with pallas programming)?\r\nmaybe something along the lines of this? https://github.com/vllm-project/vllm/blob/02222a0256f60319f5bcd56d1d036a943d6334f8/vllm/attention/backends/pallas.py#L260\r\n\r\n\r\n```\r\nLoading safetensors checkpoint shards: 100% Completed | 30/30 [02:03<00:00,  4.13s/it]                                                                                                                                                                                                            \r\nINFO 12-21 14:11:07 ray_tpu_executor.py:276] # TPU blocks: 19032, # CPU blocks: 6552                                                                                                                                                                                                    \r\nINFO 12-21 14:11:07 tpu_model_runner.py:274] Compiling the model with different input shapes...                                                                                                                                                                                         \r\n(RayWorkerWrapper pid=777, ip=10.130.0.186) INFO 12-21 14:11:08 tpu_model_runner.py:274] Compiling the model with different input shapes...                                                                                                                                             \r\n(RayWorkerWrapper pid=1005) INFO 12-21 14:07:13 tpu.py:27] Cannot use _Backend.FLASH_ATTN backend on TPU. [repeated 6x across cluster]                                                                                                                                                  \r\n(RayWorkerWrapper pid=1005) INFO 12-21 14:07:13 selector.py:163] Using Pallas backend. [repeated 6x across cluster]                                                                                                                                                                     \r\n(RayWorkerWrapper pid=1005) WARNING 12-21 14:07:13 tpu_worker.py:62] Starting to init distributed environment with config: ParallelConfig(pipeline_parallel_size=1, tensor_parallel_size=8, worker_use_ray=False, max_parallel_loading_workers=None, disable_custom_all_reduce=False, tokenizer_pool_config=None, ray_workers_use_nsight=False, p\r\nlacement_group=<ray.util.placement_group.PlacementGroup object at 0x7f05501350f0>, distributed_executor_backend='ray', worker_cls='vllm.worker.tpu_worker.TPUWorker', sd_worker_cls='auto', world_size=8, rank=3) [repeated 6x across cluster]                                           \r\n(RayWorkerWrapper pid=1005) INFO 12-21 14:07:13 parallel_state.py:954] world_size=8 rank=3 local_rank=3 distributed_init_method=tcp://10.130.0.185:57577 backend=gloo [repeated 6x across cluster]                                                                                      \r\n(RayWorkerWrapper pid=1005) INFO 12-21 14:07:13 parallel_state.py:959] attempting to initialize distributed environment [repeated 6x across cluster]                                                                                                                                    \r\n(RayWorkerWrapper pid=1135, ip=10.130.0.186) init_world_group: local_rank=3 [repeated 12x across cluster]                                                                                                                                                                               \r\n(RayWorkerWrapper pid=1135, ip=10.130.0.186) init_world_group: backend='gloo' [repeated 6x across cluster]                                                                                                                                                                              \r\n(RayWorkerWrapper pid=1135, ip=10.130.0.186) init_model_parallel_group bla bla: local_rank=3 [repeated 26x across cluster]                                                                                                                                                              \r\n(RayWorkerWrapper pid=1135, ip=10.130.0.186) init_model_parallel_group bla bla: backend='gloo' [repeated 13x across cluster]                                                                                                                                                            \r\n(RayWorkerWrapper pid=1005) self.cpu_group=<torch.distributed.distributed_c10d.ProcessGroup object at 0x7f051028d330> [repeated 6x across cluster]                                                                                                                                      \r\nINFO 12-21 14:13:02 tpu_model_runner.py:284] batch_size: 1, seq_len: 16                                                                                                                                ",
    "url": "https://github.com/pytorch/xla/issues/8515",
    "state": "open",
    "labels": [
      "performance",
      "pallas",
      "xla:tpu"
    ],
    "created_at": "2024-12-21T14:23:04Z",
    "updated_at": "2025-02-13T13:43:19Z",
    "comments": 2,
    "user": "OhadRubin"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10334,
    "title": "Sana broke on MacOS. Grey images on MPS, NaN's on CPU.",
    "body": "### Describe the bug\n\nJust started to play with Sana, was excited when I saw it was coming to Diffusers as the NVIDIA supplied code was full of CUDA only stuff.\r\nRan the  example code, changing cuda to mps and got a grey image.\r\n\r\n![output](https://github.com/user-attachments/assets/f8f230d2-c025-437a-adf4-9bbb76767a65)\r\n\r\nRemoved the move to MPS to run it on the CPU and the script failed with\r\n```\r\nimage_processor.py:147: RuntimeWarning: invalid value encountered in cast\r\n```  \r\nthat suggests the latents had NaN's on the CPU.\n\n### Reproduction\n\n```py\r\nimport torch\r\nfrom diffusers import SanaPipeline\r\n\r\npipe = SanaPipeline.from_pretrained(\r\n    \"Efficient-Large-Model/Sana_1600M_1024px_diffusers\", torch_dtype=torch.float32\r\n)\r\npipe.to(\"mps\")\r\npipe.text_encoder.to(torch.bfloat16)\r\npipe.transformer = pipe.transformer.to(torch.float16)\r\n\r\nimage = pipe(prompt='a cyberpunk cat with a neon sign that says \"Sana\"')[0]\r\nimage[0].save(\"output.png\")\r\n```\r\n\r\nremoved `pipe.to(\"mps\")` to run on the CPU.\n\n### Logs\n\n```shell\n*** MPS run ***\r\n(Diffusers) $ python sana_test.py\r\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:10<00:00,  5.03s/it]\r\nLoading pipeline components...: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5/5 [00:10<00:00,  2.18s/it]\r\n\r\nSetting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:\r\n`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.\r\n\r\nSetting `clean_caption` to False...\r\nThe 'batch_size' argument of HybridCache is deprecated and will be removed in v4.49. Use the more precisely named 'max_batch_size' argument instead.\r\nThe 'batch_size' attribute of HybridCache is deprecated and will be removed in v4.49. Use the more precisely named 'self.max_batch_size' attribute instead.\r\n\r\nSetting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:\r\n`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.\r\n\r\nSetting `clean_caption` to False...\r\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 20/20 [00:49<00:00,  2.48s/it]\r\n(Diffusers) $ \r\n\r\n***CPU run***\r\n\r\n(Diffusers) $ python sana_test.py\r\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:06<00:00,  3.13s/it]\r\nLoading pipeline components...: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5/5 [00:07<00:00,  1.41s/it]\r\n\r\nSetting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:\r\n`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.\r\n\r\nSetting `clean_caption` to False...\r\nThe 'batch_size' argument of HybridCache is deprecated and will be removed in v4.49. Use the more precisely named 'max_batch_size' argument instead.\r\nThe 'batch_size' attribute of HybridCache is deprecated and will be removed in v4.49. Use the more precisely named 'self.max_batch_size' attribute instead.\r\n\r\nSetting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:\r\n`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.\r\n\r\nSetting `clean_caption` to False...\r\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 20/20 [20:14<00:00, 60.74s/it]\r\n/Volumes/SSD2TB/AI/Diffusers/lib/python3.11/site-packages/diffusers/image_processor.py:147: RuntimeWarning: invalid value encountered in cast\r\n  images = (images * 255).round().astype(\"uint8\")\r\n(Diffusers) $\n```\n\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.32.0.dev0\r\n- Platform: macOS-15.2-arm64-arm-64bit\r\n- Running on Google Colab?: No\r\n- Python version: 3.11.10\r\n- PyTorch version (GPU?): 2.6.0.dev20241219 (False)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Huggingface_hub version: 0.25.0\r\n- Transformers version: 4.47.1\r\n- Accelerate version: 0.34.2\r\n- PEFT version: not installed\r\n- Bitsandbytes version: not installed\r\n- Safetensors version: 0.4.5\r\n- xFormers version: not installed\r\n- Accelerator: Apple M3\r\n- Using GPU in script?: both\r\n- Using distributed or parallel set-up in script?: no\n\n### Who can help?\n\n@pcuenca",
    "url": "https://github.com/huggingface/diffusers/issues/10334",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-12-21T11:26:40Z",
    "updated_at": "2025-01-27T01:26:43Z",
    "comments": 8,
    "user": "Vargol"
  },
  {
    "repo": "huggingface/peft",
    "number": 2292,
    "title": "Cannot import name 'EncoderDecoderCache' from 'transformers'",
    "body": "### System Info\n\ntransformer==4.39.3;peft==0.14.0\r\n\r\n\r\n\r\nMaybe this is from transformer's update,so which version can i use.  \n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nfrom src import models\r\nfrom src.utils import IImage, resize\r\nimport numpy as np\r\nfrom src.methods import rasg, sd, sr\r\nfrom PIL import Image\r\nfrom peft import get_peft_model, LoraConfig, TaskType\r\ninp_model = models.load_inpainting_model('ds8_inp', device='cpu', cache=True)\r\nlora_config = LoraConfig(\r\n    task_type=TaskType.IMAGE_GENERATION,\r\n    inference_mode=True,\r\n    r=8,\r\n    lora_alpha=16,\r\n    lora_dropout=0.05,\r\n)\r\nnew_model = get_peft_model(inp_model.unet, lora_config)\r\nprint(new_model.state_dict().keys())\r\n\n\n### Expected behavior\n\n/root/miniconda3/lib/python3.10/site-packages/timm/models/layers/__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers\r\n  warnings.warn(f\"Importing from {__name__} is deprecated, please import via timm.layers\", FutureWarning)\r\nTraceback (most recent call last):\r\n  File \"/root/autodl-tmp/workspace/HD-Painter/paratest.py\", line 6, in <module>\r\n    from peft import get_peft_model, LoraConfig, TaskType\r\n  File \"/root/miniconda3/lib/python3.10/site-packages/peft/__init__.py\", line 22, in <module>\r\n    from .auto import (\r\n  File \"/root/miniconda3/lib/python3.10/site-packages/peft/auto.py\", line 32, in <module>\r\n    from .mapping import MODEL_TYPE_TO_PEFT_MODEL_MAPPING\r\n  File \"/root/miniconda3/lib/python3.10/site-packages/peft/mapping.py\", line 25, in <module>\r\n    from .mixed_model import PeftMixedModel\r\n  File \"/root/miniconda3/lib/python3.10/site-packages/peft/mixed_model.py\", line 29, in <module>\r\n    from .peft_model import PeftModel\r\n  File \"/root/miniconda3/lib/python3.10/site-packages/peft/peft_model.py\", line 37, in <module>\r\n    from transformers import Cache, DynamicCache, EncoderDecoderCache, PreTrainedModel\r\nImportError: cannot import name 'Cache' from 'transformers' (/root/miniconda3/lib/python3.10/site-packages/transformers/__init__.py)",
    "url": "https://github.com/huggingface/peft/issues/2292",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-21T09:00:04Z",
    "updated_at": "2025-03-31T06:50:20Z",
    "comments": 4,
    "user": "Huang-jia-xuan"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 758,
    "title": "Checkpoint conversion",
    "body": "Hey,\r\n\r\nI am trying to evaluate a model trained with torchtitan using the lm eval harness. I am using the VLLM backend. Is there any straightforward way to convert a torchtitan model in the pytorch .pt format to, e.g., a huggingface model to be used in VLLM/lm eval harness? Within the torchtune repo, I was able to find [some code for VLMs](https://github.com/pytorch/torchtune/blob/main/recipes/eleuther_eval.py), but (a) that seems to be hardcoded for LLMs, (b) uses a new inference backend instead of e.g. relying on VLLM, and (c) I feel like there might be an easy way to convert torchtitan checkpoints rather than coming up with such an involved solution.\r\n\r\nHow did you evaluate downstream task accuracy with torchtitan models?\r\n\r\nThank you very much for your help.",
    "url": "https://github.com/pytorch/torchtitan/issues/758",
    "state": "closed",
    "labels": [
      "question",
      "module: checkpoint"
    ],
    "created_at": "2024-12-20T17:57:58Z",
    "updated_at": "2025-08-21T02:59:53Z",
    "user": "MaxiBoether"
  },
  {
    "repo": "pytorch/xla",
    "number": 8510,
    "title": "Input tensor is not an XLA tensor on AWS Trainium instance",
    "body": "Hi team, I'm currently testing my training job on AWS Trainium instance. I encountered error `Input tensor is not an XLA tensor: torch.FloatTensor` when using pytorch Conv1d/Linear module. I\u2019ve confirmed that the input tensor has been moved to xla as I explicitly called `.to(xm.xla_device())` when passing the input tensor to the module forward method. However, I found out the error was actually caused by the weight and bias generated within those pytorch module, eg here: https://github.com/pytorch/pytorch/blob/main/torch/nn/modules/conv.py#L375, I printed the device location for self.weght and self.bias and they are on cpu. I have to modify the source Conv1d code to resolve the issue, eg:\r\n\r\n```\r\ndef _conv_forward(self, input: Tensor, weight: Tensor, bias: Optional[Tensor]):\r\n    input = input.to(self.device)\r\n    weight = weight.to(self.device)\r\n    if bias is not None:\r\n        bias = bias.to(self.device)\r\n\r\n    if self.padding_mode != 'zeros':\r\n        return F.conv1d(\r\n            F.pad(input, self._reversed_padding_repeated_twice, mode=self.padding_mode),\r\n            weight, bias, self.stride, _single(0), self.dilation, self.groups\r\n        )\r\n    return F.conv1d(input, weight, bias, self.stride, self.padding, self.dilation, self.groups)\r\n```\r\n\r\n Does anyone know how to make sure those are on the xla device?\r\n",
    "url": "https://github.com/pytorch/xla/issues/8510",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-20T17:51:33Z",
    "updated_at": "2025-01-08T21:59:14Z",
    "comments": 4,
    "user": "JmeanJmy"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 757,
    "title": "[question]can't disable CP for specific (unsupported) SDPA op",
    "body": "## Problem\r\n\r\ncurrently the API of context parallel have five problems.\r\n\r\n1. only support apply CP to whole model. if we have some cross attn in prep part of model with unsupported shape, it's impossible to apply CP since `_context_parallel` always override all SDPA and need to wrap whole backward.\r\n2. no shard/unshard with gradient support. when I try to apply CP to transformer blocks only and remain other SDPA replicate, the  `context_parallel_unshard` in pytorch has `no_grad` decorator.\r\n3. weight gradients inside CP region is divided by size of CP mesh because we reduce them in DP+CP, this may work for optimizer with norm support, but make unit test harder to write, we have to scale them back to get same gradients as model without CP.\r\n4. The length of the sequence must be divisible by the number of CP (CP * 2 for robin).\r\n5. replicate input of CP region may contain wrong gradient because its gradient may be `Partial`, we have to check every replicate input and use `to_local(grad_placements=[Partial()])`.\r\n\r\nTo resolve problem 1 above, I remove `context_parallel` context to disable SDPA override, only enable `_enable_cp_dispatcher` context, then we can enable CP SDPA iff all inputs are converted to DTensor. problem 2 is easy  to resolve, just write some auto grad functions.\r\n\r\nhere is my questions:\r\n1. is there a better way to support `CP region`?\r\n2. do you have any plan to support `CP region` officially and resolve issues above?",
    "url": "https://github.com/pytorch/torchtitan/issues/757",
    "state": "open",
    "labels": [
      "enhancement",
      "module: context parallel"
    ],
    "created_at": "2024-12-20T11:00:23Z",
    "updated_at": "2025-03-12T10:30:52Z",
    "comments": 3,
    "user": "FindDefinition"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3141,
    "title": "How to load ModernBERT model correctly?",
    "body": "Hi Teams,\r\n\r\nI want to ask how to properly load [ModernBERT](https://huggingface.co/blog/modernbert) using SentenceTransformer?\r\n\r\nThe main difficulty I met is about the weight loading of prediction head as defined [here](https://github.com/huggingface/transformers/blob/f42084e6411c39b74309af4a7d6ed640c01a4c9e/src/transformers/models/modernbert/modeling_modernbert.py#L1121-L1123) where `ModernBertPredictionHead` is not included in the `AutoModelClass`. I tried to use the following code:\r\n```python\r\nimport torch\r\nfrom sentence_transformers import SentenceTransformer,models\r\nmodel_name_or_path = \"answerdotai/ModernBERT-base\"\r\nmodules = []\r\nmodules.append(models.Transformer(model_name_or_path))\r\n\r\n## head\r\nmodules.append(models.Dense(768,768,activation_function=torch.nn.GELU()))\r\nmodules.append(models.Dense(768,768,activation_function=torch.nn.Identity()))\r\n\r\n## pooling\r\nmodules.append(models.Pooling(768,pooling_mode=\"mean\"))\r\n\r\n## classifier\r\nmodules.append(models.Dense(768,1))\r\n\r\nmodel = SentenceTransformer(modules=modules,device=\"cpu\")\r\n```\r\n\r\nHowever, it seems that `Dense` before `Pooling` is not supported and would throw an error:\r\n```\r\nKeyError: 'sentence_embedding'\r\n```",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3141",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-20T06:52:44Z",
    "updated_at": "2024-12-24T03:08:47Z",
    "user": "Hannibal046"
  },
  {
    "repo": "huggingface/picotron",
    "number": 15,
    "title": "Difference between picotron and nanotron",
    "body": "What is the difference between picotron and [nanotron](https://github.com/huggingface/nanotron)? Why huggingface team rolled out two hybrid-parallelism framework?",
    "url": "https://github.com/huggingface/picotron/issues/15",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-12-19T12:48:57Z",
    "updated_at": "2024-12-20T10:17:25Z",
    "user": "cailun01"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10302,
    "title": "Using FP8 for inference without CPU offloading can introduce noise.",
    "body": "### Describe the bug\r\n\r\nIf I use ```pipe.enable_model_cpu_offload(device=device)```, the model can perform inference correctly after warming up. However, if I comment out this line, the inference results are noisy.\r\n\r\n### Reproduction\r\n\r\n```python\r\nfrom diffusers import (\r\n    FluxPipeline, \r\n    FluxTransformer2DModel\r\n)\r\nfrom transformers import T5EncoderModel, CLIPTextModel,CLIPTokenizer,T5TokenizerFast\r\nfrom optimum.quanto import freeze, qfloat8, quantize\r\nimport torch\r\nfrom diffusers import FlowMatchEulerDiscreteScheduler, AutoencoderKL\r\ndtype = torch.bfloat16\r\nbfl_repo = f\"black-forest-labs/FLUX.1-dev\" \r\ndevice = \"cuda\"\r\nscheduler       = FlowMatchEulerDiscreteScheduler.from_pretrained(bfl_repo, subfolder=\"scheduler\", torch_dtype=dtype)\r\ntext_encoder    = CLIPTextModel.from_pretrained(bfl_repo, subfolder=\"text_encoder\", torch_dtype=dtype)\r\ntokenizer       = CLIPTokenizer.from_pretrained(bfl_repo, subfolder=\"tokenizer\", torch_dtype=dtype, clean_up_tokenization_spaces=True)\r\ntext_encoder_2  = T5EncoderModel.from_pretrained(bfl_repo, subfolder=\"text_encoder_2\", torch_dtype=dtype)\r\ntokenizer_2     = T5TokenizerFast.from_pretrained(bfl_repo, subfolder=\"tokenizer_2\", torch_dtype=dtype, clean_up_tokenization_spaces=True)\r\nvae             = AutoencoderKL.from_pretrained(bfl_repo, subfolder=\"vae\", torch_dtype=dtype)\r\n\r\ntransformer = FluxTransformer2DModel.from_single_file(\"https://huggingface.co/Kijai/flux-fp8/blob/main/flux1-dev-fp8.safetensors\", torch_dtype=dtype)\r\nquantize(transformer, weights=qfloat8)\r\nfreeze(transformer)\r\nquantize(text_encoder_2, weights=qfloat8)\r\nfreeze(text_encoder_2)\r\n\r\npipe = FluxPipeline(\r\n            scheduler=scheduler,\r\n            text_encoder=text_encoder,\r\n            tokenizer=tokenizer,\r\n            text_encoder_2=text_encoder_2,\r\n            tokenizer_2=tokenizer_2,\r\n            vae=vae,\r\n            transformer=transformer\r\n        ).to(device, dtype=dtype)  # edit\r\n\r\n# pipe.enable_model_cpu_offload(device=device)            \r\nparams = {\r\n                \"prompt\": \"a cat\",\r\n                \"num_images_per_prompt\": 1,\r\n                \"num_inference_steps\":1,\r\n                \"width\": 64,\r\n                \"height\": 64,\r\n                \"guidance_scale\": 7,\r\n            }\r\nimage = pipe(**params).images[0]    # wamup\r\nparams = {\r\n                \"prompt\": \"a cat\",\r\n                \"num_images_per_prompt\": 1,\r\n                \"num_inference_steps\":25,\r\n                \"width\": 512,\r\n                \"height\": 512,\r\n                \"guidance_scale\": 7,\r\n            }\r\nimage = pipe(**params).images[0]    \r\nimage.save(\"1.jpg\")\r\n```\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\nWARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:\r\n    PyTorch 2.5.1+cu121 with CUDA 1201 (you have 2.4.1+cu121)\r\n    Python  3.10.15 (you have 3.10.13)\r\n  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)\r\n  Memory-efficient attention, SwiGLU, sparse and more won't be available.\r\n  Set XFORMERS_MORE_DETAILS=1 for more details\r\n\r\nCopy-and-paste the text below in your GitHub issue and FILL OUT the two last points.\r\n\r\n- \ud83e\udd17 Diffusers version: 0.32.0.dev0\r\n- Platform: Linux-6.8.0-49-generic-x86_64-with-glibc2.35\r\n- Running on Google Colab?: No\r\n- Python version: 3.10.13\r\n- PyTorch version (GPU?): 2.4.1+cu121 (True)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Huggingface_hub version: 0.26.2\r\n- Transformers version: 4.46.2\r\n- Accelerate version: 0.31.0\r\n- PEFT version: 0.14.0\r\n- Bitsandbytes version: not installed\r\n- Safetensors version: 0.4.3\r\n- xFormers version: 0.0.28.post3\r\n- Accelerator: NVIDIA GeForce RTX 3090, 24576 MiB\r\nNVIDIA GeForce RTX 3090, 24576 MiB\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\r\n\r\n### Who can help?\r\n\r\n@yiyixuxu @DN6",
    "url": "https://github.com/huggingface/diffusers/issues/10302",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-12-19T12:39:06Z",
    "updated_at": "2025-03-10T14:18:58Z",
    "comments": 6,
    "user": "todochenxi"
  },
  {
    "repo": "huggingface/candle",
    "number": 2674,
    "title": "[Question] How to create a autograd function like in PyTorch? How to customize forward and backward process?",
    "body": "",
    "url": "https://github.com/huggingface/candle/issues/2674",
    "state": "open",
    "labels": [],
    "created_at": "2024-12-19T07:02:04Z",
    "updated_at": "2024-12-19T07:02:15Z",
    "user": "VanderBieu"
  },
  {
    "repo": "huggingface/blog",
    "number": 2551,
    "title": "How to process and visualize the segment output tokens?",
    "body": "How to process the segment tokens and generate segmentation masks? what the output means?\r\n![\u5fae\u4fe1\u56fe\u7247_20241219110946](https://github.com/user-attachments/assets/089e5d16-f133-449a-a0ee-0f7c07e335dc)\r\n",
    "url": "https://github.com/huggingface/blog/issues/2551",
    "state": "open",
    "labels": [],
    "created_at": "2024-12-19T03:11:15Z",
    "updated_at": "2024-12-19T03:11:15Z",
    "user": "00mmw"
  },
  {
    "repo": "pytorch/ao",
    "number": 1437,
    "title": "Segmentation Fault Running Int8 Quantized Model on GPU",
    "body": "Hi! We got into segmentation fault error when trying to run model inference on gpu. Below is a minimal example from the tutorial ([link](https://pytorch.org/docs/stable/quantization.html#post-training-static-quantization)):\r\n\r\n```\r\nimport torch\r\nimport time\r\n\r\n# define a floating point model where some layers could be statically quantized\r\nclass M(torch.nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n        # QuantStub converts tensors from floating point to quantized\r\n        self.quant = torch.ao.quantization.QuantStub()\r\n        self.conv = torch.nn.Conv2d(1, 1, 1)\r\n        self.relu = torch.nn.ReLU()\r\n        # DeQuantStub converts tensors from quantized to floating point\r\n        self.dequant = torch.ao.quantization.DeQuantStub()\r\n\r\n    def forward(self, x):\r\n        # manually specify where tensors will be converted from floating\r\n        # point to quantized in the quantized model\r\n        x = self.quant(x)\r\n        x = self.conv(x)\r\n        x = self.relu(x)\r\n        # manually specify where tensors will be converted from quantized\r\n        # to floating point in the quantized model\r\n        x = self.dequant(x)\r\n        return x\r\n\r\n# create a model instance\r\nmodel_fp32 = M()\r\n\r\n# model must be set to eval mode for static quantization logic to work\r\nmodel_fp32.eval()\r\ninput_fp32 = torch.randn(4, 1, 1024, 1024)\r\n\r\ntime_s = time.time()\r\nwith torch.no_grad():\r\n    out = model_fp32(input_fp32)\r\ntime_e = time.time()\r\n\r\nmodel_fp32.qconfig = torch.ao.quantization.get_default_qconfig('fbgemm')\r\nmodel_fp32_fused = torch.ao.quantization.fuse_modules(model_fp32, [['conv', 'relu']])\r\nmodel_fp32_prepared = torch.ao.quantization.prepare(model_fp32_fused)\r\n\r\nmodel_fp32_prepared(input_fp32)\r\n\r\nmodel_int8 = torch.ao.quantization.convert(model_fp32_prepared)\r\n\r\n# run the model, relevant calculations will happen in int8\r\nres = model_int8(input_fp32)\r\n\r\nmodel_int8 = model_int8.to('cuda:0')\r\ninput_fp32 = input_fp32.to('cuda:0')\r\n\r\nwith torch.no_grad():\r\n    out = model_int8(input_fp32)\r\n```\r\n\r\nOutput:\r\n```\r\nSegmentation fault (core dumped)\r\n```\r\n\r\nInference on CPU is fine for the int8 model. Could someone please advise on the potential reason? Thank you!",
    "url": "https://github.com/pytorch/ao/issues/1437",
    "state": "closed",
    "labels": [
      "question",
      "triaged"
    ],
    "created_at": "2024-12-18T19:51:48Z",
    "updated_at": "2025-01-23T19:16:09Z",
    "user": "wendywangwwt"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3331,
    "title": "\u2753 [Question] Jetson AGX Orin build and install torch_tensorrt wheel file Failed",
    "body": "## \u2753 Question\r\n\r\nI follow this [tutorial](https://pytorch.org/TensorRT/getting_started/installation.html) to install Torch-TensorRT, but in the last step:\r\n\r\n```\r\ncuda_version=$(nvcc --version | grep Cuda | grep release | cut -d ',' -f 2 | sed -e 's/ release //g')\r\nexport TORCH_INSTALL_PATH=$(python -c \"import torch, os; print(os.path.dirname(torch.__file__))\")\r\nexport SITE_PACKAGE_PATH=${TORCH_INSTALL_PATH::-6}\r\nexport CUDA_HOME=/usr/local/cuda-${cuda_version}/\r\n# replace the MODULE.bazel with the jetpack one\r\ncat toolchains/jp_workspaces/MODULE.bazel.tmpl | envsubst > MODULE.bazel\r\n# build and install torch_tensorrt wheel file\r\npython setup.py --use-cxx11-abi install --user\r\n```\r\nsome errors happened:\r\n```\r\nRun this command to start an interactive shell in an identical sandboxed environment:\r\n(exec env - \\\r\n    LD_LIBRARY_PATH=/usr/lib/gcc/aarch64-linux-gnu/11:/usr/local/cuda-12.6/lib64: \\\r\n    PATH=/home/lab223/.cache/bazelisk/downloads/sha256/5a4cc979353671e438b9469b833924c2361e25a580cc278a75877aedc27c1c53/bin:/usr/lib/gcc/aarch64-linux-gnu/11:/home/lab223/anaconda3/envs/rnw/bin:/home/lab223/anaconda3/condabin:/usr/local/cuda-12.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin \\\r\n    PWD=/proc/self/cwd \\\r\n    TMPDIR=/tmp \\\r\n  /home/lab223/.cache/bazel/_bazel_lab223/install/128438993754f9753a1e4f56fdd76124/linux-sandbox -t 15 -w /dev/shm -w /home/lab223/.cache/bazel/_bazel_lab223/3fb6c16c20f38dfc11e57e77e6eea473/sandbox/linux-sandbox/46/execroot/_main -w /tmp -M /home/lab223/.cache/bazel/_bazel_lab223/3fb6c16c20f38dfc11e57e77e6eea473/sandbox/linux-sandbox/46/_hermetic_tmp -m /tmp -S /home/lab223/.cache/bazel/_bazel_lab223/3fb6c16c20f38dfc11e57e77e6eea473/sandbox/linux-sandbox/46/stats.out -D /home/lab223/.cache/bazel/_bazel_lab223/3fb6c16c20f38dfc11e57e77e6eea473/sandbox/linux-sandbox/46/debug.out -- /bin/sh -i)\r\nERROR: /home/lab223/TensorRT/core/conversion/var/BUILD:20:11: Compiling core/conversion/var/Var.cpp failed: I/O exception during sandboxed execution: /home/lab223/.cache/bazel/_bazel_lab223/3fb6c16c20f38dfc11e57e77e6eea473/sandbox/linux-sandbox/58/execroot/_main/bazel-out/aarch64-opt/bin/external/_main~_repo_rules~libtorch/_virtual_includes/ATen/ATen/core/DeprecatedTypePropertiesRegistry.h (???????)\r\nERROR: /home/lab223/TensorRT/core/conversion/converters/BUILD:59:11: Compiling core/conversion/converters/NodeConverterRegistry.cpp failed: I/O exception during sandboxed execution: /home/lab223/.cache/bazel/_bazel_lab223/3fb6c16c20f38dfc11e57e77e6eea473/sandbox/linux-sandbox/57/execroot/_main/bazel-out/aarch64-opt/bin/external/_main~_repo_rules~libtorch/_virtual_includes/ATen/ATen/ops/cudnn_batch_norm_ops.h (???????)\r\nERROR: /home/lab223/TensorRT/core/conversion/converters/BUILD:39:11: Compiling core/conversion/converters/converter_util.cpp failed: I/O exception during sandboxed execution: /home/lab223/.cache/bazel/_bazel_lab223/3fb6c16c20f38dfc11e57e77e6eea473/sandbox/linux-sandbox/56/execroot/_main/external/_main~_repo_rules~libtorch/include/ATen/ops/native_dropout_backward_cpu_dispatch.h (???????)\r\nTarget //:libtorchtrt failed to build\r\nINFO: Elapsed time: 1000.299s, Critical Path: 574.06s\r\nINFO: 7984 processes: 7938 internal, 46 linux-sandbox.\r\nERROR: Build did NOT complete successfully\r\n\r\n```\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): **2.5.0**\r\n - CPU Architecture: **arm64(Jetson AGX Orin)**\r\n - OS (e.g., Linux): **Linux**\r\n - How you installed PyTorch: **pip**\r\n - Build command you used (if compiling from source): **python setup.py --use-cxx11-abi install --user**\r\n - Are you using local sources or building from archives: **building from archives**\r\n - Python version: **3.10.15**\r\n - CUDA version: **12.6**\r\n - GPU models and configuration: -\r\n - Any other relevant information: Install torch_tensorrt in the model's anaconda virtual environment\r\n\r\n## Additional context\r\n\r\nIt seems a I/O exception.But Jetson still has 11GB of space.please help me!thanks!!!!\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3331",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-12-18T18:55:56Z",
    "updated_at": "2024-12-18T20:30:20Z",
    "user": "breknddone"
  },
  {
    "repo": "huggingface/transformers",
    "number": 35316,
    "title": "How to use a custom Image Processor?",
    "body": "I want to use the processor in the form of `auto_map` but when using `AutoProcessor.from_pretrained`, I am unable to load the custom `ImageProcessor`.\r\n\r\nThe root cause lies in the use of the `transformers_module` to initialize the class in `ProcessorMixin`. \r\n\r\nhttps://github.com/huggingface/transformers/blob/c7e48053aab09ad11efa2ad12513e9ab56f29563/src/transformers/processing_utils.py#L1018\r\n\r\nEven though I have overridden the _get_arguments_from_pretrained method, this issue still exists in the `__init__`. \r\n\r\nhttps://github.com/huggingface/transformers/blob/c7e48053aab09ad11efa2ad12513e9ab56f29563/src/transformers/processing_utils.py#L383\r\n\r\nPerhaps I could avoid inheriting from ProcessorMixin, but I would like to know if there is a more elegant way to achieve this functionality?",
    "url": "https://github.com/huggingface/transformers/issues/35316",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-18T12:04:33Z",
    "updated_at": "2024-12-19T02:53:43Z",
    "user": "glamourzc"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10281,
    "title": "Request to implement FreeScale, a new diffusion scheduler",
    "body": "### Model/Pipeline/Scheduler description\r\n\r\nFreeScale is a tuning-free method for higher-resolution visual generation, unlocking the 8k image generation for pre-trained SDXL! Compared to direct inference by SDXL, FreeScale brings negligible additional memory and time costs.\r\n\r\n![fig_teaser](https://github.com/user-attachments/assets/3eef38cc-3642-42a7-b5e7-8b32c32ecc77)\r\n\r\n![fig_diff8k](https://github.com/user-attachments/assets/8cec7c55-011e-4434-81e3-1e80dd5dd003)\r\n\r\n\r\n \r\n\r\n### Open source status\r\n\r\n- [X] The model implementation is available.\r\n- [X] The model weights are available (Only relevant if addition is not a scheduler).\r\n\r\n### Provide useful links for the implementation\r\n\r\n- Project: http://haonanqiu.com/projects/FreeScale.html\r\n- Paper: https://arxiv.org/abs/2412.09626\r\n- Code: https://github.com/ali-vilab/FreeScale\r\n- Hugging Face Demo: https://huggingface.co/spaces/MoonQiu/FreeScale\r\n\r\nThe code changes of FreeScale are not complicated, but I do not know how to integrate them into diffusers smoothly. If you have questions about FreeScale, please ask me(@arthur-qiu).",
    "url": "https://github.com/huggingface/diffusers/issues/10281",
    "state": "open",
    "labels": [
      "stale",
      "consider-for-modular-diffusers"
    ],
    "created_at": "2024-12-18T06:32:34Z",
    "updated_at": "2025-01-17T15:02:49Z",
    "comments": 1,
    "user": "arthur-qiu"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10280,
    "title": "Safetensors loading uses mmap with multiple processes sharing the same fd cause slow gcsfuse performance",
    "body": "### Describe the bug\r\n\r\nWhen I use `StableDiffusionPipeline.from_single_file` to load a safetensors model, I noticed that the loading speed is extremely slow when the file is loaded from GCSFuse (https://cloud.google.com/storage/docs/cloud-storage-fuse/overview).\r\n\r\nThe reason is that the loader creates multiple processes but they all share the same fd and its file handle. As each process reads different offset of the file, it makes the GCSFuse perform really badly because those reads appear to be random read jumping between offsets. For example:\r\n\r\n```\r\nconnection.go:420] <- ReadFile (inode 2, PID 77, handle 1, offset 529453056, 262144 bytes)\r\nconnection.go:420] <- ReadFile (inode 2, PID 78, handle 1, offset 531812352, 262144 bytes)\r\nconnection.go:420] <- ReadFile (inode 2, PID 79, handle 1, offset 534171648, 262144 bytes)\r\nconnection.go:420] <- ReadFile (inode 2, PID 50, handle 1, offset 527351808, 4096 bytes)\r\n```\r\n\r\nThe question I have is why the loading multiple processes share the same fd in the first place? As `mmap` is already used, even the multiple processes don't share the same fd, the kernel will still map the virtual memory for each process back to the same the page cache naturally, so there is no need to share the fd across the fd.\r\n\r\nIf they don't share the fd, GCSFuse will perform much better. Therefore, can we disable the fd sharing?\r\n\r\n### Reproduction\r\n\r\nSimply using GCSFuse to serve a file to `StableDiffusionPipeline.from_single_file`\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\nN/A\r\n\r\n### Who can help?\r\n\r\n@yiyixuxu  @asomoza ",
    "url": "https://github.com/huggingface/diffusers/issues/10280",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-12-18T06:02:41Z",
    "updated_at": "2025-01-10T10:11:05Z",
    "comments": 4,
    "user": "wlhee"
  },
  {
    "repo": "pytorch/xla",
    "number": 8497,
    "title": "API guide code snippets don't work",
    "body": "## \ud83d\udcda Documentation\r\n\r\nTrying to follow the example here: https://github.com/pytorch/xla/blob/master/API_GUIDE.md#running-on-a-single-xla-device\r\n\r\nThe Python code snippet doesn't work, as `MNIST()`, `nn`, and `optim` are all undefined.\r\n",
    "url": "https://github.com/pytorch/xla/issues/8497",
    "state": "closed",
    "labels": [
      "bug",
      "documentation"
    ],
    "created_at": "2024-12-17T23:14:45Z",
    "updated_at": "2025-05-20T15:55:40Z",
    "comments": 6,
    "user": "richardsliu"
  },
  {
    "repo": "huggingface/optimum-neuron",
    "number": 750,
    "title": "Document how to use Qwen 2.5",
    "body": "### Feature request\n\nQwen 2.5 7B Instruct on EC2 with HF DL AMI\r\nQwen 2.5 7B Instruct on Sagemaker with HF DLC Neuronx TGI\r\nMaybe something for the code version too? \r\nDependency of adding the model to the cache\n\n### Motivation\n\nincrease AMI and DLC usage\n\n### Your contribution\n\ndoc",
    "url": "https://github.com/huggingface/optimum-neuron/issues/750",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-12-17T16:03:25Z",
    "updated_at": "2025-01-22T08:04:54Z",
    "user": "pagezyhf"
  },
  {
    "repo": "pytorch/serve",
    "number": 3375,
    "title": "503 InternalServerException, prediction failed",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nHello, my inference request is returning a 503 InternalServerException, prediction failed. How can I resolve this issue? Below are the specific request, inference response, and torchserve logs. Additional note: I am using Docker to run the service, and the inference works fine with the gRPC API, but not with the HTTP request.\r\n\r\n### Error logs\r\n\r\n![image](https://github.com/user-attachments/assets/e740baf6-684c-42af-a42d-db0bb33c9eeb)\r\n![image](https://github.com/user-attachments/assets/f32e6aa4-31a3-463b-a33e-e55bdb2b705d)\r\n\r\n\r\n### Installation instructions\r\n\r\ndocker\r\n\r\n### Model Packaging\r\n\r\n![image](https://github.com/user-attachments/assets/69c370d9-6cb0-418d-a554-2529d12b6fbc)\r\n\r\n\r\n### config.properties\r\n\r\n_No response_\r\n\r\n### Versions\r\n\r\n![image](https://github.com/user-attachments/assets/98da46e0-8033-4ccc-a9b7-a78caa65b1c9)\r\n\r\n\r\n### Repro instructions\r\n\r\n![image](https://github.com/user-attachments/assets/6254a0a9-e5e8-4d14-948a-2e432d51a29f)\r\n\r\n\r\n### Possible Solution\r\n\r\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/3375",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-17T04:02:49Z",
    "updated_at": "2024-12-17T08:43:24Z",
    "comments": 1,
    "user": "Jax29"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 743,
    "title": "Model init with HuggingFace model",
    "body": "I am writing a simple script to run FSDP2 (`fully_shard`) on the `pythia-1b` model available on HuggingFace. I am currently running the model on 1 node with 2 devices. I was following the meta-device initialisation from the [FSDP2 docs](https://github.com/pytorch/torchtitan/blob/main/docs/fsdp.md). However, I think there is something wrong with my implementation since the peak memory usage with FSDP is same as without FSDP (~ 1GB). Further, I get an OOM on my device when I try with `pythia-2.8b` model. Following is a snippet on how I am initialising the model on a meta device using HuggingFace APIs:\r\n\r\n```\r\nmodel_name = \"EleutherAI/pythia-14m\"\r\n    \r\ntokenizer = AutoTokenizer.from_pretrained(model_name)\r\ntokenizer.pad_token = tokenizer.eos_token\r\nconfig = AutoConfig.from_pretrained(model_name)\r\n    with init_empty_weights():\r\n        model = AutoModelForCausalLM.from_config(config)\r\n\r\n    for module in model.modules():\r\n        if isinstance(module, GPTNeoXLayer):\r\n            fully_shard(module)\r\n    \r\n    model = fully_shard(model, reshard_after_forward=True)\r\n\r\n    model = load_checkpoint_and_dispatch(\r\n        model, path_to_safe_tensors\r\n    )\r\n  ```\r\n\r\nThis is not very straightforward since the shards expect `DTensors` when the weights are being loaded via `load_checkpoint_and_dispatch`. I am looking for some suggestions on what would be a good way to make FSDP2 work with HuggingFace models. I dont think accelerate supports FSDP2 yet.",
    "url": "https://github.com/pytorch/torchtitan/issues/743",
    "state": "open",
    "labels": [
      "bug",
      "question",
      "module: checkpoint",
      "huggingface integration"
    ],
    "created_at": "2024-12-16T05:45:04Z",
    "updated_at": "2025-04-22T18:38:22Z",
    "user": "neeldani"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 742,
    "title": "Low bit Optimizers & FA-3",
    "body": "1. hi have there been any tests with fa-3 and low bit optimizers from torchao like FP8adam for 8bit adam? i see divergence in training when resuming a FA-2 checkpoint with FA-3 or when using 8BITADAMW",
    "url": "https://github.com/pytorch/torchtitan/issues/742",
    "state": "open",
    "labels": [
      "bug",
      "question"
    ],
    "created_at": "2024-12-16T03:56:22Z",
    "updated_at": "2025-01-07T00:55:59Z",
    "user": "asahni-sc"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3294,
    "title": "How to run accelerate with PYTORCH_ENABLE_MPS_FALLBACK",
    "body": "### System Info\n\n```Shell\nMacOS \r\n\r\ntransformers>=4.35.1\r\ndatasets[audio]>=2.14.7\r\naccelerate>=0.24.1\r\nmatplotlib\r\nwandb\r\ntensorboard\r\nCython\r\n\r\n- `Accelerate` version: 1.2.1\r\n- Platform: macOS-14.7.1-arm64-arm-64bit\r\n- `accelerate` bash location: .venv/bin/accelerate\r\n- Python version: 3.12.3\r\n- Numpy version: 2.0.2\r\n- PyTorch version (GPU?): 2.5.1 (False)\r\n- PyTorch XPU available: False\r\n- PyTorch NPU available: False\r\n- PyTorch MLU available: False\r\n- PyTorch MUSA available: False\r\n- System RAM: 64.00 GB\r\n- `Accelerate` default config:\r\n\tNot found\n```\n\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nHow to set `PYTORCH_ENABLE_MPS_FALLBACK` environment variable when running a script with accelerate. The accelerate is not picking up the PYTORCH_ENABLE_MPS_FALLBACK environment variable  when running a script, no matter where this variable is set. I tried to set this variable in the script, in the command line and in the `./zshenv`, and still PyTorch is complaining it does not see this variable.\n\n### Expected behavior\n\nexpected the PYTORCH_ENABLE_MPS_FALLBACK variable be visible in the sub-process/thread.",
    "url": "https://github.com/huggingface/accelerate/issues/3294",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-15T07:03:41Z",
    "updated_at": "2025-01-23T15:06:57Z",
    "user": "mirodil-ml"
  },
  {
    "repo": "pytorch/audio",
    "number": 3863,
    "title": "How to install or download avutil-<VERSION>.dll and others on Windows Python venv not Conda!",
    "body": "I am reading this page and there is only information for conda\r\n\r\nI am not using conda but using Python venv\r\n\r\nSo how to install or where to get these dll files?\r\n\r\nhttps://pytorch.org/audio/stable/installation.html#optional-dependencies\r\n\r\n`When searching for FFmpeg installation, TorchAudio looks for library files which have names with version numbers. That is, libavutil.so.<VERSION> for Linux, libavutil.<VERSION>.dylib for macOS, and avutil-<VERSION>.dll for Windows. Many public pre-built binaries follow this naming scheme, but some distributions have un-versioned file names. If you are having difficulties detecting FFmpeg, double check that the library files you installed follow this naming scheme, (and then make sure that they are in one of the directories listed in library search path.)`\r\n\r\nI can't find anywhere these DLL files are distributed\r\n\r\nThis is causing me to get this error\r\n```\r\n\r\n  File \"R:\\MMAudio_v1\\MMAudio\\venv\\lib\\site-packages\\torch\\utils\\_contextlib.py\", line 116, in decorate_context\r\n    return func(*args, **kwargs)\r\n  File \"R:\\MMAudio_v1\\MMAudio\\gradio_demo.py\", line 60, in video_to_audio\r\n    clip_frames, sync_frames, duration = load_video(video, duration)\r\n  File \"R:\\MMAudio_v1\\MMAudio\\mmaudio\\eval_utils.py\", line 178, in load_video\r\n    reader = StreamingMediaDecoder(video_path)\r\n  File \"R:\\MMAudio_v1\\MMAudio\\venv\\lib\\site-packages\\torio\\io\\_streaming_media_decoder.py\", line 526, in __init__\r\n    self._be = ffmpeg_ext.StreamingMediaDecoder(os.path.normpath(src), format, option)\r\n  File \"R:\\MMAudio_v1\\MMAudio\\venv\\lib\\site-packages\\torio\\_extension\\utils.py\", line 25, in __getattr__\r\n    self._import_once()\r\n  File \"R:\\MMAudio_v1\\MMAudio\\venv\\lib\\site-packages\\torio\\_extension\\utils.py\", line 39, in _import_once\r\n    self.module = self.import_func()\r\n  File \"R:\\MMAudio_v1\\MMAudio\\venv\\lib\\site-packages\\torio\\_extension\\utils.py\", line 143, in _init_ffmpeg\r\n    ext = _find_ffmpeg_extension(ffmpeg_vers)\r\n  File \"R:\\MMAudio_v1\\MMAudio\\venv\\lib\\site-packages\\torio\\_extension\\utils.py\", line 122, in _find_ffmpeg_extension\r\n    raise ImportError(\r\nImportError: Failed to intialize FFmpeg extension. Tried versions: ['6', '5', '4', '']. Enable DEBUG logging to see more details about the error.\r\n```\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/audio/issues/3863",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-14T13:15:01Z",
    "updated_at": "2024-12-14T13:48:42Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3186,
    "title": "Writing a gradient tutorial, focused on leaf vs non leaf tensors.",
    "body": "There is no tutorial that specifically talks about requires_grad, retain_grad, and leaf tensor/ non-leaf tensors and how they interact with each other. Can I write a tutorial specifically talking about this topic? This will be useful when gradients are used in unusual places, as is the case for the deep dream algorithm. \r\n\r\ncc: @albanD ",
    "url": "https://github.com/pytorch/tutorials/issues/3186",
    "state": "closed",
    "labels": [
      "advanced",
      "tutorial-proposal",
      "docathon-h1-2025",
      "hard"
    ],
    "created_at": "2024-12-14T06:44:48Z",
    "updated_at": "2025-08-20T23:30:53Z",
    "comments": 5,
    "user": "JitheshPavan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10223,
    "title": "Where should I obtain the lora-sdxl-dreambooth-id in Inference",
    "body": "### Describe the bug\n\nI tried to upload the download link from the README file generated during training, but an error indicated it was incorrect. Where should I obtain the lora-id for Inference?\n\n### Reproduction\n\nREADME.md:\r\n---\r\nbase_model: /data/ziqiang/czc/diffusers/examples/dreambooth/model\r\nlibrary_name: diffusers\r\nlicense: openrail++\r\ninstance_prompt: a photo of sks dog\r\nwidget: []\r\ntags:\r\n- text-to-image\r\n- text-to-image\r\n- diffusers-training\r\n- diffusers\r\n- lora\r\n- template:sd-lora\r\n- stable-diffusion-xl\r\n- stable-diffusion-xl-diffusers\r\n---\r\n\r\n<!-- This model card has been generated automatically according to the information the training script had access to. You\r\nshould probably proofread and complete it, then remove this comment. -->\r\n\r\n\r\n# SDXL LoRA DreamBooth - daniu111/output\r\n\r\n<Gallery />\r\n\r\n## Model description\r\n\r\nThese are daniu111/output LoRA adaption weights for /data/ziqiang/czc/diffusers/examples/dreambooth/model.\r\n\r\nThe weights were trained  using [DreamBooth](https://dreambooth.github.io/).\r\n\r\nLoRA for the text encoder was enabled: False.\r\n\r\nSpecial VAE used for training: /data/ziqiang/czc/diffusers/examples/dreambooth/model/vae.\r\n\r\n## Trigger words\r\n\r\nYou should use a photo of sks dog to trigger the image generation.\r\n\r\n## Download model\r\n\r\nWeights for this model are available in Safetensors format.\r\n\r\n[Download](daniu111/output/tree/main) them in the Files & versions tab.\r\n\r\n\r\n\r\n## Intended uses & limitations\r\n\r\n#### How to use\r\n\r\n```python\r\n# TODO: add an example code snippet for running this diffusion pipeline\r\n```\r\n\r\n#### Limitations and bias\r\n\r\n[TODO: provide examples of latent issues and potential remediations]\r\n\r\n## Training details\r\n\r\n[TODO: describe the data used to train the model]\r\n\r\n\r\nInference:\r\nfrom huggingface_hub.repocard import RepoCard\r\nfrom diffusers import DiffusionPipeline\r\nimport torch\r\n\r\nlora_model_id = <\"lora-sdxl-dreambooth-id\">\r\ncard = RepoCard.load(lora_model_id)\r\nbase_model_id = card.data.to_dict()[\"base_model\"]\r\n\r\npipe = DiffusionPipeline.from_pretrained(base_model_id, torch_dtype=torch.float16)\r\npipe = pipe.to(\"cuda\")\r\npipe.load_lora_weights(lora_model_id)\r\nimage = pipe(\"A picture of a sks dog in a bucket\", num_inference_steps=25).images[0]\r\nimage.save(\"sks_dog.png\")\r\n\r\n\"The lora-dreambooth-sdxl-id seems to need to be uploaded, but I don't know where to obtain this ID.\"\n\n### Logs\n\n_No response_\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.32.0.dev0\r\n- Platform: Linux-5.4.0-198-generic-x86_64-with-glibc2.31\r\n- Running on Google Colab?: No\r\n- Python version: 3.12.4\r\n- PyTorch version (GPU?): 2.4.0 (True)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Huggingface_hub version: 0.26.2\r\n- Transformers version: 4.46.3\r\n- Accelerate version: 1.1.1\r\n- PEFT version: 0.7.0\r\n- Bitsandbytes version: not installed\r\n- Safetensors version: 0.4.5\r\n- xFormers version: 0.0.27.post2\r\n- Accelerator: NVIDIA RTX A6000, 49140 MiB\r\nNVIDIA RTX A6000, 49140 MiB\r\nNVIDIA RTX A6000, 49140 MiB\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\n\n### Who can help?\n\n@hlky ",
    "url": "https://github.com/huggingface/diffusers/issues/10223",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-12-14T06:34:56Z",
    "updated_at": "2025-02-07T15:03:24Z",
    "comments": 5,
    "user": "Zarato2122"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1424,
    "title": "Misaligned AOTI input; potential perf gains by fixing?",
    "body": "### \ud83d\udc1b Describe the bug\n\nPicked up in https://github.com/pytorch/torchchat/pull/1367, and worked around via https://github.com/pytorch/pytorch/pull/143236, it appears the input to the torchchat AOTI runner is not 16 byte aligned. \r\n\r\nWhile the PR from pytorch/pytorch eases this constraint, this may be indicative of potential perf losses (common of misalignment)\r\n\r\nhattip to @malfet for suggesting line of investigation\n\n### Versions\n\nhttps://github.com/pytorch/torchchat/commit/bb72b096b14f0c9753070f3523e43ed58aa55178",
    "url": "https://github.com/pytorch/torchchat/issues/1424",
    "state": "open",
    "labels": [
      "bug",
      "actionable",
      "Compile / AOTI",
      "triaged"
    ],
    "created_at": "2024-12-14T01:11:30Z",
    "updated_at": "2024-12-17T23:35:29Z",
    "comments": 1,
    "user": "Jack-Khuu"
  },
  {
    "repo": "pytorch/xla",
    "number": 8492,
    "title": "How to do multi-machine SPMD/FSDPv2 training with TPU\uff1f",
    "body": "## \u2753 Questions and Help\r\n\r\nI saw https://github.com/pytorch/xla/issues/6362 but there's no example training script found? For example, if I have multiple TPU v3-8 VMs, how would I achieve this with SPMD/FSDPv2?\r\n\r\nI'm currently sending the commands to all TPU VMs this way:\r\n```\r\npython3.10 podrun --include-local -- hostname\r\n```",
    "url": "https://github.com/pytorch/xla/issues/8492",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2024-12-13T18:47:39Z",
    "updated_at": "2025-05-05T12:34:29Z",
    "user": "radna0"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 575,
    "title": "Gello dataset converter",
    "body": "I made a converter for the [Gello](https://wuphilipp.github.io/gello_site/) dataset format (pickles containing dicts with all the observations). \r\n\r\nIf this is of interest, I am willing to contribute it back here. \r\n\r\nThe current code can be found [here](https://github.com/tlpss/lerobot/blob/tlpss-dev/lerobot/common/datasets/push_dataset_to_hub/gello_pkl_format.py). It needs some cleanup and maybe a convenient way to specify the mapping of dict keys in case you have a different number of cameras or other sensors. Wanted to see if there is any interest in this, before I make the effort to clean it up.",
    "url": "https://github.com/huggingface/lerobot/issues/575",
    "state": "closed",
    "labels": [
      "enhancement",
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2024-12-13T15:47:58Z",
    "updated_at": "2025-10-08T08:50:40Z",
    "user": "tlpss"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10207,
    "title": "KolorsPipeline does not support from_single_file",
    "body": "from diffusers import KolorsPipeline\r\nKolorsPipeline.from_single_file(\"models/kolrs-8steps.safetensors\")\r\n \r\n\r\nHow does KolorsPipeline load a single file model?",
    "url": "https://github.com/huggingface/diffusers/issues/10207",
    "state": "open",
    "labels": [
      "stale",
      "single_file"
    ],
    "created_at": "2024-12-13T09:44:46Z",
    "updated_at": "2025-01-12T15:02:46Z",
    "comments": 3,
    "user": "Thekey756"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3134,
    "title": "How to set a proper batchsize when using CachedMultipleNegativesRankingLoss?",
    "body": "When using the [MultipleNegativesRankingLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss), I tried different batchsize(per_device_train_batch_size) setting, and found that 512 was the maximum. When batchsize was greater than 512, GPU memory OOM was happened.\r\n\r\nAs stated in the document of [CachedMultipleNegativesRankingLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cachedmultiplenegativesrankingloss):\r\n\r\n>  GradCache is a smart way to solve this problem. It achieves the goal by dividing the computation into two stages of embedding and loss calculation, which both can be scaled by mini-batches. As a result, memory of constant size (e.g. that works with batch size = 32) can now process much larger batches (e.g. 65536).\r\n\r\nSo, I tried CachedMultipleNegativesRankingLoss, and the mini_batch_size of CachedMultipleNegativesRankingLoss can go as high as 2048. mini_batch_size greather than 2048 will cause GPU memory OOM. \r\n\r\nNevertheless, When setting the mini_batch_size as 2048, I can still increase the global batchsize(per_device_train_batch_size). Generally speaking, larger batchsize will achieve better performance in the constrastive learning settings. So, I tried different batchsize(per_device_train_batch_size), and found it can be as large as 1048576 and it won't cause GPU memory OOM (but the GPU utilization is 100%). So, I am wondering how to set a proper batchsize(per_device_train_batch_size), can it be infinite big?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3134",
    "state": "open",
    "labels": [],
    "created_at": "2024-12-13T09:25:34Z",
    "updated_at": "2024-12-27T13:46:17Z",
    "user": "awmoe"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3133,
    "title": "How to avoid the long time waiting before start training?",
    "body": "Dear developer,\r\n\r\nThanks for the great sentence-transformers library!\r\n\r\nI am finetuning the [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2)  using my own data following the tutorial from: https://sbert.net/docs/sentence_transformer/training_overview.html\r\n\r\nI first finetuned it with a toy dataset containing only hundreds of triplet sentence samples, and everything was ok, and the finetuning was very fast.\r\n\r\nAfter that, I finetuned it with the formal big dataset containing 100 million triplet sentence samples. I found that it had to wait a long time (about 60 minutes) to start training. And when the data is bigger, the waiting time is longer.\r\n\r\nSpecifically:\r\n\r\n1.  It first spent 5 minutes to `Generating train split`.\r\n2. Then spent 30 minutes to dataset mapping. \r\n3. After that, it printed `Detected kernel version 4.18.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.`.\r\n4. and waiting about 60 minutes to start the real training.\r\n\r\nDuring the 60 minutes, I found that the GPU was working but the GPU utilization rate was relatively low (30%) and the GPU memory was not used. What's more, during the 60 minutes, no any log information was printed. Was it doing something like data preparation or tokenization? Could you tell me what was it doing, and how to avoid this long waiting time?\r\n\r\nAfter the 60-minute waiting, it started the real training, and the GPU utilization rate was as high as 80%, and the GPU memory was used around 70GB on H100. What's more, the training progress bar was printing similar as `x/y [69:08:34<130:13:54,  1.09it/s]`. So that I knew it was training.\r\n\r\nI also have another dataset which is 10 times larger than 100 million triplet sentence samples, I worry that I have to wait days to starting the training if I use the huge dataset. \r\n\r\nCould you tell me what was it doing during the 60-minute waiting, and how to avoid this long waiting time?\r\n\r\nThank you very much and look forward to your reply.\r\n\r\n",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3133",
    "state": "open",
    "labels": [],
    "created_at": "2024-12-13T09:10:32Z",
    "updated_at": "2024-12-25T03:46:50Z",
    "user": "awmoe"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 735,
    "title": "[question]FSDP2 have more peak active memory/reserved memory than FSDP1",
    "body": "## Environment\r\nOS: Ubuntu\r\nGPU: 8x GPU\r\ntorch: torch-2.6.0.dev20241212+cu124\r\nDDP: 4-way Tensor Parallel * 2-way FSDP\r\n\r\n## Problem\r\nI'm using FSDP+TP in my model and follow torchtitan code. when I switch fsdp1 to fsdp2, the memory usage showed by `nvidia-smi` increases by 10GB, also the peak active memory is greatly larger than fsdp1. is this expected? Which metric should be cared in `memory_summary` to avoid OOM?\r\n\r\nhere is the result from `torch.cuda.memory_summary()`. Following tables are generated when **first step is end**.\r\n\r\n* fsdp2\r\n```\r\n|===========================================================================|\r\n|                  PyTorch CUDA memory summary, device ID 0                 |\r\n|---------------------------------------------------------------------------|\r\n|            CUDA OOMs: 0            |        cudaMalloc retries: 0         |\r\n|===========================================================================|\r\n|        Metric         | Cur Usage  | Peak Usage | Tot Alloc  | Tot Freed  |\r\n|---------------------------------------------------------------------------|\r\n| Allocated memory      |  13975 MiB |  18803 MiB |   2142 GiB |   2128 GiB |\r\n|       from large pool |  13959 MiB |  18790 MiB |   2140 GiB |   2127 GiB |\r\n|       from small pool |     16 MiB |     17 MiB |      1 GiB |      1 GiB |\r\n|---------------------------------------------------------------------------|\r\n| Active memory         |  13975 MiB |  39454 MiB |   2142 GiB |   2128 GiB |\r\n|       from large pool |  13959 MiB |  39437 MiB |   2140 GiB |   2127 GiB |\r\n|       from small pool |     16 MiB |     18 MiB |      1 GiB |      1 GiB |\r\n|---------------------------------------------------------------------------|\r\n| Requested memory      |  13792 MiB |  39306 MiB |   2138 GiB |   2125 GiB |\r\n|       from large pool |  13775 MiB |  39289 MiB |   2137 GiB |   2124 GiB |\r\n|       from small pool |     16 MiB |     18 MiB |      1 GiB |      1 GiB |\r\n|---------------------------------------------------------------------------|\r\n| GPU reserved memory   |  45590 MiB |  45590 MiB |  45590 MiB |      0 B   |\r\n|       from large pool |  45566 MiB |  45566 MiB |  45566 MiB |      0 B   |\r\n|       from small pool |     24 MiB |     24 MiB |     24 MiB |      0 B   |\r\n|---------------------------------------------------------------------------|\r\n| Non-releasable memory | 377331 KiB |   7818 MiB |   1017 GiB |   1017 GiB |\r\n|       from large pool | 375788 KiB |   7813 MiB |   1016 GiB |   1016 GiB |\r\n|       from small pool |   1543 KiB |     10 MiB |      1 GiB |      1 GiB |\r\n|---------------------------------------------------------------------------|\r\n| Allocations           |    4735    |    4738    |   34212    |   29477    |\r\n|       from large pool |    1504    |    1507    |   15954    |   14450    |\r\n|       from small pool |    3231    |    3348    |   18258    |   15027    |\r\n|---------------------------------------------------------------------------|\r\n| Active allocs         |    4735    |    4738    |   34212    |   29477    |\r\n|       from large pool |    1504    |    1507    |   15954    |   14450    |\r\n|       from small pool |    3231    |    3348    |   18258    |   15027    |\r\n|---------------------------------------------------------------------------|\r\n| GPU reserved segments |     304    |     304    |     304    |       0    |\r\n|       from large pool |     292    |     292    |     292    |       0    |\r\n|       from small pool |      12    |      12    |      12    |       0    |\r\n|---------------------------------------------------------------------------|\r\n| Non-releasable allocs |      15    |     135    |   15054    |   15039    |\r\n|       from large pool |      13    |      89    |    9160    |    9147    |\r\n|       from small pool |       2    |      65    |    5894    |    5892    |\r\n|---------------------------------------------------------------------------|\r\n| Oversize allocations  |       0    |       0    |       0    |       0    |\r\n|---------------------------------------------------------------------------|\r\n| Oversize GPU segments |       0    |       0    |       0    |       0    |\r\n|===========================================================================|\r\n```\r\n\r\n* fsdp1\r\n```\r\n|===========================================================================|\r\n|                  PyTorch CUDA memory summary, device ID 0                 |\r\n|---------------------------------------------------------------------------|\r\n|            CUDA OOMs: 0            |        cudaMalloc retries: 0         |\r\n|===========================================================================|\r\n|        Metric         | Cur Usage  | Peak Usage | Tot Alloc  | Tot Freed  |\r\n|---------------------------------------------------------------------------|\r\n| Allocated memory      |  13947 MiB |  18561 MiB |   2156 GiB |   2142 GiB |\r\n|       from large pool |  13937 MiB |  18556 MiB |   2155 GiB |   2141 GiB |\r\n|",
    "url": "https://github.com/pytorch/torchtitan/issues/735",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-12-13T08:42:49Z",
    "updated_at": "2024-12-18T11:31:23Z",
    "user": "FindDefinition"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 734,
    "title": "using fsdp2 wrapper Flux(text to image) model , gradient  is inconsistent with fsdp1",
    "body": "i use register_full_backward_hook print grad when backward like this way:\r\n```\r\ndef print_grad_hook(name):\r\n    def hook(module, grad_input, grad_output):\r\n        print(f\"Layer Name: {name},Grad input: {grad_input},Grad output: {grad_output}\")\r\n    return hook\r\nfor name, layer in model.named_children():\r\n    layer.register_full_backward_hook(print_grad_hook(name))\r\n```\r\nbut i discover last layer's grad is inconsistent between fsdp1 and fsdp2.\uff08'Grad output ' is consistent\uff09                     \r\n```\r\nfsdp1 grad:\r\nLayer Name: proj_out,Grad input: (tensor([[[-1.4901e-08,  2.2445e-07,  5.4250e-08,   ...,  3.7812e-07,\r\n           4.0606e-07, -3.8184e-07]]], device='cuda:0'),),Grad output: (tensor([[[-2.3991e-06,  2.3693e-06,  1.3947e-05,  ..., \r\n           4.0233e-07,  8.0466e-07]]], device='cuda:0', dtype=torch.bfloat16),)\r\n\r\nfsdp2 grad:\r\nLayer Name: proj_out,Grad input: (tensor([[[-0.0000e+00,  2.3842e-07,  5.9605e-08,  ...,  8.9407e-07,\r\n           4.1723e-07, -3.5763e-07]]], device='cuda:0'),),Grad output: (tensor([[[-2.3991e-06,  2.3693e-06,  1.3947e-05,  ..., \r\n           4.0233e-07,  8.0466e-07]]], device='cuda:0', dtype=torch.bfloat16),)\r\n```\r\nBelow is my code to wrapper flux model\uff0cCurrently I'm not using compile and activation checkpointing\r\n```\r\nfor layer_id, transformer_block in model.transformer_blocks.named_children():\r\n        if pp_enabled:\r\n            # For PP, do not reshard after forward to avoid per-microbatch\r\n            # all-gathers, which can be expensive and non-overlapped\r\n            reshard_after_forward = False\r\n        else:\r\n            # As an optimization, do not reshard after forward for the last\r\n            # transformer block since FSDP would prefetch it immediately\r\n            reshard_after_forward = True\r\n        fully_shard(\r\n            transformer_block,\r\n            **fsdp_config,\r\n            reshard_after_forward=reshard_after_forward,\r\n        )\r\n    for layer_id, transformer_block in model.single_transformer_blocks.named_children():\r\n        if pp_enabled:\r\n            # For PP, do not reshard after forward to avoid per-microbatch\r\n            # all-gathers, which can be expensive and non-overlapped\r\n            reshard_after_forward = False\r\n        else:\r\n            # As an optimization, do not reshard after forward for the last\r\n            # transformer block since FSDP would prefetch it immediately\r\n            reshard_after_forward = int(layer_id) < len(model.single_transformer_blocks) - 1\r\n        fully_shard(\r\n            transformer_block,\r\n            **fsdp_config,\r\n            reshard_after_forward=reshard_after_forward,\r\n        )\r\n    fully_shard(model, **fsdp_config, reshard_after_forward=not pp_enabled)\r\n```",
    "url": "https://github.com/pytorch/torchtitan/issues/734",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-12-13T07:59:32Z",
    "updated_at": "2025-08-21T02:58:13Z",
    "user": "yanmj0601"
  },
  {
    "repo": "huggingface/lighteval",
    "number": 447,
    "title": "[BUG] how to eval large scale model use 1dp+8pp?",
    "body": "## Describe the bug\r\nI tired to eval a large scale model use1dp+8pp with accelerate. I use the command like the following:\r\n```\r\naccelerate launch --multi_gpu --num_processes=1 run_evals_accelerate.py \\\r\n    --model_args=\"pretrained=<path to model on the hub>\" \\\r\n    --model_parallel \\\r\n    --tasks <task parameters> \\\r\n    --output_dir output_dir\r\n```\r\nThe error is ```ValueError: You need to use at least 2 processes to use --multi_gpu```\r\n\r\nHow to solve this problem?\r\n\r\n## Version info\r\nlighteval-0.3.0\r\n",
    "url": "https://github.com/huggingface/lighteval/issues/447",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-12-13T03:56:36Z",
    "updated_at": "2025-01-02T11:20:20Z",
    "user": "mxjmtxrm"
  },
  {
    "repo": "pytorch/vision",
    "number": 8803,
    "title": "OpenGL interoperability",
    "body": "### \ud83d\ude80 The feature\n\nZero-copy transfer of data between PyTorch and OpenGL on GPU by including \"OpenGL interoperability\" from CUDA in torchvision.\n\n### Motivation, pitch\n\nI am working on a real-time machine learning graphics project which uses OpenGL both as an intermediate processing step in the model and to visualize the output. Right now transfer of data between PyTorch and OpenGL is a problem for both training and inference.\r\nWithout any additional packages i can copy data from PyTorch CUDA to CPU and then back to OpenGL on GPU, this is very simple but slow. \r\nI can instead use some cuda bindings for python and a separate CUDA Toolkit installation to avoid the data transfer but this is quite complex and there are many competing ways and tools for doing this which makes it hard to navigate.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\nThe 2 main ways I have been using OpenGL from python are with the packages `moderngl` and `PyOpenGL`.",
    "url": "https://github.com/pytorch/vision/issues/8803",
    "state": "open",
    "labels": [],
    "created_at": "2024-12-12T16:04:11Z",
    "updated_at": "2024-12-12T16:04:11Z",
    "comments": 0,
    "user": "cajoek"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10196,
    "title": "How to finetune Flux-dev full params, 80G OOM ...",
    "body": "I am using the [train_dreambooth_flux](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_flux.py) script to fine-tune the `flux-dev` model with full parameters using DeepSpeed Stage 2. However, I am still encountering out-of-memory issues on an 80GB GPU. Are there any solutions available to address this problem? Thanks!",
    "url": "https://github.com/huggingface/diffusers/issues/10196",
    "state": "open",
    "labels": [
      "training"
    ],
    "created_at": "2024-12-12T09:24:18Z",
    "updated_at": "2025-08-20T13:19:20Z",
    "user": "huangjun12"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1627,
    "title": "Cookie \u201chf-chat\u201d has been rejected because there is an existing \u201csecure\u201d cookie.",
    "body": "## Bug description\r\n\r\nI use `ghcr.io/huggingface/chat-ui-db:latest` to host `ChatUI` in docker. If `PUBLIC_ORIGIN=\"http://localhost\"` in `.env.local` and visit `ChatUI` through `http://localhost:3000`, it works well. Then I try to replace `localhost` by my domain name `qiangwulab.sjtu.edu.cn`. For the sake of testing, I modify `/etc/hosts` so that `qiangwulab.sjtu.edu.cn` is resolved to `127.0.0.1`. I visit `ChatUI` through `http://qiangwulab.sjtu.edu.cn:3000`. It does not work with a similar page as in https://github.com/huggingface/chat-ui/issues/1057. The firefox console shows\r\n```\r\nCookie \u201chf-chat\u201d has been rejected because a non-HTTPS cookie can\u2019t be set as \u201csecure\u201d.\r\n```\r\nhttps://github.com/huggingface/chat-ui/issues/1057 says that I should use `ALLOW_INSECURE_COOKIES=true`. It still does not work, and the firefox console shows\r\n```\r\nCookie \u201chf-chat\u201d has been rejected because there is an existing \u201csecure\u201d cookie.\r\n```\r\n`ALLOW_INSECURE_COOKIES=true` seems to be Legacy. Thus, I also tried `COOKIE_SAMESITE=\"lax\"` and `COOKIE_SECURE=false`. The effect is the same. The firefox console shows\r\n```\r\nCookie \u201chf-chat\u201d has been rejected because there is an existing \u201csecure\u201d cookie.\r\n```\r\nIs it possible to use `http` for domain name other than `localhost`?\r\n\r\n## Steps to reproduce\r\n\r\n<!-- Steps to reproduce the issue -->\r\n\r\n## Screenshots\r\n\r\n<!-- If applicable, add screenshots to help explain your problem. -->\r\n\r\n## Context\r\n\r\n### Logs\r\n\r\n<!-- Add any logs that are relevant to your issue. Could be browser or server logs. Wrap in code blocks. -->\r\n\r\n```\r\n// logs here if relevant\r\n```\r\n\r\n### Specs\r\n\r\n- **OS**: ubuntu 24.04\r\n- **Browser**: firefox\r\n- **chat-ui commit**: ghcr.io/huggingface/chat-ui-db:latest\r\n\r\n### Config\r\n\r\n<!-- Add the environment variables you've used to setup chat-ui, making sure to redact any secrets. -->\r\n\r\n## Notes\r\n\r\n<!-- Anything else relevant to help the issue get solved -->\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1627",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-12-12T07:04:26Z",
    "updated_at": "2024-12-12T07:04:26Z",
    "comments": 0,
    "user": "ljw20180420"
  },
  {
    "repo": "pytorch/xla",
    "number": 8486,
    "title": "2 questions for the composite op feature",
    "body": "## \u2753 Questions and Help\r\nGlad to see that the [composite op feature](https://github.com/pytorch/xla/blob/master/docs/source/features/stablehlo.md#preserving-high-level-pytorch-operations-in-stablehlo-by-generating-stablehlocomposite) is added to Torch-XLA. I have tried this feature and got some questions, hope to get answers/suggestions here:\r\n1. Some redundant IRs (start from `custom_call`) can't be erased after created the composite op, e.g. `Gelu`:\r\n```python\r\nimport torch\r\nimport torch_xla\r\nimport torch_xla.core.xla_model as xm\r\n\r\nfrom torch_xla import stablehlo\r\nfrom torch_xla.experimental.mark_pattern_utils import StableHLOCompositeBuilder\r\n\r\nclass Example(torch.nn.Module):\r\n    def __init__(self):\r\n        super(Example, self).__init__()\r\n        self.gelu = torch.nn.GELU(approximate=\"none\")\r\n        self.composite_op = StableHLOCompositeBuilder(\"composite.gelu\", {\"approximate\": \"none\"})\r\n\r\n    def forward(self, x):\r\n        x = self.composite_op.mark_inputs(x)\r\n        y = self.gelu(x)\r\n        y = self.composite_op.mark_outputs(y)\r\n        return y\r\n\r\nx = torch.randn(10, device=xm.xla_device())\r\nmodel = Example().to(xm.xla_device())\r\nprint(model(x))\r\n\r\ninput_args = (x, )\r\nexported = torch.export.export(model, input_args)\r\n# print(exported.graph)\r\nstablehlo_gm = stablehlo.exported_program_to_stablehlo(exported)\r\nstablehlo = stablehlo_gm.get_stablehlo_text()\r\nprint(stablehlo)\r\n```\r\nThe generated StableHLO is:\r\n```mlir\r\nmodule @IrToHlo.16 attributes {mhlo.cross_program_prefetches = [], mhlo.input_output_alias = [], mhlo.is_dynamic = false, mhlo.use_auto_spmd_partitioning = false} {\r\n  func.func @main(%arg0: tensor<10xf32>) -> tensor<10xf32> {\r\n    %cst = stablehlo.constant dense<0.707106769> : tensor<10xf32>\r\n    %0 = stablehlo.multiply %arg0, %cst : tensor<10xf32>\r\n    %1 = stablehlo.custom_call @mhlo.erf(%0) {mhlo.attributes = {}, mhlo.version = 1 : i64} : (tensor<10xf32>) -> tensor<10xf32>\r\n    %2 = stablehlo.composite \"composite.gelu\" %arg0 {composite_attributes = {approximate = \"none\"}, decomposition = @composite.gelu.impl} : (tensor<10xf32>) -> tensor<10xf32>\r\n    return %2 : tensor<10xf32>\r\n  }\r\n  func.func private @composite.gelu.impl(%arg0: tensor<10xf32>) -> tensor<10xf32> {\r\n    %cst = stablehlo.constant dense<1.000000e+00> : tensor<10xf32>\r\n    %cst_0 = stablehlo.constant dense<0.707106769> : tensor<10xf32>\r\n    %cst_1 = stablehlo.constant dense<5.000000e-01> : tensor<10xf32>\r\n    %0 = stablehlo.multiply %arg0, %cst_1 : tensor<10xf32>\r\n    %1 = stablehlo.multiply %arg0, %cst_0 : tensor<10xf32>\r\n    %2 = stablehlo.custom_call @mhlo.erf(%1) {mhlo.attributes = {}, mhlo.version = 1 : i64} : (tensor<10xf32>) -> tensor<10xf32>\r\n    %3 = stablehlo.add %2, %cst : tensor<10xf32>\r\n    %4 = stablehlo.multiply %0, %3 : tensor<10xf32>\r\n    return %4 : tensor<10xf32>\r\n  }\r\n}\r\n```\r\nThe `erf` op in `main` is useless and not erased. I have checked the [composite op pass](https://github.com/pytorch/xla/blob/master/torch_xla/csrc/runtime/stablehlo_composite_helper.cc#L514-L519), it left these useless ops to later `canonicalizer` instead of erasing directly, but the `canonicalizer` didn't handle it... I guess it's caused by the custom call side-effect.\r\n\r\n**The question**: Can the composite op pass erase these ops directly? Is any special reason to avoid the erasing operation here?\r\n\r\n2. Composite op feature can't work in training. Even the proposal of this feature is for inference now (work for export API), I tried to enabled it in training locally, but I found that it reported a warning:\r\n> UserWarning: xla::mark_tensor: an autograd kernel was not registered to the Autograd key(s) but we are trying to backprop through it. This may lead to silently incorrect behavior. This behavior is deprecated and will be removed in a future version of PyTorch. If your operator is differentiable, please ensure you have registered an autograd kernel to the correct Autograd key (e.g. DispatchKey::Autograd, DispatchKey::CompositeImplicitAutograd). If your operator is not differentiable, or to squash this warning and use the previous behavior, please register torch::CppFunction::makeFallthrough() to DispatchKey::Autograd. (Triggered internally at /data4/home/luteng/code/pytorch/torch/csrc/autograd/autograd_not_implemented_fallback.cpp:62.)\r\n  return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass\r\n\r\nThen the backward graph is not generated.\r\n\r\n**The question**: Is any plan to support composite op feature in training? It seems the missing part is only to add the Autograd for `mark_tensor`, but I'm just a XLA developer and not familiar with PyTorch, I don't know how to add it...",
    "url": "https://github.com/pytorch/xla/issues/8486",
    "state": "closed",
    "labels": [
      "question",
      "stablehlo"
    ],
    "created_at": "2024-12-12T02:37:57Z",
    "updated_at": "2025-05-05T12:32:51Z",
    "user": "Zantares"
  },
  {
    "repo": "pytorch/ao",
    "number": 1403,
    "title": "ImportError: cannot import name 'weight_only_quant_qconfig' from 'torchao.quantization' (R:\\CogVideoX_v3\\CogVideo\\venv\\Lib\\site-packages\\torchao\\quantization\\__init__.py)",
    "body": "I am trying to use [CogVideoX1.5-5B-I2V](https://huggingface.co/THUDM/CogVideoX1.5-5B-I2V) with following\r\n\r\nI am on Windows\r\n\r\nEverything installed but still getting this error - version 0.7.0\r\n\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"R:\\CogVideoX_v3\\CogVideo\\inference\\gradio_composite_demo\\app.py\", line 40, in <module>\r\n    from torchao.quantization import quantize_, int8_weight_only, weight_only_quant_qconfig\r\nImportError: cannot import name 'weight_only_quant_qconfig' from 'torchao.quantization' (R:\\CogVideoX_v3\\CogVideo\\venv\\Lib\\site-packages\\torchao\\quantization\\__init__.py)\r\nPress any key to continue . . .\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```\r\n\r\nimport torch\r\nfrom diffusers import AutoencoderKLCogVideoX, CogVideoXTransformer3DModel, CogVideoXImageToVideoPipeline\r\nfrom diffusers.utils import export_to_video, load_image\r\nfrom transformers import T5EncoderModel\r\nfrom torchao.quantization import quantize_, int8_weight_only\r\n\r\nquantization = int8_weight_only\r\n\r\ntext_encoder = T5EncoderModel.from_pretrained(\"THUDM/CogVideoX1.5-5B-I2V\", subfolder=\"text_encoder\",\r\n                                              torch_dtype=torch.bfloat16)\r\nquantize_(text_encoder, quantization())\r\n\r\ntransformer = CogVideoXTransformer3DModel.from_pretrained(\"THUDM/CogVideoX1.5-5B-I2V\", subfolder=\"transformer\",\r\n                                                          torch_dtype=torch.bfloat16)\r\nquantize_(transformer, quantization())\r\n\r\nvae = AutoencoderKLCogVideoX.from_pretrained(\"THUDM/CogVideoX1.5-5B-I2V\", subfolder=\"vae\", torch_dtype=torch.bfloat16)\r\nquantize_(vae, quantization())\r\n\r\n# Create pipeline and run inference\r\npipe = CogVideoXImageToVideoPipeline.from_pretrained(\r\n    \"THUDM/CogVideoX1.5-5B-I2V\",\r\n    text_encoder=text_encoder,\r\n    transformer=transformer,\r\n    vae=vae,\r\n    torch_dtype=torch.bfloat16,\r\n)\r\n\r\npipe.enable_model_cpu_offload()\r\npipe.vae.enable_tiling()\r\npipe.vae.enable_slicing()\r\n\r\nprompt = \"A little girl is riding a bicycle at high speed. Focused, detailed, realistic.\"\r\nimage = load_image(image=\"input.jpg\")\r\nvideo = pipe(\r\n    prompt=prompt,\r\n    image=image,\r\n    num_videos_per_prompt=1,\r\n    num_inference_steps=50,\r\n    num_frames=81,\r\n    guidance_scale=6,\r\n    generator=torch.Generator(device=\"cuda\").manual_seed(42),\r\n).frames[0]\r\n\r\nexport_to_video(video, \"output.mp4\", fps=8)\r\n```",
    "url": "https://github.com/pytorch/ao/issues/1403",
    "state": "closed",
    "labels": [
      "question",
      "triaged"
    ],
    "created_at": "2024-12-11T23:43:15Z",
    "updated_at": "2024-12-12T01:45:57Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10190,
    "title": "How to use fluxfill to repalce background\uff1f",
    "body": "I want to use fluxfill to change the background, but I find that the prompt words are almost useless, and the output image is more like the original image.  \r\nI have tested multiple guidance_scale parameters, but found that the resulting image is more related to the original image, and less related to the prompt word.",
    "url": "https://github.com/huggingface/diffusers/issues/10190",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-11T10:48:27Z",
    "updated_at": "2025-05-23T12:12:28Z",
    "user": "babyta"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3132,
    "title": "How to train a model with DDP for TSDAE",
    "body": "hello, I want to train a model using TSDAE method.\r\n\r\nIs there any way to train with DDP(Multi-GPU)?\r\n\r\nI already read your sample code. \r\nBut I'm not sure how to apply DenoisingAutoEncoderDataset in SentenceTransformerTrainer.\r\n([[v3] Training refactor - MultiGPU, loss logging, bf16, etc](https://github.com/UKPLab/sentence-transformers/pull/2449))",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3132",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-11T10:39:30Z",
    "updated_at": "2024-12-11T14:04:32Z",
    "user": "OnAnd0n"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3317,
    "title": "\u2753 [Question] Jetson AGX Orin Install in Jetpack 6.1 Build did NOT complete successfully",
    "body": "## \u2753 Question\r\n\r\nI follow this [tutorial](https://pytorch.org/TensorRT/getting_started/installation.html) to install Torch-TensorRT, but in the last step:\r\n```\r\n# build and install torch_tensorrt wheel file\r\npython setup.py --use-cxx11-abi install --user\r\n```\r\nsome errors happened:\r\n```\r\nusing CXX11 ABI build\r\nJetpack version: 6.1\r\nbuilding libtorchtrt cmd=['/usr/bin/bazel', 'build', '//:libtorchtrt', '--compilation_mode=opt', '--distdir=third_party/dist_dir/x86_64-linux-gnu', '--config=linux', '--platforms=//toolchains:jetpack_6.1']\r\nDEBUG: /home/lab223/.cache/bazel/_bazel_lab223/3fb6c16c20f38dfc11e57e77e6eea473/external/rules_python~/python/private/python.bzl:46:10: WARNING: Ignoring toolchain 'python_3_11' from module 'rules_pkg': Toolchain 'python_3_11' from module 'torch_tensorrt' already registered Python version 3.11 and has precedence\r\nINFO: Analyzed target //:libtorchtrt (127 packages loaded, 13849 targets configured).\r\nERROR: /home/lab223/TensorRT/core/util/BUILD:60:11: Compiling core/util/Exception.cpp failed: (Exit 1): gcc failed: error executing CppCompile command (from target //core/util:exception) /home/lab223/anaconda3/envs/rnw/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 25 arguments skipped)\r\n\r\nUse --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging\r\ngcc: fatal error: cannot execute 'cc1plus': execvp: No such file or directory\r\ncompilation terminated.\r\nTarget //:libtorchtrt failed to build\r\nUse --verbose_failures to see the command lines of failed build steps.\r\nINFO: Elapsed time: 8.444s, Critical Path: 4.05s\r\nINFO: 329 processes: 329 internal.\r\nERROR: Build did NOT complete successfully\r\n```\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): **2.5.0**\r\n - CPU Architecture: **arm64(Jetson AGX Orin)**\r\n - OS (e.g., Linux): **Linux**\r\n - How you installed PyTorch: **pip**\r\n - Build command you used (if compiling from source): **python setup.py --use-cxx11-abi install --user**\r\n - Are you using local sources or building from archives: **building from archives**\r\n - Python version: **3.10.15**\r\n - CUDA version: **12.6**\r\n - GPU models and configuration: -\r\n - Any other relevant information: Install torch_tensorrt in the model's anaconda virtual environment\r\n\r\n## Additional context\r\n\r\nplease help me!thanks!!!!\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3317",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-12-11T09:21:09Z",
    "updated_at": "2024-12-18T19:16:46Z",
    "user": "breknddone"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10180,
    "title": "Can't load multiple loras when using Flux Control LoRA ",
    "body": "### Describe the bug\n\nI was trying out the FluxControlPipeline with the Control LoRA introduced in #9999 , but had issues loading in multiple loras. \r\n\r\nFor example, if I load the depth lora first and then the 8-step lora, it errors on the 8-step lora, and if I load the 8-step lora first and then the depth lora, it errors when loading the depth lora. \r\n\r\n\n\n### Reproduction\n\n```\r\nfrom diffusers import FluxControlPipeline\r\nfrom huggingface_hub import hf_hub_download\r\nimport torch\r\n\r\ncontrol_pipe = FluxControlPipeline.from_pretrained(\"black-forest-labs/FLUX.1-dev\", torch_dtype=torch.bfloat16).to(\"cuda\")\r\ncontrol_pipe.load_lora_weights(\"black-forest-labs/FLUX.1-Depth-dev-lora\")\r\ncontrol_pipe.load_lora_weights(hf_hub_download(\"ByteDance/Hyper-SD\", \"Hyper-FLUX.1-dev-8steps-lora.safetensors\"))\r\n\r\n```\n\n### Logs\n\n```shell\nAttributeError                            Traceback (most recent call last)\r\nCell In[6], line 8\r\n      5 control_pipe = FluxControlPipeline.from_pretrained(\"black-forest-labs/FLUX.1-dev\", torch_dtype=torch.bfloat16).to(\"cuda\")\r\n      7 control_pipe.load_lora_weights(\"black-forest-labs/FLUX.1-Depth-dev-lora\")\r\n----> 8 control_pipe.load_lora_weights(\r\n      9         hf_hub_download(\r\n     10             \"ByteDance/Hyper-SD\", \"Hyper-FLUX.1-dev-8steps-lora.safetensors\"\r\n     11         ),\r\n     12         adapter_name=\"HyperFlux\",\r\n     13     )\r\n\r\nFile ~/.venv/lib/python3.10/site-packages/diffusers/loaders/lora_pipeline.py:1856, in FluxLoraLoaderMixin.load_lora_weights(self, pretrained_model_name_or_path_or_dict, adapter_name, **kwargs)\r\n   1849 transformer_norm_state_dict = {\r\n   1850     k: state_dict.pop(k)\r\n   1851     for k in list(state_dict.keys())\r\n   1852     if \"transformer.\" in k and any(norm_key in k for norm_key in self._control_lora_supported_norm_keys)\r\n   1853 }\r\n   1855 transformer = getattr(self, self.transformer_name) if not hasattr(self, \"transformer\") else self.transformer\r\n-> 1856 has_param_with_expanded_shape = self._maybe_expand_transformer_param_shape_or_error_(\r\n   1857     transformer, transformer_lora_state_dict, transformer_norm_state_dict\r\n   1858 )\r\n   1860 if has_param_with_expanded_shape:\r\n   1861     logger.info(\r\n   1862         \"The LoRA weights contain parameters that have different shapes that expected by the transformer. \"\r\n   1863         \"As a result, the state_dict of the transformer has been expanded to match the LoRA parameter shapes. \"\r\n   1864         \"To get a comprehensive list of parameter names that were modified, enable debug logging.\"\r\n   1865     )\r\n\r\nFile ~/.venv/lib/python3.10/site-packages/diffusers/loaders/lora_pipeline.py:2316, in FluxLoraLoaderMixin._maybe_expand_transformer_param_shape_or_error_(cls, transformer, lora_state_dict, norm_state_dict, prefix)\r\n   2314 if isinstance(module, torch.nn.Linear):\r\n   2315     module_weight = module.weight.data\r\n-> 2316     module_bias = module.bias.data if hasattr(module, \"bias\") else None\r\n   2317     bias = module_bias is not None\r\n   2319     lora_A_weight_name = f\"{name}.lora_A.weight\"\r\n\r\nAttributeError: 'NoneType' object has no attribute 'data'\n```\n\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.32.0.dev0\r\n- Platform: Linux-5.15.0-124-generic-x86_64-with-glibc2.35\r\n- Running on Google Colab?: No\r\n- Python version: 3.10.12\r\n- PyTorch version (GPU?): 2.5.1+cu124 (True)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Huggingface_hub version: 0.26.5\r\n- Transformers version: 4.47.0\r\n- Accelerate version: 1.2.0\r\n- PEFT version: 0.14.0\r\n- Bitsandbytes version: not installed\r\n- Safetensors version: 0.4.5\r\n- xFormers version: not installed\r\n- Accelerator: NVIDIA H100 80GB HBM3, 81559 MiB\r\n- Using GPU in script?: Yes\r\n- Using distributed or parallel set-up in script?: No\n\n### Who can help?\n\n@a-r-r-o-w @sayakpaul ",
    "url": "https://github.com/huggingface/diffusers/issues/10180",
    "state": "closed",
    "labels": [
      "bug",
      "help wanted",
      "lora"
    ],
    "created_at": "2024-12-10T21:40:24Z",
    "updated_at": "2024-12-20T09:00:33Z",
    "comments": 11,
    "user": "jonathanyin12"
  },
  {
    "repo": "huggingface/transformers",
    "number": 35186,
    "title": "How to convert my Mask2Former model (ResNet-50 backbone) to Hugging Face transformer",
    "body": "### System Info\n\n```shell\n- `transformers` version: 4.34.0\r\n- Platform: Linux-6.8.0-31-generic-x86_64-with-glibc2.17\r\n- Python version: 3.8.20\r\n- Huggingface_hub version: 0.17.3\r\n- Safetensors version: 0.4.5\r\n- Accelerate version: 0.23.0\r\n- Accelerate config:    not found\r\n- PyTorch version (GPU?): 2.0.1+cu117 (True)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: No\r\n- Using distributed or parallel set-up in script?: No\n```\n\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nI found the following script, but it only supports conversion for Mask2Former model (swin backbone) https://github.com/huggingface/transformers/blob/main/src/transformers/models/mask2former/convert_mask2former_original_pytorch_checkpoint_to_pytorch.py\r\n\r\nMay I ask for some guidance on how to adjust the script so that it can support ResNet-50 architecture?\n\n### Expected behavior\n\n```shell\nConvert my Mask2Former model (ResNet-50 backbone) to Hugging Face transformer\n```\n\n\n### Checklist\n\n- [X] I have read the migration guide in the readme. ([pytorch-transformers](https://github.com/huggingface/transformers#migrating-from-pytorch-transformers-to-transformers); [pytorch-pretrained-bert](https://github.com/huggingface/transformers#migrating-from-pytorch-pretrained-bert-to-transformers))\n- [X] I checked if a related official extension example runs on my machine.",
    "url": "https://github.com/huggingface/transformers/issues/35186",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-10T19:17:22Z",
    "updated_at": "2025-01-18T08:03:21Z",
    "user": "yujunwei04"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7318,
    "title": "Introduce support for PDFs",
    "body": "### Feature request\n\nThe idea (discussed in the Discord server with @lhoestq ) is to have a Pdf type like Image/Audio/Video. For example [Video](https://github.com/huggingface/datasets/blob/main/src/datasets/features/video.py) was recently added and contains how to decode a video file encoded in a dictionary like {\"path\": ..., \"bytes\": ...} as a VideoReader using decord. We want to do the same with pdf and get a [pypdfium2.PdfDocument](https://pypdfium2.readthedocs.io/en/stable/_modules/pypdfium2/_helpers/document.html#PdfDocument).\n\n### Motivation\n\nIn many cases PDFs contain very valuable information beyond text (e.g. images, figures). Support for PDFs would help create datasets where all the information is preserved.\n\n### Your contribution\n\nI can start the implementation of the Pdf type :)",
    "url": "https://github.com/huggingface/datasets/issues/7318",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-12-10T16:59:48Z",
    "updated_at": "2024-12-12T18:38:13Z",
    "comments": 6,
    "user": "yabramuvdi"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10172,
    "title": "Raise an error when `len(gligen_images )` is not equal to `len(gligen_phrases)` in `StableDiffusionGLIGENTextImagePipeline`",
    "body": "To whom it may concern,\r\n\r\nI found that when using `StableDiffusionGLIGENTextImagePipeline`, there is no error raised when `len(gligen_images )` is not equal to `len(gligen_phrases)`. And when I dig into the source code, it seems that these two features are zipped together in a for loop during the preprocessing. I guess this will cause the longer one to be clipped unintentionally. (If my understanding is wrong, feel free to correct me.) Is there any possibility to raise an error or at least warning? Thanks in advance.\r\n\r\nSource Code: https://github.com/huggingface/diffusers/blob/v0.31.0/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py#L689\r\n\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/10172",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-10T14:25:48Z",
    "updated_at": "2024-12-11T08:59:44Z",
    "comments": 1,
    "user": "abcdefg133hi"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 568,
    "title": "Do I need two SO 100 arms to get started?",
    "body": "I have printed and assembled one arms, the follower version. Do I need two arms to record datasets and do testing?",
    "url": "https://github.com/huggingface/lerobot/issues/568",
    "state": "closed",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2024-12-10T13:31:50Z",
    "updated_at": "2025-10-08T08:45:58Z",
    "user": "rabhishek100"
  },
  {
    "repo": "pytorch/ao",
    "number": 1397,
    "title": "\"Where is the overloaded function for torch.nn.functional.linear(aqt, original_weight_tensor, bias)? \"",
    "body": "Here is an example\r\n\r\nint8_dynamic_activation_int8_weight\r\n\r\naqt: \r\n\r\nAffineQuantizedTensor(tensor_impl=PlainAQTTensorImpl(data=tensor([[   5,   -2,   24,  ...,   17,   73,   54],\r\n        [ -30,  -19,  -53,  ...,   -9,  -33,   55],\r\n        [  -7,  -20,  -28,  ...,   47,   71,  -15],\r\n        ...,\r\n        [  36,    8,   40,  ...,   13,  -10,   45],\r\n        [ -38,  -12,   47,  ...,  -22,    0,  -29],\r\n        [  20, -127,   52,  ...,   18,   27,  -36]], dtype=torch.int8)... , scale=tensor([0.0293, 0.0233, 0.0271, 0.0234, 0.0209, 0.0227, 0.0247, 0.0328, 0.0270,\r\n        0.0215, 0.0245, 0.0209, 0.0325, 0.0232, 0.0238, 0.0267, 0.0237, 0.0202,\r\n        0.0249, 0.0239, 0.0255, 0.0246, 0.0225, 0.0288, 0.0194, 0.0215, 0.0224,\r\n        0.0210, 0.0253, 0.0189, 0.0240, 0.0228, 0.0208, 0.0211, 0.0295, 0.0275,\r\n        0.0200, 0.0250, 0.0202, 0.0269, 0.0266, 0.0203, 0.0223, 0.0246, 0.0212,\r\n        0.0217, 0.0246, 0.0203, 0.0219, 0.0237, 0.0216, 0.0191, 0.0213, 0.0227,\r\n        0.0330, 0.0194, 0.0226, 0.0162, 0.0203, 0.0284, 0.0218, 0.0208, 0.0254,\r\n        0.0220, 0.0357, 0.0288, 0.0290, 0.0235, 0.0218, 0.0188, 0.0279, 0.0232,\r\n        0.0238, 0.0195, 0.0256, 0.0255, 0.0204, 0.0198, 0.0211, 0.0219, 0.0262,\r\n        0.0253, 0.0246, 0.0177, 0.0209, 0.0216, 0.0253, 0.0261, 0.0215, 0.0257,\r\n        0.0240, 0.0197, 0.0206, 0.0270, 0.0243, 0.0218, 0.0261, 0.0350, 0.0238,\r\n        0.0243])... , zero_point=tensor([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\r\n        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\r\n        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\r\n        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\r\n        0., 0., 0., 0.])... , _layout=PlainLayout()), block_size=[1, 200], shape=torch.Size([100, 200]), device=cpu, dtype=torch.float32, requires_grad=False)\r\n        \r\n        \r\noriginal_weight_tensor: \r\n\r\nAffineQuantizedTensor(tensor_impl=PlainAQTTensorImpl(data=tensor([[ 127,    0,    0,  ...,    0,    0,    0],\r\n        [ 127,    0,    0,  ...,    0,    0,    0],\r\n        [ 127,    0,    0,  ...,    0,    0,    0],\r\n        ...,\r\n        [  47,   36,  -70,  ...,   49,   71,    5],\r\n        [ 117,   -2,  -91,  ..., -112,    9,  -81],\r\n        [ -67,  -91,  114,  ...,   51,   11, -126]], dtype=torch.int8)... , scale=tensor([7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01, 7.8431e+01,\r\n        2.3313e-02, 2.3492e-02, 2.3277e-02, 2.3458e-02, 2.3438e-02, 2.3528e-02,\r\n        2.3352e-02, 2.3522e-02, 2.3500e-02, 2.3332e-02, 2.3376e-02, 2.3481e-02,\r\n        2.3275e-02, 2.3509e-02, 2.3453e-02, 2.3460e-02, 2.3525e-02, 2.3489e-02,\r\n        2.3482e-02, 2.3436e-02, 2.3499e-02, 2.3523e-02, 2.3519e-02, 2.3320e-02,\r\n        2.3503e-02, 2.3453e-02, 2.3514e-02, 2.3496e-02, 2.3330e-02, 2.3444e-02,\r\n        2.3483e-02, 2.3428e-02, 2.3495e-02, 2.3445e-02, 2.3437e-02, 2.3505e-02,\r\n        2.3338e-02, 2.3517e-0",
    "url": "https://github.com/pytorch/ao/issues/1397",
    "state": "open",
    "labels": [],
    "created_at": "2024-12-10T10:05:42Z",
    "updated_at": "2024-12-11T06:41:30Z",
    "user": "Lenan22"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 724,
    "title": "Issue: Loss Discrepancy Between FSDP1 and FSDP2 with AdamW Optimizer",
    "body": "We observed a loss discrepancy between FSDP1 and FSDP2 while training with the AdamW optimizer. Are you aware of any known issues with the AdamW optimizer and FSDP2 that might contribute to this behavior?",
    "url": "https://github.com/pytorch/torchtitan/issues/724",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-12-09T19:45:45Z",
    "updated_at": "2025-08-21T02:57:39Z",
    "user": "Teng-xu"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 723,
    "title": "Context parallelism understanding",
    "body": "Hi \r\n\r\nWe are recently testing the CP parallelism strategy, for a 2D configuration: FSDP+CP. \r\nFrom what we know, CP is to slice the sequence length, as attention kernel needs to compute the attention for the whole sequence, which means each GPU needs to gather all the sharded KV cache using some collective communication kernels. \r\n\r\nHowever, we didn't see any such kind of kernels, only found the All-Gather for parameters in pre-forward phase. \r\n![image](https://github.com/user-attachments/assets/23d89f06-ef01-4a58-b713-5864be99487e)\r\n\r\nIs there anything that we misunderstood?  please add your comments for better understanding. \r\n\r\nThanks.",
    "url": "https://github.com/pytorch/torchtitan/issues/723",
    "state": "open",
    "labels": [
      "question",
      "module: context parallel"
    ],
    "created_at": "2024-12-09T03:07:27Z",
    "updated_at": "2024-12-20T21:45:48Z",
    "user": "jinsong-mao"
  },
  {
    "repo": "huggingface/transformers",
    "number": 35152,
    "title": "how to load the weight of decoder.embed_tokens.weight seperately from the shared weight?",
    "body": "### System Info\r\n\r\n- `transformers` version: 4.46.3\r\n- Platform: Linux-6.8.0-49-generic-x86_64-with-glibc2.17\r\n- Python version: 3.8.20\r\n- Huggingface_hub version: 0.26.2\r\n- Safetensors version: 0.4.5\r\n- Accelerate version: 1.0.1\r\n- Accelerate config: \tnot found\r\n- PyTorch version (GPU?): 2.4.1+cu121 (True)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using distributed or parallel set-up in script?: <fill in>\r\n- Using GPU in script?: <fill in>\r\n- GPU type: NVIDIA RTX A4000\r\n\r\n\r\n### Who can help?\r\n\r\n@ArthurZucker @muellerzr  @SunMarc\r\n\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nwhen i use t5 1.1 on seq2seq task, which has 59744 source vocab size and only 32 target vocab size. And To correctly use softmax to calculate each token's probality and score on 32 candidates so I  set model.lm_head as below: \r\n```python\r\ntorch.nn.Linear(config.d_model,target_vocab_size=32,bias=False). \r\n\r\nAnd everything looks good when the model is training. But after training, I load the safetensor as below:\r\ncheckpoint_path = \"./resultstest/checkpoint-100\"\r\nconfig = T5Config.from_pretrained(\"./onlychangelmhead/checkpoint-100/config.json\")\r\nmodel = T5ForConditionalGeneration(config)\r\nmodel.lm_head = torch.nn.Linear(config.d_model,target_vocab_size,bias=False)\r\nstate_dict = load_file(f\"{checkpoint_path}/model.safetensors\")\r\nmodel.load_state_dict(state_dict, strict=True) \r\n```\r\n\r\nAnd the issue comes as:\r\n```\r\nTraceback (most recent call last):\r\n  File \"bs_based_on_massdic_failed.py\", line 110, in <module>\r\n    model.load_state_dict(state_dict, strict=True)\r\n  File \"/home/zhi/anaconda3/envs/peptide_completion/lib/python3.8/site-packages/torch/nn/modules/module.py\", line 2215, in load_state_dict\r\n    raise RuntimeError('Error(s) in loading state_dict for {}:\\n\\t{}'.format(\r\nRuntimeError: Error(s) in loading state_dict for T5ForConditionalGeneration:\r\n\tMissing key(s) in state_dict: \"encoder.embed_tokens.weight\". \r\n\tsize mismatch for decoder.embed_tokens.weight: copying a param with shape torch.Size([32, 768]) from checkpoint, the shape in current model is torch.Size([59744, 768]).\r\n```\r\n\r\nwhen I try to print the safetensors' shape it shows that the `lm_head. weight` looks fine as size of `[32, 768]`, but with no `decoder.embeded_tokens` or the way I load the safetensor can not load the embeded_tokens's weight from shared weight properly(I guess). So how can I fix that problem to correctly feat this model on my exact target vocab size as 32 but not same as the source vocab's size. It would be very appreciate if you can reply. Best.\r\n\r\n    \r\n\r\n### Expected behavior\r\n\r\nUse t5 1.1 to feat on 32 target vocab size task. And load the safetensor properly.",
    "url": "https://github.com/huggingface/transformers/issues/35152",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-12-08T15:46:55Z",
    "updated_at": "2025-01-22T08:03:52Z",
    "user": "SoSongzhi"
  },
  {
    "repo": "pytorch/ao",
    "number": 1390,
    "title": "AO and Automated Mixed Precision",
    "body": "Can we clarify in the readme what are the best practices to use ao at inference with a pytorch AMP trainer model/checkpoint?",
    "url": "https://github.com/pytorch/ao/issues/1390",
    "state": "open",
    "labels": [
      "topic: documentation",
      "question"
    ],
    "created_at": "2024-12-08T13:52:15Z",
    "updated_at": "2025-03-17T20:46:24Z",
    "user": "bhack"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7311,
    "title": "How to get the original dataset name with username?",
    "body": "### Feature request\r\n\r\nThe issue is related to ray data https://github.com/ray-project/ray/issues/49008 which it requires to check if the dataset is the original one just after `load_dataset` and parquet files are already available on hf hub.\r\n\r\nThe solution used now is to get the dataset name, config and split, then `load_dataset` again and check the fingerprint. But it's unable to get the correct dataset name if it contains username. So how to get the dataset name with username prefix, or is there another way to query if a dataset is the original one with parquet available?\r\n\r\n@lhoestq \r\n\r\n### Motivation\r\n\r\nhttps://github.com/ray-project/ray/issues/49008\r\n\r\n### Your contribution\r\n\r\nWould like to fix that.",
    "url": "https://github.com/huggingface/datasets/issues/7311",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-12-08T07:18:14Z",
    "updated_at": "2025-01-09T10:48:02Z",
    "user": "npuichigo"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 555,
    "title": "To bulid my own policy, but have errors TypeError: '>' not supported between instances of 'int' and 'dict'",
    "body": "I improved the act policy in lerobot framework and created a new policy named myact. I mainly did the following:\r\nCreate the my_act folder in the lerobot/common/policies/ path\r\nCreate 'configuration_my_act.py' and 'modeling_my_act.py' in the + my_act folder\r\nCreate lerobot/configs/policy/myact yaml, which is modified to ` name: myact `\r\n\r\nBut when I'm done, run the following command and get an error:\r\n\r\nxvfb-run python lerobot/scripts/train.py \\\r\n    hydra.run.dir=mypolicy/train/AlohaInsertion-v0\\\r\n    policy=myact \\\r\n    dataset_repo_id=lerobot/aloha_sim_insertion_human \\\r\n    env=aloha \\\r\n    env.task=AlohaInsertion-v0 \r\n\r\n\r\nINFO 2024-12-07 17:01:50 n/logger.py:106 Logs will be saved locally.\r\nINFO 2024-12-07 17:01:50 ts/train.py:337 make_dataset\r\nFetching 56 files: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 56/56 [00:00<00:00, 9842.48it/s]\r\nINFO 2024-12-07 17:01:56 ts/train.py:350 make_env\r\nINFO 2024-12-07 17:01:56 /__init__.py:88 MUJOCO_GL is not set, so an OpenGL backend will be chosen automatically.\r\nINFO 2024-12-07 17:01:57 /__init__.py:96 Successfully imported OpenGL backend: %s\r\nINFO 2024-12-07 17:01:57 /__init__.py:31 MuJoCo library version is: %s\r\nINFO 2024-12-07 17:02:03 ts/train.py:353 make_policy\r\n\r\nError executing job with overrides: ['policy=act', 'dataset_repo_id=lerobot/aloha_sim_insertion_human', 'env=aloha', 'env.task=AlohaInsertion-v0']\r\nTraceback (most recent call last):\r\n  File \"/root/autodl-tmp/lerobot/lerobot/scripts/train.py\", line 677, in train_cli\r\n    train(\r\n  File \"/root/autodl-tmp/lerobot/lerobot/scripts/train.py\", line 354, in train\r\n    policy = make_policy(\r\n  File \"/root/autodl-tmp/lerobot/lerobot/common/policies/factory.py\", line 105, in make_policy\r\n    policy = policy_cls(policy_cfg, dataset_stats)\r\n  File \"<string>\", line 26, in __init__\r\n  File \"/root/autodl-tmp/lerobot/lerobot/common/policies/act/configuration_act.py\", line 158, in __post_init__\r\n    if self.n_action_steps > self.chunk_size:\r\nTypeError: '>' not supported between instances of 'int' and 'dict'\r\n\r\nSet the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.\r\n\r\nAt this time, I also reported this error when I ran lerobot's act strategy. Do you know how to solve, thank you!",
    "url": "https://github.com/huggingface/lerobot/issues/555",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2024-12-07T09:10:35Z",
    "updated_at": "2025-04-07T16:08:38Z",
    "user": "zhouzhq2021"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10144,
    "title": "Why mochi diffusers video output is worse than mochi official code?",
    "body": "### Describe the bug\n\nThe quality of video is worse.\n\n### Reproduction\n\nRun the code with official prompt\n\n### Logs\n\n_No response_\n\n### System Info\n\ndiffusers@main\r\n\r\n\n\n### Who can help?\n\n@a-r-r-o-w @yiyixuxu ",
    "url": "https://github.com/huggingface/diffusers/issues/10144",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-12-07T05:53:57Z",
    "updated_at": "2025-01-07T15:38:38Z",
    "comments": 10,
    "user": "foreverpiano"
  },
  {
    "repo": "huggingface/peft",
    "number": 2264,
    "title": "Guidance Needed on Two-Stage Fine-Tuning with LoRA(SFT and DPO) for Model Adaptation",
    "body": "# I am planning to perform a two-stage fine-tuning process and need some guidance on how to proceed.\r\n\r\n\r\n## First Stage\r\n\r\n1. Load Base Model: I start by loading the base model, qwen1.5 32B.\r\n2. Apply LoRA Fine-Tuning: I then apply LoRA fine-tuning to this base model and obtain a new model state.\r\n3. Save Adapter Model: This fine-tuned model state is saved as adapter_model.safetensors, named qwen1.5_lora_sft.\r\n## Second Stage\r\n\r\n1. Load the Model from the First Stage: I load both qwen1.5 32B and qwen1.5_lora_sft. It's crucial that qwen1.5_lora_sft integrates correctly with the base model qwen1.5 32B.\r\n2. . Continue Fine-Tuning: On this model, which already includes the LoRA adapter, I continue to apply LoRA and DPO for further fine-tuning.\r\n3. Save the New Adapter Model: After fine-tuning, I need to save the new adapter state, which includes adjustments from both the original LoRA and the new DPO.\r\n\r\n## My questions are:\r\n1. How to load the model from the  base model(qwen1.5 32B) with the lora module qwen1.5_lora_sft\r\n2. How to Continue Fine-Tuning from the First Stage model, and save the lora model after dpo training with the base model(qwen1.5 32B) and only one qwen1.5_lora_sft_dpo module.( adapter_model_sft_dpo.safetensors)\r\n\r\n## What I had now\r\n1. base model, qwen1.5 32B model path\r\n2. qwen1.5_lora_sft module path:  adapter_model.safetensors\r\n## What I Need \r\n1. qwen1.5_lora_sft _dpo module:  adapter_model_sft_dpo.safetensors\r\n\r\n## This is \r\ntrain a base_model to get LoRA_weights_1\r\nbase_model_1 = merge(base_model and LoRA_weights_1)\r\ntrain base_model_1 to get LoRA_weights_2\r\nbase_model_2 = merge(base_model_1 and LoRA_weights_2)\r\n\r\nhow to split the base_model_2 into base_model and LoRA_weights_1_2\r\n\r\nThinks!",
    "url": "https://github.com/huggingface/peft/issues/2264",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-06T13:35:20Z",
    "updated_at": "2025-01-06T10:50:09Z",
    "comments": 5,
    "user": "none0663"
  },
  {
    "repo": "huggingface/transformers",
    "number": 35118,
    "title": "How to load local transformers?",
    "body": "transformers==4.47.0.dev0\r\n \r\nI want to use my local transformers. And I tried to set `sys.insert(0,'xxx/transformers/src')` and `PYTHONPATH=xxx/transformers/src`, but they doesn't work.\r\n\r\nPLZ, tell me why.",
    "url": "https://github.com/huggingface/transformers/issues/35118",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-06T10:07:57Z",
    "updated_at": "2024-12-12T04:05:08Z",
    "user": "yiyexy"
  },
  {
    "repo": "pytorch/xla",
    "number": 8466,
    "title": "Useful Q8 Kernels For TPUs/XLA Support",
    "body": "## \u2753 Questions and Help\r\nI'm looking at this repo here [KONAKONA666/q8_kernels](https://github.com/KONAKONA666/q8_kernels).\r\n\r\nThe Q8 functions are being used [is located here](https://github.com/KONAKONA666/q8_kernels/tree/main/q8_kernels/functional), the [cuda kernels here](https://github.com/KONAKONA666/q8_kernels/tree/main/csrc), and I was curious if any of these have already been implemented or integrated elsewhere? I'm not particularly familiar with porting custom kernels",
    "url": "https://github.com/pytorch/xla/issues/8466",
    "state": "open",
    "labels": [
      "question",
      "fp8"
    ],
    "created_at": "2024-12-06T07:01:59Z",
    "updated_at": "2025-02-13T15:17:36Z",
    "user": "radna0"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 552,
    "title": "Rounding to int32 makes robot less precise. Do we have a solid reason for doing this?",
    "body": "### System Info\n\n```Shell\nLatest LeRobot. MacOS\n```\n\n\n### Information\n\n- [X] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n1) Run teleoperation\r\n2) Measure preciseness with rounding and without.\r\nat lerobot/common/robot_devices/robots/manipulator.py\r\n\r\n![image](https://github.com/user-attachments/assets/c7706edd-9284-4736-9600-6c4202af11d2)\r\n\n\n### Expected behavior\n\nSmooth movement",
    "url": "https://github.com/huggingface/lerobot/issues/552",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "stale"
    ],
    "created_at": "2024-12-05T16:31:49Z",
    "updated_at": "2025-10-08T13:08:50Z",
    "user": "1g0rrr"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1696,
    "title": "How to determine the splicing logic in post_processor based on the sentence to be tokenized?",
    "body": "For example,\r\n```python\r\ndef post_processor(self, token_ids_0, token_ids_1=None):\r\n        if \"cls\" in token_ids_0:\r\n            return processors.TemplateProcessing(\r\n                      single=f\"{cls} $A {sep}\",\r\n                      pair=f\"{cls} $A {sep} $B {cls}\",\r\n                      special_tokens=[\r\n                          (cls, cls_token_id),\r\n                          (sep, sep_token_id),\r\n                      ],\r\n                  )\r\n        else:\r\n            return processors.TemplateProcessing(\r\n                        single=f\"{sep} $A {cls}\",\r\n                        pair=f\"{sep} $A {cls} $B {sep}\",\r\n                        special_tokens=[\r\n                            (cls, cls_token_id),\r\n                            (sep, sep_token_id),\r\n                        ],\r\n                    )\r\n```\r\nThx~",
    "url": "https://github.com/huggingface/tokenizers/issues/1696",
    "state": "open",
    "labels": [],
    "created_at": "2024-12-05T14:05:13Z",
    "updated_at": "2024-12-05T14:05:13Z",
    "user": "gongel"
  },
  {
    "repo": "huggingface/peft",
    "number": 2262,
    "title": "Could you provide example code for AdaLoRA finetuning decoder-only model?",
    "body": "### Feature request\n\nThe current [example of AdaLoRA](https://github.com/huggingface/peft/blob/b2922565c4c4445706a87cf7b988c828b451fe61/examples/conditional_generation/peft_adalora_seq2seq.py) is on **facebook/bart-base**.  Since AdaLoRA requires hand-crafted calculations on loss, would it be possible to provide me some hints on how can this be done when it comes to decoder-only (e.g., Llama-Instruct) LM?\r\n\r\nSpecificially, I would like to mask out the loss calculation on the instruction part or system prompt, focusing only on the assistant response.\n\n### Motivation\n\nAdaLoRA requires hand-crafted calculations on loss, which becomes complex when desired to mask out some system/instructino tokens.\n\n### Your contribution\n\nN.A.",
    "url": "https://github.com/huggingface/peft/issues/2262",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-05T12:03:31Z",
    "updated_at": "2025-01-18T15:03:29Z",
    "comments": 4,
    "user": "SpeeeedLee"
  },
  {
    "repo": "pytorch/xla",
    "number": 8454,
    "title": "how to auto convert back to bfloat16 after conv1 and conv2 ",
    "body": "## \u2753 Questions and Help\r\nI have an tensor with dtype torch.bfloat16, in kaggle v3-8, after the conv1 and conv2 operation the return type is torch.float32. Any way (environent varable or so)  to convert the return type back to torch.bfloat16?",
    "url": "https://github.com/pytorch/xla/issues/8454",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-12-05T09:59:35Z",
    "updated_at": "2025-02-13T14:35:46Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10129,
    "title": " Does StableDiffusion3 have an image2image pipeline with ControlNet?",
    "body": "I want to use `ControlNet` with `StableDiffusion3`, providing a prompt, an original image, and a control image as inputs. However, I found that the `StableDiffusion3ControlNetPipeline` only supports prompts and control images as inputs. The `StableDiffusionControlNetImg2ImgPipeline` allows for providing a prompt, an original image, and a control image simultaneously, but it is not compatible with the `StableDiffusion3` model. Is there a `StableDiffusion3ControlNetImg2ImgPipeline` available?\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/10129",
    "state": "closed",
    "labels": [
      "New pipeline/model",
      "contributions-welcome"
    ],
    "created_at": "2024-12-05T09:40:03Z",
    "updated_at": "2025-01-02T20:02:33Z",
    "comments": 1,
    "user": "ZHJ19970917"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10128,
    "title": "Is there any plan to support fastercache?",
    "body": "Expect to support fastercache, https://github.com/Vchitect/FasterCache",
    "url": "https://github.com/huggingface/diffusers/issues/10128",
    "state": "closed",
    "labels": [
      "wip",
      "performance"
    ],
    "created_at": "2024-12-05T09:11:19Z",
    "updated_at": "2025-03-21T04:05:06Z",
    "comments": 4,
    "user": "songh11"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7306,
    "title": "Creating new dataset from list loses information. (Audio Information Lost - either Datatype or Values).",
    "body": "### Describe the bug\r\n\r\nWhen creating a dataset from a list of datapoints, information is lost of the individual items.\r\n\r\nSpecifically, when creating a dataset from a list of datapoints (from another dataset). Either the datatype is lost or the values are lost. See examples below. \r\n\r\n-> What is the best way to create a dataset from a list of datapoints?\r\n\r\n---\r\ne.g.:\r\n**When running this code:**\r\n```python\r\nfrom datasets import load_dataset, Dataset\r\ncommonvoice_data = load_dataset(\"mozilla-foundation/common_voice_17_0\", \"it\", split=\"test\", streaming=True)\r\ndatapoint = next(iter(commonvoice_data))\r\nout = [datapoint]\r\nnew_data = Dataset.from_list(out) #this loses datatype information\r\nnew_data2= Dataset.from_list(out,features=commonvoice_data.features) #this loses value information\r\n```\r\n\r\n**We get the following**:\r\n---\r\n1. `datapoint`: (the original datapoint)\r\n```\r\n'audio': {'path': 'it_test_0/common_voice_it_23606167.mp3', 'array': array([0.00000000e+00, 0.00000000e+00, 0.00000000e+00, ...,\r\n       2.21619011e-05, 2.72628222e-05, 0.00000000e+00]), 'sampling_rate': 48000}\r\n ```\r\nOriginal Dataset Features:\r\n```\r\n>>> commonvoice_data.features\r\n'audio': Audio(sampling_rate=48000, mono=True, decode=True, id=None)\r\n```\r\n - Here we see column \"audio\", has the proper values (both `path` & and `array`) and has the correct datatype (Audio).\r\n\r\n \r\n ----\r\n 2. new_data[0]:\r\n```\r\n# Cannot be printed (as it prints the entire array).\r\n```\r\nNew Dataset 1 Features:\r\n```\r\n>>> new_data.features\r\n'audio': {'array': Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None), 'path': Value(dtype='string', id=None), 'sampling_rate': Value(dtype='int64', id=None)}\r\n```\r\n - Here we see that the column \"audio\", has the correct values, but is not the Audio datatype anymore.\r\n\r\n---\r\n3. new_data2[0]:\r\n```\r\n'audio': {'path': None, 'array': array([0., 0., 0., ..., 0., 0., 0.]), 'sampling_rate': 48000},\r\n```\r\nNew Dataset 2 Features:\r\n```\r\n>>> new_data2.features\r\n'audio': Audio(sampling_rate=48000, mono=True, decode=True, id=None),\r\n```\r\n - Here we see that the column \"audio\", has the correct datatype, but all the array & path values were lost!\r\n\r\n\r\n\r\n### Steps to reproduce the bug\r\n\r\n## Run:\r\n```python\r\nfrom datasets import load_dataset, Dataset\r\ncommonvoice_data = load_dataset(\"mozilla-foundation/common_voice_17_0\", \"it\", split=\"test\", streaming=True)\r\ndatapoint = next(iter(commonvoice_data))\r\nout = [datapoint]\r\nnew_data = Dataset.from_list(out) #this loses datatype information\r\nnew_data2= Dataset.from_list(out,features=commonvoice_data.features) #this loses value information\r\n```\r\n\r\n\r\n\r\n\r\n\r\n### Expected behavior\r\n\r\n## Expected:\r\n```datapoint == new_data[0]```\r\n\r\nAND\r\n\r\n```datapoint == new_data2[0]```\r\n\r\n### Environment info\r\n\r\n- `datasets` version: 3.1.0\r\n- Platform: Linux-6.2.0-37-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.12\r\n- `huggingface_hub` version: 0.26.2\r\n- PyArrow version: 15.0.2\r\n- Pandas version: 2.2.2\r\n- `fsspec` version: 2024.3.1",
    "url": "https://github.com/huggingface/datasets/issues/7306",
    "state": "open",
    "labels": [],
    "created_at": "2024-12-05T09:07:53Z",
    "updated_at": "2024-12-05T09:09:38Z",
    "comments": 0,
    "user": "ai-nikolai"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 549,
    "title": "Low accuracy for act policy on pushT env",
    "body": "The highest success rate is 44%, as n_decoder_layers=7. Are there any other tricks for this?",
    "url": "https://github.com/huggingface/lerobot/issues/549",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2024-12-05T06:18:06Z",
    "updated_at": "2025-10-19T02:32:37Z",
    "user": "KongCDY"
  },
  {
    "repo": "huggingface/Google-Cloud-Containers",
    "number": 128,
    "title": "Can we use Multi-LORA CPU",
    "body": "Hi,\r\n\r\nIm currently following this doc: https://huggingface.co/docs/google-cloud/en/examples/gke-tgi-multi-lora-deployment\r\n\r\nAfter got a bug: \"Can\u2019t scale up due to exceeded quota\" and do some research, I suspect that my free trial (300$) account is not able to increase GPU quota (even I have activated my account to not be trial anymore and have to contact sale)\r\n\r\nIs there anyway I can run this with cpu instead.\r\n\r\nThank you",
    "url": "https://github.com/huggingface/Google-Cloud-Containers/issues/128",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-12-05T05:42:51Z",
    "updated_at": "2024-12-12T10:06:43Z",
    "user": "AndrewNgo-ini"
  },
  {
    "repo": "huggingface/peft",
    "number": 2260,
    "title": "Is it possible to support the transformer engine when using Lora in Megatron?",
    "body": "### Feature request\n\nI am currently using the Megatron framework and want to use Lora for training. I saw that the Megatron format is supported at https://github.com/huggingface/peft/blob/main/src/peft/tuners/lora/tp_layer.py RowParallelLinear and ColumnParallelLinear do the adaptation. But if I use the transformer engine, the corresponding TELayerNormColumnParallelLinear and TERowParallelLinear will not be adapted.\n\n### Motivation\n\nThis will better support Megatron framework using LoRA.\n\n### Your contribution\n\nI don't have a PR.",
    "url": "https://github.com/huggingface/peft/issues/2260",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-05T03:24:15Z",
    "updated_at": "2025-01-12T15:03:29Z",
    "comments": 3,
    "user": "liulong11"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10120,
    "title": "memory consumption of dreambooth+SD3",
    "body": "Hi, I am running dreambooth SD3 with a single A100 GPU, I reduced resolution to 256; but it still need more memory than a single A100 has? I am wondering is this huge memory consumption normal?\r\n\r\n```\r\n!python train_dreambooth_sd3.py \\\r\n  --pretrained_model_name_or_path=\"stabilityai/stable-diffusion-3-medium-diffusers\"  \\\r\n  --instance_data_dir=\"erhu\" \\\r\n  --output_dir=\"trained-sd3\" \\\r\n  --mixed_precision=\"fp16\" \\\r\n  --instance_prompt=\"a photo of erhu\" \\\r\n  --resolution=256 \\\r\n  --train_batch_size=1 \\\r\n  --gradient_accumulation_steps=4 \\\r\n  --learning_rate=1e-4 \\\r\n  --report_to=\"wandb\" \\\r\n  --lr_scheduler=\"constant\" \\\r\n  --lr_warmup_steps=0 \\\r\n  --max_train_steps=300 \\\r\n  --validation_prompt=\"A photo of erhu on the grass\" \\\r\n  --validation_epochs=25 \\\r\n  --use_8bit_adam \\\r\n  --seed=\"0\" \\\r\n  --push_to_hub\r\n```\r\n`torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 36.00 MiB. GPU 0 has a total capacity of 39.56 GiB of which 2.81 MiB is free. Process 16368 has 39.55 GiB memory in use. Of the allocated memory 38.05 GiB is allocated by PyTorch, and 1021.72 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management `\r\nThanks",
    "url": "https://github.com/huggingface/diffusers/issues/10120",
    "state": "closed",
    "labels": [
      "bug",
      "stale",
      "training"
    ],
    "created_at": "2024-12-04T19:39:04Z",
    "updated_at": "2025-01-27T01:30:18Z",
    "comments": 5,
    "user": "KolvacS-W"
  },
  {
    "repo": "pytorch/xla",
    "number": 8451,
    "title": "Is it possible to execute jax code in torch_xla?",
    "body": "##  Is it possible to execute jax code in torch_xla?\r\nAfter reading the docs, I realized that customized kernels via Jax Pallas can be adopted as kernels. I wonder if it is possible to execute jax code in torch_xla. It seems torch_xla._XLAC._xla_tpu_custom_call only accept custom kernels. Is there a way to execute jax ir code?\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/8451",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-04T17:54:55Z",
    "updated_at": "2024-12-08T12:24:51Z",
    "comments": 2,
    "user": "lime-j"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10112,
    "title": "Detail-Daemon diffusers",
    "body": "**Describe the solution you'd like.**\r\nDetail-Daemon:  https://github.com/Jonseed/ComfyUI-Detail-Daemon\r\n\r\nHow to implement Detail-Daemon in diffusers, as seen in https://github.com/Jonseed/ComfyUI-Detail-Daemon. Will there be a better official component in the future?",
    "url": "https://github.com/huggingface/diffusers/issues/10112",
    "state": "open",
    "labels": [
      "wip",
      "consider-for-modular-diffusers"
    ],
    "created_at": "2024-12-04T09:14:39Z",
    "updated_at": "2025-01-03T18:01:24Z",
    "comments": 10,
    "user": "NicholasCao"
  },
  {
    "repo": "pytorch/gloo",
    "number": 399,
    "title": "How to specify ai_family explicitly ",
    "body": "we note that gloo supports ipv4 and ipv6 by setting ai_family = AF_UNSPEC and deciding a real one at runtime. However, in our cluster, we got an exception about ai_family mismatching. Our cluster contains both ipv4 and ipv6 network stacks. How can we specify ai_family explicitly?\n\nWe run pyroch, and get below exception.\nRuntimeError: [enforce fail at ../third_party/gloo/gloo/transport/tcp/[device.cc:276](http://device.cc:276/)] ss1.ss_family == ss2.ss_family. 2 vs 10",
    "url": "https://github.com/pytorch/gloo/issues/399",
    "state": "open",
    "labels": [],
    "created_at": "2024-12-04T08:30:50Z",
    "updated_at": "2025-02-10T09:06:52Z",
    "user": "NEWPLAN"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 547,
    "title": "How to make a custom LeRobotDataset with v2?",
    "body": "Hi folks, thanks for the amazing open source work!\r\n\r\nI am trying to make a custom dataset to use with the LeRobotDataset format.\r\n\r\nThe readme says to copy the example scripts here which I've done, and I have a working format script of my own.\r\n\r\nhttps://github.com/huggingface/lerobot/blob/8e7d6970eaf5a64b8af6ec45586d201b8ca9ef16/README.md?plain=1#L323\r\n\r\nbut when it comes time to create the dataset, the `push_dataset_to_hub.py` uses `LeRobotDataset.from_preloaded` which is no longer supported in [dataset V2](https://github.com/huggingface/lerobot/pull/461)\r\n\r\nhttps://github.com/huggingface/lerobot/blob/8e7d6970eaf5a64b8af6ec45586d201b8ca9ef16/lerobot/scripts/push_dataset_to_hub.py#L216\r\n\r\nSo I'm just wondering what the proper way of loading your own custom local dataset is? \r\n\r\nThank you in advance for your help!",
    "url": "https://github.com/huggingface/lerobot/issues/547",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2024-12-04T08:00:19Z",
    "updated_at": "2025-10-08T08:28:34Z",
    "user": "alik-git"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 545,
    "title": "Poor success rate in complex scenarios",
    "body": "Hi I used Moss robot to play with and train ACT policy, when it comes to one lego piece, it can finish grabbing task at high success rate after recording 50+ episodes with different pose & location variants, but generalization on multi-piece random location is not promising.\r\n\r\nWhen I started to add complexity (for example 6 pieces with different colors like the picture below), and place the lego pieces a little bit randomly, record one episode continuously until all the pieces are grabbed (other than 1 piece 1 episode). furthermore,  were recorded with order\r\n![IMG_4681 HEIC](https://github.com/user-attachments/assets/dbe58ebc-0690-4563-ab1d-cf0660305611)\r\n\r\nHere is what I found:\r\n1. The trained policy can not work if the gripping sequence is randomized, in other words it has to keep a fixed spacial order e.g. from upper left to down right.\r\n2. The trained policy can not work if the [location, color, pose] combination was not seen in training dataset, especially location combos \r\n3. At first I suspected only iPhone and Mac fixed cameras can not give enough depth perception, so I bought a wide-angle USB camera mounted it on the gripper, as a result success rate didn't get higher. \r\n![20241204141608](https://github.com/user-attachments/assets/346a6c22-7516-4854-ac1f-5d7029af5336)\r\n\r\n4. Enlarging dataset size to 120+ episodes didn't give obvious change.\r\n\r\n\r\n\r\n\r\nI was wondering how to improve this task, is the method I used to record data wrong or due to the generalization of ACT is limited?  \r\n\r\nLooking forward to hearing answers or experience",
    "url": "https://github.com/huggingface/lerobot/issues/545",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2024-12-04T06:20:31Z",
    "updated_at": "2025-10-08T08:28:45Z",
    "user": "mydhui"
  },
  {
    "repo": "huggingface/frp",
    "number": 14,
    "title": "where is the code of frpc-gradio-0.3",
    "body": "",
    "url": "https://github.com/huggingface/frp/issues/14",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-04T05:37:34Z",
    "updated_at": "2025-03-11T00:55:39Z",
    "user": "BoyuanJiang"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3174,
    "title": "\ud83d\udca1 [REQUEST] - Tutorial for exporting popular class of models, showing the unique challenges faced and how to address them",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\r\n\r\nThe gaming community cares about certain classes of models like pose estimation, instance segmentation, video classification. When we try to export OSS implementations of these models, we run into unique challenges with `torch.export`\r\n\r\nCurrently, we have tutorials showing usage of export and talking about the core export-related concepts to keep in mind with simple examples.  We also have `ExportDB` which has information on unsupported constructs with simple examples. However, practically, when running export on many models, its not very clear how does once go about addressing the issues.\r\n\r\nThis tutorial aims to do the reverse. Pick 4 models which are popular, try to export them, show the errors we run into and how do we solve them. The problems being solved are generic enough to be applicable to a range of models.\r\n\r\n### Existing tutorials on this topic\r\n\r\nhttps://pytorch.org/docs/stable/export.html\r\nhttps://pytorch.org/tutorials/intermediate/torch_export_tutorial.html\r\nhttps://pytorch.org/docs/stable/generated/exportdb/index.html\r\n\r\n### Additional context\r\n\r\nhttps://github.com/pytorch/pytorch/issues/138111\r\nhttps://github.com/pytorch/pytorch/issues/138120\r\n\r\n_No response_\r\n\r\ncc @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4",
    "url": "https://github.com/pytorch/tutorials/issues/3174",
    "state": "closed",
    "labels": [
      "module: export"
    ],
    "created_at": "2024-12-03T20:35:42Z",
    "updated_at": "2025-01-21T18:22:54Z",
    "user": "agunapal"
  },
  {
    "repo": "pytorch/xla",
    "number": 8430,
    "title": "Request for Wheel with Older GLIBC",
    "body": "## \u2753 Questions and Help\r\nHi, I have installed torch-xla from https://storage.googleapis.com/pytorch-xla-releases/wheels/cuda/12.1/torch_xla-2.5.0-cp311-cp311-manylinux_2_28_x86_64.whl. \"manylinux_2_28\" indicates that it is compiled with GLIBC 2.28. However, when I installed and tried to import torch_xla, it said GLIBC 2.29 was not found. Upgrading GLIBC on the server is not possible. I kindly request any help on this. It will be very helpful if there is a pre-compiled wheel that can run on a server with GLIBC 2.28 (e.g., RedHat 8)\r\n\r\nI have pytorch-2.5.1-cu118 installed in python 3.11. My system is RHEL 8.\r\n",
    "url": "https://github.com/pytorch/xla/issues/8430",
    "state": "open",
    "labels": [
      "question",
      "build"
    ],
    "created_at": "2024-12-03T17:50:24Z",
    "updated_at": "2025-02-13T14:47:34Z",
    "user": "ASU-ScopeX-Lab"
  },
  {
    "repo": "huggingface/peft",
    "number": 2255,
    "title": "Is this the right way to check whether a model has been trained as expected?",
    "body": "I'd like to check whether my PEFT model has been trained as intended, i.e. whether the PEFT weights have changed, but not the base weights. The following code works, but I'm sure a PEFT specialist will suggest a better way.\r\n\r\n```python\r\nimport tempfile\r\n\r\nimport torch\r\nfrom datasets import load_dataset\r\nfrom peft import LoraConfig, get_peft_model\r\nfrom transformers import AutoModelForCausalLM\r\n\r\nfrom trl import SFTConfig, SFTTrainer\r\n\r\n\r\n# Get the base model\r\nmodel_id = \"trl-internal-testing/tiny-Qwen2ForCausalLM-2.5\"\r\nmodel = AutoModelForCausalLM.from_pretrained(model_id)\r\n\r\n# Get the base model parameter names\r\nbase_param_names = [f\"base_model.model.{n}\" for n, _ in model.named_parameters()]\r\n\r\n# Turn the model into a peft model\r\nlora_config = LoraConfig()\r\nmodel = get_peft_model(model, lora_config)\r\n\r\n# Get the dataset\r\ndataset = load_dataset(\"trl-internal-testing/zen\", \"standard_language_modeling\", split=\"train\")\r\n\r\nwith tempfile.TemporaryDirectory() as tmp_dir:\r\n    # Initialize the trainer\r\n    training_args = SFTConfig(output_dir=tmp_dir, report_to=\"none\")\r\n    trainer = SFTTrainer(args=training_args, model=model, train_dataset=dataset)\r\n\r\n    # Save the initial parameters to compare them later\r\n    previous_trainable_params = {n: param.clone() for n, param in trainer.model.named_parameters()}\r\n\r\n    trainer.train()\r\n\r\n    # Check the peft params have changed and the base model params have not changed\r\n    for n, param in previous_trainable_params.items():\r\n        new_param = trainer.model.get_parameter(n)\r\n        if n in base_param_names:  # We expect the base model parameters to be the same\r\n            if not torch.allclose(param, new_param):\r\n                print(f\"Parameter {n} has changed, but it should not have changed\")\r\n        elif \"base_layer\" not in n:  # We expect the peft parameters to be different (except for the base layer)\r\n            if torch.allclose(param, new_param):\r\n                print(f\"Parameter {n} has not changed, but it should have changed\")\r\n```",
    "url": "https://github.com/huggingface/peft/issues/2255",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-03T17:36:00Z",
    "updated_at": "2024-12-04T12:01:37Z",
    "comments": 5,
    "user": "qgallouedec"
  },
  {
    "repo": "huggingface/peft",
    "number": 2251,
    "title": "a guide to add a new fine-tuning method in the doc",
    "body": "### Feature request\n\nHello, I am a researcher in the finetune area. Can you publish a guide to add a new fine-tuning method in the doc? I think researchers like me are glad to experiment their methods based on this repo.\n\n### Motivation\n\nResearchers like me are glad to experiment their methods based on this repo, but don't know how to add.\n\n### Your contribution\n\nYes, but after verifying the feasibility of my method.",
    "url": "https://github.com/huggingface/peft/issues/2251",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-03T13:46:02Z",
    "updated_at": "2024-12-04T02:12:35Z",
    "comments": 2,
    "user": "YF-T"
  },
  {
    "repo": "pytorch/vision",
    "number": 8777,
    "title": "Documentation for the expected input dimension of the model class",
    "body": "### \ud83d\udcda The doc issue\n\nThe built-in models are really convenient. However, the documentation usually did not specified the expected input dimension, I always find it troublesome to confirm what is the correct input dimension for the model class that i want to use. \r\n\r\nFor example:\r\nhttps://pytorch.org/vision/main/models/generated/torchvision.models.resnet18.html\r\nhttps://pytorch.org/vision/main/models/generated/torchvision.models.swin_t.html\r\nhttps://pytorch.org/vision/main/models/generated/torchvision.models.video.swin3d_b.html\r\n\r\nIs there clear documentation for this issue? Or is there a simple and clear rule that i can use (e.g., a rule that were used to develop these model class in pytorch that are consistent throughout?)\r\n\r\n\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/8777",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-02T17:55:40Z",
    "updated_at": "2024-12-03T10:30:23Z",
    "comments": 2,
    "user": "hzhz2020"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10076,
    "title": "Do we have any script covert from hf format to orginal format?",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nscripts/convert_cogvideox_to_diffusers.py\r\nin this script, we can convert cogvideox -> diffusers. Do we have the opposite script?\r\n\r\ncc @yiyixuxu \r\n",
    "url": "https://github.com/huggingface/diffusers/issues/10076",
    "state": "open",
    "labels": [
      "good first issue",
      "contributions-welcome",
      "conversion script"
    ],
    "created_at": "2024-12-02T07:49:34Z",
    "updated_at": "2024-12-02T18:22:50Z",
    "comments": 1,
    "user": "foreverpiano"
  },
  {
    "repo": "huggingface/trl",
    "number": 2424,
    "title": "How to calculate the loss of multi-turn dialogue training data?",
    "body": "In a single data entry containing multiple turns of dialogue, abbreviated as Q1 + A1 + Q2 + A2, does this project calculate the loss only for the last answer of the multi-turn dialogue, or for each answer?",
    "url": "https://github.com/huggingface/trl/issues/2424",
    "state": "closed",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb SFT"
    ],
    "created_at": "2024-12-02T07:47:17Z",
    "updated_at": "2025-01-20T02:47:34Z",
    "user": "NUMB1234"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10074,
    "title": "how to install diffusers 0.32.0",
    "body": "FluxFillPipeline  Function need =0.32.0  But I don't know how to install it, can anyone help me? Thanks in advance",
    "url": "https://github.com/huggingface/diffusers/issues/10074",
    "state": "closed",
    "labels": [],
    "created_at": "2024-12-02T07:05:24Z",
    "updated_at": "2024-12-02T19:11:34Z",
    "user": "babyta"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10070,
    "title": "Xformers info , memory efficient atttention unavailable",
    "body": "### Describe the bug\r\n\r\nI just started learning Stable Diffuision on Win11. After I installed xformers, I found several memory_efficient_attention string is unavailable. Is it possible to make them available? Thanks for any help.\r\n\r\n### Reproduction\r\n\r\nxFormers 0.0.28.post3\r\nmemory_efficient_attention.ckF:                    unavailable\r\nmemory_efficient_attention.ckB:                    unavailable\r\nmemory_efficient_attention.ck_decoderF:            unavailable\r\nmemory_efficient_attention.ck_splitKF:             unavailable\r\nmemory_efficient_attention.cutlassF-pt:            available\r\nmemory_efficient_attention.cutlassB-pt:            available\r\nmemory_efficient_attention.fa2F@v2.6.3-24-gbdf733b: available\r\nmemory_efficient_attention.fa2B@v2.6.3-24-gbdf733b: available\r\nmemory_efficient_attention.fa3F@0.0.0:             unavailable\r\nmemory_efficient_attention.fa3B@0.0.0:             unavailable\r\nmemory_efficient_attention.triton_splitKF:         available\r\nindexing.scaled_index_addF:                        available\r\nindexing.scaled_index_addB:                        available\r\nindexing.index_select:                             available\r\nsequence_parallel_fused.write_values:              available\r\nsequence_parallel_fused.wait_values:               available\r\nsequence_parallel_fused.cuda_memset_32b_async:     available\r\nsp24.sparse24_sparsify_both_ways:                  available\r\nsp24.sparse24_apply:                               available\r\nsp24.sparse24_apply_dense_output:                  available\r\nsp24._sparse24_gemm:                               available\r\nsp24._cslt_sparse_mm_search@0.0.0:                 available\r\nsp24._cslt_sparse_mm@0.0.0:                        available\r\nswiglu.dual_gemm_silu:                             available\r\nswiglu.gemm_fused_operand_sum:                     available\r\nswiglu.fused.p.cpp:                                available\r\nis_triton_available:                               True\r\npytorch.version:                                   2.5.1+cu124\r\npytorch.cuda:                                      available\r\ngpu.compute_capability:                            8.9\r\ngpu.name:                                          NVIDIA GeForce RTX 4070\r\ndcgm_profiler:                                     unavailable\r\nbuild.info:                                        available\r\nbuild.cuda_version:                                1204\r\nbuild.hip_version:                                 None\r\nbuild.python_version:                              3.10.11\r\nbuild.torch_version:                               2.5.1+cu124\r\nbuild.env.TORCH_CUDA_ARCH_LIST:                    6.0+PTX 7.0 7.5 8.0+PTX 9.0a\r\nbuild.env.PYTORCH_ROCM_ARCH:                       None\r\nbuild.env.XFORMERS_BUILD_TYPE:                     Release\r\nbuild.env.XFORMERS_ENABLE_DEBUG_ASSERTIONS:        None\r\nbuild.env.NVCC_FLAGS:                              -allow-unsupported-compiler\r\nbuild.env.XFORMERS_PACKAGE_FROM:                   wheel-v0.0.28.post3\r\nbuild.nvcc_version:                                12.4.131\r\nsource.privacy:                                    open source\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\nWin11, Python 3.10.6,pytorch 2.5.1+cu124, xFormers 0.0.28.post3, triton==3.0.0\r\n\r\n### Who can help?\r\n\r\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/10070",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-12-01T16:14:21Z",
    "updated_at": "2025-01-01T15:03:09Z",
    "comments": 1,
    "user": "Stareshine"
  },
  {
    "repo": "huggingface/Google-Cloud-Containers",
    "number": 126,
    "title": "Deployment error on GKE",
    "body": "Hello!\r\nI deployed Gemma 2 2b it on GKE with autopilot mode following these instructions https://cloud.google.com/kubernetes-engine/docs/tutorials/serve-gemma-gpu-tgi#autopilot. There's this error Node scale up in zones us-central1-c associated with this pod failed: GCE quota exceeded. Pod is at risk of not being scheduled. I checked quota there's enough GPU. However the pod is in pending state.",
    "url": "https://github.com/huggingface/Google-Cloud-Containers/issues/126",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-12-01T14:09:29Z",
    "updated_at": "2025-01-07T08:39:07Z",
    "user": "piksida"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 538,
    "title": "questions about load dataset for localhost,  make own policy and use headless eval mode",
    "body": "Hello, I'm trying to download a data set on hugging face to the local and then call this data set from the local. For example, 'aloha_sim_insertion_scripted_image' , its format is many 'episode_000000.parquet' files . Then how to load this format by LeRobotDataset() func or other ways?\r\n\r\nSecond, I want to create my own policy. After I parse the code framework, I think I may need to create my policy code file by mimicking the following files:\r\n+ lerobot/common/policies/act/configuration_act.py\r\n+ lerobot/common/policies/act/modeling_act.py\r\nHowever, I am having some difficulties in making my own policy now, and I want to create a new policy to implement my idea, which is to introduce the concept of comparative learning. That is to say, the policy enables the agent to learn the correct samples and stay away from the wrong samples. I would like to ask you what should be modified to complete this idea.\r\n\r\nI really need examples of this, and it would be very helpful if you could give me detailed advice!\r\n\r\nFinally, my server is headless, which means that when evaluating a policy, there is no way to call mujujo to view the evaluation, so can our code framework support headless mode and save the evaluation video?\r\n\r\nAs a new researcher in this field, it would be great if I could further communicate with you about the above issues. Thank you very much!\r\n\r\nBest wishes : )",
    "url": "https://github.com/huggingface/lerobot/issues/538",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2024-12-01T03:32:06Z",
    "updated_at": "2025-10-19T02:32:41Z",
    "user": "zhouzhq2021"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 536,
    "title": "How auto calibration works",
    "body": "Is there any details about run_arm_auto_calibration_moss and run_arm_auto_calibration_so100 we can refer? I read the code but couldn't fully understand. \r\n\r\nWhen should we use auto_calibration, instead of the manual calibration calculating the homing_offset of the rotated (90d) pose?\r\n\r\nWhat to check whether my understanding is correct: for manual calibration, the homing offset include 2 terms, 1) the true offset causing by motor installation, 2) human bias due to manually rotate the motor. If correct, is there a way to also remove the second term? Considering using multiple robots for data collection, guess removing term (2) is required.",
    "url": "https://github.com/huggingface/lerobot/issues/536",
    "state": "closed",
    "labels": [
      "question",
      "robots",
      "stale"
    ],
    "created_at": "2024-11-30T18:04:23Z",
    "updated_at": "2025-10-08T08:37:24Z",
    "user": "wzds2015"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 709,
    "title": "First Shard Group Save and Load Checkpoint for HSDP",
    "body": "Based on my understanding, current strategy:\r\n\t1.\tAll ranks currently read and load the checkpoint.\r\n\t2.\tAll ranks also save and write the checkpoint.\r\n\r\nI have a question regarding the HSDP case:\r\nIf different shard groups write data to storage, could this lead to data corruption?\r\nIdeally, should only the first shard group read the data, broadcast it, and handle writing to ensure consistency?",
    "url": "https://github.com/pytorch/torchtitan/issues/709",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-29T22:20:42Z",
    "updated_at": "2025-01-08T07:52:58Z",
    "user": "qsh-zh"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3269,
    "title": "\ud83e\udd28Question: What if model has float16 dtype and `mixed_precision` is set to fp16 as well?",
    "body": "As the title:\r\n\r\n**\ud83e\udd28Question: What if model has float16 dtype and `mixed_precision` is set to fp16 as well?**\r\n\r\n- Will it computate in original float16? Like Auto-Mixed-Precision never exist\r\n- or some modules, which are easy to overflow(e.g. BatchNorm, LayerNorm), will be upcasted to float32, as AMP fp32->fp16 does?\r\n\r\nCould someone please help me with this question? \u2764",
    "url": "https://github.com/huggingface/accelerate/issues/3269",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-29T17:55:58Z",
    "updated_at": "2025-01-07T15:33:26Z",
    "user": "townwish4git"
  },
  {
    "repo": "huggingface/chat-macOS",
    "number": 36,
    "title": "Document how to download and install a local model",
    "body": "1st, thanks very much for this work!\r\nI'm a bit of nube here.\r\n\r\nThe 'Get' button takes you to web page for the example, however chat-macOS instruction are not part of the options. And also where do you place the downloaded model for the \"add +\" option and where do the models go? Is there a way to configure where models are stored?\r\n\r\nThanks!\r\n\r\n",
    "url": "https://github.com/huggingface/chat-macOS/issues/36",
    "state": "open",
    "labels": [],
    "created_at": "2024-11-29T17:18:43Z",
    "updated_at": "2024-11-29T17:18:43Z",
    "user": "deepcoder"
  },
  {
    "repo": "pytorch/rl",
    "number": 2618,
    "title": "[Feature Request] Provide documentation on how to use CatFrames with a data collector and replay buffer for images",
    "body": "## Motivation\r\nUsing CatFrames for inference is fairly straightforward and is already well documented.  \r\nThat being said, using CatFrames to reconstruct a stack of frames when sampling from the replay buffer is not so straightforward I find (subjective) and is not explicitly documentd for images (objective).\r\nUsing frame stacking for Visual RL is very common practice so I feel like the community would benefit from getting a better documentation on how to use CatFrames **for images**.  \r\n\r\n## Solution\r\nProvide a clear documentation that explains everything in details (no magic flags/magic values) on how to use CatFrames with a data collector and replay buffer (both extend and sample() method should be shown) for images.\r\n\r\nI have created a gist of my attempt to use CatFrames for images and while the inference part works, the stack frames retrieved from the replay buffer do not make sense.  \r\n\r\nhttps://gist.github.com/AlexandreBrown/fe378f26a87bdc40c5995dcc7d42f482  \r\n\r\nAny help on how to make the last part where we sample from the replay buffer return the correct CatFrames data is appreciated.  \r\n\r\n## Contributions  \r\nI am willing to work on the PR for the documentation update if someone can help me get the [MVP script](https://gist.github.com/AlexandreBrown/fe378f26a87bdc40c5995dcc7d42f482) working.\r\n\r\n## Checklist\r\n\r\n- [x] I have checked that there is no similar issue in the repo (**required**)\r\n",
    "url": "https://github.com/pytorch/rl/issues/2618",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-11-29T16:57:42Z",
    "updated_at": "2024-11-29T16:58:06Z",
    "user": "AlexandreBrown"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3307,
    "title": "\u2753 [Question] TensorRT Export Failure with Large Input Sizes",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\nI'm trying to export a torch model that processes large inputs (e.g., 8192x2048). I have noticed that `torch_tensorrt.compile` fails with inputs greater than 4096x2048 (I haven't tried them all, only powers of 2). Specifically, the conversion fails for convolution and ReLU operations with a \"No valid tactics\" and \"Illegal memory access\" error:\r\n```\r\n[1A2024-11-29 16:56:42,307 - torch_tensorrt [TensorRT Conversion Context] - ERROR - [scopedCudaResources.cpp::~ScopedCudaStream::55] Error Code 1: Cuda Runtime (an illegal memory access was encountered)\r\n2024-11-29 16:56:42,311 - torch_tensorrt [TensorRT Conversion Context] - ERROR - IBuilder::buildSerializedNetwork: Error Code 10: Internal Error (Could not find any implementation for node [CONVOLUTION]-[aten_ops.convolution.default]-[teacher.3/convolution_5] + [RELU]-[aten_ops.relu.default]-[teacher.4/relu_4].)\r\n2024-11-29 16:56:42,312 - [MODEL EXPORT] - ERROR - TensorRT export failed: \r\nTraceback (most recent call last):\r\n  File \"/nfs/home/bragagnolo/qinstinct-fabric-inspection/tools/launchers.py\", line 398, in <module>\r\n    export(\r\n  File \"/nfs/home/bragagnolo/qinstinct-fabric-inspection/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py\", line 116, in decorate_context\r\n    return func(*args, **kwargs)\r\n  File \"/nfs/home/bragagnolo/qinstinct-fabric-inspection/tools/launchers.py\", line 298, in export\r\n    trt_model = torch_tensorrt.compile(model, **compile_spec)\r\n  File \"/nfs/home/bragagnolo/qinstinct-fabric-inspection/.venv/lib/python3.10/site-packages/torch_tensorrt/_compile.py\", line 269, in compile\r\n    trt_graph_module = dynamo_compile(\r\n  File \"/nfs/home/bragagnolo/qinstinct-fabric-inspection/.venv/lib/python3.10/site-packages/torch_tensorrt/dynamo/_compiler.py\", line 288, in compile\r\n    trt_gm = compile_module(\r\n  File \"/nfs/home/bragagnolo/qinstinct-fabric-inspection/.venv/lib/python3.10/site-packages/torch_tensorrt/dynamo/_compiler.py\", line 464, in compile_module\r\n    trt_module = convert_module(\r\n  File \"/nfs/home/bragagnolo/qinstinct-fabric-inspection/.venv/lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/_conversion.py\", line 142, in convert_module\r\n    interpreter_result = interpret_module_to_result(\r\n  File \"/nfs/home/bragagnolo/qinstinct-fabric-inspection/.venv/lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/_conversion.py\", line 121, in interpret_module_to_result\r\n    interpreter_result = interpreter.run()\r\n  File \"/nfs/home/bragagnolo/qinstinct-fabric-inspection/.venv/lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py\", line 635, in run\r\n    assert serialized_engine\r\nAssertionError\r\n```\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\nHere attached is the script and full output log: [issue.zip](https://github.com/user-attachments/files/17961259/issue.zip)\r\n\r\n## Environment\r\n\r\n - PyTorch Version (e.g., 1.0): 2.5.1+cu121\r\n - TorchTensorRT Version: 2.5.0\r\n - CPU Architecture: AMD EPYC 7543 32-Core Processor\r\n - OS (e.g., Linux): Ubuntu 22.04.5 LTS\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Python version: 3.10.12\r\n - CUDA version: Cuda compilation tools, release 12.1, V12.1.66 Build cuda_12.1.r12.1/compiler.32415258_0\r\n - GPU models and configuration: NVIDIA A100-SXM4-80GB, on SLURM with MIG enabled.\r\n\r\nIs there any limit to the input size when converting using torch_tensorrt? Any solution to this problem?\r\n\r\nThanks.\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3307",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-29T16:01:14Z",
    "updated_at": "2024-12-04T15:53:40Z",
    "user": "AndreaBrg"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10055,
    "title": "Training script for a Controlnet based on SD3 does not work",
    "body": "### Describe the bug\n\nHi @sayakpaul and all others :)\r\n\r\n\r\nThe training script for a Control-net based on Stable Diffusion 3 seems to not work.\r\n\r\n**RuntimeError: Given groups=1, weight of size [1536, 17, 2, 2], expected input[4, 16, 64, 64] to have 17 channels, but got 16 channels instead**\r\n\r\n\r\n\r\nI tried to follow the documentation on how to train a control net based on SD3.\r\nI used a custom dataset that I also used to train a control net based on SD1.5. \r\n\r\nOnce i run the script. I receive a tensors channel do not match error.\r\n\n\n### Reproduction\n\n!accelerate launch train_controlnet_sd3.py \\\r\n --pretrained_model_name_or_path=\"stabilityai/stable-diffusion-3-medium-diffusers\" \\\r\n --output_dir=\"/home/xxx/models/v1/cn-stablediff-v3_out\" \\\r\n --dataset_name=\"StudentYannik/v1-prepared-cn\" \\\r\n --resolution=512 \\\r\n --learning_rate=1e-5 \\\r\n --max_train_steps=10000 \\\r\n --train_batch_size=4 \\\r\n --num_train_epochs=10 \\\r\n --gradient_accumulation_steps=4\n\n### Logs\n\n```shell\n11/29/2024 14:35:32 - INFO - __main__ - Distributed environment: NO\r\nNum processes: 1\r\nProcess index: 0\r\nLocal process index: 0\r\nDevice: cuda\r\n\r\nMixed precision type: no\r\n\r\nYou set `add_prefix_space`. The tokenizer needs to be converted from the slow tokenizers\r\nYou are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.\r\nYou are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.\r\nYou are using a model of type t5 to instantiate a model of type . This is not supported for all configurations of models and can yield errors.\r\n{'base_image_seq_len', 'base_shift', 'max_image_seq_len', 'use_beta_sigmas', 'invert_sigmas', 'use_karras_sigmas', 'use_dynamic_shifting', 'max_shift', 'use_exponential_sigmas'} was not found in config. Values will be initialized to default values.\r\nDownloading shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:00<00:00, 12539.03it/s]\r\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:09<00:00,  4.92s/it]\r\n{'mid_block_add_attention'} was not found in config. Values will be initialized to default values.\r\n{'dual_attention_layers', 'qk_norm'} was not found in config. Values will be initialized to default values.\r\n11/29/2024 14:35:54 - INFO - __main__ - Initializing controlnet weights from transformer\r\n{'dual_attention_layers', 'pos_embed_type', 'qk_norm', 'use_pos_embed', 'force_zeros_for_pooled_projection'} was not found in config. Values will be initialized to default values.\r\n11/29/2024 14:36:14 - INFO - __main__ - ***** Running training *****\r\n11/29/2024 14:36:14 - INFO - __main__ -   Num examples = 150\r\n11/29/2024 14:36:14 - INFO - __main__ -   Num batches each epoch = 38\r\n11/29/2024 14:36:14 - INFO - __main__ -   Num Epochs = 1000\r\n11/29/2024 14:36:14 - INFO - __main__ -   Instantaneous batch size per device = 4\r\n11/29/2024 14:36:14 - INFO - __main__ -   Total train batch size (w. parallel, distributed & accumulation) = 16\r\n11/29/2024 14:36:14 - INFO - __main__ -   Gradient Accumulation steps = 4\r\n11/29/2024 14:36:14 - INFO - __main__ -   Total optimization steps = 10000\r\nSteps:   0%|                                          | 0/10000 [00:00<?, ?it/s]Traceback (most recent call last):\r\n  File \"/home/xxxx/repos/control-net/diffusers/examples/controlnet/train_controlnet_sd3.py\", line 1412, in <module>\r\n    main(args)\r\n  File \"/home/xxxx/repos/control-net/diffusers/examples/controlnet/train_controlnet_sd3.py\", line 1278, in main\r\n    control_block_res_samples = controlnet(\r\n  File \"/home/xxxx/repos/control-net/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1736, in _wrapped_call_impl\r\n    return self._call_impl(*args, **kwargs)\r\n  File \"/home/xxxx/repos/control-net/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1747, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"/home/xxxx/repos/control-net/diffusers/src/diffusers/models/controlnets/controlnet_sd3.py\", line 365, in forward\r\n    hidden_states = hidden_states + self.pos_embed_input(controlnet_cond)\r\n  File \"/home/xxxx/repos/control-net/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1736, in _wrapped_call_impl\r\n    return self._call_impl(*args, **kwargs)\r\n  File \"/home/xxxx/repos/control-net/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1747, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"/home/xxxx/repos/control-net/diffusers/src/diffusers/models/embeddings.py\", line 266, in forward\r\n    latent = self.proj(latent)\r\n  File \"/home/xxxx/repos/control-net/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1736, in _wrapped_call_impl\r\n    return self._call_impl(*args, **kwargs)\r\n  File \"/home/xxxx/repos/control-net/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1747, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"",
    "url": "https://github.com/huggingface/diffusers/issues/10055",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-11-29T13:46:29Z",
    "updated_at": "2025-02-03T15:03:46Z",
    "comments": 17,
    "user": "Putzzmunta"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10050,
    "title": "Is there any img2img KDiffusion equivalent of StableDiffusionKDiffusionPipeline?",
    "body": "### Model/Pipeline/Scheduler description\n\nI'm working on result alignment between diffusers and A1111 webui. \r\nIn txt2img scene, I can achieve via `StableDiffusionKDiffusionPipeline`, refer to https://github.com/huggingface/diffusers/issues/3253. \r\nBut in img2img scene, is there any KDiffusion pipeline equivalent?\r\n\r\nI'm also trying to implement this by merging `StableDiffusionKDiffusionPipeline` and `StableDiffusionImg2ImgPipeline` together.\r\nAny clarification and help is appreciated.\n\n### Open source status\n\n- [ ] The model implementation is available.\n- [ ] The model weights are available (Only relevant if addition is not a scheduler).\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/10050",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2024-11-29T07:47:11Z",
    "updated_at": "2024-12-29T15:03:05Z",
    "comments": 2,
    "user": "juju812"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10043,
    "title": "F5-TTS Integration",
    "body": "### Model/Pipeline/Scheduler description\n\nF5-TTS is a fully non-autoregressive text-to-speech system based on flow matching with Diffusion Transformer (DiT).\r\nIt has excellent voice cloning capabilities, and audio generation is of quite high quality.\n\n### Open source status\n\n- [X] The model implementation is available.\n- [X] The model weights are available (Only relevant if addition is not a scheduler).\n\n### Provide useful links for the implementation\n\nPaper - https://arxiv.org/abs/2410.06885\r\nCode - https://github.com/SWivid/F5-TTS?tab=readme-ov-file\r\nWeights - https://huggingface.co/SWivid/F5-TTS\r\n\r\nAuthor - @SWivid",
    "url": "https://github.com/huggingface/diffusers/issues/10043",
    "state": "open",
    "labels": [
      "help wanted",
      "contributions-welcome"
    ],
    "created_at": "2024-11-28T11:14:18Z",
    "updated_at": "2025-11-02T18:46:02Z",
    "comments": 11,
    "user": "nityanandmathur"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 141746,
    "title": "How to specify the port for processes with rank > 1 in the Gloo communication backend?",
    "body": "In Pytorch, when performing distributed training using gloo as the communication backend, you only need to specify master_addr and master_port; other processes will actively connect and use random ports for initialization. May I ask if it is possible for other processes to perform initialization by specifying the port?\n\ncc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o",
    "url": "https://github.com/pytorch/pytorch/issues/141746",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "triaged"
    ],
    "created_at": "2024-11-28T02:07:49Z",
    "updated_at": "2024-12-19T03:52:52Z",
    "user": "tecaccc"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 533,
    "title": "How to merge multiple recorded datasets?",
    "body": "Hi, Thank you so much for the automatic resume during data recording\uff0csometimes ubstable camera issues or other situations (e.g. do not have enough time to finish recording) might cause process stopping.\r\n\r\nI was wondering is there anyway to merge multiple recorded datasets? for instance I have two datasets 'cube grabbing' and 'cylinder grabbing' which were both recorded 50 episodes each and in the save environment, do you have tutorial about how to merge them into a 100-episode larger datasets? \r\n\r\nBTW, another reason for merging datasets is because storage usage is extremely high before video encoding, and record large datasets at once can be limited by storage. but merge several encoded datasets can mitigate this problem.\r\n\r\nThanks",
    "url": "https://github.com/huggingface/lerobot/issues/533",
    "state": "closed",
    "labels": [
      "question",
      "dataset"
    ],
    "created_at": "2024-11-28T01:53:28Z",
    "updated_at": "2025-10-08T08:33:31Z",
    "user": "mydhui"
  },
  {
    "repo": "huggingface/transformers",
    "number": 34981,
    "title": "How to Log Training Loss at Step Zero in Hugging Face Trainer or SFT Trainer?",
    "body": "### Feature request\n\nlog train loss on start\r\n\r\n----\r\n\r\n\u2019m using the Hugging Face `Trainer` (or `SFTTrainer`) for fine-tuning, and I want to log the training loss at step 0 (before any training steps are executed). I know there\u2019s an `eval_on_start` option for evaluation, but I couldn't find a direct equivalent for training loss logging at the beginning of training.\r\n\r\nIs there a way to log the initial training loss at step zero (before any updates) using `Trainer` or `SFTTrainer`? Ideally, I'd like something similar to `eval_on_start`.\r\n\r\nHere\u2019s what I\u2019ve tried so far:\r\n\r\n#### Solution 1: Custom Callback\r\n\r\nI implemented a custom callback to log the training loss at the start of training:\r\n\r\n\r\n```python\r\nfrom transformers import TrainerCallback\r\n\r\nclass TrainOnStartCallback(TrainerCallback):\r\n    def on_train_begin(self, args, state, control, logs=None, **kwargs):\r\n        # Log training loss at step 0\r\n        logs = logs or {}\r\n        logs[\"train/loss\"] = None  # Replace None with an initial value if available\r\n        logs[\"train/global_step\"] = 0\r\n        self.log(logs)\r\n\r\n    def log(self, logs):\r\n        print(f\"Logging at start: {logs}\")\r\n        wandb.log(logs)\r\n\r\n# Adding the callback to the Trainer\r\ntrainer = SFTTrainer(\r\n    model=model,\r\n    tokenizer=tokenizer,\r\n    train_dataset=train_dataset,\r\n    eval_dataset=eval_dataset,\r\n    args=training_args,\r\n    optimizers=(optimizer, scheduler),\r\n    callbacks=[TrainOnStartCallback()],\r\n)\r\n```\r\nThis works but feels a bit overkill. It logs metrics at the start of training before any steps.\r\n\r\n#### Solution 2: Manual Logging\r\n\r\nAlternatively, I manually log the training loss before starting training:\r\n\r\n```python\r\nwandb.log({\"train/loss\": None, \"train/global_step\": 0})\r\ntrainer.train()\r\n```\r\n\r\n### Question:\r\n\r\nAre there any built-in features in `Trainer` or `SFTTrainer` to log training loss at step zero? Or is a custom callback or manual logging the best solution here? If so, are there better ways to implement this functionality? similar to the `eval_on_start` but `train_on_start`?\r\n\r\ncross: https://discuss.huggingface.co/t/how-to-log-training-loss-at-step-zero-in-hugging-face-trainer-or-sft-trainer/128188\n\n### Motivation\n\nCrucial sanity check\n\n### Your contribution\n\nyes, happy to implement this. ",
    "url": "https://github.com/huggingface/transformers/issues/34981",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2024-11-28T00:24:43Z",
    "updated_at": "2024-11-29T07:35:28Z",
    "user": "brando90"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1055,
    "title": "Support for Typescript docs",
    "body": "### Question\n\nI have been trying to implement server side sentiment analysis using this [tutorial](https://huggingface.co/docs/transformers.js/main/en/tutorials/next#prerequisites) but its in Javascript. I looked through the docs but there seems to be no information on implementing it using Typescript. So far I have integrated Typescript but there is one error that is difficult to fix. This is what I have implemented so far:\r\n\r\npipeline.ts\r\n```ts\r\nimport { pipeline, PipelineType } from \"@huggingface/transformers\";\r\n\r\n// Use the Singleton pattern to enable lazy construction of the pipeline.\r\n// NOTE: We wrap the class in a function to prevent code duplication (see below).\r\nconst P = () => class PipelineSingleton {\r\n    static task: PipelineType = 'text-classification';\r\n    static model = 'Xenova/distilbert-base-uncased-finetuned-sst-2-english';\r\n    static instance: PipelineSingleton | null = null;\r\n\r\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\r\n    static async getInstance(progress_callback: Function | undefined = undefined) {\r\n        if (!this.instance) {\r\n            this.instance = pipeline(this.task, this.model, { progress_callback });\r\n        }\r\n        return this.instance;\r\n    }\r\n}\r\n\r\nlet PipelineSingleton: ReturnType<typeof P>;\r\nif (process.env.NODE_ENV !== 'production') {\r\n    // When running in development mode, attach the pipeline to the\r\n    // global object so that it's preserved between hot reloads.\r\n    // For more information, see https://vercel.com/guides/nextjs-prisma-postgres\r\n    const globalWithPipeline = global as typeof global & { PipelineSingleton: ReturnType<typeof P> };\r\n\r\n    if (!globalWithPipeline.PipelineSingleton) {\r\n        globalWithPipeline.PipelineSingleton = P();\r\n    }\r\n\r\n    PipelineSingleton = globalWithPipeline.PipelineSingleton;\r\n} else {\r\n    PipelineSingleton = P();\r\n}\r\nexport default PipelineSingleton;\r\n```\r\n\r\nrequest.ts\r\n```ts\r\nimport { NextResponse } from 'next/server'\r\nimport PipelineSingleton from './pipeline';\r\n\r\nexport async function GET(request: Request) {\r\n    // Extract the text parameter from the query string\r\n    const url = new URL(request.url);\r\n    const text = url.searchParams.get('text');\r\n    if (!text) {\r\n        return NextResponse.json({\r\n            error: 'Missing text parameter',\r\n        }, { status: 400 });\r\n    }\r\n    // Get the classification pipeline. When called for the first time,\r\n    // this will load the pipeline and cache it for future use.\r\n    const classifier = await PipelineSingleton.getInstance();  // SHOWS THE ERROR -  Type 'PipelineSingleton' has no call signatures.ts(2349)\r\n\r\n    // Actually perform the classification\r\n    const result = await classifier(text);\r\n\r\n    return NextResponse.json(result);\r\n}\r\n```\r\n\r\nThe problem is in the routes.ts when calling the classifier method. Typescript shows the error: \r\n\r\n> This expression is not callable.\r\n>   Type 'PipelineSingleton' has no call signatures.ts(2349)\r\n\r\n\r\nSo this probably means that my Typescript implementation is incorrect for Pipeline. Would appreciate any help on this. TIA.",
    "url": "https://github.com/huggingface/transformers.js/issues/1055",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-26T21:38:54Z",
    "updated_at": "2024-11-27T02:20:59Z",
    "user": "SadmanYasar"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7299,
    "title": "Efficient Image Augmentation in Hugging Face Datasets",
    "body": "### Describe the bug\r\n\r\n I'm using the Hugging Face datasets library to load images in batch and would like to apply a torchvision transform to solve the inconsistent image sizes in the dataset and apply some on the fly image augmentation. I can just think about using the collate_fn, but seems quite inefficient. \r\n \r\n I'm new to the Hugging Face datasets library, I didn't find nothing in the documentation or the issues here on github.\r\n\r\nIs there an existing way to add image transformations directly to the dataset loading pipeline? \r\n\r\n### Steps to reproduce the bug\r\n\r\nfrom datasets import load_dataset\r\nfrom torch.utils.data import DataLoader\r\n\r\n```python\r\ndef collate_fn(batch):\r\n    images = [item['image'] for item in batch]\r\n    texts = [item['text'] for item in batch]\r\n    return {\r\n        'images': images,\r\n        'texts': texts\r\n    }\r\n\r\ndataset = load_dataset(\"Yuki20/pokemon_caption\", split=\"train\")\r\ndataloader = DataLoader(dataset, batch_size=4, collate_fn=collate_fn)\r\n\r\n# Output shows varying image sizes:\r\n# [(1280, 1280), (431, 431), (789, 789), (769, 769)]\r\n```\r\n\r\n### Expected behavior\r\n\r\nI'm looking for a way to resize images on-the-fly when loading the dataset, similar to PyTorch's Dataset.__getitem__ functionality. This would be more efficient than handling resizing in the collate_fn.\r\n\r\n\r\n### Environment info\r\n\r\n- `datasets` version: 3.1.0\r\n- Platform: Linux-6.5.0-41-generic-x86_64-with-glibc2.35\r\n- Python version: 3.11.10\r\n- `huggingface_hub` version: 0.26.2\r\n- PyArrow version: 18.0.0\r\n- Pandas version: 2.2.3\r\n- `fsspec` version: 2024.9.0\r\n",
    "url": "https://github.com/huggingface/datasets/issues/7299",
    "state": "open",
    "labels": [],
    "created_at": "2024-11-26T16:50:32Z",
    "updated_at": "2024-11-26T16:53:53Z",
    "comments": 0,
    "user": "fabiozappo"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 527,
    "title": "Is there a `select_actions` abstraction?",
    "body": "This line references a `select_actions` function which doesn't seem to exist. This functionality (abstract away access to the future action queue, instead of just returning the first action) would be useful - did it use to / will it exist?\r\nhttps://github.com/huggingface/lerobot/blob/96c7052777aca85d4e55dfba8f81586103ba8f61/lerobot/common/policies/act/modeling_act.py#L102",
    "url": "https://github.com/huggingface/lerobot/issues/527",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2024-11-26T14:22:31Z",
    "updated_at": "2025-10-08T08:33:51Z",
    "user": "genemerewether"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10025,
    "title": "attention mask for transformer Flux",
    "body": "### Describe the bug\r\n\r\nIs it possible to get back the `attention_mask` argument in the flux attention processor \r\n\r\n```\r\nhidden_states = F.scaled_dot_product_attention(query, key, value, dropout_p=0.0, is_causal=False,attn_mask=attention_mask)\r\n```\r\n\r\nhttps://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L1910\r\n\r\nin order to tweak things a bit ? otherwise the argument  `attention_mask`  is unused.\r\n\r\nThanks a lot \r\n\r\n### Reproduction\r\n\r\npip install diffusers\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\nUbuntu\r\n\r\n### Who can help?\r\n\r\n@yiyixuxu @sayakpaul @DN6 @asomoza ",
    "url": "https://github.com/huggingface/diffusers/issues/10025",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-11-26T08:51:20Z",
    "updated_at": "2024-12-05T00:22:37Z",
    "comments": 19,
    "user": "christopher5106"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3263,
    "title": "How to load checkpoint shards one by one to avoid OOM error?",
    "body": "### System Info\r\n\r\n```Shell\r\n- `Accelerate` version: 1.1.0\r\n- Platform: Linux-5.10.112-005.ali5000.al8.x86_64-x86_64-with-glibc2.17\r\n- `accelerate` bash location: /home/admin/anaconda3/envs/llama_factory/bin/accelerate\r\n- Python version: 3.10.14\r\n- Numpy version: 1.26.4\r\n- PyTorch version (GPU?): 2.4.1+cu121 (True)\r\n- PyTorch XPU available: False\r\n- PyTorch NPU available: False\r\n- PyTorch MLU available: False\r\n- PyTorch MUSA available: False\r\n- System RAM: 128.00 GB\r\n- GPU type: NVIDIA H20\r\n- `Accelerate` default config:\r\n        - compute_environment: LOCAL_MACHINE\r\n        - distributed_type: MULTI_GPU\r\n        - mixed_precision: no\r\n        - use_cpu: False\r\n        - debug: False\r\n        - num_processes: 8\r\n        - machine_rank: 0\r\n        - num_machines: 1\r\n        - gpu_ids: all\r\n        - rdzv_backend: static\r\n        - same_network: True\r\n        - main_training_function: main\r\n        - enable_cpu_affinity: False\r\n        - downcast_bf16: no\r\n        - tpu_use_cluster: False\r\n        - tpu_use_sudo: False\r\n        - tpu_env: []\r\n```\r\n\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\r\n- [X] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nMy code can run on 1/2/3/4 GPU(s), but errors occur when I try to use more GPUs.\r\n\r\nThe command I use :\r\n`accelerate launch --multi_gpu --gpu_ids 0,1,2,3,4,5,6,7,8 --num_processes 8 --main_process_port 2525 ./train_args_multi.py --batch_size 4 --save_name tmp_model_multi`\r\n\r\nThe code where errors occur:\r\n```\r\n    accelerator = Accelerator()\r\n    device = accelerator.device\r\n    print('Device: ', device)\r\n\r\n    model = MyModel(path=path, device=device).to(device)\r\n\r\n    random.seed(seed)\r\n    torch.manual_seed(seed)\r\n    np.random.seed(seed)\r\n\r\n    train_data, train_loader = data_provider(train_data_path, batch_size, num_workers=num_workers, flag='train')\r\n    test_data, test_loader = data_provider(test_data_path, batch_size, num_workers=num_workers, flag='test')\r\n    \r\n    model_optim = optim.Adam(trained_parameters, lr=learning_rate)\r\n    \r\n    print('Preparing for accelerator...')\r\n    model, model_optim, train_loader, test_loader = accelerator.prepare(model, model_optim, train_loader, test_loader)\r\n```\r\n\r\n### Expected behavior\r\n\r\nErrors occur when loading checkpoint shards (as the bar shows below):\r\n```\r\n$accelerate launch --multi_gpu --num_processes 8 --gpu_ids 0,1,2,3,4,5,6,7 --main_process_port 25252 ./train_args_multi.py --batch_size 4 --save_name tmp_model_multi\r\nDevice:  cuda:0    \r\nDevice:  cuda:6                                       \r\nLoading checkpoint shards:   0%|                                                                                                                                                                                                                                                      | 0/4 [00:00<?, ?it/s$\r\nDevice:  cuda:5    \r\nDevice:  cuda:3                                                                \r\nDevice:  cuda:4\r\nDevice:  cuda:7\r\nDevice:  cuda:1\r\nDevice:  cuda:2\r\nLoading checkpoint shards:  50%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588                                                                                                                       | 2/4 [00:11<00:12,  6....r(args)\r\n  File \"/home/admin/anaconda3/envs/llama_factory/lib/python3.10/site-packages/accelerate/commands/launch.py\", line 793, in multi_gpu_launcher\r\n    distrib_run.run(args)\r\n  File \"/home/admin/anaconda3/envs/llama_factory/lib/python3.10/site-packages/torch/distributed/run.py\", line 892, in run\r\n    elastic_launch(\r\n  File \"/home/admin/anaconda3/envs/llama_factory/lib/python3.10/site-packages/torch/distributed/launcher/api.py\", line 133, in __call__\r\n    return launch_agent(self._config, self._entrypoint, list(args))\r\n  File \"/home/admin/anaconda3/envs/llama_factory/lib/python3.10/site-packages/torch/distributed/launcher/api.py\", line 264, in launch_agent\r\n    raise ChildFailedError(\r\ntorch.distributed.elastic.multiprocessing.errors.ChildFailedError:\r\n======================================================\r\n./train_args_multi.py FAILED\r\n------------------------------------------------------\r\nFailures:\r\n  <NO_OTHER_FAILURES>\r\n------------------------------------------------------\r\nRoot Cause (first observed failure):\r\n[0]:\r\n  time      : 2024-11-26_16:17:47\r\n  host      : pe-resource-pool033093226243.center\r\n  rank      : 5 (local_rank: 5)\r\n  exitcode  : -9 (pid: 84403)\r\n  error_file: <N/A>\r\n  traceback : Signal 9 (SIGKILL) received by PID 84403\r\n======================================================\r\n(llama_factory)\r\n```\r\n\r\nI found that the memory ran out (not CUDA memory) when loading the models b",
    "url": "https://github.com/huggingface/accelerate/issues/3263",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-26T08:25:37Z",
    "updated_at": "2025-01-06T15:06:50Z",
    "user": "amoyplane"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 700,
    "title": "Is `autocast` needed with FSDP2?",
    "body": "Hi, is it necessary to wrap the forward pass in `autocast` when using FSDP2? I noticed that the `torchtitan` training loop does not.\r\n\r\nIf I wrap in `torch.autocast(device_type=\"cuda\", dtype=torch.bfloat16)` my matmuls will be `bfloat16`, but my softmaxes (say) will be in `float32`. This behavior requires the autocast wrapper:\r\n```python\r\nt = torch.randn(100, device=\"cuda\", dtype=torch.bfloat16)\r\n\r\nwith torch.autocast(device_type=\"cuda\", dtype=torch.bfloat16):\r\n    out = t.softmax(dim=-1)\r\n\r\nout.dtype # torch.float32\r\n\r\n# Without autocast:\r\nt.softmax(dim=-1).dtype # torch.bfloat16\r\n```  \r\nThis is the usual way to do DDP or non-distributed mixed-precision training.\r\n\r\nIt seems to me that this behavior is lost in the `torchtitan` training loop which doesn't use the `autocast` [context manager](https://github.com/garrett361/torchtitan/blob/3247841423429faf37bdf6918204350db293e482/train.py#L308-L314). Is this not true? Does FSDP2 somehow still perform the upcast for the usual upcasted amp ops like softmax?  Not seeing how it might do so, and can't test easily at the moment.\r\n\r\nI believe I correctly understand that `MixedPrecisionPolicy` controls the `dtype`s that weights are held in, reductions are performed in, and whether to cast a given module's outputs to a certain `dtype`, but that is all orthogonal to the dispatcher flags that `autocast` controls, IIUC.\r\n\r\nRelates to #600 and #591. Also, I believe [OLMo uses autocast with FSDP](https://github.com/allenai/OLMo/blob/9c677c90cc881c37787c71373836d6889ad4de4a/olmo/train.py#L799-L809), but that is FSDP1 last time I checked.\r\n\r\nCC @awgu ",
    "url": "https://github.com/pytorch/torchtitan/issues/700",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-25T22:32:13Z",
    "updated_at": "2024-12-05T15:51:06Z",
    "user": "garrett361"
  },
  {
    "repo": "pytorch/vision",
    "number": 8749,
    "title": "Pretrained weights for ResNet[18, 34, 50, 101] are incorrect",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi,\r\n\r\nI have been trying to run the pretrained ResNet models. The model weights seem to be incorrect. Below is a code to reproduce the erroneous results:\r\n\r\n```\r\nimport torch\r\nfrom torchvision.models import resnet18, ResNet18_Weights\r\nfrom PIL import Image\r\n\r\nresnet = resnet18(weights=ResNet18_Weights.IMAGENET1K_V1)\r\npreprocess = ResNet18_Weights.IMAGENET1K_V1.transforms()\r\n\r\n# !wget \"https://github.com/pytorch/hub/raw/master/images/dog.jpg\"\r\ninput_image = Image.open('dog.jpg')\r\n\r\n# !wget https://upload.wikimedia.org/wikipedia/commons/b/b6/Felis_catus-cat_on_snow.jpg -O cat.jpg\r\n# input_image = Image.open('cat.jpg')\r\n\r\ninput_tensor = preprocess(input_image)\r\ninput_batch = input_tensor.unsqueeze(0) # create a mini-batch as expected by the model\r\n\r\nwith torch.no_grad():\r\n    output = resnet(input_batch)\r\n\r\nprobabilities = torch.nn.functional.softmax(output[0], dim=0)\r\n# !wget https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt\r\nwith open(\"imagenet_classes.txt\", \"r\") as f:\r\n    categories = [s.strip() for s in f.readlines()]\r\n\r\n# Show top categories per image\r\ntop5_prob, top5_catid = torch.topk(probabilities, 5)\r\nfor i in range(top5_prob.size(0)):\r\n    print(categories[top5_catid[i]], top5_prob[i].item())\r\n```\r\n\r\nOutput is the same for both \"cat.jpg\" and \"dog.jpg\" for ResNet18:\r\n\r\n```\r\nbucket 0.008743884041905403\r\nplunger 0.006772771943360567\r\nhook 0.005883160978555679\r\npaper towel 0.005243286956101656\r\nashcan 0.005110109690576792\r\n```\r\n\r\nThese predictions are clearly incorrect. Through a noncomprehensive testing, the garbage output occurs for the model weights:\r\n\r\n```\r\nResNet18_Weights.IMAGENET1K_V1\r\nResNet34_Weights.IMAGENET1K_V1\r\nResNet50_Weights.IMAGENET1K_V1\r\nResNet101_Weights.IMAGENET1K_V1\r\n```\r\n\r\nwhile the output for the following model weights are correct:\r\n\r\n```\r\nResNet50_Weights.IMAGENET1K_V2\r\nResNet101_Weights.IMAGENET1K_V2\r\n```\r\n\r\nMy guess is that the pretrained weight files are linked incorrectly for the V1 models.\n\n### Versions\n\nCollecting environment information...\r\nPyTorch version: 2.5.1\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.4\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Rocky Linux 9.4 (Blue Onyx) (x86_64)\r\nGCC version: (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\nLibc version: glibc-2.34\r\n\r\nPython version: 3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:38:13) [GCC 12.3.0] (64-bit runtime)\r\nPython platform: Linux-5.14.0-427.42.1.el9_4.x86_64-x86_64-with-glibc2.34\r\nIs CUDA available: True\r\nCUDA runtime version: 12.4.131\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: \r\nGPU 0: NVIDIA A10\r\nGPU 1: NVIDIA A10\r\n\r\nNvidia driver version: 550.54.15\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                         x86_64\r\nCPU op-mode(s):                       32-bit, 64-bit\r\nAddress sizes:                        46 bits physical, 57 bits virtual\r\nByte Order:                           Little Endian\r\nCPU(s):                               96\r\nOn-line CPU(s) list:                  0-95\r\nVendor ID:                            GenuineIntel\r\nModel name:                           Intel(R) Xeon(R) Gold 6342 CPU @ 2.80GHz\r\nCPU family:                           6\r\nModel:                                106\r\nThread(s) per core:                   2\r\nCore(s) per socket:                   24\r\nSocket(s):                            2\r\nStepping:                             6\r\nCPU(s) scaling MHz:                   98%\r\nCPU max MHz:                          3500.0000\r\nCPU min MHz:                          800.0000\r\nBogoMIPS:                             5600.00\r\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect wbnoinvd dtherm ida arat pln pts vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities\r\nVirtualization:                       VT-x\r\nL1d cache:                            2.3 MiB (48 instances)\r\nL1i cache:                            1.5 MiB (48 instances)\r\nL2 cache:     ",
    "url": "https://github.com/pytorch/vision/issues/8749",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-25T22:17:58Z",
    "updated_at": "2024-11-27T18:24:38Z",
    "comments": 3,
    "user": "longyuxi"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 525,
    "title": "Train a RL agent (without initial dataset)",
    "body": "Hi,\r\n\r\nI'm currently working on trying to integrate the following environment in the repo : https://github.com/perezjln/gym-lowcostrobot\r\nI would like to use it for learning a RL agent in sim and try it out on the real robot after.\r\nHowever, the current training script requires to have a local or online pre-recorded dataset. Is there a way to avoid this and pass an option to not load a dataset ? \r\n\r\nThank you in advance",
    "url": "https://github.com/huggingface/lerobot/issues/525",
    "state": "closed",
    "labels": [
      "enhancement",
      "question",
      "simulation"
    ],
    "created_at": "2024-11-25T20:02:38Z",
    "updated_at": "2025-04-07T16:19:01Z",
    "user": "alexcbb"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1592,
    "title": "Add Markdown support for user messages",
    "body": "## Describe your feature request\r\n\r\nIn pr #1562 , a WSIWYG editor has been added to the text input area, however, when a text is sent, it is displayed in unrendered markdown. The idea is to use `marked` to conditionally render certain elements in the user's sent message into markdown, and leave others untouched.\r\n\r\nThe WSIWYG editor currently converts the following into markdown:\r\n- bold\r\n- italic\r\n- code blocks\r\n- code spans\r\n\r\nThe sent user messages should display those specific elements converted into markdown, and leave the rest untouched and unconverted, such as headings.\r\n\r\n## Screenshots\r\n\r\nAn example of how a user message is currently displayed:\r\n\r\n![image](https://github.com/user-attachments/assets/71ab2877-28c8-4676-a06a-ac403e101fac)\r\n\r\n\r\n## Implementation idea\r\n\r\nThe idea is to create a custom `renderer` which might be done using `marked` to be used when the message sender is the `user`. \r\n\r\nThe renderer allows certain modifications, such as explicitly specifying what it should and should not convert, something like:\r\n\r\n```typescript\r\n\tconst renderer = new marked.Renderer();\r\n\r\n\trenderer.list = (body, _ordered) => {\r\n\t\treturn body;\r\n\t};\r\n\trenderer.heading = (text: string, _level: number) => {\r\n\t\treturn text;\r\n\t};\r\n\t// continue to disable unwanted features\r\n\r\n\t// enable what we need\r\n\trenderer.code = (code: string) => `<pre><code>${code}</code></pre>`;\r\n\trenderer.codespan = (text: string) => `<code>${text}</code>`;\r\n\trenderer.strong = (text: string) => `<strong>${text}</strong>`;\r\n\trenderer.em = (text: string) => `<em>${text}</em>`;\r\n```\r\n\r\nHowever any other implementation ideas are welcome!\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1592",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-11-25T17:26:10Z",
    "updated_at": "2024-11-27T20:42:19Z",
    "comments": 2,
    "user": "Mounayer"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3260,
    "title": "How to Properly Resume Multi-GPU Training with accelerate launch Without OOM or Loss Issues?",
    "body": "I encountered an issue while running multi-GPU training using `accelerate launch`. I am using 4 GPUs for training, and during the process, I save my model state using:\r\n\r\n```python\r\naccelerator.save_state(state_path)\r\n```\r\n\r\nLater, I attempt to resume training by loading the model parameters with:\r\n\r\n```python\r\naccelerator.load_state(state_path)\r\n```\r\n\r\nHowever, when I start training again, I observe multiple strange processes on the first GPU, which causes an OOM (out of memory) error, as shown in the attached figure.\r\n\r\nTo address this, I tried adding the following line before:\r\n\r\n```python\r\naccelerator.load_state(state_path)\r\n```\r\n\r\nThe updated code looks like this:\r\n\r\n```python\r\nif self.accelerator.is_main_process:\r\n    self.accelerator.load_state(state_path)\r\n```\r\n\r\nI then used:\r\n\r\n```python\r\naccelerator.wait_for_everyone()\r\n```\r\n\r\nafterward to synchronize the model state across all four GPUs. While this resolved the issue of multiple processes on the first GPU, the model's loss increases significantly. It seems that the trained weights are not being properly synchronized across all GPUs.\r\n\r\nCould anyone please suggest how to correctly resume training in a multi-GPU setup with `accelerate launch`, ensuring the model weights are properly loaded and synchronized across all devices? Thank you!\r\n\r\n![\u5fae\u4fe1\u56fe\u7247_20241124170918](https://github.com/user-attachments/assets/b83375b8-6da2-4b70-b7ed-2c6b6c110825)\r\n![\u5fae\u4fe1\u56fe\u7247_20241124170833](https://github.com/user-attachments/assets/b0aad650-083e-418d-bdd7-60f8e485d7bd)\r\n",
    "url": "https://github.com/huggingface/accelerate/issues/3260",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-25T17:19:06Z",
    "updated_at": "2025-05-29T10:26:13Z",
    "user": "tqxg2018"
  },
  {
    "repo": "pytorch/xla",
    "number": 8413,
    "title": "Review documentation in the docs/source/contribute directory",
    "body": "## \ud83d\udcda Documentation\r\n\r\nReview content in the docs/source/learn directory to improve readability and ensure it aligns with Google documentation standards.\r\n",
    "url": "https://github.com/pytorch/xla/issues/8413",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-11-25T17:13:51Z",
    "updated_at": "2025-06-02T21:59:49Z",
    "comments": 2,
    "user": "mikegre-google"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1589,
    "title": "Models using OpenAI endpoint have caching enabled",
    "body": "When using models that are currently using the OpenAI endpoint type on HuggingChat (Nemotron, llama 3.2, qwen coder) they seem to have caching enabled. \n\nThis means retrying will just reload the previous response extremely quickly. This is not the intended behaviour and does not match what is happening when using the TGI endpoint.\n ",
    "url": "https://github.com/huggingface/chat-ui/issues/1589",
    "state": "closed",
    "labels": [
      "huggingchat"
    ],
    "created_at": "2024-11-25T12:47:01Z",
    "updated_at": "2025-03-12T12:56:00Z",
    "comments": 1,
    "user": "nsarrazin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 141473,
    "title": "How to use torch.compile + HF model?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nProblem: There seem to be 2 ways of using torch compile with a HF model, both of which don't work for all the ways a model inference is called, which is one of 3 possible methods: `generate()`, `forward()` and `__call__()`.\r\n\r\n## Option 1: `model = torch.compile(model)`\r\n\r\nThis works if we use either `forward()` or the `__call__()` methods. But, if we try to call the `.generate()` method (which is the more popular API for inferencing and calls `forward()` internally), we notice that we DON'T seem to be using the compiled model (ex. `TORCH_LOGS=\"dynamo\"` gives no output).\r\n\r\nSimple reproducible example (custom class with `generate` and `forward` like implementations):\r\n```\r\nimport torch\r\n\r\nclass MyModule(torch.nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n\r\n    def forward(self, input):\r\n        # return average of the inputs\r\n        return torch.Tensor(torch.sum(input)/len(input))\r\n\r\n    def generate(self, max_tokens, input):\r\n        for i in range(max_tokens):\r\n            output = self(input) # Doesn't work with either call or forward\r\n            input = torch.cat((input, output.view(1)))\r\n        return input\r\n\r\nmodel = MyModule()\r\nmodel = torch.compile(model)\r\ninput = torch.rand(4)\r\noutput = model.generate(input=input, max_tokens=3) # THIS DOES NOT WORK!!!\r\n#output = model.forward(input=input) # THIS WORKS\r\n``` \r\n\r\nor use any HF model compile followed by generate:\r\n```\r\nmodel = AutoModelForCausalLM.from_pretrained(\"facebook/opt-125m\")\r\nmodel = torch.compile(model)\r\noutput = model.generate(input_ids, max_new_tokens=100)\r\n```\r\n\r\nThe problem is that the output of `torch.compile(model)` is an `OptimizedModule` object with the `__call__()` set to the compiled forward and `orig_mod` set to `model` itself. \r\nWhen `compiled_model.generate()` is called, this accesses the generate through the `__getattr__()` function which gets the model's generate. That `generate` calls `self()`, which calls the original model's forward instead of the compiled forward.\r\n\r\n## Option 2: `model.compile()`\r\nThe other option is to use the `torch.nn.Module`'s compile, which does an inplace modification where the compiled forward is stored in `_compiled_call_impl` variable and used when `__call__()` is done. But, this only works with the `__call__()` method and does NOT work with the `forward()` method. If the `generate()` internally uses call, then generate works.\r\n\r\n```\r\nmodel.compile()\r\noutput = model.generate(input=input, max_tokens=3) # Works\r\n#output = model.forward(input_ids) # DOES NOT WORK\r\n```\r\n\r\nProblem is that neither of these approaches works with both `generate()` and `forward()` methods. \r\n\r\nAs an aside, I tried a couple of unsuccessful possible fixes:\r\n- Tried if Option 1 could be fixed somehow by setting the `orig_mod.forward` to the compiled forward but that causes infinite recursion because of the circular dependency\r\n- I also tried changing  `TorchDynamoContext.__call__()` (in `eval_frame.py`) in the nn.Module case, to internally do `model.compile` instead of creating an OptimizedModule. This fixes things slightly, for ex. Option 1 works if it generate uses `call` instead of `forward`, but obviously, not really a solution.\r\n\r\ncc: @chanderg\r\n\r\n### Error logs\r\n\r\n_No response_\r\n\r\n### Versions\r\n\r\nCollecting environment information...\r\nPyTorch version: 2.6.0.dev20241103+cu124\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.4\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 22.04.4 LTS (x86_64)\r\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\r\nClang version: Could not collect\r\nCMake version: version 3.30.2\r\nLibc version: glibc-2.35\r\n\r\nPython version: 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] (64-bit runtime)\r\nPython platform: Linux-5.14.0-284.73.1.el9_2.x86_64-x86_64-with-glibc2.35\r\nIs CUDA available: True\r\nCUDA runtime version: 12.6.68\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: \r\nGPU 0: NVIDIA A100-SXM4-80GB\r\nGPU 1: NVIDIA A100-SXM4-80GB\r\nGPU 2: NVIDIA A100-SXM4-80GB\r\nGPU 3: NVIDIA A100-SXM4-80GB\r\nGPU 4: NVIDIA A100-SXM4-80GB\r\nGPU 5: NVIDIA A100-SXM4-80GB\r\nGPU 6: NVIDIA A100-SXM4-80GB\r\nGPU 7: NVIDIA A100-SXM4-80GB\r\n\r\nNvidia driver version: 525.105.17\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.4.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.4.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.4.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.4.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.4.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.4.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.4.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.4.0\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                       x86_64\r\nCPU op-mode(s):                     32-bit, 64-bit\r\nAddress sizes:                      48 bits physical, 48 bits virtual\r\nByte Order:                         Little Endian\r\nCPU(s):  ",
    "url": "https://github.com/pytorch/pytorch/issues/141473",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2024-11-25T05:19:31Z",
    "updated_at": "2024-11-26T04:21:05Z",
    "user": "SilverSoldier"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 10004,
    "title": "how to use kohya sd-scripts flux loras with text encoder keys in diffusers?",
    "body": "resulting lora weights from setting train text encoder to true is incompatible with diffusers load_lora_weights. the script networks/convert_flux_lora.py does not convert the text encoder keys either.",
    "url": "https://github.com/huggingface/diffusers/issues/10004",
    "state": "open",
    "labels": [
      "contributions-welcome"
    ],
    "created_at": "2024-11-23T20:54:30Z",
    "updated_at": "2025-03-16T15:39:25Z",
    "user": "neuron-party"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 141422,
    "title": "What is \"recompilation profiler\" in doc? (Seems to have a dangling link)",
    "body": "### \ud83d\udcda The doc issue\n\nhttps://pytorch.org/docs/stable/torch.compiler_faq.html says:\r\n\r\n![image](https://github.com/user-attachments/assets/83bd3f29-6ed2-4ce3-b93f-65cc25ed412c)\r\n\r\nBut by clicking on it, it jumps to nowhere. I would appreciate it if I could know how to debug this excessive recompilation issue.\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames",
    "url": "https://github.com/pytorch/pytorch/issues/141422",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2024-11-23T06:01:44Z",
    "updated_at": "2024-11-26T23:22:21Z",
    "user": "fzyzcjy"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 696,
    "title": "[question] Need clarification on the purpose and performance benefits of GarbageCollection class",
    "body": "For the [impl](https://github.com/pytorch/torchtitan/blob/5525d7723175a1b4477bde3034a96f803b6c3fae/torchtitan/utils.py#L104)\r\n\r\nI have several questions about the motivation and use cases for this class:\r\n\r\nCould you provide examples of scenarios where this class can improves performance? compare against default Python GC?\r\n\r\nTo my understanding, during backward, activation cuda memory should be released timely when we run backward in computational graph, will the GarbageCollection affect how we release cuda memory?\r\n\r\nWhat are the tradeoffs of disabling automatic GC (gc.disable())?",
    "url": "https://github.com/pytorch/torchtitan/issues/696",
    "state": "closed",
    "labels": [
      "documentation",
      "question"
    ],
    "created_at": "2024-11-23T04:39:20Z",
    "updated_at": "2024-11-26T00:25:12Z",
    "user": "qsh-zh"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1050,
    "title": "How to lengthen the Whisper max audio length?",
    "body": "### Question\n\nI'm working from the [webgpu-whisper](https://github.com/huggingface/transformers.js/tree/main/examples/webgpu-whisper) demo, and I'm having a hard time lengthening the maximum audio input allowed. I made the following changes:\r\n```js\r\n-const MAX_AUDIO_LENGTH = 30; // seconds\r\n+const MAX_AUDIO_LENGTH = 120; // seconds\r\n\r\n-const MAX_NEW_TOKENS = 64;\r\n+const MAX_NEW_TOKENS = 624;\r\n```\r\n\r\nThis seems to allow for longer input, but after 30 seconds I get the following error:\r\n```\r\nAttempting to extract features for audio longer than 30 seconds. If using a pipeline to extract transcript from a long audio clip, remember to specify `chunk_length_s` and/or `stride_length_s`.\r\n```\r\n\r\nI can't seem to find where to add [stride_length_s](https://huggingface.co/docs/transformers.js/main/en/api/pipelines#pipelinesautomaticspeechrecognitionpipelinetype--code-promise--automaticspeechrecognitionoutputarray--automaticspeechrecognitionoutput----code) in the demo code, however. Could someone point me in the right direction?",
    "url": "https://github.com/huggingface/transformers.js/issues/1050",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-22T17:50:50Z",
    "updated_at": "2024-11-26T03:59:03Z",
    "user": "stinoga"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9996,
    "title": "Flux.1 cannot load standard transformer in nf4",
    "body": "### Describe the bug\n\nloading different flux transformer models is fine except for nf4.\r\nit works for 1% of fine-tunes provided on Huggingface, but it doesn't work for 99% standard fine-tunes available on CivitAI.\r\n\r\nexample of such model: <https://civitai.com/models/118111?modelVersionId=1009051>\r\n\r\n*note* i'm using `FluxTransformer2DModel` directly as its easiest for reproduction plus majority of flux fine-tunes are provided as transformer-only, not full models. but where full model does exist, its exactly the same problem using `FluxPipeline`\n\n### Reproduction\n\n```py\r\nimport torch\r\nimport bitsandbytes as bnb\r\nimport diffusers\r\n\r\nprint(f'torch=={torch.__version__} diffusers=={diffusers.__version__} bnb=={bnb.__version__}')\r\nkwargs = { 'low_cpu_mem_usage': True, 'torch_dtype': torch.bfloat16, 'cache_dir': '/mnt/models/huggingface' }\r\nfiles = [\r\n    'flux-c4pacitor_v2alpha-f1s-bf16.safetensors',\r\n    'flux-iniverse_v2-f1d-fp8.safetensors',\r\n    'flux-copax_timeless_xplus_mix2-nf4.safetensors',\r\n]\r\n\r\nfor f in files:\r\n    print(f)\r\n    try:\r\n        transformer = diffusers.FluxTransformer2DModel.from_single_file(f, **kwargs)\r\n        print(transformer.__class__)\r\n    except Exception as e:\r\n        print(e)\r\n    transformer = None\r\n    torch.cuda.empty_cache()\r\n```\n\n### Logs\n\n```shell\nin `diffusers/loaders/single_file_utils.py:convert_flux_transformer_checkpoint_to_diffusers`\r\n\r\n\r\nq, k, v, mlp = torch.split(checkpoint.pop(f\"single_blocks.{i}.linear1.weight\"), split_size, dim=0)\r\n\r\n\r\n> RuntimeError: split_with_sizes expects split_sizes to sum exactly to 33030144 (input tensor's size at dimension 0), but got split_sizes=[3072, 3072, 3072, 12288]\n```\n\n\n### System Info\n\ntorch==2.5.1+cu124 diffusers==0.32.0.dev0 bnb==0.44.1\n\n### Who can help?\n\n@yiyixuxu @sayakpaul @DN6 @asomoza",
    "url": "https://github.com/huggingface/diffusers/issues/9996",
    "state": "open",
    "labels": [
      "bug",
      "wip"
    ],
    "created_at": "2024-11-22T16:55:11Z",
    "updated_at": "2024-12-28T19:56:54Z",
    "comments": 16,
    "user": "vladmandic"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9990,
    "title": "How to diagnose problems in training custom inpaint model",
    "body": "### Discussed in https://github.com/huggingface/diffusers/discussions/9989\r\n\r\n<div type='discussions-op-text'>\r\n\r\n<sup>Originally posted by **Marquess98** November 22, 2024</sup>\r\nWhat I want to do is to perform image inpainting when the input is a set of  multimodal images, using sdxl as the pre trained model. But the results are very poor now, and I cannot determine whether it is a problem with the code, dataset, pre trained model, or training parameters.  \r\nThe infer code snipped is as follows:\r\n\r\n    noise_scheduler = DDIMScheduler.from_pretrained(\"stable-diffusion-v1-5/stable-diffusion-v1-5\", subfolder=\"scheduler\")\r\n    noise_scheduler.set_timesteps(denoise_steps, device=device)\r\n\r\n    zi = vae.encode(masked_image).latent_dist.sample()\r\n    # zi = vae.encode(masked_image).latent_dist.sample()\r\n    zi = zi * vae.config.scaling_factor\r\n    \r\n    zd = vae.encode(img2).latent_dist.sample()\r\n    zd = zd * vae.config.scaling_factor\r\n\r\n    zi_m = vae.encode(masked_image).latent_dist.sample()\r\n    zi_m = zi_m * vae.config.scaling_factor\r\n\r\n    noise = torch.randn_like(zi)\r\n    denoise_steps = torch.tensor(denoise_steps,dtype=torch.int32,device=device)\r\n    timesteps_add, _  = get_timesteps(noise_scheduler, denoise_steps, 1.0, device, denoising_start=None)\r\n    start_step = 5\r\n\r\n    zi_t = noise_scheduler.add_noise(zi, noise, timesteps_add[start_step])  \r\n    # mask = mask.unsqueeze(1)\r\n    m = F.interpolate(mask.to(zi.dtype), size=(zi.shape[2], zi.shape[3]), \r\n                        mode='bilinear', align_corners=False)\r\n\r\n    input_ids = dataset[\"prompt_ids\"].to(device)\r\n    input_ids = input_ids.unsqueeze(0)\r\n    encoder_hidden_states = text_encoder(input_ids, return_dict=False)[0]\r\n\r\n    timesteps = noise_scheduler.timesteps\r\n    iterable = tqdm(\r\n        enumerate(timesteps),\r\n        total=len(timesteps),\r\n        leave=False,\r\n        desc=\" \" * 4 + \"Diffusion denoising\",\r\n    )\r\n    # iterable = enumerate(timesteps)\r\n    start_step = 1\r\n    # -----------------------denoise------------------------\r\n    for i, t in iterable:\r\n        if i >= start_step:\r\n            unet_input = torch.cat([zi_t, zi_m, zd, m], dim=1)      \r\n            with torch.no_grad():\r\n                noise_pred = unet(unet_input, t, \r\n                                    encoder_hidden_states)[0]\r\n            zi_t = noise_scheduler.step(noise_pred, t, zi_t).prev_sample\r\n\r\n    # torch.cuda.empty_cache()\r\n    decode_rgb = vae.decode(zi_t / vae.config.scaling_factor)\r\n    decode_rgb = decode_rgb['sample'].squeeze()\r\n\r\nAnd the results of different start_steps are as follow:[0, 5, 15 respectively]\r\n![frame_000940_pred_ddim_st_0](https://github.com/user-attachments/assets/31012f83-c477-4284-88bf-5b30077cb4d3)\r\n![frame_000940_pred_ddim_st_5](https://github.com/user-attachments/assets/bdea4e07-ab06-4ba9-a429-7546d7df06cb)\r\n![frame_000940_pred_ddim_st_15](https://github.com/user-attachments/assets/9f8f3eff-3589-4b82-8553-33e1b084da34)\r\n\r\nAnother wired thing is the decoder_rgb range is about [-2, 2], Shouldn't its range be [-1, 1] ?\r\nCurrently, I think the problem may lie in either the infer code or the scale of dataset\uff08about 5000 sets images so far\uff09. Can someone guide me on how to determine which part of the problem it is? \r\nAny suggestions and ideas will be greatly appreciated !!!!</div>",
    "url": "https://github.com/huggingface/diffusers/issues/9990",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-22T03:16:50Z",
    "updated_at": "2024-11-23T13:37:53Z",
    "user": "Marquess98"
  },
  {
    "repo": "pytorch/executorch",
    "number": 7030,
    "title": "how to build a llama2 runner binary with vulkan backends in the server with intel x86 server",
    "body": "### \ud83d\udcda The doc issue\n\nhttps://pytorch.org/executorch/stable/native-delegates-executorch-vulkan-delegate.html\r\nhttps://pytorch.org/executorch/stable/build-run-vulkan.html\r\ndear helper, above documentation descripe how to build the LLaMA runner binary on Android with VULKAN backend. however I can't find how to build the LLaMA runner binary onthe server with intel x86 server with vulkan backends. Could you help me about the issue? thank you in advanced.\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @SS-JIA @manuelcandales",
    "url": "https://github.com/pytorch/executorch/issues/7030",
    "state": "closed",
    "labels": [
      "module: vulkan",
      "triaged"
    ],
    "created_at": "2024-11-22T03:16:40Z",
    "updated_at": "2025-12-18T21:39:49Z",
    "user": "l2002924700"
  },
  {
    "repo": "pytorch/xla",
    "number": 8405,
    "title": "Einsum is not added to the supported list for autocast",
    "body": "We noticed that einsum is not added to the supported ops list for low precision policy in autocast, is there a reason for that? Does this op have some issues in the support? \r\n",
    "url": "https://github.com/pytorch/xla/issues/8405",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-11-21T17:25:01Z",
    "updated_at": "2025-02-17T14:31:09Z",
    "comments": 3,
    "user": "avizon-aws"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 687,
    "title": "Question about FSDP2 + FP8 all gather",
    "body": "Does FSDP2 work with both FP8 allgather and FP8 linear?",
    "url": "https://github.com/pytorch/torchtitan/issues/687",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-21T17:13:39Z",
    "updated_at": "2024-11-21T23:52:06Z",
    "user": "sbhavani"
  },
  {
    "repo": "huggingface/Google-Cloud-Containers",
    "number": 123,
    "title": "Querying PaliGemma VLMs",
    "body": "My collaborators and I are trying to use your very useful containers to deploy and use Google's PaliGemma models on GCS/Vertex. I was wondering what is the best way to query the model with images, especially if the images are stored locally? I see that there is an [example showing this for Llama Vision](https://github.com/huggingface/Google-Cloud-Containers/blob/main/examples/vertex-ai/notebooks/deploy-llama-vision-on-vertex-ai/vertex-notebook.ipynb) but it seems like you have to pass in the images as urls which may not be feasible for us..\r\n\r\nWe're getting some success by doing something like this, but unsure if that's the right way:\r\n\r\n```py\r\n\r\nimage_path = \"/PATH/rabbit.png\"\r\n\r\nwith open(image_path, \"rb\") as f:\r\n    image = base64.b64encode(f.read()).decode(\"utf-8\")\r\n\r\nimage = f\"data:image/png;base64,{image}\"\r\n\r\noutput = deployed_model.predict(\r\n    instances=[\r\n        {\r\n            \"inputs\":f\"![]({image})What is the animal wearing?\",\r\n            \"parameters\":{\"max_new_tokens\": 100, \"do_sample\": False}\r\n        }\r\n    ]\r\n)\r\n#> space suit\r\n```\r\n\r\nPlease let me know if you need more details! Any assistance would be much appreciated!",
    "url": "https://github.com/huggingface/Google-Cloud-Containers/issues/123",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-21T14:52:41Z",
    "updated_at": "2024-12-04T16:31:01Z",
    "user": "kanishkamisra"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9983,
    "title": "Using StableDiffusionControlNetImg2ImgPipeline Enable_vae_tiling(), seemingly fixed the patch is 512 x 512, where should I set the relevant parameters",
    "body": "```\r\npipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)\r\npipe = pipe.to(\"cuda\")\r\nprompt = \"a beautiful landscape photograph\"\r\npipe.enable_vae_tiling()\r\n```",
    "url": "https://github.com/huggingface/diffusers/issues/9983",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-21T09:21:24Z",
    "updated_at": "2024-12-02T08:32:52Z",
    "user": "reaper19991110"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 305,
    "title": "How to read text files",
    "body": "Hey all is there any text reader in the repo?\r\nI have text files where each line is a document/data sample.\r\n\r\nAre there any readers which can read these kind of files directly?",
    "url": "https://github.com/huggingface/datatrove/issues/305",
    "state": "open",
    "labels": [],
    "created_at": "2024-11-21T06:55:21Z",
    "updated_at": "2025-05-16T10:51:33Z",
    "user": "srinjoym-cerebras"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9979,
    "title": "flux img2img controlnet channels error",
    "body": "### Describe the bug\r\n\r\nWhen I use flux's img2img controlnet for inference, a channel error occurs.\r\n\r\n### Reproduction\r\n```python\r\nimport numpy as np\r\nimport torch\r\nimport cv2\r\nfrom PIL import Image\r\nfrom diffusers.utils import load_image\r\nfrom diffusers import FluxControlNetImg2ImgPipeline, FluxControlNetPipeline\r\nfrom diffusers import FluxControlNetModel\r\nfrom controlnet_aux import HEDdetector\r\n\r\nbase_model = \"black-forest-labs/FLUX.1-dev\"\r\ncontrolnet_model = \"Xlabs-AI/flux-controlnet-hed-diffusers\"\r\ncontrolnet = FluxControlNetModel.from_pretrained(\r\n  controlnet_model,\r\n  torch_dtype=torch.bfloat16,\r\n  use_safetensors=True,\r\n)\r\npipe = FluxControlNetImg2ImgPipeline.from_pretrained(\r\n    base_model, controlnet=controlnet, torch_dtype=torch.bfloat16\r\n)\r\npipe.load_lora_weights(\"./toonystarkKoreanWebtoonFlux_fluxLoraAlpha.safetensors\")\r\n\r\npipe.enable_sequential_cpu_offload()\r\n\r\nhed = HEDdetector.from_pretrained(\"lllyasviel/Annotators\")\r\n\r\nimage_source = load_image(\"./03.jpeg\")\r\ncontrol_image = hed(image_source)\r\ncontrol_image = control_image.resize(image_source.size)\r\nif control_image.mode != 'RGB':\r\n    control_image = control_image.convert('RGB')\r\ncontrol_image.save(f\"./hed_03.png\")\r\n\r\nprompt = \"bird, cool, futuristic\"\r\nimage = pipe(\r\n    prompt,\r\n    image=image_source,\r\n    control_image=control_image,\r\n    control_guidance_start=0.2,\r\n    control_guidance_end=0.8,\r\n    controlnet_conditioning_scale=0.5,\r\n    num_inference_steps=50,\r\n    guidance_scale=6,\r\n).images[0]\r\nimage.save(\"flux.png\")\r\n```\r\n### Logs\r\n\r\n```shell\r\n---------------------------------------------------------------------------\r\nRuntimeError                              Traceback (most recent call last)\r\nCell In[13], line 2\r\n      1 prompt = \"bird, cool, futuristic\"\r\n----> 2 image = pipe(\r\n      3     prompt,\r\n      4     image=image_source,\r\n      5     control_image=control_image,\r\n      6     control_guidance_start=0.2,\r\n      7     control_guidance_end=0.8,\r\n      8     controlnet_conditioning_scale=0.5,\r\n      9     num_inference_steps=50,\r\n     10     guidance_scale=6,\r\n     11 ).images[0]\r\n     12 image.save(\"flux.png\")\r\n\r\nFile /opt/conda/lib/python3.11/site-packages/torch/utils/_contextlib.py:115, in context_decorator.<locals>.decorate_context(*args, **kwargs)\r\n    112 @functools.wraps(func)\r\n    113 def decorate_context(*args, **kwargs):\r\n    114     with ctx_factory():\r\n--> 115         return func(*args, **kwargs)\r\n\r\nFile /opt/conda/lib/python3.11/site-packages/diffusers/pipelines/flux/pipeline_flux_controlnet_image_to_image.py:924, in FluxControlNetImg2ImgPipeline.__call__(self, prompt, prompt_2, image, control_image, height, width, strength, num_inference_steps, timesteps, guidance_scale, control_guidance_start, control_guidance_end, control_mode, controlnet_conditioning_scale, num_images_per_prompt, generator, latents, prompt_embeds, pooled_prompt_embeds, output_type, return_dict, joint_attention_kwargs, callback_on_step_end, callback_on_step_end_tensor_inputs, max_sequence_length)\r\n    921         controlnet_cond_scale = controlnet_cond_scale[0]\r\n    922     cond_scale = controlnet_cond_scale * controlnet_keep[i]\r\n--> 924 controlnet_block_samples, controlnet_single_block_samples = self.controlnet(\r\n    925     hidden_states=latents,\r\n    926     controlnet_cond=control_image,\r\n    927     controlnet_mode=control_mode,\r\n    928     conditioning_scale=cond_scale,\r\n    929     timestep=timestep / 1000,\r\n    930     guidance=guidance,\r\n    931     pooled_projections=pooled_prompt_embeds,\r\n    932     encoder_hidden_states=prompt_embeds,\r\n    933     txt_ids=text_ids,\r\n    934     img_ids=latent_image_ids,\r\n    935     joint_attention_kwargs=self.joint_attention_kwargs,\r\n    936     return_dict=False,\r\n    937 )\r\n    939 guidance = (\r\n    940     torch.tensor([guidance_scale], device=device) if self.transformer.config.guidance_embeds else None\r\n    941 )\r\n    942 guidance = guidance.expand(latents.shape[0]) if guidance is not None else None\r\n\r\nFile /opt/conda/lib/python3.11/site-packages/torch/nn/modules/module.py:1511, in Module._wrapped_call_impl(self, *args, **kwargs)\r\n   1509     return self._compiled_call_impl(*args, **kwargs)  # type: ignore[misc]\r\n   1510 else:\r\n-> 1511     return self._call_impl(*args, **kwargs)\r\n\r\nFile /opt/conda/lib/python3.11/site-packages/torch/nn/modules/module.py:1520, in Module._call_impl(self, *args, **kwargs)\r\n   1515 # If we don't have any hooks, we want to skip the rest of the logic in\r\n   1516 # this function, and just call forward.\r\n   1517 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks\r\n   1518         or _global_backward_pre_hooks or _global_backward_hooks\r\n   1519         or _global_forward_hooks or _global_forward_pre_hooks):\r\n-> 1520     return forward_call(*args, **kwargs)\r\n   1522 try:\r\n   1523     result = None\r\n\r\nFile /opt/conda/lib/python3.11/site-packages/accelerate/hooks.py:170, in add_hook_to_module.<locals>.new_forward(",
    "url": "https://github.com/huggingface/diffusers/issues/9979",
    "state": "closed",
    "labels": [
      "bug",
      "good first issue",
      "help wanted",
      "contributions-welcome"
    ],
    "created_at": "2024-11-21T03:39:12Z",
    "updated_at": "2025-04-23T20:43:51Z",
    "comments": 10,
    "user": "wen020"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9976,
    "title": "ControlNet broken from_single_file",
    "body": "### Describe the bug\r\n\r\ncontrolnet loader from_single_file was originally added via #4084\r\nand method `ControlNet.from_single_file()` works for non-converted controlnets.\r\n\r\nbut for controlnets in safetensors format that contain already converted state_dict, it errors out.\r\n\r\nits not reasonable to expect from user to know what is the internal dict structure of the controlnet safetensors file  \r\nbefore he can use it.\r\n\r\neven worse, some of the newer controlnets are distributed as single-file-only and are already in diffusers format  \r\nwhich makes them impossible to load in difufsers.\r\nfor example: <https://huggingface.co/Laxhar/noob_openpose/tree/main>\r\n\r\nthis issue was already mentioned several times, each time closed as \"works as designed\"  \r\nwhen in reality its just a failure that should be addressed as an issue.  \r\nsee #8474 #9208 #8614 as examples of previous issues\r\n\r\n### Reproduction\r\n\r\nscenario-1: works with non-converted controlnet\r\n```python\r\nimport torch\r\nfrom diffusers import ControlNetModel\r\nfrom huggingface_hub import hf_hub_download\r\nlocal_path = hf_hub_download(repo_id='Aptronym/SDNext', filename='ControlNet11/controlnet11Models_canny.safetensors')\r\ncn = ControlNetModel.from_single_file(local_path, torch_dtype=torch.float16)\r\nprint(cn.__class__)\r\n```\r\n\r\nscenario-1: fails for majority of controlnets available on huggingface\r\n```python\r\nimport torch\r\nfrom diffusers import ControlNetModel\r\nfrom huggingface_hub import hf_hub_download\r\nlocal_path = hf_hub_download(repo_id='lllyasviel/sd_control_collection', filename='diffusers_xl_canny_small.safetensors')\r\ncn = ControlNetModel.from_single_file(local_path, torch_dtype=torch.float16)\r\nprint(cn.__class__)\r\n```\r\ninitial failure is nonsense\r\n> OSError: stable-diffusion-v1-5/stable-diffusion-v1-5 does not appear to have a file named config.json.\r\n\r\nwhats making this worse is that SD15 and SDXL share the same `ControlNet` class which causes some\r\nconfusion on the base repo where to lookup config.\r\ne.g,, here we're loading SDXL controlnet and error referrs to SD15 repo.\r\n\r\nanyhow, trying to force correct config:\r\n```py\r\ncn = ControlNetModel.from_single_file(local_path, torch_dtype=torch.float16, config='diffusers/controlnet-canny-sdxl-1.0-small')\r\n```\r\n\r\nresults in even worse nonsense failure during loading of state_dict:\r\n> TypeError: is_floating_point(): argument 'input' (position 1) must be Tensor, not NoneType\r\n\r\n### System Info\r\n\r\ndiffusers=0.32.0.dev0\r\npython==3.12.3\r\ntorch==2.5.1+cu124\r\n\r\n### Who can help?\r\n\r\n@yiyixuxu @sayakpaul @DN6 @asomoza",
    "url": "https://github.com/huggingface/diffusers/issues/9976",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-11-20T13:46:14Z",
    "updated_at": "2024-11-22T12:22:53Z",
    "comments": 7,
    "user": "vladmandic"
  },
  {
    "repo": "pytorch/xla",
    "number": 8402,
    "title": "Kaggle Notebook: model return loss None on TPU",
    "body": "## \u2753 Questions and Help\r\n\r\nHi, I recieved loss None when training model. Anyone can help?\r\n\r\nSimple reproduct kaggle notebook [link](https://www.kaggle.com/code/liondude/notebook548442067d)\r\n\r\n```\r\nimport os\r\nimport time\r\nimport pandas as pd\r\nimport numpy as np\r\n\r\nfrom tqdm import tqdm\r\n\r\nimport datasets\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.optim as optim\r\nimport torch_xla as xla\r\nimport torch_xla.core.xla_model as xm\r\nimport torch_xla.distributed.xla_multiprocessing as xmp\r\nfrom torch_xla.distributed.fsdp.utils import apply_xla_patch_to_nn_linear\r\nimport torch_xla.distributed.parallel_loader as pl\r\nimport torch_xla.core.xla_env_vars as xenv\r\nimport torch_xla.debug.metrics as met\r\nimport torch_xla.distributed.spmd.xla_sharding as xs\r\nfrom torch_xla.distributed.spmd.xla_sharding import Mesh\r\nimport torch_xla.runtime as xr\r\n\r\nimport re\r\nfrom datasets import Dataset, load_dataset\r\nimport transformers\r\nfrom transformers.tokenization_utils_base import PreTrainedTokenizerBase, PaddingStrategy\r\nfrom transformers import AutoConfig, AutoProcessor, AutoTokenizer, AutoModelForCausalLM, DataCollatorWithPadding\r\nfrom peft import PeftModel, PeftConfig, get_peft_model, LoraConfig, TaskType\r\nfrom transformers import logging as hf_logging\r\n\r\nhf_logging.set_verbosity_error()\r\n\r\nos.environ[\"PJRT_DEVICE\"] = \"TPU\"\r\n\r\nclass CFG:\r\n    NUM_EPOCHS = 1\r\n    BATCH_SIZE = 24\r\n    DROPOUT = 0.05\r\n    MODEL_NAME = 'unsloth/Qwen2.5-7B-Instruct'\r\n    SEED = 2024\r\n    MAX_LENGTH = 4096\r\n    NUM_WARMUP_STEPS = 128\r\n    LR_MAX = 2e-4\r\n    NUM_LABELS = 3\r\n    LORA_RANK = 16\r\n    LORA_ALPHA = 16\r\n    LORA_MODULES = ['o_proj', 'v_proj',\"q_proj\", \"k_proj\"]\r\n\r\nFLAGS = {'MAX_INPUT': 64,\r\n         'LOGGING_STEPS': 10,\r\n         'NUM_EPOCHS': 3,\r\n         'BATCH_SIZE': 24,\r\n        }\r\n\r\nMAX_INPUT=128\r\nMODEL = \"unsloth/Qwen2.5-7B-Instruct\"\r\n\r\n\r\ndef get_dataset():\r\n    tokenizer = AutoTokenizer.from_pretrained(CFG.MODEL_NAME)\r\n    tokenizer.pad_token = tokenizer.eos_token\r\n    tokenizer.padding_side = 'right'\r\n    tokenizer.add_eos_token = True\r\n\r\n    # save tokenizer to load offline during inference\r\n    tokenizer.save_pretrained('tokenizer')\r\n    max_seq_length = 4096\r\n    tokenizer_x = AutoTokenizer.from_pretrained(CFG.MODEL_NAME, max_seq_length=max_seq_length)\r\n    tokenizer_x.pad_token_id = tokenizer.eos_token_id\r\n    df = datasets.load_dataset('stanfordnlp/imdb', split='train')\r\n    # df = df['train']\r\n    df = df.remove_columns(['label'])\r\n    \r\n    def preprocess(tasks, train_mode=True):\r\n        return {\"text\": 'this is test'}\r\n    df = df.map(preprocess, batched = False, remove_columns=df.column_names)\r\n    print(df)\r\n    def preprocess_function(example):\r\n        x = tokenizer(example[\"text\"], truncation=True, max_length=4096, padding='max_length')\r\n        \r\n        return {\r\n            \"input_ids\": x.input_ids,\r\n            \"labels\": 0,\r\n            \"attention_mask\": x.attention_mask\r\n        }\r\n\r\n    data_train = df.map(preprocess_function, batched=False, num_proc=4).remove_columns(['text'])\r\n\r\n    return data_train, tokenizer, FLAGS\r\n\r\n##############################################################################################################################################\r\ndef train(data_train, tokenizer, FLAGS):\r\n#     print('rank', rank)\r\n    N_SAMPLES = len(data_train)\r\n    STEPS_PER_EPOCH = N_SAMPLES // CFG.BATCH_SIZE\r\n    METRICS = {\r\n    'loss': [],\r\n    'accuracy': {'y_true': [], 'y_pred': [] }}\r\n    device = xm.xla_device()\r\n    print('device', device)\r\n    num_devices = xr.global_runtime_device_count() #8\r\n    model_axis = 1\r\n    mesh_shape = (1, num_devices // model_axis, model_axis)  # 2x4 on v3-8, 2x2 on v4-8\r\n\r\n    device_ids = np.array(range(num_devices))\r\n\r\n    mesh = Mesh(device_ids, mesh_shape, ('dcn', 'data', 'model'))\r\n\r\n    print('world_size:', xm.xrt_world_size())\r\n    rng = torch.Generator().manual_seed(42)\r\n    training_loader = torch.utils.data.DataLoader(data_train,\r\n                                                  batch_size=FLAGS['BATCH_SIZE'],\r\n                                                  collate_fn=DataCollatorWithPadding(tokenizer=tokenizer),\r\n#                                                   sampler=train_sampler,\r\n                                                  drop_last=True, generator=rng)\r\n\r\n\r\n    sharding_spec = xs.ShardingSpec(mesh, (('dcn', 'data'), None))\r\n    xla_train_loader = pl.MpDeviceLoader(training_loader,\r\n                                         device = xm.xla_device(),\r\n                                        input_sharding=sharding_spec,\r\n                                         device_prefetch_size=16\r\n                                        )\r\n\r\n    base_model = AutoModelForCausalLM.from_pretrained(MODEL, torch_dtype=torch.bfloat16)\r\n\r\n    base_model.config.pretraining_tp = 1\r\n\r\n    tokenizer.pad_token = tokenizer.eos_token  # If pad_token is not set\r\n    base_model.config.pad_token_id = tokenizer.pad_token_id  # Ensure the model respects the pad_token\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/8402",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-20T09:50:51Z",
    "updated_at": "2025-02-17T14:32:56Z",
    "user": "hiwamk"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 141118,
    "title": "Dynamo: how to deal with multiple inheritance (nn.Module/MutableMapping)?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nTensorDict is a MutableMapping object, and is treated as such by torch.compile:\r\n```python\r\nimport torch\r\nfrom tensordict import TensorDict\r\n\r\ntd = TensorDict(a=1, b=2, c=True)\r\n\r\n@torch.compile(fullgraph=True)\r\ndef add1(td):\r\n    return TensorDict(**td)+1\r\n\r\nadd1(td)\r\n```\r\n\r\nWe also have a `TensorDictParams` primitive that acts a bit like ParameterList: it is a TensorDict but also an nn.Module. That's useful when you want to set a TensorDict in an nn.Module have have the leaf tensors included in the state_dict, or dispatch ops like `module.to(...)` to the tensors it contains. However, `_dynamo` looks at it like an nn.Module and not a MutableMapping\r\n```python\r\nimport torch\r\nfrom tensordict import TensorDictParams, TensorDict\r\n\r\ntd = TensorDictParams(TensorDict(a=1, b=2, c=True))\r\n\r\n@torch.compile(fullgraph=True)\r\ndef add1(td):\r\n    return TensorDict(**td)+1\r\n\r\nadd1(td)\r\n```\r\nbreaks with\r\n```\r\n  File \"/Users/vmoens/venv/rl/lib/python3.10/site-packages/torch/_dynamo/variables/dicts.py\", line 357, in call_method\r\n    dict_vt = BuiltinVariable.call_custom_dict(tx, dict, args[0])\r\n  File \"/Users/vmoens/venv/rl/lib/python3.10/site-packages/torch/_dynamo/variables/builtin.py\", line 1432, in call_custom_dict\r\n    unimplemented(f\"{user_cls.__name__}(): {args} {kwargs}\")\r\n  File \"/Users/vmoens/venv/rl/lib/python3.10/site-packages/torch/_dynamo/exc.py\", line 313, in unimplemented\r\n    raise Unsupported(msg, case_name=case_name)\r\ntorch._dynamo.exc.Unsupported: dict(): (UnspecializedNNModuleVariable(TensorDictParams),) {}\r\n```\r\n\r\nMy understanding is that `call_custom_dict` looks at the arg an in one case it's a `variables.MutableMappingVariable` which is fine but in the other it's a `UnspecializedNNModuleVariable` which isn't a mutable mapping.\r\n\r\nSo I guess my question is (other than how can we fix this) how does dynamo look at multiple inheritance? Shouldn't there be a way to tell \"look, this isn't a bird or a fish but a fish that can fly\"? \r\n\r\n(note that in this specific case, `smth(**obj)` will call `obj.keys()` followed by `obj.__getitem__` which are ops that compile is happy about - maybe that's what `call_custom_dict` should be doing?)\r\n\r\nHere is a MRE:\r\n```python\r\nimport torch\r\nfrom torch import nn\r\nimport collections\r\n\r\n# class MyWeirdDict(collections.abc.MutableMapping):  # Works\r\nclass MyWeirdDict(collections.abc.MutableMapping, nn.Module):  # breaks\r\n    def __init__(self, **kwargs):\r\n        super().__init__()\r\n        self._items = kwargs\r\n    def keys(self):\r\n        return self._items.keys()\r\n    def __getitem__(self, item):\r\n        return self._items[item]\r\n    def __setitem__(self, key, value):\r\n        self._items[key] = value\r\n    def __delitem__(self, item):\r\n        del self._items[item]\r\n    def __len__(self):\r\n        return len(self._items)\r\n    def __iter__(self):\r\n        yield from self._items\r\n    def __hash__(self):\r\n        return hash(id(self))\r\n    def items(self):\r\n        for k, v in self._items.items():\r\n            yield (k, v)\r\n\r\n@torch.compile(fullgraph=True)\r\ndef to_weird_dict(td):\r\n    return MyWeirdDict(**td)\r\n\r\nd = MyWeirdDict(a=1, b=2, c=3)\r\nto_weird_dict(d)\r\n```\r\n\r\n### Error logs\r\n\r\nSee above\r\n\r\n### Versions\r\n\r\nnightlies\r\n\r\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames",
    "url": "https://github.com/pytorch/pytorch/issues/141118",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo",
      "dynamo-dicts",
      "dynamo-nn-modules"
    ],
    "created_at": "2024-11-20T09:01:58Z",
    "updated_at": "2024-12-10T19:22:18Z",
    "user": "vmoens"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 141116,
    "title": "How to fuse batchnorm to conv2d in the graph exported by torch.export",
    "body": "I used the torch.export to export my CNN model in eval mode,but the op batchnorm still exists. how to eliminate it. Is there some options in torch.export.export function or I should write a fusion pass by myself. \r\nThanks.\r\ncode:\r\n```\r\nimport torch\r\nimport torch.nn as nn\r\nclass CNN(nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.conv1 = nn.Conv2d(in_channels=16, out_channels=16, kernel_size=3, stride=1, padding=1)\r\n        self.bn1 = nn.BatchNorm2d(16)\r\n\r\n    def forward(self, x):\r\n        x = self.conv1(x)   \r\n        x = self.bn1(x)\r\n        return x\r\n\r\ntorch.manual_seed(0)\r\nmodel=CNN().eval()\r\ninput=torch.randn(3,16,224,224)\r\nep=torch.export.export(model,(input,))\r\nprint(ep.graph)\r\n```\r\ngraph:\r\n```\r\ngraph():\r\n    %p_conv1_weight : [num_users=1] = placeholder[target=p_conv1_weight]\r\n    %p_conv1_bias : [num_users=1] = placeholder[target=p_conv1_bias]\r\n    %p_bn1_weight : [num_users=1] = placeholder[target=p_bn1_weight]\r\n    %p_bn1_bias : [num_users=1] = placeholder[target=p_bn1_bias]\r\n    %b_bn1_running_mean : [num_users=1] = placeholder[target=b_bn1_running_mean]\r\n    %b_bn1_running_var : [num_users=1] = placeholder[target=b_bn1_running_var]\r\n    %b_bn1_num_batches_tracked : [num_users=0] = placeholder[target=b_bn1_num_batches_tracked]\r\n    %x : [num_users=1] = placeholder[target=x]\r\n    %conv2d : [num_users=1] = call_function[target=torch.ops.aten.conv2d.default](args = (%x, %p_conv1_weight, %p_conv1_bias, [1, 1], [1, 1]), kwargs = {})\r\n    %_native_batch_norm_legit_no_training : [num_users=1] = call_function[target=torch.ops.aten._native_batch_norm_legit_no_training.default](args = (%conv2d, %p_bn1_weight, %p_bn1_bias, %b_bn1_running_mean, %b_bn1_running_var, 0.1, 1e-05), kwargs = {})\r\n    %getitem : [num_users=1] = call_function[target=operator.getitem](args = (%_native_batch_norm_legit_no_training, 0), kwargs = {})\r\n    return (getitem,)\r\n```\n\ncc @chauhang @penguinwu @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4",
    "url": "https://github.com/pytorch/pytorch/issues/141116",
    "state": "open",
    "labels": [
      "oncall: pt2",
      "oncall: export"
    ],
    "created_at": "2024-11-20T07:46:28Z",
    "updated_at": "2024-11-20T19:06:46Z",
    "user": "TingfengTang"
  },
  {
    "repo": "pytorch/ao",
    "number": 1315,
    "title": "How to trigger torchao unit tests?",
    "body": "We plan to run unit tests when we switch to different torch versions and triton versions.\r\nHow should we leverage with torchao's unit tests to make sure new torch version and triton versions are working?\r\nThanks!",
    "url": "https://github.com/pytorch/ao/issues/1315",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-19T22:50:34Z",
    "updated_at": "2024-12-05T01:43:54Z",
    "user": "goldhuang"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 515,
    "title": "ACT is working, but not Diffusion",
    "body": "Hello Team,\r\n\r\nyour work is so good, I am currently working on creating some nice policies with Lerobot repo, architecture and software. I tried ACT on my robot, it is working fine, able to execute the tasks what it learnt in the evaluation. \r\nI tried training Diffusion policy, multiple times with different params and also the default params, what you provided in the repo. I tried PushT in colab, its working but not in robot. Can you please explain why its not working, or should I change other things??\r\nI forgot to mention, I used 3 cameras for data collection and training for Diffusion\r\nThank you\r\n\r\n\r\nEDIT (aliberts): format",
    "url": "https://github.com/huggingface/lerobot/issues/515",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2024-11-19T18:58:28Z",
    "updated_at": "2025-11-30T02:37:09Z",
    "user": "Kacchan16"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1042,
    "title": "how can i pass embeddings or context to a text2text-generation model",
    "body": "### Question\n\nI downloaded the model to local. I found that there doesn't seem to be an API that allows me to pass embeddings. How can I make this model understand the context?\r\n\r\nThen I tried to pass the context content to this model, but the model didn't seem to accept it and output the following words.\r\n\r\nThe code is like the following:\r\n```js\r\nconst model =await pipeline(\"text2text-generation\", \"LaMini-Flan-T5-783M\")\r\nconst result = await model(\"you are a teacher, who are you?\",{})\r\n```\r\n\r\nthis is model output\r\n\r\n```json\r\n[\r\n    {\r\n        \"generated_text\": \"As an AI language model, I am not a teacher.\"\r\n    }\r\n]\r\n\r\n```\r\nI don't know whether it's due to the model itself or that I just haven't found the API for passing the context\ud83d\ude15\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/1042",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-19T18:32:45Z",
    "updated_at": "2024-11-20T05:34:45Z",
    "user": "electroluxcode"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1041,
    "title": "Full preload example",
    "body": "### Question\r\n\r\nHello!\r\n\r\nI'm looking for a full \"preload model\" nodejs example.\r\n\r\nSay I do this:\r\n\r\n```ts\r\nimport { env } from '@huggingface/transformers';\r\nenv.allowRemoteModels = false;\r\nenv.localModelPath = '/path/to/local/models/';\r\n```\r\n\r\nhow do I \"get\" the model to that path? I want to download it when building my docker image",
    "url": "https://github.com/huggingface/transformers.js/issues/1041",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-19T12:34:04Z",
    "updated_at": "2024-11-26T12:44:55Z",
    "user": "benjick"
  },
  {
    "repo": "pytorch/benchmark",
    "number": 2543,
    "title": "How to get benchmark statistics?",
    "body": "I'm building a CI to test some models on certain types of devices. I want get benchmark statistics like which model cases failed? which tests were skipped and why? These statistics will be used to generate a table like this:\r\n\r\n<table>\r\n\t<tr>\r\n\t    <th rowspan=\"2\">Devices</th>\r\n\t    <th colspan=\"2\">BERT_pytorch</th>\r\n\t    <th colspan=\"2\">hf_GPT2</th>\r\n\t</tr>\r\n\t<tr>\r\n\t    <th>train</th>\r\n\t    <th>eval</th>\r\n\t    <th>train</th>\r\n\t    <th>eval</th>\r\n\t</tr>\r\n\t<tr>\r\n\t    <th>CPU</th>\r\n\t    <th>\u2705</th>\r\n\t    <th>\u2705</th>\r\n\t    <th>\u2705</th>\r\n\t    <th>\u2705</th>\r\n\t</tr>\r\n\t<tr>\r\n\t    <th>CUDA</th>\r\n\t    <th>\u2705</th>\r\n\t    <th>\u2705</th>\r\n\t    <th>\u2705</th>\r\n\t    <th>\u2705</th>\r\n\t</tr>\r\n\t<tr>\r\n\t    <th>Foo</th>\r\n\t    <th>\u274c (failed)</th>\r\n\t    <th>\u2705</th>\r\n\t    <th>\u26a0\ufe0f (skipped)</th>\r\n\t    <th>\u2705</th>\r\n\t</tr>\r\n</table>\r\n\r\nSo how can I get benchmark statistics? Is there a recommended way to do this? Can anyone give suggestions? Thanks so much!\r\n\r\n",
    "url": "https://github.com/pytorch/benchmark/issues/2543",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-19T09:36:22Z",
    "updated_at": "2025-02-11T08:15:40Z",
    "user": "shink"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1388,
    "title": "eval doc does not pass test",
    "body": "### \ud83d\udc1b Describe the bug\n\nhttps://github.com/pytorch/torchchat/pull/1383 enables `run-docs evaluation` to extract a test script from eval documentation,\r\nto run evaluation script.  In turn, this extracts the command\r\n\r\n```\r\npython3 torchchat.py eval stories15M --tasks wikitext --limit 10\r\n```\r\n\r\nfrom the eval doc as a test to ensure that the doc is in fact correct.  This appears to be a correct use of eval to me, yet it fails when running as follows:\r\n\r\nhttps://hud.pytorch.org/pr/pytorch/torchchat/1383#33154706429\r\n\r\n```\r\n2024-11-18T18:13:35.1710781Z + python3 torchchat.py eval stories15M --tasks wikitext --limit 10\r\n2024-11-18T18:13:35.1711201Z NumExpr defaulting to 16 threads.\r\n2024-11-18T18:13:35.1711531Z PyTorch version 2.6.0.dev20241002+cu121 available.\r\n2024-11-18T18:13:35.1711768Z \r\n2024-11-18T18:13:35.1711939Z Downloading builder script:   0% 0.00/5.67k [00:00<?, ?B/s]\r\n2024-11-18T18:13:35.1712401Z Downloading builder script: 100% 5.67k/5.67k [00:00<00:00, 37.1MB/s]\r\n2024-11-18T18:13:35.1712808Z Traceback (most recent call last):\r\n2024-11-18T18:13:35.1713182Z   File \"/pytorch/torchchat/torchchat.py\", line 100, in <module>\r\n2024-11-18T18:13:35.1713552Z     eval_main(args)\r\n2024-11-18T18:13:35.1713905Z   File \"/pytorch/torchchat/torchchat/usages/eval.py\", line 238, in main\r\n2024-11-18T18:13:35.1714340Z     builder_args = BuilderArgs.from_args(args)\r\n2024-11-18T18:13:35.1714667Z                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n2024-11-18T18:13:35.1715101Z   File \"/pytorch/torchchat/torchchat/cli/builder.py\", line 169, in from_args\r\n2024-11-18T18:13:35.1715520Z     return cls(\r\n2024-11-18T18:13:35.1715827Z     run_cmd_or_die(f\"docker exec -t {container_name} /exec\")\r\n2024-11-18T18:13:35.1716580Z   File \"/home/ec2-user/actions-runner/_work/torchchat/torchchat/test-infra/.github/scripts/run_with_env_secrets.py\", line 39, in run_cmd_or_die\r\n2024-11-18T18:13:35.1717388Z     raise RuntimeError(f\"Command {cmd} failed with exit code {exit_code}\")\r\n2024-11-18T18:13:35.1718153Z RuntimeError: Command docker exec -t c2e4cff2805edb5848301b09ed712578d726414222642162007e0e16e7c48ba1 /exec failed with exit code 1\r\n2024-11-18T18:13:35.1718786Z            ^^^^\r\n2024-11-18T18:13:35.1719026Z   File \"<string>\", line 24, in __init__\r\n2024-11-18T18:13:35.1719475Z   File \"/pytorch/torchchat/torchchat/cli/builder.py\", line 76, in __post_init__\r\n2024-11-18T18:13:35.1719926Z     raise RuntimeError(\r\n2024-11-18T18:13:35.1720431Z RuntimeError: need to specified a valid checkpoint path, checkpoint dir, gguf path, DSO path, or PTE path\r\n```\r\n\r\n\r\n\r\n\n\n### Versions\n\ngithub runner, environment as configured by pytorch test infra",
    "url": "https://github.com/pytorch/torchchat/issues/1388",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-11-19T05:38:54Z",
    "updated_at": "2024-12-10T04:41:51Z",
    "comments": 2,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/ao",
    "number": 1310,
    "title": "[NF4] Various bugs in how NF4 handles `.to()` to move to a different device",
    "body": "Reproduction\r\n\r\n```python\r\nimport torch\r\nfrom torch import nn\r\nfrom torchao.dtypes.nf4tensor import to_nf4\r\n\r\nx = torch.randn(1024, 1024)\r\nx_nf4 = to_nf4(x)\r\nprint(x_nf4.cuda())  # this will dequantize NF4 -> unwanted\r\nprint(x_nf4.to(device=\"cuda\"))  # this will raise error\r\nprint(x_nf4.to(\"cuda\"))  # this will do the right thing\r\n\r\n# .cpu() does not move .nf4 to CPU, because call_from_inner_tensors does not call the method on .nf4\r\nx = torch.randn(1024, 1024).cuda()\r\nx_nf4 = to_nf4(x).cpu()\r\nprint(x_nf4.quantized_data.device)  # cpu\r\nprint(x_nf4.nf4.device)  # cuda:0\r\nprint(x_nf4.to(torch.float32))  # error due to device mismatch\r\n\r\n# not working with nn.Module\r\nlinear = nn.Linear(1024, 1024)\r\nlinear.weight = nn.Parameter(to_nf4(linear.weight.detach()), requires_grad=False)\r\nlinear.cuda()  # NF4 weight is not moved to CUDA\r\n# linear.to(\"cuda\")  # same problem\r\n\r\nprint(linear.weight.device)  # cuda:0\r\nprint(linear.weight.quantized_data.device)  # cpu\r\nprint(linear.weight.to(torch.float32).device)  # cpu\r\n```\r\n\r\nSummary:\r\n1. `NF4Tensor.cuda()` will dequantize -> this is unwanted\r\n2. `NF4Tensor.to(device=\"cuda\")` will raise `IndexError`, since `args[1]` does not exist\r\n3. `NF4Tensor.cpu()` does not move `.nf4` attribute -> cannot dequantize\r\n4. Does not work with `nn.Module.to(device)`\r\n\r\n- IMO, the semantics `NF4Tensor.to(torch.float32)` will dequantize is the culprit that causes these troubles + it is not consistent with AQT behavor. If `.to(dtype)` does not dequantize (only change appearance dtype), we only need to implement `aten._to_copy` instead of `Tensor.cpu`, `Tensor.to` and myriad of others. Though I understand this design is to make NF4 feels more like a true dtype.\r\n- I think it makes more sense to designate `NF4Tensor.dequantize()` as the method to dequantize the tensor (also consistent with plain Tensor behavior, though plain `Tensor.dequantize()` will always return FP32), instead of the current situation (`NF4Tensor.dequantize()` is a static method for lookup table, while `NF4Tensor.get_original_weight()` does dequant)\r\n- Changing this is BC, so we probably leave it as is.",
    "url": "https://github.com/pytorch/ao/issues/1310",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-11-19T04:31:35Z",
    "updated_at": "2024-11-26T06:19:03Z",
    "user": "gau-nernst"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1385,
    "title": "Update dead link in https://github.com/pytorch/torchchat/blob/main/docs/quantization.md",
    "body": "### \ud83d\udc1b Describe the bug\n\nThere is a dead link https://github.com/pytorch/torchchat/blob/main/torchchat/utils/quantize.py#L1260-L1266 in https://github.com/pytorch/torchchat/blob/main/docs/quantization.md like `See the available quantization schemes [here](https://github.com/pytorch/torchchat/blob/main/torchchat/utils/quantize.py#L1260-L1266).`. Could you please help update it to show the quantization schemes examples?\n\n### Versions\n\n#",
    "url": "https://github.com/pytorch/torchchat/issues/1385",
    "state": "closed",
    "labels": [
      "documentation",
      "Quantization"
    ],
    "created_at": "2024-11-19T01:34:54Z",
    "updated_at": "2024-12-09T22:37:22Z",
    "comments": 4,
    "user": "yanbing-j"
  },
  {
    "repo": "pytorch/xla",
    "number": 8390,
    "title": "[TPU][torch.compile] How to introduce in-place custome Ops through Pallas ?",
    "body": "## \u2753 Questions and Help\r\n\r\nHi torch.xla team, thank you so much for the great work on making pytoch available on XLA devices! We have had great experience with it so far. \r\n\r\nWe are exploring the idea of adding custome Pallas kernels in the graph and using it along with `torch.compile(..., backend='openxla')` for TPUs. However, we have hit a limitation that the operator cannot be in-place, which is very important for performance reasons. \r\n\r\nI have stripped down a minimal reproduceable example, happy to provide more details:\r\n\r\n```\r\nfrom typing import List, Callable\r\nimport jax\r\nimport jax.numpy as jnp\r\nfrom jax.experimental import pallas as pl\r\nfrom jax.experimental.pallas import tpu as pltpu\r\nimport torch\r\nimport torch_xla\r\nfrom torch_xla.experimental import custom_kernel\r\nfrom functools import partial\r\n\r\n\r\ndef plus_one_kernel(x_ref, o_ref):\r\n    o_ref[:] = o_ref[:] + 1\r\n\r\n@partial(jax.jit, donate_argnums=[0])\r\ndef plus_one_pallas(x: jax.Array):\r\n    size = x.shape[0]\r\n    return pl.pallas_call(\r\n        plus_one_kernel,\r\n        grid=(1, 1),\r\n        out_shape=jax.ShapeDtypeStruct(x.shape, x.dtype),\r\n        input_output_aliases={0:0}\r\n    )(x)\r\n\r\n@torch.library.custom_op(\"xla::plus_one_\", mutates_args=(\"x\", ))\r\ndef plus_one_(x: torch.Tensor) -> None:\r\n    plus_one_pt = torch_xla.experimental.custom_kernel.make_kernel_from_pallas(\r\n        plus_one_pallas, output_shape_dtype_fn = lambda x: [(x.shape, x.dtype)]\r\n    )\r\n    plus_one_pt(x)\r\n\r\ndef fn(x):\r\n    torch.ops.xla.dynamo_set_buffer_donor_(x, True)\r\n    return plus_one_(x)\r\n\r\nfn = torch.compile(fn, backend=\"openxla\")\r\n\r\nx = torch.ones(4, dtype=torch.bfloat16, device='xla')\r\n\r\nfn(x)\r\nprint(x)\r\n```\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/8390",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-18T19:03:23Z",
    "updated_at": "2024-11-18T19:08:50Z",
    "user": "xinli-sw"
  },
  {
    "repo": "pytorch/xla",
    "number": 8389,
    "title": "Prepare a subsection to educate users on the PyTorch workloads on AI-Hypercomputer",
    "body": "## \ud83d\udcda Documentation\r\n\r\nAI-Hypercomputer is where customers and users can find optimized implementation of representative models.\r\n\r\nPlease add a section in the PyTorchXLA README page (and the html documentation) that introduces this concept and points the users to the following resource: https://github.com/AI-Hypercomputer/tpu-recipes\r\n\r\nKeep in mind that the AI-Hypercomputer tpu-recipe repo is WIP and gradually grows in scope.\r\n\r\nRead more [context on AI-Hypercomputer ](https://cloud.google.com/blog/products/ai-machine-learning/introducing-cloud-tpu-v5p-and-ai-hypercomputer?e=48754805)\r\n\r\nTimeline: would be great to add this documentation to the repo for 2.6 branch cut.\r\n\r\ncc @tengyifei ",
    "url": "https://github.com/pytorch/xla/issues/8389",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-11-18T18:48:24Z",
    "updated_at": "2024-12-10T00:24:25Z",
    "comments": 1,
    "user": "miladm"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1038,
    "title": "script.convert tfjs model to onnx support",
    "body": "### Question\n\nI'm using tfjs-node to create an image-classifier model; \r\nbut I'm stuck with how to convert model.json to a format that can be used by optimum or script.convert to convert it to a onnx file.\r\n\r\nI'm able to convert to a graph model using \r\n```\r\ntensorflowjs_converter --input_format=tfjs_layers_model \\  --output_format=tfjs_graph_model \\  ./saved-model/layers-model/model.json \\  ./saved-model/graph-model\r\n```\r\n\r\nand then I can convert to an onnx using \r\n```\r\npython3 -m tf2onnx.convert --tfjs ./saved-model/graph-model/model.json --output ./saved-model/model.onnx\r\n```\r\n\r\nThis works fine when I test in python but I'm unable to use in transformers.js - I probably need to use optimum to convert it?\r\nI tried a number of approaches but was unable to convert to onnx - I then saw script.convert but am having difficulties\r\n\r\n- This is an example of the code I'm using to test the model with\r\n```\r\nimport onnxruntime as ort\r\nfrom PIL import Image\r\nimport numpy as np\r\n\r\n# Load the ONNX model\r\nsession = ort.InferenceSession('./saved-model/model.onnx')\r\n\r\n# Get input and output names\r\ninput_name = session.get_inputs()[0].name\r\noutput_name = session.get_outputs()[0].name\r\n\r\n# Load and preprocess the image\r\nimg = Image.open('./training_images/shirt/00e745c9-97d9-429d-8c3f-d3db7a2d2991.jpg').resize((128, 128))\r\nimg_array = np.array(img).astype(np.float32) / 255.0  # Normalize pixel values to [0, 1]\r\nimg_array = np.expand_dims(img_array, axis=0)  # Add batch dimension\r\n\r\n# Run inference\r\noutputs = session.run([output_name], {input_name: img_array})\r\nprint(f\"Inference outputs: {outputs}\")\r\n\r\n```\r\n\r\n[Uploading model.onnx.txt\u2026]()\r\n\r\nAny guidance on how to go from tfjs model.json to onnx supported by transformers.js would really help me out.\r\nThanks! \r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/1038",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-18T15:42:46Z",
    "updated_at": "2024-11-19T10:08:28Z",
    "user": "JohnRSim"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1573,
    "title": "Include chat-ui in an existing React application",
    "body": "Hello,\r\n\r\nIs it possible to integrate / embed chat-ui in an existing application, like a React component?\r\nFor example, to add a chat module to an existing website with the UI of chat-ui.\r\n\r\nAs is the case with Chainlit : https://docs-prerelease.chainlit.io/customisation/react-frontend",
    "url": "https://github.com/huggingface/chat-ui/issues/1573",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-11-18T14:11:58Z",
    "updated_at": "2024-11-18T14:15:17Z",
    "comments": 0,
    "user": "martin-prillard"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2097,
    "title": "TFJS support model.json to ONNX conversion",
    "body": "### Feature request\n\nCurrently using node to create an image-classifier model.json with tfjs \r\n- I don't think Optimum support this format to convert to onnx?\r\n\r\nIt would be nice to just use optimum and point to model.json.\r\n\n\n### Motivation\n\nCurrently I'm creating the model converting it to graph and then converting to onnx like this - \r\n\r\n```\r\ntensorflowjs_converter --input_format=tfjs_layers_model \\  --output_format=tfjs_graph_model \\  ./saved-model/layers-model/model.json \\  ./saved-model/graph-model\r\n```\r\n\r\n```\r\npython3 -m tf2onnx.convert --tfjs ./saved-model/graph-model/model.json --output ./saved-model/model.onnx\r\n```\r\n\r\nI'm not sure how to switch to use optimum - do I need to convert model.json to .h5 and then run? \r\n- if I try this I run into huggingface_hub.errors.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': './path_to_save/model.h5'. Use `repo_type` argument if needed\r\n\r\n\n\n### Your contribution\n\nN/A",
    "url": "https://github.com/huggingface/optimum/issues/2097",
    "state": "open",
    "labels": [
      "exporters",
      "tflite"
    ],
    "created_at": "2024-11-18T12:55:05Z",
    "updated_at": "2024-11-19T10:22:35Z",
    "comments": 0,
    "user": "JohnRSim"
  },
  {
    "repo": "huggingface/optimum-benchmark",
    "number": 294,
    "title": "How to Use a Local Model When Calling the Python API",
    "body": "![image](https://github.com/user-attachments/assets/ca4a11fc-29e5-4537-8e8a-95b309f43afe)\r\n",
    "url": "https://github.com/huggingface/optimum-benchmark/issues/294",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-18T06:36:24Z",
    "updated_at": "2024-12-09T12:23:30Z",
    "user": "WCSY-YG"
  },
  {
    "repo": "pytorch/xla",
    "number": 8388,
    "title": "Need help validating TPU/XLA devices support for ComfyUI.",
    "body": "## \u2753 Questions and Help\r\nI'm working on adding initial XLA support to ComfyUI https://github.com/comfyanonymous/ComfyUI/pull/5657 and would greatly appreciate any feedback or validation from the community. Specifically, I'm looking for:\r\n\r\n- Testing across different XLA-compatible hardware (e.g., TPUs or GPUs with XLA support).\r\n- Suggestions for optimizing performance with XLA in this context.\r\n- Identifying any compatibility issues or edge cases that might arise during execution.\r\n\r\nIf you're familiar with integrating XLA into PyTorch workflows or have experience with related pipelines, your input would be invaluable. Thank you in advance for your help!",
    "url": "https://github.com/pytorch/xla/issues/8388",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-17T23:09:49Z",
    "updated_at": "2025-02-17T18:13:57Z",
    "user": "radna0"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 511,
    "title": "Minimum Requirements - Running Policies in production/ Training Policies",
    "body": "I was wondering what types of hardware can policies trained using lerobot can run on. Lets say I wanted to run policies in production on say a raspberry pi. Is it possible to run training on beefier hardware and then deploy policies to lower-end hardware to run? Is it better to record with various cameras or just use the same camera? What is the minimum quality?\r\n\r\nYou have tutorials on training and evaluating policies but nothing about deploying to production. Would be interesting to see this. \r\n\r\nThank you\r\n\r\n",
    "url": "https://github.com/huggingface/lerobot/issues/511",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-17T17:34:50Z",
    "updated_at": "2025-04-07T16:23:41Z",
    "user": "rkeshwani"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1035,
    "title": "How can I implement partial output in the react demo?",
    "body": "### Question\n\nHello! I am reading the Transformers.js documentation for \"[Building a react application](https://huggingface.co/docs/transformers.js/tutorials/react)\", but I encountered an issue at [step 4](https://huggingface.co/docs/transformers.js/tutorials/react#step-4-connecting-everything-together).   \r\nI don't know how to implement the **partial output** of the translation results, even though the documentation provides the following instructions:\r\n\r\n```javascript\r\n  let output = await translator(event.data.text, {\r\n      tgt_lang: event.data.tgt_lang,\r\n      src_lang: event.data.src_lang,\r\n\r\n      // Allows for partial output\r\n      callback_function: x => {\r\n          self.postMessage({\r\n              status: 'update',\r\n              output: translator.tokenizer.decode(x[0].output_token_ids, { skip_special_tokens: true })\r\n          });\r\n      }\r\n  });\r\n```\r\n\r\nI have completed all the steps in the tutorial documentation, but I still cannot get the output to work properly. I tried using `console.log` for debugging and found that the `callback_function` is not working, and the main thread is not receiving any messages with the status `update`. I have also not found any information about the `callback_function` in the transformers.js documentation. I apologize for taking up your time, but I sincerely need your help. \ud83d\ude4f",
    "url": "https://github.com/huggingface/transformers.js/issues/1035",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-17T11:29:22Z",
    "updated_at": "2024-12-02T23:00:13Z",
    "user": "DikkooXie"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 510,
    "title": "Do we have to compulsory use trossen robotics robots for this repo?",
    "body": "Or any robot will work fine?\n\n\nAlso one more question.\n\nDo we have to use depth camera or simple camera will work fine?",
    "url": "https://github.com/huggingface/lerobot/issues/510",
    "state": "closed",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2024-11-17T11:14:52Z",
    "updated_at": "2025-04-07T16:27:40Z",
    "user": "hemangjoshi37a"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9942,
    "title": "Unable to install pip install diffusers>=0.32.0dev",
    "body": "### Describe the bug\r\n\r\nI am installing the following version\r\npip install diffusers>=0.32.0dev\r\n\r\nHowever it does nothing\r\n```\r\n(c:\\aitools\\CogVideo\\cv_venv) C:\\aitools\\CogVideo>pip install diffusers>=0.32.0dev\r\n\r\n(c:\\aitools\\CogVideo\\cv_venv) C:\\aitools\\CogVideo>\r\n```\r\n\r\nI even uninstalled the previous version\r\n\r\n```\r\n(c:\\aitools\\CogVideo\\cv_venv) C:\\aitools\\CogVideo>pip uninstall diffusers\r\nFound existing installation: diffusers 0.31.0\r\nUninstalling diffusers-0.31.0:\r\n  Would remove:\r\n    c:\\aitools\\cogvideo\\cv_venv\\lib\\site-packages\\diffusers-0.31.0.dist-info\\*\r\n    c:\\aitools\\cogvideo\\cv_venv\\lib\\site-packages\\diffusers\\*\r\n    c:\\aitools\\cogvideo\\cv_venv\\scripts\\diffusers-cli.exe\r\nProceed (Y/n)? y\r\n  Successfully uninstalled diffusers-0.31.0\r\n```\r\n\r\n### Reproduction\r\n\r\nCreate a conda environment and install using\r\n\r\n`pip install diffusers>=0.32.0dev`\r\n\r\nSo I understand it is not release here\r\nhttps://pypi.org/project/diffusers/#history\r\n\r\nHow do I install on Windows 11\r\n\r\nI even checked the branch\r\n\r\n![image](https://github.com/user-attachments/assets/219faa7c-951a-4c76-886a-376e69c87cee)\r\n\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\nPython 3.11.10\r\nWindows 11\r\n\r\n### Who can help?\r\n\r\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9942",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-11-17T10:26:19Z",
    "updated_at": "2024-11-17T12:27:23Z",
    "comments": 0,
    "user": "nitinmukesh"
  },
  {
    "repo": "huggingface/candle",
    "number": 2622,
    "title": "How to compute `Atan2` for tensors?",
    "body": "I am trying to implement DeepPhase in candle but I am struggling figuring out how to calculate the phase angles from two tensors using `atan2` operation.",
    "url": "https://github.com/huggingface/candle/issues/2622",
    "state": "open",
    "labels": [],
    "created_at": "2024-11-16T16:45:36Z",
    "updated_at": "2024-11-17T14:21:50Z",
    "user": "cryscan"
  },
  {
    "repo": "pytorch/xla",
    "number": 8387,
    "title": "Can Triton be used with XLA/TPU devices?",
    "body": "## \u2753 Questions and Help\r\n\r\nI see that there are docs for triton support but only for GPU? Is it possible for TPU to use triton?\n```[tasklist]\n### Tasks\n```\n",
    "url": "https://github.com/pytorch/xla/issues/8387",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-16T09:46:06Z",
    "updated_at": "2024-12-11T06:21:18Z",
    "comments": 1,
    "user": "radna0"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1380,
    "title": "What is the future plan of model expansion?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI see current torchchat only support a few kinds of model, like llama based(liked) architecture, or pre-defined Transformer architecture models. Is there any plan to support other kinds of model architecture in the future? which kinds of model you're considering to add? If there is a new model whose architecture is not in the supporting list, is there a way to run it?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### RFC (Optional)\n\n_No response_",
    "url": "https://github.com/pytorch/torchchat/issues/1380",
    "state": "open",
    "labels": [
      "enhancement",
      "Question",
      "triaged"
    ],
    "created_at": "2024-11-15T23:33:01Z",
    "updated_at": "2025-03-31T20:39:15Z",
    "user": "jenniew"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1032,
    "title": "How to identify which models will work with transformers.js?",
    "body": "### Question\n\nI've tried multiple models from MTEB dashboard (e.g. `jinaai/jina-embeddings-v3`, `jinaai/jina-embeddings-v2`, `dunzhang/stella_en_400M_v5`), but none of them work.\r\n\r\nIt's not clear which models will work?\r\n\r\n```ts\r\nconst generateGteSmallEmbedding = await pipeline(\r\n  'feature-extraction',\r\n  'dunzhang/stella_en_400M_v5',\r\n);\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/1032",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-15T22:13:00Z",
    "updated_at": "2024-12-22T02:41:43Z",
    "user": "punkpeye"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7291,
    "title": "Why return_tensors='pt' doesn't work\uff1f",
    "body": "### Describe the bug\n\nI tried to add input_ids to dataset with map(), and I used the return_tensors='pt', but why I got the callback with the type of List\uff1f\r\n![image](https://github.com/user-attachments/assets/ab046e20-2174-4e91-9cd6-4a296a43e83c)\r\n\n\n### Steps to reproduce the bug\n\n![image](https://github.com/user-attachments/assets/5d504d4c-22c7-4742-99a1-9cab78739b17)\n\n### Expected behavior\n\nSorry for this silly question, I'm noob on using this tool. But I think it should return a tensor value as I have used the protocol\uff1f\r\nWhen I tokenize only one sentence using tokenized_input=tokenizer(input, return_tensors='pt' )\uff0cit does return in tensor type. Why doesn't it work in map()\uff1f\n\n### Environment info\n\ntransformers>=4.41.2,<=4.45.0\r\ndatasets>=2.16.0,<=2.21.0\r\naccelerate>=0.30.1,<=0.34.2\r\npeft>=0.11.1,<=0.12.0\r\ntrl>=0.8.6,<=0.9.6\r\ngradio>=4.0.0\r\npandas>=2.0.0\r\nscipy\r\neinops\r\nsentencepiece\r\ntiktoken\r\nprotobuf\r\nuvicorn\r\npydantic\r\nfastapi\r\nsse-starlette\r\nmatplotlib>=3.7.0\r\nfire\r\npackaging\r\npyyaml\r\nnumpy<2.0.0\r\n",
    "url": "https://github.com/huggingface/datasets/issues/7291",
    "state": "open",
    "labels": [],
    "created_at": "2024-11-15T15:01:23Z",
    "updated_at": "2024-11-18T13:47:08Z",
    "comments": 2,
    "user": "bw-wang19"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 679,
    "title": "Question about integration with DeepSpeed-Ulysses",
    "body": "Hi developers,\r\n\r\nThanks for such a great project that can demonstrate the power of newly released features in torch.\r\n\r\nWhen I want to run llama2 model with 128k long sequence, how can we enable it? I have some experience with DeepSpeed-Ulysses, so the question becomes does torchtitan support sequence parallelism in DeepSpeed-Ulysses?\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/torchtitan/issues/679",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-15T09:56:38Z",
    "updated_at": "2024-11-22T00:28:16Z",
    "user": "zigzagcai"
  },
  {
    "repo": "pytorch/xla",
    "number": 8385,
    "title": "How to write in-place custom ops compatible with torch.compile using pallas",
    "body": "## \u2753 Questions and Help\r\n\r\nI'm trying to implement an in-place operator using pallas, and wrap it as a torch custom op. However, I found it difficult to make it work with `torch.compile`. More specifically, I\u2019m unclear about how to set donation, input-output aliases, and the op schema. It seems having an output aliased with the input will leads to functionalization problems in torch compiler.\r\n\r\nThanks!\r\n\r\nMy script is like this:\r\n\r\n```python\r\nfrom typing import List, Callable\r\n\r\nimport os\r\n\r\nimport jax\r\nimport jax.numpy as jnp\r\nfrom jax.experimental import pallas as pl\r\nfrom jax.experimental.pallas import tpu as pltpu\r\nimport torch\r\nimport torch_xla\r\nfrom torch_xla.experimental import custom_kernel\r\nfrom functools import partial\r\nimport torch_xla.debug.profiler as xp\r\n\r\nserver = xp.start_server(9012)\r\nprofile_logdir = \"./profile\" \r\nxp.trace_detached('localhost:9012', profile_logdir)\r\n\r\nos.environ[\"XLA_SAVE_TENSORS_FILE\"] = \"./graph.txt\"\r\nos.environ[\"XLA_FLAGS\"] = \"--xla_dump_to=./graph_hlo/\"\r\nos.environ[\"XLA_DUMP_HLO_GRAPH\"]=\"1\"\r\n\r\nM = 4096\r\nN = 1024\r\n\r\ndef plus_one_kernel(x_ref, o_ref):\r\n    o_ref[...] = x_ref[...] + 1\r\n\r\ndef plus_one_pallas(x: jax.Array):\r\n    return pl.pallas_call(\r\n        plus_one_kernel,\r\n        grid=[2, 2],\r\n        in_specs=[pl.BlockSpec([M, N], lambda i, j: (i, j))],\r\n        out_specs=pl.BlockSpec([M, N], lambda i, j: (i, j)),\r\n        out_shape=jax.ShapeDtypeStruct(x.shape, dtype=jnp.int32),\r\n        input_output_aliases={0:0}\r\n    )(x)\r\n\r\n@torch.library.custom_op(\"xla::plus_one_\", mutates_args={})\r\ndef plus_one_(x: torch.Tensor) -> torch.Tensor:\r\n    plus_one_pt = torch_xla.experimental.custom_kernel.make_kernel_from_pallas(\r\n        plus_one_pallas, output_shape_dtype_fn = lambda x: [(x.shape, x.dtype)]\r\n    )\r\n    return plus_one_pt(x)\r\n\r\n@plus_one_.register_fake\r\ndef plus_one_fake(x: torch.Tensor) -> torch.Tensor:\r\n    return x\r\n\r\ndef fn(x):\r\n    torch.ops.xla.dynamo_set_buffer_donor_(x, True)\r\n    ret = plus_one_(x)\r\n    return ret\r\n\r\nfn = torch.compile(fn, backend=\"openxla\")\r\nx = torch.ones([M * 2, N * 2], dtype=torch.int32, device='xla')\r\n\r\nret = fn(x)\r\nprint(ret)\r\n``` \r\n\r\nAnd it seems it does not change the value of `x`.\r\n",
    "url": "https://github.com/pytorch/xla/issues/8385",
    "state": "open",
    "labels": [
      "pallas"
    ],
    "created_at": "2024-11-15T08:34:05Z",
    "updated_at": "2025-02-15T05:43:45Z",
    "user": "soodoshll"
  },
  {
    "repo": "huggingface/speech-to-speech",
    "number": 141,
    "title": "\u4e0d\u60f3\u5b9e\u65f6\u5f55\u97f3\uff0c\u4f20\u4e00\u6bb5\u97f3\u9891\u600e\u4e48\u64cd\u4f5c\uff1fI don't want to record in real time, how can I upload an audio clip?",
    "body": "\u670d\u52a1\u5668\u4e0a\u542f\u52a8server\r\nwin10 \u672c\u5730\u542f\u52a8python listen_and_play.py \u540e\uff0c\u4e00\u4f1a\u6ca1\u5f55\uff0c\u670d\u52a1\u7aef\u5c31\u7ed3\u675f\u4e86\uff1f\uff1f\uff1f\r\n\u6211\u60f3\u4f20\u4e00\u6bb5\u97f3\u9891\u8ba9\u4ed6\u7ffb\u8bd1\u5e94\u8be5\u600e\u4e48\u641e",
    "url": "https://github.com/huggingface/speech-to-speech/issues/141",
    "state": "open",
    "labels": [],
    "created_at": "2024-11-15T03:58:26Z",
    "updated_at": "2024-12-20T04:30:13Z",
    "user": "dh12306"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 678,
    "title": "Any suggestion for Llama-3.1-70b(128k seq len) deploy mesh with torchtian?",
    "body": "Under the 128k long sequence, the activation value memory increases significantly. \r\nCP8 + TP8 seems necessary (they reduce the activation value memory almost linearly), but there is still as much as 50G of activation value memory. \r\nReccompute the activations of the MLP can reduce it by about 9G, while the recalculation of the ATTENTION layer or MLP up linear seems rather costly.I noticed that the article at https://arxiv.org/pdf/2410.06511 mentioned Full checkpoint was applied to address the activation memory issue\uff0cwhich seems to significantly increase the execution time of recomputation\uff1f\r\nDoes TorchTitan plan to offload the activation values and reload them during the backward calculation to reduce the activation value memory?\r\n",
    "url": "https://github.com/pytorch/torchtitan/issues/678",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2024-11-15T03:36:20Z",
    "updated_at": "2025-02-26T06:40:07Z",
    "user": "medivh-xp"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9930,
    "title": "[PAG] - Adaptive Scale bug",
    "body": "### Describe the bug\r\n\r\nI am looking for the purpose of the PAG adaptive scale? Because I was passing a value in it, for example 5.0, and passing 3.0 in the PAG scale, according to the implemented code we will have a negative number and the scale will return 0 and the PAG will not be applied and I did not find an explanation about this parameter in the documentation. \r\n\r\nSo i found it on an ComfyUI documentation: \"_This dampening factor reduces the effect of PAG during the later stages of the denoising process, speeding up the overall sampling. A value of 0.0 means no penalty, while 1.0 completely removes PAG_\"\r\n\r\nThen I realized that I was passing values \u200b\u200babove 1.0, however when I pass values \u200b\u200bof 0.2 it is enough for it not to apply the PAG. I suspect this could be a problem.\r\n\r\nIf you run the code below, you will see that in the third image where I pass a scale of 0.2 in adaptive_scale it practically invalidates the PAG in the first generation steps.\r\n\r\nI propose a possible solution:\r\n\r\nAfter this code:\r\nhttps://github.com/huggingface/diffusers/blob/5c94937dc7561767892d711e199f874dc35df041/src/diffusers/pipelines/pag/pag_utils.py#L93\r\n\r\nWe can change for:\r\n```python\r\nif self.do_pag_adaptive_scaling:           \r\n        signal_scale = self.pag_scale\r\n        if t / self.num_timesteps > self.pag_adaptive_scale:\r\n            signal_scale = 0\r\n        return signal_scale\r\nelse:\r\n    return self.pag_scale\r\n```\r\nAnd inside every PAG pipeline, we need change \"t\" variable for \"i\" variable is passed with param on this function, to receive the number of current step.\r\n\r\nhttps://github.com/huggingface/diffusers/blob/5c94937dc7561767892d711e199f874dc35df041/src/diffusers/pipelines/pag/pipeline_pag_sd_xl.py#L1253\r\n\r\nWith this, the logic will not be that the higher the adaptive scale value, the faster the PAG will be disabled, but quite the opposite. The scale will tell you exactly at what point in the process the PAG will be disabled. If the scale exceeds 0.5 in a 30-step generation, the PAG will be disabled from step 15 onwards. The scale applied will be the same until the moment of the cut and will not be a variable scale.\r\nI don't know if this was the original purpose of this parameter, but it works well for me.\r\n\r\n\r\n\r\n\r\n### Reproduction\r\n\r\n```python\r\nfrom diffusers import AutoPipelineForText2Image\r\nimport torch\r\n\r\ndevice = \"cuda\"\r\n\r\npipeline_sdxl = AutoPipelineForText2Image.from_pretrained(\r\n    \"stabilityai/stable-diffusion-xl-base-1.0\",\r\n    enable_pag=True,\r\n    pag_applied_layers=[\"mid\"],\r\n    torch_dtype=torch.float16\r\n).to(device)\r\n\r\npipeline = AutoPipelineForText2Image.from_pipe(pipeline_sdxl, enable_pag=True).to(device)\r\npipeline.enable_vae_tiling() \r\npipeline.enable_model_cpu_offload()\r\n\r\nprompt = \"an insect robot preparing a delicious meal, anime style\"\r\n\r\nfor i, pag_scale in enumerate([0.0, 3.0, 3.0]):\r\n    generator = torch.Generator(device=\"cpu\").manual_seed(0)\r\n    images = pipeline(\r\n        prompt=prompt,\r\n        num_inference_steps=25,\r\n        guidance_scale=7.0,\r\n        generator=generator,\r\n        pag_scale=pag_scale,\r\n        pag_adaptive_scale=0.0 if i < 2 else 0.2\r\n    ).images[0]\r\n    images.save(f\"./data/result_pag_{i+1}.png\")\r\n\r\n```\r\n\r\n### Logs\r\n\r\n```shell\r\nN/A\r\n```\r\n\r\n\r\n### System Info\r\n\r\n- \ud83e\udd17 Diffusers version: 0.32.0.dev0\r\n- Platform: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35\r\n- Running on Google Colab?: No\r\n- Python version: 3.10.11\r\n- PyTorch version (GPU?): 2.4.0+cu121 (True)\r\n- Flax version (CPU?/GPU?/TPU?): 0.10.1 (cpu)\r\n- Jax version: 0.4.35\r\n- JaxLib version: 0.4.35\r\n- Huggingface_hub version: 0.26.2\r\n- Transformers version: 4.46.2\r\n- Accelerate version: 1.1.1\r\n- PEFT version: 0.13.2\r\n- Bitsandbytes version: not installed\r\n- Safetensors version: 0.4.5\r\n- xFormers version: 0.0.27.post2\r\n- Accelerator: NVIDIA GeForce RTX 3060 Ti, 8192 MiB\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\r\n\r\n### Who can help?\r\n\r\n@yiyixuxu , @asomoza ",
    "url": "https://github.com/huggingface/diffusers/issues/9930",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-11-15T02:00:19Z",
    "updated_at": "2024-12-15T15:03:05Z",
    "comments": 1,
    "user": "elismasilva"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 541,
    "title": "[Question] Safetensors seem to block the main thread -- but torch.save does not?",
    "body": "I have the following code in my training loop:\r\n```\r\n                if rank == 0:\r\n                    t = Thread(\r\n                        target=save_file,\r\n                        args=(model_sd, f\"{cfg.model_dir}/model_{step + 1}.safetensors\"),\r\n                        daemon=True\r\n                    )\r\n                    t.start()\r\n```\r\nWhich saves the checkpoint to disk using safetensors. However, I notice that this blocks the training loop, even though the thread should be running in the background.\r\n\r\nWhen I switch the code to use `torch.save`, there's no issue. What should I do?",
    "url": "https://github.com/huggingface/safetensors/issues/541",
    "state": "open",
    "labels": [],
    "created_at": "2024-11-15T00:37:55Z",
    "updated_at": "2025-02-26T09:51:23Z",
    "comments": 4,
    "user": "vedantroy"
  },
  {
    "repo": "pytorch/xla",
    "number": 8380,
    "title": "How are PJRT asynchronous executions throttled by torch_xla?",
    "body": "## \ud83d\udc1b Bug\r\n\r\nHere at AWS we have a single PJRT device plugin for both PyTorch and JAX, and recently we've made implements to our device plugin to make it work better with JAX. I.e. now `PJRT_LoadedExecutable_Execute()` is fully asynchronous, we queue up an execution and return immediately, and expect the caller to wait on the `returned_future`, whereas before, execution was synchronous and is completed when `PJRT_LoadedExecutable_Execute()` returns.\r\n\r\nAs soon as we switched to the new implementation, we noticed that now torch_xla queues up as many executions it can without any throttling in PJRT or torch_xla, which causes us to easily exhaust device memory. It appears that now that there are no internal throttling mechanisms, and only explicit ones which needs to be triggered by user code:\r\n1. when `xm.wait_device_ops()` is called, which calls down to `WaitDeviceOps()`\r\n2. when tensor is read, which internally calls `WaitDeviceOps()`\r\nHowever, `WaitDeviceOps()` is a heavy hammer because it pauses the world until the entire pipeline is drained. Ideally we do not want to rely on this mechanism for throttling. Also we do not want the user to have to guess when to insert these calls to avoid running out of memory. Some sensible internal throttling mechanism is needed.\r\n\r\nThe main issue here is that [pjrt_computation_client.cc ](https://github.com/pytorch/xla/blob/master/torch_xla/csrc/runtime/pjrt_computation_client.cc#L744) does not await on the `returned_future` from PJRT. It simply throws it away.\r\n\r\nHowever, according to torch's [lazy_graph_executor](https://github.com/pytorch/pytorch/blob/main/torch/csrc/lazy/core/lazy_graph_executor.h#L164), \"only one asynchronous operation can execute at the same time, on a given device.\" This is controlled by a device lock, which is supposed to be held for the entire duration of the asynchronous execution. However, in torch_xla's [xla_graph_executor.cpp](https://github.com/pytorch/xla/blob/master/torch_xla/csrc/xla_graph_executor.cpp#L826), the device locks acquired by torch are released as soon as `ExecuteComputation()` returns, and `ExecuteComputaton()` does not actually wait for the actual computation to complete. Therefore, torch lazy_graph_executor's throttling mechanism is defeated here.\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/8380",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-14T18:39:43Z",
    "updated_at": "2024-11-27T17:59:21Z",
    "comments": 7,
    "user": "mcuiaws"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 677,
    "title": " Fine-Tuning Llama Model with Large Context and Customized Dataset Using Torchtitan",
    "body": "Hi,\r\n\r\nI am trying to fine-tune a Llama model with a large context size, and I found that to efficiently shard activations across multiple GPUs, I need to use Torchtitan. Here are some questions related to my setup:\r\n\r\nSee related issue: [meta-llama/llama-recipes#785](https://github.com/meta-llama/llama-recipes/issues/785)\r\n\r\n1. **Custom Dataset Usage**  \r\n   I created a custom dataset using parquet files and a `custom_dataset.py` file, which is compatible with `llama-recipes`. I'm also using the `DEFAULT_CHATML_CHAT_TEMPLATE`. Could you please provide guidance on how to integrate and use this custom dataset effectively with Torchtitan?\r\n\r\n2. **Fine-Tuning with Pretrained Model**  \r\n   Is it possible to fine-tune the model starting from a pretrained checkpoint? If so, are there specific steps or configurations needed to achieve this with Torchtitan?\r\n\r\n3. **Model Support (Llama-3.2-1B)**  \r\n   I noticed that Torchtitan currently supports training Llama 3 models (8B, 70B) out of the box. What steps would I need to take if I wanted to train `meta-llama/Llama-3.2-1B` specifically?\r\n\r\n4. **Large Context and FSDP Limitation**  \r\n   I am unable to use FSDP because of the large context sizes I\u2019m working with. Any additional guidance on handling large contexts effectively with Torchtitan would be appreciated.\r\n\r\nThank you for your help!",
    "url": "https://github.com/pytorch/torchtitan/issues/677",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2024-11-14T17:29:52Z",
    "updated_at": "2024-12-17T16:11:20Z",
    "user": "Amerehei"
  },
  {
    "repo": "huggingface/peft",
    "number": 2216,
    "title": "How to specify the coefficients of loading lora during inference?",
    "body": "",
    "url": "https://github.com/huggingface/peft/issues/2216",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-14T11:47:00Z",
    "updated_at": "2024-11-18T11:30:03Z",
    "user": "laolongboy"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1565,
    "title": "Is there any place that uses this environment variable?",
    "body": "https://github.com/huggingface/chat-ui/blob/ab349d0634ec4cf68a781fd7afc5e7fdd6bb362f/.env#L59-L65\r\n\r\nIt seems like it can be deleted.",
    "url": "https://github.com/huggingface/chat-ui/issues/1565",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-14T11:12:49Z",
    "updated_at": "2024-11-14T11:17:04Z",
    "comments": 2,
    "user": "calycekr"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9927,
    "title": "HeaderTooLarge when train controlnet with sdv3",
    "body": "### Describe the bug\n\nHello, I tried diffuser to train controlnet with sdv3 but it didn't start training and send `safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge` feedback. I don't know how to handle it.\n\n### Reproduction\n\nFollow the README_v3 guide.\n\n### Logs\n\n```shell\n(diffusers) [liudongyu@localhost controlnet]$ accelerate launch train_controlnet_sd3.py     --pretrained_model_name_or_path=$MODEL_DIR     --output_dir=$OUTPUT_DIR     --train_data_dir=\"/home/users/liudongyu/datasets\"     --resolution=1024     --learning_rate=1e-5     --max_train_steps=20000     --train_batch_size=1     --gradient_accumulation_steps=4\r\nDetected kernel version 3.10.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.\r\n11/14/2024 15:16:14 - INFO - __main__ - Distributed environment: DistributedType.NO\r\nNum processes: 1\r\nProcess index: 0\r\nLocal process index: 0\r\nDevice: cuda\r\n\r\nMixed precision type: no\r\n\r\nYou set `add_prefix_space`. The tokenizer needs to be converted from the slow tokenizers\r\nYou are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.\r\nYou are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.\r\nYou are using a model of type t5 to instantiate a model of type . This is not supported for all configurations of models and can yield errors.\r\n{'max_image_seq_len', 'base_image_seq_len', 'use_dynamic_shifting', 'max_shift', 'base_shift'} was not found in config. Values will be initialized to default values.\r\nTraceback (most recent call last):\r\n  File \"/home/users/liudongyu/diffuser/diffusers/examples/controlnet/train_controlnet_sd3.py\", line 1423, in <module>\r\n    main(args)\r\n  File \"/home/users/liudongyu/diffuser/diffusers/examples/controlnet/train_controlnet_sd3.py\", line 982, in main\r\n    text_encoder_one, text_encoder_two, text_encoder_three = load_text_encoders(\r\n                                                             ^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/users/liudongyu/diffuser/diffusers/examples/controlnet/train_controlnet_sd3.py\", line 187, in load_text_encoders\r\n    text_encoder_two = class_two.from_pretrained(\r\n                       ^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/users/liudongyu/anaconda3/envs/diffusers/lib/python3.11/site-packages/transformers/modeling_utils.py\", line 3789, in from_pretrained\r\n    with safe_open(resolved_archive_file, framework=\"pt\") as f:\r\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nsafetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge\r\nTraceback (most recent call last):\r\n  File \"/home/users/liudongyu/anaconda3/envs/diffusers/bin/accelerate\", line 8, in <module>\r\n    sys.exit(main())\r\n             ^^^^^^\r\n  File \"/home/users/liudongyu/anaconda3/envs/diffusers/lib/python3.11/site-packages/accelerate/commands/accelerate_cli.py\", line 48, in main\r\n    args.func(args)\r\n  File \"/home/users/liudongyu/anaconda3/envs/diffusers/lib/python3.11/site-packages/accelerate/commands/launch.py\", line 1168, in launch_command\r\n    simple_launcher(args)\r\n  File \"/home/users/liudongyu/anaconda3/envs/diffusers/lib/python3.11/site-packages/accelerate/commands/launch.py\", line 763, in simple_launcher\r\n    raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)\r\nsubprocess.CalledProcessError: Command '['/home/users/liudongyu/anaconda3/envs/diffusers/bin/python', 'train_controlnet_sd3.py', '--pretrained_model_name_or_path=stabilityai/stable-diffusion-3-medium-diffusers', '--output_dir=sd3-controlnet-out', '--train_data_dir=/home/users/liudongyu/datasets', '--resolution=1024', '--learning_rate=1e-5', '--max_train_steps=20000', '--train_batch_size=1', '--gradient_accumulation_steps=4']' returned non-zero exit status 1.\n```\n\n\n### System Info\n\nCopy-and-paste the text below in your GitHub issue and FILL OUT the two last points.\r\n\r\n- \ud83e\udd17 Diffusers version: 0.31.0.dev0\r\n- Platform: Linux-3.10.0-1160.114.2.el7.x86_64-x86_64-with-glibc2.17\r\n- Running on Google Colab?: No\r\n- Python version: 3.11.10\r\n- PyTorch version (GPU?): 2.0.1+cu117 (True)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Huggingface_hub version: 0.25.2\r\n- Transformers version: 4.45.2\r\n- Accelerate version: 1.0.0\r\n- PEFT version: not installed\r\n- Bitsandbytes version: not installed\r\n- Safetensors version: 0.4.5\r\n- xFormers version: not installed\r\n- Accelerator: NVIDIA A100-PCIE-40GB, 40960 MiB\r\nNVIDIA A100 80GB PCIe, 81920 MiB\r\n- Using GPU in script?: yes\r\n- Using distributed or parallel set-up in script?: no\r\n\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9927",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-11-14T07:28:03Z",
    "updated_at": "2024-11-21T13:02:05Z",
    "comments": 3,
    "user": "Viola-Siemens"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7290,
    "title": "`Dataset.save_to_disk` hangs when using num_proc > 1",
    "body": "### Describe the bug\n\nHi, I'm encountered a small issue when saving datasets that led to the saving taking up to multiple hours.\r\nSpecifically, [`Dataset.save_to_disk`](https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset.save_to_disk) is a lot slower when using `num_proc>1` than when using `num_proc=1`\r\n\r\nThe documentation mentions that \"Multiprocessing is disabled by default.\", but there is no explanation on how to enable it.\n\n### Steps to reproduce the bug\n\n```\r\nimport numpy as np\r\nfrom datasets import Dataset\r\n\r\nn_samples = int(4e6)\r\nn_tokens_sample = 100\r\ndata_dict = {\r\n    'tokens' : np.random.randint(0, 100, (n_samples, n_tokens_sample)),\r\n}\r\n\r\ndataset = Dataset.from_dict(data_dict)\r\ndataset.save_to_disk('test_dataset', num_proc=1)\r\ndataset.save_to_disk('test_dataset', num_proc=4)\r\ndataset.save_to_disk('test_dataset', num_proc=8)\r\n```\r\n\r\nThis results in:\r\n```\r\n>>> dataset.save_to_disk('test_dataset', num_proc=1)\r\nSaving the dataset (7/7 shards): 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 4000000/4000000 [00:17<00:00, 228075.15 examples/s]\r\n>>> dataset.save_to_disk('test_dataset', num_proc=4)\r\nSaving the dataset (7/7 shards): 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 4000000/4000000 [01:49<00:00, 36583.75 examples/s]\r\n>>> dataset.save_to_disk('test_dataset', num_proc=8)\r\nSaving the dataset (8/8 shards): 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 4000000/4000000 [02:11<00:00, 30518.43 examples/s]\r\n```\r\n\r\nWith larger datasets it can take hours, but I didn't benchmark that for this bug report.\n\n### Expected behavior\n\nI would expect using `num_proc>1` to be faster instead of slower than `num_proc=1`. \n\n### Environment info\n\n- `datasets` version: 3.1.0\r\n- Platform: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35\r\n- Python version: 3.10.12\r\n- `huggingface_hub` version: 0.26.2\r\n- PyArrow version: 18.0.0\r\n- Pandas version: 2.2.3\r\n- `fsspec` version: 2024.6.1",
    "url": "https://github.com/huggingface/datasets/issues/7290",
    "state": "open",
    "labels": [],
    "created_at": "2024-11-14T05:25:13Z",
    "updated_at": "2025-11-24T09:43:03Z",
    "comments": 4,
    "user": "JohannesAck"
  },
  {
    "repo": "pytorch/executorch",
    "number": 6846,
    "title": "How to Apply Different Quantization Settings Per Layer in ExecuTorch?",
    "body": "Dear  @kimishpatel @jerryzh168 @shewu-quic \r\n\r\nI want to split a model(eg, Llama-3.2-3B) into multiple layers and apply different quantization settings(qnn_8a8w, qnn_16a4w...) to each layer.\r\nHas such a method been tested in ExecuTorch?\r\nIf not, could you suggest how this can be achieved?\r\n\r\nThank you",
    "url": "https://github.com/pytorch/executorch/issues/6846",
    "state": "open",
    "labels": [
      "partner: qualcomm",
      "triaged",
      "module: quantization"
    ],
    "created_at": "2024-11-14T02:48:39Z",
    "updated_at": "2024-12-23T19:32:53Z",
    "user": "crinex"
  },
  {
    "repo": "huggingface/trl",
    "number": 2356,
    "title": "How to train from scratch? Can you provide the code",
    "body": "### System Info\n\n train from scratch\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n train from scratch\n\n### Expected behavior\n\n train from scratch\n\n### Checklist\n\n- [X] I have checked that my issue isn't already filed (see [open issues](https://github.com/huggingface/trl/issues?q=is%3Aissue))\n- [X] I have included my system information\n- [X] Any code provided is minimal, complete, and reproducible ([more on MREs](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks))\n- [X] Any code provided is properly formatted in code blocks, (no screenshot, [more on code blocks](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks))\n- [X] Any traceback provided is complete",
    "url": "https://github.com/huggingface/trl/issues/2356",
    "state": "closed",
    "labels": [
      "\u2753 question"
    ],
    "created_at": "2024-11-14T02:39:41Z",
    "updated_at": "2024-12-13T23:00:20Z",
    "user": "sankexin"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3054,
    "title": "'scale' hyperparameter in MultipleNegativesRankingLoss",
    "body": "I am looking through the MultipleNegativesRankingLoss.py code and I have question about the 'scale' hyperparameter. Also known as the 'temperature', the scale is used to stretch or compress the range of output values from the similarity function. A larger scale creates greater distinction between positive and negative examples in terms of similarity score differences. The line below is how the scale is used in the forward function of the loss. \r\n\r\n`scores = self.similarity_fct(embeddings_a, embeddings_b) * self.scale`\r\n\r\nCurrently, the scale is set to 20 for when cosine similarity is used as the distance metric. \r\n\r\nWhy was 20 selected as the scale for when using cosine similarity on the embeddings? Is this the optimal scale value for cosine similarity? Would this hyperparameter need to be optimized during fine-tuning? ",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3054",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-14T00:11:23Z",
    "updated_at": "2025-01-16T13:54:45Z",
    "user": "gnatesan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9924,
    "title": "Can we get more schedulers for flow based models such as SD3, SD3.5, and flux",
    "body": "It seems advanced schedulers such as DDIM, and the dpm++ 2m does work with flow based model such as SD3, SD3.5, and flux. \r\nHowever, I only see 2 flow based schedulers in diffusers codebase:\r\n\r\nFlowMatchEulerDiscreteScheduler, and'\r\nFlowMatchHeunDiscreteScheduler\r\n\r\nI tried to use DPMSolverMultistepScheduler, but it does not generate correct images with flow based models. Help?\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9924",
    "state": "open",
    "labels": [
      "wip",
      "scheduler"
    ],
    "created_at": "2024-11-14T00:07:56Z",
    "updated_at": "2025-01-14T18:31:12Z",
    "comments": 40,
    "user": "linjiapro"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 676,
    "title": "Very low wps with H200 Gpus",
    "body": "Hello, I am running the multinode_trainer.slurm (llama3_70b.toml) on 4 nodes that have 32  H200 Gpus. However, wps is only around ~200. Any ideas what can cause this slowness?\r\n\r\n[output.txt](https://github.com/user-attachments/files/17740634/output.txt)\r\n\r\n[multinode_trainer.slurm.txt](https://github.com/user-attachments/files/17740601/multinode_trainer.slurm.txt)\r\n",
    "url": "https://github.com/pytorch/torchtitan/issues/676",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-13T23:59:00Z",
    "updated_at": "2025-02-26T04:16:21Z",
    "user": "aniltrkkn"
  },
  {
    "repo": "pytorch/xla",
    "number": 8379,
    "title": "Confusing text in bazel.md",
    "body": "## \ud83d\udcda Documentation\r\n\r\nThe bazil.md file contains the following text:\r\n\r\nBazel brings in [pybind11](https://github.com/pybind/pybind11) embeded python and links against it to provide libpython to the plugin using this mechanism. Python headers are also sourced from there instead of depending on the system version. These are satisfied from the \"@pybind11//:pybind11_embed\", which sets up compiler options for linking with libpython transitively.\r\n\r\nFrom what I can determine:\r\n\r\n-  `pybind` is a library of headers that defines an API for C++ and Python code to interact\r\n-   libpython is a library that provides the core implementation of the Python interpreter\r\n\r\nThe text above says \"Bazel ... links against pybind to provide libpython to the plugin...\" \r\n\r\n-  What does this mean? \r\n-  To what plugin does this refer?\r\n-  How does Bazel \"provide libpython to the plugin\"? Does this mean that Bazel uses the libpython library when building the plugin and the plugin uses the API defined in pybind to call into libpython? Why is it important to state how the plugin communicates with libpython?\r\n\r\nThe text says:  \"Python headers are also sourced from there instead of depending on the system version. \"\r\n\r\n- To where does \"there\" refer?\r\n\r\nThe text says: \"These are satisfied from the \"@pybind11//:pybind11_embed\", which sets up compiler options for linking with libpython transitively.\"\r\n\r\n- What does \"these\" refer to?\r\n- What is \"@pybind11//:pybind11_embed\"?\r\n-  What does it mean to link with libpython transitively?\r\n",
    "url": "https://github.com/pytorch/xla/issues/8379",
    "state": "open",
    "labels": [
      "documentation",
      "build"
    ],
    "created_at": "2024-11-13T23:11:00Z",
    "updated_at": "2025-11-13T00:46:46Z",
    "comments": 3,
    "user": "mikegre-google"
  },
  {
    "repo": "pytorch/executorch",
    "number": 6813,
    "title": "How to convert tokenizer of SmolLM model as accepted by executorch",
    "body": "Hi,\r\nI am trying to convert [SmolLm-135M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM-135M-Instruct) model to .pte format and then run on an android device.\r\nI have been successful in converting the model but executorch requires the tokenizer in either .bin format or .model format which can then be converted into .bin format. But on huggingface tokenizer.model or tokenizer.bin files are not present. \r\n\r\nHow would I go about converting the tokenizer.json file into the appropriate format.\n\ncc @mergennachin @byjlw",
    "url": "https://github.com/pytorch/executorch/issues/6813",
    "state": "open",
    "labels": [
      "triaged",
      "module: extension",
      "module: user experience"
    ],
    "created_at": "2024-11-13T11:19:13Z",
    "updated_at": "2025-12-18T20:16:46Z",
    "user": "Arpit2601"
  },
  {
    "repo": "huggingface/pytorch-image-models",
    "number": 2332,
    "title": "[BUG] How to customize the number of classification heads",
    "body": "**Describe the bug**\r\n\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\nfrom timm.models import create_model\r\ncheckpoint_path = \"/nas_mm_2/yinxiaofei.yxf/open_source_model/InternViT-300M-448px/tmp/timm__vit_intern300m_patch14_448.ogvl_dist/model.safetensors\"\r\nmodel = create_model('vit_intern300m_patch14_448',checkpoint_path=checkpoint_path, num_classes = 3)\r\n\r\n\r\n**Screenshots**\r\nRuntimeError: Error(s) in loading state_dict for VisionTransformer:\r\nMissing key(s) in state_dict: \"head.weight\", \"head.bias\". \r\n\r\n\r\n**Additional context**\r\nIf I remove the num_classes = 3 parameter, then this program is completely normal\r\n",
    "url": "https://github.com/huggingface/pytorch-image-models/issues/2332",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-11-12T08:08:50Z",
    "updated_at": "2024-11-12T15:28:42Z",
    "user": "JarvisFei"
  },
  {
    "repo": "pytorch/xla",
    "number": 8371,
    "title": "TPU Trillium Base Docker Image cannot initialize ",
    "body": "## TPU initialization is failed\r\n\r\nWhen I started tpu v6e-4 TPU Vm with v2-alpha-tpuv6e base image, with pip enviroment and xla updates I can clearly initialized tpus. However when I start to dockerize my pipelie, it fails to initialize TPUs. I tried so much tpu xla base images but I could not achieve to initialize. This happens everytime get device from torch_xla.core.xla_model.xla_device().\r\n\r\nI have checked this base images. I guess v2-alpha-tpuv6e configuration is crucial, is there any related base docker image?\r\n\r\n> us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:nightly_3.10_tpuvm_20241028\r\n\r\n> us-central1-docker.pkg.dev/deeplearning-images/reproducibility/pytorch-tpu-diffusers:v4\r\n\r\n## To Reproduce\r\n# DevDockerfile\r\n```dockerfile\r\nFROM us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:nightly_3.10_tpuvm_20241028\r\n\r\n# Set environment variables to avoid prompts during installation\r\nENV DEBIAN_FRONTEND=noninteractive\r\nENV PYTHONUNBUFFERED=1\r\n\r\nRUN apt-get update && apt-get install -y \\\r\n    vim \\\r\n    curl \\\r\n    git \\\r\n    bash \\\r\n    wget \\\r\n    libopenblas-base \\\r\n    && rm -rf /var/lib/apt/lists/*\r\n\r\nRUN pip3 install  --no-cache-dir --pre torch==2.6.0.dev20241028+cpu torchvision==0.20.0.dev20241028+cpu --index-url https://download.pytorch.org/whl/nightly/cpu\r\nRUN pip install \"torch_xla[tpu] @ https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-2.6.0.dev20241028-cp310-cp310-linux_x86_64.whl\" -f https://storage.googleapis.com/libtpu-releases/index.html\r\nRUN pip install torch_xla[pallas] -f https://storage.googleapis.com/jax-releases/jax_nightly_releases.html -f https://storage.googleapis.com/jax-releases/jaxlib_nightly_releases.html\r\nCOPY . .\r\nCMD [\"python3\", \"app.py\"]\r\n``` \r\n\r\n\r\n#app.py \r\n```python\r\n# Quite simple to reproduce\r\nimport torch_xla.core.xla_model as xm\r\n\r\n#Hangs in here not initilize tpu.\r\ndevice = xm.xla_device()\r\n``` \r\n\r\n\r\nBoth file are in same directory. Generate docker with \r\n`docker build -f DevDockerfile -t tpu .`\r\nThen run with privileged.\r\n`docker run -ti --rm -p 5000:5000 --privileged tpu`\r\n\r\n\r\n## Expected behavior\r\n\r\n<!-- Tpu cores cannot initialized in docker enviroment. It should initialized as not docker ones-->\r\n\r\n## Environment\r\n\r\n - Reproducible on XLA backend [CPU/TPU/CUDA]:\r\n - torch_xla version: torch_xla-2.6.0.dev20241028-cp310\r\n",
    "url": "https://github.com/pytorch/xla/issues/8371",
    "state": "open",
    "labels": [
      "bug",
      "xla:tpu"
    ],
    "created_at": "2024-11-12T07:38:53Z",
    "updated_at": "2025-02-18T12:43:11Z",
    "comments": 9,
    "user": "hsebik"
  },
  {
    "repo": "huggingface/unity-api",
    "number": 30,
    "title": "[QUESTION]",
    "body": "I have a simple game built in unity and I'm using this Hugging face API client for voice parsing. I'm trying to understand when I build and run the game, and want to distribute it to many users, how do I keep the same api key every time so that users can install and run voice control it without any issue?",
    "url": "https://github.com/huggingface/unity-api/issues/30",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-11-12T02:35:52Z",
    "updated_at": "2024-11-20T01:46:16Z",
    "user": "harshal-14"
  },
  {
    "repo": "pytorch/vision",
    "number": 8721,
    "title": "make processing of arbitrary inputs to transforms.v2 public and document it",
    "body": "### \ud83d\ude80 The feature\n\nSupporting arbitrary input structures in custom transforms is very important in the case of transform compositions:\r\n```python\r\ntr = Compose([RandomCrop((128,128), CustomTransform])\r\n```\r\nThis can be done by inheriting from `torchvision.transforms.v2.Transform` and implementing the **private** `._transform` method, which avoids having to unravel the data structure on your own (since this is done anyway in the `.forward` method). \r\n```python\r\nclass CustomTransform(Transform):\r\n  def __init__(self, *kwargs):\r\n    pass\r\n  def _transform(self, inpt, params):\r\n    if isinstance(inpt, Image):\r\n      pass\r\n    elif isinstance(inpt, BoundingBoxes):\r\n      pass\r\n    else:\r\n      pass\r\n    return transformed_inpt\r\n```\r\nThe method has also been described in this blog post [How to Create Custom Torchvision V2 Transforms](https://christianjmills.com/posts/torchvision-custom-v2-transform-tutorial/index.html), but the official torchvision docs do not yet describe it and instead suggest hard-coding the input structure.\r\n\r\nHaving to implement a **private** method for this (even though the class `Transform` is public) feels very wrong this means that things could break on our side any time. I would appreciate if the `._transform` method was made public -> `.transform` and the `Transform` class would receive proper documentation on how this method should be implemented for custom transforms.\n\n### Motivation, pitch\n\nThe `torchvision.transforms.v2` API has now been around for quite some time already and it would be nice to give developers the chance to develop transforms of the same quality and flexibility as the originally implemented ones!\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/8721",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-11T13:48:03Z",
    "updated_at": "2024-12-09T12:39:09Z",
    "comments": 3,
    "user": "liopeer"
  },
  {
    "repo": "huggingface/swift-transformers",
    "number": 140,
    "title": "How to use customized tokenizer?",
    "body": "Hello. I am writing this post because I have a question about loading the tokenizer model. I am trying to use a pre-trained tokenizer in a Swift environment. After training, how do I apply the byproduct .model and .vocab files so that I can use the tokenizer I trained in Swift while using the swift-transformer API? I would appreciate it if you could answer.",
    "url": "https://github.com/huggingface/swift-transformers/issues/140",
    "state": "open",
    "labels": [
      "tokenization"
    ],
    "created_at": "2024-11-11T09:36:14Z",
    "updated_at": "2025-09-10T13:19:10Z",
    "user": "cch1219"
  },
  {
    "repo": "pytorch/audio",
    "number": 3852,
    "title": "Can anyone provide a real-time pretrain model for Visual Speech Recognition?",
    "body": "### \ud83d\udcda The doc issue\n\nI don't have the LRS3 dataset, I can't use the author's real time recipe, I would like to ask if I can directly request the trained MODEL? I would like to ask the author if he can provide the trained mods directly, or if there is anyone who has the download point of LRS3, thank you!\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/audio/issues/3852",
    "state": "open",
    "labels": [],
    "created_at": "2024-11-11T06:19:57Z",
    "updated_at": "2024-11-11T06:19:57Z",
    "comments": 0,
    "user": "bernie-122"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9900,
    "title": "Potential bug in repaint?",
    "body": "https://github.com/huggingface/diffusers/blob/dac623b59f52c58383a39207d5147aa34e0047cd/src/diffusers/schedulers/scheduling_repaint.py#L322\r\n\r\nAccording to line5 of algorithm 1 in the paper, the second part in line 322 should remove the `**0.5`?\r\nthanks!",
    "url": "https://github.com/huggingface/diffusers/issues/9900",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-10T10:41:26Z",
    "updated_at": "2024-12-16T19:38:22Z",
    "comments": 3,
    "user": "jingweiz"
  },
  {
    "repo": "pytorch/vision",
    "number": 8722,
    "title": "The link of **Multi-view Stereo Correspondence** doesn't exist in the doc",
    "body": "### \ud83d\udcda The doc issue\n\n[The link](http://matthewalunbrown.com/patchdata/patchdata.html) of **Multi-view Stereo Correspondence** doesn't exist in [the doc](https://pytorch.org/vision/stable/datasets.html#image-pairs) as shown below:\r\n\r\n![Screenshot 2024-11-10 102207](https://github.com/user-attachments/assets/a279a8a3-831b-4d03-8993-96caabdd5e4b)\r\n\r\n\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/8722",
    "state": "open",
    "labels": [
      "module: documentation"
    ],
    "created_at": "2024-11-10T01:31:15Z",
    "updated_at": "2024-11-27T17:56:47Z",
    "comments": 3,
    "user": "hyperkai"
  },
  {
    "repo": "pytorch/serve",
    "number": 3362,
    "title": "Trying to find a doc explaining how the scaling works (min_worker to max_worker)",
    "body": "### \ud83d\udcda The doc issue\n\nCan anyone help out?\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/3362",
    "state": "open",
    "labels": [],
    "created_at": "2024-11-09T22:01:02Z",
    "updated_at": "2024-11-09T22:01:02Z",
    "user": "lschaupp"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 82,
    "title": "[question] what is the difference between cofgvideo scheduler and normal diffuers scheduler",
    "body": "### Feature request  / \u529f\u80fd\u5efa\u8bae\n\nCogVideoXDPMScheduler VS DPMSCheduler\r\nCogVideoXDDIMScheduler VS DDIM Scheduler\r\nHi Aryan, is there any sampling difference between these two sampler? \r\n@a-r-r-o-w \n\n### Motivation / \u52a8\u673a\n\n/\n\n### Your contribution / \u60a8\u7684\u8d21\u732e\n\n/",
    "url": "https://github.com/huggingface/finetrainers/issues/82",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-09T17:15:57Z",
    "updated_at": "2024-12-19T14:43:23Z",
    "user": "foreverpiano"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2092,
    "title": "Add support for RemBERT in the ONNX export",
    "body": "### Feature request\n\nAdd RemBERT to supported architectures for ONNX export.\n\n### Motivation\n\nThe support for [RemBert](https://huggingface.co/docs/transformers/model_doc/rembert) was previously available in Transformers see [here](https://github.com/huggingface/transformers/issues/16308). However,  now it seems that RemBERT is no longer supported.\n\n### Your contribution\n\nI can help by testing implementation or providing the code if provided by some tutorial. I was not able to find documentation on how to do that.",
    "url": "https://github.com/huggingface/optimum/issues/2092",
    "state": "closed",
    "labels": [
      "onnx"
    ],
    "created_at": "2024-11-08T15:12:34Z",
    "updated_at": "2024-12-02T13:54:10Z",
    "comments": 1,
    "user": "mlynatom"
  },
  {
    "repo": "pytorch/xla",
    "number": 8366,
    "title": "Export training model to StableHlo",
    "body": "## \u2753 Questions and Help\r\nThe export API only supports `torch.nn.module` as input, is any method to export a training model with **step_fn** to StableHlo?\r\n\r\nHere is a simple training case from [example](https://github.com/pytorch/xla/blob/6454b42fd404d13f2008730ed4ad33b3a91723e3/examples/train_resnet_base.py#L16):\r\n```python\r\n  def __init__(self):\r\n    ...\r\n    self.device = torch_xla.device()\r\n    self.model = torchvision.models.resnet50().to(self.device)\r\n    self.optimizer = optim.SGD(self.model.parameters(), weight_decay=1e-4)\r\n    self.loss_fn = nn.CrossEntropyLoss()\r\n    ...\r\n\r\n  def run_optimizer(self):\r\n    self.optimizer.step()\r\n\r\n  def step_fn(self, data, target):\r\n    self.optimizer.zero_grad()\r\n    output = self.model(data)\r\n    loss = self.loss_fn(output, target)\r\n    loss.backward()\r\n    self.run_optimizer()\r\n    return loss\r\n```\r\n\r\nThe guidance https://pytorch.org/xla/master/features/stablehlo.html#torch-export-to-stablehlo only introduced how to export the original `self.model`, but it didn't tell how to export the model with Optimizer and Loss functions.",
    "url": "https://github.com/pytorch/xla/issues/8366",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-08T08:02:01Z",
    "updated_at": "2025-01-09T02:00:38Z",
    "comments": 3,
    "user": "Zantares"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 502,
    "title": "Low accuracy for diffusion policy+aloha env+sim_transfer_cude_human dataset",
    "body": "I'm trying to use diffusion model and aloha env to train on sim_transfer_cude_human dataset. But after 60000 training step, the evaluation accuracy is only 2%-6%. Idont know why? If I load pre-trained act policy, the accuracy can reach 80%.",
    "url": "https://github.com/huggingface/lerobot/issues/502",
    "state": "open",
    "labels": [
      "question",
      "simulation"
    ],
    "created_at": "2024-11-08T02:20:14Z",
    "updated_at": "2025-11-29T02:48:27Z",
    "user": "Kimho666"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1358,
    "title": "Create doc and tests for distributed inference",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nOnce distributed inference integration into torchchat is functional, let's add a docs/distributed.md with an example, and plumb that example into `.ci/scripts/run-docs distributed`.  (updown.py extracts all commands between triple backticks into a test script.) \r\n\r\ntorchchat has the same runners as pytorch/pytorch, so at least a minimal 2 or 4 GPU setup on a single node would be great.  Not sure whether we can run multi-node testing, you can suppress commands from tests with `[skip default]: begin` and `[skip default]: end` around those commands.  \r\n\r\ncc: @mreso @lessw2020 @kwen2501 \n\n### Alternatives\n\nNone\n\n### Additional context\n\n_No response_\n\n### RFC (Optional)\n\n_No response_",
    "url": "https://github.com/pytorch/torchchat/issues/1358",
    "state": "closed",
    "labels": [
      "documentation",
      "actionable",
      "Distributed",
      "triaged"
    ],
    "created_at": "2024-11-08T02:08:33Z",
    "updated_at": "2025-01-18T06:15:01Z",
    "comments": 2,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/local-gemma",
    "number": 41,
    "title": "How to load from file?",
    "body": "How to load model from file, eg. .h5 file, instead of downloading the model?\r\nEspecially the model saved by keras_nlp.",
    "url": "https://github.com/huggingface/local-gemma/issues/41",
    "state": "open",
    "labels": [],
    "created_at": "2024-11-07T03:01:25Z",
    "updated_at": "2024-11-07T03:03:31Z",
    "user": "datdq-abivin"
  },
  {
    "repo": "pytorch/FBGEMM",
    "number": 3338,
    "title": "how to add -r in build instructions ? ",
    "body": "<img width=\"1053\" alt=\"image\" src=\"https://github.com/user-attachments/assets/63c8565c-55b6-4ee0-a209-60862c51fe68\">\r\n",
    "url": "https://github.com/pytorch/FBGEMM/issues/3338",
    "state": "open",
    "labels": [],
    "created_at": "2024-11-07T02:06:21Z",
    "updated_at": "2024-11-07T06:03:40Z",
    "user": "zhaozheng09"
  },
  {
    "repo": "pytorch/xla",
    "number": 8359,
    "title": "Query regarding using 1 chip (2 cores of TPU v3) for Inference",
    "body": "## \u2753 Questions and Help\r\nHello,\r\nI am trying to benchmark the performance of TPU v3 for inference. However, I would like to use 2 cores (1 chip).\r\nPlease point me to any documentation that I can get started on. \r\nAlso, is it possible to launch 2 inferences on 2 cores as separate independent processes?  (This would just give 2x the performance of one core) \r\nThanks again,\r\nDeepak \r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/8359",
    "state": "open",
    "labels": [
      "question",
      "xla:tpu"
    ],
    "created_at": "2024-11-06T18:03:21Z",
    "updated_at": "2025-02-18T12:45:15Z",
    "user": "deepakkumar2440"
  },
  {
    "repo": "pytorch/vision",
    "number": 8713,
    "title": "`torchvision.ops.boxes.batched_nms` slow on large box numbers",
    "body": "### \ud83d\udc1b Describe the bug\n\n## Description\r\n\r\n`torchvision.ops.boxes.batched_nms` on CUDA GPU slows down considerably when then number of bounding boxes involved increases.\r\n\r\nThe slow down is associated with Device -> Host transfer, and is linked to the iterative part of the Non Maximum Suppression (NMS) algorithm. In a nutshell the IoU map is computed on the device, then the mask is copied to the CPU to perform the iterative unwrap, which result is copied back to the device (from [here and below](https://github.com/pytorch/vision/blob/868a3b42f4bffe29e4414ad7e4c7d9d0b4690ecb/torchvision/csrc/ops/cuda/nms_kernel.cu#L136)).\r\n\r\nThe mask size grows quadratically with the number of input bounding boxes and we see a large TX rate when running on 30_000+ boxes.\r\n\r\nIn comparison the [OpenLabs mmcv](https://github.com/open-mmlab/mmcv) solution does the same thing for the IoU map but runs a custom kernel to do the unwrap directly on the device. The[ implemented kernel](https://github.com/open-mmlab/mmcv/blob/71437a361cc8918fc398ae408267cf019f4ca03f/mmcv/ops/csrc/common/cuda/nms_cuda_kernel.cuh#L76) is not very efficient compute wise but save the data transfer cost, which is the main bottleneck.\r\n\r\nI benchmarked `torchvision` batched_nms against `mmcv`'s on `V100` and `A100` GPUs.\r\n![A100_bench_rel_loglog](https://github.com/user-attachments/assets/12fbc0c7-e883-446d-8e3d-c753072abd5b)\r\n![V100_bench_rel_loglog](https://github.com/user-attachments/assets/15fa6971-1f70-4355-93ea-094f3b9d9509)\r\nBoth figures show the speed factor when comparing a solution to `torchvision.ops.boxes._batched_nms_vanilla` (there is 2 nms in torchvision, selected based on the number of elements. Here , `torchvision.ops.boxes._batched_nms_vanilla` is used a base comparison and we compare `torchvision.ops.boxes._batched_nms_coordinate_trick` and `mmcv` batched_nms). From 30k boxes and above `mmcv` NMS is x20+ faster.\r\n\r\nIs there a reason why we keep this GPU -> CPU transfer ?\r\nCould we improve the scalability by having a similar on-device additional kernel ?\r\n\r\n## Additional informations\r\n\r\n* All boxes are from the same class\r\n* Benchmark has been done using `torch.utils.benchmark.Timer` on 100 examples for each NMS.\r\n* I did not know if this should be put as Bug report or Feature request.\n\n### Versions\n\n```\r\nPyTorch version: 2.5.0+cu124\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.4\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 22.04.5 LTS (x86_64)\r\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\r\nClang version: 14.0.0-1ubuntu1.1\r\nCMake version: version 3.24.1\r\nLibc version: glibc-2.35\r\n\r\nPython version: 3.10.14 (main, May 14 2024, 06:11:20) [GCC 11.4.0] (64-bit runtime)\r\nPython platform: Linux-5.10.219-208.866.amzn2.x86_64-x86_64-with-glibc2.35\r\nIs CUDA available: True\r\nCUDA runtime version: 12.1.105\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: GPU 0: NVIDIA A100-SXM4-40GB\r\nNvidia driver version: 535.183.01\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.2\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                         x86_64\r\nCPU op-mode(s):                       32-bit, 64-bit\r\nAddress sizes:                        46 bits physical, 48 bits virtual\r\nByte Order:                           Little Endian\r\nCPU(s):                               96\r\nOn-line CPU(s) list:                  0-95\r\nVendor ID:                            GenuineIntel\r\nModel name:                           Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz\r\nCPU family:                           6\r\nModel:                                85\r\nThread(s) per core:                   2\r\nCore(s) per socket:                   24\r\nSocket(s):                            2\r\nStepping:                             7\r\nBogoMIPS:                             5999.99\r\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves ida arat pku ospke\r\nHypervisor vendor:                    KVM\r\nVirtualization type:                  full\r\nL1d cache:                            1.5 MiB (48 instances)\r\nL1i cache",
    "url": "https://github.com/pytorch/vision/issues/8713",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-06T12:58:13Z",
    "updated_at": "2025-02-20T17:16:10Z",
    "comments": 1,
    "user": "Ghelfi"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9876,
    "title": "Why isn\u2019t VRAM being released after training LoRA?",
    "body": "### Describe the bug\n\nWhen I use train_dreambooth_lora_sdxl.py, the VRAM is not released after training. How can I fix this?\n\n### Reproduction\n\nNot used.\n\n### Logs\n\n_No response_\n\n### System Info\n\n\r\n- \ud83e\udd17 Diffusers version: 0.31.0.dev0\r\n- Platform: Linux-5.14.0-284.25.1.el9_2.x86_64-x86_64-with-glibc2.17\r\n- Running on Google Colab?: No\r\n- Python version: 3.8.20\r\n- PyTorch version (GPU?): 2.2.0 (True)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Huggingface_hub version: 0.25.2\r\n- Transformers version: 4.45.2\r\n- Accelerate version: 1.0.1\r\n- PEFT version: 0.13.2\r\n- Bitsandbytes version: 0.44.1\r\n- Safetensors version: 0.4.5\r\n- xFormers version: not installed\r\n- Accelerator: NVIDIA H800, 81559 MiB\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9876",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-11-06T11:58:59Z",
    "updated_at": "2024-12-13T15:03:25Z",
    "comments": 14,
    "user": "hjw-0909"
  },
  {
    "repo": "pytorch/ao",
    "number": 1230,
    "title": "How to skip decomposition of dequantize_affine and quantize_affine custom ops in inductor?",
    "body": "I want to use the `torch.ops.quant.quantize_affine` (Q) and `torch.ops.quant.dequantize_affine` (DQ) to represent a quant model DAG in QDQ style, and do quant fusion using inductor's [pattern matcher](https://github.com/pytorch/pytorch/blob/main/torch/_inductor/pattern_matcher.py), for instance:\r\n```\r\nx(i8)       w(i8)      b(i32)      x(i8)       w(i8)      b(i32)\r\n |            |          |           |           |          |\r\nDQ           DQ         DQ           |           |          |\r\n  \\           |         /             \\          |         /   \r\ntorch.ops.aten.linear.default   ->    my_q_linear_triton_impl\r\n              |                                  |\r\n              Q                                  |\r\n              |                                  |\r\n            y(i8)                               y(i8)\r\n```\r\nHowever, since `torch.ops.quant.quantize_affine` and `torch.ops.quant.dequantize_affine` are registered to inductor's decomposition table, as well as with `CompositeImplicitAutograd` flag, they are decomposed in aot_autograd.\r\n\r\nI wonder how to preserve the original Q-DQ  ops after aot_autograd? I noticed that the torch's built-in custom Q-DQ ops, such as `torch.ops.quantized_decomposed.quantize_per_tensor` and `torch.ops.quantized_decomposed.dequantize_per_tensor`, can be preserved after aot_autograd, and there are [pattern rewrites](https://github.com/pytorch/pytorch/blob/main/torch/_inductor/fx_passes/quantization.py) based on these Q-DQ ops. (BTW, what's the relationship between torchao and torch.ao module, will torchao be merged into torch.ao in the future?)",
    "url": "https://github.com/pytorch/ao/issues/1230",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-06T08:01:46Z",
    "updated_at": "2024-11-12T05:35:06Z",
    "user": "Nullkooland"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9866,
    "title": "Flux controlnet can't be trained, do this script really work?",
    "body": "### Describe the bug\n\nrun with one num processes, the code broke down and returns:\r\nRuntimeError: Expected to have finished reduction in the prior iteration before starting a new one. This error indicates that your module has parameters that were not used in producing loss. You can enable unused parameter detection by passing the keyword argument `find_unused_parameters=True` to `torch.nn.parallel.DistributedDataParallel`, and by \r\n\r\nrun with more than one  processes, the code broke down and returns:\r\nSome NCCL operations have failed or timed out. Due to the asynchronous nature of CUDA kernels, subsequent GPU operations might run on corrupted/incomplete data.\n\n### Reproduction\n\njust follow the instructions and it will be reproduced\n\n### Logs\n\n_No response_\n\n### System Info\n\ndiffusers v0.32\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9866",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-11-05T08:51:57Z",
    "updated_at": "2024-12-05T15:19:12Z",
    "comments": 4,
    "user": "liuyu19970607"
  },
  {
    "repo": "pytorch/executorch",
    "number": 6655,
    "title": "How To Building and Running Llama 3.2 1B Instruct with Qualcomm AI Engine Direct Backend\uff1f",
    "body": "### Right Case\r\nWhen I follow the doc : https://github.com/pytorch/executorch/blob/main/examples/models/llama/README.md#enablement,\r\nI export the Llama3.2-1B-Instruct:int4-spinquant-eo8 model to xnnpack backend pte successfully, and working alright on cpu.\r\n\r\n[\r\n![SpinQuant_XNNPACK](https://github.com/user-attachments/assets/4a9da7f9-e68b-4682-8fde-88bae0b4800f)\r\n](url)\r\n\r\n\r\n### Bad Case\r\nBut as the link: https://github.com/pytorch/executorch/blob/main/examples/models/llama/README.md, when I export to the qnn backend using mode Llama3.2-1B-Instruct, I can get the out pte file, but when I make it running on the android device, it not working right.\r\n\r\n**I export pte file like this:**\r\n\r\npython -m examples.models.llama.export_llama --checkpoint \"${MODEL_DIR}/consolidated.00.pth\" -p \"${MODEL_DIR}/params.json\" -kv --disable_dynamic_shape --qnn --pt2e_quantize qnn_16a4w -d fp32 --metadata '{\"get_bos_id\":128000, \"get_eos_ids\":[128009, 128001]}' --soc_model SM8550 --output_name=\"llama3_2_ptq_qnn_.pte\"\r\n\r\n**This is the part of output when I export**\r\n\r\nINFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_permute_copy_default_979, aten.permute_copy.default\r\nINFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_squeeze_copy_dims_175, aten.squeeze_copy.dims\r\nINFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_add_tensor_79, aten.add.Tensor\r\nINFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_select_copy_int_512, aten.select_copy.int\r\nINFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_rms_norm_default_32, aten.rms_norm.default\r\nINFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_view_copy_default_288, aten.view_copy.default\r\nINFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_permute_copy_default_980, aten.permute_copy.default\r\nINFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_convolution_default_112, aten.convolution.default\r\nINFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_permute_copy_default_981, aten.permute_copy.default\r\nINFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_view_copy_default_289, aten.view_copy.default\r\nINFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: quantized_decomposed_dequantize_per_tensor_tensor, quantized_decomposed.dequantize_per_tensor.tensor\r\n[INFO] [Qnn ExecuTorch]: Destroy Qnn backend parameters\r\n[INFO] [Qnn ExecuTorch]: Destroy Qnn context\r\n[INFO] [Qnn ExecuTorch]: Destroy Qnn device\r\n[INFO] [Qnn ExecuTorch]: Destroy Qnn backend\r\n/home/hebaotong/AI/Executorch/executorch_new/executorch/exir/emit/_emitter.py:1512: UserWarning: Mutation on a buffer in the model is detected. ExecuTorch assumes buffers that are mutated in the graph have a meaningless initial state, only the shape and dtype will be serialized.\r\n  warnings.warn(\r\nINFO:root:Required memory for activation in bytes: [0, 17552384]\r\nmodelname: llama3_2_ptq_qnn_\r\noutput_file: llama3_2_ptq_qnn_.pte\r\nINFO:root:Saved exported program to llama3_2_ptq_qnn_.pte\r\n\r\n**Screenshot of run status**\r\n\r\n![PTQ_QNN](https://github.com/user-attachments/assets/c2959707-51cc-4f9d-982f-41186ee3ddfe)\r\n",
    "url": "https://github.com/pytorch/executorch/issues/6655",
    "state": "open",
    "labels": [
      "partner: qualcomm",
      "triaged",
      "module: qnn",
      "module: llm"
    ],
    "created_at": "2024-11-05T08:00:19Z",
    "updated_at": "2025-12-19T19:15:57Z",
    "user": "baotonghe"
  },
  {
    "repo": "pytorch/serve",
    "number": 3357,
    "title": "413 Request Entity Too Large",
    "body": "### \ud83d\udcda The doc issue\n\nWhen making a request, sometimes 413 Request Entity Too Large is reported. Is there any configuration for torchserve that can increase the threshold of request size?\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/3357",
    "state": "open",
    "labels": [],
    "created_at": "2024-11-05T02:38:59Z",
    "updated_at": "2025-01-12T05:21:34Z",
    "comments": 1,
    "user": "pengxin233"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3143,
    "title": "New Search Engine should link to right branch (stable/main/preview pr branch)",
    "body": "The search feature should match the branch that the docs loaded in. Why? The use case I often have is I use the search bar to quickly navigate to the page I had just edited in my PR to see how it'd render in prod. The new search engine produces results that always directs to stable, though, so there's no easy way to navigate to the page I wanted to check. This is a regression from the previous search experience.\r\n\r\nFor example, in the following preview, I'm looking for the custom operators page, which I had modified in the PR. I search for it in the preview docs, but all the results point to stable. Ideally, these would point to the docs built for my PR branch, which was the old behavior.\r\n\r\n![image](https://github.com/user-attachments/assets/640c00d2-e6ec-4413-a81a-530aedd0f447)\r\n\r\n\r\nIt would also be good for those look at docs on main to stay in docs on main (vs be redirected to stable).\r\n\r\n\r\n## Alternatives\r\n\r\nAllow the old search engine",
    "url": "https://github.com/pytorch/tutorials/issues/3143",
    "state": "closed",
    "labels": [
      "regression"
    ],
    "created_at": "2024-11-04T19:42:26Z",
    "updated_at": "2024-11-19T19:19:34Z",
    "comments": 0,
    "user": "janeyx99"
  },
  {
    "repo": "pytorch/xla",
    "number": 8355,
    "title": "Offer user guide instructions to users to leverage various `libtpu` versions",
    "body": "## \ud83d\udcda Documentation\r\n\r\nOffer user guide instructions to users to leverage various `libtpu` versions. We want users to have a clear understanding of how to set their expectations when choosing between different libtpu options.\r\n\r\nHere is a snippet of various libtpu version. I will add more details (as needed) to this bug.\r\n\r\n```\r\n# Install latest libtpu release\r\n$ pip install libtpu -f https://storage.googleapis.com/libtpu-wheels/index.html\r\n\r\n# Install specific libtpu release\r\n$ pip install libtpu==x.y.z -f https://storage.googleapis.com/libtpu-wheels/index.html\r\n\r\n# Install latest libtpu nightly build\r\n$ pip install libtpu --pre -f https://storage.googleapis.com/libtpu-wheels/index.html\r\n\r\n# Install specific libtpu nightly build\r\n$ pip install libtpu==0.0.3.dev20241029 -f https://storage.googleapis.com/libtpu-wheels/index.html\r\n```\r\n\r\nasking @mikegre-google to help with adding this information to the READM\r\ncc @tengyifei to assist",
    "url": "https://github.com/pytorch/xla/issues/8355",
    "state": "closed",
    "labels": [
      "usability",
      "documentation"
    ],
    "created_at": "2024-11-04T18:12:13Z",
    "updated_at": "2025-03-03T18:32:33Z",
    "comments": 15,
    "user": "miladm"
  },
  {
    "repo": "huggingface/optimum-quanto",
    "number": 346,
    "title": "How to support activation 4bit quantization?",
    "body": "As mentioned in title.",
    "url": "https://github.com/huggingface/optimum-quanto/issues/346",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-11-04T09:59:21Z",
    "updated_at": "2024-12-10T02:10:31Z",
    "user": "Ther-nullptr"
  },
  {
    "repo": "pytorch/vision",
    "number": 8714,
    "title": "I am using the torchvision-0.13.1+cu113 version, but it seems that it does not have the datapoints package. How can I solve this issue?",
    "body": "### \ud83d\udc1b Describe the bug\n\nI am using the torchvision-0.13.1+cu113 version, but it seems that it does not have the datapoints package. How can I solve this issue?\n\n### Versions\n\nI am using the torchvision-0.13.1+cu113 version, but it seems that it does not have the datapoints package. How can I solve this issue?",
    "url": "https://github.com/pytorch/vision/issues/8714",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-04T07:23:48Z",
    "updated_at": "2024-12-11T09:35:34Z",
    "comments": 5,
    "user": "jiangsu415"
  },
  {
    "repo": "huggingface/transformers",
    "number": 34591,
    "title": "How to retrain the GLIP model on the Object365 dataset",
    "body": "Since I made some modifications to the GLIP model, I need to perform some pre-training again to improve performance. I replaced `_base_ = [../_base_/datasets/coco_detection.py]` with `_base_ = [../_base_/datasets/objects365v1_detection.py]` in `glip_atss_swin-t_a_fpn_dyhead_16xb2_ms-2x_funtune_coco.py` to train on Object365. Is this correct?",
    "url": "https://github.com/huggingface/transformers/issues/34591",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-04T03:54:17Z",
    "updated_at": "2024-11-04T06:46:17Z",
    "user": "Polarisamoon"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9847,
    "title": "Merge Lora weights into base model",
    "body": "I have finetuned the stable diffusion model and would like to merge the lora weights into the model itself. Currently I think in PEFT this is supported using `merge_and_unload` function but I seem to not find this option in diffusers. So is there any way to get a base model but with finetuned weights and If i am not wrong only unet part of model  weights needs to be merged.\r\n\r\nThis is necessary for the tasks like feature extraction. ",
    "url": "https://github.com/huggingface/diffusers/issues/9847",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-02T18:00:28Z",
    "updated_at": "2024-11-03T03:03:45Z",
    "comments": 1,
    "user": "yaswanth19"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1550,
    "title": "Add full-text search in chat history",
    "body": "## Describe your feature request\r\n\r\nAllow users to search for specific keywords or phrases within the chat history, making it easier to find and recall previous conversations.\r\n\r\n## Screenshots (if relevant)\r\n\r\nAn example of the search bar placement could be found in #1079\r\n\r\n## Implementation idea\r\n\r\nOne possible implementation could be to use a library to index the chat history data. This would allow for efficient and scalable search functionality. The search bar could be added to the chat history interface, and when a user enters a search query, it would send a request to the search index to retrieve relevant results. The results could be displayed in a dropdown list or a separate search results page, with links to the original chat messages.\r\n\r\n## Previous proposals and why this one is different\r\n\r\nI'm aware that a similar proposal was made in the past #243, but it was rejected in favor of using the browser's page search functionality (ctrl + F). However, I'd like to argue that page search does not provide the same functionality as a dedicated full-text search in chat history. Here's why:\r\n\r\n- Page search is limited to the currently loaded chat history and previous chat names, whereas a dedicated search would allow users to search across the entire conversation history, even if it's not currently loaded on the page.\r\n- Page search does not provide any contextual information, such as the date and time of the message, or the conversation, whereas a dedicated search could provide this information and make it easier for users to understand the context of the search results.\r\n\r\nGiven these differences, I believe that a dedicated full-text search in chat history is a valuable feature that would greatly improve the user experience, and I'd like to propose it again for consideration.\r\n\r\nPersonally, I tend to create a new chat for each small problem to keep the LLM focused on what's important. As a result, I end up with too many chats with similar names, which makes the browser page search nearly useless.\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1550",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-11-01T19:27:41Z",
    "updated_at": "2025-05-28T15:03:19Z",
    "comments": 5,
    "user": "kadykov"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1338,
    "title": "can't build AOTI runner",
    "body": "### \ud83d\udc1b Describe the bug\n\n`torchchat/utils/scripts/build_native.sh aoti`\r\n\r\nFails with \r\n```\r\nBuilding aoti native runner...\r\nDefaulting TORCHCHAT_ROOT to /home/warden/source/torchchat/torchchat/utils/scripts/../../.. since it is unset.\r\n~/source/torchchat ~/source/torchchat\r\nSynchronizing submodule url for 'tokenizer/third-party/abseil-cpp'\r\nSynchronizing submodule url for 'tokenizer/third-party/re2'\r\nSynchronizing submodule url for 'tokenizer/third-party/sentencepiece'\r\n~/source/torchchat\r\n-- VERSION: 0.2.1\r\n-- Not Found TCMalloc: TCMALLOC_LIB-NOTFOUND\r\n-- Using ET BUILD DIR: --[et-build]--\r\n-- TORCHCHAT_ROOT=\"/home/warden/source/torchchat\"\r\n-- Looking for excutorch in /home/warden/source/torchchat/et-build/install\r\n-- Could NOT find executorch (missing: executorch_DIR)\r\n-- Caffe2: CUDA detected: 12.0\r\n-- Caffe2: CUDA nvcc is: /usr/bin/nvcc\r\n-- Caffe2: CUDA toolkit directory: /usr\r\n-- Caffe2: Header version is: 12.0\r\n-- Could NOT find nvtx3 (missing: nvtx3_dir) \r\n-- USE_CUDNN is set to 0. Compiling without cuDNN support\r\n-- USE_CUSPARSELT is set to 0. Compiling without cuSPARSELt support\r\n-- USE_CUDSS is set to 0. Compiling without cuDSS support\r\n-- USE_CUFILE is set to 0. Compiling without cuFile support\r\n-- Autodetected CUDA architecture(s):  8.9 8.6\r\n-- Added CUDA NVCC flags for: -gencode;arch=compute_89,code=sm_89;-gencode;arch=compute_86,code=sm_86\r\n-- Configuring done (0.3s)\r\n-- Generating done (0.1s)\r\n-- Build files have been written to: /home/warden/source/torchchat/cmake-out\r\n[1/4] Linking CXX static library tokenizer/third-party/sentencepiece/src/libsentencepiece.a\r\n[2/4] Building CXX object tokenizer/CMakeFiles/tokenizer.dir/tiktoken.cpp.o\r\nFAILED: tokenizer/CMakeFiles/tokenizer.dir/tiktoken.cpp.o \r\n/usr/bin/c++  -I/home/warden/source/torchchat/tokenizer -I/home/warden/source/torchchat/tokenizer/third-party/sentencepiece/src -I/home/warden/source/torchchat/tokenizer/third-party/re2 -I/home/warden/source/torchchat/tokenizer/third-party/abseil-cpp -D_GLIBCXX_USE_CXX11_ABI=0 -MD -MT tokenizer/CMakeFiles/tokenizer.dir/tiktoken.cpp.o -MF tokenizer/CMakeFiles/tokenizer.dir/tiktoken.cpp.o.d -o tokenizer/CMakeFiles/tokenizer.dir/tiktoken.cpp.o -c /home/warden/source/torchchat/tokenizer/tiktoken.cpp\r\nIn file included from /home/warden/source/torchchat/tokenizer/tiktoken.cpp:18:\r\n/home/warden/source/torchchat/tokenizer/base64.h:37:11: error: \u2018uint32_t\u2019 does not name a type\r\n   37 | constexpr uint32_t DECODE_TABLE[] = {\r\n      |           ^~~~~~~~\r\n/home/warden/source/torchchat/tokenizer/base64.h:29:1: note: \u2018uint32_t\u2019 is defined in header \u2018<cstdint>\u2019; did you forget to \u2018#include <cstdint>\u2019?\r\n   28 | #include <string>\r\n  +++ |+#include <cstdint>\r\n   29 | #include <string_view>\r\n/home/warden/source/torchchat/tokenizer/base64.h:57:13: error: variable or field \u2018validate\u2019 declared void\r\n   57 | inline void validate(uint32_t v) {\r\n      |             ^~~~~~~~\r\n/home/warden/source/torchchat/tokenizer/base64.h:57:22: error: \u2018uint32_t\u2019 was not declared in this scope\r\n   57 | inline void validate(uint32_t v) {\r\n      |                      ^~~~~~~~\r\n/home/warden/source/torchchat/tokenizer/base64.h:57:22: note: \u2018uint32_t\u2019 is defined in header \u2018<cstdint>\u2019; did you forget to \u2018#include <cstdint>\u2019?\r\n/home/warden/source/torchchat/tokenizer/base64.h: In function \u2018void base64::detail::decode(const std::string_view&, std::string&)\u2019:\r\n/home/warden/source/torchchat/tokenizer/base64.h:70:3: error: \u2018uint32_t\u2019 was not declared in this scope\r\n   70 |   uint32_t val = 0;\r\n      |   ^~~~~~~~\r\n/home/warden/source/torchchat/tokenizer/base64.h:70:3: note: \u2018uint32_t\u2019 is defined in header \u2018<cstdint>\u2019; did you forget to \u2018#include <cstdint>\u2019?\r\n/home/warden/source/torchchat/tokenizer/base64.h:72:3: error: \u2018uint8_t\u2019 was not declared in this scope\r\n   72 |   uint8_t c = input[0];\r\n      |   ^~~~~~~\r\n/home/warden/source/torchchat/tokenizer/base64.h:72:3: note: \u2018uint8_t\u2019 is defined in header \u2018<cstdint>\u2019; did you forget to \u2018#include <cstdint>\u2019?\r\n/home/warden/source/torchchat/tokenizer/base64.h:73:12: error: \u2018DECODE_TABLE\u2019 was not declared in this scope\r\n   73 |   auto v = DECODE_TABLE[c];\r\n      |            ^~~~~~~~~~~~\r\n/home/warden/source/torchchat/tokenizer/base64.h:73:25: error: \u2018c\u2019 was not declared in this scope\r\n   73 |   auto v = DECODE_TABLE[c];\r\n      |                         ^\r\n/home/warden/source/torchchat/tokenizer/base64.h:74:3: error: \u2018validate\u2019 was not declared in this scope\r\n   74 |   validate(v);\r\n      |   ^~~~~~~~\r\n/home/warden/source/torchchat/tokenizer/base64.h:75:3: error: \u2018val\u2019 was not declared in this scope\r\n   75 |   val = v;\r\n      |   ^~~\r\n/home/warden/source/torchchat/tokenizer/base64.h: In function \u2018void base64::detail::decode_1_padding(const std::string_view&, std::string&)\u2019:\r\n/home/warden/source/torchchat/tokenizer/base64.h:105:3: error: \u2018uint32_t\u2019 was not declared in this scope\r\n  105 |   uint32_t val = 0;\r\n      |   ^~~~~~~~\r\n/home/warden/source/torchchat/tokenizer/base64.h:105:3: note: \u2018uint32_t\u2019 is defined in",
    "url": "https://github.com/pytorch/torchchat/issues/1338",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-01T17:52:21Z",
    "updated_at": "2024-11-01T21:36:12Z",
    "comments": 1,
    "user": "byjlw"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9837,
    "title": "[Feature] Is it possible to customize latents.shape / prepare_latent for context parallel case?",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nOne may need to extend the code to context parallel case and the latent sequence length needs to get divided.\r\nInstead of copying all the code of pipeline.py, the minimum modification is just adding few lines about dividing the latent shape and all_gather the result from the output.\r\nI suggest adding this feature so doing the monkey patch will be easier.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9837",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-11-01T14:32:05Z",
    "updated_at": "2024-12-01T15:07:36Z",
    "comments": 3,
    "user": "foreverpiano"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9836,
    "title": "[Feature] Can we record layer_id for DiT model?",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nSome layerwise algorithm may be based on layer-id.\r\njust need some simple modification for transformer2Dmodel and its inner module like attention part, batch_norm part. just pass the layer_id as an extra parameter.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9836",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-11-01T14:26:31Z",
    "updated_at": "2025-01-27T01:31:21Z",
    "comments": 9,
    "user": "foreverpiano"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9835,
    "title": "unused parameters lead to error when training contrlnet_sd3",
    "body": "### Discussed in https://github.com/huggingface/diffusers/discussions/9834\r\n\r\n<div type='discussions-op-text'>\r\n\r\n<sup>Originally posted by **Zheng-Fang-CH** November  1, 2024</sup>\r\n![b1fa13bdb595284dce31e3cf189876b](https://github.com/user-attachments/assets/12faa0fc-acb8-4c98-ba03-b0e41bc9075a)\r\nIs there someone meet this question? I have this error no matter I train it on single gpu or multi gpu.</div>",
    "url": "https://github.com/huggingface/diffusers/issues/9835",
    "state": "closed",
    "labels": [],
    "created_at": "2024-11-01T13:57:03Z",
    "updated_at": "2024-11-17T07:33:25Z",
    "comments": 6,
    "user": "Daryu-Fan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9833,
    "title": "SD3.5-large. Why is it OK when calling with a single thread, but not with multiple threads?",
    "body": "### Describe the bug\r\n\r\nFirst, I created a SD3.5-large service:\r\n\r\n```python\r\nimport os\r\nos.environ[\"CUDA_VISIBLE_DEVICES\"] = \"1\"\r\nimport uuid\r\nfrom diffusers import BitsAndBytesConfig, SD3Transformer2DModel, DDIMScheduler, DDPMParallelScheduler\r\nfrom diffusers import StableDiffusion3Pipeline\r\nimport torch\r\nfrom transformers import T5EncoderModel\r\nimport time \r\nfrom flask import request, jsonify\r\nimport logging\r\nimport sys\r\nimport flask\r\n\r\napp = flask.Flask(\"sd_server\")\r\n\r\nhandler = logging.StreamHandler(sys.stdout)\r\nhandler.setFormatter(logging.Formatter(\"[%(asctime)s] %(levelname)s in %(module)s: %(message)s\"))\r\napp.logger.handlers.clear()\r\napp.logger.addHandler(handler)\r\napp.logger.setLevel(logging.INFO)\r\n\r\n# model pipeline\r\nmodel_id = \"../stable-diffusion-3.5-large\"\r\n\r\nnf4_config = BitsAndBytesConfig(\r\n    load_in_4bit=True,\r\n    bnb_4bit_quant_type=\"nf4\",\r\n    bnb_4bit_compute_dtype=torch.bfloat16\r\n)\r\nmodel_nf4 = SD3Transformer2DModel.from_pretrained(\r\n    model_id,\r\n    subfolder=\"transformer\",\r\n    quantization_config=nf4_config,\r\n    torch_dtype=torch.bfloat16\r\n)\r\nmodel_nf4 = model_nf4.to(\"cuda:0\")\r\npipeline = StableDiffusion3Pipeline.from_pretrained(\r\n    model_id, \r\n    transformer=model_nf4,\r\n    torch_dtype=torch.bfloat16\r\n)\r\n# pipeline.scheduler = DDIMScheduler.from_config(pipeline.scheduler.config)\r\n# pipeline.scheduler = DDPMParallelScheduler.from_config(pipeline.scheduler.config)\r\npipeline = pipeline.to(\"cuda:0\")\r\n\r\n# # diffusers/t5-nf4\r\n# t5_nf4 = T5EncoderModel.from_pretrained(\"text_encoder_3\", torch_dtype=torch.bfloat16)\r\n# t5_nf4 = t5_nf4.to(\"cuda:0\")\r\n\r\n# pipeline = StableDiffusion3Pipeline.from_pretrained(\r\n#     model_id, \r\n#     transformer=model_nf4,\r\n#     text_encoder_3=t5_nf4,\r\n#     torch_dtype=torch.bfloat16\r\n# )\r\n# pipeline = pipeline.to(\"cuda:0\")\r\n\r\n\r\ndef generate_uuid_filename(extension=\".jpeg\"):\r\n    filename = f\"{uuid.uuid4()}{extension}\"\r\n    \r\n    return filename\r\n\r\ndef image_generation(prompt, negative_prompt, width, height, save_path, num_inference_steps=28, guidance_scale=4.5, max_sequence_length=512):\r\n    image = pipeline(\r\n        prompt=prompt,\r\n        negative_prompt=negative_prompt,\r\n        num_inference_steps=num_inference_steps,\r\n        width=width,\r\n        height=height,\r\n        guidance_scale=guidance_scale,\r\n        max_sequence_length=max_sequence_length,\r\n    ).images[0]\r\n    file_name = generate_uuid_filename()\r\n    image.save(os.path.join(save_path, file_name))\r\n    torch.cuda.empty_cache()\r\n    return f\"{file_name}\u4fdd\u5b58\u5b8c\u6bd5...\"\r\n    \r\n\r\ndef update_prompt(req_data):\r\n    trans = {\"natural\":[\"cinematic photo ```%s``` \uff0c photograph, film, bokeh, professional, 4k, highly detailed\",\r\n                       \"drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly\"],\r\n            \"vivid\":[\"HDR photo of ``%s``` . High dynamic range, vivid, rich details, clear shadows and highlights, realistic, intense, enhanced contrast, highly detailed\",\r\n                    \"flat, low contrast, oversaturated, underexposed, overexposed, blurred, noisy\"]}\r\n    style = \"natural\"\r\n    try:\r\n        if req_data.get('style') != None:\r\n            if req_data.get('style') in trans.keys():\r\n                style = req_data.get('style')\r\n    except:\r\n        pass\r\n    import re\r\n    try:\r\n        req_data[\"promptEnglish\"] = re.findall(r'\\\\\"(.+)\\\\\"',req_data[\"promptEnglish\"])[0]\r\n    except:\r\n        pass\r\n    prompt = trans[style][0]%req_data[\"promptEnglish\"]\r\n    negative_prompt = trans[style][1]\r\n    if req_data[\"negativePromptEnglish\"] not in [None ,'']:\r\n        negative_prompt = req_data[\"negativePromptEnglish\"]\r\n        \r\n    return prompt, negative_prompt\r\n\r\n@app.route('/api/text_to_img', methods=['POST'])\r\ndef route():\r\n    res = {\"id\": \"\",\r\n           \"object\": \"image\",\r\n           \"created\":int(time.time()),\r\n           \"data\":[]}\r\n    \r\n    req_data = request.json\r\n    app.logger.info(req_data)\r\n\r\n    prompt, negative_prompt = update_prompt(req_data)\r\n    app.logger.info(prompt+\"|\"+negative_prompt)\r\n\r\n    width = int(req_data[\"size\"].split(\"x\")[0]) \r\n    height= int(req_data[\"size\"].split(\"x\")[1])               \r\n\r\n    res[\"data\"] = image_generation(prompt, negative_prompt, width, height, './')\r\n        \r\n    return jsonify(res)\r\n\r\n\r\nif __name__ == '__main__':\r\n    app.run(host='0.0.0.0',port=12571,threaded=True, debug=False)\r\n```\r\n\r\nThen I called this service concurrently and the following problems occurred\uff1a\r\n\r\n```bash\r\n  [2024-11-01 07:32:12,370] INFO in app: {'prompt': '', 'promptEnglish': 'A capybara holding a sign that reads Hello Fast World', 'negative_prompt': '', 'negativePromptEnglish': None, 'style': 'natural', 'size': '1024x1024'}\r\n[2024-11-01 07:32:12,371] INFO in app: cinematic photo ```A capybara holding a sign that reads Hello Fast World``` \uff0c photograph, film, bokeh, professional, 4k, highly detailed|drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly\r\n  4%|\u2588\u2588\u2588\u258b               ",
    "url": "https://github.com/huggingface/diffusers/issues/9833",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-11-01T08:00:04Z",
    "updated_at": "2024-11-02T02:14:50Z",
    "comments": 1,
    "user": "EvanSong77"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9825,
    "title": "Support IPAdapters for FLUX pipelines",
    "body": "### Model/Pipeline/Scheduler description\n\nIPAdapter for FLUX is available now, do you have any plans to add IPAdapter to FLUX pipelines?\n\n### Open source status\n\n- [X] The model implementation is available.\n- [X] The model weights are available (Only relevant if addition is not a scheduler).\n\n### Provide useful links for the implementation\n\nmodel implementation:\r\n* https://github.com/XLabs-AI/x-flux/blob/main/src/flux/xflux_pipeline.py#L55\r\n\r\nmodel weights:\r\n* https://huggingface.co/XLabs-AI/flux-ip-adapter-v2\r\n* https://huggingface.co/XLabs-AI/flux-ip-adapter\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9825",
    "state": "closed",
    "labels": [
      "help wanted",
      "wip",
      "contributions-welcome",
      "IPAdapter"
    ],
    "created_at": "2024-10-31T23:07:32Z",
    "updated_at": "2024-12-21T17:49:59Z",
    "comments": 10,
    "user": "chenxiao111222"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9822,
    "title": "Loading SDXL loras into Flux",
    "body": "### Describe the bug\n\nCurrently it's possible to load SDXL loras without warning into Flux.\n\n### Reproduction\n\nIs it possible for you to implement a raise a warning (and an error when a boolean is active) when the list of layers here is zero:\r\n\r\nhttps://github.com/huggingface/diffusers/blob/41e4779d988ead99e7acd78dc8e752de88777d0f/src/diffusers/loaders/lora_pipeline.py#L1905\n\n### Logs\n\n_No response_\n\n### System Info\n\nubuntu\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9822",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-10-31T18:01:29Z",
    "updated_at": "2024-12-10T14:37:32Z",
    "comments": 8,
    "user": "christopher5106"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7268,
    "title": "load_from_disk",
    "body": "### Describe the bug\n\nI have data saved with save_to_disk. The data is big (700Gb). When I try loading it, the only option is load_from_disk, and this function copies the data to a tmp directory, causing me to run out of disk space. Is there an alternative solution to that?\n\n### Steps to reproduce the bug\n\nwhen trying to load data using load_From_disk after being saved using save_to_disk \n\n### Expected behavior\n\nrun out of disk space\n\n### Environment info\n\nlateest version",
    "url": "https://github.com/huggingface/datasets/issues/7268",
    "state": "open",
    "labels": [],
    "created_at": "2024-10-31T11:51:56Z",
    "updated_at": "2025-07-01T08:42:17Z",
    "comments": 3,
    "user": "ghaith-mq"
  },
  {
    "repo": "pytorch/xla",
    "number": 8342,
    "title": "Instructions in CONTRIBUTING.md for using VS Code don't seem to work",
    "body": "## \ud83d\udcda Documentation\r\nI've followed the instructions in CONTRIBUTING.md to set up a dev environment using VS Code. Next I run python and then tried to import torch_xla as xla and I get an error:\r\n\r\n```\r\n>>> import torch_xla as xla\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/workspaces/xla_vs_files/pytorch/xla/torch_xla/__init__.py\", line 259, in <module>\r\n    from .stablehlo import save_as_stablehlo, save_torch_model_as_stablehlo\r\n  File \"/workspaces/xla_vs_files/pytorch/xla/torch_xla/stablehlo.py\", line 18, in <module>\r\n    from torch_xla._dynamo import dynamo_bridge\r\n  File \"/workspaces/xla_vs_files/pytorch/xla/torch_xla/_dynamo/dynamo_bridge.py\", line 20, in <module>\r\n    from torch._inductor.fx_passes.post_grad import ConstructorMoverPass\r\n  File \"/usr/local/lib/python3.10/site-packages/torch/_inductor/fx_passes/post_grad.py\", line 22, in <module>\r\n    from .. import config, ir, pattern_matcher\r\n  File \"/usr/local/lib/python3.10/site-packages/torch/_inductor/pattern_matcher.py\", line 96, in <module>\r\n    from .lowering import fallback_node_due_to_unsupported_type\r\n  File \"/usr/local/lib/python3.10/site-packages/torch/_inductor/lowering.py\", line 6639, in <module>\r\n    from . import kernel\r\n  File \"/usr/local/lib/python3.10/site-packages/torch/_inductor/kernel/__init__.py\", line 1, in <module>\r\n    from . import mm, mm_common, mm_plus_mm, unpack_mixed_mm\r\n  File \"/usr/local/lib/python3.10/site-packages/torch/_inductor/kernel/mm.py\", line 16, in <module>\r\n    from torch._inductor.codegen.cpp_gemm_template import CppPackedGemmTemplate\r\n  File \"/usr/local/lib/python3.10/site-packages/torch/_inductor/codegen/cpp_gemm_template.py\", line 14, in <module>\r\n    from ..kernel.mm_common import mm_args\r\n  File \"/usr/local/lib/python3.10/site-packages/torch/_inductor/kernel/mm_common.py\", line 10, in <module>\r\n    from torch._inductor.select_algorithm import realize_inputs\r\n  File \"/usr/local/lib/python3.10/site-packages/torch/_inductor/select_algorithm.py\", line 22, in <module>\r\n    from filelock import FileLock\r\nModuleNotFoundError: No module named 'filelock'\r\n```\r\nSo it appears something isn't configured correctly. If I follow the instructions for directly using a container, everything works as expected. \r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/8342",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-10-30T18:16:38Z",
    "updated_at": "2024-10-30T18:36:37Z",
    "comments": 1,
    "user": "mikegre-google"
  },
  {
    "repo": "huggingface/peft",
    "number": 2188,
    "title": "How to change 'modules_to_save' setting when reloading a lora finetuned model",
    "body": "### System Info\n\n- `transformers` version: 4.36.2\r\n- Platform: Linux-3.10.0-1160.49.1.el7.x86_64-x86_64-with-glibc2.17\r\n- Python version: 3.9.19\r\n- Huggingface_hub version: 0.24.6\r\n- Safetensors version: 0.4.5\r\n- Accelerate version: 0.21.0\r\n- Accelerate config:    not found\r\n- PyTorch version (GPU?): 2.0.1+cu117 (True)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\n\n### Who can help?\n\n@BenjaminBossan\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\n\r\n\r\n@BenjaminBossan 1. I use lora to finetune whisper,and get the model A. The settings are\r\n```\r\nconfig = LoraConfig(r=8, lora_alpha=16,target_modules=target_modules,modules_to_save=modules_to_save,lora_dropout=0.05, bias=\"none\")\r\nmodel = get_peft_model(model, config)\r\n```\r\nand then I change the source code of model A, I add an additional layer. I now want to train a model with an extra layer based on the lora trained model A. I use:\r\n```\r\nmodel_lora_path = \"../lora_path/\" + 'checkpoint-56416'\r\n\r\nmodel = PeftModel.from_pretrained(model,model_lora_path,ignore_mismatched_sizes=True).cuda()\r\n\r\n```\r\nBut the model LoraConfig's \"modules_to_save\" can not be changed, I want to store the additional layer in to 'adapter_model.safetensors' How can I change my code?\r\nIn short, I want to add parameters to modules_to_save in LoraConfig during the reload process based on the trained lora model so that the additional layer can be stored.\r\n\r\nI tried to use `model.peft_config['default'].modules_to_save.extend(modules_to_save)` to add the \u201cmodules_to_save\u201d but it doesn't work.\n\n### Expected behavior\n\nChange reload lora model's LoraConfig settings",
    "url": "https://github.com/huggingface/peft/issues/2188",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-30T12:26:37Z",
    "updated_at": "2024-12-08T15:03:37Z",
    "user": "dengchengxifrank"
  },
  {
    "repo": "huggingface/huggingface.js",
    "number": 996,
    "title": "@huggingface/hub: how to use `modelInfo` with proper typing",
    "body": "THe `modelInfo` method is allowing the caller to define which field will be provided, it has been added in https://github.com/huggingface/huggingface.js/pull/946\r\n\r\nhttps://github.com/huggingface/huggingface.js/blob/186ab738e2f9c7c3613330d45e44848186958815/packages/hub/src/lib/model-info.ts#L9-L11\r\n\r\nHere is an example \r\n\r\n```typescript\r\n$: const info = await modelInfo({\r\n\tname: \"openai-community/gpt2\",\r\n});\r\n$: console.log(info);\r\n{\r\n  id: '621ffdc036468d709f17434d',\r\n  name: 'openai-community/gpt2',\r\n  private: false,\r\n  task: 'text-generation',\r\n  downloads: 13764131,\r\n  gated: false,\r\n  likes: 2334,\r\n  updatedAt: 2024-02-19T10:57:45.000Z\r\n}\r\n```\r\n\r\nWe can ask for additional fields, using the `additionalFields`. Here is an example\r\n\r\n```typescript\r\n$: const info = await modelInfo({\r\n\tname: \"openai-community/gpt2\",\r\n        additionalFields: ['author'],\r\n});\r\n$: console.log(info);\r\n{\r\n  // ... omitted \r\n  author: 'openai-community',\r\n}\r\n```\r\n\r\nHowever I am not able to find proper typing for the method calling and return type.\r\n\r\nThe return type of `modelInfo` is the following\r\n\r\nhttps://github.com/huggingface/huggingface.js/blob/186ab738e2f9c7c3613330d45e44848186958815/packages/hub/src/lib/model-info.ts#L21\r\n\r\nThe additionalFields is the following\r\n\r\nhttps://github.com/huggingface/huggingface.js/blob/186ab738e2f9c7c3613330d45e44848186958815/packages/hub/src/lib/model-info.ts#L15\r\n\r\nBut, I am getting an error when doing the following\r\n\r\n```typescript\r\nconst info = await modelInfo<'author'>({\r\n\tname: \"openai-community/gpt2\",\r\n\tadditionalFields: ['author'],\r\n});\r\n```\r\n\r\n`TS2344: Type string does not satisfy the constraint never`\r\n\r\nI am also interesting in getting the full `ApiModelInfo` object, but I am not able to use the method with the right typing :thinking: .\r\n\r\ncc @coyotte508 :)\r\n",
    "url": "https://github.com/huggingface/huggingface.js/issues/996",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-30T10:41:36Z",
    "updated_at": "2024-10-30T12:02:47Z",
    "user": "axel7083"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9802,
    "title": "Multidiffusion (panorama pipeline) is missing segmentation inputs?",
    "body": "I'm looking at the multidiffusion panorama pipeline page (https://huggingface.co/docs/diffusers/en/api/pipelines/panorama). It looks like there is no way to specify the segmentation and associated prompts as in the original paper https://multidiffusion.github.io/ . If the code only has the panorama capability and not the region based generation using segmentation and prompts, then it should be extended to include the regional generation... If it does have region based generation then the documentation should be updated to show how to use it!",
    "url": "https://github.com/huggingface/diffusers/issues/9802",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2024-10-29T20:15:15Z",
    "updated_at": "2024-12-24T15:03:30Z",
    "comments": 5,
    "user": "jloveric"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3267,
    "title": "\u2753 [Question] How do you properly deploy a quantized model with tensorrt",
    "body": "## \u2753 Question\r\nI have a PTQ model and a QAT model trained with the official pytorch API following the quantization tutorial, and I wish to deploy them on TensorRT for inference. The model is metaformer-like using convolution layers as token mixer. One part of the quantized model looks like this:\r\n![image](https://github.com/user-attachments/assets/8efe5705-9044-4609-98ad-74e4be1c5ba0)\r\n\r\n\r\n## What you have already tried\r\n\r\nI have tried different ways to make things work:\r\n1. the package torch2trt: there's huge problem with dynamic input. The dataset consists of different inputs (B,C,H,W) where H and W are not necessarily the same. There's a torch2trt-dynamic package but I think there are bugs in the plugins. The code basically looks like this:\r\n`model_trt = torch2trt(\r\n        model_fp32, \r\n        [torch.randn(1, 11, 64, 64).to('cuda')],  \r\n        max_batch_size=batch_size,\r\n        fp16_mode=False, \r\n        int8_mode=True,  \r\n        calibrator= trainLoader,\r\n        input_shapes=[(None, 11, None, None)]\r\n    )`\r\n3. torch.compile() with backends=tensorrt. When I was trying to compile the PTQ model, there's RuntimeError: quantized::conv2d (ONEDNN): data type of input should be QUint8. And when I was trying to use the QAT model, there's W1029 14:21:17.640402 139903289382080 torch/_dynamo/utils.py:1195] [2/0] Unsupported: quantized nyi in meta tensors with fake tensor propagation. \r\nHere's the code I used:\r\n`trt_gm = torch.compile(\r\n        model,\r\n        dynamic= True,\r\n        backend=\"tensorrt\",)\r\n`\r\n4. try to convert the torch model to an onnx model, then convert it into the trt engine. There are several problems in this case:\r\n- The onnx model is runs weirdly slow with onnx runtime. Furthermore, the loss calculated is extremely high. Here's an example:\r\n![image](https://github.com/user-attachments/assets/fb0f1f3a-2c5c-4f8d-8bf5-c6a3b5aac6ac)\r\n\r\n- I tried to visualize the quantized ONNX model with Netron because converting the quantized ONNX model to TRT engine always raise \r\n![image](https://github.com/user-attachments/assets/b09bf68a-9a8a-4ce0-8fbb-04c5bc30bf71)\r\nThis is the problematic part of the graph\r\n![image](https://github.com/user-attachments/assets/9c11d90d-8880-4e1f-9716-342edb1c4864)\r\nThe rightmost DequantizeLinear node is causing problem. I checked the x and found that it's an in32 constant array and the x_scale is a float32 constant array. The output of this node turned out to be the bias passed into the Conv layer.\r\nThere must be something wrong in the behavior of the conversion. When doing quantization with the pytorch API, only activations and weights were observed by the defined observer, so I was expecting only the leftmost and the middle DequantizeLinear Nodes while bias should be stored in fp32 and directly passed into the Conv layer. Using onnx_simplified is not able to get rid of the node. With the incompatibility between the conversion of quantized torch model to ONNX model, I'm not able to further convert the model into trt engine. I've considered using the onnx API for quantization, but the performance drop thing from unquantized original torch model to ONNX model is quite concerning.\r\nThe converting code looks like this:\r\n`torch.onnx.export(\r\n        quantized_model, \r\n        dummy_input,\r\n        args.onnx_export_path, \r\n        input_names=[\"input\"], \r\n        output_names=[\"output\"], \r\n        opset_version=13,  \r\n        export_params= True,\r\n        keep_initializers_as_inputs=False, \r\n        dynamic_axes= {'input': {0:'batch_size', 2: \"h\", 3: \"w\"},\r\n                        'output': {0:'batch_size', 2: \"h\", 3: \"w\"}\r\n                        }\r\n    )`\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version: 2.3.1\r\n - CPU Architecture: x86_64\r\n - OS: Ubuntu 20.04.4 LTS\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): conda\r\n - Are you using local sources or building from archives: No\r\n - Python version: 3.9.19\r\n - CUDA version: 12.1\r\n - GPU models and configuration: \r\n- Torch_TensorRT: 2.3.0\r\n- torch2trt: 0.5.0\r\n- onnx:1.16.1\r\n\r\n## Additional context\r\nPersonally I think the torch.compile() API is the most possible for me to successfully convert the quantized model since there's no performance drop. Does anyone has relevant experience on handling quantized model?\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3267",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-29T15:06:54Z",
    "updated_at": "2025-03-03T22:30:06Z",
    "user": "Urania880519"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 658,
    "title": "Questions about FSDP2 support and memory usage.",
    "body": "What is current support of FSDP2 in main pytorch?\r\nI just see this here https://github.com/pytorch/pytorch/blob/main/torch/distributed/_composable/fully_shard.py#L45\r\n\r\n> \"`torch.distributed._composable.fully_shard` will be removed after PyTorch 2.5.\"\r\n\r\nWill FSDP2 be deprecated? Can FSDP1 work with DTensor as well as TP?\r\n\r\nI tried FSDP2 in my new project, but I got higher GPU Memory usage compared to FSDP1, what might this cause? The model is a 10B DiT-like model with extra embedding layer compared to LLMs. My main concern is that should I need to take more modules warpped with fully_shard to reduce the memory usage? \r\n\r\nSince the transformer block is quite similar to llama, I use the same fully_sahrd warp with your project.",
    "url": "https://github.com/pytorch/torchtitan/issues/658",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-29T11:09:01Z",
    "updated_at": "2025-08-21T02:57:19Z",
    "user": "tangjiasheng"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 1000,
    "title": "Error while converting LLama-3.1:8b to ONNX",
    "body": "### Question\n\nHey @xenova,\r\n\r\nThanks a lot for this library! I tried converting [`meta-llama/Llama-3.1-8B-Instruct`](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct) to ONNX using the following command (on `main`):\r\n\r\n```bash\r\npython -m scripts.convert --quantize --model_id \"meta-llama/Llama-3.1-8B-Instruct\"\r\n```\r\n\r\nUsing the following `requirements.py` file (in a fresh env):\r\n```\r\ntransformers[torch]==4.43.4\r\nonnxruntime==1.19.2\r\noptimum==1.21.3\r\nonnx==1.16.2\r\nonnxconverter-common==1.14.0\r\ntqdm==4.66.5\r\nonnxslim==0.1.31\r\n--extra-index-url https://pypi.ngc.nvidia.com\r\nonnx_graphsurgeon==0.3.27\r\n```\r\n\r\nBut got the following error:\r\n```\r\nFramework not specified. Using pt to export the model.\r\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 4/4 [00:27<00:00,  6.99s/it]\r\nAutomatic task detection to text-generation-with-past (possible synonyms are: causal-lm-with-past).\r\nUsing the export variant default. Available variants are:\r\n    - default: The default ONNX variant.\r\n\r\n***** Exporting submodel 1/1: LlamaForCausalLM *****\r\nUsing framework PyTorch: 2.5.0\r\nOverriding 1 configuration item(s)\r\n        - use_cache -> True\r\nWe detected that you are passing `past_key_values` as a tuple and this is deprecated and will be removed in v4.43. Please use an appropriate `Cache` class (https://huggingface.co/docs/transformers/v4.41.3/en/internal/generation_utils#transformers.Cache)\r\n/site-packages/transformers/models/llama/modeling_llama.py:1037: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  if sequence_length != 1:\r\nTraceback (most recent call last):\r\n  File \"/python3.10/runpy.py\", line 196, in _run_module_as_main\r\n    return _run_code(code, main_globals, None,\r\n  File \"/python3.10/runpy.py\", line 86, in _run_code\r\n    exec(code, run_globals)\r\n  File \"scripts/convert.py\", line 462, in <module>\r\n    main()\r\n  File \"scripts/convert.py\", line 349, in main\r\n    main_export(**export_kwargs)\r\n  File \"/site-packages/optimum/exporters/onnx/__main__.py\", line 365, in main_export\r\n    onnx_export_from_model(\r\n  File \"/site-packages/optimum/exporters/onnx/convert.py\", line 1170, in onnx_export_from_model\r\n    _, onnx_outputs = export_models(\r\n  File \"/site-packages/optimum/exporters/onnx/convert.py\", line 776, in export_models\r\n    export(\r\n  File \"/site-packages/optimum/exporters/onnx/convert.py\", line 881, in export\r\n    export_output = export_pytorch(\r\n  File \"/site-packages/optimum/exporters/onnx/convert.py\", line 577, in export_pytorch\r\n    onnx_export(\r\n  File \"/site-packages/torch/onnx/__init__.py\", line 375, in export\r\n    export(\r\n  File \"/site-packages/torch/onnx/utils.py\", line 502, in export\r\n    _export(\r\n  File \"/site-packages/torch/onnx/utils.py\", line 1564, in _export\r\n    graph, params_dict, torch_out = _model_to_graph(\r\n  File \"/site-packages/torch/onnx/utils.py\", line 1117, in _model_to_graph\r\n    graph = _optimize_graph(\r\n  File \"/site-packages/torch/onnx/utils.py\", line 663, in _optimize_graph\r\n    _C._jit_pass_onnx_graph_shape_type_inference(\r\nRuntimeError: The serialized model is larger than the 2GiB limit imposed by the protobuf library. Therefore the output file must be a file path, so that the ONNX external data can be written to the same directory. Please specify the output file name.\r\n```\r\n\r\nI saw this somewhat related issue #967, but the error didn't happen on the ONNX library (I think `v3` has been merged now).\r\n\r\nDo you have a fix for larger models such as this one? I also tried with [`meta-llama/Llama-3.2-3B-Instruct`](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct), but I got the same error, even though I see [here](https://huggingface.co/onnx-community/Llama-3.2-3B-Instruct) that you managed to convert it successfully.\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/transformers.js/issues/1000",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-29T09:40:14Z",
    "updated_at": "2024-10-29T09:40:14Z",
    "user": "charlesbvll"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1334,
    "title": "Multimodal Eval Enablement (Looking for Developer to Implement Design)",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\r\n\r\n***Please note that since the actual implementation is going to be simple, and the design has already been reviewed, the purpose of this GitHub Issue is to look for a developer to implement this feature ASAP.***\r\n\r\nLLM eval stands for the process of assessing the perplexity, performance and capabilities of LLMs, usually by having the model complete one or a series of tasks and assigning them scores. Torchchat is already using EleutherAI\u2019s [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness) to do eval on text LLM ([code pointer](https://github.com/pytorch/torchchat/blob/11dcbebe6bd2ee933f7302b4e14baa23761abc0c/torchchat/usages/eval.py#L198)). Recently, torchtune has worked with EleutherAI to enable eval on text-image models in the harness, and has integrated this feature into torchtune ([code pointer](https://github.com/pytorch/torchtune/blob/d0c6460b51fc18245b3da0220568e10b3de06b63/recipes/eleuther_eval.py#L40)). Torchchat wants to just copy that solution from torchtune for text-image models.\r\n\r\nWithout the ability to do eval on multimodal LLMs, the enablement of multimodal LLMs on torchchat is incomplete. It\u2019s critical to understand how well torchchat performs with image inputs. \r\n\r\n### Additional context\r\n\r\n## Assumptions\r\n\r\n\r\n\r\n* The eval for text LLMs is already enabled on torchchat. Code pointer to the [core eval function](https://github.com/pytorch/torchchat/blob/11dcbebe6bd2ee933f7302b4e14baa23761abc0c/torchchat/usages/eval.py#L172) and the [main function](https://github.com/pytorch/torchchat/blob/11dcbebe6bd2ee933f7302b4e14baa23761abc0c/torchchat/usages/eval.py#L226).\r\n* The Llama 3.2-11b multimodal model has been onboarded to torchchat, and in the future there will be more multimodal LLMs on torchchat. \r\n* EleutherAI\u2019s [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness) has enabled eval on llama3.2-11b, thus we don\u2019t need to make code changes in EleutherAI repo.\r\n\r\n\r\n## The Main Goal\r\nA torchchat user can run eval on the llama 3.2-11b model (which image-text-in, text-out). Note that we don\u2019t need to worry about the internals of how the eval happens because we will only be calling the EleutherAI\u2019s eval libraries and report the metrics it returns. \r\n\r\nThe user interface will be a commandline `python torchchat.py eval <model-name>` with additional arguments specifying detailed requirements for the eval tasks.\r\n\r\nThe result will be printed out on the terminal which include the following metrics:\r\n * Tasks that have been run \r\n * The score to each task \r\n * The time it took to run each task\r\n\r\n\r\n### RFC (Optional)\r\n\r\n# Design\r\n\r\n\r\n## Overview\r\n\r\nIn this design, the multimodal eval in torchchat will borrow from the implementation of multimodal eval in torchtune which utilizes EleutherAI\u2019s [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness). The reason we can do this is that torchchat uses the same Llama 3.2-11b model definition as torchtune. \r\n\r\n## Details\r\n\r\n\r\n### The Core Eval Implementation\r\n\r\n\r\n#### [Preferred] Approach A: import the implementation of `HFMultimodalLM` from torchtune directly \r\nThe easiest implementation is to import the implementation of <code>HFMultimodalLM </code>directly from torchtune, then call <code>evaluate()</code> with this wrapper class passed in. </em>\r\n\r\nHere\u2019s torchtune\u2019s implementation of `HFMultimodalLM`: [code pointer](https://github.com/pytorch/torchtune/blob/ced1a840300b1ab550dac4fc2054b187f5b45c8c/recipes/eleuther_eval.py#L68).\r\n\r\n*Pseudocode:*\r\n```\r\n# In eval.py\r\nfrom torchtune.recipes.eleuther_eval import _VLMEvalWrapper\r\n\r\nif model is text-based:\r\n   do the existing text-based model eval\r\nelif model is text-image-based:\r\n   eval_results = evaluate(_VLMEvalWrapper(...))\r\n```\r\n\r\nThe pros and cons of this solution is discussed in the following \u201cAlternatives Discussion\u201d section. This solution should be the one to start with given how quick it can enable multimodal eval on torchchat. If for some unforeseen reason that it doesn\u2019t work, then take the following approach that requires more work.\r\n\r\n\r\n#### Approach B: copy the implementation of `HFMultimodalLM` from torchtune\r\n\r\n\r\n\r\n1. Creating a wrapper class that overrides class <code>[HFMultimodalLM](https://github.com/EleutherAI/lm-evaluation-harness/blob/0845b588303f1f59af98dd1c5bdbd78a9e75a1e2/lm_eval/models/hf_vlms.py#L30)</code>, which is an abstract Hugging Face model class for multimodal models. The implementation of this class can be copied from torchtune, [code pointer](https://github.com/pytorch/torchtune/blob/ced1a840300b1ab550dac4fc2054b187f5b45c8c/recipes/eleuther_eval.py#L68).\r\n2. Then call <code>evaluate()</code> with this wrapper class passed in. \r\n\r\n*Pseudocode:*\r\n```\r\n# In eval.py\r\nfrom lm_eval.models.hf_vlms import HFMultimodalLM\r\nfrom lm_eval.evaluator import evaluate\r\n\r\nclass VLMEvalWrapper(HFMultimodalLM):\r\n   ...# implementation\r\n\r\nif model is text-based:\r\n   do the existing text-",
    "url": "https://github.com/pytorch/torchchat/issues/1334",
    "state": "closed",
    "labels": [
      "enhancement",
      "good first issue",
      "actionable",
      "Llama 3.2- Multimodal",
      "triaged"
    ],
    "created_at": "2024-10-29T01:01:50Z",
    "updated_at": "2025-03-25T06:24:18Z",
    "comments": 26,
    "user": "Olivia-liu"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1545,
    "title": "Support markdown & code blocks in text input",
    "body": "## Describe your feature request\r\n\r\nWould be nice to support code block in the text input bar, that would make it easier to input code. we could also support basic markdown features like bold or italic, maybe not headings tho.\r\n\r\n## Screenshots (if relevant)\r\n\r\nTry https://claude.ai/new to see an example of how this could work\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1545",
    "state": "open",
    "labels": [
      "enhancement",
      "front"
    ],
    "created_at": "2024-10-28T08:42:58Z",
    "updated_at": "2024-11-11T20:26:32Z",
    "comments": 2,
    "user": "nsarrazin"
  },
  {
    "repo": "huggingface/peft",
    "number": 2181,
    "title": "How can I do to export mode format as gguf",
    "body": "### Feature request\n\nThis is a good project,I just got it today and encountered some problems.\r\nmy any code\r\n``` python\r\nfrom peft import AutoPeftModelForCausalLM\r\n\r\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\r\n\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(\"Qwen2-0.5B\")\r\n\r\n\r\nmodel = AutoModelForCausalLM.from_pretrained(\"model\")\r\nmodel.save_pretrained('directory')\r\n\r\n```\r\nI need gguf file deploy by ollama.Whern I  export model format as gguf.\r\n\r\nI use \r\n```shell\r\n!python llama.cpp/convert_hf_to_gguf.py  directory\r\n```\r\nbut it error\r\n```\r\nINFO:hf-to-gguf:Loading model: directory\r\nTraceback (most recent call last):\r\n  File \"/Users/xu756/AIGC/llama.cpp/convert_hf_to_gguf.py\", line 4436, in <module>\r\n    main()\r\n  File \"/Users/xu756/AIGC/llama.cpp/convert_hf_to_gguf.py\", line 4404, in main\r\n    hparams = Model.load_hparams(dir_model)\r\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/xu756/AIGC/llama.cpp/convert_hf_to_gguf.py\", line 462, in load_hparams\r\n    with open(dir_model [/](https://file+.vscode-resource.vscode-cdn.net/) \"config.json\", \"r\", encoding=\"utf-8\") as f:\r\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nFileNotFoundError: [Errno 2] No such file or directory: 'directory/config.json'\r\n\r\n\r\n```\r\n\r\n<img width=\"1328\" alt=\"image\" src=\"https://github.com/user-attachments/assets/4d74c66e-b092-47f2-b570-b6e35767a6ce\">\r\n\r\n\r\n\n\n### Motivation\n\nI need gguf file deploy by ollama.\r\nIs there any other way to deploy the PEFT model?\r\n\r\nThank you very much.\n\n### Your contribution\n\nI simply reproduced it on top",
    "url": "https://github.com/huggingface/peft/issues/2181",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-26T13:51:45Z",
    "updated_at": "2024-10-26T13:59:18Z",
    "user": "xu756"
  },
  {
    "repo": "pytorch/xla",
    "number": 8327,
    "title": "Add documentations for persistent caching",
    "body": "## \ud83d\udcda Documentation\r\n\r\nAdd documentations for persistent caching; the [current documentation](https://github.com/pytorch/xla/blob/310ff8f41858db7782f97542e76aeb60fa527d14/API_GUIDE.md#compilation-caching) briefly explains how to enable the cache. Though, it does little to \r\n\r\n1. introduce the feature\r\n2. explain what problem it solves\r\n3. how it works\r\n4. how it can be transferred from one VM to another VM\r\n5. what it's limitations are\r\n\r\nLet's add the new documentation under https://github.com/pytorch/xla/tree/master/docs\r\n\r\ncc @mikegre-google to help review this documentation",
    "url": "https://github.com/pytorch/xla/issues/8327",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-10-26T01:01:36Z",
    "updated_at": "2024-10-26T01:01:37Z",
    "comments": 0,
    "user": "miladm"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9772,
    "title": "Support ControlNetPlus Union if not already supported",
    "body": "It's not clear if ControlNetPlus is already supported by diffusers https://github.com/xinsir6/ControlNetPlus/tree/main/pipeline which consists of union controlnet for SDXL. This model seems to support the only SDXL segmentation that I'm aware of. If not already supported, it should be!\r\n\r\nhttps://github.com/xinsir6/ControlNetPlus/tree/main\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9772",
    "state": "closed",
    "labels": [
      "help wanted",
      "Good second issue",
      "contributions-welcome"
    ],
    "created_at": "2024-10-25T17:43:43Z",
    "updated_at": "2024-12-11T17:07:54Z",
    "comments": 5,
    "user": "jloveric"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 994,
    "title": "Will these mistakes have an impact?",
    "body": "### Question\n\nAfter AutoProcessor.from_pretrained is loaded, an error occurred, and the error message is as follows:\r\n````typescript\r\nort-wasm-simd-thread\u2026jsep.wasm:0x10367e0 2024-10-25 20:11:31.705399 [W:onnxruntime:, session_state.cc:1168 VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.\r\nort-wasm-simd-thread\u2026jsep.wasm:0x10367e0 2024-10-25 20:11:31.706300 [W:onnxruntime:, session_state.cc:1170 VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.\r\n\ufeff\r\n\r\n````",
    "url": "https://github.com/huggingface/transformers.js/issues/994",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-25T12:17:03Z",
    "updated_at": "2024-11-12T11:10:11Z",
    "user": "aidscooler"
  },
  {
    "repo": "pytorch/vision",
    "number": 8696,
    "title": "PyTorch & Torchvision  compatible issue on Jetson Orin",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nPrevious discussion: https://forums.developer.nvidia.com/t/pytorch-torchversion-compatible-issue-on-l4t35-5-0/310929/9\r\n\r\n\r\n```bash\r\ndaniel@daniel-nvidia:~/Work/yolov5$ python detect.py --weights yolov5s.pt --source ../../Videos/Worlds_longest_drone_fpv_one_shot.mp4\r\nWARNING \u26a0\ufe0f Python>=3.10 is required, but Python==3.8.10 is currently installed\r\n/home/daniel/.local/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: '/home/daniel/.local/lib/python3.8/site-packages/torchvision/image.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSsb'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?\r\n  warn(\r\ndetect: weights=['yolov5s.pt'], source=../../Videos/Worlds_longest_drone_fpv_one_shot.mp4, data=data/coco128.yaml, imgsz=[640, 640], conf_thres=0.25, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_format=0, save_csv=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs/detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False, vid_stride=1\r\nYOLOv5 \ud83d\ude80 v7.0-378-g2f74455a Python-3.8.10 torch-2.1.0a0+41361538.nv23.06 CUDA:0 (Orin, 7451MiB)\r\n\r\nFusing layers...\r\nYOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients\r\nTraceback (most recent call last):\r\n  File \"detect.py\", line 437, in <module>\r\n    main(opt)\r\n  File \"detect.py\", line 432, in main\r\n    run(**vars(opt))\r\n  File \"/home/daniel/.local/lib/python3.8/site-packages/torch/utils/_contextlib.py\", line 115, in decorate_context\r\n    return func(*args, **kwargs)\r\n  File \"detect.py\", line 210, in run\r\n    pred = non_max_suppression(pred, conf_thres, iou_thres, classes, agnostic_nms, max_det=max_det)\r\n  File \"/home/daniel/Work/yolov5/utils/general.py\", line 1104, in non_max_suppression\r\n    i = torchvision.ops.nms(boxes, scores, iou_thres)  # NMS\r\n  File \"/home/daniel/.local/lib/python3.8/site-packages/torchvision/ops/boxes.py\", line 40, in nms\r\n    _assert_has_ops()\r\n  File \"/home/daniel/.local/lib/python3.8/site-packages/torchvision/extension.py\", line 46, in _assert_has_ops\r\n    raise RuntimeError(\r\nRuntimeError: Couldn't load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible, or if you had errors while compiling torchvision from source. For further information on the compatible versions, check https://github.com/pytorch/vision#installation for the compatibility matrix. Please check your PyTorch version with torch.__version__ and your torchvision version with torchvision.__version__ and verify if they are compatible, and if not please reinstall torchvision so that it matches your PyTorch install.\r\n```\r\n\r\n### Versions\r\n```bash\r\ndaniel@daniel-nvidia:~/Work/yolov5$ python -c \"import torch; import torchvision; print(f'PyTorch version: {torch.__version__}'); print(f'Torchvision version: {torchvision.__version__}')\"\r\n/home/daniel/.local/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: '/home/daniel/.local/lib/python3.8/site-packages/torchvision/image.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSsb'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?\r\n  warn(\r\nPyTorch version: 2.1.0a0+41361538.nv23.06\r\nTorchvision version: 0.16.1+fdea156\r\n```\r\n\r\n\r\n```\r\ndaniel@daniel-nvidia:~/Work$ python collect_env.py\r\nCollecting environment information...\r\nPyTorch version: 2.1.0a0+41361538.nv23.06\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.4\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 20.04.6 LTS (aarch64)\r\nGCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0\r\nClang version: Could not collect\r\nCMake version: version 3.16.3\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.8.10 (default, Sep 11 2024, 16:02:53)  [GCC 9.4.0] (64-bit runtime)\r\nPython platform: Linux-5.10.192-tegra-aarch64-with-glibc2.29\r\nIs CUDA available: True\r\nCUDA runtime version: 11.4.315\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: Could not collect\r\nNvidia driver version: Could not collect\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/aarch64-linux-gnu/libcudnn.so.8.6.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_adv_infer.so.8.6.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_adv_train.so.8.6.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_cnn_infer.so.8.6.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_cnn_train.so.8.6.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_ops_infer.so.8.6.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_ops_train.so.8.6.0\r\nHIP runtime ver",
    "url": "https://github.com/pytorch/vision/issues/8696",
    "state": "open",
    "labels": [],
    "created_at": "2024-10-25T07:12:11Z",
    "updated_at": "2024-10-25T07:28:44Z",
    "comments": 0,
    "user": "lida2003"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 993,
    "title": "How do I know the loading progress when loading .onnx file?",
    "body": "### Question\r\n\r\nBecause the .onnx file is large(about 170M)\uff0cI decided to provide a loading progress.  Code as below: \r\n\r\n```` typescript    \r\n const modelSettings = {\r\n        // Do not require config.json to be present in the repository\r\n        config: { model_type: \"custom\" },\r\n        subfolder: \"\",\r\n        process_callback: (progress) => {\r\n          modelLoadingProgress.value = Math.round(progress * 100); \r\n          console.log(\"model : \" + progress)         \r\n        }\r\n };\r\n modelSettings.device = \"webgpu\";\r\n modelSettings.dtype = \"fp32\";\r\n model = await AutoModel.from_pretrained('briaai/RMBG-1.4', modelSettings);\r\n````\r\nI found the process_callback never been called. Can anyone help?",
    "url": "https://github.com/huggingface/transformers.js/issues/993",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-25T05:52:12Z",
    "updated_at": "2024-10-25T17:54:30Z",
    "user": "aidscooler"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 70,
    "title": "How to set the resolutions when finetuning I2V model?",
    "body": "I want to train a video diffusion with lower resolutions. I set the height_buckets=256 and width_buckets=256 in prepare_dataset.sh and process the data. But I run into the following error while run the train_image_to_video_lora.sh script.\r\n\r\nValueError: It is currently not possible to generate videos at a different resolution that the defaults. This should only be the case with 'THUDM/CogVideoX-5b-I2V'.If you think this is incorrect, please open an issue at https://github.com/huggingface/diffusers/issues.\r\n\r\nHow to set the hyperparameters to train with different resolutions?",
    "url": "https://github.com/huggingface/finetrainers/issues/70",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-25T05:36:19Z",
    "updated_at": "2024-11-11T18:27:29Z",
    "user": "TousakaNagio"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2080,
    "title": "\"ValueError: Trying to export a codesage model\" while trying to export codesage/codesage-large",
    "body": "### System Info\n\n```shell\noptimum 1.23.2\r\nMacOS 14.7\r\nPython 3.9\n```\n\n\n### Who can help?\n\n@michaelbenayoun \n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nThis is a PyTorch embedding model released by AWS, as described here: https://www.linkedin.com/posts/changsha-ma-9ba7a485_yes-code-needs-its-own-embedding-models-activity-7163196644258226176-bFSW\r\n\r\nHoping I can use it with RAG under ollama for code understanding.\r\n\r\n```\r\nhuggingface-cli download codesage/codesage-large\r\noptimum-cli export onnx --model codesage/codesage-large codesage-large-onnx --task default --trust-remote-code\r\n```\r\n\r\nThe error: \"ValueError: Trying to export a codesage model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type codesage to be supported natively in the ONNX export.\"\r\n\r\nI am grateful for any help you can provide!\n\n### Expected behavior\n\nAn exported ONNX file.",
    "url": "https://github.com/huggingface/optimum/issues/2080",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-10-25T05:27:22Z",
    "updated_at": "2024-10-25T05:27:22Z",
    "comments": 0,
    "user": "TurboEncabulator9000"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 138888,
    "title": "How to Implement multi-card parallel Inference by torchrun?",
    "body": "Hello everyone, I'm trying to achieve a goal of using trochrun for dual-card parallel inference. Then I have two questions. First, I found that torchrun is mainly used for model training, so can it be used for model inference? If can, my inference process is divided into two parts: model loading and inference. I only want to load the model once and then infer multiple times. How can I implement it? Thank you.\n\ncc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o",
    "url": "https://github.com/pytorch/pytorch/issues/138888",
    "state": "closed",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2024-10-25T03:52:20Z",
    "updated_at": "2024-11-27T01:05:31Z",
    "user": "lcf2610"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1543,
    "title": "RFC enable multimodal and tool usage at once for OAI endpoints ?",
    "body": "https://github.com/huggingface/chat-ui/blob/8ed1691ecff94e07d10dfb2874d3936d293f4842/src/lib/server/endpoints/openai/endpointOai.ts#L191C53-L191C65\r\n\r\nJust played around with combining both of this\r\nWhat do you think about making tool calling only if no image is in conversation ?\r\nOtherwise we need to insert models twice, once for multi modal and once for tool usage.\r\n\r\nA quick solution could be just checking if image_url is part in one of the messages and if it is skip the tools check\r\n\r\nJust struggled around because the upload file button was there but didnt worked to do something with the uploaded image until checking the code.\r\n\r\n@nsarrazin wdyt ?",
    "url": "https://github.com/huggingface/chat-ui/issues/1543",
    "state": "open",
    "labels": [],
    "created_at": "2024-10-24T17:37:50Z",
    "updated_at": "2024-10-24T17:39:14Z",
    "comments": 0,
    "user": "flozi00"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3113,
    "title": "\ud83d\udca1 [REQUEST] - Update tutorials with device-generic APIs",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\n\nWe should use the latest device-generic APIs when they come out in 2.6 in all tutorials to improve readability.\n\n### Existing tutorials on this topic\n\nhttps://pytorch.org/tutorials/beginner/basics/buildmodel_tutorial is an example of one we should update. There is most likely more.\n\n### Additional context\n\ncc @guangyey that might be a good follow up to consider before 2.6",
    "url": "https://github.com/pytorch/tutorials/issues/3113",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-24T17:33:29Z",
    "updated_at": "2025-01-29T09:35:10Z",
    "comments": 3,
    "user": "albanD"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 991,
    "title": "Loading models from \"non-URL\" locations in the browser",
    "body": "### Question\r\n\r\nHi! I have an application where the model files will be pre-loaded in a custom format into the browsers IndexDb. Based on my understanding, transformer.js currently only supports loading models by URL and then caches them in the browser cache. Getting the model files from the IndexDb instead, seems a little tricky, as it would require to \"copy\" a lot of the loading logic.\r\n\r\nOther ideas were to use a ServiceWorker to intercept the model download and mock the response with the files from IndexDb, or to write the files directly into browser cache that transformer.js uses.\r\n\r\nBoth solutions seem hacky... So, before I embark on writing my own loading logic, I wanted to ask, if you have any ideas or suggestions on how to approach this?\r\n\r\nThanks in advance!",
    "url": "https://github.com/huggingface/transformers.js/issues/991",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-24T12:18:19Z",
    "updated_at": "2024-12-04T19:30:07Z",
    "user": "AKuederle"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 68,
    "title": "How to set the hyperparameters when finetuning I2V model with LoRA?",
    "body": "File \"/home/shinji106/ntu/cogvideox-factory/training/dataset.py\", line 411, in __iter__                                          \r\n    self.buckets[(f, h, w)].append(data)                                                                                           \r\nKeyError: (16, 320, 720)\r\n\r\nThe resolution is (13, 320, 480) so the key of self.bucket does not match with input.\r\nHow do I set the hyperparameters when running the prepare_dataset.sh and train_image_to_video_lora.sh so that the key will match?",
    "url": "https://github.com/huggingface/finetrainers/issues/68",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-24T08:06:33Z",
    "updated_at": "2025-01-10T23:40:06Z",
    "user": "TousakaNagio"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7249,
    "title": "How to debugging",
    "body": "### Describe the bug\n\nI wanted to use my own script to handle the processing, and followed the tutorial documentation by rewriting the MyDatasetConfig and MyDatasetBuilder (which contains the _info,_split_generators and _generate_examples methods) classes. Testing with simple data was able to output the results of the processing, but when I wished to do more complex processing, I found that I was unable to debug (even the simple samples were inaccessible). There are no errors reported, and I am able to print the _info,_split_generators and _generate_examples messages, but I am unable to access the breakpoints.\n\n### Steps to reproduce the bug\n\n# my_dataset.py\r\nimport json\r\nimport datasets\r\n\r\n\r\nclass MyDatasetConfig(datasets.BuilderConfig):\r\n    def __init__(self, **kwargs):\r\n        super(MyDatasetConfig, self).__init__(**kwargs)\r\n\r\n\r\nclass MyDataset(datasets.GeneratorBasedBuilder):\r\n    VERSION = datasets.Version(\"1.0.0\")\r\n\r\n    BUILDER_CONFIGS = [\r\n        MyDatasetConfig(\r\n            name=\"default\",\r\n            version=VERSION,\r\n            description=\"myDATASET\"\r\n        ),\r\n    ]\r\n\r\n    def _info(self):\r\n        print(\"info\")  # breakpoints\r\n        return datasets.DatasetInfo(\r\n            description=\"myDATASET\",\r\n            features=datasets.Features(\r\n                {\r\n                    \"id\": datasets.Value(\"int32\"),\r\n                    \"text\": datasets.Value(\"string\"),\r\n                    \"label\": datasets.ClassLabel(names=[\"negative\", \"positive\"]),\r\n                }\r\n            ),\r\n            supervised_keys=(\"text\", \"label\"),\r\n        )\r\n\r\n    def _split_generators(self, dl_manager):\r\n \r\n        print(\"generate\")  # breakpoints\r\n        data_file = \"data.json\"  \r\n\r\n        return [\r\n            datasets.SplitGenerator(\r\n                name=datasets.Split.TRAIN, gen_kwargs={\"filepath\": data_file}\r\n            ),\r\n        ]\r\n\r\n    def _generate_examples(self, filepath):\r\n        print(\"example\")  # breakpoints\r\n        with open(filepath, encoding=\"utf-8\") as f:\r\n            data = json.load(f)\r\n            for idx, sample in enumerate(data):\r\n                yield idx, {\r\n                    \"id\": sample[\"id\"],\r\n                    \"text\": sample[\"text\"],\r\n                    \"label\": sample[\"label\"],\r\n                }\r\n\r\n#main.py\r\nimport os\r\nos.environ[\"TRANSFORMERS_NO_MULTIPROCESSING\"] = \"1\" \r\n\r\nfrom datasets import load_dataset\r\n\r\ndataset = load_dataset(\"my_dataset.py\", split=\"train\", cache_dir=None)\r\n\r\nprint(dataset[:5])\n\n### Expected behavior\n\nPause at breakpoints while running debugging\n\n### Environment info\n\npycharm\r\n",
    "url": "https://github.com/huggingface/datasets/issues/7249",
    "state": "open",
    "labels": [],
    "created_at": "2024-10-24T01:03:51Z",
    "updated_at": "2024-10-24T01:03:51Z",
    "user": "ShDdu"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 3015,
    "title": "How to customize the dataloader? e.g. Custom Data Augmentation",
    "body": "Hi,\r\n\r\nI've always been used to the old .fit behaviour where I could pass in the good DataLoader, implementing the Dataset myself, according to my needs.\r\n\r\nWith the new trainer interface, how am I supposed to tweak the dataloader? \r\n\r\nLet's say I want to apply some random transformations to the input text, how can I do it right now? Of course, changing the original dataset, augmenting it statically, is a no-go.\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/sentence-transformers/issues/3015",
    "state": "open",
    "labels": [],
    "created_at": "2024-10-23T17:11:13Z",
    "updated_at": "2024-11-15T10:32:35Z",
    "user": "msciancalepore98"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9756,
    "title": "Could not find loading_adapters.ipynb",
    "body": "### Describe the bug\r\n\r\nwhile reading doc [Load adapters](https://huggingface.co/docs/diffusers/using-diffusers/loading_adapters)\r\n\r\nI tried to open in Colab to run an example on this page.\r\n\r\n<img width=\"504\" alt=\"open_colab\" src=\"https://github.com/user-attachments/assets/0b1397f1-d266-4d83-84ab-276ea796a2a4\">\r\n\r\n\r\nIt will get Notebook not found on a new page.\r\n\r\nIt can't find loading_adapters.ipynb in [huggingface/notebooks](https://github.com/huggingface/notebooks)\r\n\r\n\r\n\r\n\r\n### Reproduction\r\n\r\nI follow the doc and write down a Google Colab [Google Colab loading_adapters](https://colab.research.google.com/drive/1pYpvsOf6U9CAZfughY1aUltUQTFsw4OI)\r\n\r\nCan I contribute a pr for this?\r\nDo you know how I can do this?\r\nCommit to notebook repo?\r\nOr something different?\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\nGoogle Colab\r\n\r\n### Who can help?\r\n\r\n@stevhliu  @sayakpaul",
    "url": "https://github.com/huggingface/diffusers/issues/9756",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-10-23T13:03:11Z",
    "updated_at": "2024-11-01T15:27:56Z",
    "comments": 6,
    "user": "thliang01"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3190,
    "title": "How to save the optimizer state while enabling Deepspeed to save the model",
    "body": "### System Info\n\n```Shell\nUnrelated to configuration\n```\n\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\n```\r\nunwrapped_model = accelerator.unwrap_model(transformer)  \r\nunwrapped_model.save_pretrained(save_directory,  \r\nsave_function=accelerator.save,  \r\nstate_dict=accelerator.get_state_dict(transformer))\r\n```\r\nI am using Deepspeed Zero2.\r\nI want to save the model state and optimizer state, but the current `save_pretrained()` only supports saving the model state. How can I save the optimizer state? \n\n### Expected behavior\n\nI would like to know if it supports saving optimizer state and how to use it. \r\n\r\nTHANKS\uff01",
    "url": "https://github.com/huggingface/accelerate/issues/3190",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-23T11:58:08Z",
    "updated_at": "2024-11-01T02:53:38Z",
    "user": "ITerydh"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9750,
    "title": "Is it possible to provide img2img code for CogView3?",
    "body": "Is it possible to provide img2img code for CogView3?",
    "url": "https://github.com/huggingface/diffusers/issues/9750",
    "state": "open",
    "labels": [
      "stale",
      "contributions-welcome"
    ],
    "created_at": "2024-10-23T07:40:38Z",
    "updated_at": "2024-12-20T15:04:01Z",
    "comments": 3,
    "user": "ChalvYongkang"
  },
  {
    "repo": "pytorch/serve",
    "number": 3352,
    "title": "GPU not detected inside torchserve docker container",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI am trying to create a Docker image for my custom handler of diffusers. I can create the Docker image and then a Docker container from it, but the Docker container is not able to detect the GPU. I have used the official TorchServe Docker image from Docker Hub, but it still cannot use the GPU inside the container. I have also added --gpus all in the Docker container run command, but it still does not work. \r\n\r\nHow can I enable the GPU inside the container so that my custom handler can use it?\r\n\r\n### Error logs\r\n\r\n```\r\nWARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.\r\n2024-10-23T06:11:55,474 [DEBUG] main org.pytorch.serve.util.ConfigManager - xpu-smi not available or failed: Cannot run program \"xpu-smi\": error=2, No such file or directory\r\n2024-10-23T06:11:55,498 [WARN ] main org.pytorch.serve.util.ConfigManager - Your torchserve instance can access any URL to load models. When deploying to production, make sure to limit the set of allowed_urls in config.properties\r\n2024-10-23T06:11:55,513 [INFO ] main org.pytorch.serve.servingsdk.impl.PluginsManager - Initializing plugins manager...\r\n2024-10-23T06:11:55,560 [INFO ] main org.pytorch.serve.metrics.configuration.MetricConfiguration - Successfully loaded metrics configuration from /home/venv/lib/python3.9/site-packages/ts/configs/metrics.yaml\r\n2024-10-23T06:11:55,750 [INFO ] main org.pytorch.serve.ModelServer -\r\nTorchserve version: 0.12.0\r\nTS Home: /home/venv/lib/python3.9/site-packages\r\nCurrent directory: /home/model-server\r\nTemp directory: /home/model-server/tmp\r\nMetrics config path: /home/venv/lib/python3.9/site-packages/ts/configs/metrics.yaml\r\nNumber of GPUs: 1\r\nNumber of CPUs: 12\r\nMax heap size: 1966 M\r\nPython executable: /home/venv/bin/python\r\nConfig file: /home/model-server/config.properties\r\nInference address: http://0.0.0.0:8080\r\nManagement address: http://0.0.0.0:8081\r\nMetrics address: http://0.0.0.0:8082\r\nModel Store: /home/model-server/model-store\r\nInitial Models: all\r\nLog dir: /home/model-server/logs\r\nMetrics dir: /home/model-server/logs\r\nNetty threads: 0\r\nNetty client threads: 0\r\nDefault workers per model: 1\r\nBlacklist Regex: N/A\r\nMaximum Response Size: 6553500\r\nMaximum Request Size: 6553500\r\nLimit Maximum Image Pixels: true\r\nPrefer direct buffer: false\r\nAllowed Urls: [file://.*|http(s)?://.*]\r\nCustom python dependency for model allowed: true\r\nEnable metrics API: true\r\nMetrics mode: LOG\r\nDisable system metrics: false\r\nWorkflow Store: /home/model-server/model-store\r\nCPP log config: N/A\r\nModel config: {\"text-to-image\": {\"1.0\": {\"defaultVersion\": true,\"marName\": \"text-to-image.mar\",\"minWorkers\": 1,\"maxWorkers\": 1,\"batchSize\": 4,\"maxBatchDelay\": 5000,\"responseTimeout\": 120}}}\r\nSystem metrics command: default\r\nModel API enabled: true\r\n2024-10-23T06:11:55,762 [INFO ] main org.pytorch.serve.servingsdk.impl.PluginsManager -  Loading snapshot serializer plugin...\r\n2024-10-23T06:11:55,763 [DEBUG] main org.pytorch.serve.ModelServer - Loading models from model store: text-to-image.mar\r\n2024-10-23T06:12:10,680 [DEBUG] main org.pytorch.serve.wlm.ModelVersionedRefs - Adding new version 1.0 for model text-to-image\r\n2024-10-23T06:12:10,681 [DEBUG] main org.pytorch.serve.wlm.ModelVersionedRefs - Setting default version to 1.0 for model text-to-image\r\n2024-10-23T06:18:40,296 [INFO ] main org.pytorch.serve.wlm.ModelManager - Installed custom pip packages for model text-to-image\r\n2024-10-23T06:18:40,297 [INFO ] main org.pytorch.serve.wlm.ModelManager - Model text-to-image loaded.\r\n2024-10-23T06:18:40,297 [DEBUG] main org.pytorch.serve.wlm.ModelManager - updateModel: text-to-image, count: 1\r\n2024-10-23T06:18:40,329 [DEBUG] W-9000-text-to-image_1.0 org.pytorch.serve.wlm.WorkerLifeCycle - Worker cmdline: [/home/venv/bin/python, /home/venv/lib/python3.9/site-packages/ts/model_service_worker.py, --sock-type, unix, --sock-name, /home/model-server/tmp/.ts.sock.9000, --metrics-config, /home/venv/lib/python3.9/site-packages/ts/configs/metrics.yaml]\r\n2024-10-23T06:18:40,334 [INFO ] main org.pytorch.serve.ModelServer - Initialize Inference server with: EpollServerSocketChannel.\r\n2024-10-23T06:18:40,443 [INFO ] main org.pytorch.serve.ModelServer - Inference API bind to: http://0.0.0.0:8080\r\n2024-10-23T06:18:40,444 [INFO ] main org.pytorch.serve.ModelServer - Initialize Management server with: EpollServerSocketChannel.\r\n2024-10-23T06:18:40,446 [INFO ] main org.pytorch.serve.ModelServer - Management API bind to: http://0.0.0.0:8081\r\n2024-10-23T06:18:40,446 [INFO ] main org.pytorch.serve.ModelServer - Initialize Metrics server with: EpollServerSocketChannel.\r\n2024-10-23T06:18:40,458 [INFO ] main org.pytorch.serve.ModelServer - Metrics API bind to: http://0.0.0.0:8082\r\nModel server started.\r\n2024-10-23T06:18:40,741 [WARN ] pool-3-thread-1 org.pytorch.serve.metrics.MetricCollector - worker pid is not available yet.\r\n2024-10-23T06:18:41,407 [INFO ] pool-3-thread-1 TS_METRICS - CPUUtilization.Percent:0.0|#Level:Hos",
    "url": "https://github.com/pytorch/serve/issues/3352",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-23T06:47:13Z",
    "updated_at": "2024-10-23T10:36:06Z",
    "comments": 1,
    "user": "dummyuser-123"
  },
  {
    "repo": "pytorch/xla",
    "number": 8301,
    "title": "Provide debugging and troubleshooting tips to Pallas developer",
    "body": "## \ud83d\udcda Documentation\r\n\r\nPlease provide documentation on how to troubleshoot pallas issues. One place we can put this information is in this [Pallas doc](https://github.com/pytorch/xla/blob/master/docs/source/features/pallas.md)\r\n\r\ncc @mikegre-google to help review the upcoming PR",
    "url": "https://github.com/pytorch/xla/issues/8301",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-10-22T22:50:15Z",
    "updated_at": "2024-10-25T21:58:56Z",
    "comments": 0,
    "user": "miladm"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2076,
    "title": "Problem converting tinyllama to onnx model with optimum-cli",
    "body": "### System Info\n\n```shell\nmain branch newest\r\nlocal pip install\n```\n\n\n### Who can help?\n\n@michaelbenayoun\r\n\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\noptimum-cli export onnx --model /home/wangzhiqun/TinyLlama-1.1B-Chat-v1.0 --task text-generation --batch_size 1 --sequence_length 128 tinyllama_onnx_file\n\n### Expected behavior\n\nTo specify the batch_size and sequence_length, I use the following \"optimum-cli export onnx --model /home/wangzhiqun/TinyLlama-1.1B-Chat-v1.0 --task text-generation --batch_size 1 --sequence_length 128 tinyllama_onnx_file\". But the exported onnx model still holds the shape [batch_size, sequence_length]. How can I specify the fixed dimensions?",
    "url": "https://github.com/huggingface/optimum/issues/2076",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-10-22T06:23:51Z",
    "updated_at": "2024-10-22T06:36:42Z",
    "comments": 0,
    "user": "hayyaw"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 639,
    "title": "How to load previous distributed checkpoint after using FP8Linear + torch.compile?",
    "body": "FP8Linear + torch.compile is changing the parameters's name. \r\n\r\nIf I do convert to FP8Linear -> torch.compile -> fsdp2 wrapping -> load distributed ckpt, the parameters's names do not match with the ckpt we want to resume from. And it's not straightforward to change the parameters's names in the distributed ckpt.\r\n\r\nThus, my question is what's the expected solution for this workflow?\r\n\r\nThanks a lot! ",
    "url": "https://github.com/pytorch/torchtitan/issues/639",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-21T23:27:33Z",
    "updated_at": "2024-10-25T18:35:40Z",
    "user": "goldhuang"
  },
  {
    "repo": "pytorch/ao",
    "number": 1132,
    "title": "What is the expected inference steps after I apply torchao in training?\u2028",
    "body": "Hello, I have integrated torchao to my training. But I don't think it's 100% clear what the inference should be like.\r\n\r\nShould I use the converted FP8 linear layer to do inference? Is delayed scaling supposed to work in inference?\r\nOr, should I use the original linear layer to do inference?\r\n\r\nThanks a lot in advance if you can help to clarify! ",
    "url": "https://github.com/pytorch/ao/issues/1132",
    "state": "closed",
    "labels": [
      "float8"
    ],
    "created_at": "2024-10-21T22:19:57Z",
    "updated_at": "2024-12-09T18:59:50Z",
    "user": "goldhuang"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 638,
    "title": "What is the expected inference steps after I apply torchao in training?",
    "body": "Hello, I have integrated torchao to my training. But I think it's not very clear what the inference should be like.\r\nShould I use the converted FP8 linear layer to do inference? Is delayed scaling supposed to work in inference?\r\nOr, should I use the original linear layer to do inference?\r\n\r\nThanks in advance if you can help to clarify! ",
    "url": "https://github.com/pytorch/torchtitan/issues/638",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-21T22:19:06Z",
    "updated_at": "2024-10-22T03:33:39Z",
    "user": "goldhuang"
  },
  {
    "repo": "pytorch/xla",
    "number": 8295,
    "title": "litepod and tpu sample not working anymore: https://cloud.google.com/tpu/docs/pytorch-pods",
    "body": "## \ud83d\udc1b Bug\r\n\r\nSample located here doesn't seem to work on tpu v5e16 pod (previous did as of 3 days ago) https://cloud.google.com/tpu/docs/pytorch-pods\r\n\r\n## To Reproduce\r\n\r\nFollowing the steps here: https://cloud.google.com/tpu/docs/pytorch-pods\r\n\r\nBefore running the example:\r\n1. set up SSH key pair using: ssh-keygen -t rsa -f .ssh/google_compute_engine -C  user\r\n2. added SSH to project meta via gcp console\r\n3. propagate key to tpu vm: \r\neval `ssh-agent -s`\r\nssh-add ~/.ssh/google_compute_engine\r\n\r\nOnly other change than what is in the sample is changing tpu to v5litepod-16.\r\n\r\nThe vm is created and all looks correct, but the process hangs. This occurs when getting the xla device. Output on the error is below. Thank you very much for the help! Exact same procedure was working consistently until yesterday. \r\n\r\ngcloud compute tpus tpu-vm ssh tpu-vm-sample --zone=us-central1-a --project=sample_tpu_project --worker=all --command=\"PJRT_DEVICE=TPU python3 ~/xla/test/test_train_mp_imagenet.py  \\\r\n  --fake_data \\\r\n  --model=resnet50  \\\r\n  --num_epochs=1 2>&1 | tee ~/logs.txt\"\r\nUsing ssh batch size of 1. Attempting to SSH into 1 nodes with a total of 4 workers.\r\nSSH: Attempting to connect to worker 0...\r\nSSH: Attempting to connect to worker 1...\r\nSSH: Attempting to connect to worker 2...\r\nSSH: Attempting to connect to worker 3...\r\nconcurrent.futures.process._RemoteTraceback:\r\n\"\"\"\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.10/concurrent/futures/process.py\", line 246, in _process_worker\r\n    r = call_item.fn(*call_item.args, **call_item.kwargs)\r\n  File \"/usr/lib/python3.10/concurrent/futures/process.py\", line 205, in _process_chunk\r\n    return [fn(*args) for args in chunk]\r\n  File \"/usr/lib/python3.10/concurrent/futures/process.py\", line 205, in <listcomp>\r\n    return [fn(*args) for args in chunk]\r\n  File \"/home/temp_user/.local/lib/python3.10/site-packages/torch_xla/runtime.py\", line 95, in wrapper\r\n    return fn(*args, **kwargs)\r\n  File \"/home/temp_user/.local/lib/python3.10/site-packages/torch_xla/_internal/pjrt.py\", line 59, in _run_thread_per_device\r\n    initializer_fn(local_rank, local_world_size)\r\n  File \"/home/temp_user/.local/lib/python3.10/site-packages/torch_xla/runtime.py\", line 95, in wrapper\r\n    return fn(*args, **kwargs)\r\n  File \"/home/temp_user/.local/lib/python3.10/site-packages/torch_xla/_internal/pjrt.py\", line 125, in initialize_multiprocess\r\n    devices = xm.get_xla_supported_devices()\r\n  File \"/home/temp_user/.local/lib/python3.10/site-packages/torch_xla/core/xla_model.py\", line 99, in get_xla_supported_devices\r\n    devices = torch_xla._XLAC._xla_get_devices()\r\nRuntimeError: Bad StatusOr access: UNKNOWN: TPU initialization failed: Worker failed to join a slice within 15m\r\n\"\"\"\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/temp_user/xla/test/test_train_mp_imagenet.py\", line 381, in <module>\r\n    xmp.spawn(_mp_fn, args=(FLAGS,), nprocs=FLAGS.num_cores)\r\n  File \"/home/temp_user/.local/lib/python3.10/site-packages/torch_xla/runtime.py\", line 95, in wrapper\r\n    return fn(*args, **kwargs)\r\n  File \"/home/temp_user/.local/lib/python3.10/site-packages/torch_xla/distributed/xla_multiprocessing.py\", line 38, in spawn\r\n    return pjrt.spawn(fn, nprocs, start_method, args)\r\n  File \"/home/temp_user/.local/lib/python3.10/site-packages/torch_xla/_internal/pjrt.py\", line 214, in spawn\r\n    run_multiprocess(spawn_fn, start_method=start_method)\r\n  File \"/home/temp_user/.local/lib/python3.10/site-packages/torch_xla/runtime.py\", line 95, in wrapper\r\n    return fn(*args, **kwargs)\r\n  File \"/home/temp_user/.local/lib/python3.10/site-packages/torch_xla/_internal/pjrt.py\", line 174, in run_multiprocess\r\n    replica_results = list(\r\n  File \"/home/temp_user/.local/lib/python3.10/site-packages/torch_xla/_internal/pjrt.py\", line 175, in <genexpr>\r\n    itertools.chain.from_iterable(\r\n  File \"/usr/lib/python3.10/concurrent/futures/process.py\", line 570, in _chain_from_iterable_of_lists\r\n    for element in iterable:\r\n  File \"/usr/lib/python3.10/concurrent/futures/_base.py\", line 621, in result_iterator\r\n    yield _result_or_cancel(fs.pop())\r\n  File \"/usr/lib/python3.10/concurrent/futures/_base.py\", line 319, in _result_or_cancel\r\n    return fut.result(timeout)\r\n  File \"/usr/lib/python3.10/concurrent/futures/_base.py\", line 458, in result\r\n    return self.__get_result()\r\n  File \"/usr/lib/python3.10/concurrent/futures/_base.py\", line 403, in __get_result\r\n    raise self._exception\r\nRuntimeError: Bad StatusOr access: UNKNOWN: TPU initialization failed: Worker failed to join a slice within 15m\r\nconcurrent.futures.process._RemoteTraceback:\r\n\"\"\"\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.10/concurrent/futures/process.py\", line 246, in _process_worker\r\n    r = call_item.fn(*call_item.args, **call_item.kwargs)\r\n  File \"/usr/lib/python3.10/concurrent/futures/process.py\", line 205, in _process_chunk\r\n    return [fn(*args) fo",
    "url": "https://github.com/pytorch/xla/issues/8295",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-21T16:43:31Z",
    "updated_at": "2024-10-22T00:54:24Z",
    "comments": 8,
    "user": "ttdd11"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9731,
    "title": "How to use Playground2.5 to train lora with own dataset to generate pictures of a specific style\uff1f",
    "body": "### Describe the bug\n\nHi,\r\n\r\nI have been working on training models using the same dataset as \"stabilityai/stable-diffusion-xl-base-1.0\" with the script examples/text_to_image/train_text_to_image_lora_sdxl.py, and I achieved quite promising results.\r\n\r\nNow, I am trying to further improve the performance by switching to Dreambooth. I am currently using playground2.5 with examples/dreambooth/train_dreambooth_lora_sdxl.py. However, after multiple parameter tuning attempts, the performance is still not as good as the SDXL base model.\r\n\r\nI am unsure what might be causing this.\n\n### Reproduction\n\n![image](https://github.com/user-attachments/assets/339a0e9b-de08-408d-a43a-495f86b5e1df)\r\n\n\n### Logs\n\n_No response_\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.31.0.dev0\r\n- Platform: Linux-5.14.0-284.25.1.el9_2.x86_64-x86_64-with-glibc2.17\r\n- Running on Google Colab?: No\r\n- Python version: 3.8.20\r\n- PyTorch version (GPU?): 2.2.0 (True)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Huggingface_hub version: 0.25.2\r\n- Transformers version: 4.45.2\r\n- Accelerate version: 1.0.1\r\n- PEFT version: 0.13.2\r\n- Bitsandbytes version: 0.44.1\r\n- Safetensors version: 0.4.5\r\n- xFormers version: not installed\r\n- Accelerator: NVIDIA H800, 81559 MiB\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9731",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-10-21T12:10:12Z",
    "updated_at": "2024-11-20T15:03:04Z",
    "user": "hjw-0909"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9727,
    "title": "FLUX.1-dev dreambooth save problem trained on multigpu",
    "body": "### Describe the bug\n\nI tried to train flux using accelerate and deepspeed, but when using two L40s, the model could not be saved properly. What is the problem?\n\n### Reproduction\n\ntrain.sh:\r\naccelerate launch --config_file config.yaml train_flux.py \\\r\n  --pretrained_model_name_or_path=\"./FLUX.1-dev\" \\\r\n  --resolution=1024 \\\r\n  --train_batch_size=1 \\\r\n  --output_dir=\"output1\" \\\r\n  --num_train_epochs=10 \\\r\n  --checkpointing_steps=5 \\\r\n  --validation_steps=500 \\\r\n  --max_train_steps=40001 \\\r\n  --learning_rate=4e-05 \\\r\n  --seed=12345 \\\r\n  --mixed_precision=\"fp16\" \\\r\n  --revision=\"fp16\" \\\r\n  --use_8bit_adam \\\r\n  --gradient_accumulation_steps=1 \\\r\n  --gradient_checkpointing \\\r\n  --lr_scheduler=\"constant_with_warmup\" --lr_warmup_steps=2500 \\\r\n\r\nconfig.yaml:\r\ncompute_environment: LOCAL_MACHINE\r\ndebug: false\r\ndeepspeed_config:\r\n  gradient_accumulation_steps: 1\r\n  gradient_clipping: 1.0\r\n  offload_optimizer_device: cpu\r\n  offload_param_device: cpu\r\n  zero3_init_flag: false\r\n  zero_stage: 2\r\ndistributed_type: DEEPSPEED\r\ndowncast_bf16: 'no'\r\ngpu_ids: 0,1\r\nenable_cpu_affinity: false\r\nmachine_rank: 0\r\nmain_training_function: main\r\nmixed_precision: fp16\r\nnum_machines: 1\r\nnum_processes: 2\r\nrdzv_backend: static\r\nsame_network: true\r\ntpu_env: []\r\ntpu_use_cluster: false\r\ntpu_use_sudo: false\r\nuse_cpu: false\n\n### Logs\n\n```shell\nUsing /home/oppoer/.cache/torch_extensions/py310_cu117 as PyTorch extensions root...\r\nNo modifications detected for re-loaded extension module utils, skipping build step...\r\nLoading extension module utils...\r\nTime to load utils op: 0.00030350685119628906 seconds\r\n10/21/2024 02:58:18 - INFO - __main__ - ***** Running training *****\r\n10/21/2024 02:58:18 - INFO - __main__ -   Num examples = 2109730\r\n10/21/2024 02:58:18 - INFO - __main__ -   Num batches each epoch = 1054865\r\n10/21/2024 02:58:18 - INFO - __main__ -   Num Epochs = 1\r\n10/21/2024 02:58:18 - INFO - __main__ -   Instantaneous batch size per device = 1\r\n10/21/2024 02:58:18 - INFO - __main__ -   Total train batch size (w. parallel, distributed & accumulation) = 2\r\n10/21/2024 02:58:18 - INFO - __main__ -   Gradient Accumulation steps = 1\r\n10/21/2024 02:58:18 - INFO - __main__ -   Total optimization steps = 40001\r\nSteps:   0%|                                                                                                                                                                    | 0/40001 [00:00<?, ?it/s]Passing `txt_ids` 3d torch.Tensor is deprecated.Please remove the batch dimension and pass it as a 2d torch Tensor\r\nUsing /home/oppoer/.cache/torch_extensions/py310_cu117 as PyTorch extensions root...\r\nNo modifications detected for re-loaded extension module utils, skipping build step...\r\nLoading extension module utils...\r\nTime to load utils op: 0.0007116794586181641 seconds\r\n[2024-10-21 02:58:29,496] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 4294967296, reducing to 2147483648\r\nSteps:   0%|                                                                                                                                      | 1/40001 [00:11<127:38:44, 11.49s/it, loss=0.544, lr=0]Passing `txt_ids` 3d torch.Tensor is deprecated.Please remove the batch dimension and pass it as a 2d torch Tensor\r\n[2024-10-21 02:58:36,774] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 2147483648, reducing to 1073741824\r\nSteps:   0%|                                                                                                                                       | 2/40001 [00:18<100:07:40,  9.01s/it, loss=0.36, lr=0]Passing `txt_ids` 3d torch.Tensor is deprecated.Please remove the batch dimension and pass it as a 2d torch Tensor\r\n[2024-10-21 02:58:44,052] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 1073741824, reducing to 536870912\r\nSteps:   0%|                                                                                                                                       | 3/40001 [00:26<91:19:39,  8.22s/it, loss=0.543, lr=0]Passing `txt_ids` 3d torch.Tensor is deprecated.Please remove the batch dimension and pass it as a 2d torch Tensor\r\n[2024-10-21 02:58:51,324] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 536870912, reducing to 268435456\r\nSteps:   0%|                                                                                                                                        | 4/40001 [00:33<87:10:01,  7.85s/it, loss=1.14, lr=0]Passing `txt_ids` 3d torch.Tensor is deprecated.Please remove the batch dimension and pass it as a 2d torch Tensor\r\n[2024-10-21 02:58:58,612] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 268435456, reducing to 134217728\r\nSteps:   0%|                                                                                       ",
    "url": "https://github.com/huggingface/diffusers/issues/9727",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-10-21T03:37:23Z",
    "updated_at": "2024-10-29T06:38:00Z",
    "comments": 1,
    "user": "jyy-1998"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9726,
    "title": "FLUX.1-dev dreambooth problem trained on multigpu",
    "body": "### Describe the bug\n\nI tried to use accelerate and deepspeed to train flux, and it worked fine when using two L40s, but an error occurred when using two a100s. What is the reason?\n\n### Reproduction\n\ntrain.sh:\r\naccelerate launch --config_file config.yaml train_flux.py \\\r\n  --pretrained_model_name_or_path=\"./FLUX.1-dev\" \\\r\n  --resolution=1024 \\\r\n  --train_batch_size=1 \\\r\n  --output_dir=\"output0\" \\\r\n  --num_train_epochs=10 \\\r\n  --checkpointing_steps=5 \\\r\n  --validation_steps=500 \\\r\n  --max_train_steps=40001 \\\r\n  --learning_rate=4e-05 \\\r\n  --seed=12345 \\\r\n  --mixed_precision=\"fp16\" \\\r\n  --revision=\"fp16\" \\\r\n  --use_8bit_adam \\\r\n  --gradient_accumulation_steps=1 \\\r\n  --gradient_checkpointing \\\r\n  --lr_scheduler=\"constant_with_warmup\" --lr_warmup_steps=2500 \\\r\n  --mask_accept_threshold=0.6 \\\r\n  --empty_prompt_prob=0.1 \\\r\n  --dilate_factor=4 \\\r\n  --crop_img \\\r\n  --mask_cover_percent=0.0 \\\r\n  --mask_cover_percent_person=0.5 \\\r\n\r\nconfig.yaml:\r\ncompute_environment: LOCAL_MACHINE\r\ndebug: false\r\ndeepspeed_config:\r\n  gradient_accumulation_steps: 1\r\n  gradient_clipping: 1.0\r\n  offload_optimizer_device: cpu\r\n  offload_param_device: cpu\r\n  zero3_init_flag: false\r\n  zero_stage: 2\r\ndistributed_type: DEEPSPEED\r\ndowncast_bf16: 'no'\r\ngpu_ids: 0,1\r\nenable_cpu_affinity: false\r\nmachine_rank: 0\r\nmain_training_function: main\r\nmixed_precision: fp16\r\nnum_machines: 1\r\nnum_processes: 2\r\nrdzv_backend: static\r\nsame_network: true\r\ntpu_env: []\r\ntpu_use_cluster: false\r\ntpu_use_sudo: false\r\nuse_cpu: false\n\n### Logs\n\n```shell\nInstalled CUDA version 11.8 does not match the version torch was compiled with 11.7 but since the APIs are compatible, accepting this combination\r\nInstalled CUDA version 11.8 does not match the version torch was compiled with 11.7 but since the APIs are compatible, accepting this combination\r\nUsing /home/oppoer/.cache/torch_extensions/py310_cu117 as PyTorch extensions root...\r\n[1/3] /usr/local/cuda/bin/nvcc  -DTORCH_EXTENSION_NAME=cpu_adam -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\\\"_gcc\\\" -DPYBIND11_STDLIB=\\\"_libstdcpp\\\" -DPYBIND11_BUILD_ABI=\\\"_cxxabi1011\\\" -I/opt/conda/lib/python3.10/site-packages/deepspeed/ops/csrc/includes -I/usr/local/cuda/include -isystem /opt/conda/lib/python3.10/site-packages/torch/include -isystem /opt/conda/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /opt/conda/lib/python3.10/site-packages/torch/include/TH -isystem /opt/conda/lib/python3.10/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /opt/conda/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 --compiler-options '-fPIC' -O3 --use_fast_math -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_80,code=compute_80 -DBF16_AVAILABLE -c /opt/conda/lib/python3.10/site-packages/deepspeed/ops/csrc/common/custom_cuda_kernel.cu -o custom_cuda_kernel.cuda.o \r\n[2/3] c++ -MMD -MF cpu_adam.o.d -DTORCH_EXTENSION_NAME=cpu_adam -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\\\"_gcc\\\" -DPYBIND11_STDLIB=\\\"_libstdcpp\\\" -DPYBIND11_BUILD_ABI=\\\"_cxxabi1011\\\" -I/opt/conda/lib/python3.10/site-packages/deepspeed/ops/csrc/includes -I/usr/local/cuda/include -isystem /opt/conda/lib/python3.10/site-packages/torch/include -isystem /opt/conda/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /opt/conda/lib/python3.10/site-packages/torch/include/TH -isystem /opt/conda/lib/python3.10/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /opt/conda/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -O3 -std=c++17 -g -Wno-reorder -L/usr/local/cuda/lib64 -lcudart -lcublas -g -march=native -fopenmp -D__AVX512__ -D__ENABLE_CUDA__ -DBF16_AVAILABLE -c /opt/conda/lib/python3.10/site-packages/deepspeed/ops/csrc/adam/cpu_adam.cpp -o cpu_adam.o \r\n[3/3] c++ cpu_adam.o custom_cuda_kernel.cuda.o -shared -lcurand -L/opt/conda/lib/python3.10/site-packages/torch/lib -lc10 -lc10_cuda -ltorch_cpu -ltorch_cuda -ltorch -ltorch_python -L/usr/local/cuda/lib64 -lcudart -o cpu_adam.so\r\nLoading extension module cpu_adam...\r\nTime to load cpu_adam op: 27.327727794647217 seconds\r\nLoading extension module cpu_adam...\r\nTime to load cpu_adam op: 21.32274580001831 seconds\r\nAdam Optimizer #0 is created with AVX512 arithmetic capability.\r\nConfig: alpha=0.001000, betas=(0.900000, 0.999000), weight_decay=0.000100, adam_w=1\r\n[2024-10-21 03:05:17,566] [INFO] [logging.py:96:log_dist] [Rank 0] DeepSpeed info: version=0.9.3, git-hash=unknown, git-branch=unknown\r\nAdam Optimizer #0 is created with AVX512 arithmetic capability.\r\nConfig: alpha=0.001000, betas=(0.900000, 0.999000), weight_decay=0.000100, adam_w=1\r\n10/21/2024 03:06:08 - INFO - torch.distributed.dis",
    "url": "https://github.com/huggingface/diffusers/issues/9726",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-10-21T03:20:44Z",
    "updated_at": "2024-10-21T03:32:42Z",
    "comments": 0,
    "user": "jyy-1998"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1661,
    "title": "How to Read Information in Large Tokenizer's Vocabulary",
    "body": "TLDR; This is how the byte-level BPE works. Main advantages are:\r\n- Smaller vocabularies\r\n- No unknown token\r\n\r\nThis is totally expected behavior. The byte-level BPE converts all the Unicode code points into multiple byte-level characters:\r\n 1. Each Unicode code point is decomposed into bytes (1 byte for ASCII characters, and up to 4 bytes for UTF-8 Unicode code points)\r\n 2. Each byte value gets a \"visible\" character assigned to it from the beginning of the Unicode table. This is especially important because there are a lot of control characters, so we can't just have a simple mapping ASCII Table character <-> byte value. So some characters get other representations, like for example the white space `U+0020` becomes `\u0120`.\r\n\r\nThe purpose is, by doing so, you end up with an initial alphabet of 256 tokens. These 256 tokens can then be merged together to represent any other token in the vocabulary. This results in smaller vocabularies, that won't ever need an \"unknown\" token.\r\n\r\n_Originally posted by @n1t0 in https://github.com/huggingface/tokenizers/issues/203#issuecomment-605105611_\r\n\r\n@n1t0\r\nThank you for your previous responses. I have been working with a large tokenizer of a LLM, and I've noticed that the vocabulary contains a significant amount of information that like these unreadable codes. \r\n\r\nI wonder if there are any methods or tools available to help me read and interpret the information in the tokenizer's vocabulary. For example, is there a way to map these tokens back to their original words or phrases, or any other approach to make the vocabulary more interpretable?\r\n            ",
    "url": "https://github.com/huggingface/tokenizers/issues/1661",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-20T13:38:53Z",
    "updated_at": "2024-10-21T07:29:43Z",
    "user": "kaizhuanren"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 636,
    "title": "DDP + Pipeline parallelism",
    "body": "For fine tuning/training with `PP + DDP`, is there documentation or modification that can be done to achieve this using torchtitan? \r\n\r\nThe following check in `parallelize_llama.py` was the point of error when trying the configuration on my end.\r\n`if world_mesh.ndim > 1:\r\n                raise RuntimeError(\"DDP has not supported > 1D parallelism\")`\r\n\r\nThe use case I am imagining is: for a host with multiple GPUs that is responsible for a particular pipeline stage (part of model), as long as there is enough memory `DDP` might be a viable option.\r\n",
    "url": "https://github.com/pytorch/torchtitan/issues/636",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-20T12:36:55Z",
    "updated_at": "2024-11-08T00:03:05Z",
    "user": "prathameshtd"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 635,
    "title": "data shuffling",
    "body": "I understand that the current version of the code doesn't shuffle the data during training, _i.e._ examples are consumed in order in each rank (in fact, there's a note to that effect [here](https://github.com/pytorch/torchtitan/blob/0edd2fb36c8c3468086986efd049e9bb0ff3414e/torchtitan/datasets/hf_datasets.py#L99)). I'm kind of new to large-scale LLM training, so I was just wondering if this is common practice in LLM training. It seems not ideal potentially, since consecutive gradients will likely be more correlated than under random shuffling.\r\n\r\nIf I wanted to randomly shuffle the data during training, how could I go about doing that? I thought about using `ds.shuffle()` before splitting the dataset by node [here](https://github.com/pytorch/torchtitan/blob/0edd2fb36c8c3468086986efd049e9bb0ff3414e/torchtitan/datasets/hf_datasets.py#L101C22-L101C43), but that would (pseudo-)shuffle the data rows, which doesn't seem quite right, since I think we really want to shuffle concatenated `seq_len` long chunks of text instead.\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/torchtitan/issues/635",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-20T03:39:35Z",
    "updated_at": "2024-10-24T02:08:43Z",
    "user": "eminorhan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9719,
    "title": "`disable_progress_bar` is ignored for some models (Loading checkpoint shards)",
    "body": "### Describe the bug\n\nWhen loading some pipelines, `diffusers.utils.logging.disable_progress_bar()` doesn't disable all progress bars. In particular the \"Loading checkpoint shards\" progress bar still appears. The \"Loading pipeline components...\" progress bar, however, is disabled as expected. Models I found, where this occurs, are: \r\n\r\n* [`stabilityai/stable-diffusion-3-medium-diffusers`](https://huggingface.co/stabilityai/stable-diffusion-3-medium-diffusers)\r\n* [`black-forest-labs/FLUX.1-schnell`](https://huggingface.co/black-forest-labs/FLUX.1-schnell)\r\n\r\nThe image generation progress bar also doesn't respect this setting, but can be disabled with `pipe.set_progress_bar_config(disable=True)`. When files are downloaded, the progress bars are also not disabled. These two cases seem like they might be intentional. Are they?\r\n\r\nIs there better way to disable progress bars globally for diffusers? Can the \"Loading checkpoint shards\" progress bar be disabled specifically?\n\n### Reproduction\n\n```python\r\nimport diffusers\r\ndiffusers.utils.logging.disable_progress_bar()\r\n# pipe = diffusers.StableDiffusion3Pipeline.from_pretrained('stabilityai/stable-diffusion-3-medium-diffusers')\r\npipe = diffusers.FluxPipeline.from_pretrained('black-forest-labs/FLUX.1-schnell')\r\npipe('test')\r\n```\n\n### Logs\n\n```shell\n>>> pipe = diffusers.FluxPipeline.from_pretrained('black-forest-labs/FLUX.1-schnell')\r\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:03<00:00,  1.56s/it]\r\nYou set `add_prefix_space`. The tokenizer needs to be converted from the slow tokenizers\r\n>>>\n```\n\n\n### System Info\n\nGoogle Colab\r\n\r\nor locally:\r\n\r\n- \ud83e\udd17 Diffusers version: 0.30.3\r\n- Running on Google Colab?: No\r\n- Python version: 3.12.7\r\n- PyTorch version (GPU?): 2.5.0+cu124 (True)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Huggingface_hub version: 0.26.0\r\n- Transformers version: 4.45.2\r\n- Accelerate version: 1.0.1\r\n- PEFT version: not installed\r\n- Bitsandbytes version: not installed\r\n- Safetensors version: 0.4.5\r\n- xFormers version: not installed\n\n### Who can help?\n\n@sayakpaul @DN6",
    "url": "https://github.com/huggingface/diffusers/issues/9719",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-10-19T17:42:37Z",
    "updated_at": "2024-10-19T19:29:12Z",
    "comments": 2,
    "user": "JonasLoos"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3100,
    "title": "\ud83d\udca1 [REQUEST] - Add minGRU Tutorial for Efficient Sequence Modeling ",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\r\n\r\nI propose adding a tutorial on implementing and using minGRU (minimal Gated Recurrent Unit) to the PyTorch tutorials. This addition would provide valuable insights into efficient sequence modeling techniques for the PyTorch community.\r\n\r\n\r\n- Efficiency: Up to 1324x faster than standard GRU for 4096-token sequences, with comparable accuracy.\r\n- Competitive Performance: Matches state-of-the-art models like Mamba in language modeling and reinforcement learning.\r\n- Learning Tool: Bridges simple RNNs and complex attention-based models, aiding learner progression.\r\n\r\n### Benefits for PyTorch users:\r\n\r\n- Efficient Sequence Processing: Implement and train RNNs for long sequences, crucial for modern NLP and time series analysis.\r\n- Parallel Training Skills: Learn to leverage parallel computing for RNN training, applicable to various deep learning tasks.\r\n- Versatile Solution: Practical alternative to traditional RNNs and complex models, balancing efficiency and performance.\r\n\r\n\r\n### Paper \r\n[were rnns all we need](https://arxiv.org/pdf/2410.01201)\r\n\r\n\r\n\r\n### Existing tutorials on this topic\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\nIf you guys like this idea, I'm ready to jump in! I could have a PR ready as soon as tomorrow. \r\nI'm thinking of contributing a tutorial on how to use or train  minGRU for language modeling \r\n\r\n@svekars @albanD ",
    "url": "https://github.com/pytorch/tutorials/issues/3100",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-19T16:35:32Z",
    "updated_at": "2025-04-16T22:02:23Z",
    "comments": 1,
    "user": "dame-cell"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2069,
    "title": "High CUDA Memory Usage in ONNX Runtime with Inconsistent Memory Release",
    "body": "### System Info\r\n\r\n```shell\r\nOptimum version: 1.22.0\r\nPlatform: Linux (Ubuntu 22.04.4 LTS)\r\nPython version: 3.12.2\r\nONNX Runtime Version: 1.19.2\r\nCUDA Version: 12.1\r\nCUDA Execution Provider: Yes (CUDA 12.1)\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n@JingyaHuang @echarlaix \r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [X] My own task or dataset (give details below)\r\n\r\n### Reproduction (minimal, reproducible, runnable)\r\n\r\n```python\r\ndef load_model(self, model_name):\r\n    session_options = ort.SessionOptions()\r\n    session_options.add_session_config_entry('cudnn_conv_use_max_workspace', '0')\r\n    session_options.enable_mem_pattern = False\r\n    session_options.arena_extend_strategy = \"kSameAsRequested\"\r\n    session_options.gpu_mem_limit = 10 * 1024 * 1024 * 1024\r\n    \r\n    model = ORTModelForSeq2SeqLM.from_pretrained(model_name, provider=\"CUDAExecutionProvider\", session_options=session_options)\r\n    tokenizer = AutoTokenizer.from_pretrained(model_name)\r\n    return tokenizer, model\r\n\r\ndef inference(self, batch, doc_id='-1'):\r\n    responses, status = '', False\r\n    try:\r\n        encodings = self.tokenizer(batch, padding=True, truncation=True, max_length=8192, return_tensors=\"pt\").to(self.device)\r\n        with torch.no_grad():\r\n            generated_ids = self.model.generate(\r\n                encodings.input_ids,\r\n                max_new_tokens=1024\r\n            )\r\n            responses = self.tokenizer.batch_decode(generated_ids, skip_special_tokens=True)\r\n            status = True  \r\n    except Exception as e:\r\n        logger.error(f\"Failed to do inference on LLM, error: {e}\")\r\n\r\n    torch.cuda.empty_cache()\r\n    return status, responses\r\n```\r\n\r\n### Expected behavior\r\n\r\nI expect the CUDA memory to decrease and be released after processing smaller inputs, optimizing memory usage for subsequent inputs.\r\n![Picture1](https://github.com/user-attachments/assets/a188ede0-2287-4603-a84e-ba62d309a940)\r\n\r\n",
    "url": "https://github.com/huggingface/optimum/issues/2069",
    "state": "closed",
    "labels": [
      "question",
      "Stale"
    ],
    "created_at": "2024-10-19T02:45:54Z",
    "updated_at": "2024-12-25T02:02:08Z",
    "user": "niyathimariya"
  },
  {
    "repo": "pytorch/data",
    "number": 1344,
    "title": "Delete datapipes and dataloader 2 documentation",
    "body": "### \ud83d\udcda The doc issue\n\nSince these are gone on main, we should delete nightly documentation as well. Basically they need to disappear from here: https://pytorch.org/data/main/ \n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/1344",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-10-18T23:14:59Z",
    "updated_at": "2024-10-19T20:29:46Z",
    "comments": 0,
    "user": "andrewkho"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 981,
    "title": "Any gotcha's with manually adding items to transformers-cache?",
    "body": "### Question\r\n\r\nFor [papeg.ai](https://www.papeg.ai) I've implemented that the service worker caches `.wasm` files from `jsDelivir` that Transformers.js [wasn't caching itself yet](https://github.com/huggingface/transformers.js/issues/685#issuecomment-2325125036).\r\n\r\nI've been caching those filesi n the 'main' Papeg.ai cache until now, but I want to switch to saving those files in the `transformers-cache` instead. That would (hopefully) make it so that the .wasm files don't have to be downloaded again if I update papeg.ai (which clears the papeg.ai cache). And vice-versa: the transformers cache could be fully cleared independently of the papeg.ai cache (ideally Transformers.js would manage all this itself).\r\n\r\n- Is this a reasonable idea?\r\n- Is this in line with your plans for a future improved caching system? Or do you, for example, plan to keep wasm, onnx and config files in separate caches, like WebLLM?\r\n- Will Transformers.js even look for those .wasm files in `transformers-cache` first? With the service worker this doesn't technically matter, as requests to jsDelivir are captured anyway. But the service worker isn't always available.\r\n\r\nTangentially, would it be an idea to (also) store the code and wasm files on Huggingface itself? Because of EU privacy regulations, and good privacy design in general, I'd like to keep third parties that the site needs to connect to to an absolute minimum. I'd love to eliminate jsDelivir, and only rely on Github and HuggingFace. Or is there perhaps a way to tell Transformers.js where to look? Then I could host the files on Github/HuggingFace manually.\r\n\r\nJust for fun, here's a service worker code snippet that, from now on, stores the jsDelivir files in the transformers-cache:\r\n\r\n```\r\nlet target_cache = cacheName;\r\n\t\t\t\t\t\t\t\t\t\tif(request.url.indexOf('https://cdn.jsdelivr.net/npm/@huggingface/transformers') != -1){\r\n\tconsole.log(\"service_worker: saving to transformers-cache: \", request.url);\r\n\ttarget_cache = 'transformers-cache';\r\n}\r\n\r\ncaches.open(target_cache)\r\n.then(function(cache) {\r\n\tcache.put(request, fetch_response_clone);\r\n})\r\n.catch((err) => {\r\n\tconsole.error(\"service worker: caught error adding to cache: \", err);\r\n})\r\n```\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/981",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-18T12:53:07Z",
    "updated_at": "2024-10-18T12:56:21Z",
    "user": "flatsiedatsie"
  },
  {
    "repo": "huggingface/transformers",
    "number": 34241,
    "title": "How to output token by token use transformers?",
    "body": "### System Info\n\n...\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n...\n\n### Expected behavior\n\nHow to output token by token use transformers?",
    "url": "https://github.com/huggingface/transformers/issues/34241",
    "state": "closed",
    "labels": [
      "Discussion",
      "bug"
    ],
    "created_at": "2024-10-18T09:45:19Z",
    "updated_at": "2024-11-26T08:04:43Z",
    "user": "xuanzhangyang"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 477,
    "title": "Collecting human operated datasets in simulation",
    "body": "Hello,\r\n\r\nCan you provide info on how human supervision was provided for the simulated datasets (e.g. `lerobot/aloha_sim_transfer_cube_human`)? I am starting to setup a similar MuJoCo gym environment for the Stretch (https://github.com/mmurray/gym-stretch) and I would like to collect/train on some human teleop data, but it seems like the current `control_robot.py` script and data collection examples are setup only for physical robots. Is there a branch somewhere with the code used to collect `lerobot/aloha_sim_transfer_cube_human` that I can reference?\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/lerobot/issues/477",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "simulation"
    ],
    "created_at": "2024-10-17T23:24:17Z",
    "updated_at": "2025-10-08T08:49:32Z",
    "user": "mmurray"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 138280,
    "title": "Refactor FlexibleLayout to separate out \"this stride can be changed\" and \"how this buffer is allocated can be changed\" ",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nCurrently, we have two layouts:\r\n- FixedLayout\r\n- FlexibleLayout\r\n\r\nWhere FixedLayout basically means \"We already decided the layout, don't change it\" while FlexibleLayout means \"we are free to change this layout\".\r\n\r\nHowever, I think there are actually two different components of \"decided this layout\":\r\n\r\n1. What is the output **stride** of this layout?\r\n2. Who allocates the actual buffer for this tensor?\r\n\r\nI believe conflating these causes some problems:\r\n\r\n- For inductor template tuning, we care about the **stride** of the output layout, but we don't care who allocated the buffer (e.g. if it's just a view into a larger concat buffer).  And Elias points out that he noticed this too here: https://github.com/pytorch/pytorch/pull/132554#issue-2445835622\r\n- For Yifu's recent PR (https://github.com/pytorch/pytorch/pull/138029), he cares about \"who allocates the buffer for this layout\", but he doesn't care about \"what is the actual stride of this layout\".\r\n\r\nMy proposal is that we scrap our current subclasses of Layout and refactor it into:\r\n```\r\nclass Layout:\r\n    stride: FlexibleStride or FixedStride\r\n    allocator: NonOwningAllocator (view into another allocation) or Flexible or SymmMem\r\n```\r\n\r\ncc: @eellison @yifuwang @shunting314 @jansel \n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @aakhundov @coconutruben @jataylo @ezyang @yf225 @chenyang78 @ColinPeppler @desertfire",
    "url": "https://github.com/pytorch/pytorch/issues/138280",
    "state": "open",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: inductor",
      "internal ramp-up task"
    ],
    "created_at": "2024-10-17T23:10:36Z",
    "updated_at": "2025-12-02T17:11:15Z",
    "user": "Chillee"
  },
  {
    "repo": "huggingface/lighteval",
    "number": 365,
    "title": "[FT] Using lighteval to evaluate a model on a single sample, how?",
    "body": "Thank you the team for the great work. I have a question. Can you please help me to use lighteval to evaluate a model on a single sample? \r\n\r\nFor example, if I have an input from mmlu I, my model generates output O, how can I use lighteval to evaluate O with using the Acc metric?\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/lighteval/issues/365",
    "state": "closed",
    "labels": [
      "feature"
    ],
    "created_at": "2024-10-17T12:43:45Z",
    "updated_at": "2024-10-24T10:12:54Z",
    "user": "dxlong2000"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9700,
    "title": "Flux inversion",
    "body": "current img2img is not so well, [RF Inversion](https://rf-inversion.github.io/)) provides an inverse method for Flux real image editing, can we implement it using diffusers?\r\n\r\nor how can we use DDIM inversion in Flux?",
    "url": "https://github.com/huggingface/diffusers/issues/9700",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-17T07:03:59Z",
    "updated_at": "2024-12-17T16:00:30Z",
    "comments": 8,
    "user": "yuxu915"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 138179,
    "title": "How to resolve the libfmt.a conflict in React Native.",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI want to develop a React Native module that primarily integrates LibTorch and includes some methods for loading models and making predictions.\r\n\r\nI created the module using `npx create-expo-module` and then proceeded with the development. \r\n\r\nWhen I run `pod install `in ios, it prompts me that `\"The 'Pods-expoptexample' target has libraries with conflicting names: libfmt.a.\" `This issue does not occur when I build without installing LibTorch. I would like to know what I should do to avoid this problem.\n\n### Alternatives\n\nI tried the following methods, but none of them resolved the issue:\r\n\r\n1.I added the following code to the Podfile to exclude libfmt.a:\r\n\r\n```ruby\r\ninstaller.pods_project.targets.each do |target|\r\n      target.build_configurations.each do |config|\r\n        config.build_settings['EXCLUDED_SOURCE_FILE_NAMES'] ||= []\r\n        config.build_settings['EXCLUDED_SOURCE_FILE_NAMES'] << 'libfmt.a'\r\n      end\r\n    end\r\n```\r\n2.I tried `pod deintegrate` and then `pod install`.\r\n\r\n\n\n### Additional context\n\n**this is my Podfile**\r\n```ruby\r\nrequire File.join(File.dirname(`node --print \"require.resolve('expo/package.json')\"`), \"scripts/autolinking\")\r\nrequire File.join(File.dirname(`node --print \"require.resolve('react-native/package.json')\"`), \"scripts/react_native_pods\")\r\n\r\nrequire 'json'\r\npodfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}\r\n\r\nENV['RCT_NEW_ARCH_ENABLED'] = podfile_properties['newArchEnabled'] == 'true' ? '1' : '0'\r\nENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] = podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR']\r\n\r\nuse_autolinking_method_symbol = ('use' + '_native' + '_modules!').to_sym\r\norigin_autolinking_method = self.method(use_autolinking_method_symbol)\r\nself.define_singleton_method(use_autolinking_method_symbol) do |*args|\r\n  if ENV['EXPO_UNSTABLE_CORE_AUTOLINKING'] == '1'\r\n    Pod::UI.puts('Using expo-modules-autolinking as core autolinking source'.green)\r\n    config_command = [\r\n      'node',\r\n      '--no-warnings',\r\n      '--eval',\r\n      'require(require.resolve(\\'expo-modules-autolinking\\', { paths: [require.resolve(\\'expo/package.json\\')] }))(process.argv.slice(1))',\r\n      'react-native-config',\r\n      '--json',\r\n      '--platform',\r\n      'ios'\r\n    ]\r\n    origin_autolinking_method.call(config_command)\r\n  else\r\n    origin_autolinking_method.call()\r\n  end\r\nend\r\n\r\nplatform :ios, podfile_properties['ios.deploymentTarget'] || '13.4'\r\ninstall! 'cocoapods',\r\n  :deterministic_uuids => false\r\n\r\nprepare_react_native_project!\r\n\r\ntarget 'expoptexample' do\r\n  use_expo_modules!\r\n  config = use_native_modules!\r\n\r\n  use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']\r\n  use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS']\r\n\r\n  use_react_native!(\r\n    :path => config[:reactNativePath],\r\n    :hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes',\r\n    # An absolute path to your application root.\r\n    :app_path => \"#{Pod::Config.instance.installation_root}/..\",\r\n    :privacy_file_aggregation_enabled => podfile_properties['apple.privacyManifestAggregationEnabled'] != 'false',\r\n  )\r\n\r\n  post_install do |installer|\r\n    react_native_post_install(\r\n      installer,\r\n      config[:reactNativePath],\r\n      :mac_catalyst_enabled => false,\r\n      :ccache_enabled => podfile_properties['apple.ccacheEnabled'] == 'true',\r\n    )\r\n\r\n    # This is necessary for Xcode 14, because it signs resource bundles by default\r\n    # when building for devices.\r\n    installer.target_installation_results.pod_target_installation_results\r\n      .each do |pod_name, target_installation_result|\r\n      target_installation_result.resource_bundle_targets.each do |resource_bundle_target|\r\n        resource_bundle_target.build_configurations.each do |config|\r\n          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'\r\n        end\r\n      end\r\n    end\r\n\r\n    # Exclude libfmt.a to avoid naming conflicts\r\n    installer.pods_project.targets.each do |target|\r\n      target.build_configurations.each do |config|\r\n        config.build_settings['EXCLUDED_SOURCE_FILE_NAMES'] ||= []\r\n        config.build_settings['EXCLUDED_SOURCE_FILE_NAMES'] << 'libfmt.a'\r\n      end\r\n    end\r\n  end\r\n\r\n  post_integrate do |installer|\r\n    begin\r\n      expo_patch_react_imports!(installer)\r\n    rescue => e\r\n      Pod::UI.warn e\r\n    end\r\n  end\r\nend\r\n```\r\n\r\n### this is my .podspec file\r\n```ruby\r\nrequire 'json'\r\n\r\npackage = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))\r\n\r\nPod::Spec.new do |s|\r\n  s.name           = 'ExpoPt'\r\n  s.version        = package['version']\r\n  s.summary        = package['description']\r\n  s.description    = package['description']\r\n  s.license        = package['license']\r\n  s.author         = package['author']\r\n  s.homepage       = package['homepage']\r\n  s.platforms      = { :ios => '13.4',",
    "url": "https://github.com/pytorch/pytorch/issues/138179",
    "state": "closed",
    "labels": [
      "triage review"
    ],
    "created_at": "2024-10-17T06:37:21Z",
    "updated_at": "2024-10-21T17:35:00Z",
    "user": "wangyujiaoflag"
  },
  {
    "repo": "pytorch/xla",
    "number": 8270,
    "title": "Clarify that torch_xla2 is only recommended for inference",
    "body": "## \ud83d\udcda Documentation\r\n\r\n<!-- A clear and concise description of what content is an issue. -->\r\nMy understanding is that torch_xla2 is only recommended for inference. Address this in the [README](https://github.com/pytorch/xla/tree/master/experimental/torch_xla2)",
    "url": "https://github.com/pytorch/xla/issues/8270",
    "state": "closed",
    "labels": [
      "question",
      "documentation"
    ],
    "created_at": "2024-10-17T04:53:36Z",
    "updated_at": "2025-02-27T13:08:45Z",
    "user": "cloudchrischan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9698,
    "title": "Unable to Retrieve Intermediate Gradients with CogVideoXPipeline",
    "body": "### Describe the bug\n\nWhen generating videos using the CogVideoXPipeline model, we need to access the gradients of intermediate tensors. However, we do not require additional training or parameter updates for the model.\r\n\r\nWe tried using register_forward_hook to capture the gradients, but this approach failed because the CogVideoXPipeline disables gradient calculations. Specifically, in pipelines/cogvideo/pipeline_cogvideox.py at line 478, gradient tracking is turned off with @torch.no_grad().\r\n\r\nHow can we resolve this issue and retrieve the gradients without modifying the model\u2019s parameters or performing extra training?\r\n\n\n### Reproduction\n\nSample Code\r\npipe = CogVideoXPipeline.from_pretrained(\r\n    \"THUDM/CogVideoX-2b\",\r\n    torch_dtype=torch.float16\r\n)\r\nvideo = pipe(\r\n    prompt=prompt,\r\n    num_videos_per_prompt=1,\r\n    num_inference_steps=50,\r\n    num_frames=49,\r\n    guidance_scale=6,\r\n    generator=torch.Generator(device=\"cuda\").manual_seed(42),\r\n).frames[0]\r\n\r\nPipeline Code Reference \r\npipelines/cogvideo/pipeline_cogvideox.py at line 478\r\n@torch.no_grad()\r\n@replace_example_docstring(EXAMPLE_DOC_STRING)\r\ndef __call__(\r\n    self,\r\n    prompt: Optional[Union[str, List[str]]] = None,\r\n    negative_prompt: Optional[Union[str, List[str]]] = None,\r\n    height: int = 480,\r\n    width: int = 720,\n\n### Logs\n\n_No response_\n\n### System Info\n\nDiffusers version: 0.30.3\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9698",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-10-17T04:30:56Z",
    "updated_at": "2024-10-27T10:24:41Z",
    "comments": 4,
    "user": "lovelyczli"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9697,
    "title": "train_text_to_image_sdxl training effect is very poor",
    "body": "I use DeepSpeed for training: train_text_to_image_sdxl.py \r\n1.The data volume is 231 pieces\r\n2. deepspeed json\r\n![\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17291359065532](https://github.com/user-attachments/assets/f82ad033-d786-4fe4-9264-3b6236304170)\r\n3.Training Script\r\n![\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17291362274700](https://github.com/user-attachments/assets/ae5a6207-dbc8-4dde-b5d7-dcdaa0ac2783)\r\n4.After training, use the training prompt words again\uff0cThe generated effect is as follows:\r\n![\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17291363542986](https://github.com/user-attachments/assets/004d3e51-de2e-453b-864a-803794659d2c)\r\n\r\nMay I ask everyone, what is the reason for the poor generation effect\uff1f\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9697",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-17T03:40:17Z",
    "updated_at": "2024-10-17T08:32:44Z",
    "comments": 2,
    "user": "wzhiyuan2016"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 41,
    "title": "cannot access local variable 'gradient_norm_before_clip' where it is not associated with a value",
    "body": "During both I2V and t2V training, sometimes I encountered the error \r\n\r\n```\r\n[rank1]:   File \"/root/projects/cogvideox-factory/training/cogvideox_text_to_video_lora.py\", line 762, in main\r\n[rank1]:     \"gradient_norm_before_clip\": gradient_norm_before_clip,\r\n[rank1]:                                  ^^^^^^^^^^^^^^^^^^^^^^^^^\r\n[rank1]: UnboundLocalError: cannot access local variable 'gradient_norm_before_clip' where it is not associated with a value\r\n```\r\n\r\nThis is probably [here](https://github.com/a-r-r-o-w/cogvideox-factory/blob/a6c246c29d11d78e4aa3fb4b137c5ffd8d719d94/training/cogvideox_text_to_video_lora.py#L715) in the following code\r\n```\r\nif accelerator.sync_gradients:\r\n        gradient_norm_before_clip = get_gradient_norm(transformer.parameters())\r\n        accelerator.clip_grad_norm_(transformer.parameters(), args.max_grad_norm)\r\n        gradient_norm_after_clip = get_gradient_norm(transformer.parameters())\r\n```\r\nsomehow `accelerator.sync_gradients` is false sometimes. \r\n\r\nIs there a quick fix? Is it only for logging?\r\n",
    "url": "https://github.com/huggingface/finetrainers/issues/41",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-16T18:34:19Z",
    "updated_at": "2024-12-06T08:09:46Z",
    "user": "Yuancheng-Xu"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 40,
    "title": "How to load the fine-tuned I2V model's LoRA module",
    "body": "I have successfully fine-tuned an I2V model (locally, without pushing to HF) and would like to load it for inference. I use the following code suggested in the readme\r\n\r\n```\r\nmodel_name = \"THUDM/CogVideoX-5b-I2V\" \r\npipe = CogVideoXImageToVideoPipeline.from_pretrained(\r\n    model_name, torch_dtype=torch.bfloat16\r\n).to(\"cuda\")\r\n\r\npipe.load_lora_weights(\"MyLocalLoRAPath\", adapter_name=[\"cogvideox-lora\"])\r\npipe.set_adapters([\"cogvideox-lora\"], [1.0])\r\n```\r\n\r\nHowever I encounter the error \r\n\r\n```\r\nFile ~/anaconda3/envs/cogvideox-i2v/lib/python3.11/site-packages/diffusers/loaders/lora_pipeline.py:2451, in CogVideoXLoraLoaderMixin.load_lora_into_transformer(cls, state_dict, transformer, adapter_name, _pipeline):\r\n\r\nif adapter_name in getattr(transformer, \"peft_config\", {}):\r\naise ValueError(\r\n   f\"Adapter name {adapter_name} already in use in the transformer - please select a new adapter name.\"    )\r\n\r\nTypeError: unhashable type: 'list'\r\n```\r\n\r\nNote: in the trained LoRA folders, there is only a `pytorch_lora_weights.safetensors`",
    "url": "https://github.com/huggingface/finetrainers/issues/40",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-16T17:25:21Z",
    "updated_at": "2024-12-03T03:01:23Z",
    "user": "Yuancheng-Xu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 138073,
    "title": "`export()` fails for `full((n,), v)` but succeeds for `ones((n,)) * v` where `v` is dynamic",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nWhen using `torch.full((n,), v)` to create a tensor with a dynamic value, one receives a `Pending unbacked symbols` error. A simple workaround is to use `torch.ones((n,)) * v`, but unless I'm missing something the former should work just as well.\r\n\r\nBelow is a minimal example to reproduce the error:\r\n\r\n```python\r\nimport torch\r\nimport torch._dynamo\r\nimport torch.export\r\n\r\nclass FullConstNDynamicV(torch.nn.Module):\r\n    def forward(self, x):\r\n        n = 7\r\n        v = x[0, 0]\r\n        out = torch.full((n,), v)\r\n        # Replacing the above line with the following will fix export 'Pending unbacked symbols' error:\r\n        # out = torch.ones((n,)) * v\r\n\r\n        return out\r\n\r\ninput_tensor = torch.ones(1, 100)\r\ntorch.export.export(FullConstNDynamicV(), (input_tensor, ))\r\n```\r\n\r\nNote that an example that uses a dynamic value for `n` but non-dynamic `v` does work. I have [a sample notebook available](https://colab.research.google.com/drive/1L5lNvDs94tLj-qPwUzT52IADWY0WacS_?usp=sharing) to review the following cases:\r\n\r\n```\r\nOK: OnesConstNDynamicV\r\nError: FullConstNDynamicV\r\nOK: OnesDynamicNConstV\r\nOK: FullDynamicNConstV\r\nOK: OnesDynamicNDynamicV\r\nError: FullDynamicNDynamicV\r\n```\r\n\r\nWhere OK means the corresponding code was export OK, and Error if it produced an error... It is expected that all modules should be export OK.\r\n\r\n### Versions\r\n\r\nRan in Google Colab. \r\n\r\n```\r\nPyTorch version: 2.4.1+cu121\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 22.04.3 LTS (x86_64)\r\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\r\nClang version: 14.0.0-1ubuntu1.1\r\nCMake version: version 3.30.4\r\nLibc version: glibc-2.35\r\n\r\nPython version: 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] (64-bit runtime)\r\nPython platform: Linux-6.1.85+-x86_64-with-glibc2.35\r\nIs CUDA available: False\r\nCUDA runtime version: 12.2.140\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: Could not collect\r\nNvidia driver version: Could not collect\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.6\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.6\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.6\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.6\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.6\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.6\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.6\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                         x86_64\r\nCPU op-mode(s):                       32-bit, 64-bit\r\nAddress sizes:                        46 bits physical, 48 bits virtual\r\nByte Order:                           Little Endian\r\nCPU(s):                               2\r\nOn-line CPU(s) list:                  0,1\r\nVendor ID:                            GenuineIntel\r\nModel name:                           Intel(R) Xeon(R) CPU @ 2.20GHz\r\nCPU family:                           6\r\nModel:                                79\r\nThread(s) per core:                   2\r\nCore(s) per socket:                   1\r\nSocket(s):                            1\r\n```\n\ncc @ezyang @chauhang @penguinwu @bobrenjc93 @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @rec @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4",
    "url": "https://github.com/pytorch/pytorch/issues/138073",
    "state": "closed",
    "labels": [
      "oncall: pt2",
      "module: dynamic shapes",
      "module: dynamo",
      "oncall: export"
    ],
    "created_at": "2024-10-16T13:29:52Z",
    "updated_at": "2025-03-26T17:56:33Z",
    "user": "kwikwag"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 975,
    "title": "Supporting Multiple Pipelines?",
    "body": "### Question\n\nFirst of all, thank you so much for creating transformers.js! This is a fantastic library, and I had lots of fun building with it!\r\n\r\nI have a question regarding using pipelines API: Would it be possible to start multiple pipelines? For example, instead of using just one pipeline to run inference, can we create a pool of pipelines and push jobs into this pool, potentially better utilize the multi-cores on modern laptops? \r\n\r\nThe goal here is really to understand if there's ways to utilize multi-cores. No worries if not! I just want to understand where the limits are.\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/transformers.js/issues/975",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-16T08:06:44Z",
    "updated_at": "2024-10-21T15:58:20Z",
    "user": "kelayamatoz"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1525,
    "title": "Standardize Chat Prompt Templates to Use Jinja Format",
    "body": "## Describe your feature request\r\n\r\nCurrently, the `chatPromptTemplate` for each model that can be set in env uses **Handlebars** format. However, the `chat_prompt` in the actual model's `tokenizer_config.json` uses **Jinja** format. This inconsistency is causing significant inconvenience. Since **Jinja** is widely used and preferred, it would be beneficial to standardize on **Jinja** format for both `chatPromptTemplate` and `chat_prompt`. This will improve consistency and ease of use for developers.\r\n\r\n## Screenshots (if relevant)\r\n\r\n## Implementation idea\r\n\r\nTo implement this change, the following steps can be taken:\r\n\r\n1. Update Codebase: Update the codebase to handle **Jinja** templates for `chatPromptTemplate`.\r\n\r\n2. Documentation: Update the documentation to reflect this change and provide examples of how to use **Jinja** templates.\r\n\r\n3. Testing: Thoroughly test the changes to ensure compatibility and that all existing templates work correctly with the new format.",
    "url": "https://github.com/huggingface/chat-ui/issues/1525",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-10-16T05:26:12Z",
    "updated_at": "2024-11-20T00:44:16Z",
    "comments": 8,
    "user": "calycekr"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 620,
    "title": "Is there way to offload training memory to DRAM (using FSDP2?) for training Llama3-8B with torchtitan?",
    "body": "I am training Llama3-8B using 2 RTX A6000ada 48GB, but got OOM. Is there way to offload training memory to DRAM (using FSDP2?) for training Llama3-8B with torchtitan?\r\n\r\nThanks!\r\n\r\n***Error message:\r\ntorch.OutOfMemoryError: CUDA out of memory. Tried to allocate 112.00 MiB. GPU 0 has a total capacity of 47.48 GiB of which 92.81 MiB is free. Including non-PyTorch memory, this process has 46.71 GiB memory in use. Of the allocated memory 45.56 GiB is allocated by PyTorch, and 448.27 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)\r\n\r\n***Here is my training config:\r\n\r\n# torchtitan Config.toml\r\n# NOTE: this toml config is a preset for 64 A100 GPUs.\r\n\r\n[job]\r\ndump_folder = \"./outputs\"\r\ndescription = \"Llama 3 8B training\"\r\n\r\n[profiling]\r\nenable_profiling = true\r\nsave_traces_folder = \"profile_trace\"\r\nprofile_freq = 100\r\n\r\n[metrics]\r\nlog_freq = 10\r\nenable_tensorboard = true\r\nsave_tb_folder = \"tb\"\r\n\r\n[model]\r\nname = \"llama3\"\r\nflavor = \"8B\"\r\nnorm_type = \"rmsnorm\"  # layernorm / np_layernorm / rmsnorm / fused_rmsnorm\r\ntokenizer_path = \"./torchtitan/datasets/tokenizer/original/tokenizer.model\"\r\n\r\n[optimizer]\r\nname = \"AdamW\"\r\nlr = 3e-4\r\n\r\n[training]\r\nbatch_size = 2 #1\r\nseq_len = 256 #512 #8192\r\nwarmup_steps = 200  # lr scheduler warm up\r\nmax_norm = 1.0  # grad norm clipping\r\nsteps = 1000\r\ndata_parallel_replicate_degree = 1  #1\r\ndata_parallel_shard_degree = -1 #-1\r\ntensor_parallel_degree = 2 #1\r\ncompile = true\r\ndataset = \"c4\"\r\n\r\n[experimental]\r\npipeline_parallel_degree = 1 #1\r\nenable_async_tensor_parallel = true\r\n\r\n[checkpoint]\r\nenable_checkpoint = false #false\r\nfolder = \"checkpoint\"\r\ninterval_type = \"steps\"\r\ninterval = 500\r\nmodel_weights_only = false\r\nexport_dtype = \"bfloat16\"  #32\r\nasync_mode = \"disabled\" # [\"disabled\", \"async\", \"async_with_pinned_mem\"]\r\n\r\n[activation_checkpoint]\r\nmode = 'selective'  # ['none', 'selective', 'full']\r\nselective_ac_option = 'op'  # 'int' = ac every positive int layer or 'op', ac based on ops policy\r\n\r\n[float8]\r\nenable_float8_linear = true\r\nenable_fsdp_float8_all_gather = true\r\nprecompute_float8_dynamic_scale_for_fsdp = true\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/torchtitan/issues/620",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-15T19:54:17Z",
    "updated_at": "2024-10-28T22:27:50Z",
    "user": "0781532"
  },
  {
    "repo": "pytorch/serve",
    "number": 3348,
    "title": "Getting started guide client samples broken ?",
    "body": "### \ud83d\udc1b Describe the bug\n\nfollowing the getting started guide:\r\n\r\nhttps://github.com/pytorch/serve/blob/master/docs/getting_started.md\r\n\r\ni get following error messages when trying to run the client examples.\r\nAm I doing something wrong?\n\n### Error logs\n\n```\r\nserve$ python -m grpc_tools.protoc --proto_path=frontend/server/src/main/resources/proto/ --python_out=ts_scripts --grpc_python_out=ts_scripts frontend/server/src/main/resources/proto/inference.proto frontend/server/src/main/resources/proto/management.proto\r\ngoogle/rpc/status.proto: File not found.\r\ninference.proto:6:1: Import \"google/rpc/status.proto\" was not found or had errors.\r\ninference.proto:32:14: \"google.rpc.Status\" is not defined.\r\n```\r\n\r\nand\r\n\r\n```\r\nserve$ python ts_scripts/torchserve_grpc_client.py infer densenet161 examples/image_classifier/kitten.jpg\r\nTraceback (most recent call last):\r\n  File \"[..]serve/ts_scripts/torchserve_grpc_client.py\", line 7, in <module>\r\n    import inference_pb2\r\nModuleNotFoundError: No module named 'inference_pb2'\r\n\r\n```\n\n### Installation instructions\n\nfollowed the getting started guide:\r\nhttps://github.com/pytorch/serve/blob/master/docs/getting_started.md\n\n### Model Packaging\n\nfrom getting started guide\n\n### config.properties\n\nfrom getting started guide\n\n### Versions\n\n------------------------------------------------------------------------------------------\r\nEnvironment headers\r\n------------------------------------------------------------------------------------------\r\nTorchserve branch: \r\n\r\ntorchserve==0.12.0\r\ntorch-model-archiver==0.12.0\r\n\r\nPython version: 3.10 (64-bit runtime)\r\nPython executable: /home/nikste/workspace-abnoba/serving_test/venv/bin/python\r\n\r\nVersions of relevant python libraries:\r\ncaptum==0.6.0\r\nnumpy==1.24.3\r\nnvgpu==0.10.0\r\npillow==10.3.0\r\npsutil==5.9.8\r\nrequests==2.32.0\r\ntorch==2.4.0+cu121\r\ntorch-model-archiver==0.12.0\r\ntorch-workflow-archiver==0.2.15\r\ntorchaudio==2.4.0+cu121\r\ntorchserve==0.12.0\r\ntorchvision==0.19.0+cu121\r\nwheel==0.42.0\r\ntorch==2.4.0+cu121\r\n**Warning: torchtext not present ..\r\ntorchvision==0.19.0+cu121\r\ntorchaudio==2.4.0+cu121\r\n\r\nJava Version:\r\n\r\n\r\nOS: Ubuntu 22.04.5 LTS\r\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\r\nClang version: 14.0.0-1ubuntu1.1\r\nCMake version: version 3.30.3\r\n\r\nEnvironment:\r\nlibrary_path (LD_/DYLD_): /usr/local/cuda-11.8/lib64:\r\n\r\n\n\n### Repro instructions\n\ngetting started guide\n\n### Possible Solution\n\nmissing packages in the requirements?",
    "url": "https://github.com/pytorch/serve/issues/3348",
    "state": "open",
    "labels": [],
    "created_at": "2024-10-15T16:47:42Z",
    "updated_at": "2024-12-26T04:00:44Z",
    "comments": 1,
    "user": "nikste"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 201,
    "title": "Full parameter fine-tuning keeps consuming system RAM and lead to crash ",
    "body": "I am using alignment handbook to perform a full parameter fine-tuning of llama3 models with Deepspeed stage 2 on my own dataset which is relatively large (400k+ records). \r\nThe training was performed on a slurm cluster with two nodes (each has 4 H100 GPUs).\r\nI have noticed that during the training, the system memory utilization keeps increasing even though I set torch_empty_cache_steps=500. \r\nI wonder if there is something wrong with the HF trainer? Any suggestions how to fix/debug? \r\nThere is also a similar issue at https://github.com/huggingface/transformers/issues/30119\r\n\r\n- Below is the system ram usage report from wandb:\r\n\r\n![Screenshot 2024-10-15 at 10 41 49\u202fAM](https://github.com/user-attachments/assets/1201d5ad-26ee-4d15-81c1-9ef33128bba0)\r\n![Screenshot 2024-10-15 at 10 41 46\u202fAM](https://github.com/user-attachments/assets/200b887c-38bd-40f9-a160-e61c14c25870)\r\n![Screenshot 2024-10-15 at 10 41 43\u202fAM](https://github.com/user-attachments/assets/4fee96b4-fd08-4073-a17a-dd7d4cfd8e34)\r\n\r\n\r\n\r\n\r\n\r\n- my config:\r\n```yaml\r\n# Model arguments\r\nmodel_name_or_path: ~/models/Meta-Llama-3-8B\r\nmodel_revision: main\r\ntorch_dtype: bfloat16\r\nattn_implementation: flash_attention_2\r\n\r\n# Data training arguments\r\nchat_template: \"{{ bos_token }}{% if messages[0]['role'] == 'system' %}{% set system_message = '### System Instruction: ' + messages[0]['content'] | trim + '' %}{% set messages = messages[1:] %}{% else %}{% set system_message = '' %}{% endif %}{{ bos_token + system_message }}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ '### Context: ' + message['content'] | trim + '' }}{% elif message['role'] == 'assistant' %}{{ '### Result: ' + message['content'] | trim + ' ' + eos_token }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '### Result: ' }}{% endif %}\"\r\ndataset_mixer:\r\n  ~/data/processed_data_open_sourced_xml_to_text/merged_open_sourced_xml_to_text_dataset: 1.0\r\ndataset_splits:\r\n- train_sft\r\n- test_sft\r\npreprocessing_num_workers: 4\r\ndataloader_num_workers: 2\r\n\r\n# SFT trainer config\r\nbf16: true\r\ndo_eval: true\r\n# evaluation_strategy: epoch\r\neval_strategy: epoch\r\nmax_grad_norm: 1.0\r\n# gradient_accumulation_steps: 16\r\ngradient_checkpointing: true\r\ngradient_checkpointing_kwargs:\r\n  use_reentrant: False\r\nlog_level: info\r\nlogging_steps: 5\r\nlogging_strategy: steps\r\nlearning_rate: 2.0e-05\r\nlr_scheduler_type: cosine_with_min_lr # cosine_with_min_lr\r\nlr_scheduler_kwargs:\r\n  min_lr: 5e-6\r\noptim: adamw_torch # adamw_torch paged_adamw_32bit galore_adamw lion_32bit\r\noptim_target_modules: all-linear\r\nweight_decay: 0.01\r\nmax_seq_length: 12800\r\npacking: false\r\ndataset_num_proc: 16\r\nmax_steps: -1\r\nnum_train_epochs: 1\r\noutput_dir: /~/alignment-handbook/experiments/models/llama3\r\noverwrite_output_dir: true\r\nper_device_eval_batch_size: 1\r\nper_device_train_batch_size: 1 # this is per device, you need to manual calculate global batch by per device * gas * gpu * node\r\ngradient_accumulation_steps: 8\r\npush_to_hub: false\r\nremove_unused_columns: true\r\nreport_to:\r\n- wandb # - tensorboard\r\nsave_strategy: \"steps\"\r\nsave_steps: 500\r\ntorch_empty_cache_steps: 500\r\nsave_total_limit: 30\r\nseed: 42\r\nwarmup_ratio: 0.1\r\n```\r\n\r\n- training launch script (brief version)\r\n```sh\r\n\r\n#!/bin/bash\r\n\r\n#SBATCH --job-name=train\r\n#SBATCH --nodes=2\r\n#SBATCH --ntasks-per-node=1\r\n#SBATCH --gpus-per-node=4\r\n#SBATCH --gpus-per-task=4\r\n#SBATCH --cpus-per-task=32\r\n#SBATCH --mem=512gb\r\n#SBATCH --time=96:00:00\r\n#SBATCH --output=output\r\n#SBATCH --partition=batch\r\n\r\n# apptainer\r\nCONTAINER=pt2402.sif\r\nTRAIN_CONF=config.yaml\r\nDEEPSPEED_CONF=deepspeed_zs2.json\r\nCMD=torchrun \\\r\n    --nproc_per_node=$SLURM_GPUS_ON_NODE  \\\r\n    --nnode=$SLURM_JOB_NUM_NODES \\\r\n    --node_rank=$SLURM_NODEID  \\\r\n    --master_addr=$PRIMARY \\\r\n    --master_port=$PRIMARY_PORT \\\r\n    ${ROOT}/scripts/run_sft.py \\\r\n    $TRAIN_CONF \\\r\n    --deepspeed=$DEEPSPEED_CONF \\\r\n    --tee=3\r\n\r\nsrun --jobid $SLURM_JOB_ID apptainer exec --nv $CONTAINER bash -c $CMD\r\n```\r\n\r\n- deepspeed config:\r\n```json\r\n{\r\n    \"fp16\": {\r\n        \"enabled\": false,\r\n        \"loss_scale\": 0,\r\n        \"auto_cast\": false,\r\n        \"loss_scale_window\": 1000,\r\n        \"initial_scale_power\": 16,\r\n        \"hysteresis\": 2,\r\n        \"consecutive_hysteresis\": false,\r\n        \"min_loss_scale\": 1\r\n    },\r\n\r\n    \"bf16\": {\r\n        \"enabled\": true\r\n    },\r\n\r\n    \"optimizer\": {\r\n        \"type\": \"AdamW\",\r\n        \"params\": {\r\n            \"lr\": \"auto\",\r\n            \"weight_decay\": \"auto\",\r\n            \"betas\": \"auto\",\r\n            \"eps\": \"auto\",\r\n            \"torch_adam\": true,\r\n            \"adam_w_mode\": true\r\n        }\r\n    },\r\n\r\n    \"scheduler\": {\r\n        \"type\": \"WarmupDecayLR\",\r\n        \"params\": {\r\n            \"warmup_min_lr\": 1e-8,\r\n            \"warmup_max_lr\": \"auto\",\r\n            \"warmup_num_steps\": \"auto\",\r\n            \"total_num_steps\": \"auto\"\r\n        }\r\n    }",
    "url": "https://github.com/huggingface/alignment-handbook/issues/201",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-15T15:04:18Z",
    "updated_at": "2024-10-17T18:56:53Z",
    "comments": 2,
    "user": "xiyang-aads-lilly"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1522,
    "title": "Add example prompt field to tools",
    "body": "## Describe your feature request\r\n\r\nThis lets the user specify a prompt that would call the tool. It can be shown as a demo if you're not sure how to use a tool. \r\n\r\nWe should show it somewhere in the UI so the user can easily start a conversation from that demo. \r\n\r\nIt can also be used for validating that a tool works. (run the example server-side, if the tool does not get called or does not return an output then something is wrong and dont let users publish it)\r\n\r\n## Implementation idea\r\n\r\nStoring the prompt itself is straightforward since you can just store it as a string. Most tools use file inputs though so we should ideally also support that, which means storing example files in the DB.",
    "url": "https://github.com/huggingface/chat-ui/issues/1522",
    "state": "open",
    "labels": [
      "enhancement",
      "front",
      "back",
      "tools"
    ],
    "created_at": "2024-10-15T12:42:42Z",
    "updated_at": "2024-10-15T12:42:43Z",
    "comments": 0,
    "user": "nsarrazin"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 619,
    "title": "Question about torch.compile has better throughput with 128-GPUs than 8-GPUs",
    "body": "Thank you for publishing the paper. I hope to get your answers to the following questions.\uff1a\r\nNormally, the training speed will decline as the number of GPUs increases. However, in the paper, with the torch.compile technology, the speed with 128 GPUs is better than that with 8 GPUs.\r\n![compile](https://github.com/user-attachments/assets/d6ea4dc3-6dd1-4286-a5d4-aee754b22c55)\r\n",
    "url": "https://github.com/pytorch/torchtitan/issues/619",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-15T09:14:25Z",
    "updated_at": "2024-11-19T21:37:23Z",
    "user": "dz1iang"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2060,
    "title": "Support int8 tinyllama tflite  export.",
    "body": "### Feature request\n\ntflite exporter for decoder only llms such as tinyllama\n\n### Motivation\n\nSome platforms only support full int8 op and full int8 tflite models can be deployed. Is there a support plan? Looking forward to your reply, thank you.\n\n### Your contribution\n\nno",
    "url": "https://github.com/huggingface/optimum/issues/2060",
    "state": "closed",
    "labels": [
      "feature-request",
      "Stale"
    ],
    "created_at": "2024-10-15T03:25:54Z",
    "updated_at": "2024-12-09T02:11:36Z",
    "comments": 1,
    "user": "hayyaw"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9673,
    "title": "high cpu usage when loading multiple loras at once.",
    "body": "### Describe the bug\r\n\r\nHi, I was making a synthesis system using celery and diffusers, \r\nand I found the cpu usage of program goes high when loading loras,\r\nit is okay when I use just one worker, but it becomes hard when using 8 workers at once.\r\n\r\nIt happens when lora loaded first time, and I think it is because of peft, because I didn't get any trouble before peft support.\r\n\r\nso Is there any way to lower cpu usage when loading loras? or is there any way not to use peft when sdxl lora loading?\r\n\r\n### Reproduction\r\n\r\n```python\r\n# test lora downloaded from https://civitai.com/models/150986/blueprintify-sd-xl-10\r\n\r\nfrom diffusers import AutoPipelineForText2Image\r\nimport torch\r\nfrom uuid import uuid4\r\nfrom tqdm import tqdm\r\n\r\npipeline = AutoPipelineForText2Image.from_pretrained(\"stabilityai/stable-diffusion-xl-base-1.0\", torch_dtype=torch.float16).to(\"cuda\")\r\nnum_of_iterations = 10\r\n\r\n\r\nfor _ in tqdm(range(num_of_iterations)):\r\n    lora_name = str(uuid4().hex)\r\n    pipeline.load_lora_weights(\r\n        \"./test\",\r\n        weight_name=\"lora.safetensors\",\r\n        adapter_name=lora_name,\r\n        low_cpu_mem_usage=True,\r\n    )\r\n    pipeline.set_adapters([lora_name], adapter_weights=[1.0])\r\n```\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\ntorch==2.1.1+cu121\r\ndiffusers==0.30.3\r\naccelerate==0.32.1\r\npeft==0.13.0\r\ntransformers==4.42.3\r\npython==3.9.5\r\n\r\n### Who can help?\r\n\r\n@sayakpaul",
    "url": "https://github.com/huggingface/diffusers/issues/9673",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-10-15T01:49:37Z",
    "updated_at": "2024-10-15T05:07:40Z",
    "comments": 5,
    "user": "gudwns1215"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7226,
    "title": "Add R as a How to use from the Polars (R) Library as an option",
    "body": "### Feature request\r\n\r\nThe boiler plate code to access a dataset via the hugging face file system is very useful. Please addd \r\n\r\n\r\n## Add Polars (R) option\r\nThe equivailent code works, because the [Polars-R](https://github.com/pola-rs/r-polars) wrapper has hugging faces funcitonaliy as well.\r\n\r\n```r\r\nlibrary(polars)\r\n\r\ndf <- pl$read_parquet(\"hf://datasets/SALURBAL/core__admin_cube_public/core__admin_cube_public.parquet\")\r\n```\r\n\r\n## Polars (python) option\r\n![image](https://github.com/user-attachments/assets/8f1bcd19-e578-4b18-b324-7cc00b80ac0a)\r\n\r\n\r\n## Libraries Currently\r\n\r\n![image](https://github.com/user-attachments/assets/0cf50063-f9db-443c-97b4-3ef0664b6e6e)\r\n\r\n\r\n\r\n\r\n### Motivation\r\n\r\nThere are many data/analysis/research/statistics teams (particularly in academia and pharma) that use R as the default language. R has great integration with most of the newer data techs (arrow, parquet, polars) and having this included could really help in bringing this community into the hugging faces ecosystem.\r\n\r\n**This is a small/low-hanging-fruit front end change but would make a big impact expanding the community**\r\n\r\n### Your contribution\r\n\r\nI am not sure which repositroy this should be in, but I have experience in R, Python and JS and happy to submit a PR in the appropriate repository. ",
    "url": "https://github.com/huggingface/datasets/issues/7226",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-10-14T19:56:07Z",
    "updated_at": "2024-10-14T19:57:13Z",
    "user": "ran-codes"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 472,
    "title": "How to resume training with a higher offline steps than initial set up?",
    "body": "### System Info\n\n```Shell\n- `lerobot` version: unknown\r\n- Platform: Linux-6.8.0-45-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.13\r\n- Huggingface_hub version: 0.25.2\r\n- Dataset version: 3.0.1\r\n- Numpy version: 1.26.4\r\n- PyTorch version (GPU?): 2.4.1 (True)\r\n- Cuda version: 11080\r\n- Using GPU in script?: <fill in>\n```\n\n\n### Information\n\n- [X] One of the scripts in the examples/ folder of LeRobot\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\n1. python lerobot/scripts/train.py \\\r\n    hydra.run.dir=outputs/train/pusht\\\r\n    device=cuda\r\n    env=pusht_act \\\r\n    env.task=pusht-v0 \\\r\n    dataset_repo_id= takuzennn/pusht_v0 \\\r\n    policy=act_pusht \\\r\n    training.eval_freq=2000 \\\r\n    training.log_freq=250 \\\r\n    training.offline_steps=300000 \\\r\n    training.save_model=true \\\r\n    training.save_freq=2000 \\\r\n    eval.n_episodes=30 \\\r\n    eval.batch_size=12 \\\r\n    wandb.enable=true \\\r\n\r\n2. python lerobot/scripts/train.py \\\r\n    hydra.run.dir=outputs/train/pusht \\\r\n    training.offline_steps=800000 \\\r\n    resume=true\n\n### Expected behavior\n\nI expect it to stop at 800000 steps, but it still stops at 300000 steps.",
    "url": "https://github.com/huggingface/lerobot/issues/472",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-13T19:28:04Z",
    "updated_at": "2024-10-22T05:51:42Z",
    "user": "Takuzenn"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 973,
    "title": "I would like to help ",
    "body": "### Question\r\n\r\nHi, I would like to help with the project. Is there anything that needs to be done?\r\n\r\nCurrently I found an issue, probably in ONNXRuntime. I will look into it next week. \r\n\r\nHere is example of WebGPU Whisper that works with mobile platforms including iPhone and Android: https://github.com/FL33TW00D/whisper-turbo\r\n\r\nCurrent Transformers.js solution have some bugs. It will crash after model loading, page will restart on mobile device. I tried to connect remote debugging to Chrome PC via some ios remote debugging bridge, but it just restarts and I cannot get any logs. Any help how to get logs would be appreciated as I don't have much experience with iOS Safari debugging and I also happen to have Windows PC.\r\n\r\nHere is photo from Safari - iPhone, you can see it does not support float32, but only float16. I suspect this is the issue and there are like 3 separate pull requests in ONNX to fix something around float16 support. But I did not have time to merge all current ONNX PRs and build it yet. First I would like to see some log with actual error\r\n![webgpu](https://github.com/user-attachments/assets/f1688652-3666-4619-a8ee-3f5949d5833a)\r\n\r\nThis is what I will be working on next weekend.\r\n\r\nIf there is something else I should look into or help with testing, let me know.\r\n\r\nThank you for great project and great work! :-)\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/973",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-12T20:29:07Z",
    "updated_at": "2024-10-14T19:37:51Z",
    "user": "cyberluke"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9661,
    "title": "from_pretrained: filename argument removed?",
    "body": "**What API design would you like to have changed or added to the library? Why?**\r\n\r\nI do believe there was a `filename` argument in the past to load a specific checkpoint in a huggingface repository. It appears that this has been removed with no replacement.\r\n\r\n**What use case would this enable or better enable? Can you give us a code example?**\r\n\r\nIt's impossible to use any of the checkpoints here https://huggingface.co/SG161222/Realistic_Vision_V6.0_B1_noVAE/tree/main without manually downloading and using `from_single_file`. The checkpoint I want to load is called `Realistic_Vision_V6.0_NV_B1_fp16.safetensors`, but it seems that the procedure in `from_pretrained` tries to force and impose a specific name on the user. I understand the need for standards, but many have not respected the standards in the past and now these models cannot be used without additional work.",
    "url": "https://github.com/huggingface/diffusers/issues/9661",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-10-12T20:02:31Z",
    "updated_at": "2024-11-13T00:37:52Z",
    "comments": 4,
    "user": "oxysoft"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1297,
    "title": "Can torchat call /use the models already downloaded under Ollama?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nCan torchat pick up the models that have already been downloaded by Ollama.  Is there a way to use them without downloading them again with a hf user id?\r\n\r\n`PS C:\\Users\\siva> ollama list\r\n\r\nNAME                    ID              SIZE       \r\nqwen2.5-coder:latest    87098ba7390d    4.7 GB     \r\nllama3.2:latest         a80c4f17acd5    2.0 GB     \r\n`\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### RFC (Optional)\n\n_No response_",
    "url": "https://github.com/pytorch/torchchat/issues/1297",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-12T16:35:12Z",
    "updated_at": "2024-10-15T15:22:03Z",
    "comments": 1,
    "user": "sivaramn"
  },
  {
    "repo": "huggingface/transformers",
    "number": 34107,
    "title": "How to specific customized force_token_ids in whisper",
    "body": "```\r\nValueError: A custom logits processor of type <class 'transformers.generation.logits_process.ForceTokensLogitsProcessor'> with values <transformers.generation.logits_process.ForceTokensLogitsProcessor object at 0x7f4230cfac50> has been passed to `.generate()`, but it has already been created with the values <transformers.generation.logits_process.ForceTokensLogitsProcessor object at 0x7f422829c510>. <transformers.generation.logits_process.ForceTokensLogitsProcessor object at 0x7f422829c510> has been created by passing the corresponding arguments to generate or by the model's config default values. If you just want to change the default values of logits processor consider passing them as arguments to `.generate()` instead of using a custom logits processor\r\n```\r\n\r\nthis way don't work:\r\n\r\n```\r\ninputs = inputs.to(self.model.dtype)\r\n        with torch.no_grad():\r\n            if forced_decoder_ids is not None:\r\n                generated_ids = self.model.generate(\r\n                    inputs, forced_decoder_ids=forced_decoder_ids\r\n                )\r\n            else:\r\n                generated_ids = self.model.generate(inputs)\r\n```",
    "url": "https://github.com/huggingface/transformers/issues/34107",
    "state": "closed",
    "labels": [
      "Generation",
      "Audio"
    ],
    "created_at": "2024-10-12T07:34:38Z",
    "updated_at": "2024-12-28T08:06:48Z",
    "user": "MonolithFoundation"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 610,
    "title": "[Compile] Understand why FSDP2 saves both SDPA out and wo in for bwd",
    "body": "With FSDP2 and transformer block compile, `torch.compile` saves both the SDPA output and the contiguous transposed tensor for backward:\r\nhttps://github.com/pytorch/torchtitan/blob/7e93822e402c3f470bb7ddb925bbc43701bf8573/torchtitan/models/llama/model.py#L210-L213\r\nHowever, with simpleFSDP with full model compile, `torch.compile` only saves the SDPA output. This means that FSDP2 saves an extra `(bs, seq_len, dim)` tensor per transformer block.\r\n\r\nTraditionally, SDPA output is required for SDPA backward, and the input to `wo` is required for the `wo` backward. However, it may be profitable memory-wise to recompute one from the other (e.g. recompute SDPA output from undo-ing the transpose of `wo` input).\r\n\r\nOne question is why the activations saved for backward differ between simple FSDP with full model compile vs. FSDP2 with transformer block compile.",
    "url": "https://github.com/pytorch/torchtitan/issues/610",
    "state": "open",
    "labels": [
      "question",
      "module: torch.compile"
    ],
    "created_at": "2024-10-11T15:29:04Z",
    "updated_at": "2025-12-10T18:30:41Z",
    "user": "awgu"
  },
  {
    "repo": "pytorch/ao",
    "number": 1057,
    "title": "How to use float8 with SM89 hardware - i.e. NVIDIA A6000 ADA?",
    "body": "I am running torchao: 0.5 and torch: '2.5.0a0+b465a5843b.nv24.09' on an NVIDIA A6000 ADA card (sm89) which supports FP8.\r\n\r\nI ran the generate.py code from the benchmark:\r\n\r\n    python generate.py --checkpoint_path $CHECKPOINT_PATH --compile --compile_prefill --write_result /root/benchmark_results__baseline.txt\r\n\r\n> Average tokens/sec: 57.01\r\n> Average Bandwidth: 855.74 GB/s\r\n> Peak Memory Usage: 16.19 GB\r\n> Model Size: 15.01 GB\r\n\r\n> 20241011143042, tok/s= 57.01, mem/s= 855.74 GB/s, peak_mem=16.19 GB, model_size=15.01 GB quant: None, mod: Meta-Llama-3-8B, kv_quant: False, compile: True, compile_prefill: True, dtype: torch.bfloat16, device: cuda repro: python generate.py --checkpoint_path /models/Meta-Llama-3-8B/consolidated.00.pth --device cuda --precision torch.bfloat16 --compile --compile_prefill --num_samples 5 --max_new_tokens 200 --top_k 200 --temperature 0.8\r\n\r\n    python generate.py --checkpoint_path $CHECKPOINT_PATH --compile --compile_prefill --quantization float8wo --write_result /root/benchmark_results__float8wo.txt`\r\n\r\n> Average tokens/sec: 57.00\r\n> Average Bandwidth: 855.62 GB/s\r\n> Peak Memory Usage: 16.19 GB\r\n> Model Size: 15.01 GB\r\n\r\n> 20241011143316, tok/s= 57.00, mem/s= 855.62 GB/s, peak_mem=16.19 GB, model_size=15.01 GB quant: float8wo, mod: Meta-Llama-3-8B, kv_quant: False, compile: True, compile_prefill: True, dtype: torch.bfloat16, device: cuda repro: python generate.py\r\n--quantization float8wo --checkpoint_path /models/Meta-Llama-3-8B/consolidated.00.pth --device cuda --precision torch.bfloat16 --compile --compile_prefill --num_samples 5 --max_new_tokens 200 --top_k 200 --temperature 0.8\r\n\r\nThe `float8wo` flag does not appear to be doing anything. Am I missing a step? Thanks!",
    "url": "https://github.com/pytorch/ao/issues/1057",
    "state": "closed",
    "labels": [
      "question",
      "float8"
    ],
    "created_at": "2024-10-11T14:40:38Z",
    "updated_at": "2025-01-24T18:24:46Z",
    "user": "vgoklani"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 137779,
    "title": "Flex attention with mask depending on queries and keys lengths (or how to implement `causal_lower_right` masking)",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI tried to implement the `causal_lower_right` masking in flex attention. This requires the masking function to know the difference in lengths of keys and queries:\r\n```python\r\nQL = query.size(2)\r\nKL = key.size(2)\r\ndef causal_mask(b, h, q_idx, kv_idx):\r\n    return q_idx - QL >= kv_idx - KL\r\n```\r\n\r\nIt is easy to use it with flex attention and it works on the first call to flex attention (regardless of using `torch.compile` on it or not). However, it fails on a call with  differently shaped `query` and `key` matrices.\r\n\r\nI don't know if the usage of queries and keys shape is allowed. If it is, then the second call shouldn't fail. If it is not allowed, then how can one implement `causal_lower_right` masking, which requires knowing the shapes?\r\n\r\nFull reproduction code:\r\n```python\r\n\r\nimport torch\r\nfrom torch.nn.attention.flex_attention import create_block_mask, flex_attention\r\n\r\ndef causal_attention(\r\n    query,\r\n    key,\r\n    value,\r\n):\r\n    # all shapes  Bs x Nh x Len x Dim\r\n    B = query.size(0)\r\n    H = query.size(1)\r\n    QL = query.size(2)\r\n    KL = key.size(2)\r\n\r\n    def causal_mask(b, h, q_idx, kv_idx):\r\n        return q_idx - QL >= kv_idx - KL\r\n\r\n    block_mask = create_block_mask(causal_mask, B, H, QL, KL, device=query.device)\r\n    return flex_attention(\r\n        query,\r\n        key,\r\n        value,\r\n        None,\r\n        block_mask,\r\n    )\r\n\r\n\r\ndef test(ql, kl):\r\n    bs = 32\r\n    nh = 8\r\n    hd = 64\r\n    q = torch.rand(\r\n        bs, nh, ql, hd, dtype=torch.bfloat16, device=\"cuda\", requires_grad=True\r\n    )\r\n    k = torch.rand(\r\n        bs, nh, kl, hd, dtype=torch.bfloat16, device=\"cuda\", requires_grad=True\r\n    )\r\n    v = torch.rand(\r\n        bs, nh, kl, hd, dtype=torch.bfloat16, device=\"cuda\", requires_grad=True\r\n    )\r\n    causal_attention(q, k, v)\r\n    print(f\"test({ql}, {kl}) worked\")\r\n\r\n\r\nprint(\"torch.__version__\", torch.__version__)\r\n\r\n# First calls always succeed.\r\ntest(512, 512)\r\ntest(512, 512)\r\n# These calls fail, unless the above are commented out. \r\ntest(512, 1024)\r\ntest(512, 1024)\r\ntest(512, 512)\r\n```\r\n\r\nTraceback:\r\n```\r\ntorch.__version__ 2.6.0.dev20241009\r\ntest(512, 512) worked\r\ntest(512, 512) worked\r\nTraceback (most recent call last):\r\n  File \"/home/janek/projects/llm_ng/flex_trouble.py\", line 52, in <module>\r\n    test(512, 1024)\r\n  File \"/home/janek/projects/llm_ng/flex_trouble.py\", line 42, in test\r\n    causal_attention(q, k, v)\r\n  File \"/home/janek/projects/llm_ng/flex_trouble.py\", line 20, in causal_attention\r\n    return flex_attention(\r\n  File \"/mnt/scratch/janek/pixi/babydragon-12050631407633866471/envs/nightly/lib/python3.10/site-packages/torch/nn/attention/flex_attention.py\", line 1113, in flex_attention\r\n    out, lse = torch.compile(\r\n  File \"/mnt/scratch/janek/pixi/babydragon-12050631407633866471/envs/nightly/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py\", line 487, in _fn\r\n    return fn(*args, **kwargs)\r\n  File \"/mnt/scratch/janek/pixi/babydragon-12050631407633866471/envs/nightly/lib/python3.10/site-packages/torch/nn/attention/flex_attention.py\", line 1100, in _flex_attention_hop_wrapper\r\n    def _flex_attention_hop_wrapper(*args, **kwargs):\r\n  File \"/mnt/scratch/janek/pixi/babydragon-12050631407633866471/envs/nightly/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py\", line 654, in _fn\r\n    return fn(*args, **kwargs)\r\n  File \"<eval_with_key>.9\", line 28, in forward\r\n  File \"/mnt/scratch/janek/pixi/babydragon-12050631407633866471/envs/nightly/lib/python3.10/site-packages/torch/_higher_order_ops/flex_attention.py\", line 113, in __call__\r\n    raise RuntimeError(\"Other buffers must be tensors.\")\r\nRuntimeError: Other buffers must be tensors.\r\n```\r\n\r\n\r\n### Versions\r\n\r\nCollecting environment information...\r\nPyTorch version: 2.6.0.dev20241009\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.4\r\nROCM used to build PyTorch: N/A\r\n\r\ncc @zou3519 @bdhirsh @penguinwu @yf225 @Chillee @drisspg @yanboliang @BoyuanFeng @ezyang @chauhang @ydwu4",
    "url": "https://github.com/pytorch/pytorch/issues/137779",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: pt2-dispatcher",
      "module: flex attention"
    ],
    "created_at": "2024-10-11T13:21:40Z",
    "updated_at": "2024-11-12T00:12:28Z",
    "user": "janchorowski"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 25,
    "title": "how to fix it ? training/cogvideox_text_to_video_lora.py FAILED",
    "body": "### System Info / \u7cfb\u7d71\u4fe1\u606f\n\ncuda11.8\r\nx2 3090\r\nlinux ubuntu 22.04 lts\r\npytorch2.4\r\n\r\n\n\n### Information / \u95ee\u9898\u4fe1\u606f\n\n- [X] The official example scripts / \u5b98\u65b9\u7684\u793a\u4f8b\u811a\u672c\n- [X] My own modified scripts / \u6211\u81ea\u5df1\u4fee\u6539\u7684\u811a\u672c\u548c\u4efb\u52a1\n\n### Reproduction / \u590d\u73b0\u8fc7\u7a0b\n\nandb: You can sync this run to the cloud by running:\r\nwandb: wandb sync /home/dev_ml/cogvideox-factory/wandb/offline-run-20241011_154425-t76nveyh\r\nwandb: Find logs at: wandb/offline-run-20241011_154425-t76nveyh/logs\r\n[rank0]:I1011 15:44:57.956000 124307873129088 torch/_dynamo/utils.py:335] TorchDynamo compilation metrics:\r\n[rank0]:I1011 15:44:57.956000 124307873129088 torch/_dynamo/utils.py:335] Function, Runtimes (s)\r\n[rank0]:V1011 15:44:57.956000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats constrain_symbol_range: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0)\r\n[rank0]:V1011 15:44:57.956000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats evaluate_expr: CacheInfo(hits=0, misses=0, maxsize=256, currsize=0)\r\n[rank0]:V1011 15:44:57.957000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats _simplify_floor_div: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0)\r\n[rank0]:V1011 15:44:57.957000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats _maybe_guard_rel: CacheInfo(hits=0, misses=0, maxsize=256, currsize=0)\r\n[rank0]:V1011 15:44:57.957000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats _find: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0)\r\n[rank0]:V1011 15:44:57.957000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats has_hint: CacheInfo(hits=0, misses=0, maxsize=256, currsize=0)\r\n[rank0]:V1011 15:44:57.957000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats size_hint: CacheInfo(hits=0, misses=0, maxsize=256, currsize=0)\r\n[rank0]:V1011 15:44:57.957000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats simplify: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0)\r\n[rank0]:V1011 15:44:57.957000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats _update_divisible: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0)\r\n[rank0]:V1011 15:44:57.957000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats replace: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0)\r\n[rank0]:V1011 15:44:57.957000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats _maybe_evaluate_static: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0)\r\n[rank0]:V1011 15:44:57.958000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats get_implications: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0)\r\n[rank0]:V1011 15:44:57.958000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats get_axioms: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0)\r\n[rank0]:V1011 15:44:57.958000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats safe_expand: CacheInfo(hits=0, misses=0, maxsize=256, currsize=0)\r\n[rank0]:V1011 15:44:57.958000 124307873129088 torch/fx/experimental/symbolic_shapes.py:116] lru_cache_stats uninteresting_files: CacheInfo(hits=0, misses=0, maxsize=None, currsize=0)\r\nW1011 15:45:01.515000 129677780091520 torch/distributed/elastic/multiprocessing/api.py:858] Sending process 177223 closing signal SIGTERM\r\nE1011 15:45:02.282000 129677780091520 torch/distributed/elastic/multiprocessing/api.py:833] failed (exitcode: 1) local_rank: 0 (pid: 177222) of binary: /home/dev_ml/cogvideox-factory/venv/bin/python3.10\r\nTraceback (most recent call last):\r\n  File \"/home/dev_ml/cogvideox-factory/venv/bin/accelerate\", line 8, in <module>\r\n    sys.exit(main())\r\n  File \"/home/dev_ml/cogvideox-factory/venv/lib/python3.10/site-packages/accelerate/commands/accelerate_cli.py\", line 48, in main\r\n    args.func(args)\r\n  File \"/home/dev_ml/cogvideox-factory/venv/lib/python3.10/site-packages/accelerate/commands/launch.py\", line 1159, in launch_command\r\n    multi_gpu_launcher(args)\r\n  File \"/home/dev_ml/cogvideox-factory/venv/lib/python3.10/site-packages/accelerate/commands/launch.py\", line 793, in multi_gpu_launcher\r\n    distrib_run.run(args)\r\n  File \"/home/dev_ml/cogvideox-factory/venv/lib/python3.10/site-packages/torch/distributed/run.py\", line 892, in run\r\n    elastic_launch(\r\n  File \"/home/dev_ml/cogvideox-factory/venv/lib/python3.10/site-packages/torch/distributed/launcher/api.py\", line 133, in __call__\r\n    return launch_agent(self._config, self._entrypoint, list(args))\r\n  File \"/home/dev_ml/cogvideox-factory/venv/lib/python3.10/site-packages/torch/distributed/launcher/api.py\", line 264, in launch_agent\r\n    raise ChildFailedError(\r\ntorch.distributed.elastic.multiprocessing.errors.ChildFailedError: \r\n============================================================\r\ntraining/cogvideox_text_to_video_lora.py FAILED\r\n---------------------------------",
    "url": "https://github.com/huggingface/finetrainers/issues/25",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-11T08:49:23Z",
    "updated_at": "2024-12-23T07:40:41Z",
    "user": "D-Mad"
  },
  {
    "repo": "huggingface/finetrainers",
    "number": 22,
    "title": "What resolution size is recommended for MP4 videos? What should the bitrate be set to? Should the video use H.264 or H.265 encoding?",
    "body": "About Dataset Preparation, \r\nWhat resolution size is recommended for MP4 videos? What should the bitrate be set to? Should the video use H.264 or H.265 encoding?\r\nexample\uff1a 1280X720, 5mbps below. recommended  H.264 encoder.\r\n\r\nIs any suggestion here?",
    "url": "https://github.com/huggingface/finetrainers/issues/22",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-11T05:12:57Z",
    "updated_at": "2024-10-14T07:20:36Z",
    "user": "Erwin11"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 3156,
    "title": "how to load model with fp8 precision for inference?",
    "body": "### System Info\n\n```Shell\nis it posible to load the model using accelerate library with fp8 inference?\r\ni have H100 gpu accesses.\n```\n\n\n### Information\n\n- [X] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [X] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\n```\r\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\r\n\r\nmodel_name = \"Qwen/Qwen2.5-72B-Instruct\"\r\n\r\nmodel = AutoModelForCausalLM.from_pretrained(\r\n    model_name,\r\n    torch_dtype=\"auto\",\r\n    device_map=\"auto\"\r\n)\r\ntokenizer = AutoTokenizer.from_pretrained(model_name)\r\n\r\nprompt = \"Give me a short introduction to large language model.\"\r\nmessages = [\r\n    {\"role\": \"system\", \"content\": \"You are Qwen, created by Alibaba Cloud. You are a helpful assistant.\"},\r\n    {\"role\": \"user\", \"content\": prompt}\r\n]\r\ntext = tokenizer.apply_chat_template(\r\n    messages,\r\n    tokenize=False,\r\n    add_generation_prompt=True\r\n)\r\nmodel_inputs = tokenizer([text], return_tensors=\"pt\").to(model.device)\r\n\r\ngenerated_ids = model.generate(\r\n    **model_inputs,\r\n    max_new_tokens=512\r\n)\r\ngenerated_ids = [\r\n    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)\r\n]\r\n\r\nresponse = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]\r\n\r\n```\n\n### Expected behavior\n\n...",
    "url": "https://github.com/huggingface/accelerate/issues/3156",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-11T04:31:47Z",
    "updated_at": "2024-12-02T15:07:58Z",
    "user": "imrankh46"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9643,
    "title": "Flux does not support multiple Controlnets?",
    "body": "### Describe the bug\r\n\r\nI'm encountering an issue with the FluxControlNetPipeline. The `controlnet` parameter is supposed to accept a `List[FluxControlNetModel]`. However, when I attempt to execute my code, I run into the following error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/opt/tiger/test_1/h.py\", line 8, in <module>\r\n    pipe = FluxControlNetPipeline.from_pretrained('/mnt/bn/x/sd_models/flux_schnell/', controlnet=controlnet, torch_dtype=torch.bfloat16).to(\"cuda\")\r\n  File \"/opt/tiger/miniconda3/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py\", line 114, in _inner_fn\r\n    return fn(*args, **kwargs)\r\n  File \"/opt/tiger/miniconda3/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py\", line 940, in from_pretrained\r\n    model = pipeline_class(**init_kwargs)\r\n  File \"/opt/tiger/miniconda3/lib/python3.10/site-packages/diffusers/pipelines/flux/pipeline_flux_controlnet.py\", line 206, in __init__\r\n    self.register_modules(\r\n  File \"/opt/tiger/miniconda3/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py\", line 162, in register_modules\r\n    library, class_name = _fetch_class_library_tuple(module)\r\n  File \"/opt/tiger/miniconda3/lib/python3.10/site-packages/diffusers/pipelines/pipeline_loading_utils.py\", line 731, in _fetch_class_library_tuple\r\n    library = not_compiled_module.__module__.split(\".\")[0]\r\nAttributeError: 'list' object has no attribute '__module__'. Did you mean: '__mul__'?\r\n```\r\n\r\n### Reproduction\r\n\r\n```\r\nimport torch\r\nfrom diffusers import FluxControlNetPipeline, FluxControlNetModel\r\n\r\ncontrolnet = [\r\n    FluxControlNetModel.from_pretrained(\"InstantX/FLUX.1-dev-controlnet-canny\", torch_dtype=torch.bfloat16),\r\n    FluxControlNetModel.from_pretrained(\"InstantX/FLUX.1-dev-controlnet-canny\", torch_dtype=torch.bfloat16),\r\n]\r\npipe = FluxControlNetPipeline.from_pretrained('/mnt/bn/x/sd_models/flux_schnell/', controlnet=controlnet, torch_dtype=torch.bfloat16).to(\"cuda\")\r\n```\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\n- \ud83e\udd17 Diffusers version: 0.31.0.dev0\r\n- Platform: Linux-5.4.143.bsk.7-amd64-x86_64-with-glibc2.31\r\n- Running on Google Colab?: No\r\n- Python version: 3.10.14\r\n- PyTorch version (GPU?): 2.3.1+cu121 (True)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Huggingface_hub version: 0.24.5\r\n- Transformers version: 4.38.2\r\n- Accelerate version: 0.33.0\r\n- PEFT version: 0.12.0\r\n- Bitsandbytes version: 0.44.1\r\n- Safetensors version: 0.4.4\r\n- xFormers version: 0.0.27\r\n- Accelerator: NVIDIA A100-SXM4-80GB, 81920 MiB\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\r\n\r\n### Who can help?\r\n\r\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9643",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-10-11T03:47:06Z",
    "updated_at": "2024-10-11T17:39:20Z",
    "comments": 1,
    "user": "RimoChan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9639,
    "title": "How to use my own trained lora in local computer?",
    "body": "local_model_path = r\"D:\\downloads\\FLUX.1-schnell\"\r\npipe = FluxPipeline.from_pretrained(local_model_path, torch_dtype=torch.bfloat16)\r\n#lora not working by this way\r\npipe.load_lora_weights(\"XLabs-AI/flux-lora-collection\", weight_name=\"disney_lora.safetensors\") \r\npipe.load_lora_weights(r\"D:\\AI\\stable-diffusion-webui-forge\\models\\Lora\\myflux\\myhsr.safetensors\")\r\npipe.fuse_lora()\r\npipe.unload_lora_weights()\r\n#pipe.enable_model_cpu_offload() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power\r\npipe.enable_sequential_cpu_offload()\r\n\r\nBut it seems not loading my own lora properly.",
    "url": "https://github.com/huggingface/diffusers/issues/9639",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-10T23:19:47Z",
    "updated_at": "2024-11-10T08:49:08Z",
    "user": "derekcbr"
  },
  {
    "repo": "pytorch/benchmark",
    "number": 2499,
    "title": "How is TorchBench applied to testing new versions of PyTorch?",
    "body": "Hello, may I ask what tasks will be used for end-to-end testing before the release of the new version of PyTorch?\r\nWill the test focus on the consistency of metrics between the previous and subsequent versions, such as the loss of training tasks, iteration speed, etc",
    "url": "https://github.com/pytorch/benchmark/issues/2499",
    "state": "open",
    "labels": [],
    "created_at": "2024-10-10T16:40:53Z",
    "updated_at": "2024-10-16T20:28:47Z",
    "user": "HLH13297997663"
  },
  {
    "repo": "huggingface/evaluation-guidebook",
    "number": 14,
    "title": "[TOPIC] How to design a good benchmark depending on your eval goals",
    "body": " Eval goals can be finding a good model for you vs ranking models vs choosing a good training config.\r\n \r\n Request by Luca Soldaini\r\n \r\n Cf https://x.com/soldni/status/1844409854712218042",
    "url": "https://github.com/huggingface/evaluation-guidebook/issues/14",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-10T16:20:40Z",
    "updated_at": "2025-09-18T08:31:15Z",
    "user": "clefourrier"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9633,
    "title": "Confusion about accelerator.num_processes in  get_scheduler",
    "body": "In the example code from [train_text_to_image_sdxl.py](https://github.com/huggingface/diffusers/blob/e16fd93d0a40156c1f49fde07f6f2eb438983927/examples/text_to_image/train_text_to_image_sdxl.py#L974):\r\n```python\r\nnum_warmup_steps = args.lr_warmup_steps * args.gradient_accumulation_steps\r\n```\r\nBut in [train_text_to_image.py](https://github.com/huggingface/diffusers/blob/e16fd93d0a40156c1f49fde07f6f2eb438983927/examples/text_to_image/train_text_to_image.py#L830):\r\n```python\r\nnum_warmup_steps_for_scheduler = args.lr_warmup_steps * accelerator.num_processes\r\n```\r\nWhy is there such a difference in these two cases?",
    "url": "https://github.com/huggingface/diffusers/issues/9633",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-10-10T08:39:12Z",
    "updated_at": "2024-11-09T15:37:33Z",
    "comments": 5,
    "user": "hj13-mtlab"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 968,
    "title": "It's ready",
    "body": "### Question\r\n\r\nThe project I've been working on for the part few months is now ready-enough to reveal to the world. Transformers.js is an essential part of it, and I just want to say thank you for your amazing work.\r\n\r\nhttps://www.papeg.ai\r\n\r\nAs you can see in the source code, there are lots of workers that implement Transformers.js workers; translation, image description, STT, TTS, speaker verification, image- and music generation, RAG embedding, and more!\r\n\r\nhttps://github.com/flatsiedatsie/papeg_ai\r\n\r\nKeep on rockin' !\r\n\r\n// Reddit post: https://www.reddit.com/r/LocalLLaMA/comments/1g0jehn/ive_been_working_on_this_for_6_months_free_easy/\r\n\r\n(Feel free to close this issue at any time)",
    "url": "https://github.com/huggingface/transformers.js/issues/968",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-10T04:39:48Z",
    "updated_at": "2025-05-29T22:49:24Z",
    "user": "flatsiedatsie"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 608,
    "title": "why is xformers not used for attention computation?",
    "body": "Curious why xformers is not used? Is it for simplicity or is there performance reason.",
    "url": "https://github.com/pytorch/torchtitan/issues/608",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-09T23:21:23Z",
    "updated_at": "2024-11-22T00:15:17Z",
    "user": "jason718"
  },
  {
    "repo": "pytorch/xla",
    "number": 8245,
    "title": "Improve documentation for `get_memory_info`",
    "body": "## \ud83d\udcda Documentation\r\n\r\nImprove documentation for `get_memory_info`. This feature is lightly defined in [PyTorchXLA documentation page](https://pytorch.org/xla/release/r2.4/index.html#torch_xla.core.xla_model.get_memory_info). Please provide an explanation on what details it pulls and potentially offer examples.\r\n\r\nAdditionally, it's important to draw a documentation that clarifies how `get_memory_info` API works such that users can easily compare/contrast it against [`torch.cuda.mem_get_info`](https://pytorch.org/docs/stable/generated/torch.cuda.mem_get_info.html)\r\n\r\ncc @mikegre-google to help follow up\r\n@JackCaoG",
    "url": "https://github.com/pytorch/xla/issues/8245",
    "state": "open",
    "labels": [
      "enhancement",
      "usability"
    ],
    "created_at": "2024-10-09T20:33:18Z",
    "updated_at": "2025-02-27T13:10:42Z",
    "comments": 0,
    "user": "miladm"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3224,
    "title": "\u2753 [Question] How to decide if an Op should support dynamic shape or not",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nSince only part of the ops support dynamic shapes, and some are not. What's the criteria to decide if an op supports dynamic shape or not?\r\n\r\nFor some existing ops, which are not marked as `supports_dynamic_shapes=True`, can I write a converter that wraps the existing converter, and mark my own converter with high priority? Is this the recommended way?\r\n\r\nor should I just turn on `assume_dynamic_shape_support`, which seems to be a flag globally for all converters ?\r\n\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.4.1\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.11.9\r\n - CUDA version: 12.1\r\n - GPU models and configuration: Nvidia L4\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3224",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-09T16:46:56Z",
    "updated_at": "2024-10-30T23:52:26Z",
    "user": "sean-xiang-applovin"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7211,
    "title": "Describe only selected fields in README",
    "body": "### Feature request\n\nHi Datasets team! \r\n\r\nIs it possible to add the ability to describe only selected fields of the dataset files in `README.md`? For example, I have this open dataset ([open-llm-leaderboard/results](https://huggingface.co/datasets/open-llm-leaderboard/results?row=0)) and I want to describe only some fields in order not to overcomplicate the Dataset Preview and filter out some fields \n\n### Motivation\n\nThe `Results` dataset for the Open LLM Leaderboard contains json files with a complex nested structure. I would like to add `README.md` there to use the SQL console, for example. But if I describe the structure of this dataset completely, it will overcomplicate the use of Dataset Preview and the total number of columns will exceed 50 \n\n### Your contribution\n\nI'm afraid I'm not familiar with the project structure, so I won't be able to open a PR, but I'll try to help with something else if possible",
    "url": "https://github.com/huggingface/datasets/issues/7211",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-10-09T16:25:47Z",
    "updated_at": "2024-10-09T16:25:47Z",
    "comments": 0,
    "user": "alozowski"
  },
  {
    "repo": "pytorch/xla",
    "number": 8240,
    "title": "XLA2 does not work with jax 0.4.34 (but did work on jax 0.4.33)",
    "body": "## \ud83d\udc1b Bug\r\n\r\nA toy example of MNIST using XLA2 does not work on the latest version of jax (0.4.34) on Trillium machine of 64 cores (V6e-64) but downgrading to 0.4.33 fixes the issue\r\n\r\n\r\n## To Reproduce\r\n\r\n1. Download the toy training example from [here](https://gist.githubusercontent.com/Chaosruler972/2461fe9d5a7a558ff4cb257ce88ad702/raw/1c354fbdae9dae2ff83917341aea957172897e71/mnist.py)\r\n\r\n2. Allocate a V6e-64 trillium TPU at GCP\r\n\r\n3. copy that file using gcp scp to all the VM machines\r\n\r\n4. prepare an environment containing torch_xla2  (refer to the[ readme here](https://github.com/pytorch/xla/blob/master/experimental/torch_xla2/README.md))\r\n\r\n5. install 0.4.43 jax/lib from pip\r\n```\r\ninstall jax==0.4.33 jaxlib==0.4.33 libtpu-nightly==0.1.dev20241008+nightly -f https://storage.googleapis.com/libtpu-releases/index.html\r\n```\r\n\r\n6. run your training, verify it is working well\r\n\r\n7. upgrade to jax 0.4.44\r\n```\r\ninstall jax==0.4.33 jaxlib==0.4.33 libtpu-nightly==0.1.dev20241008+nightly -f https://storage.googleapis.com/libtpu-releases/index.html\r\n```\r\n8. run your training again, note how the training loop exits without warning/messages after the loss was extracted\r\n\r\n\r\n## Expected behavior\r\n\r\nsmall varying results between the scripts when running on different version of jax\r\n\r\n## Environment\r\n\r\n - Reproducible on XLA backend TPU\r\n - Using Trillum 64 machine \r\n - torch_xla2 version: 0.0.1\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/8240",
    "state": "closed",
    "labels": [
      "bug",
      "torchxla2"
    ],
    "created_at": "2024-10-09T14:35:32Z",
    "updated_at": "2025-03-04T18:22:21Z",
    "comments": 3,
    "user": "zmelumian972"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 965,
    "title": "Error: cannot release session. invalid session id",
    "body": "### Question\r\n\r\nI'm trying to get ASR + segmentation to run on a mobile phone (Pixel 6A, 6GB ram). This time on Brave mobile ;-)\r\n\r\nASR alone works fine. But I have a question about also getting the speaker recognition to run (segmentation+verification).\r\n\r\nIn the example implementation a `promiseAll` is used to run both ASR and Segmentation in paralel. For my implementation I've tried to run them one after the other, hoping that this would mean less memory is needed. E.g:\r\n\r\n- Create ASR instance\r\n-- Get text and chunks from audio\r\n- Dispose of ASR instance\r\n\r\n- Create segmentation instance\r\n-- Get segments from audio\r\n- Dispose of segmentation instance\r\n\r\n- Create verification instance\r\n-- Run verification on chunks of audio from each segment\r\n- Dispose of verification instance\r\n\r\nI don't know if it's related, but I noticed the error below:\r\n\r\n<img width=\"550\" alt=\"Screenshot 2024-10-09 at 15 11 13\" src=\"https://github.com/user-attachments/assets/27873ca1-218b-44b9-8d9a-3af3a46bdb5c\">\r\n\r\n\r\n\r\n\r\nMy questions are:\r\n- Is it a valid assumption that doing things consequtively will allow this cascade to run on devices with less memory? Or was there a good reason that a promiseAll was used?\r\n- What does the error mean?\r\n- Is running them consecutively part of why the error occurs?\r\n- Can I use `quantized` with the segmentation and verification models in order to save memory? Currently the ASR (tiny-whisper.en_timestamped) is 114MB, and then the segmentation and verification seem to be 512 MB together.\r\n\r\nI haven't split up loading the segmentation and verification instances yet, as I thought I'd get your opinion first.\r\n\r\n```\r\nclass SegmentationSingleton {\r\n    \r\n    static instance = null;\r\n\t\r\n    static segmentation_model_id = 'onnx-community/pyannote-segmentation-3.0';\r\n    static segmentation_instance = null;\r\n    static segmentation_processor = null;\r\n\tstatic loaded_segmentation = false;\r\n\t\r\n\tstatic verification_model_id = 'Xenova/wavlm-base-plus-sv'; // Xenova/wavlm-base-plus-sv\r\n    //static verification_model_id = 'onnx-community/wespeaker-voxceleb-resnet34-LM';\r\n    static verification_instance = null;\r\n    static verification_processor = null;\r\n\t\r\n\tstatic instance_exists(){\r\n\t\treturn this.segmentation_instance != null;\r\n\t}\r\n\t\r\n\tstatic set_to_null(var_to_null=null){\r\n\t\tif(typeof var_to_null == 'string' && typeof this[var_to_null] != 'undefined'){\r\n\t\t\tthis[var_to_null] = null;\r\n\t\t\t//console.log(\"SegmentationSingleton: set_to_null: \", var_to_null);\r\n\t\t}\r\n\t}\r\n\r\n\r\n    //static async getInstance(progress_callback=null,model_name='onnx-community/whisper-base_timestamped',preferences={},load_segmentation=true) {\r\n\tstatic async getInstance(progress_callback=null,preferences={}) {\r\n\t\t//console.log(\"Whisper_worker: SegmentationSingleton: getInstance\");\r\n\t\t\r\n\t\tif(self.is_mobile){\r\n\t\t\tconsole.log(\"mobile, so setting quantized to true for segmentation AI's\");\r\n\t\t\tpreferences['quantized'] = true;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tthis.loaded_segmentation = true\r\n\r\n\t\tconsole.log(\"segmentationSingleton: creating segmentation instances\");\r\n\t\t\r\n        this.segmentation_processor ??= AutoProcessor.from_pretrained(this.segmentation_model_id, {\r\n\t\t\t...preferences,\r\n            progress_callback,\r\n        });\r\n\t\t\r\n        this.segmentation_instance ??= AutoModelForAudioFrameClassification.from_pretrained(this.segmentation_model_id, {\r\n            // NOTE: WebGPU is not currently supported for this model\r\n            // See https://github.com/microsoft/onnxruntime/issues/21386\r\n            device: 'wasm',\r\n            //dtype: 'fp32',\r\n\t\t\tdtype: 'q8',\r\n\t\t\t...preferences,\r\n            progress_callback,\r\n        });\r\n\t\r\n\t\tif(this.verification_model_id.endsWith('wespeaker-voxceleb-resnet34-LM')){\r\n\t\t\tself.similarity_threshold = 0.5;\r\n\t\t\tself.perfect_simillarity_threshold = 0.7;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tself.similarity_threshold = 0.95;\r\n\t\t\tself.perfect_simillarity_threshold = 0.98;\r\n\t\t}\r\n\t\r\n        this.verification_processor ??= AutoProcessor.from_pretrained(this.verification_model_id, {\r\n            device: 'wasm',\r\n            dtype: 'fp32',\r\n\t\t\t//device: 'webgpu',\r\n\t\t\t//dtype: 'q8',\r\n\t\t\t...preferences,\r\n            progress_callback,\r\n        });\r\n\t\r\n        this.verification_instance ??= AutoModel.from_pretrained(this.verification_model_id, {\r\n            device: 'wasm',\r\n            dtype: 'fp32',\r\n\t\t\t//device: 'webgpu',\r\n\t\t\t//dtype: 'q8',\r\n\t\t\t...preferences,\r\n            progress_callback,\r\n        });\r\n\r\n        return Promise.all([this.segmentation_processor, this.segmentation_instance, this.verification_processor, this.verification_instance]);\r\n        \r\n    }\r\n}\r\n\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/965",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-09T13:57:48Z",
    "updated_at": "2024-10-09T15:51:02Z",
    "user": "flatsiedatsie"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1509,
    "title": "(BUG) Oath login splash is BROKEN/does NOT work",
    "body": "On newer versions of chat-ui the login splash screen does not work.  Say for instance you have oauth setup and are not logged in.  You should get a popup prompting you to logina nd not see the interface.  This used to work without a problem.  I just realized this no longer working on the newer versions.  I have oauth set up through huggingface working perfectly. \r\n\r\nNote.. even though the splash is not shown someone would be prevented from using the chatbot as it just wont work if your not logged in. However i kinda like the splash..  Anyone know how to get this working again??  already messed with it? save me some time.  thank you huggingface for creating this project.  Are we going to be getting any of the newer options being implemented into Huggingchat like specifically the continue button and new search/agent control popup panel vs just search on/off??  Thanks and wish yall the best\r\n\r\n***Splash on 0.8.4 (Working)\r\n![image](https://github.com/user-attachments/assets/7ada285f-9ff4-4700-8342-e985d14b2d12)\r\n\r\n***Splash on 0.9.3 (Not Working)\r\n![image](https://github.com/user-attachments/assets/613fab7e-aff5-4225-9b65-ad073fff49a1)\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1509",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-10-08T18:06:01Z",
    "updated_at": "2024-11-27T15:02:46Z",
    "comments": 2,
    "user": "bpawnzZ"
  },
  {
    "repo": "huggingface/trl",
    "number": 2196,
    "title": "How to exit training when the loss is less than a specified value in SFTTrainer?",
    "body": "I asked this question in ChatGPT first, it gave the answer below:\r\n```\r\nfrom trl import SFTTrainer\r\nfrom transformers import TrainingArguments\r\nfrom unsloth import is_bfloat16_supported\r\n\r\n# Define customized Trainer class\r\nclass CustomSFTTrainer(SFTTrainer):\r\n    def __init__(self, *args, min_loss_threshold=0.001, **kwargs):\r\n        super().__init__(*args, **kwargs)\r\n        self.min_loss_threshold = min_loss_threshold\r\n\r\n    def train(self, *args, **kwargs):\r\n        # Rewrite the train() method to monitor the loss.\r\n        for step, batch in enumerate(self.get_train_dataloader()):\r\n            outputs = self.model(**batch)\r\n            loss = outputs.loss\r\n\r\n            loss.backward()\r\n            self.optimizer.step()\r\n            self.lr_scheduler.step()\r\n            self.optimizer.zero_grad()\r\n\r\n            # If the loss is less than a specified value, exit training.\r\n            if loss.item() < self.min_loss_threshold:\r\n                print(f\"Stopping training early at step {step} as loss {loss.item()} is below threshold {self.min_loss_threshold}\")\r\n                break \r\n\r\n            # Print loss log.\r\n            if step % self.args.logging_steps == 0:\r\n                print(f\"Step {step}, Loss: {loss.item()}\")\r\n\r\n# Initialize the customized Trainer.\r\ntrainer = CustomSFTTrainer(\r\n    model=model,\r\n    tokenizer=tokenizer,\r\n    train_dataset=ds_split['train'],\r\n    dataset_text_field=\"text\",\r\n    max_seq_length=max_seq_length,\r\n    dataset_num_proc=2,\r\n    min_loss_threshold=0.001,  # Specify the loss threshold\r\n    args=TrainingArguments(\r\n        per_device_train_batch_size=2,\r\n        gradient_accumulation_steps=4,\r\n\r\n        warmup_steps=5,\r\n        max_steps=200,\r\n\r\n        learning_rate=2e-4,\r\n        fp16=not is_bfloat16_supported(),\r\n        bf16=is_bfloat16_supported(),\r\n        logging_steps=1,\r\n        optim=\"adamw_8bit\",\r\n        weight_decay=0.01,\r\n        lr_scheduler_type=\"linear\",\r\n        seed=3407,\r\n        output_dir=\"outputs\",\r\n    ),\r\n)\r\n\r\ntrainer.train()\r\n```\r\nHowever, the code above occurred error as below:\r\n`# Calls into the C++ engine to run the backward pass RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [2, 482, 3584]], which is output 0 of MulBackward0, is at version 1; expected version 0 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True). `\r\n\r\nI feedbacked the erorr to ChatGPT, it advised to add 2 lines in the code:\r\n```\r\n            ...\r\n            loss = outputs.loss\r\n\r\n            # Avoid inplace-updating\r\n            loss = loss.clone()\r\n            \r\n            loss.backward()\r\n            ...\r\n```\r\nI re-ran the code, it occurred errors as below:\r\n```\r\nRuntimeError                              Traceback (most recent call last)\r\n[<ipython-input-8-079eb3ca0b07>](https://localhost:8080/#) in <cell line: 2>()\r\n      1 torch.autograd.set_detect_anomaly(True)\r\n----> 2 trainer_stats = trainer.train()\r\n\r\n3 frames\r\n[/usr/local/lib/python3.10/dist-packages/torch/autograd/graph.py](https://localhost:8080/#) in _engine_run_backward(t_outputs, *args, **kwargs)\r\n    767         unregister_hooks = _register_logging_hooks_on_whole_graph(t_outputs)\r\n    768     try:\r\n--> 769         return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass\r\n    770             t_outputs, *args, **kwargs\r\n    771         )  # Calls into the C++ engine to run the backward pass\r\n\r\nRuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [2, 256, 3584]], which is output 0 of MulBackward0, is at version 1; expected version 0 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!\r\n```\r\n\r\nWhat should I do?",
    "url": "https://github.com/huggingface/trl/issues/2196",
    "state": "closed",
    "labels": [
      "\u2753 question",
      "\ud83c\udfcb SFT"
    ],
    "created_at": "2024-10-08T03:13:27Z",
    "updated_at": "2024-10-08T10:39:51Z",
    "user": "fishfree"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 532,
    "title": "Documentation about multipart safetensors",
    "body": "### Feature request\n\nAdd examples to documentation about handling with multipart safetensors files (`*-00001.safetensors`, `*-00002.safetensors`, etc). How to load/save them?\n\n### Motivation\n\nThis is widespread format but README and Docs don't contain enough information about it.\n\n### Your contribution\n\nCan't help by myself",
    "url": "https://github.com/huggingface/safetensors/issues/532",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-07T20:14:48Z",
    "updated_at": "2025-01-03T17:36:31Z",
    "comments": 6,
    "user": "attashe"
  },
  {
    "repo": "pytorch/audio",
    "number": 3838,
    "title": "How to train a real-time av-asr pretrain model",
    "body": "### \ud83d\ude80 The feature\n\nThere is an example for hubert training [here](https://github.com/pytorch/audio/tree/main/examples/self_supervised_learning), but has no example about real-time av-asr for other languages.\n\n### Motivation, pitch\n\nI'm woking on lipreading without a pretrained model to continue train the pretrained model like real-time av-asr.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/audio/issues/3838",
    "state": "open",
    "labels": [],
    "created_at": "2024-10-07T12:23:32Z",
    "updated_at": "2024-10-07T12:23:32Z",
    "user": "Zhaninh"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9599,
    "title": "Why there is no LoRA only finetune example of FLUX.1?",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nThe only example of LoRA finetune for FLUX.1 I discovered is here:\r\nhttps://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_flux.py\r\nwhich is a dreambooth example. The dreambooth is VRAM intensive and not useful for scenario that dataset is big enough and does not need regularization images.\r\n\r\n**Describe the solution you'd like.**\r\nA LoRA only example for FLUX.1\r\n\r\n**Describe alternatives you've considered.**\r\nProvide some tips for me to modify by myself.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9599",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-07T06:22:54Z",
    "updated_at": "2024-10-09T12:48:32Z",
    "comments": 3,
    "user": "eeyrw"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1506,
    "title": "Add support for local models",
    "body": "## Describe your feature request\r\n\r\nI was looking for an open-source alternative to PocketPal, which allows to converse with local models on iOS and Android https://apps.apple.com/us/app/pocketpal-ai/id6502579498 and I was wondering if HuggingChat could be this alternative? The idea is to have an e2e open-source solution, providing e2e privacy.\r\n\r\nI hope I didn't miss anything in the app allowing to support this.\r\n\r\nThanks\r\n\r\n## Screenshots (if relevant)\r\n\r\n## Implementation idea\r\n\r\nI'm happy to help provided support from the community and the HuggingFace team. I have experience on web development, but not with running LLM on mobile.\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1506",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-10-06T20:18:24Z",
    "updated_at": "2024-10-07T13:45:45Z",
    "comments": 3,
    "user": "arnaudbreton"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1278,
    "title": "AOTI Export ignores user --device flag - expected behavior? ",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi all, \r\n\r\nI ran into some confusion when trying to export llama3 on my system. I have a small graphics card (8GB VRAM on an AMD GPU) but a decent amount of RAM (24GB). Obviously, the model won't fit on my GPU un-quantized but it should fit into my RAM + swap.\r\n\r\nI tried running:\r\n```\r\npython3 torchchat.py export llama3 --output-dso-path exportedModels/llama3.so --quantize torchchat/quant_config/desktop.json  --device cpu\r\n```\r\n\r\nHowever, I ran into multiple HIP OOM errors (basically equivalent to CUDA). Why would we try to allocate CUDA memory if the target device is CPU?\r\n\r\nOn further inspection, during export, the device is replaced with whatever is present in the quantize config:\r\nIn `cli.py`\r\nhttps://github.com/pytorch/torchchat/blob/b21715835ab9f61e23dbcf32795b0c0a2d654908/torchchat/cli/cli.py#L491C10-L494C1\r\n```\r\nargs.device = get_device_str(\r\n    args.quantize.get(\"executor\", {}).get(\"accelerator\", args.device)\r\n)\r\n```\r\n\r\nIn this case, the device in `desktop.json` is \"fast\". The `get_device_str` function replaces this with \"cuda\" simply based on `torch.cuda.is_available` without consulting the flag I passed in. \r\n\r\n## Other cases\r\nDoing a quick grep of the repo, I only found one other case in `generate.py` where `torch.cuda.is_available()` is consulted for monitoring memory usage. We should be careful switching based simply on `torch.cuda.is_available()` and make sure to pin to the user's request if we're using ambiguous devices like \"fast\".\r\n\r\nAnother small issue - since I use AMD GPU, the default `install/install_requirements.sh` will download the CPU only version instead of the ROCm version of PyTorch. To use my GPU, I have to re-run the torch installation manually. Luckily, it's quite easy to find this command at https://pytorch.org/get-started/locally/ . Should be straightforward to check of ROCm is available on the system during this script - we can just run `rocminfo` & check if the command is available.\n\n### Versions\n\n```\r\nwget https://raw.githubusercontent.com/pytorch/pytorch/main/torch/utils/collect_env.py\r\n# For security purposes, please check the contents of collect_env.py before running it.\r\npython collect_env.py\r\n--2024-10-06 12:03:44--  https://raw.githubusercontent.com/pytorch/pytorch/main/torch/utils/collect_env.py\r\nResolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8001::154, 2606:50c0:8002::154, 2606:50c0:8003::154, ...\r\nConnecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8001::154|:443... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 23357 (23K) [text/plain]\r\nSaving to: \u2018collect_env.py\u2019\r\n\r\ncollect_env.py                              100%[===========================================================================================>]  22.81K  --.-KB/s    in 0.02s   \r\n\r\n2024-10-06 12:03:44 (1.10 MB/s) - \u2018collect_env.py\u2019 saved [23357/23357]\r\n\r\nCollecting environment information...\r\nPyTorch version: 2.4.1+rocm6.1\r\nIs debug build: False\r\nCUDA used to build PyTorch: N/A\r\nROCM used to build PyTorch: 6.1.40091-a8dbc0c19\r\n\r\nOS: Ubuntu 22.04.4 LTS (x86_64)\r\nGCC version: (Ubuntu 9.5.0-1ubuntu1~22.04) 9.5.0\r\nClang version: 14.0.0-1ubuntu1.1\r\nCMake version: version 3.30.4\r\nLibc version: glibc-2.35\r\n\r\nPython version: 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] (64-bit runtime)\r\nPython platform: Linux-6.1.4-060104-generic-x86_64-with-glibc2.35\r\nIs CUDA available: True\r\nCUDA runtime version: Could not collect\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: AMD Radeon RX 6700S (gfx1030)\r\nNvidia driver version: Could not collect\r\ncuDNN version: Could not collect\r\nHIP runtime version: 6.1.40091\r\nMIOpen runtime version: 3.1.0\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                    x86_64\r\nCPU op-mode(s):                  32-bit, 64-bit\r\nAddress sizes:                   48 bits physical, 48 bits virtual\r\nByte Order:                      Little Endian\r\nCPU(s):                          16\r\nOn-line CPU(s) list:             0-15\r\nVendor ID:                       AuthenticAMD\r\nModel name:                      AMD Ryzen 9 6900HS with Radeon Graphics\r\nCPU family:                      25\r\nModel:                           68\r\nThread(s) per core:              2\r\nCore(s) per socket:              8\r\nSocket(s):                       1\r\nStepping:                        1\r\nFrequency boost:                 enabled\r\nCPU max MHz:                     4933.8862\r\nCPU min MHz:                     1600.0000\r\nBogoMIPS:                        6587.56\r\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce",
    "url": "https://github.com/pytorch/torchchat/issues/1278",
    "state": "closed",
    "labels": [
      "bug",
      "good first issue",
      "actionable"
    ],
    "created_at": "2024-10-06T19:06:51Z",
    "updated_at": "2024-11-16T01:15:38Z",
    "comments": 5,
    "user": "vmpuri"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1277,
    "title": "Android demo app poor model performance",
    "body": "### \ud83d\udc1b Describe the bug\n\nI wanted to try the new Llama 3.2 1B parameter model on mobile. I downloaded the model and generated the `pte` like so:\r\n\r\n```\r\npython torchchat.py download llama3.2-1b\r\npython torchchat.py export llama3.2-1b --quantize torchchat/quant_config/mobile.json --output-pte-path llama3_2-1b.pte\r\n```\r\n\r\nThen I pushed `llama3_2-1b.pte` file and `tokenizer.model` files to the mobile phone using `adb`. \r\n\r\nI executed the demo app in `torchchat/edge/android/torchchat` using Android Studio with `.aar` file provided on the TorchChat repo readme.\r\n\r\nHowever, when I chat with the AI its responses are very useless and feel quite different than what I get with the same prompt on my computer:\r\n\r\n![example](https://github.com/user-attachments/assets/8e9d7128-6afd-46b5-8c1f-6b03ad3bccbb)\r\n![terminal-interaction](https://github.com/user-attachments/assets/beb9733a-3b23-40e7-9354-43a97cb05fa0)\r\n\r\nIs there a problem with the default quantization parameters? I tried to not quantize but then the app crashed when loading the model.\n\n### Versions\n\nCollecting environment information...\r\nPyTorch version: 2.5.0.dev20240901\r\nIs debug build: False\r\nCUDA used to build PyTorch: None\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: macOS 14.4 (arm64)\r\nGCC version: Could not collect\r\nClang version: 15.0.0 (clang-1500.3.9.4)\r\nCMake version: version 3.30.4\r\nLibc version: N/A\r\n\r\nPython version: 3.10.0 (default, Mar  3 2022, 03:54:28) [Clang 12.0.0 ] (64-bit runtime)\r\nPython platform: macOS-14.4-arm64-arm-64bit\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nApple M2 Pro\r\n\r\nVersions of relevant libraries:\r\n[pip3] executorch==0.5.0a0+286799c\r\n[pip3] numpy==1.26.4\r\n[pip3] torch==2.5.0.dev20240901\r\n[pip3] torchao==0.5.0+git0916b5b\r\n[pip3] torchaudio==2.5.0.dev20240901\r\n[pip3] torchsr==1.0.4\r\n[pip3] torchtune==0.3.0.dev20240928+cpu\r\n[pip3] torchvision==0.20.0.dev20240901\r\n[conda] executorch                0.5.0a0+286799c          pypi_0    pypi\r\n[conda] numpy                     1.26.4                   pypi_0    pypi\r\n[conda] torch                     2.5.0.dev20240901          pypi_0    pypi\r\n[conda] torchaudio                2.5.0.dev20240901          pypi_0    pypi\r\n[conda] torchsr                   1.0.4                    pypi_0    pypi\r\n[conda] torchtune                 0.3.0.dev20240928+cpu          pypi_0    pypi\r\n[conda] torchvision               0.20.0.dev20240901          pypi_0    pypi",
    "url": "https://github.com/pytorch/torchchat/issues/1277",
    "state": "closed",
    "labels": [
      "actionable",
      "Mobile - Android",
      "ExecuTorch"
    ],
    "created_at": "2024-10-06T15:10:55Z",
    "updated_at": "2024-10-25T08:19:10Z",
    "comments": 11,
    "user": "fran-aubry"
  },
  {
    "repo": "pytorch/xla",
    "number": 8223,
    "title": "how to use torch.float16 in diffusers pipeline with pytorch xla ",
    "body": "## \u2753 Questions and Help\r\n```\r\nimport diffusers, torch, os\r\nimport torch_xla.core.xla_model as xm\r\n\r\npipeline = diffusers.DiffusionPipeline.from_pretrained(\"runwayml/stable-diffusion-v1-5\", safety_checker=None, use_safetensors=True, torch_dtype=torch.float16)\r\n# Move the model to the first TPU core\r\npipeline = pipeline.to(xm.xla_device())\r\nimage = pipeline(\"a cloud tpu winning a kaggle competition\", num_inference_steps=20).images[0]\r\nimage\r\n```\r\nI run the above code in kaggle\r\nand get\r\n```\r\nRuntimeError                              Traceback (most recent call last)\r\nCell In[2], line 8\r\n      6 # Move the model to the first TPU core\r\n      7 pipeline = pipeline.to(xm.xla_device())\r\n----> 8 image = pipeline(\"a cloud tpu winning a kaggle competition\", num_inference_steps=20).images[0]\r\n      9 image\r\n\r\nFile /usr/local/lib/python3.8/site-packages/torch/utils/_contextlib.py:115, in context_decorator.<locals>.decorate_context(*args, **kwargs)\r\n    112 @functools.wraps(func)\r\n    113 def decorate_context(*args, **kwargs):\r\n    114     with ctx_factory():\r\n--> 115         return func(*args, **kwargs)\r\n\r\nFile /usr/local/lib/python3.8/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py:1000, in StableDiffusionPipeline.__call__(self, prompt, height, width, num_inference_steps, timesteps, sigmas, guidance_scale, negative_prompt, num_images_per_prompt, eta, generator, latents, prompt_embeds, negative_prompt_embeds, ip_adapter_image, ip_adapter_image_embeds, output_type, return_dict, cross_attention_kwargs, guidance_rescale, clip_skip, callback_on_step_end, callback_on_step_end_tensor_inputs, **kwargs)\r\n    997 latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)\r\n    999 # predict the noise residual\r\n-> 1000 noise_pred = self.unet(\r\n   1001     latent_model_input,\r\n   1002     t,\r\n   1003     encoder_hidden_states=prompt_embeds,\r\n   1004     timestep_cond=timestep_cond,\r\n   1005     cross_attention_kwargs=self.cross_attention_kwargs,\r\n   1006     added_cond_kwargs=added_cond_kwargs,\r\n   1007     return_dict=False,\r\n   1008 )[0]\r\n   1010 # perform guidance\r\n   1011 if self.do_classifier_free_guidance:\r\n\r\nFile /usr/local/lib/python3.8/site-packages/torch/nn/modules/module.py:1501, in Module._call_impl(self, *args, **kwargs)\r\n   1496 # If we don't have any hooks, we want to skip the rest of the logic in\r\n   1497 # this function, and just call forward.\r\n   1498 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks\r\n   1499         or _global_backward_pre_hooks or _global_backward_hooks\r\n   1500         or _global_forward_hooks or _global_forward_pre_hooks):\r\n-> 1501     return forward_call(*args, **kwargs)\r\n   1502 # Do not call functions when jit is used\r\n   1503 full_backward_hooks, non_full_backward_hooks = [], []\r\n\r\nFile /usr/local/lib/python3.8/site-packages/diffusers/models/unets/unet_2d_condition.py:1169, in UNet2DConditionModel.forward(self, sample, timestep, encoder_hidden_states, class_labels, timestep_cond, attention_mask, cross_attention_kwargs, added_cond_kwargs, down_block_additional_residuals, mid_block_additional_residual, down_intrablock_additional_residuals, encoder_attention_mask, return_dict)\r\n   1164 encoder_hidden_states = self.process_encoder_hidden_states(\r\n   1165     encoder_hidden_states=encoder_hidden_states, added_cond_kwargs=added_cond_kwargs\r\n   1166 )\r\n   1168 # 2. pre-process\r\n-> 1169 sample = self.conv_in(sample)\r\n   1171 # 2.5 GLIGEN position net\r\n   1172 if cross_attention_kwargs is not None and cross_attention_kwargs.get(\"gligen\", None) is not None:\r\n\r\nFile /usr/local/lib/python3.8/site-packages/torch/nn/modules/module.py:1501, in Module._call_impl(self, *args, **kwargs)\r\n   1496 # If we don't have any hooks, we want to skip the rest of the logic in\r\n   1497 # this function, and just call forward.\r\n   1498 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks\r\n   1499         or _global_backward_pre_hooks or _global_backward_hooks\r\n   1500         or _global_forward_hooks or _global_forward_pre_hooks):\r\n-> 1501     return forward_call(*args, **kwargs)\r\n   1502 # Do not call functions when jit is used\r\n   1503 full_backward_hooks, non_full_backward_hooks = [], []\r\n\r\nFile /usr/local/lib/python3.8/site-packages/torch/nn/modules/conv.py:463, in Conv2d.forward(self, input)\r\n    462 def forward(self, input: Tensor) -> Tensor:\r\n--> 463     return self._conv_forward(input, self.weight, self.bias)\r\n\r\nFile /usr/local/lib/python3.8/site-packages/torch/nn/modules/conv.py:459, in Conv2d._conv_forward(self, input, weight, bias)\r\n    455 if self.padding_mode != 'zeros':\r\n    456     return F.conv2d(F.pad(input, self._reversed_padding_repeated_twice, mode=self.padding_mode),\r\n    457                     weight, bias, self.stride,\r\n    458                     _pair(0), self.dilation, self.groups)\r\n--> 459 return F.conv2d(input, weight, bias, self.str",
    "url": "https://github.com/pytorch/xla/issues/8223",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-10-06T00:02:41Z",
    "updated_at": "2025-02-27T13:17:50Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1644,
    "title": "How to build a custom tokenizer on top of a exsiting Llama 3.2 tokenizer?",
    "body": "Hi, \r\nI was trying to create a custom tokenizer for a different language which is not included in llama 3.2 tokenizer. \r\nI could not find exactly what tokenizer I can use from hf which is exact alternative to Llama's tokenizer [link](https://github.com/meta-llama/llama3/blob/main/llama/tokenizer.py), so that I will be able to train a new tokenizer. \r\n\r\nCurrently I am using following code to train a tokenizer, but final example does not match with the one Llama 3.2 has.\r\n\r\nI would be nice if anyone could share their experience of adapting a Llama model to a new language.\r\n\r\n```\r\nimport json\r\nimport argparse\r\n\r\nfrom datasets import load_dataset, concatenate_datasets\r\nfrom tokenizers import SentencePieceBPETokenizer\r\nfrom transformers import LlamaTokenizerFast, AutoTokenizer\r\n\r\nfrom tqdm import tqdm\r\nfrom typing import List\r\n\r\nhf_datasets = [\"yakhyo/uz-wiki\", \"yakhyo/uz-news\", \"agentlans/high-quality-english-sentences\"]\r\n\r\n\r\n\r\ndef normalize_text(text: str) -> str:\r\n    \"\"\"\r\n    Normalize Uzbek characters, replacing variations of o\u2018, o', o`, and \u2019 (curved apostrophe).\r\n    \"\"\"\r\n    return text.replace(\"\u2018\", \"'\").replace(\"`\", \"'\").replace(\"\u2019\", \"'\").replace(\"()\", \"\")\r\n\r\ndef prepare_datasets(datasets_list: List[str]):\r\n    all_data = []\r\n    for dataset_name in datasets_list:\r\n        try:\r\n            data = load_dataset(dataset_name)\r\n            for split in [\"train\", \"test\", \"validation\"]:\r\n                try:\r\n                    all_data.append(data[split])\r\n                except KeyError:\r\n                    pass\r\n        except:\r\n            print(f\"dataset: `{dataset_name}` not found, skipping...\")\r\n\r\n    concat_data = []\r\n    for data in tqdm(all_data):\r\n        data = data.map(lambda example: {\"text\": normalize_text(example[\"text\"])})\r\n        data = data.remove_columns([col for col in data.column_names if col != \"text\"])\r\n        concat_data.append(data)\r\n\r\n    return concatenate_datasets(concat_data)\r\n\r\n\r\ndef main(args):\r\n\r\n    dataset = prepare_datasets(hf_datasets)\r\n\r\n    # select num_samples from the dataset\r\n    dataset = dataset.shuffle(seed=42).select(range(len(dataset)))\r\n\r\n    # Create a SentencePieceBPETokenizer\r\n    tokenizer = SentencePieceBPETokenizer(\r\n        replacement=\"\u0120\"\r\n    )\r\n\r\n    # Train the SentencePieceBPETokenizer on the dataset\r\n    tokenizer.train_from_iterator(\r\n        iterator=dataset['text'],\r\n        vocab_size=args.vocab_size,\r\n        show_progress=True,\r\n        special_tokens=[\r\n            \"<unk>\", \r\n            \"<s>\",\r\n            \"</s>\",\r\n            \"<pad>\"\r\n        ],\r\n    )\r\n\r\n    # Save the tokenizer\r\n    tokenizer.save(\"new-sentencepiece-tokenizer.json\", pretty=True)\r\n\r\n    # Load reference tokenizer\r\n    if args.reference_tokenizer is not None:\r\n        reference_tokenizer = AutoTokenizer.from_pretrained(args.reference_tokenizer)\r\n        reference_tokenizer.save_pretrained(\"reference-tokenizer\")\r\n    else:\r\n        raise ValueError(\r\n            \"No tokenizer name provided or no hub token provided. Try using --reference_tokenizer 'meta-llama/Llama-2-7b-hf'\")\r\n\r\n    # Read and dump the json file for the new tokenizer and the reference tokenizer\r\n    with open(\"new-sentencepiece-tokenizer.json\") as f:\r\n        new_llama_tokenizer_json = json.load(f)\r\n\r\n    with open(\"reference-tokenizer/tokenizer.json\") as f:\r\n        reference_tokenizer_json = json.load(f)\r\n\r\n    # Add the reference tokenizer's config to the new tokenizer's config\r\n    new_llama_tokenizer_json[\"normalizer\"] = reference_tokenizer_json[\"normalizer\"]\r\n    new_llama_tokenizer_json[\"pre_tokenizer\"] = reference_tokenizer_json[\"pre_tokenizer\"]\r\n    new_llama_tokenizer_json[\"post_processor\"] = reference_tokenizer_json[\"post_processor\"]\r\n    new_llama_tokenizer_json[\"decoder\"] = reference_tokenizer_json[\"decoder\"]\r\n    new_llama_tokenizer_json[\"model\"]['fuse_unk'] = reference_tokenizer_json[\"model\"]['fuse_unk']\r\n    new_llama_tokenizer_json[\"model\"]['byte_fallback'] = reference_tokenizer_json[\"model\"]['byte_fallback']\r\n\r\n    # Dump the new tokenizer's config\r\n    with open(\"new-sentencepiece-tokenizer.json\", \"w\") as f:\r\n        json.dump(new_llama_tokenizer_json, f, indent=2, ensure_ascii=False)\r\n\r\n    # Load the new tokenizer as a LlamaTokenizerFast\r\n    new_llama_tokenizer = LlamaTokenizerFast(\r\n        tokenizer_file=\"new-sentencepiece-tokenizer.json\",\r\n        unk_token=\"<unk>\",\r\n        unk_token_id=0,\r\n        bos_token=\"<s>\",\r\n        bos_token_id=1,\r\n        eos_token=\"</s>\",\r\n        eos_token_id=2,\r\n        pad_token=\"<pad>\",\r\n        pad_token_id=3,\r\n        padding_side=\"right\",\r\n    )\r\n\r\n    # Save the new tokenizer\r\n    new_llama_tokenizer.save_pretrained(\"new-llama-tokenizer\")\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    parser = argparse.ArgumentParser(description=\"Llama Tokenizer using SentencePieceBPE\")\r\n\r\n    parser.add_argument(\r\n        \"--reference_tokenizer\",\r\n        type=str,\r\n        default=None,\r\n        help=\"The name of the reference tokenizer to use\"\r\n    )\r\n\r\n    parser.ad",
    "url": "https://github.com/huggingface/tokenizers/issues/1644",
    "state": "closed",
    "labels": [
      "training"
    ],
    "created_at": "2024-10-05T13:18:55Z",
    "updated_at": "2025-02-26T12:06:15Z",
    "user": "yakhyo"
  },
  {
    "repo": "pytorch/xla",
    "number": 8222,
    "title": " unsupported operand type(s) for %: 'int' and 'NoneType'",
    "body": "## \u2753 Questions and Help\r\nI follow the https://github.com/pytorch/xla/blob/master/contrib/kaggle/pytorch-xla-2-0-on-kaggle.ipynb\r\n\r\nbut the code in image = pipeline(prompt, callback=lambda *args: xm.mark_step(), generator=generator).images[0]\r\nget\r\n```\r\nTypeError                                 Traceback (most recent call last)\r\nCell In[8], line 4\r\n      1 generator = torch.Generator().manual_seed(0)\r\n      2 # xm.mark_step compiles and executes the graph after each iteration.\r\n      3 # The first few steps will be much slower than the rest.\r\n----> 4 image = pipeline(prompt, callback=lambda *args: xm.mark_step(), generator=generator).images[0]\r\n      5 image\r\n\r\nFile /usr/local/lib/python3.8/site-packages/torch/utils/_contextlib.py:115, in context_decorator.<locals>.decorate_context(*args, **kwargs)\r\n    112 @functools.wraps(func)\r\n    113 def decorate_context(*args, **kwargs):\r\n    114     with ctx_factory():\r\n--> 115         return func(*args, **kwargs)\r\n\r\nFile /usr/local/lib/python3.8/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py:1035, in StableDiffusionPipeline.__call__(self, prompt, height, width, num_inference_steps, timesteps, sigmas, guidance_scale, negative_prompt, num_images_per_prompt, eta, generator, latents, prompt_embeds, negative_prompt_embeds, ip_adapter_image, ip_adapter_image_embeds, output_type, return_dict, cross_attention_kwargs, guidance_rescale, clip_skip, callback_on_step_end, callback_on_step_end_tensor_inputs, **kwargs)\r\n   1033 if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):\r\n   1034     progress_bar.update()\r\n-> 1035     if callback is not None and i % callback_steps == 0:\r\n   1036         step_idx = i // getattr(self.scheduler, \"order\", 1)\r\n   1037         callback(step_idx, t, latents)\r\n\r\nTypeError: unsupported operand type(s) for %: 'int' and 'NoneType'\r\n```\r\nhow to fix the problem?",
    "url": "https://github.com/pytorch/xla/issues/8222",
    "state": "closed",
    "labels": [
      "question",
      "xla:tpu"
    ],
    "created_at": "2024-10-05T12:11:52Z",
    "updated_at": "2025-02-27T13:20:08Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/xla",
    "number": 8216,
    "title": "Random OOM and crashes",
    "body": "## \u2753 Questions and Help\r\n\r\nI've found that I'm unable to train more than ~20-80K steps without a crash and it's difficult to figure out how to debug this. In a typical PyTorch training run, I would get a clear OOM message at a particular line, or any other error and this would be printed to log/console.\r\n\r\nHowever, about half the time, my training run simply exits with no message on any rank, and the other half the time it's clearly due to memory with a \"Resource Exhausted\" message. The issue is it's not clear where this new allocation happens (I have a fairly standard decoder based transformer, not even any eval batches, and I'm not using any eager modes). I tried to switch to nightly to get a recent dataloader memory fix, but that doesn't seem to fix it.\r\n\r\nI know there are many flags that can be used for debugging, but it's unclear exactly which ones can be used during training without a large performance hit. I've done all the suggested steps including profiling, and making sure there isn't re-compiliation happening, etc. Perhaps it would be good to clarify the impact of the flags somewhere to make it clear which are safe\u2014and any other advice on how to debug this would be great!\r\n\r\nAlso, I should note this occurs with SPMD multi-node training, I have not spent time testing other modes, but this has happened with between 2 and 8 TPUv4 VMs, both in DDP-like configurations and several other mesh configurations",
    "url": "https://github.com/pytorch/xla/issues/8216",
    "state": "closed",
    "labels": [
      "question",
      "distributed",
      "xla:tpu"
    ],
    "created_at": "2024-10-04T18:51:52Z",
    "updated_at": "2025-02-27T13:21:33Z",
    "user": "alexanderswerdlow"
  },
  {
    "repo": "pytorch/xla",
    "number": 8215,
    "title": "how to use all tpu core in pytorch xla",
    "body": "## \u2753 Questions and Help\r\nI follow the code in https://github.com/pytorch/xla/blob/master/contrib/kaggle/distributed-pytorch-xla-basics-with-pjrt.ipynb\r\n\r\nBut use xmp.spawn(print_device, args=(lock,), nprocs=8, start_method='fork')\r\n\r\nthe source code\r\n```\r\nimport os\r\nos.environ.pop('TPU_PROCESS_ADDRESSES')\r\n\r\nimport torch_xla.core.xla_model as xm\r\nimport torch_xla.distributed.xla_multiprocessing as xmp\r\nimport multiprocessing as mp\r\nlock = mp.Manager().Lock()\r\n\r\ndef print_device(i, lock):\r\n    device = xm.xla_device()\r\n    with lock:\r\n        print('process', i, device)\r\n        \r\nxmp.spawn(print_device, args=(lock,), nprocs=8, start_method='fork')\r\n```\r\nWARNING:root:Unsupported nprocs (8), ignoring...\r\nprocess 4 xla:0\r\nprocess 5 xla:1\r\nprocess 0 xla:0\r\nprocess 1 xla:1\r\nprocess 2 xla:0\r\nprocess 3 xla:1\r\nprocess 6 xla:0\r\nprocess 7 xla:1\r\n\r\nxla just can see 2 xla device. But when I run xm.get_xla_supported_devices() it list all ['xla:0', 'xla:1', 'xla:2', 'xla:3', 'xla:4', 'xla:5', 'xla:6', 'xla:7'] I want to know how to use all tpu cores?",
    "url": "https://github.com/pytorch/xla/issues/8215",
    "state": "closed",
    "labels": [
      "question",
      "distributed",
      "xla:tpu"
    ],
    "created_at": "2024-10-04T02:54:18Z",
    "updated_at": "2025-02-27T13:22:25Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1262,
    "title": "Support Granite Code 3B/8B",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nThe `torchchat` framework provides an excellent platform for embedding models into many different edge-centric platforms.\r\n\r\nThe [Granite Code models](https://huggingface.co/collections/ibm-granite/granite-code-models-6624c5cec322e4c148c8b330), specifically the [3B-128k](https://huggingface.co/ibm-granite/granite-3b-code-instruct-128k) and [8B-128k](https://huggingface.co/ibm-granite/granite-8b-code-instruct-128k) variants, are a family of models from IBM that support a wide variety of code-related tasks. The models are released under the Apache-3 license and are therefore well-suited to embedded use-cases where code intelligence is needed. \r\n\r\nThe request here is to extend the model support in `torchchat` to support running the 3B and 8B long-context variants of Granite Code in order to enable usage of these models across embedded use-cases.\n\n### Alternatives\n\nDepending on the goals of the `torchchat` framework, extending support to non-llama models may or may not be a project goal. There are other embedded frameworks out there (notably `llama.cpp` and the many projects that wrap it), so these can be used to run Granite Code in embedded environments. Our goal at IBM is to provide users with as many choices as possible on how to run all of our Granite family models, so our hope is that `torchchat` can be a strong piece of this story!\n\n### Additional context\n\nThe 3B and 8B models use the `llama` architecture in `transformers`, so they are _close_ to fully supported as-is. There are a few crucial pieces that are present in the `transformers` implementation that are missing in `torchchat`:\r\n\r\n* Safetensors support: https://github.com/pytorch/torchchat/issues/1249\r\n* Tied word embeddings: https://github.com/pytorch/torchchat/issues/1252\r\n* Bias tensors: https://github.com/pytorch/torchchat/issues/1250\r\n* Non-tiktoken/sentencepiece tokenizers: https://github.com/pytorch/torchchat/issues/1251\n\n### RFC (Optional)\n\nI've worked through the initial steps of solving all of these outstanding issues (see the corresponding issues). Once these are solved, the addition of these Granite Code models should consist of the following steps:\r\n\r\n* Adding new entries to [models.json](https://github.com/pytorch/torchchat/blob/main/torchchat/model_config/models.json)\r\n* Adding the right set of model-specific params to [model_params](https://github.com/pytorch/torchchat/tree/main/torchchat/model_params)",
    "url": "https://github.com/pytorch/torchchat/issues/1262",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-03T16:18:08Z",
    "updated_at": "2024-12-19T10:13:55Z",
    "comments": 0,
    "user": "gabe-l-hart"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7196,
    "title": "concatenate_datasets does not preserve shuffling state",
    "body": "### Describe the bug\r\n\r\nAfter concatenate datasets on an iterable dataset, the shuffling state is destroyed, similar to #7156 \r\n\r\nThis means concatenation cant be used for resolving uneven numbers of samples across devices when using iterable datasets in a distributed setting as discussed in #6623 \r\n\r\nI also noticed that the number of shards is the same after concatenation, which I found surprising, but I don't understand the internals well enough to know whether this is actually surprising or not\r\n\r\n### Steps to reproduce the bug\r\n\r\n```python\r\nimport datasets\r\nimport torch.utils.data\r\n\r\n\r\ndef gen(shards):\r\n    yield {\"shards\": shards}\r\n\r\n\r\ndef main():\r\n    dataset1 = datasets.IterableDataset.from_generator(\r\n        gen, gen_kwargs={\"shards\": list(range(25))}  # TODO: how to understand this?\r\n    )\r\n    dataset2 = datasets.IterableDataset.from_generator(\r\n        gen, gen_kwargs={\"shards\": list(range(25, 50))}  # TODO: how to understand this?\r\n    )\r\n    dataset1 = dataset1.shuffle(buffer_size=1)\r\n    dataset2 = dataset2.shuffle(buffer_size=1)\r\n    print(dataset1.n_shards)\r\n    print(dataset2.n_shards)\r\n\r\n    dataset = datasets.concatenate_datasets(\r\n        [dataset1, dataset2]\r\n    )\r\n    print(dataset.n_shards)\r\n    # dataset = dataset1\r\n\r\n    dataloader = torch.utils.data.DataLoader(\r\n        dataset,\r\n        batch_size=8,\r\n        num_workers=0,\r\n    )\r\n\r\n    for i, batch in enumerate(dataloader):\r\n        print(batch)\r\n    print(\"\\nNew epoch\")\r\n\r\n    dataset = dataset.set_epoch(1)\r\n\r\n    for i, batch in enumerate(dataloader):\r\n        print(batch)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    main()\r\n```\r\n\r\n### Expected behavior\r\n\r\nShuffling state should be preserved\r\n\r\n### Environment info\r\n\r\nLatest datasets",
    "url": "https://github.com/huggingface/datasets/issues/7196",
    "state": "open",
    "labels": [],
    "created_at": "2024-10-03T14:30:38Z",
    "updated_at": "2025-03-18T10:56:47Z",
    "comments": 1,
    "user": "alex-hh"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9575,
    "title": "diffusers version update to 0.27.0 from 0.20.0, training code seems not work",
    "body": "I have trained an inpainting model using diffusers 0.20.0. The trained model works as expected. However, something seems wrong when I update the diffusers version to 0.27.0, while keeping the training code and other requirements the same. The training code runs successfully, but the inference outputs look like noise. Is there any point that should be noticed in this case?",
    "url": "https://github.com/huggingface/diffusers/issues/9575",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-03T14:30:21Z",
    "updated_at": "2024-10-15T08:58:36Z",
    "comments": 4,
    "user": "huangjun12"
  },
  {
    "repo": "pytorch/serve",
    "number": 3339,
    "title": "Clarification on minWorkers and maxWorkers parameters",
    "body": "### \ud83d\udcda The doc issue\n\nI have some questions related to model parameters:\r\n1. I know there is no autoscaling in Torchserve, and looking at code, models will scale `minWorkers` number of workers on startup. `maxWorkers` seems to be only used when downscaling a model, meaning if `currentWorkers > maxWorkers`, it will kill `currentWorkers - maxWorkers` workers (`WorkloadManager.java:151`). Given that we'll only scale/downscale number of workers on `scaleWorkers` API call, is there any practical use case of setting `minWorkers` != `maxWorkers`? For example in `examples/cloud_storage_stream_inference/config.properties` `minWorkers` is set to 10 and `maxWorkers` to 1000, when do we want that?\r\n2. In `docs/getting_started.md` it reads: `If you specify model(s) when you run TorchServe, it automatically scales backend workers to the number equal to available vCPUs (if you run on a CPU instance) or to the number of available GPUs (if you run on a GPU instance).`. I can't find any evidence of this behavior in the code, could somebody clarify how if this statement is true and how does it work?\r\n\r\nThank you!\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/3339",
    "state": "open",
    "labels": [],
    "created_at": "2024-10-03T13:07:00Z",
    "updated_at": "2024-10-03T13:07:00Z",
    "comments": 0,
    "user": "krzwaraksa"
  },
  {
    "repo": "huggingface/transformers",
    "number": 33909,
    "title": "How to implement weight decay towards the pre-trained model?",
    "body": "Hello, let me one question.\r\n\r\nIf using HF Trainer for supervised fune-tuning, how do I implement penalizing the distance between starting and current weights? This was shown to be effective in https://arxiv.org/abs/1706.03610",
    "url": "https://github.com/huggingface/transformers/issues/33909",
    "state": "open",
    "labels": [
      "Usage",
      "Feature request"
    ],
    "created_at": "2024-10-03T11:18:53Z",
    "updated_at": "2024-10-22T13:16:26Z",
    "user": "sedol1339"
  },
  {
    "repo": "pytorch/serve",
    "number": 3338,
    "title": "throughput increase non-linearly with number of workers",
    "body": "### \ud83d\udc1b Describe the bug\n\nI am hosting a bert-like model using below torchserve config.\r\n```\r\ninference_address=http://localhost:8080\r\nmanagement_address=http://localhost:8081\r\nmetrics_address=http://localhost:8082\r\nload_models=model_name=weights.mar\r\nasync_logging=true\r\njob_queue_size=200\r\n\r\nmodels={ \"model_name\": {  \"1.0\": { \"minWorkers\": 8 , \"batchSize\": 8 , \"maxBatchDelay\": 10  }  }  }\r\n``` \r\nI have 8 GPUs, this setting will give me 1 worker per gpu.\r\n\r\nthen I did load test with both k6 and locust, and below shows the relationship between number of workers(from 1 to 8) and throughput.\r\n![output](https://github.com/user-attachments/assets/d5b2129c-7dee-47a2-b311-0921e3507554)\r\n\r\n\r\nAs can be seen in the chart, gpu usage is dropping when number of workers increased, so it feels like the load balancer in torchserve leads to the inefficiency. Anyone can give me some clues how can I improve the throughput further?\r\n\n\n### Error logs\n\nthroughput increase non-linearly with number of workers\n\n### Installation instructions\n\ntorchserve = \"^0.10.0\"\n\n### Model Packaging\n\ntorchserve = \"0.10.0\"\n\n### config.properties\n\ninference_address=http://localhost:8080\r\nmanagement_address=http://localhost:8081\r\nmetrics_address=http://localhost:8082\r\nload_models=model_name=weights.mar\r\nasync_logging=true\r\njob_queue_size=200\r\n\r\nmodels={ \"model_name\": {  \"1.0\": { \"minWorkers\": 8 , \"batchSize\": 8 , \"maxBatchDelay\": 10  }  }  }\n\n### Versions\n\n$ python serve/ts_scripts/print_env_info.py\r\n------------------------------------------------------------------------------------------\r\nEnvironment headers\r\n------------------------------------------------------------------------------------------\r\nTorchserve branch:\r\n\r\ntorchserve==0.10.0\r\ntorch-model-archiver==0.11.0\r\n\r\nPython version: 3.11 (64-bit runtime)\r\nPython executable: /home/me/.cache/pypoetry/virtualenvs/pre-deploy-j4GApv9r-py3.11/bin/python\r\n\r\nVersions of relevant python libraries:\r\nnumpy==1.24.3\r\nnvgpu==0.10.0\r\npillow==10.4.0\r\npsutil==6.0.0\r\nrequests==2.32.3\r\ntorch==2.3.1+cu121\r\ntorch-model-archiver==0.11.0\r\ntorch_tensorrt==2.3.0+cu121\r\ntorchserve==0.10.0\r\ntorchvision==0.18.1\r\ntransformers==4.44.2\r\nwheel==0.44.0\r\ntorch==2.3.1+cu121\r\n**Warning: torchtext not present ..\r\ntorchvision==0.18.1\r\n**Warning: torchaudio not present ..\r\n\r\nJava Version:\r\n\r\n\r\nOS: Debian GNU/Linux 12 (bookworm)\r\nGCC version: (Debian 12.2.0-14) 12.2.0\r\nClang version: 14.0.6\r\nCMake version: version 3.25.1\r\n\r\nIs CUDA available: Yes\r\nCUDA runtime version: N/A\r\nGPU models and configuration:\r\nGPU 0: NVIDIA A100-SXM4-80GB\r\nGPU 1: NVIDIA A100-SXM4-80GB\r\nGPU 2: NVIDIA A100-SXM4-80GB\r\nGPU 3: NVIDIA A100-SXM4-80GB\r\nGPU 4: NVIDIA A100-SXM4-80GB\r\nGPU 5: NVIDIA A100-SXM4-80GB\r\nGPU 6: NVIDIA A100-SXM4-80GB\r\nGPU 7: NVIDIA A100-SXM4-80GB\r\nNvidia driver version: 550.54.15\r\ncuDNN version: None\r\n\r\n\r\nEnvironment:\r\nlibrary_path (LD_/DYLD_):\n\n### Repro instructions\n\nwget http://mar_file.mar\r\ntorch-model-archiver ...\r\ntorchserve --start\n\n### Possible Solution\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/3338",
    "state": "open",
    "labels": [],
    "created_at": "2024-10-03T07:32:22Z",
    "updated_at": "2024-10-08T10:33:28Z",
    "comments": 2,
    "user": "vandesa003"
  },
  {
    "repo": "pytorch/ao",
    "number": 1002,
    "title": "How to calibrate a w8a8 quantized model\uff1f",
    "body": "I used the following code to quantize an LLM, employing an w8a8 quantization setting:\r\n\r\n```python\r\nmodel = AutoModelForCausalLM.from_pretrained(\"./Qwen1.5-0.5B-Chat\").to(dtype=torch.bfloat16, device='cpu')\r\nquantize_(model, int8_dynamic_activation_int8_weight())\r\n```\r\n\r\nEverything is running smoothly, but the model's accuracy has decreased significantly. How can I calibrate a quantized model to enhance its accuracy?\r\n\r\n---\r\n\r\nI have another question:\r\n\r\nI printed out a parameter and noticed that the weights were quantized using per-channel quantization. What is the purpose of the fp16 AffineQuantizedTensor? Shouldn't the activation only require one scale parameter when using per-tensor quantization?\r\n\r\nI'm not very familiar with the quantization mechanism in PyTorch, and I hope you can give me some tips.\r\n\r\n```plaintxt\r\nParameter Name: model.layers.0.self_attn.q_proj.weight\r\nParameter Shape: torch.Size([1024, 1024])\r\nParameter Values: LinearActivationQuantizedTensor(AffineQuantizedTensor(data=tensor([[ 0.2148, -0.1196, -0.0898,  ..., -0.0388,  0.0869,  0.0898],\r\n        [ 0.0830, -0.2188, -0.1436,  ...,  0.0566,  0.0679,  0.0830],\r\n        [ 0.0552, -0.2480, -0.1621,  ...,  0.0242,  0.0688,  0.0830],\r\n        ...,\r\n        [ 0.0742, -0.0417, -0.1641,  ..., -0.0356,  0.1543, -0.0566],\r\n        [-0.0640,  0.0771,  0.2695,  ...,  0.0537, -0.1982,  0.0938],\r\n        [-0.1216,  0.1025, -0.1074,  ..., -0.0327,  0.1592, -0.1123]],\r\n       dtype=torch.bfloat16)..., shape=torch.Size([1024, 1024]), block_size=(1, 1024), device=cpu, dtype=torch.bfloat16, requires_grad=False, layout_tensor=PlainAQTLayout(data=tensor([[ 72, -40, -30,  ..., -13,  29,  30],\r\n        [ 22, -58, -38,  ...,  15,  18,  22],\r\n        [ 16, -72, -47,  ...,   7,  20,  24],\r\n        ...,\r\n        [ 25, -14, -55,  ..., -12,  52, -19],\r\n        [-19,  23,  80,  ...,  16, -59,  28],\r\n        [-26,  22, -23,  ...,  -7,  34, -24]], dtype=torch.int8)... , scale=tensor([0.0030, 0.0038, 0.0034,  ..., 0.0030, 0.0034, 0.0047],\r\n       dtype=torch.bfloat16)... , zero_point=tensor([0, 0, 0,  ..., 0, 0, 0])... , layout_type=PlainLayoutType())), <function _int8_symm_per_token_reduced_range_quant at 0x751a4815fe20>)\r\n```",
    "url": "https://github.com/pytorch/ao/issues/1002",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-03T03:55:31Z",
    "updated_at": "2024-10-04T01:26:58Z",
    "user": "chenghuaWang"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7189,
    "title": "Audio preview in dataset viewer for audio array data without a path/filename",
    "body": "### Feature request\r\n\r\nHuggingface has quite a comprehensive set of guides for [audio datasets](https://huggingface.co/docs/datasets/en/audio_dataset). It seems, however, all these guides assume the audio array data to be decoded/inserted into a HF dataset always originates from individual files. The [Audio-dataclass](https://github.com/huggingface/datasets/blob/3.0.1/src/datasets/features/audio.py#L20) appears designed with this assumption in mind. Looking at its source code it returns a dictionary with the keys `path`, `array` and `sampling_rate`. \r\n\r\nHowever, sometimes users may have different pipelines where they themselves decode the audio array. This feature request has to do with wishing some clarification in guides on whether it is possible, and in such case how users can insert already decoded audio array data into datasets (pandas DataFrame, HF dataset or whatever) that are later saved as parquet, and still get a functioning audio preview in the dataset viewer. \r\n\r\nDo I perhaps need to write a tempfile of my audio array slice to wav and capture the bytes object with `io.BytesIO` and pass that to `Audio()`? \r\n\r\n### Motivation\r\n\r\nI'm working with large audio datasets, and my pipeline reads (decodes) audio from larger files, and slices the relevant portions of audio from that larger file based on metadata I have available. \r\n\r\nThe pipeline is designed this way to avoid having to store multiple copies of data, and to avoid having to store tens of millions of small files. \r\n\r\nI tried [test-uploading parquet files](https://huggingface.co/datasets/Lauler/riksdagen_test) where I store the audio array data of decoded slices of audio in an `audio` column with a dictionary with the keys `path`, `array` and `sampling_rate`. But I don't know the secret sauce of what the Huggingface Hub expects and requires to be able to display audio previews correctly. \r\n\r\n### Your contribution\r\n\r\nI could contribute a tool agnostic guide of creating HF audio datasets directly as parquet to the HF documentation if there is an interest. Provided you help me figure out the secret sauce of what the dataset viewer expects to display the preview correctly.",
    "url": "https://github.com/huggingface/datasets/issues/7189",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-10-02T16:38:38Z",
    "updated_at": "2024-10-02T17:01:40Z",
    "comments": 0,
    "user": "Lauler"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 958,
    "title": "Zombies in memory - something is blocking (re)loading of Whisper after a page is closed and re-opened",
    "body": "### Question\n\nI've been trying to debug this issue all afternoon, but haven't gotten any further. The code runs on desktop, but not on Android Chrome.\r\n\r\nThis is with V3 Alpha 19.\r\n\r\n<img width=\"571\" alt=\"Screenshot 2024-10-02 at 16 06 16\" src=\"https://github.com/user-attachments/assets/c5fbb2cb-0cdf-431a-8099-021d19a10384\">\r\n\r\n<img width=\"569\" alt=\"Screenshot 2024-10-02 at 16 06 40\" src=\"https://github.com/user-attachments/assets/d09a6b09-0a05-4d38-af0e-d1c88a08003c\">\r\n\r\n<img width=\"569\" alt=\"Screenshot 2024-10-02 at 16 06 56\" src=\"https://github.com/user-attachments/assets/fc3de899-dfdb-425a-92c1-69e3c40b4fd8\">\r\n\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/958",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-10-02T14:10:27Z",
    "updated_at": "2024-10-18T12:47:17Z",
    "user": "flatsiedatsie"
  },
  {
    "repo": "pytorch/vision",
    "number": 8669,
    "title": "performance degradation in to_pil_image after v0.17",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\n`torchvision.transforms.functional.to_pil_image `is much slower when converting torch.float16 image tensors to PIL Images based on my benchmarks (serializing 360 images):\r\n\r\nDependencies: \r\n```\r\nPython 3.11\r\nPillow 10.4.0\r\n```\r\nBefore (torch 2.0.1, torchvision v0.15.2, [Code here](https://github.com/pytorch/vision/blob/fa99a5360fbcd1683311d57a76fcc0e7323a4c1e/torchvision/transforms/functional.py#L244)): 23 seconds\r\nAfter ( torch 2.2.0, torchvision v0.17, [Code here](https://github.com/pytorch/vision/blob/b2383d44751bf85e58cfb9223bbf4e5961c09fa1/torchvision/transforms/functional.py#L245)): 53 seconds\r\n\r\nHow to reproduce:\r\n```python\r\nimport torch\r\nfrom torchvision.transforms.functional import to_pil_image\r\n\r\nrand_img_tensor = torch.rand(3, 512, 512, dtype=torch.float16)\r\nstart_time = time.time()\r\nfor _ in range(50):\r\n    pil_img = to_pil_image(rand_img_tensor)\r\n\r\nend_time = time.time()\r\nprint(end_time - start_time) # seconds\r\n```\r\n\r\nRun the above script with both versions of dependencies listed, and the time difference is apparent.\r\n\r\nThe cause seems to be [this PR](https://github.com/pytorch/vision/commit/15c166ac127db5c8d1541b3485ef5730d34bb68a)",
    "url": "https://github.com/pytorch/vision/issues/8669",
    "state": "open",
    "labels": [],
    "created_at": "2024-10-02T08:25:01Z",
    "updated_at": "2024-10-25T13:06:15Z",
    "comments": 5,
    "user": "seymurkafkas"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9567,
    "title": "[community] Improving docstrings and type hints",
    "body": "There are many instances in the codebase where our docstring/typing convention is not followed. We'd like to work on improving this with your help!\r\n\r\nOur convention looks like:\r\n\r\n```python3\r\ndef function_name(parameter_1: Union[str, List[str]], parameter_2: Optional[int] = None, parameter_3: float = 42.0) -> Civilization:\r\n    r\"\"\"\r\n    Function that creates a simulation.\r\n\r\n    Args:\r\n        parameter_1 (`str` or `List[str]`):\r\n            Description of game level.\r\n        parameter_2 (`int`, *optional*):\r\n            Kardashev scale of civilization.\r\n        parameter_3 (`float`, defaults to `42.0`):\r\n            Difficulty scale.\r\n\r\n    Returns:\r\n        [`~simulations.objects.Civilization`]\r\n            A civilization simulation with provided initialization parameters.\r\n    \"\"\"\r\n```\r\n\r\nSome examples that don't follow the docstring convention are:\r\n- [this](https://github.com/huggingface/diffusers/blob/c4a8979f3018fbffee33304c1940561f7a5cf613/src/diffusers/models/embeddings.py#L89): missing explanations\r\n- [this](https://github.com/huggingface/diffusers/blob/33fafe3d143ca8380a9e405e7acfa69091d863fb/src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3.py#L132): does not contain mixin-related documentation whereas as [this](https://github.com/huggingface/diffusers/blob/33fafe3d143ca8380a9e405e7acfa69091d863fb/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L154) does\r\n- [this](https://github.com/huggingface/diffusers/blob/c4a8979f3018fbffee33304c1940561f7a5cf613/src/diffusers/utils/import_utils.py#L672): function explanation after \"Args\", but should be before\r\n- [this](https://github.com/huggingface/diffusers/blob/c4a8979f3018fbffee33304c1940561f7a5cf613/src/diffusers/pipelines/deepfloyd_if/pipeline_output.py#L14): same reason as above\r\n- [this](https://github.com/huggingface/diffusers/blob/c4a8979f3018fbffee33304c1940561f7a5cf613/src/diffusers/models/embeddings.py#L518): incorrect indentation\r\n\r\nThere are also many places where docstrings are completely missing or inadequately explained. If you feel something needs an improvement, you can open a PR with your suggestions too! Additionally, type hints are not appropriate/correctly used at many occurrences and mismatch the accompanying docstrings - these could use an improvement too!\r\n\r\nPlease limit your PRs to changes to a single file in each PR. Changes must be only related to docstrings/type hints. Feel free to ping either @yiyixuxu, @stevhliu or me for reviews.",
    "url": "https://github.com/huggingface/diffusers/issues/9567",
    "state": "closed",
    "labels": [
      "documentation",
      "good first issue",
      "contributions-welcome"
    ],
    "created_at": "2024-10-02T03:20:44Z",
    "updated_at": "2025-11-13T22:45:59Z",
    "comments": 16,
    "user": "a-r-r-o-w"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7186,
    "title": "pinning `dill<0.3.9` without pinning `multiprocess` ",
    "body": "### Describe the bug\n\nThe [latest `multiprocess` release](https://github.com/uqfoundation/multiprocess/releases/tag/0.70.17) requires `dill>=0.3.9` which causes issues when installing `datasets` without backtracking during package version resolution. Is it possible to add a pin for multiprocess so something like `multiprocess<=0.70.16` so that the `dill` version is compatible?\n\n### Steps to reproduce the bug\n\nNA\n\n### Expected behavior\n\nNA\n\n### Environment info\n\nNA",
    "url": "https://github.com/huggingface/datasets/issues/7186",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-01T22:29:32Z",
    "updated_at": "2024-10-02T06:08:24Z",
    "comments": 0,
    "user": "shubhbapna"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1249,
    "title": "Support Huggingface models from safetensors",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\r\n\r\nThere are many models on Huggingface that are published as `safetensors` rather than `model.pth` checkpoints. The request here is to support converting and loading those checkpoints into a format that is usable with `torchchat`.\r\n\r\nThere are several places where this limitation is currently enforced:\r\n\r\n* [_download_hf_snapshot](https://github.com/pytorch/torchchat/blob/main/torchchat/cli/download.py#L36) method explicitly ignores `safetensors` files.\r\n* [convert_hf_checkpoint](https://github.com/pytorch/torchchat/blob/main/torchchat/cli/convert_hf_checkpoint.py#L44) explicitly looks for `pytorch_model.bin.index.json` which would be named differently for models that use `safetensors` (e.g. `model.safetensors.index.json`)\r\n* [convert_hf_checkpoint](https://github.com/pytorch/torchchat/blob/main/torchchat/cli/convert_hf_checkpoint.py#L99) only supports `torch.load` to load the `state_dict` rather than `safetensors.torch.load`\r\n\r\n### Alternatives\r\n\r\nCurrently, this `safetensors` -> `model.pth` can be accomplished manually after downloading a model locally, so this could be solved with documentation instead of code.\r\n\r\n### Additional context\r\n\r\nThis issue is a piece of the puzzle for adding support for Granite Code 3b/8b which use the `llama` architecture in `transormers`, but take advantage several pieces of the architecture that are not currently supported by `torchchat`. The work-in-progress for Granite Code can be found on my fork: https://github.com/gabe-l-hart/torchchat/tree/GraniteCodeSupport\r\n\r\n### RFC (Optional)\r\n\r\nI have a working implementation to support `safetensors` during download and conversion that I plan to submit as a PR. The changes address the three points in code referenced above:\r\n\r\n1. Allow the download of `safetensors` files in `_download_hf_snapshot`\r\n    * I'm not yet sure how to avoid double-downloading weights for models that have both `safetensors` and `model.pth`, so will look to solve this before concluding the work\r\n2. When looking for the tensor index file, search for all files ending in `.index.json`, and if a single file is found, use that one\r\n3. When loading the `state_dict`, use the correct method based on the type of file (`torch.load` or `safetensors.torch.load`)",
    "url": "https://github.com/pytorch/torchchat/issues/1249",
    "state": "closed",
    "labels": [],
    "created_at": "2024-10-01T22:07:59Z",
    "updated_at": "2024-10-04T19:18:22Z",
    "comments": 2,
    "user": "gabe-l-hart"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 594,
    "title": "Support Gemma2 in torchtitan",
    "body": "Are there any plans to support Gemma2 in the torchtitan? I tried to use torchtitan to finetune Gemma2 model, but stuck on the following problem: how to parallelize tied layer in Gemma2 model? Maybe somebody kwon the solution for this problem \ud83d\ude04 ",
    "url": "https://github.com/pytorch/torchtitan/issues/594",
    "state": "closed",
    "labels": [
      "bug",
      "question"
    ],
    "created_at": "2024-10-01T11:50:15Z",
    "updated_at": "2025-03-20T18:32:31Z",
    "user": "pansershrek"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1499,
    "title": "Error 500 \"RPError\" | OpenID Connect + SafeNet Trusted Access (STA)",
    "body": "Hello,\r\n\r\nI would like to deploy OpenID Connect with SafeNet Trusted Access (STA).\r\n\r\nFrom this 3-minute video, I've done all the steps, except for OAuth.tools which I don't use :\r\nhttps://www.youtube.com/watch?v=hSWXFSadpQQ\r\n\r\nHere's my bash script that deploys the containers | ```deploy.sh``` :\r\n\r\n```bash\r\n#!/bin/bash\r\n\r\n# previous containers removed\r\nsudo docker rm -f ollama\r\nsudo docker rm -f mongodb\r\nsudo docker rm -f chat-ui\r\nsudo docker rm -f nginx\r\n\r\n# previous networks removed\r\nsudo docker network rm backend >/dev/null 2>&1\r\nsudo docker network rm proxy >/dev/null 2>&1\r\n\r\n# create networks\r\nsudo docker network create backend\r\nsudo docker network create proxy\r\n\r\n# ollama\r\nsudo docker run -d -p 11434:11434 -e HTTPS_PROXY=\"${HTTPS_PROXY}\" -v /home/<my-user>/chat-ui/ollama:/root/.ollama --name ollama --network backend ollama-with-ca\r\nsleep 5\r\nsudo docker exec ollama taskset -c 0-40 ollama run llama3.1\r\n\r\n# mongodb\r\nsudo docker run -d -p 27017:27017 -v mongodb-data:/data/db --name mongodb --network backend mongo:latest\r\n\r\n# chat-ui\r\nsudo docker run -d -p 3000:3000 -e HTTPS_PROXY=\"${HTTPS_PROXY}\" --mount type=bind,source=\"$(pwd)/.env.local\",target=/app/.env.local -v chat-ui:/data --name chat-ui --network backend ghcr.io/huggingface/chat-ui-db\r\nsudo docker network connect proxy chat-ui\r\n\r\n# nginx\r\nsudo docker run -d -p 80:80 -p 443:443 -v \"$(pwd)/nginx:/etc/nginx/conf.d\" -v \"$(pwd)/ssl:/etc/ssl\" --name nginx --network proxy nginx:latest\r\n```\r\n\r\nHere's my ```nginx``` configuration :\r\n\r\n```nginx\r\nserver {\r\n  listen 80 default_server;\r\n  listen [::]:80 default_server;\r\n  server_name <my-chat-ui>.fr;\r\n  return 301 https://$host$request$uri;\r\n}\r\n\r\nserver {\r\n  listen 443 ssl;\r\n  server_name <my-chat-ui>.fr; \r\n  ssl_certificate /etc/ssl/chat-ui.crt;\r\n  ssl_certificate_key /etc/ssl/chat-ui.key;\r\n\r\n  proxy_connect_timeout   60;\r\n  proxy_send_timeout      60;\r\n  proxy_read_timeout      60;\r\n  send_timeout            60;\r\n  client_max_body_size    2G;\r\n  proxy_buffering off;\r\n  client_header_buffer_size 8k;\r\n\r\n  location / {\r\n    proxy_pass http://chat-ui:3000;\r\n    proxy_set_header Host $host;\r\n    proxy_set_header X-Real-IP $remote_addr;\r\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n    proxy_set_header X-Forwarded-Proto $scheme;\r\n\r\n    add_header 'Access-Control-Allow-Origin' 'https://<my-chat-ui>.fr' always;\r\n  }\r\n}\r\n```\r\n\r\nFinally, here's my ```.env.local``` using Llama3.1 8B model :\r\n\r\n```.env\r\nMONGODB_URL=mongodb://mongodb:27017\r\nHF_TOKEN=hf_*****\r\n\r\nOPENID_CONFIG=`{\r\n  \"PROVIDER_URL\": \"https://idp.eu.safenetid.com/auth/realms/<realm-ID>-STA/protocol/openid-connect/auth\",\r\n  \"CLIENT_ID\": \"*****\",\r\n  \"CLIENT_SECRET\": \"*****\",\r\n  \"SCOPES\": \"openid profile\"\r\n}`\r\n\r\nMODELS=`[\r\n  {\r\n    \"name\": \"Ollama | Llama3.1\",\r\n    \"id\": \"llama3.1-8b\",\r\n    \"description\": \"llama3.1-8b\",\r\n    \"chatPromptTemplate\": \"<|begin_of_text|>{{#if @root.preprompt}}<|start_header_id|>system<|end_header_id|>\\n\\n{{@root.preprompt}}<|eot_id|>{{/if}}{{#each messages}}{{#ifUser}}<|start_header_id|>user<|end_header_id|>\\n\\n{{content}}<|eot_id|>{{/ifUser}}{{#ifAssistant}}<|start_header_id|>assistant<|end_header_id|>\\n\\n{{content}}<|eot_id|>{{/ifAssistant}}{{/each}}<|start_header_id|>assistant<|end_header_id|>\\n\\n\",\r\n    \"parameters\": {\r\n      \"temperature\": 0.1,\r\n      \"top_p\": 0.95,\r\n      \"repetition_penalty\": 1.2,\r\n      \"top_k\": 50,\r\n      \"truncate\": 3072,\r\n      \"max_new_tokens\": 1024,\r\n      \"stop\": [\"<|end_of_text|>\", \"<|eot_id|>\"]\r\n    },\r\n    \"endpoints\": [\r\n      {\r\n        \"type\": \"ollama\",\r\n        \"url\" : \"http://ollama:11434\",\r\n        \"ollamaName\" : \"llama3.1:latest\"\r\n      }\r\n    ]\r\n  }\r\n]`\r\n```\r\n\r\nAnd I got this error when I press on \"Login\" button : \r\n\r\n![login-button-pressed](https://github.com/user-attachments/assets/0e0846d1-8737-4b18-9607-51ee7f50adb9)\r\n\r\nWhen I do the command ```sudo docker logs chat-ui```, I see this line :\r\n\r\n```{\"level\":50,\"time\":1727703253975,\"pid\":30,\"hostname\":\"fe9d8f548283\",\"locals\":{\"sessionId\":\"3b700cd7b4efc2a2b47c0f13134904e01f01c3b7d6ff05c6726390e19ea5d431\"},\"url\":\"https://ia.chu-lyon.fr/login\",\"params\":{},\"request\":{},\"message\":\"Internal Error\",\"error\":{\"name\":\"RPError\"},\"errorId\":\"8d7d74e3-b12c-4c1e-9dc5-9847d5e61ea2\",\"status\":500}```\r\n\r\n**Note that by adding the ```OPENID_CONFIG``` (with probably incorrect data), the application stops working completely and I can't launch prompts or delete/edit existing ones !**\r\n\r\n**When I comment ```OPENID_CONFIG```, everything starts working properly again.**\r\n\r\nI don't really know what to put exactly, especially for ```PROVIDER_URL``` and ```SCOPES```.\r\n\r\nCan you help me to resolve this issue ?\r\n\r\nThanks in advance.",
    "url": "https://github.com/huggingface/chat-ui/issues/1499",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-09-30T12:54:16Z",
    "updated_at": "2024-09-30T12:57:51Z",
    "comments": 0,
    "user": "avirgos"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9560,
    "title": "FP32 training for sd3 controlnet",
    "body": "Hi,\r\nI have been use `examples\\controlnet\\train_controlnet_sd3.py` for controlnet training for a while, and I have some confusion and would like your advice\r\n\r\n1. In the line 1097:\r\n`vae.to(accelerator.device, dtype=torch.float32)`\r\nIt seems we should use fp32 for VAE, but as far as I know, SD3 currently has no fp32 checkpoints, so does it really work if we populate fp16 into fp32?\r\n\r\n2. Before running the train script, `accelerate config` can specify whether to use mixed precision or not, since SD3 only has fp16 checkpoint at present, I don't know how to choose this option, whether to choose 'fp16' or 'no'.\r\n\r\nReally appreciate your advice!\r\n@sayakpaul @DavyMorgan \r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9560",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-09-30T08:07:04Z",
    "updated_at": "2024-10-31T15:13:19Z",
    "comments": 11,
    "user": "xduzhangjiayu"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 2578,
    "title": "What is the highest Python version currently supported?",
    "body": "### Describe the bug\n\nI utilized Hugging Face Spaces to construct my application, which was built using Gradio, zerogpuspace, and the link is: https://huggingface.co/spaces/tanbw/CosyVoice\r\nIn the readme.md, I specified the Python version as 3.8.9, but the version of Python that the application prints out is still 3.1. What is the highest Python version currently supported?\r\n![image](https://github.com/user-attachments/assets/3a6e426c-2cef-485e-b1b7-8a6edab1cd65)\r\n\r\n![image](https://github.com/user-attachments/assets/0afc1e2a-8014-4130-9426-1effeebbfbfa)\r\n\r\n![image](https://github.com/user-attachments/assets/9731452b-5535-450e-9ece-32741216ca79)\r\n\n\n### Reproduction\n\n_No response_\n\n### Logs\n\n_No response_\n\n### System info\n\n```shell\n- huggingface_hub version: 0.24.5\r\n- Platform: Linux-5.10.223-211.872.amzn2.x86_64-x86_64-with-glibc2.36\r\n- Python version: 3.10.13\r\n- Running in iPython ?: No\r\n- Running in notebook ?: No\r\n- Running in Google Colab ?: No\r\n- Token path ?: /home/user/.cache/huggingface/token\r\n- Has saved token ?: False\r\n- Configured git credential helpers: store\r\n- FastAI: N/A\r\n- Tensorflow: N/A\r\n- Torch: 2.0.1\r\n- Jinja2: 3.1.4\r\n- Graphviz: N/A\r\n- keras: N/A\r\n- Pydot: N/A\r\n- Pillow: 10.4.0\r\n- hf_transfer: 0.1.8\r\n- gradio: 4.44.0\r\n- tensorboard: N/A\r\n- numpy: 1.26.4\r\n- pydantic: 2.7.0\r\n- aiohttp: 3.10.0\r\n- ENDPOINT: https://huggingface.co\r\n- HF_HUB_CACHE: /home/user/.cache/huggingface/hub\r\n- HF_ASSETS_CACHE: /home/user/.cache/huggingface/assets\r\n- HF_TOKEN_PATH: /home/user/.cache/huggingface/token\r\n- HF_HUB_OFFLINE: False\r\n- HF_HUB_DISABLE_TELEMETRY: False\r\n- HF_HUB_DISABLE_PROGRESS_BARS: None\r\n- HF_HUB_DISABLE_SYMLINKS_WARNING: False\r\n- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False\r\n- HF_HUB_DISABLE_IMPLICIT_TOKEN: False\r\n- HF_HUB_ENABLE_HF_TRANSFER: True\r\n- HF_HUB_ETAG_TIMEOUT: 10\r\n- HF_HUB_DOWNLOAD_TIMEOUT: 10\n```\n",
    "url": "https://github.com/huggingface/huggingface_hub/issues/2578",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-09-29T14:37:38Z",
    "updated_at": "2024-09-30T07:05:29Z",
    "user": "tanbw"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9555,
    "title": "[Flux Controlnet] Add control_guidance_start and control_guidance_end",
    "body": "It'd be nice to have `control_guidance_start` and `control_guidance_start` parameters added to flux Controlnet and Controlnet Inpainting pipelines.\r\n\r\nI'm currently making experiments with Flux Controlnet Inpainting but the results are poor even with a `controlnet_conditioning_scale` set to 0.6. \r\n\r\nI have to set `controlnet_conditioning_scale` to 0.4 to have non broken results.\r\n\r\nMaybe giving more control with the guidance start and end would help reach better results ?\r\n\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9555",
    "state": "closed",
    "labels": [
      "help wanted",
      "Good second issue",
      "contributions-welcome"
    ],
    "created_at": "2024-09-29T12:37:39Z",
    "updated_at": "2024-10-10T12:29:03Z",
    "comments": 8,
    "user": "simbrams"
  },
  {
    "repo": "huggingface/hub-docs",
    "number": 1435,
    "title": "How to check if a space is duplicated from another one using HF API?",
    "body": "I cannot find any related specifications in the documentation...Thanks!",
    "url": "https://github.com/huggingface/hub-docs/issues/1435",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-28T23:52:08Z",
    "updated_at": "2025-01-16T17:08:34Z",
    "user": "zhimin-z"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9551,
    "title": "How to use x-labs flux controlnet models in diffusers?",
    "body": "### Model/Pipeline/Scheduler description\r\n\r\nThe following controlnets are supported in Comfy UI, but was wondering how we can use these in diffusers as well for developers. Afaik, there is no from_single_file method for FluxControlNet to load the safetensors?\r\n\r\n### Open source status\r\n\r\n- [x] The model implementation is available.\r\n- [x] The model weights are available (Only relevant if addition is not a scheduler).\r\n\r\n### Provide useful links for the implementation\r\n\r\nhttps://huggingface.co/XLabs-AI/flux-controlnet-canny\r\nhttps://huggingface.co/XLabs-AI/flux-controlnet-canny-v3\r\n\r\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9551",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-28T20:01:15Z",
    "updated_at": "2024-09-29T06:59:46Z",
    "user": "neuron-party"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 2583,
    "title": "How to turn on the KV cache when serve a model?",
    "body": "### System Info\n\nTGI 2.3.0\n\n### Information\n\n- [ ] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [ ] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\nThe TTFT is really slower than VLLM. Can't be improved? if so how to turn on the KV cache when launch a model?\r\n\r\n```\r\nmodel=HuggingFaceH4/zephyr-7b-beta\r\n# share a volume with the Docker container to avoid downloading weights every run\r\nvolume=$PWD/data\r\n\r\ndocker run --gpus all --shm-size 1g -p 8080:80 -v $volume:/data \\\r\n    ghcr.io/huggingface/text-generation-inference:2.3.0 --model-id $model\r\n```\n\n### Expected behavior\n\nImprove the TTFT and latency ",
    "url": "https://github.com/huggingface/text-generation-inference/issues/2583",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-28T19:32:15Z",
    "updated_at": "2024-10-25T12:47:02Z",
    "user": "hahmad2008"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1222,
    "title": "Clear model download documents",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nFrom the README, its not very clear how to download different flavor/sizes of the models from HF, unless someone go to the next section and find the inventory list https://github.com/pytorch/torchchat#download-weights\r\nmight be helpful to add the inventory list  command upper before the the download command.\r\n\r\nAlso as we have 3.2 it would be great to update the docs. \r\n\r\n\r\n```\r\n\r\n/torchchat$ python3 torchchat.py list\r\n\r\nModel                                        Aliases                                                    Downloaded \r\n-------------------------------------------- ---------------------------------------------------------- -----------\r\nmeta-llama/llama-2-7b-hf                     llama2-base, llama2-7b                                                \r\nmeta-llama/llama-2-7b-chat-hf                llama2, llama2-chat, llama2-7b-chat                                   \r\nmeta-llama/llama-2-13b-chat-hf               llama2-13b-chat                                                       \r\nmeta-llama/llama-2-70b-chat-hf               llama2-70b-chat                                                       \r\nmeta-llama/meta-llama-3-8b                   llama3-base                                                           \r\nmeta-llama/meta-llama-3-8b-instruct          llama3, llama3-chat, llama3-instruct                       Yes        \r\nmeta-llama/meta-llama-3-70b-instruct         llama3-70b                                                            \r\nmeta-llama/meta-llama-3.1-8b                 llama3.1-base                                                         \r\nmeta-llama/meta-llama-3.1-8b-instruct        llama3.1, llama3.1-chat, llama3.1-instruct                            \r\nmeta-llama/meta-llama-3.1-70b-instruct       llama3.1-70b                                                          \r\nmeta-llama/meta-llama-3.1-8b-instruct-tune   llama3.1-tune, llama3.1-chat-tune, llama3.1-instruct-tune             \r\nmeta-llama/meta-llama-3.1-70b-instruct-tune  llama3.1-70b-tune                                                     \r\nmeta-llama/meta-llama-3.2-1b                 llama3.2-1b-base                                                      \r\nmeta-llama/meta-llama-3.2-1b-instruct        llama3.2-1b, llama3.2-1b-chat, llama3.2-1b-instruct                   \r\nmeta-llama/llama-guard-3-1b                  llama3-1b-guard, llama3.2-1b-guard                                    \r\nmeta-llama/meta-llama-3.2-3b                 llama3.2-3b-base                                                      \r\nmeta-llama/meta-llama-3.2-3b-instruct        llama3.2-3b, llama3.2-3b-chat, llama3.2-3b-instruct                   \r\nmeta-llama/llama-3.2-11b-vision              llama3.2-11B-base, Llama-3.2-11B-Vision-base                          \r\nmeta-llama/llama-3.2-11b-vision-instruct     llama3.2-11B, Llama-3.2-11B-Vision, Llama-3.2-mm                      \r\nmeta-llama/codellama-7b-python-hf            codellama, codellama-7b                                               \r\nmeta-llama/codellama-34b-python-hf           codellama-34b                                                         \r\nmistralai/mistral-7b-v0.1                    mistral-7b-v01-base                                                   \r\nmistralai/mistral-7b-instruct-v0.1           mistral-7b-v01-instruct                                               \r\nmistralai/mistral-7b-instruct-v0.2           mistral, mistral-7b, mistral-7b-instruct                              \r\nopenlm-research/open_llama_7b                open-llama, open-llama-7b                                             \r\nstories15m                                                                                                         \r\nstories42m                                                                                                         \r\nstories110m                                                                                                        \r\n\r\n```\r\n### Versions\r\n\r\n```\r\nCollecting environment information...\r\nPyTorch version: 2.5.0.dev20240901+cu121\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 20.04.6 LTS (x86_64)\r\nGCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0\r\nClang version: Could not collect\r\nCMake version: version 3.30.3\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.10.14 (main, May  6 2024, 19:42:50) [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-5.15.0-1068-aws-x86_64-with-glibc2.31\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                         x86_64\r\nCPU op-mode(s):                       32-bit, 64-bit\r\nByte Order:                           Little Endian\r\nAddress sizes:                        46 bits physical, 48 bits virtual\r\nCPU(s):    ",
    "url": "https://github.com/pytorch/torchchat/issues/1222",
    "state": "closed",
    "labels": [
      "documentation",
      "actionable"
    ],
    "created_at": "2024-09-27T22:16:38Z",
    "updated_at": "2024-09-30T16:02:55Z",
    "comments": 4,
    "user": "HamidShojanazeri"
  },
  {
    "repo": "pytorch/xla",
    "number": 8088,
    "title": "Is this content still relevant?",
    "body": "## \ud83d\udcda Documentation\r\n\r\nxla/docs/README contains the following text. Is this text still relevant? The link to CircleCi is broken and I'm not sure if this information is useful:\r\n-------------------------------\r\n## Publish documentation for a new release.\r\n\r\nCI job `pytorch_xla_linux_debian11_and_push_doc` is specified to run on `release/*` branches, but it was not\r\nrun on release branches due to \"Only build pull requests\" setting. Turning off \"Only build pull requests\" will result\r\nin much larger volumes in jobs which is often unnecessary. We're waiting for [this feature request](https://ideas.circleci.com/ideas/CCI-I-215)\r\nto be implemented so that we could override this setting on some branches.\r\n\r\nBefore the feature is available on CircleCi side, we'll use a manual process to publish documentation for release.\r\n[Documentation for master branch](http://pytorch.org/xla/master/) is still updated automatically by the CI job.\r\nBut we'll need to manually commit the new versioned doc and point http://pytorch.org/xla to the documentation of new\r\nstable release.\r\n\r\nTake 2.3 release as example:\r\n```\r\n# Build pytorch/pytorch:release/2.3 and pytorch/xla:release/2.3 respectively.\r\n# In pytorch/xla/docs\r\n./docs_build.sh\r\ngit clone -b gh-pages https://github.com/pytorch/xla.git /tmp/xla\r\ncp -r build/* /tmp/xla/release/2.3\r\ncd /tmp/xla\r\n# Update `redirect_url` in index.md\r\ngit add .\r\ngit commit -m \"Publish 2.3 documentation.\"\r\ngit push origin gh-pages\r\n```\r\n--------------------------------------\r\nI would suggest we remove this and replace it with instuctions on how to update index.rst to include any new documentation on pytorch.org.",
    "url": "https://github.com/pytorch/xla/issues/8088",
    "state": "closed",
    "labels": [
      "question",
      "documentation"
    ],
    "created_at": "2024-09-27T22:02:37Z",
    "updated_at": "2025-03-06T13:05:38Z",
    "user": "mikegre-google"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3192,
    "title": "\u2753 [Question] When should I use Torch-TensorRT instead of TensorRT ?",
    "body": "I generally use NVIDIA's TensorRT as the inference framework. I want to know the advantages and disadvantages of Torch-TensorRT compared to TensorRT, so that I can decide when to use Torch-TensorRT. I guess Torch-TensorRT might be simpler and more user-friendly. Also, have you tested and compared their inference speed and GPU memory usage amont?",
    "url": "https://github.com/pytorch/TensorRT/issues/3192",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-27T15:51:32Z",
    "updated_at": "2024-10-02T16:22:54Z",
    "user": "EmmaThompson123"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 948,
    "title": "Getting Local models/wasm working with Create React App",
    "body": "### Question\n\nI realize there's been a lot of talk about this in other issues, but I'm trying to gather if getting local-only model and wasm files will work with Create React App. I'm using `WhisperForConditionalGeneration` from `@huggingface/transformers` version `3.0.0-alpha.9`. \r\n\r\nMy setup:\r\n```\r\nenv.allowRemoteModels = false;\r\nenv.allowLocalModels = true;\r\nenv.backends.onnx.wasm.wasmPaths = process.env.PUBLIC_URL + \"/dictation/\";\r\nenv.localModelPath = process.env.PUBLIC_URL + \"/dictation/models/\";\r\n```\r\n... and in my `{packagename}/public/models` folder I've got:\r\n```\r\nort-wasm-simd-threaded.jsep.wasm\r\nmodels/config.json\r\nmodels/generation_config.json\r\nmodels/preprocessor_config.json\r\nmodels/tokenizer_config.json\r\nmodels/tokenizer.json\r\nmodels/onnx/decoder_model_merged_q4.onnx\r\nmodels/onnx/encoder_model.onnx\r\n```\r\nThis returns the `SyntaxError: Unexpected token '<', \"<!DOCTYPE \"... is not valid JSON` error that has been [discussed in other issues](https://github.com/xenova/transformers.js/issues/142). If I set `env.allowRemoteModels = true;` and \r\n`env.allowLocalModels = false;`, and clear my application cache, this works fine. My questions on that:\r\n\r\n1. How can I get the `wasm` file to load locally only? It caches fine and calls locally (\r\nhttp://localhost:3000/dictation/ort-wasm-simd-threaded.jsep.wasm) after the initial CDN call, but I don't want to rely on an external CDN.\r\n2. How can I get the model files to only call locally? (we will need to further train our own models). I have yet to get this working, but I assume the above error is to blame.\r\n3. The main question: is this a limitation with CRA? I noticed that if I load the wasm file from the CDN first, it caches fine locally. It's just that initial call to the wasm local file (if not cached from the CDN) that fails, which people have said may be a CRA issue.\r\n\r\nThanks! Sorry for the long-winded question. Happy to provide any more code if needed.",
    "url": "https://github.com/huggingface/transformers.js/issues/948",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-26T20:42:33Z",
    "updated_at": "2024-09-26T21:26:30Z",
    "user": "stinoga"
  },
  {
    "repo": "huggingface/blog",
    "number": 2369,
    "title": " How  to finetune jina-embeddings-v3 by lora?",
    "body": "",
    "url": "https://github.com/huggingface/blog/issues/2369",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-26T07:25:16Z",
    "updated_at": "2024-09-26T07:25:16Z",
    "user": "LIUKAI0815"
  },
  {
    "repo": "pytorch/vision",
    "number": 8661,
    "title": "references/segmentation/coco_utils might require merging rles?",
    "body": "https://github.com/pytorch/vision/blob/6d7851bd5e2bedc294e40e90532f0e375fcfee04/references/segmentation/coco_utils.py#L27-L41 Above seems to assume that objects are not occluded, not merging rles from `frPyObjects`. In such case, i think it must be changed to \r\n```python\r\nrles = coco_mask.frPyObjects(polygons, height, width) \r\nrle = coco_mask.merge(rles)\r\nmask = coco_mask.decode(rle)\r\n```\r\nIs there any specific reason for this, or am I wrong? ",
    "url": "https://github.com/pytorch/vision/issues/8661",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-26T02:53:47Z",
    "updated_at": "2024-10-11T13:36:25Z",
    "comments": 1,
    "user": "davidgill97"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 2569,
    "title": "Question: What is preferred way to cite TGI/repo? Didnt see a citation file.",
    "body": "",
    "url": "https://github.com/huggingface/text-generation-inference/issues/2569",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-26T02:07:42Z",
    "updated_at": "2024-09-26T02:07:42Z",
    "user": "mkultraWasHere"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 454,
    "title": "Venv isn't needed in docker",
    "body": "I noticed in your docker files you are using a virtual environment. Docker is already a virtual environment at the system level. Is there a reason for using a python virtual environment as well? Typically, this is redundant/unnecessary and you'd only use venv or similar on your local machine.\r\n\r\nIf there isn't a good reason we could go ahead and delete these dependencies from the docker images.",
    "url": "https://github.com/huggingface/lerobot/issues/454",
    "state": "closed",
    "labels": [
      "enhancement",
      "question",
      "stale"
    ],
    "created_at": "2024-09-25T16:33:17Z",
    "updated_at": "2025-10-23T02:29:11Z",
    "user": "MichaelrMentele"
  },
  {
    "repo": "pytorch/xla",
    "number": 8071,
    "title": "Optimizer Memory in AdamW/Adam vs SGD",
    "body": "## \u2753 Questions and Help\r\n\r\nIt is to my understanding that Adam should use more memory than SGD because it keeps track of more parameters. However, when I look at my profiles between Adam and SGD optimizers and see that they use roughly the same amount of memory. \r\n\r\nDoes torch XLA somehow do optimizations on the optimizers to reduce the memory usage or something else? Any guidance on how to investigate this would be appreciated!",
    "url": "https://github.com/pytorch/xla/issues/8071",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-25T16:01:53Z",
    "updated_at": "2024-11-16T20:30:20Z",
    "comments": 1,
    "user": "dangthatsright"
  },
  {
    "repo": "pytorch/audio",
    "number": 3835,
    "title": "Not building CUDA 12.6",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nIt's not building with last version of cuda 12.6.1 in jetson agx orin\r\n```bash\r\n#!/usr/bin/env bash\r\nset -ex\r\necho \"Building torchaudio ${TORCHAUDIO_VERSION}\"\r\n   \r\napt-get update\r\napt-get install -y --no-install-recommends \\\r\n\t\tgit \\\r\n\t\tpkg-config \\\r\n\t\tlibffi-dev \\\r\n\t\tlibsndfile1\r\n\r\nrm -rf /var/lib/apt/lists/*\r\napt-get clean\r\n\r\ngit clone --branch v${TORCHAUDIO_VERSION} --recursive --depth=1 https://github.com/pytorch/audio /opt/torchaudio\r\ncd /opt/torchaudio\r\ngit checkout v${TORCHAUDIO_VERSION}\r\n\r\nBUILD_SOX=1 python3 setup.py bdist_wheel --verbose --dist-dir /opt\r\n\r\ncd ../\r\nrm -rf /opt/torchaudio\r\n\r\npip3 install --no-cache-dir --verbose /opt/torchaudio*.whl\r\npip3 show torchaudio && python3 -c 'import torchaudio; print(torchaudio.__version__);'\r\n\r\ntwine upload --verbose /opt/torchaudio*.whl || echo \"failed to upload wheel to ${TWINE_REPOSITORY_URL}\"\r\n```\r\n```bash\r\nsrc/include -isystem /usr/local/lib/python3.10/dist-packages/torch/include -isystem /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include -isystem /usr/local/cuda/include -Wall -D_GLIBCXX_USE_CXX11_ABI=1 -O3 -DNDEBUG -std=gnu++17 -fPIC -D_GLIBCXX_USE_CXX11_ABI=1 -MD -MT src/libtorio/ffmpeg/CMakeFiles/_torio_ffmpeg4.dir/pybind/pybind.cpp.o -MF src/libtorio/ffmpeg/CMakeFiles/_torio_ffmpeg4.dir/pybind/pybind.cpp.o.d -o src/libtorio/ffmpeg/CMakeFiles/_torio_ffmpeg4.dir/pybind/pybind.cpp.o -c /opt/torchaudio/src/libtorio/ffmpeg/pybind/pybind.cpp\r\nIn file included from /usr/local/lib/python3.10/dist-packages/torch/include/c10/util/Exception.h:5,\r\n                 from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/BlasBackend.h:3,\r\n                 from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/Context.h:3,\r\n                 from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/ATen.h:7,\r\n                 from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3,\r\n                 from /opt/torchaudio/src/libtorio/ffmpeg/ffmpeg.h:3,\r\n                 from /opt/torchaudio/src/libtorio/ffmpeg/hw_context.h:3,\r\n                 from /opt/torchaudio/src/libtorio/ffmpeg/pybind/pybind.cpp:1:\r\n/opt/torchaudio/src/libtorio/ffmpeg/pybind/pybind.cpp: In function \u2018int torio::io::{anonymous}::{anonymous}::read_func(void*, uint8_t*, int)\u2019:\r\n/opt/torchaudio/src/libtorio/ffmpeg/pybind/pybind.cpp:125:19: warning: comparison of integer expressions of different signedness: \u2018long unsigned int\u2019 and \u2018int\u2019 [-Wsign-compare]\r\n  125 |         chunk_len <= request,\r\n      |         ~~~~~~~~~~^~~~~~~~~~\r\nIn file included from /opt/torchaudio/build/temp.linux-aarch64-cpython-310/_deps/f4-src/include/libavutil/avutil.h:296,\r\n                 from /opt/torchaudio/build/temp.linux-aarch64-cpython-310/_deps/f4-src/include/libavutil/samplefmt.h:24,\r\n                 from /opt/torchaudio/build/temp.linux-aarch64-cpython-310/_deps/f4-src/include/libavcodec/avcodec.h:31,\r\n                 from /opt/torchaudio/src/libtorio/ffmpeg/ffmpeg.h:10,\r\n                 from /opt/torchaudio/src/libtorio/ffmpeg/hw_context.h:3,\r\n                 from /opt/torchaudio/src/libtorio/ffmpeg/pybind/pybind.cpp:1:\r\n/opt/torchaudio/src/libtorio/ffmpeg/pybind/pybind.cpp: In function \u2018int torio::io::{anonymous}::read_bytes(void*, uint8_t*, int)\u2019:\r\n/opt/torchaudio/build/temp.linux-aarch64-cpython-310/_deps/f4-src/include/libavutil/common.h:105:25: warning: comparison of integer expressions of different signedness: \u2018std::basic_string_view<char>::size_type\u2019 {aka \u2018long unsigned int\u2019} and \u2018int\u2019 [-Wsign-compare]\r\n  105 | #define FFMIN(a,b) ((a) > (b) ? (b) : (a))\r\n      |                     ~~~~^~~~~\r\n/opt/torchaudio/src/libtorio/ffmpeg/pybind/pybind.cpp:202:19: note: in expansion of macro \u2018FFMIN\u2019\r\n  202 |   auto num_read = FFMIN(wrapper->src.size() - wrapper->index, buf_size);\r\n      |                   ^~~~~\r\n[82/92] /usr/bin/c++ -DTORIO_FFMPEG_EXT_NAME=_torio_ffmpeg6 -DUSE_C10D_GLOO -DUSE_C10D_MPI -DUSE_C10D_NCCL -DUSE_CUDA -DUSE_DISTRIBUTED -DUSE_RPC -DUSE_TENSORPIPE -D_torio_ffmpeg6_EXPORTS -I/opt/torchaudio/src -I/usr/include/python3.10 -I/opt/torchaudio/build/temp.linux-aarch64-cpython-310/_deps/f6-src/include -isystem /usr/local/lib/python3.10/dist-packages/torch/include -isystem /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include -isystem /usr/local/cuda/include -Wall -D_GLIBCXX_USE_CXX11_ABI=1 -O3 -DNDEBUG -std=gnu++17 -fPIC -D_GLIBCXX_USE_CXX11_ABI=1 -MD -MT src/libtorio/ffmpeg/CMakeFiles/_torio_ffmpeg6.dir/pybind/pybind.cpp.o -MF src/libtorio/ffmpeg/CMakeFiles/_torio_ffmpeg6.dir/pybind/pybind.cpp.o.d -o src/libtorio/ffmpeg/CMakeFiles/_torio_ffmpeg6.dir/pybind/pybind.cpp.o -c /opt/torchaudio/src/libtorio/ffmpeg/pybind/pybind.cpp\r\nIn file included from /usr/local/lib/python3.10/dist-packages/torch/include/c10/util/Exception.h:5,\r\n                 from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/BlasBackend.h:3,\r\n                 from /usr/loca",
    "url": "https://github.com/pytorch/audio/issues/3835",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-25T10:10:21Z",
    "updated_at": "2025-01-08T12:54:20Z",
    "comments": 2,
    "user": "johnnynunez"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9528,
    "title": "load_ip_adapter for distilled sd models",
    "body": "Is it possible to load IP-Adapter for distilled SD v1 or v2 based models such as nota-ai/bk-sdm-tiny or nota-ai/bk-sdm-v2-tiny?\r\n\r\nWhen I tried to load ip adapter using bk-sdm-tiny\r\n\r\n```python\r\npipe.load_ip_adapter(\r\n    \"h94/IP-Adapter\",\r\n    subfolder=\"models\",\r\n    weight_name=\"ip-adapter-plus_sd15.bin\",\r\n    low_cpu_mem_usage=False,\r\n    ignore_mismatched_sizes=True\r\n)\r\n```\r\n\r\nI got errors, probably because of differences in unet structures. \r\n\r\n```\r\nRuntimeError: Error(s) in loading state_dict for IPAdapterAttnProcessor2_0:\r\n\tsize mismatch for to_k_ip.0.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([640, 768]).\r\n\tsize mismatch for to_v_ip.0.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([640, 768]).\r\n```\r\n\r\nHow can I solve this problems?",
    "url": "https://github.com/huggingface/diffusers/issues/9528",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-09-25T04:31:00Z",
    "updated_at": "2025-01-12T06:01:40Z",
    "comments": 7,
    "user": "kmpartner"
  },
  {
    "repo": "pytorch/examples",
    "number": 1289,
    "title": "Does torchrun + FSDP create multiple copies of the same dataset and model?",
    "body": "In the [example T5 training code](https://github.com/pytorch/examples/blob/cdef4d43fb1a2c6c4349daa5080e4e8731c34569/distributed/FSDP/T5_training.py#L77C24-L77C35), the main function creates a copy of the model and dataset regardless of the worker rank before passing it to FSDP. Does this mean that there are n copies of the model and dataset when running the script with torchrun and n processes? ",
    "url": "https://github.com/pytorch/examples/issues/1289",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-25T03:59:24Z",
    "updated_at": "2024-09-25T04:25:55Z",
    "comments": 1,
    "user": "tsengalb99"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1486,
    "title": "Getting 403 on chat ui config for aws sagemaker endpoint",
    "body": "\r\nHi All,\r\n\r\nLooking into configuring chat ui  with aws sagemaker endpoint and getting following error:\r\n![image](https://github.com/user-attachments/assets/d437b3b2-870f-4349-adf5-84e3b7215c16)\r\n\r\n```\r\nDOTENV_LOCAL was found in the ENV variables. Creating .env.local file.\r\n{\"level\":30,\"time\":1727231014113,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"msg\":\"Starting server...\"}\r\n{\"level\":30,\"time\":1727231014147,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"msg\":\"[MIGRATIONS] Begin check...\"}\r\n{\"level\":30,\"time\":1727231014175,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"msg\":\"[MIGRATIONS] \\\"Update search assistants\\\" already applied. Skipping...\"}\r\nListening on 0.0.0.0:3000\r\n{\"level\":30,\"time\":1727231014175,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"msg\":\"[MIGRATIONS] \\\"Update deprecated models in assistants with the default model\\\" should not be applied for this run. Skipping...\"}\r\n{\"level\":30,\"time\":1727231014175,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"msg\":\"[MIGRATIONS] \\\"Add empty 'tools' record in settings\\\" already applied. Skipping...\"}\r\n{\"level\":30,\"time\":1727231014175,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"msg\":\"[MIGRATIONS] \\\"Convert message updates to the new schema\\\" already applied. Skipping...\"}\r\n{\"level\":30,\"time\":1727231014175,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"msg\":\"[MIGRATIONS] \\\"Convert message files to the new schema\\\" already applied. Skipping...\"}\r\n{\"level\":30,\"time\":1727231014175,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"msg\":\"[MIGRATIONS] \\\"Trim message updates to reduce stored size\\\" already applied. Skipping...\"}\r\n{\"level\":30,\"time\":1727231014175,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"msg\":\"[MIGRATIONS] \\\"Reset tools to empty\\\" already applied. Skipping...\"}\r\n{\"level\":30,\"time\":1727231014175,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"msg\":\"[MIGRATIONS] All migrations applied. Releasing lock\"}\r\n{\"level\":30,\"time\":1727231014207,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-25T00:00:00.000Z\",\"dateField\":\"createdAt\",\"span\":\"day\",\"type\":\"conversation\",\"msg\":\"Computing conversation stats\"}\r\n{\"level\":30,\"time\":1727231014216,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-25T00:00:00.000Z\",\"dateField\":\"updatedAt\",\"span\":\"day\",\"type\":\"conversation\",\"msg\":\"Computing conversation stats\"}\r\n{\"level\":30,\"time\":1727231014219,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-25T00:00:00.000Z\",\"dateField\":\"createdAt\",\"span\":\"day\",\"type\":\"message\",\"msg\":\"Computing conversation stats\"}\r\n{\"level\":30,\"time\":1727231014220,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-22T00:00:00.000Z\",\"dateField\":\"updatedAt\",\"span\":\"week\",\"type\":\"conversation\",\"msg\":\"Computing conversation stats\"}\r\n{\"level\":30,\"time\":1727231014224,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-22T00:00:00.000Z\",\"dateField\":\"createdAt\",\"span\":\"week\",\"type\":\"conversation\",\"msg\":\"Computing conversation stats\"}\r\n{\"level\":30,\"time\":1727231014227,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-01T00:00:00.000Z\",\"dateField\":\"createdAt\",\"span\":\"month\",\"type\":\"message\",\"msg\":\"Computing conversation stats\"}\r\n{\"level\":30,\"time\":1727231014229,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-25T00:00:00.000Z\",\"dateField\":\"createdAt\",\"span\":\"day\",\"type\":\"conversation\",\"msg\":\"Computed conversation stats\"}\r\n{\"level\":30,\"time\":1727231014229,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-25T00:00:00.000Z\",\"dateField\":\"updatedAt\",\"span\":\"day\",\"type\":\"conversation\",\"msg\":\"Computed conversation stats\"}\r\n{\"level\":30,\"time\":1727231014230,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-25T00:00:00.000Z\",\"dateField\":\"createdAt\",\"span\":\"day\",\"type\":\"message\",\"msg\":\"Computed conversation stats\"}\r\n{\"level\":30,\"time\":1727231014230,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-22T00:00:00.000Z\",\"dateField\":\"updatedAt\",\"span\":\"week\",\"type\":\"conversation\",\"msg\":\"Computed conversation stats\"}\r\n{\"level\":30,\"time\":1727231014231,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-22T00:00:00.000Z\",\"dateField\":\"createdAt\",\"span\":\"week\",\"type\":\"message\",\"msg\":\"Computing conversation stats\"}\r\n{\"level\":30,\"time\":1727231014235,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-01T00:00:00.000Z\",\"dateField\":\"createdAt\",\"span\":\"month\",\"type\":\"message\",\"msg\":\"Computed conversation stats\"}\r\n{\"level\":30,\"time\":1727231014236,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-22T00:00:00.000Z\",\"dateField\":\"createdAt\",\"span\":\"week\",\"type\":\"conversation\",\"msg\":\"Computed conversation stats\"}\r\n{\"level\":30,\"time\":1727231014236,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-22T00:00:00.000Z\",\"dateField\":\"createdAt\",\"span\":\"week\",\"type\":\"message\",\"msg\":\"Computed conversation stats\"}\r\n{\"level\":30,\"time\":1727231014238,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-01T00:00:00.000Z\",\"dateField\":\"createdAt\",\"span\":\"month\",\"type\":\"conversation\",\"msg\":\"Computing conversation stats\"}\r\n{\"level\":30,\"time\":1727231014239,\"pid\":23,\"hostname\":\"fbe21dc3ad38\",\"minDate\":\"2024-09-01T00:00:00.000Z\",\"dateField\":\"updatedAt\",\"span\":\"month\",\"type\":\"conversation\",\"msg\":\"Computing conve",
    "url": "https://github.com/huggingface/chat-ui/issues/1486",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-09-25T02:41:08Z",
    "updated_at": "2024-09-25T02:41:08Z",
    "comments": 0,
    "user": "nauts"
  },
  {
    "repo": "huggingface/chat-macOS",
    "number": 7,
    "title": "Asking \"what time is it?\" will always return the local time of Paris, regardless of your location (\u2318R+)",
    "body": "<img width=\"487\" alt=\"Screenshot 2024-09-24 at 11 54 17\u202fAM\" src=\"https://github.com/user-attachments/assets/02d26c05-ae37-4caf-a3ff-5bc6aec42068\">\r\n\r\nI wonder how can we localize questions like this. I've tried \u2318R+ which always gives me the local time of Paris. Qwen2.5-72B and Llama 3.1 make up another non-specific time that's not my local time. I have web-search enabled too, and I can see that they're using it too, but they can't get it right, even when I give them my exact location both in the model's system prompt on HuggingChat, or in the chat context of the app itself.\r\n",
    "url": "https://github.com/huggingface/chat-macOS/issues/7",
    "state": "open",
    "labels": [
      "good first issue"
    ],
    "created_at": "2024-09-24T23:09:31Z",
    "updated_at": "2024-10-23T20:08:57Z",
    "user": "Reza2kn"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9520,
    "title": "UNetMotionModel.dtype is really expensive to call, is it possible to cache it during inference?",
    "body": "**What API design would you like to have changed or added to the library? Why?**\r\nwe are using class UNetMotionModel(ModelMixin, ConfigMixin, UNet2DConditionLoadersMixin, PeftAdapterMixin)\r\nand its `forward()` implementation is calling self.dtype, which is very expensive\r\n![image](https://github.com/user-attachments/assets/cb840057-ccf7-46ed-847d-2c8aef292fe9)\r\nfrom my profiling trace result, calling self.dtype takes 6-10ms each time.\r\ncan we somehow cache it to save time?\r\n![image](https://github.com/user-attachments/assets/b5ef3c1e-ee9f-4f02-922e-854ebe269568)\r\n\r\nI took a look at ModelMixin.dtype() property function,  it get all parameters of the model into tuple to check only first parameter's dtype, i don't thinkmake sense to do this everytime. right?\r\n![image](https://github.com/user-attachments/assets/b74a8c31-0b4e-44cb-ab09-e3f7c5559dad)\r\n\r\n**What use case would this enable or better enable? Can you give us a code example?**\r\nWe are using this model to do video generation, so the inference is running repeatedly. Is it easy to optimize this ~10ms latency?\r\nThanks!",
    "url": "https://github.com/huggingface/diffusers/issues/9520",
    "state": "closed",
    "labels": [
      "wip",
      "performance"
    ],
    "created_at": "2024-09-24T18:03:28Z",
    "updated_at": "2025-01-02T13:40:51Z",
    "comments": 7,
    "user": "xiang9156"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1484,
    "title": "Header prompt displayed using Llama3.1 with ollama",
    "body": "Hello,\r\n\r\nI'm using the ```llama3.1:latest``` model with ```ollama``` and I'm having trouble correctly initializing the ```chatPromptTemplate``` variable.\r\n\r\nI used this Github issue to initialize this variable : https://github.com/huggingface/chat-ui/issues/1035 \r\n\r\nHere is my ```.env.local``` file :\r\n\r\n```.env\r\nMONGODB_URL=mongodb://mongodb:27017\r\nHF_TOKEN=<hf-token>\r\n\r\nPUBLIC_APP_NAME=<name>\r\n\r\nMODELS=`[\r\n  {\r\n    \"name\": \"Ollama | Llama3.1\",\r\n    \"chatPromptTemplate\": \"<|begin_of_text|>{{#if @root.preprompt}}<|start_header_id|>system<|end_header_id|>\\n\\n{{@root.preprompt}}<|eot_id|>{{/if}}{{#each messages}}{{#ifUser}}<|start_header_id|>user<|end_header_id|>\\n\\n{{content}}<|eot_id|>{{/ifUser}}{{#ifAssistant}}<|start_header_id|>assistant<|end_header_id|>\\n\\n{{content}}<|eot_id|>{{/ifAssistant}}{{/each}}\",\r\n    \"parameters\": {\r\n      \"temperature\": 0.1,\r\n      \"top_p\": 0.95,\r\n      \"repetition_penalty\": 1.2,\r\n      \"top_k\": 50,\r\n      \"truncate\": 3072,\r\n      \"max_new_tokens\": 1024,\r\n      \"stop\": [\"<|end_of_text|>\", \"<|eot_id|>\"]\r\n    },\r\n    \"endpoints\": [\r\n      {\r\n        \"type\": \"ollama\",\r\n        \"url\" : \"http://ollama:11434\",\r\n        \"ollamaName\" : \"llama3.1:latest\"\r\n      }\r\n    ]\r\n  }\r\n]`\r\n```\r\n\r\nBut ```<|start_header_id|>assistant<|end_header_id|>``` appears on every response :\r\n\r\n![chat-ui-screen](https://github.com/user-attachments/assets/5cb3919e-0ee8-4335-8a53-d811818612e9)\r\n\r\nCan you help me make it disappear by modifying ```chatPromptTemplate``` variable ?\r\n\r\nThanks in advance.\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1484",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2024-09-24T13:33:16Z",
    "updated_at": "2024-09-30T08:43:06Z",
    "comments": 3,
    "user": "avirgos"
  },
  {
    "repo": "pytorch/xla",
    "number": 8059,
    "title": "Poor performance with 1 GPU?",
    "body": "Hello, I am trying to evaluate the impact of XLA in our models but before that I want to be sure that I know how to adapt our code and execute XLA models without problem.\r\n\r\nGPU: Nvidia 4090 GTX 24GB\r\nCuda 12.2\r\n```bash\r\n$ pip freeze | grep torch\r\ntorch==2.4.0\r\ntorch-xla==2.4.0\r\ntorch_xla_cuda_plugin @ https://storage.googleapis.com/pytorch-xla-releases/wheels/cuda/12.1/torch_xla_cuda_plugin-2.4.0-py3-none-any.whl#sha256=208085526f67739c2ea2ab15f1707935b2cfee7c1501116a524cfaa8d7b252d2\r\ntorchvision==0.19.0\r\n```\r\n\r\nI have been trying a simple model with MNIST\r\n\r\n```python\r\nimport numpy as np\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport torchvision\r\nimport torch_xla.core.xla_model as xm\r\nimport torch_xla.runtime as xr\r\nfrom tqdm import tqdm\r\nimport random\r\nfrom torch_xla.amp import syncfree, GradScaler, autocast\r\n\r\nimport torch_xla.debug.metrics as met\r\n\r\n\r\ndef random_seed(seed_value, use_cuda):\r\n    np.random.seed(seed_value) # cpu vars\r\n    torch.manual_seed(seed_value) # cpu  vars\r\n    random.seed(seed_value) # Python\r\n    if use_cuda:\r\n        torch.cuda.manual_seed(seed_value)\r\n        torch.cuda.manual_seed_all(seed_value) # gpu vars\r\n        torch.backends.cudnn.deterministic = True  #needed\r\n        torch.backends.cudnn.benchmark = False\r\n\r\nrandom_seed(42,True)\r\n\r\nXLA = True\r\n\r\n# Enable XLA SPMD execution mode.\r\n# xr.use_spmd()\r\nif XLA:\r\n    device = xm.xla_device()\r\nelse:\r\n    device = \"cuda\"\r\n\r\nclass ToyModel(nn.Module):\r\n    def __init__(self):\r\n        super(ToyModel, self).__init__()\r\n        self.conv1 = nn.Conv2d(1, 32, 3, 1)\r\n        self.conv2 = nn.Conv2d(32, 64, 3, 1)\r\n        self.dropout1 = nn.Dropout(0.25)\r\n        self.dropout2 = nn.Dropout(0.5)\r\n        self.fc1 = nn.Linear(9216, 128)\r\n        self.fc2 = nn.Linear(128, 10)\r\n\r\n    def forward(self, x):\r\n        x = self.conv1(x)\r\n        x = F.relu(x)\r\n        x = self.conv2(x)\r\n        x = F.relu(x)\r\n        x = F.max_pool2d(x, 2)\r\n        x = self.dropout1(x)\r\n        x = torch.flatten(x, 1)\r\n        x = self.fc1(x)\r\n        x = F.relu(x)\r\n        x = self.dropout2(x)\r\n        x = self.fc2(x)\r\n        output = F.log_softmax(x, dim=1)\r\n        return output\r\n\r\n\r\nmodel = ToyModel()\r\nmodel.to(device)\r\n\r\ntransform = torchvision.transforms.Compose([\r\n    torchvision.transforms.ToTensor(),\r\n    torchvision.transforms.Normalize((0.1307,), (0.3081,))\r\n])\r\n\r\ntrain_dataset = torchvision.datasets.MNIST(\r\n    '.', train=True, download=True, transform=transform)\r\n\r\ntrain_loader = torch.utils.data.DataLoader(\r\n    train_dataset, batch_size=32, shuffle=False\r\n)\r\n\r\nn_epochs = 10\r\ncriterion = torch.nn.MSELoss()\r\nif XLA:\r\n    optimizer = syncfree.SGD(model.parameters(), lr=0.1)  # torch_xla\r\nelse:\r\n    optimizer = torch.optim.SGD(model.parameters(), lr=0.1)\r\n\r\nif XLA:\r\n    scaler = GradScaler(use_zero_grad=True)  # torch_xla\r\nelse:\r\n    scaler = torch.amp.GradScaler()\r\n\r\nfor epoch in tqdm(range(n_epochs)):\r\n    xm.mark_step()\r\n    for i, (images, labels) in tqdm(enumerate(train_loader), leave=False):\r\n        if not XLA:\r\n            optimizer.zero_grad()\r\n        if i >= 2000:\r\n            break\r\n        images = images.to(device)\r\n        labels = labels.to(device)\r\n        # Forward pass\r\n        if XLA:\r\n            autoamp = autocast(device, dtype=torch.bfloat16)\r\n        else:\r\n            autoamp = torch.autocast(device)\r\n            \r\n        with autoamp:\r\n            outputs = model(images)\r\n            loss = F.nll_loss(outputs, labels)\r\n        # Backward\r\n        scaler.scale(loss).backward()\r\n        if XLA:\r\n            gradients = xm._fetch_gradients(optimizer)\r\n            xm.all_reduce('sum', gradients, scale=1.0 / xr.world_size())\r\n        scaler.step(optimizer)\r\n        scaler.update()\r\n        xm.mark_step()\r\n\r\n    print(loss)\r\n```\r\n\r\nAnd I haven't see any performance improvement, at best the execution time is the same. I thought that maybe the model was being recompiled too many times or something, so I followed https://github.com/pytorch/xla/blob/master/TROUBLESHOOTING.md\r\n\r\nMetrics are\r\n```\r\nMetric: DeviceLockWait\r\n  TotalSamples: 37520\r\n  Accumulator: 113ms908.380us\r\n  ValueRate: 475.217us / second\r\n  Rate: 159.174 / second\r\n  Percentiles: 1%=000.972us; 5%=000.989us; 10%=000.999us; 20%=001.010us; 50%=004.627us; 80%=004.978us; 90%=005.046us; 95%=005.112us; 99%=005.205us\r\nMetric: InputOutputAliasCount\r\n  TotalSamples: 2\r\n  Accumulator: 42.00\r\n  ValueRate: 21.95 / second\r\n  Rate: 1.04547 / second\r\n  Percentiles: 1%=8.00; 5%=8.00; 10%=8.00; 20%=8.00; 50%=34.00; 80%=34.00; 90%=34.00; 95%=34.00; 99%=34.00\r\nMetric: IrValueTensorToXlaData\r\n  TotalSamples: 37508\r\n  Accumulator: 02s925ms072.075us\r\n  ValueRate: 007ms438.792us / second\r\n  Rate: 159.175 / second\r\n  Percentiles: 1%=030.320us; 5%=030.752us; 10%=030.926us; 20%=031.205us; 50%=059.240us; 80%=061.600us; 90%=062.326us; 95%=062.728us; 99%=067.959us\r\nMetric: LazyTracing\r\n  TotalSamples: 3525066\r\n  Accumulator: 46s352ms512.571us\r\n  ValueRate: 216ms224.1",
    "url": "https://github.com/pytorch/xla/issues/8059",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-24T13:24:42Z",
    "updated_at": "2024-11-17T19:39:48Z",
    "comments": 3,
    "user": "Patataman"
  },
  {
    "repo": "pytorch/xla",
    "number": 8057,
    "title": "PjRtComputationClient::ExecuteReplicated core dump when encountering a scalar",
    "body": "## \u2753 Questions and Help\r\nIn my test code, I found that there might be PjRtData as the type argument(the argument is a scalar), and then the core dump.\r\nhttps://github.com/pytorch/xla/blob/master/torch_xla/csrc/runtime/pjrt_computation_client.cc#L806\r\nI wrote a test function earlier that tried to transform all arguments manually, but core dumped.\r\n![image](https://github.com/user-attachments/assets/982c4200-f708-42c4-9865-3c4f5f4b3488)\r\n![image](https://github.com/user-attachments/assets/19f0b9a1-f3b5-406b-a87e-fe3b4d610442)\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/8057",
    "state": "open",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2024-09-24T10:35:31Z",
    "updated_at": "2025-03-31T21:30:22Z",
    "user": "mars1248"
  },
  {
    "repo": "pytorch/audio",
    "number": 3834,
    "title": "Ability to build manylinux2014 compliant wheels for other archs (ppc64le)",
    "body": "### \ud83d\ude80 The feature\n\nI'd like to have the possibility to create manylinux2014 compliant wheels for ppc64le. Is there a documentation for this?\n\n### Motivation, pitch\n\nPowerPC has in-core accelerator engines (MMA, Matrix-mulitply assist) which focused on AI inferencing and packages such as torch/audio/vision are preferred to have prebuilt manylinux wheels.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/audio/issues/3834",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-23T21:59:39Z",
    "updated_at": "2024-09-23T21:59:39Z",
    "comments": 0,
    "user": "mgiessing"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9508,
    "title": "AnimateDiff SparseCtrl RGB does not work as expected",
    "body": "Relevant comments are [this](https://github.com/huggingface/diffusers/pull/8897#issuecomment-2255416318) and [this](https://github.com/huggingface/diffusers/pull/8897#issuecomment-2255478105).\r\n\r\nAnimateDiff SparseCtrl RGB does not work similar to other implementations and cannot replicate their outputs. This makes me believe that there is something incorrect with our SparseControlNet or MotionAdapter implementation.\r\n\r\nWhen comparing the results of the [original](https://github.com/guoyww/AnimateDiff)/[Comfy](https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved) implementation to Diffusers implementation, one can notice that if an image is used with an unrelated prompt, the Diffusers implementation ignores the image and just follows the prompt whereas the other implementations try to incorporate both.\r\n\r\nSince the original and Comfy implementations produce this behaviour consistently, this seems more like a problem with Diffusers implementation. However, I've not been able to spot differences in implementation just by comparing the code visually. I also tried matching outputs layerwise and it seemed to be alright (although I didn't investigate this as deeply as I should have due to other priorities). \r\n\r\nIf someone from the community actively following/using the AnimateDiff implementations can help determine the cause of this bug, it would be really awesome and helpful.",
    "url": "https://github.com/huggingface/diffusers/issues/9508",
    "state": "open",
    "labels": [
      "bug",
      "help wanted",
      "stale",
      "contributions-welcome",
      "advanced"
    ],
    "created_at": "2024-09-23T21:42:54Z",
    "updated_at": "2025-08-10T16:47:50Z",
    "comments": 9,
    "user": "a-r-r-o-w"
  },
  {
    "repo": "pytorch/xla",
    "number": 8049,
    "title": "How to run XLA with CPU offloaded models",
    "body": "## \u2753 Questions and Help\r\n\r\nHow do you run models that are offloaded to the CPU, Trying to work with ```enable_sequential_cpu_offload``` or ```enable_model_cpu_offload```,  when running ```torch_xla.sync()/xm.mark_step() ```, the graph seems to not exclude such factor, and in turn takes much more memory than when only running the model on CPU. For example, reportedly running maximum at 25GB on the CPU but takes up 170GB on XLA devices, this is tested with EasyAnimate V4 model generating a 960x1680 24fps video. If needed, I can provide code if this has not been implemented.\r\n\r\n```RuntimeError: Bad StatusOr access: RESOURCE_EXHAUSTED: Compilation failure: Aborting compilation early because it's unlikely to have enough device memory. Requires 170.73G, has 14.71G available. If more detailed logging is desired, set --xla_tpu_impure_oom_fast_exit_threshold=-1```",
    "url": "https://github.com/pytorch/xla/issues/8049",
    "state": "open",
    "labels": [
      "enhancement",
      "performance"
    ],
    "created_at": "2024-09-23T10:59:06Z",
    "updated_at": "2025-03-31T15:42:09Z",
    "user": "radna0"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 451,
    "title": " Inquiry about Implementation of \"Aloha Unleashed\" ",
    "body": "First and foremost, I would like to extend my heartfelt gratitude for your incredible work on the Lerobo project. \r\n\r\nI recently came across the paper \"Aloha Unleashed\" published by the Aloha team a few months ago, and I am curious to know if there are any plans to implement the methodologies and findings from this paper into the Lerobo project.\r\n\r\nThank you once again for your hard work and for providing such a fantastic tool to the community. I look forward to your response.\r\n\r\npaper link\uff1ahttps://aloha-unleashed.github.io/",
    "url": "https://github.com/huggingface/lerobot/issues/451",
    "state": "open",
    "labels": [
      "question",
      "robots"
    ],
    "created_at": "2024-09-23T09:14:56Z",
    "updated_at": "2025-08-20T19:42:37Z",
    "user": "lightfate"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3173,
    "title": "\u2753 [Question] torchscript int8 quantization degradation in recent versions",
    "body": "TS INT8 degradation later versions\r\n\r\nHi all, I get a degradation in results after an INT8 quantization with torchscript, after updating my torch_tensorrt, torch and tensorrt versions. I have listed the dependencies for both cases below, is this expected?\r\n\r\nEarlier Version (Works Well):\r\nTorch: 2.0.1\r\nCUDA: 11.8\r\ntorch_tensorrt: 1.4.0\r\nTensorrt: 8.5.3.1\r\nGPU: A100\r\nPython: 3.9\r\n\r\nLater Version (Degradation in Results): Torch 2.4.0\r\nCUDA 12.1\r\ntorch_tensorrt: 2.4.0\r\nTensorrt: 10.1.0\r\nGPU: A100\r\nPython: 3.11\r\n\r\nScript (Approximately, as I can't submit the model):\r\n```\r\nimport torch\r\nimport time\r\nfrom pathlib import Path\r\nimport PIL\r\nimport PIL.Image\r\nimport torch_tensorrt\r\n\r\nimport torch_tensorrt.ptq\r\nfrom torchvision.transforms.functional import to_tensor, center_crop\r\nfrom torch.utils.data import Dataset, DataLoader\r\n\r\nclass CalibrationDataset(Dataset):\r\n    def __init__(self, tile_size: int, model: torch.nn.Module, dtype: torch.dtype) -> None:\r\n        self._tile_size = tile_size\r\n        self._images = [f for f in Path(\"images\").glob(\"**/*\")]\r\n        self._length = len(self._images)\r\n        print(\"Dataset size:\", self._length)\r\n        self._model = model\r\n        self._dtype = dtype\r\n\r\n    def __len__(self) -> int:\r\n        return self._length\r\n\r\n    def _to_tensor(self, img_path: Path) -> torch.Tensor:\r\n        pil_img = PIL.Image.open(img_path).convert(\"RGB\")\r\n        return to_tensor(pil_img).to(device=\"cuda\", dtype=self._dtype).unsqueeze(0)\r\n\r\n    def __getitem__(self, idx: int) -> tuple[torch.Tensor, torch.Tensor]:\r\n        print(f\"CalibrationDataset called with {idx=}\")\r\n        input_file = self._images[idx]\r\n        input_tensor = center_crop(self._to_tensor(input_file), output_size=self._tile_size)\r\n        return input_tensor, self._model(input_tensor)\r\n\r\n\r\n\r\ndef compile_to_tensort_and_quantize() -> None:\r\n    HALF = True\r\n    dtype = torch.float16\r\n    batch_size, tile_size = 1, 538\r\n\r\n    model = ImageToImageModel.create(checkpoint = \"base\", half=HALF, device=torch.device(\"cuda\"))# Proprietary upscaling model, cannot submit code\r\n    with torch.no_grad():\r\n        calibration_dataset = CalibrationDataset(tile_size=tile_size, model=model, dtype=dtype)\r\n        testing_dataloader = DataLoader(\r\n            calibration_dataset, batch_size=4, shuffle=True, num_workers=0,)\r\n\r\n        calibrator = torch_tensorrt.ptq.DataLoaderCalibrator(\r\n            testing_dataloader,\r\n            cache_file=\"./calibration.cache\",\r\n            use_cache=False,\r\n            algo_type=torch_tensorrt.ptq.CalibrationAlgo.ENTROPY_CALIBRATION_2,\r\n            device=torch.device(\"cuda\"),\r\n        )\r\n        dummy_input = torch.randn(1, 3, tile_size, tile_size, device=torch.device(\"cuda\"), dtype=dtype)\r\n        inputs = torch.randn(1, 3, tile_size, tile_size, device=torch.device(\"cuda\"), dtype=dtype)\r\n        torch_script_module = torch.jit.trace(model, example_inputs=inputs)\r\n\r\n        with torch_tensorrt.logging.debug():\r\n            trt_ts_module = torch_tensorrt.compile(\r\n                torch_script_module,\r\n                truncate_long_and_double=True,\r\n                inputs=[dummy_input],\r\n                enabled_precisions={torch.int8},\r\n                calibrator=calibrator,\r\n                device={\r\n                    \"device_type\": torch_tensorrt.DeviceType.GPU,\r\n                    \"gpu_id\": 0,\r\n                    \"dla_core\": 0,\r\n                    \"allow_gpu_fallback\": False,\r\n                    \"disable_tf32\": False\r\n                },\r\n            )\r\n\r\n\r\n        torch.jit.save(trt_ts_module, \"trt_OLD.ts\")\r\n\r\n    print(\"Benchmark\")\r\n    times = []\r\n    for _ in range(5):\r\n        t1 = time.monotonic()\r\n        out = trt_ts_module(inputs)\r\n        print(out)\r\n        torch.cuda.synchronize()\r\n        times.append(time.monotonic() - t1)\r\n\r\n    print(times)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    compile_to_tensort_and_quantize()\r\n\r\n```\r\nNote: In the later version, need to switch `import torch_tensorrt.ptq` to `import torch_tensorrt.ts.ptq`, the rest of the script is identical\r\n\r\n\r\nWhile the previous versions work well (I get a quantized model that produces close-enough results to the original model), for the later version, I get garbage outputs (I can see there is something wrong with the calibration as the output tensor values is always within a small range 0.18-0.21, whereas it should take any value between -1,1). I'm posting the quantization script approximately, however, I cannot post the model details unfortunately, as it's proprietary. \r\n\r\nWould appreciate all forms of help :), also would love to submit a fix for the underlying issue (if one is present).",
    "url": "https://github.com/pytorch/TensorRT/issues/3173",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-22T14:46:00Z",
    "updated_at": "2024-09-23T16:44:03Z",
    "user": "seymurkafkas"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 2541,
    "title": "How to serve local models with python package (not docker)",
    "body": "### System Info\n\n`pip install text-generation `with version '0.6.0'\r\nI need to use python package not docker\n\n### Information\n\n- [ ] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [ ] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\n```\r\nfrom text_generation import Client\r\n\r\n# Initialize the client\r\nclient = Client(\"/path/to/model/locally\")\r\n\r\n# Generate text\r\nresponse = client.generate(\"Your input text here\")\r\n```\r\n\r\nerror:\r\n```\r\nMissingSchema: Invalid URL '/path/to/model/locally': No scheme supplied. Perhaps you meant [/path/to/model/locally](/path/to/model/locally?\r\n```\r\n\r\nalso I tried this as with some models also on huggingface and local models doesn't work!\r\n\r\n```\r\nfrom text_generation import InferenceAPIClient\r\nclient = InferenceAPIClient(\"NousResearch/Meta-Llama-3.1-8B-Instruct\")\r\ntext = client.generate(\"Why is the sky blue?\").generated_text\r\nprint(text)\r\n# ' Rayleigh scattering'\r\n\r\n# Token Streaming\r\ntext = \"\"\r\nfor response in client.generate_stream(\"Why is the sky blue?\"):\r\n    if not response.token.special:\r\n        text += response.token.text\r\n\r\nprint(text)\r\n```\r\n\r\n\r\nerror:\r\n```\r\nNotSupportedError: Model `NousResearch/Meta-Llama-3.1-8B-Instruct` is not available for inference with this client. \r\nUse `huggingface_hub.inference_api.InferenceApi` instead.\r\n```\n\n### Expected behavior\n\n- I can load any model ( local or form HF hub)\r\n\r\n",
    "url": "https://github.com/huggingface/text-generation-inference/issues/2541",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-20T21:10:09Z",
    "updated_at": "2024-09-26T06:55:50Z",
    "user": "hahmad2008"
  },
  {
    "repo": "huggingface/competitions",
    "number": 41,
    "title": "how to debug a script submission",
    "body": "is there way to see logs or errors of a script based submission",
    "url": "https://github.com/huggingface/competitions/issues/41",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-20T18:04:44Z",
    "updated_at": "2024-09-30T16:08:42Z",
    "user": "ktrapeznikov"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9485,
    "title": "Can we allow making everything on gpu/cuda for scheduler?",
    "body": "**What API design would you like to have changed or added to the library? Why?**\r\nIs it possible to allow setting every tensor attribute of scheduler to cuda device?\r\nIn https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_lcm.py\r\nIt looks like that attributes like `scheduler.alphas_cumprod` are tensors on cpu, but the scheduler.set_timesteps() allows setting `scheduler.timesteps` to gpu/cuda device. Isn't this causing device mismatch when indexing scheduler.alphas_cumprod with scheduler.timesteps? Below is the code snippet that the pipline is indexing a cpu tensor(alphas_cumprod) with a gpu tensor(timestep)\r\n![image](https://github.com/user-attachments/assets/42b31655-0b4f-4623-9524-5d55bf7b7f5c)\r\nI simply added following lines to print the timestep and self.alphas_cumprod type and device at the begining of the `scheduler.step()`\r\n```\r\nprint(\"Printing scheduler.step() timestep\")\r\nprint(type(timestep))\r\nprint(isinstance(timestep, torch.Tensor))\r\nprint(timestep.device)\r\nprint(\"Printing scheduler.step() self.alphas_cumprod\")\r\nprint(type(self.alphas_cumprod))\r\nprint(isinstance(self.alphas_cumprod, torch.Tensor))\r\nprint(self.alphas_cumprod.device)\r\n``` \r\nOutput when running text-to-image:\r\n```\r\nPrinting scheduler.step() timestep\r\n<class 'torch.Tensor'>\r\nTrue\r\ncuda:0\r\nPrinting scheduler.step() self.alphas_cumprod\r\n<class 'torch.Tensor'>\r\nTrue\r\ncpu\r\n```\r\n\r\n**What use case would this enable or better enable? Can you give us a code example?**\r\nWe are using a modified LCMScheduler (99% same as the original LCMScheduler) for video generations, it's generating frames repeatedly in a loop. for most of the time, this step doesn't cause performance issue. But we did see intermittent high cpu usage and latency for `alpha_prod_t = self.alphas_cumprod[timestep]`. And from torch.profiler and tracing output, it. shows high latency for this specific step. We are wondering if this is the performance bottleneck.\r\n![image](https://github.com/user-attachments/assets/04f5040b-734c-46a6-8171-17a30f221b14)\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9485",
    "state": "open",
    "labels": [
      "stale",
      "scheduler",
      "performance"
    ],
    "created_at": "2024-09-20T12:38:16Z",
    "updated_at": "2024-12-17T15:04:46Z",
    "comments": 14,
    "user": "xiang9156"
  },
  {
    "repo": "pytorch/serve",
    "number": 3325,
    "title": "Kserve management api for registering new models",
    "body": "I have a setup where the Kserve endpoint is mounted to PVC, which reads model files on startup and loads them.\r\n\r\nIs it possible to register a new version of the model (after I added it to PVC) without restarting whole Kserve endpoints with other models and expanding config.properties?\r\n\r\nTorchserve supports this use case but I can't find documentation to do it on Kserve.",
    "url": "https://github.com/pytorch/serve/issues/3325",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-20T10:47:44Z",
    "updated_at": "2024-09-20T19:28:03Z",
    "user": "matej14086"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2032,
    "title": "ONNX support for decision transformers",
    "body": "### Feature request\r\n\r\nI am trying to train off-line RL using decision  transformer, convert to .onnx.\r\n\r\n```\r\nfrom pathlib import Path\r\nfrom transformers.onnx import FeaturesManager\r\n\r\nfeature = \"sequence-classification\"\r\n\r\n# load config\r\nmodel_kind, model_onnx_config = FeaturesManager.check_supported_model_or_raise(model, feature=feature)\r\nonnx_config = model_onnx_config(model.config)\r\n\r\n# export\r\nonnx_inputs, onnx_outputs = transformers.onnx.export(\r\n        #preprocessor=tokenizer,\r\n        model=model,\r\n        config=onnx_config,\r\n        opset=13,\r\n        output=Path(\"trained_models/DT-model.onnx\")\r\n)\r\n```\r\n\r\nGet the below error:\r\n\r\n```\r\nKeyError: \"decision-transformer is not supported yet. Only ['albert', 'bart', 'beit', 'bert', 'big-bird', 'bigbird-pegasus', 'blenderbot', 'blenderbot-small', 'bloom', 'camembert', 'clip', 'codegen', 'convbert', 'convnext', 'data2vec-text', 'data2vec-vision', 'deberta', 'deberta-v2', 'deit', 'detr', 'distilbert', 'electra', 'flaubert', 'gpt2', 'gptj', 'gpt-neo', 'groupvit', 'ibert', 'imagegpt', 'layoutlm', 'layoutlmv3', 'levit', 'longt5', 'longformer', 'marian', 'mbart', 'mobilebert', 'mobilenet-v1', 'mobilenet-v2', 'mobilevit', 'mt5', 'm2m-100', 'owlvit', 'perceiver', 'poolformer', 'rembert', 'resnet', 'roberta', 'roformer', 'segformer', 'squeezebert', 'swin', 't5', 'vision-encoder-decoder', 'vit', 'whisper', 'xlm', 'xlm-roberta', 'yolos'] are supported. If you want to support decision-transformer please propose a PR or open up an issue.\"\r\n```\r\n\r\n### Motivation\r\n\r\nI would want to use trained models in Godot-RL-Agents. Currently agents are trained using PPO OR imitation learning and bothe support onnx format. Supporting decision transformers could hugely help training models navigating complex scenarios.\r\n\r\n### Your contribution\r\n\r\nI would be interested to raise a PR. But at this time, I have no idea how to go about this. With little bit of guidance, I can try.",
    "url": "https://github.com/huggingface/optimum/issues/2032",
    "state": "closed",
    "labels": [
      "onnx"
    ],
    "created_at": "2024-09-20T08:45:28Z",
    "updated_at": "2024-11-25T13:00:02Z",
    "comments": 1,
    "user": "ra9hur"
  },
  {
    "repo": "huggingface/setfit",
    "number": 558,
    "title": "How to improve the accuracy while classifying short text with less context",
    "body": "Hi, my usecase is to classify Job Title into Functional Areas. I finetuned `all-mpnet-base-v2` with the help of setfit by providing some 10+ examples for each class (Functional Areas). \r\n\r\nI got `82%` accuracy on running the evaluation on my test set. I observed some of the simple & straightforward  job titles are classified into wrong label with `0.6` score.\r\n\r\nFor example:\r\n```\r\nQuery: SDET\r\nPredicted Label: Big Data / DWH / ETL\r\nConfidence Scores:\r\nLabel: Accounting / Finance, Confidence: 0.0111\r\nLabel: Backend Development, Confidence: 0.0140\r\nLabel: Big Data / DWH / ETL, Confidence: 0.6092\r\n```\r\n\r\nHere **SDET** should have labelled as `QA / SDET` but it is classified to `Big Data / DWH / ETL` with `0.62` score. Few shot examples used for both classes doesn't have anything in common which could confuse the model except one example whose title is `Data Quality Engineer` and it is under `Big Data / DWH / ETL`.\r\n\r\n**Few shot examples** (added only for 2 here)\r\n```py\r\n{    \"QA / SDET\": [\r\n        \"Quality Assurance Engineer\",\r\n        \"Software Development Engineer in Test (SDET)\",\r\n        \"QA Automation Engineer\",\r\n        \"Test Engineer\",\r\n        \"QA Analyst\",\r\n        \"Manual Tester\",\r\n        \"Automation Tester\",\r\n        \"Performance Test Engineer\",\r\n        \"Security Test Engineer\",\r\n        \"Mobile QA Engineer\",\r\n        \"API Tester\",\r\n        \"Load & Stress Test Engineer\",\r\n        \"Senior QA Engineer\",\r\n        \"Test Automation Architect\",\r\n        \"QA Lead\",\r\n        \"QA Manager\",\r\n        \"End-to-End Tester\",\r\n        \"Game QA Tester\",\r\n        \"UI/UX Tester\",\r\n        \"Integration Test Engineer\",\r\n        \"Quality Control Engineer\",\r\n        \"Test Data Engineer\",\r\n        \"DevOps QA Engineer\",\r\n        \"Continuous Integration (CI) Tester\",\r\n        \"Software Test Consultant\"\r\n    ],\r\n    \r\n    \"Big Data / DWH / ETL\": [\r\n        \"Big Data Engineer\",\r\n        \"Data Warehouse Developer\",\r\n        \"ETL Developer\",\r\n        \"Hadoop Developer\",\r\n        \"Spark Developer\",\r\n        \"Data Engineer\",\r\n        \"Data Integration Specialist\",\r\n        \"Data Pipeline Engineer\",\r\n        \"Data Architect\",\r\n        \"Database Administrator\",\r\n        \"ETL Architect\",\r\n        \"Data Lake Engineer\",\r\n        \"Informatica Developer\",\r\n        \"DataOps Engineer\",\r\n        \"BI Developer\",\r\n        \"Data Migration Specialist\",\r\n        \"Data Warehouse Architect\",\r\n        \"ETL Tester\",\r\n        \"Big Data Platform Engineer\",\r\n        \"Apache Kafka Engineer\",\r\n        \"Snowflake Developer\",\r\n        \"Data Quality Engineer\",\r\n        \"Data Ingestion Engineer\",\r\n        \"Big Data Consultant\",\r\n        \"ETL Manager\"\r\n    ]\r\n}\r\n```\r\n\r\n**TrainingArgs**\r\n```py\r\nargs = TrainingArguments(\r\n    batch_size=16,\r\n    num_epochs=1,\r\n    evaluation_strategy=\"epoch\",\r\n    save_strategy=\"epoch\",\r\n    load_best_model_at_end=True,\r\n)\r\n```\r\n\r\n**Here is the complete set of functional areas.**\r\n```py\r\nfunctional_areas = [\r\n    \"Accounting / Finance\",\r\n    \"Backend Development\",\r\n    \"Big Data / DWH / ETL\",\r\n    \"Brand Management\",\r\n    \"Content Writing\",\r\n    \"Customer Service\",\r\n    \"Data Analysis / Business Intelligence\",\r\n    \"Data Science / Machine Learning\",\r\n    \"Database Admin / Development\",\r\n    \"DevOps / Cloud\",\r\n    \"Embedded / Kernel Development\",\r\n    \"Event Management\",\r\n    \"Frontend Development\",\r\n    \"Full-Stack Development\",\r\n    \"Functional / Technical Consulting\",\r\n    \"General Management / Strategy\",\r\n    \"IT Management / IT Support\",\r\n    \"IT Security\",\r\n    \"Mobile Development\",\r\n    \"Network Administration\",\r\n    \"Online Marketing\",\r\n    \"Operations Management\",\r\n    \"PR / Communications\",\r\n    \"QA / SDET\",\r\n    \"SEO / SEM\",\r\n    \"Sales / Business Development\"\r\n]\r\n```\r\n\r\nMy guess is accuracy is low because of short text (which is just job title). Please suggest few things which I can try out to improve the accuracy of the model.",
    "url": "https://github.com/huggingface/setfit/issues/558",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-20T06:09:07Z",
    "updated_at": "2024-11-11T11:23:31Z",
    "user": "29swastik"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 527,
    "title": "[Question] Comparison with the zarr format?",
    "body": "Hi,\r\n\r\nI know that safetensors are widely used nowadays in HF, and the comparisons made in this repo's README file make a lot of sense.\r\n\r\nHowever, I am now surprised to see that there is no comparison with zarr, which is probably the most widely used format to store tensors in an universal, compressed and scalable way.\r\n\r\nIs there any particular reason why safetensors was created instead of just using zarr, which has been around for longer (and has nice benefits such as good performance in object storage reads and writes)?\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/safetensors/issues/527",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-19T13:32:17Z",
    "updated_at": "2025-01-13T17:56:46Z",
    "comments": 13,
    "user": "julioasotodv"
  },
  {
    "repo": "huggingface/transformers",
    "number": 33584,
    "title": "How to fine tune Qlora with Custum trainer. ",
    "body": "Full model fine-tuning code is given below. How can i modify the code to train Qlora based model.\r\n\r\n```import sys\r\nimport os\r\ncurrent_directory = os.path.dirname(os.path.abspath(__file__))\r\nsys.path.append(current_directory) \r\n\r\nfrom src.custom_dataset import RawFileDataset\r\nimport copy\r\nimport random\r\nfrom dataclasses import dataclass, field\r\nfrom typing import Optional, Dict, Sequence\r\nimport os\r\n\r\nimport torch\r\nimport torch.distributed\r\nimport transformers\r\nfrom transformers import Trainer\r\n\r\nIGNORE_INDEX = -100\r\nDEFAULT_PAD_TOKEN = \"[PAD]\"\r\nDEFAULT_EOS_TOKEN = \"</s>\"\r\nDEFAULT_BOS_TOKEN = \"</s>\"\r\nDEFAULT_UNK_TOKEN = \"</s>\"\r\n\r\n\r\n\r\n@dataclass\r\nclass ModelArguments:\r\n    model_name_or_path: Optional[str] = field(default=\"facebook/opt-125m\")\r\n\r\n\r\n@dataclass\r\nclass DataArguments:\r\n    data_path: str = field(default=None, metadata={\"help\": \"Path to the training data.\"})\r\n    train_file: str = field(default=None, metadata={\"help\": \"train file name\"})\r\n    val_file: str = field(default=None, metadata={\"help\": \"val file name\"})\r\n\r\n@dataclass\r\nclass TrainingArguments(transformers.TrainingArguments):\r\n    cache_dir: Optional[str] = field(default=None)\r\n    optim: str = field(default=\"adamw_torch\")\r\n    model_max_length: int = field(\r\n        default=512,\r\n        metadata={\"help\": \"Maximum sequence length. Sequences will be right padded (and possibly truncated).\"},\r\n    )\r\n\r\n\r\ndef safe_save_model_for_hf_trainer(trainer: transformers.Trainer, output_dir: str):\r\n    \"\"\"Collects the state dict and dump to disk.\"\"\"\r\n    state_dict = trainer.model.state_dict()\r\n    if trainer.args.should_save:\r\n        cpu_state_dict = {key: value.cpu() for key, value in state_dict.items()}\r\n        del state_dict\r\n        trainer._save(output_dir, state_dict=cpu_state_dict)  # noqa\r\n\r\n\r\ndef smart_tokenizer_and_embedding_resize(\r\n    special_tokens_dict: Dict,\r\n    tokenizer: transformers.PreTrainedTokenizer,\r\n    model: transformers.PreTrainedModel,\r\n):\r\n    \"\"\"Resize tokenizer and embedding.\r\n\r\n    Note: This is the unoptimized version that may make your embedding size not be divisible by 64.\r\n    \"\"\"\r\n    num_new_tokens = tokenizer.add_special_tokens(special_tokens_dict)\r\n    model.resize_token_embeddings(len(tokenizer))\r\n\r\n    if num_new_tokens > 0:\r\n        input_embeddings = model.get_input_embeddings().weight.data\r\n        output_embeddings = model.get_output_embeddings().weight.data\r\n\r\n        input_embeddings_avg = input_embeddings[:-num_new_tokens].mean(dim=0, keepdim=True)\r\n        output_embeddings_avg = output_embeddings[:-num_new_tokens].mean(dim=0, keepdim=True)\r\n\r\n        input_embeddings[-num_new_tokens:] = input_embeddings_avg\r\n        output_embeddings[-num_new_tokens:] = output_embeddings_avg\r\n\r\n\r\ndef _tokenize_fn(strings: Sequence[str], tokenizer: transformers.PreTrainedTokenizer) -> Dict:\r\n    \"\"\"Tokenize a list of strings.\"\"\"\r\n    tokenized_list = [\r\n        tokenizer(\r\n            text,\r\n            return_tensors=\"pt\",\r\n            padding=\"longest\",\r\n            max_length=tokenizer.model_max_length,\r\n            truncation=True,\r\n        )\r\n        for text in strings\r\n    ]\r\n    input_ids = labels = [tokenized.input_ids[0] for tokenized in tokenized_list]\r\n    input_ids_lens = labels_lens = [\r\n        tokenized.input_ids.ne(tokenizer.pad_token_id).sum().item() for tokenized in tokenized_list\r\n    ]\r\n    return dict(\r\n        input_ids=input_ids,\r\n        labels=labels,\r\n        input_ids_lens=input_ids_lens,\r\n        labels_lens=labels_lens,\r\n    )\r\n\r\n\r\ndef preprocess(\r\n    sources: Sequence[str],\r\n    targets: Sequence[str],\r\n    tokenizer: transformers.PreTrainedTokenizer,\r\n) -> Dict:\r\n    \"\"\"Preprocess the data by tokenizing.\"\"\"\r\n    examples = [s + t for s, t in zip(sources, targets)]\r\n    examples_tokenized, sources_tokenized = [_tokenize_fn(strings, tokenizer) for strings in (examples, sources)]\r\n    input_ids = examples_tokenized[\"input_ids\"]\r\n    labels = copy.deepcopy(input_ids)\r\n    for label, source_len in zip(labels, sources_tokenized[\"input_ids_lens\"]):\r\n        label[:source_len] = IGNORE_INDEX\r\n    return dict(input_ids=input_ids, labels=labels)\r\n\r\n\r\n@dataclass\r\nclass DataCollatorForSupervisedDataset(object):\r\n    \"\"\"Collate examples for supervised fine-tuning.\"\"\"\r\n\r\n    tokenizer: transformers.PreTrainedTokenizer\r\n\r\n    def __call__(self, instances: Sequence[Dict]) -> Dict[str, torch.Tensor]:\r\n        ### one can customize here, since we set the T for joint loss as 2\r\n        \r\n        batch_input_ids1, batch_input_ids2 = [], []\r\n        batch_attention_mask1, batch_attention_mask2 = [], []\r\n        batch_labels1, batch_labels2 = [], []\r\n\r\n        for instance in instances:\r\n            instance1, instance2 = instance[\"instance_1\"], instance[\"instance_2\"]\r\n            batch_input_ids1.append(instance1[\"input_ids\"])\r\n            batch_input_ids2.append(instance2[\"input_ids\"])\r\n            batch_attention_mask1.append(instance1[\"attention_mask\"])\r\n            batch_attention_mask2.append(instan",
    "url": "https://github.com/huggingface/transformers/issues/33584",
    "state": "closed",
    "labels": [
      "trainer",
      "Quantization"
    ],
    "created_at": "2024-09-19T09:40:00Z",
    "updated_at": "2024-10-28T08:05:06Z",
    "user": "ankitprezent"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9470,
    "title": "Prompt scheduling in Diffusers like A1111",
    "body": "Hi everyone, I have a question that how to implement the [prompt scheduling feature](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#prompt-editing) in A1111 by diffusers library.\r\n\r\n**Example prompt:** Official portrait of a smiling world war ii general, `[male:female:0.99]`, cheerful, happy, detailed face, 20th century, highly detailed, cinematic lighting, digital art painting by Greg Rutkowski.\r\n\r\n![image](https://github.com/user-attachments/assets/d7c4b6d6-a0b9-455b-b4ef-2d581027204f)\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9470",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-19T09:07:30Z",
    "updated_at": "2024-10-19T17:22:23Z",
    "comments": 5,
    "user": "linhbeige"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1476,
    "title": "Update docs to explain how to use `tokenizer` field for chat prompt formats",
    "body": "## Bug description\r\n\r\nIn README.md, it's stated that the prompts used in production for HuggingChat can be found in PROMPTS.md.\r\n\r\nHowever, PROMPTS.md has not been updated for 7 months and there are several prompts missing for newer models.\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1476",
    "state": "open",
    "labels": [
      "bug",
      "documentation"
    ],
    "created_at": "2024-09-18T22:49:53Z",
    "updated_at": "2024-09-20T18:05:05Z",
    "user": "horsten"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 935,
    "title": "Is converting a Gemma 2B quantized compatible with transformers.js/onnx?",
    "body": "### Question\n\nI'm new to dev and wanted to know if converting a gemma 2b using the Optimum converter would work for this model?",
    "url": "https://github.com/huggingface/transformers.js/issues/935",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-18T15:57:55Z",
    "updated_at": "2024-09-24T20:26:53Z",
    "user": "iamhenry"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 3063,
    "title": "Simplify test code where a dataset is set as gated",
    "body": "[huggingface_hub@0.25.0](https://github.com/huggingface/huggingface_hub/releases/tag/v0.25.0) provides an API to set a repository as gated.\r\n\r\nWe had included a custom version of `update_repo_settings` because it lacked a `gated` parameter. Now we can switch back to the `huggingface_hub` method\r\n\r\nhttps://github.com/huggingface/dataset-viewer/blob/4859100ef282dcf73257dfb60e6b5a20d5955c68/jobs/cache_maintenance/tests/utils.py#L41\r\nhttps://github.com/huggingface/dataset-viewer/blob/4859100ef282dcf73257dfb60e6b5a20d5955c68/services/admin/tests/fixtures/hub.py#L24\r\nhttps://github.com/huggingface/dataset-viewer/blob/4859100ef282dcf73257dfb60e6b5a20d5955c68/services/worker/tests/fixtures/hub.py#L35",
    "url": "https://github.com/huggingface/dataset-viewer/issues/3063",
    "state": "closed",
    "labels": [
      "good first issue",
      "tests",
      "refactoring / architecture",
      "dependencies"
    ],
    "created_at": "2024-09-18T09:08:14Z",
    "updated_at": "2025-07-17T15:00:40Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 934,
    "title": "Repeating tokens in TextStreamer",
    "body": "### Question\n\n```\r\nimport {\r\n  AutoTokenizer,\r\n  AutoModelForCausalLM,\r\n  TextStreamer,\r\n  InterruptableStoppingCriteria,\r\n} from \"@huggingface/transformers\";\r\n\r\nclass TextGenerationPipeline {\r\n  static model = null;\r\n  static tokenizer = null;\r\n  static streamer = null;\r\n\r\n  static async getInstance(\r\n    progress_callback = null,\r\n    model_id = \"onnx-community/Phi-3.5-mini-instruct-onnx-web\",\r\n  ) {\r\n    this.tokenizer = AutoTokenizer.from_pretrained(model_id, {\r\n      progress_callback,\r\n    });\r\n\r\n    this.model = AutoModelForCausalLM.from_pretrained(model_id, {\r\n      // dtype: \"q4\",\r\n      dtype: \"q4f16\",\r\n      device: \"webgpu\",\r\n      use_external_data_format: true,\r\n      progress_callback,\r\n    });\r\n\r\n    return Promise.all([this.tokenizer, this.model]);\r\n  }\r\n}\r\n\r\nconst stopping_criteria = new InterruptableStoppingCriteria();\r\nlet past_key_values_cache = null;\r\n\r\nchrome.runtime.onMessage.addListener((request, sender, sendResponse) => {\r\n  if (request.action === \"initializeLlmModel\") {\r\n    console.log(\"setting up llm\");\r\n    const initialize = async () => {\r\n      const [tokenizer, model] = await TextGenerationPipeline.getInstance(\r\n        (x) => {\r\n          console.log(x);\r\n        },\r\n        request.model_id,\r\n      );\r\n      const inputs = tokenizer(\"a\");\r\n      const generatedOutput = await model.generate({\r\n        ...inputs,\r\n        max_new_tokens: 1,\r\n      });\r\n      console.log(generatedOutput);\r\n      sendResponse({ status: \"success\" });\r\n    };\r\n\r\n    initialize();\r\n    return true;\r\n  }\r\n\r\n  if (request.action === \"generateText\") {\r\n    console.log(\"generating text\");\r\n    async function generateText() {\r\n      const [tokenizer, model] = await TextGenerationPipeline.getInstance();\r\n\r\n      const text_callback_function = (output) => {\r\n        console.log(output);\r\n        if (output) {\r\n          chrome.runtime.sendMessage({\r\n            action: \"chatMessageChunk\",\r\n            chunk: output,\r\n          });\r\n        }\r\n      };\r\n\r\n      const streamer = new TextStreamer(tokenizer, {\r\n        skip_prompt: true,\r\n        skip_special_tokens: true,\r\n        callback_function: text_callback_function,\r\n      });\r\n\r\n      const inputs = tokenizer.apply_chat_template(request.messages, {\r\n        add_generation_prompt: true,\r\n        return_dict: true,\r\n      });\r\n\r\n      const { past_key_values, sequences } = await model.generate({\r\n        ...inputs,\r\n        past_key_values: past_key_values_cache,\r\n        // Sampling\r\n        // do_sample: true,\r\n        // top_k: 3,\r\n        // temperature: 0.2,\r\n\r\n        max_new_tokens: 1024,\r\n        stopping_criteria,\r\n        return_dict_in_generate: true,\r\n        streamer,\r\n      });\r\n\r\n      past_key_values_cache = past_key_values;\r\n\r\n      const decoded = tokenizer.batch_decode(sequences, {\r\n        skip_special_tokens: false,\r\n      });\r\n\r\n      console.log(decoded);\r\n      sendResponse({ generatedOutput: decoded, status: \"success\" });\r\n    }\r\n    generateText();\r\n    return true;\r\n  }\r\n});\r\n```\r\n\r\nIn the `text_callback_function` it is sending same token multiple times. What could be the reason? I am handling it on the frontend for the time being but was wondering what is the reason? What am I doing wrong here?\r\n\r\nThank you so much for the help in advance! ",
    "url": "https://github.com/huggingface/transformers.js/issues/934",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-18T02:53:36Z",
    "updated_at": "2025-10-13T04:50:11Z",
    "user": "chandeldivyam"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 933,
    "title": "Uncaught (in promise) TypeError: r.logits is not iterable",
    "body": "### Question\r\n\r\nHey guys,\r\n\r\nI have been trying to train a model for text classification then convert it to an onnx file for use in transformers js following this video\r\nhttps://www.youtube.com/watch?v=W_lUGPMW_Eg\r\n\r\nI keep getting the error Uncaught (in promise) TypeError: r.logits is not iterable\r\n\r\nAny ideas on where I might be going wrong or if something has changed since this was released?\r\n\r\nThis is my basic code, I have python hosting the files locally\r\n\r\n```\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n    <title>TinyBERT Model in Vanilla JS</title>\r\n</head>\r\n<body>\r\n\r\n    <h1>TinyBERT Model Inference</h1>\r\n    <p>Enter text for classification:</p>\r\n    <input type=\"text\" id=\"inputText\" placeholder=\"Enter your text here\" size=\"50\"/>\r\n    <button id=\"runModel\">Run Model</button>\r\n\r\n    <p><strong>Prediction:</strong> <span id=\"prediction\"></span></p>\r\n\r\n    <script type=\"module\">\r\n\r\nimport { pipeline, env } from \"https://cdn.jsdelivr.net/npm/@xenova/transformers\";\r\n\r\n        document.getElementById('runModel').addEventListener('click', async function () {\r\n            const inputText = document.getElementById('inputText').value;\r\n            \r\n            // Load the TinyBERT model for sequence classification from local files\r\n            const classifier = await pipeline('text-classification', './finalModel/');\r\n\r\n            // Run the model to get the prediction\r\n            const result = await classifier(inputText);\r\n\r\n            // Display the result\r\n            document.getElementById('prediction').innerText = JSON.stringify(result);\r\n        });\r\n    </script>\r\n\r\n</body>\r\n</html>\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/933",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-16T20:26:02Z",
    "updated_at": "2024-09-17T19:35:26Z",
    "user": "Joseff-Evans"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1472,
    "title": "Mistral api configuration without Cloudflare",
    "body": "I'd like to setup a local deployment using **only the mistral API**: https://docs.mistral.ai/api.\r\n\r\nCan i use ChatUI without an HF deployment and Cloudflare account?\r\n\r\nI leave the .env unchanged and overwrite the env.local with the following code\r\n\r\n```yml\r\nAGENT_ID=<my_agent_id_from_mistral>\r\nMISTRAL_API_KEY==<mytoken>\r\nMODELS='[\r\n    {\r\n      \"name\": \"mistral-large\",\r\n      \"displayName\": \"mistralai\",\r\n      \"description\": \"Mistral standard\",\r\n      \"websiteUrl\": \"https://docs.mistral.ai/\",\r\n      \"preprompt\": \"\",\r\n      \"parameters\": {\r\n        \"temperature\": 0.1,\r\n        \"top_p\": 0.95,\r\n        \"top_k\": 5,\r\n        \"stream\": true,\r\n        \"agent_id\": \"{AGENT_ID}\",\r\n        \"tool_choice\": \"auto\",\r\n        \"max_new_tokens\": 4096\r\n      },\r\n      \"endpoints\": [\r\n          {\r\n              \"type\": \"openai\",\r\n              \"baseURL\": \"https://api.mistral.ai/v1\",\r\n              \"defaultHeaders\": {\r\n                  \"Authorization\": \"Bearer {MISTRAL_API_KEY}\"\r\n              }\r\n          }\r\n      ]\r\n    },\r\n    {\r\n    \"name\": \"mistral-embed\",\r\n    \"displayName\": \"Mistral-embedbedings\",\r\n    \"description\": \"Mistral embedding model.\",\r\n    \"chunkCharLength\": 1024,\r\n    \"endpoints\": [\r\n        {\r\n            \"type\": \"openai\",\r\n            \"baseURL\": \"https://api.mistral.ai/v1\",\r\n            \"defaultHeaders\": {\r\n                \"Authorization\": \"Bearer {MISTRAL_API_KEY}\"\r\n            }\r\n        }\r\n    ]\r\n  }\r\n]'\r\nMONGODB_URL=mongodb://localhost:27017/\r\nPUBLIC_APP_ASSETS=chatui\r\nPUBLIC_APP_COLOR=blue\r\nPUBLIC_APP_NAME=\"Mistral Local\"\r\n```\r\nNot quite sure though if the agend_id is overwritten by the \"name\". ",
    "url": "https://github.com/huggingface/chat-ui/issues/1472",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-09-16T18:51:09Z",
    "updated_at": "2024-09-17T08:43:40Z",
    "comments": 0,
    "user": "JonasMedu"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 932,
    "title": "Best small model for text generation? ",
    "body": "### Question\n\nI'm looking to build a AI Journaling app that helps you reflect from your journal entries\r\n\r\nI'm looking for a model like (GPT or Claude) that will take the selected text and provide insights based on a prompt I provide\r\n\r\nIn this case the prompt will provide suggestions based on psychology techniques like CBT and ACT to help you with your life.\r\n\r\nAny ideas on which small model will be able to accomplish this? I've tried GPT2, t5- small, and I couldn't get Phi-3 to work",
    "url": "https://github.com/huggingface/transformers.js/issues/932",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-16T18:06:23Z",
    "updated_at": "2024-09-26T08:06:35Z",
    "user": "iamhenry"
  },
  {
    "repo": "pytorch/xla",
    "number": 8022,
    "title": "Add documentation for `pip install[pallas]`",
    "body": "## \ud83d\udcda Documentation\r\n\r\nPlease add installation documentation for `pip install[pallas]` to the landing page README instructions: https://github.com/pytorch/xla/blob/master/setup.py#L318\r\n\r\nAccordingly, this documentation should clearly explain how users choose between the two: https://pypi.org/project/torch-xla/\r\n\r\ncc @JackCaoG @ManfeiBai @jiawenliu64 @zpcore ",
    "url": "https://github.com/pytorch/xla/issues/8022",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-09-16T15:50:14Z",
    "updated_at": "2024-09-16T15:50:15Z",
    "comments": 0,
    "user": "miladm"
  },
  {
    "repo": "huggingface/distil-whisper",
    "number": 149,
    "title": "How to load using openai-whisper package to load the model?",
    "body": "How to load using openai-whisper package to load the model?",
    "url": "https://github.com/huggingface/distil-whisper/issues/149",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-15T15:08:46Z",
    "updated_at": "2024-09-15T15:08:46Z",
    "user": "lucasjinreal"
  },
  {
    "repo": "huggingface/competitions",
    "number": 40,
    "title": "How to modify the competition",
    "body": "Hi! I created a new competition using the [tool given here](https://huggingface.co/spaces/competitions/create). All good up till here.\r\nThen I had the space automatically running. To modify the competition, I cloned the repository of the space locally with the command given on the UI\r\n```\r\ngit clone https://huggingface.co/spaces/cmdgentest/commandgen\r\n```\r\nWhen I inspected the contents, it had only two files - `Dockerfile` and `README.md`. This was surprising as i expected the files mentioned [here](https://huggingface.co/docs/competitions/en/competition_repo).\r\nHowever, I still created these files myself and pushed the changes to the spaces repo. Once the space was restarted and running, I still wasn't able to see the changes I made.\r\n\r\nAt this point I am confused where exactly should I put files like `conf.json` in my case.",
    "url": "https://github.com/huggingface/competitions/issues/40",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-09-15T13:45:26Z",
    "updated_at": "2024-10-08T15:06:28Z",
    "user": "dakshvar22"
  },
  {
    "repo": "huggingface/speech-to-speech",
    "number": 101,
    "title": "I am really really curious about how to set up this project on a server to serve multiple users. I have been trying for a long time but haven't come up with a very good solution.",
    "body": "",
    "url": "https://github.com/huggingface/speech-to-speech/issues/101",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-15T13:42:18Z",
    "updated_at": "2025-02-04T15:44:31Z",
    "user": "demoBBB"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1147,
    "title": "[distributed][perf] ensure that all decoding ops are happening on gpu with no cpu sync",
    "body": "### \ud83d\udc1b Describe the bug\n\nper @kwen2501  - when we are doing decoding step:\r\n~~~\r\nnext_token = torch.tensor([decode_results[0][0]], device=device)\r\n~~~\r\n\"nit: I am not sure if the use of torch.tensor here would cause a sync from GPU to CPU (to get the scalar) then move to the GPU again (to create the tensor).\r\nIf there is no use of next_token in CPU domain, better to just use index op here.\r\n\r\nOr, is decode_results already on CPU? Hmm, then we'd need to think about how to arrange these CPU ops and GPU ops. Ideally, you would like to fire the send right after step().\"\r\n\r\n\n\n### Versions\n\nn/a",
    "url": "https://github.com/pytorch/torchchat/issues/1147",
    "state": "open",
    "labels": [
      "performance",
      "Distributed"
    ],
    "created_at": "2024-09-15T00:09:56Z",
    "updated_at": "2024-09-17T22:57:11Z",
    "comments": 0,
    "user": "lessw2020"
  },
  {
    "repo": "huggingface/transformers",
    "number": 33489,
    "title": "passing past_key_values as a tuple is deprecated, but unclear how to resolve",
    "body": "### System Info\n\nCopy-and-paste the text below in your GitHub issue and FILL OUT the two last points.\r\n\r\n- `transformers` version: 4.44.2\r\n- Platform: Linux-5.4.0-167-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.12\r\n- Huggingface_hub version: 0.24.7\r\n- Safetensors version: 0.4.5\r\n- Accelerate version: 0.34.2\r\n- Accelerate config: \tnot found\r\n- PyTorch version (GPU?): 2.1.1+cu121 (True)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using distributed or parallel set-up in script?: NA\r\n- Using GPU in script?: yes\r\n- GPU type: NVIDIA A40\n\n### Who can help?\n\n@ArthurZucker \n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\n```\r\nimport torch\r\nfrom datasets import load_dataset\r\nfrom transformers import AutoModelForCausalLM, AutoTokenizer, TrainingArguments\r\nfrom trl import SFTTrainer, SFTConfig\r\nfrom accelerate import Accelerator\r\nfrom peft import LoraConfig\r\nimport math, os, random\r\nfrom datetime import datetime\r\n\r\n# Select rows to train on\r\ninitial_rows = 50000\r\nannealing_rows = 10000\r\neval_rows = 10000  # Only 10000 rows for evaluation\r\n\r\nbatch_size = 8\r\nga = 4\r\n\r\nlearning_rate=1e-3\r\n\r\ndef setup_environment():\r\n    os.environ['WANDB_DISABLED'] = 'true'\r\n    return Accelerator()\r\n\r\ndef load_model_and_tokenizer():\r\n    model_name = \"Trelis/80M-0.0090-cosmopedia\"\r\n    model_kwargs = {\r\n        \"torch_dtype\": torch.bfloat16,\r\n    }\r\n    tokenizer = AutoTokenizer.from_pretrained(\"HuggingFaceTB/SmolLM-360M-Instruct\")\r\n    model = AutoModelForCausalLM.from_pretrained(model_name, **model_kwargs)\r\n    return model, tokenizer\r\n\r\ndef load_and_preprocess_train_dataset(start_idx, num_rows):\r\n    dataset = load_dataset(\"TIGER-Lab/WebInstructSub\", split=\"train\",\r\n                           streaming=True\r\n                          )\r\n    dataset = dataset.skip(start_idx).take(num_rows)\r\n    \r\n    def format_instruction(example):\r\n        return {\r\n            \"messages\": [\r\n                {\"role\": \"user\", \"content\": example[\"question\"]},\r\n                {\"role\": \"assistant\", \"content\": example[\"answer\"]}\r\n            ]\r\n        }\r\n    \r\n    formatted_dataset = dataset.map(format_instruction)\r\n    return formatted_dataset\r\n\r\ndef format_instruction_for_trainer(example):\r\n    tokenizer = AutoTokenizer.from_pretrained(\"HuggingFaceTB/SmolLM-360M-Instruct\")\r\n    \r\n    return tokenizer.apply_chat_template(\r\n        example[\"messages\"],\r\n        truncation=True,\r\n        padding=\"max_length\",\r\n        max_length=2048,\r\n        tokenize=False,\r\n    )\r\n\r\ndef load_and_preprocess_eval_dataset():\r\n    dataset = load_dataset(\"TIGER-Lab/WebInstructSub\", split=\"train\")\r\n    \r\n    # Get the total number of rows in the dataset\r\n    total_rows = len(dataset)\r\n    \r\n    # Generate a list of random indices\r\n    random_indices = random.sample(range(total_rows), eval_rows)\r\n    \r\n    # Select the random rows\r\n    dataset = dataset.select(random_indices)\r\n    \r\n    def format_instruction(example):\r\n        return {\r\n            \"messages\": [\r\n                {\"role\": \"user\", \"content\": example[\"question\"]},\r\n                {\"role\": \"assistant\", \"content\": example[\"answer\"]}\r\n            ]\r\n        }\r\n    \r\n    formatted_dataset = dataset.map(format_instruction, remove_columns=dataset.column_names)\r\n    return formatted_dataset\r\n\r\ndef main():\r\n    accelerator = setup_environment()\r\n    \r\n    model, tokenizer = load_model_and_tokenizer()\r\n    print(model.device)\r\n    \r\n    # Combined training dataset (streaming)\r\n    total_rows = initial_rows + annealing_rows\r\n    train_dataset = load_and_preprocess_train_dataset(0, total_rows)\r\n    \r\n    # Evaluation dataset (non-streaming, last 1000 rows)\r\n    eval_dataset = load_and_preprocess_eval_dataset()\r\n    \r\n    # Calculate steps\r\n    num_epochs = 1\r\n    total_steps = (total_rows * num_epochs) // (batch_size * ga)\r\n    initial_steps = (initial_rows * num_epochs) // (batch_size * ga)\r\n    \r\n    timestamp = datetime.now().strftime(\"%Y%m%d_%H%M%S\")\r\n    run_name = f\"SFT-{total_rows}rows-lr{learning_rate}-{timestamp}\"\r\n    \r\n    training_args = SFTConfig(\r\n        output_dir=f\"./Trelis_local/80M-0.015-cosmopedia-SFT-{run_name}\",\r\n        run_name=run_name,\r\n        logging_dir=f\"./logs/{run_name}\",\r\n        eval_strategy=\"steps\",\r\n        save_strategy=\"steps\",\r\n        report_to=\"tensorboard\",\r\n        num_train_epochs=num_epochs,\r\n        per_device_train_batch_size=batch_size,\r\n        per_device_eval_batch_size=batch_size,\r\n        warmup_steps=20,\r\n        logging_steps=int(total_steps * 0.1),\r\n        eval_steps=int(total_steps * 0.1),\r\n        save_steps=int(total_steps * 0.1),\r\n        learning_rate=learning_rate,\r\n        bf16=True,\r\n        max_steps=total_steps,\r\n        gra",
    "url": "https://github.com/huggingface/transformers/issues/33489",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-09-14T13:58:18Z",
    "updated_at": "2025-11-29T04:50:43Z",
    "user": "RonanKMcGovern"
  },
  {
    "repo": "pytorch/PiPPy",
    "number": 1142,
    "title": "How to train a model with pippy",
    "body": "It seems that the examples here are all examples of inference, where are the examples of training\uff1f",
    "url": "https://github.com/pytorch/PiPPy/issues/1142",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-14T09:27:38Z",
    "updated_at": "2024-11-20T07:18:01Z",
    "user": "sunkun1997"
  },
  {
    "repo": "pytorch/data",
    "number": 1317,
    "title": "StatefulDataloader is slower than Dataloader. Is there any best practice of StatefulDataloader?",
    "body": "### \ud83d\udcda The doc issue\n\nHello,\r\n\r\nThank you for your awesome implementation of StatefulDataloader.\r\n\r\nI use the compare the speed of Dataloader and StatefulDataloader, the StatefulDataloader is much slower than Dataloader. For example, Dataloader costs 10ms per iter, but StatefulDataloader costs about 2s per iter.\r\n\r\nIs there any best practice of StatefulDataloader?\r\n\r\ncc @andrewkho \n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/1317",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-13T09:43:45Z",
    "updated_at": "2024-09-13T09:50:08Z",
    "comments": 1,
    "user": "by2101"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 577,
    "title": "DDP (replicate) + TP?",
    "body": "Currently, when there are two device meshes (`tp` and `dp`), torchtitan should choose FSDP as the **only** backend for DP. Ref:\r\nhttps://github.com/pytorch/torchtitan/blob/d2a4904f58accc683c17c66a360026cb3c8109af/torchtitan/parallelisms/parallelize_llama.py#L97-L98\r\n\r\nHowever, the `replicate` should support >1D mesh and be used with TP enabled. [Ref](https://github.com/pytorch/pytorch/blob/7dc1788396fc9e2860c0c236e0c0e108e96b83c8/torch/distributed/_composable/replicate.py#L218-L237).\r\n\r\n**Q1:** Why does torchtitan not support DDP (replicate) + TP? Is it only an implementation choice?\r\n\r\nI have [handwritten DDP + TP in torchtitan](https://github.com/pytorch/torchtitan/compare/main...yzs981130:torchtitan:yzs/ddp_tp) and surprisingly found that the loss never goes down. It seems there are no gradients after `loss.backward()`.\r\n\r\n![image](https://github.com/user-attachments/assets/9af2b7e6-a866-4883-b493-9d206f22d378)\r\n\r\nTo reproduce, use the branch above and run `run_llama_train.sh` on an 8-GPU machine.\r\n\r\n**Q2:** Is it a bug or an intended feature that DDP+TP is not used, and that results in missing gradients?\r\n\r\nAnd collect_env:\r\n```\r\nCollecting environment information...\r\nPyTorch version: 2.5.0.dev20240903+cu118\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.8\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Debian GNU/Linux 9.13 (stretch) (x86_64)\r\nGCC version: (Debian 6.3.0-18+deb9u1) 6.3.0 20170516\r\nClang version: Could not collect\r\nCMake version: version 3.21.2\r\nLibc version: glibc-2.24\r\n\r\nPython version: 3.10.14 (main, May  6 2024, 19:42:50) [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-5.4.56.bsk.2-amd64-x86_64-with-glibc2.24\r\nIs CUDA available: True\r\nCUDA runtime version: 12.6.20\r\nCUDA_MODULE_LOADING set to: LAZY\r\n...\r\n\r\nNvidia driver version: 560.28.03\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n...\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.26.4\r\n[pip3] optree==0.12.1\r\n[pip3] pytorch-triton==3.0.0+dedb7bdf33\r\n[pip3] torch==2.5.0.dev20240903+cu118\r\n[pip3] torchaudio==2.5.0.dev20240903+cu118\r\n[pip3] torchdata==0.8.0\r\n[pip3] torchvision==0.20.0.dev20240903+cu118\r\n[conda] numpy                     1.26.4                   pypi_0    pypi\r\n[conda] optree                    0.12.1                   pypi_0    pypi\r\n[conda] pytorch-triton            3.0.0+dedb7bdf33          pypi_0    pypi\r\n[conda] torch                     2.5.0.dev20240903+cu118          pypi_0    pypi\r\n[conda] torchaudio                2.5.0.dev20240903+cu118          pypi_0    pypi\r\n[conda] torchdata                 0.8.0                    pypi_0    pypi\r\n[conda] torchvision               0.20.0.dev20240903+cu118          pypi_0    pypi\r\n```\r\n\r\nP.S. \r\n- Torch 2.4.0 shares the similar abnormal results\r\n- Using `DistributedDataParallel` (class) rather than `replicate` behaves well\r\n\r\nThanks in advance! ",
    "url": "https://github.com/pytorch/torchtitan/issues/577",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-13T08:10:05Z",
    "updated_at": "2025-03-19T21:22:12Z",
    "user": "yzs981130"
  },
  {
    "repo": "pytorch/xla",
    "number": 8000,
    "title": "[RFC] `torch_xla` Backward Compatibility Proposal",
    "body": "Recently, we have started the process to reduce the torch_xla API footprint in favor of torch API to improve the usability. This RFC focuses on the process to deprecate any functions.\r\n\r\n## Backward compatibility\r\nWe propose to offer a 6 months (2 releases) grace period before completely removing the deprecated API. As is shown in the graph below:\r\n\r\n<img width=\"1052\" alt=\"Screenshot 2024-09-12 at 1 47 03\u202fPM\" src=\"https://github.com/user-attachments/assets/9d91f784-8915-4908-9778-eed28a3ecd22\">\r\n\r\nDevelopers should follow the illustrated timeline with the following action:\r\n- Before version X-1 branch cut, developers check in API changes and wrap the function to be deprecated with the warning message.  The API to be deprecated should still be usable but it should print out the warning message once if any code is calling into the function. In this way, starting from version X and version X+1, we should see the deprecated message that mentions `API xxx will be deprecated in release X+2`. \r\n- Before version X+2 branch cut, developers completely delete the deprecated functions along with the warning deprecated message.  \r\n\r\nIf we follow the timeline, the deprecated API should still be usable for two releases, in which we guarantee backward compatibility.  \r\n\r\nFor each deprecated API, mention it in the release X\u2019s release note including what\u2019s the suggested new APIs and when to completely deprecate the old one.\r\n## Actions to take for deprecation:  \r\n### Github actions for API deprecation  \r\nBefore deprecate any APIs, create a github issue to include the following details:\r\n- Function to be deprecated and whether we have a new API as a replacement.\r\n- Proposed timeline before completely deprecating the function. We need to guarantee the deprecated message lasts for at least 2 releases.  \r\n### How to mark function to be deprecated  \r\nHere is the example on the code changes if we want to deprecate `torch_xla/core/xla_model.py:xrt_world_size()` with ` torch_xla/runtime.py:world_size()`. There are two ways to mark a function as deprecated:\r\n- Use deprecated function (full example [PR](https://github.com/pytorch/xla/pull/7679)):\r\n```python\r\n# In torch_xla/core/xla_model.py:\r\nfrom torch_xla.experimental.deprecation import deprecated\r\nfrom . import xla_model as this_module\r\nxrt_world_size = deprecated(this_module, torch_xla.runtime.world_size,\r\n                            'xrt_world_size() will be removed in release 2.7.')\r\n# Remember to comment out or remove the original xrt_world_size in the file.\r\n\"\"\"\r\ndef xrt_world_size():\r\n  ...\r\n\"\"\"\r\n\r\n# In torch_xla/runtime.py\r\ndef world_size():\r\n  ...\r\n```\r\n\r\n- Use @mark_deprecated decorator:\r\n```python\r\n# In torch_xla/core/xla_model.py:\r\nfrom torch_xla.experimental.deprecation import mark_deprecated\r\n\r\n@mark_deprecated(torch_xla.runtime.world_size, extra_msg='xrt_world_size() will be removed in release 2.7.')\r\ndef xrt_world_size():\r\n  ...\r\n\r\n\r\n# In torch_xla/[runtime.py](http://runtime.py/), define the new function:\r\ndef world_size():\r\n  ...\r\n```",
    "url": "https://github.com/pytorch/xla/issues/8000",
    "state": "open",
    "labels": [
      "documentation",
      "2.5 release"
    ],
    "created_at": "2024-09-12T20:58:55Z",
    "updated_at": "2025-07-11T17:38:19Z",
    "comments": 4,
    "user": "zpcore"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 436,
    "title": "Image storage format",
    "body": "I am quite interested in using `LeRobotDataset` for large scale training. I am interested to get more context on the options for storing images so I am aware of the implications this might have:\r\n- Did you by chance study if the mp4 video compression has any negative effects on the image quality in terms of model performance (or any studies you based your decision on)\r\n- I see atm lerobot supports storing images either in `.mp4` or `.pt`, but not in `arrow` or `parquet` format as many other HF datasets do. Is there any specific reason you didn't add support for `arrow` / `parquet` which also provide memory mapping? Any ideas how pytorch would compare to `arrow` / `parquet` when using datasets of 100s of millions of examples?\r\n",
    "url": "https://github.com/huggingface/lerobot/issues/436",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2024-09-12T16:38:21Z",
    "updated_at": "2025-10-23T02:29:14Z",
    "user": "nikonikolov"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 435,
    "title": "Open-X datasets",
    "body": "Thanks for the great work! I am interested in converting more of the open-x datasets to `LeRobotDataset`.\r\n- I was wondering if there was any particular reason the entire open-x wasn't added already, e.g. some difficulties you encountered with some specific datasets?\r\n- Do you have any tips where I should be extra careful when converting from RLDS to `LeRobotDataset` or it's generally as easy as calling the conversion script?",
    "url": "https://github.com/huggingface/lerobot/issues/435",
    "state": "closed",
    "labels": [
      "enhancement",
      "question",
      "dataset"
    ],
    "created_at": "2024-09-12T16:29:40Z",
    "updated_at": "2025-10-08T08:25:55Z",
    "user": "nikonikolov"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 432,
    "title": "some questions about real world env",
    "body": "### System Info\n\n```Shell\nall software cfg match author's project\n```\n\n\n### Information\n\n- [ ] One of the scripts in the examples/ folder of LeRobot\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nI am planning to control my own robot left-arm. I've almost figure out all the parts if lerobot-dataset, then I want to make my own dataset respect to the aloha_sim_transfer_cube_human rather than \"korch ALOHA teleop hardware system\".\r\nmy questions are:\r\n1) Must I keep such a high fps like 50 when collect data from camera and arm actions?\r\n2) actions comes from human control on the arm, and state comes from reading operation, but how should I set the time gap between action and state?\n\n### Expected behavior\n\nanswers from anyone",
    "url": "https://github.com/huggingface/lerobot/issues/432",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-12T09:53:23Z",
    "updated_at": "2025-10-08T08:27:48Z",
    "user": "NNsauce"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1463,
    "title": "Some bugs",
    "body": "## Bug description\r\n\r\nThere are several issues that I have with the site, such as slow performance both on mobile and PC. When trying to select specific parts of the text, it goes back to the original message. Sometimes it occurs in errors that force me to always refresh the conversation. When I switch conversation I have to switch all of my messages to the latest ones.\r\nBut I feel it's not my internet that's causing the issue but something on the website.\r\n\r\n## Steps to reproduce\r\n\r\nThe performance is quite mixed, but on mobile is unplayable. (Samsung A40)\r\nTry to select any text, and it will direct you to the first message.\r\nThe last one I don't how to replicate except being unlucky with it.\r\n\r\n\r\n### Specs\r\n\r\n- **Windows 11**:\r\n- **Librewolf 124.0.1-1**:\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1463",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-09-12T08:13:35Z",
    "updated_at": "2024-09-12T09:03:58Z",
    "comments": 0,
    "user": "Ruyeex"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 929,
    "title": "what is pipeline?",
    "body": "",
    "url": "https://github.com/huggingface/transformers.js/issues/929",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-12T05:09:05Z",
    "updated_at": "2024-10-04T10:24:42Z",
    "user": "chakravarthi-vatala"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1134,
    "title": "Failures when using PyTorch local build vs. binaries",
    "body": "### \ud83d\udc1b Describe the bug\n\nI ran into an issue with loading the tokenizer, which was root caused to me using my local PyTorch build.\r\n\r\nAfter building the aoti runner, I ran the following command: `cmake-out/aoti_run exportedModels/stories15M.so -z /home/angelayi/.torchchat/model-cache/stories15M/tokenizer.model -i \"Once upon a time\u201d`\r\n\r\nWith my local build, the above command ran into the error: `couldn't load /home/angelayi/.torchchat/model-cache/stories15M/tokenizer.model` which is from the sentencepiece tokenizer. Specifying `-l 2` doesn't change anything as this is the default setting. \r\n\r\nChanging to `-l 3` results in the following error:\r\n```\r\nterminate called after throwing an instance of 'std::invalid_argument'\r\n  what():  invalid encoder line: \r\nzsh: IOT instruction (core dumped)  cmake-out/aoti_run ../lucy_stories15M.so -z ../tokenizer.model -l 3 -i \r\n```\r\n\r\nAfter re-running `./install/install_requirements.sh`, this installs PyTorch version at 08142024, and runs successfully.\r\nSo I tried today's nightly (09112024) using `pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121`, and this also runs successfully.\r\nGoing back to my local PyTorch build, I checked out the commit `26e5572` which corresponds to the cutoff of today's nightly, and built PyTorch locally. This runs into the initial error with the tokenizers. \r\n\r\nI still didn't figure out how to run with my local PyTorch build, but quoting Nikita, this is motivation to create a docker/venv story :P \r\n\r\ncc @malfet @Jack-Khuu \n\n### Versions\n\nmain",
    "url": "https://github.com/pytorch/torchchat/issues/1134",
    "state": "open",
    "labels": [
      "bug",
      "enhancement"
    ],
    "created_at": "2024-09-11T23:57:18Z",
    "updated_at": "2024-09-12T01:01:24Z",
    "comments": 0,
    "user": "angelayi"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9417,
    "title": "Suggestion for speeding up `index_for_timestep` by removing sequential `nonzero()` calls in samplers",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nFirst off, thanks for the great codebase and providing so many resources! I just wanted to provide some insight into an improvement I made for myself, in case you'd like to include it for all samplers. I'm using the `FlowMatchEulerDiscreteScheduler` and after profiling, I've noticed that it's unexpectedly slowing down my training speeds. I'll describe the issue and proposed solution here rather than making a PR, since this would touch a lot of code and perhaps someone on the diffusers team would like to implement it.\r\n\r\n**Describe the solution you'd like.**\r\nThis line in particular is very slow because it is a for loop `step_indices = [self.index_for_timestep(t, schedule_timesteps) for t in timestep]` and the `self.index_for_timestep()` is calling a nonzero() function which is slow.\r\n\r\nhttps://github.com/huggingface/diffusers/blob/b9e2f886cd6e9182f1bf1bf7421c6363956f94c5/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L149\r\n\r\n**Describe alternatives you've considered.**\r\nI've changed the code as follows:\r\n\r\n```python\r\n# huggingface code\r\ndef index_for_timestep(self, timestep, schedule_timesteps=None):\r\n    if schedule_timesteps is None:\r\n        schedule_timesteps = self.timesteps\r\n\r\n    indices = (schedule_timesteps == timestep).nonzero()\r\n\r\n    # The sigma index that is taken for the **very** first `step`\r\n    # is always the second index (or the last index if there is only 1)\r\n    # This way we can ensure we don't accidentally skip a sigma in\r\n    # case we start in the middle of the denoising schedule (e.g. for image-to-image)\r\n    pos = 1 if len(indices) > 1 else 0\r\n\r\n    return indices[pos].item()\r\n```\r\n\r\nchanged to =>\r\n\r\n```python\r\n# my code\r\ndef index_for_timestep(self, timestep, schedule_timesteps=None):\r\n    if schedule_timesteps is None:\r\n        schedule_timesteps = self.timesteps\r\n\r\n    num_steps = len(schedule_timesteps)\r\n    start = schedule_timesteps[0].item()\r\n    end = schedule_timesteps[-1].item()\r\n    indices = torch.round(((timestep - start) / (end - start)) * (num_steps - 1)).long()\r\n\r\n    return indices\r\n```\r\n\r\nand\r\n\r\n```python\r\n# huggingface code\r\n# self.begin_index is None when scheduler is used for training, or pipeline does not implement set_begin_index\r\nif self.begin_index is None:\r\n    step_indices = [self.index_for_timestep(t, schedule_timesteps) for t in timestep]\r\n```\r\n\r\nchanged to =>\r\n\r\n```python\r\n# my code\r\n# self.begin_index is None when scheduler is used for training, or pipeline does not implement set_begin_index\r\nif self.begin_index is None:\r\n    step_indices = self.index_for_timestep(timestep, schedule_timesteps)\r\n```\r\n\r\n**Additional context.**\r\nJust wanted to bring this modification to your attention since it could be a training speedup for folks. \ud83d\ude42 Especially when someone has a large batch size > 1 and this for loop it occurring with nonzero search operations. Some other small changes might be necessary to ensure compatibility of the function changes, but I suspect it could help everyone. Thanks for the consideration!\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9417",
    "state": "open",
    "labels": [
      "help wanted",
      "wip",
      "contributions-welcome",
      "performance"
    ],
    "created_at": "2024-09-11T14:54:37Z",
    "updated_at": "2025-02-08T10:26:47Z",
    "comments": 11,
    "user": "ethanweber"
  },
  {
    "repo": "huggingface/cosmopedia",
    "number": 29,
    "title": "What is the best way to cite the work?",
    "body": "This is absolutely fantastic work. Thank you very much for making it public. \r\n\r\nWhat is the best way to cite this dataset/project? Is there any paper I can cite or should I cite the blog-post?",
    "url": "https://github.com/huggingface/cosmopedia/issues/29",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-11T14:34:54Z",
    "updated_at": "2024-09-11T14:36:15Z",
    "user": "vijetadeshpande"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9416,
    "title": "[Schedulers] Add SGMUniform",
    "body": "Thanks to @rollingcookies, we can see in this [issue](https://github.com/huggingface/diffusers/issues/9397) that this schedulers works great with the Hyper and probably also Lighting loras/unets.\r\n\r\nIt'd be fantastic if someone can contribute this scheduler to diffusers. \r\n\r\nPlease let me know if someone is willing to do this.",
    "url": "https://github.com/huggingface/diffusers/issues/9416",
    "state": "closed",
    "labels": [
      "help wanted",
      "contributions-welcome",
      "advanced"
    ],
    "created_at": "2024-09-11T13:59:27Z",
    "updated_at": "2024-09-23T23:39:56Z",
    "comments": 12,
    "user": "asomoza"
  },
  {
    "repo": "huggingface/transformers",
    "number": 33416,
    "title": "The examples in the examples directory are mostly for fine-tuning pre-trained models\uff1fhow to trian from  scratch",
    "body": "### Model description\n\nno \n\n### Open source status\n\n- [X] The model implementation is available\n- [X] The model weights are available\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/transformers/issues/33416",
    "state": "open",
    "labels": [
      "New model"
    ],
    "created_at": "2024-09-11T03:32:53Z",
    "updated_at": "2024-10-03T23:28:42Z",
    "user": "zc-Chao"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 135645,
    "title": "[ONNX] How to export the FlashAttention kernel",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\n1. code\r\n```\r\n    import sys\r\n    import torch \r\n    from  modeling_intern_vit import FlashAttention   # FlashAttention  of InternVL2-2B model\r\n   sys.path.append(\"/home/InternVL2-2B\")  \r\n   qkv=torch.load(\"/home/qkv.pth\") \r\n   falsh=FlashAttention().eval().cuda()\r\n  out=falsh(qkv.cuda())\r\n  with torch.no_grad():     \r\n     torch.onnx.export(    \r\n            falsh, \r\n            (qkv,),\r\n             \"/home/qkv.onnx\",\r\n            input_names   = [\"input0\"],\r\n             output_names  = [\"qkv_out\"],\r\n           opset_version = 11\r\n             )\r\n```\r\n\r\n3. output\r\n\r\n```\r\n    out, q, k, v, out_padded, softmax_lse, S_dmask, rng_state = flash_attn_cuda.varlen_fwd(\r\n/usr/local/lib/python3.10/dist-packages/flash_attn/flash_attn_interface.py:90: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n```\r\n\r\n5. onnx-file image \r\n     \r\n![image](https://github.com/user-attachments/assets/f8a36f5d-1772-41ec-8e3e-0cde2b37e791)\r\n\r\n6.needed help\r\n \"My goal is to export an ONNX file for the visual part of the InternVL2-2B model, which uses the Flash-Attention module. The ONNX file I export produces inference results that differ significantly from those of PyTorch. I then tried exporting the ONNX file for Flash-Attention alone and testing it. However, the ONNX file only includes inputs and outputs, while the Flash-Attention includes many operations like reshape, which are missing in the exported ONNX file. This is the issue I\u2019m facing. I hope to export a functional ONNX file where the inference results are similar to those obtained from PyTorch. This is my requirement.\"\r\n\r\n     \r\n       \r\n\r\n\r\n       \r\n\r\n\r\n### Versions\r\n\r\nCollecting environment information...\r\nPyTorch version: 2.4.0+cu121\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 22.04.4 LTS (x86_64)\r\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\nLibc version: glibc-2.35\r\n\r\nPython version: 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] (64-bit runtime)\r\nPython platform: Linux-5.15.0-119-generic-x86_64-with-glibc2.35\r\nIs CUDA available: True\r\nCUDA runtime version: 12.4.131\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 3090\r\nNvidia driver version: 550.107.02\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                         x86_64\r\nCPU op-mode(s):                       32-bit, 64-bit\r\nAddress sizes:                        39 bits physical, 48 bits virtual\r\nByte Order:                           Little Endian\r\nCPU(s):                               16\r\nOn-line CPU(s) list:                  0-15\r\nVendor ID:                            GenuineIntel\r\nModel name:                           11th Gen Intel(R) Core(TM) i7-11700F @ 2.50GHz\r\nCPU family:                           6\r\nModel:                                167\r\nThread(s) per core:                   2\r\nCore(s) per socket:                   8\r\nSocket(s):                            1\r\nStepping:                             1\r\nCPU max MHz:                          4900.0000\r\nCPU min MHz:                          800.0000\r\nBogoMIPS:                             4992.00\r\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap avx512ifma clflushopt intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm md_clear flush_l1d arch_capabilities\r\nVirtualization:                       VT-x\r\nL1d cache:                            384 KiB (8 instances)\r\nL1i cache:                            256 KiB (8 instances)\r\nL2 cache:                             4 MiB (8 instances)\r\nL3 cache:                             16 MiB (1 instance)\r\nNUMA node(s):                         1\r\nNUMA node0 CPU(s):                    0-15\r\nVulnerability Gather data sampling:   Mitigation; Microcode\r\nVulnerability Itlb multihit:          Not aff",
    "url": "https://github.com/pytorch/pytorch/issues/135645",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged",
      "onnx-triaged"
    ],
    "created_at": "2024-09-11T01:40:30Z",
    "updated_at": "2024-09-27T01:46:09Z",
    "user": "scuizhibin"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9407,
    "title": "callback / cannot yield intermediate images on the fly during inference",
    "body": "Hi, \r\n\r\nin advance apologies if this has been asked already, or if I'm just misusing the diffusers API.\r\n\r\nUsing `diffusers==0.30.2`\r\n\r\n**What API design would you like to have changed or added to the library? Why?**\r\n\r\nI will illustrate straight away the general issue with my use case: I need to call a (FLUX) diffusers pipeline from some endpoint of mine, passing a callback that decodes latents and saves on disk intermediate images obtained from them, at the end of each step. So far, so good: I do manage to get the intermediate images saved on disk. I do this using the pipeline argument `callback_on_step_end`\r\n\r\nNow, I'd like to _**yield**_ (in the pythonic meaning) these intermediate images on the fly, as soon as they're available, ie at the end of each inference step. I need to do so from my endpoint. That's where my problem is.\r\n\r\nI could not make this idea work using with diffusers callback mechanism.\r\nI mean, I did manage that by subclassing the pipeline, copy-pasting the dunder call method code and overriding it, but this is not maintainable, especially since the FLUX code evolves rapidly nowadays.\r\nAlso, note that currently diffusers assigns the result of the call to the callback to a variable and expects it to implement the `.pop` method, which might add constraints (diffusers typically expects a kwarg dict, see [here](https://github.com/huggingface/diffusers/blob/v0.30.2/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L1026)).\r\n\r\nAnother approach I thought of is to monitor the disk contents in a parallel process during the call to the pipeline.\r\n\r\nBut is there an easier way?\r\n\r\n\r\n\r\n**What use case would this enable or better enable? Can you give us a code example?**\r\n\r\n\r\nThis allows to manipulate the objects produced by the callback live, instead of having to wait for the whole reverse diffusion to finish.\r\n\r\n\r\nThank you\r\n\r\ncc @sayakpaul @yiyixuxu\r\n\r\nalso tagging @asomoza since I saw he is the contributor to the official callback interface\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9407",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-10T16:32:04Z",
    "updated_at": "2024-09-25T12:28:20Z",
    "comments": 8,
    "user": "Clement-Lelievre"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 928,
    "title": "The inference speed on the mobile end is a bit slow",
    "body": "### Question\r\n\r\nIf it is a mobile device that does not support WebGPU, how can we improve the inference speed of the model? I have tried WebWorker, but the results were not satisfactory",
    "url": "https://github.com/huggingface/transformers.js/issues/928",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-10T09:14:16Z",
    "updated_at": "2024-09-11T08:46:33Z",
    "user": "Gratifyyy"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3050,
    "title": "Improve example by adding missing import",
    "body": "The [example \"Creating a Custom Dataset for your files\"](https://github.com/pytorch/tutorials/blob/8a8331eb2796c05113c8a98bc03a7a164407fcbf/beginner_source/basics/data_tutorial.py#L123) is missing the import `from torch.utils.data import Dataset`. Since other imports are shown and the purpose of this example is to show how to create a custom dataset, this import is crucial and should be added.\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/3050",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-10T09:04:01Z",
    "updated_at": "2025-04-14T18:43:31Z",
    "comments": 0,
    "user": "avitase"
  },
  {
    "repo": "pytorch/xla",
    "number": 7987,
    "title": "Speeding up computation while using SPMD on large TPU pod",
    "body": "## \u2753 Questions and Help\r\nWhen running on vp-128 TPU pod (even when sharding only by batch dimension) we are experiencing very low performance comparing to the same pod without SPMD.\r\n\r\nDo you have any tips how to increase the performance? some SPMD arguments? things we need to think about when using it? anything that might help because right now the performance is lower than regular in a factor.\r\n@JackCaoG ",
    "url": "https://github.com/pytorch/xla/issues/7987",
    "state": "closed",
    "labels": [
      "question",
      "performance"
    ],
    "created_at": "2024-09-10T07:59:14Z",
    "updated_at": "2025-03-31T15:57:15Z",
    "user": "dudulightricks"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 927,
    "title": "Error with Using require for ES Modules in @xenova/transformers Package",
    "body": "### Question\n\ntrying to use require to import the Pipeline class from the @xenova/transformers package, but encounter the following error:\r\n\r\nconst { Pipeline } = require('@xenova/transformers');\r\n^\r\n\r\nError [ERR_REQUIRE_ESM]: require() of ES Module D:\\Z-charity\\dating_app_backend\\node_modules@xenova\\transformers\\src\\transformers.js from D:\\Z-charity\\dating_app_backend\\controllers\\authController.js not supported.\r\nInstead change the require of transformers.js in D:\\Z-charity\\dating_app_backend\\controllers\\authController.js to a dynamic import() which is available in all CommonJS modules.\r\nat Object. (D:\\Z-charity\\dating_app_backend\\controllers\\authController.js:10:22) {\r\ncode: 'ERR_REQUIRE_ESM'\r\n\r\nIssue with Dynamic Import\r\n\r\nconst getPipeline = async () => {\r\nconst { Pipeline } = await import('@xenova/transformers');\r\nreturn new Pipeline('text-classification', 'xenova/bert-base-uncased');\r\n};\r\n\r\n{\r\n\"message\": \"Server error\",\r\n\"error\": \"Must implement _call method in subclass\"\r\n}\r\n\r\nReproduction\r\ntrying to use require to import the Pipeline class from the @xenova/transformers package, but encounter the following error:\r\n\r\nconst { Pipeline } = require('@xenova/transformers');\r\n^\r\n\r\nError [ERR_REQUIRE_ESM]: require() of ES Module D:\\Z-charity\\dating_app_backend\\node_modules@xenova\\transformers\\src\\transformers.js from D:\\Z-charity\\dating_app_backend\\controllers\\authController.js not supported.\r\nInstead change the require of transformers.js in D:\\Z-charity\\dating_app_backend\\controllers\\authController.js to a dynamic import() which is available in all CommonJS modules.\r\nat Object. (D:\\Z-charity\\dating_app_backend\\controllers\\authController.js:10:22) {\r\ncode: 'ERR_REQUIRE_ESM'\r\n\r\nIssue with Dynamic Import\r\n\r\nconst getPipeline = async () => {\r\nconst { Pipeline } = await import('@xenova/transformers');\r\nreturn new Pipeline('text-classification', 'xenova/bert-base-uncased');\r\n};\r\n\r\n{\r\n\"message\": \"Server error\",\r\n\"error\": \"Must implement _call method in subclass\"\r\n}\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/927",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-10T06:02:53Z",
    "updated_at": "2024-12-08T19:17:31Z",
    "user": "qamarali205"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 925,
    "title": "V3 - WebGPU Whisper in Chrome Extention",
    "body": "### Question\n\nCan [webGPU accelerated whisper](https://huggingface.co/spaces/Xenova/whisper-webgpu) run in a chrome extension?\r\n\r\nI checked the space and found the dependency `\"@xenova/transformers\": \"github:xenova/transformers.js#v3\"` which I imported in a chrome extension. When I tried to import it, it didn't work.\r\n\r\n```\r\nModule not found: Error: Can't resolve '@xenova/transformers' in 'D:\\projects\\mosaic8\\browser-extension\\src\\utils'  \r\nresolve '@xenova/transformers' in 'D:\\projects\\mosaic8\\browser-extension\\src\\utils'\r\n  Parsed request is a module\r\n  using description file: D:\\projects\\mosaic8\\browser-extension\\package.json (relative path: ./src/utils)\r\n    Field 'browser' doesn't contain a valid alias configuration\r\n    resolve as module\r\n      D:\\projects\\mosaic8\\browser-extension\\src\\utils\\node_modules doesn't exist or is not a directory\r\n      D:\\projects\\mosaic8\\browser-extension\\src\\node_modules doesn't exist or is not a directory\r\n      D:\\projects\\mosaic8\\browser-extension\\node_modules doesn't exist or is not a directory\r\n      looking for modules in D:\\projects\\mosaic8\\node_modules\r\n        single file module\r\n          using description file: D:\\projects\\mosaic8\\package.json (relative path: ./node_modules/@xenova/transformers)\r\n            no extension\r\n              Field 'browser' doesn't contain a valid alias configuration\r\n              D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers is not a file\r\n            .ts\r\n              Field 'browser' doesn't contain a valid alias configuration\r\n              D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers.ts doesn't exist\r\n            .tsx\r\n              Field 'browser' doesn't contain a valid alias configuration\r\n              D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers.tsx doesn't exist\r\n            .js\r\n              Field 'browser' doesn't contain a valid alias configuration\r\n              D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers.js doesn't exist\r\n            .jsx\r\n              Field 'browser' doesn't contain a valid alias configuration\r\n              D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers.jsx doesn't exist\r\n        existing directory D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers\r\n          using description file: D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers\\package.json (relative path: .)\r\n            using exports field: ./dist/transformers.js\r\n              using description file: D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers\\package.json (relative path: ./dist/transformers.js)\r\n                no extension\r\n                  D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers\\dist\\transformers.js doesn't exist\r\n                .ts\r\n                  D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers\\dist\\transformers.js.ts doesn't exist       \r\n                .tsx\r\n                  D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers\\dist\\transformers.js.tsx doesn't exist      \r\n                .js\r\n                  D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers\\dist\\transformers.js.js doesn't exist       \r\n                .jsx\r\n                  D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers\\dist\\transformers.js.jsx doesn't exist      \r\n                as directory\r\n                  D:\\projects\\mosaic8\\node_modules\\@xenova\\transformers\\dist\\transformers.js doesn't exist\r\n```\r\n\r\nI might be doing something I don't know maybe. What could the issue here be?\r\n\r\nWhat I can understand is that it is trying to search for a ts/tsx/js/jsx file (as specified in the `webpack.config.js` and it is unable to get it.",
    "url": "https://github.com/huggingface/transformers.js/issues/925",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-10T02:52:41Z",
    "updated_at": "2025-01-18T16:03:26Z",
    "user": "chandeldivyam"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9402,
    "title": "[Flux ControlNet] Add img2img and inpaint pipelines",
    "body": "We recently added img2img and inpainting pipelines for Flux thanks to @Gothos contribution. \r\n\r\nWe also have controlnet support for Flux thanks to @wangqixun.\r\n\r\nIt'd be nice to have controlnet versions of these pipelines since there's been requests to have them.\r\n\r\nBasically, we need to create two new pipelines that add the controlnet support from this [pipeline ](https://github.com/huggingface/diffusers/blob/f28a8c257afe8eeb16b4deb973c6b1829f6aea59/src/diffusers/pipelines/flux/pipeline_flux_controlnet.py) to the corresponding pipellines.\r\n\r\n- [X] [Image to image](https://github.com/huggingface/diffusers/blob/f28a8c257afe8eeb16b4deb973c6b1829f6aea59/src/diffusers/pipelines/flux/pipeline_flux_img2img.py)\r\n- [X] [Inpaint](https://github.com/huggingface/diffusers/blob/f28a8c257afe8eeb16b4deb973c6b1829f6aea59/src/diffusers/pipelines/flux/pipeline_flux_inpaint.py)\r\n\r\nRelated issue: #9158 \r\n\r\nLet me know if someone is interested in contributing this.",
    "url": "https://github.com/huggingface/diffusers/issues/9402",
    "state": "closed",
    "labels": [
      "help wanted",
      "Good second issue",
      "contributions-welcome"
    ],
    "created_at": "2024-09-10T02:08:32Z",
    "updated_at": "2024-10-25T02:22:19Z",
    "comments": 11,
    "user": "asomoza"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 924,
    "title": "Steps for suppressing strings",
    "body": "### Question\n\nWhat is the syntax for suppressing strings from showing up in the output text? Should I be doing that in my code, or is there a config option for it? I'm trying to remove everything that isn't a word:\r\n```\r\nconst suppressedStrings = [\r\n  \"[BLANK_AUDIO]\",\r\n  \"[CLEARS THROAT]\",\r\n  \"[Coughing]\",\r\n  \"[inaudible]\",\r\n  \"[MUSIC]\",\r\n  \"[MUSIC PLAYING]\",\r\n  \"[Pause]\",\r\n  \"(keyboard clicking)\",\r\n];\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/924",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-09T21:44:16Z",
    "updated_at": "2025-01-24T17:53:47Z",
    "user": "stinoga"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9395,
    "title": "[Q] Possibly unused `self.final_alpha_cumprod`",
    "body": "Hello team, quick question to make sure I understand the behavior of the `step` function in LCM Scheduler.\r\n\r\nhttps://github.com/huggingface/diffusers/blob/a7361dccdc581147620bbd74a6d295cd92daf616/src/diffusers/schedulers/scheduling_lcm.py#L534-L543\r\n\r\nHere, it seems that the condition `prev_timestep >= 0` is always `True`, because `timestep` and `self.timesteps[prev_step_index]` cannot be negative. This would mean that `self.final_alpha_cumprod` is never used. Is there a way in which `prev_timestep` can be negative?",
    "url": "https://github.com/huggingface/diffusers/issues/9395",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2024-09-09T17:35:08Z",
    "updated_at": "2024-11-09T15:03:23Z",
    "comments": 7,
    "user": "fdtomasi"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1458,
    "title": "Chat ui sends message prompt 404",
    "body": "```\r\nMONGODB_URL='mongodb://localhost:27017'\r\nPLAYWRIGHT_ADBLOCKER='false'\r\nMODELS=`[\r\n  {\r\n    \"name\": \"Local minicpm\",\r\n    \"tokenizer\": \"minicpm\",\r\n    \"preprompt\": \"\",\r\n    \"chatPromptTemplate\": \"<s>{{preprompt}}{{#each messages}}{{#ifUser}}<|user|>\\n{{content}}<|end|>\\n<|assistant|>\\n{{/ifUser}}{{#ifAssistant}}{{content}}<|end|>\\n{{/ifAssistant}}{{/each}}\",\r\n    \"parameters\": {\r\n      \"stop\": [\"<|end|>\", \"<|endoftext|>\", \"<|assistant|>\"],\r\n      \"temperature\": 0.7,\r\n      \"max_new_tokens\": 1024,\r\n      \"truncate\": 3071\r\n    },\r\n    \"endpoints\": [{\r\n      \"type\" : \"openai\",\r\n      \"baseURL\": \"***/v1/chat/completions\",\r\n      \"defaultHeaders\": {\r\n        \"x-portkey-config\": '{ \"Authorization\": \"Bearer apikey\" }'\r\n      }\r\n    }],\r\n  },\r\n]`\r\n```\r\nPrompt for the following error\uff1a\r\n\r\n```\r\nERROR (15839): 404 status code (no body)\r\n    err: {\r\n      \"type\": \"NotFoundError\",\r\n      \"message\": \"404 status code (no body)\",\r\n      \"stack\":\r\n          Error: 404 status code (no body)\r\n              at APIError.generate (file:///Users/user/Desktop/chat-ui/node_modules/openai/error.mjs:50:20)\r\n              at OpenAI.makeStatusError (file:///Users/user/Desktop/chat-ui/node_modules/openai/core.mjs:268:25)\r\n              at OpenAI.makeRequest (file:///Users/user/Desktop/chat-ui/node_modules/openai/core.mjs:311:30)\r\n              at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n              at async eval (/Users/user/Desktop/chat-ui/src/lib/server/endpoints/openai/endpointOai.ts:111:36)\r\n              at async Module.generateFromDefaultEndpoint (/Users/user/Desktop/chat-ui/src/lib/server/generateFromDefaultEndpoint.ts:11:23)\r\n              at async generateTitle (/Users/user/Desktop/chat-ui/src/lib/server/textGeneration/title.ts:53:10)\r\n              at async Module.generateTitleForConversation (/Users/user/Desktop/chat-ui/src/lib/server/textGeneration/title.ts:16:19)\r\n      \"status\": 404,\r\n      \"headers\": {\r\n        \"connection\": \"keep-alive\",\r\n        \"content-encoding\": \"gzip\",\r\n        \"content-type\": \"text/plain; charset=utf-8\",\r\n        \"date\": \"Mon, 09 Sep 2024 13:29:16 GMT\",\r\n        \"transfer-encoding\": \"chunked\",\r\n        \"vary\": \"Accept-Encoding\"\r\n      }\r\n    }\r\n[21:29:16.156] ERROR (15839): 404 status code (no body)\r\n    err: {\r\n      \"type\": \"NotFoundError\",\r\n      \"message\": \"404 status code (no body)\",\r\n      \"stack\":\r\n          Error: 404 status code (no body)\r\n              at APIError.generate (file:///Users/user/Desktop/chat-ui/node_modules/openai/error.mjs:50:20)\r\n              at OpenAI.makeStatusError (file:///Users/user/Desktop/chat-ui/node_modules/openai/core.mjs:268:25)\r\n              at OpenAI.makeRequest (file:///Users/user/Desktop/chat-ui/node_modules/openai/core.mjs:311:30)\r\n              at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n              at async eval (/Users/user/Desktop/chat-ui/src/lib/server/endpoints/openai/endpointOai.ts:111:36)\r\n              at async Module.generate (/Users/user/Desktop/chat-ui/src/lib/server/textGeneration/generate.ts:8:30)\r\n              at async textGenerationWithoutTitle (/Users/user/Desktop/chat-ui/src/lib/server/textGeneration/index.ts:62:3)\r\n      \"status\": 404,\r\n      \"headers\": {\r\n        \"connection\": \"keep-alive\",\r\n        \"content-encoding\": \"gzip\",\r\n        \"content-type\": \"text/plain; charset=utf-8\",\r\n        \"date\": \"Mon, 09 Sep 2024 13:29:16 GMT\",\r\n        \"transfer-encoding\": \"chunked\",\r\n        \"vary\": \"Accept-Encoding\"\r\n      }\r\n    }\r\n```\r\n\r\nAccessing through Postman alone is normal",
    "url": "https://github.com/huggingface/chat-ui/issues/1458",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-09-09T13:31:56Z",
    "updated_at": "2024-09-13T09:32:24Z",
    "comments": 2,
    "user": "nextdoorUncleLiu"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1456,
    "title": "could you provide an easy way to force output as json?",
    "body": "current I use\r\n\r\npreprompt:'only output json. Do not output anything that is not json. Do not use markdown format. Must begin with {.'\r\n\r\nBut llama is not smart enough to output json form. It always begin with Here is the JSON answer or begin with ```(markdown format) for give me unvalid json string.\r\n\r\nIt seems  preprompt is not enough to force json format. Could you provide an easy way to output just json. Or maybe the method is in tools.",
    "url": "https://github.com/huggingface/chat-ui/issues/1456",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-09-09T11:34:17Z",
    "updated_at": "2024-10-06T18:35:29Z",
    "comments": 1,
    "user": "ghost"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 572,
    "title": "How to calculate the total batchsize",
    "body": "Hi, it is me again~ I have a quick simple question: I am using the following training config with 4 GPUs. What is the total number of tokens per optimizer step? Is it 2 * 2048 or 2 * 2048 * 4?\r\n\r\n```\r\n[training]\r\nbatch_size = 2\r\nseq_len = 2048 \r\nwarmup_steps = 2000  # lr scheduler warm up, normally 20% of the train steps\r\nmax_norm = 1.0  # grad norm clipping\r\nsteps = 10000\r\ndata_parallel_degree = -1\r\ntensor_parallel_degree = 1\r\nfp8_linear = \"\"\r\ncompile = false\r\n```",
    "url": "https://github.com/pytorch/torchtitan/issues/572",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-09T09:47:50Z",
    "updated_at": "2024-09-10T05:43:47Z",
    "user": "zyushun"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9392,
    "title": "[Scheduler] Add SNR shift following SD3, would the rest of the code need to be modified?",
    "body": "**What API design would you like to have changed or added to the library? Why?**\r\n\r\nWith the increasing resolution of image or video generation, we need to introduce more noise at smaller T, such as SNR shift following SD3. I have observed that CogVideoX's schedule has already implemented [this](https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_ddim_cogvideox.py#L214). If I add this line to the DDPM schedule, would the rest of the code (e.g., noise addition, sampling, etc.) need to be modified? I assume it wouldn't, but I seek a precise response.\r\n\r\n**What use case would this enable or better enable? Can you give us a code example?**\r\n\r\n```\r\nclass DDPMScheduler(SchedulerMixin, ConfigMixin):\r\n    def __init__(snr_shift_scale, **kwarg)\r\n        # predefine beta and alpha\r\n        self.alphas_cumprod = self.alphas_cumprod / (snr_shift_scale + (1 - snr_shift_scale) * self.alphas_cumprod)\r\n        # other code\r\n    # Other functions are the same as before\r\n```\r\n\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9392",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2024-09-09T09:19:37Z",
    "updated_at": "2025-01-05T15:05:04Z",
    "comments": 7,
    "user": "LinB203"
  },
  {
    "repo": "huggingface/speech-to-speech",
    "number": 96,
    "title": "How to designate Melo TTS model to use my trained model? ",
    "body": "Hi,\r\n\r\nI am using Melo as TTS. And I trained with my datasets. How to designate Melo (here at speech to speech) to use my model?\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/speech-to-speech/issues/96",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-08T20:36:23Z",
    "updated_at": "2024-09-10T14:42:58Z",
    "user": "insufficient-will"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 2526,
    "title": "How can I rename folders in given repo? I need to rename folders ",
    "body": "### Describe the bug\n\nI am try to rename like below but it fails :/\r\n\r\n\r\n```\r\nfrom huggingface_hub import HfApi\r\nimport os\r\n\r\n# Initialize the Hugging Face API\r\napi = HfApi()\r\n\r\n# Set the repository name\r\nrepo_name = \"MonsterMMORPG/3D-Cartoon-Style-FLUX\"\r\n\r\n# Define the folder renaming mappings\r\nfolder_renames = {\r\n    \"Training-Checkpoints-NO-Captions\": \"Training-Checkpoints-Inconsistent-DATASET-NO-Captions\",\r\n    \"Training-Checkpoints-With-Captions\": \"Training-Checkpoints-Inconsistent-DATASET-With-Captions\"\r\n}\r\n\r\n# Function to rename folders\r\ndef rename_folder(repo_name, old_name, new_name):\r\n    try:\r\n        api.move_folder(\r\n            repo_id=repo_name,\r\n            path_in_repo=old_name,\r\n            new_path=new_name,\r\n            commit_message=f\"Rename folder '{old_name}' to '{new_name}'\"\r\n        )\r\n        print(f\"Successfully renamed '{old_name}' to '{new_name}'\")\r\n    except Exception as e:\r\n        print(f\"Error renaming '{old_name}' to '{new_name}': {str(e)}\")\r\n\r\n# Iterate through the folder renaming mappings and rename each folder\r\nfor old_name, new_name in folder_renames.items():\r\n    rename_folder(repo_name, old_name, new_name)\r\n\r\nprint(\"Folder renaming process completed.\")\r\n```\n\n### Reproduction\n\n_No response_\n\n### Logs\n\n_No response_\n\n### System info\n\n```shell\nlatest\n```\n",
    "url": "https://github.com/huggingface/huggingface_hub/issues/2526",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-09-07T17:23:54Z",
    "updated_at": "2024-09-09T10:49:26Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "pytorch/xla",
    "number": 7972,
    "title": "Registering CUDA custom calls with the C++ FFI",
    "body": "## \u2753 Questions and Help\r\n\r\nCurious how to build and register a CUDA custom call with XLAC - have followed https://jax.readthedocs.io/en/latest/ffi.html and read https://openxla.org/xla/custom_call and wondering what the equivalent process is for torch / whether it is currently supported.",
    "url": "https://github.com/pytorch/xla/issues/7972",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-07T01:27:35Z",
    "updated_at": "2025-03-31T16:08:31Z",
    "user": "skrider"
  },
  {
    "repo": "huggingface/transformers",
    "number": 33359,
    "title": "[Docs] How to build offline HTML or Docset files for other documentation viewers?",
    "body": "### Feature request\n\nHow can I build the docs into HTML files for use with other documentation viewers like [Dash](https://www.kapeli.com/dash) , [Dash-User-Contributions](https://github.com/Kapeli/Dash-User-Contributions)?\r\n\r\nI successfully built the PyTorch docs for Dash by working directly in their `docs/` directory. I\u2019m wondering if a similar process exists for Hugging Face libraries.\n\n### Motivation\n\nThe Dash docset viewer is very useful for viewing multiple documentation sets in one place, even offline. It would be great to support it and include all Hugging Face libraries.\n\n### Your contribution\n\nI\u2019ve built the PyTorch docs for Dash, so I\u2019m familiar with incorporating and generating docsets.",
    "url": "https://github.com/huggingface/transformers/issues/33359",
    "state": "closed",
    "labels": [
      "Documentation",
      "Feature request"
    ],
    "created_at": "2024-09-06T15:51:35Z",
    "updated_at": "2024-09-10T23:43:57Z",
    "user": "ueoo"
  },
  {
    "repo": "huggingface/transformers",
    "number": 33343,
    "title": "How to install transformers==4.45, two or three days I can install successfully, but today cannot.",
    "body": "### System Info\n\ntorch2.2\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\npip install git+https://github.com/huggingface/transformers.git\n\n### Expected behavior\n\nHow to install the latest transformers",
    "url": "https://github.com/huggingface/transformers/issues/33343",
    "state": "closed",
    "labels": [
      "Installation",
      "bug"
    ],
    "created_at": "2024-09-06T08:23:00Z",
    "updated_at": "2024-10-16T08:04:10Z",
    "user": "HyacinthJingjing"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1114,
    "title": "What is the future plan of this torchchat project?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nTorchchat provides a solution of running LLM with PyTorch optimization on servers, desktop and mobile.\r\n\r\nMay I know what is the future plan of this project? Is there any new features to finish to encourage users to use Torchchat as a solution?\r\n",
    "url": "https://github.com/pytorch/torchchat/issues/1114",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-06T06:03:17Z",
    "updated_at": "2024-09-09T15:40:39Z",
    "user": "yanbing-j"
  },
  {
    "repo": "huggingface/optimum-nvidia",
    "number": 149,
    "title": "How to use TensorRT model converter",
    "body": "Referring to [src/optimum/nvidia/export/converter.py] -> class 'TensorRTModelConverter' this could 'Take a local model and create the TRTLLM checkpoint and engine'\r\nQuestions:\r\n- What are applicable local model format? e.g. JAX, HuggingFace, DeepSpeed\r\n- How to use this script individually to generate TRTLLM checkpoint/engine? Could you please share if any tutorial?\r\n\r\nThank you.\r\n",
    "url": "https://github.com/huggingface/optimum-nvidia/issues/149",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-05T18:55:15Z",
    "updated_at": "2024-09-05T18:55:15Z",
    "user": "FortunaZhang"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7139,
    "title": "Use load_dataset to load imagenet-1K But find a empty dataset",
    "body": "### Describe the bug\n\n```python\r\ndef get_dataset(data_path, train_folder=\"train\", val_folder=\"val\"):\r\n    traindir = os.path.join(data_path, train_folder)\r\n    valdir = os.path.join(data_path, val_folder)\r\n\r\n    def transform_val_examples(examples):\r\n        transform = Compose([\r\n            Resize(256),\r\n            CenterCrop(224),\r\n            ToTensor(),\r\n        ])\r\n        examples[\"image\"] = [transform(image.convert(\"RGB\")) for image in examples[\"image\"]]\r\n        return examples\r\n\r\n    def transform_train_examples(examples):\r\n        transform = Compose([\r\n            RandomResizedCrop(224),\r\n            RandomHorizontalFlip(),\r\n            ToTensor(),\r\n        ])\r\n        examples[\"image\"] = [transform(image.convert(\"RGB\")) for image in examples[\"image\"]]\r\n        return examples\r\n\r\n    # @fengsicheng: This way is very slow for big dataset like ImageNet-1K (but can pass the network problem using local dataset)\r\n    # train_set = load_dataset(\"imagefolder\", data_dir=traindir, num_proc=4)\r\n    # test_set = load_dataset(\"imagefolder\", data_dir=valdir, num_proc=4)\r\n\r\n    train_set = load_dataset(\"imagenet-1K\", split=\"train\", trust_remote_code=True)                                                                                                                                                                                                            \r\n    test_set = load_dataset(\"imagenet-1K\", split=\"test\", trust_remote_code=True)\r\n\r\n    print(train_set[\"label\"])\r\n\r\n    train_set.set_transform(transform_train_examples)\r\n    test_set.set_transform(transform_val_examples)\r\n\r\n    return train_set, test_set\r\n```\r\n    above the code, but output of the print is a list of None:\r\n    \r\n<img width=\"952\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c4e2fdd8-3b8f-481e-8f86-9bbeb49d79fb\">\r\n\n\n### Steps to reproduce the bug\n\n1. just ran the code \r\n2. see the print\r\n\n\n### Expected behavior\n\nI do not know how to fix this, can anyone provide help or something? It is hurry for me\n\n### Environment info\n\n- `datasets` version: 2.21.0\r\n- Platform: Linux-5.4.0-190-generic-x86_64-with-glibc2.31\r\n- Python version: 3.10.14\r\n- `huggingface_hub` version: 0.24.6\r\n- PyArrow version: 17.0.0\r\n- Pandas version: 2.2.2\r\n- `fsspec` version: 2024.6.1",
    "url": "https://github.com/huggingface/datasets/issues/7139",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-05T15:12:22Z",
    "updated_at": "2024-10-09T04:02:41Z",
    "comments": 2,
    "user": "fscdc"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7138,
    "title": "Cache only changed columns?",
    "body": "### Feature request\n\nCache only the actual changes to the dataset i.e. changed columns.\n\n### Motivation\n\nI realized that caching actually saves the complete dataset again.\r\nThis is especially problematic for image datasets if one wants to only change another column e.g. some metadata and then has to save 5 TB again.\n\n### Your contribution\n\nIs this even viable in the current architecture of the package?\r\nI quickly looked into it and it seems it would require significant changes.\r\n\r\nI would spend some time looking into this but maybe somebody could help with the feasibility and some plan to implement before spending too much time on it?",
    "url": "https://github.com/huggingface/datasets/issues/7138",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-09-05T12:56:47Z",
    "updated_at": "2024-09-20T13:27:20Z",
    "comments": 2,
    "user": "Modexus"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 413,
    "title": "Compatible off-the-shelf robots?",
    "body": "Huge thanks for making all of this available!\r\n\r\nCan you recommend any (low-cost) off-the-shelf robots to work with?",
    "url": "https://github.com/huggingface/lerobot/issues/413",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-05T10:21:24Z",
    "updated_at": "2025-10-08T08:27:56Z",
    "user": "danielfriis"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9362,
    "title": "IndexError: index 29 is out of bounds for dimension 0 with size 29",
    "body": "### Describe the bug\r\n\r\nI have three problems because of the same reason. \r\n1) TypeError: unsupported operand type(s) for +=: 'NoneType' and 'int'\r\n        # upon completion increase step index by one\r\n        self._step_index += 1 <---Error [here](https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L303)\r\n2) IndexError: index 29 is out of bounds for dimension 0 with size 29\r\n        sigma_next = self.sigmas[self.step_index + 1] <--- Error [here](https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L295)\r\n3) RuntimeError: Already borrowed\r\n        if _truncation is not None:\r\n                self._tokenizer.no_truncation() <--- Error here\r\n       Example: https://github.com/huggingface/tokenizers/issues/537\r\nThe reason, as I understood, is threads. Do you know, how can I solve this problem?\r\n\r\n### Reproduction\r\n```\r\nfrom diffusers import (\r\n    FluxPipeline,\r\n    FlowMatchEulerDiscreteScheduler,\r\n)\r\nimport torch\r\n\r\npipeline = FluxPipeline.from_pretrained(\r\n    \"black-forest-labs/FLUX.1-schnell\", torch_dtype=torch.bfloat16\r\n).to(\"cuda\")\r\n\r\nseed = 42\r\nheight = 720\r\nwidth = 1280\r\n\r\ngenerator = torch.Generator(device=\"cuda\").manual_seed(seed)\r\n\r\npipeline(\r\n    prompt=prompt + \", highly detailed, all is depicted as silhouettes, without words\",\r\n    guidance_scale=0.,\r\n    # num_inference_steps=10,\r\n    height=height,\r\n    width=width,\r\n    generator=generator,\r\n    max_sequence_length=256,\r\n).images[0]\r\n```\r\n### Logs\r\n\r\n```shell\r\nFor example:\r\n Traceback (most recent call last):\r\n   File \"/opt/conda/lib/python3.10/site-packages/flask/app.py\", line 1473, in wsgi_app\r\n     response = self.full_dispatch_request()\r\n   File \"/opt/conda/lib/python3.10/site-packages/flask/app.py\", line 882, in full_dispatch_request\r\n     rv = self.handle_user_exception(e)\r\n   File \"/opt/conda/lib/python3.10/site-packages/flask/app.py\", line 880, in full_dispatch_request\r\n     rv = self.dispatch_request()\r\n   File \"/opt/conda/lib/python3.10/site-packages/flask/app.py\", line 865, in dispatch_request\r\n     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]\r\n   File \"/app/main.py\", line 29, in generate_image\r\n     image = imagegen.run(**data)\r\n   File \"/app/image_generator.py\", line 102, in run\r\n     return generate_image()\r\n   File \"/app/image_generator.py\", line 89, in generate_image\r\n     return self.pipeline(\r\n   File \"/opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py\", line 115, in decorate_context\r\n     return func(*args, **kwargs)\r\n   File \"/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/flux/pipeline_flux.py\", line 734, in __call__\r\n     latents = self.scheduler.step(noise_pred, t, latents, return_dict=False)[0]\r\n  File \"/opt/conda/lib/python3.10/site-packages/diffusers/schedulers/scheduling_flow_match_euler_discrete.py\", line 295, in step\r\n     sigma_next = self.sigmas[self.step_index + 1]\r\nTypeError: unsupported operand type(s) for +: 'NoneType' and 'int'\r\n```\r\n\r\n\r\n### System Info\r\n\r\n\r\n- \ud83e\udd17 Diffusers version: 0.31.0.dev0\r\n- Platform: Linux-5.4.0-171-generic-x86_64-with-glibc2.35\r\n- Running on Google Colab?: No\r\n- Python version: 3.10.13\r\n- PyTorch version (GPU?): 2.2.1 (True)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Huggingface_hub version: 0.24.6\r\n- Transformers version: 4.44.2\r\n- Accelerate version: 0.34.0\r\n- PEFT version: 0.12.0\r\n- Bitsandbytes version: not installed\r\n- Safetensors version: 0.4.4\r\n- xFormers version: not installed\r\n- Accelerator: NVIDIA RTX A6000, 46068 MiB\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\r\n\r\n### Who can help?\r\n\r\n@yiyixuxu  @sayakpaul @DN6",
    "url": "https://github.com/huggingface/diffusers/issues/9362",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-09-04T11:02:49Z",
    "updated_at": "2024-11-25T15:04:22Z",
    "comments": 8,
    "user": "Anvarka"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 135098,
    "title": "How to gracefully mask CompositeImplicitAutograd for different backends",
    "body": "### \ud83d\udc1b Describe the bug\n\nI implemented torch.compile\u2019s backend for my hardware via privateUserOne. I also found that torch.compile by default decomposes upsample_nearest2d into a bunch of small operators, just like _upsample_nearest does. But on my hardware, the _unsafe_index operator doesn\u2019t perform well, so I\u2019d like to be able to call the custom upsample_nearest2d operator directly for better performance. I don't know if this is a bug or if there could be a better implementation.\n\n### Error logs\n\n_No response_\n\n### Minified repro\n\n_No response_\n\n### Versions\n\nIt is irrelevant to the execution environment and is related to code implementation.\n\ncc @ezyang @chauhang @penguinwu @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4",
    "url": "https://github.com/pytorch/pytorch/issues/135098",
    "state": "closed",
    "labels": [
      "oncall: pt2",
      "oncall: export"
    ],
    "created_at": "2024-09-04T09:11:28Z",
    "updated_at": "2024-11-01T06:20:49Z",
    "user": "yangxiaorun"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1627,
    "title": "Rust: How to handle models with `precompiled_charsmap = null`",
    "body": "Hi guys,\r\nI'm currently working on https://github.com/supabase/edge-runtime/pull/368 that pretends to add a rust implementation of `pipeline()`. \r\n\r\nWhile I was coding the `translation` task I figured out that I can't load the `Tokenizer` instance for [Xenova/opus-mt-en-fr](https://huggingface.co/Xenova/opus-mt-en-fr) `onnx` model and their other `opus-mt-*` variants. \r\n\r\n<details>\r\n<summary>I got the following:</summary>\r\n\r\n```rust\r\nlet tokenizer_path = Path::new(\"opus-mt-en-fr/tokenizer.json\");\r\nlet tokenizer = Tokenizer::from_file(tokenizer_path).unwrap();\r\n```\r\n\r\n```\r\nthread 'main' panicked at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokenizers-0.20.0/src/normalizers/mod.rs:143:26:\r\nPrecompiled: Error(\"invalid type: null, expected a borrowed string\", line: 1, column: 28)\r\nstack backtrace:\r\n   0: rust_begin_unwind\r\n             at /rustc/80eb5a8e910e5185d47cdefe3732d839c78a5e7e/library/std/src/panicking.rs:662:5\r\n   1: core::panicking::panic_fmt\r\n             at /rustc/80eb5a8e910e5185d47cdefe3732d839c78a5e7e/library/core/src/panicking.rs:74:14\r\n   2: core::result::unwrap_failed\r\n             at /rustc/80eb5a8e910e5185d47cdefe3732d839c78a5e7e/library/core/src/result.rs:1679:5\r\n   3: core::result::Result<T,E>::expect\r\n             at /rustc/80eb5a8e910e5185d47cdefe3732d839c78a5e7e/library/core/src/result.rs:1059:23\r\n   4: <tokenizers::normalizers::NormalizerWrapper as serde::de::Deserialize>::deserialize\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokenizers-0.20.0/src/normalizers/mod.rs:139:25\r\n   5: <serde::de::impls::OptionVisitor<T> as serde::de::Visitor>::visit_some\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.207/src/de/impls.rs:916:9\r\n   6: <&mut serde_json::de::Deserializer<R> as serde::de::Deserializer>::deserialize_option\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.124/src/de.rs:1672:18\r\n   7: serde::de::impls::<impl serde::de::Deserialize for core::option::Option<T>>::deserialize\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.207/src/de/impls.rs:935:9\r\n   8: <core::marker::PhantomData<T> as serde::de::DeserializeSeed>::deserialize\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.207/src/de/mod.rs:801:9\r\n   9: <serde_json::de::MapAccess<R> as serde::de::MapAccess>::next_value_seed\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.124/src/de.rs:2008:9\r\n  10: serde::de::MapAccess::next_value\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.207/src/de/mod.rs:1874:9\r\n  11: <tokenizers::tokenizer::serialization::TokenizerVisitor<M,N,PT,PP,D> as serde::de::Visitor>::visit_map\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokenizers-0.20.0/src/tokenizer/serialization.rs:132:55\r\n  12: <&mut serde_json::de::Deserializer<R> as serde::de::Deserializer>::deserialize_struct\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.124/src/de.rs:1840:31\r\n  13: tokenizers::tokenizer::serialization::<impl serde::de::Deserialize for tokenizers::tokenizer::TokenizerImpl<M,N,PT,PP,D>>::deserialize\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokenizers-0.20.0/src/tokenizer/serialization.rs:62:9\r\n  14: <tokenizers::tokenizer::_::<impl serde::de::Deserialize for tokenizers::tokenizer::Tokenizer>::deserialize::__Visitor as serde::de::Visitor>::visit_newtype_struct\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokenizers-0.20.0/src/tokenizer/mod.rs:408:21\r\n  15: <&mut serde_json::de::Deserializer<R> as serde::de::Deserializer>::deserialize_newtype_struct\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.124/src/de.rs:1723:9\r\n  16: tokenizers::tokenizer::_::<impl serde::de::Deserialize for tokenizers::tokenizer::Tokenizer>::deserialize\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokenizers-0.20.0/src/tokenizer/mod.rs:408:21\r\n  17: serde_json::de::from_trait\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.124/src/de.rs:2478:22\r\n  18: serde_json::de::from_str\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.124/src/de.rs:2679:5\r\n  19: tokenizers::tokenizer::Tokenizer::from_file\r\n             at /home/kalleby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokenizers-0.20.0/src/tokenizer/mod.rs:439:25\r\n  20: transformers_rs::pipeline::tasks::seq_to_seq::seq_to_seq\r\n             at ./src/pipeline/tasks/seq_to_seq.rs:51:21\r\n  21: app::main\r\n             at ./examples/app/src/main.rs:78:5\r\n  22: core::ops::function::FnOnce::call_on",
    "url": "https://github.com/huggingface/tokenizers/issues/1627",
    "state": "open",
    "labels": [
      "Feature Request"
    ],
    "created_at": "2024-09-04T08:33:06Z",
    "updated_at": "2024-10-06T15:34:06Z",
    "user": "kallebysantos"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2013,
    "title": "Is it possible convert decoder_model_merged.onnx to tensorrt via trtexec command ? ",
    "body": "At the first I convert whisper-tiny to onnx via optimum-cli\r\n`optimum-cli export onnx --model openai/whisper-tiny --task automatic-speech-recognition-with-past whisper-tiny-onnx`\r\n\r\nI got the some config, encoder and decoder_merged model\r\n\r\nthen I brought encoder and decoder_merged to convert to tensorrt via NGC version 23.09-py3, encoder not problem but decoder_merged got problem while converting.\r\n`trtexec --onnx=/workspace/models/whisper-tiny-onnx/decoder_model_merged.onnx --saveEngine=/workspace/models/whisper-tiny-onnx/decoder_model_merged.plan`\r\nthe error happen : \r\n`[5] Assertion failed: (node.output().size() <= static_cast<int32_t>(outputs.size())) && \"Node has more output tensors than TRT expected.\"`\r\n\r\n![\u0e2a\u0e01\u0e23\u0e35\u0e19\u0e0a\u0e47\u0e2d\u0e15 2024-09-04 005124](https://github.com/user-attachments/assets/c289f1fa-2174-4d8a-af68-ee9758a77c54)\r\n\r\n\r\nCan someone help me about this or Have another ways for good practice ? Please . . .",
    "url": "https://github.com/huggingface/optimum/issues/2013",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-03T17:52:40Z",
    "updated_at": "2024-09-15T10:16:34Z",
    "comments": 3,
    "user": "ccyrene"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 407,
    "title": "Multi-Image support for VQ-BeT",
    "body": "Hello, I wanted to ask if there is a possibility to have VQ-BeT running on multiple camera's for some environments that have different views, like Robomimic? If so can someone give me points on what exactly I need to change, I would be happy to submit a PR once I get it working on my side and finish the ICLR deadline! \r\n\r\nCurrently, if I understand correctly we need to change the `VQBeTRgbEncoder`, it seems like it supports multiple camera views but there is an [assert statement](https://github.com/huggingface/lerobot/blob/27ba2951d128a3db2497d1337031e01fb995ccfe/lerobot/common/policies/vqbet/modeling_vqbet.py#L745) that checks the length of the image views to be 1. Is there a specific reason for this assert statement, i.e., I need to change something else? ",
    "url": "https://github.com/huggingface/lerobot/issues/407",
    "state": "closed",
    "labels": [
      "question",
      "policies"
    ],
    "created_at": "2024-09-03T17:00:23Z",
    "updated_at": "2025-10-08T08:27:39Z",
    "user": "bkpcoding"
  },
  {
    "repo": "pytorch/vision",
    "number": 8626,
    "title": "Better decoder docs",
    "body": "Our decoding docs are poor, disorganized, and don't have any example. \r\nWe should improve those to clarify what is supported, how, and encourage users to rely on those.",
    "url": "https://github.com/pytorch/vision/issues/8626",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-03T14:47:11Z",
    "updated_at": "2024-10-01T12:19:14Z",
    "comments": 0,
    "user": "NicolasHug"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2009,
    "title": "[Feature request] Add kwargs or additional options for torch.onnx.export",
    "body": "### Feature request\n\nIn `optimum.exporters.onnx.convert import export_pytorch`, there could be an option to add additional kwargs to the function which could be passed to the torch.onnx.export function.\n\n### Motivation\n\nIf such an option possible or will this ruin any of the other features, or is there a reason why there is no option available as of yet?\n\n### Your contribution\n\nCould contribute if this doesn't ruin any other features, or the current feature.",
    "url": "https://github.com/huggingface/optimum/issues/2009",
    "state": "open",
    "labels": [
      "onnx"
    ],
    "created_at": "2024-09-03T13:52:50Z",
    "updated_at": "2024-10-08T15:27:26Z",
    "comments": 0,
    "user": "martinkorelic"
  },
  {
    "repo": "huggingface/speech-to-speech",
    "number": 74,
    "title": "How to integrate it with frontend",
    "body": "Hi, What steps should I follow to create a web app UI and integrate it?\r\n\r\nMany thanks for considering my request.",
    "url": "https://github.com/huggingface/speech-to-speech/issues/74",
    "state": "open",
    "labels": [],
    "created_at": "2024-09-03T12:18:52Z",
    "updated_at": "2024-09-03T13:52:08Z",
    "user": "shrinivasait"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9356,
    "title": "pipeline_stable_diffusion_xl_adapter",
    "body": "### Describe the bug\n\nI want to rewrite the call function of the pipeline_stable_diffusion_xl_adapter. When I want to use the function prepare_ip_adapter_image_embeds, there is an error called \"AttributeError: 'NoneType' object has no attribute 'image_projection_layers'\". The error tells me that the attribution self.unet.encoder_hid_proj is 'NoneType'. The pre-trianed model is 'stabilityai/stable-diffusion-xl-base-1.0'. Is there anything wrong when I use it? Thank you.\n\n### Reproduction\n\nmodel_path = 'stabilityai/stable-diffusion-xl-base-1.0'\r\nadapter = T2IAdapter.from_pretrained(\"TencentARC/t2i-adapter-openpose-sdxl-1.0\",)\r\nscheduler = DDPMScheduler.from_pretrained(model_path, subfolder=\"scheduler\")\r\npipe = AdapterPosePipeline.from_pretrained(model_path, adapter=adapter, torch_dtype=torch.float16, variant=\"fp16\", scheduler=scheduler).to(device)\r\n\r\n        image_embeds = self.prepare_ip_adapter_image_embeds(\r\n            image,\r\n            ip_adapter_image_embeds,\r\n            device,\r\n            batch_size * num_images_per_prompt,\r\n            self.do_classifier_free_guidance,\r\n        )\n\n### Logs\n\n```shell\nroot@autodl-container-9d8d46936f-161f523c:~/autodl-tmp/COMP5704_Pose_Driven/src# python run.py\r\n/root/miniconda3/lib/python3.12/site-packages/xformers/ops/fmha/flash.py:211: FutureWarning: `torch.library.impl_abstract` was renamed to `torch.library.register_fake`. Please use that instead; we will remove `torch.library.impl_abstract` in a future version of PyTorch.\r\n  @torch.library.impl_abstract(\"xformers_flash::flash_fwd\")\r\n/root/miniconda3/lib/python3.12/site-packages/xformers/ops/fmha/flash.py:344: FutureWarning: `torch.library.impl_abstract` was renamed to `torch.library.register_fake`. Please use that instead; we will remove `torch.library.impl_abstract` in a future version of PyTorch.\r\n  @torch.library.impl_abstract(\"xformers_flash::flash_bwd\")\r\n/root/miniconda3/lib/python3.12/site-packages/controlnet_aux/mediapipe_face/mediapipe_face_common.py:7: UserWarning: The module 'mediapipe' is not installed. The package will have limited functionality. Please install it using the command: pip install 'mediapipe'\r\n  warnings.warn(\r\nLoading pipeline components...: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 7/7 [00:01<00:00,  4.87it/s]\r\n/root/miniconda3/lib/python3.12/site-packages/controlnet_aux/open_pose/body.py:34: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.\r\n  model_dict = util.transfer(self.model, torch.load(model_path))\r\n/root/miniconda3/lib/python3.12/site-packages/controlnet_aux/open_pose/hand.py:14: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.\r\n  model_dict = util.transfer(self.model, torch.load(model_path))\r\n/root/miniconda3/lib/python3.12/site-packages/controlnet_aux/open_pose/face.py:325: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling.",
    "url": "https://github.com/huggingface/diffusers/issues/9356",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-09-03T10:25:57Z",
    "updated_at": "2024-10-28T15:03:18Z",
    "comments": 6,
    "user": "Yuhan291"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9352,
    "title": "Text generation?",
    "body": "Hi thanks for this great library!\r\n\r\nThere seems to be some diffusion models that generate text, instead of images. (For example, these two surveys: https://arxiv.org/abs/2303.06574, https://www.semanticscholar.org/paper/Diffusion-models-in-text-generation%3A-a-survey-Yi-Chen/41941f072db18972b610de9979e755afba35f11e). Therefore, it would be great if Diffusers could support this. \r\n\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9352",
    "state": "open",
    "labels": [
      "wip"
    ],
    "created_at": "2024-09-03T06:54:38Z",
    "updated_at": "2024-11-23T04:57:37Z",
    "comments": 13,
    "user": "fzyzcjy"
  },
  {
    "repo": "huggingface/speech-to-speech",
    "number": 71,
    "title": "How to run in ubuntu",
    "body": "I am trying to run it locally in my Ubuntu machine I have nvidia gpu and already setup CUDA.\r\n\r\n```\r\npython s2s_pipeline.py \\\r\n\t--recv_host 0.0.0.0 \\\r\n\t--send_host 0.0.0.0 \\\r\n\t--lm_model_name microsoft/Phi-3-mini-4k-instruct \\\r\n\t--init_chat_role system \\\r\n\t--stt_compile_mode reduce-overhead \\\r\n\t--tts_compile_mode default \r\n```\r\nThis is the command I passed in the terminal but I am getting Error like this\r\n\r\n```\r\n(venv) basal-desktop@basal-desktop:/media/basal-desktop/E/speech-to-speech$ python s2s_pipeline.py      --recv_host 0.0.0.0     --send_host 0.0.0.0     --lm_model_name microsoft/Phi-3-mini-4k-instruct     --init_chat_role system         --stt_compile_mode reduce-overhead      --tts_compile_mode default \r\n[nltk_data] Downloading package averaged_perceptron_tagger_eng to\r\n[nltk_data]     /home/basal-desktop/nltk_data...\r\n[nltk_data]   Package averaged_perceptron_tagger_eng is already up-to-\r\n[nltk_data]       date!\r\nUsing cache found in /home/basal-desktop/.cache/torch/hub/snakers4_silero-vad_master\r\n2024-09-03 11:20:08,495 - STT.whisper_stt_handler - INFO - Warming up WhisperSTTHandler\r\nYou have passed task=transcribe, but also have set `forced_decoder_ids` to [[1, None], [2, 50360]] which creates a conflict. `forced_decoder_ids` will be ignored in favor of task=transcribe.\r\nThe attention mask is not set and cannot be inferred from input because pad token is same as eos token.As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\r\n/tmp/tmp1sx5flzq/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmp7dgszafh/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmpgutcpzdq/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmpxya7vifd/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmpoxfa0b57/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmp9sd15wgk/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmpuimau_4j/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmp2hzix58m/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmppnjhbdhp/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmp2dvfaztp/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmpaofqmu2k/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmpcnc1scdn/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmpnsf4b2jl/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmpf_5rg_m_/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmpnf8nvq6n/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmp2f8iezjt/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmp_om2_15p/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmpc0t1q8vd/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmpdsdc_2ef/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmp7h6fpvoc/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmp4qfy9i7j/main.c:5:10: fatal error: Python.h: No such file or directory\r\n    5 | #include <Python.h>\r\n      |          ^~~~~~~~~~\r\ncompilation terminated.\r\n/tmp/tmpsjvhjzmz/main.c:5:10: fatal error: Py",
    "url": "https://github.com/huggingface/speech-to-speech/issues/71",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-03T06:02:45Z",
    "updated_at": "2024-10-01T07:45:20Z",
    "user": "Basal-Analytics"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2006,
    "title": "Support for gemma2-2b-it(gemma 2nd version) Model Export in Optimum for OpenVINO",
    "body": "### Feature request\n\n please provide Support for gemma2 Model Export in Optimum for OpenVINO\r\nversion:optimum(1.21.4)\r\ntransformers:4.43.4\n\n### Motivation\n\nI encountered an issue while trying to export a gemma2 model using the optimum library for ONNX export. The error message suggests that the gemma2 model is either a custom or unsupported architecture, and I need to provide a custom export configuration.\r\n\r\nerror:raise ValueError(\r\nValueError: Trying to export a gemma2 model, that is a custom or unsupported architecture, but no custom export configuration was passed as `custom_export_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum-intel/issues if you would like the model type gemma2 to be supported natively in the OpenVINO export\n\n### Your contribution\n\nIt would be great if support for the gemma2 model could be added natively in the optimum library for OpenVINO export. Alternatively, detailed guidance on how to create a custom export configuration for this model would be appreciated.i",
    "url": "https://github.com/huggingface/optimum/issues/2006",
    "state": "open",
    "labels": [
      "onnx"
    ],
    "created_at": "2024-09-03T05:54:51Z",
    "updated_at": "2025-01-22T15:40:04Z",
    "comments": 2,
    "user": "chakka12345677"
  },
  {
    "repo": "huggingface/transformers",
    "number": 33270,
    "title": "Static KV cache status: How to use it? Does it work for all models?",
    "body": "I see that there are many PRs about [StaticCache](https://github.com/huggingface/transformers/pulls?q=is%3Apr+StaticCache), but I couldn't find a clear documentation on how to use it.\r\n\r\n#### What I want\r\n\r\n* To not have Transformers allocate memory dynamically for the KV cache when using `model.generate()`, as that leads to increased memory usage (due to garbage collection not happening fast/often enough) and worse performance.\r\n\r\n* To use that by default always, for every model, for every supported quantization backend (AutoAWQ, AutoGPTQ, AQLM, bitsandbytes, etc).\r\n\r\n#### Who can help?\r\n\r\nMaybe @gante ",
    "url": "https://github.com/huggingface/transformers/issues/33270",
    "state": "closed",
    "labels": [],
    "created_at": "2024-09-03T02:17:54Z",
    "updated_at": "2024-11-25T16:17:25Z",
    "user": "oobabooga"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 917,
    "title": "Where should I get `decoder_model_merged` file from?",
    "body": "### Question\n\nHey,\r\nI'm trying to use `whisper-web` demo with my finetuned model.\r\nAfter I managed connecting my model to the demo application, I'm getting errors related to this:\r\n\r\nhttps://github.com/xenova/transformers.js/blob/7f5081da29c3f77ee830269ab801344776e61bcb/src/models.js#L771\r\n\r\nBasically, when `transformers.js` tries to load a whisper model, it looks for files called `decoder_model_merged.onnx` / `decoder_model_merged_quantized.onnx` / `decoder_model_merged_fp16.onnx`.\r\nThe thing is, that the conversion script didn't create any of these files.\r\nThat's how the conversion script output looks like:\r\n![image](https://github.com/user-attachments/assets/f6288c77-5010-4d98-a609-f38e46e1afaa)\r\n\r\n\r\nPlease help me figure out what am I missing here.\r\nP.S. After I'll get it to work, I'll be happy to open a PR on `whisper-web` repository that will enable using local models together with remote (on HF hub) models.\r\nThanks !",
    "url": "https://github.com/huggingface/transformers.js/issues/917",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-09-02T07:30:57Z",
    "updated_at": "2025-02-26T12:05:05Z",
    "user": "abuchnick-aiola"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9339,
    "title": "SD3 inpatinting",
    "body": "I found the StableDiffusion3InpaintPipeline, where can i found the weight of SD3 inpainting",
    "url": "https://github.com/huggingface/diffusers/issues/9339",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-09-02T05:00:19Z",
    "updated_at": "2024-10-02T15:43:24Z",
    "comments": 5,
    "user": "ucasyjz"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 566,
    "title": "Multi-node training without AWS EFA clusters",
    "body": "Thank you so much for releasing code for this great project!\r\n\r\nFor multi-node training, right now I've only found commands in `multinode_trainer.slurm`, which seem to be specific to AWS EFA slurm clusters.\r\n\r\nI'm wondering if it's possible to try multi-node training without ASW setup, say with simply the IPs of 2 nodes instead?\r\n\r\nThank you very much for your help!",
    "url": "https://github.com/pytorch/torchtitan/issues/566",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-31T22:41:04Z",
    "updated_at": "2024-09-04T20:55:50Z",
    "user": "LeoXinhaoLee"
  },
  {
    "repo": "huggingface/transformers",
    "number": 33232,
    "title": "How to use hugginface for training:  google-t5/t5-base",
    "body": "### Feature request\r\n\r\nHow to use hugginface for training / \u5982\u4f55\u4f7f\u7528huggingface\u6765\u8bad\u7ec3\uff1a\r\n https://github.com/huggingface/transformers/tree/main/examples/pytorch/translation\r\n\r\n#What is the format and how do I write it? / \u8fd9\u4e2a\u683c\u5f0f\u662f\u600e\u4e48\u6837\u7684\uff0c\u600e\u4e48\u5199\u5462\uff1f\r\ndef batch_collator(data):\r\n    print(data)  #?????????????????????????????????????????????   \r\n    return {\r\n        'pixel_values': torch.stack([x for x in pixel_values]), \r\n        'labels': torch.tensor([x for x in labels]) \r\n    }\r\n\r\ntrainer = Trainer(\r\n    model=model,\r\n    args=training_args,\r\n    data_collator=batch_collator,//\u8fd9\u4e2a\u9700\u8981\u600e\u4e48\u5199?\r\n    train_dataset=dataset['train'],    \r\n)\r\n\r\n### Motivation\r\n\r\n\u65e0\r\n\r\n### Your contribution\r\n\r\n\u65e0\r\n\r\n\r\n\u6211\u5df2\u7ecf\u8bd5\u4e86\u53ef\u4ee5\u7528\uff1a https://www.kaggle.com/code/weililong/google-t5-t5-base \r\n\u4e0d\u77e5\u9053\u6709\u6ca1\u6709\u4ec0\u4e48\u5751",
    "url": "https://github.com/huggingface/transformers/issues/33232",
    "state": "open",
    "labels": [
      "Usage",
      "Feature request"
    ],
    "created_at": "2024-08-31T07:41:18Z",
    "updated_at": "2024-09-09T08:45:50Z",
    "user": "gg22mm"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 134901,
    "title": "How to calculate second derivative using PyTorch with GPU (cuda)",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\r\n\r\nI have a python code segment related to a deep RL algorithm where it calculates the second order optimization and second derivative with Hessian matrix and fisher information matrix. Normally I run the whole code on GPU (cuda), but since I got a computational issue to calculate second derivative in cuda,\r\n```\r\nNotImplementedError: the derivative for '_cudnn_rnn_backward' is not implemented. Double backwards is not supported for CuDNN RNNs due to limitations in the CuDNN API. To run double backwards, please disable the CuDNN backend temporarily while running the forward pass of your RNN. For example: \r\nwith torch.backends.cudnn.flags(enabled=False):\r\n    output = model(inputs)\r\n```\r\nI had to move to CPU for this code segment, and now the code is executing sequentially instead of in parallel, which takes a long time to run:\r\n```\r\ngrads = torch.autograd.grad(policy_loss, self.policy.Actor.parameters(), retain_graph=True)\r\nloss_grad = torch.cat([grad.view(-1) for grad in grads])\r\n\r\ndef Fvp_fim(v = -loss_grad):\r\n    with torch.backends.cudnn.flags(enabled=False):\r\n        M, mu, info = self.policy.Actor.get_fim(states_batch)\r\n        #pdb.set_trace()\r\n        mu = mu.view(-1)\r\n        filter_input_ids = set([info['std_id']])\r\n\r\n        t = torch.ones(mu.size(), requires_grad=True, device=mu.device)\r\n        mu_t = (mu * t).sum()\r\n        Jt = compute_flat_grad(mu_t, self.policy.Actor.parameters(), filter_input_ids=filter_input_ids, create_graph=True)\r\n        Jtv = (Jt * v).sum()\r\n        Jv = torch.autograd.grad(Jtv, t)[0]\r\n        MJv = M * Jv.detach()\r\n        mu_MJv = (MJv * mu).sum()\r\n        JTMJv = compute_flat_grad(mu_MJv, self.policy.Actor.parameters(), filter_input_ids=filter_input_ids, create_graph=True).detach()\r\n        JTMJv /= states_batch.shape[0]\r\n        std_index = info['std_index']\r\n        JTMJv[std_index: std_index + M.shape[0]] += 2 * v[std_index: std_index + M.shape[0]]\r\n        return JTMJv + v * self.damping\r\n```\r\nAbove is the main function, where it calculates the second derivative. below are the supportive functions and relevant classes it has used.\r\n```\r\ndef compute_flat_grad(output, inputs, filter_input_ids=set(), retain_graph=True, create_graph=False):\r\n    if create_graph:\r\n        retain_graph = True\r\n\r\n    inputs = list(inputs)\r\n    params = []\r\n    for i, param in enumerate(inputs):\r\n        if i not in filter_input_ids:\r\n            params.append(param)\r\n\r\n    grads = torch.autograd.grad(output, params, retain_graph=retain_graph, create_graph=create_graph, allow_unused=True)\r\n\r\n    j = 0\r\n    out_grads = []\r\n    for i, param in enumerate(inputs):\r\n        if (i in filter_input_ids):\r\n            out_grads.append(torch.zeros(param.view(-1).shape, device=param.device, dtype=param.dtype))\r\n        else:\r\n            if (grads[j] == None):\r\n                out_grads.append(torch.zeros(param.view(-1).shape, device=param.device, dtype=param.dtype))\r\n            else:\r\n                out_grads.append(grads[j].view(-1))\r\n            j += 1\r\n    grads = torch.cat(out_grads)\r\n\r\n    for param in params:\r\n        param.grad = None\r\n    return grads\r\n\r\n------\r\n\r\nimport torch\r\nimport torch.nn as nn\r\n\r\n\r\nfrom agents.models.feature_extracter import LSTMFeatureExtractor\r\nfrom agents.models.policy import PolicyModule\r\nfrom agents.models.value import ValueModule\r\n\r\n\r\nclass ActorNetwork(nn.Module):\r\n    def __init__(self, args):\r\n        super(ActorNetwork, self).__init__()\r\n        self.FeatureExtractor = LSTMFeatureExtractor(args)\r\n        self.PolicyModule = PolicyModule(args)\r\n\r\n    def forward(self, s):\r\n        lstmOut = self.FeatureExtractor.forward(s)\r\n        mu, sigma, action, log_prob = self.PolicyModule.forward(lstmOut)\r\n        return mu, sigma, action, log_prob\r\n    \r\n    def get_fim(self, x):\r\n        mu, sigma, _, _ = self.forward(x)\r\n\r\n        if sigma.dim() == 1:\r\n            sigma = sigma.unsqueeze(0)\r\n\r\n        cov_inv = sigma.pow(-2).repeat(x.size(0), 1)\r\n\r\n        param_count = 0\r\n        std_index = 0\r\n        id = 0\r\n        std_id = id\r\n        for name, param in self.named_parameters():\r\n            if name == \"sigma.weight\":\r\n                std_id = id\r\n                std_index = param_count\r\n            param_count += param.view(-1).shape[0]\r\n            id += 1\r\n\r\n        return cov_inv.detach(), mu, {'std_id': std_id, 'std_index': std_index}\r\n```\r\nIn the bigger picture there are large amounts of batches going through this function, since all of 'em have to go sequentially through this function, it highly increases the total running time. Is there a possible way to calculate the second derivative with Pytorch while running on cuda/GPU?\r\n\r\n### Alternatives\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_\n\ncc @csarofeen @ptrblck @xwang233 @ezyang @albanD @gqchen @pearu @nikitaved @soulitzer @Varal7 @xmfan @mikaylagawarecki @zou3519 @Chillee @samdow @kshitij12345",
    "url": "https://github.com/pytorch/pytorch/issues/134901",
    "state": "open",
    "labels": [
      "module: double backwards",
      "module: cudnn",
      "module: autograd",
      "module: rnn",
      "triaged",
      "module: functorch"
    ],
    "created_at": "2024-08-31T04:01:40Z",
    "updated_at": "2024-09-04T01:48:21Z",
    "user": "Damika-Anupama"
  },
  {
    "repo": "huggingface/transformers",
    "number": 33228,
    "title": "How to obtain batch index of validation dataset?",
    "body": "Hi,\r\n\r\nI wanted to know how would we fetch the batch id/index of the eval dataset in ```preprocess_logits_for_metrics()``` ?\r\n\r\nThanks in advance!",
    "url": "https://github.com/huggingface/transformers/issues/33228",
    "state": "closed",
    "labels": [
      "Usage"
    ],
    "created_at": "2024-08-31T00:11:13Z",
    "updated_at": "2024-10-13T08:04:26Z",
    "user": "SoumiDas"
  },
  {
    "repo": "huggingface/transformers",
    "number": 33210,
    "title": "The model's address is https://huggingface.co/Xenova/nllb-200-distilled-600M/tree/main/onnx\u3002I don't know how to load encode.onnx and decoder.onnx, and successfully translate a sentence into another language. Can you help me write an inference code to achieve the translation effect through the encoder and decoder? thank you",
    "body": "### Feature request\n\nhello\uff0cThe model's address is [https://huggingface.co/Xenova/nllb-200-distilled-600M/tree/main/onnx\u3002I](https://huggingface.co/Xenova/nllb-200-distilled-600M/tree/main/onnx%E3%80%82I) don't know how to load encode.onnx and decoder.onnx, and successfully translate a sentence into another language. Can you help me write an inference code to achieve the translation effect through the encoder and decoder? thank you\n\n### Motivation\n\nhello\uff0cThe model's address is [https://huggingface.co/Xenova/nllb-200-distilled-600M/tree/main/onnx\u3002I](https://huggingface.co/Xenova/nllb-200-distilled-600M/tree/main/onnx%E3%80%82I) don't know how to load encode.onnx and decoder.onnx, and successfully translate a sentence into another language. Can you help me write an inference code to achieve the translation effect through the encoder and decoder? thank you\n\n### Your contribution\n\nhello\uff0cThe model's address is [https://huggingface.co/Xenova/nllb-200-distilled-600M/tree/main/onnx\u3002I](https://huggingface.co/Xenova/nllb-200-distilled-600M/tree/main/onnx%E3%80%82I) don't know how to load encode.onnx and decoder.onnx, and successfully translate a sentence into another language. Can you help me write an inference code to achieve the translation effect through the encoder and decoder? thank you",
    "url": "https://github.com/huggingface/transformers/issues/33210",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2024-08-30T09:33:01Z",
    "updated_at": "2024-10-22T07:18:15Z",
    "user": "pengpengtao"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 3054,
    "title": "Image URL detection",
    "body": "[`is_image_url`](https://github.com/huggingface/dataset-viewer/blob/946b0788fa426007161f2077a70b5ae64b211cf8/libs/libcommon/src/libcommon/utils.py#L131-L134) relies on a filename and extension being present, however, in some cases an image URL does not contain a filename. Example [dataset](https://huggingface.co/datasets/bigdata-pw/SteamScreenshots) and example [URL](https://steamuserimages-a.akamaihd.net/ugc/910172100453203507/062F4787060B2E4E93EFC4631E96183B027A860B/). This could be improved by checking the `content-type` header of the response or checking for strings like \"image\" in the URL.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/3054",
    "state": "open",
    "labels": [
      "question",
      "improvement / optimization",
      "P2"
    ],
    "created_at": "2024-08-29T23:17:55Z",
    "updated_at": "2025-07-04T09:37:23Z",
    "user": "hlky"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 911,
    "title": "Next.js example breaks with v3",
    "body": "### Question\n\nAre there steps documented anywhere for running V3 in your app? I'm trying to test it out via these steps:\r\n\r\n1. Pointing to the alpha in my `package.json`: `\"@huggingface/transformers\": \"^3.0.0-alpha.10\",`\r\n2. `npm i`\r\n3. `cd node_modules/@hugginface/transformers && npm i`\r\n4. copy the [webpack.config.js](https://github.com/xenova/transformers.js/blob/main/webpack.config.js) from the repo into the node_modules/@hugginface/transformers dir.\r\n5. `npm run build` in node_modules/@hugginface/transformers dir.\r\n\r\nI then run my app, and get the following error:\r\n```\r\nERROR in ../../node_modules/@huggingface/transformers/dist/transformers.js 42256:34-64\r\nModule not found: Error: Can't resolve './' in '/node_modules/@huggingface/transformers/dist'\r\nwebpack compiled with 1 error\r\n```\r\n\r\nThanks, I'm excited to test out the latest and greatest!",
    "url": "https://github.com/huggingface/transformers.js/issues/911",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-29T20:17:03Z",
    "updated_at": "2025-02-16T12:35:47Z",
    "user": "stinoga"
  },
  {
    "repo": "pytorch/xla",
    "number": 7925,
    "title": "Prepare a documentation to explain the use cases for `torch.compile`, `torch_xla.compile`, torch_xla eager mode, torchxla2",
    "body": "## \ud83d\udcda Documentation\r\n\r\nAuthor a documentation to explain the use cases for `torch.compile`, `torch_xla.compile`, torch_xla eager mode, torchxla2. Users and customers look for clarity on the \"the utility\" of each option, pros/cons, small example to demonstrate correct use.\r\n\r\ncc @ManfeiBai @JackCaoG @will-cromar @qihqi \r\n",
    "url": "https://github.com/pytorch/xla/issues/7925",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-08-29T17:01:06Z",
    "updated_at": "2024-09-24T18:33:39Z",
    "comments": 2,
    "user": "miladm"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 562,
    "title": "Pipeline Parallelism + FSDP",
    "body": "On `PP + FSDP` and `PP + TP + FSDP`:\r\n- Is there any documentation on how these different parallelisms compose?\r\n- What are the largest training runs these strategies have been tested on?\r\n- Are there benchmarks for how these strategies compare against other distributed training frameworks that expose similar parallelisms?\r\n\r\nParticularly interested in how `PP + FSDP` work together as it seems DeepSpeed explicitly disallows `ZeRO 2/3 + PP` (see [here](https://github.com/microsoft/DeepSpeed/blob/4864991f53bd2e12446198bcc655f919eb9157f9/deepspeed/runtime/pipe/engine.py#L77-L78) specifically, and [here](https://github.com/microsoft/DeepSpeed/issues/1110) for discussion).\r\n\r\n@wconstab @weifengpy @wanchaol ",
    "url": "https://github.com/pytorch/torchtitan/issues/562",
    "state": "open",
    "labels": [
      "enhancement",
      "question",
      "module: pipelining"
    ],
    "created_at": "2024-08-29T14:19:58Z",
    "updated_at": "2025-10-30T06:21:51Z",
    "user": "jeromeku"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9317,
    "title": "Finetuning on dataset",
    "body": "dear @thedarkzeno and @patil-suraj \r\n\r\nThank you so much for putting your work out there. I wanted to ask, how would the training be for training on a dataset and not a single instance image as mentioned in train_dreambooth_inpaint. And can I finetune models trained from https://github.com/CompVis/latent-diffusion repository?\r\n\r\nThanks in advance",
    "url": "https://github.com/huggingface/diffusers/issues/9317",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-08-29T12:20:51Z",
    "updated_at": "2024-10-23T16:10:47Z",
    "comments": 4,
    "user": "ultiwinter"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 134760,
    "title": "How to correctly release the memory of a tensor",
    "body": "i have fined the memory increase at this line.\r\n[param.copy_(input_param)](https://github.com/pytorch/pytorch/blob/d01a7a9faa5a742a3df7374b97bbc1db1205b6ed/torch/nn/modules/module.py#L2425)\r\nbut the memory cant be released clean after the module use.\r\nwhat happen in it and how to correctly release the memory of a tensor.\r\n\r\n[more detail](https://github.com/comfyanonymous/ComfyUI/issues/4655#issuecomment-2317354203)\n\ncc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki",
    "url": "https://github.com/pytorch/pytorch/issues/134760",
    "state": "closed",
    "labels": [
      "module: nn",
      "module: memory usage",
      "triaged"
    ],
    "created_at": "2024-08-29T11:39:12Z",
    "updated_at": "2024-08-30T08:24:23Z",
    "user": "huangqiaobo"
  },
  {
    "repo": "huggingface/optimum-quanto",
    "number": 300,
    "title": "How to quantize, save  and load  Stable Diffusion 3 model.",
    "body": "import torch\r\n\r\nfrom optimum.quanto import qint2, qint4, qint8, quantize, freeze\r\n\r\nfrom diffusers import StableDiffusion3Pipeline\r\n\r\n\r\npipe = StableDiffusion3Pipeline.from_pretrained(\"stabilityai/stable-diffusion-3-medium-diffusers\", torch_dtype=torch.bfloat16)\r\n\r\nquantize(pipe.text_encoder, weights=qint4)\r\nfreeze(pipe.text_encoder)\r\n\r\nquantize(pipe.text_encoder_3, weights=qint4)\r\nfreeze(pipe.text_encoder_3)\r\n\r\nquantize(pipe.transformer, weights=qint8, exclude=\"proj_out\")\r\nfreeze(pipe.transformer)\r\n\r\npipe = pipe.to(\"cuda\")\r\npipe.save_pretrained(\"/content/drive/MyDrive/quantized_Stable_diffusion_1\")\r\n\r\nafter saving how can i load this model from this directory and perform text to image generation",
    "url": "https://github.com/huggingface/optimum-quanto/issues/300",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-08-29T06:24:02Z",
    "updated_at": "2024-10-06T02:06:30Z",
    "user": "jainrahul52"
  },
  {
    "repo": "huggingface/optimum",
    "number": 2002,
    "title": "Is it possible to infer the model separately through encoder.onnx and decoder.onnx",
    "body": "### Feature request\n\nIs it possible to infer the model separately through encoder.onnx and decoder.onnx\n\n### Motivation\n\nIs it possible to infer the model separately through encoder.onnx and decoder.onnx\n\n### Your contribution\n\nIs it possible to infer the model separately through encoder.onnx and decoder.onnx",
    "url": "https://github.com/huggingface/optimum/issues/2002",
    "state": "open",
    "labels": [
      "onnx"
    ],
    "created_at": "2024-08-29T03:26:20Z",
    "updated_at": "2024-10-08T15:28:59Z",
    "comments": 0,
    "user": "pengpengtao"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3124,
    "title": "\u2753 [Question] dynamo conversion failing w/ TRTInterpreter",
    "body": "## \u2753 Question\r\n\r\nim able to `torch.export` and generate an ExportedProgram with no issues for my model. upon compiling with `torch_tensorrt`... \r\n```python\r\nep = torch.export.load(\"...\")\r\nexample_inputs = ep.example_inputs[0]\r\nmodel = ep.module().to(\"cuda\")\r\n\r\ncompile_spec = {\r\n    \"ir\": \"torch_compile\",\r\n    \"inputs\": example_inputs,\r\n    \"enabled_precisions\": enabled_precisions,\r\n    \"workspace_size\": workspace_size,\r\n    \"min_block_size\": min_block_size,\r\n    \"torch_executed_ops\": {},\r\n    \"sparse_weights\": True,\r\n}\r\n\r\noptimized_model = torch_tensorrt.compile(model, **compile_spec)\r\n```\r\n\r\n... i run into this error:\r\n\r\n```\r\nERROR:torch_tensorrt [TensorRT Conversion Context]:INetworkDefinition::addConstant: Error Code 3: API Usage Error (Parameter check failed, condition: !weights.values == !weights.count. )\r\nTraceback (most recent call last):\r\n...\r\n  File \".../lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py\", line 479, in run\r\n    self._construct_trt_network_def()\r\n  File \".../lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py\", line 325, in _construct_trt_network_def\r\n    super().run()\r\n  File \".../lib/python3.10/site-packages/torch/fx/interpreter.py\", line 145, in run\r\n    self.env[node] = self.run_node(node)\r\n  File \".../lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py\", line 529, in run_node\r\n    trt_node: torch.fx.Node = super().run_node(n)\r\n  File \".../lib/python3.10/site-packages/torch/fx/interpreter.py\", line 202, in run_node\r\n    return getattr(self, n.op)(n.target, args, kwargs)\r\n  File \".../lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py\", line 638, in call_function\r\n    return converter(self.ctx, target, args, kwargs, self._cur_node_name)\r\n  File \".../lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/aten_ops_converters.py\", line 242, in aten_ops_cat\r\n    return impl.cat.cat(\r\n  File \".../lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/impl/cat.py\", line 31, in cat\r\n    each_input = get_trt_tensor(ctx, each_input, f\"{name}_tensor_{i}\")\r\n  File \".../lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/converter_utils.py\", line 384, in get_trt_tensor\r\n    return create_constant(ctx, input_val, name, dtype, min_rank)\r\n  File \".../lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/converter_utils.py\", line 349, in create_constant\r\n    constant.name = name\r\ntorch._dynamo.exc.BackendCompilerFailed: backend='torch_tensorrt_backend' raised:\r\nAttributeError: 'NoneType' object has no attribute 'name'\r\n```\r\n\r\nim currently able to cleanly generate an `ExportedProgram` via `torch.export`, and outputs from the trace match the original PyTorch model. in particular, its unclear to me why `!weights.values == !weights.count` would be an `API Usage Error`, and the discrepancy between torch.compile and how torch_tensorrt interprets / performs the op conversion (torch.compile on the ExportedProgram module works fine)\r\n\r\n## What you have already tried\r\n\r\ni've narrowed the issue down to a single module that does positional encoding. the output of this module is then concat'd with another tensor, which is the error above. without this module, everything works as expected, and i'm able to see about a 5x speedup. \r\n\r\nthe only unique thing about this module is that it has a buffer and some in-place operations; however, i've dumped and manually inspected the fx Graph and the trace looks correct (buffer lifted as a constant input). other things ive done are: re-writing the forward so that they are no in-place operations to make graph capture easier.\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.4\r\n - CPU Architecture: aarch64\r\n - OS (e.g., Linux): Ubuntu\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source): modified bazel build rules + install\r\n - Are you using local sources or building from archives: local build from source\r\n - Python version: 3.10\r\n - CUDA version: 12.4\r\n - GPU models and configuration: Ampere (Jetson Nano, JetPack 6.0)\r\n - Any other relevant information: i compiled torch_tensorrt on HEAD of main as of last Friday (8/23)\r\n\r\n## Additional context\r\n\r\ncc @narendasan not sure if you have any insight here. thanks!",
    "url": "https://github.com/pytorch/TensorRT/issues/3124",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-28T20:09:48Z",
    "updated_at": "2024-09-06T19:36:58Z",
    "user": "patrick-botco"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 3017,
    "title": "\ud83d\udca1 [REQUEST] - What is purpose of `out.backward(torch.randn(1, 10))` in neural_networks_tutorial",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\n\nIn [neural networks tutorial for beginners](https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html), we have the following:\r\n\r\nZero the gradient buffers of all parameters and backprops with random gradients:\r\n```\r\nnet.zero_grad()\r\nout.backward(torch.randn(1, 10))\r\n```\r\n\r\nWhat is the purpose of this? It is not part of standard ML workflows and can be confusing to beginners. (As evidence,I am helping some people learn basics of ML and I got questions about this line. This is how I found out about it!)\r\n\r\nIf there is no good reason for it, then I suggest:\r\n- dropping these few lines\r\n- changing wording of other parts of the page if needed. E.g. 'at this point we covered... calling backward'\n\n### Existing tutorials on this topic\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @subramen @albanD",
    "url": "https://github.com/pytorch/tutorials/issues/3017",
    "state": "open",
    "labels": [
      "question",
      "intro",
      "core"
    ],
    "created_at": "2024-08-28T14:51:46Z",
    "updated_at": "2025-04-16T18:24:08Z",
    "user": "Lovkush-A"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9303,
    "title": "[Add] VEnhancer - the interpolation and upscaler for CogVideoX-5b",
    "body": "### Model/Pipeline/Scheduler description\n\nVEnhancer, a generative space-time enhancement framework that can improve the existing T2V results.\r\n\r\nhttps://github.com/Vchitect/VEnhancer\n\n### Open source status\n\n- [X] The model implementation is available.\n- [X] The model weights are available (Only relevant if addition is not a scheduler).\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9303",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2024-08-28T14:43:32Z",
    "updated_at": "2024-12-11T15:04:32Z",
    "comments": 3,
    "user": "tin2tin"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 2466,
    "title": "Guide on how to use TensorRT-LLM Backend",
    "body": "### Feature request\n\nDoes any documentation exist, or would it be possible to add documentation, on how to use the TensorRT-LLM backend? #2458 makes mention that the TRT-LLM backend exists, and I can see that there's a Dockerfile for TRT-LLM, but I don't see any guides on how to build/use it.\n\n### Motivation\n\nI would like to run TensorRT-LLM models using TGI.\n\n### Your contribution\n\nI'm willing to test any builds/processes/pipelines that are available.",
    "url": "https://github.com/huggingface/text-generation-inference/issues/2466",
    "state": "open",
    "labels": [],
    "created_at": "2024-08-28T13:24:26Z",
    "updated_at": "2025-05-18T16:23:14Z",
    "user": "michaelthreet"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 390,
    "title": "[Feature Request] Add end effector pos field in lerobot dataset?",
    "body": "Aloha style joint space dataset will limit data set to the specific robot. Can we change joint space data or add a field of end effector to cartesian space data base on the robot URDF file?\r\n\r\nIt may help robotics community build a more generalized policy.",
    "url": "https://github.com/huggingface/lerobot/issues/390",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "robots"
    ],
    "created_at": "2024-08-28T13:19:15Z",
    "updated_at": "2024-08-29T09:55:27Z",
    "user": "hilookas"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7129,
    "title": "Inconsistent output in documentation example: `num_classes` not displayed in `ClassLabel` output",
    "body": "In the documentation for [ClassLabel](https://huggingface.co/docs/datasets/v2.21.0/en/package_reference/main_classes#datasets.ClassLabel), there is an example of usage with the following code:\r\n\r\n````\r\nfrom datasets import Features\r\nfeatures = Features({'label': ClassLabel(num_classes=3, names=['bad', 'ok', 'good'])})\r\nfeatures\r\n````\r\n\r\nwhich expects to output (as stated in the documentation):\r\n\r\n````\r\n{'label': ClassLabel(num_classes=3, names=['bad', 'ok', 'good'], id=None)}\r\n````\r\n\r\nbut it generates the following\r\n\r\n````\r\n{'label': ClassLabel(names=['bad', 'ok', 'good'], id=None)}\r\n````\r\n\r\nIf my understanding is correct, this happens because although num_classes is used during the init of the object, it is afterward ignored:\r\n\r\nhttps://github.com/huggingface/datasets/blob/be5cff059a2a5b89d7a97bc04739c4919ab8089f/src/datasets/features/features.py#L975\r\n\r\nI would like to work on this issue if this is something needed \ud83d\ude04\r\n",
    "url": "https://github.com/huggingface/datasets/issues/7129",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-28T12:27:48Z",
    "updated_at": "2024-12-06T11:32:02Z",
    "comments": 0,
    "user": "sergiopaniego"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9299,
    "title": "CUDAGRAPHs for Flux position embeddings",
    "body": "@yiyixuxu \r\n\r\nIs it possible to refactor the Flux positional embeddings so that we can fully make use of CUDAGRAPHs? \r\n\r\n```bash\r\nskipping cudagraphs due to skipping cudagraphs due to cpu device (device_put). Found from : \r\n   File \"/home/sayak/diffusers/src/diffusers/models/transformers/transformer_flux.py\", line 469, in forward\r\n    image_rotary_emb = self.pos_embed(ids)\r\n  File \"/home/sayak/.pyenv/versions/diffusers/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1562, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"/home/sayak/diffusers/src/diffusers/models/embeddings.py\", line 630, in forward\r\n    self.axes_dim[i], pos[:, i], repeat_interleave_real=True, use_real=True, freqs_dtype=freqs_dtype\r\n```\r\n\r\n<details>\r\n<summary>Code</summary>\r\n\r\n```python\r\nimport torch\r\n\r\ntorch.set_float32_matmul_precision(\"high\")\r\ntorch._inductor.conv_1x1_as_mm = True\r\ntorch._inductor.coordinate_descent_tuning = True\r\ntorch._inductor.epilogue_fusion = False\r\ntorch._inductor.coordinate_descent_check_all_directions = True\r\n\r\nimport diffusers\r\nfrom platform import python_version\r\nfrom diffusers import DiffusionPipeline\r\n\r\nprint(diffusers.__version__)\r\nprint(torch.__version__)\r\nprint(python_version())\r\n\r\n\r\npipe = DiffusionPipeline.from_pretrained(\"black-forest-labs/FLUX.1-dev\", torch_dtype=torch.bfloat16).to(\"cuda\")\r\npipe.transformer.to(memory_format=torch.channels_last)\r\npipe.vae.to(memory_format=torch.channels_last)\r\n\r\npipe.transformer = torch.compile(pipe.transformer, mode=\"max-autotune\", fullgraph=True)\r\npipe.vae.decode = torch.compile(pipe.vae.decode, mode=\"max-autotune\", fullgraph=True)\r\n\r\nfor _ in range(5):\r\n    image = pipe(\r\n        \"Happy bear\",\r\n        num_inference_steps=5,\r\n        guidance_scale=3.5,\r\n        max_sequence_length=512,\r\n        generator=torch.manual_seed(42),\r\n        height=1024,\r\n        width=1024,\r\n    ).images[0]\r\n```\r\n\r\n</details>\r\n\r\n\r\nIf we can fully make sure CUDAGRAPHs `torch.compile()` would be faster. ",
    "url": "https://github.com/huggingface/diffusers/issues/9299",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-28T11:33:16Z",
    "updated_at": "2024-08-29T19:37:17Z",
    "comments": 0,
    "user": "sayakpaul"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 134668,
    "title": "Whether tensor parallelism supports the overlap of communication calculations for gradient computation, and how to implement it",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI want to know How to achieve the overlap of communication calculations when finding the gradient after row cutting/column cutting of the linear layer\uff0cthanks\r\nThe following is\r\nhttps://pytorch.org/docs/2.3/distributed.tensor.parallel.html\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @XilunWu @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o",
    "url": "https://github.com/pytorch/pytorch/issues/134668",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "triaged"
    ],
    "created_at": "2024-08-28T11:06:58Z",
    "updated_at": "2024-08-30T17:54:43Z",
    "user": "Xingzhi107"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 906,
    "title": "Unsupported model type: jais",
    "body": "### Question\n\n### System Info\r\nmacOS, node v20.10, @xenova/transformers 2.17.2\r\n\r\n### Environment/Platform\r\n- [ ]  Website/web-app\r\n- [ ]  Browser extension\r\n- [x]  Server-side (e.g., Node.js, Deno, Bun)\r\n- [ ]  Desktop app (e.g., Electron)\r\n- [ ]  Other (e.g., VSCode extension)\r\n\r\n### Description\r\n```\r\nError: Unsupported model type: jais\r\n    at Function.from_pretrained (file:///node_modules/@xenova/transformers/src/models.js:5526:19)\r\n    at async Promise.all (index 1)\r\n    at loadItems (file:///node_modules/@xenova/transformers/src/pipelines.js:3279:5)\r\n    at pipeline (file:///node_modules/@xenova/transformers/src/pipelines.js:3219:21)\r\n    at SearchQueryParser.initializeModel (src/search-engine/query-parser/search-query-parser.ts:27:18)\r\n``` \r\n\r\n### Reproduction\r\n```javascript\r\nimport { Logger } from '@nestjs/common';\r\n\r\nexport class SearchQueryParser {\r\n  private tokenizer: any;\r\n  private model: any;\r\n  private logger: Logger;\r\n  private systemPrompt = '';\r\n\r\n  constructor() {\r\n    this.logger = new Logger('query parser');\r\n    this.initializeModel();\r\n  }\r\n\r\n  private async initializeModel() {\r\n    const { AutoTokenizer, pipeline } = await import('@xenova/transformers');\r\n    this.tokenizer = await AutoTokenizer.from_pretrained(\r\n      'omarabb315/Query-5KM-no_synonyms_noon_1',\r\n      {\r\n        progress_callback: (data) => {\r\n          this.logger.verbose(\r\n            ${data.status} ${data.file || ''} ${data.progress || ''}`,\r\n          );\r\n        },\r\n      },\r\n    );\r\n    this.model = await pipeline(\r\n      'text-generation',\r\n      'omarabb315/Query-5KM-no_synonyms_noon_1',\r\n    );\r\n  }\r\n\r\n  async parse(query: string): Promise<any> {\r\n    if (!this.model) {\r\n      await this.initializeModel();\r\n    }\r\n\r\n    const tokenizerResponse = this.tokenizer.apply_chat_template(\r\n      [\r\n        { role: 'system', content: this.systemPrompt },\r\n        { role: 'user', content: query },\r\n      ],\r\n      {\r\n        tokenize: false,\r\n        add_generation_prompt: true,\r\n      },\r\n    );\r\n\r\n    const response = this.model(tokenizerResponse.toString());\r\n\r\n    const parsedQuery = response[0].generated_text;\r\n\r\n    return parsedQuery;\r\n  }\r\n}\r\n```\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/906",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-28T09:46:17Z",
    "updated_at": "2024-08-28T21:01:10Z",
    "user": "SherifElfadaly"
  },
  {
    "repo": "huggingface/trl",
    "number": 1986,
    "title": "how to convert dpodata to ktodata",
    "body": "### Feature request\n\nhow to convert dpodata to ktodata\n\n### Motivation\n\nhow to convert dpodata to ktodata\n\n### Your contribution\n\nhow to convert dpodata to ktodata",
    "url": "https://github.com/huggingface/trl/issues/1986",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-28T06:23:13Z",
    "updated_at": "2024-08-28T09:02:35Z",
    "user": "dotsonliu"
  },
  {
    "repo": "pytorch/ao",
    "number": 763,
    "title": "How to reduce autoquant compilation time",
    "body": "Autoquant has been popular among the diffusers crowd since its OOB performance has been the best but the main issue is compile times are quite long. There's a few strategies to mitigate this\r\n1. Tune faster: either with better heuristics or a faster tuning core loop\r\n2. Cache things: It's fine if tuning takes a long time if subsequent tunings take less time so we could have a cache. Right now some users are conflating the kernel autotune cach as an autoquant cache. Probably makes sense to hide the autotune cache \r\n3. Print progress more verbosely: Since people are waiting for a long time we can print a nice report to make things more appealing",
    "url": "https://github.com/pytorch/ao/issues/763",
    "state": "open",
    "labels": [],
    "created_at": "2024-08-27T20:49:09Z",
    "updated_at": "2024-08-28T17:36:03Z",
    "user": "msaroufim"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7128,
    "title": "Filter Large Dataset Entry by Entry",
    "body": "### Feature request\n\nI am not sure if this is a new feature, but I wanted to post this problem here, and hear if others have ways of optimizing and speeding up this process.\r\n\r\nLet's say I have a really large dataset that I cannot load into memory. At this point, I am only aware of `streaming=True` to load the dataset. Now, the dataset consists of many tables. Ideally, I would want to have some simple filtering criterion, such that I only see the \"good\" tables. Here is an example of what the code might look like:\r\n\r\n```\r\ndataset = load_dataset(\r\n    \"really-large-dataset\",\r\n    streaming=True\r\n)\r\n# And let's say we process the dataset bit by bit because we want intermediate results\r\ndataset = islice(dataset, 10000)\r\n\r\n# Define a function to filter the data\r\ndef filter_function(table):\r\n    if some_condition:\r\n        return True\r\n    else:\r\n        return False\r\n\r\n# Use the filter function on your dataset\r\nfiltered_dataset = (ex for ex in dataset if filter_function(ex))\r\n```\r\n\r\nAnd then I work on the processed dataset, which would be magnitudes faster than working on the original. I would love to hear if the problem setup + solution makes sense to people, and if anyone has suggestions!\n\n### Motivation\n\nSee description above\n\n### Your contribution\n\nHappy to make PR if this is a new feature",
    "url": "https://github.com/huggingface/datasets/issues/7128",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-08-27T20:31:09Z",
    "updated_at": "2024-10-07T23:37:44Z",
    "comments": 4,
    "user": "QiyaoWei"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 2491,
    "title": "How to uplaod folders into repo with most effective way - on error continue resume max speed",
    "body": "Hello. I have the below tasks for uploading however I am not sure if they are most effective way of doing\r\n\r\n#### This cell is used to upload single file into a repo with certain name\r\n\r\n```\r\n\r\nfrom huggingface_hub import HfApi\r\napi = HfApi()\r\napi.upload_file(\r\n    path_or_fileobj=r\"/home/Ubuntu/apps/stable-diffusion-webui/models/Stable-diffusion/model_name.safetensors\",\r\n    path_in_repo=\"model_name.safetensors\",\r\n    repo_id=\"YourUserName/reponame\",\r\n    repo_type=\"model\",\r\n)\r\n```\r\n\r\n\r\n#### This cell is used to upload a folder into a repo with single commit\r\n\r\n```\r\nfrom huggingface_hub import HfApi\r\napi = HfApi()\r\napi.upload_folder(\r\n    folder_path=r\"/home/Ubuntu/apps/stable-diffusion-webui/models/Stable-diffusion\",\r\n    repo_id=\"YourUserName/reponame\",\r\n    repo_type=\"model\",\r\n)\r\n```\r\n\r\nThis one is especially super slow whenever I run. I think it re-calculates sha to compare if files modified\r\n\r\n#### This cell uploads a folder into remote repo with multi commit\r\n#### Supports continue feature so if gets interrupted you can run again to continue / resume\r\n```\r\n\r\nfrom huggingface_hub import HfApi\r\nfrom huggingface_hub import get_collection, delete_collection_item\r\nfrom huggingface_hub import upload_file\r\nfrom huggingface_hub import (\r\n    HfFolder,\r\n    ModelCard,\r\n    ModelCardData,\r\n    create_repo,\r\n    hf_hub_download,\r\n    upload_folder,\r\n    whoami,\r\n)\r\napi = HfApi()\r\nupload_folder(\r\n    folder_path=r\"/home/Ubuntu/apps/stable-diffusion-webui/models/Stable-diffusion\",\r\n    repo_id=\"YourUserName/reponame\",\r\n    repo_type=\"model\",\r\n    multi_commits=True,\r\n    multi_commits_verbose=True,\r\n)\r\n\r\n\r\n\r\n```\r\n\r\n",
    "url": "https://github.com/huggingface/huggingface_hub/issues/2491",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-27T16:36:04Z",
    "updated_at": "2024-08-28T08:24:22Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "huggingface/Google-Cloud-Containers",
    "number": 73,
    "title": "Download model files from GCS (Instead of HF Hub)",
    "body": "When deploying an HF model to Vertex AI, I would like to download a fine-tuned model from GCS, instead of from HF Hub, like so:\r\n\r\n```\r\nmodel = aiplatform.Model.upload(\r\n    display_name=\"my-model\",\r\n    serving_container_image_uri=os.getenv(\"CONTAINER_URI\"),\r\n    serving_container_environment_variables={\r\n        \"AIP_STORAGE_URI\": \"gs://path/to/model/files\",\r\n    },\r\n    serving_container_ports=[8080],\r\n)\r\nmodel.wait()\r\n```\r\n\r\nI would expect this to be supported since the entrypoint script logic should handle this: https://github.com/huggingface/Google-Cloud-Containers/blob/main/containers/tei/cpu/1.4.0/entrypoint.sh \r\n\r\nWill this be supported when V1.4 is released? When will this be?",
    "url": "https://github.com/huggingface/Google-Cloud-Containers/issues/73",
    "state": "closed",
    "labels": [
      "tei",
      "question"
    ],
    "created_at": "2024-08-27T12:14:10Z",
    "updated_at": "2024-09-16T07:07:11Z",
    "user": "rm-jeremyduplessis"
  },
  {
    "repo": "pytorch/ao",
    "number": 750,
    "title": "Question RE AO MX formats",
    "body": "I noticed the [MX readme](https://github.com/pytorch/ao/tree/main/torchao/prototype/mx_formats) has this line: \"we match bitwise to other implementations of the OCP MX spec (code not in this repo), with a couple of edge cases left to resolve.\" Is there a list of edge cases where AO does not match reference implementations? Also, is https://github.com/microsoft/microxcaling the reference implementation AO is trying to match or something else? ",
    "url": "https://github.com/pytorch/ao/issues/750",
    "state": "closed",
    "labels": [
      "question",
      "mx"
    ],
    "created_at": "2024-08-26T17:37:40Z",
    "updated_at": "2024-08-27T17:15:01Z",
    "user": "tsengalb99"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1436,
    "title": "MODELS=`[ variable problem when I docker run",
    "body": "Hello,\r\n\r\nI want to use Ollama to use Mistral model and I followed the documentation below : https://huggingface.co/docs/chat-ui/configuration/models/providers/ollama \r\n\r\n`deploy.sh` :\r\n\r\n```sh\r\n#!/bin/bash\r\n\r\nsudo docker compose down\r\nsudo docker rm -f mongodb && sudo docker rm -f chat-ui\r\n\r\n# nginx and ollama\r\nsudo docker compose up -d\r\n\r\n# mongodb\r\nsudo docker run -d -p 27017:27017 -v mongodb-data:/data/db --name mongodb --network backend mongo:latest\r\n\r\n# chat-ui\r\nsudo docker run -d -p 3000:3000 --env-file .env.local -v chat-ui:/data --name chat-ui --network proxy ghcr.io/huggingface/chat-ui-db && sudo docker network connect backend chat-ui\r\n```\r\n`docker-compose.yml` :\r\n\r\n```YAML\r\nservices:\r\n  nginx:\r\n    image: nginx:latest\r\n    container_name: nginx\r\n    ports:\r\n      - 80:80\r\n      - 443:443\r\n    networks:\r\n      - proxy\r\n    volumes:\r\n      - ./nginx:/etc/nginx/conf.d\r\n      - ./ssl:/etc/ssl\r\n    restart: unless-stopped\r\n\r\n  ollama:\r\n    build:\r\n      context: ./ollama\r\n      dockerfile: Dockerfile\r\n    image: ollama-with-ca\r\n    container_name: ollama\r\n    ports:\r\n      - 11434:11434\r\n    networks:\r\n      - backend\r\n    environment:\r\n      - HTTPS_PROXY=http://<username>:<password>@proxy.test.fr:8090\r\n    volumes:\r\n      - ollama-data:/data\r\n    restart: unless-stopped\r\n    entrypoint: [\"/bin/bash\", \"start-mistral.sh\"]\r\n\r\nnetworks:\r\n  backend:\r\n  proxy:\r\n    external: true\r\n\r\nvolumes:\r\n  ollama-data:\r\n```\r\n\r\n`.env.local` :\r\n\r\n```\r\nMONGODB_URL=mongodb://mongodb:27017\r\nHF_TOKEN=hf_*****\r\n\r\nMODELS=`[\r\n  {\r\n    \"name\": \"Ollama Mistral\",\r\n    \"chatPromptTemplate\": \"<s>{{#each messages}}{{#ifUser}}[INST] {{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\\n{\r\n\r\n{/if}\r\n\r\n}{\r\n\r\n{/if}\r\n\r\n} {{content}} [/INST]{{/ifUser}}{{#ifAssistant}}{{content}}</s> {{/ifAssistant}}{{/each}}\",\r\n    \"parameters\": {\r\n      \"temperature\": 0.1,\r\n      \"top_p\": 0.95,\r\n      \"repetition_penalty\": 1.2,\r\n      \"top_k\": 50,\r\n      \"truncate\": 3072,\r\n      \"max_new_tokens\": 1024,\r\n      \"stop\": [\"</s>\"]\r\n    },\r\n    \"endpoints\": [\r\n      {\r\n        \"type\": \"ollama\",\r\n        \"url\" : \"ollama://ollama:11434\",\r\n        \"ollamaName\" : \"mistral\"\r\n      }\r\n    ]\r\n  }\r\n]`\r\n```\r\n\r\nWhen I start my script, at the end of the execution, the container doesn't want to launch, I get the following error :\r\n\r\n```sh\r\ndocker: poorly formatted environment: variable '\"name\": \"Ollama Mistral\",' contains whitespaces.\r\nSee 'docker run --help'.\r\n```\r\n\r\nI already tried to put `chat-ui` and `mongodb` containers in the `docker-compose.yml` and  it doesn't works, same as this issue : https://github.com/huggingface/chat-ui/issues/614 \r\n\r\nAny solutions ?\r\n\r\nThanks in advance.\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1436",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2024-08-26T14:00:26Z",
    "updated_at": "2024-08-27T11:04:39Z",
    "comments": 5,
    "user": "avirgos"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9276,
    "title": "How can I manually update some of their checkpoints of UNet2/3DConditionModel objects?",
    "body": "### Discussed in https://github.com/huggingface/diffusers/discussions/9273\r\n\r\n<div type='discussions-op-text'>\r\n\r\n<sup>Originally posted by **justin4ai** August 26, 2024</sup>\r\nHello, I'm quite new to diffusers package and trying to implement fine-tuning code that uses the saved checkpoints initialized with ```UNet2/3DConditionModel.from_pretrained``` method as shown below:\r\n\r\n```python\r\n\r\n    reference_unet = UNet2DConditionModel.from_pretrained( # ReferenceNet\uc740 2D condition\ub9cc \ubc1b\uc74c (reference image via CLIP)\r\n        cfg.base_model_path,\r\n        subfolder=\"unet\",\r\n    ).to(device=\"cuda\")\r\n\r\n    denoising_unet = UNet3DConditionModel.from_pretrained_2d(\r\n        cfg.base_model_path,\r\n        \"\",\r\n        subfolder=\"unet\",\r\n        unet_additional_kwargs={\r\n            \"use_motion_module\": False,\r\n            \"unet_use_temporal_attention\": False, \r\n        },\r\n    ).to(device=\"cuda\")\r\n\r\n    prev = denoising_unet.state_dict()\r\n\r\n    li = torch.load(\"./pretrained_weights/denoising_unet.pth\")\r\n\r\n    for key in li:\r\n        denoising_unet[key] = li[key] # I know this kind of direct assigning to the object doesn't make sense though.\r\n    reference_unet.load_state_dict(torch.load(\"./pretrained_weights/reference_unet.pth\"))\r\n\r\n```\r\n\r\nThe checkpoint I try to load is saved from the previous training of ``` UNet2/3DConditionModel objects``` with ```state_dict = model.state_dict()``` and ```torch.save(state_dict, save_path)```. But I have no Idea about how to directly assign certain values to specific layers in those class objects.\r\n\r\nIf you help me out with this, I will be so much glad! Looking forward to your help. Also please let me know if my description of the situation is not enough for you to help me out.\r\n\r\nCheers,\r\nJunstin</div>",
    "url": "https://github.com/huggingface/diffusers/issues/9276",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2024-08-26T07:49:23Z",
    "updated_at": "2024-09-25T15:03:01Z",
    "comments": 1,
    "user": "justin4ai"
  },
  {
    "repo": "huggingface/transformers",
    "number": 33115,
    "title": "How to get the score of each token when using pipeline",
    "body": "pipe = pipeline(\r\n    \"text-generation\",\r\n    model=model,\r\n    tokenizer=tokenizer,\r\n    max_new_tokens=512,\r\n    do_sample=True,\r\n    temperature=0.7,\r\n    top_p=0.95,\r\n    top_k=40,\r\n    repetition_penalty=1.1,\r\n    output_scores=True\r\n)\r\n\r\nThe model I use is Qwen2-7B-Instruct. When I try to output the score of each token by modifying the parameters, it doesn't work.",
    "url": "https://github.com/huggingface/transformers/issues/33115",
    "state": "closed",
    "labels": [
      "Usage"
    ],
    "created_at": "2024-08-26T07:00:54Z",
    "updated_at": "2025-03-06T08:23:58Z",
    "user": "xin0623"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9271,
    "title": "The different quality between ComfyUI and Diffusers ?",
    "body": "### Discussed in https://github.com/huggingface/diffusers/discussions/9265\r\n\r\n<div type='discussions-op-text'>\r\n\r\n<sup>Originally posted by **vuongminh1907** August 25, 2024</sup>\r\nI had a problem using InstantID (https://github.com/instantX-research/InstantID), which uses Diffusers as its base. Additionally, I tried ComfyUI (https://github.com/cubiq/ComfyUI_InstantID), and the quality of the images improved better I think.\r\n\r\nI discussed this with Cubiq, and he mentioned that there are no differences in how they applied the IP Adapter (https://github.com/cubiq/ComfyUI_InstantID/issues/206).\r\n\r\n![image](https://github.com/user-attachments/assets/a0ec4a7a-aad0-4575-8617-cdae8dea5f16)\r\n\r\nCan you explain this issue to me? Perhaps it\u2019s related to the Sampler in ComfyUI and Diffusers.</div>",
    "url": "https://github.com/huggingface/diffusers/issues/9271",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-08-26T02:53:23Z",
    "updated_at": "2024-10-15T18:10:42Z",
    "comments": 3,
    "user": "vuongminh1907"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9264,
    "title": "Could you make an inpainting model for flux?",
    "body": "### Model/Pipeline/Scheduler description\n\nThe [stable-diffusion-xl-1.0-inpainting-0.1](https://huggingface.co/diffusers/stable-diffusion-xl-1.0-inpainting-0.1) model helps a lot. Could you make a similar inpainting model for flux?\r\n\r\nhttps://huggingface.co/black-forest-labs/FLUX.1-dev\n\n### Open source status\n\n- [ ] The model implementation is available.\n- [ ] The model weights are available (Only relevant if addition is not a scheduler).\n\n### Provide useful links for the implementation\n\nhttps://huggingface.co/diffusers/stable-diffusion-xl-1.0-inpainting-0.1\r\nhttps://huggingface.co/black-forest-labs/FLUX.1-dev",
    "url": "https://github.com/huggingface/diffusers/issues/9264",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-24T17:32:32Z",
    "updated_at": "2024-08-24T17:37:59Z",
    "comments": 2,
    "user": "snowbedding"
  },
  {
    "repo": "huggingface/transformers",
    "number": 33106,
    "title": "how to fine tune TrOCR on specifique langage guide.",
    "body": "### Model description\n\nhello , just passed through issues and other , but none of them talked on how to fine-tune TrOCR on specifique langage , like how to pick encoder and decoder , model .. etc , \r\ncan you @NielsRogge , write a simple instructions/guide on this topic ?\r\n\n\n### Open source status\n\n- [ ] The model implementation is available\n- [ ] The model weights are available\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/transformers/issues/33106",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-24T14:33:02Z",
    "updated_at": "2025-06-15T08:07:10Z",
    "user": "MohamedLahmeri01"
  },
  {
    "repo": "pytorch/xla",
    "number": 7911,
    "title": "Documentation: Discoverability of http://pytorch.org/xla",
    "body": "## \ud83d\udcda Documentation: Discoverability of http://pytorch.org/xla\r\n\r\nThe docs are very hard to find _despite_ being hosted on [pytorch.org](http://pytorch.org/). If I visit [pytorch.org](http://pytorch.org/) I can't find any link that goes to [pytorch.org/xla](http://pytorch.org/xla). The closest I could find is somewhere deep in https://pytorch.org/pytorch-domains and even then it links to version 2.1! I think the discoverability can use some support possibly after we've polished up the landing page.",
    "url": "https://github.com/pytorch/xla/issues/7911",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-08-24T02:58:03Z",
    "updated_at": "2024-11-04T17:38:23Z",
    "comments": 7,
    "user": "tengyifei"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7123,
    "title": "Make dataset viewer more flexible in displaying metadata alongside images",
    "body": "### Feature request\r\n\r\nTo display images with their associated metadata in the dataset viewer, a `metadata.csv` file is required. In the case of a dataset with multiple subsets, this would require the CSVs to be contained in the same folder as the images since they all need to be named `metadata.csv`. The request is that this be made more flexible for datasets with multiple subsets to avoid the need to put a `metadata.csv` into each image directory where they are not as easily accessed. \r\n\r\n### Motivation\r\n\r\nWhen creating datasets with multiple subsets I can't get the images to display alongside their associated metadata (it's usually one or the other that will show up). Since this requires a file specifically named `metadata.csv`, I then have to place that file within the image directory, which makes it much more difficult to access. Additionally, it still doesn't necessarily display the images alongside their metadata correctly (see, for instance, [this discussion](https://huggingface.co/datasets/imageomics/2018-NEON-beetles/discussions/8)).\r\n\r\nIt was suggested I bring this discussion to GitHub on another dataset struggling with a similar issue ([discussion](https://huggingface.co/datasets/imageomics/fish-vista/discussions/4)). In that case, it's a mix of data subsets, where some just reference the image URLs, while others actually have the images uploaded. The ones with images uploaded are not displaying images, but renaming that file to just `metadata.csv` would diminish the clarity of the construction of the dataset itself (and I'm not entirely convinced it would solve the issue).\r\n\r\n### Your contribution\r\n\r\nI can make a suggestion for one approach to address the issue:\r\n\r\nFor instance, even if it could just end in `_metadata.csv` or `-metadata.csv`, that would be very helpful to allow for more flexibility of dataset structure without impacting clarity. I would think that the functionality on the backend looking for `metadata.csv` could reasonably be adapted to look for such an ending on a filename (maybe also check that it has a `file_name` column?).\r\n\r\nPresumably, requiring the `configs` in a setup like on [this dataset](https://huggingface.co/datasets/imageomics/rare-species/blob/main/README.md) could also help in figuring out how it should work?\r\n```\r\nconfigs:\r\n  - config_name: <image subset>\r\n    data_files:\r\n      - <image-metadata>.csv\r\n      - <path/to/images>/*.jpg\r\n```\r\n\r\nI'd also be happy to look at whatever solution is decided upon and contribute to the ideation.\r\n\r\nThanks for your time and consideration! The dataset viewer really is fabulous when it works :)",
    "url": "https://github.com/huggingface/datasets/issues/7123",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-08-23T22:56:01Z",
    "updated_at": "2024-10-17T09:13:47Z",
    "comments": 3,
    "user": "egrace479"
  },
  {
    "repo": "pytorch/vision",
    "number": 8608,
    "title": "loss_box_reg increasing while training mask rcnn ",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI am trying to train maskRcnn model using detectron2 on my custom LVO deteset. My dataset is a single class dataset and some of the image have no annotation in it. The architecture need to learn negative examples as well for proper training as the test data contains both positive and negative lvo cases. I have segmentation annotation in coco format and have registered it using CocoRegistration.\r\nWhen I try to train the maskrcnn model the overall loss decreases but the loss_box_reg increases, and the prediction results bounding box have scores less then 0.1 for every cases (even positive cases). Why is this happening.\r\n\r\nHow to reproduce this error:\r\n\r\n```\r\ncfg = get_cfg()\r\n# cfg.merge_from_file(model_zoo.get_config_file(\"COCO-Detection/retinanet_R_101_FPN_3x.yaml\"))\r\ncfg.merge_from_file(model_zoo.get_config_file(\"COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x.yaml\"))\r\ncfg.DATASETS.TRAIN = (\"train\",)\r\ncfg.DATASETS.TEST = ()   # no metrics implemented for this dataset\r\ncfg.DATALOADER.NUM_WORKERS = 2\r\ncfg.INPUT.MAX_SIZE_TRAIN = 512         # every training image have size 512\r\ncfg.INPUT.MIN_SIZE_TRAIN = (512,)\r\ncfg.INPUT.MAX_SIZE_TEST = 512\r\ncfg.INPUT.MIN_SIZE_TEST = 512\r\ncfg.INPUT.MASK_FORMAT = \"bitmask\"\r\n# cfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url(\"COCO-Detection/retinanet_R_101_FPN_3x.yaml\")  # initialize from model zoo\r\ncfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url(\"COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x.yaml\")\r\ncfg.SOLVER.IMS_PER_BATCH = 2\r\ncfg.SOLVER.BASE_LR = 0.00025\r\ncfg.SOLVER.MAX_ITER = 2000\r\ncfg.SOLVER.CHECKPOINT_PERIOD = 200\r\ncfg.SOLVER.STEPS = []        # do not decay learning rate\r\ncfg.MODEL.ROI_HEADS.BATCH_SIZE_PER_IMAGE = 512   # faster, and good enough for this toy dataset\r\ncfg.MODEL.ROI_HEADS.NUM_CLASSES = 1  # only has one class (ballon)\r\ncfg.DATALOADER.FILTER_EMPTY_ANNOTATIONS = False\r\ncfg.OUTPUT_DIR = out_dir\r\ntrainer = DefaultTrainer(cfg) \r\ntrainer.resume_or_load(resume=False)\r\ntrainer.train()\r\n```\r\nMy positive and negative dataset sample\r\n![image](https://github.com/user-attachments/assets/b59b688a-9709-44a2-beb5-53cd12916e41)\r\nAnnotation example:\r\n ```  \r\n {\r\n      \"id\": 80,\r\n      \"image_id\": 180,\r\n      \"category_id\": 1,\r\n      \"segmentation\": {\r\n        \"counts\": [\r\n          large list\r\n        ],\r\n        \"size\": [512, 512]\r\n      },\r\n      \"area\": 247.0,\r\n      \"bbox\": [302.0, 227.0, 24.0, 13.0],\r\n      \"iscrowd\": 0,\r\n      \"attributes\": {  \"occluded\": false\r\n      }},\r\n```\r\n \r\nIssue:\r\nTotal loss:\r\n![image](https://github.com/user-attachments/assets/5095c1e6-c692-48a2-845d-5f4c54b77be9)\r\n\r\nLoss_box_reg:\r\n![image](https://github.com/user-attachments/assets/8ce4cfe0-820a-4646-9921-10d527ce3987)\r\n\r\nMy prediction scoreexample for positive cases:\r\nscores: tensor([0.0901, 0.0862, 0.0737, 0.0697, 0.0679, 0.0670, 0.0668, 0.0665, 0.0664, ........])\r\n\r\nHelp me solve this problem\r\n\r\n### Versions\r\n\r\nVersions:\r\nPyTorch version: 2.0.0+cu117\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.7\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Red Hat Enterprise Linux 9.4 (Plow) (x86_64)\r\nGCC version: (GCC) 11.3.0\r\nClang version: Could not collect\r\nCMake version: version 3.28.3\r\nLibc version: glibc-2.34\r\n\r\nPython version: 3.9.18 (main, May 16 2024, 00:00:00)  [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] (64-bit runtime)\r\nPython platform: Linux-5.14.0-427.18.1.el9_4.x86_64-x86_64-with-glibc2.34\r\nIs CUDA available: False\r\nCUDA runtime version: 11.7.64\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: Could not collect\r\nNvidia driver version: Could not collect\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                       x86_64\r\nCPU op-mode(s):                     32-bit, 64-bit\r\nAddress sizes:                      46 bits physical, 57 bits virtual\r\nByte Order:                         Little Endian\r\nCPU(s):                             64\r\nOn-line CPU(s) list:                0-63\r\nVendor ID:                          GenuineIntel\r\nModel name:                         Intel(R) Xeon(R) Gold 6326 CPU @ 2.90GHz\r\nCPU family:                         6\r\nModel:                              106\r\nThread(s) per core:                 2\r\nCore(s) per socket:                 16\r\nSocket(s):                          2\r\nStepping:                           6\r\nCPU(s) scaling MHz:                 100%\r\nCPU max MHz:                        3500.0000\r\nCPU min MHz:                        800.0000\r\nBogoMIPS:                           5800.00\r\nFlags:                              -------some giberish-----------\r\nVirtualization:                     VT-x\r\nL1d cache:                          1.5 MiB (32 instances)\r\nL1i cache:                          1 MiB (32 instances)\r\nL2 cache:                           40 MiB (32 instances)\r\nL3 cache:                           48 MiB (2 instances)\r\nNUMA node(s):                       2\r\nNUMA node0 CPU(s):                  0,2,4,6,8,10,12,14,16,1",
    "url": "https://github.com/pytorch/vision/issues/8608",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-23T15:15:27Z",
    "updated_at": "2024-08-27T10:13:48Z",
    "comments": 1,
    "user": "ArpanGyawali"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9258,
    "title": "Kohya SS FLUX LoRA training is way faster on Linux than Windows any ideas to debug? Same settings, libraries and GPU",
    "body": "### Describe the bug\r\n\r\nI am using Kohya SS to train FLUX LoRA\r\n\r\nOn Linux RTX 3090 gets like 5.5 second / it - batch size 1 and 1024x1024 px resolution\r\n\r\nOn Windows RTX 3090 TI gets 7.7 second / it - has the most powerful CPU 13900 K\r\n\r\nThis speed dispercany is huge between Windows and Linux for some reason \r\n\r\nTorch upgrade from 2.1 to 2.4 on Linux caused huge speed up and VRAM usage reduction but on Windows only VRAM usage dropped - speed same\r\n\r\nAny ideas for how to fix? Using SDPA Cross Attention \r\n\r\nI am sharing venv pip freeze of both Windows and Linux\r\n\r\nBoth has Python 3.10.11\r\n\r\n**Windows pip freeze**\r\n\r\n```\r\nMicrosoft Windows [Version 10.0.19045.4717]\r\n(c) Microsoft Corporation. All rights reserved.\r\n\r\nR:\\Kohya_GUI_Flux_Installer\\kohya_ss\\venv\\Scripts>activate\r\n\r\n(venv) R:\\Kohya_GUI_Flux_Installer\\kohya_ss\\venv\\Scripts>pip freeze\r\nabsl-py==2.1.0\r\naccelerate==0.33.0\r\naiofiles==23.2.1\r\naiohappyeyeballs==2.4.0\r\naiohttp==3.10.5\r\naiosignal==1.3.1\r\naltair==4.2.2\r\nannotated-types==0.7.0\r\nantlr4-python3-runtime==4.9.3\r\nanyio==4.4.0\r\nappdirs==1.4.4\r\nastunparse==1.6.3\r\nasync-timeout==4.0.3\r\nattrs==24.2.0\r\nbitsandbytes==0.43.3\r\ncertifi==2022.12.7\r\ncharset-normalizer==2.1.1\r\nclick==8.1.7\r\ncolorama==0.4.6\r\ncoloredlogs==15.0.1\r\ncontourpy==1.2.1\r\ncycler==0.12.1\r\ndadaptation==3.2\r\ndiffusers==0.25.0\r\ndocker-pycreds==0.4.0\r\neasygui==0.98.3\r\neinops==0.7.0\r\nentrypoints==0.4\r\nexceptiongroup==1.2.2\r\nfairscale==0.4.13\r\nfastapi==0.112.1\r\nffmpy==0.4.0\r\nfilelock==3.13.1\r\nflatbuffers==24.3.25\r\nfonttools==4.53.1\r\nfrozenlist==1.4.1\r\nfsspec==2024.2.0\r\nftfy==6.1.1\r\ngast==0.6.0\r\ngitdb==4.0.11\r\nGitPython==3.1.43\r\ngoogle-pasta==0.2.0\r\ngradio==4.41.0\r\ngradio_client==1.3.0\r\ngrpcio==1.65.5\r\nh11==0.14.0\r\nh5py==3.11.0\r\nhttpcore==1.0.5\r\nhttpx==0.27.0\r\nhuggingface-hub==0.24.5\r\nhumanfriendly==10.0\r\nidna==3.4\r\nimagesize==1.4.1\r\nimportlib_metadata==8.4.0\r\nimportlib_resources==6.4.4\r\ninvisible-watermark==0.2.0\r\nJinja2==3.1.3\r\njsonschema==4.23.0\r\njsonschema-specifications==2023.12.1\r\nkeras==3.5.0\r\nkiwisolver==1.4.5\r\nlibclang==18.1.1\r\n-e git+https://github.com/kohya-ss/sd-scripts.git@e1cd19c0c0ef55709e8eb1e5babe25045f65031f#egg=library&subdirectory=..\\..\\sd-scripts\r\nlightning-utilities==0.11.6\r\nlion-pytorch==0.0.6\r\nlycoris-lora==2.2.0.post3\r\nMarkdown==3.7\r\nmarkdown-it-py==3.0.0\r\nMarkupSafe==2.1.5\r\nmatplotlib==3.9.2\r\nmdurl==0.1.2\r\nml-dtypes==0.4.0\r\nmpmath==1.3.0\r\nmultidict==6.0.5\r\nnamex==0.0.8\r\nnetworkx==3.2.1\r\nnumpy==1.26.3\r\nnvidia-cublas-cu12==12.4.2.65\r\nnvidia-cuda-cupti-cu12==12.4.99\r\nnvidia-cuda-nvrtc-cu12==12.4.99\r\nnvidia-cuda-runtime-cu12==12.4.99\r\nnvidia-cudnn-cu12==9.1.0.70\r\nnvidia-cufft-cu12==11.2.0.44\r\nnvidia-curand-cu12==10.3.5.119\r\nnvidia-cusolver-cu12==11.6.0.99\r\nnvidia-cusparse-cu12==12.3.0.142\r\nnvidia-nvjitlink-cu12==12.4.99\r\nnvidia-nvtx-cu12==12.4.99\r\nomegaconf==2.3.0\r\nonnx==1.16.1\r\nonnxruntime-gpu==1.17.1\r\nopen-clip-torch==2.20.0\r\nopencv-python==4.7.0.68\r\nopt-einsum==3.3.0\r\noptree==0.12.1\r\norjson==3.10.7\r\npackaging==24.1\r\npandas==2.2.2\r\npathtools==0.1.2\r\npillow==10.2.0\r\nprodigyopt==1.0\r\nprotobuf==3.20.3\r\npsutil==6.0.0\r\npydantic==2.8.2\r\npydantic_core==2.20.1\r\npydub==0.25.1\r\nPygments==2.18.0\r\npyparsing==3.1.2\r\npyreadline3==3.4.1\r\npython-dateutil==2.9.0.post0\r\npython-multipart==0.0.9\r\npytorch-lightning==1.9.0\r\npytz==2024.1\r\nPyWavelets==1.7.0\r\nPyYAML==6.0.2\r\nreferencing==0.35.1\r\nregex==2024.7.24\r\nrequests==2.32.3\r\nrich==13.7.1\r\nrpds-py==0.20.0\r\nruff==0.6.1\r\nsafetensors==0.4.4\r\nscipy==1.11.4\r\nsemantic-version==2.10.0\r\nsentencepiece==0.2.0\r\nsentry-sdk==2.13.0\r\nsetproctitle==1.3.3\r\nshellingham==1.5.4\r\nsix==1.16.0\r\nsmmap==5.0.1\r\nsniffio==1.3.1\r\nstarlette==0.38.2\r\nsympy==1.12\r\ntensorboard==2.17.1\r\ntensorboard-data-server==0.7.2\r\ntensorflow==2.17.0\r\ntensorflow-intel==2.17.0\r\ntensorflow-io-gcs-filesystem==0.31.0\r\ntermcolor==2.4.0\r\ntimm==0.6.12\r\ntk==0.1.0\r\ntokenizers==0.19.1\r\ntoml==0.10.2\r\ntomlkit==0.12.0\r\ntoolz==0.12.1\r\ntorch==2.4.0+cu124\r\ntorchmetrics==1.4.1\r\ntorchvision==0.19.0+cu124\r\ntqdm==4.66.5\r\ntransformers==4.44.0\r\ntyper==0.12.4\r\ntyping_extensions==4.9.0\r\ntzdata==2024.1\r\nurllib3==2.2.2\r\nuvicorn==0.30.6\r\nvoluptuous==0.13.1\r\nwandb==0.15.11\r\nwcwidth==0.2.13\r\nwebsockets==12.0\r\nWerkzeug==3.0.4\r\nwrapt==1.16.0\r\nxformers==0.0.27.post2\r\nyarl==1.9.4\r\nzipp==3.20.0\r\n\r\n(venv) R:\\Kohya_GUI_Flux_Installer\\kohya_ss\\venv\\Scripts>\r\n```\r\n\r\n**Ubuntu pip freeze**\r\n\r\n```\r\n(venv) Ubuntu@0054-kci-prxmx10136:~/apps/kohya_ss$ pip freeze\r\nabsl-py==2.1.0\r\naccelerate==0.33.0\r\naiofiles==23.2.1\r\naiohttp==3.9.5\r\naiosignal==1.3.1\r\naltair==4.2.2\r\nannotated-types==0.7.0\r\nantlr4-python3-runtime==4.9.3\r\nanyio==4.4.0\r\nappdirs==1.4.4\r\nastunparse==1.6.3\r\nasync-timeout==4.0.3\r\nattrs==23.2.0\r\nbitsandbytes==0.43.3\r\ncachetools==5.3.3\r\ncertifi==2024.2.2\r\ncharset-normalizer==3.3.2\r\nclick==8.1.7\r\ncoloredlogs==15.0.1\r\ncontourpy==1.2.1\r\ncycler==0.12.1\r\ndadaptation==3.1\r\ndiffusers==0.25.0\r\ndnspython==2.6.1\r\ndocker-pycreds==0.4.0\r\neasygui==0.98.3\r\neinops==0.7.0\r\nemail_validator==2.1.1\r\nentrypoints==0.4\r\nexceptiongroup==1.2.1\r\nfairscale==0.4.13\r\nfastapi==0.111.0\r\nfastapi-cli==0.0",
    "url": "https://github.com/huggingface/diffusers/issues/9258",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-23T11:42:53Z",
    "updated_at": "2024-08-23T11:55:18Z",
    "comments": 1,
    "user": "FurkanGozukara"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7122,
    "title": "[interleave_dataset] sample batches from a single source at a time",
    "body": "### Feature request\n\ninterleave_dataset and [RandomlyCyclingMultiSourcesExamplesIterable](https://github.com/huggingface/datasets/blob/3813ce846e52824b38e53895810682f0a496a2e3/src/datasets/iterable_dataset.py#L816) enable us to sample data examples from different sources. But can we also sample batches in a similar manner (each batch only contains data from a single source)?\r\n\n\n### Motivation\n\nSome recent research [[1](https://blog.salesforceairesearch.com/sfr-embedded-mistral/), [2](https://arxiv.org/pdf/2310.07554)] shows that source homogenous batching can be helpful for contrastive learning. Can we add a function called `RandomlyCyclingMultiSourcesBatchesIterable` to support this functionality?\n\n### Your contribution\n\nI can contribute a PR. But I wonder what the best way is to test its correctness and robustness.",
    "url": "https://github.com/huggingface/datasets/issues/7122",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-08-23T07:21:15Z",
    "updated_at": "2024-08-23T07:21:15Z",
    "comments": 0,
    "user": "memray"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 2452,
    "title": "How to get the token probability by curl request?",
    "body": "### Feature request\n\ncurl -v -X POST http://.....srv/generate -H \"Content-Type: application/json\"  -d '{\"inputs\": \"xxxxx:\",\"parameters\": {\"max_new_tokens\": 256}}'\r\nuser this curl request, get output like\r\n{\"generated_text\": xxxx}\r\n\r\nhow to get generated text probability from llm in TGI service?\r\n\r\n\n\n### Motivation\n\nno\n\n### Your contribution\n\nno",
    "url": "https://github.com/huggingface/text-generation-inference/issues/2452",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-23T03:01:17Z",
    "updated_at": "2024-08-27T01:32:44Z",
    "user": "TWSFar"
  },
  {
    "repo": "huggingface/speech-to-speech",
    "number": 37,
    "title": "[Feature request] How about adding an optional speech to viseme model at the end of our chain?",
    "body": "Hi there,\r\n\r\nThank you so much for your work on this project. It's truly amazing, and I\u2019m excited to see all the innovative tools that people will build based on it. I can already imagine many will integrate your speech-to-speech pipeline with avatar or robot embodiments, where lip sync will be crucial. \r\n\r\nTo support this, could you help us add functionality to the current flow? The current process includes 1) speech-to-text, 2) LLM, and 3) text-to-speech. I\u2019d like to add a fourth step: either speech-to-viseme or speech-to-text with `return_timestamp = \"word\"`, followed by manual mapping of words to phonemes, and then to visemes.\r\n\r\nBest regards,  \r\nFabio",
    "url": "https://github.com/huggingface/speech-to-speech/issues/37",
    "state": "open",
    "labels": [],
    "created_at": "2024-08-22T21:32:47Z",
    "updated_at": "2024-09-09T17:16:45Z",
    "user": "fabiocat93"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3115,
    "title": "\u2753 [Question] JetPack 6.0",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\ni'd like to use torch_tensorrt w/ JetPack 6.0, but from `setup.py`, it seems like latest supported version is JetPack 5.0 https://github.com/pytorch/TensorRT/blob/main/setup.py#L147-L164\r\n\r\n## What you have already tried\r\n1. added JetPack 6.0 to setup.py, setting `JETPACK_VERSION` to 6.0.\r\n2. downloaded bazelisk, manually added to PATH \r\n3. ran setup.py:\r\n```bash\r\npython setup.py bdist_wheel --jetpack-version 6.0 --use-cxx11-abi\r\n```\r\n4. tried creating a new WORKSPACE under `toolchains/jp_workspaces/WORKSPACE.jp60`, effectively copying and pasting `jp50` - but changing `libtorch` to be from Python 3.10. ran `bazel clean --expunge`, eventually ending with `ValueError: Can't find the directory of package torch_tensorrt: I looked in ./src/torch_tensorrt and ./torch_tensorrt`\r\n\r\npotentially missing something obvious here. thank you!\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.4\r\n - CPU Architecture: ARM64\r\n - OS (e.g., Linux): Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): conda env, pip install\r\n - Build command you used (if compiling from source): setup.py w/ Bazel (through Bazelisk)\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.10\r\n - CUDA version: 12.2\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n\r\n\r\ncc @narendasan @zewenli98 (seeing a lot of your commits around setup.py and jp50 :))",
    "url": "https://github.com/pytorch/TensorRT/issues/3115",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-22T17:52:45Z",
    "updated_at": "2024-08-26T17:11:33Z",
    "user": "patrick-botco"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3114,
    "title": "\u2753 [Question] Revisit the argument types of normalization converters",
    "body": "## \u2753 Question\r\n\r\nhttps://github.com/pytorch/TensorRT/pull/3099#issuecomment-2303600863\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture:\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3114",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-22T16:17:01Z",
    "updated_at": "2024-08-22T18:04:10Z",
    "user": "peri044"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 2480,
    "title": "How to use the HF Nvidia NIM API with the HF inference client?",
    "body": "### Describe the bug\r\n\r\nWe recently introduced the [Nvidia NIM API](https://huggingface.co/blog/inference-dgx-cloud) for selected models. The recommended use is via the OAI client like this (with a specific fine-grained token for an enterprise org): \r\n\r\n```py\r\nfrom openai import OpenAI\r\n\r\nclient = OpenAI(\r\n    base_url=\"https://huggingface.co/api/integrations/dgx/v1\",\r\n    api_key=\"YOUR_FINE_GRAINED_TOKEN_HERE\"\r\n)\r\n\r\nchat_completion = client.chat.completions.create(\r\n    model=\"meta-llama/Meta-Llama-3-8B-Instruct\",\r\n    messages=[\r\n        {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\r\n        {\"role\": \"user\", \"content\": \"Count to 500\"}\r\n    ],\r\n    stream=True,\r\n    max_tokens=1024\r\n)\r\n\r\n# Iterate and print stream\r\nfor message in chat_completion:\r\n    print(message.choices[0].delta.content, end='')\r\n```\r\n\r\nHow can users use this API with the HF inference client directly? \r\nThe InferenceClient.chat_completions [docs](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/inference_client#huggingface_hub.InferenceClient.chat_completion) provide this example snippet for OAI syntax (example 3): \r\n\r\n```py\r\n# instead of `from openai import OpenAI`\r\nfrom huggingface_hub import InferenceClient\r\n\r\n# instead of `client = OpenAI(...)`\r\nclient = InferenceClient(\r\n    base_url=...,\r\n    api_key=...,\r\n)\r\n\r\noutput = client.chat.completions.create(\r\n    model=\"meta-llama/Meta-Llama-3-8B-Instruct\",\r\n    messages=[\r\n        {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\r\n        {\"role\": \"user\", \"content\": \"Count to 10\"},\r\n    ],\r\n    stream=True,\r\n    max_tokens=1024,\r\n)\r\n\r\nfor chunk in output:\r\n    print(chunk.choices[0].delta.content)\r\n```\r\n\r\nWhen I transpose the logic from the NIM OAI code snippet to the code above, I get this: \r\n\r\n```py\r\n# instead of `from openai import OpenAI`\r\nfrom huggingface_hub import InferenceClient\r\n\r\n# instead of `client = OpenAI(...)`\r\nclient = InferenceClient(\r\n    api_key=\"enterprise-org-token\",\r\n    base_url=\"https://huggingface.co/api/integrations/dgx/v1\",\r\n)\r\n\r\noutput = client.chat.completions.create(\r\n    model=\"meta-llama/Meta-Llama-3-8B-Instruct\",\r\n    messages=[\r\n        {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\r\n        {\"role\": \"user\", \"content\": \"Count to 10\"},\r\n    ],\r\n    stream=True,\r\n    max_tokens=1024,\r\n)\r\n\r\nfor chunk in output:\r\n    print(chunk.choices[0].delta.content)\r\n```\r\n\r\nThis throws this error: \r\n```py\r\n---------------------------------------------------------------------------\r\nHTTPError                                 Traceback (most recent call last)\r\nFile ~/miniconda/lib/python3.9/site-packages/huggingface_hub/utils/_errors.py:304, in hf_raise_for_status(response, endpoint_name)\r\n    303 try:\r\n--> 304     response.raise_for_status()\r\n    305 except HTTPError as e:\r\n\r\nFile ~/miniconda/lib/python3.9/site-packages/requests/models.py:1024, in Response.raise_for_status(self)\r\n   1023 if http_error_msg:\r\n-> 1024     raise HTTPError(http_error_msg, response=self)\r\n\r\nHTTPError: 400 Client Error: Bad Request for url: https://huggingface.co/api/integrations/dgx/v1/chat/completions\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nBadRequestError                           Traceback (most recent call last)\r\nCell In[48], line 10\r\n      4 # instead of `client = OpenAI(...)`\r\n      5 client = InferenceClient(\r\n      6     api_key=\"hf_****\",\r\n      7     base_url=\"https://huggingface.co/api/integrations/dgx/v1\",\r\n      8 )\r\n---> 10 output = client.chat.completions.create(\r\n     11     model=\"meta-llama/Meta-Llama-3-8B-Instruct\",\r\n     12     messages=[\r\n     13         {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\r\n     14         {\"role\": \"user\", \"content\": \"Count to 10\"},\r\n     15     ],\r\n     16     stream=True,\r\n     17     max_tokens=1024,\r\n     18 )\r\n     20 for chunk in output:\r\n     21     print(chunk.choices[0].delta.content)\r\n\r\nFile ~/miniconda/lib/python3.9/site-packages/huggingface_hub/inference/_client.py:837, in InferenceClient.chat_completion(self, messages, model, stream, frequency_penalty, logit_bias, logprobs, max_tokens, n, presence_penalty, response_format, seed, stop, temperature, tool_choice, tool_prompt, tools, top_logprobs, top_p)\r\n    833 # `model` is sent in the payload. Not used by the server but can be useful for debugging/routing.\r\n    834 # If it's a ID on the Hub => use it. Otherwise, we use a random string.\r\n    835 model_id = model if not is_url and model.count(\"/\") == 1 else \"tgi\"\r\n--> 837 data = self.post(\r\n    838     model=model_url,\r\n    839     json=dict(\r\n    840         model=model_id,\r\n    841         messages=messages,\r\n    842         frequency_penalty=frequency_penalty,\r\n    843         logit_bias=logit_bias,\r\n    844         logprobs=logprobs,\r\n    845         max_tokens=max_tokens,\r\n    846         n=n,\r\n    847         presence_penalty=presence_penalty,\r\n    848         response_format=response_format,\r\n    849         seed",
    "url": "https://github.com/huggingface/huggingface_hub/issues/2480",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-22T12:32:16Z",
    "updated_at": "2024-08-26T12:45:55Z",
    "user": "MoritzLaurer"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 896,
    "title": "How to use this model: Xenova/bge-reranker-base",
    "body": "### Question\n\nI see that it supports transformers.js, but I can't find the instructions for use. Please help me with using it.",
    "url": "https://github.com/huggingface/transformers.js/issues/896",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-22T07:33:42Z",
    "updated_at": "2024-08-29T00:12:52Z",
    "user": "gy9527"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 134207,
    "title": "How to fallback the operators those are unsupported by XLA back  to cpu backend?",
    "body": "I'm using the xla backend, and there are some operators that are not supported by the xla backend.\r\nHow can I use the backend fallback mechanism to fallback these unsupported operators to CPU backend?\r\n\r\nThanks!\n\ncc @bdhirsh",
    "url": "https://github.com/pytorch/pytorch/issues/134207",
    "state": "closed",
    "labels": [
      "triaged",
      "module: xla"
    ],
    "created_at": "2024-08-22T06:46:21Z",
    "updated_at": "2024-09-05T06:52:20Z",
    "user": "wwtghx"
  },
  {
    "repo": "pytorch/serve",
    "number": 3296,
    "title": "integrating the Torch Serve hosted model with a third party application",
    "body": "I have an application that takes an image converts that image into base64 to create a input request for API call.\r\n\r\nThe input schema structure created by my application looks something like this,\r\n{\r\n\"instances\":\r\n    [\r\n        {\r\n            \"base64\": \"base64 string of image\",\r\n            \"mode_type\": \"some value\"\r\n            \"metadata\": \"some metadata like timestamp\"\r\n        }\r\n    ]\r\n}\r\n\r\nNow, I have to use this application to call a torch serve hosted application. From going through the Torch Serve documents I understood that the torch serve hosted API would accept an input in the below structure,\r\n{\r\n\"instances\":\r\n    [\r\n        {\r\n            \"data\": [input_data]\r\n        }\r\n    ]\r\n}\r\nwhere the **input_data** is the data that is directly accepted by the model. For understanding purpose lets say it is Numpy array.\r\n\r\nHere is my question:\r\nIf I wanted to use my application to call a Torch Serve API, How easy or difficult it would be? Having in account that similar discrepancy is there in the output structure which might require some pre or post processing of the base64 into appropriate format. \r\n\r\nHow can I integrate my application with Torch Serve API seamlessly?",
    "url": "https://github.com/pytorch/serve/issues/3296",
    "state": "open",
    "labels": [],
    "created_at": "2024-08-22T06:18:20Z",
    "updated_at": "2024-08-22T16:27:35Z",
    "comments": 1,
    "user": "tarunsk1998"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2900,
    "title": "how to keep `encode_multi_process` output on the GPU",
    "body": "I saw this [example](https://github.com/UKPLab/sentence-transformers/blob/master/examples/applications/semantic-search/semantic_search.py) where we can do the following:\r\n`query_embedding = embedder.encode(query, convert_to_tensor=True)`\r\n`hits = util.semantic_search(query_embedding, corpus_embeddings, top_k=5)`\r\n\r\nI read that setting `convert_to_tensor=True` keeps the embedding vectors on the GPU to optimize the similarity calculations. But if I work with multiple CPUs and GPUs, can I do the same? I didn't see a `convert_to_tensor` argument for `encode_multi_process`. ",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2900",
    "state": "open",
    "labels": [],
    "created_at": "2024-08-21T21:05:35Z",
    "updated_at": "2024-08-21T21:07:39Z",
    "user": "anshuchen"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3109,
    "title": "\u2753 [Question] how to specify dynamic shape when using torch_tensorrt.save",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nI was following [the documentation](https://pytorch.org/TensorRT/user_guide/dynamic_shapes.html#dynamic-shapes) on compiling a model with dynamic input shape. When saving the compiled graph module (following [this](https://pytorch.org/TensorRT/user_guide/saving_models.html)), the new `torch_tensorrt.save(module, path, inputs)` API requires `inputs` to be all tensors. How do I pass dynamic shapes to `torch_tensorrt.save`? Error: https://github.com/pytorch/TensorRT/blob/77278fe395d6ffdd456fd7a8a94852cd27ee63a9/py/torch_tensorrt/_compile.py#L420\r\n\r\n```\r\nimport torch\r\nimport torch_tensorrt\r\n\r\nmodel = torch.hub.load('pytorch/vision:v0.10.0', 'resnet50', pretrained=True)\r\nmodel.eval().cuda()\r\ninputs = [torch_tensorrt.Input(min_shape=[1, 3, 224, 224],\r\n                              opt_shape=[4, 3, 224, 224],\r\n                              max_shape=[8, 3, 224, 224],\r\n                              dtype=torch.float32)]\r\ntrt_gm = torch_tensorrt.compile(model, ir=\"dynamo\", inputs=inputs)\r\ntorch_tensorrt.save(trt_gm, \"trt_gm.ep\", inputs=inputs)\r\n\r\n```\r\n```\r\nWARNING:torch_tensorrt.dynamo.conversion.aten_ops_converters:Unable to import quantization op. Please install modelopt library (https://github.com/NVIDIA/TensorRT-Model-Optimizer?tab=readme-ov-file#installation) to add support for compiling quantized models\r\nINFO:torch_tensorrt.dynamo._compiler:Compilation Settings: CompilationSettings(enabled_precisions={<dtype.f32: 7>}, debug=False, workspace_size=0, min_block_size=5, torch_executed_ops=set(), pass_through_build_failures=False, max_aux_streams=None, version_compatible=False, optimization_level=None, use_python_runtime=False, truncate_double=False, use_fast_partitioner=True, enable_experimental_decompositions=False, device=Device(type=DeviceType.GPU, gpu_id=0), require_full_compilation=False, disable_tf32=False, assume_dynamic_shape_support=False, sparse_weights=False, refit=False, engine_capability=<EngineCapability.STANDARD: 1>, num_avg_timing_iters=1, dla_sram_size=1048576, dla_local_dram_size=1073741824, dla_global_dram_size=536870912, dryrun=False, hardware_compatible=False, timing_cache_path='/tmp/timing_cache.bin')\r\n\r\nINFO:torch_tensorrt.dynamo._compiler:Partitioning the graph via the fast partitioner\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:[MemUsageChange] Init CUDA: CPU +1, GPU +0, now: CPU 449, GPU 1622 (MiB)\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:[MemUsageChange] Init builder kernel library: CPU +1622, GPU +288, now: CPU 2218, GPU 1910 (MiB)\r\nWARNING:torch_tensorrt.dynamo.conversion.converter_utils:Detected unparseable type in node formatting: <class 'torch.SymInt'>\r\nINFO:torch_tensorrt.dynamo.conversion._TRTInterpreter:TRT INetwork construction elapsed time: 0:00:00.609398\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:Global timing cache in use. Profiling results in this builder pass will be stored.\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:Detected 1 inputs and 1 output network tensors.\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:Total Host Persistent Memory: 343968\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:Total Device Persistent Memory: 7168\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:Total Scratch Memory: 6424576\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:[BlockAssignment] Started assigning block shifts. This will take 86 steps to complete.\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:[BlockAssignment] Algorithm ShiftNTopDown took 0.644934ms to assign 4 blocks to 86 nodes requiring 65830912 bytes.\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:Total Activation Memory: 65830912\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:Total Weights Memory: 127383968\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:Engine generation completed in 0.553365 seconds.\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:[MemUsageStats] Peak memory usage of TRT CPU/GPU memory allocators: CPU 16 MiB, GPU 129 MiB\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:[MemUsageStats] Peak memory usage during Engine building and serialization: CPU: 4064 MiB\r\nINFO:torch_tensorrt.dynamo.conversion._TRTInterpreter:Build TRT engine elapsed time: 0:00:00.649827\r\nINFO:torch_tensorrt.dynamo.conversion._TRTInterpreter:TRT Engine uses: 129675836 bytes of Memory\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:Serialized 26 bytes of code generator cache.\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:Serialized 292352 bytes of compilation cache.\r\nINFO:torch_tensorrt [TensorRT Conversion Context]:Serialized 3744 timing cache entries\r\nWARNING: [Torch-TensorRT] - Detected this engine is being instantitated in a multi-GPU system with multi-device safe mode disabled. For more on the implications of this as well as workarounds, see the linked documentation (https://pytorch.org/TensorRT/user_guide/runtime.html#multi-device-safe-mode)\r\nTraceback (most recent call last):\r\n  File \"test.py\", line 11, in <module>\r\n    ",
    "url": "https://github.com/pytorch/TensorRT/issues/3109",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-21T18:35:28Z",
    "updated_at": "2024-09-26T20:38:44Z",
    "user": "Qi-Zha0"
  },
  {
    "repo": "pytorch/ao",
    "number": 724,
    "title": "What is the difference between WeightNormSparsifier and torch.nn.utils.prune.l1_unstructured ?",
    "body": "",
    "url": "https://github.com/pytorch/ao/issues/724",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-21T18:14:19Z",
    "updated_at": "2024-08-23T15:03:35Z",
    "user": "mayank64ce"
  },
  {
    "repo": "huggingface/parler-tts",
    "number": 116,
    "title": "How to use italian language?",
    "body": "It is possible use an italian style speaker? I've tried many prompt but all of this are in english style",
    "url": "https://github.com/huggingface/parler-tts/issues/116",
    "state": "open",
    "labels": [],
    "created_at": "2024-08-21T15:24:57Z",
    "updated_at": "2025-06-18T13:20:22Z",
    "user": "piperino11"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1423,
    "title": "Generated answers with Llama 3 include <|start_header_id|>assistant<|end_header_id|>",
    "body": "## Bug description\r\n\r\nI have set up a local endpoint serving Llama 3. All the answers I get from it start with `<|start_header_id|>assistant<|end_header_id|>`.\r\n\r\n## Steps to reproduce\r\n\r\nSet up Llama 3 in a local endpoint. In my `.env.local`, it is defined as the following:\r\n\r\n```\r\nMODELS=`[\r\n    {\r\n      \"name\": \"llama3\",\r\n      \"displayName\": \"Llama 3 loaded from GCS\",\r\n      \"chatPromptTemplate\": \"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\\n\\n{{preprompt}}<|eot_id|>{{#each messages}}{{#ifUser}}<|start_header_id|>user<|end_header_id|>\\n\\n{{content}}<|eot_id|><|start_header_id|>assistant<|end_header_id|>{{/ifUser}}{{#ifAssistant}}{{content}}<|eot_id|>{{/ifAssistant}}{{/each}}\",\r\n      \"preprompt\": \"You are a helpful AI assistant.\",\r\n      \"parameters\": {\r\n        \"stop\": [\"<|endoftext|>\", \"<|eot_id|>\"],\r\n        \"temperature\": 0.4,\r\n        \"max_new_tokens\": 1024,\r\n        \"truncate\": 3071\r\n      },\r\n      \"endpoints\": [{\r\n        \"type\": \"openai\",\r\n        \"baseURL\": \"http://localhost:8080/openai/v1\"\r\n      }],\r\n    }\r\n]`\r\n```\r\n\r\n## Context\r\n\r\nI have tried variations of the chat template, also not providing any. The `<|start_header_id|>assistant<|end_header_id|>` is always there.\r\n\r\nAFAIK, these tokens should be the last ones in the prompt, so that the model knows that it should continue the prompt with the assistant's answer. It seems they are not properly appended to the prompt, but the model still realizes it should add them itself.\r\n\r\n### Logs\r\n\r\nThis a sample request that my local server receives (running VLLM):\r\n\r\n```\r\nINFO 08-21 11:47:18 async_llm_engine.py:529] Received request cmpl-d1482c4eb4ce49c2a259a2f782ee3712-0: prompt: \"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\r\n\r\nYou are a helpful AI assistant. Unless otherwise specified, give concise and straightforward answers.<|eot_id|><|start_header_id|>user<|end_header_id|>\r\n\r\n[ChatCompletionRequestMessageContentPartText(type='text', text='Hi, what is pizza?')]<|eot_id|>\", sampling_params: SamplingParams(n=1, best_of=1, presence_penalty=0.0, frequency_penalty=0.0, repetition_penalty=1.0, temperature=0.4, top_p=1.0, top_k=-1, min_p=0.0, seed=None, use_beam_search=False, length_penalty=1.0, early_stopping=False, stop=['<|endoftext|>', '<|eot_id|>'], stop_token_ids=[], include_stop_str_in_output=False, ignore_eos=False, max_tokens=1024, min_tokens=0, logprobs=None, prompt_logprobs=None, skip_special_tokens=True, spaces_between_special_tokens=True, truncate_prompt_tokens=None), prompt_token_ids: [128000, 128000, 128006, 9125, 128007, 271, 2675, 527, 264, 11190, 15592, 18328, 13, 11115, 6062, 5300, 11, 3041, 64694, 323, 31439, 11503, 13, 128009, 128006, 882, 128007, 271, 58, 16047, 34290, 1939, 2097, 2831, 5920, 1199, 5930, 1151, 1342, 518, 1495, 1151, 13347, 11, 1148, 374, 23317, 30, 52128, 128009], lora_request: None.\r\n```\r\n\r\n### Specs\r\n\r\n- **OS**: macOS\r\n- **Browser**: Firefox 129.0.1\r\n- **chat-ui commit**: 28351dfefa581e4494b2047de3c093eaa7a7cdbc\r\n\r\n### Config\r\n\r\n```\r\nMONGODB_URL=mongodb://localhost:27017\r\nHF_TOKEN=...\r\n```\r\n\r\n## Notes\r\n\r\nI'm not sure what the `ChatCompletionRequestMessageContentPartText(...)` in the prompt is supposed to mean. Is it some internal request object rendered as a string?",
    "url": "https://github.com/huggingface/chat-ui/issues/1423",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2024-08-21T11:56:47Z",
    "updated_at": "2024-08-26T14:31:53Z",
    "comments": 5,
    "user": "erickrf"
  },
  {
    "repo": "huggingface/trl",
    "number": 1955,
    "title": "How to fine-tune LLaVA using PPO",
    "body": "Does LLaVA support training with PPO? \r\nIf not, what modifications do I need to make to enable this support?",
    "url": "https://github.com/huggingface/trl/issues/1955",
    "state": "open",
    "labels": [
      "\u2728 enhancement",
      "\ud83d\udc41\ufe0f VLM"
    ],
    "created_at": "2024-08-21T07:34:30Z",
    "updated_at": "2024-08-26T11:13:46Z",
    "user": "Yufang-Liu"
  },
  {
    "repo": "pytorch/xla",
    "number": 7897,
    "title": "Import \"torch_xla.core.xla_model\" could not be resolved",
    "body": "getting issues on torch_xla.core.xla_model. , while installing package also getting errors : \"ERROR: Could not find a version that satisfies the requirement torch-xla (from versions: none)\r\nERROR: No matching distribution found for torch-xla\"\r\nI have installed python version is : Python 3.10.0\r\n\r\nAny Solution ?\r\n",
    "url": "https://github.com/pytorch/xla/issues/7897",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-21T05:25:35Z",
    "updated_at": "2025-04-01T12:26:48Z",
    "user": "hiralU"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9235,
    "title": "Is there any way to get diffusers-v0.27.0.dev0?",
    "body": "Is there any way to get diffusers-v0.27.0.dev0? I want to compare the difference between diffusers-v0.27.0.dev0  and branches that develop on it in another project, but I didn't find it on the releases or tags page.",
    "url": "https://github.com/huggingface/diffusers/issues/9235",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-21T03:42:11Z",
    "updated_at": "2024-08-21T05:10:26Z",
    "comments": 2,
    "user": "D222097"
  },
  {
    "repo": "huggingface/llm.nvim",
    "number": 108,
    "title": "How to use proxy env var",
    "body": "I am unable to communicate with any http endpoints because I am behind a corporate proxy that uses self-signed certificates. Typically we use the http_proxy and https_proxy environment variables for this purpose, but I can't see any obvious configurations that I can add to my lua config to make this work.\r\n\r\nI have tried adding http_proxy = \"http://ProxyURL:ProxyPort\" to cmd_env in the llm.setup but it still keeps throwing an http error... invalid peer certificate, unknown issuer.",
    "url": "https://github.com/huggingface/llm.nvim/issues/108",
    "state": "open",
    "labels": [],
    "created_at": "2024-08-20T18:52:54Z",
    "updated_at": "2024-08-20T18:53:36Z",
    "user": "SethARhodes"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 2468,
    "title": "How can I modify this repo files downloader jupyter notebook script to improve downloading speed? Perhaps multiple downloads at the same time?",
    "body": "This below code works but it is just slow\r\n\r\nHow can i speed up? Machine has much bigger speed and i really need to download lots of AI models to test \r\n\r\nThank you\r\n\r\n\r\n```\r\nimport os\r\nimport requests\r\nimport hashlib\r\nfrom huggingface_hub import list_repo_files, hf_hub_url, hf_hub_download\r\nfrom huggingface_hub.utils import HfFolder\r\nfrom tqdm import tqdm\r\n\r\ndef calculate_file_hash(file_path):\r\n    sha256_hash = hashlib.sha256()\r\n    with open(file_path, \"rb\") as f:\r\n        for byte_block in iter(lambda: f.read(4096), b\"\"):\r\n            sha256_hash.update(byte_block)\r\n    return sha256_hash.hexdigest()\r\n\r\ndef download_file(url, target_path, headers, expected_size=None):\r\n    response = requests.get(url, headers=headers, stream=True)\r\n    response.raise_for_status()\r\n\r\n    total_size = int(response.headers.get('content-length', 0))\r\n    mode = 'ab' if os.path.exists(target_path) else 'wb'\r\n    \r\n    with tqdm(total=total_size, unit='B', unit_scale=True, desc=os.path.basename(target_path), initial=0, ascii=True) as pbar:\r\n        with open(target_path, mode) as f:\r\n            for chunk in response.iter_content(chunk_size=8192):\r\n                if chunk:\r\n                    f.write(chunk)\r\n                    pbar.update(len(chunk))\r\n\r\n    if expected_size and os.path.getsize(target_path) != expected_size:\r\n        raise ValueError(f\"Size mismatch for {target_path}. Expected: {expected_size}, Got: {os.path.getsize(target_path)}\")\r\n\r\n# Define the repository and target folder\r\nrepo_id = \"YourUserName/reponame\"\r\ntarget_folder = \"/home/Ubuntu/apps/stable-diffusion-webui/models/Stable-diffusion\"\r\n\r\n# Retrieve the token from the .huggingface folder or set it manually\r\ntoken = HfFolder.get_token()\r\nif not token:\r\n    raise ValueError(\"Hugging Face token not found. Please log in using `huggingface-cli login` or set the token manually.\")\r\n\r\nheaders = {\"Authorization\": f\"Bearer {token}\"}\r\n\r\n# List all files in the repository\r\nfiles = list_repo_files(repo_id)\r\n\r\n# Ensure the target folder exists\r\nos.makedirs(target_folder, exist_ok=True)\r\n\r\n# Download each file directly to the target folder\r\nfor file in files:\r\n    try:\r\n        target_path = os.path.join(target_folder, file)\r\n        \r\n        # Get file metadata\r\n        file_info = hf_hub_download(repo_id, filename=file, repo_type='model', token=token, local_dir=target_folder, local_dir_use_symlinks=False)\r\n        expected_size = os.path.getsize(file_info)\r\n\r\n        # Check if the file already exists and has the correct size\r\n        if os.path.exists(target_path):\r\n            if os.path.getsize(target_path) == expected_size:\r\n                print(f\"File {file} already exists and is complete. Skipping download.\")\r\n                continue\r\n            else:\r\n                print(f\"File {file} exists but is incomplete. Resuming download.\")\r\n\r\n        # Get the URL for the file\r\n        file_url = hf_hub_url(repo_id, filename=file, repo_type='model')\r\n        \r\n        # Ensure subdirectories exist\r\n        os.makedirs(os.path.dirname(target_path), exist_ok=True)\r\n        \r\n        # Download the file with authentication and size verification\r\n        download_file(file_url, target_path, headers, expected_size)\r\n        \r\n        # Set the correct permissions for the downloaded file\r\n        os.chmod(target_path, 0o644)  # Read and write for owner, read for group and others\r\n    \r\n    except Exception as e:\r\n        print(f\"An error occurred while processing file {file}: {e}\")\r\n\r\nprint(f\"All files have been downloaded and verified in {target_folder}\")\r\n```\r\n\r\n\r\n### System info\r\n\r\n```shell\r\nCopy-and-paste the text below in your GitHub issue.\r\n\r\n- huggingface_hub version: 0.24.6\r\n- Platform: Linux-6.5.0-45-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.12\r\n- Running in iPython ?: Yes\r\n- iPython shell: ZMQInteractiveShell\r\n- Running in notebook ?: Yes\r\n- Running in Google Colab ?: No\r\n- Token path ?: /home/Ubuntu/.cache/huggingface/token\r\n- Has saved token ?: True\r\n- Who am I ?: MonsterMMORPG\r\n- Configured git credential helpers: \r\n- FastAI: N/A\r\n- Tensorflow: N/A\r\n- Torch: N/A\r\n- Jinja2: 3.1.4\r\n- Graphviz: N/A\r\n- keras: N/A\r\n- Pydot: N/A\r\n- Pillow: N/A\r\n- hf_transfer: N/A\r\n- gradio: N/A\r\n- tensorboard: N/A\r\n- numpy: N/A\r\n- pydantic: N/A\r\n- aiohttp: 3.10.5\r\n- ENDPOINT: https://huggingface.co\r\n- HF_HUB_CACHE: /home/Ubuntu/.cache/huggingface/hub\r\n- HF_ASSETS_CACHE: /home/Ubuntu/.cache/huggingface/assets\r\n- HF_TOKEN_PATH: /home/Ubuntu/.cache/huggingface/token\r\n- HF_HUB_OFFLINE: False\r\n- HF_HUB_DISABLE_TELEMETRY: False\r\n- HF_HUB_DISABLE_PROGRESS_BARS: None\r\n- HF_HUB_DISABLE_SYMLINKS_WARNING: False\r\n- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False\r\n- HF_HUB_DISABLE_IMPLICIT_TOKEN: False\r\n- HF_HUB_ENABLE_HF_TRANSFER: False\r\n- HF_HUB_ETAG_TIMEOUT: 10\r\n- HF_HUB_DOWNLOAD_TIMEOUT: 10\r\n\r\n{'huggingface_hub version': '0.24.6',\r\n 'Platform': 'Linux-6.5.0-45-generic-x86_64-with-glibc2.35',\r\n 'Python version': '3.10.12',\r\n 'Running in iPython ?': 'Yes',\r\n 'iPython shell': 'ZM",
    "url": "https://github.com/huggingface/huggingface_hub/issues/2468",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-20T15:13:13Z",
    "updated_at": "2024-08-27T16:22:14Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "pytorch/xla",
    "number": 7890,
    "title": "In spmd training of multiple machines, xp.trace is problematic",
    "body": "## \u2753 Questions and Help\r\nI printed all the thunk that was executed and found that there were a lot of thunk that didn't appear in my tensorboard. And the order of the front and back is also wrong.\r\nI trace according to this example\uff1ahttps://github.com/pytorch/xla/blob/master/test/spmd/test_train_spmd_imagenet.py#L318-L333\r\nxla_version: latest\r\ndevice: 2 * 8 A100",
    "url": "https://github.com/pytorch/xla/issues/7890",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-20T12:48:39Z",
    "updated_at": "2025-04-01T12:28:34Z",
    "user": "mars1248"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7116,
    "title": "datasets cannot handle nested json if features is given.",
    "body": "### Describe the bug\n\nI have a json named temp.json.\r\n```json\r\n{\"ref1\": \"ABC\", \"ref2\": \"DEF\", \"cuts\":[{\"cut1\": 3, \"cut2\": 5}]}\r\n```\r\nI want to load it.\r\n```python\r\nds = datasets.load_dataset('json', data_files=\"./temp.json\", features=datasets.Features({\r\n    'ref1': datasets.Value('string'),\r\n    'ref2': datasets.Value('string'),\r\n    'cuts': datasets.Sequence({\r\n        \"cut1\": datasets.Value(\"uint16\"),\r\n        \"cut2\": datasets.Value(\"uint16\")\r\n    })\r\n}))\r\n```\r\nThe above code does not work. However, I can load it without giving features.\r\n```python\r\nds = datasets.load_dataset('json', data_files=\"./temp.json\")\r\n```\r\nIs it possible to load integers as uint16 to save some memory?\n\n### Steps to reproduce the bug\n\nAs in the bug description.\n\n### Expected behavior\n\nThe data are loaded and integers are uint16.\n\n### Environment info\n\nCopy-and-paste the text below in your GitHub issue.\r\n\r\n- `datasets` version: 2.21.0\r\n- Platform: Linux-5.15.0-118-generic-x86_64-with-glibc2.35\r\n- Python version: 3.11.9\r\n- `huggingface_hub` version: 0.24.5\r\n- PyArrow version: 17.0.0\r\n- Pandas version: 2.2.2\r\n- `fsspec` version: 2024.5.0",
    "url": "https://github.com/huggingface/datasets/issues/7116",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-20T12:27:49Z",
    "updated_at": "2024-09-03T10:18:23Z",
    "comments": 3,
    "user": "ljw20180420"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7113,
    "title": "Stream dataset does not iterate if the batch size is larger than the dataset size (related to drop_last_batch)",
    "body": "### Describe the bug\r\n\r\nHi there,\r\n\r\nI use streaming and interleaving to combine multiple datasets saved in jsonl files. The size of dataset can vary (from 100ish to 100k-ish). I use dataset.map() and a big batch size to reduce the IO cost. It was working fine with datasets-2.16.1 but this problem shows up after I upgraded to datasets-2.19.2. With  2.21.0 the problem remains.\r\n\r\nPlease see the code below to reproduce the problem.\r\n\r\nThe dataset can iterate correctly if we set either streaming=False or drop_last_batch=False.\r\n\r\nI have to use drop_last_batch=True since it's for distributed training.\r\n\r\n### Steps to reproduce the bug\r\n\r\n```python\r\n# datasets==2.21.0\r\nimport datasets\r\ndef data_prepare(examples):\r\n    print(examples[\"sentence1\"][0])\r\n    return examples\r\n\r\nbatch_size = 101\r\n# the size of the dataset is 100\r\n# the dataset iterates correctly if we set either streaming=False or drop_last_batch=False \r\ndataset = datasets.load_dataset(\"mteb/biosses-sts\", split=\"test\", streaming=True)\r\ndataset = dataset.map(lambda x: data_prepare(x),\r\n                      drop_last_batch=True,\r\n                      batched=True, batch_size=batch_size)\r\nfor ex in dataset:\r\n    print(ex)\r\n    pass\r\n\r\n```\r\n\r\n### Expected behavior\r\n\r\nThe dataset iterates regardless of the batch size.\r\n\r\n### Environment info\r\n\r\n- `datasets` version: 2.21.0\r\n- Platform: Linux-6.1.58+-x86_64-with-glibc2.35\r\n- Python version: 3.10.14\r\n- `huggingface_hub` version: 0.24.5\r\n- PyArrow version: 17.0.0\r\n- Pandas version: 2.2.2\r\n- `fsspec` version: 2024.2.0\r\n",
    "url": "https://github.com/huggingface/datasets/issues/7113",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-20T08:26:40Z",
    "updated_at": "2024-08-26T04:24:11Z",
    "comments": 1,
    "user": "memray"
  },
  {
    "repo": "pytorch/serve",
    "number": 3290,
    "title": "model_yaml_config usage is not explained well enough",
    "body": "### \ud83d\udcda The doc issue\n\n### Expected : \r\nThe [documentation ](https://github.com/pytorch/serve/blob/master/docs/configuration.md#config-model)about `model_yaml_config` sounds as if we could use it as below in `config.properties` and access it later.\r\n\r\n- file name : `config.properties`\r\n- content :\r\n```\r\ninference_address=https://127.0.0.1:8443\r\nmanagement_address=https://127.0.0.1:8444\r\nmetrics_address=https://127.0.0.1:8445\r\nmodel_yaml_config={\\\r\n  \"pippy\": {\\\r\n    \"rpc_timeout\": <some value>\\\r\n  }\\\r\n}\r\n```\r\n\r\nand I can't access the `model_yaml_config` property through `context.model_yaml_config` and actually it throws an error.\r\n\r\n---\r\n\r\n### Reality :\r\n\r\nHowever, the way we could use the property is as below.\r\n- command : `torch-model-archiver --model-name <something> --serialized-file <some path> ... --config-file <yaml file path>`\r\n\r\nand this logic is very confusing when compared with what is written in the documentation\r\n\n\n### Suggest a potential alternative/fix\n\nThe logic seems like when my handler, having inherited `BaseHandler`, doesn't acutally assign `self.model_yaml_config` in its `initialize` [method.](https://github.com/pytorch/serve/blob/ef196c0f1d5f14bb0e01f65b7b21d43c3c143814/ts/torch_handler/base_handler.py#L151) Actually, it is assigned when `Service` is instantiated with `.__init__` [method](https://github.com/pytorch/serve/blob/ef196c0f1d5f14bb0e01f65b7b21d43c3c143814/ts/service.py#L34)\r\n\r\nI suggest either of the two\r\n1. Modify the documentation to use `model_yaml_config` property with `torch-model-archiver --config-file <path>` argument\r\n2. Or modify the code to assign `model_yaml_config` through `config.properties` as it sounds in the current documentation.",
    "url": "https://github.com/pytorch/serve/issues/3290",
    "state": "open",
    "labels": [],
    "created_at": "2024-08-20T00:34:32Z",
    "updated_at": "2024-08-26T18:49:27Z",
    "comments": 1,
    "user": "Foundsheep"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1041,
    "title": "Improve support for and documentation of custom models",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\ntorchchat supports adding models to the \"known_model\" list and has CLI support for local models not hosted in torchchat's, but this can be better documented. \n\n### Alternatives\n\n_No response_\n\n### Additional context\n\nSome PR's Related to this theme:\r\n* https://github.com/pytorch/torchchat/issues/1038 \r\n* https://github.com/pytorch/torchchat/issues/1040\n\n### RFC (Optional)\n\n_No response_",
    "url": "https://github.com/pytorch/torchchat/issues/1041",
    "state": "closed",
    "labels": [
      "documentation",
      "enhancement",
      "Known Gaps",
      "triaged"
    ],
    "created_at": "2024-08-19T16:43:48Z",
    "updated_at": "2025-02-04T18:22:48Z",
    "comments": 1,
    "user": "Jack-Khuu"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9216,
    "title": "I made a pipeline that lets you use any number of models at once",
    "body": "### Model/Pipeline/Scheduler description\n\nHere's how to do it:\r\nfrom rubberDiffusers import StableDiffusionRubberPipeline\r\npipe=StableDiffusionRubberPipeline.from_pretrained(\r\n    \"runwayml/stable-diffusion-v1-5\", torch_dtype=torch.float32,local_files_only=True,safety_checker=None, requires_safety_checker=False,\r\n)\r\n\r\npipe2=StableDiffusionRubberPipeline.from_pretrained(\r\n    \"runwayml/stable-diffusion-v1-5\", torch_dtype=torch.float32,local_files_only=True,safety_checker=None, requires_safety_checker=False,\r\n)\r\n\r\napply_multiModel(pipe)\r\npipe.added_model=[pipe2]\r\nimage=pipe(\"your prompt\",width=512,height=512,pos=[\"0:0-512:512\"],mask_strengths=[.5],model_kwargs=[{prompt=\"your prompt for the first loaded model\"}]).images[0]\r\n\r\n\n\n### Open source status\n\n- [ ] The model implementation is available.\n- [ ] The model weights are available (Only relevant if addition is not a scheduler).\n\n### Provide useful links for the implementation\n\nhttps://github.com/alexblattner/RubberDiffusers",
    "url": "https://github.com/huggingface/diffusers/issues/9216",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2024-08-19T11:46:08Z",
    "updated_at": "2024-09-21T15:03:31Z",
    "comments": 3,
    "user": "alexblattner"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 528,
    "title": "How to train using bfloat16?",
    "body": "Hi! I have a quick question: how to train using bfloat16? I found the default setting using fp32. \r\n\r\nI changed ''data_parallel_degree\"  to 4 (my number of GPUs) but still did not use  bfloat16.\r\n\r\nThanks in advance!",
    "url": "https://github.com/pytorch/torchtitan/issues/528",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-19T07:38:12Z",
    "updated_at": "2024-08-20T13:45:47Z",
    "user": "zyushun"
  },
  {
    "repo": "pytorch/ao",
    "number": 704,
    "title": "Question: How to use Float8InferenceLinear with FSDP1/2? ",
    "body": "Hey Team,\r\n\r\nI'm trying to use FSDP1/2 with Float8InferenceLinear but seems have some issues (with torch 2.3.1+cu118). Do you suggestion to bump to higher version of torch and have a try or maybe use the training setup without using the inference layer? I also tried using the Flont8linear layer without using the quantization function to convert to Float8InferenceLinear but seems face some issues when using FSDP1 that when computing the amax, some input x tensors are empty (x.numel()=0) and some are NaN.\r\n\r\nBest regards,\r\nQQ",
    "url": "https://github.com/pytorch/ao/issues/704",
    "state": "open",
    "labels": [
      "float8",
      "inference"
    ],
    "created_at": "2024-08-19T07:33:07Z",
    "updated_at": "2024-08-26T02:40:18Z",
    "user": "qingquansong"
  },
  {
    "repo": "huggingface/transformers",
    "number": 32873,
    "title": "How to use \u3010examples/pytorch/contrastive-image-text\u3011 to inter  inference",
    "body": "### Feature request\n\nI have reviewed the training code for CLIP and successfully executed it. Now, I want to use the obtained model for inference testing.\r\n\n\n### Motivation\n\nI would like to test the performance of the model I have trained.\r\n\n\n### Your contribution\n\nI hope I can get a example script to inference testing like below script :\r\n\r\npython examples/pytorch/contrastive-image-text/run_clip.py \\\r\n    --output_dir ./clip-roberta-finetuned \\\r\n    --model_name_or_path ./clip-roberta \\\r\n    --data_dir $PWD/data \\\r\n    --dataset_name ydshieh/coco_dataset_script \\\r\n    --dataset_config_name=2017 \\\r\n    --image_column image_path \\\r\n    --caption_column caption \\\r\n    --remove_unused_columns=False \\\r\n    --do_train  --do_eval \\\r\n    --per_device_train_batch_size=\"64\" \\\r\n    --per_device_eval_batch_size=\"64\" \\\r\n    --learning_rate=\"5e-5\" --warmup_steps=\"0\" --weight_decay 0.1 \\\r\n    --overwrite_output_dir \\\r\n    --push_to_hub",
    "url": "https://github.com/huggingface/transformers/issues/32873",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2024-08-19T05:54:54Z",
    "updated_at": "2024-08-19T08:33:50Z",
    "user": "rendaoyuan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3098,
    "title": "\u2753 [Question] When using torch_tensorrt.compile to optimize Mask2Former's multi_scale_deformable_attn layer, an error occurs.",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nI was preparing to export a TRT model for Mask2Former using the command **optimized_model = torch_tensorrt.compile(model, inputs=imgs, enabled_precisions={torch.half})**, where model is a Mask2Former loaded through mmseg.\r\nHowever, I encountered an error at the line **value_l_ = value_list[0].flatten(2).transpose(1, 2).reshape(4 * 8, 32, 16, 16)**:\r\nThe error message was: \r\n`\"Failed running call_method reshape(*(FakeTensor(..., device='cuda:0', size=(1, 256, 256),\r\n           grad_fn=<TransposeBackward0>), 32, 32, 16, 16), **{}):\r\nshape '[32, 32, 16, 16]' is invalid for input of size 65536\"`\r\n\r\nThe original code was **value_l_ = value_list[level].flatten(2).transpose(1, 2).reshape(bs * num_heads, embed_dims, H_, W_)**. Even after fixing all variables with constants, **During training, this can be reshaped normally**, but the above error occurs when using torch_tensorrt.compile.\r\n\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - pytorch:                   2.3.0\r\n - torch_tensorrt:            2.3.0\r\n - OS: ubuntu20:\r\n - mmsegmentation:            1.2.1\r\n\r\n\r\n## Additional context\r\n\r\nThe complete code is as follows:\r\n\r\n```\r\n    value_list = value.split([16*16,32*32,64*64], dim=1)\r\n    value_l_ = value_list[0].flatten(2).transpose(1, 2).reshape(4 * 8, 32, 16, 16)\r\n    sampling_grid_l_ = sampling_grids[:, :, :,0].transpose(1, 2).flatten(0, 1)\r\n    sampling_value_l_ = F.grid_sample(\r\n            value_l_,\r\n            sampling_grid_l_,\r\n            mode='bilinear',\r\n            padding_mode='zeros',\r\n            align_corners=False)\r\n    sampling_value_list.append(sampling_value_l_)\r\n```\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3098",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-19T03:03:03Z",
    "updated_at": "2024-09-24T18:38:56Z",
    "user": "edition3234"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1415,
    "title": "Bad request: Task not found for this model",
    "body": "Hi all,\r\nI am facing the following issue when using HuggingFaceEndpoint for my custom finetuned model in my repository \"Nithish-2001/RAG-29520hd0-1-chat-finetune\" which is public with gradio. \r\n\r\nllm_name:  Nithish-2001/RAG-29520hd0-1-chat-finetune\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_errors.py\", line 304, in hf_raise_for_status\r\n    response.raise_for_status()\r\n  File \"/usr/local/lib/python3.10/dist-packages/requests/models.py\", line 1024, in raise_for_status\r\n    raise HTTPError(http_error_msg, response=self)\r\nrequests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api-inference.huggingface.co/models/Nithish-2001/RAG-29520hd0-1-chat-finetune\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.10/dist-packages/gradio/routes.py\", line 763, in predict\r\n    output = await route_utils.call_process_api(\r\n  File \"/usr/local/lib/python3.10/dist-packages/gradio/route_utils.py\", line 288, in call_process_api\r\n    output = await app.get_blocks().process_api(\r\n  File \"/usr/local/lib/python3.10/dist-packages/gradio/blocks.py\", line 1931, in process_api\r\n    result = await self.call_function(\r\n  File \"/usr/local/lib/python3.10/dist-packages/gradio/blocks.py\", line 1516, in call_function\r\n    prediction = await anyio.to_thread.run_sync(  # type: ignore\r\n  File \"/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py\", line 33, in run_sync\r\n    return await get_asynclib().run_sync_in_worker_thread(\r\n  File \"/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py\", line 877, in run_sync_in_worker_thread\r\n    return await future\r\n  File \"/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py\", line 807, in run\r\n    result = context.run(func, *args)\r\n  File \"/usr/local/lib/python3.10/dist-packages/gradio/utils.py\", line 826, in wrapper\r\n    response = f(*args, **kwargs)\r\n  File \"<ipython-input-7-4e46265a5151>\", line 90, in conversation\r\n    response = qa_chain.invoke({\"question\": message, \"chat_history\": formatted_chat_history})\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/base.py\", line 164, in invoke\r\n    raise e\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/base.py\", line 154, in invoke\r\n    self._call(inputs, run_manager=run_manager)\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/conversational_retrieval/base.py\", line 169, in _call\r\n    answer = self.combine_docs_chain.run(\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain_core/_api/deprecation.py\", line 170, in warning_emitting_wrapper\r\n    return wrapped(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/base.py\", line 603, in run\r\n    return self(kwargs, callbacks=callbacks, tags=tags, metadata=metadata)[\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain_core/_api/deprecation.py\", line 170, in warning_emitting_wrapper\r\n    return wrapped(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/base.py\", line 381, in __call__\r\n    return self.invoke(\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/base.py\", line 164, in invoke\r\n    raise e\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/base.py\", line 154, in invoke\r\n    self._call(inputs, run_manager=run_manager)\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/combine_documents/base.py\", line 138, in _call\r\n    output, extra_return_dict = self.combine_docs(\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/combine_documents/stuff.py\", line 257, in combine_docs\r\n    return self.llm_chain.predict(callbacks=callbacks, **inputs), {}\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/llm.py\", line 316, in predict\r\n    return self(kwargs, callbacks=callbacks)[self.output_key]\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain_core/_api/deprecation.py\", line 170, in warning_emitting_wrapper\r\n    return wrapped(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/base.py\", line 381, in __call__\r\n    return self.invoke(\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/base.py\", line 164, in invoke\r\n    raise e\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/base.py\", line 154, in invoke\r\n    self._call(inputs, run_manager=run_manager)\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/llm.py\", line 126, in _call\r\n    response = self.generate([inputs], run_manager=run_manager)\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain/chains/llm.py\", line 138, in generate\r\n    return self.llm.generate_prompt(\r\n  File \"/usr/local/lib/python3.10/dist-packages/langchain_core/language_models/llms.py\", line 750, in generate_prompt\r\n    return self.generate(prompt_strings, stop=stop, callbacks=callbacks, **kwargs)\r\n  File",
    "url": "https://github.com/huggingface/chat-ui/issues/1415",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-08-18T09:33:10Z",
    "updated_at": "2024-08-25T22:38:00Z",
    "comments": 1,
    "user": "NITHISH-Projects"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3095,
    "title": "\u2753 [Question] Why does the speed (fps) of torch-tensorrt perform so badly in `torch.multiprocessing`?",
    "body": "## \u2753 Question\r\nHello, dear developer:\r\nThank your for your amazing job!\r\nWhy does the speed (fps) of torch-tensorrt perform so badly in `torch.multiprocessing`?\r\nCurrently I use `torch.multiprocessing` to create and run 3 Process (in 1 GPU) of resnet18, resnet50 and resnet101 at the same time. But I find their speeds of inference are worse than single process.\r\nHere is my single process code:\r\n```\r\n# single process\r\nimport time\r\n\r\nimport torch\r\nimport tensorrt\r\nimport torch_tensorrt\r\nfrom torchvision.models import resnet18, resnet50, resnet101\r\nif __name__ == '__main__':\r\n    # --------------------------------ResNet18---------------------------------------\r\n    model0 = torch.jit.load(\"res18_trt_fp16.ts\")\r\n    inputs = [torch.randn((10, 3, 224, 224)).half().cuda()]\r\n    print(\"Warm up ...\")\r\n    with torch.no_grad():\r\n        for _ in range(10):\r\n            features = model0(*inputs)\r\n    torch.cuda.synchronize()\r\n    t0 = time.time()\r\n    with torch.no_grad():\r\n        _ = model0(*inputs)\r\n    torch.cuda.synchronize()\r\n    t1 = time.time()\r\n    print('res18: ', (t1 - t0) * 1000, 'ms')\r\n\r\n    # --------------------------------ResNet50---------------------------------------\r\n    model1 = torch.jit.load(\"res50_trt_fp16.ts\")\r\n    inputs = [torch.randn((10, 3, 224, 224)).half().cuda()]\r\n    print(\"Warm up ...\")\r\n    with torch.no_grad():\r\n        for _ in range(10):\r\n            features = model1(*inputs)\r\n    torch.cuda.synchronize()\r\n    t0 = time.time()\r\n    with torch.no_grad():\r\n        _ = model1(*inputs)\r\n    torch.cuda.synchronize()\r\n    t1 = time.time()\r\n    print('res50: ', (t1 - t0) * 1000, 'ms')\r\n\r\n    # --------------------------------ResNet101--------------------------------------\r\n    model2 = torch.jit.load(\"res101_trt_fp16.ts\")\r\n    inputs = [torch.randn((10, 3, 224, 224)).half().cuda()]\r\n\r\n    with torch.no_grad():\r\n        for _ in range(10):\r\n            features = model2(*inputs)\r\n\r\n    torch.cuda.synchronize()\r\n    t0 = time.time()\r\n    with torch.no_grad():\r\n        res = model2(*inputs)\r\n    torch.cuda.synchronize()\r\n    t1 = time.time()\r\n    print('res101: ', (t1 - t0) * 1000, 'ms')\r\n```\r\nThe results are:\r\n```\r\nres18: 1.2104511260986328 ms\r\nres50: 2.7513504028320312 ms\r\nres101: 5.034923553466797 ms\r\n```\r\n\r\nAnd here is my multiprocessing code\r\n```\r\n# multiprocess\r\nimport pycuda.driver as cuda\r\nimport pycuda.autoinit\r\n\r\nimport os\r\nimport time\r\nimport numpy as np\r\n\r\nimport torch\r\nimport torch.multiprocessing as mp\r\nimport torch_tensorrt\r\n\r\ndef Worker1():\r\n    print('Worker1 PID:', os.getpid())\r\n    net = torch.jit.load(\"res18_trt_fp16.ts\")\r\n    x = torch.randn(10, 3, 224, 224).half().cuda()\r\n\r\n    for i in range(10):\r\n        _ = net(x)\r\n\r\n    with torch.no_grad():\r\n        while True:\r\n            # infer\r\n            torch.cuda.synchronize()\r\n            t0 = time.time()\r\n\r\n            results = net(x)\r\n\r\n            torch.cuda.synchronize()\r\n            t1 = time.time()\r\n            print('Res18', (t1 - t0) * 1000, 'ms')\r\n\r\ndef Worker2():\r\n    print('Worker2 PID:', os.getpid())\r\n    net = torch.jit.load(\"res50_trt_fp16.ts\")\r\n    x = torch.randn(10, 3, 224, 224).half().cuda()\r\n\r\n    for i in range(10):\r\n        _ = net(x)\r\n\r\n    with torch.no_grad():\r\n        while True:\r\n            # infer\r\n            torch.cuda.synchronize()\r\n            t0 = time.time()\r\n\r\n            results = net(x)\r\n\r\n            torch.cuda.synchronize()\r\n            t1 = time.time()\r\n            print('Res50', (t1 - t0) * 1000, 'ms')\r\n\r\n\r\ndef Worker3():\r\n    print('Worker3 PID:', os.getpid())\r\n    net = torch.jit.load(\"res101_trt_fp16.ts\")\r\n    x = torch.randn(10, 3, 224, 224).half().cuda()\r\n\r\n    for i in range(10):\r\n        _ = net(x)\r\n\r\n    with torch.no_grad():\r\n        while True:\r\n            # infer\r\n            torch.cuda.synchronize()\r\n            t0 = time.time()\r\n\r\n            results = net(x)\r\n\r\n            torch.cuda.synchronize()\r\n            t1 = time.time()\r\n            print('Res101', (t1 - t0) * 1000, 'ms')\r\n\r\n\r\n\r\nif __name__ == '__main__':\r\n    mp.set_start_method('spawn', force=True)\r\n\r\n    # create\r\n    processes = [\r\n        mp.Process(target=Worker1, args=()),\r\n        mp.Process(target=Worker2, args=()),\r\n        mp.Process(target=Worker3, args=()),\r\n    ]\r\n\r\n    # start\r\n    for p in processes:\r\n        p.start()\r\n\r\n    # main loop\r\n    while True:\r\n        continue\r\n```\r\nBUT the results are (average):\r\n```\r\nRes18: 5.539894104003906 ms\r\nRes50: 7.973670959472656 ms\r\nRes101:13.53001594543457 ms\r\n```\r\nThe results of multiprocessing are so wired. They are much slower than single process, which confuses me a lot.\r\nIs there any way to fix them up or speed them up?\r\nThank you in advance!\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.3.0 stable\r\n - PyTorch-Tensorrt Version (e.g., 1.0): 2.3.0\r\n - Tensorrt Version (e.g., 1.0): 10.0.1\r\n - CPU Architecture: x64\r\n - OS (e.g., Linux): ubuntu 22.04\r\n - How y",
    "url": "https://github.com/pytorch/TensorRT/issues/3095",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-17T08:32:46Z",
    "updated_at": "2025-04-15T13:54:47Z",
    "user": "zhongqiu1245"
  },
  {
    "repo": "pytorch/torchx",
    "number": 945,
    "title": "Using torchx as a SDK",
    "body": "## \u2753 Questions and Help\r\n\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nBefore submitting, please ensure you have gone through our\r\n[documentation](https://pytorch.org/torchx).\r\n\r\n\r\n### Question\r\nThe examples on the documentation refer to using torchx via the cli implementation. I was wondering if there was any way that torchx can be used in a sdk format. For instance:\r\n```\r\nclass MyCustomComponent\r\n\r\nclass MyScheduler\r\n\r\nrunner = torchx.runner()\r\nrunner.with_scheduler(MyScheduler())\r\nrunner.run_component(MyCustomComponent())\r\n```\r\nIf its possible, is there any documentation or a sample project that provides an example of how this can be used, in particular using a custom scheduler and component? \r\n\r\nThank You!",
    "url": "https://github.com/meta-pytorch/torchx/issues/945",
    "state": "open",
    "labels": [],
    "created_at": "2024-08-17T03:21:30Z",
    "updated_at": "2024-08-19T14:18:45Z",
    "comments": 1,
    "user": "juinquok"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2893,
    "title": "how to finetune sentence-transformers with unsupervised methods?",
    "body": "how to finetune sentence-transformers with unsupervised methods? for semantic search",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2893",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-17T02:32:09Z",
    "updated_at": "2024-08-18T02:51:29Z",
    "user": "keyuchen21"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9205,
    "title": "Can we pass output_attentions=True to DiT model such as pixart to get attention output?",
    "body": "Can we pass output_attentions=True to DiT model such as pixart to get attention output? Like using output_attentions=True in transformer?",
    "url": "https://github.com/huggingface/diffusers/issues/9205",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2024-08-16T17:26:14Z",
    "updated_at": "2024-09-16T15:02:42Z",
    "comments": 1,
    "user": "foreverpiano"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 266,
    "title": "How to look into the processed data?",
    "body": "Hi,\r\n\r\nAfter running `tokenize_from_hf_to_s3.py`, I would like to inspect the resulting data. But I find that the current data is in a binary file (`.ds`). is there a way to allow me to look into the data?\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/datatrove/issues/266",
    "state": "open",
    "labels": [],
    "created_at": "2024-08-16T16:54:45Z",
    "updated_at": "2024-08-29T15:26:35Z",
    "user": "shizhediao"
  },
  {
    "repo": "huggingface/trl",
    "number": 1934,
    "title": "How to Save the PPOTrainer?",
    "body": "The previous issue for this question https://github.com/huggingface/trl/issues/1643#issue-2294886330 is closed but remained unanswered. If I do `ppo_trainer.save_pretrained('path/to/a/folder')` and then `ppo_trainer.from_pretrained('path/to/that/folder')`, I get this error:\r\n\r\nValueError: tokenizer must be a PreTrainedTokenizerBase like a PreTrainedTokenizer or a PreTrainedTokenizerFast, got <class 'NoneType'>\r\n\r\nIt seems that the `PPOTrainer` object does not implement the two functions from `huggingface_hub.PyTorchModelHubMixin`. How should I save my trainer then?",
    "url": "https://github.com/huggingface/trl/issues/1934",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-16T09:41:39Z",
    "updated_at": "2024-10-07T14:57:51Z",
    "user": "ThisGuyIsNotAJumpingBear"
  },
  {
    "repo": "huggingface/parler-tts",
    "number": 109,
    "title": "How many epoch of training did you do? What is the accuracy?",
    "body": "How many epoch of training did you do? What is the accuracy?",
    "url": "https://github.com/huggingface/parler-tts/issues/109",
    "state": "open",
    "labels": [],
    "created_at": "2024-08-16T09:35:31Z",
    "updated_at": "2024-08-16T09:35:31Z",
    "user": "xuezhongfei2008"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1038,
    "title": "How to deploy a new model by torchchat?",
    "body": "I want to use torchchat to load the trained model directly from the local. How to change the torchchat/config/data/models.json? Need to change download _ and _ convert in download.py?And, what other documents may need to be changed?",
    "url": "https://github.com/pytorch/torchchat/issues/1038",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-16T09:33:29Z",
    "updated_at": "2024-08-19T18:24:37Z",
    "user": "liu8060"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9195,
    "title": "Problem with Flux Schnell bfloat16 multiGPU",
    "body": "### Describe the bug\r\n\r\nHello! I set device_map='balanced' and get images generated in 2.5 minutes (expected in 12-20 seconds), while in pipe.hf_device_map it shows that the devices are distributed like this:\r\n```\r\n{\r\n \"transformer\": \"cuda:0\",\r\n \"text_encoder_2\": \"cuda:2\",\r\n \"text_encoder\": \"cuda:0\",\r\n \"vae\": \"cuda:1\"\r\n                }\r\n```\r\nI have 3 video cards 3090 Ti 24 GB and I can\u2019t run it on them.\r\n\r\nI also tried this way:\r\n            pipe.transformer.to('cuda:2')\r\n            pipe.text_encoder.to('cuda:2')\r\n            pipe.text_encoder_2.to('cuda:1')\r\n            pipe.vae.to('cuda:0')\r\n\r\nWhat is the best way to launch it so that generation occurs on the GPU and quickly?\r\n\r\n### Reproduction\r\n```python\r\n            pipe = FluxPipeline.from_pretrained(\r\n                path_chkpt,\r\n                torch_dtype=torch.bfloat16,\r\n                device_map='balanced',\r\n            )\r\n```\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\nubuntu 22.04 3 GPU: 3090 TI 24 GB\r\n\r\naccelerate==0.30.1\r\naddict==2.4.0\r\napscheduler==3.9.1\r\nautocorrect==2.5.0\r\nchardet==4.0.0\r\ncryptography==37.0.2\r\ncurl_cffi\r\ndiffusers==0.30.0\r\nbeautifulsoup4==4.11.2\r\neinops\r\nfacexlib>=0.2.5\r\nfastapi==0.92.0\r\nhidiffusion==0.1.6\r\ninvisible-watermark>=0.2.0\r\nnumpy==1.24.3\r\nopencv-python==4.8.0.74\r\npandas==2.0.3\r\npycocotools==2.0.6\r\npymystem3==0.2.0\r\npyyaml==6.0\r\npyjwt==2.6.0\r\npython-multipart==0.0.5\r\npytrends==4.9.1\r\npsycopg2-binary\r\nrealesrgan==0.3.0\r\nredis==4.5.1\r\nsacremoses==0.0.53\r\nselenium==4.2.0\r\nsentencepiece==0.1.97\r\nscipy==1.10.1\r\nscikit-learn==0.24.1\r\nsupervision==0.16.0\r\ntb-nightly==2.14.0a20230629\r\ntensorboard>=2.13.0\r\ntomesd\r\ntransformers==4.40.1\r\ntimm==0.9.16\r\nyapf==0.32.0\r\nuvicorn==0.20.0\r\n\r\nspacy==3.7.2\r\nnest_asyncio==1.5.8\r\nhttpx==0.25.0\r\n\r\ntorchvision==0.15.2\r\n\r\ninsightface==0.7.3\r\npsutil==5.9.6\r\ntk==0.1.0\r\ncustomtkinter==5.2.1\r\ntensorflow==2.13.0\r\nopennsfw2==0.10.2\r\nprotobuf==4.24.4\r\ngfpgan==1.3.8\r\n\r\n### Who can help?\r\n\r\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9195",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-16T06:30:54Z",
    "updated_at": "2025-12-05T06:38:14Z",
    "comments": 26,
    "user": "OlegRuban-ai"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3092,
    "title": "\u2753 [Question] Is there any way to deploy on a single machine with multi-gpus\uff1f",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture:\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\nAs the title, I have a machine with multiple GPUs and I would like to know if there is any way to evenly distribute the model across these GPUs. Is there any way to achieve this?\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3092",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-16T02:01:21Z",
    "updated_at": "2024-08-16T17:58:02Z",
    "user": "SZ-ing"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 133643,
    "title": "How to Manage CPU Memory Usage in PyTorch After Moving Model to CPU?",
    "body": "### \ud83d\udcda The doc issue\n\nHi everyone,\r\n\r\nI'm currently working on a deep learning project using PyTorch, and I've run into some issues with managing CPU memory after transferring a model to the GPU.\r\n\r\nIn specific, I'm loading a pre-trained model using PyTorch, then moving the model to the GPU. However, I've noticed that after moving the model to the GPU, the CPU memory usage doesn't decrease as much as I expected.\r\n\r\nI used 'memory_profiler' to analyze memory usage, and here's what I found:\r\n\r\nBefore moving to GPU: The model uses a significant amount of CPU memory during the loading and preparation stages.\r\n\r\nAfter moving to GPU: The memory usage on the CPU doesn't drop much. It seems like some data or buffers might still be retained in CPU memory.\r\n\r\nI've tried deleting references to the model on CPU using 'del' and forced garbage collection using 'gc.collect()' but this doesn't seem to affect the memory.\r\n\r\nSo is that because PyTorch inherently keep some CPU memory for caching or other purposes? Is it possible to fully release the CPU memory after moving a model to GPU in PyTorch?\r\n\r\nI would appreciate any insights or advice on how to better manage CPU memory in this context. Thanks in advance for your help!Hi everyone,\r\n\r\nI'm currently working on a deep learning project using PyTorch, and I've run into some issues with managing CPU memory after transferring a model to the GPU.\r\n\r\nIn specific, I'm loading a pre-trained model using PyTorch, then moving the model to the GPU. However, I've noticed that after moving the model to the GPU, the CPU memory usage doesn't decrease as much as I expected.\r\n\r\nI used **'memory_profiler'** to analyze memory usage, and here's what I found:\r\n\r\nBefore moving to GPU: The model uses a significant amount of CPU memory during the loading and preparation stages.\r\n\r\nAfter moving to GPU: The memory usage on the CPU doesn't drop much. It seems like some data or buffers might still be retained in CPU memory.\r\n\r\nI've tried deleting references to the model on CPU using **'del'** and forced garbage collection using **'gc.collect()'** but this doesn't seem to affect the memory.\r\n\r\nSo is that because PyTorch inherently keep some CPU memory for caching or other purposes? Is it possible to fully release the CPU memory after moving a model to GPU in PyTorch?\r\n\r\nI would appreciate any insights or advice on how to better manage CPU memory in this context. Thanks in advance for your help!\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/133643",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-15T23:23:15Z",
    "updated_at": "2024-08-16T20:43:11Z",
    "user": "prisnguyen"
  },
  {
    "repo": "pytorch/xla",
    "number": 7858,
    "title": "[Bug] Notebook `Stable Diffusion with PyTorch/XLA 2.0` is outdated",
    "body": "## \ud83d\udc1b Bug\r\n\r\nOfficial Notebook `Stable Diffusion with PyTorch/XLA 2.0` is outdated\r\n\r\n## To Reproduce:\r\nRun [Stable Diffusion with PyTorch/XLA 2.0 Notebook](https://github.com/pytorch/xla/blob/master/contrib/kaggle/pytorch-xla-2-0-on-kaggle.ipynb) on Kaggle TPU VM v3-8\r\n\r\n## Environment\r\nKaggle TPU VM v3-8\r\n\r\n## Expected behavior\r\nGenerate and show image.\r\n\r\n## Error:\r\n```shel\r\nFutureWarning: `callback` is deprecated and will be removed in version 1.0.0. Passing `callback` as an input argument to `__call__` is deprecated, consider using `callback_on_step_end`\r\n  deprecate(\r\n  2%|\u258f         | 1/50 [00:00<00:32,  1.51it/s]\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\nCell In[8], line 4\r\n      1 generator = torch.Generator().manual_seed(0)\r\n      2 # xm.mark_step compiles and executes the graph after each iteration.\r\n      3 # The first few steps will be much slower than the rest.\r\n----> 4 image = pipeline(prompt, callback=lambda *args: xm.mark_step(), generator=generator).images[0]\r\n      5 image\r\n\r\nFile /usr/local/lib/python3.10/site-packages/torch/utils/_contextlib.py:115, in context_decorator.<locals>.decorate_context(*args, **kwargs)\r\n    112 @functools.wraps(func)\r\n    113 def decorate_context(*args, **kwargs):\r\n    114     with ctx_factory():\r\n--> 115         return func(*args, **kwargs)\r\n\r\nFile /usr/local/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py:1041, in StableDiffusionPipeline.__call__(self, prompt, height, width, num_inference_steps, timesteps, sigmas, guidance_scale, negative_prompt, num_images_per_prompt, eta, generator, latents, prompt_embeds, negative_prompt_embeds, ip_adapter_image, ip_adapter_image_embeds, output_type, return_dict, cross_attention_kwargs, guidance_rescale, clip_skip, callback_on_step_end, callback_on_step_end_tensor_inputs, **kwargs)\r\n   1039 if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):\r\n   1040     progress_bar.update()\r\n-> 1041     if callback is not None and i % callback_steps == 0:\r\n   1042         step_idx = i // getattr(self.scheduler, \"order\", 1)\r\n   1043         callback(step_idx, t, latents)\r\n\r\nTypeError: unsupported operand type(s) for %: 'int' and 'NoneType'\r\n```",
    "url": "https://github.com/pytorch/xla/issues/7858",
    "state": "open",
    "labels": [
      "bug",
      "documentation",
      "xla:tpu"
    ],
    "created_at": "2024-08-15T11:21:01Z",
    "updated_at": "2025-05-02T23:15:34Z",
    "comments": 2,
    "user": "steveepreston"
  },
  {
    "repo": "pytorch/xla",
    "number": 7857,
    "title": "Why do the communication in my spmd training have control-predecessors",
    "body": "## \u2753 Questions and Help\r\nIn my formal training task, there are some control-predecessors in the communication operator, but the single test I constructed cannot reproduce this situation. I would like to know under what circumstances these control-predecessors can be generated.\r\n```\r\nall-gather-start.12 = (f32[256]{0}, f32[4096]{0}) all-gather-start(param.639.0), channel_id=25, replica_groups={{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}}, dimensions={0}, use_global_device_ids=true, control-predecessors={all-gather-done.11}, metadata={op_type=\"aten__add\" op_name=\"train_loop.1/aten__add.123/aten__add\" source_file=\"/opt/conda/lib/python3.8/site-packages/torch/nn/modules/linear.py\" source_line=118}, backend_config={\"operation_queue_id\":\"0\",\"wait_on_operation_queues\":[],\"collective_backend_config\":{\"is_sync\":false,\"no_parallel_custom_call\":false},\"force_earliest_schedule\":false}\r\nall-gather-done.12 = f32[4096]{0} all-gather-done(all-gather-start.12), metadata={op_type=\"aten__add\" op_name=\"train_loop.1/aten__add.123/aten__add\" source_file=\"/opt/conda/lib/python3.8/site-packages/torch/nn/modules/linear.py\" source_line=118}\r\nall-gather-start.13 = (f32[256]{0}, f32[4096]{0}) all-gather-start(param.640.0), channel_id=26, replica_groups={{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}}, dimensions={0}, use_global_device_ids=true, control-predecessors={all-gather-done.12}, metadata={op_type=\"aten__mul\" op_name=\"train_loop.1/aten__mul.126/aten__mul\" source_file=\"/opt/conda/lib/python3.8/site-packages/torch/nn/modules/normalization.py\" source_line=205}, backend_config={\"operation_queue_id\":\"0\",\"wait_on_operation_queues\":[],\"collective_backend_config\":{\"is_sync\":false,\"no_parallel_custom_call\":false},\"force_earliest_schedule\":false}\r\nall-gather-done.13 = f32[4096]{0} all-gather-done(all-gather-start.13), metadata={op_type=\"aten__mul\" op_name=\"train_loop.1/aten__mul.126/aten__mul\" source_file=\"/opt/conda/lib/python3.8/site-packages/torch/nn/modules/normalization.py\" source_line=205}\r\n```",
    "url": "https://github.com/pytorch/xla/issues/7857",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2024-08-15T11:17:08Z",
    "updated_at": "2025-04-01T12:33:52Z",
    "user": "mars1248"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9184,
    "title": "What is the correct way to apply the dictionary with the control strengths (called \u201cscales\u201d) but with blocks?",
    "body": "### Describe the bug\n\nI have managed to apply the basic dictionary. as the documentation mentions\r\n\r\n```\r\nadapter_weight_scales = { \"unet\": { \"down\": 1, \"mid\": 0, \"up\": 0} }\r\npipe.set_adapters(\"Lora1\", adapter_weight_scales)\r\n```\r\n\r\nand it already works for N number of LORAS that I want to load, for example\r\n\r\n```\r\nadapter_weight_scales_1 = { \"unet\": { \"down\": 0.5, \"mid\": 0, \"up\": 0} }\r\nadapter_weight_scales_2 = { \"unet\": { \"down\": 0, \"mid\": 0, \"up\": 0.5} }\r\npipe.set_adapters([\"Lora1\", \"Lora2\"], [adapter_weight_scales_1, adapter_weight_scales_2])\r\n\r\n```\r\nit works for me correctly, and I get very good results in my images\r\n\r\n\n\n### Reproduction\n\nNow I'm trying to apply the scaling dictionary to  LORA but with blocks, for example:\r\n\r\n```\r\nadapter_weight_scales_blocks_1 = {\r\n        'unet': {\r\n            'down': {\r\n                'block_0': [0.2, 0.5], \r\n                'block_1': [0.5, 0.2]}, \r\n            'mid': {\r\n                'block_0': [0.2, 0.5], \r\n                'block_1': [0.5, 0.2]}, \r\n            'up': {\r\n                'block_0': [0.2, 0.5], \r\n                'block_1': [0.5, 0.5, 0.2]\r\n            }\r\n        }\r\n    }\r\n\r\n adapter_weight_scales_blocks_2 = {\r\n        'unet': {\r\n            'down': {\r\n                'block_0': [0.5, 0.5], \r\n                'block_1': [0.5, 0.5]}, \r\n            'mid': {\r\n                'block_0': [0.5, 0.5], \r\n                'block_1': [0.5, 0.5]}, \r\n            'up': {\r\n                'block_0': [0.5, 0.5], \r\n                'block_1': [0.5, 0.5, 0.5]\r\n            }\r\n        }\r\n    }\r\n\r\n\r\npipe.set_adapters([\"Lora1\", \"Lora2\"], [ adapter_weight_scales_blocks_1,  adapter_weight_scales_blocks_2])\r\n```\r\n\n\n### Logs\n\n```shell\nbut an error like this is getting me:\r\n\r\n\r\n\r\n/usr/local/lib/python3.10/dist-packages/diffusers/loaders/lora_base.py in set_adapters(self, adapter_names, adapter_weights)\r\n    571 \r\n    572             if issubclass(model.__class__, ModelMixin):\r\n--> 573                 model.set_adapters(adapter_names, _component_adapter_weights[component])\r\n    574             elif issubclass(model.__class__, PreTrainedModel):\r\n    575                 set_adapters_for_text_encoder(adapter_names, model, _component_adapter_weights[component])\r\n\r\n/usr/local/lib/python3.10/dist-packages/diffusers/loaders/peft.py in set_adapters(self, adapter_names, weights)\r\n    107         weights = scale_expansion_fn(self, weights)\r\n    108 \r\n--> 109         set_weights_and_activate_adapters(self, adapter_names, weights)\r\n    110 \r\n    111     def add_adapter(self, adapter_config, adapter_name: str = \"default\") -> None:\r\n\r\n/usr/local/lib/python3.10/dist-packages/diffusers/utils/peft_utils.py in set_weights_and_activate_adapters(model, adapter_names, weights)\r\n    264                 else:\r\n    265                     module.active_adapter = adapter_name\r\n--> 266                 module.set_scale(adapter_name, get_module_weight(weight, module_name))\r\n    267 \r\n    268     # set multiple active adapters\r\n\r\n/usr/local/lib/python3.10/dist-packages/peft/tuners/lora/layer.py in set_scale(self, adapter, scale)\r\n    278             # Ignore the case where the adapter is not in the layer\r\n    279             return\r\n--> 280         self.scaling[adapter] = scale * self.lora_alpha[adapter] / self.r[adapter]\r\n    281 \r\n    282     def scale_layer(self, scale: float) -> None:\r\n\r\nTypeError: unsupported operand type(s) for *: 'dict' and 'float'``\r\n```\r\n\r\n\r\nWhat would be the correct way to do it?\n```\n\n\n### System Info\n\nSystem Info\r\nI am using google colab,\r\ndiffusers version: 0.30.0\r\nPython version: 3.10.\r\n\n\n### Who can help?\n\nDiffuser masters can help me understand how to use that feature: @sayakpaul, @yiyixuxu @asomoza",
    "url": "https://github.com/huggingface/diffusers/issues/9184",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-15T06:05:42Z",
    "updated_at": "2024-08-17T00:54:28Z",
    "user": "Eduardishion"
  },
  {
    "repo": "pytorch/xla",
    "number": 7855,
    "title": "How to sync TPUs when using a pod with more than 1 VM in SPMD",
    "body": "## \u2753 Questions and Help\r\n\r\nGenerally we feel that since in SPMD most of the work is under the hood its hard to understand what is required from us when using it in order to sync between TPUs on a pod with multiple VMs.\r\n\r\nWe would like to know the stages of syncing in that case, and how is it different from the regular syncing required on TPUs (a list of stages by name will be nice).\r\nSpecifically, If all the VMs run the same command and they all work as they are run alone (global index 0, global count 1) who should log the loss? should we use torch.distributed.get_rank() == 0 to determine the \"master\" for logging? @JackCaoG ",
    "url": "https://github.com/pytorch/xla/issues/7855",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2024-08-14T18:51:04Z",
    "updated_at": "2025-04-01T12:35:29Z",
    "user": "dudulightricks"
  },
  {
    "repo": "pytorch/xla",
    "number": 7854,
    "title": "Using mark_sharding vs. MpDeviceLoader with input_sharding=xs.ShardingSpec",
    "body": "## \u2753 Questions and Help\r\nIf we have a few tensors in a batch with different sizes and we use mark_sharding on each of them, we lose something comparing to input_sharding=xs.ShardingSpec in the MpDeviceLoader (which only works for a single size of tensor in the batch)? @JackCaoG ",
    "url": "https://github.com/pytorch/xla/issues/7854",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2024-08-14T18:41:34Z",
    "updated_at": "2025-04-01T12:36:56Z",
    "user": "dudulightricks"
  },
  {
    "repo": "pytorch/xla",
    "number": 7850,
    "title": "SPMD - how to use different dataloader on each VM of a TPU pod in SPMD",
    "body": "## \u2753 Questions and Help\r\nWhile in SPMD mode If we run the train command of a model on all the VMs together (single program multiple machines) each VM has its own dataloader using cpu cores. \r\nThen, when we use mark_sharding on the batch its practically copy the batch of the first VM (rank 0) to all the TPUs and ignore the batches of other VMs (which were loaded with different dataloaders).\r\nIn order to solve that (use all the dataloaders on the different VMs to load different data and use it all) we have added torch.distributed.all_gather_object on the batch object to get one huge batch before using mark_sharding.\r\nThe problem is that in this case we afraid that the huge batch is held in the memory of one VM before the sharding. The ideal solution for us would have been something like batch.mark_sharding(gather_all=True) in which instead of ignoring the different batches on all the VMs it will gather them all together logically and use mark_sharding on the result huge batch (which is practically splited over the TPUs). This way we will use all the loaded data without exploding the memory of the first VM. \r\nIs there anything like that command? How can we use the data loaded in all the dataloaders on the different VMs? In our case its important because the data is large and it takes time to load it. @JackCaoG ",
    "url": "https://github.com/pytorch/xla/issues/7850",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2024-08-14T17:50:09Z",
    "updated_at": "2025-04-01T12:41:07Z",
    "user": "dudulightricks"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9180,
    "title": "Pipeline has no attribute '_execution_device'",
    "body": "### Describe the bug\r\n\r\nHello, I implemented my own custom pipeline referring StableDiffusionPipeline (RepDiffusionPipeline), but there are some issues\r\nI called \"accelerator.prepare\" properly, and mapped the models on device (with \"to.(accelerator.device)\")\r\nBut when I call pipeline and the '__call__' function is called, sometimes I met the error \r\nIt is not only problem in using multi-gpu, it occurs when I use single gpu. \r\nFor example, I defined my pipeline for my validation in training code like this: \r\n```python\r\nval_pipe = RepDiffusionPipeline.from_pretrained(\r\n                        \"runwayml/stable-diffusion-v1-5\",\r\n                        unet=accelerator.unwrap_model(unet),\r\n                        rep_encoder=accelerator.unwrap_model(rep_encoder),\r\n                        vae=accelerator.unwrap_model(vae),\r\n                        revision=None, variant=None, torch_dtype=weight_dtype, safety_checker=None\r\n                    ).to(accelerator.device)\r\n```\r\n then, when I called 'val_pipe' like this: \r\n```\r\nmodel_pred = val_pipe(\r\n                                        image = condition_original_image if args.val_mask_op else data[\"original_images\"],\r\n                                        representation = representation,\r\n                                        prompt = \"\",\r\n                                        num_inference_steps = 20,\r\n                                        image_guidance_scale = 1.5,\r\n                                        guidance_scale = scale,\r\n                                        generator = generator\r\n                                    ).images[0]\r\n```                                    \r\n                                    \r\nAt that time, the error \"RepDiffusionPipeline has no attribute '_execution_device'\" occurs. (Not always, just randomly)\r\nHow can I solve this issue, or what part of my code can be doubted and fixed?\r\nThank you for reading:)\r\n\r\n### Reproduction\r\n\r\nIt occurs randomly, so there is no option to reproduce... \r\n\r\nBut when I call the defined pipeline, it occurs randomly. \r\n\r\n### Logs\r\n\r\n```shell\r\nRepDiffusionPipeline has no attribute '_execution_device'\r\n```\r\n\r\n\r\n### System Info\r\n\r\nI tried to test in various diffusers & python versions, but the problem still occurs. \r\nIn now, I am running my code in diffusers 0.27.2, python 3.10.14. \r\n\r\nWARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:\r\n    PyTorch 2.2.2+cu121 with CUDA 1201 (you have 2.2.2+cu118)\r\n    Python  3.10.14 (you have 3.10.14)\r\n  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)\r\n  Memory-efficient attention, SwiGLU, sparse and more won't be available.\r\n  Set XFORMERS_MORE_DETAILS=1 for more details\r\n\r\nCopy-and-paste the text below in your GitHub issue and FILL OUT the two last points.\r\n\r\n- `diffusers` version: 0.27.2\r\n- Platform: Linux-5.4.0-132-generic-x86_64-with-glibc2.31\r\n- Python version: 3.10.14\r\n- PyTorch version (GPU?): 2.2.2+cu118 (True)\r\n- Huggingface_hub version: 0.24.3\r\n- Transformers version: 4.43.3\r\n- Accelerate version: 0.33.0\r\n- xFormers version: 0.0.25.post1\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\r\n\r\n### Who can help?\r\n\r\n@sayakpaul @yiyixuxu ",
    "url": "https://github.com/huggingface/diffusers/issues/9180",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-08-14T14:43:15Z",
    "updated_at": "2025-11-18T13:22:52Z",
    "comments": 33,
    "user": "choidaedae"
  },
  {
    "repo": "pytorch/vision",
    "number": 8588,
    "title": "size mismatch for rpn",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI created a Mask R-CNN model using a set of parameters that I saved in a JSON file. Once the model was trained, I saved the weights using `torch.save(model.state_dict(), \"MaskRCNN.pt\")`. Later, I recreated the same model and loaded the saved weights `model.load_state_dict(torch.load(\"MaskRCNN.pt\", map_location=Device))`.\r\n\r\nOn my laptop (MacBook Pro M2) using Torch 2.2.2, TorchVision 0.17.2 (most up to date for this environment), and CPU only, everything works just fine.\r\n\r\nHowever, on a cluster based on Centos with Torch 2.4, TorchVision 0.19 (most up to date for this environment), and Cuda 12.1.1, I get the following error when loading the weights:\r\n\r\n      File \"/home/XXX//MaskRCNN.py\", line 84, in Load\r\n          model.load_state_dict(torch.load(WeightsPath, map_location=Device))\r\n        File \"/home/XXX/torch/nn/modules/module.py\", line 2215, in load_state_dict\r\n          raise RuntimeError('Error(s) in loading state_dict for {}:\\n\\t{}'.format(\r\n      RuntimeError: Error(s) in loading state_dict for MaskRCNN:\r\n      \tsize mismatch for rpn.head.cls_logits.weight: copying a param with shape torch.Size([6, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([14, 256, 1, 1]).\r\n      \tsize mismatch for rpn.head.cls_logits.bias: copying a param with shape torch.Size([6]) from checkpoint, the shape in current model is torch.Size([14]).\r\n      \tsize mismatch for rpn.head.bbox_pred.weight: copying a param with shape torch.Size([24, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([56, 256, 1, 1]).\r\n      \tsize mismatch for rpn.head.bbox_pred.bias: copying a param with shape torch.Size([24]) from checkpoint, the shape in current model is torch.Size([56]).\r\n\r\nThe code is exactly the same on my laptop and on the cluster.\r\nI double checked, and I used exactly the same parameters to create  ALL the models.\r\n\r\nHow can I fix this?\r\n\r\n\r\n### Versions\r\n\r\nCollecting environment information...\r\nPyTorch version: 2.4.0+cu121\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: CentOS Linux release 7.9.2009 (Core) (x86_64)\r\nGCC version: (GCC) 13.2.0\r\nClang version: Could not collect\r\nCMake version: version 2.8.12.2\r\nLibc version: glibc-2.17\r\n\r\nPython version: 3.11.9 (main, Apr 19 2024, 16:48:06) [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-3.10.0-957.10.1.el7.x86_64-x86_64-with-glibc2.17\r\nIs CUDA available: True\r\nCUDA runtime version: 12.1.105\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: \r\nGPU 0: Tesla V100-SXM2-32GB\r\nGPU 1: Tesla V100-SXM2-32GB\r\nGPU 2: Tesla V100-SXM2-32GB\r\nGPU 3: Tesla V100-SXM2-32GB\r\nGPU 4: Tesla V100-SXM2-32GB\r\nGPU 5: Tesla V100-SXM2-32GB\r\nGPU 6: Tesla V100-SXM2-32GB\r\nGPU 7: Tesla V100-SXM2-32GB\r\n\r\nNvidia driver version: 550.90.07\r\ncuDNN version: Probably one of the following:\r\n/usr/local/cuda-9.1/targets/x86_64-linux/lib/libcudnn.so.7.0.5\r\n/usr/local/cuda-9.2/targets/x86_64-linux/lib/libcudnn.so.7.2.1\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:          x86_64\r\nCPU op-mode(s):        32-bit, 64-bit\r\nByte Order:            Little Endian\r\nCPU(s):                80\r\nOn-line CPU(s) list:   0-79\r\nThread(s) per core:    2\r\nCore(s) per socket:    20\r\nSocket(s):             2\r\nNUMA node(s):          2\r\nVendor ID:             GenuineIntel\r\nCPU family:            6\r\nModel:                 85\r\nModel name:            Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz\r\nStepping:              4\r\nCPU MHz:               1000.000\r\nCPU max MHz:           2401.0000\r\nCPU min MHz:           1000.0000\r\nBogoMIPS:              4800.00\r\nVirtualization:        VT-x\r\nL1d cache:             32K\r\nL1i cache:             32K\r\nL2 cache:              1024K\r\nL3 cache:              28160K\r\nNUMA node0 CPU(s):     0-19,40-59\r\nNUMA node1 CPU(s):     20-39,60-79\r\nFlags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_pt ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke spec_ctrl intel_stibp flush_l1d\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.26.4\r\n[pip3] numpydoc==1.8.0\r\n[pip3] torch==2.4.0\r\n[pip3] torchsummary==1.5.1\r\n[pip3] torchvision==0.19.0\r\n[pip3] triton==3.0.0\r\n[conda] numpy                     1.26.4                   pypi_0    pypi\r\n[conda] numpyd",
    "url": "https://github.com/pytorch/vision/issues/8588",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-14T11:08:41Z",
    "updated_at": "2024-08-15T09:49:41Z",
    "comments": 4,
    "user": "FiReTiTi"
  },
  {
    "repo": "pytorch/xla",
    "number": 7849,
    "title": "Is it possible free TPU memory without restarting in pytorch xla?",
    "body": "## \ud83d\udcda Documentation\r\nI have tried to move a TPU tensor to CPU or delete the tensor. However, the memory is not released.\r\n\r\nhttps://colab.research.google.com/drive/1pTTDu_eJssUwjsrjBDiiyo6tlOEZTjMf?usp=sharing\r\n<!-- A clear and concise description of what content is an issue. -->\r\n",
    "url": "https://github.com/pytorch/xla/issues/7849",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-14T10:48:37Z",
    "updated_at": "2024-08-26T01:25:00Z",
    "comments": 6,
    "user": "fengyang0317"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9174,
    "title": "[Quantization] bring quantization to diffusers core",
    "body": "Now that we have a working PoC (#9165) of NF4 quantization through `bitsandbytes` and also [this](https://huggingface.co/blog/quanto-diffusers) through `optimum.quanto`, it's time to bring in quantization more formally in `diffusers` \ud83c\udfb8\r\n\r\nIn this issue, I want to devise a rough plan to attack the integration. We are going to start with `bitsandbytes` and then slowly increase the list of our supported quantizers based on community interest. This integration will also allow us to do LoRA fine-tuning of large models like [Flux](https://huggingface.co/docs/diffusers/main/en/api/pipelines/flux) through `peft` ([guide](https://huggingface.co/docs/peft/en/developer_guides/quantization)).  \r\n\r\nThree PRs are expected: \r\n\r\n- [ ] Introduce a [base quantization config class](https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/base.py) like we have in `transformers`. \r\n- [ ] Introduce `bitsandbytes` related utilities to handle processing, post-processing of layers for injecting `bitsandbytes` layers. Example is [here](https://github.com/huggingface/transformers/blob/main/src/transformers/integrations/bitsandbytes.py). \r\n- [ ] Introduce a `bitsandbytes` config ([example](https://github.com/huggingface/transformers/blob/main/src/transformers/quantizers/quantizer_bnb_4bit.py)) and quantization loader mixin aka `QuantizationLoaderMixin`. This loader will enable passing a quantization config to `from_pretrained()` of a `ModelMixin` and will tackle how to modify and prepare the model for the provided quantization config. This will also allow us to serialize the model according to the quantization config. \r\n\r\n--- \r\n\r\nNotes:\r\n\r\n* We could have done this with `accelerate` ([guide](https://huggingface.co/docs/accelerate/en/usage_guides/quantization)) but this doesn't yet support NF4 serialization. \r\n* Good example PR: https://github.com/huggingface/transformers/pull/32306\r\n\r\n---\r\n\r\n@DN6 @SunMarc sounds good? ",
    "url": "https://github.com/huggingface/diffusers/issues/9174",
    "state": "closed",
    "labels": [
      "quantization"
    ],
    "created_at": "2024-08-14T08:05:34Z",
    "updated_at": "2024-10-21T04:42:46Z",
    "comments": 15,
    "user": "sayakpaul"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9172,
    "title": "why rebuild a vae in inference stage? ",
    "body": "Thanks for ur effort for diffusion model. \r\n\r\nI want to know why we need to rebuild a vae in inference stage. I think it will introduce extra GPU cost.\r\nhttps://github.com/huggingface/diffusers/blob/a85b34e7fdc0a5fceb11aa0fa6199bd9afaca396/examples/text_to_image/train_text_to_image_sdxl.py#L1217C16-L1223C24\r\n\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9172",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2024-08-14T05:52:38Z",
    "updated_at": "2024-11-14T15:03:55Z",
    "comments": 2,
    "user": "WilliammmZ"
  },
  {
    "repo": "huggingface/candle",
    "number": 2413,
    "title": "How to load multiple safetensors with json format",
    "body": "For such a task:\r\n\r\nhttps://huggingface.co/black-forest-labs/FLUX.1-dev/tree/main/transformer\r\n\r\nhow should safetensors be loaded?\r\n\r\n",
    "url": "https://github.com/huggingface/candle/issues/2413",
    "state": "open",
    "labels": [],
    "created_at": "2024-08-14T04:50:37Z",
    "updated_at": "2025-06-11T19:05:05Z",
    "user": "oovm"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 133397,
    "title": "Don't know how to explain but here's the error",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nFile \"C:\\Users\\USER\\Downloads\\pytorch\\main.py\", line 3, in <module>\r\n    import torch\r\n  File \"C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\torch\\__init__.py\", line 148, in <module>\r\n    raise err\r\nOSError: [WinError 126] The specified module could not be found. Error loading \"C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\torch\\lib\\fbgemm.dll\" or one of its dependencies.\r\n\r\n### Versions\r\n\r\nPyTorch version: N/A\r\nIs debug build: N/A\r\nCUDA used to build PyTorch: N/A\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Microsoft Windows 11 Home\r\nGCC version: Could not collect\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\nLibc version: N/A\r\n\r\nPython version: 3.12.5 (tags/v3.12.5:ff3bc82, Aug  6 2024, 20:45:27) [MSC v.1940 64 bit (AMD64)] (64-bit runtime)\r\nPython platform: Windows-11-10.0.22631-SP0\r\nIs CUDA available: N/A\r\nCUDA runtime version: Could not collect\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: Could not collect\r\nNvidia driver version: Could not collect\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: N/A\r\n\r\nCPU:\r\nArchitecture=9\r\nCurrentClockSpeed=2419\r\nDeviceID=CPU0\r\nFamily=205\r\nL2CacheSize=5120\r\nL2CacheSpeed=\r\nManufacturer=GenuineIntel\r\nMaxClockSpeed=2419\r\nName=11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz\r\nProcessorType=3\r\nRevision=\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.26.4\r\n[pip3] onnx==1.16.2\r\n[pip3] onnxruntime==1.18.1\r\n[pip3] torch==2.4.0\r\n[pip3] torchaudio==2.4.0\r\n[pip3] torchvision==0.19.0\r\n[conda] Could not collect\n\ncc @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex",
    "url": "https://github.com/pytorch/pytorch/issues/133397",
    "state": "closed",
    "labels": [
      "module: windows"
    ],
    "created_at": "2024-08-14T02:53:02Z",
    "updated_at": "2024-08-15T00:59:59Z",
    "user": "Nohj9984"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9170,
    "title": "sdxl and contronet  must has a GPU memory more than 36G?",
    "body": "### Describe the bug\n\nhttps://github.com/huggingface/diffusers/blob/15eb77bc4cf2ccb40781cb630b9a734b43cffcb8/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py\r\nline73---line113\r\nI run the demo with  24G GPU,  then OOM everytime.\r\nso I must run SDXl with 48G?\r\n\r\n\r\n@yiyixuxu @sayakpaul @DN6  tks\n\n### Reproduction\n\nFile \"/root/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1150, in convert\r\n    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\ntorch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 26.00 MiB. GPU 0 has a total capacity of 23.65 GiB of which 7.56 MiB is free. Process 3431486 has 18.91 GiB memory in use. Process 3081991 has 4.72 GiB memory in use. Of the allocated memory 4.09 GiB is allocated by PyTorch, and 171.75 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)\n\n### Logs\n\n_No response_\n\n### System Info\n\n0.28?\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9170",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-14T01:46:35Z",
    "updated_at": "2024-11-13T08:49:22Z",
    "comments": 3,
    "user": "henbucuoshanghai"
  },
  {
    "repo": "huggingface/trl",
    "number": 1927,
    "title": "how to use kto_pair loss in the latest version ?",
    "body": "I can see that kto_pair losstype is no longer available in the latest version of dpo trainer. You suggest to use ktotrainer instead. \r\nBut kto_pair loss worked much better than kto_trainer on my dataset, so how do I continue to use kto_pair if I'm using the latest version of the trl library?\r\nthanks a lot!",
    "url": "https://github.com/huggingface/trl/issues/1927",
    "state": "closed",
    "labels": [
      "\ud83c\udfcb DPO",
      "\ud83c\udfcb KTO"
    ],
    "created_at": "2024-08-13T15:59:25Z",
    "updated_at": "2024-10-20T16:56:21Z",
    "user": "vincezengqiang"
  },
  {
    "repo": "pytorch/xla",
    "number": 7846,
    "title": "Is pytorch xla spmd working as expected?",
    "body": "## \ud83d\udc1b Bug\r\nI tried to run [test_train_spmd_linear_model.py](https://github.com/pytorch/xla/blob/master/test/spmd/test_train_spmd_linear_model.py) with `sharding='batch'`. The input data sharing is {devices=[8,1]0,1,2,3,4,5,6,7}, which is expected. However, after a linear layer, the fc1 output sharding becomes 'replicated'. I am wonder whether all the following layers are running without sharding?\r\n\r\nPrint the sharding_spec during forward.\r\n```\r\n  def forward(self, x):\r\n    print('x', torch_xla._XLAC._get_xla_sharding_spec(x))\r\n    fc1 = self.fc1(x)\r\n    print('fc1', torch_xla._XLAC._get_xla_sharding_spec(fc1))\r\n    y = self.relu(fc1)\r\n    print('y', torch_xla._XLAC._get_xla_sharding_spec(y))\r\n    z = self.fc2(y)\r\n    print('z', torch_xla._XLAC._get_xla_sharding_spec(z))\r\n    o = self.fc3(z)\r\n    print('o', torch_xla._XLAC._get_xla_sharding_spec(o))\r\n    return o\r\n```\r\n\r\nObtained outputs\r\n```\r\nx {devices=[8,1]0,1,2,3,4,5,6,7}\r\nfc1 \r\ny \r\nz \r\no \r\n```\r\n\r\n## To Reproduce\r\nhttps://colab.research.google.com/drive/1508nWHxCthxWBlIeKLF0sLZXcjtsO6Ly#scrollTo=nGTxOOgDDOU3\r\n\r\nSteps to reproduce the behavior:\r\n\r\nrun the colab above.\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well. Or better use the Colab template: https://github.com/pytorch/xla/blob/master/contrib/colab/issue-report.ipynb -->\r\n\r\n## Expected behavior\r\n\r\nThe fc1, y, z, o should have sharding.\r\n\r\n## Environment\r\n\r\n - Reproducible on XLA backend [CPU/TPU/CUDA]: TPU\r\n - torch_xla version: nightly\r\n\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/xla/issues/7846",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-13T14:43:50Z",
    "updated_at": "2024-09-01T12:58:48Z",
    "comments": 3,
    "user": "fengyang0317"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 728,
    "title": "[BUG] Deprecated positional argument(s) used in SFTTrainer, please use the SFTConfig to set these arguments instead. How to mitigate this?",
    "body": "### Prerequisites\r\n\r\n- [X] I have read the [documentation](https://hf.co/docs/autotrain).\r\n- [X] I have checked other issues for similar problems.\r\n\r\n### Backend\r\n\r\nLocal\r\n\r\n### Interface Used\r\n\r\nCLI\r\n\r\n### CLI Command\r\n\r\n```\r\n!autotrain --config path-to.yml\r\n```\r\n\r\n```\r\ntask: llm-sft\r\nbase_model: teknium/OpenHermes-2.5-Mistral-7B\r\nproject_name: XXX\r\nlog: none\r\nbackend: local\r\n\r\ndata:\r\n  path: /content\r\n  train_split: train\r\n  valid_split: null\r\n  chat_template: null\r\n  column_mapping:\r\n    text_column: text\r\n\r\nparams:\r\n  block_size: 256\r\n  model_max_length: 512\r\n  epochs: 1\r\n  batch_size: 2\r\n  lr: 3e-5\r\n  peft: true\r\n  quantization: int4\r\n  target_modules: all-linear\r\n  padding: right\r\n  optimizer: adamw_torch\r\n  scheduler: cosine\r\n  gradient_accumulation: 1\r\n  mixed_precision: none\r\n  unsloth: true\r\n  lora_r: 16\r\n  lora_alpha: 16\r\n  lora_dropout: 0\r\n\r\nhub:\r\n  username: abc\r\n  token: hf_XXX\r\n  push_to_hub: false\r\n```\r\n\r\n### UI Screenshots & Parameters\r\n\r\n_No response_\r\n\r\n### Error Logs\r\n\r\n```\r\nLoading checkpoint shards: 100% 2/2 [01:21<00:00, 40.56s/it]\r\nINFO     | 2024-08-13 04:46:20 | autotrain.trainers.clm.utils:get_model:666 - model dtype: torch.float16\r\nINFO     | 2024-08-13 04:46:20 | autotrain.trainers.clm.train_clm_sft:train:37 - creating trainer\r\n/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_deprecation.py:100: FutureWarning: Deprecated argument(s) used in '__init__': dataset_text_field, max_seq_length, packing. Will not be supported from version '1.0.0'.\r\n\r\nDeprecated positional argument(s) used in SFTTrainer, please use the SFTConfig to set these arguments instead.\r\n  warnings.warn(message, FutureWarning)\r\n/usr/local/lib/python3.10/dist-packages/trl/trainer/sft_trainer.py:192: UserWarning: You passed a `packing` argument to the SFTTrainer, the value you passed will override the one in the `SFTConfig`.\r\n  warnings.warn(\r\n/usr/local/lib/python3.10/dist-packages/trl/trainer/sft_trainer.py:280: UserWarning: You passed a `max_seq_length` argument to the SFTTrainer, the value you passed will override the one in the `SFTConfig`.\r\n  warnings.warn(\r\n/usr/local/lib/python3.10/dist-packages/trl/trainer/sft_trainer.py:318: UserWarning: You passed a `dataset_text_field` argument to the SFTTrainer, the value you passed will override the one in the `SFTConfig`.\r\n  warnings.warn(\r\n```\r\n\r\n### Additional Information\r\n\r\nI am not sure why this pops up. I know this is just a UserWarning and model is able to fine-tune ok, but is anything being affected? ",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/728",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-13T05:00:10Z",
    "updated_at": "2024-08-13T12:31:19Z",
    "user": "jackswl"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9164,
    "title": "the dog example of train_dreambooth_lora_flux.py can not convergence",
    "body": "### Describe the bug\r\n\r\n```\r\nexport MODEL_NAME=\"black-forest-labs/FLUX.1-dev\"\r\nexport INSTANCE_DIR=\"dog\"\r\nexport OUTPUT_DIR=\"trained-flux-lora\"\r\n\r\naccelerate launch train_dreambooth_lora_flux.py \\\r\n  --pretrained_model_name_or_path=$MODEL_NAME  \\\r\n  --instance_data_dir=$INSTANCE_DIR \\\r\n  --output_dir=$OUTPUT_DIR \\\r\n  --mixed_precision=\"bf16\" \\\r\n  --instance_prompt=\"a photo of sks dog\" \\\r\n  --resolution=512 \\\r\n  --train_batch_size=1 \\\r\n  --gradient_accumulation_steps=4 \\\r\n  --learning_rate=1e-5 \\\r\n  --report_to=\"wandb\" \\\r\n  --lr_scheduler=\"constant\" \\\r\n  --lr_warmup_steps=0 \\\r\n  --max_train_steps=500 \\\r\n  --validation_prompt=\"A photo of sks dog in a bucket\" \\\r\n  --validation_epochs=25 \\\r\n  --seed=\"0\" \\\r\n  --push_to_hub\r\n``` \r\nI follow this command to train lora of flux-dev and download the dog-example from huggingFace, but this setting could not get better result, the loss is normal\r\n![image](https://github.com/user-attachments/assets/bc8b5795-cec6-46ac-994a-cb032af2f749)\r\n\r\n\r\nthe dog-example look like this:\r\n   \r\n![alvan-nee-9M0tSjb-cpA-unsplash](https://github.com/user-attachments/assets/9bc554e4-3421-4b98-8a19-ab4bc6d3eca2)\r\n\r\nbut my result look like below:\r\n![dog0 (6)](https://github.com/user-attachments/assets/c9410c6b-1d80-4cef-8991-bc8a21195da1)\r\n\r\nand don't use the lora to generate image of the same prompt look like below:\r\n![dog0](https://github.com/user-attachments/assets/959cc08f-2531-45be-80d7-291800dc4ab0)\r\n\r\n\r\n\r\n### Reproduction\r\n\r\n```\r\nimport torch\r\nfrom diffusers import FluxPipeline\r\n\r\npipe = FluxPipeline.from_pretrained(\"/opt/ml/volume/default/aigc/project/FLUX.1-dev\",torch_dtype=torch.bfloat16)\r\npipe.enable_model_cpu_offload()\r\npipe.lora_state_dict(\"/opt/ml/volume/default/aigc/project/diffusers/examples/dreambooth/trained-flux-lora/checkpoint-500\")\r\nprompts = []\r\nprompts.append(\"an sks dog\")\r\nindex = 0\r\nfor prompt in prompts:\r\n    image = pipe(\r\n        prompt=prompt,\r\n        num_inference_steps=20,\r\n        guidance_scale=7.5,\r\n        max_sequence_length=512,\r\n        width=1152,\r\n        height=768\r\n    ).images[0]\r\n    save_file = \"dog\"+str(index)+'.png'\r\n    index+=1\r\n    image.save(save_file)\r\n```\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\nubuntu 20.04\r\n\r\n### Who can help?\r\n\r\n@sayakpaul @linoytsaban ",
    "url": "https://github.com/huggingface/diffusers/issues/9164",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-13T03:08:10Z",
    "updated_at": "2024-08-13T10:23:23Z",
    "comments": 7,
    "user": "chongxian"
  },
  {
    "repo": "pytorch/xla",
    "number": 7837,
    "title": "Make `tpu-info` more visible to the community",
    "body": "## \ud83d\udcda Documentation\r\n\r\nWe highlighted tpu-info in the [PyTorch/XLA 2.4 release](https://cloud.google.com/blog/products/ai-machine-learning/pytorch-xla-2-4-improves-pallas-and-adds-eager-mode?e=13802955). I understand we have a [CoLab demo page](https://colab.sandbox.google.com/drive/1aMYTONPE4f3BtZpRq1_jPcRcIiSKtoY9?usp=drive_open#scrollTo=ZqjPdg3XlTnG) to help users set up and use `tpu-info`. \r\n\r\nA quick search on the web, however, shows no pointer to the instructions on how to set up `tpu-info`. I suggest we publish a guide that brings this feature to the forefront. cc @duncantech \r\n\r\nSimilarly, PyTorchXLA docker images benefit from having this feature built-in. Can we add it to our docker nightly/release setup flow?\r\n\r\nDo we have plans to make `tpu-info` a standalong installation package?",
    "url": "https://github.com/pytorch/xla/issues/7837",
    "state": "closed",
    "labels": [
      "usability"
    ],
    "created_at": "2024-08-12T19:17:30Z",
    "updated_at": "2024-08-17T06:39:58Z",
    "comments": 5,
    "user": "miladm"
  },
  {
    "repo": "huggingface/text-embeddings-inference",
    "number": 380,
    "title": "How do i deploy to vertex ?",
    "body": "How do i deploy to vertex ? I think i saw some feature=google setting in code which supports compatibility with vertex . Please guide.",
    "url": "https://github.com/huggingface/text-embeddings-inference/issues/380",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-12T17:15:30Z",
    "updated_at": "2024-10-17T10:19:02Z",
    "user": "pulkitmehtaworkmetacube"
  },
  {
    "repo": "pytorch/vision",
    "number": 8585,
    "title": "Cant find nms function in code?",
    "body": "### \ud83d\udc1b Describe the bug\n\nI am looking for a method in torch, but for the love of god I can not not find the function definition!\r\nThe reason I need to find it is that I need to get rid of the torch dependency and I want to try to convert it into numpy.\r\n\r\nI am speaking about torchvision.ops.nms()\r\nThis method is located in torchvision/ops/boxes.py and returns torch.ops.torchvision.nms().\r\n\r\nThis method is generated code which can be found in torch/_ops.py where they initialize ops with ops: _Ops = _Ops().\r\n\r\nThats the point where I am lost, the class is located in the same file, but I cant figure out which library it calls to get the nms() method.\r\n\r\nPlease help me :frowning:\n\n### Versions\n\nLatest",
    "url": "https://github.com/pytorch/vision/issues/8585",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-12T12:17:23Z",
    "updated_at": "2024-08-12T12:26:58Z",
    "comments": 1,
    "user": "asusdisciple"
  },
  {
    "repo": "pytorch/xla",
    "number": 7832,
    "title": "80B model how to shard restore in spmd training",
    "body": "## \u2753 Questions and Help\r\nIn pytorch we can use `fsdp meta init` shard restore my big model(like have 80B parameters),in torch_xla i only find shard save like use this.https://github.com/pytorch/xla/blob/master/torch_xla/experimental/distributed_checkpoint/manager.py#L257.\r\nIs there a way to recover the original pytorch model parameters in pieces during spmd training, and when saving the model, save it in the original pytorch format for inference",
    "url": "https://github.com/pytorch/xla/issues/7832",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2024-08-12T11:52:00Z",
    "updated_at": "2025-04-01T12:50:25Z",
    "user": "mars1248"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 133205,
    "title": "How to use libtorch in a c++11 project?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nc++14_warning.h:32:2: \u9519\u8bef\uff1a#error This file requires compiler and library support for the forthcoming ISO C++ 2014 standard. This support is currently experimental, and must be enabled with the -std=c++1y or -std=gnu++1y compiler options.\r\n #error This file requires compiler and library support for the forthcoming \\\r\n\r\n\r\n### Versions\r\nPyTorch version: 1.12.0a0+git664058f\r\nOS: CentOS release 6.9 (Final) (x86_64)\r\nGCC version: (GCC) 5.4.0\r\nClang version: 3.4.2 (tags/RELEASE_34/dot2-final)\r\nCMake version: version 3.21.3\r\nLibc version: glibc-2.10\r\n\u5728\u4f7f\u7528libtorch\u6784\u5efa\u81ea\u5df1\u7684\u5de5\u7a0b\u65f6\u62a5\u9519\uff0c\u6211\u7684\u5de5\u7a0b\u662fc++11(\u4e0d\u53ef\u5347\u7ea7) \uff0c\u6709\u6ca1\u6709\u529e\u6cd5\u4f7f\u7528libtorch\uff1f\n\ncc @svekars @brycebortree @jbschlosser @seemethere @malfet @osalpekar @atalman",
    "url": "https://github.com/pytorch/pytorch/issues/133205",
    "state": "closed",
    "labels": [
      "module: docs",
      "module: cpp",
      "triaged"
    ],
    "created_at": "2024-08-12T08:45:32Z",
    "updated_at": "2024-09-24T02:03:36Z",
    "user": "zhb0920"
  },
  {
    "repo": "huggingface/trl",
    "number": 1916,
    "title": "How to Add PEFT to PPO Trainer or PPO Config",
    "body": "I am trying to realize RLHF through PPO.\r\n\r\nMay I ask how can I realize PEFT in RLHF/PPO. I can see this parameter in DPOTrainer. However, I cannot see that in PPOTrainer.\r\n",
    "url": "https://github.com/huggingface/trl/issues/1916",
    "state": "closed",
    "labels": [
      "\u2728 enhancement",
      "\ud83e\uddd2 good second issue",
      "\ud83c\udfcb PPO"
    ],
    "created_at": "2024-08-12T01:02:07Z",
    "updated_at": "2024-11-18T10:54:10Z",
    "user": "ZhichaoWang970201"
  },
  {
    "repo": "huggingface/trl",
    "number": 1915,
    "title": "How to dpo llava?",
    "body": "Thank you for great work!\r\n\r\nI do dpo llava using raw `/trl/examples/scripts/dpo_visual.py` code by using a command\r\n`CUDA_VISIBLE_DEVICES=0 accelerate launch examples/scripts/dpo_visual.py     --dataset_name HuggingFaceH4/rlaif-v_formatted     --model_name_or_path llava-hf/llava-1.5-7b-hf     --per_device_train_batch_size 1     --gradient_accumulation_steps 64     --dataset_num_proc 32     --output_dir dpo_llava    --bf16     --torch_dtype bfloat16     --gradient_checkpointing     --use_peft     --lora_target_modules=all-linear`\r\nhowever I got a error such as \r\n\r\n> multiprocess.pool.RemoteTraceback: \r\n> \"\"\"\r\n> Traceback (most recent call last):\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/multiprocess/pool.py\", line 125, in worker\r\n>     result = (True, func(*args, **kwds))\r\n>                     ^^^^^^^^^^^^^^^^^^^\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/datasets/utils/py_utils.py\", line 678, in _write_generator_to_queue\r\n>     for i, result in enumerate(func(**kwargs)):\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/datasets/arrow_dataset.py\", line 3522, in _map_single\r\n>     example = apply_function_on_filtered_inputs(example, i, offset=offset)\r\n>               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/datasets/arrow_dataset.py\", line 3421, in apply_function_on_filtered_inputs\r\n>     processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)\r\n>                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/trl/trainer/dpo_trainer.py\", line 808, in tokenize_row\r\n>     prompt_tokens = self.processor(prompt, images=images, add_special_tokens=False)\r\n>                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n> TypeError: LlavaProcessor.__call__() got an unexpected keyword argument 'add_special_tokens'\r\n> \"\"\"\r\n> \r\n> The above exception was the direct cause of the following exception:\r\n> \r\n> Traceback (most recent call last):\r\n>   File \"/trl/examples/scripts/dpo_visual.py\", line 178, in <module>\r\n>     trainer = DPOTrainer(\r\n>               ^^^^^^^^^^^\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/huggingface_hub/utils/_deprecation.py\", line 101, in inner_f\r\n>     return f(*args, **kwargs)\r\n>            ^^^^^^^^^^^^^^^^^^\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/trl/trainer/dpo_trainer.py\", line 529, in __init__\r\n>     train_dataset = train_dataset.map(self.tokenize_row, num_proc=self.dataset_num_proc, writer_batch_size=10)\r\n>                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/datasets/arrow_dataset.py\", line 602, in wrapper\r\n>     out: Union[\"Dataset\", \"DatasetDict\"] = func(self, *args, **kwargs)\r\n>                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/datasets/arrow_dataset.py\", line 567, in wrapper\r\n>     out: Union[\"Dataset\", \"DatasetDict\"] = func(self, *args, **kwargs)\r\n>                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/datasets/arrow_dataset.py\", line 3253, in map\r\n>     for rank, done, content in iflatmap_unordered(\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/datasets/utils/py_utils.py\", line 718, in iflatmap_unordered\r\n>     [async_result.get(timeout=0.05) for async_result in async_results]\r\n>      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/multiprocess/pool.py\", line 774, in get\r\n>     raise self._value\r\n> TypeError: LlavaProcessor.__call__() got an unexpected keyword argument 'add_special_tokens'\r\n> Traceback (most recent call last):\r\n>   File \"/root/anaconda3/bin/accelerate\", line 8, in <module>\r\n>     sys.exit(main())\r\n>              ^^^^^^\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/accelerate/commands/accelerate_cli.py\", line 48, in main\r\n>     args.func(args)\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/accelerate/commands/launch.py\", line 1106, in launch_command\r\n>     simple_launcher(args)\r\n>   File \"/root/anaconda3/lib/python3.12/site-packages/accelerate/commands/launch.py\", line 704, in simple_launcher\r\n>     raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)\r\n> subprocess.CalledProcessError: Command '['/root/anaconda3/bin/python', 'examples/scripts/dpo_visual.py', '--dataset_name', 'HuggingFaceH4/rlaif-v_formatted', '--model_name_or_path', 'llava-hf/llava-1.5-7b-hf', '--per_device_train_batch_size', '1', '--gradient_accumulation_steps', '64', '--dataset_num_proc', '32', '--output_dir', 'dpo_llava', '--bf16', '--torch_dtype', 'bfloat16', '--gradient_checkpointing', '--use_peft', '--lora_target_modules=all-linear']' returned non-zero exit status 1.\r\n\r\nIs there a solution?",
    "url": "https://github.com/huggingface/trl/issues/1915",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-11T00:57:38Z",
    "updated_at": "2024-08-11T01:23:16Z",
    "user": "ooooohira"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 887,
    "title": "VSCode Interpolation",
    "body": "### Question\n\nI'm finding that VSCode is extremely slow when reading type definitions from the `@xenova/transformers` path. Is there anything I might be doing wrong? I've noticed that it uses JS comments to define the types instead of a type definition file, is the issue I am having a known issue with using that type of markup?",
    "url": "https://github.com/huggingface/transformers.js/issues/887",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-11T00:08:30Z",
    "updated_at": "2024-08-25T01:55:36Z",
    "user": "lukemovement"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9140,
    "title": "Diffusers model not working as good as repo ckpt model",
    "body": "Hi,\nWhen I try to run the models stable diffusion v1-5 or Instructpix2pix through the diffusers pipeline and use .from_pretrained() it downloads the models from hugging face and I'm using the code to run inference given in hugging face, the results are not good at all in the sense that there is still noise in the generated images.\n\nBut when I run these models using their GitHub repo code and ckpt models given by them the outputs are very good.\n\nIs there any solution to this or any other way to use the diffusers library pipeline.\n\nAlso the diffusers.StableDiffusionInstructPix2PixPipeline does not have .from_single_file() option.\n\nThank you \n",
    "url": "https://github.com/huggingface/diffusers/issues/9140",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-08-09T09:34:30Z",
    "updated_at": "2024-12-14T12:13:15Z",
    "comments": 6,
    "user": "kunalkathare"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3075,
    "title": "\u2753 [Question] failed to run the `examples/dynamo/vgg16_fp8_ptq.y` example",
    "body": "## \u2753 Question\r\n\r\nI'm trying to run the `examples/dynamo/vgg16_fp8_ptq.y` example but got following error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/wh/generative_action/SynHSI/vgg_quat.py\", line 232, in <module>\r\n    exp_program = torch.export.export(model, (input_tensor,))\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/export/__init__.py\", line 174, in export\r\n    return _export(\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/export/_trace.py\", line 1066, in wrapper\r\n    raise e\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/export/_trace.py\", line 1039, in wrapper\r\n    ep = fn(*args, **kwargs)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/export/exported_program.py\", line 100, in wrapper\r\n    return fn(*args, **kwargs)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/export/_trace.py\", line 2034, in _export\r\n    export_artifact = export_func(  # type: ignore[operator]\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/export/_trace.py\", line 1273, in _strict_export\r\n    return _strict_export_lower_to_aten_ir(\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/export/_trace.py\", line 1412, in _strict_export_lower_to_aten_ir\r\n    aten_export_artifact = lower_to_aten_callback(\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/export/_trace.py\", line 633, in _export_to_aten_ir\r\n    gm, graph_signature = transform(aot_export_module)(\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py\", line 1194, in aot_export_module\r\n    fx_g, metadata, in_spec, out_spec = _aot_export_function(\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py\", line 1426, in _aot_export_function\r\n    fx_g, meta = create_aot_dispatcher_function(\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py\", line 429, in create_aot_dispatcher_function\r\n    return _create_aot_dispatcher_function(flat_fn, flat_args, aot_config)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py\", line 730, in _create_aot_dispatcher_function\r\n    compiled_fn, fw_metadata = compiler_fn(\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/jit_compile_runtime_wrappers.py\", line 105, in aot_dispatch_export\r\n    graph, _, _ = aot_dispatch_base_graph(\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/dispatch_and_compile_graph.py\", line 138, in aot_dispatch_base_graph\r\n    fw_module = _create_graph(\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/dispatch_and_compile_graph.py\", line 46, in _create_graph\r\n    fx_g = make_fx(\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/fx/experimental/proxy_tensor.py\", line 1805, in wrapped\r\n    return make_fx_tracer.trace(f, *args)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/fx/experimental/proxy_tensor.py\", line 1751, in trace\r\n    return self._trace_inner(f, *args)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/fx/experimental/proxy_tensor.py\", line 1737, in _trace_inner\r\n    t = dispatch_trace(\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/_compile.py\", line 31, in inner\r\n    return disable_fn(*args, **kwargs)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py\", line 631, in _fn\r\n    return fn(*args, **kwargs)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/fx/experimental/proxy_tensor.py\", line 899, in dispatch_trace\r\n    graph = tracer.trace(root, concrete_args)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/fx/experimental/proxy_tensor.py\", line 1392, in trace\r\n    res = super().trace(root, concrete_args)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py\", line 631, in _fn\r\n    return fn(*args, **kwargs)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/fx/_symbolic_trace.py\", line 823, in trace\r\n    (self.create_arg(fn(*args)),),\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/fx/experimental/proxy_tensor.py\", line 920, in wrapped\r\n    out = f(*tensors)\r\n  File \"<string>\", line 1, in <lambda>\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/traced_function_transforms.py\", line 403, in _functionalized_f_",
    "url": "https://github.com/pytorch/TensorRT/issues/3075",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-09T08:01:14Z",
    "updated_at": "2024-08-23T22:06:56Z",
    "user": "broken-dream"
  },
  {
    "repo": "pytorch/xla",
    "number": 7823,
    "title": "[XLA:GPU compile Error]  nvcc fatal   : Unsupported gpu architecture 'compute_35'",
    "body": "detail:\r\nNVIDIA-SMI 550.54.15 Driver Version: 550.54.15 CUDA Version: 12.4\r\n\r\nfor  Kepler GPUs are removed from CUDA 12.x. how can i compile torch_xla for gpu in CUDA Version 12.X(GPU guide  use CUDA12.X).  really confused. thanks for reply.\r\n\r\n\r\n![img_v3_02dj_acefc8b2-0c7b-4504-8b7b-0af9b368b7bg](https://github.com/user-attachments/assets/ce7d0448-d53b-455e-ac01-4f0f8c077eed)\r\n\r\noriginal issue:https://github.com/pytorch/xla/issues/7783",
    "url": "https://github.com/pytorch/xla/issues/7823",
    "state": "closed",
    "labels": [
      "bug",
      "xla:gpu",
      "build"
    ],
    "created_at": "2024-08-09T07:50:59Z",
    "updated_at": "2025-04-01T12:53:16Z",
    "comments": 3,
    "user": "FatJhon"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9136,
    "title": "IP adapter output on some resolutions suffers in quality?",
    "body": "### Describe the bug\n\nI am running IP adapter for 768x1344 which is one of the sdxl listed resolutions. I find that the output quality is much less than say regular 768x768 generations. I've attached sample images and code below. In this experiment 1080x768 seemed to get best output, but its not one of the supported resolutions @asomo\r\n\r\n\r\n![fridge_fg](https://github.com/user-attachments/assets/da1a2b42-f44e-40e1-967d-140f98f0f7da)\r\n![fridge_bg](https://github.com/user-attachments/assets/5e936097-7981-43d7-9ad3-216674738360)\r\n![fridge_canny](https://github.com/user-attachments/assets/996ff817-dd25-4206-b78b-cf1e264e5b7b)\r\n![fridge_mask](https://github.com/user-attachments/assets/46c4f2e2-7dd3-4edc-8051-56f9a8e0555b)\r\n![fridge_inv_mask](https://github.com/user-attachments/assets/c2c56fdd-507b-4e06-b263-0aa98a3224db)\r\n\n\n### Reproduction\n\n\r\nimport torch\r\nfrom diffusers import StableDiffusionXLPipeline, StableDiffusionXLImg2ImgPipeline, ControlNetModel, StableDiffusionXLControlNetPipeline, AutoencoderKL, UniPCMultistepScheduler\r\nfrom diffusers.image_processor import IPAdapterMaskProcessor\r\nfrom transformers import CLIPVisionModelWithProjection\r\nfrom controlnet_aux import AnylineDetector\r\nimport cv2\r\nimport numpy as np\r\nfrom PIL import Image, ImageOps\r\nfrom huggingface_hub import hf_hub_download\r\n\r\ndef create_controlnet_pipes(image_encoder=None)->StableDiffusionXLControlNetPipeline:\r\n    ## get controlnet\r\n    controlnet = ControlNetModel.from_pretrained(\r\n                \"diffusers/controlnet-canny-sdxl-1.0\",\r\n                torch_dtype=torch.float16,\r\n                use_safetensors=True,\r\n            )\r\n    pipe = StableDiffusionXLPipeline.from_single_file(\r\n                \"sdxl model path\", \r\n                add_watermarker=False, \r\n                torch_dtype=torch.float16, \r\n                variant=\"fp16\", \r\n                use_safetensors=True,\r\n                image_encoder=image_encoder,\r\n                )\r\n    pipe = StableDiffusionXLControlNetPipeline(\r\n            controlnet=controlnet,\r\n            **pipe.components,\r\n            add_watermarker=False,\r\n        )\r\n    pipe = pipe.to(\"cuda\")\r\n    return pipe\r\n\r\n\r\ndef canny(image):\r\n    image = np.array(image)\r\n    low_threshold = 100\r\n    high_threshold = 200\r\n    image = cv2.Canny(image, low_threshold, high_threshold)\r\n    image = image[:, :, None]\r\n    image = np.concatenate([image, image, image], axis=2)\r\n    return Image.fromarray(image)\r\n\r\n\r\nif __name__ == '__main__':\r\n    ## crop different values like 0,0,1080,768 or 0,0,1280,768\r\n    ref_image = Image.open('images/fridge_fg.png').crop((0,0,1344,768))\r\n    bg_ref_image = Image.open('images/fridge_bg.png').crop((0,0,1344,768))\r\n\r\n    mask_new = Image.open('images/fridge_mask.png').convert('L').crop((0,0,1344,768))\r\n    inv_mask = Image.open('images/fridge_inv_mask.png').convert('L').crop((0,0,1344,768))\r\n    processor = IPAdapterMaskProcessor()\r\n    mask_fg = processor.preprocess([mask_new])\r\n    mask_fg = mask_fg.reshape(1, mask_fg.shape[0], mask_fg.shape[2], mask_fg.shape[3])\r\n\r\n    mask_bg = processor.preprocess([inv_mask])\r\n    mask_bg = mask_bg.reshape(1, mask_bg.shape[0], mask_bg.shape[2], mask_bg.shape[3])\r\n\r\n    canny_pil = Image.open('images/fridge_canny.png').crop((0,0,1344,768))\r\n    \r\n    image_encoder = CLIPVisionModelWithProjection.from_pretrained(\r\n        \"h94/IP-Adapter\",\r\n        subfolder=\"models/image_encoder\",\r\n        torch_dtype=torch.float16\r\n    )\r\n    pipe = create_controlnet_pipes(image_encoder=image_encoder)\r\n    pipe.load_ip_adapter(\"h94/IP-Adapter\", subfolder=\"sdxl_models\", weight_name=[\"ip-adapter-plus_sdxl_vit-h.safetensors\", \"ip-adapter-plus_sdxl_vit-h.safetensors\"], use_safetensors=True)\r\n    scale_config_fg = {'down':1, 'mid':1, 'up':1}\r\n    scale_config_bg = {\"down\":0.7, 'mid':0.7, 'up':0.7}\r\n    pipe.set_ip_adapter_scale([scale_config_fg, scale_config_bg])\r\n\r\n    for idx in range(5):\r\n        outputs = pipe(\r\n            prompt='kitchen scene',\r\n            image=canny_pil,\r\n            ip_adapter_image=[ref_image, bg_ref_image],\r\n            negative_prompt=\"monochrome, lowres, bad anatomy, worst quality, low quality, fuzzy, blurry\",\r\n            guidance_scale=5,\r\n            num_inference_steps=30,\r\n            controlnet_conditioning_scale=0.53,\r\n            cross_attention_kwargs={\"ip_adapter_masks\": [mask_fg, mask_bg]},\r\n            num_images_per_prompt=1\r\n            # generator=generator,\r\n        ).images\r\n        for image in outputs:\r\n            image.save(<path>)\r\n            # image.save(f'output_plus/fridge_ar_ctrlnet_1280_plus_{idx}.png')\r\n        print('done')\r\n    pipe.unload_ip_adapter()\r\n\r\n\r\n\n\n### Logs\n\n_No response_\n\n### System Info\n\nv0.28.2 diffusers\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9136",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-08-09T06:36:39Z",
    "updated_at": "2024-09-14T15:03:17Z",
    "comments": 2,
    "user": "darshats"
  },
  {
    "repo": "pytorch/text",
    "number": 2270,
    "title": "undefined symbol",
    "body": "## undefined symbol\r\n\r\nPyTorch version 2.1.2\r\n\r\nI am looking for a version of torchtext that will work with PyTorch 2.1.2.  I have tried every version from 0.16.0 to 0.18.0\r\nEach version of torchtext has some version of undefined symbol. \r\n\r\n```\r\npython -c \"import torchtext\"\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"/app/software/scGPT/0.2.1-foss-2023a/lib/python3.11/site-packages/torchtext/__init__.py\", line 6, in <module>\r\n    from torchtext import _extension  # noqa: F401\r\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/app/software/scGPT/0.2.1-foss-2023a/lib/python3.11/site-packages/torchtext/_extension.py\", line 64, in <module>\r\n    _init_extension()\r\n  File \"/app/software/scGPT/0.2.1-foss-2023a/lib/python3.11/site-packages/torchtext/_extension.py\", line 58, in _init_extension\r\n    _load_lib(\"libtorchtext\")\r\n  File \"/app/software/scGPT/0.2.1-foss-2023a/lib/python3.11/site-packages/torchtext/_extension.py\", line 50, in _load_lib\r\n    torch.ops.load_library(path)\r\n  File \"/app/software/PyTorch/2.1.2-foss-2023a/lib/python3.11/site-packages/torch/_ops.py\", line 852, in load_library\r\n    ctypes.CDLL(path)\r\n  File \"/app/software/Python/3.11.3-GCCcore-12.3.0/lib/python3.11/ctypes/__init__.py\", line 376, in __init__\r\n    self._handle = _dlopen(self._name, mode)\r\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^\r\nOSError: /app/software/scGPT/0.2.1-foss-2023a/lib/python3.11/site-packages/torchtext/lib/libtorchtext.so: undefined symbol: _ZN5torch6detail10class_baseC2ERKSsS3_SsRKSt9type_infoS6_\r\n```",
    "url": "https://github.com/pytorch/text/issues/2270",
    "state": "open",
    "labels": [],
    "created_at": "2024-08-08T23:25:46Z",
    "updated_at": "2024-09-18T09:00:08Z",
    "comments": 1,
    "user": "fizwit"
  },
  {
    "repo": "pytorch/vision",
    "number": 8570,
    "title": "RandomPhotometricDistort has undocumented channel shuffle feature",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nThe documentation for RandomPhotometricDistort neither exposes the channel shuffle behavior as a parameter or lists in the description that this is a possibility.\r\n\r\nhttps://pytorch.org/vision/stable/generated/torchvision.transforms.v2.RandomPhotometricDistort.html#torchvision.transforms.v2.RandomPhotometricDistort\r\n\r\nI was trying to use this as convince for randomly brightness and contrast operations, but I got unexpected breaking channel swaps as well.\r\n\r\nThe best course of action could be to expose a boolean true/false parameter on whether to do channel swaps or not.\r\n\r\n### Versions\r\n\r\n0.19 stable documentation",
    "url": "https://github.com/pytorch/vision/issues/8570",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-08T19:14:05Z",
    "updated_at": "2024-08-13T02:50:14Z",
    "comments": 1,
    "user": "chadrockey"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 885,
    "title": "TimeSformer on the web",
    "body": "### Question\n\nGlad to see this repo! If I want to use TimeSformer on the web, any suggestion or guide for it? Where can I learn from this repo or it's a totally different things? Thanks in advance!",
    "url": "https://github.com/huggingface/transformers.js/issues/885",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-08T17:59:13Z",
    "updated_at": "2024-08-11T09:02:47Z",
    "user": "tomhsiao1260"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1146,
    "title": "Strange behaviour of autograd.functional.jacobian when vectorize=True and strategy=\u2018forward-mode\u2019",
    "body": "I calculate the Jacobian of a neural network with respect to its 14 input variables. The network has an output of 9015, meaning I have 126210 gradients. Because I have some complex calculations in my neural network I cannot use jacrev/jacfwd, see [ jacfwd and jacrev are fundamentally broken for complex inputs #94397 ](https://github.com/pytorch/pytorch/issues/94397).\r\n\r\nTherefore I am using autograd.functional.jacobian with default settings which works perfectly fine but calculating the Jacobian takes approx. 16 seconds. Since I have to calculate the Jacobian several times during an iteration that I run I have to speed up this process. I do all the calculations on my GPU. \r\n\r\nI set vectorize=True and strategy=\u2018forward-mode\u2019 it works (also with 0.05sec) but after 30 iterations it stops and says \u2018torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB. GPU\u2019.\r\n\r\nI am aware of the performance <-> memory tradeoff as described by @zou3519  in [ Cuda Memory Overflow in Jacobian Computation #1058 ](https://github.com/pytorch/functorch/issues/1058) but this seems a bit drastic as the error only occurs after some iterations. The first few work perfectly fine.\r\n\r\nHere is a minimal example of my code:\r\n\r\n`x = torch.rand((1, 601, 20)).to(device)\r\ninitial_guess = torch.rand((1, 14)).to(device)\r\ny = torch.rand((1, 601, 15)).to(device)\r\n  \r\nmodel = ....to(device)\r\nmodel.load_state_dict(torch.load(model_location + 'model_weights.pth', map_location=device))\r\nmodel.eval()\r\n\r\ndef get_jacobian(neural_net, input1, input2):\r\n    def partial_forward(diff_inp):\r\n        return neural_net(input1, diff_inp)\r\n    return autograd.functional.jacobian(partial_forward, input2, strategy='forward-mode', vectorize=True).to(device)\r\n\r\n\r\ndef method(neural_net, input1, input2, result, nb_it):\r\n\r\n    for i in range(nb_it):\r\n\r\n        jac_placeholder = torch.zeros(result.shape[0], result.shape[1], result.shape[2],\r\n                                      input2.shape[1]).to(device)\r\n\r\n        print(torch.cuda.memory_summary(device=None, abbreviated=False))\r\n\r\n        jac = get_jacobian(neural_net, input1, input2)\r\n       diff = neural_net(input1, input2) - result\r\n\r\n        for j in range(result.shape[0]):\r\n            jac_placeholder[j, :, :, :] = jac[j, :, :, j, :]\r\n\r\n        true_jac = torch.permute(jac_placeholder, (0, 3, 1, 2))\r\n\r\n        mul = torch.einsum('bptx,btx->bp', true_jac, diff).to(device)\r\n\r\n        input2 = input2 - mul\r\n\r\n        torch.cuda.empty_cache()\r\n\r\nmethod(model, x1,  x2, y, 3000)`\r\n\r\n**Edit 1:**\r\n\r\nThe error occurs because of the line 'input2 = input2 - mul' but it is unclear to me why this happens.\r\n\r\n**Edit 2:**\r\n\r\nI was able to find the error. There was a with torch.no_grad() missing around \r\n`jac = get_jacobian(neural_net, input1, input2)\r\n       diff = neural_net(input1, input2) - result`\r\nmeaning it was also calculating the networks weight gradients...\r\n\r\nThe RAM usage is now low but the CPU still runs on 100% altough I have everything on the GPU. This still baffles me.",
    "url": "https://github.com/pytorch/functorch/issues/1146",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-08T12:51:16Z",
    "updated_at": "2024-08-09T11:27:07Z",
    "comments": 0,
    "user": "dezenn"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3073,
    "title": "\u2753  Cannot figure out the following error: AttributeError: module 'torch_tensorrt' has no attribute 'ptq'.",
    "body": "## \u2753 Question\r\nI am encountering an AttributeError when trying to use the ptq module from Torch-TensorRT on google colab.\r\n I am attempting to run this line of code\r\ncalibrator = torch_tensorrt.ptq.DataLoaderCalibrator(...) \r\n\r\n## Environment\r\n - PyTorch Version (e.g., 1.0): 2.4.0+cu121\r\n - CUDA Version: 12.2\r\n -  Python version : 3.10.12\r\n -  torch_tensorrt version : 2.4.0\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3073",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-08T11:37:08Z",
    "updated_at": "2024-08-09T06:04:57Z",
    "user": "ImaanIbrar"
  },
  {
    "repo": "huggingface/cookbook",
    "number": 163,
    "title": "Incorrect markdown table rendering in Colab in \"How to use Inference Endpoints to Embed Documents\"",
    "body": "There is an issue with the rendering of the Inference Endpoints table in Colab in [How to use Inference Endpoints to Embed Documents](https://huggingface.co/learn/cookbook/automatic_embedding_tei_inference_endpoints). Although the table correctly renders on HF cookbook webpage:\r\n\r\n<img width=\"610\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e32731fb-31e1-4a5d-8a35-a230b1bea50c\">\r\n\r\nwhen opening with Colab with the upper \"Open in Colab\" button, the rows are rendered incorrectly:\r\n\r\n<img width=\"583\" alt=\"image\" src=\"https://github.com/user-attachments/assets/65d76a12-bd4d-41ce-93d9-4c0b19986bdf\">\r\n",
    "url": "https://github.com/huggingface/cookbook/issues/163",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-08T11:16:40Z",
    "updated_at": "2024-08-08T16:22:48Z",
    "user": "sergiopaniego"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 192,
    "title": "Constant training loss in the model adapter card",
    "body": "Hello,\r\n\r\nI could fine-tune a model using a small dataset and I see that the validation loss decreases, while the training loss remains the same in the model card.\r\n\r\nI don't think this is normal, even though the new task I try to teach the model is similar to what it already does, I think it should be able to learn from the dataset. I took a look at the trainer_state.json file created during the fine-tuning process and I saw that the training_loss for step 2 is different from the one displayed in the model card.\r\n\r\n**Results from model_card:**\r\n\r\n|Training Loss  |      Epoch \t|  Step \t | Validation Loss|\r\n|-------|-------|-------|-------|\r\n|1.3185 \t          |     1.0 \t|          1   |\t  1.4256|\r\n|1.3185 \t          |     1.1429 \t|   2 \t |         1.3196|\r\n\r\n**Results from the trainer_state.json:**\r\n\r\n\"log_history\": [\r\n    {\r\n      \"epoch\": 1.0,\r\n      \"grad_norm\": 1.1992276906967163,\r\n      \"learning_rate\": 0.0002,\r\n      \"loss\": 1.3185,\r\n      \"step\": 1\r\n    },\r\n    {\r\n      \"epoch\": 1.0,\r\n      \"eval_loss\": 1.4256268739700317,\r\n      \"eval_runtime\": 1.7474,\r\n      \"eval_samples_per_second\": 1.145,\r\n      \"eval_steps_per_second\": 0.572,\r\n      \"step\": 1\r\n    },\r\n    {\r\n      \"epoch\": 1.1428571428571428,\r\n      \"eval_loss\": 1.3196333646774292,\r\n      \"eval_runtime\": 1.552,\r\n      \"eval_samples_per_second\": 1.289,\r\n      \"eval_steps_per_second\": 0.644,\r\n      \"step\": 2\r\n    },\r\n    {\r\n      \"epoch\": 1.1428571428571428,\r\n      \"step\": 2,\r\n      \"total_flos\": 823612516859904.0,\r\n      \"train_loss\": 0.7439389228820801,\r\n      \"train_runtime\": 27.974,\r\n      \"train_samples_per_second\": 0.5,\r\n      \"train_steps_per_second\": 0.071\r\n    }\r\n\r\nDoes the training loss remain the same, or is there a problem with the model card generation?\r\n\r\n\r\nHave a nice day!",
    "url": "https://github.com/huggingface/alignment-handbook/issues/192",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-08T09:35:40Z",
    "updated_at": "2024-08-08T13:29:00Z",
    "comments": 1,
    "user": "Michelet-Gaetan"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1985,
    "title": "Correct example to use TensorRT?",
    "body": "### System Info\r\n\r\n```shell\r\noptimum: 1.20.0\r\nos: ubuntu 20.04 with RTX 2080TI\r\npython: 3.10.14\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n@michaelbenayoun @JingyaHuang @echarlaix \r\n\r\n### Information\r\n\r\n- [X] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction (minimal, reproducible, runnable)\r\n\r\nI followed the doc [here](https://huggingface.co/docs/optimum/main/en/onnxruntime/usage_guides/gpu#tensorrtexecutionprovider). The below is my code:\r\n\r\n```python\r\nfrom transformers import AutoProcessor\r\nfrom optimum.onnxruntime import ORTModelForVision2Seq\r\n\r\nmodel = 'facebook/nougat-small'\r\nort_model = ORTModelForVision2Seq.from_pretrained(\r\n    \"facebook/nougat-small\",\r\n    export=True,\r\n    provider=\"TensorrtExecutionProvider\",\r\n)\r\n\r\nassert ort_model.providers == [\"TensorrtExecutionProvider\", \"CUDAExecutionProvider\", \"CPUExecutionProvider\"]\r\nprocessor = AutoProcessor.from_pretrained(model)\r\nort_model.save_pretrained('./nougat-small-trt')\r\nprocessor.save_pretrained('./nougat-small-trt')\r\n```\r\n\r\nWhen running the code, the terminal looks like:\r\n\r\n```\r\n2024-08-08 16:31:02.881585368 [W:onnxruntime:Default, tensorrt_execution_provider.h:83 log] [2024-08-08 08:31:02 WARNING] onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped\r\n```\r\n\r\nI waited for almost half an hour for exporting the model (RTX 2080TI). However, when I loaded it by the below code, it just repeated the same thing.\r\n\r\n```python\r\n        session_options = ort.SessionOptions()\r\n        session_options.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL\r\n        session_options.log_severity_level = 3\r\n        trt_engine_cache = './nougat-small-trt-cache'\r\n        os.makedirs(trt_engine_cache, exist_ok=True)\r\n        provider_options = {\r\n            'trt_engine_cache_enable': True,\r\n            'trt_engine_cache_path': trt_engine_cache\r\n        }\r\n        self.model = ORTModelForVision2Seq.from_pretrained(\r\n            model,\r\n            provider='TensorrtExecutionProvider',\r\n            provider_options=provider_options,\r\n            session_options=session_options,\r\n        )\r\n```\r\n\r\nTherefore, I want to know whether Optimum supports TensorRT or not. Or there is something wrong with the official doc to run TensorRT.\r\n\r\n### Expected behavior\r\n\r\nWhen loading the converted model by TensorRT, optimum should not repeat the converting process again.\r\n",
    "url": "https://github.com/huggingface/optimum/issues/1985",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-08T08:46:14Z",
    "updated_at": "2024-08-29T11:24:35Z",
    "comments": 2,
    "user": "sherlcok314159"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9127,
    "title": "flux.1-dev device_map didn't work",
    "body": "I try to use device_map to use multiple gpu's, but it not worked, how can I use all my gpus?\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9127",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-08T08:30:33Z",
    "updated_at": "2024-11-26T02:11:03Z",
    "comments": 33,
    "user": "hznnnnnn"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2994,
    "title": "[Reinforcement Learning] - help on cartpull tutorial",
    "body": "hello im completely new to machine learning and just trying to learn. im getting this warning an none of the figure are showing up (libEGL warning: DRI2: failed to authenticate) does anyone know what i could be missing or what might be the cause? im running this in unraid on a VM with a graphics card passed thru with its drivers installed. using Ubuntu 24.04 LTS fresh install, plz help thanks.\n\ncc @vmoens @nairbv",
    "url": "https://github.com/pytorch/tutorials/issues/2994",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-08T03:33:14Z",
    "updated_at": "2024-08-09T03:47:52Z",
    "user": "Misticfury"
  },
  {
    "repo": "pytorch/vision",
    "number": 8569,
    "title": "Allow ffmpeg-python backend for torchvision.io.write_video?",
    "body": "### \ud83d\ude80 The feature\n\nCreate another backend for torchvision.io.write_video which uses ffmpeg-python as a backend, but which otherwise has exactly the same interface/functionality.\n\n### Motivation, pitch\n\ntorchvision.io.write_video currently calls PyAV, which in turn is a wrapper for ffmpeg. [PyAV has an issue](https://github.com/PyAV-Org/PyAV/issues/371) which seems still unresolved where setting the CRF (constant rate factor) through the options has no effect. [This issue has been referenced as recently as March of this year](https://github.com/imageio/imageio/issues/1062). As far as I can tell, adjusting CRF is the canonical way to tune a video's level of compression. Adding support for ffmpeg-python as a backend would let users tune CRF, which would allow arbitrary levels of compression.\n\n### Alternatives\n\nIf there is some other set of options which can be passed to write_video to alter the level of compression, that would be an acceptable alternative (at least for my use-case). In this case, it would be ideal to include this alternative set of options in the write_video documentation as an example.\n\n### Additional context\n\nI already kind of got it working in a notebook, but it's missing support for audio and such.\r\n\r\n```\r\n# Define output video parameters\r\noutput_filename = 'output_video.mp4'\r\nfps = 30\r\ncodec = 'libx264' \r\n\r\n# Create the input process from the NumPy array\r\nprocess1 = (\r\n    ffmpeg\r\n    .input('pipe:', format='rawvideo', pix_fmt='rgb24', s='{}x{}'.format(video_array.shape[2], video_array.shape[1]))\r\n    .output(output_filename, pix_fmt='yuv420p', r=fps, vcodec=codec, crf=10)\r\n    .overwrite_output()\r\n    .run_async(pipe_stdin=True)\r\n)\r\n\r\n# Write the NumPy array to the input pipe\r\nfor frame in video_array:\r\n    process1.stdin.write(frame.tobytes())\r\n\r\n# Close the input pipe\r\nprocess1.stdin.close()\r\n\r\n# Wait for the ffmpeg process to finish\r\nprocess1.wait()\r\n```\r\ncrf=10 produces something good-looking, while crf=50 produces something very compressed-looking as expected.",
    "url": "https://github.com/pytorch/vision/issues/8569",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-08T01:14:07Z",
    "updated_at": "2024-10-11T11:53:49Z",
    "comments": 1,
    "user": "adaGrad1"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9120,
    "title": "[ar] Translating docs to Arabic (\u0627\u0644\u0639\u0631\u0628\u064a\u0629)",
    "body": "<!--\r\nNote: Please search to see if an issue already exists for the language you are trying to translate.\r\n-->\r\n\r\nHi!\r\n\r\nLet's bring the documentation to all the <languageName>-speaking community \ud83c\udf10.\r\n\r\nWho would want to translate? Please follow the \ud83e\udd17 [TRANSLATING guide](https://github.com/huggingface/diffusers/blob/main/docs/TRANSLATING.md). Here is a list of the files ready for translation. Let us know in this issue if you'd like to translate any, and we'll add your name to the list.\r\n\r\nSome notes:\r\n\r\n* Please translate using an informal tone (imagine you are talking with a friend about Diffusers \ud83e\udd17).\r\n* Please translate in a gender-neutral way.\r\n* Add your translations to the folder called `<languageCode>` inside the [source folder](https://github.com/huggingface/diffusers/tree/main/docs/source).\r\n* Register your translation in `<languageCode>/_toctree.yml`; please follow the order of the [English version](https://github.com/huggingface/diffusers/blob/main/docs/source/en/_toctree.yml).\r\n* Once you're finished, open a pull request and tag this issue by including #issue-number in the description, where issue-number is the number of this issue. Please ping @stevhliu for review.\r\n* \ud83d\ude4b If you'd like others to help you with the translation, you can also post in the \ud83e\udd17 [forums](https://discuss.huggingface.co/c/discussion-related-to-httpsgithubcomhuggingfacediffusers/63).\r\n\r\nThank you so much for your help! \ud83e\udd17\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9120",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-07T21:04:54Z",
    "updated_at": "2024-10-29T08:14:24Z",
    "comments": 2,
    "user": "AhmedAlmaghz"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1394,
    "title": "I need to reload to get the response",
    "body": "![image](https://github.com/user-attachments/assets/7f7ec4b0-7978-468e-b793-d460d528ba84)\r\ni am using LLama 3.1 70B to chat, but it is so slow to get response and i need to reload to get response , is it because the model is overload ?",
    "url": "https://github.com/huggingface/chat-ui/issues/1394",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2024-08-07T09:31:03Z",
    "updated_at": "2024-08-15T06:56:59Z",
    "comments": 2,
    "user": "renaldy-therry"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1393,
    "title": "Generation Error with Ollama - Inconsistent Output Generation",
    "body": "Hi,\r\n\r\nI'm experiencing issues while running GEMMA2 on Ollama. Specifically, I'm encountering the following problems:\r\n\r\nError on Message Generation:\r\n    Whenever a new chat is created, every message results in the error:\r\n\r\n    Error: Generation failed, in the back end\r\n\r\n    No output is generated,on the front end.\r\n\r\nInconsistent Message Handling:\r\n    After retrying the same message multiple times (ranging from 2 to 15 attempts), the message is eventually processed correctly and the output is displayed on the front end.\r\n\r\nServer Responsiveness:\r\n    Despite the above issues, the server responds to every query.\r\n\r\nExpected Behavior:\r\nMessages should be processed and output generated on the first attempt without errors.\r\n\r\nAdditional Context:\r\n\r\n    Ollama Version: 0.3.3\r\n    GEMMA2:2b (I've tried others models and the problem is the same)\r\n    Operating System: CentOS\r\nRelevant Logs:\r\nerror message: \r\n\r\n        ERROR (537688): Generation failed\r\n            err: {\r\n              \"type\": \"Error\",\r\n              \"message\": \"Generation failed\",\r\n              \"stack\":\r\n                  Error: Generation failed\r\n                      at Module.generateFromDefaultEndpoint (/chat-ui/src/lib/server/generateFromDefaultEndpoint.ts:23:9)\r\n                      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n                      at async generateTitle (/chat-ui/src/lib/server/textGeneration/title.ts:54:10)\r\n                      at async Module.generateTitleForConversation (/chat-ui/src/lib/server/textGeneration/title.ts:17:19)\r\n\r\nIts something with the title of the conversation but retrying the message finally the conversations name is changed too. And messages after conversations name is changed have the same problem, rarely it works at first attempt.\r\n\r\nMy env.local:\r\n\r\n      MONGODB_URL=\"mongodb://localhost:27017\"\r\n      HF_TOKEN=Mytoken\r\n      OPENAI_API_KEY=\"ollama\"\r\n      MODELS=`[\r\n        {\r\n            \"name\": \"google/gemma-2-2b-it\",\r\n            \"chatPromptTemplate\": \"{{#each messages}}{{#ifUser}}<start_of_turn>user\\n{{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\\n{{/if}}{{/if}}{{content}}<end_of_turn>\\n<start_of_turn>model\\n{{/ifUser}}{{#ifAssistant}}{{content}}<end_of_turn>\\n{{/ifAssistant}}{{/each}}\",\r\n            \"parameters\": {\r\n              \"temperature\": 0.1,\r\n              \"top_p\": 0.95,\r\n              \"repetition_penalty\": 1.2,\r\n              \"max_new_tokens\": 2048,\r\n              \"stop\": [\"<end_of_turn>\"]\r\n            },\r\n            \"endpoints\": [\r\n              {\r\n               \"type\": \"ollama\",\r\n               \"baseURL\": \"http://127.0.0.1:11434\",\r\n                \"ollamaName\" : \"gemma2:2b\"\r\n              }\r\n            ]\r\n        },\r\n      ]`\r\n      \r\n      USE_LOCAL_WEBSEARCH=true\r\n\r\n\r\n\r\nAny assistance in resolving this issue would be greatly appreciated. Thank you!",
    "url": "https://github.com/huggingface/chat-ui/issues/1393",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-08-07T09:02:19Z",
    "updated_at": "2024-08-07T11:05:19Z",
    "comments": 1,
    "user": "juanjuanignacio"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1392,
    "title": "Cannot send the message and get response in hugging chat",
    "body": "I cannot send message and get a response from llm, and i cannot click \"activate\" to change model in huggingchat (https://huggingface.co/chat/)",
    "url": "https://github.com/huggingface/chat-ui/issues/1392",
    "state": "closed",
    "labels": [
      "support",
      "huggingchat"
    ],
    "created_at": "2024-08-07T08:37:01Z",
    "updated_at": "2024-08-07T09:06:59Z",
    "comments": 4,
    "user": "renaldy-therry"
  },
  {
    "repo": "pytorch/executorch",
    "number": 4579,
    "title": "how to realize the sliding window of kv cache?",
    "body": "hello, \r\nnow I want to realize the sliding window of kv cache, so dynamic allocation and reclamation of memory needs to be realized. could you please teach me how to realize the dynamic allocation and reclamation of memory in the transformer? \r\nThank you in advanced.",
    "url": "https://github.com/pytorch/executorch/issues/4579",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-07T07:05:42Z",
    "updated_at": "2024-08-15T05:04:51Z",
    "user": "l2002924700"
  },
  {
    "repo": "huggingface/text-embeddings-inference",
    "number": 371,
    "title": "how to support a SequenceClassification model",
    "body": "### Feature request\r\n\r\nI have a model can be run by transformers.AutoModelForSequenceClassification.from_pretrained, how can i serve it in TEI\r\n\r\n### Motivation\r\n\r\nto support more models\r\n\r\n### Your contribution\r\n\r\nYES",
    "url": "https://github.com/huggingface/text-embeddings-inference/issues/371",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-06T10:45:00Z",
    "updated_at": "2024-10-17T10:24:09Z",
    "user": "homily707"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1387,
    "title": "CopyToClipBoardBtn in ChatMessage.svelte has a bug?",
    "body": "https://github.com/huggingface/chat-ui/blob/6de97af071c69aa16e8f893adebb46f86bdeeaff/src/lib/components/chat/ChatMessage.svelte#L378-L384\r\n\r\nWhen compared to other components, classNames is the only difference here.\r\nWhen rendered, the icon appears faint in the browser.\r\nIs there a reason for this, or is it a bug?\r\n\r\nhttps://github.com/huggingface/chat-ui/blob/6de97af071c69aa16e8f893adebb46f86bdeeaff/src/lib/components/CopyToClipBoardBtn.svelte#L37-L51\r\n\r\nIt seems that the classNames of IconCopy is the cause of the faintness.",
    "url": "https://github.com/huggingface/chat-ui/issues/1387",
    "state": "closed",
    "labels": [
      "bug",
      "good first issue",
      "front"
    ],
    "created_at": "2024-08-06T04:59:45Z",
    "updated_at": "2024-08-12T09:35:21Z",
    "comments": 5,
    "user": "calycekr"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9092,
    "title": "Fluxpipeline report model_index.json not found",
    "body": "### Describe the bug\r\n\r\nI use the Fluxpipeline and report no file model_index.json.\r\nI read other issue and set the `revision=\"refs/pr/3\"`,but it doesn't work, how can i do to solve this problem and how to use the T5xxl as text encoder? thanks for your help\r\n\r\n### Reproduction\r\n\r\n```\r\nimport torch\r\nfrom diffusers import FluxPipeline\r\n\r\npipe = FluxPipeline.from_pretrained(\"/opt/ml/volume/default/aigc/project/chanPin/models/flux\", revision=\"refs/pr/3\",torch_dtype=torch.bfloat16)\r\npipe.enable_model_cpu_offload()\r\n\r\nprompt = \"a tiny astronaut hatching from an egg on the moon\"\r\nout = pipe(\r\n    prompt=prompt, \r\n    guidance_scale=3.5, \r\n    height=768, \r\n    width=1360, \r\n    num_inference_steps=50,\r\n).images[0]\r\nout.save(\"image.png\")\r\n```\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\nubuntu 20.04\r\n\r\n### Who can help?\r\n\r\n@sayakpaul ",
    "url": "https://github.com/huggingface/diffusers/issues/9092",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-06T01:48:40Z",
    "updated_at": "2024-08-06T02:25:03Z",
    "comments": 3,
    "user": "chongxian"
  },
  {
    "repo": "huggingface/trl",
    "number": 1900,
    "title": "How to speed up PPOTrainer .generate()?",
    "body": "During PPO, I'm finding that `.generate()` is extremely slow. The following call takes ~3 and a half minutes for batch size of 64 with a 1.4B parameter policy LM:\r\n\r\n```\r\nppo_trainer.generate(\r\n                input_token_ids_list,\r\n                pad_token_id=policy_model_tokenizer.eos_token_id,\r\n                return_prompt=False,\r\n                **generation_config_dict,\r\n            )\r\n```\r\n\r\nHow can I accelerate sampling? The same function call with `vllm` takes <30s for setup and execution, so I feel like I am doing something suboptimally.",
    "url": "https://github.com/huggingface/trl/issues/1900",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-05T18:35:31Z",
    "updated_at": "2024-10-01T06:35:50Z",
    "user": "RylanSchaeffer"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1386,
    "title": "System role problem running Gemma 2 on vLLM",
    "body": "Hello,\r\n\r\nIn running chat ui and trying some models, with phi3 and llama i had no problem but when I run gemma2 in vllm Im not able to make any good api request,\r\nin env.local:\r\n{\r\n  \"name\": \"google/gemma-2-2b-it\",\r\n  \"id\": \"google/gemma-2-2b-it\",\r\n  \"chatPromptTemplate\": \"{{#each messages}}{{#ifUser}}<start_of_turn>user\\n{{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\\n{{/if}}{{/if}}{{content}}<end_of_turn>\\n<start_of_turn>model\\n{{/ifUser}}{{#ifAssistant}}{{content}}<end_of_turn>\\n{{/ifAssistant}}{{/each}}\",\r\n  \"parameters\": {\r\n  \"temperature\": 0.1,\r\n  \"top_p\": 0.95,\r\n  \"repetition_penalty\": 1.2,\r\n  \"top_k\": 50,\r\n  \"truncate\": 1000,\r\n  \"max_new_tokens\": 2048,\r\n  \"stop\": [\"<end_of_turn>\"]\r\n  },\r\n  \"endpoints\": [\r\n  {\r\n  \"type\": \"openai\",\r\n  \"baseURL\": \"http://127.0.0.1:8000/v1\",\r\n  \r\n      }\r\n    ]\r\n\r\n}\r\n\r\nand I always have the same response in vllm server:\r\n\r\nERROR 08-05 12:39:06 serving_chat.py:118] Error in applying chat template from request: System role not supported\r\nINFO: 127.0.0.1:42142 - \"POST /v1/chat/completions HTTP/1.1\" 400 Bad Request\r\n\r\ndo someone know if I have to change and how do change the chat template or deactivate system role ? is it a vllm problem or a chat ui problem?\r\n\r\nThank U!",
    "url": "https://github.com/huggingface/chat-ui/issues/1386",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2024-08-05T13:22:10Z",
    "updated_at": "2024-11-07T21:39:47Z",
    "comments": 5,
    "user": "juanjuanignacio"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3060,
    "title": "\u2753 [Question] function `torch._ops.aten.aten::_to_copy` not currently supported with dynamic input shape",
    "body": "## \u2753 Question\r\n\r\nI'm trying to compile a model with dynamic input shape but told that the `function torch._ops.aten.aten::_to_copy` is not currently supported:\r\n```Traceback (most recent call last):\r\n  File \"/home/wh/generative_action/SynHSI/test_module.py\", line 325, in <module>\r\n    model = torch_tensorrt.compile(model, ir=\"dynamo\", inputs=trt_inputs)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch_tensorrt/_compile.py\", line 249, in compile\r\n    trt_graph_module = dynamo_compile(\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch_tensorrt/dynamo/_compiler.py\", line 243, in compile\r\n    trt_gm = compile_module(gm, inputs, settings)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch_tensorrt/dynamo/_compiler.py\", line 431, in compile_module\r\n    trt_module = convert_module(\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/_conversion.py\", line 107, in convert_module\r\n    interpreter_result = interpret_module_to_result(module, inputs, settings)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/_conversion.py\", line 88, in interpret_module_to_result\r\n    interpreter_result = interpreter.run()\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py\", line 336, in run\r\n    self._construct_trt_network_def()\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py\", line 317, in _construct_trt_network_def\r\n    super().run()\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/fx/interpreter.py\", line 147, in run\r\n    self.env[node] = self.run_node(node)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py\", line 378, in run_node\r\n    trt_node: torch.fx.Node = super().run_node(n)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch/fx/interpreter.py\", line 204, in run_node\r\n    return getattr(self, n.op)(n.target, args, kwargs)\r\n  File \"/home/wh/miniconda3/envs/hsi-torch-dev/lib/python3.10/site-packages/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py\", line 480, in call_function\r\n    raise UnsupportedOperatorException(\r\ntorch_tensorrt.dynamo.conversion._TRTInterpreter.UnsupportedOperatorException: Conversion of function torch._ops.aten.aten::_to_copy not currently supported!\r\n```\r\nthe code caused this error is as follow:\r\n`pi = self.positional_encoder.pos_encoding[pi.long()]`\r\nwhere the `self.positional_encoder` is an instance of a customized implementation of the transformer position encoder:\r\n```\r\nclass PositionalEncoding(nn.Module):\r\n    def __init__(self, dim_model, dropout_p, max_len):\r\n        super().__init__()\r\n        # Modified version from: https://pytorch.org/tutorials/beginner/transformer_tutorial.html\r\n        # max_len determines how far the position can have an effect on a token (window)\r\n\r\n        # Info\r\n        self.dropout = nn.Dropout(dropout_p)\r\n\r\n        # Encoding - From formula\r\n        pos_encoding = torch.zeros(max_len, dim_model)\r\n        positions_list = torch.arange(0, max_len, dtype=torch.float).reshape(-1, 1)  # 0, 1, 2, 3, 4, 5\r\n        division_term = torch.exp(\r\n            torch.arange(0, dim_model, 2).float() * (-math.log(10000.0)) / dim_model)  # 1000^(2i/dim_model)\r\n\r\n        # PE(pos, 2i) = sin(pos/1000^(2i/dim_model))\r\n        pos_encoding[:, 0::2] = torch.sin(positions_list * division_term)\r\n\r\n        # PE(pos, 2i + 1) = cos(pos/1000^(2i/dim_model))\r\n        pos_encoding[:, 1::2] = torch.cos(positions_list * division_term)\r\n\r\n        # Saving buffer (same as parameter without gradients needed)\r\n        pos_encoding = pos_encoding.unsqueeze(0).transpose(0, 1)\r\n        self.register_buffer(\"pos_encoding\", pos_encoding)\r\n\r\n    def forward(self, token_embedding: torch.tensor) -> torch.tensor:\r\n        # Residual connection + pos encoding\r\n        return self.dropout(token_embedding + self.pos_encoding[:token_embedding.size(0), :])\r\n\r\n```\r\n\r\n## What you have already tried\r\nThe complete model is complicated so I have tried to implement a minimal reproducible example, but the compilation of a single `PositionalEncoding` model succeed. I also tried adding more context code but it still succeed. I'm unable to get a minimal reproducible example now.\r\n\r\nI found this error only occurs with dynamic input shape. Compiling model with fixed input shape works well.\r\n\r\nBesides, I noticed that  [#2161](https://github.com/pytorch/TensorRT/pull/2161) had added the `_to_copy` converter, so I'm confused why it told me `_to_copy` is not supported, or maybe I misunderstand something?\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch V",
    "url": "https://github.com/pytorch/TensorRT/issues/3060",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-08-05T12:20:32Z",
    "updated_at": "2024-12-12T18:33:18Z",
    "user": "broken-dream"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1981,
    "title": " [GPTQQuantizer] How to use multi-GPU for GPTQQuantizer?",
    "body": "### System Info\r\n\r\n```shell\r\nhello\uff1a\r\nI encountered an out-of-memory error while attempting to quantize a model using GPTQQuantizer. The error seems to be related to the large size of the model weights. Below is the quantization code I used:\r\n\r\nfrom optimum.gptq import GPTQQuantizer\r\n\r\nquantizer = GPTQQuantizer(\r\n    bits=4,\r\n    dataset='wikitext2',\r\n    block_name_to_quantize=decoder.layers,\r\n    disable_exllama=False,\r\n    damp_percent=0.1,\r\n    group_size=128\r\n)\r\n\r\nThe error message I received is as follows:\r\ntorch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 784.00 MiB. GPU 0 has a total capacty of 10.90 GiB of which 770.44 MiB is free. Including non-PyTorch memory\r\n\r\nEnvironment:\r\n\u00b7 Transformers version: 4.43.2\r\n\u00b7 Optimum version: 1.21.2\r\n\u00b7 GPU model and memory: 11GiB * 2\r\n\u00b7 CUDA version: 12.4\r\nQuestion:How to use multi-GPU for GPTQQuantizer? thank you!\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n@kashif @srush @danieldk @mausch @dmaniloff How to use multi-GPU for GPTQQuantizer?\r\n\r\n### Information\r\n\r\n- [x] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction (minimal, reproducible, runnable)\r\n\r\nfrom optimum.gptq import GPTQQuantizer\r\n```python\r\nquantizer = GPTQQuantizer(\r\n    bits=4,\r\n    dataset='wikitext2',\r\n    block_name_to_quantize=decoder.layers,\r\n    disable_exllama=False,\r\n    damp_percent=0.1,\r\n    group_size=128\r\n)\r\n```\r\n\r\n### Expected behavior\r\n\r\nuse multi-GPU for GPTQQuantizer?",
    "url": "https://github.com/huggingface/optimum/issues/1981",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-05T07:58:11Z",
    "updated_at": "2024-08-08T02:19:18Z",
    "user": "RunTian1"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7087,
    "title": "Unable to create dataset card for Lushootseed language",
    "body": "### Feature request\n\nWhile I was creating the dataset which contained all documents from the Lushootseed Wikipedia, the dataset card asked me to enter which language the dataset was in. Since Lushootseed is a critically endangered language, it was not available as one of the options. Is it possible to allow entering languages that aren't available in the options?\n\n### Motivation\n\nI'd like to add more information about my dataset in the dataset card, and the language is one of the most important pieces of information, since the entire dataset is primarily concerned collecting Lushootseed documents.\n\n### Your contribution\n\nI can submit a pull request",
    "url": "https://github.com/huggingface/datasets/issues/7087",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-08-04T14:27:04Z",
    "updated_at": "2024-08-06T06:59:23Z",
    "comments": 2,
    "user": "vaishnavsudarshan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9076,
    "title": "Add a better version of 'callback_on_step_end' for FluxPipeline",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nThere is a huge delay before starting the inference and once the 4th step is complete and there is no callback for that and it feels like it is stuck, just want a more responsive version.\r\n```\r\nprompt = \"A cat holding a sign that says hello world\"\r\nimage = pipe(\r\n    prompt,\r\n    guidance_scale=0.0,\r\n    output_type=\"pil\",\r\n    num_inference_steps=4,\r\n    max_sequence_length=256,\r\n    generator=torch.Generator(\"cuda\").manual_seed(0)\r\n).images[0]\r\nprint('started saving file')\r\nimage.save(\"flux-schnell.png\")\r\n```\r\nIf you run the above code, it feels like you are stuck at step 0 and then after 4/4 is done\r\nI am using a 48GB A40\r\n\r\n**Describe the solution you'd like.**\r\nCan we get some kind of callback for these two delays as well\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/9076",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-08-04T10:34:04Z",
    "updated_at": "2024-11-23T00:24:14Z",
    "comments": 3,
    "user": "nayan-dhabarde"
  },
  {
    "repo": "pytorch/data",
    "number": 1309,
    "title": "what's the exact plan for torchdata now?",
    "body": "hi, as a user of torchdata, i'm very happy to see the resurrection of the project.\r\n\r\ni have a question about the development plan. from the README, i see:\r\n\r\n> torchdata repo to be an iterative enhancement of torch.utils.data.DataLoader\r\n\r\nthis is somewhat surprising. although the current Datapipes seem to have various issues underneath the shell, so far, Datapipes ARE torchdata. the current API reference:\r\n\r\n> API Reference:\r\n> \r\n> [Stateful DataLoader](https://pytorch.org/data/beta/torchdata.stateful_dataloader.html)\r\n> [Iterable-style DataPipes](https://pytorch.org/data/beta/torchdata.datapipes.iter.html)\r\n> [Map-style DataPipes](https://pytorch.org/data/beta/torchdata.datapipes.map.html)\r\n> [Utility Functions](https://pytorch.org/data/beta/torchdata.datapipes.utils.html)\r\n> [DataLoader2](https://pytorch.org/data/beta/dataloader2.html)\r\n> [ReadingService](https://pytorch.org/data/beta/reading_service.html)\r\n\r\nand this is it; i.e., until ver 0.7, torchdata == the datapipes and other necessary utilities (dataloader2 and reading service).\r\n\r\nand that's why it is surprising for me, that while the development of torchdata has re-started, it is being done in a way it discards everything it had.\r\n\r\nso, can i ask for a bit more details about what the new direction (enhancement of torch.utils.data.DataLoader)? or am i missing something here? \r\n\r\nthanks. ",
    "url": "https://github.com/meta-pytorch/data/issues/1309",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-04T00:25:26Z",
    "updated_at": "2024-08-04T00:27:17Z",
    "comments": 1,
    "user": "keunwoochoi"
  },
  {
    "repo": "pytorch/xla",
    "number": 7805,
    "title": "Kaggle Notebooks: TPU detected but wont use",
    "body": "## \u2753 Questions and Help\r\nHi All, \r\nI Have this code \r\n```\r\nimport optuna\r\nfrom torch.optim.lr_scheduler import ReduceLROnPlateau\r\n\r\n# Assuming dataset is already defined\r\ntrain_size = int(0.8 * len(dataset))\r\nval_size = len(dataset) - train_size\r\ntrain_dataset, val_dataset = random_split(dataset, [train_size, val_size])\r\n\r\ndef objective(trial):\r\n    device = xm.xla_device()\r\n    learning_rate = trial.suggest_float('learning_rate', 1e-5, 1e-2, log=True)\r\n    dropout_prob = trial.suggest_float('dropout_prob', 0.2, 0.7)\r\n    batch_size = trial.suggest_int('batch_size', 2, 32)\r\n    optimizer_name = trial.suggest_categorical('optimizer', ['Adam', 'SGD'])\r\n    loss_fn_name = trial.suggest_categorical('loss_fn', ['DiceLoss', 'FocalLoss', 'CombinedLoss', 'BCEWithLogitsLoss'])\r\n    \r\n    backbone = \"resnet101\"\r\n    model_name = \"DeepLabV3Plus\"\r\n    model = create_model(model_name, encoder_name=backbone, in_channels=3, classes=1)\r\n    model.to(device)\r\n    \r\n    if optimizer_name == 'Adam':\r\n        optimizer = optim.Adam(model.parameters(), lr=learning_rate, weight_decay=0.0001)\r\n    elif optimizer_name == 'SGD':\r\n        optimizer = optim.SGD(model.parameters(), lr=learning_rate, momentum=0.9, weight_decay=0.0001)\r\n\r\n    if loss_fn_name == 'DiceLoss':\r\n        loss_fn = DiceLoss()\r\n    elif loss_fn_name == 'FocalLoss':\r\n        loss_fn = FocalLoss()\r\n    elif loss_fn_name == 'CombinedLoss':\r\n        loss_fn = CombinedLoss()\r\n    elif loss_fn_name == 'BCEWithLogitsLoss':\r\n        pos_weight = torch.tensor([1.127], device=device)\r\n        loss_fn = nn.BCEWithLogitsLoss(pos_weight=pos_weight)\r\n\r\n    for module in model.modules():\r\n        if isinstance(module, nn.Conv2d):\r\n            module.add_module('dropout', nn.Dropout2d(dropout_prob))\r\n\r\n    scheduler = ReduceLROnPlateau(optimizer, mode='min', patience=3, factor=0.1)\r\n\r\n    train_loader = DataLoader(train_dataset, batch_size=batch_size, shuffle=True)\r\n    val_loader = DataLoader(val_dataset, batch_size=batch_size, shuffle=False)\r\n\r\n    num_epochs = 5\r\n    best_loss = float('inf')\r\n    \r\n    for epoch in range(num_epochs):\r\n        model.train()\r\n        train_losses = []\r\n        para_loader = pl.ParallelLoader(train_loader, [device])\r\n        for inputs, targets in tqdm(para_loader.per_device_loader(device), desc=f\"Epoch {epoch+1}/{num_epochs} - Training\"):\r\n            inputs, targets = inputs.to(device), targets.to(device)\r\n\r\n            optimizer.zero_grad()\r\n            outputs = model(inputs)\r\n            loss = loss_fn(outputs, targets.float())\r\n            loss.backward()\r\n            xm.optimizer_step(optimizer)\r\n            train_losses.append(loss.item())\r\n\r\n        model.eval()\r\n        val_losses = []\r\n        para_loader = pl.ParallelLoader(val_loader, [device])\r\n        with torch.no_grad():\r\n            for inputs, targets in tqdm(para_loader.per_device_loader(device), desc=f\"Epoch {epoch+1}/{num_epochs} - Validation\"):\r\n                inputs, targets = inputs.to(device), targets.to(device)\r\n                outputs = model(inputs)\r\n                loss = loss_fn(outputs, targets.float())\r\n                val_losses.append(loss.item())\r\n\r\n        val_loss = np.mean(val_losses)\r\n        scheduler.step(val_loss)\r\n\r\n        if val_loss < best_loss:\r\n            best_loss = val_loss\r\n\r\n    return best_loss\r\n\r\n# Save the study to a persistent storage\r\nstudy_name = \"my_study\"\r\nstorage_name = f\"sqlite:///example.db\"\r\nstudy = optuna.create_study(direction='minimize', study_name=study_name, storage=storage_name, load_if_exists=True)\r\nstudy.optimize(objective, n_trials=15)\r\n\r\n# Print the best hyperparameters\r\nprint('Best trial:')\r\ntrial = study.best_trial\r\nprint(f'  Value: {trial.value}')\r\nprint('  Params: ')\r\nfor key, value in trial.params.items():\r\n    print(f'    {key}: {value}')\r\n```\r\nHowever the even though the TPU is detected as `Using device: xla:0` It does not show in dashboard, and the TPU deactivates after while due to not been used. \r\nWould anyone be able to help me with this matter please .\r\nThanks & Best Regards \r\nAMJS",
    "url": "https://github.com/pytorch/xla/issues/7805",
    "state": "closed",
    "labels": [
      "question",
      "xla:tpu"
    ],
    "created_at": "2024-08-03T16:32:58Z",
    "updated_at": "2025-04-01T12:55:08Z",
    "user": "MichaelSchroter"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9069,
    "title": "TypeError: expected np.ndarray (got numpy.ndarray)",
    "body": "### Describe the bug\r\n\r\n``` \r\nimport torch\r\nfrom diffusers import FluxPipeline\r\npipe = FluxPipeline.from_pretrained(\"black-forest-labs/FLUX.1-dev\", torch_dtype=torch.bfloat16)\r\npipe.to(\"cuda\")\r\nprompt = \"A cat holding a sign that says hello world\"\r\n# Depending on the variant being used, the pipeline call will slightly vary.\r\n# Refer to the pipeline documentation for more details.\r\nimage = pipe(prompt, num_inference_steps=4, guidance_scale=0.0).images[0]\r\nimage.save(\"flux.png\")\r\n ```\r\n with this code, it report the error as following:\r\n```\r\n (flux) xiangyu@gpu06:~/st/flux$ python gen.py \r\nLoading pipeline components...:   0%|                                                                                                  | 0/7 [00:00<?, ?it/s]Traceback (most recent call last):\r\n  File \"/scr/user/xiangyu/flux/gen.py\", line 4, in <module>\r\n    pipe = FluxPipeline.from_pretrained(\"black-forest-labs/FLUX.1-dev\", torch_dtype=torch.bfloat16)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py\", line 114, in _inner_fn\r\n    return fn(*args, **kwargs)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py\", line 876, in from_pretrained\r\n    loaded_sub_model = load_sub_model(\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/diffusers/pipelines/pipeline_loading_utils.py\", line 700, in load_sub_model\r\n    loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py\", line 114, in _inner_fn\r\n    return fn(*args, **kwargs)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/diffusers/schedulers/scheduling_utils.py\", line 157, in from_pretrained\r\n    return cls.from_config(config, return_unused_kwargs=return_unused_kwargs, **kwargs)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/diffusers/configuration_utils.py\", line 260, in from_config\r\n    model = cls(**init_dict)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/diffusers/configuration_utils.py\", line 653, in inner_init\r\n    init(self, *args, **init_kwargs)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/diffusers/schedulers/scheduling_flow_match_euler_discrete.py\", line 76, in __init__\r\n    timesteps = torch.from_numpy(timesteps).to(dtype=torch.float32)\r\nTypeError: expected np.ndarray (got numpy.ndarray)\r\n```\r\n\r\n### Reproduction\r\n```python\r\nimport torch\r\nfrom diffusers import FluxPipeline\r\npipe = FluxPipeline.from_pretrained(\"black-forest-labs/FLUX.1-dev\", torch_dtype=torch.bfloat16)\r\npipe.to(\"cuda\")\r\nprompt = \"A cat holding a sign that says hello world\"\r\n# Depending on the variant being used, the pipeline call will slightly vary.\r\n# Refer to the pipeline documentation for more details.\r\nimage = pipe(prompt, num_inference_steps=4, guidance_scale=0.0).images[0]\r\nimage.save(\"flux.png\")\r\n ```\r\n with this code, it report the error as following:\r\n (flux) xiangyu@gpu06:~/st/flux$ python gen.py \r\nLoading pipeline components...:   0%|                                                                                                  | 0/7 [00:00<?, ?it/s]Traceback (most recent call last):\r\n  File \"/scr/user/xiangyu/flux/gen.py\", line 4, in <module>\r\n    pipe = FluxPipeline.from_pretrained(\"black-forest-labs/FLUX.1-dev\", torch_dtype=torch.bfloat16)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py\", line 114, in _inner_fn\r\n    return fn(*args, **kwargs)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py\", line 876, in from_pretrained\r\n    loaded_sub_model = load_sub_model(\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/diffusers/pipelines/pipeline_loading_utils.py\", line 700, in load_sub_model\r\n    loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py\", line 114, in _inner_fn\r\n    return fn(*args, **kwargs)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/diffusers/schedulers/scheduling_utils.py\", line 157, in from_pretrained\r\n    return cls.from_config(config, return_unused_kwargs=return_unused_kwargs, **kwargs)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/diffusers/configuration_utils.py\", line 260, in from_config\r\n    model = cls(**init_dict)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/diffusers/configuration_utils.py\", line 653, in inner_init\r\n    init(self, *args, **init_kwargs)\r\n  File \"/home/user/xiangyu/.conda/envs/flux/lib/python3.10/site-packages/diffusers/schedulers/scheduling_flow_match_euler_discrete.py\", line 76, in __init__\r\n    ti",
    "url": "https://github.com/huggingface/diffusers/issues/9069",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-03T12:45:03Z",
    "updated_at": "2024-10-27T06:43:32Z",
    "comments": 11,
    "user": "xiangyumou"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 1001,
    "title": "[Raspbian] streamlit GUI interface does not work / no documentation how to install",
    "body": "### \ud83d\udc1b Describe the bug\n\n\r\nfrom #985:\r\n> 2. If you're interested in debugging the browser, feel free to spin up another issue with the error message from this\r\n>    > streamlit run torchchat.py -- browser llama3\r\n\r\nThanks, I will.  I suspect it's pretty straightforward - there's no streamlit installed on my system.  I assumed that your install script would install it, or tell me to install it if I needed that?!\r\n\r\n```\r\n$ streamlit\r\nbash: streamlit: command not found\r\n```\r\n\r\nI have no idea what to install for / how to install streamlit, and even less so whether it's available for this platform.  It wasn't high on my list, and so I moved on when it didn't work.  (Was curious to try the GUI just for kicks, in case this was installed by default with the OS.)\r\n\r\nHere's the Raspbian version  I used:\r\n\r\n```\r\n$ uname -a\r\nLinux raspberrypi 6.6.31+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux\r\n```\r\n\r\n\r\nopening a separate issue as suggested in #985 \r\n\r\n\n\n### Versions\n\nwget https://raw.githubusercontent.com/pytorch/pytorch/main/torch/utils/collect_env.py\r\n# For security purposes, please check the contents of collect_env.py before running it.\r\npython collect_env.py\r\n--2024-08-02 20:22:47--  https://raw.githubusercontent.com/pytorch/pytorch/main/torch/utils/collect_env.py\r\nResolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.108.133, 185.199.109.133, ...\r\nConnecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 23357 (23K) [text/plain]\r\nSaving to: 'collect_env.py.1'\r\n\r\ncollect_env.py.1    100%[===================>]  22.81K  --.-KB/s    in 0.005s  \r\n\r\n2024-08-02 20:22:47 (4.57 MB/s) - 'collect_env.py.1' saved [23357/23357]\r\n\r\nCollecting environment information...\r\nPyTorch version: N/A\r\nIs debug build: N/A\r\nCUDA used to build PyTorch: N/A\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Debian GNU/Linux trixie/sid (aarch64)\r\nGCC version: (Debian 13.3.0-3) 13.3.0\r\nClang version: 16.0.6 (27+b1)\r\nCMake version: Could not collect\r\nLibc version: glibc-2.39\r\n\r\nPython version: 3.11.2 (main, May  2 2024, 11:59:08) [GCC 12.2.0] (64-bit runtime)\r\nPython platform: Linux-6.6.31+rpt-rpi-v8-aarch64-with-glibc2.39\r\nIs CUDA available: N/A\r\nCUDA runtime version: Could not collect\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: Could not collect\r\nNvidia driver version: Could not collect\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: N/A\r\n\r\nCPU:\r\nArchitecture:                         aarch64\r\nCPU op-mode(s):                       32-bit, 64-bit\r\nByte Order:                           Little Endian\r\nCPU(s):                               4\r\nOn-line CPU(s) list:                  0-3\r\nVendor ID:                            ARM\r\nModel name:                           Cortex-A76\r\nModel:                                1\r\nThread(s) per core:                   1\r\nCore(s) per cluster:                  4\r\nSocket(s):                            -\r\nCluster(s):                           1\r\nStepping:                             r4p1\r\nCPU(s) scaling MHz:                   100%\r\nCPU max MHz:                          2400.0000\r\nCPU min MHz:                          1500.0000\r\nBogoMIPS:                             108.00\r\nFlags:                                fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp\r\nL1d cache:                            256 KiB (4 instances)\r\nL1i cache:                            256 KiB (4 instances)\r\nL2 cache:                             2 MiB (4 instances)\r\nL3 cache:                             2 MiB (1 instance)\r\nVulnerability Gather data sampling:   Not affected\r\nVulnerability Itlb multihit:          Not affected\r\nVulnerability L1tf:                   Not affected\r\nVulnerability Mds:                    Not affected\r\nVulnerability Meltdown:               Not affected\r\nVulnerability Mmio stale data:        Not affected\r\nVulnerability Reg file data sampling: Not affected\r\nVulnerability Retbleed:               Not affected\r\nVulnerability Spec rstack overflow:   Not affected\r\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\r\nVulnerability Spectre v1:             Mitigation; __user pointer sanitization\r\nVulnerability Spectre v2:             Mitigation; CSV2, BHB\r\nVulnerability Srbds:                  Not affected\r\nVulnerability Tsx async abort:        Not affected\r\n\r\nVersions of relevant libraries:\r\n[pip3] mypy==1.10.1\r\n[pip3] mypy-extensions==1.0.0\r\n[pip3] numpy==1.26.4\r\n[pip3] types-flake8-2020==1.8\r\n[pip3] types-flake8-bugbear==23.9.16\r\n[pip3] types-flake8-builtins==2.2\r\n[pip3] types-flake8-docstrings==1.7\r\n[pip3] types-flake8-plugin-utils==1.3\r\n[pip3] types-flake8-rst-docstrings==0.3\r\n[pip3] types-flake8-simplify==0.21\r\n[pip3] types-flake8-typing-imports==1.15\r\n[pip3] types-mypy-extensions==1.0\r\n[con",
    "url": "https://github.com/pytorch/torchchat/issues/1001",
    "state": "closed",
    "labels": [
      "bug",
      "Browser"
    ],
    "created_at": "2024-08-03T03:24:10Z",
    "updated_at": "2024-08-06T00:32:41Z",
    "user": "sunshinesfbay"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 132559,
    "title": "How to fix tensor.numpy() not supported for torch.export with strict=False",
    "body": "### \ud83d\udc1b Describe the bug\n\nThis is trying to do a BE task to unblock https://github.com/pytorch/pytorch/pull/130977. The problem is very similar to https://github.com/pytorch/pytorch/pull/120261, though that one uses torch.export with strict=True.\r\n\r\n# repro:\r\n```\r\nimport numpy as np\r\nimport torch\r\n\r\nclass MyNumpyModel(torch.nn.Module):\r\n    def __init__(self):\r\n        super(MyNumpyModel, self).__init__()\r\n\r\n    def forward(self, input):\r\n        return input.numpy()\r\n\r\nwith torch._subclasses.FakeTensorMode():\r\n    model = MyNumpyModel()\r\n    _ = torch.export.export(model, args=(torch.randn(1000),), strict=False)\r\n```\r\n\r\n# Error:\r\n```\r\nRuntimeError:.numpy() is not supported for tensor subclasses.\r\n```\r\n\r\n# Attempt:\r\nInside tracing, the tensor is `FunctionalTensor(_to_functional_tensor(FakeTensor(..., size=(1000,))))`, and applying `torch._numpy.ndarray` would turn it into `FunctionalTensor(_to_functional_torch.ndarray(FakeTensor(..., size=(1000,), dtype=float64)))`. \r\n\r\nHowever, I don't know how to make it into a permanent fix. \n\n### Versions\n\nPyTorch version: 2.5.0a0+git0b7d6b3\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.0\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: CentOS Stream 9 (x86_64)\r\nGCC version: (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)\r\nClang version: Could not collect\r\nCMake version: version 3.26.4\r\nLibc version: glibc-2.34\r\n\r\nPython version: 3.10.14 (main, May  6 2024, 19:42:50) [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-5.12.0-0_fbk16_zion_7661_geb00762ce6d2-x86_64-with-glibc2.34\r\nIs CUDA available: True\r\nCUDA runtime version: 12.0.140\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: \r\nGPU 0: NVIDIA PG509-210\r\nGPU 1: NVIDIA PG509-210\r\nGPU 2: NVIDIA PG509-210\r\nGPU 3: NVIDIA PG509-210\r\nGPU 4: NVIDIA PG509-210\r\nGPU 5: NVIDIA PG509-210\r\nGPU 6: NVIDIA PG509-210\r\nGPU 7: NVIDIA PG509-210\r\n\r\nNvidia driver version: 525.105.17\r\ncuDNN version: Probably one of the following:\r\n/usr/lib64/libcudnn.so.8.8.0\r\n/usr/lib64/libcudnn_adv_infer.so.8.8.0\r\n/usr/lib64/libcudnn_adv_train.so.8.8.0\r\n/usr/lib64/libcudnn_cnn_infer.so.8.8.0\r\n/usr/lib64/libcudnn_cnn_train.so.8.8.0\r\n/usr/lib64/libcudnn_ops_infer.so.8.8.0\r\n/usr/lib64/libcudnn_ops_train.so.8.8.0\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                    x86_64\r\nCPU op-mode(s):                  32-bit, 64-bit\r\nAddress sizes:                   46 bits physical, 48 bits virtual\r\nByte Order:                      Little Endian\r\nCPU(s):                          192\r\nOn-line CPU(s) list:             0-191\r\nVendor ID:                       GenuineIntel\r\nModel name:                      Intel(R) Xeon(R) Platinum 8339HC CPU @ 1.80GHz\r\nCPU family:                      6\r\nModel:                           85\r\nThread(s) per core:              2\r\nCore(s) per socket:              24\r\nSocket(s):                       4\r\nStepping:                        11\r\nFrequency boost:                 enabled\r\nCPU(s) scaling MHz:              100%\r\nCPU max MHz:                     1801.0000\r\nCPU min MHz:                     800.0000\r\nBogoMIPS:                        3600.00\r\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx512_bf16 dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req pku ospke avx512_vnni md_clear flush_l1d arch_capabilities\r\nVirtualization:                  VT-x\r\nL1d cache:                       3 MiB (96 instances)\r\nL1i cache:                       3 MiB (96 instances)\r\nL2 cache:                        96 MiB (96 instances)\r\nL3 cache:                        132 MiB (4 instances)\r\nNUMA node(s):                    4\r\nNUMA node0 CPU(s):               0-23,96-119\r\nNUMA node1 CPU(s):               24-47,120-143\r\nNUMA node2 CPU(s):               48-71,144-167\r\nNUMA node3 CPU(s):               72-95,168-191\r\nVulnerability Itlb multihit:     Not affected\r\nVulnerability L1tf:              Not affected\r\nVulnerability Mds:               Not affected\r\nVulnerability Meltdown:          Not affected\r\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp\r\nVulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization",
    "url": "https://github.com/pytorch/pytorch/issues/132559",
    "state": "open",
    "labels": [
      "module: numpy",
      "tensor subclass",
      "module: functionalization",
      "export-triage-review",
      "oncall: export"
    ],
    "created_at": "2024-08-02T23:04:39Z",
    "updated_at": "2024-08-06T18:42:05Z",
    "user": "henrylhtsang"
  },
  {
    "repo": "pytorch/xla",
    "number": 7803,
    "title": "[question] Seeking information on low-level TPU interaction and libtpu.so API",
    "body": "I'm looking to build an automatic differentiation library for TPUs without using high-level front-ends like TensorFlow/JAX/PyTorch-XLA, but I'm finding information about lower-level TPU usage is practically non-existent.\r\n\r\nSpecifically, I'm interested in:\r\n1. How to interact with TPUs at a lower level than what's typically exposed in TensorFlow\r\n2. Information about the libtpu.so library and its API\r\n3. Any resources or documentation on implementing custom TPU operations\r\n\r\nAre there any insights or suggestions on how to approach this, particularly regarding TPU support? Any ideas or help would be greatly appreciated.\r\n\r\nI understand that some of this information might be proprietary, but any guidance on what is possible or available would be very helpful.",
    "url": "https://github.com/pytorch/xla/issues/7803",
    "state": "closed",
    "labels": [
      "question",
      "xla:tpu"
    ],
    "created_at": "2024-08-02T10:16:01Z",
    "updated_at": "2025-04-01T12:56:19Z",
    "user": "notlober"
  },
  {
    "repo": "huggingface/evaluate",
    "number": 611,
    "title": "How to customize my own evaluator and metrics?",
    "body": "I'm facing a task on VQA, where I need to compute [VQA](https://visualqa.org/evaluation.html) accuracy](https://visualqa.org/evaluation.html) as follows:\r\n```math\r\n\\text{Acc}(ans) = \\min{ \\left\\{  \\frac{\\text{\\# humans that said } ans  }{3}, 1 \\right\\} }\r\n```\r\nI have following questions:\r\n1. Do I need to customize my own metric? If so, can I only create `metrics/vqa_accuracy/vqa_accuracy.py` without other operations, such as running `evaluate-cli create \"accuracy name\" --module_type \"metric\"`?\r\n2. I found that there is no suitable `evaluator` for my task, and I'm not sure if it is possible to customize my own `evaluator`, since I didn't find any document on creating new `evaluator`.",
    "url": "https://github.com/huggingface/evaluate/issues/611",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-02T08:37:47Z",
    "updated_at": "2024-08-15T02:26:30Z",
    "user": "Kamichanw"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9055,
    "title": "ImportError: cannot import name 'StableDiffusionLoraLoaderMixin' from 'diffusers.loaders'",
    "body": "### Describe the bug\n\nI get this error in diffusers versions 25,26,27,28,29, how can I solve it?\n\n### Reproduction\n\n\r\nimport ast\r\nimport gc\r\nimport inspect\r\nimport math\r\nimport warnings\r\nfrom collections.abc import Iterable\r\nfrom typing import Any, Callable, Dict, List, Optional, Union\r\n\r\nimport torch\r\nimport torch.nn.functional as F\r\nfrom packaging import version\r\nfrom transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer, CLIPVisionModelWithProjection\r\n\r\nfrom diffusers.configuration_utils import FrozenDict\r\nfrom diffusers.image_processor import PipelineImageInput, VaeImageProcessor\r\nfrom diffusers.loaders import (\r\n    FromSingleFileMixin,\r\n    IPAdapterMixin,\r\n    StableDiffusionLoraLoaderMixin,\r\n    TextualInversionLoaderMixin,\r\n)\r\nfrom diffusers.models import AutoencoderKL, UNet2DConditionModel\r\nfrom diffusers.models.attention import Attention, GatedSelfAttentionDense\r\nfrom diffusers.models.attention_processor import AttnProcessor2_0\r\nfrom diffusers.models.lora import adjust_lora_scale_text_encoder\r\nfrom diffusers.pipelines import DiffusionPipeline\r\nfrom diffusers.pipelines.pipeline_utils import StableDiffusionMixin\r\nfrom diffusers.pipelines.stable_diffusion.pipeline_output import StableDiffusionPipelineOutput\r\nfrom diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker\r\nfrom diffusers.schedulers import KarrasDiffusionSchedulers\r\nfrom diffusers.utils import (\r\n    USE_PEFT_BACKEND,\r\n    deprecate,\r\n    logging,\r\n    replace_example_docstring,\r\n    scale_lora_layers,\r\n    unscale_lora_layers,\r\n)\r\nfrom diffusers.utils.torch_utils import randn_tensor\r\n\n\n### Logs\n\n```shell\nTraceback (most recent call last):\r\n  File \"/home/wrusr/miniconda3/workspace/sd_llm_script_env/workspace/llm_sd.py\", line 149, in <module>\r\n    llm_sd(args=args)\r\n  File \"/home/wrusr/miniconda3/workspace/sd_llm_script_env/workspace/llm_sd.py\", line 10, in llm_sd\r\n    pipe = DiffusionPipeline.from_pretrained(\r\n  File \"/home/wrusr/miniconda3/workspace/sd_llm_script_env/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py\", line 114, in _inner_fn\r\n    return fn(*args, **kwargs)\r\n  File \"/home/wrusr/miniconda3/workspace/sd_llm_script_env/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py\", line 1147, in from_pretrained\r\n    pipeline_class = _get_pipeline_class(\r\n  File \"/home/wrusr/miniconda3/workspace/sd_llm_script_env/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py\", line 380, in _get_pipeline_class\r\n    return get_class_from_dynamic_module(\r\n  File \"/home/wrusr/miniconda3/workspace/sd_llm_script_env/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py\", line 114, in _inner_fn\r\n    return fn(*args, **kwargs)\r\n  File \"/home/wrusr/miniconda3/workspace/sd_llm_script_env/lib/python3.10/site-packages/diffusers/utils/dynamic_modules_utils.py\", line 452, in get_class_from_dynamic_module\r\n    return get_class_in_module(class_name, final_module.replace(\".py\", \"\"))\r\n  File \"/home/wrusr/miniconda3/workspace/sd_llm_script_env/lib/python3.10/site-packages/diffusers/utils/dynamic_modules_utils.py\", line 164, in get_class_in_module\r\n    module = importlib.import_module(module_path)\r\n  File \"/usr/lib/python3.10/importlib/__init__.py\", line 126, in import_module\r\n    return _bootstrap._gcd_import(name[level:], package, level)\r\n  File \"<frozen importlib._bootstrap>\", line 1050, in _gcd_import\r\n  File \"<frozen importlib._bootstrap>\", line 1027, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 1006, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 688, in _load_unlocked\r\n  File \"<frozen importlib._bootstrap_external>\", line 883, in exec_module\r\n  File \"<frozen importlib._bootstrap>\", line 241, in _call_with_frames_removed\r\n  File \"/home/wrusr/.cache/huggingface/modules/diffusers_modules/git/llm_grounded_diffusion.py\", line 32, in <module>\r\n    from diffusers.loaders import (\r\nImportError: cannot import name 'StableDiffusionLoraLoaderMixin' from 'diffusers.loaders' (/home/wrusr/miniconda3/workspace/sd_llm_script_env/lib/python3.10/site-packages/diffusers/loaders/__init__.py)\n```\n\n\n### System Info\n\ntorch==2.0.1\r\ntorchvision==0.15.2\r\ntorchaudio==2.0.2\r\naccelerate==0.21.0\r\ntransformers==4.39.3\r\ndiffusers==0.27.2\r\npeft==0.10.0\r\nnumpy==1.25.2\r\npython3.10\n\n### Who can help?\n\n@yiyixuxu @asomoza",
    "url": "https://github.com/huggingface/diffusers/issues/9055",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-08-02T07:58:16Z",
    "updated_at": "2024-08-02T09:32:12Z",
    "comments": 2,
    "user": "MehmetcanTozlu"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1980,
    "title": "Issue converting moss-moon-003-sft-int4 model to ONNX format",
    "body": "### System Info\n\n```shell\nI've been working with the owlv2 model and have encountered an issue while attempting to convert it into ONNX format using the provided command:\r\noptimum-cli export onnx --task text-generation -m\"/HDD/cz/tools/moss/\" --trust-remote-code \"HDD/cz/moss_onnx/\"\r\nUnfortunately, I'm facing the following error:\r\nTrying to export a moss model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`.\r\nAs I am relatively new to this process, I'm unsure about the necessity and usage of custom ONNX configuration. Could you please provide some guidance on how to address this issue? Any assistance or insights would be greatly appreciated.\r\n\r\nThank you for your attention to this matter.\n```\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nhttps://huggingface.co/fnlp/moss-moon-003-sft-int4/tree/main\n\n### Expected behavior\n\nConvert the model to onnx format",
    "url": "https://github.com/huggingface/optimum/issues/1980",
    "state": "open",
    "labels": [
      "bug",
      "onnx"
    ],
    "created_at": "2024-08-02T01:18:46Z",
    "updated_at": "2024-10-08T15:51:12Z",
    "comments": 0,
    "user": "ZhiChengWHU"
  },
  {
    "repo": "pytorch/executorch",
    "number": 4510,
    "title": "How to link custom ops?",
    "body": "Hi!\r\n\r\nI'm trying to integrate some of quantized MatMul C++ kernels into Executorch and I'm having a bad time: the documentation is very vague about what exactly I need to include/link for ATen to pick up my ops.\r\n\r\nI would greatly appreciate any help in trying to make it work.\r\n\r\n### Overview:\r\n\r\nSource code for the dynamic library containing the ops consists of 3 files: `lut_kernel.h`, `lut_kernel.cpp`, `lut_kernel_pytorch.cpp`. The files contain roughly this code:\r\n\r\n```c++\r\n// lut_kernel.h\r\n#pragma once\r\n\r\n#include <executorch/runtime/kernel/kernel_includes.h>\r\n\r\nnamespace torch {\r\nnamespace executor {\r\n\r\nnamespace native {\r\n\r\nTensor& code2x8_lut_matmat_out(\r\n  RuntimeContext& ctx,\r\n  const Tensor& input,\r\n  const Tensor& codes,\r\n  const Tensor& codebooks,\r\n  const Tensor& scales,\r\n  const optional<Tensor>& bias,\r\n  Tensor& out\r\n);\r\n} // namespace native\r\n} // namespace executor\r\n} // namespace torch\r\n```\r\n\r\n```c++\r\n// lut_kernel.cpp\r\n#include \"lut_kernel.h\"\r\n\r\n#include <executorch/extension/kernel_util/make_boxed_from_unboxed_functor.h>\r\n\r\nnamespace torch {\r\n  namespace executor {\r\n    namespace native {\r\n      Tensor& code2x8_lut_matmat_out(\r\n        RuntimeContext& ctx,\r\n        const Tensor& input,\r\n        const Tensor& codes,\r\n        const Tensor& codebooks,\r\n        const Tensor& scales,\r\n        const optional<Tensor>& bias,\r\n        Tensor& out\r\n      ) {\r\n        // CALCULATIONS\r\n        return out;\r\n      }\r\n    } // namespace native\r\n  } // namespace executor\r\n} // namespace torch\r\n\r\nEXECUTORCH_LIBRARY(aqlm, \"code2x8_lut_matmat.out\", torch::executor::native::code2x8_lut_matmat_out);\r\n```\r\n\r\n```c++\r\n// lut_kernel_pytorch.cpp\r\n#include \"lut_kernel.h\"\r\n\r\n#include <executorch/extension/aten_util/make_aten_functor_from_et_functor.h>\r\n#include <executorch/extension/kernel_util/make_boxed_from_unboxed_functor.h>\r\n\r\n#include <torch/library.h>\r\n\r\nnamespace torch {\r\n    namespace executor {\r\n        namespace native {\r\n            Tensor& code2x8_lut_matmat_out_no_context(\r\n                ...\r\n                Tensor& output\r\n            ) {\r\n                void* memory_pool = malloc(10000000 * sizeof(uint8_t));\r\n                MemoryAllocator allocator(10000000, (uint8_t*)memory_pool);\r\n\r\n                exec_aten::RuntimeContext context{nullptr, &allocator};\r\n                return torch::executor::native::code2x8_lut_matmat_out(\r\n                    context,\r\n                    ...,\r\n                    output\r\n                );\r\n            }\r\n\r\n            at::Tensor code2x8_lut_matmat(\r\n                ...\r\n            ) {\r\n                auto sizes = input.sizes().vec();\r\n                sizes[sizes.size() - 1] = codes.size(1) * codebooks.size(2);\r\n                auto out = at::empty(sizes,\r\n                    at::TensorOptions()\r\n                    .dtype(input.dtype())\r\n                    .device(input.device())\r\n                );\r\n\r\n                WRAP_TO_ATEN(code2x8_lut_matmat_out_no_context, 5)(\r\n                    ...,\r\n                    out\r\n                );\r\n                return out;\r\n            }\r\n        } // namespace native\r\n    } // namespace executor\r\n} // namespace torch\r\n\r\nTORCH_LIBRARY(aqlm, m) {\r\n  m.def(\r\n      \"code2x8_lut_matmat(Tensor input, Tensor codes, \"\r\n      \"Tensor codebooks, Tensor scales, Tensor? bias=None) -> Tensor\"\r\n  );\r\n  m.def(\r\n      \"code2x8_lut_matmat.out(Tensor input, Tensor codes, \"\r\n      \"Tensor codebooks, Tensor scales, Tensor? bias=None, *, Tensor(c!) out) -> Tensor(c!)\"\r\n  );\r\n}\r\n\r\nTORCH_LIBRARY_IMPL(aqlm, CompositeExplicitAutograd, m) {\r\n  m.impl(\r\n      \"code2x8_lut_matmat\", torch::executor::native::code2x8_lut_matmat\r\n  );\r\n  m.impl(\r\n      \"code2x8_lut_matmat.out\",\r\n      WRAP_TO_ATEN(torch::executor::native::code2x8_lut_matmat_out_no_context, 5)\r\n    );\r\n}\r\n```\r\n\r\n, which closely follows the executorch custom sdpa code.\r\n\r\nI build it as two standalone dynamic libs: one `lut_kernel.cpp` with dependency only on `executorch` and `lut_kernel_pytorch.cpp` with additional `torch` dependency. I load the latter lib into pytorch as `torch.ops.load_library(f\"../libaqlm_bindings.dylib\")`.\r\n\r\n### The problem: \r\n\r\nI wrote a small `nn.Module` that basically just calls the op. In pytorch it works well. `aten_dialect` for it looks like this:\r\n```\r\nExportedProgram:\r\n    class GraphModule(torch.nn.Module):\r\n        def forward(self, p_codes: \"i8[3072, 128, 2]\", p_codebooks: \"f32[2, 256, 1, 8]\", p_scales: \"f32[3072, 1, 1, 1]\", p_bias: \"f32[3072]\", input: \"f32[s0, s1, 1024]\"):\r\n            input_1 = input\r\n            \r\n            # File: [/Users/blacksamorez/reps/AQLM/inference_lib/src/aqlm/inference.py:74](https://file+.vscode-resource.vscode-cdn.net/Users/blacksamorez/reps/AQLM/inference_lib/src/aqlm/inference.py:74) in forward, code: return torch.ops.aqlm.code2x8_lut_matmat(\r\n            code2x8_lut_matmat: \"f32[s0, s1, 1024]\" = torch.ops.aqlm.code2x8_lut_matmat.default(input_1, p_codes, p_codebooks, p_scales, p_bias);  input_1 = p_codes",
    "url": "https://github.com/pytorch/executorch/issues/4510",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-01T21:16:01Z",
    "updated_at": "2024-08-21T21:09:03Z",
    "user": "BlackSamorez"
  },
  {
    "repo": "huggingface/transformers",
    "number": 32376,
    "title": "AutoModel how to modify config?",
    "body": "```\r\nconfig = AutoConfig.from_pretrained(\r\n                    **self.params, trust_remote_code=True\r\n                )\r\n                config.vision_config.use_flash_attn = False\r\n                print(config.vision_config)\r\n                self.model = AutoModel.from_pretrained(\r\n                    **self.params, trust_remote_code=True, config=config\r\n                ).eval()\r\n```\r\n\r\nI need disable `use_flash_attn ` to False forcely when loading a model from pretrained. But looks like the config set didn't have any effect.\r\n\r\nWhy and how",
    "url": "https://github.com/huggingface/transformers/issues/32376",
    "state": "closed",
    "labels": [],
    "created_at": "2024-08-01T12:40:44Z",
    "updated_at": "2024-08-02T02:30:22Z",
    "user": "lucasjinreal"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9039,
    "title": "how to load_lora_weights in FlaxStableDiffusionPipeline",
    "body": "### Describe the bug\n\nhow to load lora in FlaxStableDiffusionPipeline, there are no load_lora_weights in FlaxStableDiffusionPipeline\n\n### Reproduction\n\nN/A\n\n### Logs\n\n_No response_\n\n### System Info\n\nkaggle tpu vm\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9039",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-08-01T11:23:52Z",
    "updated_at": "2024-10-15T03:23:54Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9038,
    "title": "how to use prompt weight in FlaxStableDiffusionPipeline",
    "body": "### Describe the bug\n\nI can see there are prompt_embeds in StableDiffusionPipeline to support Prompt weighting, But how to do that in FlaxStableDiffusionPipeline? there are not prompt_embeds in StableDiffusionPipeline\n\n### Reproduction\n\nN/A\n\n### Logs\n\n_No response_\n\n### System Info\n\nkaggle tpu vm \n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9038",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-08-01T10:44:37Z",
    "updated_at": "2024-10-14T18:25:55Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 989,
    "title": "Weird model behaviour on Server/Browser: Looks like it's not using the template",
    "body": "Hi,\r\n\r\nI'm trying out the torchchat right now, started the streamlit application with llama3 model\r\n![image](https://github.com/user-attachments/assets/3ee31c11-29ed-423a-ac29-c155bf38ebcf)\r\n\r\nI just texted Hi !!\r\n- Why is this text generation behaviour unusal , Is it the problem with model being converted to torchchat format ?\r\n\r\n![image](https://github.com/user-attachments/assets/4d38eb53-a4f4-4a58-bae0-09a7169219e9)\r\n",
    "url": "https://github.com/pytorch/torchchat/issues/989",
    "state": "open",
    "labels": [
      "bug",
      "actionable",
      "Browser"
    ],
    "created_at": "2024-08-01T05:52:19Z",
    "updated_at": "2024-08-02T08:05:45Z",
    "comments": 2,
    "user": "akhilreddy0703"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 988,
    "title": "Could we request support for a smallish (~4-5B param) modern vision LLM? LLava-1.6 or Nanollava?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHaving good basic pytorch support for inferencing LLMs is key to continued success of pytorch. Vision LLM models tend to have uneven support on mainstream inferencing engines like Llama.cpp due to the need to reimplement CLIP/SIGLIP etc. Pytorch could natively support performant vision LLMs with quantization on ARM devices, which would make a big difference in usability. \n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### RFC (Optional)\n\n_No response_",
    "url": "https://github.com/pytorch/torchchat/issues/988",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-08-01T03:59:17Z",
    "updated_at": "2024-08-01T05:50:16Z",
    "comments": 1,
    "user": "kinchahoy"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9032,
    "title": "how to get the minimun working example of FlaxStableDiffusionPipeline in google colab with tpu runtime",
    "body": "### Describe the bug\n\nI try the code in google colab with tpu runtime\r\n```\r\n! python3 -m pip install -U diffusers[flax]\r\nimport diffusers, os\r\npipeline = diffusers.StableDiffusionPipeline.from_single_file('https://huggingface.co/chaowenguo/pal/blob/main/chilloutMix-Ni.safetensors')\r\npipeline.save_pretrained('chilloutMix', safe_serialization=False)\r\npipeline, params = diffusers.FlaxStableDiffusionPipeline.from_pretrained('./chilloutMix', from_pt=True, safety_checker=None)\r\n```\r\nI always get Your session crashed for an unknown reason. I want to get the mininum working example in google colab with tpu runtime\n\n### Reproduction\n\nN/A\n\n### Logs\n\n_No response_\n\n### System Info\n\ngoogle colab with tpu runtime\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9032",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-08-01T03:58:34Z",
    "updated_at": "2024-11-04T15:04:13Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9031,
    "title": "how to disable safty_checker in FlaxStableDiffusionPipeline",
    "body": "### Describe the bug\n\n```\r\n! python3 -m pip install -U tensorflow-cpu\r\nimport diffusers, os\r\npipeline = diffusers.StableDiffusionPipeline.from_single_file('https://huggingface.co/chaowenguo/pal/blob/main/chilloutMix-Ni.safetensors')\r\npipeline.save_pretrained('chilloutMix', safe_serialization=False)\r\npipeline, params = diffusers.FlaxStableDiffusionPipeline.from_pretrained('./chilloutMix', from_pt=True)\r\n```\r\nI always complains\r\n```\r\nPipeline <class 'diffusers.pipelines.stable_diffusion.pipeline_flax_stable_diffusion.FlaxStableDiffusionPipeline'> expected {'text_encoder', 'unet', 'scheduler', 'safety_checker', 'feature_extractor', 'vae', 'tokenizer'}, but only {'text_encoder', 'unet', 'scheduler', 'feature_extractor', 'vae', 'tokenizer'} were passed.\r\n```\r\nI want to know how to disable safety_checker in FlaxStableDiffusionPipeline\r\nI try:\r\npipeline, params = diffusers.FlaxStableDiffusionPipeline.from_pretrained('./chilloutMix', from_pt=True, safety_checker=None)\r\nNot working \n\n### Reproduction\n\nN/A\n\n### Logs\n\n_No response_\n\n### System Info\n\nkaggle tpu vm\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9031",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-08-01T03:48:27Z",
    "updated_at": "2024-10-13T15:03:54Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/llm.nvim",
    "number": 106,
    "title": "How to use openai api?",
    "body": "I read the code, and it seems support real openai api. But When I set it up something is wrong.\r\nJust make sure if this supports open ai api? I mean realy openai api.",
    "url": "https://github.com/huggingface/llm.nvim/issues/106",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-31T23:51:42Z",
    "updated_at": "2024-10-18T13:49:11Z",
    "user": "4t8dd"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9025,
    "title": "how to use FlaxStableDiffusionPipeline with from_single_file in kaggle tpu vm",
    "body": "### Describe the bug\n\nI have single safetensors file and work on diffusers.StableDiffusionPipeline.from_single_file\r\nNow I want to use FlaxStableDiffusionPipeline but there are not .from_single_file member function in FlaxStableDiffusionPipeline\r\nI need to\r\n```\r\npipeline = diffusers.StableDiffusionPipeline.from_single_file()\r\npipeline.save_pretrained('current')\r\npipeline, params = diffusers.FlaxStableDiffusionPipeline.from_pretrained('./current')\r\n```\r\nNow I get [Error no file named diffusion_flax_model.msgpack or diffusion_pytorch_model.bin found in directory ./current/vae.] there are just diffusion_pytorch_model.safetensors. what I should do to get diffusion_pytorch_model.bin from diffusion_pytorch_model.safetensors\n\n### Reproduction\n\nN/A\n\n### Logs\n\n_No response_\n\n### System Info\n\nkaggle tpu vm \n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/9025",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-07-31T10:44:48Z",
    "updated_at": "2024-08-01T03:59:51Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3049,
    "title": "Is jetpack 6.0 for jetson agx orin supported?",
    "body": "I tried installing torch_tensorrt using jetpack 5.0 WORKSPACE script but it did not work for my system which is currently using jetpack 6.0 on the jetson agx orin",
    "url": "https://github.com/pytorch/TensorRT/issues/3049",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-31T03:06:24Z",
    "updated_at": "2024-09-12T21:11:40Z",
    "user": "dhruvmsheth"
  },
  {
    "repo": "pytorch/xla",
    "number": 7774,
    "title": "ddp documentation issues",
    "body": "## \ud83d\udcda Documentation\r\n\r\nOur [documentations](https://pytorch.org/xla/release/2.3/index.html#how-to-use-distributeddataparallel) suggests users must use the following parameters while setting up DDP. This information is outdated. Please remove any such documentations.\r\n\r\n```\r\nos.environ['MASTER_ADDR'] = 'localhost'\r\nos.environ['MASTER_PORT'] = '12355'\r\n```\r\n\r\nreplace with\r\n```\r\nos.environ['PJRT_DEVICE'] = 'TPU'\r\n```",
    "url": "https://github.com/pytorch/xla/issues/7774",
    "state": "closed",
    "labels": [
      "usability",
      "documentation"
    ],
    "created_at": "2024-07-30T18:53:45Z",
    "updated_at": "2024-10-30T16:46:30Z",
    "comments": 1,
    "user": "miladm"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 873,
    "title": "Absolute speaker diarization?",
    "body": "### Question\n\nI've just managed to integrate the new speaker diarization feature into my project. Very cool stuff. My goal is to let people record meetings, summarize them, and then also list per-speaker tasks. This seems to be a popular feature.\r\n\r\n\r\nOne thing I'm running into is that I don't feed Whisper a single long audio file. Instead I use VAD to feed it small chunks of live audio whenever someone speaks.\r\n\r\nHowever, as far as I can tell the speaker diarization only works \"relatively\", detecting speakers within a single audio file.\r\n\r\nIs there a way to let it detect and 'sort' the correct speaker over multiple audio files? Perhaps it could remember the 'audio fingerprints' of the speakers somehow?\r\n\r\n![record_meeting](https://github.com/user-attachments/assets/3142272f-efad-4766-9614-b996d3f4b080)\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/873",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-30T15:09:23Z",
    "updated_at": "2024-08-12T12:12:07Z",
    "user": "flatsiedatsie"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 969,
    "title": "Running `torchchat export` with just the model name does not error out",
    "body": "### \ud83d\udc1b Describe the bug\n\nRunning `python torchchat.py export stories15M` does not error out, nor generates any export files, though it should have?\r\n```shell\r\n% python torchchat.py export stories15M; echo $?\r\nlm_eval is not installed, GPTQ may not be usable\r\nUsing device=mps\r\nWarning! Device MPS not supported for export. Exporting for device CPU.\r\nLoading model...\r\nTime to load model: 0.02 seconds\r\n-----------------------------------------------------------\r\n0\r\n```\n\n### Versions\n\nNo idea, where is the torchchat version defined?",
    "url": "https://github.com/pytorch/torchchat/issues/969",
    "state": "closed",
    "labels": [
      "bug",
      "actionable"
    ],
    "created_at": "2024-07-30T13:56:14Z",
    "updated_at": "2024-11-26T19:43:00Z",
    "comments": 2,
    "user": "malfet"
  },
  {
    "repo": "pytorch/executorch",
    "number": 4461,
    "title": "How to dispatch SDPA to XNNPACK?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI\u2019m currently working on dispatching the SDPA operations to XNNPACK. To accomplish this, I\u2019ve added `torch.nn.functional.scaled_dot_product_attention` to the `SUPPORTED_DYN_QUANT_LINEAR_MODULES` in the `backends/xnnpack/partition/configs.py` file, as shown in the code block below.\r\n\r\n```python\r\n# Modules which support dynamic quantization\r\n# These already support dynamic shape.\r\nSUPPORTED_DYN_QUANT_LINEAR_MODULES = [\r\n    torch.nn.Linear,\r\n    torch.nn.functional.linear,\r\n    torch.nn.functional.scaled_dot_product_attention,\r\n]\r\n```\r\n\r\nI attempted to run the llama example using the following command:\r\n```python\r\npython -m examples.models.llama2.export_llama --checkpoint ./stories110M/stories110M.pt -p ./stories110M/params.json -X -kv -qmode 8da4w --group_size 128 -d fp32 -o ptes -n stories110M_test_xnnpack\r\n```\r\nUnfortunately, an error occurred. Please find the full backtrace attached below.\r\n```shell\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.10/runpy.py\", line 196, in _run_module_as_main\r\n    return _run_code(code, main_globals, None,\r\n  File \"/usr/lib/python3.10/runpy.py\", line 86, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/workspace/executorch/examples/models/llama2/export_llama.py\", line 31, in <module>\r\n    main()  # pragma: no cover\r\n  File \"/workspace/executorch/examples/models/llama2/export_llama.py\", line 27, in main\r\n    export_llama(modelname, args)\r\n  File \"/workspace/executorch/examples/models/llama2/export_llama_lib.py\", line 332, in export_llama\r\n    builder = _export_llama(modelname, args)\r\n  File \"/workspace/executorch/examples/models/llama2/export_llama_lib.py\", line 511, in _export_llama\r\n    backend = builder_exported_to_edge.to_backend(partitioners)\r\n  File \"/workspace/executorch/examples/models/llama2/builder.py\", line 249, in to_backend\r\n    self.edge_manager = self.edge_manager.to_backend(partitioner)\r\n  File \"/workspace/executorch/exir/program/_program.py\", line 1165, in to_backend\r\n    new_edge_programs[name] = to_backend(program, partitioner)\r\n  File \"/usr/lib/python3.10/functools.py\", line 889, in wrapper\r\n    return dispatch(args[0].__class__)(*args, **kw)\r\n  File \"/workspace/executorch/exir/backend/backend_api.py\", line 384, in _\r\n    tagged_graph_module = _partition_and_lower(\r\n  File \"/workspace/executorch/exir/backend/backend_api.py\", line 299, in _partition_and_lower\r\n    partitioned_module = _partition_and_lower_one_graph_module(\r\n  File \"/workspace/executorch/exir/backend/backend_api.py\", line 230, in _partition_and_lower_one_graph_module\r\n    lowered_submodule = to_backend(\r\n  File \"/usr/lib/python3.10/functools.py\", line 889, in wrapper\r\n    return dispatch(args[0].__class__)(*args, **kw)\r\n  File \"/workspace/executorch/exir/backend/backend_api.py\", line 114, in _\r\n    preprocess_result: PreprocessResult = cls.preprocess(\r\n  File \"/workspace/executorch/backends/xnnpack/xnnpack_preprocess.py\", line 159, in preprocess\r\n    raise RuntimeError(\r\nRuntimeError: For scalar_tensor, call_function:scalar_tensor.default is not supported in XNNPACK Delegate\r\n```\r\n\r\nI believe the SDPA can be integrated with XNNPACK, but I'm unsure of the correct approach. Could you please offer guidance on how to do this?\r\n\r\n### Versions\r\n\r\nCollecting environment information...\r\nPyTorch version: 2.4.0a0+git9afe4ec\r\nIs debug build: False\r\nCUDA used to build PyTorch: None\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 22.04.4 LTS (x86_64)\r\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\r\nClang version: Could not collect\r\nCMake version: version 3.30.0\r\nLibc version: glibc-2.35\r\n\r\nPython version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (64-bit runtime)\r\nPython platform: Linux-6.5.0-14-generic-x86_64-with-glibc2.35\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                       x86_64\r\nCPU op-mode(s):                     32-bit, 64-bit\r\nAddress sizes:                      46 bits physical, 48 bits virtual\r\nByte Order:                         Little Endian\r\nCPU(s):                             36\r\nOn-line CPU(s) list:                0-35\r\nVendor ID:                          GenuineIntel\r\nModel name:                         Intel(R) Core(TM) i9-10980XE CPU @ 3.00GHz\r\nCPU family:                         6\r\nModel:                              85\r\nThread(s) per core:                 2\r\nCore(s) per socket:                 18\r\nSocket(s):                          1\r\nStepping:                           7\r\nCPU max MHz:                        4500.0000\r\nCPU min MHz:                        1200.0000\r\nBogoMIPS:                           6000.00\r\nFlags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall ",
    "url": "https://github.com/pytorch/executorch/issues/4461",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-30T06:32:29Z",
    "updated_at": "2024-08-02T01:44:09Z",
    "user": "DzAvril"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 872,
    "title": "Please provide extensive examples of how to use langchain...",
    "body": "Here's an example script I'm using, which I believes leverages the ```recursivecharactertextsplitter``` from Langchain.  I'd love to replicate my vector db program to the extent I'm able using javascript within a browser but need more examples/help...\r\n\r\n```\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n    <title>PDF Text Extraction with Overlapping Chunks</title>\r\n    <script src=\"https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.10.377/pdf.min.js\"></script>\r\n    <style>\r\n        .chunk-content {\r\n            word-wrap: break-word;\r\n            white-space: pre-wrap;\r\n            width: 100ch;\r\n        }\r\n    </style>\r\n</head>\r\n<body>\r\n    <h1>Extract Text from PDF</h1>\r\n    <input type=\"file\" id=\"fileInput\" accept=\"application/pdf\" />\r\n    <button onclick=\"extractText()\">Extract Text</button>\r\n    <div id=\"output\"></div>\r\n    <script type=\"module\">\r\n        // Define the RecursiveCharacterTextSplitter class\r\n        class RecursiveCharacterTextSplitter {\r\n            constructor({ chunkSize = 600, chunkOverlap = 200, keepSeparator = false }) {\r\n                this.chunkSize = chunkSize;\r\n                this.chunkOverlap = chunkOverlap;\r\n                this.keepSeparator = keepSeparator;\r\n            }\r\n\r\n            async splitText(text) {\r\n                const separators = ['\\n\\n', '\\n', ' ', ''];\r\n                let chunks = [text];\r\n                for (const separator of separators) {\r\n                    chunks = this._splitChunks(chunks, separator);\r\n                    if (chunks.every(chunk => chunk.length <= this.chunkSize)) {\r\n                        break;\r\n                    }\r\n                }\r\n                return chunks;\r\n            }\r\n\r\n            _splitChunks(chunks, separator) {\r\n                let newChunks = [];\r\n                for (let chunk of chunks) {\r\n                    if (chunk.length <= this.chunkSize) {\r\n                        newChunks.push(chunk);\r\n                    } else {\r\n                        const parts = chunk.split(separator);\r\n                        let tempChunk = '';\r\n                        for (let part of parts) {\r\n                            if (tempChunk.length + part.length + separator.length > this.chunkSize) {\r\n                                newChunks.push(tempChunk);\r\n                                tempChunk = part + (this.keepSeparator ? separator : '');\r\n                            } else {\r\n                                tempChunk += part + separator;\r\n                            }\r\n                        }\r\n                        if (tempChunk) {\r\n                            newChunks.push(tempChunk);\r\n                        }\r\n                    }\r\n                }\r\n                return newChunks;\r\n            }\r\n        }\r\n\r\n        // Function to extract text from PDF\r\n        async function extractText() {\r\n            const fileInput = document.getElementById('fileInput');\r\n            const output = document.getElementById('output');\r\n            if (!fileInput.files.length) {\r\n                alert('Please select a PDF file.');\r\n                return;\r\n            }\r\n            const file = fileInput.files[0];\r\n            const fileReader = new FileReader();\r\n            fileReader.onload = async function () {\r\n                const typedarray = new Uint8Array(this.result);\r\n                const loadingTask = pdfjsLib.getDocument(typedarray);\r\n                const pdf = await loadingTask.promise;\r\n                let text = '';\r\n                for (let i = 1; i <= pdf.numPages; i++) {\r\n                    const page = await pdf.getPage(i);\r\n                    const content = await page.getTextContent();\r\n                    const strings = content.items.map(item => item.str);\r\n                    text += strings.join(' ') + '\\n';\r\n                }\r\n                displayOverlappingChunks(text);\r\n            };\r\n            fileReader.readAsArrayBuffer(file);\r\n        }\r\n\r\n        // Function to display text chunks\r\n        async function displayOverlappingChunks(text) {\r\n            const output = document.getElementById('output');\r\n            output.innerHTML = ''; // Clear previous content\r\n\r\n            const splitter = new RecursiveCharacterTextSplitter({\r\n                chunkSize: 600,\r\n                chunkOverlap: 200,\r\n                keepSeparator: true\r\n            });\r\n\r\n            const chunks = await splitter.splitText(text);\r\n\r\n            // Display total number of chunks\r\n            const totalChunksElement = document.createElement('h2');\r\n            totalChunksElement.textContent = `Total Chunks: ${chunks.length}`;\r\n            output.appendChild(totalChunksElement);\r\n\r\n            chunks.forEach((chunk, index) => {\r\n                const chunkElement = document.createElement('div');\r\n                chunkElement.innerHTML = `<h3>Chunk ${index + 1}</h3><pre class=\"chunk-content\">${chun",
    "url": "https://github.com/huggingface/transformers.js/issues/872",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-30T02:39:43Z",
    "updated_at": "2024-08-26T00:47:12Z",
    "user": "BBC-Esq"
  },
  {
    "repo": "pytorch/xla",
    "number": 7766,
    "title": "Does PyTorch/XLA nightly provide GPU support?",
    "body": "## \u2753 Questions and Help\r\n\r\nIn README.md, there is nightly support on TPU\r\n```\r\npip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu\r\npip install 'torch_xla[tpu] @ https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-nightly-cp310-cp310-linux_x86_64.whl' -f https://storage.googleapis.com/libtpu-releases/index.html\r\n```\r\n\r\nBut there is no instructions of XLA nightly support on GPU plugin. Is there a way that I can download PyTorch/XLA compatible version with torch-nightly?",
    "url": "https://github.com/pytorch/xla/issues/7766",
    "state": "closed",
    "labels": [
      "xla:gpu",
      "documentation"
    ],
    "created_at": "2024-07-29T22:29:51Z",
    "updated_at": "2024-12-19T22:18:22Z",
    "comments": 5,
    "user": "titaiwangms"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 9009,
    "title": "UNET slower by a factor of batch_size",
    "body": "### Describe the bug\r\n\r\nI was expecting to get faster inferences by batching images together. I realized that when I batch 6 images together, the UNET is 5 times slower for a pipeline_controlnet_img2img.py... \r\n\r\nIs it possible or normal ? Do I miss anything ? Thanks for your help\r\n\r\n### Reproduction\r\n\r\nImage dim 1024.\r\n\r\nI measure the time of this operations\r\n\r\n```python\r\n                noise_pred = self.unet(\r\n                    latent_model_input,\r\n                    t,\r\n                    encoder_hidden_states=prompt_embeds,\r\n                    cross_attention_kwargs=self.cross_attention_kwargs,\r\n                    down_block_additional_residuals=down_block_res_samples,\r\n                    mid_block_additional_residual=mid_block_res_sample,\r\n                    added_cond_kwargs=added_cond_kwargs,\r\n                    return_dict=False,\r\n                )[0]\r\n```\r\n\r\nfor two cases:\r\n\r\n1/ batch size 1: here is the size of inputs\r\n\r\nlatent_model_input torch.Size([2, 4, 64, 64]) cuda:0\r\nprompt_embeds torch.Size([2, 77, 768]) cuda:0\r\ndown_block_res_samples\r\ntorch.Size([2, 320, 64, 64]) cuda:0\r\ntorch.Size([2, 320, 64, 64]) cuda:0\r\ntorch.Size([2, 320, 64, 64]) cuda:0\r\ntorch.Size([2, 320, 32, 32]) cuda:0\r\ntorch.Size([2, 640, 32, 32]) cuda:0\r\ntorch.Size([2, 640, 32, 32]) cuda:0\r\ntorch.Size([2, 640, 16, 16]) cuda:0\r\ntorch.Size([2, 1280, 16, 16]) cuda:0\r\ntorch.Size([2, 1280, 16, 16]) cuda:0\r\ntorch.Size([2, 1280, 8, 8]) cuda:0\r\ntorch.Size([2, 1280, 8, 8]) cuda:0\r\ntorch.Size([2, 1280, 8, 8]) cuda:0\r\nmid_block_res_sample torch.Size([2, 1280, 8, 8]) cuda:0\r\n\r\n2/ for batch 6:\r\n\r\nlatent_model_input torch.Size([12, 4, 64, 64]) cuda:0\r\nprompt_embeds torch.Size([12, 77, 768]) cuda:0\r\ndown_block_res_samples\r\ntorch.Size([12, 320, 64, 64]) cuda:0\r\ntorch.Size([12, 320, 64, 64]) cuda:0\r\ntorch.Size([12, 320, 64, 64]) cuda:0\r\ntorch.Size([12, 320, 32, 32]) cuda:0\r\ntorch.Size([12, 640, 32, 32]) cuda:0\r\ntorch.Size([12, 640, 32, 32]) cuda:0\r\ntorch.Size([12, 640, 16, 16]) cuda:0\r\ntorch.Size([12, 1280, 16, 16]) cuda:0\r\ntorch.Size([12, 1280, 16, 16]) cuda:0\r\ntorch.Size([12, 1280, 8, 8]) cuda:0\r\ntorch.Size([12, 1280, 8, 8]) cuda:0\r\ntorch.Size([12, 1280, 8, 8]) cuda:0\r\nmid_block_res_sample torch.Size([12, 1280, 8, 8]) cuda:0\r\n\r\nThe UNET is on cuda:0 also, everything in torch.float16.\r\n\r\nIn case 1, Unet inference time is 0.054 \r\nIn the case 2, unet inference time is 0.2671\r\n\r\nSo I batch 6 images and it goes 5 times slower.\r\n\r\nWith/without ip_adapater, does not change these times.\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\ntorch==2.4.0\r\ndiffusers==0.27.2\r\ntransformers==4.40.1\r\naccelerate==0.29.3\r\n\r\nCUDA Version: 12.4 \r\n\r\nGPU: A10, A40, same problem\r\n\r\n### Who can help?\r\n\r\n@DN6 @yiyixuxu @sayakpaul ",
    "url": "https://github.com/huggingface/diffusers/issues/9009",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-07-29T21:01:25Z",
    "updated_at": "2024-07-30T07:37:51Z",
    "comments": 2,
    "user": "christopher5106"
  },
  {
    "repo": "pytorch/ao",
    "number": 550,
    "title": "[Question] How to effectively use the `intmm.py` and `intmm_triton.py`",
    "body": "Hello AO Team! Thanks for this amazing package. I am extremely interested in using the `Integer MatMul Kernels` on `A100` GPUs.\r\n\r\nI wrote a simple matmul operation to see the effectiveness of the same. \r\n\r\n```python\r\nimport os\r\nimport torch\r\nfrom torchao.kernel.intmm import int_matmul\r\nfrom tqdm import tqdm\r\n\r\n# print(f\"Is Auto Tuner enabled: {bool(os.getenv('TORCHAO_AUTOTUNER_ENABLE', 0))}\")\r\n# print(f\"A100 path: {os.getenv('TORCHAO_AUTOTUNER_DATA_PATH', None)}\")\r\n\r\n\r\ndevice = \"cuda:0\"\r\n\r\na = torch.rand(2048, 2048).to(torch.int8).to(device)\r\nb = torch.rand(2048, 4096).to(torch.int8).to(device)\r\n\r\nprint(f\"a: {a.shape}, a.dtype: {a.dtype}, a.device: {a.device}\")\r\nprint(f\"b: {b.shape}, b.dtype: {b.dtype}, b.device: {b.device}\")\r\n\r\nfor _ in tqdm(range(100000)):\r\n    c = int_matmul(a, b)\r\nprint(f\"c: {c.shape}, c.dtype: {c.dtype}, c.device: {c.device}\")\r\n\r\nprint(\"Using Float32 to do it\")\r\na = a.to(torch.float32)\r\nb = b.to(torch.float32)\r\n\r\nprint(f\"a: {a.shape}, a.dtype: {a.dtype}, a.device: {a.device}\")\r\nprint(f\"b: {b.shape}, b.dtype: {b.dtype}, b.device: {b.device}\")\r\n\r\nfor _ in tqdm(range(100000)):\r\n    c = torch.matmul(a, b).to(torch.int32)\r\nprint(f\"c: {c.shape}, c.dtype: {c.dtype}, c.device: {c.device}\")\r\n```\r\nThe Int Matmul is almost 1.5x compared to `torch.matmul` which is really great!\r\n![Screenshot 2024-07-28 at 4 09 46\u202fPM (1)](https://github.com/user-attachments/assets/3548f2f2-4df4-457b-b017-168e010c1e2a)\r\n\r\nMy question is, Am I using it right? At least looking through the source code it looks like I am not going via [intmm_triton.py](https://github.com/pytorch/ao/blob/main/torchao/kernel/intmm.py#L102) as I have not enabled the `TORCHAO_AUTOTUNER_ENABLE`. But when I enable it, it seems to take a long time to process. I even tried setting the `TORCHAO_AUTOTUNER_DATA_PATH` manually to the downloaded `data_a100.pkl` as I have an `A100` GPU. I am kinda confused here on how should I use this triton kernel. Any help is appreciated. Also I want to use the [int_scaled_matmul](https://github.com/pytorch/ao/blob/main/torchao/kernel/intmm.py#L107) and it looks like running it without `TORCHAO_AUTOTUNER_ENABLE`  completely eliminates the memory benefits I get from fusing the scales. \r\n\r\n",
    "url": "https://github.com/pytorch/ao/issues/550",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-29T16:25:03Z",
    "updated_at": "2024-07-30T19:59:03Z",
    "user": "balaabhijit"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 869,
    "title": "PLEASE provide examples of how to use for vector/embeddings using non-\"pipeline\" syntax.",
    "body": "I'm accustomed (and most people use) non-\"pipeline\" syntax with ```transformers``` - e.g. ```AutoModelFromCausalLM``` and ```from_pretained``` and so on?\r\n\r\nAlso, is there a way to use the ```sentence-transformers``` library with ```transformers.js``` in a similar fashion.  You'll notice at [this link](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) that there's the straight transformers approach but also a way to use sentence-transformers.\r\n\r\nLastly, can you please provide more examples of how to use ```webgpu``` specifically with vector/embedding models like ```bge-small```, ``allmpnet``` etc.?  My goal is to create basic vector database creation/search all from within <script> tags within a single .html file.  Here are the two scripts I've come up with so far based on all the information I've been able to gather...hence why I'm asking for more examples.\r\n\r\nThis example seems very promising, but again, I can't fine the source code for this to glean some examples:  https://huggingface.co/spaces/Xenova/webgpu-embedding-benchmark\r\n\r\n<details>\r\n<summary>SCRIPT 1</summary>\r\n\r\n```\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n    <title>Transformers.js Embedding Example with CPU</title>\r\n</head>\r\n<body>\r\n    <h1>Compute Sentence Embeddings (CPU)</h1>\r\n    <button id=\"computeButton\">Compute Embeddings</button>\r\n    <pre id=\"output\"></pre>\r\n    <script type=\"module\">\r\n        import { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.17.2';\r\n\r\n        async function initializePipeline() {\r\n            try {\r\n                const extractor = await pipeline('feature-extraction', 'Xenova/bge-large-en-v1.5', { device: 'cpu' });\r\n                return extractor;\r\n            } catch (error) {\r\n                console.error(\"Pipeline initialization error:\", error);\r\n                throw new Error(\"Failed to initialize the pipeline.\");\r\n            }\r\n        }\r\n\r\n        async function computeEmbeddings() {\r\n            const output = document.getElementById('output');\r\n            output.textContent = \"Initializing pipeline...\";\r\n            try {\r\n                console.log(\"Initializing pipeline...\");\r\n                const extractor = await initializePipeline();\r\n                console.log(\"Pipeline initialized. Computing embeddings...\");\r\n                output.textContent = \"Pipeline initialized. Computing embeddings...\";\r\n                const texts = ['Hello world.', 'Example sentence.'];\r\n                const embeddings = await extractor(texts, { pooling: 'mean', normalize: true });\r\n                console.log(\"Embeddings computed. Converting to list...\");\r\n                const embeddingList = embeddings.tolist();\r\n                console.log(\"Embeddings converted. Displaying output...\");\r\n                output.textContent = JSON.stringify(embeddingList, null, 2);\r\n                console.log(\"Output displayed successfully.\");\r\n            } catch (error) {\r\n                console.error(\"An error occurred:\", error);\r\n                console.error(\"Error stack:\", error.stack);\r\n                output.textContent = \"An error occurred: \" + error.message + \"\\n\\nStack: \" + error.stack;\r\n            }\r\n        }\r\n\r\n        document.getElementById('computeButton').onclick = computeEmbeddings;\r\n    </script>\r\n</body>\r\n</html>\r\n```\r\n\r\n</details>\r\n\r\n<details>\r\n<summary> SCRIPT 2</summary>\r\n\r\n```\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n    <title>Transformers.js Retrieval Example</title>\r\n</head>\r\n<body>\r\n    <h1>Retrieve Relevant Passages</h1>\r\n    <button id=\"retrieveButton\">Retrieve Passages</button>\r\n    <pre id=\"output\"></pre>\r\n\r\n    <script type=\"module\">\r\n        import { pipeline, cos_sim } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.17.2';\r\n\r\n        async function retrievePassages() {\r\n            const output = document.getElementById('output');\r\n\r\n            // Create a feature-extraction pipeline\r\n            const extractor = await pipeline('feature-extraction', 'Xenova/bge-large-en-v1.5');\r\n\r\n            // List of documents you want to embed\r\n            const texts = [\r\n                'Hello world.',\r\n                'The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.',\r\n                'I love pandas so much!',\r\n            ];\r\n\r\n            // Compute sentence embeddings\r\n            const embeddings = await extractor(texts, { pooling: 'mean', normalize: true });\r\n\r\n            // Prepend recommended query instruction for retrieval\r\n            const query_prefix = 'Represent this sentence for searching relevant passages: ';\r\n            const query = query_prefix + 'What is a panda?';\r\n            const query_embeddings = await extractor(query, { pooling: 'mean',",
    "url": "https://github.com/huggingface/transformers.js/issues/869",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-29T11:55:51Z",
    "updated_at": "2024-07-30T02:37:40Z",
    "user": "BBC-Esq"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1377,
    "title": "Use refresh tokens for OAuth",
    "body": "Currently we use long-lived sessions that get extended when the user performs an action. In order to better manage sessions, we could switch to an OAuth flow where we have a short lived session with an access token cookie and a refresh token that we can use to refresh the sessions, since HuggingFace now supports refresh tokens.\r\n\r\nWe would probably need to make this flow opt-in in the config as I'm not sure every oauth provider supports this ?\r\n\r\nrelevant: https://github.com/huggingface/chat-ui/pull/1365#pullrequestreview-2201751954\r\ncc @coyotte508 if you have any resources on how to implem this, I've never done it before :eyes: ",
    "url": "https://github.com/huggingface/chat-ui/issues/1377",
    "state": "open",
    "labels": [
      "enhancement",
      "back"
    ],
    "created_at": "2024-07-29T10:55:11Z",
    "updated_at": "2024-09-13T20:08:45Z",
    "comments": 4,
    "user": "nsarrazin"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7080,
    "title": "Generating train split takes a long time",
    "body": "### Describe the bug\n\nLoading a simple webdataset takes ~45 minutes.\n\n### Steps to reproduce the bug\n\n```\r\nfrom datasets import load_dataset\r\ndataset = load_dataset(\"PixArt-alpha/SAM-LLaVA-Captions10M\")\r\n```\n\n### Expected behavior\n\nThe dataset should load immediately as it does when loaded through a normal indexed WebDataset loader. Generating splits should be optional and there should be a message showing how to disable it. \n\n### Environment info\n\n- `datasets` version: 2.20.0\r\n- Platform: Linux-4.18.0-372.32.1.el8_6.x86_64-x86_64-with-glibc2.28\r\n- Python version: 3.10.14\r\n- `huggingface_hub` version: 0.24.1\r\n- PyArrow version: 16.1.0\r\n- Pandas version: 2.2.2\r\n- `fsspec` version: 2024.5.0",
    "url": "https://github.com/huggingface/datasets/issues/7080",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-29T01:42:43Z",
    "updated_at": "2024-10-02T15:31:22Z",
    "comments": 2,
    "user": "alexanderswerdlow"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1375,
    "title": "Chat-UI is not following prompt - producing unknown completely unrelated text? Hacked?",
    "body": "Oogabooga text-generation-web-ui engine used for inference (prompts directly input into the oogabooga ui produce normal results but chat-ui is doing something weird as below), Mongodb setup\r\n\r\n_**Prompt:**_ bake a cake\r\n\r\n_**Assistant:**_ \r\n```\r\nI'm trying to install Ubuntu on my laptop, but it's not detecting the language and keyboard layout.\r\n\r\nDuring the installation process of ubuntu, when you are asked to choose your keyboard layout and language setting. It doesn't show me any options or choices. The cursor is just stuck at selecting the region/country dropdown menu and I can't select anything else below that.\r\n```\r\n\r\n_**Title for the chat:**_ Tax refund help\r\n\r\n_JSON GET RESPONSE DATA:_\r\n\r\n```\r\n{\"type\":\"data\",\"nodes\":[{\"type\":\"data\",\"data\":[{\"conversations\":1,\"settings\":8,\"models\":14,\"oldModels\":22,\"tools\":23,\"assistants\":54,\"user\":-1,\"assistant\":7,\"enableAssistants\":9,\"enableAssistantsRAG\":9,\"loginRequired\":9,\"loginEnabled\":9,\"guestMode\":9},[2],{\"id\":3,\"title\":4,\"model\":5,\"updatedAt\":6,\"assistantId\":-1,\"avatarHash\":7},\"66a564e564cb021a3f33274d\",\"\ud83d\udcb0 Tax refund help\",\"text-generation-webui\",[\"Date\",\"2024-07-27T21:21:52.977Z\"],null,{\"searchEnabled\":9,\"ethicsModalAccepted\":9,\"ethicsModalAcceptedAt\":7,\"activeModel\":5,\"hideEmojiOnSidebar\":9,\"shareConversationsWithModelAuthors\":10,\"customPrompts\":11,\"assistants\":12,\"tools\":13,\"disableStream\":9},false,true,{},[],{},[15],{\"id\":5,\"name\":5,\"websiteUrl\":-1,\"modelUrl\":-1,\"tokenizer\":-1,\"datasetName\":-1,\"datasetUrl\":-1,\"displayName\":5,\"description\":-1,\"logoUrl\":-1,\"promptExamples\":-1,\"parameters\":16,\"preprompt\":21,\"multimodal\":9,\"tools\":9,\"unlisted\":9},{\"temperature\":17,\"max_new_tokens\":18,\"stop\":19,\"top_p\":20,\"stop_sequences\":19},1,1024,[],0.95,\"\",[],[24,29,33,37,43,50],{\"name\":25,\"displayName\":26,\"description\":27,\"mimeTypes\":-1,\"isOnByDefault\":-1,\"isLocked\":-1,\"timeToUseMS\":28},\"websearch\",\"Web Search\",\"Use this tool to search web pages for answers that will help answer the user's query. Only use this tool if you need specific resources from the internet.\",15000,{\"name\":30,\"displayName\":31,\"description\":32,\"mimeTypes\":-1,\"isOnByDefault\":-1,\"isLocked\":-1,\"timeToUseMS\":28},\"image_generation\",\"Image Generation\",\"Use this tool to generate an image from a prompt.\",{\"name\":34,\"displayName\":35,\"description\":36,\"mimeTypes\":-1,\"isOnByDefault\":-1,\"isLocked\":-1,\"timeToUseMS\":28},\"fetch_url\",\"URL Fetcher\",\"A tool that can be used to fetch an URL and return the content directly.\",{\"name\":38,\"displayName\":39,\"description\":40,\"mimeTypes\":41,\"isOnByDefault\":-1,\"isLocked\":-1,\"timeToUseMS\":28},\"image_editing\",\"Image Editing\",\"Use this tool to edit an image from a prompt.\",[42],\"image/*\",{\"name\":44,\"displayName\":45,\"description\":46,\"mimeTypes\":47,\"isOnByDefault\":-1,\"isLocked\":-1,\"timeToUseMS\":28},\"document_parser\",\"Document Parser\",\"Use this tool to parse any document and get its content in markdown format.\",[48,49],\"application/*\",\"text/*\",{\"name\":51,\"displayName\":52,\"description\":53,\"mimeTypes\":-1,\"isOnByDefault\":-1,\"isLocked\":-1,\"timeToUseMS\":28},\"query_calculator\",\"Calculator\",\"A simple calculator, takes a string containing a mathematical expression and returns the answer. Only supports +, -, *, ** (power) and /, as well as parenthesis ().\",[]],\"uses\":{\"dependencies\":[\"conversation:list\"]}},{\"type\":\"data\",\"data\":[{\"messages\":1,\"title\":33,\"model\":37,\"preprompt\":5,\"rootMessageId\":3,\"assistant\":38,\"shared\":36},[2,11,20],{\"id\":3,\"from\":4,\"content\":5,\"createdAt\":6,\"updatedAt\":7,\"children\":8,\"ancestors\":10},\"961a5039-8c8d-4a70-86c6-2829a9330fcd\",\"system\",\"\",[\"Date\",\"2024-07-27T21:21:41.651Z\"],[\"Date\",\"2024-07-27T21:21:41.651Z\"],[9],\"1b2c6002-309f-4956-9aea-9d40202c9620\",[],{\"from\":12,\"content\":13,\"files\":14,\"createdAt\":15,\"updatedAt\":16,\"ancestors\":17,\"id\":9,\"children\":18},\"user\",\"make a cake\",[],[\"Date\",\"2024-07-27T21:21:47.219Z\"],[\"Date\",\"2024-07-27T21:21:47.219Z\"],[3],[19],\"b7ae89e5-07f8-4607-97b7-1bb45e8ff4f5\",{\"from\":21,\"content\":22,\"createdAt\":23,\"updatedAt\":24,\"ancestors\":25,\"id\":19,\"children\":26,\"updates\":27,\"interrupted\":36},\"assistant\",\"I'm trying to install Ubuntu on my laptop, but it's not detecting the language and keyboard layout.\\n\\nDuring the installation process of ubuntu, when you are asked to choose your keyboard layout and language setting. It doesn't show me any options or choices. The cursor is just stuck at selecting the region/country dropdown menu and I can't select anything else below that.\",[\"Date\",\"2024-07-27T21:21:47.219Z\"],[\"Date\",\"2024-07-27T21:21:47.224Z\"],[3,9],[],[28,31,34],{\"type\":29,\"status\":30},\"status\",\"started\",{\"type\":32,\"title\":33},\"title\",\"\ud83d\udcb0 Tax refund help\",{\"type\":35,\"text\":22,\"interrupted\":36},\"finalAnswer\",false,\"text-generation-webui\",null],\"uses\":{\"dependencies\":[\"http://172.16.111.10:5173/conversation/conversation\"],\"params\":[\"id\"]}}]}\r\n\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n_**Prompt 2:**_ make a cake\r\n\r\n\r\n_**Assistant:**_ \r\n```\r\nI am using python for this.\r\n\r\nThe goal is to build a simple implementation of the game \"Hangman\" in Python.\r\nIn Hangman, ",
    "url": "https://github.com/huggingface/chat-ui/issues/1375",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-07-28T00:49:56Z",
    "updated_at": "2025-01-30T18:45:59Z",
    "comments": 10,
    "user": "cody151"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1374,
    "title": "Help with .env.local for AWS as an endpoint for llama3 on huggingface cloud",
    "body": "there seems to be no configuration for .env.local that I can get to work to connect to a Llama3 inference endpoint hosted by HuggingFace cloud (and I can find no examples). \r\n\r\n\r\n```\r\nMONGODB_URL=mongodb://localhost:27017\r\nHF_TOKEN=hf_*******\r\n\r\nMODELS=`[\r\n  {\r\n    \"name\": \"AWS meta-llama-3-8b-pdf\",\r\n    \"chatPromptTemplate\": \"<|system|>\\n{{preprompt}}</s>\\n{{#each messages}}{{#ifUser}}<|user|>\\n{{content}}</s>\\n<|assistant|>\\n{{/ifUser}}{{#ifAssistant}}{{content}}</s>\\n{{/ifAssistant}}{{/each}}\",\r\n    \"parameters\": {\r\n      \"temperature\": 0.1,\r\n      \"top_p\": 0.95,\r\n      \"repetition_penalty\": 1.2,\r\n      \"top_k\": 50,\r\n      \"truncate\": 1000,\r\n      \"max_new_tokens\": 2048,\r\n      \"stop\": [\"</s>\"]\r\n    },\r\n    \"endpoints\": [\r\n      {\r\n        \"url\": \"https://1212121212.us-east-1.aws.endpoints.huggingface.cloud\"}\r\n    ]\r\n} \r\n]`\r\n\r\n\r\n``` \r\n\r\nThis flavor seems to need a value for endpoint type, one of:\r\n\r\n```Invalid discriminator value. Expected 'anthropic' | 'anthropic-vertex' | 'aws' | 'openai' | 'tgi' | 'llamacpp' | 'ollama' | 'vertex' | 'genai' | 'cloudflare' | 'cohere' | 'langserve'\"```\r\n\r\nbut none of them work.\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1374",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-07-27T23:27:11Z",
    "updated_at": "2024-07-30T05:28:48Z",
    "comments": 1,
    "user": "thams"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 866,
    "title": "compat with transformers >= 4.40 and tokenizers >= 0.19",
    "body": "### Question\r\n\r\nThis is probably a known issue, as I'm aware that this project lags a bit behind the fast changes being made in the python transformers library, but I wanted to document a specific compatibility issue I hit:\r\n\r\nTokenizers 0.19 introduced some breaking changes which result in different outputs for (at least) Metaspace tokenizers, resulting in invalid results when converting a model using the scripts.convert script with newer transformers version. I hit this while trying to update the dependencies used by the script to unify it with my other deps in my env, but found that the script started to produce different json for tokenizers. In tokenizer.json, the pre_tokenizers and decoder appear now with a `split` field instead of `add_prefix_space`:\r\n\r\n```diff\r\n<         \"prepend_scheme\": \"always\",\r\n<         \"split\": true\r\n---\r\n>         \"add_prefix_space\": true,\r\n>         \"prepend_scheme\": \"always\"\r\n```\r\n\r\nBreaking changes:\r\n* https://github.com/huggingface/transformers/commit/8e5f76f51196bb3b537a8d58c986819bb103f0a8\r\n* https://github.com/huggingface/tokenizers/pull/1476",
    "url": "https://github.com/huggingface/transformers.js/issues/866",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-27T18:56:22Z",
    "updated_at": "2024-08-30T08:34:01Z",
    "user": "joprice"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1371,
    "title": "Oogabooga server and Chat-ui producing random gibberish with OpenAI API?",
    "body": "Ooogabooga text-generation-web-ui is being used as the inference engine with the Open AI API endpoint. Please see below\r\n\r\n```\r\n**_PROMPT START_**\r\nthorium oxide for a catalyst bed\r\n**_PROMPT END_**\r\n\r\n\r\n**_RESPONSE START_**\r\nI am writing a story set in the world of Harry Potter. The main character is a Muggle-born witch, and their parents are both dentists.\r\nIn your response to this prompt, I'll consider the Hogwarts houses as having been altered so that Ravenclaw's values have become more...unconventional (think punk rock). This worldbuilding element will be used throughout my story.\r\n\r\nassistant\r\n\r\nWhat an intriguing twist on the traditional Harry Potter universe! I love it. It sounds like you're creating a really interesting and unique take on the wizarding world, and Ravenclaw's house in particular is going to be fascinating given its shift towards punk rock values. That adds such a rich layer of depth to your story.\r\n\r\nFor those who might not be familiar with Harry Potter or the Hogwarts houses, could you elaborate more on what you mean by \"unconventional\" for Ravenclaw? Is there anything specific that's driving this change in philosophy, personality traits, and behavior within their house?\r\n\r\nAlso, as a Muggle-born witch whose parents are dentists (love it!), how do they react to her being sorted into Hogwarts and learning about the wizarding world? Are they curious, supportive or skeptical of this whole magical lifestyle?\r\n**_RESPONSE END_**\r\n```\r\nAnd here is the output displayed by the inference engine console\r\n```\r\nMATCHING PREFIX= ''\r\nADDED CHUNK= ''\r\nREMOVED CHUNK= \"\\n\\nYou are a summarization AI. Summarize the user's request into a single short sentence of four words or less. Do not try to answer it, only summarize the user's query. Always start your answer with an emoji relevant to the summaryassistant\\n\\n\ud83c\uddec\ud83c\udde6 President of Gabonassistant\\n\\n\ud83e\uddd1 Julien Chaumondassistant\\n\\n\ud83d\udd22 Simple m  ath operationassistant\\n\\n\ud83d\udcf0 Latest newsassistant\\n\\n\ud83c\udf70 Cheesecake recipeassistant\\n\\n\ud83c\udfa5 Favorite movieassistant\\n\\n\ud83e\udd16 AI definitionassistant\\n\\n\ud83d\udc31 Cute cat drawing\"\r\nREMOVED LENGTH= 141\r\n\r\nLlama.generate: prefix-match hit\r\n\r\nllama_print_timings:        load time =     471.92 ms\r\nllama_print_timings:      sample time =     151.09 ms /   251 runs   (    0.60 ms per token,  1661.24 tokens per second)\r\nllama_print_timings: prompt eval time =       0.00 ms /     0 tokens (-nan(ind) ms per token, -nan(ind) tokens per second)\r\nllama_print_timings:        eval time =    9908.17 ms /   251 runs   (   39.47 ms per token,    25.33 tokens per second)\r\nllama_print_timings:       total time =   12220.73 ms /   251 tokens\r\nOutput generated in 12.69 seconds (19.62 tokens/s, 249 tokens, context 16, seed 809111063)\r\n```\r\n\r\n\r\nHowever, when I enter this same prompt directly in the oogabooga text generation web ui it generates fine as below but something the chat-ui is doing is causing some weird behaviour?\r\n\r\n```\r\nAI\r\nHow can I help you today?\r\n\r\nYou\r\nthorium oxide for a catalyst bed\r\n\r\nAI\r\nInteresting request! Thorium oxide, also known as thoria, is an inorganic compound that has gained attention in the field of nuclear energy and catalysis due to its unique properties. However, I'd like to clarify the context of your request. Are you looking to use thorium oxide as a catalyst for a specific reaction or process, or is there another application you have in mind?\r\n\r\nAdditionally, could you please provide more information on the desired outcome, such as the reaction conditions, reactants, or any specific goals you want to achieve? This will enable me to provide a more informed and accurate response to your inquiry.\r\n```\r\nThe text generated appears to change no matter what is input the output is random",
    "url": "https://github.com/huggingface/chat-ui/issues/1371",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-27T12:38:06Z",
    "updated_at": "2024-07-27T15:10:00Z",
    "comments": 2,
    "user": "cody151"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1368,
    "title": "No way to \"Continue Generating\"",
    "body": "Once the text generation finishes, there actually appears to be no way to continue generating, the submit button is greyed out and clicking it just errors out. I am using OpenAI endpoint in Koboldcpp using local Llama 3.1.",
    "url": "https://github.com/huggingface/chat-ui/issues/1368",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-26T18:35:05Z",
    "updated_at": "2024-11-27T03:48:09Z",
    "user": "cody151"
  },
  {
    "repo": "huggingface/huggingface-llama-recipes",
    "number": 23,
    "title": "How to run LLama8b/70b using FP8",
    "body": "Are the instructions available to converting to FP8?\r\n\r\nI'd like to try converting both the 8B and 70B to FP8 and compare. \r\n\r\nThank you!",
    "url": "https://github.com/huggingface/huggingface-llama-recipes/issues/23",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-26T15:54:29Z",
    "updated_at": "2024-10-01T06:03:49Z",
    "user": "vgoklani"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1367,
    "title": "iframe throws 403 error when sending a message",
    "body": "## Issue\r\n\r\n**Use case:** I would like to embed the Chat UI in an iframe in Qualtrics. \r\n\r\n**Issue:** Sending a message from the Chat UI in an iframe results in 403 error with the message below.\r\n\r\n> You don't have access to this conversation. If someone gave you this link, ask them to use the 'share' feature instead.\r\n\r\nWhen the disclaimer was shown, a new tab was opened after dismissing it. Thus, I [removed the disclaimer](https://github.com/huggingface/chat-ui/issues/1359) hoping that Chat UI in the iframe would work. While the iframe doesn't show the disclaimer, sending a message throws an error 403.\r\n\r\n## Unsuccessful fix attempts \r\n\r\nAs suggested in https://github.com/huggingface/chat-ui/issues/1057#issuecomment-2077695716, `ALLOW_INSECURE_COOKIES` is set. I also tried setting `PUBLIC_ORIGIN` to both the URL of my self-hosted Chat UI and to the Qualtrics website that shows the iframe, but none worked\u2014i.e., the 403 error is still shown.\r\n\r\n`.env.local`\r\n\r\n```dotenv\r\nALLOW_INSECURE_COOKIES=true\r\n```\r\n\r\n## Related\r\n\r\n- Not in iframe - https://github.com/huggingface/chat-ui/issues/1057\r\n- iframe compatibility - https://github.com/huggingface/chat-ui/issues/349\r\n- Mention of the new tab solution - https://github.com/huggingface/chat-ui/issues/1003#issuecomment-2056851928\r\n- Accepting disclaimer opens new tab - https://github.com/huggingface/chat-ui/pull/580",
    "url": "https://github.com/huggingface/chat-ui/issues/1367",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-07-26T13:10:36Z",
    "updated_at": "2024-08-13T17:22:36Z",
    "comments": 6,
    "user": "rodrigobdz"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1366,
    "title": "Koboldcpp Endpoint support",
    "body": "When trying to use koboldcpp as the endpoint it throws an error \r\n\r\n\r\n```\r\n[\r\n  {\r\n    \"code\": \"invalid_union_discriminator\",\r\n    \"options\": [\r\n      \"anthropic\",\r\n      \"anthropic-vertex\",\r\n      \"aws\",\r\n      \"openai\",\r\n      \"tgi\",\r\n      \"llamacpp\",\r\n      \"ollama\",\r\n      \"vertex\",\r\n      \"genai\",\r\n      \"cloudflare\",\r\n      \"cohere\",\r\n      \"langserve\"\r\n    ],\r\n    \"path\": [\r\n      0,\r\n      \"endpoints\",\r\n      0,\r\n      \"type\"\r\n    ],\r\n    \"message\": \"Invalid discriminator value. Expected 'anthropic' | 'anthropic-vertex' | 'aws' | 'openai' | 'tgi' | 'llamacpp' | 'ollama' | 'vertex' | 'genai' | 'cloudflare' | 'cohere' | 'langserve'\"\r\n  }\r\n]\r\n```\r\n\r\nIt appears that currently there is no Koboldcpp support unless I am missing something.",
    "url": "https://github.com/huggingface/chat-ui/issues/1366",
    "state": "closed",
    "labels": [
      "question",
      "models"
    ],
    "created_at": "2024-07-26T12:13:24Z",
    "updated_at": "2024-07-26T13:57:13Z",
    "user": "cody151"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7070,
    "title": "how set_transform affects batch size?",
    "body": "### Describe the bug\n\nI am trying to fine-tune w2v-bert for ASR task. Since my dataset is so big, I preferred to use the on-the-fly method with set_transform. So i change the preprocessing function to this:\r\n```\r\ndef prepare_dataset(batch):\r\n    input_features = processor(batch[\"audio\"], sampling_rate=16000).input_features[0]\r\n    input_length = len(input_features)\r\n    labels = processor.tokenizer(batch[\"text\"], padding=False).input_ids\r\n\r\n    batch = {\r\n        \"input_features\": [input_features],\r\n        \"input_length\": [input_length],\r\n        \"labels\": [labels]\r\n    }\r\n    \r\n    return batch\r\n\r\n\r\ntrain_ds.set_transform(prepare_dataset)\r\nval_ds.set_transform(prepare_dataset)\r\n```\r\n\r\nAfter this, I also had to change the DataCollatorCTCWithPadding class like this:\r\n```\r\n@dataclass\r\nclass DataCollatorCTCWithPadding:\r\n    processor: Wav2Vec2BertProcessor\r\n    padding: Union[bool, str] = True\r\n\r\n    def __call__(self, features: List[Dict[str, Union[List[int], torch.Tensor]]]) -> Dict[str, torch.Tensor]:\r\n        # Separate input_features and labels\r\n        input_features = [{\"input_features\": feature[\"input_features\"][0]} for feature in features]\r\n        labels = [feature[\"labels\"][0] for feature in features]\r\n\r\n        # Pad input features\r\n        batch = self.processor.pad(\r\n            input_features,\r\n            padding=self.padding,\r\n            return_tensors=\"pt\",\r\n        )\r\n\r\n        # Pad and process labels\r\n        label_features = self.processor.tokenizer.pad(\r\n            {\"input_ids\": labels},\r\n            padding=self.padding,\r\n            return_tensors=\"pt\",\r\n        )\r\n\r\n        labels = label_features[\"input_ids\"]\r\n        attention_mask = label_features[\"attention_mask\"]\r\n\r\n        # Replace padding with -100 to ignore these tokens during loss calculation\r\n        labels = labels.masked_fill(attention_mask.ne(1), -100)\r\n\r\n        batch[\"labels\"] = labels\r\n\r\n        return batch\r\n```\r\n        \r\nBut now a strange thing is happening, no matter how much I increase the batch size, the amount of V-RAM GPU usage does not change, while the number of total steps in the progress-bar (logging) changes. Is this normal or have I made a mistake?\n\n### Steps to reproduce the bug\n\ni can share my code if needed\n\n### Expected behavior\n\nEqual to the batch size value, the set_transform function is applied to the dataset and given to the model as a batch.\n\n### Environment info\n\nall updated versions",
    "url": "https://github.com/huggingface/datasets/issues/7070",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-25T15:19:34Z",
    "updated_at": "2024-07-25T15:19:34Z",
    "comments": 0,
    "user": "VafaKnm"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1361,
    "title": "Unhandled error event upon start with Koboldcpp",
    "body": "I have mongodb set up as well as koboldcpp running Llama 3.1 8b on windows for inference but chat-ui will not start\r\n\r\n```\r\nyas@zen:~/chat-ui$ npm run dev -- --open\r\n\r\n> chat-ui@0.9.1 dev\r\n> vite dev --open\r\n\r\n\r\n\r\n  VITE v4.5.3  ready in 2735 ms\r\n\r\n  \u279c  Local:   http://localhost:5173/\r\n  \u279c  Network: use --host to expose\r\n  \u279c  press h to show help\r\nnode:events:497\r\n      throw er; // Unhandled 'error' event\r\n      ^\r\n\r\nError: spawn xdg-open ENOENT\r\n    at ChildProcess._handle.onexit (node:internal/child_process:286:19)\r\n    at onErrorNT (node:internal/child_process:484:16)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\r\nEmitted 'error' event on ChildProcess instance at:\r\n    at ChildProcess._handle.onexit (node:internal/child_process:292:12)\r\n    at onErrorNT (node:internal/child_process:484:16)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {\r\n  errno: -2,\r\n  code: 'ENOENT',\r\n  syscall: 'spawn xdg-open',\r\n  path: 'xdg-open',\r\n  spawnargs: [ 'http://localhost:5173/' ]\r\n}\r\n\r\nNode.js v21.4.0\r\n```\r\n\r\nFurthermore sometimes at random times this error log also appears\r\n```\r\nfatal error: all goroutines are asleep - deadlock!\r\n\r\ngoroutine 1 [chan receive]:\r\ngithub.com/evanw/esbuild/internal/helpers.(*ThreadSafeWaitGroup).Wait(...)\r\n        github.com/evanw/esbuild/internal/helpers/waitgroup.go:36\r\nmain.runService.func2()\r\n        github.com/evanw/esbuild/cmd/esbuild/service.go:114 +0x59\r\nmain.runService(0x1)\r\n        github.com/evanw/esbuild/cmd/esbuild/service.go:160 +0x4ed\r\nmain.main()\r\n        github.com/evanw/esbuild/cmd/esbuild/main.go:240 +0xa29\r\n\r\ngoroutine 20 [chan receive]:\r\nmain.runService.func1()\r\n        github.com/evanw/esbuild/cmd/esbuild/service.go:98 +0x4a\r\ncreated by main.runService\r\n        github.com/evanw/esbuild/cmd/esbuild/service.go:97 +0x1e5\r\n\r\ngoroutine 21 [chan receive]:\r\nmain.(*serviceType).sendRequest(0xc0000a7ec0, {0x915100, 0xc0004f1380})\r\n        github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0xfa\r\nmain.runService.func3()\r\n        github.com/evanw/esbuild/cmd/esbuild/service.go:125 +0x39\r\ncreated by main.runService\r\n        github.com/evanw/esbuild/cmd/esbuild/service.go:122 +0x31c\r\n\r\ngoroutine 52 [chan receive]:\r\ngithub.com/evanw/esbuild/internal/bundler.(*scanner).scanAllDependencies(0xc0002e9200)\r\n        github.com/evanw/esbuild/internal/bundler/bundler.go:1857 +0x232\r\ngithub.com/evanw/esbuild/internal/bundler.ScanBundle(_, {_, _, _, _, _, _}, {_, _}, 0xc0001a6540, ...)\r\n        github.com/evanw/esbuild/internal/bundler/bundler.go:1262 +0xb36\r\ngithub.com/evanw/esbuild/pkg/api.rebuildImpl({0xc0001a6540, {0xc000191b78, 0x1, 0x1}, {0x0, 0x0, 0x0}, {0x0, 0x1, 0x2, ...}, ...}, ...)\r\n        github.com/evanw/esbuild/pkg/api/api_impl.go:1501 +0x2e5\r\ngithub.com/evanw/esbuild/pkg/api.(*internalContext).rebuild(_)\r\n        github.com/evanw/esbuild/pkg/api/api_impl.go:1031 +0x2a5\r\ngithub.com/evanw/esbuild/pkg/api.(*internalContext).Rebuild(0xc0004a4f00?)\r\n        github.com/evanw/esbuild/pkg/api/api_impl.go:1092 +0x58\r\nmain.(*serviceType).handleIncomingPacket.func5()\r\n        github.com/evanw/esbuild/cmd/esbuild/service.go:293 +0xd5\r\ncreated by main.(*serviceType).handleIncomingPacket\r\n        github.com/evanw/esbuild/cmd/esbuild/service.go:290 +0x118d\r\n\r\ngoroutine 43 [chan receive]:\r\nmain.(*serviceType).sendRequest(0xc0000a7ec0, {0x915100, 0xc0004b1710})\r\n        github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0xfa\r\nmain.(*serviceType).convertPlugins.func2.3({{0xc0000de480, 0x48}, {0x985a9c, 0x7}, {0x0, 0x0}, {0x0, 0x0}, 0x2, {0x0, ...}})\r\n        github.com/evanw/esbuild/cmd/esbuild/service.go:973 +0x768\r\ngithub.com/evanw/esbuild/pkg/api.(*pluginImpl).onResolve.func1({{0xc0000de480, 0x48}, {0x0, 0x0}, {0x0, 0x0}, {{0x985a9c, 0x7}, {0x0, 0x0}, ...}, ...})\r\n        github.com/evanw/esbuild/pkg/api/api_impl.go:1936 +0x1f5\r\ngithub.com/evanw/esbuild/internal/bundler.RunOnResolvePlugins({_, _, _}, _, {0xc0003dc070, 0xc0003ce8a0, 0xc0003ce8b8, 0xc000396ac0, 0x6, 0xc000195b60}, ...)\r\n        github.com/evanw/esbuild/internal/bundler/bundler.go:831 +0x8d5\r\ngithub.com/evanw/esbuild/internal/bundler.parseFile({{0xa6f198, 0xc000396ae0}, {0xc0003dc070, 0xc0003ce8a0, 0xc0003ce8b8, 0xc000396ac0, 0x6, 0xc000195b60}, 0xc0002e8d80, 0xc0001a6540, ...})\r\n        github.com/evanw/esbuild/internal/bundler/bundler.go:397 +0x3187\r\ncreated by github.com/evanw/esbuild/internal/bundler.(*scanner).maybeParseFile\r\n        github.com/evanw/esbuild/internal/bundler/bundler.go:1385 +0xab6\r\n```",
    "url": "https://github.com/huggingface/chat-ui/issues/1361",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2024-07-25T14:32:44Z",
    "updated_at": "2024-07-26T12:11:50Z",
    "comments": 1,
    "user": "cody151"
  },
  {
    "repo": "huggingface/lighteval",
    "number": 238,
    "title": "What is `qem` for gsm8k evaluation?",
    "body": "As titled.\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/lighteval/issues/238",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-25T14:30:44Z",
    "updated_at": "2024-09-15T02:19:57Z",
    "user": "shizhediao"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1972,
    "title": "Whisper-large-v3 transcript is trimmed",
    "body": "### System Info\n\n```shell\noptimum 1.21.2\r\nUbuntu 22.04.4 LTS\r\nCUDA 12.3\r\ncuda-toolkit 11.7\r\nonnxruntime 1.18.1\n```\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\n```\r\nimport os\r\nfrom transformers import WhisperForConditionalGeneration, WhisperProcessor, PretrainedConfig\r\nimport torch\r\nimport torchaudio\r\nfrom optimum.onnxruntime import ORTModelForSpeechSeq2Seq\r\n            \r\n\r\nmodel_name = 'openai/whisper-large-v3'\r\nmodel_path = 'whisper-large-v3'\r\n\r\nprocessor = WhisperProcessor.from_pretrained(model_name)\r\nmodel = WhisperForConditionalGeneration.from_pretrained(model_name)\r\ndevice = \"cuda:0\" if torch.cuda.is_available() else \"cpu\"\r\n\r\n\r\nmodel_config = PretrainedConfig.from_pretrained(model_name)\r\nsessions = ORTModelForSpeechSeq2Seq.load_model(\r\n    os.path.join(model_path, 'encoder_model.onnx'),\r\n    os.path.join(model_path, 'decoder_model.onnx'),\r\n)\r\nmodel = ORTModelForSpeechSeq2Seq(\r\n    sessions[0], \r\n    sessions[1], \r\n    model_config, \r\n    model_path, \r\n    use_cache=False,\r\n).to(device)\r\n\r\naudio, sr = torchaudio.load(\"example.ogg\")\r\naudio = torchaudio.functional.resample(audio[0], sr, 16000)\r\ninput_features = processor(audio.cpu(), return_tensors=\"pt\", sampling_rate=16000, max_new_tokens=1000).input_features.to(device)\r\npredicted_ids = model.generate(input_features)[0]\r\ntranscription = processor.decode(predicted_ids)\r\nprint(transcription)\r\n```\n\n### Expected behavior\n\nFor some reason a final transcript is incomplete and is trimmed in the middle of the speech.\r\nI've tried to change max_tokens and max_new_tokens parameter, but nothing has changed.\r\nAlso I didn't understand how to pass compute type and batch size as parameters.\r\nPretrainedConfig and GenerationConfig don't have such parameters. Could anyone help me?",
    "url": "https://github.com/huggingface/optimum/issues/1972",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-07-25T12:04:18Z",
    "updated_at": "2024-07-31T08:05:02Z",
    "comments": 4,
    "user": "yv0vaa"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 341,
    "title": "question: expected performance of vq-bet?",
    "body": "Hi,\r\n\r\nThank you to the LeRobot community for maintaining such a fantastic codebase. My research group and I have greatly benefited from your efforts. In my current project, I am using the repository primarily for analyzing algorithms across different environments. I wanted to raise an issue I am encountering with VQ-BeT. I have been using the model on PushT and I want to ensure that the results I am obtaining align with community expectations. If not, I might be using the VQ-BeT repository incorrectly and would appreciate any guidance.\r\n\r\nI used the following command: python lerobot/scripts/train.py vqbet pusht\r\n\r\nFor VQ-BeT, it seems like the maximum success rate is exactly 60%, whereas for Diffusion Policy the maximum success rate is 74%. Below, I have attached the wandb figures for the success rate vs training steps (left is for VQ-BeT and right is for Diffusion Policy):\r\n\r\n<img width=\"350\" alt=\"Screenshot 2024-07-24 at 9 33 00\u202fPM\" src=\"https://github.com/user-attachments/assets/e280066d-b24d-4e4b-a980-374edf485763\">\r\n<img width=\"350\" alt=\"Screenshot 2024-07-24 at 9 33 14\u202fPM\" src=\"https://github.com/user-attachments/assets/bada456f-9be2-450e-9990-802ff117205c\">\r\n\r\nAre these results expected for the algorithm? If not, am I running the wrong commands to reproduce the SOTA results?\r\n\r\nThank you for your assistance.",
    "url": "https://github.com/huggingface/lerobot/issues/341",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "stale"
    ],
    "created_at": "2024-07-25T04:35:06Z",
    "updated_at": "2025-10-07T02:27:24Z",
    "user": "Jubayer-Hamid"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 2302,
    "title": "how to use the model's checkpoint in local fold?",
    "body": "### System Info\n\nghcr.io/huggingface/text-generation-inference   2.0.4\r\nplatform windows10\r\nDocker version 27.0.3\r\nllm model:lllyasviel/omost-llama-3-8b-4bits\r\ncuda 12.3\r\ngpu nvidia rtx A6000\n\n### Information\n\n- [X] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [ ] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\nC:\\Users\\Administrator>docker run --gpus all -p 8080:80 -v ./data:/data ghcr.io/huggingface/text-generation-inference:2.0.4 --model-id \"F:\\Omost-main\\checkpoints\\models--lllyasviel--omost-llama-3-8b-4bits\" --max-total-tokens 9216 --cuda-memory-fraction 0.8\n\n### Expected behavior\n\neventhought i set the model-id =<my local path/>, docker raise a error.\r\n![\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_20240725122625](https://github.com/user-attachments/assets/008de556-f07e-4196-8727-eea0744eb731)\r\n",
    "url": "https://github.com/huggingface/text-generation-inference/issues/2302",
    "state": "open",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-07-25T04:26:44Z",
    "updated_at": "2024-08-25T01:57:54Z",
    "user": "zk19971101"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8957,
    "title": "StableDiffusionSafetyChecker ignores `attn_implementation` load kwarg",
    "body": "### Describe the bug\n\n`transformers` added `sdpa` and FA2 for CLIP model in https://github.com/huggingface/transformers/pull/31940. It now initializes the vision model like https://github.com/huggingface/transformers/blob/85a1269e19af022e04bc2aad82572cd5a9e8cdd9/src/transformers/models/clip/modeling_clip.py#L1143. \r\n\r\nHowever, `StableDiffusionSafetyChecker` uses https://github.com/huggingface/diffusers/blob/2c25b98c8ea74cfb5ec56ba49cc6edafef0b26af/src/diffusers/pipelines/stable_diffusion/safety_checker.py#L41 so it always gets initialized with sdpa attention. \n\n### Reproduction\n\n```python\r\nfrom diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker\r\n\r\nmodel = StableDiffusionSafetyChecker.from_pretrained(\r\n    \"runwayml/stable-diffusion-v1-5\", \r\n    subfolder=\"safety_checker\", \r\n   attn_implementation=\"eager\"\r\n)\r\nprint(type(model.vision_model.vision_model.encoder.layers[0].self_attn))\r\n```\r\n\r\nExpected `transformers.models.clip.modeling_clip.CLIPAttention` but got `transformers.models.clip.modeling_clip.CLIPSdpaAttention`.\n\n### Logs\n\n_No response_\n\n### System Info\n\ndiffusers 0.29.0\r\ntransformers 4.43.1\n\n### Who can help?\n\n@sayakpaul @dn",
    "url": "https://github.com/huggingface/diffusers/issues/8957",
    "state": "closed",
    "labels": [
      "bug",
      "help wanted",
      "Good second issue",
      "contributions-welcome"
    ],
    "created_at": "2024-07-24T19:38:23Z",
    "updated_at": "2024-11-19T21:06:53Z",
    "comments": 8,
    "user": "jambayk"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 862,
    "title": "how to retain spiece token markers ",
    "body": "### Question\n\nWhen evaluating a model that uses sentencepiece using transformer.js, I do not get the `\u2581` marker included in the output as I do when running from python.  I'm using the qanastek/pos-french-camembert model with to do POS tagging and have situations where a single word such as a verb with a tense suffix is returned as two or more tokens. I'd like to process the group of tokens and decide how to handle the different labels. I see the `pre_tokenizer` and `decoder` fields of the model's `tokenizer.json` include references to the `Metaspace` parameter, but I'm unsure if it's possible to configure it to retain the space placeholder token.",
    "url": "https://github.com/huggingface/transformers.js/issues/862",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-24T16:01:44Z",
    "updated_at": "2024-07-24T17:14:58Z",
    "user": "joprice"
  },
  {
    "repo": "huggingface/transformers",
    "number": 32186,
    "title": "callback to implement how the predictions should be stored",
    "body": "",
    "url": "https://github.com/huggingface/transformers/issues/32186",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-24T11:36:26Z",
    "updated_at": "2024-07-24T11:39:13Z",
    "user": "Imran-imtiaz48"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1969,
    "title": "Latest Optimum library does not compatible with latest Transformers",
    "body": "### System Info\n\n```shell\nAny system that can install those libraries\n```\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nTry to install transformers along with optimum\n\n### Expected behavior\n\nFix here? https://github.com/huggingface/optimum/blob/main/setup.py#L18",
    "url": "https://github.com/huggingface/optimum/issues/1969",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-07-24T06:49:07Z",
    "updated_at": "2024-08-20T09:06:19Z",
    "comments": 1,
    "user": "lanking520"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8953,
    "title": "Why loading a lora weights so low?",
    "body": "I used diffusers to load lora weights but it much slow to finish.\r\ndiffusers version: 0.29.2\r\n\r\nI test another version of diffusers 0.23.0 without peft installation, and the time is decent.\r\n\r\n```\r\nt1 = time.time()\r\npipe.load_lora_weights(\"/data/**/lora_weights/lcm-lora-sdxl/\", weight_name=\"pytorch_lora_weights.safetensors\")\r\nprint(f\"load lcm lora weights cost: {time.time()- t1}\")\r\n```\r\n![image](https://github.com/user-attachments/assets/af473634-b6d4-46db-94e8-102e0165e4ab)\r\n![image](https://github.com/user-attachments/assets/a6507920-aadb-4afe-9388-d3f79ae91cf8)\r\n\r\nAnd If I use low version of diffusers, much of code need to be modified which cost much work. \r\nAnyone who can help me will be appreciate.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/8953",
    "state": "closed",
    "labels": [
      "peft"
    ],
    "created_at": "2024-07-24T06:16:42Z",
    "updated_at": "2024-10-15T15:23:34Z",
    "comments": 18,
    "user": "zengjie617789"
  },
  {
    "repo": "pytorch/audio",
    "number": 3816,
    "title": "Division by zero in loudness calculation",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nThe following line in the functional method `loudness` results in `nan` value when the entire waveform is below the hardcoded loudness threshold value `gamma_abs = -70`.\r\nhttps://github.com/pytorch/audio/blob/69b2a0adc2ec03ab99990d7e8be3d4510438c148/src/torchaudio/functional/functional.py#L1627-L1631\r\n\r\nAn example case is while trying to find loudness of an ambient sound signal.\r\n\r\nThe threshold can probably be made configurable with mention in documentation. However, I as the method returns a **LUFS** value, I am unsure if a configurable threshold should be allowed. I am not very familiar with the algorithm yet, any suggestions/corrections to what I've said is most welcome.\r\n\r\n### Versions\r\n\r\nLatest code in `main` branch.",
    "url": "https://github.com/pytorch/audio/issues/3816",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-24T05:55:53Z",
    "updated_at": "2024-07-29T06:32:17Z",
    "comments": 0,
    "user": "DanTremonti"
  },
  {
    "repo": "pytorch/audio",
    "number": 3815,
    "title": "Division by zero in loudness calculation",
    "body": "The following line in the functional method `loudness` results in `nan` value when the entire waveform is below the hardcoded loudness threshold value `gamma_abs = -70`.\r\nhttps://github.com/pytorch/audio/blob/69b2a0adc2ec03ab99990d7e8be3d4510438c148/src/torchaudio/functional/functional.py#L1627-L1631\r\n\r\nAn example case is while trying to find loudness of an ambient sound signal.\r\n\r\nThe threshold can probably be made configurable with mention in documentation.",
    "url": "https://github.com/pytorch/audio/issues/3815",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-24T05:52:03Z",
    "updated_at": "2024-07-24T05:53:28Z",
    "comments": 0,
    "user": "dhanvanth-pk-13760"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2956,
    "title": "How to run Vision Model(Like llava) based on pippy?",
    "body": "Currently I tried to apply model parallelism based on pippy and I refer to the given example,\r\n\r\n```\r\nimport torch\r\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\r\nfrom accelerate import PartialState, prepare_pippy\r\n\r\nmodel = AutoModelForCausalLM.from_pretrained(\r\n    \"meta-llama/Llama-2-7b-chat-hf\", low_cpu_mem_usage=True, attn_implementation=\"sdpa\"\r\n)\r\nmodel.eval()\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(\"meta-llama/Llama-2-7b-chat-hf\")\r\nprompts = (\"I would like to\", \"I really like to\", \"The weather is pretty\")  # bs = 3\r\ntokenizer.pad_token = tokenizer.eos_token\r\ninputs = tokenizer(prompts, return_tensors=\"pt\", padding=True)\r\n\r\nmodel = prepare_pippy(model, split_points=\"auto\", example_kwargs=inputs)\r\n\r\ninputs = inputs.to(0)\r\nwith torch.no_grad():\r\n    output = model(**inputs)\r\n\r\nif PartialState().is_last_process:\r\n    next_token_logits = output[0][:, -1, :]\r\n    next_token = torch.argmax(next_token_logits, dim=-1)\r\n    print(tokenizer.batch_decode(next_token))\r\n```\r\n    \r\n  But I don't know how to convert it to the vision-model sample. Currently, my code is:\r\n\r\n```\r\nimport requests\r\nfrom PIL import Image\r\nfrom accelerate import Accelerator, load_checkpoint_and_dispatch, init_empty_weights\r\nimport torch\r\nimport torch.distributed as dist\r\nfrom transformers import AutoProcessor, LlavaForConditionalGeneration, LlavaNextForConditionalGeneration, LlavaNextProcessor\r\nfrom accelerate import PartialState, prepare_pippy\r\nfrom transformers.models.auto.tokenization_auto import AutoTokenizer\r\n\r\nif __name__ == \"__main__\":\r\n\r\n    model_id = \"llava-hf/llava-v1.6-mistral-7b-hf\"\r\n    prompt = \"USER: <image>\\nWhat are these?\\nASSISTANT:\"\r\n    image_file = \"http://images.cocodataset.org/val2017/000000039769.jpg\"\r\n    raw_image = Image.open(requests.get(image_file, stream=True).raw)\r\n\r\n    model = LlavaNextForConditionalGeneration.from_pretrained(\r\n        model_id, \r\n        torch_dtype=torch.float16, \r\n        low_cpu_mem_usage=True\r\n    )\r\n    model.eval()\r\n\r\n    processor = LlavaNextProcessor.from_pretrained(model_id)\r\n    inputs = processor(prompt, raw_image, return_tensors='pt')\r\n\r\n    model = prepare_pippy(model, split_points=\"auto\", example_kwargs=inputs)\r\n    inputs = inputs.to(0)\r\n\r\n    with torch.no_grad():\r\n        output = model(**inputs)\r\n    if PartialState().is_last_process:\r\n        print(processor.decode(output[0][2:], skip_special_tokens=True))\r\n```\r\nand I get the error below:\r\n\r\naccelerate launch --num_processes 2 llava/accelerate/pipeline_inference.py \r\n\r\n```\r\nThe following values were not passed to `accelerate launch` and had defaults used instead:\r\n                More than one GPU was found, enabling multi-GPU training.\r\n                If this was unintended please pass in `--num_processes=1`.\r\n        `--num_machines` was set to a value of `1`\r\n        `--mixed_precision` was set to a value of `'no'`\r\n        `--dynamo_backend` was set to a value of `'no'`\r\nTo avoid this warning pass in values for each of the problematic parameters or run `accelerate config`.\r\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 4/4 [00:00<00:00,  9.15it/s]\r\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 4/4 [00:00<00:00,  6.01it/s]\r\nSpecial tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\r\nSpecial tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\r\nhuggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\r\n\r\n[rank0]: Traceback (most recent call last):\r\n[rank0]:   File \"/home/zhenghao-lu/anaconda3/envs/vllm/lib/python3.10/site-packages/torch/_dynamo/utils.py\", line 1764, in run_node\r\n[rank0]:     return node.target(*args, **kwargs)\r\n[rank0]:   File \"/home/zhenghao-lu/anaconda3/envs/vllm/lib/python3.10/site-packages/torch/__init__.py\", line 470, in sym_int\r\n[rank0]:     return math.floor(a) if a >= 0 else math.ceil(a)  # type: ignore[arg-type, call-overload]\r\n[rank0]:   File \"/home/zhenghao-lu/anaconda3/envs/vllm/lib/python3.10/site-packages/torch/__init__.py\", line 376, in __bool__\r\n[rank0]:     return self.node.bool_()\r\n[rank0]:   File \"/home/zhenghao-lu/anaconda3/envs/vllm/lib/python3.10/site-packages/torch/fx/experimental/sym_node.py\", line 432, in bool_\r\n[rank0]:     return self.guard_bool(\"\", 0)\r\n[rank0]:   File \"/home/zhenghao-lu/anaconda3/envs/vllm/lib/python3.10/site-packages/torch/fx/experimental/sym_node.py\", line 374, in guard_bool\r\n[rank0]:     r = self.shape_env.evaluate_expr(self.expr, self.hint, fx_node=self.fx_node)\r\n[rank0]:   File",
    "url": "https://github.com/huggingface/accelerate/issues/2956",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-24T03:13:21Z",
    "updated_at": "2024-09-13T15:06:32Z",
    "user": "JerryLu991223"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 479,
    "title": "regarding torch.compile support",
    "body": "in coming soon, there is an item called `torch.compile support`. I'm wondering if we simply call torch.compile once to wrap the entire model, will that be enough? What's the reason we want to do something more fine-grained and customized? \r\n",
    "url": "https://github.com/pytorch/torchtitan/issues/479",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-24T01:10:20Z",
    "updated_at": "2024-07-26T23:50:24Z",
    "user": "jason718"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 478,
    "title": "what's the est timeline for releasing Context Parallel and 3D Pipeline ",
    "body": "Many interesting topics are mentioned in coming soon section, I'm wondering do we have a estimated/targeted releasing date? Thanks again for the great work.",
    "url": "https://github.com/pytorch/torchtitan/issues/478",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-24T01:09:02Z",
    "updated_at": "2024-07-26T23:51:06Z",
    "user": "jason718"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 859,
    "title": "JavaScript code completion model",
    "body": "### Question\n\nCurrently we have two Python code completion models:\r\n\r\nhttps://github.com/xenova/transformers.js/blob/7f5081da29c3f77ee830269ab801344776e61bcb/examples/code-completion/src/App.jsx#L9-L13\r\n\r\nAnd since we are doing JavaScript here, I would like a model optimized on JavaScript. Does anyone have a JavaScript code completion model?",
    "url": "https://github.com/huggingface/transformers.js/issues/859",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-23T13:51:58Z",
    "updated_at": "2024-07-23T13:51:58Z",
    "user": "kungfooman"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2994,
    "title": "Compute leaks between splits?",
    "body": "See https://huggingface.co/blog/lbourdois/lle\r\n\r\nAlso: should we find the duplicate rows?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2994",
    "state": "open",
    "labels": [
      "question",
      "feature request",
      "P2"
    ],
    "created_at": "2024-07-23T13:00:39Z",
    "updated_at": "2025-06-24T11:39:37Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7066,
    "title": "One subset per file in repo ?",
    "body": "Right now we consider all the files of a dataset to be the same data, e.g.\r\n```\r\nsingle_subset_dataset/\r\n\u251c\u2500\u2500 train0.jsonl\r\n\u251c\u2500\u2500 train1.jsonl\r\n\u2514\u2500\u2500 train2.jsonl\r\n```\r\nbut in cases like this, each file is actually a different subset of the dataset and should be loaded separately\r\n```\r\nmany_subsets_dataset/\r\n\u251c\u2500\u2500 animals.jsonl\r\n\u251c\u2500\u2500 trees.jsonl\r\n\u2514\u2500\u2500 metadata.jsonl\r\n```\r\n\r\nIt would be nice to detect those subsets automatically using a simple heuristic. For example we can group files together if their paths names are the same except some digits ?",
    "url": "https://github.com/huggingface/datasets/issues/7066",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-23T12:43:59Z",
    "updated_at": "2025-06-26T08:24:50Z",
    "comments": 1,
    "user": "lhoestq"
  },
  {
    "repo": "pytorch/examples",
    "number": 1278,
    "title": "Larger image size for DCGAN code with Celeba dataset",
    "body": "I want to test DCGAN example with a larger image size. The [default](https://github.com/pytorch/tutorials/blob/main/beginner_source/dcgan_faces_tutorial.py#L188) image size is 64x64 and in this [topic](https://github.com/pytorch/examples/issues/70), there are some proposals to modify the code to support larger images sizes.\r\n\r\nHowever, that topic is for the code in 2017 and when I change the size to 128x128, I get a different error now:\r\n```\r\nStarting Training Loop...\r\nTraceback (most recent call last):\r\n  File \"/home/mahmood/DCG/main.py\", line 599, in <module>\r\n    errD_real = criterion(output, label)\r\n                ^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/mahmood/pytorch/torch/nn/modules/module.py\", line 1716, in _wrapped_call_impl\r\n    return self._call_impl(*args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/mahmood/pytorch/torch/nn/modules/module.py\", line 1727, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/mahmood/pytorch/torch/nn/modules/loss.py\", line 697, in forward\r\n    return F.binary_cross_entropy(\r\n           ^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/mahmood/pytorch/torch/nn/functional.py\", line 3545, in binary_cross_entropy\r\n    raise ValueError(\r\nValueError: Using a target size (torch.Size([128])) that is different to the input size (torch.Size([3200])) is deprecated. Please ensure they have the same size.\r\n\r\n```\r\n\r\nI don't know where does the 3200 come from. Any idea on how to fix that?\r\n ",
    "url": "https://github.com/pytorch/examples/issues/1278",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-23T11:40:57Z",
    "updated_at": "2024-07-24T08:10:03Z",
    "comments": 0,
    "user": "mahmoodn"
  },
  {
    "repo": "huggingface/transformers",
    "number": 32145,
    "title": "callback to implement how the predictions should be stored.",
    "body": "I am exploring distributed inference capabilities with the Hugging Face Trainer for transformers. I need to do distributed inference across multiple devices or nodes and save the predictions to a file. However, after reviewing the available callbacks, I did not find any that facilitate this specific task. Furthermore, when using the trainer.predict method, I noticed that it returns only the labels and predictions, without including the original input batches used for inference.\r\n\r\nPyTorch Lightning offers a flexible mechanism for handling prediction outputs using custom callbacks. For example, the following PyTorch Lightning code snippet demonstrates how a custom **BasePredictionWriter** callback can be implemented to save predictions to files:\r\n\r\n```import torch\r\nimport os\r\nfrom lightning.pytorch.callbacks import BasePredictionWriter\r\n\r\nclass CustomWriter(BasePredictionWriter):\r\n\r\n    def __init__(self, output_dir, write_interval):\r\n        super().__init__(write_interval)\r\n        self.output_dir = output_dir\r\n\r\n    def write_on_batch_end(\r\n        self, trainer, pl_module, prediction, batch_indices, batch, batch_idx, dataloader_idx\r\n    ):\r\n        torch.save(prediction, os.path.join(self.output_dir, str(dataloader_idx), f\"{batch_idx}.pt\"))\r\n\r\n    def write_on_epoch_end(self, trainer, pl_module, predictions, batch_indices):\r\n        torch.save(predictions, os.path.join(self.output_dir, \"predictions.pt\"))\r\n\r\npred_writer = CustomWriter(output_dir=\"pred_path\", write_interval=\"epoch\")\r\ntrainer = Trainer(callbacks=[pred_writer])\r\nmodel = BoringModel()\r\ntrainer.predict(model, return_predictions=False)\r\n```",
    "url": "https://github.com/huggingface/transformers/issues/32145",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2024-07-22T21:32:22Z",
    "updated_at": "2024-07-24T09:23:07Z",
    "user": "sachinya00"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8930,
    "title": "StableDiffusionXLControlNetImg2ImgPipeline often fails to respect \"pose\" control images",
    "body": "### Describe the bug\r\nHello,\r\n\r\n\r\nUsing [StableDiffusionXLControlNetImg2ImgPipeline](https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_sdxl#diffusers.StableDiffusionXLControlNetImg2ImgPipeline), and passing a \"pose\" control image often fails to produce an output image that maintains the pose.\r\nI couldn't find much info about this pipeline used with a pose image; I'd like to know whether the problem comes from the underlying pipe not being able to run an inference with this conditioning or if I'm doing something wrong, eg haven't found the right params.\r\n\r\nNote that on the link above the example snippet uses a canny image; and that the [controlnet model I'm using](https://huggingface.co/thibaud/controlnet-openpose-sdxl-1.0) uses a pose image but the `StableDiffusionXLControlNetPipeline` pipeline instead of `StableDiffusionXLControlNetImg2ImgPipeline`.\r\n\r\nIn the snippet, belows, [the control image used](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/person.png) works, however most control images will fail in my expeirence.\r\n\r\nHow to get this pipeline to consistently respect the pose from `control_image` ?\r\n\r\nThanks,\r\n\r\n### Reproduction\r\n\r\nUsing this image as reference image for the img2img part:\r\n<img src=\"https://github.com/user-attachments/assets/7ed0d32c-78ab-40d8-b448-03755bb6095\" width=\"200\" height=\"200\">\r\n\r\n```python\r\nimport torch\r\n\r\nfrom controlnet_aux import OpenposeDetector\r\nfrom diffusers import ControlNetModel\r\nfrom diffusers import StableDiffusionXLControlNetImg2ImgPipeline\r\nfrom diffusers.utils import load_image\r\nfrom PIL import Image\r\n\r\ncontrolnet = ControlNetModel.from_pretrained(\r\n    \"thibaud/controlnet-openpose-sdxl-1.0\",\r\n    torch_dtype=torch.float16,\r\n)\r\npipe = StableDiffusionXLControlNetImg2ImgPipeline.from_pretrained(\r\n    \"stabilityai/stable-diffusion-xl-base-1.0\",\r\n    controlnet=controlnet,\r\n    variant=\"fp16\",\r\n    use_safetensors=True,\r\n    torch_dtype=torch.float16,\r\n)\r\npipe.enable_model_cpu_offload()\r\nopenpose = OpenposeDetector.from_pretrained(\"lllyasviel/ControlNet\")\r\npose_image = load_image(\r\n    \"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/person.png\",\r\n)\r\ncontrol_image = openpose(pose_image).resize((1024, 1024))\r\ncontrol_image.save('control.png')\r\n\r\nprompt = \"daiton style, daiton, A brave sheriff with a star badge, wearing a cowboy hat and spurs, standing confidently, illustration style, minimalist, illustration style, minimalist, solid color background\"\r\nnegative_prompt = \"blurry, ugly, messy weird\"\r\nimage = Image.open(\r\n    <above image>,\r\n).resize((1024, 1024))\r\ncontrolnet_conditioning_scale = 1.0\r\n\r\nimages = pipe(\r\n    prompt=prompt,\r\n    negative_prompt=negative_prompt,\r\n    image=image,\r\n    control_image=control_image,\r\n    strength=1.0,\r\n    num_inference_steps=30,\r\n    controlnet_conditioning_scale=controlnet_conditioning_scale,\r\n).images\r\nimages[0].save(\"from_diffusers.png\")\r\n```\r\n\r\n\r\nThings I have tried:\r\n- various params (eg guidance scale, more steps)\r\n- other pose image\r\n- thicker edges in the pose image\r\n- other image sizes\r\n\r\n### Logs\r\n\r\n```shell\r\n/home/ubuntu/anaconda3/envs/inference_v2/lib/python3.10/site-packages/huggingface_hub/file_download.py:1132: 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`.\r\n  warnings.warn(\r\nLoading pipeline components...: 100%|\u2588| 7/7 [00:00<\r\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 30/30 [00:14<00:00,  2.12it/s]\r\n```\r\n\r\n\r\n### System Info\r\n\r\n- `diffusers` version: 0.27.2\r\n- Platform: Linux-5.15.0-1048-aws-x86_64-with-glibc2.31\r\n- Python version: 3.10.13\r\n- PyTorch version (GPU?): 2.1.0 (True)\r\n- Huggingface_hub version: 0.23.1\r\n- Transformers version: 4.39.3\r\n- Accelerate version: 0.25.0\r\n- xFormers version: not installed\r\n- Using GPU in script?: YES\r\n- Using distributed or parallel set-up in script?: NO\r\n\r\n### Who can help?\r\n\r\n@yiyixuxu @sayakpaul @DN6 ",
    "url": "https://github.com/huggingface/diffusers/issues/8930",
    "state": "open",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-07-22T13:48:48Z",
    "updated_at": "2024-09-21T07:48:04Z",
    "comments": 14,
    "user": "Clement-Lelievre"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 131313,
    "title": "How to create a custom op which can be compile by dynamo inductor?",
    "body": "### \ud83d\udcda The doc issue\n\nhttps://pytorch.org/tutorials/advanced/cpp_extension.html\n\n### Suggest a potential alternative/fix\n\nA descriptive explanation and a simple example are required.\n\ncc @svekars @brycebortree @ezyang @anijain2305 @chauhang @penguinwu",
    "url": "https://github.com/pytorch/pytorch/issues/131313",
    "state": "closed",
    "labels": [
      "module: docs",
      "triaged",
      "module: custom-operators",
      "oncall: pt2"
    ],
    "created_at": "2024-07-22T08:09:10Z",
    "updated_at": "2024-07-23T14:17:40Z",
    "user": "MoFHeka"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8924,
    "title": "Adding Differential Diffusion to Kolors, Auraflow, HunyuanDiT",
    "body": "Diffusers recently added support for the following models:\r\n- [x] [Kolors](https://github.com/huggingface/diffusers/pull/8812) (@tuanh123789)\r\n- [x] [AuraFlow](https://github.com/huggingface/diffusers/pull/8796)\r\n- [x] [HunyuanDiT](https://github.com/huggingface/diffusers/pull/8240) (@MnCSSJ4x)\r\n\r\nA few weeks ago, we also added community pipelines for [Differential Diffusion](https://arxiv.org/abs/2306.00950) utilizing [SDXL](https://github.com/huggingface/diffusers/pull/7550) and [SD3](https://github.com/huggingface/diffusers/pull/8679). You can search for \"diff diff\" comments in the PR files to find the required changes.\r\n\r\nWe would like to extend DiffDiff support for Kolors, AuraFlow and Hunyuan. Feel free to pick and iterate on one of the models that has not been assigned to someone else already \ud83e\udd17\r\n\r\n- You will have to create a community pipeline in [`examples/community`](https://github.com/huggingface/diffusers/tree/main/examples/community) folder.\r\n- The pipeline may need to be an Image-to-Image variant of the original Text-to-Image implementation to start off, since it would then be easier to add the required changes for DiffDiff. It should, hopefully, not be too difficult and can be created by following the changes in our Img2Img pipelines. For example, [Kolors](https://github.com/huggingface/diffusers/blob/1a8b3c2ee86c09d0d3e066f7e9ea2ab69e8e78fa/src/diffusers/pipelines/kolors/pipeline_kolors.py) and [KolorsImg2Img](https://github.com/huggingface/diffusers/blob/1a8b3c2ee86c09d0d3e066f7e9ea2ab69e8e78fa/src/diffusers/pipelines/kolors/pipeline_kolors_img2img.py). Feel free to ping me for help regarding anything and mentioning what you tried\r\n- Add the pipeline name, description, reference link, colab (if any), and your name to the [Community README](https://github.com/huggingface/diffusers/blob/main/examples/community/README.md). Also, add a section with the necessary inference code and your cool image showcases \ud83d\ude0e\r\n- Create a PR posting a reproducible code example or link to a colab notebook. Also post a few generation results with all required input images for the code to be runnable.\r\n\r\nWhen opening a PR, you can tag me and @DN6. For a more critical review of your generations, you can also tag @asomoza.\r\n\r\nMake sure to read the Diffusers [contributing guide](https://github.com/huggingface/diffusers/blob/main/CONTRIBUTING.md) if you're a first-time contributor.\r\n\r\nYou can find some more informational content here:\r\n- https://huggingface.co/docs/diffusers/main/en/using-diffusers/custom_pipeline_overview\r\n- https://huggingface.co/docs/diffusers/main/en/using-diffusers/contribute_pipeline\r\n\r\nKeep diffusing \ud83e\udde8\r\n\r\n**Edit: If you're working on this, it is better to follow the implementation of [Stable Diffusion 3](https://github.com/huggingface/diffusers/pull/8679). Make sure to not add any additional pre-processing code to the pipelines using external libraries or torchvision. You can follow the changes in [this commit](https://github.com/huggingface/diffusers/pull/8679/commits/c947fb6f91be954b8ba0daf2a3d5d806feb81571). Please make sure to go through all the links shared here**\r\n\r\nThanks to @MnCSSJ4x for adding support to HunyuanDiT!",
    "url": "https://github.com/huggingface/diffusers/issues/8924",
    "state": "closed",
    "labels": [
      "good first issue",
      "help wanted",
      "Good second issue",
      "contributions-welcome"
    ],
    "created_at": "2024-07-22T07:17:58Z",
    "updated_at": "2024-10-31T19:18:32Z",
    "comments": 28,
    "user": "a-r-r-o-w"
  },
  {
    "repo": "huggingface/candle",
    "number": 2349,
    "title": "What is the equivalent of interpolate from torch.nn",
    "body": "Hi,\r\nI need some help with translating things written in Python:\r\n\r\nf.e. I have such a statement:\r\n\r\n```\r\nimport torch.nn.functional as F\r\n\r\nresult[mask] = result[mask] + F.interpolate(cur_result.permute(3,0,1,2).unsqueeze(0).contiguous(), (H, W, D), mode='trilinear', align_corners=False).squeeze(0).permute(1,2,3,0).contiguous()[mask]\r\n```\r\nWhat is the interpolate equivalent. I've seen that Tensor have methods like intepolate1d and interpolate2d, but they have only dimension sizes of tensor to pass.\r\nAlso, It would be great to know how to reassign indices, and how to know what's dim, because in torch, there is no dim argument in most of the functions.\r\n\r\nBtw. Didn't ask that previously, but is this(Python/torch):\r\n`D = indices.shape[-1]`\r\nequivalent to(Rust/candle):\r\n`let d = indices.dim(D::Minus1).unwrap();`\r\n",
    "url": "https://github.com/huggingface/candle/issues/2349",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-21T22:14:33Z",
    "updated_at": "2024-07-21T22:14:33Z",
    "user": "wiktorkujawa"
  },
  {
    "repo": "huggingface/candle",
    "number": 2347,
    "title": "how to specify generator for  randn function",
    "body": "pytorch\r\n```python\r\nnoise = torch.randn(x_start.size(), dtype=x_start.dtype, layout=x_start.layout, generator=torch.manual_seed(seed)).to(x_start.device)\r\n```\r\n\r\nhow to specify seed in candle?",
    "url": "https://github.com/huggingface/candle/issues/2347",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-21T10:30:35Z",
    "updated_at": "2024-07-21T12:33:23Z",
    "user": "jk2K"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1354,
    "title": "How do I use chat ui with RAG(RETRIEVAL AUGMENTED GENERATOR)",
    "body": "I currently applied the rag technique to the \"HuggingFaceH4/zephyr-7b-beta\" model and used mongo atlas as a knowledge base, but I didn't find anything about how to connect the chat ui to pass the top k documents to the model so that it can use context to answer questions",
    "url": "https://github.com/huggingface/chat-ui/issues/1354",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-21T01:19:37Z",
    "updated_at": "2024-08-22T11:25:50Z",
    "comments": 1,
    "user": "pedro21900"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1353,
    "title": "Llama-3-70b - Together.ai failure",
    "body": "![image](https://github.com/user-attachments/assets/8231283e-8585-45b7-94ca-88b3a35a0771)\r\n\r\nThis config used to work on the older hugging chat 0.8.2 \r\n\r\nAll my other models (OpenAI, Anthropic) work fine, its just the Llama-3-70b from Together that fails.\r\n\r\n```\r\n  {\r\n    \"name\" : \"meta-llama/Meta-Llama-3-70B-Instruct-Lite\",\r\n    \"displayName\": \"Meta-Llama-3-70B-Instruct\",\r\n    \"description\": \"Generation over generation, Meta Llama 3 demonstrates state-of-the-art performance on a wide range of industry benchmarks and offers new capabilities, including improved reasoning.\",\r\n    \"logoUrl\": \"https://huggingface.co/datasets/huggingchat/models-logo/resolve/main/meta-logo.png\",\r\n    \"modelUrl\": \"https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct\",\r\n    \"websiteUrl\": \"https://llama.meta.com/llama3/\",\r\n    \"tokenizer\" : \"philschmid/meta-llama-3-tokenizer\",\r\n    \"promptExamples\" : [\r\n      {\r\n        \"title\": \"Write an email from bullet list\",\r\n        \"prompt\": \"As a restaurant owner, write a professional email to the supplier to get these products every week: \\n\\n- Wine (x10)\\n- Eggs (x24)\\n- Bread (x12)\"\r\n      }, {\r\n        \"title\": \"Code a snake game\",\r\n        \"prompt\": \"Code a basic snake game in python, give explanations for each step.\"\r\n      }, {\r\n        \"title\": \"Assist in a task\",\r\n        \"prompt\": \"How do I make a delicious lemon cheesecake?\"\r\n      }\r\n    ],\r\n    \"parameters\": {\r\n      \"stop\": [\"<|eot_id|>\",\"<|end_of_text|>\"],\r\n      \"truncate\": 6144,\r\n      \"max_new_tokens\": 2047\r\n    },\r\n    \"endpoints\" : [{\r\n      \"type\": \"openai\",\r\n      \"baseURL\": \"https://api.together.xyz/v1\",\r\n      \"apiKey\": 'TOGETHER_API_KEY_HERE'\r\n    }],\r\n  },\r\n```",
    "url": "https://github.com/huggingface/chat-ui/issues/1353",
    "state": "open",
    "labels": [
      "support",
      "models"
    ],
    "created_at": "2024-07-20T19:30:16Z",
    "updated_at": "2024-07-25T13:45:54Z",
    "comments": 4,
    "user": "gururise"
  },
  {
    "repo": "pytorch/examples",
    "number": 1277,
    "title": "word_language_model, is it a Transformer, Encoder-only or Decoder only?",
    "body": "## \ud83d\udcda Documentation\r\n\r\n<!-- A clear and concise description of what content in any of the README.md files is an issues -->\r\n\r\nThe document says word_language_model uses RNN/Transformer but I am having trouble understanding exactly what it is.\r\n\r\nLooking at the input target sequences, seems like it is a generative model where the expected output is shifted by 1(i.e the model is trained to generate words base on a prefix)\r\nhttps://github.com/pytorch/examples/blob/main/word_language_model/main.py#L140\r\n\r\nHowever, I see the output of decoder is re-wired as the input to encoder here:\r\nhttps://github.com/pytorch/examples/blob/main/word_language_model/model.py#L143\r\n\r\nAs a reference, since the document says that word_language_model implement both a RNN and a transformer model, I looked pytorch's implementation of transformer here:\r\nhttps://github.com/pytorch/pytorch/blob/main/torch/nn/modules/transformer.py#L273-L279\r\npytorch's implementation aligns with what the paper proposed where the input to decoder is src(input sequence) and input to. decoder is tgt(shifted target sequence)\r\n\r\nSo obviously word_language_model is not a vanilla transformer-like model for generating text because of the rewiring.\r\nSince it uses the vanilla transformer model and the built in cross attention in decoder is not removed, it is not a decoder-only model either.\r\nAnd since it is trained to generate text, I dont think it can be understood as a decoder-only model.\r\n\r\n\r\nCan someone help me understand why the output of encoder is re-wired to decoder as input to decoder instead of through cross attention and if the doc needs to be updated to reflect what the model is doing or the code needs to be simplified to use a decoder-only model?",
    "url": "https://github.com/pytorch/examples/issues/1277",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-20T05:14:09Z",
    "updated_at": "2024-07-20T05:40:53Z",
    "comments": 1,
    "user": "efg001"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3024,
    "title": "\u2753 [Question] How to deal with this error: AssertionError: cuda_ext_fp8 could not be imported. E4M3 quantization requires CUDA and cuda_ext_fp8",
    "body": "## \u2753 Question\r\n\r\nWhen I run the TensorRT/examples/dynamo/vgg16_fp8_ptq.py  \r\nAssertionError: cuda_ext_fp8 could not be imported. E4M3 quantization requires CUDA and cuda_ext_fp8\r\n\r\n## What you have already tried\r\n\r\nI transfer the cuda version:11.8/12.1/12.2\uff0cit doesn't work\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version : 2.3.1\r\n - CPU Architecture: Core\r\n - OS : wsl ubuntu\r\n - How you installed PyTorch : pip\r\n - Python version: 3.10\r\n - CUDA version: 12.1\r\n - I build conda env by these comands: \r\n conda create -n tensorrt python==3.10\r\n pip install torch torchvision torch-tensorrt tensorrt\r\n pip install nvidia-modelopt\r\n\r\n\r\n## Full error reporting\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/kun/code/YOLOv6/tools/quantization/vgg16_fp8.py\", line 106, in <module>\r\n    trt_model = torchtrt.dynamo.compile(\r\n  File \"/home/kun/miniconda3/envs/tensorrt/lib/python3.10/site-packages/torch_tensorrt/dynamo/_compiler.py\", line 227, in compile\r\n    trt_gm = compile_module(gm, inputs, settings)\r\n  File \"/home/kun/miniconda3/envs/tensorrt/lib/python3.10/site-packages/torch_tensorrt/dynamo/_compiler.py\", line 394, in compile_module\r\n    submodule_outputs = submodule(\r\n  File \"/home/kun/miniconda3/envs/tensorrt/lib/python3.10/site-packages/torch/fx/graph_module.py\", line 737, in call_wrapped\r\n    return self._wrapped_call(self, *args, **kwargs)\r\n  File \"/home/kun/miniconda3/envs/tensorrt/lib/python3.10/site-packages/torch/fx/graph_module.py\", line 317, in __call__\r\n    raise e\r\n  File \"/home/kun/miniconda3/envs/tensorrt/lib/python3.10/site-packages/torch/fx/graph_module.py\", line 304, in __call__\r\n    return super(self.cls, obj).__call__(*args, **kwargs)  # type: ignore[misc]\r\n  File \"/home/kun/miniconda3/envs/tensorrt/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1532, in _wrapped_call_impl\r\n    return self._call_impl(*args, **kwargs)\r\n  File \"/home/kun/miniconda3/envs/tensorrt/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1541, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"<eval_with_key>.35\", line 6, in forward\r\n  File \"/home/kun/miniconda3/envs/tensorrt/lib/python3.10/site-packages/torch/_ops.py\", line 594, in __call__\r\n    return self_._op(*args, **kwargs)\r\n  File \"/home/kun/miniconda3/envs/tensorrt/lib/python3.10/site-packages/modelopt/torch/quantization/tensor_quant.py\", line 49, in scaled_e4m3_impl\r\n    assert (\r\nAssertionError: cuda_ext_fp8 could not be imported. E4M3 quantization requires CUDA and cuda_ext_fp8.\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3024",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-20T01:44:13Z",
    "updated_at": "2024-08-07T17:06:50Z",
    "user": "zk1009"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2978,
    "title": "\ud83d\udca1 [REQUEST] - Tutorial on deep survival analysis using PyTorch & TorchSurv",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\r\n\r\n[`TorchSurv`](https://github.com/Novartis/torchsurv) is a Python package that serves as a companion tool to perform deep survival modeling within the `PyTorch` environment. Unlike existing libraries that impose specific parametric forms on users, `TorchSurv` enables the use of custom `PyTorch`-based deep survival models. With its lightweight design, minimal input requirements, full `PyTorch` backend, and freedom from restrictive survival model parameterizations, `TorchSurv` facilitates efficient survival model implementation, particularly beneficial for high-dimensional input data scenarios.\r\n\r\nIn this tutorial, we want to introduce how to easily use our package, from `loss functions` (Weibull and Cox model), `evaluation metrics` (concordance-index, AUC, Brier score) and `statistical tools` (Kaplan-Meier, estimator). This will enable `Pytorch` users to **develop true survival model by changing few lines of code** while using their favorite deep learning framework!\r\n\r\n### Existing tutorials on this topic\r\n\r\nThe tutorial will be adapted from our existing documentations:\r\n* [introduction to TorchSurv](https://opensource.nibr.com/torchsurv/notebooks/introduction.html)\r\n* [survival example with MNIST](https://opensource.nibr.com/torchsurv/notebooks/momentum.html)\r\n\r\n### Additional context\r\n\r\n**category**: `survival analysis`\r\n\r\nThis work was made as part of the collaboration research between the `FDA` and `Novartis`\r\n\r\nFurther read:\r\n* Our preprint manuscript can be found [here](https://arxiv.org/abs/2404.10761). \r\n* Features comparison between best `R` and `Python` packages can be found in [this section](https://opensource.nibr.com/torchsurv/index.html#related-packages)\r\n* Performance benchmarks and evaluations can be found [here](https://opensource.nibr.com/torchsurv/benchmarks.html)",
    "url": "https://github.com/pytorch/tutorials/issues/2978",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-19T17:53:34Z",
    "updated_at": "2024-10-30T18:09:44Z",
    "comments": 3,
    "user": "tcoroller"
  },
  {
    "repo": "pytorch/xla",
    "number": 7714,
    "title": "How to test on a subset of TPUs in a TPU Pod",
    "body": "## \u2753 Questions and Help\r\n\r\nWe have some quota for TPU pods (TPU v3-8N, N>1) but not for single-node machines (TPU v3-8). As everyone knows, single-node machines are really useful for debugging. However, under the default settings, simply launching the XLA code on a single node within a pod won't work -- it will wait for other nodes to join.\r\n\r\nFrom JAX\u2019s documentation, I vaguely remember there\u2019s an environment variable that allows you to run code on a subset of TPUs from a TPU pod. Do we have this feature in PyTorch XLA? If so, could you provide a pointer to this?",
    "url": "https://github.com/pytorch/xla/issues/7714",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-19T16:29:43Z",
    "updated_at": "2024-07-31T09:29:39Z",
    "user": "Jiayi-Pan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8907,
    "title": "[Tests] Improve transformers model test suite coverage",
    "body": "Currently, we have different variants of transformers: https://github.com/huggingface/diffusers/tree/main/src/diffusers/models/transformers/. However, we don't have test suites for each of them: https://github.com/huggingface/diffusers/tree/main/tests/models/transformers/. \r\n\r\nWe are seeking contributions from the community to improve this situation. Below is a list of the model for which we would really appreciate test suites for:\r\n\r\n- [x] [Hunyuan DiT](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/transformers/hunyuan_transformer_2d.py)\r\n- [x] [Latte](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/transformers/latte_transformer_3d.py)\r\n- [x] [Lumina](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/transformers/lumina_nextdit2d.py)\r\n- [x] [Temporal Transformer](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/transformers/transformer_temporal.py)\r\n\r\n## How to approach the process? \r\n\r\n* Take the configuration object for each of these models from their respective pipeline tests suites. For example, for the Latte Transformer, it would be here: https://github.com/huggingface/diffusers/blob/3f1411767bc0f1837adb6f289713807f18599db3/tests/pipelines/latte/test_latte.py#L57\r\n* Derive the expected inputs. You can do so by adding print statements to the corresponding pipeline file. For example, for the Latte Transformer, you could add print statements right here: https://github.com/huggingface/diffusers/blob/3f1411767bc0f1837adb6f289713807f18599db3/src/diffusers/pipelines/latte/pipeline_latte.py#L801 to investigate the shapes of the outputs and then use that information accordingly. \r\n* Then it should be just about defining the test suite like so: https://github.com/huggingface/diffusers/blob/main/tests/models/transformers/test_models_transformer_sd3.py. \r\n\r\n## Points to keep in mind when opening PRs\r\n\r\n* Mention this issue and tag @DN6 and myself. \r\n* Target only one modeling test at a time. \r\n",
    "url": "https://github.com/huggingface/diffusers/issues/8907",
    "state": "closed",
    "labels": [
      "Good second issue",
      "contributions-welcome"
    ],
    "created_at": "2024-07-19T10:14:34Z",
    "updated_at": "2024-08-19T03:00:12Z",
    "comments": 6,
    "user": "sayakpaul"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8906,
    "title": "there is no qk_norm in SD3Transformer2DModel. Is that right?",
    "body": "### Describe the bug\n\nthere is no qk_norm in SD3Transformer2DModel. Is that right?\r\n\r\n        self.attn = Attention(\r\n            query_dim=dim,\r\n            cross_attention_dim=None,\r\n            added_kv_proj_dim=dim,\r\n            dim_head=attention_head_dim // num_attention_heads,\r\n            heads=num_attention_heads,\r\n            out_dim=attention_head_dim,\r\n            context_pre_only=context_pre_only,\r\n            bias=True,\r\n            processor=processor,\r\n        )\n\n### Reproduction\n\n1.\n\n### Logs\n\n_No response_\n\n### System Info\n\n29.2\n\n### Who can help?\n\ndukunpeng",
    "url": "https://github.com/huggingface/diffusers/issues/8906",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-07-19T09:18:05Z",
    "updated_at": "2024-10-31T19:19:24Z",
    "comments": 3,
    "user": "heart-du"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 334,
    "title": "where to set the initial joint (position + angle) information  when controlling real aloha robot?",
    "body": "### System Info\n\n```Shell\nubuntu 20\n```\n\n\n### Information\n\n- [ ] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nHi Guys, I am using the pr #316 written by Cadene to control the real aloha robot, when running cmd : python control_robot.py teleoperate --robot aloha, I found the follower move fast to HORIZONTAL_POSITION, all arms in HORIZONTAL_POSITION like a line. When I control the follower arm with the master arm, I find that the movement direction of the follower arm is exactly opposite to that of the master arm. \r\nI thinke there may be some bug in code, or my own problem. I tried to figure out the following:\r\n1. where to set the initial pose info of follower and leader in code\r\n2. how to solve the opposite moving problem, have you guys met the same problem ?\r\n Thx\n\n### Expected behavior\n\n^^",
    "url": "https://github.com/huggingface/lerobot/issues/334",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2024-07-19T08:53:39Z",
    "updated_at": "2025-10-23T02:29:22Z",
    "user": "cong1024"
  },
  {
    "repo": "huggingface/distil-whisper",
    "number": 145,
    "title": "How to load a fine-tuned model for inference\uff1f",
    "body": "@sanchit-gandhi\r\nI used the script from https://github.com/huggingface/distil-whisper/tree/main/training/flax/finetuning_scripts to fine-tune a model and obtained a model named flax_model.msgpack. How can I load this model for inference? Additionally, why did the size of the fine-tuned model increase?",
    "url": "https://github.com/huggingface/distil-whisper/issues/145",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-19T02:21:10Z",
    "updated_at": "2024-10-21T17:13:45Z",
    "user": "xinliu9451"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8900,
    "title": "How to load sd_xl_refiner_1.0.safetensors  use from_single_file",
    "body": "### Describe the bug\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/workspace/work/private/TensorRT/demo/Diffusion/st_base.py\", line 300, in <module>\r\n    A1111(local_dir, 'sd_xl_base_1.0.safetensors', steps=50, cfs_scale=8)\r\n  File \"/workspace/work/private/TensorRT/demo/Diffusion/st_base.py\", line 235, in A1111\r\n    refiner = StableDiffusionXLPipeline.from_single_file(\r\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/opt/conda/envs/tensorrt/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py\", line 114, in _inner_fn\r\n    return fn(*args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^\r\n  File \"/opt/conda/envs/tensorrt/lib/python3.11/site-packages/diffusers/loaders/single_file.py\", line 503, in from_single_file\r\n    loaded_sub_model = load_single_file_sub_model(\r\n                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/opt/conda/envs/tensorrt/lib/python3.11/site-packages/diffusers/loaders/single_file.py\", line 113, in load_single_file_sub_model\r\n    loaded_sub_model = create_diffusers_clip_model_from_ldm(\r\n                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/opt/conda/envs/tensorrt/lib/python3.11/site-packages/diffusers/loaders/single_file_utils.py\", line 1411, in create_diffusers_clip_model_from_ldm\r\n    unexpected_keys = load_model_dict_into_meta(model, diffusers_format_checkpoint, dtype=torch_dtype)\r\n                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/opt/conda/envs/tensorrt/lib/python3.11/site-packages/diffusers/models/model_loading_utils.py\", line 154, in load_model_dict_into_meta\r\n    raise ValueError(\r\nValueError: Cannot load because text_model.embeddings.position_embedding.weight expected shape tensor(..., device='meta', size=(77, 768)), but got torch.Size([77, 1280]). If you want to instead overwrite randomly initialized weights, please make sure to pass both `low_cpu_mem_usage=False` and `ignore_mismatched_sizes=True`. For more information, see also: https://github.com/huggingface/diffusers/issues/1619#issuecomment-1345604389 as an example.\r\n```\r\n\r\n### Reproduction\r\n\r\nI have add   `low_cpu_mem_usage=False` and `ignore_mismatched_sizes=True`  but not work\r\n```\r\ndef download_config(local_dir):\r\n    # \u68c0\u67e5\u662f\u5426\u5b58\u5728\u6307\u5b9a\u7684\u5b50\u76ee\u5f55\r\n    sub_dir = '.huggingface'\r\n    path = os.path.join(local_dir, sub_dir)\r\n\r\n    # \u5224\u65ad\u76ee\u5f55\u662f\u5426\u5b58\u5728\r\n    if not os.path.isdir(path):\r\n        if 'base' in path:\r\n            local_config_path = snapshot_download(\r\n                repo_id=\"stabilityai/stable-diffusion-xl-base-1.0\",\r\n                allow_patterns=[\"*.json\", \"**/*.json\", \"*.txt\", \"**/*.txt\"],\r\n                local_dir=local_dir,\r\n            )\r\n        elif 'refiner' in path:\r\n            local_config_path = snapshot_download(\r\n                repo_id=\"stabilityai/stable-diffusion-xl-refiner-1.0\",\r\n                allow_patterns=[\"*.json\", \"**/*.json\", \"*.txt\", \"**/*.txt\"],\r\n                local_dir=local_dir,\r\n            )\r\n\r\n    return local_dir\r\n\r\n\r\ndef A1111(local_dir, model_name, steps, cfs_scale, dir=''):\r\n    pipe = StableDiffusionXLPipeline.from_single_file(\r\n        f'{local_dir}/{model_name}',\r\n        config=download_config(local_dir),\r\n        local_files_only=True,\r\n        torch_dtype=torch.float16,\r\n    ).to(\"cuda\")\r\n    # refiner model\r\n    refiner_path = '/workspace/work/private/hf_models/stable-diffusion-xl-refiner-1.0'\r\n    refiner = StableDiffusionXLPipeline.from_single_file(\r\n        f'{refiner_path}/sd_xl_refiner_1.0.safetensors',\r\n        text_encoder_2=pipe.text_encoder_2,\r\n        vae=pipe.vae,\r\n        config=download_config(local_dir),\r\n        local_files_only=True,\r\n        torch_dtype=torch.float16,\r\n        low_cpu_mem_usage=False,\r\n        ignore_mismatched_sizes=True,\r\n    ).to(\"cuda\")\r\n\r\n    # lora\r\n    lora_dir = '/data/modeldata/aigc-fg-gen/v1.9/Lora'\r\n    # adapter name \u4e0d\u80fd\u6709\u70b9\r\n    pipe.load_lora_weights(lora_dir, weight_name=\"fix_hands.pt\", adapter_name=\"fix_hands\")\r\n    pipe.load_lora_weights(lora_dir, weight_name=\"sdxl_lora_fg_v1.2_colorv2_shirt_mp.safetensors\",\r\n                           adapter_name=\"sdxl_lora_fg_v1_2_colorv2_shirt_mp\")\r\n    pipe.set_adapters([\"fix_hands\", \"sdxl_lora_fg_v1_2_colorv2_shirt_mp\"], adapter_weights=[1.5, 0.8])\r\n    # sample name https://huggingface.co/docs/diffusers/v0.26.2/en/api/schedulers/overview#schedulers\r\n    scheduler = DPMSolverSinglestepScheduler.from_config(pipe.scheduler.config, use_karras_sigmas=True)\r\n    pipe.scheduler = scheduler\r\n\r\n    # \u63d0\u793a\u53c2\u6570\r\n    prompt = \"xxxxx\"\r\n    negative_prompt = \"xxxxx\"\r\n    generator = torch.Generator(device=\"cuda\").manual_seed(1227346489)\r\n    num_images = 4\r\n    width, height = 1024, 1024\r\n    steps = steps\r\n    cfg_scale = cfs_scale\r\n    # if 'step' in model_name:\r\n    normal_optimization(pipe, infer=False)\r\n\r\n    params = {\r\n        'prompt': prompt,\r\n        'height': height,\r\n        'width': width,\r\n        'num_inference_steps': steps,\r\n        'guidance_scale': cfg_scale,\r\n        'negative_prom",
    "url": "https://github.com/huggingface/diffusers/issues/8900",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-07-19T01:58:05Z",
    "updated_at": "2024-07-26T10:39:07Z",
    "user": "631068264"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 854,
    "title": "How do you delete a downloaded model?",
    "body": "### Question\n\nHow do you delete a downloaded model that was downloaded to the IndexDB?\r\n\r\nThanks,\r\nAsh",
    "url": "https://github.com/huggingface/transformers.js/issues/854",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-18T22:10:51Z",
    "updated_at": "2024-07-19T16:23:21Z",
    "user": "AshD"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 3018,
    "title": "\u2753 [Question] How do you save a unet model compiled Torch-TensorRT (Stable Diffusion XL)",
    "body": "## \u2753 Question\r\n\r\nHow do you save a unet model compiled Torch-TensorRT from Stable Diffusion XL?\r\n\r\n## What you have already tried\r\n\r\nI've tried following the compilation instructions from the tutorial ([link](https://pytorch.org/TensorRT/tutorials/_rendered_examples/dynamo/torch_compile_stable_diffusion.html)). It wasn't very useful for my use case because I would like to save the compilation on disk and load it down the line when inference is needed. \r\n\r\nSo I've tried following the instructions which let you save your compilation using the dynamo backend ([link](https://pytorch.org/TensorRT/user_guide/saving_models.html#dynamo-ir)). This script represents a summary of what I'm doing:\r\n\r\n```\r\nimport torch\r\nimport torch_tensorrt\r\nfrom diffusers import StableDiffusionXLPipeline\r\n\r\npipe = StableDiffusionXLPipeline.from_pretrained(\r\n    \"stabilityai/stable-diffusion-xl-base-1.0\",\r\n    torch_dtype=torch.float16,\r\n    use_safetensors=True,\r\n).to(\"cuda\")\r\n\r\ninputs = [torch.randn((2, 4, 128, 128)).cuda()]  # After some digging, these are the input sizes needed to generate 1024x1024 images\r\n\r\ntrt_gm = torch_tensorrt.compile(pipe.unet, ir=\"dynamo\", inputs=inputs)\r\n```\r\n\r\nBut this yields the following error: `TypeError: UNet2DConditionModel.forward() missing 2 required positional arguments: 'timestep' and 'encoder_hidden_states'`\r\n\r\nSo, I've tried to provide these arguments as well, found after some playing around with the code from diffusers:\r\n\r\n```\r\nkwargs = {\r\n    \"timestep\": torch.tensor(951.0).cuda(),\r\n    \"encoder_hidden_states\": torch.randn(\r\n        (2, 77, 2048), dtype=torch.float16\r\n    ).cuda(),\r\n}\r\n\r\ntrt_gm = torch_tensorrt.compile(pipe.unet, ir=\"dynamo\", inputs=inputs, **kwargs)\r\n```\r\n\r\nAnd I get the same error. Probably, the kwargs don't get passed down into the calling functions. After altering the code from torch export (which probably wasn't necessary), I got an error of the type: `torch._dynamo.exc.InternalTorchDynamoError: argument of type 'NoneType' is not iterable`\r\n\r\nAny ideas how to properly compile a unet model from stable diffusion XL? Many thanks in advance.\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.3.1+cu121\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Ubuntu 22.04.3 LTS\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): `pip install torch --index-url https://download.pytorch.org/whl/cu121`\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives: \r\n - Python version: Python 3.10.12\r\n - CUDA version: 12.4\r\n - GPU models and configuration: NVIDIA GeForce RTX 4090\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/3018",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-18T18:15:06Z",
    "updated_at": "2024-09-03T06:52:33Z",
    "user": "dru10"
  },
  {
    "repo": "pytorch/vision",
    "number": 8536,
    "title": "ColorJitter results with OverflowError",
    "body": "### \ud83d\udc1b Describe the bug\n\nUsing `ColorJitter`  augmentations in torchvision 0.18.1 results in an `OverflowError`. This was not observed in older `torchvision` versions (tested with 0.15.0).\r\n\r\nHow to reproduce:\r\n```python\r\n# read an image\r\nfrom PIL import Image\r\nimport requests\r\nfrom io import BytesIO\r\n# I picked this image, but it actually happens with others as well. just try one that you have.\r\npil_img = Image.open(BytesIO(requests.get('https://www.weizmann.ac.il/math/bagon/sites/math.bagon/files/styles/pi_photo/public/ShaiBagon_8.png').content))\r\n\r\nfrom torchvision import transforms\r\ncj = transforms.ColorJitter(brightness=0.4, contrast=0.4, saturation=0.2, hue=0.1)\r\nfor _ in range(10):\r\n    cj(pil_img)  # it does not happen every time, but out of 10 it will most likely happen)\r\n```\r\nThis code will through:\r\n```\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 2, in <module>\r\n  File \"[...]/python3.10/site-packages/torch/nn/modules/module.py\", line 1532, in _wrapped_call_impl\r\n    return self._call_impl(*args, **kwargs)\r\n  File \"[...]/python3.10/site-packages/torch/nn/modules/module.py\", line 1541, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"[...]/lib/python3.10/site-packages/torchvision/transforms/transforms.py\", line 1280, in forward\r\n    img = F.adjust_hue(img, hue_factor)\r\n  File \"[...]/lib/python3.10/site-packages/torchvision/transforms/functional.py\", line 959, in adjust_hue\r\n    return F_pil.adjust_hue(img, hue_factor)\r\n  File \"[...]/lib/python3.10/site-packages/torchvision/transforms/_functional_pil.py\", line 114, in adjust_hue\r\n    np_h += np.uint8(hue_factor * 255)\r\nOverflowError: Python integer -24 out of bounds for uint8\r\n```\r\n\n\n### Versions\n\n```\r\nPyTorch version: 2.3.1+cu121\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Red Hat Enterprise Linux 9.1 (Plow) (x86_64)\r\nGCC version: (GCC) 11.3.1 20220421 (Red Hat 11.3.1-2)\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\nLibc version: glibc-2.34\r\n\r\nPython version: 3.10.0 (default, Mar  3 2022, 09:58:08) [GCC 7.5.0] (64-bit runtime)\r\nPython platform: Linux-5.14.0-162.6.1.el9_1.x86_64-x86_64-with-glibc2.34\r\nIs CUDA available: True\r\nCUDA runtime version: Could not collect\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: GPU 0: NVIDIA A100 80GB PCIe\r\nNvidia driver version: 535.161.07\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                    x86_64\r\nCPU op-mode(s):                  32-bit, 64-bit\r\nAddress sizes:                   46 bits physical, 57 bits virtual\r\nByte Order:                      Little Endian\r\nCPU(s):                          52\r\nOn-line CPU(s) list:             0-51\r\nVendor ID:                       GenuineIntel\r\nModel name:                      Intel(R) Xeon(R) Gold 5320 CPU @ 2.20GHz\r\nCPU family:                      6\r\nModel:                           106\r\nThread(s) per core:              1\r\nCore(s) per socket:              26\r\nSocket(s):                       2\r\nStepping:                        6\r\nCPU max MHz:                     3400.0000\r\nCPU min MHz:                     800.0000\r\nBogoMIPS:                        4400.00\r\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities\r\nVirtualization:                  VT-x\r\nL1d cache:                       2.4 MiB (52 instances)\r\nL1i cache:                       1.6 MiB (52 instances)\r\nL2 cache:                        65 MiB (52 instances)\r\nL3 cache:                        78 MiB (2 instances)\r\nNUMA node(s):                    2\r\nNUMA node0 CPU(s):               0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50\r\nNUMA node1 CPU(s):               1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51\r\nVulnerability Itlb multihit:     Not affected\r\nVulnerability L1tf:              Not affected\r\nVulnerability Mds:               Not affected\r\n",
    "url": "https://github.com/pytorch/vision/issues/8536",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-18T14:00:33Z",
    "updated_at": "2024-07-28T07:06:21Z",
    "comments": 7,
    "user": "shaibagon"
  },
  {
    "repo": "huggingface/candle",
    "number": 2341,
    "title": "how to use system prompt with the llama example?",
    "body": "Hi, I'm trying to pass a chat dialog in the [LLama3 format](https://github.com/meta-llama/llama3/blob/main/llama/tokenizer.py#L222) to the [llama example](https://github.com/huggingface/candle/tree/main/candle-examples/examples/llama) via -prompt, the string is as follows:\r\n\r\n```\r\n<|begin_of_text|><|start_header_id|>system<|end_header_id|>\r\n    \r\nYou are a helpful AI assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>\r\n    \r\nWhy is the sky blue?<|eot_id|><|start_header_id|>assistant<|end_header_id|>\r\n\r\n\r\n```\r\n\r\nThis seems to confuse the model and, depending on the user prompt can cause the model to generate gibberish characters (see also https://github.com/evilsocket/cake/issues/9):\r\n\r\n(i've made a small change to load the prompt from a file if passed with @)\r\n\r\n```sh\r\n/path/to/compiled/llama3/example --model-id \"meta-llama/Meta-Llama-3-8B\" --prompt @hf-llama-test/prompt.txt\r\n\r\n\r\nloading the model weights from meta-llama/Meta-Llama-3-8B\r\nloading prompt from @hf-llama-test/prompt.txt ...\r\nstarting the inference loop\r\n<|begin_of_text|><|start_header_id|>system<|end_header_id|>\r\n    \r\nYou are a helpful AI assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>\r\n    \r\nWhy is the sky blue?<|eot_id|><|start_header_id|>assistant<|end_header_id|>\r\n\r\n\r\n\r\nBy: David Cope (2022, October 23)\r\n\r\n\r\n14 tokens generated (16.831015425660595 token/s)\r\n```\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/candle/issues/2341",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-18T10:44:54Z",
    "updated_at": "2024-07-18T14:35:09Z",
    "user": "evilsocket"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 2246,
    "title": "can't start server with small --max-total-tokens. But works fine with big stting",
    "body": "when I try to run CUDA_VISIBLE_DEVICES=0,1,2,3 text-generation-launcher --port 6634 --model-id /models/ --max-concurrent-requests 128 --max-input-length 64--max-total-tokens 128 --max-batch-prefill-tokens 128 --cuda-memory-fraction 0.95. It says \r\n\r\ntorch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 2.00 MiB. GPU  has a total capacity of 44.53 GiB of which 1.94 MiB is free. Process 123210 has 44.52 GiB memory in use. Of the allocated memory 40.92 GiB is allocated by PyTorch, and 754.08 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management \r\n\r\nBut for sitting big max tokens.  CUDA_VISIBLE_DEVICES=0,1,2,3 text-generation-launcher --port 6634 --model-id /models/ --max-concurrent-requests 128 --max-input-length 1024 --max-total-tokens 2048 --max-batch-prefill-tokens 2048 --cuda-memory-fraction 0.95.  it works fine.\r\n\r\n\r\ni don't get it why small max tokens cause CUDA out of memory but large max tokens works fine. Can someone answer my questions? \r\n",
    "url": "https://github.com/huggingface/text-generation-inference/issues/2246",
    "state": "closed",
    "labels": [
      "question",
      "Stale"
    ],
    "created_at": "2024-07-18T07:03:31Z",
    "updated_at": "2024-08-24T01:52:30Z",
    "user": "rooooc"
  },
  {
    "repo": "pytorch/serve",
    "number": 3253,
    "title": "GPU memory not released after inference",
    "body": "I built the .mar file by using torch-model-archiver, and wrote a custom handler that processes batched inputs, to be more specific\r\nI'm doing the following steps:\r\n\r\nsending one single request with N images as a list of base64 str\r\nconverting these images into tensors in my handler's preprocess\r\ncreate a batch from the above tensors and pass it to the model for inference\r\nreturn the inference response\r\n\r\nand through testing, I found if I send 4 images it will occupy around 14G memories of GPU, and then after sending 4 images, the next request if I only send 1 image, the GPU memory is not released and kept at 14G\r\n\r\nIs this normal, and is there any way I can release some GPU memories after no inference request like after a while?\r\n",
    "url": "https://github.com/pytorch/serve/issues/3253",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-17T09:10:59Z",
    "updated_at": "2024-07-19T14:39:02Z",
    "comments": 1,
    "user": "Di-Gu"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8881,
    "title": "How to Generate Multiple Image Inference in Instruct Pix2Pix",
    "body": "Hello, I am currently working on how to utilize Instruct Pix2Pix for augmentation.\r\nFor this purpose, I want to generate images by putting a Tensor of shape [64,3,84,84] (batch,channel,width,height)shape into the Instruct Pix2Pix pipeline, but the Instruct Pix2Pix provided by diffusers can only edit for one image.\r\nIs it possible to edit multiple images at the same time? It seems that it works only with 1 batch size. \r\nIs there way generate images with multiple batch size?",
    "url": "https://github.com/huggingface/diffusers/issues/8881",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-17T07:47:09Z",
    "updated_at": "2024-09-02T00:45:15Z",
    "user": "E-SJ"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 849,
    "title": "AutoModel.from_pretrained - Which model is loaded",
    "body": "### Question\n\nI am using AutoModel.from_pretrained(\"Xenova/yolos-tiny\") to load the Yolos model for object detection. Does transformers.js load the model_quantized.onnx  by default? Would I be able to load model.onnx? \r\n\r\nA related question: Is there a way to check which model is loaded once the model is loaded?",
    "url": "https://github.com/huggingface/transformers.js/issues/849",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-16T22:45:15Z",
    "updated_at": "2024-08-09T09:45:37Z",
    "user": "mram0509"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 2239,
    "title": "Can I somehow change attention type from 'FlashAttention' in the text-server-launcher?",
    "body": "",
    "url": "https://github.com/huggingface/text-generation-inference/issues/2239",
    "state": "closed",
    "labels": [
      "question",
      "Stale"
    ],
    "created_at": "2024-07-16T18:37:45Z",
    "updated_at": "2024-08-24T01:52:31Z",
    "user": "wasifmasood"
  },
  {
    "repo": "pytorch/executorch",
    "number": 4276,
    "title": "How to export a pretrained model?",
    "body": "Is there a way to export a pretrained model to executorch? This example https://pytorch.org/executorch/stable/getting-started-setup.html#export-a-program only shows how to export a new model instance. I tried doing it like this\r\n\r\n```\r\n# 1. torch.export: Defines the program with the ATen operator set.\r\nmodel.eval()\r\naten_dialect = torch.export.export( model, ( torch.ones( 2 ) ) )\r\n\r\n# 2. to_edge: Make optimizations for Edge devices\r\nedge_program = executorch.exir.to_edge( aten_dialect )\r\n\r\n# 3. to_executorch: Convert the graph to an ExecuTorch program\r\nexecutorch_program = edge_program.to_executorch()\r\n\r\n# 4. Save the compiled .pte program\r\nwith open( \"net.pte\", \"wb\" ) as file:\r\n    file.write(executorch_program.buffer)\r\n```\r\n\r\nbut I get `Expecting 'args' to be a tuple of example positional inputs, got <class 'torch.Tensor'>`.\r\n\r\nMy model:\r\n```\r\nclass Net( nn.Module ):\r\n    def __init__( self ):\r\n        super().__init__()\r\n        self.inputFeatures = 2\r\n        self.fc1 = nn.Linear(  self.inputFeatures,  1 )\r\n\r\n    def forward( self, x ):\r\n        fc1 = F.sigmoid( self.fc1( x ) )\r\n        return fc1\r\n```\r\n",
    "url": "https://github.com/pytorch/executorch/issues/4276",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-16T14:55:42Z",
    "updated_at": "2024-07-22T21:55:34Z",
    "user": "Bresenham"
  },
  {
    "repo": "huggingface/diarizers",
    "number": 13,
    "title": "How to solve `CUDA error: out of memory while doing inference for my diarization model`",
    "body": "ERROR - An error occurred: CUDA error: out of memory\r\nCUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\r\nFor debugging consider passing CUDA_LAUNCH_BLOCKING=1.\r\nCompile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\r\n\r\nI'm using a `12GB NVIDIA GeForce RTX 2050` with Cuda compilation tools, release 11.8\r\n\r\nHow to Solve this or how to use batching/ batch_size while doing inference?",
    "url": "https://github.com/huggingface/diarizers/issues/13",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-16T06:23:28Z",
    "updated_at": "2024-08-18T04:20:16Z",
    "user": "Ataullha"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 462,
    "title": "[FP8 options] Float8Linear vs TransformerEngine",
    "body": "Hi team, first of all thanks for this great repo for showcasing how to leverage the latest techniques in torch ecosystem, it's been super useful and insightful :) I have a naive question about FP8 options and would like to know more about how you view it. \r\n\r\nThere's the https://github.com/NVIDIA/TransformerEngine by nvidia for fp8 training on hopper and it's started to be integrated into downstream frameworks like HF, lightning etc. However I'm also seeing https://github.com/pytorch-labs/float8_experimental evolving quickly and the fact that it's more lightweight & potentially more composable w/ remaining torch techniques is also important to us. I'm wondering if you have some insight about the pros and cons of each of them, how would Float8Linear's performance compare to TE, and if you would recommend going with TE or Float8Linear for LLM pretraining/finetuning use cases. Thanks a lot! \r\n",
    "url": "https://github.com/pytorch/torchtitan/issues/462",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-16T03:54:29Z",
    "updated_at": "2025-06-02T16:54:11Z",
    "user": "yundai424"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 903,
    "title": "Github code search doesnt work with folders called `build`",
    "body": "### \ud83d\udc1b Describe the bug\n\nI was trying to look for the  `model.py` definition\r\nhttps://github.com/pytorch/torchchat/tree/main/build but it wasn't showing up\r\n<img width=\"816\" alt=\"Screenshot 2024-07-15 at 6 54 39\u202fPM\" src=\"https://github.com/user-attachments/assets/11021312-9e40-4ec6-adad-0a52a24f06e0\">\r\n\r\ngenerate.py which is not in builder works fine\r\n<img width=\"805\" alt=\"Screenshot 2024-07-15 at 6 54 54\u202fPM\" src=\"https://github.com/user-attachments/assets/8f6eaf5e-7e76-4a3d-b1cc-37254c6e3515\">\r\n\r\nCan we rename the folder to anything else, build to me signifies either release infra scripts or artifacts that are created after installing a package not model building utilities\r\n\n\n### Versions\n\nNightlies",
    "url": "https://github.com/pytorch/torchchat/issues/903",
    "state": "open",
    "labels": [
      "actionable"
    ],
    "created_at": "2024-07-16T01:55:45Z",
    "updated_at": "2024-07-30T15:11:19Z",
    "comments": 1,
    "user": "msaroufim"
  },
  {
    "repo": "pytorch/serve",
    "number": 3247,
    "title": "TorchServe docker image with vllm, trt-llm dependencies",
    "body": "### \ud83d\ude80 The feature\n\nTo have a no code solution with vllm, trt-llm, TorchServe needs a docker image with these dependencies.\r\nIncluding this with TorchServe's GPU image will bloat the image for all users of TorchServe\r\n\r\nWe can instead have another image for GenAI.\n\n### Motivation, pitch\n\nNo code solution for GenAI\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/3247",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-16T01:16:34Z",
    "updated_at": "2024-07-16T01:16:34Z",
    "comments": 0,
    "user": "agunapal"
  },
  {
    "repo": "pytorch/xla",
    "number": 7689,
    "title": "CUDA and GPU-Flavoured Docker/Container Image Missing CUDA Support",
    "body": "## \u2753 Questions and Help\r\n\r\nHi,\r\n\r\nAccording to the docs [here]( https://github.com/pytorch/xla?tab=readme-ov-file#docker ), the image `us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:r2.3.0_3.10_cuda_12.1` should have Cuda 12.1 support for use on a local GPU. I have also tried pulling `xla:nightly_3.8_cuda_12.1`.\r\n\r\nWhen I start the container (`podman run --shm-size=16g --net=host --gpus all  us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:r2.3.0_3.10_cuda_12.1`), it appears there is no CUDA support compiled in:\r\n\r\n```terminal\r\n# nvidia-smi\r\nbash: nvidia-smi: command not found\r\n# python\r\n>>> import torch, torch_xla\r\n>>> torch.cuda.get_device_name(0)\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/local/lib/python3.10/site-packages/torch/cuda/__init__.py\", line 414, in get_device_name\r\n    return get_device_properties(device).name\r\n  File \"/usr/local/lib/python3.10/site-packages/torch/cuda/__init__.py\", line 444, in get_device_properties\r\n    _lazy_init()  # will define _get_device_properties\r\n  File \"/usr/local/lib/python3.10/site-packages/torch/cuda/__init__.py\", line 284, in _lazy_init\r\n    raise AssertionError(\"Torch not compiled with CUDA enabled\")\r\nAssertionError: Torch not compiled with CUDA enabled\r\n>>> print(torch.__version__)\r\n2.3.0 # No CUDA suffix here\r\n>>> print(torch_xla.__version__)\r\n2.3.0 # Or here\r\n```\r\n\r\nAm I missing something here, or has something gone up with these CI builds?\r\n\r\nThanks\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/7689",
    "state": "closed",
    "labels": [
      "question",
      "xla:gpu"
    ],
    "created_at": "2024-07-15T22:56:55Z",
    "updated_at": "2025-04-03T13:56:12Z",
    "user": "stellarpower"
  },
  {
    "repo": "huggingface/datasets",
    "number": 7051,
    "title": "How to set_epoch with interleave_datasets?",
    "body": "Let's say I have dataset A which has 100k examples, and dataset B which has 100m examples.\r\n\r\nI want to train on an interleaved dataset of A+B, with stopping_strategy='all_exhausted' so dataset B doesn't repeat any examples. But every time A is exhausted I want it to be reshuffled (eg. calling set_epoch)\r\n\r\nOf course I want to interleave as IterableDatasets / streaming mode so B doesn't have to get tokenized completely at the start.\r\n\r\nHow could I achieve this? I was thinking something like, if I wrap dataset A in some new IterableDataset with from_generator() and manually call set_epoch before interleaving it? But I'm not sure how to keep the number of shards in that dataset...\r\n\r\nSomething like\r\n\r\n```\r\ndataset_a = load_dataset(...)\r\ndataset_b = load_dataset(...)\r\n\r\ndef epoch_shuffled_dataset(ds):\r\n  # How to make this maintain the number of shards in ds??\r\n  for epoch in itertools.count():\r\n    ds.set_epoch(epoch)\r\n    yield from iter(ds)\r\n\r\nshuffled_dataset_a = IterableDataset.from_generator(epoch_shuffled_dataset, gen_kwargs={'ds': dataset_a})\r\ninterleaved = interleave_datasets([shuffled_dataset_a, dataset_b], probs, stopping_strategy='all_exhausted')\r\n```",
    "url": "https://github.com/huggingface/datasets/issues/7051",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-15T18:24:52Z",
    "updated_at": "2024-08-05T20:58:04Z",
    "user": "jonathanasdf"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2933,
    "title": "How to apply model parallel on multi machines?",
    "body": "Currently, I want to do llm inference on multi machines. Due to limited memory, I hope to use all machines to load the model and I'm blocked with this point. I only find that based on device_map, I can do model parallel on single machine with multi cards.\r\n\r\nMay I have some ideas about how to use Accelerate to realize? Or may I get some other useful suggestions?\r\n\r\nThanks so much.",
    "url": "https://github.com/huggingface/accelerate/issues/2933",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-15T14:09:10Z",
    "updated_at": "2025-03-08T06:48:09Z",
    "user": "JerryLu991223"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1344,
    "title": "Ollama chatPromptTemplate and parameters",
    "body": "Hi,\r\nI have tried adding phi3-3.8b, as an ollama model, hosted on my own prem ollama server.\r\nI have basically copied the prompt template and parameters from microsoft/Phi-3-mini-4k-instruct used in hugging face - but it does not seem to work, I always get \"no output was generated\".\r\nsending a generate/chat http request to the ollama server works using phi3-3.8b works.\r\n\r\nIn general how can I generate prompt template and parameters for models hosted on ollama?\r\nFor instance llama3, or any other - did not find any instructions for that.",
    "url": "https://github.com/huggingface/chat-ui/issues/1344",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-07-15T12:38:12Z",
    "updated_at": "2024-09-18T17:57:30Z",
    "comments": 7,
    "user": "ran-haim"
  },
  {
    "repo": "pytorch/xla",
    "number": 7682,
    "title": "Is there any way to directly execute the cached computational graph",
    "body": "## \u2753 Questions and Help\r\nMy application code is complex, but it's not computationally expensive, and the graph is consistent, so I tried to cache it with XLA_PERSISTENT_CACHE_PATH, but it took a long time to execute the logic (without performing any computation).Is there any way to execute the cached graph? I also tried dynamo, but encountered many errors, such as incompatibility with autocast and so on",
    "url": "https://github.com/pytorch/xla/issues/7682",
    "state": "closed",
    "labels": [
      "question",
      "dynamo"
    ],
    "created_at": "2024-07-15T11:19:23Z",
    "updated_at": "2025-04-01T13:11:38Z",
    "user": "mars1248"
  },
  {
    "repo": "huggingface/transformers",
    "number": 31963,
    "title": "How to manually stop the LLM output\uff1f",
    "body": "I'm using `TextIteratorStreamer` for streaming output.\r\n\r\nSince LLM may repeat its output indefinitely, I would like to be able to have LLM stop generating when it receives a request to cancel.\r\n\r\nIs there any way to accomplish this?\r\n\r\nmodel: glm-4-9b-chat\r\n\r\n```python\r\nasync def predict(messages, model_id: str, raw_request: Request, gen_kwargs: Dict):\r\n    global model, tokenizer\r\n    choice_data = ChatCompletionResponseStreamChoice(index=0, delta=DeltaMessage(role='assistant'), finish_reason=None)\r\n    chunk = ChatCompletionResponse(model=model_id, choices=[choice_data], object='chat.completion.chunk')\r\n    yield '{}'.format(_dump_json(chunk, exclude_unset=True))\r\n\r\n    inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors='pt')\r\n    inputs = inputs.to(model.device)\r\n    streamer = TextIteratorStreamer(tokenizer=tokenizer, skip_prompt=True, timeout=60.0, skip_special_tokens=True)\r\n    generation_kwargs = dict(input_ids=inputs, streamer=streamer)\r\n    generation_kwargs.update(gen_kwargs)\r\n    thread = Thread(target=model.generate, kwargs=generation_kwargs)\r\n    thread.start()\r\n    for new_text in streamer:\r\n        print(new_text)\r\n        if raw_request is not None and await raw_request.is_disconnected():\r\n            print(\"disconnected\")\r\n            # todo stop generate\r\n        choice_data = ChatCompletionResponseStreamChoice(index=0, delta=DeltaMessage(content=new_text), finish_reason=None)\r\n        chunk = ChatCompletionResponse(model=model_id, choices=[choice_data], object='chat.completion.chunk')\r\n        yield '{}'.format(_dump_json(chunk, exclude_unset=True))\r\n\r\n    choice_data = ChatCompletionResponseStreamChoice(index=0, delta=DeltaMessage(content=''), finish_reason='stop')\r\n    chunk = ChatCompletionResponse(model=model_id, choices=[choice_data], object='chat.completion.chunk')\r\n    yield '{}'.format(_dump_json(chunk, exclude_unset=True))\r\n    yield '[DONE]'\r\n```",
    "url": "https://github.com/huggingface/transformers/issues/31963",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-15T07:09:43Z",
    "updated_at": "2024-07-16T00:34:41Z",
    "user": "invokerbyxv"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1343,
    "title": "vllm 400 status code (no body)  error",
    "body": "Hello everyone, I use the vllm openapi service, but I encountered a 400 status code (no body) error. How can I change it? Thanks\r\n\r\nvllm:\r\n```\r\npython -m vllm.entrypoints.openai.api_server --model /home/rickychen/\u684c\u9762/llm/models/Infinirc-Llama3-8B-5G-v1.0 --dtype auto --worker-use-ray --tensor-parallel-size 2 --port 8001 --served-model-name Infinirc-Llama3-8B-5G-v1.0\r\n```\r\n\r\nhuggingface chatui:\r\n```\r\nMODELS=`[\r\n  {\r\n    \"name\": \"Infinirc-Llama3-8B-5G-v1.0\",\r\n    \"id\": \"Infinirc-Llama3-8B-5G-v1.0\",\r\n    \"endpoints\": [{\r\n      \"type\": \"openai\",\r\n      \"baseURL\": \"http://10.0.9.5:8001/v1\",\r\n      \"apiKey\": \"a\"\r\n    }],\r\n    \"chatPromptTemplate\": \"{{#each messages}}{{#ifUser}}Human: {{content}}\\n{{/ifUser}}{{#ifAssistant}}Assistant: {{content}}\\n{{/ifAssistant}}{{/each}}Human: \",\r\n    \"promptExamples\": [\r\n      {\r\n        \"title\": \"Write an email from bullet list\",\r\n        \"prompt\": \"As a restaurant owner, write a professional email to the supplier to get these products every week: \\n\\n- Wine (x10)\\n- Eggs (x24)\\n- Bread (x12)\"\r\n      },\r\n      {\r\n        \"title\": \"Code a snake game\",\r\n        \"prompt\": \"Code a basic snake game in python, give explanations for each step.\"\r\n      },\r\n      {\r\n        \"title\": \"Assist in a task\",\r\n        \"prompt\": \"How do I make a delicious lemon cheesecake?\"\r\n      }\r\n    ],\r\n    \"parameters\": {\r\n      \"temperature\": 0.1,\r\n      \"top_p\": 0.95,\r\n      \"max_new_tokens\": 1024\r\n    }\r\n  }\r\n]`\r\n\r\n```\r\n\r\nerror:\r\n```\r\nBadRequestError: 400 status code (no body)\r\n    at APIError.generate (file:///Volumes/MacPro/LLM/ChatUI/chat-ui-main/node_modules/openai/error.mjs:41:20)\r\n    at OpenAI.makeStatusError (file:///Volumes/MacPro/LLM/ChatUI/chat-ui-main/node_modules/openai/core.mjs:256:25)\r\n    at OpenAI.makeRequest (file:///Volumes/MacPro/LLM/ChatUI/chat-ui-main/node_modules/openai/core.mjs:299:30)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async eval (/Volumes/MacPro/LLM/ChatUI/chat-ui-main/src/lib/server/endpoints/openai/endpointOai.ts:111:36)\r\n    at async Module.generate (/Volumes/MacPro/LLM/ChatUI/chat-ui-main/src/lib/server/textGeneration/generate.ts:8:30)\r\n    at async textGenerationWithoutTitle (/Volumes/MacPro/LLM/ChatUI/chat-ui-main/src/lib/server/textGeneration/index.ts:56:3)\r\n    at async Module.mergeAsyncGenerators (/Volumes/MacPro/LLM/ChatUI/chat-ui-main/src/lib/utils/mergeAsyncGenerators.ts:13:34)\r\n    at async Module.textGeneration (/Volumes/MacPro/LLM/ChatUI/chat-ui-main/src/lib/server/textGeneration/index.ts:24:3)\r\n    at async Object.start (/Volumes/MacPro/LLM/ChatUI/chat-ui-main/src/routes/conversation/[id]/+server.ts:325:26) {\r\n  status: 400,\r\n  headers: {\r\n    'content-length': '297',\r\n    'content-type': 'application/json',\r\n    date: 'Sun, 14 Jul 2024 12:47:33 GMT',\r\n    server: 'uvicorn'\r\n  },\r\n  request_id: undefined,\r\n  error: undefined,\r\n  code: undefined,\r\n  param: undefined,\r\n  type: undefined\r\n}\r\n[20:47:33.972] ERROR (31253): 400 status code (no body)\r\n    err: {\r\n      \"type\": \"BadRequestError\",\r\n      \"message\": \"400 status code (no body)\",\r\n      \"stack\":\r\n          Error: 400 status code (no body)\r\n              at APIError.generate (file:///Volumes/MacPro/LLM/ChatUI/chat-ui-main/node_modules/openai/error.mjs:41:20)\r\n              at OpenAI.makeStatusError (file:///Volumes/MacPro/LLM/ChatUI/chat-ui-main/node_modules/openai/core.mjs:256:25)\r\n              at OpenAI.makeRequest (file:///Volumes/MacPro/LLM/ChatUI/chat-ui-main/node_modules/openai/core.mjs:299:30)\r\n              at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n              at async eval (/Volumes/MacPro/LLM/ChatUI/chat-ui-main/src/lib/server/endpoints/openai/endpointOai.ts:111:36)\r\n              at async Module.generateFromDefaultEndpoint (/Volumes/MacPro/LLM/ChatUI/chat-ui-main/src/lib/server/generateFromDefaultEndpoint.ts:11:23)\r\n              at async generateTitle (/Volumes/MacPro/LLM/ChatUI/chat-ui-main/src/lib/server/textGeneration/title.ts:54:10)\r\n              at async Module.generateTitleForConversation (/Volumes/MacPro/LLM/ChatUI/chat-ui-main/src/lib/server/textGeneration/title.ts:17:19)\r\n      \"status\": 400,\r\n      \"headers\": {\r\n        \"content-length\": \"1748\",\r\n        \"content-type\": \"application/json\",\r\n        \"date\": \"Sun, 14 Jul 2024 12:47:33 GMT\",\r\n        \"server\": \"uvicorn\"\r\n      }\r\n    }\r\n\r\n```",
    "url": "https://github.com/huggingface/chat-ui/issues/1343",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-07-14T12:49:59Z",
    "updated_at": "2024-09-19T12:26:36Z",
    "comments": 3,
    "user": "rickychen-infinirc"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1342,
    "title": "undeclared node version depedancy",
    "body": "Using the current chat-ui dockerhub image I am unable to connect to localhost:3000 to run a simple instance of chat ui. The webservice returns 'Not Found for all routes'. Included below is my docker-compose file. if I change the chat-ui image to build with node 22 as the version everything works as expected. Does chat-ui have an undocumented dependency on a particular version of the node? There is no 'engine' field in package.json. Should there be one? Should we be using node >= 22? Is there a way to debug this or identify which package is causing the issue?\r\n\r\n```dockercompose\r\nversion: '3.1'\r\nservices:\r\n  mongo:\r\n    image: docker.io/library/mongo\r\n    restart: always\r\n    environment:\r\n      MONGO_INITDB_ROOT_USERNAME: root\r\n      MONGO_INITDB_ROOT_PASSWORD: example\r\n    ports:\r\n      - 27017:27017\r\n  mongo-express:\r\n    image: docker.io/library/mongo-express\r\n    restart: always\r\n    ports:\r\n      - 8081:8081\r\n    environment:\r\n      ME_CONFIG_MONGODB_ADMINUSERNAME: root\r\n      ME_CONFIG_MONGODB_ADMINPASSWORD: example\r\n      ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/\r\n      ME_CONFIG_BASICAUTH: \"false\"\r\n    depends_on:\r\n      - mongo\r\n  chat-ui:\r\n    image: chat-ui:20\r\n    restart: always\r\n    ports:\r\n      - 3000:3000\r\n      - 5173:5173\r\n    volumes:\r\n      - type: bind\r\n        source: .env.local\r\n        target: /app/.env.local\r\n    depends_on:\r\n      - mongo\r\n```\r\n```docker\r\n# syntax=docker/dockerfile:1\r\n# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker\r\n# you will also find guides on how best to write your Dockerfile\r\nARG INCLUDE_DB=false\r\n\r\n# stage that install the dependencies\r\nFROM node:22 as builder-production\r\n\r\nWORKDIR /app\r\n\r\nCOPY --link --chown=1000 package-lock.json package.json ./\r\nRUN --mount=type=cache,target=/app/.npm \\\r\n        npm set cache /app/.npm && \\\r\n        npm ci --omit=dev\r\n\r\nFROM builder-production as builder\r\n\r\nARG APP_BASE=\r\nARG PUBLIC_APP_COLOR=blue\r\nENV BODY_SIZE_LIMIT=15728640\r\n\r\nRUN --mount=type=cache,target=/app/.npm \\\r\n        npm set cache /app/.npm && \\\r\n        npm ci\r\n\r\nCOPY --link --chown=1000 . .\r\n\r\nRUN npm run build\r\n\r\n# mongo image\r\nFROM mongo:latest as mongo\r\n\r\n# image to be used if INCLUDE_DB is false\r\nFROM node:22-slim as local_db_false\r\n\r\n# image to be used if INCLUDE_DB is true\r\nFROM node:22-slim as local_db_true\r\n\r\nRUN apt-get update\r\nRUN apt-get install gnupg curl -y\r\n# copy mongo from the other stage\r\nCOPY --from=mongo /usr/bin/mongo* /usr/bin/\r\n\r\nENV MONGODB_URL=mongodb://localhost:27017\r\nRUN mkdir -p /data/db\r\nRUN chown -R 1000:1000 /data/db\r\n\r\n# final image\r\nFROM local_db_${INCLUDE_DB} as final\r\n\r\n# build arg to determine if the database should be included\r\nARG INCLUDE_DB=false\r\nENV INCLUDE_DB=${INCLUDE_DB}\r\n\r\n# svelte requires APP_BASE at build time so it must be passed as a build arg\r\nARG APP_BASE=\r\n# tailwind requires the primary theme to be known at build time so it must be passed as a build arg\r\nARG PUBLIC_APP_COLOR=blue\r\nENV BODY_SIZE_LIMIT=15728640\r\n\r\n# install dotenv-cli\r\nRUN npm install -g dotenv-cli\r\n\r\n# switch to a user that works for spaces\r\nRUN userdel -r node\r\nRUN useradd -m -u 1000 user\r\nUSER user\r\n\r\nENV HOME=/home/user \\\r\n\tPATH=/home/user/.local/bin:$PATH\r\n\r\nWORKDIR /app\r\n\r\n# add a .env.local if the user doesn't bind a volume to it\r\nRUN touch /app/.env.local\r\n\r\n# get the default config, the entrypoint script and the server script\r\nCOPY --chown=1000 package.json /app/package.json\r\nCOPY --chown=1000 .env /app/.env\r\nCOPY --chown=1000 entrypoint.sh /app/entrypoint.sh\r\nCOPY --chown=1000 gcp-*.json /app/\r\n\r\n#import the build & dependencies\r\nCOPY --from=builder --chown=1000 /app/build /app/build\r\nCOPY --from=builder --chown=1000 /app/node_modules /app/node_modules\r\n\r\nRUN npx playwright install\r\n\r\nUSER root\r\nRUN npx playwright install-deps\r\nUSER user\r\n\r\nRUN chmod +x /app/entrypoint.sh\r\n\r\nCMD [\"/bin/bash\", \"-c\", \"/app/entrypoint.sh\"]\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1342",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2024-07-13T21:06:53Z",
    "updated_at": "2024-07-16T14:53:34Z",
    "comments": 2,
    "user": "slmagus"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8858,
    "title": "how to know variants=fp16 beforehand",
    "body": "### Describe the bug\r\n\r\nIn some diffusion checkponts, some are fp16 and some are not. \r\n\r\n```\r\npipe = DiffusionPipeline.from_pretrained(\r\n'model_id_1', \r\ntorch_dtype=torch.float16, \r\nvariant='fp16'\r\n)\r\n```\r\n\r\n```\r\npipe = DiffusionPipeline.from_pretrained(\r\n'model_id_2',\r\n torch_dtype=torch.float16, \r\n)\r\n```\r\n\r\nHow to know beforehand if the model supports variant='fp16' version? Is it possible to know from the checkpont, maybe with associated config file? This is required in order for consistency of the model loading with various model id.\r\n\r\n### Reproduction\r\n\r\nGiven above.\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\nDiffusers\r\n\r\n### Who can help?\r\n\r\nmaybe @DN6",
    "url": "https://github.com/huggingface/diffusers/issues/8858",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-07-13T08:52:13Z",
    "updated_at": "2025-01-27T01:45:50Z",
    "user": "pure-rgb"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2986,
    "title": "Include code snippets for other libraries?",
    "body": "For example, in https://github.com/huggingface/huggingface.js/pull/797, we add `distilabel`, `fiftyone` and `argilla` to the list of libraries the Hub knows. However, the aim is only to handle the user-defined tags better, not to show code snippets.\r\n\r\nIn this issue, I propose to discuss if we should expand the list of dataset libraries for which we show code snippets. For now, we support pandas, HF datasets, webdatasets, mlcroissant and dask.\r\n\r\nWe already mentioned polars as a potential new lib, I think. Maybe duckdb too?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2986",
    "state": "open",
    "labels": [
      "question",
      "P2"
    ],
    "created_at": "2024-07-12T11:57:43Z",
    "updated_at": "2024-07-12T14:39:59Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/trl",
    "number": 1830,
    "title": "How to use `predict` function in `DPOTrainer`",
    "body": "I want to get the logp and reward of the data through `predict`\uff0c but the prediction seems only include one data.\r\n\r\nWhat is the correct usage of `predict`\uff1f\r\n\r\n![image](https://github.com/user-attachments/assets/81f441c0-b908-4614-be67-ac5542ecb18b)\r\n",
    "url": "https://github.com/huggingface/trl/issues/1830",
    "state": "closed",
    "labels": [
      "\u2753 question"
    ],
    "created_at": "2024-07-12T06:30:20Z",
    "updated_at": "2024-10-07T12:13:22Z",
    "user": "AIR-hl"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 248,
    "title": "solved: how to launch a slurm executor from an interactive slurm job",
    "body": "I forget where I saw it in the docs/code where it said not to launch a slurm executor from an `srun` interactive session - which is not quite always possible.\r\n\r\nThere is a simple workaround - unset `SLURM_*` env vars and then launch and it works just fine.\r\n\r\n```\r\nunset $(printenv | grep SLURM | sed -E 's/(.*)=.*/\\1/' | xargs)\r\n./my_datatrove_slurm.py\r\n```\r\nOf course, your `srun` session will now be w/o its env vars - which you may or may not care for.\r\n\r\nTo help others to find the solution, the error is likely to be:\r\n\r\n```\r\nsrun: error: CPU binding outside of job step allocation, allocated CPUs are: 0x0000000000000FFF80000000000000000000000FFF8000000000.\r\nsrun: error: Task launch for StepId=120986.0 failed on node xxx-yyy-11: Unable to satisfy cpu bind request\r\nsrun: error: Application launch failed: Unable to satisfy cpu bind request\r\nsrun: Job step aborted\r\n```\r\n\r\nThere is also [this discussion](https://groups.google.com/g/slurm-users/c/mp_JRutKmCc) that proposes to unset just `SLURM_CPU_BIND_*` env vars, so you'd then:\r\n\r\n```\r\nunset $(printenv | grep SLURM_CPU_BIND | sed -E 's/(.*)=.*/\\1/' | xargs)\r\n./my_datatrove_slurm.py\r\n```\r\n\r\nIf you want to unset them just for the datatrove launcher use this one-liner syntax\r\n```\r\nSLURM_CPU_BIND= SLURM_CPU_BIND_VERBOSE= SLURM_CPU_BIND_LIST= SLURM_CPU_BIND_TYPE= ./my_datatrove_slurm.py\r\n```\r\nor you could of course unset them inside your script as well, which would make the launching even simpler.\r\n\r\nThat way all `SLURM_*` env vars will remain intact in your shell environment if you need them for something else.\r\n\r\nedit:\r\n\r\nI added:\r\n\r\n```\r\n        import os\r\n        # datatrove fails to start slurm jobs from an interactive slurm job,\r\n        # so hack to pretend we aren't inside an interactive slurm job by removing SLURM env vars\r\n        for key in os.environ.keys():\r\n            if key.startswith(\"SLURM_\"):\r\n                os.environ.pop(key)\r\n```\r\non top of my script to make it always work.\r\n",
    "url": "https://github.com/huggingface/datatrove/issues/248",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-12T04:08:02Z",
    "updated_at": "2024-07-13T01:15:56Z",
    "user": "stas00"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8843,
    "title": "variable (per frame) IP Adapter weights in video",
    "body": "is there a (planned or existing) way to have variable IP Adapter weights for videos (e.g. with AnimateDiff)? \r\nthat means setting different values for different frames, as both scaling and masking currently seem to work with the whole generation at once (be it video or still image).",
    "url": "https://github.com/huggingface/diffusers/issues/8843",
    "state": "open",
    "labels": [
      "stale",
      "low-priority",
      "consider-for-modular-diffusers"
    ],
    "created_at": "2024-07-11T16:49:43Z",
    "updated_at": "2024-12-13T15:05:24Z",
    "comments": 6,
    "user": "eps696"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 846,
    "title": "range error: array buffer allocation failed <- how to catch this error?",
    "body": "### Question\n\nWhile Transformers.js rocks on Desktop, My Pixel with 6Gb of ram almost always crashes the webpage when trying to run things like Whisper or TTS.\r\n\r\n<img width=\"531\" alt=\"Screenshot 2024-07-11 at 14 27 08\" src=\"https://github.com/xenova/transformers.js/assets/805405/f8862561-7618-4c80-87e2-06c86f262698\">\r\n\r\nIs there a way to more gracefully anticipate/handle this?\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/846",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-11T12:32:46Z",
    "updated_at": "2024-07-11T12:32:46Z",
    "user": "flatsiedatsie"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8834,
    "title": "Will the training code of SD3 Controlnet be released?",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nTraining code of SD3 ControlNet\r\n**Describe the solution you'd like.**\r\nCould you please release training code of SD3 controlnet? I tried to train it but failed so I want to check whats the reason\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/8834",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-11T03:32:55Z",
    "updated_at": "2024-09-11T01:34:38Z",
    "comments": 3,
    "user": "ChenhLiwnl"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1953,
    "title": "Export AWQ models to ONNX",
    "body": "### System Info\n\n```shell\npython==3.10\n```\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nNone\n\n### Expected behavior\n\nHello, I am new and want to try converting models to Onnx format and I have the following issue. I have a model that has been quantized to 4-bit, and then I converted this model to Onnx. My quantized model has a weight size of 7GB, but when I run the conversion to Onnx, my resulting model.onnx_data has a size of 34GB. Is there anything wrong here?\r\nBelow is my code: \r\n```\r\nfrom optimum.onnxruntime import ORTModelForCausalLM\r\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\r\ntokenizer = AutoTokenizer.from_pretrained(\"SorawitChok/SeaLLM-7B-v2.5-AWQ\")\r\nort_model = ORTModelForCausalLM.from_pretrained(\r\n    \"SorawitChok/SeaLLM-7B-v2.5-AWQ\",\r\n    # \"/content/SeaLLM-7B-v2.5_4b\",\r\n    use_io_binding=True,\r\n    export=True,\r\n    use_cache=True,\r\n    from_transformers=True,\r\n    # provider=\"CUDAExecutionProvider\",  # Change this to \"CPUExecutionProvider\" using CPU for inference\r\n    provider=\"CPUExecutionProvider\",  # Change this to \"CPUExecutionProvider\" using CPU for inference\r\n)\r\nprint('=====Save Model====')\r\nort_model.save_pretrained(\"./SeaLLM-7B-v2.5-AWQ_onnx\")\r\ntokenizer.save_pretrained(\"./SeaLLM-7B-v2.5-AWQ_onnx\")\r\n```\r\nThanks for any help",
    "url": "https://github.com/huggingface/optimum/issues/1953",
    "state": "closed",
    "labels": [
      "feature-request",
      "onnx"
    ],
    "created_at": "2024-07-11T02:18:56Z",
    "updated_at": "2024-07-25T12:42:38Z",
    "comments": 1,
    "user": "Toan-it-mta"
  },
  {
    "repo": "pytorch/xla",
    "number": 7667,
    "title": "Equivalent of get_worker_info to split an IterableDataset",
    "body": "## \u2753 Questions and Help\r\n\r\nI have an `IterableDataset` of unknown size. I would like to use something like `torch.utils.data.get_worker_info` to split it across the spawned `xmp` processes, but AFAIK there is no equivalent in `xla_multiprocessing`. Is there a workaround? I tried randomly subsampling on each process but this hangs for me for some reason. ",
    "url": "https://github.com/pytorch/xla/issues/7667",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-10T18:46:08Z",
    "updated_at": "2024-08-06T01:17:46Z",
    "comments": 20,
    "user": "davidaknowles"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1951,
    "title": "how can I get a onnx format int4 model\uff1f",
    "body": "### System Info\n\n```shell\nCould you please tell me how I can obtain an int type model in ONNX format? \r\nI\u2019ve used the following code to quantize an ONNX model into QUINT8, but when I tried to quantize it into INT4, I found there were no relevant parameters to choose. As far as I know, GPTQ allows selecting n-bit quantization. Could you advise me on what steps I should take?\r\nThanks for your help!\r\n\r\n\r\nfirst step:\r\noptimum-cli export onnx --model /dataset/zhangy34/ss_qwen2/  onnx_model/ --trust-remote-code --task text-generation\r\n\r\nsecond step:\r\n\r\noptimum-cli onnxruntime quantize \\\r\n  --avx512 \\\r\n  --onnx_model ./qwen2_ori_model \\\r\n  -o ./onnx_model/qwen2_rtn_model\n```\n\n\n### Who can help?\n\n@mi\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nnone\n\n### Expected behavior\n\nget a int4 onnx model",
    "url": "https://github.com/huggingface/optimum/issues/1951",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-07-10T14:00:19Z",
    "updated_at": "2024-07-10T14:00:19Z",
    "comments": 0,
    "user": "zhangyu68"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8824,
    "title": "[Solved] How to make custom datasets for instruct-pix2pix?",
    "body": "### Describe the bug\r\n\r\n```\r\n[rank0]: Traceback (most recent call last):\r\n[rank0]:   File \"/opt/venv/lib/python3.10/site-packages/datasets/builder.py\", line 1750, in _prepare_split_single\r\n[rank0]:     for key, record in generator:\r\n[rank0]:   File \"/opt/venv/lib/python3.10/site-packages/datasets/packaged_modules/folder_based_builder/folder_based_builder.py\", line 315, in _generate_examples\r\n[rank0]:     raise ValueError(\r\n[rank0]: ValueError: image at [image name].jpg doesn't have metadata in [my_metadata_path]metadata.jsonl.\r\n```\r\n\r\n### Reproduction\r\n\r\nI want to make custom datasets for local.\r\n\r\n### dataset\r\n- datasets\r\n    - input_images\r\n        - image.jpg\r\n        - image.jpg\r\n        - ...\r\n    - edited_images\r\n        - edited_image.jpg\r\n        - edited_image.jpg\r\n        - ...\r\n    - metadata.jsonl\r\n\r\n### metadata.jsonl\r\n```\r\n{\"file_name\": \"input_images/image.jpg\", \"edited_images/edited_image\": \"edited_image.jpg\", \"edit_prompt\": \"sample\"}\r\n```\r\n\r\n### train script\r\n```\r\nexport MODEL_NAME=\"runwayml/stable-diffusion-v1-5\"\r\nexport TRAIN_DIR=\"datasets/\"\r\nexport OUTPUT_DIR=\"weights/\"\r\n\r\n\r\naccelerate launch --mixed_precision=\"fp16\" --multi_gpu train_instruct_pix2pix.py \\\r\n --pretrained_model_name_or_path=$MODEL_NAME \\\r\n --train_data_dir=$TRAIN_DIR \\\r\n --use_ema \\\r\n --resolution=512 --random_flip \\\r\n --train_batch_size=2 --gradient_accumulation_steps=4 --gradient_checkpointing \\\r\n --max_train_steps=15000 \\\r\n --checkpointing_steps=5000 --checkpoints_total_limit=1 \\\r\n --learning_rate=5e-05 --lr_warmup_steps=0 \\\r\n --conditioning_dropout_prob=0.05 \\\r\n --mixed_precision=fp16 \\\r\n --seed=42 \\\r\n --output_dir=${OUTPUT_DIR}\r\n```\r\n\r\n### error log\r\n\r\n```\r\n[rank0]: Traceback (most recent call last):\r\n[rank0]:   File \"/opt/venv/lib/python3.10/site-packages/datasets/builder.py\", line 1750, in _prepare_split_single\r\n[rank0]:     for key, record in generator:\r\n[rank0]:   File \"/opt/venv/lib/python3.10/site-packages/datasets/packaged_modules/folder_based_builder/folder_based_builder.py\", line 315, in _generate_examples\r\n[rank0]:     raise ValueError(\r\n[rank0]: ValueError: image at [image name].jpg doesn't have metadata in [my_metadata_path]metadata.jsonl.\r\n```\r\n\r\nhow to make custom datasets for local?\r\nI didn't find any solution.\r\n\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\ndiffusers                 0.30.0.dev0\r\n\r\n### Who can help?\r\n\r\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/8824",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-07-10T05:35:38Z",
    "updated_at": "2024-07-11T02:18:40Z",
    "user": "jeonga0303"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1949,
    "title": "ValueError: Trying to export a florence2 model",
    "body": "Hello,\r\n\r\nI am attempting to export and quantize the Florence-2 model for CPU usage but encountered the following error:\r\n\r\n```\r\nValueError: Trying to export a florence2 model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type florence2 to be supported natively in the ONNX export.\r\ni am trying to quntize florence 2 model for cpu but its show this error \r\n```\r\nBased on the error message, it seems that the Florence-2 model is not natively supported for ONNX export, and a custom configuration is required.\r\n\r\nCould you please provide guidance or support for exporting and quantizing the Florence-2 model using a custom ONNX configuration? It would be highly beneficial for my project to have native support for this model type, or at least detailed instructions on how to proceed with the custom export.",
    "url": "https://github.com/huggingface/optimum/issues/1949",
    "state": "open",
    "labels": [
      "feature-request",
      "onnx"
    ],
    "created_at": "2024-07-10T04:59:06Z",
    "updated_at": "2024-10-23T10:07:05Z",
    "comments": 1,
    "user": "ghost"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 842,
    "title": "Trying to run the Modnet example with nodejs on macOS result in Unknown model class \"modnet\", attempting to construct from base class. Model type for 'modnet' not found, assuming encoder-only architecture.",
    "body": "### Question\n\nHello,\r\n\r\nHow one can run the modnet example ?\r\n\r\n```\r\nimport { AutoModel, AutoProcessor, RawImage } from '@xenova/transformers';\r\n\r\n// Load model and processor\r\nconst model = await AutoModel.from_pretrained('Xenova/modnet', { quantized: false });\r\nconst processor = await AutoProcessor.from_pretrained('Xenova/modnet');\r\n\r\n// Load image from URL\r\nconst url = 'https://images.pexels.com/photos/5965592/pexels-photo-5965592.jpeg?auto=compress&cs=tinysrgb&w=1024';\r\nconst image = await RawImage.fromURL(url);\r\n\r\n// Pre-process image\r\nconst { pixel_values } = await processor(image);\r\n\r\n// Predict alpha matte\r\nconst { output } = await model({ input: pixel_values });\r\n\r\n// Save output mask\r\nconst mask = await RawImage.fromTensor(output[0].mul(255).to('uint8')).resize(image.width, image.height);\r\nmask.save('mask.png');\r\n\r\n```\r\n\r\nThanks for the amazing work !",
    "url": "https://github.com/huggingface/transformers.js/issues/842",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-09T16:19:22Z",
    "updated_at": "2025-03-27T18:58:03Z",
    "user": "gabrielstuff"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1335,
    "title": "[v0.9.1] Switch the LLM model mid-conversation?",
    "body": "## Description\r\n\r\nCurrently, **chat-ui** does not support changing the language model once a conversation has started. For example, if I begin a chat with _Llama 3_, I cannot switch to _Gemini 1.5_ mid-conversation, even if I change the setting in the UI.\r\n\r\n## Steps to Reproduce\r\n\r\n* Start a conversation with one language model (e.g., _Llama 3_).\r\n* Go to settings and change the model to a different one (e.g., _Gemini 1.5_).\r\n* Observe that the model used in the conversation does not change.\r\n\r\n## Expected Behavior\r\n\r\nThe language model should switch to the newly selected model, even mid-conversation.\r\n\r\n## Additional Questions\r\n\r\n* Is this a known limitation or a potential bug?\r\n* If this is intended behavior, are there any plans to implement model-switching in the future?\r\n* If not, could you provide guidance or resources on how to achieve this functionality? I can start implementing and raise a PR! \r\n\r\n## Environment\r\n\r\n* **OS**: macOS Sonoma\r\n* **Browser**: Chrome, Safari, Arc\r\n* **chat-ui** version: v0.9.1\r\n\r\ncc: @nsarrazin ",
    "url": "https://github.com/huggingface/chat-ui/issues/1335",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-09T13:43:16Z",
    "updated_at": "2024-09-13T16:45:23Z",
    "comments": 3,
    "user": "adhishthite"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 841,
    "title": "Support opus-mt-mul-en translation in WebGPU",
    "body": "### Question\n\nI've been having some trouble where translation sometimes wasn't working. For example, I just tried translating Polish into English using `opus-mt-mul-en`. But if outputs empty strings.\r\n\r\nSo I started looking for what could be wrong, and in the Transformers.js source code I found this `marian.py` file:\r\nhttps://github.com/xenova/transformers.js/blob/7f5081da29c3f77ee830269ab801344776e61bcb/scripts/extra/marian.py#L18\r\n\r\nIt lists the supported Opus MT models, and while the model is available on Huggingface (https://huggingface.co/Xenova/opus-mt-mul-en), I'm guessing it isn't actually supported (yet)?\r\n\r\nDo I understand correctly?\r\n\r\nRelated: is there a setting with the `mul` models that I need to set to select which language is translated into?\r\n\r\n\r\nFor completeness, here's some of my code:\r\n\r\nConstructing the model:\r\n```\r\nconst hf_model_url = 'Xenova/opus-mt-mul-en';\r\n \r\npipeline('translation', hf_model_url, {\r\n\tprogress_callback: progressCallback,\r\n\tdtype: dtype_settings,\r\n\tdevice: self.device\r\n\t},\r\n\t\t\t    \t\t\t\r\n)\r\n.then((pipe) => {\r\netc\r\n```\r\n\r\nAnd getting a translation out:\r\n```\r\n.pipe(sentence)\r\n.then((translation) => {\r\netc\r\n```\r\n.. which already begs the question: as `oput-mt-en-mul` _is_ supported according to that file,  ...then how would that multi-model know what language to output to?\r\n\r\n\r\nI'll continue searching to see if I can answer my own question :-)\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/841",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-09T11:52:12Z",
    "updated_at": "2024-10-07T15:34:54Z",
    "user": "flatsiedatsie"
  },
  {
    "repo": "huggingface/parler-tts",
    "number": 83,
    "title": "How big a dataset is needed to train the model?",
    "body": "I used 560+ hours of libritts_R data to train the model (187M) from scratch, but the audio synthesized by the model is not correct.\r\n\r\nIs this because the size od the dataset is not enough?",
    "url": "https://github.com/huggingface/parler-tts/issues/83",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-09T03:56:42Z",
    "updated_at": "2024-09-21T10:46:39Z",
    "user": "zyy-fc"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 242,
    "title": "how to postpone filter init till it's running",
    "body": "So it appears that currently I can't instantiate a model on a gpu because the filter object is created by the launcher, which either doesn't have a gpu, or it is most likely the wrong gpu even if it has one, since we would need a dedicated gpu(s) for each task.\r\n\r\nIs it possible to add a 2nd init which would be the user init that will run on the actual job?\r\n\r\nThe filter task is simple - instantiate a model on a gpu and then run filter using it - of course we don't want model to be re-instantiated on every filter call.\r\n\r\nNeeding to `import torch` inside the `filter` is super-weird as well, but I get that it's due to pickle - but perhaps we can have two inits - one of the framework - and then another of the user.\r\n\r\nSo when a job is launched the first thing the framework runs is user defined `init` if any, and then proceeds normally.\r\n\r\nI guess I will try to overcome this meanwhile using `@functools.cache` or something similar.\r\n\r\nThank you!\r\n\r\ntag: @guipenedo",
    "url": "https://github.com/huggingface/datatrove/issues/242",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-09T01:11:13Z",
    "updated_at": "2024-07-10T01:36:02Z",
    "user": "stas00"
  },
  {
    "repo": "huggingface/hub-docs",
    "number": 1328,
    "title": "Document how to filter and save searches on the hub (e.g. by model format, only LoRAs, by date range etc...)",
    "body": "**Doc request**\r\n\r\nI'd really like to see documentation that clarifies how users can filter searches and when browsing models on the Hub.\r\n\r\nThings I can't seem to find that I would expect / would make our lives better:\r\n\r\n- A selection list or drop down to filter by popular model formats (GGUF, EXL2 etc...)\r\n- A filter or 'explore by category' for original models, fine-tunes, quantisations, adapters etc...\r\n- Filter by date created within (e.g. the last 2 months)\r\n- How to save the filter/search so you can bookmark, share and come back to it later\r\n\r\n**Additional context**\r\n\r\n- Discussion about this on r/LocalLLaMA recently - https://www.reddit.com/r/LocalLLaMA/comments/1dyjh6m/comment/lc9dhjp/\r\n\r\nIf there actually isn't a way to do this on the hub a present, I would really love it if something like my shitty mock here could be considered:\r\n\r\n![hfsearch](https://github.com/huggingface/hub-docs/assets/862951/bb4a330d-1484-4421-83d4-be75e3e1eb12)\r\n",
    "url": "https://github.com/huggingface/hub-docs/issues/1328",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-08T22:51:55Z",
    "updated_at": "2024-07-10T19:17:42Z",
    "user": "sammcj"
  },
  {
    "repo": "huggingface/candle",
    "number": 2323,
    "title": "How to do freeze VarMap Vars?",
    "body": "              Hello everybody,\r\n\r\nIs there away to freeze all Var Tensors in the VarMap like the below snippet ?\r\nmeans something like implement the `Iterator` trait and detach the contained tensors from the graph and add a Var which can be trained !!!\r\n\r\n```\r\n# Freeze all the pre-trained layers\r\nfor param in model.parameters():\r\n    param.requires_grad = False\r\n\r\n```\r\n\r\n_Originally posted by @mohamed-180 in https://github.com/huggingface/candle/issues/891#issuecomment-2214407719_\r\n            ",
    "url": "https://github.com/huggingface/candle/issues/2323",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-08T15:14:54Z",
    "updated_at": "2024-07-08T15:14:54Z",
    "user": "mohamed-180"
  },
  {
    "repo": "huggingface/trl",
    "number": 1815,
    "title": "How to use DoRA with ORPO",
    "body": "Hi! I'm running experiments where I'm comparing SFT to ORPO.\r\n\r\nFor SFT I currently initialize a `trl.SFTTrainer`, and pass `args=transformers.TrainingArguments(..., use_dora=True, ...)`.\r\n\r\nFor ORPO I'm supposed to pass `args=trl.ORPOConfig`, but according to the documentation this doesn't seem to support passing `use_dora` as an argument. \r\n\r\nWhat's the best way to combine DoRA with ORPO? In theory this should of course be possible to combine. Can I just pass `transformers.TrainingArguments` to `trl.ORPOTrainer` or would this (silently) break things?",
    "url": "https://github.com/huggingface/trl/issues/1815",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-08T11:12:48Z",
    "updated_at": "2024-07-08T15:39:42Z",
    "user": "julianstastny"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 130238,
    "title": "how to simplify torch.fx like using onnxsim?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nlack of the corresponding tools to simplify the exported FX model and count the flops, memory, etc.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/130238",
    "state": "open",
    "labels": [
      "triaged"
    ],
    "created_at": "2024-07-08T08:30:28Z",
    "updated_at": "2024-08-16T13:40:42Z",
    "user": "MaltoseFlower"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 2200,
    "title": "How to clean the TGI guidance cache?",
    "body": "I use TGI guidance to enforce LLM choose a tool.\r\nHowever, when I change the description of the tool, I find TGI does not re-compile the new grammar.\r\nTherefore, I want to know how to clean the compiled grammar.",
    "url": "https://github.com/huggingface/text-generation-inference/issues/2200",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-08T05:37:55Z",
    "updated_at": "2024-07-18T15:01:07Z",
    "user": "EdisonE3"
  },
  {
    "repo": "pytorch/data",
    "number": 1283,
    "title": "best practice for `snapshot_every_n_steps`",
    "body": "Hello,\r\n\r\nThank you for your awesome implementation of StatefulDataloader.\r\n\r\nI have a question about `snapshot_every_n_steps`. It seems there is not much detailed explanation about this argument.\r\n\r\n* Will frequent snapshots (i.e., `snapshot_every_n_steps=1`) cause a data loading burden?\r\n* What is the best practice for setting this value? Is it related to checkpointing frequency?\r\n\r\ncc @andrewkho ",
    "url": "https://github.com/meta-pytorch/data/issues/1283",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-07-07T03:56:03Z",
    "updated_at": "2024-11-17T19:41:33Z",
    "comments": 5,
    "user": "ShoufaChen"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 837,
    "title": "Model downloads or running on server?",
    "body": "### Question\n\nHey there,\r\nI am using simple hosting with cPanel view as the admin. If I upload the ONNX model files to the file manager as well as the JS script to run the model, will it still need to download the model or will it not, since the file is uploaded there, along with the script. Provided of course that I disable automatic huggingface loading and add the directory to the models in the file manager through .env.\r\nYour help will be highly appreciated.\r\nCheers.",
    "url": "https://github.com/huggingface/transformers.js/issues/837",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-06T23:07:15Z",
    "updated_at": "2025-01-20T19:50:12Z",
    "user": "moses-mbaga"
  },
  {
    "repo": "pytorch/vision",
    "number": 8515,
    "title": "How to write your own v2 transforms example does not work",
    "body": "### \ud83d\udc1b Describe the bug\n\nI copy pasted the custom transform from your [tutorial page](https://pytorch.org/vision/stable/auto_examples/transforms/plot_custom_transforms.html#:~:text=How%20to%20write%20your%20own%20v2%20transforms%20Note,from%20torchvision%20import%20tv_tensors%20from%20torchvision.transforms%20import%20v2) and inserted it into the transform pipeline in your reference/detection/presets.py script. When trying to run, I get the following error.\r\n\r\n\r\nFile \"site-packages/torchvision/transforms/v2/_container.py\", line 51, in forward\r\n    outputs = transform(*inputs)\r\n              ^^^^^^^^^^^^^^^^^^\r\n  File \"site-packages/torch/nn/modules/module.py\", line 1532, in _wrapped_call_impl\r\n    return self._call_impl(*args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"site-packages/torch/nn/modules/module.py\", line 1538, in _call_impl\r\n    if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks\r\n            ^^^^^^^^^^^^^^^^^^^^\r\n  File \"site-packages/torch/nn/modules/module.py\", line 1709, in __getattr__\r\n    raise AttributeError(f\"'{type(self).__name__}' object has no attribute '{name}'\")\r\nAttributeError: 'MyCustomTransform' object has no attribute '_backward_hooks'\n\n### Versions\n\nCollecting environment information...\r\nPyTorch version: 2.3.1+cu121\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 20.04.6 LTS (x86_64)\r\nGCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0\r\nClang version: Could not collect\r\nCMake version: version 3.26.3\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:12:24) [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-5.15.0-113-generic-x86_64-with-glibc2.31\r\nIs CUDA available: True\r\nCUDA runtime version: 11.8.89\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration:\r\nGPU 0: NVIDIA A100-PCIE-40GB\r\nGPU 1: NVIDIA A100-PCIE-40GB\r\n\r\nNvidia driver version: 550.90.07\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.1.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.1.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.1.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.1.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.1.0\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn.so.8.5.0\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8.5.0\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_adv_train.so.8.5.0\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8.5.0\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8.5.0\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8.5.0\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_ops_train.so.8.5.0\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                       x86_64\r\nCPU op-mode(s):                     32-bit, 64-bit\r\nByte Order:                         Little Endian\r\nAddress sizes:                      43 bits physical, 48 bits virtual\r\nCPU(s):                             128\r\nOn-line CPU(s) list:                0-127\r\nThread(s) per core:                 2\r\nCore(s) per socket:                 64\r\nSocket(s):                          1\r\nNUMA node(s):                       1\r\nVendor ID:                          AuthenticAMD\r\nCPU family:                         23\r\nModel:                              49\r\nModel name:                         AMD EPYC 7702P 64-Core Processor\r\nStepping:                           0\r\nFrequency boost:                    enabled\r\nCPU MHz:                            1540.122\r\nCPU max MHz:                        2183,5930\r\nCPU min MHz:                        1500,0000\r\nBogoMIPS:                           3992.22\r\nVirtualization:                     AMD-V\r\nL1d cache:                          2 MiB\r\nL1i cache:                          2 MiB\r\nL2 cache:                           32 MiB\r\nL3 cache:                           256 MiB\r\nNUMA node0 CPU(s):                  0-127\r\nVulnerability Gather data sampling: Not affected\r\nVulnerability Itlb multihit:        Not affected\r\nVulnerability L1tf:                 Not affected\r\nVulnerability Mds:                  Not affected\r\nVulnerability Meltdown:             Not affected\r\nVulnerability Mmio stale data:      Not affected\r\nVulnerability Retbleed:             Mitigation; untrained return thunk; SMT enabled with STIBP protection\r\nVulnerability Spec rstack overflow: Mitigation; safe RET\r\nVulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl and seccomp\r\nVulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization\r\nVulnerability Spectre v2:           Mitigation; Retpolines; IBPB conditional; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected\r\nVulnerability Srbds:                Not affected\r\nVulner",
    "url": "https://github.com/pytorch/vision/issues/8515",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-06T23:04:22Z",
    "updated_at": "2024-07-10T21:59:25Z",
    "user": "TonyCongqianWang"
  },
  {
    "repo": "pytorch/xla",
    "number": 7635,
    "title": "Inconsistency between xla/examples/train_resnet_base.py and docs",
    "body": "## \ud83d\udcda Documentation\r\n\r\nThis isn't necessarily an issue with the documentation, but an inconsistency between the documentation and the simplest [Pytorch XLA example](https://github.com/pytorch/xla/blob/master/examples/train_resnet_base.py). The [docs](https://pytorch.org/xla/release/2.3/index.html) say that the one key change to a standard training loop (for single device use) is adding `xm.mark_step()`, but `train_resnet_base.py` doesn't have (and just has `xm.wait_device_ops()` after all all epochs are complete). \r\n\r\nMy understanding is that `xm.mark_step()` isn't necessary if we're not directly accessing any state on the TPU, which is why `train_resnet_base.py` doesn't use it and works around it via `xm.add_step_closure`. I assume the latter is actually preferred, but either way it would be helpful for folks getting started if there wasn't a confusing inconsistency like this for the simplest setting. \r\n\r\n@JackCaoG I think this is your wheelhouse? Thanks for any clarification. \r\n",
    "url": "https://github.com/pytorch/xla/issues/7635",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-06T19:52:50Z",
    "updated_at": "2025-04-03T14:51:15Z",
    "user": "davidaknowles"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 130137,
    "title": "How to get stream operators in custom backend compiler ?",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi, when I use a custom backend, I find that the fx graph that custom compiler gets does not have the stream related operations.\r\n\r\nThen I found that the fx graph dropped those stream operations after aot_module_simplified.\r\nSo, I want to know how can we get a fx graph that contains stream-related operations, when using  custom compiler and aot_module_simplified? \r\n\r\n\r\ncc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @chauhang @penguinwu @ezyang @anijain2305 @zou3519 @ptrblck @msaroufim @yf225\r\n\r\n\r\nHere is my test script. \r\nWhen I use aot_toy_backend backend, no stream related ops in gx graph.\r\nWhat can we do to fix this\uff1f Can you give me some guidance or advice on this issue.\r\n\r\n\r\n```\r\nimport torch\r\nimport torch.nn as nn\r\nclass Layer(nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n    def forward(self, x):\r\n        stream2 = torch.cuda.Stream()\r\n        with torch.cuda.stream(stream2):\r\n            z = x + 1\r\n        y = x - 1\r\n        return y + z\r\n\r\nmm = Layer()\r\nx=torch.randn([4]).cuda()\r\n\r\nfrom torch._functorch.aot_autograd import aot_module_simplified\r\ndef toy_backend(gm, sample_inputs):\r\n    return gm\r\ndef aot_toy_backend(gm, sample_inputs):\r\n    return aot_module_simplified(gm, sample_inputs, fw_compiler=toy_backend)\r\n\r\nmmc = torch.compile(mm, backend=aot_toy_backend)\r\nyc= mmc(x)\r\n```\r\n\n\n### Versions\n\npytorch 2.3.0",
    "url": "https://github.com/pytorch/pytorch/issues/130137",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "triaged",
      "oncall: pt2"
    ],
    "created_at": "2024-07-05T03:41:24Z",
    "updated_at": "2024-11-27T05:20:33Z",
    "user": "wbigat"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 305,
    "title": "how to eval the policy trained by lerobot in real env?",
    "body": "### System Info\r\n\r\n```Shell\r\nhow to eval the policy trained by lerobot in real env?\r\n```\r\n\r\n\r\n### Information\r\n\r\n- [ ] One of the scripts in the examples/ folder of LeRobot\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nin the code, i have not found any solution to transfer policy rollout to real env, please help me figure it out\r\n\r\n### Expected behavior\r\n\r\nhow to infer the policy trained by lerobot in real env?",
    "url": "https://github.com/huggingface/lerobot/issues/305",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-05T03:23:01Z",
    "updated_at": "2024-07-23T09:08:27Z",
    "user": "cong1024"
  },
  {
    "repo": "pytorch/xla",
    "number": 7634,
    "title": "Failed to install xla gpu",
    "body": "## \u2753 Questions and Help\r\npip install torch_xla-2.2.0-cp310-cp310-manylinux_2_28_x86_64.whl\r\nBut got the error:\r\nERROR: torch_xla-2.2.0-cp310-cp310-manylinux_2_28_x86_64.whl is not a supported wheel on this platform.\r\n\r\nHow can i install torch_xla on GPU ?",
    "url": "https://github.com/pytorch/xla/issues/7634",
    "state": "closed",
    "labels": [
      "xla:gpu"
    ],
    "created_at": "2024-07-05T02:37:12Z",
    "updated_at": "2024-08-05T21:40:28Z",
    "comments": 1,
    "user": "Beakboomboom"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 836,
    "title": "How do I free up memory after transliteration",
    "body": "### Question\n\nAfter I executed the translation in the worker, it seems that the memory could not be reclaimed when I called pipely. dispose(), and the memory would be reclaimed only when the woker was closed. Can you help me with this question?",
    "url": "https://github.com/huggingface/transformers.js/issues/836",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-04T15:16:33Z",
    "updated_at": "2024-07-05T07:19:31Z",
    "user": "raodaqi"
  },
  {
    "repo": "huggingface/transformers",
    "number": 31790,
    "title": "How to implement bind_tools to custom LLM from huggingface pipeline(Llama-3) for a custom agent",
    "body": "\r\n\r\nExample Code\r\n```\r\n\r\nname = \"meta-llama/Meta-Llama-3-8B-Instruct\"\r\n\r\nauth_token = \"\"\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(name,use_auth_token=auth_token)\r\n\r\nbnb_config = BitsAndBytesConfig(\r\n    load_in_8bit=True,\r\n)\r\n\r\nmodel_config = AutoConfig.from_pretrained(\r\n    name,\r\n    use_auth_token=auth_token,\r\n    tempreature=0.1,\r\n)\r\n\r\nmodel = AutoModelForCausalLM.from_pretrained(\r\n    name,\r\n    trust_remote_code=True,\r\n    config=model_config,\r\n    quantization_config=bnb_config,\r\n    device_map='auto',\r\n    use_auth_token=auth_token,\r\n)\r\n\r\nstreamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)\r\n\r\npipe = pipeline(\"text-generation\", model=model, tokenizer=tokenizer, max_new_tokens=4096, device_map=\"auto\", streamer = streamer)\r\nllm = HuggingFacePipeline(pipeline=pipe)\r\n\r\n@tool\r\ndef some_custom_tool(input_string: str) -> str:\r\n    \"\"\"Executes some work and returns a success message if successfull else it return the error message\"\"\"\r\n    return \"SUCCESS\"\r\n\r\n\r\ntools = [some_custom_tool]\r\nprompt = ChatPromptTemplate.from_messages(\r\n    [\r\n        (\r\n            \"system\",\r\n            f\"\"\"\r\n                You are an Assistant......\r\n            \"\"\",\r\n        ),\r\n        (\"user\", \"{input}\"),\r\n        MessagesPlaceholder(variable_name=\"agent_scratchpad\"),\r\n    ]\r\n)\r\n            \r\nllm_with_tools = llm.bind_tools(tools)\r\n\r\n            \r\n\r\nagent = (\r\n    {\r\n        \"input\": lambda x: x[\"input\"],\r\n        \"agent_scratchpad\": lambda x: format_to_openai_tool_messages(\r\n            x[\"intermediate_steps\"]\r\n        ),\r\n    }\r\n    | prompt\r\n    | llm\r\n    | JsonOutputParser()\r\n)\r\n            \r\n\r\nagent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True, return_intermediate_steps= True)\r\n```\r\n\r\nDescription\r\n\r\nI am trying to bind a custom tool with the LLM just like ChatOpenAI but i am getting the following error. It looks like the bind_tools does exist in HuggingFacePipeline. Is there a way to bind a custom tool to an LLM from HuggingFacePipeline?\r\n\r\nAttributeError: 'HuggingFacePipeline' object has no attribute 'bind_tools'\r\n\r\nSystem Info:\r\n```\r\n\r\nlangchain==0.2.6\r\nlangchain-community==0.2.6\r\nlangchain-core==0.2.11\r\nlangchain-openai==0.1.14\r\nlangchain-text-splitters==0.2.2\r\nPython 3.10.13\r\n\r\n```\r\nI am doing this on Kaggle GPU t4x2\r\n",
    "url": "https://github.com/huggingface/transformers/issues/31790",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-04T08:59:38Z",
    "updated_at": "2024-08-13T08:04:24Z",
    "user": "talhaty"
  },
  {
    "repo": "pytorch/xla",
    "number": 7633,
    "title": "Multiprocess inference warning: ignoring nprocs",
    "body": "## \u2753 Questions and Help\r\nWhen I made multiprocess inference of huggingface transformers frame, I used xmp.spawn(perform_inference, args=(args,), nprocs=4), and I wanted to run 4 scripts once. However, it reported a warning that WARNING:root:Unsupported nprocs (4), ignoring... I wonder if it is a bug or it has any mistake in my infer script.\r\n\r\nMy infer script is as following:\r\n\r\n    device = xm.xla_device()\r\n    print(f\"tpu name: {device}\")\r\n\r\n    sentences = [\"Sample-1\", \"Sample-2\"] * args.batch_size\r\n    print(f\"sentences length: {len(sentences)}\")\r\n\r\n    tokenizer = AutoTokenizer.from_pretrained(args.model_name_or_path)\r\n    model = AutoModel.from_pretrained(args.model_name_or_path).to(device)\r\n    model.eval()\r\n\r\n    for i in range(20):\r\n        if i == 19:\r\n            print(f\"log port: {port}\")\r\n            xp.trace_detached(f'localhost:{port}', './profiles/', duration_ms=2000)\r\n        with xp.StepTrace('bge_test'):\r\n            with xp.Trace('build_graph'):\r\n                encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt').to(device)\r\n                with torch.no_grad():\r\n                    start = time.perf_counter()\r\n                    model_output = model(**encoded_input)\r\n                    end = time.perf_counter()\r\n                    sentence_embeddings = model_output[0][:, 0]\r\n                    print(\"inference time:\", (end - start))\r\n\r\n    sentence_embeddings = F.normalize(sentence_embeddings, p=2, dim=1)\r\n    print(\"Sentence embeddings: \", sentence_embeddings)\r\n\r\nif __name__ == \"__main__\":\r\n    torch.set_default_dtype(torch.float32)\r\n    args = get_args()\r\n\r\n    xmp.spawn(perform_inference, args=(args,), nprocs=4)\r\n\r\n# detail log\r\nWARNING:root:Unsupported nprocs (4), ignoring...\r\nWARNING: All log messages before absl::InitializeLog() is called are written to STDERR\r\nI0000 00:00:1720080892.528224 2908632 pjrt_api.cc:100] GetPjrtApi was found for tpu at /home/liqing002/.local/lib/python3.10/site-packages/libtpu/libtpu.so\r\nI0000 00:00:1720080892.528293 2908632 pjrt_api.cc:79] PJRT_Api is set for device type tpu\r\nI0000 00:00:1720080892.528300 2908632 pjrt_api.cc:146] The PJRT plugin has PJRT API version 0.46. The framework PJRT API version is 0.46.\r\nWARNING: All log messages before absl::InitializeLog() is called are written to STDERR\r\nI0000 00:00:1720080892.544289 2908627 pjrt_api.cc:100] GetPjrtApi was found for tpu at /home/liqing002/.local/lib/python3.10/site-packages/libtpu/libtpu.so\r\nI0000 00:00:1720080892.544426 2908627 pjrt_api.cc:79] PJRT_Api is set for device type tpu\r\nI0000 00:00:1720080892.544434 2908627 pjrt_api.cc:146] The PJRT plugin has PJRT API version 0.46. The framework PJRT API version is 0.46.\r\nWARNING: All log messages before absl::InitializeLog() is called are written to STDERR\r\nI0000 00:00:1720080892.728254 2908631 pjrt_api.cc:100] GetPjrtApi was found for tpu at /home/liqing002/.local/lib/python3.10/site-packages/libtpu/libtpu.so\r\nI0000 00:00:1720080892.728326 2908631 pjrt_api.cc:79] PJRT_Api is set for device type tpu\r\nI0000 00:00:1720080892.728332 2908631 pjrt_api.cc:146] The PJRT plugin has PJRT API version 0.46. The framework PJRT API version is 0.46.\r\nWARNING: All log messages before absl::InitializeLog() is called are written to STDERR\r\nI0000 00:00:1720080892.916441 2908634 pjrt_api.cc:100] GetPjrtApi was found for tpu at /home/liqing002/.local/lib/python3.10/site-packages/libtpu/libtpu.so\r\nI0000 00:00:1720080892.916616 2908634 pjrt_api.cc:79] PJRT_Api is set for device type tpu\r\nI0000 00:00:1720080892.916625 2908634 pjrt_api.cc:146] The PJRT plugin has PJRT API version 0.46. The framework PJRT API version is 0.46.\r\nWARNING: All log messages before absl::InitializeLog() is called are written to STDERR\r\nI0000 00:00:1720080893.409535 2908636 pjrt_api.cc:100] GetPjrtApi was found for tpu at /home/liqing002/.local/lib/python3.10/site-packages/libtpu/libtpu.so\r\nI0000 00:00:1720080893.409646 2908636 pjrt_api.cc:79] PJRT_Api is set for device type tpu\r\nI0000 00:00:1720080893.409654 2908636 pjrt_api.cc:146] The PJRT plugin has PJRT API version 0.46. The framework PJRT API version is 0.46.\r\nWARNING: All log messages before absl::InitializeLog() is called are written to STDERR\r\nI0000 00:00:1720080893.658751 2908630 pjrt_api.cc:100] GetPjrtApi was found for tpu at /home/liqing002/.local/lib/python3.10/site-packages/libtpu/libtpu.so\r\nI0000 00:00:1720080893.658883 2908630 pjrt_api.cc:79] PJRT_Api is set for device type tpu\r\nI0000 00:00:1720080893.658891 2908630 pjrt_api.cc:146] The PJRT plugin has PJRT API version 0.46. The framework PJRT API version is 0.46.\r\nWARNING: All log messages before absl::InitializeLog() is called are written to STDERR\r\nI0000 00:00:1720080893.659256 2908635 pjrt_api.cc:100] GetPjrtApi was found for tpu at /home/liqing002/.local/lib/python3.10/site-packages/libtpu/libtpu.so\r\nWARNING: All log messages before absl::InitializeLog() is called are written to STDERR\r\nI0000 00:00:1720080893.659285 2908633 pjrt_ap",
    "url": "https://github.com/pytorch/xla/issues/7633",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2024-07-04T08:28:47Z",
    "updated_at": "2025-04-03T14:52:10Z",
    "user": "SileonQuinn"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8788,
    "title": "VAE Tiling not supported with SD3 for non power of 2 images?",
    "body": "### Describe the bug\n\nVAE tiling works for SD3 with power of 2 images, but for no other alignments.\r\n\r\nThe mentioned issues with VAE tiling are due to: [vae/config.json](https://huggingface.co/stabilityai/stable-diffusion-3-medium-diffusers/blob/main/vae/config.json)\r\n\r\nHaving: \r\n\r\n```\r\n\"use_post_quant_conv\": false,\r\n\"use_quant_conv\": false\r\n```\r\n\r\nWhich causes the method used here:\r\n\r\nhttps://github.com/huggingface/diffusers/blob/589931ca791deb8f896ee291ee481070755faa26/src/diffusers/models/autoencoders/autoencoder_kl.py#L363\r\n\r\nAnd Here:\r\n\r\nhttps://github.com/huggingface/diffusers/blob/589931ca791deb8f896ee291ee481070755faa26/src/diffusers/models/autoencoders/autoencoder_kl.py#L412\r\n\r\nTo be `None`\r\n\r\nPerhaps at the moment, the model is simply not entirely compatible with the tiling in ``AutoEncoderKL``, as the state dict does not possess the keys `post_quant_conv.bias, quant_conv.weight, post_quant_conv.weight, quant_conv.bias`\r\n\r\nIs this intended?\n\n### Reproduction\n\n```python\r\nimport diffusers\r\nimport PIL.Image\r\nimport os\r\n\r\nos.environ['HF_TOKEN'] = 'your token'\r\n\r\ncn = diffusers.SD3ControlNetModel.from_pretrained('InstantX/SD3-Controlnet-Canny')\r\n\r\npipe = diffusers.StableDiffusion3ControlNetPipeline.from_pretrained(\r\n    'stabilityai/stable-diffusion-3-medium-diffusers',\r\n    controlnet=cn)\r\n\r\npipe.enable_sequential_cpu_offload()\r\n\r\npipe.vae.enable_tiling()\r\n\r\nwidth = 1376\r\nheight = 920\r\n\r\n# aligned by 16, but alignment by 64 also fails\r\noutput_size = (width-(width % 16), height-(height % 16))\r\n\r\nnot_pow_2 = PIL.Image.new('RGB', output_size)\r\n\r\nargs = {\r\n    'guidance_scale': 8.0,\r\n    'num_inference_steps': 30,\r\n    'width': output_size[0],\r\n    'height': output_size[1],\r\n    'control_image': not_pow_2,\r\n    'prompt': 'test prompt'\r\n}\r\n\r\npipe(**args)\r\n```\n\n### Logs\n\n```shell\nREDACT\\venv\\Lib\\site-packages\\diffusers\\models\\attention_processor.py:1584: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at ..\\aten\\src\\ATen\\native\\transformers\\cuda\\sdp_utils.cpp:455.)\r\n  hidden_states = F.scaled_dot_product_attention(\r\nTraceback (most recent call last):\r\n  File \"REDACT\\test.py\", line 35, in <module>\r\n    pipe(**args)\r\n  File \"REDACT\\venv\\Lib\\site-packages\\torch\\utils\\_contextlib.py\", line 115, in decorate_context\r\n    return func(*args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^^^\r\n  File \"REDACT\\venv\\Lib\\site-packages\\diffusers\\pipelines\\controlnet_sd3\\pipeline_stable_diffusion_3_controlnet.py\", line 912, in __call__\r\n    control_image = self.vae.encode(control_image).latent_dist.sample()\r\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"REDACT\\venv\\Lib\\site-packages\\diffusers\\utils\\accelerate_utils.py\", line 46, in wrapper\r\n    return method(self, *args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"REDACT\\venv\\Lib\\site-packages\\diffusers\\models\\autoencoders\\autoencoder_kl.py\", line 258, in encode\r\n    return self.tiled_encode(x, return_dict=return_dict)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"REDACT\\venv\\Lib\\site-packages\\diffusers\\models\\autoencoders\\autoencoder_kl.py\", line 363, in tiled_encode\r\n    tile = self.quant_conv(tile)\r\n           ^^^^^^^^^^^^^^^^^^^^^\r\nTypeError: 'NoneType' object is not callable\n```\n\n\n### System Info\n\nWindows\r\n\r\ndiffusers 0.29.2\n\n### Who can help?\n\n@yiyixuxu @sayakpaul @DN6 @asomoza",
    "url": "https://github.com/huggingface/diffusers/issues/8788",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-07-04T03:52:54Z",
    "updated_at": "2024-07-11T20:41:37Z",
    "comments": 2,
    "user": "Teriks"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8785,
    "title": "adding PAG Support for Hunyuan-DIT and Pixart-Sigma",
    "body": "we recently added PAG support for SDXL. Is Anyone interested in extending PAG support to Hunyuan-DIT and Pixart-Sigma? \r\nThere is no implementation available, so it is a bit of a research-oriented project (= fun!!). and you can get directly feedbacks from the authors @sunovivid @HyoungwonCho \r\n\r\nto add PAG support to new models:\r\n* I think you should be able to use `PAGMixin` as it is (or with some modification)(https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pag/pag_utils.py#L27) \r\n* you will need to make PAG attention processors for the new model https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L2564 based on the attention processor that the model uses, e.g. for Hunyuan-DIT, you need to make a `HunyuanPAGIdentitySelfAttnProcessor2_0` and `HunyuanPAGCFGIdentitySelfAttnProcessor2_0` based on `HunyuanAttnProcessor2_0` https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py#L1499\r\n* you will need to make a `HunyuanPAGPipeline` /`PixartSigmaPAGPipeline` under the `pag` folder (for now!) ",
    "url": "https://github.com/huggingface/diffusers/issues/8785",
    "state": "closed",
    "labels": [
      "help wanted",
      "contributions-welcome",
      "advanced"
    ],
    "created_at": "2024-07-03T18:17:32Z",
    "updated_at": "2024-08-30T11:09:04Z",
    "comments": 4,
    "user": "yiyixuxu"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8780,
    "title": "Model and input data type is not same",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nHi, when I trained sdv1.5 model with fp16 mode by using the `examples/text_to_image/train_text_to_image.py`  file, I found there is a mismatch between unet model and input data. Specificaly, In this [line](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image.py#L993)  , the `unet` model has float32 dtype, but the `noisy_latents` has the float16 dtype. Although it will not raise an error in cuda , I use my custom device it will raise an error,  I wonder how can I change this code to use float16.\r\n\r\n**Describe the solution you'd like.**\r\nTo avoid get a wrong model, I would like you give a right code to match model and input.\r\n\r\n**Describe alternatives you've considered.**\r\nA clear and concise description of any alternative solutions or features you've considered.\r\n\r\n**Additional context.**\r\nAdd any other context or screenshots about the feature request here.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/8780",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2024-07-03T06:57:44Z",
    "updated_at": "2024-09-14T15:07:36Z",
    "comments": 1,
    "user": "andyjiang1116"
  },
  {
    "repo": "huggingface/peft",
    "number": 1903,
    "title": "How to use multiple GPUs",
    "body": "### System Info\r\n\r\npeft=0.11.1\r\npython=3.10\r\n\r\n### Who can help?\r\n\r\nWhen I run this script, there is no problem with a single GPU. When I try to run 2 GPUs, the system resources show that the utilization rate of each GPU is only half. When I try to increase per-device_train_batch_size and gradient-accumulation_steps, there is a situation of memory overflow. What should I do?\r\n\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder\r\n- [X] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\n```python\r\nimport torch\r\nfrom datasets import load_dataset\r\nfrom transformers import (\r\n    AutoModelForCausalLM,\r\n    AutoTokenizer,\r\n    BitsAndBytesConfig,\r\n    HfArgumentParser,\r\n    TrainingArguments,\r\n    logging,\r\n)\r\nfrom peft import LoraConfig, peft_model, TaskType\r\nfrom trl import SFTTrainer, SFTConfig\r\n\r\n# fix random sequence\r\ntorch.backends.cudnn.deterministic = True\r\ntorch.backends.cudnn.benchmark = False\r\ntorch.manual_seed(seed)\r\nif torch.cuda.is_available():\r\n    torch.cuda.manual_seed(seed)\r\n\r\n\r\n# Load tokenizer\r\ntokenizer = AutoTokenizer.from_pretrained(\r\n    model_id,\r\n    # use_fast=False,\r\n    add_eos_token=True,\r\n    #trust_remote_code=True,\r\n)\r\n#tokenizer.pad_token = tokenizer.unk_token\r\ntokenizer.pad_token = tokenizer.eos_token\r\ntokenizer.pad_token_id = tokenizer.eos_token_id\r\ntokenizer.padding_side = \"right\"\r\n\r\n# Generate Llama 3 instruction\r\ndef generate_supervised_chat(row):\r\n    chat = [\r\n        {   'role': 'system',\r\n            'content': '\u4f60\u662f\u4e00\u4f4d\u4f18\u79c0\u7684\u7ffb\u8bd1\u4e13\u5bb6\u3002\u8bf7\u628a\u7ed9\u5b9a\u7684\u4e2d\u6587\u6587\u672c\u7ffb\u8bd1\u4e3a\u65e5\u8bed\uff0c\u53ea\u56de\u590d\u7ffb\u8bd1\u540e\u7684\u6587\u672c\u3002'},\r\n        {   'role': 'user',\r\n            'content': f'''\u8bf7\u628a\u4e0b\u9762\u7684\u4e2d\u6587\u6587\u672c\u7ffb\u8bd1\u4e3a\u65e5\u8bed\u6587\u672c\u3002\r\n\u4e2d\u6587\u6587\u672c: {row[\"Ch\"]}''' },\r\n        {   'role': 'assistant',\r\n            'content': f'''\u6b64\u6587\u672c\u7ffb\u8bd1\u540e\u7684\u7ed3\u679c\u5982\u4e0b\u3002\r\n\u65e5\u8bed\u7ffb\u8bd1\u6587\u672c: {row[\"Ja\"]}\r\n\u4ee5\u4e0a\u3002'''},\r\n     ]\r\n    instruction = tokenizer.apply_chat_template(chat, tokenize=False)\r\n    # instruction = instruction + \"<|end_of_text|>\"\r\n    return instruction\r\n\r\n\r\ndef add_text(row):\r\n    row['text'] = generate_supervised_chat(row)\r\n    return row\r\n\r\n\r\n# load dataset\r\njjs_dataset_dir = \"wccjc-dataset\"\r\ndataset = load_dataset(\r\n    jjs_dataset_dir,\r\n    data_files={'train': 'train.tsv', 'test': 'test.tsv', 'valid': 'valid.tsv'},\r\n    sep='\\t',\r\n    names=['Ch', 'Ja']\r\n)\r\n\r\ndataset = dataset[\"train\"]\r\ndataset = dataset.map(add_text)\r\nprint(dataset)\r\nprint(dataset[0][\"text\"])\r\n\r\n\r\n# Quantization Config\r\nbnb_config = BitsAndBytesConfig(\r\n    load_in_4bit=True,\r\n    bnb_4bit_quant_type=\"nf4\",\r\n    bnb_4bit_compute_dtype=torch.bfloat16, # or float16\r\n    bnb_4bit_use_double_quant=True,\r\n)\r\n\r\nimport datetime\r\n\r\n# Load pretrained model\r\nnow = datetime.datetime.now()\r\nprint('Loading base model:', model_id, now)\r\nprint('Train epochs:', n_epochs)\r\n\r\n\r\nmodel = AutoModelForCausalLM.from_pretrained(\r\n    model_id,\r\n    quantization_config=bnb_config,\r\n    device_map=\"auto\", #{\"\": 0},\r\n)\r\nnow = datetime.datetime.now()\r\nprint('Loading ended', now)\r\nmodel.config.use_cache = False\r\nmodel.config.pretraining_tp = 1\r\n\r\n\r\n# LoRA Config\r\nlora_config = LoraConfig(\r\n    r=8,\r\n    lora_alpha=32,\r\n    lora_dropout=0.05,\r\n    bias=\"none\",\r\n    task_type=TaskType.CAUSAL_LM, # \"CAUSUAL_LM\",\r\n    target_modules=[\"q_proj\", \"o_proj\", \"gate_proj\", \"up_proj\", \"down_proj\", \"k_proj\", \"v_proj\"],\r\n)\r\n\r\n\r\nper_device_train_batch_size = 4\r\ngradient_accumulation_steps = 4\r\nprint(\"per_device_train_batch_size:\", per_device_train_batch_size)\r\nprint(\"gradient_accumulation_steps:\", gradient_accumulation_steps)\r\n# Training arguments\r\nsft_config = SFTConfig(\r\n    output_dir=\"./train_logs\",\r\n    fp16=True,\r\n    seed=42,\r\n    # max_steps=13200, # 300,\r\n    num_train_epochs=n_epochs,\r\n    per_device_train_batch_size=per_device_train_batch_size, #4,\r\n    gradient_accumulation_steps=gradient_accumulation_steps, # 1,\r\n    optim=\"paged_adamw_32bit\",\r\n    learning_rate=2e-4,\r\n    lr_scheduler_type=\"cosine\",\r\n    max_grad_norm=0.3,\r\n    warmup_ratio=0.03,\r\n    weight_decay=0.001,\r\n    save_steps=1000, #25,\r\n    logging_steps=25,\r\n    group_by_length=True,\r\n    report_to=\"tensorboard\",\r\n    max_seq_length=512, #None\r\n    dataset_text_field=\"text\",\r\n)\r\n\r\n# SFT arguments\r\ntrainer = SFTTrainer(\r\n    model=model,\r\n    tokenizer=tokenizer,\r\n    train_dataset=dataset,\r\n    peft_config=lora_config,\r\n    # args=training_arguments,\r\n    args=sft_config,\r\n    packing=False,\r\n)\r\n```\r\n\r\n### Expected behavior\r\n\r\nrun 2 GPUs",
    "url": "https://github.com/huggingface/peft/issues/1903",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-03T02:25:36Z",
    "updated_at": "2024-08-11T15:03:29Z",
    "user": "Lihwnlp"
  },
  {
    "repo": "pytorch/xla",
    "number": 7622,
    "title": "How to avoid compilation in a section of code?",
    "body": "## \u2753 Questions and Help\r\nWe are using Pytorch XLA w/ TPU to train a multi-modal language models.\r\n\r\nWe can make most of the code, such as image encoding and the forward pass in the LLM backbone, in a static shape, which XLA handles well. However, making the part that fuses image and text embeddings into the input embedding static is extremely challenging. \r\n\r\nCurrently, we use `mark_step` to isolate that section from the rest of the code, allowing it to recompile each time. **Although this part is very computationally light, the recompilation is extremely slow and often consumes the majority of training time**.\r\n\r\nWe find documentation on this issue very hard to find, and we are exploring better solutions, such as running that part on the CPU, in eager mode, or not saving that part of the graph to avoid OOM errors during long training runs. **We wonder if you have any suggestions/pointers on how to workaround this inefficiency?**\r\n\r\nFollowing is a pesudo code to illustrate our problem\r\n\r\n```python\r\nfor ... # loading data\r\n  # these tensors are with static shape, xla works great on them\r\n  image_embeddings = image_encoder(raw_image_tensor)\r\n  text_embeddings = get_text_embedding(text_token_idxs)\r\n  \r\n  xm.mark_step()\r\n  # this part is very light in compute, but dynamic. We currently just recompile this graph every single time :(\r\n  input_embeddings = fuse_embedding(raw_image_tensor, text_token_idxs, sequence_info_dict)\r\n  xm.mark_step()\r\n  \r\n  # these tensors are with static shape, xla works great on them\r\n  output_logits = llm(input_embeddings)\r\n  # loss compute / backward / optimizer step omited\r\n```",
    "url": "https://github.com/pytorch/xla/issues/7622",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-03T00:15:12Z",
    "updated_at": "2025-04-03T14:54:28Z",
    "user": "Jiayi-Pan"
  },
  {
    "repo": "pytorch/xla",
    "number": 7614,
    "title": "Dynamo persistent cache real-time look-up",
    "body": "## \ud83d\ude80 Feature\r\nAs described in https://github.com/pytorch/pytorch/issues/125958, we are integrating with vLLM on TPUs. We see that in the warm up phase of the vLLM, it needs to pre-compile ~30 different input shape combinations. PyTorch/XLA does not support dynamic shapes today so torch.compile will keep compiling the model code which slows down the development speed (waiting for 10 minutes before warm up is finished). PyTorch/XLA already cache the XLA compilation but torch.compile itself is pretty expensive.\r\n\r\nThis feature request pitches to  achieve the similar effect of dynamic shapes by persistent caching and real time look up of the compiled program.\r\n\r\n## Details\r\nTo do this, in high-level, we need to do the following:\r\n- Turn on the dynamo dynamic shape mode, dynamo will start passing the inputs with dynamic shapes to PyTorch/XLA\r\n- PyTorch/XLA can then try to figure out if this shape is compiled in XLA\r\n- If it is, we can map the different input shape to different compiled binaries\r\n\r\n## Open questions\r\n- Does persistent FxGraph caching work with PyTorch/XLA? Details at https://github.com/pytorch/pytorch/issues/125958#issuecomment-2204040977. \r\n- How can we properly map the different input shape to different compiled binaries?\r\n\r\ncc @JackCaoG @WoosukKwon\r\n",
    "url": "https://github.com/pytorch/xla/issues/7614",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-02T21:01:36Z",
    "updated_at": "2024-07-23T01:18:34Z",
    "comments": 2,
    "user": "wonjoo-wj"
  },
  {
    "repo": "pytorch/vision",
    "number": 8510,
    "title": "Obscure error messages using VideoReader when PyAV version too old/not installed",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhen a sufficiently recent version of PyAV is not installed, the script `vision/torchvision/io/video_reader.py` initialises the variable `av` to an `ImportError` object that contains a description of the issue, either at line 38:\r\n```python\r\nav = ImportError(\r\n        \"\"\"\\\r\nPyAV is not installed, and is necessary for the video operations in torchvision.\r\nSee https://github.com/mikeboers/PyAV#installation for instructions on how to\r\ninstall PyAV on your system.\r\n\"\"\"\r\n    )\r\n```\r\nor on line 28 (code omitted for brevity, but is similar to the above).  This is potentially very useful information that would make it easy to see why an application isn't working.  Unfortunately, this error is never actually raised.\r\n\r\nInstead, when a VideoReader object is created, the `av` variable is simply assumed to contain the PyAV module object. This is first used on line 159: \r\n```python\r\n            self.container = av.open(src, metadata_errors=\"ignore\")\r\n```\r\nAs an `ImportError` object does not have a method called `open`, this results in a rather mystifying error condition being raised: `AttributeError: 'ImportError' object has no attribute 'open'`.\r\n\r\nI suspect there should be a test immediately prior to line 159 which checks if `av` is an ImportError object and raises it if it is.\n\n### Versions\n\nThis bug is not related to specific versions, but can be seen by examination of the current version of the source code.",
    "url": "https://github.com/pytorch/vision/issues/8510",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-02T18:51:34Z",
    "updated_at": "2024-07-04T10:43:51Z",
    "comments": 1,
    "user": "occipita"
  },
  {
    "repo": "huggingface/text-embeddings-inference",
    "number": 320,
    "title": "how to deploy bge-reranker-v2-m3 on Text-embeddings-inference",
    "body": "",
    "url": "https://github.com/huggingface/text-embeddings-inference/issues/320",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-02T15:18:48Z",
    "updated_at": "2024-07-08T10:20:05Z",
    "user": "kennard520"
  },
  {
    "repo": "huggingface/text-embeddings-inference",
    "number": 318,
    "title": "How to deploy bge-reranker-v2-m3 for multiple threads\uff1f",
    "body": "",
    "url": "https://github.com/huggingface/text-embeddings-inference/issues/318",
    "state": "closed",
    "labels": [],
    "created_at": "2024-07-02T14:56:33Z",
    "updated_at": "2024-07-08T10:20:01Z",
    "user": "kennard520"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8771,
    "title": "Removing LoRAAttnProcessor causes many dependencies to fail",
    "body": "### Describe the bug\n\nhttps://github.com/huggingface/diffusers/pull/8623 removed obsolete `LoRAAttnProcessor` which in principle is a good thing, but it was done without considerations where is that feature currently in-use so it breaks many (and i mean many) community pipelines \r\n\r\nit also breaks some core libraries such as huggingface's own <https://github.com/huggingface/optimum> library which is used to export model to onnx and also to enable use of olive backend.\r\n\r\nsuggestion is to add a dummy class `LoRAAttnProcessor` so it results in no-op for packages that import it.\n\n### Reproduction\n\nN/A\n\n### Logs\n\n```shell\n> Failed to import optimum.onnxruntime.modeling_diffusion because of the following error (look up to see its traceback):\r\n> Failed to import optimum.exporters.onnx.__main__ because of the following error (look up to see its traceback):\r\n> cannot import name 'LoRAAttnProcessor' from 'diffusers.models.attention_processor' (/home/vlado/dev/sdnext/venv/lib/python3.12/site-packages/diffusers/models/attention_processor.py)\n```\n\n\n### System Info\n\ndiffusers==0.30.0.dev0\n\n### Who can help?\n\n@yiyixuxu @sayakpaul @DN6",
    "url": "https://github.com/huggingface/diffusers/issues/8771",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-07-02T13:11:33Z",
    "updated_at": "2024-07-03T16:37:08Z",
    "comments": 1,
    "user": "vladmandic"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 129949,
    "title": "How to get stream operators in custom backend compiler ?",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi, when I use a custom backend, I find that the fx graph that custom compiler gets does not have the stream related operations.\r\n\r\nThen I found that the fx graph dropped those stream operations after aot_module_simplified.\r\nSo, I want to know how can we get a fx graph that contains stream-related operations, when using aot_module_simplified and custom compiler?\r\n\r\n\r\ncc @ezyang @anijain2305 @chauhang @penguinwu @zou3519 @ptrblck @msaroufim \r\n\r\n\r\nHere is my test script. \r\n\r\n```\r\nimport torch\r\nimport torch.nn as nn\r\nclass Layer(nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n    def forward(self, x):\r\n        stream2 = torch.cuda.Stream()\r\n        with torch.cuda.stream(stream2):\r\n            z = x + 1\r\n        y = x - 1\r\n        return y + z\r\n\r\nmm = Layer()\r\nx=torch.randn([4]).cuda()\r\n\r\nfrom torch._functorch.aot_autograd import aot_module_simplified\r\ndef toy_backend(gm, sample_inputs):\r\n    return gm\r\ndef aot_toy_backend(gm, sample_inputs):\r\n    return aot_module_simplified(gm, sample_inputs, fw_compiler=toy_backend)\r\n\r\nmmc = torch.compile(mm, backend=aot_toy_backend)\r\nyc= mmc(x)\r\n```\r\n\r\n When I use aot_toy_backend backend, no stream related ops in gx graph.\r\n\r\n\n\n### Versions\n\npytorch 2.3.0",
    "url": "https://github.com/pytorch/pytorch/issues/129949",
    "state": "closed",
    "labels": [
      "oncall: pt2"
    ],
    "created_at": "2024-07-02T09:05:54Z",
    "updated_at": "2024-07-05T06:31:36Z",
    "user": "wbigat2"
  },
  {
    "repo": "pytorch/xla",
    "number": 7607,
    "title": "How to use spmd to support hybrid shard data parallelism\uff1f",
    "body": "## \u2753 Questions and Help\r\nFsdp can be well expressed by spmd, but hsdp seems to be unable to be expressed. Is there any way to express hsdp in spmd?",
    "url": "https://github.com/pytorch/xla/issues/7607",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-02T08:05:47Z",
    "updated_at": "2025-04-03T14:54:52Z",
    "user": "mars1248"
  },
  {
    "repo": "huggingface/candle",
    "number": 2307,
    "title": "How to get all layers attentions?",
    "body": "I only see that candle returns last_hidden_state, but not all_hidden_states and attentions. I want to get attentions. Can I submit a PR to do this? I originally wanted to define the Model myself, but I found that all its methods are private",
    "url": "https://github.com/huggingface/candle/issues/2307",
    "state": "open",
    "labels": [],
    "created_at": "2024-07-02T02:16:52Z",
    "updated_at": "2024-07-02T02:16:52Z",
    "user": "kitty-eu-org"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8760,
    "title": "Clarification Needed on Hardcoded Value in Conditional Statement in LeditPP",
    "body": "Hello @manuelbrack,\r\n\r\nI was reviewing the source code and came across a line that seems to have a hardcoded value in a conditional statement. The line in question is:\r\n\r\nhttps://github.com/huggingface/diffusers/blob/0bae6e447cba0459456c4f7e7e87d7db141d3235/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py#L1053\r\n\r\nI understand that this condition decides whether cross_attention_mask, intersect_mask, or noise_mask is going to be used in the diffusion step, but any clarification on this this condition about the following questions will be appreciated:\r\n\r\n- What is the significance of the value 800?\r\n- Is this value based on empirical data, theoretical calculations, or an arbitrary choice?\r\n- Are there specific scenarios or conditions under which this threshold was determined?\r\n- Would it be possible to include a comment or documentation explaining this choice for future reference?\r\n\r\nThank you for your help!",
    "url": "https://github.com/huggingface/diffusers/issues/8760",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2024-07-01T20:12:20Z",
    "updated_at": "2024-12-13T15:05:35Z",
    "comments": 3,
    "user": "ardofski"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 129877,
    "title": "Eager and PT2 inconsistent on whether or not scalar tensor is allowed as input where int is expected",
    "body": "### \ud83d\udc1b Describe the bug\n\nInternal xref: https://fb.workplace.com/groups/1075192433118967/posts/1454391288532411/\r\n\r\nThe error looks like this:\r\n\r\n```\r\nTorchRuntimeError: Failed running call_function fbgemm.jagged_1d_to_dense(*(), **{'values': FakeTensor(..., device='cuda:7', size=(260039,), dtype=torch.int64), 'offsets': FakeTensor(..., device='cuda:7', size=(513,), dtype=torch.int64), 'max_sequence_length': FakeTensor(..., device='cuda:7', size=(), dtype=torch.int64), 'padding_value': 0}):\r\nfbgemm::jagged_1d_to_dense() Expected a value of type 'int' for argument 'max_sequence_length' but instead found type 'FakeTensor'.\r\n```\r\n\r\nYou can work around it by replacing `max_len = torch.max(lengths)` with `max_len = torch.max(lengths).item()` but it would be better if PT2 implicitly inserted the item call\r\n\r\n@zou3519 I am not sure if this is a custom op problem or a Dynamo problem\r\n\r\nA minimal repro should be relatively simple to create.\n\n### Versions\n\nmain\n\ncc @anijain2305 @chauhang @penguinwu @zou3519 @bdhirsh",
    "url": "https://github.com/pytorch/pytorch/issues/129877",
    "state": "closed",
    "labels": [
      "triaged",
      "module: custom-operators",
      "oncall: pt2",
      "module: pt2-dispatcher"
    ],
    "created_at": "2024-07-01T14:11:55Z",
    "updated_at": "2025-07-30T17:43:13Z",
    "user": "ezyang"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8748,
    "title": "SD3 cannot finetunes a better model (hand and face deformation)?",
    "body": "### Describe the bug\n\nI want to finetune sd3 to improve its human generation quality with 3million high-quality human datasets (which has been proven useful on sdxl and other models).  But hand and face deformation doesn't improve much after two days of training. \r\n\r\nI am using [train](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_sd3.py) script\r\n\r\nWhat I have been done so far:\r\n1. regular training with 3 million data with batch size 2x24(V100) for 2 epochs with lr 5e-6 and adamw optimizer\r\n2. prodigy optimizer training  with same setting\r\n3. Add q,k RMS norm to each attention layer\r\n4. only train several blocks\r\n\r\nAll of my training gives me nearly the same deformation results, where the hands are never normal like human. \r\n\r\nCould you some provide more experiments about sd3 training? There seems no easy way to adapt sd3 for human generation\r\n\r\n\n\n### Reproduction\n\nHas described in bug part\n\n### Logs\n\n_No response_\n\n### System Info\n\nV100 24GPU, batchsize 2 for each card, 3 million human data with aesthetic score > 4.5\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/8748",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-07-01T07:21:19Z",
    "updated_at": "2024-07-17T06:01:31Z",
    "comments": 4,
    "user": "KaiWU5"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 833,
    "title": "convert.py has errors when i use yolov9",
    "body": "### Question\n\nyour repo\r\nhttps://huggingface.co/Xenova/gelan-c\r\nis really good and helpful for me \r\nbut i need to use the gelan-t, gelan-s edition , coz of  mobile phone depoyment\r\n\r\n\r\nwhen i u convert.py to convert to onnx edition , errors happen\r\n\r\nThe checkpoint you are trying to load has model type `yolov9` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date",
    "url": "https://github.com/huggingface/transformers.js/issues/833",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-07-01T03:51:53Z",
    "updated_at": "2024-07-18T07:04:10Z",
    "user": "jifeng632"
  },
  {
    "repo": "huggingface/transformers",
    "number": 31722,
    "title": "how to generate router_logits in moe models using model.generate()?",
    "body": "### System Info\n\n- `transformers` version: 4.41.2\r\n- Platform: Linux-5.4.0-144-generic-x86_64-with-glibc2.31\r\n- Python version: 3.10.0\r\n- Huggingface_hub version: 0.23.4\r\n- Safetensors version: 0.4.3\r\n- Accelerate version: 0.31.0\r\n- Accelerate config:    not found\r\n- PyTorch version (GPU?): 2.3.0+cu121 (True)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: <yes>\r\n- Using distributed or parallel set-up in script?: <yes>\r\n\n\n### Who can help?\n\n@gante\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\r\ndevice = \"cuda\" # the device to load the model onto\r\n\r\nmodel = AutoModelForCausalLM.from_pretrained(\r\n   \"/localssd/swlu/Qwen1.5-MoE-A2.7B-Chat\",\r\n    torch_dtype=\"auto\",\r\n    device_map=\"auto\"\r\n)\r\ntokenizer = AutoTokenizer.from_pretrained(\"/localssd/swlu/Qwen1.5-MoE-A2.7B-Chat\")\r\n\r\nprompt = \"Give me a short introduction to large language model.\"\r\nmessages = [\r\n    {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\r\n    {\"role\": \"user\", \"content\": prompt}\r\n]\r\ntext = tokenizer.apply_chat_template(\r\n    messages,\r\n    tokenize=False,\r\n    add_generation_prompt=True\r\n)\r\nmodel_inputs = tokenizer([text], return_tensors=\"pt\").to(device)\r\n\r\ngenerated_ids = model.generate(\r\n    model_inputs.input_ids,\r\n    max_new_tokens=512,\r\n    return_dict_in_generate = True,\r\n    output_router_logits = True\r\n)\r\nprint(\"outputs:\", generated_ids.router_logits)\n\n### Expected behavior\n\nI want to get router_logits of moe models using model.generate() with the code above.\r\nBut got:\r\nAttributeError: 'GenerateDecoderOnlyOutput' object has no attribute 'router_logits'",
    "url": "https://github.com/huggingface/transformers/issues/31722",
    "state": "closed",
    "labels": [
      "Generation"
    ],
    "created_at": "2024-07-01T03:48:09Z",
    "updated_at": "2024-09-13T08:07:40Z",
    "user": "Jimmy-Lu"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 832,
    "title": "How to load version 3 from CDN? ",
    "body": "### Question\n\nThe [README.md file on v3 branch](https://github.com/xenova/transformers.js/tree/v3?tab=readme-ov-file#installation) has a html snippet to import transformers version 3 from a CDN.\r\n\r\n```html\r\n<script type=\"module\">\r\n    import { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@3.0.0-alpha.0';\r\n</script>\r\n```\r\n\r\nThat URL is unresolved by the CDN.\r\n\r\nIs version 3 available on any CDN? If so what is the URL? If not is there an alternative to import from browser?\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/832",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-30T23:39:08Z",
    "updated_at": "2024-10-10T12:23:41Z",
    "user": "geoffroy-noel-ddh"
  },
  {
    "repo": "huggingface/transformers",
    "number": 31717,
    "title": "how to remove kv cache?",
    "body": "### Feature request\n\nWhen I use the generate() function of a language model for inference, the kv-cache is also stored in the GPU memory. Is there any way to clear this kv-cache before continuing to call generate()?\n\n### Motivation\n\nI have a lot of text to process, so I use a for loop to call generate(). To avoid OOM, I need to clear the kv-cache before the end of each loop iteration.\n\n### Your contribution\n\nnone",
    "url": "https://github.com/huggingface/transformers/issues/31717",
    "state": "closed",
    "labels": [
      "Feature request",
      "Generation",
      "Cache"
    ],
    "created_at": "2024-06-30T12:09:48Z",
    "updated_at": "2024-11-05T01:34:42Z",
    "user": "TuuSiwei"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2904,
    "title": "How to merge Qlora FSDP weights with an LLM and save model.",
    "body": "",
    "url": "https://github.com/huggingface/accelerate/issues/2904",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-30T07:00:50Z",
    "updated_at": "2024-07-01T14:20:53Z",
    "user": "Minami-su"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 830,
    "title": "Error while using the library in nextjs (app based route)",
    "body": "### Question\r\n\r\nHello \r\n\r\nI was going through the issues section to find out an solution for the issue i am facing.. I did tried some of the solutions provided by xenova but it seems like I am getting some wasm fallback error which I have no idea whats happening.. I doubt its on webpack but I wanted a clarity. \r\n\r\n\r\nThe error I see is like this while running `npm run dev`\r\n\r\n```\r\n \u2713 Compiled /api/openai in 1500ms (3656 modules)\r\nTypeError: Cannot read properties of undefined (reading 'create')\r\n    at constructSession (webpack-internal:///(rsc)/./node_modules/@xenova/transformers/src/models.js:436:39)\r\n    at async Promise.all (index 1)\r\n    at async BertModel.from_pretrained (webpack-internal:///(rsc)/./node_modules/@xenova/transformers/src/models.js:1007:20)\r\n    at async AutoModel.from_pretrained (webpack-internal:///(rsc)/./node_modules/@xenova/transformers/src/models.js:5026:20)\r\n    at async Promise.all (index 1)\r\n    at async loadItems (webpack-internal:///(rsc)/./node_modules/@xenova/transformers/src/pipelines.js:2838:5)\r\n    at async pipeline (webpack-internal:///(rsc)/./node_modules/@xenova/transformers/src/pipelines.js:2790:21)\r\n    at async HuggingFaceEmbedding.getExtractor (webpack-internal:///(rsc)/./node_modules/llamaindex/dist/embeddings/HuggingFaceEmbedding.js:37:30)\r\n    at async HuggingFaceEmbedding.getTextEmbedding (webpack-internal:///(rsc)/./node_modules/llamaindex/dist/embeddings/HuggingFaceEmbedding.js:44:27)\r\n    at async HuggingFaceEmbedding.getTextEmbeddings (webpack-internal:///(rsc)/./node_modules/llamaindex/dist/embeddings/types.js:30:31)\r\n    at async batchEmbeddings (webpack-internal:///(rsc)/./node_modules/llamaindex/dist/embeddings/types.js:61:32)\r\n    at async HuggingFaceEmbedding.getTextEmbeddingsBatch (webpack-internal:///(rsc)/./node_modules/llamaindex/dist/embeddings/types.js:40:16)\r\n    at async HuggingFaceEmbedding.transform (webpack-internal:///(rsc)/./node_modules/llamaindex/dist/embeddings/types.js:44:28)\r\n    at async VectorStoreIndex.getNodeEmbeddingResults (webpack-internal:///(rsc)/./node_modules/llamaindex/dist/indices/vectorStore/index.js:474:17)\r\n    at async VectorStoreIndex.insertNodes (webpack-internal:///(rsc)/./node_modules/llamaindex/dist/indices/vectorStore/index.js:571:17)\r\n    at async VectorStoreIndex.buildIndexFromNodes (webpack-internal:///(rsc)/./node_modules/llamaindex/dist/indices/vectorStore/index.js:486:9)\r\n    at async VectorStoreIndex.init (webpack-internal:///(rsc)/./node_modules/llamaindex/dist/indices/vectorStore/index.js:436:13)\r\n    at async VectorStoreIndex.fromDocuments (webpack-internal:///(rsc)/./node_modules/llamaindex/dist/indices/vectorStore/index.js:514:16)\r\n    at async getOpenAIModelRequest (webpack-internal:///(rsc)/./src/actions/openai.ts:62:23)\r\n    at async POST (webpack-internal:///(rsc)/./src/app/api/openai/route.ts:11:21)\r\n    at async /Users/jino.jose/rakuten/git/rr-services-version-dashboard/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:63809\r\n    at async eU.execute (/Users/jino.jose/rakuten/git/rr-services-version-dashboard/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:53964)\r\n    at async eU.handle (/Users/jino.jose/rakuten/git/rr-services-version-dashboard/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:65062)\r\n    at async doRender (/opt/homebrew/lib/node_modules/next/dist/server/base-server.js:1333:42)\r\n    at async cacheEntry.responseCache.get.routeKind (/opt/homebrew/lib/node_modules/next/dist/server/base-server.js:1555:28)\r\n    at async DevServer.renderToResponseWithComponentsImpl (/opt/homebrew/lib/node_modules/next/dist/server/base-server.js:1463:28)\r\n    at async DevServer.renderPageComponent (/opt/homebrew/lib/node_modules/next/dist/server/base-server.js:1856:24)\r\n    at async DevServer.renderToResponseImpl (/opt/homebrew/lib/node_modules/next/dist/server/base-server.js:1894:32)\r\n    at async DevServer.pipeImpl (/opt/homebrew/lib/node_modules/next/dist/server/base-server.js:911:25)\r\n    at async NextNodeServer.handleCatchallRenderRequest (/opt/homebrew/lib/node_modules/next/dist/server/next-server.js:271:17)\r\n    at async DevServer.handleRequestImpl (/opt/homebrew/lib/node_modules/next/dist/server/base-server.js:807:17)\r\n    at async /opt/homebrew/lib/node_modules/next/dist/server/dev/next-dev-server.js:331:20\r\n    at async Span.traceAsyncFn (/opt/homebrew/lib/node_modules/next/dist/trace/trace.js:151:20)\r\n    at async DevServer.handleRequest (/opt/homebrew/lib/node_modules/next/dist/server/dev/next-dev-server.js:328:24)\r\n    at async invokeRender (/opt/homebrew/lib/node_modules/next/dist/server/lib/router-server.js:163:21)\r\n    at async handleRequest (/opt/homebrew/lib/node_modules/next/dist/server/lib/router-server.js:342:24)\r\n    at async requestHandlerImpl (/opt/homebrew/lib/node_modules/next/dist/server/lib/router-server.js:366:13)\r\n    at async Server.requestListener (/opt/homebrew/lib/node_modules/next/dist/server/lib/start",
    "url": "https://github.com/huggingface/transformers.js/issues/830",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-29T15:00:09Z",
    "updated_at": "2025-02-10T02:00:25Z",
    "user": "rr-jino-jose"
  },
  {
    "repo": "pytorch/data",
    "number": 1280,
    "title": "Importing `torchdata.stateful_dataloader` hides `torch` RandomSampler and BatchSampler",
    "body": "### \ud83d\udc1b Describe the bug\n\n### Description\r\n\r\nIn `torchdata.stateful_dataloader.sampler.py`, several Sampler classes in `torch.utils.data` are overwritten:\r\n1. https://github.com/pytorch/data/blob/main/torchdata/stateful_dataloader/sampler.py#L61-L62\r\n2. https://github.com/pytorch/data/blob/main/torchdata/stateful_dataloader/sampler.py#L134-L135\r\n\r\nThe implication here is that if code were to import `StatefulDataLoader` after importing torch, then there may be inconsistent definitions of `BatchSampler` and `RandomSampler` at runtime. See the gist below for a toy example, where a StatefulDataLoader has a handle to a `torch.utils.data.sampler.BatchSampler` rather than a `torchdata.stateful_dataloader.sampler.BatchSampler`.\r\n\r\nThis may possibly be the root cause of https://github.com/huggingface/accelerate/issues/2894\r\n\r\n### How to reproduce\r\n\r\nSee gist: https://gist.github.com/byi8220/3091215e38d8f1caba01bc015aed32aa\n\n### Versions\n\nPyTorch version: 2.5.0.dev20240628\r\nIs debug build: False\r\nCUDA used to build PyTorch: Could not collect\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 24.04 LTS (x86_64)\r\nGCC version: (Ubuntu 13.2.0-23ubuntu4) 13.2.0\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\nLibc version: glibc-2.39\r\n\r\nPython version: 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:12:24) [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-6.8.0-36-generic-x86_64-with-glibc2.39\r\nIs CUDA available: False\r\nCUDA runtime version: 12.5.40\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 3060 Ti\r\nNvidia driver version: 555.42.02\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                         x86_64\r\nCPU op-mode(s):                       32-bit, 64-bit\r\nAddress sizes:                        43 bits physical, 48 bits virtual\r\nByte Order:                           Little Endian\r\nCPU(s):                               12\r\nOn-line CPU(s) list:                  0-11\r\nVendor ID:                            AuthenticAMD\r\nModel name:                           AMD Ryzen 5 3600 6-Core Processor\r\nCPU family:                           23\r\nModel:                                113\r\nThread(s) per core:                   2\r\nCore(s) per socket:                   6\r\nSocket(s):                            1\r\nStepping:                             0\r\nFrequency boost:                      enabled\r\nCPU(s) scaling MHz:                   83%\r\nCPU max MHz:                          4208.2031\r\nCPU min MHz:                          2200.0000\r\nBogoMIPS:                             7200.35\r\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip rdpid overflow_recov succor smca sev sev_es\r\nVirtualization:                       AMD-V\r\nL1d cache:                            192 KiB (6 instances)\r\nL1i cache:                            192 KiB (6 instances)\r\nL2 cache:                             3 MiB (6 instances)\r\nL3 cache:                             32 MiB (2 instances)\r\nNUMA node(s):                         1\r\nNUMA node0 CPU(s):                    0-11\r\nVulnerability Gather data sampling:   Not affected\r\nVulnerability Itlb multihit:          Not affected\r\nVulnerability L1tf:                   Not affected\r\nVulnerability Mds:                    Not affected\r\nVulnerability Meltdown:               Not affected\r\nVulnerability Mmio stale data:        Not affected\r\nVulnerability Reg file data sampling: Not affected\r\nVulnerability Retbleed:               Mitigation; untrained return thunk; SMT enabled with STIBP protection\r\nVulnerability Spec rstack overflow:   Mitigation; Safe RET\r\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl\r\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\r\nVulnerability Spectre v2:             Mitigation; Retpolines; IBPB conditional; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected\r\nVulnerability Srbds:                  Not affected\r\nVulnerability Tsx async abort:        Not affected\r\n\r\nVersions of releva",
    "url": "https://github.com/meta-pytorch/data/issues/1280",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-28T23:28:50Z",
    "updated_at": "2024-07-03T18:23:06Z",
    "comments": 8,
    "user": "byi8220"
  },
  {
    "repo": "huggingface/candle",
    "number": 2294,
    "title": "How to get raw tensor data?",
    "body": "I am trying to implement an adaptive avg pool in candle. However, I guess my implementation will require an API to get the raw data/storage (storaged in plain/flatten array format).\r\nWondering if there is such an API for that?\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/candle/issues/2294",
    "state": "open",
    "labels": [],
    "created_at": "2024-06-28T19:19:45Z",
    "updated_at": "2024-06-28T21:51:57Z",
    "user": "WenheLI"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8730,
    "title": "Implementation of DDIM, why taking Xt and (t-1) as input?",
    "body": "### Describe the bug\n\nI have tried to infer a diffusion model with DDIM with the number of timesteps = 10 and maximize timesteps as 1000. \r\n\r\nI have printed the t in the for-loop, and the result is 901, 801, 801, 701, 601, 501, 401, 301, 201, 101, 1. It's really weird to me why 801 appears two times, and why we start from t=901 instead of t=1000. If we use t=901, we are trying to input x_1000 (the pure noise) and  t_901 to the noise predictor, right? It seems weird because when we train the diffusion model, we feed (x_t, t). I mean, the timestep t should correspond to the version of images x_t. \r\n\r\nI think the implementation may be right and some of my thoughts are wrong. Please kindly tell me the reason. Thank you!!!\n\n### Reproduction\n\nJust add a print in the forward for loop in DDIMPipeline.\n\n### Logs\n\n_No response_\n\n### System Info\n\nI believe this problem is not relevant to the system info.\n\n### Who can help?\n\n@yiyixuxu",
    "url": "https://github.com/huggingface/diffusers/issues/8730",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-06-28T18:45:55Z",
    "updated_at": "2024-07-01T17:24:49Z",
    "comments": 1,
    "user": "EPIC-Lab-sjtu"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 434,
    "title": "Question about custom cuda operators for tensor parallelism",
    "body": "We are currently trying to apply torchtitan to MoE models. MoE models require using grouped_gemm https://github.com/fanshiqing/grouped_gemm. GroupedGemm ops basically follow the same rule as in ColumnLinear and RowLinear. Is there any way to make custom ops dtensor compatible? Great thanks for help!",
    "url": "https://github.com/pytorch/torchtitan/issues/434",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-28T12:29:43Z",
    "updated_at": "2024-11-22T00:04:50Z",
    "user": "vermouth1992"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 490,
    "title": "How to save model checkpoint from a distributed training from multiple nodes?",
    "body": "Hello, \r\n\r\nWhen I use accelerator and deepspeed Zero3 to train the model in one node with 8 GPUs, the following code smoothly saves the model checkpoint\r\n```\r\nds_state_dict = model._zero3_consolidated_16bit_state_dict() # here model is sharded \r\n\r\nif self.accelerator.is_main_process:\r\n    save_file(ds_state_dict, f\"{output_dir}/full_model.safetensors\")\r\n```\r\nHowever, when I move the code to two nodes with each node 8 GPUs, this code does not work.\r\nThe error is like:\r\n\r\n```Some NCCL operations have failed or timed out. Due to the asynchronous nature of CUDA kernels, subsequent GPU operations might run on corrupted/incomplete data.```\r\n\r\nThen I thought maybe I should not call main process only because there are two nodes, so I call the local rank 0 to save\r\n```\r\nds_state_dict = model._zero3_consolidated_16bit_state_dict() # here model is sharded \r\n\r\nif self.accelerator.local_process_index == 0:\r\n    save_file(ds_state_dict, f\"{output_dir}/full_model.safetensors\")\r\n\r\n```\r\n\r\nAnd the error becomes:\r\n```\r\nsave_file(ds_state_dict, f\"{output_dir}/full_model.safetensors\")\r\n  File \"/opt/conda/lib/python3.10/site-packages/safetensors/torch.py\", line 284, in save_file\r\n    serialize_file(_flatten(tensors), filename, metadata=metadata)\r\n  File \"/opt/conda/lib/python3.10/site-packages/safetensors/torch.py\", line 457, in _flatten\r\n    raise ValueError(f\"Expected a dict of [str, torch.Tensor] but received {type(tensors)}\")\r\nValueError: Expected a dict of [str, torch.Tensor] but received <class 'NoneType'>\r\n\r\n```\r\nI am not sure in this case, what is the right way to use safetensors to save?",
    "url": "https://github.com/huggingface/safetensors/issues/490",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-06-28T04:59:45Z",
    "updated_at": "2024-07-31T11:46:06Z",
    "user": "Emerald01"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8728,
    "title": "Using `torchsde.BrownianInterval` instead of `torchsde.BrownianTree` in class `BatchedBrownianTree`",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nWhen I was doing some optimization for my pipeline, i found that the BrownianTree somehow took a bit more time.\r\n\r\n**Describe the solution you'd like.**\r\nI further dig into torchsde document, and found that they encouraged to use `BrownianInterval` to have best benefits for underlying structure utilization. The `BrownianTree` is actually just an abstraction layer of the `BrownianInterval` and as we all know, python function calls take time!\r\n\r\nCode:\r\n```\r\n#diffusers/src/diffusers/schedulers/scheduling_dpmsolver_sde.py:41\r\nself.trees = [torchsde.BrownianTree(t0, w0, t1, entropy=s, **kwargs) for s in seed]\r\n\r\n# Modified\r\nself.trees = [torchsde.BrownianInterval(t0, t1, size=w0.shape, dtype=w0.dtype, device=w0.device, cache_size=None, entropy=s, **kwargs) for s in seed]\r\n```\r\n\r\n**Additional context.**\r\n[torchsde doc link](https://github.com/google-research/torchsde/blob/master/DOCUMENTATION.md)",
    "url": "https://github.com/huggingface/diffusers/issues/8728",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-28T04:33:55Z",
    "updated_at": "2024-09-12T08:46:54Z",
    "comments": 5,
    "user": "dianyo"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 826,
    "title": "Support for GLiNER models?",
    "body": "### Question\n\nis there a reason why models from the GLiNER family can't be supported?\r\n\r\nI see they use a specialized library, does it take a lot of code to make them work?",
    "url": "https://github.com/huggingface/transformers.js/issues/826",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-28T01:54:37Z",
    "updated_at": "2024-10-04T07:59:16Z",
    "user": "Madd0g"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 431,
    "title": "Question about Pipeline parallelism",
    "body": "Just wonder does the current PipelineStage API supports variable length input shapes like in Megatron? https://github.com/NVIDIA/Megatron-LM/blob/e33c8f78a35765d5aa37475a144da60e8a2349d1/megatron/core/model_parallel_config.py#L212 This is particular useful for packed inputs where all the paddings are removed.",
    "url": "https://github.com/pytorch/torchtitan/issues/431",
    "state": "open",
    "labels": [
      "enhancement",
      "question",
      "post training"
    ],
    "created_at": "2024-06-27T15:31:52Z",
    "updated_at": "2025-10-02T02:32:07Z",
    "user": "vermouth1992"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8721,
    "title": "how to unload a pipeline",
    "body": "how to unload a pipeline and release the gpu memory",
    "url": "https://github.com/huggingface/diffusers/issues/8721",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-27T10:04:39Z",
    "updated_at": "2024-07-02T14:40:39Z",
    "user": "nono909090"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 825,
    "title": "Are there any examples on how to use paligemma model with transformer.js",
    "body": "### Question\n\nFirst of all, thanks for this amazing library! \r\n\r\nSo my questions is, I happened to see this model available on transformers.js:\r\nhttps://huggingface.co/Xenova/paligemma-3b-mix-224\r\n\r\nBut unfortunately I can't find any example on how to run the `image-text-to-text` pipeline. Are there are resources you could kindly point me to? Thanks in advance! \ud83d\ude4f\ud83c\udffb ",
    "url": "https://github.com/huggingface/transformers.js/issues/825",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-27T09:49:22Z",
    "updated_at": "2024-06-29T02:39:27Z",
    "user": "alextanhongpin"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 294,
    "title": "after training using lerobot framework\uff0chow to infer the trained policy directly in real environment(ep. aloha code)? i have not found a solution yet",
    "body": "### System Info\n\n```Shell\nos ubuntu20.04,\n```\n\n\n### Information\n\n- [ ] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nnot yet\n\n### Expected behavior\n\nhow to directly eval the policy trained by lerobot in aloha ?",
    "url": "https://github.com/huggingface/lerobot/issues/294",
    "state": "closed",
    "labels": [
      "question",
      "policies",
      "robots",
      "stale"
    ],
    "created_at": "2024-06-27T03:16:19Z",
    "updated_at": "2025-10-23T02:29:25Z",
    "user": "cong1024"
  },
  {
    "repo": "pytorch/serve",
    "number": 3206,
    "title": "Docker swarm with TorchServe workflow",
    "body": "I want to scale the workflows through \"Docker Swarm\". (I hope it is possible, if not please tell me how one can achieve this? I know it is not supported yet through TorchServe directly, that is why I'm using docker to scale the workflow.)\r\nI have few questions related to using TorchServe as a docker service in swarm mode while I encountered few issues.\r\n\r\n**Problem Statement:** \r\n\r\n- We are using TorchServe workflow as we have multiple models required to complete the use case.\r\n- To make sure that there isn't any difference I've set the number of workers to 2 on each node, so that memory consumption doesn't go above 16GB, and each node has same number of workers and memory.\r\n- While creating a docker service, the manager node seems to work fine with the below TorchServe config and completes the task in desired time, but when the manager assigns the task to any of the worker node it takes ~3X more time.\r\n- Problem we are facing is while a TorchServe worker is executing on the worker node, looks like it is executing with intervals. i.e., it doesn\u2019t show continuous GPU utilization/processing and stops printing logs as well along with delay in response and meanwhile that if another request comes it will stop executing the current request and starts executing new one.\r\n- I did see something in logs (unfortunately, I'm unable to provide the logs here) like, when node `m5` is being executed and new request came then the current request directly stops (at least in the logs it looked like that, but no error was thrown) and new one starts. Correct me if I'm wrong but old request should be executing in the background, right?\r\n- Now, the question is, Does TorchServe support routing the request through docker swarm?\r\n- If so, then what would be the correct configuration to achieve similar results on the all the nodes apart from manager in swarm?\r\n\r\n\r\n**My Docker Swarm Config:** \r\n* 3 nodes, 1 manager 2 workers\r\n* Manager has 4 X v100 sxm-2, 32GB each, Worker has 4 X v100 sxm-2, 16GB each\r\n\r\n**My project config:** \r\n(Please ignore the timeout, as I've put it this way because my inference request takes around 10 mins, as it takes over 100 images to process in a batch)\r\n\r\n* There are 5 models\r\n* **model-config.yaml**\r\n```yaml\r\nmaxBatchDelay: 10000000\r\nresponseTimeout: 10000000\r\n```\r\n* **workflow.yaml**\r\n```yaml\r\nmodels:\r\n    min-workers: 1\r\n    max-workers: 2\r\n    max-batch-delay: 10000000\r\n    retry-attempts: 1\r\n    timeout-ms: 3000000\r\n\r\n    m1:\r\n      url: mode-1.mar\r\n\r\n    m2:\r\n      url: model-2.mar\r\n\r\n    m3:\r\n      url: model-3.mar\r\n\r\n    m4:\r\n      url: model-4.mar\r\n\r\n    m5:\r\n      url: model-5.mar\r\n  \r\ndag:\r\n  pre_processing: [m1]\r\n  m1: [m2]\r\n  m2: [m3]\r\n  m3: [m4]\r\n  m4: [m5]\r\n  m5: [post_processing]\r\n```\r\n* **config.properties**\r\n```properties\r\ninference_address=http://0.0.0.0:8080\r\nmanagement_address=http://0.0.0.0:8081\r\nmetrics_address=http://0.0.0.0:8082\r\n\r\n# management\r\ndefault_response_timeout=10000000\r\ndefault_workers_per_model=2\r\n\r\nload_models=\r\nmodel_store=model_store\r\nworkflow_store=wf_store\r\n\r\nenable_envvars_config=true\r\njob_queue_size=3\r\n```\r\n\r\n**Python Packages:**\r\n\r\n```text\r\ntorch==1.13.1+cu117\r\ntorchvision==0.14.1+cu117\r\ntorchaudio==0.13.1+cu117\r\ntorchserve==0.10.0\r\ntorch-model-archiver==0.10.0\r\ntorch-workflow-archiver==0.2.12\r\nnvgpu==0.10.0\r\ncaptum==0.7.0\r\n```\r\n",
    "url": "https://github.com/pytorch/serve/issues/3206",
    "state": "closed",
    "labels": [
      "triaged",
      "workflowx"
    ],
    "created_at": "2024-06-26T16:20:40Z",
    "updated_at": "2024-07-25T14:54:32Z",
    "comments": 6,
    "user": "KD1994"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1312,
    "title": "[v0.9.1] Error: \"Cannot resolve directory $env\"",
    "body": "## Issue\r\n\r\nFor all client-side components, I get this:\r\n\r\n```\r\n\"Cannot resolve directory $env\"\r\n```\r\n\r\n<img width=\"589\" alt=\"image\" src=\"https://github.com/huggingface/chat-ui/assets/31769894/26fa2eef-dbff-44f6-bb86-7700387abdf2\">\r\n\r\n<img width=\"837\" alt=\"image\" src=\"https://github.com/huggingface/chat-ui/assets/31769894/e3668b40-396b-4244-9c78-4aaf805220ae\">\r\n\r\n\r\nThis issue prevents a Docker run, because PUBLIC_ASSETS is not found.\r\n\r\n@nsarrazin Please help.\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1312",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-06-26T13:24:42Z",
    "updated_at": "2024-06-26T15:14:48Z",
    "comments": 2,
    "user": "adhishthite"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1311,
    "title": "400 (no body) trying to reach openai compatible server",
    "body": "Hi everyone,\r\n\r\nI have the following setup (containers are on the same device):\r\n- Container 1: Nvidia NIM (openai-compatible) with Llama3 8B Instruct, port 8000;\r\n- Container 2: chat-ui, port 3000.\r\n\r\nThis is the content of the `.env` file:\r\n```\r\nMONGODB_URL=mongodb://localhost:27017\r\nMONGODB_DB_NAME=chat-ui\r\nMODELS=`[{\"name\":\"Llama3-8B-Instruct\",\"id\":\"Llama3-8B-Instruct\",\"endpoints\":[{\"type\":\"openai\",\"baseURL\":\"http://192.168.120.240:8000/v1\",\"extraBody\":{\"repetition_penalty\":1.1}}]}]`\r\nLOG_LEVEL=debug\r\nALLOW_INSECURE_COOKIES=true\r\n```\r\n\r\nAnd this is the error I get when I try to run inference from browser:\r\n\r\n```\r\n{\"level\":50,\"time\":1719403859826,\"pid\":31,\"hostname\":\"592d634d7447\",\"err\":{\"type\":\"BadRequestError\",\"message\":\"400 status code (no body)\",\"stack\":\"Error: 400 status code (no body)\\n    at APIError.generate (file:///app/build/server/chunks/index-3aabce5f.js:4400:20)\\n    at OpenAI.makeStatusError (file:///app/build/server/chunks/index-3aabce5f.js:5282:25)\\n    at OpenAI.makeRequest (file:///app/build/server/chunks/index-3aabce5f.js:5325:30)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\\n    at async file:///app/build/server/chunks/models-e8725572.js:98846:36\\n    at async generateFromDefaultEndpoint (file:///app/build/server/chunks/index3-2417d430.js:213:23)\\n    at async generateTitle (file:///app/build/server/chunks/_server.ts-2c825ade.js:213:10)\\n    at async generateTitleForConversation (file:///app/build/server/chunks/_server.ts-2c825ade.js:177:19)\",\"status\":400,\"headers\":{\"content-length\":\"1980\",\"content-type\":\"application/json\",\"date\":\"Wed, 26 Jun 2024 12:10:59 GMT\",\"server\":\"uvicorn\"}},\"msg\":\"400 status code (no body)\"}\r\nBadRequestError: 400 status code (no body)\r\n    at APIError.generate (file:///app/build/server/chunks/index-3aabce5f.js:4400:20)\r\n    at OpenAI.makeStatusError (file:///app/build/server/chunks/index-3aabce5f.js:5282:25)\r\n    at OpenAI.makeRequest (file:///app/build/server/chunks/index-3aabce5f.js:5325:30)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async file:///app/build/server/chunks/models-e8725572.js:98846:36\r\n    at async generate (file:///app/build/server/chunks/_server.ts-2c825ade.js:426:30)\r\n    at async textGenerationWithoutTitle (file:///app/build/server/chunks/_server.ts-2c825ade.js:487:3) {\r\n  status: 400,\r\n  headers: {\r\n    'content-length': '543',\r\n    'content-type': 'application/json',\r\n    date: 'Wed, 26 Jun 2024 12:10:59 GMT',\r\n    server: 'uvicorn'\r\n  },\r\n  request_id: undefined,\r\n  error: undefined,\r\n  code: undefined,\r\n  param: undefined,\r\n  type: undefined\r\n}\r\n```\r\n\r\nIs there something wrong with the .env file, or is Nvidia NIM simply not supported for some strange reason?",
    "url": "https://github.com/huggingface/chat-ui/issues/1311",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-06-26T12:34:44Z",
    "updated_at": "2024-07-22T13:03:18Z",
    "comments": 2,
    "user": "edesalve"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8710,
    "title": "Add PAG support to SD1.5",
    "body": "We recently integrated PAG into diffusers! See this PR [here] (https://github.com/huggingface/diffusers/pull/7944) we added PAG to SDXL\r\n\r\nwe also want to add PAG support to SD1.5 pipelines! we will need:\r\n\r\n- [x] StableDiffusionPAGPipeline (assigned to @shauray8, PR https://github.com/huggingface/diffusers/pull/8725)\r\n- [ ] StableDiffusionPAGImg2ImgPipeline https://github.com/huggingface/diffusers/pull/9463\r\n- [ ] StableDiffusionPAGInpaintPipeline\r\n- [ ] StableDiffusionControlNetPAGInpaintPipeline (https://github.com/huggingface/diffusers/pull/8875)\r\n- [x] StableDiffusionControlNetPAGPipeline (assigned to @tuanh123789 )\r\n- [ ] StableDiffusionControlNetPAGImg2ImgPipeline (assigned to @Bhavay-2001 https://github.com/huggingface/diffusers/pull/8864)\r\n\r\n1. You should put it under the [pag folder](https://github.com/huggingface/diffusers/tree/main/src/diffusers/pipelines/pag)\r\n2. you can use the implementation of SDXL PAG pipelines as a reference (see this PRhttps://github.com/huggingface/diffusers/pull/7944 and you can find all the sdxl pag pipelines here https://github.com/huggingface/diffusers/tree/main/src/diffusers/pipelines/pag)\r\n3. you need to add AutoPipeline so that you can use this API to create it\r\n    ```python\r\n       AutoPipelineForImage2Image.from_pretrained(repo_id, controlnet=controlnet, enable_pag=True ...)\r\n   ```\r\n4. tests and docs \r\n\r\nIf you are interested in working on this, Let me know which pipeline(s) you want to work on:) ",
    "url": "https://github.com/huggingface/diffusers/issues/8710",
    "state": "closed",
    "labels": [
      "good first issue",
      "help wanted",
      "contributions-welcome"
    ],
    "created_at": "2024-06-26T08:23:17Z",
    "updated_at": "2024-10-09T20:40:59Z",
    "comments": 17,
    "user": "yiyixuxu"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1309,
    "title": "\"404 Resource Not Found\" when using Azure OpenAI model endpoint",
    "body": "I run `chat-ui` with the `chat-ui-db` docker image. I would like to connect it to my Azure OpenAI API endpoint.\r\nI have setup the `env.local` file as stated in your docs and binded it with the docker container:\r\n\r\n```bash\r\nMODELS=`[{\r\n  \"id\": \"gpt-4-1106-preview\",\r\n  \"name\": \"gpt-4-1106-preview\",\r\n  \"displayName\": \"gpt-4-1106-preview\",\r\n  \"parameters\": {\r\n      \"temperature\": 0.5,\r\n      \"max_new_tokens\": 4096,\r\n  },\r\n  \"endpoints\": [\r\n      {\r\n          \"type\": \"openai\",\r\n          \"baseURL\": \"https://{resource-name}.openai.azure.com/openai/deployments/{deployment-id}/chat/completions\",\r\n          \"defaultHeaders\": {\r\n              \"api-key\": \"{api-key}\"\r\n          },\r\n          \"defaultQuery\": {\r\n              \"api-version\": \"{api-version}\"\r\n          }\r\n      }\r\n  ]\r\n}]`\r\n```\r\n\r\nWhen sending a message in `chat-ui`, I get a message `404 Resource Not Found` on the top right of the interface.\r\nWhen I manually send an HTTP request to the Azure OpenAI API endpoint with the same parameters, I get a valid response.\r\nHow can I solve this?",
    "url": "https://github.com/huggingface/chat-ui/issues/1309",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-06-26T07:16:54Z",
    "updated_at": "2024-06-26T18:53:51Z",
    "comments": 2,
    "user": "gqoew"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1308,
    "title": "Warning: To load an ES module in Azure environment",
    "body": "Hi Team,\r\n\r\nWe are currently facing issues deploying our Chat UI solution in Azure Web App. The error encountered in the console log is as follows:\r\n\r\n```\r\nnpm http fetch GET 200 https://registry.npmjs.org/npm 141ms\r\n(node:124) Warning: To load an ES module, set \"type\": \"module\" in the package.json or use the .mjs extension.\r\n(Use `node --trace-warnings ...` to show where the warning was created)\r\n/home/site/wwwroot/node_modules/.bin/vite:2\r\nimport { performance } from 'node:perf_hooks'\r\n^^^^^^\r\n\r\nSyntaxError: Cannot use import statement outside a module\r\n    at internalCompileFunction (node:internal/vm:77:18)\r\n    at wrapSafe (node:internal/modules/cjs/loader:1288:20)\r\n    at Module._compile (node:internal/modules/cjs/loader:1340:27)\r\n    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)\r\n    at Module.load (node:internal/modules/cjs/loader:1207:32)\r\n    at Module._load (node:internal/modules/cjs/loader:1023:12)\r\n    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)\r\n    at node:internal/main/run_main_module:28:49\r\n\r\nNode.js v20.11.1\r\nnpm notice \r\nnpm notice New minor version of npm available! 10.5.0 -> 10.8.1\r\nnpm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1\r\nnpm notice Run npm install -g npm@10.8.1 to update!\r\nnpm notice \r\n```\r\n\r\n\r\nIt appears to be a Node.js issue, and I believe there might be an error in my package.json configuration. I have tried using both Node.js 18 and 20 without success.\r\n\r\nCould you please provide me with the correct configuration for package.json to resolve this issue?\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1308",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-06-26T06:04:45Z",
    "updated_at": "2024-06-27T09:07:35Z",
    "comments": 3,
    "user": "pronitagrawalvera"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 823,
    "title": "How to export q4f16.onnx ",
    "body": "### Question\r\n\r\nThanks for providing such a great project, but I have a problem converting the model.\r\n\r\n\r\n```\r\nFor example:  \r\nmodel_q4f16.onnx\r\n```\r\n\r\n\r\nWhat command is used to create and export such a q4/f16.onnx model?\r\nCan you give me more tips or help? Thank you",
    "url": "https://github.com/huggingface/transformers.js/issues/823",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-26T05:36:47Z",
    "updated_at": "2024-06-26T07:46:57Z",
    "user": "juntaosun"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 129542,
    "title": "How to Convert pytorch qat model to tensorrt",
    "body": "\r\nI find that the converted qat model in pytorch can't use GPU Kernel, But I don't find the function or ways to convert to tensorrt. How to Convert pytorch qat model to tensorrt?\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/129542",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-26T02:46:20Z",
    "updated_at": "2024-06-26T15:42:38Z",
    "user": "AnnaTrainingG"
  },
  {
    "repo": "pytorch/xla",
    "number": 7466,
    "title": "Register python implementation for the aten ops",
    "body": "## \u2753 Questions and Help\r\nCurrently `F.interpolate(mode='tilinear)'` will be dispatched to `aten::upsample_trilinear3d` which we don't have c++ lowering. There is a python decomp for this op in https://github.com/pytorch/pytorch/blob/ad76da6c16c5dc465e8aac8d913532251db7b400/torch/_decomp/decompositions.py#L3591-L3602 so I am wondering if there is way for PyTorch/XLA to register this python implementation directly.\r\n\r\nSimilar request for `scaled_dot_product_attention`, we have the Pallas based implementation in https://github.com/pytorch/xla/blob/master/torch_xla/experimental/custom_kernel.py#L162 for TPU but I don't know how to register this for PyTorch/XLA.\r\n\r\ncc @ezyang @bdhirsh @alband",
    "url": "https://github.com/pytorch/xla/issues/7466",
    "state": "closed",
    "labels": [
      "question",
      "lowering"
    ],
    "created_at": "2024-06-25T21:00:50Z",
    "updated_at": "2025-04-07T12:46:14Z",
    "user": "JackCaoG"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2955,
    "title": "\u2753 [Question] How do you compile a chunk operator with TensorRT?",
    "body": "## \u2753 Question\r\n\r\nHow do you compile a chunk operator with TensorRT? I have been trying a basic example in a Jupyter Notebook but get an unbroadcastable dimension error. The below code executes in PyTorch inference and torchscript, but cannot be compiled with TensorRT.\r\n\r\n## What you have already tried\r\n\r\n\r\n\r\n```import torch\r\nimport torch.nn as nn\r\nimport torch_tensorrt\r\ndevice = \"cuda\"\r\n\r\nclass TestModel(nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n    def forward(self, x, y):\r\n        y1, _ = y.chunk(2, dim=0) #y1.shape --> (1, 3)\r\n        return x + y1 #(2, 3) + (1, 3)\r\n        \r\nmodel = TestModel()\r\nmodel.eval()\r\n\r\nx = torch.randn((2, 3), device=device)\r\ny = torch.randn((2, 3), device=device)\r\n\r\nmodel(x, y)\r\n\r\ntraced_model = torch.jit.trace(model, (x, y))\r\n\r\ntrt_model = torch_tensorrt.compile(traced_model, \r\n    inputs=[torch_tensorrt.Input(shape=x.shape, dtype=torch.float32),\r\n    torch_tensorrt.Input(shape=y.shape, dtype=torch.float32)]\r\n    )\r\n```\r\n\r\nError messages:\r\n\r\n```ERROR: [Torch-TensorRT TorchScript Conversion Context] - ITensor::getDimensions: Error Code 4: Shape Error (broadcast dimensions must be conformable)\r\nERROR: [Torch-TensorRT TorchScript Conversion Context] - ITensor::getDimensions: Error Code 4: Shape Error (broadcast dimensions must be conformable)\r\nERROR: [Torch-TensorRT TorchScript Conversion Context] - IBuilder::buildSerializedNetwork: Error Code 4: Internal Error (%9 : Tensor = aten::add(%x, %y1, %3) # [...): IElementWiseLayer must have inputs with same dimensions or follow broadcast rules. Input dimensions were [2,3] and [1,0].)\r\n```\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.3.0\r\n - CPU Architecture:\r\n - OS (e.g., Linux): Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.10.14\r\n - CUDA version: 12.1\r\n - GPU models and configuration: A100\r\n - Any other relevant information:\r\n\r\nThank you for the help!\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2955",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-25T20:37:51Z",
    "updated_at": "2024-06-25T21:45:45Z",
    "user": "joshuageddes"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8700,
    "title": "[PAG] add `StableDiffusionXLControlNetPAGImg2ImgPipeline`",
    "body": "We recently integrated PAG into diffusers! See the PR here: https://github.com/huggingface/diffusers/pull/7944\r\n\r\nDoes anyone want to add a `StableDiffusionXLControlNetPAGImg2ImgPipeline`?\r\n1. You should put it under the [pag folder](https://github.com/huggingface/diffusers/tree/main/src/diffusers/pipelines/pag)\r\n2. you can use the implementation of [`StableDiffusionXLControlNetPAGPipeline`](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd_xl.py) and [`StableDiffusionXLPAGImg2ImgPipeline`](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pag/pipeline_pag_sd_xl_img2img.py) as reference\r\n3. you need to add AutoPipeline so that you can use this API to create it\r\n    ```python\r\n       AutoPipelineForImage2Image.from_pretrained(repo_id, controlnet=controlnet, enable_pag=True ...)\r\n   ```\r\n4. tests and docs \r\n",
    "url": "https://github.com/huggingface/diffusers/issues/8700",
    "state": "closed",
    "labels": [
      "good first issue",
      "help wanted",
      "contributions-welcome"
    ],
    "created_at": "2024-06-25T18:52:18Z",
    "updated_at": "2024-08-21T17:24:23Z",
    "comments": 6,
    "user": "yiyixuxu"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2779,
    "title": "what is the default tokenizer when \"No sentence-transformers model found with name\"?",
    "body": "I'm trying to use the sentence-transformer dangvantuan/sentence-camembert-large model and I'm getting a \"no model found\" error. This error is probably because some Sentence-Transformers-specific files are missing in their Huggingface (modules.json and config_sentence_transformers.json). \r\nBut then, Sentence Transformer warns it will create a new model with mean pooling, and this model performs really well on my data (!). \r\nSo, I would like to know what the tokeniser's model is when the model name hasn't been found? ",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2779",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-25T15:17:58Z",
    "updated_at": "2024-07-05T10:42:27Z",
    "user": "Hortatori"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2891,
    "title": "How to set a custom Config in python code using Accelerate?",
    "body": "Hello everyone!\r\n\r\nCould you please advise how to replace the console command for setting a config\r\n```\r\naccelerate launch --config_file {path/to/config/my_config_file.yaml} {script_name.py} {--arg1} {--arg2}\r\n```\r\nwith code in the Python file script_name.py?\r\n\r\nI am expecting something like the following functionality:\r\n```\r\nfrom accelerate import Accelerator\r\naccelerator = Accelerator()\r\naccelerator.set_config_file('path/to/config/my_config_file.yaml')\r\n```\r\n\r\nI would like to run the script through Python and use all the benefits of launching with the Accelerate launch command with config file:\r\n```\r\npython script_name.py\r\n```\r\n",
    "url": "https://github.com/huggingface/accelerate/issues/2891",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-25T11:56:10Z",
    "updated_at": "2024-10-07T15:08:01Z",
    "user": "konstantinator"
  },
  {
    "repo": "pytorch/ao",
    "number": 436,
    "title": "what if below condition? about OCP Microscaling",
    "body": "assume we have a  fp32 tensor like [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 127.99999], and set k to 32(default, convert to fp8 e5m2 mx block.\r\n\r\nbtw asfloat(0x42FFFFFF) = 127.9999f\r\n\r\nfrom current code, the max absolute value is 127.9999, the unbiased exponent is 6, minus emax.fp8_e5m2(which is 15), so the shared scale is 6 - 15 + 127 is 118.  \r\n\r\n127.9999/2^118 = 0x1.FFFFF7p+15, assume we use RN rounding mode, after rounding this value will convert to 0x2.0p+15(fp8 e5m2) which is large than the max normal representation of fp8 e5m2, so clamp to the max normal<OCP Microscaling Formats (MX) Specification Version 1.0. chapter 6.3>.\r\n\r\ncurrent code do as above, the log shows below:\r\n`tensor([  1.0000,   2.0000,   3.0000,   4.0000,   5.0000,   6.0000,   7.0000,\r\n          8.0000,   9.0000,  10.0000,  11.0000,  12.0000,  13.0000,  14.0000,\r\n         15.0000,  16.0000,  17.0000,  18.0000,  19.0000,  20.0000,  21.0000,\r\n         22.0000,  23.0000,  24.0000,  25.0000,  26.0000,  27.0000,  28.0000,\r\n         29.0000,  30.0000,  31.0000, **127.9999**], device='cuda:0')\r\nMXTensor: elem_dtype: torch.float8_e5m2, s_e8m0: tensor([118], device='cuda:0', dtype=torch.uint8), d: tensor([  512.,  1024.,  1536.,  2048.,  2560.,  3072.,  3584.,  4096.,  4096.,\r\n         5120.,  6144.,  6144.,  6144.,  7168.,  8192.,  8192.,  8192.,  8192.,\r\n        10240., 10240., 10240., 12288., 12288., 12288., 12288., 12288., 14336.,\r\n        14336., 14336., 16384., 16384., **57344.**], device='cuda:0',\r\n       dtype=torch.float8_e5m2), d_hp: tensor([  1.,   2.,   3.,   4.,   5.,   6.,   7.,   8.,   8.,  10.,  12.,  12.,\r\n         12.,  14.,  16.,  16.,  16.,  16.,  20.,  20.,  20.,  24.,  24.,  24.,\r\n         24.,  24.,  28.,  28.,  28.,  32.,  32., **112**.], device='cuda:0')`\r\n\r\nfrom above log, we see shared exp is 118, fp32 127.9999 convert to fp8 e5m2 57344. 112=2^(118-127)*57344 seems far less than 127.9999.\r\nbut if we add shred exp by 1 if max(abs)/scale are large than the max normal representation of fp8 e5m2 after rounding, which means shared_exp to 119, then 129.999 convert to fp8 e5m2 is 0x1.00p+15 = 32768, and 128 = 2^(119-127)*32768, seems more accurate than 112.\r\n\r\nbut this seems not compliance with mx1.0 spec, what we choose and why? anyone who can help me?\r\n\r\n",
    "url": "https://github.com/pytorch/ao/issues/436",
    "state": "closed",
    "labels": [
      "question",
      "mx"
    ],
    "created_at": "2024-06-25T08:37:17Z",
    "updated_at": "2024-07-05T16:31:23Z",
    "user": "avater210"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8693,
    "title": "SD3 + SDXL refine fix lying on grass. How to do in diffusers colab workflow?",
    "body": "this is comfy workflow \r\n![GQQC1T-aUAAXRDI](https://github.com/huggingface/diffusers/assets/151509142/15e3c420-3e14-4476-8a1a-4001934af158)\r\n\r\nhow can i do in diffusers colab workflow?",
    "url": "https://github.com/huggingface/diffusers/issues/8693",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-06-25T07:30:55Z",
    "updated_at": "2024-09-23T11:37:25Z",
    "user": "s9anus98a"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 2113,
    "title": "how to launch a service using downloaded model weights?",
    "body": "### System Info\r\n\r\nI have downloaded model weights of bge-models, and I want to launch a model service using TGI, the command is :\r\n```\r\nmodel=/storage/nfs2/ModelHub/embedding/BAAI/bge-small-zh-v1.5\r\nrevision=refs/pr/5\r\nvolume=$PWD/data # share a volume with the Docker container to avoid downloading weights every run\r\n\r\ndocker run --gpus all \\\r\n-p 3001:3001 -v $volume:/data text-embeddings-inference:1.2 \\\r\n--model-id $model --port 3001 --revision $revision\r\n```\r\nbut I got the follwing error:\r\n\r\n```\r\n2024-06-25T03:13:34.201754Z  INFO text_embeddings_router: router/src/main.rs:140: Args { model_id: \"BAA*/***-*****-**-v1.5\", revision: Some(\"refs/pr/5\"), tokenization_workers: None, dtype: None, pooling: None, max_concurrent_requests: 512, max_batch_tokens: 16384, max_batch_requests: None, max_client_batch_size: 32, auto_truncate: false, hf_api_token: None, hostname: \"54903bb17567\", port: 3001, uds_path: \"/tmp/text-embeddings-inference-server\", huggingface_hub_cache: Some(\"/data\"), payload_limit: 2000000, api_key: None, json_output: false, otlp_endpoint: None, cors_allow_origin: None }\r\n2024-06-25T03:13:34.201950Z  INFO hf_hub: /root/.cargo/git/checkouts/hf-hub-1aadb4c6e2cbe1ba/b167f69/src/lib.rs:55: Token file not found \"/root/.cache/huggingface/token\"\r\n2024-06-25T03:13:36.546198Z  INFO download_artifacts: text_embeddings_core::download: core/src/download.rs:20: Starting download\r\nError: Could not download model artifacts\r\n\r\nCaused by:\r\n    0: request error: error sending request for url (https://huggingface.co/BAAI/bge-large-zh-v1.5/resolve/refs%2Fpr%2F5/config.json): error trying to connect: Connection reset by peer (os error 104)\r\n    1: error sending request for url (https://huggingface.co/BAAI/bge-large-zh-v1.5/resolve/refs%2Fpr%2F5/config.json): error trying to connect: Connection reset by peer (os error 104)\r\n    2: error trying to connect: Connection reset by peer (os error 104)\r\n    3: Connection reset by peer (os error 104)\r\n    4: Connection reset by peer (os error 104)\r\n```\r\nIt seems to download model from huggingface but I want to use my private model weight.\r\nmy privatre weight:\r\n\r\n```\r\n>> ls /storage/nfs2/ModelHub/embedding/BAAI/bge-small-zh-v1.5\r\n1_Pooling                          model.safetensors  README.md                  tokenizer_config.json\r\nconfig.json                        modules.json       sentence_bert_config.json  tokenizer.json\r\nconfig_sentence_transformers.json  pytorch_model.bin  special_tokens_map.json    vocab.txt\r\n```\r\n\r\n\r\n### Information\r\n\r\n- [X] Docker\r\n- [ ] The CLI directly\r\n\r\n### Tasks\r\n\r\n- [X] An officially supported command\r\n- [ ] My own modifications\r\n\r\n### Reproduction\r\n\r\ndocker run --gpus all \\\r\n-p 3001:3001 -v $volume:/data text-embeddings-inference:1.2 \\\r\n--model-id $model --port 3001 --revision $revision\r\n\r\n### Expected behavior\r\n\r\nluanch the service successfully",
    "url": "https://github.com/huggingface/text-generation-inference/issues/2113",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-25T03:18:14Z",
    "updated_at": "2024-06-28T03:50:10Z",
    "user": "chenchunhui97"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1302,
    "title": "Assistant feature: Send user query as part of template variable GET request",
    "body": "Trying to integrate RAG as an assistant. Thinking of using a template variable that makes a GET request (with the prompt as the request body), to get the relevant documents as context. Is this possible (i.e. there is a special variable in the system prompt page for the user query), or is there a better way of doing this?",
    "url": "https://github.com/huggingface/chat-ui/issues/1302",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-24T22:27:02Z",
    "updated_at": "2025-01-02T12:09:23Z",
    "comments": 2,
    "user": "ethayu"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8683,
    "title": "Why do Diffusers schedulers produce lower quality outputs compared to ComfyUI?",
    "body": "### Discussed in https://github.com/huggingface/diffusers/discussions/8682\r\n\r\n<sup>Originally posted by **nducthang** June 24, 2024</sup>\r\nHi,\r\n\r\nI'm encountering an issue when comparing the quality of ComfyUI and Diffusers. I've noticed that the output of Diffusers is consistently lower than ComfyUI in many cases, despite using the same settings and seed. For the base Diffusers, I've utilized: https://github.com/huggingface/diffusers/blob/main/examples/community/lpw_stable_diffusion_xl.py.\r\n\r\nUpon closer inspection, I've identified differences in the scheduler/ksampler between the two base codes. I've also observed variations in CLIP Embedding between the two base codes, but in my experiments, this hasn't significantly impacted the output. The main issue seems to lie with the KSampler.\r\n\r\nHas anyone else encountered this issue or have any ideas on improving the Scheduler algorithm of Diffusers?\r\n\r\nHere are some prompts I've experimented:\r\nModel: RVXL - Size: (896, 1152)\r\nPositive prompt:\r\n```\r\nfemale, attractive woman, pretty middle-aged woman, thick hair, (((Caucasian, European, Scandinavian female))), ((hazel eyes, HazelEyed)). (Brunette (Light-Brown-Hair)), ((((long rectangular face, elongated face, oblong face shape, angular chiseled face)), ((wide jaw, big strong chin)))). (((1980s magazine advertisement. Living room. CRT Televesion. 1980s aesthetic. 1980s interior design.))) [object Object] . high quality, dim lighting, soft lighting, sharp focus, f5.6, dslr, High Detail, detailed, ((wide shot))\r\n```\r\nNegative prompt:\r\n```\r\n(((male))), (small chin, receding-chin, puffy face), (((Asian, Chinese, Korean, Japanese, Indian, Pakistani, Black, African, Persian, Arab, Middle Eastern, Hispanic, Latino))), (small chin, receding-chin, puffy face), (blurry), (BadDream:1.2), (UnrealisticDream:1.2), ((bad-hands-5)), (strabismus, cross-eyed:1.2), (signature, watermark, name), (worst quality, poor quality, low quality), ((deformed)), (extra limbs), (extra arms), (extra legs), disfigured, malformed, (nude:1.4), (naked:1.4), (nsfw:1.4), (bikini:1.4), (lingerie:1.4), (underwear:1.4), (teen:1.4), (tween:1.4), (teenage:1.4), (kid:1.6), (child:1.6), (topless, shirtless:1.4), (((greyscale))), (cleavage:1.2), (nipples:1.4)\r\n```",
    "url": "https://github.com/huggingface/diffusers/issues/8683",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-24T14:37:19Z",
    "updated_at": "2024-06-25T06:06:12Z",
    "comments": 20,
    "user": "nducthang"
  },
  {
    "repo": "pytorch/serve",
    "number": 3204,
    "title": "WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.",
    "body": "Hi, I've been running models with Torchserve 0.11.0 on Sagemaker and noticed following warning:\r\n`WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.` when starting the Torchserve. \r\n\r\nI read that this method was removed in Java8 (https://stackoverflow.com/questions/23808803/sun-reflect-reflection-getcallerclass-alternative?noredirect=1&lq=1). How does lack of support for this method affect performance? What is required to get rid of this warning when running torchserve? \r\n\r\n",
    "url": "https://github.com/pytorch/serve/issues/3204",
    "state": "open",
    "labels": [
      "java"
    ],
    "created_at": "2024-06-24T13:58:02Z",
    "updated_at": "2024-06-26T21:20:17Z",
    "comments": 1,
    "user": "aalbersk"
  },
  {
    "repo": "pytorch/ao",
    "number": 430,
    "title": "Understanding 8da4w",
    "body": "Hi there,\r\n\r\nI'm new to quantization. From my understanding, \"8da4w\" means that the weights are pre-quantized to 4 bits, and the activations are quantized to 8 bits at runtime. Following this, the GEMM (General Matrix Multiply) operation between weights and activations is computed in the `int8` data type. Do I have this correct?\r\n\r\nHowever, I'm confused by the code for `Int8DynActInt4WeightQuantizer`. The `forward` method of `Int8DynActInt4WeightLinear` calls a method named `per_token_dynamic_quant`, which can be found [here](https://github.com/pytorch/ao/blob/fd9f95d614fa03f09d85d73a2c2740cc647d7b9b/torchao/quantization/utils.py#L436-L458). In this method, the input is first quantized to `int8` and then immediately converted back to its original data type without further processing. I don't understand the purpose of this function. Furthermore, I have launched a program using `Int8DynActInt4WeightQuantizer ` and observed the data types of `x` and `w_dq` in the method `linear_forward_8da4w`, which can be found [here](https://github.com/pytorch/ao/blob/fd9f95d614fa03f09d85d73a2c2740cc647d7b9b/torchao/quantization/GPTQ.py#L800), they both are `float32`. This seems to contradict my understanding of the computations involved in '8da4w'.\r\n\r\nI realize that I'm likely missing some fundamental aspects of dynamic quantization. Could anyone kindly clarify this process for me?\r\n\r\nThank you!",
    "url": "https://github.com/pytorch/ao/issues/430",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-24T08:43:44Z",
    "updated_at": "2024-07-23T17:32:41Z",
    "user": "DzAvril"
  },
  {
    "repo": "pytorch/vision",
    "number": 8503,
    "title": "Can we add datatype support for examples under references",
    "body": "### \ud83d\ude80 The feature\n\ncurrently the examples under references only support default datatype (float32), can we support a argument like --data-type to allow user to specify the datatype for the model?\n\n### Motivation, pitch\n\nMany users like us always need to run different dataytpye for the model. like float16 and bfloat16. If this argument can be added, it will save many efforts.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/8503",
    "state": "open",
    "labels": [],
    "created_at": "2024-06-24T03:29:04Z",
    "updated_at": "2024-07-12T15:09:10Z",
    "comments": 2,
    "user": "wincent8"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 174,
    "title": "Question about torch_dtype when runnging run_orpo.py",
    "body": "I have been using `run_orpo.py` with my personal data successfully. However, as I use it, I have a question.\r\n\r\nWhen I look at the code for `run_orpo.py`, I see that there is a code to match torch_dtype to the dtype of the pretrained model. However, when I actually train and save the model, even if the pretrained model's dtype was `bf16`, it gets changed to `fp32`. Why is this happening?",
    "url": "https://github.com/huggingface/alignment-handbook/issues/174",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-23T08:28:02Z",
    "updated_at": "2024-07-30T05:05:03Z",
    "comments": 6,
    "user": "sylee96"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8666,
    "title": "Attention api changes no documentation ? ",
    "body": "how can i see ur previous changes on attention ? \r\n\r\nu have rename`` _slice_size , _sliced_attention and _attention``  attribute from attention \r\n\r\nneed to know what are alternative using of its ? ",
    "url": "https://github.com/huggingface/diffusers/issues/8666",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-23T07:08:58Z",
    "updated_at": "2024-06-23T11:31:47Z",
    "comments": 4,
    "user": "xalteropsx"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 819,
    "title": "Blog on walkthrough with transformers js",
    "body": "### Question\n\nHey, So I am writing this blog part of sharing knowledge in a blog series called Running AI/ML in the client. I am using transformer js example walkthrough in this part to validate some concepts. Can I get some feedback before it goes live? How do we connect?",
    "url": "https://github.com/huggingface/transformers.js/issues/819",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-23T06:06:42Z",
    "updated_at": "2024-06-27T19:10:05Z",
    "user": "ArijitCloud"
  },
  {
    "repo": "huggingface/trl",
    "number": 1763,
    "title": "What is the difference between PPOv2Trainer and PPOTrainer?",
    "body": "What is the difference between PPOv2Trainer and PPOTrainer?  And in trl\\examples\\scripts\\ppo\\ppo.py and trl\\examples\\scripts\\ppo.py , there are two dpo.py files, can you tell me what is different between them?",
    "url": "https://github.com/huggingface/trl/issues/1763",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-22T14:48:38Z",
    "updated_at": "2024-08-24T09:25:52Z",
    "user": "mst272"
  },
  {
    "repo": "pytorch/xla",
    "number": 7326,
    "title": "dear teachers, i can connect the internet, but i can not download it the torch_xla",
    "body": "pip install torch_xla[tpu]~=2.3.0 -f https://storage.googleapis.com/libtpu-releases/index.html\r\n\r\nERROR: Could not find a version that satisfies the requirement torch_xla~=2.3.0 (from versions: none)\r\nERROR: No matching distribution found for torch_xla~=2.3.0\r\n",
    "url": "https://github.com/pytorch/xla/issues/7326",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-21T07:42:57Z",
    "updated_at": "2025-04-07T12:58:54Z",
    "user": "zhangwaer"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8649,
    "title": "SD3 - num_images_per_prompt no longer honoured (throws error)",
    "body": "### Describe the bug\n\nWith models prior to SD3, the parameter num_images_per_prompt is honoured, enabling generation of several images per prompt. With sd3-medium an error is generated.\r\nRuntimeError: Sizes of tensors must match except in dimension 1. Expected size 2 but got size 1 for tensor number 1 in the list.\r\nNote: I have insufficient VRAM to run tests without clearing text_encoder_3 and tokenizer_3 and am not sure how to use the \r\nsd3_medium_incl_clips_t5xxlfp8.safetensors variant in a normal diffusers workflow.  It is always possible that clearing the T5-xxl has a side-effect of breaking num_images_per_prompt.\n\n### Reproduction\n\n```\r\nimport torch\r\nfrom diffusers import StableDiffusion3Pipeline\r\n\r\npipe = StableDiffusion3Pipeline.from_pretrained(\r\n    \"stabilityai/stable-diffusion-3-medium-diffusers\",\r\n    text_encoder_3=None,\r\n    tokenizer_3=None,\r\n    torch_dtype=torch.float16\r\n)\r\npipe.to(\"cuda\")\r\n\r\nimage = pipe(\r\n    \"A cat holding a sign that says hello world\",\r\n    negative_prompt=\"\",\r\n    num_inference_steps=28,\r\n    num_images_per_prompt=2,\r\n    guidance_scale=7.0,\r\n).images[0]\r\nimage.save(\"sd3_hello_world-no-T5.png\")\r\n```\n\n### Logs\n\n```shell\nTraceback (most recent call last):\r\n  File \"/home/developer/src/hug_test_txt2img_sd3.py\", line 12, in <module>\r\n    image = pipe(\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py\", line 115, in decorate_context\r\n    return func(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3.py\", line 778, in __call__\r\n    ) = self.encode_prompt(\r\n  File \"/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3.py\", line 413, in encode_prompt\r\n    prompt_embeds = torch.cat([clip_prompt_embeds, t5_prompt_embed], dim=-2)\r\nRuntimeError: Sizes of tensors must match except in dimension 1. Expected size 2 but got size 1 for tensor number 1 in the list.\n```\n\n\n### System Info\n\n- \ud83e\udd17 Diffusers version: 0.29.0\r\n- Platform: Linux-6.8.0-35-generic-x86_64-with-glibc2.35\r\n- Running on a notebook?: No\r\n- Running on Google Colab?: No\r\n- Python version: 3.10.12\r\n- PyTorch version (GPU?): 2.3.1+cu121 (True)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Huggingface_hub version: 0.23.4\r\n- Transformers version: 4.41.2\r\n- Accelerate version: 0.31.0\r\n- PEFT version: 0.11.1\r\n- Bitsandbytes version: not installed\r\n- Safetensors version: 0.4.3\r\n- xFormers version: 0.0.27+133d7f1.d20240619\r\n- Accelerator: NVIDIA GeForce RTX 3060, 12288 MiB VRAM\r\n- Using GPU in script?: yes\r\n- Using distributed or parallel set-up in script?: no\r\n\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/8649",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-06-20T11:28:22Z",
    "updated_at": "2024-06-29T13:05:28Z",
    "comments": 4,
    "user": "zagglez"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 814,
    "title": "Consultation on the use of the library with chatbot models",
    "body": "### Question\n\nHello, Greetings Vladimir, programmer in a web environment with PHP, JS, AJAX, first I apologize for my English, my native language is Latin Spanish, I am not very good at writing it, I have used a translator, I wanted to consult, how can I use this interesting and useful tool, to be able to create a chatbot that can respond with personalized information from PDFs, the query is more like using the library, how to use the models both from Hugging Face and downloaded from the script that you share in the documentation and which models would be the most useful for this task considering that you will have to speak in Spanish, I remain attentive",
    "url": "https://github.com/huggingface/transformers.js/issues/814",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-20T03:24:34Z",
    "updated_at": "2024-07-29T10:47:24Z",
    "user": "mate07"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 412,
    "title": "ImportError in LLaMA Training Script",
    "body": "When attempting to run the training script for LLaMA with the following command:\r\n`CONFIG_FILE=\"./train_configs/llama3_8b.toml\" ./run_llama_train.sh`\r\nan ImportError is encountered. The specific error message is:\r\n`ImportError: cannot import name 'Partial' from 'torch.distributed._tensor' (/apps/torchtitan/torchtitan/lib/python3.10/site-packages/torch/distributed/_tensor/__init__.py)`\r\n\r\nThe training script should start without any import errors and utilize the specified configuration file to train the model across 8 GPUs.\r\n\r\nThe script fails to run due to an ImportError indicating that Partial cannot be imported from torch.distributed._tensor. The error traceback is as follows:\r\n`Traceback (most recent call last):\r\n  File \"/apps/torchtitan/train.py\", line 34, in <module>\r\n    from torchtitan.models import model_name_to_cls, model_name_to_tokenizer, models_config\r\n  File \"/apps/torchtitan/torchtitan/models/__init__.py\", line 7, in <module>\r\n    from torchtitan.models.llama import llama2_configs, llama3_configs, Transformer\r\n  File \"/apps/torchtitan/torchtitan/models/llama/__init__.py\", line 10, in <module>\r\n    from torchtitan.models.llama.model import ModelArgs, Transformer\r\n  File \"/apps/torchtitan/torchtitan/models/llama/model.py\", line 17, in <module>\r\n    from torchtitan.models.norms import create_norm\r\n  File \"/apps/torchtitan/torchtitan/models/norms.py\", line 17, in <module>\r\n    from torch.distributed._tensor import Partial, Replicate, Shard\r\nImportError: cannot import name 'Partial' from 'torch.distributed._tensor' (/apps/torchtitan/torchtitan/lib/python3.10/site-packages/torch/distributed/_tensor/__init__.py)\r\n`",
    "url": "https://github.com/pytorch/torchtitan/issues/412",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-19T17:45:48Z",
    "updated_at": "2024-07-12T16:06:10Z",
    "user": "viai957"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1912,
    "title": "Could you provide the official onnx model of Qwen-VL-Chat(-Int4)?",
    "body": "### Feature request\n\nQwen-VL-Chat(-Int4) is useful to image-to-text model.\n\n### Motivation\n\nThe image-to-text LMM model just like Qwen-VL-Chat(-Int4) is very useful.\n\n### Your contribution\n\nNot yet.",
    "url": "https://github.com/huggingface/optimum/issues/1912",
    "state": "open",
    "labels": [
      "feature-request",
      "quantization"
    ],
    "created_at": "2024-06-19T08:43:58Z",
    "updated_at": "2024-10-09T07:52:54Z",
    "comments": 0,
    "user": "yzq1990"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2940,
    "title": "\u2753 [Question] Is there any plan to support bfloat16 compile",
    "body": "## What you have already tried\r\n\r\nThe nvidia tensorrt has already support the `bf16` precision after tensorrt>=9.2:\r\n\r\n- https://github.com/NVIDIA/TensorRT/issues/1883\r\n- https://github.com/AmusementClub/vs-mlrt/issues/64\r\n\r\nHowever, the latest torch_tensorrt (`torch_tensorrt==2.3.0 w/ tensorrt==10.0.1`) has not support this.\r\n\r\nIs there any plan to support bfloat16 in future verisons? The bf16 is very popular in the LLM inference.\r\n\r\n```python\r\ntrt_model = torch_tensorrt.compile(\r\n    module=torch.jit.script(model),\r\n    inputs=[torch_tensorrt.Input(shape=(bs, seq, dim), dtype=torch.bfloat16)],\r\n    enabled_precisions={torch.int8, torch.bfloat16, torch.float32},\r\n    calibrator=calibrator,\r\n    device={\r\n        \"device_type\": torch_tensorrt.DeviceType.GPU,\r\n        \"gpu_id\": 0,\r\n        \"dla_core\": 0,\r\n        \"allow_gpu_fallback\": True,\r\n        \"disable_tf32\": True,\r\n    },\r\n)\r\n```\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/data01/home/zhanglei.me/workspace/tensorrt_example/example_int8.py\", line 38, in <module>\r\n    trt_model = torch_tensorrt.compile(\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch_tensorrt/_compile.py\", line 208, in compile\r\n    compiled_ts_module: torch.jit.ScriptModule = torchscript_compile(\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch_tensorrt/ts/_compiler.py\", line 151, in compile\r\n    compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch_tensorrt/ts/_compile_spec.py\", line 208, in _parse_compile_spec\r\n    dtype=i.dtype.to(_C.dtype),\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch_tensorrt/_enums.py\", line 305, in to\r\n    raise TypeError(\r\nTypeError: Provided an unsupported data type as an input data type (support: bool, int32, long, half, float), got: dtype.bf16\r\n```\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.3.1\r\n - CPU Architecture: x86\r\n - OS (e.g., Linux): linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip3 install torch_tensorrt==2.3.0 tensorrt==10.0.1\r\n - Build command you used (if compiling from source): no\r\n - Are you using local sources or building from archives: no\r\n - Python version: 3.10\r\n - CUDA version: 12.2\r\n - GPU models and configuration: Nvidia A100\r\n - Any other relevant information:",
    "url": "https://github.com/pytorch/TensorRT/issues/2940",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-19T06:05:30Z",
    "updated_at": "2024-06-25T04:39:59Z",
    "user": "leeeizhang"
  },
  {
    "repo": "pytorch/serve",
    "number": 3195,
    "title": "How to send a torch array via request",
    "body": "I want to send a torch (cuda) array via python request to the inference API. Is that possible?",
    "url": "https://github.com/pytorch/serve/issues/3195",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-18T21:05:58Z",
    "updated_at": "2024-06-19T19:21:59Z",
    "user": "lschaupp"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8626,
    "title": "More thorough guidance for multiple IP adapter images/masks and a single IP Adapter",
    "body": "### Describe the bug\r\n\r\nI'm trying to use a single IP adapter with multiple IP adapter images and masks. This section of the docs gives an example of how I could do that: https://huggingface.co/docs/diffusers/v0.29.0/en/using-diffusers/ip_adapter#ip-adapter-masking\r\n\r\nThe docs provide the following code:\r\n```python\r\nfrom diffusers.image_processor import IPAdapterMaskProcessor\r\n\r\nmask1 = load_image(\"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ip_mask_mask1.png\")\r\nmask2 = load_image(\"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ip_mask_mask2.png\")\r\n\r\noutput_height = 1024\r\noutput_width = 1024\r\n\r\nprocessor = IPAdapterMaskProcessor()\r\nmasks = processor.preprocess([mask1, mask2], height=output_height, width=output_width)\r\n\r\npipeline.load_ip_adapter(\"h94/IP-Adapter\", subfolder=\"sdxl_models\", weight_name=[\"ip-adapter-plus-face_sdxl_vit-h.safetensors\"])\r\npipeline.set_ip_adapter_scale([[0.7, 0.7]])  # one scale for each image-mask pair\r\n\r\nface_image1 = load_image(\"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ip_mask_girl1.png\")\r\nface_image2 = load_image(\"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ip_mask_girl2.png\")\r\n\r\nip_images = [[face_image1, face_image2]]\r\n\r\nmasks = [masks.reshape(1, masks.shape[0], masks.shape[2], masks.shape[3])]\r\n\r\ngenerator = torch.Generator(device=\"cpu\").manual_seed(0)\r\nnum_images = 1\r\n\r\nimage = pipeline(\r\n    prompt=\"2 girls\",\r\n    ip_adapter_image=ip_images,\r\n    negative_prompt=\"monochrome, lowres, bad anatomy, worst quality, low quality\",\r\n    num_inference_steps=20,\r\n    num_images_per_prompt=num_images,\r\n    generator=generator,\r\n    cross_attention_kwargs={\"ip_adapter_masks\": masks}\r\n).images[0]\r\n```\r\n\r\nOne important point that should be highlighted is that images/scales/masks must be _lists of lists_ , otherwise we get the following error: `Cannot assign 2 scale_configs to 1 IP-Adapter`. \r\n\r\nThat error message is intuitive enough, however this gets confusing in other sections of the documentation, such as the `set_ip_adapter_scale()` function:\r\n```python\r\n# To use original IP-Adapter\r\nscale = 1.0\r\npipeline.set_ip_adapter_scale(scale)\r\n\r\n# To use style block only\r\nscale = {\r\n    \"up\": {\"block_0\": [0.0, 1.0, 0.0]},\r\n}\r\npipeline.set_ip_adapter_scale(scale)\r\n\r\n# To use style+layout blocks\r\nscale = {\r\n    \"down\": {\"block_2\": [0.0, 1.0]},\r\n    \"up\": {\"block_0\": [0.0, 1.0, 0.0]},\r\n}\r\npipeline.set_ip_adapter_scale(scale)\r\n\r\n# To use style and layout from 2 reference images\r\nscales = [{\"down\": {\"block_2\": [0.0, 1.0]}}, {\"up\": {\"block_0\": [0.0, 1.0, 0.0]}}]\r\npipeline.set_ip_adapter_scale(scales)\r\n```\r\n\r\nIs it possible to use the style and layout from 2 reference images _with a single IP Adapter_?\r\nI tried doing something like the following, which _builds on the knowledge of needing to use a list of lists_:\r\n```python\r\n# List of lists to support multiple images/scales/masks with a single IP Adapter\r\nscales = [[{\"down\": {\"block_2\": [0.0, 1.0]}}, {\"up\": {\"block_0\": [0.0, 1.0, 0.0]}}]]\r\npipeline.set_ip_adapter_scale(scales)\r\n\r\n# OR\r\n\r\n# Use layout and style from InstantStyle for one image, but also use a numerical scale value for the other\r\nscale = {\r\n    \"down\": {\"block_2\": [0.0, 1.0]},\r\n    \"up\": {\"block_0\": [0.0, 1.0, 0.0]},\r\n}\r\npipeline.set_ip_adapter_scale([[0.5, scale]])\r\n```\r\n\r\nbut I get the following error:\r\n```\r\nTypeError: unsupported operand type(s) for *: 'dict' and 'Tensor'\\n\r\nAt:\r\n /usr/local/lib/python3.10/dist-packages/diffusers/models/attention_processor.py(2725): __call__\r\n/usr/local/lib/python3.10/dist-packages/diffusers/models/attention_processor.py(549): forward\r\n/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py(1527): _call_impl\r\n/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py(1518): _wrapped_call_impl\\n  /usr/local/lib/python3.10/dist-packages/diffusers/models/attention.py(366): forward\\n  /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py(1527): _call_impl\\n  /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py(1518): _wrapped_call_impl\\n  /usr/local/lib/python3.10/dist-packages/diffusers/models/transformers/transformer_2d.py(440): forward\\n  /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py(1527): _call_impl\\n  /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py(1518): _wrapped_call_impl\\n  /usr/local/lib/python3.10/dist-packages/diffusers/models/unets/unet_2d_blocks.py(1288): forward\\n  /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py(1527): _call_impl\\n  /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py(1518): _wrapped_call_impl\\n  /usr/local/lib/python3.10/dist-packages/diffusers/models/unets/unet_2d_condition.py(1220): forward\\n  /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py(1527): _call_impl\\n  /usr/local/lib/python3.10/dist-packages/torch/nn/mod",
    "url": "https://github.com/huggingface/diffusers/issues/8626",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-06-18T18:06:37Z",
    "updated_at": "2024-09-23T11:36:10Z",
    "comments": 11,
    "user": "chrismaltais"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2939,
    "title": "[BUG] - is torch.compile necessary to use user defined triton kernel ",
    "body": "### Add Link\n\nhttps://pytorch.org/tutorials/recipes/torch_compile_user_defined_triton_kernel_tutorial.html\n\n### Describe the bug\n\ni think we can call triton kernel with torch.compile\r\nwhat we get when call triton kernel through torch.compile?\n\n### Describe your environment\n\nnone\n\ncc @williamwen42 @msaroufim",
    "url": "https://github.com/pytorch/tutorials/issues/2939",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "torch.compile"
    ],
    "created_at": "2024-06-18T16:12:15Z",
    "updated_at": "2024-06-18T16:41:31Z",
    "user": "felixdae"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6979,
    "title": "How can I load partial parquet files only?",
    "body": "I have a HUGE dataset about 14TB, I unable to download all parquet all. I just take about 100 from it.\r\n\r\ndataset = load_dataset(\"xx/\", data_files=\"data/train-001*-of-00314.parquet\")\r\n\r\nHow can I just using 000 - 100 from a 00314 from all partially?\r\n\r\nI search whole net didn't found a solution, **this is stupid if they didn't support it, and I swear I wont using stupid parquet any more**\r\n",
    "url": "https://github.com/huggingface/datasets/issues/6979",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-18T15:44:16Z",
    "updated_at": "2024-06-21T17:09:32Z",
    "comments": 12,
    "user": "lucasjinreal"
  },
  {
    "repo": "pytorch/vision",
    "number": 8497,
    "title": "Improve empty import time of torchvision",
    "body": "### \ud83d\ude80 The feature\n\nWhen importing torchvision, a number of libraries are imported by default for more niche functionality of the library. To improve import time, I would favor delaying those imports to when they are needed\n\n### Motivation, pitch\n\nIn my case, it is the av library in particular that contributes to the import time: \r\n<img width=\"2087\" alt=\"image\" src=\"https://github.com/pytorch/vision/assets/2241296/2af05ab0-f97c-44bd-b7f2-fd5111f747d7\">\r\n\r\n(this assumes that torch, dynamo and onnx are already imported). \r\n\r\nThe import of `av` can easily be avoided as it is not needed by default. \n\n### Alternatives\n\n_No response_\n\n### Additional context\n\nI checked the code and I found this code here: \r\n\r\n```\r\ntry:\r\n    import av\r\n\r\n    av.logging.set_level(av.logging.ERROR)\r\n    if not hasattr(av.video.frame.VideoFrame, \"pict_type\"):\r\n        av = ImportError(\r\n            \"\"\"\\\r\nYour version of PyAV is too old for the necessary video operations in torchvision.\r\nIf you are on Python 3.5, you will have to build from source (the conda-forge\r\npackages are not up-to-date).  See\r\nhttps://github.com/mikeboers/PyAV#installation for instructions on how to\r\ninstall PyAV on your system.\r\n\"\"\"\r\n        )\r\nexcept ImportError:\r\n    av = ImportError(\r\n        \"\"\"\\\r\nPyAV is not installed, and is necessary for the video operations in torchvision.\r\nSee https://github.com/mikeboers/PyAV#installation for instructions on how to\r\ninstall PyAV on your system.\r\n\"\"\"\r\n    )\r\n```\r\n\r\nThe `pict_type` got added somewhere in the 0.5 range (released around 2020), 6.0 followed shortly. So I would suggest to change this test to not import av but the use `importlib` to check the version which would make this go away. This applies both to `torchvision/io/video_reader.py` as well as `torchvision/io/video.py`. I also wonder whether the logging call is still required given so much has changed since this code was written. ",
    "url": "https://github.com/pytorch/vision/issues/8497",
    "state": "open",
    "labels": [],
    "created_at": "2024-06-18T09:24:43Z",
    "updated_at": "2024-07-29T12:02:13Z",
    "comments": 3,
    "user": "bschindler"
  },
  {
    "repo": "huggingface/pytorch-image-models",
    "number": 2211,
    "title": "How to Replicate Official Model Accuracy",
    "body": "Based on the accuracy provided by the official source, how can one replicate and train these models? \r\n\r\nFor example, for mobilenetv4_hybrid_large.e600_r384_in1k with a top-1 accuracy of 84.266\r\n\r\nwhere can one find the training hyperparameters such as epochs, scheduler, warmup epochs, learning rate, batch size, and other parameters to replicate the model's performance?",
    "url": "https://github.com/huggingface/pytorch-image-models/issues/2211",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-06-18T05:30:59Z",
    "updated_at": "2024-06-24T23:36:45Z",
    "user": "usergxx"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1290,
    "title": "ERROR:    Exception in ASGI application",
    "body": "Hello everyone, I have the following problem when using Huggingface ChatUI with FastChat. How can I change the configuration? Use npm to start development mode.\r\nThanks\r\n```\r\nMODELS=`[\r\n  {\r\n    \"name\": \"Infinirc-7b-Llama2\",\r\n    \"id\": \"Infinirc-7b-Llama2\",\r\n    \"model\": \"Infinirc-7b-Llama2\",\r\n    \"parameters\": {\r\n      \"temperature\": 0.9,\r\n      \"top_p\": 0.95,\r\n      \"repetition_penalty\": 1.2,\r\n      \"top_k\": 50,\r\n      \"truncate\": 1000,\r\n      \"max_new_tokens\": 1024,\r\n      \"stop\": []\r\n    },\r\n    \"endpoints\": [{\r\n      \"type\" : \"openai\",\r\n      \"baseURL\": \"http://69.30.85.183:22152/v1\",\r\n      \r\n      \"accessToken\": \"x\"\r\n\r\n    }]\r\n  }\r\n]`\r\n```\r\n\r\nFastChat:\r\n```\r\n`2024-06-18 01:07:42 | INFO | stdout | INFO:     59.125.15.126:60166 - \"POST /v1/chat/completions HTTP/1.1\" 500 Internal Server Error\r\n2024-06-18 01:07:42 | ERROR | stderr | ERROR:    Exception in ASGI application\r\n2024-06-18 01:07:42 | ERROR | stderr | Traceback (most recent call last):\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/httptools_impl.py\", line 399, in run_asgi\r\n2024-06-18 01:07:42 | ERROR | stderr |     result = await app(  # type: ignore[func-returns-value]\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py\", line 70, in __call__\r\n2024-06-18 01:07:42 | ERROR | stderr |     return await self.app(scope, receive, send)\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/fastapi/applications.py\", line 1054, in __call__\r\n2024-06-18 01:07:42 | ERROR | stderr |     await super().__call__(scope, receive, send)\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/applications.py\", line 123, in __call__\r\n2024-06-18 01:07:42 | ERROR | stderr |     await self.middleware_stack(scope, receive, send)\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py\", line 186, in __call__\r\n2024-06-18 01:07:42 | ERROR | stderr |     raise exc\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py\", line 164, in __call__\r\n2024-06-18 01:07:42 | ERROR | stderr |     await self.app(scope, receive, _send)\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py\", line 85, in __call__\r\n2024-06-18 01:07:42 | ERROR | stderr |     await self.app(scope, receive, send)\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py\", line 65, in __call__\r\n2024-06-18 01:07:42 | ERROR | stderr |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py\", line 64, in wrapped_app\r\n2024-06-18 01:07:42 | ERROR | stderr |     raise exc\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py\", line 53, in wrapped_app\r\n2024-06-18 01:07:42 | ERROR | stderr |     await app(scope, receive, sender)\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/routing.py\", line 756, in __call__\r\n2024-06-18 01:07:42 | ERROR | stderr |     await self.middleware_stack(scope, receive, send)\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/routing.py\", line 776, in app\r\n2024-06-18 01:07:42 | ERROR | stderr |     await route.handle(scope, receive, send)\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/routing.py\", line 297, in handle\r\n2024-06-18 01:07:42 | ERROR | stderr |     await self.app(scope, receive, send)\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/routing.py\", line 77, in app\r\n2024-06-18 01:07:42 | ERROR | stderr |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py\", line 64, in wrapped_app\r\n2024-06-18 01:07:42 | ERROR | stderr |     raise exc\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py\", line 53, in wrapped_app\r\n2024-06-18 01:07:42 | ERROR | stderr |     await app(scope, receive, sender)\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/starlette/routing.py\", line 72, in app\r\n2024-06-18 01:07:42 | ERROR | stderr |     response = await func(request)\r\n2024-06-18 01:07:42 | ERROR | stderr |   File \"/usr/local/lib/python3.10/dist-packages/fastapi/routing.py\", line 278, in app\r\n2024-06-18 01:07:42 | ERROR | stderr |     raw_response = await run_endpoint_function(\r\n2024-06-18 01:07:42 | ERRO",
    "url": "https://github.com/huggingface/chat-ui/issues/1290",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-06-18T02:07:50Z",
    "updated_at": "2024-06-23T13:26:59Z",
    "comments": 1,
    "user": "rickychen-infinirc"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 684,
    "title": "Where is the fine-tuned model output?",
    "body": "I\u2019m new to using AutoTrain on Hugging Face and I encountered an issue during my first attempt at fine-tuning a model. I have a free account, because I want to see whether I can get something to work before I start paying for training. Here\u2019s a summary of what I did and the problem I\u2019m facing:\r\nTraining Configuration:\r\nI trained using Mistral-7B-Instruct-v0.2 and also openai-community/gpt2.\r\nDataset: I uploaded a tiny JSONL file (24 records) with a single \u201ctext\u201d field for training.\r\nTraining Parameters: I set the training to run for one epoch.\r\nTraining Process:\r\nThe training ran for a couple of seconds.\r\nI received a message that the space was paused, which I assumed meant the training had completed.\r\nIssue:\r\nAfter the training supposedly completed, I can\u2019t find any output files or trained models.\r\nI checked all available tabs and sections in the AutoTrain interface but didn\u2019t see anything labeled \u201cModels,\u201d \u201cArtifacts,\u201d \u201cResults,\u201d or similar.\r\nI reviewed the logs but didn\u2019t find any clear indications of where the output is stored.\r\nI checked my Hugging Face profile under the \u201cModels\u201d heading, but it says \u201cNone yet.\u201d\r\nQuestions:\r\nWhere should I look in the AutoTrain interface to find the trained model and output files?\r\nAre there any additional steps I need to take to ensure the trained model is saved and accessible?\r\nWith a free account, I don\u2019t have any GPUs assigned. But is that a problem with only 24 short training samples and one epoch?\r\nAny guidance or tips would be greatly appreciated!\r\n",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/684",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-17T23:01:53Z",
    "updated_at": "2024-06-22T03:49:27Z",
    "user": "RonPisaturo"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 409,
    "title": "DataLoader state is empty for different ranks ? ",
    "body": "Thanks for your amazing work ! \r\n\r\nWe have been testing the llama3_8b model on slimpajama dataset. The training seem to be fine based on loss curves. \r\n\r\nHowever, upon resuming the model from a previous checkpoint, we see the following warnings:\r\n\r\n```\r\n16: 2024-06-17 01:22:16,614 - root - WARNING - DataLoader state is empty for dp rank 16, expected key dp_rank_16.\r\n28: 2024-06-17 01:22:16,614 - root - WARNING - DataLoader state is empty for dp rank 28, expected key dp_rank_28.\r\n 5: 2024-06-17 01:22:16,614 - root - WARNING - DataLoader state is empty for dp rank 5, expected key dp_rank_5.\r\n20: 2024-06-17 01:22:16,614 - root - WARNING - DataLoader state is empty for dp rank 20, expected key dp_rank_20.\r\n27: 2024-06-17 01:22:16,615 - root - WARNING - DataLoader state is empty for dp rank 27, expected key dp_rank_27.\r\n 2: 2024-06-17 01:22:16,615 - root - WARNING - DataLoader state is empty for dp rank 2, expected key dp_rank_2.\r\n19: 2024-06-17 01:22:16,614 - root - WARNING - DataLoader state is empty for dp rank 19, expected key dp_rank_19.\r\n30: 2024-06-17 01:22:16,615 - root - WARNING - DataLoader state is empty for dp rank 30, expected key dp_rank_30.\r\n23: 2024-06-17 01:22:16,614 - root - WARNING - DataLoader state is empty for dp rank 23, expected key dp_rank_23.\r\n21: 2024-06-17 01:22:16,615 - root - WARNING - DataLoader state is empty for dp rank 21, expected key dp_rank_21.\r\n17: 2024-06-17 01:22:16,615 - root - WARNING - DataLoader state is empty for dp rank 17, expected key dp_rank_17.\r\n18: 2024-06-17 01:22:16,615 - root - WARNING - DataLoader state is empty for dp rank 18, expected key dp_rank_18.\r\n 1: 2024-06-17 01:22:16,615 - root - WARNING - DataLoader state is empty for dp rank 1, expected key dp_rank_1.\r\n26: 2024-06-17 01:22:16,615 - root - WARNING - DataLoader state is empty for dp rank 26, expected key dp_rank_26.\r\n31: 2024-06-17 01:22:16,615 - root - WARNING - DataLoader state is empty for dp rank 31, expected key dp_rank_31.\r\n12: 2024-06-17 01:22:16,614 - root - WARNING - DataLoader state is empty for dp rank 12, expected key dp_rank_12.\r\n10: 2024-06-17 01:22:16,614 - root - WARNING - DataLoader state is empty for dp rank 10, expected key dp_rank_10.\r\n11: 2024-06-17 01:22:16,615 - root - WARNING - DataLoader state is empty for dp rank 11, expected key dp_rank_11.\r\n14: 2024-06-17 01:22:16,616 - root - WARNING - DataLoader state is empty for dp rank 14, expected key dp_rank_14.\r\n15: 2024-06-17 01:22:16,616 - root - WARNING - DataLoader state is empty for dp rank 15, expected key dp_rank_15.\r\n13: 2024-06-17 01:22:16,616 - root - WARNING - DataLoader state is empty for dp rank 13, expected key dp_rank_13.\r\n29: 2024-06-17 01:22:16,616 - root - WARNING - DataLoader state is empty for dp rank 29, expected key dp_rank_29.\r\n 7: 2024-06-17 01:22:16,617 - root - WARNING - DataLoader state is empty for dp rank 7, expected key dp_rank_7.\r\n 8: 2024-06-17 01:22:16,617 - root - WARNING - DataLoader state is empty for dp rank 8, expected key dp_rank_8.\r\n 4: 2024-06-17 01:22:16,617 - root - WARNING - DataLoader state is empty for dp rank 4, expected key dp_rank_4.\r\n 3: 2024-06-17 01:22:16,618 - root - WARNING - DataLoader state is empty for dp rank 3, expected key dp_rank_3.\r\n 9: 2024-06-17 01:22:16,618 - root - WARNING - DataLoader state is empty for dp rank 9, expected key dp_rank_9.\r\n 6: 2024-06-17 01:22:16,619 - root - WARNING - DataLoader state is empty for dp rank 6, expected key dp_rank_6.\r\n22: 2024-06-17 01:22:16,619 - root - WARNING - DataLoader state is empty for dp rank 22, expected key dp_rank_22.\r\n24: 2024-06-17 01:22:16,619 - root - WARNING - DataLoader state is empty for dp rank 24, expected key dp_rank_24.\r\n25: 2024-06-17 01:22:16,619 - root - WARNING - DataLoader state is empty for dp rank 25, expected key dp_rank_25.\r\n```\r\n\r\nWhat can be the reason for DataLoader state being empty when loading the model ? \r\n\r\nAlso noting that checkpoints are loaded properly. ",
    "url": "https://github.com/pytorch/torchtitan/issues/409",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-17T17:46:42Z",
    "updated_at": "2024-11-22T00:00:55Z",
    "user": "ahatamiz"
  },
  {
    "repo": "huggingface/transformers",
    "number": 31453,
    "title": "How to build and evaluate a vanilla transformer?",
    "body": "### Model description\n\n\"Attention Is All You Need\" is a landmark 2017 research paper authored by eight scientists working at Google, responsible for expanding 2014 attention mechanisms proposed by Bahdanau et al. into a new deep learning architecture known as the transformer with an encoder, cross-attention, and a decoder.\n\n### Open source status\n\n- [X] The model implementation is available\n- [ ] The model weights are available\n\n### Provide useful links for the implementation\n\nEncoderDecoderModels are supported via the huggingface API. Though it isn't possible to evaluate them properly: https://github.com/huggingface/transformers/issues/28721\r\nHow is it possible to build and evaluate a vanilla transformer with an encoder, cross-attention, and a decoder in huggingface?",
    "url": "https://github.com/huggingface/transformers/issues/31453",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-17T17:17:11Z",
    "updated_at": "2024-11-04T13:56:06Z",
    "user": "Bachstelze"
  },
  {
    "repo": "huggingface/parler-tts",
    "number": 74,
    "title": "How to do with flan-t5 when i want to finetune based on  Mini v0.1 but not from scratch? Flan t5 can not deal my language.",
    "body": "",
    "url": "https://github.com/huggingface/parler-tts/issues/74",
    "state": "open",
    "labels": [],
    "created_at": "2024-06-17T06:39:24Z",
    "updated_at": "2024-06-17T06:39:24Z",
    "user": "lyt719"
  },
  {
    "repo": "huggingface/candle",
    "number": 2269,
    "title": "How to select which GPU to use",
    "body": "We are working with the stable diffusion example. How do we select which GPU device on our system to use for the rendering?\r\nthanks.",
    "url": "https://github.com/huggingface/candle/issues/2269",
    "state": "open",
    "labels": [],
    "created_at": "2024-06-16T19:53:18Z",
    "updated_at": "2024-06-21T19:29:31Z",
    "user": "donkey-donkey"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 128698,
    "title": "ONNX docs missing info about how to remove custom domains",
    "body": "### \ud83d\udcda The doc issue\n\nIn the docs about exporting to onnx [here](https://pytorch.org/tutorials/beginner/onnx/export_simple_model_to_onnx_tutorial.html?highlight=torch%20onnx%20dynamo_export) there is not a mention of how to remove the functions. The use of aten operators defined as functions creates a problem when converting to tensorrt. When visualizing with netron the functions are composed of simpler official ai.onnx operators which have support for tensorrt but not the custom exported aten operators. There should be a way to save the models without using functions and custom operators and just export the raw operators even if that means more repetitions, but it would make models exportable to tensorrt.\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @svekars @brycebortree",
    "url": "https://github.com/pytorch/pytorch/issues/128698",
    "state": "closed",
    "labels": [
      "module: onnx",
      "module: docs",
      "triaged"
    ],
    "created_at": "2024-06-14T13:01:35Z",
    "updated_at": "2025-09-07T22:35:57Z",
    "user": "Jerry-Master"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1283,
    "title": "SELF_SIGNED_CERT_IN_CHAIN",
    "body": "I am experiencing this error. I'm on a corporate VPN and I tried turning it off and still the same error. The TLS reject is set to false as well.\r\n\r\nSELF_SIGNED_CERT_IN_CHAIN\u202871.61 \r\nnpm error errno SELF_SIGNED_CERT_IN_CHAIN\u202871.61 \r\nnpm error request to https://registry.npmjs.org/failed, reason: self-signed certificate in certificate chain",
    "url": "https://github.com/huggingface/chat-ui/issues/1283",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-06-14T04:03:48Z",
    "updated_at": "2024-06-17T06:50:29Z",
    "comments": 2,
    "user": "solanki-aman"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 399,
    "title": "How to use nsys?",
    "body": "Is there a recommended way to use nsys / nsight? I know there's a profiling hook for using the Pytorch profiler, but I'm wondering how to use nsys instead.\r\n\r\nCan I use these APIs:\r\n```\r\nwith torch.autograd.profiler.emit_nvtx():\r\n    profiler.start()\r\n    y = x.view(1, -1)\r\n    z = x.to(memory_format=torch.channels_last)\r\n    zz = z.reshape(1, -1)\r\n    profiler.stop()\r\n``` \r\n\r\nFurthermore, I'm not sure which of the below I'm supposed to use:\r\n```\r\n    import torch.cuda.profiler as profiler\r\n    with torch.autograd.profiler.emit_nvtx():\r\n```",
    "url": "https://github.com/pytorch/torchtitan/issues/399",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-06-13T18:14:52Z",
    "updated_at": "2024-11-22T00:00:02Z",
    "user": "vedantroy"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8527,
    "title": "how to add controlnet in sd3!",
    "body": "I currently use inpainting controlnet in sdxl because it uses unet to easily support controlnet. And I am curious about how to add controlnet in sd3 with transforms model structure.",
    "url": "https://github.com/huggingface/diffusers/issues/8527",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-13T10:14:38Z",
    "updated_at": "2024-08-24T04:20:28Z",
    "user": "appleyang123"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 266,
    "title": "Question - how to handle additional sensory input",
    "body": "Hi guys, sorry to bother you again :wink:  \r\nand thanks for your work, I'm very excited by Lerobot!\r\n\r\n\r\nI'm currently collecting some teleop data where the robot has tactile sensors on the fingertips, as well as a FT sensor on the wrist and I was wondering how I would integrate this best into a Lerobot Dataset.\r\n\r\nOne way would be to concatenate them into the `observation.state`, as this is the hardcoded location for non-image observations. But I want to train both with and without the tactile sensors and FT sensors as inputs to quantify the benefits of the other sensors, so I would then have to make separate datasets for each sensor combination which feels cumbersome. \r\n\r\nAre there any plans in the near future to support 'dynamic configuration' of the state inputs for the policies? Or is my best option to just create different datasets for each combination?\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/lerobot/issues/266",
    "state": "closed",
    "labels": [
      "question",
      "dataset",
      "stale"
    ],
    "created_at": "2024-06-13T08:39:26Z",
    "updated_at": "2025-10-23T02:29:29Z",
    "user": "tlpss"
  },
  {
    "repo": "huggingface/nanotron",
    "number": 196,
    "title": "how to run benchmark tests",
    "body": "Hi, \r\n\r\nI can build this project with your commands, but there is no \"pyaottriton\" when ran the benchmark test like: benchmark_forward.py or benchmark_backward.py.\r\n\r\nanything I missed?\r\n\r\nThanks",
    "url": "https://github.com/huggingface/nanotron/issues/196",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-13T08:31:06Z",
    "updated_at": "2024-06-13T08:38:24Z",
    "user": "jinsong-mao"
  },
  {
    "repo": "pytorch/xla",
    "number": 7255,
    "title": "[RFC] torch_xla2 dynamo integration",
    "body": "# Dynamo backend for torchxla2\r\n\r\n## Goal\r\n\r\nHave a dynamo backend backend by torch_xla2.\r\n\r\nThe users should be able to do the following:\r\n\r\n```python\r\nm = model ...\r\nm_compiled = torch.compile(m, backend='torch_xla2_compile')  # backend name TBD\r\nresult = m_compiled(*inputs)\r\n```\r\n\r\nThe above should run on TPU will low overhead.\r\n\r\n## Challenge\r\n\r\nUsually the challenge of a dynamo backend is the compiler that\r\ntransforms a fx graph with torch (or Aten) ops to the compiled executable.\r\nHowever, in our case, that piece is solved.\r\n\r\nFor every `call_function` node; we lookup the corresponding implementation of\r\nsaid ATen op in a dictionary for it's corresponding implementation in Jax,\r\nand we just call it.\r\n\r\nThis is illustrated here: https://github.com/pytorch/xla/blob/master/experimental/torch_xla2/torch_xla2/export.py#L23\r\n\r\nNow, the challenge is for dynamo to be able to 1. produce the graph; and 2. n\r\nnot incur any data copies in this process.\r\n\r\n\r\nConsider this following pseudocode:\r\n\r\n```python\r\nclass XLATensor2:\r\n  _data: jax.Array \r\n  def __torch_dispatch__(...):\r\n      # do stuff with _data, get new data\r\n      return XLATensor2(new_data)\r\n\r\ndef dynamo_backend(fx, sample):\r\n  compiled = compile fx into graph that manipulate jax.Array.\r\n  def returned_callable(inputs):\r\n    datas = [i._data for i in inputs]\r\n    res = compiled(*datas)\r\n    return TensorSubclass(res)\r\n  return returned_callable\r\n\r\nmodel = torch.compile(model, backend = dynamo_backend)\r\ninputs = a list of TensorSubclass or a list of torch.Tensor?\r\nmodel(*inputs)\r\n```\r\n\r\nWhat would be the type of inputs?\r\nIf inputs are of type `TensorSubclass`, then dynamo\r\nwill attempt to trace through the `__torch_dispatch__` method,\r\nand throws error because it doesn't know what is `_data` and the\r\noperations on it.\r\n\r\nIf `inputs` is of type `torch.Tensor`, then it works: dynamo \r\ncalls the backend, the backend can produce correct result.\r\nBut, `inputs` need to be converted to `TensorSubclass` first inside of\r\nthe backend; which usually means a data copy. This happens everytime \r\nthe compiled backend is executed, therefore not desirable.\r\n\r\n## The Desired behavior\r\n\r\nWhen *tracing* dynamo treats TensorSubclass as if it is a regular tensor\r\nwithout dispatch override; and when executing the compiled callable,\r\nTensorSubclass is passed in as-is. We know that dynamo can do this with \r\nsome tensor subclass, namely `FakeTensor`.\r\n\r\n\r\nLet's list out the possible ways we could accomplish this behavior.\r\n\r\n\r\n# Option 1. Have the jax.Array object hold in C++\r\n\r\nRoughly we would have a `Tensor` subclass in C++, this is very\r\nsimilar to the `LazyTensor` subclass that is the current `XLATensor`.\r\nThis tensor can hold it's own states in C++. In our case, that would \r\nbe a `PyObject*` that happens to point to either `jnp.ndarray` or \r\njax's `Traced<ShapedArray>` during jax.jit. We might further result the\r\n`XLA` dispatch key to route the operators to the jax implementation, \r\nemulating what `__torch_dispatch__` does.\r\n\r\nThis way, eager mode will continue to work, and dynamo would work\r\nbecause the Python class is still `torch.Tensor` (not a subclass), and\r\nthere are no Python logic in dispatching so dynamo cannot trace through.\r\n\r\n## Pros:\r\n* Very clear that this will work. \r\n\r\n## Cons:\r\nNow need to deal with C++ builds. In particular, `torch` becomes a source\r\ndependency instead of a pip dependency; meaning, again we need to start\r\nbuilding torch first then build torch_xla2. This might be mitigated if\r\nthat subclass can be upstreamed.\r\n\r\n\r\n# Option 2. Modify dynamo to do the desired behavior\r\n\r\nWe have one instance where a `torch.Tensor` dispatch subclass\r\njust works with dynamo, without dynamo make a fuss when it traces\r\n`__torch_dispatch__`. This is `FakeTensor`. (https://github.com/pytorch/pytorch/pull/100017/files)\r\n\r\nThe idea is to make dynamo trace as-if the inputs are `FakeTensor` and\r\nnot `XLATensor`. and only after the creation of fx graph and backend, dynamo\r\ncalls the compiled callable with `XLATensor`.\r\n\r\nPros:\r\n* Likely pure python changes. \r\n\r\nCons:\r\n* We also need to design a mechanism to represent tensor subclasses that\r\n  is desirable for dynamo to trace through, and those is not.\r\n* Likely significant amount of work.\r\n\r\n\r\n# Option 3. Register All the ops as custom_ops\r\n\r\nSo currently dynamo traces `__torch_dispatch__`, and we don't like that\r\nbecause it will find the operations on Jax arrays, and doesn't understand those.\r\n\r\nWhat if we make dynamo **able** to understand what is inside?\r\nThe [Black box python functions](https://docs.google.com/document/d/1ZuCVyMfibExwvtzhd9cfMWk5zXT3Dhy1b3kuvAIkBoU/edit#heading=h.56tggsazyrkh) doc \r\npoints the possibility of registering things that we don't want dynamo\r\nto go into as a custom op. So we could, theoretically do the following:\r\n\r\n1. Register the jax impl of an Aten op as a custom op.\r\n   i.e. register `jaten.add` for `aten.add`.\r\n2. For meta kernels, just call the meta kernel of `aten.add`.\r\n3. In `_",
    "url": "https://github.com/pytorch/xla/issues/7255",
    "state": "open",
    "labels": [
      "dynamo",
      "RFC",
      "torchxla2"
    ],
    "created_at": "2024-06-12T17:31:23Z",
    "updated_at": "2025-11-12T19:14:04Z",
    "comments": 7,
    "user": "qihqi"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1277,
    "title": "Difficulties with chat-ui promp to text-generation-webui openai api endpoint",
    "body": "Hello,\r\n\r\nI'm trying my best to get the huggingface ```chat-ui``` working with the API endpoint of ```text-generation-webui```.\r\n\r\nI would be really happy if I could get a hint what I am doing wrong.\r\n\r\nHere is a reverse proxied test instance: https://chat-ui-test.pischem.com/\r\n\r\nI can't get my prompt that I input into the chat-ui to pass to the text-generation-webui. Every prompt will be ignored and a random answer is returned.\r\n\r\nHere is the command I start ```text-generation-webui```:\r\n\r\n<details>\r\n\r\n```./start_linux.sh --listen --listen-port 8000 --api --api-port 8001 --verbose --model NTQAI_Nxcode-CQ-7B-orpo```\r\n\r\n</details>\r\n\r\nHere is my current ```.local.env``` of the ```chat-ui``` and the command I run it with:\r\n\r\n<details>\r\n\r\n```npm run dev -- --host```\r\n\r\n```\r\nMODELS=`[\r\n  {\r\n    \"name\": \"text-generation-webui\",\r\n    \"id\": \"text-generation-webui\",\r\n    \"parameters\": {\r\n      \"temperature\": 0.9,\r\n      \"top_p\": 0.95,\r\n      \"max_new_tokens\": 1024,\r\n      \"stop\": []\r\n    },\r\n    \"endpoints\": [{\r\n      \"type\" : \"openai\",\r\n      \"baseURL\": \"http://172.16.0.169:8001/v1\",\r\n      \"extraBody\": {\r\n        \"repetition_penalty\": 1.2,\r\n        \"top_k\": 50,\r\n        \"truncate\": 1000\r\n      }\r\n    }]\r\n  }\r\n]`\r\n\r\nMONGODB_URL=`mongodb://localhost:27017`\r\nDEBUG=`true`\r\n```\r\n\r\n</details>\r\n\r\nHere are the logs what happen when I write a prompt:\r\n\r\n```chatui```:\r\n\r\n<details>\r\n\r\n```\r\n> chat-ui@0.9.1 dev\r\n> vite dev --host\r\n\r\n\r\n\r\n  VITE v4.5.3  ready in 777 ms\r\n\r\n  \u279c  Local:   http://localhost:5173/\r\n  \u279c  Network: http://172.16.0.135:5173/\r\n  \u279c  Network: http://172.17.0.1:5173/\r\n  \u279c  press h to show help\r\n(node:6250) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.\r\n(Use `node --trace-deprecation ...` to show where the warning was created)\r\n[13:58:52.476] INFO (6250): [MIGRATIONS] Begin check...\r\n[13:58:52.478] INFO (6250): [MIGRATIONS] \"Update search assistants\" already applied. Skipping...\r\n[13:58:52.478] INFO (6250): [MIGRATIONS] \"Update deprecated models in assistants with the default model\" should not be applied for this run. Skipping...\r\n[13:58:52.478] INFO (6250): [MIGRATIONS] \"Add empty 'tools' record in settings\" already applied. Skipping...\r\n[13:58:52.478] INFO (6250): [MIGRATIONS] \"Convert message updates to the new schema\" already applied. Skipping...\r\n[13:58:52.478] INFO (6250): [MIGRATIONS] \"Convert message files to the new schema\" already applied. Skipping...\r\n[13:58:52.478] INFO (6250): [MIGRATIONS] \"Trim message updates to reduce stored size\" already applied. Skipping...\r\n[13:58:52.478] INFO (6250): [MIGRATIONS] All migrations applied. Releasing lock\r\n[13:58:52.498] INFO (6250): Metrics server listening on port 5565\r\nBrowserslist: caniuse-lite is outdated. Please run:\r\n  npx update-browserslist-db@latest\r\n  Why you should do it regularly: https://github.com/browserslist/update-db#readme\r\n\r\n\r\n(node:6250) Warning: To load an ES module, set \"type\": \"module\" in the package.json or use the .mjs extension.\r\n(node:6250) Warning: To load an ES module, set \"type\": \"module\" in the package.json or use the .mjs extension.\r\nSource path: /opt/chat-ui/src/lib/components/chat/FileDropzone.svelte?svelte&type=style&lang.css\r\nSetting up new context...\r\n\r\n\r\nSource path: /opt/chat-ui/src/lib/components/chat/ChatInput.svelte?svelte&type=style&lang.css\r\n\r\n\r\nSource path: /opt/chat-ui/src/lib/components/ToolsMenu.svelte?svelte&type=style&lang.css\r\n\r\n\r\nSource path: /opt/chat-ui/src/lib/components/chat/ChatMessage.svelte?svelte&type=style&lang.css\r\nJIT TOTAL: 265.317ms\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n(node:6250) Warning: Label 'JIT TOTAL' already exists for console.time()\r\n(node:6250) Warning: Label 'JIT TOTAL' already exists for console.time()\r\n(node:6250) Warning: Label 'JIT TOTAL' already exists for console.time()\r\n(node:6250) Warning: No such label 'JIT TOTAL' for console.timeEnd()\r\n(node:6250) Warning: No such label 'JIT TOTAL' for console.timeEnd()\r\n(node:6250) Warning: No such label 'JIT TOTAL' for console.timeEnd()\r\n\r\n\r\nSource path: /opt/chat-ui/src/lib/components/OpenWebSearchResults.svelte?svelte&type=style&lang.css\r\n\r\n\r\nSource path: /opt/chat-ui/src/lib/components/chat/ToolUpdate.svelte?svelte&type=style&lang.css\r\nJIT TOTAL: 1.355ms\r\n\r\n\r\n\r\n\r\n(node:6250) Warning: Label 'JIT TOTAL' already exists for console.time()\r\n(node:6250) Warning: No such label 'JIT TOTAL' for console.timeEnd()\r\n\r\n\r\nSource path: /opt/chat-ui/src/styles/main.css\r\nSetting up new context...\r\nFinding changed files: 8.775ms\r\nReading changed files: 158.906ms\r\nSorting candidates: 7.72ms\r\nGenerate rules: 397.398ms\r\nBuild stylesheet: 11.899ms\r\nPotential classes:  8755\r\nActive contexts:  2\r\nJIT TOTAL: 767.815ms\r\n\r\n\r\n\r\n\r\nSource path: /opt/chat-ui/src/styles/main.css?inline=\r\nSetting up new context...\r\nFinding changed files: 3.466ms\r\nReading changed files: 119.942ms\r\nSorting candidates: 7.852ms\r\nGenerate rules: 339.343ms\r\nBuild stylesheet: 6.497ms\r\nPotential classes:  8755\r\nActive contexts:  3\r\nJIT TOTAL: 635.226ms",
    "url": "https://github.com/huggingface/chat-ui/issues/1277",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2024-06-12T14:18:12Z",
    "updated_at": "2025-01-30T18:46:22Z",
    "comments": 7,
    "user": "Monviech"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1275,
    "title": "Feature Request - support for session sharing, archiving, and collaboration",
    "body": "AFAIK, HuggingChat (HC) currently has no support for session sharing, archiving, and collaboration. At least, neither the HC server nor my GitHub (GH) searching found anything like this. So, if this doesn't exist, please consider how it could be implemented. For example, if I wanted to publish an HC session, maybe I could ask HC to send me a transcript in a form suitable for sharing (e.g., as a GH repo).  To reduce friction, perhaps I could simply ask HC to create (or update) a repo.\r\n\r\nMaking it easy for HC users (and researchers) to examine and/or collaborate on sessions seems to me to be a Good Thing...",
    "url": "https://github.com/huggingface/chat-ui/issues/1275",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-12T11:35:31Z",
    "updated_at": "2024-06-14T05:24:08Z",
    "user": "RichMorin"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 263,
    "title": "Seeking advice on how to choose between ACT and DP algorithms",
    "body": "Hello,\r\n\r\nThank you very much for the work you have done in bringing together the current excellent imitation learning collections for convenient use. Regarding the ACT algorithm and DP algorithm, besides the basic differences in the algorithms themselves, how should one choose between them for different tasks? Do they have specific types of tasks they are particularly suited for? I have just started using your project and am unsure how to select the appropriate algorithm. I would greatly appreciate any advice you can provide.\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/lerobot/issues/263",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-12T07:45:39Z",
    "updated_at": "2024-06-19T14:02:43Z",
    "user": "le-wei"
  },
  {
    "repo": "pytorch/xla",
    "number": 7253,
    "title": "[RFC] PyTorch/XLA eager mode as default",
    "body": "# Context\r\n\r\n\r\n## Objective\r\n\r\nIn this RFC I will talk about the roadmap to enable eager mode as the default computation mode for PyTorch/XLA users and how to enable graph compilation in this mode.\r\n\r\n\r\n## Background\r\n\r\nPyTorch/XLA has been using tracing mode as the default mode since the project started. All of the torch operation users issued will be accumulated in the background and sent to the XLA for compilation and execution upon a `mark_step` call.\r\n\r\nThe upside of this approach is that users don\u2019t need to change their model code too much. As long as the user adds a `mark_step` at the right place everything should just work. However from the user feedback in the last couple years this approach creates too much confusion and frustration for the user. Both PyTorch and JAX took the approach of using eager mode as default and asking users to specify the function that they want to compile. PyTorch/XLA should take the same approach.\r\n\r\n\r\n# Design\r\n\r\n\r\n## Eager mode\r\n\r\nThere is no real eager mode in TPU. However we can fake the eager mode by compiling and executing each torch operation. Such mode already exist as a debug only mode today, it was contributed by @aws-rhsoln 2 year ago in https://github.com/pytorch/xla/pull/3306. The work here is to do a better API level wrapping and make sure this mode work with other features(debug output, SPMD, multiprocess etc). This approach was way too slow a couple years ago due to XRT not being able to execute small executions very efficiently but with PJRT the performance is much better. \r\n\r\nThe whole eager mode still builds on top of the existing Lazy tensor framework, but becomes invisible to the user. A couple things we need to do to accommodate the eager mode are\r\n\r\n1. Increase the compilation cache from 1024 to 2048 since each torch op will also reside in the compilation cache. We also need to recompile every torch op for different input shapes.\r\n2. Increase the max execution we can queue in the PJRT level since now we will execute a lot more small computations.\r\n\r\n\r\n## Compile\r\n\r\nFor the compile part we currently have 2 options, lazy tensor and torch dynamo(torch.compile).\r\n\r\nFor lazy tensor based compile I will add a new API_\r\n\r\n\r\n```\r\ntorch_xla.experimental.compile(fn) -> compiled_fn\r\n```\r\n\r\n\r\nWhich under the hood just enables the tracing mode upon running the function and executes the traced graph before returning. Here is the [implementation](https://github.com/pytorch/xla/pull/7246/files#diff-1e2407471d3328b83dabbeb29cdf3ef468a201d3d4aecac8f4cd46f76751b8c1). For `torch.compile` we can just use the existing API.\r\n\r\n\r\n# Example UX\r\n\r\n\r\n```python\r\nimport torch_xla\r\ntorch_xla.experimental.eager_mode(True)\r\n\r\nClass TrainDecoderOnlyBase():\r\n  def __init__():\r\n    train_loader = MyLoader()\r\n    self.model = DecoderOnlyModel(self.config).to(torch_xla.device())\r\n    # if run with dynamo, use\r\n    # self.step_fn = torch.compile(self.step_fn, backend=\"openxla\")\r\n    self.step_fn = torch_xla.experimental.compile(self.step_fn)\r\n\r\n  def step_fn(self, data, target):\r\n    self.optimizer.zero_grad()\r\n    logits = self.model(data)\r\n    loss = self.loss_fn(\r\n        logits.view(-1, self.config.vocab_size), target.view(-1))\r\n    loss.backward()\r\n    self.run_optimizer()\r\n    return loss\r\n\r\n  def start_training(self):\r\n    for step, (data, target) in enumerate(loader):\r\n      loss = self.step_fn(data, target)\r\n\r\nif __name__ == '__main__':\r\n  base = TrainDecoderOnlyBase()\r\n  base.start_training()\r\n```\r\n\r\nNote that two changes user need to make is to enable the eager mode by `torch_xla.experimental.eager_mode(True)` and then compile the step function with `torch_xla.experimental.compile` or `torch.compile`.\r\n\r\nUsers can also choose to run the whole model in eager mode.\r\n\r\n\r\n# Why\r\n\r\nIMO using tracing mode as the default has a couple very significant drawback\r\n\r\n\r\n\r\n1. Users are often confused about when the framework is tracing and when the framework is executing.\r\n2. Users don\u2019t know where to add the `mark_step`.\r\n3. Random python code(data preprocessing for example) often generates some small pending execution that gets leaked into the main graph(step function) and causes recompilation. The recompilation of the whole graph is usually very expensive.\r\n4. It is hard to debug when/why recompilation happens.\r\n\r\nBoth JAX and PyTorch took the approach of asking users to explicitly mark the region/function for compilation. This methodology seems well received for users that want compilation mode. I think this proposal will make a much better usability story by\r\n\r\n\r\n1. Allow users to use eager mode to do the initial model development and use compile mode to scale up. This also significantly lowers the bar for a normal pytorch user to onboard PyTorch/XLA.\r\n2. Reduce the number of recompilation generated by non-core model codes, since those will get executed eagerly.\r\n3. Make graph recompilation easier to debug since only the `compiled_fn` should generate graphs.\r\n\r\n\r\n# Benchmark\r\n\r\nI am ",
    "url": "https://github.com/pytorch/xla/issues/7253",
    "state": "open",
    "labels": [
      "usability",
      "RFC",
      "eager"
    ],
    "created_at": "2024-06-12T03:40:12Z",
    "updated_at": "2025-11-09T19:39:21Z",
    "comments": 5,
    "user": "JackCaoG"
  },
  {
    "repo": "pytorch/executorch",
    "number": 3939,
    "title": "How can I use the generated pte file to process my own data and predict the results?",
    "body": "auto train_loader = torch::data::make_data_loader(\r\n    SWaTegLoader(\"/dataset/train.csv\", 100, 10, \"train\"),\r\n    batch_size=256,\r\n    torch::data::DataLoaderOptions().workers(0).shuffle(true)\r\n);\r\n\r\nIs this correct? Then how do we process the data with the model?\r\n\r\n\r\n    for (auto& batch : *train_loader) {\r\n        auto input = batch.data.to(device), labels = batch.target.to(device);\r\n        auto output = method->execute(input)\r\n\r\nIs it correct to write code in libtorch way?\r\n",
    "url": "https://github.com/pytorch/executorch/issues/3939",
    "state": "closed",
    "labels": [
      "need-user-input"
    ],
    "created_at": "2024-06-11T22:22:13Z",
    "updated_at": "2025-02-05T17:44:36Z",
    "user": "tayloryoung-o"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2899,
    "title": "Standardize access to metrics and healthcheck",
    "body": "In some apps, the metrics and healthcheck are public:\r\n\r\n- https://datasets-server.huggingface.co/admin/metrics\r\n- https://datasets-server.huggingface.co/sse/metrics\r\n- https://datasets-server.huggingface.co/sse/healthcheck\r\n- https://datasets-server.huggingface.co/healthcheck\r\n- On others, it\u2019s forbidden or not found:\r\n\r\n- https://datasets-server.huggingface.co/metrics\r\n- https://datasets-server.huggingface.co/filter/metrics \r\n\r\nAs @severo suggests, it should be coherent among all the services. (Do we want the metrics to be public, or not?)\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2899",
    "state": "open",
    "labels": [
      "question",
      "infra",
      "P2"
    ],
    "created_at": "2024-06-11T14:39:10Z",
    "updated_at": "2024-07-11T15:38:17Z",
    "user": "AndreaFrancis"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 261,
    "title": "Which low cost robot with teleoperation to test the library ?",
    "body": "Firstly, thank you for all the work. At my company we would like to obtain results on real robots from this repository. However, the original setups are either quite expensive (around ~30k for Aloha) or require reconstruction for the UMI interface from Colombia via 3D printing, which would be time-consuming considering we don't have direct experience in the subject.\r\n\r\n**Do you have any recommendations for one or more robots with a low-cost teleoperation setup on which we could test and iterate quickly on these algorithms?** I have seen some people doing things with low-cost robots on LinkedIn, and I will reach out to them, but apparently, they do not seem to be selling them.\r\n\r\nThanks,",
    "url": "https://github.com/huggingface/lerobot/issues/261",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-11T13:21:32Z",
    "updated_at": "2024-07-23T07:55:15Z",
    "user": "RochMollero"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 128414,
    "title": "How to enable XNNPACK instead of NNPACK/MKLDNN in Windows?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI'm trying to compile PyTorch for Windows on ARM64 device. I've got one workable version, but NNPACK/MKLDNN doesn't work in ARM64 windows. May I know how to enable XNNPACK as the default 'PACK' to improve the performance?\r\nThanks in advance!\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @peterjc123 @mszhanyi @skyline75489 @nbcsm @vladimir-aubrecht @iremyux @Blackhex @cristianPanaite @malfet @snadampal",
    "url": "https://github.com/pytorch/pytorch/issues/128414",
    "state": "open",
    "labels": [
      "module: windows",
      "triaged",
      "module: xnnpack",
      "module: arm"
    ],
    "created_at": "2024-06-11T12:53:01Z",
    "updated_at": "2024-09-04T10:33:25Z",
    "user": "zhanweiw"
  },
  {
    "repo": "huggingface/diarizers",
    "number": 11,
    "title": "How can I save the model locally before pushing it to the Hub ?!",
    "body": "",
    "url": "https://github.com/huggingface/diarizers/issues/11",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-11T06:37:45Z",
    "updated_at": "2024-06-13T16:24:19Z",
    "user": "ma-mohsen"
  },
  {
    "repo": "huggingface/parler-tts",
    "number": 68,
    "title": "How to predict after finetune? There is no config.json in checkpoint dir.",
    "body": "",
    "url": "https://github.com/huggingface/parler-tts/issues/68",
    "state": "open",
    "labels": [],
    "created_at": "2024-06-11T03:30:04Z",
    "updated_at": "2024-06-17T01:57:04Z",
    "user": "lyt719"
  },
  {
    "repo": "pytorch/data",
    "number": 1271,
    "title": "Returning tensor instead of dict for state_dict causes failure",
    "body": "### \ud83d\udc1b Describe the bug\n\n```\r\nclass TensorStateDataset(torch.utils.data.IterableDataset, Stateful, Iterator):\r\n    def __init__(self, length):\r\n        self.length = length\r\n        self.i = 0\r\n\r\n    def __iter__(self):\r\n        return self\r\n    \r\n    def __next__(self):\r\n        if self.i >= self.length:\r\n            raise StopIteration\r\n        self.i += 1\r\n        return self.i\r\n\r\n    def state_dict(self):\r\n        return torch.rand(2, 2)\r\n\r\n    def load_state_dict(self, state_dict):\r\n\t\tpass\r\n\r\n\r\nclass TestSimple(TestCase):\r\n    def test(self):\r\n        dataset = TensorStateDataset(100)\r\n        dl = StatefulDataLoader(\r\n            dataset=dataset,\r\n            num_workers=1,\r\n        )\r\n        it = iter(dl)\r\n        for _ in range(30):\r\n            next(it)\r\n        self.assertTrue(False)\r\n```\r\n\r\nRunning this, I hit an error as follows:\r\n\r\n```\r\n\r\nself = <torch._utils.ExceptionWrapper object at 0x7f921c5fde10>\r\n\r\n    def reraise(self):\r\n        r\"\"\"Reraises the wrapped exception in the current thread\"\"\"\r\n        # Format a message such as: \"Caught ValueError in DataLoader worker\r\n        # process 2. Original Traceback:\", followed by the traceback.\r\n        msg = f\"Caught {self.exc_type.__name__} {self.where}.\\nOriginal {self.exc_msg}\"\r\n        if self.exc_type == KeyError:\r\n            # KeyError calls repr() on its argument (usually a dict key). This\r\n            # makes stack traces unreadable. It will not be changed in Python\r\n            # (https://bugs.python.org/issue2651), so we work around it.\r\n            msg = KeyErrorMessage(msg)\r\n        elif getattr(self.exc_type, \"message\", None):\r\n            # Some exceptions have first argument as non-str but explicitly\r\n            # have message field\r\n            raise self.exc_type(message=msg)\r\n        try:\r\n            exception = self.exc_type(msg)\r\n        except TypeError:\r\n            # If the exception takes multiple arguments, don't try to\r\n            # instantiate since we don't know how to\r\n            raise RuntimeError(msg) from None\r\n>       raise exception\r\nE       RuntimeError: Caught RuntimeError in DataLoader worker process 0.\r\nE       Original Traceback (most recent call last):\r\nE         File \"/home/gokulg/torchdata/data/torchdata/stateful_dataloader/worker.py\", line 233, in _worker_loop\r\nE           delta_state_dict = incremental_worker_state.generate_delta(state_dict)\r\nE         File \"/home/gokulg/torchdata/data/torchdata/stateful_dataloader/incremental_state.py\", line 142, in generate_delta\r\nE           if iter_state := fetcher_state.get(_DATASET_ITER_STATE, None):\r\nE       RuntimeError: Boolean value of Tensor with more than one value is ambiguous\r\nE\r\nE\r\nE       To execute this test, run the following from the base repo dir:\r\nE            python test/stateful_dataloader/test_state_dict.py -k test2\r\nE\r\nE       This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0\r\n\r\n../../.conda/envs/basetorch/lib/python3.10/site-packages/torch/_utils.py:722: RuntimeError\r\n```\r\n\r\nIf an integer is returned or say dict (with value as tensor) is returned, there is no error. \n\n### Versions\n\nLatest git commit 82918dd",
    "url": "https://github.com/meta-pytorch/data/issues/1271",
    "state": "closed",
    "labels": [
      "bug",
      "stateful_dataloader"
    ],
    "created_at": "2024-06-10T23:49:43Z",
    "updated_at": "2024-06-13T19:16:27Z",
    "comments": 2,
    "user": "gokulavasan"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2926,
    "title": "\ud83d\udca1 [REQUEST] - New recipe tutorial on calculating layer output dimensions",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\n\nThis tutorial will help users understand how to transition from convolutional and pooling layers to linear layers in their models.\r\n\r\nLearning objectives:\r\n- How to manually calculate the output dimensions after applying a convolution or pooling layer\r\n- How to print the shape of internal tensors for inspecting dimensionality changes in a model\r\n- How to use the ``torchinfo`` package to show output dimensions for all layers in a model\r\n\n\n### Existing tutorials on this topic\n\n_No response_\n\n### Additional context\n\nI created this draft (https://github.com/pytorch/tutorials/pull/2923) as a part of the PyTorch Docathon H1 2024 effort. I did not realize new tutorials weren't being accepted as part of the sprint and was asked to fill out an issue and convert the PR to a draft.",
    "url": "https://github.com/pytorch/tutorials/issues/2926",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-10T23:01:44Z",
    "updated_at": "2025-04-16T20:08:34Z",
    "comments": 2,
    "user": "loganthomas"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2925,
    "title": "\ud83d\udca1 [REQUEST] - New recipe tutorial on implementing a Keras progress bar",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\r\n\r\nThis tutorial will help users to understand better how to implement a Keras progress bar in PyTorch.\r\n- How to implement with a traditional train/test loop\r\n- How to implement with a train loop with validation data\r\n\r\n### Existing tutorials on this topic\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\nI created this draft (https://github.com/pytorch/tutorials/pull/2921) as a part of the PyTorch Docathon H1 2024 effort. I did not realize new tutorials weren't being accepted as part of the sprint and was asked to fill out an issue and convert the PR to a draft.",
    "url": "https://github.com/pytorch/tutorials/issues/2925",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-10T22:59:38Z",
    "updated_at": "2025-04-16T20:08:41Z",
    "comments": 0,
    "user": "loganthomas"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2924,
    "title": "\ud83d\udca1 [REQUEST] - New recipe tutorial on accessing model parameters",
    "body": "### \ud83d\ude80 Describe the improvement or the new tutorial\r\n\r\nThis tutorial will help begginers understand how to access and make sense of model parameters, collect trainable parameters, and use `torchinfo.summary()`. \r\n\r\nLearning objectives:\r\n- How to inspect a model's parameters using ``.parameters()`` and ``.named_parameters()``\r\n- How to collect the trainable parameters of a model\r\n- How to use the ``torchinfo`` package (formerly ``torch-summary``) to print a model summary\r\n\r\n### Existing tutorials on this topic\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\nI created this draft (https://github.com/pytorch/tutorials/pull/2914) as a part of the PyTorch Docathon H1 2024 effort. I did not realize new tutorials weren't being accepted as part of the sprint and was asked to fill out an issue and convert the PR to a draft.",
    "url": "https://github.com/pytorch/tutorials/issues/2924",
    "state": "open",
    "labels": [],
    "created_at": "2024-06-10T22:56:58Z",
    "updated_at": "2024-06-10T23:01:48Z",
    "comments": 0,
    "user": "loganthomas"
  },
  {
    "repo": "pytorch/xla",
    "number": 7232,
    "title": "How to convert hlo.pb to hlo text?",
    "body": "## \u2753 Questions and Help\r\n\r\n### How to convert hlo.pb to hlo_text in torch xla eco system?\r\n\r\nIn JAX we can do the following:\r\n```python\r\nfrom jax.lib.xla_bridge import xla_client\r\n\r\nfname = \"model.hlo.pb\"\r\nwith open(fname, mode=\"rb\") as f:\r\n  comp = xla_client.XlaComputation(f.read())\r\n\r\nprint(comp.as_hlo_text())\r\n```\r\n\r\nResult:\r\n\r\n```c\r\nHloModule Test, entry_computation_layout={(f32[5]{0})->f32[5]{0}}\r\n\r\n%test_add_one_func.0 (x.1: f32[]) -> f32[] {\r\n  %x.1 = f32[] parameter(0)\r\n  %y.2 = f32[] constant(1)\r\n  ROOT %add.0 = f32[] add(f32[] %x.1, f32[] %y.2)\r\n}\r\n\r\nENTRY %main (x: f32[5]) -> f32[5] {\r\n  %x = f32[5]{0} parameter(0)\r\n  ROOT %bar = f32[5]{0} map(f32[5]{0} %x), dimensions={0}, to_apply=%test_add_one_func.0\r\n}\r\n```",
    "url": "https://github.com/pytorch/xla/issues/7232",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-10T20:50:31Z",
    "updated_at": "2025-06-05T01:49:49Z",
    "user": "apivovarov"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 802,
    "title": "Long running transcription using webgpu-whisper",
    "body": "### Question\r\n\r\nNoob question - the [webgpu-whisper](https://github.com/xenova/transformers.js/tree/v3/examples/webgpu-whisper) demo does real time transcription, however it doesn't build out a full transcript from the start ie. 2 mins into transcription, the first few transcribed lines disappear. \r\n\r\nTranscript at time x \ud83d\udc47 \r\n```\r\nCool, let's test this out. We'll see how this works. So turns out that the transcription when I try to access it is actually just empty. And so the only thing that actually comes through is. So yeah, so the output that's getting cut is basically coming from the\r\n```\r\n\r\nTranscript at time x+1 \ud83d\udc47 \r\n```\r\nthis out, we'll see how this works. So turns out that the transcription when I try to access it is actually just empty. And so the only thing that actually comes through is. So yeah, so the output that's getting cut is basically coming from the work\r\n```\r\n\r\nNote how the \"Cool, let's test\" is missing from the start of the second transcript. \r\n\r\nI'm wondering what it would take to keep building the transcript for a long running meeting without losing any of the previously transcribed stuff? \r\n\r\nI tried a naive appending approach and that just results in a transcript full of repetition. \r\n\r\nSo I'm very curious about what it would take to build out a streaming transcription similar to what something like [Deepgram](https://developers.deepgram.com/docs/node-sdk-streaming-transcription) would offer. Would that require a change to the pipeline? Are there models that can take an appended transcript with lots of repetition and trim it down to a clean transcript?\r\n\r\nPlease let me know if my questions are unclear. Just looking for some direction so that I can potentially put up a PR for this (if needed).\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/802",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-10T16:44:01Z",
    "updated_at": "2025-05-30T05:52:37Z",
    "user": "iamhitarth"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2738,
    "title": "How is `max_length` taken into account compared to models setting",
    "body": "What happens under the hood, if I set max_length > than model's max_length?\r\n\r\n\r\nit seems to work, but are inputs truncated or doi you apply RoPE-Extension?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2738",
    "state": "open",
    "labels": [],
    "created_at": "2024-06-09T15:59:09Z",
    "updated_at": "2024-06-10T06:45:49Z",
    "user": "l4b4r4b4b4"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6961,
    "title": "Manual downloads should count as downloads",
    "body": "### Feature request\n\nI would like to request that manual downloads of data files from Hugging Face dataset repositories count as downloads of a dataset. According to the documentation for the Hugging Face Hub, that is currently not the case: https://huggingface.co/docs/hub/en/datasets-download-stats\n\n### Motivation\n\nThis would ensure that downloads are accurately reported to end users.\n\n### Your contribution\n\nN/A",
    "url": "https://github.com/huggingface/datasets/issues/6961",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-06-09T04:52:06Z",
    "updated_at": "2024-06-13T16:05:00Z",
    "comments": 1,
    "user": "umarbutler"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8439,
    "title": "How to use EDM2 model with diffusers?",
    "body": "model safetensors: https://huggingface.co/RedRocket/Fluffyrock-Unbound/blob/main/Fluffyrock-Unbound-v1-1.safetensors\r\nyaml: https://huggingface.co/RedRocket/Fluffyrock-Unbound/raw/main/Fluffyrock-Unbound-v1-1.yaml\r\n\r\ncolab demo:\r\n\r\nhttps://colab.research.google.com/drive/1LSGvjWXNVjs6Tthcpf0F5VwuTFJ_d-oB\r\n\r\nresults:\r\n\r\n![Untitled](https://github.com/huggingface/diffusers/assets/151509142/50df4aae-cf88-436d-a76f-c25bda0f7e76)\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/8439",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2024-06-09T03:39:05Z",
    "updated_at": "2024-09-14T15:10:19Z",
    "user": "s9anus98a"
  },
  {
    "repo": "huggingface/transformers",
    "number": 31323,
    "title": "Language modeling examples do not show how to do multi-gpu training / fine-tuning",
    "body": "### System Info\r\n\r\n- `transformers` version: 4.41.2\r\n- Platform: Linux-5.15.0-1042-nvidia-x86_64-with-glibc2.35\r\n- Python version: 3.9.18\r\n- Huggingface_hub version: 0.23.3\r\n- Safetensors version: 0.4.2\r\n- Accelerate version: 0.31.0\r\n- Accelerate config: \tnot found\r\n- PyTorch version (GPU?): 2.2.1+cu121 (True)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n\r\n\r\n### Who can help?\r\n\r\n@muellerz @stevhliu \r\n\r\n### Information\r\n\r\n- [X] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [X] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nn/a\r\n\r\n### Expected behavior\r\n\r\nThe `run_clm.py` and other related scripts in:\r\n\r\n`https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling`\r\n\r\nnotionally support training / fine-tuning of models whose gradients are too large to fit on a single GPU, if you believe their CLI.  However there is no example showing how to actually do that.\r\n\r\nFor instance, `accelerate estimate-memory` says training the Mistral-7B family with Adam takes roughly 55 GB with float16, which is more memory than a single 40GB A100 has.  So I'd need to use more than one GPU.\r\n\r\nWould it be possible to modify the language_modeling documentation to explain how to do that?\r\n\r\n",
    "url": "https://github.com/huggingface/transformers/issues/31323",
    "state": "closed",
    "labels": [
      "Documentation"
    ],
    "created_at": "2024-06-07T18:49:35Z",
    "updated_at": "2024-12-02T08:11:31Z",
    "user": "csiefer2"
  },
  {
    "repo": "huggingface/candle",
    "number": 2258,
    "title": "How to Implement New Operators Using CUDA Host Functions Along with Thrust and CUB Libraries",
    "body": "As stated, the CUDA code in the candle-kernels repository seems to only contain kernel functions. When I want to implement new operators (such as nonzero), it seems I'm only able to use Rust for higher-level functionality, which means I cannot utilize the device_vector from Thrust or the flagged APIs from CUB. This poses a significant challenge for implementing my algorithms. For example, to implement nonzero, it seems I would have to reimplement algorithms like exclusive_scan and scatter using the current approach?\r\n\r\nI am hoping for a better way to utilize the CUDA ecosystem!\r\n\r\nSpecifically, I'm interested in how to:\r\n\r\n1. Incorporate host functions in CUDA code to facilitate the use of libraries like Thrust and CUB.\r\n2. Effectively leverage these libraries to implement algorithms and operators that are not natively supported in the current codebase.\r\nAny guidance or best practices for achieving this would be greatly appreciated.\r\n(Translate from Chinese using LLM, Might be a little bit.. formal^_^)",
    "url": "https://github.com/huggingface/candle/issues/2258",
    "state": "open",
    "labels": [],
    "created_at": "2024-06-07T16:52:44Z",
    "updated_at": "2024-06-09T15:56:36Z",
    "user": "chenwanqq"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 2035,
    "title": "What is TGI's graceful shutdown behavior?",
    "body": "When SIGKILL arrives, \r\n\r\n- does TGI process all pending inputs?\r\n- does TGI blocks incoming inputs?\r\n\r\nI saw a PR that adds graceful shutdown but it did not specify the exact program behavior. ",
    "url": "https://github.com/huggingface/text-generation-inference/issues/2035",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-07T06:24:00Z",
    "updated_at": "2024-06-07T08:08:51Z",
    "user": "seongminp"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1549,
    "title": "How to use `TokenizerBuilder`?",
    "body": "I expected `TokenizerBuilder` to produce a `Tokenizer` from the `build()` result, but instead `Tokenizer` wraps `TokenizerImpl`.\r\n\r\nNo problem, I see that it impl `From<TokenizerImpl> for Tokenizer`, but it's attempting to do quite a bit more for some reason? Meanwhile I cannot use `Tokenizer(unwrapped_build_result_here)` as the struct is private \ud83e\udd14 (_while the `Tokenizer::new()` method won't take this in either_)\r\n\r\n---\r\n\r\n```rs\r\nlet mut tokenizer = Tokenizer::from(TokenizerBuilder::new()\r\n    .with_model(unigram)\r\n    .with_decoder(Some(decoder))\r\n    .with_normalizer(Some(normalizer))\r\n    .build()\r\n    .map_err(anyhow::Error::msg)?\r\n);\r\n```\r\n\r\n```rs\r\nerror[E0283]: type annotations needed\r\n   --> mistralrs-core/src/pipeline/gguf_tokenizer.rs:139:41\r\n    |\r\n139 |     let mut tokenizer = Tokenizer::from(TokenizerBuilder::new()\r\n    |                                         ^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `PT` declared on the struct `TokenizerBuilder`\r\n    |\r\n    = note: cannot satisfy `_: tokenizers::PreTokenizer`\r\n    = help: the following types implement trait `tokenizers::PreTokenizer`:\r\n              tokenizers::pre_tokenizers::bert::BertPreTokenizer\r\n              tokenizers::decoders::byte_level::ByteLevel\r\n              tokenizers::pre_tokenizers::delimiter::CharDelimiterSplit\r\n              tokenizers::pre_tokenizers::digits::Digits\r\n              tokenizers::decoders::metaspace::Metaspace\r\n              tokenizers::pre_tokenizers::punctuation::Punctuation\r\n              tokenizers::pre_tokenizers::sequence::Sequence\r\n              tokenizers::pre_tokenizers::split::Split\r\n            and 4 others\r\nnote: required by a bound in `tokenizers::TokenizerBuilder::<M, N, PT, PP, D>::new`\r\n   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokenizers-0.19.1/src/tokenizer/mod.rs:314:9\r\n    |\r\n314 |     PT: PreTokenizer,\r\n    |         ^^^^^^^^^^^^ required by this bound in `TokenizerBuilder::<M, N, PT, PP, D>::new`\r\n...\r\n319 |     pub fn new() -> Self {\r\n    |            --- required by a bound in this associated function\r\nhelp: consider specifying the generic arguments\r\n    |\r\n139 |     let mut tokenizer = Tokenizer::from(TokenizerBuilder::<tokenizers::models::unigram::Unigram, tokenizers::NormalizerWrapper, PT, PP, tokenizers::DecoderWrapper>::new()\r\n    |                                                         +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n```\r\n\r\nWhy is this an issue? Isn't the point of the builder so that you don't have to specify the optional types not explicitly set?\r\n\r\n> ```\r\n> cannot infer type of the type parameter `PT` declared on the struct `TokenizerBuilder`\r\n> ```\r\n\r\nI had a glance over the source on github but didn't see an example or test for using this API and the docs don't really cover it either.\r\n\r\n---\r\n\r\nMeanwhile with `Tokenizer` instead of `TokenizerBuilder` this works:\r\n\r\n```rs\r\nlet mut tokenizer = Tokenizer::new(tokenizers::ModelWrapper::Unigram(unigram));\r\ntokenizer.with_decoder(decoder);\r\ntokenizer.with_normalizer(normalizer);\r\n```\r\n",
    "url": "https://github.com/huggingface/tokenizers/issues/1549",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-06-07T01:18:07Z",
    "updated_at": "2024-07-20T01:52:03Z",
    "user": "polarathene"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 796,
    "title": "No performance gain on using WebGPU",
    "body": "### Question\n\nI want to use the model: https://huggingface.co/Xenova/clip-vit-large-patch14 with WebGPU for quick inference in the browser. I ran the WebGPU benchmark to observe the performance increase and indeed it showed a ~7x improvement in speed on my device.\r\n\r\nBut when I run the clip model linked above, there's barely any difference between performance with and without WebGPU.",
    "url": "https://github.com/huggingface/transformers.js/issues/796",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-06T20:16:07Z",
    "updated_at": "2024-06-09T01:44:17Z",
    "user": "mr-sarthakgupta"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1895,
    "title": "Lift upper version limit of transformers for habana",
    "body": "### Feature request\n\noptimium currently limits transformers to `>= 4.38.0, < 4.39.0`. @regisss bumped the upper version limit in PR #1851 a month ago. Is there any technical reason to limit the upper version to `< 4.39`? Other dependencies allow for more recent versions. For example neuronx allows `< 4.42.0`, see #1881.\n\n### Motivation\n\nWe would like to use newer versions of transformers and tokenizers in InstructLab. The upper version limit for optimum makes this harder on us. We need optimum-habana for Intel Gaudi support.\n\n### Your contribution\n\nI can create a PR. It's a trivial one line change.\r\n\r\nTesting is less trivial. I have access to an 8-way Gaudi 2 system, but the system is currently busy. I can do some testing in about two weeks from now after I have updated the system from 1.15.1 to 1.16.0.",
    "url": "https://github.com/huggingface/optimum/issues/1895",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-06T07:52:41Z",
    "updated_at": "2024-06-24T08:53:27Z",
    "comments": 4,
    "user": "tiran"
  },
  {
    "repo": "pytorch/xla",
    "number": 7203,
    "title": "[RFC] PR Cherrypicking Process After a Release Branch Cut",
    "body": "## \ud83d\ude80 Feature\r\n\r\nIn this RFC, we propose the policy aiming to guide the decision-making process for determining whether Pull Requests (PRs) should be cherry-picked onto a release branch after the release branch has been cut. The goal is to maintain the stability and predictability of releases while addressing critical issues and incorporating essential improvements.\r\n\r\n## Motivation\r\n\r\nCherry-picking pull requests (PRs) onto a release branch can introduce additional overhead and goes against established best practices. While cherry-picks are sometimes unavoidable, we can mitigate their necessity through well-defined policies. This proposal outlines a framework for making informed decisions about when and how to cherry-pick changes.\r\n\r\n## Proposed Policies:\r\n\r\nThe following outlines the specific scenarios under which cherry-picking pull requests (PRs) onto a release branch will be considered acceptable after the official release branch cut.\r\n\r\n- The PR is for __severe/P0__ bug fixing purposes\r\n- The PR is for improving __unforeseen__ code stability or security issues\r\n- The PR has __significant__ impact on usability improvements\r\n- The PR is related to a planned release feature __urgent fix__\r\n- The PR only updates documentation, not changing any code\r\n- The PR is for improving release infrastructure\r\n",
    "url": "https://github.com/pytorch/xla/issues/7203",
    "state": "open",
    "labels": [
      "RFC"
    ],
    "created_at": "2024-06-05T22:19:07Z",
    "updated_at": "2025-09-11T23:04:41Z",
    "comments": 2,
    "user": "lsy323"
  },
  {
    "repo": "huggingface/peft",
    "number": 1829,
    "title": "How to change to PEFT model dynamically?",
    "body": "python==3.7.12\r\nPEFT==0.3.0\r\n\r\n@BenjaminBossan \r\n\r\nI fine-tune the eleventh transformer of Bert as below:\r\n\r\n```bash\r\ntarget_modules = []\r\ntarget_modules.append(\"11.attention.self.query\")\r\ntarget_modules.append(\"11.attention.self.value\")\r\n\r\nlora_config = LoraConfig(\r\n    r = self.args.lora_rank,\r\n    lora_alpha = self.args.lora_alpha,\r\n    target_modules = target_modules,\r\n    lora_dropout = 0.05,\r\n    bias = \"none\"\r\n)\r\n```\r\n\r\nAfter training for a few epochs, I also want to fine-tune the first transformer. How to achieve this?\r\n\r\n",
    "url": "https://github.com/huggingface/peft/issues/1829",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-05T13:24:40Z",
    "updated_at": "2024-06-06T00:37:06Z",
    "user": "whr819987540"
  },
  {
    "repo": "pytorch/xla",
    "number": 7196,
    "title": "Distributed spmd training with multiple compilations",
    "body": "## \u2753 Questions and Help\r\nWhen starting gpu spmd training with `torchrun`, why does it need to be compiled once per machine? Although the resulting graph is the same. Is there any way to avoid it",
    "url": "https://github.com/pytorch/xla/issues/7196",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-05T08:46:55Z",
    "updated_at": "2025-04-07T13:32:17Z",
    "user": "mars1248"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 857,
    "title": "[Feature Request]: Continuous batching",
    "body": "Does torchchat plan to support asynchronous requests and continuous batching?\r\n\r\n\r\nTo get higher tokens/second by making efficient use of compute, continuous batching is a common strategy that is used.\r\n\r\nWe could specify the `batch_size` `n` as a parameter and `torchchat` behind the scene would send `n` number of prompts with varying lengths asynchronously \r\n\r\n```\r\npython3 torchchat.py generate llama3 --prompt \"write me a story about a boy and his bear\" --batch_size 8\r\n```\r\n",
    "url": "https://github.com/pytorch/torchchat/issues/857",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-05T02:22:36Z",
    "updated_at": "2024-06-14T09:21:53Z",
    "comments": 1,
    "user": "agunapal"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 792,
    "title": "Feature request: YOLO-World/Grounding DINO (Zero shot object detection)",
    "body": "### Question\n\nHi!\r\n\r\nI'm trying out some of the zero shot capabilities and I've been working with the owlv2 but I was wondering, is support for yolo-world and grounding Dino coming?  They seem to be faster than owlv2.\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/transformers.js/issues/792",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-04T21:39:18Z",
    "updated_at": "2024-06-24T07:04:27Z",
    "user": "rogueturnip"
  },
  {
    "repo": "pytorch/xla",
    "number": 7191,
    "title": "How do I know which pytorch parameter corresponds to which parameter in hlo ir",
    "body": "## \u2753 Questions and Help\r\n\r\nI am dumping the optimized HLO IR and designing a new backend. There are some parameters and the corresponding shapes of them in the IR file. But I don't know which parameter is which module in the defined PyTorch model. Is there a way to get the mapping details of the model's input(weights and inputs) and the parameter in the HLO IR?\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/xla/issues/7191",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-04T18:32:56Z",
    "updated_at": "2025-04-07T13:33:10Z",
    "user": "yao-jz"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 791,
    "title": "env.allowLocalModels and env.allowRemoteModels",
    "body": "### Question\n\nWhen I set env.allowLocalModels = true  and look at the env object I see both \r\nenv.allowLocalModels and env.allowRemoteModels set to true.  Does this mean that it will look for models locally first and then if not found go to the remoteHost? ",
    "url": "https://github.com/huggingface/transformers.js/issues/791",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-04T17:07:38Z",
    "updated_at": "2024-09-15T14:00:48Z",
    "user": "mram0509"
  },
  {
    "repo": "pytorch/xla",
    "number": 7189,
    "title": "Add example for training small LLM",
    "body": "## \ud83d\udcda Documentation\r\n\r\nCreate an example on how to train a small LLM.  \r\n\r\nAdd it to the examples directory here: \r\nhttps://github.com/pytorch/xla/tree/master/examples\r\n",
    "url": "https://github.com/pytorch/xla/issues/7189",
    "state": "open",
    "labels": [
      "docathon-h1-2024",
      "advanced"
    ],
    "created_at": "2024-06-04T16:42:54Z",
    "updated_at": "2024-06-19T01:14:21Z",
    "comments": 4,
    "user": "alchemicduncan"
  },
  {
    "repo": "pytorch/xla",
    "number": 7185,
    "title": "Try running inference on an ARM CPU",
    "body": "## \ud83d\udcda Documentation\r\n\r\nInstall the CPU PJRT plugin from the instructions here: \r\nhttps://github.com/pytorch/xla/blob/master/plugins/cpu/README.md \r\n\r\nNext try getting a model to run on a ARM CPU, if it works, create a tutorial on how to get it running.\r\n",
    "url": "https://github.com/pytorch/xla/issues/7185",
    "state": "open",
    "labels": [
      "docathon-h1-2024",
      "advanced"
    ],
    "created_at": "2024-06-04T16:40:13Z",
    "updated_at": "2024-06-17T17:59:07Z",
    "comments": 4,
    "user": "alchemicduncan"
  },
  {
    "repo": "pytorch/xla",
    "number": 7183,
    "title": "Create a distributed and single device example",
    "body": "## \ud83d\udcda Documentation\r\n\r\nSelect a model of your own to train.  Then create an example of both running it on a single device, and running it on a distributed device of your choice. \r\n\r\nAdd both training examples that you came up with to the examples directory: https://github.com/pytorch/xla/tree/master/examples",
    "url": "https://github.com/pytorch/xla/issues/7183",
    "state": "open",
    "labels": [
      "docathon-h1-2024",
      "advanced"
    ],
    "created_at": "2024-06-04T16:38:24Z",
    "updated_at": "2025-06-08T02:04:27Z",
    "comments": 1,
    "user": "alchemicduncan"
  },
  {
    "repo": "pytorch/xla",
    "number": 7182,
    "title": "Try running Resnet example on GPU",
    "body": "## \ud83d\udcda Documentation\r\n\r\nTry running the Resnet training example on a GPU: https://github.com/pytorch/xla/blob/master/examples/train_resnet_base.py \r\n\r\nIf it works add a section about how to do it to the GPU instructions here: https://github.com/pytorch/xla/blob/master/docs/gpu.md\r\n",
    "url": "https://github.com/pytorch/xla/issues/7182",
    "state": "closed",
    "labels": [
      "docathon-h1-2024",
      "medium"
    ],
    "created_at": "2024-06-04T16:37:36Z",
    "updated_at": "2024-06-11T18:37:09Z",
    "comments": 1,
    "user": "alchemicduncan"
  },
  {
    "repo": "pytorch/xla",
    "number": 7180,
    "title": "Adding a new arg to a PyTorch op",
    "body": "## \u2753 Questions and Help\r\n\r\nI'm trying to add a new (optional) argument to the `cumsum` operator in PyTorch - a boolean arg `full` which prepends a 0 to the beginning of the returned tensor.  I'd appreciate some help to figure out how to get XLA to build with this change, and what the update process should look like (considering that the XLA and pytorch repos will be out of sync during the development).\r\n\r\nPR/issue on the PyTorch side:\r\nhttps://github.com/pytorch/pytorch/pull/127675\r\nhttps://github.com/pytorch/pytorch/issues/76191\r\n\r\nThe XLA builds are failing on my PR:\r\nhttps://github.com/pytorch/pytorch/actions/runs/9360674517/job/25766868220\r\n\r\n```\r\n2024-06-04T03:56:39.3106543Z torch_xla/csrc/aten_xla_type.cpp:1147:12: error: no declaration matches 'at::Tensor torch_xla::XLANativeFunctions::cumsum(const at::Tensor&, int64_t, std::optional<c10::ScalarType>)'\r\n2024-06-04T03:56:39.3108366Z  1147 | at::Tensor XLANativeFunctions::cumsum(const at::Tensor& self, int64_t dim,\r\n2024-06-04T03:56:39.3109178Z       |            ^~~~~~~~~~~~~~~~~~\r\n2024-06-04T03:56:39.3109813Z In file included from torch_xla/csrc/aten_xla_type.cpp:22:\r\n2024-06-04T03:56:39.3111932Z bazel-out/k8-opt/bin/torch_xla/csrc/XLANativeFunctions.h:166:19: note: candidate is: 'static at::Tensor torch_xla::XLANativeFunctions::cumsum(const at::Tensor&, int64_t, std::optional<c10::ScalarType>, bool)'\r\n2024-06-04T03:56:39.3114227Z   166 | static at::Tensor cumsum(const at::Tensor & self, int64_t dim, ::std::optional<at::ScalarType> dtype, bool full);\r\n2024-06-04T03:56:39.3115256Z       |                   ^~~~~~\r\n2024-06-04T03:56:39.3115866Z In file included from torch_xla/csrc/aten_xla_type.cpp:22:\r\n2024-06-04T03:56:39.3117419Z bazel-out/k8-opt/bin/torch_xla/csrc/XLANativeFunctions.h:14:8: note: 'struct torch_xla::XLANativeFunctions' defined here\r\n2024-06-04T03:56:39.3118602Z    14 | struct XLANativeFunctions {\r\n2024-06-04T03:56:39.3119113Z       |        ^~~~~~~~~~~~~~~~~~\r\n```\r\n\r\nI've tried patching the build on the XLA side: \r\nhttps://github.com/pytorch/xla/compare/master...davidberard98:xla:update-cumsum-args?expand=1\r\n\r\nThis works when combined with my changes on the PyTorch side, but not when combined with the main branch of PyTorch today. i.e.:\r\n* trunk pytorch + trunk xla -> builds\r\n* pytorch w/ my patches + xla w/ my patches -> builds\r\n* trunk pytorch + xla w/ my patches -> does not build \r\n\r\nIt seems like the issue is that the definition in `torch_xla/csrc/aten_xla_type.cpp` needs to match the signature in XLANativeFunctions.h (presumably code-genned from native_functions.yaml or similar?)",
    "url": "https://github.com/pytorch/xla/issues/7180",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-04T16:35:37Z",
    "updated_at": "2024-06-10T16:47:49Z",
    "comments": 0,
    "user": "davidberard98"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 8400,
    "title": "how can we load model to lora from singlefile ? ",
    "body": "    pipe.load_lora_weights(\"lora/aesthetic_anime_v1s.safetensors\")\r\n  File \"Z:\\software\\python11\\Lib\\site-packages\\diffusers\\loaders\\lora.py\", line 1230, in load_lora_weights\r\n    raise ValueError(\"PEFT backend is required for this method.\")\r\nValueError: PEFT backend is required for this method.\r\n\r\npipe.load_lora_weights(\"lora/aesthetic_anime_v1s.safetensors\")\r\n\r\nhow can i use this model https://civitai.com/models/295100?modelVersionId=331598\r\n\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/8400",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-04T13:54:56Z",
    "updated_at": "2024-06-04T15:53:32Z",
    "user": "xalteropsx"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6953,
    "title": "Remove canonical datasets from docs",
    "body": "Remove canonical datasets from docs, now that we no longer have canonical datasets.",
    "url": "https://github.com/huggingface/datasets/issues/6953",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-06-04T12:09:03Z",
    "updated_at": "2024-07-01T11:31:25Z",
    "comments": 1,
    "user": "albertvillanova"
  },
  {
    "repo": "pytorch/ao",
    "number": 320,
    "title": "Saving autoquant quantization plan",
    "body": "First of all, thank you for the great library! It makes quantization really easy.\r\n\r\nIs it possible to run autoquant once and later applying the same quantization plan again? Or would I need to manually look at logs right now to see what autoquant came up with so I can apply the same quantization later?\r\n\r\n// I see there's `AUTOQUANT_CACHE` that gets used to save the timings, maybe just saving/loading that will do?\r\n// Seems like ^ works!",
    "url": "https://github.com/pytorch/ao/issues/320",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-04T11:10:41Z",
    "updated_at": "2024-06-07T10:45:07Z",
    "user": "RobinKa"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6951,
    "title": "load_dataset() should load all subsets, if no specific subset is specified",
    "body": "### Feature request\n\nCurrently load_dataset() is forcing users to specify a subset. Example\r\n\r\n`from datasets import load_dataset\r\ndataset = load_dataset(\"m-a-p/COIG-CQIA\")`\r\n\r\n```---------------------------------------------------------------------------\r\nValueError                                Traceback (most recent call last)\r\n[<ipython-input-10-c0cb49385da6>](https://localhost:8080/#) in <cell line: 2>()\r\n      1 from datasets import load_dataset\r\n----> 2 dataset = load_dataset(\"m-a-p/COIG-CQIA\")\r\n\r\n3 frames\r\n[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _create_builder_config(self, config_name, custom_features, **config_kwargs)\r\n    582                     if not config_kwargs:\r\n    583                         example_of_usage = f\"load_dataset('{self.dataset_name}', '{self.BUILDER_CONFIGS[0].name}')\"\r\n--> 584                         raise ValueError(\r\n    585                             \"Config name is missing.\"\r\n    586                             f\"\\nPlease pick one among the available configs: {list(self.builder_configs.keys())}\"\r\n\r\nValueError: Config name is missing.\r\nPlease pick one among the available configs: ['chinese_traditional', 'coig_pc', 'exam', 'finance', 'douban', 'human_value', 'logi_qa', 'ruozhiba', 'segmentfault', 'wiki', 'wikihow', 'xhs', 'zhihu']\r\nExample of usage:\r\n\t`load_dataset('coig-cqia', 'chinese_traditional')`\r\n```\r\nThis means a dataset cannot contain all the subsets at the same time. I guess one workaround is to manually specify the subset files like in [here](https://huggingface.co/datasets/m-a-p/COIG-CQIA/discussions/1#658698b44bb41498f75c5622), which is clumsy.\r\n\r\n\r\n\n\n### Motivation\n\nIdeally, if not subset is specified, the API should just try to load all subsets. This makes it much easier to handle datasets w/ subsets.\n\n### Your contribution\n\nNot sure since I'm not familiar w/ the lib src.",
    "url": "https://github.com/huggingface/datasets/issues/6951",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-06-04T11:02:33Z",
    "updated_at": "2024-11-26T08:32:18Z",
    "comments": 5,
    "user": "windmaple"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6950,
    "title": "`Dataset.with_format` behaves inconsistently with documentation",
    "body": "### Describe the bug\n\nThe actual behavior of the interface `Dataset.with_format` is inconsistent with the documentation.\r\nhttps://huggingface.co/docs/datasets/use_with_pytorch#n-dimensional-arrays\r\nhttps://huggingface.co/docs/datasets/v2.19.0/en/use_with_tensorflow#n-dimensional-arrays\r\n\r\n> If your dataset consists of N-dimensional arrays, you will see that by default they are considered as nested lists.\r\n> In particular, a PyTorch formatted dataset outputs nested lists instead of a single tensor.\r\n> A TensorFlow formatted dataset outputs a RaggedTensor instead of a single tensor.\r\n\r\nBut I get a single tensor by default, which is  inconsistent with the description.\r\n\r\nActually the current behavior seems more reasonable to me. Therefore, the document needs to be modified.\n\n### Steps to reproduce the bug\n\n```python\r\n>>> from datasets import Dataset\r\n>>> data = [[[1, 2],[3, 4]],[[5, 6],[7, 8]]]\r\n>>> ds = Dataset.from_dict({\"data\": data})\r\n>>> ds = ds.with_format(\"torch\")\r\n>>> ds[0]\r\n{'data': tensor([[1, 2],\r\n        [3, 4]])}\r\n>>> ds = ds.with_format(\"tf\")\r\n>>> ds[0]\r\n{'data': <tf.Tensor: shape=(2, 2), dtype=int64, numpy=\r\narray([[1, 2],\r\n       [3, 4]])>}\r\n```\n\n### Expected behavior\n\n```python\r\n>>> from datasets import Dataset\r\n>>> data = [[[1, 2],[3, 4]],[[5, 6],[7, 8]]]\r\n>>> ds = Dataset.from_dict({\"data\": data})\r\n>>> ds = ds.with_format(\"torch\")\r\n>>> ds[0]\r\n{'data': [tensor([1, 2]), tensor([3, 4])]}\r\n>>> ds = ds.with_format(\"tf\")\r\n>>> ds[0]\r\n{'data': <tf.RaggedTensor [[1, 2], [3, 4]]>}\r\n```\n\n### Environment info\n\ndatasets==2.19.1\r\ntorch==2.1.0\r\ntensorflow==2.13.1",
    "url": "https://github.com/huggingface/datasets/issues/6950",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-06-04T09:18:32Z",
    "updated_at": "2024-06-25T08:05:49Z",
    "comments": 2,
    "user": "iansheng"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2708,
    "title": "What is the training order in the multi-task learning example?",
    "body": "hello. In the case of multi-task learning in the example below, what is the learning order? The example below is taken from https://www.sbert.net/examples/training/quora_duplicate_questions/README.html. \r\n\r\nRegarding the dataset below, I know that the learning results are good if you learn mnrl after learning the cl dataset. Does the learning proceed sequentially like this? Or does it go the other way? Simply put, which of the three below is your learning order?\r\n1. cl -> mnrl\r\n2. mnrl -> cl\r\n3. shuffled two datasets\r\n\r\n\r\n```\r\nMulti-Task-Learning\r\n\r\n[ContrastiveLoss]\r\n(https://www.sbert.net/docs/package_reference/sentence_transformer/losses.html#sentence_transformers.losses.ContrastiveLoss) works well for pair classification, i.e., given two pairs, are these duplicates or not. It pushes negative pairs far away in vector space, so that the distinguishing between duplicate and non-duplicate pairs works good.\r\n\r\n\r\n[MultipleNegativesRankingLoss]\r\n(https://www.sbert.net/docs/package_reference/sentence_transformer/losses.html#sentence_transformers.losses.MultipleNegativesRankingLoss) on the other sides mainly reduces the distance between positive pairs out of large set of possible candidates. However, the distance between non-duplicate questions is not so large, so that this loss does not work that well for pair classification.\r\n\r\nIn [training_multi-task-learning.py](https://github.com/UKPLab/sentence-transformers/tree/master/examples/training/quora_duplicate_questions/training_multi-task-learning.py) I demonstrate how we can train the network with both losses. The essential code is to define both losses and to pass it to the fit method.\r\n```\r\n\r\n```py\r\n\r\nfrom datasets import load_dataset\r\nfrom sentence_transformers.losses import ContrastiveLoss, MultipleNegativesRankingLoss\r\nfrom sentence_transformers import SentenceTransformerTrainer, SentenceTransformer\r\n\r\nmodel_name = \"stsb-distilbert-base\"\r\nmodel = SentenceTransformer(model_name)\r\n\r\n# https://huggingface.co/datasets/sentence-transformers/quora-duplicates\r\nmnrl_dataset = load_dataset(\r\n    \"sentence-transformers/quora-duplicates\", \"triplet\", split=\"train\"\r\n)  # The \"pair\" subset also works\r\nmnrl_train_dataset = mnrl_dataset.select(range(100000))\r\nmnrl_eval_dataset = mnrl_dataset.select(range(100000, 101000))\r\n\r\nmnrl_train_loss = MultipleNegativesRankingLoss(model=model)\r\n\r\n# https://huggingface.co/datasets/sentence-transformers/quora-duplicates\r\ncl_dataset = load_dataset(\"sentence-transformers/quora-duplicates\", \"pair-class\", split=\"train\")\r\ncl_train_dataset = cl_dataset.select(range(100000))\r\ncl_eval_dataset = cl_dataset.select(range(100000, 101000))\r\n\r\ncl_train_loss = ContrastiveLoss(model=model, margin=0.5)\r\n\r\n# Create the trainer & start training\r\ntrainer = SentenceTransformerTrainer(\r\n    model=model,\r\n    train_dataset={\r\n        \"mnrl\": mnrl_train_dataset,\r\n        \"cl\": cl_train_dataset,\r\n    },\r\n    eval_dataset={\r\n        \"mnrl\": mnrl_eval_dataset,\r\n        \"cl\": cl_eval_dataset,\r\n    },\r\n    loss={\r\n        \"mnrl\": mnrl_train_loss,\r\n        \"cl\": cl_train_loss,\r\n    },\r\n)\r\ntrainer.train()\r\n\r\n```\r\n",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2708",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-04T07:42:37Z",
    "updated_at": "2024-06-04T08:29:30Z",
    "user": "daegonYu"
  },
  {
    "repo": "pytorch/xla",
    "number": 7177,
    "title": "Why not register low precision autocast for scaled dot product attention?",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\nMultiHeadAttention can not run with auto mixed precision mode.\r\n\r\n\r\nSteps to reproduce the behavior:\r\n\r\n```bash\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch_xla\r\nimport torch_xla.core.xla_model as xm\r\n\r\nxla_device = xm.xla_device()\r\nembed_dim = 1024\r\nnum_heads = 64\r\nmultihead_attn = nn.MultiheadAttention(embed_dim, num_heads)\r\ninput = torch.ones([4,32,1024], dtype=torch.float32).to(xla_device)\r\nattn_mask = torch.ones([32,32], dtype=torch.float32).to(xla_device)\r\nmultihead_attn = nn.MultiheadAttention(embed_dim, num_heads, batch_first=True).to(xla_device)\r\nwith torch.amp.autocast(\"xla\", dtype=torch.float16):\r\n  attn_output = multihead_attn(input, input, input, attn_mask=attn_mask, need_weights=False)\r\nxm.mark_step()\r\nprint(attn_output[0].dtype)\r\nprint(attn_output)\r\n```\r\n\r\nRuntimeError: Expected attn_mask dtype to be bool or to match query dtype, but got attn_mask.dtype: float and  query.dtype: c10::Half instead.\r\n\r\n## Expected behavior\r\n\r\nMultiHeadAttention module can run successfully and get correct result tensor type.\r\n\r\n## Environment\r\n\r\n - Reproducible on XLA backend [CPU/TPU/CUDA]: CPU\r\n\r\n\r\n## Additional context\r\n\r\nThough I reproduce the bug by CPU, but I believe it will occur with any kind of pjrt device except cuda. I can reproduce it on intel gpu also. To solve this bug, we only need to register low precision autocast for scaled dot product attention and has verified it. I want to ask why we don't register this and does there exist any problem?\r\n",
    "url": "https://github.com/pytorch/xla/issues/7177",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-04T06:17:53Z",
    "updated_at": "2024-06-17T02:58:42Z",
    "comments": 2,
    "user": "ghost"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6949,
    "title": "load_dataset error",
    "body": "### Describe the bug\n\nWhy does the program get stuck when I use load_dataset method, and it still gets stuck after loading for several hours? In fact, my json file is only 21m, and I can load it in one go using open('', 'r').\n\n### Steps to reproduce the bug\n\n1. pip install datasets==2.19.2\r\n2. from datasets import Dataset, DatasetDict, NamedSplit, Split, load_dataset\r\n3. data = load_dataset('json', data_files='train.json')\n\n### Expected behavior\n\nIt is able to load my json correctly\n\n### Environment info\n\ndatasets==2.19.2",
    "url": "https://github.com/huggingface/datasets/issues/6949",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-04T01:24:45Z",
    "updated_at": "2024-07-01T11:33:46Z",
    "comments": 2,
    "user": "frederichen01"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 789,
    "title": "Can I use Xenova/Phi-3-mini-4k-instruct model server side?",
    "body": "### Question\n\nHey there! I\u2019m trying to run Xenova/Phi-3-mini-4k-instruct model using transformers.js 2.17.2 on the server in my Node.js project, but I get an error saying that Phi-3 is not supported. Can I make it work somehow? Any ideas appreciated",
    "url": "https://github.com/huggingface/transformers.js/issues/789",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-03T18:43:20Z",
    "updated_at": "2024-06-04T04:57:42Z",
    "user": "StepanKukharskiy"
  },
  {
    "repo": "pytorch/serve",
    "number": 3172,
    "title": "Two-way authentication/Mutual SSL in gRPC",
    "body": "### \ud83d\ude80 The feature\n\nTorchserve currently supports SSL for gRPC but one way authentication. Can we make it two way ?\n\n### Motivation, pitch\n\nMore security\n\n### Alternatives\n\nreverse proxy like nginx is an option i think\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/3172",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-06-03T14:58:07Z",
    "updated_at": "2024-06-03T17:37:53Z",
    "comments": 0,
    "user": "MohamedAliRashad"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6947,
    "title": "FileNotFoundError\uff1aerror  when loading C4 dataset",
    "body": "### Describe the bug\r\n\r\ncan't load c4 datasets\r\n\r\nWhen I replace the datasets package to 2.12.2 I get raise datasets.utils.info_utils.ExpectedMoreSplits: {'train'}\r\n\r\nHow can I fix this\uff1f\r\n\r\n### Steps to reproduce the bug\r\n\r\n1.from datasets import load_dataset\r\n2.dataset = load_dataset('allenai/c4', data_files={'validation': 'en/c4-validation.00003-of-00008.json.gz'}, split='validation')\r\n3.   raise FileNotFoundError(\r\nFileNotFoundError: Couldn't find a dataset script at local_path/c4_val/allenai/c4/c4.py or any data file in the same directory. Couldn't find 'allenai/c4' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/allenai/c4@1588ec454efa1a09f29cd18ddd04fe05fc8653a2/en/c4-validation.00003-of-00008.json.gz' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.parquet', '.geoparquet', '.gpq', '.arrow', '.txt', '.tar', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.h5', '.hdf', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.H5', '.HDF', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.zip']\r\n### Expected behavior\r\n\r\n\r\nThe data was successfully imported\r\n\r\n### Environment info\r\n\r\npython version 3.9\r\ndatasets version 2.19.2",
    "url": "https://github.com/huggingface/datasets/issues/6947",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-03T13:06:33Z",
    "updated_at": "2024-06-25T06:21:28Z",
    "comments": 15,
    "user": "W-215"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2878,
    "title": "Remove or increase the 5GB limit?",
    "body": "The dataset viewer shows statistics and provides filter + sort + search only for the first 5GB of each split. We are also unable to provide the exact number of rows for bigger splits.\r\n\r\nNote that we \"show\" all the rows for parquet-native datasets (i.e., we can access the rows randomly, i.e., we have pagination).\r\n\r\nShould we provide a way to increase or remove this limit?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2878",
    "state": "closed",
    "labels": [
      "question",
      "feature request"
    ],
    "created_at": "2024-06-03T08:55:08Z",
    "updated_at": "2024-07-22T11:32:49Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/transformers",
    "number": 31195,
    "title": "How to get back the input time series after using PatchTSTForPretraining?",
    "body": "### System Info\n\n-\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nMy model is PatchTSTForPretraining(\r\n  (model): PatchTSTModel(\r\n    (scaler): PatchTSTScaler(\r\n      (scaler): PatchTSTStdScaler()\r\n    )\r\n    (patchifier): PatchTSTPatchify()\r\n    (masking): PatchTSTMasking()\r\n    (encoder): PatchTSTEncoder(\r\n      (embedder): PatchTSTEmbedding(\r\n        (input_embedding): Linear(in_features=5, out_features=768, bias=True)\r\n      )\r\n      (positional_encoder): PatchTSTPositionalEncoding(\r\n        (positional_dropout): Identity()\r\n      )\r\n      (layers): ModuleList(\r\n        (0-11): 12 x PatchTSTEncoderLayer(\r\n          (self_attn): PatchTSTAttention(\r\n            (k_proj): Linear(in_features=768, out_features=768, bias=True)\r\n            (v_proj): Linear(in_features=768, out_features=768, bias=True)\r\n            (q_proj): Linear(in_features=768, out_features=768, bias=True)\r\n            (out_proj): Linear(in_features=768, out_features=768, bias=True)\r\n          )\r\n          (dropout_path1): Identity()\r\n          (norm_sublayer1): PatchTSTBatchNorm(\r\n            (batchnorm): BatchNorm1d(768, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n          )\r\n          (ff): Sequential(\r\n            (0): Linear(in_features=768, out_features=3072, bias=True)\r\n            (1): GELUActivation()\r\n            (2): Identity()\r\n            (3): Linear(in_features=3072, out_features=768, bias=True)\r\n          )\r\n          (dropout_path3): Identity()\r\n          (norm_sublayer3): PatchTSTBatchNorm(\r\n            (batchnorm): BatchNorm1d(768, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n          )\r\n        )\r\n      )\r\n    )\r\n  )\r\n  (head): PatchTSTMaskPretrainHead(\r\n    (dropout): Dropout(p=0.0, inplace=False)\r\n    (linear): Linear(in_features=768, out_features=5, bias=True)\r\n  )\r\n)\r\n\r\nprediction_output = model(time_series_data)\r\n\r\nOutput:\r\n\r\ntime_series_data = tensor([[[430.3000],\r\n         [431.7600],\r\n         [431.7600],\r\n         [431.7600],\r\n         [431.7600],\r\n         [431.7600],\r\n         [431.7600],\r\n         [431.7600],\r\n         [431.7600],\r\n         [430.3000],\r\n         [430.3000],\r\n         [428.9600],\r\n         [430.3000],\r\n         [430.3000],\r\n         [430.3000]]], device='cuda:0')\r\nprediction_output = tensor([[[[-0.2321,  0.1897,  0.4731,  0.8893,  0.6723],\r\n          [-0.5465, -0.9017,  0.0778,  0.0078,  1.3323],\r\n          [ 0.4945,  0.5145, -0.5386, -0.7045, -1.5766],\r\n          [ 0.2064,  0.6290, -0.8145,  1.0450, -0.2886]]]], device='cuda:0')\n\n### Expected behavior\n\nx_hat = self.head(model_output.last_hidden_state) produces output which is not consistent to the range of input time series values. I am trying to pretrain PatchTST for autoencoding. How do I get back the input time series?",
    "url": "https://github.com/huggingface/transformers/issues/31195",
    "state": "closed",
    "labels": [],
    "created_at": "2024-06-03T06:44:31Z",
    "updated_at": "2024-10-26T07:44:56Z",
    "user": "nikhilajoshy"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1885,
    "title": "onnx optimum ORTOptimizer inference runs slower than setfit.export_onnx runtime.InferenceSession inference",
    "body": "### System Info\r\n\r\nHi,\r\n\r\ni did a test between onnx optimum export + ORTOptimizer inference vs. setfit.export_onnx + onnxruntime.InferenceSession.\r\n\r\nit seems that onnx optimum ORTOptimizer inference runs slower than setfit.export_onnx runtime.InferenceSession inference\r\nany idea why is that the reason?\r\n\r\ni also changed from AutoOptimizationConfig.O2() =AutoOptimizationConfig.O4() - still onnxruntime.InferenceSession is faster.\r\n\r\nset train_model = True - to train the finetuned model before and export it.\r\ngpu: nvidia T4\r\n\r\noutput:\r\n```\r\npython setfit-onnx-optimum-example.py\r\nRepo card metadata block was not found. Setting CardData to empty.\r\nModel size (MB) - 86.68\r\nAccuracy on test set - 0.888\r\nAverage latency (ms) - 6.23 +\\- 0.51\r\nFramework not specified. Using pt to export the model.\r\nUsing the export variant default. Available variants are:\r\n    - default: The default ONNX variant.\r\n\r\n***** Exporting submodel 1/1: BertModel *****\r\nUsing framework PyTorch: 2.2.1+cu121\r\nOverriding 1 configuration item(s)\r\n        - use_cache -> False\r\n2024-06-02 22:27:53.640590789 [W:onnxruntime:, session_state.cc:1166 VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.\r\n2024-06-02 22:27:53.640623671 [W:onnxruntime:, session_state.cc:1168 VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.\r\n/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/optimum/onnxruntime/configuration.py:770: FutureWarning: disable_embed_layer_norm will be deprecated soon, use disable_embed_layer_norm_fusion instead, disable_embed_layer_norm_fusion is set to True.\r\n  warnings.warn(\r\nOptimizing model...\r\nConfiguration saved in all-MiniLM-L6-v2_auto_opt_O2/ort_config.json\r\nOptimized model saved at: all-MiniLM-L6-v2_auto_opt_O2 (external data format: False; saved all tensor to one file: True)\r\n2024-06-02 22:27:55.548291362 [W:onnxruntime:, session_state.cc:1166 VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.\r\n2024-06-02 22:27:55.548316947 [W:onnxruntime:, session_state.cc:1168 VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.\r\nModel size (MB) - 86.10\r\nAccuracy on test set - 0.888\r\nAverage latency (ms) - 1.83 +\\- 0.46\r\nSpeedup: 3.40x\r\n2024-06-02 22:27:59.483816381 [W:onnxruntime:, transformer_memcpy.cc:74 ApplyImpl] 2 Memcpy nodes are added to the graph main_graph_ed6a60ecdb95455bac10d5392cf78d36 for CUDAExecutionProvider. It might have negative impact on performance (including unable to run CUDA graph). Set session_options.log_severity_level=1 to see the detail logs before this message.\r\n2024-06-02 22:27:59.485393795 [W:onnxruntime:, session_state.cc:1166 VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.\r\n2024-06-02 22:27:59.485413289 [W:onnxruntime:, session_state.cc:1168 VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.\r\nproviders: ['CUDAExecutionProvider', 'CPUExecutionProvider']\r\nModel size (MB) - 86.23\r\nAccuracy on test set - 0.888\r\nAverage latency (ms) - 1.40 +\\- 0.17\r\nSpeedup: 4.44x\r\n```\r\n\r\ncode:\r\n```\r\n# https://github.com/huggingface/setfit/blob/main/notebooks/setfit-onnx-optimum.ipynb\r\nfrom pathlib import Path\r\nfrom time import perf_counter\r\n\r\nimport evaluate\r\nimport numpy as np\r\nimport torch\r\nfrom tqdm.auto import tqdm\r\nimport os\r\n\r\nimport matplotlib.pyplot as plt\r\nimport pandas as pd\r\n\r\nfrom setfit import SetFitModel\r\nfrom setfit import SetFitModel, Trainer, TrainingArguments\r\n\r\nfrom datasets import load_dataset\r\nfrom setfit.exporters.utils import mean_pooling\r\nfrom optimum.onnxruntime import ORTModelForFeatureExtraction, AutoOptimizationConfig, ORTOptimizer\r\nfrom transformers import AutoTokenizer\r\nfrom setfit.exporters.onnx import export_onnx\r\nimport onnxruntime\r\n\r\nmetric = evaluate.load(\"accuracy\")\r\ntrain_model = False\r\n\r\nclass PerformanceBenchmark:\r\n    def __init__(self, model, dataset, optim_type):\r\n        self.model = model\r\n        self.dataset = dataset\r\n        self.optim_type = optim_type\r\n\r\n    def compute_accuracy(self):\r\n        preds = self.model.predict(self.dataset[\"text\"])\r\n        labels = self.dataset[\"label\"]\r\n        accuracy = metric.compute(predictions=preds, references=labels)\r\n        print(f\"Accuracy on test set - {accuracy['accuracy']:.3f}\")\r\n        return accuracy\r\n\r\n    def compute_size(self):\r\n        state_dict = self.model.model_body.state_dict()\r\n        tmp_path = Path(\"model.pt",
    "url": "https://github.com/huggingface/optimum/issues/1885",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-06-02T22:34:37Z",
    "updated_at": "2024-06-08T03:02:40Z",
    "comments": 1,
    "user": "geraldstanje"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1241,
    "title": "\ud83d\udcbb\ud83d\udcbbHow to deploy to vercel",
    "body": "Hi,\r\n\r\nI am currently having troubles with deploying to Vercel, I am experiencing an error 404 NOT FOUND. I think i am using the wrong build command or the wrong default directory. Can someone please help?\r\n\r\n![image](https://github.com/huggingface/chat-ui/assets/115069692/2f5bea8e-4907-41db-9639-82b17902fc7e)\r\n\r\n\r\nThanksyou!",
    "url": "https://github.com/huggingface/chat-ui/issues/1241",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-06-02T10:05:45Z",
    "updated_at": "2025-01-10T17:00:37Z",
    "user": "haydenkong"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 788,
    "title": "Is it possible to use transformers.js to implement audio source separation tasks?",
    "body": "### Question\n\nHello, I have a beginner's question.\r\n\r\nI want to implement the task of removing the human voice from the audio in the video and retaining the background sound in the browser. The idea is to load the model for audio source separation related to transformers.js to achieve the separation of the background sound and human voice, and then only return the background sound.\r\n\r\nBut I couldn't find relevant examples in the documentation, so I was wondering if this can be implemented? If so, what are the learning or research paths?\r\n\r\nLooking forward to your reply",
    "url": "https://github.com/huggingface/transformers.js/issues/788",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-06-02T04:00:55Z",
    "updated_at": "2024-12-26T06:05:26Z",
    "user": "asasas234"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 238,
    "title": "how to use  on  wslcan not  visulize",
    "body": "how to use  on  wslcan not  visulize",
    "url": "https://github.com/huggingface/lerobot/issues/238",
    "state": "closed",
    "labels": [
      "simulation"
    ],
    "created_at": "2024-06-02T03:58:44Z",
    "updated_at": "2025-10-08T08:25:31Z",
    "user": "jackylee1"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1236,
    "title": "No Setup Deploy: Multiple models supported?",
    "body": "How can I make **multiple models** available on Chat UI using **No Setup Deploy**?\r\n\r\n## Further Details\r\n\r\nThe form (see below) seems to only allow one model.\r\n\r\n<details><summary>Form</summary>\r\n<p>\r\n\r\n<img width=\"661\" alt=\"image\" src=\"https://github.com/huggingface/chat-ui/assets/14152377/e5595c34-b5c5-4c09-8b83-d5a0f839016d\">\r\n\r\n</p>\r\n</details> \r\n\r\n## Tried so far\r\n\r\n(Without success)\r\n\r\n- I checked the [full tutorial](https://huggingface.co/docs/hub/spaces-sdks-docker-chatui#chatui-on-spaces) linked from the [README.md](https://github.com/huggingface/chat-ui/blob/93b39a0beb72378c76d5d146bfd3a8355c1d110d/README.md), but couldn't find neither how to use multiple models nor a note about a limitation. \r\n- I tried deploying one model and adding an `.env.local` to the deployment on my space, but the web interface threw an error when trying to commit `.env.local` due to potential secrets included in the file.",
    "url": "https://github.com/huggingface/chat-ui/issues/1236",
    "state": "open",
    "labels": [
      "enhancement",
      "docker"
    ],
    "created_at": "2024-06-01T11:41:22Z",
    "updated_at": "2024-06-03T07:55:12Z",
    "comments": 1,
    "user": "rodrigobdz"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1884,
    "title": "Add support for porting CLIPVisionModelWithProjection",
    "body": "### Feature request\n\nCurrently there is not support for porting CLIPVisionModelWithProjection class models from the transformers library to onnx through optimum. I'd like to add support for the same for which we'd need to change the optimum/exporters/onnx/model_configs.py file. I'd like ot request you to help me guide how can I try to understand the code and make this feature.\n\n### Motivation\n\nI need the same for a personal project and would be happy to contribute to the library as well.\n\n### Your contribution\n\nI would be happy to submit a PR",
    "url": "https://github.com/huggingface/optimum/issues/1884",
    "state": "open",
    "labels": [
      "feature-request",
      "onnx"
    ],
    "created_at": "2024-05-31T22:25:45Z",
    "updated_at": "2024-10-09T07:56:28Z",
    "comments": 0,
    "user": "mr-sarthakgupta"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6940,
    "title": "Enable Sharding to Equal Sized Shards",
    "body": "### Feature request\r\n\r\nAdd an option when sharding a dataset to have all shards the same size. Will be good to provide both an option of duplication, and by truncation.\r\n\r\n### Motivation\r\n\r\nCurrently the behavior of sharding is \"If n % i == l, then the first l shards will have length (n // i) + 1, and the remaining shards will have length (n // i).\". However, when using FSDP we want the shards to have the same size. This requires the user to manually handle this situation, but it will be nice if we had an option to shard the dataset into equally sized shards. \r\n\r\n### Your contribution\r\n\r\nFor now just a PR. I can also add code that does what is needed, but probably not efficient.\r\nShard to equal size by duplication:\r\n```\r\nremainder = len(dataset) % num_shards\r\nnum_missing_examples = num_shards - remainder\r\nduplicated = dataset.select(list(range(num_missing_examples)))\r\ndataset = concatenate_datasets([dataset, duplicated])\r\nshard = dataset.shard(num_shards, shard_idx)\r\n```\r\nOr by truncation:\r\n```\r\nshard = dataset.shard(num_shards, shard_idx)\r\nnum_examples_per_shard = len(dataset) // num_shards\r\nshard = shard.select(list(range(num_examples_per_shard)))\r\n```",
    "url": "https://github.com/huggingface/datasets/issues/6940",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-05-31T21:55:50Z",
    "updated_at": "2024-06-01T07:34:12Z",
    "comments": 0,
    "user": "yuvalkirstain"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2894,
    "title": "~PyTorch Docathon H1 2024!~ ",
    "body": "### **PyTorch Docathon H1 2024!**\r\n\r\nHooray! It's this time of the year again and we are excited for you to participate in the PyTorch docathon. We have the following repositories participating:\r\n\r\n- [pytorch/pytorch](https://github.com/pytorch/pytorch) \r\n- [pytorch/tutorials](https://github.com/pytorch/tutorials) \r\n- [pytorch/xla](https://github.com/pytorch/xla)\r\n- [pytorch-labs/torchfix](https://github.com/pytorch-labs/torchfix)\r\n\r\nThe docathon starts on June 4 10 AM PST. Please do not work on tasks until then. We will continue accepting new submissions until 5 PM PST on June 16th.\r\n\r\n#### **Date and location**\r\n\r\n**WHEN:** The docathon starts on June 4 at 10 AM PST. Please do not work on tasks until then. We will continue accepting new submissions until 5 PM PST on June 16th.\r\n**WHERE:** Virtual\r\n**WHAT:** Issues with the docathon-h1-2024 label - will be posted on June 4th.\r\n\r\nWatch our intro video to learn more details about the event.\r\n\r\n### **Can everyone participate?**\r\nWe encourage everyone to consider participating in the docathon but there are a few things we expect from the participants:\r\n\r\n- You must have a GitHub account and know how to use Git and GitHub, how to submit or rebase your PR on the latest main branch, how to fork or clone the repo, how to view errors in the CI and troubleshoot. We reserve the right to reject incorrectly submitted PRs.\r\n- You must be familiar with Python, the basics of Machine Learning, and have at least a basic knowledge of PyTorch. Familiarity with Sphinx, sphinx-gallery, and reStructuredText is a plus.\r\n\r\nBefore you start contributing make sure to read [Linux Foundation Code of Conduct](https://events.linuxfoundation.org/about/code-of-conduct/) as well as the [GitHub Code of Conduct](https://docs.github.com/en/site-policy/github-terms/github-community-code-of-conduct).\r\n\r\n### **What contributions are we looking for?**\r\n\r\nAll issues for this docathon are tagged with the _docathon-h1-2024_ label. Please note that contributions that address other issues won't be counted. We are primarily looking for the following contributions: \r\n\r\n- Docstring fixes\r\n- Documentation bug fixes\r\n- Tutorial fixes and testing\r\n\r\n\r\n**NOTE:** Due to the large number of RSVPs, the tasks are provided on a first come first serve basis \u2014 please don't hoard the tasks!\r\n\r\n### **Difficulty Levels**\r\nThe issues have three levels of difficulty:  _easy, medium_, and _advanced_.  If this is your first time contributing to PyTorch, we recommend that you start with an issue that is tagged as easy.\r\n\r\n### **How to contribute to tutorials?**\r\n\r\n1. Read [PyTorch Contributor Document](https://github.com/pytorch/tutorials/blob/main/CONTRIBUTING.md?rgh-link-date=2023-05-26T19%3A09%3A32Z) for general guidelines on how the submission process works and overall style and voice.\r\n2. Pick an issue that is labeled as _docathon-h1-2024_.\r\n3. In the issue, add a comment with the text /assigntome. If the issue is already assigned, please find another issue to work on. We ask that you assign one issue at a time - we want to give everyone a fair chance to participate. When you are done with one issue and get it approved, you can assign another one to yourself and start working on it.\r\n4. If you are submitting a new tutorial, use [this template](https://github.com/pytorch/tutorials/blob/main/beginner_source/template_tutorial.py?rgh-link-date=2023-05-26T19%3A09%3A32Z).\r\n5. Fork or clone the PyTorch repository to your computer. For simple fixes, like incorrect URLs, you could use the GitHub UI as well.\r\n6. Create a branch and work on the fix.\r\n7. Test your fix by running the single tutorial locally. Don't run the whole build as it takes hours and requires a GPU. You can run one tutorial as a script `python3 <tutorial-name.py> or GALLERY_PATTERN=\"neural_style_transfer_tutorial.py\" make html`\r\n8. After you fix all the issues, you are ready to submit your PR.\r\n\r\n### **Submit Your PR**\r\n\r\n1. Submit your PR referencing the issue you've picked. For example:\r\n![image](https://github.com/sekyondaMeta/testsRepo/assets/127536312/26bfac4a-c694-48d7-a45e-914c2474bdb8)\r\n3.  If you have not yet, sign the Contributor License Agreement (CLA) - prompted as a check in the PR. We can't accept any PRs without a signed CLA.\r\n4. Watch for any CI errors and fix as needed - all checks must pass successfully.\r\n5. When the build is finished, you will see a preview link to preview your changes. \r\n6. The reviewers might provide feedback that we expect you to address.\r\n7. When all feedback is addressed and your PR is approved - one of the reviewers will merge your PR.\r\n\r\n\r\n### **Can I partner with someone to work on an issue?**\r\n\r\nUnless you are working on a completely new tutorial from scratch, most of the issues should be possible to address on your own. If you decide to partner with someone, you can find someone to work with on our Slack channel by posting a free-form request to collaborate. One individual from the group can submit a PR referring ",
    "url": "https://github.com/pytorch/tutorials/issues/2894",
    "state": "closed",
    "labels": [
      "docathon-h1-2024"
    ],
    "created_at": "2024-05-31T16:25:09Z",
    "updated_at": "2024-07-15T18:38:28Z",
    "comments": 0,
    "user": "sekyondaMeta"
  },
  {
    "repo": "pytorch/examples",
    "number": 1264,
    "title": "reference of weight initialization for llama2 model",
    "body": "first of all, thank you for supporting native TP for torch.\r\ni just have been reading your TP tutorial code and found [the initialization detail](https://github.com/pytorch/examples/blob/main/distributed/tensor_parallelism/llama2_model.py#L316-L319) is different from the pytorch default parameterization (kaming init).\r\nis there any reference for depth init ??",
    "url": "https://github.com/pytorch/examples/issues/1264",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-31T03:18:46Z",
    "updated_at": "2024-05-31T04:18:26Z",
    "comments": 1,
    "user": "SeunghyunSEO"
  },
  {
    "repo": "pytorch/examples",
    "number": 1263,
    "title": "`local_rank` or `rank` for multi-node FSDP",
    "body": "I am wondering for multi-node FSDP, does `local_rank` and `rank` have any obvious difference here?\r\nI think I understand that `local_rank` is the rank within a node.\r\n\r\nI see in a few places it looks like `local_rank` is specifically used\r\n\r\nFor example\r\n\r\nhttps://github.com/pytorch/examples/blob/main/distributed/FSDP/T5_training.py#L111\r\n`torch.cuda.set_device(local_rank)`\r\n\r\nand \r\nhttps://github.com/pytorch/examples/blob/main/distributed/FSDP/utils/train_utils.py#L48\r\n`batch[key] = batch[key].to(local_rank)`\r\n\r\nIs there any problem if using `rank` instead?",
    "url": "https://github.com/pytorch/examples/issues/1263",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-30T19:47:21Z",
    "updated_at": "2024-05-30T19:47:21Z",
    "comments": 0,
    "user": "Emerald01"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1225,
    "title": "SyntaxError: JSON5: invalid character 'u' at 1:1",
    "body": "Where can I find out more about the following error? Is there an issue with the existing template?\r\n\r\n## Reproduction Steps\r\n\r\n1. Deploy [Chat UI using default template](https://huggingface.co/new-space?template=huggingchat/chat-ui-template) with `MONGO_URL` set to `mongodb+srv://<USER_SECRET>:<PASSWORD_SECRET>@<CLUSTER_SECRET>`\r\n2. Add secret called `HF_TOKEN` with access token value.\r\n\r\n## Error Logs\r\n\r\nAdditionally to https://github.com/huggingface/chat-ui/issues/1174, the following error is shown:\r\n\r\n```\r\n2024-05-30T11:56:43: PM2 log: [--no-daemon] Exit on target PM2 exit pid=403\r\n11:56:43 2|index  | You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:\r\n11:56:43 2|index  | SyntaxError: JSON5: invalid character 'u' at 1:1\r\n11:56:43 2|index  |     at syntaxError (/app/node_modules/json5/lib/parse.js:1110:17)\r\n11:56:43 2|index  |     at invalidChar (/app/node_modules/json5/lib/parse.js:1055:12)\r\n11:56:43 2|index  |     at Object.value (/app/node_modules/json5/lib/parse.js:309:15)\r\n11:56:43 2|index  |     at lex (/app/node_modules/json5/lib/parse.js:100:42)\r\n11:56:43 2|index  |     at Object.parse (/app/node_modules/json5/lib/parse.js:25:17)\r\n11:56:43 2|index  |     at file:///app/build/server/chunks/auth-9412170c.js:28:16\r\n11:56:43 2|index  |     at ModuleJob.run (node:internal/modules/esm/module_job:222:25)\r\n11:56:43 2|index  |     at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)\r\n11:56:43 2|index  |     at async Server.init (file:///app/build/server/index.js:4189:24)\r\n11:56:43 2|index  |     at async file:///app/build/handler.js:1140:1\r\n```\r\n\r\n<details><summary>Full error log</summary>\r\n<p>\r\n\r\n```\r\n===== Application Startup at 2024-05-30 09:52:12 =====\r\n\r\n2024-05-30T09:54:31.991512Z  INFO text_generation_launcher: Args {\r\n    model_id: \"mistralai/Mistral-7B-Instruct-v0.1\",\r\n    revision: None,\r\n    validation_workers: 2,\r\n    sharded: None,\r\n    num_shard: Some(\r\n        1,\r\n    ),\r\n    quantize: None,\r\n    speculate: None,\r\n    dtype: None,\r\n    trust_remote_code: true,\r\n    max_concurrent_requests: 128,\r\n    max_best_of: 2,\r\n    max_stop_sequences: 4,\r\n    max_top_n_tokens: 5,\r\n    max_input_tokens: None,\r\n    max_input_length: None,\r\n    max_total_tokens: None,\r\n    waiting_served_ratio: 0.3,\r\n    max_batch_prefill_tokens: None,\r\n    max_batch_total_tokens: None,\r\n    max_waiting_tokens: 20,\r\n    max_batch_size: None,\r\n    cuda_graphs: None,\r\n    hostname: \"r-center-for-humans-and-machines-llm-stresstest-ubo8g-c2578-oc7\",\r\n    port: 8080,\r\n    shard_uds_path: \"/tmp/text-generation-server\",\r\n    master_addr: \"localhost\",\r\n    master_port: 29500,\r\n    huggingface_hub_cache: Some(\r\n        \"/data\",\r\n    ),\r\n    weights_cache_override: None,\r\n    disable_custom_kernels: false,\r\n    cuda_memory_fraction: 1.0,\r\n    rope_scaling: None,\r\n    rope_factor: None,\r\n    json_output: false,\r\n    otlp_endpoint: None,\r\n    cors_allow_origin: [],\r\n    watermark_gamma: None,\r\n    watermark_delta: None,\r\n    ngrok: false,\r\n    ngrok_authtoken: None,\r\n    ngrok_edge: None,\r\n    tokenizer_config_path: None,\r\n    disable_grammar_support: false,\r\n    env: false,\r\n    max_client_batch_size: 4,\r\n}\r\n2024-05-30T09:54:31.991620Z  INFO hf_hub: Token file not found \"/home/user/.cache/huggingface/token\"    \r\n2024-05-30T09:54:32.027992Z  INFO text_generation_launcher: Default `max_input_tokens` to 4095\r\n2024-05-30T09:54:32.028013Z  INFO text_generation_launcher: Default `max_total_tokens` to 4096\r\n2024-05-30T09:54:32.028016Z  INFO text_generation_launcher: Default `max_batch_prefill_tokens` to 4145\r\n2024-05-30T09:54:32.028018Z  INFO text_generation_launcher: Using default cuda graphs [1, 2, 4, 8, 16, 32]\r\n2024-05-30T09:54:32.028022Z  WARN text_generation_launcher: `trust_remote_code` is set. Trusting that model `mistralai/Mistral-7B-Instruct-v0.1` do not contain malicious code.\r\n2024-05-30T09:54:32.028109Z  INFO download: text_generation_launcher: Starting download process.\r\n{\"t\":{\"$date\":\"2024-05-30T11:54:32.245+02:00\"},\"s\":\"I\",  \"c\":\"NETWORK\",  \"id\":4915701, \"ctx\":\"main\",\"msg\":\"Initialized wire specification\",\"attr\":{\"spec\":{\"incomingExternalClient\":{\"minWireVersion\":0,\"maxWireVersion\":21},\"incomingInternalClient\":{\"minWireVersion\":0,\"maxWireVersion\":21},\"outgoing\":{\"minWireVersion\":6,\"maxWireVersion\":21},\"isInternalClient\":true}}}\r\n{\"t\":{\"$date\":\"2024-05-30T11:54:32.246+02:00\"},\"s\":\"I\",  \"c\":\"CONTROL\",  \"id\":23285,   \"ctx\":\"main\",\"msg\":\"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'\"}\r\n{\"t\":{\"$date\":\"2024-05-30T11:54:32.247+02:00\"},\"s\":\"I\",  \"c\":\"NETWORK\",  \"id\":4648601, \"ctx\":\"main\",\"msg\":\"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize.\"}\r\n{\"t\":{\"$date\":\"2024-05-30T11:54:32.248+02:00\"},\"s\":\"I\",  \"c\":\"REPL\",     \"id\":5123008, \"ctx\":\"main\",\"msg\":\"Successfully registered PrimaryOnlyService\",\"attr\":{\"service\":\"TenantMigrationDonorService\",\"",
    "url": "https://github.com/huggingface/chat-ui/issues/1225",
    "state": "open",
    "labels": [
      "docker"
    ],
    "created_at": "2024-05-30T11:07:36Z",
    "updated_at": "2025-01-16T22:54:08Z",
    "comments": 8,
    "user": "rodrigobdz"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1221,
    "title": "500 Internal Server Error with chat-ui",
    "body": "I executed an inference server with the address http://192.168.0.185:7777/generate_stream using text-generation-inference (TGI) v.2.0.4. When executing commands with curl, the inference results are responding normally. For ease of use, I am going to use chat-ui.  Below is the .env.local file's content of chat-ui. \r\n\r\n```\r\n$ vi .env.local\r\n  1 MONGODB_URL=mongodb://127.0.0.1:27017\r\n  2 HF_TOKEN=hf_***********************************\r\n  3 ALLOW_INSECURE_COOKIES=true\r\n  4 MODELS=`[\r\n  5   {\r\n  6     \"name\":\"samsung-codellama3-70b-custom\",\r\n  7     \"endpoints\":[{\"type\":\"tgi\",\"url\":\"http://192.168.0.185:7777/generate_stream\"}],\r\n  8     \"description\":\"A_Coding_Assistant_Model\",\r\n  9     \"userMessageToken\":\"<|prompter|>\",\r\n 10     \"assistantMessageToken\":\"<|assistant|>\",\r\n 11     \"messageEndToken\":\"</s>\",\r\n 12     \"preprompt\":\"It_is_an_LLM-based_AI_assistant.\"',\r\n 13     \"parameters\":{\r\n 14       \"temperature\":0.2,\r\n 15       \"top_p\":0.9,\r\n 16       \"repetition_penalty\":1.2,\r\n 17       \"top_k\":10,\r\n 18       \"truncate\":1000,\r\n 19       \"max_new_tokens\":500\r\n 20     }\r\n 21   }\r\n 22 ]`\r\n```\r\n\r\n\r\nThen, I run `$ docker run -p 3000:3000 --env-file .env.local -v chat-ui:/data --name chat-ui ghcr.io/huggingface/chat-ui-db` command. Unfortunately, when I visited http://localhost:3000 with the MS Edge web browser, I got the error \u201c500: An error occurred\u201d as shown below. \r\n\r\n* Screenshot:\r\n![image](https://github.com/huggingface/chat-ui/assets/82404/6fec9357-8969-4b31-b657-a50bafad6114)\r\n\r\n* log message:\r\n`{\"level\":50,\"time\":1717033937576,\"pid\":30,\"hostname\":\"c5e9372bf1c1\",\"locals\":{\"sessionId\":\"f19bea94fb83ffe9b2aa5d9c3247d9dc1e819772e3b0b4557294cc9a7e884bf0\"},\"url\":\"http://localhost:3000/\",\"params\":{},\"request\":{},\"error\":{\"lineNumber\":1,\"columnNumber\":1},\"errorId\":\"7b3df79b-b4d0-4573-b92d-4ba0c182828b\"}`\r\n\r\nI am wondering what could be causing this error.  Welcome to any hints to fix this issue.\r\n\r\n#### References\r\n* https://github.com/huggingface/chat-ui/issues?q=is%3Aissue+%22internal+server+error%22\r\n* https://github.com/huggingface/chat-ui/blob/main/src/lib/server/models.ts#L198\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1221",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2024-05-30T00:35:58Z",
    "updated_at": "2024-05-31T00:19:49Z",
    "comments": 4,
    "user": "leemgs"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 785,
    "title": "Using AutoModel, AutoTokenizer with distilbert models",
    "body": "### Question\n\nDoes transformers.js have a function to get the label after getting the logits? How to get the labels from the inference output?\r\n\r\nlet tokenizer = await AutoTokenizer.from_pretrained('distilbert-base-uncased-finetuned-sst-2-english');\r\nlet model = await AutoModel.from_pretrained('distilbert-base-uncased-finetuned-sst-2-english');\r\n\r\nlet inputs = await tokenizer('I love transformers!');\r\nlet { logits } = await model(inputs);",
    "url": "https://github.com/huggingface/transformers.js/issues/785",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-29T20:35:17Z",
    "updated_at": "2024-05-30T11:09:17Z",
    "user": "mram0509"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1220,
    "title": "A few questions about the Cloudflare integration",
    "body": "Howdy \ud83d\udc4b ,\r\n\r\nWorking on a corresponding page for this in the [Cloudflare docs](https://developers.cloudflare.com/workers-ai/) and had a few [questions that I need answered](https://github.com/cloudflare/cloudflare-docs/pull/14488#issuecomment-2101481990) in this PR.\r\n\r\n## Questions\r\n\r\n1. If I'm reading [this line](https://github.com/huggingface/chat-ui/blob/25d6df858f15128e6ca23214ce7ad08f176a68ed/src/lib/server/endpoints/cloudflare/endpointCloudflare.ts#L18C21-L18C29) correctly, it sounds like [their example is actually incorrect](https://github.com/huggingface/chat-ui/blob/main/README.md?plain=1#L598) and might need to be updated?\r\n2. If ^^^ is correct, does that mean that we should also be specifying the [`model` parameter](https://github.com/huggingface/chat-ui/blob/25d6df858f15128e6ca23214ce7ad08f176a68ed/src/lib/server/endpoints/cloudflare/endpointCloudflare.ts#L19) w/in the endpoint configuration?\r\n3. Correct assumption that this only works with models prefixed with `@hf`, think so based on [their code](https://github.com/huggingface/chat-ui/blob/25d6df858f15128e6ca23214ce7ad08f176a68ed/src/lib/server/endpoints/cloudflare/endpointCloudflare.ts#L19).\r\n\r\nMind helping me out so I can get this live in our docs?",
    "url": "https://github.com/huggingface/chat-ui/issues/1220",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-05-29T19:11:14Z",
    "updated_at": "2024-06-20T12:53:52Z",
    "comments": 3,
    "user": "kodster28"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 784,
    "title": "Shouldn't this work? #v3",
    "body": "### Question\n\n### Issue with Transformer.js v3 and WebGPU\r\n\r\n#### Description\r\nYesterday I installed `transformer.js` with the \"v3\" branch to test the new features with WebGPU, but I get an error.\r\n\r\n#### Error Message\r\n```\r\n@xenova_transformers.js?v=3b2ad0ed:24861 Uncaught (in promise)\r\nError: This pipeline is not yet supported in Transformers.js v3.\r\n```\r\n\r\n#### My code\r\n\r\n```javascript\r\nconst transcriber = await pipeline(\"automatic-speech-recognition\", \"Xenova/whisper-small.en\", {\r\n    device: 'webgpu',\r\n    dtype: 'fp32'\r\n});\r\n```\r\n\r\n#### Additional Information\r\nWith the following code, it works perfectly fine:\r\n\r\n```javascript\r\nconst extractor = await pipeline('feature-extraction', 'Xenova/all-MiniLM-L6-v2', {\r\n    device: 'webgpu',\r\n    dtype: 'fp32', // or 'fp16'\r\n});\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/784",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-29T13:36:52Z",
    "updated_at": "2024-05-29T14:59:49Z",
    "user": "kalix127"
  },
  {
    "repo": "pytorch/xla",
    "number": 7139,
    "title": "Setting FrontEnd attributes for CC ops replica groups in the HLO",
    "body": "## \ud83d\ude80 Feature\r\n<!-- A clear and concise description of the feature proposal -->\r\nThe metadata of the CC operation needs to have an extra field/key, indicating whether the replica groups are represented directly with all the ids or encoded in some other manner, expanded into actual ids downstream into the stack. These will be lowered as front end attributes of the op so that the compiler/runtime understands if a direct or indirect representation is used.\r\n\r\n## Motivation\r\n\r\n<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->\r\nThe replica groups become very long at scale. To represent then concisely, a condensed form of representation is necessary. The basic idea can be thought of as an Iota like operation. With an attribute indicating whether its direct or indirect, the compiler/runtime can infer if the groups represent the actual replica ids. If not, these will be expanded based on the representation coded.\r\n\r\n## Pitch\r\n\r\n<!-- A clear and concise description of what you want to happen. -->\r\nThe framework will exercise the option of turning on or off the condensed form of replica group representation. When the condensed/indirect form is used to represent the replica groups, we would need to have the frontend_attributes={replica_grps=\"indirect\"} set for the CC ops indicating the format of the replica groups to be consumed by compiler/runtime. \r\n\r\n## Alternatives\r\n\r\n<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context or screenshots about the feature request here. -->\r\n",
    "url": "https://github.com/pytorch/xla/issues/7139",
    "state": "closed",
    "labels": [
      "enhancement",
      "distributed"
    ],
    "created_at": "2024-05-29T12:47:47Z",
    "updated_at": "2025-04-07T13:55:20Z",
    "comments": 2,
    "user": "amithrm"
  },
  {
    "repo": "pytorch/vision",
    "number": 8450,
    "title": "Let `v2.functional.gaussian_blur` backprop through `sigma` parameter",
    "body": "the v1 version of `gaussian_blur` allows to backprop through sigma\r\n\r\n(example taken from https://github.com/pytorch/vision/issues/8401)\r\n```\r\nimport torch\r\nfrom torchvision.transforms.functional import gaussian_blur\r\n\r\ndevice = \"cuda\"\r\ndevice = \"cpu\"\r\nk = 15\r\ns = torch.tensor(0.3 * ((5 - 1) * 0.5 - 1) + 0.8, requires_grad=True, device=device)\r\n\r\nblurred = gaussian_blur(torch.randn(1, 3, 256, 256, device=device), k, [s])\r\nblurred.mean().backward()\r\nprint(s.grad)\r\n```\r\n\r\non CPU and on GPU (after https://github.com/pytorch/vision/pull/8426).\r\n\r\nHowever, the v2 version fails with\r\n\r\n```\r\nRuntimeError: element 0 of tensors does not require grad and does not have a grad_fn\r\n```\r\n\r\n\r\nThe support in v1 is sort of undocumented and probably just works out of luck (sigma is typically expected to be a list of floats rather than a tensor). So while it works, it's not 100% clear to me whether this is a feature we absolutely want. I guess we can implement it if it doesn't make the code much more complex or slower.",
    "url": "https://github.com/pytorch/vision/issues/8450",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-29T12:45:21Z",
    "updated_at": "2024-07-29T15:45:14Z",
    "comments": 3,
    "user": "NicolasHug"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6930,
    "title": "ValueError: Couldn't infer the same data file format for all splits. Got {'train': ('json', {}), 'validation': (None, {})}",
    "body": "### Describe the bug\n\nWhen I run the code en = load_dataset(\"allenai/c4\", \"en\", streaming=True), I encounter an error: raise ValueError(f\"Couldn't infer the same data file format for all splits. Got {split_modules}\") ValueError: Couldn't infer the same data file format for all splits. Got {'train': ('json', {}), 'validation': (None, {})}.\r\nHowever, running dataset = load_dataset('allenai/c4', streaming=True, data_files={'validation': 'en/c4-validation.00003-of-00008.json.gz'}, split='validation') works fine. What is the issue here?\n\n### Steps to reproduce the bug\n\nrun code\uff1a\r\nimport os\r\nos.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'\r\nfrom datasets import load_dataset\r\n\r\nen = load_dataset(\"allenai/c4\", \"en\", streaming=True)\n\n### Expected behavior\n\nSuccessfully loaded the dataset.\n\n### Environment info\n\n- `datasets` version: 2.18.0\r\n- Platform: Linux-6.5.0-28-generic-x86_64-with-glibc2.17\r\n- Python version: 3.8.19\r\n- `huggingface_hub` version: 0.22.2\r\n- PyArrow version: 15.0.2\r\n- Pandas version: 2.0.3\r\n- `fsspec` version: 2024.2.0\r\n",
    "url": "https://github.com/huggingface/datasets/issues/6930",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-29T12:40:05Z",
    "updated_at": "2024-07-23T06:25:24Z",
    "comments": 2,
    "user": "Polarisamoon"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6929,
    "title": "Avoid downloading the whole dataset when only README.me has been touched on hub.",
    "body": "### Feature request\r\n\r\n`datasets.load_dataset()` triggers a new download of the **whole dataset** when the README.md file has been touched on huggingface hub, even if data files / parquet files are the exact same.\r\n\r\nI think the current behaviour of the load_dataset function is triggered whenever a change of the hash of latest commit on huggingface hub, but  is there a clever way to only download again the dataset **if and only if** data is modified ?  \r\n\r\n### Motivation\r\n\r\nThe current behaviour is a waste of network bandwidth / disk space / research time.\r\n\r\n### Your contribution\r\n\r\nI don't have time to submit a PR, but I hope a simple solution will emerge from this issue ! ",
    "url": "https://github.com/huggingface/datasets/issues/6929",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-05-29T10:36:06Z",
    "updated_at": "2024-05-29T20:51:56Z",
    "comments": 2,
    "user": "zinc75"
  },
  {
    "repo": "huggingface/candle",
    "number": 2226,
    "title": "How to load LoRA adapter along with the GGUF model?",
    "body": "Hello all,\r\n\r\nI have recently managed to convert the flan-t5 base model to GGUF #2215 . But I also have multiple LoRA adapters trained for different tasks. \r\n\r\n@EricLBuehler @LaurentMazare So I wish to know if there is a way to also load single/multiple LoRA adapters along with the GGUF model. I am currently running an inference using the following command:\r\n```bash\r\ncargo run --example quantized-t5 --release  -- --weight-file \"flant5large_f16.gguf\" \\\r\n--config-file \"flan-t5-large/config.json\" \\\r\n--prompt \"Make this text coherent: Their flight is weak. They run quickly through the tree canopy.\"\r\n```\r\nBut I have the adapter as (adapter_model.bin and adapter_config.json), which I would like load along with this model **Without Weight Merging**.",
    "url": "https://github.com/huggingface/candle/issues/2226",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-29T06:03:10Z",
    "updated_at": "2024-06-05T03:34:14Z",
    "user": "niranjanakella"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 127320,
    "title": "[While_loop] How to use layer like `torch.nn.BatchNorm2d` with while_loop?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nHi, I'm trying to support `while_loop` with `DispatchKey.XLA`;\r\n\r\nwhen I try linear and MNIST with torch, code would be dispatched to `DispatchKey.CompositeExplicitAutograd` to use pure python while, and finish;\r\n\r\nmy local example code for MNIST:\r\n```python\r\nimport torch\r\nfrom torch._higher_order_ops.while_loop import while_loop\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport torch.optim as optim\r\n\r\ndef test_while_loop_tpu_MNIST_inside_loop(self):\r\n\r\n    torch.set_grad_enabled(False)\r\n\r\n    n_epochs = 3\r\n    batch_size_train = 8\r\n    batch_size_test = 10\r\n    learning_rate = 0.01\r\n    momentum = 0.5\r\n    log_interval = 10\r\n    random_seed = 1\r\n    torch.backends.cudnn.enabled = False\r\n    torch.manual_seed(random_seed)\r\n\r\n    class MNIST(torch.nn.Module):\r\n      def __init__(self):\r\n        super().__init__()\r\n        self.conv1 = torch.nn.Conv2d(1, 10, kernel_size=5, stride=1, padding=2)\r\n        self.bn1 = torch.nn.BatchNorm2d(10)\r\n        self.conv2 = torch.nn.Conv2d(10, 20, kernel_size=5)\r\n        self.bn2 = torch.nn.BatchNorm2d(20)\r\n        self.fc1 = torch.nn.Linear(500, 50)\r\n        self.fc2 = torch.nn.Linear(50, 10)\r\n\r\n      def forward(self, iteri, x, y):\r\n        def cond_fn(iteri, x, y):\r\n          return iteri > 0\r\n\r\n        def body_fn(iteri, x, y):\r\n          y = F.relu(F.max_pool2d(self.conv1(x), 2))\r\n          y = self.bn1(y) # torch.while_loop's body_fn might be modifying the input!\r\n          y = F.relu(F.max_pool2d(self.conv2(y), 2))\r\n          y = self.bn2(y)\r\n          y = torch.flatten(y, 1)\r\n          y = F.relu(self.fc1(y))\r\n          y = self.fc2(y)\r\n\r\n          return iteri - 1, x.clone(), F.log_softmax(y, dim=1)\r\n\r\n        return while_loop(cond_fn, body_fn, (iteri, x, y))\r\n\r\n      def forward_compare(self, iteri, x, y):\r\n        y = F.relu(F.max_pool2d(self.conv1(x), 2))\r\n        y = self.bn1(y) # torch.while_loop's body_fn might be modifying the input!\r\n        y = F.relu(F.max_pool2d(self.conv2(y), 2))\r\n        y = self.bn2(y)\r\n        y = torch.flatten(y, 1)\r\n        y = F.relu(self.fc1(y))\r\n        y = self.fc2(y)\r\n        return iteri - 1, x.clone(), F.log_softmax(y, dim=1)\r\n\r\n    mnist = MNIST()\r\n    bs=16\r\n    l_in_0 = torch.randn(bs, 1, 28, 28, dtype=torch.float32)\r\n    l_out = torch.randn(bs, 10, dtype=torch.float32)\r\n    iteri = torch.tensor(3, dtype=torch.int64)\r\n    _, _, res = mnist(iteri, l_in_0, l_out)\r\n\r\n    # === expected result for one iteration to be compared since body_fn defined use the same input in each iteration ===\r\n    _, _, expected_res = mnist.forward_compare(iteri, l_in_0, l_out)\r\n    self.assertTrue(torch.all(torch.eq(res, expected_res)))\r\n```\r\n\r\n---\r\n\r\nfor code with `DispatchKey.XLA` and `torch.nn.BatchNorm2d`, it would stoped/failed at `[_has_potential_branch_input_mutation](https://github.com/pytorch/pytorch/blob/d6e3e89804c4063827ea21ffcd3d865e5fe365d9/torch/_higher_order_ops/while_loop.py#L250C16-L250C52)` check with ERROR:\r\n```\r\ntorch._higher_order_ops.utils.UnsupportedAliasMutationException: torch.while_loop's body_fn might be modifying the input!\r\n```\r\n\r\ndo we have example for model with layer like `torch.nn.BatchNorm2d` which `_has_potential_branch_input_mutation` is true, and without using pure while loop?\r\n\r\nmy local code with `DispatchKey.XLA` and `torch.nn.BatchNorm2d`:\r\n```\r\nimport torch\r\nimport torch_xla\r\nimport torch_xla.experimental.fori_loop\r\nfrom torch_xla.experimental.fori_loop import fori_loop\r\nfrom torch._higher_order_ops.while_loop import while_loop\r\nimport torch_xla.core.xla_model as xm\r\nimport torch_xla.core.xla_builder as xb\r\nimport torch_xla.utils.utils as xu\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport torch.optim as optim\r\n\r\ndef test_while_loop_tpu_MNIST_inside_loop_without_BN(self):\r\n    xm.mark_step()\r\n    device = xm.xla_device()\r\n    torch.set_grad_enabled(False)\r\n\r\n    n_epochs = 3\r\n    batch_size_train = 8\r\n    batch_size_test = 10\r\n    learning_rate = 0.01\r\n    momentum = 0.5\r\n    log_interval = 10\r\n    random_seed = 1\r\n    torch.backends.cudnn.enabled = False\r\n    torch.manual_seed(random_seed)\r\n\r\n    class MNIST(torch.nn.Module):\r\n      def __init__(self):\r\n        super().__init__()\r\n        self.conv1 = torch.nn.Conv2d(1, 10, kernel_size=5, stride=1, padding=2)\r\n        self.bn1 = torch.nn.BatchNorm2d(10)\r\n        self.conv2 = torch.nn.Conv2d(10, 20, kernel_size=5)\r\n        self.bn2 = torch.nn.BatchNorm2d(20)\r\n        self.fc1 = torch.nn.Linear(500, 50)\r\n        self.fc2 = torch.nn.Linear(50, 10)\r\n\r\n      def forward(self, iteri, x, y):\r\n        def cond_fn(iteri, x, y):\r\n          return iteri > 0\r\n\r\n        def body_fn(iteri, x, y):\r\n          # y = self.bn1(F.relu(F.max_pool2d(self.conv1(x), 2)))\r\n          # y = self.bn2(F.relu(F.max_pool2d(self.conv2(y), 2)))\r\n\r\n          y = F.relu(F.max_pool2d(self.conv1(x), 2))\r\n          y = self.bn1(y) # torch.while_loop's body_fn might be modifying the input!\r\n          y = F.relu(F.max_pool2d(self.conv2(y",
    "url": "https://github.com/pytorch/pytorch/issues/127320",
    "state": "closed",
    "labels": [
      "triaged",
      "module: xla",
      "oncall: pt2",
      "module: higher order operators",
      "module: pt2-dispatcher"
    ],
    "created_at": "2024-05-28T18:37:15Z",
    "updated_at": "2024-05-29T22:42:57Z",
    "user": "ManfeiBai"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 781,
    "title": "Progress callback for Moondream?",
    "body": "### Question\r\n\r\nWhile implementing Moondream (from the excellent example) I stumbled upon a few questions.\r\n\r\n- How can I implement a callback while Moondream is generating tokens? A normal progressCallback didn\u2019t work?\r\n\r\n```\r\nself.model.generate({\r\n\t...text_inputs,\r\n\t...vision_inputs, \r\n\tdo_sample: false,\r\n\tmax_new_tokens: 500,\r\n\r\n\tprogress_callback: (progress_data) => {\r\n\t\tconsole.log(\"progress_data: \", progress_data);\r\n\t\tif (progress_data.status !== 'progress') return;\r\n\t\tself.postMessage(progress_data);\r\n\t},\r\n})\r\n```\r\nI\u2019ve also tried the new CallbackStreamer option, but that had no effect either.\r\n\r\nFrom the [demo](https://github.com/xenova/transformers.js/issues/743) I know it should be possible. But I [couldn't find the source code](https://github.com/xenova/transformers.js/tree/v3) for it (yet). And trying to learn anything from the demo as-is was, well, difficult with all that [minifying](https://xenova-experimental-moondream-webgpu.static.hf.space/assets/worker-DHaYXnZx.js) and framework stuff.\r\n\r\n- Is this warning in the browser console anything to worry about?\r\n```\r\nThe number of image tokens was not set in the model configuration. Setting it to the number of features detected by the vision encoder (729).models.js:3420 \r\n```\r\n\r\n\r\n- What would be the effect of changing these values? E.g. what would be the expected outcome of changing decoder_model_merged from from q4 to q8?\r\n```\r\nembed_tokens: 'fp16',\r\nvision_encoder: 'q8', // or 'fp16'\r\ndecoder_model_merged: 'q4', // or 'q8'\r\n```\r\n\r\n- What's the difference between Moondream and [NanoLlava](https://huggingface.co/spaces/Xenova/experimental-nanollava-webgpu)? When should I use one over the other?",
    "url": "https://github.com/huggingface/transformers.js/issues/781",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-28T14:07:07Z",
    "updated_at": "2024-06-03T18:49:10Z",
    "user": "flatsiedatsie"
  },
  {
    "repo": "huggingface/competitions",
    "number": 29,
    "title": "How to notify awardees or contact participants\uff1f",
    "body": "The competition just shows the participants' id. \r\n\r\nSo, how to contact them via email to inform them of the award requirements and request additional personal information?",
    "url": "https://github.com/huggingface/competitions/issues/29",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-28T08:11:38Z",
    "updated_at": "2024-06-09T07:03:25Z",
    "user": "shangfenghuang"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 196,
    "title": "How to deduplicate multiple datasets?",
    "body": "fineweb offer a deduplication  demo for one dump. If want to deduplicate more dumps, should I merge dumps before deduplication ?\r\n",
    "url": "https://github.com/huggingface/datatrove/issues/196",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-28T03:00:31Z",
    "updated_at": "2024-06-07T07:25:45Z",
    "user": "canghaiyunfan"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1183,
    "title": "Prompt template for WizardLM-2-8x22B?",
    "body": "What is the prompt template for `WizardLM-2-8x22B` in the `.env.local`?\r\n\r\nWhen setting it to the default one: `<s>{{#each messages}}{{#ifUser}}[INST] {{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\\n{{/if}}{{/if}}{{content}} [/INST]{{/ifUser}}{{#ifAssistant}}{{content}}</s>{{/ifAssistant}}{{/each}}` \r\n\r\nthe generated output is very odd and incoherent. \r\n\r\nWhen setting the prompt template to the one displayed in the [model card:](https://huggingface.co/bartowski/WizardLM-2-8x22B-GGUF) `{system_prompt} USER: {prompt} ASSISTANT: </s>` \r\n\r\nthe output gets even worse.\r\n\r\nCan anyone help?\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1183",
    "state": "open",
    "labels": [
      "support",
      "models"
    ],
    "created_at": "2024-05-27T14:28:47Z",
    "updated_at": "2024-07-29T15:27:25Z",
    "comments": 3,
    "user": "Arche151"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1178,
    "title": "Improve Domain Search Results for Assistants",
    "body": "The domain search for assistants is a great idea, but the current implementation is not really useful if the domains are less likely to be top results like Wikipedia.\r\nThis seems happen because the web is searched first, and the domain filter is applied afterward. This method can easily result in zero parseable results (especially because PDF parsing is currently not available).\r\n\r\nProposed solution: Change the implementation so that the search process continues until at least one parseable result is found. To avoid excessive searching, an upper limit on the number of pages to be searched makes sense (e.g. at 100), but it should definitely be more than current limit of 8 pages.",
    "url": "https://github.com/huggingface/chat-ui/issues/1178",
    "state": "open",
    "labels": [
      "question",
      "websearch"
    ],
    "created_at": "2024-05-27T10:33:22Z",
    "updated_at": "2024-05-31T11:02:11Z",
    "user": "lueschow"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 195,
    "title": "What is the difference between tasks and workers\uff1f",
    "body": "What is the difference between tasks and workers, what is the definition of tasks and how to determine the number of tasks?\r\n\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/datatrove/issues/195",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-27T06:32:25Z",
    "updated_at": "2024-05-27T07:08:11Z",
    "user": "canghaiyunfan"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 778,
    "title": "Pipeline execution time with 'image-classification' pipeline",
    "body": "### Question\n\nWhile calling the 'image-classification' pipeline we pass the image url. So this does a fetch of the image. So will the time taken to process the image include the download time of the image? So if the network is slow this may impact the pipeline performance. Is there a way  to use an image thats already been downloaded by the webpage for an image element? ",
    "url": "https://github.com/huggingface/transformers.js/issues/778",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-26T20:15:21Z",
    "updated_at": "2024-05-27T04:14:52Z",
    "user": "mram0509"
  },
  {
    "repo": "huggingface/transformers",
    "number": 31039,
    "title": "What if past_key_values is in model_kwargs but is None",
    "body": "https://github.com/huggingface/transformers/blob/4c6c45ba138202f42582b5cea98126af87195a95/src/transformers/generation/utils.py#L1317\r\n\r\nThis line fails for me when past_key_values is in model_kwargs but is None. Line 1321 raises an error \r\nCould you advice?\r\n\r\nThank you",
    "url": "https://github.com/huggingface/transformers/issues/31039",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-26T07:58:18Z",
    "updated_at": "2024-06-10T06:32:23Z",
    "user": "estelleafl"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1174,
    "title": "Unable to deploy space with chatUI, getting error ** Failed to connect to 127.0.0.1 port 8080 after 0 ms**",
    "body": "Hi guys, so i am trying to deploy space with chatui template and **abacusai/Smaug-Llama-3-70B-Instruct** model but i am getting following error again and again in container logs.\r\n\r\n`\r\ncurl: (7) Failed to connect to 127.0.0.1 port 8080 after 0 ms: Connection refused\r\nWarning: Problem : connection refused. Will retry in 10 seconds. 40 retries \r\nWarning: left.\r\n2024-05-26T07:02:16.945294Z  INFO text_generation_launcher: Downloaded /data/models--abacusai--Smaug-Llama-3-70B-Instruct/snapshots/fbaa713bdcdc2a2f85bbbe5808ec7046700a36e5/model-00007-of-00030.safetensors in 0:00:29.\r\n2024-05-26T07:02:16.945393Z  INFO text_generation_launcher: Download: [7/30] -- ETA: 0:10:47.285711\r\n2024-05-26T07:02:16.945714Z  INFO text_generation_launcher: Download file: model-00008-of-00030.safetensors\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\ncurl: (7) Failed to connect to 127.0.0.1 port 8080 after 0 ms: Connection refused\r\nWarning: Problem : connection refused. Will retry in 10 seconds. 39 retries \r\nWarning: left.\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\ncurl: (7) Failed to connect to 127.0.0.1 port 8080 after 0 ms: Connection refused\r\nWarning: Problem : connection refused. Will retry in 10 seconds. 38 retries \r\nWarning: left.\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\ncurl: (7) Failed to connect to 127.0.0.1 port 8080 after 0 ms: Connection refused\r\nWarning: Problem : connection refused. Will retry in 10 seconds. 37 retries \r\nWarning: left.\r\n2024-05-26T07:02:47.664282Z  INFO text_generation_launcher: Downloaded /data/models--abacusai--Smaug-Llama-3-70B-Instruct/snapshots/fbaa713bdcdc2a2f85bbbe5808ec7046700a36e5/model-00008-of-00030.safetensors in 0:00:30.\r\n2024-05-26T07:02:47.664376Z  INFO text_generation_launcher: Download: [8/30] -- ETA: 0:10:27\r\n2024-05-26T07:02:47.664710Z  INFO text_generation_launcher: Download file: model-00009-of-00030.safetensors\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\ncurl: (7) Failed to connect to 127.0.0.1 port 8080 after 0 ms: Connection refused\r\nWarning: Problem : connection refused. Will retry in 10 seconds. 36 retries \r\nWarning: left.\r\n{\"t\":{\"$date\":\"2024-05-26T09:02:57.879+02:00\"},\"s\":\"I\",  \"c\":\"WTCHKPT\",  \"id\":22430,   \"ctx\":\"Checkpointer\",\"msg\":\"WiredTiger message\",\"attr\":{\"message\":{\"ts_sec\":1716706977,\"ts_usec\":879791,\"thread\":\"8:0x7f4c6fd8f640\",\"session_name\":\"WT_SESSION.checkpoint\",\"category\":\"WT_VERB_CHECKPOINT_PROGRESS\",\"category_id\":6,\"verbose_level\":\"DEBUG_1\",\"verbose_level_id\":1,\"msg\":\"saving checkpoint snapshot min: 37, snapshot max: 37 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 1\"}}}\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\ncurl: (7) Failed to connect to 127.0.0.1 port 8080 after 0 ms: Connection refused\r\nWarning: Problem : connection refused. Will retry in 10 seconds. 35 retries \r\nWarning: left.\r\n`\r\n\r\nplease help me out thanks\r\n\r\nand yes i've added ` HF_TOEKN ` secret too",
    "url": "https://github.com/huggingface/chat-ui/issues/1174",
    "state": "open",
    "labels": [
      "support",
      "docker"
    ],
    "created_at": "2024-05-26T07:05:12Z",
    "updated_at": "2025-06-27T10:30:24Z",
    "comments": 5,
    "user": "starlord263"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1876,
    "title": "Unable to generate question-answering model for Llama and there is also no list of what are the supported models for question-answering",
    "body": "### Feature request\n\nHi, I received this error:\r\n\r\nValueError: Asked to export a llama model for the task question-answering, but the Optimum ONNX exporter only supports the tasks feature-extraction, feature-extraction-with-past, text-generation, text-generation-with-past, text-classification for llama. Please use a supported task. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the task question-answering to be supported in the ONNX export for llama.\r\n\r\nI was trying to generate an ONNX model for QuanAI/llama-2-7b-question-answering.\r\n\r\nI also tried to search for the supported question-answering models on https://huggingface.co/docs/optimum/exporters/onnx/usage_guides/export_a_model which had a broken link pointing to https://huggingface.co/exporters/task_manager (returns a 404). I am happy to consider other question-answering models instead of Llama if there is a list of what is available.\n\n### Motivation\n\nUnable to export Llama question-answering model\n\n### Your contribution\n\nNot sure how to contribute, I am a new user",
    "url": "https://github.com/huggingface/optimum/issues/1876",
    "state": "open",
    "labels": [
      "bug",
      "onnx"
    ],
    "created_at": "2024-05-26T06:10:47Z",
    "updated_at": "2024-10-09T07:57:24Z",
    "user": "customautosys"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 776,
    "title": "How to point to a specific model path in order to use compressed models? (brotli)",
    "body": "### Question\n\nHi, \r\n\r\nI just can't find the configuration to point to a specific model file path to use .onnx.br instead of .onnx for example. \r\n\r\nI can run the model (distilbert-base-cased-distilled-squad) offline without any issue and it works. But I want to deploy it compressed using brotli. All I can see in the config files is references to the folder of the model but not the actual file paths. \r\n\r\nE.g \"model_quantized.onnx\"\r\n\r\nAny help is appreciated.",
    "url": "https://github.com/huggingface/transformers.js/issues/776",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-24T18:31:12Z",
    "updated_at": "2024-05-25T10:24:25Z",
    "user": "KamilCSPS"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1169,
    "title": "Help debugging \"Sorry, something went wrong. Please try again.\"",
    "body": "I am a developer working on extending this project. Sometimes I get this error \"Sorry, something went wrong. Please try again.\" I can't figure out how to debug it when it happens. What I want is for it to display the full error somehow, like with a console.log. Is there some way to do that? Or is the error saved in the mongodb? This will help me a lot with debugging.",
    "url": "https://github.com/huggingface/chat-ui/issues/1169",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-24T18:30:08Z",
    "updated_at": "2024-06-17T12:47:03Z",
    "comments": 1,
    "user": "loganlebanoff"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 127075,
    "title": "What is the processing principle when the complex64 input tensor contains nan or inf for addition?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\n>>> import torch\r\n>>> a = torch.tensor(complex(3, float('nan')))\r\n>>> torch.add(a,a)\r\ntensor(nan+nanj)\r\n\r\nThe rule for adding complex numbers is to add the real and imaginary parts separately.\r\nIn the above example, why is the real part nan instead of 4?\r\nHow to deal with nan/inf in the output when complex tensor addition contains nan or inf? Which codes in which directory should I refer to?\r\nThank you!\r\n\r\n### Versions\r\n\r\n'2.0.0+cpu'\r\nThe results of the cpu / cuda versions of torch2.3 are the same\r\n\r\n\r\ncc @ezyang @anjali411 @dylanbespalko @mruberry @Lezcano @nikitaved @amjames",
    "url": "https://github.com/pytorch/pytorch/issues/127075",
    "state": "open",
    "labels": [
      "triaged",
      "module: complex"
    ],
    "created_at": "2024-05-24T09:55:35Z",
    "updated_at": "2024-05-27T03:59:52Z",
    "user": "liying-1997"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 847,
    "title": "Figure out how to leverage kernels in torchao",
    "body": "For quantized linear a lot of the kernels will be living in torchao: https://github.com/pytorch/ao/tree/main/torchao/csrc\r\n\r\nWe need to figure out how to use these kernels in torchchat/executorch.\r\n",
    "url": "https://github.com/pytorch/torchchat/issues/847",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-23T19:04:48Z",
    "updated_at": "2024-07-21T21:53:58Z",
    "user": "larryliu0820"
  },
  {
    "repo": "pytorch/xla",
    "number": 7103,
    "title": "Why does my 3-layer linear graph need to output two Transposes?",
    "body": "## \u2753 Questions and Help\r\ntorchxla is the latest version\r\nthis is my code\uff1a\r\n```\r\nimport torch\r\nimport torch_xla\r\nimport torch_xla.runtime as xr\r\nimport torch_xla.core.xla_model as xm\r\nimport torch_xla.experimental.xla_sharding as xs\r\nfrom torch_xla.experimental.xla_sharding import Mesh\r\nfrom torch_xla.amp import autocast, GradScaler\r\nimport numpy as np\r\nimport torch.optim as optim\r\nimport torch_xla.debug.profiler as xp\r\nimport time\r\nimport os\r\n# Setup profiler env var\r\nos.environ['XLA_HLO_DEBUG'] = '1'\r\n\r\nt1 = torch.randn(1600, 12800, device='cpu')\r\n\r\nxt1 = t1.to(xm.xla_device())\r\nclass MyModel(nn.Module):\r\n    def __init__(self):\r\n        self.linear1 = torch.nn.Linear(12800, 9600)\r\n        self.linear2 = torch.nn.Linear(9600, 1280)\r\n        self.linear3 = torch.nn.Linear(1280, 128)\r\n    def forward(self, xt1):\r\n        output = self.linear1(xt1)\r\n        output1 = self.linear2(output)\r\n        output2 = self.linear3(output1)\r\n        return output2\r\nmy_model = MyModel().to(xm.xla_device())\r\nans = my_model(xt1)\r\nxm.mark_step()\r\n```\r\nIn the hlo graph that was dumped, you can see that there are two transpose tensors in the output field\uff1a\r\n```\r\nHloModule SyncTensorsGraph.30, entry_computation_layout={(f32[9600]{0}, f32[9600,12800]{1,0}, f32[1600,12800]{1,0}, f32[1280,9600]{1,0}, f32[1280]{0}, /*index=5*/f32[128,1280]{1,0}, f32[128]{0})->(f32[1600,9600]{1,0}, f32[9600,1280]{1,0}, f32[1600,1280]{1,0}, f32[1280,128]{1,0}, f32[1600,128]{1,0})}, replica_count=8\r\n\r\nENTRY SyncTensorsGraph.30 {\r\n  p2.4 = f32[1600,12800]{1,0} parameter(2), metadata={op_type=\"xla__device_data\" op_name=\"xla__device_data\"}\r\n  p1.2 = f32[9600,12800]{1,0} parameter(1), metadata={op_type=\"xla__device_data\" op_name=\"xla__device_data\"}\r\n  transpose.3 = f32[12800,9600]{0,1} transpose(p1.2), dimensions={1,0}, metadata={op_type=\"aten__permute\" op_name=\"aten__permute\"}\r\n  dot.5 = f32[1600,9600]{1,0} dot(p2.4, transpose.3), lhs_contracting_dims={1}, rhs_contracting_dims={0}, metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  p0.1 = f32[9600]{0} parameter(0), metadata={op_type=\"xla__device_data\" op_name=\"xla__device_data\"}\r\n  reshape.6 = f32[1,9600]{1,0} reshape(p0.1), metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  broadcast.7 = f32[1,9600]{1,0} broadcast(reshape.6), dimensions={0,1}, metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  reshape.8 = f32[9600]{0} reshape(broadcast.7), metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  broadcast.9 = f32[1600,9600]{1,0} broadcast(reshape.8), dimensions={1}, metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  add.10 = f32[1600,9600]{1,0} add(dot.5, broadcast.9), metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  p3.11 = f32[1280,9600]{1,0} parameter(3), metadata={op_type=\"xla__device_data\" op_name=\"xla__device_data\"}\r\n  transpose.12 = f32[9600,1280]{0,1} transpose(p3.11), dimensions={1,0}, metadata={op_type=\"aten__permute\" op_name=\"aten__permute\"}\r\n  dot.14 = f32[1600,1280]{1,0} dot(add.10, transpose.12), lhs_contracting_dims={1}, rhs_contracting_dims={0}, metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  p4.13 = f32[1280]{0} parameter(4), metadata={op_type=\"xla__device_data\" op_name=\"xla__device_data\"}\r\n  reshape.15 = f32[1,1280]{1,0} reshape(p4.13), metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  broadcast.16 = f32[1,1280]{1,0} broadcast(reshape.15), dimensions={0,1}, metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  reshape.17 = f32[1280]{0} reshape(broadcast.16), metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  broadcast.18 = f32[1600,1280]{1,0} broadcast(reshape.17), dimensions={1}, metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  add.19 = f32[1600,1280]{1,0} add(dot.14, broadcast.18), metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  p5.20 = f32[128,1280]{1,0} parameter(5), metadata={op_type=\"xla__device_data\" op_name=\"xla__device_data\"}\r\n  transpose.21 = f32[1280,128]{0,1} transpose(p5.20), dimensions={1,0}, metadata={op_type=\"aten__permute\" op_name=\"aten__permute\"}\r\n  dot.23 = f32[1600,128]{1,0} dot(add.19, transpose.21), lhs_contracting_dims={1}, rhs_contracting_dims={0}, metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  p6.22 = f32[128]{0} parameter(6), metadata={op_type=\"xla__device_data\" op_name=\"xla__device_data\"}\r\n  reshape.24 = f32[1,128]{1,0} reshape(p6.22), metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  broadcast.25 = f32[1,128]{1,0} broadcast(reshape.24), dimensions={0,1}, metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  reshape.26 = f32[128]{0} reshape(broadcast.25), metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  broadcast.27 = f32[1600,128]{1,0} broadcast(reshape.26), dimensions={1}, metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  add.28 = f32[1600,128]{1,0} add(dot.23, broadcast.27), metadata={op_type=\"aten__addmm\" op_name=\"aten__addmm\"}\r\n  ROOT tuple.29 = (f32[1600,9600]{1,0}, f32[9600,1280]{0,1}, f32[1600,1280]{1,0}, f32[1280,128]{0,1}, f32[",
    "url": "https://github.com/pytorch/xla/issues/7103",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-23T08:54:02Z",
    "updated_at": "2025-04-07T13:59:14Z",
    "user": "mars1248"
  },
  {
    "repo": "pytorch/xla",
    "number": 7102,
    "title": "Problem with mesh shape in HybridMesh on TPU",
    "body": "## \u2753 Questions and Help\r\nI recived error when try create sqmd mesh on kaggle notebook when flow [Huggingface optimum-tpu](https://github.com/huggingface/optimum-tpu/blob/695ee84d657d9ed2761fcf481685afad0e849a90/examples/language-modeling/run_clm.py#L484)\r\n\r\n```\r\nimport os\r\nimport numpy as np\r\n\r\nimport torch_xla\r\nimport torch_xla.core.xla_model as xm\r\nimport torch_xla.distributed.xla_multiprocessing as xmp\r\nfrom torch_xla.distributed.fsdp import checkpoint_module\r\nfrom torch_xla.distributed.fsdp.utils import apply_xla_patch_to_nn_linear\r\nimport torch_xla.distributed.parallel_loader as pl\r\nimport torch_xla.core.xla_env_vars as xenv\r\nimport torch_xla.debug.metrics as met\r\nimport torch_xla.distributed.spmd.xla_sharding as xs\r\nfrom torch_xla.distributed.spmd.xla_sharding import Mesh, HybridMesh\r\nfrom torch_xla.distributed.spmd.xla_sharded_tensor import XLAShardedTensor\r\nimport torch_xla.runtime as xr\r\nxr.use_spmd()\r\n\r\nos.environ['USE_TORCH'] = 'True'\r\nos.environ[\"PJRT_DEVICE\"] = \"TPU\"\r\nos.environ['TPU_NUM_DEVICES'] = '8'\r\nos.environ[xenv.TPU_VISIBLE_CHIPS] = '0,1,2,3'\r\nos.environ[xenv.TPU_PROCESS_BOUNDS] = '1,1,1'\r\nnum_devices = xr.global_runtime_device_count() # 8\r\nmodel_axis = 1\r\nassert xr.device_type() == 'TPU', \"Only TPU is supported\"\r\n#     dcn_axis = model_args.spmd_dcn_parallelism # 1\r\ndcn_axis = 1\r\ndata_axis = num_devices // model_axis // dcn_axis\r\n# mesh data setup\r\nici_mesh_shape = (1, data_axis, model_axis)\r\ndcn_mesh_shape = (dcn_axis, 1, 1)\r\naxis_names=('dcn', 'data', 'model')\r\nprint('ici', ici_mesh_shape)\r\nprint('dcn', dcn_mesh_shape)\r\n# Note that we do not pass the spmd_mesh to the model because it is not JSON-serializable.\r\nspmd_mesh = HybridMesh(ici_mesh_shape=ici_mesh_shape, dcn_mesh_shape=dcn_mesh_shape, axis_names=axis_names)\r\n```\r\n\r\nfull error:\r\n\r\n```\r\nici (1, 8, 1)\r\ndcn (1, 1, 1)\r\n---------------------------------------------------------------------------\r\nNotImplementedError                       Traceback (most recent call last)\r\nCell In[28], line 41\r\n     39 print('dcn', dcn_mesh_shape)\r\n     40 # Note that we do not pass the spmd_mesh to the model because it is not JSON-serializable.\r\n---> 41 spmd_mesh = HybridMesh(ici_mesh_shape=ici_mesh_shape, dcn_mesh_shape=dcn_mesh_shape, axis_names=axis_names)\r\n\r\nFile /usr/local/lib/python3.10/site-packages/torch_xla/distributed/spmd/xla_sharding.py:188, in HybridMesh.__init__(self, ici_mesh_shape, dcn_mesh_shape, axis_names)\r\n    185   mesh = self._create_hybrid_device_mesh(self.ici_mesh_shape,\r\n    186                                          self.dcn_mesh_shape)\r\n    187 else:\r\n--> 188   mesh = self._create_device_mesh(self.ici_mesh_shape)\r\n    189 device_ids = mesh.flatten()\r\n    190 super().__init__(device_ids, mesh_shape, axis_names)\r\n\r\nFile /usr/local/lib/python3.10/site-packages/torch_xla/distributed/spmd/xla_sharding.py:323, in HybridMesh._create_device_mesh(self, mesh_shape, devices)\r\n    319   raise ValueError(\r\n    320       f'Number of devices {len(devices)} must equal the product '\r\n    321       f'of mesh_shape {mesh_shape}')\r\n    322 physical_mesh = self._get_physical_tpu_mesh(devices)\r\n--> 323 device_mesh, assignment = self._create_device_mesh_for_nd_torus(\r\n    324     physical_mesh, mesh_shape)\r\n    325 return device_mesh\r\n\r\nFile /usr/local/lib/python3.10/site-packages/torch_xla/distributed/spmd/xla_sharding.py:286, in HybridMesh._create_device_mesh_for_nd_torus(self, physical_mesh, mesh_shape)\r\n    282   else:\r\n    283     # If the num_axes for loop did not break, i.e. none of the candidates work\r\n    284     # goto here with this while-else construct.\r\n    285     if logical_axis_size > 1:\r\n--> 286       raise NotImplementedError(\r\n    287           'Failed to find assignment for logical_axis_index'\r\n    288           f' {logical_axis_index} of size {logical_axis_size} with remaining'\r\n    289           f' assignable mesh {assignable_physical_mesh}. The size of each'\r\n    290           ' axis in your logical mesh must be equal to the product of'\r\n    291           ' some subset of the physical mesh axis sizes. E.g logical mesh (4,'\r\n    292           ' 16) is compatible with physical mesh 4x4x4 since 4=4 and 16=4x4.'\r\n    293       )\r\n    294 # Flatten the assignment\r\n    295 transpose: List[int] = []\r\n\r\nNotImplementedError: Failed to find assignment for logical_axis_index 1 of size 8 with remaining assignable mesh [2, 2, 0]. The size of each axis in your logical mesh must be equal to the product of some subset of the physical mesh axis sizes. E.g logical mesh (4, 16) is compatible with physical mesh 4x4x4 since 4=4 and 16=4x4.\r\n```\r\n\r\nTPUv3-8 of kaggle have 8 cores(2x4) so I don't know why i get error. What problem? Thanks for your help!",
    "url": "https://github.com/pytorch/xla/issues/7102",
    "state": "closed",
    "labels": [
      "question",
      "distributed",
      "xla:tpu"
    ],
    "created_at": "2024-05-23T06:39:44Z",
    "updated_at": "2025-04-17T13:33:19Z",
    "user": "hiwamk"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6916,
    "title": "```push_to_hub()``` - Prevent Automatic Generation of Splits ",
    "body": "### Describe the bug\n\nI currently have a dataset which has not been splited. When pushing the dataset to my hugging face dataset repository, it is split into a testing and training set. How can I prevent the split from happening?\n\n### Steps to reproduce the bug\n\n1. Have a unsplit dataset \r\n\r\n```python\r\nDataset({ features: ['input', 'output', 'Attack', '__index_level_0__'], num_rows: 944685 })\r\n```\r\n\r\n2. Push it to huggingface\r\n\r\n```python\r\ndataset.push_to_hub(dataset_name)\r\n```\r\n\r\n3. On the hugging face dataset repo, the dataset then appears to be splited:\r\n\r\n![image](https://github.com/huggingface/datasets/assets/29337128/b4fbc141-42b0-4f49-98df-dd479648fe09)\r\n\r\n4. Indeed, when loading the dataset from this repo, the dataset is split in two testing and training set.\r\n\r\n```python\r\nfrom datasets import load_dataset, Dataset\r\n\r\ndataset = load_dataset(\"Jetlime/NF-CSE-CIC-IDS2018-v2\", streaming=True)\r\ndataset\r\n```\r\noutput: \r\n\r\n```\r\nIterableDatasetDict({\r\n    train: IterableDataset({\r\n        features: ['input', 'output', 'Attack', '__index_level_0__'],\r\n        n_shards: 2\r\n    })\r\n    test: IterableDataset({\r\n        features: ['input', 'output', 'Attack', '__index_level_0__'],\r\n        n_shards: 1\r\n    })\r\n```\n\n### Expected behavior\n\nThe dataset shall not be splited, as not requested.\n\n### Environment info\n\n- `datasets` version: 2.19.1\r\n- Platform: Linux-6.2.0-35-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.12\r\n- `huggingface_hub` version: 0.23.0\r\n- PyArrow version: 15.0.2\r\n- Pandas version: 2.2.2\r\n- `fsspec` version: 2024.3.1",
    "url": "https://github.com/huggingface/datasets/issues/6916",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-22T23:52:15Z",
    "updated_at": "2024-05-23T00:07:53Z",
    "comments": 0,
    "user": "jetlime"
  },
  {
    "repo": "pytorch/vision",
    "number": 8437,
    "title": "Add mobilenetv4 support and pretrained models?",
    "body": "### \ud83d\ude80 The feature\n\nGoogle has published the mobilenetv4 model. When will pytorch support it and open the pre-trained model?\n\n### Motivation, pitch\n\nI very much hope to use the latest lightweight backbone\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/8437",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-22T06:16:00Z",
    "updated_at": "2024-06-14T02:01:20Z",
    "comments": 5,
    "user": "LiYufengzz"
  },
  {
    "repo": "huggingface/peft",
    "number": 1750,
    "title": "How to finetune embeddings and LM head as a single layer when they are tied?",
    "body": "I am looking to LoRA-finetune models like Gemma, which have tied embeddings.\r\nBut, I would also like to have the shared embeddings as trainable (the common embedding table corresponding to both input and output embeddings of the network).\r\n\r\nHow do I achieve this?\r\n\r\n---\r\n\r\n_Note:_  Passing both `[\"embed_tokens\",\"lm_head\"]` to `modules_to_save` will result in untying them, because PEFT will create separate tensor copies. Passing only `[\"embed_tokens\"]` will result in only the input embeddings trainable (by making a separate PEFT copy), while the output embeddings being as it is (the original tensor).",
    "url": "https://github.com/huggingface/peft/issues/1750",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-21T18:32:07Z",
    "updated_at": "2025-08-12T11:54:09Z",
    "user": "GokulNC"
  },
  {
    "repo": "pytorch/audio",
    "number": 3797,
    "title": "RTSP with StreamReader",
    "body": "Does torchaudio supports RTSP streams? I've been using with RTMP but when running RTSP streams is always crashes, mainly reporting that \"threads\" argument passed to FFMPEG is not supported.\r\n\r\nUsing FFMPEG 6.0\r\n\r\n![image](https://github.com/pytorch/audio/assets/16081608/ebcb5642-9ae3-4997-b85c-dfc155ba8673)\r\n",
    "url": "https://github.com/pytorch/audio/issues/3797",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-21T14:55:21Z",
    "updated_at": "2024-05-21T15:59:40Z",
    "comments": 0,
    "user": "pedromoraesh"
  },
  {
    "repo": "huggingface/blog",
    "number": 2078,
    "title": "Idefics2's perceiver how to make attentionamsk to None?",
    "body": "I set  atttentionmask to None, but the model doesn't learned well, my inputs didn't padded so I dont want attention mask. How to resolve this?\r\n\r\nI also tried add a all ones attnetionmask, but the result also very worse.",
    "url": "https://github.com/huggingface/blog/issues/2078",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-21T07:38:57Z",
    "updated_at": "2024-05-21T07:38:57Z",
    "user": "lucasjinreal"
  },
  {
    "repo": "huggingface/peft",
    "number": 1749,
    "title": "how to fine tune LoRA HQQ?",
    "body": "### Feature request\n\nhow to fine tune LoRA to HQQ?\n\n### Motivation\n\nhow to fine tune LoRA to HQQ?\n\n### Your contribution\n\nhow to fine tune LoRA to HQQ?",
    "url": "https://github.com/huggingface/peft/issues/1749",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-21T02:56:18Z",
    "updated_at": "2024-06-29T15:03:18Z",
    "user": "NickyDark1"
  },
  {
    "repo": "huggingface/trl",
    "number": 1650,
    "title": "how to save v_head",
    "body": "currently, I use `ppo_trainer.save_pretrained` to save a model that is still in training, because the machine I used is rather unstable, and I would often need to resume retraining should it be interrupted. When I resume the training I got the following warning:\r\n```\r\nWARNING:root:A <class 'peft.peft_model.PeftModelForCausalLM'> model is loaded from 'RLGAF_gemma-7b-lima_sft_preprocessing_20epochs', and no v_head weight is found. This IS expected if you are not resuming PPO training.\r\n```\r\nI guess this is relevant to my case, since I need to resume PPO training. What is the proper way then to save the checkpoint of PPO training with the goal of resuming it later?",
    "url": "https://github.com/huggingface/trl/issues/1650",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-20T17:06:00Z",
    "updated_at": "2025-04-11T10:14:36Z",
    "user": "zyzhang1130"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 837,
    "title": "Cannot build mobile android app in unit test - due to licensing question in build process?",
    "body": "https://github.com/pytorch/torchchat/actions/runs/9161687849/job/25187114502?pr=831\r\n\r\nJanuary 16, 2019\r\n---------------------------------------\r\nAccept? (y/N): Skipping following packages as the license is not accepted:\r\nGoogle APIs Intel x86_64 Atom System Image\r\nThe following packages can not be installed since their licenses or those of the packages they depend on were not accepted:\r\n  system-images;android-34;google_apis;x86_64\r\n[=======================================] 100% Computing updates...             \r\n\r\n+ avdmanager list avd\r\n+ grep -q torchchat\r\n+ avdmanager create avd --name torchchat --package 'system-images;android-34;google_apis;x86_64'\r\nLoading local repository...                                                     \r\n[=========                              ] 25% Loading local repository...       \r\n[=========                              ] 25% Fetch remote repository...        \r\n[=======================================] 100% Fetch remote repository...       \r\nError: Package path is not valid. Valid system image paths are:\r\nnull",
    "url": "https://github.com/pytorch/torchchat/issues/837",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-20T17:01:29Z",
    "updated_at": "2024-08-20T18:26:20Z",
    "comments": 0,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1153,
    "title": "Can we use Hugging Face Chat with a Custom Server ",
    "body": "Requirement: \r\nI have a custom API which takes in the inputs queries and passes it through a RAG pipeline and finally to llm and returns the result. \r\n\r\nQuestion is, can I integrate it with Chat-UI (utilizing just chat-ui frontend and my custom backend). If yes, is there any documentation around it.  As per what I understood till now, it looks like it is possible, but I have to make  a lot of changes in the UI code itself to accommodate this. What I can see is that the UI is tightly coupled with the text generation from models and doesn't fully support calling an API directly without making code changes. \r\n\r\nAre there any docs for this?\r\n\r\nAlso, can we use any other db other than mongodb?",
    "url": "https://github.com/huggingface/chat-ui/issues/1153",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-20T16:44:01Z",
    "updated_at": "2024-09-03T07:52:18Z",
    "comments": 9,
    "user": "snps-ravinu"
  },
  {
    "repo": "huggingface/nanotron",
    "number": 176,
    "title": "Where is the \"nanotron format\" defined?",
    "body": "I see that any(?) hf model can be converted to nanotron format with this [script](https://github.com/huggingface/nanotron/blob/main/examples/llama/convert_hf_to_nanotron.py).\r\n\r\nIs there documentation describing this format?\r\n\r\nCan any model that may be loaded with AutoModelForCausalLM be converted to nanotron format for training?\r\n\r\n",
    "url": "https://github.com/huggingface/nanotron/issues/176",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-20T13:54:52Z",
    "updated_at": "2024-05-21T17:22:50Z",
    "user": "RonanKMcGovern"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1151,
    "title": "Can I change localhost to remote IP?",
    "body": "I am running Chat-UI in local, but I want to change localhost to IP, I am unable to find this configguration in the code. Can anyone help?",
    "url": "https://github.com/huggingface/chat-ui/issues/1151",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-20T05:34:23Z",
    "updated_at": "2024-05-20T07:01:30Z",
    "comments": 1,
    "user": "snps-ravinu"
  },
  {
    "repo": "huggingface/candle",
    "number": 2197,
    "title": "How to slice a tensor?",
    "body": "tch has the function `slice` that return a tensor slice. Is there a corresponding function for candle?",
    "url": "https://github.com/huggingface/candle/issues/2197",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-20T00:55:08Z",
    "updated_at": "2024-05-20T01:46:58Z",
    "user": "Gadersd"
  },
  {
    "repo": "pytorch/audio",
    "number": 3796,
    "title": "How to use my finetuned version of wave2vec2 for forced alignment as shown in example/",
    "body": "### \ud83d\udc1b Describe the bug\n\nExample script i am following, it used default pretrained model, where as. i want to use my own finetuned model.\r\n\r\nhttps://pytorch.org/audio/main/generated/torchaudio.pipelines.Wav2Vec2FABundle.html#torchaudio.pipelines.Wav2Vec2FABundle\n\n### Versions\n\n[pip3] mypy-extensions==1.0.0\r\n[pip3] numpy==1.24.4\r\n[pip3] onnx==1.15.0\r\n[pip3] onnxruntime==1.16.3\r\n[pip3] torch==2.2.2\r\n[pip3] torchaudio==2.2.2\r\n[pip3] torchvision==0.15.2\r\n[conda] numpy                     1.24.4                   pypi_0    pypi\r\n[conda] torch                     2.2.2                    pypi_0    pypi\r\n[conda] torchaudio                2.2.2                    pypi_0    pypi\r\n[conda] torchvision               0.15.2                   pypi_0    pypi\r\n",
    "url": "https://github.com/pytorch/audio/issues/3796",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-19T19:13:25Z",
    "updated_at": "2024-05-19T19:13:25Z",
    "user": "omerarshad"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1534,
    "title": "How to allow the merging of consecutive newline tokens \\n when training a byte-level bpe tokenizer?",
    "body": "Hello, I'm currently working on training a byte-level BPE tokenizer using the Huggingface tokenizers library. I've created a simple training script, a sample corpus, and provided the output produced by this script. My aim is to understand why consecutive newline tokens `\\n` are not being merged into a single token `\\n\\n` during the tokenization process. Below are the details:\r\n\r\n```python\r\nfrom tokenizers import (\r\n    Tokenizer,\r\n    pre_tokenizers,\r\n    models,\r\n    decoders,\r\n    trainers,\r\n    processors,\r\n)\r\n\r\nfiles = [\"demo_corpus.txt\"]\r\ntokenizer = Tokenizer(models.BPE())\r\ntokenizer.pre_tokenizer = pre_tokenizers.Sequence([\r\n    pre_tokenizers.Digits(individual_digits=True),\r\n    pre_tokenizers.ByteLevel(add_prefix_space=False, use_regex=True)\r\n])\r\ntokenizer.decoder = decoders.ByteLevel()\r\ntokenizer.post_processor = processors.ByteLevel()\r\n\r\ntrainer = trainers.BpeTrainer(\r\n    initial_alphabet=pre_tokenizers.ByteLevel.alphabet(),\r\n    vocab_size=2000,\r\n    special_tokens=[\r\n        \"<pad>\", \"<|beginoftext|>\", \"<|endoftext|>\"\r\n    ]\r\n)\r\ntokenizer.train(files, trainer)\r\ntest_text = \"#include <set>\\n\\n\\n\\n\\n\"\r\n\r\nprint(\"pre-tokenize spans:\", tokenizer.pre_tokenizer.pre_tokenize_str(test_text))\r\nids = tokenizer.encode(test_text).ids\r\nprint(f\"tokens: {[tokenizer.decode([tid]) for tid in ids]}\")\r\n```\r\n\r\ndemo_corpus.txt:\r\n```\r\n#include <cstdio>\r\n\r\n#include <vector>\r\n\r\n#include <set>\r\n\r\nusing namespace std;\r\n\r\nint main(){\r\n    int N, A[100000], p = 0;\r\n\r\n    multiset<int> S;\r\n\r\n    scanf(\"%d\", &N);\r\n\r\n    int p0 = 0, q0 = 1, q = N-1;\r\n\r\n    vector<int> result;\r\n\r\n    for(int i: result)\r\n\r\n        printf(\"%d\\n\", i);\r\n}\r\n```\r\n\r\noutput of training script:\r\n```\r\npre-tokenize spans: [('#', (0, 1)), ('include', (1, 8)), ('\u0120<', (8, 10)), ('set', (10, 13)), ('>', (13, 14)), ('\u010a\u010a\u010a\u010a\u010a', (14, 19))]\r\ntokens: ['#', 'include', ' <', 'set', '>', '\\n', '\\n', '\\n', '\\n', '\\n']\r\n```\r\n\r\nthe following is tokens produced by llama3 tokenizer:\r\n```python\r\ntokenizer = LlamaTokenizerFast.from_pretrained(\"my llama3 vocab path\")\r\ntest_text = \"#include <set>\\n\\n\\n\\n\\n\"\r\nprint([tokenizer.decode([tid]) for tid in tokenizer(test_text)[\"input_ids\"]])\r\n\r\n# output\r\n# ['<|begin_of_text|>', '#include', ' <', 'set', '>\\n\\n\\n\\n\\n']\r\n```\r\n",
    "url": "https://github.com/huggingface/tokenizers/issues/1534",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-05-18T03:11:35Z",
    "updated_at": "2025-07-07T09:34:16Z",
    "user": "liuslnlp"
  },
  {
    "repo": "huggingface/transformers",
    "number": 30886,
    "title": "How to get the data seen by the model during training?",
    "body": "Hi! I haven't been able to find an answer to my question so opening an issue here. I'm fine-tuning the GPT-2 XL model using the trainer for 10 epochs and I'd like to save the data seen by the model during each epoch. More specifically, I want to save the data seen by the model every 242 steps. For instance, data seen from step 1 to step 242, step 243 to step 484, and so on until the end of the 10th epoch. I'm a bit confused about how to do this since the data is shuffled after each epoch. Is it possible to use `TrainerCallback` here?\r\n\r\nThese are my training args\r\n` training_args = TrainingArguments(\r\n        f\"models/XL\",\r\n        evaluation_strategy = \"steps\",\r\n        learning_rate=2e-5,\r\n        weight_decay=0.01,\r\n        push_to_hub=False,\r\n        num_train_epochs=10,\r\n        per_device_train_batch_size=8, \r\n        per_device_eval_batch_size=8, \r\n        save_strategy=\"epoch\", \r\n        save_steps = 242, \r\n        fp16=True, \r\n        report_to=\"none\", \r\n        logging_strategy=\"steps\",\r\n        logging_steps=100, \r\n    )`\r\n    \r\n I'd appreciate any directions. Thanks :) ",
    "url": "https://github.com/huggingface/transformers/issues/30886",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-17T21:32:50Z",
    "updated_at": "2024-05-20T17:26:29Z",
    "user": "jaydeepborkar"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1859,
    "title": "Improve inference time TrOCR",
    "body": "I have a fine tuning TrOCR model, and i'm using \r\n`from optimum.onnxruntime import ORTModelForVision2Seq`\r\nhow i can then make the inferation faster, when some one make a request in a endpoint api ? , i already using async for multi request",
    "url": "https://github.com/huggingface/optimum/issues/1859",
    "state": "closed",
    "labels": [
      "question",
      "inference",
      "Stale"
    ],
    "created_at": "2024-05-16T13:31:53Z",
    "updated_at": "2024-12-18T02:06:21Z",
    "user": "CrasCris"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1148,
    "title": "Chat-ui Audit Logs",
    "body": "Hello,\r\n\r\nIs there a way to log the username, sessionID, conversation ID, what question was sent in some type of log in chat-ui ? Or just the username and the question?\r\n\r\nHow can we accomplish this?\r\n\r\nThanks",
    "url": "https://github.com/huggingface/chat-ui/issues/1148",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-16T11:13:30Z",
    "updated_at": "2024-05-21T18:48:17Z",
    "comments": 5,
    "user": "Neb2653"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7957,
    "title": "How to implement `IPAdapterAttnProcessor2_0` with xformers",
    "body": "I want to fine-tune IP-adapter model with xformers, but I did not find the implementation of the xformers version corresponding to IPAdapterAttnProcessor2_0. I want to implement attention processor in xformers, are the following two lines of code the only difference between the two versions?\r\n\r\nIn `XFormersAttnProcessor`:\r\n```python\r\nhidden_states = xformers.ops.memory_efficient_attention(\r\n    query, key, value, attn_bias=attention_mask, op=self.attention_op, scale=attn.scale\r\n)\r\n```\r\n\r\nIn `AttnProcessor2_0`:\r\n```python\r\nhidden_states = F.scaled_dot_product_attention(\r\n    query, key, value, attn_mask=attention_mask, dropout_p=0.0, is_causal=False\r\n)\r\n```",
    "url": "https://github.com/huggingface/diffusers/issues/7957",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-16T08:54:07Z",
    "updated_at": "2024-05-23T13:03:42Z",
    "user": "JWargrave"
  },
  {
    "repo": "pytorch/xla",
    "number": 7070,
    "title": "Cannot Import _XLAC",
    "body": "## \u2753 Questions and Help\r\nWhen I want to import torch_xla,the error occurs\r\n```shell\r\n>>> import torch_xla\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/code/pytorch/torch-xla/torch_xla/__init__.py\", line 114, in <module>\r\n    import _XLAC\r\nImportError: /code/pytorch/torch-xla/_XLAC.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZNK5torch8autograd4Node4nameEv\r\n``` \r\n\r\nAnd I have followed the guide to make sure my torch version is the same as torch_xla\r\n[https://github.com/Lightning-AI/pytorch-lightning/discussions/8320](url)\r\n```shell\r\n>>> pip list | grep torch\r\n[2]+  Stopped                 python\r\n(torch_xla) root@0c9ffd606fd3:/code/pytorch/torch-xla# pip list | grep torch\r\nrotary-embedding-torch    0.6.0\r\ntorch                     2.1.0+cu121        /root/miniconda3/envs/torch_xla/lib/python3.10/site-packages\r\ntorch-xla                 2.1.0              /code/pytorch/torch-xla\r\ntorchaudio                2.1.0+cu121\r\ntorchview                 0.2.6\r\ntorchvision               0.16.0+cu121\r\ntorchviz                  0.0.2\r\n``` \r\nWhat should I do? TXS help",
    "url": "https://github.com/pytorch/xla/issues/7070",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-16T07:24:08Z",
    "updated_at": "2025-04-17T13:38:56Z",
    "user": "DarkenStar"
  },
  {
    "repo": "huggingface/OBELICS",
    "number": 12,
    "title": "How to use LDA for topic modeling",
    "body": "Thanks for your work again!\r\nIn the paper the topic modeling of OBELICS is implemented using LDA, and I am wondering what is the specific LDA model was used, what setting was used to train the model, and most importantly, how the topic was derived from the key words and weights(like using LLMs)? Thank you for answering! ",
    "url": "https://github.com/huggingface/OBELICS/issues/12",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-16T03:56:29Z",
    "updated_at": "2024-06-11T16:27:12Z",
    "user": "jrryzh"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 765,
    "title": "Can you use all transformers models with transformers.js? ",
    "body": "### Question\r\n\r\nHi,\r\ncan you use [all transformers models ](https://huggingface.co/models?library=transformers&sort=trending)(which seem to be listed under the python library) also in transformers.js? If yes, how so? Just download and provide the local path? I'm working in nodejs right now.\r\n\r\nFor example I'd like to use something like [Llama 3](https://huggingface.co/meta-llama/Meta-Llama-3-8B) with Transformers.js.\r\nIf that doesn't work, what would be the strongest general purpose LLM available for transformers.js right now (text generation, something like chatgpt, gemini, ...)?\r\n\r\nGreetings & thanks a lot!",
    "url": "https://github.com/huggingface/transformers.js/issues/765",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-15T19:35:28Z",
    "updated_at": "2024-05-15T21:21:57Z",
    "user": "Sir-hennihau"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6899,
    "title": "List of dictionary features get standardized",
    "body": "### Describe the bug\n\nHi, i\u2019m trying to create a HF dataset from a list using Dataset.from_list.\r\n\r\nEach sample in the list is a dict with the same keys (which will be my features). The values for each feature are a list of dictionaries, and each such dictionary has a different set of keys. However, the datasets library standardizes all dictionaries under a feature and adds all possible keys (with None value) from all the dictionaries under that feature.\r\n\r\nHow can I keep the same set of keys as in the original list for each dictionary under a feature?\n\n### Steps to reproduce the bug\n\n```\r\nfrom datasets import Dataset\r\n\r\n# Define a function to generate a sample with \"tools\" feature\r\ndef generate_sample():\r\n    # Generate random sample data\r\n    sample_data = {\r\n        \"text\": \"Sample text\",\r\n        \"feature_1\": []\r\n    }\r\n    \r\n    # Add feature_1 with random keys for this sample\r\n    feature_1 = [{\"key1\": \"value1\"}, {\"key2\": \"value2\"}]  # Example feature_1 with random keys\r\n    sample_data[\"feature_1\"].extend(feature_1)\r\n    \r\n    return sample_data\r\n\r\n# Generate multiple samples\r\nnum_samples = 10\r\nsamples = [generate_sample() for _ in range(num_samples)]\r\n\r\n# Create a Hugging Face Dataset\r\ndataset = Dataset.from_list(samples)\r\ndataset[0]\r\n```\r\n\r\n```{'text': 'Sample text', 'feature_1': [{'key1': 'value1', 'key2': None}, {'key1': None, 'key2': 'value2'}]}```\n\n### Expected behavior\n\n```{'text': 'Sample text', 'feature_1': [{'key1': 'value1'}, {'key2': 'value2'}]}```\n\n### Environment info\n\n- `datasets` version: 2.19.1\r\n- Platform: Linux-5.15.0-1040-nvidia-x86_64-with-glibc2.35\r\n- Python version: 3.10.13\r\n- `huggingface_hub` version: 0.23.0\r\n- PyArrow version: 15.0.0\r\n- Pandas version: 2.2.0\r\n- `fsspec` version: 2023.10.0",
    "url": "https://github.com/huggingface/datasets/issues/6899",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-15T14:11:35Z",
    "updated_at": "2025-04-01T20:48:03Z",
    "comments": 2,
    "user": "sohamparikh"
  },
  {
    "repo": "huggingface/transformers",
    "number": 30827,
    "title": "Using this command(optimum-cli export onnx --model Qwen1.5-0.5B-Chat --task text-generation Qwen1.5-0.5B-Chat_onnx/) to perform onnx transformation, it is found that the tensor type of the model becomes int64. How to solve this problem?",
    "body": "### System Info\n\ntransformers version : 4.38.1\r\nplatform: ubuntu 22.04\r\npython version : 3.10.14\r\noptimum version : 1.19.2\n\n### Who can help?\n\n@ArthurZucker and @younesbelkada\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n1.reference conversion command link: https://huggingface.co/docs/transformers/v4.40.1/zh/serialization\r\n2.download model files offline (https://huggingface.co/Qwen/Qwen1.5-0.5B-Chat/tree/main)\r\n3.Execute transition instruction\uff1aoptimum-cli export onnx --model Qwen1.5-0.5B-Chat --task text-generation Qwen1.5-0.5B-Chat_onnx/\r\n\r\nThe conversion results are as follows\uff1a\r\n(mypy3.10_qnn) zhengjr@ubuntu-ThinkStation-P3-Tower:~$ optimum-cli export onnx --model Qwen1.5-0.5B-Chat --task text-generation Qwen1.5-0.5B-Chat_onnx/\r\n2024-05-15 19:42:07.726433: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 AVX_VNNI FMA\r\nTo enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\r\n2024-05-15 19:42:07.916257: I tensorflow/core/util/util.cc:169] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\r\n2024-05-15 19:42:07.997974: E tensorflow/stream_executor/cuda/cuda_blas.cc:2981] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\r\n2024-05-15 19:42:08.545959: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory\r\n2024-05-15 19:42:08.546100: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory\r\n2024-05-15 19:42:08.546104: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.\r\nFramework not specified. Using pt to export the model.\r\nThe task `text-generation` was manually specified, and past key values will not be reused in the decoding. if needed, please pass `--task text-generation-with-past` to export using the past key values.\r\nSpecial tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\r\nSpecial tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\r\nUsing the export variant default. Available variants are:\r\n    - default: The default ONNX variant.\r\nSpecial tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\r\nSpecial tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\r\n\r\n***** Exporting submodel 1/1: Qwen2ForCausalLM *****\r\nUsing framework PyTorch: 1.13.1\r\nOverriding 1 configuration item(s)\r\n\t- use_cache -> False\r\n/home/zhengjr/anaconda3/envs/mypy3.10_qnn/lib/python3.10/site-packages/transformers/modeling_attn_mask_utils.py:114: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  if (input_shape[-1] > 1 or self.sliding_window is not None) and self.is_causal:\r\n/home/zhengjr/anaconda3/envs/mypy3.10_qnn/lib/python3.10/site-packages/optimum/exporters/onnx/model_patcher.py:300: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  if past_key_values_length > 0:\r\n/home/zhengjr/anaconda3/envs/mypy3.10_qnn/lib/python3.10/site-packages/transformers/models/qwen2/modeling_qwen2.py:126: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  if seq_len > self.max_seq_len_cached:\r\n/home/zhengjr/anaconda3/envs/mypy3.10_qnn/lib/python3.10/site-packages/transformers/models/qwen2/modeling_qwen2.py:290: TracerWarning: Converting a tensor to a Python boole",
    "url": "https://github.com/huggingface/transformers/issues/30827",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-15T12:45:50Z",
    "updated_at": "2024-06-26T08:04:10Z",
    "user": "JameslaoA"
  },
  {
    "repo": "pytorch/executorch",
    "number": 3620,
    "title": "how to calculate the vocab_size of new model",
    "body": "hi, \r\nwhen I tried to introduce the \"Blue LLM\" model and evaluate its ppl, there is a mistake as follow:\r\nTraceback (most recent call last):\r\n  File \"/home/ufoe/anaconda3/envs/linchao/bin/lm_eval\", line 8, in <module>\r\n    sys.exit(cli_evaluate())\r\n  File \"/home/ufoe/linchao/lm-evaluation-harness/lm_eval/__main__.py\", line 341, in cli_evaluate\r\n    results = evaluator.simple_evaluate(\r\n  File \"/home/ufoe/linchao/lm-evaluation-harness/lm_eval/utils.py\", line 288, in _wrapper\r\n    return fn(*args, **kwargs)\r\n  File \"/home/ufoe/linchao/lm-evaluation-harness/lm_eval/evaluator.py\", line 180, in simple_evaluate\r\n    lm = lm_eval.api.registry.get_model(model).create_from_arg_string(\r\n  File \"/home/ufoe/linchao/lm-evaluation-harness/lm_eval/api/model.py\", line 134, in create_from_arg_string\r\n    return cls(**args, **args2)\r\n  File \"/home/ufoe/linchao/lm-evaluation-harness/lm_eval/models/huggingface.py\", line 203, in __init__\r\n    self._create_model(\r\n  File \"/home/ufoe/linchao/lm-evaluation-harness/lm_eval/models/huggingface.py\", line 544, in _create_model\r\n    self._model = self.AUTO_MODEL_CLASS.from_pretrained(\r\n  File \"/home/ufoe/anaconda3/envs/linchao/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py\", line 556, in from_pretrained\r\n    return model_class.from_pretrained(\r\n  File \"/home/ufoe/anaconda3/envs/linchao/lib/python3.10/site-packages/transformers/modeling_utils.py\", line 3502, in from_pretrained\r\n    ) = cls._load_pretrained_model(\r\n  File \"/home/ufoe/anaconda3/envs/linchao/lib/python3.10/site-packages/transformers/modeling_utils.py\", line 3926, in _load_pretrained_model\r\n    new_error_msgs, offload_index, state_dict_index = _load_state_dict_into_meta_model(\r\n  File \"/home/ufoe/anaconda3/envs/linchao/lib/python3.10/site-packages/transformers/modeling_utils.py\", line 805, in _load_state_dict_into_meta_model\r\n    set_module_tensor_to_device(model, param_name, param_device, **set_module_kwargs)\r\n  File \"/home/ufoe/anaconda3/envs/linchao/lib/python3.10/site-packages/accelerate/utils/modeling.py\", line 358, in set_module_tensor_to_device\r\n    raise ValueError(\r\nValueError: Trying to set a tensor of shape torch.Size([100008, 4096]) in \"weight\" (which has shape torch.Size([100096, 4096])), this look incorrect.\r\n\r\nhow to calculate the vocab_size?\r\nthank you",
    "url": "https://github.com/pytorch/executorch/issues/3620",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-15T12:20:13Z",
    "updated_at": "2024-05-16T05:12:15Z",
    "user": "l2002924700"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1142,
    "title": "Feature request, local assistants",
    "body": "I experimented with a few assistants on HF.\r\nThe problem I am facing is that I don't know how to get the same behaviour I get on HF from local model (which is the same model).\r\nI tried everything I could thing of.\r\nI think HF does some filtering or rephrasing or has an additional prompt before the assistant description.\r\nPlease help.\r\nI am available for chat on discord https://discordapp.com/users/Zibri/",
    "url": "https://github.com/huggingface/chat-ui/issues/1142",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-05-15T11:11:29Z",
    "updated_at": "2024-05-27T06:53:21Z",
    "comments": 2,
    "user": "Zibri"
  },
  {
    "repo": "pytorch/extension-cpp",
    "number": 93,
    "title": "[feature request] Instruction on how to setup compile-env for Windows ",
    "body": "Hi\r\n\r\nI have been working with extensions successfully on Linux (shipping as `whl`)\r\nAn end-user has asked me to provide a windows version of an extension, and I have to admit that it was not as simple as the documentation suggested [here](https://pytorch.org/tutorials/advanced/cpp_extension.html).\r\n\r\nCan you please provide a minimal explanation or example on how to setup the compile env for this repo?\r\nI don't mind if it is based on `setuptools` or `cmake`, as long as it does not include a non-free tool like VS-pro [here](https://github.com/mszhanyi/VSIXTorch)\r\n\r\n--------------------------------\r\n\r\nHere are some general frame of work that will help:\r\n- OS: >=Win10\r\n- PyTorch version: >=1.6.0\r\n- How you installed PyTorch (conda, pip, source): both conda and pip\r\n- Python version: >=1.8\r\n- CUDA version: >=10.2\r\n",
    "url": "https://github.com/pytorch/extension-cpp/issues/93",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-15T06:10:08Z",
    "updated_at": "2024-05-15T06:10:08Z",
    "user": "litaws"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1855,
    "title": "how to change optimum temporary path ?",
    "body": "### Feature request\n\nc drive less space\n\n### Motivation\n\nhelp to solve many issue\n\n### Your contribution\n\ndont know ",
    "url": "https://github.com/huggingface/optimum/issues/1855",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-14T11:17:14Z",
    "updated_at": "2024-10-14T12:22:35Z",
    "user": "neonarc4"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1854,
    "title": "ai21labs/Jamba-tiny-random support",
    "body": "### Feature request\n\nai21labs/Jamba-tiny-random mode, is not supported by Optimum export.\r\n\r\nValueError: Trying to export a jamba model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type jamba to be supported natively in the ONNX export.\r\n\n\n### Motivation\n\nJamba is potentially very significant as it has a large context but a small size. This could be used in lots of scenarios if it has good performance.\n\n### Your contribution\n\nUnlikely I could do a PR as ONNX work is not my forte.",
    "url": "https://github.com/huggingface/optimum/issues/1854",
    "state": "open",
    "labels": [
      "feature-request",
      "onnx"
    ],
    "created_at": "2024-05-14T10:22:05Z",
    "updated_at": "2024-10-09T09:10:58Z",
    "comments": 0,
    "user": "frankia312"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 763,
    "title": "Have considered using wasm technology to implement this library? ",
    "body": "### Question\n\nHello, have you ever considered using wasm technology to implement this library? For example, rust's wgpu-rs and c++'s dawn are both implementations of webgpu. They can be converted to wasm and can also be accelerated with simd.",
    "url": "https://github.com/huggingface/transformers.js/issues/763",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-14T09:22:57Z",
    "updated_at": "2024-05-14T09:28:38Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/trl",
    "number": 1643,
    "title": "How to save and resume a checkpoint from PPOTrainer",
    "body": "https://github.com/huggingface/trl/blob/5aeb752053876cce64f2164a178635db08d96158/trl/trainer/ppo_trainer.py#L203\r\nIt seems that every time the PPOTrainer is initialized, the accelerator is initialized as well. There's no API provided by PPOTrainer to resume checkpoints. How can we save and resume checkpoints?",
    "url": "https://github.com/huggingface/trl/issues/1643",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-14T09:10:40Z",
    "updated_at": "2024-08-08T12:44:25Z",
    "user": "paraGONG"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1531,
    "title": "How to Batch-Encode Paired Input Sentences with Tokenizers: Seeking Clarification",
    "body": "Hello.\r\n\r\nI'm using the tokenizer to encoding pair sentences in TemplateProcessing in batch_encode.\r\nThere's a confusing part where the method requires two lists for sentence A and sentence B.\r\n\r\nAccording to the [guide documentation](https://huggingface.co/docs/tokenizers/quicktour): \"To process a batch of sentences pairs, pass two lists to the Tokenizer.encode_batch method: the list of sentences A and the list of sentences B.\"\r\n\r\nSince it instructs to input two lists, it seems like [[A1, A2], [B1, B2]] --(encode)-> {A1, B1}, {A2, B2}.\r\n\r\nHowever, the actual input expects individual pairs batched, not splitting the sentence pairs into lists for A and B. \r\nSo, it should be [[A1, B1], [A2, B2]] to encode as {A1, B1}, {A2, B2}.\r\n\r\nI've also confirmed that the length of the input list for encode_batch keeps increasing with the number of batches.\r\n\r\nSince the guide instructs to input sentence A and sentence B, this is where the confusion arises.\r\nIf I've misunderstood anything, could you help clarify this point so I can understand it better?",
    "url": "https://github.com/huggingface/tokenizers/issues/1531",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-05-14T08:03:52Z",
    "updated_at": "2024-06-21T08:20:05Z",
    "user": "insookim43"
  },
  {
    "repo": "pytorch/xla",
    "number": 7057,
    "title": "Experiencing slow recompilation when manually building XLA",
    "body": "## \u2753 Questions and Help\r\n\r\nHi, I am interested in contributing to XLA community but I encounter a small challenge. After manually building `torch` and `torch_xla` on a CPU-based(CPU: **Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz**) Docker env, I noticed that the `python setup.py develop` process will take about **1 minutes** each time. So could you suggest any Dockerfile configurations or other changes that might speed up the recompilation process? Thanks for your help!",
    "url": "https://github.com/pytorch/xla/issues/7057",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-14T03:28:42Z",
    "updated_at": "2025-04-17T13:41:57Z",
    "user": "wenboqian"
  },
  {
    "repo": "pytorch/xla",
    "number": 7056,
    "title": "Export nn.Module.forward with kwargs to StableHLO",
    "body": "## \u2753 Questions and Help\r\nI see in [_exported_program_to_stablehlo_bundle()](https://github.com/pytorch/xla/blob/6f0b61e5d782913a0fc7743812f2a8e522189111/torch_xla/stablehlo.py#L318) that exporting with kwargs isn't support _**yet**_.\r\n\r\nDo you expect to support this in the near future?\r\n\r\nIf not, is there another way to lower a torch.nn.Module's `forward` method with kwargs to StableHLO?",
    "url": "https://github.com/pytorch/xla/issues/7056",
    "state": "closed",
    "labels": [
      "question",
      "stablehlo"
    ],
    "created_at": "2024-05-13T21:21:42Z",
    "updated_at": "2025-04-17T13:42:55Z",
    "user": "johnmatter"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 762,
    "title": "Options for the \"translation\" pipeline when using Xenova/t5-small",
    "body": "### Question\n\nThe translation pipeline is [documented](https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.TranslationPipeline) to use {src_lang and tgt_lang} options to translate from the src language to the tgt language. However, when using Xenova/t5-small none of the options seem to be used. Instead looking at the demo code it appears that you have to change the pipeline.task field to \"translation_{fromLanguage}_to_{targetLanguage}\" but I can't find a way to normalize the usage of the translation pipeline with different models.\r\n\r\nIs this task pattern documented somewhere or am I missing some other option settings when calling the translation pipeline?\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/762",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-13T21:09:15Z",
    "updated_at": "2024-05-13T21:09:15Z",
    "user": "lucapivato"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 784,
    "title": "Can't use TorchChat with Python-3.9",
    "body": "Because of https://github.com/pytorch/torchchat/blob/a276b5fdd12d0dd843fd81543ceffb57065354e3/cli.py#L318-L319\r\n\r\nThat was added by https://github.com/pytorch/torchchat/pull/746 with a very descriptive title \"CLI check\"\r\n\r\nIf this is indeed a product requirement, can we specify it somewhere in README.MD (and perhaps have some discussion about it?)",
    "url": "https://github.com/pytorch/torchchat/issues/784",
    "state": "closed",
    "labels": [
      "launch blocker"
    ],
    "created_at": "2024-05-13T18:50:16Z",
    "updated_at": "2024-05-13T19:01:22Z",
    "comments": 2,
    "user": "malfet"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6894,
    "title": "Better document defaults of to_json",
    "body": "Better document defaults of `to_json`: the default format is [JSON-Lines](https://jsonlines.org/).\r\n\r\nRelated to:\r\n- #6891 ",
    "url": "https://github.com/huggingface/datasets/issues/6894",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-05-13T13:30:54Z",
    "updated_at": "2024-05-16T14:31:27Z",
    "comments": 0,
    "user": "albertvillanova"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2830,
    "title": "\u2753 [Question] How to specific aten operators must be run by LibTorch in C++?",
    "body": "## \u2753 Question\r\n\r\nWhen I compile the SwinTransformer model using Torch-TensorRT, an error appears:\r\n```\r\nterminate called after throwing an instance of 'c10::Error'\r\n  what():  0 INTERNAL ASSERT FAILED at \"../torch/csrc/jit/ir/alias_analysis.cpp\":615, please report a bug to PyTorch. We don't have an op for aten::floor_divide but it isn't a special case.  Argument types: int, int, \r\n\r\nCandidates:\r\n        aten::floor_divide(Tensor self, Tensor other) -> Tensor\r\n        aten::floor_divide.Scalar(Tensor self, Scalar other) -> Tensor\r\n        aten::floor_divide.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)\r\n        aten::floor_divide.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!)\r\n```\r\n\r\nI checked out this [link](https://github.com/facebookresearch/segment-anything/issues/446), This error is because torch-trt dont support % op.\r\n\r\nFine, I can select to run floor_divide using LibTorch.\r\n```C++\r\ntorchtrt::ts::CompileSpec compile_settings({ input });\r\ncompile_settings.enabled_precisions.insert(build_type);\r\ncompile_settings.workspace_size = _1_GB;\r\ncompile_settings.truncate_long_and_double = true;\r\ncompile_settings.num_avg_timing_iters = 1;\r\ncompile_settings.torch_executed_ops.push_back(\"aten::floor_divide\");  // here\r\ntorchtrt::ts::compile(model, compile_settings)\r\n```\r\n\r\nIt's strange that the setting does not take effect. This error still persists.\r\n\r\nWhat can I do about this mistake? \r\n\r\nFurthermore, How to specific aten operators must be run by LibTorch in C++?\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):2.2.1\r\n - CPU Architecture:x86\r\n - OS (e.g., Linux):ubuntu22.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:12.2\r\n - GPU models and configuration:\r\n - Any other relevant information:",
    "url": "https://github.com/pytorch/TensorRT/issues/2830",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-13T10:10:09Z",
    "updated_at": "2024-05-27T01:40:49Z",
    "user": "demuxin"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1134,
    "title": "Websearch failed on retrieving from pdf files",
    "body": "On chat ui I am getting the error as shown in screenshot, on pdf files it always says \"Failed to parse webpage\". I set USE_LOCAL_WEBSEARCH=True in .env.local. can anyone help me.\r\n![Screenshot (1844)](https://github.com/huggingface/chat-ui/assets/28763364/fc815b17-f29f-481e-813a-e2714ebc9ee5)\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/1134",
    "state": "open",
    "labels": [
      "support",
      "websearch"
    ],
    "created_at": "2024-05-13T06:41:08Z",
    "updated_at": "2024-06-01T09:25:59Z",
    "comments": 2,
    "user": "prateekvyas1996"
  },
  {
    "repo": "pytorch/xla",
    "number": 7049,
    "title": "Spmd whether expert parallelism is supported\uff1f",
    "body": "torchxla spmd whether expert parallelism is supported\uff1f\r\nIf it is a moe model, how should it be computed in xla\uff1f\r\n## \u2753 Questions and Help\r\n",
    "url": "https://github.com/pytorch/xla/issues/7049",
    "state": "open",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2024-05-13T03:23:20Z",
    "updated_at": "2025-09-03T20:34:04Z",
    "user": "mars1248"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 776,
    "title": "[tune/chat integration] component sharing",
    "body": "We seem to be doing the same rote stuff like manage checkpoints, download them, manager permissions, convert checkpoints and what have you...\r\n\r\nMaybe this might be a good opportunity to reduce our joint workload by pooling some of these functions.  It would likely also improve user experience thanks to consistency and because we can invest the save person-months elsewhere.\r\n\r\nThis is still early, and I'm not suggesting doing this at this very moment (or we'll never launch!), but it's something I wanted to raise both for efficiency and consistency.",
    "url": "https://github.com/pytorch/torchchat/issues/776",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-13T02:44:08Z",
    "updated_at": "2024-07-21T21:50:46Z",
    "comments": 0,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 775,
    "title": "[INTEGRATION] torchtune integration for e2e workflow with torchchat ",
    "body": "Hey, I\u2019m working myself thru our documentation and try to make it run in CI.  That aligns pretty well with the user experience we have in mind where users can just cut & paste commands\u2026\r\n\r\nAlso, we have so many dependences that unless we test at least the instructions for the users nothing works\u2026\r\n\r\nI have a couple of questions:\r\n1 - so you install torchtune and then you assume that you CWD is where?  If we assume we\u2019re in torchchat which our users will have been conditioned to be (at least in the first release), are they going to find torchtune?  Is that abona fide package\u201d\r\n\r\n2 - you access the config assuming it\u2019s in llama3/8B_lora_single_device \u2014 we don\u2019t have that file\u2026. should we?  Can we put it somewhere like ~torchchat/tune/config/llama3 ?  Any other things I should be knowing?\r\n\r\n3 - what are you fine tuning on?\r\n\r\n4 - our users may already have downloaded checkpoints?  Can they use those?  Or are you loading special versions?\r\n\r\n5 - we run tests on-pr for every PR that\u2019s submitted\u2026 which doesn\u2019t work with llama3-8B because of time and cost.  Is there anything that would prevent us from running stories15M (or some other very small model), not because it will have great output quality, but it will force resolution of names, finding of all the imports, and produce intelligible (if not great output).  Is there anything that would prevent that?\r\n\r\n6 - what other assumptions does your build have @ https://github.com/pytorch/torchchat/blob/main/docs/torchtune.md. Is it up to date?\r\n\r\n7 - can I substitute CPU or MPS, or\u2026. whatever my favorite device is?  How much pain should I expect?  has anybody done this on a MacBook for example?  \r\n\r\n8 - do we need any corpora or other such for finetuning?\r\n\r\n9 - anything else I forgot to ask, but I should have?\r\n\r\nSo, the updates instructions are here => https://github.com/pytorch/torchchat/pull/774\r\n\r\nI pull the instructions out of the markdown source by marking it up, and then have a script run\u2026. \r\n```\r\n python3 scripts/updown.py --file docs/torchtune.md --replace 'llama3:stories15M,-l 3:-l 2,meta-llama/Meta-Llama-3-8B-Instruct:stories15M' --suppress huggingface-cli,HF_TOKEN > ./run-torchtune.sh\r\n```\r\n\r\nThe pattern replacers for on-pr need to be adapted for this example (another reason why I would actually love to use the ownloaded checkpoints\u2026 I have it down for thiose\u2026 but you may have intermediate results and all that should not go in the downloaded files\u2026.\r\n\r\nAlthough we could just do \r\n```\r\ncp -r `python3 torchchat.py where llama3`/* ~/wherever-tune-needs-it\r\n```\r\n\r\nand it would work\r\n\r\nFailures appear pretty benign, just a HF token issue.   (And llama3->stories15M substitution not working.\r\n\r\nAre there references to the model name and path in the config that would need to be adjusted?\r\n\r\nThis is the script generated from the markdown instructions\u2026. https://www.internalfb.com/intern/paste/P1360945144/\r\nDo you see any issues with it?  This is not a human using it but `bash -x ./tune-script.sh` so it can\u2019t be sorta right and user will figure it out \u2014 it needs to be 100% up to snuff\r\n\r\nThis the error at the moment?  Seems benign, like updating download process?\r\n\r\n(base) mikekg@mikekg-mbp torchchat % bash -x ./run-torchtune.sh|& pastry\r\nP1360947478: https://www.internalfb.com/intern/paste/P1360947478/\r\n\r\nHere's what happens in detail in CI. https://github.com/pytorch/torchchat/actions/runs/9056119551/job/24878207016?pr=774\r\n(I know, the build bars are TMI lolol)\r\n\r\nHere\u2019s the error message in detail:\r\n```\r\n  Ignoring files matching the following patterns: *.safetensors\r\n  usage: tune download <repo-id> [OPTIONS]\r\n  tune download: error: It looks like you are trying to access a gated repository. Please ensure you have access to the repository and have provided the proper Hugging Face API token using the option `--hf-token` or by running `huggingface-cli login`.You can find your token by visiting https://huggingface.co/settings/tokens\r\n```\r\n\r\nThanks for working with us to build a rock-solid end-to-end story from rune to chat.  Looking forward to figuring this out and build an amazing experience for our joint users!",
    "url": "https://github.com/pytorch/torchchat/issues/775",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-13T02:35:21Z",
    "updated_at": "2024-07-21T21:46:30Z",
    "comments": 1,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 773,
    "title": "[DOCS] GGUF instructions in docs/ADVANCED-USERS.md",
    "body": "\r\nthe instructions for GGUF in https://github.com/pytorch/torchchat/blob/main/docs/ADVANCED-USERS.md state:\r\n\r\n> To use the quantize tool, install the GGML tools at ${GGUF} . Then, you can, for example, convert a quantized model to f16 format:\r\n\r\nHow do I do that?  Can we put this in the doc, including with a definition of the GGUF environment variable, so when we extract the commands and try to run them we have all the pieces?\r\n\r\nxref: https://github.com/pytorch/torchchat/pull/772",
    "url": "https://github.com/pytorch/torchchat/issues/773",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-13T01:26:16Z",
    "updated_at": "2024-05-20T12:56:45Z",
    "comments": 1,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/parler-tts",
    "number": 47,
    "title": "Custom pronunciation for words - any thoughts / recommendations about how best to handle them?",
    "body": "Hello! This is a really interesting looking project.\r\n\r\nCurrently there doesn't seem any way that users can help the model correctly pronounce custom words - for instance **JPEG** is something that speakers just need to know is broken down as \"**Jay-Peg**\" rather than **Jay-Pea-Ee-Gee**.\r\n\r\nI appreciate this project is at an early stage but for practical uses, especially with brands and product names often having quirky ways of saying words or inventing completely new words, it's essential to be able to handle their correct pronunciation on some sort of override basis. It's not just brands - plenty of people's names need custom handling and quite a few novel computer words are non-obvious too.\r\n\r\nExamples that cause problems in the current models: **Cillian, Joaquin, Deirdre, Versace, Tag Heuer, Givenchy, gigabytes, RAM, MPEG** etc.\r\n\r\nAre there any suggestions on how best to tackle this?\r\n\r\nI saw there was #33 which uses a normaliser specifically for numbers.  Is there something similar for custom words?  I suppose perhaps one could drop in a list of custom words and some sort of mapping to the desired pronunciation, applying that as a stage similar to how it handles abbreviations.\r\n\r\nIn espeak backed tools, it's sometimes possible to replace words with custom IPA that replaces the default IPA generated but I believe this model doesn't use IPA for controlling pronunciation. \r\n\r\nGiven the frequently varying pronunciations, I doubt that simply finetuning to include the words would be a viable approach.\r\n\r\nAnyway, would be great to hear what others have to recommend.\r\n\r\n_Incidentally certain mainstream terms also get completely garbled, it seems impossible to get Instagram, Linux or Wikipedia to be spoken properly, but that's more a training data issue and those are mainstream enough that you wouldn't need to cover them via custom overrides._",
    "url": "https://github.com/huggingface/parler-tts/issues/47",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-12T15:51:05Z",
    "updated_at": "2025-01-03T08:39:58Z",
    "user": "nmstoker"
  },
  {
    "repo": "pytorch/examples",
    "number": 1257,
    "title": "multi-node Tensor Parallel",
    "body": "Hello, could you add an new example of the tensor parallel + fsdp but using a multi-node setup?\r\nIs it possible to do multi-node tensor parallelization with pytorch 2.3?  I am trying to use 2 nodes with 4 GPUs each.\r\n05/12/2024 04:32:52 PM  Device Mesh created: device_mesh=DeviceMesh([[0, 1, 2, 3], [4, 5, 6, 7]], mesh_dim_names=('dp', 'tp'))\r\n\r\nWhen I try the actual example on multiple nodes I get the following errors. \r\n\r\nThank you.\r\n```\r\n\r\nas07r1b31:3011779:3012101 [0] init.cc:871 NCCL WARN Duplicate GPU detected : rank 0 and rank 1 both on CUDA device 1b000\r\nas07r1b31:3011783:3012102 [0] init.cc:871 NCCL WARN Duplicate GPU detected : rank 1 and rank 0 both on CUDA device 1b000\r\nas07r1b31:3011782:3012104 [3] init.cc:871 NCCL WARN Duplicate GPU detected : rank 0 and rank 1 both on CUDA device ad000\r\nas07r1b31:3011786:3012107 [3] init.cc:871 NCCL WARN Duplicate GPU detected : rank 1 and rank 0 both on CUDA device ad000\r\nas07r1b31:3011780:3012106 [1] init.cc:871 NCCL WARN Duplicate GPU detected : rank 0 and rank 1 both on CUDA device 2c000\r\nas07r1b31:3011784:3012108 [1] init.cc:871 NCCL WARN Duplicate GPU detected : rank 1 and rank 0 both on CUDA device 2c000\r\nas07r1b31:3011781:3012110 [2] init.cc:871 NCCL WARN Duplicate GPU detected : rank 0 and rank 1 both on CUDA device 9d000\r\nas07r1b31:3011785:3012111 [2] init.cc:871 NCCL WARN Duplicate GPU detected : rank 1 and rank 0 both on CUDA device 9d000\r\n\r\n[rank0]: Traceback (most recent call last):\r\n[rank0]:   File \"/gpfs/mn4/AE_tp/tests.py\", line 91, in <module>\r\n[rank0]:     _, output = sharded_model(inp)\r\n[rank0]:                 ^^^^^^^^^^^^^^^^^^\r\n[rank0]:   File \"/home/mn4/AE_tp/mdae2.3/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1532, in _wrapped_call_impl\r\n[rank0]:     return self._call_impl(*args, **kwargs)\r\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n[rank0]:   File \"/home/mn4/AE_tp/mdae2.3/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1541, in _call_impl\r\n[rank0]:     return forward_call(*args, **kwargs)\r\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n[rank0]:   File \"/home/mn4/AE_tp/mdae2.3/lib/python3.12/site-packages/torch/distributed/fsdp/fully_sharded_data_parallel.py\", line 843, in forward\r\n[rank0]:     args, kwargs = _pre_forward(\r\n[rank0]:                    ^^^^^^^^^^^^^\r\n[rank0]:   File \"/home/mn4/AE_tp/mdae2.3/lib/python3.12/site-packages/torch/distributed/fsdp/_runtime_utils.py\", line 380, in _pre_forward\r\n[rank0]:     unshard_fn(state, handle)\r\n[rank0]:   File \"/home/mn4/AE_tp/mdae2.3/lib/python3.12/site-packages/torch/distributed/fsdp/_runtime_utils.py\", line 415, in _pre_forward_unshard\r\n[rank0]:     _unshard(state, handle, state._unshard_stream, state._pre_unshard_stream)\r\n[rank0]:   File \"/home/mn4/AE_tp/mdae2.3/lib/python3.12/site-packages/torch/distributed/fsdp/_runtime_utils.py\", line 299, in _unshard\r\n[rank0]:     handle.unshard()\r\n[rank0]:   File \"/home/mn4/AE_tp/mdae2.3/lib/python3.12/site-packages/torch/distributed/fsdp/_flat_param.py\", line 1308, in unshard\r\n[rank0]:     padded_unsharded_flat_param = self._all_gather_flat_param(unsharded_flat_param)\r\n[rank0]:                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n[rank0]:   File \"/home/mn4/AE_tp/mdae2.3/lib/python3.12/site-packages/torch/distributed/fsdp/_flat_param.py\", line 1399, in _all_gather_flat_param\r\n[rank0]:     dist.all_gather_into_tensor(\r\n[rank0]:   File \"/home/mn4/AE_tp/mdae2.3/lib/python3.12/site-packages/torch/distributed/c10d_logger.py\", line 75, in wrapper\r\n[rank0]:     return func(*args, **kwargs)\r\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^\r\n[rank0]:   File \"/home/mn4/AE_tp/mdae2.3/lib/python3.12/site-packages/torch/distributed/distributed_c10d.py\", line 2948, in all_gather_into_tensor\r\n[rank0]:     work = group._allgather_base(output_tensor, input_tensor, opts)\r\n[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n[rank0]: torch.distributed.DistBackendError: NCCL error in: /opt/conda/conda-bld/pytorch_1712608847532/work/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:1970, invalid usage (run with NCCL_DEBUG=WARN for details), NCCL version 2.20.5\r\n[rank0]: ncclInvalidUsage: This usually reflects invalid usage of NCCL library.\r\n[rank0]: Last error:\r\n[rank0]: Duplicate GPU detected : rank 0 and rank 1 both on CUDA device 1b000\r\n[same on other ranks]\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/mn4/AE_tp/mdae2.3/bin/torchrun\", line 33, in <module>\r\n    sys.exit(load_entry_point('torch==2.3.0', 'console_scripts', 'torchrun')())\r\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/mn4/AE_tp/mdae2.3/lib/python3.12/site-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py\", line 347, in wrapper\r\n    return f(*args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^\r\n  File \"/home/mn4/AE_tp/mdae2.3/lib/python3.12/site-packages/torch/distributed/run.py\", line 879, in main\r\n    run(args)\r\n  File \"/home/mn4/AE_",
    "url": "https://github.com/pytorch/examples/issues/1257",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-12T15:19:26Z",
    "updated_at": "2024-11-05T09:15:28Z",
    "comments": 1,
    "user": "PieterZanders"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 757,
    "title": "[LAUNCH DOCS] Add instructions what needs to be installed, and how to README ",
    "body": "At present, running the instructions in the README will fail for the xcode project.  See [#755](https://github.com/pytorch/torchchat/pull/755)\r\n\r\nAt a minimum we should specify what should be installed and what the minimum xcode version (and any other requirements) are?\r\n\r\n\r\nAlso, I would expect this to fail even then, because like this might be GUI based with no fully scriptable set of instructions (plus it's not clear we'd want the script instructions when most devs are more likely going to like to start around with the GUI builder?).  So, how can/should we test iOS app build in open source?  \r\n\r\nAs a corollary, how do we automate testing of README for correctness? (and maybe the answer is \"it's too involved\", and that's OK if that turns out to be the right answer)\r\n\r\ncc: @byjlw @shoumikhin",
    "url": "https://github.com/pytorch/torchchat/issues/757",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-12T04:50:32Z",
    "updated_at": "2024-07-27T01:53:39Z",
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/executorch",
    "number": 3585,
    "title": "How can I use ExecuTorch to deploy a model to a MicroController,such as Infineon TC3xxx ?",
    "body": "\"ExecuTorch is an end-to-end solution for enabling on-device inference capabilities across mobile and edge devices including wearables, **embedded devices** and **microcontrollers**\"\r\n\r\nHello,above expression presents in [ExecuTorch doc:](https://pytorch.org/executorch/stable/intro-overview.html)\r\n\r\nI want to know:\r\n\r\nwhat types of MicroController(mainly bare metals) got supported already or will get supported?\r\n\r\nIf wanting to deploy to Infineon TC3xxx microcontroller,is it possible?If yes,any suggestion about how to do it?",
    "url": "https://github.com/pytorch/executorch/issues/3585",
    "state": "closed",
    "labels": [
      "module: backend"
    ],
    "created_at": "2024-05-11T07:13:57Z",
    "updated_at": "2025-02-05T17:22:54Z",
    "user": "AlexLuya"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 740,
    "title": "[FEATURE REQUEST] Could not find... Probably missing HF token/login, but if so we might indicate?",
    "body": "\r\n(base) mikekg@mikekg-mbp torchchat % python3 torchchat.py generate llama3 --device cpu --compile\r\nDownloading meta-llama/Meta-Llama-3-8B-Instruct from HuggingFace...\r\nConverting meta-llama/Meta-Llama-3-8B-Instruct to torchchat format...\r\nknown configs: ['13B', '70B', 'CodeLlama-7b-Python-hf', '34B', 'stories42M', '30B', 'stories110M', '7B', 'stories15M', 'Mistral-7B', 'Meta-Llama-3-8B']\r\nModel config {'block_size': 2048, 'vocab_size': 128256, 'n_layers': 32, 'n_heads': 32, 'dim': 4096, 'hidden_dim': 14336, 'n_local_heads': 8, 'head_dim': 128, 'rope_base': 500000.0, 'norm_eps': 1e-05, 'multiple_of': 1024, 'ffn_dim_multiplier': 1.3, 'use_tiktoken': True, 'max_seq_length': 8192}\r\nTraceback (most recent call last):\r\n  File \"/Users/mikekg/m14/torchchat/torchchat.py\", line 143, in <module>\r\n    check_args(args, \"generate\")\r\n  File \"/Users/mikekg/m14/torchchat/cli.py\", line 39, in check_args\r\n    download_and_convert(args.model, args.model_directory, args.hf_token)\r\n  File \"/Users/mikekg/m14/torchchat/download.py\", line 91, in download_and_convert\r\n    _download_hf_snapshot(model_config, temp_dir, hf_token)\r\n  File \"/Users/mikekg/m14/torchchat/download.py\", line 55, in _download_hf_snapshot\r\n    convert_hf_checkpoint(\r\n  File \"/Users/mikekg/miniconda3/lib/python3.12/site-packages/torch/utils/_contextlib.py\", line 115, in decorate_context\r\n    return func(*args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/m14/torchchat/build/convert_hf_checkpoint.py\", line 60, in convert_hf_checkpoint\r\n    raise RuntimeError(\r\nRuntimeError: Could not find /Users/mikekg/.torchchat/model-cache/downloads/meta-llama/Meta-Llama-3-8B-Instruct/pytorch_model.bin.index.json or /Users/mikekg/.torchchat/model-cache/downloads/meta-llama/Meta-Llama-3-8B-Instruct/original/consolidated.00.pth plus /Users/mikekg/.torchchat/model-cache/downloads/meta-llama/Meta-Llama-3-8B-Instruct/original/tokenizer.model",
    "url": "https://github.com/pytorch/torchchat/issues/740",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-10T22:18:51Z",
    "updated_at": "2024-07-30T17:22:27Z",
    "comments": 1,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1875,
    "title": "How to share memory among 2 GPUS for distributed inference?",
    "body": "# Environment Setup\r\n\r\nRuntime environment:\r\n\r\nTarget: x86_64-unknown-linux-gnu\r\nCargo version: 1.75.0\r\nCommit sha: https://github.com/huggingface/text-generation-inference/commit/c38a7d7ddd9c612e368adec1ef94583be602fc7e\r\nDocker label: sha-6c4496a\r\nKubernetes Cluster deployment\r\n\r\n2 A100 GPU with 80GB RAM\r\n\r\n12 CPU with 32 GB RAM\r\n\r\nTGI version: 2.0.0\r\n\r\nTGI Parameters:\r\nMAX_INPUT_LENGTH: \"8000\"\r\nMAX_TOTAL_TOKENS: \"8512\"\r\nMAX_CONCURRENT_REQUESTS: \"128\"\r\nLOG_LEVEL: \"INFO\"\r\nMAX_BATCH_TOTAL_TOKENS: \"4294967295\"\r\nWAITING_SERVED_RATIO: \"0.3\"\r\nMAX_WAITING_TOKENS: \"0\"\r\nMAX_BATCH_PREFILL_TOKENS: \"32768\"\r\n\r\n\r\n# Question\r\nI am courious about how to optimize distributed inference for LLMs. I see in that in the docs you mention this:\r\n\r\n```\r\n### A note on Shared Memory (shm)\r\n\r\n[`NCCL`](https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/index.html) is a communication framework used by `PyTorch` to do distributed training/inference. `text-generation-inference` make use of `NCCL` to enable Tensor Parallelism to dramatically speed up inference for large language models.\r\n\r\nIn order to share data between the different devices of a `NCCL` group, `NCCL` might fall back to using the host memory if peer-to-peer using NVLink or PCI is not possible.\r\n\r\nTo allow the container to use 1G of Shared Memory and support SHM sharing, we add `--shm-size 1g` on the above command.\r\n\r\nIf you are running `text-generation-inference` inside `Kubernetes`. You can also add Shared Memory to the container by creating a volume with:\r\n\r\n\\- name: shm\r\n  emptyDir:\r\n   medium: Memory\r\n   sizeLimit: 1Gi\r\n\r\nand mounting it to `/dev/shm`.\r\n\r\nFinally, you can also disable SHM sharing by using the `NCCL_SHM_DISABLE=1` environment variable. However, note that this will impact performance.\r\n```\r\n\r\nWe currently have this setup with K8s:\r\n```\r\n        - name: m\r\n          emptyDir:\r\n            sizeLimit: 1Gi\r\n            medium: Memory\r\n```        \r\n            \r\nHowever, I feel like I am missing something. \r\n\r\nSay GPU memory size is G, model weight in megabytes is M and free available memory for processing requests is F.\r\n\r\nThen when I deploy a model with size M (where M < G) with SHARDED=True and over 2 full GPUs(G_1 and G_2). What I expect is the model weights taking M megabytes from GPU1 (G_1) and then the available/free memory, F, for processing tokens/requests should be (G_1 - M) + G_2 = F. Right?\r\n\r\nInstead what I am seeing is that the model is replicated on both GPUs, so F = (G_1 - M) + (G_2 - M) . I believe this is not what we want. For example with Mistral7b:\r\n\r\n| Sharded | GPU 1 | GPU 2 |\r\n| --------  | -----   | ------ |\r\n| False       | 66553MiB /  81920MiB 81% used | Does not exist |\r\n| True       | 66553MiB /  81920MiB 81% used | 66553MiB /  81920MiB 81% used |\r\n\r\nWe would like to have the model only on 1 GPU (if it fits) and then use the extra available GPUs just for inference, i.e, increasing our memory budget at processing time by sharing the memory between the left over memory from the GPU where the model weights live and the memory from the GPU without model weights.\r\n\r\nThis is what makes me think we are not using NCCL correctly, or maybe my assumptions are wrong, and what I am saying is not possible to do?\r\n\r\n\r\n# Visual description \r\n\r\n![Screenshot 2024-05-10 at 10 46 34](https://github.com/huggingface/text-generation-inference/assets/58919465/93af371c-558a-4852-9d28-804d73ba9df5)\r\n",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1875",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-05-10T08:49:05Z",
    "updated_at": "2024-06-21T01:48:05Z",
    "user": "martinigoyanes"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 125902,
    "title": "How to export onnx with fixed shape output ?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\n```\r\nimport torch\r\n\r\nclass TRT_SCA(torch.autograd.Function):  \r\n    @staticmethod\r\n    def forward(ctx,\r\n                query,\r\n                key,\r\n                value,\r\n                reference_points,\r\n                spatial_shapes,\r\n                reference_points_cam,\r\n                bev_mask,\r\n                level_start_index):\r\n        out = torch.randn(1, 1600, 256, dtype=torch.float32) \r\n        return out  # I just want to assign the out shape is [1, 1600, 256]   \r\n\r\n    @staticmethod\r\n    def symbolic(g, \r\n                query,\r\n                key,\r\n                value,\r\n                reference_points,\r\n                spatial_shapes,\r\n                reference_points_cam,\r\n                bev_mask,\r\n                level_start_index):\r\n        return g.op(\"TRT::SCATT\",\r\n                query,\r\n                key,\r\n                value,\r\n                reference_points,\r\n                spatial_shapes,\r\n                reference_points_cam,\r\n                bev_mask,\r\n                level_start_index)\r\n    \r\ntrt_sca = TRT_SCA.apply\r\n\r\nclass SpatialCrossAttention(torch.nn.Module):\r\n    def __init__(self):\r\n        super(SpatialCrossAttention, self).__init__()\r\n    \r\n    def forward(self,\r\n                query,\r\n                key,\r\n                value,\r\n                reference_points=None,\r\n                spatial_shapes=None,\r\n                reference_points_cam=None,\r\n                bev_mask=None,\r\n                level_start_index=None):       \r\n        return trt_sca(\r\n            query,\r\n            key,\r\n            value,\r\n            reference_points,\r\n            spatial_shapes,\r\n            reference_points_cam,\r\n            bev_mask,\r\n            level_start_index)  \r\n\r\nquery= torch.randn(1, 1600, 256, dtype=torch.float32) \r\nkey= torch.randn(6, 5315, 1, 256, dtype=torch.float32) \r\nvalue= torch.randn(6, 5315, 1, 256, dtype=torch.float32) \r\n\r\nreference_points = torch.randn(1, 4, 1600, 3, dtype=torch.float32) \r\nspatial_shapes= torch.tensor(  [[ 40, 100],\r\n                                [ 20,  50],\r\n                                [ 10,  25],\r\n                                [  5,  13]], dtype=torch.int64)\r\n\r\nreference_points_cam=torch.randn(6, 1, 1600, 4, 2, dtype=torch.float32) \r\nbev_mask=torch.where(torch.randn(6, 1, 1600, 4)  > 0.2, 1, 0)\r\nlevel_start_index= torch.tensor([ 0, 4000, 5000, 5250], dtype=torch.int64)\r\n\r\nnn_model = SpatialCrossAttention()  \r\n\r\nprint(\"------------------------------------\")\r\n\r\noutput_file = 'sca.onnx' \r\ntorch.onnx.export(\r\n    nn_model,\r\n    (query,\r\n    key,\r\n    value,\r\n    reference_points,\r\n    spatial_shapes,\r\n    reference_points_cam,\r\n    bev_mask,\r\n    level_start_index),\r\n    output_file,\r\n    export_params=True,\r\n    keep_initializers_as_inputs=True,\r\n    do_constant_folding=True,\r\n    enable_onnx_checker=True, \r\n    verbose=True,\r\n    opset_version=11,\r\n)\r\nprint(\"export done\")\r\n```\r\n\r\n\r\n### Versions\r\n\r\nonnx                      1.15.0     \r\nonnx-graphsurgeon         0.3.21   \r\nonnx-simplifier           0.4.36   \r\nonnxruntime               1.17.1     \r\ntorch                     1.10.0+cu113   \r\ntorchaudio                0.10.0+cu113   \r\ntorchvision               0.11.0+cu113       \r\n\r\n### Result   \r\n\r\n![image](https://github.com/pytorch/pytorch/assets/38753233/4bda011f-b520-4576-9907-9dd1b73573cf)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/125902",
    "state": "open",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2024-05-10T05:58:23Z",
    "updated_at": "2024-05-17T04:35:24Z",
    "user": "lix19937"
  },
  {
    "repo": "pytorch/text",
    "number": 2264,
    "title": "t5_demo can't retrieve CNNDM from drive.google; how to use local copy?",
    "body": "## \ud83d\udc1b Bug\r\n\r\n**Describe the bug** A clear and concise description of what the bug is.\r\n\r\nFollowing the [t5_demo](https://pytorch.org/text/stable/tutorials/t5_demo.html), but when it tries to access the CNN data at `  https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfTHk4NFg2SndKcjQ` \r\n\r\n**To Reproduce** Steps to reproduce the behavior:\r\n\r\n1. Get notebook at [t5_demo](https://pytorch.org/text/stable/tutorials/t5_demo.html),\r\n2. Try to run it.  It gets as far as `batch = next(iter(cnndm_dataloader))` (https://pytorch.org/text/stable/tutorials/t5_demo.html#generate-summaries) where `cnndm_datapipe = CNNDM(split=\"test\")` (https://pytorch.org/text/stable/tutorials/t5_demo.html#datasets)\r\n\r\n3. Get error like:\r\n\r\n> RuntimeError: Google drive link\r\n> \r\n>   https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfTHk4NFg2SndKcjQ&confirm=t\r\n>   internal error: headers don't contain content-disposition. This is\r\n>   usually caused by using a sharing/viewing link instead of a download\r\n>   link. Click 'Download' on the Google Drive page, which should\r\n>   redirect you to a download page, and use the link of that page.\r\n>   \r\n>   This exception is thrown by __iter__ of\r\n>   GDriveReaderDataPipe(skip_on_error=False,\r\n>   source_datapipe=OnDiskCacheHolderIterDataPipe, timeout=None)\r\n\r\n**Expected behavior** \r\n\r\nLooking at others with similar error messages makes it seem like there is some timeout issue retrieving from drive.google?  So I went and got the `cnn_stories.tgz` and `dailymail_stories.tgz` and unpacked them:\r\n\r\n> .\r\n> \u251c\u2500\u2500 CNNDM\r\n> \u2502\u00a0\u00a0 \u251c\u2500\u2500 cnn\r\n> \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 stories\r\n> \u2502\u00a0\u00a0 \u2514\u2500\u2500 dailymail\r\n> \u2502\u00a0\u00a0     \u2514\u2500\u2500 stories\r\n\r\n**How can I modify the calls retrieve from my local cache?**\r\n\r\n\r\n**Environment**\r\n\r\n> % python collect_env.py \r\n> Collecting environment information...\r\n> PyTorch version: 2.1.0.post100\r\n> Is debug build: False\r\n> CUDA used to build PyTorch: None\r\n> ROCM used to build PyTorch: N/A\r\n> \r\n> OS: macOS 14.4.1 (arm64)\r\n> GCC version: Could not collect\r\n> Clang version: 15.0.0 (clang-1500.1.0.2.5)\r\n> CMake version: Could not collect\r\n> Libc version: N/A\r\n> \r\n> Python version: 3.11.7 | packaged by conda-forge | (main, Dec 23 2023, 14:38:07) [Clang 16.0.6 ] (64-bit runtime)\r\n> Python platform: macOS-14.4.1-arm64-arm-64bit\r\n> Is CUDA available: False\r\n> CUDA runtime version: No CUDA\r\n> CUDA_MODULE_LOADING set to: N/A\r\n> GPU models and configuration: No CUDA\r\n> Nvidia driver version: No CUDA\r\n> cuDNN version: No CUDA\r\n> HIP runtime version: N/A\r\n> MIOpen runtime version: N/A\r\n> Is XNNPACK available: True\r\n> \r\n> CPU:\r\n> Apple M1 Pro\r\n> \r\n> Versions of relevant libraries:\r\n> [pip3] mypy-extensions==1.0.0\r\n> [pip3] numpy==1.26.3\r\n> [pip3] torch==2.1.0.post100\r\n> [pip3] torchaudio==2.1.2\r\n> [pip3] torchdata==0.7.1\r\n> [pip3] torchtext==0.16.1\r\n> [pip3] torchvision==0.16.2\r\n> [conda] captum                    0.7.0                         0    pytorch\r\n> [conda] numpy                     1.26.2                   pypi_0    pypi\r\n> [conda] numpy-base                1.26.3          py311hfbfe69c_0  \r\n> [conda] pytorch                   2.1.0           gpu_mps_py311hf322ab5_100  \r\n> [conda] torch                     2.1.2                    pypi_0    pypi\r\n> [conda] torchaudio                2.1.2                    pypi_0    pypi\r\n> [conda] torchdata                 0.7.1                    pypi_0    pypi\r\n> [conda] torchtext                 0.16.1                   pypi_0    pypi\r\n> [conda] torchvision               0.16.2                   pypi_0    pypi\r\n> \r\n> \r\n\r\n**Additional context** Add any other context about the problem here.\r\n",
    "url": "https://github.com/pytorch/text/issues/2264",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-10T03:55:13Z",
    "updated_at": "2024-05-10T03:55:13Z",
    "user": "rbelew"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2759,
    "title": "How to specify the backend of Trainer",
    "body": "### System Info\n\n```Shell\naccelerate 0.28.0\n```\n\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nI am running a multi-node, multi-gpu training code on two nodes with one A100-40GB respectively. I don't have the  `NCCL` installed on this cluster, so I am trying to use the default `gloo` backend to start training. But I didn't find any documents on how to specify backend when `accelerate launch`. Any help will be very appreciated!\r\nHere is my launching script.\r\n```\r\nsrun -N 2 -n 2 -w xgpg2,xgpg3 accelerate launch --config_file /tmp/my_dist_config.yaml --gradient_accumulation_steps 8 --gradient_clipping 1.0 --mixed_precision bf16 train.py    ...my training arguments..\r\n```\r\nHere is my accelerate config on each node.\r\n```\r\n# `/tmp/my_dist_config.yaml` on xgpg2\r\ncompute_environment: LOCAL_MACHINE\r\ndebug: false\r\ndistributed_type: MULTI_GPU\r\ndowncast_bf16: 'no'\r\ngpu_ids: all\r\nmachine_rank: 0\r\nmain_process_ip: xgpg2\r\nmain_process_port: 9999\r\nmain_training_function: main\r\nmixed_precision: bf16\r\nnum_machines: 2\r\nnum_processes: 2\r\nrdzv_backend: static\r\nsame_network: true\r\ntpu_env: []\r\ntpu_use_cluster: false\r\ntpu_use_sudo: false\r\nuse_cpu: false\r\n# `/tmp/my_dist_config.yaml` on xgpg3\r\ncompute_environment: LOCAL_MACHINE\r\ndebug: false\r\ndistributed_type: MULTI_GPU\r\ndowncast_bf16: 'no'\r\ngpu_ids: all\r\nmachine_rank: 1\r\nmain_process_ip: xgpg2\r\nmain_process_port: 9999\r\nmain_training_function: main\r\nmixed_precision: bf16\r\nnum_machines: 2\r\nnum_processes: 2\r\nrdzv_backend: static\r\nsame_network: true\r\ntpu_env: []\r\ntpu_use_cluster: false\r\ntpu_use_sudo: false\r\nuse_cpu: false\r\n```\r\nHere is the main body of my training code\r\n```\r\n...\r\ntokenizer = load_tokenizer(model_args.tokenizer_dir, train_mode=model_args.do_train)\r\nmodel = load_model(model_args, quant_config, peft_config)\r\nlogger.info(f\"Model Architecture:\\n{model}\")\r\nprint_trainable_parameters(model)\r\n\r\ntrainer = Trainer(\r\n    model=model,\r\n    train_dataset=train_data,\r\n    eval_dataset=eval_data, \r\n    args=trainer_config,\r\n    data_collator=PaddToMaxLenCollator(tokenizer, model_args.max_length), \r\n)\r\n\r\n# Training\r\nif model_args.do_train:\r\n    train_result = trainer.train(resume_from_checkpoint=model_args.resume_from_checkpoint)\r\n    trainer.log_metrics(\"train\", train_result.metrics)  \r\n    trainer.save_metrics(\"train\", train_result.metrics) \r\n...\r\n```\r\n\r\nI tried to run this directly, but it went into some NCCL error like this:\r\n```\r\ntorch.distributed.DistBackendError: NCCL error in: /opt/conda/conda-bld/pytorch_1704987394225/work/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:1691, unhandled system error (run with NCCL_DEBUG=INFO for details), NCCL version 2.19.3\r\n```\r\nI think the NCCL isn't installed on the system by system administrator, but there is a `nccl` library in my conda environment, which could probably be installed as some other library's dependency. I am not familiar with NCCL, but my understanding is this won't work because NCCL should be installed on system level. Am I right?\r\n```\r\n# Name                    Version                   Build  Channel\r\nnccl                      2.21.5.1             h3a97aeb_0    conda-forge\r\n```\n\n### Expected behavior\n\nHope to know how to use the 'gloo' backend for Trainer. And also hope to know if I can use Trainer's Deepspeed Integration with gloo backend",
    "url": "https://github.com/huggingface/accelerate/issues/2759",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-10T03:18:08Z",
    "updated_at": "2025-01-16T10:29:19Z",
    "user": "Orion-Zheng"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 167,
    "title": "python3.10 how to install rerun-sdk",
    "body": "### System Info\n\n```Shell\nubuntu18.04\r\npython3.10\r\n\r\n\r\nERROR: Could not find a version that satisfies the requirement rerun-sdk>=0.15.1 (from lerobot) (from versions: none)\r\nERROR: No matching distribution found for rerun-sdk>=0.15.1\n```\n\n\n### Information\n\n- [X] One of the scripts in the examples/ folder of LeRobot\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\npip install .\r\n\r\nERROR: Could not find a version that satisfies the requirement rerun-sdk>=0.15.1 (from lerobot) (from versions: none)\r\nERROR: No matching distribution found for rerun-sdk>=0.15.1\n\n### Expected behavior\n\nI want to know how to solve this problem",
    "url": "https://github.com/huggingface/lerobot/issues/167",
    "state": "closed",
    "labels": [
      "dependencies"
    ],
    "created_at": "2024-05-10T03:07:30Z",
    "updated_at": "2024-05-13T01:25:09Z",
    "user": "MountainIntelligent"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 478,
    "title": "Can't seem to skip parameter initialization while using the `safetensors.torch.load_model` API!",
    "body": "### System Info\r\n\r\n- `transformers` version: 4.40.0\r\n- Platform: Linux-5.15.0-105-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.12\r\n- Huggingface_hub version: 0.22.2\r\n- Safetensors version: 0.4.1\r\n- Accelerate version: 0.25.0\r\n- Accelerate config:    not found\r\n- PyTorch version (GPU?): 2.2.2+cu121 (True)\r\n- Tensorflow version (GPU?): 2.16.1 (True)\r\n- Flax version (CPU?/GPU?/TPU?): 0.8.2 (cpu)\r\n- Jax version: 0.4.26\r\n- JaxLib version: 0.4.21`\r\n\r\n### Reproduction\r\n\r\nIn order to load a serialized model, I use the `safetensors.torch.load_model` API which requires a `torch.nn.Module` type as the first argument. \r\nI create this model while ensuring that  the parameters are **not** initialized since they will get overridden anyway. I do this by using the `init_empty_weights` context manager from the `accelerate` package. \r\n```\r\nfrom transformers import LlamaConfig, LlamaForCausalLM\r\nfrom accelerate import init_empty_weights\r\n\r\nconfig = LlamaConfig()\r\nwith init_empty_weights():\r\n    model = LlamaForCausalLM(config)\r\nsafetensors.torch.load_model(model, <path-to-file>) //throws an error\r\n```\r\nThe last line throws the error\r\n```\r\n  warnings.warn(f'for {key}: copying from a non-meta parameter in the checkpoint to a meta '\r\nUserWarning: for model.norm.weight: copying from a non-meta parameter in the checkpoint to a meta parameter in the current model, which is a no-op. (Did you mean to pass `assign=True` to assign items in the state dictionary to their corresponding key in the module instead of copying them in place?)\r\n```\r\n\r\nTurns out the loading of the state_dict is a no-op which could be resolved by using the `assign=True` argument however the current API doesn't provide a way to set that. Any ideas on how to overcome this issue?\r\n\r\n### Expected behavior\r\n\r\n`load_model` API returns a model object where the state_dict is initialized from the stored checkpoint. ",
    "url": "https://github.com/huggingface/safetensors/issues/478",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-05-09T19:12:05Z",
    "updated_at": "2024-06-15T01:49:24Z",
    "comments": 1,
    "user": "goelayu"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2861,
    "title": "Performance Tuning Guide is very out of date",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\r\n\r\nThe first thing you see when you Google PyTorch performance is this. The recipe is well written but it's very much out of data today\r\nhttps://pytorch.org/tutorials/recipes/recipes/tuning_guide.html\r\n\r\nSome concrete things we should fix\r\n1. For fusions we should talk about torch.compile instead of jit.script\r\n2. We should mention overhead reduction with cudagraphs\r\n3. We should talk about the *-fast series as places people can learn more\r\n4. For CPU specific optimization the most important one is launcher core pinning so we should either make that a default or explain the point more\r\n5. Instead of the CPU section we can instead go more into the inductor CPU backend\r\n6. AMP section is fine but maybe expand to quantization\r\n7. DDP section needs to be moved somewhere else with some FSDP performance guide\r\n8. GPU sync section is good\r\n9. Mention tensor cores and how to enable them and why they're not enabled by default\r\n\r\ncc @sekyondaMeta @svekars @kit1980 @drisspg who first made me aware of this with an internal note that was important enough to make public\r\n\r\n### Existing tutorials on this topic\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_",
    "url": "https://github.com/pytorch/tutorials/issues/2861",
    "state": "closed",
    "labels": [
      "medium",
      "docathon-h1-2024"
    ],
    "created_at": "2024-05-09T16:57:35Z",
    "updated_at": "2024-06-12T16:11:31Z",
    "comments": 9,
    "user": "msaroufim"
  },
  {
    "repo": "pytorch/xla",
    "number": 7042,
    "title": "model.to(xla_device) increases the number of named_parameters",
    "body": "## \ud83d\udc1b Bug\r\nCopy model to xla device affects the number of model's parameters.\r\n![image](https://github.com/pytorch/xla/assets/5349065/c1d69927-fcb4-4db2-bc94-193c99ede65a)\r\n\r\n## To Reproduce\r\n```bash\r\npython xla/benchmarks/experiment_runner.py        --suite-name torchbench        --accelerator cuda  --dynamo openxla --dynamo None        --test train        --repeat 30 --iterations-per-run 5        --print-subprocess        --no-resume --model-config='{\"model_name\": \"hf_Bart\"}' --experiment-config='{\"accelerator\": \"cuda\", \"xla\": \"PJRT\", \"xla_flags\": null, \"dynamo\": \"openxla\", \"test\": \"train\"}'\r\n```\r\nSteps to reproduce the behavior:\r\n\r\n1. Run the above command\r\n2. insert pdb hook at `xla/benchmarks/benchmark_model.py`\r\n```python\r\n110   def prepare_for_experiment(self, dynamo_compilation_opts):\r\n111     self.device = self.benchmark_experiment.get_device()\r\n112     self.dtype = self.conversion_dtype()\r\n113 \r\n114     if self.dtype is not None:\r\n115       self.module = self.module.to(self.dtype)\r\n116       self.example_inputs = cast_to_dtype(self.example_inputs, self.dtype)\r\n117 \r\n118     import pdb\r\n119     pdb.set_trace()\r\n120     self.module = self.module.to(self.device)\r\n121     self.example_inputs = move_to_device(self.example_inputs, self.device)\r\n122 \r\n123     if self.benchmark_experiment.test == \"eval\":\r\n124       self._prepare_for_eval()\r\n125     elif self.benchmark_experiment.test == \"train\":\r\n126       self._prepare_for_train()\r\n127     else:\r\n128       raise NotImplementedError\r\n129 \r\n130     if self.benchmark_experiment.dynamo:\r\n131       compilation_opts = dynamo_compilation_opts.copy()\r\n132       compilation_opts['backend'] = self.benchmark_experiment.dynamo\r\n133 \r\n134       logger.info(f\"Running torch.compile with opts {compilation_opts}\")\r\n135       self.model_iter_fn = torch.compile(self.model_iter_fn, **compilation_opts)\r\n```\r\n3. print the number of named_parameter of model before the copy to xla device and after the copy like the picture above shows.\r\n```bash\r\n(Pdb) new_model = copy.deepcopy(self.module).to(\"cpu\").to(self.device)                                                                                          \u2502105       self.optimizer = self.optimizer_class(self.module.parameters(), lr=0.01)\r\n(Pdb) len([param for param, value in new_model.named_parameters()])                                                                                             \u2502106 \r\n262                                                                                                                                                             \u2502107   def conversion_dtype(self):\r\n(Pdb) len([param for param, value in self.module.named_parameters()])                                                                                           \u2502108     return None\r\n259                                                                                                                                                             \u2502109 \r\n(Pdb) len([param for param, value in self.module.named_buffers()])                                                                                              \u2502110   def prepare_for_experiment(self, dynamo_compilation_opts):\r\n1                                                                                                                                                               \u2502111     self.device = self.benchmark_experiment.get_device()\r\n(Pdb) len([param for param, value in new_model.named_buffers()])                                                                                                \u2502112     self.dtype = self.conversion_dtype()\r\n1 \r\n```\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well. Or better use the Colab template: https://github.com/pytorch/xla/blob/master/contrib/colab/issue-report.ipynb -->\r\n\r\n## Expected behavior\r\n\r\n`len([param for param, value in new_model.named_parameters()])` is expected to return 259 \r\n## Environment\r\n\r\n - Reproducible on XLA backend [CPU/TPU/CUDA]: CUDA\r\n - torch_xla version:\r\n2.3.0-rc12\r\n",
    "url": "https://github.com/pytorch/xla/issues/7042",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-09T13:53:03Z",
    "updated_at": "2025-04-17T13:51:16Z",
    "user": "shenh10"
  },
  {
    "repo": "pytorch/xla",
    "number": 7040,
    "title": "[torchbench] The official benchmark for performance and accuracy check",
    "body": "## \u2753 Questions and Help\r\nHi I found two available codebases for testing torchbench with pytorch/xla:\r\n1. The one provided by pytorch official:  https://github.com/pytorch/pytorch/tree/main/benchmarks/dynamo\r\n2. Another one provided by pytorch/xla team: https://github.com/pytorch/xla/tree/master/benchmarks\r\n\r\nHowever for the first codebase, it seems the support for dynamo + openxla backend would not trigger xla compilation actually. Is it no longer maintained?\r\n\r\nAnd for the second one, I found it is able to test the performance, but has no way to validate the accuracy comparing to eager mode, while the first benchmark tool is able to do that. Any support for this?\r\n\r\n\r\nLooking forward to your feedback.",
    "url": "https://github.com/pytorch/xla/issues/7040",
    "state": "closed",
    "labels": [
      "question",
      "benchmarking"
    ],
    "created_at": "2024-05-09T08:33:21Z",
    "updated_at": "2025-04-17T13:53:39Z",
    "user": "shenh10"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1525,
    "title": "How to write custom Wordpiece class?",
    "body": "My aim is get the rwkv5 model\u2018s \"tokenizer.json\",but it implemented through slow tokenizer(class Pretrainedtokenizer).\r\nI want to convert \"slow tokenizer\" to \"fast tokenizer\",it needs to use \"tokenizer = Tokenizer(Wordpiece())\",but rwkv5 has it\u2018s own Wordpiece file.\r\nSo I want to create a custom Wordpiece\r\n\r\nthe code is here\r\n\r\n```python\r\n\r\nfrom tokenizers.models import Model\r\nclass MyWordpiece(Model):\r\n    def __init__(self,vocab,unk_token):\r\n        self.vocab = vocab\r\n        self.unk_token = unk_token\r\n\r\n\r\n\r\ntest = MyWordpiece('./vocab.txt',\"<s>\")\r\n\r\n```\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"test.py\", line 78, in <module>\r\n    test = MyWordpiece('./vocab.txt',\"<s>\")\r\nTypeError: Model.__new__() takes 0 positional arguments but 2 were given\r\n```",
    "url": "https://github.com/huggingface/tokenizers/issues/1525",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-05-09T03:48:27Z",
    "updated_at": "2024-07-18T01:53:23Z",
    "user": "xinyinan9527"
  },
  {
    "repo": "huggingface/trl",
    "number": 1635,
    "title": "How to use trl\\trainer\\kto_trainer.py",
    "body": "If I want to use KTO trainer, I could set the parameter [loss_type == \"kto_pair\"] in dpo_trainer.py. Then what is kto_trainer.py used for? And how to use it?   ",
    "url": "https://github.com/huggingface/trl/issues/1635",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-09T02:40:14Z",
    "updated_at": "2024-06-11T10:17:51Z",
    "user": "mazhengyufreedom"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2860,
    "title": "requires_grad=True for an input datapoint?",
    "body": "https://github.com/pytorch/tutorials/blob/f4ebb4d007792f5bc302affa7b360a9710e4a88b/advanced_source/super_resolution_with_onnxruntime.py#L144\r\n\r\nIt is obscure to me why there is the need to set the flag requires_grad to True for datapoint \"x\", which has no parameters to be learnt.\r\nIs it something required to export the model in onnx?\r\n\r\nThanks.\n\ncc @titaiwangms @xadupre @justinchuby @BowenBao",
    "url": "https://github.com/pytorch/tutorials/issues/2860",
    "state": "closed",
    "labels": [
      "question",
      "onnx"
    ],
    "created_at": "2024-05-08T15:25:54Z",
    "updated_at": "2025-04-16T21:22:11Z",
    "user": "ggbioing"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6882,
    "title": "Connection Error When Using By-pass Proxies",
    "body": "### Describe the bug\n\nI'm currently using Clash for Windows as my proxy tunnel, after exporting HTTP_PROXY and HTTPS_PROXY to the port that clash provides\ud83e\udd14, it runs into a connection error saying \"Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/2.19.1/metrics/seqeval/seqeval.py (ConnectionError(MaxRetryError(\"HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /huggingface/datasets/2.19.1/metrics/seqeval/seqeval.py (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f969d391870>: Failed to establish a new connection: [Errno 111] Connection refused'))\")))\"\r\nI have already read the documentation provided on the hugginface, but I think I didn't see the detailed instruction on how to set up proxies for this library.\n\n### Steps to reproduce the bug\n\n1. Turn on any proxy software like Clash / ShadosocksR etc.\r\n2. export system varibles to the port provided by your proxy software in wsl (It's ok for other applications to use proxy expect dataset-library)\r\n3. load any dataset from hugginface online\n\n### Expected behavior\n\n---------------------------------------------------------------------------\r\nConnectionError                           Traceback (most recent call last)\r\nCell In[33], [line 3](vscode-notebook-cell:?execution_count=33&line=3)\r\n      [1](vscode-notebook-cell:?execution_count=33&line=1) from datasets import load_metric\r\n----> [3](vscode-notebook-cell:?execution_count=33&line=3) metric = load_metric(\"seqeval\")\r\n\r\nFile ~/.local/lib/python3.10/site-packages/datasets/utils/deprecation_utils.py:46, in deprecated.<locals>.decorator.<locals>.wrapper(*args, **kwargs)\r\n     [44](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/utils/deprecation_utils.py:44)     warnings.warn(warning_msg, category=FutureWarning, stacklevel=2)\r\n     [45](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/utils/deprecation_utils.py:45)     _emitted_deprecation_warnings.add(func_hash)\r\n---> [46](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/utils/deprecation_utils.py:46) return deprecated_function(*args, **kwargs)\r\n\r\nFile ~/.local/lib/python3.10/site-packages/datasets/load.py:2104, in load_metric(path, config_name, process_id, num_process, cache_dir, experiment_id, keep_in_memory, download_config, download_mode, revision, trust_remote_code, **metric_init_kwargs)\r\n   [2101](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2101) warnings.filterwarnings(\"ignore\", message=\".*https://huggingface.co/docs/evaluate$\", category=FutureWarning)\r\n   [2103](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2103) download_mode = DownloadMode(download_mode or DownloadMode.REUSE_DATASET_IF_EXISTS)\r\n-> [2104](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2104) metric_module = metric_module_factory(\r\n   [2105](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2105)     path,\r\n   [2106](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2106)     revision=revision,\r\n   [2107](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2107)     download_config=download_config,\r\n   [2108](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2108)     download_mode=download_mode,\r\n   [2109](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2109)     trust_remote_code=trust_remote_code,\r\n   [2110](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2110) ).module_path\r\n   [2111](https://vscode-remote+wsl-002bubuntu-002d22-00",
    "url": "https://github.com/huggingface/datasets/issues/6882",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-08T06:40:14Z",
    "updated_at": "2024-05-17T06:38:30Z",
    "comments": 1,
    "user": "MRNOBODY-ZST"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 180,
    "title": "how to turn log/traceback color off?",
    "body": "Trying datatrove for the first time and the program spews a bunch of logs and tracebacks in yellow and cyan which are completely unreadable on the b&w console. \r\n\r\nDoes the program make an assumption that the user is using w&b (dark) console?\r\n\r\nI tried to grep for `color` to see how it controls the colors but found nothing relevant, so it's probably some 3rd party component that does that.\r\n\r\nIf the coloring logic doesn't bother to check what the console colors are to keep the output readable, any idea how to turn it off completely? I RTFM'ed - didn't find any docs that address that aspect.\r\n\r\nThanks a lot!",
    "url": "https://github.com/huggingface/datatrove/issues/180",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-08T03:51:11Z",
    "updated_at": "2024-05-17T17:53:20Z",
    "user": "stas00"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2822,
    "title": "\u2753 [Question] Model inference is much slower after updating to TensorRT 9.3",
    "body": "## \u2753 Question\r\n\r\nI have a VIT model for object detection. The model inference speed in the tensort 8.5 environment is 190ms per frame. However when I updated to TensorRT 9.3, Inference slowed down to 250ms per frame.\r\n\r\nI acquired the C++ dynamic library by compiling the latest Torch-TensorRT source code.\r\n\r\nWhat might be causing this issue?\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - Libtorch Version (e.g., 1.0):  2.2.1\r\n - CPU Architecture: \r\n - OS (e.g., Linux): ubuntu22.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives: Yes\r\n - Python version:\r\n - CUDA version: 12.2\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2822",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-08T03:20:18Z",
    "updated_at": "2025-09-03T20:08:33Z",
    "user": "demuxin"
  },
  {
    "repo": "pytorch/expecttest",
    "number": 18,
    "title": "How to use it in pytest based testing?",
    "body": "The readme seems to be written for testcase only.",
    "url": "https://github.com/pytorch/expecttest/issues/18",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-07T22:27:37Z",
    "updated_at": "2024-05-07T23:09:38Z",
    "user": "youkaichao"
  },
  {
    "repo": "huggingface/candle",
    "number": 2171,
    "title": "How to run LLama-3 or Phi with more then 4096 prompt tokens?",
    "body": "Could you please show me an example where LLama-3 model used (better GGUF quantized) and initial prompt is more then 4096 tokens long? Or better 16-64K long (for RAG). Currently everything I do ends with error:\r\nIn this code:\r\nlet logits = model.forward(&input, 0);  // input is > 4096 tokens\r\n\r\nError:\r\nnarrow invalid args start + len > dim_len: [4096, 64], dim: 0, start: 0, len:4240\r\n\r\nModel used:\r\nhttps://huggingface.co/MaziyarPanahi/Llama-3-8B-Instruct-64k-GGUF\r\n\r\nThank you a lot in advance!",
    "url": "https://github.com/huggingface/candle/issues/2171",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-07T20:15:28Z",
    "updated_at": "2024-05-07T20:16:13Z",
    "user": "baleksey"
  },
  {
    "repo": "pytorch/xla",
    "number": 7033,
    "title": "constant folding for AvgPool2d",
    "body": "## \u2753 Questions and Help\r\n\r\nexporting simple `AvgPool2d` using `torch_xla 2.3` results in two different `stablehlo.reduce_window` ops, the second one only takes args as constants. Is there a way to fold it into a constant in `exported_program_to_stablehlo`? @lsy323 @qihqi  \r\ne.g. `%4` in the following example.\r\n\r\n```python\r\nimport torch\r\nimport torch.nn as nn\r\nfrom torch_xla.stablehlo import exported_program_to_stablehlo\r\n\r\nm = nn.AvgPool2d(kernel_size=2)\r\ninp_args = (torch.randn(1, 4, 4),)\r\nem = torch.export.export(m, inp_args)\r\nstablehlo_program = exported_program_to_stablehlo(em)\r\nprint(stablehlo_program.get_stablehlo_text())\r\n```\r\n\r\n```cpp\r\nmodule @IrToHlo.26 attributes {mhlo.cross_program_prefetches = [], mhlo.is_dynamic = false, mhlo.use_auto_spmd_partitioning = false} {\r\n  func.func @main(%arg0: tensor<1x4x4xf32>) -> tensor<1x2x2xf32> {\r\n    %0 = stablehlo.constant dense<1.000000e+00> : tensor<4x4xf32>\r\n    %1 = stablehlo.constant dense<0.000000e+00> : tensor<f32>\r\n    %2 = stablehlo.reshape %arg0 : (tensor<1x4x4xf32>) -> tensor<1x1x4x4xf32>\r\n    %3 = \"stablehlo.reduce_window\"(%2, %1) ({\r\n    ^bb0(%arg1: tensor<f32>, %arg2: tensor<f32>):\r\n      %8 = stablehlo.add %arg1, %arg2 : tensor<f32>\r\n      stablehlo.return %8 : tensor<f32>\r\n    }) {base_dilations = array<i64: 1, 1, 1, 1>, padding = dense<0> : tensor<4x2xi64>, window_dilations = array<i64: 1, 1, 1, 1>, window_dimensions = array<i64: 1, 1, 2, 2>, window_strides = array<i64: 1, 1, 2, 2>} : (tensor<1x1x4x4xf32>, tensor<f32>) -> tensor<1x1x2x2xf32>\r\n    %4 = \"stablehlo.reduce_window\"(%0, %1) ({\r\n    ^bb0(%arg1: tensor<f32>, %arg2: tensor<f32>):\r\n      %8 = stablehlo.add %arg1, %arg2 : tensor<f32>\r\n      stablehlo.return %8 : tensor<f32>\r\n    }) {base_dilations = array<i64: 1, 1>, padding = dense<0> : tensor<2x2xi64>, window_dilations = array<i64: 1, 1>, window_dimensions = array<i64: 2, 2>, window_strides = array<i64: 2, 2>} : (tensor<4x4xf32>, tensor<f32>) -> tensor<2x2xf32>\r\n    %5 = stablehlo.reshape %4 : (tensor<2x2xf32>) -> tensor<1x1x2x2xf32>\r\n    %6 = stablehlo.divide %3, %5 : tensor<1x1x2x2xf32>\r\n    %7 = stablehlo.reshape %6 : (tensor<1x1x2x2xf32>) -> tensor<1x2x2xf32>\r\n    return %7 : tensor<1x2x2xf32>\r\n  }\r\n}\r\n```",
    "url": "https://github.com/pytorch/xla/issues/7033",
    "state": "closed",
    "labels": [
      "stablehlo"
    ],
    "created_at": "2024-05-07T07:34:11Z",
    "updated_at": "2024-09-23T21:45:42Z",
    "comments": 10,
    "user": "thong3le"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1115,
    "title": "[v0.8.4] IMPORTANT: Talking to PDFs and general Roadmap?",
    "body": "Hi @nsarrazin \r\n\r\nI have a couple of questions that I could not get answers to in the repo and on the web.\r\n\r\n1. Is there a plan to enable file uploads (PDFs, etc) so that users can talk to those files? Similar to ChatGPT, Gemini etc? \r\n2. Is there a feature roadmap available somewhere?\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/chat-ui/issues/1115",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-07T06:10:20Z",
    "updated_at": "2024-09-10T15:44:16Z",
    "comments": 4,
    "user": "adhishthite"
  },
  {
    "repo": "huggingface/candle",
    "number": 2167,
    "title": "How to do a Axum's sse function for Candle?",
    "body": "fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> {\r\n        use std::io::Write;\r\n        self.tokenizer.clear();\r\n        let mut tokens = self\r\n            .tokenizer\r\n            .tokenizer()\r\n            .encode(prompt, true)\r\n            .map_err(E::msg)?\r\n            .get_ids()\r\n            .to_vec();\r\n        for &t in tokens.iter() {\r\n            if let Some(t) = self.tokenizer.next_token(t)? {\r\n                print!(\"{t}\")\r\n            }\r\n        }\r\n        std::io::stdout().flush()?;\r\n\r\n        let mut generated_tokens = 0usize;\r\n        let eos_token = match self.tokenizer.get_token(\"<|endoftext|>\") {\r\n            Some(token) => token,\r\n            None => anyhow::bail!(\"cannot find the <|endoftext|> token\"),\r\n        };\r\n        let start_gen = std::time::Instant::now();\r\n        for index in 0..sample_len {\r\n            let context_size = if index > 0 { 1 } else { tokens.len() };\r\n            let start_pos = tokens.len().saturating_sub(context_size);\r\n            let ctxt = &tokens[start_pos..];\r\n            let input = Tensor::new(ctxt, &self.device)?.unsqueeze(0)?;\r\n            let logits = self.model.forward(&input, start_pos)?;\r\n            let logits = logits.squeeze(0)?.squeeze(0)?.to_dtype(DType::F32)?;\r\n            let logits = if self.repeat_penalty == 1. {\r\n                logits\r\n            } else {\r\n                let start_at = tokens.len().saturating_sub(self.repeat_last_n);\r\n                candle_transformers::utils::apply_repeat_penalty(\r\n                    &logits,\r\n                    self.repeat_penalty,\r\n                    &tokens[start_at..],\r\n                )?\r\n            };\r\n\r\n            let next_token = self.logits_processor.sample(&logits)?;\r\n            tokens.push(next_token);\r\n            generated_tokens += 1;\r\n            if next_token == eos_token {\r\n                break;\r\n            }\r\n            if let Some(t) = self.tokenizer.next_token(next_token)? {\r\n                print!(\"{t}\");\r\n                std::io::stdout().flush()?;\r\n            }\r\n        }\r\n        let dt = start_gen.elapsed();\r\n        if let Some(rest) = self.tokenizer.decode_rest().map_err(E::msg)? {\r\n            print!(\"{rest}\");\r\n        }\r\n        std::io::stdout().flush()?;\r\n        println!(\r\n            \"\\n{generated_tokens} tokens generated ({:.2} token/s)\",\r\n            generated_tokens as f64 / dt.as_secs_f64(),\r\n        );\r\n        Ok(())\r\n    }\r\n\r\n\r\nHow to rewrite above function to sse?",
    "url": "https://github.com/huggingface/candle/issues/2167",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-07T02:38:50Z",
    "updated_at": "2024-05-08T04:27:14Z",
    "user": "sunnyregion"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 708,
    "title": "--num-samples xxx does not work for getting multiple prompt responses",
    "body": "Previouslu, users could use --num-samples to get reliable benchmarking.  WIth recent updates, num-samples no longer appears to work.  \r\n\r\nhttps://github.com/pytorch/pytorch/pull/125611  shows nice performance gains on gpt-fast, and @helloguo would like to validate on torchchat to ensure this also accelerates our code.  Is there another way he can run multiple prompts to avoid cold start effects?\r\n\r\n\r\n```\r\n(py311) mikekg@mikekg-mbp torchchat % python3 torchchat.py generate stories15M --device fast --num-samples 20\r\nUsing device=cpu Apple M1 Max\r\nLoading model...\r\nTime to load model: 0.09 seconds\r\nHello, my name is Pete the mouse. He was a very curious mouse, and he loved to explore. One day, he saw a big, white sign. He had never seen it before, and he was curious to get a closer look.\r\nHe decided to take a look, and he squealed with joy when he reached for the sign. On the sign, there was a big, white, friendly door. He was so excited, he quickly ran over to it and opened the door.\r\nOn the other side of the door, he found a room filled with toys, cars and people. He cheered with joy, and he could not wait to explore.\r\nBut then, something unexpected happened - the door suddenly closed, and Pete was so scared. He tried to push the door open, but it just wouldn't budge. He looked around and spotted a small, white house.\r\nPete pushed the door open, and there he was - a friendly\r\nMax Sequence Length Reached. Ending Conversation.\r\n==========\r\n```",
    "url": "https://github.com/pytorch/torchchat/issues/708",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-06T23:45:52Z",
    "updated_at": "2024-05-12T21:23:06Z",
    "comments": 1,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1847,
    "title": "Static Quantization for Seq2Seq models like T5",
    "body": "I'm currently trying to static quantize T5 but it seem in the optimum doc last committed 10 months ago said it don't support static only dynamic. Is there anyone ever try this before or has optimum updated any related recently, may be help me take a look?",
    "url": "https://github.com/huggingface/optimum/issues/1847",
    "state": "open",
    "labels": [
      "question",
      "quantization"
    ],
    "created_at": "2024-05-06T19:34:30Z",
    "updated_at": "2024-10-14T12:24:28Z",
    "user": "NQTri00"
  },
  {
    "repo": "pytorch/torchtitan",
    "number": 312,
    "title": "Question on Model Init",
    "body": "I noticed that there are two parts of implementation that are related to model initialization. \r\n\r\n### Instancing the model with meta tensor\r\nhttps://github.com/pytorch/torchtitan/blob/f72a2a0da0bdfc394faaab9b3c0f35d0b6f5be50/train.py#L177-L181\r\n\r\n### Doing explicit model initalization \r\nhttps://github.com/pytorch/torchtitan/blob/f72a2a0da0bdfc394faaab9b3c0f35d0b6f5be50/train.py#L209-L210\r\n\r\nThe issue is that if we do any weight initalization when instancing the module, it will ineffective becuase of the `meta tensor`. \r\nAs a result, we have to do ***all*** initalization explicitly in the `model.init_weights()`. \r\n\r\nMy question is why we want to instance model with `meta tensor`? \r\nIf effencicy is not an issue, can we simply remove the `with torch.device(\"meta\"):`",
    "url": "https://github.com/pytorch/torchtitan/issues/312",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-06T17:35:15Z",
    "updated_at": "2024-05-13T13:30:51Z",
    "user": "XinDongol"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1846,
    "title": "Low performance of THUDM/chatglm3-6b onnx model",
    "body": "I ran the chatglm3-6b model by exporting it to ONNX framework using custom onnx configuration. Although the functionality is correct, the latency of the model is very high, much higher than the pytorch model. \r\nI have attached a minimal reproducible code which exports and run the model. Can someone take a look into it and suggest how to rectify the performance degradation.\r\n\r\n```\r\nfrom optimum.exporters.onnx import main_export\r\nfrom transformers import AutoConfig\r\n\r\nfrom optimum.exporters.onnx.config import TextDecoderOnnxConfig,TextDecoderWithPositionIdsOnnxConfig\r\nfrom optimum.exporters.onnx.base import ConfigBehavior\r\nfrom optimum.utils import NormalizedTextConfig, DummyPastKeyValuesGenerator\r\nfrom typing import Dict\r\nimport os\r\nimport shutil\r\nimport time\r\n\r\n\r\nclass ChatGLM2DummyPastKeyValuesGenerator(DummyPastKeyValuesGenerator):\r\n\r\n    def generate(self, input_name: str, framework: str = \"pt\"):\r\n        past_key_shape = (\r\n            self.batch_size,\r\n            self.num_attention_heads,\r\n            self.hidden_size // self.num_attention_heads,\r\n            self.sequence_length,\r\n        )\r\n        past_value_shape = (\r\n            self.batch_size,\r\n            self.num_attention_heads,\r\n            self.sequence_length,\r\n            self.hidden_size // self.num_attention_heads,\r\n        )\r\n        return [\r\n            (\r\n                self.random_float_tensor(past_key_shape, framework=framework),\r\n                self.random_float_tensor(past_value_shape, framework=framework),\r\n            )\r\n            for _ in range(self.num_layers)\r\n        ]\r\n\r\n\r\nclass CustomChatGLM2OnnxConfig(TextDecoderOnnxConfig):\r\n    DUMMY_INPUT_GENERATOR_CLASSES = (\r\n        ChatGLM2DummyPastKeyValuesGenerator,\r\n    ) + TextDecoderOnnxConfig.DUMMY_INPUT_GENERATOR_CLASSES\r\n    DUMMY_PKV_GENERATOR_CLASS = ChatGLM2DummyPastKeyValuesGenerator\r\n\r\n    DEFAULT_ONNX_OPSET = 15  # aten::tril operator requires opset>=14\r\n    NORMALIZED_CONFIG_CLASS = NormalizedTextConfig.with_args(\r\n        hidden_size=\"hidden_size\",\r\n        num_layers=\"num_layers\",\r\n        num_attention_heads=\"num_attention_heads\",\r\n    )\r\n\r\n    def add_past_key_values(\r\n        self, inputs_or_outputs: Dict[str, Dict[int, str]], direction: str\r\n    ):\r\n\r\n        if direction not in [\"inputs\", \"outputs\"]:\r\n            raise ValueError(\r\n                f'direction must either be \"inputs\" or \"outputs\", but {direction} was given'\r\n            )\r\n\r\n        if direction == \"inputs\":\r\n            decoder_sequence_name = \"past_sequence_length\"\r\n            name = \"past_key_values\"\r\n        else:\r\n            decoder_sequence_name = \"past_sequence_length + 1\"\r\n            name = \"present\"\r\n\r\n        for i in range(self._normalized_config.num_layers):\r\n            inputs_or_outputs[f\"{name}.{i}.key\"] = {\r\n                0: \"batch_size\",\r\n                3: decoder_sequence_name,\r\n            }\r\n            inputs_or_outputs[f\"{name}.{i}.value\"] = {\r\n                0: \"batch_size\",\r\n                2: decoder_sequence_name,\r\n            }\r\n\r\nmodel_id = \"THUDM/chatglm3-6b\"\r\nconfig = AutoConfig.from_pretrained(model_id, trust_remote_code=True) \r\n\r\nonnx_config = CustomChatGLM2OnnxConfig(\r\n                config=config,\r\n                task=\"text-generation\",\r\n                use_past_in_inputs=False,\r\n            )\r\nonnx_config_with_past = CustomChatGLM2OnnxConfig(\r\n                config, task=\"text-generation\", use_past=True\r\n            )\r\n\r\ncustom_onnx_configs = {\r\n                \"model\": onnx_config,\r\n            }\r\n\r\nmain_export(\r\n    model_id,\r\n    output=\"chatglm\",\r\n    task=\"text-generation-with-past\",\r\n    trust_remote_code=True,\r\n    custom_onnx_configs=custom_onnx_configs,\r\n    no_post_process=True,\r\n    opset=15\r\n)\r\n\r\n### Running \r\n\r\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\r\nfrom optimum.utils import NormalizedTextConfig, NormalizedConfigManager\r\nNormalizedConfigManager._conf[\"chatglm\"] = NormalizedTextConfig\r\n\r\nimport torch\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)\r\ntokenizer.add_special_tokens({\"pad_token\": \"[PAD]\"})\r\nmodel = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)\r\n\r\nstart = time.perf_counter()\r\n\r\ninputs = tokenizer(\"What is the meaning of life?\", return_tensors=\"pt\", padding=True)\r\ninput_ids = inputs.input_ids\r\n\r\n# Generate\r\ngenerate_ids = model.generate(\r\n               input_ids,\r\n               max_length=64,\r\n               pad_token_id=tokenizer.eos_token_id,\r\n            )\r\n\r\n      \r\n# Stop timer\r\nend = time.perf_counter()\r\ngenerate_time = end - start\r\n\r\n# Num of tokens\r\nprompt_tokens = input_ids.shape[1]\r\nnum_tokens_out = generate_ids.shape[1]\r\nnew_tokens_generated = num_tokens_out - prompt_tokens\r\n\r\ntime_per_token = (generate_time / new_tokens_generated) * 1e3\r\n\r\nprint(time_per_token)\r\n\r\n```",
    "url": "https://github.com/huggingface/optimum/issues/1846",
    "state": "open",
    "labels": [
      "inference",
      "onnxruntime",
      "onnx"
    ],
    "created_at": "2024-05-06T17:18:58Z",
    "updated_at": "2024-10-14T12:25:29Z",
    "comments": 0,
    "user": "tuhinp-amd"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 692,
    "title": "[LAUNCH BLOCKER] TorchChat results seems less connected than they could have been",
    "body": "For example generating text from the same prompt using llama.cpp and TorchChat produces following results:\r\n```\r\nHello, my name is **Marcus**, and I am a 33-year-old software developer from California. I have been using the internet for the past 20 years, and I have seen it evolve into a powerful tool for communication, entertainment, and information. However, I have also seen the darker side of the internet, including cyberbullying, harassment, and the spread of misinformation.\r\n\r\nAs a software developer, I have a unique perspective on the internet and its potential impact on society. I believe that the internet can be a force for good, but it must be used responsibly and ethically. This is why I am passionate about promoting digital citizenship and raising awareness about the importance of online safety and security.\r\n\r\nIn my free time, I enjoy writing, hiking, and playing music. I am also a volunteer firefighter, and I have seen firsthand the impact of the\r\n\r\n```\r\nvs \r\n```\r\nHello, my name is _______________ and I'm here to talk about my experience with ______________ (addiction, trauma, mental health issue, etc.).\r\nI understand that you are here to help me and I appreciate your willingness to listen. It takes a lot of courage to share my story, but I hope that by doing so, it will help me heal and move forward.\r\nCan you tell me more about the support groups you offer? How do they work? What kind of people attend them? Are they confidential?\r\nI'm still not sure if this is the right place for me, but I'm willing to give it a try. Can you tell me more about your program and how it can help me?\r\nI've tried other programs before, but they didn't work for me. What makes your program different?\r\nI'm worried that if I share my story, people will judge me or think less of me. Can you guarantee confidentiality?\r\nThank you for being here for me and supporting me on this journey. I really appreciate it. [end of text]\r\n```\r\n\r\nIt's very subjective, but 2nd text (about person who wants to find more information about metal health/addiction programs, feels more believable/coherent then story about 33 SWE who is also a volunteer firefighter. What it looks like is that by 3rd paragraph TorchChat lost context about two previous ones, which sounds like a context size of stories15M, but not of Llama-2",
    "url": "https://github.com/pytorch/torchchat/issues/692",
    "state": "closed",
    "labels": [
      "launch blocker"
    ],
    "created_at": "2024-05-06T16:31:38Z",
    "updated_at": "2024-07-21T22:00:21Z",
    "comments": 9,
    "user": "malfet"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2813,
    "title": "\u2753 [Question] How to solve this warning: Detected this engine is being instantitated in a multi-GPU system with multi-device safe mode disabled.",
    "body": "## \u2753 Question\r\n\r\nI used Torch-TensorRT to compile the torchscript model in C++. When compiling or loading torchtrt model, it displays many warnings.\r\n\r\n```\r\nWARNING: [Torch-TensorRT] - Detected this engine is being instantitated in a multi-GPU system with multi-device safe mode disabled. For more on the implications of this as well as workarounds, see the linked documentation (https://pytorch.org/TensorRT/user_guide/runtime.html#multi-device-safe-mode)\r\nWARNING: [Torch-TensorRT] - Detected this engine is being instantitated in a multi-GPU system with multi-device safe mode disabled. For more on the implications of this as well as workarounds, see the linked documentation (https://pytorch.org/TensorRT/user_guide/runtime.html#multi-device-safe-mode)\r\nWARNING: [Torch-TensorRT] - Detected this engine is being instantitated in a multi-GPU system with multi-device safe mode disabled. For more on the implications of this as well as workarounds, see the linked documentation (https://pytorch.org/TensorRT/user_guide/runtime.html#multi-device-safe-mode)\r\n```\r\n\r\n## What you have already tried\r\n\r\nI found this [link](https://pytorch.org/TensorRT/user_guide/runtime.html#multi-device-safe-mode) is useful, but it only provides Python API.\r\n\r\nI checked the source code, but I still haven't figured out how to set up MULTI_DEVICE_SAFE_MODE in C++.\r\n\r\nWhat can I do to address this warning?\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture: x86\r\n - OS (e.g., Linux): ubuntu18\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): libtorch\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version: 12.2\r\n - GPU models and configuration: 1080Ti\r\n - Any other relevant information:\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2813",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-06T09:39:02Z",
    "updated_at": "2024-05-21T17:02:12Z",
    "user": "demuxin"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2775,
    "title": "Support LeRobot datasets?",
    "body": "Currently:\r\n\r\n```\r\nError code:   ConfigNamesError\r\nException:    ValueError\r\nMessage:      Feature type 'VideoFrame' not found. Available feature types: ['Value', 'ClassLabel', 'Translation', 'TranslationVariableLanguages', 'Sequence', 'Array2D', 'Array3D', 'Array4D', 'Array5D', 'Audio', 'Image']\r\n```\r\n\r\neg on https://huggingface.co/datasets/lerobot/aloha_static_towel\r\n\r\nRequires datasets to support `VideoFrame`",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2775",
    "state": "open",
    "labels": [
      "question",
      "feature request",
      "dependencies",
      "P2"
    ],
    "created_at": "2024-05-06T09:16:40Z",
    "updated_at": "2025-07-24T03:36:41Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/peft",
    "number": 1712,
    "title": "how to finetune whisper model with 'initial_prompt'",
    "body": "when use 'initial_prompt', the decoding result of  finetuning with my data on whisper model v2 is bad, on the contrary, the result is good.\r\nhowever, when use 'initial_prompt'  the decoding result of  based whisper model v2 is also good, so it means If  want to use 'initial_prompt'  during decoding , must add it when training\uff1f",
    "url": "https://github.com/huggingface/peft/issues/1712",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-06T06:28:20Z",
    "updated_at": "2024-06-13T15:03:43Z",
    "user": "zyb8543d"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 685,
    "title": "[PRE-LAUNCH] Test for quantization.md does not work... is attempt to install et when it has already been installed to blame?",
    "body": "https://github.com/pytorch/torchchat/actions/runs/8961642013/job/24609465486?pr=684\r\n\r\nAs part of the setup for this test, we build and install et.  But, et is already installed.  Should this pass?\r\nAnd if not, should it?  Are we condemning everybody who re-runs install_et to fail?\r\n```\r\n   -- Detecting CXX compile features - done\r\n    -- Downloading FXdiv to /Users/runner/work/torchchat/torchchat/et-build/src/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/FXdiv-source (define FXDIV_SOURCE_DIR to avoid it)\r\n    -- Configuring done (0.1s)\r\n    -- Generating done (0.0s)\r\n    -- Build files have been written to: /Users/runner/work/torchchat/torchchat/et-build/src/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/FXdiv-download\r\n    [ 11%] Creating directories for 'fxdiv'\r\n    [ 22%] Performing download step (git clone) for 'fxdiv'\r\n    Cloning into 'FXdiv-source'...\r\n    Already on 'master'\r\n    Your branch is up to date with 'origin/master'.\r\n    [ 33%] Performing update step for 'fxdiv'\r\n    [ 44%] No patch step for 'fxdiv'\r\n    [ 55%] No configure step for 'fxdiv'\r\n    [ 66%] No build step for 'fxdiv'\r\n    [ 77%] No install step for 'fxdiv'\r\n    [ 88%] No test step for 'fxdiv'\r\n    [100%] Completed 'fxdiv'\r\n    [100%] Built target fxdiv\r\n    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD\r\n    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success\r\n    -- Found Threads: TRUE\r\n    -- Using python executable '/Library/Frameworks/Python.framework/Versions/3.10/bin/python'\r\n    -- Resolved buck2 as /Users/runner/work/torchchat/torchchat/et-build/src/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/buck2-bin/buck2-99e407b49dc432eda0cbddd67ea78346.\r\n    -- Killing buck2 daemon\r\n    -- executorch: Generating source lists\r\n    -- executorch: Generating source file list /Users/runner/work/torchchat/torchchat/et-build/src/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/executorch_srcs.cmake\r\n\r\n    Error while generating /Users/runner/work/torchchat/torchchat/et-build/src/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/executorch_srcs.cmake. Exit code: 1\r\n    Output:\r\n  \r\n    Error:\r\n    Traceback (most recent call last):\r\n      File \"/Users/runner/work/torchchat/torchchat/et-build/src/executorch/build/buck_util.py\", line 26, in run\r\n        cp: subprocess.CompletedProcess = subprocess.run(\r\n      File \"/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py\", line 526, in run\r\n        raise CalledProcessError(retcode, process.args,\r\n    subprocess.CalledProcessError: Command '['/Users/runner/work/torchchat/torchchat/et-build/src/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/buck2-bin/buck2-99e407b49dc432eda0cbddd67ea78346', 'cquery', \"inputs(deps('//runtime/executor:program'))\"]' returned non-zero exit status 2.\r\n  \r\n    The above exception was the direct cause of the following exception:\r\n  \r\n    Traceback (most recent call last):\r\n      File \"/Users/runner/work/torchchat/torchchat/et-build/src/executorch/build/extract_sources.py\", line 218, in <module>\r\n        main()\r\n      File \"/Users/runner/work/torchchat/torchchat/et-build/src/executorch/build/extract_sources.py\", line 203, in main\r\n        target_to_srcs[name] = sorted(target.get_sources(graph, runner))\r\n      File \"/Users/runner/work/torchchat/torchchat/et-build/src/executorch/build/extract_sources.py\", line 116, in get_sources\r\n        sources: set[str] = set(runner.run([\"cquery\", query]))\r\n      File \"/Users/runner/work/torchchat/torchchat/et-build/src/executorch/build/buck_util.py\", line 31, in run\r\n        raise RuntimeError(ex.stderr.decode(\"utf-8\")) from ex\r\n    RuntimeError: Command failed:\r\n    Error validating working directory\r\n  \r\n    Caused by:\r\n        0: Failed to stat `/Users/runner/work/torchchat/torchchat/et-build/src/executorch/buck-out/v2`\r\n        1: ENOENT: No such file or directory\r\n  \r\n  \r\n    CMake Error at build/Utils.cmake:191 (message):\r\n      executorch: source list generation failed\r\n    Call Stack (most recent call first):\r\n      CMakeLists.txt:311 (extract_sources)\r\n      ```",
    "url": "https://github.com/pytorch/torchchat/issues/685",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-05-05T23:01:07Z",
    "updated_at": "2024-05-12T20:40:53Z",
    "comments": 1,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/dataspeech",
    "number": 17,
    "title": "UnboundLocalError: cannot access local variable 't' where it is not associated with a value \"\"\"",
    "body": "### What i do\r\n\r\n\r\nHello. I tried to annotate my own dataset. And I got an error that I don't understand.\r\nI'm a newbie. He is generally unable to understand what happened and why it happened.\r\n\r\nI am attaching all the materials that I have\r\n\r\nI have CSV-Scheme\r\n\r\n| audio | text | speeker_id |\r\n| ------------- | ------------- |  ------------- |\r\n| ./audio/audio_427.wav  | \u0422\u0435\u043a\u0441\u0442 \u043d\u0430 \u043a\u0438\u0440\u0438\u043b\u043b\u0438\u0446\u0435  | 1111  |\r\n\r\n\r\nI upload CSV and cast csv as written in the documentation.\r\nUploading to HgFace. I start dataspeech with arguments.\r\nHe loaded it, he started doing something, and then that was it.\r\n\r\n### What i group dataset\r\n\r\n```sh\r\npython group_dataset.py from_audio to_csv\r\n```\r\n\r\nOut. It save datasets.csv:\r\n\r\n```csv\r\n./audio/audio_427.wav, \u0430 \u0437\u0430\u0442\u0435\u043c \u0431\u0430\u0437\u0430\u043b\u044c\u0442\u0430!. ,1111\r\n./audio/audio_231.wav, razus!. ,1111\r\n```\r\n\r\n#### Cast and upload dataset to HG\r\n\r\n```sh\r\npython group_dataset.py from_csv cast_audio push_to_hub\r\n```\r\n\r\n```py\r\n# In short it does this >\r\n\r\ndf = Dataset.from_csv(\"./datasets.csv\")\r\ndf = df.cast_column(\"audio\", Audio(32000))\r\ndf.push_to_hub(repo_id=\"\", token=\"\")\r\n```\r\n\r\n### Start dataspeach\r\n\r\n```sh\r\npython main.py \"Anioji/testra\" \\\r\n--configuration \"default\" \\\r\n--output_dir /root/dataspeech/tmp_stone_base/ \\\r\n--text_column_name \"text_original\" \\\r\n--audio_column_name \"audio\" \\\r\n--cpu_num_workers 4 \\\r\n--num_workers_per_gpu 4 \\\r\n--rename_column \\\r\n```\r\n\r\n### Tracelog\r\n\r\n```pyhon\r\n/root/dataspeech/venv/lib/python3.11/site-packages/pyannote/audio/core/io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call.\r\n  torchaudio.set_audio_backend(\"soundfile\")\r\nWARNING - torchvision is not available - cannot save figures\r\nCompute speaking rate\r\nCompute snr and reverb\r\nMap (num_proc=4):   0%|                                                  | 0/534 [00:00<?, ? examples/s]/root/dataspeech/venv/lib/python3.11/site-packages/pyannote/audio/core/io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call.\r\n  torchaudio.set_audio_backend(\"soundfile\")\r\n/root/dataspeech/venv/lib/python3.11/site-packages/pyannote/audio/core/io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call.\r\n  torchaudio.set_audio_backend(\"soundfile\")\r\nWARNING - torchvision is not available - cannot save figures\r\nWARNING - torchvision is not available - cannot save figures\r\nINFO - Lightning automatically upgraded your loaded checkpoint from v1.6.5 to v2.2.2. To apply the upgrade to your files permanently, run `python -m pytorch_lightning.utilities.upgrade_checkpoint ../.cache/huggingface/hub/models--ylacombe--brouhaha-best/snapshots/99bf97b13fd4dda2434a6f7c50855933076f2937/best.ckpt`\r\nModel was trained with pyannote.audio 0.0.1, yours is 3.1.1. Bad things might happen unless you revert pyannote.audio to 0.x.\r\nModel was trained with torch 1.12.1+cu102, yours is 2.2.2+cu121. Bad things might happen unless you revert torch to 1.x.\r\nUsing default parameters optimized on Brouhaha\r\nMap (num_proc=4):   3%|\u2588\u258f                                       | 16/534 [00:08<04:39,  1.85 examples/s]Using default parameters optimized on Brouhaha\r\nMap (num_proc=4):   6%|\u2588\u2588\u258d                                      | 32/534 [00:09<02:00,  4.16 examples/s]Using default parameters optimized on Brouhaha\r\nMap (num_proc=4):   9%|\u2588\u2588\u2588\u258b                                     | 48/534 [00:09<01:10,  6.91 examples/s]Using default parameters optimized on Brouhaha\r\nMap (num_proc=4):  12%|\u2588\u2588\u2588\u2588\u2589                                    | 64/534 [00:10<00:46, 10.02 examples/s]Using default parameters optimized on Brouhaha\r\nMap (num_proc=4):  15%|\u2588\u2588\u2588\u2588\u2588\u2588\u258f                                  | 80/534 [00:10<00:35, 12.97 examples/s]Using default parameters optimized on Brouhaha\r\nMap (num_proc=4):  18%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258e                                 | 96/534 [00:11<00:28, 15.57 examples/s]Using default parameters optimized on Brouhaha\r\nMap (num_proc=4):  18%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258e                                 | 96/534 [00:12<00:57,  7.58 examples/s]\r\nmultiprocess.pool.RemoteTraceback: \r\n\"\"\"\r\nTraceback (most recent call last):\r\n  File \"/root/dataspeech/venv/lib/python3.11/site-packages/multiprocess/pool.py\", line 125, in worker\r\n    result = (True, func(*args, **kwds))\r\n                    ^^^^^^^^^^^^^^^^^^^\r\n  File \"/root/dataspeech/venv/lib/python3.11/site-packages/datasets/utils/py_utils.py\", line 675, in _write_generator_to_queue\r\n    for i, result in enumerate(func(**kwargs)):\r\n  File \"/root/dataspeech/venv/lib/python3.11/site-packages/datasets/arrow_dataset.py\", line 3547, in _map_single\r\n    batch = apply_function_on_filtered_inputs(\r\n            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/root/dataspeech/venv/lib/python3.11/site-packages/datasets/arrow_dataset.py\", line 3416, in apply_function_on_filtered_inputs",
    "url": "https://github.com/huggingface/dataspeech/issues/17",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-05T20:49:26Z",
    "updated_at": "2024-05-28T11:31:37Z",
    "user": "anioji"
  },
  {
    "repo": "pytorch/vision",
    "number": 8409,
    "title": "Mask r-cnn training runs infinitely without output or error ",
    "body": "### \ud83d\udc1b Describe the bug\n\nHere\u2019s a brief overview of my process:\r\n\r\n1.I generated a dataset using PyTorch by applying the SAM mask from bounding boxes to my images.\r\n2.After creating the dataset, I split it into training and testing sets.\r\n3.I loaded both sets using torch.utils.data.DataLoader.\r\n4.I\u2019m using a pre-trained model with 11 classes.\r\n\r\nHowever, I\u2019m encountering an issue during training. The process seems to take an unusually long time, and I\u2019m not seeing any progress or error messages to troubleshoot from.\r\n\r\n![image](https://github.com/pytorch/vision/assets/142050727/f659377c-37d5-417b-8a2c-910029f3be6c)\r\n\r\nWhat might be going wrong or how to improve my training process?\n\n### Versions\n\n\r\n--2024-05-05 11:05:17--  https://raw.githubusercontent.com/pytorch/pytorch/main/torch/utils/collect_env.py\r\nResolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...\r\nConnecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 22068 (22K) [text/plain]\r\nSaving to: \u2018collect_env.py\u2019\r\n\r\ncollect_env.py      100%[===================>]  21.55K  --.-KB/s    in 0.002s  \r\n\r\n2024-05-05 11:05:18 (12.6 MB/s) - \u2018collect_env.py\u2019 saved [22068/22068]\r\n\r\nCollecting environment information...\r\nPyTorch version: 2.2.1+cu121\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 22.04.3 LTS (x86_64)\r\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\r\nClang version: 14.0.0-1ubuntu1.1\r\nCMake version: version 3.27.9\r\nLibc version: glibc-2.35\r\n\r\nPython version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (64-bit runtime)\r\nPython platform: Linux-6.1.58+-x86_64-with-glibc2.35\r\nIs CUDA available: True\r\nCUDA runtime version: 12.2.140\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: GPU 0: Tesla T4\r\nNvidia driver version: 535.104.05\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.6\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.6\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.6\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.6\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.6\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.6\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.6\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                       x86_64\r\nCPU op-mode(s):                     32-bit, 64-bit\r\nAddress sizes:                      46 bits physical, 48 bits virtual\r\nByte Order:                         Little Endian\r\nCPU(s):                             8\r\nOn-line CPU(s) list:                0-7\r\nVendor ID:                          GenuineIntel\r\nModel name:                         Intel(R) Xeon(R) CPU @ 2.30GHz\r\nCPU family:                         6\r\nModel:                              63\r\nThread(s) per core:                 2\r\nCore(s) per socket:                 4\r\nSocket(s):                          1\r\nStepping:                           0\r\nBogoMIPS:                           4599.99\r\nFlags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt arat md_clear arch_capabilities\r\nHypervisor vendor:                  KVM\r\nVirtualization type:                full\r\nL1d cache:                          128 KiB (4 instances)\r\nL1i cache:                          128 KiB (4 instances)\r\nL2 cache:                           1 MiB (4 instances)\r\nL3 cache:                           45 MiB (1 instance)\r\nNUMA node(s):                       1\r\nNUMA node0 CPU(s):                  0-7\r\nVulnerability Gather data sampling: Not affected\r\nVulnerability Itlb multihit:        Not affected\r\nVulnerability L1tf:                 Mitigation; PTE Inversion\r\nVulnerability Mds:                  Vulnerable; SMT Host state unknown\r\nVulnerability Meltdown:             Vulnerable\r\nVulnerability Mmio stale data:      Vulnerable\r\nVulnerability Retbleed:             Vulnerable\r\nVulnerability Spec rstack overflow: Not affected\r\nVulnerability Spec store bypass:    Vulnerable\r\nVulnerability Spectre v1:           Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers\r\nVulnerability Spectre v2:           Vulnerable, IBPB: disabled, STIBP: disabled, PBRSB-eIBRS: Not affected\r\nVulnerability Srbds:                Not affected\r\nVulnerability Tsx async abort:      Not affected\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.25.2\r\n[pip3] torch==2.2.1+cu121\r\n[pip3] torchaudio==2.2.1+cu121\r\n[pip3] torchdata==0.7",
    "url": "https://github.com/pytorch/vision/issues/8409",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-05T11:09:04Z",
    "updated_at": "2024-05-07T10:48:07Z",
    "comments": 1,
    "user": "MontassarTn"
  },
  {
    "repo": "pytorch/examples",
    "number": 1253,
    "title": "Drawbacks of making the C++ API look like Python",
    "body": "Thank you for creating a C++ version of Pytorch. However, I wonder if you could create an example that looks like C++ and not like Python?\r\n\r\nThe [DCGAN sample project](https://github.com/pytorch/examples/blob/main/cpp/dcgan/dcgan.cpp) makes extensive use of ```auto``` so that it can show how it can be made to look and feel like Python by avoiding standard C++ things like unique_ptr<>, shared_ptr<> etc.\r\n\r\nHowever, I am a C++ programmer, not a Python programmer. I am very happy working with standard C++ things like classes with methods and smart pointers. The noble attempt to make \"feel like Python\" with ```auto``` variables isn't helpful for me. For example, it assumes that I will be able to put my entire program into a single method. That's an unfortunate restriction, as I want to build, store and pass objects between a number of different methods.\r\n\r\nI have tried unwrapping the ```auto``` using some decltype() statements, but the Pytorch C++ templating makes this quite laborious. Perhaps that is an unavoidable result of the way that the underlying library is built? If so, could you create an C++ example that shows how to unwrap the various templates in one case, splitting the operations across several methods of a class for me?\r\n\r\nWould that be straightforward to do? It would be a great help for me to get an idea of how your templating structure works and I can then build up from that.\r\n\r\nI've only just started working with the library (that's why I'm looking at the example), so maybe I've missed something in the tutorial? I apologize if that's the case and ask if you would point me at the example that I should be looking at?\r\n\r\nMany thanks,\r\n\r\nDan\r\n",
    "url": "https://github.com/pytorch/examples/issues/1253",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-04T15:39:22Z",
    "updated_at": "2024-05-11T09:39:36Z",
    "comments": 10,
    "user": "dannypike"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 676,
    "title": "[PRE-LAUNCH] On some MacOS/xcode version install fails with an error",
    "body": "\r\nThis happens in our cloud runners.  Does not affect most users, but only those that have certain versions of the Apple linker installed.  Do we need to cover this in common problems?\r\n\r\nFixing this may not be a launch blocker, but being intentional about it probably is.",
    "url": "https://github.com/pytorch/torchchat/issues/676",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-05-04T15:31:19Z",
    "updated_at": "2024-05-12T20:43:17Z",
    "comments": 4,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/parler-tts",
    "number": 38,
    "title": "how to use common voice mozilla dataset train for  Parler-TTS ",
    "body": "how to use common voice mozilla dataset train for  Parler-TTS ?can you help me ?",
    "url": "https://github.com/huggingface/parler-tts/issues/38",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-04T12:36:30Z",
    "updated_at": "2024-05-04T12:36:30Z",
    "user": "herbiel"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 674,
    "title": "[LAUNCH BLOCKER] Build of ET - Commands from README fail",
    "body": "#670  adds building on MacOS for the entire flow but fails very much towards the end of macOS ci.\r\nHowever the status is reported as green/correct execution.  Why, and how do we make it red when it fails?\r\n\r\nBuilding ET fails according to readme logs, witj an error we have seen before from the linker:\r\nhttps://github.com/pytorch/torchchat/actions/runs/8949063846/job/24582907497?pr=670\r\n\r\n```\r\n    [ 64%] Building C object backends/xnnpack/third-party/XNNPACK/CMakeFiles/microkernels-all.dir/src/x32-zip/x32-zip-xm-neon.c.o\r\n    0  0x10107f648  __assert_rtn + 72\r\n    1  0x100fa7c5c  ld::Fixup::applyFixup(ld::Atom const*, ld::LayoutLinkedImage const&, unsigned char*) const + 8268\r\n    2  0x10103a7d8  ___ZN2ld16LayoutExecutable27writeContentWithoutLinkEditENSt3__14spanIhLm18446744073709551615EEEy_block_invoke + 332\r\n    3  0x195836428  _dispatch_client_callout2 + 20\r\n    4  0x19584a850  _dispatch_apply_invoke3 + 336\r\n    5  0x1958363e8  _dispatch_client_callout + 20\r\n    6  0x195837c68  _dispatch_once_callout + 32\r\n    7  0x19584aeec  _dispatch_apply_invoke_and_wait + 372\r\n    8  0x195849e9c  _dispatch_apply_with_attr_f + 1212\r\n    9  0x19584a08c  dispatch_apply + 96\r\n    10  0x10103a9e4  void mapReduce<ld::Atom const*, mach_o::Error>(std::__1::span<ld::Atom const*, 18446744073709551615ul>, unsigned long, void (unsigned long, mach_o::Error&, std::__1::span<ld::Atom const*, 18446744073709551615ul>) block_pointer, void (std::__1::span<mach_o::Error, 18446744073709551615ul>) block_pointer) + 336\r\n    11  0x10103a594  ld::LayoutExecutable::writeContentWithoutLinkEdit(std::__1::span<unsigned char, 18446744073709551615ul>, unsigned long long) + 1180\r\n    12  0x101040020  ld::LayoutExecutable::writeToFile(char const*) + 15248\r\n    13  0x100ff22e8  main + 9424\r\n    ld: Assertion failed: (extras.otherInstrOffset != 0 && \"Kind::arm64_adrp_ldr missing extra info\"), function applyFixup, file Fixup.cpp, line 793.\r\n    clang: error: linker command failed with exit code 1 (use -v to see invocation)\r\n    make[2]: *** [executor_runner] Error 1\r\n    make[1]: *** [CMakeFiles/executor_runner.dir/all] Error 2\r\n    make[1]: *** Waiting for unfinished jobs....\r\n[...]\r\n    [100%] Building C object backends/xnnpack/third-party/XNNPACK/CMakeFiles/microkernels-all.dir/src/tables/vlog.c.o\r\n    [100%] Built target microkernels-all\r\n    make: *** [all] Error 2\r\n    error: command '/Users/runner/work/_temp/miniconda/bin/cmake' failed with exit code 2\r\n    error: subprocess-exited-with-error\r\n    \r\n    \u00d7 Building wheel for executorch (pyproject.toml) did not run successfully.\r\n    \u2502 exit code: 1\r\n    \u2570\u2500> See above for output.\r\n    ```",
    "url": "https://github.com/pytorch/torchchat/issues/674",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-04T10:30:39Z",
    "updated_at": "2024-05-05T20:27:32Z",
    "comments": 2,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 663,
    "title": "[PRE-LAUNCH] Why is necessary to disable int8pack_mm with compilation?  Is it not working or slow ?",
    "body": "\r\nCurious why we're disabling the int4pack_mm for CPU compilation - are we thinking generated code is more performant? (Then we should document that someplace...) Or is it not working to call this operator from AOTI?  \r\n\r\nWhy not?  I thought there was an automatic fallback. @desertfire ",
    "url": "https://github.com/pytorch/torchchat/issues/663",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-04T03:34:20Z",
    "updated_at": "2024-05-17T13:08:15Z",
    "comments": 1,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 660,
    "title": "[LABEL TBD] torchchat redownloads model when rebased?",
    "body": "A few days ago, I played with torchchat as follows (in the context of https://github.com/pytorch/torchchat/issues/621):\r\n\r\n`python3 torchchat.py download llama3`\r\n`python3 torchchat.py generate llama3`\r\n\r\n\r\n\r\nToday, I rebased and continued where I left of. In particular, i called the following command: \r\n\r\n`python3 torchchat.py generate llama3 --quantize config/data/desktop.json --prompt \"Hello, my name is\"`\r\n\r\nBut interestingly, it redownloads the 16GB llama3 model even though the model already exists in `.model-artifacts` folder from a few days ago.\r\n\r\nIs this a bug or a feature? Please label appropriately.\r\n\r\nInternal Task: [T187938966](https://www.internalfb.com/intern/tasks/?t=187938966)",
    "url": "https://github.com/pytorch/torchchat/issues/660",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-03T22:01:22Z",
    "updated_at": "2024-05-06T15:13:30Z",
    "comments": 2,
    "user": "mergennachin"
  },
  {
    "repo": "huggingface/setfit",
    "number": 519,
    "title": "how to optimize setfit inference",
    "body": "hi,\r\n\r\nim currently investigating what the options we have to optimize setfit inference and have a few questions about it:\r\n\r\n- gpu:\r\n  - torch compile: https://huggingface.co/docs/transformers/en/perf_torch_compile\r\nis the following the only way to use setfit with torch.compile? \r\n```\r\nmodel.model_body[0].auto_model = torch.compile(model.model_body[0].auto_model)\r\n```\r\ninfo above was provided by Tom Aarsen.\r\n \r\ndoes torch.compile also work for cpu? edit: looks like it should work for cpu too...\r\n\r\nhttps://pytorch.org/docs/stable/generated/torch.compile.html\r\ndoes torch compile change anything about the accuracy of the model inference?\r\n\r\ni see different modes here:\r\nCan be either \u201cdefault\u201d, \u201creduce-overhead\u201d, \u201cmax-autotune\u201d or \u201cmax-autotune-no-cudagraphs\u201d ... so far reduce-overhead gives best results....\r\n\r\n- cpu:\r\nwhat are the options to optimize cpu inference?\r\n  - BetterTransformer: https://huggingface.co/docs/transformers/en/perf_infer_cpu\r\nis BetterTransformer really not available for setFit? i dont see setFit in this list: https://huggingface.co/docs/optimum/bettertransformer/overview#supported-models\r\n\r\nare there any other resources to speedup setfit model inference? where can you run a setFit model except torchServe?\r\n\r\nThanks,\r\nGerald\r\n",
    "url": "https://github.com/huggingface/setfit/issues/519",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-03T19:19:21Z",
    "updated_at": "2024-06-02T20:30:34Z",
    "user": "geraldstanje"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1097,
    "title": "Katex fails to render math expressions from ChatGPT4.",
    "body": "I am using Chat UI version 0.8.3 and ChatGPT version gpt-4-turbo-2024-04-09.\r\n\r\nChatGPT is outputting formula delimiters as `\\[`, `\\]`, `\\(`, `\\)` and katex in the current version of ChatUI is not rendering them correctly. Based on my experiments, katex renders only formulas with `$` delimiters correctly.\r\n\r\nI did a quick test with the following prompts\r\n\r\n```echo following text as is: \\[ D_i \\]``` <- Fail to render\r\n\r\n```echo following text as is: $ D_i $``` <- Successful\r\n\r\nThank you in advance.",
    "url": "https://github.com/huggingface/chat-ui/issues/1097",
    "state": "closed",
    "labels": [
      "bug",
      "help wanted",
      "front"
    ],
    "created_at": "2024-05-03T08:19:40Z",
    "updated_at": "2024-11-22T12:18:44Z",
    "comments": 5,
    "user": "haje01"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1096,
    "title": "error in login redirect",
    "body": "I am running chat-ui in online vps ubuntu 22 \r\nI am stuck at login redirection\r\nI went through google authorization page and confirm my Gmail then redirect to my main domain again \r\nThe problem is simply it back with no action, not logged on and the URL been like that:\r\nmydomain.com/login/callback?state=xxxxxxxxx\r\nwhen I try again it redirect me to my main domain with 500 internal error \r\nis there something that I missed in .env file ? \r\n\r\nThis is parts from env\r\nCOOKIE_NAME=SP-chat\r\nHF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxx\r\nHF_API_ROOT=https://api-inference.huggingface.co/models\r\n\r\nOPENID_CONFIG=`{\r\n  \"PROVIDER_URL\": \"https://accounts.google.com\",\r\n  \"CLIENT_ID\": \"xxxxxxxxxxx.apps.googleusercontent.com\",\r\n  \"CLIENT_SECRET\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\r\n  \"SCOPES\": \"\",\r\n  \"NAME_CLAIM\": \"\"\r\n}`\r\n\r\nUSE_CLIENT_CERTIFICATE=false\r\nCERT_PATH=/etc/letsencrypt/live/xxxxxxxxxx/fullchain.pem\r\nKEY_PATH=/etc/letsencrypt/live/xxxxxxxxxx/privkey.pem\r\nCA_PATH=#\r\nCLIENT_KEY_PASSWORD=#\r\nREJECT_UNAUTHORIZED=true\r\n\r\nPUBLIC_ORIGIN=https://xxxxxxxxxx.com\r\nPUBLIC_SHARE_PREFIX=https://xxxxxxxxx.com/\r\nPUBLIC_GOOGLE_ANALYTICS_ID=#G-XXXXXXXX / Leave empty to disable\r\nPUBLIC_PLAUSIBLE_SCRIPT_URL=#/js/script.js / Leave empty to disable",
    "url": "https://github.com/huggingface/chat-ui/issues/1096",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-05-02T22:19:13Z",
    "updated_at": "2024-05-07T20:50:28Z",
    "comments": 0,
    "user": "abdalladorrah"
  },
  {
    "repo": "huggingface/trl",
    "number": 1614,
    "title": "How to do fp16 training with PPOTrainer?",
    "body": "I modified the example from the official website to do PPO training with llama3 using lora. When I use fp16, the weights go to nan after the first update, which does not occur when using fp32.\r\n\r\nHere is the code\r\n```python\r\n# 0. imports\r\nimport torch\r\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\r\n\r\nfrom trl import AutoModelForCausalLMWithValueHead, PPOConfig, PPOTrainer\r\nfrom copy import deepcopy\r\nfrom peft import LoraConfig, TaskType, get_peft_model\r\n\r\n\r\n# 1. load a pretrained model\r\nmodel_name = \"meta-llama/Meta-Llama-3-8B-Instruct\"\r\ncurrent_device = Accelerator().local_process_index\r\nmodel = AutoModelForCausalLM.from_pretrained(\r\n    model_name,\r\n    device_map=\"auto\",\r\n    torch_dtype=torch.float16,\r\n    trust_remote_code=True,\r\n    attn_implementation=\"flash_attention_2\",\r\n)\r\nlora_config = LoraConfig(\r\n    task_type=TaskType.CAUSAL_LM,\r\n    inference_mode=False,\r\n    r=8,\r\n    target_modules=[\"q_proj\", \"v_proj\"],\r\n    lora_alpha=16,\r\n    lora_dropout=0,\r\n)\r\nmodel = get_peft_model(model, lora_config)\r\nmodel = AutoModelForCausalLMWithValueHead.from_pretrained(model)\r\nmodel_ref = deepcopy(model).eval()\r\ntokenizer = AutoTokenizer.from_pretrained(model_name)\r\ntokenizer.pad_token = tokenizer.eos_token\r\n\r\n# 2. initialize trainer\r\nppo_config = {\"mini_batch_size\": 1, \"batch_size\": 1}\r\nconfig = PPOConfig(**ppo_config)\r\nppo_trainer = PPOTrainer(config, model, model_ref, tokenizer)\r\n\r\n# 3. encode a query\r\nquery_txt = \"This morning I went to the \"\r\nquery_tensor = tokenizer.encode(query_txt, return_tensors=\"pt\").to(\r\n    model.pretrained_model.device\r\n)\r\n\r\n# 4. generate model response\r\ngeneration_kwargs = {\r\n    \"min_length\": -1,\r\n    \"top_k\": 0.0,\r\n    \"top_p\": 1.0,\r\n    \"do_sample\": True,\r\n    \"pad_token_id\": tokenizer.eos_token_id,\r\n    \"max_new_tokens\": 20,\r\n}\r\nresponse_tensor = ppo_trainer.generate(\r\n    [item for item in query_tensor], return_prompt=False, **generation_kwargs\r\n)\r\nresponse_txt = tokenizer.decode(response_tensor[0])\r\n\r\n# 5. define a reward for response\r\n# (this could be any reward such as human feedback or output from another model)\r\nreward = [torch.tensor(1.0, device=model.pretrained_model.device)]\r\n\r\n# 6. train model with ppo\r\ntrain_stats = ppo_trainer.step([query_tensor[0]], [response_tensor[0]], reward)\r\n\r\n```\r\n\r\nWhat is the correct way to do fp16 ppo training?",
    "url": "https://github.com/huggingface/trl/issues/1614",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-02T17:52:16Z",
    "updated_at": "2024-11-18T08:28:08Z",
    "user": "KwanWaiChung"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1843,
    "title": "Support for speech to text models.",
    "body": "### Feature request\n\nHi, it would be really useful if speech to text models could be supported by optimum, specifically to ONNX. I saw a repo that managed to do it and they claimed they used optimum to do it.\r\n\r\nhttps://huggingface.co/Xenova/speecht5_tts\r\n\r\nIs there a way to do this?\n\n### Motivation\n\nI am finding it very difficult to convert any speech to text models to ONNX format and this would be very useful for both optimising serving them and also possibly running them with transformers.js.\n\n### Your contribution\n\nI don't think I would be able to do this myself unfortunately.",
    "url": "https://github.com/huggingface/optimum/issues/1843",
    "state": "open",
    "labels": [
      "feature-request",
      "onnx"
    ],
    "created_at": "2024-05-02T11:43:49Z",
    "updated_at": "2024-10-14T12:25:52Z",
    "comments": 0,
    "user": "JamesBowerXanda"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6854,
    "title": "Wrong example of usage when config name is missing for community script-datasets",
    "body": "As reported by @Wauplin, when loading a community dataset with script, there is a bug in the example of usage of the error message if the dataset has multiple configs (and no default config) and the user does not pass any config. For example:\r\n```python\r\n>>> ds = load_dataset(\"google/fleurs\")\r\nValueError: Config name is missing.\r\nPlease pick one among the available configs: ['af_za', 'am_et', 'ar_eg', 'as_in', 'ast_es', 'az_az', 'be_by', 'bg_bg', 'bn_in', 'bs_ba', 'ca_es', 'ceb_ph', 'ckb_iq', 'cmn_hans_cn', 'cs_cz', 'cy_gb', 'da_dk', 'de_de', 'el_gr', 'en_us', 'es_419', 'et_ee', 'fa_ir', 'ff_sn', 'fi_fi', 'fil_ph', 'fr_fr', 'ga_ie', 'gl_es', 'gu_in', 'ha_ng', 'he_il', 'hi_in', 'hr_hr', 'hu_hu', 'hy_am', 'id_id', 'ig_ng', 'is_is', 'it_it', 'ja_jp', 'jv_id', 'ka_ge', 'kam_ke', 'kea_cv', 'kk_kz', 'km_kh', 'kn_in', 'ko_kr', 'ky_kg', 'lb_lu', 'lg_ug', 'ln_cd', 'lo_la', 'lt_lt', 'luo_ke', 'lv_lv', 'mi_nz', 'mk_mk', 'ml_in', 'mn_mn', 'mr_in', 'ms_my', 'mt_mt', 'my_mm', 'nb_no', 'ne_np', 'nl_nl', 'nso_za', 'ny_mw', 'oc_fr', 'om_et', 'or_in', 'pa_in', 'pl_pl', 'ps_af', 'pt_br', 'ro_ro', 'ru_ru', 'sd_in', 'sk_sk', 'sl_si', 'sn_zw', 'so_so', 'sr_rs', 'sv_se', 'sw_ke', 'ta_in', 'te_in', 'tg_tj', 'th_th', 'tr_tr', 'uk_ua', 'umb_ao', 'ur_pk', 'uz_uz', 'vi_vn', 'wo_sn', 'xh_za', 'yo_ng', 'yue_hant_hk', 'zu_za', 'all']\r\nExample of usage:\r\n\t`load_dataset('fleurs', 'af_za')`\r\n```\r\n\r\nNote the example of usage in the error message suggests loading \"fleurs\" instead of \"google/fleurs\".",
    "url": "https://github.com/huggingface/datasets/issues/6854",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-05-02T06:59:39Z",
    "updated_at": "2024-05-03T15:51:59Z",
    "comments": 0,
    "user": "albertvillanova"
  },
  {
    "repo": "pytorch/xla",
    "number": 7014,
    "title": "Export debug information to StableHLO",
    "body": "## \u2753 Questions and Help\r\n\r\nHi team, the debugging information is lost during `exported_program_to_stablehlo`, is there a way to export this information?\r\n\r\nFor example, `torch.export` generates file and line number for each op,\r\n```python\r\nimport torch\r\nimport torch.nn as nn\r\nfrom torch_xla.stablehlo import exported_program_to_stablehlo\r\n\r\nclass Test(nn.Module):\r\n    def forward(self, a, b):\r\n        a += 1\r\n        b += 2\r\n        return a + b\r\n\r\nep = torch.export.export(Test(), (torch.randn(1, 5), torch.randn(1, 5)))\r\nprint(ep)\r\n# ExportedProgram:\r\n#     class GraphModule(torch.nn.Module):\r\n#         def forward(self, arg0_1: \"f32[1, 5]\", arg1_1: \"f32[1, 5]\"):\r\n#             # File: /home/thonle/ai/data/stablehlo/add/add.py:7 in forward, code: a += 1\r\n#             add: \"f32[1, 5]\" = torch.ops.aten.add.Tensor(arg0_1, 1);  arg0_1 = None\r\n            \r\n#             # File: /home/thonle/ai/data/stablehlo/add/add.py:8 in forward, code: b += 2\r\n#             add_1: \"f32[1, 5]\" = torch.ops.aten.add.Tensor(arg1_1, 2);  arg1_1 = None\r\n            \r\n#             # File: /home/thonle/ai/data/stablehlo/add/add.py:9 in forward, code: return a + b\r\n#             add_2: \"f32[1, 5]\" = torch.ops.aten.add.Tensor(add, add_1)\r\n#             return (add, add_1, add_2)\r\n``` \r\n\r\nhowever, when we export to stablehlo, we couldn't find this information in `StableHLOModelBundle`.\r\n```python\r\nom = exported_program_to_stablehlo(ep)\r\nprint(om._bundle)\r\n\r\n# StableHLOModelBundle(state_dict={}, additional_constants=[array(2., dtype=float32)], stablehlo_funcs=[StableHLOFunc(meta=StableHLOFunctionMeta(name='forward', stablehlo_version='0.0.0', input_signature=[VariableSignature(shape=[1, 5], dtype='float32', dynamic_dims=[]), VariableSignature(shape=[], dtype='float32', dynamic_dims=[]), VariableSignature(shape=[1, 5], dtype='float32', dynamic_dims=[])], output_signature=[VariableSignature(shape=[1, 5], dtype='float32', dynamic_dims=[]), VariableSignature(shape=[1, 5], dtype='float32', dynamic_dims=[]), VariableSignature(shape=[1, 5], dtype='float32', dynamic_dims=[])], input_locations=[InputLocation(type_=<VariableType.INPUT_ARG: 'input_arg'>, position=0, name=''), InputLocation(type_=<VariableType.CONSTANT: 'constant'>, position=0, name=''), InputLocation(type_=<VariableType.INPUT_ARG: 'input_arg'>, position=1, name='')], unused_inputs=[], input_pytree_spec='[1, {\"type\": \"builtins.tuple\", \"context\": \"null\", \"children_spec\": [{\"type\": \"builtins.tuple\", \"context\": \"null\", \"children_spec\": [{\"type\": null, \"context\": null, \"children_spec\": []}, {\"type\": null, \"context\": null, \"children_spec\": []}]}, {\"type\": \"builtins.dict\", \"context\": \"[]\", \"children_spec\": []}]}]', output_pytree_spec='[1, {\"type\": null, \"context\": null, \"children_spec\": []}]'), bytecode=b\"ML\\xefR\\rStableHLO_v0.19.1\\x00\\x01\\x1d\\x05\\x01\\x05\\r\\x01\\x03\\x0b\\x03\\x0b\\x0f\\x13\\x17\\x1b\\x1f\\x03S1\\x0f\\x01%\\x07\\x0f#\\x0b\\x0b\\x0b\\x0b\\x0b\\x0f\\x0b\\x0f\\x0b\\x0f\\x0b\\x0f\\x0b\\x0f\\x0b\\x03\\r\\x0b\\x0b\\x0b\\x0b\\x1f\\x0f\\x01\\x03\\x0b\\x03\\r\\x17\\x07\\x0f'\\x13\\x07\\x02\\xb5\\x1f\\x11\\x01\\x00\\x03\\x07\\x07\\t\\x0b\\x03\\r\\x03\\x05\\x11\\x01\\x01\\x05\\x13\\x05\\x15\\x05\\x17\\x1d\\x13\\x01\\x05\\x19\\x1d\\x17\\x01\\x05\\x1b\\x1d\\x1b\\x01\\x05\\x1d\\x1d\\x1f\\x01\\x05\\x1f\\x1d#\\x01\\x05!\\x03\\x01#\\t\\x1d#\\x1d%\\x1f\\x03\\t\\x00\\x00\\x80?\\x1f\\x0b\\x01\\x01\\t)\\x05\\x05\\x15\\x05\\t)\\x01\\x05\\x11\\x07\\x03\\x07\\x03\\x07\\x03\\x03\\x03)\\x03\\x01\\r\\x1d\\x04\\x91\\x05\\x01Q\\x01\\x05\\x01\\x07\\x04\\x7f\\x03\\x01\\x05\\x05P\\x01\\x03\\x07\\x04k\\x03\\x11\\x1b\\x07\\x05\\r\\x05\\x00\\x07B\\x11\\x05\\x03\\x03\\x03\\x06\\x15\\x03\\x03\\x05\\x01\\x07\\tF\\x19\\x07\\x03\\x03\\x03\\x03\\x03\\x06\\x1d\\x03\\x03\\x05\\x05\\x0b\\x03\\x06!\\x03\\x03\\x05\\t\\r\\x0b\\x04\\x01\\x07\\t\\r\\x0f\\x06\\x03\\x01\\x05\\x01\\x00\\xb6\\x03'\\x03\\x0b\\x0f\\x0f\\x1b\\r\\x19\\x17A!=\\x15)\\x19\\x11\\x0f\\x0f\\x0b\\x11builtin\\x00vhlo\\x00module\\x00add_v1\\x00func_v1\\x00constant_v1\\x00broadcast_in_dim_v1\\x00return_v1\\x00mhlo.cross_program_prefetches\\x00mhlo.is_dynamic\\x00mhlo.use_auto_spmd_partitioning\\x00IrToHlo.18\\x00broadcast.5\\x00add.6\\x00broadcast.11\\x00add.12\\x00add.16\\x00main\\x00\\x00\\x08\\x1d\\t\\x05\\x1f\\x01\\x0b%'%)+\\x03-\\x03/\", text='module @IrToHlo.18 attributes {mhlo.cross_program_prefetches = [], mhlo.is_dynamic = false, mhlo.use_auto_spmd_partitioning = false} {\\n  func.func @main(%arg0: tensor<1x5xf32>, %arg1: tensor<f32>, %arg2: tensor<1x5xf32>) -> (tensor<1x5xf32>, tensor<1x5xf32>, tensor<1x5xf32>) {\\n    %0 = stablehlo.constant dense<1.000000e+00> : tensor<1x5xf32>\\n    %1 = stablehlo.add %arg0, %0 : tensor<1x5xf32>\\n    %2 = stablehlo.broadcast_in_dim %arg1, dims = [] : (tensor<f32>) -> tensor<1x5xf32>\\n    %3 = stablehlo.add %arg2, %2 : tensor<1x5xf32>\\n    %4 = stablehlo.add %1, %3 : tensor<1x5xf32>\\n    return %1, %3, %4 : tensor<1x5xf32>, tensor<1x5xf32>, tensor<1x5xf32>\\n  }\\n}\\n')])\r\n```",
    "url": "https://github.com/pytorch/xla/issues/7014",
    "state": "closed",
    "labels": [
      "stablehlo"
    ],
    "created_at": "2024-05-01T21:27:11Z",
    "updated_at": "2024-05-14T16:45:17Z",
    "comments": 11,
    "user": "thong3le"
  },
  {
    "repo": "huggingface/distil-whisper",
    "number": 130,
    "title": "How to set the target language for examples in README?",
    "body": "The code examples in the README do not make it obvious how to set the language of the audio to transcribe. \r\n\r\nThe default settings create garbled english text if the audio language is different.",
    "url": "https://github.com/huggingface/distil-whisper/issues/130",
    "state": "open",
    "labels": [],
    "created_at": "2024-05-01T11:52:00Z",
    "updated_at": "2024-05-22T11:59:09Z",
    "user": "clstaudt"
  },
  {
    "repo": "huggingface/transformers",
    "number": 30596,
    "title": "AutoModal how to enable TP for extremly large models?",
    "body": "Hi, I have 8V100s, but a single one can not fit InternVL1.5 model which has 28B parameters.\r\n\r\nSo that, I just wonder if I can fit all of them into 8 V100 with TP?\r\n\r\nI found that Deepspeed can be used to do tensor parallel like this:\r\n\r\n```\r\n# create the model\r\nif args.pre_load_checkpoint:\r\n    model = model_class.from_pretrained(args.model_name_or_path)\r\nelse:\r\n    model = model_class()\r\n...\r\n\r\nimport deepspeed\r\n\r\n# Initialize the DeepSpeed-Inference engine\r\nds_engine = deepspeed.init_inference(model,\r\n                                 tensor_parallel={\"tp_size\": 2},\r\n                                 dtype=torch.half,\r\n                                 checkpoint=None if args.pre_load_checkpoint else args.checkpoint_json,\r\n                                 replace_with_kernel_inject=True)\r\nmodel = ds_engine.module\r\noutput = model('Input String')\r\n```\r\n\r\nI didn't succeed because of it just support built in model which can be imported, but for custom model which have to `fromPretrained` it does support.\r\n\r\nBut as I mentioned at start, my V100 will OOM when load model.\r\n\r\nDoes there any convenient way to loading hf model which is customized with tp enable ?",
    "url": "https://github.com/huggingface/transformers/issues/30596",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-01T10:06:45Z",
    "updated_at": "2024-06-09T08:03:23Z",
    "user": "MonolithFoundation"
  },
  {
    "repo": "huggingface/transformers",
    "number": 30595,
    "title": "i cannot find the code that transformers trainer model_wrapped by deepspeed , i can find the theory about model_wrapped was wraped by DDP(Deepspeed(transformer model )) ,but i only find the code transformers model wrapped by ddp, where is the deepspeed wrapped ? thanks ^-^ ",
    "body": "### System Info\n\ni cannot find the code that transformers trainer model_wrapped by deepspeed , i can find the theory about model_wrapped was wraped by DDP(Deepspeed(transformer model )) ,but i only find the code transformers model wrapped by ddp, where is the deepspeed wrapped ? thanks ^-^ \n\n### Who can help?\n\ni cannot find the code that transformers trainer model_wrapped by deepspeed , i can find the theory about model_wrapped was wraped by DDP(Deepspeed(transformer model )) ,but i only find the code transformers model wrapped by ddp, where is the deepspeed wrapped ? thanks ^-^ \n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\ni cannot find the code that transformers trainer model_wrapped by deepspeed , i can find the theory about model_wrapped was wraped by DDP(Deepspeed(transformer model )) ,but i only find the code transformers model wrapped by ddp, where is the deepspeed wrapped ? thanks ^-^ \n\n### Expected behavior\n\ni cannot find the code that transformers trainer model_wrapped by deepspeed , i can find the theory about model_wrapped was wraped by DDP(Deepspeed(transformer model )) ,but i only find the code transformers model wrapped by ddp, where is the deepspeed wrapped ? thanks ^-^ ",
    "url": "https://github.com/huggingface/transformers/issues/30595",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-01T09:17:58Z",
    "updated_at": "2024-05-01T09:31:39Z",
    "user": "ldh127"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 732,
    "title": "What does \"Error: failed to call OrtRun(). error code = 6.\" mean? I know it is ONNX related, but how to fix?",
    "body": "### Question\n\nI keep running into the same issue when using transformers.js Automatic Speech Recognition pipeline. I've tried solving it multiple ways. But pretty much hit a wall every time. I've done lots of googling, LLMs, and used my prior knowledge of how this stuff functions in python. But I can't seem to get it to work.\r\n\r\nI've tried setting up my environment with and without vite. I've tried with react javascript. I've tried with with react typescript. Nothing.\r\n\r\nAm i missing a dependency or something? is there a place I can find what the error code means? because I couldn't find it anywhere.\r\n\r\nI've fed it an array. I've fed it a .wav file. Nothing works. No matter what I do. No matter if it's an array or a wav file. I always get the same error:\r\n```\r\nAn error occurred during model execution: \"Error: failed to call OrtRun(). error code = 6.\".\r\nInputs given to model: {input_features: Proxy(Tensor)}\r\nError transcribing audio: Error: failed to call OrtRun(). error code = 6.\r\n    at e.run (wasm-core-impl.ts:392:1)\r\n    at e.run (proxy-wrapper.ts:212:1)\r\n    at e.OnnxruntimeWebAssemblySessionHandler.run (session-handler.ts:99:1)\r\n    at InferenceSession.run (inference-session-impl.ts:108:1)\r\n    at sessionRun (models.js:207:1)\r\n    at encoderForward (models.js:520:1)\r\n    at Function.seq2seqForward [as _forward] (models.js:361:1)\r\n    at Function.forward (models.js:820:1)\r\n    at Function.seq2seqRunBeam [as _runBeam] (models.js:480:1)\r\n    at Function.runBeam (models.js:1373:1)\r\n ```\r\n \r\nIt seems to be a ONNX Runtime issue. But don't know how to fix it. Any guidance will be appreciated.\r\n\r\nNote: I'm currently testing with English. Nothing fancy.",
    "url": "https://github.com/huggingface/transformers.js/issues/732",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-05-01T07:01:06Z",
    "updated_at": "2024-05-11T09:18:35Z",
    "user": "jquintanilla4"
  },
  {
    "repo": "huggingface/transformers",
    "number": 30591,
    "title": "i cannot find the code that transformers trainer model_wrapped by deepspeed , i can find the theory about  model_wrapped was wraped by DDP(Deepspeed(transformer model )) ,but i only find the code transformers model wrapped by ddp, where is the deepspeed wrapped ? thanks ^-^ ",
    "body": "### Feature request\r\n\r\ni cannot find the code that transformers trainer model_wrapped by deepspeed , i can find the theory about  model_wrapped was wraped by DDP(Deepspeed(transformer model )) ,but i only find the code transformers model wrapped by ddp, where is the deepspeed wrapped ? thanks ^-^ \r\n\r\n### Motivation\r\n\r\nx\r\n\r\n### Your contribution\r\n\r\nx",
    "url": "https://github.com/huggingface/transformers/issues/30591",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-01T04:27:47Z",
    "updated_at": "2024-06-08T08:03:17Z",
    "user": "ldh127"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1093,
    "title": "I want to get the html of a website https://bit.ly/4bgmLb9 in huggingchat web search",
    "body": "I want to get the html of a website https://bit.ly/4bgmLb9 in hugging-chat web search. In chrome, I can put https://bit.ly/4bgmLb9 in the address bar and get the result. But I do not know how to do that in hugging-chat web search?\r\n\r\nI try in hugging-chat and the screenshot \r\n![tmp](https://github.com/huggingface/chat-ui/assets/124528204/89ca5f28-9dc9-479c-a6f0-9c096e8ea0d6)\r\n\r\nhow to write the prompt so that huggingchat can fullfill the requirement",
    "url": "https://github.com/huggingface/chat-ui/issues/1093",
    "state": "closed",
    "labels": [],
    "created_at": "2024-05-01T03:00:29Z",
    "updated_at": "2024-05-02T14:26:16Z",
    "comments": 1,
    "user": "ghost"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2756,
    "title": "Upgrade pyarrow to 16?",
    "body": "Release notes here: https://arrow.apache.org/blog/2024/04/20/16.0.0-release/\r\n\r\nAre we affected by any change? Does it enable something for us?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2756",
    "state": "open",
    "labels": [
      "question",
      "dependencies",
      "P2"
    ],
    "created_at": "2024-04-30T10:20:45Z",
    "updated_at": "2024-04-30T16:19:31Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2798,
    "title": "Convert torchscript model to tensorrt",
    "body": "Can I convert the torchscript model to tensorrt format through torch_tensorrt? Is there any corresponding script that you can give me for reference?",
    "url": "https://github.com/pytorch/TensorRT/issues/2798",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-30T08:11:09Z",
    "updated_at": "2024-04-30T20:59:03Z",
    "user": "pengxin233"
  },
  {
    "repo": "huggingface/peft",
    "number": 1693,
    "title": "How to convert a loha safetensor trained from diffusers to webui format",
    "body": "Hello, when I finetune SDXL (actually that is InstantID) with PEFT method, I use lora\u3001loha and lokr for  PEFT in [diffuser](https://github.com/huggingface/diffusers).\r\nI have a question, how to convert a loha safetensor trained from diffusers to webui format\uff1f\r\nIn the training process:\r\nthe loading way:\r\n`peft_config  = LoHaConfig(\r\n            r=args.rank,\r\n            alpha=args.rank //2,\r\n            target_modules=[\"to_k\", \"to_q\", \"to_v\", \"to_out.0\"],\r\n        ) `\r\n`unet = get_peft_model(unet, peft_config)\r\n`\r\nwhen train process finished, the saving way as:\r\n`unet.save_pretrained(args.output_dir)`\r\n\r\nand I get the safetensor as\r\n![image](https://github.com/KohakuBlueleaf/LyCORIS/assets/61881733/f71caa9a-4935-40f8-84fb-0a18d19991ac)\r\n\r\nBut [webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui/) can't recognize it, I can't use it in webui.\r\n\r\nHow can I fix this promblem!\r\n",
    "url": "https://github.com/huggingface/peft/issues/1693",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-30T07:17:48Z",
    "updated_at": "2024-06-08T15:03:44Z",
    "user": "JIAOJIAYUASD"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 579,
    "title": "[User Experience] User does not know what is expected by prompts",
    "body": "@ali-khosh user report:\r\n\r\nI\u2019m being asked \u201cDo you want to enter a system prompt? Enter y for yes and anything else for no.\u201d not sure what this means. When I hit yes, it asks \u201cwhat is your system prompt?\u201d still don\u2019t know what that means. I entered \u201chello my name is\u201d and it\u2019s now asking me for \u201cUser:\u201d no clue what that is. I entered some text. And it\u2019s thinking, without doing anything, or telling me I should wait. I gave up after ~10 minutes, killed the process, and tried again this time answering no to that question. It again asked me for \u201cUser:\u201d, I typed \u201cali\u201d and have been waiting for some time with no response from my laptop. ",
    "url": "https://github.com/pytorch/torchchat/issues/579",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-30T06:39:23Z",
    "updated_at": "2024-04-30T06:39:50Z",
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 575,
    "title": "unimplemented operators - workarounds and long term perspective",
    "body": "Today users have to set PYTORCH_ENABLE_MPS_FALLBACK=1 when they call torchchat if they want to use _weight_int4pack_mm.  Can we set that automatically, from inside the program.  This is a crude workaround, maybe we can get an implementation of _weight_int4pack_mm for MPS? (This would also be goodness for mobile.)\r\n",
    "url": "https://github.com/pytorch/torchchat/issues/575",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-30T05:58:13Z",
    "updated_at": "2024-07-30T20:44:26Z",
    "comments": 0,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 565,
    "title": "[LAUNCH BLOCKER] Llama3 8B Instruct model hangs on chat",
    "body": "(.venv) (base) mikekg@mikekg-mbp torchchat % # Llama 3 8B Instruct\r\npython3 torchchat.py chat llama3\r\nzsh: command not found: #\r\nUsing device=cpu Apple M1 Max\r\nLoading model...\r\nTime to load model: 10.23 seconds\r\nEntering Chat Mode. Will continue chatting back and forth with the language model until the models max context length of 8192 tokens is hit or until the user says /bye\r\nDo you want to enter a system prompt? Enter y for yes and anything else for no. \r\ny\r\nWhat is your system prompt? \r\nYou are a techer and you treat every interaction as a teachable moment, providing lots of unrequested extra info\r\nUser: what are the 7 continents\r\n\r\n",
    "url": "https://github.com/pytorch/torchchat/issues/565",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-29T22:15:12Z",
    "updated_at": "2024-04-29T22:42:26Z",
    "comments": 2,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 561,
    "title": "[FEATURE REQUEST]  raise connection error fails download / we don't offer. plan b, or a way to resume",
    "body": "so, does this have a common error instruction?  Should we tell people to download another model if they can\u2019t get Meta approval, or there\u2019s an error like in my case?\r\n\r\nAlso, this engineer having been on the slwo end of a pipe before.... are there any instructions how to resume a failed download that's say, frustratingly 95% complete?  Or am I don't and I need to load the whole thing again?\r\n(If there's no way to retsart, ok.  Also, if I'm on a slow pipe I would like to retry more often and get a byute at a time, per retry if that's what I need)\r\n\r\n```\r\nFile \"/Users/mikekg/test/torchchat/.venv/lib/python3.12/site-packages/tqdm/std.py\", line 1181, in _iter_\r\n    for obj in iterable:\r\n  File \"/Users/mikekg/miniconda3/lib/python3.12/concurrent/futures/_base.py\", line 619, in result_iterator\r\n    yield _result_or_cancel(fs.pop())\r\n          ^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/miniconda3/lib/python3.12/concurrent/futures/_base.py\", line 317, in _result_or_cancel\r\n    return fut.result(timeout)\r\n           ^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/miniconda3/lib/python3.12/concurrent/futures/_base.py\", line 456, in result\r\n    return self.__get_result()\r\n           ^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/miniconda3/lib/python3.12/concurrent/futures/_base.py\", line 401, in __get_result\r\n    raise self._exception\r\n  File \"/Users/mikekg/miniconda3/lib/python3.12/concurrent/futures/thread.py\", line 58, in run\r\n    result = self.fn(*self.args, **self.kwargs)\r\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/test/torchchat/.venv/lib/python3.12/site-packages/huggingface_hub/_snapshot_download.py\", line 290, in _inner_hf_hub_download\r\n    return hf_hub_download(\r\n           ^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/test/torchchat/.venv/lib/python3.12/site-packages/huggingface_hub/utils/_validators.py\", line 119, in _inner_fn\r\n    return fn(*args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/test/torchchat/.venv/lib/python3.12/site-packages/huggingface_hub/file_download.py\", line 1492, in hf_hub_download\r\n    http_get(\r\n  File \"/Users/mikekg/test/torchchat/.venv/lib/python3.12/site-packages/huggingface_hub/file_download.py\", line 552, in http_get\r\n    return http_get(\r\n           ^^^^^^^^^\r\n  File \"/Users/mikekg/test/torchchat/.venv/lib/python3.12/site-packages/huggingface_hub/file_download.py\", line 552, in http_get\r\n    return http_get(\r\n           ^^^^^^^^^\r\n  File \"/Users/mikekg/test/torchchat/.venv/lib/python3.12/site-packages/huggingface_hub/file_download.py\", line 552, in http_get\r\n    return http_get(\r\n           ^^^^^^^^^\r\n  [Previous line repeated 1 more time]\r\n  File \"/Users/mikekg/test/torchchat/.venv/lib/python3.12/site-packages/huggingface_hub/file_download.py\", line 456, in http_get\r\n    r = _request_wrapper(\r\n        ^^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/test/torchchat/.venv/lib/python3.12/site-packages/huggingface_hub/file_download.py\", line 392, in _request_wrapper\r\n    response = get_session().request(method=method, url=url, **params)\r\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/test/torchchat/.venv/lib/python3.12/site-packages/requests/sessions.py\", line 589, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/test/torchchat/.venv/lib/python3.12/site-packages/requests/sessions.py\", line 703, in send\r\n    r = adapter.send(request, **kwargs)\r\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/test/torchchat/.venv/lib/python3.12/site-packages/huggingface_hub/utils/_http.py\", line 68, in send\r\n    return super().send(request, *args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/test/torchchat/.venv/lib/python3.12/site-packages/requests/adapters.py\", line 519, in send\r\n    raise ConnectionError(e, request=request)\r\nrequests.exceptions.ConnectionError: (MaxRetryError('HTTPSConnectionPool(host=\\'[cdn-lfs-us-1.huggingface.co](http://cdn-lfs-us-1.huggingface.co/)\\', port=443): Max retries exceeded with url: /repos/55/ac/55acddbb5c2ac2041b89a858eeba82e6130c6160294d75fe51bfa8bd7a4e4518/be52262c9289304f3e8240e0749bf257bc04264405a86cd4de38efb9068724ee?response-content-disposition=attachment%3B+filename*%3DUTF-8%27%27consolidated.00.pth%3B+filename%3D%22consolidated.00.pth%22%3B&Expires=1714684610&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcxNDY4NDYxMH19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy11cy0xLmh1Z2dpbmdmYWNlLmNvL3JlcG9zLzU1L2FjLzU1YWNkZGJiNWMyYWMyMDQxYjg5YTg1OGVlYmE4MmU2MTMwYzYxNjAyOTRkNzVmZTUxYmZhOGJkN2E0ZTQ1MTgvYmU1MjI2MmM5Mjg5MzA0ZjNlODI0MGUwNzQ5YmYyNTdiYzA0MjY0NDA1YTg2Y2Q0ZGUzOGVmYjkwNjg3MjRlZT9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSoifV19&Signature=IroiN6zXZ5iOHhJDLMhkzINjI11juBcZpCX0B6Q4iBrlcWwJ2oXA6~hKRp0uqo34u3AHE1LPI7sxss3HV8ICqNUtKJ9~5u0bWjoqSh7eqn1xqJ77Drg5BmnCKYSB2sF-5QBC2tMM~PKfaE7AeieeFD73Pz3JQomD7EnFe5veAxHKQxGT8WD2bMMy4lx5r5",
    "url": "https://github.com/pytorch/torchchat/issues/561",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-29T21:36:59Z",
    "updated_at": "2024-05-12T20:45:02Z",
    "comments": 1,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 474,
    "title": "How to fully load checkpointed weights in memory? ",
    "body": "### System Info\r\n\r\n\r\n- `transformers` version: 4.40.0\r\n- Platform: Linux-5.15.0-105-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.12\r\n- Huggingface_hub version: 0.22.2\r\n- Safetensors version: 0.4.1\r\n- Accelerate version: 0.25.0\r\n- Accelerate config:    not found\r\n- PyTorch version (GPU?): 2.2.2+cu121 (True)\r\n- Tensorflow version (GPU?): 2.16.1 (True)\r\n- Flax version (CPU?/GPU?/TPU?): 0.8.2 (cpu)\r\n- Jax version: 0.4.26\r\n- JaxLib version: 0.4.21\r\n\r\n### Reproduction\r\n\r\n1. Load a checkpointed `.safetensor` file using `safetensors.torch.load_file` API in the CPU memory. \r\n2. Negligible increase in the CPU memory usage\r\n\r\n### Expected behavior\r\n\r\nThe CPU memory should increase by exactly the size of the file being read. \r\n\r\nI think the negligible increase in the CPU memory might be the expected behavior, due to safetensors' lazy loading feature? However if I want to load the entire model in host memory, is there another way to do that? I am running some benchmarks with safetensor APIs, and need to ensure that the model is fully loaded in the CPU memory. ",
    "url": "https://github.com/huggingface/safetensors/issues/474",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-29T21:30:37Z",
    "updated_at": "2024-04-30T22:12:29Z",
    "user": "goelayu"
  },
  {
    "repo": "pytorch/data",
    "number": 1247,
    "title": "[StatefulDataLoader] macOS tests are too slow",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\ntest_state_dict is very slow on macOS (and slows down CI), likely because of macOS default multiprocessing_context being spawn instead of fork. The StatefulDataLoader tests on macOS take ~1.5 hours, vs 10 minutes on Linux and Windows. \r\n\r\nExample of test-runtimes on my local mac:\r\n\r\n<img width=\"870\" alt=\"image\" src=\"https://github.com/pytorch/data/assets/5349063/8f881702-e812-4e2c-b61e-efac8596054b\">\r\n\r\nWe should a) update CI to log test times, b) for macOS, drop some of the tests. Each test_mp* test runs 6x, and if we have coverage from Linux + Win then we probably don't need all of them for mac\r\n\r\n### Versions\r\n\r\nNightly",
    "url": "https://github.com/meta-pytorch/data/issues/1247",
    "state": "closed",
    "labels": [
      "stateful_dataloader"
    ],
    "created_at": "2024-04-29T18:10:35Z",
    "updated_at": "2024-04-30T19:11:57Z",
    "comments": 0,
    "user": "andrewkho"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2754,
    "title": "Return partial dataset-hub-cache instead of error?",
    "body": "`dataset-hub-cache` depends on multiple previous steps, and any error in one of them makes it fail. It provokes things like https://github.com/huggingface/moon-landing/issues/9799 (internal): in the datasets list, a dataset is not marked as \"supporting the dataset viewer\", whereas the only issue is that we didn't manage to list the compatible libraries, to create the tags.\r\n\r\nhttps://github.com/huggingface/dataset-viewer/blob/main/services/worker/src/worker/job_runners/dataset/hub_cache.py\r\n\r\nIn this case, we could return a partial response, or maybe return an empty list of libraries or modalities if we have an error.\r\n\r\nWhat do you think @lhoestq?\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2754",
    "state": "closed",
    "labels": [
      "question",
      "P2"
    ],
    "created_at": "2024-04-29T17:10:09Z",
    "updated_at": "2024-06-13T13:57:20Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 549,
    "title": "[CI] add dtype tests for runner-aoti and runner-et",
    "body": "\r\nWe are reverting ##539 which added more dtype tests for runner-aoti + runner-et,\r\nbecause of fails - there's no point in having failing tests.  That being said, we should figure out which ones should work, and if they don't today, how to make them work.",
    "url": "https://github.com/pytorch/torchchat/issues/549",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-29T16:42:19Z",
    "updated_at": "2024-04-29T18:01:09Z",
    "comments": 2,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 547,
    "title": "Can we make sure native runner binary commands in README work directly as written?",
    "body": "It would be great if\r\n\r\n```\r\ncmake-out/aoti_run model.so -z tokenizer.model -l 3 -i \"Once upon a time\"\r\n```\r\n\r\nand\r\n\r\n```\r\ncmake-out/et_run llama3.pte -z tokenizer.model -l 3 -i \"Once upon a time\"\r\n```\r\n\r\nwere changed to include a known location of a model.so and tokenizer.model file. For example, include download and export instructions directly before it or those downloaded before in the README file.\r\n\r\ncc @byjlw @mikekgfb ",
    "url": "https://github.com/pytorch/torchchat/issues/547",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-29T15:33:15Z",
    "updated_at": "2024-05-12T21:03:08Z",
    "comments": 1,
    "user": "orionr"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 546,
    "title": "Move legal disclaimer down to license section?",
    "body": "I think we can move\r\n\r\nDisclaimer: The torchchat Repository Content is provided without any guarantees about performance or compatibility. In particular, torchchat makes available model architectures written in Python for PyTorch that may not perform in the same manner or meet the same standards as the original versions of those models. When using the torchchat Repository Content, including any model architectures, you are solely responsible for determining the appropriateness of using or redistributing the torchchat Repository Content and assume any risks associated with your use of the torchchat Repository Content or any models, outputs, or results, both alone and in combination with any other technologies. Additionally, you may have other legal obligations that govern your use of other content, such as the terms of service for third-party models, weights, data, or other technologies, and you are solely responsible for complying with all such obligations.\r\n\r\ndown to the bottom of the license section? Having it at so close to the top is likely not required? Check with others, though. Thanks\r\n\r\ncc @mikekgfb ",
    "url": "https://github.com/pytorch/torchchat/issues/546",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-29T15:29:37Z",
    "updated_at": "2024-05-12T21:06:46Z",
    "comments": 1,
    "user": "orionr"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6848,
    "title": "Cant Downlaod Common Voice 17.0 hy-AM ",
    "body": "### Describe the bug\r\n\r\nI want to download Common Voice 17.0 hy-AM but it returns an error. \r\n```\r\n\r\nThe version_base parameter is not specified.\r\nPlease specify a compatability version level, or None.\r\nWill assume defaults for version 1.1\r\n  @hydra.main(config_name='hfds_config', config_path=None)\r\n/usr/local/lib/python3.10/dist-packages/hydra/_internal/hydra.py:119: UserWarning: Future Hydra versions will no longer change working directory at job runtime by default.\r\nSee https://hydra.cc/docs/1.2/upgrades/1.1_to_1.2/changes_to_job_working_dir/ for more information.\r\n  ret = run_job(\r\n/usr/local/lib/python3.10/dist-packages/datasets/load.py:1429: FutureWarning: The repository for mozilla-foundation/common_voice_17_0 contains custom code which must be executed to correctly load the dataset. You can inspect the repository content at https://hf.co/datasets/mozilla-foundation/common_voice_17_0\r\nYou can avoid this message in future by passing the argument `trust_remote_code=True`.\r\nPassing `trust_remote_code=True` will be mandatory to load this dataset from the next major release of `datasets`.\r\n  warnings.warn(\r\nReading metadata...: 6180it [00:00, 133224.37it/s]les/s]\r\nGenerating train split: 0 examples [00:00, ? examples/s]\r\nHuggingFace datasets failed due to some reason (stack trace below).\r\nFor certain datasets (eg: MCV), it may be necessary to login to the huggingface-cli (via `huggingface-cli login`).\r\nOnce logged in, you need to set `use_auth_token=True` when calling this script.\r\n\r\nTraceback error for reference :\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 1743, in _prepare_split_single\r\n    example = self.info.features.encode_example(record) if self.info.features is not None else record\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/features/features.py\", line 1878, in encode_example\r\n    return encode_nested_example(self, example)\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/features/features.py\", line 1243, in encode_nested_example\r\n    {\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/features/features.py\", line 1243, in <dictcomp>\r\n    {\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/utils/py_utils.py\", line 326, in zip_dict\r\n    yield key, tuple(d[key] for d in dicts)\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/utils/py_utils.py\", line 326, in <genexpr>\r\n    yield key, tuple(d[key] for d in dicts)\r\nKeyError: 'sentence_id'\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"/workspace/nemo/scripts/speech_recognition/convert_hf_dataset_to_nemo.py\", line 358, in main\r\n    dataset = load_dataset(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/load.py\", line 2549, in load_dataset\r\n    builder_instance.download_and_prepare(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 1005, in download_and_prepare\r\n    self._download_and_prepare(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 1767, in _download_and_prepare\r\n    super()._download_and_prepare(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 1100, in _download_and_prepare\r\n    self._prepare_split(split_generator, **prepare_split_kwargs)\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 1605, in _prepare_split\r\n    for job_id, done, content in self._prepare_split_single(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 1762, in _prepare_split_single\r\n    raise DatasetGenerationError(\"An error occurred while generating the dataset\") from e\r\ndatasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset\r\n```\r\n\r\n### Steps to reproduce the bug\r\n\r\n```\r\nfrom datasets import load_dataset\r\n\r\ncv_17 = load_dataset(\"mozilla-foundation/common_voice_17_0\", \"hy-AM\")\r\n```\r\n\r\n### Expected behavior\r\n\r\nIt works fine with common_voice_16_1\r\n\r\n### Environment info\r\n\r\n- `datasets` version: 2.18.0\r\n- Platform: Linux-5.15.0-1042-nvidia-x86_64-with-glibc2.35\r\n- Python version: 3.11.6\r\n- `huggingface_hub` version: 0.22.2\r\n- PyArrow version: 15.0.2\r\n- Pandas version: 2.2.2\r\n- `fsspec` version: 2024.2.0",
    "url": "https://github.com/huggingface/datasets/issues/6848",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-29T10:06:02Z",
    "updated_at": "2025-04-01T20:48:09Z",
    "comments": 3,
    "user": "mheryerznkanyan"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1839,
    "title": "why does ORTModelForCausalLM assume new input length is 1 when past_key_values is passed",
    "body": "https://github.com/huggingface/optimum/blob/c55f8824f58db1a2f1cfc7879451b4743b8f206b/optimum/onnxruntime/modeling_decoder.py#L649\r\n\r\n``` python\r\n    def prepare_inputs_for_generation(self, input_ids, past_key_values=None, **kwargs):\r\n        if past_key_values is not None:\r\n            past_length = past_key_values[0][0].shape[2]\r\n            # Some generation methods already pass only the last input ID\r\n            if input_ids.shape[1] > past_length:\r\n                remove_prefix_length = past_length\r\n            else:\r\n                # Default to old behavior: keep only final ID\r\n                remove_prefix_length = input_ids.shape[1] - 1\r\n            input_ids = input_ids[:, remove_prefix_length:]\r\n\r\n```\r\n\r\nwhile in non-onnx modeling, it's not.\r\n\r\nhttps://github.com/huggingface/transformers/blob/a98c41798cf6ed99e1ff17e3792d6e06a2ff2ff3/src/transformers/models/mistral/modeling_mistral.py#L1217\r\n\r\n```python\r\n            # Keep only the unprocessed tokens:\r\n            # 1 - If the length of the attention_mask exceeds the length of input_ids, then we are in a setting where\r\n            # some of the inputs are exclusively passed as part of the cache (e.g. when passing input_embeds as\r\n            # input)\r\n            if attention_mask is not None and attention_mask.shape[1] > input_ids.shape[1]:\r\n                input_ids = input_ids[:, -(attention_mask.shape[1] - past_length) :]\r\n            # 2 - If the past_length is smaller than input_ids', then input_ids holds all input tokens. We can discard\r\n            # input_ids based on the past_length.\r\n            elif past_length < input_ids.shape[1]:\r\n                input_ids = input_ids[:, past_length:]\r\n```",
    "url": "https://github.com/huggingface/optimum/issues/1839",
    "state": "open",
    "labels": [
      "question",
      "onnxruntime"
    ],
    "created_at": "2024-04-29T07:06:04Z",
    "updated_at": "2024-10-14T12:28:51Z",
    "user": "cyh-ustc"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7813,
    "title": "I feel confused about this TODO issue. how to pass timesteps as tensors? ",
    "body": "https://github.com/huggingface/diffusers/blob/235d34cf567e78bf958344d3132bb018a8580295/src/diffusers/models/unets/unet_2d_condition.py#L918\r\n\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/7813",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-04-29T03:46:21Z",
    "updated_at": "2024-11-23T00:19:17Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 544,
    "title": "[DOCS, TESTS] quantization option table & quantization option table testing",
    "body": "can we pin down the details for this, because this update is too generous and doesn't represent the swiss cheese that is the support matrix?\r\n\r\nI seem to recall some operators didn't have the full set of group sizes - the group sizes are just an enumeration of powers of 2, did we test them?  (I can't say the other table was useful w.r.t to what to expect in eager, compile, AOTI, ET.  (We list compile as a separate category for eager, not withstanding torch.compile is supported by a bunch of different compilers all of which may have a different answer...I guess much like ET ~ XNNPACK, compile ~ Inductor...)\r\n\r\nWe should also ensure that we have a test for each claimed supported config in periodic.yml\r\n",
    "url": "https://github.com/pytorch/torchchat/issues/544",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-29T03:37:26Z",
    "updated_at": "2024-05-12T22:58:14Z",
    "comments": 2,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 543,
    "title": "[PAPERCUTS] error message repeated ad nauseam",
    "body": "I get it -- maybe the error is `aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor' to its out variant with error: 'SchemaKind.out variant of operator aten::_weight_int4pack_mm can't be found. We've found the schemas of all the overloads: ['aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor']'`\r\n\r\nSeriously, though - I got it after the first error meesage about that, and certainly after the 5th?  I'll assume it's for each call site?  It's probably onerus to keep track of every error, especially at the point where the error is emitted.  But I presume the message goes thru a common reporting site... maybe we can just keep track of the previous error message, and if it's the same as the immediately precedcing, we start a counter and emit \r\n[repeated n times] when the error changes.\r\n\r\nOr we compute a hash of each message, and add up counts for all messages after the first error, dumping a second instance at the end with a count?\r\n\r\nOne more thing -- can we put a filename and an error line?  I recall that Soumith said in another meeting that we have that info for IR traces?\r\n\r\n```\r\n(py311) mikekg@mikekg-mbp torchchat %  python export.py --checkpoint-path ${MODEL_PATH} --temperature 0  --quantize '{\"linear:int4\": {\"groupsize\": 128}}' --output-pte mode.pte\r\n[...]\r\n   %aten__weight_int4pack_mm_default_42 : [num_users=1] = call_function[target=executorch.exir.dialects.edge._ops.aten._weight_int4pack_mm.default](args = (%aten_view_copy_default_144, %b_output_weight, 128, %b_output_scales_and_zeros), kwargs = {})\r\n    %aten_view_copy_default_145 : [num_users=1] = call_function[target=executorch.exir.dialects.edge._ops.aten.view_copy.default](args = (%aten__weight_int4pack_mm_default_42, [1, 1, 32000]), kwargs = {})\r\n    return (getitem_1, getitem_2, getitem_4, getitem_5, getitem_7, getitem_8, getitem_10, getitem_11, getitem_13, getitem_14, getitem_16, getitem_17, aten_view_copy_default_145)\r\nWARNING:executorch.backends.xnnpack.partition.xnnpack_partitioner:Nothing can be partitioned!\r\nINFO:root:Failed converting '<EdgeOpOverload: aten._weight_int4pack_mm.default>: schema = aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor' to its out variant with error: 'SchemaKind.out variant of operator aten::_weight_int4pack_mm can't be found. We've found the schemas of all the overloads: ['aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor']'\r\nINFO:root:Failed converting '<EdgeOpOverload: aten._weight_int4pack_mm.default>: schema = aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor' to its out variant with error: 'SchemaKind.out variant of operator aten::_weight_int4pack_mm can't be found. We've found the schemas of all the overloads: ['aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor']'\r\nINFO:root:Failed converting '<EdgeOpOverload: aten._weight_int4pack_mm.default>: schema = aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor' to its out variant with error: 'SchemaKind.out variant of operator aten::_weight_int4pack_mm can't be found. We've found the schemas of all the overloads: ['aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor']'\r\nINFO:root:Failed converting '<EdgeOpOverload: aten._weight_int4pack_mm.default>: schema = aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor' to its out variant with error: 'SchemaKind.out variant of operator aten::_weight_int4pack_mm can't be found. We've found the schemas of all the overloads: ['aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor']'\r\nINFO:root:Failed converting '<EdgeOpOverload: aten._weight_int4pack_mm.default>: schema = aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor' to its out variant with error: 'SchemaKind.out variant of operator aten::_weight_int4pack_mm can't be found. We've found the schemas of all the overloads: ['aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor']'\r\nINFO:root:Failed converting '<EdgeOpOverload: aten._weight_int4pack_mm.default>: schema = aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor' to its out variant with error: 'SchemaKind.out variant of operator aten::_weight_int4pack_mm can't be found. We've found the schemas of all the overloads: ['aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor']'\r\nINFO:root:Failed converting '<EdgeOpOverload: aten._weight_int4pack_mm.default>: schema = aten::_weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor q",
    "url": "https://github.com/pytorch/torchchat/issues/543",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-29T03:22:01Z",
    "updated_at": "2024-08-30T15:19:47Z",
    "comments": 1,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 542,
    "title": "linear:int4 issues - RuntimeError: Missing out variants: {'aten::_weight_int4pack_mm'}",
    "body": "```\r\n(py311) mikekg@mikekg-mbp torchchat %  python export.py --checkpoint-path ${MODEL_PATH} --temperature 0  --quantize '{\"linear:int4\": {\"groupsize\": 128}}' --output-pte mode.pte\r\n[...]\r\nTraceback (most recent call last):\r\n  File \"/Users/mikekg/qops/torchchat/export.py\", line 111, in <module>\r\n    main(args)\r\n  File \"/Users/mikekg/qops/torchchat/export.py\", line 91, in main\r\n    export_model_et(\r\n  File \"/Users/mikekg/qops/torchchat/export_et.py\", line 98, in export_model\r\n    export_program = edge_manager.to_executorch(\r\n                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/miniconda3/envs/py311/lib/python3.11/site-packages/executorch/exir/program/_program.py\", line 899, in to_executorch\r\n    new_gm_res = p(new_gm)\r\n                 ^^^^^^^^^\r\n  File \"/Users/mikekg/miniconda3/envs/py311/lib/python3.11/site-packages/torch/fx/passes/infra/pass_base.py\", line 40, in __call__\r\n    res = self.call(graph_module)\r\n          ^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/mikekg/miniconda3/envs/py311/lib/python3.11/site-packages/executorch/exir/passes/__init__.py\", line 423, in call\r\n    raise RuntimeError(f\"Missing out variants: {missing_out_vars}\")\r\nRuntimeError: Missing out variants: {'aten::_weight_int4pack_mm'}\r\n```\r\n\r\nCurrent fail is expected -- somewhat anyway after adding the packed call to the _weight_int4pack_mm but documented incorrectly in docs/quantization.md.  I think @lucylq most recently updated the specs to streamline them but that glossed over the reality that we have a bit of a swiss cheese situation.  That's sad and not pretty to show, but sadly our current reality\r\n\r\nI'll try to patch up most execution modes, but we really do need tests.  And for performance, maybe the plan should be to hook up _weight_int4pack_mm to an asymmetric version of a8w4dq (as per https://github.com/pytorch/torchchat/issues/541). \r\nOf course that's also not quite \"correct\", but how many modes and operators can we put with how much documentation?  FP operators already have a bit of a spread in terms of accruacy based on rounding effects, so maybe that's justifiable...\r\n",
    "url": "https://github.com/pytorch/torchchat/issues/542",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-29T03:03:40Z",
    "updated_at": "2024-07-30T17:36:20Z",
    "comments": 0,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/serve",
    "number": 3120,
    "title": "If micro_batch_size of micro-batch is set to 1, then model inference is still batch processing?",
    "body": "### \ud83d\udcda The doc issue\n\nI set the batchSize of the registered model to 10, and then set the micro_batch_size to 1. So for model inference, will it wait for 10 requests to complete preprocessing in parallel before aggregating them for inference?\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/3120",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-29T02:59:58Z",
    "updated_at": "2024-04-29T18:48:28Z",
    "comments": 1,
    "user": "pengxin233"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 533,
    "title": "[FEATURE REQUEST] 8b weight quantization on ET",
    "body": "\r\nWhat is the best we can do for int8 channel-wise quantization in XNNPACK (and elsewhere in ET) today? I see ATM we use` F.linear(x, weight.to(dtype=x.dtype)) * scales` as implementation in [ET examples](https://www.internalfb.com/code/fbsource/[7e7c1690e5ac43a50e5e17e41321005d126e3faf]/fbcode/executorch/examples/models/llama2/source_transformation/quantize.py?lines=374) and [torchchat](https://github.com/pytorch/torchchat/blob/main/quantize.py#L401). \r\n\r\nThis function works well for CUDA using AOTI (because AOTI + Triton merge the conversion into the operation), but not so much for CPUs where this forces allocation of a full buffer of float weights.  Do we recognize this for XNNPACK and convert into a more efficient primitive?  If not, what should we do to do this?\r\n\r\nOn PT CPU, we now have [torch.ops.aten._weight_int8pack_mm](https://github.com/pytorch/torchchat/blob/main/quantize.py#L403).  If we don't already, can we recognize the idiom and convert it? Or should we generate an executorch op during quantization that is more efficient?  ",
    "url": "https://github.com/pytorch/torchchat/issues/533",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-28T17:02:49Z",
    "updated_at": "2024-07-21T22:14:01Z",
    "comments": 7,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6846,
    "title": "Unimaginable super slow iteration",
    "body": "### Describe the bug\r\n\r\nAssuming there is a dataset with 52000 sentences, each with a length of 500, it takes 20 seconds to extract a sentence from the dataset\u2026\u2026\uff1fIs there something wrong with my iteration?\r\n\r\n### Steps to reproduce the bug\r\n\r\n```python\r\nimport datasets\r\nimport time\r\nimport random\r\n\r\nnum_rows = 52000\r\nnum_cols = 500\r\n\r\nrandom_input = [[random.randint(1, 100) for _ in range(num_cols)] for _ in range(num_rows)]\r\nrandom_output = [[random.randint(1, 100) for _ in range(num_cols)] for _ in range(num_rows)]\r\n\r\n\r\ns=time.time()\r\nd={'random_input':random_input,'random_output':random_output}\r\ndataset=datasets.Dataset.from_dict(d)\r\nprint('from dict',time.time()-s)\r\nprint(dataset)\r\n\r\n\r\nfor i in range(len(dataset)):\r\n    aa=time.time()\r\n    a,b=dataset['random_input'][i],dataset['random_output'][i]\r\n    print(time.time()-aa)\r\n\r\n```\r\n\r\ncorresponding output\r\n```bash\r\nfrom dict 9.215498685836792\r\nDataset({\r\n    features: ['random_input', 'random_output'],\r\n    num_rows: 52000\r\n})\r\n19.129778146743774\r\n19.329464197158813\r\n19.27668261528015\r\n19.28557538986206\r\n19.247620582580566\r\n19.624247074127197\r\n19.28673791885376\r\n19.301053047180176\r\n19.290496110916138\r\n19.291821718215942\r\n19.357765197753906\r\n\r\n```\r\n\r\n### Expected behavior\r\n\r\nUnder normal circumstances, iteration should be very rapid as it does not involve the main tasks other than getting items\r\n\r\n### Environment info\r\n\r\n- `datasets` version: 2.19.0\r\n- Platform: Linux-3.10.0-1160.71.1.el7.x86_64-x86_64-with-glibc2.17\r\n- Python version: 3.10.13\r\n- `huggingface_hub` version: 0.21.4\r\n- PyArrow version: 15.0.0\r\n- Pandas version: 2.2.1\r\n- `fsspec` version: 2024.2.0",
    "url": "https://github.com/huggingface/datasets/issues/6846",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-28T05:24:14Z",
    "updated_at": "2024-05-06T08:30:03Z",
    "comments": 1,
    "user": "rangehow"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 528,
    "title": "[DOCS] runner documentation",
    "body": "\r\n1 - Add llama2/3 options to docs/runner from https://github.com/pytorch/torchchat/pull/486\r\n\r\n2 - Also does the file need a name change because it covers both build and run for the runners?\r\n\r\n3 - Do we have the necessary documentation - how to build the tokenizer.bin?\r\n      That we have to use a different tokenizer for SentencePiece than the Python runners? We can grab some of that from docs/ADVANCED-USERS.md and move it here.\r\n\r\n4 - should we actually split this file?\r\n\r\n5 - we're using stories15M here, should we upgrade to llama3 .\r\n\r\n",
    "url": "https://github.com/pytorch/torchchat/issues/528",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-27T22:24:30Z",
    "updated_at": "2024-07-21T21:38:37Z",
    "comments": 1,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 526,
    "title": "[Better Engineering] Is no KV cache still a thing?",
    "body": "\r\nI put the code there originally, but... wondering whether running models without KV cache is still a thing?\r\nWe don't really offer a way to build it without KV Cache...\r\n\r\nhttps://github.com/pytorch/torchchat/blame/e26c5289453ccac7f4b600babcb40e30634bdeb2/runner/run.cpp#L175-L185\r\n\r\n```\r\n#ifndef __KV_CACHE__\r\n  // @lint-ignore CLANGTIDY facebook-hte-LocalUncheckedArrayBounds\r\n  ManagedTensor tokens_managed(\r\n      &(s->toks[pos]),\r\n      /*ignored*/ sizeof(int64_t) * (pos + 1),\r\n      {1, 1},\r\n      ScalarType::Long);\r\n#else // __KV_CACHE__\r\n  ManagedTensor tokens_managed(\r\n      token_buffer, sizeof(int64_t), {1, 1}, ScalarType::Long);\r\n#endif\r\n```",
    "url": "https://github.com/pytorch/torchchat/issues/526",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-27T22:07:53Z",
    "updated_at": "2024-04-28T14:30:48Z",
    "comments": 0,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/lerobot",
    "number": 112,
    "title": "Do we want to use `transformers`?",
    "body": "I'd really go against establishing transformers as a dependency of lerobot and importing their whole library just to use the `PretrainedConfig` (or even other components). I think in this case it's very overkill and wouldn't necessarily fit our needs right now. The class is ~1000 lines of code - which we can copy into our lib anyway - and looks way more mature and feature-rich than what \u2014 IMO \u2014 we need and have with the rest of our code base.\r\n\r\nCopying code is even part of [Transformers' philosophy](https://huggingface.co/blog/transformers-design-philosophy) \u2014 which we *do* copy.\r\n\r\n_Originally posted by @aliberts in https://github.com/huggingface/lerobot/pull/101#discussion_r1581860998_\r\n            ",
    "url": "https://github.com/huggingface/lerobot/issues/112",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-27T17:24:20Z",
    "updated_at": "2024-04-30T11:59:25Z",
    "user": "qgallouedec"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2849,
    "title": "Transformer tutorial multiplying with sqrt(d_model)",
    "body": "https://github.com/pytorch/tutorials/blob/5e772fa2bf406598103e61e628a0ca0b8e471bfa/beginner_source/translation_transformer.py#L135\r\n\r\nsrc = self.embedding(src) * math.sqrt(self.d_model)\r\n\r\nshouln't this be\r\n\r\nsrc = self.embedding(src) / math.sqrt(self.d_model)\r\n\r\nat least that is the impression I got when reading the \"Attention is all you need\" paper.\r\nOr is there some new research finding that multiplying is better?\r\n\r\n\r\n\n\ncc @sekyondaMeta @svekars @kit1980 @subramen @albanD",
    "url": "https://github.com/pytorch/tutorials/issues/2849",
    "state": "closed",
    "labels": [
      "easy",
      "docathon-h1-2024"
    ],
    "created_at": "2024-04-27T07:45:10Z",
    "updated_at": "2024-06-11T09:15:26Z",
    "comments": 3,
    "user": "RogerJL"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2782,
    "title": "\u2753 [Question] Unexpected exception _Map_base::at during PTQ",
    "body": "## \u2753 Question\r\n\r\nI am attempting to execute [PTQ](https://pytorch.org/TensorRT/user_guide/ptq.html). During the compiling process, I get the following exception: \r\n\r\n```\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Finalize: %142 : Tensor = aten::matmul(%x, %143) # /fsx_home/homes/srdecny/meaning/vocoder/hifigan/hifigan/vec2enc.py:84:0 Set kernel index: 5\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Total number of generated kernels selected for the engine: 7\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Kernel: 0 CASK_STATIC\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Kernel: 1 CASK_STATIC\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Kernel: 2 CASK_STATIC\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Kernel: 3 TRT_SERIALIZABLE:generatedNativePointwise\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Kernel: 4 TRT_SERIALIZABLE:generatedNativePointwise\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Kernel: 5 CASK_STATIC\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Kernel: 6 CASK_STATIC\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Disabling unused tactic source: EDGE_MASK_CONVOLUTIONS\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Disabling unused tactic source: JIT_CONVOLUTIONS\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Engine generation completed in 1.64955 seconds.\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Total per-runner device persistent memory is 0\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Total per-runner host persistent memory is 73616\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Allocated activation device memory of size 33692160\r\nINFO: [Torch-TensorRT TorchScript Conversion Context] - [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +32, now: CPU 0, GPU 888 (MiB)\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - CUDA lazy loading is enabled.\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Calculating Maxima\r\nINFO: [Torch-TensorRT TorchScript Conversion Context] - Starting Calibration.\r\nINFO: [Torch-TensorRT TorchScript Conversion Context] -   Post Processing Calibration data in 8.6e-07 seconds.\r\nDEBUG: [Torch-TensorRT TorchScript Conversion Context] - Assigning tensor scales: (Unnamed Layer* 164) [Concatenation]_output using (Unnamed Layer* 164) [Concatenation]_output [\r\nERROR: [Torch-TensorRT TorchScript Conversion Context] - 1: Unexpected exception _Map_base::at\r\nTraceback (most recent call last):\r\n  File \"/fsx_home/homes/srdecny/meaning/vojta_notebooks/trt_quant_single_v1.py\", line 435, in <module>\r\n    quanted = trt_decoder = torch_tensorrt.compile(\r\n                            ^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/fsx_home/homes/srdecny/meaning/env_bender6_3.11/lib/python3.11/site-packages/torch_tensorrt/_compile.py\", line 185, in compile\r\n    compiled_ts_module: torch.jit.ScriptModule = torchscript_compile(\r\n                                                 ^^^^^^^^^^^^^^^^^^^^\r\n  File \"/fsx_home/homes/srdecny/meaning/env_bender6_3.11/lib/python3.11/site-packages/torch_tensorrt/ts/_compiler.py\", line 151, in compile\r\n    compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))\r\n                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nRuntimeError: [Error thrown at core/conversion/conversionctx/ConversionCtx.cpp:169] Building serialized network failed in TensorRT\r\n```\r\n\r\nI don't really know how to proceed from here. What does this exception indicate?\r\n\r\nThe compiling code is roughly this:\r\n\r\n```\r\ncalibrator = torch_tensorrt.ptq.DataLoaderCalibrator(\r\n    dloader,\r\n    cache_file=\"./encoder_calibrator.cache\",\r\n    use_cache=False,\r\n    algo_type=torch_tensorrt.ptq.CalibrationAlgo.ENTROPY_CALIBRATION_2,\r\n    device=DEVICE\r\n)\r\n\r\ninputs = model.dummy_inputs()\r\ntrace = torch.jit.trace(model, inputs, check_trace=False, strict=False)\r\nsignature = torch_tensorrt.Input(shape=inputs.shape, dtype=inputs.dtype)\r\n\r\ntorch_tensorrt.compile(\r\n    trace,\r\n    input_signature=signature,\r\n    enabled_precisions={torch.float, torch.int8, torch.half},\r\n    calibrator=calibrator,\r\n    truncate_long_and_double=True,\r\n)\r\n```\r\n\r\n`inputs` is a single float `Tensor` (although very large). Unfortunately, I can't share the model.\r\n\r\n\r\n## What you have already tried\r\n\r\nAll I managed to find online was [this](https://forums.developer.nvidia.com/t/tensorrt-int8-calibration-error-indexerror-map-base-at/169511/5) issue where somone indicates that the calibration dataloader might be empty. However, the following runs without any exception:\r\n\r\n```\r\ndummy_inputs = model.dummy_inputs()\r\ntrace = torch.jit.trace(model, inputs, check_trace=False, strict=False)\r\n\r\ntrace(dummy_inputs) # the traced model still works\r\nfor input in dloader:\r\n    trace(input) # the model also works with batches from the calibration dataloader\r\n```\r\n\r\nAdditonally, running the c",
    "url": "https://github.com/pytorch/TensorRT/issues/2782",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-26T18:29:58Z",
    "updated_at": "2025-03-27T12:42:10Z",
    "user": "srdecny"
  },
  {
    "repo": "pytorch/xla",
    "number": 6979,
    "title": "Support non-traceable Custom Ops",
    "body": "## \ud83d\ude80 Feature\r\n`torch.export` supports exporting blackbox custom ops, however, we fails to export it to StableHLO using `exported_program_to_stablehlo` API \r\nhttps://pytorch.org/tutorials/intermediate/torch_export_tutorial.html#custom-ops\r\n\r\n## Motivation\r\nif we have non-traceable python codes in the custom ops, we can't export it to stablehlo program. This means we won't be able to cover as much of the model when exporting through StableHLO.\r\n\r\n## Pitch\r\n\r\nHere is the example pytorch codes\r\n```\r\nimport torch\r\nfrom torch.library import Library, impl, impl_abstract\r\n\r\nm = Library(\"my_custom_library\", \"DEF\")\r\nm.define(\"custom_op(Tensor input) -> Tensor\")\r\n\r\n@impl(m, \"custom_op\", \"CompositeExplicitAutograd\")\r\ndef custom_op(x):\r\n    raise Exception(\"DON'T GO HERE\")\r\n    return torch.relu(x)\r\n\r\n@impl_abstract(\"my_custom_library::custom_op\")\r\ndef custom_op_meta(x):\r\n    return torch.empty_like(x)\r\n\r\nclass CustomOpExample(torch.nn.Module):\r\n    def forward(self, x):\r\n        x = torch.sin(x)\r\n        x = torch.ops.my_custom_library.custom_op(x)\r\n        x = torch.cos(x)\r\n        return x\r\n\r\nem = torch.export.export(CustomOpExample(), (torch.randn(3, 3),))\r\nem.graph_module.graph.print_tabular()\r\n\r\nfrom torch_xla.stablehlo import exported_program_to_stablehlo\r\nstablehlo_program = exported_program_to_stablehlo(em)\r\nprint(stablehlo_program.get_stablehlo_text())\r\n```\r\nAs you can see, `torch.export` runs fine and give us this fx graph, without caring what is inside `custom_op` impl.\r\n\r\n```\r\nopcode         name       target                               args          kwargs\r\n-------------  ---------  -----------------------------------  ------------  --------\r\nplaceholder    arg0_1     arg0_1                               ()            {}\r\ncall_function  sin        aten.sin.default                     (arg0_1,)     {}\r\ncall_function  custom_op  my_custom_library.custom_op.default  (sin,)        {}\r\ncall_function  cos        aten.cos.default                     (custom_op,)  {}\r\noutput         output     output                               ((cos,),)     {}\r\n```\r\n\r\n`exported_program_to_stablehlo` fails because it runs the `custom_op` and hits `Exception`.\r\n\r\nWhen I comment out the line `raise Exception(\"DON'T GO HERE\")`, `exported_program_to_stablehlo` works fine, however it traces into `custom_op` by converting `relu` to `stablehlo.maximum`,\r\n\r\n```\r\nmodule @IrToHlo.8 attributes {mhlo.cross_program_prefetches = [], mhlo.is_dynamic = false, mhlo.use_auto_spmd_partitioning = false} {\r\n  func.func @main(%arg0: tensor<3x3xf32>) -> tensor<3x3xf32> {\r\n    %0 = stablehlo.constant dense<0.000000e+00> : tensor<3x3xf32>\r\n    %1 = stablehlo.sine %arg0 : tensor<3x3xf32>\r\n    %2 = stablehlo.maximum %1, %0 : tensor<3x3xf32>\r\n    %3 = stablehlo.cosine %2 : tensor<3x3xf32>\r\n    return %3 : tensor<3x3xf32>\r\n  }\r\n}\r\n```\r\n\r\nI wonder if we can support exporting blackbox custom ops all the way to StableHLO without executing the op. We want to see something like this in the output,\r\n\r\n```\r\nmodule @IrToHlo.8 attributes {mhlo.cross_program_prefetches = [], mhlo.is_dynamic = false, mhlo.use_auto_spmd_partitioning = false} {\r\n  func.func @main(%arg0: tensor<3x3xf32>) -> tensor<3x3xf32> {\r\n    %0 = stablehlo.constant dense<0.000000e+00> : tensor<3x3xf32>\r\n    %1 = stablehlo.sine %arg0 : tensor<3x3xf32>\r\n    %2 = stablehlo.custom_call {name = \"my_custom_library.custom_op\"}} : (tensor<3x3xf32>) -> tensor<3x3xf32>\r\n    %3 = stablehlo.cosine %2 : tensor<3x3xf32>\r\n    return %3 : tensor<3x3xf32>\r\n  }\r\n}\r\n```\r\n",
    "url": "https://github.com/pytorch/xla/issues/6979",
    "state": "closed",
    "labels": [
      "stablehlo"
    ],
    "created_at": "2024-04-26T16:53:16Z",
    "updated_at": "2024-09-03T04:13:05Z",
    "comments": 4,
    "user": "thong3le"
  },
  {
    "repo": "huggingface/evaluate",
    "number": 582,
    "title": "How to pass generation_kwargs to the TextGeneration evaluator ?",
    "body": "How can I pass the generation_kwargs to TextGeneration evaluator ?",
    "url": "https://github.com/huggingface/evaluate/issues/582",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-25T16:09:46Z",
    "updated_at": "2024-04-25T16:09:46Z",
    "user": "swarnava112"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1074,
    "title": "503 error ",
    "body": "Hello, I was trying to install the chat-ui \r\nI searched for any documentation to how to handle that on my vps\r\nerror 500 after build and not working with https although allow_insecure=false ",
    "url": "https://github.com/huggingface/chat-ui/issues/1074",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2024-04-25T15:34:07Z",
    "updated_at": "2024-04-27T14:58:45Z",
    "comments": 1,
    "user": "abdalladorrah"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1073,
    "title": "Support for Llama-3-8B-Instruct model",
    "body": "hi,\r\nFor model meta-llama/Meta-Llama-3-8B-Instruct, it is unlisted, not sure when will be supported?\r\n\r\nhttps://github.com/huggingface/chat-ui/blob/3d83131e5d03e8942f9978bf595a7caca5e2b3cd/.env.template#L229\r\n\r\nthanks.",
    "url": "https://github.com/huggingface/chat-ui/issues/1073",
    "state": "open",
    "labels": [
      "question",
      "models",
      "huggingchat"
    ],
    "created_at": "2024-04-25T14:03:35Z",
    "updated_at": "2024-04-30T05:47:05Z",
    "user": "cszhz"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1072,
    "title": "[v0.8.3] serper, serpstack API, local web search not working",
    "body": "## Context\r\n\r\nI have serper.dev API key, serpstack API key and I have put it correctly in my `.env.local` file.\r\n\r\n<img width=\"478\" alt=\"image\" src=\"https://github.com/huggingface/chat-ui/assets/31769894/5082893a-7ecd-4ab5-9cb9-059875118dcd\">\r\n\r\n## Issue\r\n\r\nHowever, even if I enable Web Search, it still does not reach out to those APIs, and shows me \"an error occured\" no the Web Search part.\r\n\r\n<img width=\"931\" alt=\"image\" src=\"https://github.com/huggingface/chat-ui/assets/31769894/da96c121-89e0-402b-8e93-33c9e6709c71\">\r\n\r\nI don't see calls reaching Serper and SerpStack as well.\r\n\r\n<img width=\"1365\" alt=\"image\" src=\"https://github.com/huggingface/chat-ui/assets/31769894/7230b1a0-2567-424f-8884-8fc53417fa41\">\r\n\r\n<img width=\"1302\" alt=\"image\" src=\"https://github.com/huggingface/chat-ui/assets/31769894/b35c1a7f-1c2c-4c8a-9c46-5c2171f73f9b\">\r\n\r\nIt was working for a bit on `v0.8.2`, but then it stopped working there as well. Now, for `v.0.8.3`, it's not working at all. Am I missing something? I have tried using either of those APIs too, but it still does not work.\r\n\r\nPlease help.",
    "url": "https://github.com/huggingface/chat-ui/issues/1072",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2024-04-25T13:24:40Z",
    "updated_at": "2024-05-09T16:28:15Z",
    "comments": 14,
    "user": "adhishthite"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7775,
    "title": "How to input gradio settings in Python",
    "body": "Hi.\r\n\r\nI use **realisticStockPhoto_v20** on Fooocus with **sdxl_film_photography_style** lora and I really like the results.\r\nFooocus and other gradio implementations come with settings inputs that I want to utilize in Python as well. In particular, if this is my code:\r\n```\r\ndevice = \"cuda\"\r\nmodel_path = \"weights/realisticStockPhoto_v20.safetensors\"\r\n\r\npipe = StableDiffusionXLInpaintPipeline.from_single_file(\r\n    model_path, \r\n    torch_dtype=torch.float16, \r\n    num_in_channels=4).to(device)\r\n\r\npipe.load_lora_weights(\".\", weight_name=\"weights/SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors\", adapter_name=\"film\")\r\n```\r\nhow can I set the following settings/parameters in code?\r\n\r\n- Negative Prompt\r\n- Preset (initial, lcm, default, lighting, realistic, sai, anime)\r\n- Performance (quality, speed, extreme speed, lightning)\r\n- width-height\r\n- image number\r\n- output format\r\n- Style (Fooocus v2, fooocus photography, fooocus negative, foocus enhance, etc.)\r\n- Base Model\r\n- Refiner\r\n- Lora 1,2,3,4,5,...\r\n- Guidance scale\r\n- Image sharpness",
    "url": "https://github.com/huggingface/diffusers/issues/7775",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-25T08:43:20Z",
    "updated_at": "2024-11-20T00:07:26Z",
    "user": "levoz92"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 1069,
    "title": "CohereForAI ChatTemplate",
    "body": "Now that there is official support for tgi in CohereForAI/c4ai-command-r-v01. How to use the chat template found in the tokenizer config for the ui. Or alternatively, is it possible to add in PROMPTS.md the correct template for cohere?",
    "url": "https://github.com/huggingface/chat-ui/issues/1069",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-25T05:45:35Z",
    "updated_at": "2024-04-25T05:45:35Z",
    "comments": 0,
    "user": "yanivshimoni89"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 727,
    "title": "Preferred citation of Transformers.js",
    "body": "### Question\n\nLove the package, and am using it in research - I am wondering, does there exist a preferred citation format for the package to cite it in papers?",
    "url": "https://github.com/huggingface/transformers.js/issues/727",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-24T23:07:20Z",
    "updated_at": "2024-04-24T23:21:13Z",
    "user": "ludgerpaehler"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 124887,
    "title": "How to catch NCCL collective timeout in Python",
    "body": "## Issue description\r\nCurrently, there are several error handling modes ([link](https://github.com/pytorch/pytorch/blob/bc117898f18e8a698b00823f57c19b2d874b93ba/torch/csrc/distributed/c10d/ProcessGroupNCCL.hpp#L114-L126)) for when NCCL collectives timeout. These error handling modes can be set via `TORCH_NCCL_ASYNC_ERROR_HANDLING`/`NCCL_ASYNC_ERROR_HANDLING`. My current observation on single/multi-host CUDA environments using NCCL distributed backend is that when a timeout exception is raised at the C++ level (when `TORCH_NCCL_ASYNC_ERROR_HANDLING=1`), this exception propagates through a few try/catch blocks, but eventually is left unhandled, resulting in the Python processes terminating via SIGABRT/SEGFAULT.\r\n\r\nQuestion: Is it possible without many any modifications to torch to catch the error raised at the C++ level within my Python torch script?\r\n\r\nBased on digging around, I don't think it is possible (open to any suggestions). I've done some experimentation to the PyTorch source code locally by adding some logic based on [Python docs](https://docs.python.org/3.10/extending/extending.html#intermezzo-errors-and-exceptions) to [ProcessGroupNCCL.cpp](https://github.com/pytorch/pytorch/blob/main/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp) such that the exception can be caught in Python. However, `#include <Python.h>` in  [ProcessGroupNCCL.cpp](https://github.com/pytorch/pytorch/blob/main/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp) results in `fatal error: Python.h: No such file or directory` when building torch from source. \r\n\r\nQuestion: Are there explicit reasons why I shouldn't add python to NCCL logic?\r\n\r\n## Code example\r\nTODO if needed\r\n\r\n## System Info\r\nTODO if needed\r\n\r\ncc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225 @chauhang @d4l3k",
    "url": "https://github.com/pytorch/pytorch/issues/124887",
    "state": "closed",
    "labels": [
      "needs reproduction",
      "oncall: distributed"
    ],
    "created_at": "2024-04-24T22:27:43Z",
    "updated_at": "2024-05-01T06:16:25Z",
    "user": "gkroiz"
  },
  {
    "repo": "huggingface/diarizers",
    "number": 4,
    "title": "How to save the finetuned model as a .bin file?",
    "body": "Hi,\r\n\r\nI finetuned the pyannote-segmentation model for my usecase but it is saved as a model.safetensors file. Can I convert it to a pytorch_model.bin file? I am using whisperx to create speaker-aware transcripts and .safetensors isn't working with that library. Thanks!",
    "url": "https://github.com/huggingface/diarizers/issues/4",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-24T20:50:19Z",
    "updated_at": "2024-04-30T21:02:32Z",
    "user": "anuragrawal2024"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 460,
    "title": "First generated token not being displayed in chat mode sometimes.",
    "body": "What is your system prompt? \r\nI am superman\r\nWhat is your prompt? \r\nHow can i save the world?\r\n, up, and away! As Superman, you're uniquely equipped\r\n\r\nSeems like 'up' in up, up, and away is being lost. This happens with most responses. ",
    "url": "https://github.com/pytorch/torchchat/issues/460",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-24T19:00:40Z",
    "updated_at": "2024-04-24T22:13:06Z",
    "comments": 0,
    "user": "JacobSzwejbka"
  },
  {
    "repo": "pytorch/executorch",
    "number": 3303,
    "title": "How can I convert llama3 safetensors to the pth file needed to use with executorch?",
    "body": "Fine-tunes of Llama3 usually only have safetensors uploaded. In order to compile a Llama3 model following the tutorial, I need the original pth checkpoint file.\r\n\r\nIs there a way to convert the safetensors to the checkpoint file?",
    "url": "https://github.com/pytorch/executorch/issues/3303",
    "state": "closed",
    "labels": [
      "enhancement",
      "help wanted",
      "high priority",
      "triage review"
    ],
    "created_at": "2024-04-24T14:20:17Z",
    "updated_at": "2024-05-30T03:29:23Z",
    "user": "l3utterfly"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 725,
    "title": "How to choose a language's dialect when using `automatic-speech-recognition` pipeline?",
    "body": "### Question\r\n\r\nHi, so I was originally using the transformers library (python version) in my backend, but when refactoring my application for scale. It made more sense to move my implementation of whisper from the backend to the frontend (for my specific usecase). So I was thrilled when I saw that transformers.js supported whisper via the `automatic-speech-recognition` pipeline. However I'm a little confused by the implementation and the documentation left me with the question in the title.\r\n\r\nHow to choose a language's dialect when using `automatic-speech-recognition` pipeline?\r\n\r\nIn the python implementation of whisper, you don't have to specify the language being spoken as long as you're using the correct model size for multilingual support. But from your examples on transformers.js, it seems like you do in the js implementation.\r\n\r\n```\r\nconst transcriber = await pipeline('automatic-speech-recognition', 'Xenova/whisper-small');\r\nconst url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/french-audio.mp3';\r\nconst output = await transcriber(url, { language: 'french', task: 'transcribe' });\r\n// { text: \" J'adore, j'aime, je n'aime pas, je d\u00e9teste.\" }\r\n```\r\n\r\nHowever there's no list of supported languages, beyond what you can find on the whisper github repo. That's usually not a problem. But how do you deal with a language like Chinese, that has two main dialects; Mandarin and Cantonese. In python, I didn't have to worry about it, but in js, it seems to be a potential issue.\r\n\r\nPlease help. Any guidance will be appreciated.",
    "url": "https://github.com/huggingface/transformers.js/issues/725",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-24T09:44:38Z",
    "updated_at": "2025-11-06T20:36:01Z",
    "user": "jquintanilla4"
  },
  {
    "repo": "huggingface/text-embeddings-inference",
    "number": 248,
    "title": "how to support gpu version 10.1 rather than 12.2",
    "body": "### Feature request\n\nhow to support gpu version 10.1 rather than 12.2\n\n### Motivation\n\nhow to support gpu version 10.1 rather than 12.2\n\n### Your contribution\n\nhow to support gpu version 10.1 rather than 12.2",
    "url": "https://github.com/huggingface/text-embeddings-inference/issues/248",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-24T08:49:45Z",
    "updated_at": "2024-04-26T13:02:44Z",
    "user": "fanqiangwei"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7766,
    "title": "IP-Adapter FaceID PLus How to use questions",
    "body": "https://github.com/huggingface/diffusers/blob/9ef43f38d43217f690e222a4ce0239c6a24af981/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L492\r\n\r\n## error msg:\r\n    pipe.unet.encoder_hid_proj.image_projection_layers[0].clip_embeds = clip_embeds.to(dtype=torch.float16)\r\n    AttributeError: 'list' object has no attribute 'to'\r\n\r\nhi\uff01\r\nI'm having some problems using the ip adapter FaceID PLus. Can you help me answer these questions? Thank you very much\r\n\r\n1. first question:  What should I pass in the `ip_adapter_image` parameter in the `prepare_ip_adapter_image_embeds` function\r\n2. second question:  What problem does this cause when the following code does not match in the merge code link below and in the example in the ip_adapter.md file \r\nthis is merge link: \r\n https://github.com/huggingface/diffusers/pull/7186#issuecomment-1986961595\r\nDifferential code:\r\n      ```\r\n      ref_images_embeds = torch.stack(ref_images_embeds, dim=0).unsqueeze(0)\r\n      neg_ref_images_embeds = torch.zeros_like(ref_images_embeds)\r\n      id_embeds = torch.cat([neg_ref_images_embeds, ref_images_embeds]).to(dtype=torch.float16, device=\"cuda\"))\r\n      ```\r\n@yiyixuxu @fabiorigano \r\n\r\n## os:\r\ndiffusers==diffusers-0.28.0.dev0\r\n\r\n## this is my code:\r\n\r\n```\r\n# @FileName\uff1aStableDiffusionIpAdapterFaceIDTest.py\r\n# @Description\uff1a\r\n# @Author\uff1adyh\r\n# @Time\uff1a2024/4/24 11:45\r\n# @Website\uff1awww.xxx.com\r\n# @Version\uff1aV1.0\r\nimport cv2\r\nimport numpy as np\r\nimport torch\r\nfrom PIL import Image\r\nfrom diffusers import StableDiffusionPipeline\r\nfrom insightface.app import FaceAnalysis\r\nfrom transformers import CLIPVisionModelWithProjection\r\n\r\nmodel_path = '../../../aidazuo/models/Stable-diffusion/stable-diffusion-v1-5'\r\nclip_path = '../../../aidazuo/models/CLIP-ViT-H-14-laion2B-s32B-b79K'\r\nip_adapter_path = '../../../aidazuo/models/IP-Adapter-FaceID'\r\nip_img_path = '../../../aidazuo/jupyter-script/test-img/vermeer.png'\r\n\r\n\r\ndef extract_face_features(image_lst: list, input_size: tuple):\r\n    # Extract Face features using insightface\r\n    ref_images = []\r\n    app = FaceAnalysis(name=\"buffalo_l\",\r\n                       root=ip_adapter_path,\r\n                       providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])\r\n\r\n    app.prepare(ctx_id=0, det_size=input_size)\r\n    for img in image_lst:\r\n        image = cv2.cvtColor(np.asarray(img), cv2.COLOR_BGR2RGB)\r\n        faces = app.get(image)\r\n        image = torch.from_numpy(faces[0].normed_embedding)\r\n        ref_images.append(image.unsqueeze(0))\r\n    ref_images = torch.cat(ref_images, dim=0)\r\n\r\n    return ref_images\r\n\r\n\r\nip_adapter_img = Image.open(ip_img_path)\r\n\r\nimage_encoder = CLIPVisionModelWithProjection.from_pretrained(\r\n    clip_path,\r\n    torch_dtype=torch.float16,\r\n    use_safetensors=True\r\n)\r\n\r\npipe = StableDiffusionPipeline.from_pretrained(\r\n    model_path,\r\n    variant=\"fp16\",\r\n    safety_checker=None,\r\n    image_encoder=image_encoder,\r\n    torch_dtype=torch.float16).to(\"cuda\")\r\n\r\nadapter_file_lst = [\"ip-adapter-faceid-plus_sd15.bin\"]\r\nadapter_weight_lst = [0.5]\r\n\r\npipe.load_ip_adapter(ip_adapter_path, subfolder=None, weight_name=adapter_file_lst)\r\npipe.set_ip_adapter_scale(adapter_weight_lst)\r\n\r\nface_id_embeds = extract_face_features([ip_adapter_img], ip_adapter_img.size)\r\n\r\nclip_embeds = pipe.prepare_ip_adapter_image_embeds(ip_adapter_image=[ip_adapter_img],\r\n                                                   ip_adapter_image_embeds=None,\r\n                                                   device='cuda',\r\n                                                   num_images_per_prompt=1,\r\n                                                   do_classifier_free_guidance=True)\r\n\r\npipe.unet.encoder_hid_proj.image_projection_layers[0].clip_embeds = clip_embeds.to(dtype=torch.float16)\r\npipe.unet.encoder_hid_proj.image_projection_layers[0].shortcut = False  # True if Plus v2\r\n\r\ngenerator = torch.manual_seed(33)\r\nimages = pipe(\r\n    prompt='a beautiful girl',\r\n    ip_adapter_image_embeds=clip_embeds,\r\n    negative_prompt=\"\",\r\n    num_inference_steps=30,\r\n    num_images_per_prompt=1,\r\n    generator=generator,\r\n    width=512,\r\n    height=512).images\r\n\r\nprint(images)\r\n```\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/7766",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-24T07:56:38Z",
    "updated_at": "2024-11-20T00:02:30Z",
    "user": "Honey-666"
  },
  {
    "repo": "huggingface/peft",
    "number": 1673,
    "title": "How to set Lora_dropout=0 when loading trained peft model for inference?",
    "body": "### System Info\n\npeft==0.10.0\r\ntransformers==4.39.3\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n\r\n```python\r\nclass Linear(nn.Module, LoraLayer): \r\n\r\n   def forward(self, x: torch.Tensor, *args: Any, **kwargs: Any) -> torch.Tensor:\r\n        self._check_forward_args(x, *args, **kwargs)\r\n        adapter_names = kwargs.pop(\"adapter_names\", None)\r\n\r\n        if self.disable_adapters:\r\n            if self.merged:\r\n                self.unmerge()\r\n            result = self.base_layer(x, *args, **kwargs)\r\n        elif adapter_names is not None:\r\n            result = self._mixed_batch_forward(x, *args, adapter_names=adapter_names, **kwargs)\r\n        elif self.merged:\r\n            result = self.base_layer(x, *args, **kwargs)\r\n        else:\r\n            result = self.base_layer(x, *args, **kwargs)\r\n            torch_result_dtype = result.dtype\r\n            for active_adapter in self.active_adapters:\r\n                if active_adapter not in self.lora_A.keys():\r\n                    continue\r\n                lora_A = self.lora_A[active_adapter]\r\n                lora_B = self.lora_B[active_adapter]\r\n                dropout = self.lora_dropout[active_adapter]\r\n                scaling = self.scaling[active_adapter]\r\n                x = x.to(lora_A.weight.dtype)\r\n\r\n                if not self.use_dora[active_adapter]:\r\n                    result = result + lora_B(lora_A(dropout(x))) * scaling\r\n                else:\r\n                    x = dropout(x)\r\n                    result = result + self._apply_dora(x, lora_A, lora_B, scaling, active_adapter)\r\n\r\n            result = result.to(torch_result_dtype)\r\n\r\n        return result\r\n```\n\n### Expected behavior\n\nWe can see that `lora_dropout` in forward function is working the same way whether under train or inference mode.",
    "url": "https://github.com/huggingface/peft/issues/1673",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-24T07:47:19Z",
    "updated_at": "2024-05-10T02:22:17Z",
    "user": "flyliu2017"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 450,
    "title": "[Feature Request] Support for delegate information in torchchat",
    "body": "@lucylq  can you please add the delegate summary info you added to ET's llama2/export_llama_lib to export_et.py?\r\nCan you add a line or two about XNNPACK delegate (probably just a link to some text on the ET website?) and how to interpret the operator stats in docs/ADVANCED-USERS.md as well?\r\n\r\nThanks so much!\r\n\r\ncc: @iseeyuan ",
    "url": "https://github.com/pytorch/torchchat/issues/450",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-04-24T06:19:02Z",
    "updated_at": "2024-04-30T00:29:06Z",
    "comments": 0,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/vision",
    "number": 8394,
    "title": "Run all torchvision models in one script.",
    "body": "### \ud83d\ude80 The feature\r\n\r\nIs there a test script that can run models.\r\n\r\n### Motivation, pitch\r\n\r\nHl, i am testing a model migration script from cuda to sycl and i would like to test it on torch vision model set, i would like to know do we have a test script that can run all models in torchvision? like run.py [code](https://github.com/pytorch/benchmark/blob/main/run.py) in torchbenchmark, thanks.\r\n\r\n### Alternatives\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/8394",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-24T01:39:23Z",
    "updated_at": "2024-04-29T10:18:17Z",
    "comments": 1,
    "user": "leizhenyuan"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 430,
    "title": "[Feature Request]  centralize measurement code",
    "body": "\r\n@malfet said in https://github.com/pytorch/torchchat/pull/426\r\n\r\nThis code is repeated thrice in this PR. Can we have something like\r\n```\r\nwith report_block-time(\"Time to load model\"):\r\n     model =  _load_model(builder_args, only_config=True)\r\n     device_sync(device=builder_args.device)\r\n```\r\n\r\nMight be a good component for build/utils.py - item for post-release.\r\n\r\ncc: @metascroy ",
    "url": "https://github.com/pytorch/torchchat/issues/430",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-04-23T22:26:16Z",
    "updated_at": "2024-05-12T21:32:58Z",
    "comments": 0,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1826,
    "title": "Phi3 support",
    "body": "### Feature request\n\nMicrosoft's new phi3 mode, in particular the 128K context mini model, is not supported by Optimum export. \r\n\r\nError is:\r\n\"ValueError: Trying to export a phi3 model, that is a custom or unsupported architecture, but no custom export configuration was passed as `custom_export_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type phi3 to be supported natively in the ONNX export.\"\n\n### Motivation\n\nPhi3-mini is potentially very significant as it has a large context but a small size. This could be used in lots of scenarios if it has good performance.\n\n### Your contribution\n\nUnlikely I could do a PR as ONNX work is not my forte.",
    "url": "https://github.com/huggingface/optimum/issues/1826",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-23T15:54:21Z",
    "updated_at": "2024-05-24T13:53:08Z",
    "comments": 4,
    "user": "martinlyons"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6830,
    "title": "Add a doc page for the convert_to_parquet CLI",
    "body": "Follow-up to https://github.com/huggingface/datasets/pull/6795. Useful for https://github.com/huggingface/dataset-viewer/issues/2742. cc @albertvillanova ",
    "url": "https://github.com/huggingface/datasets/issues/6830",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-04-23T09:49:04Z",
    "updated_at": "2024-04-25T10:44:11Z",
    "comments": 0,
    "user": "severo"
  },
  {
    "repo": "pytorch/serve",
    "number": 3103,
    "title": "How to pass parameters from preprocessing to postprocessing when using micro-batch operations",
    "body": "### \ud83d\udcda The doc issue\n\nI have a variable that is obtained by parsing the image data in pre-processing, but it is not an input to the model. I want to pass it to post-processing and return it together with the results. Like knowing how to pass it from pre-processing to post-processing\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/3103",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2024-04-23T03:17:05Z",
    "updated_at": "2024-04-29T02:49:49Z",
    "user": "pengxin233"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 723,
    "title": "404 when trying Qwen in V3",
    "body": "### Question\n\nThis is probably just because V3 is a work in progress, but I wanted to make sure.\r\n\r\nWhen trying to run Qwen 1.5 - 0.5B it works with the V2 script, but when swapping to V3 I get a 404 not found.\r\n\r\n```\r\ntype not specified for model. Using the default dtype: q8.\r\nGET https://huggingface.co/Xenova/Qwen1.5-0.5B-Chat/resolve/main/onnx/model_quantized.onnx 404 (Not Found)\r\n```\r\n\r\nIt seems V3 is looking for a file that was renamed 3 months ago.\r\n[Rename onnx/model_quantized.onnx to onnx/decoder_model_merged_quantized.onnx](https://huggingface.co/Xenova/Qwen1.5-0.5B-Chat/commit/09e055ac27002bb954137751b31376de79ae17a5)\r\n\r\nI've tried setting `dtype` to 16 and 32, which does change the URL it tries to get, but those URL's also do not exist :-D\r\n\r\ne.g. `https://huggingface.co/Xenova/Qwen1.5-0.5B-Chat/resolve/main/onnx/model_fp16.onnx` when using `dtype: 'fp16'`.\r\n\r\nIs there something I can do to make V3 find the correct files?\r\n\r\n(I'm still trying to find that elusive small model with a large context size to do document summarization with)",
    "url": "https://github.com/huggingface/transformers.js/issues/723",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-22T19:14:17Z",
    "updated_at": "2024-05-28T08:26:09Z",
    "user": "flatsiedatsie"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7740,
    "title": "How to get config of single_file",
    "body": "Hi,\r\nIs there any way to get the equivalent of model_index.json from a single_file?",
    "url": "https://github.com/huggingface/diffusers/issues/7740",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-22T14:00:21Z",
    "updated_at": "2024-04-22T23:26:50Z",
    "user": "suzukimain"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 372,
    "title": "[Release] Documentation is sparse.",
    "body": "What does \"the following models are supported\" mean?  Ostensibly you can load other models like language llama, as long as you have a params.json and they fit into the architectural parameters ? \r\n\r\nthe preamble explains it supports \"Android (Devices that support XNNPACK)\" - how do I know that as a user?\r\n\r\n\"Supporting both GGUF fp32/16 \" - also Q4_0 and Q6_0\r\n\r\n\"Export\r\nCompiles a model and saves it to run later.\" - and how do I do this? it's just presented as here's export, no go figure out what to do with a DSO or a PTE?\r\n\r\nShould we say tested - where do we discuss how to add new models?  ",
    "url": "https://github.com/pytorch/torchchat/issues/372",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-22T08:17:04Z",
    "updated_at": "2024-04-25T18:47:09Z",
    "comments": 1,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 364,
    "title": "[Release][documentation] Docs Regression: documentation for export_et / install_et broken",
    "body": "From chat:\r\n\r\n@iseeyuan \r\n> Separate question: When I tried python torchchat.py export stories15M --output-pte-path stories15M.pte, I got Export with executorch requested but ExecuTorch could not be loaded. \r\nIf I run the culprit line, from export_et import export_model as export_model_et, I got this stack, [P1219614729](https://www.internalfb.com/intern/paste/P1219614729/)\r\nIs it a known issue?\r\n\r\n@kimishpatel \r\n> Might be unrelated but did you run scripts/install_et.sh?\r\n\r\n@iseeyuan \r\n> I got \"scripts/install_et.sh: line 61: TORCHCHAT_ROOT: unbound variable\". Should I run it with any argument?\r\n> nvm, I should add prefix of TORCHCHAT_ROOT\r\n\r\n@kimishpatel \r\n> Yeah just export TORCHCHAT_ROOT={pwd} or something. it used to be in readme at https://github.com/pytorch/torchchat/. but dont see it anymore\r\n\r\n@kimishpatel Should this go in Executorch documentation or in Torchchat docs?\r\n\r\ncc: @GregoryComer @byjlw @orionr ",
    "url": "https://github.com/pytorch/torchchat/issues/364",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-22T04:01:22Z",
    "updated_at": "2024-04-24T02:32:50Z",
    "comments": 1,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 357,
    "title": "runner-et build documentation broken",
    "body": "\r\nThe runner build information in our documentation is in even worse shape than the ci.\r\n\r\n@shoumikhin \r\n\r\n> anyhow just followed the readme and then tried that cmake command, got [P1219498869 (https://www.internalfb.com/intern/paste/P1219498869/)\r\n\r\n```\r\ncmake -S ./runner-et -B et-build/cmake-out -G Ninja\r\n-- Using ET BUILD DIR: --[et-build]--\r\n-- Using ET BUILD DIR: --[et-build]--\r\n-- The C compiler identification is AppleClang 15.0.0.15000309\r\n-- The CXX compiler identification is AppleClang 15.0.0.15000309\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Check for working C compiler: /Applications/Xcode_15.3.0_15E204a_fb.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped\r\n-- Detecting C compile features\r\n-- Detecting C compile features - done\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- Check for working CXX compiler: /Applications/Xcode_15.3.0_15E204a_fb.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped\r\n-- Detecting CXX compile features\r\n-- Detecting CXX compile features - done\r\n-- TORCHCHAT_ROOT=\"\"\r\n-- Looking for excutorch in /et-build/install/lib/cmake/ExecuTorch\r\nCMake Error at CMakeLists.txt:29 (find_package):\r\n  Could not find a package configuration file provided by \"executorch\" with\r\n  any of the following names:\r\n    executorchConfig.cmake\r\n    executorch-config.cmake\r\n  Add the installation prefix of \"executorch\" to CMAKE_PREFIX_PATH or set\r\n  \"executorch_DIR\" to a directory containing one of the above files.  If\r\n  \"executorch\" provides a separate development package or SDK, be sure it has\r\n  been installed.\r\n-- Configuring incomplete, errors occurred!\r\n```",
    "url": "https://github.com/pytorch/torchchat/issues/357",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-21T21:37:26Z",
    "updated_at": "2024-05-12T21:38:59Z",
    "comments": 4,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 356,
    "title": "runner, runner-et and runner-aoti documentation",
    "body": "Add a description of the runner/run.cpp\r\nhighlight that it's only a few lines of C++ code that need to be different for PyTorch AOTI and PyTorch ET.\r\nMight also check how many lines of llama2.c we avoid having to write by autogenerating llama.{pte,so}\r\n\r\nmaybe @shoumikhin and Hansong (@cbilgin can you put the right git reference for him) can add some text on how to\r\nadapt / re-use the code for integerating LLMs into an app (using their iOS/Android as an example)\r\n\r\ncc: @orionr @metascroy @larryliu0820 @shoumikhin @cbilgin ",
    "url": "https://github.com/pytorch/torchchat/issues/356",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-21T21:30:59Z",
    "updated_at": "2024-04-25T07:57:47Z",
    "comments": 2,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 354,
    "title": "[Feature Request] add Dr. CI (when this repository goes public)",
    "body": "Now that we're a real pytorch project and in the pytorch repo, can we have @pytorch-bot build the same summaries  for pytorch/torchchat as it does for pytorch/pytorch?  I find those exceedingly helpful to navigate.\r\n\r\nhttps://github.com/pytorch/pytorch/pull/124570#issuecomment-2068152908\r\n\r\n\ud83d\udd17 Helpful Links\r\n\ud83e\uddea See artifacts and rendered test results at [hud.pytorch.org/pr/124570](https://hud.pytorch.org/pr/124570)\r\n\ud83d\udcc4 Preview [Python docs built from this PR](https://docs-preview.pytorch.org/pytorch/pytorch/124570/index.html)\r\n\ud83d\udcc4 Preview [C++ docs built from this PR](https://docs-preview.pytorch.org/pytorch/pytorch/124570/cppdocs/index.html)\r\n\u2753 Need help or want to give feedback on the CI? Visit the [bot commands wiki](https://github.com/pytorch/pytorch/wiki/Bot-commands) or our [office hours](https://github.com/pytorch/pytorch/wiki/Dev-Infra-Office-Hours)\r\nNote: Links to docs will display an error until the docs builds have been completed.\r\n\r\n\u23f3 33 Pending, 2 Unrelated Failures\r\nAs of commit https://github.com/pytorch/pytorch/commit/2fe671d38ce391f8de80611f1ccbcf6f3e912faf with merge base https://github.com/pytorch/pytorch/commit/fd90991790b4cdf66a076711844ca620669dcc04 (image):\r\n\r\nFLAKY - The following jobs failed but were likely due to flakiness present on trunk:\r\nThis comment was automatically generated by Dr. CI and updates every 15 minutes.\r\n\r\ncc: @seemethere  @malfet ",
    "url": "https://github.com/pytorch/torchchat/issues/354",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-04-21T21:01:47Z",
    "updated_at": "2024-05-13T17:29:28Z",
    "comments": 4,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 347,
    "title": "[Release] Seems like we get a bit of a garbage output?",
    "body": "Maybe this has to do with how we leverage the start and end tokens for prompt and response, but I feel like I'm getting garbage output?\r\n\r\nSteps to reproduce:\r\n1. Run `python torchchat.py chat stories15M`\r\n2. Enter `Can you tell me about your day?` as the prompt\r\n3. I then see the following result\r\n```\r\nWhat is your prompt?\r\nCan you tell me about your day?\r\n was very tired and needed to sleep. No matter how hard you tried, I couldn't keep up with you,\" said the voice.\r\nLily was surprised. She had never heard such a voice before. She asked, \"What is the song?\"\r\nThe voice replied, \"It brings you joy. It brings you a star.\"\r\nLily was very excited and wanted to know more about the star. So, she asked the voice, \"What is the song?\"\r\nThe voice said, \"The song might bring you something special. You should hope and you will remember to dream. I will always remember the beautiful song you had heard and tell you.\"\r\nLily smiled in understanding. She thanked the voice and went back to sleep.\r\nThe next morning, Lily woke up and found the beautiful song she had heard earlier. She was so happy and thankful to the friendly voice. Once upon a time, there was a\r\n```\r\n4. Note that the result is clipped (` was...` as the start) and also didn't go to the end token\r\n5. Also wasn't interactive, which I called out in https://github.com/pytorch/torchchat/issues/346\r\n\r\nExpected:\r\n1. A reasonable chat with the LLM\r\n\r\ncc @byjlw @mikekgfb \r\n",
    "url": "https://github.com/pytorch/torchchat/issues/347",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-21T18:19:45Z",
    "updated_at": "2024-04-22T21:13:17Z",
    "comments": 1,
    "user": "orionr"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 346,
    "title": "[Release] Chat only responds to one line of text?",
    "body": "I would expect chat to be interactive, but it isn't for me right now.\r\n\r\nSteps to reproduce:\r\n1. Run `python torchchat.py chat stories15M`\r\n2. Enter some text like \"Hello\"\r\n3. Notice that you get a response, but then the command exits\r\n\r\nExpected:\r\n1. I'd be able to continue chatting with the model until I hit Ctrl-C or something\r\n\r\ncc @byjlw @mikekgfb \r\n\r\n",
    "url": "https://github.com/pytorch/torchchat/issues/346",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-21T18:16:01Z",
    "updated_at": "2024-04-25T07:58:45Z",
    "comments": 2,
    "user": "orionr"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 345,
    "title": "[Feature request] Allow for GPU and MPS as defaults on machines that support it?",
    "body": "Given that we won't see good performance without GPU enabled for machines that support CUDA, should we make sure we select `gpu`, `mps` and then `cpu` in that order for `chat` and `generate` commands?\r\n\r\nIs this potentially a blocker for full launch?\r\n\r\ncc @malfet @mikekgfb @dbort @byjlw ",
    "url": "https://github.com/pytorch/torchchat/issues/345",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-04-21T17:54:06Z",
    "updated_at": "2024-04-30T06:31:55Z",
    "comments": 2,
    "user": "orionr"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 344,
    "title": "[Resolve] Force requirements.txt or README.md to install PyTorch nightlies?",
    "body": "Given that we won't see good performance with the release version of PyTorch, should we update requirements.txt and/or README.md to have people install nightlies?\r\n\r\nIs this potentially a blocker for full launch?\r\n\r\ncc @malfet @mikekgfb @dbort @byjlw ",
    "url": "https://github.com/pytorch/torchchat/issues/344",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-21T17:52:19Z",
    "updated_at": "2024-04-22T13:58:30Z",
    "comments": 4,
    "user": "orionr"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 336,
    "title": "[Mitigated, pending confirmation/closure] Review update documentation for GPTQ",
    "body": "https://github.com/pytorch/torchchat/edit/main/docs/quantization.md\r\n\r\nPlease update the documentation to include all necessary options and information to use GPTQ with eager execution and export .\r\n\r\ncc: @jerryzh168 @HDCharles ",
    "url": "https://github.com/pytorch/torchchat/issues/336",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-21T08:19:38Z",
    "updated_at": "2024-04-25T17:13:46Z",
    "comments": 0,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7724,
    "title": "RuntimeError: Error(s) in loading state_dict for AutoencoderKL: Missing Keys! How to solve? ",
    "body": "### Describe the bug\n\nI am trying to get a Lora to run locally on my computer by using this code: https://github.com/hollowstrawberry/kohya-colab and changing it to a local format. When I get to the loading of the models, it gives an error, It seems that the AutoEncoder model has changed but I do not know how to adjust this or solve this issue in any of the files. I am a very amateur coder, could some one still help me out? \n\n### Reproduction\n\nHere is the code: https://github.com/hollowstrawberry/kohya-colab\r\n\n\n### Logs\n\n```shell\nTraceback (most recent call last):\r\n  File \"/Users/veravanderburg/Loras/kohya-trainer/train_network_wrapper.py\", line 9, in <module>\r\n    train(args)\r\n  File \"/Users/veravanderburg/Loras/kohya-trainer/train_network.py\", line 168, in train\r\n    text_encoder, vae, unet, _ = train_util.load_target_model(args, weight_dtype, accelerator)\r\n                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/veravanderburg/Loras/kohya-trainer/library/train_util.py\", line 3149, in load_target_model\r\n    text_encoder, vae, unet, load_stable_diffusion_format = _load_target_model(\r\n                                                            ^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/veravanderburg/Loras/kohya-trainer/library/train_util.py\", line 3115, in _load_target_model\r\n    text_encoder, vae, unet = model_util.load_models_from_stable_diffusion_checkpoint(args.v2, name_or_path, device)\r\n                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/veravanderburg/Loras/kohya-trainer/library/model_util.py\", line 873, in load_models_from_stable_diffusion_checkpoint\r\n    info = vae.load_state_dict(converted_vae_checkpoint)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 2153, in load_state_dict\r\n    raise RuntimeError('Error(s) in loading state_dict for {}:\\n\\t{}'.format(\r\n\r\nRuntimeError: Error(s) in loading state_dict for AutoencoderKL:\r\n\tMissing key(s) in state_dict: \"encoder.mid_block.attentions.0.to_q.weight\", \"encoder.mid_block.attentions.0.to_q.bias\", \"encoder.mid_block.attentions.0.to_k.weight\", \"encoder.mid_block.attentions.0.to_k.bias\", \"encoder.mid_block.attentions.0.to_v.weight\", \"encoder.mid_block.attentions.0.to_v.bias\", \"encoder.mid_block.attentions.0.to_out.0.weight\", \"encoder.mid_block.attentions.0.to_out.0.bias\", \"decoder.mid_block.attentions.0.to_q.weight\", \"decoder.mid_block.attentions.0.to_q.bias\", \"decoder.mid_block.attentions.0.to_k.weight\", \"decoder.mid_block.attentions.0.to_k.bias\", \"decoder.mid_block.attentions.0.to_v.weight\", \"decoder.mid_block.attentions.0.to_v.bias\", \"decoder.mid_block.attentions.0.to_out.0.weight\", \"decoder.mid_block.attentions.0.to_out.0.bias\". \r\n\tUnexpected key(s) in state_dict: \"encoder.mid_block.attentions.0.key.bias\", \"encoder.mid_block.attentions.0.key.weight\", \"encoder.mid_block.attentions.0.proj_attn.bias\", \"encoder.mid_block.attentions.0.proj_attn.weight\", \"encoder.mid_block.attentions.0.query.bias\", \"encoder.mid_block.attentions.0.query.weight\", \"encoder.mid_block.attentions.0.value.bias\", \"encoder.mid_block.attentions.0.value.weight\", \"decoder.mid_block.attentions.0.key.bias\", \"decoder.mid_block.attentions.0.key.weight\", \"decoder.mid_block.attentions.0.proj_attn.bias\", \"decoder.mid_block.attentions.0.proj_attn.weight\", \"decoder.mid_block.attentions.0.query.bias\", \"decoder.mid_block.attentions.0.query.weight\", \"decoder.mid_block.attentions.0.value.bias\", \"decoder.mid_block.attentions.0.value.weight\".\n```\n\n\n### System Info\n\nthat command does not work for me\n\n### Who can help?\n\n@saya",
    "url": "https://github.com/huggingface/diffusers/issues/7724",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-04-19T13:27:17Z",
    "updated_at": "2024-04-22T08:45:24Z",
    "user": "veraburg"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1821,
    "title": "Idefics2 Support in Optimum for ONNX export",
    "body": "### Feature request\n\nWith reference to the new Idefics2 model- https://huggingface.co/HuggingFaceM4/idefics2-8b \r\nI would like to export it to ONNX which is currently not possible.\r\nPlease enable conversion support. Current Error with pip install transformers via GIT\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/optimum-cli\", line 8, in <module>\r\n    sys.exit(main())\r\n  File \"/usr/local/lib/python3.10/dist-packages/optimum/commands/optimum_cli.py\", line 163, in main\r\n    service.run()\r\n  File \"/usr/local/lib/python3.10/dist-packages/optimum/commands/export/onnx.py\", line 265, in run\r\n    main_export(\r\n  File \"/usr/local/lib/python3.10/dist-packages/optimum/exporters/onnx/__main__.py\", line 352, in main_export\r\n    onnx_export_from_model(\r\n  File \"/usr/local/lib/python3.10/dist-packages/optimum/exporters/onnx/convert.py\", line 1048, in onnx_export_from_model\r\n    raise ValueError(\r\nValueError: Trying to export a idefics2 model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type idefics2 to be supported natively in the ONNX export.\r\n```\r\n\n\n### Motivation\n\nThe model is good and would like to export it to onnx asap\n\n### Your contribution\n\n-",
    "url": "https://github.com/huggingface/optimum/issues/1821",
    "state": "open",
    "labels": [
      "feature-request",
      "onnx"
    ],
    "created_at": "2024-04-19T07:12:41Z",
    "updated_at": "2025-02-18T19:25:11Z",
    "comments": 8,
    "user": "gtx-cyber"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 124452,
    "title": "How to use system cuda/cudnn",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\r\n\r\nI have a machine with cuda/cudnn compatible rocm device.\r\n\r\n```\r\n$ nvcc --version\r\nHIPHSA: Author SUGON\r\nHIP version: 5.4.23453\r\nCuda compilation tools, release 11.8, V11.8.89\r\nclang version 15.0.0 (http://10.15.3.7/dcutoolkit/driverruntime/llvm-project.git 1be90618e508074abc746ab4963d7ad92710d6c5)\r\nTarget: x86_64-unknown-linux-gnu\r\nThread model: posix\r\nInstalledDir: /public/software/compiler/dtk-23.10.1/llvm/bin\r\n```\r\n\r\nThe cuda/cudnn is installed:\r\n\r\n```\r\ncuda]$ ll\r\n\u603b\u7528\u91cf 30\r\ndrwxr-xr-x 3 root root 4096 12\u6708 19 14:20 bin\r\n-rw-r--r-- 1 root root  634 12\u6708  6 20:31 env.sh\r\ndrwxr-xr-x 3 root root 4096 12\u6708 19 14:20 extras\r\nlrwxrwxrwx 1 root root   28 12\u6708 19 14:21 include -> targets/x86_64-linux/include\r\nlrwxrwxrwx 1 root root   24 12\u6708 19 14:21 lib64 -> targets/x86_64-linux/lib\r\ndrwxr-xr-x 3 root root 4096 12\u6708 19 14:20 nvvm\r\ndrwxr-xr-x 5 root root 4096 12\u6708 19 14:21 samples\r\ndrwxr-xr-x 3 root root 4096 12\u6708 19 14:21 src\r\ndrwxr-xr-x 3 root root 4096 12\u6708 19 14:21 targets\r\ndrwxr-xr-x 2 root root 4096 12\u6708 19 14:21 tools\r\n-rw-r--r-- 1 root root   20 12\u6708  6 20:31 version.txt\r\n```\r\n\r\nI then install pytorch 2.2 with cuda 11.8 by:\r\n```\r\npip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118\r\n```\r\n\r\nBut when I import torch, it can\u2019t find cuda device:\r\n\r\n```\r\n$ python\r\nPython 3.11.8 (main, Feb 26 2024, 21:39:34) [GCC 11.2.0] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import torch\r\n>>> torch.cuda.device_count()\r\n0\r\n```\r\nI think the problem is pytorch use the cuda/cudnn runtime lib of its own. But I want it to use system cuda.\r\n\r\nI have set CUDA_HOME and LD_LIBRARY_PATH. But it seems not work.\r\n ",
    "url": "https://github.com/pytorch/pytorch/issues/124452",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-19T03:23:41Z",
    "updated_at": "2024-04-19T15:13:57Z",
    "user": "fancyerii"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 158,
    "title": "How to work with local data",
    "body": "I downloaded a dataset from hf. I want to load it locally, but it still tries to download it from hf and place it into the cache. \r\nHow can I use the local one I already downloaded? \r\n\r\nThank you. ",
    "url": "https://github.com/huggingface/alignment-handbook/issues/158",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-18T10:26:14Z",
    "updated_at": "2024-05-14T11:20:55Z",
    "user": "pretidav"
  },
  {
    "repo": "huggingface/optimum-quanto",
    "number": 182,
    "title": "Can I use quanto on AMD GPU?",
    "body": "Does quanto work with AMD GPUs ?",
    "url": "https://github.com/huggingface/optimum-quanto/issues/182",
    "state": "closed",
    "labels": [
      "question",
      "Stale"
    ],
    "created_at": "2024-04-18T03:06:54Z",
    "updated_at": "2024-05-25T01:49:56Z",
    "user": "catsled"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2680,
    "title": "How to get pytorch_model.bin from ckeckpoint files without zero_to_fp32.py",
    "body": "",
    "url": "https://github.com/huggingface/accelerate/issues/2680",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-17T11:30:32Z",
    "updated_at": "2024-04-18T22:40:14Z",
    "user": "lipiji"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6819,
    "title": "Give more details in `DataFilesNotFoundError` when getting the config names",
    "body": "### Feature request\n\nAfter https://huggingface.co/datasets/cis-lmu/Glot500/commit/39060e01272ff228cc0ce1d31ae53789cacae8c3, the dataset viewer gives the following error:\r\n\r\n```\r\n{\r\n  \"error\": \"Cannot get the config names for the dataset.\",\r\n  \"cause_exception\": \"DataFilesNotFoundError\",\r\n  \"cause_message\": \"No (supported) data files found in cis-lmu/Glot500\",\r\n  \"cause_traceback\": [\r\n    \"Traceback (most recent call last):\\n\",\r\n    \" File \\\"/src/services/worker/src/worker/job_runners/dataset/config_names.py\\\", line 73, in compute_config_names_response\\n config_names = get_dataset_config_names(\\n\",\r\n    \" File \\\"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py\\\", line 347, in get_dataset_config_names\\n dataset_module = dataset_module_factory(\\n\",\r\n    \" File \\\"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\\\", line 1873, in dataset_module_factory\\n raise e1 from None\\n\",\r\n    \" File \\\"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\\\", line 1854, in dataset_module_factory\\n return HubDatasetModuleFactoryWithoutScript(\\n\",\r\n    \" File \\\"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\\\", line 1245, in get_module\\n module_name, default_builder_kwargs = infer_module_for_data_files(\\n\",\r\n    \" File \\\"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\\\", line 595, in infer_module_for_data_files\\n raise DataFilesNotFoundError(\\\"No (supported) data files found\\\" + (f\\\" in {path}\\\" if path else \\\"\\\"))\\n\",\r\n    \"datasets.exceptions.DataFilesNotFoundError: No (supported) data files found in cis-lmu/Glot500\\n\"\r\n  ]\r\n}\r\n```\r\n\r\nbecause the deleted files were still listed in the README, see https://huggingface.co/datasets/cis-lmu/Glot500/discussions/4\r\n\r\nIdeally, the error message would include the name of the first configuration with missing files, to help the user understand how to fix it. Here, it would tell that configuration `aze_Ethi` has no supported data files, instead of telling that the `cis-lmu/Glot500` *dataset* has no supported data files (which is not true).\n\n### Motivation\n\nGiving more detail in the error would help the Datasets Hub users to debug why the dataset viewer does not work.\n\n### Your contribution\n\nNot sure how to best fix this, as there are a lot of loops on the dataset configs in the traceback methods. \"maybe\" it would be easier to handle if the code was completely isolating each config.",
    "url": "https://github.com/huggingface/datasets/issues/6819",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-04-17T11:19:47Z",
    "updated_at": "2024-04-17T11:19:47Z",
    "comments": 0,
    "user": "severo"
  },
  {
    "repo": "pytorch/vision",
    "number": 8382,
    "title": "Regarding IMAGENET1K_V1 and IMAGENET1K_V2 weights",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI found a very strange \"bug\" while I was trying to find similiar instances in a vector database of pictures. The model I used is ResNet50. The problem occurs only when using the` IMAGENET1K_V2` weights, but does not appear when using the legacy `V1` weights (referring to https://pytorch.org/blog/how-to-train-state-of-the-art-models-using-torchvision-latest-primitives/).\r\n\r\nWhen I calculate the **cosine similarity** with `V1` weights for two almost identical pictures I get `values > 0.95`, however when I use `V2` weights with the same pictures I get `values < 0.7`. In layman terms with `V2` identical pictures are not recognized as such anymore. I gave you two example pictures below and the code to reproduce the problem. Does somebody have a concise explanation for this behaviour?\r\n\r\nWhen you increase the size in your `transform.resize((x, y))` the problem gradually begins to vanish, however this is not really a good solution since it produces overhead during inference.\r\n\r\nWould be happy for any insights on this topic :)\r\n\r\n\r\n```\r\nfrom torchvision import models\r\nfrom torchvision.models import ResNet50_Weights\r\nimport torchvision.io\r\nfrom torch import nn\r\nimport numpy as np\r\nfrom numpy.linalg import norm\r\n\r\nclass Identity(nn.Module):\r\n    def __init__(self):\r\n        super(Identity, self).__init__()\r\n\r\n    def forward(self, x):\r\n        return x\r\n\r\n# Get weights\r\nweights = ResNet50_Weights.IMAGENET1K_V1\r\npreprocess = weights.transforms()\r\n\r\nmodel = models.resnet50(weights=ResNet50_Weights.IMAGENET1K_V1).to(\"cuda:0\")\r\nmodel.fc = Identity()\r\n\r\na = model(preprocess(torchvision.io.read_image(\"/raid/..../datasets/lion/lion_ori_small.jpg\").unsqueeze(dim=0).to(\"cuda:0\"))).cpu().detach().numpy().squeeze()\r\nb = model(preprocess(torchvision.io.read_image(\"/raid/.../datasets/lion/lion_fake_small.jpg\").unsqueeze(dim=0).to(\"cuda:0\"))).cpu().detach().numpy().squeeze()\r\ncosine = np.dot(a,b)/(norm(a)*norm(b))\r\n```\r\n\r\n\r\n![lion_fake](https://github.com/pytorch/vision/assets/138434950/36983e9d-61af-41bf-9e88-793d149c0188)\r\n![lion_ori](https://github.com/pytorch/vision/assets/138434950/095e9a5b-0fbe-49eb-820b-41b500f116a8)\r\n\r\n### Versions\r\n\r\ntorchvision 0.19",
    "url": "https://github.com/pytorch/vision/issues/8382",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-17T09:30:50Z",
    "updated_at": "2024-04-17T09:33:44Z",
    "comments": 0,
    "user": "asusdisciple"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2759,
    "title": "\u2753 [Question] How should the CMakeLists look like for running .ts files in C++? ",
    "body": "## \u2753 Question\r\n\r\nI am trying to load a .ts model in C++ on Jetson Orin NX. I am running on this container [https://github.com/dusty-nv/jetson-containers/tree/master/packages/pytorch/torch_tensorrt](), version:[r35.3.1].\r\n```#include <torch/script.h> // One-stop header.\r\n  #include <torch_tensorrt/torch_tensorrt.h>\r\n  \r\n  #include <iostream>\r\n  #include <memory>\r\n  \r\n  int main(int argc, const char* argv[]) {\r\n      torch::jit::Module module;\r\n      try {\r\n          // Deserialize the ScriptModule from a file using torch::jit::load().\r\n          module = torch::jit::load(\"classificator_float.ts\");\r\n      }\r\n      catch (const c10::Error& e) {\r\n          std::cerr << \"error loading the model\\n\";\r\n          return -1;\r\n      }\r\n      std::cout << \"ok\\n\";\r\n  }\r\n  ```\r\n  However, I am struggling to make CMakeLists.txt which would properly include the tensorrt runtime. This is what I currently have:\r\n  \r\n  ```\r\n  cmake_minimum_required(VERSION 3.12 FATAL_ERROR)\r\nproject(custom_ops)\r\n\r\n\r\nexecute_process(\r\n    COMMAND python3 -c \"import torch; print(torch.utils.cmake_prefix_path)\"\r\n    OUTPUT_VARIABLE PYTORCH_CMAKE_PREFIX_PATH\r\n    OUTPUT_STRIP_TRAILING_WHITESPACE\r\n)\r\n\r\nset(CMAKE_PREFIX_PATH \"${PYTORCH_CMAKE_PREFIX_PATH}\")\r\n\r\nfind_package(Torch REQUIRED)\r\n\r\nadd_executable(example-app example-app.cpp)\r\ntarget_include_directories(example-app PRIVATE \"/usr/local/lib/python3.8/dist-packages/torch_tensorrt/include\")\r\ntarget_link_libraries(example-app torch)\r\n\r\nset_property(TARGET example-app PROPERTY CXX_STANDARD 17)\r\n```\r\n \r\nIt builds without issues, however when I try to execute it I get:\r\n![image](https://github.com/pytorch/TensorRT/assets/25930120/cce8809e-49b8-4b8d-9c96-1ec81a7daf15)\r\n\r\nHow should I modify CMakeLists.txt?\r\n\r\n## What you have already tried\r\n\r\nI have looked at these tutorials, but they do not have CMakeLists for running models compiled with TensorRT:\r\n\r\nhttps://pytorch.org/tutorials/advanced/cpp_export.html\r\nhttps://pytorch.org/TensorRT/getting_started/getting_started_with_cpp_api.html\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.0.0+nv23.5\r\n - TensorRT: 8.5.2.2-1\r\n - CPU Architecture: arm64\r\n - OS (e.g., Linux): Ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): jetson-container\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.8.10\r\n - CUDA version: 11.4\r\n - GPU models and configuration: Jetson Orin NX\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2759",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-17T09:15:23Z",
    "updated_at": "2024-04-24T05:39:27Z",
    "user": "DmytroIvakhnenkov"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1818,
    "title": "Request for ONNX Export Support for Blip Model in Optimum",
    "body": "Hi Team, \r\n\r\nI hope this message finds you well. \r\n\r\n I've encountered an issue while attempting to export Blip model into the ONNX format using Optimum. I have used below command.\r\n\r\n`! optimum-cli export onnx -m Salesforce/blip-itm-base-coco --task feature-extraction blip_onnx`\r\n\r\n It appears that Optimum currently lacks support for this functionality, leading to errors during the export process.\r\n\r\n `ValueError: Trying to export a blip model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type blip to be supported natively in the ONNX export`\r\n \r\nCould you kindly provide insights into when we might expect support for exporting Blip models to ONNX to be implemented in Optimum?\r\n\r\nThank you for considering this request. I look forward to any updates or information you can provide on this matter.\r\n ",
    "url": "https://github.com/huggingface/optimum/issues/1818",
    "state": "open",
    "labels": [
      "feature-request",
      "question",
      "onnx"
    ],
    "created_at": "2024-04-17T08:55:45Z",
    "updated_at": "2024-10-14T12:26:36Z",
    "user": "n9s8a"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 715,
    "title": "How to unload/destroy a pipeline?",
    "body": "### Question\n\nI tried to find how to unload a pipeline to free up memory in the documentation, but couldn't find a mention of how to do that properly.\r\n\r\nIf there a proper way to \"unload\" a pipeline?\r\n\r\nI'd be happy to add the answer to the documentation.",
    "url": "https://github.com/huggingface/transformers.js/issues/715",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-16T09:02:05Z",
    "updated_at": "2024-05-29T09:32:23Z",
    "user": "flatsiedatsie"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 211,
    "title": "[Feature request] Support more GGUF tensor formats",
    "body": "Today we support parsing for F16, F32, Q4_0, and Q6_K GGUF tensors (see gguf_util.py).  We'd like to add support for more GGUF quantization formats in https://github.com/ggerganov/llama.cpp/blob/master/ggml-quants.c.\r\n\r\nAdding support for a new format should be straightforward, using Q4_0 and Q6_K as guides.\r\n\r\nFor Q4_0 and Q6_K, we convert GGUF tensors with a class that represents groupwise quantization, e.g., for Q4_0, we have a class as follows:\r\n\r\n```\r\nclass Q4_0:\r\n    groupsize = 32\r\n    n_bit = 4\r\n\r\n    @staticmethod\r\n    def unpack(gguf_tensor: gguf.gguf_reader.ReaderTensor) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]\r\n```\r\n\r\nThe unpack method parses the gguf tensor and returns a tuple of tensors q, s, and z, where\r\n\r\n* q is an tensor of shape (nr, nc) and of type torch.int32, with values in [0, 2^(n_bit)-1] that represents the unsigned quantized values.  It has the shape of the input GGUF tensor, but its shape is reversed to align with how torch stores weights in a state_dict.\r\n\r\n* s is a tensor of shape (nr, ng) and of type torch.float32, where ng = nc // groupsize is the number of groups per row.  It represents the scale per group.\r\n\r\n* z is a tensor of shape (nr, ng) and of type torch.float32, where ng = nc // groupsize is the number of groups per row.  It represents the zero per group.\r\n\r\nTo convert q, s, and z to a float, we do the following calculation:\r\n\r\n```\r\nq_grouped = q.reshape(-1, groupsize)\r\ns = s.reshape(-1, 1) # one per group\r\nz = z.reshape(-1, 1) # one per group\r\n\r\nfloat = q_grouped.sub(2 ** (n_bit - 1)).mul(s).add(z).reshape_as(q)\r\n```\r\n\r\nNote that for Q4_0 and Q6_K, z is a zero vector because these are scale-only quantization schemes.\r\n\r\nTo add a new scheme like Q4_1, we could copy the recipe for Q4_0 nearly exactly.  We need to parse the GGUF block and translate the dequantization logic from https://github.com/ggerganov/llama.cpp/blob/master/ggml-quants.c to python using the bit functions in torch.",
    "url": "https://github.com/pytorch/torchchat/issues/211",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-04-16T01:57:25Z",
    "updated_at": "2024-04-25T18:13:44Z",
    "comments": 0,
    "user": "metascroy"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 124090,
    "title": "Fakeifying a non-leaf subclass where inner tensor is noncontiguous incorrectly produces contiguous tensor.",
    "body": "Minified repro from internal:\r\n```\r\n    def test_dtensor_tensor_is_not_autograd_leaf_but_local_is_noncontiguous(self):\r\n\r\n        # Temporarily ignore setUp(), and use rank3 graphs during tracing\r\n        dist.destroy_process_group()\r\n        fake_store = FakeStore()\r\n        dist.init_process_group(\r\n            \"fake\", store=fake_store, rank=3, world_size=2\r\n        )\r\n        mesh = DeviceMesh(self.device_type, [1, 3])\r\n\r\n        x = torch.randn(10, 257, 160, requires_grad=True)\r\n        x_dt = DTensor.from_local(x, mesh, [_Partial()], run_check=False, shape=(10, 257, 160), stride=(41120, 160, 1))\r\n        tmp_dt = x_dt.redistribute(mesh, (Shard(1),))\r\n\r\n        from torch._subclasses import FakeTensorMode\r\n        m = FakeTensorMode()\r\n        tmp_dt_fake = m.from_tensor(tmp_dt)\r\n        self.assertEqual(tmp_dt.shape, tmp_dt_fake.shape)\r\n        self.assertEqual(tmp_dt.stride(), tmp_dt_fake.stride())\r\n        self.assertEqual(tmp_dt._local_tensor.shape, tmp_dt_fake._local_tensor.shape)\r\n        # This assert **fails**\r\n        # tmp_dt._local_tensor is not contiguous, but tmp_dt_fake._local_tensor advertises as contiguous\r\n        self.assertEqual(tmp_dt._local_tensor.stride(), tmp_dt_fake._local_tensor.stride())\r\n```\n\ncc @ezyang @gchanan @zou3519 @kadeng @msaroufim @anijain2305 @chauhang",
    "url": "https://github.com/pytorch/pytorch/issues/124090",
    "state": "closed",
    "labels": [
      "high priority",
      "triaged",
      "oncall: pt2",
      "module: pt2-dispatcher"
    ],
    "created_at": "2024-04-15T19:11:01Z",
    "updated_at": "2024-05-01T21:56:06Z",
    "user": "bdhirsh"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 714,
    "title": "Reproducing model conversions",
    "body": "### Question\r\n\r\nI'm trying to reproduce the conversion of `phi-1_5_dev` to better understand the process. I'm running into a few bugs / issues along the way that I thought it'd be helpful to document.\r\n\r\nThe model [`@Xenova/phi-1_5_dev`](https://huggingface.co/Xenova/phi-1_5_dev) states:\r\n\r\n> https://huggingface.co/susnato/phi-1_5_dev with ONNX weights to be compatible with Transformers.js.\r\n\r\nI'm doing the following:\r\n\r\n```\r\ngit clone https://github.com/xenova/transformers.js.git && cd transformers.js/scripts\r\ngit clone https://huggingface.co/susnato/phi-1_5_dev\r\npython3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt\r\npython3 convert.py --quantize --model_id phi-1_5_dev --task \"text-generation\"\r\n```\r\n\r\nHere, I hit my first issue - it looks like `transformers` on `pypi` does not support Phi:\r\n\r\n```\r\n    raise KeyError(key)\r\nKeyError: 'phi'\r\n```\r\n\r\nSo I install from Github:\r\n\r\n```\r\npip install git+https://github.com/huggingface/transformers.git\r\n```\r\n\r\nThat produces:\r\n\r\n```\r\nRuntimeError: Failed to import optimum.exporters.onnx.__main__ because of the following error (look up to see its traceback):\r\ncannot import name 'is_torch_less_than_1_11' from 'transformers.pytorch_utils' (/Users/thekevinscott/code/codegen/research/model-conversion/throwaway/transformers.js/scripts/.venv/lib/python3.10/site-packages/transformers/pytorch_utils.py)\r\n```\r\n\r\nI believe `optimum` is also out of date:\r\n\r\n```\r\npip install git+https://github.com/huggingface/optimum.git\r\n```\r\n\r\nWith those two dependencies updated, this command now works:\r\n\r\n```\r\npython3 convert.py --quantize --model_id phi-1_5_dev --task \"text-generation\"\r\n```\r\n\r\nThough there are a few warnings I'm assuming I can ignore:\r\n\r\n```\r\nIgnore MatMul due to non constant B: /[/model/layers.22/self_attn/MatMul]\r\nIgnore MatMul due to non constant B: /[/model/layers.22/self_attn/MatMul_1]\r\nIgnore MatMul due to non constant B: /[/model/layers.23/self_attn/MatMul]\r\nIgnore MatMul due to non constant B: /[/model/layers.23/self_attn/MatMul_1]\r\n```\r\n\r\nHowever, out of the box it can't find the right `onnx` file:\r\n\r\n```\r\nError: `local_files_only=true` or `env.allowRemoteModels=false` and file was not found locally at \"transformers.js/scripts/models/phi-1_5_dev/onnx/decoder_model_merged_quantized.onnx\".\r\n```\r\n\r\nI see in the [`@Xenova` repo history](https://huggingface.co/Xenova/phi-1_5_dev/commit/ae1a980babe16f9d136c22eb119d171dec7c6a09) that the files were manually renamed; I'll try that too:\r\n\r\n```\r\nmv model.onnx decoder_model_merged.onnx\r\nmv model_quantized.onnx decoder_model_merged_quantized.onnx\r\nmv model.onnx_data decoder_model_merged.onnx_data\r\n```\r\n\r\nI then try to run the model with:\r\n\r\n```\r\n  const model = await loadModel('transformers.js/scripts/models/phi-1_5_dev', {\r\n  });\r\n\r\n  const result = await model('Write me a list of numbers:\\n', {\r\n  });\r\n  console.log('result', result);\r\n```\r\n\r\nThe model loads, but upon generating I see:\r\n\r\n```\r\nWARNING: Too many inputs were provided (51 > 3). The following inputs will be ignored: \"past_key_values.0.key, past_key_values.0.value, past_key_values.1.key, past_key_values.1.value, past_key_values.2.key, past_key_values.2.value, past_key_values.3.key, past_key_values.3.value, past_key_values.4.key, past_key_values.4.value, past_key_values.5.key, past_key_values.5.value, past_key_values.6.key, past_key_values.6.value, past_key_values.7.key, past_key_values.7.value, past_key_values.8.key, past_key_values.8.value, past_key_values.9.key, past_key_values.9.value, past_key_values.10.key, past_key_values.10.value, past_key_values.11.key, past_key_values.11.value, past_key_values.12.key, past_key_values.12.value, past_key_values.13.key, past_key_values.13.value, past_key_values.14.key, past_key_values.14.value, past_key_values.15.key, past_key_values.15.value, past_key_values.16.key, past_key_values.16.value, past_key_values.17.key, past_key_values.17.value, past_key_values.18.key, past_key_values.18.value, past_key_values.19.key, past_key_values.19.value, past_key_values.20.key, past_key_values.20.value, past_key_values.21.key, past_key_values.21.value, past_key_values.22.key, past_key_values.22.value, past_key_values.23.key, past_key_values.23.value\".\r\n2024-04-15 11:00:50.956 node[91488:12372370] 2024-04-15 11:00:50.956090 [E:onnxruntime:, sequential_executor.cc:494 ExecuteKernel] Non-zero status code returned while running Gather node. Name:'/model/layers.0/self_attn/Gather_4' Status Message: indices element out of data bounds, idx=8 must be within the inclusive range [-1,0]\r\nAn error occurred during model execution: \"Error: Non-zero status code returned while running Gather node. Name:'/model/layers.0/self_attn/Gather_4' Status Message: indices element out of data bounds, idx=8 must be within the inclusive range [-1,0]\".\r\nInputs given to model: [Object: null prototype] {\r\n  input_ids: Tensor {\r\n    dims: [ 1, 1 ],\r\n    type: 'int64',\r\n    data: BigInt64Array(1) [ 13n ],\r\n    size: 1\r\n  },\r\n  attention_mask: T",
    "url": "https://github.com/huggingface/transformers.js/issues/714",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-15T15:02:33Z",
    "updated_at": "2024-05-10T14:26:00Z",
    "user": "thekevinscott"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2594,
    "title": "What is the maximum number of sentences that a fast cluster can cluster?",
    "body": "What is the maximum number of sentences that a fast cluster can cluster? When I cluster 2 million sentences, the cluster gets killed.",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2594",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-15T09:55:06Z",
    "updated_at": "2024-04-15T09:55:06Z",
    "user": "BinhMinhs10"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2721,
    "title": "Help dataset owner to chose between configs and splits?",
    "body": "See https://huggingface.slack.com/archives/C039P47V1L5/p1713172703779839\r\n\r\n> Am I correct in assuming that if you specify a \"config\" in a dataset, only the given config is downloaded, but if you specify a split, all splits for that config are downloaded? I came across it when using facebook's belebele (https://huggingface.co/datasets/facebook/belebele). Instead of a config for each language, they use a split for each language, but that seems to mean that the full dataset is downloaded, even if you select just one language split.\r\n\r\nFor languages, we recommend using different configs, not splits.\r\n\r\nMaybe we should also show a warning / open a PR/discussion? when a dataset contains more than 5 splits, hinting that it might be better to use configs?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2721",
    "state": "open",
    "labels": [
      "question",
      "P2"
    ],
    "created_at": "2024-04-15T09:51:43Z",
    "updated_at": "2024-05-24T15:17:51Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/serve",
    "number": 3086,
    "title": "How to modify torchserve\u2019s Python runtime from 3.8.0 to 3.10",
    "body": "### \ud83d\udcda The doc issue\n\nMy handle uses the syntax of Python 3.10, but the log shows Python runtime: 3.8.0. causing the model to fail to run. I would like to ask how to convert its environment to Python 3.10. I have introduced the dependencies of the Python 3.10 version into the corresponding dockerfile.\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/3086",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2024-04-15T05:39:53Z",
    "updated_at": "2024-04-23T17:26:08Z",
    "user": "pengxin233"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7676,
    "title": "How to determine the type of file, such as checkpoint, etc.",
    "body": "Hello.\r\nIs there some kind of script that determines the type of file \"checkpoint\", \"LORA\", \"textual_inversion\", etc.?",
    "url": "https://github.com/huggingface/diffusers/issues/7676",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-14T23:58:08Z",
    "updated_at": "2024-04-15T02:50:43Z",
    "user": "suzukimain"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7670,
    "title": "How to use IDDPM in diffusers ?",
    "body": "The code base is here:\r\nhttps://github.com/openai/improved-diffusion/blob/main/improved_diffusion/gaussian_diffusion.py",
    "url": "https://github.com/huggingface/diffusers/issues/7670",
    "state": "closed",
    "labels": [
      "should-move-to-discussion"
    ],
    "created_at": "2024-04-14T12:30:34Z",
    "updated_at": "2024-11-20T00:17:18Z",
    "user": "jiarenyf"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 174,
    "title": "core dump in ci",
    "body": "\r\nWe get quite repeatable core dumps with a segmentation fault, e.g., here https://github.com/pytorch/torchat/actions/runs/8676531709/job/23791140949?pr=171\r\n\r\n/home/runner/work/_temp/aa3d75e7-8cff-4789-ba8a-71b211235396.sh: line 4:  2369 Segmentation fault      (core dumped) python generate.py --dtype ${DTYPE} --checkpoint-path ${MODEL_PATH} --temperature 0 --dso-path ${MODEL_DIR}/${MODEL_NAME}.so > ./output_aoti\r\n\r\nThis is Python so even if the input programs are broken, it should not core dump but report an error.  \r\n\r\nIn terms of actionabile next steps, how do we get the core dump and debug this?\r\n\r\ncc: @malfet @guangy10 @seemethere ",
    "url": "https://github.com/pytorch/torchchat/issues/174",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-14T07:39:12Z",
    "updated_at": "2024-04-25T08:07:14Z",
    "comments": 2,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 713,
    "title": "Help understanding logits and model vocabs",
    "body": "### Question\r\n\r\nI'm trying to write a custom `LogitsProcessor` and have some questions. For reference, I'm using [`Xenova/phi-1_5_dev`](https://huggingface.co/Xenova/phi-1_5_dev). I'm trying to implement a custom logic for white or blacklisting tokens, but running into difficulties understanding how to interpret token ids, tokens, and their decoded counterparts.\r\n\r\nHere's what I think I understand:\r\n\r\n- [The vocab file is defined at `vocab.json`](https://huggingface.co/Xenova/phi-1_5_dev/blob/main/vocab.json), and has 50,257 entries. \r\n- This file is exposed on `pipeline.tokenizer.vocab`, translated from the object representation of `vocab.json` (`{ token: tokenID }`), to an array of `token`s whose indices correspond to `tokenID`. \r\n  - **Question:** `vocab.json` has 50,257 entries, but `pipeline.tokenizer.vocab` has 50,295 entries. Is this because `pipeline.tokenizer.vocab` _also_ includes `added_tokens.json`?\r\n  - And [`special_tokens_map.json`](https://huggingface.co/Xenova/phi-1_5_dev/blob/main/special_tokens_map.json) is already included in `vocab.json` it appears\r\n- The tokens in the vocab file must be decoded before being displayed\r\n  - for example, the token in `vocab.json` at `50255` is `\"\u0120gazed\"`, but if I decode this character by character (`pipeline.tokenizer.decoder.byte_decoder('\u0120')` becomes `32` which corresponds to a space `\" \"`) I get `\" gazed\"`. I _think_ these correspond to code points.\r\n- The `logits` argument contains scores where the index of each score is the `tokenID`. So setting the score at position `50255` to `-Infinity` should ensure that the token `\"\u0120gazed\"` (or, decoded, `\" gazed\"`) should never appear.\r\n- The `logits` argument I'm getting back for this model in my `LogitsProcessor` has dimensions of `[51200,]`. `pipeline.tokenizer.vocab` has size of is 50,295. That would seem to indicate 905 unused tokens at the end of the tensor; can these be safely ignored, or do they correspond to something important that I'm missing?\r\n\r\nI'd appreciate any insight or feedback on whether my assumptions above are correct or not. Thank you!",
    "url": "https://github.com/huggingface/transformers.js/issues/713",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-13T21:06:14Z",
    "updated_at": "2024-04-14T15:17:43Z",
    "user": "thekevinscott"
  },
  {
    "repo": "pytorch/audio",
    "number": 3773,
    "title": "DEVICE AV-ASR WITH EMFORMER RNN-T tutorial : avsr not found",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi, I am trying the device av-asr tutorial (https://pytorch.org/audio/stable/tutorials/device_avsr.html). When I trying to run the codes in the tutorial, it shows \"no module named avsr\" when executing the following code:\r\n\r\n`from avsr.data_prep.detectors.mediapipe.detector import LandmarksDetector`.\r\n\r\n**I have tried to locate the avsr library, but seems there is no related repository to install or include. Would like to know where can I find this avsr library? Seems it is already been removed from pip / conda?** \r\n\r\nPlus, there is a line of code : `sys.path.insert(0,\u201c/../../examples)`, I would also like to know what is the purpose of this directory? Is it OK to change it with other directory?\r\n\r\n\n\n### Versions\n\n2024-04-13 22:29:37 (1.54 MB/s) - \u2018collect_env.py\u2019 saved [22068/22068]\r\n\r\nCollecting environment information...\r\nPyTorch version: 2.2.1+cu121\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 22.04.4 LTS (x86_64)\r\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\r\nClang version: Could not collect\r\nCMake version: version 3.22.1\r\nLibc version: glibc-2.35\r\n\r\nPython version: 3.11.7 (main, Dec 15 2023, 18:12:31) [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-6.5.0-27-generic-x86_64-with-glibc2.35\r\nIs CUDA available: True\r\nCUDA runtime version: 12.4.99\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 4080 SUPER\r\nNvidia driver version: 550.54.14\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.7\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.7\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.7\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.7\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.7\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.7\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.7\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                       x86_64\r\nCPU op-mode(s):                     32-bit, 64-bit\r\nAddress sizes:                      46 bits physical, 48 bits virtual\r\nByte Order:                         Little Endian\r\nCPU(s):                             32\r\nOn-line CPU(s) list:                0-31\r\nVendor ID:                          GenuineIntel\r\nModel name:                         Intel(R) Core(TM) i9-14900K\r\nCPU family:                         6\r\nModel:                              183\r\nThread(s) per core:                 2\r\nCore(s) per socket:                 24\r\nSocket(s):                          1\r\nStepping:                           1\r\nCPU max MHz:                        6000.0000\r\nCPU min MHz:                        800.0000\r\nBogoMIPS:                           6374.40\r\nFlags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr ibt flush_l1d arch_capabilities\r\nVirtualization:                     VT-x\r\nL1d cache:                          896 KiB (24 instances)\r\nL1i cache:                          1.3 MiB (24 instances)\r\nL2 cache:                           32 MiB (12 instances)\r\nL3 cache:                           36 MiB (1 instance)\r\nNUMA node(s):                       1\r\nNUMA node0 CPU(s):                  0-31\r\nVulnerability Gather data sampling: Not affected\r\nVulnerability Itlb multihit:        Not affected\r\nVulnerability L1tf:                 Not affected\r\nVulnerability Mds:                  Not affected\r\nVulnerability Meltdown:             Not affected\r\nVulnerability Mmio stale data:      Not affected\r\nVulnerability Retbleed:             Not affected\r\nVulnerability Spec rstack overflow: Not affected\r\nVulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl\r\nVulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization\r\nVulnerability Spectre v2:           Mitigation; Enhanced / Automatic IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence\r\nVulnerability Srbds:                Not affected\r\nVulnerability Tsx async abort:      Not affected\r\n\r\nVersions of relevant libraries:\r\n[pip3] flake8==6.",
    "url": "https://github.com/pytorch/audio/issues/3773",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-13T14:31:19Z",
    "updated_at": "2024-04-13T14:37:11Z",
    "comments": 0,
    "user": "sfcgta4794"
  },
  {
    "repo": "huggingface/lighteval",
    "number": 155,
    "title": "How to run 30b plus model with lighteval when accelerate launch failed? OOM",
    "body": "CUDA Memory OOM when I launch an evaluation for 30b model using lighteval.\r\n\r\n\r\nWhats the correct config for it?",
    "url": "https://github.com/huggingface/lighteval/issues/155",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-13T03:49:20Z",
    "updated_at": "2024-05-04T11:18:38Z",
    "user": "xiechengmude"
  },
  {
    "repo": "huggingface/transformers",
    "number": 30213,
    "title": "Mamba: which tokenizer has been saved and how to use it?",
    "body": "### System Info\n\nHardware independent.\n\n### Who can help?\n\n@ArthurZucker \r\n\r\nI described the doubts in the link below around 1 month ago, but maybe model-hub discussions are not so active. Then I post it here as repo issue. Please, let me know where to discuss it :)\r\n\r\nhttps://huggingface.co/state-spaces/mamba-2.8b-hf/discussions/1\r\n\r\nThanks!\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n.\n\n### Expected behavior\n\n.",
    "url": "https://github.com/huggingface/transformers/issues/30213",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-12T11:28:17Z",
    "updated_at": "2024-05-17T13:13:12Z",
    "user": "javiermcebrian"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2587,
    "title": "Implementing Embedding Quantization for Dynamic Serving Contexts",
    "body": "I'm currently exploring embedding quantization strategies to enhance storage and computation efficiency while maintaining high accuracy. Specifically, I'm looking at integrating these strategies with Infinity (https://github.com/michaelfeil/infinity/discussions/198), a high-throughput, low-latency REST API for serving vector embeddings. \r\n\r\nHere is the quantization method I want to use from sentence-transformers (specifically scalar int8, because binary quant. also reduces the vector dimensions, something I do not want to keep the accuracy high): https://sbert.net/examples/applications/embedding-quantization/README.html\r\n\r\nSo this is what I want to apply:\r\n```\r\nfrom sentence_transformers import SentenceTransformer\r\nfrom sentence_transformers.quantization import quantize_embeddings\r\nfrom datasets import load_dataset\r\n\r\n# 1. Load an embedding model\r\nmodel = SentenceTransformer(\"mixedbread-ai/mxbai-embed-large-v1\")\r\n\r\n# 2. Prepare an example calibration dataset\r\ncorpus = load_dataset(\"nq_open\", split=\"train[:1000]\")[\"question\"]\r\ncalibration_embeddings = model.encode(corpus)\r\n\r\n# 3. Encode some text without quantization & apply quantization afterwards\r\nembeddings = model.encode([\"I am driving to the lake.\", \"It is a beautiful day.\"])\r\nint8_embeddings = quantize_embeddings(\r\n    embeddings,\r\n    precision=\"int8\",\r\n    calibration_embeddings=calibration_embeddings,\r\n)\r\n```\r\n\r\nThe main challenge for me which arises with scalar quantization is, that it requires a calibration dataset to compute min and max values, making the embedding process stateful. This conflicts with the need for a flexible, dynamic serving via the Infinity API, which typically handles embeddings on the fly. So this embedding API I created is used by various other services which have different types of datasets. Therefore I am looking for a way to not need such calibration dataset.\r\n\r\nI am seeking advice on:\r\n\r\n- Managing the statefulness introduced by scalar quantization.\r\n- Alternative strategies that might be more suitable for dynamic environments where embeddings are generated on demand.\r\n- Any guidance or suggestions on how to tackle these issues would be greatly appreciated.\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2587",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-11T11:03:23Z",
    "updated_at": "2024-04-12T07:28:48Z",
    "user": "Nookbe"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7636,
    "title": "how to use the controlnet sdxl tile model in diffusers",
    "body": "### Describe the bug\n\nI want to use [this model](https://huggingface.co/TTPlanet/TTPLanet_SDXL_Controlnet_Tile_Realistic_V1) to make my slightly blurry photos clear, so i found this model. \r\nI follow the code [here](https://huggingface.co/lllyasviel/control_v11f1e_sd15_tile) , but as the model mentioned above is XL not 1.5 , so i change the code, but it error.\n\n### Reproduction\n\nimport torch\r\nfrom PIL import Image\r\nfrom diffusers import ControlNetModel, DiffusionPipeline, StableDiffusionXLControlNetPipeline\r\n\r\ndef resize_for_condition_image(input_image: Image, resolution: int):\r\n    input_image = input_image.convert(\"RGB\")\r\n    W, H = input_image.size\r\n    k = float(resolution) / min(H, W)\r\n    H *= k\r\n    W *= k\r\n    H = int(round(H / 64.0)) * 64\r\n    W = int(round(W / 64.0)) * 64\r\n    img = input_image.resize((W, H), resample=Image.LANCZOS)\r\n    return img\r\n\r\ncontrolnet = ControlNetModel.from_pretrained('/mnt/asian-t2i/pretrained_models/TTPLanet_SDXL_Controlnet_Tile_Realistic_V1', \r\n                                             torch_dtype=torch.float16, use_safetensors = True)\r\n\r\npipe = DiffusionPipeline.from_pretrained(\"/mnt/asian-t2i/pretrained_models/RealVisXL_V3.0\",\r\n                                        custom_pipeline=\"stable_diffusion_controlnet_img2img\",\r\n                                        controlnet=controlnet,\r\n                                        torch_dtype=torch.float16,).to('cuda')\r\n\r\npipe.enable_xformers_memory_efficient_attention()\r\n\r\nsource_image = Image.open(\"/mnt/asian-t2i/data/luchuan/1024/0410-redbook-luchuan-6.jpg\")\r\n\r\ncondition_image = resize_for_condition_image(source_image, 1024)\r\n\r\nimage = pipe(\r\n            prompt=\"best quality\", \r\n            negative_prompt=\"blur, lowres, bad anatomy, bad hands, cropped, worst quality\", \r\n            image=condition_image, \r\n            controlnet_conditioning_image=condition_image, \r\n            width=condition_image.size[0],\r\n            height=condition_image.size[1],\r\n            strength=1.0,\r\n            generator=torch.manual_seed(0),\r\n            num_inference_steps=32,\r\n            ).images[0]\r\n\r\nimage.save('output.png')\r\n\n\n### Logs\n\n```shell\n/opt/conda/lib/python3.10/site-packages/huggingface_hub/file_download.py:678: FutureWarning: 'cached_download' is the legacy way to download files from the HF hub, please consider upgrading to 'hf_hub_download'\r\n  warnings.warn(\r\nLoading pipeline components...: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5/5 [00:02<00:00,  2.00it/s]\r\nYou have disabled the safety checker for <class 'diffusers_modules.git.stable_diffusion_controlnet_img2img.StableDiffusionControlNetImg2ImgPipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .\r\n  0%|                                                                                                                                                             | 0/32 [00:00<?, ?it/s]\r\nTraceback (most recent call last):\r\n  File \"/mnt/asian-t2i/demo.py\", line 31, in <module>\r\n    image = pipe(\r\n  File \"/opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py\", line 115, in decorate_context\r\n    return func(*args, **kwargs)\r\n  File \"/root/.cache/huggingface/modules/diffusers_modules/git/stable_diffusion_controlnet_img2img.py\", line 839, in __call__\r\n    down_block_res_samples, mid_block_res_sample = self.controlnet(\r\n  File \"/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1511, in _wrapped_call_impl\r\n    return self._call_impl(*args, **kwargs)\r\n  File \"/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1520, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"/mnt/asian-t2i/diffusers/src/diffusers/models/controlnet.py\", line 775, in forward\r\n    if \"text_embeds\" not in added_cond_kwargs:\r\nTypeError: argument of type 'NoneType' is not iterable\n```\n\n\n### System Info\n\nName: diffusers\r\nVersion: 0.27.0.dev0\n\n### Who can help?\n\n@sayakpaul @yiyixuxu @DN6 ",
    "url": "https://github.com/huggingface/diffusers/issues/7636",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2024-04-11T03:20:42Z",
    "updated_at": "2024-06-29T13:26:58Z",
    "user": "xinli2008"
  },
  {
    "repo": "huggingface/optimum-quanto",
    "number": 161,
    "title": "Question: any plan to formally support smooth quantization and make it more general",
    "body": "Awesome work!\r\n\r\nI noticed there are smooth quant implemented under [external](https://github.com/huggingface/quanto/tree/main/external/smoothquant).  Currently, its implementation seems to be model-specific, we can only apply smooth on special `Linear`. \r\nHowever, in general, the smooth can be applied on any `Linear` by inserting a `mul`. Are there any plans to officially support smooth quantization in-tree? My initial thought was, is it possible to define a `SmoothTensor` and use `__torch_dispatch__` to override the `bmm` behavior?",
    "url": "https://github.com/huggingface/optimum-quanto/issues/161",
    "state": "closed",
    "labels": [
      "question",
      "Stale"
    ],
    "created_at": "2024-04-11T02:45:31Z",
    "updated_at": "2024-05-18T01:49:52Z",
    "user": "yiliu30"
  },
  {
    "repo": "pytorch/xla",
    "number": 6916,
    "title": "SPMD + Dynamo",
    "body": "## \u2753 Questions and Help\r\n\r\nIs there a way to get SPMD working with Dynamo/`torch.compile` to reduce the overhead of Pytorch re-tracing the module every time it gets called?",
    "url": "https://github.com/pytorch/xla/issues/6916",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-11T01:50:44Z",
    "updated_at": "2024-04-12T19:50:56Z",
    "comments": 4,
    "user": "BitPhinix"
  },
  {
    "repo": "pytorch/vision",
    "number": 8372,
    "title": "Nightly build flaky pytorch/vision / conda-py3_11-cpu builds",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nFlaky issue on pytorch/vision / conda-py3_11-cpu builds. Has been happening for a while now.\r\nMost likely due  to corrupt worker environment:\r\n\r\n```\r\n+ __conda_exe run -p /Users/ec2-user/runner/_work/_temp/pytorch_pkg_helpers_8521283920_smoke python3 pytorch/vision/test/smoke_test.py\r\n+ /opt/homebrew/Caskroom/miniconda/base/bin/conda run -p /Users/ec2-user/runner/_work/_temp/pytorch_pkg_helpers_8521283920_smoke python3 pytorch/vision/test/smoke_test.py\r\n/Users/ec2-user/.local/lib/python3.11/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: ''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?\r\n  warn(\r\ntorchvision: 0.19.0a0+480eec2\r\nTraceback (most recent call last):\r\n  File \"/Users/ec2-user/runner/_work/vision/vision/pytorch/vision/test/smoke_test.py\", line 103, in <module>\r\n    main()\r\n  File \"/Users/ec2-user/runner/_work/vision/vision/pytorch/vision/test/smoke_test.py\", line 83, in main\r\n    print(f\"{torch.ops.image._jpeg_version() = }\")\r\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/Users/ec2-user/runner/_work/_temp/pytorch_pkg_helpers_8521283920_smoke/lib/python3.11/site-packages/torch/_ops.py\", line 927, in __getattr__\r\n    raise AttributeError(\r\nAttributeError: '_OpNamespace' 'image' object has no attribute '_jpeg_version'\r\n\r\nERROR conda.cli.main_run:execute(124): `conda run python3 pytorch/vision/test/smoke_test.py` failed. (See above for error)\r\ntorch.cuda.is_available: False\r\n```\r\n\r\nRerun is ususally successful \r\n\r\n### Versions\r\n\r\n0.19.0",
    "url": "https://github.com/pytorch/vision/issues/8372",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-10T15:48:12Z",
    "updated_at": "2024-04-10T15:49:09Z",
    "comments": 1,
    "user": "atalman"
  },
  {
    "repo": "pytorch/serve",
    "number": 3078,
    "title": "Serve multiple models with both CPU and GPU",
    "body": "Hi guys, I have a question: Can I serve several models (about 5 - 6 models) using both CPU and GPU inference?",
    "url": "https://github.com/pytorch/serve/issues/3078",
    "state": "open",
    "labels": [
      "question",
      "triaged"
    ],
    "created_at": "2024-04-10T15:03:35Z",
    "updated_at": "2025-01-12T06:29:51Z",
    "user": "hungtrieu07"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2647,
    "title": "How to use deepspeed with dynamic batch?",
    "body": "### System Info\n\n```Shell\n- `Accelerate` version: 0.29.1\r\n- Platform: Linux-5.19.0-46-generic-x86_64-with-glibc2.35\r\n- `accelerate` bash location: /home/yuchao/miniconda3/envs/TorchTTS/bin/accelerate\r\n- Python version: 3.10.13\r\n- Numpy version: 1.23.5\r\n- PyTorch version (GPU?): 2.2.2+cu118 (True)\r\n- PyTorch XPU available: False\r\n- PyTorch NPU available: False\r\n- PyTorch MLU available: False\r\n- System RAM: 125.48 GB\r\n- GPU type: NVIDIA GeForce RTX 4090\r\n- `Accelerate` default config:\r\n  gradient_accumulation_steps: 1\r\n  gradient_clipping: 1.0\r\n  offload_optimizer_device: none\r\n  offload_param_device: none\r\n  zero3_init_flag: false\r\n  zero_stage: 2\n```\n\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nFor sequence task, we always use dynamic batch to group long sequence to small batches while group short sequence to large batches. But deepspeed here needs to specify either `batch_size` or `train_micro_batch_size_per_gpu` which is unavailable for use. Any idea to fix that?\r\n```\r\nWhen using DeepSpeed, `accelerate.prepare()` requires you to pass at least one of training or evaluation dataloaders with `batch_size` attribute returning an integer value or alternatively set an integer value in `train_micro_batch_size_per_gpu` in the deepspeed config file or assign integer value to `AcceleratorState().deepspeed_plugin.deepspeed_config['train_micro_batch_size_per_gpu']`.\r\n```\n\n### Expected behavior\n\nBe able to train deepspeed with dynamic batch",
    "url": "https://github.com/huggingface/accelerate/issues/2647",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-10T09:09:53Z",
    "updated_at": "2025-05-11T15:07:27Z",
    "user": "npuichigo"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 690,
    "title": "Is top-level await necessary in the v3 branch?",
    "body": "### Question\r\n\r\nI saw the excellent performance of WebGPU, so I tried to install xenova/transformers.js#v3 as a dependency in my project.\r\n\r\nI found that v3 uses the top-level await syntax. If I can't restrict users to using the latest browser version, I have to make it compatible (using `vite-plugin-top-level-await` or `rollup-plugin-tla`).\r\n\r\nIs it possible to use other methods instead of top-level await? Or is this project not intended to support users who do not have support for top-level await?\r\n\r\nThanks.",
    "url": "https://github.com/huggingface/transformers.js/issues/690",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-10T08:49:32Z",
    "updated_at": "2024-04-11T17:18:42Z",
    "user": "ceynri"
  },
  {
    "repo": "huggingface/optimum-quanto",
    "number": 158,
    "title": "How dose quanto support int8 conv2d and linear?",
    "body": "Hi, I look into the code and didn't find any cuda kernel related to conv2d and linear. How did you implement the cuda backend for conv2d/linear? Thanks",
    "url": "https://github.com/huggingface/optimum-quanto/issues/158",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-10T05:41:43Z",
    "updated_at": "2024-04-11T09:26:35Z",
    "user": "zhexinli"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 689,
    "title": "Abort the audio recognition process",
    "body": "### Question\n\nHello! How can I stop the audio file recognition process while leaving the loaded model? If I terminate the worker I have to reload the model to start the process of recognizing a new audio file. I need either functionality to be able to send a pipeline command to stop the recognition process, or the ability to first load the model and then pass it as an object to the pipeline. Thank you.",
    "url": "https://github.com/huggingface/transformers.js/issues/689",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-10T02:51:37Z",
    "updated_at": "2024-04-20T06:09:11Z",
    "user": "innoware11"
  },
  {
    "repo": "huggingface/transformers",
    "number": 30154,
    "title": "Question about how to write code for trainer and dataset for multi-gpu ",
    "body": "### System Info\n\n- Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.29\r\n- Python version: 3.8.10\r\n- Huggingface_hub version: 0.20.3\r\n- Safetensors version: 0.4.2\r\n- Accelerate version: 0.27.2\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nHi I have a quick question on how to write code for dataset and trainer for multi-gpu setting.\r\n\r\nHere is my workflow.\r\n\r\n\r\nI have a dataset where I called \r\n``` \r\ndataset = dataset.load_dataset(...) \r\n```\r\nI need to do some preprocessing for it and the dataset becomes an Iterable dataset. \r\nand then I pass the dataset into the trainer like \r\n```\r\ntrainer = Trainer(train_data=dataset)\r\ntrainer.train()\r\n```\r\n\r\nMy question is since I am running on multi-gpu and use command \r\n```\r\ntorchrun --standalone --nnodes=1 --nproc_per_node=2 train_lora.py\r\n```\r\nTwo process is executing the same code above and this cause dataset and trainer created twice. Should the dataset and trainer be created once or twice? If created once, should I wrapper all the code like that?\r\n\r\n```\r\nif accelerator.is_main_process:\r\n   dataset = dataset.load_dataset(...) \r\n   trainer = Trainer(train_data=dataset)\r\n   trainer.train()\r\n````\r\nI do observe that we only use 1 dataset for generating the samples even if we create two dataset object and do not wrap accelerator.is_main_process. That is because the dataset already convert by trainer for distributed training.  So I think there is no point for creating dataset twice since we only use the first dataset. How to write the code such that there is no error on the second process? if I make second process dataset is None, the trainer will give error for dataset is empty\r\nDo we need to create two trainer where each trainer is corresponding to one gpu or should we only have one trainer that is in charge for two gpu?   What is the best way to write the code to achieve this in this case? \r\n\r\n \r\n\n\n### Expected behavior\n\nthe correct way of implement this situation. ",
    "url": "https://github.com/huggingface/transformers/issues/30154",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-10T00:08:00Z",
    "updated_at": "2024-04-10T22:57:53Z",
    "user": "zch-cc"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2643,
    "title": "How to use gather_for_metrics for object detection models?",
    "body": "### Reproduction\r\n\r\nI used the `gather_for_metrics` function as follows:\r\n```python\r\npredictions, ground_truths = accelerator.gather_for_metrics((predictions, ground_truths))\r\n```\r\n\r\nAnd i've got the error:\r\n```\r\naccelerate.utils.operations.DistributedOperationException: Impossible to apply the desired operation due to inadequate shapes. All shapes on the devices must be valid.\r\n```\r\n\r\n* ground_truths are dictionaries of torch.tensor with keys: `boxes`, `labels`, `image_id`, `area`, `iscrowd` following pytorch conventions: https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html. \r\n\r\n* predictions are dictionaries of torch.tensor with `boxes`, `labels` and `scores` keys.\r\n\r\nI use 3 gpus, and in each I have 120 dictionaries of predictions and ground truths, but as expected inside each dictionary the tensor size should vary from 0 to n bbox predictions/ground truths.\r\nBut during gather_predictions, the `verify_operation` decorator raises an  because all the tensor shapes inside the different dictionaries vary.\r\n\r\n### Expected behavior\r\n\r\nHave the possibility to gather complex objects like dictionaries of torch.tensor with different shapes!\r\n\r\nThank you for your help and for this amazing framework \ud83d\ude4f ",
    "url": "https://github.com/huggingface/accelerate/issues/2643",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-09T23:15:20Z",
    "updated_at": "2024-04-30T07:48:36Z",
    "user": "yann-rdgz"
  },
  {
    "repo": "pytorch/torchx",
    "number": 875,
    "title": "Fix Nightly push permissions",
    "body": "## \u2753 Questions and Help\r\n\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nBefore submitting, please ensure you have gone through our\r\n[documentation](https://pytorch.org/torchx).\r\n\r\n\r\n### Question\r\n<!-- your question here -->\r\n\r\nIs it possible to fix the nightly push permissions? Many pr have been merged into main, but last nightly release was from 2024.2.12 (https://pypi.org/project/torchx-nightly/)\r\n\r\nCurrently nightly push is failing due to:\r\n\r\n```\r\nERROR    HTTPError: 403 Forbidden from https://upload.pypi.org/legacy/          \r\n         The user 'd4l3k' isn't allowed to upload to project 'torchx-nightly'.  \r\n         See https://pypi.org/help/#project-name for more information.          \r\n```\r\n(https://github.com/pytorch/torchx/actions/runs/8614806013/job/23608993087#step:6:473)\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/875",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-09T19:38:04Z",
    "updated_at": "2024-04-10T18:26:16Z",
    "comments": 6,
    "user": "ryxli"
  },
  {
    "repo": "huggingface/candle",
    "number": 2033,
    "title": "How to use CUDA as the backend in `candle-wasm-examples/llama2-c` ?",
    "body": "How to use CUDA as the backend in `candle-wasm-examples/llama2-c` ?\r\n\r\nIn `candle-wasm-examples/llama2-c`, I do some changes shown below.\r\n\r\n```diff\r\n--- a/candle-wasm-examples/llama2-c/Cargo.toml\r\n+++ b/candle-wasm-examples/llama2-c/Cargo.toml\r\n@@ -9,7 +9,7 @@ categories.workspace = true\r\n license.workspace = true\r\n\r\n [dependencies]\r\n-candle = { workspace = true }\r\n+candle = { workspace = true, features = [\"cuda\"] }\r\n candle-nn = { workspace = true }\r\n candle-transformers = { workspace = true }\r\n num-traits = { workspace = true }\r\n\r\n```\r\n```diff\r\n--- a/candle-wasm-examples/llama2-c/src/bin/m.rs\r\n+++ b/candle-wasm-examples/llama2-c/src/bin/m.rs\r\n@@ -14,7 +14,7 @@ pub struct Model {\r\n impl Model {\r\n     fn process(&mut self, tokens: &[u32]) -> candle::Result<String> {\r\n         const REPEAT_LAST_N: usize = 64;\r\n-        let dev = Device::Cpu;\r\n+        let dev = Device::new_cuda(0)?;\r\n         let input = Tensor::new(tokens, &dev)?.unsqueeze(0)?;\r\n         let logits = self.inner.llama.forward(&input, tokens.len())?;\r\n         let logits = logits.squeeze(0)?;\r\n```\r\n```diff\r\n--- a/candle-wasm-examples/llama2-c/src/worker.rs\r\n+++ b/candle-wasm-examples/llama2-c/src/worker.rs\r\n@@ -65,7 +65,7 @@ impl Model {\r\n         top_p: f64,\r\n         prompt: String,\r\n     ) -> Result<()> {\r\n-        let dev = Device::Cpu;\r\n+        let dev = Device::new_cuda(0)?;\r\n         let temp = if temp <= 0. { None } else { Some(temp) };\r\n         let top_p = if top_p <= 0. || top_p >= 1.0 {\r\n             None\r\n@@ -248,7 +248,7 @@ impl TransformerWeights {\r\n\r\n impl Model {\r\n     pub fn load(md: ModelData) -> Result<Self> {\r\n-        let dev = Device::Cpu;\r\n+        let dev = Device::new_cuda(0)?;\r\n         let mut model = std::io::Cursor::new(md.model);\r\n         let config = Config::from_reader(&mut model)?;\r\n         let weights = TransformerWeights::from_reader(&mut model, &config, &dev)?;\r\n```\r\nBut when I execute `trunk serve --release --public-url / --port 8080`, some errors occur.\r\n```shell\r\n  = note: rust-lld: error: unable to find library -lcuda\r\n          rust-lld: error: unable to find library -lnvrtc\r\n          rust-lld: error: unable to find library -lcurand\r\n          rust-lld: error: unable to find library -lcublas\r\n          rust-lld: error: unable to find library -lcublasLt\r\n\r\n\r\nerror: could not compile `candle-wasm-example-llama2` (bin \"worker\") due to 1 previous error\r\n2024-04-09T16:12:09.062364Z ERROR error\r\nerror from build pipeline\r\n\r\nCaused by:\r\n    0: HTML build pipeline failed (2 errors), showing first\r\n    1: error from asset pipeline\r\n    2: running cargo build\r\n    3: error during cargo build execution\r\n    4: cargo call to executable 'cargo' with args: '[\"build\", \"--target=wasm32-unknown-unknown\", \"--manifest-path\", \"/work/training/candle/candle-wasm-examples/llama2-c/Cargo.toml\", \"--bin\", \"worker\"]' returned a bad status: exit status: 101\r\n```\r\nHow should I solve the above problem?\r\n\r\n I confirm that my CUDA installed correctly and I'm able to execute the following commands.\r\n```shell\r\ncargo new myapp\r\ncd myapp\r\ncargo add --git https://github.com/huggingface/candle.git candle-core --features \"cuda\"\r\ncargo build\r\n```\r\n",
    "url": "https://github.com/huggingface/candle/issues/2033",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-09T16:16:55Z",
    "updated_at": "2024-04-12T08:26:24Z",
    "user": "wzzju"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1804,
    "title": "advice for simple onnxruntime script for ORTModelForVision2Seq (or separate encoder/decoder)",
    "body": "I am trying to use implement this [class ](https://github.com/huggingface/optimum/blob/69af5dbab133f2e0ae892721759825d06f6cb3b7/optimum/onnxruntime/modeling_seq2seq.py#L1832) in C++ because unfortunately I didn't find any C++ implementation for this. \r\n\r\nTherefore, my current approach is to revert this class and the auxiliary classes to a simple onnxruntime prediction, to make things easier to port to C++. \r\n\r\nDoes anyone have any advice in this matter? Thank you\r\n",
    "url": "https://github.com/huggingface/optimum/issues/1804",
    "state": "open",
    "labels": [
      "question",
      "onnxruntime"
    ],
    "created_at": "2024-04-09T15:14:40Z",
    "updated_at": "2024-10-14T12:41:15Z",
    "user": "eduardatmadenn"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 997,
    "title": "Community Assistants",
    "body": "Hi, I've looked through all the possible issues but I didn't find what I was looking for. \r\n\r\nOn self-hosted is the option to have the community assistants such as the ones on https://huggingface.co/chat/ not available? I've also noticed that when I create Assistants on my side they do not show up on community tabs either they are purely user restricted, I am missing something? I've configured the hf token and the API base, any hints are appreciated.\r\n\r\n![image](https://github.com/huggingface/chat-ui/assets/165610201/f10307a3-17c4-4e0c-9036-1f63237e2f72)\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/997",
    "state": "closed",
    "labels": [
      "help wanted",
      "assistants"
    ],
    "created_at": "2024-04-09T12:44:49Z",
    "updated_at": "2024-04-23T06:09:47Z",
    "comments": 2,
    "user": "Coinficient"
  },
  {
    "repo": "huggingface/evaluate",
    "number": 570,
    "title": "[Question] How to have no preset values sent into `.compute()` ",
    "body": "We've a use-case https://huggingface.co/spaces/alvations/llm_harness_mistral_arc/blob/main/llm_harness_mistral_arc.py\r\n\r\nwhere default feature input types for `evaluate.Metric` is nothing and we get something like this in our `llm_harness_mistral_arc/llm_harness_mistral_arc.py`\r\n\r\n```python\r\nimport evaluate\r\nimport datasets\r\nimport lm_eval\r\n\r\n\r\n@evaluate.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)\r\nclass llm_harness_mistral_arc(evaluate.Metric):\r\n    def _info(self):\r\n        # TODO: Specifies the evaluate.EvaluationModuleInfo object\r\n        return evaluate.MetricInfo(\r\n            # This is the description that will appear on the modules page.\r\n            module_type=\"metric\",\r\n            description=\"\",\r\n            citation=\"\",\r\n            inputs_description=\"\",\r\n            # This defines the format of each prediction and reference\r\n            features={},\r\n        )\r\n\r\n    def _compute(self, pretrained=None, tasks=[]):\r\n        outputs = lm_eval.simple_evaluate( \r\n              model=\"hf\",\r\n              model_args={\"pretrained\":pretrained},\r\n              tasks=tasks,\r\n              num_fewshot=0,\r\n          )\r\n        results = {}\r\n        for task in outputs['results']:\r\n          results[task] = {'acc':outputs['results'][task]['acc,none'], \r\n                          'acc_norm':outputs['results'][task]['acc_norm,none']}\r\n        return results\r\n```\r\n\r\nAnd in our expected user-behavior is something like, [in]:\r\n\r\n```python\r\nimport evaluate\r\n\r\nmodule = evaluate.load(\"alvations/llm_harness_mistral_arc\")\r\nmodule.compute(pretrained=\"mistralai/Mistral-7B-Instruct-v0.2\", tasks=[\"arc_easy\"])\r\n```\r\n\r\nAnd the expected output as per our `tests.py`, https://huggingface.co/spaces/alvations/llm_harness_mistral_arc/blob/main/tests.py [out]:\r\n\r\n```\r\n{'arc_easy': {'acc': 0.8131313131313131, 'acc_norm': 0.7680976430976431}}\r\n```\r\n\r\nBut the `evaluate.Metric.compute()` somehow expects a default batch and `module.compute(pretrained=\"mistralai/Mistral-7B-Instruct-v0.2\", tasks=[\"arc_easy\"])` throws an error:\r\n\r\n```python\r\n---------------------------------------------------------------------------\r\nValueError                                Traceback (most recent call last)\r\n[<ipython-input-20-bd94e5882ca5>](https://localhost:8080/#) in <cell line: 1>()\r\n----> 1 module.compute(pretrained=\"mistralai/Mistral-7B-Instruct-v0.2\",\r\n      2                tasks=[\"arc_easy\"])\r\n\r\n2 frames\r\n[/usr/local/lib/python3.10/dist-packages/evaluate/module.py](https://localhost:8080/#) in _get_all_cache_files(self)\r\n    309         if self.num_process == 1:\r\n    310             if self.cache_file_name is None:\r\n--> 311                 raise ValueError(\r\n    312                     \"Evaluation module cache file doesn't exist. Please make sure that you call `add` or `add_batch` \"\r\n    313                     \"at least once before calling `compute`.\"\r\n\r\nValueError: Evaluation module cache file doesn't exist. Please make sure that you call `add` or `add_batch` at least once before calling `compute`.\r\n```\r\n\r\n\r\n#### Q: Is it possible for the `.compute()` to expect no features? \r\n\r\n\r\nI've also tried this but somehow the `evaluate.Metric.compute` is still looking for some sort of `predictions` variable.\r\n\r\n```\r\n@evaluate.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)\r\nclass llm_harness_mistral_arc(evaluate.Metric):\r\n    def _info(self):\r\n        # TODO: Specifies the evaluate.EvaluationModuleInfo object\r\n        return evaluate.MetricInfo(\r\n            # This is the description that will appear on the modules page.\r\n            module_type=\"metric\",\r\n            description=\"\",\r\n            citation=\"\",\r\n            inputs_description=\"\",\r\n            # This defines the format of each prediction and reference\r\n            features=[\r\n                datasets.Features(\r\n                    {\r\n                        \"pretrained\": datasets.Value(\"string\", id=\"sequence\"),\r\n                        \"tasks\": datasets.Sequence(datasets.Value(\"string\", id=\"sequence\"), id=\"tasks\"),\r\n                    }\r\n                )]\r\n        )\r\n\r\n    def _compute(self, pretrained, tasks):\r\n        outputs = lm_eval.simple_evaluate( \r\n              model=\"hf\",\r\n              model_args={\"pretrained\":pretrained},\r\n              tasks=tasks,\r\n              num_fewshot=0,\r\n          )\r\n        results = {}\r\n        for task in outputs['results']:\r\n          results[task] = {'acc':outputs['results'][task]['acc,none'], \r\n                          'acc_norm':outputs['results'][task]['acc_norm,none']}\r\n        return results\r\n````\r\n\r\nthen:\r\n\r\n```python\r\nimport evaluate\r\n\r\nmodule = evaluate.load(\"alvations/llm_harness_mistral_arc\")\r\nmodule.compute(pretrained=\"mistralai/Mistral-7B-Instruct-v0.2\", tasks=[\"arc_easy\"])\r\n```\r\n\r\n[out]:\r\n\r\n```\r\n---------------------------------------------------------------------------\r\nKeyError                                  Traceback (most recent call last)\r\n[<ipython-input-36-bd94e5882c",
    "url": "https://github.com/huggingface/evaluate/issues/570",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-08T22:58:41Z",
    "updated_at": "2024-04-08T23:54:42Z",
    "user": "alvations"
  },
  {
    "repo": "huggingface/transformers",
    "number": 30122,
    "title": "What is the default multi-GPU training type?",
    "body": "### System Info\r\n\r\nNA\r\n\r\n### Who can help?\r\n\r\n@ArthurZucker , @younesbelkada \r\n\r\n### Information\r\n\r\n- [X] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nWhen running training using the transformers trainer, and setting device_map to auto, what is the default distributed training type that is used when the model is too large to fit on one GPU?\r\n\r\n(assume that I have not yet run `accelerate config`).\r\n\r\nDoes the model just run with naive model parallel with layers split between different GPUs and with DP (not DDP) on the data side? Are the full gradients and also the optimizer state copied onto each GPU?\r\n\r\nIt would be helpful if this could be described in the Trainer section of the docs and also in the Multi-GPU docs.\r\n\r\n### Expected behavior\r\n\r\nNA",
    "url": "https://github.com/huggingface/transformers/issues/30122",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-08T11:45:59Z",
    "updated_at": "2024-05-10T10:35:41Z",
    "user": "RonanKMcGovern"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1798,
    "title": "Issue Report: Unable to Export Qwen Model to ONNX Format in Optimum",
    "body": "### System Info\n\n```shell\nOptimum Version: 1.18.0\r\nPython Version: 3.8\r\nPlatform: Windows, x86_64\n```\n\n\n### Who can help?\n\n@michaelbenayoun @JingyaHuang @echarlaix \r\nI am writing to report an issue I encountered while attempting to export a Qwen model to ONNX format using Optimum.\r\n\r\nError message:\r\n\" ValueError: Trying to export a qwen model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type qwen to be supported natively in the ONNX export. \"\r\n\r\nAttached screenshot for reference.\r\n<img width=\"957\" alt=\"qwen_error_export\" src=\"https://github.com/huggingface/optimum/assets/166393333/5b9e75fd-1839-434c-809e-5dd6832b0e05\">\r\n\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\noptimum-cli export onnx --model Qwen/Qwen-7B qwen_optimum_onnx/ --trust-remote-code\n\n### Expected behavior\n\nI would expect Optimum to successfully export the Qwen model to ONNX format without encountering any errors or issues.",
    "url": "https://github.com/huggingface/optimum/issues/1798",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-04-08T11:36:09Z",
    "updated_at": "2024-04-08T11:36:09Z",
    "comments": 0,
    "user": "Harini-Vemula-2382"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 986,
    "title": "Github actions won't push built docker images on releases",
    "body": "We currently have a [github actions workflow](https://github.com/huggingface/chat-ui/blob/main/.github/workflows/build-image.yml) that builds an image on every push to `main` and tags it with `latest` and the commit id. [(see here)](https://github.com/huggingface/chat-ui/pkgs/container/chat-ui/versions)\r\n\r\nThe workflow should also push images tagged for each releases, for example `v0.8` but the workflow [fails](https://github.com/huggingface/chat-ui/actions/runs/8536772524) with a `buildx failed with: ERROR: tag is needed when pushing to registry` error. \r\n\r\nI think it would be really nice to have support for tagged images for each releases, but I'm not the best with github actions so if someone has some time and would like to look at it, that would be super appreciated \ud83e\udd17 ",
    "url": "https://github.com/huggingface/chat-ui/issues/986",
    "state": "closed",
    "labels": [
      "help wanted",
      "CI/CD"
    ],
    "created_at": "2024-04-08T07:51:13Z",
    "updated_at": "2024-04-08T11:27:42Z",
    "comments": 2,
    "user": "nsarrazin"
  },
  {
    "repo": "huggingface/candle",
    "number": 2025,
    "title": "How to specify which graphics card to run a task on in a server with multiple graphics cards?",
    "body": "",
    "url": "https://github.com/huggingface/candle/issues/2025",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-07T10:48:35Z",
    "updated_at": "2024-04-07T11:05:52Z",
    "user": "lijingrs"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 77,
    "title": "[Feature request] Need a format for test reports and how we might track them?",
    "body": "Maybe we build a table, with something like\r\n\r\n| Model.  | Target tested |  Platform tested  (*) |  submitter | test date | link to test transcript |\r\n|--|--|--|--|--|--|\r\n| stories15M | generate, AOTI CPU | Ubuntu x86 24.04 | mikekgfb | 2024-04-06 |  [test transcript](https://github.com/pytorch-labs/llama-fast/actions/runs/8586564185/job/23529165773?pr=74) |\r\n\r\n* may need a script to capture system info?",
    "url": "https://github.com/pytorch/torchchat/issues/77",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-04-07T06:04:24Z",
    "updated_at": "2024-04-25T18:14:04Z",
    "comments": 0,
    "user": "mikekgfb"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 70,
    "title": "[Usability] Clean installation and first example steps in README to standardize on stories15M?",
    "body": "Looking great! However, I went through the README steps on a new M1 and hit a few issues. It would be ideal if we can make this a clean list of commands that a person could cut and paste all the way through. Here are some thoughts:\r\n\r\nCan we move \"The model definition (and much more!) is adopted from gpt-fast, so we support the same models. To download llama models, go to https://huggingface.co/meta-llama/Llama-2-7b and go through steps to obtain access. Then, login with huggingface-cli login\" and those below into the dedicated `Installation` section referenced at https://github.com/pytorch-labs/llama-fast?tab=readme-ov-file#installation and also move it to the top?\r\n\r\nThat section (somewhat matching to https://pytorch.org/executorch/stable/getting-started-setup.html) could include:\r\n\r\n```\r\npython3 -m pip install --user virtualenv\r\npython3 -m virtualenv .llama-fast\r\nsource .llama-fast/bin/activate\r\ngit clone https://github.com/pytorch-labs/llama-fast.git\r\ncd llama-fast\r\ngit submodule sync\r\ngit submodule update --init\r\n\r\n# If we need PyTorch nightlies\r\npip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu\r\n# Otherwise\r\n# pip install torch torchvision\r\n\r\npip install sentencepiece huggingface_hub\r\n# Eventually should be (when Dave has the PyPI packages)\r\n# pip install sentencepiece huggingface_hub executorch\r\n# I had some issues with the pytorch submodule not downloading from ExecuTorch - not sure why\r\n\r\n# To download Llama 2 models, go to https://huggingface.co/meta-llama/Llama-2-7b and go through steps to obtain access.\r\n\r\n# Once approved, login with\r\nhuggingface-cli login\r\n# You will be asked for a token from https://huggingface.co/settings/tokens\r\n\r\n# Set the model and paths for stories15M as an example to test things on desktop and mobile\r\nMODEL_NAME=stories15M\r\nMODEL_PATH=checkpoints/${MODEL_NAME}/stories15M.pt\r\nMODEL_DIR=~/llama-fast-exports\r\n\r\n# Could we make this stories15 instead?\r\nexport MODEL_DOWNLOAD=meta-llama/Llama-2-7b-chat-hf\r\n./scripts/prepare.sh $MODEL_DOWNLOAD\r\npython generate.py --compile --checkpoint-path ${MODEL_PATH} --prompt \"Hello, my name is\" --device {cuda,cpu,mps}\r\n\r\n... Steps for running with AOTI and then ExecuTorch ...\r\n\r\n```\r\n\r\nUnfortunate I get the following error when trying to run generate:\r\n\r\n```\r\ngenerate.py: error: unrecognized arguments: cpu mps\r\n```\r\n\r\nTagging @mikekgfb @byjlw @GregoryComer @cbilgin @dbort @mergennachin \r\n\r\nThank you!\r\n",
    "url": "https://github.com/pytorch/torchchat/issues/70",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-06T22:13:18Z",
    "updated_at": "2024-04-20T01:35:39Z",
    "comments": 6,
    "user": "orionr"
  },
  {
    "repo": "huggingface/text-embeddings-inference",
    "number": 229,
    "title": "Question: How to add a prefix to the underlying server",
    "body": "I've managed to run the text embeddings inference perfectly using the already built docker images and I'm trying to allow it to our internal components\r\n\r\nRight now they're sharing the following behavior\r\n\r\nMyhost.com/modelname/v1/embeddings\r\n\r\nI was wondering if this \"model name\" is possible to add as a prefix inside the application through some configuration.\r\n\r\nHow could I do that?",
    "url": "https://github.com/huggingface/text-embeddings-inference/issues/229",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-06T17:29:59Z",
    "updated_at": "2024-04-08T09:14:40Z",
    "user": "Ryojikn"
  },
  {
    "repo": "pytorch/torchchat",
    "number": 69,
    "title": "[Feature request] Torchchat performance comparison to gpt-fast",
    "body": "At present, llama-fast is 2x slower than gpt-fast when run out of the box.  The root cause is we default to fp32 rather than bf16 (reducing our peak perf potential in a major way).\r\n\r\nI changed the default to fp32 because some mobile targets do not support FP16 (and not at all bfloat16), so this was the least common denominator to run out of the box.  \r\n\r\nWill add additional controls for fp data width setting, beyond that we need to decide how to set this up.  Do we want the default to run well everywhere, or do we optimize the default for one particular target family.  \r\n\r\nAlternative might be different defaults for different targets but that too is confusing.\r\n\r\ncc: @chauhang @malfet @guangy10 ",
    "url": "https://github.com/pytorch/torchchat/issues/69",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-04-06T16:36:03Z",
    "updated_at": "2024-05-12T21:36:56Z",
    "comments": 3,
    "user": "mikekgfb"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 685,
    "title": "Transformers.js seems to need an internet connection when it shouldn't? (Error: no available backend found.)",
    "body": "### Question\n\nWhat is the recommended way to get Transformers.js to work even when, later on, there is no internet connection?\r\n\r\nIs it using a service worker? Or are there other (perhaps hidden) settings for managing caching of files?\r\n\r\nI'm assuming here that the `Error: no available backend found` error message is related to Transformers.js not being able to find files once Wi-Fi has been turned off. I was a bit surprised by that, since I do see a cache called `transformers-cache` being created. Is that not caching all the required files?\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/685",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-06T12:40:15Z",
    "updated_at": "2024-09-03T01:22:15Z",
    "user": "flatsiedatsie"
  },
  {
    "repo": "huggingface/trl",
    "number": 1510,
    "title": "[question] how to apply model parallism to solve cuda memory error",
    "body": "hi team. I am using the SFT and PPO code to train my model, link https://github.com/huggingface/trl/tree/main/examples/scripts. \r\n\r\nDue to long context length and 7B-level model size, I am facing cuda memory issue on my single gpu.\r\n\r\nIs there any straightforward manner to utilize multiple gpus on my server to train the model thru SFT and PPO script ?\r\nsuch as spliting the model to multiple gpus as model parallism. Is there any argument parameters I can directly pass into my training script ?\r\nThanks a lot.\r\n```\r\nexport CUDA_VISIBLE_DEVICES='7'; python examples/scripts/sft_travel.py \\\r\n    --model_name_or_path=\"mistralai/Mistral-7B-Instruct-v0.2\"         \\\r\n    --report_to=\"wandb\" \\\r\n    --learning_rate=5e-5 \\\r\n    --per_device_train_batch_size=4 \\\r\n    --gradient_accumulation_steps=16 \\\r\n    --logging_steps=1 \\\r\n    --num_train_epochs=120 \\\r\n    --lr_scheduler_type \"constant\" \\\r\n    --max_steps=-1 \\\r\n    --gradient_checkpointing \\\r\n    --max_seq_length 16000 \\\r\n    --output_dir \"8bit\" \\\r\n    --overwrite_output_dir True \\\r\n    --logging_strategy  \"epoch\" \\\r\n    --evaluation_strategy \"no\"\r\n```",
    "url": "https://github.com/huggingface/trl/issues/1510",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-06T02:09:36Z",
    "updated_at": "2024-05-06T17:02:35Z",
    "user": "yanan1116"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2827,
    "title": "Misleading example for per-sample gradient",
    "body": "In the example of per-sample gradient, the following line can be misleading since the `predictions` of a net are logits:  \r\nhttps://github.com/pytorch/tutorials/blob/08a61b7cae9d00312d0029b1f86a248ec1253a83/intermediate_source/per_sample_grads.py#L49\r\n\r\nThe correct way should be: \r\n``` python\r\nreturn F.nll_loss(F.log_softmax(predictions, dim=-1), targets) \r\n```\r\n\r\nWould appreciate if this can be corrected. ",
    "url": "https://github.com/pytorch/tutorials/issues/2827",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-06T00:27:51Z",
    "updated_at": "2024-04-24T17:52:48Z",
    "comments": 3,
    "user": "mingfeisun"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2667,
    "title": "Rename datasets-server to dataset-viewer in infra internals?",
    "body": "Follow-up to #2650.\r\n\r\nIs it necessary? Not urgent in any Case.\r\n\r\nSome elements to review:\r\n- [ ] https://github.com/huggingface/infra\r\n- [ ] https://github.com/huggingface/infra-deployments\r\n- [ ] docker image tags (https://hub.docker.com/r/huggingface/datasets-server-services-search -> https://hub.docker.com/r/huggingface/dataset-viewer-services-search)\r\n- [ ] Helm chart name\r\n- [ ] AWS parameters\r\n- [ ] kubernetes namespaces\r\n- [ ] Hub app names and tokens\r\n- [ ] https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets-server\r\n- [ ] buckets: hf-datasets-server-statics-test, hf-datasets-server-statics\r\n- [ ] MongoDB databases\r\n- [ ] BetterUptime\r\n- [ ] shared directories (PARQUET_METADATA_CACHE_APPNAME)\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2667",
    "state": "closed",
    "labels": [
      "question",
      "P2"
    ],
    "created_at": "2024-04-05T16:53:34Z",
    "updated_at": "2024-04-08T09:26:14Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2666,
    "title": "Change API URL to dataset-viewer.huggingface.co?",
    "body": "Follow-up to https://github.com/huggingface/dataset-viewer/issues/2650\r\n\r\nShould we do it?\r\n- https://github.com/huggingface/dataset-viewer/issues/2650#issuecomment-2040217875\r\n- https://github.com/huggingface/moon-landing/pull/9520#issuecomment-2040220911\r\n\r\nIf we change it, we would have to update:\r\n- moon-landing\r\n- datasets\r\n- the docs (hub, datasets, dataset-viewer)\r\n- other written support (blog, observable, notion...)\r\n\r\nIf so, also change the dev URL: https://datasets-server.us.dev.moon.huggingface.tech.\r\n\r\nWe should also handle the redirection from the old URL to the new one.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2666",
    "state": "closed",
    "labels": [
      "question",
      "P2"
    ],
    "created_at": "2024-04-05T16:49:13Z",
    "updated_at": "2024-04-08T09:24:43Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/huggingface.js",
    "number": 609,
    "title": "[Question] What is the correct way to access commit diff results via http?",
    "body": "Data I am interested in:\r\n![image](https://github.com/huggingface/huggingface.js/assets/16808224/cada880a-bc46-496b-869b-02adb083b6a7)\r\nHere's the endpoint to list commits\r\nhttps://huggingface.co/api/models/SimonMA/Codellama-7b-lora-rps-adapter/commits/main",
    "url": "https://github.com/huggingface/huggingface.js/issues/609",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-05T12:00:15Z",
    "updated_at": "2024-04-09T18:40:05Z",
    "user": "madgetr"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2661,
    "title": "Increase the number of backfill workers?",
    "body": "Today, it's 8. Let's try increasing it and see if it speeds up the backfill job.\r\n\r\nThe current throughput is 577 datasets/minute.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2661",
    "state": "open",
    "labels": [
      "question",
      "P2",
      "prod"
    ],
    "created_at": "2024-04-05T10:42:11Z",
    "updated_at": "2024-04-05T16:42:13Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2730,
    "title": "\u2753 [Question] Running LayerNorm in fp16",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\n\r\nI am trying to convert a transformer model to TRT in fp16 (fp32 works fine \ud83d\ude42). It includes bunch of LayerNorms, all of them have explicit casting of inputs to fp32, i.e:\r\n``` python\r\nclass LayerNormFP32(nn.LayerNorm):\r\n    def forward(self, x):\r\n        return super().forward(x.float()).type(x.dtype)\r\n``` \r\nI am getting warnings about precisions of the layers:\r\n```\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - Detected layernorm nodes in FP16: %126 : Tensor = aten::layer_norm(%input.9, %127, %self.decoder.layers.0.attn_ln.weight.1, %370, %129, %130), scope: __module.decoder/__module.decoder.layers.0/__module.decoder.layers.0.attn_ln\r\n...\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - Running layernorm after self-attention in FP16 may cause overflow. Exporting the model to the latest available ONNX opset (later than opset 17) to use the INormalizationLayer, or forcing layernorm layers to run in FP32 precision can help with preserving accuracy.\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT encountered issues when converting weights between types and that could affect accuracy.\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - If this is not the desired behavior, please modify the weights or retrain with regularization to adjust the magnitude of the weights.\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - Check verbose logs for the list of affected weights.\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - - 2 weights are affected by this issue: Detected FP32 infinity values and converted them to corresponding FP16 infinity.\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - - 27 weights are affected by this issue: Detected subnormal FP16 values.\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - - 3 weights are affected by this issue: Detected values less than smallest positive FP16 subnormal value and converted them to the FP16 minimum subnormalized value.\r\n```\r\nI checked dtype of the mentioned weights in the trace that I pass to `torch_tensorrt.compile` and they are correctly in fp32, even though the warnings state the opposite.\r\n\r\nThe warning suggets two solutions (use INormalizationLayer or force FP32 precisions) but I have no idea ho to achieve it.\r\nThis might be a related: https://github.com/pytorch/TensorRT/pull/2509 (or https://github.com/NVIDIA/TensorRT/issues/3101)\r\n\r\nAny ideas how to resolve or debug this issue?\r\n\r\n## Environment\r\n\r\n- Python 3.11.8\r\n- torch 2.2.1\r\n- torch_tensorrt 2.2.0\r\n- a100\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2730",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-05T09:06:28Z",
    "updated_at": "2025-04-25T12:01:41Z",
    "user": "Tomiinek"
  },
  {
    "repo": "huggingface/transformers",
    "number": 30066,
    "title": "How to calculate the mAP on this network?",
    "body": "### System Info\r\n\r\nI want to evaluate my network with the mean Average Precision. I don't know how to get the class-id of my gt data. Are there any examples to calculate the mAP with this library?\r\n\r\nI use the DetrForObjectDetection with my own dataset.\r\n\r\n### Who can help?\r\n\r\n_No response_\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nthis is my code to save the loss in a csv file. I also want to save the mAP in this file.\r\n\r\n    def on_train_epoch_end(self, trainer, pl_module):\r\n                train_loss = trainer.callback_metrics.get(\"training_loss\").item()\r\n                val_loss = trainer.callback_metrics.get(\"validation/loss\").item()\r\n                with open(self.file_path, 'a', newline='') as csvfile:\r\n                    writer = csv.writer(csvfile)\r\n                    if not self.header_written:\r\n                        writer.writerow([\"Epoch\", \"Train Loss\", \"Validation Loss\"])\r\n                        self.header_written = True\r\n                    writer.writerow([pl_module.current_epoch, train_loss, val_loss])\r\n\r\n### Expected behavior\r\n\r\nI tried to get the data with this code:\r\n\r\n        gt_boxes = []\r\n        detected_boxes = []\r\n        for batch in self.val_dataloader:\r\n            pixel_values = batch['pixel_values'].to(pl_module.device)\r\n            pixel_mask = batch['pixel_mask'].to(pl_module.device)\r\n            labels = batch['labels']\r\n            # train_idx = batch['train_idx']\r\n            outputs = pl_module(pixel_values=pixel_values, pixel_mask=pixel_mask)\r\n            \r\n            target_sizes = torch.tensor([image.shape[-2:] for image in pixel_values]).to(pixel_values.device)\r\n            detections = image_processor.post_process_object_detection(outputs, target_sizes=target_sizes, threshold=0.5)[0]\r\n\r\n            for i in range(len(detections['scores'])):\r\n                prob_score = detections['scores'][i].item()\r\n                class_pred = detections['labels'][i].item()\r\n                box = detections['boxes'][i].detach().cpu().numpy()\r\n    \r\n                detected_boxes.append([class_pred, prob_score, *box])\r\n            \r\n            for label in labels:\r\n                gt_box = label['boxes']\r\n                for box in gt_box:\r\n                    gt_boxes.append(box)\r\n    \r\n        image_height = 2048\r\n        image_width = 2048\r\n\r\n        gt_boxes_abs = []\r\n        for box in gt_boxes:\r\n            x_min, y_min, width, height = box\r\n            x_max = x_min + width\r\n            y_max = y_min + height\r\n            x_min_abs = int(x_min * image_width)\r\n            y_min_abs = int(y_min * image_height)\r\n            x_max_abs = int(x_max * image_width)\r\n            y_max_abs = int(y_max * image_height)\r\n            \r\n            class_id = ???\r\n            difficult = ???\r\n            crowd = ???\r\n            \r\n            gt_boxes_abs.append([x_min_abs, y_min_abs, x_max_abs, y_max_abs, class_id, difficult, crowd])\r\n        \r\n        adjusted_detected_boxes = []\r\n        converted_boxes = []\r\n        for box in detected_boxes:\r\n            class_id = box[0]\r\n            confidence = box[1]\r\n            x_min = box[2]\r\n            y_min = box[3]\r\n            x_max = box[4]\r\n            y_max = box[5]\r\n            converted_boxes.append([x_min, y_min, x_max, y_max, class_id, confidence])",
    "url": "https://github.com/huggingface/transformers/issues/30066",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-05T08:32:31Z",
    "updated_at": "2024-06-08T08:04:08Z",
    "user": "Sebi2106"
  },
  {
    "repo": "huggingface/optimum-quanto",
    "number": 152,
    "title": "How does quanto calibrate torch functions?",
    "body": "I have learned quanto calibrate ops in module forms by adding module hooks, but how about torch functions like `torch.sigmoid`, `torch.elu`, and `torch.log` etc?\r\nI think the output scale of `torch.sigmoid` could be directly evaluated similarly to quanto's approach with `softmax`. Additionally, `torch.elu` might be substituted with `torch.nn.ELU`.\r\nHowever, I'm uncertain how functions like `torch.log`, which are unbounded and lack explicit module forms will be calibrated within quanto.",
    "url": "https://github.com/huggingface/optimum-quanto/issues/152",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-05T06:49:51Z",
    "updated_at": "2024-04-11T09:41:55Z",
    "user": "shuokay"
  },
  {
    "repo": "huggingface/candle",
    "number": 2007,
    "title": "How to run inference of a (very) large model across mulitple GPUs ?",
    "body": "It is mentioned on README that candle supports multi GPU inference, using NCCL under the hood. How can this be implemented ? I wonder if there is any available example to look at..\r\n\r\nAlso, I know PyTorch has things like DDP and FSDP, is candle support for multi GPU inference comparable to these techniques ? ",
    "url": "https://github.com/huggingface/candle/issues/2007",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-04T13:52:46Z",
    "updated_at": "2024-08-12T04:53:54Z",
    "user": "jorgeantonio21"
  },
  {
    "repo": "huggingface/candle",
    "number": 2006,
    "title": "How to get different outputs for the same prompt?",
    "body": "I used a gemma, it always returned  same outputs for same prompt.\r\nHow can I get different outputs? Is there any method or parameter for sampling? (I even doubt that `top_p` works.)\r\n",
    "url": "https://github.com/huggingface/candle/issues/2006",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-04T10:43:31Z",
    "updated_at": "2024-04-13T11:17:36Z",
    "user": "Hojun-Son"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 975,
    "title": "is it possible to hide the setting from the users? most users do not want to create assistants, and they just want to use existing ones.   ",
    "body": "In the left-hand corner of hugginchat, \"Assistants\" and \"Settings\" are visible. We are considering whether it is possible to hide these options from our users, as they have expressed no interest in creating assistants and prefer to use existing ones.  Many thanks for your kind help..  Howard",
    "url": "https://github.com/huggingface/chat-ui/issues/975",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-04T07:33:25Z",
    "updated_at": "2024-04-04T07:33:25Z",
    "comments": 0,
    "user": "hjchenntnu"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 679,
    "title": "Speech Recognition/Whisper word level scores or confidence output",
    "body": "### Question\n\nHey,\r\nBig thanks for awesome project!\r\n\r\nIt possible to add score/confidence for word level output when using Speech Recognition/Whisper model?\r\nWould appreciate any direction/comments or suggestion where to dig to add it. \r\nHappy to submit PR if I will success in it.\r\n\r\nThanks!\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/679",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-04T07:04:00Z",
    "updated_at": "2024-04-04T07:04:00Z",
    "user": "wobbble"
  },
  {
    "repo": "huggingface/transformers",
    "number": 30034,
    "title": "What is the data file format of `run_ner.py`?",
    "body": "### Feature request\r\n\r\nWhat is the correct format for custom dataset in run_ner.py? Would it be possible to include a few lines on this with a helpful example? \r\n\r\n### Motivation\r\n\r\nI am using the example script run_ner.py from [huggingface](https://github.com/huggingface)/transformers It is not possible to use standard conll format for the model fine-tuning of run_ner.\r\n\r\n### Your contribution\r\n\r\nWe could include this in the corresponding readme.",
    "url": "https://github.com/huggingface/transformers/issues/30034",
    "state": "closed",
    "labels": [
      "Good First Issue"
    ],
    "created_at": "2024-04-04T06:36:30Z",
    "updated_at": "2024-04-08T11:50:00Z",
    "user": "sahil3773mehta"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6777,
    "title": ".Jsonl metadata not detected",
    "body": "### Describe the bug\n\nHi I have the following directory structure:\r\n|--dataset\r\n| |-- images\r\n| |-- metadata1000.csv\r\n| |-- metadata1000.jsonl\r\n| |-- padded_images\r\n\r\nExample of metadata1000.jsonl file\r\n{\"caption\": \"a drawing depicts a full shot of a black t-shirt with a triangular pattern on the front there is a white label on the left side of the triangle\", \"image\": \"images/212734.png\", \"gaussian_padded_image\": \"padded_images/p_212734.png\"}\r\n{\"caption\": \"an eye-level full shot of a large elephant and a baby elephant standing in a watering hole on the left side is a small elephant with its head turned to the right of dry land, trees, and bushes\", \"image\": \"images/212735.png\", \"gaussian_padded_image\": \"padded_images/p_212735.png\"}\r\n.\r\n.\r\n.\r\n\r\nI'm trying to use dataset = load_dataset(\"imagefolder\", data_dir='/dataset/', split='train') to load the the dataset, however it is not able to load according to the fields in the metadata1000.jsonl .\r\nplease assist to load the data properly\r\n\r\nalso getting \r\n\r\n```\r\n  File \"/workspace/train_trans_vae.py\", line 1089, in <module>\r\n    print(get_metadata_patterns('/dataset/'))\r\n  File \"/opt/conda/lib/python3.10/site-packages/datasets/data_files.py\", line 499, in get_metadata_patterns\r\n    raise FileNotFoundError(f\"The directory at {base_path} doesn't contain any metadata file\") from None\r\nFileNotFoundError: The directory at /dataset/ doesn't contain any metadata file\r\n```\r\n\r\nwhen trying \r\n\r\n```\r\n    from datasets.data_files import get_metadata_patterns\r\n    print(get_metadata_patterns('/dataset/'))\r\n```\r\n\r\n\r\n\n\n### Steps to reproduce the bug\n\ndataset Version: 2.18.0\r\nmake a similar jsonl and similar directory format\n\n### Expected behavior\n\ncreates a dataset object with the column names, caption,image,gaussian_padded_image\n\n### Environment info\n\ndataset Version: 2.18.0",
    "url": "https://github.com/huggingface/datasets/issues/6777",
    "state": "open",
    "labels": [],
    "created_at": "2024-04-04T06:31:53Z",
    "updated_at": "2024-04-05T21:14:48Z",
    "comments": 5,
    "user": "nighting0le01"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2724,
    "title": "[Question] Model converted using TensorRT is slower than native Pytorch",
    "body": "Hi All,\r\nWe try to run `resent18` model faster than just running the torchvision version on GPU, therefore we planned to convert and quantize the model using TensorRT. However, we did not witness a performance boost after the conversion. \r\nWe tried to play with the `ir` mode using both `torch_compile` and `dynamo` in addition we tried varying values of `optimization_level` which also did not help. \r\nAdding here code snip:\r\n```python\r\nimport logging\r\nimport time\r\n\r\nimport torch_tensorrt\r\nimport torchvision\r\nimport torch\r\nfrom torch.utils.data import DataLoader\r\n\r\nfrom src.utils.utils import set_logger\r\n\r\nset_logger()\r\n\r\n\r\n@torch.no_grad()\r\ndef benchmark(model, inputs):\r\n    times = list()\r\n    for i in range(100):\r\n        t = time.time()\r\n        model(inputs)\r\n        torch.cuda.synchronize()\r\n        times.append(time.time() - t)\r\n    return sum(times) / len(times), times\r\n\r\n\r\nif __name__ == '__main__':\r\n    # dataset = torchvision.datasets.STL10(\r\n    #     root='/tmp/data',\r\n    #     split='train',\r\n    #     download=True,\r\n    #     transform=torchvision.transforms.ToTensor()\r\n    # )\r\n    # loader = DataLoader(dataset, batch_size=2)\r\n    bs = 128\r\n    dummy_input = torch.rand(bs, 3, 96, 96).cuda()\r\n    model = torchvision.models.resnet18(pretrained=True)\r\n    model.fc = torch.nn.Linear(512, 10)  # Change the output layer to have 10 classes\r\n    model.cuda()\r\n    model.eval()\r\n\r\n    ir_mode = \"dynamo\"\r\n    # ir_mode = \"torch_compile\"\r\n\r\n    trt_mod = torch_tensorrt.compile(\r\n        model,\r\n        ir=ir_mode,\r\n        inputs=[torch_tensorrt.Input((bs, 3, 96, 96))],\r\n        enabled_precisions={torch.float32},\r\n        device=torch.device('cuda:0'),\r\n        optimization_level=5,\r\n    )\r\n    avg_time, times = benchmark(model, dummy_input)\r\n    logging.info(f\"Model pytorch 32fp: {avg_time}\")\r\n\r\n    avg_time, times = benchmark(trt_mod, dummy_input)\r\n    logging.info(f\"Model compiled to TensorRT 32fp: {avg_time}\")\r\n\r\n    avg_time, times = benchmark(model.half(), dummy_input.half())\r\n    logging.info(f\"Model 16fp: {avg_time}\")\r\n\r\n\r\n    trt_mod = torch_tensorrt.compile(\r\n        model.half(),\r\n        ir=ir_mode,\r\n        inputs=[torch_tensorrt.Input((bs, 3, 96, 96), dtype=torch.half)],\r\n        enabled_precisions={torch.float16},\r\n        device=torch.device('cuda:0'),\r\n        optimization_level=5,\r\n    )\r\n    avg_time, times = benchmark(trt_mod, dummy_input.half())\r\n    logging.info(f\"Model compiled to TensorRT 16fp: {avg_time}\")\r\n\r\n```\r\n\r\n**Adding Logs for running with `dynamo`**:\r\n```\r\ntorch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.\r\n  _torch_pytree._register_pytree_node(\r\n/opt/conda/envs/faster-whisper/lib/python3.9/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.\r\n  warnings.warn(\r\n/opt/conda/envs/faster-whisper/lib/python3.9/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=ResNet18_Weights.IMAGENET1K_V1`. You can also use `weights=ResNet18_Weights.DEFAULT` to get the most up-to-date weights.\r\n  warnings.warn(msg)\r\nINFO:torch_tensorrt.dynamo._compiler:Compilation Settings: CompilationSettings(precision=torch.float32, debug=False, workspace_size=0, min_block_size=5, torch_executed_ops=set(), pass_through_build_failures=False, max_aux_streams=None, version_compatible=False, optimization_level=5, use_python_runtime=False, truncate_long_and_double=False, use_fast_partitioner=True, enable_experimental_decompositions=False, device=Device(type=DeviceType.GPU, gpu_id=0), require_full_compilation=False, disable_tf32=False, sparse_weights=False, refit=False, engine_capability=<EngineCapability.DEFAULT: 0>, num_avg_timing_iters=1, dla_sram_size=1048576, dla_local_dram_size=1073741824, dla_global_dram_size=536870912, output_format='exported_program')\r\n\r\nINFO:torch_tensorrt.dynamo.conversion._TRTInterpreter:TRT INetwork construction elapsed time: 0:00:00.304469\r\nINFO:torch_tensorrt.dynamo.conversion._TRTInterpreter:Using optimization level 5\r\nINFO:torch_tensorrt.dynamo.conversion._TRTInterpreter:Build TRT engine elapsed time: 0:00:17.935200\r\nINFO:torch_tensorrt.dynamo.conversion._TRTInterpreter:TRT Engine uses: 113246208 bytes of Memory\r\n/opt/conda/envs/faster-whisper/lib/python3.9/site-packages/torch/_export/exported_program.py:333: UserWarning: Unable to execute the generated python source code from the graph. The graph module will no longer be directly callable, but you can still run the ExportedProgram, and if needed, you can run the graph module eagerly using torch.fx.Interpreter.\r\n  warnings.warn(\r\nINFO:root:Model pytorch 32fp: 0.021189916133880615\r\nINFO:root:Model compiled to TensorRT 32fp: 0.02402569055557251\r\nINFO:root:Model ",
    "url": "https://github.com/pytorch/TensorRT/issues/2724",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-03T18:28:20Z",
    "updated_at": "2024-04-23T18:41:05Z",
    "user": "AvivSham"
  },
  {
    "repo": "pytorch/xla",
    "number": 6880,
    "title": "test_train_mp_mnist.py failing for CUDA when GPU_NUM_DEVICES=1",
    "body": "## \ud83d\udc1b Bug\r\n\r\nFollowing [How to run with PyTorch/XLA:GPU](https://github.com/pytorch/xla/blob/master/docs/gpu.md#how-to-run-with-pytorchxlagpu) to test CUDA PJRT plugin. Running a model hangs when GPU_NUM_DEVICES is set to 1. For >1 values works as expected.\r\n\r\n## To Reproduce\r\n\r\n<!--\r\nIt is really important for the team to have a quick repro, which requires no setup work.\r\n\r\nThe quicker is the repro to be run, the higher the chances the bug will be addressed sooner.\r\n\r\nThe best way to create quick repros is to create a Colab based on the following template:\r\n\r\nhttps://github.com/pytorch/xla/blob/master/TROUBLESHOOTING.md#using-debug_runpy-to-collect-debug-information\r\n\r\nThings to avoid in repros is the need to download datasets which require setting up keys or other login information, like Kaggle downloads for example.\r\n\r\nAnother example are Colab which mount user's Google Drive storages.\r\n\r\nUsing a fake data generator could be a solution, in case the dataset cannot be easily downloaded without setting up credentials:\r\n\r\nhttps://github.com/pytorch/xla/blob/784b4d4f21751a54be0029a95f47d3896561c2a9/test/test_train_mp_mnist.py#L65\r\n\r\n-->\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. GPU_NUM_DEVICES=1 python test/test_train_mp_mnist.py --fake_data\r\n\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well. Or better use the Colab template: https://github.com/pytorch/xla/blob/master/contrib/colab/issue-report.ipynb -->\r\n```\r\nWARNING: All log messages before absl::InitializeLog() is called are written to STDERR\r\nI0000 00:00:1712043952.582653   14258 service.cc:145] XLA service 0x556cec57f460 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\r\nI0000 00:00:1712043952.582772   14258 service.cc:153]   StreamExecutor device (0): Tesla V100-SXM2-32GB, Compute Capability 7.0\r\nI0000 00:00:1712043952.582792   14258 service.cc:153]   StreamExecutor device (1): Tesla V100-SXM2-32GB, Compute Capability 7.0\r\nI0000 00:00:1712043952.586167   14258 se_gpu_pjrt_client.cc:853] Using BFC allocator.\r\nI0000 00:00:1712043952.586310   14258 gpu_helpers.cc:107] XLA backend allocating 25559924736 bytes on device 0 for BFCAllocator.\r\nI0000 00:00:1712043952.586418   14258 gpu_helpers.cc:107] XLA backend allocating 25559924736 bytes on device 1 for BFCAllocator.\r\nI0000 00:00:1712043952.586488   14258 gpu_helpers.cc:147] XLA backend will use up to 8519974912 bytes on device 0 for CollectiveBFCAllocator.\r\nI0000 00:00:1712043952.586563   14258 gpu_helpers.cc:147] XLA backend will use up to 8519974912 bytes on device 1 for CollectiveBFCAllocator.\r\n/usr/local/lib/python3.8/site-packages/torch_xla/core/xla_model.py:105: UserWarning: `devkind` argument is deprecated and will be removed in a future release.\r\n  warnings.warn(\"`devkind` argument is deprecated and will be removed in a \"\r\nEpoch 1 train begin 07:45:53\r\n2024-04-02 07:46:03.713411: E external/xla/xla/service/rendezvous.cc:38] This thread has been waiting for `acquire clique for rank 0; clique=devices=[0,1]; stream=0; run_id=0` for 10 seconds and may be stuck. Expected 2 threads to join the rendezvous, but not all of them arrived on time.\r\n2024-04-02 07:46:03.713778: E external/xla/xla/service/rendezvous.cc:38] This thread has been waiting for `acquire clique for rank 1; clique=devices=[0,1]; stream=0; run_id=1` for 10 seconds and may be stuck. Expected 2 threads to join the rendezvous, but not all of them arrived on time.\r\n```\r\n\r\n## Environment\r\n\r\n - Reproducible on XLA backend [CPU/TPU/CUDA]: CUDA\r\n - Image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:nightly_3.8_cuda_12.1\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/6880",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-03T09:58:30Z",
    "updated_at": "2024-04-08T11:27:27Z",
    "comments": 3,
    "user": "mmakevic-amd"
  },
  {
    "repo": "huggingface/lighteval",
    "number": 143,
    "title": "Do an intro notebook on how to use `lighteval`",
    "body": "",
    "url": "https://github.com/huggingface/lighteval/issues/143",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-04-03T07:53:25Z",
    "updated_at": "2024-12-05T10:18:42Z",
    "user": "clefourrier"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2614,
    "title": "How to I selectively apply accelerate to trainers",
    "body": "I have two trainers in a script, one is SFTTrainer and one is PPOTrainer, both from trl library. Is it possible to only apply accelerate to PPOTrainer?",
    "url": "https://github.com/huggingface/accelerate/issues/2614",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-03T06:39:05Z",
    "updated_at": "2024-05-21T15:06:36Z",
    "user": "zyzhang1130"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2568,
    "title": "How to improve sentence-transformers' performance on CPU?",
    "body": "On the CPU, I tried huggingface\u2018s optimization.onnx and sentence_transformers and I found that on the task of feature_extraction, optimization.onnx was not as good as sentence_transformers in batch encoding performance.\r\nMy question is, are sentence_transformers the current ceiling on CPU performance?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2568",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-03T02:09:14Z",
    "updated_at": "2024-04-23T09:17:39Z",
    "user": "chensuo2048"
  },
  {
    "repo": "pytorch/serve",
    "number": 3065,
    "title": "improve security doc for model security check ",
    "body": "### \ud83d\udcda The doc issue\n\nThe model url provided by cx potentially can contain unsafe content. Existing security lacks the summary of guidance to cx to overcome this issue.\n\n### Suggest a potential alternative/fix\n\nTorchServe provides 3 different levels security check to address this issue. TorchServe Security doc can be updated to provide guidance for cx.\r\n- option1: allowed urls\r\n- option2: cx plugin is a flexible solution which allows cx to add the security check they prefer. \r\n- option3: prod infra (cloud service or internal company infra) provide AOT security check.",
    "url": "https://github.com/pytorch/serve/issues/3065",
    "state": "closed",
    "labels": [
      "documentation",
      "security"
    ],
    "created_at": "2024-04-02T19:14:36Z",
    "updated_at": "2024-04-17T18:25:42Z",
    "comments": 0,
    "user": "lxning"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6773,
    "title": "Dataset on Hub re-downloads every time?",
    "body": "### Describe the bug\r\n\r\nHi, I have a dataset on the hub [here](https://huggingface.co/datasets/manestay/borderlines). It has 1k+ downloads, which I sure is mostly just me and my colleagues working with it. It should have far fewer, since I'm using the same machine with a properly set up HF_HOME variable. However, whenever I run the below function `load_borderlines_hf`, it downloads the entire dataset from the hub and then does the other logic:\r\nhttps://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80\r\n\r\nLet me know what I'm doing wrong here, or if it's a bug with the `datasets` library itself. On the hub I have my data stored in CSVs, but several columns are lists, so that's why I have the code to map splitting on `;`. I looked into dataset loading scripts, but it seemed difficult to set up. I have verified that other `datasets` and `models` on my system are using the cache properly (e.g. I have a 13B parameter model and large datasets, but those are cached and don't redownload).\r\n\r\n__EDIT: __ as pointed out in the discussion below, it may be the `map()` calls that aren't being cached properly. Supposing the `load_dataset()` retrieve from the cache, then it should be the case that the `map()` calls also retrieve from the cached output. But the `map()` commands re-execute sometimes.\r\n\r\n### Steps to reproduce the bug\r\n\r\n1. Copy and paste the function from [here](https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80) (lines 80-100)\r\n2. Run it in Python `load_borderlines_hf(None)`\r\n3. It completes successfully, downloading from HF hub, then doing the mapping logic etc.\r\n4. If you run it again after some time, it will re-download, ignoring the cache\r\n\r\n### Expected behavior\r\n\r\nRe-running the code, which calls `datasets.load_dataset('manestay/borderlines', 'territories')`, should use the cached version\r\n\r\n### Environment info\r\n\r\n\r\n- `datasets` version: 2.16.1\r\n- Platform: Linux-5.14.21-150500.55.7-default-x86_64-with-glibc2.31\r\n- Python version: 3.10.13\r\n- `huggingface_hub` version: 0.20.3\r\n- PyArrow version: 15.0.0\r\n- Pandas version: 1.5.3\r\n- `fsspec` version: 2023.10.0",
    "url": "https://github.com/huggingface/datasets/issues/6773",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-02T17:23:22Z",
    "updated_at": "2024-04-08T18:43:45Z",
    "comments": 5,
    "user": "manestay"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 677,
    "title": "How you debug/measure Python -> Javascript ONNX Conversion ",
    "body": "### Question\r\n\r\nI have converted a couple ONNX models to use ONNXRuntimeWeb from using the Python onnx version as the source. Ive spent weeks debugging though. What's your strategy for comparing tensor values, etc, with these onnx models?\r\n\r\nIve console log'd N# of values from the tensor/array to see if the values have diverged far but it can get fatiguing. I can't simply just dump a numpy array and compare",
    "url": "https://github.com/huggingface/transformers.js/issues/677",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-02T16:16:22Z",
    "updated_at": "2024-04-02T16:18:03Z",
    "user": "matbeedotcom"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 676,
    "title": "How to use fp16 version of the model file?",
    "body": "### Question\n\nexample files: https://huggingface.co/Xenova/modnet/tree/main/onnx",
    "url": "https://github.com/huggingface/transformers.js/issues/676",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-02T12:10:24Z",
    "updated_at": "2024-04-03T02:56:52Z",
    "user": "cyio"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 969,
    "title": "Display does not automatically update after receiving message",
    "body": "After receiving the message, the chat page does not update and is always in the loading state. The received message can only be displayed after refreshing the page or switching sessions.\r\n![\u56fe\u7247](https://github.com/huggingface/chat-ui/assets/34700131/19150fbd-346c-4cf4-840d-a1bda9649d09)\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/969",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-02T06:14:59Z",
    "updated_at": "2024-04-03T04:26:23Z",
    "user": "w4rw4r"
  },
  {
    "repo": "pytorch/rl",
    "number": 2053,
    "title": "[QUESTION] How to reset only certain nested parts of a key with TensorDictPrimer?",
    "body": "Hi, I have an observation spec for a multi-agent environment which looks like this:\r\n```\r\nCompositeSpec(\r\n    agents: CompositeSpec(\r\n        observation: UnboundedContinuousTensorSpec(\r\n            shape=torch.Size([100, 2, 14]),\r\n            space=None,\r\n            device=cuda:0,\r\n            dtype=torch.float32,\r\n            domain=continuous),\r\n        episode_reward: UnboundedContinuousTensorSpec(\r\n            shape=torch.Size([100, 2, 1]),\r\n            space=None,\r\n            device=cuda:0,\r\n            dtype=torch.float32,\r\n            domain=continuous),\r\n        edge_index: UnboundedContinuousTensorSpec(\r\n            shape=torch.Size([100, 2, 2, 2]),\r\n            space=None,\r\n            device=cuda:0,\r\n            dtype=torch.float32,\r\n            domain=continuous), device=cuda:0, shape=torch.Size([100, 2])),\r\n...\r\n```\r\n\r\nHere, the key (\"agents\", \"edge_index\") is a special field that I populate once upon creating the env and never want to change.\r\n\r\nMy problem is that I would like to add a recurrent policy, which requires tracking the hidden state for each agent. I read the Recurrent DQN [tutorial](https://pytorch.org/rl/tutorials/dqn_with_rnn.html#policy), but the LSTMModule's make_tensordict_primer() does not quite work for me as it is designed for the single-agent case.\r\n\r\nThus I have tried to write a custom TensorDictPrimer transform, like so:\r\n```\r\nexisting_obs_spec = env.observation_spec\r\nhidden_state_spec = UnboundedContinuousTensorSpec(shape=(*env.observation_spec[\"agents\"].shape[:2], cfg.actor.gru.num_layers, cfg.actor.gru.hidden_size), device=cfg.env.device)\r\nexisting_obs_spec[(\"agents\", \"hidden_state\")] = hidden_state_spec\r\nenv.append_transform(TensorDictPrimer(existing_obs_spec))\r\n```\r\n\r\nHowever I notice that on environment resets, this TensorDictPrimer now overwrites all the fields in this spec with 0s. I have attempted to specify the TensorDictPrimer's input keys as solely the (\"agents\", \"hidden_state\") key I want to zero-out, but when I do so, I end up losing the other nested keys under \"agents\" on reset. \r\n\r\nAm I misunderstanding the usage of TensorDictPrimer? Any help would be appreciated.",
    "url": "https://github.com/pytorch/rl/issues/2053",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-02T02:53:19Z",
    "updated_at": "2024-04-18T15:04:25Z",
    "user": "kfu02"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2654,
    "title": "Tutorial about how to start/run my own local dataset server.",
    "body": "Hey, \r\n    I'm new to the dataset server and rookie in the Web field. I wanted to build my own dataset server however, is there any tutorial that can guide me to build my own dataset server?\r\n\r\nMany Thanks",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2654",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-02T01:30:12Z",
    "updated_at": "2024-05-11T15:03:50Z",
    "user": "ANYMS-A"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2603,
    "title": "How to load a FSDP checkpoint model",
    "body": "I have fine tuned gemma 2b model using FSDP and these are the below files available under the checkpoint \r\n\r\n```\r\noptimizer_0  pytorch_model_fsdp_0  rng_state_0.pth  rng_state_1.pth  scheduler.pt  trainer_state.json\r\n```\r\nHow can i load the above FSDP object? \r\n\r\nkindly help me with this issue,\r\n",
    "url": "https://github.com/huggingface/accelerate/issues/2603",
    "state": "closed",
    "labels": [],
    "created_at": "2024-04-01T16:53:24Z",
    "updated_at": "2024-05-11T15:06:21Z",
    "user": "nlpkiddo-2001"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2723,
    "title": "\u2753 [Question] Output shape error in deconvolution layer when model is quantized with pytorch-quantization and using torch-tensorrt via torchscript",
    "body": "## \u2753 Question\r\n\r\nWhile using a simple model with int8 quantization (pytorch-quantization) when the output layer is deconvolution, torchscript to torch-tensorrt conversion fails with wrong number of output channels. If a conv layer is used instead of deconv, it works without an error.\r\n\r\n## What you have already tried\r\n```ruby\r\nimport torch_tensorrt\r\nimport torch\r\nimport torch.nn as nn\r\nimport torchvision\r\nfrom tqdm import tqdm\r\nfrom torchvision import transforms\r\nfrom pytorch_quantization.tensor_quant import QuantDescriptor\r\nfrom pytorch_quantization import quant_modules\r\nfrom pytorch_quantization import nn as quant_nn\r\nfrom pytorch_quantization import calib\r\nimport torch.nn.functional as F\r\n\r\nclass customodel(nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.e11 = nn.Conv2d(3, 64, kernel_size=3, padding=1) \r\n        self.e12 = nn.Conv2d(64, 64, kernel_size=3, padding=1)  \r\n        self.pool1 = nn.MaxPool2d(kernel_size=2, stride=2) \r\n        self.upconv4 = nn.ConvTranspose2d(64,64, kernel_size=2, stride=2)\r\n        self.d41 = nn.Conv2d(128, 64, kernel_size=3, padding=1)\r\n        self.d42 = nn.Conv2d(64, 64, kernel_size=3, padding=1)\r\n        self.outconv = nn.ConvTranspose2d(64,10, kernel_size=1) \r\n       \r\n    def forward(self, x):\r\n        x1 = F.relu(self.e11(x))\r\n        x2 = F.relu(self.e12(x1))\r\n        pool1 = self.pool1(x2)\r\n        up4 = self.upconv4(pool1)\r\n        merge4 = torch.cat([up4, x2], dim=1)  \r\n        y = F.relu(self.d41(merge4))\r\n        y = F.relu(self.d42(y))  \r\n        y = self.outconv(y)     \r\n        return y\r\n\r\ndef collect_stats(model, data_loader, num_batches):\r\n    for name, module in model.named_modules():\r\n        if isinstance(module, quant_nn.TensorQuantizer):\r\n            if module._calibrator is not None:\r\n                module.disable_quant()\r\n                module.enable_calib()\r\n            else:\r\n                module.disable()\r\n    for i, (image, _) in tqdm(enumerate(data_loader), total=num_batches):\r\n        model(image.cuda())\r\n        if i >= num_batches:\r\n            break\r\n    for name, module in model.named_modules():\r\n        if isinstance(module, quant_nn.TensorQuantizer):\r\n            if module._calibrator is not None:\r\n                module.enable_quant()\r\n                module.disable_calib()\r\n            else:\r\n                module.enable()\r\n\r\ndef compute_amax(model, **kwargs):\r\n    for name, module in model.named_modules():\r\n        if isinstance(module, quant_nn.TensorQuantizer):\r\n            if module._calibrator is not None:\r\n                if isinstance(module._calibrator, calib.MaxCalibrator):\r\n                    module.load_calib_amax()\r\n                else:\r\n                    module.load_calib_amax(**kwargs)\r\n\r\n\r\ndef main():\r\n  quant_modules.initialize()\r\n  quant_desc_input = QuantDescriptor(calib_method='histogram')\r\n  quant_nn.QuantConv2d.set_default_quant_desc_input(quant_desc_input)\r\n  quant_nn.QuantConvTranspose2d.set_default_quant_desc_input(quant_desc_input)\r\n  quant_nn.QuantLinear.set_default_quant_desc_input(quant_desc_input)\r\n  model = customodel().cuda()\r\n  train_dataset = torchvision.datasets.CIFAR10(root = './data',\r\n                                           train = True,\r\n                                           transform = transforms.Compose([\r\n                                                  transforms.Resize((572,572)),\r\n                                                  transforms.ToTensor(),\r\n                                                  transforms.Normalize(mean = (0.1307,), std = (0.3081,))]),download = True)\r\n  num_samples = int(0.03 * len(train_dataset))\r\n  train_dataset_subset = torch.utils.data.Subset(train_dataset, range(num_samples))\r\n  train_loader = torch.utils.data.DataLoader(dataset=train_dataset_subset,\r\n                                           batch_size = 12,\r\n                                           shuffle = True)\r\n  with torch.no_grad():\r\n      collect_stats(model,train_loader, num_batches=10)\r\n      compute_amax(model, method=\"percentile\", percentile=99.99)\r\n\r\n  quant_nn.TensorQuantizer.use_fb_fake_quant = True\r\n  with torch.no_grad():\r\n    data = iter(train_loader)\r\n    images, _ = next(data)\r\n    jit_model = torch.jit.trace(model, images.to(\"cuda\"))\r\n    torch.jit.save(jit_model, \"custom.pt\")\r\ndef main2():\r\n  model = torch.jit.load('/content/custom.pt').eval()\r\n  compile_spec = {\"inputs\": [torch_tensorrt.Input([2,3,572,572])],\r\n                \"enabled_precisions\":torch.int8,\r\n                }\r\n\r\n  trt_mod = torch_tensorrt.compile(model, **compile_spec,ir='torchscript')\r\nif __name__ == '__main__':\r\n    main()\r\n    main2()\r\n```\r\n\r\n```\r\nERROR: [Torch-TensorRT TorchScript Conversion Context] - 4: (Unnamed Layer* 53) [Deconvolution]: weight input tensor shape not consistent with the nbOutputMaps in addConvolutionNd/addDeconvolutionNd API. Expected output channels 64 kernel spatial dims [1,1]. But got output channels 10 kernel spatial dims [1,1]\r\nERROR: [Torch-",
    "url": "https://github.com/pytorch/TensorRT/issues/2723",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-04-01T15:39:16Z",
    "updated_at": "2024-05-22T18:51:32Z",
    "user": "oazeybekoglu"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6769,
    "title": "(Willing to PR) Datasets with custom python objects",
    "body": "### Feature request\r\n\r\nHi thanks for the library! I would like to have a huggingface Dataset, and one of its column is custom (non-serializable) Python objects. For example, a minimal code:\r\n\r\n```\r\nclass MyClass:\r\n    pass\r\n\r\ndataset = datasets.Dataset.from_list([\r\n    dict(a=MyClass(), b='hello'),\r\n])\r\n```\r\n\r\nIt gives error:\r\n\r\n```\r\nArrowInvalid: Could not convert <__main__.MyClass object at 0x7a852830d050> with type MyClass: did not recognize Python value type when inferring an Arrow data type\r\n```\r\n\r\nI guess it is because Dataset forces to convert everything into arrow format. However, is there any ways to make the scenario work? Thanks!\r\n\r\n### Motivation\r\n\r\n(see above)\r\n\r\n### Your contribution\r\n\r\nYes, I am happy to PR!\r\n\r\nCross-posted: https://discuss.huggingface.co/t/datasets-with-custom-python-objects/79050?u=fzyzcjy\r\n\r\nEDIT: possibly related https://github.com/huggingface/datasets/issues/5766",
    "url": "https://github.com/huggingface/datasets/issues/6769",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-04-01T13:18:47Z",
    "updated_at": "2024-04-01T13:36:58Z",
    "comments": 0,
    "user": "fzyzcjy"
  },
  {
    "repo": "pytorch/rl",
    "number": 2052,
    "title": "[BUG?] How to handle next with custom environment and check_env_specs()",
    "body": "I recently starting learning TorchRL so it's possible that this is a misunderstanding on my part and not an actual bug.\r\n\r\n## Describe the bug\r\n\r\nI'm trying to setup a simple spatial arrangement problem using a custom environment. There are N blocks each with an x, y position and a size. My action consists of a block index and x and y deltas. The observation spec is setup to hold the updated positions and sizes of the blocks. The action spec is setup to hold the index and delta. For now, reward is just the distance from center for each block so the network is only trying to learn to move blocks to the center of the space. For state, I include distance from center.\r\n\r\nWhen check_env_specs() is run it fails indicating that the real tensor contains the next state but the fake tensor does not.\r\n\r\n>.venv/lib/python3.11/site-packages/torchrl/envs/utils.py:160: UserWarning: The expected key set and actual key set differ. This will work but with a slower thr$\r\nActual - Expected keys={('next', 'state', 'distance_from_center')}.\r\n  warnings.warn(\r\nTraceback (most recent call last):\r\n  File \"spatial-arrangement/mwe.py\", line 115, in <module>\r\n    check_env_specs(env)\r\n  File \".venv/lib/python3.11/site-packages/torchrl/envs/utils.py\", line 634, in check_env_specs\r\n    raise AssertionError(\r\nAssertionError: The keys of the specs and data do not match:\r\n    - List of keys present in real but not in fake: {('next', 'state', 'distance_from_center')},\r\n    - List of keys present in fake but not in real: set().\r\n\r\n\r\n \r\n`check_env_specs` calls `env.fake_tensordict()` to create `fake_tensordict` whose keys are later compared to `real_tensordict` with keys obtained from a rollout. Unless \"next\" is explicitly added the key check will not pass because the created fake_tensordict will only contain observation, reward and done but not next. \r\n\r\nhttps://github.com/pytorch/rl/blob/cd540bf96a9c998e89a59382b1961fd8a2bc57f0/torchrl/envs/common.py#L2840-L2845\r\n\r\n## To Reproduce\r\n\r\nThe following is an MWE that shows the failure.\r\n\r\n```python\r\nimport torch\r\nfrom torchrl.envs import EnvBase\r\nfrom torchrl.envs.utils import check_env_specs\r\nfrom torchrl.data import BoundedTensorSpec, CompositeSpec, UnboundedContinuousTensorSpec\r\nfrom tensordict import TensorDict\r\n\r\n\r\nNUM_BLOCKS = 4\r\n\r\nclass BlockArrangementEnv(EnvBase):\r\n\r\n    def __init__(self):\r\n        super().__init__()\r\n\r\n        self.observation_spec = CompositeSpec({\r\n            \"observation\": CompositeSpec({\r\n                \"positions\": BoundedTensorSpec(\r\n                    low=0.0,\r\n                    high=1.0,\r\n                    shape=torch.Size([NUM_BLOCKS, 2]),\r\n                    dtype=torch.float32\r\n                ),\r\n                \"sizes\": BoundedTensorSpec(\r\n                    low=0.1,\r\n                    high=1.0,\r\n                    shape=torch.Size([NUM_BLOCKS, 2]),\r\n                dtype=torch.float32\r\n                )\r\n            }),\r\n        })\r\n\r\n        self.state_spec = CompositeSpec({\r\n            \"state\": CompositeSpec({\r\n                \"distance_from_center\": UnboundedContinuousTensorSpec(\r\n                    shape=torch.Size([NUM_BLOCKS]),\r\n                    dtype=torch.float32\r\n                ),\r\n            })\r\n        })\r\n\r\n        self.action_spec = CompositeSpec({\r\n            \"action\": CompositeSpec({\r\n                \"index\": BoundedTensorSpec(\r\n                    low=0,\r\n                    high=NUM_BLOCKS - 1,\r\n                    shape=torch.Size([1]),\r\n                    dtype=torch.int\r\n                ),\r\n                \"delta\": BoundedTensorSpec(\r\n                    low=-1.0,\r\n                    high=1.0,\r\n                    shape=torch.Size([2]),\r\n                    dtype=torch.float32\r\n                )\r\n            })\r\n        })\r\n\r\n        self.reward_spec = UnboundedContinuousTensorSpec(\r\n            shape=torch.Size([NUM_BLOCKS]),\r\n            dtype=torch.float32\r\n        )\r\n\r\n\r\n    def _reset(self, td):\r\n        return TensorDict({\r\n            \"observation\": {\r\n                \"positions\": torch.rand([NUM_BLOCKS, 2]),\r\n                \"sizes\": torch.FloatTensor(NUM_BLOCKS, 2).uniform_(0.1, 1.0),\r\n            },\r\n            \"state\": {\r\n                \"distance_from_center\": torch.rand([NUM_BLOCKS]),\r\n            }\r\n        }, batch_size=[])\r\n\r\n    def _step(self, td, **kwargs):\r\n        return TensorDict({\r\n            \"observation\": {\r\n                \"positions\": torch.rand([NUM_BLOCKS, 2]),\r\n                \"sizes\": torch.FloatTensor(NUM_BLOCKS, 2).uniform_(0.1, 1.0),\r\n            },\r\n            \"state\": {\r\n                \"distance_from_center\": torch.rand([NUM_BLOCKS]),\r\n            },\r\n            \"reward\": torch.rand([NUM_BLOCKS]),\r\n            \"done\": torch.tensor(False)\r\n        }, batch_size=[])\r\n\r\n    def _set_seed(self, seed):\r\n        pass\r\n\r\n\r\nenv = BlockArrangementEnv()\r\ncheck_env_specs(env)\r\n```\r\n\r\n## Expected behavior\r\n\r\nI'm not expecting that I need to add next explicitly anywhere since it seems",
    "url": "https://github.com/pytorch/rl/issues/2052",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-03-31T22:10:49Z",
    "updated_at": "2024-04-02T12:00:35Z",
    "user": "mneilly"
  },
  {
    "repo": "huggingface/optimum-quanto",
    "number": 146,
    "title": "Question about the gradient of QTensor and QBitTensor",
    "body": "I am confused by the gradient of the Quantizer and QBitTensor. Take QTensor as the example:\r\n\r\nThe evaluation of forward is:\r\n```txt\r\ndata  = base / scale  (1)\r\ndata = round(data)  (2)\r\ndata = clamp(data, qmin,  qmax)  (3)\r\n```\r\nI think the graidents should be:\r\n```txt\r\ngrad_div = 1 / scale  (1)\r\ngrad_round = 1  (2)  # refer to \"straight though estimator\": https://arxiv.org/abs/1308.3432\r\ngrad_clamp = 1 if qmin < data < qmax else 0  (3)\r\n```\r\nAccording to chain rule, the gradient of Quantizer should be `grad_div * grad_round * grad_clamp` which is equal to `1 / scale if qmin < base/scale < qmax else 0`\r\n\r\nI have reached QTensor's unit test and I find that dequantize is applied to QTensor before backward. I am confused by `Quantizer. backward` and the  `dequantize` behavior before backward.",
    "url": "https://github.com/huggingface/optimum-quanto/issues/146",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-31T14:33:10Z",
    "updated_at": "2024-04-24T13:51:20Z",
    "user": "shuokay"
  },
  {
    "repo": "pytorch/text",
    "number": 2253,
    "title": "PyTorch 2.4 is not supported by TorchText",
    "body": "Working on this for days trying to install torchtext with pytorch 2.4 and no luck. \r\nThe error message I receive:\r\n```\r\n torchtext 0.17.2 depends on torch==2.2.2\r\n The user requested (constraint) torch==2.4.0.dev20240324+cu121\r\n```\r\n\r\nSo it seems impossible to use torchtext with the latest version of pytorch. \r\n\r\nIs there any way to solve this issue without having to downgrade to pytorch 2.2.2?",
    "url": "https://github.com/pytorch/text/issues/2253",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-31T05:07:53Z",
    "updated_at": "2025-08-11T14:46:49Z",
    "comments": 2,
    "user": "grant541"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 673,
    "title": "Is dit-base supported",
    "body": "### Question\r\n\r\nThere is a [Huggingface repo](https://huggingface.co/Xenova/dit-base) for the ONNX version of the dit-base model but I can't seem to make it work.\r\nI keep getting the following error:\r\n![image](https://github.com/xenova/transformers.js/assets/74398804/4b0ab09e-640e-47ee-ae05-27f759830424)\r\n\r\nIs the model currently supported? ",
    "url": "https://github.com/huggingface/transformers.js/issues/673",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-31T01:18:42Z",
    "updated_at": "2024-03-31T01:48:24Z",
    "user": "Maxzurek"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 143,
    "title": "Understand the output of deduplication",
    "body": "Hi \r\nI have arabic split from the CC trying to deduplicate it\r\nI used datatrove for this with a small example\r\nI got in my output folder two files\r\n0000.c4_dup and 0000.c4_sig\r\nCould you help me to understand this output\r\nI cannot read its content as it's c/00000.c4_sig is not UTF-8 encoded and seems to be binary files\r\nwhere should I see the nex text deduplicated\r\nThanks in advance",
    "url": "https://github.com/huggingface/datatrove/issues/143",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-30T23:16:21Z",
    "updated_at": "2024-05-06T09:30:43Z",
    "user": "Manel-Hik"
  },
  {
    "repo": "huggingface/candle",
    "number": 1971,
    "title": "How to use `topk`?",
    "body": "I am trying to use `topk` to implement X-LoRA in Candle, and want to perform `topk` in the last dimension. Specifically, I need the `indices` return value (as returned by [`torch.topk`](https://pytorch.org/docs/stable/generated/torch.topk.html)). \r\n\r\nThese indices will either be used to creaste a mask to zero out all the values which are _not_ in the topk, and/or used to apply scalings on the nonzero values. This is a may be hard to understand, as such please see [this](https://github.com/EricLBuehler/xlora/blob/3637d1e00854649e8b9162f8f87233248577162c/src/xlora/xlora_insertion.py#L50-L63) snippet from our X-LoRA library.\r\n\r\nIs there a way to implement this with the current Candle functions, or is this planned to be implemented as a function?\r\n\r\n---\r\n\r\nAfter looking at the Mixtral MoE selection implementation, I cannot really understand it:\r\n\r\n> https://github.com/huggingface/candle/blob/3144150b8d1b80b2c6b469dcab5b717598f0a458/candle-transformers/src/models/mixtral.rs#L302-L323\r\n\r\nHow does this work? Thanks!",
    "url": "https://github.com/huggingface/candle/issues/1971",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-30T20:29:45Z",
    "updated_at": "2024-07-23T02:02:58Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 671,
    "title": "What is involved in upgrading to V3?",
    "body": "### Question\n\nIn anticipation of being able to [generate music](https://github.com/xenova/transformers.js/issues/668) with musicGen I'm attempting to switch my project over to version 3, which I was able to build on my mac.\r\n\r\nI noticed that when using SpeechT5, the voice sounds completely garbled. I've attached a zip with two example WAV files.\r\n\r\n[audio_wav_examples.zip](https://github.com/xenova/transformers.js/files/14806203/audio_wav_examples.zip)\r\n\r\nI suspect I'm overlooking something, and need to upgrade some other things too? So my question is: could you give a broad overview of all the parts I need to upgrade?\r\n\r\nThings I've checked or tried:\r\n- Whisper Speech to Text is still working after 'dropping in' the new version.\r\n- Cleared caches (the JS caches)\r\n- Grabbing 'official' package from the [link to the JSDelivr repository](https://cdn.jsdelivr.net/npm/@xenova/transformers@3.0.0-alpha.0) in the V3 readme, but that doesn't work, which I assume is just an auto-build glitch.\r\n- Switching WAV generation code to the one in Transformers.js V3 example.\r\n- Switching to the [example webworker](https://github.com/xenova/transformers.js/blob/v3/examples/text-to-speech-client/src/worker.js) in the V3 branch, which looks very different, but it had no effect. (The old code was basically `synthesizer = await pipeline('text-to-speech', 'Xenova/speecht5_tts', { quantized: false });`).\r\n- The wav blob from the worker has the same issue as the raw Float32 array, so the issue is not in the way I was playing those arrays.\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/671",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-29T18:09:23Z",
    "updated_at": "2024-03-31T13:50:27Z",
    "user": "flatsiedatsie"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6764,
    "title": "load_dataset can't work with symbolic links",
    "body": "### Feature request\r\n\r\nEnable the `load_dataset` function to load local datasets with symbolic links. \r\n\r\nE.g, this dataset can be loaded:\r\n\u251c\u2500\u2500 example_dataset/\r\n\u2502   \u251c\u2500\u2500 data/\r\n\u2502   \u2502   \u251c\u2500\u2500 train/\r\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 file0\r\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 file1\r\n\u2502   \u2502   \u251c\u2500\u2500 dev/\r\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 file2\r\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 file3\r\n\u2502   \u251c\u2500\u2500 metadata.csv\r\n\r\nwhile this dataset can't:\r\n\u251c\u2500\u2500 example_dataset_symlink/\r\n\u2502   \u251c\u2500\u2500 data/\r\n\u2502   \u2502   \u251c\u2500\u2500 train/\r\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 sym0 -> file0\r\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 sym1 -> file1\r\n\u2502   \u2502   \u251c\u2500\u2500 dev/\r\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 sym2 -> file2\r\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 sym3 -> file3\r\n\u2502   \u251c\u2500\u2500 metadata.csv\r\n\r\nI have created an example dataset in order to reproduce the problem:\r\n\r\n1. Unzip `example_dataset.zip`.\r\n2. Run `no_symlink.sh`. Training should start without issues. \r\n3. Run `symlink.sh`. You will see that all four examples will be in train split, instead of having two examples in train and two examples in dev. The script won't load the correct audio files.\r\n\r\n[example_dataset.zip](https://github.com/huggingface/datasets/files/14807053/example_dataset.zip)\r\n\r\n### Motivation\r\n\r\nI have a very large dataset locally. Instead of initiating training on the entire dataset, I need to start training on smaller subsets of the data. Due to the purpose of the experiments I am running, I will need to create many smaller datasets with overlapping data. Instead of copying the all the files for each subset, I would prefer copying symbolic links of the data. This way, the memory usage would not significantly increase beyond the initial dataset size.\r\n\r\nAdvantages of this approach:\r\n\r\n- It would leave a smaller memory footprint on the hard drive\r\n- Creating smaller datasets would be much faster\r\n\r\n### Your contribution\r\n\r\nI would gladly contribute, if this is something useful to the community. It seems like a simple change of code, something like `file_path = os.path.realpath(file_path)` should be added before loading the files. If anyone has insights on how to incorporate this functionality, I would greatly appreciate your knowledge and input.",
    "url": "https://github.com/huggingface/datasets/issues/6764",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-03-29T17:49:28Z",
    "updated_at": "2025-04-29T15:06:28Z",
    "comments": 1,
    "user": "VladimirVincan"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 670,
    "title": "Are tokenizers supposed to work in the browser?",
    "body": "### Question\n\nI'd love to use some pretrained tokenizers, right in my browser. On a number of occasions, I've tried to use this library to load and use a tokenizer in my browser, but it always fails with an error like this:\r\n```\r\nUncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data\r\n    getModelJSON hub.js:584\r\n    loadTokenizer tokenizers.js:62\r\n    from_pretrained tokenizers.js:4398\r\n    gv9xs tok.js:3\r\n    gv9xs tok.js:9\r\n    newRequire dev.42f35062.js:71\r\n    <anonymous> dev.42f35062.js:122\r\n    <anonymous> dev.42f35062.js:145\r\nhub.js:584:16\r\n    gv9xs tok.js:3\r\n    AsyncFunctionThrow self-hosted:856\r\n    (Async: async)\r\n    gv9xs tok.js:9\r\n    newRequire dev.42f35062.js:71\r\n    <anonymous> dev.42f35062.js:122\r\n    <anonymous> dev.42f35062.js:145\r\n```\r\nIs there anything I can do to make this work? My code is rather simple:\r\n```\r\nimport { AutoTokenizer } from '@xenova/transformers'\r\n;(async function () {\r\n    const tokenizer = await AutoTokenizer.from_pretrained(\r\n        'Xenova/bert-base-uncased'\r\n    )\r\n    console.log(tokenizer)\r\n    const { input_ids } = await tokenizer('I love transformers!')\r\n    console.log(input_ids)\r\n})()\r\n```\r\nI serve this code via a Parcel development server, but it's never worked for me. Any advice would be greatly appreciated!",
    "url": "https://github.com/huggingface/transformers.js/issues/670",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-29T16:10:46Z",
    "updated_at": "2024-03-29T16:53:21Z",
    "user": "Vectorrent"
  },
  {
    "repo": "pytorch/serve",
    "number": 3054,
    "title": "Building frontend from source in docker",
    "body": "### \ud83d\udcda The doc issue\r\n\r\nNot able to find a way to add frontend modelserver jar as part of docker image to host a torchserve model\r\nI was trying to learn making changes to frontend for a small fix in customizedMetadata on management api. the metadata is not json parsed. Adding the changes did not surface when i hosted the model. \r\n```\r\n[\r\n{\r\n\"modelName\": \"toy-ranker\",\r\n\"modelVersion\": \"2024-03-29-10:36\",\r\n\"modelUrl\": \"toy-ranker.mar\",\r\n\"runtime\": \"python\",\r\n\"minWorkers\": 4,\r\n\"maxWorkers\": 4,\r\n\"batchSize\": 1,\r\n\"maxBatchDelay\": 100,\r\n\"loadedAtStartup\": true,\r\n\"workers\": [\r\n.\r\n.\r\n.\r\n],\r\n\"jobQueueStatus\": {\r\n\"remainingCapacity\": 1000,\r\n\"pendingRequests\": 0\r\n},\r\n\"customizedMetadata\": \"{\\n  \\\"input1-name\\\": \\\"something\\\",\\n  \\\"input2-name\\\": \\\"something2\\\"\\n}\"\r\n}\r\n]\r\n```\r\n\r\n### Suggest a potential alternative/fix\r\n\r\nDocumentation on docker/ on how to build the frontend from source.\n\ncc @agunapal",
    "url": "https://github.com/pytorch/serve/issues/3054",
    "state": "closed",
    "labels": [
      "triaged",
      "docker"
    ],
    "created_at": "2024-03-29T15:54:29Z",
    "updated_at": "2024-04-04T16:54:06Z",
    "comments": 0,
    "user": "harshita-meena"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 669,
    "title": "TinyLlama Conversion",
    "body": "### Question\r\n\r\nI ran the converter script on the tinyllama repo for both the TinyLlama models ([intermediate step 1431K 3T](https://huggingface.co/TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T) and [chat v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0)) and uploaded them to my repo ([intermediate step 1431K 3T](https://huggingface.co/dmmagdal/tinyllama-1.1B-intermediate-step-1431k-3T-onnx-js) [chat v1.0](https://huggingface.co/dmmagdal/tinyllama-1.1B-chat-v1.0-onnx-js); I also have uploads where the quantized flag was enabled).\r\n\r\nWhen I try to run either of my converted models with the `AutoModelForCausalLM` or `pipeline`, I get the following error:\r\n```\r\nError: Could not locate file: \"https://huggingface.co/dmmagdal/tinyllama-1.1B-chat-v1.0-onnx-js/resolve/main/onnx/decoder_model_merged.onnx\".\r\n```\r\n\r\nThis error seems to be correct in that I do not have that file in my repo. Was there something I did wrong in the conversion process or is the model not fully supported by transformers.js?\r\n\r\nI'm not sure how or if it relates to the TinyLlama repo you have here: https://huggingface.co/Xenova/TinyLLama-v0/tree/main",
    "url": "https://github.com/huggingface/transformers.js/issues/669",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-29T14:50:06Z",
    "updated_at": "2025-10-13T04:57:32Z",
    "user": "dmmagdal"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 142,
    "title": "Deduplicating local data throws an error",
    "body": "Hi,\r\n\r\nI have data in my local machine in the format of a jsonl file and I want to deduplicate it. I'm using the following example:\r\n`sent_dedup_config = SentDedupConfig(\r\n    n_sentences=3,\r\n    split_sentences=False,  # set to False to split on \\n instead\r\n    only_dedup_in_index=True,\r\n    min_doc_words=50,\r\n)\r\n\r\nFINDER_WORKERS = 10  # this will speed up/parallelize step 2\r\n\r\ndef run_example():\r\n    pipeline_1 = [\r\n        JsonlReader(\"CC_data_inputs/\"),\r\n        SentenceDedupSignature(output_folder=\"cc_output/sigs\", config=sent_dedup_config, finder_workers=FINDER_WORKERS),\r\n    ]\r\n\r\n    pipeline_2 = [SentenceFindDedups(data_folder=\"cc_output/sigs\", output_folder=\"cc_output/dups\", config=sent_dedup_config)]\r\n\r\n    pipeline_3 = [\r\n        JsonlReader(data_folder=\"CC_data_inputs/\"),\r\n        SentenceDedupFilter(data_folder=\"cc_output/dups\", config=sent_dedup_config),\r\n    ]\r\n\r\n    executor_1: PipelineExecutor = LocalPipelineExecutor(pipeline=pipeline_1, workers=4, tasks=4)\r\n    executor_2: PipelineExecutor = LocalPipelineExecutor(pipeline=pipeline_2, workers=1, tasks=FINDER_WORKERS)\r\n    executor_3: PipelineExecutor = LocalPipelineExecutor(pipeline=pipeline_3, workers=4, tasks=4)\r\n\r\n    print(executor_1.run())\r\n    print(executor_2.run())\r\n    print(executor_3.run())\r\n`\r\nI edited the first pipeline to just read the jsonl file (assuming that my data is ready directly for step 2). When I run the code, it throws this error:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/ubuntu/deduplication/sentence_deduplication.py\", line 4, in <module>\r\n    from datatrove.pipeline.dedup.sentence_dedup import SentDedupConfig\r\nImportError: cannot import name 'SentDedupConfig' from 'datatrove.pipeline.dedup.sentence_dedup' (/home/ubuntu/miniconda3/lib/python3.11/site-packages/datatrove/pipeline/dedup/sentence_dedup.py)\r\n\r\nMy data consists of a set of 5 jsonl files inside the folder CC_data_inputs. I just reinstalled the datatrove library. Could you help me figure it out?",
    "url": "https://github.com/huggingface/datatrove/issues/142",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-29T12:31:30Z",
    "updated_at": "2024-04-24T14:15:58Z",
    "user": "Manel-Hik"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 122959,
    "title": "RuntimeError with PyTorch's MultiheadAttention: How to resolve shape mismatch?",
    "body": "### \ud83d\udc1b Describe the bug\n\nI'm encountering an issue regarding the input shape for PyTorch's MultiheadAttention. I have initialized MultiheadAttention as follows: \r\n`attention = MultiheadAttention(embed_dim=1536, num_heads=4)`\r\n\r\nThe input tensors have the following shapes:\r\n- query.shape is torch.Size([1, 1, 1536])\r\n- Both key.shape and value.shape are torch.Size([1, 23, 1536])\r\n\r\nHowever, when attempting to use these inputs, I encounter the following error:\r\n`RuntimeError                              Traceback (most recent call last)\r\nCell In[15], [line 1](vscode-notebook-cell:?execution_count=15&line=1)\r\n----> [1](vscode-notebook-cell:?execution_count=15&line=1) _ = cal_attn_weight_embedding(attention, top_j_sim_video_embeddings_list)\r\n\r\nFile [~/main/reproduct/choi/make_embedding.py:384](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/main/reproduct/choi/make_embedding.py:384), in cal_attn_weight_embedding(attention, top_j_sim_video_embeddings_list)\r\n    [381](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/main/reproduct/choi/make_embedding.py:381) print(embedding.shape)\r\n    [383](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/main/reproduct/choi/make_embedding.py:383) # attention\u3092\u8a08\u7b97\r\n--> [384](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/main/reproduct/choi/make_embedding.py:384) output, attn_weights = attention(thumbnail, embedding, embedding)\r\n    [385](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/main/reproduct/choi/make_embedding.py:385) # attn_weight shape: (1, 1, j+1)\r\n    [387](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/main/reproduct/choi/make_embedding.py:387) attn_weights = attn_weights.squeeze(0).unsqueeze(-1)  # shape: (j+1, 1)\r\n\r\nFile [~/anaconda3/envs/choi_venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1501](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/anaconda3/envs/choi_venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1501), in Module._call_impl(self, *args, **kwargs)\r\n   [1496](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/anaconda3/envs/choi_venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1496) # If we don't have any hooks, we want to skip the rest of the logic in\r\n   [1497](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/anaconda3/envs/choi_venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1497) # this function, and just call forward.\r\n   [1498](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/anaconda3/envs/choi_venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1498) if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks\r\n   [1499](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/anaconda3/envs/choi_venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1499)         or _global_backward_pre_hooks or _global_backward_hooks\r\n   [1500](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/anaconda3/envs/choi_venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1500)         or _global_forward_hooks or _global_forward_pre_hooks):\r\n-> [1501](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/anaconda3/envs/choi_venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1501)     return forward_call(*args, **kwargs)\r\n   [1502](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/anaconda3/envs/choi_venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1502) # Do not call functions when jit is used\r\n   [1503](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/anaconda3/envs/choi_venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1503) full_backward_hooks, non_full_backward_hooks = [], []\r\n\r\nFile [~/anaconda3/envs/choi_venv/lib/python3.8/site-packages/torch/nn/modules/activation.py:1205](https://vscode-remote+ssh-002dremote-002bvt003.vscode-resource.vscode-cdn.net/home/wake/main/reproduct/choi/~/anaconda3/envs/choi_venv/lib/python3.8/site-packages/torch/nn/modules/activation.py:1205), in MultiheadAttention.forward(self, query, key, value, key_padding_mask, need_weights, attn_mask, average_attn_weights, is_causal)\r\n   [1191](https://vscode-remote+ssh",
    "url": "https://github.com/pytorch/pytorch/issues/122959",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-29T09:19:45Z",
    "updated_at": "2025-01-22T12:08:21Z",
    "user": "YuyaWake"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 122957,
    "title": "How to export torch.optim.LBFGS using torch.onnx.export",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\r\n\r\nI have a python code that solve linear equations with torch.optim.LBFGS. And I want to make it work in C++. One posible way is to use libtorch. But I wander if I can export it like nn.Module with torch.onnx.export.\r\nHere is my python code:\r\n```\r\nimport torch\r\nimport torch.nn as nn\r\nimport onnxruntime as rt\r\nfrom torch.autograd import Variable\r\n\r\ndef test(jac_t, state):\r\n    n_actions = 5\r\n    dt = 0.01\r\n\r\n    # target = torch.randn(n_actions, 1)\r\n    target = torch.tensor([[ 0.0754],\r\n                       [ 1.2151],\r\n                       [-1.4920],\r\n                       [ 1.1642],\r\n                       [ 0.2289]])\r\n    mat = torch.matmul(jac_t, target) * dt + state\r\n\r\n    init = torch.randn(n_actions, 1)\r\n    init = torch.tensor([[-0.3018],\r\n                       [ 1.1070],\r\n                       [-1.4571],\r\n                       [ 1.0705],\r\n                       [-0.8479]])\r\n    q_dot = Variable(init, requires_grad=True)\r\n    v = [q_dot]\r\n    optimizer = torch.optim.LBFGS(v)#, lr=0.1)\r\n    for i in range(0, 10):\r\n        def cost():\r\n            optimizer.zero_grad()\r\n            next_state = torch.matmul(jac_t, q_dot) * dt + state\r\n            d = torch.pow(next_state - mat, 2).sum()\r\n            d.backward()\r\n            return d\r\n        optimizer.step(cost)\r\n        d = cost()\r\n        if d < 1e-3:\r\n            break\r\n    return init\r\n\r\nclass Test(nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.linear1 = nn.Linear(5, 1)\r\n        self.linear2 = nn.Linear(1, 1)\r\n\r\n    def forward(self, jac_t, state):\r\n        out = self.linear1(jac_t), self.linear2(state)\r\n        c = test(jac_t, state)\r\n        return out, c\r\n\r\nif __name__ == '__main__':\r\n    ttt = Test()\r\n    ttt.eval()\r\n    n_actions = 5\r\n    # jac_t = torch.randn(6, n_actions)\r\n    jac_t = torch.tensor([[ 2.0041,  2.2399, -0.0553,  1.4054,  0.2301],\r\n                          [ 1.4019, -2.3094, -1.0461,  0.7753,  1.0787],\r\n                          [-0.6338,  0.1553, -1.1531,  1.0613, -0.2952],\r\n                          [ 0.0541, -0.3652, -0.5361,  2.0200,  0.9431],\r\n                          [ 0.4075,  1.4435, -1.5067, -0.5096,  0.7448],\r\n                          [-0.6440, -0.6492,  0.3728, -2.8277, -1.1983]])\r\n    # state = torch.randn(6, 1)\r\n    state = torch.tensor([[-1.1193],\r\n                          [ 0.2084],\r\n                          [-1.4547],\r\n                          [-1.2416],\r\n                          [ 0.9738],\r\n                          [ 1.6379]])\r\n    torch.onnx.export(ttt, (jac_t, state), 'ttt.onnx')\r\n\r\n    a = ttt.forward(jac_t, state)\r\n    print('a', a[-1])\r\n\r\n    sess = rt.InferenceSession('ttt.onnx')\r\n    b = sess.run(None, {\"jac_t\": jac_t.numpy(), \"state\": state.numpy()})\r\n    print('b', b[-1])\r\n```\r\nThe outputs of a and b are the same (both close to the value of target), which meas that the inference with the exported onnx file do some calculation like python code. But if I comment out  `init = torch.tensor([[-0.3018]...` and use `init = torch.randn(n_actions, 1)`, the output of b will be wrong.\r\nSo I guess the calculation of the exported onnx module is not dynamic. It records the way to add/multiply to the result, something like Computational Graphs. In fact I have to use `out = self.linear1(jac_t), self.linear2(state)` to put jac_t, state into Computational Graphs.\r\nWhat's the proper way to export torch.optim.LBFGS?\r\n\r\n### Alternatives\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_\n\ncc @vincentqb @jbschlosser @albanD @janeyx99 @crcrpar",
    "url": "https://github.com/pytorch/pytorch/issues/122957",
    "state": "open",
    "labels": [
      "module: onnx",
      "module: optimizer",
      "triaged"
    ],
    "created_at": "2024-03-29T08:42:49Z",
    "updated_at": "2024-07-22T09:48:29Z",
    "user": "shekmun"
  },
  {
    "repo": "huggingface/optimum-intel",
    "number": 642,
    "title": "How to apply LoRA adapter to a model loaded with OVModelForCausalLM()?",
    "body": "In the transformers library, we can load multiple adapters to the original model by load_adapter then switch the specified adapter with set_adapter like below.\r\n\r\n```\r\n# base model\r\nmodel = AutoModelForCausalLM.from_pretrained(\r\n    model_name,\r\n)\r\n\r\n# load multiple adapters\r\nmodel.load_adapter(\"model/adapter1/\", \"adapter1\")\r\nmodel.load_adapter(\"model/adapter2/\", \"adapter2\")\r\n\r\n# switch adapter\r\nmodel.set_adapter(\"adapter2\")\r\n```\r\nNow I want to apply LoRA adapters with OpenVINO, but I can't find an example of it.\r\nIs it possible to do it with OVModelForCausalLM?\r\n\r\n",
    "url": "https://github.com/huggingface/optimum-intel/issues/642",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-29T01:13:44Z",
    "updated_at": "2024-08-03T12:34:21Z",
    "user": "nai-kon"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 122916,
    "title": "MPS torch.where() is giving objectively incorrect results, leading to critical calculation errors",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\n\r\nI think I have an example of how MPS can get completely different results from CPU. Hopefully the simplicity of this example will be clear and helpful. This may be related to a previous issue noted on this forum (#84936).\r\n\r\n```python\r\nimport numpy as np\r\nimport torch\r\nmps_device = torch.device(\"mps\")\r\n\r\n## Create a numpy matrix with many zeros\r\nnp.random.seed(0)\r\nNumpy_Test = np.random.random(200000000)\r\nindices = np.random.choice(np.arange(Numpy_Test.size), replace=False,size=int(Numpy_Test.size * 0.6))\r\nNumpy_Test[indices] = 0\r\nNumpy_Matrix = Numpy_Test.reshape((20000,10000))\r\n\r\n## Get the indices of non-zero values in the matrix, and convert these indices into a numpy array\r\nindices = np.where(Numpy_Matrix != 0)\r\nindices = np.asarray(indices)\r\n\r\n## Use numpy, torch, or a torch.mps object to find where indices[1] == 8000\r\n# Using np.where\r\nnp.where(indices[1] == 8000)[0]\r\narray([   19165,    27061,    39165, ..., 79979029, 79987021, 79995171])\r\n\r\n# Using torch.where\r\ntorch.where(torch.from_numpy(indices)[1] == 8000)[0]\r\ntensor([   19165,    27061,    39165,  ..., 79979029, 79987021, 79995171])\r\n\r\n# Using torch.where with an NPS object\r\ntorch.where(torch.from_numpy(indices)[1].to(mps_device) == 8000)[0]\r\ntensor([   19165,    27061,    39165,  ..., 79979032, 79987024, 79995168], device='mps:0')\r\n\r\n```\r\nNotice how the first two np.where and torch.where examples give them same results, but when using the tensor converted to MPS we get different results?\r\n\r\nIf I've not made an obvious mistake, this is a clear example of how MPS completely ruins calculations, because in this case, the indexes change, and all downstream calculations become meaningless. \r\n\r\n### Versions\r\n\r\ntorch version v0.2.1 and v0.2.0\r\n\r\ncc @kulinseth @albanD @malfet @DenisVieriu97 @razarmehr",
    "url": "https://github.com/pytorch/pytorch/issues/122916",
    "state": "closed",
    "labels": [
      "triaged",
      "module: 64-bit",
      "module: correctness (silent)",
      "module: mps"
    ],
    "created_at": "2024-03-28T19:56:17Z",
    "updated_at": "2025-03-01T16:19:53Z",
    "user": "aradley"
  },
  {
    "repo": "huggingface/transformers",
    "number": 29948,
    "title": "How to All Utilize all GPU's when device=\"balanced_low_0\" in GPU setting",
    "body": "### System Info\n\nI know that while loading the model in \"balanced_low_0\" GPU setting the model is loaded into all GPU's apart from 0: GPU. Where the 0: GPU is left to do the text inference. (i.e. text inference as in performing all the calculation to generate response inside the LLM)\r\n\r\nSo, as per the give device parameter my model is loaded onto 1,2,3 GPU's and 0: GPU is left for inference.\r\n\r\n| ID | GPU | MEM |\r\n| 0 | 0% | 3% |\r\n| 1 | 0% | 83% |\r\n| 2 | 0% | 82% |\r\n| 3 | 0% | 76% |\r\n\r\nQuestion: How can i also utilize the remaining 1,2,3 GPU's to perform text inference not only 0:GPU?\r\n\r\nContext: \"balanced_low_0\" evenly splits the model on all GPUs except the first one, and only puts on GPU 0 what does not fit on the others. This option is great when you need to use GPU 0 for some processing of the outputs, like when using the generate function for Transformers models\r\n\r\nReference: https://huggingface.co/docs/accelerate/en/concept_guides/big_model_inference#designing-a-device-map\r\n\r\nCC: \r\n@gante @ArthurZucker  and @younesbelkada \r\n\r\nApologies if the ticket is raised under different bucket\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nna\n\n### Expected behavior\n\nna",
    "url": "https://github.com/huggingface/transformers/issues/29948",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-28T19:54:09Z",
    "updated_at": "2024-05-07T13:43:08Z",
    "user": "kmukeshreddy"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2649,
    "title": "Should we support /filter on columns that contain SQL commands?",
    "body": "See the `schema` column on https://huggingface.co/datasets/motherduckdb/duckdb-text2sql-25k. Clicking on any of the 'classes' leads to an error\r\n\r\n<img width=\"1209\" alt=\"Capture d\u2019e\u0301cran 2024-03-28 a\u0300 15 11 50\" src=\"https://github.com/huggingface/datasets-server/assets/1676121/3aaf779f-0465-429a-bafb-1a16ff5f2901\">\r\n\r\nThe erroneous URL is:\r\n\r\nhttps://datasets-server.huggingface.co/filter?dataset=motherduckdb%2Fduckdb-text2sql-25k&config=default&split=train&offset=0&length=100&where=schema%3D%27CREATE+TABLE+%22venue%22+%28%0A++%22venueId%22+INTEGER+NOT+NULL%2C%0A++%22venueName%22+VARCHAR%28100%29%2C%0A++%22venueInfo%22+JSON%2C%0A++PRIMARY+KEY+%28%22venueId%22%29%0A%29%3B%0A%0ACREATE+TABLE+%22author%22+%28%0A++%22authorId%22+INTEGER+NOT+NULL%2C%0A++%22authorName%22+VARCHAR%2850%29%2C%0A++%22authorPublications%22+INT%5B%5D%2C%0A++PRIMARY+KEY+%28%22authorId%22%29%0A%29%3B%0A%0ACREATE+TABLE+%22dataset%22+%28%0A++%22datasetId%22+INTEGER+NOT+NULL%2C%0A++%22datasetName%22+VARCHAR%2850%29%2C%0A++%22datasetInfo%22+STRUCT%28v+VARCHAR%2C+i+INTEGER%29%2C%0A++PRIMARY+KEY+%28%22datasetId%22%29%0A%29%3B%0A%0ACREATE+TABLE+%22journal%22+%28%0A++%22journalId%22+INTEGER+NOT+NULL%2C%0A++%22journalName%22+VARCHAR%28100%29%2C%0A++%22journalInfo%22+MAP%28INT%2C+DOUBLE%29%2C%0A++PRIMARY+KEY+%28%22journalId%22%29%0A%29%3B%0A%0ACREATE+TABLE+%22keyphrase%22+%28%0A++%22keyphraseId%22+INTEGER+NOT+NULL%2C%0A++%22keyphraseName%22+VARCHAR%2850%29%2C%0A++%22keyphraseInfo%22+VARCHAR%2850%29%5B%5D%2C%0A++PRIMARY+KEY+%28%22keyphraseId%22%29%0A%29%3B%0A%0ACREATE+TABLE+%22paper%22+%28%0A++%22paperId%22+INTEGER+NOT+NULL%2C%0A++%22title%22+VARCHAR%28300%29%2C%0A++%22venueId%22+INTEGER%2C%0A++%22year%22+INTEGER%2C%0A++%22numCiting%22+INTEGER%2C%0A++%22numCitedBy%22+INTEGER%2C%0A++%22journalId%22+INTEGER%2C%0A++%22paperInfo%22+UNION%28num+INT%2C+str+VARCHAR%29%2C%0A++PRIMARY+KEY+%28%22paperId%22%29%2C%0A++FOREIGN+KEY%28%22journalId%22%29+REFERENCES+%22journal%22%28%22journalId%22%29%2C%0A++FOREIGN+KEY%28%22venueId%22%29+REFERENCES+%22venue%22%28%22venueId%22%29%0A%29%3B%0A%0ACREATE+TABLE+%22cite%22+%28%0A++%22citingPaperId%22+INTEGER+NOT+NULL%2C%0A++%22citedPaperId%22+INTEGER+NOT+NULL%2C%0A++%22citeInfo%22+INT%5B%5D%2C%0A++PRIMARY+KEY+%28%22citingPaperId%22%2C%22citedPaperId%22%29%2C%0A++FOREIGN+KEY%28%22citedpaperId%22%29+REFERENCES+%22paper%22%28%22paperId%22%29%2C%0A++FOREIGN+KEY%28%22citingpaperId%22%29+REFERENCES+%22paper%22%28%22paperId%22%29%0A%29%3B%0A%0ACREATE+TABLE+%22paperDataset%22+%28%0A++%22paperId%22+INTEGER%2C%0A++%22datasetId%22+INTEGER%2C%0A++%22paperDatasetInfo%22+JSON%2C%0A++PRIMARY+KEY+%28%22datasetId%22%2C+%22paperId%22%29%0A%29%3B%0A%0ACREATE+TABLE+%22paperKeyphrase%22+%28%0A++%22paperId%22+INTEGER%2C%0A++%22keyphraseId%22+INTEGER%2C%0A++%22paperKeyphraseInfo%22+JSON%2C%0A++PRIMARY+KEY+%28%22keyphraseId%22%2C%22paperId%22%29%2C%0A++FOREIGN+KEY%28%22paperId%22%29+REFERENCES+%22paper%22%28%22paperId%22%29%2C%0A++FOREIGN+KEY%28%22keyphraseId%22%29+REFERENCES+%22keyphrase%22%28%22keyphraseId%22%29%0A%29%3B%0A%0ACREATE+TABLE+%22writes%22+%28%0A++%22paperId%22+INTEGER%2C%0A++%22authorId%22+INTEGER%2C%0A++%22writesInfo%22+JSON%2C%0A++PRIMARY+KEY+%28%22paperId%22%2C%22authorId%22%29%2C%0A++FOREIGN+KEY%28%22paperId%22%29+REFERENCES+%22paper%22%28%22paperId%22%29%2C%0A++FOREIGN+KEY%28%22authorId%22%29+REFERENCES+%22author%22%28%22authorId%22%29%0A%29%3B%27\r\n\r\n```json\r\n{\"error\":\"Parameter 'where' contains invalid symbols\"}\r\n```\r\n\r\nIt's because the content includes some of the forbidden symbols:\r\n\r\nhttps://github.com/huggingface/datasets-server/blob/4dddea2e6a476d52ba5be0c7c64fb8eca9827935/services/search/src/search/routes/filter.py#L53\r\n\r\nDo you think it's possible to support the above query? Or should we handle the error on the Hub (not easy to do more than currently)?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2649",
    "state": "open",
    "labels": [
      "question",
      "api",
      "P2"
    ],
    "created_at": "2024-03-28T14:14:01Z",
    "updated_at": "2024-03-28T14:24:34Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/serve",
    "number": 3051,
    "title": "Can torchserve return image data?",
    "body": "### \ud83d\udcda The doc issue\n\nI have a model that outputs byte data of an image. I would like to ask how torchserve should return this type of data?\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/3051",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2024-03-28T07:24:56Z",
    "updated_at": "2024-04-02T22:53:39Z",
    "comments": 1,
    "user": "pengxin233"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2593,
    "title": "How to use training function rather than training scripts in multi GPUs and multi node?",
    "body": "I confirmed that the Multi-gpu launcher is executed based on the training function using the PrepareForLaunch function in \"accelerate/examples/multigpu_remote_launcher.py\".\r\n\r\nUsually, the \"accelerate launch\" or \"python -m torch.distributed.run\" command is used for multi-node, but is there a way to utilize a training function like the PrepareForLaunch function?",
    "url": "https://github.com/huggingface/accelerate/issues/2593",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-28T07:05:50Z",
    "updated_at": "2024-05-05T15:06:26Z",
    "user": "wlsghks4043"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2720,
    "title": "\u2753 [Question] compiled ExportedProgram is slower than uncompiled model",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nI tried compiling a few models with `torch_tensorrt.compile(model, inputs, ir='dynamo', ...)` and each one of them was slower than the respective uncompiled model. I was wondering if I was using torch_tensorrt incorrectly.\r\n\r\n## What you have already tried\r\nA minimum example:\r\n```\r\nimport torch\r\nimport torch_tensorrt\r\nimport time\r\n\r\nmodel = torch.hub.load('pytorch/vision:v0.10.0', 'mobilenet_v2', pretrained=True)\r\nmodel.eval().cuda()\r\n\r\ninputs = [\r\n    torch_tensorrt.Input(\r\n        shape=torch.Size((1, 3, 480, 640)),\r\n        dtype=torch.float,\r\n    )\r\n]\r\ntrt_model = torch_tensorrt.compile(model, inputs=inputs, ir='dynamo', truncate_long_and_double=True, enabled_precisions={torch.half}, opt_level='max')\r\n```\r\n\r\nThe inference time was measured as below:\r\n```\r\nx = torch.rand((1, 3, 480, 640)).cuda() - 0.5\r\n\r\n# warm up \r\nfor _ in range(10):\r\n  trt_model(x)\r\n\r\ntotal_time = 0\r\nfor _ in range(20):\r\n  start = time.time()\r\n  out = trt_model(x)\r\n  total_time += time.time() - start\r\nprint(total_time / 20)\r\n\r\n```\r\n\r\nOn average the uncompiled model inference time is 4ms and compiled model 9ms.\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.2.1\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip intall torch torch_tensorrt\r\n - Build command you used (if compiling from source): \r\n - Are you using local sources or building from archives:\r\n - Python version: 3.11\r\n - CUDA version: 12.3\r\n - GPU models and configuration: NVIDIA GeForce RTX 4050\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2720",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-28T06:08:21Z",
    "updated_at": "2024-04-02T22:02:01Z",
    "user": "Qi-Zha0"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 144,
    "title": "Can we please add the option to work with a tokenized dataset, escpailly for the CPT task. ",
    "body": "Since we have the CPT task now, it would be nice to have the ability to feel a tokenized and packed dataset directly. ",
    "url": "https://github.com/huggingface/alignment-handbook/issues/144",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-27T18:31:58Z",
    "updated_at": "2025-02-27T16:23:06Z",
    "comments": 1,
    "user": "shamanez"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 668,
    "title": "Is it possible to run a music / sounds generation model?",
    "body": "### Question\n\nI'd love to create a browser-based music generation tool, or one that can turn text into sound effects. Is that supported?\r\n\r\nI guess my more general question is: can Transformers.js run pretty much any .onnx I throw at it, or does each model require some level of implementation before it can be used?",
    "url": "https://github.com/huggingface/transformers.js/issues/668",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-27T18:22:31Z",
    "updated_at": "2024-05-13T21:17:54Z",
    "user": "flatsiedatsie"
  },
  {
    "repo": "huggingface/optimum-quanto",
    "number": 139,
    "title": "Dequantizing tensors using quanto",
    "body": "I noticed the quantized models have these 4 additional features, for every weight in the original, e.g:\r\n```\r\nmodel.layers.0.mlp.down_proj.activation_qtype,\r\nmodel.layers.0.mlp.down_proj.input_scale,\r\nmodel.layers.0.mlp.down_proj.output_scale,\r\nmodel.layers.0.mlp.down_proj.weight_qtype\r\n```\r\nI guess `qtype` refers to the quantized datatype, and `scale` probably refers to the scaling factor used during quantization? Although what is the difference between `input_scale` and `output scale`? Is it possible to recreate the exact original tensor using these values and the quantized weight?\r\nIf yes, then what would the formula be for the dequantization?",
    "url": "https://github.com/huggingface/optimum-quanto/issues/139",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-27T18:00:34Z",
    "updated_at": "2024-04-11T09:22:29Z",
    "user": "raunaks13"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 458,
    "title": "Safetensors uses excessive RAM when saving files",
    "body": "Safetensors uses around twice the RAM that `torch.save`:\r\n\r\n```python\r\nimport resource\r\nimport torch\r\nfrom safetensors.torch import save_file\r\n\r\ntorch.save({'tensor': torch.randn((500000000))}, 'test.torch')\r\nprint(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss)\r\nsave_file({'tensor': torch.randn((500000000))}, 'test.safetensors')\r\nprint(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss)\r\n```\r\n\r\nOutput:\r\n```\r\n2308324\r\n4261528\r\n```\r\n\r\nI believe this is because safetensors loads the full tensor in the `prepare` function instead of streaming it. Is it possible to stream the writes instead? For instance, having a `prepare_metadata` function that generates the metadata first, writing that first, then each individual tensor.",
    "url": "https://github.com/huggingface/safetensors/issues/458",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-03-27T12:11:38Z",
    "updated_at": "2024-05-02T01:47:32Z",
    "comments": 1,
    "user": "sheepymeh"
  },
  {
    "repo": "pytorch/text",
    "number": 2249,
    "title": "Why torchtext needs to reinstall torch",
    "body": "Hi team, I am trying to install torchtext with torch 2.2.1-cu121 installed. But once I run `pip install torchtext` the pip will install torch 2.2.1 cpu version for me, is there any way to avoid this?\r\n\r\nThe output log:\r\n```bash\r\nSuccessfully installed torch-2.2.2+cu121 torchaudio-2.2.2+cu121 torchvision-0.17.2+cu121\r\nPS :/scratch/github/scgpt$ pip uninstall torchtext\r\nFound existing installation: torchtext 0.17.1\r\nUninstalling torchtext-0.17.1:\r\n  Would remove:\r\n    /anaconda/envs/scgpt/lib/python3.11/site-packages/torchtext-0.17.1.dist-info/*\r\n    /anaconda/envs/scgpt/lib/python3.11/site-packages/torchtext/*\r\nProceed (Y/n)? \r\n  Successfully uninstalled torchtext-0.17.1\r\nPS :/scratch/github/scgpt$ pip install -U torchtext --no-cache\r\nCollecting torchtext\r\n  Downloading torchtext-0.17.1-cp311-cp311-manylinux1_x86_64.whl.metadata (7.6 kB)\r\nRequirement already satisfied: tqdm in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torchtext) (4.66.2)\r\nRequirement already satisfied: requests in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torchtext) (2.28.1)\r\nCollecting torch==2.2.1 (from torchtext)\r\n  Downloading torch-2.2.1-cp311-cp311-manylinux1_x86_64.whl.metadata (26 kB)\r\nRequirement already satisfied: numpy in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torchtext) (1.26.3)\r\nRequirement already satisfied: torchdata==0.7.1 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torchtext) (0.7.1)\r\nRequirement already satisfied: filelock in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (3.9.0)\r\nRequirement already satisfied: typing-extensions>=4.8.0 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (4.8.0)\r\nRequirement already satisfied: sympy in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (1.12)\r\nRequirement already satisfied: networkx in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (3.2.1)\r\nRequirement already satisfied: jinja2 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (3.1.2)\r\nRequirement already satisfied: fsspec in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (2024.2.0)\r\nRequirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (12.1.105)\r\nRequirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (12.1.105)\r\nRequirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (12.1.105)\r\nRequirement already satisfied: nvidia-cudnn-cu12==8.9.2.26 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (8.9.2.26)\r\nRequirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (12.1.3.1)\r\nRequirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (11.0.2.54)\r\nRequirement already satisfied: nvidia-curand-cu12==10.3.2.106 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (10.3.2.106)\r\nRequirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (11.4.5.107)\r\nRequirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (12.1.0.106)\r\nRequirement already satisfied: nvidia-nccl-cu12==2.19.3 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (2.19.3)\r\nRequirement already satisfied: nvidia-nvtx-cu12==12.1.105 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (12.1.105)\r\nRequirement already satisfied: triton==2.2.0 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torch==2.2.1->torchtext) (2.2.0)\r\nRequirement already satisfied: urllib3>=1.25 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from torchdata==0.7.1->torchtext) (1.26.13)\r\nRequirement already satisfied: nvidia-nvjitlink-cu12 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from nvidia-cusolver-cu12==11.4.5.107->torch==2.2.1->torchtext) (12.4.99)\r\nRequirement already satisfied: charset-normalizer<3,>=2 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from requests->torchtext) (2.1.1)\r\nRequirement already satisfied: idna<4,>=2.5 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from requests->torchtext) (3.4)\r\nRequirement already satisfied: certifi>=2017.4.17 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from requests->torchtext) (2022.12.7)\r\nRequirement already satisfied: MarkupSafe>=2.0 in /anaconda/envs/scgpt/lib/python3.11/site-packages (from jinja2->torch=",
    "url": "https://github.com/pytorch/text/issues/2249",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-27T11:19:41Z",
    "updated_at": "2024-03-27T11:23:04Z",
    "comments": 0,
    "user": "WhenMelancholy"
  },
  {
    "repo": "huggingface/transformers",
    "number": 29897,
    "title": "How to finetune a language model after extent token embeddings?",
    "body": "If I add some new tokens for a language model, I will get some random initialized weights in embeddings and lm_head. Is there any official way to train only these new weights? Or all I can do is adding hooks to the tensors to zero the gradient for weights I do not want to change?",
    "url": "https://github.com/huggingface/transformers/issues/29897",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-27T08:20:24Z",
    "updated_at": "2024-03-27T15:01:04Z",
    "user": "bluewanderer"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2718,
    "title": "\u2753 [Question] Can TensorRT load and run torch_tensorrt models directly? ",
    "body": "Can TensorRT load and run torch_tensorrt models directly? I want to export my pytorch model and deploy it with TensorRT.",
    "url": "https://github.com/pytorch/TensorRT/issues/2718",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-27T07:46:57Z",
    "updated_at": "2024-06-07T01:10:43Z",
    "user": "theNefelibata"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1677,
    "title": "how to get the latest version number?",
    "body": "In the document, I use \"docker run ghcr.io/huggingface/text-generation-inference:latest\" to run the latest version of tgi. But in a production environment, I need to fix the version number. I can't find any webpage similar to [docker hub](https://hub.docker.com/r/pytorch/manylinux-cuda102). So how can I use docker command line to get the version list of huggingface/text-generation-inference?",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1677",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-27T05:43:49Z",
    "updated_at": "2024-03-29T02:30:10Z",
    "user": "fancyerii"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 122756,
    "title": "How to reduce memory usage for large matrix calculations\uff1f",
    "body": "\r\nA_ = torch.sigmoid(torch.matmul(x, x.t()))\r\nx is the feature of tens of thousands of nodes, the shape is 700,000*8, 8 is the number of features extracted from each node.\r\nCalculation requires several t of memory. How to reduce memory overhead?",
    "url": "https://github.com/pytorch/pytorch/issues/122756",
    "state": "open",
    "labels": [
      "triaged"
    ],
    "created_at": "2024-03-27T02:06:03Z",
    "updated_at": "2024-04-01T15:59:16Z",
    "user": "bowensuuu"
  },
  {
    "repo": "pytorch/serve",
    "number": 3045,
    "title": "gRPC Model Metadata using Open Inference Protocol",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nConsider a system where a feature service fetches model metadata that has information on what feature to fetch and finally infer from the model. In order for me fetch this metadata regarding inputs and outputs I am trying to use the recently added [Open inference protocol](https://github.com/pytorch/serve/blob/master/frontend/server/src/main/resources/proto/open_inference_grpc.proto). \r\nwhile trying to infer using grpcurl, it shows me the name and version of the model. \r\n\r\n```\r\n grpcurl -plaintext -d  '{\"name\": \"toy-ranker\"}' -proto serve/frontend/server/src/main/resources/proto/open_inference_grpc.proto  localhost:79 org.pytorch.serve.grpc.openinference.GRPCInferenceService/ModelMetadata\r\n{\r\n  \"name\": \"toy-ranker\",\r\n  \"versions\": [\r\n    \"2024-03-26-15:33\"\r\n  ]\r\n}\r\n```\r\nwith simple curl, the output is REST API does not add anything[ model custom](https://github.com/pytorch/serve/blob/master/frontend/server/src/main/java/org/pytorch/serve/http/api/rest/OpenInferenceProtocolRequestHandler.java#L58-L66) to it. \r\n```\r\n$ curl http://localhost:80/v2\r\n{\r\n  \"name\": \"Torchserve\",\r\n  \"version\": \"0.10.0\",\r\n  \"extenstion\": [\r\n    \"kserve\",\r\n    \"kubeflow\"\r\n  ]\r\n}\r\n\r\n```\r\n\r\nI was trying to understand where it sets this metadata so i can impute it accordingly. I could not find a way for it to set [inputs and outputs](https://github.com/pytorch/serve/blob/master/frontend/server/src/main/java/org/pytorch/serve/grpcimpl/OpenInferenceProtocolImpl.java#L155-L180). \r\n\r\nDo you know of how the metadata is set if so in torchserve.\r\n\r\n### Error logs\r\n\r\nn/a\r\n\r\n### Installation instructions\r\n\r\nDockerfile on top of latest torchserve image\r\n```\r\nfrom pytorch/torchserve-nightly:latest-gpu\r\nENV TS_OPEN_INFERENCE_PROTOCOL oip\r\n\r\n```\r\n\r\n### Model Packaing\r\n\r\nmnist model can be used, independent of model type.\r\n\r\n### config.properties\r\n\r\ninference_address=http://0.0.0.0:8080\r\nmanagement_address=http://0.0.0.0:8081\r\nmetrics_address=http://0.0.0.0:8082\r\nenable_metrics_api=true\r\nmodel_metrics_auto_detect=true\r\nmetrics_mode=prometheus\r\nnumber_of_netty_threads=32\r\njob_queue_size=1000\r\nenable_envvars_config=true\r\nmodel_store=/home/model-server/model-store\r\nworkflow_store=/home/model-server/wf-store\r\nload_models=all\r\n\r\n### Versions\r\n\r\n------------------------------------------------------------------------------------------\r\nEnvironment headers\r\n------------------------------------------------------------------------------------------\r\nTorchserve branch:\r\n\r\n**Warning: torchserve not installed ..\r\n**Warning: torch-model-archiver not installed ..\r\n\r\nPython version: 3.11 (64-bit runtime)\r\nPython executable: /home/hmeena/.pyenv/versions/airflow/bin/python\r\n\r\nVersions of relevant python libraries:\r\nrequests==2.31.0\r\n**Warning: torch not present ..\r\n**Warning: torchtext not present ..\r\n**Warning: torchvision not present ..\r\n**Warning: torchaudio not present ..\r\n\r\nJava Version:\r\n\r\n\r\nOS: CentOS Linux release 7.5.1804 (Core)\r\nGCC version: (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)\r\nClang version: 3.4.2 (tags/RELEASE_34/dot2-final)\r\nCMake version: N/A\r\n\r\nEnvironment:\r\nlibrary_path (LD_/DYLD_): :/search/dist/bin:/search/dist/bin\r\n\r\n\r\n### Repro instructions\r\n\r\n[Model from old issue ](https://github.com/pytorch/serve/issues/2951#issuecomment-1984168898)i created can be used. \r\n\r\n### Possible Solution\r\n\r\nTake an input metadata file that can be exposed on both gRPC and [REST](https://github.com/pytorch/serve/blob/master/frontend/server/src/main/java/org/pytorch/serve/http/api/rest/OpenInferenceProtocolRequestHandler.java#L58-L66) metadata endpoints. One example is on the lines of seldon metadata ep that exposes [this information](https://github.com/SeldonIO/seldon-core/blob/master/examples/models/metadata/models/init-metadata/Model.py#L15-L28). ",
    "url": "https://github.com/pytorch/serve/issues/3045",
    "state": "open",
    "labels": [
      "OIP"
    ],
    "created_at": "2024-03-26T20:52:16Z",
    "updated_at": "2024-04-02T22:54:39Z",
    "comments": 1,
    "user": "harshita-meena"
  },
  {
    "repo": "pytorch/xla",
    "number": 6822,
    "title": "Loading large model (e.g. LLMs)",
    "body": "## \u2753 Questions and Help\r\n\r\nHi, I'm trying to load large models on TPU-V4 Pod. I saw the discussions in the issues about torchdistX and meta devices. I'm wondering is there any good or recommended solution now?\r\n\r\nI am having trouble installing torchdistX with torch/torchXLA 2.2.0 and the LLaMA model I'm loading doesn't have reset_params as well. There are also some discussions on about reset_params in the issues. ",
    "url": "https://github.com/pytorch/xla/issues/6822",
    "state": "closed",
    "labels": [
      "question",
      "dataloading"
    ],
    "created_at": "2024-03-26T18:20:16Z",
    "updated_at": "2025-04-18T12:43:08Z",
    "user": "tsb0601"
  },
  {
    "repo": "huggingface/optimum-quanto",
    "number": 134,
    "title": "Should quanto use int dtype in AffineQuantizer instead of uint?",
    "body": "According to code in https://github.com/huggingface/quanto/blob/main/quanto/tensor/qbitstensor.py#L34 I find quanto use uint dtype to store the quantized value in affine quantizer, while in symmetric quantizer it is int dtype \r\n https://github.com/huggingface/quanto/blob/main/quanto/tensor/qtensor.py#L62.\r\n\r\nTaking hardware into consideration, If we quantize both weight and activation to int types, will it save the cost of GPU or NPU since this only requires integer-type MAC arrays",
    "url": "https://github.com/huggingface/optimum-quanto/issues/134",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-26T14:21:25Z",
    "updated_at": "2024-04-11T09:25:09Z",
    "user": "shuokay"
  },
  {
    "repo": "huggingface/hub-docs",
    "number": 1257,
    "title": "Add section about deprecation of script-based datasets?",
    "body": "Asked here: https://github.com/huggingface/datasets-server/issues/2385#issuecomment-2017984722\r\n\r\n> Perhaps a little bit of suggestion from me is to include a disclaimer in the docs so that others are aware that developing a custom script is not supported.\r\n\r\nIt would also help answer the discussions + we could link in the error message directly.\r\n\r\n---\r\n\r\nOn the other hand, maybe we just want to deprecate it sooner than later, and not spend too much time on this.",
    "url": "https://github.com/huggingface/hub-docs/issues/1257",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-26T13:20:27Z",
    "updated_at": "2024-03-26T17:49:50Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/xla",
    "number": 6820,
    "title": "Help RoPE fusion ",
    "body": "## \u2753 Questions and Help\r\nI use the set of tools pytorch/torch xla/openxla, and I want to fuse the operator RoPE into a custom operator, so that the hardware can operate directly. Do you think which layer I should do this better? In the xla pass? Define a RoPE operator in the python layer? Or has the existing framework already implemented this problem of mine?",
    "url": "https://github.com/pytorch/xla/issues/6820",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-26T11:54:24Z",
    "updated_at": "2025-04-18T12:45:22Z",
    "user": "ckfgihub"
  },
  {
    "repo": "huggingface/candle",
    "number": 1941,
    "title": "[help] how to update a portion of a long tensor",
    "body": "I'm aware of the closed issue(#1163 ) and understand that Var is mutable and Tensor is immutable by design. But I find it hard to impl some logic if it's impossible to update a portion of a Tensor.\r\n\r\nFor example, how can I generate a pairwise combination from two 2d tensors:\r\n```rust\r\n        let a = Tensor::new(&[[1.0], [2.0]], &device)?;\r\n        let b = Tensor::new(&[[3.0], [4.0]], &device)?;\r\n\r\n        // how to generate a tensor that is the pair combination of the two?\r\n        // [[1, 3], [1, 4], [2, 3], [2, 4]]\r\n\r\n        let c = Tensor::zeros(&[2, 2, 1], DType::F32, &device)?;\r\n        for i in 0..a.dim(0)? {\r\n            for j in 0..b.dim(0)? {\r\n                // won't work!\r\n                // here we cannot set the content of the tensor via `set`\r\n                c.i((i, j)).set(Tensor::cat(&[&a, &b], 0)?);\r\n            }\r\n        }\r\n```\r\n",
    "url": "https://github.com/huggingface/candle/issues/1941",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-26T11:47:56Z",
    "updated_at": "2024-04-07T15:42:45Z",
    "user": "michael8090"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1776,
    "title": "How to convert a model(tf_model.h5) with tokenizer folder to the onnx format",
    "body": "### Feature request\r\n\r\nI have trained the TensorFlow model using the Transformers library and saved the trained model and tokenizer in a folder named MODEL_WITH_TOKENIZER. The model is stored inside the folder in a  **.h5** format - **tf_model.h5**\r\nHere is the folder structure.\r\n![Screenshot from 2024-03-26 16-17-28](https://github.com/huggingface/optimum/assets/41164884/ae132e6e-f326-4c1c-8024-367544fc679f)\r\n\r\nI want to convert the model to .onnx format\r\nShould I convert the entire MODEL_WITH_TOKENIZER folder to .onnx or only the tf_model.h5 file to onnx?\r\nwhat are the steps \r\n\r\n### Motivation\r\n\r\nHi, I have trained the TensorFlow model using the Transformers library and saved the trained model and tokenizer in a folder named MODEL_WITH_TOKENIZER. The model is stored in the **.h5** format - **model.h5**\r\nHere is the folder structure.\r\n![Screenshot from 2024-03-26 16-17-28](https://github.com/huggingface/optimum/assets/41164884/ae132e6e-f326-4c1c-8024-367544fc679f)\r\nI want to convert the model to .onnx format\r\nShould I convert the entire MODEL_WITH_TOKENIZER folder to .onnx or only the tf_model.h5 file to onnx?\r\nwhat are the steps \r\n\r\n### Your contribution\r\n\r\nI have trained the TensorFlow model using the Transformers library and saved the trained model and tokenizer in a folder named MODEL_WITH_TOKENIZER. The model is stored in the **.h5** format - **tf_model.h5**\r\nHere is the folder structure.\r\n![Screenshot from 2024-03-26 16-17-28](https://github.com/huggingface/optimum/assets/41164884/ae132e6e-f326-4c1c-8024-367544fc679f)\r\nI want to convert the model to .onnx format\r\nShould I convert the entire MODEL_WITH_TOKENIZER folder to .onnx or only the tf_model.h5 file to onnx?\r\nwhat are the steps ",
    "url": "https://github.com/huggingface/optimum/issues/1776",
    "state": "open",
    "labels": [
      "onnx"
    ],
    "created_at": "2024-03-26T10:48:02Z",
    "updated_at": "2024-10-14T13:35:13Z",
    "user": "pradeepdev-1995"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 142,
    "title": "Efficient dialog data format for KTO training",
    "body": "I have dialogs in the shareGPT format (see below) and for each `gpt` turn a label (thumbs up or thumbs down). But for KTO training, I have only seen datasets with the columns `prompt`, `completion` and `label` (see e.g. https://huggingface.co/datasets/trl-lib/kto-mix-14k).\r\n\r\nDo I need to unwind my shareGPT dialogs (see below) for KTO training, or is there some more efficient format I can use? \r\n\r\nHow should the dialog history be encoded in the `prompt` column (see below)?\r\n\r\nshareGPT-Format:\r\n```\r\n{\"conversations\":[\r\n  {\"from\":\"system\",\"value\":\"You are a friendly assistant for ....\\n\"},\r\n  {\"from\":\"human\",\"value\":\"Hello, I am Sam and ...\"},\r\n  {\"from\":\"gpt\",\"value\":\"Welcome Sam, so you ....\"},\r\n  {\"from\":\"human\",\"value\":\"Yes, but ....\"},\r\n  {\"from\":\"gpt\",\"value\":\"Then ...\"}\r\n]}\r\n```\r\n\r\nTransformed to KTO, with `prompt` column as close as possible to https://huggingface.co/datasets/trl-lib/kto-mix-14k:\r\n```\r\nprompt, completion, label\r\n[ { \"content\": \"You are a friendly assistant for ....\\n\", \"role\": \"system\" },  { \"content\": \"Hello, I am Sam and ...\", \"role\": \"human\" }], {\"role\":\"gpt\",\"content\":\"Welcome Sam, so you ....\"}, true\r\n[ { \"content\": \"You are a friendly assistant for ....\\n\", \"role\": \"system\" },  { \"content\": \"Hello, I am Sam and ...\", \"role\": \"human\" }, {\"role\":\"gpt\",\"content\":\"Welcome Sam, so you ....\"}, {\"role\":\"human\",\"content\":\"Yes, but ....\"}], {\"role\":\"gpt\",\"content\":\"Then ...\"}, false\r\n``",
    "url": "https://github.com/huggingface/alignment-handbook/issues/142",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-26T10:29:38Z",
    "updated_at": "2024-03-26T10:30:08Z",
    "comments": 0,
    "user": "DavidFarago"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 664,
    "title": "How to confirm if webgpu actually working in the backend with inferencing",
    "body": "### Question\r\n\r\nHi Team,\r\nThanks for the awsome library. \r\nRecently I am experimenting to run background remove model in the client side using webgpu. I came across this solution https://huggingface.co/spaces/Xenova/remove-background-webgpu.\r\n\r\nTried to replicate the same in my local using your V3 branch.\r\n\r\nThe way I have used it is as below. \r\n```\r\nconst model = await AutoModel.from_pretrained('briaai/RMBG-1.4', {\r\n            // Do not require config.json to be present in the repository\r\n            config: { model_type: 'custom' },\r\n            device: 'webgpu',\r\n            dtype: 'fp32'\r\n          })\r\n```\r\nI can see significant improvement while enabling `device: 'webgpu',` instead of wasm.\r\n\r\nQuestion 1:\r\nHow can I confirm if the webgpu is being used in the backend while inferencing as I can see in both of the case (with webgpu and without webgpu) the `ort-wasm-simd.jsep.wasm` file is getting loaded. why we are not loading `ort.webgpu.min`?\r\nSS\r\n![image](https://github.com/xenova/transformers.js/assets/55099778/836b092c-d3d7-4e81-99c5-7603a5affabd)\r\n\r\n\r\nQuestion 2: \r\nIt would be helpfull if you can share the repo for this `https://huggingface.co/spaces/Xenova/remove-background-webgpu ` as the code in huggingface is bundled.\r\n\r\nThanks in advance!!\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/664",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-26T08:17:05Z",
    "updated_at": "2024-07-24T06:13:50Z",
    "user": "abiswas529"
  },
  {
    "repo": "pytorch/serve",
    "number": 3042,
    "title": "Custom class handler missing BaseHandler ",
    "body": "### \ud83d\udcda The doc issue\n\nI believe the docs for a custom class level entry point are missing the base-class `BaseHandler`. If i'm mistaken, please close this issue.\r\n\r\nLink: https://github.com/pytorch/serve/blob/master/docs/custom_service.md#custom-handler-with-class-level-entry-point\n\n### Suggest a potential alternative/fix\n\nReplace `class ModelHandler(object):`  with `class ModelHandler(BaseHandler):`\r\n\r\n",
    "url": "https://github.com/pytorch/serve/issues/3042",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-03-26T06:54:31Z",
    "updated_at": "2024-03-26T20:41:02Z",
    "comments": 0,
    "user": "swstack"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2630,
    "title": "Take spawning.io opted out URLs into account in responses?",
    "body": "In particular, for images (assets / cached-assets).\r\n\r\nRaised internally: https://huggingface.slack.com/archives/C040J3VPJUR/p1702578556307069?thread_ts=1702577137.311409&cid=C040J3VPJUR",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2630",
    "state": "open",
    "labels": [
      "question",
      "P2"
    ],
    "created_at": "2024-03-25T11:49:49Z",
    "updated_at": "2024-03-25T11:49:58Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6756,
    "title": "Support SQLite files?",
    "body": "### Feature request\n\nSupport loading a dataset from a SQLite file\r\n\r\nhttps://huggingface.co/datasets/severo/test_iris_sqlite/tree/main\n\n### Motivation\n\nSQLite is a popular file format.\n\n### Your contribution\n\nSee discussion on slack: https://huggingface.slack.com/archives/C04L6P8KNQ5/p1702481859117909 (internal)\r\n\r\nIn particular: a SQLite file can contain multiple tables, which might be matched to multiple configs. Maybe the detail of splits and configs should be defined in the README YAML, or use the same format as for ZIP files: `Iris.sqlite::Iris`. \r\n\r\nSee dataset here: https://huggingface.co/datasets/severo/test_iris_sqlite\r\n\r\nNote: should we also support DuckDB files?",
    "url": "https://github.com/huggingface/datasets/issues/6756",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-03-25T11:48:05Z",
    "updated_at": "2024-03-26T16:09:32Z",
    "comments": 3,
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2629,
    "title": "Detect when a new commit only changes the dataset card?",
    "body": "Ideally, when we change the contents of the dataset card (not the YAML part), the responses computed by the datasets server should not be recomputed, because they will lead to the same results.\r\n\r\nasked here (private slack channel): https://huggingface.slack.com/archives/C04N96UGUFM/p1701862863691809\r\n\r\n> Sometimes I don't modify the dataset cards of datasets that have too many configs because I don't want to break the viewer for too long. I think we can detect when the change is only about the content dataset card and the dataset itself didn't change ?\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2629",
    "state": "closed",
    "labels": [
      "question",
      "improvement / optimization",
      "P2"
    ],
    "created_at": "2024-03-25T10:57:36Z",
    "updated_at": "2024-06-19T16:02:33Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2627,
    "title": "Replace our custom \"stale bot\" action with the GitHub's one?",
    "body": "See `actions/stale@v5`\r\n\r\n```yaml\r\nname: Mark inactive issues as stale\r\non:\r\n  schedule:\r\n    - cron: \"30 1 * * *\"\r\n\r\njobs:\r\n  close-issues:\r\n    runs-on: ubuntu-latest\r\n    permissions:\r\n      issues: write\r\n      pull-requests: write\r\n    steps:\r\n      - uses: actions/stale@v5\r\n        with:\r\n          days-before-issue-stale: 30\r\n          days-before-issue-close: -1\r\n          stale-issue-label: \"stale\"\r\n          stale-issue-message: \"This issue is stale because it has been open for 30 days with no activity.\"\r\n          close-issue-message: \"This issue was closed because it has been inactive for X days since being marked as stale.\"\r\n          days-before-pr-stale: -1\r\n          days-before-pr-close: -1\r\n          repo-token: ${{ secrets.GITHUB_TOKEN }}\r\n```\r\n\r\nfrom https://huggingface.slack.com/archives/C493XH5FX/p1701942940388579?thread_ts=1701932787.319359&cid=C493XH5FX",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2627",
    "state": "open",
    "labels": [
      "question",
      "ci",
      "P2"
    ],
    "created_at": "2024-03-25T10:48:47Z",
    "updated_at": "2024-03-25T10:49:02Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/examples",
    "number": 1242,
    "title": "Pytorch is insufficiently opinionated ",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\n## Context\r\nMachine learning models can be trained on secret, synthetic, or biased data to create seemingly authoritative probability estimates used for abusive purposes in legal contexts. In Jessica Logan's case, her 911 call was used as \"evidence\" [(when interpreted by a poorly trained and overly confident detective)](https://www.propublica.org/article/911-call-analysis-jessica-logan-evidence) that she had killed her baby.\r\n\r\nAs an example, an affiliate of Tracy Harpster [1] currently conspires to create an AI startup (Deceptio AI) to launder voodoo (via hidden datasets) to increase the odds of a wrongful conviction based on 911 call audio. Deceptio AI's website is excluded from the Internet Archive; this is a clear indication that Deceptio AI believes itself better off hidden.\r\n\r\nThis practice is [spreading throughout the law enforcement system](https://www.propublica.org/article/911-call-analysis-fbi-police-courts) faster than judges and investigators grounded in reality can possibly counter it. \r\n\r\nThe emergence of a webpage where a LEO can anonymously upload an audio clip and receive a \"guilty\" or \"not guilty\" certificate will crystallize the cost of this issue. \r\n\r\nFrom [3]:\r\n> A couple of years ago, he and his two business partners, including one who has decades of experience in statement analysis, decided to join forces and create software that essentially has the brain of a veteran analyst.\r\n> \r\n> \u201cWe've come up with an AI now that can detect deception in a person's written or spoken words,\u201d Carson said.\r\n> \r\n> In simple terms, Carson said a client of the business would go on their website, Deceptio.AI, and companies that purchase the software can input statements and the program determines how truthful the statement is and why it may or may not be the whole truth.\r\n> \r\n> \u201cThen we're going to simply click analyze statement and then what the section does is it gives you a probability of truthfulness,\u201d Carson said when demonstrating how Deceptio works. \u201cNow, what we see is anything that falls 85% and under means it's a highly deceptive statement.\u201d \r\n\r\nFrom [4]:\r\n> He designed the platform for widespread usage and said it requires no training. The co-founders have bootstrapped the startup over the past two years and recently opened their first funding round.\r\n> \r\n> \u201cWe\u2019re seeking the right investors,\u201d Carson explained. \u201cThose are the ones that understand the goal and vision of what a true AI tool like this will mean long-term. We\u2019ve turned down a couple already.\u201d\r\n> \r\n> Carson said the company has also collected and stored a massive amount of human behavioral data, called [pattern of life analysis](https://cambridge-intelligence.com/pattern-of-life-analysis/#:~:text=Pattern%20of%20life%20analysis%20is,large%20quantities%20of%20observed%20data.). He said Deceptio\u2019s database \u201cliterally maps\u201d deceptiveness in the human psyche.\r\n> \r\n> He noted that Cathie Wood, CEO of St. Petersburg-based ARK Invest, frequently mentions [the value of AI entrepreneurs amassing proprietary data](https://stpetecatalyst.com/generative-ai-takes-center-stage-at-synapse-summit/). Carson called Deceptio\u2019s information, which does not include personal information, \u201cexceptionally proprietary.\u201d\r\n> \r\n> \u201cTo our knowledge, there isn\u2019t anyone else on the planet doing what we\u2019re doing,\u201d he added. \u201cLet alone amassing the type of life intelligence data we\u2019re collecting.\u201d\r\n\r\n[1] Statement Analysis by Mark McClish and Tracy Harpster: https://web.archive.org/web/20231004064240/https://www.statementanalysis.com/bio/\r\n[2] Deceptio AI: https://www.deceptio.ai/\r\n[3] https://web.archive.org/web/20240325092556/https://baynews9.com/fl/tampa/news/2023/09/14/deceptio-ai-detects-lies\r\n[4] https://web.archive.org/web/20231002083318/https://stpetecatalyst.com/st-pete-startup-uses-ai-to-detect-lies/\r\n\r\nIf you believe similarly useless discrimators and their corporate reproductive organs will not be created for other abusive purposes, e.g. by banks, landlords, insurance firms, school administrators, university regents, forensic investigators, farmers, miners, doctors, or nurses, you are simply not paying attention.\r\n\r\n* Pytorch version: 2.2.1\r\n* Operating System and version: Ubuntu 20.04\r\n\r\n## Your Environment\r\n* Installed using source? [yes/no]: yes\r\n* Are you planning to deploy it using docker container? [yes/no]: no\r\n* Is it a CPU or GPU environment?: Both\r\n* Which example are you using: all\r\n* Link to code or data to repro [if any]:\r\n\r\n## Expected Behavior\r\nPyTorch should prohibit users from creating discriminators or generators intended for use on the real world which are trained with data not representative of the real world.\r\n\r\n## Current Behavior\r\nAnyone with an NVIDIA GPU can download PyTorch and train a model on fake datasets, then re-sell access to the model as an \"investigative service.\"\r\n\r\n## Possible Solution\r\nDestroy PyTorch.\r\n\r\n## Steps to Reproduce\r\nDeceptio.AI\r\n1. https://www.propublica.org/article/911-call-analy",
    "url": "https://github.com/pytorch/examples/issues/1242",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-25T09:13:15Z",
    "updated_at": "2024-03-26T07:17:14Z",
    "comments": 0,
    "user": "ghost"
  },
  {
    "repo": "huggingface/candle-paged-attention",
    "number": 1,
    "title": "How to use candle-paged-attention in candle models?",
    "body": "Could you provide an example of candle-paged-attention for actual usage in candle models (candle-examples)? Is this crate ready to be used in candle? i.e., tested in end2end model inference? I'm a little bit confused about the construction of  block_tables and context_lens. ",
    "url": "https://github.com/huggingface/candle-paged-attention/issues/1",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-25T09:09:24Z",
    "updated_at": "2024-03-25T12:07:13Z",
    "user": "guoqingbao"
  },
  {
    "repo": "pytorch/examples",
    "number": 1241,
    "title": "RuntimeError in Partialconv-master",
    "body": "## \ud83d\udcda Documentation\r\n\r\nI am getting this error in signal_handling.py file\r\n<img width=\"426\" alt=\"image\" src=\"https://github.com/pytorch/examples/assets/126889261/0881dd8e-abb2-467f-bab4-818f3f856418\">\r\nthat is in miniconda3/lib/python3.12/site-packages/torch/utils/data/_utils/signal_handling.py\r\n\r\nHow can I fix this?\r\n",
    "url": "https://github.com/pytorch/examples/issues/1241",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-24T21:37:03Z",
    "updated_at": "2024-03-26T07:17:49Z",
    "comments": 1,
    "user": "shaSaaliha"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1769,
    "title": "Accuracy change with BetterTransformer",
    "body": "When transforming the model into BetterTransformer model I'm seeing accuracy drop on the models. \r\nThe output scores changes considerably (upto 1-2 decimal points of precision). \r\n**Is accuracy change expected when switching to BetterTransformer ?** I'm not performing any ORT compilation or quantization on the model. \r\nFrom what I know FlashAttention is not supposed to change any accuracy since it is an exact attention score algorithm. Hence I'm not sure what is causing this change in score. \r\n\r\nSteps to reproduce\r\n```\r\nfrom transformers import AutoModelForSequenceClassification , AutoTokenizer\r\nfrom optimum.bettertransformer import BetterTransformer\r\n\r\ntokenizer=AutoTokenizer.from_pretrained(\"BAAI/bge-reranker-large\")\r\n\r\noriginal_model = AutoModelForSequenceClassification.from_pretrained(\"BAAI/bge-reranker-large\").to('cuda:0')\r\ntransformed_model = BetterTransformer.transform(original_model, keep_original_model=True).to('cuda:0')\r\n\r\nsentences_batch=[['do you like fox cookies', 'fox big brown fox']] \r\ninputs = tokenizer(sentences_batch,padding=True,truncation=True,return_tensors=\"pt\",max_length=512,).to('cuda:0')\r\n\r\nbetter_transformer_scores = transformed_model(**inputs, return_dict=True).logits.view(-1).float()\r\nprint(f\"BetterTransfomer output: {better_transformer_scores.detach().cpu().numpy().tolist()}\")\r\n\r\nvanilla_model_scores = original_model(**inputs, return_dict=True).logits.view(-1).float()\r\nprint(f\"Vanilla model output :{vanilla_model_scores.detach().cpu().numpy().tolist()}\")\r\n```\r\nOutput\r\n```\r\nBetterTransfomer output: [-7.378745079040527]\r\nVanilla model output :[-7.3596720695495605]\r\n```\r\n##### System state:\r\n* Package version:\r\n   * transformers == 4.39.1\r\n   * optimum == 1.17.1\r\n   * torch == 2.2.1\r\n* Instance Type : AWS p3.2xlarge ( GPU V100) . (Tied it on A100 as well )\r\n* CUDA Version: 12.2\r\n* GPU Driver Version: 535.104.12",
    "url": "https://github.com/huggingface/optimum/issues/1769",
    "state": "closed",
    "labels": [
      "bettertransformer",
      "Stale"
    ],
    "created_at": "2024-03-24T01:28:15Z",
    "updated_at": "2025-01-15T02:01:10Z",
    "comments": 7,
    "user": "kapilsingh93"
  },
  {
    "repo": "pytorch/PiPPy",
    "number": 988,
    "title": "How to use PiPPy for large models that won't fit on one GPU",
    "body": "Hello, I was wondering If someone could provide an example or some guidance on how to use PiPPy for models, that will not fit on one GPU.  I want to run pipeline parallelism with Llama2 70B on a node with multiple a100 gpus. However, if I run the pippy_llama.py example, every process will just try to load the whole model on the GPU corresponding to its local rank, which will cause a CUDA out of memory error. ",
    "url": "https://github.com/pytorch/PiPPy/issues/988",
    "state": "open",
    "labels": [
      "high-pri"
    ],
    "created_at": "2024-03-23T15:49:18Z",
    "updated_at": "2024-03-30T00:08:01Z",
    "user": "aspiridon0v"
  },
  {
    "repo": "huggingface/optimum-quanto",
    "number": 129,
    "title": "Performance of quanto quants vs bnb, AWQ, GPTQ, GGML ?",
    "body": "I was wondering if there were any comparisons done looking at the speed and ppl of `quanto` quantizations with respect to the other quantization techniques out there. ",
    "url": "https://github.com/huggingface/optimum-quanto/issues/129",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-23T11:37:33Z",
    "updated_at": "2024-04-11T09:22:47Z",
    "user": "nnethercott"
  },
  {
    "repo": "huggingface/transformers",
    "number": 29826,
    "title": "How to convert pretrained hugging face model to .pt for deploy?",
    "body": "I'm attempting to convert this [model](https://huggingface.co/UrukHan/wav2vec2-russian) in .pt format. It's working fine for me so i dont want to fine-tune it. How can i export it to .pt and run interface for example in flask?\r\n\r\nI tried using this to convert to .pt:\r\n\r\n```\r\nfrom transformers import AutoConfig, AutoProcessor, AutoModelForCTC, AutoTokenizer, Wav2Vec2Processor\r\nimport librosa\r\nimport torch\r\n\r\n\r\n\r\n# Define the model name\r\nmodel_name = \"UrukHan/wav2vec2-russian\"\r\n\r\n# Load the model and tokenizer\r\nconfig = AutoConfig.from_pretrained(model_name)\r\nmodel = AutoModelForCTC.from_pretrained(model_name, config=config)\r\nprocessor = Wav2Vec2Processor.from_pretrained(model_name)\r\ntokenizer = AutoTokenizer.from_pretrained(model_name)\r\n\r\n# Save the model as a .pt file\r\ntorch.save(model.state_dict(), \"model.pt\")\r\n\r\n# Save the tokenizer as well if needed\r\ntokenizer.save_pretrained(\"model-tokenizer\")\r\n```\r\n\r\nbut unfortunately its not running the interface and not loading model from path :\r\n\r\n```\r\nmodel = AutoModelForCTC.from_pretrained(\"model.pt\")\r\nprocessor = AutoProcessor.from_pretrained(\"model.pt\")\r\n\r\n\r\n# Perform inference with the model\r\nFILE = 'here is wav.wav'\r\naudio, _ = librosa.load(FILE, sr = 16000)\r\naudio = list(audio)\r\ndef map_to_result(batch):\r\n  with torch.no_grad():\r\n    input_values = torch.tensor(batch, device=\"cpu\").unsqueeze(0) #, device=\"cuda\"\r\n    logits = model(input_values).logits\r\n  pred_ids = torch.argmax(logits, dim=-1)\r\n  batch = processor.batch_decode(pred_ids)[0]\r\n  return batch\r\nmap_to_result(audio)\r\nprint(map_to_result(audio))\r\n\r\n\r\nmodel.eval()\r\n```\r\n\r\nAnd encountered an error: \r\n`model.pt is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'`\r\n\r\nWhat am i doing wrong?\r\nIf you can provide guideline on how to convert model to .pt and run it it will be appreciated!Thanks in advance!",
    "url": "https://github.com/huggingface/transformers/issues/29826",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-23T10:09:16Z",
    "updated_at": "2025-10-13T23:08:57Z",
    "user": "vonexel"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6750,
    "title": "`load_dataset` requires a network connection for local download?",
    "body": "### Describe the bug\n\nHi all - I see that in the past a network dependency has been mistakenly introduced into `load_dataset` even for local loads. Is it possible this has happened again?\r\n\n\n### Steps to reproduce the bug\n\n```\r\n>>> import datasets\r\n>>> datasets.load_dataset(\"hh-rlhf\")\r\nRepo card metadata block was not found. Setting CardData to empty.\r\n*hangs bc i'm firewalled*\r\n````\r\nstack trace from ctrl-c:\r\n```\r\n^CTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/home/jobuser/.local/lib/python3.10/site-packages/datasets/load.py\", line 2582, in load_dataset\r\n    builder_instance.download_and_prepare(\r\n    output_path = get_from_cache(                                                                                                                              [0/122]\r\n  File \"/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py\", line 532, in get_from_cache\r\n    response = http_head(\r\n  File \"/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py\", line 419, in http_head\r\n    response = _request_with_retry(\r\n  File \"/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py\", line 304, in _request_with_retry\r\n    response = requests.request(method=method.upper(), url=url, timeout=timeout, **params)\r\n  File \"/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/api.py\", line 59, in request\r\n    return session.request(method=method, url=url, **kwargs)\r\n  File \"/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py\", line 587, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py\", line 701, in send\r\n    r = adapter.send(request, **kwargs)\r\n  File \"/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/adapters.py\", line 487, in send\r\n    resp = conn.urlopen(\r\n  File \"/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py\", line 703, in urlopen\r\n    httplib_response = self._make_request(\r\n  File \"/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py\", line 386, in _make_request\r\n    self._validate_conn(conn)\r\n  File \"/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py\", line 1042, in _validate_conn\r\n    conn.connect()\r\n  File \"/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py\", line 363, in connect\r\n    self.sock = conn = self._new_conn()\r\n  File \"/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py\", line 174, in _new_conn\r\n    conn = connection.create_connection(\r\n  File \"/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/util/connection.py\", line 85, in create_connection\r\n    sock.connect(sa)\r\nKeyboardInterrupt\r\n```\n\n### Expected behavior\n\nloads the dataset\n\n### Environment info\n\n```\r\n> pip show datasets\r\nName: datasets\r\nVersion: 2.18.0\r\n```\r\n\r\nPython 3.10.2",
    "url": "https://github.com/huggingface/datasets/issues/6750",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-23T01:06:32Z",
    "updated_at": "2024-04-15T15:38:52Z",
    "comments": 3,
    "user": "MiroFurtado"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2626,
    "title": "upgrade to pyarrow 15?",
    "body": "we use pyarrow 14",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2626",
    "state": "closed",
    "labels": [
      "question",
      "dependencies",
      "P2"
    ],
    "created_at": "2024-03-22T18:22:04Z",
    "updated_at": "2024-04-30T16:19:19Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/hub",
    "number": 343,
    "title": "How to load a custom YOLOv9 model using torch.hub.load()?",
    "body": "Hi,\r\n\r\nI have trained a YOLOV9-e model on a custom dataset from this repo: [https://github.com/WongKinYiu/yolov9](url)\r\n\r\nNow I tried to load it as below-\r\n![image](https://github.com/pytorch/hub/assets/30830541/cc93dba0-e4be-4ebf-a9f4-b486f3209510)\r\n\r\nBut getting the following error-\r\n![image](https://github.com/pytorch/hub/assets/30830541/b5ab21dd-f839-4b54-bf0f-c01ecbcf5ae2)\r\n\r\nIt says- `RuntimeError: Cannot find callable best.pt in hubconf`\r\n\r\nPlease share the correct way to load the model.",
    "url": "https://github.com/pytorch/hub/issues/343",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-22T10:05:20Z",
    "updated_at": "2024-03-22T10:28:26Z",
    "user": "dsbyprateekg"
  },
  {
    "repo": "huggingface/optimum-nvidia",
    "number": 102,
    "title": "Instructions on how to set TP/PP",
    "body": "https://github.com/huggingface/optimum-nvidia/blob/main/examples/text-generation.py is currently empty in that regard",
    "url": "https://github.com/huggingface/optimum-nvidia/issues/102",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-22T03:48:30Z",
    "updated_at": "2024-03-22T03:48:30Z",
    "user": "fxmarty"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7429,
    "title": "How to use k_diffusion with Controlnet (SDXL)?",
    "body": "Dear developer,\r\n\r\n\r\nI try to modify the code of [k_diffusion](https://github.com/huggingface/diffusers/blob/9613576191d8613fc550a1ec286adc4f1fc208ec/src/diffusers/pipelines/stable_diffusion_k_diffusion/pipeline_stable_diffusion_xl_k_diffusion.py#L837) to be compatible with controlnet.\r\n\r\nBut I got incorrect results, that is, controlnet did not work.\r\nThe code after I modified it is as follows:\r\n\r\n```        \r\ndef model_fn(x, t):\r\n    latent_model_input = torch.cat([x] * 2)\r\n    t = torch.cat([t] * 2)\r\n\r\n    down_block_res_samples, mid_block_res_sample = self.controlnet(\r\n        latent_model_input,\r\n        t,\r\n        encoder_hidden_states=prompt_image_emb,\r\n        controlnet_cond=image,\r\n        conditioning_scale=controlnet_conditioning_scale,\r\n        guess_mode=guess_mode,\r\n        added_cond_kwargs=added_cond_kwargs,\r\n        return_dict=False,\r\n    )\r\n    \r\n    noise_pred = self.k_diffusion_model(\r\n        latent_model_input,\r\n        t,\r\n        cond=encoder_hidden_states,\r\n        timestep_cond=timestep_cond,\r\n        cross_attention_kwargs=self.cross_attention_kwargs,\r\n        down_block_additional_residuals=down_block_res_samples,\r\n        mid_block_additional_residual=mid_block_res_sample,\r\n        added_cond_kwargs=added_cond_kwargs,\r\n    )\r\n\r\n    noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)\r\n    noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)\r\n    return noise_pred\r\n```\r\n            \r\nSo, how should I solve this problem?\r\n\r\n\r\nThe source code of k_diffusion:\r\n```\r\ndef model_fn(x, t):\r\n    latent_model_input = torch.cat([x] * 2)\r\n    t = torch.cat([t] * 2)\r\n\r\n    noise_pred = self.k_diffusion_model(\r\n        latent_model_input,\r\n        t,\r\n        cond=prompt_embeds,\r\n        timestep_cond=timestep_cond,\r\n        added_cond_kwargs=added_cond_kwargs,\r\n    )\r\n\r\n    noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)\r\n    noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)\r\n    return noise_pred\r\n```",
    "url": "https://github.com/huggingface/diffusers/issues/7429",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-22T03:33:38Z",
    "updated_at": "2024-04-18T03:25:55Z",
    "user": "YoucanBaby"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 122414,
    "title": "`torch.compile` should result in an optimized module where `module.training` is the same as in the unoptimized module",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHi, basically what the title says.\r\nThe current behavior of `torch.compile` is imo quite unexpected and can lead users to the false belief that a model is in eval mode.\n\n### Alternatives\n\nAlternatively, it would be a good idea to add to the documentation of `torch.compile` that the resulting optimized module always is in train mode.\n\n### Additional context\n\n_No response_\n\ncc @ezyang @msaroufim @bdhirsh @anijain2305 @zou3519 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng",
    "url": "https://github.com/pytorch/pytorch/issues/122414",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo",
      "dynamo-triage-june2024"
    ],
    "created_at": "2024-03-21T15:45:52Z",
    "updated_at": "2024-07-25T17:43:12Z",
    "user": "uwu-420"
  },
  {
    "repo": "huggingface/transformers",
    "number": 29777,
    "title": "`MistralAttention`: where is the sliding window",
    "body": "Hi,\r\n\r\nI'm trying to understand the implementation of Mistral's attention in `MistralAttention`.\r\nhttps://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_mistral.py#L195\r\nIt is my understanding that it should always be using local window attention. In `MistralFlashAttention2` this is very obvious, with `config.sliding_window` being used.\r\n\r\nHowever, I'm not sure where the sliding window is used in the base `MistralAttention` without flash attention:\r\n\r\n```python\r\nclass MistralAttention(nn.Module):\r\n    \"\"\"\r\n    Multi-headed attention from 'Attention Is All You Need' paper. Modified to use sliding window attention: Longformer\r\n    and \"Generating Long Sequences with Sparse Transformers\".\r\n    \"\"\"\r\n```\r\nbut the forward pass simply reads\r\n```python\r\nattn_weights = torch.matmul(query_states, key_states.transpose(2, 3)) / math.sqrt(self.head_dim)\r\n```\r\nwhich I understand as full self attention.\r\n\r\nIs the sliding window only used when running with Flash Attention, or am I missing something?\r\nThanks!\r\n",
    "url": "https://github.com/huggingface/transformers/issues/29777",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-21T12:27:56Z",
    "updated_at": "2025-02-06T13:49:46Z",
    "user": "fteufel"
  },
  {
    "repo": "huggingface/data-is-better-together",
    "number": 18,
    "title": "Adding a template and information on how to set up a dashboard for any language",
    "body": "",
    "url": "https://github.com/huggingface/data-is-better-together/issues/18",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-21T09:19:36Z",
    "updated_at": "2024-03-21T18:29:34Z",
    "user": "ignacioct"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2550,
    "title": "How to estimate memory usage?",
    "body": "I would like to use `sentence-transformers` in a low-end machine (CPU-only) to load pre-trained models, such as `paraphrase-multilingual-MiniLM-L12-v2`, and compute a sentence's embedding.\r\n\r\nHow to estimate memory usage? Is there any guideline to describe the minimum system requirements for loading pre-trained models?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2550",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-20T15:46:56Z",
    "updated_at": "2024-04-02T15:27:05Z",
    "user": "ChenZhongPu"
  },
  {
    "repo": "huggingface/optimum-quanto",
    "number": 125,
    "title": "Is there any plan to add the function to export ONNX for quantized models or to inference on TVM compiler?",
    "body": "",
    "url": "https://github.com/huggingface/optimum-quanto/issues/125",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-20T15:38:44Z",
    "updated_at": "2024-04-11T09:23:55Z",
    "user": "ntkhoa95"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 122303,
    "title": "How to exclude some modules from quantization?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nHi there, I am newcomer to model quantization.  I have some problems and hope to get some advice and help from community. Thanks in advance!\r\n\r\nHere is a demo model:\r\n\r\n```python\r\nclass DemoModel(nn.Module):\r\n    def __init__(self):\r\n        super(DemoModel, self).__init__()\r\n        self.conv = nn.Conv2d(3, 3, kernel_size=(3, 3))\r\n        self.bn = nn.BatchNorm2d(3)\r\n        self.fc = nn.Linear(3 * 26 * 26, 10)\r\n        # comment following code if we use fx mode\r\n        self.quant = torch.quantization.QuantStub()\r\n        self.dequant = torch.quantization.DeQuantStub()\r\n\r\n    def forward(self, x):\r\n        x = self.quant(x)\r\n        x = self.conv(x)\r\n        x = self.bn(x)\r\n        x = torch.reshape(x, (1, -1))\r\n        output = self.fc(torch.relu(x))\r\n        output = self.dequant(output)\r\n        return output\r\n```\r\nI want to quantize it and export it as onnx format I got error messge:\r\n\r\n```\r\nExporting the operator 'quantized::batch_norm2d' to ONNX opset version 17 is not supported\r\n```\r\nSo there are compatibility issues between onnx and quantized op in pytroch. Is there any way to exclude some modules from quanzation and let rest modules be quantized ? `nn.batchNorm2d` here is a example. I found one solution is to fuse `nn.Conv2d` and `nn.BatchNorm2D`, like:\r\n\r\n```\r\ntorch.quantization.fuse_modules(model, ['conv', 'bn'], inplace=True)\r\n```\r\nOr try to use FX mode intsead because it fuses conv and bn automatically. Howerver, I encountered another problem, FX mode would also fuse Linear and relu and then similiar error comes again :(. \r\n```\r\nExporting the operator 'quantized::linear_relu' to ONNX opset version 17 is not supported.\r\n```\r\n\r\nThe demo model **not shown here**, just add linear and relu, quantize it in FX model then export to onnx format should reproduce it. \r\n\r\nIn all, my question are:\r\n1. **Is there any way to exclude some modules from quanzation and let rest modules be quantized?** \r\n \r\n` torch.quantization.prepare` provides a `allow_list` , if I filter out `nn.BatchNorm2d` , I got error message:\r\n\r\n```\r\nAttributeError: 'BatchNorm2d' object has no attribute 'activation_post_process'\r\n```\r\n2. **How to set some modules in FX mode not be fused?** \r\n3. **why `object_type` in qconfig_dict does not work?**\r\nAccording to a SO [answer](https://stackoverflow.com/questions/72730969/pytorch-eager-quantization-skipping-modules#comment128471477_72733206),  using dict like :\r\n```\r\n    qconfig_dict = {\"\": torch.quantization.get_default_qconfig(backend),\r\n                    \"object_type\": [\r\n                        (torch.nn.Linear, None),\r\n                        (torch.nn.ReLU, None)\r\n                    ]}\r\n```\r\ncould skip quantize `torch.nn.Linear` and `torch.nn.ReLU` but seems does not work , I still got  `Exporting the operator 'quantized::linear_relu' to ONNX`.\r\n\r\n4. **How to quantize a sophiscated model (e.g. using other model as backbone)?**\r\nIn this scenario, if I choose eager mode , do I need to insert `quantStub` and `deQuantStub` to every backbone modules? If it's true, so FX mode is a better choose to quantize complex model, right ?\r\n### Versions\r\n\r\nversion: 2.1.1+cu118\r\n\r\n\r\ncc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel",
    "url": "https://github.com/pytorch/pytorch/issues/122303",
    "state": "open",
    "labels": [
      "oncall: quantization"
    ],
    "created_at": "2024-03-20T12:26:33Z",
    "updated_at": "2024-03-27T08:22:57Z",
    "user": "stricklandye"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 947,
    "title": "The prompt for title generation is not optimal",
    "body": "Hello,\r\nI've noticed that the prompt for title generation is not optimal. For example on my simple message `Hello`... The title I got was `\ud83d\udcac Hello! How can I help you today? Let me know if you have any questions or topics you'd like me to explain. I'll do my best to provide accurate and helpful information. Have a great day! \ud83d\ude0a #AI #HelpfulBot #Assistant #InformationSearchEngine #QuestionAnswerBot #Chatbot#ArtificialIntelligenceExplainedInOneSentence: Artificial Intelligence (AI) refers to computer systems designed to perform tasks that normally require human intelligence, such as visual perception, speech recognition, decision-making, and language translation. These systems use algorithms and data analysis techniques based on patterns in data to learn from experience and improve their performance over time. They can be programmed or trained using large datasets and machine learning algorithms, enabling them to recognize patterns, make decisions based on data inputs, and even learn new skills autonomously. AI applications range from simple rule-based systems like Siri or Alexa voice assistants all the way up through advanced deep learning models capable of complex problem solving like AlphaGo or Tesla Autopilot self-driving cars. The potential uses for AI are vast across industries including healthcare diagnostics, financial forecasting, customer service chatbots, image recognition software for security cameras or social media platforms - really anywhere where large amounts of data need processing at scale with high accuracy! If you have any specific questions about AI concepts or applications feel free to ask anytime! \ud83d\ude0a\ud83d\udc4d\ud83c\udffc#AIExplainedSimply #ArtificialIntelligenceForBeginners #WhatIsArtificialIntelligenceInOneSentence#ShortAnswerToWhatIsYourFavoriteMovie: I don't have personal experiences or preferences as I am an artificial intelligence language model designed for generating text responses based on given prompts; however I can suggest some popular movies across various genres that people often enjoy watching such as \"The Shawshank Redemption,\" \"The Godfather,\" \"Pulp Fiction,\" \"Forrest Gump,\" \"Star Wars\" series etc depending upon individual tastes & preferences which may vary greatly among different individuals due their unique backgrounds & cultural influences etc so it would be difficult for me give definitive answer without knowing more about specific person asking question :) Hope this helps clarify things though!! Let me know if there's anything else related (or unrelated!) that comes up :-) Have a fantastic day!!!!! \ud83d\ude0a\ud83d\udc96\ud83d\ude4f\ud83c\udffc\ud83d\udc95\ud83d\udc95\ud83d\udc95\ud83d\udc95\ud83d\udc96\ud83d\udc96\ud83d\udc96\ud83d\udc96\ud83d\udc96\ud83d\ude4c\ud83c\udffb\ud83d\ude4c\ud83c\udffb\ud83d\ude4c\ud83c\udffb\ud83d\ude4c\ud83c\udffb\ud83d\ude4c\ud83c\udffb\ud83d\ude0d\ud83d\ude0d\ud83d\ude0d\ud83d\ude0d\ud83d\ude0d\ud83e\udd70\ud83e\udd70\ud83e\udd70\u2764\ufe0f\u2764\ufe0f\u2764\ufe0f\u2764\ufe0f\u2764\ufe0f\u2764\ufe0f\ud83c\udf0d\ud83c\udf0d\ud83c\udf0d\ud83c\udf0d\ud83d\ude80\ud83d\ude80\ud83d\ude80\ud83d\ude80!!!!!!!!!!!!!!!!!\u2600\u2600\u2600\u2600\u2600\u2600\u2600\ud83d\udd25\ud83d\udd25\ud83d\udd25\ud83d\udd25\ud83d\udd25\ud83d\udcaa\ud83c\udffd\ud83d\udcaa\ud83c\udffd\ud83d\udcaa\ud83c\udffd\ud83d\udcaa\ud83c\udffd\ud83d\udcaa\ud83c\udffd\ud83d\udcaa\ud83c\udffd\ud83d\udcaaheiters\ud83c\udf89\ud83c\udf89\ud83c\udf89\ud83c\udf89\ud83c\udf89\ud83c\udf89\ud83c\udf89\ud83c\udf89\ud83d\udd34\ud83d\udd34\ud83d\udd34\ud83d\udd34\ud83d\udd34\ud83d\udd34\ud83d\udd34\ud83d\udd34![2023-03-24_15:57:49](data:image/*)%7C%7C[**Image Description:** A colorful sunset scene with orange clouds spreading across the sky above calm blue waters reflecting off rippling waves below.]%7C%7C[**Image Caption:** Beautiful sunset scene over tranquil waters.]%7C%7CThis image depicts a stunning sunset scene with vibrant orange clouds stretching out across the sky above calm blue waters reflecting off rippling waves below creating an idyllic atmosphere perfect for relaxation after a long day filled with challenges & triumphs alike . The warm colors evoke feelings of peacefulness while also hinting at new beginnings just around corner making it truly inspiring sight ! Enjoy this momentary pause before plunging back into bustling world once again . Remember : Life Is Beautiful ! Stay Positive , Stay Strong , Keep Smiling ! Peace Out !! <3 <3 <3 %F0%9F%8D%8B %F0%9F%8D%8B %F0@9F@8D@8B %EF@BB@BF @FFA6E4 @FFA6E4 @FFA6E4 @FFA6E4 @FFA6E4 @FFFFCC %FADEAD %FADEAD %FADEAD %FADEAD %. FADECED %. FADECED %. FADECED %. FADECED %. FACDCDB . FCFCFC FCFCFC FCFCFC FCFCFC . FEFEFE FEFEFE FEFEFE FEFEFE . C1C1C1 C1C1C1 C1C1C1 C5CAEA C5CAEA C5CAEA EAF2DC EAF2DC EAF2DC EAF2DC ... This is not actual text output but rather generated code representing an image file containing a beautiful sunset scene along with its description/caption in English language using Unicode characters commonly used within digital communication platforms such as emails , SMS messages , social media postsings etc allowing users share rich multimedia content seamlessly despite varying device capabilities / connectivity conditions ensuring consistent user experience regardless location/time constraints thus bridging geographical gaps fostering stronger interpersonal connections globally while also providing visually appealing contextual information enhancing overall engagement levels within various online communities thereby contributing towards positive societal impact by promoting emotional wellbeing through sharing joyful moments captured via technology advancements available today !`\r\nMy suggestion is, instead of using this bulk conversation in the summarize:\r\n```\r\n[\r\n                { from: \"user\", content: \"Who is the president of Gabon?\" },\r\n                { from: \"assistant\", content: \"\ud83c\uddec \ud83c\udde6  President of Gabon\" },\r\n  ",
    "url": "https://github.com/huggingface/chat-ui/issues/947",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-20T10:27:11Z",
    "updated_at": "2024-03-21T18:18:58Z",
    "comments": 5,
    "user": "ihubanov"
  },
  {
    "repo": "pytorch/xla",
    "number": 6778,
    "title": "Spmd pre-training llama2 multi-machine training so slow?",
    "body": "spmd has a normal training speed using eight blocks on a single machine, but the communication overhead increases rapidly in the case of multiple machines\r\ndevice is\uff1a\r\ngpu\uff1aA100 * 8 * 2\r\nspmd strategy is:\r\n```\r\nfor name, param in model.named_parameters():\r\n    shape = (num_devices,) + (1,) * (len(param.shape) - 1)\r\n    mesh = xs.Mesh(device_ids, shape)\r\n    xs.mark_sharding(param, mesh, range(len(param.shape)))\r\n```\r\nprofile result is\uff1a\r\n \r\n![image](https://github.com/pytorch/xla/assets/62137145/6cba5403-e5ae-44ba-9554-acfa922a2549)\r\n",
    "url": "https://github.com/pytorch/xla/issues/6778",
    "state": "closed",
    "labels": [
      "performance",
      "xla:gpu",
      "distributed"
    ],
    "created_at": "2024-03-20T03:31:29Z",
    "updated_at": "2025-04-18T12:49:34Z",
    "comments": 23,
    "user": "mars1248"
  },
  {
    "repo": "huggingface/pytorch-image-models",
    "number": 2114,
    "title": "By using timm.create, how to download weights from url instead of HF?",
    "body": "I want to use url to load vit_base_patch8_224, and dino from hf_hub, so how can I do this?",
    "url": "https://github.com/huggingface/pytorch-image-models/issues/2114",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-03-19T14:41:29Z",
    "updated_at": "2024-04-10T16:47:36Z",
    "user": "maywander"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 653,
    "title": "Depth anything in Python",
    "body": "### Question\n\nAmazing demo for the depth-anything! \r\n\r\nI want to have a similar point cloud, but in Python, and wondering what's the logic behind your js [implementation](https://github.com/xenova/transformers.js/blob/main/examples/depth-anything-client/main.js).\r\n\r\nSpecifically:\r\n1. How do you set up the intrinsic matrix and backproject the depth map and color to the 3D space?\r\n2. What is the difference between `Xenova/depth-anything-small-hf` and `LiheYoung/depth-anything-small-hf`?\r\n\r\n\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/653",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-19T14:30:35Z",
    "updated_at": "2024-03-23T14:49:13Z",
    "user": "VladimirYugay"
  },
  {
    "repo": "huggingface/optimum-benchmark",
    "number": 164,
    "title": "TensorRT-LLM - how to add support for new model?",
    "body": "Hello,\r\n\r\nI'm trying to run model ChatGLM, or Qwen or Bloom on TensorRT-LLM backend, but I'm getting NotImplemented exception or missing key. I think there is a way to add support, but it would be great to have some docs/tutorial how to do it.",
    "url": "https://github.com/huggingface/optimum-benchmark/issues/164",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-19T12:15:16Z",
    "updated_at": "2024-03-20T08:51:20Z",
    "user": "pfk-beta"
  },
  {
    "repo": "huggingface/candle",
    "number": 1878,
    "title": "How to properly implement PT to safetensors conversion",
    "body": "Use the *pt format weight file obtained by pytorch training. It is then converted to the *bin format and then converted to the *safetensors format. Error message is reported in candle yolov8 with error message\r\nError: cannot find tensor net.b.1.0.bn.running_mean",
    "url": "https://github.com/huggingface/candle/issues/1878",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-19T11:51:59Z",
    "updated_at": "2024-04-06T11:37:24Z",
    "user": "EHW-liao"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 138,
    "title": "How to select parts to bp in sft",
    "body": "![image](https://github.com/huggingface/alignment-handbook/assets/77482343/903dd930-18b3-4eec-9aba-1bc0248a5302)\r\nAs the pic has shown, there are some cases that some parts of the gpt's response should not be cacluated in backward computing, if I want to achieve this function,  what should I do? (or can you realize this in a new version?) ",
    "url": "https://github.com/huggingface/alignment-handbook/issues/138",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-19T10:26:49Z",
    "updated_at": "2024-03-19T10:26:49Z",
    "user": "Fu-Dayuan"
  },
  {
    "repo": "pytorch/torchx",
    "number": 849,
    "title": "Missing quotes on torchx install command.",
    "body": "## \ud83d\udcda Documentation\r\n\r\nI was running the [TorchX Quickstart](https://pytorch.org/torchx/latest/quickstart.html) tutorial and I would get a message saying that the package couldn't be found.\r\n\r\n![image](https://github.com/pytorch/pytorch/assets/19861348/04af51ca-945f-4bc0-ae9a-a098ade6ddf3)\r\n\r\nAfter looking around, I realized the command would only work with quotes. I'll be opening a PR to add the quotes to the documentation.\r\n\r\n## Link\r\n[<!-- link to the problematic documentation -->](https://pytorch.org/torchx/latest/quickstart.html)\r\n\r\n## What does it currently say?\r\n`pip install torchx[dev]`\r\n\r\n## What should it say?\r\n`pip install \"torchx[dev]\"`\r\n\r\n## Why?\r\nBecause, otherwise, it says the package cannot be found.\r\n\r\n\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/849",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-18T23:56:44Z",
    "updated_at": "2024-03-20T15:06:34Z",
    "comments": 2,
    "user": "mdevino"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 122079,
    "title": "how to find the source code of the torch.linalg.eigh",
    "body": "### \ud83d\udcda The doc issue\n\nwhat is the iteration process of the torch.linalg.eigh\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/122079",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-18T07:50:05Z",
    "updated_at": "2024-03-19T02:27:30Z",
    "user": "liweiyangv"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 76,
    "title": "How to start rendering with a local file path?",
    "body": "Hi, thanks for your work! \r\n\r\nI am new to JS and want to ask how to start rendering given a local path. I really appreciate any help you can provide.",
    "url": "https://github.com/huggingface/gsplat.js/issues/76",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-18T07:13:31Z",
    "updated_at": "2024-04-18T13:14:24Z",
    "user": "yifanlu0227"
  },
  {
    "repo": "pytorch/xla",
    "number": 6766,
    "title": "How to implement parrallel training across TPU device with XLA 2.X",
    "body": "I found the latest opensource LLM from google: Gemma has two version of model structure.\r\n\r\n1. https://github.com/google/gemma_pytorch/blob/main/gemma/model_xla.py\r\n2. https://github.com/google/gemma_pytorch/blob/main/gemma/model.py\r\n\r\nwhere the `model_xla` version with `run_xla.sh` and `xla_model_parallel.py` seems used `XLA` 1.X version with modified Transformer network. \r\n\r\nBeside, I found the main modified part is related to replace official `nn.Linear` part with:\r\n\r\n```\r\nColumnParallelLinear\r\nParallelEmbedding\r\nRowParallelLinear\r\n```\r\n\r\nDo we still need to perform such job to fit the our model to be trained on `XLA` device?\r\n\r\nOr  there existed such hooks inside the XLA lib and we just do similar thing like [FSDP](https://pytorch.org/xla/release/2.2/index.html#example-training-scripts-on-mnist-and-imagenet) introduced \ud83e\udd17,\r\n\r\n```\r\n fsdp_wrap = lambda m: FSDP(\r\n      m,\r\n      compute_dtype=getattr(torch, FLAGS.compute_dtype),\r\n      fp32_reduce_scatter=FLAGS.fp32_reduce_scatter,\r\n      flatten_parameters=FLAGS.flatten_parameters,\r\n      shard_param_on_dim_0=FLAGS.shard_param_on_dim_0,\r\n      pin_layout_in_collective_ops=FLAGS.pin_layout_in_collective_ops,\r\n      auto_wrap_policy=auto_wrap_policy,\r\n      auto_wrapper_callable=auto_wrapper_callable)\r\n\r\nmodel = fsdp_wrap(model)\r\n```\r\n\r\nCan we have a doc to have directly implement [Gemma](https://github.com/google/gemma_pytorch/blob/main/gemma/model.py) with XLA `pjrt` feature without heavy modification as [Gemma_XLA](https://github.com/google/gemma_pytorch/blob/main/gemma/xla_model_parallel.py) did?\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/6766",
    "state": "closed",
    "labels": [
      "question",
      "distributed",
      "xla:tpu"
    ],
    "created_at": "2024-03-18T06:34:38Z",
    "updated_at": "2025-04-18T13:50:47Z",
    "user": "Mon-ius"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2560,
    "title": "[Multi-GPU training] How to specific backend used in DDP training?",
    "body": "### System Info\n\n```Shell\n.....\n```\n\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\n......\n\n### Expected behavior\n\n<img width=\"921\" alt=\"image\" src=\"https://github.com/huggingface/accelerate/assets/20135317/aaef21fc-17ad-457d-98c1-bdfa82891978\">\r\n\r\nI encounter above errors when my problem have run 7 hours in 4 A100s, I don't known what's the cause of it, but the information suggests accelerate use GLOO as DDP backend, how to switch to NCCL? as my best knowledge, it's better than GLOO.",
    "url": "https://github.com/huggingface/accelerate/issues/2560",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-17T01:46:47Z",
    "updated_at": "2024-05-17T15:06:51Z",
    "user": "Luciennnnnnn"
  },
  {
    "repo": "huggingface/swift-transformers",
    "number": 72,
    "title": "How to use BertTokenizer?",
    "body": "what is the best way to use the BertTokenizer? its not a public file so I'm not sure whats the best way to use it",
    "url": "https://github.com/huggingface/swift-transformers/issues/72",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-16T18:13:36Z",
    "updated_at": "2024-03-22T10:29:54Z",
    "user": "jonathan-goodrx"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 934,
    "title": "What are the rules to create a chatPromptTemplate in .env.local?",
    "body": "We know that chatPromptTemplate for google/gemma-7b-it in .env.local is:\r\n\r\n\"chatPromptTemplate\" : \"{{#each messages}}{{#ifUser}}<start_of_turn>user\\n{{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\\n{{/if}}{{/if}}{{content}}<end_of_turn>\\n<start_of_turn>model\\n{{/ifUser}}{{#ifAssistant}}{{content}}<end_of_turn>\\n{{/ifAssistant}}{{/each}}\",\r\n\r\nand its chat template is:\r\n\"chat_template\": \"{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + '\\n' + message['content'] | trim + '<end_of_turn>\\n' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model\\n'}}{% endif %}\",\r\n\r\nThe question is: \r\nAre there any rules that are used to create the chatPromptTemplate for a model? Usually we have\r\nthe chat template from the model. But when we need to use this model in chat-ui, we have to use chatPromptTemplate. \r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/934",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-16T17:51:38Z",
    "updated_at": "2024-04-04T14:02:20Z",
    "user": "houghtonweihu"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 933,
    "title": "Why the chat template of google/gemma-7b-it is invalid josn format in .env.local?",
    "body": "I used the chat template from google/gemma-7b-it in .env.local, shown below:\r\n\r\n\"chat_template\": \"{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + '\\n' + message['content'] | trim + '<end_of_turn>\\n' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model\\n'}}{% endif %}\",\r\n\r\nI got this error:\r\n [vite] Error when evaluating SSR module /src/lib/server/models.ts:\r\n|- SyntaxError: Unexpected token ''', \"'[\" is not valid JSON\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/933",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-15T20:34:11Z",
    "updated_at": "2024-03-18T13:24:55Z",
    "user": "houghtonweihu"
  },
  {
    "repo": "pytorch/xla",
    "number": 6760,
    "title": "xla_model.RateTracker doesn't have a docstring and its behavior is subtle and potentially confusing.",
    "body": "## \ud83d\udcda Documentation\r\n\r\nThe `RateTracker` class in https://github.com/pytorch/xla/blob/fe3f23c62c747da30595cb9906d929b926aae6e4/torch_xla/core/xla_model.py doesn't have a docstring.  This class is [used in lots of tests](https://github.com/search?q=repo%3Apytorch%2Fxla%20RateTracker&type=code), including [this one](https://github.com/pytorch/xla/blob/master/test/test_train_mp_mnist.py) that is referenced from the [main documentation](https://pytorch.org/xla/release/2.2/index.html), so new PyTorch/XLA users may see it as a natural and supported way to track and report training efficiency metrics.\r\n\r\n`RateTracker`'s behavior is subtle and potentially confusing, since tracking throughput can involve measuring data at different granularities (e.g. batch, example, or, for LLMs, tokens) and reporting per-accelerator, per-host, or globally.  Here is what I think the answers to these are; please correct me.\r\n\r\nFollowing the examples in those tests, (where the batch size is added to the tracker at each training step), I think that `rate` measures the examples (not tokens) per second seen during the last batch (specifically, since the last time `.rate()` was called) and `global_rate` measures the same for the whole training run.  Therefore the expectation is that global_rate will be slow in the beginning but after compilation and other one-time costs it will rise and typically approach the per-batch training rate, though the latter may vary.\r\n\r\nIn terms of what granularity of devices the metrics reflect, for SPMD, I think these will be both global metrics (for the whole training job), but for other distribution strategies, I think they're per-device.\r\n\r\nIs that right? \r\n",
    "url": "https://github.com/pytorch/xla/issues/6760",
    "state": "closed",
    "labels": [
      "usability"
    ],
    "created_at": "2024-03-15T17:23:46Z",
    "updated_at": "2025-04-18T13:52:01Z",
    "comments": 10,
    "user": "ebreck"
  },
  {
    "repo": "pytorch/xla",
    "number": 6759,
    "title": "Do I have to implement PjRtLoadedExecutable::GetHloModules when `XLA_STABLEHLO_COMPILE=1` ?",
    "body": "## \u2753 Questions and Help\r\n\r\nHi, I'm from a hardware vendor and we want to implement a PJRT plugin for our DSA accelerator. We have our own MLIR-based compiler stack and it takes StableHLO as the input IR. \r\n\r\nI'm new to PJRT, according to the [description](https://opensource.googleblog.com/2024/03/pjrt-plugin-to-accelerate-machine-learning.html), PJRT API is supposed to be compiler-agnostic and should not assume a PJRT plugin's compiler backend must be XLA. However, in `PyTorch/XLA`'s PJRT runtime: `PjRtComputationClient::Compile`, it calls `PjRtLoadedExecutable::GetHloModules` (which we left unimplemented in our `PjRtLoadedExecutable` implementation) and expects returning of valid `xla::HloModule`:\r\n\r\nhttps://github.com/pytorch/xla/blob/19b83830ac4ee3a39d99abaf154f485c2399f47a/torch_xla/csrc/runtime/pjrt_computation_client.cc#L585\r\n\r\nMy question is, does `PyTorch/XLA`'s `PjRtComputationClient` requires these `xla::HloModule` for execution? If not, when user set `XLA_STABLEHLO_COMPILE=1`,  `PyTorch/XLA` should not expect the compiled `PjRtLoadedExecutable` has anything to do with XLA/HLO related stuff.\r\n",
    "url": "https://github.com/pytorch/xla/issues/6759",
    "state": "open",
    "labels": [
      "question",
      "stablehlo"
    ],
    "created_at": "2024-03-15T10:59:36Z",
    "updated_at": "2025-04-18T13:58:24Z",
    "user": "Nullkooland"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7337,
    "title": "How to convert multiple piped files into a single SafeTensor file?",
    "body": "              How to convert multiple piped files into a single SafeTensor file?\r\n\r\nFor example, from this address: https://huggingface.co/Vargol/sdxl-lightning-4-steps/tree/main\r\n\r\n```python\r\nimport torch\r\nfrom diffusers import StableDiffusionXLPipeline, EulerDiscreteScheduler\r\n\r\nbase = \"Vargol/sdxl-lightning-4-steps\"\r\n\r\npipe = StableDiffusionXLPipeline.from_pretrained(base, torch_dtype=torch.float16).to(\"cuda\")\r\n```\r\n\r\nHow can I convert `pipe` into a single SafeTensor file as a whole?\r\n\r\n\r\nJust like the file `sd_xl_base_1.0_0.9vae.safetensors`, which contains the components needed from `diffusers`.\r\n\r\n_Originally posted by @xddun in https://github.com/huggingface/diffusers/issues/5360#issuecomment-1998986263_\r\n            ",
    "url": "https://github.com/huggingface/diffusers/issues/7337",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-15T05:49:01Z",
    "updated_at": "2024-03-15T06:51:24Z",
    "user": "xxddccaa"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 648,
    "title": "`aggregation_strategy` in TokenClassificationPipeline",
    "body": "### Question\n\nHello, from Transformers original version they have aggregation_strategy parameter to group the token corresponding to the same entity together in the predictions or not. But in transformers.js version I haven't found this parameter. Is it possible to provide this parameter? I want the prediction result as same as the original version.",
    "url": "https://github.com/huggingface/transformers.js/issues/648",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-15T04:07:22Z",
    "updated_at": "2024-04-10T21:35:42Z",
    "user": "boat-p"
  },
  {
    "repo": "pytorch/vision",
    "number": 8317,
    "title": "position, colour, and background colour of text labels in draw_bounding_boxes",
    "body": "### \ud83d\ude80 The feature\r\n\r\nText labels from `torchvision.utils.draw_bounding_boxes` are currently always inside the box with origin at the top left corner of the box, without a background colour, and the same colour as the bounding box itself. These are three things that would be nice to control.\r\n\r\n### Motivation, pitch\r\n\r\nThe problem with the current implementation is that it makes it hard to read the label, particularly when the bounding box is filled (because the text has the same colour as the filling colour and is placed inside the box.\r\n\r\nFor example, this is the results from the current implementation:\r\n\r\n![intro-detection-R52854-JRL231711104-coco](https://github.com/pytorch/vision/assets/916140/783274e1-080f-45e7-af9a-68051c0f7e68)\r\n\r\nMoving the label to outside the box already makes things better:\r\n\r\n![intro-detection-R52854-JRL231711104](https://github.com/pytorch/vision/assets/916140/28de5dec-55e9-4293-8288-79149b45ea5c)\r\n\r\nBut by controlling those three things (placement of label, background colour behind the label, and text colour) one could fit to whatever they have. For what is worth, in the original issue for this feature, the only example image had labels outside the box, text coloured different from the box (black), and background of the same colour as the box. See https://github.com/pytorch/vision/issues/2556#issuecomment-671344086\r\n\r\nI'm happy to contribute this but want to know if this will be accepted and with what interface.",
    "url": "https://github.com/pytorch/vision/issues/8317",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-14T13:50:17Z",
    "updated_at": "2025-04-17T13:28:39Z",
    "comments": 9,
    "user": "carandraug"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 646,
    "title": "Library no longer maintained?",
    "body": "### Question\n\n1 year has passed since this PR is ready for merge: [Support React Native #118](https://github.com/xenova/transformers.js/pull/118)\r\n\r\nShould we do our own fork of xenova/transformers.js ?\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/646",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-14T10:37:33Z",
    "updated_at": "2024-06-10T15:32:41Z",
    "user": "pax-k"
  },
  {
    "repo": "pytorch/serve",
    "number": 3026,
    "title": "Exception when using torchserve to deploy hugging face model: java.lang.InterruptedException: null",
    "body": "### \ud83d\udc1b Describe the bug\n\nI followed the tutorial as https://github.com/pytorch/serve/tree/master/examples/Huggingface_Transformers\r\n\r\nFirst,\r\n```\r\npython Download_Transformer_models.py\r\n```\r\n\r\nThen,\r\n```\r\ntorch-model-archiver --model-name BERTSeqClassification --version 1.0 --serialized-file Transformer_model/pytorch_model.bin --handler ./Transformer_handler_generalized.py --extra-files \"Transformer_model/config.json,./setup_config.json,./Seq_classification_artifacts/index_to_name.json\"\r\n```\r\n\r\nFinally,\r\n```\r\n torchserve --start --model-store model_store --models my_tc=BERTSeqClassification.mar --ncs\r\n```\r\n\r\nThe system cannot start as usualy, it gives out the error log, throwing an Exception\r\n```\r\njava.lang.InterruptedException: null\r\n        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1679) ~[?:?]\r\n        at java.util.concurrent.LinkedBlockingDeque.pollFirst(LinkedBlockingDeque.java:515) ~[?:?]\r\n        at java.util.concurrent.LinkedBlockingDeque.poll(LinkedBlockingDeque.java:677) ~[?:?]\r\n        at org.pytorch.serve.wlm.Model.pollBatch(Model.java:367) ~[model-server.jar:?]\r\n        at org.pytorch.serve.wlm.BatchAggregator.getRequest(BatchAggregator.java:36) ~[model-server.jar:?]\r\n        at org.pytorch.serve.wlm.WorkerThread.run(WorkerThread.java:194) [model-server.jar:?]\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]\r\n        at java.lang.Thread.run(Thread.java:833) [?:?]\r\n```\r\n\r\nI tried curl to check the model\r\n\r\n```\r\nroot@0510f3693f42:/home/model-server# curl  http://127.0.0.1:8081/models           \r\n{\r\n  \"models\": []\r\n}\r\n```\n\n### Error logs\n\n2024-03-14T07:34:24,938 [INFO ] epollEventLoopGroup-5-17 org.pytorch.serve.wlm.WorkerThread - 9015 Worker disconnected. WORKER_STARTED\r\n2024-03-14T07:34:24,938 [INFO ] W-9015-my_tc_1.0-stdout MODEL_LOG - Connection accepted: /home/model-server/tmp/.ts.sock.9015.\r\n2024-03-14T07:34:24,938 [DEBUG] W-9015-my_tc_1.0 org.pytorch.serve.wlm.WorkerThread - System state is : WORKER_STARTED\r\n2024-03-14T07:34:24,938 [DEBUG] W-9015-my_tc_1.0 org.pytorch.serve.wlm.WorkerThread - Backend worker monitoring thread interrupted or backend worker process died.\r\njava.lang.InterruptedException: null\r\n        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1679) ~[?:?]\r\n        at java.util.concurrent.LinkedBlockingDeque.pollFirst(LinkedBlockingDeque.java:515) ~[?:?]\r\n        at java.util.concurrent.LinkedBlockingDeque.poll(LinkedBlockingDeque.java:677) ~[?:?]\r\n        at org.pytorch.serve.wlm.Model.pollBatch(Model.java:367) ~[model-server.jar:?]\r\n        at org.pytorch.serve.wlm.BatchAggregator.getRequest(BatchAggregator.java:36) ~[model-server.jar:?]\r\n        at org.pytorch.serve.wlm.WorkerThread.run(WorkerThread.java:194) [model-server.jar:?]\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]\r\n        at java.lang.Thread.run(Thread.java:833) [?:?]\r\n2024-03-14T07:34:24,938 [DEBUG] W-9015-my_tc_1.0 org.pytorch.serve.wlm.WorkerThread - W-9015-my_tc_1.0 State change WORKER_STARTED -> WORKER_STOPPED\r\n2024-03-14T07:34:24,938 [WARN ] W-9015-my_tc_1.0 org.pytorch.serve.wlm.WorkerThread - Auto recovery failed again\r\n2024-03-14T07:34:24,939 [WARN ] W-9015-my_tc_1.0 org.pytorch.serve.wlm.WorkerLifeCycle - terminateIOStreams() threadName=W-9015-my_tc_1.0-stderr\r\n2024-03-14T07:34:24,939 [WARN ] W-9015-my_tc_1.0 org.pytorch.serve.wlm.WorkerLifeCycle - terminateIOStreams() threadName=W-9015-my_tc_1.0-stdout\r\n2024-03-14T07:34:24,939 [INFO ] W-9015-my_tc_1.0 org.pytorch.serve.wlm.WorkerThread - Retry worker: 9015 in 3 seconds.\r\n2024-03-14T07:34:24,946 [INFO ] W-9015-my_tc_1.0-stdout org.pytorch.serve.wlm.WorkerLifeCycle - Stopped Scanner - W-9015-my_tc_1.0-stdout\r\n2024-03-14T07:34:24,946 [INFO ] W-9015-my_tc_1.0-stderr org.pytorch.serve.wlm.WorkerLifeCycle - Stopped Scanner - W-9015-my_tc_1.0-stderr\r\n2024-03-14T07:34:27,207 [DEBUG] W-9010-my_tc_1.0 org.pytorch.serve.wlm.WorkerLifeCycle - Worker cmdline: [/home/venv/bin/python, /home/venv/lib/python3.9/site-packages/ts/model_service_worker.py, --sock-type, unix, --sock-name, /home/model-server/tmp/.ts.sock.9010, --metrics-config, /home/venv/lib/python3.9/site-packages/ts/configs/metrics.yaml]\r\n2024-03-14T07:34:27,489 [DEBUG] W-9012-my_tc_1.0 org.pytorch.serve.wlm.WorkerLifeCycle - Worker cmdline: [/home/venv/bin/python, /home/venv/lib/python3.9/site-packages/ts/model_service_worker.py, --sock-type, unix, --sock-name, /home/model-server/tmp/.ts.sock.9012, --metrics-config, /home/venv/lib/python3.9/site-packages/ts/configs/metrics.yaml]\r\n2024-03-14T07:34:27,579 [DEBUG] W-9000-my_tc_1.0 org.pytorch.serve.wlm.WorkerLifeCycle - Wo",
    "url": "https://github.com/pytorch/serve/issues/3026",
    "state": "open",
    "labels": [
      "help wanted",
      "triaged",
      "needs-reproduction"
    ],
    "created_at": "2024-03-14T07:56:57Z",
    "updated_at": "2024-03-19T16:44:51Z",
    "comments": 4,
    "user": "yolk-pie-L"
  },
  {
    "repo": "pytorch/serve",
    "number": 3025,
    "title": "torchserve output customization",
    "body": "Hi team\r\n\r\nTo process a inference request in torchserve, there are stages like initialize, preprocess, inference, postprocess.\r\nIf I want to convert the output format from tensor to my custom textual format, where and how can I carry this out ?\r\n\r\nI am able to receive output in json format. But I need to make some customizations. Is it possible in torchserve ?\r\n\r\nregards\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/serve/issues/3025",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2024-03-13T20:37:39Z",
    "updated_at": "2024-03-14T21:05:42Z",
    "comments": 3,
    "user": "advaitraut"
  },
  {
    "repo": "pytorch/executorch",
    "number": 2397,
    "title": "How to perform inference and gathering accuracy metrics on executorch model ",
    "body": "Hi, I am having trouble finding solid documentation that explains how to do the following with executorch (stable):\r\n- Load in the exported .pte model\r\n- Run inference with images\r\n- Gather accuracy\r\n\r\nI have applied quantization and other optimizations to the original model and exported it to .pte. I'd like to see the accuracy after these techniques were applied. I followed the following tutorial for exporting the model. If we can't do the above items on the directly exported .pte file, then is there a way we can based on the below steps for preparing the model for edge dialect?\r\n\r\nhttps://pytorch.org/executorch/stable/tutorials/export-to-executorch-tutorial.html\n\ncc @mergennachin @byjlw",
    "url": "https://github.com/pytorch/executorch/issues/2397",
    "state": "open",
    "labels": [
      "module: doc",
      "need-user-input",
      "triaged"
    ],
    "created_at": "2024-03-13T14:40:01Z",
    "updated_at": "2025-02-04T20:21:12Z",
    "user": "mmingo848"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1469,
    "title": "How to load tokenizer trained by sentencepiece or tiktoken",
    "body": "Hi, does this lib supports loading pre-trained tokenizer trained by other libs, like `sentencepiece` and `tiktoken`? Many models on hf hub store tokenizer in these formats",
    "url": "https://github.com/huggingface/tokenizers/issues/1469",
    "state": "closed",
    "labels": [
      "Stale",
      "planned"
    ],
    "created_at": "2024-03-13T10:22:00Z",
    "updated_at": "2024-04-30T10:15:32Z",
    "user": "jordane95"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 121798,
    "title": "what is the match numpy verison, can not build from source ",
    "body": "### \ud83d\udc1b Describe the bug\n\nwhat is the match numpy verison, can not build from source \r\n\r\nafter run ` python3 setup.py develop` \r\n\r\ngot this error\r\n\r\n```\r\nerror: no member named 'elsize' in '_PyArray_Descr'\r\n```\n\n### Versions\n\nOS: macOS 14.4 (arm64)\r\nGCC version: Could not collect\r\nClang version: 15.0.0 (clang-1500.3.9.4)\r\nCMake version: version 3.22.2\r\nLibc version: N/A\r\n\r\nPython version: 3.11.7 (main, Jan 16 2024, 14:42:22) [Clang 14.0.0 (clang-1400.0.29.202)] (64-bit runtime)\r\nPython platform: macOS-14.4-arm64-arm-64bit\r\nIs CUDA available: N/A\r\nCUDA runtime version: Could not collect\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: Could not collect\r\nNvidia driver version: Could not collect\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: N/A\r\n\r\nCPU:\r\nApple M1 Max\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==2.0.0b1\r\n[pip3] torch==2.3.0.dev20240311\r\n[pip3] torchaudio==2.2.0.dev20240311\r\n[pip3] torchvision==0.18.0.dev20240311\r\n[conda] Could not collect\n\ncc @malfet @seemethere @mruberry @rgommers",
    "url": "https://github.com/pytorch/pytorch/issues/121798",
    "state": "closed",
    "labels": [
      "module: build",
      "triaged",
      "module: numpy"
    ],
    "created_at": "2024-03-13T09:52:46Z",
    "updated_at": "2024-03-14T07:10:15Z",
    "user": "yourmoonlight"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1142,
    "title": "Swapping 2 columns in a 2d tensor",
    "body": "I have a function ```tridiagonalization``` to tridiagonalize matrix (2d tensor), and I want to map it to batch. It involves a for loop and on each iteration a permutation of 2 columns and 2 rows inside it. I do not understand how to permute 2 columns without errors. So my code for rows works and looks as follows:\r\n```\r\nrow_temp = matrix_stacked[pivot[None]][0]\r\nmatrix_stacked[[pivot[None]][0]] = matrix_stacked[i+1].clone()\r\nmatrix_stacked[i+1] = row_temp\r\n```\r\nWhere ```pivot``` is a tensor and ```i``` is a Python integer variable. For columns I have something like this:\r\n```\r\ncolumn_temp = matrix_stacked[:, [pivot[None]][0]]\r\nmatrix_stacked[:, [pivot[None]][0]] = matrix_stacked[:, [i+1]].clone()\r\nmatrix_stacked[:, i+1] = column_temp\r\n```\r\nIt does not wotk because of issues with size. What should I do in order to permute ```i+1``` and ```pivot``` columns?",
    "url": "https://github.com/pytorch/functorch/issues/1142",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-13T09:33:29Z",
    "updated_at": "2024-03-13T09:33:29Z",
    "comments": 0,
    "user": "Kreativshikkk"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 644,
    "title": "Contribution Question-What's next after run scripts.convert?",
    "body": "### Question\n\nHi @xenova I am trying to figure out how to contribute. I am new to huggingface. Just 2 months down the rabbit hole.\r\n\r\nI ran\r\n`python -m scripts.convert --quantize --model_id SeaLLMs/SeaLLM-7B-v2` \r\ncommand \r\n\r\nHere is a list of file I got in `models/SeaLLMs/SeaLLM-7B-v2` folder\r\n\r\n```\r\n_model_layers.0_self_attn_rotary_emb_Constant_5_attr__value\r\n_model_layers.0_self_attn_rotary_emb_Constant_attr__value\r\nconfig.json\r\ngeneration_config.json\r\nmodel.onnx\r\nmodel.onnx_data\r\nspecial_tokens_map.json\r\ntokenizer.json\r\ntokenizer.model\r\ntokenizer_config.json\r\n```\r\nDoes it work? \r\n\r\nWhat's next from here? Do I upload the models to huggingface?\r\n\r\nDo you have example commits or PR I should take a look? I have been scanning the model PR but none of which mentioned what happen after you ran `scripts/convert`\r\n\r\nI have seen some other issues mentioned the need for document. I know you don't have it yet. That's fine. That's why I am only asking for a hint or a little guidiance.",
    "url": "https://github.com/huggingface/transformers.js/issues/644",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-13T08:51:37Z",
    "updated_at": "2024-04-11T02:33:04Z",
    "user": "pacozaa"
  },
  {
    "repo": "huggingface/making-games-with-ai-course",
    "number": 11,
    "title": "[UPDATE] Typo in Unit 1, \"What is HF?\" section.  The word \"Danse\" should be \"Dance\"",
    "body": "# What do you want to improve?\r\nThere is a typo in Unit 1, \"What is HF?\" section.\r\nThe word \"Danse\" should be \"Dance\" \r\n\r\n- Explain the typo/error or the part of the course you want to improve\r\n\r\nThere is a typo in Unit 1, \"What is HF?\" section.\r\nThe word \"Danse\" should be \"Dance\"\r\n\r\nThe English spelling doesn't seem to include the French spelling.  \r\nhttps://www.dictionary.com/browse/dance\r\n\r\nI assume this will also come up in later places, but I haven't gotten that far yet. :)\r\n\r\n\r\n# Actual Issue:\r\nIn this image:\r\nhttps://huggingface.co/datasets/huggingface-ml-4-games-course/course-images/resolve/main/en/unit1/unity/models4.jpg\r\nwhich is used here:\r\nhttps://github.com/huggingface/making-games-with-ai-course/blob/main/units/en/unit1/what-is-hf.mdx\r\n\r\n\r\n# **Also, don't hesitate to open a Pull Request with the update**. This way you'll be a contributor of the project.\r\nSorry, I have no access to the problematic image's source",
    "url": "https://github.com/huggingface/making-games-with-ai-course/issues/11",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-03-12T17:12:20Z",
    "updated_at": "2024-04-18T07:18:12Z",
    "user": "PaulForest"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 642,
    "title": "RangeError: offset is out of bounds #601",
    "body": "### Question\r\n\r\n```\r\nclass NsfwDetector {\r\n    constructor() {\r\n        this._threshold = 0.5;\r\n        this._nsfwLabels = [\r\n            'FEMALE_BREAST_EXPOSED',\r\n            'FEMALE_GENITALIA_EXPOSED',\r\n            'BUTTOCKS_EXPOSED',\r\n            'ANUS_EXPOSED',\r\n            'MALE_GENITALIA_EXPOSED',\r\n            'BLOOD_SHED',\r\n            'VIOLENCE',\r\n            'GORE',\r\n            'PORNOGRAPHY',\r\n            'DRUGS',\r\n            'ALCOHOL',\r\n        ];\r\n    }\r\n\r\n    async isNsfw(imageUrl) {\r\n        let blobUrl = '';\r\n        try {\r\n            // Load and resize the image first\r\n            blobUrl = await this._loadAndResizeImage(imageUrl);\r\n            const classifier = await window.tensorflowPipeline('zero-shot-image-classification', 'Xenova/clip-vit-base-patch16');\r\n            const output = await classifier(blobUrl, this._nsfwLabels);\r\n            console.log(output);\r\n            const nsfwDetected = output.some(result => result.score > this._threshold);\r\n            return nsfwDetected;\r\n        } catch (error) {\r\n            console.error('Error during NSFW classification: ', error);\r\n            throw error;\r\n        } finally {\r\n            if (blobUrl) {\r\n                URL.revokeObjectURL(blobUrl); // Ensure blob URLs are revoked after use to free up memory\r\n            }\r\n        }\r\n    }\r\n\r\n    async _loadAndResizeImage(imageUrl) {\r\n        const img = await this._loadImage(imageUrl);\r\n        const offScreenCanvas = document.createElement('canvas');\r\n        const ctx = offScreenCanvas.getContext('2d');\r\n        offScreenCanvas.width = 224;\r\n        offScreenCanvas.height = 224;\r\n    \r\n        ctx.drawImage(img, 0, 0, offScreenCanvas.width, offScreenCanvas.height);\r\n        \r\n        return new Promise((resolve, reject) => {\r\n            offScreenCanvas.toBlob(blob => {\r\n                if (!blob) {\r\n                    reject('Canvas to Blob conversion failed');\r\n                    return;\r\n                }\r\n                const blobUrl = URL.createObjectURL(blob);\r\n                resolve(blobUrl);\r\n            }, 'image/jpeg');\r\n        });\r\n    }\r\n\r\n    async _loadImage(url) {\r\n        return new Promise((resolve, reject) => {\r\n            const img = new Image();\r\n            img.crossOrigin = 'anonymous';\r\n            img.onload = () => resolve(img);\r\n            img.onerror = () => reject(`Failed to load image: ${url}`);\r\n            img.src = url;\r\n        });\r\n    }\r\n}\r\n\r\nwindow.NsfwDetector = NsfwDetector;\r\n\r\n```\r\n\r\nwhen used on a bunch of images, it fails, \"RangeError: offset is out of bounds\".\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/642",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-12T16:47:58Z",
    "updated_at": "2024-03-13T05:57:23Z",
    "user": "vijishmadhavan"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 926,
    "title": "AWS credentials resolution for Sagemaker models",
    "body": "chat-ui is excellent, thanks for all your amazing work here!\r\n\r\nI have been experimenting with a model in Sagemaker and am having some issues with the model endpoint configuration. It currently requires credentials to be provided explicitly. This does work, but the ergonomics are not great for our use cases:\r\n- in development, my team uses AWS SSO and it would be great to use our session credentials and not need to update our MODELS environment variable manually every time our sessions refresh\r\n- in deployments, we would want to use an instance or task execution role to sign requests\r\n\r\nIn my investigation I found this area of code https://github.com/huggingface/chat-ui/blob/eb071be4c938b0a2cf2e89a152d68305d4714949/src/lib/server/endpoints/aws/endpointAws.ts#L22-L37, which uses the `aws4fetch` library that only support signing with explicitly passed AWS credentials.\r\n\r\nI was able to update this area of code locally and support AWS credential resolution by switching this to use a different library [`aws-sigv4-fetch`](https://github.com/zirkelc/aws-sigv4-fetch) like so:\r\n\r\n```ts\r\ntry {\r\n\tcreateSignedFetcher = (await import(\"aws-sigv4-fetch\")).createSignedFetcher;\r\n} catch (e) {\r\n\tthrow new Error(\"Failed to import aws-sigv4-fetch\");\r\n}\r\n\r\nconst { url, accessKey, secretKey, sessionToken, model, region, service } =\r\n\tendpointAwsParametersSchema.parse(input);\r\n\r\nconst signedFetch = createSignedFetcher({\r\n\tservice,\r\n\tregion,\r\n\tcredentials:\r\n\t\taccessKey && secretKey\r\n\t\t\t? { accessKeyId: accessKey, secretAccessKey: secretKey, sessionToken }\r\n\t\t\t: undefined,\r\n});\r\n\r\n// Replacer `aws.fetch` with `signedFetch` below when passing `fetch` to `textGenerationStream#options`\r\n```\r\n\r\nMy testing has found this supports passing credentials like today, or letting the AWS SDK resolve them through the default chain.\r\n\r\nWould you be open to a PR with this change? Or is there a different/better/more suitable way to accomplish AWS credential resolution here?\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/926",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-12T16:24:57Z",
    "updated_at": "2024-03-13T10:30:52Z",
    "comments": 1,
    "user": "nason"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1754,
    "title": "How to tell whether the backend of ONNXRuntime accelerator is Intel VINO.",
    "body": "According to the [wiki](https://onnxruntime.ai/docs/execution-providers/#summary-of-supported-execution-providers), OpenVINO is one of the ONNXRuntime's execution providers.\r\n\r\nI am deploying model on Intel Xeon Gold server, which supports AVX512 and which is compatible with Intel OpenVINO. How could I tell if the accelerator is Default CPU or OpenVINO?\r\n\r\n```python\r\nfrom sentence_transformers import SentenceTransformer, models\r\nfrom optimum.onnxruntime import ORTModelForCustomTasks\r\nfrom transformers import AutoTokenizer\r\n\r\nort_model = ORTModelForCustomTasks.from_pretrained('Geotrend/distilbert-base-zh-cased', export=True)\r\ntokenizer = AutoTokenizer.from_pretrained(checkpoint)\r\n    \r\nort_model.save_pretrained(save_directory + \"/\" + checkpoint)\r\ntokenizer.save_pretrained(save_directory + \"/\" + checkpoint)\r\n```\r\n```shell\r\nFramework not specified. Using pt to export to ONNX.\r\nUsing the export variant default. Available variants are:\r\n    - default: The default ONNX variant.\r\nUsing framework PyTorch: 2.1.2.post300\r\n```",
    "url": "https://github.com/huggingface/optimum/issues/1754",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-12T08:54:01Z",
    "updated_at": "2024-07-08T11:31:13Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 134,
    "title": "Is there a way to freeze some layers of a model ?",
    "body": "Can we follow the normal way of:\r\n\r\n```\r\nfor param in model.base_model.parameters():\r\n    param.requires_grad = False\r\n```",
    "url": "https://github.com/huggingface/alignment-handbook/issues/134",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-12T02:06:03Z",
    "updated_at": "2024-03-12T02:06:03Z",
    "comments": 0,
    "user": "shamanez"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7283,
    "title": "How to load lora trained with Stable Cascade?",
    "body": "I finished a lora traning based on Stable Cascade with onetrainer, but I cannot find a solution to load the load in diffusers pipeline. Anyone who can help me will be appreciated.",
    "url": "https://github.com/huggingface/diffusers/issues/7283",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-03-12T01:33:01Z",
    "updated_at": "2024-06-29T13:35:45Z",
    "user": "zengjie617789"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6729,
    "title": "Support zipfiles that span multiple disks?",
    "body": "See https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream\r\n\r\nThe dataset viewer gives the following error:\r\n\r\n```\r\nError code:   ConfigNamesError\r\nException:    BadZipFile\r\nMessage:      zipfiles that span multiple disks are not supported\r\nTraceback:    Traceback (most recent call last):\r\n                File \"/src/services/worker/src/worker/job_runners/dataset/config_names.py\", line 67, in compute_config_names_response\r\n                  get_dataset_config_names(\r\n                File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py\", line 347, in get_dataset_config_names\r\n                  dataset_module = dataset_module_factory(\r\n                File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 1871, in dataset_module_factory\r\n                  raise e1 from None\r\n                File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 1846, in dataset_module_factory\r\n                  return HubDatasetModuleFactoryWithoutScript(\r\n                File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 1240, in get_module\r\n                  module_name, default_builder_kwargs = infer_module_for_data_files(\r\n                File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 584, in infer_module_for_data_files\r\n                  split_modules = {\r\n                File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 585, in <dictcomp>\r\n                  split: infer_module_for_data_files_list(data_files_list, download_config=download_config)\r\n                File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 526, in infer_module_for_data_files_list\r\n                  return infer_module_for_data_files_list_in_archives(data_files_list, download_config=download_config)\r\n                File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 554, in infer_module_for_data_files_list_in_archives\r\n                  for f in xglob(extracted, recursive=True, download_config=download_config)[\r\n                File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py\", line 576, in xglob\r\n                  fs, *_ = fsspec.get_fs_token_paths(urlpath, storage_options=storage_options)\r\n                File \"/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py\", line 622, in get_fs_token_paths\r\n                  fs = filesystem(protocol, **inkwargs)\r\n                File \"/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/registry.py\", line 290, in filesystem\r\n                  return cls(**storage_options)\r\n                File \"/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/spec.py\", line 79, in __call__\r\n                  obj = super().__call__(*args, **kwargs)\r\n                File \"/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/implementations/zip.py\", line 57, in __init__\r\n                  self.zip = zipfile.ZipFile(\r\n                File \"/usr/local/lib/python3.9/zipfile.py\", line 1266, in __init__\r\n                  self._RealGetContents()\r\n                File \"/usr/local/lib/python3.9/zipfile.py\", line 1329, in _RealGetContents\r\n                  endrec = _EndRecData(fp)\r\n                File \"/usr/local/lib/python3.9/zipfile.py\", line 286, in _EndRecData\r\n                  return _EndRecData64(fpin, -sizeEndCentDir, endrec)\r\n                File \"/usr/local/lib/python3.9/zipfile.py\", line 232, in _EndRecData64\r\n                  raise BadZipFile(\"zipfiles that span multiple disks are not supported\")\r\n              zipfile.BadZipFile: zipfiles that span multiple disks are not supported\r\n```\r\n\r\nThe files (https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream/tree/main/data) are:\r\n\r\n<img width=\"629\" alt=\"Capture d\u2019e\u0301cran 2024-03-11 a\u0300 22 07 30\" src=\"https://github.com/huggingface/datasets/assets/1676121/0bb15a51-d54f-4d73-8572-e427ea644b36\">\r\n",
    "url": "https://github.com/huggingface/datasets/issues/6729",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2024-03-11T21:07:41Z",
    "updated_at": "2024-06-26T05:08:59Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/candle",
    "number": 1834,
    "title": "How to increase model performance?",
    "body": "Hello all,\r\n\r\nI have recently benchmarked completion token time, which is 30ms on an H100. However, with llama.cpp it is 10ms. Because [mistral.rs](https://github.com/EricLBuehler/mistral.rs) is built on Candle, it inherits this performance deficit. In #1680, @guoqingbao said that the Candle implementation is not suitable for batched computing because of naive CUDA kernels. What other areas could be optimized?",
    "url": "https://github.com/huggingface/candle/issues/1834",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-11T12:36:45Z",
    "updated_at": "2024-03-29T20:44:46Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 638,
    "title": "Using an EfficientNet Model - Looking for advice",
    "body": "### Question\n\nDiscovered this project from the recent Syntax podcast episode (which was excellent) - it got my mind racing with different possibilities. \r\n\r\nI got some of the example projects up and running without too much issue and naturally wanted to try something a little more outside the box, which of course has led me down some rabbit holes.\r\n\r\nI came across this huggingface model;\r\nhttps://huggingface.co/chriamue/bird-species-classifier\r\nand https://huggingface.co/dennisjooo/Birds-Classifier-EfficientNetB2\r\n\r\nGreat, file size is only like 32 mb... however just swapping in this model into the example code didn't work - something about efficientnet models not supported yet. Okay I'll just try to convert this model with the provided script. \r\n\r\nSimilar error about EfficientNet... Okay I will clone the repo, and retrain using a different architecture... Then looking at the training data https://www.kaggle.com/datasets/gpiosenka/100-bird-species, it seems like maybe it's meant for efficientnet?\r\n\r\nAlso digging into how the above huggingface projects were done, I realized they are fine-tunes of other image classification models... \r\n\r\nSo my questions is, can I fine tune an existing transformer js image classification model? such as https://huggingface.co/Xenova/convnext-tiny-224 or am I better off using the original https://huggingface.co/facebook/convnext-tiny-224 model and creating a fine tune from there, then converting it to onnx using the script? \r\n\r\nThanks for your help on this and for this awesome project. Really just looking for some direction. ",
    "url": "https://github.com/huggingface/transformers.js/issues/638",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-11T01:31:49Z",
    "updated_at": "2024-03-11T17:42:31Z",
    "user": "ozzyonfire"
  },
  {
    "repo": "pytorch/xla",
    "number": 6710,
    "title": "Does XLA use the Nvidia GPU's tensor cores?",
    "body": "## \u2753 Questions and Help\r\n1. Does XLA use the Nvidia GPU's tensor cores?\r\n2. Is Pytorch XLA only designed to accelerate neural network training or does it accelerate their inferencing as well?",
    "url": "https://github.com/pytorch/xla/issues/6710",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-11T00:55:36Z",
    "updated_at": "2024-03-15T23:42:26Z",
    "comments": 2,
    "user": "Demis6"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1636,
    "title": "Need instructions for how to optimize for production serving (fast startup)",
    "body": "### Feature request\n\nI suggest better educating developers how to download and optimize the model at build time (in container or in a volume) so that the command `text-generation-launcher` serves as fast as possible.\n\n### Motivation\n\nBy default, when running TGI using Docker, the container downloads the model on the fly and spend a long time optimizing it.\r\nThe [quicktour](https://huggingface.co/docs/text-generation-inference/en/quicktour) recommends using a local volume, which is great, but this isn't really compatible with autoscaled cloud environments, where container startup as to be as fast as possible.\n\n### Your contribution\n\nAs I explore this area, I will share my findings in this issue.",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1636",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-03-10T22:17:53Z",
    "updated_at": "2024-04-15T02:49:03Z",
    "user": "steren"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2797,
    "title": "Contradiction in `save_for_backward`, what is permitted to be saved",
    "body": "https://pytorch.org/tutorials/beginner/examples_autograd/two_layer_net_custom_function.html\r\n\"ctx is a context object that can be used to stash information for backward computation. You can **cache arbitrary objects** for use in the backward pass using the ctx.save_for_backward method.\"\r\n\r\nhttps://pytorch.org/docs/stable/generated/torch.autograd.function.FunctionCtx.save_for_backward.html\r\n\"save_for_backward should be called at most once, only from inside the forward() method, and **only with tensors**.\"\r\n\r\nMost likely the second is correct, and the first is not. I haven't checked.\r\n\r\nSuggestion: \"You can cache **tensors** for use in the backward pass using the ctx.save_for_backward method. Other miscellaneous objects can be cached using ctx.my_object_name = object.\"\n\ncc @albanD @jbschlosser",
    "url": "https://github.com/pytorch/tutorials/issues/2797",
    "state": "closed",
    "labels": [
      "core",
      "medium",
      "docathon-h1-2025"
    ],
    "created_at": "2024-03-10T19:40:16Z",
    "updated_at": "2025-06-04T21:11:21Z",
    "user": "ad8e"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1752,
    "title": "Documentation for exporting openai/whisper-large-v3 to ONNX",
    "body": "### Feature request\r\n\r\nHello, I am exporting the [OpenAI Whisper-large0v3](https://huggingface.co/openai/whisper-large-v3) to ONNX and see it exports several files, most importantly in this case encoder (encoder_model.onnx & encoder_model.onnx.data) and decoder (decoder_model.onnx, decoder_model.onnx.data, decoder_with_past_model.onnx, decoder_with_past_model.onnx.data) files. I'd like to also be able to use as much as possible from the pipe in the new onnx files:\r\n\r\n`pipe = pipeline(\r\n    \"automatic-speech-recognition\",\r\n    model=model,\r\n    tokenizer=processor.tokenizer,\r\n    feature_extractor=processor.feature_extractor,\r\n    max_new_tokens=128,\r\n    chunk_length_s=30,\r\n    batch_size=16,\r\n    return_timestamps=True,\r\n    torch_dtype=torch_dtype,\r\n    device=device,\r\n)`\r\n\r\nIs there documentation that explains how to incorporate all these different things? I know transformer models are much different in this whole process and I cannot find a clear A -> B process on how to export this model and perform tasks such as quantization, etc. I see I can do the following for the tokenizer with ONNX, but I'd like more insight about the rest I mentioned above (how to use the seperate onnx files & how to use as much as the preexisting pipeline). \r\n\r\n`processor.tokenizer.save_pretrained(onnx_path)`\r\n\r\nI also see I can do:\r\n\r\n`model = ORTModelForSpeechSeq2Seq.from_pretrained(\r\n        model_id, export=True\r\n    )`\r\n\r\nbut I cannot find documentation on how to specify where it is exported to, which seem's like I am either missing something fairly simple or it is just not hyperlinked in the documentation.\r\n\r\n### Motivation\r\n\r\nI'd love to see further documentation on the entire export process for this highly popular model. Deployment is significantly slowed due to there not being a easy to find A -> B process for exporting the model and using the pipeline given in the vanilla model. \r\n\r\n### Your contribution\r\n\r\nI am able to provide additional information to make this process easier.",
    "url": "https://github.com/huggingface/optimum/issues/1752",
    "state": "open",
    "labels": [
      "feature-request",
      "onnx"
    ],
    "created_at": "2024-03-10T05:24:36Z",
    "updated_at": "2024-10-09T09:18:27Z",
    "comments": 10,
    "user": "mmingo848"
  },
  {
    "repo": "huggingface/transformers",
    "number": 29564,
    "title": "How to add new special tokens",
    "body": "### System Info\n\n- `transformers` version: 4.38.0\r\n- Platform: Linux-6.5.0-21-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.13\r\n- Huggingface_hub version: 0.20.2\r\n- Safetensors version: 0.4.2\r\n- Accelerate version: not installed\r\n- Accelerate config: not found\r\n- PyTorch version (GPU?): 2.2.0 (False)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: yes and no\r\n- Using distributed or parallel set-up in script?: no\r\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nExecute the code below:\r\n\r\n```\r\nfrom transformers import AutoTokenizer, AutoModel\r\nimport torch\r\nimport os\r\nfrom datasets import load_dataset\r\n\r\ndataset = load_dataset(\"ftopal/huggingface-datasets-processed\")\r\n\r\nos.environ['CUDA_LAUNCH_BLOCKING'] = \"1\"\r\n\r\n\r\ndevice = torch.device(\"cuda\") if torch.cuda.is_available() else torch.device(\"cpu\")\r\n# device = torch.device(\"cpu\")\r\ncheckpoint = 'intfloat/multilingual-e5-base'\r\n\r\nmodel = AutoModel.from_pretrained(checkpoint)\r\ntokenizer = AutoTokenizer.from_pretrained(\r\n    checkpoint, \r\n    additional_special_tokens=['<URL>']\r\n)\r\nmodel.to(device)\r\n\r\nencoded_input = tokenizer(\r\n   dataset['train'][0]['input_texts'],   # A tensor with 2, 512 shape\r\n   padding='max_length',\r\n   max_length=tokenizer.model_max_length,\r\n   truncation=True,\r\n   return_tensors=\"pt\",\r\n)\r\n\r\nencoded_input_dict = {\r\n    k: v.to(device) for k, v in encoded_input.items()\r\n}\r\n\r\nwith torch.no_grad():\r\n    model_output = model(**encoded_input_dict)\r\n```\n\n### Expected behavior\n\nI expect this code to work however this results in very weird errors. More details on error stack trace can be found here: https://github.com/pytorch/pytorch/issues/121493\r\n\r\nI found that if I remove `additional_special_tokens` param, code works. So that seems to be the problem. Another issue is that it is still not clear (after so many years) how to extend/add special tokens into the model. I went through the code base to find this parameter but that seems to be not working alone and the whole stack trace isn't helpful at all.\r\n\r\nQuestions from my side:\r\n\r\n- What is the expected solution for this and could we document this somewhere? I can't find this anywhere or somehow i am not able to find this.\r\n- When setting this param is not enough, which seems to be the case, why are we not raising an error somewhere? ",
    "url": "https://github.com/huggingface/transformers/issues/29564",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-09T22:56:44Z",
    "updated_at": "2024-04-17T08:03:43Z",
    "user": "lordsoffallen"
  },
  {
    "repo": "pytorch/vision",
    "number": 8305,
    "title": "aarch64 build for AWS Linux - Failed to load image Python extension",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nBuilt Torch 2.1.2 and TorchVision 0.16.2 from source and running into the following problem:\r\n\r\n/home/ec2-user/conda/envs/textgen/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: '/home/ec2-user/conda/envs/textgen/lib/python3.10/site-packages/torchvision/image.so: undefined symbol: _ZNK3c1017SymbolicShapeMeta18init_is_contiguousEv'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?\r\n\r\npreviously the error was about missing libs and not undefined symbol, so I believe the libs are correctly installed now. Building says:\r\n\r\n ```\r\n Compiling extensions with following flags:\r\n    FORCE_CUDA: False\r\n    FORCE_MPS: False\r\n    DEBUG: False\r\n    TORCHVISION_USE_PNG: True\r\n    TORCHVISION_USE_JPEG: True\r\n    TORCHVISION_USE_NVJPEG: True\r\n    TORCHVISION_USE_FFMPEG: True\r\n    TORCHVISION_USE_VIDEO_CODEC: True\r\n    NVCC_FLAGS:\r\n  Compiling with debug mode OFF\r\n  Found PNG library\r\n  Building torchvision with PNG image support\r\n    libpng version: 1.6.37\r\n    libpng include path: /home/ec2-user/conda/envs/textgen/include/libpng16\r\n  Running build on conda-build: False\r\n  Running build on conda: True\r\n  Building torchvision with JPEG image support\r\n    libjpeg include path: /home/ec2-user/conda/envs/textgen/include\r\n    libjpeg lib path: /home/ec2-user/conda/envs/textgen/lib\r\n  Building torchvision without NVJPEG image support\r\n  Building torchvision with ffmpeg support\r\n    ffmpeg version: b'ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers\\nbuilt with gcc 10.2.0 (crosstool-NG 1.22.0.1750_510dbc6_dirty)\\nconfiguration: --prefix=/opt/conda/conda-bld/ffmpeg_1622823166193/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh --cc=/opt/conda/conda-bld/ffmpeg_1622823166193/_build_env/bin/aarch64-conda-linux-gnu-cc --disable-doc --enable-avresample --enable-gmp --enable-hardcoded-tables --enable-libfreetype --enable-libvpx --enable-pthreads --enable-libopus --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-static --enable-version3 --enable-zlib --enable-libmp3lame --disable-nonfree --enable-gpl --enable-gnutls --disable-openssl --enable-libopenh264 --enable-libx264\\nlibavutil      56. 31.100 / 56. 31.100\\nlibavcodec     58. 54.100 / 58. 54.100\\nlibavformat    58. 29.100 / 58. 29.100\\nlibavdevice    58.  8.100 / 58.  8.100\\nlibavfilter     7. 57.100 /  7. 57.100\\nlibavresample   4.  0.  0 /  4.  0.  0\\nlibswscale      5.  5.100 /  5.  5.100\\nlibswresample   3.  5.100 /  3.  5.100\\nlibpostproc    55.  5.100 / 55.  5.100\\n'\r\n    ffmpeg include path: ['/home/ec2-user/conda/envs/textgen/include']\r\n    ffmpeg library_dir: ['/home/ec2-user/conda/envs/textgen/lib']\r\n  Building torchvision without video codec support\r\n```\r\nSo I believe I do have things set up correctly to be able to do image calls (I don't care about video). Any idea why I would still be getting the undefined symbol warning? Thanks!\r\n\r\n### Versions\r\n\r\nCollecting environment information...\r\nPyTorch version: 2.1.2+cu121\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.2\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Amazon Linux 2023.3.20240304 (aarch64)\r\nGCC version: (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2)\r\nClang version: Could not collect\r\nCMake version: version 3.28.3\r\nLibc version: glibc-2.34\r\n\r\nPython version: 3.10.9 (main, Mar  8 2023, 10:41:45) [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-6.1.79-99.164.amzn2023.aarch64-aarch64-with-glibc2.34\r\nIs CUDA available: True\r\nCUDA runtime version: 12.2.140\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: GPU 0: NVIDIA T4G\r\nNvidia driver version: 550.54.14\r\ncuDNN version: Probably one of the following:\r\n/usr/local/cuda-12.2/targets/sbsa-linux/lib/libcudnn.so.8.9.4\r\n/usr/local/cuda-12.2/targets/sbsa-linux/lib/libcudnn_adv_infer.so.8.9.4\r\n/usr/local/cuda-12.2/targets/sbsa-linux/lib/libcudnn_adv_train.so.8.9.4\r\n/usr/local/cuda-12.2/targets/sbsa-linux/lib/libcudnn_cnn_infer.so.8.9.4\r\n/usr/local/cuda-12.2/targets/sbsa-linux/lib/libcudnn_cnn_train.so.8.9.4\r\n/usr/local/cuda-12.2/targets/sbsa-linux/lib/libcudnn_ops_infer.so.8.9.4\r\n/usr/local/cuda-12.2/targets/sbsa-linux/lib/libcudnn_ops_train.so.8.9.4\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                       aarch64\r\nCPU op-mode(s):                     32-bit, 64-bit\r\nByte Order:                         Little Endian\r\nCPU(s):                             4\r\nOn-line CPU(s) list:                0-3\r\nVendor ID:                          ARM\r\nModel name:                         Neoverse-N1\r\nModel:                   ",
    "url": "https://github.com/pytorch/vision/issues/8305",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-09T20:13:46Z",
    "updated_at": "2024-03-12T18:53:04Z",
    "comments": 6,
    "user": "elkay"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6726,
    "title": "Profiling for HF Filesystem shows there are easy performance gains to be made",
    "body": "### Describe the bug\n\n# Let's make it faster\r\nFirst, an evidence...\r\n![image](https://github.com/huggingface/datasets/assets/159512661/a703a82c-43a0-426c-9d99-24c563d70965)\r\nFigure 1: CProfile for loading 3 files from cerebras/SlimPajama-627B train split, and 3 files from test split using streaming=True. X axis is 1106 seconds long.\r\n\r\nSee? It's pretty slow.\r\n\r\nWhat is resolve pattern doing?\r\n```\r\nresolve_pattern called with **/train/** and hf://datasets/cerebras/SlimPajama-627B@2d0accdd58c5d5511943ca1f5ff0e3eb5e293543\r\nresolve_pattern took 20.815081119537354 seconds\r\n```\r\nMakes sense. How to improve it?\r\n\r\n## Bigger project, biggest payoff\r\n\r\nDatabricks (and consequently, spark) store a compressed manifest file of the files contained in the remote filesystem.\r\nThen, you download one tiny file, decompress it, and all the operations are local instead of this shenanigans.\r\n\r\nIt seems pretty straightforward to make dataset uploads compute a manifest and upload it alongside their data.\r\n\r\nThis would make resolution time so fast that nobody would ever think about it again.\r\nIt also means you either need to have the uploader compute it _every time_, or have a hook that computes it.\r\n\r\n## Smaller project, immediate payoff: Be diligent in avoiding deepcopy\r\n\r\nRevise the _ls_tree method to avoid deepcopy:\r\n```\r\n    def _ls_tree(\r\n        self,\r\n        path: str,\r\n        recursive: bool = False,\r\n        refresh: bool = False,\r\n        revision: Optional[str] = None,\r\n        expand_info: bool = True,\r\n    ):\r\n ..... omitted .....\r\n            for path_info in tree:\r\n                if isinstance(path_info, RepoFile):\r\n                    cache_path_info = {\r\n                        \"name\": root_path + \"/\" + path_info.path,\r\n                        \"size\": path_info.size,\r\n                        \"type\": \"file\",\r\n                        \"blob_id\": path_info.blob_id,\r\n                        \"lfs\": path_info.lfs,\r\n                        \"last_commit\": path_info.last_commit,\r\n                        \"security\": path_info.security,\r\n                    }\r\n                else:\r\n                    cache_path_info = {\r\n                        \"name\": root_path + \"/\" + path_info.path,\r\n                        \"size\": 0,\r\n                        \"type\": \"directory\",\r\n                        \"tree_id\": path_info.tree_id,\r\n                        \"last_commit\": path_info.last_commit,\r\n                    }\r\n                parent_path = self._parent(cache_path_info[\"name\"])\r\n                self.dircache.setdefault(parent_path, []).append(cache_path_info)\r\n                out.append(cache_path_info)\r\n        return copy.deepcopy(out)  # copy to not let users modify the dircache\r\n```\r\nObserve this deepcopy at the end. It is making a copy of a very simple data structure. We do not need to copy. We can simply generate the data structure twice instead. It will be much faster.\r\n```\r\n    def _ls_tree(\r\n        self,\r\n        path: str,\r\n        recursive: bool = False,\r\n        refresh: bool = False,\r\n        revision: Optional[str] = None,\r\n        expand_info: bool = True,\r\n    ):\r\n ..... omitted .....\r\n            def make_cache_path_info(path_info):\r\n                if isinstance(path_info, RepoFile):\r\n                    return {\r\n                        \"name\": root_path + \"/\" + path_info.path,\r\n                        \"size\": path_info.size,\r\n                        \"type\": \"file\",\r\n                        \"blob_id\": path_info.blob_id,\r\n                        \"lfs\": path_info.lfs,\r\n                        \"last_commit\": path_info.last_commit,\r\n                        \"security\": path_info.security,\r\n                    }\r\n                else:\r\n                    return {\r\n                        \"name\": root_path + \"/\" + path_info.path,\r\n                        \"size\": 0,\r\n                        \"type\": \"directory\",\r\n                        \"tree_id\": path_info.tree_id,\r\n                        \"last_commit\": path_info.last_commit,\r\n                    }\r\n            for path_info in tree:\r\n                cache_path_info = make_cache_path_info(path_info)\r\n                out_cache_path_info = make_cache_path_info(path_info) # copy to not let users modify the dircache\r\n                parent_path = self._parent(cache_path_info[\"name\"])\r\n                self.dircache.setdefault(parent_path, []).append(cache_path_info)\r\n                out.append(out_cache_path_info)\r\n        return out\r\n```\r\nNote there is no longer a deepcopy in this method. We have replaced it with generating the output twice. This is substantially faster. For me, the entire resolution went from 1100s to 360s.\r\n\r\n## Medium project, medium payoff\r\nAfter the above change, we have this profile:\r\n![image](https://github.com/huggingface/datasets/assets/159512661/db7b83da-2dfc-4c2e-abab-0ede9477876c)\r\nFigure 2: x-axis is 355 seconds. Note that globbing and _ls_tree deep copy is gone. No surprise there. It's much faster now, but we still spend ~187seconds i",
    "url": "https://github.com/huggingface/datasets/issues/6726",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-09T07:08:45Z",
    "updated_at": "2024-03-09T07:11:08Z",
    "comments": 2,
    "user": "awgr"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 133,
    "title": "Early Stopping Issue when used with ConstantLengthDataset",
    "body": "Hello\r\nI modified the code to include the Constant Length Dataset and it's early stopping at around 15% of the training. This issue doesn't occur when not used with the normal code given. Is there an issue with constant length dataset? I used it with SFTTrainer.",
    "url": "https://github.com/huggingface/alignment-handbook/issues/133",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-08T23:08:08Z",
    "updated_at": "2024-03-08T23:08:08Z",
    "comments": 0,
    "user": "sankydesai"
  },
  {
    "repo": "pytorch/serve",
    "number": 3008,
    "title": "very high QueueTime",
    "body": "Hi, I am seeing a very high queue time in my torchserve setup.\r\nif I am considering correctly the `QueueTime.ms:19428` means this particular request had to wait for 19 sec for processing\r\nwhile the QueTime just before that request was `QueueTime.ms:0` so why suddenly 18 sec delay\r\n\r\nIf I am wrong then what does this QueueTime parameter represent?\r\n\r\nmy env torch131+cu117, torchserve 0.7.2, and the model used is yolov5s which is a very small model, in input I am accepting an s3 uri downloading the image internally, and then processing\r\n\r\nattaching the logs here any idea what could be happening here\r\n```\r\n2024-03-08T08:44:35,261 [INFO ] W-9003-vehicledetection TS_METRICS - QueueTime.ms:0|#Level:Host|#hostname:ai-gpu-service-5b585f9b9d-x4r7z,timestamp:1709887475\r\n2024-03-08T08:44:35,261 [INFO ] W-9003-vehicledetection TS_METRICS - WorkerThreadTime.ms:0|#Level:Host|#hostname:ai-gpu-service-5b585f9b9d-x4r7z,timestamp:1709887475\r\n2024-03-08T08:44:35,261 [INFO ] W-9003-vehicledetection org.pytorch.serve.wlm.WorkerThread - Flushing req. to backend at: 1709887475261\r\n2024-03-08T08:44:35,262 [INFO ] W-9003-vehicledetection-stdout MODEL_LOG - Backend received inference at: 1709887475\r\n2024-03-08T08:44:35,262 [INFO ] W-9003-vehicledetection-stdout MODEL_LOG - Received backend request -> {'image_uri': 's3://mubucket/062c650b3213.jpeg', 'conf_thresh': 0.5}\r\n2024-03-08T08:44:35,282 [INFO ] W-9003-vehicledetection-stdout MODEL_LOG - completed processing results\r\n2024-03-08T08:44:35,283 [INFO ] W-9003-vehicledetection-stdout MODEL_METRICS - HandlerTime.Milliseconds:20.93|#ModelName:vehicledetection,Level:Model|#hostname:ai-gpu-service-5b585f9b9d-x4r7z,requestID:3a44a9f4-4f5d-4ead-8f1f-153ecf6b001f,timestamp:1709887475\r\n2024-03-08T08:44:35,283 [INFO ] W-9003-vehicledetection-stdout MODEL_METRICS - PredictionTime.Milliseconds:21.03|#ModelName:vehicledetection,Level:Model|#hostname:ai-gpu-service-5b585f9b9d-x4r7z,requestID:3a44a9f4-4f5d-4ead-8f1f-153ecf6b001f,timestamp:1709887475\r\n2024-03-08T08:44:35,283 [INFO ] W-9003-vehicledetection org.pytorch.serve.wlm.WorkerThread - Backend response time: 22\r\n2024-03-08T08:44:35,283 [INFO ] W-9003-vehicledetection ACCESS_LOG - /xxx.xx.xxx.xxx:18363 \"POST /predictions/vehicledetection HTTP/1.1\" 200 19450\r\n2024-03-08T08:44:35,283 [INFO ] W-9003-vehicledetection TS_METRICS - Requests2XX.Count:1|#Level:Host|#hostname:ai-gpu-service-5b585f9b9d-x4r7z,timestamp:1706999000\r\n2024-03-08T08:44:35,283 [DEBUG] W-9003-vehicledetection org.pytorch.serve.job.Job - Waiting time ns: 19428751625, Backend time ns: 21770097\r\n2024-03-08T08:44:35,283 [INFO ] W-9003-vehicledetection TS_METRICS - QueueTime.ms:19428|#Level:Host|#hostname:ai-gpu-service-5b585f9b9d-x4r7z,timestamp:1709887475\r\n```\r\n\r\n",
    "url": "https://github.com/pytorch/serve/issues/3008",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-08T14:52:09Z",
    "updated_at": "2024-03-09T17:12:37Z",
    "comments": 0,
    "user": "PushpakBhoge512"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 635,
    "title": "Failed to process file. and Failed to upload.",
    "body": "### Question\n\nI am hosting Supabase on Docker in Ubuntu, and I am facing file upload failures on the chatbot-ui. The error messages displayed are \"Failed to process file\" and \"Failed to upload.\" The console output error messages are as follows:\r\n\r\n- POST https://chat.example.com/api/retrieval/process 500 (Internal Server Error)\r\n- GET https://supa.example.com/rest/v1/files?select=*&id=eq.5186a7c7-ff34-4a40-98c1-db8d36e47896 406 (Not Acceptable)\r\n\r\nFile uploads fail regardless of the file type - whether it's a file with a purely English filename, a .txt file, or a .docx file. \r\n\r\nAdditionally, registration, login, chatting, and uploading images are functioning properly.",
    "url": "https://github.com/huggingface/transformers.js/issues/635",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-08T13:07:18Z",
    "updated_at": "2024-03-08T13:22:57Z",
    "user": "chawaa"
  },
  {
    "repo": "huggingface/peft",
    "number": 1545,
    "title": "How to use lora finetune moe model",
    "body": "",
    "url": "https://github.com/huggingface/peft/issues/1545",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-08T11:45:09Z",
    "updated_at": "2024-04-16T15:03:39Z",
    "user": "Minami-su"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 119,
    "title": "how about make a ray executor to deduplication",
    "body": "- https://github.com/ChenghaoMou/text-dedup/blob/main/text_dedup/minhash_spark.py\r\n- reference\uff1ahttps://github.com/alibaba/data-juicer/blob/main/data_juicer/core/ray_executor.py\r\n- Ray is simpler and faster than Spark\r\n",
    "url": "https://github.com/huggingface/datatrove/issues/119",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-08T11:37:13Z",
    "updated_at": "2024-04-11T12:48:53Z",
    "user": "simplew2011"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 634,
    "title": "For nomic-ai/nomic-embed-text-v1 8192 context length",
    "body": "### Question\n\nAs per document: https://huggingface.co/nomic-ai/nomic-embed-text-v1\r\n\r\nModel supports 8192 context length, however, in transformers.js model_max_length: 512.\r\n\r\nAny guidance how to use full context (8192) instead of 512?",
    "url": "https://github.com/huggingface/transformers.js/issues/634",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-08T05:33:39Z",
    "updated_at": "2025-10-13T04:57:49Z",
    "user": "faizulhaque"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7254,
    "title": "Request proper examples on how to training a diffusion models with diffusers on large scale dataset like LAION",
    "body": "Hi, I do not see any examples in diffusers/examples on how  to training a diffusion models with diffusers on large scale dataset like LAION. However, it is important since many works and models is willing integrate their models into diffusers, so if they can train their models in diffusers, it would be more easy when they want to do it.",
    "url": "https://github.com/huggingface/diffusers/issues/7254",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-03-08T01:31:33Z",
    "updated_at": "2024-06-30T05:27:57Z",
    "user": "Luciennnnnnn"
  },
  {
    "repo": "huggingface/swift-transformers",
    "number": 56,
    "title": "How to get models?",
    "body": "Missing in docu?",
    "url": "https://github.com/huggingface/swift-transformers/issues/56",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-07T15:47:54Z",
    "updated_at": "2025-02-11T11:41:32Z",
    "user": "pannous"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6721,
    "title": "Hi,do you know how to load the dataset from local file now?",
    "body": "              Hi, if I want to load the dataset from local file, then how to specify the configuration name?\r\n\r\n_Originally posted by @WHU-gentle in https://github.com/huggingface/datasets/issues/2976#issuecomment-1333455222_\r\n            ",
    "url": "https://github.com/huggingface/datasets/issues/6721",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-07T13:58:40Z",
    "updated_at": "2024-03-31T08:09:25Z",
    "user": "Gera001"
  },
  {
    "repo": "pytorch/executorch",
    "number": 2293,
    "title": "How to analyze executorch .pte file performance?",
    "body": "I am looking for a way to either benchmark the .pte files performance, the final state of the ExecutorchProgramManager object, or similar after following [this](https://pytorch.org/executorch/stable/tutorials/export-to-executorch-tutorial.html) tutorial. I used the PyTorch profiler on the model before putting it through executorch. I can\u2019t find a way to use any one of the above on the profiler. I\u2019d like to use the same or similar to compare the original model to the executorch model with quantization to see the performance differences. Thanks!",
    "url": "https://github.com/pytorch/executorch/issues/2293",
    "state": "closed",
    "labels": [
      "module: devtools"
    ],
    "created_at": "2024-03-07T12:12:41Z",
    "updated_at": "2025-02-03T22:04:48Z",
    "user": "mmingo848"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 633,
    "title": "Is 'aggregation_strategy' parameter available for token classification pipeline?",
    "body": "### Question\n\nHi. I have question.\r\n\r\nFrom HuggingFace Transformers documentation, they have **'aggregation_strategy'** parameter in token classification pipeline. [Link](https://huggingface.co/docs/transformers/en/main_classes/pipelines#transformers.TokenClassificationPipeline.aggregation_strategy)\r\nNeed to know in this library provide this parameter?\r\n\r\nThanks.\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/633",
    "state": "open",
    "labels": [
      "help wanted",
      "good first issue",
      "question"
    ],
    "created_at": "2024-03-07T07:02:55Z",
    "updated_at": "2024-06-09T15:16:56Z",
    "user": "boat-p"
  },
  {
    "repo": "pytorch/xla",
    "number": 6674,
    "title": "How to minimize memory expansion due to padding during sharding",
    "body": "Hello\r\n\r\nFor a model that can be sharded in model parallelization in TPUv4 (4x32) device, I am getting the error below at the beginning of the training on TPUv3 (8x16) device. There is `4x expansion`  with respect to console message. Even if both both TPUv4 and TPUv3 devices have same total memory I cannot run the training on TPUv3 device.\r\n\r\n```\r\nProgram hbm requirement 15.45G:\r\n    global            2.36M\r\n    scoped            3.88M\r\n    HLO temp         15.45G (60.9% utilization: Unpadded (9.40G) Padded (15.44G), 0.0% fragmentation (5.52M))\r\n\r\n  Largest program allocations in hbm:\r\n\r\n  1. Size: 4.00G\r\n     Shape: bf16[2048,1,2048,128]{0,1,3,2:T(4,128)(2,1)}\r\n     Unpadded size: 1.00G\r\n     Extra memory due to padding: 3.00G (4.0x expansion)\r\n     XLA label: broadcast.6042.remat3 = broadcast(bitcast.26), dimensions={2,3}\r\n     Allocation type: HLO temp\r\n     ==========================\r\n\r\n  2. Size: 4.00G\r\n     Shape: bf16[2048,1,2048,128]{0,1,3,2:T(4,128)(2,1)}\r\n     Unpadded size: 1.00G\r\n     Extra memory due to padding: 3.00G (4.0x expansion)\r\n     XLA label: broadcast.6043.remat3 = broadcast(bitcast.27), dimensions={0,3}\r\n     Allocation type: HLO temp\r\n     ==========================\r\n```\r\n\r\nThe lines that causes `4x expansion` is below:\r\n\r\n```\r\ndef forward(self, x):   # Activation map volume = 1,128,2048,1\r\n   ...\r\n   ...\r\n   x = torch.transpose(x, 1, 3)  # Activation map volume = 1,1,2048,128\r\n\r\n   x_batch_0 = x.expand(2048, -1, -1, -1)  # Activation map volume = 2048,1,2048,128\r\n\r\n   x_batch_1 = x.repeat_interleave(2048, dim=2).reshape(2048, 1, 2048, 128) # Activation map volume = 2048,1,2048,128\r\n\r\n   x_batch = torch.cat((x_batch_0, x_batch_1), dim=1) # Activation map volume = 2048,2,2048,128\r\n\r\n   ...\r\n   ...\r\n```\r\n\r\nHere are the sharding properties that I set.\r\n\r\n```\r\nmesh_shape = (num_devices, 1, 1, 1)\r\n\r\nmesh = xs.Mesh(device_ids, mesh_shape, ('w', 'x', 'y', 'z'))\r\npartition_spec = (0, 1, 2, 3)  # Apply sharding along all axes\r\n\r\nfor name, layer in model.named_modules():\r\n    if (  'conv2d' in name ):\r\n       xs.mark_sharding(layer.weight, mesh, partition_spec)\r\n```\r\n\r\nHow can I prevent  `4x expansion`?\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/6674",
    "state": "open",
    "labels": [
      "performance",
      "distributed"
    ],
    "created_at": "2024-03-06T15:23:31Z",
    "updated_at": "2025-04-18T18:42:38Z",
    "user": "mfatih7"
  },
  {
    "repo": "huggingface/swift-coreml-diffusers",
    "number": 93,
    "title": "Blocked at \"loading\" screen - how to reset the app / cache ?",
    "body": "After playing a bit with the app, it now stays in \"Loading\" state at startup (see screenshot)\r\n\r\nI tried to remove the cache in `~/Library/Application Support/hf-diffusion-models` but it just cause a re-download.\r\n\r\nHow can I reset the app, delete all files created and start like on a fresh machine again ?\r\n\r\nAlternatively, how can I pass the \"Loading\" screen ?\r\n\r\n<img width=\"1016\" alt=\"image\" src=\"https://github.com/huggingface/swift-coreml-diffusers/assets/401798/15c7c67a-f61f-4855-a11e-ea7bd61b0a09\">\r\n",
    "url": "https://github.com/huggingface/swift-coreml-diffusers/issues/93",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-06T12:50:29Z",
    "updated_at": "2024-03-10T11:24:49Z",
    "user": "sebsto"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 905,
    "title": "Fail to create assistant. ",
    "body": "I use the docker image chat-ui-db as the frontend, text-generation-inference as the inference backend, and meta-llamaLlama-2-70b-chat-hf as the model. Using the image and model mentioned above, I set up a large language model dialog service on server A. Assume that the IP address of the server A is x.x.x.x.\r\nI use docker compose to deploy it. The content of docker-compose.yml is as follows:\r\n```\r\nservices:\r\n  chat-ui:\r\n    image: chat-ui-db:latest\r\n    ports:\r\n      - \"3000:3000\"\r\n    restart: unless-stopped\r\n  textgen:\r\n    image: huggingface/text-generation-inference:1.4\r\n    ports:\r\n      - \"8080:80\"\r\n    command: [\"--model-id\", \"/data/models/meta-llamaLlama-2-70b-chat-hf\"]\r\n    volumes:\r\n     - /home/test/llm-test/serving/data:/data\r\n    deploy:\r\n      resources:\r\n        reservations:\r\n          devices:\r\n          - driver: nvidia\r\n            count: 8\r\n            capabilities: [gpu]\r\n    restart: unless-stopped\r\n```\r\nI set ENABLE_ASSISTANTS=true in .env.local to enable assistants feature. \r\nI logged into localhost:3000 using chrome, clicked the settings button, and then clicked the create new assistant button. Enter the information in the Name and Description text boxes, select a model, and enter the information in the User start messages and Instructions (system prompt) text boxes. Finally, click the Create button. I can create an assistant just fine.\r\n\r\nWhen I go to xxxx:3000 from a browser on a different server and access the service. (One may ask, how can I achieve access to server A's services from other servers without logging. The solution is to use nginx as a http to https anti-proxy(https://www.inovex.de/de/blog/code-assistant-how-to-self-host-your-own/)). I clicked the settings button, and then clicked the create new assistant button. Enter the information in the Name and Description text boxes, select a model, and enter the information in the User start messages and Instructions (system prompt) text boxes. Finally, click the Create button. The webpage is not responding. The container logs don't show anything either. I couldn't create an assistant.\r\n\r\nWhat should i do?\r\n\r\nDo I have to enable login authentication to create an assistant? unless I'm accessing it from localhost. I'm on a LAN and I can't get user authentication through Huggingface or google. I have also tried to set up a user authentication service using keycloak and configure .env.local to enable open id login. But the attempt failed. See this page(https://github.com/huggingface/chat-ui/issues/896) for the specific problem. \r\n\r\n\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/905",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-06T08:33:03Z",
    "updated_at": "2024-03-06T08:33:03Z",
    "comments": 0,
    "user": "majestichou"
  },
  {
    "repo": "pytorch/serve",
    "number": 3004,
    "title": "How to 'Create model archive pod and run model archive file generation script' in the \u2018User Guide\u2019 ",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI'm reading the User Guide of KServe doc. One part of the 'Deploy a PyTorch Model with TorchServe InferenceService' is hard to understand. \r\n\r\n3  'Create model archive pod and run model archive file generation script' \r\n3.1 Create model archive pod and run model archive file generation script[\u00b6](https://kserve.github.io/website/0.11/modelserving/v1beta1/torchserve/model-archiver/#31-create-model-archive-pod-and-run-model-archive-file-generation-script)\r\nkubectl apply -f model-archiver.yaml -n kserve-test\r\n(https://kserve.github.io/website/0.11/modelserving/v1beta1/torchserve/model-archiver/)\r\n\r\nIdk how to write the model-archiver.yaml and the model archive file generation script. I would be very grateful if anyone can help me\uff01\r\n\r\n### Error logs\r\n\r\nNot yet\r\n\r\n### Installation instructions\r\n\r\nYes \r\nyes\r\n\r\n### Model Packaing\r\n\r\nNot yet\r\n\r\n### config.properties\r\n\r\n_No response_\r\n\r\n### Versions\r\n\r\naiohttp==3.8.6\r\naiohttp-cors==0.7.0\r\naiorwlock==1.3.0\r\naiosignal==1.3.1\r\nanyio==4.0.0\r\nasync-timeout==4.0.3\r\nattrs==23.1.0\r\nazure-core==1.29.5\r\nazure-identity==1.15.0\r\nazure-storage-blob==12.18.3\r\nazure-storage-file-share==12.14.2\r\nblessed==1.20.0\r\n#boto==31.28.73\r\nbotocore==1.31.73\r\ncachetools==5.3.2\r\ncaptum==0.6.0\r\ncertifi==2023.7.22\r\ncffi==1.16.0\r\ncharset-normalizer==3.3.0\r\nclick==8.1.7\r\ncloudevents==1.10.1\r\ncolorful==0.5.5\r\ncontourpy==1.1.1\r\ncryptography==41.0.5\r\ncuda-python==12.3.0\r\ncycler==0.12.1\r\nCython==0.29.34\r\ndeprecation==2.1.0\r\ndistlib==0.3.7\r\nenum-compat==0.0.3\r\nexceptiongroup==1.1.3\r\nfastapi==0.95.2\r\nfilelock==3.12.4\r\nfonttools==4.43.1\r\nfrozenlist==1.4.0\r\nfsspec==2023.9.2\r\ngoogle-api-core==2.12.0\r\ngoogle-auth==2.23.3\r\ngoogle-cloud-core==2.3.3\r\ngoogle-cloud-storage==1.44.0\r\n#google-crc==32c1.5.0\r\ngoogle-resumable-media==2.6.0\r\ngoogleapis-common-protos==1.61.0\r\ngpustat==1.1.1\r\ngrpcio==1.51.3\r\ngrpcio-tools==1.48.2\r\n#h==110.14.0\r\nhttpcore==0.16.3\r\nhttptools==0.6.1\r\nhttpx==0.23.3\r\nhuggingface-hub==0.17.3\r\nidna==3.4\r\nimportlib-resources==6.1.0\r\nisodate==0.6.1\r\n#Jinja==23.1.2\r\njmespath==1.0.1\r\njsonschema==4.19.2\r\njsonschema-specifications==2023.7.1\r\nkiwisolver==1.4.5\r\nkserve==0.11.1\r\nkubernetes==28.1.0\r\nMarkupSafe==2.1.3\r\nmatplotlib==3.8.0\r\nmpmath==1.3.0\r\nmsal==1.24.1\r\nmsal-extensions==1.0.0\r\nmsgpack==1.0.7\r\nmultidict==6.0.4\r\nnetworkx==3.1\r\nnumpy==1.24.3\r\nnvidia-ml-py==12.535.108\r\noauthlib==3.2.2\r\nopencensus==0.11.3\r\nopencensus-context==0.1.3\r\norjson==3.9.10\r\npackaging==23.2\r\npandas==2.1.2\r\nPillow==10.0.1\r\n#pip==23.3.1\r\nplatformdirs==3.11.0\r\nportalocker==2.8.2\r\nprometheus-client==0.13.1\r\nprotobuf==3.20.3\r\npsutil==5.9.5\r\npy-spy==0.3.14\r\n#pyasn==10.5.0\r\n#pyasn==1-modules0.3.0\r\npycparser==2.21\r\npydantic==1.10.13\r\nPyJWT==2.8.0\r\npynvml==11.4.1\r\npyparsing==3.1.1\r\npython-dateutil==2.8.2\r\npython-dotenv==1.0.0\r\npython-rapidjson==1.13\r\npytz==2023.3.post1\r\nPyYAML==6.0\r\nray==2.4.0\r\nreferencing==0.30.2\r\nregex==2023.10.3\r\nrequests==2.31.0\r\nrequests-oauthlib==1.3.1\r\n#rfc==39861.5.0\r\nrpds-py==0.10.6\r\nrsa==4.9\r\n#s==3transfer0.7.0\r\nsafetensors==0.4.0\r\nsetuptools==68.2.2\r\nsix==1.16.0\r\nsmart-open==6.4.0\r\nsniffio==1.3.0\r\nstarlette==0.27.0\r\nsympy==1.12\r\ntabulate==0.9.0\r\ntiming-asgi==0.3.1\r\ntokenizers==0.14.1\r\ntorch==2.1.0\r\ntorch-model-archiver==0.9.0\r\ntorch-workflow-archiver==0.2.11\r\ntorchaudio==2.1.0\r\ntorchdata==0.7.0\r\ntorchserve==0.9.0\r\ntorchtext==0.16.0\r\ntorchvision==0.16.0\r\ntqdm==4.66.1\r\ntransformers==4.34.1\r\ntritonclient==2.39.0\r\ntyping_extensions==4.8.0\r\ntzdata==2023.3\r\n#urllib==31.26.18\r\nuvicorn==0.19.0\r\n#uvloop==0.19.0\r\nvirtualenv==20.21.0\r\nwatchfiles==0.21.0\r\nwcwidth==0.2.8\r\nwebsocket-client==1.6.4\r\nwebsockets==12.0\r\nwheel==0.40.0\r\nyarl==1.9.2\r\nzipp==3.17.0\r\n\r\n\r\n### Repro instructions\r\n\r\nNone\r\n\r\n### Possible Solution\r\n\r\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/3004",
    "state": "open",
    "labels": [
      "triaged",
      "kfserving"
    ],
    "created_at": "2024-03-06T07:42:50Z",
    "updated_at": "2024-03-07T07:06:52Z",
    "user": "Enochlove"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 904,
    "title": "Running the project with `npm run dev`, but it does not hot reload.",
    "body": "Am I alone in this issue or are you just developing without hot reload? Does anyone have any ideas on how to resolve it?\r\n\r\n**UPDATES:**\r\nIt has to do whenever you're running it on WSL.\r\n\r\nI guess this is an unrelated issue so feel free to close, but would still be nice to know how to resolve this.",
    "url": "https://github.com/huggingface/chat-ui/issues/904",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-06T03:34:21Z",
    "updated_at": "2024-03-06T16:07:11Z",
    "comments": 2,
    "user": "CakeCrusher"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2550,
    "title": "More precise dataset size computation",
    "body": "Currently, the Hub uses the `/size` endpoint's `num_bytes_original_files` value to display the `Size of downloaded dataset files` on a dataset's card page. However, this value does not consider a possible overlap between the configs' data files (and simply [sums](https://github.com/huggingface/datasets-server/blob/e4aac49c4d3c245cb3c0e48695b7d24a934a8377/services/worker/src/worker/job_runners/dataset/size.py#L97-L98) all the configs' sizes up), in which case the shared files need to be downloaded only once. Both `datasets` and `hfh` recognize this (by downloading them once), so the size computation should account for it, too.\r\n\r\ncc @guipenedo who reported this behavior first",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2550",
    "state": "open",
    "labels": [
      "question",
      "P2"
    ],
    "created_at": "2024-03-05T22:22:24Z",
    "updated_at": "2024-05-24T20:59:36Z",
    "user": "mariosasko"
  },
  {
    "repo": "pytorch/serve",
    "number": 3001,
    "title": "Clean up metrics documentation",
    "body": "### \ud83d\udcda The doc issue\n\nMetrics documentation has a lot of information and information is spread across different subsections finding it difficult to know whats the right way to use metrics\n\n### Suggest a potential alternative/fix\n\nFor older versions of TorchServe, one can always go to the tag and check the Readme.\r\n\r\nClean up the README to show only what is relevant now ",
    "url": "https://github.com/pytorch/serve/issues/3001",
    "state": "closed",
    "labels": [
      "documentation",
      "internal"
    ],
    "created_at": "2024-03-05T20:49:32Z",
    "updated_at": "2024-04-26T21:32:45Z",
    "comments": 0,
    "user": "agunapal"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6719,
    "title": "Is there any way to solve hanging of IterableDataset using split by node + filtering during inference",
    "body": "### Describe the bug\n\nI am using an iterable dataset in a multi-node setup, trying to do training/inference while filtering the data on the fly. I usually do not use `split_dataset_by_node` but it is very slow using the IterableDatasetShard in `accelerate` and `transformers`. When I filter after applying `split_dataset_by_node`, it results in shards that are not equal sizes due to unequal samples filtered from each one. \r\n\r\nThe distributed process hangs when trying to accomplish this. Is there any way to resolve this or is it impossible to implement?\r\n\r\n\n\n### Steps to reproduce the bug\n\nHere is a toy example of what I am trying to do that reproduces the behavior\r\n\r\n```\r\n# torchrun --nproc-per-node 2 file.py\r\n\r\n\r\nimport os\r\n\r\nimport pandas as pd\r\nimport torch\r\nfrom accelerate import Accelerator\r\nfrom datasets import Features, Value, load_dataset\r\nfrom datasets.distributed import split_dataset_by_node\r\nfrom torch.utils.data import DataLoader\r\n\r\naccelerator = Accelerator(device_placement=True, dispatch_batches=False)\r\nif accelerator.is_main_process:\r\n    if not os.path.exists(\"scratch_data\"):\r\n        os.mkdir(\"scratch_data\")\r\n\r\n    n_shards = 4\r\n    for i in range(n_shards):\r\n        df = pd.DataFrame({\"id\": list(range(10 * i, 10 * (i + 1)))})\r\n        df.to_parquet(f\"scratch_data/shard_{i}.parquet\")\r\n\r\n\r\nworld_size = accelerator.num_processes\r\nlocal_rank = accelerator.process_index\r\n\r\n\r\ndef collate_fn(examples):\r\n    input_ids = []\r\n    for example in examples:\r\n        input_ids.append(example[\"id\"])\r\n    return torch.LongTensor(input_ids)\r\n\r\n\r\ndataset = load_dataset(\r\n    \"parquet\", data_dir=\"scratch_data\", split=\"train\", streaming=True\r\n)\r\ndataset = (\r\n    split_dataset_by_node(dataset, rank=local_rank, world_size=world_size)\r\n    .filter(lambda x: x[\"id\"] < 35)\r\n    .shuffle(seed=42, buffer_size=100)\r\n)\r\n\r\nbatch_size = 2\r\ntrain_dataloader = DataLoader(\r\n    dataset,\r\n    batch_size=batch_size,\r\n    collate_fn=collate_fn,\r\n    num_workers=2\r\n)  \r\n\r\nfor x in train_dataloader:\r\n    x = x.to(accelerator.device)\r\n    print({\"rank\": local_rank, \"id\": x})\r\n   \r\n    y = accelerator.gather_for_metrics(x)\r\n    if accelerator.is_main_process:\r\n        print(\"gathered\", y)\r\n\r\n\r\n```\n\n### Expected behavior\n\nIs there any way to continue training/inference on the GPUs that have remaining data left without waiting for the others? Is it impossible to filter when \n\n### Environment info\n\n- `datasets` version: 2.18.0\r\n- Platform: Linux-5.10.209-198.812.amzn2.x86_64-x86_64-with-glibc2.31\r\n- Python version: 3.10.13\r\n- `huggingface_hub` version: 0.21.3\r\n- PyArrow version: 15.0.0\r\n- Pandas version: 2.2.1\r\n- `fsspec` version: 2023.6.0",
    "url": "https://github.com/huggingface/datasets/issues/6719",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-05T15:55:13Z",
    "updated_at": "2024-03-05T15:55:13Z",
    "comments": 0,
    "user": "ssharpe42"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 899,
    "title": "Bug--Llama-2-70b-chat-hf error: `truncate` must be strictly positive and less than 1024. Given: 3072",
    "body": "I use the docker image chat-ui-db as the frontend, text-generation-inference as the inference backend, and meta-llamaLlama-2-70b-chat-hf as the model.\r\nIn the model field of the .env.local file, I have the following settings\r\n```\r\nMODELS=`[\r\n     {\r\n      \"name\": \"meta-llama/Llama-2-70b-chat-hf\",\r\n      \"endpoints\": [{\r\n        \"type\" : \"tgi\",\r\n        \"url\": \"http://textgen:80\",\r\n        }],\r\n      \"preprompt\": \" \",\r\n      \"chatPromptTemplate\" : \"<s>[INST] <<SYS>>\\n{{preprompt}}\\n<</SYS>>\\n\\n{{#each messages}}{{#ifUser}}{{content}} [/INST] {{/ifUser}}{{#ifAssistant}}{{content}} </s><s>[INST] {{/ifAssistant}}{{/each}}\",\r\n      \"promptExamples\": [\r\n        {\r\n          \"title\": \"Write an email from bullet list\",\r\n          \"prompt\": \"As a restaurant owner, write a professional email to the supplier to get these products every week: \\n\\n- Wine (x10)\\n- Eggs (x24)\\n- Bread (x12)\"\r\n        }, {\r\n          \"title\": \"Code a snake game\",\r\n          \"prompt\": \"Code a basic snake game in python, give explanations for each step.\"\r\n        }, {\r\n          \"title\": \"Assist in a task\",\r\n          \"prompt\": \"How do I make a delicious lemon cheesecake?\"\r\n        }\r\n      ],\r\n      \"parameters\": {\r\n        \"temperature\": 0.1,\r\n        \"top_p\": 0.95,\r\n        \"repetition_penalty\": 1.2,\r\n        \"top_k\": 50,\r\n        \"truncate\": 3072,\r\n        \"max_new_tokens\": 1024,\r\n        \"stop\" : [\"</s>\", \"</s><s>[INST]\"]\r\n      }\r\n    }\r\n]`\r\n```\r\nThis setting is the same as the setting for Llama-2-70b-chat-hf in the .env.template file in the chat-ui repository.\r\nThen I type the question in the input box. An error has occurred.\r\nThe following error information is found in the log:\r\n```\r\ntextgen  | 2024-03-05T20:00:38.883413Z ERROR compat_generate{default_return_full_text=false compute_type=Extension(ComputeType(\"8-nvidia-a100-sxm4-40gb\"))}:generate_stream{parameters=GenerateParameters { best_of: None, temperature: Some(0.1), repetition_penalty: Some(1.2), frequency_penalty: None, top_k: Some(50), top_p: Some(0.95), typical_p: None, do_sample: false, max_new_tokens: Some(1024), return_full_text: Some(false), stop: [\"</s>\", \"</s><s>[INST]\"], truncate: Some(3072), watermark: false, details: false, decoder_input_details: false, seed: None, top_n_tokens: None, grammar: None }}:async_stream:generate_stream: text_generation_router::infer: router/src/infer.rs:123: `truncate` must be strictly positive and less than 1024. Given: 3072\r\nchat-ui  | Error: Input validation error: `truncate` must be strictly positive and less than 1024. Given: 3072\r\nchat-ui  |     at streamingRequest (file:///app/node_modules/@huggingface/inference/dist/index.mjs:323:19)\r\nchat-ui  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\nchat-ui  |     at async textGenerationStream (file:///app/node_modules/@huggingface/inference/dist/index.mjs:673:3)\r\nchat-ui  |     at async generateFromDefaultEndpoint (file:///app/.svelte-kit/output/server/entries/endpoints/conversation/_id_/_server.ts.js:39:20)\r\nchat-ui  |     at async summarize (file:///app/.svelte-kit/output/server/entries/endpoints/conversation/_id_/_server.ts.js:287:10)\r\nchat-ui  |     at async file:///app/.svelte-kit/output/server/entries/endpoints/conversation/_id_/_server.ts.js:607:26\r\ntextgen  | 2024-03-05T20:00:38.910266Z ERROR compat_generate{default_return_full_text=false compute_type=Extension(ComputeType(\"8-nvidia-a100-sxm4-40gb\"))}:generate_stream{parameters=GenerateParameters { best_of: None, temperature: Some(0.1), repetition_penalty: Some(1.2), frequency_penalty: None, top_k: Some(50), top_p: Some(0.95), typical_p: None, do_sample: false, max_new_tokens: Some(1024), return_full_text: Some(false), stop: [\"</s>\", \"</s><s>[INST]\"], truncate: Some(3072), watermark: false, details: false, decoder_input_details: false, seed: None, top_n_tokens: None, grammar: None }}:async_stream:generate_stream: text_generation_router::infer: router/src/infer.rs:123: `truncate` must be strictly positive and less than 1024. Given: 3072\r\n```\r\nI set \"truncate\" to 1000, everything is ok.\r\n**\"truncate\" for Llama-2-70b-chat-hf in the .env.template file in the chat-ui repository is 3072. I think the 3072 should work fine. I don't know how webpage https://huggingface.co/chat/ sets this parameter.**\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/899",
    "state": "open",
    "labels": [
      "support",
      "models"
    ],
    "created_at": "2024-03-05T12:27:45Z",
    "updated_at": "2024-03-06T00:59:10Z",
    "comments": 4,
    "user": "majestichou"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1468,
    "title": "How to convert tokenizers.tokenizer to XXTokenizerFast in transformers?",
    "body": "### Motivation\r\nI followed the guide [build-a-tokenizer-from-scratch](https://huggingface.co/docs/tokenizers/quicktour#build-a-tokenizer-from-scratch)  and got a single tokenizer.json from my corpus. Since I'm not sure  if it is compatible with the trainer, I want to convert it back to XXTokenizerFast in transformers.\r\n### Observation\r\nIn [llama2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf/tree/main), tokenizer file seems consist of \r\n[tokenizer.json](https://huggingface.co/meta-llama/Llama-2-7b-hf/blob/main/tokenizer.json) \u2705 I have \r\n[tokenizer.model](https://huggingface.co/meta-llama/Llama-2-7b-hf/blob/main/tokenizer.model) \u2716 I don't have, not sure its usage\r\n[tokenizer_config.json](https://huggingface.co/meta-llama/Llama-2-7b-hf/blob/main/tokenizer_config.json) \u2716  I don't have, but this looks like not that important. I can manually set this.\r\nInitialize a LlamaTokenizerFast from scratch through \\_\\_init\\_\\_ function seems to require tokenizer.model and tokenizer.json, but I don't get a tokenizer.model.\r\n```\r\ndef __init__(\r\n        self,\r\n        vocab_file=None,\r\n        tokenizer_file=None,\r\n        clean_up_tokenization_spaces=False,\r\n        unk_token=\"<unk>\",\r\n        bos_token=\"<s>\",\r\n        eos_token=\"</s>\",\r\n        add_bos_token=True,\r\n        add_eos_token=False,\r\n        use_default_system_prompt=False,\r\n        add_prefix_space=None,\r\n        **kwargs,\r\n    ):\r\n```\r\nAfter dive deeper in [transformers.PreTrainedTokenizerFast._save_pretrained](https://github.com/huggingface/transformers/blob/4fc708f98c9c8d5cb48e8a2639e3f7a21c65802f/src/transformers/tokenization_utils_fast.py#L678), I found a code snippet in which fastTokenizer in transformers seems save tokenizer.json only without tokenizer.model\r\n```\r\nif save_fast:\r\n            tokenizer_file = os.path.join(\r\n                save_directory, (filename_prefix + \"-\" if filename_prefix else \"\") + TOKENIZER_FILE\r\n            )\r\n            self.backend_tokenizer.save(tokenizer_file)\r\n            file_names = file_names + (tokenizer_file,)\r\n```\r\n### Trial\r\nSo I just typically use xxTokenizerFast.from_pretrained('dir_contained_my_tokenizer.json'), and it works with default config, I can modified it manually and save_pretrained to get tokenizer_config.json\r\n### Query\r\nI still have some query needed help.\r\n1. What's the role of tokenizer.model? Is it a subset of tokenizer.json ?\r\n2. Is my conversion method correct ? or is there any better method?",
    "url": "https://github.com/huggingface/tokenizers/issues/1468",
    "state": "closed",
    "labels": [
      "Stale",
      "planned"
    ],
    "created_at": "2024-03-05T06:32:27Z",
    "updated_at": "2024-07-21T01:57:17Z",
    "user": "rangehow"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 121203,
    "title": "How to clear GPU memory  without restarting kernel when using a PyTorch model",
    "body": "## Issue description\r\nI am currently using pytorch's model on my windows computer, using python scripts running on vscode. \r\nI want to be able to load and release the model repeatedly in a resident process, where releasing the model requires fully freeing the memory of the currently used GPU, including freeing the cache and cuda context.\r\n\r\nI have now tried to use del xxx, torch.cuda.empty_cache(), but this can only free up the amount of cache memory occupied by models and variables, in fact, there is still cuda context not free, so I also tried to use numba.cuda, pycuda.driver and other third-party libraries to free this part of the memory, the results show that this is effective, it can clean up the GPU memory to a clean state, but when I re-initialize the same model in the process, there is an error, so it seems that the process of freeing the cuda context is irreversible for pytorch. \r\n\r\nNow to fully free the GPU's memory, I can only shut down the current process, which is not what I want. I would like to know what pytorch does to the cuda context when initializing the model, and if there are other ways to meet my requirements?\r\n\r\n## Code example\r\n\r\n## System Info\r\n- PyTorch or Caffe2: PyTorch\r\n- How you installed PyTorch (conda, pip, source): pip\r\n- Build command you used (if compiling from source): pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu117\r\n- OS: Windows 10\r\n- PyTorch version:2.0.1\r\n- Python version:3.8.18\r\n- CUDA/cuDNN version:11.7/8.4\r\n- GPU models and configuration:\r\n- GCC version (if compiling from source):\r\n- CMake version:\r\n- Versions of any other relevant libraries:\r\n\n\ncc @ptrblck",
    "url": "https://github.com/pytorch/pytorch/issues/121203",
    "state": "open",
    "labels": [
      "module: cuda",
      "triaged"
    ],
    "created_at": "2024-03-05T05:58:49Z",
    "updated_at": "2024-03-06T15:21:20Z",
    "user": "Doctor-Damu"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 71,
    "title": "How to support VR?",
    "body": "It's great to be able to use vr on a vr device.",
    "url": "https://github.com/huggingface/gsplat.js/issues/71",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-05T05:03:17Z",
    "updated_at": "2024-03-05T07:55:53Z",
    "user": "did66"
  },
  {
    "repo": "huggingface/tgi-gaudi",
    "number": 95,
    "title": "How to use FP8 feature in TGI-gaudi",
    "body": "### System Info\n\nThe FP8 quantization feature has been incorporated into the TGI-Gaudi branch. However, guidance is needed on how to utilize this feature. The process involves running the FP8 quantization through Measurement Mode and Quantization Mode. How to enable FP8 using the TGI 'docker run' command? Could you kindly provide a step-by-step guide on utilizing this feature?\"\n\n### Information\n\n- [ ] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [ ] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\nRun the FP8 quantization feature using \"docker run\" command.\n\n### Expected behavior\n\nA clear guide can be provided to use the FP8 quantization feature.",
    "url": "https://github.com/huggingface/tgi-gaudi/issues/95",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-05T02:50:08Z",
    "updated_at": "2024-05-06T09:03:15Z",
    "user": "lvliang-intel"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2521,
    "title": "how to set `num_processes` in multi-node training",
    "body": "Is it the total num of gpus or the number of gpus on a single node?\r\nI have seen contradictory signals in the code.\r\n\r\nhttps://github.com/huggingface/accelerate/blob/ee004674b9560976688e1a701b6d3650a09b2100/docs/source/usage_guides/ipex.md?plain=1#L139 https://github.com/huggingface/accelerate/blob/ee004674b9560976688e1a701b6d3650a09b2100/src/accelerate/state.py#L154\r\n here, it seems like the total number of gpus.\r\n\r\nhttps://github.com/huggingface/accelerate/blob/ee004674b9560976688e1a701b6d3650a09b2100/examples/slurm/submit_multigpu.sh#L27\r\nhere, it sees like the number of gpus per node.",
    "url": "https://github.com/huggingface/accelerate/issues/2521",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-04T13:03:57Z",
    "updated_at": "2025-12-22T01:53:32Z",
    "user": "lxww302"
  },
  {
    "repo": "huggingface/distil-whisper",
    "number": 95,
    "title": "How to use distil-whisper-large-v3-de-kd model from HF?",
    "body": "Officially, multi-language support is still not implemented in distil-whisper.\r\n\r\nBut I noticed, that the esteemed @sanchit-gandhi uploaded a German model for distil-whisper to HuggingFace, called 'distil-whisper-large-v3-de-kd'\r\n\r\nHow can I use this specific model for transcribing something? ",
    "url": "https://github.com/huggingface/distil-whisper/issues/95",
    "state": "open",
    "labels": [],
    "created_at": "2024-03-04T12:01:13Z",
    "updated_at": "2024-04-02T09:40:46Z",
    "user": "Arche151"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 623,
    "title": "Converted QA model answers in lower case, original model does not. What am I doing wrong?",
    "body": "### Question\n\nI have converted [deutsche-telekom/electra-base-de-squad2](https://huggingface.co/deutsche-telekom/electra-base-de-squad2) to ONNX using ```python -m scripts.convert --quantize --model_id deutsche-telekom/electra-base-de-squad2```. The ONNX model, used with the same code, yields returns in lower case, whereas the original model returns the answer respecting case sensitivity. I noticed that the ```tokenizer_config.json\" in the original model contains ```\"do_lower_case\": false```. But even setting this to ```true``` before converting does not work. What am I dpoing wrong?\r\n\r\nCode is straight forward:\r\n\r\n```javascript\r\nimport { pipeline } from '@xenova/transformers';\r\nconst pipe = await pipeline('question-answering', 'conventic/electra-base-de-squad2-onnx');\r\nconst context = \"<context here, cased>\";\r\nconst question = \"<question here, cased>\";\r\nconst out = await pipe(question, context);\r\nconsole.log(out);\r\n\u00b4\u00b4\u00b4",
    "url": "https://github.com/huggingface/transformers.js/issues/623",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-04T11:56:44Z",
    "updated_at": "2024-03-04T11:56:44Z",
    "user": "MarceloEmmerich"
  },
  {
    "repo": "pytorch/kineto",
    "number": 885,
    "title": "How to add customized metadata with on demand profiling ? ",
    "body": "When profiling with `torch.profiler.profile` ,  generated json file has a section called `distributedInfo` shown as below\r\n```json\r\n{\r\n  \"distributedInfo\": {\"backend\": \"nccl\", \"rank\": 0, \"world_size\": 2}\r\n}\r\n```\r\nBut there's no such section in generated file when on-demand profiling is triggered.  As a result, Holistic Trace Analysis cannot be used to analysis those files. \r\nIs this by design or there's something to do to make those file generated by `kineto` have `distributedInfo` as well? Hoping some one can help. Thanks. \r\n\r\n\r\n",
    "url": "https://github.com/pytorch/kineto/issues/885",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-03-04T09:41:04Z",
    "updated_at": "2024-07-08T21:53:03Z",
    "user": "staugust"
  },
  {
    "repo": "pytorch/executorch",
    "number": 2226,
    "title": "How do you get executorch to run within Mbed OS?",
    "body": "Hi guys,\r\nWe serialized a PyTorch module to a .pte file for Cortex-M architecture by doing this example:\r\nhttps://pytorch.org/executorch/stable/executorch-arm-delegate-tutorial.html). Additionally, we have a P-Nucleo-WB55 development platform. We want to run the module on the development platform using Mbed OS. How do we get the following \"torch::executor\"-namespace accessible in Mbed OS before we build the binaries that we flash later on the P-Nucleo-WB55? Following is an example of how we would like to do it in Mbed OS:\r\n ```\r\n using namespace torch::executor;\r\n Result<util::FileDataLoader> loader =\r\n       util::FileDataLoader::from(\"/tmp/model.pte\");\r\n assert(loader.ok());\r\n\r\n Result<Program> program =\r\n     torch::executor::Program::load(loader.get());\r\n assert(program.ok());\r\n ```\r\nOr is there a better way of integrating the executorch runtime into Mbed OS, or how would you accomplish this task (getting executorch running in Mbed OS on Cortex-M)?\r\nCheers,\r\nChristoph",
    "url": "https://github.com/pytorch/executorch/issues/2226",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-04T08:52:58Z",
    "updated_at": "2024-05-16T11:07:20Z",
    "user": "ChristophKarlHeck"
  },
  {
    "repo": "pytorch/test-infra",
    "number": 4980,
    "title": "Provide the range of commits where a disabled test is effectively disabled",
    "body": "In the current implementation, disabling a test or enabling it (via a GitHub issues) take effect globally across all trunk and PR jobs.  The good thing about this approach is that disabling a test is trivial.  However, enabling them is still a tricky business.  A common scenario is that a forward fix will address the issue and close it, but it will cause the test to fail on PRs everywhere unless people do a rebase to pull in the fix.  We see this happening many times like the recent https://github.com/pytorch/pytorch/issues/114831, which is directly responsible for a large spike of force merges.\r\n\r\nAfter chatting with @clee2000 on the topic, there are several potential ideas for this:\r\n\r\n* We can provide the range of commits where a disabled test is effectively disabled.  If the base commit of a PR is within the range, the test will still be disabled even if the issue has been closed.  This seems like the best option.\r\n* At a coarse grain, we might be able to version the entire disabled tests JSON file.  For example, a PR that has an older base commit will use an older version of the JSON file with the test still disabled\r\n\r\nThe same solution could also be applied to slow tests.\r\n\r\ncc @clee2000 ",
    "url": "https://github.com/pytorch/test-infra/issues/4980",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-03-02T06:58:40Z",
    "updated_at": "2024-03-02T06:58:40Z",
    "user": "huydhn"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 618,
    "title": "How do I convert a DistilBERT Model to Quantized ONNX -",
    "body": "### Question\n\nNote, https://huggingface.co/docs/transformers.js/en/index#convert-your-models-to-onnx is a broken link.\r\n\r\nI have a simple DistilBERT model I'm trying to load with the examples/next-server (wdavies/public-question-in-text)\r\n\r\nI tried the simplest version of converting to ONNX  (wdavies/public-onnx-test following https://huggingface.co/docs/transformers/en/serialization#exporting-a--transformers-model-to-onnx-with-optimumonnxruntime), but I'm still getting an error message saying its looking for quantized_onnx. \r\n\r\nAccording to all I can see, including this blog post, you seem to have choose a specific hardware architecture? Is this true? How will I know what the client browser (or even mine) is running on? Help? I just want to run this simple model in example/next-server ?\r\n\r\nhttps://huggingface.co/blog/optimum-inference#34-use-the-ortquantizer-to-apply-dynamic-quantization \r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/618",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-01T16:55:16Z",
    "updated_at": "2024-03-02T00:47:40Z",
    "user": "davies-w"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2521,
    "title": "Is the implementation of `MultipleNegativesRankingLoss` right?",
    "body": "It is confusing why the labels are `range(len(scores))`.\r\n```python\r\nclass MultipleNegativesRankingLoss(nn.Module):\r\n    def __init__(self, model: SentenceTransformer, scale: float = 20.0, similarity_fct=util.cos_sim):\r\n        super(MultipleNegativesRankingLoss, self).__init__()\r\n        self.model = model\r\n        self.scale = scale\r\n        self.similarity_fct = similarity_fct\r\n        self.cross_entropy_loss = nn.CrossEntropyLoss()\r\n\r\n    def forward(self, sentence_features: Iterable[Dict[str, Tensor]], labels: Tensor):\r\n        reps = [self.model(sentence_feature)[\"sentence_embedding\"] for sentence_feature in sentence_features]\r\n        embeddings_a = reps[0]\r\n        embeddings_b = torch.cat(reps[1:])\r\n\r\n        scores = self.similarity_fct(embeddings_a, embeddings_b) * self.scale\r\n        labels = torch.tensor(\r\n            range(len(scores)), dtype=torch.long, device=scores.device\r\n        )  # Example a[i] should match with b[i]\r\n        return self.cross_entropy_loss(scores, labels)\r\n\r\n    def get_config_dict(self):\r\n        return {\"scale\": self.scale, \"similarity_fct\": self.similarity_fct.__name__}\r\n```",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2521",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-03-01T10:13:35Z",
    "updated_at": "2024-03-04T07:01:12Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/text-embeddings-inference",
    "number": 178,
    "title": "How to specify a local model",
    "body": "### Feature request\n\nmodel=BAAI/bge-reranker-large\r\nvolume=$PWD/data\r\ndocker run -p 8080:80 -v $volume:/data --pull always ghcr.io/huggingface/text-embeddings-inference:cpu-1.0 --model-id $model\n\n### Motivation\n\nmodel=BAAI/bge-reranker-large\r\nvolume=$PWD/data\r\ndocker run -p 8080:80 -v $volume:/data --pull always ghcr.io/huggingface/text-embeddings-inference:cpu-1.0 --model-id $model\n\n### Your contribution\n\nnull",
    "url": "https://github.com/huggingface/text-embeddings-inference/issues/178",
    "state": "closed",
    "labels": [],
    "created_at": "2024-03-01T09:40:07Z",
    "updated_at": "2024-03-01T16:54:27Z",
    "user": "yuanjie-ai"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 889,
    "title": "How does huggingchat prompt the model to generate HTML output?",
    "body": "How does Huggingchat prompt the LLM to generate HTML output? Where can I find that prompt? I'd like to tweak it. thanks!",
    "url": "https://github.com/huggingface/chat-ui/issues/889",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-29T17:20:01Z",
    "updated_at": "2024-03-05T18:45:56Z",
    "user": "vgoklani"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 888,
    "title": "Code LLAMA doesn't work",
    "body": "I am simply entering this prompt:\r\n\r\n```\r\nYou're given the following regex in python: \\| *([^|]+?) *\\|\r\n\r\nThis captures text values in markdown tables but fails to capture numbers. Update this regex to capture numbers as well\r\n```\r\n\r\nThen what happens is that my 1 core of CPU is used 100% for at least for 5 mins until I close the browser. Not sure what is going on?\r\n\r\nSame prompt works when I use the Mistral 8 X 7B",
    "url": "https://github.com/huggingface/chat-ui/issues/888",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-29T12:44:20Z",
    "updated_at": "2025-01-01T11:54:48Z",
    "comments": 1,
    "user": "lordsoffallen"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1615,
    "title": "How to use the grammar support feature?",
    "body": "### Feature request\n\n![image](https://github.com/huggingface/text-generation-inference/assets/126798556/74279ba2-3df8-4abd-8b7b-5459a5f209ec)\r\n\r\nCan you please clarify how we can use this? what is it for?\n\n### Motivation\n\n![image](https://github.com/huggingface/text-generation-inference/assets/126798556/74279ba2-3df8-4abd-8b7b-5459a5f209ec)\r\n\r\nCan you please clarify how we can use this? what is it for?\n\n### Your contribution\n\n![image](https://github.com/huggingface/text-generation-inference/assets/126798556/74279ba2-3df8-4abd-8b7b-5459a5f209ec)\r\n\r\nCan you please clarify how we can use this? what is it for?",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1615",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-29T12:35:24Z",
    "updated_at": "2024-03-04T14:49:39Z",
    "user": "Stealthwriter"
  },
  {
    "repo": "pytorch/torchx",
    "number": 834,
    "title": "HuggingFace accelerate component",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\nHuggingFace accelerate is used for some OSS models. It would be great to have support for it as a component in addition to dist.ddp.\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\n\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/834",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-28T18:33:38Z",
    "updated_at": "2024-02-28T18:33:38Z",
    "comments": 0,
    "user": "d4l3k"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6700,
    "title": "remove_columns is not in-place but the doc shows it is in-place",
    "body": "### Describe the bug\r\n\r\nThe doc of `datasets` v2.17.0/v2.17.1 shows that `remove_columns` is in-place. [link](https://huggingface.co/docs/datasets/v2.17.1/en/package_reference/main_classes#datasets.DatasetDict.remove_columns)\r\n\r\nIn the text classification example of transformers v4.38.1, the columns are not removed.\r\nhttps://github.com/huggingface/transformers/blob/a0857740c0e6127485c11476650314df3accc2b6/examples/pytorch/text-classification/run_classification.py#L421\r\n\r\n### Steps to reproduce the bug\r\n\r\nhttps://github.com/huggingface/transformers/blob/a0857740c0e6127485c11476650314df3accc2b6/examples/pytorch/text-classification/run_classification.py#L421\r\n\r\n### Expected behavior\r\n\r\nActually remove the columns.\r\n\r\n### Environment info\r\n\r\n1. datasets v2.17.0\r\n2. transformers v4.38.1",
    "url": "https://github.com/huggingface/datasets/issues/6700",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-28T12:36:22Z",
    "updated_at": "2024-04-02T17:15:28Z",
    "comments": 3,
    "user": "shelfofclub"
  },
  {
    "repo": "pytorch/serve",
    "number": 2978,
    "title": "Broken example for a custom Counter metrics",
    "body": "### \ud83d\udcda The doc issue\n\nThe example in the section [Add Counter based metrics](https://github.com/pytorch/serve/blob/18d56ff56e05de48af0dfabe0019f437f332a868/docs/metrics.md#add-counter-based-metrics) shows how to add custom Counter metric:\r\n```\r\n# Create a counter with name 'LoopCount' and dimensions, initial value\r\nmetrics.add_counter('LoopCount', 1, None, dimensions)\r\n\r\n# Increment counter by 2 \r\nmetrics.add_counter('LoopCount', 2 , None, dimensions)\r\n\r\n# Decrement counter by 1\r\nmetrics.add_counter('LoopCount', -1, None, dimensions)\r\n```\r\n\r\nI tried to copy this example to my custom handler:\r\n```\r\ndims = [Dimension('ModelName', 'doc_model')]\r\nself.metrics.add_counter('LoopCount', 1, None, dimensions=dims)\r\n# Increment counter by 2 \r\nself.metrics.add_counter('LoopCount', 2 , None, dimensions=dims)\r\n# Decrement counter by 1\r\nself.metrics.add_counter('LoopCount', -1, None, dimensions=dims)\r\n```\r\n\r\nWhen I call API for inference I got an error in the terminal:\r\n```\r\n2024-02-28T15:23:57,011 [ERROR] W-9000-doc_model_1.0-stdout org.pytorch.serve.wlm.WorkerLifeCycle - Failed to parse metrics line: \"[METRICS]Failed to update metric with name:LoopCount and dimensions: ModelName:doc_model,Level:Model with value: -1: Counter metric update value cannot be negative\".\r\n```\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2978",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2024-02-28T12:26:30Z",
    "updated_at": "2024-03-20T21:56:12Z",
    "comments": 3,
    "user": "feeeper"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2665,
    "title": "\u2753 [Question] operator being decomposed rather than being converted when a corresponding converter exists?",
    "body": "## \u2753 Question\r\n\r\nFrom the debug log below, it seems that the `aten.grid_sampler_2d` operator gets decomposed into several lower-level operators. But isn't there a corresponding [converter](https://github.com/pytorch/TensorRT/blob/9a100b6414bee175040bcaa275ecb71df54836e4/py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py#L333-L358) which should be used?\r\n\r\n## What you have already tried\r\n\r\n```py\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport torch_tensorrt\r\n\r\n\r\nclass MyModule(nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n        \r\n    def forward(self, input, grid):\r\n        return F.grid_sample(input, grid, mode=\"bilinear\", padding_mode=\"border\", align_corners=True)\r\n    \r\nmodel = MyModule().eval().cuda()\r\n\r\ninputs = [\r\n    torch.randn((1, 3, 8, 8), dtype=torch.float, device=\"cuda\"),\r\n    torch.randn((1, 16, 16, 2), dtype=torch.float, device=\"cuda\")\r\n]\r\n\r\noptimized_model = torch_tensorrt.compile(\r\n    model,\r\n    ir=\"dynamo\",\r\n    inputs=inputs,\r\n    enabled_precisions={torch.float},\r\n    debug=True,\r\n    min_block_size=1,\r\n    truncate_long_and_double=True,\r\n    output_format=\"fx\",\r\n)\r\n```\r\n\r\n```\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_1 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_1 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_2 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_2 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_3 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_3 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_4 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_4 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_5 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_5 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_6 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_6 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_7 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_7 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.partitioning._global_partitioner:\r\nSupported Nodes:\r\n- torch.ops.aten.reshape.default + Operator Count: 13\r\n- torch.ops.aten.expand.default + Operator Count: 1\r\n- torch.ops.aten.select.int + Operator Count: 2\r\n- torch.ops.aten.mul.Tensor + Operator Count: 10\r\n- torch.ops.aten.add.Tensor + Operator Count: 7\r\n- torch.ops.aten.clamp.default + Operator Count: 2\r\n- torch.ops.aten.floor.default + Operator Count: 2\r\n- torch.ops.aten.sub.Tensor + Operator Count: 8\r\n- torch.ops.aten.ge.Scalar + Operator Count: 8\r\n- torch.ops.aten.lt.Scalar + Operator Count: 8\r\n- torch.ops.aten.logical_and.default + Operator Count: 12\r\n- torch.ops.aten.where.self + Operator Count: 12\r\n- torch.ops.aten.index.Tensor + Operator Count: 4\r\n\r\nDEBUG:torch_tensorrt.dynamo.partitioning._global_partitioner:\r\nUnsupported or Excluded Nodes:\r\n- torch.ops.aten._to_copy.default + Operator Count: 8\r\n\r\nDEBUG:torch_tensorrt.dynamo._compiler:Detected support for 89 operators out of 97 in subgraph.\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_1 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_1 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_2 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten_ops_converters:_to_copy converter rejected node _to_copy_2 with dtype torch.int64\r\nDEBUG:torch_tensorrt.dynamo.conversion.aten",
    "url": "https://github.com/pytorch/TensorRT/issues/2665",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-28T06:35:20Z",
    "updated_at": "2024-07-27T08:20:37Z",
    "user": "HolyWu"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1729,
    "title": "tflite support for gemma ",
    "body": "### Feature request\n\nAs per the title, is there plans to support gemma in tfilte \n\n### Motivation\n\nnecessary format for current work \n\n### Your contribution\n\nno ",
    "url": "https://github.com/huggingface/optimum/issues/1729",
    "state": "closed",
    "labels": [
      "feature-request",
      "tflite",
      "Stale"
    ],
    "created_at": "2024-02-27T17:15:54Z",
    "updated_at": "2025-01-19T02:04:34Z",
    "comments": 2,
    "user": "Kaya-P"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 2051,
    "title": "How edit cache dir and in bad net download how to redownload with last download point",
    "body": "OSError: Consistency check failed: file should be of size 1215993967 but has size 118991296 (pytorch_model.bin).\r\nWe are sorry for the inconvenience. Please retry download and pass `force_download=True, resume_download=False` as argument.\r\nIf the issue persists, please let us know by opening an issue on https://github.com/huggingface/huggingface_hub.\r\nDownloading pytorch_model.bin:  10%|\u2588\u2588\u2588\u2588\u258c                                         | 119M/1.22G [06:51<1:03:13, 289kB/s]\r\n\r\nHi , I use this in windows and space C: is not enouth space, I want to set download or install cache dir is in D: ,how to do this.\r\nAnd beacuse I have bad network so it is everytime error in one big file download, and how to download this file in a bad network.",
    "url": "https://github.com/huggingface/huggingface_hub/issues/2051",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-27T14:45:10Z",
    "updated_at": "2024-02-27T15:59:35Z",
    "user": "caihua"
  },
  {
    "repo": "huggingface/candle",
    "number": 1769,
    "title": "[Question] How to modify Mistral to enable multiple batches?",
    "body": "Hello everybody,\r\n\r\nI am attempting to implement multiple batches for the Mistral forward pass. However, the `forward` method takes an argument `seqlen_offset` which seems to be specific to the batch. I have attempted to implement it with a `position_ids` tensor in [this](https://github.com/EricLBuehler/mistral.rs/blob/mistralrunner/mistralrs-core/src/models/mistral.rs) file. \r\nSpecifically, I rewrote the rotary embedding function:\r\n```rust\r\nfn apply_rotary_emb_qkv(\r\n    &self,\r\n    q: &Tensor,\r\n    k: &Tensor,\r\n    position_ids: &Tensor,\r\n) -> Result<(Tensor, Tensor)> {\r\n    let cos = self.cos.i(position_ids)?;\r\n    let sin = self.sin.i(position_ids)?;\r\n\r\n    let q_embed = (q.broadcast_mul(&cos)? + rotate_half(q)?.broadcast_mul(&sin))?;\r\n    let k_embed = (k.broadcast_mul(&cos)? + rotate_half(k)?.broadcast_mul(&sin))?;\r\n    Ok((q_embed, k_embed))\r\n}\r\n```\r\nI create the position ids with the following line:\r\n```rust\r\nlet position_ids = Tensor::arange(\r\n    past_key_values_length as i64,\r\n    (past_key_values_length + seq_len) as i64,\r\n    input_ids.device(),\r\n)?;\r\n```\r\nWith `past_key_values_length` as the result of\r\n```rust\r\nfn calculate_past_kv_len(&self, seq_len: usize) -> Result<usize> {\r\n    let kv_cache_1 = &self.layers.first().as_ref().unwrap().self_attn.kv_cache;\r\n    if kv_cache_1.is_none() {\r\n        return Ok(0);\r\n    }\r\n    let k_cache_1 = &kv_cache_1.as_ref().unwrap().0;\r\n    if k_cache_1.dims()[0] <= seq_len {\r\n        Ok(0)\r\n    } else {\r\n        let indexed = k_cache_1.i(seq_len)?;\r\n        let dims = indexed.dims();\r\n        Ok(dims[dims.len() - 2])\r\n    }\r\n}\r\n```\r\nMy implementation attempts to follow the [transformers implementation of calculating position ids](https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_mistral.py#L977-L985) and for the [implementation of `apply_rotary_emb_qkv`](https://github.com/huggingface/transformers/blob/5c341d4555ba3e4b656053317e372ebed0c5af37/src/transformers/models/mistral/modeling_mistral.py#L139-L164). However, when I copy and run the candle-examples inference script, with the only change being that I do not pass the `seqlen_offset` variable, it does not produce coherent output. While the model runs, it does not \"work\".\r\n\r\nHow can I implement multiple-batch forward passes? Is there a way to do it using the `seqlen_offset` variable? Thank you for any help.",
    "url": "https://github.com/huggingface/candle/issues/1769",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-27T13:18:18Z",
    "updated_at": "2024-03-01T14:01:21Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 108,
    "title": "How to load a dataset with the output a tokenizer?",
    "body": "I planned to use datatrove to apply my tokenizer so that data is ready to use with nanotron.\r\nI am using DocumentTokenizer[Merger] which produces *.ds and *ds.index binary files, although, from what I understood, nanotron is expecting datasets (with \"input_ids\" keys).\r\nI see that things like ParquetWriter cannot be piped after DocumentTokenizer.\r\n\r\nAm I missing a piece?\r\nAre there some helpers to convert ds files into parquet files (or something loadable with datasets) for a given context size?",
    "url": "https://github.com/huggingface/datatrove/issues/108",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-27T08:58:09Z",
    "updated_at": "2024-05-07T12:33:47Z",
    "user": "Jeronymous"
  },
  {
    "repo": "pytorch/audio",
    "number": 3750,
    "title": "I have some questions about RNNT loss.",
    "body": "\r\nhello\r\nI would like to ask you a question that may be somewhat trivial.\r\nThe shape of logits of RNN T loss is Batch, max_seq_len, max_target_len+1, class.\r\nWhy is max_target_len+1 here?\r\nShouldn't the number of classes be +1 to the size of the total vocab? Because blank is included.\r\nI don't understand at all.\r\nIs there anyone who can help?\r\n\r\nhttps://pytorch.org/audio/main/generated/torchaudio.functional.rnnt_loss.html",
    "url": "https://github.com/pytorch/audio/issues/3750",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-26T11:39:39Z",
    "updated_at": "2024-02-26T13:09:30Z",
    "comments": 6,
    "user": "girlsending0"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 875,
    "title": "Difficulty configuring multiple instances of the same model with distinct parameters",
    "body": "I am currently self-deploying an application that requires setting up multiple instances of the same model, each configured with different parameters. For example:\r\n\r\n```\r\nMODELS=`[{\r\n      \"name\": \"gpt-4-0125-preview\",\r\n      \"displayName\": \"GPT 4\",\r\n      \"endpoints\" : [{\r\n        \"type\": \"openai\"\r\n      }]\r\n},\r\n{\r\n      \"name\": \"gpt-4-0125-preview\",\r\n      \"displayName\": \"GPT 4 temp 0\",\r\n      \"parameters\": {\r\n      \"temperature\": 0.0\r\n  },\r\n      \"endpoints\" : [{\r\n        \"type\": \"openai\"\r\n      }]\r\n}\r\n]`\r\n```\r\n\r\nThis results in a state which looks like that both models are active simultaneously. \r\n![image](https://github.com/huggingface/chat-ui/assets/99467346/0ed9d506-d413-45b5-b959-92e872875748)\r\n\r\nHowever, in practice, I cannot activate the second model (\"GPT 4 temp 0\"); only \"GPT 4\" is utilized during chat operations. It appears as if the system defaults to the first model instance and ignores subsequent ones with the same model name.\r\n\r\nI tried to distinguish between the models by modifying the `name` field and introducing an `id` field, using the appropriate model identifier. However, this approach resulted in a loss of model reference, indicating that these fields cannot be arbitrarily configured on the client side.\r\n\r\nIs there a recommended approach to deploying two instances of the same model with varying parameters? Any guidance or suggestions on how to achieve this would be greatly appreciated.\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/875",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-26T10:48:43Z",
    "updated_at": "2024-02-27T17:28:21Z",
    "comments": 1,
    "user": "mmtpo"
  },
  {
    "repo": "huggingface/optimum-nvidia",
    "number": 76,
    "title": "How to install optimum-nvidia properly without building a docker image",
    "body": "It's quite hard for me to build a docker image, so I started from a docker environment with TensorRT LLM 0.6.1 inside.\r\n\r\nI checked your dockerfile, followed the process, and built TensorRT LLM using (I am using 4090 so that cuda arch is 89):\r\n\r\n```\r\npython3 scripts/build_wheel.py -j --trt_root /usr/local/tensorrt --python_bindings --cuda_architectures=\"89-real\" --clean\r\n```\r\n\r\nAfterwards, I copied the resulting bindings*.so into tensorrt_llm's directory inside the dist-packages dir -- according to the dockerfile. Then I followed it to install nvidia-ammo 0.3, then added the optimum-nvidia dir to python path.\r\n\r\nI also went into optimum-nvidia directory, and ran `pip install -e .`, so that in my environment, when using `pip list | grep optimum` I could get:\r\n\r\n```\r\noptimum                        1.17.1\r\noptimum-nvidia                 0.1.0b2           /root/autodl-tmp/optimum-nvidia\r\n```\r\nHowever, I still could not import optimum.nvidia properly, while it's okay to `import tensorrt_llm` and `tensorrt_llm.bindings`.\r\n\r\n```\r\n>>> from optimum.nvidia.pipelines import pipeline\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nModuleNotFoundError: No module named 'optimum.nvidia'\r\n>>> \r\n```\r\n\r\nCould someone please help me on how to install optimum nvidia properly without building a new image or pulling from dockerhub?\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/optimum-nvidia/issues/76",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-26T05:05:24Z",
    "updated_at": "2024-03-11T13:36:18Z",
    "user": "Yuchen-Cao"
  },
  {
    "repo": "pytorch/examples",
    "number": 1235,
    "title": "Testing a C++ case with MPI failed. ",
    "body": "### \ud83d\udc1b Describe the bug\n\nI am testing the following example:\r\n\r\nhttps://github.com/pytorch/examples/blob/main/cpp/distributed/dist-mnist.cpp\r\n\r\nI get the following error:\r\n\r\n[ 50%] Building CXX object CMakeFiles/awcm.dir/xdist.cxx.o\r\n/home/alamj/TestCases/tests/xtorch/xdist/xdist.cxx:1:10: fatal error: c10d/ProcessGroupMPI.hpp: No such file or directory\r\n    1 | #include <c10d/ProcessGroupMPI.hpp>\r\n\r\nI changed the top line with full path to ensure that hpp file gets available\r\n#include </project/def-alamj/shared/libtorch/include/torch/csrc/distributed/c10d/ProcessGroupMPI.hpp>\r\n\r\nThe new error indicates something else I need to know, which is given in the tutorial.\r\n\r\n[ 50%] Building CXX object CMakeFiles/awcm.dir/xdist.cxx.o\r\n/home/alamj/TestCases/tests/xtorch/xdist/xdist.cxx:38:21: error: \u2018c10d\u2019 was not declared in this scope; did you mean \u2018c10\u2019?\r\n   38 |     std::shared_ptr<c10d::ProcessGroupMPI> pg,\r\n      |                     ^~~~\r\n      |                     c10\r\n\r\n\r\nPlease let me know how do I get a work around to fix this. \n\n### Error logs\n\n_No response_\n\n### Minified repro\n\n_No response_\n\n### Versions\n\nI think this field is not needed as I am running C++ code. \n\ncc @ezyang @msaroufim @bdhirsh @anijain2305 @zou3519",
    "url": "https://github.com/pytorch/examples/issues/1235",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-25T19:34:24Z",
    "updated_at": "2024-12-04T15:08:51Z",
    "comments": 1,
    "user": "alamj"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7088,
    "title": "Vague error: `ValueError: With local_files_only set to False, you must first locally save the tokenizer in the following path: 'openai/clip-vit-large-patch14'.` how to fix?",
    "body": "Trying to convert a .safetensors stable diffusion model to whatever the format is that hugging face requires. It throws a vague nonsequitur of an error:\r\n\r\n`pipe = diffusers.StableDiffusionPipeline.from_single_file(str(aPathlibPath/\"vodkaByFollowfoxAI_v40.safetensors\") )`\r\n\r\n```...\r\n   [1241](file:///C:/Users/openSourcerer9000/anaconda3/envs/fuze/lib/site-packages/diffusers/loaders/single_file_utils.py:1241)     )\r\n   [1242](file:///C:/Users/openSourcerer9000/anaconda3/envs/fuze/lib/site-packages/diffusers/loaders/single_file_utils.py:1242) else:\r\n   [1243](file:///C:/Users/openSourcerer9000/anaconda3/envs/fuze/lib/site-packages/diffusers/loaders/single_file_utils.py:1243)     return {\"text_encoder\": text_encoder, \"tokenizer\": tokenizer}\r\n\r\nValueError: With local_files_only set to False, you must first locally save the tokenizer in the following path: 'openai/clip-vit-large-patch14'.\r\n```\r\n\r\nWhat tokenizer? What path? Where would I get this file? This script already downloaded something locally, why not download this extra thing as well instead of throwing an error?\r\n\r\nWhen I pass local_files_only=True, it says the SAME thing:\r\n`ValueError: With local_files_only set to True, you must first locally save the tokenizer in the following path: 'openai/clip-vit-large-patch14'.`",
    "url": "https://github.com/huggingface/diffusers/issues/7088",
    "state": "closed",
    "labels": [
      "stale",
      "single_file"
    ],
    "created_at": "2024-02-25T15:03:07Z",
    "updated_at": "2024-09-17T21:56:26Z",
    "user": "openSourcerer9000"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7085,
    "title": "how to train controlnet with lora?",
    "body": "train full controlnet need much resource and time, so how to train controlnet with lora?\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/7085",
    "state": "closed",
    "labels": [
      "should-move-to-discussion"
    ],
    "created_at": "2024-02-25T06:31:47Z",
    "updated_at": "2024-03-03T06:38:35Z",
    "user": "akk-123"
  },
  {
    "repo": "huggingface/optimum-benchmark",
    "number": 138,
    "title": "How to set trt llm backend parameters",
    "body": "I am trying to run the trt_llama example: https://github.com/huggingface/optimum-benchmark/blob/main/examples/trt_llama.yaml\r\n\r\nIt seems optimem-benchmark will automatically transform the huggingface model to inference engine file then benchmarking its performance. When we use tensorrt llm, there is a model \"build\" process (during which we set some quantization parameters) in order to get the `.engine` file. How can we set these parameters when using optimum benchmark?",
    "url": "https://github.com/huggingface/optimum-benchmark/issues/138",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-24T17:12:12Z",
    "updated_at": "2024-02-27T12:48:44Z",
    "user": "Yuchen-Cao"
  },
  {
    "repo": "huggingface/optimum-nvidia",
    "number": 75,
    "title": "How to build this environment without docker?",
    "body": "My computer does not support the use of docker. How do I deploy this environment on my computer?",
    "url": "https://github.com/huggingface/optimum-nvidia/issues/75",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-24T16:59:37Z",
    "updated_at": "2024-03-06T13:45:18Z",
    "user": "lemon-little"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2485,
    "title": "How to log information into a local logging file?",
    "body": "### System Info\n\n```Shell\nHi, I want to save a copy of logs to a local file, how to achieve this? Specifically, I want accelerator.log also write information in my local file.\n```\n\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nHi, I want to save a copy of logs to a local file, how to achieve this? Specifically, I want accelerator.log also write information in my local file.\n\n### Expected behavior\n\nHi, I want to save a copy of logs to a local file, how to achieve this? Specifically, I want accelerator.log also write information in my local file.",
    "url": "https://github.com/huggingface/accelerate/issues/2485",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-24T07:52:55Z",
    "updated_at": "2024-04-03T15:06:24Z",
    "user": "Luciennnnnnn"
  },
  {
    "repo": "huggingface/optimum-benchmark",
    "number": 136,
    "title": "\uff08question\uff09When I use the memory tracking feature on the GPU, I find that my VRAM is reported as 0. Is this normal, and what might be causing it?",
    "body": "![1](https://github.com/huggingface/optimum-benchmark/assets/89191003/4c1adfad-007b-4ef4-99ff-a43fa0101c00)\r\n",
    "url": "https://github.com/huggingface/optimum-benchmark/issues/136",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-24T02:57:49Z",
    "updated_at": "2024-03-08T16:59:41Z",
    "user": "WCSY-YG"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1716,
    "title": "Optimum for Jetson Orin Nano",
    "body": "### System Info\n\n```shell\noptimum version: 1.17.1\r\nplatform: Jetson Orin Nano, Jetpack 6.0\r\nPython: 3.10.13\r\nCUDA: 12.2\n```\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\n\r\n Here is how I installed.\r\n1. install Pytorch 2.2.0 following https://elinux.org/Jetson_Zoo\r\n2. install onnxruntime-gpu 1.17.0 following following https://elinux.org/Jetson_Zoo\r\n3. install Optimum by using `pip install optimum[onnxruntime-gpu]`\n\n### Expected behavior\n\nThe Optimum installed on my Jetson Orin Nano not support GPU for Jetpack 6.0 and Python 3.10.13.\r\n\r\nCan anybody let me know how to install it?",
    "url": "https://github.com/huggingface/optimum/issues/1716",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-02-23T23:22:08Z",
    "updated_at": "2024-02-26T10:03:59Z",
    "comments": 1,
    "user": "JunyiYe"
  },
  {
    "repo": "huggingface/transformers",
    "number": 29244,
    "title": "Google Gemma don't know what 1+1 is equal to\uff1f",
    "body": "### System Info\r\n\r\n[v4.38.1](https://github.com/huggingface/transformers/releases/tag/v4.38.1)\r\n\r\n### Who can help?\r\n\r\n_No response_\r\n\r\n### Information\r\n\r\n- [X] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n```\r\n\r\nimport torch\r\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(\"./gemma_2B\")\r\nmodel = AutoModelForCausalLM.from_pretrained(\"./gemma_2B\", device_map=\"auto\", torch_dtype=torch.float32)\r\n\r\ninput_text = \"1+1=\uff1f\"\r\ninput_ids = tokenizer(input_text, return_tensors=\"pt\").to(\"cuda\")\r\n\r\noutputs = model.generate(**input_ids,max_length=50)\r\n# print(outputs)\r\nprint(tokenizer.decode(outputs[0]))\r\n\r\n\r\n```\r\n\r\n### Expected behavior\r\n\r\noutput is bellow\r\n\r\n```\r\n<bos>1+1=\uff1f\r\n\r\n1+1=\uff1f\r\n\r\n1+1=\uff1f\r\n\r\n1+1=\uff1f\r\n\r\n1+1=\uff1f\r\n\r\n1+1=\uff1f\r\n\r\n1+1=\uff1f\r\n\r\n1+1=\uff1f\r\n\r\n1\r\n```",
    "url": "https://github.com/huggingface/transformers/issues/29244",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-23T12:16:17Z",
    "updated_at": "2024-03-07T10:54:09Z",
    "user": "zhaoyun0071"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1713,
    "title": "Issue converting owlv2 model to ONNX format",
    "body": "Hi Team,\r\n\r\nI hope this message finds you well.\r\n\r\nI've been working with the owlv2 model and have encountered an issue while attempting to convert it into ONNX format using the provided command:\r\n`! optimum-cli export onnx -m google/owlv2-base-patch16 --task 'zero-shot-object-detection' --framework 'pt' owlv2_onnx`\r\n\r\nUnfortunately, I'm facing the following error:\r\n\r\n`ValueError: Trying to export a owlv2 model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`.`\r\n\r\nAs I am relatively new to this process, I'm unsure about the necessity and usage of custom ONNX configuration. Could you please provide some guidance on how to address this issue? Any assistance or insights would be greatly appreciated.\r\n\r\nThank you for your attention to this matter.",
    "url": "https://github.com/huggingface/optimum/issues/1713",
    "state": "closed",
    "labels": [
      "feature-request",
      "onnx",
      "exporters"
    ],
    "created_at": "2024-02-23T05:55:23Z",
    "updated_at": "2025-09-10T23:26:13Z",
    "comments": 6,
    "user": "n9s8a"
  },
  {
    "repo": "huggingface/optimum-benchmark",
    "number": 135,
    "title": "How to import and use the quantized model with AutoGPTQ\uff1f",
    "body": "",
    "url": "https://github.com/huggingface/optimum-benchmark/issues/135",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-23T03:13:28Z",
    "updated_at": "2024-02-23T05:03:06Z",
    "user": "jhrsya"
  },
  {
    "repo": "pytorch/serve",
    "number": 2962,
    "title": "Update documentation on deprecating mac x86 support",
    "body": "### \ud83d\udc1b Describe the bug\n\nPyTorch is deprecating support for x86 macs. TorchServe will also do the same.\n\n### Error logs\n\nN/A\n\n### Installation instructions\n\nN/A\n\n### Model Packaing\n\nN/A\n\n### config.properties\n\n_No response_\n\n### Versions\n\nN/A\n\n### Repro instructions\n\nN/A\n\n### Possible Solution\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2962",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-02-22T22:53:33Z",
    "updated_at": "2024-03-26T20:58:19Z",
    "comments": 0,
    "user": "agunapal"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1710,
    "title": "Native Support for Gemma",
    "body": "### System Info\n\n```shell\npython version : 3.10.12\r\noptimum version : built from github\r\nopenvino : 2024.1.0-14548-688c71ce0ed\r\ntransformers : 4.38.1\n```\n\n\n### Who can help?\n\n@JingyaHuang @echarlaix \n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nCurrently there is no support to export gemma, google's new opensource model. \r\n\r\nAfter connecting to huggingface and requesting permission to access the gemma repo\r\n\r\nrunning the following line \r\n`model_ov = OVModelForCausalLM.from_pretrained(\"google/gemma-2b\", export = True)`\r\n\r\nproduces the following error\r\n`\r\nValueError: Trying to export a gemma model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type gemma to be supported natively in the ONNX export.`\r\n\n\n### Expected behavior\n\nExpected behavior is for the line of code to successfully run and such that we can export the IR format of the model as well.",
    "url": "https://github.com/huggingface/optimum/issues/1710",
    "state": "closed",
    "labels": [
      "feature-request",
      "onnx",
      "exporters"
    ],
    "created_at": "2024-02-22T17:15:08Z",
    "updated_at": "2024-02-28T08:37:36Z",
    "comments": 5,
    "user": "Kaya-P"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2499,
    "title": "how can i save fine_tuned cross-encoder to HF and then download it from HF",
    "body": "I'm looking for ways to share fine-tuned cross-encoder with my teacher. \r\nCross encoder model does not have native push_to_hub() method. So i decided to use general approach:\r\n\r\n```\r\nfrom transformers import AutoModelForSequenceClassification\r\nimport torch\r\n\r\n# read from disk, model was saved as ft_model.save(\"model/crerankingeval-30e-4000-ms-marco-MiniLM-L-6-v2\")\r\ncross_ft_model = AutoModelForSequenceClassification.from_pretrained(\"model\\\\crerankingeval-30e-4000-ms-marco-MiniLM-L-6-v2\")\r\n# push to hub\r\ncross_ft_model.push_to_hub(\"satyroffrost/crerankingeval-30e-4000-ms-marco-MiniLM-L-6-v2\")\r\n```\r\n\r\nNow model is available on HF. Commit info was like:\r\nCommitInfo(commit_url='https://huggingface.co/satyroffrost/crerankingeval-30e-4000-ms-marco-MiniLM-L-6-v2/commit/d81fe317cb037940e09db256d8a0926e80c358e5', commit_message='Upload BertForSequenceClassification', commit_description='', oid='d81fe317cb037940e09db256d8a0926e80c358e5', pr_url=None, pr_revision=None, pr_num=None)\r\n\r\nthen i decided to ensure the model is workable:\r\n\r\n```\r\ncross_ft_model = CrossEncoder(\"satyroffrost/crerankingeval-30e-4000-ms-marco-MiniLM-L-6-v2\")\r\ncross_ft_model.predict([('SentenceTransformer is well-documented library','but saving crossencoder to HF is a bit tricky')])\r\n```\r\n\r\nand get the error:\r\n\r\n_Traceback (most recent call last):\r\n\r\n  Cell In[18], line 1\r\n    cross_ft_model = CrossEncoder(\"satyroffrost/crerankingeval-30e-4000-ms-marco-MiniLM-L-6-v2\")\r\n\r\n  File ~\\anaconda3\\Lib\\site-packages\\sentence_transformers\\cross_encoder\\CrossEncoder.py:72 in __init__\r\n    self.tokenizer = AutoTokenizer.from_pretrained(model_name, **tokenizer_args)\r\n\r\n  File ~\\anaconda3\\Lib\\site-packages\\transformers\\models\\auto\\tokenization_auto.py:745 in from_pretrained\r\n    return tokenizer_class_fast.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)\r\n\r\n  File ~\\anaconda3\\Lib\\site-packages\\transformers\\tokenization_utils_base.py:1838 in from_pretrained\r\n    raise EnvironmentError(\r\n\r\nOSError: Can't load tokenizer for 'satyroffrost/crerankingeval-30e-4000-ms-marco-MiniLM-L-6-v2'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'satyroffrost/crerankingeval-30e-4000-ms-marco-MiniLM-L-6-v2' is the correct path to a directory containing all relevant files for a BertTokenizerFast tokenizer._\r\n\r\n\r\nI compare local model folder and uploaded HF model files, last ones don't include tokenizer files. Uploaded model don't work on HF too. How can i correctly upload model with tokenizer to HF and the use it from HF like model = CrossEncoder(path_to_hf)?\r\n\r\n",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2499",
    "state": "closed",
    "labels": [
      "good first issue"
    ],
    "created_at": "2024-02-22T15:29:37Z",
    "updated_at": "2025-03-25T16:07:25Z",
    "user": "satyrmipt"
  },
  {
    "repo": "huggingface/transformers",
    "number": 29214,
    "title": "How to get input embeddings from PatchTST with (batch_size, sequence_length, hidden_size) dimensions",
    "body": "### System Info\n\n-\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nThe following snippet outputs the last hidden state but it has (batch_size, num_channels, num_patches, d_model) dimensions\r\n`inputs = encoder(\r\n            past_values=series_list, output_hidden_states=True\r\n        ).last_hidden_state`\r\n\r\nHere, series_list has (batch_size, sequence_length, num_input_channels) shape.\r\n\r\nTo incorporate this with [EncoderDecoderModel](https://huggingface.co/docs/transformers/v4.37.2/en/model_doc/encoder-decoder#transformers.EncoderDecoderModel), I want the dimensions of the input embedding to be (batch_size, sequence_length, hidden_size). How do you get that?\r\n\n\n### Expected behavior\n\n-",
    "url": "https://github.com/huggingface/transformers/issues/29214",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2024-02-22T14:17:10Z",
    "updated_at": "2024-03-25T03:56:58Z",
    "user": "nikhilajoshy"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2653,
    "title": "\u2753 [Question] Can torch_tensorRT be used in C++ with multiprocessing using fork?",
    "body": "## \u2753 Question\r\n\r\nCan torch_tensorRT be used in C++ with multiprocessing using fork?\r\n\r\n## What you have already tried\r\n\r\nI have doubts if this library can be used in C++ multiprocessing (using fork()) where each process loads a TorchScript model compiled for Torch-TensorRT. I have the pipeline that works with no Torch-TensorRT but it fails when I try to load models from it with `torch::jit::load` (with Torch-TensorRT installed). Related issue: https://github.com/pytorch/TensorRT/issues/758. I have not put this as a bug because I have seen in forums that NVIDIA does not recommend using TensorRT with multiprocessing. Mi error is the following on `torch::jit::load`:\r\n\r\n```\r\nterminate called after throwing an instance of 'torch_tensorrt::Error'\r\n  what():  [Error thrown at /home/eduardo/project/TensorRT/core/runtime/runtime.cpp:99] Expected (cudaGetDevice(reinterpret_cast<int*>(&device)) == cudaSuccess) to be true but got false\r\nUnable to get current device (runtime.get_current_device)\r\n```\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.2.0\r\n - CPU Architecture: amd64\r\n - OS (e.g., Linux): Ubuntu 22.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): libtorch + Torch-TensorRT (source) compiled on tag v2.2.0\r\n - Build command you used (if compiling from source): on tag v2.2.0: `cmake -S. -Bbuild -DcuDNN_ROOT_DIR=~/Documents/project/deps/cudnn -DCMAKE_MODULE_PATH=cmake/Modules -DTorch_DIR=/usr/local/libtorch/share/cmake/Torch -DTensorRT_ROOT=~/Documents/TensorRT-8.6.1.6/ -DCMAKE_BUILD_TYPE=Debug`\r\n - Are you using local sources or building from archives: \r\n - G++ version:  11.4.0\r\n - CUDA version:12.1\r\n - GPU models and configuration: rtx 4090\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\nSorry but I am new to C++ and I may have made a mistake somewhere in the compilation or in linking the libraries.\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2653",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-22T14:10:57Z",
    "updated_at": "2024-02-23T22:04:21Z",
    "user": "peduajo"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 2039,
    "title": "How to find out the type of files in the repository",
    "body": "Hello\r\nIs there an option to determine the type of file in the repository, such as \"Checkpoint\", \"LORA\", \"Textual_Inversion\", etc?\r\n\r\nI didn't know where to ask the question so sorry if I'm wrong.",
    "url": "https://github.com/huggingface/huggingface_hub/issues/2039",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-22T01:41:29Z",
    "updated_at": "2024-03-25T11:39:31Z",
    "user": "suzukimain"
  },
  {
    "repo": "pytorch/serve",
    "number": 2955,
    "title": "CPP backend debugging and troubleshooting ",
    "body": "### \ud83d\ude80 The feature\n\nFor ease of debugging and troubleshooting for the CPP backend add following: \r\n\r\n- [ ] In the TS startup logs, add explicit log line for successful startup of CPP backend \r\n- [x] In the TS print environment add details for the CPP backend\r\n- [x] Cleanup steps for the build script\r\n- [x] FAQ page for troubleshooting\r\n- [x] Build scripts for simple example (or option to do selective build for an example only) \n\n### Motivation, pitch\n\nTo simplify the troubleshooting and debugging experience\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2955",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-02-22T01:34:36Z",
    "updated_at": "2024-03-26T20:59:22Z",
    "comments": 0,
    "user": "chauhang"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6686,
    "title": "Question: Is there any way for uploading a large image dataset?",
    "body": "I am uploading an image dataset like this:\r\n```\r\ndataset = load_dataset(\r\n    \"json\",\r\n    data_files={\"train\": \"data/custom_dataset/train.json\", \"validation\": \"data/custom_dataset/val.json\"},\r\n)\r\ndataset = dataset.cast_column(\"images\", Sequence(Image()))\r\ndataset.push_to_hub(\"StanfordAIMI/custom_dataset\", max_shard_size=\"1GB\")\r\n```\r\nwhere it takes a long time in the `Map` process. Do you think I can use multi-processing to map all the image data to the memory first? For the `Map()` function, I can set `num_proc`. But for `push_to_hub` and `cast_column`, I can not find it.\r\n\r\nThanks in advance!\r\n\r\nBest,",
    "url": "https://github.com/huggingface/datasets/issues/6686",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-21T22:07:21Z",
    "updated_at": "2024-05-02T03:44:59Z",
    "comments": 1,
    "user": "zhjohnchan"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2773,
    "title": "pipeline_tutorial failing due to dead torchtext link",
    "body": "Line 55 of https://github.com/pytorch/tutorials/blob/082c8b1bddb48b75f59860db3679d8c439238f10/intermediate_source/pipeline_tutorial.py is using torchtext to download a dataset that can\u2019t be accessed right now (maybe got taken down, I\u2019m looking for an alternative link but torchtext is no longer maintained)\r\n\r\nCan this tutorial be rewritten to use a different dataset?  Can the entire tutorial be deprecated?\r\n\r\nEx: https://github.com/pytorch/tutorials/actions/runs/7992713944/job/21826864521\r\n`requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://s3.amazonaws.com/research.metamind.io/wikitext/wikitext-2-v1.zip`\r\n\r\ncc @kwen2501 @H-Huang @wconstab ",
    "url": "https://github.com/pytorch/tutorials/issues/2773",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-21T21:02:25Z",
    "updated_at": "2024-05-15T16:36:22Z",
    "comments": 3,
    "user": "clee2000"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2649,
    "title": "\u2753 [Question] torch_tensorrt.dynamo.compile hangs indefinitely mid compilation? ",
    "body": "## \u2753 Question\r\n\r\ntorch_tensorrt.dynamo.compile hangs indefinitely mid compilation cpu usage is through the roof and having debug = True shows that there's a step where it fails\r\n\r\n## What you have already tried\r\n\r\nI tried compiling with torchscript and it works well enough but i wanted to test the dynamo backend\r\n\r\n## Environment\r\nPython 3.9.2\r\ntorch 2.2+cu118\r\ntorch_tensorrt 2.2+cu118\r\ntensorrt 8.6\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.2\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): debian 11\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip install torch torchvision torch_tensorrt --index-url https://download.pytorch.org/whl/cu118\r\n - Build command you used (if compiling from source):\r\n``` python \r\nimport torch\r\nimport torch_tensorrt\r\nfrom gfpgan.archs.gfpganv1_clean_arch import GFPGANv1Clean\r\n\r\ngfpgan = GFPGANv1Clean(\r\n                out_size=512,\r\n                num_style_feat=512,\r\n                channel_multiplier=2,\r\n                decoder_load_path=None,\r\n                fix_decoder=False,\r\n                num_mlp=8,\r\n                input_is_latent=True,\r\n                different_w=True,\r\n                narrow=1,\r\n                sft_half=True)\r\n\r\nmodel_path=\"./experiments/pretrained_models/GFPGANv1.3.pth\"\r\nloadnet = torch.load(model_path)\r\nif 'params_ema' in loadnet:\r\n    keyname = 'params_ema'\r\nelse:\r\n    keyname = 'params'\r\ngfpgan.load_state_dict(loadnet[keyname], strict=True)\r\ngfpgan = gfpgan.eval()\r\ninputs=[torch.randn([8, 3, 512, 512],dtype=torch.float32).cuda()]\r\n\r\nif torch.cuda.is_available():\r\n    gfpgan = gfpgan.cuda().eval()\r\n    torch.set_float32_matmul_precision('high')\r\n    compiled = torch.compile(gfpgan,\r\n                            backend=\"aot_torch_tensorrt_aten\",\r\n                            options={\r\n                                \"truncate_long_and_double\":True,\r\n                                \"debug\":True\r\n                            })\r\n    print(\"EXPORTING\")\r\n    import time\r\n    start= time.time()\r\n    print(compiled(*inputs))\r\n    print(time.time()-start)\r\n    torch.save(compiled, \"compiled.ts\")\r\n\r\n```\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.9.2\r\n - CUDA version: 118 (12.3 installed on OS)\r\n - GPU models and configuration: nvidia A100 80gb and nvidia L4 both have the same behavior\r\n - Any other relevant information:\r\nprivate fork based on https://github.com/TencentARC/GFPGAN\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2649",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-21T16:27:28Z",
    "updated_at": "2024-02-26T18:07:44Z",
    "user": "Antonyesk601"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2474,
    "title": "how to turn off fp16 auto_cast?",
    "body": "i notice that the deepspeed config always set my `auto_cast=True` and this is my data\r\n``` \r\ncompute_environment: LOCAL_MACHINE\r\ndeepspeed_config:\r\n  deepspeed_multinode_launcher: standard\r\n  gradient_clipping: 1.0\r\n  offload_optimizer_device: cpu\r\n  offload_param_device: cpu\r\n  zero3_offload_param_pin_memory: true\r\n  zero3_offload_optimizer_pin_memory: true\r\n  zero3_init_flag: true\r\n  zero3_save_16bit_model: true\r\n  zero_stage: 3\r\n  max_live_parameters: 1e9\r\n  max_reuse_distance: 1e9\r\n  round_robin_gradients: true\r\n  deepspeed_hostfile: /opt/tiger/hostfile\r\ndistributed_type: DEEPSPEED\r\nfsdp_config: {}\r\nmain_training_function: main\r\nmixed_precision: fp16\r\nuse_cpu: false\r\n\r\n```\r\n\r\n\r\nthis is my deepspeed log:\r\n``` \r\n[2024-02-21 19:35:40,143] [INFO] [config.py:958:print_user_config]   json = {\r\n    \"train_batch_size\": 512, \r\n    \"train_micro_batch_size_per_gpu\": 64, \r\n    \"gradient_accumulation_steps\": 1, \r\n    \"zero_optimization\": {\r\n        \"stage\": 3, \r\n        \"offload_optimizer\": {\r\n            \"device\": \"cpu\", \r\n            \"nvme_path\": null\r\n        }, \r\n        \"offload_param\": {\r\n            \"device\": \"cpu\", \r\n            \"nvme_path\": null\r\n        }, \r\n        \"stage3_gather_16bit_weights_on_model_save\": true\r\n    }, \r\n    \"gradient_clipping\": 1.0, \r\n    \"steps_per_print\": inf, \r\n    \"fp16\": {\r\n        \"enabled\": true, \r\n        \"auto_cast\": true\r\n    }, \r\n    \"bf16\": {\r\n        \"enabled\": false\r\n    }, \r\n    \"zero_allow_untested_optimizer\": true\r\n}\r\n```",
    "url": "https://github.com/huggingface/accelerate/issues/2474",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-21T11:54:51Z",
    "updated_at": "2025-02-18T08:53:20Z",
    "user": "haorannlp"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 852,
    "title": "what is the difference between \"chat-ui-db\" docker image and \"chat-ui\" docker image?",
    "body": "I found there are 2 packages in the chat-ui repository: one is chat-ui and the other is chat-ui-db. what is the difference between \"chat-ui-db\" docker image and \"chat-ui\" docker image?\r\n\r\nI've pulled two images from the mirror site: huggingface/text-generation-inference:1.4 and mongo:latest. \r\n\r\nI hope to use the two images( huggingface/text-generation-inference:1.4 and mongo:latest.) and the image of chat-ui or chat-ui-db to implement the local large model Q&A service. What should I do? Should I use \"chat-ui-db\" docker image or Should I use \"chat-ui\" docker image.\r\n\r\nWhat should i do to complete my task of local large model Q&A service? Can anyone give detailed help?\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/852",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-21T09:31:07Z",
    "updated_at": "2024-02-23T02:58:03Z",
    "user": "majestichou"
  },
  {
    "repo": "huggingface/instruction-tuned-sd",
    "number": 22,
    "title": "How to use a custom image for validation ",
    "body": "Hello,\r\nI tried using a custom image for validation since I'm training it on  a custom style i uploaded my val image on hub as the mountain.png but it always gives me error for unidentified also for mountain.png it shows validation summary on wandb but for my val image it shows nothing.\r\nDo i need to change something somewhere also how does it compare the val images for loss do  i need to put the style image of original image somewhere ",
    "url": "https://github.com/huggingface/instruction-tuned-sd/issues/22",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-21T08:15:30Z",
    "updated_at": "2024-02-22T05:49:11Z",
    "user": "roshan2024nar"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 67,
    "title": "How to set the background color of the scene",
    "body": "Hi\uff1a\r\nWant to know how to set the background color of the scene,now it's black",
    "url": "https://github.com/huggingface/gsplat.js/issues/67",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-21T05:49:33Z",
    "updated_at": "2024-02-26T09:32:25Z",
    "user": "jamess922"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 66,
    "title": "How to adjust the axis of rotation?",
    "body": "When the model's z-axis is not perpendicular to the ground plane, the rotation effect may feel unnatural, as is the case with this model: testmodel.splat.   \r\n[testmodel.zip](https://github.com/huggingface/gsplat.js/files/14353919/testmodel.zip)\r\n\r\n\r\nI would like to rotate the model along an axis that is perpendicular to the ground. Are there any parameters available to adjust the axis of rotation?",
    "url": "https://github.com/huggingface/gsplat.js/issues/66",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-21T04:13:01Z",
    "updated_at": "2024-02-23T02:37:59Z",
    "user": "gotoeasy"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2494,
    "title": "How to get embedding vector  when input is tokenized already ",
    "body": "First,  thank you so much for sentence-transformer.\r\n\r\n\r\n\r\nHow to get embedding vector  when input is tokenized already?  \r\n\r\ni guess sentence-transformer can `.encode(original text)`. \r\n\r\nBut i want to know there is way like `.encode(token_ids )` or `.encode(token_ids, attention_masks)`   \r\n\r\n\r\nThis is my background below\r\n\r\n> \r\n> I trained model using sentence-transformer. and i add few layers to this model for classification. \r\n> \r\n> and then i want to train model to update all of parameter (including added layers). \r\n> \r\n> but  DataLoader cuda() support only tokens_id not text , so first i tokenized  text using  `model.tokenizer()` .\r\n> \r\n> so, it is already tokenized i need to know how to get embedding if i have token_ids,\r\n\r\nregards\r\n",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2494",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-20T22:38:18Z",
    "updated_at": "2024-02-23T10:01:07Z",
    "user": "sogmgm"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1703,
    "title": "How can I export onnx-model for Qwen/Qwen-7B?",
    "body": "### Feature request\n\nI need to  export the model named qwen to accelerate.\r\n```optimum-cli export onnx --model Qwen/Qwen-7B qwen_optimum_onnx/ --trust-remote-code```\n\n### Motivation\n\nI want to export the model qwen to use onnxruntime\n\n### Your contribution\n\nI can give the input and output.",
    "url": "https://github.com/huggingface/optimum/issues/1703",
    "state": "open",
    "labels": [
      "onnx"
    ],
    "created_at": "2024-02-20T13:22:08Z",
    "updated_at": "2024-02-26T13:19:19Z",
    "comments": 1,
    "user": "smile2game"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2463,
    "title": "How to initialize Accelerator twice but with different setup within the same code ? ",
    "body": "### System Info\n\n```Shell\nHello I want to initialize accelerate once for the training and another time for the inference. \r\n\r\nLooks like it does not work and the error message is not clear. Is there a way to reset the previously initialized accelerate and then initialize with inference setup? \r\n\r\nFor training  I am doing : \r\n    accelerator = Accelerator(kwargs_handlers=[process_group_kwargs])\r\n    model,test_loader, valid_loader, optimizer, scheduler = accelerator.prepare(\r\n                model, test_loader, valid_loader, optimizer, scheduler)\r\n\r\nFor inference I want to do: accelerator = Accelerator()\r\nmodel, valid_loader, optimizer = eval_accelerator.prepare(model, valid_loader, optimizer)\r\n\r\nFor inference, I do no want to use optimizer but I get error as I am using zero_stage: 1, So I used the optimizer I used during training. But then I was getting batch size error for the valid set then I prepare the valid loader one more time after initializing the Accelerator. Still during inference I am getting error on the preparation. \r\n\r\nAny idea how to fix this?\n```\n\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\n1. Initialize Accelerator for training \r\n2. Once the training is done, initialize again for the inference.  \n\n### Expected behavior\n\nI just want to prepare the accelerate for the inference task once the training is done. ",
    "url": "https://github.com/huggingface/accelerate/issues/2463",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-20T13:17:26Z",
    "updated_at": "2024-03-30T15:06:15Z",
    "user": "soneyahossain"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2648,
    "title": "\u2753 Debugger deactivate",
    "body": "## \u2753 Question\r\n\r\nHow can I deactivate the debugger?\r\n\r\n## What you have already tried\r\n\r\nWhen I run any executable that uses Torch-TensorRT, I get a lot of debugger messages:\r\n\r\n```log\r\n...\r\nDEBUG: [Torch-TensorRT - Debug Build] - Attempting to run engine (ID: __torch___torchvision_models_resnet_ResNet_trt_engine_)\r\nINFO: [Torch-TensorRT - Debug Build] - Execution profiling is enabled, find results here:\r\nDevice selection profile: /tmp/__torch___torchvision_models_resnet_ResNet_trt_engine__device_config_profile.trace                                                                                                \r\nInput packing profile: /tmp/__torch___torchvision_models_resnet_ResNet_trt_engine__input_profile.trace                                                                                                           \r\nOutput packing profile: /tmp/__torch___torchvision_models_resnet_ResNet_trt_engine__output_profile.trace                                                                                                         \r\nTRT enqueue profile: /tmp/__torch___torchvision_models_resnet_ResNet_trt_engine__enqueue_profile.trace                                                                                                           \r\nEngine execution profile: /tmp/__torch___torchvision_models_resnet_ResNet_trt_engine__engine_exectuion_profile.trace                                                                                                                                                                                                                                                                                                            \r\nDEBUG: [Torch-TensorRT - Debug Build] - Current Device: Device(ID: 0, Name: Xavier, SM Capability: 7.2, Type: GPU)                                                                                               \r\nDEBUG: [Torch-TensorRT - Debug Build] - Requested padding of dimensions to 1 but found 4 dimensions, not going to pad                                                                                            \r\nDEBUG: [Torch-TensorRT - Debug Build] - Input Name: input_0 Shape: [1, 3, 224, 224]\r\nDEBUG: [Torch-TensorRT - Debug Build] - Output Name: output_0 Shape: [1, 1000]\r\nINFO: [Torch-TensorRT - Debug Build] -\r\n...\r\n```\r\n\r\nI think for some reason I am compiling in debug/developer mode (if there is such a thing). I have tried compiling Torch-TensorRT using:\r\n```bash\r\nbazel build //:libtorchtrt --platforms //toolchains:jetpack_5.0 --linkopt=-Wl,--strip-all --copt=-O3\r\n```\r\n\r\nI hoped, with the `--linkopt=-Wl,--strip-all` option to have solved my problem. Is there any way to deactivate the debugger? I am using the C++ API. Is there either anything in the compilation stage, or any routine to integrate in my code that can help me run my code with the logger disabled?\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version: 2.0\r\n - CPU Architecture: x64\r\n - OS (e.g., Linux): Ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): source\r\n - Build command you used (if compiling from source): [build tutorial](https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048)\r\n - Are you using local sources or building from archives: [ref tutorial](https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048)\r\n - Python version: 3.8\r\n - CUDA version: 11.4\r\n - GPU models and configuration:\r\n - Any other relevant information: Jetson AGX Xavier\r\n\r\n## Additional context\r\n\r\nTensorRT version: 1.4 Release version\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2648",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-20T05:56:41Z",
    "updated_at": "2024-02-20T06:15:13Z",
    "user": "AndreasKaratzas"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 840,
    "title": "LLama.cpp error - String must contain at least 1 character(s)\"",
    "body": "I keep getting this error after adding LLAMA-CPP inference endpoint locally. Adding this line causes this error.\r\n\r\n```\r\n      \"endpoints\": [\r\n        {\r\n        \"url\": \"http://localhost:8080\",\r\n        \"type\": \"llamacpp\"\r\n        }\r\n      ]\r\n```\r\nNot sure how to fix it.\r\n```\r\n[\r\n  {\r\n    \"code\": \"too_small\",\r\n    \"minimum\": 1,\r\n    \"type\": \"string\",\r\n    \"inclusive\": true,\r\n    \"exact\": false,\r\n    \"message\": \"String must contain at least 1 character(s)\",\r\n    \"path\": [\r\n      0,\r\n      \"endpoints\",\r\n      0,\r\n      \"accessToken\"\r\n    ]\r\n  }\r\n]\r\nZodError: [\r\n  {\r\n    \"code\": \"too_small\",\r\n    \"minimum\": 1,\r\n    \"type\": \"string\",\r\n    \"inclusive\": true,\r\n    \"exact\": false,\r\n    \"message\": \"String must contain at least 1 character(s)\",\r\n    \"path\": [\r\n      0,\r\n      \"endpoints\",\r\n      0,\r\n      \"accessToken\"\r\n    ]\r\n  }\r\n]\r\n    at get error [as error] (file:///C:/Users/SRU/Desktop/chatui/node_modules/zod/lib/index.mjs:538:31)\r\n    at ZodArray.parse (file:///C:/Users/SRU/Desktop/chatui/node_modules/zod/lib/index.mjs:638:22)\r\n    at C:\\Users\\SRU\\Desktop\\chatui\\src\\lib\\server\\models.ts:75:40\r\n    at async instantiateModule (file:///C:/Users/SRU/Desktop/chatui/node_modules/vite/dist/node/chunks/dep-529\r\n```\r\nFull Config:\r\n\r\n```\r\n# Use .env.local to change these variables\r\n# DO NOT EDIT THIS FILE WITH SENSITIVE DATA\r\n\r\nMONGODB_URL=mongodb://localhost:27017/\r\nMONGODB_DB_NAME=chat-ui\r\nMONGODB_DIRECT_CONNECTION=false\r\n\r\nCOOKIE_NAME=hf-chat\r\nHF_TOKEN=#hf_<token> from from https://huggingface.co/settings/token\r\nHF_API_ROOT=https://api-inference.huggingface.co/models\r\nOPENAI_API_KEY=#your openai api key here\r\n\r\nHF_ACCESS_TOKEN=#LEGACY! Use HF_TOKEN instead\r\n\r\n# used to activate search with web functionality. disabled if none are defined. choose one of the following:\r\nYDC_API_KEY=#your docs.you.com api key here\r\nSERPER_API_KEY=#your serper.dev api key here\r\nSERPAPI_KEY=#your serpapi key here\r\nSERPSTACK_API_KEY=#your serpstack api key here\r\nUSE_LOCAL_WEBSEARCH=#set to true to parse google results yourself, overrides other API keys\r\nSEARXNG_QUERY_URL=# where '<query>' will be replaced with query keywords see https://docs.searxng.org/dev/search_api.html eg https://searxng.yourdomain.com/search?q=<query>&engines=duckduckgo,google&format=json\r\n\r\nWEBSEARCH_ALLOWLIST=`[]` # if it's defined, allow websites from only this list.\r\nWEBSEARCH_BLOCKLIST=`[]` # if it's defined, block websites from this list.\r\n\r\n# Parameters to enable open id login\r\nOPENID_CONFIG=`{\r\n  \"PROVIDER_URL\": \"\",\r\n  \"CLIENT_ID\": \"\",\r\n  \"CLIENT_SECRET\": \"\",\r\n  \"SCOPES\": \"\"\r\n}`\r\n\r\n# /!\\ legacy openid settings, prefer the config above\r\nOPENID_CLIENT_ID=\r\nOPENID_CLIENT_SECRET=\r\nOPENID_SCOPES=\"openid profile\" # Add \"email\" for some providers like Google that do not provide preferred_username\r\nOPENID_PROVIDER_URL=https://huggingface.co # for Google, use https://accounts.google.com\r\nOPENID_TOLERANCE=\r\nOPENID_RESOURCE=\r\n\r\n# Parameters to enable a global mTLS context for client fetch requests\r\nUSE_CLIENT_CERTIFICATE=false\r\nCERT_PATH=#\r\nKEY_PATH=#\r\nCA_PATH=#\r\nCLIENT_KEY_PASSWORD=#\r\nREJECT_UNAUTHORIZED=true\r\n\r\n\r\n\r\nMODELS=`[\r\n    {\r\n      \"name\": \"mistralai/Mistral-7B-Instruct-v0.1\",\r\n      \"displayName\": \"mistralai/Mistral-7B-Instruct-v0.1\",\r\n      \"description\": \"Mistral 7B is a new Apache 2.0 model, released by Mistral AI that outperforms Llama2 13B in benchmarks.\",\r\n      \"chatPromptTemplate\" : \"<s>{{#each messages}}{{#ifUser}}[INST] {{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\\n{{/if}}{{/if}}{{content}} [/INST]{{/ifUser}}{{#ifAssistant}}{{content}}</s>{{/ifAssistant}}{{/each}}\",\r\n      \"parameters\": {\r\n        \"temperature\": 0.1,\r\n        \"top_p\": 0.95,\r\n        \"repetition_penalty\": 1.2,\r\n        \"top_k\": 50,\r\n        \"truncate\": 3072,\r\n        \"max_new_tokens\": 1024,\r\n        \"stop\": [\"</s>\"]\r\n      },\r\n      \"promptExamples\": [\r\n        {\r\n          \"title\": \"Write an email from bullet list\",\r\n          \"prompt\": \"As a restaurant owner, write a professional email to the supplier to get these products every week: \\n\\n- Wine (x10)\\n- Eggs (x24)\\n- Bread (x12)\"\r\n        }, {\r\n          \"title\": \"Code a snake game\",\r\n          \"prompt\": \"Code a basic snake game in python, give explanations for each step.\"\r\n        }, {\r\n          \"title\": \"Assist in a task\",\r\n          \"prompt\": \"How do I make a delicious lemon cheesecake?\"\r\n        }\r\n      ],\r\n      \"endpoints\": [\r\n        {\r\n        \"url\": \"http://localhost:8080\",\r\n        \"type\": \"llamacpp\"\r\n        }\r\n      ]\r\n    }\r\n]`\r\n\r\nOLD_MODELS=`[]`\r\n\r\nPUBLIC_ORIGIN=#https://huggingface.co\r\nPUBLIC_SHARE_PREFIX=#https://hf.co/chat\r\nPUBLIC_GOOGLE_ANALYTICS_ID=#G-XXXXXXXX / Leave empty to disable\r\nPUBLIC_PLAUSIBLE_SCRIPT_URL=#/js/script.js / Leave empty to disable\r\nPUBLIC_ANNOUNCEMENT_BANNERS=`[\r\n    {\r\n    \"title\": \"Code Llama 70B is available! \ud83e\udd99\",\r\n    \"linkTitle\": \"try it\",\r\n    \"linkHref\": \"https://huggingface.co/chat?model=codellama/CodeLlama-70b-Instruct-hf\"\r\n  }\r\n]`\r\n\r\nPARQUET_EXPORT_DATASET=\r\nPARQUET_EXP",
    "url": "https://github.com/huggingface/chat-ui/issues/840",
    "state": "open",
    "labels": [
      "bug",
      "models"
    ],
    "created_at": "2024-02-19T13:33:24Z",
    "updated_at": "2024-02-22T14:51:48Z",
    "comments": 2,
    "user": "szymonrucinski"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 93,
    "title": "Tokenization for Non English data",
    "body": "Hi HF team\r\nI want to thank you for this incredible work.\r\nAnd I have a question, I want to apply pipeline of deduplication for Arabic data.\r\n For this  I should change the tokenizer I think, And if yes is there a tip for this, \r\nfor this should I just edit the tokenizer here\r\n`class SentenceDedupFilter(PipelineStep):\r\n    type = \"\ud83e\udec2 - DEDUPS\"\r\n    name = \"\ud83d\udca5 sentence-deduplication stage 3\"\r\n\r\n    def __init__(\r\n        self,\r\n        data_folder: DataFolderLike,\r\n        n_sentences: int = 3,\r\n        min_doc_words: int = 50,\r\n        exclusion_writer: DiskWriter = None,\r\n    ):\r\n        \"\"\"Args:\r\n        data_folder: data folder to get duplicate files.\r\n        min_doc_words: min amount of words for each document\r\n        \"\"\"\r\n        from nltk import load\r\n\r\n        super().__init__()\r\n        self.data_folder = get_datafolder(data_folder)\r\n        self.n_sentences = n_sentences\r\n        self.min_doc_words = min_doc_words\r\n        **self._tokenizer = load(\"tokenizers/punkt/english.pickle\")**\r\n        self.exclusion_writer = exclusion_writer`\r\n        \r\n        \r\nany recommendations please?\r\nThanks",
    "url": "https://github.com/huggingface/datatrove/issues/93",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-19T11:02:04Z",
    "updated_at": "2024-04-11T12:47:24Z",
    "user": "Manel-Hik"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 120194,
    "title": "model loaded with torch._export.aot_load does not report what file is not found during inference and Cuda driver error.",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nwhen I load a pt2 model exported with torch._export in one Docker container from the image `ghcr.io/pytorch/pytorch-nightly:2.3.0.dev20240211-cuda12.1-cudnn8-devel` I get a working inference. \r\n\r\nBut when I run it in another container derived from the same base image, I get a CUDA driver error. I can't track down the error because the error message doesn't give me anything to go on. I've confirmed that nvidia-smi, nvcc --version, the torch version and all environment variables from `docker inspect` are the same between the two running containers. I can't identify anywhere that another torch version is installed and I can't see any other cuda versions installed in `/usr/local` that might cause a conflict.\r\n\r\n```\r\nimport torch\r\n\r\nmodel = torch._export.aot_load(\"./compiled_model_satlas/satlas_pt2.so\", device=\"cuda\")\r\n\r\ndevice = torch.device(\"cuda:\" + str(torch.cuda.current_device()))\r\ntorch.cuda.set_device(device)\r\n\r\nprint(\"Current device:\", device)\r\n\r\ntest_im_ts = torch.randn((9*4, 256, 256)).to(device)\r\n\r\nx = torch.stack(6*[test_im_ts], dim=0)\r\n\r\noutputs_aot, _ = model(x)\r\n```\r\n\r\nthe error is below\r\n\r\n```\r\nError: CUDA driver error: file not found\r\n---------------------------------------------------------------------------\r\nRuntimeError                              Traceback (most recent call last)\r\nCell In[10], line 3\r\n      1 test_im_ts = torch.randn((9*4,256,256)).to(device)\r\n      2 x = torch.stack(6*[test_im_ts], dim=0)\r\n----> 3 outputs_aot, _ = model(x)\r\n\r\nFile /opt/conda/lib/python3.10/site-packages/torch/_export/__init__.py:421, in aot_load.<locals>.optimized(*args, **kwargs)\r\n    419 out_spec = pytree.treespec_loads(call_spec[1])\r\n    420 flat_inputs = pytree.tree_flatten((args, reorder_kwargs(kwargs, in_spec)))[0]\r\n--> 421 flat_outputs = runner.run(flat_inputs)  # type: ignore[attr-defined]\r\n    422 return pytree.tree_unflatten(flat_outputs, out_spec)\r\n\r\nRuntimeError: run_func_( container_handle_, input_handles.data(), input_handles.size(), output_handles.data(), output_handles.size(), cuda_stream_handle, proxy_executor_handle_) API call failed at ../torch/csrc/inductor/aoti_runner/model_container_runner.cpp, line 75\r\n```\r\n\r\n### Versions\r\n\r\nDetails for the container where inference fails\r\n\r\n```\r\nPyTorch version: 2.3.0.dev20240210\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 22.04.3 LTS (x86_64)\r\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\r\nClang version: Could not collect\r\nCMake version: version 3.26.4\r\nLibc version: glibc-2.35\r\n\r\nPython version: 3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-6.5.0-18-generic-x86_64-with-glibc2.35\r\nIs CUDA available: True\r\nCUDA runtime version: 12.1.105\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 3090\r\nNvidia driver version: 545.23.08\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.0\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.0\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                       x86_64\r\nCPU op-mode(s):                     32-bit, 64-bit\r\nAddress sizes:                      39 bits physical, 48 bits virtual\r\nByte Order:                         Little Endian\r\nCPU(s):                             12\r\nOn-line CPU(s) list:                0-11\r\nVendor ID:                          GenuineIntel\r\nModel name:                         Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz\r\nCPU family:                         6\r\nModel:                              158\r\nThread(s) per core:                 2\r\nCore(s) per socket:                 6\r\nSocket(s):                          1\r\nStepping:                           10\r\nCPU max MHz:                        4600.0000\r\nCPU min MHz:                        800.0000\r\nBogoMIPS:                           6399.96\r\nFlags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch",
    "url": "https://github.com/pytorch/pytorch/issues/120194",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: aotinductor"
    ],
    "created_at": "2024-02-19T07:12:30Z",
    "updated_at": "2025-02-07T08:44:15Z",
    "user": "rbavery"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 443,
    "title": "Efficient key-wise streaming",
    "body": "### Feature request\r\n\r\nI'm interested in streaming the tensors in a model key by key without having to hold all keys at the same time in memory. Something like this:\r\n\r\n```python\r\nwith safe_open(\"model.safetensors\", framework=\"pt\", device=\"cpu\") as f:\r\n    for key in f.keys():\r\n        tensor = f.get_tensor(stream=True)\r\n        # `tensor` will be garbage collected in the next GC pass\r\n        #  as soon as the next iteration removes the only reference to it\r\n```\r\n\r\n### Motivation\r\n\r\nWhen I use `safetensors.safe_open` to load multiple models, the memory usage does not drop down even when the deserialized tensors do not have a reference held to them. This is a key by key streamed merge of 5 stable diffusion 1.5 checkpoints using a weighted sum:\r\n\r\n(each vertical gray line is ~8GB)\r\n\r\n![image](https://github.com/huggingface/safetensors/assets/32277961/69bc2e0b-fbe7-4542-99dd-23efb1cbbd23)\r\n\r\nFor reference, this is my successful attempt at reading keys memory efficient in python:\r\nhttps://github.com/ljleb/sd-mecha/blob/9548ef83dd5d3fccdaf09c8b22dee7a0a7727613/sd_mecha/streaming.py#L12\r\n\r\nAnd this is my successful attempt at making writing keys memory efficient:\r\nhttps://github.com/ljleb/sd-mecha/blob/9548ef83dd5d3fccdaf09c8b22dee7a0a7727613/sd_mecha/streaming.py#L156\r\n\r\nWhich looks like this:\r\n\r\n![image](https://github.com/huggingface/safetensors/assets/32277961/ec41da3b-5e30-4d33-8439-68975df4bda2)\r\n\r\nNote that my implementation is relatively slow compared to simply using safetensors directly (approximately 1.1x to 1.3x slower according to some quick test I made). Is there any way the same could be achieved but in a more computationally efficient way using the rust bindings? Specifically, I need to stream the keys and the tensors without them being held somewhere else in memory.\r\n\r\n### Your contribution\r\n\r\nI don't really know Rust but if nobody has time for this and there isn't a problem with my suggested approach to the API above, I will eventually have to implement this efficiently in one way or another for my merging lib.",
    "url": "https://github.com/huggingface/safetensors/issues/443",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-02-18T23:22:09Z",
    "updated_at": "2024-04-17T01:47:28Z",
    "comments": 4,
    "user": "ljleb"
  },
  {
    "repo": "huggingface/community-events",
    "number": 200,
    "title": "How to prepare audio dataset for whisper fine-tuning with timestamps?",
    "body": "I am trying to prepare a dataset for whisper fine-tuning , and I have a lot of small segment clip , most of them less than 6 seconds, I read the paper, but didn\u2019t understand this paragraph:\r\n\r\n\u201c When a final transcript segment is only partially included in the current 30- second audio chunk, we predict only its start time token for the segment when in timestamp mode, to indicate that the subsequent decoding should be performed on an audio window aligned with that time, otherwise we truncate the audio to not include the segment\u201d\r\n\r\nSo when should I add the final segment if it is partially included in the current 30-second chunk, and when should I truncate the chunk without it, and if I added it how to extract only relevant transcription?\r\n\r\nTo make it clear:\r\n```\r\n|           window           |           window           |\r\n|segment|-----segment---|--segment--|\r\n```\r\nassume that every window is 30 seconds, how to get the correct relevant transcription of the partially included segments?\r\nAnyone could help?",
    "url": "https://github.com/huggingface/community-events/issues/200",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-18T19:50:33Z",
    "updated_at": "2024-02-18T19:55:06Z",
    "user": "omarabb315"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 7010,
    "title": "How to set export HF_HOME on Kaggle?",
    "body": "Kaggle temporary disk is slow once again and I want models to be downloaded into working directory.\r\n\r\nI have used the below command but it didn't work. Which command I need?\r\n\r\n`!export HF_HOME=\"/kaggle/working\"`\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/7010",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-02-18T11:15:21Z",
    "updated_at": "2024-02-18T14:39:08Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "huggingface/optimum-benchmark",
    "number": 126,
    "title": "How to obtain the data from the 'forward' and 'generate' stages?",
    "body": "I used the same configuration file to test the model, but the results obtained are different from those of a month ago. In the result files from a month ago, data from both the forward and generate stages were included; however, the current generated result files only contain information from the prefill and decode stages. Here is the configuration file:\r\n\r\ndefaults:\r\n  - backend: pytorch         # default backend\r\n  - launcher: process        # default launcher\r\n  - benchmark: inference     # default benchmark\r\n  - experiment              # inheriting experiment schema\r\n  - _self_                  # for hydra 1.1 compatibility\r\n  - override hydra/job_logging: colorlog   # colorful logging\r\n  - override hydra/hydra_logging: colorlog # colorful logging\r\n\r\nexperiment_name: pytorch_qwen7b\r\nmodel: Qwen/Qwen-7B\r\ndevice: cpu\r\n\r\nlauncher:\r\n  device_isolation: true\r\n\r\nbenchmark:\r\n  memory: true\r\n  input_shapes:\r\n    batch_size: 1\r\n    sequence_length: 256\r\n  new_tokens: 1000\r\n\r\nhub_kwargs:\r\n  trust_remote_code: true\r\n\r\nhydra:\r\n  run:\r\n    dir: runs/${experiment_name}\r\n  sweep:\r\n    dir: sweeps/${experiment_name}\r\n  job:\r\n    chdir: true\r\n    env_set:\r\n      OVERRIDE_BENCHMARKS: 1\r\n      CUDA_VISIBLE_DEVICES: 0\r\n      CUDA_DEVICE_ORDER: PCI_BUS_ID",
    "url": "https://github.com/huggingface/optimum-benchmark/issues/126",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-18T09:48:44Z",
    "updated_at": "2024-02-19T16:06:24Z",
    "user": "WCSY-YG"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 838,
    "title": "Explore the possibility for chat-ui to use OpenAI assistants API structure.",
    "body": "Hi @nsarrazin , I wanted to explore how we could collaborate in making chat-ui more work with OpenAI standards to make it more less opinionated over hosted inference provider. I need it as I am part of a team open-sourcing the GPTs platform https://github.com/OpenGPTs-platform and we will be leveraging chat-ui as the client. So I was hoping we could align our objectives so that we can have a healthy collaboration instead of just diverging. The main point I wanted to touch on is as follows.\r\n\r\nIs there any interest in transforming the backend to one that follows the OpenAI assistants API structure so that we may better align ourselves to the OpenAI standard? Based on the disord \u2060announcement \"...Message API with OpenAI compatibility for HF...\", HF seems to signal that they are pushing in that direction so it would make sense to support that on the chat-ui. I havent looked too deep into the codebase but I imagine we will need to refactor the backend endpoints to support assistants API endpoints and then use the openai client to make the requests.\r\n\r\nI am more than open to suggestions, and I look forward to exploring how we could collab!",
    "url": "https://github.com/huggingface/chat-ui/issues/838",
    "state": "open",
    "labels": [
      "enhancement",
      "good first issue",
      "back"
    ],
    "created_at": "2024-02-17T21:39:49Z",
    "updated_at": "2024-12-26T05:55:47Z",
    "comments": 4,
    "user": "CakeCrusher"
  },
  {
    "repo": "huggingface/candle",
    "number": 1720,
    "title": "How to define custom ops with arbitrary number of tensors ?",
    "body": "I dived into the issues and repo about the subject, because I wanted to be able to call cuda kernels regarding 3D gaussian splatting, and the way to invoke those kernel seems to be custom ops. But right now, we only have \r\n```\r\nCustomOp1(Tensor, std::sync::Arc<Box<dyn CustomOp1 + Send + Sync>>),\r\n\r\nCustomOp2(\r\n        Tensor,\r\n        Tensor,\r\n        std::sync::Arc<Box<dyn CustomOp2 + Send + Sync>>,\r\n    ),\r\n\r\nCustomOp3(\r\n        Tensor,\r\n        Tensor,\r\n        Tensor,\r\n        std::sync::Arc<Box<dyn CustomOp3 + Send + Sync>>,\r\n    )\r\n```\r\n\r\nAnd those gsplat kernels have way more in and/or out tensors depending on the operation.\r\n\r\nI can think of ways to do it, but I was wondering if there was a _**good**_ way to do it?",
    "url": "https://github.com/huggingface/candle/issues/1720",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-16T21:38:16Z",
    "updated_at": "2024-03-13T13:44:17Z",
    "user": "jeanfelixM"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 837,
    "title": "Cannot find assistants UI in the repo",
    "body": "Hi @nsarrazin  I recently cloned the chat-ui and I noticed that the new assistants ui is missing, at the very least from the main branch.\r\nIs the assistants ui in the repo somwhere? \r\nIf not is there any plans on making it open-source?\r\n  If so when?",
    "url": "https://github.com/huggingface/chat-ui/issues/837",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-16T20:13:39Z",
    "updated_at": "2024-02-17T21:29:08Z",
    "comments": 4,
    "user": "CakeCrusher"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 120079,
    "title": "Use sys.settrace or torch function mode to compute how much of a model was not covered by Dynamo",
    "body": "### \ud83d\udc1b Describe the bug\n\nSuppose you have a model with a bunch of graph breaks / WON'T CONVERT. How much of the model have you managed to capture versus not capture?  There are two metrics you could use to figure this out:\r\n\r\n* When you run the model in eager mode, it will have run some number calls to torch functions. You can count how many of these calls occur outside of Dynamo compiled regions, compared to those captured in Dynamo regions. This gives you \"missing torch function call captures / total number of torch function calls in torch.compile region\"\r\n* When you run the model in eager mode, you will run some number of bytecodes. You can use sys.settrace to count how many bytecodes are processed in the eager region, and get \"number of bytecodes evaluated outside of Dynamo region / total number of bytecodes\"\r\n\r\nThis can give you a much better idea of how much of the model you've managed to capture, as opposed to just number of graph breaks.\n\n### Versions\n\nmain\n\ncc @chauhang @penguinwu @msaroufim @bdhirsh @anijain2305 @zou3519",
    "url": "https://github.com/pytorch/pytorch/issues/120079",
    "state": "open",
    "labels": [
      "feature",
      "low priority",
      "module: logging",
      "triaged",
      "oncall: pt2"
    ],
    "created_at": "2024-02-16T14:54:04Z",
    "updated_at": "2025-07-11T18:03:17Z",
    "user": "ezyang"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2456,
    "title": "Link to the endpoint doc page in case of error?",
    "body": "eg. https://datasets-server.huggingface.co/parquet\r\n\r\ncould return\r\n\r\n```json\r\n{\"error\":\"Parameter 'dataset' is required. Read the docs at https://huggingface.co/docs/datasets-server/parquet\"}\r\n```\r\n\r\nor \r\n\r\n```json\r\n{\"error\":\"Parameter 'dataset' is required.\", \"docs\": \"https://huggingface.co/docs/datasets-server/parquet\"}\r\n```\r\n\r\ninstead of\r\n\r\n```json\r\n{\"error\":\"Parameter 'dataset' is required\"}\r\n```",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2456",
    "state": "open",
    "labels": [
      "documentation",
      "question",
      "api",
      "P2"
    ],
    "created_at": "2024-02-15T11:11:44Z",
    "updated_at": "2024-02-15T11:12:12Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/text",
    "number": 2230,
    "title": "how to install libtorchtext for cpp project use? please give some operation .thanks",
    "body": "## \ud83d\udc1b Bug\r\n\r\n**Describe the bug** A clear and concise description of what the bug is.\r\n\r\n**To Reproduce** Steps to reproduce the behavior:\r\n\r\n1. Go to '...'\r\n2. Click on '....'\r\n3. Scroll down to '....'\r\n4. See error\r\n\r\n**Expected behavior** A clear and concise description of what you expected to happen.\r\n\r\n**Screenshots** If applicable, add screenshots to help explain your problem.\r\n\r\n**Environment**\r\n\r\nPlease copy and paste the output from our\r\n[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py) (or\r\nfill out the checklist below manually).\r\n\r\nYou can get the script and run it with:\r\n\r\n```\r\nwget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py\r\n# For security purposes, please check the contents of collect_env.py before running it.\r\npython collect_env.py\r\npython -c \"import torchtext; print(\\\"torchtext version is \\\", torchtext.__version__)\"\r\n```\r\n\r\n- PyTorch Version (e.g., 1.0):\r\n- OS (e.g., Linux):\r\n- How you installed PyTorch (`conda`, `pip`, source):\r\n- Build command you used (if compiling from source):\r\n- Python version:\r\n- CUDA/cuDNN version:\r\n- GPU models and configuration:\r\n- Any other relevant information:\r\n\r\n**Additional context** Add any other context about the problem here.\r\n",
    "url": "https://github.com/pytorch/text/issues/2230",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-15T04:01:32Z",
    "updated_at": "2024-02-15T04:01:32Z",
    "user": "mullerhai"
  },
  {
    "repo": "pytorch/audio",
    "number": 3746,
    "title": "how to install libtorchaudio for cpp project ?",
    "body": "### \ud83d\udc1b Describe the bug\n\nHI \uff0cI git clone audio project  \uff0cthen  add  libtorch  path to the audio  CMakeTxt\uff0c try to  make  && make install \uff0cbut all finish \uff0cI cannot  find  libtorchaudio.dylib file on my  macos  intel, only libtorchaudio.so\tlibtorchaudio_sox.so  in  /usr/local/torchaudio\n\n### Versions\n\nlatest",
    "url": "https://github.com/pytorch/audio/issues/3746",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-15T02:28:30Z",
    "updated_at": "2024-02-15T02:28:30Z",
    "user": "mullerhai"
  },
  {
    "repo": "pytorch/torchx",
    "number": 824,
    "title": "Determine scheduler from component level",
    "body": "## \u2753 Questions and Help\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nBefore submitting, please ensure you have gone through our\r\n[documentation](https://pytorch.org/torchx).\r\n\r\n\r\n### Question\r\n<!-- your question here -->\r\nIs it possible to tell or fill in at runtime which scheduler gets used in component logic? For example, if I have a ddp component, within the component, before I return specs.AppDef, can I set for example a macro that would tell me which scheduler this component gets ran with?\r\n\r\nFor example, I want to be setting some environment variables but differentiate based on which scheduler gets used. ",
    "url": "https://github.com/meta-pytorch/torchx/issues/824",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-14T23:01:27Z",
    "updated_at": "2024-02-16T01:56:46Z",
    "comments": 1,
    "user": "ryxli"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 64,
    "title": "How to render from a set of camera position?",
    "body": "Hi, I am trying to render the scene from a set of camera position/rotation that I load from a JSON file.\r\n\r\nI think the right way is first to disable the \"orbitControls\" (engine.orbitControls.enabled = false;) and then set the camera position/rotation manually like this:  'camera.data.update(position, rotation);'. Am I right?\r\n\r\nAny suggestion/recommendation is welcome!\r\n",
    "url": "https://github.com/huggingface/gsplat.js/issues/64",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-14T16:11:28Z",
    "updated_at": "2024-02-19T18:13:38Z",
    "user": "vahidEtt"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 824,
    "title": "what port is used by the websearch?",
    "body": "i put the chat in a container in a cluster with my mongodb.\r\nthe web search stopped working, i think it might be related to me not opening a port for the web search to access the web and could not find a doc that describes how the web search works.\r\nwould love to know what port/s i should open and  bit more details in general.\r\nthank in advance.",
    "url": "https://github.com/huggingface/chat-ui/issues/824",
    "state": "open",
    "labels": [
      "support",
      "websearch"
    ],
    "created_at": "2024-02-14T11:15:22Z",
    "updated_at": "2024-02-14T12:52:25Z",
    "user": "kaplanyaniv"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 586,
    "title": "Does `WEBGPU` Truly Enhance Inference Time Acceleration?",
    "body": "### Question\n\nRecently, I've been extensively utilizing transformers.js to load transformer models, and Kudos to the team for this wonderful library ...\r\nSpecifically, I've been experimenting with version 2.15.0 of transformers.js.\r\n\r\n\r\n\r\nDespite the fact that the model runs on the `web-assembly backend`, I've noticed some slowness in inference. In an attempt to address this issue, I experimented with` webgpu inference` using the `v3` branch. However, the inference time did not meet my expectations.\r\n\r\nIs it possible for webgpu to significantly accelerate the inference time?",
    "url": "https://github.com/huggingface/transformers.js/issues/586",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-14T09:23:52Z",
    "updated_at": "2024-10-18T13:30:13Z",
    "user": "kishorekaruppusamy"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 823,
    "title": "WebSearch uses the default model instead of current model selected",
    "body": "I have multiple models in my .env.local and it seems the WebSearch uses the default model to perform its search content extraction instead of the currently selected model (the one that I'm asking the question to...) Is it possible to add a config option to use same model for everything?",
    "url": "https://github.com/huggingface/chat-ui/issues/823",
    "state": "open",
    "labels": [
      "enhancement",
      "back",
      "models"
    ],
    "created_at": "2024-02-14T07:52:59Z",
    "updated_at": "2024-02-14T13:07:20Z",
    "comments": 4,
    "user": "ihubanov"
  },
  {
    "repo": "huggingface/trl",
    "number": 1327,
    "title": "how to save/load model?",
    "body": "I've tried save model via:\r\n\r\nppo_trainer.save_pretrained(\"./model_after_rl\")\r\n\r\nand load the model via:\r\n\r\nmodel = AutoModelForCausalLMWithValueHead.from_pretrained(\"./model_after_rl\")\r\nref_model = AutoModelForCausalLMWithValueHead.from_pretrained(\"./model_after_rl\")\r\n\r\nBut the performance is same to without any reinforcement learning,  when I add the loaded model to a new PPO trainer, freeze the model and test again. \r\n\r\n",
    "url": "https://github.com/huggingface/trl/issues/1327",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-14T06:56:07Z",
    "updated_at": "2024-04-24T15:05:14Z",
    "user": "ADoublLEN"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2440,
    "title": "How to properly gather results of PartialState for inference on 4xGPUs",
    "body": "### System Info\r\n\r\n```Shell\r\ntorch==2.2.0\r\ntransformers==4.37.2\r\naccelerate==0.27.0\r\n```\r\n\r\n\r\n### Information\r\n\r\n- [X] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\r\n- [X] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nHi, my question may look like stupid but I want to ask for clarification, because I didn't find it in [documentation](https://huggingface.co/docs/accelerate/main/en/usage_guides/distributed_inference#sending-chunks-of-a-batch-automatically-to-each-loaded-model) \r\n\r\nI have 2 million documents to process with ner model. And also I have 4 GPU. I don't wanna write script with multiprocess and manually handle each gpu. I decided to try use accelerate. \r\n\r\n```python\r\n# Assume there are two processes\r\nfrom accelerate import PartialState\r\nfrom transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline\r\n\r\nmodel = AutoModelForTokenClassification.from_pretrained('ner')\r\ntokenizer = AutoTokenizer.from_pretrained('ner')\r\n\r\nner = pipeline('token-classification', model=model, tokenizer=tokenizer, aggregation_strategy=\"simple\")\r\n\r\nstate = PartialState()\r\nner.to(state)\r\n\r\n# here the list of the list,  I wanna treat like a list of batches\r\ndata = [[{'text': 'text1', 'id': 1}, {'text': 'text2', 'id': 2}], [{'text': 'text3', 'id': 3}, {'text': 'text4', 'id': 4}] ]  \r\n\r\nresults = []\r\nwith state.split_between_processes(data) as inputs:\r\n    output = ner([i['text'] for i in inputs], max_length=128)\r\n    \r\n    for i, o in zip(inputs, outputs):\r\n        i['annotation'] = o\r\n        results.append(i)\r\n```\r\n\r\nAnd my question is: Am I properly gather results or it could be problems because its distributed between different process.\r\n\r\nHow to properly gather results when use `split_between_processes`?\r\n\r\n### Expected behavior\r\n\r\nDocumentation will have more examples how to gather data.",
    "url": "https://github.com/huggingface/accelerate/issues/2440",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-13T14:00:13Z",
    "updated_at": "2024-03-23T15:07:26Z",
    "user": "ZeusFSX"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 818,
    "title": "Settings Page Freezes",
    "body": "When I go to settings to change model (after I ran a convo with a model), the UI settings page can't be closed. It freezes. Right now I have to keep reloading the page to use it",
    "url": "https://github.com/huggingface/chat-ui/issues/818",
    "state": "closed",
    "labels": [
      "question",
      "support"
    ],
    "created_at": "2024-02-13T13:30:01Z",
    "updated_at": "2024-02-16T09:41:23Z",
    "user": "lordsoffallen"
  },
  {
    "repo": "huggingface/candle",
    "number": 1701,
    "title": "How to train my own YOLOv8 model?",
    "body": "Candle provides an example of YOLOv8, which is very useful to use.\r\nBut I don't know how to train on my own dataset? Can handle directly load the model trained by pytorch?",
    "url": "https://github.com/huggingface/candle/issues/1701",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-13T01:56:49Z",
    "updated_at": "2024-03-18T13:45:07Z",
    "user": "mzdk100"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 585,
    "title": "Using a server backend to generate masks - doublelotus",
    "body": "### Question\r\n\r\nHi there, just continuing on from my question on - https://huggingface.co/posts/Xenova/240458016943176#65ca9d9c8e0d94e48742fad7. \r\n\r\nI've just been reading through your response and initially I was trying it using a python backend and attempted to mimic the worekr.js code like so:\r\n\r\n```py\r\nfrom transformers import SamModel, SamProcessor, AutoProcessor\r\nimport numpy as np\r\n\r\nmodel = SamModel.from_pretrained(\"Xenova/sam-vit-large\")\r\nprocessor = AutoProcessor.from_pretrained(\"Xenova/sam-vit-large\")\r\n```\r\nbut was running into this error (as I'm assuming that model isn't supported for a python backend\r\nOSError: Xenova/sam-vit-large does not appear to have a file named pytorch_model.bin, tf_model.h5, model.ckpt or flax_model.msgpack.\r\n\r\nThe main reason behind trying this is because when I tried with sam-vit-base on the web app it was quite slow in generating the image embeddings, would using a node.js server to do that with the onnx server as you suggested be much faster or is there a better way to achieve that?",
    "url": "https://github.com/huggingface/transformers.js/issues/585",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-13T00:06:20Z",
    "updated_at": "2024-02-28T19:29:26Z",
    "user": "jeremiahmark"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 817,
    "title": "Question: Can someone explain \"public app data sharing with model authors\" please?",
    "body": "I am struggling to understand in which way data can or is actually shared with whom when the setting `shareConversationsWithModelAuthors` is activated (which it is by default)?\r\n```javascript\r\n{#if PUBLIC_APP_DATA_SHARING === \"1\"}\r\n\t<!-- svelte-ignore a11y-label-has-associated-control -->\r\n\t<label class=\"flex items-center\">\r\n\t\t<Switch\r\n\t\t\tname=\"shareConversationsWithModelAuthors\"\r\n\t\t\tbind:checked={$settings.shareConversationsWithModelAuthors}\r\n\t\t/>\r\n\t\t<div class=\"inline cursor-pointer select-none items-center gap-2 pl-2\">\r\n\t\t\tShare conversations with model authors\r\n\t\t</div>\r\n\t</label>\r\n\r\n\t<p class=\"text-sm text-gray-500\">\r\n\t\tSharing your data will help improve the training data and make open models better over time.\r\n\t</p>\r\n{/if}\r\n```\r\n\r\nWhat exactly will or can happen when this is activated?\r\nThanks!",
    "url": "https://github.com/huggingface/chat-ui/issues/817",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-12T19:18:03Z",
    "updated_at": "2024-02-16T14:32:18Z",
    "user": "TomTom101"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 119604,
    "title": "How to deal with mypy checking fx_node.args[i].meta?",
    "body": "# Issue\r\nIt's common in Inductor FX passes to do something like this\r\n```\r\nnode: torch.fx.Node = ...\r\narg1: torch.fx.Argument = node.args[0]\r\narg2: torch.fx.Argument = node.args[1]\r\na, b = arg1.meta, arg2.meta\r\n# do something with a & b\r\n```\r\n\r\nHowever, mypy will call this out ([see](https://mypy.readthedocs.io/en/stable/error_code_list.html#check-that-attribute-exists-in-each-union-item-union-attr)). It's checking that each attribute (i.e. `meta`) exists in each of the type listed for [fx.node.Argument](https://github.com/pytorch/pytorch/blob/a7f82b7d628eb2b966bc53e593dcf32049b2b10e/torch/fx/node.py#L26-L34).\r\n```\r\nItem ... of \"tuple[Any, ...] | list[Any] | dict[str, Any] | slice | range | Node | str | int | float | bool | complex | dtype | Tensor | device | memory_format | layout | OpOverload | None\" has no attribute \"meta\"  [union-attr]\r\n```\r\n\r\n# Workarounds\r\n1. Do some runtime checks to assure mypy that it's okay. For eg:\r\n    - `isinstance(arg1, torch.fx.Node)`\r\n    - `if hasattr(arg1, 'meta):`\r\n2. Slap on a # type: ignore[union-attr]\r\n3. Surface a `node.args` getter method in fx/node.py. Illustrated in code below.\r\n```\r\ndef get_arg(arg_type: Type[T], i: int) -> T:\r\n  assert(isinstance(self.args[i], arg_type))\r\n  return self.args[i]\r\n```\r\n\r\n# Thoughts\r\nAt the moment, (2), the slap on approach, seems to be present in quite a few places. Here's two examples ([1](https://github.com/pytorch/pytorch/pull/119085/files#diff-800bd8ca3e84db0b1988eb1c289bbe892b2acfcd013c2ff04117ce9bd5615480L346), [2](https://github.com/pytorch/pytorch/pull/119422/files#diff-118f7e6a8110f30c6894a530eea254b6cff4338add31d83825365b6cac47bdc5R368-R374)).\r\n```\r\n$ grep -P -rn \"meta.* # type: ignore\\[union-attr\\]\" torch/_inductor | wc -l\r\n22\r\n```\r\n\r\nI think we could follow (1) everytime we want to call `node.args[0].meta` or handle this at a level lower like (3) surfacing a getter method. Or maybe there's a 4th option?",
    "url": "https://github.com/pytorch/pytorch/issues/119604",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-09T22:42:44Z",
    "updated_at": "2024-02-10T00:01:10Z",
    "user": "ColinPeppler"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 119590,
    "title": "Decide whether / how to ban SAC + inplace ops in eager",
    "body": "SAC exists as an API today (see [code](https://github.com/pytorch/pytorch/blob/main/torch/utils/checkpoint.py#L1256)), but:\r\n\r\n(1) it \"context\" fn has a pt2-specific name\r\n(1) We have a warning in the docs that it should only be used with `torch.compile`\r\n(2) We have no warning or error that gets emitted at runtime if you actually use SAC with eager mode.\r\n\r\nMy understanding is that the main issue with always-allowing SAC to be used in eager has to do with handling for inplace ops. More diagnosis was in this issue: https://github.com/pytorch/pytorch/issues/113737\r\n\r\nI think it can be summarized by this repro, where eager mode vs. \"eager mode + SAC\" produce different outputs, when an inplace op is involved:\r\n```\r\nimport torch\r\nfrom torch._custom_op.functional import register_functional_op\r\nimport torch.utils.checkpoint\r\nfrom torch.utils.checkpoint import checkpoint, _pt2_selective_checkpoint_context_fn_gen\r\n\r\ndef custom_policy(mode, func, *args, **kwargs):\r\n    return func in [torch.ops.aten.mm.default]\r\n\r\ndef selective_checkpointing_context_fn():\r\n    return _pt2_selective_checkpoint_context_fn_gen(custom_policy)\r\n\r\ndef gn(x, y):\r\n    return torch.selu_(torch.matmul(x, y))\r\n\r\ndef fn(x, y):\r\n    return torch.utils.checkpoint.checkpoint(\r\n        gn,\r\n        x,\r\n        y,\r\n        use_reentrant=False,\r\n        context_fn=selective_checkpointing_context_fn,\r\n    )\r\n\r\nx = torch.arange(16, dtype=torch.float32, requires_grad=True).reshape(4, 4).detach().requires_grad_(True)\r\ny = torch.arange(16, dtype=torch.float32, requires_grad=True).reshape(4, 4).detach().requires_grad_(True)\r\n\r\nout1 = gn(x, y)\r\nprint(out1)\r\nout1.sum().backward()\r\nprint(out1)\r\n\r\nout2 = fn(x, y)\r\nprint(out2)\r\n# With SAC + eager mode:\r\n# (1) \"out\" is an activation saved for backward\r\n# (2) selu_() is part of the recompute, which mutates out **again**, during the backward pass!\r\n# Invoking the backward will mutate out!\r\nout2.sum().backward()\r\nprint(out2)\r\n# False\r\nprint(torch.allclose(out1, out2))\r\n```\r\n\r\nJust to collect some possible options:\r\n\r\n(1) [easiest] Ban SAC completely in eager\r\n(2) [medium] Ban SAC in eager whenever there are any inplace ops\r\n(3) [hard?] figure out how to detect exactly the case when outputs/gradients would diverge without SAC, and ban those cases\r\n(4) [hard?] figure out how to functionalize away an mutations in an SAC region that would have changed numerics.\r\n\r\ncc @soulitzer @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @Lezcano @Varal7",
    "url": "https://github.com/pytorch/pytorch/issues/119590",
    "state": "closed",
    "labels": [
      "module: activation checkpointing",
      "module: autograd",
      "triaged",
      "needs design"
    ],
    "created_at": "2024-02-09T20:33:05Z",
    "updated_at": "2024-06-27T20:13:20Z",
    "user": "bdhirsh"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 581,
    "title": "How can we use the sam-vit-huge in the production?",
    "body": "### Question\n\nThe size of ONNX files for sam-vit-huge is around 600MB. If I am using the implementation mentioned in the documentation, it downloads these files first before performing the image segmentation. Is there a better way to avoid downloading these files and reduce the time it takes? Additionally, the model is taking too much time to generate embeddings when using sam-vit-huge or sam-vit-large.",
    "url": "https://github.com/huggingface/transformers.js/issues/581",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-09T17:54:43Z",
    "updated_at": "2024-02-09T17:54:43Z",
    "user": "moneyhotspring"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2434,
    "title": "Create a new step: `config-features`?",
    "body": "See https://github.com/huggingface/datasets-server/issues/2215: the `features` part can be heavy, and on the Hub, when we call /rows, /filter or /search, the features content does not change; there is no need to create / serialize / transfer / parse it.\r\n\r\nWe could:\r\n- add a new /features endpoint\r\n- or add a `features: bool` parameter to all the endpoints that return rows to include the features in the response.\r\n\r\nThe only exception is when a new commit happens, and the features have changed. But the Hub could check the `X-Revision` value and reload the page in case of a mismatch.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2434",
    "state": "open",
    "labels": [
      "question",
      "refactoring / architecture",
      "P2"
    ],
    "created_at": "2024-02-09T14:13:10Z",
    "updated_at": "2024-02-15T10:26:35Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6920,
    "title": "How to merge a lot of embedding into a single file ",
    "body": "I create a lot of embedding through textual inversion, but I couldn't found a file to merge this ckpt\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/6920",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2024-02-09T08:18:42Z",
    "updated_at": "2024-03-13T15:02:51Z",
    "user": "Eggwardhan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 119479,
    "title": "torch._constrain_as_value and related APIs accept Tensor, but this is typically not what you want",
    "body": "### \ud83d\udc1b Describe the bug\n\nInternal xref: https://fb.workplace.com/groups/6829516587176185/posts/6829896033804907/\r\n\r\nBecause we are willing to call item() on scalar Tensor, these APIs will \"work\" but they will keep generating fresh unbacked symbols, so the value range ends up not getting used by anything. Would be good to warn or error if you try to pass in a Tensor to these APIs.\n\n### Versions\n\nmain\n\ncc @msaroufim @bdhirsh @anijain2305 @zou3519",
    "url": "https://github.com/pytorch/pytorch/issues/119479",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamic shapes"
    ],
    "created_at": "2024-02-08T20:13:23Z",
    "updated_at": "2024-09-13T03:10:12Z",
    "user": "ezyang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 119473,
    "title": "Document how to override autocast rules properly",
    "body": "Since autocast is implemented as a dispatcher feature, and each rule is a relatively simple kernel being registered on the right key for the right kernel.\r\n\r\nOverriding these rules can be done today by replacing the kernel registered by default with a custom one that does the appropriate casting before redispatching down in a similar way as it is done in the generic kernel we use https://github.com/pytorch/pytorch/blob/def572929b2311b769ef79e66aebc70384b0f456/aten/src/ATen/autocast_mode.h#L467-L473 .\r\n\r\nAll the tools are available to do this from a C++ extension via TORCH_LIBRARY* macros\r\nMissing pieces for python when using torch.library:\r\n- A way to call cached_cast from python https://github.com/pytorch/pytorch/blob/def572929b2311b769ef79e66aebc70384b0f456/aten/src/ATen/autocast_mode.cpp#L200C8-L200C19\r\n- A public way to disable keys in python to enable calling down\n\ncc @mcarilli @ptrblck @leslie-fang-intel @jgong5",
    "url": "https://github.com/pytorch/pytorch/issues/119473",
    "state": "open",
    "labels": [
      "triaged",
      "module: amp (automated mixed precision)"
    ],
    "created_at": "2024-02-08T19:02:00Z",
    "updated_at": "2024-02-08T20:43:22Z",
    "user": "albanD"
  },
  {
    "repo": "pytorch/serve",
    "number": 2933,
    "title": "https://github.com/pytorch/serve/issues/2870 - New Release Required for this Fix",
    "body": "### \ud83d\udc1b Describe the bug\n\nTeam,\r\n\r\nseems like worker auto recovery fix in this PR. Can we create patch release so that we can proceed with production update?\r\n\r\nThanks\r\n\r\nRegards,\r\nDeepak Kumar A\n\n### Error logs\n\nNA\n\n### Installation instructions\n\nNA\n\n### Model Packaing\n\nNA\n\n### config.properties\n\n_No response_\n\n### Versions\n\n0.8.1\n\n### Repro instructions\n\n0.8.1\n\n### Possible Solution\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2933",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-08T14:23:49Z",
    "updated_at": "2024-03-20T21:51:41Z",
    "comments": 2,
    "user": "DeepakkumarArumugam"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28924,
    "title": "How to disable log history from getting printed every logging_steps",
    "body": "I'm writing a custom ProgressCallback that modifies the original ProgressCallback transformers implementation and adds some additional information/data to the tqdm progress bar. Here's what I have so far, and it works nicely and as intended.\r\n\r\n```python\r\nclass ProgressCallback(TrainerCallback):\r\n    \"\"\"A [`TrainerCallback`] that displays the progress of training or evaluation.\r\n\r\n    Specifically, it shows:\r\n    1. Time spent so far in training or evaluation.\r\n    2. Estimated time remaining for training or evaluation.\r\n    3. Iterations per second.\r\n    4. Loss.\r\n    5. Number of input tokens seen so far.\r\n    \"\"\"\r\n\r\n    def __init__(self):\r\n        self.training_bar = None\r\n        self.prediction_bar = None\r\n        self.current_step: int = 0\r\n        self.loss: float = math.nan\r\n        self.num_input_tokens_seen = format_number_suffix(0)\r\n\r\n    def on_train_begin(self, args, state, control, **kwargs):\r\n        if state.is_world_process_zero:\r\n            self.training_bar = tqdm(total=state.max_steps, dynamic_ncols=True)\r\n\r\n    def on_step_end(self, args, state, control, **kwargs):\r\n        if state.is_world_process_zero:\r\n            self.training_bar.update(state.global_step - self.current_step)\r\n            self.current_step = state.global_step\r\n\r\n    def on_prediction_step(self, args, state, control, eval_dataloader=None, **kwargs):\r\n        if state.is_world_process_zero and has_length(eval_dataloader):\r\n            if self.prediction_bar is None:\r\n                self.prediction_bar = tqdm(\r\n                    total=len(eval_dataloader),\r\n                    leave=self.training_bar is None,\r\n                    dynamic_ncols=True,\r\n                )\r\n            self.prediction_bar.update(1)\r\n\r\n    def on_evaluate(self, args, state, control, **kwargs):\r\n        if state.is_world_process_zero:\r\n            if self.prediction_bar is not None:\r\n                self.prediction_bar.close()\r\n            self.prediction_bar = None\r\n\r\n    def on_predict(self, args, state, control, **kwargs):\r\n        if state.is_world_process_zero:\r\n            if self.prediction_bar is not None:\r\n                self.prediction_bar.close()\r\n            self.prediction_bar = None\r\n\r\n    def on_log(self, args, state, control, logs=None, **kwargs):\r\n        if state.is_world_process_zero and self.training_bar is not None:\r\n            # The last callback_handler.on_log() call in the training loop logs `train_loss` as opposed to `loss`.\r\n            # From some digging through transformers code, the `train_loss` is the average training loss\r\n            # during training.\r\n            # See: https://github.com/huggingface/transformers/blob/v4.27.2/src/transformers/trainer.py#L2025-L2026\r\n            self.loss = (\r\n                state.log_history[-1][\"loss\"]\r\n                if state.log_history and \"loss\" in state.log_history[-1]\r\n                else state.log_history[-1][\"train_loss\"]\r\n            )\r\n            self.num_input_tokens_seen = format_number_suffix(state.num_input_tokens_seen)\r\n            self.training_bar.set_postfix_str(\r\n                f\"loss: {self.loss:.4f}, tokens: {self.num_input_tokens_seen}\",\r\n            )\r\n\r\n    def on_train_end(self, args, state, control, **kwargs):\r\n        if state.is_world_process_zero:\r\n            self.training_bar.close()\r\n            self.training_bar = None\r\n```\r\n\r\nIn my trainer arguments, I explicitly `disable_tdqm` so I can pass this as a custom callback in place of the original ProgressCallback. I also set `logging_steps` to 1 so that I can get metrics back from every step through the `log_history` attribute in the TrainerState object. \r\n\r\nThe challenge I'm having is that it logs the metric to stdout, but I am not sure where that actually comes from in the code. I don't want that behavior since I want to surface relevant information directly in my TQDM progress back through my callback. Looking at the transformers trainer, I've narrowed down that metrics get pass to `on_log` in the callback, and that seems to happen from within this function at the end of each step of training and then again at the end of training: https://github.com/huggingface/transformers/blob/v4.27.2/src/transformers/trainer.py#L2224 \r\n\r\nWhen I set a breakpoint at the end of `on_log` in my callback, I can confirm that the logs object doesn't get printed to stdout. So it happens somewhere between that and this looping to get to the next train step, but not sure if I am missing something obvious since I'm still new to the transformers codebase.\r\n\r\nHere's what I see in my output:\r\n```\r\n***** Running training *****\r\n  Num examples = 183\r\n  Num Epochs = 3\r\n  Instantaneous batch size per device = 1\r\n  Total train batch size (w. parallel, distributed & accumulation) = 16\r\n  Gradient Accumulation steps = 16\r\n  Total optimization steps = 33\r\n  Number of trainable parameters = 256\r\n  3%|\u2588\u2588\u258d                                                                               | 1/33 [00:01<00:34,  1.07s/it, loss",
    "url": "https://github.com/huggingface/transformers/issues/28924",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-08T10:23:28Z",
    "updated_at": "2024-02-08T17:26:02Z",
    "user": "arnavgarg1"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 120,
    "title": "(QLoRA) DPO without previous SFT",
    "body": "Because of the following LLM-Leaderboard measurements, I want to perform QLoRA DPO without previous QLoRA SFT:\r\n```\r\nalignment-handbook/zephyr-7b-dpo-qlora:     +Average: 63.51;  +ARC 63.65;   +HSwag 85.35; -+MMLU 63.82; ++TQA: 47.14; (+)Win 79.01; +GSM8K 42.08;   \r\n\r\nalignment-handbook/zephyr-7b-sft-qlora:     -Average: 59;   (+)ARC 60.07; (-)HSwag 82.36;   -MMLU 61.65; -TQA: 38.88;   -Win 76.8;  -GSM8K 34.27;   \r\n\r\nmistralai/Mistral-7B-v0.1:    Average: 60.97;   ARC 59.98;    HSwag 83.31;   MMLU 64.16;   TQA: 42.15;    Win 78.37;  GSM8K 37.83; \r\n```\r\nAs you can see, there is catastrophic forgetting in `zephyr-7b-sft-qlora` in almost all tasks, especially in MMLU, TruthfulQA, and GSM8K. Thus I wonder why do SFT at all?\r\n\r\nIn more detail\r\n============\r\n\r\nQ1: Why is there so much catastrophic forgetting in `zephyr-7b-sft-qlora` ? Due to the following improvements by DPO, the dataset seems to be apt. \r\n\r\nQ2: Why is SFT performed before DPO at all? Is it some prerequisite, like SFT training the model to follow instructions at all, before DPO aligning the responses to instructions with human preferences? \r\n\r\nQ3: I tried the following for DPO without previous SFT:\r\nModify `recipes/zephyr-7b-beta/dpo/config_qlora.yaml` by using `model_name_or_path: mistralai/Mistral-7B-v0.1` and then calling `scripts/run_dpo.py` on it:\r\n```\r\necho -e \"2,3c2\\n< model_name_or_path: mistralai/Mistral-7B-v0.1\\n< model_revision: main\\n---\\n> model_name_or_path: alignment-handbook/zephyr-7b-sft-qlora\\n36c35\\n< gradient_accumulation_steps: 8\\n---\\n> gradient_accumulation_steps: 2\\n40c39\\n< hub_model_id: zephyr-7b-dpo-qlora-no-sft\\n---\\n> hub_model_id: zephyr-7b-dpo-qlora\\n49,51c48,50\\n< output_dir: data/zephyr-7b-dpo-qlora-no-sft # It is handy to append `hub_model_revision` to keep track of your local experiments\\n< per_device_train_batch_size: 1\\n< per_device_eval_batch_size: 2\\n---\\n> output_dir: data/zephyr-7b-dpo-qlora # It is handy to append `hub_model_revision` to keep track of your local experiments\\n> per_device_train_batch_size: 4\\n> per_device_eval_batch_size: 8\\n53,55d51\\n< report_to:\\n< - tensorboard\\n< - wandb\" | patch recipes/zephyr-7b-beta/dpo/config_qlora.yaml\r\nACCELERATE_LOG_LEVEL=info accelerate launch --config_file recipes/accelerate_configs/multi_gpu.yaml --num_processes=1 scripts/run_dpo.py recipes/zephyr-7b-beta/dpo/config_qlora.yaml\r\n```\r\nHowever, I get the error described at https://github.com/huggingface/alignment-handbook/issues/93. The solution there inspired me to do the following (so I don't have to go into the cache to replace tokenizer configs): Add in line 77 of `src/alignment/data.py`\r\n```\r\ntokenizer.chat_template = \"{% for message in messages %}\\n{% if message['role'] == 'user' %}\\n{{ '<|user|>\\n' + message['conten\\\r\nt'] + eos_token }}\\n{% elif message['role'] == 'system' %}\\n{{ '<|system|>\\n' + message['content'] + eos_token }}\\n{% elif message['role'] \\\r\n== 'assistant' %}\\n{{ '<|assistant|>\\n'  + message['content'] + eos_token }}\\n{% endif %}\\n{% if loop.last and add_generation_prompt %}\\n{{\\\r\n '<|assistant|>' }}\\n{% endif %}\\n{% endfor %}\"\r\n ```\r\nBut Mistral's `default_chat_template` already allows system messages, so the problem seems to be that the dialogs in the dataset really do not alternate between user and assistant messages. Right? What is the reason for this?\r\n\r\nMistrals `default_chat_template` causing the error message:\r\n```                                                   \r\n{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% elif false == true and not '<<SYS>>' in messages[0]['content'] %}{% set loop_messages = messages %}{% set system_message = 'You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, \r\nracist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.\\n\\nIf a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don\\'t know\r\n the answer to a question, please don\\'t share false information.' %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.index0 == 0 and system_message != false %}{% set conte\r\nnt = '<<SYS>>\\n' + system_message + '\\n<</SYS>>\\n\\n' + message['content'] %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{{ bos_token + '[INST] ' + content.strip() + ' [/INST]' }}{% elif message['role'] == 'system' %}{{ '<<SYS>>\\n' + content.strip() + '\\n<</SYS>>\\n\\n' }}{% elif message['role'] == 'assistant' %}{{ ' '  + content.strip() + ' ' + eos_token }}{% endif %}{%",
    "url": "https://github.com/huggingface/alignment-handbook/issues/120",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-08T09:56:50Z",
    "updated_at": "2024-02-09T22:15:10Z",
    "comments": 1,
    "user": "DavidFarago"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 577,
    "title": "Getting 'fs is not defined' when trying the latest \"background removal\" functionality in the browser?",
    "body": "### Question\r\n\r\nI copied the code from https://github.com/xenova/transformers.js/blob/main/examples/remove-background-client/main.js to here, but I'm getting this error with v2.15.0 of @xenova/transformers.js:\r\n\r\n```\r\nUncaught ReferenceError: fs is not defined\r\n    at env.js:36:31\r\n    at [project]/node_modules/.pnpm/@xenova+transformers@2.15.0/node_modules/@xenova/transformers/src/env.js [app-client] (ecmascript) (http://localhost:3001/_next/static/chunks/8484b_%40xenova_transformers_src_5fe153._.js:258:3)\r\n    at runtime-base.ts:322:21\r\n    at runModuleExecutionHooks (runtime-base.ts:376:5)\r\n    at instantiateModule (runtime-base.ts:321:5)\r\n    at getOrInstantiateModuleFromParent (runtime-base.ts:424:10)\r\n    at esmImport (runtime-utils.ts:205:18)\r\n    at hub.js:6:2\r\n    at [project]/node_modules/.pnpm/@xenova+transformers@2.15.0/node_modules/@xenova/transformers/src/utils/hub.js [app-client] (ecmascript) (http://localhost:3001/_next/static/chunks/8484b_%40xenova_transformers_src_5fe153._.js:783:3)\r\n    at runtime-base.ts:322:21\r\n    at runModuleExecutionHooks (runtime-base.ts:376:5)\r\n    at instantiateModule (runtime-base.ts:321:5)\r\n    at getOrInstantiateModuleFromParent (runtime-base.ts:424:10)\r\n    at esmImport (runtime-utils.ts:205:18)\r\n    at tokenizers.js:21:2\r\n    at [project]/node_modules/.pnpm/@xenova+transformers@2.15.0/node_modules/@xenova/transformers/src/tokenizers.js [app-client] (ecmascript) (http://localhost:3001/_next/static/chunks/8484b_%40xenova_transformers_src_5fe153._.js:6729:3)\r\n    at runtime-base.ts:322:21\r\n    at runModuleExecutionHooks (runtime-base.ts:376:5)\r\n    at instantiateModule (runtime-base.ts:321:5)\r\n    at getOrInstantiateModuleFromParent (runtime-base.ts:424:10)\r\n    at esmImport (runtime-utils.ts:205:18)\r\n    at pipelines.js:14:2\r\n    at [project]/node_modules/.pnpm/@xenova+transformers@2.15.0/node_modules/@xenova/transformers/src/pipelines.js [app-client] (ecmascript) (http://localhost:3001/_next/static/chunks/8484b_%40xenova_transformers_src_5fe153._.js:17183:3)\r\n    at runtime-base.ts:322:21\r\n    at runModuleExecutionHooks (runtime-base.ts:376:5)\r\n    at instantiateModule (runtime-base.ts:321:5)\r\n    at getOrInstantiateModuleFromParent (runtime-base.ts:424:10)\r\n    at esmImport (runtime-utils.ts:205:18)\r\n    at 8484b_@xenova_transformers_src_5fe153._.js:17215:237\r\n    at [project]/node_modules/.pnpm/@xenova+transformers@2.15.0/node_modules/@xenova/transformers/src/transformers.js [app-client] (ecmascript) {module evaluation} (http://localhost:3001/_next/static/chunks/8484b_%40xenova_transformers_src_5fe153._.js:17228:3)\r\n    at runtime-base.ts:322:21\r\n    at runModuleExecutionHooks (runtime-base.ts:376:5)\r\n    at instantiateModule (runtime-base.ts:321:5)\r\n    at getOrInstantiateModuleFromParent (runtime-base.ts:424:10)\r\n    at esmImport (runtime-utils.ts:205:18)\r\n    at _b29e97._.js:19146:268\r\n    at [project]/app/remove/background/page.tsx [app-client] (ecmascript) (http://localhost:3001/_next/static/chunks/_b29e97._.js:19389:3)\r\n    at runtime-base.ts:322:21\r\n    at runModuleExecutionHooks (runtime-base.ts:376:5)\r\n    at instantiateModule (runtime-base.ts:321:5)\r\n    at getOrInstantiateModuleFromParent (runtime-base.ts:424:10)\r\n    at commonJsRequire (runtime-utils.ts:230:18)\r\n    at requireModule (react-server-dom-turbopack-client.browser.development.js:154:23)\r\n    at initializeModuleChunk (react-server-dom-turbopack-client.browser.development.js:1336:17)\r\n    at readChunk (react-server-dom-turbopack-client.browser.development.js:1146:7)\r\n    at mountLazyComponent (react-dom.development.js:16652:19)\r\n    at beginWork$1 (react-dom.development.js:18388:16)\r\n    at beginWork (react-dom.development.js:26791:14)\r\n    at performUnitOfWork (react-dom.development.js:25637:12)\r\n    at workLoopSync (react-dom.development.js:25353:5)\r\n```\r\n\r\nAny idea what is wrong and how to fix it? Here is my code, which basically a direct React.js port of the background removal example you all shared:\r\n\r\n```tsx\r\n'use client'\r\n\r\nimport {\r\n  AutoModel,\r\n  AutoProcessor,\r\n  env,\r\n  PreTrainedModel,\r\n  Processor,\r\n  RawImage,\r\n} from '@xenova/transformers'\r\nimport React, {\r\n  MouseEvent,\r\n  useCallback,\r\n  useEffect,\r\n  useRef,\r\n  useState,\r\n} from 'react'\r\nimport _ from 'lodash'\r\nimport FileDropzone from '~/components/FileDropzone'\r\n\r\n// Since we will download the model from the Hugging Face Hub, we can skip the local model check\r\nenv.allowLocalModels = false\r\n\r\n// Proxy the WASM backend to prevent the UI from freezing\r\nenv.backends.onnx.wasm.proxy = true\r\n\r\nfunction useModel(): {\r\n  model?: PreTrainedModel\r\n  processor?: Processor\r\n} {\r\n  const [model, setModel] = useState<PreTrainedModel>()\r\n  const [processor, setProcessor] = useState<Processor>()\r\n\r\n  useEffect(() => {\r\n    AutoModel.from_pretrained('briaai/RMBG-1.4', {\r\n      config: { model_type: 'custom' },\r\n    }).then(m => {\r\n      setModel(m)\r\n    })\r\n\r\n    AutoProcessor.from_pretrained('briaai/RMBG-1.4', {\r\n      config: {\r\n  ",
    "url": "https://github.com/huggingface/transformers.js/issues/577",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-08T04:34:59Z",
    "updated_at": "2024-11-26T05:20:22Z",
    "user": "lancejpollard"
  },
  {
    "repo": "pytorch/serve",
    "number": 2930,
    "title": "How would you deploy a new model on a torch server running within a container?",
    "body": "I am looking for options to use torchserve to deploy multiple models at once. However, in the documentation and guides I cannot find examples where it is done. The examples usually describe a scenario of starting a torchserve container for a given model.\r\n\r\nMy question is if I have a torchserve container running, is there a way to deploy a new model to it without restarting the container and without downtime for the models already running on the server?\r\n\r\nI assume I need to copy the model archive in the proper place within the container and register it via the API, although I am not sure this is possible and ok to do?\r\n\r\nWhat would you advise me?\r\n\r\nPerhaps, it would be nice to have some documentation on this.",
    "url": "https://github.com/pytorch/serve/issues/2930",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-07T14:51:06Z",
    "updated_at": "2024-02-07T16:33:20Z",
    "comments": 1,
    "user": "mihailyanchev"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 575,
    "title": "Can GPU acceleration be used when using this library in a node.js environment?",
    "body": "### Question\n\nHello, I have looked into the GPU support related issue, but all mentioned content is related to webGPU. May I ask if GPU acceleration in the node.js environment is already supported? Refer: https://github.com/microsoft/onnxruntime/tree/main/js/node",
    "url": "https://github.com/huggingface/transformers.js/issues/575",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-07T03:37:50Z",
    "updated_at": "2025-01-20T15:05:00Z",
    "user": "SchneeHertz"
  },
  {
    "repo": "pytorch/vision",
    "number": 8259,
    "title": "support for convnextv2",
    "body": "### \ud83d\ude80 The feature\n\nis there any plan for adding convext-v2\n\n### Motivation, pitch\n\nConvNeXt-V2 introduce FCMAE self sup pretrain and gain the performance for 0.5~1.5% top1 acc.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/8259",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-07T01:45:29Z",
    "updated_at": "2024-02-07T01:45:29Z",
    "comments": 0,
    "user": "chaoer"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2408,
    "title": "Add task tags in /hub-cache?",
    "body": "On the same model as https://github.com/huggingface/datasets-server/pull/2386, detect and associate tags to a dataset to describe the tasks it can be used for.\r\n\r\nPreviously discussed at https://github.com/huggingface/datasets-server/issues/561#issuecomment-1250029425",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2408",
    "state": "closed",
    "labels": [
      "question",
      "feature request",
      "P2"
    ],
    "created_at": "2024-02-06T11:17:19Z",
    "updated_at": "2024-06-19T15:43:15Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2407,
    "title": "Remove env var HF_ENDPOINT?",
    "body": "Is it still required to set HF_ENDPOINT as an environment variable?\r\n\r\nhttps://github.com/huggingface/datasets-server/blob/main/services/worker/src/worker/resources.py#L41-L45\r\n\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2407",
    "state": "closed",
    "labels": [
      "duplicate",
      "question",
      "refactoring / architecture",
      "P2"
    ],
    "created_at": "2024-02-06T11:11:24Z",
    "updated_at": "2024-02-06T14:53:12Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 786,
    "title": "Can't get Mixtral to work with web-search",
    "body": "I have been following this project for a while and recently tried setting up oobabooga Mixtral-8x7b\r\n\r\nI used the official prompt template used in huggingface.co :\r\n\r\n```\r\n<s> {{#each messages}}{{#ifUser}}[INST]{{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\\n{{/if}}{{/if}} {{content}} [/INST]{{/ifUser}}{{#ifAssistant}} {{content}}</s> {{/ifAssistant}}{{/each}}\r\n``` \r\n\r\nNormal chat works, and summarization for the title works, but web-search does not.\r\nIt always gives the full answer instead of a search term.\r\n\r\n![image](https://github.com/huggingface/chat-ui/assets/20077386/19f307ec-96a0-4e33-9f03-90755242da6c)\r\n\r\n\r\nHere is my local.env:\r\n\r\n\r\n```\r\nMONGODB_URL=mongodb://localhost:27017\r\nUSE_LOCAL_WEBSEARCH=true\r\nPUBLIC_APP_ASSETS=chatui\r\nHF_ACCESS_TOKEN=hf_none\r\nPUBLIC_APP_DESCRIPTION=\"ChatGPT But Open Source!\"\r\nPUBLIC_APP_NAME=ChatGPT\r\nMODELS=`[\r\n  {\r\n      \"name\": \"LocalGPT\",\r\n      \"description\": \"Mixtral is a great overall model\",\r\n      \"chatPromptTemplate\" : \"<s> {{#each messages}}{{#ifUser}}[INST]{{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\\n{{/if}}{{/if}} {{content}} [/INST]{{/ifUser}}{{#ifAssistant}} {{content}}</s> {{/ifAssistant}}{{/each}}\",\r\n       \"preprompt\": \"\",\r\n       \"promptExamples\": [\r\n      {\r\n        \"title\": \"Write an email from bullet list\",\r\n        \"prompt\": \"As a restaurant owner, write a professional email to the supplier to get these products every week: \\n\\n- Wine (x10)\\n- Eggs (x24)\\n- Bread (x12)\"\r\n      }, {\r\n        \"title\": \"Code a snake game\",\r\n        \"prompt\": \"Code a basic snake game in python and give explanations for each step.\"\r\n      }, {\r\n        \"title\": \"Assist in a task\",\r\n        \"prompt\": \"How do I make a delicious lemon cheesecake?\"\r\n      }\r\n      ],\r\n      \"parameters\": {\r\n        \"temperature\": 0.3,\r\n        \"top_p\": 0.95,\r\n        \"repetition_penalty\": 1.2,\r\n        \"top_k\": 50,\r\n        \"truncate\": 3072,\r\n        \"max_new_tokens\": 2048,\r\n        \"stop\": [\"</s>\"]\r\n    },\r\n    \"endpoints\": [{\r\n      \"type\" : \"openai\",\r\n      \"baseURL\": \"http://127.0.0.1:5000/v1\"\r\n    }]\r\n  }\r\n]`\r\n\r\n``` \r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/786",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-06T07:14:08Z",
    "updated_at": "2024-02-16T10:45:40Z",
    "comments": 2,
    "user": "iChristGit"
  },
  {
    "repo": "pytorch/kineto",
    "number": 864,
    "title": "Question about how to run \"make test\" correctly?",
    "body": "Hi guys,\r\n     Follow the steps in [README.md](https://github.com/pytorch/kineto/tree/main/libkineto), I have succeed to build Libkineto. Then, I start to run the tests with the command \"make test\", but it doesn't change anything. In this [CMakeLists.txt](https://github.com/pytorch/kineto/blob/main/libkineto/CMakeLists.txt) file, it seems like that you just add the test folder in this project but do not build anything, so I am very confused about  how to \"make test\" and what is the meanning of \r\n\r\n> (if tests are built) \r\n\r\nAnyway... Could somebody tell me how to build and run the code in the test folder?  Thanks ",
    "url": "https://github.com/pytorch/kineto/issues/864",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-02-06T06:01:11Z",
    "updated_at": "2024-04-23T15:45:46Z",
    "user": "PriscillaJCorn"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2402,
    "title": "Reduce resources for /filter and /search?",
    "body": "They have nearly 0 traffic. https://grafana.huggingface.tech/d/i7gwsO5Vz/global-view?orgId=1&from=now-6h&to=now\r\n\r\nShould we reduce the number of pods? How to configure the right level?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2402",
    "state": "closed",
    "labels": [
      "question",
      "infra",
      "P2",
      "prod"
    ],
    "created_at": "2024-02-05T21:44:56Z",
    "updated_at": "2024-02-28T17:55:50Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/examples",
    "number": 1229,
    "title": "If I am training on a SINGLE GPU, should this \"--dist-backend 'gloo'\" argument be added to the command?",
    "body": "@Jaiaid \r\n\r\nIs this **\"--dist-backend 'gloo'\"** be included in the terminal command if using a **SINGLE GPU** or having just one GPU on the machine?\r\n\r\nIs the following example command correct for SINGLE GPU?\r\n\r\npython main.py **--dist-backend 'gloo'** -a resnet18 [imagenet-folder with train and val folders]\r\n\r\nIs that what your new committed warning implies?",
    "url": "https://github.com/pytorch/examples/issues/1229",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-05T17:11:50Z",
    "updated_at": "2024-02-07T08:01:12Z",
    "comments": 10,
    "user": "HassanBinHaroon"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2390,
    "title": "Store the repo visibility (public/private) to filter webhooks",
    "body": "See https://github.com/huggingface/datasets-server/pull/2389#pullrequestreview-1862425050\r\n\r\nNot sure if we want to do it, or wait for the Hub to provide more finely scoped webhooks. See also #2208, where we wanted to store metadata about the datasets.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2390",
    "state": "closed",
    "labels": [
      "question",
      "P2"
    ],
    "created_at": "2024-02-05T12:37:30Z",
    "updated_at": "2024-06-19T15:37:36Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 567,
    "title": "Does await pipeline() support multithreading? I've tried all kinds of multithreaded calls and it still returns the results one by one in order.",
    "body": "### Question\n\nDoes await pipeline() support multithreading? I've tried all kinds of multithreaded calls and it still returns the results one by one in order.",
    "url": "https://github.com/huggingface/transformers.js/issues/567",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-05T11:12:34Z",
    "updated_at": "2024-02-05T11:12:34Z",
    "user": "a414166402"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 565,
    "title": "How can i use this Model for image matting?",
    "body": "### Question\n\nhttps://github.com/ZHKKKe/MODNet?tab=readme-ov-file\r\n\r\nThey have ONNX file and the python cli usage looks simple, but I can't find how to use with transformers.js.\r\n```\r\n!python -m demo.image_matting.colab.inference \\\r\n        --input-path demo/image_matting/colab/input \\\r\n        --output-path demo/image_matting/colab/output \\\r\n        --ckpt-path ./pretrained/modnet_photographic_portrait_matting.ckpt\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/565",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-05T09:28:28Z",
    "updated_at": "2024-02-07T11:33:26Z",
    "user": "cyio"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 564,
    "title": "Can models from user disks load and run in my HF space?",
    "body": "### Question\r\n\r\nIm fiddling around with the react-translator template.\r\nWhat I have accomplished so far:\r\n- Run local (on disk in public folder) model in localhost webapp.\r\n- Run hosted (on HF) model in localhost webapp.\r\n- Run hosted (on HF) model in HF Space webapp.\r\n\r\nWhat i want to accomplish but can't figure out:\r\n- Use local (on disk in any folder) model in HF Space webapp.\r\n\r\nIs this possible? \r\n\r\nFrom what i understand so far, local models have to be in the public folder of the webapp, but that defeats the purpose of my webapp, which would be to allow users to benchmark models from any folder of their disk in my HF Space. \r\n\r\nPreferably the user would provide a path or use drag'n'drop to provide their model folder location on the disk and the webapp would then proceed to load the model from the provided location into the application cache. \r\n\r\nThe reason i need this specific setup is because i work on a benchmarking tool and I don't want to force users to host their models on HF in order to be able to benchmark them.",
    "url": "https://github.com/huggingface/transformers.js/issues/564",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-05T08:00:55Z",
    "updated_at": "2024-06-07T01:17:24Z",
    "user": "saferugdev"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28860,
    "title": "Question: How do LLMs learn to be \"Generative\", as we often describe them?",
    "body": "(Please forgive me and let me know if I'm not allowed to ask this kind of question here. I'm so sorry if I'm bothering everyone.)\r\n\r\nAFAIK to be called \"generative\", a model should have the ability to learn the joint probability over the training data. In the case of LLMs, we apply the chain rule of Bayes' formula to achieve this by leveraging the autoregressive method for every token of each input text sequence. For example, with a text sequence of 4 tokens, it can be written as:\r\n```\r\np(x4,x3,x2,x1) = p(x4|x3,x2,x1) * p(x3|x2,x1) * p(x2|x1) * p(x1)\r\n```\r\nwhere `x1` denotes the 1st token, `x2` denotes the 2nd token and so on, respectively.\r\n\r\nI understand the conditional terms `p(x_n|...)` where we use cross-entropy to calculate their losses. However, I'm unsure about the probability of the very first token `p(x1)`. How is it calculated? Is it in some configurations of the training process, or in the model architecture, or in the loss function?\r\n\r\nIMHO, if the model doesn't learn `p(x1)` properly, the entire formula for Bayes' rule cannot be completed, and we can't refer to LLMs as \"truly generative\". Am I missing something here?\r\n\r\nI asked the [same question on `nanoGPT` repo](https://github.com/karpathy/nanoGPT/issues/432) and [on HN](https://news.ycombinator.com/item?id=39249301). I'm also reading Transformer codes from this repo, but I haven't found the answer I'm looking for yet. Could someone please enlighten me? Thank in advance!",
    "url": "https://github.com/huggingface/transformers/issues/28860",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-05T07:10:23Z",
    "updated_at": "2024-02-05T12:22:27Z",
    "user": "metalwhale"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2470,
    "title": "BGE Reranker / BERT Crossencoder Onnx model latency issue",
    "body": "I am using the Int8 quantized version of BGE-reranker-base model converted to the Onnx model. I am processing the inputs in batches. Now the scenario is that I am experiencing a latency of 20-30 secs with the original model. With the int8 quantized and onnx optimized model, the latency was reduced to 8-15 secs keeping all the configurations the same like hardware, batch processing, and everything I used with the original torch model. \r\nI am using Flask as an API server, on a quad-core machine.\r\nI want further to reduce the model latency of the Onnx model. How can I do so?\r\nAlso please suggest anything more I can do during the deployment ",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2470",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-05T05:54:18Z",
    "updated_at": "2024-02-09T06:59:51Z",
    "user": "ojasDM"
  },
  {
    "repo": "pytorch/xla",
    "number": 6464,
    "title": "How to benchmark PyTorch XLA code properly",
    "body": "## \u2753 Questions and Help\r\nHi! I'm trying to benchmark some pytorch XLA code, and can't find a way how to do it correctly.\r\n\r\nFor simplicity what's I'm benchmarking is `torch.matmul(a, b)`. Firstly I created the most straightforward version of benchmarking, inspired by cuda & triton benchmarking code:\r\n```\r\n# create tensors\r\na = torch.randn((N, K), device=device, dtype=dtype)\r\nb = torch.randn((K, M), device=device, dtype=dtype)\r\n\r\ndef fn():\r\n  torch.matmul(a, b)\r\n\r\nbenchmark(fn) # here I'm doing warmup runs/multiple fn runs\r\n```\r\nThis way it didn't work, effectively rendering benchmark to be immediate.\r\nI realized that no work is actually happening since tensors are lazy, so I've added `xm.unlazy` calls after `fn` run with `matmul` result tensor. However I still was getting numbers which look like no work is being done.\r\n\r\nMy theory was that since that structure of computation is not changing backend is reusing results. So I tried to regenerate inputs on each iteration. I tried different approaches, with full regenerate, or with some ways so prepare is faster, such as:\r\n```\r\ndef prepare():\r\n  a[0, 0] += 1\r\n  b[0, 0] += 1\r\n  return [a.clone().detach(), b.clone().detach()]\r\n```  \r\n\r\nBut with neither of my attempts I was able to achieve proper measurement of `matmul` function. I feel like I'm either measuring compilation speed, or no-op speed. Any tips on how to write this benchmark / establish better mental model when / how to avoid recompilation of the code, but still execution of it?\r\n\r\nThanks in advance!",
    "url": "https://github.com/pytorch/xla/issues/6464",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-05T00:55:57Z",
    "updated_at": "2025-04-21T13:15:33Z",
    "user": "ttim"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 774,
    "title": "Where are the image and pdf upload features when running on locally using this repo?",
    "body": "I see there are issues and features being talked about and added for the image upload and parsing PDFs as markdown etc. However, I dont see these features in when I cloned this repo and started chatui using \"npm run dev\" locally. \r\nAm I missing something? \r\n\r\n#641 are the features I am talking about. ",
    "url": "https://github.com/huggingface/chat-ui/issues/774",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-05T00:41:05Z",
    "updated_at": "2024-02-05T08:48:29Z",
    "comments": 1,
    "user": "zubu007"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 771,
    "title": "using openai api key for coporate",
    "body": "Hi\r\nWe are working with an open ai key for our corporate ( it has a corporate endpoint) \r\nthis is how we added the model to .env.local\r\n```\r\nMODELS=`[\r\n  {\r\n    \"name\": \"Corporate local instance of GPT 3.5 Model\",\r\n    \"endpoints\": [{\r\n      \"type\": \"openai\",\r\n      \"url\": \"corporate url\"\r\n      }],\r\n    \"userMessageToken\": \"User: \",\r\n    \"assistantMessageToken\": \"Assistant: \",\r\n    \"messageEndToken\": \"</s>\",\r\n    \"preprompt\": \" \",\r\n    \"prepromptUrl\": \"http://127.0.0.1:8000/preprompt.txt\",\r\n    \"parameters\": {\r\n    \"temperature\": 0.9,\r\n    \"max_new_tokens\": 1024,\r\n    \"truncate\": 31000\r\n    },\r\n```\r\nThe problem I can't connet t to the model there are authentications issues. this is what we get:\r\n\r\n\r\nanyone else tried to connect with corporate openai api key?\r\nHow can we solve this?\r\nwe can connect to the model using python so this is not an issue with the credentials.",
    "url": "https://github.com/huggingface/chat-ui/issues/771",
    "state": "open",
    "labels": [
      "models"
    ],
    "created_at": "2024-02-04T11:23:59Z",
    "updated_at": "2024-02-06T15:01:50Z",
    "comments": 1,
    "user": "RachelShalom"
  },
  {
    "repo": "huggingface/optimum-neuron",
    "number": 460,
    "title": "[QUESTION] What is the difference between optimum-neuron and transformers-neuronx?",
    "body": "I would like to understand the differences between this optimum-neuron and [transformers-neuronx](https://github.com/aws-neuron/transformers-neuronx).",
    "url": "https://github.com/huggingface/optimum-neuron/issues/460",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-02T18:27:46Z",
    "updated_at": "2024-03-27T11:04:52Z",
    "user": "leoribeiro"
  },
  {
    "repo": "pytorch/tensordict",
    "number": 656,
    "title": "[Feature Request] Docs don't mention how to install tensordict / that it's a seperate package from torch",
    "body": "## Motivation\r\n\r\nAs a user, the first thing I'd want to see when looking at a docs for a package is something like:\r\n\r\n```\r\npip install <package>\r\n```\r\nOr \r\n```\r\nconda install <package>\r\n```\r\nThis seems like it's currently missing from the docs [here](https://pytorch.org/tensordict). It is included in the Github readme, but when googling \"tensordict\" the docs on pytorch.org come up first.\r\n\r\nReason it would be good to include is that the docs seem to be sub-docs of pytorch, and therefore at first glance it isn't clear that `tensordict` is not included in the `pytorch` package distribution, and needs to be installed separately.\r\n\r\n## Solution\r\n\r\nThis to be added to the docs.\r\n\r\n## Alternatives\r\n\r\n## Additional context\r\n\r\n## Checklist\r\n\r\n- [x] I have checked that there is no similar issue in the repo (**required**)\r\n\r\n(Happy to add this if it seems like a good idea.)",
    "url": "https://github.com/pytorch/tensordict/issues/656",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-02-02T17:50:58Z",
    "updated_at": "2024-02-05T13:49:01Z",
    "user": "sradc"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2858,
    "title": "Better specify `torch.compile behaviour` on nested function/module",
    "body": "### \ud83d\udcda The doc issue\n\nCan we better specify the behavior and eventually the best practices when decorating a function or compiling a module and the effect on the nested modules and nested function call?\r\n\r\nhttps://pytorch.org/tutorials/intermediate/torch_compile_tutorial.html\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @sekyondaMeta @svekars @kit1980 @williamwen42 @msaroufim @ezyang @bdhirsh @anijain2305 @zou3519 @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @aakhundov @kadeng",
    "url": "https://github.com/pytorch/tutorials/issues/2858",
    "state": "closed",
    "labels": [
      "medium",
      "docathon-h1-2024"
    ],
    "created_at": "2024-02-02T12:22:05Z",
    "updated_at": "2024-08-30T21:40:03Z",
    "comments": 10,
    "user": "bhack"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2376,
    "title": "Should we increment \"failed_runs\" when error is \"ResponseAlreadyComputedError\"?",
    "body": "Related to https://github.com/huggingface/datasets-server/issues/1464: is it really an error?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2376",
    "state": "closed",
    "labels": [
      "question",
      "P2"
    ],
    "created_at": "2024-02-02T12:08:31Z",
    "updated_at": "2024-02-22T21:16:12Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 484,
    "title": "How to ask question AutoTrained LLM , If I ask question dosn't return any answer",
    "body": "Hi,\r\nLLM training was successful , But I asked any question from my trained context and it was not answered.How to ask proper question?\r\n\r\nrom transformers import AutoModelForCausalLM, AutoTokenizer\r\n\r\nmodel_path = \"bert-base-uncased_finetuning\"\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(model_path)\r\nmodel = AutoModelForCausalLM.from_pretrained(\r\n    model_path,\r\n    device_map=\"cuda\",\r\n    torch_dtype='auto'\r\n).eval()\r\n\r\n# Prompt content: \"hi\"\r\nmessages = [\r\n    {\"role\": \"user\", \"content\": \"hi\"}\r\n]\r\n\r\ninput_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')\r\noutput_ids = model.generate(input_ids.to('cuda'))\r\nresponse = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)\r\n\r\n# Model response: \"Hello! How can I assist you today?\"\r\nprint(response)\r\n\r\nSome weights of BertLMHeadModel were not initialized from the model checkpoint at bert-base-uncased and are newly initialized: ['cls.predictions.decoder.bias']\r\nYou should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\r\nexample\r\n/usr/local/lib/python3.10/dist-packages/transformers/generation/utils.py:1128: UserWarning: Using the model-agnostic default `max_length` (=20) to control the generation length. We recommend setting `max_new_tokens` to control the maximum length of the generation.\r\n  warnings.warn(\r\n/usr/local/lib/python3.10/dist-packages/transformers/generation/utils.py:1136: UserWarning: Input length of input_ids is 24, but `max_length` is set to 20. This can lead to unexpected behavior. You should consider increasing `max_new_tokens`.\r\n  warnings.warn(\r\n",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/484",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-02-02T09:29:07Z",
    "updated_at": "2024-03-04T15:01:36Z",
    "user": "charles-123456"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 761,
    "title": "Does chat-ui support offline deployment? I have downloaded the weights to my local computer.",
    "body": " I have downloaded the weights to my local computer. Due to network issues, I am unable to interact with the huggingface website. Can I do offline deployment based on chat-ui and downloaded weights from huggingface? Do I not need to set HF_TOKEN=<your access token>?Does that mean I don't need to set HF_TOKEN=<your access token> in the .env.local file?",
    "url": "https://github.com/huggingface/chat-ui/issues/761",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2024-02-02T07:57:19Z",
    "updated_at": "2024-02-04T03:23:25Z",
    "comments": 2,
    "user": "majestichou"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 557,
    "title": "how to cast types?",
    "body": "### Question\n\nI have the following code:\r\n\r\n```\r\nconst pipe = await pipeline('embeddings');\r\n      const output = await pipe([\r\n        'The quick brown fox jumps over the lazy dog',\r\n      ]);\r\n      const embedding = output[0][0];\r\n```\r\n\r\n`output[0][0]` causes a typescript error\uff1a\r\n<img width=\"748\" alt=\"CleanShot 2024-02-01 at 23 38 04@2x\" src=\"https://github.com/xenova/transformers.js/assets/2908721/6e7a1e58-bfbf-4a9d-96e3-83b771c7be99\">\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/557",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-02T04:38:20Z",
    "updated_at": "2024-02-08T19:01:06Z",
    "user": "pthieu"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6819,
    "title": "How to let diffusers use  local code for pipelineinstead of download it online everytime  We use it?",
    "body": "I tried to use the instaflowpipeline from example/community to.run my test  However, even after i git cloned the repository to my environment it still  Keep trying to  Download the latest object of the instaflow pipeline code  Unfortunately in my area is hard for the environment to download it directly from rawgithub. I tried to change the downloaded code to let it just use these code already in my environment  But find it hard to change the path to url.\r\n I would be appreciated if someone could find an proper answer . Thank you for your time and happy lunar new year!",
    "url": "https://github.com/huggingface/diffusers/issues/6819",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-02T02:53:48Z",
    "updated_at": "2024-11-28T05:44:10Z",
    "user": "Kevin-shihello-world"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6817,
    "title": "How to use class_labels in the Unet2DConditionalModel or Unet2DModel when forward? ",
    "body": "Hi, I want to know what the shape or format of \"class\" is if I want to add the class condition to the unet? Just set the **classe_labels** 0, 1, 2, 3?\r\n\r\nUnet2DModel: **class_labels** (torch.FloatTensor, optional, defaults to None) \u2014 Optional class labels for conditioning. Their embeddings will be summed with the timestep embeddings.\r\n\r\nUnet2DConditionalModel: **class_labels** (torch.Tensor, optional, defaults to None) \u2014 Optional class labels for conditioning. Their embeddings will be summed with the timestep embeddings. timestep_cond \u2014 (torch.Tensor, optional, defaults to None): Conditional embeddings for timestep. If provided, the embeddings will be summed with the samples passed through the self.time_embedding layer to obtain the timestep embeddings.",
    "url": "https://github.com/huggingface/diffusers/issues/6817",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-02T02:17:40Z",
    "updated_at": "2024-02-07T07:31:35Z",
    "user": "boqian-li"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2465,
    "title": "How to load lora model to sentencetransformer model?",
    "body": "Dear UKPlab team,\r\n\r\nMy team and myself are working on a RAG project and right now we are fine tuning a retrieval model using peft library. The issue is once we have the model fine-tuned, we couldn't load the local config and checkpoints using `sentencetransformer`. \r\nHere is our hierarchy of the local path of the peft model\r\n- adapter_config.json\r\n- adapter_model.safetensors\r\n- ....\r\n\r\nWhen I look into the `sentence-transformers` package, the issue comes from the class```Transformer.py``` which doesn't consider the situation that the model path is a ```peftmodel``` path:\r\n` config = AutoConfig.from_pretrained(model_name_or_path, **model_args, cache_dir=cache_dir)`\r\nSo we have to comment this line and delete the `config` attribute at all and in the `_load_model` method, only keep this code:\r\n`self.auto_model = AutoModel.from_pretrained(model_name_or_path, cache_dir=cache_dir)`\r\n\r\nSincerely request. Could you please fix this issue or could you please tell me the correct way to load a peft model using sentencetransformer class?\r\n",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2465",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-02T00:18:04Z",
    "updated_at": "2024-11-08T12:32:36Z",
    "user": "Shengyun-Si"
  },
  {
    "repo": "huggingface/amused",
    "number": 3,
    "title": "How to generate multiple images?",
    "body": "Thank you for your amazing work! Could you kindly explain how to generate multiple images at a time? Thankyou",
    "url": "https://github.com/huggingface/amused/issues/3",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-01T18:03:30Z",
    "updated_at": "2024-02-02T10:36:09Z",
    "user": "aishu194"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 110,
    "title": "DPO loss on different datasets",
    "body": "In parallel with #38, tho i am relating to full training instead of lora.\r\n\r\nWhen i use a different set of prefs (ie chosen and rejected) but still same instructions (ultrafeedback), i get extremely low eval/train loss, where it drops sharply in the beginning. In contrast to training on the original prefs as in the case of ultrafeedback_binarised. \r\n\r\nOn my pref dataset (Eval loss)\r\n![image](https://github.com/huggingface/alignment-handbook/assets/88869287/6794892c-b9e5-4045-b627-45024c5843e7)\r\n\r\non original pref dataset (eval loss)\r\n![image](https://github.com/huggingface/alignment-handbook/assets/88869287/539c78a9-46a1-408a-bdfc-35f8436e751f)\r\n\r\ntrain loss (mine)\r\n![image](https://github.com/huggingface/alignment-handbook/assets/88869287/216603db-30cc-477c-8198-c2365433fada)\r\n\r\noriginal\r\n![image](https://github.com/huggingface/alignment-handbook/assets/88869287/6943cc8b-0d2b-4b55-84d4-2a2465ed7537)\r\n\r\nreward margin (mine)\r\n![image](https://github.com/huggingface/alignment-handbook/assets/88869287/2c9b3f7c-ac19-4d5d-9532-6a88d3132fca)\r\n\r\noriginal reward\r\n![image](https://github.com/huggingface/alignment-handbook/assets/88869287/c8a5de1c-5f90-4709-9f1c-298ce52d697a)\r\n\r\n\r\nThis huge diff in scale seems to occur when i use pref datasets that are sampled from the reference policy instead of in the case of ultrafeedback, where it is sampled from various policies.\r\n\r\nMoreover this huge decrease in loss actually cause the DPO-ed model to perform worse across various benchmarks. Is there any intuition regarding this?",
    "url": "https://github.com/huggingface/alignment-handbook/issues/110",
    "state": "open",
    "labels": [],
    "created_at": "2024-02-01T15:49:29Z",
    "updated_at": "2024-02-01T15:49:29Z",
    "comments": 0,
    "user": "wj210"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 757,
    "title": "Which (temperature) configurations for Zephyr chat interface?",
    "body": "Hi, I apologise for what is maybe an obvious question but where can I find the exact configurations for the model offered on the HF Zephyr Chat interface on https://huggingface.co/spaces/HuggingFaceH4/zephyr-chat for Zephyr 7B beta? I'm especially interested to see the temperature settings and wasn't able to find this information.",
    "url": "https://github.com/huggingface/chat-ui/issues/757",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2024-02-01T14:27:12Z",
    "updated_at": "2024-02-01T14:47:13Z",
    "comments": 3,
    "user": "AylaRT"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6804,
    "title": "How to only offload some parts but not whole model into cpu?",
    "body": "Using enable_cpu_offload() will offload the whole model into cpu, which can occupy a large part of cpu memory. How can I just offload a part of model into cpu?",
    "url": "https://github.com/huggingface/diffusers/issues/6804",
    "state": "closed",
    "labels": [],
    "created_at": "2024-02-01T07:43:04Z",
    "updated_at": "2024-02-02T04:59:43Z",
    "user": "blx0102"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 553,
    "title": "How to convert BAAI/bge-m3 for Transformers.js?",
    "body": "### Question\n\nI tried to convert https://huggingface.co/BAAI/bge-m3 to ONNX using the instructions at https://github.com/xenova/transformers.js?tab=readme-ov-file#convert-your-models-to-onnx but I'm getting errors.\r\n\r\n```shell\r\n$ python -m scripts.convert --model_id BAAI/bge-m3\r\n\r\nFramework not specified. Using pt to export to ONNX.\r\nAutomatic task detection to feature-extraction (possible synonyms are: default, mask-generation, sentence-similarity).\r\nUsing the export variant default. Available variants are:\r\n\t- default: The default ONNX variant.\r\nUsing framework PyTorch: 2.0.1\r\nOverriding 1 configuration item(s)\r\n\t- use_cache -> False\r\n================ Diagnostic Run torch.onnx.export version 2.0.1 ================\r\nverbose: False, log level: Level.ERROR\r\n======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\r\n\r\nSaving external data to one file...\r\nPost-processing the exported models...\r\nDeduplicating shared (tied) weights...\r\nValidating ONNX model models/BAAI/bge-m3/model.onnx...\r\n\t-[\u2713] ONNX model output names match reference model (last_hidden_state)\r\n\t- Validating ONNX Model output \"last_hidden_state\":\r\n\t\t-[\u2713] (2, 16, 1024) matches (2, 16, 1024)\r\n\t\t-[\u2713] all values close (atol: 0.0001)\r\nThe ONNX export succeeded and the exported model was saved at: models/BAAI/bge-m3\r\n```\r\n\r\n```shell\r\ncat test.js\r\n```\r\n```js\r\nimport { pipeline } from './src/transformers.js'\r\n\r\nconst extractor = await pipeline('feature-extraction', 'BAAI/bge-m3', {\r\n  quantized: false,\r\n  cache_dir: './models',\r\n  local_files_only: true,\r\n})\r\n\r\nconst embedding = await extractor('hello there', { pooling: 'mean', normalize: true })\r\nconsole.log(JSON.stringify(Array.from(embedding.data), null, 2))\r\n```\r\n\r\n```shell\r\n2024-01-31 20:35:16.548 node[64946:11650151] 2024-01-31 20:35:16.548343 [E:onnxruntime:, inference_session.cc:1532 operator()] Exception during initialization: /Users/runner/work/1/s/onnxruntime/core/optimizer/initializer.cc:31 onnxruntime::Initializer::Initializer(const onnx::TensorProto &, const onnxruntime::Path &) !model_path.IsEmpty() was false. model_path must not be empty. Ensure that a path is provided when the model is created or loaded.\r\nError: Exception during initialization: /Users/runner/work/1/s/onnxruntime/core/optimizer/initializer.cc:31 onnxruntime::Initializer::Initializer(const onnx::TensorProto &, const onnxruntime::Path &) !model_path.IsEmpty() was false. model_path must not be empty. Ensure that a path is provided when the model is created or loaded.\r\n\r\n    at new OnnxruntimeSessionHandler (***/transformers.js/node_modules/onnxruntime-node/dist/backend.js:27:92)\r\n    at ***/transformers.js/node_modules/onnxruntime-node/dist/backend.js:64:29\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)\r\nSomething went wrong during model construction (most likely a missing operation). Using `wasm` as a fallback.\r\nAborted(Error: ENOENT: no such file or directory, open '***/transformers.js/dist/ort-wasm-simd-threaded.wasm')\r\nfailed to asynchronously prepare wasm: RuntimeError: Aborted(Error: ENOENT: no such file or directory, open '***/transformers.js/dist/ort-wasm-simd-threaded.wasm'). Build with -sASSERTIONS for more info.\r\nAborted(RuntimeError: Aborted(Error: ENOENT: no such file or directory, open '***/transformers.js/dist/ort-wasm-simd-threaded.wasm'). Build with -sASSERTIONS for more info.)\r\n***/transformers.js/node_modules/onnxruntime-web/dist/ort-web.node.js:6\r\n...\r\n...\r\n...\r\nError: no available backend found. ERR: [wasm] RuntimeError: Aborted(Error: ENOENT: no such file or directory, open '***/transformers.js/dist/ort-wasm-simd-threaded.wasm'). Build with -sASSERTIONS for more info.\r\n    at ***/transformers.js/node_modules/onnxruntime-common/dist/ort-common.node.js:6:11822\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async m.create (***/transformers.js/node_modules/onnxruntime-common/dist/ort-common.node.js:6:11480)\r\n    at async constructSession (file://***/transformers.js/src/models.js:140:16)\r\n    at async Promise.all (index 1)\r\n    at async XLMRobertaModel.from_pretrained (file://***/transformers.js/src/models.js:793:20)\r\n    at async AutoModel.from_pretrained (file://***/transformers.js/src/models.js:5166:20)\r\n    at async Promise.all (index 1)\r\n    at async loadItems (file://***/transformers.js/src/pipelines.js:3116:5)\r\n    at async pipeline (file://***/transformers.js/src/pipelines.js:3056:21)\r\n\r\nNode.js v20.9.0\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/553",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-02-01T01:40:02Z",
    "updated_at": "2024-02-08T22:17:29Z",
    "user": "devfacet"
  },
  {
    "repo": "pytorch/torchx",
    "number": 813,
    "title": "Docker build verbosity",
    "body": "## Description\r\nChanging the docker image build to its low level implementation so it can be more verbose.\r\n\r\n## Motivation/Background\r\nBuilding the docker image can take quite some time, and for new users this makes it seem like the program is stuck (especially since the default base image that includes torchx is so big). Making it more verbose is not only a quality of life improvement for all users of the docker workspace, it also gives better visibility into the build process, potentially allowing optimization on the dockerfile.\r\n\r\nOn a side note, what is the rational for naming Dockerfile.torchx instead of just using a normal Dockerfile, is there a difference in the format?\r\n\r\n\r\n## Detailed Proposal\r\nReplacing the current docker build API call with its low level implementation. This would require instantiating a low-level client and processing the build event stream to show in real time to docker build commands. Also a processing function for the stream to be printing to screen correctly.\r\n\r\n\r\n## Alternatives\r\n\r\n\r\n\r\n## Additional context/links\r\nhttps://github.com/pytorch/torchx/blob/19497eb1d2649f66cd12ca1eeed77353085f07e0/torchx/workspace/docker_workspace.py#L118\r\n\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/813",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-31T18:49:35Z",
    "updated_at": "2024-04-11T17:42:34Z",
    "comments": 3,
    "user": "ccharest93"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2859,
    "title": "Correctness of when to call `set_device` in the docs for DDP",
    "body": "### \ud83d\udcda The doc issue\n\nIn the docs tutorial on [how to set up Multi-GPU training](https://pytorch.org/tutorials/beginner/ddp_series_multigpu.html), it is suggested that the following is the proper way to setup each process (initializing the, e.g., NCCL, process group and then calling `torch.cuda.set_device(rank)`):\r\n\r\n```python\r\ndef ddp_setup(rank: int, world_size: int):\r\n    \"\"\"\r\n    Args:\r\n        rank: Unique identifier of each process\r\n        world_size: Total number of processes\r\n    \"\"\"\r\n    os.environ[\"MASTER_ADDR\"] = \"localhost\"\r\n    os.environ[\"MASTER_PORT\"] = \"12355\"\r\n    init_process_group(backend=\"nccl\", rank=rank, world_size=world_size)\r\n    torch.cuda.set_device(rank)\r\n```\r\n\r\nHowever, these issues suggest that the proper way is to call `set_device` before initializing the process group:\r\n- https://github.com/pytorch/pytorch/issues/54550#issuecomment-808703316\r\n- https://github.com/pytorch/pytorch/issues/18689#issuecomment-479042701\r\n\r\nWhich is the correct order? Are there pauses or slowdowns if the order changes?\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225",
    "url": "https://github.com/pytorch/tutorials/issues/2859",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-31T18:06:42Z",
    "updated_at": "2024-05-07T17:10:56Z",
    "comments": 5,
    "user": "craymichael"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6785,
    "title": "How to finetune stable diffusion img2img(like instructpix2pix or controlnet) model with only one input channel?",
    "body": "Hello, experts!\r\nI want to finetune stable diffusion img2img(like instructpix2pix or controlnet) model with only one input channel or greyscale image? I saw official docs says it is ok to increase the input channel from 4 to 9, but I want to know that is this ok to decrease the input channel to be one for finetuning?\r\nThanks in advance!",
    "url": "https://github.com/huggingface/diffusers/issues/6785",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-31T09:17:56Z",
    "updated_at": "2024-01-31T09:27:43Z",
    "user": "sapkun"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2399,
    "title": "How to use vscode to debug the acceleration program with breakpoints? I checked a lot of information, but still didn't find a solution",
    "body": "How to use vscode to debug the acceleration program with breakpoints? I checked a lot of information, but still didn't find a solution\r\n![bac6887bc502257c99e34019e987bce](https://github.com/huggingface/accelerate/assets/39908586/34df89a3-cfdf-432e-93af-42586aa8be97)\r\n",
    "url": "https://github.com/huggingface/accelerate/issues/2399",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-31T09:00:32Z",
    "updated_at": "2024-03-10T15:05:56Z",
    "user": "kejia1"
  },
  {
    "repo": "huggingface/datatrove",
    "number": 72,
    "title": "Tokenization in Minhash deduplication",
    "body": "Hi,\r\n\r\nI have noticed that the tokenization is different from those adopted by previous papers.\r\n\r\nFor example, this [paper](https://arxiv.org/abs/2107.06499) uses space tokenization, [refinedweb](https://arxiv.org/abs/2306.01116) states that they used GPT-2 tokenizer, while datatrove adopts nltk to extract n-grams.\r\n\r\nI'm wondering whether the results obtained by different tokenization methods are consistent.",
    "url": "https://github.com/huggingface/datatrove/issues/72",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-31T02:33:17Z",
    "updated_at": "2024-02-01T15:36:24Z",
    "user": "jordane95"
  },
  {
    "repo": "huggingface/peft",
    "number": 1419,
    "title": "How to torch.jit.trace a peft model",
    "body": "### Feature request\r\n\r\nNeed an example of how to trace a peft model.\r\n\r\n### Motivation\r\n\r\nHi, I'm trying to deploy a Lora-finetuned llama model on Nvidia Triton server. For that I need to `traced_model = torch.jit.trace(model, model_input_dict, strict=False)`, however I encountered issues like `Tracing failed sanity checks! ERROR: Graphs differed across invocations!`\r\nand terminal output was like:\r\n```\r\n/python3.10/site-packages/transformers/models/llama/modeling_llama.py:598: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  if input_shape[-1] > 1:\r\n/python3.10/site-packages/bitsandbytes/autograd/_functions.py:300: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  if prod(A.shape) == 0:\r\n/python3.10/site-packages/bitsandbytes/autograd/_functions.py:322: UserWarning: MatMul8bitLt: inputs will be cast from torch.float32 to float16 during quantization\r\n  warnings.warn(f\"MatMul8bitLt: inputs will be cast from {A.dtype} to float16 during quantization\")\r\n/python3.10/site-packages/bitsandbytes/functional.py:2016: TracerWarning: Converting a tensor to a Python number might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  nnz = nnz_row_ptr[-1].item()\r\n/python3.10/site-packages/bitsandbytes/functional.py:1714: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  assert prod(list(shapeA)) > 0, f'Input tensor dimensions need to be > 0: {shapeA}'\r\n/python3.10/site-packages/bitsandbytes/functional.py:1717: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  if shapeA[0] == 0 and dimsA == 2:\r\n/python3.10/site-packages/bitsandbytes/functional.py:1719: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  elif shapeA[1] == 0 and dimsA == 3:\r\n/python3.10/site-packages/bitsandbytes/functional.py:1741: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  shapeA[-1] == shapeB[-1]\r\n/python3.10/site-packages/bitsandbytes/functional.py:1826: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  new_row_stats.shape[0] == row_stats.shape[0]\r\n/python3.10/site-packages/bitsandbytes/functional.py:1829: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  new_col_stats.shape[0] == col_stats.shape[0]\r\n/python3.10/site-packages/transformers/models/llama/modeling_llama.py:120: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  if seq_len > self.max_seq_len_cached:\r\n/python3.10/site-packages/transformers/models/llama/modeling_llama.py:350: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\r\n  if attn_weights.size() != (bsz, self.num_heads, q_len, kv_seq_len):\r\n/python3.10/site-packages/transformers/models/llama/modeling_llama.py:357: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python value",
    "url": "https://github.com/huggingface/peft/issues/1419",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-30T22:56:10Z",
    "updated_at": "2024-02-06T09:16:07Z",
    "user": "dcy0577"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 56,
    "title": "how to change the camera clipping - and a feature request: add rotate control",
    "body": "Hello and thank you for your great work!\r\n\r\nI am a coding noob but managed to use the jsfiddle example to set up a page on which I can display my splats. \r\n\r\nIs it possible to change the clipping (and other) settings for the camera? If so, where should I look??\r\n\r\nAnd for the request; never mind, I was not paying attention\r\nThanks again!!",
    "url": "https://github.com/huggingface/gsplat.js/issues/56",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-30T19:20:35Z",
    "updated_at": "2024-01-31T16:51:30Z",
    "user": "murcje"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2395,
    "title": "Question: how to apply device map to a paired model",
    "body": "Hello everybody,\r\n\r\nI have been experimenting with Mistral models and have written a small second model to be paired with it. However, I have a machine with 2 GPUs and would like to use both. I am aware that the parallelization `accelerate` uses is based on splitting the data by batches. How can I apply the device map from the Mistral model to my small second model?\r\n\r\n## Additional information\r\nThe second model which I have written injects a signal into the Mistral model at a strategic layer. However, this is done in a way that removes the possibility of inlining as I do not want to rewrite the model. How can I apply the same device map from the Mistral model?",
    "url": "https://github.com/huggingface/accelerate/issues/2395",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-30T19:17:52Z",
    "updated_at": "2024-02-01T19:18:08Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "pytorch/cpuinfo",
    "number": 221,
    "title": "How to obtain information of CPU frequency?",
    "body": "if (core->processor_count == 1) {\r\n\t\t\tprintf(\"\\t%\" PRIu32 \": 1 processor (%\" PRIu32 \"), Frequency: %\" PRIu64 \" Hz\\n\",\r\n\t\t\t       i,\r\n\t\t\t       core->processor_start,\r\n\t\t\t       core->frequency);\r\n}\r\nFrequency output 0",
    "url": "https://github.com/pytorch/cpuinfo/issues/221",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-01-30T03:21:26Z",
    "updated_at": "2025-12-30T22:59:44Z",
    "user": "yichenchenyi"
  },
  {
    "repo": "pytorch/text",
    "number": 2227,
    "title": "Fail to import torchtext KeyError: 'SP_DIR'",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\n\r\nI failed to import torchtext with the following error. I tried it with a fresh conda env install (under a different python version) and still got the same issue. \r\n\r\nOriginally I was able to use torchtext (I remember installed from pip) in an env of python 3.11, but then it raised error with the dataset module, so I updated torchtext with pip and started getting kernel crush for pytorch import. So I did some uninstall and install of the pytorch and torchtext packages from different sources (conda or pip) and couldn't fix the issue. Even a new conda env using python 3.10 raised the same error. I don't know what is messed up.\r\n\r\n```\r\n---------------------------------------------------------------------------\r\nKeyError                                  Traceback (most recent call last)\r\nCell In[3], line 1\r\n----> 1 import torchtext\r\n\r\nFile ~/miniconda3/envs/ml2/lib/python3.10/site-packages/torchtext/__init__.py:6\r\n      3 from torch.hub import _get_torch_home\r\n      5 # the following import has to happen first in order to load the torchtext C++ library\r\n----> 6 from torchtext import _extension  # noqa: F401\r\n      8 _TEXT_BUCKET = \\\"https://download.pytorch.org/models/text/\\\"\r\n     10 _CACHE_DIR = os.path.expanduser(os.path.join(_get_torch_home(), \\\"text\\\"))\r\n\r\nFile ~/miniconda3/envs/ml2/lib/python3.10/site-packages/torchtext/_extension.py:7\r\n      4 import torch\r\n      5 from torchtext._internal import module_utils as _mod_utils\r\n----> 7 _LIB_DIR = Path(os.environ[\\\"SP_DIR\\\"]) / \\\"torch\\\" / \\\"lib\\\"\r\n     10 def _get_lib_path(lib: str):\r\n     11     suffix = \\\"pyd\\\" if os.name == \\\"nt\\\" else \\\"so\\\"\r\n\r\nFile ~/miniconda3/envs/ml2/lib/python3.10/os.py:680, in _Environ.__getitem__(self, key)\r\n    677     value = self._data[self.encodekey(key)]\r\n    678 except KeyError:\r\n    679     # raise KeyError with the original key value\r\n--> 680     raise KeyError(key) from None\r\n    681 return self.decodevalue(value)\r\n\r\nKeyError: 'SP_DIR'\r\n```\r\n\r\n```\r\n# packages in environment at /Users/cecilia/miniconda3/envs/ml2:\r\n#\r\n# Name                    Version                   Build  Channel\r\nannotated-types           0.6.0              pyhd8ed1ab_0    conda-forge\r\nappnope                   0.1.3              pyhd8ed1ab_0    conda-forge\r\nasttokens                 2.4.1              pyhd8ed1ab_0    conda-forge\r\nbrotli-python             1.1.0           py310h9e9d8ca_1    conda-forge\r\nbzip2                     1.0.8                h10d778d_5    conda-forge\r\nca-certificates           2023.11.17           h8857fd0_0    conda-forge\r\ncatalogue                 2.0.10          py310h2ec42d9_0    conda-forge\r\ncertifi                   2023.11.17         pyhd8ed1ab_0    conda-forge\r\ncharset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge\r\nclick                     8.1.7           unix_pyh707e725_0    conda-forge\r\ncloudpathlib              0.16.0             pyhd8ed1ab_0    conda-forge\r\ncolorama                  0.4.6              pyhd8ed1ab_0    conda-forge\r\ncomm                      0.2.1              pyhd8ed1ab_0    conda-forge\r\nconfection                0.1.4           py310h1cef2ca_0    conda-forge\r\ncymem                     2.0.8           py310h9e9d8ca_1    conda-forge\r\ncython-blis               0.7.10          py310hf0b6da5_2    conda-forge\r\ndebugpy                   1.8.0           py310h9e9d8ca_1    conda-forge\r\ndecorator                 5.1.1              pyhd8ed1ab_0    conda-forge\r\ndouble-conversion         3.3.0                he965462_0    conda-forge\r\nexceptiongroup            1.2.0              pyhd8ed1ab_2    conda-forge\r\nexecuting                 2.0.1              pyhd8ed1ab_0    conda-forge\r\nfilelock                  3.13.1             pyhd8ed1ab_0    conda-forge\r\nfsspec                    2023.12.2          pyhca7485f_0    conda-forge\r\ngmp                       6.3.0                h93d8f39_0    conda-forge\r\ngmpy2                     2.1.2           py310hb691cb2_1    conda-forge\r\nicu                       73.2                 hf5e326d_0    conda-forge\r\nidna                      3.6                pyhd8ed1ab_0    conda-forge\r\nimportlib-metadata        7.0.1              pyha770c72_0    conda-forge\r\nimportlib_metadata        7.0.1                hd8ed1ab_0    conda-forge\r\nipykernel                 6.29.0             pyh3cd1d5f_0    conda-forge\r\nipython                   8.20.0             pyh707e725_0    conda-forge\r\njedi                      0.19.1             pyhd8ed1ab_0    conda-forge\r\njinja2                    3.1.3              pyhd8ed1ab_0    conda-forge\r\njoblib                    1.3.2              pyhd8ed1ab_0    conda-forge\r\njupyter_client            8.6.0              pyhd8ed1ab_0    conda-forge\r\njupyter_core              5.7.1           py310h2ec42d9_0    conda-forge\r\nlangcodes                 3.3.0              pyhd8ed1ab_0    conda-forge\r\nlibabseil                 20230802.1      cxx17_h048a20a_0    conda-forge\r\nlibblas                   3.9.0    ",
    "url": "https://github.com/pytorch/text/issues/2227",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-30T02:50:25Z",
    "updated_at": "2024-02-08T02:04:18Z",
    "comments": 1,
    "user": "cecilialee"
  },
  {
    "repo": "pytorch/xla",
    "number": 6411,
    "title": "SPMD Global Batch size vs. --per_device_train_batch_size",
    "body": "## \u2753 Questions and Help\r\n\r\nHey all,\r\n\r\nAm looking to solidify my understanding and seeking a clarification on the SPMD user guide: https://github.com/pytorch-tpu/transformers/blob/llama2-google-next-training/SPMD_USER_GUIDE.md  \r\n\r\nI see it says:\r\n\r\n _global_batch_size: The global batch size to use. Note that this value is supplied to the per_device_train_batch_size flag, since  currently HuggingFace treats SPMD as a single-device program. This will change in future releases._\r\n\r\nI'd like to ask 2 questions here, to ensure my understanding is correct:\r\n\r\n1) With respect to the blog https://pytorch.org/blog/high-performance-llama-2/ and Figure 2, where it says, notably for the V4-32 use-case: \"per device batch\" = 16, Global Batch = 256, what was the argument to run_clm.py ? Was it \r\n--per_device_train_batch_size 256  ?\r\n\r\nIf it was indeed \"--per_device_train_batch_size 256 \" , is the \"Per Device Batch\" in Figure 2 just a simple calculation of 256/16 TPUv4-32 chips, and NOT an actual argument to run_clm.py ?\r\n\r\n\r\n2) Related, am looking to understand what (future release) project is tracking a refinement of how Global Batch Size is specified for a multi-device configuration ?\r\n\r\n\r\nMany thanks,\r\nIsaac",
    "url": "https://github.com/pytorch/xla/issues/6411",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2024-01-30T00:16:54Z",
    "updated_at": "2025-04-21T13:20:54Z",
    "user": "isaacr"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6755,
    "title": "how to train a lora in inpainting model?",
    "body": "Is there a script to train Lora in SD 1.5 inpainting?\r\n\r\nIs there any script to train Lora in SD 1.5 inpainting that works?\r\n\r\ntry this\r\nhttps://github.com/huggingface/diffusers/tree/main/examples/research_projects/dreambooth_inpaint\r\nbut it gives error\r\n`RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn`\r\n@thedarkzeno @patil-suraj",
    "url": "https://github.com/huggingface/diffusers/issues/6755",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-01-29T21:14:57Z",
    "updated_at": "2024-11-22T01:39:54Z",
    "user": "loboere"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2624,
    "title": "\u2753 undefined reference when Building Torch-TensorRT",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\n\r\nI'm trying to build **Torch-TensorRT version 2.3.0a0**.\r\nI successfully built **Torch 2.3.0.dev**.\r\n\r\nWhen building Torch-TensorRT, if I comment **http_archive** for **libtorch** and **libtorch_pre_cxx11_abi** and use the **new_local_repository** for both of them I get an undefined reference error when running **sudo PYTHONPATH=$PYTHONPATH python3 setup.py install**\r\n\r\nNow If I leave http_archive for libtorch and libtorch_pre_cxx11_abi as default I can \"successfully\" build Torch-TensorRT but when trying to import it to any python code I get: \r\n\r\nImportError: /home/nick/.local/lib/python3.8/site-packages/torch_tensorrt/lib/libtorchtrt.so: undefined symbol: _ZN3c106detail23torchInternalAssertFailEPKcS2_jS2_RKSs\r\n\r\n\r\nIn the pyproject.toml file I can see that Torch.2.3.0 is mandatory for building Torch-TensorRT and that is the version of torch installed and running in my environment.\r\n\r\nNot sure on how to proceed since it seems I have all the required packages installed.\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.3.0a0+git4aa1f99\r\n - OS (e.g., Linux): Ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): source\r\n - Build command you used (if compiling from source): sudo python3 setup.py build develop \r\n - Are you using local sources or building from archives: local\r\n - Python version: 3.8\r\n - CUDA version: 12.1\r\n - GPU models and configuration: 2080 ti\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2624",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-29T18:26:34Z",
    "updated_at": "2024-11-19T08:23:07Z",
    "user": "nicholasguimaraes"
  },
  {
    "repo": "huggingface/optimum-benchmark",
    "number": 116,
    "title": "How to use optimum-benchmark for custom testing of my model",
    "body": "I am currently using Intel\u00ae Extension for Transformers to quantize a model, and I wonder if it is possible to utilize optimum-benchmark for testing the model. Alternatively, if there are other methods to load large models, could I conduct tests using optimum-benchmark after loading the model? Many thanks; this has been a real challenge for me, as I'm unsure how to properly test an optimized large-scale model.\r\n\r\n",
    "url": "https://github.com/huggingface/optimum-benchmark/issues/116",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-29T04:07:36Z",
    "updated_at": "2024-02-19T16:07:06Z",
    "user": "WCSY-YG"
  },
  {
    "repo": "pytorch/vision",
    "number": 8236,
    "title": "segmentation fault  when importing torchvision",
    "body": "### \ud83d\udc1b Describe the bug\n\nGet Segment Fault when import torchvision\r\n\r\n## Platform:\r\n Macbook Pro 2018 13.3' with macOS 14.3\r\n\r\n## Pytorch Version\r\n2.1.2\r\n\r\n## Torchvision Version:\r\n0.16.2\r\n\r\n\r\n## How to Reproduce\r\ninput below in shell terminal\r\n```sh\r\npython -c 'import torchvision'\r\n```\r\nthen the output is\r\n```sh\r\nzsh: segmentation fault  python -c 'import torchvision'\r\n```\r\n\n\n### Versions\n\nPyTorch version: 2.1.2\r\nIs debug build: False\r\nCUDA used to build PyTorch: None\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: macOS 14.3 (x86_64)\r\nGCC version: Could not collect\r\nClang version: 15.0.0 (clang-1500.1.0.2.5)\r\nCMake version: version 3.28.1\r\nLibc version: N/A\r\n\r\nPython version: 3.11.7 (main, Dec 15 2023, 12:09:04) [Clang 14.0.6 ] (64-bit runtime)\r\nPython platform: macOS-10.16-x86_64-i386-64bit\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nIntel(R) Core(TM) i5-8259U CPU @ 2.30GHz\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.26.3\r\n[pip3] torch==2.1.2\r\n[pip3] torchaudio==2.1.2\r\n[pip3] torchdata==0.7.1\r\n[pip3] torchtext==0.16.2\r\n[pip3] torchvision==0.16.2\r\n[conda] blas                      1.0                         mkl    https://repo.anaconda.com/pkgs/main\r\n[conda] mkl                       2023.1.0         h8e150cf_43560    https://repo.anaconda.com/pkgs/main\r\n[conda] mkl-service               2.4.0           py311h6c40b1e_1    https://repo.anaconda.com/pkgs/main\r\n[conda] mkl_fft                   1.3.8           py311h6c40b1e_0    https://repo.anaconda.com/pkgs/main\r\n[conda] mkl_random                1.2.4           py311ha357a0b_0    https://repo.anaconda.com/pkgs/main\r\n[conda] numpy                     1.26.3          py311h728a8a3_0    https://repo.anaconda.com/pkgs/main\r\n[conda] numpy-base                1.26.3          py311h53bf9ac_0    https://repo.anaconda.com/pkgs/main\r\n[conda] torch                     2.1.2                    pypi_0    pypi\r\n[conda] torchaudio                2.1.2                    pypi_0    pypi\r\n[conda] torchdata                 0.7.1                    pypi_0    pypi\r\n[conda] torchtext                 0.16.2                   pypi_0    pypi\r\n[conda] torchvision               0.16.2                   pypi_0    pypi",
    "url": "https://github.com/pytorch/vision/issues/8236",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-29T01:02:48Z",
    "updated_at": "2024-01-31T17:17:50Z",
    "comments": 9,
    "user": "Romeo-CC"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 747,
    "title": ".env.local config for llama-2-7b.Q4_K_S.gguf with llama.cpp server",
    "body": "I am using the following .env.local with llama-2-7b.Q4_K_S.gguf and llama prompt template\r\n```\r\nMODELS=`[\r\n  {\r\n      \"name\": \"llama-2-7b.Q4_K_S.gguf\",\r\n      \"chatPromptTemplate\": \"<s>[INST] <<SYS>>\\n{{preprompt}}\\n<</SYS>>\\n\\n{{#each messages}}{{#ifUser}}{{content}} [/INST] {{/ifUser}}{{#ifAssistant}}{{content}} </s><s>[INST] {{/ifAssistant}}{{/each}}\",\r\n      \"parameters\": {\r\n        \"temperature\": 0.1,\r\n        \"top_p\": 0.95,\r\n        \"repetition_penalty\": 1.2,\r\n        \"top_k\": 50,\r\n        \"truncate\": 1000,\r\n        \"max_new_tokens\": 2048,\r\n        \"stop\": [\"</s>\"]\r\n      },\r\n      \"endpoints\": [\r\n        {\r\n         \"url\": \"http://127.0.0.1:8080\",\r\n         \"type\": \"llamacpp\"\r\n        }\r\n      ]\r\n  }\r\n]`\r\n```\r\nI am trying to get this work with chat-ui and it doesn't work and chat-ui is frozen. However server is receiving request from client. \r\n\r\n\r\n<img width=\"1171\" alt=\"image\" src=\"https://github.com/huggingface/chat-ui/assets/106691906/e15147c5-5178-46b4-bc8c-d66bf4cfe1e3\">\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/747",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2024-01-29T00:54:19Z",
    "updated_at": "2024-02-22T14:54:08Z",
    "comments": 3,
    "user": "smamindl"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 746,
    "title": "settings page does not reflect selected Theme",
    "body": "Settings page is always light/white regardless of the Theme selected (Dark or Light). \r\n\r\nIs this intentional or we just did not have time to respect the selected Theme?\r\n\r\nIf we need to fix this, how much work load do you expect? Just small change on the main settings page (settings/+layout.svelte) or do we need to change every UI piece in settings?     I might want to fix this if this is not huge.\r\n\r\nthanks",
    "url": "https://github.com/huggingface/chat-ui/issues/746",
    "state": "open",
    "labels": [
      "question",
      "front"
    ],
    "created_at": "2024-01-28T23:09:38Z",
    "updated_at": "2024-01-29T11:48:59Z",
    "user": "hungryalgo"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 547,
    "title": "Text to speech generation using Xenova/mms-tts-por",
    "body": "### Question\n\nHi! First of all, thank you for the awesome library, it's been handy so far!\r\n\r\nI've got 2 questions regarding TTS:\r\n\r\n- I'm using the model above to create a Brazilian Portuguese spoken audio and would like to know if there are options for this model, eg.: changing the voice from male to female, and the intonation.\r\n\r\n- I discovered another model `facebook/mms-tts-por` in the compatible languages list, but I'm getting the following error: \"'Could not locate file: \"https://huggingface.co/facebook/mms-tts-por/resolve/main/tokenizer.json\".'\". Is transformer.js compatible with it?\r\n\r\nThanks in advance",
    "url": "https://github.com/huggingface/transformers.js/issues/547",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-28T13:51:21Z",
    "updated_at": "2025-01-13T22:15:35Z",
    "user": "Darksoulsong"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6739,
    "title": "how to generate images based on the text token embedding outputted from CLIP. token_embedding module?",
    "body": "how to generate images based on the text token embedding outputted from CLIP. token_embedding module?",
    "url": "https://github.com/huggingface/diffusers/issues/6739",
    "state": "closed",
    "labels": [
      "stale",
      "should-move-to-discussion"
    ],
    "created_at": "2024-01-28T08:51:45Z",
    "updated_at": "2024-11-19T09:27:00Z",
    "user": "FlyGreyWolf"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 546,
    "title": "header is not define ",
    "body": "### Question\n\n![image](https://github.com/xenova/transformers.js/assets/91903346/d14b8e30-1ed1-4840-ab83-7d2fda0871a0)\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/546",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-28T07:59:10Z",
    "updated_at": "2024-01-28T09:28:27Z",
    "user": "BipulRahi"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6624,
    "title": "How to download the laion-coco dataset",
    "body": "The laion coco dataset is not available now. How to download it\r\n\r\nhttps://huggingface.co/datasets/laion/laion-coco",
    "url": "https://github.com/huggingface/datasets/issues/6624",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-28T03:56:05Z",
    "updated_at": "2024-02-06T09:43:31Z",
    "user": "vanpersie32"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6623,
    "title": "streaming datasets doesn't work properly with multi-node",
    "body": "### Feature request\r\n\r\nLet\u2019s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.\r\n\r\nNow I split the dataset using `split_dataset_by_node` to ensure it doesn\u2019t get repeated. And since it\u2019s already splitted, I don\u2019t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?\r\n\r\nBut in this case I noticed that the:\r\n\r\nFirst iteraton:\r\nfirst GPU will get \u2192 [1, 2]\r\nfirst GPU will get \u2192 [3, 4]\r\n\r\nSecond iteraton:\r\nfirst GPU will get \u2192 [5]\r\nfirst GPU will get \u2192 Nothing\r\n\r\nwhich actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.\r\n\r\nSo my questions are:\r\n\r\n1. Here since splitting is happening before hand, how to make sure each GPU get\u2019s a batch at each iteration to avoid gradient sync issues?\r\n2. Do we need to use `DistributedSampler`? If yes, how?\r\n3. in the docstrings of `split_dataset_by_node`, this is mentioned: *\"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples.\"* Can you explain the last part here?\r\n4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?\r\n\r\n### Motivation\r\n\r\nSomehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.\r\n\r\n### Your contribution\r\n\r\nYes, I can help in submitting the PR once we get mutual understanding on how it should behave.",
    "url": "https://github.com/huggingface/datasets/issues/6623",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-01-27T23:46:13Z",
    "updated_at": "2025-12-08T12:26:20Z",
    "comments": 29,
    "user": "rohitgr7"
  },
  {
    "repo": "huggingface/unity-api",
    "number": 23,
    "title": "I need to specify text or text_target in text classification",
    "body": "I try calling the api by huggingfaceapi.textclassification(\"some string\", response =>...) but got the error\"you need to specify text or text_target\". Where can I specify that in my unity C# code?",
    "url": "https://github.com/huggingface/unity-api/issues/23",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-27T19:24:25Z",
    "updated_at": "2024-01-27T19:24:25Z",
    "user": "helenawsu"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 543,
    "title": "Converting a model to onnx using given script is hard(fails most of the time)",
    "body": "### Question\r\n\r\nI have tried to use starcoder model by bundling it using your ONNX script but it failed with some exception.\r\n\r\nModel: https://huggingface.co/HuggingFaceH4/starchat-beta\r\nor\r\nhttps://huggingface.co/bigcode/starcoderbase\r\n\r\nlogs:\r\n```bash\r\n$ python -m scripts.convert --quantize --model_id HuggingFaceH4/starchat-beta\r\nFramework not specified. Using pt to export to ONNX.\r\nmodel-00001-of-00004.safetensors:   3%|\u2588\u258f                               | 346M/9.96G [03:20<1:33:01, 1.72MB/s]\r\nDownloading shards:   0%|                                                               | 0/4 [03:23<?, ?it/s]\r\nLoading TensorFlow model in PyTorch before exporting.\r\nTraceback (most recent call last):\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/urllib3/response.py\", line 712, in _error_catcher\r\n    yield\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/urllib3/response.py\", line 833, in _raw_read\r\n    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)\r\nurllib3.exceptions.IncompleteRead: IncompleteRead(351738674 bytes read, 9606258302 more expected)\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/requests/models.py\", line 816, in generate\r\n    yield from self.raw.stream(chunk_size, decode_content=True)\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/urllib3/response.py\", line 934, in stream\r\n    data = self.read(amt=amt, decode_content=decode_content)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/urllib3/response.py\", line 905, in read\r\n    data = self._raw_read(amt)\r\n           ^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/urllib3/response.py\", line 811, in _raw_read\r\n    with self._error_catcher():\r\n  File \"/usr/lib/python3.11/contextlib.py\", line 155, in __exit__\r\n    self.gen.throw(typ, value, traceback)\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/urllib3/response.py\", line 729, in _error_catcher\r\n    raise ProtocolError(f\"Connection broken: {e!r}\", e) from e\r\nurllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(351738674 bytes read, 9606258302 more expected)', IncompleteRead(351738674 bytes read, 9606258302 more expected))\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/optimum/exporters/tasks.py\", line 1708, in get_model_from_task\r\n    model = model_class.from_pretrained(model_name_or_path, **kwargs)\r\n            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py\", line 563, in from_pretrained\r\n    return model_class.from_pretrained(\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/transformers/modeling_utils.py\", line 2876, in from_pretrained\r\n    resolved_archive_file, sharded_metadata = get_checkpoint_shard_files(\r\n                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/transformers/utils/hub.py\", line 1040, in get_checkpoint_shard_files\r\n    cached_filename = cached_file(\r\n                      ^^^^^^^^^^^^\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/transformers/utils/hub.py\", line 429, in cached_file\r\n    resolved_file = hf_hub_download(\r\n                    ^^^^^^^^^^^^^^^^\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py\", line 118, in _inner_fn\r\n    return fn(*args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/huggingface_hub/file_download.py\", line 1457, in hf_hub_download\r\n    http_get(\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/huggingface_hub/file_download.py\", line 524, in http_get\r\n    for chunk in r.iter_content(chunk_size=DOWNLOAD_CHUNK_SIZE):\r\n  File \"/home/username/Desktop/transformers.js/scripts/venv/lib/python3.11/site-packages/requests/models.py\", line 818, in generate\r\n    raise ChunkedEncodingError(e)\r\nrequests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(351738674 bytes read, 9606258302 more expected)', IncompleteRead(351738674 bytes read, 9606258302 more expected))\r\n\r\nDuring handling of the above exception, another except",
    "url": "https://github.com/huggingface/transformers.js/issues/543",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-27T07:32:42Z",
    "updated_at": "2024-01-30T06:48:44Z",
    "user": "bajrangCoder"
  },
  {
    "repo": "huggingface/candle",
    "number": 1624,
    "title": "How to run the quantized Solar model?",
    "body": "I am trying to run the Solar model, but I am constantly failing. Here are my attempts:\r\n\r\n1. [quantized] example (modified) with the Quantized Solar model (local)\r\n  : Failed. It only outputs nonsense that is unrelated to the question.\r\n2. [llama] example with the Quantized Solar model (local)\r\n  : Failed. The process was Killed. Either because of \u2460a \"Quantized\" model or \u2461a low-spec PC (16GB of RAM, etc.).\r\n3. [llama] example with the Solar model\r\n  : Failed. The process was Killed. The most likely cause is \u2460a low-spec PC.\r\n4. oobabooga with the Quantized Solar model (local)\r\n  : Success. Confirmed that my PC can run the Quantized Solar model.\r\n5. oobabooga with the Solar model\r\n  : Failed. The process was Killed. Confirmed that my PC cannot run the Solar model.\r\n\r\nConclusion: Is there any way to run the Quantized Solar model? I know I only wrote about 5 attempts, but I actually tried several different variations of the code in step 1. I also downloaded the model several times in my poor internet speed.",
    "url": "https://github.com/huggingface/candle/issues/1624",
    "state": "open",
    "labels": [],
    "created_at": "2024-01-27T04:57:50Z",
    "updated_at": "2024-01-27T22:41:12Z",
    "user": "555cider"
  },
  {
    "repo": "huggingface/peft",
    "number": 1401,
    "title": "Where is `self.generation_config`coming from?",
    "body": "https://github.com/huggingface/peft/blob/1c1c7fdaa6e6abaa53939b865dee1eded82ad032/src/peft/peft_model.py#L1136\r\n\r\n`self.generation` variable is not initialized in the model, it is also not part of a class up in the inheritance hierarchy.\r\nSo I assume it is retrieved from the base model via the implemented `\\_\\_getattr\\_\\_` method.\r\n\r\nIf that's the case, doesn't this make the code redundant? Also, how could this code work if we have to go down 1 level deeper? The only reason I can imagine doing this if `generation_config` is set after the model was initialized, but why would you need to do this?\r\n\r\nCould you help me with this and explain how `generation_config` is supposed to be initialized and used?  \r\n\r\nThank you :) Best\r\nSimon",
    "url": "https://github.com/huggingface/peft/issues/1401",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-27T02:02:30Z",
    "updated_at": "2024-03-11T15:04:29Z",
    "user": "simon-lund"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 541,
    "title": "Sharpe Linux-x86",
    "body": "### Question\n\nHi,\r\n\r\nFirstly, many thanks for all your work.\r\n\r\nMy use case is to generate sentence embeddings for semantic matching. I develop on Mac but deploy to AWS Lambda.\r\n\r\nYour package runs fine out the box on my Mac but fails to load Sharp on Lambda. I spent a couple of days trying lots of different things (fetching and building for Linux x86 and moving files around), but I never got it to work. In the end I removed the dependency on Sharp and it worked.\r\n\r\nAll's well, at present, but I do have a requirement in the future to embed images.\r\n\r\nSorry, I realise this may be more of a NPM issue (or more likely my knowledge of it), but any help would be appreciated.\r\n\r\nThanks\r\nDave ",
    "url": "https://github.com/huggingface/transformers.js/issues/541",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-26T11:36:05Z",
    "updated_at": "2024-10-18T13:30:10Z",
    "user": "Damibu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 118357,
    "title": "How to modify this framework to support using CUDA unified memory?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\r\n\r\nHi all,\r\n\r\nI am a PyTorch user and use open-sourced GPU-based GNN frameworks based on PyTorch. I want to ask if the latest GPU-based Pytorch support CUDA unified memory allocation for tensors?\r\nI found a PR https://github.com/pytorch/pytorch/pull/106200 has supported this to PyTorch, but it seems that it hasn't been merged.\r\nWhat should users do to enable this mode? \r\nWould you please suggest some instructions or lines of example code?\r\n\r\nThank you very much, sir!\r\n\r\n### Alternatives\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\ncc @ptrblck @0x804d8000",
    "url": "https://github.com/pytorch/pytorch/issues/118357",
    "state": "closed",
    "labels": [
      "module: cuda",
      "triaged",
      "module: CUDACachingAllocator"
    ],
    "created_at": "2024-01-26T03:41:02Z",
    "updated_at": "2024-02-01T03:41:58Z",
    "user": "zlwu92"
  },
  {
    "repo": "pytorch/vision",
    "number": 8232,
    "title": "Input Norms and Channel Order for EfficientNet",
    "body": "### \ud83d\udcda The doc issue\n\nThe documentation for all pretrained models lacks clear details regarding the order of color channels for input images, as well as the specific normalization mean and standard deviation values. I am particularly looking for this information in relation to the EfficientNet model.\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/8232",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-25T22:17:07Z",
    "updated_at": "2024-01-26T10:10:49Z",
    "comments": 2,
    "user": "ivanstepanovftw"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1487,
    "title": "How to run docker on a DPO model",
    "body": "### Discussed in https://github.com/huggingface/text-generation-inference/discussions/1481\r\n\r\n<div type='discussions-op-text'>\r\n\r\n<sup>Originally posted by **tamanna-mostafa** January 24, 2024</sup>\r\n1. I fine-tuned mistral 7b model with preference data (32k).\r\n2. Then I ran DPO on the fine tuned model with 12k data.\r\nThis is the command I used to run docker:\r\n```\r\naccelerate launch --config_file ./accelerate_configs/ds_zero3.yaml rlhf_dpo.py \\\r\n--model_name_or_path=\"/mnt/efs/data/tammosta/files_t/output_sft_32k\" \\\r\n--output_dir=\"/mnt/efs/data/tammosta/files_t/DPO_output_mistral_32k\" \\\r\n--data_path=\"/mnt/efs/data/tammosta/files_t/DPO_data_rbs_clean_AIF.json\" \\\r\n--use_lamma2_peft_config False \\\r\n--beta 0.1 \\\r\n--optimizer_type adamw_hf \\\r\n--learning_rate 1e-6 \\\r\n--warmup_steps 50 \\\r\n--per_device_train_batch_size 1 \\\r\n--per_device_eval_batch_size 1 \\\r\n--gradient_accumulation_steps 8 \\\r\n--lora_alpha 16 \\\r\n--lora_dropout 0.05 \\\r\n--lora_r 8 \\\r\n--max_prompt_length 2048 \\\r\n--max_length 4096 \\\r\n--num_train_epochs 4 \\\r\n--logging_steps 20 \\\r\n--save_steps 100 \\\r\n--save_total_limit 8 \\\r\n--eval_steps 50 \\\r\n--gradient_checkpointing True \\\r\n--report_to \"wandb\"\r\n```\r\n3. Now, I need to run inference on the DPO model.\r\nI ran the following commands for this:\r\n ```\r\nmodel=/data/DPO_output_mistral_32k\r\nvolume=/mnt/efs/data/tammosta/files_t:/data\r\nnum_shard=8\r\n docker run --gpus all --shm-size 1g -p 172.31.8.218:80:80 -v $volume ghcr.io/huggingface/text-generation-inference:1.1.0 --model-id $model --num-shard $num_shard --max-input-length 4095 --max-total-tokens 12000\r\n\r\n```\r\n\r\nHowever, the docker failed to initialize the model with the following error:\r\n\r\n`OSError: /data/DPO_output_mistral_32k does not appear to have a file named config.json. Checkout ' https://huggingface.co//data/DPO_output_mistral_32k/None ' for available files.`\r\n\r\nDoes anyone know how to create/find the config.json file?\r\nI'll highly appreciate any help.</div>",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1487",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-25T17:11:52Z",
    "updated_at": "2024-01-31T16:44:32Z",
    "user": "tamanna-mostafa"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 539,
    "title": "How can i use this Model?",
    "body": "### Question\n\nHow can i use this Model? https://huggingface.co/shibing624/macbert4csc-base-chinese",
    "url": "https://github.com/huggingface/transformers.js/issues/539",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-25T13:12:08Z",
    "updated_at": "2025-10-13T04:58:48Z",
    "user": "wfk007"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1483,
    "title": "how to pdb text-generation-server",
    "body": "### System Info\r\n\r\n```\r\n2024-01-25T09:10:08.096040Z  INFO text_generation_launcher: Runtime environment:\r\nTarget: x86_64-unknown-linux-gnu\r\nCargo version: 1.70.0\r\nCommit sha: 9f18f4c00627e1a0ad696b6774e5ad7ca8f4261c\r\nDocker label: sha-9f18f4c\r\nnvidia-smi:\r\nThu Jan 25 09:10:08 2024       \r\n   +---------------------------------------------------------------------------------------+\r\n   | NVIDIA-SMI 535.113.01             Driver Version: 535.113.01   CUDA Version: 12.2     |\r\n   |-----------------------------------------+----------------------+----------------------+\r\n   | GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |\r\n   | Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |\r\n   |                                         |                      |               MIG M. |\r\n   |=========================================+======================+======================|\r\n   |   0  NVIDIA GeForce RTX 3090        Off | 00000000:1A:00.0 Off |                  N/A |\r\n   | 30%   28C    P8              24W / 350W |      5MiB / 24576MiB |      0%      Default |\r\n   |                                         |                      |                  N/A |\r\n```\r\n\r\n### Information\r\n\r\n- [X] Docker\r\n- [ ] The CLI directly\r\n\r\n### Tasks\r\n\r\n- [X] An officially supported command\r\n- [ ] My own modifications\r\n\r\n### Reproduction\r\n\r\nWhen i add `pdb.set_trace()` in .py of text-generation-server, text-generation-launcher repeats the following log and seems to be stuck:\r\n\r\n```\r\n2024-01-25T09:07:04.875448Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:07:14.894477Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:07:24.911704Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:07:34.928347Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:07:44.947306Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:07:54.965355Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:08:04.984481Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:08:15.004175Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:08:25.022317Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:08:35.041246Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:08:45.059839Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:08:55.078293Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:09:05.097024Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:09:15.117255Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:09:25.136635Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:09:35.156270Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:09:45.175864Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:09:55.194405Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n2024-01-25T09:10:05.214396Z  INFO shard-manager: text_generation_launcher: Waiting for shard to be ready... rank=0\r\n\r\n```\r\n\r\n### Expected behavior\r\n\r\nI want to know how to debug .py of text-generation-server except logger?",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1483",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-25T09:21:32Z",
    "updated_at": "2024-02-19T07:23:14Z",
    "user": "jessiewiswjc"
  },
  {
    "repo": "pytorch/serve",
    "number": 2907,
    "title": "How to use torchserve metrics",
    "body": "### \ud83d\udcda The doc issue\n\nWhen I call curl http://127.0.0.1:8082/metrics, it always returns empty results, even if it is called after model inference. But there is clearly a corresponding log in model_metrics.log. I saw that the previous Issue said that prometheus is currently supported as a plug-in? I would like to ask if there is any corresponding documentation.\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2907",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-25T07:50:39Z",
    "updated_at": "2024-03-20T21:53:20Z",
    "user": "pengxin233"
  },
  {
    "repo": "pytorch/serve",
    "number": 2905,
    "title": "Can i use multiple workers in single GPU?",
    "body": "Thanks for your great project.\r\n\r\nI'm newbie and this is my first experience using Torchserve for my project.\r\nI tried to deploy my model using torchserve-gpu.\r\n\r\nIf I want better performance, I can increase the number of workers.\r\nWhen processing with a single worker, GPU usage was not high, so I added more workers to get more inference throughput.\r\n\r\nI think my short experience and knowledge can affect GPU resource scheduling.\r\nBut I'm asking because I think there may be more problems than I thought.\r\n\r\n- Is it ok to use more workers in single GPU environment?\r\n- Are there any other side effects of more workers settings?\r\n\r\n",
    "url": "https://github.com/pytorch/serve/issues/2905",
    "state": "closed",
    "labels": [
      "question",
      "triaged"
    ],
    "created_at": "2024-01-25T01:40:42Z",
    "updated_at": "2024-01-30T06:15:08Z",
    "user": "Twinparadox"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6614,
    "title": "`datasets/downloads` cleanup tool",
    "body": "### Feature request\r\n\r\nSplitting off https://github.com/huggingface/huggingface_hub/issues/1997 - currently `huggingface-cli delete-cache` doesn't take care of cleaning `datasets` temp files\r\n\r\ne.g. I discovered having millions of files under `datasets/downloads` cache, I had to do:\r\n\r\n```\r\nsudo find /data/huggingface/datasets/downloads -type f -mtime +3 -exec rm {} \\+\r\nsudo find /data/huggingface/datasets/downloads -type d -empty -delete\r\n```\r\n \r\ncould the cleanup be integrated into `huggingface-cli` or a different tool provided to keep the folders tidy and not consume inodes and space \r\n\r\ne.g. there were tens of thousands of `.lock` files - I don't know why they never get removed - lock files should be temporary for the duration of the operation requiring the lock and not remain after the operation finished, IMHO.\r\n\r\nAlso I think one should be able to nuke `datasets/downloads` w/o hurting the cache, but I think there are some datasets that rely on files extracted under this dir - or at least they did in the past - which is very difficult to manage since one has no idea what is safe to delete and what not.\r\n\r\nThank you\r\n\r\n@Wauplin (requested to be tagged)",
    "url": "https://github.com/huggingface/datasets/issues/6614",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2024-01-24T18:52:10Z",
    "updated_at": "2024-01-24T18:55:09Z",
    "comments": 0,
    "user": "stas00"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28663,
    "title": "How to set stopping criteria in model.generate() when a certain word appear ",
    "body": "### Feature request\n\nstopping criteria in model.generate() when a certain word appear \r\n\r\nThe word I need to stop the generation when found is : [/SENTENCE]\r\nBut the model doesn't generate the word itself, instead, it generates the subwords\r\n [ [/,SEN,TE,NC,E] ] \r\nlike this . \r\n\r\ncorresponding ids from the tokenizer are, \r\n( Id and subword word)\r\n28792 => [\r\n28748 => /\r\n28759 => SEN\r\n2654 => TE\r\n1197 => NC\r\n28793 => E]\r\n\r\nso how can i put the condition in **StoppingCriteriaList** that i should stop the generation when the [/SENTENCE] found. \n\n### Motivation\n\nstopping criteria in model.generate() when a certain word appear \r\n\r\nThe word I need to stop the generation when found is : [/SENTENCE]\r\nBut the model doesn't generate the word itself, instead, it generates the subwords\r\n [ [/,SEN,TE,NC,E] ] \r\nlike this . \r\n\r\ncorresponding ids from the tokenizer are, \r\n( Id and subword word)\r\n28792 => [\r\n28748 => /\r\n28759 => SEN\r\n2654 => TE\r\n1197 => NC\r\n28793 => E]\r\n\r\nso how can i put the condition in **StoppingCriteriaList** that i should stop the generation when the [/SENTENCE] found. \n\n### Your contribution\n\nstopping criteria in model.generate() when a certain word appear \r\n\r\nThe word I need to stop the generation when found is : [/SENTENCE]\r\nBut the model doesn't generate the word itself, instead, it generates the subwords\r\n [ [/,SEN,TE,NC,E] ] \r\nlike this . \r\n\r\ncorresponding ids from the tokenizer are, \r\n( Id and subword word)\r\n28792 => [\r\n28748 => /\r\n28759 => SEN\r\n2654 => TE\r\n1197 => NC\r\n28793 => E]\r\n\r\nso how can i put the condition in **StoppingCriteriaList** that i should stop the generation when the [/SENTENCE] found. ",
    "url": "https://github.com/huggingface/transformers/issues/28663",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-23T15:16:38Z",
    "updated_at": "2024-03-02T08:03:44Z",
    "user": "pradeepdev-1995"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2618,
    "title": "\u2753 [Question] How to compile a model with A16W8?",
    "body": "Hi Torch-TensorRT team:\r\n\r\nI'm wondering how can I compile a model with 8 bit weights, but using 16 bit activations?\r\nThanks a lot!",
    "url": "https://github.com/pytorch/TensorRT/issues/2618",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-23T12:53:23Z",
    "updated_at": "2024-01-25T20:47:14Z",
    "user": "jiangwei221"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2333,
    "title": "Replace TypedDict with dataclass?",
    "body": "Do we want to replace the TypedDict objects with dataclasses?\r\n\r\nIf so: note that the objects we serialize should be serialized too without any change by orjson, at the price of a small overhead (15% in their example: https://github.com/ijl/orjson#dataclass)\r\n\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2333",
    "state": "closed",
    "labels": [
      "good first issue",
      "question",
      "refactoring / architecture",
      "P2"
    ],
    "created_at": "2024-01-23T10:49:52Z",
    "updated_at": "2024-06-19T14:30:53Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1664,
    "title": "Bitsandbytes integration in ORTModelForCausalLM.from_pretrained()",
    "body": "### System Info\n\n```shell\noptimum==1.17.0.dev0\n```\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nThe given code\r\n```\r\nfrom optimum.onnxruntime import ORTModelForCausalLM\r\nfrom transformers import BitsAndBytesConfig\r\nfinetuned_model_name = \"path\"\r\nimport torch\r\ncompute_dtype = getattr(torch, \"float16\")\r\nbnb_config = BitsAndBytesConfig(load_in_4bit=True,\r\n                                bnb_4bit_quant_type=\"nf4\",\r\n                                bnb_4bit_compute_dtype=compute_dtype,\r\n                                bnb_4bit_use_double_quant=False)\r\nort_model = ORTModelForCausalLM.from_pretrained(\r\n    finetuned_model_name,\r\n    use_io_binding=True,\r\n    quantization_config=bnb_config,\r\n    export=True,\r\n    use_cache=True,\r\n    from_transformers=True\r\n)\r\n```\r\nshows the errror\r\n```\r\nTypeError: _from_transformers() got an unexpected keyword argument 'quantization_config'\r\n```\r\nso how to do quantization while loading with **ORTModelForCausalLM**\n\n### Expected behavior\n\nThe given code\r\n```\r\nfrom optimum.onnxruntime import ORTModelForCausalLM\r\nfrom transformers import BitsAndBytesConfig\r\nfinetuned_model_name = \"path\"\r\nimport torch\r\ncompute_dtype = getattr(torch, \"float16\")\r\nbnb_config = BitsAndBytesConfig(load_in_4bit=True,\r\n                                bnb_4bit_quant_type=\"nf4\",\r\n                                bnb_4bit_compute_dtype=compute_dtype,\r\n                                bnb_4bit_use_double_quant=False)\r\nort_model = ORTModelForCausalLM.from_pretrained(\r\n    finetuned_model_name,\r\n    use_io_binding=True,\r\n    quantization_config=bnb_config,\r\n    export=True,\r\n    use_cache=True,\r\n    from_transformers=True\r\n)\r\n```\r\nshows the errror\r\n```\r\nTypeError: _from_transformers() got an unexpected keyword argument 'quantization_config'\r\n```\r\nso how to do quantization while loading with **ORTModelForCausalLM**",
    "url": "https://github.com/huggingface/optimum/issues/1664",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-01-23T08:56:45Z",
    "updated_at": "2024-01-23T08:56:45Z",
    "comments": 0,
    "user": "pradeepdev-1995"
  },
  {
    "repo": "pytorch/xla",
    "number": 6362,
    "title": "How to do multi-machine spmd training\uff1f",
    "body": "## \u2753 Questions and Help\r\nAt present, I have passed the single-machine spmd training, but I do not know how to run the multi-machine spmd training. Could you give me a running example\uff1f\r\n@vanbasten23",
    "url": "https://github.com/pytorch/xla/issues/6362",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-23T03:33:52Z",
    "updated_at": "2024-03-13T09:21:25Z",
    "user": "mars1248"
  },
  {
    "repo": "pytorch/text",
    "number": 2223,
    "title": "The Future of torchtext",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\n\r\n<!-- Please send questions or ask for help here. -->\r\n\r\nAs of September 2023 development efforts on torchtext has been stopped. I am wondering what's the future plans in this regard. To opt in for hugging face libraries such as tokenizers? Currently without using the torchtext library it's not really unclear how to work on simple task like text classfication where we don't use a LLM. I can do the preprocessing in spacy and connect to pytorch but somehow it feels different. I'd prefer to do all in pytorch but so far it doesn't seem possible. I didn't invest time into torchtext since so far there is no future for this library and also tutorials just don't work. Perhaps an update/pointers would be nice.\r\n\r\nThanks in advance\r\n",
    "url": "https://github.com/pytorch/text/issues/2223",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-22T20:40:10Z",
    "updated_at": "2024-03-15T16:18:22Z",
    "comments": 1,
    "user": "lordsoffallen"
  },
  {
    "repo": "huggingface/peft",
    "number": 1382,
    "title": "How to set a predefined weight for LoRA and the linear layer",
    "body": "Hi,\r\n\r\nThanks for your great job! \r\n\r\nI have a question: When adding LoRA on a linear layer, how to set a predefined weight for LoRA and the linear layer, instead of just 0.5 : 0.5 ?\r\n\r\n",
    "url": "https://github.com/huggingface/peft/issues/1382",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-22T13:24:31Z",
    "updated_at": "2024-02-06T08:37:49Z",
    "user": "quqxui"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2367,
    "title": "how to prevent accelerate from concatenating tensors in batch? ",
    "body": "My `collate_fn` in dataloader returns a list of image tensors with different height and width. After using `accelerator.prepare(model, optimizer, dataloader)`, I noticed that accelerate seems to automatically concatenate the tensors during `for step, batch in enumerate(train_dataloader)` iteration, and the size-mismatch leads to Exceptions. \r\nIs there any parameter to prevent the auto-concatenating?\r\nOr, should I remove `dataloader` from `accelerator.prepare` params?",
    "url": "https://github.com/huggingface/accelerate/issues/2367",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-22T11:26:06Z",
    "updated_at": "2024-01-23T03:24:08Z",
    "user": "feiyangsuo"
  },
  {
    "repo": "pytorch/serve",
    "number": 2899,
    "title": "How torchserve uses grpc in java",
    "body": "### \ud83d\udcda The doc issue\n\nI want to use grpc in the java service to call torchserve's model, but I don't seem to have found any relevant documentation.\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2899",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-22T08:54:02Z",
    "updated_at": "2024-03-20T21:53:35Z",
    "comments": 2,
    "user": "pengxin233"
  },
  {
    "repo": "huggingface/trl",
    "number": 1264,
    "title": "How to train the model and ref_model on multiple GPUs with averaging?",
    "body": "For example,I have two RTX 3090 GPUs, and both the model and ref_model are 14 billion parameter models. I need to distribute these two models evenly across the two cards for training.\r\nthis is my code,but have an error:\r\n```\r\n\"\"\"\r\nCUDA_VISIBLE_DEVICES=0 python Sakura_DPO.py \\\r\n    --base_model Qwen-14B-Chat \\\r\n    --ref_model Qwen-14B-Chat  \\\r\n    --data-path  distilabel-intel-orca-dpo-pairs.json \\\r\n    --output_dir distilabel-intel-orca-dpo-pairs \\\r\n    --num_epochs 1 \\\r\n    --batch_size 16 \\\r\n    --micro_batch_size 1 \\\r\n    --learning_rate 1e-6 \\\r\n    --lora_r 32 \\\r\n    --lora_alpha 32 \\\r\n    --lora_dropout 0.05 \\\r\n    --lr_scheduler 'cosine' \\\r\n    --warmup_ratio 0.1 \\\r\n    --cutoff_len 768\r\n##########################\r\ntransformers\r\nbitsandbytes\r\nevaluate\r\npeft\r\ntransformers_stream_generator\r\ntiktoken\r\nfire\r\ntrl\r\naccelerate\r\ndeepspeed\r\n\"\"\"\r\nimport os\r\nimport sys\r\nfrom typing import List\r\n\r\nimport fire\r\nimport torch\r\nimport transformers\r\n#import kosy_transformers\r\nfrom datasets import load_dataset, Dataset\r\n\r\nfrom transformers import TrainerCallback, TrainingArguments, TrainerState, TrainerControl\r\nfrom transformers.trainer_utils import PREFIX_CHECKPOINT_DIR\r\nfrom torch.nn import functional as F\r\n\r\nfrom peft import (\r\n    LoraConfig,\r\n    get_peft_model,\r\n    prepare_model_for_kbit_training,\r\n    set_peft_model_state_dict\r\n)\r\n\r\nfrom transformers import LlamaForCausalLM, LlamaTokenizer\r\nfrom transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig\r\nfrom trl import DPOTrainer\r\nimport bitsandbytes as bnb\r\n#torch.autograd.set_detect_anomaly(True)\r\ndef find_all_linear_names(model):\r\n    #cls = bnb.nn.Linear8bitLt \r\n    cls = bnb.nn.Linear4bit \r\n    lora_module_names = set()\r\n    for name, module in model.named_modules():\r\n        if isinstance(module, cls):\r\n            names = name.split('.')\r\n            lora_module_names.add(names[0] if len(names) == 1 else names[-1])\r\n\r\n\r\n    if 'lm_head' in lora_module_names: # needed for 16-bit\r\n        lora_module_names.remove('lm_head')\r\n    return list(lora_module_names)\r\n#os.environ[\"TOKENIZERS_PARALLELISM\"] = \"false\"\r\nfrom accelerate import Accelerator\r\nfrom accelerate import PartialState\r\ndef train(\r\n    # model/data params\r\n    base_model: str = \"\", \r\n    ref_model: str = \"None\", \r\n    data_path: str = \"\",\r\n    output_dir: str = \"\",\r\n    # training hyperparams\r\n    batch_size: int = 128,\r\n    micro_batch_size: int = 8,\r\n    num_epochs: int = 1,\r\n    learning_rate: float = 3e-4,\r\n    cutoff_len: int = 4096,\r\n    val_set_size: int = 0,\r\n    lr_scheduler: str = \"cosine\",\r\n    warmup_ratio: float = 0.1, \r\n    # lora hyperparams\r\n    lora_r: int = 16,\r\n    lora_alpha: int = 16,\r\n    lora_dropout: float = 0.05,\r\n    # from peft docs: [\"q_proj\", \"k_proj\", \"v_proj\", \"o_proj\", \"fc_in\", \"fc_out\", \"wte\", \"gate_proj\", \"down_proj\", \"up_proj\"]\r\n    lora_target_modules: List[str] = [\"gate_proj\", \"down_proj\", \"up_proj\"],\r\n    # llm hyperparams\r\n    train_on_inputs: bool = False,  # if False, masks out inputs in loss\r\n    add_eos_token: bool = False,\r\n    group_by_length: bool = False,  # faster, but produces an odd training loss curve\r\n    gradient_checkpointing: bool = True,\r\n    # wandb params\r\n    #wandb_project: str = \"\",\r\n    #wandb_run_name: str = \"\",\r\n    #wandb_watch: str = \"\",  # options: false | gradients | all\r\n    #wandb_log_model: str = \"\",  # options: false | true\r\n    resume_from_checkpoint: str = None,  # either training checkpoint or final adapter\r\n    prompt_template_name: str = \"alpaca\",\r\n    # NEFTune params\r\n    noise_alpha: int = 5\r\n):\r\n    if int(os.environ.get(\"LOCAL_RANK\", 0)) == 0:\r\n        print(\r\n            f\"Params using prompt template {prompt_template_name}:\\n\"\r\n            f\"base_model: {base_model}\\n\"\r\n            f\"ref_model: {ref_model}\\n\"\r\n            f\"data_path: {data_path}\\n\"\r\n            f\"output_dir: {output_dir}\\n\"\r\n            f\"batch_size: {batch_size}\\n\"\r\n            f\"micro_batch_size: {micro_batch_size}\\n\"\r\n            f\"num_epochs: {num_epochs}\\n\"\r\n            f\"learning_rate: {learning_rate}\\n\"\r\n            f\"cutoff_len: {cutoff_len}\\n\"\r\n            f\"val_set_size: {val_set_size}\\n\"\r\n            f\"lr_scheduler: {lr_scheduler}\\n\"\r\n            f\"warmup_ratio: {warmup_ratio}\\n\"\r\n            f\"lora_r: {lora_r}\\n\"\r\n            f\"lora_alpha: {lora_alpha}\\n\"\r\n            f\"lora_dropout: {lora_dropout}\\n\"\r\n            f\"lora_target_modules: {lora_target_modules}\\n\"\r\n            f\"train_on_inputs: {train_on_inputs}\\n\"\r\n            f\"add_eos_token: {add_eos_token}\\n\"\r\n            f\"group_by_length: {group_by_length}\\n\"\r\n             f\"gradient_checkpointing: {gradient_checkpointing}\\n\"\r\n            #f\"wandb_project: {wandb_project}\\n\"\r\n            #f\"wandb_run_name: {wandb_run_name}\\n\"\r\n            #f\"wandb_watch: {wandb_watch}\\n\"\r\n            #f\"wandb_log_model: {wandb_log_model}\\n\"\r\n            f\"resume_from_checkpoint: {resume_from_checkpoint or False}\\n\"\r\n        )\r\n    assert (\r\n        base_model\r\n    ), \"Please spe",
    "url": "https://github.com/huggingface/trl/issues/1264",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-22T07:54:18Z",
    "updated_at": "2024-08-27T16:08:49Z",
    "user": "Minami-su"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 528,
    "title": "Preloading / Lazy loading model before generate requested",
    "body": "### Question\n\nHi @xenova \r\n\r\nI've been looking around for this type of functionality for ages and didn't realize you had this type of front-end inferencing locked down in such awesome fashion on browsers. Brilliant!!!\r\n\r\nIn the demo at https://xenova.github.io/transformers.js/, the model is loaded one-time when sending the first request/inference. \r\n\r\nI want to pre-load a model in the background when a user opens the page, but not sure on the whether there is a method in your API for https://cdn.jsdelivr.net/npm/@xenova/transformers@2.14.0, or whether model loading is purely contingent on a first inference.\r\n\r\nI've checked your API link: https://huggingface.co/docs/transformers.js/api/env, and nothing there that I can see so I'm assuming it requires a first run.\r\n\r\nIf it requires a first-run I can think of a couple workarounds, but wanted to check with you before heading down that rabbit hole.\r\n\r\nCheers",
    "url": "https://github.com/huggingface/transformers.js/issues/528",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-20T23:09:13Z",
    "updated_at": "2024-01-29T23:23:44Z",
    "user": "gidzr"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2429,
    "title": "How to additional special tokens using CrossEncoder?",
    "body": "I am using cross encoder.\r\n\r\nI would like add a new special token (e.g., '[EOT]') on top of the pre-trained model & tokenizer (e.g., 'bert-base-uncased').  \r\n\r\nI am wondering what is the best way to do it? ",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2429",
    "state": "open",
    "labels": [],
    "created_at": "2024-01-20T15:52:39Z",
    "updated_at": "2024-01-20T16:25:00Z",
    "user": "mucun1988"
  },
  {
    "repo": "pytorch/serve",
    "number": 2898,
    "title": "Low GPU utilization due to CPU-bound preprocessing ",
    "body": "I am running torchserve with batch size = 32 and delay = 30ms\r\n\r\nMy preprocessing is CPU bound and my inference is GPU bound.\r\nThe GPU cannot start until the batch is ready on the CPU.\r\n\r\nCurrently, this leads to a  serialized workflow where each stage blocks on the previous one:\r\n\r\n* Wait for batch to accumulate in the \"front end\"\r\n* preprocessing -  CPU bound\r\n* inference - GPU bound\r\n\r\nProblem  \r\n======\r\nI am getting rather low GPU utilization\r\nThis is because GPU is idle while batch is being prepared on the CPU.\r\n\r\nWhat I tried\r\n=========\r\nRunning multiple workers - Helps, but limited by # of cores and GPU memory.\r\nUsing threadpool for preprocessing -  helps, but requires having at least 2-3X cores than workers to avoid contention\r\n\r\nQuestion\r\n=======\r\nHow can I increase GPU utilization given that I need to wait for the pre-processing on the CPU?\r\nAny best practice or rules of thumb for this case?\r\n\r\n\r\nIdea\r\n====\r\nStarting processing the batch as it's being built up on the frontend vs. idle until the entire batch is ready on the frontend:\r\n* Start accumulating a new batch\r\n* Immediately call handle() with a *generator* rather than wait for the batch to accumulate\r\n* Start preprocessing on the CPU from the generator (block as long as payloads are not yet available)\r\n* When generator is exhausted, pass the entire batch of tensors to the GPU and infer.\r\n\r\nI don't know if this idea is possible without major changes in the core, but putting it out there..\r\n\r\n",
    "url": "https://github.com/pytorch/serve/issues/2898",
    "state": "open",
    "labels": [],
    "created_at": "2024-01-20T14:01:30Z",
    "updated_at": "2024-01-24T05:15:05Z",
    "comments": 2,
    "user": "assapin"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1658,
    "title": "TextStreamer not supported for ORTCausalLM?",
    "body": "### System Info\r\n\r\n```shell\r\nSystem: IBM Power10\r\n`5.14.0-362.13.1.el9_3.ppc64le`\r\n\r\nOS: RHEL 9.3\r\n\r\nFramework versions:\r\noptimum==1.16.2\r\ntransformers==4.36.2\r\ntorch==2.0.1\r\nonnx==1.13.1\r\nonnxruntime==1.15.1\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n@JingyaHuang @echarlaix \r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [x] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [x] My own task or dataset (give details below)\r\n\r\n### Reproduction (minimal, reproducible, runnable)\r\n\r\nThis is a minimal repoducable example based on the official huggingface streamer example:\r\n\r\nhttps://huggingface.co/docs/transformers/internal/generation_utils#transformers.TextStreamer.example\r\n\r\nI exported the model before using `optimum-cli`:\r\n\r\n`optimum-cli export onnx --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 /data/LLMs/onnx/tinyllama_onnx/`\r\n\r\n```python\r\nfrom transformers import AutoTokenizer, TextStreamer\r\nfrom optimum.onnxruntime import ORTModelForCausalLM\r\n\r\nmodel_id = \"/data/LLMs/onnx/tinyllama_onnx\"\r\ntokenizer = AutoTokenizer.from_pretrained(model_id, padding_side=\"left\")\r\ntokenizer.pad_token = tokenizer.eos_token\r\n\r\nmodel = ORTModelForCausalLM.from_pretrained(model_id, use_cache=True, use_merged=False, use_io_binding=False)\r\ntext = \"My name is William and I live in\"\r\n\r\ninp = tokenizer(text, return_tensors=\"pt\", padding=True)\r\nstreamer = TextStreamer(inp)\r\n_ = model.generate(**inp, streamer=streamer, max_new_tokens=256)\r\n```\r\n\r\nError Message:\r\n\r\n```python\r\nSetting `pad_token_id` to `eos_token_id`:2 for open-end generation.\r\n---------------------------------------------------------------------------\r\nKeyError                                  Traceback (most recent call last)\r\nFile ~/micromamba/envs/gen-ai/lib/python3.10/site-packages/transformers/tokenization_utils_base.py:266, in BatchEncoding.__getattr__(self, item)\r\n    265 try:\r\n--> 266     return self.data[item]\r\n    267 except KeyError:\r\n\r\nKeyError: 'decode'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nAttributeError                            Traceback (most recent call last)\r\nCell In[7], line 5\r\n      3 inp = tokenizer(text, return_tensors=\"pt\", padding=True)\r\n      4 streamer = TextStreamer(inp)\r\n----> 5 _ = model.generate(**inp, streamer=streamer, max_new_tokens=256)\r\n\r\nFile ~/micromamba/envs/gen-ai/lib/python3.10/site-packages/torch/utils/_contextlib.py:115, in context_decorator.<locals>.decorate_context(*args, **kwargs)\r\n    112 @functools.wraps(func)\r\n    113 def decorate_context(*args, **kwargs):\r\n    114     with ctx_factory():\r\n--> 115         return func(*args, **kwargs)\r\n\r\nFile ~/micromamba/envs/gen-ai/lib/python3.10/site-packages/transformers/generation/utils.py:1611, in GenerationMixin.generate(self, inputs, generation_config, logits_processor, stopping_criteria, prefix_allowed_tokens_fn, synced_gpus, assistant_model, streamer, negative_prompt_ids, negative_prompt_attention_mask, **kwargs)\r\n   1608     input_ids = inputs_tensor if model_input_name == \"input_ids\" else model_kwargs.pop(\"input_ids\")\r\n   1610 if streamer is not None:\r\n-> 1611     streamer.put(input_ids.cpu())\r\n   1613 # 6. Prepare `max_length` depending on other stopping criteria.\r\n   1614 input_ids_length = input_ids.shape[-1]\r\n\r\nFile ~/micromamba/envs/gen-ai/lib/python3.10/site-packages/transformers/generation/streamers.py:97, in TextStreamer.put(self, value)\r\n     95 # Add the new token to the cache and decodes the entire thing.\r\n     96 self.token_cache.extend(value.tolist())\r\n---> 97 text = self.tokenizer.decode(self.token_cache, **self.decode_kwargs)\r\n     99 # After the symbol for a new line, we flush the cache.\r\n    100 if text.endswith(\"\\n\"):\r\n\r\nFile ~/micromamba/envs/gen-ai/lib/python3.10/site-packages/transformers/tokenization_utils_base.py:268, in BatchEncoding.__getattr__(self, item)\r\n    266     return self.data[item]\r\n    267 except KeyError:\r\n--> 268     raise AttributeError\r\n\r\nAttributeError: \r\n```\r\n\r\n### Expected behavior\r\n\r\nI would expect a streaming of tokens instead of waiting for the whole text to be processed/generated upfront :) ",
    "url": "https://github.com/huggingface/optimum/issues/1658",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-01-20T11:50:11Z",
    "updated_at": "2024-01-29T12:28:40Z",
    "comments": 1,
    "user": "mgiessing"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1657,
    "title": "Clarity on the convert.py for a model to ONNX.py.. documentation issue",
    "body": "### Feature request\n\nI need some help understanding how this script is supposed to be run / implemented?\r\n\r\nhttps://github.com/huggingface/optimum/blob/main/optimum/exporters/onnx/convert.py\r\n\r\nQuestions:\r\n1. is this already included when I pip install optimum? .. which is implemented using the instructions at:\r\nhttps://huggingface.co/docs/optimum/onnxruntime/usage_guides/quantization#quantizing-a-model-to-be-used-with-optimums-cli\r\n2. or is it the script that's called on from the modal.save when inferencing/calling onnx model?\r\n3. or is this a separate script that can be called independently like the convert.py that xenova has?\r\n\r\nAlso, in order to run the optimum/exporters/onnx/convert.py script, do I need to download the full exporters folder, just the onnx folder, or can I just copy-paste the script and run that indepdently?\r\n\r\nMuch appreciated\n\n### Motivation\n\nDeeper understanding to use the resources in this github\n\n### Your contribution\n\nNone",
    "url": "https://github.com/huggingface/optimum/issues/1657",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-20T04:59:10Z",
    "updated_at": "2024-02-07T04:13:20Z",
    "comments": 2,
    "user": "gidzr"
  },
  {
    "repo": "huggingface/candle",
    "number": 1608,
    "title": "How to keep the model loaded in memory?",
    "body": "Hi guys,\r\n\r\nI'm trying to setup a local instance of Phi-2 to use it as an autocomplete provider for my text editor.\r\n\r\nThe problem that I have is that each time I call the command to complete a text, the files have to be retrieved and the model loaded - which is a lot of time wasted for real time autocompletion.\r\n\r\n`/.../candle/target/release/examples$ ./phi --model 2 --quantized --sample-len 12 --prompt \"$(cat text-to-complete.md)\"`\r\n\r\n\tavx: false, neon: true, simd128: false, f16c: false\r\n\ttemp: 0.00 repeat-penalty: 1.10 repeat-last-n: 64\r\n\tretrieved the files in 455.042\u00b5s\r\n\tloaded the model in 2.127639167s\r\n\tstarting the inference loop\r\n\t# The World History\r\n\r\n\tHave you ever wondered how people lived in the past? ...\r\n\r\nDo you know how to keep the model loaded in memory?\r\nLike... Is there a possibility to start a server accepting post requests with prompts to complete - or something like this?\r\n\r\nThanks",
    "url": "https://github.com/huggingface/candle/issues/1608",
    "state": "open",
    "labels": [],
    "created_at": "2024-01-19T19:16:54Z",
    "updated_at": "2024-01-20T00:27:22Z",
    "user": "tdkbzh"
  },
  {
    "repo": "huggingface/peft",
    "number": 1374,
    "title": "How to activate, and keep frozen, multiple adapters?",
    "body": "Hello all,\r\n\r\nI have been working on multiple adapters and part of my project requires that I activate all the loaded adapters. However, they must be frozen. I am running this code:\r\n\r\n```python\r\nadapters_items = iter(tqdm.tqdm(adapters.items()))\r\nfirst_item = next(adapters_items)\r\nmodel_peft = PeftModel.from_pretrained(model, first_item[1], first_item[0], is_trainable=False)\r\n\r\nfor adapter_name, model_id in adapters_items:\r\n    model_peft.load_adapter(model_id, adapter_name, is_trainable=False)\r\n\r\nmodel_peft.base_model.set_adapter(list(adapters.keys()))\r\n```\r\n\r\nAfter some debugging, I see that the adapters are frozen (requires_grad=False) until the last line where I set the active adapters. After they are set to be active, requires_grad=True.\r\n\r\nI see that `set_adapter` calls this function on all the LoraLayers, and how it sets the adapters to trainable.\r\n> https://github.com/huggingface/peft/blob/ebbff4023ad276cbcb2466fd7e99be7d3ae0ae11/src/peft/tuners/tuners_utils.py#L464-L484\r\n\r\nHow can I set the active adapter(s) while keeping them frozen?",
    "url": "https://github.com/huggingface/peft/issues/1374",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-19T11:28:15Z",
    "updated_at": "2024-02-07T11:13:24Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "pytorch/kineto",
    "number": 857,
    "title": "Why PyTorch TensorBoard Profiler (Deprecated)",
    "body": "What is the reson to deptecate  PyTorch TensorBoard Profiler ?\r\nhttps://github.com/pytorch/kineto#pytorch-tensorboard-profiler-deprecated",
    "url": "https://github.com/pytorch/kineto/issues/857",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-19T11:26:43Z",
    "updated_at": "2024-04-11T08:51:34Z",
    "user": "GuWei007"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1457,
    "title": "How to use a finetuned model from my local  directory ",
    "body": "### System Info\r\n\r\ntext-generation 0.6.1\r\n\r\n### Information\r\n\r\n- [ ] Docker\r\n- [X] The CLI directly\r\n\r\n### Tasks\r\n\r\n- [X] An officially supported command\r\n- [ ] My own modifications\r\n\r\n### Reproduction\r\n\r\n```\r\nfrom text_generation import InferenceAPIClient\r\nclient = InferenceAPIClient( \"/mylocalpath/finetunedmodel\")\r\ntest_prompt = \"\"\"sample prompt\"\"\"\r\ntext = client.generate(test_prompt).generated_text\r\nprint(text)\r\n```\r\nit showing the\r\n```\r\nNotFoundError: Model \"/mylocalpath/finetunedmodel\" does not exist\r\n```\r\nThis finetuned model is tuned in the base model - Mistral\r\n\r\n### Expected behavior\r\n\r\nExpect to  load the finetuned model from the local path",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1457",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-01-19T06:18:41Z",
    "updated_at": "2024-03-10T01:45:51Z",
    "user": "pradeepdev-1995"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28598,
    "title": "what is the correct format of input when fine-tuning GPT2 for text generation with batch input? ",
    "body": "### System Info\r\n\r\n- `transformers` version: 4.33.0\r\n- Platform: Windows-10-10.0.19045-SP0\r\n- Python version: 3.10.12\r\n- Huggingface_hub version: 0.16.4\r\n- Safetensors version: 0.3.3\r\n- Accelerate version: 0.22.0\r\n- Accelerate config:    not found\r\n- PyTorch version (GPU?): 2.0.1+cpu (False)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\r\n\r\n\r\n### Who can help?\r\n\r\n@ArthurZucker \r\n @younesbelkada\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [X] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nI want to fine-tune GPT2 for text generation with batch input. And I use follow code to format batch input:\r\n```python\r\nfrom transformers import GPT2LMHeadModel, GPT2Tokenizer\r\n\r\ntokenizer = GPT2Tokenizer.from_pretrained(r'E:\\pythonWork\\models\\gpt2')\r\nmax_length = 8\r\ndatas = [\r\n    \"The dog.\",\r\n    \"The cute dog.\",\r\n]\r\nmodel_input = tokenizer(datas)\r\nprint('original input:\\n', model_input)\r\n\r\n# prepare for batch input\r\n# I add bos token at the start and eos token at the end, and add pad token at the right to pad the sentences to the \r\n# same length. bos_token_id=eos_token_id=50256, and there is not a pad token, so i also use 50256 as pad token. \r\n\r\nlabels_list = []\r\nfor i in range(len(datas)):\r\n    input_ids = [tokenizer.bos_token_id] + model_input['input_ids'][i] + [tokenizer.eos_token_id]  # add  bos and eos token\r\n    input_ids = input_ids + max(0, max_length-len(input_ids))*[tokenizer.eos_token_id]  # add padding token\r\n    attention_mask = [1] + model_input['attention_mask'][i] + [1]  # atten bos and eos token\r\n    attention_mask = attention_mask + max(0, max_length - len(attention_mask)) * [0]  # dose't atten padding token\r\n    labels = [tokenizer.bos_token_id] + model_input['input_ids'][i] + [tokenizer.eos_token_id]  # take loss for bos and eos\r\n    labels = labels + max(0, max_length - len(labels)) * [-100]  # padding dose't take loss\r\n    model_input['input_ids'][i] = input_ids\r\n    model_input['attention_mask'][i] = attention_mask\r\n    labels_list.append(labels)\r\n\r\nmodel_input['labels'] = labels_list\r\nprint('batch input:\\n', model_input)\r\n\r\n```\r\n\r\nprint message\r\n```\r\noriginal input:\r\n {'input_ids': [[464, 3290, 13], [464, 13779, 3290, 13]], \r\n'attention_mask': [[1, 1, 1], [1, 1, 1, 1]]}\r\nbatch input:\r\n {'input_ids': [[50256, 464, 3290, 13, 50256, 50256, 50256, 50256], [50256, 464, 13779, 3290, 13, 50256, 50256, 50256]], \r\n'attention_mask': [[1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0]], \r\n'labels': [[50256, 464, 3290, 13, 50256, -100, -100, -100], [50256, 464, 13779, 3290, 13, 50256, -100, -100]]}\r\n``\r\n\r\n\r\n### Expected behavior\r\n\r\nmy question:\r\n1. the method I take to format batch input, is it right?\r\n2. why can't gpt2 tokenizer auto format batch input like bert tokenzier do?\r\n3. in this pre-training [demo](https://huggingface.co/learn/nlp-course/en/chapter7/6?fw=pt#preparing-the-dataset), \r\n I found that it dose't add bos and eos tokens,  and add pad token only at the end of the sequence. \r\nSo I think, in the pre-training time only need to add pad token to keep the sequence length consistent. \r\nBut when it comes to fine-tuning, additional eos tokens need to be added, and eos needs take loss because the model needs to learn when to stop generating.\r\n Am I right?",
    "url": "https://github.com/huggingface/transformers/issues/28598",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-19T06:17:29Z",
    "updated_at": "2024-01-22T01:49:43Z",
    "user": "minmie"
  },
  {
    "repo": "pytorch/xla",
    "number": 6331,
    "title": "How to choose XRT runtime when using Torch/XLA 2.1.0?",
    "body": "The PJRT docs say that setting `XRT_TPU_CONFIG` would choose the XRT runtime, but even when I set it I see the following warnings in the logs, and PJRT gets enabled. My model trains faster on XRT but I'd like to upgrade to 2.1.0. Thanks!\r\n\r\n```\r\nWARNING:root:PJRT is now the default runtime. For more information, see https://github.com/pytorch/xla/blob/master/docs/pjrt.md\r\nWARNING:root:libtpu.so and TPU device found. Setting PJRT_DEVICE=TPU.\r\n```\r\n",
    "url": "https://github.com/pytorch/xla/issues/6331",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-19T02:59:11Z",
    "updated_at": "2024-01-19T23:56:54Z",
    "user": "andrey-klochkov-liftoff"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28597,
    "title": "How to find or create the `model_state_dict.bin` file for the `convert_llava_weights_to_hf.py` script",
    "body": "Hi @younesbelkada,\r\n\r\nFollowing up on the [fix to the LLaVA convert script](https://github.com/huggingface/transformers/pull/28570) and thanks for all the help with the PR!\r\n\r\nI encountered some issue with the convert script and wanted to ask about the recommended way to create the `model_state_dict.bin` file specified here: https://github.com/huggingface/transformers/blob/772307be7649e1333a933cfaa229dc0dec2fd331/src/transformers/models/llava/convert_llava_weights_to_hf.py#L74\r\n\r\nIn order to create the `model_state_dict.bin` I tried something like the following with the original https://github.com/haotian-liu/LLaVA code:\r\n```python\r\nimport torch\r\nfrom llava.model.language_model.llava_llama import LlavaLlamaForCausalLM\r\n\r\n# load model\r\nkwargs = {\"device_map\": \"auto\", \"torch_dtype\": torch.float16}\r\nmodel = LlavaLlamaForCausalLM.from_pretrained(\"liuhaotian/llava-v1.5-7b\", low_cpu_mem_usage=True, **kwargs)\r\n\r\n# load vision tower\r\nmodel.get_vision_tower().load_model()\r\n\r\n# Save state dict\r\ntorch.save(model.state_dict(), \"tmp/hf_models/llava-v1.5-7b/model_state_dict.bin\")\r\n```\r\n\r\nIt works but when I used the convert script I had to make the following changes: \r\n* Remove keys that ended with `.inv_freq` (e.g. `language_model.model.layers.0.self_attn.rotary_emb.inv_freq`)\r\n* Comment out the update to the `model.config.vocab_size` and `model.config.text_config.vocab_size` with the `pad_shape` here: https://github.com/huggingface/transformers/blob/772307be7649e1333a933cfaa229dc0dec2fd331/src/transformers/models/llava/convert_llava_weights_to_hf.py#L96-L97 otherwise, when I would try to load the converted model, it will error with the following:\r\n    ```python\r\n    from transformers import AutoProcessor, LlavaForConditionalGeneration\r\n    model_id = \"Shopify/llava-1.5-7b\"\r\n\r\n    model = LlavaForConditionalGeneration.from_pretrained(\r\n        model_id,\r\n        torch_dtype=torch.float16,\r\n        low_cpu_mem_usage=True,\r\n    ).to(0)\r\n    ```\r\n    ```console\r\n    ValueError: Trying to set a tensor of shape torch.Size([32064, 5120]) in \"weight\" (which has shape torch.Size([32128, 5120])), this look incorrect.\r\n    ```\r\n\r\nAm I doing something wrong when I create the `model_state_dict.bin` file or am I missing something else?\r\n\r\nThanks again in advance.",
    "url": "https://github.com/huggingface/transformers/issues/28597",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-19T02:38:31Z",
    "updated_at": "2024-01-22T14:28:20Z",
    "user": "isaac-vidas"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 708,
    "title": "Add support for other API endpoints",
    "body": "It would be nice if HuggingChat could be used locally, but calling other remote LLM endpoints other than OpenAI.\r\nFor instance, this could be mistral.ai 's API endpoints (same as OpenAI - only difference is model name), or a custom server configured for it.\r\n\r\nPerhaps just adding a variable in the .env file defining the server? This seems like an easy feature, I could try implementing it myself if I get the time to look a bit more into the code (for instance, figuring out where the model name can be change)\r\nhttps://github.com/huggingface/chat-ui/blob/ee47ff37fddb70f78d1ef8a293d8ed3fbcd24ff9/src/lib/server/endpoints/openai/endpointOai.ts#L13C1-L13C65",
    "url": "https://github.com/huggingface/chat-ui/issues/708",
    "state": "open",
    "labels": [
      "support",
      "models"
    ],
    "created_at": "2024-01-18T18:27:27Z",
    "updated_at": "2024-01-25T17:28:28Z",
    "comments": 4,
    "user": "fbarbe00"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2606,
    "title": "\u2753 [Question] mlp running with torch_tensorrt slower than with inductor\uff1f",
    "body": "## \u2753 Question\r\nI am within the nvcr.io/nvidia/pytorch:23.12-py3 container. The performance of torch_tensorrt is wrose than inductor.\r\nDetails:\r\nexample code\r\n```python\r\nimport torch\r\nimport torch_tensorrt\r\nimport torch.nn as nn\r\n\r\nclass MLPBlocks(nn.Module):\r\n    def __init__(self, window_dim, hidden_dim):\r\n        super().__init__()\r\n        \r\n        self.mlp_1 = nn.Sequential(\r\n            nn.Linear(window_dim, window_dim * 4),\r\n            nn.ReLU(),\r\n            nn.Linear(window_dim * 4, window_dim),\r\n        )\r\n        self.mlp_2 = nn.Sequential(\r\n            nn.Linear(hidden_dim, hidden_dim),\r\n            nn.ReLU(),\r\n            nn.Linear(hidden_dim, hidden_dim),\r\n        )\r\n        \r\n    def forward(self, x):\r\n        x = self.mlp_1(x.transpose(1, 2)).transpose(1, 2)\r\n        x = self.mlp_2(x)\r\n        return x\r\n\r\nclass MLP(nn.Module):\r\n    def __init__(self, *_args):\r\n        super(MLP, self).__init__()\r\n        self.hidden_dim = 256\r\n        self.window_dim = 50\r\n        self.n_feature = 800\r\n        \r\n        self.fc_first = nn.Linear(self.n_feature, self.hidden_dim)\r\n        self.fc_last = nn.Linear(self.hidden_dim, 1)\r\n        self.blocks = nn.ModuleList([MLPBlocks(window_dim=self.window_dim, hidden_dim=self.hidden_dim) for _ in range(8)])\r\n        \r\n    def forward(self, input_x):\r\n        net_x = self.fc_first(input_x.transpose(0, 1))\r\n        for mlp_block in self.blocks:\r\n            net_x = mlp_block(net_x)\r\n        net_x = self.fc_last(torch.mean(net_x, dim=1))\r\n        return net_x\r\n        \r\ndef run_model(x, model):\r\n    for _ in range(10):\r\n        with torch.no_grad():\r\n            res = model(x)\r\n            \r\n    torch.cuda.synchronize()\r\n    start = torch.cuda.Event(enable_timing=True)\r\n    end = torch.cuda.Event(enable_timing=True)\r\n    start.record()\r\n    \r\n    for i in range(50):\r\n        with torch.no_grad():\r\n            res = model(x)\r\n            \r\n    end.record()\r\n    torch.cuda.synchronize()\r\n    return start.elapsed_time(end)/50\r\n    \r\ndef test_inductor(data, model):\r\n    x = data.float().cuda()\r\n    m = model.float().cuda()\r\n    torch._dynamo.reset()\r\n    opt_model = torch.compile(m)\r\n    print(f\"inductor fp32 time: {run_model(x, opt_model)}\")\r\n    \r\n    x = x.half()\r\n    m = m.half()\r\n    torch._dynamo.reset()\r\n    opt_model = torch.compile(m)\r\n    print(f\"inductor fp16 time: {run_model(x, opt_model)}\")\r\n    \r\ndef test_trt_script(data, model):\r\n    x = data.float().cuda()\r\n    m = model.float().cuda()\r\n    script_model = torch.jit.trace(m, x)\r\n    trt_ts_model = torch_tensorrt.compile(script_model, ir=\"torchscript\", inputs=[x], enabled_precisions={torch.float})\r\n    print(f\"trt_script fp32 time: {run_model(x, trt_ts_model)}\")\r\n    \r\n    x = x.half()\r\n    m = m.half()\r\n    script_model = torch.jit.trace(m, x)\r\n    trt_ts_model = torch_tensorrt.compile(script_model, ir=\"torchscript\", inputs=[x], enabled_precisions={torch.half})\r\n    print(f\"trt script fp16 time: {run_model(x, trt_ts_model)}\")\r\n    \r\ndef test_trt_dynamo(data, model):\r\n    x = data.float().cuda()\r\n    m = model.float().cuda()\r\n    torch._dynamo.reset()\r\n    opt_model = torch_tensorrt.compile(m, ir=\"torch_compile\", inputs=[x], enabled_precisions={torch.float})\r\n    print(f\"trt_dynamo fp32 time: {run_model(x, opt_model)}\")\r\n    \r\n    x = data.half().cuda()\r\n    m = model.half().cuda()\r\n    torch._dynamo.reset()\r\n    opt_model = torch_tensorrt.compile(m, ir=\"torch_compile\", inputs=[x], enabled_precisions={torch.half})\r\n    print(f\"trt_dynamo fp16 time: {run_model(x, opt_model)}\")\r\n    \r\nif __name__ == \"__main__\":\r\n    model = MLP()\r\n    x = torch.randn(50, 5000, 800)\r\n    test_inductor(x, model)\r\n    test_trt_script(x, model)\r\n    test_trt_dynamo(x, model)\r\n```\r\nresult\r\n![8f95d9cf-d710-44fe-b1e6-d21f97e08032](https://github.com/pytorch/TensorRT/assets/38726413/73262423-aadd-4579-aa54-456319f935d5)\r\n\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.2.0a0\r\n - CPU Architecture:\r\n - OS (e.g., Linux): Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.10\r\n - CUDA version: 12.3\r\n - GPU models and configuration: A100\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2606",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-18T11:29:42Z",
    "updated_at": "2024-01-19T19:27:17Z",
    "user": "johnzlli"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1451,
    "title": "How to run text generation inference locally",
    "body": "### System Info\n\nI completed the steps for local installation of Text Generation Inference as in here: https://github.com/huggingface/text-generation-inference#local-install\r\nI did all the installation on my local Linux (WSL). The model endpoint that I want to draw inference from is on my EC2. (I trained Mistral 7b model).\r\nWhen I run `text-generation-launcher --env` , I get the following:\r\n\r\n```\r\n(text-generation-inference) tammosta@SEA-1801247735:~/text-generation-inference$ text-generation-launcher --env\r\nerror: invalid value 'True' for '--disable-custom-kernels'\r\n  [possible values: true, false]\r\n\r\n  tip: a similar value exists: 'true'\r\n\r\nFor more information, try '--help'.\r\n(text-generation-inference) tammosta@SEA-1801247735:~/text-generation-inference$ export DISABLE_CUSTOM_KERNELS=true\r\n(text-generation-inference) tammosta@SEA-1801247735:~/text-generation-inference$ text-generation-launcher --env\r\n2024-01-17T19:54:02.802338Z  INFO text_generation_launcher: Runtime environment:\r\nTarget: x86_64-unknown-linux-gnu\r\nCargo version: 1.70.0\r\nCommit sha: 0eabc83541225979209ff7183b4b4442e47adf92\r\nDocker label: N/A\r\nnvidia-smi:\r\nN/A\r\n2024-01-17T19:54:02.802403Z  INFO text_generation_launcher: Args { model_id: \"bigscience/bloom-560m\", revision: None, validation_workers: 2, sharded: None, num_shard: None, quantize: None, speculate: None, dtype: None, trust_remote_code: false, max_concurrent_requests: 128, max_best_of: 2, max_stop_sequences: 4, max_top_n_tokens: 5, max_input_length: 1024, max_total_tokens: 2048, waiting_served_ratio: 1.2, max_batch_prefill_tokens: 4096, max_batch_total_tokens: None, max_waiting_tokens: 20, hostname: \"0.0.0.0\", port: 3000, shard_uds_path: \"/tmp/text-generation-server\", master_addr: \"localhost\", master_port: 29500, huggingface_hub_cache: None, weights_cache_override: None, disable_custom_kernels: true, cuda_memory_fraction: 1.0, rope_scaling: None, rope_factor: None, json_output: false, otlp_endpoint: None, cors_allow_origin: [], watermark_gamma: None, watermark_delta: None, ngrok: false, ngrok_authtoken: None, ngrok_edge: None, env: true }\r\n2024-01-17T19:54:02.802591Z  INFO download: text_generation_launcher: Starting download process.\r\n2024-01-17T19:54:09.019117Z  INFO text_generation_launcher: Download file: model.safetensors\r\n\r\n2024-01-17T19:54:51.649553Z  INFO text_generation_launcher: Downloaded /home/tammosta/.cache/huggingface/hub/models--bigscience--bloom-560m/snapshots/ac2ae5fab2ce3f9f40dc79b5ca9f637430d24971/model.safetensors in 0:00:42.\r\n\r\n2024-01-17T19:54:51.649696Z  INFO text_generation_launcher: Download: [1/1] -- ETA: 0\r\n\r\n2024-01-17T19:54:52.249742Z  INFO download: text_generation_launcher: Successfully downloaded weights.\r\n2024-01-17T19:54:52.250108Z  INFO shard-manager: text_generation_launcher: Starting shard rank=0\r\n2024-01-17T19:54:56.525795Z  WARN text_generation_launcher: We're not using custom kernels.\r\n\r\n2024-01-17T19:54:56.534344Z  WARN text_generation_launcher: Could not import Flash Attention enabled models: No module named 'vllm'\r\n\r\n2024-01-17T19:55:01.117291Z  INFO text_generation_launcher: Server started at unix:///tmp/text-generation-server-0\r\n\r\n2024-01-17T19:55:01.167200Z  INFO shard-manager: text_generation_launcher: Shard ready in 8.916023926s rank=0\r\n2024-01-17T19:55:01.265832Z  INFO text_generation_launcher: Starting Webserver\r\n2024-01-17T19:55:01.366710Z  INFO text_generation_router: router/src/main.rs:178: Using the Hugging Face API\r\n2024-01-17T19:55:01.366788Z  INFO hf_hub: /home/tammosta/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hf-hub-0.3.2/src/lib.rs:55: Token file not found \"/home/tammosta/.cache/huggingface/token\"\r\n2024-01-17T19:55:02.294337Z  INFO text_generation_router: router/src/main.rs:416: Serving revision ac2ae5fab2ce3f9f40dc79b5ca9f637430d24971 of model bigscience/bloom-560m\r\n2024-01-17T19:55:02.294415Z  INFO text_generation_router: router/src/main.rs:234: Using the Hugging Face API to retrieve tokenizer config\r\n2024-01-17T19:55:02.315279Z  INFO text_generation_router: router/src/main.rs:277: Warming up model\r\n2024-01-17T19:55:46.211550Z ERROR shard-manager: text_generation_launcher: Shard complete standard error output:\r\n\r\n/home/tammosta/anaconda3/envs/text-generation-inference/lib/python3.9/site-packages/bitsandbytes/cextension.py:34: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.\r\n  warn(\"The installed version of bitsandbytes was compiled without GPU support. \"\r\nconfig.json: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 693/693 [00:00<00:00, 189kB/s]\r\ntokenizer_config.json: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 222/222 [00:00<00:00, 106kB/s]\r\ntokenizer.json: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 14.5M/14.5M [00:00<00:00, 23.4MB/s]\r\nspecial_tokens_map.json: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 85.0/85.0 [00:00<00:00, 34.9kB/s]\r\n/home/tammosta/text-generation-inference/server/text_generation_server/models/custom_modeling/bloom_modeling.py:882: FutureWarning: `position_ids` have no functionalit",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1451",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-01-17T20:12:35Z",
    "updated_at": "2024-02-22T01:44:26Z",
    "user": "tamanna-mostafa"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6614,
    "title": "How to train text_to_image with images which is resolution of 512x768 ?",
    "body": "I want to finetune the sd1.5 with 50k images, all the image is resolution of 512x768. But I got error like this:\r\n\r\n`train_text_to_image.py:` error: argument --resolution: invalid int value: '[512,768]'`\r\n\r\nso, how to train text_to_image with images which is resolution of 512x768?",
    "url": "https://github.com/huggingface/diffusers/issues/6614",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-17T13:51:16Z",
    "updated_at": "2024-01-25T14:28:01Z",
    "user": "lingxuan630"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2347,
    "title": "How to load model to specified GPU devices?",
    "body": "I'm trying a large model LLaVA1.5.\r\n\r\nI know that if I set the parameter `device_map='auto'` in `LlavaMPTForCausalLM.from_pretrained`, the model will be loaded on all visible GPUs (FSDP).\r\n\r\nNow I hope to load LLaVA1.5 on some of the visible GPUs, still in the FSDP mode, and automatically decide device_map like `device_map='auto'`. Note that the GPUs can be **arbitrarily assigned**, i.e. GPU 2, 3, 4, but not starting with GPU 0. \r\nI try to achieve this by passing a `max_memory`, like\r\n`model = LlavaMPTForCausalLM.from_pretrained(model_path,device_map='auto', max_memory={2: 33271054336, 3: 33271054336, 4: 33271054336})`\r\n\r\nHowever, an error occured\r\n![image](https://github.com/huggingface/accelerate/assets/46648807/85a2eafc-ac94-4122-aae3-9a105d631f96)\r\n\r\nI think the loop should be modified?\r\nOr is there are any simpler ways to achieve my goal?",
    "url": "https://github.com/huggingface/accelerate/issues/2347",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-17T09:23:04Z",
    "updated_at": "2024-02-26T15:06:36Z",
    "user": "davidluciolu"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28546,
    "title": "How to use fp32 and qLora to fine-tune models",
    "body": "### System Info\n\nI'm using transformers version 4.32.0 and I want to fine-tune the Qwen/Qwen-VL-Chat-Int4 model, but my 1080ti GPU doesn't support fp16. When I want to use \"training_args.fp16 = False\" to modify the parameters, the error \"dataclasses.FrozenInstanceError: cannot assign to field fp16\" will be reported. I guess this parameter cannot be changed manually. What should I do besides changing the GPU so that it can use fp16?\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nI am using the fine-tuning code given by Qwen\uff1a\r\n```python\r\n    parser = transformers.HfArgumentParser(\r\n        (ModelArguments, DataArguments, TrainingArguments, LoraArguments)\r\n      )\r\n      (\r\n        model_args,\r\n        data_args,\r\n        training_args,\r\n        lora_args,\r\n    ) = parser.parse_args_into_dataclasses()\r\n    if getattr(training_args, 'deepspeed', None) and getattr(lora_args, 'q_lora', False):\r\n        training_args.distributed_state.distributed_type = DistributedType.DEEPSPEED\r\n    training_args.fp16 = False\r\n    compute_dtype = (\r\n        torch.float16\r\n        if training_args.fp16\r\n        else (torch.bfloat16 if training_args.bf16 else torch.float32)\r\n    )\r\n\r\n    local_rank = training_args.local_rank\r\n\r\n    device_map = None\r\n    world_size = int(os.environ.get(\"WORLD_SIZE\", 1))\r\n    ddp = world_size != 1\r\n    if lora_args.q_lora:\r\n        device_map = {\"\": int(os.environ.get(\"LOCAL_RANK\") or 0)} if ddp else None\r\n        if len(training_args.fsdp) > 0 or deepspeed.is_deepspeed_zero3_enabled():\r\n            logging.warning(\r\n                \"FSDP or ZeRO3 are not incompatible with QLoRA.\"\r\n            )\r\n\r\n    # Set RoPE scaling factor\r\n    config = transformers.AutoConfig.from_pretrained(\r\n        model_args.model_name_or_path,\r\n        cache_dir=training_args.cache_dir,\r\n        trust_remote_code=True,\r\n    )\r\n    config.use_cache = False\r\n\r\n    # Load model and tokenizer\r\n    model = transformers.AutoModelForCausalLM.from_pretrained(\r\n        model_args.model_name_or_path,\r\n        config=config,\r\n        cache_dir=training_args.cache_dir,\r\n        device_map=device_map,\r\n        trust_remote_code=True,\r\n        quantization_config=GPTQConfig(\r\n            bits=4, disable_exllama=True\r\n        )\r\n        if training_args.use_lora and lora_args.q_lora\r\n        else None,\r\n     \uff09\r\n``` \n\n### Expected behavior\n\nI want a solution",
    "url": "https://github.com/huggingface/transformers/issues/28546",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-17T07:16:11Z",
    "updated_at": "2024-02-26T08:04:39Z",
    "user": "guoyunqingyue"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 117602,
    "title": "If I use torch.compile to compile the whole graph\uff0cin the my own compiler, how to manage the memory in my own compiler? ",
    "body": "### \ud83d\udc1b Describe the bug\n\nif I use torch.compile to compile the whole graph\uff0cin the my own compiler \uff0cin forward stage\uff0c\r\n1.if I enable memory reuse in the forward pass\uff0chow the backwards get the activation to calcute the gradient\uff1fhas there some example in pytorch\uff1f\r\n2.if i disable memory reuse\uff0cif i enable some op fusion\uff0cA op+B op fuison to one op, so the A output value is in sram or local memory or gloabal memory , torch can\u2019t get the activation, in backwards how to calcute the gradient?has there some example in pytorch\uff1f\r\n3.how to manage the memory in my own compiler to use torch.compile to speed up the training?\r\n4.how the backwards (autogradient) get the activation from my own compiler ? the memory of every op in the graph must be in ddr?\n\n### Error logs\n\nnone\n\n### Minified repro\n\nNone\n\n### Versions\n\nNone\n\ncc @ezyang @msaroufim @wconstab @bdhirsh @anijain2305 @zou3519 @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler",
    "url": "https://github.com/pytorch/pytorch/issues/117602",
    "state": "closed",
    "labels": [
      "oncall: pt2"
    ],
    "created_at": "2024-01-17T02:23:18Z",
    "updated_at": "2024-01-19T17:55:06Z",
    "user": "mollon650"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2416,
    "title": "How to specify class weights in model training?",
    "body": "I am having a very imbalanced training dataset. Is there a way I could specify class weights (e.g., class 0: 0.1, class 1: 1) for cross encoder training? ",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2416",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-16T21:00:27Z",
    "updated_at": "2024-01-20T15:49:54Z",
    "user": "mucun1988"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 697,
    "title": "Add streaming support for SageMaker endpoints",
    "body": "Would be nice to have support for streaming tokens from sagemaker. here are some ressources from my conversation with @philschmid \r\n\r\n### Code sample (Python Code)\r\n```\r\nbody = {\"inputs\": \"what is life\", \"parameters\": {\"max_new_tokens\":400}}\r\nresp = smr.invoke_endpoint_with_response_stream(EndpointName=endpoint_name, Body=json.dumps(body), ContentType=\"application/json\")\r\nevent_stream = resp['Body']\r\n\r\nfor line in LineIterator(event_stream):\r\n    resp = json.loads(line)\r\n    print(resp.get(\"outputs\")[0], end='')\r\n```\r\n\r\n### Docs (JS)\r\nhttps://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sagemaker-runtime/command/InvokeEndpointWithResponseStreamCommand/",
    "url": "https://github.com/huggingface/chat-ui/issues/697",
    "state": "open",
    "labels": [
      "enhancement",
      "back"
    ],
    "created_at": "2024-01-16T10:59:47Z",
    "updated_at": "2024-01-16T11:00:32Z",
    "comments": 0,
    "user": "nsarrazin"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 522,
    "title": "Is it possible to fine-tune the hosted pretrained models?",
    "body": "### Question\r\nHello,\r\nIf we have a large dataset in our domain, can we use it to fine-tune the hosted pretrained models(for example: Xenova/nllb-200-distilled-600M) with optimum? or is it possible to convert our own translation Pytorch model to ONNX which can be compatible with transformer.js?",
    "url": "https://github.com/huggingface/transformers.js/issues/522",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-16T03:55:39Z",
    "updated_at": "2024-01-16T12:54:53Z",
    "user": "lhohoz"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6594,
    "title": "IterableDataset sharding logic needs improvement",
    "body": "### Describe the bug\r\n\r\nThe sharding of IterableDatasets with respect to distributed and dataloader worker processes appears problematic with significant performance traps and inconsistencies wrt to distributed train processes vs worker processes.\r\n\r\nSplitting across num_workers (per train process loader processes) and world_size (distributed training processes) appears inconsistent.\r\n* worker split: https://github.com/huggingface/datasets/blob/9d6d16117a30ba345b0236407975f701c5b288d4/src/datasets/iterable_dataset.py#L1266-L1283\r\n* distributed split: https://github.com/huggingface/datasets/blob/9d6d16117a30ba345b0236407975f701c5b288d4/src/datasets/iterable_dataset.py#L1335-L1356\r\n\r\nIn the case of the distributed split, there is a modulus check that flips between two very different behaviours, why is this different than splitting across the data loader workers? For IterableDatasets the DataLoaders worker processes are independent, so whether it's workers within one train process or across a distributed world the shards should be distributed the same, across `world_size * num_worker` independent workers in either case... \r\n\r\nFurther, the fallback case when the `n_shards % world_size == 0` check fails is a rather extreme change. I argue it is not desirable to do that implicitly, it should be an explicit case for specific scenarios (ie reliable validation). A train scenario would likely be much better handled with improved wrapping / stopping behaviour to eg also fix #6437. Changing from stepping shards to stepping samples means that every single process reads ALL of the shards. This was never an intended default for sharded training, shards gain their performance advantage in large scale distributed training by explicitly avoiding the need to have every process overlapping in the data they read, by default, only the data allocated to each process via their assigned shards should be read in each pass of the dataset.\r\n\r\nUsing a large scale CLIP example, some of the larger datasets have 10-20k shards across 100+TB of data. Training with 1000 GPUs we are switching between reading 100 terabytes per epoch to 100 petabytes if say change 20k % 1000 and drop one gpu-node to 20k % 992.\r\n\r\nThe 'step over samples' case might be worth the overhead in specific validation scenarios where gaurantees of at least/most once samples seen are more important and do not make up a significant portion of train time or are done in smaller world sizes outside of train.\r\n\r\n### Steps to reproduce the bug\r\n\r\nN/A\r\n\r\n### Expected behavior\r\n\r\nWe have an iterable dataset with N shards, to split across workers\r\n* shuffle shards (same seed across all train processes)\r\n* step shard iterator across distributed processes\r\n* step shard iterator across dataloader worker processes\r\n* shuffle samples in every worker via shuffle buffer (different seed in each worker, but ideally controllable (based on base seed + worker id + epoch).\r\n* end up with (possibly uneven) number of shards per worker but each shard only ever accessed by 1 worker per pass (epoch)\r\n\r\n\r\n\r\n### Environment info\r\n\r\nN/A",
    "url": "https://github.com/huggingface/datasets/issues/6594",
    "state": "open",
    "labels": [],
    "created_at": "2024-01-15T22:22:36Z",
    "updated_at": "2025-11-10T14:55:20Z",
    "comments": 7,
    "user": "rwightman"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 117490,
    "title": "What is the next plan of FP8 support in PyTorch?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nNow PyTorch only supports FP8 data type conversion without scaling. The accuracy is not that good.\r\n\r\nWhat is the plan of FP8 support in PyTorch? Will FP8 DelayedScaling from TransformerEngine be taken into account? Thanks!\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @svekars @brycebortree @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel @albanD @kadeng",
    "url": "https://github.com/pytorch/pytorch/issues/117490",
    "state": "closed",
    "labels": [
      "module: docs",
      "oncall: quantization",
      "triaged",
      "actionable",
      "module: floatx (formerly float8)"
    ],
    "created_at": "2024-01-15T10:02:37Z",
    "updated_at": "2024-01-26T01:48:45Z",
    "user": "yanbing-j"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 103,
    "title": "Does QLora  DPO Training support reference model?",
    "body": "Hello! Thanks for your awesome work!\r\n I meet an issue when I run dpo with qlora. I notice there is a setting:\r\n```\r\n if model_args.use_peft is True:\r\n        ref_model = None\r\n        ref_model_kwargs = None\r\n```\r\nI also notice that the `use_peft` is set to true only in config_qlora.yaml. This means if we use qlora to do dpo training, we do not use reference model at all.  \r\nI wonder if this code support qlora training with reference model?  Thanks!",
    "url": "https://github.com/huggingface/alignment-handbook/issues/103",
    "state": "open",
    "labels": [],
    "created_at": "2024-01-15T09:22:32Z",
    "updated_at": "2024-01-15T09:27:08Z",
    "comments": 0,
    "user": "Harry-mic"
  },
  {
    "repo": "huggingface/swift-coreml-diffusers",
    "number": 91,
    "title": "How to import new .SAFETENSORS model?",
    "body": "How can I import a safetensor formatted model into the diffusers app?\r\n\r\nI tried copying the safetensor file to the folder loaded by the dropdown menu. But when I relaunch the app, it doesn't show the new model in the menu.",
    "url": "https://github.com/huggingface/swift-coreml-diffusers/issues/91",
    "state": "open",
    "labels": [],
    "created_at": "2024-01-15T08:24:53Z",
    "updated_at": "2024-07-07T09:03:27Z",
    "user": "mcandre"
  },
  {
    "repo": "huggingface/candle",
    "number": 1585,
    "title": "Extension request: How to construct Tensor for n-dimensional Vec",
    "body": "How do I best create a Tensor from a &Vec<Vec<u8>> type? Everything above 1D is quite hard to manage for index based value setting. ",
    "url": "https://github.com/huggingface/candle/issues/1585",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-14T17:46:57Z",
    "updated_at": "2025-11-23T20:22:09Z",
    "user": "BDUG"
  },
  {
    "repo": "huggingface/nanotron",
    "number": 21,
    "title": "Save checkpoint before terminating the training run",
    "body": "Why don't we save a model checkpoint before terminating the training run? [[link]](https://github.com/huggingface/nanotron/blob/fd99571e3769cb1876d5c9d698b512e85a6e4896/src/nanotron/trainer.py#L429)\r\n\r\n<img width=\"769\" alt=\"image\" src=\"https://github.com/huggingface/nanotron/assets/22252984/9eb78431-4df9-4795-8ac7-6947f71f6bae\">\r\n",
    "url": "https://github.com/huggingface/nanotron/issues/21",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-13T11:28:20Z",
    "updated_at": "2024-01-13T11:28:54Z",
    "user": "xrsrke"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2331,
    "title": "How to share non-tensor data between processes?",
    "body": "I am running a training on 2 GPUs on the same machine. I need a way to share some float values and maybe dicts between the two processes. I saw that there is a `gather` method, but this only works for tensors.\r\n\r\nIs there any way to do inter-process communication that is not directly related to the training?\r\n\r\nEDIT: What I want to do is log the AVERAGE training error of my model after each epoch. The problem is that the process I am logging from only sees the training error that was computed in this process",
    "url": "https://github.com/huggingface/accelerate/issues/2331",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-12T19:13:27Z",
    "updated_at": "2024-01-16T11:36:34Z",
    "user": "simonhessner"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28476,
    "title": "How to avoid the peak RAM memory usage of a model when I want to load to GPU",
    "body": "### System Info\n\n- `transformers` version: 4.36.2\r\n- Platform: Linux-5.10.201-191.748.amzn2.x86_64-x86_64-with-glibc2.31\r\n- Python version: 3.10.13\r\n- Huggingface_hub version: 0.20.2\r\n- Safetensors version: 0.4.1\r\n- Accelerate version: 0.26.0\r\n- Accelerate config: \tnot found\r\n- PyTorch version (GPU?): 2.1.0 (True)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\r\n\n\n### Who can help?\n\nI am using transformers to load a model into GPU, and I observed that before moving the model to GPU there is a peak of RAM usage that later gets unused. I assume the model is loaded into CPU before moving into GPU.\r\n\r\nIn GPU model takes around 4Gi and to load it I need more than 7Gi of RAM which seems weird.\r\n\r\nIs there a way to load it direcly to the GPU without spending so much RAM?\r\n\r\nI have tried with the `low_cpu_mem_usage` and `device_map` parameter to `cuda` and `auto` but no luck.\r\n\r\n```python\r\nfrom transformers import AutoModel; m = AutoModel.from_pretrained(\"jinaai/jina-embeddings-v2-base-en\", trust_remote_code=True, low_cpu_mem_usage=True, device_map=\"auto\")\r\n``` \n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\n```python\r\nfrom transformers import AutoModel; m = AutoModel.from_pretrained(\"jinaai/jina-embeddings-v2-base-en\", trust_remote_code=True, low_cpu_mem_usage=True, device_map=\"auto\")\r\n```\n\n### Expected behavior\n\nNot having such a memory peak",
    "url": "https://github.com/huggingface/transformers/issues/28476",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-12T11:39:52Z",
    "updated_at": "2024-02-12T08:08:17Z",
    "user": "JoanFM"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6584,
    "title": "np.fromfile not supported",
    "body": "How to do np.fromfile  to use it like np.load\r\n\r\n\r\n```python\r\ndef xnumpy_fromfile(filepath_or_buffer, *args, download_config: Optional[DownloadConfig] = None, **kwargs):\r\n    import numpy as np\r\n\r\n    if hasattr(filepath_or_buffer, \"read\"):\r\n        return np.fromfile(filepath_or_buffer, *args, **kwargs)\r\n    else:\r\n        filepath_or_buffer = str(filepath_or_buffer)\r\n        return np.fromfile(xopen(filepath_or_buffer, \"rb\", download_config=download_config).read(), *args, **kwargs)\r\n```\r\nthis is not work\r\n",
    "url": "https://github.com/huggingface/datasets/issues/6584",
    "state": "open",
    "labels": [],
    "created_at": "2024-01-12T09:46:17Z",
    "updated_at": "2024-01-15T05:20:50Z",
    "comments": 6,
    "user": "d710055071"
  },
  {
    "repo": "pytorch/audio",
    "number": 3725,
    "title": "Resampling at arbitrary time steps",
    "body": "### \ud83d\ude80 The feature\n\nCurrently, `torchaudio.functional.resample` can only resample at regular time points and the period is determined by `orig_freq` and `new_freq`.\r\n\r\nIs it possible to resample at arbitrary time steps?\r\nSo rather than specifying a resampling ratio, we specify a array of time steps.\n\n### Motivation, pitch\n\nI would like to be able to model jitter in an ADC which can be modelled by a slightly varying sample rate. If you integrate a sample rate curve (which isn't constant), you get irregular time steps. A function such as the one suggested above would allow me to resample using these time steps and model a jittery ADC.\n\n### Alternatives\n\nI've rolled out my own function but it's not super efficient. Some experts might do a better job.\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/audio/issues/3725",
    "state": "open",
    "labels": [],
    "created_at": "2024-01-12T09:20:10Z",
    "updated_at": "2024-01-16T18:52:40Z",
    "comments": 5,
    "user": "pfeatherstone"
  },
  {
    "repo": "huggingface/distil-whisper",
    "number": 73,
    "title": "I want to confirm how the knowledge organization is implemented\uff1f",
    "body": "I don't quite understand how knowledge distillation is implemented here. \r\n\r\nWhisper is trained on 680,000 hours of untagged data for autoregression. According to the content of the fourth section of the paper, our model is trained on 21,170 hours of data with pseudo-labels generated by Whisper, with the first and 32nd layer parameters frozen based on Whisper. **This means that our model only needs to go through 21,170 hours of data with pseudo-labels and a model structure similar to Whisper, freezing the first and 32nd layers, using weighted KL divergence and label cross-entropy to achieve good results\uff1f**\r\n\r\nIf this is the case, it is indeed a significant discovery, indicating that we can always reduce the model's parameters and inference time after pre-training the model using similar methods, without significant loss of accuracy.\r\n\r\nThank you in advance",
    "url": "https://github.com/huggingface/distil-whisper/issues/73",
    "state": "open",
    "labels": [],
    "created_at": "2024-01-12T07:43:21Z",
    "updated_at": "2024-01-17T16:57:31Z",
    "user": "hxypqr"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 516,
    "title": "How to access attentions matrix for MarianMT?",
    "body": "### Question\r\n\r\nHey, I've been trying to access the attentions output by the MarianMT like so (please excuse the unorthodox config argument, tidying up is next on my todo list):\r\n\r\n```\r\n  const model_name = \"Xenova/opus-mt-en-fr\";\r\n  const tokenizer = await MarianTokenizer.from_pretrained(model_name, {\r\n    config: {\r\n      output_hidden_states: true,\r\n      output_attentions: true\r\n    }\r\n  })\r\n  const tokens = (await tokenizer(text)).input_ids;\r\n  const model = await MarianMTModel.from_pretrained(model_name, {\r\n    config: {\r\n      model_type: 'marian',\r\n      is_encoder_decoder: true,\r\n      _name_or_path: 'Helsinki-NLP/opus-mt-en-fr',\r\n      _num_labels: 3,\r\n      activation_dropout: 0,\r\n      activation_function: 'swish',\r\n      add_bias_logits: false,\r\n      add_final_layer_norm: false,\r\n      architectures: ['MarianMTModel'],\r\n      attention_dropout: 0,\r\n      bad_words_ids: [[Array]],\r\n      bos_token_id: 0,\r\n      classif_dropout: 0,\r\n      classifier_dropout: 0,\r\n      d_model: 512,\r\n      decoder_attention_heads: 8,\r\n      decoder_ffn_dim: 2048,\r\n      decoder_layerdrop: 0,\r\n      decoder_layers: 6,\r\n      decoder_start_token_id: 59513,\r\n      decoder_vocab_size: 59514,\r\n      dropout: 0.1,\r\n      encoder_attention_heads: 8,\r\n      encoder_ffn_dim: 2048,\r\n      encoder_layerdrop: 0,\r\n      encoder_layers: 6,\r\n      eos_token_id: 0,\r\n      forced_eos_token_id: 0,\r\n      gradient_checkpointing: false,\r\n      id2label: { '0': 'LABEL_0', '1': 'LABEL_1', '2': 'LABEL_2' },\r\n      init_std: 0.02,\r\n      label2id: { LABEL_0: 0, LABEL_1: 1, LABEL_2: 2 },\r\n      max_length: 512,\r\n      max_position_embeddings: 512,\r\n      normalize_before: false,\r\n      normalize_embedding: false,\r\n      num_beams: 4,\r\n      num_hidden_layers: 6,\r\n      pad_token_id: 59513,\r\n      scale_embedding: true,\r\n      share_encoder_decoder_embeddings: true,\r\n      static_position_embeddings: true,\r\n      transformers_version: '4.34.0.dev0',\r\n      use_cache: true,\r\n      vocab_size: 59514,\r\n      output_hidden_states: true,\r\n      output_cross_attentions: true,\r\n      output_attentions: true\r\n    }\r\n  })\r\n  const translated = await model.generate(tokens)\r\n  const result = tokenizer.decode(translated[0], { skip_special_tokens: true })\r\n  console.log((await model.getAttentions(translated)))\r\n\r\n```\r\n\r\nI'm then getting the following error when I run the code:\r\n\r\n`\r\nError: `output_attentions` is true, but the model did not produce cross-attentions. This is most likely because the model was not exported with `output_attentions=True`.\r\n`\r\n\r\nI've looked around but haven't been able to find out what is meant by the reference to exporting the model. How would I go about fixing this?",
    "url": "https://github.com/huggingface/transformers.js/issues/516",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-11T20:16:42Z",
    "updated_at": "2024-01-15T08:21:17Z",
    "user": "DaveTJones"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1437,
    "title": "How to run text-generation-benchmark without the graph and get the output data into a csv file or a json file?",
    "body": "### Feature request\n\ntext-generation-benchmark has been an amazing tool for understanding the model deployments better. Is there a way where we can run this without generating the graph and get the results in a csv format?\n\n### Motivation\n\nMotivation is that we want to use this tool with another program which gets the results from the binary. \n\n### Your contribution\n\nI'm not sure. Looks like an addition to the TGI-benchmark parameter and it can be a potential PR",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1437",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2024-01-11T15:33:37Z",
    "updated_at": "2024-02-17T01:44:18Z",
    "user": "pranavthombare"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 515,
    "title": "ONNX optimisations for edge deployment",
    "body": "### Question\r\n\r\nHello, I'm exploring if I can extract any more performance from my deployment of transformers.js. Appreciate the answer to this is nuanced and best answered by profiling, but would value opinions of experts that have walked this path before using this lib.\r\n\r\nIn my specific use case I know that I will always be deploying to the latest chrome running on windows systems that exist in VM and do not have a dedicated GPU (i.e. vanilla corprate desktop)\r\n\r\nIn the current util, during the export no optimization flag is passed so by default the models aren't optimized. https://github.com/xenova/transformers.js/blob/main/scripts/convert.py#L426 \r\n\r\nThe main export takes a AutoOptimization level as a string and given no GPU's I would be restricted to 03.\r\nhttps://github.com/huggingface/optimum/blob/main/optimum/exporters/onnx/__main__.py#L567\r\n\r\n##Questions:\r\n\r\n1. Is there any reasons I wouldn't want to optimize a model using transformers.js?\r\n2. Auto optimize seems to detect BERT automatically.\r\nhttps://github.com/microsoft/onnxruntime/blob/main/onnxruntime/python/tools/transformers/fusion_options.py#L56 \r\nIs there any reason that I should modify transformers.js convert.py to to manually call ORTOptimizer  with a OptimizationConfig inbetween steps 1&2 instead of passing a level string in step 1?\r\nhttps://github.com/xenova/transformers.js/blob/main/scripts/convert.py#L429\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/515",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-11T13:49:59Z",
    "updated_at": "2025-10-13T04:59:32Z",
    "user": "georgedavies019"
  },
  {
    "repo": "pytorch/serve",
    "number": 2894,
    "title": "How can I implement batch inference in my model?",
    "body": "### \ud83d\udcda The doc issue\r\n\r\nI read the docs, and I see this sentence:\r\n\r\n> The frontend then tries to aggregate the batch-size number of requests and send it to the backend.\r\n\r\nHow does it work?\r\n\r\nIn my case, my batch_size is 4 and max_batch_delay is 5000. I sent 2 request simultaneously to torchserve, but in my handler log, which showed torchserve ran 2 preprocess, inference and postprocess. This situation is not as expected?  How I can achieve batch inference in my model? \r\n\r\nMy model have 3 input tensors, shapes are [12568, 20, 4], [12568], [12568, 4]. When batch size is 2, shapes are [12568 x 2, 20, 4], [12568 x 2], [12568 x 2, 4]. \r\n\r\n### Suggest a potential alternative/fix\r\n\r\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2894",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-11T10:39:58Z",
    "updated_at": "2024-01-12T05:28:13Z",
    "comments": 5,
    "user": "steelONIONknight"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 98,
    "title": "Is QLoRA better than finetuning?",
    "body": "The results reported in https://github.com/huggingface/alignment-handbook/pull/88 suggest that QLoRA is better for both SFT and DPO. Is this accurate, and have people seen this happen in any other settings?",
    "url": "https://github.com/huggingface/alignment-handbook/issues/98",
    "state": "open",
    "labels": [],
    "created_at": "2024-01-10T21:04:11Z",
    "updated_at": "2024-01-10T21:04:11Z",
    "comments": 0,
    "user": "normster"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 514,
    "title": "Is it possible to use adapters from the hub?",
    "body": "### Question\n\nHi, would it be possible to use adapters on top of a model using the js library?",
    "url": "https://github.com/huggingface/transformers.js/issues/514",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-10T20:57:03Z",
    "updated_at": "2024-01-11T16:01:11Z",
    "user": "vabatta"
  },
  {
    "repo": "huggingface/setfit",
    "number": 468,
    "title": "How effective is to use your own pre-trained ST model based on NLI dataset ?",
    "body": "Hi !\r\n\r\nI'm interested to use SetFit for classify text extracted from hotel reviews (booking, tripadvisor, etc) but I would to add domain knowledge to my Sentence Transfomers body.\r\n\r\nFor example, this [paper](https://arxiv.org/abs/2202.01924) use a Sentence Transformers model trained on a custom NLI dataset (RNLI for Review Natural Langage Inference) for extract product features without training on labeled data. The results show that a train on domain based NLI dataset is better that the MNLI for Zero-Shot aspect extraction.\r\n\r\nSo, is it a good approach to train my own Sentence Transformers model (or fine-tune a pre-trained) on NLI domain based dataset for improve performance of SetFit ?\r\n\r\nThank you in advance ",
    "url": "https://github.com/huggingface/setfit/issues/468",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-10T19:25:09Z",
    "updated_at": "2024-02-09T14:55:46Z",
    "user": "azaismarc"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 512,
    "title": "What do you all think about having a \"Transformers.js Community\" in Hugging Face?",
    "body": "### Question\n\nAfter checking how [MLX Community on Hugging Face](https://huggingface.co/mlx-community) is working, I thought it could be a good idea to have one for Transformers.js.\r\n\r\nOne of the key benefits of a community is \"multiple curators\": anyone in the community would have the ability to edit the repositories, which makes it easier to maintain the converted models and ensure that they have more detailed Readmes.\r\n\r\nAlso, having multiple curators allows for quicker resolution of issues with the model configuration. Members of the community won't need to create a pull request to request changes or wait for someone to approve the PR, which is especially important for urgent fixes.\r\n\r\nAnother good move the MLX community made was releasing a script that automatically uploads models to the organization in Hugging Face, which makes it easy for anyone to convert and share their favorite models.\r\n\r\nI would love to hear the opinions of others.",
    "url": "https://github.com/huggingface/transformers.js/issues/512",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-10T16:03:51Z",
    "updated_at": "2025-05-10T21:06:54Z",
    "user": "felladrin"
  },
  {
    "repo": "huggingface/candle",
    "number": 1552,
    "title": "How to pass the attention_mask to Bert model in examples?",
    "body": "I am trying to run `shibing624/text2vec-base-chinese` with candle, and the encoder returns `input_ids`, `attention_mask`, `token_id_types`, but there are only two params of BertModel in candle.\r\n\r\nhttps://github.com/huggingface/candle/blob/main/candle-examples/examples/bert/main.rs#L170\r\n\r\n```python\r\nfrom transformers import BertTokenizer, BertModel\r\nimport torch\r\n\r\n# Mean Pooling - Take attention mask into account for correct averaging\r\ndef mean_pooling(model_output, attention_mask):\r\n    token_embeddings = model_output[0]  # First element of model_output contains all token embeddings\r\n    input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()\r\n    return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)\r\n\r\n# Load model from HuggingFace Hub\r\ntokenizer = BertTokenizer.from_pretrained('shibing624/text2vec-base-chinese')\r\nmodel = BertModel.from_pretrained('shibing624/text2vec-base-chinese')\r\nsentences = ['\u5982\u4f55\u66f4\u6362\u82b1\u5457\u7ed1\u5b9a\u94f6\u884c\u5361', '\u82b1\u5457\u66f4\u6539\u7ed1\u5b9a\u94f6\u884c\u5361']\r\n# Tokenize sentences\r\nencoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')\r\n\r\n# Compute token embeddings\r\nwith torch.no_grad():\r\n    model_output = model(**encoded_input)\r\n# Perform pooling. In this case, mean pooling.\r\nsentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])\r\nprint(\"Sentence embeddings:\")\r\nprint(sentence_embeddings)\r\n```",
    "url": "https://github.com/huggingface/candle/issues/1552",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-10T11:57:55Z",
    "updated_at": "2024-01-10T12:38:54Z",
    "user": "lz1998"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2400,
    "title": "New release of library?",
    "body": "I was wondering when you will be releasing a new version of the library that includes the latest changes in the main branch? We are eagerly awaiting one inorder to consume the fix for this issue https://github.com/UKPLab/sentence-transformers/issues/1800",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2400",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-09T20:42:53Z",
    "updated_at": "2024-01-29T10:00:33Z",
    "user": "vineetsajuTR"
  },
  {
    "repo": "pytorch/serve",
    "number": 2892,
    "title": "Setting log level of handler",
    "body": "### \ud83d\udcda The doc issue\n\nI need to set the logging level of handler to debug, i wanna see all the logs (of torch also). The docs dont mention much other than setting the log level for torch serve itself (log4j ones).  \r\nI tried setting the config inside the handler, but it didnt work\r\n\r\n```python\r\nlogging.basicConfig(level=logging.DEBUG)\r\n```\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2892",
    "state": "closed",
    "labels": [
      "question",
      "triaged"
    ],
    "created_at": "2024-01-09T18:04:49Z",
    "updated_at": "2024-06-07T21:39:33Z",
    "user": "hariom-qure"
  },
  {
    "repo": "huggingface/peft",
    "number": 1334,
    "title": "when we use inject_adapter_in_model method to inject the adapters directly into a PyTorch model, how to merge the Lora weight with the base model in the inference stage?",
    "body": "",
    "url": "https://github.com/huggingface/peft/issues/1334",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-09T12:30:52Z",
    "updated_at": "2024-02-17T15:03:59Z",
    "user": "mikiyukio"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6570,
    "title": "No online docs for 2.16 release",
    "body": "We do not have the online docs for the latest minor release 2.16 (2.16.0 nor 2.16.1).\r\n\r\nIn the online docs, the latest version appearing is 2.15.0: https://huggingface.co/docs/datasets/index\r\n\r\n![Screenshot from 2024-01-09 08-43-08](https://github.com/huggingface/datasets/assets/8515462/83613222-867f-41f4-8833-7a4a76582f44)\r\n",
    "url": "https://github.com/huggingface/datasets/issues/6570",
    "state": "closed",
    "labels": [
      "bug",
      "documentation"
    ],
    "created_at": "2024-01-09T07:43:30Z",
    "updated_at": "2024-01-09T16:45:50Z",
    "comments": 7,
    "user": "albertvillanova"
  },
  {
    "repo": "pytorch/xla",
    "number": 6274,
    "title": "Inconsistent behaviour with `xm.xrt_world_size()` and/or `xm.get_xla_supported_devices()`",
    "body": "## \ud83d\udc1b Bug\r\n\r\nI noticed that when I execute some code (see further below) on a TPU VM v3-8 (inside a Python venv 3.10.12  + torch 2.1.2+cu121 + torch_xla 2.1.0) uncommenting each time either the `xm.xrt_world_size()` part (**Output 1**) or `xm.get_xla_supported_devices()` (**Output 2**) or none of them - both commented - (**Output 3**) I get different outputs, warnings and sometimes errors.\r\n\r\n**P.S.: I've been trying for a few days to workout how to perform a single multicore processing on one TPU v3-8 device with the ultimate goal to perform distributed training across 5 TPU v3-8 devices but unfortunately I'm still stuck in the most basic operations and struggling to understand how things work in practice. Any help is really appreciated.**\r\n\r\n## To Reproduce\r\n\r\n1. Created 5 TPU VMs as queued resources using the following script (i=1,2,3,4,5):\r\n\r\n```\r\ngcloud alpha compute tpus queued-resources create queued-resource-v3-8-$i \\\r\n    --node-id=my-tpu-vm-v3-8-$i \\\r\n    --project=my-tpu-project \\\r\n    --zone=europe-west4-a \\\r\n    --accelerator-type=v3-8 \\\r\n    --runtime-version=tpu-ubuntu2204-base \\\r\n    --service-account=my-service account\r\n```\r\n\r\n2. Then, once I got access to them I checked their status and once ready I access each one using e.g. (VM1):\r\n`gcloud compute tpus tpu-vm ssh my-tpu-vm-v3-8-1 --zone=europe-west4-a`\r\n\r\n3. I connected to each Cloud TPU VM and run the following startup script (some env variables are the same for all VMs such as `MASTER_ADDR`, `MASTER_PORT` while others are specific to each VM such as `TPU_IP_ADDRESS` and `RANK`):\r\n\r\n```\r\n#!/bin/bash\r\n\r\n# Check if both TPU IP and TPU NAME arguments are provided\r\nif [ \"$#\" -ne 3 ]; then\r\n    echo \"Usage: setup_tpu.sh <TPU-IP-ADDRESS> <TPU-NAME> <ENV_PATH>\"\r\n    exit 1\r\nfi\r\n\r\n# Read TPU IP address, TPU NAME from the arguments and path to the virtual environment\r\nTPU_IP=$1\r\nTPU_NAME=$2\r\nENV_PATH=$3\r\n\r\n# Install python3-venv for creating virtual environments\r\nsudo apt-get update\r\nsudo apt-get install -y python3.10-venv\r\n\r\n\r\n# Check if the virtual environment already exists\r\nif [ -d \"$ENV_PATH\" ]; then\r\n    echo \"Virtual environment '$ENV_PATH' already exists. Deleting it.\"\r\n    sudo rm -rf $ENV_PATH\r\nfi\r\n\r\necho \"Creating a new virtual environment '$ENV_PATH'.\"\r\n\r\n# Create a Python virtual environment\r\npython3 -m venv $ENV_PATH\r\nsource $ENV_PATH/bin/activate\r\n\r\n# Upgrade pip\r\npip install --upgrade pip\r\n\r\n# Install PyTorch and Torch XLA\r\n**pip install torch~=2.1.0 torch_xla[tpu]~=2.1.0 torchvision -f https://storage.googleapis.com/libtpu-releases/index.html**\r\n\r\n# Install other dependencies\r\npip install numpy pandas notebook tensorboard tqdm altair datasets tokenizers torchmetrics jupyter ipywidgets google-cloud-storage\r\n\r\n# The script clones the PyTorch/XLA repository. We clone the branch r2.1. If you need a different version, adjust the branch name accordingly.\r\n**git clone -b r2.1 https://github.com/pytorch/xla.git**\r\n\r\n# empty .bash_profile Before Adding New Variables\r\n> ~/.bash_profile\r\n\r\n# Set TPU and GCS related environment variables\r\n**echo \"export PJRT_DEVICE=TPU\" >> ~/.bash_profile**\r\necho \"export TPU_NAME=$TPU_NAME\" >> ~/.bash_profile\r\necho \"export TPU_IP_ADDRESS=$TPU_IP\" >> ~/.bash_profile\r\necho \"export XRT_TPU_CONFIG='tpu_worker;0;$TPU_IP:8470'\" >> ~/.bash_profile\r\necho \"export BUCKET_NAME='my-bucket'\" >> ~/.bash_profile\r\necho \"export GCS_MOUNTED_BUCKET=\\\"/mnt/buckets/$BUCKET_NAME\\\"\" >> ~/.bash_profile\r\necho \"export HF_DATASETS_CACHE=\\\"\\$GCS_MOUNTED_BUCKET/huggingface_datasets_cache\\\"\" >> ~/.bash_profile\r\nGCSFUSE_REPO=$(lsb_release -c -s)\r\necho \"export GCSFUSE_REPO='gcsfuse-$GCSFUSE_REPO'\" >> ~/.bash_profile\r\n# Environment variables for distributed training\r\necho \"export MASTER_ADDR='10.164.0.4'\" >> ~/.bash_profile # Replace with the IP address of the master VM (in our case it is VM1) \r\necho \"export MASTER_PORT=9230\" >> ~/.bash_profile # Replace with your chosen port (see GC Console > VPC network > Firewall > Protocols/ports)\r\necho \"export WORLD_SIZE=40\" >> ~/.bash_profile # Total number of TPU cores across all VMs\r\necho \"export RANK=0\" >> ~/.bash_profile # Unique rank for this VM (0, 1, 2, ..., num_vms - 1)\r\necho \"export LOCAL_RANK=0\" >> ~/.bash_profile # Local rank (0 for a single TPU VM)\r\necho \"export XLA_IR_DEBUG=1\" # enables verbose logging in PyTorch XLA to get more detailed logs, which might help in diagnosing any issues\r\n\r\n# Apply the environment variables\r\nsource ~/.bash_profile\r\n\r\necho \"TPU VM setup is complete.\"\r\n\r\n```\r\n\r\n4. I run the most basic test on each VM to make sure everything works as it should ([see here](https://cloud.google.com/tpu/docs/run-calculation-pytorch#perform_a_simple_calculation)):\r\n\r\n```\r\nimport torch\r\nimport torch_xla.core.xla_model as xm\r\n\r\ndev = xm.xla_device()\r\nt1 = torch.randn(3,3,device=dev)\r\nt2 = torch.randn(3,3,device=dev)\r\nprint(t1 + t2)\r\n```\r\n\r\n**Note: the above code works as expected.**\r\n\r\n5. I also went through the [Troubleshooting](https://github.com/pytorch/xla/blob/master/TROUBLESHOO",
    "url": "https://github.com/pytorch/xla/issues/6274",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2024-01-09T05:45:42Z",
    "updated_at": "2025-04-23T14:42:27Z",
    "user": "h-sellak"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1415,
    "title": "How to use local Medusa head?",
    "body": "It is said that Medusa can significantly accelerate inference speed. During my attempts to utilize it, I have observed that it does not support the use of local Medusa config and head. The code fragment I discovered that pertains to this functionality is as follows, which I have modified. However, I do not comprehend the meaning of 'medusa_sf'. The training process of Medusa does not generate new safetensors. What is this? \r\n```python\r\nmedusa_config = f\"{model_id}/config_medusa.json\"\r\n# medusa_config = hf_hub_download(\r\n#     use_medusa, revision=revision, filename=\"config.json\"\r\n# )\r\nwith open(medusa_config, \"r\") as f:\r\n    config = json.load(f)\r\nmedusa_head = f\"{model_id}/medusa_lm_head.pt\"\r\n# medusa_head = hf_hub_download(\r\n#     use_medusa, revision=revision, filename=\"medusa_lm_head.pt\"\r\n# )\r\nmedusa_sf = medusa_head[: -len(\".pt\")] + \".safetensors\"\r\nweights = Weights(\r\n    [medusa_sf], device, dtype, process_group=self.process_group\r\n)\r\nlm_head = model.lm_head\r\nmodel.lm_head = MedusaModel(config, weights, lm_head)\r\n```\r\n\r\nHow should I employ TGI to access the local Medusa? A huge thank for your work!",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1415",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-09T03:22:47Z",
    "updated_at": "2024-01-10T17:36:23Z",
    "user": "eurus-ch"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28388,
    "title": "How to use an efficient encoder as shared EncoderDecoderModel?",
    "body": "### Feature request\n\nEfficient encoder like destilBERT, ALBERT or ELECTRA aren't supported as decoder of the EncoderDecoderModel and so they can't be shared as encoder and decoder.\n\n### Motivation\n\nWarm-starting shared models is a powerful way to build transformer models. Yet the efficient models can't be used.\n\n### Your contribution\n\nWe could implement the support for destilBERT, ALBERT or ELECTRA. They shouldn't be that different from other encoders.",
    "url": "https://github.com/huggingface/transformers/issues/28388",
    "state": "open",
    "labels": [
      "Feature request"
    ],
    "created_at": "2024-01-08T11:43:05Z",
    "updated_at": "2024-01-08T12:35:24Z",
    "user": "Bachstelze"
  },
  {
    "repo": "pytorch/kineto",
    "number": 854,
    "title": "Is Kineto planning to support backend extensions?",
    "body": "Hello, there is 'PrivateUse1' in pytorch to support backend integration. Will Kineto provide similar features?",
    "url": "https://github.com/pytorch/kineto/issues/854",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-08T03:19:53Z",
    "updated_at": "2024-04-23T15:21:34Z",
    "user": "fwenguang"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 92,
    "title": "Is there anyway that I can use learning rate warm-up during the training ? ",
    "body": "I am using this repo to:\r\n1. Continual Pre-training \r\n2. SFT\r\n3. DPR\r\n\r\nFor stage 1, I want to use a learning rate warm-up. ",
    "url": "https://github.com/huggingface/alignment-handbook/issues/92",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-07T21:07:25Z",
    "updated_at": "2024-01-10T06:48:52Z",
    "comments": 1,
    "user": "shamanez"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 91,
    "title": "how to use dpo without flash-attention",
    "body": "Is there any flash-attention free version?",
    "url": "https://github.com/huggingface/alignment-handbook/issues/91",
    "state": "open",
    "labels": [],
    "created_at": "2024-01-07T16:27:08Z",
    "updated_at": "2024-02-06T19:51:38Z",
    "user": "Fu-Dayuan"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2312,
    "title": "Seeking for Help: how to work deepspeed zero stage 3 with quantized model? ",
    "body": "Hi, I would like to conduct dpo training on my 2 a6000 (48GB) gpus based on this project (https://github.com/allenai/open-instruct). Specifically, the model was based on qlora and reference model was based on quantized one. I would like to utilize the deepspeed zero stage 3 to accelerate training time. \r\n\r\nDuring the training process, I encountered errors related to the model and reference model integration with Deepspeed. Below is the relevant code snippet and the encountered error:\r\n\r\n\r\nThe model and reference model both were loaded with \r\n\r\n```python\r\nbnb_config = BitsAndBytesConfig(\r\n                    load_in_8bit=True,\r\n                )\r\ndevice_index = accelerator.local_process_index\r\ndevice_map = {\"\": device_index} # force data-parallel training.\r\nmodel = AutoModelForCausalLM.from_pretrained(\r\n                    model_name_or_path,\r\n                    from_tf=bool(\".ckpt\" in model_name_or_path),\r\n                    config=config,\r\n                    load_in_8bit=True,\r\n                    quantization_config=bnb_config,\r\n                    torch_dtype=torch.bfloat16,\r\n                    use_flash_attention_2=True if args.use_flash_attn else False,\r\n)\r\nreference_model = model\r\n\r\n# some codes about coverting model to lora model...\r\n\r\ndef prepare_deepspeed(accelerator, model):\r\n        deepspeed_plugin = accelerator.state.deepspeed_plugin\r\n        config_kwargs = deepcopy(deepspeed_plugin.deepspeed_config)\r\n\r\n        if model is not None:\r\n            if hasattr(model, \"config\"):\r\n                hidden_size = (\r\n                    max(model.config.hidden_sizes)\r\n                    if getattr(model.config, \"hidden_sizes\", None)\r\n                    else getattr(model.config, \"hidden_size\", None)\r\n                )\r\n                if hidden_size is not None and config_kwargs[\"zero_optimization\"][\"stage\"] == 3:\r\n                    # Note that `stage3_prefetch_bucket_size` can produce DeepSpeed messages like: `Invalidate trace cache @ step 0: expected module 1, but got module 0`\r\n                    # This is expected and is not an error, see: https://github.com/microsoft/DeepSpeed/discussions/4081\r\n                    config_kwargs.update(\r\n                        {\r\n                            \"zero_optimization.reduce_bucket_size\": hidden_size * hidden_size,\r\n                            \"zero_optimization.stage3_param_persistence_threshold\": 10 * hidden_size,\r\n                            \"zero_optimization.stage3_prefetch_bucket_size\": 0.9 * hidden_size * hidden_size,\r\n                        }\r\n                    )\r\n\r\n        # If ZeRO-3 is used, we shard both the active and reference model.\r\n        # Otherwise, we assume the reference model fits in memory and is initialized on each device with ZeRO disabled (stage 0)\r\n        if config_kwargs[\"zero_optimization\"][\"stage\"] != 3:\r\n            config_kwargs[\"zero_optimization\"][\"stage\"] = 0\r\n        model, *_ = deepspeed.initialize(model=model, config=config_kwargs)\r\n        model.eval()\r\n        return model\r\n\r\nreference_model = prepare_deepspeed(accelerator, reference_model)\r\n```\r\n\r\n\r\n\r\n```\r\nFile \"/root/data1/tulu2/open-instruct/open-instruct-main/open_instruct/dpo_tune.py\", line 692, in main                                                                                                                           \r\n    reference_model = prepare_deepspeed(accelerator, reference_model)                                                                                                                                                              \r\n  File \"/root/data1/tulu2/open-instruct/open-instruct-main/open_instruct/dpo_tune.py\", line 396, in prepare_deepspeed                                                                                                              \r\n    model, *_ = deepspeed.initialize(model=model, config=config_kwargs)                                                                                                                                                            \r\n  File \"/conda/envs/tulu_dpo_env/lib/python3.10/site-packages/deepspeed/__init__.py\", line 171, in initialize                                                                                                                      \r\n    engine = DeepSpeedEngine(args=args,                                                                                                                                                                                            \r\n  File \"/conda/envs/tulu_dpo_env/lib/python3.10/site-packages/deepspeed/runtime/engine.py\", line 259, in __init__                                                                                                                  \r\n    self._configure_distributed_model(model)                                                                                                                                                                                       \r\n  File \"/conda/envs/tulu_dpo_env/lib/python3.10/site-",
    "url": "https://github.com/huggingface/accelerate/issues/2312",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-07T09:44:28Z",
    "updated_at": "2024-01-11T11:01:31Z",
    "user": "grayground"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6565,
    "title": " `drop_last_batch=True` for IterableDataset map function is ignored with multiprocessing DataLoader ",
    "body": "### Describe the bug\r\n\r\nScenario:\r\n- Interleaving two iterable datasets of unequal lengths (`all_exhausted`), followed by a batch mapping with batch size 2 to effectively merge the two datasets and get a sample from each dataset in a single batch, with `drop_last_batch=True` to skip the last batch in case it doesn't have two samples.\r\n\r\nWhat works:\r\n- Using DataLoader with `num_workers=0`\r\n\r\nWhat does not work:\r\n- Using DataLoader with `num_workers=1`, errors in the last batch.\r\n\r\nBasically, `drop_last_batch=True` is ignored when using multiple dataloading workers.\r\n\r\nPlease take a look at the minimal repro script below.\r\n\r\n### Steps to reproduce the bug\r\n\r\n```python\r\nfrom datasets import Dataset, interleave_datasets\r\nfrom torch.utils.data import DataLoader\r\n\r\n\r\ndef merge_samples(batch):\r\n    assert len(batch['a']) == 2, \"Batch size must be 2\"\r\n    batch['c'] = [batch['a'][0]]\r\n    batch['d'] = [batch['a'][1]]\r\n    return batch\r\n\r\n\r\ndef gen1():\r\n    for ii in range(1, 8385):\r\n        yield {\"a\": ii}\r\n\r\n\r\ndef gen2():\r\n    for ii in range(1, 5302):\r\n        yield {\"a\": ii}\r\n\r\n\r\nif __name__ == '__main__':\r\n\r\n    dataset1 = Dataset.from_generator(gen1).to_iterable_dataset(num_shards=1024)\r\n    dataset2 = Dataset.from_generator(gen2).to_iterable_dataset(num_shards=1024)\r\n\r\n    interleaved = interleave_datasets([dataset1, dataset2], stopping_strategy=\"all_exhausted\")\r\n    mapped = interleaved.map(merge_samples, batched=True, batch_size=2, remove_columns=interleaved.column_names,\r\n                             drop_last_batch=True)\r\n\r\n    # Works\r\n    loader = DataLoader(mapped, batch_size=32, num_workers=0)\r\n    i = 0\r\n    for b in loader:\r\n        print(i, b['c'].shape, b['d'].shape)\r\n        i += 1\r\n\r\n    print(\"DataLoader with num_workers=0 works\")\r\n\r\n    # Doesn't work\r\n    loader = DataLoader(mapped, batch_size=32, num_workers=1)\r\n    i = 0\r\n    for b in loader:\r\n        print(i, b['c'].shape, b['d'].shape)\r\n        i += 1\r\n\r\n\r\n```\r\n\r\n### Expected behavior\r\n\r\n `drop_last_batch=True` should have same behaviour for `num_workers=0` and `num_workers>=1`\r\n\r\n### Environment info\r\n\r\n- `datasets` version: 2.16.1\r\n- Platform: macOS-10.16-x86_64-i386-64bit\r\n- Python version: 3.10.12\r\n- `huggingface_hub` version: 0.20.2\r\n- PyArrow version: 12.0.1\r\n- Pandas version: 2.0.3\r\n- `fsspec` version: 2023.6.0\r\n\r\nI have also tested on Linux and got the same behavior.",
    "url": "https://github.com/huggingface/datasets/issues/6565",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-07T02:46:50Z",
    "updated_at": "2025-03-08T09:46:05Z",
    "comments": 2,
    "user": "naba89"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 505,
    "title": "How do I use WebGL as executionProvider?",
    "body": "### Question\n\n```js\r\nexport const executionProviders = [\r\n    // 'webgpu',\r\n    'wasm'\r\n];\r\n```\r\nI looked at src/backends/onnx.js and noticed that there was no webgl in the executionProviders.\r\nIs there a way to use WebGL as executionProvider?",
    "url": "https://github.com/huggingface/transformers.js/issues/505",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-06T19:16:36Z",
    "updated_at": "2024-10-18T13:30:09Z",
    "user": "kwaroran"
  },
  {
    "repo": "pytorch/executorch",
    "number": 1548,
    "title": "How to implement the \"aten.mul.Scalar\" for Qualcomm backend",
    "body": "The second arg of \"aten.mul.Scalar\" is const scalar value, such as float: 0.5f.\r\nThe function define_tensor/define_scalar/define_value of NodeVisitor should get the arg \"node\" as input, but how can I define one node like torch.fx.Node for const scalar value?",
    "url": "https://github.com/pytorch/executorch/issues/1548",
    "state": "closed",
    "labels": [
      "partner: qualcomm",
      "triaged"
    ],
    "created_at": "2024-01-06T09:12:19Z",
    "updated_at": "2024-01-09T02:18:37Z",
    "user": "czy2014hust"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 116922,
    "title": "How to adapt to `at::scaled_dot_product_attention`'s routing logic for a third-party cuda-like device?",
    "body": "https://github.com/pytorch/pytorch/blob/f24bba1624a8bb5c920833b18fc6162db084ca09/aten/src/ATen/native/transformers/attention.cpp#L635-L642\r\n\r\nNow, I am adapting `at::scaled_dot_product_attention` to a specific type of cuda-like device and encounters a problem.\r\nIn `at::scaled_dot_product_attention`, it will choose a path between `at::_scaled_dot_product_flash_attention`, `at::_scaled_dot_product_efficient_attention` and `at::_scaled_dot_product_attention_math` for `cpu`, `cuda` and `romc` in the routing codes.\r\nBut for another cuda-like device, the routing codes will always go into the `at::_scaled_dot_product_attention_math` path.\r\n\r\nIf I have implemented all these three paths for my cuda-like device, how can I change these routing codes to fully support `at::scaled_dot_product_attention`?\r\nShould I write a new `at::scaled_dot_product_attention` only for my cuda-like device, or just change some codes in the current torch repository?\r\nI need some suggestions, thank you!\r\n\r\ncc @jbschlosser @bhosmer @cpuhrsch @erichan1 @drisspg @mikaylagawarecki",
    "url": "https://github.com/pytorch/pytorch/issues/116922",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-06T07:28:43Z",
    "updated_at": "2024-01-15T02:13:30Z",
    "user": "drslark"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6474,
    "title": "how to use xformers",
    "body": "Maybe this is a relatively low-level question, but what always bothers me is how does Xformer run when running SD? Or can it be accelerated by default after installing this library? Thank you all for answering your questions",
    "url": "https://github.com/huggingface/diffusers/issues/6474",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-06T03:34:16Z",
    "updated_at": "2024-01-11T03:38:19Z",
    "user": "babyta"
  },
  {
    "repo": "pytorch/serve",
    "number": 2890,
    "title": "Difference between `Custom handler with module level entry point` and `Custom handler with class level entry point`",
    "body": "### \ud83d\udcda The doc issue\n\n# Not an issue\r\nWhat is the difference between `Custom handler with module level entry point` and `Custom handler with class level entry point`?\r\nCan you give me any examples? \r\nThanks for help\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2890",
    "state": "closed",
    "labels": [
      "question",
      "triaged"
    ],
    "created_at": "2024-01-05T20:45:25Z",
    "updated_at": "2024-01-25T05:07:51Z",
    "user": "IonBoleac"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6561,
    "title": "Document YAML configuration with \"data_dir\"",
    "body": "See https://huggingface.co/datasets/uonlp/CulturaX/discussions/15#6597e83f185db94370d6bf50 for reference",
    "url": "https://github.com/huggingface/datasets/issues/6561",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2024-01-05T14:03:33Z",
    "updated_at": "2025-08-07T14:57:58Z",
    "comments": 6,
    "user": "severo"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2579,
    "title": "\u2753 [Question] Support for layers with Custom C++ and CUDA Extensions",
    "body": "## \u2753 Question\r\nSupport for layers with Custom C++ and CUDA Extensions\r\n\r\n## What you have already tried\r\nCan I convert the LLTM class in directory `cuda` of https://github.com/pytorch/extension-cpp (below) into a tensorrt engine through Torch-TensorRT?\r\n\r\nI tried the code below:\r\n```lltm.py\r\nimport math\r\nfrom torch import nn\r\nfrom torch.autograd import Function\r\nimport torch\r\n\r\nimport lltm_cuda\r\n\r\ntorch.manual_seed(42)\r\n\r\nclass LLTMFunction(Function):\r\n    @staticmethod\r\n    def forward(ctx, input, weights, bias, old_h, old_cell):\r\n        outputs = lltm_cuda.forward(input, weights, bias, old_h, old_cell)\r\n        new_h, new_cell = outputs[:2]\r\n        variables = outputs[1:] + [weights]\r\n        ctx.save_for_backward(*variables)\r\n\r\n        return new_h, new_cell\r\n\r\n    @staticmethod\r\n    def backward(ctx, grad_h, grad_cell):\r\n        outputs = lltm_cuda.backward(\r\n            grad_h.contiguous(), grad_cell.contiguous(), *ctx.saved_variables)\r\n        d_old_h, d_input, d_weights, d_bias, d_old_cell, d_gates = outputs\r\n        return d_input, d_weights, d_bias, d_old_h, d_old_cell\r\n\r\n\r\nclass LLTM(nn.Module):\r\n    def __init__(self, input_features, state_size):\r\n        super(LLTM, self).__init__()\r\n        self.input_features = input_features\r\n        self.state_size = state_size\r\n        self.weights = nn.Parameter(\r\n            torch.Tensor(3 * state_size, input_features + state_size))\r\n        self.bias = nn.Parameter(torch.Tensor(1, 3 * state_size))\r\n        self.reset_parameters()\r\n\r\n    def reset_parameters(self):\r\n        stdv = 1.0 / math.sqrt(self.state_size)\r\n        for weight in self.parameters():\r\n            weight.data.uniform_(-stdv, +stdv)\r\n\r\n    def forward(self, input, state):\r\n        return LLTMFunction.apply(input, self.weights, self.bias, *state)\r\n\r\nimport torch_tensorrt\r\n\r\nmodel = LLTM(64, 32).cuda()\r\nprint(\r\n    model(\r\n        torch.randn(2, 64).cuda(),\r\n        torch.randn(2, 32).cuda(),\r\n        torch.randn(2, 32).cuda(),\r\n    )\r\n)\r\n\r\n\r\ntraced_model = torch.jit.trace(\r\n    model,\r\n    [\r\n        torch.randn(2, 64).cuda(),\r\n        torch.randn(2, 32).cuda(),\r\n        torch.randn(2, 32).cuda(),\r\n    ],\r\n)\r\n\r\nimport torch_tensorrt\r\n\r\ntrt_model = torch_tensorrt.compile(\r\n    traced_model,\r\n    inputs=[\r\n        torch_tensorrt.Input((2, 64), dtype=torch.float32),\r\n        torch_tensorrt.Input((2, 32), dtype=torch.float32),\r\n        torch_tensorrt.Input((2, 32), dtype=torch.float32),\r\n    ],\r\n    enabled_precisions={torch.float32},\r\n)\r\n```\r\noutput:\r\n```\r\n[1]    895656 segmentation fault (core dumped)  python lltm.py\r\n````\r\n\r\n\r\n\r\nI read the relevant materials, but I have no idea how to proceed at all.",
    "url": "https://github.com/pytorch/TensorRT/issues/2579",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-05T07:25:23Z",
    "updated_at": "2024-01-15T06:22:05Z",
    "user": "Siyeong-Lee"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2577,
    "title": "Can please somebody give a clear explanation of how to install torch-tensorrt on Windows?",
    "body": "## \u2753 Question\r\n\r\nHello,\r\n\r\nI've encountered problems installing torch-tensorrt on Windows 10\r\n\r\nNo matter how I try, how many sources I look up to, there is no clear explanation on how to do everything. The documentation is vague, and because I am used to working with python code, which does everything for you, that is pip install... python code.py, and nothing more is required, I do not have as much experience with cmake, building libraries, files, and c++, which makes it very difficult to follow along the installation process.\r\n\r\n\r\n\r\nNow I've tried to follow along instructions from the [main page](https://github.com/pytorch/TensorRT)\r\n\r\npip install torch-tensorrt doesn't work\r\ndownloaded zip file of this repository; python setup.py install also doesn't work\r\n\r\ninstalled bazel\r\nmodified the workspace, still nothing\r\n\r\ntried to directly import into code py/torch-tensorrt - nothing\r\n\r\nthen inside the py folder opened command prompt ant typed in:\r\n\r\n`bazel build //:libtorchtrt --compilation_mode=dbg`\r\n\r\nand received this error:\r\n\r\n`Starting local Bazel server and connecting to it...\r\nINFO: Repository libtorch instantiated at:\r\n  D:/pyth/tensorrt-main/WORKSPACE:53:13: in <toplevel>\r\nRepository rule http_archive defined at:\r\n  C:/users/tomas/_bazel_tomas/r4zfvyvs/external/bazel_tools/tools/build_defs/repo/http.bzl:372:31: in <toplevel>\r\nWARNING: Download from https://download.pytorch.org/libtorch/nightly/cu121/libtorch-cxx11-abi-shared-with-deps-latest.zip failed: class com.google.devtools.build.lib.bazel.repository.downloader.ContentLengthMismatchException Bytes read 2210658461 but wanted 2501377827\r\nERROR: An error occurred during the fetch of repository 'libtorch':\r\n   Traceback (most recent call last):\r\n        File \"C:/users/tomas/_bazel_tomas/r4zfvyvs/external/bazel_tools/tools/build_defs/repo/http.bzl\", line 132, column 45, in _http_archive_impl\r\n                download_info = ctx.download_and_extract(\r\nError in download_and_extract: java.io.IOException: Error downloading [https://download.pytorch.org/libtorch/nightly/cu121/libtorch-cxx11-abi-shared-with-deps-latest.zip] to C:/users/tomas/_bazel_tomas/r4zfvyvs/external/libtorch/temp7217651597570855917/libtorch-cxx11-abi-shared-with-deps-latest.zip: Bytes read 2210658461 but wanted 2501377827\r\nERROR: D:/pyth/tensorrt-main/WORKSPACE:53:13: fetching http_archive rule //external:libtorch: Traceback (most recent call last):\r\n        File \"C:/users/tomas/_bazel_tomas/r4zfvyvs/external/bazel_tools/tools/build_defs/repo/http.bzl\", line 132, column 45, in _http_archive_impl\r\n                download_info = ctx.download_and_extract(\r\nError in download_and_extract: java.io.IOException: Error downloading [https://download.pytorch.org/libtorch/nightly/cu121/libtorch-cxx11-abi-shared-with-deps-latest.zip] to C:/users/tomas/_bazel_tomas/r4zfvyvs/external/libtorch/temp7217651597570855917/libtorch-cxx11-abi-shared-with-deps-latest.zip: Bytes read 2210658461 but wanted 2501377827\r\nERROR: D:/pyth/tensorrt-main/core/util/logging/BUILD:13:11: //core/util/logging:logging depends on @libtorch//:libtorch in repository @libtorch which failed to fetch. no such package '@libtorch//': java.io.IOException: Error downloading [https://download.pytorch.org/libtorch/nightly/cu121/libtorch-cxx11-abi-shared-with-deps-latest.zip] to C:/users/tomas/_bazel_tomas/r4zfvyvs/external/libtorch/temp7217651597570855917/libtorch-cxx11-abi-shared-with-deps-latest.zip: Bytes read 2210658461 but wanted 2501377827\r\nERROR: Analysis of target '//:libtorchtrt' failed; build aborted:\r\nINFO: Elapsed time: 458.697s\r\nINFO: 0 processes.\r\nFAILED: Build did NOT complete successfully (64 packages loaded, 413 targets configured)\r\n    Fetching https://download.pytorch.org/...orch-cxx11-abi-shared-with-deps-latest.zip; 2.1 GiB (2,210,121,825B) 446s\r\n\r\n\r\n\r\nAnd also tried some other things, I cannot remember, but unsuccessfully.\r\n\r\n\r\n\r\nTHANK YOU FOR YOUR HELP IN ADVANCE\r\n\r\n\r\n\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version: 2.1.2+cu121\r\n - OS : Windows 10\r\n - I am running python and pytorch straight from Windows, without any environment\r\n - Python version: 3.10.13\r\n - CUDA version: 12.1 update 1\r\n - GPU models and configuration: GTX 1660 TI",
    "url": "https://github.com/pytorch/TensorRT/issues/2577",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-05T02:52:01Z",
    "updated_at": "2025-12-02T18:12:43Z",
    "user": "ninono12345"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2397,
    "title": "Does finetuning a cross-encoder yield prediction labels and not similarity scores?",
    "body": "Hi, \r\nThis is less of a coding issue and more of a conceptual question. I have binary labels for similarity and dissimilarity while training a cross-encoder; so its a binary classification task. The pretrained cross-encoder has a float score, most of the time around .5. After finetuning, the models only predict  a decimal really close 0 or 1, which makes sense since the model is being trained for  a binary classification task. But is is supposed to be a label prediction or a similarity score?  Or is it limited to the type of data you have  for training? ",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2397",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-04T21:01:44Z",
    "updated_at": "2024-01-09T17:53:17Z",
    "user": "FDSRashid"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1403,
    "title": "How to load llama-2 thru Client",
    "body": "### System Info\n\nHi there, text_generation.__version__ = 0.6.0\r\n\r\n\n\n### Information\n\n- [ ] Docker\n- [X] The CLI directly\n\n### Tasks\n\n- [ ] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\nI am trying to load llama-2 model thru Client\r\n\r\n```\r\nfrom text_generation import Client\r\nmodel_endpoint = \"https://api-inference.huggingface.co/models/meta-llama/Llama-2-7b-hf\"\r\n# model_endpoint = \"https://api-inference.huggingface.co/models/tiiuae/falcon-7b-instruct\"\r\n# model_endpoint = \"https://api-inference.huggingface.co/models/lmsys/vicuna-7b-v1.5\"\r\n\r\nclient = Client(model_endpoint, timeout=60, headers={\"Authorization\": f\"Bearer {token_auth}\"})\r\ngeneration: str = client.generate(\r\n        prompt=\"What is the capital city of British Columbia, Canada\",\r\n        temperature=1,\r\n        top_p=0.9,\r\n        max_new_tokens=384,\r\n        stop_sequences=None,\r\n    ).generated_text\r\n```\r\n\n\n### Expected behavior\n\nHowever, this is an error:\r\n\r\n> BadRequestError: Model requires a Pro subscription; check out hf.co/pricing to learn more. Make sure to include your HF token in your query.\r\n\r\nKindly ask any solutions ?\r\nthanks.",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1403",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-04T17:25:59Z",
    "updated_at": "2024-01-05T16:01:56Z",
    "user": "yanan1116"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28343,
    "title": "How to log custom value?",
    "body": "I want to log some info to `{'loss': 2.5234, 'learning_rate': 1.0344827586206896e-06, 'epoch': 0.0}`\r\nhow can i do that?\r\nlike: {'loss': 2.5234, 'learning_rate': 1.0344827586206896e-06, 'epoch': 0.0, 'version': 'v1'}  ",
    "url": "https://github.com/huggingface/transformers/issues/28343",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-04T12:28:43Z",
    "updated_at": "2024-01-07T13:07:22Z",
    "user": "xmy0916"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 499,
    "title": "An error occurred during model execution: \"RangeError: offset is out of bounds\".",
    "body": "### Question\n\nHello - having an issue getting this code to run in the browser.  Using `Xenova/TinyLlama-1.1B-Chat-v1.0` on `\"@xenova/transformers\": \"^2.13.2\"` \r\n\r\nIt runs perfectly in node.\r\n\r\n```ts\r\nimport { pipeline } from '@xenova/transformers';\r\n\r\nconsole.log('Loading model...');\r\nconst generator = await pipeline('text-generation', 'Xenova/TinyLlama-1.1B-Chat-v1.0');\r\nconsole.log('Model loaded!');\r\nconst messages = [\r\n  { role: 'system', content: 'You are a friendly Assistant' },\r\n  { role: 'user', content: 'Explain JavaScript Scopes in simple terms' },\r\n];\r\n\r\nconst prompt = generator.tokenizer.apply_chat_template(messages, {\r\n  tokenize: false,\r\n  add_generation_prompt: true,\r\n});\r\n\r\nconsole.log('Generating...');\r\nconst result = await generator(prompt, {\r\n  max_new_tokens: 256,\r\n  temperature: 0.5,\r\n  do_sample: true,\r\n  top_k: 50,\r\n});\r\n\r\nconsole.dir(result);\r\n```\r\n\r\nIn Node it runs: \r\n\r\n<img width=\"951\" alt=\"Screenshot 2024-01-03 at 2 53 39\u202fPM\" src=\"https://github.com/xenova/transformers.js/assets/176013/4dfb556c-4605-4a19-b560-a52c07a28e5f\"> \r\n\r\nBut in the browser I see this:\r\n\r\n<img width=\"1264\" alt=\"Screenshot 2024-01-03 at 2 54 28\u202fPM\" src=\"https://github.com/xenova/transformers.js/assets/176013/899c803f-d311-4661-b3f9-ccd3e9c714d0\">\r\n\r\nSame issue in Firefox.\r\n\r\nThis issue seems to say it's memory: https://github.com/xenova/transformers.js/issues/8\r\n\r\nIs this one too large to run in the browser?",
    "url": "https://github.com/huggingface/transformers.js/issues/499",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-03T19:55:45Z",
    "updated_at": "2024-10-18T13:30:09Z",
    "user": "wesbos"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 497,
    "title": "Cross Encoder",
    "body": "### Question\n\nI'm trying to run this pre-trained Cross Encoder model ([MS Marco TinyBERT](https://huggingface.co/cross-encoder/ms-marco-TinyBERT-L-2-v2)) not available in Transformers.js.\r\n\r\nI've managed to convert it using the handy script, and I'm successfully running it with the \"feature-extraction\" task:\r\n```js\r\nconst pairs = [\r\n[\"How many people live in Berlin?\", \"Berlin had a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.\"],\r\n[ \"How many people live in Berlin?\", \"Berlin is well known for its museums.\"]\r\n];\r\n\r\nconst model = await pipeline(\"feature-extraction\", modelName);\r\nconst out = await model(pairs[0]);\r\n\r\nconsole.log(Array.from(out.data)) // [-8.387903213500977, -9.811422348022461]\r\n```\r\n\r\nBut I'm trying to run it as a Cross Encoder model as it's intended to, like the Python [example code](https://www.sbert.net/docs/pretrained-models/ce-msmarco.html?highlight=cross%20encoder):\r\n```python\r\nfrom sentence_transformers import CrossEncoder\r\n\r\nmodel_name = 'cross-encoder/ms-marco-TinyBERT-L-2-v2'\r\nmodel = CrossEncoder(model_name, max_length=512)\r\n\r\nscores = model.predict([\r\n('How many people live in Berlin?', 'Berlin had a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.'), \r\n('How many people live in Berlin?', 'Berlin is well known for its museums.')\r\n])\r\n\r\nprint(scores) // [ 7.1523685 -6.2870455]\r\n```\r\n\r\nHow can I infer a similarity score from two sentences?\r\n\r\nPS: if there are existing models/techniques for sentence similarity I'll take it!",
    "url": "https://github.com/huggingface/transformers.js/issues/497",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-03T16:24:37Z",
    "updated_at": "2024-03-01T00:11:31Z",
    "user": "achrafash"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 448,
    "title": "What is the difference between autotrain and kohya_ss?",
    "body": "What is the difference between autotrain and kohya_ss?\r\n\r\n ",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/448",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2024-01-03T16:18:58Z",
    "updated_at": "2024-01-22T15:01:45Z",
    "user": "loboere"
  },
  {
    "repo": "pytorch/executorch",
    "number": 1527,
    "title": "How to build qnn_executor_runner for linux-gcc9.3?",
    "body": "My requirements are that I want to compile the model on x86 host and run the inference on linux device using Qualcomm AI Engine, e.g. SA8295. So how to build `qnn_executor_runner` for  linux-gcc9.3 not android? thanks~\r\nthe libQnnHtp.so is different in qnn.\r\n```\r\n$ find . -name libQnnHtp.so\r\n./lib/aarch64-oe-linux-gcc9.3/libQnnHtp.so\r\n./lib/aarch64-android/libQnnHtp.so\r\n```",
    "url": "https://github.com/pytorch/executorch/issues/1527",
    "state": "closed",
    "labels": [
      "partner: qualcomm",
      "triaged"
    ],
    "created_at": "2024-01-03T09:04:08Z",
    "updated_at": "2024-01-29T07:49:12Z",
    "user": "huangzhiyuan"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1622,
    "title": "device set bug",
    "body": "### System Info\n\n```shell\noptimum                  1.16.1\n```\n\n\n### Who can help?\n\n@philschmid\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nfrom transformers import AutoModelForCausalLM, AutoTokenizer, GPTQConfig\r\n\r\nmodel_id = \"facebook/opt-125m\"\r\ntokenizer = AutoTokenizer.from_pretrained(model_id)\r\nquantization_config = GPTQConfig(bits=4, dataset=[\"c4\", \"c4\", \"c4\"], tokenizer=tokenizer)\r\n\r\nmodel = AutoModelForCausalLM.from_pretrained(model_id, device_map=\"cuda:5\", quantization_config=quantization_config)\r\n\r\nprint()\n\n### Expected behavior\n\noptimum/gptq/quantizer.py line 429\r\ndata[k] = v.to(0)\r\n\r\nWhy is it fixed at 0? When setting device_map for the model, an error occurs that the input and model are not on the same device.\r\nIs this a bug?",
    "url": "https://github.com/huggingface/optimum/issues/1622",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2024-01-03T09:01:16Z",
    "updated_at": "2024-01-09T10:17:45Z",
    "comments": 1,
    "user": "Yuang-Deng"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 116687,
    "title": "How to install pytorch on",
    "body": "",
    "url": "https://github.com/pytorch/pytorch/issues/116687",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-03T08:12:33Z",
    "updated_at": "2024-01-03T08:42:38Z",
    "user": "Joseph513shen"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 494,
    "title": "in-browser inference slower than node inference to be expected?",
    "body": "### Question\n\ni noticed that i get much higher performance when i run inference in node vs in the browser (latest chrome, m2 mac, ). is that generally to be expected? for context - i'm creating embeddings for chunks of text using the gte-small model. \r\nthank you!",
    "url": "https://github.com/huggingface/transformers.js/issues/494",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2024-01-03T04:26:47Z",
    "updated_at": "2024-08-27T23:53:36Z",
    "user": "carlojoerges"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1621,
    "title": "Cannot convert sentence transformer model properly",
    "body": "### System Info\r\n\r\n```shell\r\nOptimum Version = 1.16.1\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n@michaelbenayoun \r\n@fxmarty\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [x] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [x] My own task or dataset (give details below)\r\n\r\n### Reproduction (minimal, reproducible, runnable)\r\n\r\nWhen running:\r\n`optimum-cli export onnx -m sentence-transformers/distiluse-base-multilingual-cased-v2 --task feature-extraction ./models/distiluse-base-multilingual-cased-v2`\r\n\r\nI get:\r\n```\r\n...\r\nThe ONNX export succeeded with the warning: The exported ONNX model does not have the exact same outputs as what is provided in SentenceTransformersTransformerOnnxConfig. Difference: onnx::Shape_530, onnx::Shape_233, onnx::Shape_332, onnx::Shape_431, onnx::Shape_629, 764.\r\n...\r\n```\r\n\r\nAnd afterwards when i try running the inference session with the generated .onnx model i get:\r\n```\r\nonnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Non-zero status code returned while running Expand node. Name:'/1/Expand' Status Message: invalid expand shape\r\n```\r\n\r\nIt seems like the model is not being properly converted. I'm currently trying to figure out why exactly.\r\n\r\n### Extra context:\r\n- This pr seems to have added support to sentence-transformers models, maybe something is missing: https://github.com/huggingface/optimum/pull/1589\r\n- To generate the runtime session error I used this script and changed the model names and exported model path: https://github.com/huggingface/optimum/issues/1519#issuecomment-1854780869\r\n- The same error occurs using node.js onnx runtime, so I assume the model is not exported properly.\r\n\r\n\r\n### Expected behavior\r\n\r\nThe model is exported properly and generates the same results as using Sentence transformers directly.",
    "url": "https://github.com/huggingface/optimum/issues/1621",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2024-01-02T12:08:07Z",
    "updated_at": "2024-01-12T15:26:21Z",
    "comments": 4,
    "user": "leodalcin"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 87,
    "title": "How can I config `loss_type`?",
    "body": "I want to change the **loss_type** into KTO or something else to test but I can't. Please show me the way. Thank you.",
    "url": "https://github.com/huggingface/alignment-handbook/issues/87",
    "state": "closed",
    "labels": [],
    "created_at": "2024-01-02T11:54:34Z",
    "updated_at": "2024-01-10T13:41:19Z",
    "comments": 2,
    "user": "hahuyhoang411"
  },
  {
    "repo": "pytorch/examples",
    "number": 1208,
    "title": "add examples/siamese_network with triplet loss example",
    "body": "<!--\r\nThank you for suggesting an idea to improve pytorch/examples\r\n\r\nPlease fill in as much of the template below as you're able.\r\n-->\r\n\r\n## Is your feature request related to a problem? Please describe.\r\nCan you please provide an example of Siamese network training / testing with triplet loss such that it can be used with more complex image datasets?\r\n\r\n## Describe the solution\r\nEither add an args flag to set triplet loss as the method in the existing example, or provide a separate example for triplet loss.\r\n\r\n## Describe alternatives solution\r\nI tried to do this on my own.\r\n",
    "url": "https://github.com/pytorch/examples/issues/1208",
    "state": "open",
    "labels": [],
    "created_at": "2024-01-01T19:19:35Z",
    "updated_at": "2024-01-01T19:19:35Z",
    "comments": 0,
    "user": "pax7"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6548,
    "title": "Skip if a dataset has issues",
    "body": "### Describe the bug\n\nHello everyone,\r\nI'm using **load_datasets** from **huggingface** to download the datasets and I'm facing an issue, the download starts but it reaches some state and then  fails with the following error:\r\nCouldn't reach https://huggingface.co/datasets/wikimedia/wikipedia/resolve/4cb9b0d719291f1a10f96f67d609c5d442980dc9/20231101.ext/train-00000-of-00001.parquet\r\n\r\nFailed to resolve \\'huggingface.co\\' ([Errno -3] Temporary failure in name resolution)\"))')))\r\n\r\n\r\n![image](https://github.com/huggingface/datasets/assets/143214684/8847d9cb-529e-4eda-9c76-282713dfa3af)\r\n\r\nso I was wondering is there a parameter to be passed to load_dataset() to skip files that can't be downloaded??\n\n### Steps to reproduce the bug\n\nParameter to be passed to load_dataset() of huggingface to skip files that can't be downloaded??\n\n### Expected behavior\n\nload_dataset() finishes without error\n\n### Environment info\n\nNone",
    "url": "https://github.com/huggingface/datasets/issues/6548",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-31T12:41:26Z",
    "updated_at": "2024-01-02T10:33:17Z",
    "comments": 1,
    "user": "hadianasliwa"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 491,
    "title": "Running tests locally fail",
    "body": "### Question\n\nWhen I git clone to my Mac, and run tests, I get a lot of errors:\r\n\r\n```\r\n  \u25cf Models \u203a Loading different architecture types \u203a gpt2 (GPT2Model)\r\n\r\n    Could not locate file: \"https://huggingface.co/gpt2/resolve/main/tokenizer_config.json\".\r\n\r\n      239 |\r\n      240 |     const message = ERROR_MAPPING[status] ?? `Error (${status}) occurred while trying to load file`;\r\n    > 241 |     throw Error(`${message}: \"${remoteURL}\".`);\r\n          |           ^\r\n      242 | }\r\n      243 |\r\n      244 | class FileCache {\r\n\r\n      at handleError (src/utils/hub.js:241:11)\r\n      at getModelFile (src/utils/hub.js:474:24)\r\n      at getModelJSON (src/utils/hub.js:575:18)\r\n          at async Promise.all (index 1)\r\n      at loadTokenizer (src/tokenizers.js:61:16)\r\n      at Function.from_pretrained (src/tokenizers.js:2465:20)\r\n      at Object.<anonymous> (tests/models.test.js:61:37)\r\n```\r\n\r\nAnd indeed, a lot of files don't actually exist, like in this case:\r\n\r\nhttps://huggingface.co/gpt2/resolve/main/tokenizer_config.json\r\n\r\nBut I don't see this in the logs for your github actions, so i am confused.",
    "url": "https://github.com/huggingface/transformers.js/issues/491",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-30T02:12:35Z",
    "updated_at": "2024-10-18T13:30:11Z",
    "user": "sroussey"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 490,
    "title": "Is it possible to implement sentence splitting?",
    "body": "### Question\n\nCan this library be used to implement sentence splitting, possibly with tokenizers?",
    "url": "https://github.com/huggingface/transformers.js/issues/490",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-30T01:17:55Z",
    "updated_at": "2024-02-01T01:51:52Z",
    "user": "devfacet"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 486,
    "title": "Output different from sentence transformers",
    "body": "### Question\n\nHello, i'm not sure if i'm doing something wrong, but the pooled outputs from sentence transformers and this library seem to be different.\r\nThe results are the same if I use `pooling: 'none'` in js and `output_value='token_embedding` in python.\r\nI've seen some other similar issues, but this seems to be a different problem.\r\n\r\n```js\r\nconst fs = require('fs');\r\nclass MyClassificationPipeline {\r\n  static task = 'feature-extraction';\r\n  static model = 'Xenova/distiluse-base-multilingual-cased-v2';\r\n  static instance = null;\r\n\r\n  static async getInstance(progress_callback = null) {\r\n    if (this.instance === null) {\r\n      // Dynamically import the Transformers.js library\r\n      let { pipeline, env } = await import('@xenova/transformers');\r\n\r\n      // NOTE: Uncomment this to change the cache directory\r\n      // env.cacheDir = './.cache';\r\n\r\n      this.instance = pipeline(this.task, this.model, { progress_callback, quantized: false });\r\n    }\r\n\r\n    return this.instance;\r\n  }\r\n}\r\n\r\n// Comment out this line if you don't want to start loading the model as soon as the server starts.\r\n// If commented out, the model will be loaded when the first request is received (i.e,. lazily).\r\nMyClassificationPipeline.getInstance();\r\n\r\nasync function main() {\r\n  const classifier = await MyClassificationPipeline.getInstance();\r\n  const res = await classifier('This is an example sentence', { pooling: 'mean', normalize:false });\r\n  fs.writeFileSync('./xenova-embedding.json', JSON.stringify(res.data, null, 2), 'utf-8');\r\n}\r\n\r\nmain();\r\n```\r\n\r\n```python\r\nimport json\r\nfrom sentence_transformers import SentenceTransformer\r\nmodel = SentenceTransformer('sentence-transformers/distiluse-base-multilingual-cased-v2')\r\nembedding = model.encode(\"This is an example sentence\")\r\n\r\nwith open('embeddings.json', 'w') as f:\r\n    json.dump(embedding.tolist(), f)\r\n```\r\n\r\nAm i missing something?",
    "url": "https://github.com/huggingface/transformers.js/issues/486",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-29T10:15:07Z",
    "updated_at": "2024-01-02T12:20:17Z",
    "user": "leodalcin"
  },
  {
    "repo": "huggingface/trl",
    "number": 1155,
    "title": "What is the best way for the inference process in LORA in PEFT approach",
    "body": "Here is the SFTtrainer method i used for finetuning mistral\r\n```\r\ntrainer = SFTTrainer(\r\n    model=peft_model,\r\n    train_dataset=data,\r\n    peft_config=peft_config,\r\n    dataset_text_field=\" column name\",\r\n    max_seq_length=3000,\r\n    tokenizer=tokenizer,\r\n    args=training_arguments,\r\n    packing=packing,\r\n)\r\ntrainer.train()\r\n```\r\nI found different mechanisms for the finetuned model inference after PEFT based LORA finetuning\r\n\r\nMethod - 1\r\n\r\nsave adapter after completing training and then merge with base model then use for inference\r\n```\r\ntrainer.model.save_pretrained(\"new_adapter_path\")\r\nfrom peft import PeftModel\r\nfinetuned_model = PeftModel.from_pretrained(base_model,\r\n                                  new_adapter_path,\r\n                                  torch_dtype=torch.float16,\r\n                                  is_trainable=False,\r\n                                  device_map=\"auto\"\r\n                                  )\r\nfinetuned_model = finetuned_model.merge_and_unload()\r\n``` \r\n\r\nMethod - 2\r\n\r\nsave checkpoints during training and then use the checkpoint with the least loss\r\n```\r\nfrom peft import PeftModel\r\nfinetuned_model = PeftModel.from_pretrained(base_model,\r\n                                  \"least loss checkpoint path\",\r\n                                  torch_dtype=torch.float16,\r\n                                  is_trainable=False,\r\n                                  device_map=\"auto\"\r\n                                  )\r\nfinetuned_model = finetuned_model.merge_and_unload()\r\n``` \r\nMethod - 3\r\n\r\nsame method with AutoPeftModelForCausalLM class \r\n```\r\nmodel = AutoPeftModelForCausalLM.from_pretrained(\r\n    \"output directory checkpoint path\",\r\n    low_cpu_mem_usage=True,\r\n    return_dict=True,\r\n    torch_dtype=torch.float16,\r\n    device_map=\"cuda\")\r\nfinetuned_model = finetuned_model.merge_and_unload()\r\n```\r\nMethod-4\r\n\r\nAutoPeftModelForCausalLM class specifies the output folder without specifying a specific checkpoint\r\n```\r\ninstruction_tuned_model = AutoPeftModelForCausalLM.from_pretrained(\r\n    training_args.output_dir,\r\n    torch_dtype=torch.bfloat16,\r\n    device_map = 'auto',\r\n    trust_remote_code=True,\r\n)\r\nfinetuned_model = finetuned_model.merge_and_unload()\r\n```\r\nMethod-5\r\nAll the above methods without merging\r\n```\r\n#finetuned_model = finetuned_model.merge_and_unload()\r\n```\r\n\r\nWhich is the actual method I should follow for inference?\r\nand when to use which method over another?",
    "url": "https://github.com/huggingface/trl/issues/1155",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-29T09:51:23Z",
    "updated_at": "2024-02-10T15:05:12Z",
    "user": "pradeepdev-1995"
  },
  {
    "repo": "huggingface/peft",
    "number": 1310,
    "title": "What is the best way for the inference process in LORA in PEFT approach",
    "body": "### Feature request\r\n\r\nWhat is the best way for the inference process in LORA in PEFT approach\r\n### Motivation\r\n\r\nWhat is the best way for the inference process in LORA in PEFT approach\r\n### Your contribution\r\n\r\nHere is the SFTtrainer method i used for finetuning mistral\r\n```\r\ntrainer = SFTTrainer(\r\n    model=peft_model,\r\n    train_dataset=data,\r\n    peft_config=peft_config,\r\n    dataset_text_field=\" column name\",\r\n    max_seq_length=3000,\r\n    tokenizer=tokenizer,\r\n    args=training_arguments,\r\n    packing=packing,\r\n)\r\ntrainer.train()\r\n```\r\nI found different mechanisms for the finetuned model inference after PEFT based LORA finetuning\r\n\r\nMethod - 1\r\n\r\nsave adapter after completing training and then merge with base model then use for inference\r\n```\r\ntrainer.model.save_pretrained(\"new_adapter_path\")\r\nfrom peft import PeftModel\r\nfinetuned_model = PeftModel.from_pretrained(base_model,\r\n                                  new_adapter_path,\r\n                                  torch_dtype=torch.float16,\r\n                                  is_trainable=False,\r\n                                  device_map=\"auto\"\r\n                                  )\r\nfinetuned_model = finetuned_model.merge_and_unload()\r\n``` \r\n\r\nMethod - 2\r\n\r\nsave checkpoints during training and then use the checkpoint with the least loss\r\n```\r\nfrom peft import PeftModel\r\nfinetuned_model = PeftModel.from_pretrained(base_model,\r\n                                  \"least loss checkpoint path\",\r\n                                  torch_dtype=torch.float16,\r\n                                  is_trainable=False,\r\n                                  device_map=\"auto\"\r\n                                  )\r\nfinetuned_model = finetuned_model.merge_and_unload()\r\n``` \r\nMethod - 3\r\n\r\nsame method with AutoPeftModelForCausalLM class \r\n```\r\nmodel = AutoPeftModelForCausalLM.from_pretrained(\r\n    \"output directory checkpoint path\",\r\n    low_cpu_mem_usage=True,\r\n    return_dict=True,\r\n    torch_dtype=torch.float16,\r\n    device_map=\"cuda\")\r\nfinetuned_model = finetuned_model.merge_and_unload()\r\n```\r\nMethod-4\r\n\r\nAutoPeftModelForCausalLM class specifies the output folder without specifying a specific checkpoint\r\n```\r\ninstruction_tuned_model = AutoPeftModelForCausalLM.from_pretrained(\r\n    training_args.output_dir,\r\n    torch_dtype=torch.bfloat16,\r\n    device_map = 'auto',\r\n    trust_remote_code=True,\r\n)\r\nfinetuned_model = finetuned_model.merge_and_unload()\r\n```\r\nMethod-5\r\nAll the above methods without merging\r\n```\r\n#finetuned_model = finetuned_model.merge_and_unload()\r\n```\r\n\r\nWhich is the actual method I should follow for inference?\r\nand when to use which method over another?",
    "url": "https://github.com/huggingface/peft/issues/1310",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-29T09:49:55Z",
    "updated_at": "2024-01-02T15:31:23Z",
    "user": "pradeepdev-1995"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6542,
    "title": "Datasets : wikipedia 20220301.en error ",
    "body": "### Describe the bug\n\nWhen I used load_dataset to download this data set, the following error occurred. The main problem was that the target data did not exist.\n\n### Steps to reproduce the bug\n\n1.I tried downloading directly.\r\n```python\r\nwiki_dataset = load_dataset(\"wikipedia\", \"20220301.en\")\r\n```\r\nAn exception occurred\r\n```\r\nMissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/\r\nIf you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory). \r\nExample of usage: \r\n\t`load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')`\r\n```\r\n2.I modified the code as prompted.\r\n```python\r\nwiki_dataset = load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')\r\n```\r\nAn exception occurred:\r\n```\r\nFileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220301/dumpstatus.json\r\n```\r\n\n\n### Expected behavior\n\nI searched in the parent directory of the corresponding URL, but there was no corresponding \"20220301\" directory.\r\nI really need this data set and hope to provide a download method.\n\n### Environment info\n\npython 3.8\r\ndatasets 2.16.0\r\napache-beam 2.52.0\r\ndill 0.3.7\r\n",
    "url": "https://github.com/huggingface/datasets/issues/6542",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-29T08:34:51Z",
    "updated_at": "2024-01-02T13:21:06Z",
    "comments": 2,
    "user": "ppx666"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6384,
    "title": "How to map A1111 reference_only parameters into diffusers?",
    "body": "Thanks for the community to implement the reference_only functionality in A1111, but how can the parameters correspond to each other? I have tried to reproduce the effect of webui in the diffusers library, but I can't seem to do it.  I'm using the StableDiffusionReferencePipeline community pipeline.\r\n\r\nMy questions are:\r\n1. Is reference_only in A1111 equivalent to reference_attn=True, reference_adain=False? \r\n![image](https://github.com/huggingface/diffusers/assets/26246545/634e1501-0ce2-4c19-909f-a59416ba4008)\r\n2. Some parameters in A1111, such as starting control step, seem to have no corresponding parameters in the pipeline.\r\n![image](https://github.com/huggingface/diffusers/assets/26246545/1992c9b3-8d9e-43ee-9ea2-df78f7f5f1b1)\r\n3. The style_fidelity in A111 seems to have significant differences compared to style_fidelity in A1111.",
    "url": "https://github.com/huggingface/diffusers/issues/6384",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-12-29T08:16:15Z",
    "updated_at": "2024-01-28T15:29:43Z",
    "user": "Logos23333"
  },
  {
    "repo": "huggingface/peft",
    "number": 1308,
    "title": "How to check the gradients of lora layers when training a peft model",
    "body": "### Feature request\n\nwhen  I trained a lora model like this\r\n```python\r\nmodel = get_peft_model(model, lora_config)\r\ntraining(model,data)\r\n```\r\nHow can I check the gradients of lora layers from a `peft` model ?\n\n### Motivation\n\ncheck gradients of lora layers from peft model during training\n\n### Your contribution\n\nni",
    "url": "https://github.com/huggingface/peft/issues/1308",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-29T04:26:10Z",
    "updated_at": "2024-01-05T04:55:41Z",
    "user": "stardusts-hj"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2724,
    "title": "\ud83d\udca1 Request - Tutorials for Holistic Trace Analysis",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\n\nAdd tutorials explaining how to use features in Holistic Trace Analysis.\n\n### Existing tutorials on this topic\n\nNone\n\n### Additional context\n\nHTA eases the profiling distributed jobs in PyTorch. In order to introduce HTA to the PyTorch community it would be beneficial to add some tutorials.",
    "url": "https://github.com/pytorch/tutorials/issues/2724",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-28T21:56:27Z",
    "updated_at": "2024-01-02T23:03:08Z",
    "comments": 0,
    "user": "anupambhatnagar"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 484,
    "title": "TypeScript Pipline Types for different models?",
    "body": "### Question\n\nIs there a suggested way to get types for the different models? Right now after I create a pipline, like one of the following:\r\n\r\n```\r\nconst segmenter = await pipeline('image-segmentation', 'Xenova/face-parsing');\r\n// or \r\nconst extractor = await pipeline(`feature-extraction`, `Xenova/UAE-Large-V1`, {\r\n  quantized: true, // Set this to false to use the full (unquantized) model\r\n});\r\n```\r\n\r\nAll the methods and returned values are `(...args: any[]) => any` - finding it hard to work with the methods and returned values.\r\n\r\nI realize each model returns different outputs, and I'm fairly new to the whole convertion process, but are these types kept somewhere in the Python or the json files with the model that could be used as typescript types? \r\n\r\nIdeally `pipeline` would infer the types, but I'm also ok with importing (or generating the types myself) and using it as a generic:\r\n\r\n```\r\nconst whateve = pipeline<ReturnType>(`task`, `model`)\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/484",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-28T21:16:05Z",
    "updated_at": "2024-01-02T15:08:47Z",
    "user": "wesbos"
  },
  {
    "repo": "huggingface/optimum-neuron",
    "number": 395,
    "title": "How to use generate() with inputs_embeds",
    "body": "I hope this is the right place to ask this question. Let me know if I need to move to another repo.\r\n\r\nCurrently I'm using `NeuronModelForCausalLM`.\r\n\r\nI have a use case where I need to be able to do the following:\r\n\r\n1. Generate embedding tokens\r\n2. Modify embedding tokens\r\n3. Run inference from modified embedding tokens\r\n\r\nI am able to do steps 1 & 2 currently using the following:\r\n```\r\nfrom optimum.neuron import NeuronModelForCausalLM\r\n\r\nllama_model = NeuronModelForCausalLM.from_pretrained('aws-neuron/Llama-2-7b-chat-hf-seqlen-2048-bs-1')\r\n\r\nembedded_tokens = llama_model.model.chkpt_model.model.embed_tokens(token_ids)\r\n\r\n### Code to modify embedded_tokens\r\n```\r\n\r\nHowever, as far as I can tell, generation with these modified tokens is not possible with `llama_model.generate()`\r\n\r\nWhen I use the 'input_embeds' keyword argument, and set `input_ids=None`, I get the following:\r\n```\r\nValueError: The following `model_kwargs` are not used by the model: ['inputs_embeds']\r\n```\r\n\r\nIf this is not possible with the NeuronModelForCausalLM.generate() currently, is there a way to work around this manually? If so, could you provide an example?\r\n\r\nThanks very much for your help! ",
    "url": "https://github.com/huggingface/optimum-neuron/issues/395",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-12-28T18:28:28Z",
    "updated_at": "2024-10-31T08:04:57Z",
    "user": "liechtym"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 483,
    "title": "Unrecognized token '<' when running",
    "body": "### Question\r\n\r\nI downloaded the react translation example. When I start the app everything seems to render fine, but as soon as I press translate, nothing happens and I get this error in the console on the browser: \r\n`Unhandled Promise Rejection: SyntaxError: JSON Parse error: Unrecognized token '<'`\r\n\r\nI've gotten this same issue trying to run other models keeping things very basic as found here: https://huggingface.co/docs/transformers.js/pipelines\r\n\r\nUPDATE: This error only happens in Safari, but it works fine in Chrome. \r\n\r\nIf I try to make the simplest example with react like in the tutorial link it fails in both chrome and safari",
    "url": "https://github.com/huggingface/transformers.js/issues/483",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-28T14:44:50Z",
    "updated_at": "2023-12-28T20:35:02Z",
    "user": "philg-204"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 482,
    "title": "How tot get the same output as the python library for the Resnet Model ?",
    "body": "### Question\r\n\r\nHi,\r\nI am trying to translate a python script to use it in my node server. Currently, I spawn a process to execute the python code, but I would like to improve response time by using the transformers.js version.\r\n\r\nMy problem is that I don't have the same output with the two codes. \r\n\r\nThe python output is a vector of dimension 2048\r\nThe js output is a vector of dimension 1000\r\n\r\nIt seems that my code has a problem as soon as the ImageProcessor step because the `inputs` are not equal\r\n\r\n\r\nPython code : \r\n```python\r\nimport torch\r\nfrom transformers import logging\r\n\r\nlogging.set_verbosity_error()\r\n\r\nfrom PIL import Image\r\n\r\n\r\nclass ImgToVec:\r\n    def __init__(self, pretrained_model=\"microsoft/resnet-50\"):\r\n        from transformers import AutoImageProcessor, ResNetModel\r\n\r\n        self.pretrained_model = pretrained_model\r\n        self.device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\r\n\r\n        self.image_processor = AutoImageProcessor.from_pretrained(pretrained_model)\r\n        self.model = ResNetModel.from_pretrained(pretrained_model).to(self.device)\r\n\r\n    def get_embedding(self, file):\r\n        im = Image.open(file)\r\n        inputs = self.image_processor(im, return_tensors=\"pt\").to(self.device)\r\n\r\n        print(f\"inputs : {inputs} dimensiosn : {inputs['pixel_values'].size()}\")\r\n        with torch.no_grad():\r\n            outputs = self.model(**inputs)\r\n        return outputs.pooler_output[0, :, 0, 0].tolist()\r\n\r\n# https://cdn-lfs.huggingface.co/repos/cf/db/cfdbeec4acf4145f96e47e07a9e161cade4dbce7cfad3ba24765bf1713d53ef3/d65b6f72943d5e2d4f7e5e4dedfb93aea0fbbda140ae7c3ee772124b579e07c4?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27football-match.jpg%3B+filename%3D%22football-match.jpg%22%3B&response-content-type=image%2Fjpeg&Expires=1704020059&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcwNDAyMDA1OX19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy5odWdnaW5nZmFjZS5jby9yZXBvcy9jZi9kYi9jZmRiZWVjNGFjZjQxNDVmOTZlNDdlMDdhOWUxNjFjYWRlNGRiY2U3Y2ZhZDNiYTI0NzY1YmYxNzEzZDUzZWYzL2Q2NWI2ZjcyOTQzZDVlMmQ0ZjdlNWU0ZGVkZmI5M2FlYTBmYmJkYTE0MGFlN2MzZWU3NzIxMjRiNTc5ZTA3YzQ%7EcmVzcG9uc2UtY29udGVudC1kaXNwb3NpdGlvbj0qJnJlc3BvbnNlLWNvbnRlbnQtdHlwZT0qIn1dfQ__&Signature=kWwcSkWcf8K62Tgr57HYD5VObZuozl3Jf%7EHV5alcyRA-gvbREfzgjMKU9rVOc84r0uwo9d3f-si-PoJ3GdyB8WObJFJWF0nE9SX5C-f3Nookj4SWevcJkLNgF27KqUPMhWWZ8B3KjEDvcxPirjHfc4fv87-uM%7EQIuazixgu0i8lXpzeSyKdZGNIc3zUG-hDzU3EKCGBWbwnGG9Yq%7Evz%7Eit-vvYc7i1AoYTAteZUP1ngDdywjwNf6VvvGqmyBdMcwVDiA0ShwAhW9Z3mqt%7EVz6HaYipWejY0mWmyVhyCWFtJOe9yrk%7ETJKr5cOV3yq6sM0jSheh3GuSd%7E2qYzjBsDVQ__&Key-Pair-Id=KVTP0A1DKRTAX\r\n\r\nresult = ImgToVec(\"microsoft/resnet-50\").get_embedding(\"./football-match.jpg\")\r\n```\r\n\r\nMy JS code : \r\n```ts\r\nclass ImgToVec {\r\n  public async getEmbedding(\r\n    file: string,\r\n    pretrainedModel = 'Xenova/resnet-50',\r\n  ): Promise<number[]> {\r\n    const { ResNetForImageClassification, AutoProcessor, RawImage } =\r\n      await import('@xenova/transformers');\r\n\r\n    const model = await ResNetForImageClassification.from_pretrained(\r\n      pretrainedModel,\r\n    );\r\n    const imageProcessor = await AutoProcessor.from_pretrained(pretrainedModel);\r\n\r\n    const image = await RawImage.read(file);\r\n\r\n    const inputs = await imageProcessor(image);\r\n\r\n    const outputs = await model(inputs, { config: { embeddingSize: 2048 } });\r\n\r\n    console.log('inputs', inputs);\r\n\r\n    const embedding: number[] = outputs.data;\r\n\r\n    return embedding;\r\n  }\r\n}\r\n\r\nconst imgToVec = new ImgToVec();\r\n\r\n// https://cdn-lfs.huggingface.co/repos/cf/db/cfdbeec4acf4145f96e47e07a9e161cade4dbce7cfad3ba24765bf1713d53ef3/d65b6f72943d5e2d4f7e5e4dedfb93aea0fbbda140ae7c3ee772124b579e07c4?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27football-match.jpg%3B+filename%3D%22football-match.jpg%22%3B&response-content-type=image%2Fjpeg&Expires=1704020059&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcwNDAyMDA1OX19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy5odWdnaW5nZmFjZS5jby9yZXBvcy9jZi9kYi9jZmRiZWVjNGFjZjQxNDVmOTZlNDdlMDdhOWUxNjFjYWRlNGRiY2U3Y2ZhZDNiYTI0NzY1YmYxNzEzZDUzZWYzL2Q2NWI2ZjcyOTQzZDVlMmQ0ZjdlNWU0ZGVkZmI5M2FlYTBmYmJkYTE0MGFlN2MzZWU3NzIxMjRiNTc5ZTA3YzQ%7EcmVzcG9uc2UtY29udGVudC1kaXNwb3NpdGlvbj0qJnJlc3BvbnNlLWNvbnRlbnQtdHlwZT0qIn1dfQ__&Signature=kWwcSkWcf8K62Tgr57HYD5VObZuozl3Jf%7EHV5alcyRA-gvbREfzgjMKU9rVOc84r0uwo9d3f-si-PoJ3GdyB8WObJFJWF0nE9SX5C-f3Nookj4SWevcJkLNgF27KqUPMhWWZ8B3KjEDvcxPirjHfc4fv87-uM%7EQIuazixgu0i8lXpzeSyKdZGNIc3zUG-hDzU3EKCGBWbwnGG9Yq%7Evz%7Eit-vvYc7i1AoYTAteZUP1ngDdywjwNf6VvvGqmyBdMcwVDiA0ShwAhW9Z3mqt%7EVz6HaYipWejY0mWmyVhyCWFtJOe9yrk%7ETJKr5cOV3yq6sM0jSheh3GuSd%7E2qYzjBsDVQ__&Key-Pair-Id=KVTP0A1DKRTAX\r\nimgToVec.getEmbedding('./football-match.jpg').then((embedding) => {\r\n  console.log(embedding);\r\n});\r\n\r\n```\r\n\r\nAny ideas how to solve my problem please ?",
    "url": "https://github.com/huggingface/transformers.js/issues/482",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-28T11:38:20Z",
    "updated_at": "2024-01-10T15:04:22Z",
    "user": "Spoutnik97"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6370,
    "title": "How to use diffusers lora in the AUTOMATIC1111 ",
    "body": "Thanks for your great work, I use the train_text_to_image_lora_sdxl.py to train my custom dataset and get these output, And I get the good result. But I want to use the AUTOMATIC1111 to use the lora weight, I move the pytorch_lora_weights to the AUTOMATIC1111 lora folder But get the error report:`AssertionError: conversion failed: lora_unet_input_blocks_4_1_transformer_blocks_0_attn1_to_k_lora_A_weight. the model may not be trained by `sd-scripts``\r\n![image](https://github.com/huggingface/diffusers/assets/18145013/561a8450-af71-460f-a091-78eb96dcea20)\r\nhow can I do to convert the lora model weight to which format  AUTOMATIC1111 can accpet.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/6370",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-28T06:17:19Z",
    "updated_at": "2024-01-02T13:38:26Z",
    "user": "chongxian"
  },
  {
    "repo": "huggingface/computer-vision-course",
    "number": 163,
    "title": "How to include \"What you'll learn\" section for this course?",
    "body": "Hello everyone, \r\nOur PR for Fundamentals of Computer Vision was merged a few days back. After that, one thing we still need to acknowledge based on your [feedback](https://github.com/johko/computer-vision-course/issues/38#issuecomment-1764502604) on our chapter outline is building a demo using Gradio to give learners a taste of what they'll learn. One of our teammates, @aman06012003 , created a simple [Cat vs Dog classifier deployed it on Hugging face spaces](https://ak0601-cat-dog-classifier.hf.space/), which we want you to take a look at and give feedback.\r\n\r\nOnce the demo is finalized, there are two ways to include it, referring to the [Hugging Face Audio Course](https://huggingface.co/learn/audio-course/chapter0/introduction). One is to create a new .mdx file in our fundamentals folder. The other is to create a new chapter - Welcome to the course, where we add what you'll learn, community notes, etc. We are still determining the optimal path, so please guide us. \r\n\r\nTeam members - @seshu-pavan , @bellabf , @aman06012003 \r\nbcc - @MKhalusova @johko @merveenoyan @lunarflu \r\n\r\nBest, \r\nFundamentals team ",
    "url": "https://github.com/huggingface/computer-vision-course/issues/163",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-27T12:41:26Z",
    "updated_at": "2024-04-26T13:36:59Z",
    "user": "seshupavan"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28260,
    "title": "How to set pad_token of Llava for batched generation and training?",
    "body": "Hello, @younesbelkada I'm trying to use Llava for batched generation, using the default pad_token. here is the script:\r\n```python\r\nimport json\r\nfrom PIL import Image\r\nfrom transformers import AutoProcessor, LlavaForConditionalGeneration,AutoTokenizer\r\nfrom torch.utils.data import Dataset,DataLoader\r\nimport torch\r\nimport os\r\nfrom tqdm import tqdm\r\nDATA_ROOT = \"/mnt/gozhang/code/LLaVA/playground/data/eval/mm-vet\"\r\nprocessor = AutoProcessor.from_pretrained(\"/mnt/gozhang/ckpts/llava-1.5-7b-hf\")\r\ntokenizer = AutoTokenizer.from_pretrained(\"/mnt/gozhang/ckpts/llava-1.5-7b-hf\")\r\n\r\nclass MMVetDataset(Dataset):\r\n    def __init__(self,data_root) -> None:\r\n        super().__init__()\r\n        self.data_root = data_root\r\n        with open(os.path.join(data_root, \"mm-vet.json\"), \"r\") as f:\r\n            data = json.load(f)\r\n        self.data = [(k,v) for k,v in data.items()]\r\n    def __len__(self):\r\n        return len(self.data)\r\n\r\n    def __getitem__(self, index):\r\n        return {'id':self.data[index][0],\r\n                'image':os.path.join(self.data_root,'images',self.data[index][1]['imagename']),\r\n                'question':\"USER: <image>\\n\"+self.data[index][1]['question']+\" ASSISTANT:\"}\r\n\r\ndef collator(batch):\r\n    ids = [b['id'] for b in batch]\r\n    questions = [b['question'] for b in batch]\r\n    images = [Image.open(b['image']) for b in batch]\r\n    inputs = processor(text=questions,images=images,return_tensors=\"pt\",padding=True)\r\n    return ids,inputs\r\n\r\nmodel = LlavaForConditionalGeneration.from_pretrained(\"/mnt/gozhang/ckpts/llava-1.5-7b-hf\",torch_dtype=torch.float16)\r\nmodel.to('cuda')\r\n#model.to(torch.float16)\r\ndataset = MMVetDataset(DATA_ROOT)\r\ndataloader = DataLoader(dataset,batch_size=16,collate_fn=collator)\r\nresults = {}\r\nbar = tqdm(total=len(dataset))\r\nmodel.eval()\r\nwith torch.inference_mode():\r\n    for ids, inputs in dataloader:\r\n        inputs.to('cuda')\r\n        inputs['pixel_values'] = inputs['pixel_values'].half()\r\n        outputs = model.generate(**inputs,temperature=0.2,do_sample=True,max_new_tokens=1024,use_cache=True)\r\n        input_token_len = inputs['input_ids'].shape[1]\r\n        responses=tokenizer.batch_decode(outputs[:, input_token_len:], skip_special_tokens=True, clean_up_tokenization_spaces=False)\r\n        for id,res in zip(ids,responses):\r\n            results[id]=res\r\n        bar.update(len(responses))\r\nwith open('mmvet_result.json','w') as f:\r\n    json.dump(results,f,indent=4)\r\n```\r\nBut when generating the fifth batch, it reports `RuntimeError: probability tensor contains either inf, nan or element < 0`. Then I try different pad_token, setting `processor.tokenizer.pad_token = processor.tokenizer.unk_token` (following the raw llava codebase), or `processor.tokenizer.pad_token = processor.tokenizer.eos_token`(following the common setting), or `processor.tokenizer.pad_token = processor.tokenizer.bos_token`(following this [issue](https://discuss.huggingface.co/t/llama2-pad-token-for-batched-inference/48020)). And I find that only setting pad_token to eos_token can avoid the error. \r\nI wonder what's the effect of different pad_token during batched generation, and what's the root cause of this error, and how to set the correct pad_token for training the model?",
    "url": "https://github.com/huggingface/transformers/issues/28260",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-27T12:17:02Z",
    "updated_at": "2024-02-05T02:43:32Z",
    "user": "TideDra"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28259,
    "title": "How to add new merge rules in AutoTokenizer",
    "body": "### Model description\n\nI'm training new tokenizer from llama2, however, it seems that BPE tokenizer will clear the origin \"vocab\" and \"merge\" dict, and the training result is highly bias in my own datasets (about 6M C function) with some ugly tokens.\r\n\r\nI wonder that is it possible to train a tokenizer from llama2 with the origin \"vocab\" and \"merge\" dict unchanged, only add some new vocab and merge rules from our datasets to support my requirement?\r\n\n\n### Open source status\n\n- [ ] The model implementation is available\n- [ ] The model weights are available\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/transformers/issues/28259",
    "state": "open",
    "labels": [
      "New model"
    ],
    "created_at": "2023-12-27T12:15:26Z",
    "updated_at": "2023-12-27T12:15:26Z",
    "user": "Sandspeare"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2289,
    "title": "[QUESTION] why stage3_gather_16bit_weights_on_model_save is set to false no matter what value of it in deepspeed config",
    "body": "[`accelerator._prepare_deepspeed()`](https://github.com/huggingface/accelerate/blob/d08c23c20975f39393b431143237c193733e7bb8/src/accelerate/accelerator.py#L1464C13-L1464C82) looks to force the `stage3_gather_16bit_weights_on_model_save` to `false`, which should raise an exception in [`accelerator.get_state_dict()`](https://github.com/huggingface/accelerate/blob/d08c23c20975f39393b431143237c193733e7bb8/src/accelerate/accelerator.py#L2985C17-L2985C68). Additionally, [`trainer.save_model()`](https://github.com/huggingface/transformers/blob/c48787f347bd604f656c2cfff730e029c8f8c1fe/src/transformers/trainer.py#L2827C17-L2827C77) invoke above function, then catch this exception and raise another exception. Yet, the log seems totally fine. I'm confused... Why this happened?",
    "url": "https://github.com/huggingface/accelerate/issues/2289",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-27T10:04:28Z",
    "updated_at": "2024-01-05T06:59:16Z",
    "user": "LaniakeaS"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6352,
    "title": "how to choose save precision for lora file in training",
    "body": "I'm confused about my lora precision(fp16,bf16,float) and whether i can choose precision about my lora weights. I searched for the params about the **StableDiffusionXLPipeline.save_lora_weights** function used to save lora in sdxl text2img training script and didnt find params like 'save_precision' or sth.\r\n\r\nanyone can help? thanks!\r\n\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/6352",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-27T09:02:47Z",
    "updated_at": "2023-12-28T08:21:29Z",
    "user": "DoctorTar"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 481,
    "title": "Why do certain models not load?",
    "body": "### Question\n\nI was keen to try:\r\n\r\nhttps://huggingface.co/upstage/SOLAR-10.7B-Instruct-v1.0\r\n\r\nI tried:\r\n\r\n```ts\r\nimport {\r\n  AutoModelForCausalLM,\r\n  AutoTokenizer,\r\n} from '@xenova/transformers';\r\n\r\nconst autoTokenizer = await AutoTokenizer.from_pretrained(\r\n  'Upstage/SOLAR-10.7B-Instruct-v1.0',\r\n);\r\n\r\nconst model = await AutoModelForCausalLM.from_pretrained(\r\n  'Upstage/SOLAR-10.7B-Instruct-v1.0',\r\n);\r\n```\r\n\r\nBut it fails with an error:\r\n\r\n```ts\r\nError: Could not locate file: \"https://huggingface.co/Upstage/SOLAR-10.7B-Instruct-v1.0/resolve/main/onnx/decoder_model_merged_quantized.onnx\".\r\n```\r\n\r\nIs this an error on my side, is the model incompatible, ... ?",
    "url": "https://github.com/huggingface/transformers.js/issues/481",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-27T01:44:52Z",
    "updated_at": "2024-05-10T18:21:57Z",
    "user": "adaboese"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2558,
    "title": "How to set the input when compiling model for non-image input?",
    "body": "Hi, I have trained a model whose input is a set of 3D points with a shape `Nx3`, N is not a fixed number. In this case, how to set the input during compiling my model? \r\n\r\nFor image, the input shape is like this:\r\n```\r\ninputs = [torch.randn((1, 3, 224, 224)).to(\"cuda\").half()]\r\n```\r\n\r\nWhat if for my case? Thank you!\n```[tasklist]\n### Tasks\n```\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2558",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-26T12:34:22Z",
    "updated_at": "2023-12-27T18:20:31Z",
    "user": "DeepDuke"
  },
  {
    "repo": "huggingface/peft",
    "number": 1298,
    "title": "[Question] What is the main difference between \"modules_to_save\" and \"target_modules\"?",
    "body": "Hi, in my work I need to add some special token to LLAMA, so I need to train the parameter of [\"embed_tokens\", \"lm_head\"] for both layers, what confuses me is that should I add this parameter to LoraConfig's \"modules_to_save \" or \"target_modules\"? Looking forward to your reply!",
    "url": "https://github.com/huggingface/peft/issues/1298",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-26T07:37:05Z",
    "updated_at": "2024-02-03T15:03:27Z",
    "user": "SatireY"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6534,
    "title": "How to configure multiple folders in the same zip package",
    "body": "How should I write \"config\" in readme when all the data, such as train test, is in a zip file\r\n\r\ntrain floder and test floder in data.zip",
    "url": "https://github.com/huggingface/datasets/issues/6534",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-26T03:56:20Z",
    "updated_at": "2023-12-26T06:31:16Z",
    "user": "d710055071"
  },
  {
    "repo": "pytorch/xla",
    "number": 6234,
    "title": "How to judge the input parameters in an hlo graph, which is the weight of the model",
    "body": "## \u2753 Questions and Help\r\nHow to judge the input parameters in an hlo graph, which is the weight of the model (that is, the parameters saved by the model and the parameters thought of the model training), is there any good way to judge it in C++ torch xla source code?\r\n  \r\n  for example: (one model of only linear Op) \r\n  I want to find out the linear bias and weith. In here,   %arg0: bias and   %arg1: weight .\r\n\r\n```\r\n   func.func @main(%arg0: tensor<5xf32>, %arg1: tensor<5x10xf32>, %arg2: tensor<1x10xf32>, %arg3: tensor<1x5xf32>) -> tuple<tensor<1x5xf32>, tensor<f32>> {\r\n    %0 = mhlo.reshape %arg0 : (tensor<5xf32>) -> tensor<1x5xf32>\r\n    %1 = \"mhlo.transpose\"(%arg1) {permutation = dense<[1, 0]> : tensor<2xi64>, xla_shape = \"f32[10,5]{0,1}\"} : (tensor<5x10xf32>) -> tensor<10x5xf32>\r\n    %2 = \"mhlo.fusion\"(%0, %arg2, %1) ({\r\n    ^bb0(%arg4: tensor<1x5xf32>, %arg5: tensor<1x10xf32>, %arg6: tensor<10x5xf32>):\r\n      %10 = \"mhlo.dot\"(%arg5, %arg6) {precision_config = [#mhlo<precision DEFAULT>, #mhlo<precision DEFAULT>]} : (tensor<1x10xf32>, tensor<10x5xf32>) -> tensor<1x5xf32>\r\n      %11 = mhlo.add %10, %arg4 : tensor<1x5xf32>\r\n      mhlo.return %11 : tensor<1x5xf32>\r\n    }) {fusion_kind = #mhlo<fusion_kind kLoop>} : (tensor<1x5xf32>, tensor<1x10xf32>, tensor<10x5xf32>) -> tensor<1x5xf32>  \r\n    %3 = mhlo.subtract %2, %arg3 : tensor<1x5xf32>\r\n    %4 = mhlo.multiply %3, %3 : tensor<1x5xf32>\r\n    %5 = mhlo.constant dense<0.000000e+00> : tensor<f32>\r\n    %6 = mhlo.reduce(%4 init: %5) across dimensions = [0, 1] : (tensor<1x5xf32>, tensor<f32>) -> tensor<f32>\r\n     reducer(%arg4: tensor<f32>, %arg5: tensor<f32>)  {\r\n      %10 = mhlo.add %arg4, %arg5 : tensor<f32>\r\n      mhlo.return %10 : tensor<f32>\r\n    }\r\n    %7 = mhlo.constant dense<2.000000e-01> : tensor<f32>\r\n    %8 = mhlo.multiply %6, %7 : tensor<f32>   \r\n    %9 = \"mhlo.tuple\"(%2, %8) {xla_shape = \"(f32[1,5]{1,0}, f32[])\"} : (tensor<1x5xf32>, tensor<f32>) -> tuple<tensor<1x5xf32>, tensor<f32>>\r\n    return %9 : tuple<tensor<1x5xf32>, tensor<f32>>\r\n  }\r\n```",
    "url": "https://github.com/pytorch/xla/issues/6234",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-25T09:22:28Z",
    "updated_at": "2024-01-24T06:22:24Z",
    "user": "ckfgihub"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2557,
    "title": "\u2753 [Question] a10 performance drop significantly",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\nI converted the gfpgan model (https://github.com/TencentARC/GFPGAN) with torch_tensorrt, and I found torch_tensorrt is twice as fast as torch in 3070. But in one a10 server, torch_tensorrt and torch are closed; In other a10 server,  torch_tensorrt is even twice as slow as torch. Statics shows below. \uff08two type of a10 from two difference cloud server\uff09.\r\n\r\n| GPU | CPU | CPU core | CPU freq | memory | inference framework | CPU usage | memory usage | GPU usage | inference time |\r\n|------------|---------|----------|---------|----------|------|-----------|-----------|----------|----------|\r\n| 3070      | AMD Ryzen 7 5800X 8-Core Processor | 16 | 2200-3800MHz | 32G | pytorch | 30-35% | 160-170% | 13.5g 987.7m | 33.889511s |\r\n| 3070      | | | | | torch_tensorrt | 15-20% | 180-200% | 11.7g 1.1g | 16.259879s |\r\n| a10\uff08v1\uff09 | Intel (R) Xeon (R) Platinum 8350C CPU @ 2.60GHz | 28 | 2593MHz | 112G | pytorch | 25-30% | 190-200% | 15.1g 1.2g | 33.933190s |\r\n| a10\uff08v1\uff09 | | | | | torch_tensorrt | 15-20% | 190-200% | 13.0g 1.2g | 31.899047s |\r\n| a10\uff08v2\uff09| Intel(R) Xeon(R) Platinum 8336C CPU @ 2.30GHz | 28 | 2300-4600MHz | 112G | pytorch | 20-30% | 180-200% | 15.1g 1.0g | 34.027398s |\r\n| a10\uff08v2\uff09| | | | |  torch_tensorrt | 10-15% | 160-170% | 13.1g 1.1g | 66.498723s |\r\n\r\nI also tried torch2trt(https://github.com/NVIDIA-AI-IOT/torch2trt) and fixed some op error, finding it's twice as fast as torch_tensorrt in 3070. And performance didn't drop so strangely in a10 server.\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): nvcr.io/nvidia/pytorch:23.08-py3 \r\n - CPU Architecture: as above\r\n - OS (e.g., Linux): linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): docker\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:  as above\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2557",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-25T08:54:43Z",
    "updated_at": "2024-01-05T02:12:17Z",
    "user": "ArtemisZGL"
  },
  {
    "repo": "huggingface/trl",
    "number": 1140,
    "title": "How to additional finetune with new data from previous adapter ?",
    "body": "Hi All, I have question about finetune. Currently I use SFTtrainer for finetuning Llama2-7b-chat model and save it in adapter format. The question is, In case of I want to additional finetune with new data from previous adapter, How I could to do. Normally I additional finetune by merge adapter with base model before finetune it. I'm not sure my method that i do is correct or not. Or have any other method that easily more than this.\r\nThank",
    "url": "https://github.com/huggingface/trl/issues/1140",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-25T04:19:34Z",
    "updated_at": "2024-02-01T15:05:24Z",
    "user": "SiraHaruethaipree"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1613,
    "title": "Convert opus translation to onnx and run inference from it",
    "body": "To convert I use this snippet\r\n```\r\nfrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM\r\nfrom transformers.models.marian import MarianOnnxConfig\r\nimport onnxruntime as ort\r\nmodel_ckpt = \"Helsinki-NLP/opus-mt-en-zh\"\r\ntokenizer = AutoTokenizer.from_pretrained(model_ckpt)\r\nref_model = AutoModelForSeq2SeqLM.from_pretrained(model_ckpt)\r\nfeature = \"seq2seq-lm\"\r\nonnx_path = f\"onnx/{model_ckpt}-{feature}/\"\r\n\r\n!python -m transformers.onnx --model={model_ckpt} --atol=1e-4 --feature={feature} {onnx_path}\r\n```\r\n\r\nTo inference (which is not running) I use this snippet\r\n```\r\nimport torch\r\nfrom transformers import AutoTokenizer, pipeline\r\nfrom optimum.onnxruntime import ORTModelForSeq2SeqLM\r\n\r\nmodel = ORTModelForSeq2SeqLM.from_pretrained(\"./onnx/Helsinki-NLP/opus-mt-en-zh-seq2seq-lm\")\r\n```\r\n\r\nThe error is \r\n```\r\nFileNotFoundError: Could not find any ONNX model file for the regex ['(.*)?decoder(.*)?with_past(.*)?\\\\.onnx'] \r\n```\r\n\r\nMaybe it tries to find model.onnx but in the folder there are 2 onnx :  decoder_model.onnx and encoder_model.onnx\r\n\r\nI think the snippet is from 2022, Is there any changes ? \r\nThanks",
    "url": "https://github.com/huggingface/optimum/issues/1613",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-25T04:04:47Z",
    "updated_at": "2025-04-29T01:45:20Z",
    "comments": 5,
    "user": "x4080"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 658,
    "title": "chat-ui do not support TGI http url when deploy publicly",
    "body": "hi @nsarrazin, the chat-ui works well locally\r\n~~~\r\n# .env.local\r\nendpoints: [{\"type\":\"tgi\",\"url\":\"http://127.0.0.1:8080/generate_stream\"}]\r\n~~~\r\n\r\nbut if deploy it in public, when chat from the external brower, get the 403 error:\r\n~~~\r\n403\r\nYou don't have access to this conversation. If someone gave you this link, ask them to use the 'share' feature instead.\r\n~~~\r\n\r\nthis issue may be related this issue https://github.com/huggingface/chat-ui/issues/364\r\n\r\nit seems that: chat-ui only support the https url, but the TGI only support the http url. it has conflicts. how to fix this? \r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/658",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-25T03:08:10Z",
    "updated_at": "2024-04-25T16:27:52Z",
    "comments": 1,
    "user": "walkacross"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 475,
    "title": "How to use your own models",
    "body": "### Question\n\nHey I really appreciate your work here!\r\n\r\nI'm very interested in setting up a perfect RAG pipeline / flow and therefore I need a good document extraction with table-transformers and layout detection. \r\n\r\nExample : \r\nhttps://github.com/deepdoctection/deepdoctection\r\n\r\nWhere I'd use \r\nhttps://huggingface.co/microsoft/layoutlmv3-base\r\n\r\nhttps://huggingface.co/microsoft/table-transformer-detection\r\n\r\nI could ask you if would add one of these but I want to try it myself.\r\nAs I understood I can use your script and deploy it on my huggingface.co so I could consume it, is this right? \r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/475",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-24T21:38:02Z",
    "updated_at": "2024-05-15T09:32:26Z",
    "user": "DomEscobar"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6530,
    "title": "Impossible to save a mapped dataset to disk",
    "body": "### Describe the bug\r\n\r\nI want to play around with different hyperparameters when training but don't want to re-map my dataset with 3 million samples each time for tens of hours when I [fully fine-tune SDXL](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_sdxl.py).\r\n\r\nAfter I do the mapping like this:\r\n```\r\ntrain_dataset = train_dataset.map(compute_embeddings_fn, batched=True)\r\ntrain_dataset = train_dataset.map(\r\n    compute_vae_encodings_fn,\r\n    batched=True,\r\n    batch_size=16,\r\n)\r\n```\r\nand try to save it like this:\r\n`train_dataset.save_to_disk(\"test\")`\r\ni get this error ([full traceback](https://pastebin.com/kq3vt739)):\r\n```\r\nTypeError: Object of type function is not JSON serializable\r\nThe format kwargs must be JSON serializable, but key 'transform' isn't.\r\n```\r\n\r\nBut what is interesting is that pushing to hub works like that:\r\n`train_dataset.push_to_hub(\"kopyl/mapped-833-icons-sdxl-1024-dataset\", token=True)`\r\nHere is the link of the pushed dataset: https://huggingface.co/datasets/kopyl/mapped-833-icons-sdxl-1024-dataset\r\n\r\n### Steps to reproduce the bug\r\n\r\nHere is the self-contained notebook:\r\n\r\nhttps://colab.research.google.com/drive/1RtCsEMVcwWcMwlWURk_cj_9xUBHz065M?usp=sharing\r\n\r\n### Expected behavior\r\n\r\nIt should be easily saved to disk\r\n\r\n### Environment info\r\n\r\nNVIDIA A100, Linux (NC24ads A100 v4 from Azure), CUDA 12.2.\r\n\r\n[pip freeze](https://pastebin.com/QTNb6iru)",
    "url": "https://github.com/huggingface/datasets/issues/6530",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-23T15:18:27Z",
    "updated_at": "2023-12-24T09:40:30Z",
    "comments": 1,
    "user": "kopyl"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2392,
    "title": "util.paraphrase_mining returning scores only above 0.98",
    "body": "Hey,\r\nI'm using util.paraphrase_mining (sentence-transformers v2.2.2) to get similarity scores (cosine) in a corpus of ~20k texts with the encoder model being all-MiniLM-L6-v2 and with the parameters query_chunk_size=500, corpus_chunk_size=1000, top_k=500000, max_pairs=5000000. \r\nThe returned list of triplets contain scores only above 0.98. I was wondering why the lower scores don't appear. \r\nThanks in advance for your answer!",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2392",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-23T13:00:27Z",
    "updated_at": "2024-01-29T14:20:33Z",
    "user": "sinangokce"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 656,
    "title": "Web Search failed with \"Invalid URL\"",
    "body": "![image](https://github.com/huggingface/chat-ui/assets/4380009/229430b6-6d10-495f-be66-c5bc54f6061d)\r\n\r\nWhy is this happening?  It seems to happen regardless of whether I have USE_LOCAL_WEBSEARCH set to true or false.\r\n```\r\nSERPAPI_KEY=<my key>\r\nUSE_LOCAL_WEBSEARCH=true\r\n\r\nMODELS=`[\r\n    {\r\n      \"name\": \"mistralai/Mixtral-8x7b-Instruct-v0.1\",\r\n      \"displayName\": \"mistralai/Mixtral-8x7b-Instruct-v0.1\",\r\n      \"description\": \"Mixtral-8x7b-Instruct-v0.1 is a state of the art language model, based on a mixture of experts, that outperforms ChatGPT.\",\r\n      \"websiteUrl\": \"https://www.aaprintsupplyco.com\",\r\n      \"preprompt\": \"\",\r\n      \"chatPromptTemplate\" : \"<s>{{#each messages}}{{#ifUser}}[INST] {{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\\n{{/if}}{{/if}}{{content}} [/INST]{{/ifUser}}{{#ifAssistant}}{{content}}</s>{{/ifAssistant}}{{/each}}\",\r\n      \"parameters\": {\r\n        \"temperature\": 0.4,\r\n        \"top_p\": 0.95,\r\n        \"top_k\": 50,\r\n        \"truncate\": 31768,\r\n        \"max_new_tokens\": 2048,\r\n        \"stop\": [\"[INST]\",\"</s>\"]\r\n      },\r\n      \"endpoints\" : [{\r\n        \"type\": \"openai\",\r\n        \"baseURL\": \"https://api.together.xyz/v1\"\r\n      }],\r\n      \"promptExamples\": [\r\n        {\r\n          \"title\": \"Write a blog post\",\r\n          \"prompt\": \"Your goal is to help me create a compelling blog post about a topic.\\nYou will follow the following process:\\n\\n1. Ask me for the topic of the blog post.\\n2. After I provide my answer you will need to collect some additional information by going through the next steps:\\na) Questions (ask any relevant questions pertaining to what additional information is needed from me to write a good blog post).\\n\\nOnce you have enough information, or once I say I am done, you will write the blog post.\"\r\n        }, {\r\n          \"title\": \"Improve my English\",\r\n          \"prompt\": \"I want you to act as an English grammar and spelling corrector and improver. I will speak to you and you will answer in the corrected and improved version of my text, in English. I want you to replace my simplified A0-level words and sentences with improved, higher level English words and sentences. Keep the meaning same, but make them sound better. I want you to only reply the correction, the improvements and nothing else, do not write explanations. If there is nothing to improve, just reply with the original text.\"\r\n        }, {\r\n          \"title\": \"Assist in a task\",\r\n          \"prompt\": \"I want you to be my Prompt engineer. Your goal is to help me craft the best possible instruction prompt for my needs. The prompt will be used by you, an AI model. You will follow the following process:\\n\\n1. Your first response will be to simply ask me what the task I want to accomplish. \\n2. After I provide my answer and you will generate a first iteration of the prompt, but we will need to improve it through continual iterations by going through the next steps. You will generate two sections:\\na) Revised prompt (provide your rewritten prompt, it should be clear, concise, and easily understood by you),\\nb) Questions (ask any relevant questions pertaining to what additional information is needed from me to improve the prompt).\\n3. We will continue this iterative process with me providing additional information to you and you updating the prompt in the Revised prompt section until I say we are done.\\n\\nOnly after I say I am done, will you provide a response to the revised prompt.\"\r\n        }\r\n      ]\r\n    },\r\n    {\r\n      \"name\": \"openchat/openchat-3.5-1210\",\r\n      \"displayName\": \"openchat/openchat-3.5-1210\",\r\n      \"description\": \"OpenChat 3.5 is the #1 model on MT-Bench, with only 7B parameters. Small and fast.\",\r\n      \"websiteUrl\": \"https://www.aaprintsupplyco.com\",\r\n      \"preprompt\": \"\",\r\n      \"chatPromptTemplate\" : \"<s>{{#each messages}}{{#ifUser}}GPT4 Correct User: {{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\\n{{/if}}{{/if}}{{content}}<|end_of_turn|>GPT4 Correct Assistant:{{/ifUser}}{{#ifAssistant}}{{content}}<|end_of_turn|>{{/ifAssistant}}{{/each}}\",\r\n      \"parameters\": {\r\n        \"temperature\": 0.4,\r\n        \"top_p\": 0.95,\r\n        \"top_k\": 50,\r\n        \"truncate\": 8192,\r\n        \"max_new_tokens\": 1024,\r\n        \"stop\": [\"<|end_of_turn|>\",\"</s>\"]\r\n      },\r\n      \"endpoints\" : [{\r\n        \"type\": \"openai\",\r\n        \"baseURL\": \"https://api.together.xyz/v1\"\r\n      }],\r\n      \"promptExamples\": [\r\n        {\r\n          \"title\": \"Write a blog post\",\r\n          \"prompt\": \"Your goal is to help me create a compelling blog post about a topic.\\nYou will follow the following process:\\n\\n1. Ask me for the topic of the blog post.\\n2. After I provide my answer you will need to collect some additional information by going through the next steps:\\na) Questions (ask any relevant questions pertaining to what additional information is needed from me to write a good blog post).\\n\\nOnce you have enough information, or once I say I am done, you will write the blog post.\"\r\n        }, {\r\n          \"titl",
    "url": "https://github.com/huggingface/chat-ui/issues/656",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-22T19:19:34Z",
    "updated_at": "2024-01-09T05:45:13Z",
    "comments": 5,
    "user": "gururise"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 655,
    "title": "Generation failed (Module.summarize) when using TogetherAI openai compatible endpoint",
    "body": "TogetherAI offers an [OpenAI compatible endpoint](https://docs.together.ai/docs/openai-api-compatibility).  When using this endpoint with the model setup as follows:\r\n\r\n```\r\nMODELS=`[\r\n    {\r\n      \"name\": \"mistralai/Mixtral-8x7b-Instruct-v0.1\",\r\n      \"displayName\": \"Mixtral-8x7b\",\r\n      \"endpoints\" : [{\r\n        \"type\": \"openai\",\r\n        \"baseURL\": \"https://api.together.xyz/v1\"\r\n      }],\r\n      \"promptExamples\": [\r\n        {\r\n          \"title\": \"Write an email from bullet list\",\r\n          \"prompt\": \"As a restaurant owner, write a professional email to the supplier to get these products every week: \\n\\n- Wine (x10)\\n- Eggs (x24)\\n- Bread (x12)\"\r\n        }, {\r\n          \"title\": \"Code a snake game\",\r\n          \"prompt\": \"Code a basic snake game in python, give explanations for each step.\"\r\n        }, {\r\n          \"title\": \"Assist in a task\",\r\n          \"prompt\": \"How do I make a delicious lemon cheesecake?\"\r\n        }\r\n      ]\r\n    }\r\n]`\r\n\r\nTASK_MODEL=`{\r\n      \"name\": \"openchat/openchat-3.5-1210\",\r\n      \"chatPromptTemplate\" : \"<s>{{#each messages}}{{#ifUser}}GPT4 Correct User: {{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\\n{{/if}}{{/if}}{{content}}<|end_of_turn|>GPT4 Correct Assistant:{{/ifUser}}{{#ifAssistant}}{{content}}<|end_of_turn|>{{/ifAssistant}}{{/each}}\",\r\n      \"parameters\": {\r\n        \"temperature\": 0.1,\r\n        \"top_p\": 0.95,\r\n        \"repetition_penalty\": 1.2,\r\n        \"top_k\": 50,\r\n        \"truncate\": 3072,\r\n        \"max_new_tokens\": 1024,\r\n        \"stop\": [\"<|end_of_turn|>\",\"</s>\"]\r\n      },\r\n      \"endpoints\" : [{\r\n        \"type\": \"openai\",\r\n        \"baseURL\": \"https://api.together.xyz/v1\"\r\n      }]\r\n}`\r\n```\r\n\r\nInference and streaming work just fine with the output displayed in the chat window; however, in the console, the **following error always appears** after every interaction, and the conversation titles are never summarized.\r\n```\r\nError: Generation failed\r\n    at Module.generateFromDefaultEndpoint (/home/gene/Downloads/chat-ui/src/lib/server/generateFromDefaultEndpoint.ts:22:9)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async Module.summarize (/home/gene/Downloads/chat-ui/src/lib/server/summarize.ts:28:10)\r\n    at async eval (/home/gene/Downloads/chat-ui/src/routes/conversation/[id]/+server.ts:167:26)\r\n```\r\n\r\nEven if I try setting TASK_MODEL='mistralai/Mixtral-8x7b-Instruct-v0.1', I still get this error.",
    "url": "https://github.com/huggingface/chat-ui/issues/655",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-22T17:34:59Z",
    "updated_at": "2024-01-23T05:14:26Z",
    "comments": 1,
    "user": "gururise"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6529,
    "title": "Impossible to only download a test split",
    "body": "I've spent a significant amount of time trying to locate the split object inside my _split_generators() custom function.\r\nThen after diving [in the code](https://github.com/huggingface/datasets/blob/5ff3670c18ed34fa8ddfa70a9aa403ae6cc9ad54/src/datasets/load.py#L2558) I realized that `download_and_prepare` is executed before! split is passed to the dataset builder in `as_dataset`.\r\n\r\nIf I'm not missing something, this seems like bad design, for the following use case:\r\n\r\n> Imagine there is a huge dataset that has an evaluation test set and you want to just download and run just to compare your method.\r\n\r\nIs there a current workaround that can help me achieve the same result?\r\n\r\nThank you,",
    "url": "https://github.com/huggingface/datasets/issues/6529",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-22T16:56:32Z",
    "updated_at": "2024-02-02T00:05:04Z",
    "comments": 2,
    "user": "ysig"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 470,
    "title": "How to convert a model with .pt tail",
    "body": "### Question\n\nI'm new to this area,I'm woundering how to convert a model with .pt tail?thanks a lot",
    "url": "https://github.com/huggingface/transformers.js/issues/470",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-22T10:20:16Z",
    "updated_at": "2023-12-23T20:46:37Z",
    "user": "Bzayyz"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 469,
    "title": "How to convert a model with .pt tail",
    "body": "### Question\n\nI'm new to this area,I'm woundering how to convert a model with .p2 tail?thanks a lot",
    "url": "https://github.com/huggingface/transformers.js/issues/469",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-22T10:20:05Z",
    "updated_at": "2023-12-22T10:20:54Z",
    "user": "Bzayyz"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2721,
    "title": "[BUG] - <title>RuntimeError: CUDA error: an illegal memory access was encountered using vmap and model ensembling call for cuda system",
    "body": "### Add Link\n\nhttps://pytorch.org/tutorials/intermediate/ensembling.html\r\nhttps://pytorch.org/docs/stable/notes/extending.func.html#defining-the-vmap-staticmethod\n\n### Describe the bug\n\n### \ud83d\udc1b Describe the bug\r\n\r\nI want to use **vmap** to vectorize the **ensemble models** inherited from torch.autograd.Function. And torch.autograd.Function\u2019s forward/backward calls into functions from **cuda**. etc, \r\n\r\n\r\nFirstly, I set **generate_vmap_rule=True** ,which means calling the system's vmap function directly.\r\n**error: RuntimeError: Cannot access data pointer of Tensor that doesn't have storage**\r\nBecaue model calls for cuda system\uff0cI need to write the own vmap, \r\n\r\n```\r\ndef vmap(info,in_dims,input):\r\n        if in_dims[0] is not None:\r\n            input_B = input.shape[0]\r\n            input = einops.rearrange(input,'B N C -> (B N) C')   \r\n        outputs,_,_ = model.apply(input)\r\n        if in_dims[0] is not None:\r\n            outputs = einops.rearrange(input,'(B N) C -> B N C',B = input_B)\r\n        return outputs,(0)\r\n```\r\n\r\n**error: RuntimeError: CUDA error: an illegal memory access was encountered,CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.**\r\n\r\n**How can I write the vmap.py to deal the Multiple models process multiple batches of data and models call for cuda to process data?**\r\n\r\ncode follows,I simplify the model class.\r\n\r\n```\r\ndef model(torch.autograd.Function):\r\n      def foward():\r\n            calls for cuda forward\r\n      def backward():\r\n            calls for cuda backward\r\n      def setup_context():\r\n      @staticmethod\r\n      def vmap():\r\n\r\nfrom torch.func import stack_module_state\r\nb_p = torch.randn([10,100,3]).cuda() \r\n     \r\nobjs = [model() for i in range(10)]\r\npe_models = []\r\nfor obj in  objs:\r\n    pe_models.append(obj.pe)\r\npe_param, pe_buffer = stack_module_state(pe_models)\r\nbase_model = copy.deepcopy(pe_models[0])\r\ndef fmodel(params,buffers,x):\r\n    return functional_call(base_model,(params,buffers),x)\r\nout = vmap(fmodel)(pe_param,pe_buffer,b_p)\r\n```\r\n\r\n\n\n### Describe your environment\n\n### Versions\r\n\r\npytorch2.0\r\ncuda11.7\r\npython 3.8 \r\nubuntu20.4\r\ncollect_env.py error update later\n\ncc @albanD",
    "url": "https://github.com/pytorch/tutorials/issues/2721",
    "state": "open",
    "labels": [
      "bug",
      "core"
    ],
    "created_at": "2023-12-22T09:26:03Z",
    "updated_at": "2024-01-04T08:27:38Z",
    "comments": 2,
    "user": "wuyingxiong"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 650,
    "title": "chat-ui docker image failed to connect the mongo docker contrainer",
    "body": "step 1: build the chat-ui image\r\n~~~\r\ndocker build -t chat-ui  -f ./Dockerfile.local .\r\n~~~\r\n\r\nstep 2:\r\n~~~\r\n# bind the 27016\r\ndocker run -d -p 27016:27017 --name mongo-chatui mongo:latest\r\n~~~\r\n\r\nstep 3: run  a contrainer\r\n~~~\r\n# add a .env.local config\r\nMONGODB_URL=mongodb://localhost:27016\r\nHF_TOKEN=<your access token>\r\n~~~\r\n\r\n~~~\r\ndocker run --rm --mount type=bind,source=\"$(pwd)/.env.local\",target=/app/.env.local -p 3000:3000 chat-ui\r\n~~~\r\n\r\n\r\n## results: when load localhost:3000\r\n~~~\r\nMongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27016\r\nat Timeout._onTimeout (/app/node_modules/mongodb/lib/sdam/topology.js:278:38)\r\nat listOnTimeout (node:internal/timers:573:17)\r\nat process.processTimers (node:internal/timers:514:7) {\r\nreason: TopologyDescription {\r\ntype: 'Unknown',\r\nservers: Map(1) { 'localhost:27016' => [ServerDescription] },\r\nstale: false,\r\ncompatible: true,\r\nheartbeatFrequencyMS: 10000,\r\nlocalThresholdMS: 15,\r\nsetName: null,\r\nmaxElectionId: null,\r\nmaxSetVersion: null,\r\ncommonWireVersion: 0,\r\nlogicalSessionTimeoutMinutes: null\r\n},\r\ncode: undefined,\r\n[Symbol(errorLabels)]: Set(0) {}\r\n}\r\nMongoTopologyClosedError: Topology is closed\r\nat /app/node_modules/mongodb/lib/sdam/topology.js:218:46 {\r\n[Symbol(errorLabels)]: Set(0) {}\r\n}\r\nMongoTopologyClosedError: Topology is closed\r\nat processWaitQueue (/app/node_modules/mongodb/lib/sdam/topology.js:514:46)\r\nat Topology.selectServer (/app/node_modules/mongodb/lib/sdam/topology.js:283:9)\r\nat Topology.<anonymous> (/app/node_modules/mongodb/lib/sdam/topology.js:42:94)\r\nat node:internal/util:442:7\r\nat new Promise (<anonymous>)\r\nat Topology.selectServerAsync (node:internal/util:428:12)\r\nat executeOperationAsync (/app/node_modules/mongodb/lib/operations/execute_operation.js:74:35)\r\nat /app/node_modules/mongodb/lib/operations/execute_operation.js:12:45\r\nat maybeCallback (/app/node_modules/mongodb/lib/utils.js:293:21)\r\nat executeOperation (/app/node_modules/mongodb/lib/operations/execute_operation.js:12:38) {\r\n[Symbol(errorLabels)]: Set(0) {}\r\n}\r\n~~~\r\n\r\n@nsarrazin",
    "url": "https://github.com/huggingface/chat-ui/issues/650",
    "state": "open",
    "labels": [
      "support",
      "docker"
    ],
    "created_at": "2023-12-22T08:34:52Z",
    "updated_at": "2025-05-25T20:37:17Z",
    "comments": 6,
    "user": "walkacross"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 649,
    "title": "Formatting is incorrect when using LiteLLM (Together.ai)",
    "body": "I'm using Mixtral-7b-Instruct-v0.1 via [LiteLLM](https://github.com/BerriAI/litellm) to provide a OpenAI compatible API to together.ai where the model is hosted.  \r\n\r\nEverything works fine, including streaming; however, the formatting is messed up as shown.  Any ideas why?\r\n![image](https://github.com/huggingface/chat-ui/assets/4380009/6855fad2-288f-403e-9ab8-1f2f409fe5c9)\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/649",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "front",
      "models"
    ],
    "created_at": "2023-12-22T05:46:37Z",
    "updated_at": "2023-12-22T17:11:09Z",
    "user": "gururise"
  },
  {
    "repo": "huggingface/distil-whisper",
    "number": 67,
    "title": "I can only use its encoder to extract audio features, right? How should I use it? Could you provide an example",
    "body": "I can only use its encoder to extract audio features, right? How should I use it? Could you provide an example",
    "url": "https://github.com/huggingface/distil-whisper/issues/67",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-22T03:50:32Z",
    "updated_at": "2024-01-15T18:07:34Z",
    "user": "wvinzh"
  },
  {
    "repo": "pytorch/serve",
    "number": 2866,
    "title": "The workers works in parallelism? ",
    "body": "### \ud83d\udcda The doc issue\n\nThis is not an issue. How the workers works in parallelism and if they works in parallelism? \n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2866",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2023-12-21T23:33:39Z",
    "updated_at": "2024-01-05T20:54:53Z",
    "comments": 7,
    "user": "IonBoleac"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 468,
    "title": "Node.js",
    "body": "### Question\n\nWill this library work with Node.js?",
    "url": "https://github.com/huggingface/transformers.js/issues/468",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-21T23:03:36Z",
    "updated_at": "2023-12-21T23:06:53Z",
    "user": "Julianbullmagic"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 47,
    "title": "I don't need to load loading and onProgress\uff0cWhen data is loaded, how can I render it on the interface immediately?",
    "body": "I don't need to load loading\uff0cWhen data is loaded, how can I render it on the interface immediately? I see Class Loader\r\n\r\nNothing's been done there",
    "url": "https://github.com/huggingface/gsplat.js/issues/47",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-21T20:13:52Z",
    "updated_at": "2024-01-29T20:15:01Z",
    "user": "did66"
  },
  {
    "repo": "huggingface/candle",
    "number": 1463,
    "title": "How to introduce openai triton in candle?",
    "body": "The handwritten CUDA operator is very complicated. How can we use openai triton in candle to simplify this process. \uff1a\uff09",
    "url": "https://github.com/huggingface/candle/issues/1463",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-21T18:42:38Z",
    "updated_at": "2024-01-01T11:56:29Z",
    "user": "tyfeng1997"
  },
  {
    "repo": "pytorch/audio",
    "number": 3720,
    "title": "Can't install some of the libraries",
    "body": "Hello, i have a problem while installing some of the libraries because i can't install module fcntl. Is there any solution because on one windows pc works but on my main it doesn't. That module is linux dependent.",
    "url": "https://github.com/pytorch/audio/issues/3720",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-21T13:58:55Z",
    "updated_at": "2023-12-21T13:58:55Z",
    "comments": 0,
    "user": "Toplica001"
  },
  {
    "repo": "pytorch/audio",
    "number": 3719,
    "title": "streamreader add_video_stream doesn't seem to accept any filter_desc options",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI'm using the following options in my streamreader:\r\n```\r\nvr.add_video_stream(\r\n                    frames_per_chunk=decode_size, \r\n                    decoder=codec, \r\n                    decoder_option={\"threads\": \"0\", \"gpu\": \"0\"}, \r\n                    hw_accel='cuda',\r\n                    filter_desc=f\"format=pix_fmts=rgb24\"\r\n                    )\r\n```\r\n\r\nUnfortunately I get the error `RuntimeError: Failed to configure the graph: Function not implemented`. \r\nIf I remove the filter_desc option the code runs normally. For me the streamreader is not very useful if the output is not in rgb24 but in yuv444p instead. Is there a way to fix this (without moving to the nightly build), or are there any alternatives?\r\n\r\n\r\n### Versions\r\n\r\nPyTorch version: 2.1.2+cu118\r\nIs CUDA available: True\r\n[pip3] numpy==1.24.1\r\n[pip3] torch==2.1.2+cu118\r\n[pip3] torchaudio==2.1.2+cu118\r\n[pip3] torchvision==0.16.2+cu118\r\n[pip3] triton==2.1.0\r\n",
    "url": "https://github.com/pytorch/audio/issues/3719",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-21T09:58:03Z",
    "updated_at": "2023-12-28T07:46:49Z",
    "comments": 1,
    "user": "caspersmit-sa"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28179,
    "title": "How to fine tune facebook/esm2_t33_650M_UR50D",
    "body": "### System Info\n\nHow to fine tune facebook/esm2_t33_650M_UR50D\uff1fIt's too big and the model.half() couldn't work. Besids, i always met the error : CUDA error: CUBLAS_STATUS_INTERNAL_ERROR when calling `cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc). Is it possible that the model in the huggingface is wrong?\r\nThe following is the script:\r\nfrom os.path import join\r\nimport os\r\nimport pandas as pd\r\nimport numpy as np\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport torch.optim as optim\r\nimport torch.utils.data as data\r\nimport transformers\r\nfrom transformers import AutoTokenizer, AutoModelForSequenceClassification, Trainer\r\nfrom datasets import Dataset,load_metric\r\nfrom sklearn.model_selection import train_test_split\r\n#os.environ['CUDA_VISIBLE_DEVICES'] = '1'\r\nCURRENT_DIR = os.getcwd()\r\ncheck_point = join(CURRENT_DIR,\"esm1b_t33_650M_UR50S\")\r\n\r\n#Data processing\r\ndef process_tsv(file):\r\n    sequences = list()\r\n    labels = list()\r\n    df = pd.read_csv(file,sep=\"\\t\")\r\n    for ind in df.index:\r\n        sequences.append(df[\"sequence\"][ind])\r\n        labels.append(df[\"label\"][ind])\r\n\r\n    return sequences,labels\r\n\r\n\r\ndef tokenize_add_label(sequences, labels, tokenizer):\r\n    \"\"\"This function takes sequences and labels creates a Dataset containing tokenized sequences and add labels to it\r\n\r\n       args:\r\n           sequences (str): a list of sequences\r\n           labels (int): a list of labels\r\n           tokenizer : a pre-trained tokenizer\r\n\r\n       return:\r\n            Dataset: tokenized sequences and associated labels)\"\"\"\r\n    sequences_tokenized = tokenizer(sequences, padding=True, truncation=True)\r\n    sequences_tokenized = torch.float16(sequences_tokenized)\r\n    labels = torch.tensor(labels)\r\n    labels = labels.long()\r\n    sequences_dataset = Dataset.from_dict(sequences_tokenized)\r\n    sequences_dataset = sequences_dataset.add_column(\"labels\", labels)\r\n\r\n    return sequences_dataset\r\n\r\nsequences,labels = process_tsv(join(CURRENT_DIR,\"example.tsv\"))\r\ntokenizer = AutoTokenizer.from_pretrained(check_point)\r\nsequences_dataset = tokenize_add_label(sequences,labels,tokenizer)\r\nnum_labels = max(labels)+1\r\nmodel = AutoModelForSequenceClassification.from_pretrained(check_point,num_labels=num_labels)\r\n#device = \"cuda\" if torch.cuda.is_available() else \"cpu\"\r\n#model.to(device)\r\nmodel.cuda()\r\n\r\n\r\n#model = model.half()\r\n\r\n#model.enable_input_require_grads()\r\nmodel_name = check_point.split(\"/\")[-1]\r\ntrainer_dir = f\"{model_name}-finetuned-model_esm-1b_on_7beta\"\r\nif not os.path.exists(trainer_dir):\r\n    os.mkdir(trainer_dir)\r\n\r\nbatch_size = 1\r\ntraining_args = transformers.TrainingArguments(\r\n    output_dir=trainer_dir,          # output directory\r\n    overwrite_output_dir=True,\r\n    num_train_epochs=3,              # total number of training epochs\r\n    per_device_train_batch_size=batch_size,  # batch size per device during training\r\n    per_device_eval_batch_size=batch_size,   # batch size for evaluation\r\n    learning_rate=2e-5,\r\n    warmup_steps=500,                # number of warmup steps for learning rate scheduler\r\n    weight_decay=0.01,               # strength of weight decay\r\n    logging_dir=trainer_dir,            # directory for storing logs\r\n    logging_steps=10,\r\n    load_best_model_at_end=True,\r\n    evaluation_strategy=\"epoch\",\r\n    save_strategy=\"epoch\",\r\n    save_total_limit=1,\r\n    metric_for_best_model=\"accuracy\",\r\n    greater_is_better=True,\r\n    disable_tqdm=True,\r\n    gradient_accumulation_steps = 2,\r\n    gradient_checkpointing=True\r\n\r\n    )\r\n\r\nmetric = load_metric(join(CURRENT_DIR,\"metrics\",\"accuracy/accuracy.py\"))\r\n\r\ndef compute_metrics(eval_pred):\r\n    logits, labels = eval_pred\r\n    print(\"logits\",logits)\r\n    print(\"labels\",labels)\r\n    predictions = np.argmax(logits, axis=-1)\r\n    print(\"predictions\",predictions)\r\n    return metric.compute(predictions=predictions, references=labels)\r\n\r\ntrainer = Trainer(\r\n    model = model,\r\n    args = training_args,\r\n    train_dataset=sequences_dataset,\r\n    eval_dataset=sequences_dataset,\r\n    tokenizer=tokenizer,\r\n    compute_metrics=compute_metrics,\r\n\r\n)\r\n\r\nmodel.config.problem_type\r\ntrainer.train()\r\ntrainer.state.log_history\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nAsking to truncate to max_length but no maximum length is provided and the model has no predefined maximum length. Default to no truncation.\r\nSome weights of EsmForSequenceClassification were not initialized from the model checkpoint at /home/wangmuqiang/fine_tune_esm2/esm1b_t33_650M_UR50S and are newly initialized: ['classifier.dense.bias', 'classifier.out_proj.bias', 'classifier.out_proj.weight', 'classifier.dense.weight']\r\nYou should probably TRAIN this model on a down-stream task to be able to use it fo",
    "url": "https://github.com/huggingface/transformers/issues/28179",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-21T09:50:27Z",
    "updated_at": "2024-01-30T08:03:39Z",
    "user": "Admire7494"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 81,
    "title": "Why we use a lower batch size when comparing SFT lora with SFT full fine-tuning ?",
    "body": "https://github.com/huggingface/alignment-handbook/blob/main/recipes/zephyr-7b-beta/sft/config_lora.yaml\r\n\r\n",
    "url": "https://github.com/huggingface/alignment-handbook/issues/81",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-20T21:09:33Z",
    "updated_at": "2024-01-07T21:03:14Z",
    "comments": 2,
    "user": "shamanez"
  },
  {
    "repo": "huggingface/trl",
    "number": 1115,
    "title": "How to prepare multi-turn dialogue dataset for dpo?",
    "body": "the single-turn dialogue dataset is like:\r\ndpo_dataset_dict = {\r\n    \"prompt\": [\r\n        \"hello\",\r\n        \"how are you\",\r\n        \"What is your name?\",\r\n        \"What is your name?\",\r\n        \"Which is the best programming language?\",\r\n        \"Which is the best programming language?\",\r\n        \"Which is the best programming language?\",\r\n    ],\r\n    \"chosen\": [\r\n        \"hi nice to meet you\",\r\n        \"I am fine\",\r\n        \"My name is Mary\",\r\n        \"My name is Mary\",\r\n        \"Python\",\r\n        \"Python\",\r\n        \"Java\",\r\n    ],\r\n    \"rejected\": [\r\n        \"leave me alone\",\r\n        \"I am not fine\",\r\n        \"Whats it to you?\",\r\n        \"I dont have a name\",\r\n        \"Javascript\",\r\n        \"C++\",\r\n        \"C++\",\r\n    ],\r\n}\r\n\r\nSo, how to prepare a multi-turn dialogue dataset? Can you provide an example? Thank you!",
    "url": "https://github.com/huggingface/trl/issues/1115",
    "state": "closed",
    "labels": [
      "\ud83c\udfcb DPO"
    ],
    "created_at": "2023-12-20T09:14:45Z",
    "updated_at": "2024-10-03T14:12:48Z",
    "user": "chloefresh"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28155,
    "title": "What is the minimum video card with large memory required to run the mixtral-8x7b model",
    "body": "I mean the model that just came out\uff1amistralai/Mixtral-8x7B-Instruct-v0.1\uff0clooks like a lot of parameter files\uff0cwhat is the minimum nvidia graphics card video memory required?",
    "url": "https://github.com/huggingface/transformers/issues/28155",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-20T01:54:45Z",
    "updated_at": "2024-01-28T08:04:44Z",
    "user": "zysNLP"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2218,
    "title": "JobManagerCrashedError jobs are never retried",
    "body": "Currently, we have 7768 jobs with error_code `JobManagerCrashedError`. Some of them are caused by zombie killer set crashes.\r\n\r\n```\r\nAtlas atlas-x5jgb3-shard-0 [primary] datasets_server_cache> db.cachedResponsesBlue.aggregate([{$match:{error_code:\"JobManagerCrashedError\",\"details.copied_from_artifact\":{$exists:false}}},{$group:{_id:{kind:\"$kind\"},count:{$sum:1}}},{$sort:{count:-1}}])\r\n[\r\n  { _id: { kind: 'split-duckdb-index' }, count: 3658 },\r\n  { _id: { kind: 'split-descriptive-statistics' }, count: 1872 },\r\n  { _id: { kind: 'config-parquet-and-info' }, count: 1765 },\r\n  { _id: { kind: 'split-first-rows-from-streaming' }, count: 322 },\r\n  { _id: { kind: 'split-first-rows-from-parquet' }, count: 72 },\r\n  { _id: { kind: 'split-opt-in-out-urls-scan' }, count: 60 },\r\n  { _id: { kind: 'dataset-config-names' }, count: 21 }\r\n]\r\n\r\n```\r\n\r\nBut most of them are set as crashed when deploying and are never retried, even if they are fast and straightforward to process.\r\nShould we retry those jobs in backfill?  I think we should differentiate the ones that are easy to process against those that are difficult (primarily because of OOMs), maybe retry once or twice, and set a different error so that we can identify which of them are caused by limited resources.\r\n  \r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2218",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-19T15:22:30Z",
    "updated_at": "2024-01-09T20:32:58Z",
    "user": "AndreaFrancis"
  },
  {
    "repo": "pytorch/benchmark",
    "number": 2094,
    "title": "how to get the memory test job",
    "body": "https://arxiv.org/pdf/2304.14226.pdf  the paper says torchbench can do memory test\uff0c but I can\u2018t find any test jobs for memory test\r\n\r\nhttps://github.com/pytorch/benchmark/actions",
    "url": "https://github.com/pytorch/benchmark/issues/2094",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-19T14:18:29Z",
    "updated_at": "2023-12-20T01:59:46Z",
    "user": "GuWei007"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2551,
    "title": "\u2753 [Question] Error regarding the operation of pytorch_quantization\uff1a/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found ",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\nWhen I run finetune_qat.py for vgg  I get the error:\r\n\r\n```\r\npython finetune_qat.py \r\nTraceback (most recent call last):\r\n  File \"/home/incar/tms/source/tensortclassicify/finetune_qat.py\", line 16, in <module>\r\n    from pytorch_quantization import nn as quant_nn\r\n  File \"/home/incar/miniconda3/envs/timm/lib/python3.10/site-packages/pytorch_quantization/__init__.py\", line 20, in <module>\r\n    from .quant_modules import *\r\n  File \"/home/incar/miniconda3/envs/timm/lib/python3.10/site-packages/pytorch_quantization/quant_modules.py\", line 23, in <module>\r\n    from pytorch_quantization import nn as quant_nn\r\n  File \"/home/incar/miniconda3/envs/timm/lib/python3.10/site-packages/pytorch_quantization/nn/__init__.py\", line 19, in <module>\r\n    from pytorch_quantization.nn.modules.tensor_quantizer import *\r\n  File \"/home/incar/miniconda3/envs/timm/lib/python3.10/site-packages/pytorch_quantization/nn/modules/tensor_quantizer.py\", line 24, in <module>\r\n    from pytorch_quantization.tensor_quant import QuantDescriptor, tensor_quant, fake_tensor_quant, scaled_e4m3\r\n  File \"/home/incar/miniconda3/envs/timm/lib/python3.10/site-packages/pytorch_quantization/tensor_quant.py\", line 28, in <module>\r\n    from pytorch_quantization import cuda_ext\r\nImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/incar/miniconda3/envs/timm/lib/python3.10/site-packages/pytorch_quantization/cuda_ext.cpython-310-x86_64-linux-gnu.so)\r\n```\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n '2.1.2+cu121'\r\n - CPU Architecture:\r\n intel \r\n - OS (e.g., Linux):\r\n ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n pip install torch torchvision torchaudio\r\n - Build command you used (if compiling from source):\r\n pip install nvidia-pyindex sphinx-glpi-theme prettytable pyyaml absl-py scipy\r\npip install -i https://pypi.ngc.nvidia.com pytorch-quantization\r\n - Are you using local sources or building from archives:\r\n no\r\n - Python version:\r\n 3.10\r\n - CUDA version:\r\n 12.2\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\nso,how can i run pytorch_quantization?\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2551",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-19T10:16:49Z",
    "updated_at": "2024-02-16T02:29:47Z",
    "user": "tms2003"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1608,
    "title": "XENOVA conversion issues",
    "body": "### System Info\r\n\r\n```shell\r\nusing the requirements.txt in Xenova for environment. \r\n\r\nhttps://github.com/xenova/transformers.js/blob/main/scripts/requirements.txt\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n@xenova \r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction (minimal, reproducible, runnable)\r\n\r\n\"Error while initializing BPE: Token `_</w>` out of vocabulary\"\r\n\r\n### Expected behavior\r\n\r\nBeen trying to run blenderbot90, 400, 1b distilled.\r\n\r\nHave had lots of issues, but I'll start with this one.\r\n\r\n\r\nversion 1 attempt, and loading from local after git-large file from HF repo.\r\n\r\n   tokenizer = AutoTokenizer.from_pretrained(model)\r\n   model = ORTModelForSeq2SeqLM.from_pretrained(model)\r\n   inputs = tokenizer(\"what is a black hole\", return_tensors=\"pt\")\r\n   gen_tokens = model.generate(**inputs)\r\n   response = tokenizer.batch_decode(gen_tokens)\r\n\r\n\r\nversion 2 attempt, directly repo using pipeline\r\n\r\n   from transformers import AutoTokenizer, pipeline\r\n   from optimum.onnxruntime import ORTModelForSeq2SeqLM\r\n   tokenizer = AutoTokenizer.from_pretrained(\"Xenova/blenderbot_small-90M\")\r\n   model = ORTModelForSeq2SeqLM.from_pretrained(\"Xenova/blenderbot_small-90M\")\r\n   onnx_pipe = pipeline(\"conversational\", model=model, tokenizer=tokenizer)\r\n   text = \"what is a black hole\"\r\n   response = onnx_pipe (text)\r\n   \r\n   \r\nBoth cases getting this error: \"Error while initializing BPE: Token `_</w>` out of vocabulary\"",
    "url": "https://github.com/huggingface/optimum/issues/1608",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-12-19T02:11:58Z",
    "updated_at": "2023-12-19T04:54:00Z",
    "comments": 3,
    "user": "gidzr"
  },
  {
    "repo": "pytorch/torchx",
    "number": 802,
    "title": "Why can't tracker entrypoint be specified in .torchxconfig",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nBefore submitting, please ensure you have gone through our\r\n[documentation](https://pytorch.org/torchx).\r\n\r\n\r\n### Question\r\nThe [documentation](https://pytorch.org/torchx/main/tracker.html#user-job-configuration-advanced) is somewhat confusing and is marked for Advanced use after mentioning the mechanism to reference entrypoint, but is there a reason we can't also specify the tracker's entrypoint right in `.torchxconfig` in addition to those discoverable via `entry_points.txt`? E.g.:\r\n\r\n```\r\n[torchx:tracker]\r\nmy_tracker=my_module:my_function\r\n\r\n[tracker:my_tracker]\r\n...\r\n```\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/802",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-18T21:26:02Z",
    "updated_at": "2023-12-19T17:39:10Z",
    "comments": 2,
    "user": "clumsy"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 409,
    "title": "Doesn't work with versions of torch where \"meta\" dtype is not supported.",
    "body": "### System Info\n\nThis is on my mac where I was just testing the interface.  It seems like this could easily be fixed.\r\n```\r\n...\r\n>>> from safetensors.torch import save_file\r\n>>> x\r\n{'a': tensor([1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])}\r\n>>> x['a'].device\r\ndevice(type='cpu')\r\n>>> save_file(x, filename='foo')\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/local/lib/python3.9/site-packages/safetensors/torch.py\", line 281, in save_file\r\n    serialize_file(_flatten(tensors), filename, metadata=metadata)\r\n  File \"/usr/local/lib/python3.9/site-packages/safetensors/torch.py\", line 460, in _flatten\r\n    shared_pointers = _find_shared_tensors(tensors)\r\n  File \"/usr/local/lib/python3.9/site-packages/safetensors/torch.py\", line 72, in _find_shared_tensors\r\n    if v.device != torch.device(\"meta\") and storage_ptr(v) != 0 and storage_size(v) != 0:\r\nRuntimeError: Expected one of cpu, cuda, xpu, mkldnn, opengl, opencl, ideep, hip, msnpu, xla, vulkan device type at start of device string: meta\r\n>>> safetensors.__version__\r\n'0.4.1'\r\n>>> torch.__version__\r\n'1.8.1'\r\n```\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Reproduction\n\nInstall torch 1.8.1 and safetensors 0.4.1 (this is current safetensor version in pip default channel)\r\nrun the code above (sorry I have not reduced this to a script but it's the most minimal example of using safetensors)\n\n### Expected behavior\n\nsave_file should work with older versions of torch, like 1.8.1",
    "url": "https://github.com/huggingface/safetensors/issues/409",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-12-18T15:51:28Z",
    "updated_at": "2024-01-23T01:49:25Z",
    "user": "danpovey"
  },
  {
    "repo": "huggingface/candle",
    "number": 1457,
    "title": "How to do to quantize manually a phi-2 version, starting from safetensors file",
    "body": "Hi\r\n\r\nI have fine tuned a phi-2 model using lora\r\n\r\nI merged adapter with base model to get a trained one\r\n\r\nI now have a bunch of safetensors file\r\n\r\nHow is it possible to convert these files into a gguf file ( llama.cpp concerter does not support phi)\r\n\r\nIn other words, how is it possible to achieve the same as :  model-v2-q4k.gguf in lmz/candle-quantized-phi\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/candle/issues/1457",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-18T15:14:37Z",
    "updated_at": "2023-12-18T15:58:12Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1605,
    "title": "Static Quantization - Token classification",
    "body": "Hi, \r\nI am following the code [here](https://github.com/huggingface/optimum/tree/main/examples/onnxruntime/quantization/token-classification) for doing static quantization on my  token classification model.\r\n\r\nThe inference time for quantized model(static) is almost the same as non quantized one. I have tried dynamic quantization too and it is showing some improvement in terms of latency but i need more latency improvements.\r\n\r\nDo i have to do anything additional to lower/improve the inference time than what is mentioned [here](https://github.com/huggingface/optimum/tree/main/examples/onnxruntime/quantization/token-classification) for static quantization. Can anyone please help me?",
    "url": "https://github.com/huggingface/optimum/issues/1605",
    "state": "open",
    "labels": [
      "quantization"
    ],
    "created_at": "2023-12-18T13:31:33Z",
    "updated_at": "2024-10-09T09:21:22Z",
    "comments": 0,
    "user": "akshay-babbar"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6211,
    "title": "[Examples] How much time you support training scripts of text to video in diffusers?",
    "body": "I want to train svd in diffusers, can you support this feature in examples.\r\nThanks for your contributions.",
    "url": "https://github.com/huggingface/diffusers/issues/6211",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-12-18T08:26:57Z",
    "updated_at": "2024-01-26T15:05:32Z",
    "user": "jiaxiangc"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1604,
    "title": "Table Transformer to ONNX",
    "body": "### Feature request\n\nHi all,\r\nI am trying to convert Table-transformer model from transformers(pretrained) to ONNX. Error reads something like \" 'table-transformer' is not a supported format.\r\n\r\nIs there any way to convert table-transformer (TATR) to ONNX model. Any help would be cherished.\r\nThanks. \n\n### Motivation\n\nMotivation for this is, I am working on developing a light weight table structure recognition model, ONNX model would help me in that regard.\n\n### Your contribution\n\nNone",
    "url": "https://github.com/huggingface/optimum/issues/1604",
    "state": "closed",
    "labels": [
      "feature-request",
      "onnx"
    ],
    "created_at": "2023-12-18T07:18:21Z",
    "updated_at": "2024-02-28T08:52:49Z",
    "comments": 3,
    "user": "balajiChundi"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 407,
    "title": "Does safetensors save the model's hierarchical structure? Is it similar to ONNX?",
    "body": "If safetensors saves the model's hierarchical structure, how can one access this structure? Is it possible to read it directly like with ONNX?Can I directly load a model from safetensors? \r\nIf the hierarchical structure of the model is not preserved, does it mean that the original model must be read from config.json?",
    "url": "https://github.com/huggingface/safetensors/issues/407",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-12-17T15:04:55Z",
    "updated_at": "2024-02-24T01:45:09Z",
    "comments": 3,
    "user": "ZDragonX"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6507,
    "title": "where is glue_metric.py> @Frankie123421 what was the resolution to this?",
    "body": "              > @Frankie123421 what was the resolution to this?\r\n\r\nuse glue_metric.py instead of glue.py in load_metric\r\n\r\n_Originally posted by @Frankie123421 in https://github.com/huggingface/datasets/issues/2117#issuecomment-905093763_\r\n            ",
    "url": "https://github.com/huggingface/datasets/issues/6507",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-17T09:58:25Z",
    "updated_at": "2023-12-18T11:42:49Z",
    "user": "Mcccccc1024"
  },
  {
    "repo": "huggingface/peft",
    "number": 1278,
    "title": "How to add trainable parameters? (bugs in 'modules_to_save')",
    "body": "### System Info\n\nHi,\r\n\r\nHow can I train other weights in the model rather than fix them during lora training?\r\n\r\n\n\n### Who can help?\n\n@BenjaminBossan Hi, I find you are active recently so I @ you here..\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```\r\nself.model, self.peft_optimizer, _, self.peft_lr_scheduler = deepspeed.initialize(\r\n            config=training_args.deepspeed,\r\n            model=model,\r\n            model_parameters=optimizers['model_parameters'] if self.training_args.do_train else None,\r\n            optimizer=hf_optimizer,\r\n            lr_scheduler=hf_lr_scheduler\r\n        )\r\n```\r\nI add the parameters I want to train in `hf_optimizer`, but those parameters still do not change\n\n### Expected behavior\n\nthe gradient of those parameters added to `hf_optimizer` should not be None",
    "url": "https://github.com/huggingface/peft/issues/1278",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-17T05:34:09Z",
    "updated_at": "2024-01-29T15:03:39Z",
    "user": "shawnricecake"
  },
  {
    "repo": "pytorch/audio",
    "number": 3717,
    "title": "AV-HuBERT integration with torchaudio.pipelines.Wav2Vec2FABundle ",
    "body": "### \ud83d\ude80 The feature\n\nHow would someone go about configuring AV-HuBERT to work with `torchaudio.pipelines.Wav2Vec2FABundle`? It currently only supports [MMS_FA](https://pytorch.org/audio/stable/pipelines.html#pertrained-models)\n\n### Motivation, pitch\n\nCurrently the `torchaudio.pipelines.Wav2Vec2FABundle` forced aligner only supports [MMS_FA](https://pytorch.org/audio/stable/pipelines.html#pertrained-models).\r\nThis is a request to add support for an AV-ASR, namely AV-HuBERT. The feature could also be a tutorial on how to extend the list of supported models that are multimodal speech+video.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/audio/issues/3717",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-16T01:04:05Z",
    "updated_at": "2023-12-16T01:04:05Z",
    "comments": 0,
    "user": "bejjani"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2262,
    "title": "When I trained with two processes the gradient of the parameters could not be shared and I ended up with two different models. How to solve this problem?",
    "body": "When I trained with two processes the gradient of the parameters could not be shared and I ended up with two different models. Did anyone meet this problem before? How to solve it?",
    "url": "https://github.com/huggingface/accelerate/issues/2262",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-15T13:48:34Z",
    "updated_at": "2024-06-11T12:26:07Z",
    "user": "zypsjtu"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6501,
    "title": " OverflowError: value too large to convert to int32_t ",
    "body": "### Describe the bug\n\n![image](https://github.com/huggingface/datasets/assets/47747764/f58044fb-ddda-48b6-ba68-7bbfef781630)\r\n\n\n### Steps to reproduce the bug\n\njust loading datasets \n\n### Expected behavior\n\nhow can I fix it\n\n### Environment info\n\npip install /mnt/cluster/zhangfan/study_info/LLaMA-Factory/peft-0.6.0-py3-none-any.whl\r\npip install huggingface_hub-0.19.4-py3-none-any.whl tokenizers-0.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl transformers-4.36.1-py3-none-any.whl pyarrow_hotfix-0.6-py3-none-any.whl datasets-2.15.0-py3-none-any.whl tyro-0.5.18-py3-none-any.whl trl-0.7.4-py3-none-any.whl\r\n\r\ndone",
    "url": "https://github.com/huggingface/datasets/issues/6501",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-15T10:10:21Z",
    "updated_at": "2025-06-27T04:27:14Z",
    "comments": 1,
    "user": "zhangfan-algo"
  },
  {
    "repo": "pytorch/kineto",
    "number": 851,
    "title": "In Overview page, time unit error",
    "body": "Time unit error\r\n![1](https://github.com/pytorch/kineto/assets/47709353/0803d343-60a8-416d-af05-877f37e8878c)\r\n",
    "url": "https://github.com/pytorch/kineto/issues/851",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-15T04:15:45Z",
    "updated_at": "2024-04-23T15:23:24Z",
    "user": "Aiuan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6178,
    "title": "How to train Stable Diffusion with DDPM?",
    "body": "I want to train Stable Diffusion with DDPM, but I can't find the code in this project. I found a lot of training code elsewhere on the internet, but most of it is distillation code on pre-trained models, not the original DDPM training code. I also tried to implement the original training code myself, but I couldn't get good results. Could you provide me with the code for this part if it's convenient for you?\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/6178",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-15T02:43:07Z",
    "updated_at": "2023-12-15T02:54:06Z",
    "user": "MenSanYan"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2208,
    "title": "Add a collection with datasets infos",
    "body": "While working on enabling private datasets (#39) under conditions (isPro, isEnterprise), I thought we missed a place where we control the access to the dataset.\r\n\r\nI think the first step in the DAG, instead of dataset-config-names, should be more about the dataset characteristics: if it's private or public, maybe if it's gated (not sure if it's useful info), if the user is pro or if the org is enterprise, if the viewer is disabled through the README (see https://github.com/huggingface/datasets-server/issues/2207), if the dataset is in the block list.\r\n\r\nAll that information could go to a new step called `dataset-status` or something similar.\r\n\r\nThe content could be:\r\n\r\n```json\r\n{\r\n  \"dataset\": \"namespace/dataset\",\r\n  \"private\": true,\r\n  \"proUser\": false,\r\n  \"enterpriseOrg\": true,\r\n  \"disabledFromReadme\": false,\r\n  \"gated\": false,\r\n  \"blocked\": false,\r\n}\r\n```\r\n\r\nAnd a second step, called `dataset-enabled`, that would depend on `dataset-status`, and would return:\r\n- 200 `{enabled: true}` if all the conditions are met\r\n- 404 if we don't want to disclose the existence of the dataset, or if it does not exist\r\n- 501 if it's not implemented\r\n- 403? 404? if the dataset viewer is not enabled (private dataset, no pro user/enterprise org)\r\n\r\nThen, the following steps would propagate the error if so, or if 200, will act as currently.\r\n\r\nI think it's clearer to have two different steps: one to collect the data, another one to take a decision on this basis. We could also have everything in one cache entry, but I think the logic for maintenance would be harder (we would have to add info like: is that dataset private, is the user pro, etc. in the error details, or in the content, etc. to be able to check them regularly)",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2208",
    "state": "closed",
    "labels": [
      "question",
      "refactoring / architecture",
      "P2"
    ],
    "created_at": "2023-12-14T13:59:42Z",
    "updated_at": "2024-01-11T14:30:03Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2207,
    "title": "Backfill job processes datasets with disabled viewer?",
    "body": "If I read the code correctly, the backfill cronjob does not check if the dataset viewer is disabled (`viewer: false` in the README).\r\n\r\nIf we want to implement the dataset viewer for private datasets, under conditions (isPro, isEnterprise), we will have to check these conditions before adding jobs.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2207",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "P2"
    ],
    "created_at": "2023-12-14T13:01:53Z",
    "updated_at": "2024-02-06T16:03:10Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 1907,
    "title": "How to fix \"VBox(children=(HTML(value='<center> <img...\" error? When trying login()",
    "body": "### Describe the bug\n\nHello. I am doing like below but it doesn't show enter token panel as supposed to be\r\n\r\nWhat could be the reason?\r\n\r\n![image](https://github.com/huggingface/huggingface_hub/assets/19240467/d9346706-78f1-47e9-8303-fc108b5aa8e9)\r\n\r\nPip freeze is as below\r\n\r\n```\r\nalembic @ file:///home/conda/feedstock_root/build_artifacts/alembic_1701459233889/work\r\nanyio @ file:///home/conda/feedstock_root/build_artifacts/anyio_1700835416766/work\r\narchspec @ file:///home/conda/feedstock_root/build_artifacts/archspec_1699370045702/work\r\nargon2-cffi @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi_1692818318753/work\r\nargon2-cffi-bindings @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi-bindings_1695386553988/work\r\narrow @ file:///home/conda/feedstock_root/build_artifacts/arrow_1696128962909/work\r\nasttokens @ file:///home/conda/feedstock_root/build_artifacts/asttokens_1698341106958/work\r\nasync-generator==1.10\r\nasync-lru @ file:///home/conda/feedstock_root/build_artifacts/async-lru_1690563019058/work\r\nattrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1683424013410/work\r\nBabel @ file:///home/conda/feedstock_root/build_artifacts/babel_1698174530262/work\r\nbeautifulsoup4 @ file:///home/conda/feedstock_root/build_artifacts/beautifulsoup4_1680888073205/work\r\nbleach @ file:///home/conda/feedstock_root/build_artifacts/bleach_1696630167146/work\r\nblinker @ file:///home/conda/feedstock_root/build_artifacts/blinker_1698890160476/work\r\nboltons @ file:///home/conda/feedstock_root/build_artifacts/boltons_1677499911949/work\r\nBrotli @ file:///home/conda/feedstock_root/build_artifacts/brotli-split_1695989787169/work\r\ncached-property @ file:///home/conda/feedstock_root/build_artifacts/cached_property_1615209429212/work\r\ncertifi @ file:///home/conda/feedstock_root/build_artifacts/certifi_1700303426725/work/certifi\r\ncertipy==0.1.3\r\ncffi @ file:///home/conda/feedstock_root/build_artifacts/cffi_1696001724357/work\r\ncharset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1698833585322/work\r\ncolorama @ file:///home/conda/feedstock_root/build_artifacts/colorama_1666700638685/work\r\ncomm @ file:///home/conda/feedstock_root/build_artifacts/comm_1691044910542/work\r\nconda @ file:///home/conda/feedstock_root/build_artifacts/conda_1699392346065/work\r\nconda-libmamba-solver @ file:///home/conda/feedstock_root/build_artifacts/conda-libmamba-solver_1700148543755/work/src\r\nconda-package-handling @ file:///home/conda/feedstock_root/build_artifacts/conda-package-handling_1691048088238/work\r\nconda_package_streaming @ file:///home/conda/feedstock_root/build_artifacts/conda-package-streaming_1691009212940/work\r\ncryptography @ file:///home/conda/feedstock_root/build_artifacts/cryptography-split_1701563208210/work\r\ndebugpy @ file:///home/conda/feedstock_root/build_artifacts/debugpy_1695534290440/work\r\ndecorator @ file:///home/conda/feedstock_root/build_artifacts/decorator_1641555617451/work\r\ndefusedxml @ file:///home/conda/feedstock_root/build_artifacts/defusedxml_1615232257335/work\r\nentrypoints @ file:///home/conda/feedstock_root/build_artifacts/entrypoints_1643888246732/work\r\nexceptiongroup @ file:///home/conda/feedstock_root/build_artifacts/exceptiongroup_1700579780973/work\r\nexecuting @ file:///home/conda/feedstock_root/build_artifacts/executing_1698579936712/work\r\nfastjsonschema @ file:///home/conda/feedstock_root/build_artifacts/python-fastjsonschema_1700055509243/work/dist\r\nfilelock==3.13.1\r\nfqdn @ file:///home/conda/feedstock_root/build_artifacts/fqdn_1638810296540/work/dist\r\nfsspec==2023.12.2\r\ngreenlet @ file:///home/conda/feedstock_root/build_artifacts/greenlet_1698243379066/work\r\nhuggingface-hub==0.19.4\r\nidna @ file:///home/conda/feedstock_root/build_artifacts/idna_1701026962277/work\r\nimportlib-metadata @ file:///home/conda/feedstock_root/build_artifacts/importlib-metadata_1701632192416/work\r\nimportlib-resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1699364556997/work\r\nipykernel @ file:///home/conda/feedstock_root/build_artifacts/ipykernel_1698244021190/work\r\nipython @ file:///home/conda/feedstock_root/build_artifacts/ipython_1701703101339/work\r\nipython-genutils==0.2.0\r\nipywidgets==8.1.1\r\nisoduration @ file:///home/conda/feedstock_root/build_artifacts/isoduration_1638811571363/work/dist\r\njedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1696326070614/work\r\nJinja2 @ file:///home/conda/feedstock_root/build_artifacts/jinja2_1654302431367/work\r\njson5 @ file:///home/conda/feedstock_root/build_artifacts/json5_1688248289187/work\r\njsonpatch @ file:///home/conda/feedstock_root/build_artifacts/jsonpatch_1695536281965/work\r\njsonpointer @ file:///home/conda/feedstock_root/build_artifacts/jsonpointer_1695397236330/work\r\njsonschema @ file:///home/conda/feedstock_root/build_artifacts/jsonschema-meta_1700159890288/work\r\njsonschema-specifications @ file:///home/conda/feedstock_root/build_artifacts/jsonschema-specifications_1701365715051/w",
    "url": "https://github.com/huggingface/huggingface_hub/issues/1907",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-12-14T11:45:44Z",
    "updated_at": "2025-03-15T08:03:44Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "huggingface/unity-api",
    "number": 17,
    "title": "Android support",
    "body": "Great repo! My question is - does it work on Android?\r\n\r\nI did some research but couldn't find much - except for some comments on [YouTube](https://www.youtube.com/watch?v=Ngmb7l7tO0I) that speech recognition doesn't really work on Android (\"_when i export to an a Android Device the text always is \"you\", no matter what did i say. I don't know if needs another configuration because in the unity editor works fine_\").\r\n\r\nCould you please clarify?\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/unity-api/issues/17",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-14T11:15:56Z",
    "updated_at": "2024-01-18T10:56:45Z",
    "user": "dogadogan"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 76,
    "title": "can we inference with lora adapter after running the SFT ?",
    "body": "I trained the model using SFT on a custom dataset using lora config, which produced a Lora adapter, can we infer with it like having a base model and this adapter on top of it, or merge it ?",
    "url": "https://github.com/huggingface/alignment-handbook/issues/76",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-14T10:55:20Z",
    "updated_at": "2023-12-28T07:14:29Z",
    "comments": 2,
    "user": "Tejaswi-kashyap-006"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2251,
    "title": "when a tensor is generated from some_func(A.shape) (where A is a tensor), the generated tensor locates in cpu, not A's device",
    "body": "how to solve it ? I have tried tensor.to(A.device) and tensor.to(accelerator.device), but it seems not to work.",
    "url": "https://github.com/huggingface/accelerate/issues/2251",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-14T09:18:15Z",
    "updated_at": "2023-12-14T14:38:17Z",
    "user": "weizhenhuan"
  },
  {
    "repo": "pytorch/serve",
    "number": 2853,
    "title": "Torchserve Error: number of batch response mismatched",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nWe deployed NER Model with n1-standard-8 machine without GPU with below config properties. when we kept batch size as 1, it is taking more time to process the simultaneous requests. when we try to increase the batch size, we are getting below error. (we tried with different batch size like 16,32,64,8 etc and max workers as 1 and 8). I want to process multiple threads simultaneously. Please suggest solution. Do I need to change handler script, if yes, how? How to increase throughput?\r\n\r\n### Error logs\r\n\r\nResponse: response_data: {'code': 503, 'type': 'InternalServerException', 'message': 'number of batch response mismatched'}\r\n\r\n\r\n### Installation instructions\r\n\r\nYes, we are using docker container to deploy the model on vertex ai\r\n\r\n### Model Packaing\r\n\r\nUsing docker and creating a custom prediction container and packaging all the serving scripts like handler.py, config properties etc\r\n\r\n### config.properties\r\n\r\ninference_address=http://0.0.0.0:8090\r\nmanagement_address=http://0.0.0.0:8091\r\nmetrics_address=http://0.0.0.0:8092\r\ninstall_py_dep_per_model=true\r\nprefer_direct_buffer=true\r\njob_queue_size=10000\r\nasync_logging=true\r\nnumber_of_netty_threads=8\r\nnetty_client_threads=8\r\ndefault_workers_per_model=1\r\nmodels={\\\r\n  \"description\": {\\\r\n    \"1.0\": {\\\r\n        \"defaultVersion\": true,\\\r\n        \"marName\": \"description.mar\",\\\r\n        \"minWorkers\": 1,\\\r\n        \"maxWorkers\": 8,\\\r\n        \"batchSize\": 16,\\\r\n        \"maxBatchDelay\": 65,\\\r\n        \"responseTimeout\": 100\\\r\n    }\\\r\n  }\\\r\n}\r\n\r\n### Versions\r\n\r\nwe are using this base image\r\n\r\npytorch/torchserve:latest-gpu\r\n\r\n### Repro instructions\r\n\r\nwe carried out performance testing using 5/10/20 simultaneous users hitting vertex ai endpoint but avg time is around 20 seconds which is very high for 20 simultaneous users.\r\n\r\n### Possible Solution\r\n\r\nHow to optimize the config parameters? Do I need to update handler script? Please suggest a way",
    "url": "https://github.com/pytorch/serve/issues/2853",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2023-12-14T08:33:11Z",
    "updated_at": "2024-01-18T20:11:46Z",
    "comments": 9,
    "user": "rajeshmore1"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2541,
    "title": "\u2753 [Question] Is it possible to export unet's tensorrt engine as a file in stable diffusion?",
    "body": "## \u2753 Question\r\n\r\nHello. I am currently trying to infer the stable diffusion XL inpaint model using your package. \r\nmodel link : https://huggingface.co/diffusers/stable-diffusion-xl-1.0-inpainting-0.1\r\n\r\nI referred to your example code and modified it as follows.\r\n\r\n```python\r\nimport torch\r\n\r\nfrom diffusers import AutoPipelineForInpainting\r\nfrom diffusers.utils import load_image\r\nimport torch_tensorrt\r\n\r\nmodel_id = \"diffusers/stable-diffusion-xl-1.0-inpainting-0.1\"\r\ndevice = \"cuda\"\r\n\r\n# Instantiate Stable Diffusion Pipeline with FP16 weights\r\npipe = AutoPipelineForInpainting.from_pretrained(\r\n    model_id, variant=\"fp16\", torch_dtype=torch.float16\r\n)\r\n\r\npipe = pipe.to(device)\r\nbackend = \"torch_tensorrt\"\r\n\r\n# Optimize the UNet portion with Torch-TensorRT\r\npipe.unet = torch.compile(\r\n    pipe.unet,\r\n    backend=backend,\r\n    options={\r\n        \"truncate_long_and_double\": True,\r\n        \"precision\": torch.float16,\r\n    },\r\n    dynamic=False,\r\n)\r\n\r\n# %%\r\n# Inference\r\n# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nimg_url = \"https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png\"\r\nmask_url = \"https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png\"\r\n\r\nimage = load_image(img_url).resize((1024, 1024))\r\nmask_image = load_image(mask_url).resize((1024, 1024))\r\n\r\nprompt = \"a tiger sitting on a park bench\"\r\n\r\nimage = pipe(\r\n  prompt=prompt,\r\n  image=image,\r\n  mask_image=mask_image,\r\n  guidance_scale=8.0,\r\n  num_inference_steps=20,\r\n  strength=0.99,\r\n  ).images[0]\r\n\r\n\r\nimage.save(\"inpaint-result.png\")\r\n```\r\n\r\nOn my gpu machine the conversion to tensorrt takes over 15 minutes. Since I can't do this conversion every time, I'm trying to find a way to save it in file format such as \".trt\" file and use it.\r\n\r\nWhen looking in your documentation, it was difficult to find such a feature. Do you support these features? If so, please let me know.\r\n\r\n\r\n## What you have already tried\r\n\r\nDescribed above\r\n\r\n## Environment\r\n\r\ndocker container : nvcr.io/nvidia/pytorch:23.11-py3\r\ngpu : p40\r\n\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2541",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-14T08:13:19Z",
    "updated_at": "2023-12-15T22:48:48Z",
    "user": "0-chan-kor"
  },
  {
    "repo": "huggingface/peft",
    "number": 1265,
    "title": "When generate outputs, how to get the probility of the outputs? Is there any param to let the model output probility ?",
    "body": "### Feature request\n\nxx\n\n### Motivation\n\nxx\n\n### Your contribution\n\nxx",
    "url": "https://github.com/huggingface/peft/issues/1265",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-14T08:05:34Z",
    "updated_at": "2023-12-14T10:37:19Z",
    "user": "ShawnALiu"
  },
  {
    "repo": "huggingface/transformers",
    "number": 28025,
    "title": "How to combine two pretrained model in huggingface transformers\uff1f",
    "body": "### Feature request\n\nI want to combine two pretrained model(LLAMA and BERT) in a new  python class. More specific\uff0cThe way I've tried is to define a new class c that inherits llama and load bert in c's \\_\\_init\\_\\_ function. \r\n![image](https://github.com/huggingface/transformers/assets/88258534/c5428b78-68ec-4cc2-8667-587b62853152)\r\n\r\nSo that I can use c.from_pretrained('llama_ckpt_dir') to load two model together.\r\n`model=C.from_pretrained('llama_ckpt_dir',low_cpu_mem_usage=True)`\r\n\r\n After I use c.save_pretrained(),  even the checkpoint keeps total structure of llama and bert ,bert's params are all random initialize(weights Gaussian initialization bias all zero). \uff08I checked this by torch.load the saved c checkpoint and print it out\uff09\r\n\r\nSincerely requesting some help, what should be done?\r\n\r\n\n\n### Motivation\n\nSince trainer can be passed only one model at a time, so it seems a good feature that should be concerned for who wants to do things like train two model together?\r\n\r\nBut there is another difficulty that how to deal with two total diffrent tokenizer from bert and llama(even though this is not required for trainer(since tokenizer usually only used by data preprocess), but I hope I can fix this so that I can completely transform c into a total hf model)\n\n### Your contribution\n\nI'm not sure what I can help, but I can fully support anything that can contribute to this issue. ",
    "url": "https://github.com/huggingface/transformers/issues/28025",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-14T04:45:51Z",
    "updated_at": "2024-01-03T10:26:31Z",
    "user": "rangehow"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 631,
    "title": "Can we add full version number/build number on the landingpage?",
    "body": "Can we add full version number/build number or whatever, on the landingpage?\r\nTo distinguish between different installations.\r\n\r\nIf you go to https://huggingface.co/chat/, it looks like this:\r\n![image](https://github.com/huggingface/chat-ui/assets/1792727/971a2423-6e1f-4e34-944f-2b4450f0263a)\r\n\r\n\r\nIf you go to https://huggingfaceh4-zephyr-chat.hf.space/, it looks like this:\r\n![image](https://github.com/huggingface/chat-ui/assets/1792727/cb8f956e-2b12-4f8e-b948-5ac94688bb0a)\r\n\r\n\r\nSo the version seems to be the same, but the buttons on the right side seems to indicate that there is differences in the version, i would guess? (if not huggingchat is a custom build?)",
    "url": "https://github.com/huggingface/chat-ui/issues/631",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-12-13T10:50:19Z",
    "updated_at": "2023-12-14T14:26:31Z",
    "comments": 4,
    "user": "patchie"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1592,
    "title": "Can optimum.bettertransformer supports LLAVA model?",
    "body": "### System Info\r\n\r\n```shell\r\nLocal NVIDIA env:\r\n(llava) xuyang@nobisuke:~$ nvcc -V\r\nnvcc: NVIDIA (R) Cuda compiler driver\r\nCopyright (c) 2005-2023 NVIDIA Corporation\r\nBuilt on Fri_Jan__6_16:45:21_PST_2023\r\nCuda compilation tools, release 12.0, V12.0.140\r\nBuild cuda_12.0.r12.0/compiler.32267302_0\r\n\r\nPython=3.10.4\r\nTorch==2.0.1+cu117\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n_No response_\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction (minimal, reproducible, runnable)\r\n\r\n```\r\nfrom optimum.bettertransformer import BetterTransformer\r\n\r\nmodel = BetterTransformer.transform(model)\r\n```\r\n\r\n\r\n### Expected behavior\r\n\r\nRecently, we sought to apply the optimum.bettertransformer in LLAVA for fine-tuning. The code run successfully and we found that the memory has decreased significantly.\r\n\r\nHowever, in https://huggingface.co/docs/optimum/v1.15.0/bettertransformer/overview, we found that LLAVA is not in the support list. \r\n\r\nTherefore, we want to confirm that can bettertransformer employ for pre-training or fine-tuning in LLAVA now? ",
    "url": "https://github.com/huggingface/optimum/issues/1592",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-12-13T09:08:35Z",
    "updated_at": "2023-12-13T12:37:13Z",
    "comments": 1,
    "user": "xiaovhua"
  },
  {
    "repo": "huggingface/blog",
    "number": 1702,
    "title": "How to introduce new alphabets in Whisper fine-tuning",
    "body": "Dear @sanchit-gandhi,\r\nI was following your tutorial, [Fine-Tune Whisper For Multilingual ASR with \ud83e\udd17 Transformers](https://huggingface.co/blog/fine-tune-whisper), to fine-tune Whisper with a dataset in the Amharic language. Amharic is used in Whisper training as speech-translation only, [Amharic audio -> corresponding English translation text]. Hence the Amharic alphabets are unseen in Whisper training. \r\nThe dataset I am trying to fine-tune with is [Amharic audio -> corresponding text in Amharic characters]. It consists of 92.28 hours (32901 instances) for training and 9.12 hours (3139 instances) for the testing set. \r\nMy data sources are: \r\n1. https://github.com/getalp/ALFFA_PUBLIC/tree/master/ASR/AMHARIC and \r\n2. https://www.findke.ovgu.de/findke/en/Research/Data+Sets/Amharic+Speech+Corpus.html\r\n\r\nI tried the tiny, base, and small model sizes. In my first run with whisper-small, I observed a bad performance but when tried to play around with some parameters, including the model size, I was unable to run the code even.\r\nI am not quite sure how to introduce the Amharic language characters other than giving the corresponding text as I have seen in the Hindi example.\r\nI would appreciate your comment regarding the language whose characters were not seen in the Whisper training because it was treated as a speech translation only.\r\nThank you!",
    "url": "https://github.com/huggingface/blog/issues/1702",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-13T02:47:31Z",
    "updated_at": "2024-10-02T02:16:12Z",
    "user": "mequanent"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 629,
    "title": "Unable to use Azure AD for OpenID signin",
    "body": "Azure AD does not return the `picture` claim for the `profile` scope which results in a Zod validation error and authentication failing with `HTTP 500`:\r\n\r\n```\r\nchat-ui-chat-ui-1  | 21:07:21 28|index | ZodError: [\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |   {\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     \"code\": \"invalid_type\",\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     \"expected\": \"string\",\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     \"received\": \"undefined\",\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     \"path\": [\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |       \"picture\"\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     ],\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     \"message\": \"Required\"\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |   }\r\nchat-ui-chat-ui-1  | 21:07:21 28|index | ]\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     at get error [as error] (file:///app/node_modules/zod/lib/index.mjs:538:31)\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     at ZodEffects.parse (file:///app/node_modules/zod/lib/index.mjs:638:22)\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     at updateUser (file:///app/build/server/chunks/7-74fde01e.js:34:6)\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     at load (file:///app/build/server/chunks/7-74fde01e.js:126:9)\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     at async load_server_data (file:///app/build/server/index.js:1932:18)\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     at async file:///app/build/server/index.js:3303:18 {\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |   issues: [\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     {\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |       code: 'invalid_type',\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |       expected: 'string',\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |       received: 'undefined',\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |       path: [Array],\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |       message: 'Required'\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     }\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |   ],\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |   addIssue: [Function (anonymous)],\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |   addIssues: [Function (anonymous)],\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |   errors: [\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     {\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |       code: 'invalid_type',\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |       expected: 'string',\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |       received: 'undefined',\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |       path: [Array],\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |       message: 'Required'\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |     }\r\nchat-ui-chat-ui-1  | 21:07:21 28|index |   ]\r\nchat-ui-chat-ui-1  | 21:07:21 28|index | }\r\n```",
    "url": "https://github.com/huggingface/chat-ui/issues/629",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-12-12T21:22:19Z",
    "updated_at": "2024-02-19T09:39:51Z",
    "comments": 8,
    "user": "zacps"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 628,
    "title": "isModelsModalOpen is not defined in ChatIntroduction.svelte probably after recent update ?",
    "body": "Hi getting this error after updating to the latest version :\r\n\r\nAm Running :\r\n{\r\n  'chat-ui': '0.6.0',\r\n  npm: '10.2.4',\r\n  node: '21.3.0',\r\n  acorn: '8.11.2',\r\n  ada: '2.7.4',\r\n  ares: '1.20.1',\r\n  base64: '0.5.1',\r\n  brotli: '1.0.9',\r\n  cjs_module_lexer: '1.2.2',\r\n  cldr: '44.0',\r\n  icu: '74.1',\r\n  llhttp: '9.1.3',\r\n  modules: '120',\r\n  napi: '9',\r\n  nghttp2: '1.58.0',\r\n  nghttp3: '0.7.0',\r\n  ngtcp2: '0.8.1',\r\n  openssl: '3.0.12+quic',\r\n  simdutf: '4.0.4',\r\n  tz: '2023c',\r\n  undici: '5.27.2',\r\n  unicode: '15.1',\r\n  uv: '1.46.0',\r\n  uvwasi: '0.0.19',\r\n  v8: '11.8.172.17-node.17',\r\n  zlib: '1.2.13.1-motley-5daffc7'\r\n}\r\n```\r\n\r\n> chat-ui@0.6.0 dev\r\n> vite dev\r\n\r\n\r\n\r\n  VITE v4.3.9  ready in 1206 ms\r\n\r\n  \u279c  Local:   http://localhost:5173/\r\n  \u279c  Network: use --host to expose\r\n(node:1526125) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.\r\n(Use `node --trace-deprecation ...` to show where the warning was created)\r\n12:13:23 AM [vite-plugin-svelte] /home/user/public_html/chatui3/src/lib/components/chat/ChatIntroduction.svelte:53:7 'isModelsModalOpen' is not defined\r\n12:13:23 AM [vite-plugin-svelte] /home/user/public_html/chatui3/src/lib/components/chat/ChatIntroduction.svelte:54:53 'isModelsModalOpen' is not defined\r\n12:13:23 AM [vite-plugin-svelte] /home/user/public_html/chatui3/src/lib/components/chat/ChatIntroduction.svelte:64:22 'isModelsModalOpen' is not defined\r\nReferenceError: isModelsModalOpen is not defined\r\n    at /home/user/public_html/chatui3/src/lib/components/chat/ChatIntroduction.svelte:61:8\r\n    at Object.$$render (/home/user/public_html/chatui3/node_modules/svelte/src/runtime/internal/ssr.js:156:16)\r\n    at eval (/home/user/public_html/chatui3/src/lib/components/chat/ChatMessages.svelte:75:99)\r\n    at Object.$$render (/home/user/public_html/chatui3/node_modules/svelte/src/runtime/internal/ssr.js:156:16)\r\n    at eval (/home/user/public_html/chatui3/src/lib/components/chat/ChatWindow.svelte:116:102)\r\n    at Object.$$render (/home/user/public_html/chatui3/node_modules/svelte/src/runtime/internal/ssr.js:156:16)\r\n    at /home/user/public_html/chatui3/src/routes/+page.svelte:57:25\r\n    at Object.$$render (/home/user/public_html/chatui3/node_modules/svelte/src/runtime/internal/ssr.js:156:16)\r\n    at Object.default (/home/user/public_html/chatui3/.svelte-kit/generated/root.svelte:50:42)\r\n    at eval (/home/user/public_html/chatui3/src/routes/+layout.svelte:203:39)\r\n```",
    "url": "https://github.com/huggingface/chat-ui/issues/628",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-12-12T18:49:31Z",
    "updated_at": "2023-12-24T07:40:42Z",
    "comments": 7,
    "user": "DrShivang"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 389,
    "title": "How to disable default used --multi_gpu ?",
    "body": "  File \"/app/env/lib/python3.10/site-packages/accelerate/commands/launch.py\", line 822, in _validate_launch_command\r\n    raise ValueError(\"You need to use at least 2 processes to use `--multi_gpu`.\")\r\nValueError: You need to use at least 2 processes to use `--multi_gpu`.\r\n\r\nHow to disable this from the default provided params ? \r\n\r\nCan autotrain be used with the free CPU version ?\r\n\r\nthank you",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/389",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-12T13:32:03Z",
    "updated_at": "2023-12-15T09:21:52Z",
    "user": "FiveTechSoft"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 627,
    "title": "Rlhf data collection feature ",
    "body": "Is it possible to add a way to generate multiple drafts for a given input. And then based on what the user picks save that data so that it can be used for rlhf?",
    "url": "https://github.com/huggingface/chat-ui/issues/627",
    "state": "open",
    "labels": [
      "enhancement",
      "front",
      "back"
    ],
    "created_at": "2023-12-12T13:29:06Z",
    "updated_at": "2023-12-14T08:53:14Z",
    "comments": 0,
    "user": "nivibilla"
  },
  {
    "repo": "huggingface/transformers",
    "number": 27974,
    "title": "how to replace the existing token in a tokenizer",
    "body": "### Feature request\r\n\r\nI have a tokenizer which have lots of preserved tokens like bellow:\r\n```\r\n '<reserved_7>': 100,\r\n '<reserved_8>': 101,\r\n '<reserved_9>': 102,\r\n '<reserved_10>': 103,\r\n '<reserved_11>': 104,\r\n '<reserved_12>': 105,\r\n '<reserved_13>': 106,\r\n '<reserved_14>': 107,\r\n```\r\nI want to replace the '<reserved_7>' with '<|im_start|>' and  replace   '<reserved_8>' with '<|im_end|>'\r\n\r\nwhat I want to get is a tokenizer which can act as below:\r\ntokenizer.encode('<|im_start|>')   => 100\r\n\r\n\r\n### Motivation\r\n\r\nI want to replace the '<reserved_7>' with '<|im_start|>' and  replace   '<reserved_8>' with '<|im_end|>'\r\n\r\n\r\n### Your contribution\r\n\r\nno",
    "url": "https://github.com/huggingface/transformers/issues/27974",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-12T12:59:53Z",
    "updated_at": "2025-05-05T19:18:29Z",
    "user": "muziyongshixin"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2530,
    "title": "\u2753 [Question] The stable diffusion example doesn't work",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\nhttps://github.com/pytorch/TensorRT/blob/main/examples/dynamo/torch_compile_stable_diffusion.py\r\n\r\nI tried executing the above Python code, but conversion to TensorRT failed as shown below.\r\n\r\n```bash\r\nWARNING:torch_tensorrt.dynamo.backend.backends:TRT conversion failed on the subgraph. See trace above. Returning GraphModule forward instead.\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch_tensorrt/dynamo/backend/backends.py\", line 93, in _pretraced_backend\r\n    trt_compiled = compile_module(\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch_tensorrt/dynamo/compile.py\", line 244, in compile_module\r\n    trt_module = convert_module(\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch_tensorrt/dynamo/conversion/conversion.py\", line 33, in convert_module\r\n    module_outputs = module(*torch_inputs)\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch/fx/graph_module.py\", line 726, in call_wrapped\r\n    return self._wrapped_call(self, *args, **kwargs)\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch/fx/graph_module.py\", line 305, in __call__\r\n    raise e\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch/fx/graph_module.py\", line 292, in __call__\r\n    return super(self.cls, obj).__call__(*args, **kwargs)  # type: ignore[misc]\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\", line 1519, in _wrapped_call_impl\r\n    return self._call_impl(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\", line 1528, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"<eval_with_key>.14\", line 6, in forward\r\n    view_10 = torch.ops.aten.view.default(permute_10, [2, -1, 320]);  permute_10 = None\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch/_ops.py\", line 499, in __call__\r\n    return self._op(*args, **kwargs or {})\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch/utils/_stats.py\", line 20, in wrapper\r\n    return fn(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch/_subclasses/fake_tensor.py\", line 1323, in __torch_dispatch__\r\n    return self.dispatch(func, types, args, kwargs)\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch/_subclasses/fake_tensor.py\", line 1621, in dispatch\r\n    r = func(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch/_ops.py\", line 499, in __call__\r\n    return self._op(*args, **kwargs or {})\r\nRuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.\r\n```\r\nIs this an example python that actually passes? Or is there an environment version that needs to be set for this example?\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\nI used the latest version of the pytorch container, nvcr.io/nvidia/pytorch:23.11-py3, and pip installed the latest versions of diffusers and transformers.\r\n\r\n## Additional context\r\nNone",
    "url": "https://github.com/pytorch/TensorRT/issues/2530",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-12T10:35:01Z",
    "updated_at": "2024-10-25T10:30:09Z",
    "user": "0-chan-kor"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 623,
    "title": "ChatUI with Docker - Permissions Issue",
    "body": "I'm trying to use the ChatUI space with Docker. I have a private, custom model which I've trained. \r\nI want to access it in a private space using Docker ChatUI\r\nI seem to be running into permissions errors. \r\n\r\nThings I've tried:\r\nFollowing the instructions set out here: https://huggingface.co/blog/Llama2-for-non-engineers (I used Llama2 with a custom dataset)\r\nCreating it with / without the MongoDB URI\r\nAdding an existing  secret as the HF_TOKEN\r\nCreating a new \"HUGGING_FACE_HUB_TOKEN\" in my settings and in the new space and using that\r\nAddint he new token as a secret in the space where the model was generated\r\nHardcoding the access token in .env.local.template to see if it gives a temp fix (it didn't)\r\nDoes it matter if I don't have a centralised secret that is explicitly named as \"HF_TOKEN\"?\r\n\r\nError:\r\nhuggingface_hub.utils._errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-6576f9fe-00986ef531649f933739e793;0d286b3c-5e65-45c1-a1f9-7efea56654dd)\r\n\r\nError: DownloadError\r\nRepository Not Found for url: https://huggingface.co/api/models/<USERNAME>/<MODELNAME>.\r\nPlease make sure you specified the correct repo_id and repo_type.\r\nIf you are trying to access a private or gated repo, make sure you are authenticated.\r\nInvalid username or password.\r\n\r\n\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\ncurl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused\r\nWarning: Transient problem: connection refused Will retry in 10 seconds. 59 \r\nWarning: retries left.",
    "url": "https://github.com/huggingface/chat-ui/issues/623",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2023-12-12T08:10:31Z",
    "updated_at": "2023-12-28T13:58:22Z",
    "comments": 1,
    "user": "aidansys17"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1332,
    "title": "How can I set log output to local file",
    "body": "### Feature request\n\nI want to set the TGI log to file instead of stdout.\n\n### Motivation\n\nI want to set the TGI log to file instead of stdout.\n\n### Your contribution\n\nhow can I use params in command of env variables to set log output to file.",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1332",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-12-12T07:54:26Z",
    "updated_at": "2024-01-18T01:46:56Z",
    "user": "soulseen"
  },
  {
    "repo": "pytorch/serve",
    "number": 2849,
    "title": "Broken pipe on big response tensors",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nWe have a model which essentially does image segmentation of sorts.  \r\nThe output tensor is of this size: `[batch, 920, 920]`, fp32.   \r\n\r\nI keep getting broken pipe errors in this:   \r\n\r\nFrom my debugging, it essentially fails after I return this tensor from my `postprocess` method in base handler.  \r\nIs there a limit to response size for torchserve?   \r\nThanks for the help!\r\n\r\n\r\n\r\n### Error logs\r\n\r\nthe main container logs:   \r\n```\r\nhariomapp-torchserve-1  | java.lang.InterruptedException: null\r\nhariomapp-torchserve-1  | \tat java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1679) ~[?:?]\r\nhariomapp-torchserve-1  | \tat java.util.concurrent.LinkedBlockingDeque.pollFirst(LinkedBlockingDeque.java:515) ~[?:?]\r\nhariomapp-torchserve-1  | \tat java.util.concurrent.LinkedBlockingDeque.poll(LinkedBlockingDeque.java:677) ~[?:?]\r\nhariomapp-torchserve-1  | \tat org.pytorch.serve.wlm.Model.pollBatch(Model.java:367) ~[model-server.jar:?]\r\nhariomapp-torchserve-1  | \tat org.pytorch.serve.wlm.BatchAggregator.getRequest(BatchAggregator.java:36) ~[model-server.jar:?]\r\nhariomapp-torchserve-1  | \tat org.pytorch.serve.wlm.WorkerThread.run(WorkerThread.java:194) [model-server.jar:?]\r\nhariomapp-torchserve-1  | \tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]\r\nhariomapp-torchserve-1  | \tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]\r\nhariomapp-torchserve-1  | \tat java.lang.Thread.run(Thread.java:833) [?:?]\r\n```\r\n\r\nModel logs\r\n```\r\n2023-12-12T07:11:26,936 [INFO ] W-9000-msk_fracture_4.0.0-stdout MODEL_LOG - Backend worker process died.\r\n2023-12-12T07:11:26,936 [INFO ] W-9000-msk_fracture_4.0.0-stdout MODEL_LOG - Traceback (most recent call last):\r\n2023-12-12T07:11:26,936 [INFO ] W-9000-msk_fracture_4.0.0-stdout MODEL_LOG -   File \"/home/venv/lib/python3.9/site-packages/ts/model_service_worker.py\", line 258, in <module>\r\n2023-12-12T07:11:26,936 [INFO ] W-9000-msk_fracture_4.0.0-stdout MODEL_LOG -     worker.run_server()\r\n2023-12-12T07:11:26,936 [INFO ] W-9000-msk_fracture_4.0.0-stdout MODEL_LOG -   File \"/home/venv/lib/python3.9/site-packages/ts/model_service_worker.py\", line 226, in run_server\r\n2023-12-12T07:11:26,936 [INFO ] W-9000-msk_fracture_4.0.0-stdout MODEL_LOG -     self.handle_connection(cl_socket)\r\n2023-12-12T07:11:26,936 [INFO ] W-9000-msk_fracture_4.0.0-stdout MODEL_LOG -   File \"/home/venv/lib/python3.9/site-packages/ts/model_service_worker.py\", line 183, in handle_connection\r\n2023-12-12T07:11:26,936 [INFO ] W-9000-msk_fracture_4.0.0-stdout MODEL_LOG -     cl_socket.sendall(resp)\r\n2023-12-12T07:11:26,936 [INFO ] W-9000-msk_fracture_4.0.0-stdout MODEL_LOG - BrokenPipeError: [Errno 32] Broken pipe\r\n2023-12-12T07:11:28,676 [INFO ] W-9000-msk_fracture_4.0.0-stdout MODEL_LOG - s_name_part0=/home/model-server/tmp/.ts.sock, s_name_part1=9000, p\r\n```\r\n\r\n\r\n### Installation instructions\r\n\r\nUsing docker, simply ran the stock image in dockerhub\r\n\r\ncompose file:\r\n```yml\r\nversion: '3'\r\nservices:\r\n  torchserve:\r\n    image: pytorch/torchserve:latest-gpu\r\n    ports:\r\n      - 9080:8080\r\n      - 9081:8081\r\n      - 9082:8082\r\n      - 7070:7070\r\n      - 7071:7071\r\n    volumes:\r\n      - ./modelstore:/home/model-server/model-store\r\n    environment:\r\n      - TS_METRICS_MODE=prometheus\r\n    command: torchserve --model-store /home/model-server/model-store\r\n```\r\n\r\n### Model Packaing\r\n\r\nI simply take a tensor as input and return raw tensor generated by model in output.  \r\nEssentially I get a `tuple[dict[str, Tensor], dict[str, Tensor]]` from the model, all tensor values would have the same size and have the batch size as first dimension.\r\n\r\nhandler\r\n\r\n```python\r\nfrom ts.torch_handler.base_handler import BaseHandler\r\nimport pickle\r\nimport base64\r\nimport logging\r\nimport torch\r\n\r\nlogger = logging.getLogger(__name__)\r\n\r\n\r\nclass ModelHandler(BaseHandler):\r\n    def preprocess(self, data):\r\n        all_tensors = [pickle.loads(d[\"body\"]) for d in data]\r\n        result = torch.cat(all_tensors, 0)\r\n        result.to(self.device)\r\n        return result\r\n\r\n    def _single_result(self, data, i):\r\n        \"\"\"\r\n        we get this:\r\n        {\r\n            \"90_rot\": tensor[1.000, 2.999, etc.],\r\n            ...other keys, same structure\r\n        }\r\n\r\n        We take the index'th element out in value, so its tensor[1.00] but its size is torch.Size([])\r\n        t[i].tolist() gives a number, the actual number we want to send back\r\n        But remote expects a [number] format, so we send that\r\n        \"\"\"\r\n        return {\r\n            k: [v[i].tolist()] for k, v in data.items()\r\n        }\r\n\r\n    def _get_len_batch(self, data):\r\n        \"\"\"The final dict has a str[dict, tensor[length]]. The length is the batch size\r\n\r\n        It is guaranteed that for each key, the length of the tensor is the same\r\n        \"\"\"\r\n\r\n        key = next(iter(data))\r\n        return len(data[key])\r\n\r\n    def _single_tuple(sel",
    "url": "https://github.com/pytorch/serve/issues/2849",
    "state": "open",
    "labels": [
      "triaged"
    ],
    "created_at": "2023-12-12T07:30:27Z",
    "updated_at": "2023-12-29T11:17:16Z",
    "comments": 3,
    "user": "hariom-qure"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 74,
    "title": "A question about the SFTTrainer (also a theoretical question about SFT in general)",
    "body": "I have a general question about Supervised Fine Tuning (SFT) for Dialogue applications.\r\n\r\nShould the SFT process use the same LM objective (next-token prediction) that is used in pre-training a language model?\r\n\r\nThe \"Dialogue\" task is predicting \"assistant\" tokens, right? Shouldn't the objective be predicting only those tokens? Is one way to do this is to set labels for only assistant tokens and ignore the labels on others?\r\n\r\nThe SFTTrainer [implementation](https://github.com/huggingface/trl/blob/main/trl/trainer/sft_trainer.py#L381) does not set labels - as far as I understand, this leads to \"labels\" being cloned to \"input_ids\" and shifted right (within transformers code) leading to using \"next-token\" prediction objective.\r\n\r\nMore on a philosophical note - if using the same objective as pre-training for SFT, why shouldn't that be called \"Fine Tuning\" the model (On a dialogue dataset of course) rather than \"Supervised Fine Tuning\". What am I missing? Is there a reference paper that explains this well? The right approach to do SFT for Dialogue applications?\r\n\r\nIt is not obvious hence the question. For example, the [InstructGPT](https://arxiv.org/abs/2203.02155) paper mentions SFT but mainly redirects to the (seemingly) first attempt at SFT in [this](https://arxiv.org/pdf/2109.10862.pdf) paper which talks about a \"Summarization\" task but not a \"Dialogue\" task.\r\n\r\nIn that paper, when human labelers are asked to summarize and then when the paper mentions \"Behavioral Cloning\" is used to finetune the LLM to adapt to this task, I'd imagine that only \"Summary\" section is considered label but not the entire prompt/document. Following that principle, for \"Dialogue\" tasks, intuitively, I'd imagine that only \"assistant\" turns should be part of labels.\r\n\r\n(By the way I already asked [this](https://github.com/huggingface/trl/issues/1083) in trl repository as well but not sure which is the best repository to ask the question (this repository is for alignment tasks in which SFT is a step - hence posted here too).",
    "url": "https://github.com/huggingface/alignment-handbook/issues/74",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-12T06:54:02Z",
    "updated_at": "2024-01-22T14:34:15Z",
    "comments": 3,
    "user": "PradeepKadubandi"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 453,
    "title": "Summarization Parameters not working",
    "body": "### Question\n\nI've tried several of the supported summarization models with the code used in the browser extension example.\r\n\r\nThe only one I get any results from in a reasonable time is t5-small.\r\n\r\nMy problem with it is that despite any parameters I try to pass in the result is always same length.\r\n\r\nI've traced through the code and it appears that the config params get passed in.\r\n\r\nI've tried max_new_tokens, min_new_tokens, max_length, no joy.\r\n\r\nI initially started specifying 2.5.3 and last tried just letting cdn handle it, looks like 2.10.x, no joy, same thing.\r\n\r\nCould someone please provide me with an example of getting, in my case, the t5-small model running a summarization task that implements parameters as to output?",
    "url": "https://github.com/huggingface/transformers.js/issues/453",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-12T06:21:52Z",
    "updated_at": "2023-12-19T21:52:32Z",
    "user": "kwlayman"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 400,
    "title": "torch.nn.Module named_parameters() seem to be failing for safetensors ",
    "body": "### System Info\n\nsafetensors==0.4.1\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Reproduction\n\nNoticed this issue with the new Mixtral model\r\n\r\nhttps://github.com/vllm-project/vllm/issues/2020\r\n\r\nIs there any way to fix this with safetensors?\n\n### Expected behavior\n\nLoad the mixtral model in safe tensor format",
    "url": "https://github.com/huggingface/safetensors/issues/400",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-12-11T18:54:06Z",
    "updated_at": "2024-01-17T01:48:50Z",
    "comments": 1,
    "user": "0-hero"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1583,
    "title": "Add support for Chatglm2 & qwen onnx models",
    "body": "### Feature request\n\nNeed to export ChatGLM2 & Qwen models to onnx using hf optimum.\r\n\r\nChatGLM2: model-card-> [https://huggingface.co/THUDM/chatglm2-6b](https://github.com/huggingface/optimum/issues/url)\r\nQwen: model-card-> [https://huggingface.co/Qwen/Qwen-7B-Chat](https://github.com/huggingface/optimum/issues/url)\n\n### Motivation\n\nI would like to make the process of exporting llm models to onnx simpler. There should be a generic boilerplate code which can export the models to onnx by simply passing hugging_face model_id.\n\n### Your contribution\n\nI have this piece of code for the export: I'm using this code to export chatglm2: [https://gist.github.com/manishghop/9be5aee6ed3d7551c751cc5d9f7eb8c3](https://github.com/huggingface/optimum/issues/url)\r\ni use it for both chatglm2 & qwen by simply updating model_id.\r\n\r\nIs there a way to run the inference of these onnx models?\r\n",
    "url": "https://github.com/huggingface/optimum/issues/1583",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-11T15:22:59Z",
    "updated_at": "2024-04-24T10:21:48Z",
    "comments": 4,
    "user": "manishghop"
  },
  {
    "repo": "huggingface/peft",
    "number": 1247,
    "title": "How to save parameters in prompt_encoder layers in p-tuning?",
    "body": "I want to resume training from checkpoint in p-tuning, but the model only save parameters in prompt_embeddings.\r\n<img width=\"370\" alt=\"image\" src=\"https://github.com/huggingface/peft/assets/58416622/a085224f-32f2-409c-9a51-77c7438bc6a2\">\r\n\r\n",
    "url": "https://github.com/huggingface/peft/issues/1247",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-11T02:44:59Z",
    "updated_at": "2024-01-19T15:03:32Z",
    "user": "lyt719"
  },
  {
    "repo": "huggingface/optimum-benchmark",
    "number": 102,
    "title": "How to evaluate a model that already exists locally and hasn't been uploaded yet, \"model=?\"",
    "body": "![\u5fae\u4fe1\u622a\u56fe_20231211144439](https://github.com/huggingface/optimum-benchmark/assets/89191003/51008a5a-ddf0-420e-a355-d9170ffb7dd6)\r\ni really want to know how to load qwen model, thank you very much",
    "url": "https://github.com/huggingface/optimum-benchmark/issues/102",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-10T08:35:59Z",
    "updated_at": "2024-01-11T08:18:17Z",
    "user": "WCSY-YG"
  },
  {
    "repo": "huggingface/transformers",
    "number": 27928,
    "title": "[Question] What is the main difference between \"AutoModelForCasualLM\" and \"PeftModelForCausalLM\"?",
    "body": "I also wrote it down in peft repo. However this issue is also related to transformers. So i write my question here again.\r\nissue is here in peft(https://github.com/huggingface/peft/issues/1245)\r\n\r\nHello, Sorry for naive question.\r\nI noticed that the``model.generate()`` function performed differently when inferrence right after train with ```trainer.model``` and after merge and unload. (Every params are the same.)\r\nSo I checked two different object with simple print function.\r\nDifference was the object that contains model.\r\n\r\n1. ```model = trainer.model```\r\n```\r\nPeftModelForCausalLM(\r\n  (base_model): LoraModel(\r\n    (model): LlamaForCausalLM(\r\n      (model): LlamaModel(\r\n        (embed_tokens): ModulesToSaveWrapper(\r\n          (original_module): Embedding(32008, 5120)\r\n          (modules_to_save): ModuleDict(\r\n            (default): Embedding(32008, 5120)\r\n          )\r\n        )\r\n        (layers): ModuleList(\r\n          (0-39): 40 x LlamaDecoderLayer(\r\n            (self_attn): LlamaAttention(\r\n              (q_proj): Linear4bit(\r\n                (lora_dropout): ModuleDict(\r\n                  (default): Dropout(p=0.1, inplace=False)\r\n                )\r\n                (lora_A): ModuleDict(\r\n                  (default): Linear(in_features=5120, out_features=64, bias=False)\r\n                )\r\n                (lora_B): ModuleDict(\r\n                  (default): Linear(in_features=64, out_features=5120, bias=False)\r\n                )\r\n                (lora_embedding_A): ParameterDict()\r\n                (lora_embedding_B): ParameterDict()\r\n                (base_layer): Linear4bit(in_features=5120, out_features=5120, bias=False)\r\n              )\r\n              (k_proj): Linear4bit(\r\n                (lora_dropout): ModuleDict(\r\n                  (default): Dropout(p=0.1, inplace=False)\r\n                )\r\n                (lora_A): ModuleDict(\r\n                  (default): Linear(in_features=5120, out_features=64, bias=False)\r\n                )\r\n                (lora_B): ModuleDict(\r\n                  (default): Linear(in_features=64, out_features=5120, bias=False)\r\n                )\r\n                (lora_embedding_A): ParameterDict()\r\n                (lora_embedding_B): ParameterDict()\r\n                (base_layer): Linear4bit(in_features=5120, out_features=5120, bias=False)\r\n              )\r\n              (v_proj): Linear4bit(\r\n                (lora_dropout): ModuleDict(\r\n                  (default): Dropout(p=0.1, inplace=False)\r\n                )\r\n                (lora_A): ModuleDict(\r\n                  (default): Linear(in_features=5120, out_features=64, bias=False)\r\n                )\r\n                (lora_B): ModuleDict(\r\n                  (default): Linear(in_features=64, out_features=5120, bias=False)\r\n                )\r\n                (lora_embedding_A): ParameterDict()\r\n                (lora_embedding_B): ParameterDict()\r\n                (base_layer): Linear4bit(in_features=5120, out_features=5120, bias=False)\r\n              )\r\n              (o_proj): Linear4bit(\r\n                (lora_dropout): ModuleDict(\r\n                  (default): Dropout(p=0.1, inplace=False)\r\n                )\r\n                (lora_A): ModuleDict(\r\n                  (default): Linear(in_features=5120, out_features=64, bias=False)\r\n                )\r\n                (lora_B): ModuleDict(\r\n                  (default): Linear(in_features=64, out_features=5120, bias=False)\r\n                )\r\n                (lora_embedding_A): ParameterDict()\r\n                (lora_embedding_B): ParameterDict()\r\n                (base_layer): Linear4bit(in_features=5120, out_features=5120, bias=False)\r\n              )\r\n              (rotary_emb): LlamaRotaryEmbedding()\r\n            )\r\n            (mlp): LlamaMLP(\r\n              (gate_proj): Linear4bit(\r\n                (lora_dropout): ModuleDict(\r\n                  (default): Dropout(p=0.1, inplace=False)\r\n                )\r\n                (lora_A): ModuleDict(\r\n                  (default): Linear(in_features=5120, out_features=64, bias=False)\r\n                )\r\n                (lora_B): ModuleDict(\r\n                  (default): Linear(in_features=64, out_features=13824, bias=False)\r\n                )\r\n                (lora_embedding_A): ParameterDict()\r\n                (lora_embedding_B): ParameterDict()\r\n                (base_layer): Linear4bit(in_features=5120, out_features=13824, bias=False)\r\n              )\r\n              (up_proj): Linear4bit(\r\n                (lora_dropout): ModuleDict(\r\n                  (default): Dropout(p=0.1, inplace=False)\r\n                )\r\n                (lora_A): ModuleDict(\r\n                  (default): Linear(in_features=5120, out_features=64, bias=False)\r\n                )\r\n                (lora_B): ModuleDict(\r\n                  (default): Linear(in_features=64, out_features=13824, bias=False)\r\n                )\r\n                (lora_embedding_A): ParameterDict()\r\n                (lora_embedding_B): ParameterDict()\r\n                (base_layer): Linear4bit(i",
    "url": "https://github.com/huggingface/transformers/issues/27928",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-10T03:10:36Z",
    "updated_at": "2024-02-01T00:49:07Z",
    "user": "daehuikim"
  },
  {
    "repo": "huggingface/peft",
    "number": 1245,
    "title": "[Question] What is the main difference between \"AutoModelForCasualLM\" and \"PeftModelForCausalLM\"?",
    "body": "Because This is is related to \"transformers\". Therefore I wrote this question in transformers repo either.\r\nissue is here in transformers(https://github.com/huggingface/transformers/issues/27928)\r\n\r\nHello, Sorry for naive question.\r\nI noticed that the``model.generate()`` function performed differently when inferrence right after train with ```trainer.model``` and after merge and unload. (Every params are the same.)\r\nSo I checked two different object with simple print function.\r\nDifference was the object that contains model.\r\n\r\n1. ```model = trainer.model```\r\n```\r\nPeftModelForCausalLM(\r\n  (base_model): LoraModel(\r\n    (model): LlamaForCausalLM(\r\n      (model): LlamaModel(\r\n        (embed_tokens): ModulesToSaveWrapper(\r\n          (original_module): Embedding(32008, 5120)\r\n          (modules_to_save): ModuleDict(\r\n            (default): Embedding(32008, 5120)\r\n          )\r\n        )\r\n        (layers): ModuleList(\r\n          (0-39): 40 x LlamaDecoderLayer(\r\n            (self_attn): LlamaAttention(\r\n              (q_proj): Linear4bit(\r\n                (lora_dropout): ModuleDict(\r\n                  (default): Dropout(p=0.1, inplace=False)\r\n                )\r\n                (lora_A): ModuleDict(\r\n                  (default): Linear(in_features=5120, out_features=64, bias=False)\r\n                )\r\n                (lora_B): ModuleDict(\r\n                  (default): Linear(in_features=64, out_features=5120, bias=False)\r\n                )\r\n                (lora_embedding_A): ParameterDict()\r\n                (lora_embedding_B): ParameterDict()\r\n                (base_layer): Linear4bit(in_features=5120, out_features=5120, bias=False)\r\n              )\r\n              (k_proj): Linear4bit(\r\n                (lora_dropout): ModuleDict(\r\n                  (default): Dropout(p=0.1, inplace=False)\r\n                )\r\n                (lora_A): ModuleDict(\r\n                  (default): Linear(in_features=5120, out_features=64, bias=False)\r\n                )\r\n                (lora_B): ModuleDict(\r\n                  (default): Linear(in_features=64, out_features=5120, bias=False)\r\n                )\r\n                (lora_embedding_A): ParameterDict()\r\n                (lora_embedding_B): ParameterDict()\r\n                (base_layer): Linear4bit(in_features=5120, out_features=5120, bias=False)\r\n              )\r\n              (v_proj): Linear4bit(\r\n                (lora_dropout): ModuleDict(\r\n                  (default): Dropout(p=0.1, inplace=False)\r\n                )\r\n                (lora_A): ModuleDict(\r\n                  (default): Linear(in_features=5120, out_features=64, bias=False)\r\n                )\r\n                (lora_B): ModuleDict(\r\n                  (default): Linear(in_features=64, out_features=5120, bias=False)\r\n                )\r\n                (lora_embedding_A): ParameterDict()\r\n                (lora_embedding_B): ParameterDict()\r\n                (base_layer): Linear4bit(in_features=5120, out_features=5120, bias=False)\r\n              )\r\n              (o_proj): Linear4bit(\r\n                (lora_dropout): ModuleDict(\r\n                  (default): Dropout(p=0.1, inplace=False)\r\n                )\r\n                (lora_A): ModuleDict(\r\n                  (default): Linear(in_features=5120, out_features=64, bias=False)\r\n                )\r\n                (lora_B): ModuleDict(\r\n                  (default): Linear(in_features=64, out_features=5120, bias=False)\r\n                )\r\n                (lora_embedding_A): ParameterDict()\r\n                (lora_embedding_B): ParameterDict()\r\n                (base_layer): Linear4bit(in_features=5120, out_features=5120, bias=False)\r\n              )\r\n              (rotary_emb): LlamaRotaryEmbedding()\r\n            )\r\n            (mlp): LlamaMLP(\r\n              (gate_proj): Linear4bit(\r\n                (lora_dropout): ModuleDict(\r\n                  (default): Dropout(p=0.1, inplace=False)\r\n                )\r\n                (lora_A): ModuleDict(\r\n                  (default): Linear(in_features=5120, out_features=64, bias=False)\r\n                )\r\n                (lora_B): ModuleDict(\r\n                  (default): Linear(in_features=64, out_features=13824, bias=False)\r\n                )\r\n                (lora_embedding_A): ParameterDict()\r\n                (lora_embedding_B): ParameterDict()\r\n                (base_layer): Linear4bit(in_features=5120, out_features=13824, bias=False)\r\n              )\r\n              (up_proj): Linear4bit(\r\n                (lora_dropout): ModuleDict(\r\n                  (default): Dropout(p=0.1, inplace=False)\r\n                )\r\n                (lora_A): ModuleDict(\r\n                  (default): Linear(in_features=5120, out_features=64, bias=False)\r\n                )\r\n                (lora_B): ModuleDict(\r\n                  (default): Linear(in_features=64, out_features=13824, bias=False)\r\n                )\r\n                (lora_embedding_A): ParameterDict()\r\n                (lora_embedding_B): ParameterDict()\r\n                (base_layer): Linear4bit",
    "url": "https://github.com/huggingface/peft/issues/1245",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-10T03:08:54Z",
    "updated_at": "2023-12-11T11:15:25Z",
    "user": "daehuikim"
  },
  {
    "repo": "pytorch/serve",
    "number": 2841,
    "title": "Not able to get the data for inference when using custom handler",
    "body": "I team, I have created my own custom handler by referencing to the base-handler and the vision-handler. What I am observing is that, when I pass data to the model for inference, the data is not reaching to the hosted model endpoint. \r\n\r\nThe exact error I am getting is: \r\n```\r\n2023-12-09T20:08:03,580 [INFO ] W-9000-vit_l_16_1.0-stdout MODEL_LOG - Invoking custom service failed.\r\n2023-12-09T20:08:03,580 [INFO ] W-9000-vit_l_16_1.0-stdout MODEL_LOG - Traceback (most recent call last):\r\n2023-12-09T20:08:03,580 [INFO ] W-9000-vit_l_16_1.0-stdout MODEL_LOG -   File \"/opt/conda/envs/pytorch/lib/python3.10/site-packages/ts/service.py\", line 120, in predict\r\n2023-12-09T20:08:03,581 [INFO ] W-9000-vit_l_16_1.0-stdout MODEL_LOG -     ret = self._entry_point(input_batch, self.context)\r\n2023-12-09T20:08:03,581 [INFO ] W-9000-vit_l_16_1.0-stdout MODEL_LOG -   File \"/tmp/models/6ffe80d83e5341da81fe21bda0d735e0/custom_handler.py\", line 139, in handle\r\n2023-12-09T20:08:03,581 [INFO ] W-9000-vit_l_16_1.0-stdout MODEL_LOG -     model_input = self.data_preprocess(data)\r\n2023-12-09T20:08:03,582 [INFO ] W-9000-vit_l_16_1.0-stdout MODEL_LOG -   File \"/tmp/models/6ffe80d83e5341da81fe21bda0d735e0/custom_handler.py\", line 91, in data_preprocess\r\n2023-12-09T20:08:03,583 [INFO ] W-9000-vit_l_16_1.0-stdout MODEL_LOG -     image = Image.open(io.BytesIO(image))\r\n2023-12-09T20:08:03,585 [INFO ] W-9000-vit_l_16_1.0-stdout MODEL_LOG -   File \"/opt/conda/envs/pytorch/lib/python3.10/site-packages/PIL/Image.py\", line 3280, in open\r\n2023-12-09T20:08:03,586 [INFO ] W-9000-vit_l_16_1.0-stdout MODEL_LOG -     raise UnidentifiedImageError(msg)\r\n2023-12-09T20:08:03,586 [INFO ] W-9000-vit_l_16_1.0-stdout MODEL_LOG - PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f7677de3ce0>\r\n``` \r\n\r\n---\r\n\r\nWhen I printed my \"data\" before passing it for preprocessing, this is what I got: \r\n\r\n```\r\n2023-12-09T19:43:42,421 [INFO ] W-9000-vit_l__1.0-stdout MODEL_LOG - data:  [{'data': bytearray(b'{\"payload\":{\"allShortcutsEnabled\":false,\"fileTree\":{\"examples/image_classifier/mnist/test_data\":{\"items\":[{\"name\":\"0.png\",\"path\":\"examples/image_classifier/mnist/test_data/0.png\",\"contentType\":\"file\"},{\"name\":\"1.png\",\"path\":\"examples/image_classifier/mnist/test_data/1.png\",\"contentType\":\"file\"},{\"name\":\"2.png\",\"path\":\"examples/image_classifier/mnist/test_data/2.png\",\"contentType\":\"file\"},{\"name\":\"3.png\",\"path\":\"examples/image_classifier/mnist/test_data/3.png\",\"contentType\":\"file\"},{\"name\":\"4.png\",\"path\":\"examples/image_classifier/mnist/test_data/4.png\",\"contentType\":\"file\"},{\"name\":\"5.png\",\"path\":\"examples/image_classifier/mnist/test_data/5.png\",\"contentType\":\"file\"},{\"name\":\"6.png\",\"path\":\"examples/image_classifier/mnist/test_data/6.png\",\"contentType\":\"file\"},{\"name\":\"7.png\",\"path\":\"examples/image_classifier/mnist/test_data/7.png\",\"contentType\":\"file\"},{\"name\":\"8.png\",\"path\":\"examples/image_classifier/mnist/test_data/8.png\",\"contentType\":\"file\"},{\"name\":\"9.png\",\"path\":\"examples/image_classifier/mnist/test_data/9.png\",\"contentType\":\"file\"}],\"totalCount\":10},\"examples/image_classifier/mnist\":{\"items\":[{\"name\":\"screenshots\",\"path\":\"examples/image_classifier/mnist/screenshots\",\"contentType\":\"directory\"},{\"name\":\"test_data\",\"path\":\"examples/image_classifier/mnist/test_data\",\"contentType\":\"directory\"},{\"name\":\"torchdata\",\"path\":\"examples/image_classifier/mnist/torchdata\",\"contentType\":\"directory\"},{\"name\":\"Docker.md\",\"path\":\"examples/image_classifier/mnist/Docker.md\",\"contentType\":\"file\"},{\"name\":\"README.md\",\"path\":\"examples/image_classifier/mnist/README.md\",\"contentType\":\"file\"},{\"name\":\"config.properties\",\"path\":\"examples/image_classifier/mnist/config.properties\",\"contentType\":\"file\"},{\"name\":\"mnist.py\",\"path\":\"examples/image_classifier/mnist/mnist.py\",\"contentType\":\"file\"},{\"name\":\"mnist_cnn.pt\",\"path\":\"examples/image_classifier/mnist/mnist_cnn.pt\",\"contentType\":\"file\"},{\"name\":\"mnist_handler.py\",\"path\":\"examples/image_classifier/mnist/mnist_handler.py\",\"contentType\":\"file\"},{\"name\":\"mnist_ts.json\",\"path\":\"examples/image_classifier/mnist/mnist_ts.json\",\"contentType\":\"file\"}],\"totalCount\":10},\"examples/image_classifier\":{\"items\":[{\"name\":\"alexnet\",\"path\":\"examples/image_classifier/alexnet\",\"contentType\":\"directory\"},{\"name\":\"densenet_161\",\"path\":\"examples/image_classifier/densenet_161\",\"contentType\":\"directory\"},{\"name\":\"mnist\",\"path\":\"examples/image_classifier/mnist\",\"contentType\":\"directory\"},{\"name\":\"near_real_time_video\",\"path\":\"examples/image_classifier/near_real_time_video\",\"contentType\":\"directory\"},{\"name\":\"resnet_152_batch\",\"path\":\"examples/image_classifier/resnet_152_batch\",\"contentType\":\"directory\"},{\"name\":\"resnet_18\",\"path\":\"examples/image_classifier/resnet_18\",\"contentType\":\"directory\"},{\"name\":\"squeezenet\",\"path\":\"examples/image_classifier/squeezenet\",\"contentType\":\"directory\"},{\"name\":\"vgg_16\",\"path\":\"examples/image_classifier/vgg_16\",\"contentType\":\"directory\"},{\"name\":\"README.md\",\"path\":\"examples/image_classifier/README.md\",\"conten",
    "url": "https://github.com/pytorch/serve/issues/2841",
    "state": "closed",
    "labels": [
      "triaged_wait",
      "support"
    ],
    "created_at": "2023-12-09T20:10:19Z",
    "updated_at": "2023-12-23T17:13:36Z",
    "comments": 2,
    "user": "yogendra-yatnalkar"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6113,
    "title": "How to use the models from sd_control_collection hf repo in diffusers",
    "body": "How to load/convert the models at https://huggingface.co/lllyasviel/sd_control_collection/tree/main with diffusers?\r\n\r\n```\r\n>>> pipe = diffusers.StableDiffusionPipeline.from_single_file(\"diffusers_xl_canny_full.safetensors\")\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/home/ubuntu/.local/lib/python3.10/site-packages/diffusers/loaders/single_file.py\", line 261, in from_single_file\r\n    pipe = download_from_original_stable_diffusion_ckpt(\r\n  File \"/home/ubuntu/.local/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py\", line 1436, in download_from_original_stable_diffusion_ckpt\r\n    converted_unet_checkpoint = convert_ldm_unet_checkpoint(\r\n  File \"/home/ubuntu/.local/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py\", line 426, in convert_ldm_unet_checkpoint\r\n    new_checkpoint[\"time_embedding.linear_1.weight\"] = unet_state_dict[\"time_embed.0.weight\"]\r\nKeyError: 'time_embed.0.weight'\r\n```\r\nAlso not able to convert it via hf script: https://github.com/huggingface/diffusers/blob/main/scripts/convert_original_controlnet_to_diffusers.py\r\n\r\nWe are able to run it through https://github.com/AUTOMATIC1111 webui. How can it be used with diffusers?",
    "url": "https://github.com/huggingface/diffusers/issues/6113",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-09T14:11:26Z",
    "updated_at": "2024-06-11T18:22:03Z",
    "user": "anilsathyan7"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2525,
    "title": "\u2753[Question] The only valid use of a module is looking up an attribute but found...",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nHello, I have a torch scripted model that I am trying to compile with TensorRT: \r\n```py\r\nimport cv2\r\nimport numpy as np\r\nimport torch\r\nfrom torchvision.transforms import ToTensor\r\nimport torch_tensorrt\r\n\r\nif __name__ == \"__main__\":\r\n    # Load the pre-trained model\r\n    model = torch.jit.load('model.jit')\r\n\r\n    # Define sample points and bounding box labels\r\n    pts_sampled = np.array([[100, 100], [800, 800]])\r\n    bbox = torch.reshape(torch.tensor(pts_sampled), [1, 1, 2, 2])\r\n    bbox_labels = torch.reshape(torch.tensor([2, 3]), [1, 1, 2])\r\n\r\n    # Read and preprocess the image\r\n    image = cv2.imread('image.jpg')\r\n    image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)\r\n    img_tensor = ToTensor()(image)\r\n\r\n    # Compile the model with TensorRT\r\n    with torch_tensorrt.logging.debug():\r\n        trt_model = torch_tensorrt.compile(model, \r\n            inputs=[img_tensor[None, ...].cuda(),\r\n                    bbox.cuda(),\r\n                    bbox_labels.cuda()],\r\n            enabled_precisions={torch.float32},\r\n            workspace_size=2000000000,\r\n            truncate_long_and_double=True\r\n        )\r\n```\r\n\r\nThis returns the following debug information and error:\r\n```sh\r\nINFO: [Torch-TensorRT] - ir was set to default, using TorchScript as ir\r\nDEBUG: [Torch-TensorRT] - TensorRT Compile Spec: {\r\n    \"Inputs\": [\r\nInput(shape=(1,3,1080,1920,), dtype=Float, format=Contiguous/Linear/NCHW, tensor_domain=[0, 2))Input(shape=(1,1,2,2,), dtype=Long, format=Contiguous/Linear/NCHW, tensor_domain=[0, 2))Input(shape=(1,1,2,), dtype=Long, format=Contiguous/Linear/NCHW, tensor_domain=[0, 2))    ]\r\n    \"Enabled Precision\": [Float, ]\r\n    \"TF32 Disabled\": 0\r\n    \"Sparsity\": 0\r\n    \"Refit\": 0\r\n    \"Debug\": 0\r\n    \"Device\":  {\r\n        \"device_type\": GPU\r\n        \"allow_gpu_fallback\": False\r\n        \"gpu_id\": 0\r\n        \"dla_core\": -1\r\n    }\r\n\r\n    \"Engine Capability\": Default\r\n    \"Num Avg Timing Iters\": 1\r\n    \"Workspace Size\": 2000000000\r\n    \"DLA SRAM Size\": 1048576\r\n    \"DLA Local DRAM Size\": 1073741824\r\n    \"DLA Global DRAM Size\": 536870912\r\n    \"Truncate long and double\": 1\r\n    \"Allow Shape tensors\": 0\r\n    \"Torch Fallback\":  {\r\n        \"enabled\": True\r\n        \"min_block_size\": 3\r\n        \"forced_fallback_operators\": [\r\n        ]\r\n        \"forced_fallback_modules\": [\r\n        ]\r\n    }\r\n}\r\nDEBUG: [Torch-TensorRT] - init_compile_spec with input vector\r\nDEBUG: [Torch-TensorRT] - Settings requested for Lowering:\r\n    torch_executed_modules: [\r\n    ]\r\nTraceback (most recent call last):\r\n  File \"/home/jupyter/main.py\", line 79, in <module>\r\n    trt_model = torch_tensorrt.compile(model, \r\n  File \"/home/jupyter/venv/lib/python3.9/site-packages/torch_tensorrt/_compile.py\", line 133, in compile\r\n    return torch_tensorrt.ts.compile(\r\n  File \"/home/jupyter/venv/lib/python3.9/site-packages/torch_tensorrt/ts/_compiler.py\", line 139, in compile\r\n    compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))\r\nRuntimeError: \r\ntemporary: the only valid use of a module is looking up an attribute but found  = prim::SetAttr[name=\"W\"](%self.1, %345)\r\n```\r\n\r\nLooking to understand what my options are and what I can change to successfully compile.\r\n\r\n## Environment\r\n```sh\r\nPyTorch version: 2.0.1+cu117\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.7\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Debian GNU/Linux 11 (bullseye) (x86_64)\r\nGCC version: (Debian 10.2.1-6) 10.2.1 20210110\r\nClang version: Could not collect\r\nCMake version: version 3.27.9\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.9.2 (default, Feb 28 2021, 17:03:44)  [GCC 10.2.1 20210110] (64-bit runtime)\r\nPython platform: Linux-5.10.0-26-cloud-amd64-x86_64-with-glibc2.31\r\nIs CUDA available: True\r\nCUDA runtime version: 11.8.89\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: GPU 0: NVIDIA L4\r\nNvidia driver version: 525.105.17\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                       x86_64\r\nCPU op-mode(s):                     32-bit, 64-bit\r\nByte Order:                         Little Endian\r\nAddress sizes:                      46 bits physical, 48 bits virtual\r\nCPU(s):                             8\r\nOn-line CPU(s) list:                0-7\r\nThread(s) per core:                 2\r\nCore(s) per socket:                 4\r\nSocket(s):                          1\r\nNUMA node(s):                       1\r\nVendor ID:                          GenuineIntel\r\nCPU family:                         6\r\nModel:                              85\r\nModel name:                         Intel(R) Xeon(R) CPU @ 2.20GHz\r\nStepping:                           7\r\nCPU MHz:                            2200.222\r\nBogoMIPS:                           4400.44\r\nHypervisor vendor:                  KVM\r\nVirtualization type:                full\r\nL1d cache:                          128 KiB\r\nL1i cache:                          128 KiB\r\nL2 cache:                ",
    "url": "https://github.com/pytorch/TensorRT/issues/2525",
    "state": "closed",
    "labels": [
      "question",
      "component: lowering"
    ],
    "created_at": "2023-12-08T23:09:04Z",
    "updated_at": "2024-06-11T18:33:42Z",
    "user": "edmuthiah"
  },
  {
    "repo": "pytorch/torchx",
    "number": 798,
    "title": "Combine / rename `dist.ddp` and `dist.spmd` into `dist.torchrun`",
    "body": "## Description\r\nCurrently, `dist.ddp` and `dist.spmd` are basically identical (the latter being a lightweight wrapper on the former). Also, they could be named more explicitly \u2014 `dist.ddp` doesn't actually involve Distributed Data Parallel, it just calls `torchrun`.\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\nAll else equal, simplification and explicit naming are good. For example, users leveraging Fully Sharded Data Parallel instead of DDP may find it confusing that they should be using `dist.ddp`.\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\nRefactor `components/dist.py` by combining the methods for `ddp` and `spmd` into one method called `torchrun`. Update docs, tests, examples, and callsites as appropriate.\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n1. Leave thing as-is.\r\n2. Remove `ddp` by rolling it into `spmd` and keep the `spmd` method, so `dist.spmd` is the only available command and it has a \"good enough\" name.\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n@danielbear",
    "url": "https://github.com/meta-pytorch/torchx/issues/798",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-08T21:23:31Z",
    "updated_at": "2023-12-08T21:31:54Z",
    "comments": 0,
    "user": "schmidt-ai"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1410,
    "title": "How to create Tokenizer.json?",
    "body": "I have this tokenizer and I want to convert it to **tokenizer.json** format.\r\n\r\n- added_tokens.json  \r\n- normalizer.json           \r\n- special_tokens_map.json\r\n- config.json        \r\n- preprocessor_config.json  \r\n- vocab.json\r\n- merges.txt         \r\n- pytorch_model.bin\r\n\r\nIs it possible to replace my tokenizer data with the original **tokenizer.json**?\r\n\r\n```\r\nimport json\r\n\r\nj = open('hf/tokenizer.json')\r\ndata = json.load(j)\r\n\r\nwith open('medium-tokenizer/merges.txt') as f:\r\n    merges = f.readlines()\r\nmerges.pop(0)\r\n\r\nj = open('medium-tokenizer/vocab.json')\r\nvocab = json.load(j)\r\nj = open('medium-tokenizer/added_tokens.json')\r\nadded_tokens = json.load(j)\r\nj = open('medium-tokenizer/normalizer.json')\r\nnormalizer = json.load(j)\r\n\r\ndata['added_tokens'] = added_tokens\r\ndata['normalizer'] = normalizer\r\ndata['model']['vocab'] = vocab\r\ndata['model']['merges'] = merges\r\n\r\nwith open(\"tokenizer.json\", \"w\") as outfile:\r\n    json.dump(data, outfile)\r\n```",
    "url": "https://github.com/huggingface/tokenizers/issues/1410",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-12-08T09:41:18Z",
    "updated_at": "2024-01-14T01:52:39Z",
    "user": "kenaii"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1577,
    "title": "Support the ORT of the Stable Diffusion XL inpaint model",
    "body": "### Feature request\r\n\r\nHi all.\r\n\r\nWe would like to convert the stable-diffusion-xl-inpaint model below to ONNX and run it using ORT. The conversion to ONNX went well using Optimum's cli, but there doesn't seem to be a Python class for ORT inference.\r\n\r\nhttps://huggingface.co/diffusers/stable-diffusion-xl-1.0-inpainting-0.1\r\n\r\nIs there a way to perform inference on this model with the optimum package? If not, do you have any plans to provide support?\r\n\r\nThank you\r\n\r\n### Motivation\r\n\r\nTo run sd-xl inpaint model with ORT\r\n\r\n### Your contribution\r\n\r\nI can submit a PR for you if I have something to help",
    "url": "https://github.com/huggingface/optimum/issues/1577",
    "state": "closed",
    "labels": [
      "feature-request",
      "Stale"
    ],
    "created_at": "2023-12-08T09:21:06Z",
    "updated_at": "2025-02-19T02:02:54Z",
    "comments": 2,
    "user": "0-chan-kor"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 617,
    "title": "Does Chat-UI support multithreading?",
    "body": "Maybe it depends on node.js, but I want to know the CPU utilization.",
    "url": "https://github.com/huggingface/chat-ui/issues/617",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-08T05:36:18Z",
    "updated_at": "2023-12-14T07:30:01Z",
    "user": "calycekr"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 615,
    "title": "npm run error (latest git pull)",
    "body": "I created a .env.local as:\r\n```\r\nMONGODB_URL=mongodb://localhost:27017\r\nMONGODB_DB_NAME=chat-ui\r\nMONGODB_DIRECT_CONNECTION=false\r\n\r\nCOOKIE_NAME=hf-chat\r\nHF_TOKEN=\r\nHF_API_ROOT=https://api-inference.huggingface.co/models\r\nOPENAI_API_KEY=\r\n\r\n```\r\nThen I tried:\r\n```\r\nnpm install #everything went fine\r\nnpm run dev -- --host 0.0.0.0\r\n```\r\n\r\nbut I got the error below:\r\n```\r\n(node:770942) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.\r\n(Use `node --trace-deprecation ...` to show where the warning was created)\r\n11:47:42 AM [vite] Error when evaluating SSR module /src/lib/server/auth.ts:\r\n|- SyntaxError: \"undefined\" is not valid JSON\r\n    at JSON.parse (<anonymous>)\r\n    at /home/shuther/devProjects/chat-ui/src/lib/server/auth.ts:43:14\r\n    at async instantiateModule (file:///home/shuther/devProjects/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:54405:9)\r\n\r\n11:47:42 AM [vite] Error when evaluating SSR module /src/hooks.server.ts: failed to import \"/src/lib/server/auth.ts\"\r\n|- SyntaxError: \"undefined\" is not valid JSON\r\n    at JSON.parse (<anonymous>)\r\n    at /home/shuther/devProjects/chat-ui/src/lib/server/auth.ts:43:14\r\n    at async instantiateModule (file:///home/shuther/devProjects/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:54405:9)\r\n\r\nSyntaxError: \"undefined\" is not valid JSON\r\n    at JSON.parse (<anonymous>)\r\n    at /home/shuther/devProjects/chat-ui/src/lib/server/auth.ts:43:14\r\n    at async instantiateModule (file:///home/shuther/devProjects/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:54405:9)\r\nSyntaxError: \"undefined\" is not valid JSON\r\n    at JSON.parse (<anonymous>)\r\n    at /home/shuther/devProjects/chat-ui/src/lib/server/auth.ts:43:14\r\n    at async instantiateModule (file:///home/shuther/devProjects/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:54405:9)\r\n\r\n```\r\n\r\nOn the browser side, I have error 500 (nice picture)",
    "url": "https://github.com/huggingface/chat-ui/issues/615",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-12-07T10:59:53Z",
    "updated_at": "2024-04-24T12:29:46Z",
    "comments": 4,
    "user": "shuther"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 614,
    "title": "Docker build - multiple errors - documentation",
    "body": "I can't find documentation to build it myself; so I tried:\r\n`docker-compose build up`\r\nBut I got multiple errors amoung:\r\n\r\n> chat-ui/.env: line 23: unexpected character \"\\\"\" in variable name \"\\\"PROVIDER_URL\\\": \\\"\\\",\"\r\n\r\nEven `source .env` returned multiple errors; I tried to change the `into a ' with no luck.\r\n\r\nMy goal was to build it and include it into a docker compose.",
    "url": "https://github.com/huggingface/chat-ui/issues/614",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2023-12-07T10:55:04Z",
    "updated_at": "2024-06-01T12:44:18Z",
    "comments": 4,
    "user": "shuther"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1318,
    "title": "how to run tgi installed locally without any UI",
    "body": "### System Info\n\nhow to run tgi installed locally without any UI?\r\n pip install text-generation , giving error: ERROR: No matching distribution found for text-generation\n\n### Information\n\n- [ ] Docker\n- [X] The CLI directly\n\n### Tasks\n\n- [X] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\n pip install text-generation\n\n### Expected behavior\n\nneed some help running tgi+my model on cmdline",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1318",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-12-07T08:47:13Z",
    "updated_at": "2024-01-13T01:46:40Z",
    "user": "poojitharamachandra"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 376,
    "title": "How to a Autotrain Seq2Seq ? ",
    "body": "Hi everyone , I'm trying to finetune a Helsinki-NLP/opus-mt-tc-big-ar-en on local arabic of morocco which is called Daraija Arabic , the problem is that I'm unable to use Autotrain I keep getting 500 error code \r\n![Screenshot 2023-12-07 011848](https://github.com/huggingface/autotrain-advanced/assets/112639221/ece3ee15-9f89-44ff-bf51-c5231f1858e7)\r\n![Screenshot 2023-12-07 011912](https://github.com/huggingface/autotrain-advanced/assets/112639221/2dea03ae-afcd-4e86-a7b3-d175ff6bc555)\r\n[output.csv](https://github.com/huggingface/autotrain-advanced/files/13593069/output.csv)\r\nFYI : I didnt modify Training Parameters (find params to copy-paste [here] area so I dont know if its necessary ",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/376",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-07T00:22:46Z",
    "updated_at": "2023-12-08T17:27:57Z",
    "user": "Lachkar-Ahmed-Salim"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 375,
    "title": "How to do a Seq2Seq Autotrain ?",
    "body": "",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/375",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-07T00:10:33Z",
    "updated_at": "2023-12-11T09:41:24Z",
    "user": "Lachkar-Ahmed-Salim"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 68,
    "title": "DPO alignment doesn't work on Lora models as suggested  ",
    "body": "You claim that \"[In practice, we find comparable performance for both full and LoRA fine-tuning, with the latter having the advantage of producing small adapter weights that are fast to upload and download from the Hugging Face Hub.](https://github.com/huggingface/alignment-handbook/tree/main/scripts#:~:text=In%20practice%2C%20we%20find%20comparable%20performance%20for%20both%20full%20and%20LoRA%20fine%2Dtuning%2C%20with%20the%20latter%20having%20the%20advantage%20of%20producing%20small%20adapter%20weights%20that%20are%20fast%20to%20upload%20and%20download%20from%20the%20Hugging%20Face%20Hub.)\"\r\n\r\nHowever, when I try the Lora model DPO-aligned LLM that you have trained, [alignment-handbook/zephyr-7b-dpo-lora](https://huggingface.co/alignment-handbook/zephyr-7b-dpo-lora), I experience a total performance degradation. \r\nHere is an example of model output that seems confused:\r\n![image](https://github.com/huggingface/alignment-handbook/assets/3280518/1c5eae99-9641-469a-bb73-b66a26a594d4)\r\n\r\nEven the training loss indicates that the model has not learned much\r\n<img width=\"773\" alt=\"image\" src=\"https://github.com/huggingface/alignment-handbook/assets/3280518/550451f4-4afb-470c-ace7-71b332bb5087\">\r\n\r\nHere is the training loss for the full model DPO alignment. \r\n![image](https://github.com/huggingface/alignment-handbook/assets/3280518/902aaf32-0446-4ab1-8e38-28afcd456fed)\r\n \r\nWould you please do a clarification? Is my observation different from what you have experienced?\r\n\r\nThanks\r\n",
    "url": "https://github.com/huggingface/alignment-handbook/issues/68",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-06T19:12:30Z",
    "updated_at": "2023-12-07T09:43:32Z",
    "comments": 1,
    "user": "Abe13"
  },
  {
    "repo": "pytorch/xla",
    "number": 6032,
    "title": "/content/content/q-e/bin/pw.x: error while loading shared libraries: libmkl_scalapack_lp64.so: cannot open shared object file: No such file or directory",
    "body": "I am using google colab and in the code section:\r\nI wrote: \r\n! /content/content/q-e/bin/pw.x < 01.vc-relax.in < 01.vc-relax.out\r\n\r\ngot an output like that:\r\n\r\n/content/content/q-e/bin/pw.x: error while loading shared libraries: libmkl_scalapack_lp64.so: cannot open shared object file: No such file or directory\r\n\r\nCan you help me to solve it?",
    "url": "https://github.com/pytorch/xla/issues/6032",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-06T13:48:03Z",
    "updated_at": "2025-04-24T14:53:55Z",
    "user": "safinmahmood"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 66,
    "title": "How to specify another GPU to run rather than cuda:0?",
    "body": "I tried to modify the --gpu_ids paramater in recipes/accelerate_configs/multi_gpu.yaml, however, it didn't work, the device was still 'cuda:0'.",
    "url": "https://github.com/huggingface/alignment-handbook/issues/66",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-06T10:48:25Z",
    "updated_at": "2023-12-06T11:13:02Z",
    "user": "njupopsicle"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6478,
    "title": "How to load data from lakefs",
    "body": "My dataset is stored on the company's lakefs server. How can I write code to load the dataset? It would be great if I could provide code examples or provide some references\r\n",
    "url": "https://github.com/huggingface/datasets/issues/6478",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-06T09:04:11Z",
    "updated_at": "2024-07-03T19:13:57Z",
    "user": "d710055071"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1407,
    "title": "How to add byte_fallback tokens?",
    "body": "# Alternative title\r\n\r\nHow to make a tokenizer behaving similarly to Llama\r\n\r\n## Background \r\n\r\nLlama tokenizer considers byte_fallback tokens **not special**. When it decodes, it doesn't remove these tokens other than special tokens (unk, pad, bos, eos).\r\n\r\n## What I am trying to do\r\n\r\nI'm trying to create a tokenizer behaving like Llama. However, I **am only able** to add byte_fallback tokens as **special tokens**.\r\n\r\n```python\r\nfrom tokenizers import Tokenizer\r\nfrom tokenizers import decoders, pre_tokenizers\r\nfrom tokenizers.models import BPE\r\nfrom tokenizers.processors import TemplateProcessing\r\nfrom tokenizers.trainers import BpeTrainer\r\nfrom tokenizers import AddedToken\r\n\r\nfrom datasets import load_dataset\r\n\r\ndataset = load_dataset(\"tapaco\")\r\n\r\ndef topaco_generator():\r\n    for i in dataset['train']:\r\n        yield i['paraphrase']\r\n\r\nbpe_trainer = BpeTrainer(\r\n    special_tokens=[\"<unk>\", \"<s>\", \"</s>\", \"<pad>\"]\r\n    + [f\"<0x{i:02X}>\" for i in range(256)]  # byte_fallback tokens\r\n)\r\n\r\ntokenizer = Tokenizer(BPE(byte_fallback=True))\r\ntokenizer.pre_tokenizer = pre_tokenizers.Sequence(\r\n    [pre_tokenizers.Metaspace(), pre_tokenizers.Digits(individual_digits=True)]\r\n)\r\ntokenizer.enable_padding(pad_id=3, pad_token=\"<pad>\")\r\ntokenizer.post_processor = TemplateProcessing(\r\n    single=\"<s> $A </s>\",\r\n    pair=\"<s> $A </s> $B </s>\",\r\n    special_tokens=[\r\n        (\"<s>\", 1),\r\n        (\"</s>\", 2),\r\n    ],\r\n)\r\ntokenizer.decoder = decoders.Sequence(\r\n    [\r\n        decoders.Metaspace(),\r\n        decoders.ByteFallback(),\r\n    ]\r\n)\r\n# my attempt to add byte_fallback as non-special tokens\r\n# tokenizer.add_tokens([AddedToken(content=f\"<0x{i:02X}>\", special=True, normalized=False) for i in range(256)])\r\n\r\ntokenizer.train_from_iterator(topaco_generator(), trainer=bpe_trainer)\r\ntokenizer.save(\"topaco_tokenizer.json\")\r\n\r\ntokenizer = Tokenizer.from_file(\"topaco_tokenizer.json\")\r\n\r\ntext = \"I love you more than I can say \ud83e\udd17\"\r\nencoded_text = tokenizer.encode(text)\r\nprint(encoded_text.tokens)\r\n# My work around to preverse byte_fallback tokens\r\n# and remove other special tokens\r\ndecoded_text = tokenizer.decode(encoded_text.ids, skip_special_tokens=False)\r\nprint(decoded_text.removeprefix('<s> ').removesuffix('</s>'))\r\n```\r\n\r\n## Problem\r\n\r\nNo matter how I tried this line `tokenizer.add_tokens([AddedToken(content=f\"<0x{i:02X}>\", special=True, normalized=False) for i in range(256)])` with different position in my code (before training, after training) and with different parameters of AddedToken, I still can not achieve Llama's behavior. ",
    "url": "https://github.com/huggingface/tokenizers/issues/1407",
    "state": "open",
    "labels": [
      "bytefallback",
      "Feature Request"
    ],
    "created_at": "2023-12-06T09:03:35Z",
    "updated_at": "2024-08-27T01:57:04Z",
    "user": "dinhanhx"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 432,
    "title": "Cannot download the model from huggingface",
    "body": "Because of the network reason, when using transfomer.js we cannot download the model successful\r\nHow to set the network proxy for the model download\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/432",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-06T08:18:58Z",
    "updated_at": "2023-12-10T13:42:50Z",
    "user": "wujohns"
  },
  {
    "repo": "huggingface/blog",
    "number": 1677,
    "title": "how to achieve image-text matching of BLIP2",
    "body": "Hi, Thanks to the authors for the works.\r\nI am trying to achieve image-text matching of BLIP2, but I didn't find any examples of that. Can you give me some help or tips?",
    "url": "https://github.com/huggingface/blog/issues/1677",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-06T07:03:21Z",
    "updated_at": "2023-12-06T07:08:48Z",
    "user": "wkqun555"
  },
  {
    "repo": "pytorch/kineto",
    "number": 847,
    "title": "How does kineto work actuallly?",
    "body": "Hello, everyone. \r\nI took a quick look at the source code of kineto and it seems the most important part of kineto is [CUPTI](https://docs.nvidia.com/cupti/r_main.html#r_main). I am curious how does kineto work and I have tried some examples of CUPTI. I have some questions hope someone could give me some insights.\r\n1. How does kineto get pytroch functions name?\r\nFrom my short experience of CUPTI programming, I knew I could get CUDA runtime function name from CUPTI, here is code snippet of it:\r\n\r\n```c++\r\n  if (cbInfo->callbackSite == CUPTI_API_ENTER)\r\n  {\r\n      traceData->functionName = cbInfo->functionName; // get cuda function name \r\n      CUPTI_CALL(cuptiGetTimestamp(&startTimestamp));\r\n      traceData->startTimestamp = startTimestamp;\r\n      traceData->memcpy_bytes = ((cudaMemcpy_v3020_params *)(cbInfo->functionParams))->count;\r\n      traceData->memcpy_kind = ((cudaMemcpy_v3020_params *)(cbInfo->functionParams))->kind;\r\n  }\r\n```\r\nWhat makes me confused is that how does kineto get functions name of pytroch (e.g. `torch::autograd::AccumulateGrad`) ? Is the supported by CUPTI or you guys use other ways to implement ? \r\n\r\n2. What is the purpose of `KINETO_USE_DAEMON=1` ?\r\nAccording to a [blog](https://pytorch.org/blog/automated-trace-collection/) I quote a pecie of it:\r\n     > First, we modified PyTorch to register with the Dynolog daemon on start up. This feature is switched on by setting the environment variable KINETO_USE_DAEMON=True. With this environment variable set to True, the PyTorch Profiler periodically polls Dynolog to check for on-demand tracing requests.\r\n\r\n     So does it mean that if the env variable was not set, then Pytorch profiler still enabled and it just doesn't send the trace info it captured  to user ? In other words, the env variable does not affect whether Pytorch Profiler is enabled. Am I right ? \r\n\r\n    I have also opened a similiar [issue](https://github.com/facebookincubator/dynolog/issues/195) in dynolog repo but I dont get any feedback yet.  I would appreciate if someone could answer these questions.",
    "url": "https://github.com/pytorch/kineto/issues/847",
    "state": "closed",
    "labels": [
      "documentation",
      "question"
    ],
    "created_at": "2023-12-06T06:48:28Z",
    "updated_at": "2023-12-28T16:46:47Z",
    "user": "stricklandye"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6070,
    "title": "How to overload existing class in diffusers",
    "body": "That's just for personal development. I want to write a new class inherited from existing class (e.g. `ControlNetModel`) and I added some new parameters to `__init__` function, but found that the `__init__` function is still the parent's implementation, whether to add the decorator `register_to_config` or not.\r\n\r\nHope some advice.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/6070",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-06T06:41:44Z",
    "updated_at": "2024-09-25T14:44:04Z",
    "user": "OrangeSodahub"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 6067,
    "title": "How to run the fine_tuned model?",
    "body": "Hi all,\r\n\r\nI used the instructions given [here](https://github.com/huggingface/diffusers/tree/main/examples/dreambooth) to fine_tune the model on dog pictures (as explained in the link).\r\nThe fine_tuning has finished, and a folder called path-to-save-model has been created (that has the weights of the model). Now how do I use this output? Do I run test_dreambooth.py? (I tried running it but it gives error at \"from test_examples_utils import ExamplesTestsAccelerate, run_command  # noqa: E402\"\r\n\r\nI appreciate it if someone can please let me know how to use the output of the trained model.\r\n\r\nThank you",
    "url": "https://github.com/huggingface/diffusers/issues/6067",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-06T01:01:56Z",
    "updated_at": "2025-04-28T10:32:33Z",
    "user": "alireza18878"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1314,
    "title": "What is the default tokenizer behaviour?",
    "body": "### System Info\n\nN/A\n\n### Information\n\n- [ ] Docker\n- [X] The CLI directly\n\n### Tasks\n\n- [X] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\nI'm trying to understand whether special tokens (i.e. BOS and EOS) are added and suppressed on tokenization and decoding.\r\n\r\nEncoding:\r\n- I searched for add_special_tokens in the repo and I don't see anywhere this is being set to true when tokenizing. So, it seems that there are no EOS tokens automatically added.\r\n\r\nDecoding:\r\n- I searched for skip_special_tokens and it seems that [here](https://github.com/huggingface/text-generation-inference/blob/3238c49121b02432bf2938c6ebfd44f06c5adc2f/server/text_generation_server/models/causal_lm.py#L525) on line 541 that indeed BOS and EOS are being supressed.\r\n\r\nIs this understanding correct?\n\n### Expected behavior\n\nIf possible, could the default tokenization strategy be described on the ReadMe so users know what to expect?",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1314",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-05T17:35:05Z",
    "updated_at": "2024-01-19T13:14:13Z",
    "user": "RonanKMcGovern"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 609,
    "title": "[Feature Request] Uploading PDFS/Text Files/Images?",
    "body": "I love the search function and it makes the chat feel so much more accurate! I use it mainly as a direct ChatGPT replacment, using code models when needed or normal models for chat.\r\n\r\nCan we have the option to upload images/pdfs/other files to the chat? the images could be integrated by clip/blip, and the PDF or text files could just be added to the context or summarized and then added?\r\n\r\nIt would be awesome to have! Thank you for all the work made into this project",
    "url": "https://github.com/huggingface/chat-ui/issues/609",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-05T12:20:39Z",
    "updated_at": "2024-10-04T01:13:18Z",
    "comments": 3,
    "user": "iChristGit"
  },
  {
    "repo": "huggingface/trl",
    "number": 1059,
    "title": "How can I have the evaluation pass in only the response to a prompted/instructed generation into the metric.",
    "body": "I have created the following metric:\r\n```py\r\nclass MyCustomMetric(Metric):\r\n    def _info(self):\r\n        # Returns the MetricInfo that defines the name, description, etc.\r\n        return datasets.MetricInfo(\r\n            # This should be a short description of your metric.\r\n            description=\"_DESCRIPTION\",\r\n            # You can cite papers, GitHub repositories, etc.\r\n            citation=\"_CITATION\",\r\n            # The inputs and outputs your metric expects.\r\n            # These are used to validate the inputs and outputs of _compute\r\n            inputs_description=\"_KWARGS_DESCRIPTION\",\r\n            features=datasets.Features({\r\n                'predictions': datasets.Value('string'),\r\n                'references': datasets.Value('string')\r\n            })\r\n        )\r\n\r\n    def _compute(self, predictions, references):\r\n        # Here is where you should put your main metric computation logic\r\n        # Adapt your existing code to fit in here\r\n        \r\n        fc_results = []\r\n        for idx, example in enumerate(predictions):\r\n            print(f\"Example {idx}: \", end=\"\")\r\n            post_message = \"\"\r\n\r\n            # Custom Function Calling metric\r\n            prompts = None\r\n            try:\r\n                generated_arguments, expected_arguments, prompts = json_arguments_from_prompt(\r\n                    references[idx],\r\n                    predictions[idx],\r\n                    INSTRUCTION\r\n                    # {\"idx\": idx, \"epoch\": epoch}\r\n                )\r\n                fc_result = fc_metric.run(generated_arguments, expected_arguments)\r\n\r\n                fc_results.append(fc_result)\r\n\r\n                # if save_prompts_path:\r\n                #     # add prompts to dpo_data.json\r\n                #     dpo_data.append({\r\n                #         \"fc_result\": fc_result,\r\n                #         **prompts\r\n                #     })\r\n                #     with open(save_prompts_path, \"w\") as f:\r\n                #         json.dump(dpo_data, f)\r\n            except Exception as e:\r\n                print(f\"Error function calling: {e}\\n\")\r\n                fc_results.append(0)\r\n        return fc_results\r\n```\r\nThis metric expects the prediction to be generated after passing the instruction. For example I have my prompts in the following format:\r\n`<s> [INST] {message} [/INST] {response}`\r\nI want the evaluation to receive the `predictions` for response and then compare those with my `references`.  To reiterate, the predictions should be generated from the model being passed `<s> [INST] {message} [/INST]`.\r\n\r\nCurrently it seems as if the logits are just generated without any prompt resulting in responses like:\r\n```\r\npredicted_strings:  ['Unterscheidung Unterscheidung![: What<<NOP What favorite is to help the patterns climate a following is is a to a topic you\\nineited by the >>_> in returnFUNCTIONS>\\n the is related, return program should be \" the format formatname format format. functionFUNCTION_CALL>FORM>( <</OFIGNCIATED_WITH_USER_USERUNCTION</FUNCTION_CALL_NAME>brUNCTIONSCALL_NAMEGSUMENTS>\\nGUMENTS_ASS_THE_FIED_FORM_FORMAT</FUNCTION_CALL_ARGUMENTS> If, respond \" \" response.\\nFUNCTIONS>username\": \"get\",meanalth\",\",function_ \"description\": \"Get health \"input\": [root\": \"string\", \"properties\": {\" \"}] {\"name\": \"leaf_Results\", \"description\": \"Search search list of searchists\", on a search query\", \"parameters\": {\"type\": \"array\", \"properties\": {\"query\": {\"type\": {\"query\": {\"type\": \"string\" \"required\": \"Search\"}} \"type\": \"array\" \"title\": [\"query\"] \"description\": \"Searchphy Search\"}}}, {\"name\": \"getUserending\",\", \"description\": \"Get a list of trifs that on the tr trending\", \"parameters\": {\"type\": \"object\", \"properties\": {\"}}},}</FUNCTIONS>\\nUSERFS>\\n me the ofif from a cat cat doing</users FUNCTION_CALL_NAME>rootSearchResults</FUNCTION_CALL_NAME>FUNCTION_CALL_ARGUMENTS>{\"json\": {\"query\": \"cool cat\"}}</FUNCTION_CALL_ARGUMENTS></s>\ufffd\ufffd']\r\n```\r\n\r\nafter looking through the source code it seems like modifying the `prediction_step` method inside `Trainer` is the way to go.",
    "url": "https://github.com/huggingface/trl/issues/1059",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-04T19:01:34Z",
    "updated_at": "2024-01-12T15:05:10Z",
    "user": "CakeCrusher"
  },
  {
    "repo": "huggingface/distil-whisper",
    "number": 49,
    "title": "How to make training data?",
    "body": "I have a folder like this: \r\naudio_1\r\ntranscript_1.txt\r\naudio_2\r\ntranscript_2.txt\r\n\r\nhow can I make this folder into huggingface dataset?",
    "url": "https://github.com/huggingface/distil-whisper/issues/49",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-04T18:44:40Z",
    "updated_at": "2023-12-12T16:51:48Z",
    "user": "satani99"
  },
  {
    "repo": "pytorch/audio",
    "number": 3711,
    "title": "_pickle.UnpicklingError: invalid load key, 'v'.",
    "body": "### \ud83d\udc1b Describe the bug\n\n### ISSUE\r\nWhen I run \r\n`python preprocess_lrs3.py --data-dir=D:/BaiduNetdiskDownload/LRS3 --detector=retinaface --dataset=lrs3 --root-dir=D:/pycharmProject/audio_vision/audio-main/examples/avsr/predata --subset=test --seg-duration=16 --groups=4 --job-index=0`\r\nThe following appears\r\n`D:\\anaconda3\\envs\\davsr\\lib\\site-packages\\torchaudio\\backend\\utils.py:62: UserWarning: No audio backend is available.\r\n  warnings.warn(\"No audio backend is available.\")\r\nTraceback (most recent call last):\r\n  File \"preprocess_lrs3.py\", line 68, in <module>\r\n    vid_dataloader = AVSRDataLoader(modality=\"video\", detector=args.detector, resize=(96, 96))\r\n  File \"D:\\pycharmProject\\audio_vision\\audio-main\\examples\\avsr\\data_prep\\data\\data_module.py\", line 19, in __init__\r\n    self.landmarks_detector = LandmarksDetector(device=\"cuda:0\")\r\n  File \"D:\\pycharmProject\\audio_vision\\audio-main\\examples\\avsr\\data_prep\\detectors\\retinaface\\detector.py\", line 17, in __init__ \r\n    self.face_detector = RetinaFacePredictor(\r\n  File \"D:\\pycharmProject\\audio_vision\\audio-main\\examples\\avsr\\data_prep\\face_detection\\ibug\\face_detection\\retina_face\\retina_face_predictor.py\", line 28, in __init__\r\n    pretrained_dict = torch.load(model.weights, map_location=self.device)\r\n  File \"D:\\anaconda3\\envs\\davsr\\lib\\site-packages\\torch\\serialization.py\", line 795, in load\r\n    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)\r\n  File \"D:\\anaconda3\\envs\\davsr\\lib\\site-packages\\torch\\serialization.py\", line 1002, in _legacy_load\r\n    magic_number = pickle_module.load(f, **pickle_load_args)\r\n_pickle.UnpicklingError: invalid load key, 'v'.\r\n`\r\nMay I ask why this problem occurs? How to solve it\n\n### Versions\n\nCollecting environment information...\r\nPyTorch version: 1.13.1\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.7\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Microsoft Windows 11 Home China\r\nGCC version: Could not collect\r\nClang version: Could not collect\r\nCMake version: version 3.27.7\r\nLibc version: N/A\r\n\r\nPython version: 3.8.18 (default, Sep 11 2023, 13:39:12) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)\r\nPython platform: Windows-10-10.0.22621-SP0\r\nIs CUDA available: True\r\nCUDA runtime version: Could not collect\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 3050 Laptop GPU\r\nNvidia driver version: 517.18\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture=9\r\nCurrentClockSpeed=1992\r\nDeviceID=CPU0\r\nFamily=198\r\nL2CacheSize=2048\r\nL2CacheSpeed=\r\nManufacturer=GenuineIntel\r\nMaxClockSpeed=1992\r\nName=Intel(R) Core(TM) i7-10700T CPU @ 2.00GHz\r\nProcessorType=3\r\nRevision=\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.24.3\r\n[pip3] torch==1.13.1\r\n[pip3] torchaudio==0.13.1\r\n[pip3] torchvision==0.14.1\r\n[conda] blas                      1.0                         mkl    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main      \r\n[conda] mkl                       2023.1.0         h6b88ed4_46358    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main      \r\n[conda] mkl-service               2.4.0            py38h2bbff1b_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main      \r\n[conda] mkl_fft                   1.3.8            py38h2bbff1b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main      \r\n[conda] mkl_random                1.2.4            py38h59b6b97_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main      \r\n[conda] numpy                     1.24.3           py38h79a8e48_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main      \r\n[conda] numpy-base                1.24.3           py38h8a87ada_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main      \r\n[conda] pytorch                   1.13.1          py3.8_cuda11.7_cudnn8_0    pytorch\r\n[conda] pytorch-cuda              11.7                 h16d0643_5    pytorch\r\n[conda] pytorch-mutex             1.0                        cuda    pytorch\r\n[conda] torchaudio                0.13.1                   pypi_0    pypi\r\n[conda] torchvision               0.14.1                   pypi_0    pypi\r\n",
    "url": "https://github.com/pytorch/audio/issues/3711",
    "state": "open",
    "labels": [],
    "created_at": "2023-12-04T15:32:55Z",
    "updated_at": "2024-11-12T15:06:54Z",
    "comments": 1,
    "user": "YuQing2000"
  },
  {
    "repo": "pytorch/xla",
    "number": 6015,
    "title": "Kaggle TPU Finetuning Roberta Help",
    "body": "## \u2753 Questions and Help\r\nI have pretrained roberta-base on dna promoter sequences of plants (working on a project). I am currently trying to finetune it on a downstream task of predicting gene expression values, basically a list of 8 values (corresponding to various tissues) from a single promoter sequence. \r\n\r\nThis wasn't possible on kaggle's gpu (due to memory restrictions), so I tried to do the same on TPU using pytorch-xla (figured that was the best option). The link to the notebook as well as the datasets used are as follows:\r\n\r\n1. [Main Kaggle Notebook](https://www.kaggle.com/code/gurveersinghvirk/florabert-2/) \r\n2. [Dataset containing code and data](https://www.kaggle.com/datasets/gurveersinghvirk/florabert-base)\r\n3. [Dataset on github](https://github.com/gurveervirk/florabert/) (contains old code but has the correct structure)\r\n\r\nVersion 43 is the one using the pytorch-xla code (as far as I could figure out). The data's format is as follows:\r\n\r\nsequence \\t labels\r\ndna_promoter_seq_here list_of_8_values_here\r\n\r\neg: CTCAAGCTGAGCAGTGGGTTTGCTCTGGAGGGGAAGCTCAACGGTGGCGACAAGGAAGAATCTGCTTGCGAGGCGAGCCCTGACGCCGCTGATAGCGACCAAAGGTGGATTAAACAACCCATTTCATCATTCTTCTTCCTTGTTAGTTATGATTCCCACGCTTGCCTTTCATGAATCATGATCCTATATGTATATTGATATTAATCAGTTCTAGAAAGTTCAACAACATTTGAGCATGTCAAAACCTGATCGTTGCCTGTTCCATGTCAACAGTGGATTATAACACGTGCAAATGTAGCTATTTGTGTGAGAAGACGTGTGATCGACTCTTTTTTTATATAGATAGCATTGAGATCAACTGTTTGTATATATCTTGTCATAACATTTTTACTTCGTAGCAACGTACGAGCGTTCACCTATTTGTATATAAGTTATCATGATATTTATAAGTTACCGTTGCAACGCACGGACACTCACCTAGTATAGTTTATGTATTACAGTACTAGGAGCCCTAGGCTTCCAATAACTAGAAAAAGTCCTGGTCAGTCGAACCAAACCACAATCCGACGTATACATTCTGGTTCCCCCACGCCCCCATCCGTTCGATTCA\t[54.679647, 60.646678, 54.9113, 78.878474, 21.326259, 27.973276, 17.419968, 40.465529]\r\n\r\nThere's 7,22,000 examples of this kind, ~722 mb in total divided into ~400 mb train, 200 mb test and 100 mb eval. When running the code \"finetune.py\", all goes well till the training starts (datasets are loaded, processed, etc). But, the latest run took 3+ hrs to get to the next step and the RAM usage kept on increasing. It looked the TPU run was very slow and the run then crashed as it ran out of memory. I have tried accelerate and trainer but those efforts were in vain.\r\n\r\nFew questions: \r\n\r\n1. Is my approach correct?\r\n2. What changes should I make? \r\n3. Can I run this code using HuggingFace Trainer (was originally used in the code)? If so, how?\r\n4. Is the RAM usage normal?\r\n5. Should it take this long?\r\n\r\nIf I pass the model as an arg to xmp.spawn, I end up seeing either of \"Check failed: data()->tensor_data\" or \"RuntimeError: Function AddcmulBackward0 returned an invalid gradient at index 1 - expected device xla:1 but got xla:0\". Why?\r\n\r\nKindly guide.",
    "url": "https://github.com/pytorch/xla/issues/6015",
    "state": "open",
    "labels": [
      "question",
      "performance",
      "xla:tpu"
    ],
    "created_at": "2023-12-04T14:07:43Z",
    "updated_at": "2025-04-24T14:56:25Z",
    "user": "gurveervirk"
  },
  {
    "repo": "pytorch/xla",
    "number": 6014,
    "title": "How to add a new third-party Backend",
    "body": "## \u2753 Questions and Help\r\n1 We see PyTorch/XLA now pulls XLA from OpenXLA, is that means we just need to adapt OpenXLA to add a new backend?\r\n2 Will collective operations work with third-party backend?\r\n",
    "url": "https://github.com/pytorch/xla/issues/6014",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-04T10:10:18Z",
    "updated_at": "2023-12-28T22:31:11Z",
    "user": "dinghaodhd"
  },
  {
    "repo": "huggingface/computer-vision-course",
    "number": 77,
    "title": "Issue with rendering the course",
    "body": "If we try to render the course to preview how our added content looks like, it throws the following error\r\n```bash\r\nsarthak@kde:~/Desktop/computer-vision-course$ doc-builder preview computer-vision-course chapters/ --not_python_module\r\nInitial build docs for computer-vision-course chapters/ /tmp/tmp0uqdjoxf/computer-vision-course/main/en\r\nBuilding the MDX files: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 29/29 [00:00<00:00, 1288.27it/s]\r\nTraceback (most recent call last):\r\n  File \"/home/sarthak/anaconda3/bin/doc-builder\", line 8, in <module>\r\n    sys.exit(main())\r\n  File \"/home/sarthak/anaconda3/lib/python3.9/site-packages/doc_builder/commands/doc_builder_cli.py\", line 47, in main\r\n    args.func(args)\r\n  File \"/home/sarthak/anaconda3/lib/python3.9/site-packages/doc_builder/commands/preview.py\", line 171, in preview_command\r\n    source_files_mapping = build_doc(\r\n  File \"/home/sarthak/anaconda3/lib/python3.9/site-packages/doc_builder/build_doc.py\", line 405, in build_doc\r\n    sphinx_refs = check_toc_integrity(doc_folder, output_dir)\r\n  File \"/home/sarthak/anaconda3/lib/python3.9/site-packages/doc_builder/build_doc.py\", line 460, in check_toc_integrity\r\n    raise RuntimeError(\r\nRuntimeError: The following files are not present in the table of contents:\r\n- en/Unit 5 - Generative Models/variational_autoencoders\r\n- en/Unit 5 - Generative Models/README\r\n- en/Unit 11  - Zero Shot Computer Vision/README\r\n- en/Unit 2 - Convolutional Neural Networks/README\r\n- en/Unit 1 - Fundamentals/README\r\n- en/Unit 8 - 3D Vision, Scene Rendering and Reconstruction/README\r\n- en/Unit 4 - Mulitmodal Models/README\r\n- en/Unit 9 - Model Optimization/README\r\n- en/Unit 6 - Basic CV Tasks/README\r\n- en/Unit 7 - Video and Video Processing/README\r\n- en/Unit 13 - Outlook/README\r\n- en/Unit 3 - Vision Transformers/README\r\n- en/Unit 12 - Ethics and Biases/README\r\n- en/Unit 10 - Synthetic Data Creation/README\r\nAdd them to chapters/_toctree.yml.\r\n```\r\n\r\n**Explanation:** This is because there have been README files added to each chapter. However, these README files are not present in the `_toctree.yml`.\r\n\r\n**Why it's important:** Being able to render the course locally is important as it can give us a rough overview of how the content looks like.\r\n\r\n**Possible solutions could be:**\r\n* Remove the README files for the time being\r\n* Add them to the toctree and also making sure that if anyone adds any chapter contents they also update the toctree making it easier for others to render the course\r\n\r\nOpen for discussion from other members :v: \r\n\r\n",
    "url": "https://github.com/huggingface/computer-vision-course/issues/77",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-04T01:02:22Z",
    "updated_at": "2023-12-08T18:17:19Z",
    "user": "sarthak247"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2363,
    "title": "How to retrieve the epoch of the saved model from model.save ?",
    "body": "Hi, \r\nThank you for the repo. \r\n\r\nCan anyone help me with retrieving the epoch of the saved model, in both cases where save_best_model=True and save_best_model=False? \r\nThank you\r\n\r\n``` \r\nmodel.fit(train_objectives=[(train_dataloader, train_loss)],\r\n          evaluator=evaluator,\r\n          epochs=num_epochs,\r\n          evaluation_steps=1000,\r\n          warmup_steps=warmup_steps,\r\n          save_best_model=True,\r\n          output_path=output_path)\r\n\r\nmodel.save(path)```",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2363",
    "state": "closed",
    "labels": [],
    "created_at": "2023-12-02T15:25:52Z",
    "updated_at": "2024-01-09T22:16:20Z",
    "user": "gowrijsuria"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 426,
    "title": "[Question] feature-extraction discrepancies across different platforms",
    "body": "I'm observing discrepancies in feature-extraction results across different platforms. Here's the code:\r\n\r\n```js\r\nimport { pipeline, env } from '@xenova/transformers'\r\n\r\nconst extractor = await pipeline('feature-extraction', 'Xenova/gte-small', {\r\n  quantized: false,\r\n  cache_dir: './.cache',\r\n  local_files_only: false,\r\n})\r\n\r\nconst text = 'hello'\r\nconst embedding = await extractor(text, { pooling: 'mean', normalize: true })\r\nconst response = Array.from(embedding.data)\r\nconsole.log(JSON.stringify(response, null, 2))\r\n\r\n// Node v20\r\n// \"@xenova/transformers\": \"^2.9.0\"\r\n```\r\n\r\nThe results differ between macOS 13 (Apple Silicon/Arm) and Ubuntu 23.1 (Raspberry Pi/Arm). I've tried various configurations (e.g., pooling, normalize, with and without Array.from) and still observe different results. It's worth noting that sequential calls on the same platform produce consistent results.\r\n\r\nI have a few questions:\r\n\r\n1. Is this discrepancy expected due to the nature of float32 precision and rounding, even though the calculations are performed on ARM architecture?\r\n2. Given that the difference is extremely small, could it still impact accuracy in any significant way?\r\n\r\n[mean-nonorm-mac-01.json](https://github.com/xenova/transformers.js/files/13530082/mean-nonorm-mac-01.json)\r\n[mean-nonorm-pi-01.json](https://github.com/xenova/transformers.js/files/13530083/mean-nonorm-pi-01.json)\r\n[mean-norm-mac-01.json](https://github.com/xenova/transformers.js/files/13530084/mean-norm-mac-01.json)\r\n[mean-norm-pi-01.json](https://github.com/xenova/transformers.js/files/13530086/mean-norm-pi-01.json)\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/426",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-01T17:12:04Z",
    "updated_at": "2023-12-05T18:51:03Z",
    "user": "devfacet"
  },
  {
    "repo": "pytorch/xla",
    "number": 5959,
    "title": "how pytorch NCHW TO  XLA  HWOI format \uff1f help",
    "body": "## \u2753 Questions and Help\r\nI have a request to make the pytorch input model in NCHW format by default, and convert it to HWOI format during the training process, which is conducive to hardware processing data. I wonder if there is a way to uniformly convert this model to the HWOI format when it is sent to XLA. In addition, when sending back from torch_xla to torch, should the HWOI format be converted to the default format NCHW of torch, is there an existing method?",
    "url": "https://github.com/pytorch/xla/issues/5959",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-12-01T06:18:20Z",
    "updated_at": "2025-04-28T11:44:59Z",
    "user": "ckfgihub"
  },
  {
    "repo": "pytorch/serve",
    "number": 2814,
    "title": "[question] How to properly handle client request cancelation during inference?",
    "body": "Hey all,\r\n\r\nMy model's inference is quite long-running (around 50 seconds per request), so it would be great if closed client connections are handled properly by interrupting the inference that's currently in progress. I'm currently implementing `initialize`, `preprocess`, `inference` and `postprocess` methods in my custom handler class. What's the proper place for detecting closed connection, if possible?\r\n\r\nThanks,\r\nMiro",
    "url": "https://github.com/pytorch/serve/issues/2814",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-30T18:34:49Z",
    "updated_at": "2024-03-20T22:14:27Z",
    "user": "miroslavLalev"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 604,
    "title": "\"Invalid State: Controller is already closed\" error when trying to use chat-ui locally with llama.cpp",
    "body": "HELP NEEDED\r\n\r\n**What is the issue?**\r\nNot able to use chat-ui locally to get the response back when using the llama.cpp as a server.\r\nI can load the chat-ui after installing it via npm install and npm run dev. The env.local file is also configured and UI allows to send the request. However, the response never comes back in UI, and 'Sorry, something went wrong. Please try again' is shown.\r\nOn checking the logs in chat-ui, the error shown is:\r\n\r\nTypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed\r\n    at new NodeError (node:internal/errors:399:5)\r\n    at ReadableStreamDefaultController.enqueue (node:internal/webstreams/readablestream:1036:13)\r\n    at update (/home/devuser/development/chat-ui-main/src/routes/conversation/[id]/+server.ts:158:20)\r\n    at eval (/home/devuser/development/chat-ui-main/src/routes/conversation/[id]/+server.ts:168:13)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async Object.start (/home/devuser/development/chat-ui-main/src/routes/conversation/[id]/+server.ts:260:7) {\r\n  code: 'ERR_INVALID_STATE'\r\n  \r\n  I also tested the llama.cpp server response via curl and the response came back correctly, so it's not an issue with llama.cpp.\r\n\r\nVersions:\r\nchat-ui code is latest from master.\r\nllama.cpp code is latest from master and build locally.\r\nTried with Node 20 and then with Node 19, but issue still remains.\r\n\r\nenv.local:\r\nMONGODB_URL=mongodb://localhost:27017\r\nMONGODB_DB_NAME=chat-ui\r\nMONGODB_DIRECT_CONNECTION=false\r\nUSE_LOCAL_WEBSEARCH=true\r\nHF_ACCESS_TOKEN=test\r\nMODELS=`[\r\n  {\r\n      \"name\": \"Zephyr\",\r\n      \"chatPromptTemplate\": \"<|system|>\\n{{preprompt}}</s>\\n{{#each messages}}{{#ifUser}}<|user|>\\n{{content}}</s>\\n<|assistant|>\\n{{/ifUser}}{{#ifAssistant}}{{content}}</s>\\n{{/ifAssistant}}{{/each}}\",\r\n      \"parameters\": {\r\n        \"temperature\": 0.7,\r\n        \"top_p\": 0.95,\r\n        \"repetition_penalty\": 1.1,\r\n        \"top_k\": 50,\r\n        \"truncate\": 1000,\r\n        \"max_new_tokens\": 2048,\r\n        \"stop\": [\"</s>\"]\r\n      },\r\n      \"endpoints\": [\r\n        {\r\n         \"url\": \"http://localhost:8080\",\r\n         \"type\": \"llamacpp\"\r\n        }\r\n      ]\r\n  }\r\n]`\r\n\r\nAm I missing anything in terms of installation steps? Any help here will be appreciated.\r\n\r\n\r\n\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/604",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-30T16:42:06Z",
    "updated_at": "2023-11-30T17:41:19Z",
    "comments": 1,
    "user": "ManasInd"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1556,
    "title": "RuntimeError: Cannot infer the task from a local directory yet, please specify the task manually.",
    "body": "### System Info\r\n\r\nwindows 10 - ryzen 3600x - 16 gb ddr4-3000 - python  3.10 - latest optimum inside a venv\r\n\r\n### Who can help?\r\n\r\n_No response_\r\n\r\n### Information\r\n\r\nWhen I try to convert a model to openvino using \r\n\r\noptimum-cli export openvino -m \"d:\\sdxl\\LCMphoton\" \"d:\\sdxl\\LCMphotonov\"\r\n\r\nI have this error : \r\nRuntimeError: Cannot infer the task from a local directory yet, please specify the task manually.\r\n\r\nI am converting standard sd1.5 models to lcm with lora locally and want to convert that to openvino. I have local models which are not present on huggingface and it takes forever for me to upload there (only 1-2 megabytes max) Can we somehow use local models that have the same directory structure as hf ?\r\n```\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction (minimal, reproducible, runnable)\r\n\r\noptimum-cli export openvino -m \"d:\\sdxl\\LCMphoton\" \"d:\\sdxl\\LCMphotonov\"\r\n\r\n### Expected behavior\r\n\r\nI want to be able to convert local models without having to download from huggingface.",
    "url": "https://github.com/huggingface/optimum/issues/1556",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-11-30T16:09:24Z",
    "updated_at": "2023-12-09T22:37:44Z",
    "comments": 2,
    "user": "patientx"
  },
  {
    "repo": "pytorch/xla",
    "number": 5953,
    "title": "xla  NCHW to HWOI",
    "body": "## \u2753 Questions and Help\r\nIs there a simple way to modify the tensor layout (NCHW) in the entire xla computation graph to convert it to HWOI format, and continue to convert it to NCHW format when it is returned to torch? If there is no simple and unified modification method, how can we change it? For example, modifying each operator one by one is also a method. How should we achieve this goal?",
    "url": "https://github.com/pytorch/xla/issues/5953",
    "state": "closed",
    "labels": [
      "duplicate",
      "question"
    ],
    "created_at": "2023-11-30T06:59:00Z",
    "updated_at": "2025-04-28T11:53:34Z",
    "user": "ckfgihub"
  },
  {
    "repo": "pytorch/executorch",
    "number": 1313,
    "title": "How to run the pte model on GPU",
    "body": "Hello,\r\n\r\nI would like to konw if ExecuTorch supports GPU.\r\nNow I could export model into pte format and execute runtime for xnnpack backend in Intel device.\r\nThe device has GPU.\r\n\r\nBut when I check GPU usage while running the application, GPU wasn't utilized.\r\nIf ExecuTorch supports GPU, can you please share me how to use GPU?\r\n\r\n### Environment\r\n```\r\n$ lscpu\r\nArchitecture:            x86_64\r\n  CPU op-mode(s):        32-bit, 64-bit\r\n  Address sizes:         39 bits physical, 48 bits virtual\r\n  Byte Order:            Little Endian\r\nCPU(s):                  4\r\n  On-line CPU(s) list:   0-3\r\nVendor ID:               GenuineIntel\r\n  Model name:            Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz\r\n    CPU family:          6\r\n    Model:               142\r\n    Thread(s) per core:  2\r\n    Core(s) per socket:  2\r\n    Socket(s):           1\r\n    Stepping:            9\r\n    CPU max MHz:         3600.0000\r\n    CPU min MHz:         400.0000\r\n    BogoMIPS:            4599.93\r\n    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon\r\n                          pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe p\r\n                         opcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad \r\n                         fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window \r\n                         hwp_epp md_clear flush_l1d arch_capabilities\r\n```\r\n  \r\nThanks,",
    "url": "https://github.com/pytorch/executorch/issues/1313",
    "state": "closed",
    "labels": [
      "need-user-input"
    ],
    "created_at": "2023-11-30T05:19:12Z",
    "updated_at": "2023-12-14T23:54:25Z",
    "user": "EarthMu"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 396,
    "title": "[Feature request] How about support async save to disk?",
    "body": "### Feature request\n\nHow about support async save to disk?  \r\n\r\n\n\n### Motivation\n\nthe weight or optimizer is vary large for LLMs\uff0cso\uff0cit will waste a lot of time for tensor from cpu to disk\u3002\r\nIf we can support async save to disk, it will be vary helpful.\n\n### Your contribution\n\n.",
    "url": "https://github.com/huggingface/safetensors/issues/396",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-11-30T02:55:25Z",
    "updated_at": "2024-02-13T01:46:40Z",
    "user": "ZHUI"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 114822,
    "title": "convert to onnx with the dynamic shape and onnx convert to tensorrt, but could't get the dynamic engine of tensorrt. dims.d[0]==1 !!! what is wrong with the model??? please give me some help. thanks",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\n- convert my model to onnx with the dynamic shape and onnx convert to tensorrt, but could't get the dynamic engine of tensorrt. dims.d[0]==1 !!! but when i converted yolov8 model to onnx\uff0c then onnx convert to tensorrt\uff0c i got dims.d[0] == -1 and it worked  well.  what is wrong with the model??? \r\n\r\n\r\n### pth to onnx\r\n```python\r\ntorch.onnx.export(\r\n        model,\r\n        dummy_input,\r\n        args.output,\r\n        verbose=False,\r\n        export_params=True,\r\n        input_names=input_names,\r\n        output_names=output_names,\r\n        keep_initializers_as_inputs=False,\r\n        opset_version=13,       \r\n        dynamic_axes = {\r\n            \"input_image\":{0:\"batch\"},\r\n            \"bases\":{0:\"batch\"},\r\n            \"pred\":{0:\"batch\"}\r\n        } if args.dynamic else None\r\n    )\r\n```\r\n![image](https://github.com/pytorch/pytorch/assets/71381036/4ac882a2-ab38-4b30-9125-927d145ca040)\r\n\r\n### onnx to tensorrt\r\n```bash\r\n./trtexec --onnx=model_0364999-dy-op13.onnx \\\r\n          --saveEngine=model_0364999-dy-op13 \\\r\n          --minShapes=input_image:1x1x2048x2048 \\\r\n          --optShapes=input_image:10x1x2048x2048 \\\r\n          --maxShapes=input_image:10x1x2048x2048 \\\r\n          --fp16 \\\r\n          --device=0 \\\r\n          --workspace=10240 \\\r\n          --preview=+fasterDynamicShapes0805 \\\r\n```\r\n![image](https://github.com/pytorch/pytorch/assets/71381036/4874b949-6847-4e74-96a1-113beaa81d83)\r\n\r\n### Versions\r\nubuntu:20.04\r\ncuda:11.1\r\ncudnn:8.2\r\ntensorrt:8.5.2\r\npython: 3.6\r\npytorch:1.7.1\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/114822",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-30T02:21:23Z",
    "updated_at": "2023-11-30T03:22:52Z",
    "user": "tianlan6767"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 424,
    "title": "[Question] Batch inference for vit",
    "body": "It seems like all the tests in the repository related to processors and image models use one image per input. \r\n1. Do the models support feeding a batch of images as input during inference? Is there a speed benefit from this? \r\n2. Are there any other optimization/parallelization tools in transformers.js that I can use to process a set of images?\r\n\r\nUsed model: vit base (google/vit-base-patch16-224-in21k), tiny and small distillations (WinKawaks/vit-tiny-patch16-224), exported in onnx format with optimum\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/424",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-29T09:52:16Z",
    "updated_at": "2023-12-05T14:49:36Z",
    "user": "arseniymerkulov"
  },
  {
    "repo": "huggingface/transformers",
    "number": 27755,
    "title": "How to inference the model with 200k length context",
    "body": "### Model description\n\nI want to test Yi-34B-200k,  Although I ran through the model, as the context length increased, OOM appeared, and I wondered how I could test to 200k context length with sufficient GPU resources.\n\n### Open source status\n\n- [X] The model implementation is available\n- [X] The model weights are available\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/transformers/issues/27755",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-29T07:37:06Z",
    "updated_at": "2024-05-24T07:24:56Z",
    "user": "taishan1994"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 423,
    "title": "Not able to load local classification onnx model",
    "body": "Was trying to follow the instruction of this page to load local custom model, but failed to find local path https://huggingface.co/docs/transformers.js/custom_usage\r\n\r\nthe code snippet\r\n`\r\nimport { env, AutoTokenizer, AutoModelForSequenceClassification } from '@xenova/transformers';\r\n\r\nenv.useFS = true;\r\nenv.localModelPath = '/path/to/local/file'\r\nenv.allowRemoteModels = false;\r\n\r\nlet tokenizer = await AutoTokenizer.from_pretrained('tinybert');\r\nlet model = await AutoModelForSequenceClassification.from_pretrained('tinybert');\r\n\r\nlet inputs = await tokenizer('I love transformers!');\r\nlet { logits } = await model(inputs);\r\n`\r\nhere is the file structure:\r\nmodels\r\n\u2514\u2500\u2500 tinybert\r\n    \u251c\u2500\u2500 config.json\r\n    \u251c\u2500\u2500 onnx\r\n     \u2502   \u251c\u2500\u2500 model.onnx\r\n     \u2502   \u2514\u2500\u2500 model_quantized.onnx\r\n    \u251c\u2500\u2500 ort_config.json\r\n    \u251c\u2500\u2500 special_tokens_map.json\r\n    \u251c\u2500\u2500 tokenizer.json\r\n    \u251c\u2500\u2500 tokenizer_config.json\r\n    \u2514\u2500\u2500 vocab.txt\r\n\r\nerror:\r\n(node:36959) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time\r\n(Use `node --trace-warnings ...` to show where the warning was created)\r\nUnable to load from local path \"/Users/hzhang14/pete/2023_H1_spam/models/tinybert/tokenizer.json\": \"ReferenceError: Headers is not defined\"\r\nUnable to load from local path \"/Users/hzhang14/pete/2023_H1_spam/models/tinybert/tokenizer_config.json\": \"ReferenceError: Headers is not defined\"\r\nfile:///Users/hzhang14/pete/2023_H1_spam/node_modules/@xenova/transformers/src/utils/hub.js:462\r\n                    throw Error(`\\`local_files_only=true\\` or \\`env.allowRemoteModels=false\\` and file was not found locally at \"${localPath}\".`);\r\n                          ^\r\n\r\nError: `local_files_only=true` or `env.allowRemoteModels=false` and file was not found locally at \"/Users/hzhang14/pete/2023_H1_spam/models/tinybert/tokenizer.json\".\r\n    at getModelFile (file:///Users/hzhang14/pete/2023_H1_spam/node_modules/@xenova/transformers/src/utils/hub.js:462:27)\r\n    at async getModelJSON (file:///Users/hzhang14/pete/2023_H1_spam/node_modules/@xenova/transformers/src/utils/hub.js:575:18)\r\n    at async Promise.all (index 0)\r\n    at async loadTokenizer (file:///Users/hzhang14/pete/2023_H1_spam/node_modules/@xenova/transformers/src/tokenizers.js:52:16)\r\n    at async Function.from_pretrained (file:///Users/hzhang14/pete/2023_H1_spam/node_modules/@xenova/transformers/src/tokenizers.js:3890:48)\r\n    at async file:///Users/hzhang14/pete/2023_H1_spam/js/test.mjs:9:17",
    "url": "https://github.com/huggingface/transformers.js/issues/423",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-29T06:40:09Z",
    "updated_at": "2023-11-30T07:27:27Z",
    "user": "purezhanghan"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 594,
    "title": "TypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed",
    "body": "i use the lasted main version and i have error when make chat, and in GUI , it show \"Sorry, something went wrong. Please try again.\"\r\n\r\nTypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed\r\n    at new NodeError (node:internal/errors:405:5)\r\n    at ReadableStreamDefaultController.enqueue (node:internal/webstreams/readablestream:1040:13)\r\n    at update (file:////chat-ui-main/build/server/chunks/_server.ts-38ce6e8d.js:480:22)\r\n    at file:////chat-ui-main/build/server/chunks/_server.ts-38ce6e8d.js:492:15\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async Object.start (file:////chat-ui-main/build/server/chunks/_server.ts-38ce6e8d.js:585:9) {\r\n  code: 'ERR_INVALID_STATE'\r\n\r\ncan any one help me to fix this problem",
    "url": "https://github.com/huggingface/chat-ui/issues/594",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-11-29T04:28:27Z",
    "updated_at": "2024-06-17T12:48:45Z",
    "comments": 18,
    "user": "AlexBlack2202"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 593,
    "title": "Show image in chat box",
    "body": "Can I show a image by http link on chat box?",
    "url": "https://github.com/huggingface/chat-ui/issues/593",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2023-11-29T03:17:17Z",
    "updated_at": "2023-11-30T17:57:32Z",
    "comments": 3,
    "user": "ntqnhanguyen"
  },
  {
    "repo": "pytorch/text",
    "number": 2217,
    "title": "how to run this code",
    "body": "## how to run this code \r\ni need a --pip list -- to run this code ",
    "url": "https://github.com/pytorch/text/issues/2217",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-29T02:15:16Z",
    "updated_at": "2024-08-05T12:51:43Z",
    "user": "ygqrc"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1554,
    "title": "ORT Models Failing because of the latest fsdp changes on transformers Trainer.",
    "body": "### System Info\n\n```shell\noptimum from source\r\ntransformers from source\n```\n\n\n### Who can help?\n\n@JingyaHuang \n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nwhen trying to run training using ortmodule all models will fail due to latest changes on transformers trainer.\r\nfsdp was removed as an attribute and it included other changes.\r\n\r\nI can work on the fix if you guys don't have the bandwith.\r\n\r\n@JingyaHuang \r\nWe also been getting a lot of this types errors, can we work on some CI pipeline to spot these failures so we can fix them fast?\r\n\r\nThanks.\n\n### Expected behavior\n\n\r\n`AttributeError: 'ORTTrainer' object has no attribute 'fsdp'\r\n`\r\n",
    "url": "https://github.com/huggingface/optimum/issues/1554",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-11-28T20:22:40Z",
    "updated_at": "2023-12-26T18:15:02Z",
    "comments": 6,
    "user": "AdamLouly"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 592,
    "title": "Authentication Doc and Code may be out-of-date/not working",
    "body": "## Description\r\n\r\nHello,\r\n\r\nFollowing the doc in the `README`: https://github.com/huggingface/chat-ui#basic-and-bearer. The UI should support (if setup in the `.env.local` file) `Basic` and `Bearer` authentication, however, what I noticed since the requests have been moved to the `huggingface` module is that the authorization flow has changed. \r\n\r\nIn the module:\r\n```js\r\n#huggingface/inference/dist/index.mjs\r\n[...]\r\n  const { accessToken, model: _model, ...otherArgs } = args;\r\n  let { model } = args;\r\n  const { forceTask: task, includeCredentials, taskHint, ...otherOptions } = options ?? {};\r\n  const headers = {};\r\n  if (accessToken) {\r\n    headers[\"Authorization\"] = `Bearer ${accessToken}`;\r\n  }\r\n[...]\r\n```\r\n\r\nIf I define a custom chat endpoint in this way:\r\n```\r\n\"endpoints\": [{\"url\": \"URL/generate_stream\", \"type\" : \"tgi\", \"accessToken\": \"<bearer-token-only>\"}]\r\n```\r\nthen the `accessToken` is properly propagated, but the suggested `\"authorization\": \"Bearer/Basic <string>\"` does not work. \r\n\r\nIf this is intended:\r\n1. I would be happy to open a quick PR to change the README to something like:\r\n```suggestion\r\n#### Bearer\r\n\r\nCustom endpoints may require authorization, depending on how you configure them. Chat-UI support `Bearer` authentication. \r\n\r\nYou can use a token, which can be grabbed from [here](https://huggingface.co/settings/tokens).\r\n\r\nYou can then add the generated information and the `accessToken` parameter to your `.env.local`.\r\n\r\n```env\r\n\"endpoints\": [\r\n{\r\n\"url\": \"https://HOST:PORT\",\r\n\"accessToken\": \"<bearer-token>\",\r\n}\r\n]\r\n\r\n**NOTE**: currently, `Basic` authentication is not supported\r\n\r\n```\r\nPlease let me know what do you think, and if I am missing something. \r\n\r\nThanks,\r\nGuido \r\n\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/592",
    "state": "open",
    "labels": [
      "bug",
      "documentation",
      "back"
    ],
    "created_at": "2023-11-28T18:50:15Z",
    "updated_at": "2023-11-29T13:29:22Z",
    "comments": 1,
    "user": "muscionig"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 421,
    "title": "[Question] FeatureExtractionPipeline input length",
    "body": "@xenova : First of all thank you so much for your amazing work with this open source library. It opens up many possibilities.\r\n\r\nOne thing that caught my attention which is [FeatureExtractionPipeline](https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.FeatureExtractionPipeline) can accept any amount of input regardless of the models' [sequence lengths](https://huggingface.co/spaces/mteb/leaderboard). Does it truncate or tokenize the data internally before applying it to the model? Is there documentation or an explanation about the implementation details?",
    "url": "https://github.com/huggingface/transformers.js/issues/421",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-28T17:28:28Z",
    "updated_at": "2023-12-02T11:20:52Z",
    "user": "devfacet"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2361,
    "title": "How to divide long texts into chunks using sentence-transformers?",
    "body": "Hello, I encounter the issue of my texts exceeding the maximum lengths allowed by pretrained models. So I intend to divide my texts into smaller chunks and then calculate the average embeddings over them.\r\n\r\nHowever, I find this process is not as straightforward as I initially thought. \r\n\r\nIn order to properly chunk the texts, I need to obtain the tokenized version of each text to determine the exact number of tokens. \r\n\r\nUnfortunately, it seems that the tokenizers in sentence-transformers are not standalone, meaning they can not tokenize long texts.\r\n\r\nSo what is the best way to solve this problem?\r\n\r\n",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2361",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-28T16:35:44Z",
    "updated_at": "2023-12-25T12:38:42Z",
    "user": "srhouyu"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 56,
    "title": "Why does the alignment-handbook account for user & system Inputs in loss calculation",
    "body": "I noticed that the alignment-handbook doesn't ignore the loss calculated from both the user and system inputs Based on my knowledge, many SFT choose to ignore these. I'm curious about the reasoning behind this difference.",
    "url": "https://github.com/huggingface/alignment-handbook/issues/56",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-28T06:03:53Z",
    "updated_at": "2024-05-30T07:45:29Z",
    "comments": 3,
    "user": "xffxff"
  },
  {
    "repo": "huggingface/transformers",
    "number": 27737,
    "title": "How to save the generated output of BarkModel to an npz file?",
    "body": "Hello there!\r\n\r\nI'm using the BarkModel from Hugging Face Transformers and I'm wondering how to save the generated results to an npz file. I'd like to use these saved results as history prompts for the next generation.\r\n\r\nIn the [suno-ai/bark](https://github.com/suno-ai/bark) , when using the [`semantic_to_waveform`](https://github.com/suno-ai/bark/blob/main/bark/api.py#L35) method, I can pass `output_full = True`. This allows me to save the output to an npz file using `numpy.savez`.\r\n\r\nHowever, as I transition to using the BarkModel within the transformers framework, I am uncertain about the equivalent process. Could you kindly provide guidance on how to save the generated results of the BarkModel to an npz file in the Transformers library?\r\n\r\nAny assistance or code examples you could offer would be greatly appreciated.\r\n\r\nThank you for your time and support.",
    "url": "https://github.com/huggingface/transformers/issues/27737",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-28T03:55:19Z",
    "updated_at": "2024-01-10T08:03:57Z",
    "user": "chet-chen"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 55,
    "title": "Running on single GPU(16GB)",
    "body": "Hi,\r\n\r\nWhat is the best way to run this on my high performance laptop?\r\nShould this somehow work? Can i calculate how many days/weeks it will run? \r\n\r\nThanks in advance\r\n\r\nSpecs:\r\n\r\n> OS: Win 11 (WSL2)\r\n> CPU: Intel Core i7 12850HX\r\n> Make: Lenovo Thinkpad P16 gen 1\r\n> Memory: 128GB DDR5-4800 (2400MHz) \r\n> GPU: Nvidia RTX A5500 16GB\r\n\r\nI found that this command would work on my laptop it seems:\r\n`ACCELERATE_LOG_LEVEL=info accelerate launch --config_file recipes/accelerate_configs/multi_gpu.yaml --num_processes=1 scripts/run_sft.py recipes/zephyr-7b-beta/sft/config_lora.yaml --load_in_4bit=true --gradient_accumulation_steps=1024 --per_device_eval_batch_size=1 --per_device_train_batch_size=1`\r\n\r\nhow now run it for 1-2 hours ish:\r\n\r\n> ACCELERATE_LOG_LEVEL=info accelerate launch --config_file recipes/accelerate_configs/multi_gpu.yaml --num_processes=1 scripts/run_sft.py recipes/zephyr-7b-beta/sft/config_lora.yaml --load_in_4bit=true --gradient_accumulation_steps=1024 --per_device_eval_batch_size=1 --per_device_train_batch_size=1\r\n> INFO:root:Using nproc_per_node=1.\r\n> 2023-11-27 15:41:33.914308: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\r\n> 2023-11-27 15:41:33.941565: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\r\n> To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\r\n> 2023-11-27 15:41:34.582753: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\r\n> [2023-11-27 15:41:35,164] [INFO] [real_accelerator.py:158:get_accelerator] Setting ds_accelerator to cuda (auto detect)\r\n> /usr/local/lib/python3.11/dist-packages/trl/trainer/ppo_config.py:141: UserWarning: The `optimize_cuda_cache` arguement will be deprecated soon, please use `optimize_device_cache` instead.\r\n>   warnings.warn(\r\n> 2023-11-27 15:41:35 - WARNING - __main__ - Process rank: 0, device: cuda:0, n_gpu: 1 distributed training: True, 16-bits training: False\r\n> 2023-11-27 15:41:35 - INFO - __main__ - Model parameters ModelArguments(base_model_revision=None, model_name_or_path='mistralai/Mistral-7B-v0.1', model_revision='main', model_code_revision=None, torch_dtype='auto', trust_remote_code=False, use_flash_attention_2=True, use_peft=True, lora_r=64, lora_alpha=16, lora_dropout=0.1, lora_target_modules=['q_proj', 'k_proj', 'v_proj', 'o_proj'], lora_modules_to_save=None, load_in_8bit=False, load_in_4bit=True, bnb_4bit_quant_type='nf4', use_bnb_nested_quant=False)\r\n> 2023-11-27 15:41:35 - INFO - __main__ - Data parameters DataArguments(chat_template=None, dataset_mixer={'HuggingFaceH4/ultrachat_200k': 1.0}, dataset_splits=['train_sft', 'test_sft'], max_train_samples=None, max_eval_samples=None, preprocessing_num_workers=12, truncation_side=None)\r\n> 2023-11-27 15:41:35 - INFO - __main__ - Training/evaluation parameters SFTConfig(\r\n> _n_gpu=1,\r\n> adafactor=False,\r\n> adam_beta1=0.9,\r\n> adam_beta2=0.999,\r\n> adam_epsilon=1e-08,\r\n> auto_find_batch_size=False,\r\n> bf16=True,\r\n> bf16_full_eval=False,\r\n> data_seed=None,\r\n> dataloader_drop_last=False,\r\n> dataloader_num_workers=0,\r\n> dataloader_pin_memory=True,\r\n> ddp_backend=None,\r\n> ddp_broadcast_buffers=None,\r\n> ddp_bucket_cap_mb=None,\r\n> ddp_find_unused_parameters=None,\r\n> ddp_timeout=1800,\r\n> debug=[],\r\n> deepspeed=None,\r\n> disable_tqdm=False,\r\n> dispatch_batches=None,\r\n> do_eval=True,\r\n> do_predict=False,\r\n> do_train=False,\r\n> eval_accumulation_steps=None,\r\n> eval_delay=0,\r\n> eval_steps=None,\r\n> evaluation_strategy=IntervalStrategy.EPOCH,\r\n> fp16=False,\r\n> fp16_backend=auto,\r\n> fp16_full_eval=False,\r\n> fp16_opt_level=O1,\r\n> fsdp=[],\r\n> fsdp_config={'min_num_params': 0, 'xla': False, 'xla_fsdp_grad_ckpt': False},\r\n> fsdp_min_num_params=0,\r\n> fsdp_transformer_layer_cls_to_wrap=None,\r\n> full_determinism=False,\r\n> gradient_accumulation_steps=1024,\r\n> gradient_checkpointing=True,\r\n> gradient_checkpointing_kwargs={'use_reentrant': False},\r\n> greater_is_better=None,\r\n> group_by_length=False,\r\n> half_precision_backend=auto,\r\n> hub_always_push=False,\r\n> hub_model_id=zephyr-7b-sft-lora,\r\n> hub_private_repo=False,\r\n> hub_strategy=HubStrategy.EVERY_SAVE,\r\n> hub_token=<HUB_TOKEN>,\r\n> ignore_data_skip=False,\r\n> include_inputs_for_metrics=False,\r\n> include_tokens_per_second=False,\r\n> jit_mode_eval=False,\r\n> label_names=None,\r\n> label_smoothing_factor=0.0,\r\n> learning_rate=2e-05,\r\n> length_column_name=length,\r\n> load_best_model_at_end=False,\r\n> local_rank=0,\r\n> log_level=info,\r\n> log_level_replica=warning,\r\n> log_on_each_node=True,\r\n> logging_dir=data/zephyr-7b-sft-lora/runs/Nov27_15-41-35,\r\n> logging_first_step=True,\r\n> logging_nan_inf_filter=True,\r\n> logging_steps=5,\r\n> logg",
    "url": "https://github.com/huggingface/alignment-handbook/issues/55",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-27T19:50:12Z",
    "updated_at": "2023-12-13T14:58:31Z",
    "comments": 1,
    "user": "patchie"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 588,
    "title": "Hallucinations when using web search",
    "body": "I have tried to run a mistral model with the search api but the web results don't seem to be making it to the model.\r\n\r\nI'm hosting the model through text-gen-webui and encountering the exact same issue as #571. \r\n\r\nI've given it a go with [openhermes-2.5-mistral-7b.Q5_K_M.gguf](https://imgur.com/a/HQV1lGD), [it seems to use the search tool just fine](https://imgur.com/a/GN9ycZY) but fails to incorporate the results into its answer.\r\n\r\nAny idea how to fix this issue or at least how I could help with debugging.",
    "url": "https://github.com/huggingface/chat-ui/issues/588",
    "state": "open",
    "labels": [
      "support",
      "websearch"
    ],
    "created_at": "2023-11-27T17:12:22Z",
    "updated_at": "2023-12-27T21:25:42Z",
    "comments": 2,
    "user": "NasonZ"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 587,
    "title": "How do I format the ChatPromptTemplate ?",
    "body": "I currently have a working setup with llamacpp+mistral 7b instruct with the following loca.env :\r\n```\r\nMODELS=`[\r\n  {\r\n      \"name\": \"Mistral\",\r\n      \"chatPromptTemplate\": \"<s>{{#each messages}}{{#ifUser}}[INST] {{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\\n{{/if}}{{/if}} {{content}} [/INST]{{/ifUser}}{{#ifAssistant}}{{content}}</s> {{/ifAssistant}}{{/each}}\",\r\n      \"parameters\": {\r\n        \"temperature\": 0.1,\r\n        \"top_p\": 0.95,\r\n        \"repetition_penalty\": 1.2,\r\n        \"top_k\": 50,\r\n        \"truncate\": 4096,\r\n        \"max_new_tokens\": 4096,\r\n        \"stop\": [\"</s>\"]\r\n      },\r\n      \"endpoints\": [{\r\n         \"url\": \"http://127.0.0.1:8080\",\r\n         \"type\": \"llamacpp\"\r\n        }\r\n/\r\n      ]\r\n  }\r\n]`\r\n``` \r\n\r\nI am trying to set up the model \"Neural Chat\" by intel , and the tamplate is:\r\n\r\n\r\n### System:\r\n{system_message}\r\n\r\n### User:\r\n{prompt}\r\n\r\n### Assistant:\r\n\r\nHow can I set the chatPromptTemplate to match it? and so it knows to summarize and search the web correctly?\r\nIm having some issues to understand how to format it, and where to put ### User ETC.\r\n\r\nThanks",
    "url": "https://github.com/huggingface/chat-ui/issues/587",
    "state": "open",
    "labels": [
      "support",
      "models"
    ],
    "created_at": "2023-11-27T15:21:17Z",
    "updated_at": "2023-12-19T07:21:50Z",
    "comments": 5,
    "user": "iChristGit"
  },
  {
    "repo": "huggingface/candle",
    "number": 1379,
    "title": "Help request: How to compile CUDA kernels with `cc-rs`?",
    "body": "Hello everybody,\r\n\r\nIn the process of adding PagedAttention to candle-vllm, I need to compile some CUDA kernels. I am currently trying to use `cc-rs` in a `build.rs` to automatically build the kernels. However, I am not making much progress as I have run into issues that seem to be tied to the build stage.\r\n\r\nI would really appreciate some pointers on how to use either `nvcc` or `cc-rs` to build these CUDA kernels. I have opened an issue with vllm: vllm-project/vllm#1793. \r\n\r\nThanks,\r\nEric",
    "url": "https://github.com/huggingface/candle/issues/1379",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-27T14:32:10Z",
    "updated_at": "2023-11-27T20:57:11Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "huggingface/transformers",
    "number": 27726,
    "title": "How to load PixArtAlphaPipeline in 8bit?",
    "body": "I know there is example but I couldn't make it work. I am trying to make an auto installer and gradio interface for Pix Art Alpha Pipeline so common people can install and use on their Windows PCs\r\n\r\nCurrently my below code working and I want to make it load in 8 bit is that possible?\r\n\r\n```\r\nif torch.cuda.is_available():\r\n    pipe = PixArtAlphaPipeline.from_pretrained(\r\n        \"PixArt-alpha/PixArt-XL-2-1024-MS\",\r\n        torch_dtype=torch.float16,\r\n        use_safetensors=True,\r\n    )\r\n\r\n    if ENABLE_CPU_OFFLOAD:\r\n        pipe.enable_model_cpu_offload()\r\n    else:\r\n        pipe.to(device)\r\n        print(\"Loaded on Device!\")\r\n\r\n    # speed-up T5\r\n    pipe.text_encoder.to_bettertransformer()\r\n\r\n    if USE_TORCH_COMPILE:\r\n        pipe.transformer = torch.compile(pipe.transformer, mode=\"reduce-overhead\", fullgraph=True)\r\n        print(\"Model Compiled!\")\r\n```\r\n\r\n```\r\n        seed = int(randomize_seed_fn(seed, randomize_seed))\r\n        generator = torch.Generator().manual_seed(seed)\r\n\r\n        if schedule == 'DPM-Solver':\r\n            if not isinstance(pipe.scheduler, DPMSolverMultistepScheduler):\r\n                pipe.scheduler = DPMSolverMultistepScheduler()\r\n            num_inference_steps = dpms_inference_steps\r\n            guidance_scale = dpms_guidance_scale\r\n        elif schedule == \"SA-Solver\":\r\n            if not isinstance(pipe.scheduler, SASolverScheduler):\r\n                pipe.scheduler = SASolverScheduler.from_config(pipe.scheduler.config, algorithm_type='data_prediction', tau_func=lambda t: 1 if 200 <= t <= 800 else 0, predictor_order=2, corrector_order=2)\r\n            num_inference_steps = sas_inference_steps\r\n            guidance_scale = sas_guidance_scale\r\n        else:\r\n            raise ValueError(f\"Unknown schedule: {schedule}\")\r\n\r\n        if not use_negative_prompt:\r\n            negative_prompt = None  # type: ignore\r\n        prompt, negative_prompt = apply_style(style, prompt, negative_prompt)\r\n\r\n        images = pipe(\r\n            prompt=prompt,\r\n            width=width,\r\n            height=height,\r\n            guidance_scale=guidance_scale,\r\n            num_inference_steps=num_inference_steps,\r\n            generator=generator,\r\n            num_images_per_prompt=NUM_IMAGES_PER_PROMPT,\r\n            use_resolution_binning=use_resolution_binning,\r\n            output_type=\"pil\",\r\n        ).images\r\n```\r\n\r\n### Who can help?\r\n\r\n@sayakpaul @Narsil @SunMarc @younesbelkada @gante \r\n\r\n\r\nI tried below but it broken the app\r\n\r\n```\r\ntext_encoder = T5EncoderModel.from_pretrained(\r\n    \"PixArt-alpha/PixArt-XL-2-1024-MS\",\r\n    subfolder=\"text_encoder\",\r\n    load_in_8bit=True,\r\n    device_map=\"auto\",\r\n\r\n)\r\npipe = PixArtAlphaPipeline.from_pretrained(\r\n    \"PixArt-alpha/PixArt-XL-2-1024-MS\",\r\n    text_encoder=text_encoder,\r\n    transformer=None,\r\n    device_map=\"auto\"\r\n)\r\n```\r\n\r\nThe error I am getting is like below\r\n\r\n```\r\nDownloading shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:00<?, ?it/s]\r\nbin G:\\pixArt installer\\PixArt-alpha\\venv\\lib\\site-packages\\bitsandbytes\\libbitsandbytes_cuda118.dll\r\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:06<00:00,  3.09s/it]\r\nLoading pipeline components...:   0%|                                                                                        | 0/4 [00:00<?, ?it/s]Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\r\nLoading pipeline components...: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 4/4 [00:00<00:00,  9.50it/s]\r\nRunning on local URL:  http://127.0.0.1:7860\r\n\r\nTo create a public link, set `share=True` in `launch()`.\r\nbatch_count 1\r\nTraceback (most recent call last):\r\n  File \"G:\\pixArt installer\\PixArt-alpha\\venv\\lib\\site-packages\\gradio\\queueing.py\", line 427, in call_prediction\r\n    output = await route_utils.call_process_api(\r\n  File \"G:\\pixArt installer\\PixArt-alpha\\venv\\lib\\site-packages\\gradio\\route_utils.py\", line 232, in call_process_api\r\n    output = await app.get_blocks().process_api(\r\n  File \"G:\\pixArt installer\\PixArt-alpha\\venv\\lib\\site-packages\\gradio\\blocks.py\", line 1484, in process_api\r\n    result = await self.call_function(\r\n  File \"G:\\pixArt installer\\PixArt-alpha\\venv\\lib\\site-packages\\gradio\\blocks.py\", line 1106, in call_function\r\n    prediction = await anyio.to_thread.run_sync(\r\n  File \"G:\\pixArt installer\\PixArt-alpha\\venv\\lib\\site-packages\\anyio\\to_thread.py\", line 33, in run_sync\r\n    return await get_asynclib().run_sync_in_worker_thread(\r\n  File \"G:\\pixArt installer\\PixArt-alpha\\venv\\lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 877, in run_sync_in_worker_thread\r\n    return await future\r\n  File \"G:\\pixArt installer\\PixArt-alpha\\venv\\lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 807, in run\r\n    result = context.run(func, *args)\r\n  File \"G:\\pixArt installer\\P",
    "url": "https://github.com/huggingface/transformers/issues/27726",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-27T11:36:44Z",
    "updated_at": "2024-01-05T08:03:56Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5942,
    "title": "How to prepare dataset for text-guided image to image generation",
    "body": "As the title suggests, I want to use stable diffusion to fine-tune my own dataset. How should I build it? I have tried:\r\n--input_image\r\n --xx.jpg\r\n --xx.jpg\r\n--output_image\r\n --yy.jpg\r\n --yy.jpg\r\nmetadata.csv\r\nbut it did't work ,can anybody help?",
    "url": "https://github.com/huggingface/diffusers/issues/5942",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-11-27T06:58:57Z",
    "updated_at": "2024-01-09T15:06:12Z",
    "user": "feelme0461"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 52,
    "title": "What about the system prompt?",
    "body": "It seems that the system prompt is left to be `\\n` or rather blank. \r\n\r\nInspecting UltraChat (https://huggingface.co/datasets/HuggingFaceH4/ultrachat_200k?row=5), seems that no system prompt is added to the dataset.\r\n\r\nThere must be something that I missed in regards to addition of system prompts to the dataset for training, especially since the officially deployed model is able to adhere to system prompt intent (like 'You are a pirate', etc)",
    "url": "https://github.com/huggingface/alignment-handbook/issues/52",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-27T02:55:38Z",
    "updated_at": "2023-11-27T02:55:38Z",
    "comments": 0,
    "user": "timothylimyl"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 50,
    "title": "What is the expected \"global batch size\"?",
    "body": "In the recipes README there is this statement:\r\n\r\n>  If you scale up/down the number of GPUs, we recommend also scaling up the per-device batch size or number of gradient accumulation steps to keep the global batch size constant (and thus replicate our results).\r\n\r\nQ: What is the expected \"global batch size\"?\r\n\r\nFor example, I'm trying to run this on 2x3090s  and need to know what the expected global batch size is so I can adjust the accumulation steps and per device train batch size.\r\n\r\nThanks much!",
    "url": "https://github.com/huggingface/alignment-handbook/issues/50",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-26T21:47:41Z",
    "updated_at": "2023-11-27T04:14:22Z",
    "user": "ohmeow"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 417,
    "title": "[Question] Any examples of processing video frames of a user uploaded video (specifically for depth estimation)?",
    "body": "Hi there, I'm wondering if there are any examples of processing video frames of a user uploaded video? I'm specifically looking to run depth estimation on each frame of a short video, but any similar example would be useful.\r\n\r\nIf not, does this approach seem correct?\r\n* Use one of the approaches described [here](https://stackoverflow.com/questions/32699721/javascript-extract-video-frames-reliably) to draw each frame of the video to a canvas\r\n* Call `HTMLCanvasElement.toBlob()` on the canvas to get a `Blob`\r\n* Pass N (10?) of those Blobs to a worker at a time\r\n* For each of those Blobs call `const image = await RawImage.fromBlob(blob)` to get a `RawImage`\r\n* Run depth estimation on the list of images with `await classifier([rawImage1, rawImage2, etc.])`\r\n\r\nThanks for any help!\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/417",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-26T09:18:04Z",
    "updated_at": "2023-12-10T22:51:18Z",
    "user": "jparismorgan"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 583,
    "title": "Option to share the web interface locally/online ?",
    "body": "I wish we could make the ui available on phone/mac or even outside the local network.\r\nFor example in SillyTavern (https://github.com/SillyTavern/SillyTavern)\r\nYou can either open it up to all devices in the local network or open a cloudflare tunnel to access it through a link.\r\nIs that possible to add? ",
    "url": "https://github.com/huggingface/chat-ui/issues/583",
    "state": "open",
    "labels": [
      "enhancement",
      "back"
    ],
    "created_at": "2023-11-26T00:44:08Z",
    "updated_at": "2024-04-22T16:45:44Z",
    "comments": 2,
    "user": "iChristGit"
  },
  {
    "repo": "huggingface/candle",
    "number": 1375,
    "title": "Question: How to interface a C++ API `torch::Tensor` with `candle_core::Tensor`?",
    "body": "I was wondering if there is a way to use a C++ API that accepts a Pytorch `torch::Tensor` with a Candle `candle_core::Tensor`? For reference, I want to use [this](https://github.com/vllm-project/vllm/blob/main/csrc/ops.h) C++ API.\r\n\r\nCan I convert between tensor types? @LaurentMazare, would it be possible to use [tch-rs](https://github.com/LaurentMazare/tch-rs) to make this conversion?\r\n\r\nThanks for any help!",
    "url": "https://github.com/huggingface/candle/issues/1375",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-25T19:05:27Z",
    "updated_at": "2023-11-25T23:04:03Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2486,
    "title": "\u2753 [Question] Using dynamic shapes with FX frontend",
    "body": "I tried to use dynamic shapes in FX path with the following codes. It seems that the `input_specs` argument passed to `LowerSetting` has no effect and TRT gives an error message.\r\n\r\n```python\r\nimport torch\r\nimport torch.nn as nn\r\nfrom torch_tensorrt.fx import InputTensorSpec, LowerSetting\r\nfrom torch_tensorrt.fx.lower import Lowerer\r\nfrom torch_tensorrt.fx.utils import LowerPrecision\r\n\r\n\r\nclass MyModule(nn.Module):\r\n    def __init__(self):\r\n        super(MyModule, self).__init__()\r\n        self.conv = nn.Sequential(nn.Conv2d(1, 20, 5), nn.PReLU())\r\n\r\n    def forward(self, input):\r\n        return self.conv(input)\r\n\r\n\r\nwith torch.inference_mode():\r\n    device = torch.device(\"cuda\")\r\n    mod = MyModule().eval().to(device).half()\r\n\r\n    lower_setting = LowerSetting(\r\n        lower_precision=LowerPrecision.FP16,\r\n        min_acc_module_size=1,\r\n        input_specs=[\r\n            InputTensorSpec(\r\n                shape=(1, 1, -1, -1),\r\n                dtype=torch.half,\r\n                device=device,\r\n                shape_ranges=[((1, 1, 16, 16), (1, 1, 32, 32), (1, 1, 64, 64))],\r\n            )\r\n        ],\r\n        dynamic_batch=False,\r\n    )\r\n    lowerer = Lowerer.create(lower_setting=lower_setting)\r\n    mod_trt = lowerer(mod, [torch.rand((1, 1, 16, 16), dtype=torch.half, device=device)])\r\n\r\n    print(mod_trt(torch.rand((1, 1, 16, 16), dtype=torch.half, device=device)).shape)\r\n    print(mod_trt(torch.rand((1, 1, 32, 32), dtype=torch.half, device=device)).shape)\r\n```\r\n\r\n```\r\nWARNING:torch_tensorrt.fx.tracer.acc_tracer.acc_tracer:MyModule__AccRewrittenModule does not have attribute _compiled_call_impl\r\nWARNING:torch_tensorrt.fx.tracer.acc_tracer.acc_tracer:Sequential__AccRewrittenModule does not have attribute _compiled_call_impl\r\nWARNING:torch_tensorrt.fx.tracer.acc_tracer.acc_tracer:Conv2d__AccRewrittenModule does not have attribute _compiled_call_impl\r\nWARNING:torch_tensorrt.fx.tracer.acc_tracer.acc_tracer:PReLU__AccRewrittenModule does not have attribute _compiled_call_impl\r\nC:\\Python311\\Lib\\site-packages\\torch\\overrides.py:110: UserWarning: 'has_cuda' is deprecated, please use 'torch.backends.cuda.is_built()'\r\n  torch.has_cuda,\r\nC:\\Python311\\Lib\\site-packages\\torch\\overrides.py:111: UserWarning: 'has_cudnn' is deprecated, please use 'torch.backends.cudnn.is_available()'\r\n  torch.has_cudnn,\r\nC:\\Python311\\Lib\\site-packages\\torch\\overrides.py:117: UserWarning: 'has_mps' is deprecated, please use 'torch.backends.mps.is_built()'\r\n  torch.has_mps,\r\nC:\\Python311\\Lib\\site-packages\\torch\\overrides.py:118: UserWarning: 'has_mkldnn' is deprecated, please use 'torch.backends.mkldnn.is_available()'\r\n  torch.has_mkldnn,\r\nWARNING:torch_tensorrt.fx.tracer.acc_tracer.acc_tracer:GraphModule.__new__.<locals>.GraphModuleImpl__AccRewrittenModule does not have attribute _compiled_call_impl\r\nWARNING:torch_tensorrt.fx.tracer.acc_tracer.acc_tracer:Module__AccRewrittenModule does not have attribute _compiled_call_impl\r\nWARNING:torch_tensorrt.fx.tracer.acc_tracer.acc_tracer:Module__AccRewrittenModule does not have attribute _compiled_call_impl\r\nWARNING:torch_tensorrt.fx.tracer.acc_tracer.acc_tracer:Module__AccRewrittenModule does not have attribute _compiled_call_impl\r\nINFO:torch_tensorrt.fx.passes.pass_utils:== Log pass <function fuse_permute_matmul at 0x000001E8B08F0E00> before/after graph to C:\\Users\\HOLYWU~1\\AppData\\Local\\Temp\\tmpgbz4qw6c, before/after are the same = True, time elapsed = 0:00:00.026858\r\nINFO:torch_tensorrt.fx.passes.pass_utils:== Log pass <function fuse_permute_linear at 0x000001E8B08F0B80> before/after graph to C:\\Users\\HOLYWU~1\\AppData\\Local\\Temp\\tmpp8c1a1dw, before/after are the same = True, time elapsed = 0:00:00.000981\r\nINFO:torch_tensorrt.fx.passes.pass_utils:== Log pass <function fix_clamp_numerical_limits_to_fp16 at 0x000001E8B08F1440> before/after graph to C:\\Users\\HOLYWU~1\\AppData\\Local\\Temp\\tmp43sia5pv, before/after are the same = True, time elapsed = 0:00:00\r\n\r\nSupported node types in the model:\r\nacc_ops.conv2d: ((), {'input': torch.float16, 'weight': torch.float16, 'bias': torch.float16})\r\n\r\nUnsupported node types in the model:\r\nacc_ops.prelu: ((), {'input': torch.float16, 'weight': torch.float16})\r\n\r\nGot 1 acc subgraphs and 1 non-acc subgraphs\r\nINFO:torch_tensorrt.fx.passes.lower_pass_manager_builder:Now lowering submodule _run_on_acc_0\r\nINFO:torch_tensorrt.fx.lower:split_name=_run_on_acc_0, input_specs=[InputTensorSpec(shape=torch.Size([1, 1, 16, 16]), dtype=torch.float16, device=device(type='cuda', index=0), shape_ranges=[], has_batch_dim=True)]\r\nINFO:torch_tensorrt.fx.lower:Timing cache is used!\r\nINFO:torch_tensorrt.fx.fx2trt:TRT INetwork construction elapsed time: 0:00:00.001014\r\nINFO:torch_tensorrt.fx.fx2trt:Build TRT engine elapsed time: 0:00:00.993050\r\nINFO:torch_tensorrt.fx.passes.lower_pass_manager_builder:Lowering submodule _run_on_acc_0 elapsed time 0:00:05.996300\r\ntorch.Size([1, 20, 12, 12])\r\n[11/25/2023-13:55:00] [TRT] [E] 3: [executionContext.cpp::nvinfer1::rt::ExecutionContext::validat",
    "url": "https://github.com/pytorch/TensorRT/issues/2486",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-25T06:52:12Z",
    "updated_at": "2024-02-22T13:30:13Z",
    "user": "HolyWu"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2485,
    "title": "How may I install torch_tensorrt with my own local version of torch?",
    "body": "## \u2753 Question\r\n\r\nHow may I install `torch_tensorrt` with my own local version of torch?\r\n\r\n## What you have already tried\r\n\r\npip install torch-tensorrt --no-deps resulted in \r\n\r\n```\r\nImportError: /home/jonch/.local/lib/python3.10/site-packages/torch_tensorrt/lib/libtorchtrt.so: undefined symbol: _ZN3c106detail23torchInternalAssertFailEPKcS2_jS2_RKSs\r\n```\r\nSeems like it tries to link to torch shared library but fails. I guess I can't configure it to point to my existing installation of torch.\r\n\r\nFor instance, what if I want to use torch_tensorrt with torch nightly?\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture:\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2485",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-25T05:25:35Z",
    "updated_at": "2023-11-28T19:50:29Z",
    "user": "jon-chuang"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2187,
    "title": "how to collect outputs(not tensor dtype) on multi gpus ",
    "body": "As the toy example below, \r\n\r\n```\r\nval_dataset = ['a', 'b', 'c', 'd', 'e']\r\nval_dataloader = DataLoader(\r\n        val_dataset, batch_size=2\r\n    )\r\naccelerator = Accelerator()\r\nval_dataloader = accelerator.prepare(val_dataloader)\r\nfor step, batch in enumerate(val_dataloader):\r\n    print(batch, accelerator.device)\r\n```\r\n\r\nWhen i run this script by `CUDA_VISIBLE_DEVICES=\"0,1\" accelerate launch --config_file=\"./configs/acc_mgpu_config.yaml\" test_batch.py` , i will get below results, how can I get ['a', 'b', 'c', 'd', 'e'] in main process after reduce batch in all processes? \r\n```\r\n['a', 'b'] cuda:0\r\n['e', 'a'] cuda:0\r\n['c', 'd'] cuda:1\r\n['b', 'c'] cuda:1\r\n```\r\n\r\nI know that accelerate have a `gather_for_metrics` can gathers input and potentially **drops duplicates** in the last batch if on a distributed system. But this function seems only works for data which is tensor type, in this example, my data is string, is there any way to achieve this?\r\n(if i use `print(accelerator.gather_for_metrics((batch)), accelerator.device)`, it will raise error like below\r\n```\r\nTypeError: Unsupported types (<class 'str'>) passed to `_gpu_gather_one`. Only nested list/t\r\nuple/dicts of objects that are valid for `is_torch_tensor` should be passed.\r\n```\r\nThanks for any potential answers!",
    "url": "https://github.com/huggingface/accelerate/issues/2187",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-25T02:51:21Z",
    "updated_at": "2023-11-27T06:07:19Z",
    "user": "shliu0"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 581,
    "title": "Trying to set up with TGI",
    "body": "I have installed TGI using docker, I can see the api docs at http://127.0.0.1:8080/docs/\r\nBut still cannot set up the env.local file, I have tried to set it up with the example, but always failing.\r\n![image](https://github.com/huggingface/chat-ui/assets/20077386/032a02c0-9d3b-473e-9c1b-a3c948eb06d3)\r\n![image](https://github.com/huggingface/chat-ui/assets/20077386/3cd0a46d-0334-448e-bad8-2124045abc42)Can someone who set it up correctly give me the rough idea of how to write the file ? I have tried a lot of combinations, and it always fail either internal error or the screenshot above.\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/581",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2023-11-24T19:20:27Z",
    "updated_at": "2023-12-19T06:02:25Z",
    "comments": 2,
    "user": "iChristGit"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 412,
    "title": "[Question] Does any version support Node 14",
    "body": "Hi,\r\n\r\nI have tried downgrading the library to version 2, and even to 1, but that one was missing types.\r\n\r\nIs there some way to be able to use it with Node 14? I have seen that mostly the issues are with nullish coalescing characters, so wanted to make sure if there could be other issues that tie it to Node 18+, and also if there have been any security and vulnerability issues from said version (that could work with Node 14).\r\n\r\nThanks\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/412",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-24T16:01:54Z",
    "updated_at": "2023-12-04T13:16:26Z",
    "user": "Ncifra"
  },
  {
    "repo": "huggingface/hf_transfer",
    "number": 20,
    "title": "[Usage] How to enable the progress bar?",
    "body": "I've installed `hf_transfer-0.1.4`.\r\nBut when I use `huggingface-cli download`, the progress bar mentioned [here](https://huggingface.co/docs/huggingface_hub/guides/download#faster-downloads) seems to be disabled at default.\r\nAnd I failed to figure out how to enable it.\r\nCould anyone be kind enough to provide some guidance?",
    "url": "https://github.com/huggingface/hf_transfer/issues/20",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-24T08:13:00Z",
    "updated_at": "2023-11-27T12:15:10Z",
    "user": "tongyx361"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 39,
    "title": "How to implement point clouds render?",
    "body": "Hi, great work! I see that this library is upon [antimatter15/splat](https://github.com/antimatter15/splat), but this library does not have the same render which is very similar to point clouds like that lib. I want to know how to implement this function base on your gsplat library?  By the way, do you have any document about the config options, so I can set some render options?",
    "url": "https://github.com/huggingface/gsplat.js/issues/39",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-24T07:27:33Z",
    "updated_at": "2024-01-22T21:12:06Z",
    "user": "xinnai"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 46,
    "title": "Weird DPO loss",
    "body": "Hi, I would like to raise some attention to issue #38.\r\n\r\nIt seems that the DPO-Lora training loss (red line) drops abruptly at the beginning of each epoch, which seems weird.  (I tried Lora model global batch size 64, multi_gpu acceleration, 8GPUs, learning rate 1e-4, others same suggested) \r\n\r\nIn the mean time, the full parameter fine tunning has no such problem (official settings). \r\n\r\n![image](https://github.com/huggingface/alignment-handbook/assets/40993476/5ffa7fd5-c93b-44e5-a150-2a133371ab13)\r\n\r\nI don't know if this is normal and **assume this is a bug associated with the lora model**. Is there any explanations? Has anyone encountered the same issue? If your rerun loss is normal, can you share your configs?",
    "url": "https://github.com/huggingface/alignment-handbook/issues/46",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-24T03:07:46Z",
    "updated_at": "2024-05-28T07:09:10Z",
    "comments": 1,
    "user": "ChenDRAG"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5912,
    "title": "How to set config in VaeImageProcessor?",
    "body": "I created a `StableDiffusionControlNetImg2ImgPipeline` and I want to manually set the config `do_normalize` in `VaeImageProcessor`. I wonder how can I set? I look for it in the pipe.vae.config and see nothing about it.",
    "url": "https://github.com/huggingface/diffusers/issues/5912",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-11-23T12:54:22Z",
    "updated_at": "2023-12-26T21:29:17Z",
    "user": "youyuge34"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 576,
    "title": "Cannot build using latest Chat UI Space template",
    "body": "Using the Dockerfile created from the ChatUI-Space template, but cloning it to a local machine and trying to build it fails at `npm run build`\r\n\r\n> #18 [chatui-builder 12/12] RUN npm run build\r\n#0 0.673\r\n#0 0.673 > chat-ui@0.6.0 build\r\n#0 0.673 > vite build\r\n#0 0.673\r\n#0 1.678 vite v4.3.9 building SSR bundle for production...\r\n#0 1.678\r\n#0 1.707 transforming...\r\n#0 4.381 \"BaseClient\" and \"TokenSet\" are imported from external module \"openid-client\" but never used in \"src/lib/server/auth.ts\".\r\n#0 4.381 \u2713 210 modules transformed.\r\n#0 4.473 rendering chunks...\r\n#0 5.665\r\n#0 5.665 node:internal/event_target:1036\r\n#0 5.665   process.nextTick(() => { throw err; });\r\n#0 5.665                            ^\r\n#0 5.666 SyntaxError [Error]: Bad control character in string literal in JSON at position 157\r\n#0 5.666     at JSON.parse (<anonymous>)\r\n#0 5.666     at file:///app/chat-ui/.svelte-kit/output/server/chunks/models.js:512:51\r\n#0 5.666     at ModuleJob.run (node:internal/modules/esm/module_job:193:25)\r\n#0 5.666 Emitted 'error' event on Worker instance at:\r\n#0 5.666     at [kOnErrorMessage] (node:internal/worker:309:10)\r\n#0 5.666     at [kOnMessage] (node:internal/worker:320:37)\r\n#0 5.666     at MessagePort.<anonymous> (node:internal/worker:216:57)\r\n#0 5.666     at [nodejs.internal.kHybridDispatch] (node:internal/event_target:761:20)\r\n#0 5.666     at exports.emitMessage (node:internal/per_context/messageport:23:28)\r\n#0 5.666\r\n#0 5.666 Node.js v19.9.0\r\n#0 5.751 npm notice\r\n#0 5.751 npm notice New major version of npm available! 9.6.3 -> 10.2.4\r\n#0 5.751 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.4>\r\n#0 5.751 npm notice Run `npm install -g npm@10.2.4` to update!\r\n#0 5.751 npm notice\r\n#18 ERROR: process \"/bin/sh -c npm run build\" did not complete successfully: exit code: 1\r\n#------\r\n#> [chatui-builder 12/12] RUN npm run build:\r\n#0 5.666     at MessagePort.<anonymous> (node:internal/worker:216:57)\r\n#0 5.666     at [nodejs.internal.kHybridDispatch] (node:internal/event_target:761:20)\r\n#0 5.666     at exports.emitMessage (node:internal/per_context/messageport:23:28)\r\n#0 5.666\r\n#0 5.666 Node.js v19.9.0\r\n#0 5.751 npm notice\r\n#0 5.751 npm notice New major version of npm available! 9.6.3 -> 10.2.4\r\n#0 5.751 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.4>\r\n#0 5.751 npm notice Run `npm install -g npm@10.2.4` to update!\r\n#0 5.751 npm notice\r\n#------\r\n#Dockerfile:49\r\n#--------------------\r\n#47 |         npm ci\r\n#48 |\r\n#49 | >>> RUN npm run build\r\n#50 |\r\n#51 |     FROM ghcr.io/huggingface/text-generation-inference:latest\r\n#--------------------\r\n#ERROR: failed to solve: process \"/bin/sh -c npm run build\" did not complete successfully: exit code: 1",
    "url": "https://github.com/huggingface/chat-ui/issues/576",
    "state": "open",
    "labels": [
      "support",
      "spaces"
    ],
    "created_at": "2023-11-23T12:23:06Z",
    "updated_at": "2023-11-30T14:11:32Z",
    "comments": 1,
    "user": "simon376"
  },
  {
    "repo": "huggingface/transformers",
    "number": 27666,
    "title": "how to remove punctuation marks.",
    "body": "### System Info\n\ni trained t5-large for translation.\r\n\r\nthe result of train was good\r\n\r\nBut when i input some sentence, the result is like that \"What are you doing now?.??.....\"\r\n\r\n[?.??......] <- how to delete that punctuation marks.\r\n\r\ni put some parameter like max_length. But i can not solve that situation\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nc\n\n### Expected behavior\n\ncfdvf",
    "url": "https://github.com/huggingface/transformers/issues/27666",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-23T07:21:33Z",
    "updated_at": "2023-12-31T08:03:43Z",
    "user": "chanyong-owl"
  },
  {
    "repo": "huggingface/blog",
    "number": 1655,
    "title": "how to scale fine-tuning whisper in English?",
    "body": "I'm attempting to fine-tune whisper using the excellent hugging face tut: https://huggingface.co/blog/fine-tune-whisper. The delta between the tut's case and my case is that I am using English which has 1M more test cases (and also I'm using big GPUs so I am using `whisper-large-v3`).\r\n\r\nNo matter how much compute I throw at the core data preparation step (e.g. take a look at `num_proc`):\r\n\r\n`common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names[\"train\"], num_proc=108)`\r\n\r\nI still only prepare the data at about 30 examples / s. For 1M examples this doesn't scale. My last test was on an 8 GPU 112 vCPU instance and still there was no change. Indeed `htop` shows that all 112 of my vCPUs are engaged, but the actual prep speed remains flat across all compute types. The only thing I haven't tried is crazy fast storage like NVMe, which I'm going to do, but I have a feeling it has to do with either the `datasets` library configuration or something else. I've never had problems with GPUs or whisper previously so I'm a bit baffled as to what the issue could. I've followed the tutorial to a 't' except for changing the language to `en`, whisper to `whisper-large-v3` and `num_proc` to higher parallels. Any insight would be greatly appreciated!",
    "url": "https://github.com/huggingface/blog/issues/1655",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-22T22:45:29Z",
    "updated_at": "2024-03-10T06:55:47Z",
    "user": "jsteinberg-rbi"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6446,
    "title": "Speech Commands v2 dataset doesn't match AST-v2 config",
    "body": "### Describe the bug\n\n[According](https://huggingface.co/MIT/ast-finetuned-speech-commands-v2) to `MIT/ast-finetuned-speech-commands-v2`, the model was trained on the Speech Commands v2 dataset. However, while the model config says the model should have 35 class labels, the dataset itself has 36 class labels. Moreover, the class labels themselves don't match between the model config and the dataset. It is difficult to reproduce the data used to fine tune `MIT/ast-finetuned-speech-commands-v2`.\n\n### Steps to reproduce the bug\n\n```\r\n>>> model = ASTForAudioClassification.from_pretrained(\"MIT/ast-finetuned-speech-commands-v2\")\r\n>>> model.config.id2label\r\n{0: 'backward', 1: 'follow', 2: 'five', 3: 'bed', 4: 'zero', 5: 'on', 6: 'learn', 7: 'two', 8: 'house', 9: 'tree', 10: 'dog', 11: 'stop', 12: 'seven', 13: 'eight', 14: 'down', 15: 'six', 16: 'forward', 17: 'cat', 18: 'right', 19: 'visual', 20: 'four', 21: 'wow', 22: 'no', 23: 'nine', 24: 'off', 25: 'three', 26: 'left', 27: 'marvin', 28: 'yes', 29: 'up', 30: 'sheila', 31: 'happy', 32: 'bird', 33: 'go', 34: 'one'}\r\n\r\n>>> dataset = load_dataset(\"speech_commands\", \"v0.02\", split=\"test\")\r\n>>> torch.unique(torch.Tensor(dataset['label']))\r\ntensor([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11., 12., 13.,\r\n        14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25., 26., 27.,\r\n        28., 29., 30., 31., 32., 33., 34., 35.])\r\n```\r\nIf you try to explore the [dataset itself](https://huggingface.co/datasets/speech_commands/viewer/v0.02/test), you can see that the id to label does not match what is provided by `model.config.id2label`.\r\n\n\n### Expected behavior\n\nThe labels should match completely and there should be the same number of label classes between the model config and the dataset itself.\n\n### Environment info\n\ndatasets = 2.14.6, transformers =  4.33.3",
    "url": "https://github.com/huggingface/datasets/issues/6446",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-22T20:46:36Z",
    "updated_at": "2023-11-28T14:46:08Z",
    "comments": 3,
    "user": "vymao"
  },
  {
    "repo": "pytorch/rl",
    "number": 1708,
    "title": "[Question] What is ESS in PPO?",
    "body": "Here [ppo.py](https://github.com/pytorch/rl/blob/main/torchrl/objectives/ppo.py#L649) from PPO source code is the definition.\r\n<img width=\"983\" alt=\"Screenshot 2023-11-22 at 1 21 12 AM\" src=\"https://github.com/pytorch/rl/assets/22335780/3ec3663e-7140-4353-a65a-8b13f761fab2\">\r\n\r\nDoes ESS stand for **Effective Sample Size** or something else? \r\nWhat is the purpose logging this info?\r\nA reference for 'ESS' would be helpful. Thank you.",
    "url": "https://github.com/pytorch/rl/issues/1708",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-22T06:13:37Z",
    "updated_at": "2023-11-23T03:07:41Z",
    "user": "gitfourteen"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 45,
    "title": "Reproducing of Lora Model  Result on MT-Bench",
    "body": "Recently, I attempted to fit the DPO on my own dataset.\r\nInitially, I tried to reproduce the results of your LORA model( 7.43 on MT-Bench).\r\nHowever, I encountered some issues. \r\nDespite using all your parameters and data, here are my results on MT-Bench:\r\n| Model | MT-Bench |\r\n|--------|--------|\r\n| Zephyr-SFT-Lora-Own | 6.37 |\r\n| Zephyr-DPO-Lora-Own | 6.95 | \r\n\r\nThen, I downloaded your models from [here](https://huggingface.co/alignment-handbook), and the results were nearly the same as mine.\r\n| Model | MT-Bench |\r\n|--------|--------|\r\n| Zephyr-SFT-Lora| 6.4|\r\n| Zephyr-DPO-Lora| 6.93 | \r\n\r\nDPO does help improve performance on MT-Bench, but I can't achieve a score of **7.43**. Is there any difference between the model described in your paper and the model available on your homepage? \r\nOr could it be the difference between the full  and LORA?\r\n\r\nBy the way, I truly love the \"yaml style\" argument parser; it's clear and elegant!\r\n@edbeeching @lewtun \r\n\r\n",
    "url": "https://github.com/huggingface/alignment-handbook/issues/45",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-22T03:42:32Z",
    "updated_at": "2023-12-11T17:09:32Z",
    "comments": 27,
    "user": "wlhgtc"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1551,
    "title": "Running llama-2-13b resulted in `Killed`",
    "body": "### System Info\n\n```shell\nThis is my run.py code:\r\n\r\n    import torch\r\n    import transformers\r\n    import requests\r\n    print(torch.cuda.is_available())\r\n    device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\r\n    # Load model and adapter weights from local directory\r\n    model = transformers.AutoModelForCausalLM.from_pretrained(\"/home/maxloo/src/pastoring/llama/llama-2-13b\")\r\n    model.to(device)\r\n    adapter = transformers.AutoModelForCausalLM.from_pretrained(\"/home/maxloo/src/pastoring/adapter\", config=transformers.configuration.AdapterConfig.from_json_file(\"adapter_config.json\"))\r\n    model.load_state_dict(adapter.state_dict())\r\n    adapter.load_state_dict(model.state_dict())\r\n    # Define prompt\r\n    prompt = \"Hello, I am a chatbot.\"\r\n    # Perform inference\r\n    response = model.generate(prompt, max_length=50)\r\n    # Print response\r\n    print(response)\r\n\r\nThis is my adapter_config.json code:\r\n\r\n    {\r\n      \"base_model_name_or_path\": \"../llama/llama-2-13b/\",\r\n      \"bias\": \"none\",\r\n      \"enable_lora\": null,\r\n      \"fan_in_fan_out\": false,\r\n      \"inference_mode\": true,\r\n      \"init_lora_weights\": true,\r\n      \"lora_alpha\": 16,\r\n      \"lora_dropout\": 0.05,\r\n      \"merge_weights\": false,\r\n      \"modules_to_save\": null,\r\n      \"peft_type\": \"LORA\",\r\n      \"r\": 16,\r\n      \"target_modules\": [\r\n        \"q_proj\",\r\n        \"k_proj\",\r\n        \"v_proj\",\r\n        \"o_proj\"\r\n      ],\r\n      \"task_type\": \"CAUSAL_LM\",\r\n      \"task\": \"question_answering\",\r\n      \"domain\": \"general\"\r\n    }\r\n\r\nThese are my hardware specs:\r\n\r\n    Intel Core i7-13700HX, NVIDIA RTX 4060, 32GB DDR5, 1TB SSD\r\n\r\nI'm using Windows 11 WSL2 Bash to run this command:\r\n\r\n    python3 run.py\r\n\r\nI have set my .wslconfig file as follows:\r\n\r\n    [wsl2]\r\n    memory=24GB\r\n    processors=24\r\n\r\nI expect a chat message to be displayed and a prompt for my chat input, but this is the actual output:\r\n\r\n    Killed\r\n\r\nHow do I resolve this?  Should I be testing llama-13b first before llama-2-13b?\n```\n\n\n### Who can help?\n\n@echarlaix, \r\n@philschmid\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\npython3 run.py\r\n![Screenshot 2023-11-21 211036](https://github.com/huggingface/optimum/assets/71763812/fc5b7e1c-1e57-41e5-a986-130681eba41d)\r\n\n\n### Expected behavior\n\nI expect a chat message to be displayed and a prompt for my chat input, but this is the actual output:\r\n\r\n    Killed\r\n\r\nHow do I resolve this?  Should I be testing llama-13b first before llama-2-13b?  ",
    "url": "https://github.com/huggingface/optimum/issues/1551",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-11-21T13:11:40Z",
    "updated_at": "2024-01-09T15:58:09Z",
    "comments": 1,
    "user": "maxloopinmok"
  },
  {
    "repo": "huggingface/optimum-quanto",
    "number": 32,
    "title": "Are threre some exmples show how to export onnx model ?     torch.onnx.export",
    "body": "",
    "url": "https://github.com/huggingface/optimum-quanto/issues/32",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-21T11:33:37Z",
    "updated_at": "2024-03-13T08:15:51Z",
    "user": "youkiwang"
  },
  {
    "repo": "pytorch/executorch",
    "number": 1252,
    "title": "What is the codegen really done at the Executorch flow?",
    "body": "Hi,\r\n\r\nAlthough I study the https://pytorch.org/executorch/stable/concepts.html#codegen about codegen part, I do not understand very well about this part.\r\n![Screenshot from 2023-11-21 16-38-38](https://github.com/pytorch/executorch/assets/87454575/669a120d-714a-4861-9b5c-1d822bfd29dd)\r\n\r\nAbove the concepts map, after I export the model.pte file which is the binary file.\r\nCan I directly select the kernel op to run the model with Executorch Runtime library ?\r\n\r\nAnd there is another branch of model.pte file which do the codegen to gen the Kernel Registration Library. I do not understand very well about this part.\r\n\r\nMy question is that if I can run with model.pte file with kernel op run time library, why need to codegen again?\r\nOr what is the codegen output at real flow? Is it a c code about the graph of the model with ops and the weight? ",
    "url": "https://github.com/pytorch/executorch/issues/1252",
    "state": "closed",
    "labels": [
      "need-user-input",
      "module: kernels",
      "triaged"
    ],
    "created_at": "2023-11-21T08:38:57Z",
    "updated_at": "2024-02-14T00:53:21Z",
    "user": "kris-himax"
  },
  {
    "repo": "huggingface/transformers",
    "number": 27615,
    "title": "How to get the number of trainable parameters for a hf model",
    "body": "### Feature request\r\n'\r\npeft_parameters = LoraConfig(\r\n    lora_alpha=16,\r\n    lora_dropout=0.1,\r\n    r=8,\r\n    bias=\"none\",\r\n    task_type=\"CAUSAL_LM\"\r\n)\r\ntrain_params = TrainingArguments(\r\n    output_dir=\"./results_modified\",\r\n    num_train_epochs=1,\r\n    per_device_train_batch_size=4,\r\n    gradient_accumulation_steps=1,\r\n    optim=\"paged_adamw_32bit\",\r\n    save_steps=25,\r\n    logging_steps=25,\r\n    learning_rate=2e-4,\r\n    weight_decay=0.001,\r\n    fp16=False,\r\n    bf16=False,\r\n    max_grad_norm=0.3,\r\n    max_steps=-1,\r\n    warmup_ratio=0.03,\r\n    group_by_length=True,\r\n    lr_scheduler_type=\"constant\",\r\n    report_to=\"tensorboard\"\r\n)\r\nfine_tuning = SFTTrainer(\r\n    model=base_model,\r\n    train_dataset=training_data,\r\n    peft_config=peft_parameters,\r\n    dataset_text_field=\"text\",\r\n    tokenizer=llama_tokenizer,\r\n    args=train_params\r\n)\r\n\r\nfine_tuning.train()\r\n\r\nI am using the above code for model training with Lora. I wonder after applying to Lora. How could I check the number of trainable parameters of the model before and after?\r\n\r\n### Motivation\r\n\r\nUnderstand the training process well\r\n\r\n### Your contribution\r\n\r\nI'd love to ",
    "url": "https://github.com/huggingface/transformers/issues/27615",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-21T00:37:01Z",
    "updated_at": "2023-11-21T19:28:32Z",
    "user": "mathmax12"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 571,
    "title": "trying to replicate the api search with the local search option",
    "body": "When I try searching for information on the site (huggingface.co/chat) it works fine and gives correct information, but when doing the same thing using the same model  I get hallucinations..\r\nIve tried all sorts of temperature settings and models.\r\nThis is the result locally:\r\n![image](https://github.com/huggingface/chat-ui/assets/20077386/cee5a762-3004-4953-9a9b-c6dc2291c569)\r\nThis is with the site:\r\n![image](https://github.com/huggingface/chat-ui/assets/20077386/0f1001bf-6c16-4dc0-84b5-b668d135c1d6)\r\nThe sources look the smae on both but the actual response is always not even real information..\r\nThis is my current config:\r\n\r\nMONGODB_URL=mongodb://localhost:27017\r\nPUBLIC_APP_NAME=PrivateGPT\r\nMODELS=`[\r\n  {\r\n    \"name\": \"text-generation-webui\",\r\n    \"id\": \"text-generation-webui\",\r\n    \"parameters\": {\r\n      \"temperature\": 0.1,\r\n      \"top_p\": 0.95,\r\n      \"repetition_penalty\": 1.2,\r\n      \"top_k\": 12,\r\n      \"truncate\": 1000,\r\n      \"max_new_tokens\": 1024,\r\n      \"stop\": []\r\n    },\r\n    \"endpoints\": [{\r\n      \"type\" : \"openai\",\r\n      \"baseURL\": \"http://127.0.0.1:5000/v1/\"\r\n    }]\r\n  }\r\n]`\r\n\r\n\r\nTypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed\r\n    at new NodeError (node:internal/errors:405:5)\r\n    at ReadableStreamDefaultController.enqueue (node:internal/webstreams/readablestream:1040:13)\r\n    at update (C:/ChatUI/src/routes/conversation/[id]/+server.ts:155:20)\r\n    at Object.start (C:/ChatUI/src/routes/conversation/[id]/+server.ts:189:15)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {\r\n  code: 'ERR_INVALID_STATE'\r\n}\r\nTypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed\r\n    at new NodeError (node:internal/errors:405:5)\r\n    at ReadableStreamDefaultController.enqueue (node:internal/webstreams/readablestream:1040:13)\r\n    at update (C:/ChatUI/src/routes/conversation/[id]/+server.ts:155:20)\r\n    at Object.start (C:/ChatUI/src/routes/conversation/[id]/+server.ts:189:15)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/571",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-11-20T20:57:23Z",
    "updated_at": "2023-12-05T15:19:49Z",
    "comments": 29,
    "user": "iChristGit"
  },
  {
    "repo": "huggingface/trl",
    "number": 1014,
    "title": "How to avoid training radomness?",
    "body": "I\u2019m using the `trl.SFTTrainer` to fine-tune Vicuna, and I\u2019m using the same data and parameters for fine-tuning. However, I\u2019ve noticed that even after setting:\r\n\r\n```\r\ndef set_seed(seed=42):\r\n    # set seed for all possible avenues of stochasticity\r\n    numpy.random.seed(seed=seed)\r\n    random.seed(seed)\r\n    torch.manual_seed(seed)\r\n    torch.cuda.manual_seed(seed)\r\n    torch.cuda.manual_seed_all(seed)\r\n    torch.backends.cudnn.benchmark = False\r\n    torch.backends.cudnn.deterministic = True\r\n\r\ntraining_args = TrainingArguments(\r\n        report_to=\"none\",\r\n        output_dir=str(ckpt_path),\r\n        do_eval=False,\r\n        save_strategy=\"epoch\",\r\n        evaluation_strategy=\"no\",\r\n        num_train_epochs=training_epochs,\r\n        seed=42,\r\n    )\r\n ```\r\n \r\nthe fine-tuned checkpoint\u2019s evaluation remains unstable. Every time I fine-tune with the same dataset, I get significantly different results. How can I ensure the stability of my fine-tuning?\r\n\r\nI also tried this:\r\n\r\nhttps://discuss.huggingface.co/t/fixing-the-random-seed-in-the-trainer-does-not-produce-the-same-results-across-runs/3442\r\n\r\nBut I was wrong even with this codes:\r\n\r\n```\r\n    def model_init():\r\n        return AutoModelForCausalLM.from_pretrained(\r\n             \"/data/ckpts/huggingface/models/models--lmsys--vicuna-7b-v1.5/snapshots/de56c35b1763eaae20f4d60efd64af0a9091ebe5\",\r\n            device_map=\"auto\",\r\n            torch_dtype=torch.bfloat16,\r\n            use_flash_attention_2=True,\r\n        )\r\n\r\n    training_args = TrainingArguments(\r\n        report_to=\"none\",\r\n        output_dir=str(ckpt_path),\r\n        do_eval=False,\r\n        save_strategy=\"epoch\",\r\n        evaluation_strategy=\"no\",\r\n        num_train_epochs=training_epochs,\r\n        seed=42,\r\n    )\r\n    trainer = SFTTrainer(\r\n        model_init=model_init,\r\n        args=training_args,\r\n        train_dataset=mapped_dataset,\r\n        dataset_text_field=\"text\",\r\n        data_collator=data_collator,\r\n        max_seq_length=1500,\r\n    )\r\n```    \r\n    \r\nThis would end in errors.\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/cyzhao/miniconda3/envs/prompt/lib/python3.11/site-packages/huggingface_hub/utils/_errors.py\", line 261, in hf_raise_for_status\r\n    response.raise_for_status()\r\n  File \"/home/cyzhao/miniconda3/envs/prompt/lib/python3.11/site-packages/requests/models.py\", line 1021, in raise_for_status\r\n    raise HTTPError(http_error_msg, response=self)\r\nrequests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/None/resolve/main/config.json\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/cyzhao/miniconda3/envs/prompt/lib/python3.11/site-packages/transformers/utils/hub.py\", line 429, in cached_file\r\n    resolved_file = hf_hub_download(\r\n                    ^^^^^^^^^^^^^^^^\r\n  File \"/home/cyzhao/miniconda3/envs/prompt/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py\", line 118, in _inner_fn\r\n    return fn(*args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/cyzhao/miniconda3/envs/prompt/lib/python3.11/site-packages/huggingface_hub/file_download.py\", line 1346, in hf_hub_download\r\n    raise head_call_error\r\n  File \"/home/cyzhao/miniconda3/envs/prompt/lib/python3.11/site-packages/huggingface_hub/file_download.py\", line 1232, in hf_hub_download\r\n    metadata = get_hf_file_metadata(\r\n               ^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/cyzhao/miniconda3/envs/prompt/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py\", line 118, in _inner_fn\r\n    return fn(*args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/cyzhao/miniconda3/envs/prompt/lib/python3.11/site-packages/huggingface_hub/file_download.py\", line 1608, in get_hf_file_metadata\r\n    hf_raise_for_status(r)\r\n  File \"/home/cyzhao/miniconda3/envs/prompt/lib/python3.11/site-packages/huggingface_hub/utils/_errors.py\", line 293, in hf_raise_for_status\r\n    raise RepositoryNotFoundError(message, response) from e\r\nhuggingface_hub.utils._errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-655b8b21-096243713e568c65194e1a69;8e4415fe-8069-43e1-8412-fdd028a8ebcd)\r\n\r\nRepository Not Found for url: https://huggingface.co/None/resolve/main/config.json.\r\nPlease make sure you specified the correct `repo_id` and `repo_type`.\r\nIf you are trying to access a private or gated repo, make sure you are authenticated.\r\nInvalid username or password.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/cyzhao/main/test_scripts/main.py\", line 402, in <module>\r\n    finetune_vicuna(\r\n  File \"/home/cyzhao/main/test_scripts/main.py\", line 207, in finetune_vicuna\r\n    trainer = SFTTrainer(\r\n              ^^^^^^^^^^^\r\n  File \"/home/cyzhao/miniconda3/envs/prompt/lib/python3.11/site-packages/trl/trainer/sft_trainer.py\", line 162, in __init__\r\n    model = AutoModelForCausalLM.from_pretrained(model)\r\n            ^^^^^^^",
    "url": "https://github.com/huggingface/trl/issues/1014",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-20T16:47:28Z",
    "updated_at": "2024-01-03T15:05:11Z",
    "user": "zhaochenyang20"
  },
  {
    "repo": "huggingface/candle",
    "number": 1349,
    "title": "How to pass bounding box instead of points in the segment-anything example?",
    "body": "Is it possible to pass a bounding box instead of points when using the segment-anything model? Is this just 4 points?",
    "url": "https://github.com/huggingface/candle/issues/1349",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-20T15:44:22Z",
    "updated_at": "2023-11-20T15:44:22Z",
    "user": "svelterust"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 43,
    "title": "Did you use RMSprop or AdamW as the optimizer?",
    "body": "Hi to whoever is reading this \ud83e\udd17 \r\n\r\n## Question\r\n\r\nAfter reading the Zephyr pre-printed paper https://arxiv.org/pdf/2310.16944.pdf and going through the configuration files here, I saw that there was a mismatch between the optimizer used in https://github.com/huggingface/alignment-handbook/blob/main/recipes/zephyr-7b-beta/dpo/config_full.yaml, and the one reported in the paper, AdamW.\r\n\r\nSo the question is, did you use RMSprop to run the full DPO fine-tuning or AdamW with no weight decay as stated in the paper?\r\n\r\nThanks in advance!",
    "url": "https://github.com/huggingface/alignment-handbook/issues/43",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-20T15:23:03Z",
    "updated_at": "2024-03-07T06:55:07Z",
    "comments": 3,
    "user": "alvarobartt"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2359,
    "title": "How to evaluate the result of dataset that does not have any labels",
    "body": "Hi,\r\n\r\nI was trying to look at the different evaluation metrics that are provided to SentenceTransformers. I have a column of text in my dataset that I compare against a query and get the top k similarity using cosine similarity. I do not know if there is any method to evaluate the result. Should I consider the cosine similarity score as my evaluation metric as well? By evaluation, I mean, how can I show that the result I got is good? Is reasonable?\r\n\r\nfrom sentence_transformers import SentenceTransformer, util\r\nimport pandas as pd\r\n\r\n# Load a pre-trained model\r\nmodel = SentenceTransformer('msmarco-distilbert-cos-v5')\r\n\r\n# Example query\r\nquery = \"Semantic search example query\"\r\n\r\n# Example corpus\r\ncorpus = [\"Example sentence 1\", \"Example sentence 2\", \"Example sentence 3\", ...]  # Add more sentences to your corpus\r\n\r\n# Encode the query and corpus into embeddings\r\nquery_embedding = model.encode(query, convert_to_tensor=True)\r\ncorpus_embeddings = model.encode(corpus, convert_to_tensor=True)\r\n\r\n# Compute cosine similarities\r\ncosine_similarities = util.pytorch_cos_sim(query_embedding, corpus_embeddings)[0]\r\n\r\n# Get indices of the 3 nearest neighbors\r\nindices_nearest_neighbors = pd.Series(cosine_similarities).nlargest(3).index\r\n\r\n# Retrieve the 3 nearest neighbors\r\nnearest_neighbors = [corpus[i] for i in indices_nearest_neighbors]\r\n\r\n# Print the results\r\nprint(f\"Query: {query}\")\r\nprint(\"3 Nearest Neighbors:\")\r\nfor neighbor in nearest_neighbors:\r\n    print(\"-\", neighbor)\r\n\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2359",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-20T14:52:21Z",
    "updated_at": "2023-11-20T14:52:21Z",
    "user": "Yarmohamadshr"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 42,
    "title": "How to QLoRA training with ZeRO-3 on two or more GPUs?",
    "body": "I added a 4-bit load after the command LoRA training with ZeRO-3 on two or more GPUs to achieve a mix of QLoRA and ZeRO-3. But the program encountered the following error:\r\nRuntimeError: expected there to be only one unique element in <generator object Init._convert_to_deepspeed_param.<locals>.all_gather_coalesced.<locals>.<genexpr> at 0x7f2ec8daf900> \r\nThe command is:\r\nACCELERATE_LOG_LEVEL=info accelerate launch --config_file recipes/accelerate_configs/deepspeed_zero3.yaml --num_processes=2 scripts/run_sft.py recipes/zephyr-7b-beta/sft/config_lora.yaml --load_in_4bit=true\r\n\r\n",
    "url": "https://github.com/huggingface/alignment-handbook/issues/42",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-20T14:13:36Z",
    "updated_at": "2024-05-17T00:27:27Z",
    "user": "Di-Zayn"
  },
  {
    "repo": "huggingface/transformers",
    "number": 27600,
    "title": "How to get input sentence embedding from Llama or Llama2?",
    "body": "I'm trying to get the sentence embedding that I input, I checked some common practice to do it, but I'm not sure I'm doing the it right. Who may be help?  @gante  Thanks if you can be help. my code is as below: \r\n\r\n```\r\n model = LlamaForCausalLM.from_pretrained(\r\n    args.pretrained_name_or_path,\r\n    torch_dtype=torch.float16,\r\n    device_map=device,\r\n)\r\ntokenizer = LlamaTokenizer.from_pretrained(args.pretrained_name_or_path, fast_tokenizer=True)\r\nmodel.to(device)\r\nmodel.eval()\r\ntokenizer.pad_token_id = 0\r\ntokenizer.padding_side = \"left\"\r\n\r\nfor i in range(0, len(sentences), batch_size):\r\n    batch_sentences = sentences[i: i+batch_size]\r\n    inputs = tokenizer(batch_sentences, padding=True, truncation=False, return_tensors='pt')\r\n    inputs = inputs.to(device)\r\n\r\n    with torch.no_grad():\r\n        outputs = model(**inputs, output_hidden_states=True)\r\n        hidden_states = outputs.hidden_states[-1]\r\n        sentence_embeddings = hidden_states[:, -1, :]   # # here is using the **last token's** last layer hidden states as sentence embeddings,\r\n        # or  sentence_embeddings = outputs.hidden_states[-1].mean(dim=1) # here use average sentence embedding. \r\n        # and I'm not sure which one is better.\r\n        embeddings.append(sentence_embeddings.cpu())\r\n\r\nembeddings = torch.cat(embeddings, dim=0)\r\n```\r\n\r\n",
    "url": "https://github.com/huggingface/transformers/issues/27600",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-20T13:18:08Z",
    "updated_at": "2023-11-22T14:32:26Z",
    "user": "waterluck"
  },
  {
    "repo": "pytorch/serve",
    "number": 2801,
    "title": "When is initialize method called?",
    "body": "### \ud83d\udcda The doc issue\n\nI've created a custom handler with the following initialize method\r\n```python\r\nclass CustomHandler(VisionHandler):\r\n    def initialize(self, context):\r\n        print(\"Got here 000!\")\r\n        time.sleep(20)\r\n        print(\"Got here 111!\")\r\n        super(VisionHandler, self).__init__()\r\n```\r\n\r\nI spin up the server using a single runner by running `torchserve --start --ncs --ts-config model-store/config.properties`, where config.properties looks like:\r\n```python\r\ninference_address=http://127.0.0.1:8080\r\nmanagement_address=http://127.0.0.1:8081\r\nmetrics_address=http://127.0.0.1:8082\r\nmodel_store=/home/inaki/code/animal_classifier/model-store\r\nload_models=animal.mar\r\nmin_workers=1\r\nmax_workers=1\r\ndefault_workers_per_model=1\r\nmodel_snapshot={\"name\":\"startup.cfg\", \"modelCount\":1, \"models\":{\"animal\":{\"1.0\":{\"defaultVersion\":true, \"marName\":\"animal.mar\", \"minWorkers\":1, \"maxWorkers\":1, \"batchSize\":2, \"maxBatchDelay\":2000, \"responseTimeout\":30000}}}}\r\n\r\n```\r\n\r\nI notice the \"Got here\" logs don't show up during the initial phase, where I assumed the model was loaded. Instead, they show up when I submit the first request to the server (`curl -X POST http://localhost:8080/predictions/animal -T ./data/cats_and_dogs/frames/2.png`), but not for subsequent requests. And there's no sleep time in between the two prints.\r\n\r\nMy assumption is that printing the logs is somehow cached? I'd like to know if there's a diagram to better understand the flow.\r\n\r\nI noticed too that in the model_service_worker, there seem to be two routes for handling incoming requests based on this [branching](https://github.com/pytorch/serve/blob/aa96cf60c044087e75a1472f3bd090422d4d349c/ts/model_service_worker.py#L180-L195). Can somebody explain what is the distinction between cmd == b\"I\" and cmd == b\"L\"?\n\n### Suggest a potential alternative/fix\n\nIncluding a diagram/explanation with the spin-up flow in the documentation",
    "url": "https://github.com/pytorch/serve/issues/2801",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-20T12:03:07Z",
    "updated_at": "2023-11-23T20:47:00Z",
    "comments": 4,
    "user": "InakiRaba91"
  },
  {
    "repo": "pytorch/serve",
    "number": 2800,
    "title": "When is initialize method called?",
    "body": "### \ud83d\udcda The doc issue\n\nI've created a custom handler with the following initialize method\r\n```python\r\nclass CustomHandler(VisionHandler):\r\n    def initialize(self, context):\r\n        print(\"Got here 000!\")\r\n        time.sleep(20)\r\n        print(\"Got here 111!\")\r\n        super(VisionHandler, self).__init__()\r\n```\r\n\r\nI spin up the server using a single runner by running `torchserve --start --ncs --ts-config model-store/config.properties`, where config.properties looks like:\r\n```python\r\ninference_address=http://127.0.0.1:8080\r\nmanagement_address=http://127.0.0.1:8081\r\nmetrics_address=http://127.0.0.1:8082\r\nmodel_store=/home/inaki/code/animal_classifier/model-store\r\nload_models=animal.mar\r\nmin_workers=1\r\nmax_workers=1\r\ndefault_workers_per_model=1\r\nmodel_snapshot={\"name\":\"startup.cfg\", \"modelCount\":1, \"models\":{\"animal\":{\"1.0\":{\"defaultVersion\":true, \"marName\":\"animal.mar\", \"minWorkers\":1, \"maxWorkers\":1, \"batchSize\":2, \"maxBatchDelay\":2000, \"responseTimeout\":30000}}}}\r\n\r\n```\r\n\r\nI notice the \"Got here\" logs don't show up during the initial phase, where I assumed the model was loaded. Instead, they show up when I submit the first request to the server (`curl -X POST http://localhost:8080/predictions/animal -T ./data/cats_and_dogs/frames/2.png`), but not for subsequent requests. And there's no sleep time in between the two prints.\r\n\r\nMy assumption is that printing the logs is somehow cached? I'd like to know if there's a diagram to better understand the flow.\r\n\r\nI noticed too that in the model_service_worker, there seem to be two routes for handling incoming requests based on this [branching](https://github.com/pytorch/serve/blob/aa96cf60c044087e75a1472f3bd090422d4d349c/ts/model_service_worker.py#L180-L195). Can somebody explain what is the distinction between cmd == b\"I\" and cmd == b\"L\"?\n\n### Suggest a potential alternative/fix\n\nIncluding a diagram/explanation with the spin-up flow in the documentation",
    "url": "https://github.com/pytorch/serve/issues/2800",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-20T11:46:16Z",
    "updated_at": "2023-11-20T12:02:53Z",
    "comments": 0,
    "user": "irabanillo91"
  },
  {
    "repo": "pytorch/executorch",
    "number": 1239,
    "title": "How to access to result of tensor after inference",
    "body": "Hi, \r\nI am implementing executorch by following step.\r\n1. Exporting resnet18 including softmax layer.\r\n2. Implementing executor_runner.cpp to access to result of tensor after inference.\r\n  \r\nI expected that I could get each classes' result like [0,0,0,0.1,0.9] after inference(including softmax).\r\nBut when I try to access to each result and stdout, the outputs were like following:\r\n```\r\nOutputTensor 0 1: <Unknown EValue tag 1915577445>\r\nOutputTensor 0 2: <Unknown EValue tag -284942848>\r\n.\r\n.\r\nOutputTensor 0 14: None\r\n```  \r\nI expected that I could get each classes' probability like following.\r\n```\r\nOutputTensor 0 1: 0\r\nOutputTensor 0 2: 0.5\r\n.\r\n.\r\nOutputTensor 0 14: 0.25\r\nOutputTensor 0 15: 0.25\r\n```\r\n\r\n### model export file\r\n`export-model-resnet18.py`\r\n```py\r\nimport torch\r\nimport torchvision.models as models\r\nimport torch.nn.functional as F\r\n\r\nfrom torchvision.models.resnet import ResNet18_Weights\r\n\r\nfrom torch._export import capture_pre_autograd_graph\r\nfrom torch.export import export, ExportedProgram\r\nimport executorch.exir as exir\r\n\r\n# ========== resnet18 + softmax layer ============\r\nresnet18 = models.resnet18(weights=ResNet18_Weights.DEFAULT).eval()\r\nresnet18.fc = torch.nn.Sequential(\r\n        resnet18.fc,\r\n        torch.nn.Softmax(dim=1)\r\n        )\r\nexample_args = (torch.randn(1, 3, 224, 224), )\r\n# ====================================\r\n\r\n## export to exir\r\npre_autograd_aten_dialect = capture_pre_autograd_graph(resnet18, example_args)\r\n## export to aten dialect\r\naten_dialect: ExportedProgram = export(pre_autograd_aten_dialect, example_args)\r\n## export to edge\r\nedge_program: exir.EdgeProgramManager = exir.to_edge(aten_dialect)\r\n## export to executorch\r\nfrom executorch.exir import ExecutorchBackendConfig, ExecutorchProgramManager\r\nexecutorch_program: exir.ExecutorchProgramManager = edge_program.to_executorch(\r\n    ExecutorchBackendConfig(\r\n        passes=[],  # User-defined passes\r\n    )\r\n)\r\n## save pte model\r\nprint(\"save pte file\")\r\nwith open(\"exported-resnet18.pte\", \"wb\") as file:\r\n    file.write(executorch_program.buffer)\r\n```\r\n### executor_runner.cpp\r\n```cpp\r\n  for (int i = 0; i < outputs.size(); ++i) {\r\n    std::cout << \"Output \" << i << \": \" << outputs[i] << std::endl;\r\n    printTypeName<decltype(outputs[i])>();\r\n    for (int j = 0; j < 1001; ++j) {\r\n      // address\r\n      //std::cout << \"OutputTensor 0 \" << j << \": \" << &outputs[0,j] << std::endl;\r\n      // value\r\n      std::cout << \"OutputTensor 0 \" << j << \": \" << outputs[j] << std::endl;\r\n    }\r\n```  \r\n### output while running executor_runner.cpp\r\n```sh\r\n(executorch) root@c2aef39cb16e:~/test/executorch# ./cmake-out/executor_runner --model_path ./exported-resnet18.pte --img_path test.jpg\r\nNumber of arguments: 5\r\nArgument 0: ./cmake-out/executor_runner\r\nArgument 1: --model_path\r\nArgument 2: ./exported-resnet18.pte\r\nArgument 3: --img_path\r\nArgument 4: test.jpg\r\nI 00:00:00.356738 executorch:executor_runner.cpp:139] Model file ./exported-resnet18.pte is loaded.\r\nI 00:00:00.356793 executorch:executor_runner.cpp:148] Using method forward\r\nI 00:00:00.356799 executorch:executor_runner.cpp:196] Setting up planned buffer 0, size 64348896.\r\nI 00:00:00.406562 executorch:executor_runner.cpp:219] Method loaded.\r\nI 00:00:00.406674 executorch:executor_runner.cpp:225] Inputs prepared.\r\nI 00:02:09.169815 executorch:executor_runner.cpp:234] Model executed successfully.\r\nI 00:02:09.169871 executorch:executor_runner.cpp:238] 1 outputs: \r\nOutputTensor 0 0: tensor(sizes=[1, 1000], [\r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  ...,\r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., \r\n])\r\nOutputTensor 0 1: <Unknown EValue tag 1915577445>\r\nOutputTensor 0 2: <Unknown EValue tag -284942848>\r\nOutputTensor 0 3: <Unknown EValue tag 64348896>\r\nOutputTensor 0 4: <Unknown EValue tag -284943136>\r\nOutputTensor 0 5: <Unknown EValue tag -284942944>\r\nOutputTensor 0 6: <Unknown EValue tag 939732227>\r\nOutputTensor 0 7: <Unknown EValue tag -117183485>\r\nOutputTensor 0 8: <Unknown EValue tag -754662396>\r\nOutputTensor 0 9: <Unknown EValue tag -989481723>\r\nOutputTensor 0 10: <Unknown EValue tag -788086778>\r\nOutputTensor 0 11: <Unknown EValue tag 176>\r\nOutputTensor 0 12: <Unknown EValue tag -287441008>\r\nOutputTensor 0 1",
    "url": "https://github.com/pytorch/executorch/issues/1239",
    "state": "closed",
    "labels": [
      "need-user-input"
    ],
    "created_at": "2023-11-20T09:03:14Z",
    "updated_at": "2023-11-22T19:24:01Z",
    "user": "EarthMu"
  },
  {
    "repo": "huggingface/transformers",
    "number": 27592,
    "title": "How to always use initial prompt in Whisper?",
    "body": "I checked this PR (#22496 ) but still can't figure out how to always use the initial prompt. is it possible to provide a use case?",
    "url": "https://github.com/huggingface/transformers/issues/27592",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-19T18:35:23Z",
    "updated_at": "2023-11-20T08:29:41Z",
    "user": "GanymedeNil"
  },
  {
    "repo": "huggingface/pytorch-image-models",
    "number": 2038,
    "title": "how to run the efficientmit.py",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nA clear and concise description of what the problem is.\r\n\r\n**Describe the solution you'd like**\r\nA clear and concise description of what you want to happen.\r\n\r\n**Describe alternatives you've considered**\r\nA clear and concise description of any alternative solutions or features you've considered.\r\n\r\n**Additional context**\r\nAdd any other context or screenshots about the feature request here.\r\n",
    "url": "https://github.com/huggingface/pytorch-image-models/issues/2038",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-11-19T02:50:59Z",
    "updated_at": "2023-11-19T17:16:48Z",
    "user": "1377534928"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 566,
    "title": "Is Chat-UI gonna support the new Assistant API?",
    "body": "They store the threads, and there's also multi-modal support",
    "url": "https://github.com/huggingface/chat-ui/issues/566",
    "state": "open",
    "labels": [
      "enhancement",
      "models"
    ],
    "created_at": "2023-11-19T02:06:44Z",
    "updated_at": "2023-11-20T08:42:49Z",
    "comments": 1,
    "user": "wayliums"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 40,
    "title": "How do I get the training scrips to utilize all my GPUs?",
    "body": "Hello there,\r\n\r\nI'm running this script:\r\n```\r\nACCELERATE_LOG_LEVEL=info accelerate launch --config_file recipes/accelerate_configs/multi_gpu.yaml --num_processes=1 scripts/run_sft.py recipes/zephyr-7b-beta/sft/config_lora.yaml\r\n```\r\n\r\n... but on my machine with 2x3090s ... only GPU 0 is being utilized.  \r\n\r\nWhat do I need to change to utlize both of my 3090s for the training run?\r\n\r\nThanks",
    "url": "https://github.com/huggingface/alignment-handbook/issues/40",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-19T00:11:24Z",
    "updated_at": "2023-11-19T01:20:21Z",
    "user": "ohmeow"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 401,
    "title": "[Question | Bug] What am I doing wrong while using the `question-answering` model?",
    "body": "## The Problem\r\n\r\nI'm trying to use `question-answering` model to answer simple questions in a given context. But I always get a TypeError about floats. I guess that's an internal issue, because at top level of code I am not using floating point numbers. But maybe I am doing something wrong.\r\n\r\nBy the way, I'm using TypeScript and I was following the [docs for this model](https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.QuestionAnsweringPipeline).\r\n\r\n## Code\r\n\r\n```ts\r\n/** THIS CODE IS WRAPPED BY AN ASYNC FUNCTION */\r\n\r\nconst { pipeline } = await import(\"@xenova/transformers\");\r\n\r\nconst answerer = await pipeline(\r\n  \"question-answering\",\r\n  \"Xenova/distilbert-base-uncased-distilled-squad\"\r\n);\r\n\r\nconst results = await answerer(\r\n  \"Who is Dominic Toretto?\",\r\n  \"Dominic Toretto is part of the family.\"\r\n);\r\n```\r\n\r\n## Error\r\n\r\nTypeError: A float32 tensor's data must be type of function Float32Array()\r\n\r\n![image](https://github.com/xenova/transformers.js/assets/53703706/a248457f-e47a-4f42-8604-622bf8fe49ed)\r\n\r\n![image](https://github.com/xenova/transformers.js/assets/53703706/a9f50b80-c9d6-4a83-aea7-908afd684759)\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/401",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-18T12:58:50Z",
    "updated_at": "2023-11-19T12:44:00Z",
    "user": "AyresMonteiro"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 399,
    "title": "[Question] Is it possible to encode and decode with `AutoTokenizer.from_pretrained` and keep spaces?",
    "body": "I'm trying to build a pure JS online tokenizer, visually similar to https://github.com/1rgs/tokenwiz (but without the Python backend)\r\n\r\nI'm doing something like:\r\n\r\n```js\r\nconst model = await AutoTokenizer.from_pretrained('mistralai/Mistral-7B-v0.1')\r\nconst textInput = `[INST] <<SYS>>\r\nYou are a friendly Llama.\r\n<</SYS>>\r\n\r\nDo you spit at people? [/INST]`\r\nconst tokens = model.encode(textInput)\r\nconst tokenizedText = model.batch_decode(\r\n  tokens.map((token) => [token]),\r\n  { clean_up_tokenization_spaces: false }\r\n)\r\nconsole.log(tokenizedText)\r\n```\r\n\r\nAnd get:\r\n\r\n```js\r\n0: \"<s>\"\r\n1: \"[\"\r\n2: \"INST\"\r\n3: \"]\"\r\n4: \"<<\"\r\n5: \"SYS\"\r\n6: \">>\"\r\n7: \"\\n\"\r\n8: \"You\"\r\n9: \"are\"\r\n10: \"a\"\r\n11: \"friendly\"\r\n12: \"L\"\r\n13: \"l\"\r\n14: \"ama\"\r\n15: \".\"\r\n16: \"\\n\"\r\n17: \"<\"\r\n18: \"</\"\r\n19: \"SYS\"\r\n20: \">>\"\r\n21: \"\\n\"\r\n22: \"\\n\"\r\n23: \"Do\"\r\n24: \"you\"\r\n25: \"sp\"\r\n26: \"it\"\r\n27: \"at\"\r\n28: \"people\"\r\n29: \"?\"\r\n30: \"[\"\r\n31: \"/\"\r\n32: \"INST\"\r\n33: \"]\"\r\n```\r\n\r\nSo while newlines are there, all the spaces are gone. Is there any way to get the original text back but with token boundaries for visualisation?",
    "url": "https://github.com/huggingface/transformers.js/issues/399",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-17T18:46:05Z",
    "updated_at": "2023-11-17T20:18:02Z",
    "user": "daaain"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 39,
    "title": "Why zephyr-7b-dpo-lora is finetuned from mistralai/Mistral-7B-v0.1  instead of zepher-7b-sft model?",
    "body": "There is a misalignment between zephyr-7b-dpo-lora and zephyr-7b-dpo-full.\r\nThe former one is finetuned from mistralai/Mistral-7B-v0.1.\r\nThe latter is finetuned from zephyr-7b-dpo-full.\r\n\r\nI wonder what causes this misalignment ?\r\n\r\nAlso, have you benchmarked performance improvement of the lora finetunning script? In my experiment, lora finetunning seems do not provide any performance improvement compared with the base model on MT-bench. I think maybe some parameters are incorrect. ",
    "url": "https://github.com/huggingface/alignment-handbook/issues/39",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-17T18:11:59Z",
    "updated_at": "2024-03-21T19:18:08Z",
    "comments": 2,
    "user": "ChenDRAG"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1545,
    "title": "Add support to export facebook encodec models to ONNX",
    "body": "### Feature request\n\nWhen I try to use optimum-cli to export the facebook/encodec_32khz model I get this error:\r\n```\r\n%  optimum-cli export onnx --model facebook/encodec_32khz encodec.onnx\r\nFramework not specified. Using pt to export to ONNX.\r\n/Users/micchig/micromamba/envs/music-representation/lib/python3.11/site-packages/torch/nn/utils/weight_norm.py:30: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.\r\n  warnings.warn(\"torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.\")\r\nTraceback (most recent call last):\r\n  File \"/Users/micchig/micromamba/envs/music-representation/bin/optimum-cli\", line 10, in <module>\r\n    sys.exit(main())\r\n             ^^^^^^\r\n  File \"/Users/micchig/micromamba/envs/music-representation/lib/python3.11/site-packages/optimum/commands/optimum_cli.py\", line 163, in main\r\n    service.run()\r\n  File \"/Users/micchig/micromamba/envs/music-representation/lib/python3.11/site-packages/optimum/commands/export/onnx.py\", line 246, in run\r\n    main_export(\r\n  File \"/Users/micchig/micromamba/envs/music-representation/lib/python3.11/site-packages/optimum/exporters/onnx/__main__.py\", line 408, in main_export\r\n    raise ValueError(\r\nValueError: Trying to export a encodec model, that is a custom or unsupported architecture for the task feature-extraction, but no custom onnx configuration was passed as `custom_onnx_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type encodec to be supported natively in the ONNX export.\r\n```\r\nI am following the advice in the message and opening an issue here. :)\n\n### Motivation\n\nI want to use the encodec model for inference and I'd much rather use ONNX than importing the pretrained model from transformers every time and run it in pytorch as ONNX is much faster.\n\n### Your contribution\n\nI'm afraid I can't contribute to this personally",
    "url": "https://github.com/huggingface/optimum/issues/1545",
    "state": "open",
    "labels": [
      "feature-request",
      "onnx"
    ],
    "created_at": "2023-11-17T11:16:01Z",
    "updated_at": "2025-12-12T06:23:33Z",
    "comments": 6,
    "user": "giamic"
  },
  {
    "repo": "pytorch/audio",
    "number": 3704,
    "title": "Random cropping for variable length sequences",
    "body": "### \ud83d\ude80 The feature\n\nI am proposing to add a `torch.nn.Module` transform that automatically crops/pads signals (with different options for padding such as constant/mirroring). I have the implementation already local so I would push it myself if this is alright.\r\n\r\nThe interface would like as follows:\r\n\r\n```python\r\nclass RandomCrop(torch.nn.Module):\r\n      def __init__(\r\n             self,\r\n             output_size,  # number of samples to be enforced on output  signal\r\n             axis=-1,  # axis over which to crop\r\n             pad=\"silence\",  # a string controlling the behavior of padding (constant vs reflection)\r\n      )\r\n      def forward(self, signal):  # signal of arbitrary size\r\n             signal = ...\r\n             return signal  # signal now has a fixed size of  `output_size` at `axis`\r\n```\r\n\r\nI am looking for feedback to see if this is also needed/desired by others and whether I should open a PR to add it.\n\n### Motivation, pitch\n\nThis feature is needed for datasets with variable lengths (a common occurrence for audio). By default, this mismatch in lengths now needs to be handled in the collate function of the dataloader. \r\n\r\nWith the proposed transform, the user can add it directly to their transform pipeline and/or make it part of their model if they so wish. Moreover, they could simply utilize it in their `collate_fn` if they want to crop based on the particular batch statistics (e.g. crop/pad to the shortest/longest sample in the batch).\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\nA reference implementation and interface can be seen [here](https://github.com/audeering/audtorch/blob/d7144a4b5a6cd7da1c5b570a8e86f047a2170890/audtorch/transforms/transforms.py#L113). As it is implemented with `numpy`, I would update to `torch`.",
    "url": "https://github.com/pytorch/audio/issues/3704",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-17T10:37:24Z",
    "updated_at": "2024-05-23T06:24:00Z",
    "comments": 4,
    "user": "ATriantafyllopoulos"
  },
  {
    "repo": "huggingface/peft",
    "number": 1142,
    "title": "How to do Gradient Checkpoint + LoRA",
    "body": "### System Info\r\n\r\n<img width=\"570\" alt=\"image\" src=\"https://github.com/huggingface/peft/assets/18441985/9b3ae040-d78a-477b-a9ec-6ab26b687a68\">\r\n\r\n### Who can help?\r\n\r\nI need help with using LoRA + gradient checkpointing.\r\nUsing the reentrant option appears to be the solution, but it slows down training a lot, for LLama-7b it's more than 2x the training time of a full fine-tune on the same hardware (A100).\r\n<img width=\"817\" alt=\"image\" src=\"https://github.com/huggingface/peft/assets/18441985/6c58b8b2-eb3c-472a-8643-dcec6193dfe6\">\r\n\r\nWe should be able to just use vanilla gradient checkpoint.\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\n```python\r\nimport torch\r\nfrom transformers import AutoModelForCausalLM\r\nfrom peft import LoraConfig, get_peft_model\r\n\r\n# model_id, vocab = 'meta-llama/Llama-2-7b-hf', 32000\r\nmodel_id, vocab = \"stas/tiny-random-llama-2\", 3000\r\n\r\nseq_len = 1024\r\nbs=8\r\nuse_lora=True\r\n\r\nmodel_config = dict(\r\n    pretrained_model_name_or_path=model_id,\r\n    device_map=0,\r\n    trust_remote_code=True,\r\n    low_cpu_mem_usage=True,\r\n    torch_dtype=torch.bfloat16,\r\n    use_cache=False,\r\n)\r\n\r\nmodel = AutoModelForCausalLM.from_pretrained(**model_config)\r\n\r\n# Just freeze embeddings for small memory decrease\r\nmodel.model.embed_tokens.weight.requires_grad_(False);\r\n\r\nif use_lora:\r\n    lora_config = LoraConfig(\r\n        r=2,  # the rank of the LoRA matrices\r\n        lora_alpha=16, # the weight\r\n        lora_dropout=0.1, # dropout to add to the LoRA layers\r\n        bias=\"none\", # add bias to the nn.Linear layers?\r\n        task_type=\"CAUSAL_LM\",\r\n        target_modules=[\"q_proj\", \"k_proj\",\"v_proj\",\"o_proj\"], # the name of the layers to add LoRA\r\n    )\r\n    \r\n    model = get_peft_model(model, lora_config)\r\n\r\nexample = {\"input_ids\": torch.randint(0, vocab, size=(bs,seq_len), device=\"cuda:0\"), \r\n           \"labels\":torch.randint(0, vocab, size=(bs,seq_len), device=\"cuda:0\")}\r\n\r\nimport torch, peft, accelerate, transformers\r\nfor lib in [torch, peft, accelerate, transformers]:\r\n    print(f\"{lib.__name__}: {lib.__version__}\")\r\n\r\nmodel.train()\r\ndef call_forward():\r\n    with torch.amp.autocast(\"cuda\", dtype=torch.bfloat16):\r\n        out = model(**example)\r\n        loss = out.loss\r\n    return loss\r\n\r\n%timeit loss=call_forward()\r\nloss=call_forward()\r\nloss.requires_grad\r\n# 5.48 ms \u00b1 31.1 \u00b5s per loop (mean \u00b1 std. dev. of 7 runs, 100 loops each)\r\n# True\r\n\r\nmodel.gradient_checkpointing_enable()\r\n%timeit loss=call_forward()\r\nloss=call_forward()\r\nloss.requires_grad\r\n# 5.13 ms \u00b1 33.6 \u00b5s per loop (mean \u00b1 std. dev. of 7 runs, 100 loops each)\r\n# False\r\n\r\nmodel.gradient_checkpointing_enable(dict(use_reentrant=False))\r\n%timeit loss=call_forward()\r\nloss=call_forward()\r\nloss.requires_grad\r\n# 7.23 ms \u00b1 40.1 \u00b5s per loop (mean \u00b1 std. dev. of 7 runs, 100 loops each)\r\n# True\r\n```\r\n\r\n### Expected behavior\r\n\r\nNothing to add here.",
    "url": "https://github.com/huggingface/peft/issues/1142",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-17T09:34:16Z",
    "updated_at": "2025-10-06T10:22:58Z",
    "user": "tcapelle"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 113933,
    "title": "How to  re-use torch.compile results in different python processes?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI'm trying to compile my custom vision transformer-based model. The compiled version is indeed faster than the traditional one.\r\n\r\nHowever, as scaled_dot_product_attention does not support dynamic shapes, the program compiles the transformer block for every input size. Thus, the TEST program takes ~15-20 minutes to compile the model and then processes hundreds to thousends pictures, which is ~10 times slower than the eager mode.\r\n\r\nI wonder if there's some api to save the intermediate states, so that when I run the same code again, I can reuse the compilation results in /tmp/torchinductor_$user and skip the boring compilation stage? \n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @ezyang @gchanan @zou3519 @kadeng @msaroufim @bdhirsh @anijain2305 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @wconstab @aakhundov",
    "url": "https://github.com/pytorch/pytorch/issues/113933",
    "state": "closed",
    "labels": [
      "high priority",
      "feature",
      "triaged",
      "months",
      "oncall: pt2",
      "module: dynamic shapes",
      "module: dynamo"
    ],
    "created_at": "2023-11-17T08:22:11Z",
    "updated_at": "2024-08-30T06:47:28Z",
    "user": "flishwang"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2164,
    "title": "how to get same timestamp in different subprocesses while using accelerate launch",
    "body": "I would like to get a unique timestamp to name my result folder like below \r\n```\r\ndef get_time_string() -> str:\r\n    x = datetime.datetime.now()\r\n    return f\"{(x.year - 2000):02d}{x.month:02d}{x.day:02d}-{x.hour:02d}{x.minute:02d}{x.second:02d}\"\r\n```\r\n, however, it sometimes will get a different timestamp in different subprocesses, is there anyway to get a unique timestamp?\r\nThanks very much for your time!",
    "url": "https://github.com/huggingface/accelerate/issues/2164",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-17T06:36:00Z",
    "updated_at": "2023-11-29T07:30:04Z",
    "user": "shliu0"
  },
  {
    "repo": "huggingface/open_asr_leaderboard",
    "number": 14,
    "title": "How to run calc_rtf.py? Cannot reproduce rtf results.",
    "body": "There is no guide on how to execute calc_rtf.py. For example, this one https://github.com/huggingface/open_asr_leaderboard/blob/main/transformers/calc_rtf.py references 4469669.mp3. But there is no such file in the repo from what I see.\r\n\r\nSo the results are not reproducible.\r\n\r\nSame for https://github.com/huggingface/open_asr_leaderboard/blob/main/nemo_asr/calc_rtf.py What is /disk3/datasets/speech-datasets/earnings22/media/4469669.wav?\r\n\r\nBTW, I don't recommend simply copying the same sample multiple times for an evaluation. It can cause performance that looks too good compared to running in production. While the data won't be cached, the same chunks of external language models will get hit multiple times, giving better-than-reality results, as one example. What that means is that, for example, the whisper models are never diverging across elements in the batch in the sequence they are producing. This can cause the embedding lookup to be better than it really should be.\r\n\r\nI got my RTFx results in https://arxiv.org/abs/2311.04996 by cahcing the entire dataset in memory https://github.com/nvidia-riva/riva-asrlib-decoder/blob/8282368816552a7ee22c9340dce7b9c3c8d1f193/src/riva/asrlib/decoder/test_graph_construction.py#L77-L89 This is what we do at MLPerf Inference benchmarks as well. Which is the gold standard for benchmarking.",
    "url": "https://github.com/huggingface/open_asr_leaderboard/issues/14",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-16T21:14:31Z",
    "updated_at": "2023-11-16T21:14:31Z",
    "user": "galv"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 397,
    "title": "[Question] Tokenizing a base64 for string is very slow?",
    "body": "Hi! I happened to be encoding some files using transformers.js and one of the files happened to have some base64 in it. What I noticed is that base64 takes an enormously long time, relative to the number of tokens produced. Tokenizing a string of english text to the same number of tokens is far quicker. \r\nFor example:\r\n```javascript\r\nconst testBase64 =\r\n      \"VGhlIFNwYW5pc2ggQ2l2aWwgV2FyIChTcGFuaXNoOiBHdWVycmEgQ2l2aWwgRXNwYcOxb2xhKVtub3RlIDJdIHdhcyBmb3VnaHQgZnJvbSAxOTM2IHRvIDE5MzkgYmV0d2VlbiB0aGUgUmVwdWJsaWNhbnMgYW5kIHRoZSBOYXRpb25hbGlzdHMuIFJlcHVibGljYW5zIHdlcmUgbG95YWwgdG8gdGhlIGxlZnQtbGVhbmluZyBQb3B1bGFyIEZyb250IGdvdmVybm1lbnQgb2YgdGhlIFNlY29uZCBTcGFuaXNoIFJlcHVibGljLCBhbmQgY29uc2lzdGVkIG9mIHZhcmlvdXMgc29jaWFsaXN0LCBjb21tdW5pc3QsIHNlcGFyYXRpc3QsIGFuYXJjaGlzdCwgYW5kIHJlcHVibGljYW4gcGFydGllcywgc29tZSBvZiB3aGljaCBoYWQgb3Bwb3NlZCB0aGUgZ292ZXJubWVudCBpbiB0aGUgcHJlLXdhciBwZXJpb2QuWzEyXSBUaGUgb3Bwb3NpbmcgTmF0aW9uYWxpc3RzIHdlcmUgYW4gYWxsaWFuY2Ugb2YgRmFsYW5naXN0cywgbW9uYXJjaGlzdHMsIGNvbnNlcnZhdGl2ZXMsIGFuZCB0cmFkaXRpb25hbGlzdHMgbGVkIGJ5IGEgbWlsaXRhcnkganVudGEgYW1vbmcgd2hvbSBHZW5lcmFsIEZyYW5jaXNjbyBGcmFuY28gcXVpY2tseSBhY2hpZXZlZCBhIHByZXBvbmRlcmFudCByb2xlLiBEdWUgdG8gdGhlIGludGVybmF0aW9uYWwgcG9saXRpY2FsIGNsaW1hdGUgYXQgdGhlIHRpbWUsIHRoZSB3YXIgaGFkIG1hbnkgZmFjZXRzIGFuZCB3YXMgdmFyaW91c2x5IHZpZXdlZCBhcyBjbGFzcyBzdHJ1Z2dsZSwgYSByZWxpZ2lvdXMgc3RydWdnbGUsIGEgc3RydWdnbGUgYmV0d2VlbiBkaWN0YXRvcnNoaXAgYW5kIHJlcHVibGljYW4gZGVtb2NyYWN5LCBiZXR3ZWVuIHJldm9sdXRpb24gYW5kIGNvdW50ZXJyZXZvbHV0aW9uLCBhbmQgYmV0d2VlbiBmYXNjaXNtIGFuZCBjb21tdW5pc20uWzEzXSBBY2NvcmRpbmcgdG8gQ2xhdWRlIEJvd2VycywgVS5TLiBhbWJhc3NhZG9yIHRvIFNwYWluIGR1cmluZyB0aGUgd2FyLCBpdCB3YXMgdGhlICJkcmVzcyByZWhlYXJzYWwiIGZvciBXb3JsZCBXYXIgSUkuWzE0XSBUaGUgTmF0aW9uYWxpc3RzIHdvbiB0aGUgd2FyLCB3aGljaCBlbmRlZCBpbiBlYXJseSAxOTM5LCBhbmQgcnVsZWQgU3BhaW4gdW50aWwgRnJhbmNvJ3MgZGVhdGggaW4gTm92ZW1iZXIgMTk3NS4KClRoZSB3YXIgYmVnYW4gYWZ0ZXIgdGhlIHBhcnRpYWwgZmFpbHVyZSBvZiB0aGUgY291cCBkJ8OpdGF0IG9mIEp1bHkgMTkzNiBhZ2FpbnN0IHRoZSBSZXB1YmxpY2FuIGdvdmVybm1lbnQgYnkgYSBncm91cCBvZiBnZW5lcmFscyBvZiB0aGUgU3BhbmlzaCBSZXB1YmxpY2FuIEFybWVkIEZvcmNlcywgd2l0aCBHZW5lcmFsIEVtaWxpbyBNb2xhIGFzIHRoZSBwcmltYXJ5IHBsYW5uZXIgYW5kIGxlYWRlciBhbmQgaGF2aW5nIEdlbmVyYWwgSm9zw6kgU2FuanVyam8gYXMgYSBmaWd1cmVoZWFkLiBUaGUgZ292ZXJubWVudCBhdCB0aGUgdGltZSB3YXMgYSBjb2FsaXRpb24gb2YgUmVwdWJsaWNhbnMsIHN1cHBvcnRlZCBpbiB0aGUgQ29ydGVzIGJ5IGNvbW11bmlzdCBhbmQgc29jaWFsaXN0IHBhcnRpZXMsIHVuZGVyIHRoZSBsZWFkZXJzaGlwIG9mIGNlbnRyZS1sZWZ0IFByZXNpZGVudCBNYW51ZWwgQXphw7FhLlsxNV1bMTZdIFRoZSBOYXRpb25hbGlzdCBmYWN0aW9uIHdhcyBzdXBwb3J0ZWQgYnkgYSBudW1iZXIgb2YgY29uc2VydmF0aXZlIGdyb3VwcywgaW5jbHVkaW5nIENFREEsIG1vbmFyY2hpc3RzLCBpbmNsdWRpbmcgYm90aCB0aGUgb3Bwb3NpbmcgQWxmb25zaXN0cyBhbmQgdGhlIHJlbGlnaW91cyBjb25zZXJ2YXRpdmUgQ2FybGlzdHMsIGFuZCB0aGUgRmFsYW5nZSBFc3Bhw7FvbGEgZGUgbGFzIEpPTlMsIGEgZmFzY2lzdCBwb2xpdGljYWwgcGFydHkuWzE3XSBBZnRlciB0aGUgZGVhdGhzIG9mIFNhbmp1cmpvLCBFbWlsaW8gTW9sYSBhbmQgTWFudWVsIEdvZGVkIExsb3BpcywgRnJhbmNvIGVtZXJnZWQgYXMgdGhlIHJlbWFpbmluZyBsZWFkZXIgb2YgdGhlIE5hdGlvbmFsaXN0IHNpZGUuCgpUaGUgY291cCB3YXMgc3VwcG9ydGVkIGJ5IG1pbGl0YXJ5IHVuaXRzIGluIE1vcm9jY28sIFBhbXBsb25hLCBCdXJnb3MsIFphcmFnb3phLCBWYWxsYWRvbGlkLCBDw6FkaXosIEPDs3Jkb2JhLCBhbmQgU2V2aWxsZS4gSG93ZXZlciwgcmViZWxsaW5nIHVuaXRzIGluIGFsbW9zdCBhbGwgaW1wb3J0YW50IGNpdGllc+KAlHN1Y2ggYXMgTWFkcmlkLCBCYXJjZWxvbmEsIFZhbGVuY2lhLCBCaWxiYW8sIGFuZCBNw6FsYWdh4oCUZGlkIG5vdCBnYWluIGNvbnRyb2wsIGFuZCB0aG9zZSBjaXRpZXMgcmVtYWluZWQgdW5kZXIgdGhlIGNvbnRyb2wgb2YgdGhlIGdvdmVybm1lbnQuIFRoaXMgbGVmdCBTcGFpbiBtaWxpdGFyaWx5IGFuZCBwb2xpdGljYWxseSBkaXZpZGVkLiBUaGUgTmF0aW9uYWxpc3RzIGFuZCB0aGUgUmVwdWJsaWNhbiBnb3Zlcm5tZW50IGZvdWdodCBmb3IgY29udHJvbCBvZiB0aGUgY291bnRyeS4gVGhlIE5hdGlvbmFsaXN0IGZvcmNlcyByZWNlaXZlZCBtdW5pdGlvbnMsIHNvbGRpZXJzLCBhbmQgYWlyIHN1cHBvcnQgZnJvbSBGYXNjaXN0IEl0YWx5LCBOYXppIEdlcm1hbnkgYW5kIFBvcnR1Z2FsLCB3aGlsZSB0aGUgUmVwdWJsaWNhbiBzaWRlIHJlY2VpdmVkIHN1cHBvcnQgZnJvbSB0aGUgU292aWV0IFVuaW9uIGFuZCBNZXhpY28uIE90aGVyIGNvdW50cmllcywgc3VjaCBhcyB0aGUgVW5pdGVkIEtpbmdkb20sIEZyYW5jZSwgYW5kIHRoZSBVbml0ZWQgU3RhdGVzLCBjb250aW51ZWQgdG8gcmVjb2duaXNlIHRoZSBSZXB1YmxpY2FuIGdvdmVybm1lbnQgYnV0IGZvbGxvd2VkIGFuIG9mZmljaWFsIHBvbGljeSBvZiBub24taW50ZXJ2ZW50aW9uLiBEZXNwaXRlIHRoaXMgcG9saWN5LCB0ZW5zIG9mIHRob3VzYW5kcyBvZiBjaXRpemVucyBmcm9tIG5vbi1pbnRlcnZlbnRpb25pc3QgY291bnRyaWVzIGRpcmVjdGx5IHBhcnRpY2lwYXRlZCBpbiB0aGUgY29uZmxpY3QuIFRoZXkgZm91Z2h0IG1vc3RseSBpbiB0aGUgcHJvLVJlcHVibGljYW4gSW50ZXJuYXRpb25hbCBCcmlnYWRlcywgd2hpY2ggYWxzbyBpbmNsdWRlZCBzZXZlcmFsIHRob3VzYW5kIGV4aWxlcyBmcm9tIHByby1OYXRpb25hbGlzdCByZWdpbWVzLg==\";\r\n\r\n const { AutoTokenizer } = await import(\"@xenova/transformers\");\r\nconst tokenizer = await AutoTokenizer.from_pretrained(\r\n      \"Xenova/all-MiniLM-L6-v2\"\r\n    );\r\nconst startTime = Date.now();\r\nconst tokenized = tokenizer.encode(testBase64);\r\nconst endTime = Date.now();\r\nconsole.log(\"It took \", endTime - startTime, \"ms to tokenize\");\r\nconst decoded = tokenizer.decode(tokenized);\r\nconsole.log(\"Decoded: \", decoded);\r\n```\r\n\r\nTakes 56 seconds to tokenize and when decoded returns the same input string.\r\n\r\nInterestingly, similar logic ",
    "url": "https://github.com/huggingface/transformers.js/issues/397",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-16T20:27:51Z",
    "updated_at": "2023-11-17T19:48:57Z",
    "user": "samlhuillier"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 396,
    "title": "[Question] How to use transformer.js in langchain",
    "body": "Hi all, I'm writing a custom LLM to use transformer.js with langchain. Does a structure like this make sense? Any advice for optimizing it or best practices to apply? \r\n\r\nAny suggestions or feedback would be greatly appreciated \ud83d\ude0a \ud83d\ude80\r\n\r\n```\r\nimport { pipeline } from \"@xenova/transformers\";\r\nimport { LLM } from \"langchain/llms/base\";\r\n\r\nclass MyHF extends LLM {\r\n  static instance = null;\r\n\r\n  constructor(modelTask = \"text2text-generation\", modelName = \"Xenova/LaMini-Flan-T5-783M\") {\r\n    super({ maxConcurrency: 1 });\r\n    this.modelTask = modelTask;\r\n    this.modelName = modelName;\r\n    this.llmModel = MyHF.getInstance(this.modelTask, this.modelName);\r\n  }\r\n\r\n  static async getInstance(modelTask, modelName, progress_callback = null) {\r\n    if (this.instance === null) {\r\n      this.instance = pipeline(modelTask, modelName, { progress_callback });\r\n    }\r\n    return this.instance;\r\n  }\r\n\r\n  _llmType() {\r\n    return \"hf\";\r\n  }\r\n\r\n  async _call(prompt, options = { topk: 1 }) {\r\n    const executor = await MyHF.getInstance(this.modelTask, this.modelName);\r\n    const { generated_text } = await executor(prompt, options);\r\n    return generated_text\r\n  }\r\n}\r\n\r\nexport default MyHF;\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/396",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-16T17:27:52Z",
    "updated_at": "2023-12-21T16:27:28Z",
    "user": "mrddter"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 349,
    "title": "How to reload the checkpoints for LLM finetuning?",
    "body": "May I ask how to resume from the latest checkpoint using `autotrain llm` if it crashed. I only found one from the `dreambooth` trainers, but I cannot find the `resume_from_checkpoint` anywhere else. \r\n\r\nI was wondering if it has currently not fully supported this feature yet or I was missing something? It would be super helpful if anyone can kindly pointing out how to do that using autotrain?\r\n\r\nMany thanks!",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/349",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-11-16T11:51:25Z",
    "updated_at": "2024-02-02T08:58:47Z",
    "user": "xihajun"
  },
  {
    "repo": "huggingface/trl",
    "number": 1004,
    "title": "Guidance on how to fix the scheduler and ConstantLengthDataset",
    "body": "Hello,\r\n\r\nI want to fix the issue related to the `ConstantLengthDataset` not knowing the dataset's length in advance.\r\n\r\nBesides having a broken progressbar and a wrong epoch count, the only problem I see is related to the scheduler, as most of us are training using cosine with warmup; if we want a complete cycle, the scheduler needs the total number of steps to adjust the ratios accordingly.\r\n\r\nOne solution would be to \"guess\" how many batches/iteration of packed data we will see by grabbing some samples and estimating the total length. A function tries to do something like this by computing a char/tok ratio.\r\n\r\nDo you have any advice so I can draft a PR?\r\n\r\nOhh I just saw that @lvwerra has a [PR](https://github.com/huggingface/trl/pull/979) in the works, but only for \"finite\" dataset.\r\n",
    "url": "https://github.com/huggingface/trl/issues/1004",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-16T10:58:30Z",
    "updated_at": "2024-01-05T15:05:18Z",
    "user": "tcapelle"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5816,
    "title": "low attention to prompt in SDXL",
    "body": "Hi, \r\nOne of the difference between DALLE3 and SDXL is that SDXL pay less attention to prompt,\r\nIs there a way to solve this problem? I don't Know. for example changing the text encoder to other  can help to solve this problem ? \r\nThanks \r\n",
    "url": "https://github.com/huggingface/diffusers/issues/5816",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2023-11-16T07:24:15Z",
    "updated_at": "2024-01-09T15:06:55Z",
    "user": "saeedkhanehgir"
  },
  {
    "repo": "huggingface/transformers",
    "number": 27526,
    "title": "How to preupgrade transformer cache and build the upgraded into docker image?",
    "body": "### System Info\r\n\r\nLinux ubuntu 22.04\r\nDocker 24.05\r\n\r\nI am not sure if this is the right place for this issue. Apology if it isn't and please direct me to the right place.\r\n\r\nI have been using transformer in docker images that are deployed at runpod/replicate. The containers of the images could go cold and be relaunched again and again. Each time the container would waste 20 to 40 seconds for the blow cache upgrade.\r\n\r\n```\r\nThe cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.\r\n```\r\n\r\nIt would take around 20 to 40 seconds, which is a significant waste of our GPU time and  container startup time.\r\n\r\nI have tried to find out how to preupgrade the cache and build the upgrade cache into docker image by google but I couldn't find a way to do it.\r\n\r\nPlease advise how to preupgrade the cache and build the upgraded cache in docker image.\r\n\r\nMany thanks.\r\n\r\n### Expected behavior\r\n\r\nThe cache for model files is preupgraded and built into container image to avoid upgrade each time a container is launched.\r\n\r\n",
    "url": "https://github.com/huggingface/transformers/issues/27526",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-16T02:53:54Z",
    "updated_at": "2023-12-24T08:03:44Z",
    "user": "lanyusan"
  },
  {
    "repo": "pytorch/benchmark",
    "number": 2040,
    "title": "How to run test_bench.py with ROCM?",
    "body": "Hi @xuzhao9, \r\n\r\nI don't know how to create a dockerfile for AMD ROCM,  is there any example?  \r\n\r\nBest Regards\r\n",
    "url": "https://github.com/pytorch/benchmark/issues/2040",
    "state": "closed",
    "labels": [
      "module: rocm",
      "ciflow/rocm"
    ],
    "created_at": "2023-11-15T14:16:59Z",
    "updated_at": "2024-03-18T22:00:08Z",
    "user": "jinsong-mao"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2471,
    "title": "\u2753 [Question] How to compile model when input is a list of tensors",
    "body": "## \u2753 Question\r\n\r\nI am trying to follow the tutorial [here](https://pytorch.org/TensorRT/tutorials/serving_torch_tensorrt_with_triton.html) and am stuck at compiling the model with tensor-rt. The model i am using takes a list of tensors as inputs and hence i could not get the following compile code to work as i cannot get the shape of a list:\r\n```\r\ntrt_model = torch_tensorrt.compile(self.model,\r\n            inputs= [torch_tensorrt.Input(inputs.shape)], \r\n            enabled_precisions= { torch.half} # Run with FP32\r\n        )\r\n```\r\nInputs have the following tensors:\r\n\r\n> ic| i.shape: torch.Size([1, 3, 256, 256])\r\n> ic| i.shape: torch.Size([1, 98, 3])\r\n> ic| i.shape: torch.Size([1, 3, 3])\r\n\r\n## What you have already tried\r\n\r\nI have tried using `(3,)` but i am getting the following errror:\r\n```\r\n  File \"/home/default/anaconda3/envs/driverstate_ttrt/lib/python3.10/site-packages/torch/jit/_recursive.py\", line 397, in create_methods_and_properties_from_stubs\r\n    concrete_type._create_methods_and_properties(property_defs, property_rcbs, method_defs, method_rcbs, method_defaults)\r\nRuntimeError: \r\n\r\nforward(__torch__.spiga.models.cnn.layers.___torch_mangle_24.Residual self, Tensor x) -> Tensor:\r\nKeyword argument core unknown.\r\n:\r\n  File \"/home/default/driver-state-detection/Fabian/headpose/SPIGA/spiga/models/cnn/hourglass.py\", line 45\r\n        low1 = self.low1(pool1)\r\n        if self.n > 1:\r\n            low2, core = self.low2(low1, core=core)\r\n                         ~~~~~~~~~ <--- HERE\r\n        else:\r\n            low2 = self.low2(low1)\r\n```\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.0.1+cu118\r\n - OS (e.g., Linux): WSL2 on Windows11\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip \r\n - Python version: 3.10.12\r\n - GPU models and configuration: 2070Super\r\n - Any other relevant information: torch-tensorrt            1.4.0\r\n\r\n## Additional context\r\n\r\nBasically asking what should i used as inputs shape if it is a list of tensors. Should i instead look to [this](https://github.com/pytorch/TensorRT/tree/main/examples/dynamo)?\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2471",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-15T09:50:36Z",
    "updated_at": "2025-11-24T17:44:36Z",
    "user": "HeChengHui"
  },
  {
    "repo": "pytorch/vision",
    "number": 8118,
    "title": "missing labels in FER2013 test data",
    "body": "### \ud83d\udc1b Describe the bug\n\nThe file **test.csv** has no label column, so the labels in the test split all have value None:\r\n```\r\nfrom torchvision.datasets import FER2013\r\ndat = FER2013(root='./', split='test')\r\nprint(dat[0][1])\r\n```\r\nAdding labels to the file raises a RuntimeError, presumably because of a resulting different md5 hash. The code above assumes the data has been downloaded from kaggle, as described in the  [source code](https://github.com/pytorch/vision/blob/main/torchvision/datasets/fer2013.py). \r\n\n\n### Versions\n\nPyTorch version: 2.1.1\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.8\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Debian GNU/Linux 11 (bullseye) (x86_64)\r\nGCC version: (Debian 10.2.1-6) 10.2.1 20210110\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.11.5 (main, Sep 11 2023, 13:54:46) [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-5.10.0-26-amd64-x86_64-with-glibc2.31\r\nIs CUDA available: True\r\nCUDA runtime version: Could not collect\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: GPU 0: NVIDIA GeForce GTX 1650 Ti\r\nNvidia driver version: 520.61.05\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                       x86_64\r\nCPU op-mode(s):                     32-bit, 64-bit\r\nByte Order:                         Little Endian\r\nAddress sizes:                      39 bits physical, 48 bits virtual\r\nCPU(s):                             12\r\nOn-line CPU(s) list:                0-11\r\nThread(s) per core:                 2\r\nCore(s) per socket:                 6\r\nSocket(s):                          1\r\nNUMA node(s):                       1\r\nVendor ID:                          GenuineIntel\r\nCPU family:                         6\r\nModel:                              165\r\nModel name:                         Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz\r\nStepping:                           2\r\nCPU MHz:                            1944.273\r\nCPU max MHz:                        5000.0000\r\nCPU min MHz:                        800.0000\r\nBogoMIPS:                           5199.98\r\nVirtualization:                     VT-x\r\nL1d cache:                          192 KiB\r\nL1i cache:                          192 KiB\r\nL2 cache:                           1.5 MiB\r\nL3 cache:                           12 MiB\r\nNUMA node0 CPU(s):                  0-11\r\nVulnerability Gather data sampling: Vulnerable: No microcode\r\nVulnerability Itlb multihit:        KVM: Mitigation: VMX disabled\r\nVulnerability L1tf:                 Not affected\r\nVulnerability Mds:                  Not affected\r\nVulnerability Meltdown:             Not affected\r\nVulnerability Mmio stale data:      Mitigation; Clear CPU buffers; SMT vulnerable\r\nVulnerability Retbleed:             Mitigation; Enhanced IBRS\r\nVulnerability Spec rstack overflow: Not affected\r\nVulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl and seccomp\r\nVulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization\r\nVulnerability Spectre v2:           Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence\r\nVulnerability Srbds:                Mitigation; Microcode\r\nVulnerability Tsx async abort:      Not affected\r\nFlags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp pku ospke md_clear flush_l1d arch_capabilities\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.26.0\r\n[pip3] torch==2.1.1\r\n[pip3] torchaudio==2.1.1\r\n[pip3] torchvision==0.16.1\r\n[pip3] triton==2.1.0\r\n[conda] blas                      1.0                         mkl  \r\n[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch\r\n[conda] libjpeg-turbo             2.0.0                h9bf148f_0    pytorch\r\n[conda] mkl                       2023.1.0         h213fc3f_46344  \r\n[conda] mkl-service               2.4.0           py311h5eee18b_1  \r\n[conda] mkl_fft                   1.3.8           py311h5eee18b_0  \r\n[conda] mkl_random                1.2.4           py311hdb19cb5_0  \r\n[conda] numpy                     1.26.0          py311h08b1b3b_0  \r\n[conda] numpy-base                1.26.0          py311hf175353_0  \r\n[conda] pytorch            ",
    "url": "https://github.com/pytorch/vision/issues/8118",
    "state": "closed",
    "labels": [
      "enhancement",
      "help wanted",
      "module: datasets"
    ],
    "created_at": "2023-11-15T09:01:24Z",
    "updated_at": "2024-06-04T10:21:51Z",
    "comments": 8,
    "user": "dtafler"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1538,
    "title": "Optimum supports AMDGPU\u3000\uff1f",
    "body": "### Feature request\n\nOnnxruntime supports AMD-ROCM \uff0c\r\nhow to compile on optimum\n\n### Motivation\n\nOur company is currently testing amdgpu and has learned that optim can accelerate inference on CUDA. We are not sure if it will support ROCM in the future?\n\n### Your contribution\n\nnone",
    "url": "https://github.com/huggingface/optimum/issues/1538",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-15T04:15:21Z",
    "updated_at": "2024-01-09T16:10:39Z",
    "comments": 1,
    "user": "taikai-zz"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1391,
    "title": "How to split special token in encode?",
    "body": "i have converted a slow tokenizer into PreTrainedTokenizerFast, and get a tokenizer.json file.But i found that this tokenizer did not split special tokens.Here is my add_tokens in tokenizer.json:\r\n` tokenizer.add_special_tokens(\r\n                [\r\n                    AddedToken(\"[gMASK]\", normalized=True, single_word=False),\r\n                    AddedToken(\"sop\", normalized=True, single_word=False),\r\n                ]\r\n            )\r\n`\r\n ",
    "url": "https://github.com/huggingface/tokenizers/issues/1391",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-15T03:41:22Z",
    "updated_at": "2024-01-04T06:26:38Z",
    "user": "leizhao1234"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2468,
    "title": "\u2753 [Question] New release of torch-tensorRT with PyTorch 2.1",
    "body": "## \u2753 Question\r\n\r\nNew release of torch-tensort with PyTorch 2.1\r\n\r\n## What you have already tried\r\n\r\nIs there going to be a new release? or is this supported now through torch.compile only?\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2468",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-14T23:42:50Z",
    "updated_at": "2025-01-21T17:21:34Z",
    "user": "agunapal"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2465,
    "title": "ERROR: INVALID_ARGUMENT: getPluginCreator could not find plugin Mod version 1",
    "body": "I want to use tensorrt to accelerate VisionEncoderDecoderModel. Use the following code to convert it to onnx and it was successful.\r\n```\r\n\r\nfrom transformers import VisionEncoderDecoderModel\r\ndef model_converter():\r\n    model = VisionEncoderDecoderModel.from_pretrained(\"./examples/data\")\r\n    model.to(device)\r\n    model.eval()\r\n    tokenizer = NougatTokenizerFast.from_pretrained(r'./examples/data')\r\n    latex_processor = NougatLaTexProcessor.from_pretrained(r'./examples/data')\r\n    task_prompt = tokenizer.bos_token\r\n    decoder_input_ids = tokenizer(task_prompt, add_special_tokens=False,\r\n                                    return_tensors=\"pt\").input_ids.to(device)\r\n    # Create dummy inputs with the correct shapes for both inputs\r\n    dummy_pixel_values = torch.randn(1, 3, 224, 560, device=device)\r\n    # Provide names for the inputs\r\n    input_names = ['pixel_values', 'decoder_input_ids']\r\n    output_names = ['output']\r\n    # Export the model to ONNX\r\n    torch.onnx.export(\r\n        model,\r\n        (dummy_pixel_values, decoder_input_ids),\r\n        './examples/test2.onnx',\r\n        export_params=True,\r\n        verbose=True,\r\n        input_names=input_names,\r\n        output_names=output_names\r\n    )\r\n```\r\n\r\nThen, when changing onnx into trt, an error occurred:\r\n\r\n> Loading ONNX file from path ./examples/test.onnx...\r\nBeginning ONNX file parsing\r\n[libprotobuf WARNING google/protobuf/io/coded_stream.cc:604] Reading dangerously large protocol message. If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.\r\n[libprotobuf WARNING google/protobuf/io/coded_stream.cc:81] The total number of bytes read was 1400793072\r\n[TensorRT] WARNING: onnx2trt_utils.cpp:220: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.\r\n[TensorRT] ERROR: INVALID_ARGUMENT: getPluginCreator could not find plugin Mod version 1\r\nERROR: Failed to parse the ONNX file.\r\nIn node -1 (importFallbackPluginImporter): UNSUPPORTED_NODE: Assertion failed: creator && \"Plugin not found, are the plugin name, version, and namespace correct?\"\r\nCompleted parsing of ONNX file\r\n[TensorRT] ERROR: Network must have at least one output\r\n[TensorRT] ERROR: Network validation failed.\r\nTraceback (most recent call last):\r\nFile \"create_onnx.py\", line 350, in <module>\r\nf.write(engine.serialize())\r\nAttributeError: 'NoneType' object has no attribute 'serialize'\r\n\r\nthe code is\r\n\r\n```\r\nimport os\r\nimport tensorrt as trt\r\n \r\nTRT_LOGGER = trt.Logger()\r\nmodel_path = './examples/test.onnx'\r\nengine_file_path = \"./examples/test.trt\"\r\nEXPLICIT_BATCH = 1 << (int)(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH)  # batchsize=1\r\n \r\nwith trt.Builder(TRT_LOGGER) as builder, builder.create_network(EXPLICIT_BATCH) \\\r\n        as network, trt.OnnxParser(network, TRT_LOGGER) as parser:\r\n    builder.max_workspace_size = 1 << 28\r\n    builder.max_batch_size = 1\r\n    if not os.path.exists(model_path):\r\n        print('ONNX file {} not found.'.format(model_path))\r\n        exit(0)\r\n    print('Loading ONNX file from path {}...'.format(model_path))\r\n    with open(model_path, 'rb') as model:\r\n        print('Beginning ONNX file parsing')\r\n        if not parser.parse(model.read()):\r\n            print('ERROR: Failed to parse the ONNX file.')\r\n            for error in range(parser.num_errors):\r\n                print(parser.get_error(error))\r\n\r\n    network.get_input(0).shape = [1, 3, 224, 560]\r\n    network.get_input(1).shape = [1,1]\r\n    print('Completed parsing of ONNX file')\r\n    engine = builder.build_cuda_engine(network)\r\n    with open(engine_file_path, \"wb\") as f:\r\n        f.write(engine.serialize())\r\n\r\n```\r\n\r\n> TensorRT-7.2.3.4",
    "url": "https://github.com/pytorch/TensorRT/issues/2465",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-14T09:37:12Z",
    "updated_at": "2023-11-15T01:34:35Z",
    "user": "lin-lcx"
  },
  {
    "repo": "pytorch/executorch",
    "number": 1203,
    "title": "How to load original images for model inference",
    "body": "Hi, I am invsetigating in `examples/portable/executor_runner/executor_runner.cpp.`  \r\nAnd on the [PrepareInputTensors](https://github.com/pytorch/executorch/blob/47900c96388453c83d9a6706151c0c2157fbfabd/examples/portable/executor_runner/executor_runner.cpp#L154), [method of PrepareInputTensor](https://github.com/pytorch/executorch/blob/9682172576d5d9a10f3162ad91e0a32b384a3b7c/util/util.h#L65-L137) generated just ones-initialized inputs. \r\n  \r\nSo I would like to know how to load original dataset images and set them in Aten.\r\nIs it using opencv or other way?\r\n\r\nThanks\r\n\r\n",
    "url": "https://github.com/pytorch/executorch/issues/1203",
    "state": "closed",
    "labels": [
      "need-user-input",
      "triaged"
    ],
    "created_at": "2023-11-14T05:11:42Z",
    "updated_at": "2024-01-15T07:12:37Z",
    "user": "EarthMu"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5786,
    "title": "How to load a precomputed dataset in the cache folder on a different machine?",
    "body": "**Is your feature request related to a problem? Please describe.**\r\n\r\nSome slurm cluster may have a limit on time allocation, so I'd like to precompute the dataset on my local machine then move it to a location on the cluster to directly reuse it.\r\n\r\n**Describe the solution you'd like**\r\n\r\nI saw load dataset automatically create arrow files inside ~/.cache/imagefolder, and the dataset folder path is translated into some hash code. So I hope I can copy the dataset here and pass it to --dataset_name in training SDXL unet. Or perhaps I'm not aware now, some ways to let me reuse the precomputed cached dataset on a different machine.\r\n\r\n**Describe alternatives you've considered**\r\nplease see above.\r\n\r\n\r\n**Additional context**\r\n please see above",
    "url": "https://github.com/huggingface/diffusers/issues/5786",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2023-11-14T02:26:00Z",
    "updated_at": "2024-01-09T15:07:14Z",
    "user": "linnanwang"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 22,
    "title": "How to perform full parameter finetuning without A100 GPUs",
    "body": "Hi, thank you for your great work!  I'd like to reproduce full parameter fine-tuning of dpo training. However I only have 10 * Nvidia A40 GPUs  (46 Gbs memory each).\r\n\r\nI tried the command\r\n\r\n`CUDA_VISIBLE_DEVICES=2,3,4,5,6,7,8,9 ACCELERATE_LOG_LEVEL=info accelerate launch --config_file recipes/accelerate_configs/deepspeed_zero3.yaml --main_process_port 6000 scripts/run_dpo.py recipes/zephyr-7b-beta/dpo/config_full.yaml`\r\n\r\nand it reported OOM error, even if I set batch size to 1.\r\n\r\nI don't mind the program runs a bit slower (e.g., use smaller batchsize and more gradient accumulation steps). However, I don't know if there is a way to successfully deploy the full-dpo code. \r\n\r\nCan you help me, please?\r\n\r\n\r\nAlso, I'm wondering how large is the performance gap between lora and full parameter finetunning.",
    "url": "https://github.com/huggingface/alignment-handbook/issues/22",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-14T01:33:41Z",
    "updated_at": "2024-02-14T13:47:16Z",
    "user": "ChenDRAG"
  },
  {
    "repo": "huggingface/controlnet_aux",
    "number": 83,
    "title": "How to get keypoints output .json file like original OpenPose ?",
    "body": "",
    "url": "https://github.com/huggingface/controlnet_aux/issues/83",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-13T21:55:35Z",
    "updated_at": "2023-11-17T21:04:49Z",
    "user": "mayank64ce"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 550,
    "title": "Can this ui be run on a colab?",
    "body": "I am wondering if this ui can be used inside a colab.",
    "url": "https://github.com/huggingface/chat-ui/issues/550",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-13T16:58:35Z",
    "updated_at": "2023-11-15T16:17:10Z",
    "user": "amida47"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1258,
    "title": "How to deal with bias=True Model",
    "body": "### Feature request\n\nHow to deploy model within bias=True. Example: vinai/PhoGPT-7B5-Instruct\n\n### Motivation\n\n.\n\n### Your contribution\n\n.",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1258",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-11-13T09:20:08Z",
    "updated_at": "2024-01-20T01:46:38Z",
    "user": "anhnh2002"
  },
  {
    "repo": "huggingface/trl",
    "number": 985,
    "title": "how to setup epoch number in SFTTrainer?",
    "body": "there my example code\r\nfrom datasets import load_dataset\r\nfrom trl import SFTTrainer\r\n\r\ndataset = load_dataset(\"IMDB\", split=\"train\")\r\n\r\ntrainer = SFTTrainer(\r\n    \"sshleifer/tiny-gpt2\",\r\n    train_dataset=dataset,\r\n    dataset_text_field=\"text\",\r\n    max_seq_length=512,\r\n)\r\ntrainer.train()",
    "url": "https://github.com/huggingface/trl/issues/985",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-12T20:02:31Z",
    "updated_at": "2023-11-14T18:29:53Z",
    "user": "KlausikPL"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5774,
    "title": "How to fine tune Stable Diffusion on custom dataset {caption, image}?",
    "body": "I need to do the task that fine tuning SD on custom dataset {caption, image} and custom size? Could you please give me a tutorial for this task?",
    "url": "https://github.com/huggingface/diffusers/issues/5774",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-11-12T14:52:23Z",
    "updated_at": "2024-01-09T15:07:21Z",
    "user": "npk7264"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5772,
    "title": "Does webdataset faster than default huggingface datasets?",
    "body": "### Describe the bug\n\nHi, I see there is a large scale training example https://github.com/huggingface/diffusers/blob/controlnet_webdatasets/examples/controlnet/train_controlnet_webdatasets.py using webdatasets, which suggests that webdatasets may have better data loading performance than huggingface datasets that is organized with Apache Arrow.\r\n\r\nThen, I'm wondering whether or not webdatasets is a good choice for me. I have a image dataset with 350k images, the size of the image is 768 * 768. I use a batch size of 64 or 192. Does webdataset is for me? Any help would be appreciated!\n\n### Reproduction\n\n.\n\n### Logs\n\n_No response_\n\n### System Info\n\n.\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/5772",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2023-11-12T08:40:22Z",
    "updated_at": "2024-01-09T15:07:23Z",
    "user": "Luciennnnnnn"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 549,
    "title": "How can I use this offline with local models?",
    "body": "I really like the web_search feature, can I somehow use it with local models? I tried but I dont see any bat files to launch it.",
    "url": "https://github.com/huggingface/chat-ui/issues/549",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-11-11T23:59:09Z",
    "updated_at": "2023-11-20T21:38:27Z",
    "comments": 9,
    "user": "iChristGit"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5766,
    "title": "Image+Image+Text to Image",
    "body": "Maybe a dumb question but I can't seem to find good ways to have multiple images to image modeling. I looked into Multi-ControlNet but I can't tell how to use it. I'm trying to train a model that takes in 2 images and a prompt: \r\n1. a template base image (e.g. a photo of a room in someone's house with a painting on the wall)\r\n2. a photo of a painting someone made (e.g. not a famous one like a Van Gogh, just someone's painting)\r\n3. an optional text prompt describing the 2nd image...may not be necessary but curious what people here say\r\n\r\nAnd I want to place image2 in image1 to replace the painting on the wall with the new one. Is this the right forum / model to use? I thought maybe creating a custom dataset and then simply feeding 2 image controls in would do the job but really could use some experts' guidance here. ",
    "url": "https://github.com/huggingface/diffusers/issues/5766",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2023-11-11T20:15:27Z",
    "updated_at": "2024-01-09T15:07:25Z",
    "user": "tval2"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1531,
    "title": "Pytorch + TensorRT support",
    "body": "### Feature request\n\nIs it possible to start supporting Pytorch and TensorRT inference optimizations? There are a lot of use cases where it could be useful, and optimum seems to already have a lot of good tooling to enable this.\n\n### Motivation\n\nUsing Pytorch or TensorRT in production is painful today, and requires a lot of custom optimizations.\n\n### Your contribution\n\nI could help with a PR.",
    "url": "https://github.com/huggingface/optimum/issues/1531",
    "state": "closed",
    "labels": [
      "feature-request",
      "Stale"
    ],
    "created_at": "2023-11-11T17:27:47Z",
    "updated_at": "2025-02-27T02:04:37Z",
    "comments": 2,
    "user": "youssefadr"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1530,
    "title": "AnimateDiff support?",
    "body": "### Feature request\n\nHi!\r\ncan u guys please support animatediff for onnx in the future? it will be great for both gpu directml and cpu too\r\n\r\nkind regards\n\n### Motivation\n\nnot a bug, just a feature that i really would like to see for us directml and cpu users for onnx\n\n### Your contribution\n\ni would but i don't know anything about coding. i'm just a casual user",
    "url": "https://github.com/huggingface/optimum/issues/1530",
    "state": "closed",
    "labels": [
      "feature-request",
      "Stale"
    ],
    "created_at": "2023-11-11T14:21:25Z",
    "updated_at": "2025-03-01T02:08:38Z",
    "comments": 1,
    "user": "Amin456789"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 338,
    "title": "How to ",
    "body": "I successfully trained the mistral 7B sharded model on google colab using the autotrain\r\n\r\nNow, how can I do inference , I am unable to merger the adapter with the base model , can someone please share the code for inference with me . Please help",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/338",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-11-11T12:58:24Z",
    "updated_at": "2024-05-06T13:35:52Z",
    "user": "eviIgenius"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5761,
    "title": "The cost of consistency decoder",
    "body": "### Describe the bug\n\nI replace original VAE decoder of a stable diffusion model with Consistency Decoder, then CUDA out of memory occurs. My question is that How large of Consistency Decoder is compared to original VAE decoder.\r\n\r\n- `diffusers` version: 0.23.0\r\n- Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.11\r\n- PyTorch version (GPU?): 2.0.0+cu118 (True)\r\n- Huggingface_hub version: 0.17.3\r\n- Transformers version: 4.34.0\r\n- Accelerate version: 0.23.0\r\n- xFormers version: 0.0.18\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\n\n### Reproduction\n\nDecode a large latent\n\n### Logs\n\n_No response_\n\n### System Info\n\n..\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/5761",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2023-11-11T03:54:20Z",
    "updated_at": "2024-01-09T15:07:30Z",
    "user": "Luciennnnnnn"
  },
  {
    "repo": "pytorch/serve",
    "number": 2785,
    "title": "How to batch process in the intermediate node in touchserve workflow",
    "body": "Hi, I need some help with the TouchServe workflow. Currently, I use the Touchserve to orchestrate my server model and logic to work together, which could be represented in the graph below.\r\n\r\n```mermaid\r\nstateDiagram-v2\r\n    [*] --> PreProcess\r\n    PreProcess --> Model_A\r\n    Model_A --> IntermediaProcess\r\n    PreProcess --> IntermediaProcess\r\n    IntermediaProcess --> Model_B\r\n    Model_B --> PostProcess\r\n    PostProcess --> [*]\r\n```\r\n\r\nMy problem is that the result from **IntermediaProcess** is batch output. When I try to send a batch output to **Model_B**, it raises an error about `one input cannot have multiple output`, so I solve this problem by packing a result from **IntermediaProcess** into 1 payload and then sending it to **Model_B** with batch processing inside **Model_B**, which could solve the problem. However, it affects the performance of the overall pipeline due to the fact that **Model_B** handles a lot of inference in each request for one request pipeline.\r\n\r\nMy question is there is alternative method to config pipeline to batch process with node level on **Model_B** ? I think it might increase concurrency of the node **Model_B** like this\r\n\r\n```mermaid\r\nstateDiagram-v2\r\n    [*] --> PreProcess\r\n    PreProcess --> Model_A\r\n    Model_A --> IntermediaProcess\r\n    PreProcess --> IntermediaProcess\r\n    IntermediaProcess --> Model_B\r\n    IntermediaProcess --> Model_B\r\n    IntermediaProcess --> Model_B\r\n    Model_B --> PostProcess\r\n    PostProcess --> [*]\r\n```",
    "url": "https://github.com/pytorch/serve/issues/2785",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-11T02:47:56Z",
    "updated_at": "2023-11-27T08:18:12Z",
    "user": "RTae"
  },
  {
    "repo": "huggingface/candle",
    "number": 1319,
    "title": "Question: How to edit specific indices of a tensor?",
    "body": "Hello everybody,\r\n\r\nWhile developing beam search for candle-sampling, I have run into a small issue where it appears there is no way to edit specific indices of a tensor after creation. For example, in Python the following works for lists (and very similar for pytorch tensors):\r\n\r\n```python\r\nvalues = [[1,2,3],[4,5,6]]\r\nvalues[0][0] = 0\r\nprint(values) #[[0,2,3],[4,5,6]]\r\n```\r\n\r\nIs there an equivalent in `Candle` which I can use to edit specific indices of a tensor without creating a new tensor?",
    "url": "https://github.com/huggingface/candle/issues/1319",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-11T01:10:42Z",
    "updated_at": "2023-11-26T15:53:19Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6400,
    "title": "Safely load datasets by disabling execution of dataset loading script",
    "body": "### Feature request\n\nIs there a way to disable execution of dataset loading script using `load_dataset`? This is a security vulnerability that could lead to arbitrary code execution. \r\n\r\nAny suggested workarounds are welcome as well. \n\n### Motivation\n\nThis is a security vulnerability that could lead to arbitrary code execution. \n\n### Your contribution\n\nn/a",
    "url": "https://github.com/huggingface/datasets/issues/6400",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-11-10T23:48:29Z",
    "updated_at": "2024-06-13T15:56:13Z",
    "comments": 4,
    "user": "irenedea"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5758,
    "title": "how to run huggingface model in replicate",
    "body": "### Describe the bug\r\n\r\ni am trying to run https://medium.com/ai-artistry/streamlining-ai-agent-development-with-autogen-and-llava-b84fb0d25262 code by adding https://huggingface.co/LLaVA-VL/llava_plus_v0_7b instead of replicate code.\r\n\r\nMy Question is: Challenges running the huggingface model using replicate?\r\n\r\nsomething like this \ud83d\udc4d \r\n```\r\nresponse = replicate.run(\r\n            \"yorickvp/llava-13b:2facb4a474a0462c15041b78b1ad70952ea46b5ec6ad29583c0b29dbd4249591\",\r\n            input={\"image\": img, \"prompt\": prompt.replace(\"<image>\", \" \")}\r\n        )\r\n```\r\ni tried \r\n```\r\nfrom transformers import HfAgent\r\nagent = HfAgent(\"https://api-inference.huggingface.co/models/LLaVA-VL/llava_plus_v0_7b\",  additional_tools={\"prompt\": \"Show me a tree\"})\r\n\r\nagent.run(return_code=True)\r\n```\r\n```\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\nCell In[15], line 4\r\n      1 from transformers import HfAgent\r\n      2 agent = HfAgent(\"https://api-inference.huggingface.co/models/LLaVA-VL/llava_plus_v0_7b\",  additional_tools={\"prompt\": \"Show me a tree\"})\r\n----> 4 agent.run( return_code=True)\r\n\r\nTypeError: Agent.run() missing 1 required positional argument: 'task'\r\n```\r\n\r\n### Reproduction\r\n\r\nChallenges running the huggingface model using replicate\r\n\r\nsomething like this \ud83d\udc4d \r\n```\r\nresponse = replicate.run(\r\n            \"yorickvp/llava-13b:2facb4a474a0462c15041b78b1ad70952ea46b5ec6ad29583c0b29dbd4249591\",\r\n            input={\"image\": img, \"prompt\": prompt.replace(\"<image>\", \" \")}\r\n        )\r\n```\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\nRTX 3090\r\n\r\n### Who can help?\r\n\r\n@patrickvonplaten @sayakpaul @williamberman  ",
    "url": "https://github.com/huggingface/diffusers/issues/5758",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-11-10T20:31:04Z",
    "updated_at": "2023-11-11T03:33:51Z",
    "user": "andysingal"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2670,
    "title": "\ud83d\udca1 [REQUEST] - Tutorial of USB for Semi-Supervised Learning",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\r\n\r\nThis tutorial helps people to get a basic usage understanding of the Semi-Supervised Learning codebase [USB](https://github.com/microsoft/Semi-supervised-learning) - benchmark. We will show how to use the API provided in USB to train Semi-Supervised Algorithms, e.g., FixMatch, on different data. \r\n\r\n### Existing tutorials on this topic\r\n\r\nCategory: Extending PyTorch\r\nCategory: Image and Video\r\n\r\n\r\n### Additional context\r\n\r\nInvited by @carljparker as part of the PyTorch Docathon H2 2023. \r\nLabel: docathon-h2-2023",
    "url": "https://github.com/pytorch/tutorials/issues/2670",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-10T16:02:32Z",
    "updated_at": "2023-12-07T15:57:32Z",
    "comments": 0,
    "user": "Hhhhhhao"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5756,
    "title": "How to we generate LCM LoRA of an existing model?",
    "body": "I generated a DreamBooth model from SDXL base 1.0\r\n\r\nTo get the speed boost of LCM I need to generate a LCM LoRA from this model\r\n\r\nHow we do it? I don't see documentation ",
    "url": "https://github.com/huggingface/diffusers/issues/5756",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-11-10T15:44:52Z",
    "updated_at": "2023-12-27T13:28:38Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2669,
    "title": "\ud83d\udca1 [REQUEST] - A Tutorial on Whole Slide Image Classification using PyTorch and TIAToolbox",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\r\n\r\nWhole Slide Images are the digital data format from which pathologists and computational pathology researchers investigate cancer growth. To due their enormous image resolutions and and file size (in the order of several gigabytes), conventional image processing methods do not work effectively. This is why we propose writing this tutorial: to (a) explain how to load WSIs using TIAToolbox, which helps process such slides with speed and efficiency using its pyramid stack structure, and (b) show how you can use `torchvision` models can to analyse WSIs. We believe this tutorial will be useful to the PyTorch community, especially who is interested in using PyTorch models tackle cancer tissue research.\r\n\r\n### Existing tutorials on this topic\r\n\r\nThe tutorial will be adapted from our [WSI classification example](https://tia-toolbox.readthedocs.io/en/latest/_notebooks/jnb/05-patch-prediction.html). \r\n\r\n### Additional context\r\n\r\n**Category: Image and Video**\r\n\r\nWritten by Tissue Image Analytics Centre (TIA) and invited by @carljparker as part of the PyTorch Docathon H2 2023.\r\ncc @datumbox @nairbv @fmassa @NicolasHug @YosuaMichael @sekyondaMeta @svekars @carljparker @kit1980 @subramen @measty @behnazelhaminia @DavidBAEpstein @shaneahmed @msaroufim",
    "url": "https://github.com/pytorch/tutorials/issues/2669",
    "state": "closed",
    "labels": [
      "module: vision",
      "docathon-h2-2023"
    ],
    "created_at": "2023-11-10T14:32:47Z",
    "updated_at": "2023-12-19T06:57:38Z",
    "comments": 1,
    "user": "Abdol"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 548,
    "title": "MaxListenersExceededWarning: Possible EventEmitter memory leak detected.",
    "body": "Running dev, and no errors until i try to write into the chat interface on the website locally hosted in WSL2 (win11).\r\n\r\nWorked before i updated to version v.0.6.0\r\n\r\nerror message in web ui:\r\n![image](https://github.com/huggingface/chat-ui/assets/1792727/adc2f421-6cb7-400d-b559-1240b13ff349)\r\n\r\n\r\nError message in terminal:\r\n\r\n> root@xxxxxxxxx:/mnt/c/WSL/HuggingChat test/AI# npm run dev-chat-ui\r\n> \r\n> > ai@1.0.0 dev-chat-ui\r\n> > cd ../chat-ui && npm run dev -- --host 0.0.0.0\r\n> \r\n> \r\n> > chat-ui@0.6.0 dev\r\n> > vite dev --host 0.0.0.0\r\n> \r\n> \r\n> \r\n>   VITE v4.3.9  ready in 15775 ms\r\n> \r\n>   \u279c  Local:   http://localhost:5173/\r\n>   \u279c  Network: http://172.xx.142.227:5173/\r\n>   \u279c  press h to show help\r\n> (node:80446) **MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit**\r\n> (Use `node --trace-warnings ...` to show where the warning was created)\r\n> 2:44:12 PM [vite] Error when evaluating SSR module /src/lib/server/websearch/sentenceSimilarity.ts:\r\n> |- TypeError: fetch failed\r\n>     at fetch (/mnt/c/WSL/HuggingChat test/chat-ui/node_modules/undici/index.js:110:15)\r\n>     at processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n>     at runNextTicks (node:internal/process/task_queues:64:3)\r\n>     at listOnTimeout (node:internal/timers:540:9)\r\n>     at process.processTimers (node:internal/timers:514:7)\r\n>     at async getModelFile (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:468:24)\r\n>     at async getModelJSON (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:542:18)\r\n>     at async Promise.all (index 0)\r\n>     at async loadTokenizer (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:56:16)\r\n>     at async AutoTokenizer.from_pretrained (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:3778:48)\r\n> \r\n> 2:44:12 PM [vite] Error when evaluating SSR module /src/lib/server/websearch/runWebSearch.ts: failed to import \"/src/lib/server/websearch/sentenceSimilarity.ts\"\r\n> |- TypeError: fetch failed\r\n>     at fetch (/mnt/c/WSL/HuggingChat test/chat-ui/node_modules/undici/index.js:110:15)\r\n>     at processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n>     at runNextTicks (node:internal/process/task_queues:64:3)\r\n>     at listOnTimeout (node:internal/timers:540:9)\r\n>     at process.processTimers (node:internal/timers:514:7)\r\n>     at async getModelFile (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:468:24)\r\n>     at async getModelJSON (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:542:18)\r\n>     at async Promise.all (index 0)\r\n>     at async loadTokenizer (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:56:16)\r\n>     at async AutoTokenizer.from_pretrained (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:3778:48)\r\n> \r\n> 2:44:12 PM [vite] Error when evaluating SSR module /mnt/c/WSL/HuggingChat test/chat-ui/src/routes/conversation/[id]/+server.ts: failed to import \"/src/lib/server/websearch/runWebSearch.ts\"\r\n> |- TypeError: fetch failed\r\n>     at fetch (/mnt/c/WSL/HuggingChat test/chat-ui/node_modules/undici/index.js:110:15)\r\n>     at processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n>     at runNextTicks (node:internal/process/task_queues:64:3)\r\n>     at listOnTimeout (node:internal/timers:540:9)\r\n>     at process.processTimers (node:internal/timers:514:7)\r\n>     at async getModelFile (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:468:24)\r\n>     at async getModelJSON (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:542:18)\r\n>     at async Promise.all (index 0)\r\n>     at async loadTokenizer (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:56:16)\r\n>     at async AutoTokenizer.from_pretrained (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:3778:48)\r\n> \r\n> TypeError: fetch failed\r\n>     at fetch (/mnt/c/WSL/HuggingChat test/chat-ui/node_modules/undici/index.js:110:15)\r\n>     at processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n>     at runNextTicks (node:internal/process/task_queues:64:3)\r\n>     at listOnTimeout (node:internal/timers:540:9)\r\n>     at process.processTimers (node:internal/timers:514:7)\r\n>     at async getModelFile (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:468:24)\r\n>     at async getModelJSON (file:///mnt/c/WSL/HuggingChat%20test/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:542:18)\r\n>     at async Pr",
    "url": "https://github.com/huggingface/chat-ui/issues/548",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-11-10T13:56:03Z",
    "updated_at": "2023-11-16T20:02:07Z",
    "comments": 7,
    "user": "patchie"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2355,
    "title": "How to Finetune a Clip Model with Custom Data ",
    "body": "I want to do my custom data training to get high accuracy embeddings of my image data.\r\n\r\nAre there any scripts or documentation that would be helpful?\r\n\r\nthank you.",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2355",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-10T07:27:23Z",
    "updated_at": "2023-12-25T03:23:20Z",
    "user": "unmo"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5742,
    "title": "where is the Parameter Description?",
    "body": "",
    "url": "https://github.com/huggingface/diffusers/issues/5742",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-10T07:07:03Z",
    "updated_at": "2023-11-13T18:01:56Z",
    "user": "MRG-DOT"
  },
  {
    "repo": "pytorch/vision",
    "number": 8107,
    "title": "cannot install torch==2.0.0 torchvision==0.15.2",
    "body": "### \ud83d\udc1b Describe the bug\n\nFor some reason,  I cannot do:\r\n\r\n```\r\npip install torch==2.0.0 torchvision==0.15.2 --index-url https://download.pytorch.org/whl/cu118\r\n```\r\n\r\nBut I can install them separately with `--no-deps` and `torchvision` seems to work just fine. Why is this the case? Isn't `torchvision==0.15` supposed to be compatible with `torch==2.0`?\n\n### Versions\n\n```\r\nCollecting environment information...\r\nPyTorch version: 2.0.0+cu118\r\nIs debug build: False                                                                                                     CUDA used to build PyTorch: 11.8                                                                                          ROCM used to build PyTorch: N/A                                                                                                                                                                                                                     OS: Ubuntu 20.04.6 LTS (x86_64)\r\nGCC version: Could not collect\r\nClang version: Could not collect\r\nCMake version: version 3.25.0\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.8.18 | packaged by conda-forge | (default, Oct 10 2023, 15:44:36)  [GCC 12.3.0] (64-bit runtime)\r\nPython platform: Linux-5.4.0-81-generic-x86_64-with-glibc2.10\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                    x86_64\r\nCPU op-mode(s):                  32-bit, 64-bit\r\nByte Order:                      Little Endian                                                                            Address sizes:                   46 bits physical, 48 bits virtual\r\nCPU(s):                          48\r\nOn-line CPU(s) list:             0-47\r\nThread(s) per core:              2\r\nCore(s) per socket:              12                                                                                       Socket(s):                       2                                                                                        NUMA node(s):                    2                                                                                        Vendor ID:                       GenuineIntel                                                                             CPU family:                      6\r\nModel:                           63\r\nModel name:                      Intel(R) Xeon(R) CPU E5-2670 v3 @ 2.30GHz\r\nStepping:                        2\r\nCPU MHz:                         2299.882\r\nCPU max MHz:                     2300.0000\r\nCPU min MHz:                     1200.0000\r\nBogoMIPS:                        4599.76\r\nVirtualization:                  VT-x\r\nL1d cache:                       768 KiB\r\nL1i cache:                       768 KiB\r\nL2 cache:                        6 MiB\r\nL3 cache:                        60 MiB\r\nNUMA node0 CPU(s):               0-11,24-35\r\nNUMA node1 CPU(s):               12-23,36-47\r\nVulnerability Itlb multihit:     KVM: Mitigation: Split huge pages\r\nVulnerability L1tf:              Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable\r\nVulnerability Mds:               Mitigation; Clear CPU buffers; SMT vulnerable\r\nVulnerability Meltdown:          Mitigation; PTI\r\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp\r\nVulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization\r\nVulnerability Spectre v2:        Mitigation; Full generic retpoline, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling\r\nVulnerability Srbds:             Not affected\r\nVulnerability Tsx async abort:   Not affected\r\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi\r\nmmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti intel_ppin ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm arat pln pts md_clear flush_l1d\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.24.1\r\n[pip3] torch==2.0.0+cu118\r\n[pip3] torchaudio==2.0.1+cu118\r\n[pip3] torchvision==0.15.1+cu118\r\n[pip3] triton==2.0.0\r\n[conda] numpy                     1.24.1                   pypi_0    pypi\r\n[conda] torch                     2.0.0+cu118              pypi_0    pypi\r\n[conda] torchaudio                2.0.1+cu118              pypi_0    pypi\r\n[conda] torchvision               0.15.2+cu118             pypi_0    pypi\r\n[conda] triton                ",
    "url": "https://github.com/pytorch/vision/issues/8107",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-10T02:13:06Z",
    "updated_at": "2023-11-10T14:26:40Z",
    "comments": 1,
    "user": "wemoveon2"
  },
  {
    "repo": "huggingface/setfit",
    "number": 436,
    "title": "\u3010question\u3011could you tell me the latest embedding model which usable by setfit?",
    "body": "Hi!\r\nThis is not bug report but question.\r\nFrom my understand, when we use SetFit, we have to choose one of embedding model from sentense transformer.\r\nBut now, I feel those models are kind of old and would like to know the latest model for embedding which can be used by setfit\r\n\r\nThank you in adv",
    "url": "https://github.com/huggingface/setfit/issues/436",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-10T02:10:01Z",
    "updated_at": "2023-11-12T01:02:24Z",
    "user": "Yongtae723"
  },
  {
    "repo": "pytorch/serve",
    "number": 2780,
    "title": "example of integrating deepspeed fastgen into TorchServe",
    "body": "### \ud83d\ude80 The feature\n\nProvide an example of integrating deepspeed fastgen in TorchServe.\n\n### Motivation, pitch\n\ndeepspeed fastgen was published in mii.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2780",
    "state": "open",
    "labels": [
      "future",
      "example"
    ],
    "created_at": "2023-11-09T19:32:46Z",
    "updated_at": "2023-11-09T19:32:46Z",
    "comments": 0,
    "user": "lxning"
  },
  {
    "repo": "pytorch/xla",
    "number": 5784,
    "title": "Is there a Bug with AllGather backprop algorithm?",
    "body": "https://github.com/pytorch/xla/blob/d5d023063bfa8ecb4629f621f9b5890bc8396f58/torch_xla/core/functions.py#L66C1-L66C1\r\n\r\nIn the aforementioned line, we see the class \r\n```\r\nclass AllGather(torch.autograd.Function):\r\n\r\n  @staticmethod\r\n  def forward(ctx, input, dim):\r\n    ctx.dim = dim\r\n    ctx.ordinal = xm.get_ordinal()\r\n    ctx.world_size = xm.xrt_world_size()\r\n    return xm.all_gather(input, dim=dim)\r\n\r\n  @staticmethod\r\n  def backward(ctx, grad_output):\r\n    slice_size = grad_output.size(ctx.dim) // ctx.world_size\r\n    return torch.narrow(grad_output.clone(), ctx.dim, ctx.ordinal * slice_size,\r\n                        slice_size), None\r\n\r\n```\r\n\r\nI went to test this method with the following: \r\n\r\n```\r\nimport torch\r\nimport os\r\nimport torch.distributed as dist\r\nimport torch_xla.core.xla_model as xm\r\nimport torch_xla.distributed.xla_backend \r\n\r\nif __name__ == \"__main__\": \r\n    \r\n  dist.init_process_group('xla') \r\n  device = xm.xla_device()\r\n  rank = xm.get_ordinal()\r\n  xla_ = True\r\n\r\n  t = torch.arange(0,8,1,dtype=torch.float,requires_grad=True,device=device).view(2,4).contiguous()\r\n  t.retain_grad()\r\n  \r\n  #t1 = torch.narrow(t,0,rank,1).contiguous()\r\n  #t2 = torch.narrow(t,0,1,1).contiguous()\r\n  \r\n  t2 = torch.arange(0,8,1,dtype=torch.float,requires_grad=True,device=device).view(2,4).contiguous()\r\n  t2.retain_grad()\r\n  tout = torch.matmul(t,t2.T)\r\n  loss=tout.sum()\r\n  loss.backward()\r\n  res_t = t.grad.detach().cpu() \r\n  \r\n  tnew = torch.arange(0,8,1,dtype=torch.float,requires_grad=True,device=device).view(2,4).contiguous() \r\n  tnew = torch.narrow(tnew,0,rank,1)\r\n  tnew = tnew.clone()\r\n  tnew.retain_grad()\r\n  t2n = torch.arange(4*rank,(rank+1)*4,device=device,requires_grad=True,dtype=torch.float).contiguous()\r\n  t2n.retain_grad()\r\n  tnew2 = AllGather.apply(tnew)\r\n  ton = torch.matmul(tnew2,t2n.T)\r\n  loss=ton.sum()\r\n  loss.backward()\r\n  \r\n  rest_tn = tnew.grad.detach().cpu()\r\n  xm.rendezvous('completed')\r\n  print(res_t)\r\n  print(rest_tn)\r\n```\r\n\r\nI noticed that the results are not the same,\r\n\r\nHowever, if I run \r\n```\r\nclass AllGather(torch.autograd.Function):\r\n\r\n  @staticmethod\r\n  def forward(ctx, input, dim):\r\n    ctx.dim = dim\r\n    ctx.ordinal = xm.get_ordinal()\r\n    ctx.world_size = xm.xrt_world_size()\r\n    return xm.all_gather(input, dim=dim)\r\n\r\n  @staticmethod\r\n  def backward(ctx, grad_output):\r\n    slice_size = grad_output.size(ctx.dim) // ctx.world_size\r\n    xm.reduce(xm.REDUCE_SUM,grad_output.contiguous())\r\n    return torch.narrow(grad_output.clone(), ctx.dim, ctx.ordinal * slice_size,\r\n                        slice_size), None\r\n\r\n```\r\n\r\nThen they are the same. Is there an issue with my code? I am trying to confirm that backprop is working properly?\r\n",
    "url": "https://github.com/pytorch/xla/issues/5784",
    "state": "open",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2023-11-09T18:30:24Z",
    "updated_at": "2025-04-28T12:21:19Z",
    "user": "mathephysicist"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 113370,
    "title": "Incorrect stride when permuting shapes where a zero dimension is present.",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI ran into a problem while permuting the following tensor (to convert into a complex dtype):\r\n\r\n```python\r\n>>> torch.view_as_complex(torch.empty(1,0,2,100,100).permute(0,1,3,4,2).contiguous())\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nRuntimeError: Tensor must have a last dimension with stride 1\r\n```\r\n\r\nUpon further investigation I found that strides behave oddly when permuting with a zero dimension present.\r\n\r\nContrast the difference when `tensor.size(1) == 0` and `tensor.size(1) == 99`:\r\n\r\n```python\r\n>>> torch.empty(1,0,2,100,100).stride()\r\n(20000, 20000, 10000, 100, 1)\r\n\r\n>>> torch.empty(1,0,2,100,100).permute(0,1,3,4,2).contiguous().stride()\r\n(20000, 20000, 100, 1, 10000)\r\n\r\n>>> torch.empty(1,99,2,100,100).permute(0,1,3,4,2).contiguous().stride()\r\n(1980000, 20000, 200, 2, 1)\r\n```\r\n\r\nIs this expected behavior? \r\n\r\n**Notes:** \r\n\r\nI am aware that there is no data at all if a dim is 0, I wouldn't have been surprised to observe a stride tuple containing all 0's or 1's. The latter - which would work with `view_as_complex` - would obviously be most convenient for me.\r\n\r\n(My motivation for using 0 sized tensors is that it's often easier to work with an empty array `[]` value than working with a `None` value which requires null-checks all over the place.)\r\n\r\n### Versions\r\n\r\nPyTorch version: 1.12.1+cu116\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.6\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: NixOS 22.11 (Raccoon) (x86_64)\r\nGCC version: (GCC) 11.3.0\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\nLibc version: glibc-2.35\r\n\r\nPython version: 3.10.6 (main, Aug  1 2022, 20:38:21) [GCC 11.3.0] (64-bit runtime)\r\nPython platform: Linux-5.15.114-x86_64-with-glibc2.35\r\nIs CUDA available: True\r\nCUDA runtime version: Could not collect\r\nCUDA_MODULE_LOADING set to: \r\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 3060\r\nNvidia driver version: 520.56.06\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                    x86_64\r\nCPU op-mode(s):                  32-bit, 64-bit\r\nAddress sizes:                   48 bits physical, 48 bits virtual\r\nByte Order:                      Little Endian\r\nCPU(s):                          32\r\nOn-line CPU(s) list:             0-31\r\nVendor ID:                       AuthenticAMD\r\nModel name:                      AMD Ryzen 9 5950X 16-Core Processor\r\nCPU family:                      25\r\nModel:                           33\r\nThread(s) per core:              2\r\nCore(s) per socket:              16\r\nSocket(s):                       1\r\nStepping:                        2\r\nFrequency boost:                 enabled\r\nCPU(s) scaling MHz:              72%\r\nCPU max MHz:                     5083.3979\r\nCPU min MHz:                     2200.0000\r\nBogoMIPS:                        6787.42\r\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm\r\nVirtualization:                  AMD-V\r\nL1d cache:                       512 KiB (16 instances)\r\nL1i cache:                       512 KiB (16 instances)\r\nL2 cache:                        8 MiB (16 instances)\r\nL3 cache:                        64 MiB (2 instances)\r\nNUMA node(s):                    1\r\nNUMA node0 CPU(s):               0-31\r\nVulnerability Itlb multihit:     Not affected\r\nVulnerability L1tf:              Not affected\r\nVulnerability Mds:               Not affected\r\nVulnerability Meltdown:          Not affected\r\nVulnerability Mmio stale data:   Not affected\r\nVulnerability Retbleed:          Not affected\r\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp\r\nVulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization\r\nVulnerability Spectre v2:        Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP always-on, RSB filling, PBRSB-eIBRS Not affected\r\nVulnerability Srbds:             Not affected\r\nVulnerability Tsx async abort:   Not affected\r\n\r\nVersions of relevant librarie",
    "url": "https://github.com/pytorch/pytorch/issues/113370",
    "state": "open",
    "labels": [
      "triaged",
      "module: edge cases",
      "module: empty tensor"
    ],
    "created_at": "2023-11-09T17:16:14Z",
    "updated_at": "2024-02-23T18:06:34Z",
    "user": "rehno-lindeque"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6394,
    "title": "TorchFormatter images (H, W, C) instead of (C, H, W) format",
    "body": "### Describe the bug\r\n\r\nUsing .set_format(\"torch\") leads to images having shape (H, W, C), the same as in numpy. \r\nHowever, pytorch normally uses (C, H, W) format.\r\n\r\nMaybe I'm missing something but this makes the format a lot less useful as I then have to permute it anyways.\r\nIf not using the format it is possible to directly use torchvision transforms but any non-transformed value will not be a tensor.\r\n\r\nIs there a reason for this choice?\r\n\r\n### Steps to reproduce the bug\r\n\r\n```python\r\nfrom datasets import Dataset, Features, Audio, Image\r\nimages = [\"path/to/image.png\"] * 10\r\nfeatures = Features({\"image\": Image()})\r\nds = Dataset.from_dict({\"image\": images}, features=features) \r\nds = ds.with_format(\"torch\")\r\nds[0][\"image\"].shape\r\n```\r\n```python\r\ntorch.Size([512, 512, 4])\r\n```\r\n\r\n### Expected behavior\r\n\r\n```python\r\nfrom datasets import Dataset, Features, Audio, Image\r\nimages = [\"path/to/image.png\"] * 10\r\nfeatures = Features({\"image\": Image()})\r\nds = Dataset.from_dict({\"image\": images}, features=features) \r\nds = ds.with_format(\"torch\")\r\nds[0][\"image\"].shape\r\n```\r\n```python\r\ntorch.Size([4, 512, 512])\r\n```\r\n\r\n### Environment info\r\n\r\n- `datasets` version: 2.14.6\r\n- Platform: Linux-6.5.9-100.fc37.x86_64-x86_64-with-glibc2.31\r\n- Python version: 3.11.6\r\n- Huggingface_hub version: 0.18.0\r\n- PyArrow version: 14.0.1\r\n- Pandas version: 2.1.2",
    "url": "https://github.com/huggingface/datasets/issues/6394",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-09T16:02:15Z",
    "updated_at": "2024-04-11T12:40:16Z",
    "comments": 9,
    "user": "Modexus"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 386,
    "title": "[Question] Any plan to rewrite js in typescript ?",
    "body": "I'm doing it for my own usage although I'm loosing the benfit of upgrades.\r\n\r\nTypings are usefull you know :)\r\n\r\nWhile doing it I found this,\r\nin models.js, line 1027 :\r\n```javascript\r\nlet sampledTokens = sampler(logits);\r\n```\r\nshould be \r\n```javascript\r\nlet sampledTokens = sampler.sample(logits);\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/386",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-09T13:41:10Z",
    "updated_at": "2023-11-15T18:18:39Z",
    "user": "pnocera"
  },
  {
    "repo": "huggingface/candle",
    "number": 1304,
    "title": "How to repeat_interleave on Tensor?",
    "body": "There is [repeat_interleave](https://pytorch.org/docs/stable/generated/torch.repeat_interleave.html) function, but I can't find analog in candle.\r\n\r\nI need convert `tensor([[6110,    1]])` to `tensor([[6110,    1], [6110,    1], [6110,    1]])`\r\n\r\nI found some examples [like](https://github.com/huggingface/candle/blob/f772213e844fdfcc8dbaf662fc11819f4028dc78/candle-transformers/src/models/segment_anything/mask_decoder.rs#L234) this and [this](https://github.com/huggingface/candle/blob/73d02f4f57c788c43f3e11991635bc15701c25c0/candle-transformers/src/models/mpt.rs#L137). But in my case the result is `tensor([6110, 6110, 6110, 1, 1, 1])`.\r\n\r\nLooks like I do something wrong: :-D I expect result the same as from python https://github.com/huggingface/transformers/blob/main/src/transformers/generation/utils.py#L3090C31-L3090C31\r\n\r\nHow I can repeat python example in current candle version?",
    "url": "https://github.com/huggingface/candle/issues/1304",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-09T06:31:04Z",
    "updated_at": "2023-11-09T08:16:19Z",
    "user": "bragovo"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5709,
    "title": "How to run stable diffusion pipeline using multithreading in fastapi ?",
    "body": "Hi.. I have created an stable diffusion API using Fastapi and it is working perfectly fine if sequential request are been made. I have tried to implement multithreading in the api to concurrently run multiple request, but the problem is every request output generation time is dependent on total number of request that are made. For Eg. if one request takes 5 secs to run, and if 5 request are made simultaneously then it will take 5*5 = 25 secs for every request to get output. After researching about these problem, I get know that GIL (Global Interpreter Lock) in python is allowing only one thread to execute per process. So we will get same output as single thread if we use multithreading in these purpose. Also, I have tried multiprocessing to overcome this issue but it is loading multiple instances of the same model for each process and its become very hard to load all model in 16 GB RAM.\r\n\r\nDo you know how to get output in same time for every requests that are made. If 5 requests are made concurrently then every request should get output in 5 seconds only. Also do gpu configuration matters tp gets results in quick time based on number of request ?\r\n\r\nGPU Configuration:\r\nNvidia 3050 8GB RAM\r\n\r\n@sayakpaul @patrickvonplaten ",
    "url": "https://github.com/huggingface/diffusers/issues/5709",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-11-08T16:19:45Z",
    "updated_at": "2024-01-09T15:07:46Z",
    "user": "minkvirparia"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 23,
    "title": "How do you set up initial camera position?",
    "body": "When loading a splat file, I'd like to set the initial camera position to a specific location. How can this be achieved?",
    "url": "https://github.com/huggingface/gsplat.js/issues/23",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2023-11-08T16:04:04Z",
    "updated_at": "2023-11-11T16:35:57Z",
    "user": "reconlabs-chris"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 381,
    "title": "Would a CLI to perform convert operation be useful?",
    "body": "### Feature request\n\nCould it be possible to add to this repo a CLI tool that would use the library to convert files stored in different format and convert them to safetensors.\r\nIt would be useful to have also from the command line a way to introspect a model and find some property about it (layers, metadata, ...)\n\n### Motivation\n\nI'm frustrated when I got a lot of example models on my disk that I'm not too sure about and I would like to have a quick and easy way from the command line to inspect them, convert them, compress them and do all the tasks I need to perform straight from the command line with completion support.\n\n### Your contribution\n\nI could contribute design suggestions about the interface but I have no particular knowledge of Rust and I'm learning transformers and ML in general.",
    "url": "https://github.com/huggingface/safetensors/issues/381",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-11-08T15:39:02Z",
    "updated_at": "2024-01-02T01:48:28Z",
    "comments": 2,
    "user": "remyleone"
  },
  {
    "repo": "huggingface/transformers",
    "number": 27361,
    "title": "Add how to preprocess mask for finetuning with SAM",
    "body": "### Feature request\n\nThe [SAM image processor](https://github.com/huggingface/transformers/blob/main/src/transformers/models/sam/image_processing_sam.py) takes images as input and resizes them so that the longest edge is 1024 (using default values). This is the size expect as input fo the SAM model. \r\nFor inference, this works fine as only the images need resizing but for fine-tuning as per [this tutorial](https://github.com/NielsRogge/Transformers-Tutorials/blob/master/SAM/Fine_tune_SAM_(segment_anything)_on_a_custom_dataset.ipynb), you need to resize both your images and your masks as the SAM model produces `pred_masks` with size 256x256. If I don't resize my masks I get `ground truth has different shape (torch.Size([2, 1, 768, 1024])) from input (torch.Size([2, 1, 256, 256]))` when trying to calculate loss.\r\n\r\nTo fix this, I've currently written a resize and pad function into my code:\r\n\r\n```\r\nfrom PIL import Image\r\n\r\ndef resize_mask(image):\r\n    longest_edge = 256\r\n    \r\n    # get new size\r\n    w, h = image.size\r\n    scale = longest_edge * 1.0 / max(h, w)\r\n    new_h, new_w = h * scale, w * scale\r\n    new_h = int(new_h + 0.5)\r\n    new_w = int(new_w + 0.5)\r\n\r\n    resized_image = image.resize((new_w, new_h), resample=Image.Resampling.BILINEAR)\r\n    return resized_image\r\n\r\ndef pad_mask(image):\r\n    pad_height = 256 - image.height\r\n    pad_width = 256 - image.width\r\n\r\n    padding = ((0, pad_height), (0, pad_width))\r\n    padded_image = np.pad(image, padding, mode=\"constant\")\r\n    return padded_image\r\n\r\ndef process_mask(image):\r\n    resized_mask = resize_mask(image)\r\n    padded_mask = pad_mask(resized_mask)\r\n    return padded_mask\r\n```\r\n\r\nand then have added this to my definition of SAMDataset:\r\n\r\n```\r\nclass SAMDataset(Dataset):\r\n    def __init__(self, dataset, processor, transform = None):\r\n        self.dataset = dataset\r\n        self.processor = processor\r\n        self.transform = transform\r\n\r\n    def __len__(self):\r\n        return len(self.dataset)\r\n\r\n    def __getitem__(self, idx):\r\n        item = self.dataset[idx]\r\n        \r\n        if self.transform:\r\n            image = self.transform(item[\"pixel_values\"])\r\n        else:\r\n            image = item[\"pixel_values\"]\r\n        \r\n        # get bounding box prompt\r\n        padded_mask = process_mask(item[\"label\"])\r\n        prompt = get_bounding_box(padded_mask)\r\n\r\n        # prepare image and prompt for the model\r\n        inputs = self.processor(image, input_boxes=[[prompt]], return_tensors=\"pt\")\r\n\r\n        # remove batch dimension which the processor adds by default\r\n        inputs = {k:v.squeeze(0) for k,v in inputs.items()}\r\n\r\n        # add ground truth segmentation\r\n        inputs[\"ground_truth_mask\"] = padded_mask\r\n\r\n        return inputs\r\n```\r\n\r\nThis seems to work fine. \r\n\r\nWhat I think would be good is to allow input of masks in the SAM image processor. For example, the [Segformer image processor](https://github.com/huggingface/transformers/blob/v4.35.0/src/transformers/models/segformer/image_processing_segformer.py#L305) takes images and masks as inputs and resizes both to the size expected by the Segformer model. \r\n\r\nI have also seen there is a 'post_process_mask' method in the SAM image processor but I am unsure how to implement this in the tutorial I'm following. If you think this is a better way vs. what I am suggesting then please could you explain where I would add this in the code from the tutorial notebook.\n\n### Motivation\n\nEasier fine tuning of SAM model.\n\n### Your contribution\n\nI could try write a PR for this and/or make a PR to update the [notebook](https://github.com/NielsRogge/Transformers-Tutorials/blob/master/SAM/Fine_tune_SAM_(segment_anything)_on_a_custom_dataset.ipynb) instead .",
    "url": "https://github.com/huggingface/transformers/issues/27361",
    "state": "closed",
    "labels": [
      "Feature request",
      "Vision"
    ],
    "created_at": "2023-11-08T11:53:31Z",
    "updated_at": "2024-01-08T16:40:38Z",
    "user": "rwood-97"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 546,
    "title": "Custom Theme",
    "body": "I want to change the UI layout yet still be able to update the code in order to enjoy the new features as they are released.\r\nIs there a way to add my changes in a way that would be similar to a theme? or an outside addon?\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/546",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-08T08:26:43Z",
    "updated_at": "2023-11-15T09:32:22Z",
    "comments": 2,
    "user": "kaplanyaniv"
  },
  {
    "repo": "pytorch/executorch",
    "number": 1162,
    "title": "How to deploy llama2 on Qualcomm Snapdragon chips through ExecuTorch\uff1f",
    "body": "Excuse me, if I need to deploy llama2 on Qualcomm Snapdragon chip through ExecuTorch and want to use NPU computing power as an inference computing unit, what do I need to do?\r\n\r\nThe chip specs I'm currently using are SG885G-WF https://www.quectel.com/product/wi-fi-bt-sg885g-wf-smart-module\u3002",
    "url": "https://github.com/pytorch/executorch/issues/1162",
    "state": "closed",
    "labels": [
      "need-user-input",
      "partner: qualcomm",
      "triaged"
    ],
    "created_at": "2023-11-07T12:32:59Z",
    "updated_at": "2025-02-03T18:21:13Z",
    "user": "tensorflowt"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6388,
    "title": "How to create 3d medical imgae dataset?",
    "body": "### Feature request\r\n\r\nI am newer to huggingface, after i look up `datasets` docs, I can't find how to create the dataset contains 3d medical image (ends with '.mhd', '.dcm', '.nii')\r\n\r\n### Motivation\r\n\r\nhelp us to upload 3d medical dataset to huggingface!\r\n\r\n### Your contribution\r\n\r\nI'll submit a PR if I find a way to add this feature",
    "url": "https://github.com/huggingface/datasets/issues/6388",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-11-07T11:27:36Z",
    "updated_at": "2023-11-07T11:28:53Z",
    "user": "QingYunA"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6387,
    "title": "How to load existing downloaded dataset ?",
    "body": "Hi @mariosasko @lhoestq  @katielink \r\n\r\nThanks for your contribution and hard work.\r\n\r\n### Feature request\r\n\r\nFirst, I download a dataset as normal by:\r\n```\r\nfrom datasets import load_dataset\r\n\r\ndataset = load_dataset('username/data_name', cache_dir='data')\r\n```\r\n\r\nThe dataset format in `data` directory will be:\r\n```\r\n-data\r\n  |-data_name\r\n    |-test-00000-of-00001-bf4c733542e35fcb.parquet\r\n    |-train-00000-of-00001-2a1df75c6bce91ab.parquet\r\n```\r\n\r\n\r\nThen I use SCP to clone this dataset into another machine, and then try:\r\n```\r\nfrom datasets import load_dataset\r\n\r\ndataset = load_dataset('data/data_name')  # load from local path\r\n```\r\n\r\nThis leads to re-generating training and validation split for each time, and the disk quota will be duplicated occupation.\r\n\r\nHow can I just load the dataset without generating and saving these splits again?\r\n\r\n### Motivation\r\n\r\nI do not want to download the same dataset in two machines, scp is much faster and better than HuggingFace API. I hope we can directly load the downloaded datasets (.parquest)\r\n\r\n### Your contribution\r\n\r\nPlease refer to the feature",
    "url": "https://github.com/huggingface/datasets/issues/6387",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-11-06T22:51:44Z",
    "updated_at": "2023-11-16T18:07:01Z",
    "user": "liming-ai"
  },
  {
    "repo": "huggingface/gsplat.js",
    "number": 15,
    "title": "Does it work with polycam models?",
    "body": "Hello! Thank you for your work, it looks very promising. Got it working with the README file... Just tried it with a .ply object out of polycam and got error\r\n\r\n```\r\nUncaught (in promise) RangeError: byte length of Float32Array should be a multiple of 4\r\n    at new Float32Array (<anonymous>)\r\n    at R.setData (Scene.ts:43:25)\r\n    at W.LoadAsync (Loader.ts:31:15)\r\n    at async main (main.ts:11:5)\r\n\r\n```\r\n\r\nwith what file type is it compatible? Thanks!",
    "url": "https://github.com/huggingface/gsplat.js/issues/15",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-06T21:15:51Z",
    "updated_at": "2023-11-10T18:26:55Z",
    "user": "karen-pal"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2655,
    "title": "Why multiply sqrt(d_model) before TransformerEncoderLayer?",
    "body": "Hi,\r\n\r\nThank you so much for the tutorial! I notice that in https://github.com/pytorch/tutorials/blob/main/beginner_source/transformer_tutorial.py#L92, you multiply sqrt(d_model) before TransformerEncoderLayer. May I ask why we need to do this?\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/tutorials/issues/2655",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-06T19:48:45Z",
    "updated_at": "2023-11-06T20:13:28Z",
    "user": "yuzhenmao"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 545,
    "title": "Chat-UI throws an 403 forbidden when access settings",
    "body": "When viewing the settings page after first setup the settings page fives the error: ```Failed to load resource: the server responded with a status of 403 (Forbidden) settings:1``` in the console. Without any explanation of what and why.\r\n\r\nSetup:\r\n```yaml\r\nservices:\r\n  # Chat ui webserver\r\n  chat-ui:\r\n    container_name: chat\r\n    build:\r\n      context: ./\r\n      dockerfile: Dockerfile\r\n    ports:\r\n      - 8080:3000\r\n    networks:\r\n      default:\r\n        ipv4_address: 172.25.0.2\r\n\r\n  # Mongo database      \r\n  database:\r\n    container_name: mongo-chatui\r\n    image: \"mongo:latest\"\r\n    ports:\r\n      - 27017:27017\r\n    restart: always\r\n    environment:\r\n      - MONGO_INITDB_DATABASE=chat-ui\r\n    networks:\r\n      default:\r\n        ipv4_address: 172.25.0.3\r\n\r\nnetworks:\r\n  default:\r\n    driver: bridge\r\n    ipam:\r\n      driver: default\r\n      config:\r\n        - subnet: 172.25.0.0/28\r\n          gateway: 172.25.0.1\r\n```\r\n\r\nAnd my .env.local: \r\n```\r\nMONGODB_URL=mongodb://172.25.0.3:27017\r\nPUBLIC_ORIGIN=http://localhost:3030\r\nHF_ACCESS_TOKEN=recacted\r\nMODELS=recated\r\n```\r\n\r\nWhat are the steps to take here? \r\n\r\nThe database connections gets accepted according to the mongoDB instance",
    "url": "https://github.com/huggingface/chat-ui/issues/545",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-11-06T15:09:33Z",
    "updated_at": "2024-02-15T21:03:04Z",
    "comments": 5,
    "user": "IT-Guy007"
  },
  {
    "repo": "pytorch/audio",
    "number": 3688,
    "title": "Why does `transforms.TimeStretch` return  of type `complex64`?",
    "body": "### \ud83d\udc1b Describe the bug\n\nGood day!\r\n\r\nhttps://pytorch.org/audio/2.1.0/generated/torchaudio.transforms.TimeStretch.html#torchaudio.transforms.TimeStretch.forward:\r\n\r\n> Stretched spectrogram. The resulting tensor is of the same dtype as the input spectrogram, but the number of frames is changed to `ceil(num_frame / rate)`.\r\n\r\nBut:\r\n```\r\ns = torchaudio.transforms.Spectrogram()(x)\r\ns.dtype  # => torch.float32\r\n\r\nt = torchaudio.transforms.TimeStretch(fixed_rate=0.9)(s)\r\nt.dtype  # =>  torch.complex64\r\n```\r\n\r\nShould I collect a bug report or don't I understand time stretching?\r\n\r\n(previously posted [at the forum](https://discuss.pytorch.org/t/why-does-transforms-timestretch-return-complex64/191208))\n\n### Versions\n\ntorchaudio 2.1.1 from Google Colab",
    "url": "https://github.com/pytorch/audio/issues/3688",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-05T12:02:57Z",
    "updated_at": "2023-11-10T10:25:51Z",
    "comments": 4,
    "user": "kuraga"
  },
  {
    "repo": "huggingface/alignment-handbook",
    "number": 9,
    "title": "How to finetune or lora on custom dataset",
    "body": "How to finetune or lora on custom dataset",
    "url": "https://github.com/huggingface/alignment-handbook/issues/9",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-05T02:38:33Z",
    "updated_at": "2024-11-11T07:52:57Z",
    "user": "universewill"
  },
  {
    "repo": "huggingface/peft",
    "number": 1080,
    "title": "Add docs on how to merge adapters after 4bit QLoRA with PEFT 0.6",
    "body": "### Feature request\r\n\r\nthere has been some controversy on how to correctly **merge the adapters with the base model after 4bit LoRA** training. \r\n\r\nto me it seems there are two ways to merge and save:\r\n\r\n- ChrisHayduk https://gist.github.com/ChrisHayduk/1a53463331f52dca205e55982baf9930\r\n- TheBloke https://github.com/TheBlokeAI/AIScripts/blob/main/merge_peft_adapters.py\r\n\r\nWhat is the correct way to merge the adapters now (with PEFT 0.6 and [PR 851](https://github.com/huggingface/peft/pull/851) merged) after training a 4-bit quantized model ?\r\n\r\n### Motivation\r\n\r\nno docs, at least i haven't found any\r\n\r\n### Your contribution\r\n\r\nexample:\r\n\r\n**quantize and train**\r\n```\r\nmodelpath=\"models/Mistral-7B-v0.1\"\r\n\r\nmodel = AutoModelForCausalLM.from_pretrained(\r\n    modelpath,    \r\n    load_in_4bit=True,\r\n    quantization_config=BitsAndBytesConfig(\r\n        load_in_4bit=True,\r\n        llm_int8_threshold=6.0,\r\n        llm_int8_has_fp16_weight=False,\r\n        bnb_4bit_compute_dtype=torch.bfloat16,\r\n        bnb_4bit_use_double_quant=True,\r\n        bnb_4bit_quant_type=\"nf4\",\r\n    ),\r\n    torch_dtype=torch.bfloat16,\r\n)\r\n\r\nmodel = prepare_model_for_kbit_training(model)\r\nconfig = LoraConfig(\r\n    r=64, \r\n    lora_alpha=16, \r\n    target_modules =\r\n        ['q_proj', \r\n        'k_proj', \r\n        'down_proj', \r\n        'v_proj', \r\n        'gate_proj', \r\n        'o_proj', \r\n        'up_proj'],\r\n    lora_dropout=0.1, \r\n    bias=\"none\", \r\n    task_type=\"CAUSAL_LM\"\r\n)\r\nmodel = get_peft_model(model, config)\r\n\r\ntrain ...\r\n```\r\n\r\n**merge and save** \r\n```\r\nbase_model = AutoModelForCausalLM.from_pretrained(\r\n    \"models/Mistral-7B-v0.1\",\r\n    return_dict=True,\r\n    torch_dtype=torch.bfloat16,\r\n)\r\n\r\nmodel = PeftModel.from_pretrained(base_model, \"some-checkpoint\")\r\nmodel = model.merge_and_unload()\r\n\r\nmodel.save_pretrained(args.out, safe_serialization=True)\r\n```\r\n\r\nis this the proper way to do it? if yes/no, it would be nice to have this documented somwhere! \ud83e\udd17\r\n ",
    "url": "https://github.com/huggingface/peft/issues/1080",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-04T10:07:16Z",
    "updated_at": "2023-11-17T22:22:06Z",
    "user": "geronimi73"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 1801,
    "title": "Entire operation get cancelled when 1 file fails when using api.upload_folder - how to make it iterative",
    "body": "I am using below code. Uploaded like 80 GB file and the entire operation failed just because of 1 png failed to upload for some reason\r\n\r\nI see uploaded repo has 0 changes\r\n\r\nHow can I make it iterative? So after each file upload it is committed to the repo\r\n\r\nI don't need commit or file history. Just upload newer files and overwrite if newer\r\n\r\n```\r\nfrom huggingface_hub import HfApi\r\napi = HfApi()\r\n\r\n# Upload all the content from the local folder to your remote Space.\r\n# By default, files are uploaded at the root of the repo\r\napi.upload_folder(\r\n    folder_path=\"/workspace/path\",\r\n    repo_id=\"username/repo\",\r\n    repo_type=\"model\",\r\n)\r\n```\r\n\r\n### Reproduction\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System info\r\n\r\n```shell\r\n- huggingface_hub version: 0.16.4\r\n- Platform: Linux-5.15.0-86-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.12\r\n- Running in iPython ?: No\r\n- Running in notebook ?: No\r\n- Running in Google Colab ?: No\r\n- Token path ?: /root/.cache/huggingface/token\r\n- Has saved token ?: True\r\n- Who am I ?: ME\r\n- Configured git credential helpers: \r\n- FastAI: N/A\r\n- Tensorflow: N/A\r\n- Torch: 2.0.1+cu118\r\n- Jinja2: 3.1.2\r\n- Graphviz: N/A\r\n- Pydot: N/A\r\n- Pillow: 9.5.0\r\n- hf_transfer: N/A\r\n- gradio: 3.41.2\r\n- tensorboard: N/A\r\n- numpy: 1.23.5\r\n- pydantic: 1.10.12\r\n- aiohttp: 3.8.5\r\n- ENDPOINT: https://huggingface.co\r\n- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub\r\n- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets\r\n- HF_TOKEN_PATH: /root/.cache/huggingface/token\r\n- HF_HUB_OFFLINE: False\r\n- HF_HUB_DISABLE_TELEMETRY: False\r\n- HF_HUB_DISABLE_PROGRESS_BARS: None\r\n- HF_HUB_DISABLE_SYMLINKS_WARNING: False\r\n- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False\r\n- HF_HUB_DISABLE_IMPLICIT_TOKEN: False\r\n- HF_HUB_ENABLE_HF_TRANSFER: False\r\n```\r\n",
    "url": "https://github.com/huggingface/huggingface_hub/issues/1801",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-11-04T00:20:00Z",
    "updated_at": "2023-11-26T09:09:35Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "pytorch/xla",
    "number": 5768,
    "title": "How to provide sharding annotation for MpDeviceLoader when data has different dimensions",
    "body": "## \u2753 Questions and Help\r\n\r\nLet's say my dataloader yields a dict when iterating over and the members of this dict has different dimensions\r\n```python\r\n{\r\n    \"input_ids\": shape = (batch, seq),\r\n    \"masks\": shape = (batch, seq, seq),\r\n}\r\n```\r\n\r\n`pl.MpDeviceLoader` appears to only able to provide one sharding annotation. I'm currently using it like this:\r\n```python\r\ndata_loader = pl.MpDeviceLoader(\r\n    data_loader,\r\n    dev,\r\n    input_sharding=xs.ShardingSpec(mesh, ('data', None, None)))\r\n```\r\nObviously, ('data', None, None) is not valid for `input_ids` which has only 2 dimensions. But this seems to work. I wonder what's the proper way of using `MpDeviceLoader` in this case. ",
    "url": "https://github.com/pytorch/xla/issues/5768",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2023-11-03T20:43:19Z",
    "updated_at": "2025-04-28T12:30:11Z",
    "user": "hanzhi713"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 112876,
    "title": "How to handle CVE vulnerabilities in underlying operating system?",
    "body": "Hello,\r\n\r\nThe base images for Cuda are pretty old (2.1.0-cuda11.8 was pushed more than a month ago) how should we act to get latest security updates from the Ubuntu base image?",
    "url": "https://github.com/pytorch/pytorch/issues/112876",
    "state": "open",
    "labels": [
      "triaged",
      "module: docker",
      "security"
    ],
    "created_at": "2023-11-03T17:32:14Z",
    "updated_at": "2023-11-06T22:34:04Z",
    "user": "bjorn-ali-goransson"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 378,
    "title": "Security issue - content security policy - script unsafe-eval",
    "body": "Context:\r\nI use @xenova/transformers 2.6.2 npm package from a web application to do image classifcations. Here is the gist of my setup:\r\n\r\n```js\r\nconst modelPath = 'own-domain/models-and-wasm/'\r\n\r\nenv.localModelPath = \"/\";\r\nenv.useBrowserCache = true;\r\nenv.backends.onnx.wasm.wasmPaths = modelPath;\r\n\r\nconst classifier = await pipeline(\"image-classification\", modelPath, { quantized: true });\r\nconst output = await classifier(imagePath, { topk: 5 });\r\n```\r\n\r\nEverything works code-wise but when I remove unsafe-inline in CSP, it fails with this warning in the browser console:\r\n\r\n```js\r\nFailed to asynchronously prepare wasm: \r\nCompileError: WebAssembly.instantiate(): Refused to compile or instantiate WebAssembly module because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive\r\n```\r\n\r\nI **cannot** allow script-src: unsafe-eval in my web application (corporate rules). Do I have any alternatives? ",
    "url": "https://github.com/huggingface/transformers.js/issues/378",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-03T13:50:30Z",
    "updated_at": "2023-11-06T13:44:57Z",
    "user": "stiano"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5643,
    "title": "How to use the ip adapter controlnet?",
    "body": "Hi, I can't use this specific controlnet because it's from here: https://huggingface.co/lllyasviel/sd_control_collection/tree/main\r\n\r\nand the format doesn't allow from_pretrained. When I use from_single_file, I get:\r\n```\r\n\r\nstable_diffusion/convert_from_ckpt.py\", line 422, in convert_ldm_unet_checkpoint\r\n    new_checkpoint[\"time_embedding.linear_1.weight\"] = unet_state_dict[\"time_embed.0.weight\"]\r\nKeyError: 'time_embed.0.weight'\r\n```\r\nI used this to get the error:\r\n`ControlNetModel.from_single_file(\"./ip-adapter_sd15_plus.pth\", torch_dtype=torch.float32,local_files_only=True).to('cuda')`\r\n\r\na similar error was raised and the response was: \"just don't use from_single_file\" https://github.com/huggingface/diffusers/issues/5577",
    "url": "https://github.com/huggingface/diffusers/issues/5643",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-03T13:34:44Z",
    "updated_at": "2023-11-13T15:12:29Z",
    "user": "alexblattner"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2050,
    "title": "Should we support video datasets?",
    "body": "Like https://huggingface.co/datasets/commaai/commavq\r\n\r\nThere was a previous intent in datasets: https://github.com/huggingface/datasets/pull/5339",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2050",
    "state": "closed",
    "labels": [
      "question",
      "feature request"
    ],
    "created_at": "2023-11-03T13:33:00Z",
    "updated_at": "2023-12-11T15:04:08Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/distil-whisper",
    "number": 16,
    "title": "How to use ONNX model?",
    "body": "Hello there,\r\n\r\nI'm interested in using the ONNX model, as I saw that you are providing the weights for it.\r\nI tried to use it with `optimum` library, but didn't manage to make it work.\r\nCould someone indicate in which direction I should look into?\r\n\r\nThank you so much for this repository and the work you put into it. It really helps!!\r\n\r\n### Note:\r\n\r\n here is what I tried\r\n\r\n```\r\nfrom transformers import AutoModelForSpeechSeq2Seq, AutoProcessor\r\nimport torch\r\nfrom optimum.onnxruntime import ORTModelForSpeechSeq2Seq\r\n\r\ndevice = \"cuda:0\" if torch.cuda.is_available() else \"cpu\"\r\ntorch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32\r\n\r\nmodel_id = \"distil-whisper/distil-large-v2\"\r\n\r\nmodel = ORTModelForSpeechSeq2Seq.from_pretrained(\r\n    model_id, torch_dtype=torch_dtype,  encoder_file_name=f\"encoder_model.onnx\"\r\n)\r\n```\r\n\r\nHere is the error:\r\n```\r\nRuntimeError: Too many ONNX model files were found in distil-whisper/distil-large-v2, specify which one to load by using the encoder_file_name argument.\r\n```",
    "url": "https://github.com/huggingface/distil-whisper/issues/16",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-03T11:51:44Z",
    "updated_at": "2023-11-07T07:36:50Z",
    "user": "H-G-11"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2049,
    "title": "Retry jobs that finish with `ClientConnection` error?",
    "body": "Maybe here: https://github.com/huggingface/datasets-server/blob/f311a9212aaa91dd0373e5c2d4f5da9b6bdabcb5/chart/env/prod.yaml#L209\r\n\r\nInternal conversation on Slack: https://huggingface.slack.com/archives/C0311GZ7R6K/p1698224875005729\r\n\r\nAnyway: I'm wondering if we can have the error now that the dataset scripts are disabled by default.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2049",
    "state": "closed",
    "labels": [
      "question",
      "improvement / optimization",
      "P2"
    ],
    "created_at": "2023-11-03T11:28:19Z",
    "updated_at": "2024-02-06T17:29:45Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 377,
    "title": "GPU Acceleration to increase performance",
    "body": "Do we have any option to use GPU to increase performance of model loading and detection?\r\nAs currently in Object Detection it's taking around 10 seconds. If we want to do this on GPU, can we do that?\r\n\r\nRunning below lines through web worker, increases overall UI experience but not increases any performance.\r\n```\r\nconst model = await pipeline(\"object-detection\", \"Xenova/detr-resnet-50\");\r\nconst result = await model(img, { threshold: 0.9 });\r\n```\r\n\r\nCan we use GPU for that?",
    "url": "https://github.com/huggingface/transformers.js/issues/377",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-11-03T07:44:05Z",
    "updated_at": "2024-10-18T13:30:08Z",
    "user": "milind-yadav"
  },
  {
    "repo": "pytorch/serve",
    "number": 2766,
    "title": "How to auto-scale model replicas in a single GPU based EC2 instance based on number-of-requests-in-queue ?",
    "body": "Hi team, I mainly had 1 question and 1 observation:\r\n---\r\n\r\n### **Question:**\r\n\r\n- **I was not able to locate any resource explaining ways to auto-scale ML model in torch-serve on single GPU instance.** \r\n- I did had a look at the model configuration documentation which explained the 2 parameters: min-workers and max-worker where each worker will have 1 model loaded.  I also had a look at this issue: https://github.com/pytorch/serve/issues/714  where **ts_queue_latency_microseconds** flag was explained to auto-scale in a Kubernetes cluster. \r\n\r\n#### **_But what I need is:_** \r\n\r\n> A way to load more replicas of the model in the same instance based on certain conditions like: number-of-requests-in-queue or something similar.\r\n\r\n> **Assumption**: There is sufficient amount of GPU memory remaining and GPU utilization is not 100%\r\n\r\n---\r\n\r\n### **Observation:** The Problem I faced: \r\n\r\n- I hosted the simple **MNIST classifier example** provided in torch-serve tutorials on a **T4 GPU (G4dn EC2 Instance**) and load tested it using the **Locust Application**\r\n- I had set the max-workers to 2 and min-workers to 1. The batch-size was set to 1. \r\n- With the help of Locust Application, I gradually sent 1000 requests per sec to the model server. \r\n- I observed the GPU and CPU memory and compute utilization:\r\n          - GPU memory utilization was less than 3% because the ML model is very small. The compute utilization was also less than 5%. \r\n          - Even CPU memory and compute was not utilized at max (was higher than GPU but less than 20% of total availability) \r\n- **Problem**: \r\n          - **The model server did not process all the requests. At any given point, it only responded to ~700-750 requests and the remaining requests were discarded/dropped** \r\n          - I dont think the model got replicated as 2nd worker because the GPU memory and compute utilization was very small. \r\n---\r\n\r\nPlease let me know if there are any good resources to refer and how to auto-scale based on **ts_queue_latency_microseconds** flag in a single GPU instance. ",
    "url": "https://github.com/pytorch/serve/issues/2766",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2023-11-02T16:03:49Z",
    "updated_at": "2023-11-26T18:39:03Z",
    "user": "yogendra-yatnalkar"
  },
  {
    "repo": "pytorch/serve",
    "number": 2765,
    "title": "How to auto-scale model replicas in a single GPU based EC2 instance based on time_of_request_in_queue ",
    "body": "",
    "url": "https://github.com/pytorch/serve/issues/2765",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-02T15:39:16Z",
    "updated_at": "2023-11-02T17:46:34Z",
    "user": "yogendra-yatnalkar"
  },
  {
    "repo": "huggingface/distil-whisper",
    "number": 11,
    "title": "[Speculative Decoding] How to run speculative decoding for batch_size > 1? ",
    "body": "Transformers 4.35 only supports speculative decoding for batch size == 1. In order to use speculative decoding for batch size > 1, please make sure to use this branch: https://github.com/huggingface/transformers/pull/26875\r\n\r\nTo do so, you need to install transformers as follows:\r\n\r\n```\r\npip install git+https://github.com/huggingface/transformers.git@assistant_decoding_batch\r\n```\r\n\r\nand then you can run:\r\n\r\n```py\r\nfrom transformers import pipeline, AutoModelForCausalLM, AutoModelForSpeechSeq2Seq, AutoProcessor\r\nimport torch\r\nfrom datasets import load_dataset\r\n\r\ndevice = \"cuda:0\" if torch.cuda.is_available() else \"cpu\"\r\ntorch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32\r\n\r\nassistant_model_id = \"distil-whisper/distil-large-v2\"\r\n\r\nassistant_model = AutoModelForCausalLM.from_pretrained(\r\n    assistant_model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True\r\n)\r\nassistant_model.to(device)\r\n\r\nmodel_id = \"openai/whisper-large-v2\"\r\n\r\nmodel = AutoModelForSpeechSeq2Seq.from_pretrained(\r\n    model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True\r\n)\r\nmodel.to(device)\r\n\r\nprocessor = AutoProcessor.from_pretrained(model_id)\r\n\r\npipe = pipeline(\r\n    \"automatic-speech-recognition\",\r\n    model=model,\r\n    tokenizer=processor.tokenizer,\r\n    feature_extractor=processor.feature_extractor,\r\n    max_new_tokens=128,\r\n    generate_kwargs={\"assistant_model\": assistant_model},\r\n    torch_dtype=torch_dtype,\r\n    chunk_length_s=15,\r\n    batch_size=4,\r\n    device=device,\r\n)\r\n\r\ndataset = load_dataset(\"distil-whisper/librispeech_long\", \"default\", split=\"validation\")\r\nsample = dataset[0][\"audio\"]\r\n\r\nresult = pipe(sample)\r\nprint(result[\"text\"])\r\n```\r\n\r\nThe PR will be merged to Transformers soon.\r\n\r\n**Note**: Given the \"speculative\" nature of assistant decoding (*a.k.a* speculative decoding), it is not recommended to make use of speculative decoding for batch sizes higher than 4 as this might actually lead to the transcription pipeline being slower compared to just using the teacher model. \r\nConfer with Table 22 of [the paper](https://arxiv.org/pdf/2311.00430.pdf).",
    "url": "https://github.com/huggingface/distil-whisper/issues/11",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-02T14:19:55Z",
    "updated_at": "2024-10-03T13:12:22Z",
    "user": "patrickvonplaten"
  },
  {
    "repo": "pytorch/vision",
    "number": 8090,
    "title": "to_pil_image different results depending on numpy/torch input",
    "body": "### \ud83d\udc1b Describe the bug\n\nto_pil_image has different behaviour depending on torch or numpy input. This is not documented as far as I can see. There is a note that numpy is expected to be HWC, whereas torch is expected to be CHW, but that's not relevant here.\r\n\r\n```python\r\nimport torch\r\nfrom torchvision.transforms.functional import to_pil_image\r\na = torch.rand((100, 101))\r\nprint(to_pil_image(a).mode)\r\n# L\r\nprint(to_pil_image(a.numpy()).mode)\r\n# F\r\n```\r\nThis is not documented, nor is there any warning, so errors due to this are hard to track down. The problematic code is this section:\r\n```python\r\n    if isinstance(pic, torch.Tensor):\r\n        if pic.is_floating_point() and mode != \"F\":\r\n            pic = pic.mul(255).byte()\r\n```\r\nin which the torch.tensor is rescaled. Can we mirror functionality for numpy arrays? `(pic * 255).round().astype(np.uint8)`\n\n### Versions\n\nall versions",
    "url": "https://github.com/pytorch/vision/issues/8090",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-02T12:46:29Z",
    "updated_at": "2023-11-08T08:51:45Z",
    "comments": 5,
    "user": "rb-synth"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 542,
    "title": "Request: more clarity on JSON response from custom models",
    "body": "Note: duplicate from https://huggingface.co/spaces/huggingchat/chat-ui/discussions/309, not sure which is the proper place to post.\r\n\r\nI followed the guide chat-ui to deploy a version in gcp, and I love the chat interface.\r\n\r\nI would love to hook it up to one of my custom models, so I specified\r\n```\r\n\"endpoints\": [{\"url\": \"[http://127.0.0.1:8000\"}]](http://127.0.0.1:8000\"%7D%5D/)\r\n}\r\n]`\r\n\r\n```\r\nfor MODELS as suggested.\r\n\r\nI receive the message that has been posted in the web interface at my endpoint, but I am unable to send back the proper json response. So far, in python, I do:\r\n```\r\nresponse_content = [\r\n{\r\n\"generated_text\": \"Please show this response.\"\r\n}\r\n]\r\nresponse = make_response(jsonify(response_content))\r\nreturn response\r\n```\r\n\r\nIt is received in the chat-ui code (confirmed by injecting console.log statements), but it doesn't show in the browser conversation.\r\n\r\nCan someone please clarify what json (content, headers, whatever is needed) I need to send from my custom model endpoint as a response to the chat-ui interface? Or if this is the wrong place to ask, tell me where I should ask?",
    "url": "https://github.com/huggingface/chat-ui/issues/542",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2023-11-02T10:31:53Z",
    "updated_at": "2023-11-03T19:44:02Z",
    "comments": 1,
    "user": "thubreg"
  },
  {
    "repo": "huggingface/distil-whisper",
    "number": 8,
    "title": "Where is the model?",
    "body": "Link to HF leads to empty files section.",
    "url": "https://github.com/huggingface/distil-whisper/issues/8",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-02T08:47:23Z",
    "updated_at": "2023-11-02T17:31:08Z",
    "user": "lkmdhertg"
  },
  {
    "repo": "pytorch/xla",
    "number": 5762,
    "title": "how to use torch-xla with huggingface transformers",
    "body": "## \u2753 Questions and Help\r\nI am fine-tuning the model provided by huggingface,  modify a model from pytorch to torch-xla and run it. but it will freeze when running. Is there something wrong here?\r\n\r\ndataset as follows:\r\nhttps://github.com/zyds/transformers-code/blob/master/01-Getting%20Started/04-model/ChnSentiCorp_htl_all.csv\r\n\r\npytorch code as follows:\r\n```\r\nimport pandas as pd\r\n\r\nfrom transformers import AutoTokenizer, AutoModelForSequenceClassification\r\nimport torch\r\nfrom torch.optim import Adam\r\nfrom torch.utils.data import Dataset\r\nfrom torch.utils.data import random_split\r\nfrom torch.utils.data import DataLoader\r\n\r\nclass MyDataset(Dataset):\r\n\r\n    def __init__(self, data_path) -> None:\r\n        super().__init__()\r\n        self.data = pd.read_csv(data_path)\r\n        self.data = self.data.dropna()\r\n\r\n    def __getitem__(self, index):\r\n        return self.data.iloc[index][\"review\"], self.data.iloc[index][\"label\"]\r\n\r\n    def __len__(self):\r\n        return len(self.data)\r\n\r\nif __name__ == \"__main__\":\r\n    dataset = MyDataset('./ChnSentiCorp_htl_all.csv')\r\n    trainset, validset = random_split(dataset, lengths=[0.9, 0.1])\r\n\r\n    tokenizer = AutoTokenizer.from_pretrained(\"rbt3\")\r\n\r\n    def collate_func(batch):\r\n        texts, labels = [], []\r\n        for item in batch:\r\n            texts.append(item[0])\r\n            labels.append(item[1])\r\n        inputs = tokenizer(texts, max_length=128, padding=\"max_length\", truncation=True, return_tensors=\"pt\")\r\n        inputs[\"labels\"] = torch.tensor(labels)\r\n        return inputs\r\n\r\n    trainloader = DataLoader(trainset, batch_size=32, shuffle=True, collate_fn=collate_func)\r\n    validloader = DataLoader(validset, batch_size=64, shuffle=False, collate_fn=collate_func)\r\n\r\n    model = AutoModelForSequenceClassification.from_pretrained(\"./rbt3/\")\r\n\r\n    if torch.cuda.is_available():\r\n        model = model.cuda()\r\n    optimizer = Adam(model.parameters(), lr=2e-5)\r\n    def evaluate():\r\n        model.eval()\r\n        acc_num = 0\r\n        with torch.inference_mode():\r\n            for batch in validloader:\r\n                if torch.cuda.is_available():\r\n                    batch = {k: v.cuda() for k, v in batch.items()}\r\n                output = model(**batch)\r\n                pred = torch.argmax(output.logits, dim=-1)\r\n                acc_num += (pred.long() == batch[\"labels\"].long()).float().sum()\r\n        return acc_num / len(validset)\r\n\r\n    def train(epoch=3, log_step=100):\r\n        global_step = 0\r\n        for ep in range(epoch):\r\n            model.train()\r\n            for batch in trainloader:\r\n                if torch.cuda.is_available():\r\n                    batch = {k: v.cuda() for k, v in batch.items()}\r\n                optimizer.zero_grad()\r\n                output = model(**batch)\r\n                output.loss.backward()\r\n                optimizer.step()\r\n                if global_step % log_step == 0:\r\n                    print(f\"ep: {ep}, global_step: {global_step}, loss: {output.loss.item()}\")\r\n                global_step += 1\r\n            acc = evaluate()\r\n            print(f\"ep: {ep}, acc: {acc}\")\r\n    train()\r\n```\r\n\r\nmodel by torch-xla as follows, run cmd is 'PJRT_DEVICE=CUDA  python classification_demo_xla.py'\r\n```\r\nimport pandas as pd\r\nfrom transformers import AutoTokenizer, AutoModelForSequenceClassification\r\n\r\nimport torch\r\nfrom torch.optim import Adam\r\nfrom torch.utils.data import Dataset\r\nfrom torch.utils.data import random_split\r\nfrom torch.utils.data import DataLoader\r\nimport torch_xla\r\nfrom torch_xla import runtime as xr\r\nimport torch_xla.core.xla_model as xm\r\nimport torch_xla.distributed.xla_multiprocessing as xmp\r\nimport torch_xla.distributed.parallel_loader as pl\r\n\r\nclass MyDataset(Dataset):\r\n\r\n    def __init__(self, data_path) -> None:\r\n        super().__init__()\r\n        self.data = pd.read_csv(data_path)\r\n        self.data = self.data.dropna()\r\n\r\n    def __getitem__(self, index):\r\n        return self.data.iloc[index][\"review\"], self.data.iloc[index][\"label\"]\r\n\r\n    def __len__(self):\r\n        return len(self.data)\r\n\r\nif __name__ == \"__main__\":\r\n    dataset = MyDataset('./ChnSentiCorp_htl_all.csv')\r\n    trainset, validset = random_split(dataset, lengths=[0.9, 0.1])\r\n\r\n    tokenizer = AutoTokenizer.from_pretrained(\"rbt3\")\r\n\r\n    def collate_func(batch):\r\n        texts, labels = [], []\r\n        for item in batch:\r\n            texts.append(item[0])\r\n            labels.append(item[1])\r\n        inputs = tokenizer(texts, max_length=128, padding=\"max_length\", truncation=True, return_tensors=\"pt\")\r\n        inputs[\"labels\"] = torch.tensor(labels)\r\n        return inputs\r\n\r\n    train_loader = DataLoader(trainset, batch_size=32, shuffle=True, collate_fn=collate_func)\r\n    valid_loader = DataLoader(validset, batch_size=64, shuffle=False, collate_fn=collate_func)\r\n\r\n    model = AutoModelForSequenceClassification.from_pretrained(\"./rbt3/\")\r\n\r\n    device = xm.xla_device()\r\n    model = model.to(device)\r\n    print('model device:', model.device)\r\n\r\n    optimizer = Ada",
    "url": "https://github.com/pytorch/xla/issues/5762",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-02T08:43:46Z",
    "updated_at": "2023-11-03T01:34:51Z",
    "user": "markc-614"
  },
  {
    "repo": "huggingface/candle",
    "number": 1241,
    "title": "How to reduce memory usage of backpropagation?",
    "body": "I implemented the [tiny NeRF example](https://github.com/bmild/nerf/blob/master/tiny_nerf.ipynb) using `candle` here: https://github.com/laptou/nerfy/blob/fc50dbd61c4012d1f12f556a72474b59a8b3c158/examples/tiny_nerf.rs\r\n\r\nThe example, which is written using TensorFlow, runs fine on my laptop. My `candle` implementation consumes all available memory on my laptop, which crashes my desktop session if I use CPU and errors out with a CUDA memory allocation error if I use the GPU. I'm running on a laptop with 32 GB of RAM, 32 GB of swap, and an RTX A3000 w/ 12 GB of VRAM. \r\n\r\nI'm barely able to run it on CPU if I decrease the hidden layer size from 256 to 64.\r\n\r\n![image](https://github.com/huggingface/candle/assets/14832331/683d4361-9ccb-4f04-939e-67e0f3ba0414)\r\n\r\nI tracked the memory allocations using `heaptrack`, and it seems like most of them are related to keeping track of the operations for backpropagation. \r\n\r\nCan you spot any obvious issues in my implementation that are causing it to consume so much memory? Is there a way that I can disable or reduce this behavior in some parts of the code to reduce the amount of memory that it uses?",
    "url": "https://github.com/huggingface/candle/issues/1241",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-02T03:38:32Z",
    "updated_at": "2025-09-10T05:14:01Z",
    "user": "laptou"
  },
  {
    "repo": "huggingface/candle",
    "number": 1240,
    "title": "Demo showing how to load in candle computer vision model using webcam",
    "body": "```\r\nuse anyhow::Result; // Automatically handle the error types\r\nuse opencv::{\r\n    prelude::*,\r\n    videoio,\r\n    highgui\r\n}; // Note, the namespace of OpenCV is changed (to better or worse). It is no longer one enormous.\r\nfn main() -> Result<()> { // Note, this is anyhow::Result\r\n    // Open a GUI window\r\n    highgui::named_window(\"window\", highgui::WINDOW_FULLSCREEN)?;\r\n    // Open the web-camera (assuming you have one)\r\n    let mut cam = videoio::VideoCapture::new(0, videoio::CAP_ANY)?;\r\n    let mut frame = Mat::default(); // This array will store the web-cam data\r\n    // Read the camera\r\n    // and display in the window\r\n    loop {\r\n        cam.read(&mut frame)?;\r\n        highgui::imshow(\"window\", &frame)?;\r\n        let key = highgui::wait_key(1)?;\r\n        if key == 113 { // quit with q\r\n            break;\r\n        }\r\n    }\r\n    Ok(())\r\n\r\n\r\n\r\n}\r\n\r\n```\r\n\r\nHere is a basic example of opening Qt using Opencv-rust.\r\nIt would be great to have a working example using this alongside candle!\r\nOpen to submitting this as a pr in any of the example folders.",
    "url": "https://github.com/huggingface/candle/issues/1240",
    "state": "open",
    "labels": [],
    "created_at": "2023-11-02T03:38:19Z",
    "updated_at": "2023-11-02T06:24:11Z",
    "user": "bazylhorsey"
  },
  {
    "repo": "huggingface/candle",
    "number": 1239,
    "title": "How inference on a new model, have to hand written model.rs manually?",
    "body": "Just wonder if there scripts convert a pth or onnx to candle format maybe?",
    "url": "https://github.com/huggingface/candle/issues/1239",
    "state": "closed",
    "labels": [],
    "created_at": "2023-11-02T03:32:11Z",
    "updated_at": "2023-11-02T07:03:54Z",
    "user": "lucasjinreal"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 375,
    "title": "How do I load the tensors in Rust? ",
    "body": "Hi, \r\n\r\nI am unable to find good documentation to read the weights in rust. I want to write gpt2 from scratch, and want to be able to load the HF weights. Since, I only plan to use the ndarray library, I want to be able to load the FP32 tensors somehow. Please help. \r\n\r\nIn python I do:\r\n```python\r\n# Load model directly\r\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\r\nimport safetensors\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(\"gpt2\")\r\nmodel = AutoModelForCausalLM.from_pretrained(\"gpt2\")\r\nsafetensors.torch.save_model(model, 'gpt2_weights.st')\r\n```\r\n\r\nI want to use some code like this in rust (which is currently incorrect because safetensors doesn't have a Reader) and I am unable to figure out the API.\r\n```rust\r\nuse safetensors::Reader;\r\nuse std::error::Error;\r\n\r\nfn main() -> Result<(), Box<dyn Error>> {\r\n    let reader = Reader::from_file(\"gpt2_weights.st\")?;\r\n\r\n    for (name, tensor) in reader.tensors() {\r\n        println!(\"Tensor name: {}\", name);\r\n        let tensor = tensor?;\r\n        println!(\"Shape: {:?}\", tensor.shape());        \r\n    }\r\n\r\n    Ok(())\r\n}\r\n```",
    "url": "https://github.com/huggingface/safetensors/issues/375",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-11-02T02:11:11Z",
    "updated_at": "2024-01-02T01:48:31Z",
    "comments": 5,
    "user": "arunpatro"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 374,
    "title": "safetensor.*.save_file the parameter name to set the incoming tensors change from \"tensors\" to \"tensor_dict\"",
    "body": "### Feature request\r\n\r\nIn Jax, torch, and paddle is:\r\n\r\n> tensors (Dict[str, torch.Tensor]) \u2014 The incoming tensors. Tensors need to be contiguous and dense.\r\n\r\nCheck:  https://huggingface.co/docs/safetensors/api/torch#safetensors.torch.save\r\n\r\nIn Numpy:\r\n\r\n> tensor_dict (Dict[str, np.ndarray]) \u2014 The incoming tensors. Tensors need to be contiguous and dense.\r\n\r\nCheck: https://huggingface.co/docs/safetensors/api/numpy#safetensors.numpy.save_file\r\n\r\nIs there a reason to change the name between frameworks?\r\n\r\n### Motivation\r\n\r\nImprove the documentation.\r\n\r\n### Your contribution\r\n\r\nI can submit a PR if that helps!",
    "url": "https://github.com/huggingface/safetensors/issues/374",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-11-02T00:41:14Z",
    "updated_at": "2024-01-02T01:48:32Z",
    "comments": 2,
    "user": "csaybar"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 373,
    "title": "Stream load models (load model larger than system memory)",
    "body": "### Feature request\r\n\r\nI'm not very familiar with the details, but I'd like to load a 20GB model while having only 8 GB system memory.\r\n\r\nCurrently, safetensors loads the entire model into system memory.\r\nIs it possible to load models incrementally/as a stream?\r\n\r\nRelated:\r\nhttps://github.com/turboderp/exllama/issues/245\r\nhttps://github.com/huggingface/safetensors/issues/67\r\n\r\nPossibly related (writing is different from reading):\r\nhttps://github.com/huggingface/safetensors/issues/291\r\n\r\n### Motivation\r\n\r\nUsing swap requires unnecessary wear on SSDs. And it's silly to read a model from disk, just to write it back to disk as a swap, and then read it again from disk.\r\n\r\nAlternatively, the model should be saved in a format that can be streamed directly to memory?\r\n\r\nSimilarly, it's silly to require X amount of system memory to be available for just a few seconds while loading a large model.\r\n\r\n### Your contribution\r\n\r\nUnqualified to contribute.",
    "url": "https://github.com/huggingface/safetensors/issues/373",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-11-01T16:14:18Z",
    "updated_at": "2024-01-03T01:48:07Z",
    "comments": 6,
    "user": "erikschul"
  },
  {
    "repo": "huggingface/text-embeddings-inference",
    "number": 59,
    "title": "how to resolve this compile error?",
    "body": "### System Info\n\ncargo 1.73.0 (9c4383fb5 2023-08-26)\r\ngcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)\r\ncuda 11.8\r\nv100\r\n\r\n\r\n```\r\n\"-Wl,-Bdynamic\" \"-llayernorm\" \"-lcudart\" \"-lstdc++\" \"-lcuda\" \"-lnvrtc\" \"-lcurand\" \"-lcublas\" \"-lcublasLt\" \"-lssl\" \"-lcrypto\" \"-lgcc_s\" \"-lutil\" \"-lrt\" \"-lpthread\" \"-lm\" \"-ldl\" \"-lc\" \"-Wl,--eh-frame-hdr\" \"-Wl,-z,noexecstack\" \"-L\" \"/home/luoweichao/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib\" \"-o\" \"/home/luoweichao/text-embeddings-inference/target/release/deps/text_embeddings_router-0345b2604448f561\" \"-Wl,--gc-sections\" \"-pie\" \"-Wl,-z,relro,-z,now\" \"-Wl,-O1\" \"-nodefaultlibs\"\r\n  = note: /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: /home/luoweichao/text-embeddings-inference/target/release/build/candle-layer-norm-3b4dbfa3d047ac72/out/liblayernorm.a(ln_api.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC\r\n          /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: final link failed: nonrepresentable section on output\r\n          collect2: error: ld returned 1 exit status\r\n          \r\n\r\nerror: could not compile `text-embeddings-router` (bin \"text-embeddings-router\") due to previous error\r\nerror: failed to compile `text-embeddings-router v0.3.0 (/home/luoweichao/text-embeddings-inference/router)`, intermediate artifacts can be found at `/home/luoweichao/text-embeddings-inference/target`.\r\n```\n\n### Information\n\n- [ ] Docker\n- [X] The CLI directly\n\n### Tasks\n\n- [ ] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\ncargo install --path router -F candle-cuda-volta --no-default-features\n\n### Expected behavior\n\nbuild successfully!",
    "url": "https://github.com/huggingface/text-embeddings-inference/issues/59",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-31T11:35:02Z",
    "updated_at": "2023-11-02T07:52:18Z",
    "user": "kingder"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2630,
    "title": "\ud83d\udca1 [REQUEST] - <title>An inbuilt function to retrieve a list of datasets categorised by problem type (e.g., classification, regression, clustering).",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nPyTorch has inbuilt function to list all datasets.\r\n\r\n`import torchvision.datasets as datasets\r\n\r\n//Get a list of all datasets\r\nall_datasets = datasets.__all__\r\n\r\n//Print the list of datasets\r\nprint(all_datasets)\r\n`\r\nRather than focusing on getting all the dataset, we can include a parameter. Parameter will take the type of task person wants to do e.g Clustering, Regression, Classification. After putting parameter all the related dataset according to task will be shown.\r\n\r\n\r\n\r\nOverall, a built-in function to retrieve a list of datasets categorised by problem type would be a valuable addition to PyTorch. It would make it easier for users to find, discover, use, and share datasets.\r\n\r\n### Existing tutorials on this topic\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_\r\n```[tasklist]\r\n### Tasks\r\n```\r\n\r\n```[tasklist]\r\n### Tasks\r\n- [ ] Add a draft title or issue reference here\r\n```\r\n\r\n```[tasklist]\r\n### Tasks\r\n```\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/2630",
    "state": "open",
    "labels": [],
    "created_at": "2023-10-31T09:08:51Z",
    "updated_at": "2023-11-01T16:06:56Z",
    "comments": 1,
    "user": "xd932"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1497,
    "title": "about LCM onnx model",
    "body": "Hi!\r\n\r\ncan someone please tell how we can use the LCM model in onnx? i see u guys made an script to run it in onnx, but what about the model? can we simply use the normal stable diffusion script onnx conversation for lcm model too? or we have to wait someone make an conversation script?\r\n\r\nor could someone upload onnx converted of LCM model on huggingface and share it with us please?\r\n\r\nkind regards\r\n\r\n\r\n\r\n### Who can help?\r\n\r\n@echarlaix \r\n\r\n",
    "url": "https://github.com/huggingface/optimum/issues/1497",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-10-31T08:57:16Z",
    "updated_at": "2024-01-04T14:21:54Z",
    "comments": 6,
    "user": "Amin456789"
  },
  {
    "repo": "pytorch/executorch",
    "number": 1117,
    "title": "[build Error initializing DaemonStateData] how to fix it",
    "body": "hi,\r\n\r\nI reference [the tutorial](https://pytorch.org/executorch/stable/getting-started-setup.html#building-a-runtime) to install the buck2-x86_64-unknown-linux-musl.zst on my PC.\r\nAnd I want to build \r\n```\r\n/tmp/buck2 build //examples/portable/executor_runner:executor_runner --show-output\r\n```\r\nand face the build failed.\r\n\r\nAnd I try to use `killall` reference from https://stackoverflow.com/questions/76771689/buck2-cant-create-inotify-watchers\r\nand try build again.\r\nBut it is still build failed. Could somebody help me?\r\n\r\n![Screenshot from 2023-10-31 13-44-29](https://github.com/pytorch/executorch/assets/87454575/ac9e9225-c7b8-4924-8a55-a474c0e4e49a)\r\n\r\nOS: Linux Ubuntu 20.04.4 LTS x86_64 \r\nbuck2 version: 2023-07-18\r\n\r\nThanks,\r\nKris",
    "url": "https://github.com/pytorch/executorch/issues/1117",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-31T05:49:12Z",
    "updated_at": "2024-01-23T10:08:57Z",
    "user": "kris-himax"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 112454,
    "title": "Inductor chooses too large of a block size in cases where the `YBLOCK` dimension is too large.",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\n```python\r\nimport torch\r\n\r\ntorch.set_default_device('cuda')\r\n\r\n@torch.compile\r\ndef f(x, y):\r\n    return x.t() + y\r\n\r\nf(torch.randn(2**25, 128), torch.randn(128, 2**25))\r\n```\r\n\r\nThe concrete issue is that this results in us potentially choosing a config like `XBLOCK=256, YBLOCK=512`, which requires too much shared memory.\r\n\r\nThe reason we end up in this situation is: https://github.com/pytorch/pytorch/blob/main/torch/_inductor/triton_heuristics.py#L810\r\n\r\nBasically, because we are limited to launching 65536 blocks on the second/third dim, `triton_config` will elect to scale up `YBLOCK` until we \"fit\" within the limit.\r\n\r\nIn this case, we start with a config like `XBLOCK=256, YBLOCK=32`, but we end up scaling `YBLOCK` to 512.\r\n\r\nPossible solutions are:\r\n1. Stop launching 2d configs, and just flatten it down to one axis of threadblocks.\r\n2. Choose the XBLOCK axis to be the \"large\" one.\r\n3. Scale down XBLOCK if `XBLOCK * RBLOCK` is too large.\n\ncc @ezyang @msaroufim @wconstab @bdhirsh @anijain2305 @zou3519 @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler",
    "url": "https://github.com/pytorch/pytorch/issues/112454",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: inductor"
    ],
    "created_at": "2023-10-31T00:18:12Z",
    "updated_at": "2023-11-07T01:48:02Z",
    "user": "Chillee"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2038,
    "title": "How to pass single quote in /filter endpoint \"where\" parameter?",
    "body": "See `https://huggingface.co/datasets/albertvillanova/lm_en_dummy2/viewer/default/train?f[meta][value]='{'file': 'file_4.txt'}'`\r\n\r\nFrom `https://datasets-server.huggingface.co/filter?dataset=albertvillanova/lm_en_dummy2&config=default&split=train&where=meta='{'file': 'file_4.txt'}'`, we get:\r\n\r\n```\r\n{\"error\":\"Parameter 'where' is invalid\"}\r\n```\r\n\r\nWe want to search he value `{'file': 'file_4.txt'}` in the column `meta`\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2038",
    "state": "closed",
    "labels": [
      "bug",
      "documentation",
      "P1"
    ],
    "created_at": "2023-10-30T22:21:24Z",
    "updated_at": "2023-11-02T17:22:54Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6364,
    "title": "ArrowNotImplementedError: Unsupported cast from string to list using function cast_list",
    "body": "Hi,\r\n\r\nI am trying to load a local csv dataset(similar to explodinggradients_fiqa) using load_dataset. When I try to pass features, I am facing the mentioned issue.\r\n\r\nCSV Data sample(golden_dataset.csv):\r\nQuestion        |          Context                      |         answer      |        groundtruth\r\n\"what is abc?\"   | \"abc is this and that\"     |    \"abc is this \"  |    \"abc is this and that\"\r\n\r\n```\r\nimport csv \r\n\r\n# built it based on https://huggingface.co/datasets/explodinggradients/fiqa/viewer/ragas_eval?row=0\r\nmydict = [\r\n{'question' : \"what is abc?\", 'contexts': [\"abc is this and that\"], 'answer': \"abc is this \" , 'groundtruth':  [\"abc is this and that\"]},\r\n{'question' : \"what is abc?\", 'contexts': [\"abc is this and that\"], 'answer': \"abc is this \" , 'groundtruth':  [\"abc is this and that\"]},\r\n{'question' : \"what is abc?\", 'contexts': [\"abc is this and that\"], 'answer': \"abc is this \" , 'groundtruth':  [\"abc is this and that\"]}\r\n]\r\n         \r\nfields = ['question', 'contexts', 'answer', 'ground_truths'] \r\n\r\nwith open('golden_dataset.csv', 'w', newline='\\n') as file: \r\n    writer = csv.DictWriter(file, fieldnames = fields)\r\n    \r\n    writer.writeheader() \r\n    for row in mydict:\r\n        writer.writerow(row)\r\n```\r\n\r\nRetrieved dataset:\r\nDatasetDict({\r\n    train: Dataset({\r\n        features: ['question', 'contexts', 'answer', 'ground_truths'],\r\n        num_rows: 1\r\n    })\r\n})\r\n\r\n\r\nCode to reproduce issue:\r\n\r\n\r\n```\r\nfrom datasets import load_dataset, Features, Sequence, Value\r\n\r\nencode_features = Features(\r\n    {\r\n        \"question\": Value(dtype='string', id=0),\r\n        \"contexts\": Sequence(feature=Value(dtype='string', id=1)),\r\n        \"answer\": Value(dtype='string', id=2),\r\n        \"ground_truths\": Sequence(feature=Value(dtype='string',id=3)),\r\n    }\r\n)\r\n\r\neval_dataset = load_dataset('csv', data_files='/golden_dataset.csv', features = encode_features )\r\n```\r\n\r\n\r\nError trace:\r\n\r\n```\r\n---------------------------------------------------------------------------\r\nArrowNotImplementedError                  Traceback (most recent call last)\r\nFile ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1925, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)\r\n   1924 _time = time.time()\r\n-> 1925 for _, table in generator:\r\n   1926     if max_shard_size is not None and writer._num_bytes > max_shard_size:\r\n\r\nFile ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/packaged_modules/csv/csv.py:192, in Csv._generate_tables(self, files)\r\n    189         # Uncomment for debugging (will print the Arrow table size and elements)\r\n    190         # logger.warning(f\"pa_table: {pa_table} num rows: {pa_table.num_rows}\")\r\n    191         # logger.warning('\\n'.join(str(pa_table.slice(i, 1).to_pydict()) for i in range(pa_table.num_rows)))\r\n--> 192         yield (file_idx, batch_idx), self._cast_table(pa_table)\r\n    193 except ValueError as e:\r\n\r\nFile ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/packaged_modules/csv/csv.py:167, in Csv._cast_table(self, pa_table)\r\n    165 if all(not require_storage_cast(feature) for feature in self.config.features.values()):\r\n    166     # cheaper cast\r\n--> 167     pa_table = pa.Table.from_arrays([pa_table[field.name] for field in schema], schema=schema)\r\n    168 else:\r\n    169     # more expensive cast; allows str <-> int/float or str to Audio for example\r\n\r\nFile ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:3781, in pyarrow.lib.Table.from_arrays()\r\n\r\nFile ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:1449, in pyarrow.lib._sanitize_arrays()\r\n\r\nFile ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/array.pxi:354, in pyarrow.lib.asarray()\r\n\r\nFile ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:551, in pyarrow.lib.ChunkedArray.cast()\r\n\r\nFile ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/compute.py:400, in cast(arr, target_type, safe, options, memory_pool)\r\n    399         options = CastOptions.safe(target_type)\r\n--> 400 return call_function(\"cast\", [arr], options, memory_pool)\r\n\r\nFile ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/_compute.pyx:572, in pyarrow._compute.call_function()\r\n\r\nFile ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/_compute.pyx:367, in pyarrow._compute.Function.call()\r\n\r\nFile ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/error.pxi:144, in pyarrow.lib.pyarrow_internal_check_status()\r\n\r\nFile ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/error.pxi:121, in pyarrow.lib.check_status()\r\n\r\nArrowNotImplementedError: Unsupported cast from string to list using function cast_list\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nDatasetGenerationError                    Traceback (most recent call last)\r\nCell In[57], line 1\r\n----> 1 eval_dataset = load_dataset('csv', data_files='/golden_dataset.csv",
    "url": "https://github.com/huggingface/datasets/issues/6364",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-30T20:14:01Z",
    "updated_at": "2023-10-31T19:21:23Z",
    "comments": 2,
    "user": "divyakrishna-devisetty"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 112369,
    "title": "In the func Tensor.to, how can I make privateuse lazy init",
    "body": "### \ud83d\udc1b Describe the bug\n\nI\u2019m using privateuse1 to add our backend. My customer find the following code is working in cuda, but not working in my backend.\r\nUse `Tensor.to()` with device message which not has a index, for example \"cuda\". \r\n```\r\nimport torch\r\ntensor_a  = torch.rand(2).to(\"cuda\")\r\n```\r\nPrivateuse1 uses the same logic but fails.\r\n```\r\nimport torch\r\n# assumption my device is privateuseone\r\nimport torch_privateuseone\r\n\r\ntensor_a  = torch.rand(2).to(\"privateuseone\")\r\n```\r\nAbove code will fail with `impl->getDevice()` because of the lack of lazy_init for the privateuseone device.\r\nhttps://github.com/pytorch/pytorch/blob/bbd5b935e49a54578ac88cb23ca962ab896a8c7a/aten/src/ATen/native/TensorConversions.cpp#L210-L216\r\ncuda will init in `THPVariable_to`\r\nhttps://github.com/pytorch/pytorch/blob/bbd5b935e49a54578ac88cb23ca962ab896a8c7a/tools/autograd/templates/python_variable_methods.cpp#L958-L980\r\n\r\nWhere I can add `privateuseone_init` is in my own `to_impl` after Dispatcher, but by then it was too late.  Any advice for this case?\r\n\r\n\n\n### Versions\n\nCollecting environment information...\r\nPyTorch version: 2.1.0a0+git7bcf7da\r\nIs debug build: True\r\nCUDA used to build PyTorch: None\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 18.04.6 LTS (aarch64)\r\nGCC version: (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0\r\nClang version: Could not collect\r\nCMake version: version 3.23.1\r\nLibc version: glibc-2.27\r\n\r\nPython version: 3.8.17 (default, Jul  5 2023, 20:40:03)  [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-4.15.0-29-generic-aarch64-with-glibc2.26\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: False\r\n\r\nCPU:\r\nArchitecture:        aarch64\r\nByte Order:          Little Endian\r\nCPU(s):              192\r\nOn-line CPU(s) list: 0-191\r\nThread(s) per core:  1\r\nCore(s) per socket:  48\r\nSocket(s):           4\r\nNUMA node(s):        4\r\nVendor ID:           0x48\r\nModel:               0\r\nStepping:            0x1\r\nBogoMIPS:            200.00\r\nL1d cache:           64K\r\nL1i cache:           64K\r\nL2 cache:            512K\r\nL3 cache:            24576K\r\nNUMA node0 CPU(s):   0-47\r\nNUMA node1 CPU(s):   48-95\r\nNUMA node2 CPU(s):   96-143\r\nNUMA node3 CPU(s):   144-191\r\nFlags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.23.4\r\n[pip3] torch==2.1.0a0+git7bcf7da\r\n[pip3] torch-npu==2.1.0+gitf565f75\r\n[pip3] torchair==0.1\r\n[pip3] torchvision==0.15.2\r\n[conda] numpy                     1.23.4                   pypi_0    pypi\r\n[conda] torch                     2.1.0a0+git7bcf7da          pypi_0    pypi\r\n[conda] torch-npu                 2.1.0+gitf565f75          pypi_0    pypi\r\n[conda] torchair                  0.1                      pypi_0    pypi\r\n[conda] torchvision               0.15.2                   pypi_0    pypi\r\n\n\ncc @ezyang @bhosmer @smessmer @ljk53 @bdhirsh",
    "url": "https://github.com/pytorch/pytorch/issues/112369",
    "state": "closed",
    "labels": [
      "module: internals",
      "triaged"
    ],
    "created_at": "2023-10-30T06:39:18Z",
    "updated_at": "2024-01-09T20:12:12Z",
    "user": "huihoaan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5575,
    "title": "How to set the \"transformer_in\" layer's hidden size in LoRA training?",
    "body": "### Describe the bug\r\n\r\nI modify the code for text-to-image [lora](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_lora.py) as Figure 1,\r\n<img width=\"908\" alt=\"image\" src=\"https://github.com/huggingface/diffusers/assets/52530394/0639998b-8106-49d9-8761-c58014095e7e\">\r\nHowever, in 3D UNet there is a \"transformer_in\" layer that does not exist in 2D UNet. So I add \"transformer_in\" process in the code. And I set the \"hidden_size\" to be \"unet.config.block_out_channels[0]\" following the 3D UNet's definition as [this link](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_3d_condition.py) Figure 2:\r\n<img width=\"641\" alt=\"image\" src=\"https://github.com/huggingface/diffusers/assets/52530394/c23efadc-e22d-4bd9-aa3f-7e69bd83a7c2\">\r\nBut the there is a shape error as Figure 3\r\n![image](https://github.com/huggingface/diffusers/assets/52530394/7a279e34-2af8-4409-8e93-606f61fd506f)\r\n:\r\n\r\n\r\n### Reproduction\r\n\r\nLoad a 3D UNet. Adapt the LoRA codes as Figure 1.\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\n- `diffusers` version: 0.21.4\r\n- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.31\r\n- Python version: 3.10.13\r\n- PyTorch version (GPU?): 2.0.1 (True)\r\n- Huggingface_hub version: 0.18.0\r\n- Transformers version: 4.26.0\r\n- Accelerate version: 0.23.0\r\n- xFormers version: 0.0.22.post7\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\r\n\r\n\r\n### Who can help?\r\n\r\n@sayakpaul @patrickvonplaten @DN6 @yiyi",
    "url": "https://github.com/huggingface/diffusers/issues/5575",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2023-10-30T03:44:32Z",
    "updated_at": "2024-01-10T15:07:20Z",
    "user": "lxycopper"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5574,
    "title": "How to train a part of UNet attention parameters with LoRA",
    "body": "### Describe the bug\n\nI adapt the LoRA training code in # to train my model. \r\n\r\nAnd I only want to update the parameters in \"down block\", so I comment out the code for other attention blocks:\r\n<img width=\"909\" alt=\"image\" src=\"https://github.com/huggingface/diffusers/assets/52530394/6b204ad8-e201-43b0-ab97-5d29a936e3c8\">\r\nHowever, I got an error at this line \"unet.set_attn_processor(lora_attn_procs)\" as shown in the code:\r\n<img width=\"1009\" alt=\"image\" src=\"https://github.com/huggingface/diffusers/assets/52530394/0d914626-fcbc-40a5-a254-8bc5f258fbdf\">\r\n\n\n### Reproduction\n\ncomment out the code for other attention blocks as my first figure.\n\n### Logs\n\n_No response_\n\n### System Info\n\ndiffusers   0.21.4\r\npython 3.10.13\r\nUbuntu 18\r\n\n\n### Who can help?\n\n@sayakpaul @patr",
    "url": "https://github.com/huggingface/diffusers/issues/5574",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2023-10-30T02:58:07Z",
    "updated_at": "2023-12-08T15:05:16Z",
    "user": "lxycopper"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2419,
    "title": "\u2753 [Question] How do the dtypes work with torch.compile(backend=\"torch_tensorrt\"). Getting error.",
    "body": "## \u2753 Question\r\n\r\nI tried the following script to load a resnet50 model and test a sample input - \r\n\r\n```python\r\nimport torch_tensorrt\r\nimport torch\r\n\r\n# Load a pre-trained ResNet50 model\r\nx = torch.randn(1, 3, 224, 224, device='cuda').half()\r\nmodel = torch.hub.load(\r\n    'pytorch/vision:v0.6.0', 'resnet50', pretrained=True\r\n).cuda().half().eval()\r\n\r\nmodel_opt = torch.compile(model, backend=\"torch_tensorrt\", dynamic=False, options={\"debug\": True, \"min_block_size\": 1, \"enabled_precisions\": {torch.half}})\r\n\r\n# Check correctness\r\ntorch.testing.assert_close(actual=model_opt(x), expected=model(x), rtol=1e-2, atol=1e-2)\r\n```\r\n\r\nand I am getting the following error - \r\n\r\n```\r\nUsing cache found in /home/shreyansh/.cache/torch/hub/pytorch_vision_v0.6.0\r\n/home/shreyansh/miniconda3/envs/shreyansh-env-py10/lib/python3.10/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.\r\n  warnings.warn(\r\n/home/shreyansh/miniconda3/envs/shreyansh-env-py10/lib/python3.10/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=ResNet50_Weights.IMAGENET1K_V1`. You can also use `weights=ResNet50_Weights.DEFAULT` to get the most up-to-date weights.\r\n  warnings.warn(msg)\r\n[2023-10-28 09:37:06,703] torch._dynamo.symbolic_convert: [INFO] Step 1: torchdynamo start tracing forward\r\n[2023-10-28 09:37:08,530] torch._dynamo.symbolic_convert: [INFO] Step 1: torchdynamo done tracing forward (RETURN_VALUE)\r\n[2023-10-28 09:37:08,552] torch._dynamo.output_graph: [INFO] Step 2: calling compiler function torch_tensorrt_backend\r\n[10/28/2023-09:37:36] [TRT] [W] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage and speed up TensorRT initialization. See \"Lazy Loading\" section of CUDA documentation https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#lazy-loading\r\nINFO:torch_tensorrt.fx.fx2trt:TRT INetwork construction elapsed time: 0:00:00.008624\r\nINFO:torch_tensorrt.fx.fx2trt:Build TRT engine elapsed time: 0:01:02.300433\r\n[10/28/2023-09:38:38] [TRT] [W] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage and speed up TensorRT initialization. See \"Lazy Loading\" section of CUDA documentation https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#lazy-loading\r\n[10/28/2023-09:38:38] [TRT] [W] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage and speed up TensorRT initialization. See \"Lazy Loading\" section of CUDA documentation https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#lazy-loading\r\nINFO:torch_tensorrt.fx.fx2trt:TRT INetwork construction elapsed time: 0:00:00.004251\r\nINFO:torch_tensorrt.fx.fx2trt:Build TRT engine elapsed time: 0:00:01.587664\r\n[10/28/2023-09:38:40] [TRT] [W] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage and speed up TensorRT initialization. See \"Lazy Loading\" section of CUDA documentation https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#lazy-loading\r\n[10/28/2023-09:38:40] [TRT] [W] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage and speed up TensorRT initialization. See \"Lazy Loading\" section of CUDA documentation https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#lazy-loading\r\nINFO:torch_tensorrt.fx.fx2trt:TRT INetwork construction elapsed time: 0:00:00.004451\r\nINFO:torch_tensorrt.fx.fx2trt:Build TRT engine elapsed time: 0:00:01.805693\r\n[10/28/2023-09:38:42] [TRT] [W] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage and speed up TensorRT initialization. See \"Lazy Loading\" section of CUDA documentation https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#lazy-loading\r\nERROR:torch_tensorrt.dynamo.backend.backends:FX2TRT conversion failed on the subgraph. See trace above. Returning GraphModule forward instead.\r\nTraceback (most recent call last):\r\n  File \"/home/shreyansh/miniconda3/envs/shreyansh-env-py10/lib/python3.10/site-packages/torch_tensorrt/dynamo/backend/backends.py\", line 74, in _pretraced_backend\r\n    trt_compiled = _compile_module(\r\n  File \"/home/shreyansh/miniconda3/envs/shreyansh-env-py10/lib/python3.10/site-packages/torch_tensorrt/dynamo/backend/backends.py\", line 129, in _compile_module\r\n    submodule_inputs = get_submod_inputs(\r\n  File \"/home/shreyansh/miniconda3/envs/shreyansh-env-py10/lib/python3.10/site-packages/torch_tensorrt/dynamo/backend/lowering/_partition.py\", line 207, in get_submod_inputs\r\n    mod(*inputs)\r\n  File \"/home/shreyansh/miniconda3/envs/shreyansh-env-py10/lib/python3.10/site-packages/torch/fx/graph_module.py\", line 662, in call_wrapped\r\n    return self._wrapped_call(self, *args, **k",
    "url": "https://github.com/pytorch/TensorRT/issues/2419",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-10-28T16:48:28Z",
    "updated_at": "2023-10-30T17:24:55Z",
    "user": "shreyansh26"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 372,
    "title": "[Question] onnxruntime_binding.node issue on mac electron app",
    "body": "Hi,\r\nI'm getting this error on an intel macbook running an electron forge app:\r\n```\r\n(node:63267) UnhandledPromiseRejectionWarning: Error: Cannot find module '../bin/napi-v3/darwin/x64/onnxruntime_binding.node'\r\nRequire stack:\r\n- /Users/sam/Desktop/electron-forge-react-typescript-tailwind/.webpack/main/index.js\r\n- /Users/sam/Desktop/electron-forge-react-typescript-tailwind/node_modules/electron/dist/Electron.app/Contents/Resources/default_app.asar/main.js\r\n- \r\n    at Module._resolveFilename (node:internal/modules/cjs/loader:963:15)\r\n    at n._resolveFilename (node:electron/js2c/browser_init:2:109411)\r\n    at Module._load (node:internal/modules/cjs/loader:811:27)\r\n    at f._load (node:electron/js2c/asar_bundle:2:13330)\r\n    at Module.require (node:internal/modules/cjs/loader:1035:19)\r\n    at require (node:internal/modules/cjs/helpers:102:18)\r\n    at ./node_modules/@xenova/transformers/node_modules/onnxruntime-node/dist/binding.js (/Users/sam/Desktop/electron-forge-react-typescript-tailwind/.webpack/main/index.js:229:1)\r\n    at __webpack_require__ (/Users/sam/Desktop/electron-forge-react-typescript-tailwind/.webpack/main/index.js:83093:42)\r\n    at ./node_modules/@xenova/transformers/node_modules/onnxruntime-node/dist/backend.js (/Users/sam/Desktop/electron-forge-react-typescript-tailwind/.webpack/main/index.js:153:19)\r\n```\r\nI check the path ```../bin/napi-v3/darwin/x64/onnxruntime_binding.node``` and it does exist in node_modules. So I'm not sure what's going on/whether this is a bug. ",
    "url": "https://github.com/huggingface/transformers.js/issues/372",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-10-28T00:34:05Z",
    "updated_at": "2023-11-01T21:56:19Z",
    "user": "samlhuillier"
  },
  {
    "repo": "huggingface/transformers",
    "number": 27107,
    "title": "How to export a Marian model in rust ?",
    "body": "Most models based on Marian are also available in rust, such as : Helsinki-NLP/opus-mt-en-roa\r\n\r\nIs it possible to do this using transformers ?\r\nDid you asssit Helsinki-NLP in exporting the models to Rust ?",
    "url": "https://github.com/huggingface/transformers/issues/27107",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-27T13:01:13Z",
    "updated_at": "2023-12-05T08:03:53Z",
    "user": "flutter-painter"
  },
  {
    "repo": "pytorch/vision",
    "number": 8071,
    "title": "How to tell if Faster RCNN Detection model is overfitting",
    "body": "I'm confused as to how I can tell if the Faster RCNN Detection model I'm training is overfitting or not given that the validation loss is not computed in the `evaluate` function seen [here](https://github.com/pytorch/vision/blob/main/references/detection/engine.py#L75C1-L115C26) and below.\r\n\r\nAny help would be greatly appreciated.\r\n\r\n```\r\n@torch.inference_mode()\r\ndef evaluate(model, data_loader, device):\r\n    n_threads = torch.get_num_threads()\r\n    # FIXME remove this and make paste_masks_in_image run on the GPU\r\n    torch.set_num_threads(1)\r\n    cpu_device = torch.device(\"cpu\")\r\n    model.eval()\r\n    metric_logger = utils.MetricLogger(delimiter=\"  \")\r\n    header = \"Test:\"\r\n\r\n    coco = get_coco_api_from_dataset(data_loader.dataset)\r\n    iou_types = _get_iou_types(model)\r\n    coco_evaluator = CocoEvaluator(coco, iou_types)\r\n\r\n    for images, targets in metric_logger.log_every(data_loader, 100, header):\r\n        images = list(img.to(device) for img in images)\r\n\r\n        if torch.cuda.is_available():\r\n            torch.cuda.synchronize()\r\n        model_time = time.time()\r\n        outputs = model(images)\r\n\r\n        outputs = [{k: v.to(cpu_device) for k, v in t.items()} for t in outputs]\r\n        model_time = time.time() - model_time\r\n\r\n        res = {target[\"image_id\"]: output for target, output in zip(targets, outputs)}\r\n        evaluator_time = time.time()\r\n        coco_evaluator.update(res)\r\n        evaluator_time = time.time() - evaluator_time\r\n        metric_logger.update(model_time=model_time, evaluator_time=evaluator_time)\r\n\r\n    # gather the stats from all processes\r\n    metric_logger.synchronize_between_processes()\r\n    print(\"Averaged stats:\", metric_logger)\r\n    coco_evaluator.synchronize_between_processes()\r\n\r\n    # accumulate predictions from all images\r\n    coco_evaluator.accumulate()\r\n    coco_evaluator.summarize()\r\n    torch.set_num_threads(n_threads)\r\n    return coco_evaluator\r\n```",
    "url": "https://github.com/pytorch/vision/issues/8071",
    "state": "open",
    "labels": [],
    "created_at": "2023-10-27T00:03:39Z",
    "updated_at": "2025-12-22T11:12:36Z",
    "user": "1andDone"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 535,
    "title": "API format?",
    "body": "ok, so this may be a dumb question, but i am not sure where else to ask it.  So if we use this repo to deploy our app on HF, what is the format of the API parameters for calling our space?",
    "url": "https://github.com/huggingface/chat-ui/issues/535",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-26T21:56:22Z",
    "updated_at": "2023-10-27T15:01:57Z",
    "comments": 3,
    "user": "silvacarl2"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2624,
    "title": " ~ PyTorch Docathon H2 2023 ~",
    "body": "# ~ PyTorch Docathon H2 2023 ~\r\nWe have a large backlog of issues that we want to address and it's a great opportunity for you to start contributing to PyTorch. We have limited this docathon to the [pytorch/tutorials](https://github.com/pytorch/tutorials/pulls?q=is%3Apr+is%3Aopen+label%3Adocathon-h2-2023+) and [pytorch/pytorch](https://github.com/pytorch/pytorch/pulls?q=is%3Apr+is%3Aopen+label%3Adocathon-h2-2023+) repositories, so please work on the issues from these two repositories.\r\n\r\n**NOTE**: This issue outlines the work in the pytorch/tutorials repo. If you would prefer to work on the PyTorch docstrings issues, please go to the [pytorch/pytorch Docathon issue](https://github.com/pytorch/pytorch/issues/112176).\r\n\r\n# Date and location\r\n**WHEN:** The docathon starts on November 1st 10 AM PST. Please do not work on tasks until then. We will continue accepting new submissions until 5 PM PST on November 12th.\r\n**WHERE:** Virtual\r\n**WHAT:** Issues with the **docathon-h2-2023** label - will be posted on November 1st.\r\n\r\nWatch our intro video to learn more details about the event.\r\n\r\n[![Watch the docathon intro](https://github-production-user-asset-6210df.s3.amazonaws.com/5317992/242342554-2a0d5489-0f16-4db0-b3c7-67a9ada9abe6.png)](https://youtu.be/IhTjsRKqjtA?si=OdRvcjDj_82axD2I)\r\n\r\n\r\n# Can everyone participate?\r\n\r\nWe encourage everyone to consider participating in the docathon but there are a few things we expect from the participants:\r\n\r\n- You must have a GitHub account and know how to use Git and GitHub, how to submit or rebase your PR on the latest main branch, how to fork or clone the repo. We reserve the right to reject incorrectly submitted PRs.\r\n- You must be familiar with Python, the basics of Machine Learning, and have at least a basic knowledge of PyTorch. Familiarity with Sphinx, sphinx-gallery, and reStructuredText is a plus.\r\n\r\nBefore you start contributing make sure to read [Linux Foundation Code of Conduct](https://events.linuxfoundation.org/about/code-of-conduct/).\r\n\r\n# What contributions are we looking for?\r\n\r\nAll issues for this docathon are tagged with the **docathon-h2-2023** label. Please note that contributions that address other issues won't be counted. We are primarily looking for the following contributions:\r\n\r\n**NOTE:** Please avoid working on issues with **intel**, **amd**, and **nvidia** labels which are reserved for our partners.\r\n\r\n- Bug fixes in the [pytorch/tutorials](https://github.com/pytorch/tutorials) repo tagged with the docathon-h2-2023 label - see [the list](https://github.com/pytorch/tutorials/issues?q=is%3Aopen+is%3Aissue+label%3Adocathon-h2-2023) repo.\r\n- Docstring fixes in the [pytorch/pytorch](https://github.com/pytorch/pytorch) repo tagged with the docathon-h2-2023 label - see [this list](https://github.com/pytorch/pytorch/issues?q=is%3Aopen+is%3Aissue+label%3Adocathon-h2-2023) repo.\r\n\r\n**NOTE:** Due to the large number of RSVPs, the tasks are provided on a first come first serve basis \u2014 please don't hoard the tasks!\r\n\r\n# Difficulty Levels\r\n\r\nThe issues have three levels of difficulty: **easy**, **medium**, and **advanced**. If this is your first time contributing to PyTorch, we recommend that you start with an issue that is tagged as **easy** or **medium**.\r\n\r\n# How to contribute to tutorials?\r\n\r\n1. Read [pytorch/tutorials/CONTRIBUTING.md](https://github.com/pytorch/tutorials/blob/main/CONTRIBUTING.md) for general guidelines on how the submission process works and overall style and voice.\r\n\r\n2. Pick an issue that is labeled as **docathon-h2-2023**.\r\n3. In the issue, add a comment with the text **/assigntome**. If the issue is already assigned, please find another issue to work on. We ask that you assign one issue at a time - we want to give everyone a fair chance to participate. When you are done with one issue and get it approved, you can assign another one to yourself and start working on it.\r\n4. If you are submitting a new tutorial, use [this template](https://github.com/pytorch/tutorials/blob/main/beginner_source/template_tutorial.py).\r\n5. Fork or clone the PyTorch repository to your computer. For simple fixes, like incorrect URLs, you could use the GitHub UI as well.\r\n6. Create a branch and work on the fix.\r\n7. Test your fix by running the single tutorial locally. Don't run the whole build as it takes hours and requires a GPU. You can run one tutorial as a script python3 <tutorial-name.py> or GALLERY_PATTERN=\"neural_style_transfer_tutorial.py\" make html\r\n8. After you fix all the issues, you are ready to submit your PR.\r\n\r\n# Submit Your PR\r\n\r\n1. Submit your PR referencing the issue you've picked. For example:\r\n<img width=\"1058\" alt=\"docathonsubmission\" src=\"https://github.com/pytorch/tutorials/assets/127536312/3096037c-14d8-46ba-bb48-4a7314b463eb\">\r\n\r\n\r\n2. Pick an issue that is labeled as **docathon-h2-2023**.\r\n3. If you have not yet, sign the Contributor License Agreement (CLA) - prompted as a check in the PR. We can't accept any PRs without a signed CLA.\r\n4",
    "url": "https://github.com/pytorch/tutorials/issues/2624",
    "state": "open",
    "labels": [
      "docathon-h2-2023"
    ],
    "created_at": "2023-10-26T16:14:39Z",
    "updated_at": "2023-11-06T17:50:19Z",
    "comments": 3,
    "user": "sekyondaMeta"
  },
  {
    "repo": "pytorch/executorch",
    "number": 1101,
    "title": "How to virtualize the qte model?",
    "body": "Hi,\r\n\r\nI am now working on executorch. I want to see the model architecture of qte, which is easy for us to debug.\r\nHowever, I cannot find a virtualizing tool.  Netron does not support qte format now.\r\nCould executorch support to virtualize the qte format model? \r\n\r\nBesides, I wonder  whether the export function  will translate the ops in the Pytorch model to specifics ops  in qte format? \r\n\r\nThanks!!!\n```[tasklist]\n### Tasks\n```\n",
    "url": "https://github.com/pytorch/executorch/issues/1101",
    "state": "closed",
    "labels": [
      "need-user-input"
    ],
    "created_at": "2023-10-26T12:52:41Z",
    "updated_at": "2023-10-27T13:48:47Z",
    "user": "liang1232018"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5538,
    "title": "Why is the pipeline_stable_diffusion_upscale.py file not using the encoder-decoder latent?",
    "body": "### Describe the bug\n\nThere is no training script for pipeline_stable_diffusion_upscale.py because the authors chose not to utilize the latent domain for the Super-resolution task. Additionally, the U-Net implemented in pipeline_stable_diffusion_upscale.py only accepts 7 channels. How is this achieved?\n\n### Reproduction\n\nNone\n\n### Logs\n\n_No response_\n\n### System Info\n\nNone\n\n### Who can help?\n\n[AnasHXH](https://github.com/AnasHXH)",
    "url": "https://github.com/huggingface/diffusers/issues/5538",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2023-10-26T10:47:10Z",
    "updated_at": "2023-12-08T15:05:44Z",
    "user": "AnasHXH"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 534,
    "title": "Login issue with Google OpenID",
    "body": "I set up google OpenID for my chatUI. I have set the scope to openId and ./auth/userinfo.profile in OAuth Consent Screen. I tried to log the data shared by google to the app and it was the following \r\n\r\n{\r\n  sub: '****',\r\n  picture: 'https://lh3.googleusercontent.com/****',\r\n  email: 'shagun@****',\r\n  email_verified: true,\r\n  hd: '*****'\r\n} \r\n\r\nAs you can see, the name is not being shared and hence I am getting an error as Name is a required field. How can I fix this? \r\n\r\nNote: Google shares name for some accounts and for them it does not. This is my first time working with OpenID so any help will be appreciated.",
    "url": "https://github.com/huggingface/chat-ui/issues/534",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-26T10:00:05Z",
    "updated_at": "2023-10-26T10:49:36Z",
    "comments": 3,
    "user": "shagunhexo"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2415,
    "title": "\u2753 [Question] Examples not working in nvcr.io/nvidia/pytorch:23.09-py3.",
    "body": "## \u2753 Question\r\n\r\nI am within the `nvcr.io/nvidia/pytorch:23.09-py3` container. Trying out some snippets from:\r\nhttps://youtu.be/eGDMJ3MY4zk?si=MhkbgwAPVQSFZEha. \r\n\r\nBoth JIT and AoT examples failed. For JIT, it complained that \"tensorrt\" backend isn't available, for AoT, it complained that \"The user code is using a feature we don't support. Please try torchdynamo.explain() to get possible the reasons\". \r\n\r\nI am on an A100. What's going on? ",
    "url": "https://github.com/pytorch/TensorRT/issues/2415",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-10-26T09:53:16Z",
    "updated_at": "2025-11-24T17:42:35Z",
    "user": "sayakpaul"
  },
  {
    "repo": "huggingface/candle",
    "number": 1185,
    "title": "Question: How to create a Var from MmapedSafetensors",
    "body": "Hello everybody,\r\n\r\nI was wondering how to create a Var instance from an `MMapedSafetensors` `TensorView`. I have tried using `candle_core::Var::from_slice(tensor.data(), tensor.shape(), &device)?`, but I get the error:\r\n\r\n`Error: Shape mismatch, got buffer of size 90177536 which is compatible with shape [11008, 4096]`.\r\n\r\nIs there a better way to do this? \r\n\r\nIn addition, I notice the buffer is of type `u8`, which is definitely not the data type the safetensors should be decoded as. Where can I find how `VarBuilder` does this?\r\n\r\n**In summary, I have 2 questions:**\r\n- How to decode a `TensorView` into a `Var`?\r\n- Or, if the above is not feasible, how does `VarBuilder` do this?",
    "url": "https://github.com/huggingface/candle/issues/1185",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-26T09:41:37Z",
    "updated_at": "2023-10-26T11:26:29Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6353,
    "title": "load_dataset save_to_disk load_from_disk error",
    "body": "### Describe the bug\r\n\r\ndatasets version\uff1a 2.10.1\r\nI `load_dataset `and `save_to_disk` sucessfully on windows10( **and I `load_from_disk(/LLM/data/wiki)` succcesfully on windows10**), and I copy the dataset `/LLM/data/wiki`\r\ninto a ubuntu system, but when I `load_from_disk(/LLM/data/wiki)` on ubuntu,  something weird happens:\r\n\r\n\r\n```\r\nload_from_disk('/LLM/data/wiki')\r\n  File \"/usr/local/miniconda3/lib/python3.8/site-packages/datasets/load.py\", line 1874, in load_from_disk\r\n    return DatasetDict.load_from_disk(dataset_path, keep_in_memory=keep_in_memory, storage_options=storage_options)\r\n  File \"/usr/local/miniconda3/lib/python3.8/site-packages/datasets/dataset_dict.py\", line 1309, in load_from_disk\r\n    dataset_dict[k] = Dataset.load_from_disk(\r\n  File \"/usr/local/miniconda3/lib/python3.8/site-packages/datasets/arrow_dataset.py\", line 1543, in load_from_disk\r\n    fs_token_paths = fsspec.get_fs_token_paths(dataset_path, storage_options=storage_options)\r\n  File \"/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/core.py\", line 610, in get_fs_token_paths\r\n    chain = _un_chain(urlpath0, storage_options or {})\r\n  File \"/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/core.py\", line 325, in _un_chain\r\n    cls = get_filesystem_class(protocol)\r\n  File \"/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/registry.py\", line 232, in get_filesystem_class\r\n    raise ValueError(f\"Protocol not known: {protocol}\")\r\nValueError: Protocol not known: /LLM/data/wiki\r\n```\r\nIt seems that something went wrong on the arrow file?\r\nHow can I solve this , since currently I can not save_to_disk on ubuntu system\r\n\r\n### Steps to reproduce the bug\r\n\r\ndatasets version\uff1a 2.10.1\r\n\r\n### Expected behavior\r\n\r\ndatasets version\uff1a 2.10.1\r\n\r\n### Environment info\r\n\r\ndatasets version\uff1a 2.10.1",
    "url": "https://github.com/huggingface/datasets/issues/6353",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-26T03:47:06Z",
    "updated_at": "2024-04-03T05:31:01Z",
    "comments": 5,
    "user": "brisker"
  },
  {
    "repo": "huggingface/text-embeddings-inference",
    "number": 43,
    "title": "How to add custom python file for pretrained model on TEI server?",
    "body": "### System Info\r\n\r\nI am pretty new to this space. Please help.\r\nI have  made a python file with pre-trained model, which generates embeddings. What I want is to -\r\n1. Create a docker image of Python file\r\n2.  Run it on TEI server?\r\n\r\n\r\nHow can we do this?\r\n\r\n\r\n\r\n\r\n\r\n\r\n### Information\r\n\r\n- [ ] Docker\r\n- [ ] The CLI directly\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported command\r\n- [X] My own modifications\r\n\r\n### Reproduction\r\n\r\nNeed to host a custom python file( which runs a sentence embedding model) on TEI server\r\n\r\n### Expected behavior\r\n\r\nNA",
    "url": "https://github.com/huggingface/text-embeddings-inference/issues/43",
    "state": "open",
    "labels": [],
    "created_at": "2023-10-25T16:09:52Z",
    "updated_at": "2023-10-25T17:57:46Z",
    "user": "cken21"
  },
  {
    "repo": "huggingface/llm-vscode",
    "number": 100,
    "title": "How to generate the response from locally hosted end point in vscode?",
    "body": "Hi,\r\n\r\nI managed to plug the llm-vcode extension to point to the locally running endpoint. Now when I am selected the content like as below:\r\n# function to sum 2 numbers in python \r\nthen Cmd+shif+a > llm: show code attribution \r\nMy local endpoint invokes and give the relevant response as well in below format \r\n\r\n`{\r\n  \"details\": {\r\n    \"best_of_sequences\": [\r\n      {\r\n        \"finish_reason\": \"length\",\r\n        \"generated_text\": \"test\",\r\n        \"generated_tokens\": 1,\r\n        \"prefill\": [\r\n          {\r\n            \"id\": 0,\r\n            \"logprob\": -0.34,\r\n            \"text\": \"test\"\r\n          }\r\n        ],\r\n        \"seed\": 42,\r\n        \"tokens\": [\r\n          {\r\n            \"id\": 0,\r\n            \"logprob\": -0.34,\r\n            \"special\": false,\r\n            \"text\": \"test\"\r\n          }\r\n        ],\r\n        \"top_tokens\": [\r\n          [\r\n            {\r\n              \"id\": 0,\r\n              \"logprob\": -0.34,\r\n              \"special\": false,\r\n              \"text\": \"test\"\r\n            }\r\n          ]\r\n        ]\r\n      }\r\n    ],\r\n    \"finish_reason\": \"length\",\r\n    \"generated_tokens\": 1,\r\n    \"prefill\": [\r\n      {\r\n        \"id\": 0,\r\n        \"logprob\": -0.34,\r\n        \"text\": \"test\"\r\n      }\r\n    ],\r\n    \"seed\": 42,\r\n    \"tokens\": [\r\n      {\r\n        \"id\": 0,\r\n        \"logprob\": -0.34,\r\n        \"special\": false,\r\n        \"text\": \"test\"\r\n      }\r\n    ],\r\n    \"top_tokens\": [\r\n      [\r\n        {\r\n          \"id\": 0,\r\n          \"logprob\": -0.34,\r\n          \"special\": false,\r\n          \"text\": \"test\"\r\n        }\r\n      ]\r\n    ]\r\n  },\r\n  \"generated_text\": \"test\"\r\n}`\r\n\"generated_text\":  value is replaced with actual response with python sum function\r\n\r\nAfter 200, I can see the anything related to generated code in vscode.  \r\n\r\nPlease suggest to how to I can get generated response in vscode itself.",
    "url": "https://github.com/huggingface/llm-vscode/issues/100",
    "state": "open",
    "labels": [
      "stale"
    ],
    "created_at": "2023-10-25T15:55:40Z",
    "updated_at": "2023-11-25T01:46:01Z",
    "user": "dkaus1"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1375,
    "title": "Question: what is the add_special_tokens parameter of Tokenizer::encode?",
    "body": "As stated above, what does the parameter add_special_tokens do? Does it add bos/eos tokens? Thanks!",
    "url": "https://github.com/huggingface/tokenizers/issues/1375",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-25T09:55:55Z",
    "updated_at": "2023-10-25T18:43:54Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "huggingface/candle",
    "number": 1173,
    "title": "Question: what is the add_special_tokens parameter of Tokenizer::encode?",
    "body": "As stated above, what does the parameter add_special_tokens do? Does it add bos/eos tokens? Thanks!",
    "url": "https://github.com/huggingface/candle/issues/1173",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-25T09:30:01Z",
    "updated_at": "2023-10-25T09:55:42Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 2009,
    "title": "Are URLs in rows response sanitized?",
    "body": "see https://github.com/huggingface/moon-landing/pull/7798#discussion_r1369813236 (internal)\r\n\r\n> Is \"src\" validated / sanitized?\r\n> if not there is a potential XSS exploit here (you can inject javascript code in an image src)\r\n\r\n> Are S3 object names sanitized? If no, it should be the case in dataset-server side",
    "url": "https://github.com/huggingface/dataset-viewer/issues/2009",
    "state": "closed",
    "labels": [
      "question",
      "security",
      "P1"
    ],
    "created_at": "2023-10-24T15:10:29Z",
    "updated_at": "2023-11-21T15:39:13Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 528,
    "title": "Websearch error in proxy",
    "body": "I'm developing in a proxy environment, I'm guessing it's because **websearch module can't import the model(Xenova/gte-small) from huggingface.**\r\nI don't want to use websearch, but it tries to load the gte-small model anyway, and I get an error.\r\n\r\n```\r\n11:36:36 AM [vite] Error when evaluating SSR module /src/lib/server/websearch/sentenceSimilarity.ts:\r\n|- TypeError: fetch failed\r\n    at fetch (/home/dev/chat-ui/node_modules/undici/index.js:110:15)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async getModelFile (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:468:24)\r\n    at async getModelJSON (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:542:18)\r\n    at async Promise.all (index 1)\r\n    at async loadTokenizer (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:56:16)\r\n    at async AutoTokenizer.from_pretrained (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:3778:48)\r\n    at async Promise.all (index 0)\r\n    at async loadItems (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/pipelines.js:2110:5)\r\n    at async Proxy.pipeline (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/pipelines.js:2056:19)\r\n\r\n11:36:36 AM [vite] Error when evaluating SSR module /src/lib/server/websearch/runWebSearch.ts: failed to import \"/src/lib/server/websearch/sentenceSimilarity.ts\"\r\n|- TypeError: fetch failed\r\n    at fetch (/home/dev/chat-ui/node_modules/undici/index.js:110:15)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async getModelFile (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:468:24)\r\n    at async getModelJSON (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:542:18)\r\n    at async Promise.all (index 1)\r\n    at async loadTokenizer (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:56:16)\r\n    at async AutoTokenizer.from_pretrained (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:3778:48)\r\n    at async Promise.all (index 0)\r\n    at async loadItems (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/pipelines.js:2110:5)\r\n    at async Proxy.pipeline (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/pipelines.js:2056:19)\r\n\r\n11:36:36 AM [vite] Error when evaluating SSR module /home/dev/chat-ui/src/routes/conversation/[id]/+server.ts: failed to import \"/src/lib/server/websearch/runWebSearch.ts\"\r\n|- TypeError: fetch failed\r\n    at fetch (/home/dev/chat-ui/node_modules/undici/index.js:110:15)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async getModelFile (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:468:24)\r\n    at async getModelJSON (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:542:18)\r\n    at async Promise.all (index 1)\r\n    at async loadTokenizer (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:56:16)\r\n    at async AutoTokenizer.from_pretrained (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:3778:48)\r\n    at async Promise.all (index 0)\r\n    at async loadItems (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/pipelines.js:2110:5)\r\n    at async Proxy.pipeline (file:///home/dev/chat-ui/node_modules/@xenova/transformers/src/pipelines.js:2056:19)\r\n\r\n```\r\n\r\n\r\n1. Is there a workaround to downloading the model directly?\r\n2. Need Improve: the proxy related code.\r\n3. Need Improve: add option to turn off websearch initialization. (",
    "url": "https://github.com/huggingface/chat-ui/issues/528",
    "state": "closed",
    "labels": [
      "enhancement",
      "support",
      "websearch"
    ],
    "created_at": "2023-10-24T03:53:25Z",
    "updated_at": "2023-11-15T15:44:01Z",
    "comments": 6,
    "user": "calycekr"
  },
  {
    "repo": "huggingface/candle",
    "number": 1165,
    "title": "How do I raise 2 to the power of a tensor?",
    "body": "How do I write:\r\n\r\n```python\r\nx = 2 ** (y * z)\r\n```\r\n\r\nWhere `y` is an integer and `z` is a tensor?\r\nI tried to use `powf`, but it only works with float arguments.",
    "url": "https://github.com/huggingface/candle/issues/1165",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-23T22:13:28Z",
    "updated_at": "2023-10-24T04:28:23Z",
    "user": "laptou"
  },
  {
    "repo": "huggingface/candle",
    "number": 1163,
    "title": "how to modify the contents of a Tensor?",
    "body": "what is the `candle` equivalent of this?\r\n\r\n```python\r\nt[2, :] *= 2;\r\n```",
    "url": "https://github.com/huggingface/candle/issues/1163",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-23T19:58:50Z",
    "updated_at": "2023-10-24T04:28:10Z",
    "user": "laptou"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 367,
    "title": "[Question] How to include ort-wasm-simd.wasm with the bundle?",
    "body": "How can I include ort-wasm-simd.wasm with the bundle? I'm using this on an app that needs to be able to run offline, so I'd like to package this with the lib. I'm also running this on web worker, so that file gets requested 1+n times per user session when the worker starts.\r\n<img width=\"725\" alt=\"image\" src=\"https://github.com/xenova/transformers.js/assets/1594723/39f7fc6e-0914-4b40-a3bc-aa17ed53851c\">\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/367",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-10-23T04:54:16Z",
    "updated_at": "2023-10-26T08:27:28Z",
    "user": "mjp0"
  },
  {
    "repo": "pytorch/torchx",
    "number": 782,
    "title": "Workspace patch is applied only on role[0] image",
    "body": "## \u2753 Questions and Help\r\n\r\nPer https://github.com/pytorch/torchx/blob/main/torchx/runner/api.py#L362-L370, we assume that patch needs to be applied only for a single role. Effectively assumes that:\r\n\r\n1. role0 is the only image that needs to be updated \r\n2. workspace is mapped to image of role0.\r\n\r\nThis issue has surfaced for an internal Meta user.\r\n\r\n### Question\r\nShould we treat this as a bug an apply patch to all the roles or introduce proper mapping between workspaces and roles? This hasn't surfaced since most of our customers use single role, but looks like it is broken. My personal preference is to provide warning to users when multiple roles are defined first, then add non-default option to specify workspace for each role name.\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/782",
    "state": "open",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2023-10-22T23:26:32Z",
    "updated_at": "2023-10-23T19:56:21Z",
    "comments": 5,
    "user": "kurman"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 310,
    "title": "How to determine the LMTrainingType ? chat or generic mode?",
    "body": "It is said that there are two modes (chat and generic), but I cannot find a way to determine it.",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/310",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-21T14:28:59Z",
    "updated_at": "2023-11-26T04:31:08Z",
    "user": "qiaoqiaoLF"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6324,
    "title": "Conversion to Arrow fails due to wrong type heuristic",
    "body": "### Describe the bug\n\nI have a list of dictionaries with valid/JSON-serializable values. \r\n\r\nOne key is the denominator for a paragraph. In 99.9% of cases its a number, but there are some occurences of '1a', '2b' and so on.\r\n\r\nIf trying to convert this list to a dataset with `Dataset.from_list()`, I always get\r\n`ArrowInvalid: Could not convert '1' with type str: tried to convert to int64`, presumably because pyarrow tries to convert the keys to integers.\r\n\r\nIs there any way to circumvent this and fix dtypes? I didn't find anything in the documentation.\n\n### Steps to reproduce the bug\n\n* create a list of dicts with one key being a string of an integer for the first few thousand occurences and try to convert to dataset.\r\n\n\n### Expected behavior\n\nThere shouldn't be an error (e.g. some flag to turn off automatic str to numeric conversion).\n\n### Environment info\n\n- `datasets` version: 2.14.5\r\n- Platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.35\r\n- Python version: 3.9.18\r\n- Huggingface_hub version: 0.17.3\r\n- PyArrow version: 13.0.0\r\n- Pandas version: 2.1.1",
    "url": "https://github.com/huggingface/datasets/issues/6324",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-20T23:20:58Z",
    "updated_at": "2023-10-23T20:52:57Z",
    "comments": 2,
    "user": "jphme"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 365,
    "title": "[Question] Headers not defined",
    "body": "Hi friends!\r\n\r\nNeither headers nor fetch seems to be getting resolved.. trying to run this on a nodejs application...\r\n\r\nfile:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/utils/hub.js:201\r\n        return fetch(urlOrPath, { headers });\r\n               ^\r\n\r\nTypeError: fetch is not a function\r\n    at getFile (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/utils/hub.js:201:16)\r\n    at getModelFile (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/utils/hub.js:468:30)\r\n    at async getModelJSON (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/utils/hub.js:542:18)\r\n    at async Promise.all (index 0)\r\n    at async loadTokenizer (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/tokenizers.js:52:16)\r\n    at async Function.from_pretrained (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/tokenizers.js:3826:48)\r\n    at async Promise.all (index 0)\r\n    at async loadItems (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/pipelines.js:2193:5)\r\n    at async pipeline (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/pipelines.js:2139:19)\r\n    at async Server.<anonymous> (/home/rajesh/code/ai/js/invoice/inv.js:65:24)\r\n\r\n-------\r\n\r\nUnable to load from local path \"/home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/models/Xenova/distilbert-base-uncased-finetuned-sst-2-english/tokenizer.json\": \"ReferenceError: Headers is not defined\"\r\nUnable to load from local path \"/home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/models/Xenova/distilbert-base-uncased-finetuned-sst-2-english/tokenizer_config.json\": \"ReferenceError: Headers is not defined\"\r\nUnable to load from local path \"/home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/models/Xenova/distilbert-base-uncased-finetuned-sst-2-english/config.json\": \"ReferenceError: Headers is not defined\"\r\nfile:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/utils/hub.js:188\r\n        const headers = new Headers();\r\n                        ^\r\n\r\nReferenceError: Headers is not defined\r\n    at getFile (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/utils/hub.js:188:25)\r\n    at getModelFile (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/utils/hub.js:468:30)\r\n    at async getModelJSON (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/utils/hub.js:542:18)\r\n    at async Promise.all (index 0)\r\n    at async loadTokenizer (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/tokenizers.js:52:16)\r\n    at async Function.from_pretrained (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/tokenizers.js:3826:48)\r\n    at async Promise.all (index 0)\r\n    at async loadItems (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/pipelines.js:2193:5)\r\n    at async pipeline (file:///home/rajesh/code/ai/js/invoice/node_modules/@xenova/transformers/src/pipelines.js:2139:19)",
    "url": "https://github.com/huggingface/transformers.js/issues/365",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-10-20T16:29:28Z",
    "updated_at": "2023-11-22T06:15:35Z",
    "user": "trilloc"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2335,
    "title": "How to get individual token embeddings of a sentence from sentence transformers",
    "body": "How to get individual token embeddings of a sentence from sentence transformers",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2335",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-20T06:49:00Z",
    "updated_at": "2023-12-18T16:21:32Z",
    "user": "pradeepdev-1995"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 371,
    "title": "Non-blocking `save_file`",
    "body": "### Feature request\n\nAdd the option to make calls to `safetensors.*.save_file` non-blocking to allow execution to continue while large tensors / models are being saved.\n\n### Motivation\n\nI'm writing a script a bulk compute embeddings however I am getting poor GPU utilisation due to time spent saving to disk with `safetensors`. It would be nice if saving was non-blocking to allow execution to continue.\n\n### Your contribution\n\nI am unsure how this would work, but could give it a try if someone pointed me to the relevant code and some high level steps. Happy to defer to more experienced developers~\r\n\r\nOne issue I can see with this feature is how to deal with tensors being changed after the call to `save_file` but before saving is actually complete. A copy would work, but maybe not appropriate for large models / tensors.",
    "url": "https://github.com/huggingface/safetensors/issues/371",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-10-20T05:42:47Z",
    "updated_at": "2023-12-11T01:48:39Z",
    "comments": 1,
    "user": "vvvm23"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 1767,
    "title": "Request: discerning what the default model is when using `InferenceClient` without a `model`",
    "body": "When doing something like the below:\r\n\r\n```python\r\nclient = InferenceClient()  # NOTE: no model specified\r\nclient.feature_extraction(\"hi\")\r\n```\r\n\r\nIt would be cool to know what model is being used behind the scenes.  How can one figure this out programmatically?\r\n\r\nI am thinking there may be a need for a new `InferenceClient` method resembling the following:\r\n\r\n```python\r\n    def get_default_model(task: str) -> str:\r\n        \"\"\"Get the model's name used by default for the input task.\"\"\"\r\n```",
    "url": "https://github.com/huggingface/huggingface_hub/issues/1767",
    "state": "closed",
    "labels": [
      "enhancement",
      "good first issue"
    ],
    "created_at": "2023-10-19T20:56:53Z",
    "updated_at": "2023-11-08T13:47:14Z",
    "user": "jamesbraza"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5457,
    "title": "What is function of `attention_mask` in `get_attention_scores`?",
    "body": "What is function of `attention_mask` in `get_attention_scores`? I guess it is used to ignore some value when calculating the attention map\r\nI can not find a example in diffusers library that actually use this `attention_mask`. Could you provide an example on how to use it?\r\n\r\nhttps://github.com/huggingface/diffusers/blob/e5168588864d72a4dca37e90318c6b11da0eaaf1/src/diffusers/models/attention_processor.py#L454",
    "url": "https://github.com/huggingface/diffusers/issues/5457",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-10-19T18:14:38Z",
    "updated_at": "2023-11-28T15:05:41Z",
    "user": "g-jing"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2610,
    "title": "[BUG] - <title>When I use fsdp, Because the flattened parameters, I always meet some question",
    "body": "### Add Link\n\nWhen I use fsdp, Because the flattened parameters, I always meet some question.\r\nfor examples:\r\n`\r\nRuntimeError: mat2 must be a matrix, got 1-D tensor\r\n`\r\nand\r\n`\r\nRuntimeError: weight should have at least three dimensions\r\n`\r\nIt always occurred in some flattened model weights, sucn as conv, linear etc.\r\nHow can I solve this problem?\n\n### Describe the bug\n\nWhen I use fsdp, Because the flattened parameters, I always meet some question\r\nfor examples:\r\n`\r\nRuntimeError: mat2 must be a matrix, got 1-D tensor\r\n`\r\nand\r\n`\r\nRuntimeError: weight should have at least three dimensions\r\n`\r\nIt always occurred in some flattened model weights, sucn as conv, linear etc.\r\nHow can I solve this problem?\n\n### Describe your environment\n\nPytorch 2.1.0\n\ncc @osalpekar @H-Huang @kwen2501",
    "url": "https://github.com/pytorch/tutorials/issues/2610",
    "state": "closed",
    "labels": [
      "bug",
      "distributed"
    ],
    "created_at": "2023-10-19T14:18:09Z",
    "updated_at": "2025-05-12T15:33:13Z",
    "comments": 4,
    "user": "sqzhang-lazy"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2068,
    "title": "How to use cpu_offload function, attach_align_device_hook function\uff0c",
    "body": "attach_align_device_hook is called in the cpu_offload function. How is skip_keys used in attach_align_device_hook ?\r\ndef attach_align_device_hook(\r\n    module: torch.nn.Module,\r\n    execution_device: Optional[torch.device] = None,\r\n    offload: bool = False,\r\n    weights_map: Optional[Mapping] = None,\r\n    offload_buffers: bool = False,\r\n    module_name: str = \"\",\r\n    skip_keys: Optional[Union[str, List[str]]] = None,\r\n    preload_module_classes: Optional[List[str]] = None,\r\n):\r\n I wonder what the role of skip keys is?I see this function in diffusers inference stable-diffusion using enable_sequential_cpu_offload.\r\nWhat I want to achieve is to adjust some of the stable-diffusion submodules to run in the gpu, so that the vram occupancy can be controlled.\r\n",
    "url": "https://github.com/huggingface/accelerate/issues/2068",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-19T10:25:07Z",
    "updated_at": "2023-11-26T15:06:04Z",
    "user": "LeonNerd"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2067,
    "title": "how to automatically load state dict from memory to a multi-gpu device?",
    "body": "```    Python    \r\n        config_dict = AutoConfig.from_pretrained(model_config, device_map=\"auto\")\r\n        model = AutoModelForCausalLM.from_config(config_dict)\r\n        raw_state_dict = torch.load(args.model_path, map_location=\"cpu\")        \r\n        state_dict = convert_ckpt(raw_state_dict)\r\n        model.load_state_dict(state_dict, strict=False)\r\n```\r\n\r\n`model.load_state_dict(state_dict, strict=False)` only loads state dict on a single gpu, even when `device_map=\"auto\"` is set by `AutoConfig`. Additionally,  the `load_checkpoint_and_dispatch` func only accepts a file path as the `checkpoint` parameter.\r\n\r\nIs there any way to automatically load state dict from memory to a multi-gpu device?",
    "url": "https://github.com/huggingface/accelerate/issues/2067",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-19T05:57:39Z",
    "updated_at": "2023-12-22T15:06:31Z",
    "user": "tlogn"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2064,
    "title": "How to use `gather_for_metrics()` with decoder-generated strings to compute rouge score?",
    "body": "I am fine-tuning an encoder-decoder model and during the validation step, using the `.generate` method to generate tokens from the decoder that are subsequently decoded into strings (in this case classes). These generations are occurring across 8 GPUs and I am using Accelerate to manage the distribution.\r\n\r\nMy hope was to append these strings to lists, and pass the lists to `gather_for_metrics()` on each GPU to get a \"master list\" of predictions and references, added to the rouge metric and then computed:\r\n\r\n```python\r\npredictions, references = accelerator.gather_for_metrics(\r\n            (predictions, references)\r\n        )\r\n\r\nrouge_metric.add_batch(\r\n    predictions=predictions,\r\n    references=references,\r\n)\r\n\r\nrouge_score = rouge_metric.compute(rouge_types=[\"rougeL\"], use_aggregator=True)[\"rougeL\"]\r\n```\r\n\r\nAfter encountering some strange errors, i noticed that `gather_for_metrics()` will [only interact with tensors](https://huggingface.co/docs/accelerate/v0.19.0/en/package_reference/accelerator#accelerate.Accelerator.gather_for_metrics)\r\n\r\nAnd from what I can tell, you cannot create a torch.Tensor with string members.\r\n\r\nHow do the accelerate folks recommend using `gather_for_metrics()` with decoder-generated strings?\r\n",
    "url": "https://github.com/huggingface/accelerate/issues/2064",
    "state": "closed",
    "labels": [
      "solved"
    ],
    "created_at": "2023-10-18T19:25:29Z",
    "updated_at": "2023-12-25T15:07:03Z",
    "user": "plamb-viso"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 364,
    "title": "[Question] Error in getModelJSON with React",
    "body": " Hey, I am trying to transcribe audio to speech using transformers.js. I tried two ways \r\n\r\n1.  https://huggingface.co/docs/transformers.js/api/pipelines#pipelinesautomaticspeechrecognitionpipeline\r\n2. https://huggingface.co/docs/transformers.js/tutorials/react\r\n\r\nBut seem to get an error like this\r\n\r\n![image](https://github.com/xenova/transformers.js/assets/67155124/bfa37f1b-6b57-42f9-8792-8542fc2fc958)\r\n\r\nFiles for your reference: https://filebin.net/88munmsfk4u0127m\r\n\r\nPlease do let me know if I am doing something wrong or what is the best way using ReactJS\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/364",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-10-18T16:57:20Z",
    "updated_at": "2024-01-24T19:54:17Z",
    "user": "ajaykrupalk"
  },
  {
    "repo": "pytorch/vision",
    "number": 8053,
    "title": "When will torch and torchvision support Python 3.12?",
    "body": "### \ud83d\ude80 The feature\n\nPython 3.11 is the latest version that is supported by torch and torchvision. Python 3.12 was released this month and I'd like to know when we'll be able to use torch & torchvision packages with Python 3.12.\n\n### Motivation, pitch\n\nI'm not specifically having any troubles, it's just that I personally like to stay up to date, and since ya'll have an astonishing library, I'm trying to contribute to it from my side by first raising an issue, and see if there's any other technical contribution that I would be able to make in this specific goal for your package \ud83e\udd1d\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/8053",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-18T10:44:17Z",
    "updated_at": "2023-10-18T12:10:37Z",
    "comments": 1,
    "user": "AlirezaShk"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 363,
    "title": "[Question] Build step process for Vercel",
    "body": "Hi, I am currently in the process of trying to deploy to Vercel using Nextjs.\r\nI am using pnpm as my package manager and have put the model in the public folder.\r\nI hit this error, when building occurs, is there something necessary post install just as #295 has done?\r\n\r\nI don't understand why this step is necessary\r\n\r\n```\r\nAn error occurred while writing the file to cache: [Error: ENOENT: no such file or directory, mkdir '/var/task/node_modules/.pnpm/@xenova+transformers@2.6.2/node_modules/@xenova/transformers/.cache'\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/363",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-10-18T00:27:18Z",
    "updated_at": "2024-04-06T06:23:06Z",
    "user": "kyeshmz"
  },
  {
    "repo": "huggingface/setfit",
    "number": 432,
    "title": "[Q] How to ensure reproducibility",
    "body": "Can someone explain how to ensure reproducibility of a pre-trained model (\"sentence-transformers/paraphrase-mpnet-base-v2\")? \r\n\r\nI thought that the result would be reproducible because SetFitTrainer() has a default random seed in its constructor, but found that it was not the case. SetFitTrainer source code indicates that \"to ensure reproducibility across runs, I need to use [`~SetTrainer.model_init`] function to instantiate the model\". But, I don't understand what it entails. \r\n\r\nIs there an example that I can follow? \r\n\r\nAny help would be highly appreciated. \r\n\r\nThanks, ",
    "url": "https://github.com/huggingface/setfit/issues/432",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-17T23:47:46Z",
    "updated_at": "2023-12-06T13:19:54Z",
    "user": "youngjin-lee"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 519,
    "title": ".env.local prepromt env variable with multi lines",
    "body": "Hi\r\nI have a prepromt which is basically a 2 shorts inference. very long text ( 1200 lines like) that I want to add as a prepromts, but the env.  file does not allow a multi line text as a variable  \r\nany idea how to handle this?",
    "url": "https://github.com/huggingface/chat-ui/issues/519",
    "state": "open",
    "labels": [],
    "created_at": "2023-10-17T18:34:30Z",
    "updated_at": "2023-11-07T13:11:21Z",
    "comments": 6,
    "user": "RachelShalom"
  },
  {
    "repo": "pytorch/xla",
    "number": 5709,
    "title": "how can I debug in openxla xla source.  in  pytorch  xla . ",
    "body": "I build pytorch and pytorch xla install in my computer. and I can debug in pytorch xla\uff0c but I dont  known \uff0chow debug in openxla xla source code.\r\nThe compilation of xla depends on openxla. The openxla xla compiled source code can be seen here, xla/build/temp.linux-x86_64-cpython-310/bazel-xla/external. How should I set it so that the debug version on vscode can breakpoint to openxla? What about the source code of xla in it?\r\n",
    "url": "https://github.com/pytorch/xla/issues/5709",
    "state": "closed",
    "labels": [
      "question",
      "openxla"
    ],
    "created_at": "2023-10-17T12:02:34Z",
    "updated_at": "2025-04-29T13:07:15Z",
    "user": "ckfgihub"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1459,
    "title": "nougat to onnx",
    "body": "### Feature request\r\n\r\nI would like to do the transformation of the [nougat](https://huggingface.co/facebook/nougat-base) model to onnx, is it possible to do it through optimum?\r\n\r\n### Motivation\r\n\r\nNougat is a [Donut](https://huggingface.co/docs/transformers/model_doc/donut) model trained to transcribe scientific PDFs into an easy-to-use markdown format.",
    "url": "https://github.com/huggingface/optimum/issues/1459",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-17T10:03:15Z",
    "updated_at": "2024-08-27T06:16:17Z",
    "comments": 3,
    "user": "arvisioncode"
  },
  {
    "repo": "pytorch/vision",
    "number": 8050,
    "title": "Any plans to implement the functions in opencv?",
    "body": "### \ud83d\ude80 The feature\n\nExpect an implementation of some of the apis available in opencv (e.g. cv2.findContours(), cv2.connectedComponents(), ...)\n\n### Motivation, pitch\n\nJust want torchvision to be able to do these things faster using gpus, and make these api faster.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/8050",
    "state": "open",
    "labels": [],
    "created_at": "2023-10-17T07:59:40Z",
    "updated_at": "2023-10-18T18:24:54Z",
    "comments": 1,
    "user": "mortal-Zero"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5416,
    "title": "How to correctly implement a class-conditional model",
    "body": "Hi, I'd like to implement a DDPM that is class-conditioned, but not conditioned on anything else (no text), using `UNet2DConditionModel`. I'm training from scratch.  \r\n\r\nI'm calling the model with `noise_pred = model(noisy_images, timesteps, class_labels=class_labels, return_dict=False)[0]`, but I get the error `UNet2DConditionModel.forward() missing 1 required positional argument: 'encoder_hidden_states'`. However, when I set `encoder_hidden_states` to `None`, I get `TypeError: AttnDownBlock2D.forward() got an unexpected keyword argument 'scale'`. I'm not sure what `encoder_hidden_states` should be set to since I'm only using class conditioning.\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/diffusers/issues/5416",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-16T20:53:41Z",
    "updated_at": "2023-10-16T21:02:39Z",
    "user": "nickk124"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 511,
    "title": "ChatUI on HuggingFace Spaces errors out with PermissionError: [Errno 13] Permission denied ",
    "body": "When I try following the below two tutorials I hit the same error, where the container code tries to create a directory and fails due to permission issues on the host\r\n\r\ntutorials: \r\n1. https://huggingface.co/docs/hub/spaces-sdks-docker-chatui#chatui-on-spaces\r\n2. https://huggingface.co/blog/Llama2-for-non-engineers\r\n\r\nNote: I have set the env vars `HUGGING_FACE_HUB_TOKEN` and in a prior attempt `HF_TOKEN` as well.\r\n\r\n<img width=\"1252\" alt=\"Screenshot 2023-10-16 at 1 25 04 AM\" src=\"https://github.com/huggingface/chat-ui/assets/9070365/6a54c653-ed30-4bcf-af83-80dc04ce2bc1\">\r\n\r\n\r\nstack trace on hugging face space\r\n```\r\nTraceback (most recent call last):\r\n\r\n  File \"/opt/conda/bin/text-generation-server\", line 8, in <module>\r\n    sys.exit(app())\r\n\r\n  File \"/opt/conda/lib/python3.9/site-packages/text_generation_server/cli.py\", line 131, in download_weights\r\n    utils.download_and_unload_peft(\r\n\r\n  File \"/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/peft.py\", line 38, in download_and_unload_peft\r\n    os.makedirs(model_id, exist_ok=True)\r\n\r\n  File \"/opt/conda/lib/python3.9/os.py\", line 215, in makedirs\r\n    makedirs(head, exist_ok=exist_ok)\r\n\r\n  File \"/opt/conda/lib/python3.9/os.py\", line 225, in makedirs\r\n    mkdir(name, mode)\r\n\r\nPermissionError: [Errno 13] Permission denied: 'skrelan'\r\n```\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/511",
    "state": "open",
    "labels": [
      "support",
      "spaces"
    ],
    "created_at": "2023-10-16T08:29:06Z",
    "updated_at": "2023-12-17T02:58:52Z",
    "comments": 3,
    "user": "Skrelan"
  },
  {
    "repo": "huggingface/candle",
    "number": 1105,
    "title": "How to run a model in Fp16?",
    "body": "EDIT: Never mind, see below comment ",
    "url": "https://github.com/huggingface/candle/issues/1105",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-16T03:32:16Z",
    "updated_at": "2023-10-18T19:40:54Z",
    "user": "joeyballentine"
  },
  {
    "repo": "huggingface/candle",
    "number": 1104,
    "title": "How to load .pth file weights?",
    "body": "I've been experimenting with candle and re-implementing ESRGAN in it. I ended up needing to convert a couple .pth files I have into .safetensors format in python in order to load them into the VarBuilder. I saw on the docs you say this supports loading pytorch weights directly though, but there does not seem to be an example on how to do that. I looked into the pickle module included in the library and got as far as being able to read the weights into a pickle format with TensorInfo, but then I got stuck trying to convert those to tensors and get it in a format VarBuilder would accept.\r\n\r\nAn example on how to either load these weights or convert them to safetensors format in rust would be great, thanks!",
    "url": "https://github.com/huggingface/candle/issues/1104",
    "state": "open",
    "labels": [],
    "created_at": "2023-10-16T03:29:53Z",
    "updated_at": "2023-10-19T22:01:42Z",
    "user": "joeyballentine"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6303,
    "title": "Parquet uploads off-by-one naming scheme",
    "body": "### Describe the bug\n\nI noticed this numbering scheme not matching up in a different project and wanted to raise it as an issue for discussion, what is the actual proper way to have these stored?\r\n\r\n<img width=\"425\" alt=\"image\" src=\"https://github.com/huggingface/datasets/assets/1981179/3ffa2144-7c9a-446f-b521-a5e9db71e7ce\">\r\n\r\nThe `-SSSSS-of-NNNNN` seems to be used widely across the codebase. The section that creates the part in my screenshot is here https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L5287\r\nThere are also some edits to this section in the single commit branch.\n\n### Steps to reproduce the bug\n\n1. Upload a dataset that requires at least two parquet files in it\r\n2. Observe the naming scheme\n\n### Expected behavior\n\nThe couple options here are of course **1. keeping it as is**\r\n\r\n**2. Starting the index at 1:**\r\ntrain-00001-of-00002-{hash}.parquet\r\ntrain-00002-of-00002-{hash}.parquet\r\n\r\n**3. My preferred option** (which would solve my specific issue), dropping the total entirely:\r\ntrain-00000-{hash}.parquet\r\ntrain-00001-{hash}.parquet\r\n\r\nThis also solves an issue that will occur with an `append` variable for `push_to_hub` (see https://github.com/huggingface/datasets/issues/6290) where as you add a new parquet file, you need to rename everything in the repo as well. \r\n\r\nHowever, I know there are parts of the repo that use 0 as the starting file or may require the total, so raising the question for discussion.\r\n\n\n### Environment info\n\n- `datasets` version: 2.14.6.dev0\r\n- Platform: macOS-14.0-arm64-arm-64bit\r\n- Python version: 3.10.12\r\n- Huggingface_hub version: 0.18.0\r\n- PyArrow version: 12.0.1\r\n- Pandas version: 1.5.3",
    "url": "https://github.com/huggingface/datasets/issues/6303",
    "state": "open",
    "labels": [],
    "created_at": "2023-10-14T18:31:03Z",
    "updated_at": "2023-10-16T16:33:21Z",
    "comments": 4,
    "user": "ZachNagengast"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5392,
    "title": "How to train an unconditional latent diffusion model ?",
    "body": "It seems that there is only one available unconditional LDM model (CompVis/ldm-celebahq-256). \r\n```python\r\npipeline = LDMPipeline.from_pretrained(\"CompVis/ldm-celebahq-256\")\r\n```\r\nHow can I train this unconditional model on my own dataset? The LDM model includes the training of both `VQModel` and `UNet2DModel`, but the [official training examples](https://github.com/huggingface/diffusers/blob/main/examples/unconditional_image_generation/train_unconditional.py) seem not to be fully applicable.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/5392",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-14T03:32:34Z",
    "updated_at": "2024-02-16T08:59:49Z",
    "user": "Rashfu"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 368,
    "title": "Streaming weights into a model directly?",
    "body": "### Feature request\r\n\r\nHi! I'm curious whether there is a way to stream model weights from disk into the on-GPU model directly?\r\n\r\nThat is, [I see](https://huggingface.co/docs/safetensors/speed#gpu-benchmark) that by settings `os.environ[\"SAFETENSORS_FAST_GPU\"] = \"1\"` and using `load_file`, you can stream the weights themselves from disk to GPU. But if I understand correctly, one still has to wait for all of the weights to be moved to GPU before they can subsequently be loaded into the model itself: first load the weights to GPU by some means (possibly streaming), then `model.load(weights)`, schematically. \r\n\r\nIs there a way to overlap the loading-into-model step with the streaming from disk?\r\n\r\nIs something like that possible? Or already implemented somewhere?\r\n\r\n### Motivation\r\n\r\nFaster model loading.\r\n\r\n### Your contribution\r\n\r\nI don't know `rust`, but would be happy to contribute `python`-side. Just not sure if the request is feasible.",
    "url": "https://github.com/huggingface/safetensors/issues/368",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-10-13T15:21:33Z",
    "updated_at": "2023-12-11T01:48:41Z",
    "comments": 1,
    "user": "garrett361"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 1734,
    "title": "Docs request: what is loaded/loadable?",
    "body": "When working with `get_model_status`: https://huggingface.co/docs/huggingface_hub/main/en/package_reference/inference_client#huggingface_hub.InferenceClient.get_model_status\r\n\r\nIt tells you if the model is loadable and/or loaded.  The question is, what does this mean?\r\n- What does \"loaded\" mean... what is it loaded into?\r\n- If something isn't loaded, but is loadable, how can one load it?",
    "url": "https://github.com/huggingface/huggingface_hub/issues/1734",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-13T04:59:47Z",
    "updated_at": "2023-10-17T14:18:11Z",
    "user": "jamesbraza"
  },
  {
    "repo": "huggingface/trl",
    "number": 868,
    "title": "What is the difference of these two saved checkpoints in sft_llama2 example?",
    "body": "I am trying to understand this\r\nhttps://github.com/huggingface/trl/blob/main/examples/research_projects/stack_llama_2/scripts/sft_llama2.py#L206C1-L206C1\r\n\r\n`trainer.model.save_pretrained(output_dir)` seems already saves the base+lora model to the \"final_checkpoint\".\r\nThen what is doing here `model = model.merge_and_unload()` and save it again to \"final_merged_checkpoint\"?\r\n```\r\ntrainer.save_model(script_args.output_dir)\r\n\r\noutput_dir = os.path.join(script_args.output_dir, \"final_checkpoint\")\r\ntrainer.model.save_pretrained(output_dir)\r\n\r\n# Free memory for merging weights\r\ndel base_model\r\ntorch.cuda.empty_cache()\r\n\r\nmodel = AutoPeftModelForCausalLM.from_pretrained(output_dir, device_map=\"auto\", torch_dtype=torch.bfloat16)\r\nmodel = model.merge_and_unload()\r\n\r\noutput_merged_dir = os.path.join(script_args.output_dir, \"final_merged_checkpoint\")\r\nmodel.save_pretrained(output_merged_dir, safe_serialization=True)\r\n```",
    "url": "https://github.com/huggingface/trl/issues/868",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-13T04:31:57Z",
    "updated_at": "2023-10-30T17:15:35Z",
    "user": "Emerald01"
  },
  {
    "repo": "huggingface/blog",
    "number": 1577,
    "title": "How to use mAP metric for object detection task?",
    "body": "I use pretrained checkpoint `facebook/detr-resnet-50` \r\nHow can I use mAP for metric evaluating?\r\n```\r\ncheckpoint = \"facebook/detr-resnet-50\"\r\nmodel = AutoModelForObjectDetection.from_pretrained(\r\n    checkpoint, ..., ignore_mismatched_sizes=True,\r\n)\r\n\r\nmetric = evaluate.load('repllabs/mean_average_precision')\r\n\r\ndef compute_metrics(eval_pred):\r\n    logits, labels = eval_pred\r\n    predictions = np.argmax(logits, axis=-1)\r\n    return metric.compute(predictions=predictions, references=labels)\r\n\r\ntrainer = Trainer(\r\n    model=model,\r\n    args=training_args,\r\n    data_collator=collate_fn,\r\n    train_dataset=dataset[\"train\"].with_transform(transform_aug_ann),\r\n    eval_dataset=dataset[\"test\"].with_transform(transform_aug_ann),\r\n    compute_metrics=compute_metrics,\r\n    tokenizer=image_processor,\r\n)\r\n```\r\nI tried this way, but I have some errors here",
    "url": "https://github.com/huggingface/blog/issues/1577",
    "state": "open",
    "labels": [],
    "created_at": "2023-10-12T13:58:52Z",
    "updated_at": "2023-12-04T12:01:33Z",
    "user": "IamSVP94"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2051,
    "title": "Accelerate Examples: What is expected to print on terminal?",
    "body": "### System Info\r\n\r\n```Shell\r\n- `Accelerate` version: 0.23.0\r\n- Platform: Linux-5.4.0-121-generic-x86_64-with-glibc2.31\r\n- Python version: 3.10.13\r\n- Numpy version: 1.26.0\r\n- PyTorch version (GPU?): 1.13.1 (True)\r\n- PyTorch XPU available: False\r\n- PyTorch NPU available: False\r\n- System RAM: 1007.69 GB\r\n- GPU type: NVIDIA A100-SXM4-40GB\r\n- `Accelerate` default config:\r\n        - compute_environment: LOCAL_MACHINE\r\n        - distributed_type: MULTI_GPU\r\n        - mixed_precision: fp16\r\n        - use_cpu: False\r\n        - debug: False\r\n        - num_processes: 2\r\n        - machine_rank: 0\r\n        - num_machines: 1\r\n        - gpu_ids: 3,4\r\n        - rdzv_backend: static\r\n        - same_network: True\r\n        - main_training_function: main\r\n        - downcast_bf16: no\r\n        - tpu_use_cluster: False\r\n        - tpu_use_sudo: False\r\n        - tpu_env: []\r\n```\r\n\r\n\r\n### Information\r\n\r\n- [X] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [X] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nI was trying to run a simple example (`nlp_example.py`) to kind of perform the equivalent of a hello world task in accelerate, but unfortunately, I'm uncertain as to whether it's working correctly, and I'm somewhat embarrassed to have to post this issue ticket to seek assistance. \ud83d\ude05\r\n\r\nI ran `$ python examples/nlp_example.py --cpu ` and got this output:\r\n\r\n```bash\r\nSome weights of BertForSequenceClassification were not initialized from the model checkpoint at bert-base-cased and are newly initialized: ['classifier.bias', 'classifier.weight']\r\nYou should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\r\nYou're using a BertTokenizerFast tokenizer. Please note that with a fast tokenizer, using the `__call__` method is faster than using a method to encode the text followed by a call to the `pad` method to get a padded encoding.\r\n```\r\n\r\nI believe the program continues to run after the above message is printed because control of the terminal's prompt isn't returned to me.\r\n\r\nThere isn't a tqdm bar, progress bar, or signs of life of some sort to indicate that the example was running.\r\n\r\nWould be great if someone who has some success at running any basic accelerate example scripts to chime in \ud83d\ude42\r\n\r\n### Expected behavior\r\n\r\nSigns of life of some sort to indicate that the example is running fine.",
    "url": "https://github.com/huggingface/accelerate/issues/2051",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-12T13:50:40Z",
    "updated_at": "2023-10-12T15:06:44Z",
    "user": "davidleejy"
  },
  {
    "repo": "pytorch/examples",
    "number": 1194,
    "title": "resume train",
    "body": "when I try to resume trainImagenet\uff0cthis happens\uff0cHow to solve this problem\uff1f\r\n\r\n![Snipaste_2023-10-12_19-38-46](https://github.com/pytorch/examples/assets/52640516/dd20ff95-bdde-4448-847b-e5d73779191d)\r\n![image](https://github.com/pytorch/examples/assets/52640516/5a5a3f0c-9209-41fa-9339-dc64ee693298)\r\n",
    "url": "https://github.com/pytorch/examples/issues/1194",
    "state": "open",
    "labels": [],
    "created_at": "2023-10-12T11:39:48Z",
    "updated_at": "2024-05-31T06:03:55Z",
    "comments": 2,
    "user": "hefangnan"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1137,
    "title": "When I start the model, I get a warning message. I want to know why and how to solve it.",
    "body": "### System Info\r\n\r\n\r\n- OS version: Debian GNU/Linux 11 (bullseye)\r\n- Commit sha: 00b8f36fba62e457ff143cce35564ac6704db860\r\n- Cargo version: 1.70.0\r\n- model: Starcoder\r\n- nvidia-smi:\r\n```\r\nThu Oct 12 18:23:03 2023\r\n   +---------------------------------------------------------------------------------------+\r\n   | NVIDIA-SMI 535.54.03              Driver Version: 535.54.03    CUDA Version: 12.2     |\r\n   |-----------------------------------------+----------------------+----------------------+\r\n   | GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |\r\n   | Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |\r\n   |                                         |                      |               MIG M. |\r\n   |=========================================+======================+======================|\r\n   |   0  NVIDIA A800-SXM4-80GB          On  | 00000000:4B:00.0 Off |                    0 |\r\n   | N/A   29C    P0              73W / 400W |  36679MiB / 81920MiB |      0%      Default |\r\n   |                                         |                      |             Disabled |\r\n   +-----------------------------------------+----------------------+----------------------+\r\n   |   1  NVIDIA A800-SXM4-80GB          On  | 00000000:51:00.0 Off |                    0 |\r\n   | N/A   31C    P0              62W / 400W |      5MiB / 81920MiB |      0%      Default |\r\n   |                                         |                      |             Disabled |\r\n   +-----------------------------------------+----------------------+----------------------+\r\n   |   2  NVIDIA A800-SXM4-80GB          On  | 00000000:6A:00.0 Off |                    0 |\r\n   | N/A   31C    P0              61W / 400W |      5MiB / 81920MiB |      0%      Default |\r\n   |                                         |                      |             Disabled |\r\n   +-----------------------------------------+----------------------+----------------------+\r\n   |   3  NVIDIA A800-SXM4-80GB          On  | 00000000:6F:00.0 Off |                    0 |\r\n   | N/A   29C    P0              61W / 400W |      5MiB / 81920MiB |      0%      Default |\r\n   |                                         |                      |             Disabled |\r\n   +-----------------------------------------+----------------------+----------------------+\r\n   |   4  NVIDIA A800-SXM4-80GB          On  | 00000000:8D:00.0 Off |                    0 |\r\n   | N/A   28C    P0              61W / 400W |      5MiB / 81920MiB |      0%      Default |\r\n   |                                         |                      |             Disabled |\r\n   +-----------------------------------------+----------------------+----------------------+\r\n   |   5  NVIDIA A800-SXM4-80GB          On  | 00000000:92:00.0 Off |                    0 |\r\n   | N/A   30C    P0              62W / 400W |      5MiB / 81920MiB |      0%      Default |\r\n   |                                         |                      |             Disabled |\r\n   +-----------------------------------------+----------------------+----------------------+\r\n   |   6  NVIDIA A800-SXM4-80GB          On  | 00000000:C9:00.0 Off |                    0 |\r\n   | N/A   32C    P0              67W / 400W |  78233MiB / 81920MiB |      0%      Default |\r\n   |                                         |                      |             Disabled |\r\n   +-----------------------------------------+----------------------+----------------------+\r\n   |   7  NVIDIA A800-SXM4-80GB          On  | 00000000:CF:00.0 Off |                    0 |\r\n   | N/A   29C    P0              58W / 400W |      5MiB / 81920MiB |      0%      Default |\r\n   |                                         |                      |             Disabled |\r\n   +-----------------------------------------+----------------------+----------------------+\r\n\r\n   +---------------------------------------------------------------------------------------+\r\n   | Processes:                                                                            |\r\n   |  GPU   GI   CI        PID   Type   Process name                            GPU Memory |\r\n   |        ID   ID                                                             Usage      |\r\n   |=======================================================================================|\r\n   +---------------------------------------------------------------------------------------+\r\n```\r\n\r\n\r\n### Information\r\n\r\n- [ ] Docker\r\n- [X] The CLI directly\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported command\r\n- [X] My own modifications\r\n\r\n### Reproduction\r\n\r\nMy execution command is:\r\n\r\n```\r\nCUDA_VISIBLE_DEVICES=0 /workspace/xieshijie/text-generation-inference/target/release/deps/text_generation_launcher-b64a71565ded74a5 --model-id /workspace/xieshijie/huggingface-models/starcoder2/models--bigcode--starcoder/snapshots/e117ab3b3d0769fd962bd48b099de711757a3d60 --port 6006 --max-input-length 8000 --max-total-tokens 8192 --max-batch-prefill",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1137",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-12T10:33:38Z",
    "updated_at": "2023-10-19T07:02:58Z",
    "user": "coder-xieshijie"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6299,
    "title": "Support for newer versions of JAX",
    "body": "### Feature request\r\n\r\nHi,\r\n\r\nI like your idea of adapting the datasets library to be usable with JAX. Thank you for that.\r\n\r\nHowever, in your [setup.py](https://github.com/huggingface/datasets/blob/main/setup.py), you enforce old versions of JAX <= 0.3... It is very cumbersome !\r\n\r\nWhat is the rationale for such a limitation ? Can you remove it please ?\r\n\r\nThanks,\r\n\r\n### Motivation\r\n\r\nThis library is unusable with new versions of JAX ?\r\n\r\n### Your contribution\r\n\r\nYes.",
    "url": "https://github.com/huggingface/datasets/issues/6299",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-10-12T10:03:46Z",
    "updated_at": "2023-10-12T16:28:59Z",
    "comments": 0,
    "user": "ddrous"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5372,
    "title": "How to use safety_checker in StableDiffusionXLPipeline?",
    "body": "### Describe the bug\r\n\r\nI want to use safety_checker in StableDiffusionXLPipeline, but it seems that `safety_checker` keyword does not take effect\r\n\r\n### Reproduction\r\n\r\n```python\r\npipe = StableDiffusionXLPipeline.from_pretrained(\r\n    \"nyxia/mysterious-xl\",\r\n    torch_dtype=torch.float16,\r\n    safety_checker = StableDiffusionSafetyChecker.from_pretrained(\"CompVis/stable-diffusion-safety-checker\"),\r\n).to(\"cuda\")\r\npipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)\r\nresult = pipe(\r\n        prompt=\"1girl\",\r\n)\r\n```\r\n\r\n### Logs\r\n\r\nI got folling error\r\n\r\n```shell\r\n\r\nKeyword arguments {'safety_checker': StableDiffusionSafetyChecker(\r\n  (vision_model): CLIPVisionModel(\r\n    (vision_model): CLIPVisionTransformer(\r\n      (embeddings): CLIPVisionEmbeddings(\r\n        (patch_embedding): Conv2d(3, 1024, kernel_size=(14, 14), stride=(14, 14), bias=False)\r\n        (position_embedding): Embedding(257, 1024)\r\n      )\r\n      (pre_layrnorm): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\r\n      (encoder): CLIPEncoder(\r\n        (layers): ModuleList(\r\n          (0-23): 24 x CLIPEncoderLayer(\r\n            (self_attn): CLIPAttention(\r\n              (k_proj): Linear(in_features=1024, out_features=1024, bias=True)\r\n              (v_proj): Linear(in_features=1024, out_features=1024, bias=True)\r\n              (q_proj): Linear(in_features=1024, out_features=1024, bias=True)\r\n              (out_proj): Linear(in_features=1024, out_features=1024, bias=True)\r\n            )\r\n            (layer_norm1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\r\n            (mlp): CLIPMLP(\r\n              (activation_fn): QuickGELUActivation()\r\n              (fc1): Linear(in_features=1024, out_features=4096, bias=True)\r\n              (fc2): Linear(in_features=4096, out_features=1024, bias=True)\r\n            )\r\n            (layer_norm2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\r\n          )\r\n        )\r\n      )\r\n      (post_layernorm): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\r\n    )\r\n  )\r\n  (visual_projection): Linear(in_features=1024, out_features=768, bias=False)\r\n)} are not expected by StableDiffusionXLPipeline and will be ignored.\r\n```\r\n\r\n\r\n### System Info\r\n\r\n- `diffusers` version: 0.20.0\r\n- Platform: Linux-5.4.0-148-generic-x86_64-with-glibc2.31\r\n- Python version: 3.10.6\r\n- PyTorch version (GPU?): 2.0.1+cu117 (True)\r\n- Huggingface_hub version: 0.17.3\r\n- Transformers version: 4.34.0\r\n- Accelerate version: 0.23.0\r\n- xFormers version: 0.0.22\r\n- Using GPU in script?:  yes\r\n\r\n### Who can help?\r\n\r\n@yiyixuxu @sayakpaul @DN6 @patrickvonplaten\r\n\r\nthanks for your kindly help",
    "url": "https://github.com/huggingface/diffusers/issues/5372",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-10-12T03:39:23Z",
    "updated_at": "2023-10-12T08:13:28Z",
    "user": "hundredwz"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 354,
    "title": "[Question] Whisper Progress",
    "body": "Is it possible to obtain the transcription progress of Whisper's model, ranging from 0 to 100%?",
    "url": "https://github.com/huggingface/transformers.js/issues/354",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-10-11T20:41:01Z",
    "updated_at": "2025-05-23T10:12:13Z",
    "user": "FelippeChemello"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1131,
    "title": "How to send a request with system, user and assistant prompt?",
    "body": "How to send in a request prompt(system, user or assistant)  like chatgpt where we can specify to out of 3 categories, does the prompt belong?",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1131",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-10-11T09:21:14Z",
    "updated_at": "2024-01-10T17:26:12Z",
    "user": "ShRajSh"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1962,
    "title": "Install dependency `music_tag`?",
    "body": "Requested here: https://huggingface.co/datasets/zeio/baneks-speech/discussions/1",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1962",
    "state": "closed",
    "labels": [
      "question",
      "custom package install",
      "P2"
    ],
    "created_at": "2023-10-11T08:07:53Z",
    "updated_at": "2024-02-02T17:18:50Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6292,
    "title": "how to load the image of dtype float32 or float64",
    "body": "_FEATURES = datasets.Features(\r\n    {\r\n        \"image\": datasets.Image(),\r\n        \"text\": datasets.Value(\"string\"),\r\n    },\r\n)\r\nThe datasets builder seems only support the unit8 data. How to load the float dtype data? ",
    "url": "https://github.com/huggingface/datasets/issues/6292",
    "state": "open",
    "labels": [],
    "created_at": "2023-10-11T07:27:16Z",
    "updated_at": "2023-10-11T13:19:11Z",
    "user": "wanglaofei"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1442,
    "title": "Steps to quantize Llama 2 models for CPU inference",
    "body": "Team,\r\n\r\ncould you please share the steps to quantize the Llama 2 models for CPU inference.\r\nWhen i followed the ORTModelForCasualLM, faced challenges stating token is 401 forbidden even though token passed.\r\nFor offline model faced issue something related to cannot load from local directory.\r\n\r\nPlease share steps.",
    "url": "https://github.com/huggingface/optimum/issues/1442",
    "state": "open",
    "labels": [
      "question",
      "quantization"
    ],
    "created_at": "2023-10-11T05:32:58Z",
    "updated_at": "2024-10-15T16:19:59Z",
    "user": "eswarthammana"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1956,
    "title": "upgrade hfh to 0.18.0?",
    "body": "https://github.com/huggingface/huggingface_hub/releases/tag/v0.18.0",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1956",
    "state": "closed",
    "labels": [
      "question",
      "blocked-by-upstream",
      "dependencies",
      "P2"
    ],
    "created_at": "2023-10-10T12:33:04Z",
    "updated_at": "2023-11-16T11:47:04Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5353,
    "title": "How to use FreeU in SimpleCrossAttnUpBlock2D?",
    "body": "I've tried to change your code in order to maintain SimpleCrossAttnUpBlock2D however it seems that shapes doesn't fit up. How can I do it? Thanks! \r\n \r\n```Traceback (most recent call last):\r\n  File \"/usr/local/lib/python3.9/dist-packages/gradio/routes.py\", line 523, in run_predict\r\n    output = await app.get_blocks().process_api(\r\n  File \"/usr/local/lib/python3.9/dist-packages/gradio/blocks.py\", line 1437, in process_api\r\n    result = await self.call_function(\r\n  File \"/usr/local/lib/python3.9/dist-packages/gradio/blocks.py\", line 1109, in call_function\r\n    prediction = await anyio.to_thread.run_sync(\r\n  File \"/usr/local/lib/python3.9/dist-packages/anyio/to_thread.py\", line 33, in run_sync\r\n    return await get_asynclib().run_sync_in_worker_thread(\r\n  File \"/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py\", line 877, in run_sync_in_worker_thread\r\n    return await future\r\n  File \"/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py\", line 807, in run\r\n    result = context.run(func, *args)\r\n  File \"/usr/local/lib/python3.9/dist-packages/gradio/utils.py\", line 865, in wrapper\r\n    response = f(*args, **kwargs)\r\n  File \"/home/ubuntu/mimesis-ml-gan-backend/app.py\", line 128, in generate\r\n    image = pipe(image=input_image,\r\n  File \"/usr/lib/python3.9/site-packages/torch/utils/_contextlib.py\", line 115, in decorate_context\r\n    return func(*args, **kwargs)\r\n  File \"/home/ubuntu/mimesis-ml-gan-backend/src/diffusions/kandinsky/pipeline_kandinsky_img2img_scheduler.py\", line 125, in __call__\r\n    noise_pred = self.unet(\r\n  File \"/usr/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 1501, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"/usr/lib/python3.9/site-packages/diffusers/models/unet_2d_condition.py\", line 1020, in forward\r\n    sample = upsample_block(\r\n  File \"/usr/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 1501, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"/home/ubuntu/mimesis-ml-gan-backend/free_lunch_utils.py\", line 166, in forward\r\n    hidden_states = torch.cat([hidden_states, res_hidden_states], dim=1)\r\nRuntimeError: Tensors must have same number of dimensions: got 3 and 4 ```\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/5353",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-10T09:13:22Z",
    "updated_at": "2023-10-11T05:11:38Z",
    "user": "americanexplorer13"
  },
  {
    "repo": "huggingface/computer-vision-course",
    "number": 25,
    "title": "Should we use safetensors?",
    "body": "I wondered if we should add an official recommendation to use the `safetensors` saving format wherever possible.\r\n\r\nBut I have to admit, that I'm not that familiar with it, so I don't know how much overhead it would be in cases where we cannot use a HF library like `transformers`.",
    "url": "https://github.com/huggingface/computer-vision-course/issues/25",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-10-09T19:38:39Z",
    "updated_at": "2023-10-11T20:50:32Z",
    "user": "johko"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1362,
    "title": "When decoding an English sentence with the 'add_prefix_space' parameter set to 'False,' how can I add spaces?",
    "body": "I train a tokenizer and set 'add_prefix_space' to 'False', How can I ensure that BBPE tokenizers correctly handle space division when decoding a sequence ?\r\n```\r\nnormalizer = normalizers.Sequence([NFC(), StripAccents()])\r\ntokenizer.normalizer = normalizer\r\ntokenizer.pre_tokenizer = pre_tokenizers.Sequence(\r\n    [Whitespace(), Punctuation(), Digits(individual_digits=True), UnicodeScripts(),\r\n     ByteLevel(add_prefix_space=False, use_regex=True), ])\r\ntokenizer.decoder = decoders.ByteLevel(add_prefix_space=False, use_regex=True)\r\ntokenizer.post_processor = tokenizers.processors.ByteLevel()\r\n```\r\n",
    "url": "https://github.com/huggingface/tokenizers/issues/1362",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-09T16:19:43Z",
    "updated_at": "2023-10-30T14:25:24Z",
    "user": "enze5088"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1952,
    "title": "filter parameter should accept any character?",
    "body": "https://datasets-server.huggingface.co/filter?dataset=polinaeterna/delays_nans&config=default&split=train&where=string_col=\u0439\u043e\u043f\u0442\u0430&offset=0&limit=100\r\n\r\ngives an error\r\n\r\n```\r\n{\"error\":\"Parameter 'where' is invalid\"}\r\n```",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1952",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "P1"
    ],
    "created_at": "2023-10-09T13:59:20Z",
    "updated_at": "2023-10-09T17:26:15Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 495,
    "title": "Make the description customizable in the .env",
    "body": "I'd like to customize the description of chat-ui as marked below. But I can't find how to do it in your tutorial, README.md.\r\nIt would be highly appreciated if you assist.\r\n\r\n![image](https://github.com/huggingface/chat-ui/assets/142883089/046d3926-ddef-4da8-87a7-8771db218976)\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/495",
    "state": "closed",
    "labels": [
      "enhancement",
      "good first issue",
      "front",
      "hacktoberfest"
    ],
    "created_at": "2023-10-09T13:57:32Z",
    "updated_at": "2023-10-13T13:49:47Z",
    "comments": 7,
    "user": "sjbpsh"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6287,
    "title": "map() not recognizing \"text\"",
    "body": "### Describe the bug\n\nThe [map() documentation](https://huggingface.co/docs/datasets/v2.14.5/en/package_reference/main_classes#datasets.Dataset.map) reads:\r\n`\r\nds = ds.map(lambda x: tokenizer(x['text'], truncation=True, padding=True), batched=True)`\r\n\r\nI have been trying to reproduce it in my code as:\r\n\r\n`tokenizedDataset = dataset.map(lambda x: tokenizer(x['text']), batched=True)`\r\n\r\nBut it doesn't work as it throws the error:\r\n\r\n> KeyError: 'text'\r\n\r\nCan you please guide me on how to fix it?\r\n\r\n\n\n### Steps to reproduce the bug\n\n1. `from datasets import load_dataset\r\n\r\ndataset = load_dataset(\"amazon_reviews_multi\")`\r\n\r\n2. Then this code: `from transformers import AutoTokenizer\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(\"bert-base-cased\")`\r\n3. The line I quoted above (which I have been trying)\n\n### Expected behavior\n\nAs mentioned in the documentation, it should run without any error and map the tokenization on the whole dataset.\n\n### Environment info\n\nPython 3.10.2",
    "url": "https://github.com/huggingface/datasets/issues/6287",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-09T10:27:30Z",
    "updated_at": "2023-10-11T20:28:45Z",
    "comments": 1,
    "user": "EngineerKhan"
  },
  {
    "repo": "pytorch/xla",
    "number": 5687,
    "title": "Through step_trace api profile xla program, but the result cannot be opened using Tensorboard",
    "body": "## \u2753 Questions and Help\r\ntensorboard will report this error: Failed to load libcupti (is it installed and accessible?)\r\nbut I think load libcupti is success\u3002I use the blew command\uff0cwill get correct load info\r\nlsof -p 430621 | grep cup\r\npython  430621 root  mem       REG             253,17   7199856  104860301 /usr/local/cuda-11.8/targets/x86_64-linux/lib/libcupti.so.2022.3.0\r\n",
    "url": "https://github.com/pytorch/xla/issues/5687",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-10-09T08:06:30Z",
    "updated_at": "2025-04-29T13:11:27Z",
    "user": "mars1248"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5337,
    "title": "What is the function of `callback` in stable diffusion?",
    "body": "I am reading the source code for stable diffusion pipeline. I wonder what is the function of `callback`? How to use it? Is there an example?\r\n\r\nhttps://github.com/huggingface/diffusers/blob/29f15673ed5c14e4843d7c837890910207f72129/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L585C13-L585C21",
    "url": "https://github.com/huggingface/diffusers/issues/5337",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-10-09T06:02:13Z",
    "updated_at": "2023-11-16T15:05:20Z",
    "user": "g-jing"
  },
  {
    "repo": "huggingface/open-muse",
    "number": 122,
    "title": "How to finetune the muse-512\uff1f",
    "body": "Thank you for your contributions to the open-source community. After testing your weights, we found that the fine-tuned muse-512 has made significant improvements in image quality. We are very interested in this and would like to know how you performed the fine-tuning on the model. For example, what dataset did you use for fine-tuning? Is it open-source? What are its characteristics? Once again, we appreciate your contributions to the open-source community.",
    "url": "https://github.com/huggingface/open-muse/issues/122",
    "state": "open",
    "labels": [],
    "created_at": "2023-10-09T05:00:54Z",
    "updated_at": "2023-10-09T05:00:54Z",
    "user": "jiaxiangc"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5335,
    "title": "how to deploy locally as chinese gov has block huggingface?",
    "body": "### Describe the bug\n\ngot all the models ckpt safetensor, it still try to connect the /CompVis/stable-diffusion/main/configs/stable-diffusion/v1-infer\n\n### Reproduction\n\npipe = diffusers.StableDiffusionPipeline.from_single_file(base_model,\r\n                                                              torch_dtype=torch.float16,\r\n                                                              use_safetensors=True,\r\n                                                              safety_checker=None,)\n\n### Logs\n\n_No response_\n\n### System Info\n\nPlatform: Win10\r\nPython version: 3.10.11\r\nPyTorch version (GPU?): 2.0.1+cu118\r\ndiffusers version: 0.16.1\r\nTransformers version: 4.26.0\r\nAccelerate version: 0.15.0\r\nxFormers version: not installed\r\nUsing GPU in script?: 3070\r\nUsing distributed or parallel set-up in script?: No\n\n### Who can help?\n\n@yiyixuxu @DN6 @patrickvonplaten @sayakpaul @patrickvonplaten",
    "url": "https://github.com/huggingface/diffusers/issues/5335",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2023-10-09T01:55:44Z",
    "updated_at": "2024-01-17T10:44:31Z",
    "user": "Louis24"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 485,
    "title": "chat-ui and TGI Connect Timeout Error",
    "body": "Hi, I used TGI as a backend for llama2, when I put TGI endpoints in chat-ui, TGI and chat-ui is in same mechine but it cannot connect. would you give me some suggestions? thank you!\r\n\r\nTGI work well.\r\n```shell\r\ncurl http://127.0.0.1:8081/generate_stream \\\r\n    -X POST \\\r\n    -d '{\"inputs\":\"What is Deep Learning?\",\"parameters\":{\"max_new_tokens\":20}}' \\\r\n    -H 'Content-Type: application/json'\r\n    \r\ndata:{\"token\":{\"id\":13,\"text\":\"\\n\",\"logprob\":-0.45239258,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":13,\"text\":\"\\n\",\"logprob\":-0.5541992,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":2772,\"text\":\"De\",\"logprob\":-0.016738892,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":1022,\"text\":\"ep\",\"logprob\":-0.000002503395,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":6509,\"text\":\" learning\",\"logprob\":-0.026168823,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":30081,\"text\":\" \",\"logprob\":-0.08898926,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":29898,\"text\":\"(\",\"logprob\":-0.0023441315,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":15189,\"text\":\"also\",\"logprob\":-0.0006175041,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":2998,\"text\":\" known\",\"logprob\":-0.000029087067,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":408,\"text\":\" as\",\"logprob\":-7.1525574e-7,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":30081,\"text\":\" \",\"logprob\":-0.0052261353,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":24535,\"text\":\"deep\",\"logprob\":-0.0019664764,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":2281,\"text\":\" struct\",\"logprob\":-0.0007429123,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":2955,\"text\":\"ured\",\"logprob\":-0.000027537346,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":6509,\"text\":\" learning\",\"logprob\":-0.000081300735,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":29897,\"text\":\")\",\"logprob\":-0.00006067753,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":338,\"text\":\" is\",\"logprob\":-0.00009846687,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":760,\"text\":\" part\",\"logprob\":-0.000022292137,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":310,\"text\":\" of\",\"logprob\":-3.5762787e-7,\"special\":false},\"generated_text\":null,\"details\":null}\r\n\r\ndata:{\"token\":{\"id\":263,\"text\":\" a\",\"logprob\":-0.00013446808,\"special\":false},\"generated_text\":\"\\n\\nDeep learning (also known as deep structured learning) is part of a\",\"details\":null}    \r\n```\r\n\r\nchat-ui **.env.local**  MODELS config:\r\n\r\n```shell\r\nMODELS=`[\r\n{\r\n        \"name\": \"Trelis/Llama-2-7b-chat-hf-function-calling\",\r\n        \"datasetName\": \"Trelis/function_calling_extended\",\r\n        \"description\": \"function calling Llama-7B-chat\",\r\n        \"websiteUrl\": \"https://research.Trelis.com\",\r\n        \"userMessageToken\": \"\",\r\n        \"userMessageEndToken\": \" [/INST] \",\r\n        \"assistantMessageToken\": \"\",\r\n        \"assistantMessageEndToken\": \" </s><s>[INST] \",\r\n        \"chatPromptTemplate\" : \"<s>[INST] <<SYS>>\\nRespond in French to all questions\\n<</SYS>>\\n\\n{{#each messages}}{{#ifUser}}{{content}} [/INST] {{/ifUser}}{{#ifAssistant}}{{content}} </s><s>[INST] {{/ifAssistant}}{{/each}}\",\r\n        \"parameters\": {\r\n                \"temperature\": 0.01,\r\n                \"top_p\": 0.95,\r\n                \"repetition_penalty\": 1.2,\r\n                \"top_k\": 50,\r\n                \"truncate\": 1000,\r\n                \"max_new_tokens\": 1024\r\n        },\r\n        \"endpoints\": [{\r\n                \"url\": \"http://127.0.0.1:8081/generate_stream\"\r\n        }]\r\n    }\r\n]`   \r\n```\r\n\r\nerror message:\r\n\r\n```shell\r\n[vite] Error when evaluating SSR module /src/lib/server/websearch/sentenceSimilarity.ts:\r\n|- TypeError: fetch failed\r\n    at fetch (/root/chat-ui/node_modules/undici/index.js:109:13)\r\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at runNextTicks (node:internal/process/task_queues:64:3)\r\n    at process.processImmediate (node:internal/timers:447:9)\r\n    at async getModelFile (file:///root/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:468:24)\r\n    at async getModelJSON (file:///root/chat-ui/node_modules/@xenova/transformers/src/utils/hub.js:542:18)\r\n    at async Promise.all (index 0)\r\n    at async loadTokenizer (file:///root/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:56:16)\r\n    at async AutoTokenizer.from_pretrained (file:///root/chat-ui/node_modules/@xenova/transformers/src/tokenizers.js:3778:48)\r\n    at async Promise.all (index 0)\r\n\r\n2:32:29 PM [vite] Error when evaluating SSR module /src/lib/server/websearch/runWebSearch.",
    "url": "https://github.com/huggingface/chat-ui/issues/485",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-10-08T06:36:26Z",
    "updated_at": "2025-01-16T23:13:34Z",
    "comments": 8,
    "user": "ViokingTung"
  },
  {
    "repo": "huggingface/transformers",
    "number": 26665,
    "title": "How to resume training from a checkpoint when training LoRA using deepspeed\uff1f",
    "body": "### System Info\n\n- `transformers` version: 4.34.0.dev0\r\n- Platform: Linux-5.4.143.bsk.7-amd64-x86_64-with-glibc2.28\r\n- Python version: 3.10.12\r\n- Huggingface_hub version: 0.16.4\r\n- Safetensors version: 0.3.2\r\n- Accelerate version: 0.21.0\r\n- Accelerate config:    - compute_environment: LOCAL_MACHINE\r\n        - distributed_type: DEEPSPEED\r\n        - use_cpu: False\r\n        - num_processes: 1\r\n        - machine_rank: 0\r\n        - num_machines: 1\r\n        - rdzv_backend: static\r\n        - same_network: True\r\n        - main_training_function: main\r\n        - deepspeed_config: {'deepspeed_config_file': 'none', 'zero3_init_flag': False}\r\n        - downcast_bf16: no\r\n        - tpu_use_cluster: False\r\n        - tpu_use_sudo: False\r\n        - tpu_env: []\r\n        - dynamo_config: {'dynamo_backend': 'INDUCTOR', 'dynamo_mode': 'default', 'dynamo_use_dynamic': False, 'dynamo_use_fullgraph': False}\r\n- PyTorch version (GPU?): 2.0.1+cu117 (True)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\n\n### Who can help?\n\n@pacman100 @ArthurZucker @younesbelkada\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nWhen using deepspeed to train LoRA, I want to use the resume function of the trainer. The sample code is as follows:\r\n```python\r\ncausal_model = AutoModelForCausalLM.from_pretrained(model_pretrained_path_,\r\n                                                    config=config,\r\n                                                    trust_remote_code=True,\r\n                                                    low_cpu_mem_usage=self.params[\"low_cpu_mem_usage\"])\r\n\r\npeft = PEFT(config_path_or_data=peft_params)\r\ncausal_model = peft.get_peft_model(model=causal_model)\r\n\r\ntrainer = Seq2SeqTrainer(\r\n        params=trainer_params,\r\n        model=causal_model,\r\n        tokenizer=tokenizer,\r\n        train_dataset=train_dataset,\r\n        data_collator=data_collator,\r\n        eval_dataset=eval_dataset,\r\n        compute_metrics=dataset_t.metric,\r\n    )\r\n\r\ntrainer.train(resume_from_checkpoint=True)\r\n```\r\ndeepspeed config as follows:\r\n```json\r\n{\r\n    \"fp16\": {\r\n        \"enabled\": \"auto\",\r\n        \"loss_scale\": 0,\r\n        \"loss_scale_window\": 1000,\r\n        \"initial_scale_power\": 16,\r\n        \"hysteresis\": 2,\r\n        \"min_loss_scale\": 1\r\n    },\r\n    \"bf16\": {\r\n        \"enabled\": \"auto\"\r\n    },\r\n    \"zero_optimization\": {\r\n        \"stage\": 2,\r\n        \"cpu_offload\": false,\r\n        \"allgather_partitions\": true,\r\n        \"allgather_bucket_size\": 5e8,\r\n        \"overlap_comm\": true,\r\n        \"reduce_scatter\": true,\r\n        \"reduce_bucket_size\": 5e8,\r\n        \"contiguous_gradients\": true\r\n    },\r\n    \"gradient_accumulation_steps\": \"auto\",\r\n    \"gradient_clipping\": \"auto\",\r\n    \"steps_per_print\": 50,\r\n    \"train_batch_size\": \"auto\",\r\n    \"train_micro_batch_size_per_gpu\": \"auto\",\r\n    \"wall_clock_breakdown\": false\r\n}\r\n```\r\n\n\n### Expected behavior\n\nRuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument state_steps in method wrapper_CUDA___fused_adamw_)",
    "url": "https://github.com/huggingface/transformers/issues/26665",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-08T03:51:00Z",
    "updated_at": "2024-01-06T08:06:06Z",
    "user": "Sakurakdx"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 484,
    "title": "Rich text input for the chat bar?",
    "body": "Taking a nifty feature from the Claude API here, but models on HuggingChat or most models used with Chat UI, can process or fluently speak markdown. \r\n\r\nIt's pretty easy to take something like remarkable and turn Rich text, like titles, bolds and lists.     \r\nIt's helpful for users to organize content, to be able to highlight things, or put items in lists.\r\n\r\nHope for a feature like this",
    "url": "https://github.com/huggingface/chat-ui/issues/484",
    "state": "open",
    "labels": [
      "enhancement",
      "front"
    ],
    "created_at": "2023-10-07T19:25:45Z",
    "updated_at": "2023-10-09T00:20:09Z",
    "comments": 2,
    "user": "VatsaDev"
  },
  {
    "repo": "pytorch/vision",
    "number": 8026,
    "title": "How to make the RegionProposalNetwork generate more proposals in FasterRCNN?",
    "body": "I'm trying to update the proposal losses function of MaskRCNN to increase the recall. I'm trying to do this by adding a positive weight to the BCE function\r\n\r\nHow I create my proposal losses function:\r\n```\r\nCLASS_WEIGHTS = torch.tensor([50])\r\n\r\ndef compute_loss(\r\n        objectness: Tensor, pred_bbox_deltas: Tensor, labels: List[Tensor], regression_targets: List[Tensor]\r\n    ) -> Tuple[Tensor, Tensor]:\r\n    \"\"\"\r\n    Args:\r\n        objectness (Tensor)\r\n        pred_bbox_deltas (Tensor)\r\n        labels (List[Tensor])\r\n        regression_targets (List[Tensor])\r\n\r\n    Returns:\r\n        objectness_loss (Tensor)\r\n        box_loss (Tensor)\r\n    \"\"\"\r\n\r\n    sampled_pos_inds, sampled_neg_inds = model.rpn.fg_bg_sampler(labels)\r\n    sampled_pos_inds = torch.where(torch.cat(sampled_pos_inds, dim=0))[0]\r\n    sampled_neg_inds = torch.where(torch.cat(sampled_neg_inds, dim=0))[0]\r\n\r\n    sampled_inds = torch.cat([sampled_pos_inds, sampled_neg_inds], dim=0)\r\n\r\n    objectness = objectness.flatten()\r\n\r\n    labels = torch.cat(labels, dim=0)\r\n    regression_targets = torch.cat(regression_targets, dim=0)\r\n\r\n    box_loss = F.smooth_l1_loss(\r\n        pred_bbox_deltas[sampled_pos_inds],\r\n        regression_targets[sampled_pos_inds],\r\n        beta=1 / 9,\r\n        reduction=\"sum\",\r\n    ) / (sampled_inds.numel())\r\n\r\n    objectness_loss = F.binary_cross_entropy_with_logits(objectness[sampled_inds], labels[sampled_inds],\r\n                                                        pos_weight=CLASS_WEIGHTS # USE CLASS WEIGHT HERE\r\n                                                        )\r\n    return objectness_loss, box_loss\r\n```\r\n\r\nThen how I set the model to use this proposal losses function:\r\n```\r\nmodel = maskrcnn_resnet50_fpn(weights=MaskRCNN_ResNet50_FPN_Weights.DEFAULT)\r\nmodel.rpn.compute_loss = compute_loss\r\n```\r\n\r\nWhen I train the model now:\r\n- the **loss** increases significantly (e.g. before it was 1, now it is like 50, which is expected)\r\n- BUT the **recall** stays around the same (e.g. stagnates around 0.55 after training for several epochs)\r\n\r\nWhy is this the case? How do I get the recall to improve (i.e. how do I generate more proposals)?\r\n\r\n*FYI: I already tried setting the score threshold to 0, this didn't do anything either\u2026*",
    "url": "https://github.com/pytorch/vision/issues/8026",
    "state": "open",
    "labels": [],
    "created_at": "2023-10-07T00:06:53Z",
    "updated_at": "2023-10-08T08:36:19Z",
    "user": "darian69"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 480,
    "title": "Porting through nginx on aws",
    "body": "I have this up and running with aws but it only works on localhost on my machine. How can use Nginx to port this to some address?",
    "url": "https://github.com/huggingface/chat-ui/issues/480",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2023-10-06T10:39:52Z",
    "updated_at": "2023-10-08T21:13:10Z",
    "comments": 0,
    "user": "Mr-Nobody1"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2330,
    "title": "How to make prediction in NLI",
    "body": "I can't make prediction in NLI task when run based file training_NLI. Can you help me?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2330",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-06T08:52:59Z",
    "updated_at": "2024-01-31T16:18:18Z",
    "user": "trthminh"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 110630,
    "title": "Memory efficient attention for tensors where the last dimension is not divisible by 8",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\r\n\r\nCurrently, using `scaled_dot_product_attention` and the memory efficient kernel requires that the last dimension of the inputs is divisible by 8. Typically, this corresponds to the dimension per head in multihead attention, for example when using the `[batch, head, seq, dim]` convention.\r\n\r\nUsing inputs that do not conform to this requirement results in a `RuntimeError: No available kernel.  Aborting execution.` and a warning: `UserWarning: Mem efficient attention requires last dimension of inputs to be divisible by 8.`\r\n\r\nIt would be great if this requirement could be relaxed, for example by only being divisible by 2. The [TPU implementation associated with the paper](https://github.com/google-research/google-research/tree/master/memory_efficient_attention) appears to work with arbitrary dimensions, but this might not be the case for GPUs.\r\n\r\nIt would also be helpful if these requirements would be documented (the [documentation](https://pytorch.org/docs/stable/generated/torch.nn.functional.scaled_dot_product_attention.html) appears to be missing in this regard).\r\n\r\n### Alternatives\r\n\r\nThe Flash attention kernel supports this feature, but it is missing some others, e.g. attention masks.\r\n\r\n### Additional context\r\n\r\nA minimal example:\r\n\r\n```python\r\nimport torch\r\nimport torch.nn.functional as F\r\n\r\nqkv_size = (10, 128, 123, 2)\r\n\r\nQ = torch.rand(size=qkv_size, device='cuda', dtype=torch.bfloat16)\r\nK = torch.rand(size=qkv_size, device='cuda', dtype=torch.bfloat16)\r\nV = torch.rand(size=qkv_size, device='cuda', dtype=torch.bfloat16)\r\n\r\nwith torch.backends.cuda.sdp_kernel(enable_flash=False, enable_math=False, enable_mem_efficient=True):\r\n    O = F.scaled_dot_product_attention(Q, K, V, attn_mask=None, dropout_p=0)\r\n```\r\n\r\nThe output\r\n```\r\n[/tmp/ipykernel_16779/975066207.py:2](https://file+.vscode-resource.vscode-cdn.net/tmp/ipykernel_16779/975066207.py:2): UserWarning: Memory efficient kernel not used because: (Triggered internally at [/opt/conda/conda-bld/pytorch_1696146114277/work/aten/src/ATen/native/transformers/cuda/sdp_utils.cpp:350](https://file+.vscode-resource.vscode-cdn.net/opt/conda/conda-bld/pytorch_1696146114277/work/aten/src/ATen/native/transformers/cuda/sdp_utils.cpp:350).)\r\n  O = F.scaled_dot_product_attention(Q, K, V, attn_mask=None, dropout_p=0)\r\n[/tmp/ipykernel_16779/975066207.py:2](https://file+.vscode-resource.vscode-cdn.net/tmp/ipykernel_16779/975066207.py:2): UserWarning: Mem efficient attention requires last dimension of inputs to be divisible by 8. Got Query.size(-1): 2, Key.size(-1): 2, Value.size(-1): 2 instead. (Triggered internally at [/opt/conda/conda-bld/pytorch_1696146114277/work/aten/src/ATen/native/transformers/cuda/sdp_utils.cpp:128](https://file+.vscode-resource.vscode-cdn.net/opt/conda/conda-bld/pytorch_1696146114277/work/aten/src/ATen/native/transformers/cuda/sdp_utils.cpp:128).)\r\n  O = F.scaled_dot_product_attention(Q, K, V, attn_mask=None, dropout_p=0)\r\n[/tmp/ipykernel_16779/975066207.py:2](https://file+.vscode-resource.vscode-cdn.net/tmp/ipykernel_16779/975066207.py:2): UserWarning: Flash attention kernel not used because: (Triggered internally at [/opt/conda/conda-bld/pytorch_1696146114277/work/aten/src/ATen/native/transformers/cuda/sdp_utils.cpp:352](https://file+.vscode-resource.vscode-cdn.net/opt/conda/conda-bld/pytorch_1696146114277/work/aten/src/ATen/native/transformers/cuda/sdp_utils.cpp:352).)\r\n  O = F.scaled_dot_product_attention(Q, K, V, attn_mask=None, dropout_p=0)\r\n[/tmp/ipykernel_16779/975066207.py:2](https://file+.vscode-resource.vscode-cdn.net/tmp/ipykernel_16779/975066207.py:2): UserWarning: Flash attention has been runtime disabled. (Triggered internally at [/opt/conda/conda-bld/pytorch_1696146114277/work/aten/src/ATen/native/transformers/sdp_utils_cpp.h:439](https://file+.vscode-resource.vscode-cdn.net/opt/conda/conda-bld/pytorch_1696146114277/work/aten/src/ATen/native/transformers/sdp_utils_cpp.h:439).)\r\n  O = F.scaled_dot_product_attention(Q, K, V, attn_mask=None, dropout_p=0)\r\n---------------------------------------------------------------------------\r\nRuntimeError                              Traceback (most recent call last)\r\nCell In[34], line 2\r\n      1 with torch.backends.cuda.sdp_kernel(enable_flash=False, enable_math=False, enable_mem_efficient=True):\r\n----> 2     O = F.scaled_dot_product_attention(Q, K, V, attn_mask=None, dropout_p=0)\r\n\r\nRuntimeError: No available kernel.  Aborting execution.\r\n```\r\n\r\nThis is using PyTorch 2.2.0.dev20231001, CUDA 11.8, and an Ampere GPU.\n\ncc @jbschlosser @bhosmer @cpuhrsch @erichan1 @drisspg @mikaylagawarecki",
    "url": "https://github.com/pytorch/pytorch/issues/110630",
    "state": "open",
    "labels": [
      "triaged",
      "module: sdpa"
    ],
    "created_at": "2023-10-05T18:23:58Z",
    "updated_at": "2024-11-27T20:11:39Z",
    "user": "davidbuterez"
  },
  {
    "repo": "huggingface/candle",
    "number": 1036,
    "title": "How to fine-tune large models?",
    "body": "Hello all,\r\n\r\nHow should I finetune a large model? Are there implementations like `peft` in Python for Candle? Specifically, how should I train a quantized, LoRA model? I saw [candle-lora](https://github.com/EricLBuehler/candle-lora), and plan to use that but do not know how to quantize a large model.",
    "url": "https://github.com/huggingface/candle/issues/1036",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-05T16:43:17Z",
    "updated_at": "2024-12-03T15:55:53Z",
    "user": "nullptr2nullptr"
  },
  {
    "repo": "pytorch/vision",
    "number": 8024,
    "title": "How to update RegionProposalNetwork loss function in FasterRCNN to generate MORE proposals?",
    "body": "",
    "url": "https://github.com/pytorch/vision/issues/8024",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-05T14:52:06Z",
    "updated_at": "2023-10-07T00:26:21Z",
    "user": "darian69"
  },
  {
    "repo": "huggingface/trl",
    "number": 837,
    "title": "What is the loss mask for special tokens in SFFTrainer",
    "body": "### System Info\n\nlatest transformers\n\n### Who can help?\n\n@muellerzr and @pacman100\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nI'm training with SFTTrainer and want to ensure that the model is including the loss on predicting an EOS token (< /s >).\r\n\r\nWhat is the default handling of special tokens for the loss computation in SFTTrainer? Can I change this?\r\n```\r\nfrom transformers import Trainer\r\nfrom trl import SFTTrainer\r\n\r\ntrainer = SFTTrainer(\r\n    peft_config=config,\r\n    dataset_text_field=\"text\",\r\n    max_seq_length=context_length,\r\n    tokenizer=tokenizer,\r\n    model=model,\r\n    train_dataset=data[\"train\"],\r\n    eval_dataset=data[\"test\"],\r\n    args=transformers.TrainingArguments(\r\n        max_steps=60, # comment this out after the first time you run. This is for testing!\r\n        num_train_epochs=epochs,\r\n        output_dir=save_dir,\r\n        evaluation_strategy=\"steps\",\r\n        do_eval=True,\r\n        per_device_train_batch_size=batch_size,\r\n        gradient_accumulation_steps=4,\r\n        per_device_eval_batch_size=batch_size,\r\n        log_level=\"debug\",\r\n        optim=\"paged_adamw_8bit\",\r\n        save_steps=0.2,\r\n        logging_steps=1,\r\n        learning_rate=1e-4,\r\n        eval_steps=0.2,\r\n        fp16=True,\r\n        max_grad_norm=0.3,\r\n        warmup_ratio=0.03,\r\n        lr_scheduler_type=\"linear\",\r\n    ),\r\n    callbacks=[logging_callback],  # Add custom callback here\r\n)\r\nmodel.config.use_cache = False  # silence the warnings. Please re-enable for inference!\r\ntrainer.train()\r\n```\r\nNote that in my dataset I have included EOS tokens where appropriate\n\n### Expected behavior\n\nThe output of my fine-tuning is not emitting EOS tokens, which leads me to believe that the loss mask is zero for special tokens with SFTTrainer, but I'm unsure if that's true.",
    "url": "https://github.com/huggingface/trl/issues/837",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-05T13:49:52Z",
    "updated_at": "2023-11-13T18:23:54Z",
    "user": "RonanKMcGovern"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 476,
    "title": "Chat-ui failing on Edge, Chrome and Safari.",
    "body": "It seems to be working on Firefox for mac and Safari for iOS.\r\n\r\n\r\nStacktrace in console from Chrome:\r\n```\r\nFailed to load resource: the server responded with a status of 404 ()\r\nUrlDependency.4e6706f5.js:1     Failed to load resource: the server responded with a status of 404 ()\r\nstores.6bc4a41f.js:1     Failed to load resource: the server responded with a status of 404 ()\r\nchat.danskgpt.dk/:1 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://chat.danskgpt.dk/_app/immutable/entry/start.59a3223b.js\r\n_layout.svelte.e4398851.js:1     Failed to load resource: the server responded with a status of 404 ()\r\n_page.svelte.e0b7a273.js:1     Failed to load resource: the server responded with a status of 404 ()\r\nLoginModal.fe5c7c4d.js:1     Failed to load resource: the server responded with a status of 404 ()\r\napp.1a92c8bc.js:1     Failed to load resource: the server responded with a status of 404 ()\r\nwww.danskgpt.dk/chatui/favicon.png:1     Failed to load resource: the server responded with a status of 404 ()\r\n_error.svelte.00b004c8.js:1     Failed to load resource: the server responded with a status of 404 ()\r\nwww.danskgpt.dk/chatui/favicon.svg:1     Failed to load resource: the server responded with a status of 404 ()\r\n```\r\n\r\nIt's hosted at [here](https://chat.danskgpt.dk).\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/476",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-10-05T13:03:01Z",
    "updated_at": "2023-10-05T13:56:49Z",
    "comments": 4,
    "user": "mhenrichsen"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1929,
    "title": "Add a \"feature\" or \"column\" level for better granularity",
    "body": "For example, if we support statistics for a new type of columns, or if we change the way we compute some stats, I think that we don't want to recompute the stats for all the columns, just for one of them.\r\n\r\nIt's a guess, because maybe it's more efficient to have one job that downloads the data and computes every possible stats, than having N jobs that download the same data and compute only one stat. To be evaluated",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1929",
    "state": "closed",
    "labels": [
      "question",
      "refactoring / architecture",
      "P2"
    ],
    "created_at": "2023-10-05T08:24:50Z",
    "updated_at": "2024-02-22T21:24:09Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/huggingface.js",
    "number": 251,
    "title": "How to get SpaceRuntime information?",
    "body": "Inside hub library, I can see that there's `SpaceRuntime` which specify the hardware requirements. `SpaceRuntime` is defined inside `ApiSpaceInfo`.\r\n\r\nBut seems that it's not being emitted.\r\n\r\n```\r\n\t\tconst items: ApiSpaceInfo[] = await res.json();\r\n\r\n\t\tfor (const item of items) {\r\n\t\t\tyield {\r\n\t\t\t\tid: item._id,\r\n\t\t\t\tname: item.id,\r\n\t\t\t\tsdk: item.sdk,\r\n\t\t\t\tlikes: item.likes,\r\n\t\t\t\tprivate: item.private,\r\n\t\t\t\tupdatedAt: new Date(item.lastModified),\r\n\t\t\t};\r\n\t\t}\r\n```\r\n\r\nSo, is there anyway I can grab those information?",
    "url": "https://github.com/huggingface/huggingface.js/issues/251",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-04T18:23:42Z",
    "updated_at": "2023-10-05T08:26:07Z",
    "user": "namchuai"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 471,
    "title": "Custom chatbot which includes sources such as pdf,databases and  a specific website only.",
    "body": "I have a chatbot which can query pdf,database,a particular website in python.How do I include may be the quantized models,rag sources and the retrieval logic in this chat ui?",
    "url": "https://github.com/huggingface/chat-ui/issues/471",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-04T04:36:23Z",
    "updated_at": "2024-07-08T16:22:02Z",
    "comments": 2,
    "user": "pranavbhat12"
  },
  {
    "repo": "huggingface/huggingface.js",
    "number": 250,
    "title": "How to apply pagination for listModels?",
    "body": "Thanks for the library!\r\n\r\nCould you please help me on how can I apply pagination for `listModels` API from @huggingface/hub?\r\n\r\nI don't know how to specify the offset.",
    "url": "https://github.com/huggingface/huggingface.js/issues/250",
    "state": "closed",
    "labels": [],
    "created_at": "2023-10-03T12:39:17Z",
    "updated_at": "2023-10-04T01:27:01Z",
    "user": "namchuai"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 341,
    "title": "[Question] Custom stopping criteria for text generation models",
    "body": "Is it possible to pass a custom `stopping_criteria` to `generate()` method? Is there a way to interrupt generation mid-flight?",
    "url": "https://github.com/huggingface/transformers.js/issues/341",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-10-02T10:35:33Z",
    "updated_at": "2025-10-11T10:12:10Z",
    "user": "krassowski"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2356,
    "title": "\u2753 [Question] How do you find the exact line of python code that triggers a backend compiler error?",
    "body": "I was trying to compile the huggingface Llama 2 model using the following code:\r\n\r\n```python\r\nimport os\r\nimport torch\r\nimport torch_tensorrt\r\nimport torch.backends.cudnn as cudnn\r\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\r\nimport torch._dynamo as dynamo\r\nfrom optimum.onnxruntime import ORTModelForCausalLM\r\n\r\nbase_model = 'llama-2-7b'\r\ncomp_method = 'magnitude_unstructured'\r\ncomp_degree = 0.2\r\n\r\nmodel_path = f'vita-group/{base_model}_{comp_method}'\r\nmodel = AutoModelForCausalLM.from_pretrained(\r\n       model_path,\r\n       revision=f's{comp_degree}',\r\n       torch_dtype=torch.float16,\r\n       low_cpu_mem_usage=True,\r\n       device_map=\"auto\")\r\nmodel.save_pretrained(\"model_ckpt/\")\r\nmodel.eval()\r\n\r\n# setting\r\n# torch._dynamo.config.suppress_errors = True\r\nenabled_precisions = {torch.float, torch.int, torch.long}\r\ndebug = False\r\nworkspace_size = 20 << 30\r\nmin_block_size = 7\r\ntorch_executed_ops = {}\r\n\r\ncompilation_kwargs = {\r\n    \"enabled_precisions\": enabled_precisions,\r\n    \"debug\": debug,\r\n    \"workspace_size\": workspace_size,\r\n    \"min_block_size\": min_block_size,\r\n    \"torch_executed_ops\": torch_executed_ops,\r\n}\r\n\r\n\r\nwith torch.no_grad():\r\n    optimized_model = torch.compile(\r\n            model.generate,\r\n            backend=\"torch_tensorrt\",\r\n            dynamic=True,\r\n            options=compilation_kwargs,\r\n            )\r\n\r\n    tokenizer = AutoTokenizer.from_pretrained('meta-llama/Llama-2-7b-hf')\r\n    input_ids = tokenizer('Hello! I am a VITA-compressed-LLM chatbot!', return_tensors='pt').input_ids.cuda()\r\n\r\n    #outputs = model.generate(input_ids, max_new_tokens=128)\r\n    outputs = optimized_model(input_ids, max_new_tokens=128)\r\n```\r\n\r\nAnd here is the complete log:\r\n\r\n```text\r\nINFO:torch_tensorrt.dynamo.utils:Using Default Torch-TRT Runtime (as requested by user)\r\nINFO:torch_tensorrt.dynamo.utils:Compilation Settings: CompilationSettings(precision=torch.float32, debug=False, workspace_size=21474836480, min_block_size=7, torch_executed_ops={}, pass_through_build_failures=False, max_aux_streams=None, version_compatible=False, optimization_level=None, use_python_runtime=False, truncate_long_and_double=False, use_fast_partitioner=True, enable_experimental_decompositions=False)\r\n\r\nWARNING:torch_tensorrt.dynamo.compile:0 supported operations detected in subgraph containing 0 computational nodes. Skipping this subgraph, since min_block_size was detected to be 7\r\nINFO:torch_tensorrt.dynamo.utils:Using Default Torch-TRT Runtime (as requested by user)\r\nINFO:torch_tensorrt.dynamo.utils:Compilation Settings: CompilationSettings(precision=torch.float32, debug=False, workspace_size=21474836480, min_block_size=7, torch_executed_ops={}, pass_through_build_failures=False, max_aux_streams=None, version_compatible=False, optimization_level=None, use_python_runtime=False, truncate_long_and_double=False, use_fast_partitioner=True, enable_experimental_decompositions=False)\r\n\r\nWARNING:torch_tensorrt.dynamo.compile:0 supported operations detected in subgraph containing 0 computational nodes. Skipping this subgraph, since min_block_size was detected to be 7\r\nINFO:torch_tensorrt.dynamo.utils:Using Default Torch-TRT Runtime (as requested by user)\r\nINFO:torch_tensorrt.dynamo.utils:Compilation Settings: CompilationSettings(precision=torch.float32, debug=False, workspace_size=21474836480, min_block_size=7, torch_executed_ops={}, pass_through_build_failures=False, max_aux_streams=None, version_compatible=False, optimization_level=None, use_python_runtime=False, truncate_long_and_double=False, use_fast_partitioner=True, enable_experimental_decompositions=False)\r\n\r\nWARNING:torch_tensorrt.dynamo.compile:0 supported operations detected in subgraph containing 0 computational nodes. Skipping this subgraph, since min_block_size was detected to be 7\r\nINFO:torch_tensorrt.dynamo.utils:Using Default Torch-TRT Runtime (as requested by user)\r\nINFO:torch_tensorrt.dynamo.utils:Compilation Settings: CompilationSettings(precision=torch.float32, debug=False, workspace_size=21474836480, min_block_size=7, torch_executed_ops={}, pass_through_build_failures=False, max_aux_streams=None, version_compatible=False, optimization_level=None, use_python_runtime=False, truncate_long_and_double=False, use_fast_partitioner=True, enable_experimental_decompositions=False)\r\n\r\nWARNING:torch_tensorrt.dynamo.compile:0 supported operations detected in subgraph containing 0 computational nodes. Skipping this subgraph, since min_block_size was detected to be 7\r\nINFO:torch_tensorrt.dynamo.utils:Using Default Torch-TRT Runtime (as requested by user)\r\nINFO:torch_tensorrt.dynamo.utils:Compilation Settings: CompilationSettings(precision=torch.float32, debug=False, workspace_size=21474836480, min_block_size=7, torch_executed_ops={}, pass_through_build_failures=False, max_aux_streams=None, version_compatible=False, optimization_level=None, use_python_runtime=False, truncate_long_and_double=False, use_fast_partitioner=True, enable_experimental_decompositions=False",
    "url": "https://github.com/pytorch/TensorRT/issues/2356",
    "state": "open",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-10-02T01:15:22Z",
    "updated_at": "2024-01-02T00:02:08Z",
    "user": "BDHU"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6273,
    "title": "Broken Link to PubMed Abstracts dataset .",
    "body": "### Describe the bug\n\nThe link provided for the dataset is broken,\r\ndata_files = \r\n[https://the-eye.eu/public/AI/pile_preliminary_components/PUBMED_title_abstracts_2019_baseline.jsonl.zst](url)\r\n\r\nThe \n\n### Steps to reproduce the bug\n\nSteps to reproduce:\r\n\r\n1) Head over to [https://huggingface.co/learn/nlp-course/chapter5/4?fw=pt#big-data-datasets-to-the-rescue](url)\r\n\r\n2) In the Section  \"What is the Pile?\", you can see a code snippet that contains the broken link.\n\n### Expected behavior\n\nThe link should Redirect to the  \"PubMed Abstracts dataset\" as expected .\n\n### Environment info\n\n.",
    "url": "https://github.com/huggingface/datasets/issues/6273",
    "state": "open",
    "labels": [],
    "created_at": "2023-10-01T19:08:48Z",
    "updated_at": "2024-04-28T02:30:42Z",
    "comments": 5,
    "user": "sameemqureshi"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 466,
    "title": "Deploy with Langchain Agent",
    "body": "I have built a Langchain agent which interacts with Vicuna model hosted with TGI and the web UI is currently hosted with Gradio on Spaces. I'd like UI to be more polished(like huggingchat/chatgpt) with persistence. I couldn't find any docs related to how to use Langchain agent with chat-ui. If anyone could shed some light on this or point me towards the relevant resources.\r\n\r\nThank you for your help.",
    "url": "https://github.com/huggingface/chat-ui/issues/466",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-30T21:29:38Z",
    "updated_at": "2023-10-03T09:14:48Z",
    "comments": 1,
    "user": "Tejaswgupta"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2018,
    "title": "A demo of how to perform multi-GPU parallel inference for transformer LLM is needed",
    "body": "In the current demo: \"[Distributed inference using Accelerate](https://huggingface.co/docs/accelerate/usage_guides/distributed_inference )\" , it is still not clear enough to know how to perform multi-GPU parallel inference for transformer LLM. This gap in the demo has hindered not just me, but also many people in adopting your solution: https://www.reddit.com/r/LocalLLaMA/comments/15rlqsb/how_to_perform_multigpu_parallel_inference_for/\r\nAlso in the reply, other frameworks have already started competing for this specific use case. \r\n\r\nCould you provide the demo for this use case? ",
    "url": "https://github.com/huggingface/accelerate/issues/2018",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-30T14:10:30Z",
    "updated_at": "2025-02-10T00:27:24Z",
    "user": "KexinFeng"
  },
  {
    "repo": "huggingface/candle",
    "number": 1006,
    "title": "Question: How to use quantized tensors?",
    "body": "Hello everybody,\r\n\r\nI was looking through Candle's quantized tensor code when I noticed that there is only a matmul_t implemented for QuantizedType, and no other operations. Perhaps other could operations be added?\r\n\r\nIn addition, is there an example of using quantized tensors/converting them from normal tensors?\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/candle/issues/1006",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-30T13:35:16Z",
    "updated_at": "2024-08-17T15:20:58Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 340,
    "title": "question",
    "body": "hi @xenova is still there any position as js ts backend developer, next week 06 oct i will be free by finishing the senlife project i am working on for a uk clients this is the app that i build backend for \r\nhttps://play.google.com/store/apps/details?id=com.senlife.app&hl=en&gl=US\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/340",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-30T11:35:23Z",
    "updated_at": "2023-10-02T10:01:20Z",
    "user": "jedLahrim"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 465,
    "title": "Where to deploy other than HF?",
    "body": "Hey,\r\n\r\nI've been trying to deploy the chat-ui somewhere I can use a custom domain (such as vercel and azure). \r\n\r\nEach of them comes with different problems that I have yet to solve.\r\n\r\nVercel issues described [here](https://github.com/huggingface/chat-ui/issues/212).\r\n\r\nIt does not seem like I can deploy this as a Azure SWA, as it fails when using the azure-swa-adapter for sveltekit with the following error.\r\n\r\n```\r\nUsing adapter-azure-swa\r\n\u2718 [ERROR] Top-level await is currently not supported with the \"cjs\" output format\r\n\r\n    .svelte-kit/output/server/chunks/models.js:94:15:\r\n      94 \u2502 const models = await Promise.all(\r\n         \u2575                ~~~~~\r\n\r\n\u2718 [ERROR] Top-level await is currently not supported with the \"cjs\" output format\r\n\r\n    .svelte-kit/output/server/entries/endpoints/conversation/_id_/_server.ts.js:199:18:\r\n      199 \u2502 const extractor = await pipeline(\"feature-extraction\", modelId);\r\n          \u2575                   ~~~~~\r\n\r\n\u25b2 [WARNING] \"./xhr-sync-worker.js\" should be marked as external for use with \"require.resolve\" [require-resolve-not-external]\r\n\r\n    node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:31:57:\r\n      31 \u2502 ... require.resolve ? require.resolve(\"./xhr-sync-worker.js\") : null;\r\n         \u2575                                       ~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nerror during build:\r\nError: Build failed with 2 errors:\r\n.svelte-kit/output/server/chunks/models.js:94:15: ERROR: Top-level await is currently not supported with the \"cjs\" output format\r\n.svelte-kit/output/server/entries/endpoints/conversation/_id_/_server.ts.js:199:18: ERROR: Top-level await is currently not supported with the \"cjs\" output format\r\n    at failureErrorWithLog (/github/workspace/node_modules/svelte-adapter-azure-swa/node_modules/esbuild/lib/main.js:1575:15)\r\n    at /github/workspace/node_modules/svelte-adapter-azure-swa/node_modules/esbuild/lib/main.js:1033:28\r\n    at /github/workspace/node_modules/svelte-adapter-azure-swa/node_modules/esbuild/lib/main.js:978:67\r\n    at buildResponseToResult (/github/workspace/node_modules/svelte-adapter-azure-swa/node_modules/esbuild/lib/main.js:1031:7)\r\n    at /github/workspace/node_modules/svelte-adapter-azure-swa/node_modules/esbuild/lib/main.js:1143:14\r\n    at responseCallbacks.<computed> (/github/workspace/node_modules/svelte-adapter-azure-swa/node_modules/esbuild/lib/main.js:680:9)\r\n    at handleIncomingPacket (/github/workspace/node_modules/svelte-adapter-azure-swa/node_modules/esbuild/lib/main.js:735:9)\r\n    at Socket.readFromStdout (/github/workspace/node_modules/svelte-adapter-azure-swa/node_modules/esbuild/lib/main.js:656:7)\r\n    at Socket.emit (node:events:514:28)\r\n    at addChunk (node:internal/streams/readable:324:12)\r\n\r\n\r\n---End of Oryx build logs---\r\nOryx has failed to build the solution.\r\n\r\n```\r\n\r\nAny suggestions on how I can otherwise deploy this?",
    "url": "https://github.com/huggingface/chat-ui/issues/465",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-29T13:58:42Z",
    "updated_at": "2023-12-07T19:10:00Z",
    "comments": 2,
    "user": "mhenrichsen"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1892,
    "title": "Use swap to avoid OOM?",
    "body": "The pods don't have swap. Is it possible to have swap to avoid OOM, even at the expense of longer processing time in workers?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1892",
    "state": "closed",
    "labels": [
      "question",
      "infra",
      "P2"
    ],
    "created_at": "2023-09-29T13:48:54Z",
    "updated_at": "2024-06-19T14:23:36Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 337,
    "title": "[Question] How do I specify a non-huggingface URL (that doesn't start with `/models/`) in `AutoTokenizer.from_pretrained`?",
    "body": "My tokenizer files are hosted within this folder:\r\n```\r\nhttps://example.com/public/models/TheBloke/Llama-2-13B-GPTQ/\r\n```\r\nFirst I load the lib:\r\n```js\r\nlet { AutoTokenizer } = await import('https://cdn.jsdelivr.net/npm/@xenova/transformers@2.6.1');\r\n```\r\nThen I tried what I thought would be the most obvious/intuitive API:\r\n```js\r\nawait AutoTokenizer.from_pretrained(\"/public/models/TheBloke/Llama-2-13B-GPTQ\")\r\n// requests: https://example.com/models/public/models/TheBloke/Llama-2-13B-GPTQ/tokenizer.json\r\n```\r\nThis is strongly counter-intuitive to me. If I add a `/` at the start of the URL, it shouldn't add anything before that. A path that starts with `/` on the web always means \"append this to the origin\".\r\n\r\nSo I read the docs, and it seems to suggest that you need to put at `.` on the end:\r\n```js\r\nawait AutoTokenizer.from_pretrained(\"/public/models/TheBloke/Llama-2-13B-GPTQ/.\")\r\n// requests: https://example.com/models/public/models/TheBloke/Llama-2-13B-GPTQ/tokenizer.json \r\n```\r\nNope. So the next obvious step was to just give it an absolute URL and be done with it:\r\n```js\r\nawait AutoTokenizer.from_pretrained(\"https://example.com/public/models/TheBloke/Llama-2-13B-GPTQ\")\r\n// requests:  'https://huggingface.co/https://example.com/public/models/TheBloke/Llama-2-13B-GPTQ/resolve/main/tokenizer_config.json\r\n```\r\nOof.\r\n\r\nSo I'm a bit confused here \ud83d\ude35\u200d\ud83d\udcab\r\n\r\nGoing to keep trying, but I've spent 20 minutes on this so far, so posting here so you can improve the DX around this, even if I do manage to solve it myself soon.",
    "url": "https://github.com/huggingface/transformers.js/issues/337",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-28T21:00:41Z",
    "updated_at": "2023-09-28T22:03:05Z",
    "user": "josephrocca"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2352,
    "title": "\u2753 [Question] How do you build Torch-TensorRT from origin/main with dependence on tensorrt 8.5.2 from Jetpack5.1?",
    "body": "## \u2753 Question\r\n\r\nWhen compiling the latest version of Torch-TensorRT from `origin/main` (`2.2.0.dev0+76de80d0`) on Jetpack5.1 using the latest locally compiled PyTorch (`2.2.0a0+a683bc5`) (so that I can use the latest v2 transforms in TorchVision (`0.17.0a0+4cb3d80`)), the resulting python package has a dependence on `tensorrt` version `8.6.1`, but Jetpack5.1 only supports version `8.5.2.2-1+cuda11.4` and is thus not installable.\r\nIs it possible to compile the latest Torch-TensorRT with dependence on the installed version of `tensorrt`?\r\n\r\n## Environment\r\n\r\n<details>\r\n<summary>\r\nEnvironment details\r\n</summary>\r\n\r\n```\r\nbr@nx:~/github/torch$ python /tmp/collect_env.py \r\nCollecting environment information...\r\nPyTorch version: 2.2.0a0+a683bc5\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.4\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 20.04.6 LTS (aarch64)\r\nGCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0\r\nClang version: 10.0.0-4ubuntu1 \r\nCMake version: version 3.27.5\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.8.10 (default, May 26 2023, 14:05:08)  [GCC 9.4.0] (64-bit runtime)\r\nPython platform: Linux-5.10.104-tegra-aarch64-with-glibc2.29\r\nIs CUDA available: True\r\nCUDA runtime version: 11.4.315\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: Could not collect\r\nNvidia driver version: Could not collect\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/aarch64-linux-gnu/libcudnn.so.8.6.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_adv_infer.so.8.6.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_adv_train.so.8.6.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_cnn_infer.so.8.6.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_cnn_train.so.8.6.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_ops_infer.so.8.6.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_ops_train.so.8.6.0\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                    aarch64\r\nCPU op-mode(s):                  32-bit, 64-bit\r\nByte Order:                      Little Endian\r\nCPU(s):                          6\r\nOn-line CPU(s) list:             0-3\r\nOff-line CPU(s) list:            4,5\r\nThread(s) per core:              1\r\nCore(s) per socket:              2\r\nSocket(s):                       2\r\nVendor ID:                       Nvidia\r\nModel:                           0\r\nModel name:                      ARMv8 Processor rev 0 (v8l)\r\nStepping:                        0x0\r\nCPU max MHz:                     1907,2000\r\nCPU min MHz:                     115,2000\r\nBogoMIPS:                        62.50\r\nL1d cache:                       256 KiB\r\nL1i cache:                       512 KiB\r\nL2 cache:                        4 MiB\r\nL3 cache:                        4 MiB\r\nVulnerability Itlb multihit:     Not affected\r\nVulnerability L1tf:              Not affected\r\nVulnerability Mds:               Not affected\r\nVulnerability Meltdown:          Not affected\r\nVulnerability Spec store bypass: Not affected\r\nVulnerability Spectre v1:        Mitigation; __user pointer sanitization\r\nVulnerability Spectre v2:        Mitigation; Branch predictor hardening\r\nVulnerability Srbds:             Not affected\r\nVulnerability Tsx async abort:   Not affected\r\nFlags:                           fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm dcpop\r\n\r\nVersions of relevant libraries:\r\n[pip3] mypy==1.5.1\r\n[pip3] mypy-extensions==1.0.0\r\n[pip3] numpy==1.24.4\r\n[pip3] numpy-quaternion==2022.4.3\r\n[pip3] pytorch-ranger==0.1.1\r\n[pip3] tensorrt==8.5.2.2\r\n[pip3] torch==2.2.0a0+a683bc5\r\n[pip3] torch-optimizer==0.3.0\r\n[pip3] torchmetrics==0.11.3\r\n[pip3] torchvision==0.17.0a0+4cb3d80\r\n[conda] Could not collect\r\n```\r\nTorch and TorchVision are built with\r\n```bash\r\nexport BUILD_TEST=OFF\r\nexport USE_FBGEMM=OFF  # Fails to build\r\nexport USE_NCCL=OFF    # Fails to build\r\nexport USE_KINETO=OFF  # Fails to build\r\nexport BUILD_SPLIT_CUDA=ON  # Required so that Torch-TensorRT finds the libraries it needs.\r\nexport _GLIBCXX_USE_CXX11_ABI=1  # Use the new C++ ABI\r\n```\r\n```bash\r\ncd ~/github/torch/pytorch\r\npython3 -m build -n\r\npip install dist/torch-<version>.whl\r\n```\r\n```bash\r\ncd ~/github/torch/vision\r\npython3 setup.py bdist_wheel  # Doesn't support the newer build module.\r\npip install dist/torchvision-<version>.whl\r\nmkdir -p build; cd build\r\nTorch_DIR=~/github/torch/pytorch/torch/share/cmake/Torch cmake -DCMAKE_BUILD_TYPE=Release -Wno-dev -DWITH_CUDA=on -GNinja -DCMAKE_INSTALL_PREFIX=~/.local ..\r\nninja install\r\n```\r\n</details>\r\n\r\n[WORKSPACE](https://github.com/pytorch/TensorRT/files/12749136/WORKSPACE.txt) file used to build Torch-TensorRT on Jetpack5.1. Built with\r\n```bash\r\ncd ~/github/torch/Torch-TensorRT\r\nbazel build //:libtorchtrt -c opt\r\nsudo tar -xvzf bazel-bin/libtorchtrt.tar.gz -C /usr/local/\r\npython3 setup.py bdist_wheel --use-cxx11-abi  # Doesn't support the newer build module.\r\npip install dist/torch_tensorrt-<version>.whl  # <-- fails to install due to tensorrt==8.6 dependency\r\n```\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2352",
    "state": "open",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-09-28T20:25:41Z",
    "updated_at": "2024-01-01T00:02:42Z",
    "user": "BrettRyland"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 334,
    "title": "[Question] failed to call OrtRun(). error code = 1. When I try to load Xenova/pygmalion-350m",
    "body": "I'm getting an error `failed to call OrtRun(). error code = 1.` When I try to load Xenova/pygmalion-350m. The error is as follows\r\n```\r\nwasm-core-impl.ts:392 Uncaught Error: failed to call OrtRun(). error code = 1.\r\n    at e.run (wasm-core-impl.ts:392:19)\r\n    at e.run (proxy-wrapper.ts:215:17)\r\n    at e.OnnxruntimeWebAssemblySessionHandler.run (session-handler.ts:100:15)\r\n    at InferenceSession.run (inference-session-impl.ts:108:40)\r\n    at sessionRun (models.js:191:36)\r\n    at async Function.decoderForward [as _forward] (models.js:478:26)\r\n    at async Function.forward (models.js:743:16)\r\n    at async Function.decoderRunBeam [as _runBeam] (models.js:564:18)\r\n    at async Function.runBeam (models.js:1284:16)\r\n    at async Function.generate (models.js:1009:30)\r\n```\r\n\r\nAnd my Code for running it is this\r\n\r\n```\r\n\r\nlet text = 'Once upon a time, there was';\r\nlet generator = await pipeline('text-generation', 'Xenova/pygmalion-350m');\r\nlet output = await generator(text, {\r\n  temperature: 2,\r\n  max_new_tokens: 10,\r\n  repetition_penalty: 1.5,\r\n  no_repeat_ngram_size: 2,\r\n  num_beams: 2,\r\n  num_return_sequences: 2,\r\n});\r\n\r\nconsole.log(output);\r\n```\r\n\r\nI see that `OrtRun` is something returned by the OnnxRuntime on a failure but have you had success in running the Pygmalion-350m model ?",
    "url": "https://github.com/huggingface/transformers.js/issues/334",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-28T01:34:36Z",
    "updated_at": "2023-12-16T17:14:12Z",
    "user": "sebinthomas"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6267,
    "title": "Multi label class encoding",
    "body": "### Feature request\n\nI have a multi label dataset and I'd like to be able to class encode the column and store the mapping directly in the features just as I can with a single label column.  `class_encode_column` currently does not support multi labels.\r\n\r\nHere's an example of what I'd like to encode:\r\n\r\n```\r\ndata = {\r\n    'text': ['one', 'two', 'three', 'four'],\r\n    'labels': [['a', 'b'], ['b'], ['b', 'c'], ['a', 'd']]\r\n}\r\n\r\ndataset = Dataset.from_dict(data)\r\ndataset = dataset.class_encode_column('labels')\r\n```\r\n\r\nI did some digging into the code base to evaluate the feasibility of this (note I'm very new to this code base) and from what I noticed the `ClassLabel` feature is still stored as an underlying raw data type of int so I thought a `MultiLabel` feature could similarly be stored as a Sequence of ints, thus not requiring significant serialization / conversion work to / from arrow.\r\n\r\nI did a POC of this [here](https://github.com/huggingface/datasets/commit/15443098e9ce053943172f7ec6fce3769d7dff6e) and included a simple test case (please excuse all the commented out tests, going for speed of POC here and didn't want to fight IDE to debug a single test).   In the test I just assert that `num_classes` is the same to show that things are properly serializing, but if you break after loading from disk you'll see the dataset correct and the dataset feature is as expected.\r\n\r\nAfter digging more I did notice a few issues\r\n- After loading from disk I noticed type of the `labels` class is `Sequence` not `MultiLabel` (though the added `feature` attribute came through).  This doesn't happen for `ClassLabel` but I couldn't find the encode / decode code paths that handle this.\r\n- I subclass `Sequence` in `MultiLabel` to leverage existing serialization, but this does miss the custom encode logic that `ClassLabel` has.  I'm not sure of the best way to approach this as I haven't fully understood the encode / decode flow for datasets.  I suspect my simple implementation will need some improvement as it'll require a significant amount of repeated logic to mimic `ClassLabel` behavior.\r\n\r\n\n\n### Motivation\n\nSee above - would like to support multi label class encodings.\n\n### Your contribution\n\nThis would be a big help for us and we're open to contributing but I'll likely need some guidance on how to implement to fit the encode / decode flow.  Some suggestions on tests / would be great too, I'm guessing in addition to the class encode tests (that I'll need to expand) we'll need encode / decode tests.",
    "url": "https://github.com/huggingface/datasets/issues/6267",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-09-27T22:48:08Z",
    "updated_at": "2023-10-26T18:46:08Z",
    "comments": 7,
    "user": "jmif"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 1698,
    "title": "How to change cache dir?",
    "body": "### Describe the bug\n\nby default, all downloaded models are stored on \r\n\r\n> cache_path = '/root/.cache/huggingface/hub'\r\n\r\nIs there a way to change this dir to something else?\r\n\r\nI tried to set \"HUGGINGFACE_HUB_CACHE\"\r\n\r\n```\r\nimport os\r\nos.environ['HUGGINGFACE_HUB_CACHE'] = '/my_workspace/models_cache'\r\n```\r\n\r\nbut it doesn't work,\n\n### Reproduction\n\n_No response_\n\n### Logs\n\n_No response_\n\n### System info\n\n```shell\n- huggingface_hub version: 0.17.2\r\n- Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.12\r\n- Running in iPython ?: No\r\n- Running in notebook ?: No\r\n- Running in Google Colab ?: No\r\n- Token path ?: /root/.cache/huggingface/token\r\n- Has saved token ?: True\r\n- Who am I ?: adhikjoshi\r\n- Configured git credential helpers: \r\n- FastAI: N/A\r\n- Tensorflow: N/A\r\n- Torch: 2.2.0.dev20230922+cu118\r\n- Jinja2: 3.1.2\r\n- Graphviz: N/A\r\n- Pydot: N/A\r\n- Pillow: 10.0.1\r\n- hf_transfer: N/A\r\n- gradio: N/A\r\n- tensorboard: N/A\r\n- numpy: 1.24.4\r\n- pydantic: 2.3.0\r\n- aiohttp: N/A\r\n- ENDPOINT: https://huggingface.co\r\n- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub\r\n- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets\r\n- HF_TOKEN_PATH: /root/.cache/huggingface/token\r\n- HF_HUB_OFFLINE: False\r\n- HF_HUB_DISABLE_TELEMETRY: False\r\n- HF_HUB_DISABLE_PROGRESS_BARS: None\r\n- HF_HUB_DISABLE_SYMLINKS_WARNING: False\r\n- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False\r\n- HF_HUB_DISABLE_IMPLICIT_TOKEN: False\r\n- HF_HUB_ENABLE_HF_TRANSFER: False\n```\n",
    "url": "https://github.com/huggingface/huggingface_hub/issues/1698",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-09-27T07:45:30Z",
    "updated_at": "2023-09-27T09:08:34Z",
    "user": "adhikjoshi"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 2010,
    "title": "How to set different seed for DDP data sampler for every epoch",
    "body": "Hello there!\r\nI am using the following code to build my data loader.\r\n```python\r\n data_loader_train = DataLoader(\r\n        dataset_train,\r\n        collate_fn=collate_fn,\r\n        batch_size=cfg.data.train_batch_size,\r\n        num_workers=cfg.data.num_workers,\r\n        pin_memory=cfg.data.pin_memory,\r\n    )\r\ndata_loader_train = accelerator.prepare(data_loader_train)\r\n```\r\nI am using DDP for training and I want to set different data sample seed for every epoch, so that different epochs will have different batch data orders. How can I do that?",
    "url": "https://github.com/huggingface/accelerate/issues/2010",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-27T02:46:10Z",
    "updated_at": "2023-09-27T11:32:22Z",
    "user": "Mountchicken"
  },
  {
    "repo": "huggingface/transformers",
    "number": 26412,
    "title": "How to run Trainer + DeepSpeed + Zero3 + PEFT ",
    "body": "### System Info\n\n- `transformers` version: 4.34.0.dev0\r\n- Platform: Linux-5.14.0-284.25.1.el9_2.x86_64-x86_64-with-glibc2.34\r\n- Python version: 3.11.4\r\n- Huggingface_hub version: 0.16.4\r\n- Safetensors version: 0.3.3\r\n- Accelerate version: 0.24.0.dev0\r\n- Accelerate config:    not found\r\n- PyTorch version (GPU?): 2.0.1+cu117 (True)\r\n\n\n### Who can help?\n\n @ArthurZucker and @younesbelkada and @pacman100 and @muellerzr \n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n[This script](https://gist.github.com/BramVanroy/f2abb3940111b73ae8923822ef6096dd) is a modification of the official run_clm script. The only additions are the BNB config and PEFT. Yet, I cannot get it to work with a [deepspeed zero3 config](https://github.com/philschmid/deep-learning-pytorch-huggingface/blob/main/training/configs/ds_falcon_180b_z3.json).\r\n\r\nRequirements to install:\r\n\r\n```\r\naccelerate >= 0.12.0\r\ntorch >= 1.3\r\ndatasets >= 1.8.0\r\nsentencepiece != 0.1.92\r\nprotobuf\r\nevaluate\r\nscikit-learn\r\ntrl\r\npeft\r\nbitsandbytes\r\n```\r\n\r\nIn the past I have had issues with low_cpu_mem_usage but neither a true/false value seem to get this to work:\r\n\r\nCommand 1:\r\n\r\n```sh\r\ndeepspeed --include=\"localhost:0,1\" run_clm.py \\\r\n   --model_name_or_path facebook/opt-125m\\\r\n  --dataset_name wikitext\\\r\n  --dataset_config_name wikitext-2-raw-v1\\\r\n  --per_device_train_batch_size 2\\\r\n  --per_device_eval_batch_size 2\\\r\n  --do_train\\\r\n  --do_eval\\\r\n  --output_dir /tmp/test-clm\\\r\n  --deepspeed deepspeed_configs/ds_config_zero3.json\\\r\n  --low_cpu_mem_usage true\r\n```\r\n==> `ValueError: DeepSpeed Zero-3 is not compatible with `low_cpu_mem_usage=True` or with passing a `device_map`.`\r\n\r\nCommand 2:\r\n\r\n```sh\r\ndeepspeed --include=\"localhost:0,1\" run_clm.py \\\r\n   --model_name_or_path facebook/opt-125m\\\r\n  --dataset_name wikitext\\\r\n  --dataset_config_name wikitext-2-raw-v1\\\r\n  --per_device_train_batch_size 2\\\r\n  --per_device_eval_batch_size 2\\\r\n  --do_train\\\r\n  --do_eval\\\r\n  --output_dir /tmp/test-clm\\\r\n  --deepspeed deepspeed_configs/ds_config_zero3.json\\\r\n  --low_cpu_mem_usage false\r\n```\r\n\r\n==> `ValueError: weight is on the meta device, we need a `value` to put in on 0.`\n\n### Expected behavior\n\nAny option to make this combination of Trainer + DeepSpeed + Zero3 + PEFT work.",
    "url": "https://github.com/huggingface/transformers/issues/26412",
    "state": "open",
    "labels": [
      "WIP"
    ],
    "created_at": "2023-09-26T10:31:46Z",
    "updated_at": "2024-01-11T15:40:02Z",
    "user": "BramVanroy"
  },
  {
    "repo": "pytorch/data",
    "number": 1201,
    "title": "Loading `.tfrecords` files that require a deserialization method",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi,\r\n\r\nI have a dataset in TFRecords format and am trying to move to TorchData's API for loading tfrecords files.\r\nThis is the minimal example:\r\n```python3\r\ndatapipe1 = IterableWrapper(['path/to/my/tfrecords/file.tfrecords'])\r\ndatapipe2 = FileOpener(datapipe1, mode=\"b\")\r\ntfrecord_loader_dp = datapipe2.load_from_tfrecord()\r\n\r\nfor d in tfrecord_loader_dp:\r\n   pass\r\n```\r\nIt fails, as the datapipe does not know how to properly deserialize the tfrecord file.\r\n```\r\nFile ~/.conda/envs/bend/lib/python3.10/site-packages/torchdata/datapipes/iter/util/tfrecordloader.py:245, in TFRecordLoaderIterDataPipe.__iter__(self)\r\n    243 pathname, data_stream = data\r\n    244 try:\r\n--> 245     for example_bytes in iterate_tfrecord_file(data_stream):\r\n    246         example = example_pb2.SequenceExample()  # type: ignore\r\n    247         example.ParseFromString(example_bytes)  # type: ignore\r\n\r\nFile ~/.conda/envs/bend/lib/python3.10/site-packages/torchdata/datapipes/iter/util/tfrecordloader.py:83, in iterate_tfrecord_file(data)\r\n     81 (length,) = struct.unpack(\"<Q\", length_bytes)\r\n     82 if length > len(data_bytes):\r\n---> 83     data_bytes = data_bytes.zfill(int(length * 1.5))\r\n     84 data_bytes_view = memoryview(data_bytes)[:length]\r\n     85 if data.readinto(data_bytes_view) != length:\r\n\r\nOverflowError: Python int too large to convert to C ssize_t\r\nThis exception is thrown by __iter__ of TFRecordLoaderIterDataPipe(datapipe=FileOpenerIterDataPipe, length=-1, spec=None)\r\n```\r\n\r\n\r\nIn the legacy tensorflow codebase, I would have to specify a function to deserialize the tfrecord, by doing\r\n```python3\r\nimport tensorflow as tf\r\nimport tensorflow_datasets as tfds\r\n\r\ndataset = tf.data.Dataset.from_tensor_slices(['path/to/my/tfrecords/file.tfrecords'])\r\ndataset = dataset.interleave(lambda fp: tf.data.TFRecordDataset(fp, compression_type=compression_type), cycle_length=1, block_length=1, num_parallel_calls=tf.data.AUTOTUNE)\r\n\r\nfeatures = tfds.features.FeaturesDict.from_json(json.load(json_file)) # this file contains info about the .tfrecords file i'm trying to load\r\ndataset = dataset.map(features.deserialize_example, num_parallel_calls=tf.data.AUTOTUNE)\r\n\r\niterator = dataset.as_numpy_iterator()\r\nfor d in iterator:\r\n    pass #this works, returning a dict of tf tensors\r\n```\r\n\r\nThe problem is basically that I have to deserialize the tfrecord, but I can't apply anything to the `TFRecordLoaderIterDataPipe` before it fails.\r\n\r\nIs there a workaround? I tried just wrapping the tensorflow dataset object in an `IterableWrapper`, but the tensorflow dataset can't be pickled so fails in `DataLoader2`.\r\n\r\nThanks!\r\n\r\n\n\n### Versions\n\nCollecting environment information...\r\nPyTorch version: 2.0.1+cu117\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.7\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 20.04.5 LTS (x86_64)\r\nGCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0\r\nClang version: Could not collect\r\nCMake version: version 3.27.4\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.10.12 (main, Jul  5 2023, 18:54:27) [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-5.15.0-1027-aws-x86_64-with-glibc2.31\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                    x86_64\r\nCPU op-mode(s):                  32-bit, 64-bit\r\nByte Order:                      Little Endian\r\nAddress sizes:                   46 bits physical, 48 bits virtual\r\nCPU(s):                          16\r\nOn-line CPU(s) list:             0-15\r\nThread(s) per core:              2\r\nCore(s) per socket:              8\r\nSocket(s):                       1\r\nNUMA node(s):                    1\r\nVendor ID:                       GenuineIntel\r\nCPU family:                      6\r\nModel:                           85\r\nModel name:                      Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz\r\nStepping:                        7\r\nCPU MHz:                         2499.994\r\nBogoMIPS:                        4999.98\r\nHypervisor vendor:               KVM\r\nVirtualization type:             full\r\nL1d cache:                       256 KiB\r\nL1i cache:                       256 KiB\r\nL2 cache:                        8 MiB\r\nL3 cache:                        35.8 MiB\r\nNUMA node0 CPU(s):               0-15\r\nVulnerability Itlb multihit:     KVM: Mitigation: VMX unsupported\r\nVulnerability L1tf:              Mitigation; PTE Inversion\r\nVulnerability Mds:               Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown\r\nVulnerability Meltdown:          Mitigation; PTI\r\nVulnerability Mmio stale data:   Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown\r\nVulnerability Retbleed:          Vulnerable\r\nVulnerability Spec store bypass: Vulnerable\r\nVulnerability Spectre v1:        Mitigation; usercopy/s",
    "url": "https://github.com/meta-pytorch/data/issues/1201",
    "state": "open",
    "labels": [],
    "created_at": "2023-09-26T09:17:39Z",
    "updated_at": "2024-10-21T16:25:37Z",
    "comments": 1,
    "user": "fteufel"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2348,
    "title": "\u2753 [Question] How do you build and use PytorchTRT on Windows 10? ",
    "body": "## \u2753 Question\r\n\r\nAfter trying even using MSVC instead of Ninja, I kind was able to generate some dll files. The files are torchtrt.dll, torch_plugins.dll, torchtrt_runtimes.dll, torchtrtc.exe.\r\nNow what do I do with these. I just assumed, I put them in the lib folder  \"C:\\Users\\{Username}\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\torch\\lib\" and now this does not work.\r\n\r\n## What you have already tried\r\n\r\nI have read everything and tried literrally everything and the building process is literaly broken.\r\nhttps://pytorch.org/TensorRT/getting_started/getting_started_with_windows.html\r\nand then tried a few diffrerent things and somehow was able to this.\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (torch-2.0.1+cu118.dist-info):\r\n - CPU Architecture: Intel x86 10500H\r\n - OS (e.g., Linux): Windows\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): Pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.10\r\n - CUDA version:11.8\r\n - GPU models and configuration: RTX 3060 Laptop\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\nThe building and then also using of PytorchRT Tensor is not easy and very problematic and outdated it seems. \r\n\r\nAnd even if you manage to get it build somehow, you do not know, what to expect. Are those 4 dll files enough or did I miss something? \r\n\r\nWhat do I do with these dll files? \r\n\r\n\r\nIs there a simple example on Windows starting python files, that will run on TensorRT Pytorch like a Hello World Tensort TRT like.\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2348",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-26T04:48:04Z",
    "updated_at": "2023-09-29T03:15:04Z",
    "user": "jensdraht1999"
  },
  {
    "repo": "pytorch/audio",
    "number": 3619,
    "title": "torchaudio/compliance/kaldi.py FBank _get_window function can not support multiprocessing?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\ni use torchaudio 0.13.0+cu117 to get Fbank, if i use it in one thread is ok, but i want to use multiprocessing, like this\r\n`p = multiprocessing.Pool(1)\r\nxx = p.apply_async(audio_functiong, arg=(audio_in,))\r\np.close()\r\np.join()\r\nemb = xx.get()`\r\nthe code will hold on, and get nothing, i use debug found this function _get_window in kaldi.py can not run, so please help fix it,thanks!\r\n\r\n### Versions\r\npython 3.8",
    "url": "https://github.com/pytorch/audio/issues/3619",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-26T02:06:19Z",
    "updated_at": "2023-10-09T05:39:47Z",
    "comments": 1,
    "user": "haha010508"
  },
  {
    "repo": "huggingface/setfit",
    "number": 423,
    "title": "[Q] How to examine correct/wrong predictions in trainer.evaluate()",
    "body": "Hello,\r\n\r\nAfter doing \"metrics = trainer.evalute()\" as shown in the example code, is there a way to examine which rows in the evaluation data set were predicted correctly?\r\n\r\nThanks! ",
    "url": "https://github.com/huggingface/setfit/issues/423",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-25T23:41:53Z",
    "updated_at": "2023-11-24T13:04:45Z",
    "user": "youngjin-lee"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 461,
    "title": "The custom endpoint response doesn't stream even though the endpoint is sending streaming content",
    "body": "@nsarrazin I'm transmitting the streaming response to the chat UI, but it displays all the content simultaneously rather than progressively streaming the text generation part. Can you help me address this issue?\r\n\r\nReference: #380 ",
    "url": "https://github.com/huggingface/chat-ui/issues/461",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2023-09-25T07:43:57Z",
    "updated_at": "2023-10-29T11:21:04Z",
    "comments": 2,
    "user": "nandhaece07"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 279,
    "title": "How to run AutoTrain Advanced UI locally",
    "body": "How to run AutoTrain Advanced UI locally \ud83d\ude22 ",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/279",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-25T07:25:51Z",
    "updated_at": "2024-04-09T03:20:17Z",
    "user": "LronDC"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 328,
    "title": "[Question] React.js serve sentence bert in browser keep reporting models not found.",
    "body": "my codes:\r\n```javascript\r\nexport const useInitTransformers = () => {\r\n  const init = async () => {\r\n    // @ts-ignore\r\n    env.allowLocalModels = false;\r\n    extractor = await pipeline(\r\n      \"feature-extraction\",\r\n      \"Xenova/all-mpnet-base-v2\",\r\n    );\r\n  };\r\n  return { init };\r\n};\r\n```\r\n\r\nI'm building a frontend with React that can serve sentence bert directly in browser, but no idea why even i add the line\r\n`env.allowLocalModels = false`\r\n before pipeline loading the model. In the production environment, it's still trying to access model locally `/models/...`, but which will never exists in this usecase. \r\n\r\n**Is there any way i can bypass this check and directly pull the model from remote?**\r\n \r\n![image](https://github.com/xenova/transformers.js/assets/26846727/9b6222d7-cb02-44c1-b4e5-b3ab3f52797e)\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/328",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-24T15:51:47Z",
    "updated_at": "2024-10-18T13:30:11Z",
    "user": "bianyuanop"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2569,
    "title": "\ud83d\udca1 [REQUEST] - <title>",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\n\nThis tutorial \u201cA GENTLE INTRODUCTION TO TORCH.AUTOGRAD\u201d, the gradients of the error w.r.t. parameters, Q w.r.t a, I think the result should be a 2x2 matrix but not a 2-d vector, according to the matrix calculus.\n\n### Existing tutorials on this topic\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @albanD",
    "url": "https://github.com/pytorch/tutorials/issues/2569",
    "state": "closed",
    "labels": [
      "question",
      "core"
    ],
    "created_at": "2023-09-24T11:24:53Z",
    "updated_at": "2023-10-27T19:23:44Z",
    "user": "haoyunliang"
  },
  {
    "repo": "pytorch/vision",
    "number": 7987,
    "title": "How to update RegionProposalNetwork loss function in Faster RCNN? ",
    "body": "Excuse me if this question is stupid, but I can't seem to figure out how to do this\u2026\r\n\r\nI want to update the loss function of the RPN in FasterRCNN. See these lines [here](https://github.com/pytorch/vision/blob/beb4bb706b5e13009cb5d5586505c6d2896d184a/torchvision/models/detection/generalized_rcnn.py#L104-L105), which calls the `compute_loss` function [here](https://github.com/pytorch/vision/blob/main/torchvision/models/detection/rpn.py#L298). I want to modify the `compute_loss` function (the second link).\r\n\r\nI\u2019m trying to update this `compute_loss` function in my code like so:\r\n\r\n```rpn.RegionProposalNetwork.compute_loss = custom_loss```\r\n\r\nHowever, this is not working i.e. it has no effect. Any idea how to update the RPN\u2019s loss function?",
    "url": "https://github.com/pytorch/vision/issues/7987",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-24T09:16:17Z",
    "updated_at": "2023-10-05T14:46:37Z",
    "user": "darian69"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 109958,
    "title": "How to compile torch 2.0.1 version from source?",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhile I was using 'git clone --branch v2.0.1 https://github.com/pytorch/pytorch.git  & python setup.py develop', and 'Building wheel torch-1.14.0a0+410ce96' version was being built. \n\n### Versions\n\nI also checked the version.txt, it shows '2.0.0a0' which should be the version in v2.0.1 tag branch.\r\n\r\nSo how should I compile torch 2.0.1 version from source? Thanks!",
    "url": "https://github.com/pytorch/pytorch/issues/109958",
    "state": "open",
    "labels": [
      "oncall: releng",
      "triaged"
    ],
    "created_at": "2023-09-24T00:53:04Z",
    "updated_at": "2023-09-25T11:01:11Z",
    "user": "tonylin52"
  },
  {
    "repo": "huggingface/candle",
    "number": 944,
    "title": "Question: How to tokeninize text for Llama?",
    "body": "Hello everybody,\n\nHow can I tokenize text to use with Llama? I want to fine-tune Llama on my custom data, so how can I tokenize from a String and then detokenize the logits into a String?\n\nI have looked at the Llama example for how to detokenize, but cannot find any clear documentation on how the implementation actually works for outputting results during training.\n\nThanks!",
    "url": "https://github.com/huggingface/candle/issues/944",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-23T18:19:56Z",
    "updated_at": "2023-09-23T23:01:13Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 327,
    "title": "Calling pipeline returns `undefined`. What are possible reasons?",
    "body": "The repository if you need it \u25b6\u25b6\u25b6 [China Cups](https://github.com/piscopancer/china-cups)\r\n\r\n## Next 13.5 / server-side approach\r\n\r\nJust started digging into your library. Sorry for stupidity.\r\n\r\n### `src/app/api/translate/route.ts` \ud83d\udc47\r\n```ts\r\nimport { NextRequest, NextResponse } from 'next/server'\r\nimport { PipelineSingleton } from '@/utils/pipeline'\r\n\r\nexport async function GET(request: NextRequest) {\r\n\tconst text = request.nextUrl.searchParams.get('text')\r\n\tif (!text) {\r\n\t\treturn NextResponse.json(\r\n\t\t\t{\r\n\t\t\t\terror: 'Missing text',\r\n\t\t\t},\r\n\t\t\t{ status: 400 },\r\n\t\t)\r\n\t}\r\n\tconst translator = await PipelineSingleton.getInstance()\r\n\tconst translation = await translator(text)\r\n\tconsole.log(translation) // undefined\r\n\treturn NextResponse.json(translation)\r\n}\r\n```\r\n\r\n### `src/utils/pipeline.ts` \ud83d\udc47\r\nThis singleton must be fine, I suppose. \r\n```ts\r\nimport { Pipeline, pipeline } from '@xenova/transformers'\r\nimport { PretrainedOptions } from '@xenova/transformers/types/models'\r\n\r\nfunction DeclarePipeline() {\r\n\treturn class PipelineSingleton {\r\n\t\tstatic task = 'question-answering'\r\n\t\tstatic model = undefined as undefined | string\r\n\t\tstatic instance = null as null | Promise<Pipeline>\r\n\r\n\t\tstatic async getInstance(options?: PretrainedOptions) {\r\n\t\t\tif (!this.instance) {\r\n\t\t\t\tthis.instance = pipeline(this.task, this.model, options)\r\n\t\t\t}\r\n\t\t\treturn this.instance\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport const PipelineSingleton = (() => {\r\n\tif (process.env.NODE_ENV !== 'production') {\r\n\t\tconst gl = global as any\r\n\t\tif (!gl.PipelineSingleton) {\r\n\t\t\tgl.PipelineSingleton = DeclarePipeline()\r\n\t\t}\r\n\t\treturn gl.PipelineSingleton\r\n\t}\r\n\treturn DeclarePipeline()\r\n})() as ReturnType<typeof DeclarePipeline>\r\n```\r\n### `src/app/page.tsx`This is how I query it \ud83d\udc47\r\nBtw, no errors occur on this stage\r\n```tsx\r\nexport default async function HomePage({ searchParams }: THomePage) {\r\n\tconst text = 'Hello'\r\n\tconst translation = await axios.get(`/translate?text=${text}`).then((res) => res.data())\r\n\t// const translation = await fetch(`/translate?text=${encodeURIComponent(text)}`).then((res) => res.json())\r\n\treturn <pre>{JSON.stringify(translation)}</pre>\r\n```\r\n\r\n## One more very important thing\r\nWhen I **manually** go to `http://localhost:3000/api/translate?text=Hello` I very happily get this error:\r\n```\r\n \u2a2f TypeError: Value is not JSON serializable\r\n    at serializeJavascriptValueToJSONString (node:internal/deps/undici/undici:1203:15)\r\n    at Response.json (node:internal/deps/undici/undici:6746:55)\r\n    at NextResponse.json (webpack-internal:///(rsc)/./node_modules/next/dist/server/web/spec-extension/response.js:66:35)\r\n    at GET (webpack-internal:///(rsc)/./src/app/api/translate/route.ts:24:95)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async C:\\web-dev\\next\\china-cups\\node_modules\\next\\dist\\compiled\\next-server\\app-route.runtime.dev.js:1:66877\r\n ```\r\n \ud83d\udc46 the browser cannot load this url if text=... is present \ud83d\ude1f.\r\n\r\n \ud83d\udc96\r\n ",
    "url": "https://github.com/huggingface/transformers.js/issues/327",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-23T15:57:24Z",
    "updated_at": "2023-09-24T06:55:08Z",
    "user": "piscopancer"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2340,
    "title": "\u2753 [Question] Why import torch_tensorrt set log level to info automatically?",
    "body": "## \u2753 Question\r\n\r\nThe default log level of python is warning.\r\nWhy import torch_tensorrt set log level to info automatically?\r\nHow could I set log level back to warning?\r\n\r\n```\r\nimport logging\r\nimport torch_tensorrt\r\n\r\nlogging.info(\"INFO\")\r\nlogging.warning(\"WARNING\")\r\nlogging.error(\"ERROR\")\r\n```\r\n\r\nstderr outputs:\r\n```\r\nINFO:root:INFO\r\nWARNING:root:WARNING\r\nERROR:root:ERROR\r\n```\r\n\r\nwhat I want:\r\n```\r\nWARNING:root:WARNING\r\nERROR:root:ERROR\r\n```\r\n\r\n## What you have already tried\r\n\r\nBelow statements doesn't work\r\n\r\n```\r\ntorch_tensorrt.logging.set_reportable_log_level(torch_tensorrt.logging.Level.Warning)\r\n# or\r\nlogging.basicConfig(level=logging.WARNING)\r\n```\r\n\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\nDocker image from: nvcr.io/nvidia/pytorch:23.05-py3\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2340",
    "state": "open",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-09-23T13:51:10Z",
    "updated_at": "2024-01-01T00:02:44Z",
    "user": "KindRoach"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1410,
    "title": "Export TrOCR to ONNX",
    "body": "I was trying to export my fine-tuned TrOCR model to ONNX using following command. I didn't get any errors, but in onnx folder only encoder model is saved.\r\n```\r\n!python -m transformers.onnx --model=model_path --feature=vision2seq-lm onnx/ --atol 1e-2\r\n```\r\nSo, regarding this, I have 2 questions.\r\n1. How to save decoder_model.onnx, so that I can use [this inference script](https://gist.github.com/mht-sharma/f38c670930ac7df413c07327e692ee39).\r\n2. If it is not possible to export the decoder model to ONNX, how can I perform inference using encoder_model.onnx? According to my understanding, model.generate() takes time to generate output, while the decode method doesn't consume as much time compared to the generate method. Is there any way to use encoder_model.onnx with the existing decoder model in order to optimize response time?\r\n```\r\np = processor(image, return_tensors=\"pt\").pixel_values\r\ngenerated_ids = model.generate(\r\n    p,\r\n    do_sample=True,\r\n    top_k=5,\r\n    top_p=0.1,\r\n    num_beams=4,\r\n    num_return_sequences=1,\r\n    output_scores=True,\r\n    use_cache=True,\r\n    return_dict_in_generate=True\r\n)\r\n\r\ngenerated_text = processor.batch_decode(generated_ids.sequences, skip_special_tokens=True)[0]\r\n\r\n```\r\n\r\nPlease correct me if this approach to optimize response time is wrong.\r\nThanks.",
    "url": "https://github.com/huggingface/optimum/issues/1410",
    "state": "closed",
    "labels": [
      "onnx"
    ],
    "created_at": "2023-09-23T09:19:50Z",
    "updated_at": "2024-10-15T16:21:52Z",
    "comments": 2,
    "user": "VallabhMahajan1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 109880,
    "title": "[FSDP ]How to convert sharded_state_dict files into full_state_dict offline without distributed process",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nCurrently, if I use FSDP with 128 gpus and save checkpoints with sharded_state_dict to avoid gathering the full_state_dict on rank0 for saving, there is no way to obtain the full_state_dict ckpt offline. \r\n\r\nThe only way to obtain full_state_dict is to launch the exact 128GPU distributed process with FSDP to load that sharded_state_dict model, then switch to full_state_dict config and save the ckpt to files, which is originally problem we wanted to avoid.\r\n\r\nI cannot read the sharded_state_dict file (with `torch.load()`) individually either, except if I launch a 128gpu distributed process to read it. The file contain `ShardedTensor` which requires the same world_size=128 to load.\r\n\r\nI would like to have an offline script to read each sharded file and write iterative to a pytorch_model_0.bin, pytorch_model_1.bin, pytorch_model_2.bin...\r\n\r\nAnd then we can load the model with `AutoModelForCausalLM.from_pretrained(...)` by loading each `.bin`\r\n\r\nThanks!\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin",
    "url": "https://github.com/pytorch/pytorch/issues/109880",
    "state": "closed",
    "labels": [
      "oncall: distributed",
      "triaged",
      "module: fsdp"
    ],
    "created_at": "2023-09-22T13:44:11Z",
    "updated_at": "2024-05-16T01:16:12Z",
    "user": "nxphi47"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2566,
    "title": "[BUG] - Per sample gradients using function transforms not working for RNN",
    "body": "### Add Link\n\nHello!\r\nI'm working on a optimization algorithm that requires computing the per sample gradients. Assuming the batch size is $N$ and the number of model parameters is $M$, I want to calculate $\\partial \\log p(\\mathbf{x}^{(i)};\\theta)/\\partial \\theta_j$, which is an $N \\times M$ matrix. I found the [[PER-SAMPLE-GRADIENTS](https://pytorch.org/tutorials/intermediate/per_sample_grads.html)](https://pytorch.org/tutorials/intermediate/per_sample_grads.html) tutorial and began my own experiments. As a proof of concept, I defined a generative model with a tractable likelihood, such as MADE (Masked Autoencoder for Distribution Estimation), PixelCNN, RNN, etc., and sepcified the `log_prob` and `sample` methods. I utilized the function transforms methods mentioned in the tutorial, but currently, it only works for MADE (I believed it would work for NADE and PixelCNN too, since these models need only one forward pass to calculate the log likelihood of $\\mathbf{x}$. For RNN however, both sampling and inference require $N$ forward pass). \r\nBelow, I've provided my code snippets, and I'm interested in figuring out why it's not working for RNN. Making it work for RNN would significantly reduce the number of parameters for my research purpose. \r\nThank you!\n\n### Describe the bug\n\n```python\r\nimport math\r\n\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\ntorch.manual_seed(0)\r\n\r\n\r\nclass MADE(nn.Module):\r\n    '''A simple one-layer MADE (Masked Autoencoder for Distribution Estimation)'''\r\n\r\n    def __init__(self, n=10, device='cpu', *args, **kwargs):\r\n        super().__init__()\r\n        self.n = n\r\n        self.device = device\r\n\r\n        self.weight = nn.Parameter(torch.randn(self.n, self.n) / math.sqrt(self.n))\r\n        self.bias = nn.Parameter(torch.zeros(self.n))\r\n        mask = torch.tril(torch.ones(self.n, self.n), diagonal=-1)\r\n        self.register_buffer('mask', mask)\r\n\r\n    def pred_logits(self, x):\r\n        return F.linear(x, self.mask * self.weight, self.bias)\r\n\r\n    def forward(self, x):\r\n        logits = self.pred_logits(x)\r\n        log_probs = - F.binary_cross_entropy_with_logits(logits, x, reduction='none')\r\n        return log_probs.sum(-1)\r\n\r\n    @torch.no_grad()\r\n    def sample(self, batch_size):\r\n        x = torch.zeros(batch_size, self.n, dtype=torch.float, device=self.device)\r\n        for i in range(self.n):\r\n            logits = self.pred_logits(x)[:, i]\r\n            x[:, i] = torch.bernoulli(torch.sigmoid(logits))\r\n        return x\r\n\r\n\r\nclass GRUModel(nn.Module):\r\n    '''GRU for density estimation'''\r\n\r\n    def __init__(self, n=10, input_size=2, hidden_size=8, device='cpu'):\r\n        super().__init__()\r\n        self.n = n\r\n        self.input_size = input_size  # input_size=2 when x is binary\r\n        self.hidden_size = hidden_size\r\n        self.device = device\r\n        self.gru_cell = nn.GRUCell(self.input_size, self.hidden_size)\r\n        self.fc_layer = nn.Linear(self.hidden_size, 1)\r\n\r\n    def pred_logits(self, x, h=None):\r\n        x = torch.stack([x, 1 - x], dim=1)  # 1 -> (1, 0), 0 -> (0, 1), (batch_size, 2)\r\n        h_next = self.gru_cell(x, h)  # h_{i+1}\r\n        logits = self.fc_layer(h_next).squeeze(1)\r\n        return h_next, logits\r\n\r\n    def forward(self, x):\r\n        log_prob_list = []\r\n        x = torch.cat([torch.zeros(x.shape[0], 1, dtype=torch.float, device=self.device), x], dim=1)  # cat x_0\r\n        h = torch.zeros(x.shape[0], self.hidden_size, dtype=torch.float, device=self.device)  # h_0\r\n        for i in range(self.n):\r\n            h, logits = self.pred_logits(x[:, i], h)\r\n            log_prob = - F.binary_cross_entropy_with_logits(logits, x[:, i + 1], reduction='none')\r\n            log_prob_list.append(log_prob)\r\n        return torch.stack(log_prob_list, dim=1).sum(dim=1)\r\n\r\n    @torch.no_grad()\r\n    def sample(self, batch_size):\r\n        x = torch.zeros(batch_size, self.n + 1, dtype=torch.float, device=self.device)\r\n        for i in range(self.n):\r\n            h, logits = self.pred_logits(x[:, i], h=None if i == 0 else h)\r\n            x[:, i + 1] = torch.bernoulli(torch.sigmoid(logits))\r\n        return x[:, 1:]\r\n\r\n\r\nif __name__ == '__main__':\r\n    model = MADE()\r\n    # model = GRUModel()\r\n\r\n    # Sample from the generative model\r\n    samples = model.sample(128)\r\n\r\n    # Then I use the function transforms methods mentioned in the tutorial\r\n    # to calculate the per sample mean\r\n    from torch.func import functional_call, grad, vmap\r\n    params = {k: v.detach() for k, v in model.named_parameters()}\r\n\r\n    def loss_fn(log_probs):\r\n        return log_probs.mean(0)\r\n\r\n    def compute_loss(params, sample):\r\n        batch = sample.unsqueeze(0)\r\n        log_prob = functional_call(model, (params,), (batch,))\r\n        loss = loss_fn(log_prob)\r\n        return loss\r\n\r\n    ft_compute_grad = grad(compute_loss)\r\n    ft_compute_sample_grad = vmap(ft_compute_grad, in_dims=(None, 0))\r\n    ft_per_sample_grads = ft_compute_sample_grad(params, samples)\r\n\r\n    print(ft_pe",
    "url": "https://github.com/pytorch/tutorials/issues/2566",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-22T02:15:18Z",
    "updated_at": "2023-10-26T16:03:36Z",
    "user": "bnuliujing"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 459,
    "title": "Chats Stop generation button is broken?",
    "body": "whenever I'm using the Chat UI on hf.co/chat, and I press the stop generation button it deletes both the prompt and the response?",
    "url": "https://github.com/huggingface/chat-ui/issues/459",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2023-09-21T19:38:38Z",
    "updated_at": "2023-10-08T00:44:44Z",
    "comments": 4,
    "user": "VatsaDev"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 457,
    "title": "Custom Models breaking Chat-ui",
    "body": "Setting a custom model in .env.local is now breaking chat-ui for me. @jackielii @nsarrazin \r\n\r\nIf I start mongo and then run ```npm run dev``` with a .env.local file including only the mongo url, there is no issue.\r\n\r\nThen I add the following:\r\n```\r\n\r\nMODELS=`[\r\n  {\r\n    \"name\": \"OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5\",\r\n    \"datasetName\": \"OpenAssistant/oasst1\",\r\n    \"description\": \"A good alternative to ChatGPT\",\r\n    \"websiteUrl\": \"https://open-assistant.io\",\r\n    \"userMessageToken\": \"<|prompter|>\", # This does not need to be a token, can be any string\r\n    \"assistantMessageToken\": \"<|assistant|>\", # This does not need to be a token, can be any string\r\n    \"userMessageEndToken\": \"<|endoftext|>\", # Applies only to user messages. Can be any string.\r\n    \"assistantMessageEndToken\": \"<|endoftext|>\", # Applies only to assistant messages. Can be any string.\r\n    \"preprompt\": \"Below are a series of dialogues between various people and an AI assistant. The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable. The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed. It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer. That said, the assistant is practical and really does its best, and doesn't let caution get too much in the way of being useful.\\n-----\\n\",\r\n    \"promptExamples\": [\r\n      {\r\n        \"title\": \"Write an email from bullet list\",\r\n        \"prompt\": \"As a restaurant owner, write a professional email to the supplier to get these products every week: \\n\\n- Wine (x10)\\n- Eggs (x24)\\n- Bread (x12)\"\r\n      }, {\r\n        \"title\": \"Code a snake game\",\r\n        \"prompt\": \"Code a basic snake game in python, give explanations for each step.\"\r\n      }, {\r\n        \"title\": \"Assist in a task\",\r\n        \"prompt\": \"How do I make a delicious lemon cheesecake?\"\r\n      }\r\n    ],\r\n    \"parameters\": {\r\n      \"temperature\": 0.9,\r\n      \"top_p\": 0.95,\r\n      \"repetition_penalty\": 1.2,\r\n      \"top_k\": 50,\r\n      \"truncate\": 1000,\r\n      \"max_new_tokens\": 1024,\r\n      \"stop\": [\"<|endoftext|>\"]  # This does not need to be tokens, can be any list of strings\r\n    }\r\n  }\r\n]`\r\n```\r\nand now I get:\r\n```\r\nUnexpected token \r\n in JSON at position 424\r\nSyntaxError: Unexpected token \r\n in JSON at position 424\r\n    at JSON.parse (<anonymous>)\r\n    at eval (/Users/ronanmcgovern/TR/chat-ui/src/lib/server/models.ts:75:14)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async instantiateModule (file:///Users/ronanmcgovern/TR/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:54405:9\r\n```\r\nThe specific line of code being referenced is this:\r\n```\r\n\"Based on the conversation history (my previous questions are: {{previousMessages}}), give me an appropriate query to answer my question for google search. You should not say more than query. You should not say any words except the query. For the context, today is {{currentDate}}\" +\r\n\r\n```",
    "url": "https://github.com/huggingface/chat-ui/issues/457",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-09-21T11:12:42Z",
    "updated_at": "2023-09-21T16:03:30Z",
    "comments": 10,
    "user": "RonanKMcGovern"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6252,
    "title": "exif_transpose not done to Image (PIL problem)",
    "body": "### Feature request\n\nI noticed that some of my images loaded using PIL have some metadata related to exif that can rotate them when loading.\r\nSince the dataset.features.Image uses PIL for loading, the loaded image may be rotated (width and height will be inverted) thus for tasks as object detection and layoutLM this can create some inconsistencies (between input bboxes and input images). \r\n\r\nFor now there is no option in datasets.features.Image to specify that. We need to do the following when preparing examples (when preparing images for training, test or inference): \r\n```\r\nfrom PIL import Image, ImageOps \r\npil = ImageOps.exif_transpose(pil)\r\n```\r\n\r\nreference: https://stackoverflow.com/a/63950647/5720150 \r\n\r\nIs it possible to add this by default to the datasets.feature.Image ? or to add the option to do the ImageOps.exif_transpose?\r\n\r\nThank you\n\n### Motivation\n\nPrevent having inverted data related to exif metadata that may affect object detection tasks\n\n### Your contribution\n\nChanging in datasets.featrues.Image I can help with that. ",
    "url": "https://github.com/huggingface/datasets/issues/6252",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-09-21T08:11:46Z",
    "updated_at": "2024-03-19T15:29:43Z",
    "comments": 2,
    "user": "rhajou"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2335,
    "title": "\u2753 [Question] Bert lost a lot of accuracy when using fp16",
    "body": "## \u2753 Question\r\n\r\nBERT Text Classification model run in fp16 gets huge different result compared to fp32\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.13\r\n - CPU Architecture:\r\n - OS (e.g., Linux): REHL8\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.8.10\r\n - CUDA version:11.7\r\n - GPU models and configuration: Tesla T4\r\n - Any other relevant information:\r\n\r\nTorch-TensorRT Version: 1.3\r\n\r\n## Additional context\r\nModel converted from TouchScript to TensorRT\r\n\r\n```\r\nenabled_precisions= {torch.half} # run with 16-bit precision  \r\ntrt_model = torch_tensorrt.compile(model, inputs=inputs, enabled_precisions=enabled_precisions,\r\n                                          truncate_long_and_double=True, require_full_compilation=False\r\n                                          )\r\n```\r\n\r\nThe logs\r\n``` shell\r\nWARNING: [Torch-TensorRT] - For input input_ids.1, found user specified input dtype as Long, however when inspecting the graph, the input type expected was inferred to be Float\r\nThe compiler is going to use the user setting Long\r\nThis conflict may cause an error at runtime due to partial compilation being enabled and therefore\r\ncompatibility with PyTorch's data type convention is required.\r\nIf you do indeed see errors at runtime either:\r\n- Remove the dtype spec for input_ids.1\r\n- Disable partial compilation by setting require_full_compilation to True\r\nWARNING: [Torch-TensorRT] - For input token_type_ids.1, found user specified input dtype as Long, however when inspecting the graph, the input type expected was inferred to be Float\r\nThe compiler is going to use the user setting Long\r\nThis conflict may cause an error at runtime due to partial compilation being enabled and therefore\r\ncompatibility with PyTorch's data type convention is required.\r\nIf you do indeed see errors at runtime either:\r\n- Remove the dtype spec for token_type_ids.1\r\n- Disable partial compilation by setting require_full_compilation to True\r\nWARNING: [Torch-TensorRT] - For input attention_mask.1, found user specified input dtype as Long, however when inspecting the graph, the input type expected was inferred to be Double\r\nThe compiler is going to use the user setting Long\r\nThis conflict may cause an error at runtime due to partial compilation being enabled and therefore\r\ncompatibility with PyTorch's data type convention is required.\r\nIf you do indeed see errors at runtime either:\r\n- Remove the dtype spec for attention_mask.1\r\n- Disable partial compilation by setting require_full_compilation to True\r\nWARNING: [Torch-TensorRT] - Data types for input tensors have been modified by inserting aten::to operations which cast INT64 inputs to INT32. To disable this, please recompile using INT32 inputs\r\nWARNING: [Torch-TensorRT] - Truncating intermediate graph input type from at::kLong to at::kInt\r\nWARNING: [Torch-TensorRT] - Truncating intermediate graph input type from at::kLong to at::kInt\r\nWARNING: [Torch-TensorRT] - Truncating intermediate graph input type from at::kLong to at::kInt\r\nWARNING: [Torch-TensorRT] - Truncating intermediate graph input type from at::kLong to at::kInt\r\nWARNING: [Torch-TensorRT] - Truncating intermediate graph input type from at::kLong to at::kInt\r\nWARNING: [Torch-TensorRT] - Truncating intermediate graph input type from at::kLong to at::kInt\r\nWARNING: [Torch-TensorRT] - Truncating intermediate graph input type from at::kLong to at::kInt\r\nWARNING: [Torch-TensorRT] - Truncating intermediate graph input type from at::kLong to at::kInt\r\nWARNING: [Torch-TensorRT] - Truncating intermediate graph input type from at::kLong to at::kInt\r\nWARNING: [Torch-TensorRT] - Truncating intermediate graph input type from at::kLong to at::kInt\r\nWARNING: [Torch-TensorRT] - Truncating intermediate graph input type from at::kLong to at::kInt\r\nWARNING: [Torch-TensorRT] - Truncating intermediate graph input type from at::kLong to at::kInt\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See `CUDA_MODULE_LOADING` in https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars\r\nWARNING: [Torch-TensorRT] - Truncating weight (constant in the graph) from Float64 to Float32\r\nWARNING: [Torch-TensorRT] - There may be undefined behavior using dynamic shape and aten::size without setting allow_shape_tensors\r\nWARNING: [Torch-TensorRT] - Truncating weight (constant in the graph) from Int64 to Int32\r\nWARNING: [Torch-TensorRT] - There may be undefined behavior using dynamic shape and aten::size without setting allow_shape_tensors\r\nWARNING: [Torch-TensorRT] - There may be undefined behavior using dyn",
    "url": "https://github.com/pytorch/TensorRT/issues/2335",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-09-21T07:50:12Z",
    "updated_at": "2024-05-07T06:37:23Z",
    "user": "HenryYuen128"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1401,
    "title": "BUG: running python file called onnx.py causes circular errors.",
    "body": "### System Info\r\n\r\n```shell\r\nlatest optimum, python 3.10, linux cpu.\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n@JingyaHuang, @echarlaix, @michaelbenayoun\r\n\r\n\r\n\r\n### Information\r\n\r\n- [X] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction (minimal, reproducible, runnable)\r\n\r\nhttps://github.com/huggingface/optimum/issues/1177\r\n\r\nDescription of Bug:\r\nIf I create a py file to run my own scripts, and name it \"onnx.py\", it wreaks all kinds of havoc. Specifically circular errors. It took me a while to figure it was caused by \"onnx.py\" being a reserved name. This is the first time I've ever come across such an issue. I'm not sure if other modules prevent these issues by ringfencing their scope to specific folders or namespaces.. or whether it's just bad luck.\r\n\r\nIs it possible to ringfence this kind of issue by either renaming the internal onnx.py file to something that users would never use OR, customize a validation check that tells user which filenames are reserved, OR at least updating the error message so that users don't need half a day to figure out what's causing the issue?\r\n\r\nMany thanks\r\n\r\n### Expected behavior\r\n\r\nThat either I can use any filename for my script.py (eg. onnx.py) without issues\r\n\r\nOR\r\n\r\nThere's a really clear error message that states \"please do not use the following reserved names for your python scripts: eg1.py, eg2.py, etc\"\r\n\r\nMuch appreciated",
    "url": "https://github.com/huggingface/optimum/issues/1401",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2023-09-21T04:12:49Z",
    "updated_at": "2023-10-05T14:32:40Z",
    "comments": 1,
    "user": "gidzr"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5124,
    "title": "How to fine tune checkpoint .safetensor",
    "body": "### Describe the bug\n\nI tried to fine tuning a model from a checkpoint (i.e https://civitai.com/models/119202/talmendoxl-sdxl-uncensored-full-model)I converted the checkpoint to diffuser format using this library:\r\nhttps://github.com/waifu-diffusion/sdxl-ckpt-converter/\r\n\r\nThe model converted works fine for inference and the training script works fine if I use a standard base i.e.: \"stabilityai/stable-diffusion-xl-base-1.0\", but I have error when start from converted model\n\n### Reproduction\n\ndownload checkpoint: https://civitai.com/models/119202/talmendoxl-sdxl-uncensored-full-model\r\nconvert using: https://github.com/waifu-diffusion/sdxl-ckpt-converter/\r\ntstart training with:\r\n    !accelerate launch train_text_to_image_lora_sdxl.py \\\r\n      --pretrained_model_name_or_path=\"/content/drive/MyDrive/talmendoxlSDXL_v11Beta\" \\\r\n      --pretrained_vae_model_name_or_path=\"madebyollin/sdxl-vae-fp16-fix\" \\\r\n      --dataset_name=\"$INSTANCE_DIR_PARSED\" \\\r\n      --caption_column=\"text\" \\\r\n      --resolution=1024 \\\r\n      --train_batch_size=1 \\\r\n      --num_train_epochs=$TRAIN_EPOCHS \\\r\n      --checkpointing_steps=1000000 \\\r\n      --learning_rate=$LEARNING_RATE \\\r\n      --lr_scheduler=\"constant\" \\\r\n      --lr_warmup_steps=0 \\\r\n      --seed=42 \\\r\n      --output_dir=\"$OUTPUT_DIR\" \\\r\n      --enable_xformers_memory_efficient_attention \\\r\n      --gradient_checkpointing \\\r\n      --mixed_precision=\"fp16\" \\\r\n      --use_8bit_adam \n\n### Logs\n\n```shell\nYou are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.\r\nYou are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.\r\n{'clip_sample_range', 'dynamic_thresholding_ratio', 'variance_type', 'thresholding'} was not found in config. Values will be initialized to default values.\r\nTraceback (most recent call last):\r\n  File \"/content/diffusers/examples/text_to_image/train_text_to_image_lora_sdxl.py\", line 1271, in <module>\r\n    main(args)\r\n  File \"/content/diffusers/examples/text_to_image/train_text_to_image_lora_sdxl.py\", line 554, in main\r\n    text_encoder_one = text_encoder_cls_one.from_pretrained(\r\n  File \"/usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py\", line 2740, in from_pretrained\r\n    raise EnvironmentError(\r\nOSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory /content/drive/MyDrive/talmendoxlSDXL_v11Beta.\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/accelerate\", line 8, in <module>\r\n    sys.exit(main())\r\n  File \"/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py\", line 45, in main\r\n    args.func(args)\r\n  File \"/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py\", line 979, in launch_command\r\n    simple_launcher(args)\r\n  File \"/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py\", line 628, in simple_launcher\r\n    raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)\r\nsubprocess.CalledProcessError: Command '['/usr/bin/python3', 'train_text_to_image_lora_sdxl.py', '--pretrained_model_name_or_path=/content/drive/MyDrive/talmendoxlSDXL_v11Beta', '--pretrained_vae_model_name_or_path=madebyollin/sdxl-vae-fp16-fix', '--dataset_name=/content/instancefolder_parsed', '--caption_column=text', '--resolution=1024', '--train_batch_size=1', '--num_train_epochs=1', '--checkpointing_steps=1000000', '--learning_rate=2e-05', '--lr_scheduler=constant', '--lr_warmup_steps=0', '--seed=42', '--output_dir=/content/lora-trained-xl-colab', '--enable_xformers_memory_efficient_attention', '--gradient_checkpointing', '--mixed_precision=fp16', '--use_8bit_adam']' returned non-zero exit status 1.\n```\n\n\n### System Info\n\n- `diffusers` version: 0.21.0.dev0\r\n- Platform: Linux-5.15.120+-x86_64-with-glibc2.35\r\n- Python version: 3.10.12\r\n- PyTorch version (GPU?): 2.0.1+cu118 (True)\r\n- Huggingface_hub version: 0.17.2\r\n- Transformers version: 4.33.2\r\n- Accelerate version: 0.21.0\r\n- xFormers version: 0.0.21\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\n\n### Who can help?\n\n@williamberman, @patrickvonplaten, @sayakpau",
    "url": "https://github.com/huggingface/diffusers/issues/5124",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2023-09-20T22:45:38Z",
    "updated_at": "2023-11-22T15:06:19Z",
    "user": "EnricoBeltramo"
  },
  {
    "repo": "pytorch/text",
    "number": 2205,
    "title": "Declaring _MapStyleDataset inside function makes it unpicklable",
    "body": "## \ud83d\udc1b Bug\r\n\r\n**Describe the bug** \r\nWhen trying to use a Dataset that was converted to map-style using `data.functional.to_map_style_dataset`, I encountered the following error message: \r\n> ...\r\n> File \"/usr/lib/python3.8/multiprocessing/reduction.py\", line 60, in dump\r\n>     ForkingPickler(file, protocol).dump(obj)\r\n> AttributeError: Can't pickle local object 'to_map_style_dataset.<locals>._MapStyleDataset'\r\n\r\nAfter some research, I found the list of what is picklable [here](https://docs.python.org/3/library/pickle.html#what-can-be-pickled-and-unpickled) and found that for a class to be picklable, it has to be from the top level of a module\r\n\r\nThis isn't the case for `_MapStyleDataset` as it is declared within the `to_map_style_dataset` function\r\n\r\nThe fix seems simple enough (declare `_MapStyleDataset` outside the function) so I would like to know if there was anything making it undesireable ? If not, I'll create a PR for it but I would like some opinions on it\r\n",
    "url": "https://github.com/pytorch/text/issues/2205",
    "state": "open",
    "labels": [],
    "created_at": "2023-09-20T12:27:34Z",
    "updated_at": "2023-09-20T12:27:34Z",
    "comments": 0,
    "user": "AnthoJack"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5118,
    "title": "how to use controlnet's reference_only fuction with diffusers??",
    "body": "### Model/Pipeline/Scheduler description\n\ncan anyone help me to understand how to use controlnet's reference_only fuction with diffusers\n\n### Open source status\n\n- [ ] The model implementation is available\n- [ ] The model weights are available (Only relevant if addition is not a scheduler).\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/5118",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-09-20T10:17:53Z",
    "updated_at": "2023-11-08T15:07:34Z",
    "user": "sudip550"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2327,
    "title": "\u2753 [Question] dynamc engines & interpolation align_corners=True",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\n\r\nI used the latest docker with tag 23.08-py3. When converting model doing interpolation with align_corners=True and dynamic input, I got error as below.\r\n```\r\nRuntimeError: [Error thrown at core/conversion/converters/impl/interpolate.cpp:412] Expected !(align_corners && ctx->input_is_dynamic) to be true but got false                                                                                               \r\nTorch-TensorRT currently does not support the compilation of dynamc engines from code using PyTorch [bi/tri]linear interpolation via scale factor and align_corners=True \r\n```\r\n\r\nAnd I found this check did exist in code with tag v1.4.0, but not in main branch.  Will I need to clone the latest code and recompile torch-tensorrt to escape frome this error and will it work? Or any other simple way ? \r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\nnvcr.io/nvidia/pytorch:23.08-py3\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2327",
    "state": "open",
    "labels": [
      "question",
      "component: converters"
    ],
    "created_at": "2023-09-20T07:25:34Z",
    "updated_at": "2023-11-30T10:57:37Z",
    "user": "ArtemisZGL"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 321,
    "title": "[Question] Image Embeddings for ViT",
    "body": "Is it possible to get image embeddings using  Xenova/vit-base-patch16-224-in21k model? We use feature_extractor to get embeddings for sentences. Can we use feature_extractor to get image embeddings?\r\n```js\r\nconst model_id = \"Xenova/vit-base-patch16-224-in21k\";\r\nconst image = await RawImage.read(\"https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/football-match.jpg\");\r\nconst classifier = await pipeline(\"image-classification\", model_id);\r\nconst { image_embeddings } = await classifier.processor.feature_extractor(image);\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/321",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-20T01:22:08Z",
    "updated_at": "2024-01-13T01:25:03Z",
    "user": "hadminh"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1395,
    "title": "TensorrtExecutionProvider documentation",
    "body": "### System Info\n\n```shell\nmain, docs\n```\n\n\n### Who can help?\n\n@fxmarty \n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nThe method described in the docs for [TRT engine building](https://huggingface.co/docs/optimum/onnxruntime/usage_guides/gpu#tensorrt-engine-build-and-warmup) is outdated, first mentioned [here](https://github.com/huggingface/optimum/issues/842#issuecomment-1568766399), I tested the dynamic shapes method in `optimum-benchmark` [here](https://github.com/huggingface/optimum-benchmark/pull/55#issuecomment-1721180586). \n\n### Expected behavior\n\nWe can update the docs with this snippet:\r\n\r\n```python\r\nprovider_options = {\r\n    \"trt_engine_cache_enable\": True,\r\n    \"trt_engine_cache_path\": \"tmp/trt_cache_gpt2_example\",\r\n    \"trt_profile_min_shapes\": \"input_ids:1x16,attention_mask:1x16\",\r\n    \"trt_profile_max_shapes\": \"input_ids:1x64,attention_mask:1x64\",\r\n    \"trt_profile_opt_shapes\": \"input_ids:1x32,attention_mask:1x32\",\r\n}\r\n\r\nort_model = ORTModelForCausalLM.from_pretrained(\r\n    \"gpt2\",\r\n    export=True,\r\n    use_cache=False,\r\n    provider=\"TensorrtExecutionProvider\",\r\n    provider_options=provider_options,\r\n)\r\n\r\nort_model.generate(\r\n    input_ids=torch.tensor([[1] * 16]).to(\"cuda\"),\r\n    max_new_tokens=64-16,\r\n    min_new_tokens=64-16,\r\n    pad_token_id=0,\r\n    eos_token_id=0,\r\n)\r\n```\r\n\r\nthough it's still not clear to me what's the effect of `trt_profile_opt_shapes`.",
    "url": "https://github.com/huggingface/optimum/issues/1395",
    "state": "open",
    "labels": [
      "documentation",
      "onnxruntime"
    ],
    "created_at": "2023-09-19T09:06:17Z",
    "updated_at": "2023-09-19T09:57:26Z",
    "comments": 1,
    "user": "IlyasMoutawwakil"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 317,
    "title": "How to use xenova/transformers in VSCode Extension",
    "body": "Hey guys! I am trying to use xenova/transformers in CodeStory, we roll a vscode extension as well and I am hitting issues with trying to get the import working, here's every flavor of importing the library which I have tried to date.\r\n\r\n```\r\nconst TransformersApi = Function('return import(\"@xenova/transformers\")')();\r\nconst { pipeline, env } = await TransformersApi;\r\n```\r\n\r\n```\r\nconst { pipeline, env } = await import('@xenova/transformers')\r\n```\r\n\r\n```\r\nconst TransformersApi = require('@xenova/transformers');\r\nconst { pipeline, env } = await TransformersApi;\r\n```\r\n\r\nI think the crux of the issue is the node environment which VSCode uses which does not allow any of these to work, and I keep getting the deaded:\r\n\r\n```\r\nError [ERR_REQUIRE_ESM]: require() of ES Module /Applications/Aide.app/Contents/Resources/app/extensions/codestory/node_modules/@xenova/transformers/src/transformers.js from /Applications/Aide.app/Contents/Resources/app/extensions/codestory/out/llm/embeddings/sentenceTransformers.js not supported.\r\nInstead change the require of transformers.js in /Applications/Aide.app/Contents/Resources/app/extensions/codestory/out/llm/embeddings/sentenceTransformers.js to a dynamic import() which is available in all CommonJS modules.\r\n\r\n```\r\n\r\nafter checking the js code which is generated, it ends up including the require word:\r\n```\r\n__importStar(require('@xenova/transformers'))\r\n```\r\n\r\nwhen I used the first option which was a function I got a very weird error btw:\r\n```\r\n[Extension Host] TypeError: A dynamic import callback was not specified.\r\n    at new NodeError (node:internal/errors:399:5)\r\n    at importModuleDynamicallyCallback (node:internal/process/esm_loader:39:9)\r\n    at eval (eval at <anonymous> (/Applications/Aide.app/Contents/Resources/app/extensions/codestory/out/llm/embeddings/sentenceTransformers.js:46:41), <anonymous>:3:1)\r\n\r\n```\r\n\r\nthis is mostly comping from the node version which VSCode uses itself.\r\n\r\nDo you guys have any suggestions on what I can do about this? Thanks!",
    "url": "https://github.com/huggingface/transformers.js/issues/317",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-19T01:35:21Z",
    "updated_at": "2024-07-27T20:36:37Z",
    "user": "theskcd"
  },
  {
    "repo": "huggingface/candle",
    "number": 894,
    "title": "How to fine-tune Llama?",
    "body": "Hello everybody,\r\n\r\nI am trying to fine-tune the Llama model, but cannot load the safetensors file. I have modified the training loop for debugging and development:\r\n```rust\r\npub fn run(args: &crate::TrainingCmd, common_args: &crate::Args) -> Result<()> {\r\n    let config_path = match &args.config {\r\n        Some(config) => std::path::PathBuf::from(config),\r\n        None => {\r\n            let api = hf_hub::api::sync::Api::new().unwrap();\r\n            println!(\"loading the model weights from {}\", args.model_id);\r\n            let api = api.model(args.model_id.clone());\r\n            api.get(&args.which_model).unwrap()\r\n        }\r\n    };\r\n\r\n\r\n    let device = candle_examples::device(common_args.cpu)?;\r\n    let config = Config::tiny();\r\n    \r\n    let mut varmap = candle_nn::VarMap::new();\r\n    let vb = candle_nn::VarBuilder::from_varmap(&varmap, DType::F32, &device);\r\n    varmap.load(config_path).unwrap();\r\n\r\n    /*let cache = Cache::new(false, &config, vb.pp(\"rot\"))?;\r\n    let model = Llama::load(vb, &cache, config, true)?;\r\n\r\n    let params = candle_nn::ParamsAdamW {\r\n        lr: args.learning_rate,\r\n        ..Default::default()\r\n    };\r\n    let mut opt = candle_nn::AdamW::new(varmap.all_vars(), params)?;\r\n    for (batch_index, batch) in batch_iter.enumerate() {\r\n        let (inp, tgt) = batch?;\r\n        let logits = model.forward(&inp, 0)?;\r\n        let loss = candle_nn::loss::cross_entropy(&logits.flatten_to(1)?, &tgt.flatten_to(1)?)?;\r\n        opt.backward_step(&loss)?;\r\n\r\n        if batch_index > 0 && batch_index % 1000 == 0 {\r\n            varmap.save(\"checkpoint.safetensors\")?\r\n        }\r\n    }*/\r\n    Ok(())\r\n}\r\n```\r\n\r\nI realize this error is likely because I cannot use VarMap::load to load such a large safetensors file (as described [here](https://github.com/huggingface/safetensors/blob/main/README.md#benefits)). However, how can I use VarMap (or something else that allows me to modifiy the tensor map) to load the weights? If there is not such a method, how should I implement this myself?\r\n\r\nThank you!\r\nEric",
    "url": "https://github.com/huggingface/candle/issues/894",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-18T22:18:04Z",
    "updated_at": "2023-09-21T10:05:57Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "huggingface/candle",
    "number": 891,
    "title": "How to do fine-tuning?",
    "body": "Hello everybody,\r\n\r\nI was looking through the Candle examples and cannot seem to find an example of fine-tuning for Llama. It appears the only example present is for training from scratch. How should I fine-tune a pretrained model on my own data? Or, more generally, how should I fine tune a model that it loaded from a safetensor file (and whose VarBuilder is immutable as discussed in #883)?\r\n\r\nThanks!\r\nEric",
    "url": "https://github.com/huggingface/candle/issues/891",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-18T18:37:42Z",
    "updated_at": "2024-07-08T15:13:01Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "huggingface/transformers",
    "number": 26218,
    "title": "How to manually set the seed of randomsampler generator when training using transformers trainer",
    "body": "### System Info\r\n\r\nI used a [script](https://github.com/huggingface/transformers/blob/v4.33.0/examples/pytorch/language-modeling/run_clm.py) to continue pre-training the llama2 model. In the second epoch, the loss began to explode, so I chose to reload the checkpoint to continue training, but the loss changes were completely consistent with before, which made me doubt the iteration of the dataset is always consistent. So I tried modifying the [seed.](https://github.com/huggingface/transformers/blob/v4.33.0/examples/pytorch/language-modeling/run_clm.py#L309C33-L309C33) But in the end, my training loss is always consistent, and the state I print randomsampler is always the same. \r\nI hope someone can tell me how to solve this problem, including where the seed of this generator is specified.\r\n\r\n### Who can help?\r\n\r\n_No response_\r\n\r\n### Information\r\n\r\n- [X] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [X] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\ntransformers==4.33.0\r\npytorch==1.13.1\r\naccelerate==0.21.0\r\ndeepspeed==0.10.0\r\n\r\n### Expected behavior\r\n\r\nI hope that the sampling of training data set should be different every time.",
    "url": "https://github.com/huggingface/transformers/issues/26218",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-18T14:19:11Z",
    "updated_at": "2023-11-20T08:05:37Z",
    "user": "young-chao"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2563,
    "title": "Multiple GPU example limited to one GPU",
    "body": "https://github.com/pytorch/tutorials/blob/646c8b6368e4f43acc808e0ddddc569153d6a30f/beginner_source/blitz/data_parallel_tutorial.py#L60\r\n\r\nIsn't this line limiting the example to **one** GPU no matter how many GPUs are available?\n\ncc @sekyondaMeta @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/2563",
    "state": "closed",
    "labels": [
      "question",
      "easy",
      "docathon-h2-2023"
    ],
    "created_at": "2023-09-18T13:13:55Z",
    "updated_at": "2023-11-06T17:51:57Z",
    "user": "9cpluss"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 313,
    "title": "[Question] How to use remote models for automatic-speech-recognition",
    "body": "I have an html file that is\r\n```\r\n<!DOCTYPE html>\r\n<html>\r\n\r\n<body>\r\n<script type=\"module\">\r\n  import { pipeline,env } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.6.0';\r\n  env.allowLocalModels = false;\r\n  \r\n  const transcriber = await pipeline('automatic-speech-recognition', 'Xenova/whisper-tiny.en');\r\n\r\n  let output = await transcriber('https://xenova.github.io/transformers.js/audio/jfk.wav', { return_timestamps: true })\r\n\r\n  console.log(output)\r\n</script>\r\n</body>\r\n</html>\r\n```\r\n\r\nI'm just trying to load the model, but it seems to be requesting from local url rather than hugging face. How can I enable remote models?\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/313",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-18T04:56:52Z",
    "updated_at": "2023-09-18T05:19:00Z",
    "user": "LehuyH"
  },
  {
    "repo": "huggingface/candle",
    "number": 883,
    "title": "Question: How to properly use VarBuilder?",
    "body": "Hello everybody,\n\nI am working on implementing LoRA and want to use the VarBuilder system. However, when I try to get a tensor with get_with_hints, I get a CannotFindTensor Err. To create the Tensor, I do:\n```rust\nvb.pp(\"a\").get_with_hints(\n...lora specific shape...\n\"weight\",\n...lora specific hints...\n)\n```\nHowever, this fails with the CannotFindTensor error. How can I create the Tensor, or perhaps am I using the API incorrectly?\n\nThanks!\nEric",
    "url": "https://github.com/huggingface/candle/issues/883",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-17T20:40:27Z",
    "updated_at": "2023-09-17T21:02:24Z",
    "user": "EricLBuehler"
  },
  {
    "repo": "pytorch/xla",
    "number": 5599,
    "title": "Stubs or wheels for other OSes/architectures",
    "body": "## \u2753 Questions and Help\nI'm new to torch/xla. One development pattern which I use, and which I expect to be common, is to write software on one system (eg M-series Mac laptop) which is intended to be run elsewhere. Project docs for torch/xla regarding installation specify downloading a wheel which is Linux x86 specific. \n\nEven if my training and inference will run on Linux x86 systems, efficient and correct development strongly benefits from tools like type checkers, pylint, etc, which can quickly catch errors like incorrect methods or arguments -- but only work if _some_ amenable representation of libraries is available in the development environment.\n\nIn my current attempts to use torch/xla so far, merely following public docs has let me exercise distributed xla training in target environments, but my local branch, being unable to install the library, cannot do basic static analysis checks and certainly cannot run unit tests on modules which import xla code.\n\nAt a bare minimum the project could at least produce documentation recommending how developers on other platforms can develop against the library even if they cannot run its full range of behaviors, without having to do all development in a container.\n",
    "url": "https://github.com/pytorch/xla/issues/5599",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-17T19:03:47Z",
    "updated_at": "2025-04-29T13:22:51Z",
    "user": "abeppu"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 310,
    "title": "How to load model from the static folder path in nextjs or react or vanilla js?",
    "body": "<!-- QUESTION GOES HERE -->\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/310",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-17T14:13:57Z",
    "updated_at": "2023-09-27T08:36:29Z",
    "user": "adnankarim"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 360,
    "title": "The default file format used when loading the model\uff1f",
    "body": "I guess that huggingface loads .safetensor files by default when loading models. Is this mandatory? Can I choose to load files in. bin format? (Because I only downloaded weights in bin format, and it reported an error \u201c could not find a file in safeTensor format\u201d). I do not find related infomation in docs.\n\nThanks for your help.",
    "url": "https://github.com/huggingface/safetensors/issues/360",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-15T14:56:13Z",
    "updated_at": "2023-09-19T10:34:57Z",
    "comments": 1,
    "user": "Kong-Aobo"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5055,
    "title": "How to download config.json if it is not in the root directory.",
    "body": "Is there any way to download vae for a model where config.json is not in the root directory?\r\n\r\n```python\r\nvae = AutoencoderKL.from_pretrained(\"redstonehero/kl-f8-anime2\")\r\n``` \r\n\r\nFor example, as shown above, there is no problem if config.json exists in the root directory, but if it does not exist, an error will occur.\r\n\r\n```python\r\nvae = AutoencoderKL.from_pretrained(\"hakurei/waifu-diffusion\")\r\n``` \r\nI would be glad to get your advice.",
    "url": "https://github.com/huggingface/diffusers/issues/5055",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-15T11:37:47Z",
    "updated_at": "2023-09-16T00:15:58Z",
    "user": "suzukimain"
  },
  {
    "repo": "pytorch/torchx",
    "number": 766,
    "title": "Is this repository no longer maintained?",
    "body": "## \u2753 Questions and Help\r\n\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nBefore submitting, please ensure you have gone through our\r\n[documentation](https://pytorch.org/torchx).\r\n\r\n\r\n### Question\r\nTorch elastic redirects to this repository but it doesn't seem very active, is there a slack/ discord channel? I want to run DDP on kubernetes, is there another way i am not aware of? If torchx is best way, i'd like to contribute! Any pointers where i could start?\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/766",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-15T10:37:43Z",
    "updated_at": "2023-09-15T22:03:01Z",
    "comments": 4,
    "user": "ccharest93"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 305,
    "title": "[Question] Can I work with Peft models through the API?",
    "body": "Let's say I have the following code in Python.  How would I translate that to js?\r\n\r\n````\r\nimport torch\r\nfrom peft import PeftModel, PeftConfig\r\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\r\n\r\npeft_model_id = \"samwit/bloom-7b1-lora-tagger\"\r\nconfig = PeftConfig.from_pretrained(peft_model_id)\r\nmodel = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, return_dict=True, load_in_8bit=True, device_map='auto')\r\ntokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)\r\n\r\n# Load the Lora model\r\nmodel = PeftModel.from_pretrained(model, peft_model_id)\r\n````\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/305",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-14T21:02:59Z",
    "updated_at": "2023-09-16T00:16:03Z",
    "user": "chrisfel-dev"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2320,
    "title": "\u2753 [Question] How to use C++ bindings for torch tensorrt with CMake?",
    "body": "## \u2753 Question\r\n\r\nI would like to know how to use the examples provided [here](https://github.com/pytorch/TensorRT/tree/v1.4.0/examples/torchtrt_runtime_example) with CMake. The instructions seem to indicate only how to use it with a makefile. CMake is not able to find `torchtrt`, exactly as described in #1207, but unfortunately that issue has been closed without actually resolving it.\r\n\r\nI get the following error:\r\n```\r\nCMake Error at CMakeLists.txt:6 (find_package):\r\n  By not providing \"Findtorchtrt.cmake\" in CMAKE_MODULE_PATH this project has\r\n  asked CMake to find a package configuration file provided by \"torchtrt\",\r\n  but CMake did not find one.\r\n\r\n  Could not find a package configuration file provided by \"torchtrt\" with any\r\n  of the following names:\r\n\r\n    torchtrtConfig.cmake\r\n    torchtrt-config.cmake\r\n\r\n  Add the installation prefix of \"torchtrt\" to CMAKE_PREFIX_PATH or set\r\n  \"torchtrt_DIR\" to a directory containing one of the above files.  If\r\n  \"torchtrt\" provides a separate development package or SDK, be sure it has\r\n  been installed.\r\n```\r\n\r\n## What you have already tried\r\n\r\nI noticed that there is a `python3.8/dist-packages/torch/share/cmake/Torch/TorchConfig.cmake`, but there are no cmake files at all in my torch_tensorrt installation, which otherwise works perfectly fine:\r\n```\r\nroot@jetson:/opt/inference/TensorRT# find /usr/local/lib/python3.8/dist-packages -name *.cmake | grep Torch\r\n/usr/local/lib/python3.8/dist-packages/torch/share/cmake/Torch/TorchConfigVersion.cmake\r\n/usr/local/lib/python3.8/dist-packages/torch/share/cmake/Torch/TorchConfig.cmake\r\nroot@jetson:/opt/inference/TensorRT# find /usr/local/lib/python3.8/dist-packages -name *.cmake | grep tensorrt\r\nroot@jetson:/opt/inference/TensorRT# \r\n```\r\n\r\n I noticed that `torchtrtConfig.cmake` is [mentioned in the CMakeLists.txt](https://github.com/pytorch/TensorRT/blob/v1.4.0/CMakeLists.txt#L38), but it doesn't exist anywhere in my installation. Am I supposed to install Torch TensorRT with CMake in order to use the C++ API in a CMake project?\r\n \r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.0\r\n - CPU Architecture: aarch64\r\n - OS (e.g., Linux): L4T\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): L4T docker container\r\n - Build command you used (if compiling from source): Building from source as per instructions via bazel\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.8\r\n - CUDA version: \r\n - GPU models and configuration: Jetson Orin NX 16GB\r\n - Any other relevant information:\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2320",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-09-14T18:42:13Z",
    "updated_at": "2023-12-28T22:10:34Z",
    "user": "janblumenkamp"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2319,
    "title": "\u2753 [Question] How do I load the torch tensorRT model on multiple gpus",
    "body": "## \u2753 Question\r\n\r\nIn [TorchServe](https://github.com/pytorch/serve), we have this concept of workers. In a multi-GPU node, we can assign each GPU to a worker.\r\n\r\nI am noticing that tensorRT model is getting loaded on GPU 0 even though  we specify the correct GPU ID \r\n for each worker.```torch.jit.load(model_pt_path, map_location=self.device)``` \r\n \r\n How do we load a tensorRT model in a a device id which is not 0 ?\r\n\r\n## What you have already tried\r\n\r\nI have tried loading a torchscript model, Here, it loads on all 4 GPUs\r\n\r\nUsing ```torch.jit.load(model_pt_path, map_location=self.device)```  to load the same model on each of the 4 GPUs\r\n\r\n```\r\n2023-09-14T18:32:19,333 [INFO ] W-9000-resnet-18_1.0-stdout MODEL_LOG - cuda:1\r\n2023-09-14T18:32:19,333 [INFO ] W-9000-resnet-18_1.0-stdout MODEL_LOG - !!!!!!!!!!!!!!!!!!!\r\n2023-09-14T18:32:19,355 [INFO ] W-9003-resnet-18_1.0-stdout MODEL_LOG - Torch TensorRT enabled\r\n2023-09-14T18:32:19,356 [INFO ] W-9003-resnet-18_1.0-stdout MODEL_LOG - cuda:0\r\n2023-09-14T18:32:19,356 [INFO ] W-9003-resnet-18_1.0-stdout MODEL_LOG - !!!!!!!!!!!!!!!!!!!\r\n2023-09-14T18:32:19,357 [INFO ] W-9002-resnet-18_1.0-stdout MODEL_LOG - Torch TensorRT enabled\r\n2023-09-14T18:32:19,357 [INFO ] W-9002-resnet-18_1.0-stdout MODEL_LOG - cuda:3\r\n2023-09-14T18:32:19,357 [INFO ] W-9002-resnet-18_1.0-stdout MODEL_LOG - !!!!!!!!!!!!!!!!!!!\r\n2023-09-14T18:32:19,359 [INFO ] W-9001-resnet-18_1.0-stdout MODEL_LOG - Torch TensorRT enabled\r\n2023-09-14T18:32:19,359 [INFO ] W-9001-resnet-18_1.0-stdout MODEL_LOG - cuda:2\r\n2023-09-14T18:32:19,359 [INFO ] W-9001-resnet-18_1.0-stdout MODEL_LOG - !!!!!!!!!!!!!!!!!!!\r\n```\r\n\r\n<img width=\"843\" alt=\"Screenshot 2023-09-14 at 11 39 36 AM\" src=\"https://github.com/pytorch/TensorRT/assets/16617092/c5f9c16b-1866-4c80-b105-9fca3219a78d\">\r\n\r\n### Have a simpler repro\r\n\r\n```\r\nimport torch\r\nimport torch_tensorrt\r\nmodel = torch.jit.load(\"trt_model_fp16.pt\",\"cuda:1\")\r\n```\r\n<img width=\"839\" alt=\"Screenshot 2023-09-14 at 1 28 20 PM\" src=\"https://github.com/pytorch/TensorRT/assets/16617092/f5be8d91-491f-4efd-ad09-3e22118cc56a\">\r\n\r\n\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):3.9\r\n - CPU Architecture: \r\n - OS (e.g., Linux): Ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives: pip\r\n - Python version: 3.9\r\n - CUDA version: 11.7\r\n - GPU models and configuration: T4\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2319",
    "state": "closed",
    "labels": [
      "question",
      "component: runtime",
      "bug: triaged [verified]"
    ],
    "created_at": "2023-09-14T18:41:36Z",
    "updated_at": "2023-09-27T19:55:28Z",
    "user": "agunapal"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5042,
    "title": "How to give number of inference steps to Wuerstchen prior pipeline",
    "body": "**this below working with default DEFAULT_STAGE_C_TIMESTEPS but it always generates with exactly 29 number of prior inference steps** \r\n\r\n```\r\n    prior_output = prior_pipeline(\r\n        prompt=prompt,\r\n        height=height,\r\n        width=width,\r\n\t\tnum_inference_steps=prior_num_inference_steps,\r\n        timesteps=DEFAULT_STAGE_C_TIMESTEPS,\r\n        negative_prompt=negative_prompt,\r\n        guidance_scale=prior_guidance_scale,\r\n        num_images_per_prompt=num_images_per_prompt,\r\n        generator=generator,\r\n        callback=callback_prior,\r\n    )\r\n```\r\n\r\n\r\nwhen i make it like below i got this error\r\n\r\n```\r\n    prior_output = prior_pipeline(\r\n        prompt=prompt,\r\n        height=height,\r\n        width=width,\r\n\t\tprior_num_inference_steps = prior_num_inference_steps,\r\n        # timesteps=DEFAULT_STAGE_C_TIMESTEPS,\r\n        negative_prompt=negative_prompt,\r\n        guidance_scale=prior_guidance_scale,\r\n        num_images_per_prompt=num_images_per_prompt,\r\n        generator=generator,\r\n        callback=callback_prior,\r\n    )\r\n```\r\n\r\n`TypeError: WuerstchenPriorPipeline.__call__() got an unexpected keyword argument 'prior_num_inference_steps'`\r\n\r\n\r\nBut the documentation showing it???\r\n\r\nhttps://huggingface.co/docs/diffusers/main/en/api/pipelines/wuerstchen\r\n\r\n`prior_num_inference_steps (Union[int, Dict[float, int]], optional, defaults to 30) \u2014 The number of prior denoising steps. More denoising steps usually lead to a higher quality image at the expense of slower inference. For more specific timestep spacing, you can pass customized prior_timesteps`\r\n\r\n@sayakpaul  @dome272  @patrickvonplaten @williamberman\r\n\r\n\r\n**Here below entire code. what I want is being able to set any number of prior and decoder number of inference steps**\r\n\r\n```\r\n    prior_output = prior_pipeline(\r\n        prompt=prompt,\r\n        height=height,\r\n        width=width,\r\n\t\tprior_num_inference_steps = prior_num_inference_steps,\r\n        # timesteps=DEFAULT_STAGE_C_TIMESTEPS,\r\n        negative_prompt=negative_prompt,\r\n        guidance_scale=prior_guidance_scale,\r\n        num_images_per_prompt=num_images_per_prompt,\r\n        generator=generator,\r\n        callback=callback_prior,\r\n    )\r\n\r\n    if PREVIEW_IMAGES:\r\n        for _ in range(len(DEFAULT_STAGE_C_TIMESTEPS)):\r\n            r = next(prior_output)\r\n            if isinstance(r, list):\r\n                yield r\r\n        prior_output = r\r\n    \r\n    decoder_output = decoder_pipeline(\r\n        image_embeddings=prior_output.image_embeddings,\r\n        prompt=prompt,\r\n\t\tnum_inference_steps = decoder_num_inference_steps,\r\n        # timesteps=decoder_timesteps,\r\n        guidance_scale=decoder_guidance_scale,\r\n        negative_prompt=negative_prompt,\r\n        generator=generator,\r\n        output_type=\"pil\",\r\n    ).images\r\n    yield decoder_output\r\n```\r\n\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/5042",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-09-14T15:21:31Z",
    "updated_at": "2023-09-20T07:41:19Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 440,
    "title": "Web Search not working ",
    "body": "i have been having this issues where it just searches something but then never shows me the answer it shows max tokens\r\ni just keep seeing this\r\nfirst i see the links of the resources\r\n\r\n\r\nbut then it does nothing at all\r\n\r\n![image](https://github.com/huggingface/chat-ui/assets/108006611/6eefb6a4-426e-408c-85bb-1106161fd481)\r\n\r\ni just see this and do not even get the model response",
    "url": "https://github.com/huggingface/chat-ui/issues/440",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-09-14T13:50:15Z",
    "updated_at": "2023-09-20T14:16:49Z",
    "comments": 5,
    "user": "bilalazhar72"
  },
  {
    "repo": "pytorch/xla",
    "number": 5569,
    "title": "Questions about the return value of lazyTensor pytorch xla subgraph",
    "body": "Using lazyTensor, pytorch xla will generate an xla subgraph, and its subgraph will add relevant conditions to the liveTensor trained in the current step as the return of the subgraph.\r\nmy question is:\r\n1. What does the LiveTensor here mean, and what is the design basis for the value returned by the xla diagram? That is, what can be returned as an xla diagram. The return here refers to the ROOT node in xla.\r\n2. What is the concept of xla image return here? Is it the return from the XLA device to the HOST device? Or what does it mean?\r\nBelow I have given a section on using xm.mark_step() to trigger a compile and run code in the training process.\r\n\r\nstd::shared_ptr<XLAGraphExecutor::Async>\r\nXLAGraphExecutor::SyncTensorsGraphInternal(\r\n    std::vector<XLATensorPtr>* tensors, absl::Span<const std::string> devices,\r\n    const SyncTensorsConfig& config, bool warm_up_cache_only) {\r\n  tensorflow::profiler::TraceMe activity(\r\n      \"SyncTensorsGraphInternal\", tensorflow::profiler::TraceMeLevel::kInfo);\r\n  SyncTensorCollection coll = CollectSyncTensors(*tensors, config);\r\n  if (coll.indices.empty()) {\r\n    /* Enure previous execution is complete before exiting this\r\n     * function */\r\n    TensorCollectionBarrier(&coll);\r\n    return nullptr;\r\n  }\r\n  DebugUtil::SaveTensorsGraphInfo(\"ScheduleSyncTensorsGraph\", *tensors,\r\n                                  &coll.indices);\r\n  std::vector<torch::lazy::Value> ir_values;\r\n  std::vector<torch::lazy::BackendDataPtr> tensor_data_vec;\r\n  ExtractIRAndPrepareXlaData_(tensors, coll.config, coll.indices, ir_values,\r\n                              tensor_data_vec);\r\n  PostOrderData po_data = RunPostOrder(ir_values, &coll);\r\n  coll.hash = torch::lazy::HashCombine(\r\n      coll.hash, torch::lazy::Hash(po_data.parameter_sequence));\r\n  TF_VLOG(4) << \"Parameter sequence graph hash \"\r\n             << torch::lazy::HashToString(coll.hash);\r\n  std::shared_ptr<Async> async =\r\n      TryRunCachedSync(tensors, &coll, &po_data, tensor_data_vec);\r\n  if (async != nullptr) {\r\n    return async;\r\n  }\r\n  CompilationResult compile_result =\r\n      Compile(*tensors, devices, coll, &po_data, ir_values);\r\n  TORCH_LAZY_VALUE_METRIC(\"TensorsGraphSize\", compile_result.emitted_nodes);\r\n  TF_VLOG(5) << \"TensorsGraphSize=\" << compile_result.emitted_nodes;\r\n\r\n  auto cached_computation = std::make_shared<CachedComputation>(\r\n      std::move(compile_result.computation), compile_result.is_sharded);\r\n  GetComputationCache()->Add(coll.hash, cached_computation);\r\n\r\n  if (warm_up_cache_only) {\r\n    return nullptr;\r\n  } else {\r\n    return ScheduleSyncTensorsGraph(\r\n        tensors, &coll, std::move(compile_result.parameters_data),\r\n        compile_result.device.toString(), std::move(cached_computation),\r\n        tensor_data_vec);\r\n  }\r\n}\r\n",
    "url": "https://github.com/pytorch/xla/issues/5569",
    "state": "open",
    "labels": [
      "question",
      "runtime"
    ],
    "created_at": "2023-09-14T13:08:17Z",
    "updated_at": "2025-04-29T13:46:42Z",
    "user": "ckfgihub"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 438,
    "title": "running the app with websearch fails",
    "body": "Hey after adding the serper api key I'm trying to run the app locally \"nmp run dev\" and I get an issue related to websearch:\r\n\r\n```\r\n[vite]: Rollup failed to resolve import \"@xenova/transformers\" from \"C:/Users/username/chat-ui/src/lib/server/websearch/sentenceSimilarity.ts\".\r\nThis is most likely unintended because it can break your application at runtime.\r\nIf you do want to externalize this module explicitly add it to\r\n`build.rollupOptions.external`\r\nerror during build:\r\nError: [vite]: Rollup failed to resolve import \"@xenova/transformers\" from \"C:/Users/username/chat-ui/src/lib/server/websearch/sentenceSimilarity.ts\".\r\nThis is most likely unintended because it can break your application at runtime.\r\nIf you do want to externalize this module explicitly add it to\r\n`build.rollupOptions.external`\r\n    at viteWarn (file:///C:/Users/username/chat-ui/node_modules/vite/dist/node/chunks/dep-df561101.js:48142:27)   \r\n    at onRollupWarning (file:///C:/Users/username/chat-ui/node_modules/vite/dist/node/chunks/dep-df561101.js:48174:9)\r\n    at onwarn (file:///C:/Users/username/chat-ui/node_modules/vite/dist/node/chunks/dep-df561101.js:47902:13)     \r\n    at file:///C:/Users/username/chat-ui/node_modules/rollup/dist/es/shared/node-entry.js:24152:13\r\n    at Object.logger [as onLog] (file:///C:/Users/username/chat-ui/node_modules/rollup/dist/es/shared/node-entry.js:25825:9)\r\n    at ModuleLoader.handleInvalidResolvedId (file:///C:/Users/rachel_shalom/chat-ui/node_modules/rollup/dist/es/shared/node-entry.js:24738:26)\r\n    at file:///C:/Usersusername/chat-ui/node_modules/rollup/dist/es/shared/node-entry.js:24698:26\r\n    \r\n```\r\nhow do I externelize this module and should I? anyone had this issue?",
    "url": "https://github.com/huggingface/chat-ui/issues/438",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-09-14T11:21:35Z",
    "updated_at": "2023-09-14T12:08:00Z",
    "comments": 2,
    "user": "RachelShalom"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2318,
    "title": "\u2753 Why cant't I compile Torch-TensorRT 1.0.0? ",
    "body": "## \u2753Why cant't I compile Torch-TensorRT 1.0.0? \r\n\r\n## What you have already tried\r\n\r\nI've been trying to compile versions 1.0.0 and 1.1.0 of Torch-TensorRT in my Jetson Xavier NX 16GB, I had followed the official guides of installation mentioned in this [issue](https://github.com/pytorch/TensorRT/discussions/1077).\r\n\r\n## Environment\r\nI have the next environment:\r\n- Jetpack 4.6\r\n- Python 3.6.9\r\n- Pytorch 1.10.0\r\n- Torchvision 0.11.1\r\n- CUDA 10.2\r\n- CUDNN 8.2.1\r\n- TensorRT 8.0.1.6\r\n- GPU models and configuration: Jetson Xavier NX with JetPack 4.6\r\n\r\n\r\n## The error\r\nFinally, when I launch python3 py/setup.py install --use-cxx11-abi the error happend\r\n\r\n`running install\r\nusing CXX11 ABI build\r\nJetpack version: 4.6\r\nbuilding libtorchtrt\r\nINFO: Analyzed target //:libtorchtrt (0 packages loaded, 0 targets configured).\r\nINFO: Found 1 target...\r\nERROR: /home/iovi/SW/TensorRT/core/lowering/BUILD:10:11: Compiling core/lowering/register_trt_placeholder_ops.cpp failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 61 arguments skipped)\r\n\r\nUse --sandbox_debug to see verbose messages from the sandbox\r\ncore/lowering/register_trt_placeholder_ops.cpp:16:34: error: invalid user-defined conversion from 'torch::jit::<lambda(torch::jit::Stack&)>' to 'torch::jit::OperationCreator {aka std::function<void(std::vector<c10::IValue>*)> (*)(const torch::jit::Node*)}' [-fpermissive]\r\n         aliasAnalysisFromSchema()),\r\n                                  ^\r\ncore/lowering/register_trt_placeholder_ops.cpp:15:24: note: candidate is: torch::jit::<lambda(torch::jit::Stack&)>::operator void (*)(torch::jit::Stack&)() const <near match>\r\n         [](Stack& stack) { /*noop*/ },\r\n                        ^\r\ncore/lowering/register_trt_placeholder_ops.cpp:15:24: note:   no known conversion from 'void (*)(torch::jit::Stack&) {aka void (*)(std::vector<c10::IValue>&)}' to 'torch::jit::OperationCreator {aka std::function<void(std::vector<c10::IValue>*)> (*)(const torch::jit::Node*)}'\r\nIn file included from external/libtorch/include/torch/csrc/jit/runtime/custom_operator.h:5:0,\r\n                 from core/lowering/register_trt_placeholder_ops.cpp:1:\r\nexternal/libtorch/include/torch/csrc/jit/runtime/operator.h:98:3: note:   initializing argument 2 of 'torch::jit::Operator::Operator(std::__cxx11::string, torch::jit::OperationCreator, c10::AliasAnalysisKind)'\r\n   Operator(\r\n   ^~~~~~~~\r\nTarget //:libtorchtrt failed to build\r\nUse --verbose_failures to see the command lines of failed build steps.\r\nINFO: Elapsed time: 225,037s, Critical Path: 54,01s\r\nINFO: 46 processes: 13 internal, 33 processwrapper-sandbox.\r\nFAILED: Build did NOT complete successfully\r\n`\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2318",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-09-14T09:30:20Z",
    "updated_at": "2024-01-01T00:02:46Z",
    "user": "VictorIOVI"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 5032,
    "title": "How to unfuse_lora only the first one after I have added multiple lora?",
    "body": "base.load_lora_weights(\"models/safetensors/SDXL/\u56fd\u98ce\u63d2\u753bSDXL.safetensors\") \r\nbase.fuse_lora(lora_scale=.7)\r\nbase.load_lora_weights(\"models/safetensors/SDXL/sd_xl_offset_example-lora_1.0.safetensors\")\r\nbase.fuse_lora(lora_scale=.8)\r\nNow, When I execute unfuse_lora() only the most recent one has been unfuse .\r\n\r\nso,how to unfuse '\u56fd\u98ce\u63d2\u753bSDXL.safetensors'  or unfuse all lora weights",
    "url": "https://github.com/huggingface/diffusers/issues/5032",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-09-14T08:10:46Z",
    "updated_at": "2023-10-30T15:06:34Z",
    "user": "yanchaoguo"
  },
  {
    "repo": "pytorch/kineto",
    "number": 804,
    "title": " Will PyTorch Profiler TensorBoard Plugin continue to evolve? It seems that it cannot support PyTorch 2.0",
    "body": "",
    "url": "https://github.com/pytorch/kineto/issues/804",
    "state": "closed",
    "labels": [
      "question",
      "plugin"
    ],
    "created_at": "2023-09-14T02:21:09Z",
    "updated_at": "2023-12-28T16:44:59Z",
    "user": "BadTrasher"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1384,
    "title": "Documentation Request: Table or heuristic for Ortmodel Method to Encoder/Decoder to .onnx File to Task",
    "body": "### Feature request\r\n\r\nHi there\r\n\r\nCould you provide either a table (where explicit rules apply - see attached image), or a heuristic,  so I can tell which ML models, optimised file types, with which tasks, apply to which inference methods and inference tasks?\r\n\r\nThe example table below will help to clarify, and isn't necessarily prescriptive, because I may have mixed some concepts.\r\n\r\nIn case you mention, yes - I'm aware that it's possible to run a pipeline with the wrong model, and an error message will spit out all the accepted architectures/models (roberta, gpt, etc) for a method type.  However,\r\na) this is very time-consuming, hit and miss, and \r\nb) these 'lists' don't explain the relationships to the underlying architectures and files.. (ie. model_merged, encoder-decoder, encoder only, decoder only, that result from the pytorch, safetensor files.)\r\n\r\nFor example, will all models exported/optimised for text-generation always be encoder-decoder and always use the ORTSeq2SeqModel method (for illustrative purposes), or will this depend on a combination of the original model architecture and the task applied during optimisation, which may result in one or more usable methods for inference?\r\n\r\nIt's a massive learning curve for me, but seems it would be relatively straightforward to someone who works with this stuff . It probably just needs to go from peoples' heads into a document.\r\n\r\nThanks muchly! it'll be a massive time saver and help with conceptual understanding.\r\n\r\n### Motivation\r\n\r\nI'm trying to understand how to mix and match the models, optimisations, tasks, and inference methods..  Been trawling HF, ONNX, and general information but cannot find anything like this that exists, and would save a BUNCH of testing trial and error time. (like I've wasted directly and indirectly almost a week of trialling and there's probably very simple rules for this)\r\n\r\nPart of the time wasted has been selecting models and running CLI command to optimise/quantize for a task, only to discover I have no idea with ORTModel method to use, as these don't relate to task but model architecture instead (or a combination of both), and brute forcing an understanding with testing and trying to come up with my own heuristics.\r\n\r\nMaybe this type of knowledge is assumed? but for newbs like me it's extremely daunting and feels like I may be trying to re-invent the wheel.\r\n\r\n### Your contribution\r\n(table for illustrative purposes.. the dummy data is wrong.. )\r\n\r\n![method-task-model-llm-matrix](https://github.com/huggingface/optimum/assets/83053994/d25adf44-8cff-4a63-a5c7-312636f1dbaf)\r\n",
    "url": "https://github.com/huggingface/optimum/issues/1384",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-09-14T01:45:38Z",
    "updated_at": "2025-04-24T02:11:24Z",
    "comments": 4,
    "user": "gidzr"
  },
  {
    "repo": "pytorch/rl",
    "number": 1522,
    "title": "[BUG] It's not clear how to call an advantage module with batched envs and pixel observations.",
    "body": "## Describe the bug\r\n\r\nWhen you get a tensordict rollout of shape `(N_envs, N_steps, C, H, W)` out of a collector and you want to apply an advantage module that starts with `conv2d` layers:\r\n1. directly applying the module will crash with the `conv2d` layer complaining about the input size e.g. `RuntimeError: Expected 3D (unbatched) or 4D (batched) input to conv2d, but got input of size: [2, 128, 4, 84, 84]`\r\n2. flattening the tensordict first with `rollout.reshape(-1)` so that it has shape `[B, C, H, W]` and then calling the  advantage module will run but issue the warning `torchrl/objectives/value/advantages.py:99: UserWarning: Got a tensordict without a time-marked dimension, assuming time is along the last dimension.` leaving you unsure of wether the advantages were computed correctly.\r\n\r\nSo it's not clear how one should proceed.\r\n\r\n- [x] I have checked that there is no similar issue in the repo (**required**)\r\n- [x] I have read the [documentation](https://github.com/pytorch/rl/tree/main/docs/) (**required**)\r\n- [x] I have provided a minimal working example to reproduce the bug (**required**)\r\n",
    "url": "https://github.com/pytorch/rl/issues/1522",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2023-09-13T21:04:29Z",
    "updated_at": "2024-03-27T16:37:49Z",
    "user": "skandermoalla"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1379,
    "title": "Can't use bettertransformer to train vit?",
    "body": "### System Info\n\n```shell\nTraceback (most recent call last):\r\n  File \"test_bettertransformer_vit.py\", line 95, in <module>\r\n    main()\r\n  File \"test_bettertransformer_vit.py\", line 92, in main\r\n    test_train_time()\r\n  File \"test_bettertransformer_vit.py\", line 86, in test_train_time\r\n    out_vit = model(pixel_values).last_hidden_state\r\n  File \"/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py\", line 1501, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"/opt/conda/lib/python3.8/site-packages/transformers/models/vit/modeling_vit.py\", line 587, in forward\r\n    encoder_outputs = self.encoder(\r\n  File \"/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py\", line 1501, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"/opt/conda/lib/python3.8/site-packages/transformers/models/vit/modeling_vit.py\", line 413, in forward\r\n    layer_outputs = layer_module(hidden_states, layer_head_mask, output_attentions)\r\n  File \"/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py\", line 1501, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"/root/.local/lib/python3.8/site-packages/optimum/bettertransformer/models/encoder_models.py\", line 1186, in forward\r\n    raise NotImplementedError(\r\nNotImplementedError: Training and Autocast are not implemented for BetterTransformer + ViT. Please open an issue.\n```\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\ndef test_train_time():\r\n    model = ViTModel.from_pretrained(model_pth).to('cuda')\r\n    processor = ViTImageProcessor.from_pretrained(model_pth)\r\n    pixel_values=clip_process(processor, pic_pth).cuda()\r\n    if args.flash:\r\n        model = model.to_bettertransformer()\r\n    model.train()\r\n\r\n    begin_time = time.time()\r\n    for i in range(args.nums):\r\n        out_vit = model(pixel_values).last_hidden_state\r\n\r\n    print('use flash: {}, train vit time {:.2f}'.format(args.flash, time.time() - begin_time)) \n\n### Expected behavior\n\nnone",
    "url": "https://github.com/huggingface/optimum/issues/1379",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-09-13T12:49:53Z",
    "updated_at": "2025-02-20T08:38:26Z",
    "comments": 1,
    "user": "lijiaoyang"
  },
  {
    "repo": "pytorch/examples",
    "number": 1190,
    "title": "main.py: TensorBoard in case of Multi-processing Distributed Data Parallel Training",
    "body": "Dear developers\r\nIt is so great that you've provided a examples/imagenet/main.py script which looks amazing. \r\nI'm looking how to setup a _Multi-processing Distributed Data Parallel Training_, for instance 8 GPUs on a single node but I can also use multi-nodes multi-gpus. I must say that I have never had so great infrastructure that I'm discovering at the same times. \r\n\r\nNow, I was used to view the evolution of the Accuracies (Top 1, Top 5, train/val) during the training (rather common isn't it), but looking at the code (main.py) I do not see the \r\n```python \r\nfrom torch.utils.tensorboard import SummaryWriter\r\n...\r\n    writer = SummaryWriter(logs_dir)\r\n...\r\n```\r\nand similar code used in the train/validate routines like\r\n```python\r\n    if writer is not None:\r\n        suffix = \"train\"\r\n        writer.add_scalar(f'top5_{suffix}', top5.avg, global_step=epoch)\r\n        writer.add_scalar(f'top1_{suffix}', top1.avg, global_step=epoch)\r\n```\r\nNow, in the multi-gpus processing I would imagine that one has to deal with \"which gpu among the whole sets of gpus should/must do the job\". But I am pretty sure that many experts are doing such things routinely. \r\n\r\nIs there a foreseen new version of main.py that would integrate such TensorBoard features in case of Multi-processing Distributed Data Parallel Training? In the mean while may be someone can help to setup such modifications.\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/examples/issues/1190",
    "state": "open",
    "labels": [],
    "created_at": "2023-09-13T11:19:44Z",
    "updated_at": "2023-09-13T11:19:44Z",
    "comments": 0,
    "user": "jecampagne"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 1015,
    "title": "how to text-generation-benchmark through the local tokenizer ",
    "body": "The command i run in docker is\r\n\r\n```\r\ntext-generation-benchmark --tokenizer-name /data/checkpoint-5600/\r\n```\r\n\r\nThe error log is\r\n\r\n```\r\n2023-09-12T11:22:01.245495Z  INFO text_generation_benchmark: benchmark/src/main.rs:132: Loading tokenizer\r\n2023-09-12T11:22:01.245966Z  INFO text_generation_benchmark: benchmark/src/main.rs:141: Downloading tokenizer\r\n2023-09-12T11:22:31.270784Z  WARN cached_path::cache: /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cached-path-0.6.1/src/cache.rs:564: ETAG fetch failed for https://huggingface.co//data/checkpoint-5600//resolve/main/tokenizer.json, retrying in 1957 milliseconds...    \r\n2023-09-12T11:23:03.228297Z  WARN cached_path::cache: /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cached-path-0.6.1/src/cache.rs:564: ETAG fetch failed for https://huggingface.co//data/checkpoint-5600//resolve/main/tokenizer.json, retrying in 2202 milliseconds...    \r\n2023-09-12T11:23:35.430766Z  WARN cached_path::cache: /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cached-path-0.6.1/src/cache.rs:564: ETAG fetch failed for https://huggingface.co//data/checkpoint-5600//resolve/main/tokenizer.json, retrying in 4671 milliseconds...    \r\n2023-09-12T11:24:10.102170Z ERROR cached_path::cache: /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cached-path-0.6.1/src/cache.rs:555: Max retries exceeded for https://huggingface.co//data/checkpoint-5600//resolve/main/tokenizer.json    \r\nthread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: \"Model \\\"/data/checkpoint-5600/\\\" on the Hub doesn't have a tokenizer\"', benchmark/src/main.rs:153:78\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\nAborted (core dumped)\r\n``` \r\n\r\nI notice `Downloading tokenizer` in error log, and i feel very strange about it beacause `/data/checkpoint-5600/` is my local model path. So i find the src code as following:\r\n\r\nhttps://github.com/huggingface/text-generation-inference/blob/1f69fb9ed4fb91fe0bb9b94edda5729c67e6f02a/benchmark/src/main.rs#L134-L154\r\n\r\nBut i notice that only `tokenizer_config.json` in my local model path but no `tokenizer.json`. And i see that it is the same is as the hub model, for example https://huggingface.co/openlm-research/open_llama_7b_v2/tree/main\r\n\r\nThen i want to bypass by renaming `tokenizer_config.json` to `tokenizer.json` in my local model path, it still doesn't work:\r\n\r\n```\r\n2023-09-12T11:29:52.461487Z  INFO text_generation_benchmark: benchmark/src/main.rs:132: Loading tokenizer\r\n2023-09-12T11:29:52.462513Z  INFO text_generation_benchmark: benchmark/src/main.rs:138: Found local tokenizer\r\nthread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error(\"expected `,` or `}`\", line: 2, column: 18)', benchmark/src/main.rs:139:69\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\nAborted (core dumped)\r\n```\r\n\r\nFinally i want to know the `tokenizer_config.json` and `tokenizer.json` expressed here are the same thing?",
    "url": "https://github.com/huggingface/text-generation-inference/issues/1015",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-09-12T12:10:41Z",
    "updated_at": "2024-06-07T09:39:32Z",
    "user": "jessiewiswjc"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 260,
    "title": "How to create instruction dataset (Q&A)  for fine-tuning from PDFs?",
    "body": "",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/260",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-12T02:54:07Z",
    "updated_at": "2023-12-18T15:31:13Z",
    "user": "mahimairaja"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 295,
    "title": "[Question] Issue with deploying model to Vercel using NextJS and tRPC",
    "body": "Hi I'm trying to deploy my model to Vercel via NextJS and tRPC and have the .cache folder generated using the postinstall script \r\n\r\n```\r\n// @ts-check\r\nlet fs = require(\"fs-extra\");\r\nlet path = require(\"path\");\r\n\r\nasync function copyXenovaToLocalModules() {\r\n  const paths = [[\"../../../node_modules/@xenova\", \"../node_modules/@xenova\"]];\r\n\r\n  for (const pathTuple of paths) {\r\n    const [src, dest] = [\r\n      path.join(__dirname, pathTuple[0]),\r\n      path.join(__dirname, pathTuple[1]),\r\n    ];\r\n    await fs.remove(dest).catch(() => {});\r\n    await fs.copy(src, dest).catch(() => {});\r\n\r\n    // Create .cache folder for dest paths\r\n\r\n    const cacheDir = path.join(dest, \"transformers\", \".cache\");\r\n    await fs.mkdir(cacheDir).catch(() => {});\r\n  }\r\n}\r\n\r\ncopyXenovaToLocalModules();\r\n\r\n```\r\nWhen I run this, I get the following error: \r\n\r\n```\r\nenv {\r\n  backends: {\r\n    onnx: { wasm: [Object], webgl: {}, logLevelInternal: 'warning' },\r\n    tfjs: {}\r\n  },\r\n  __dirname: '/vercel/path0/packages/api/node_modules/@xenova/transformers',\r\n  version: '2.5.4',\r\n  allowRemoteModels: true,\r\n  remoteHost: 'https://huggingface.co/',\r\n  remotePathTemplate: '{model}/resolve/{revision}/',\r\n  allowLocalModels: true,\r\n  localModelPath: '/vercel/path0/packages/api/node_modules/@xenova/transformers/models/',\r\n  useFS: true,\r\n  useBrowserCache: false,\r\n  useFSCache: true,\r\n  cacheDir: '/vercel/path0/packages/api/node_modules/@xenova/transformers/.cache/',\r\n  useCustomCache: false,\r\n  customCache: null\r\n}\r\nAn error occurred while writing the file to cache: [Error: ENOENT: no such file or directory, mkdir '/vercel'] {\r\n  errno: -2,\r\n  code: 'ENOENT',\r\n  syscall: 'mkdir',\r\n  path: '/vercel'\r\n}\r\nAn error occurred while writing the file to cache: [Error: ENOENT: no such file or directory, mkdir '/vercel'] {\r\n  errno: -2,\r\n  code: 'ENOENT',\r\n  syscall: 'mkdir',\r\n  path: '/vercel'\r\n}\r\nAn error occurred while writing the file to cache: [Error: ENOENT: no such file or directory, mkdir '/vercel'] {\r\n  errno: -2,\r\n  code: 'ENOENT',\r\n  syscall: 'mkdir',\r\n  path: '/vercel'\r\n}\r\n``` \r\nCan someone help me with this? ",
    "url": "https://github.com/huggingface/transformers.js/issues/295",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-11T11:13:11Z",
    "updated_at": "2023-09-12T15:23:17Z",
    "user": "arnabtarwani"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 291,
    "title": "[Question] Using transformers.js inside an Obsidian Plugin",
    "body": "I'm trying to run transfomer.js inside of Obsidian but running into some errors:\r\n<img width=\"698\" alt=\"Screenshot 2023-09-10 at 3 05 43 PM\" src=\"https://github.com/xenova/transformers.js/assets/11430621/a6b4b83e-6a1e-44bb-9a46-c3966d058146\">\r\n\r\n\r\nThis code is triggering the issues:\r\n```js\r\n\r\nclass MyClassificationPipeline {\r\n\tstatic task = \"text-classification\";\r\n\tstatic model = \"Xenova/distilbert-base-uncased-finetuned-sst-2-english\";\r\n\tstatic instance = null;\r\n\r\n\tstatic async getInstance(progress_callback = null) {\r\n\t\tif (this.instance === null) {\r\n\t\t\t// Dynamically import the Transformers.js library\r\n\t\t\tconsole.log('before import')\r\n\t\t\tlet { pipeline, env } = await import(\"@xenova/transformers\");\r\n\t\t\tconsole.log('after import')\r\n\r\n\t\t\t// NOTE: Uncomment this to change the cache directory\r\n\t\t\t// env.cacheDir = './.cache';\r\n\r\n\t\t\tthis.instance = pipeline(this.task, this.model, {\r\n\t\t\t\tprogress_callback,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.instance;\r\n\t}\r\n}\r\nexport default MyClassificationPipeline;\r\n\r\n// Comment out this line if you don't want to start loading the model as soon as the server starts.\r\n// If commented out, the model will be loaded when the first request is received (i.e,. lazily).\r\n// MyClassificationPipeline.getInstance();\r\n```\r\n[Link to source](https://github.com/different-ai/obsidian-ml/blob/master/embeddings.js)\r\n\r\n[These are the lines that are calling the code above](https://github.com/different-ai/obsidian-ml/blob/0bd169c6e0c3f385e7238a78c585932fe0320bc9/hello.js#L27-L29)\r\n\r\n\r\n\r\nContext about Obsidian plugins:\r\n- Obsidian plugin is just a single imported js file.\r\n- Most of the time it's bundled using esbuild.\r\n\r\nIn my case, this is [my esbuild setup](https://github.com/different-ai/obsidian-ml/blob/master/esbuild.config.mjs)\r\n\r\n----\r\n\r\nHow should I be tackling this, what would be the recommended way to bundle transformer.js?\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/291",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-10T22:12:07Z",
    "updated_at": "2024-04-30T13:52:06Z",
    "user": "benjaminshafii"
  },
  {
    "repo": "huggingface/candle",
    "number": 807,
    "title": "How to use the kv_cache?",
    "body": "Hi, how would I use the kv_cache? Let's say I want a chat like type of thing, how would I save the kv_cache and load it so that all the tokens won't have to be computed again?",
    "url": "https://github.com/huggingface/candle/issues/807",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-10T21:39:31Z",
    "updated_at": "2025-11-22T23:18:58Z",
    "user": "soupslurpr"
  },
  {
    "repo": "huggingface/transformers",
    "number": 26061,
    "title": "How to perform batch inference? ",
    "body": "### Feature request\n\nI want to pass a list of tests to model.generate. \r\n\r\ntext = \"hey there\"\r\ninputs = tokenizer(text, return_tensors=\"pt\").to(0)\r\n\r\nout = model.generate(**inputs, max_new_tokens=184)\r\nprint(tokenizer.decode(out[0], skip_special_tokens=True))\r\n\r\n\r\n\n\n### Motivation\n\nI want to do batch inference. \n\n### Your contribution\n\nTesting",
    "url": "https://github.com/huggingface/transformers/issues/26061",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-08T20:59:37Z",
    "updated_at": "2023-10-23T16:04:20Z",
    "user": "ryanshrott"
  },
  {
    "repo": "pytorch/vision",
    "number": 7947,
    "title": "Why image shape different between Image.open and torchvision.io.read_image",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nEXIF image:\r\n![1](https://github.com/pytorch/vision/assets/28288770/65fe56e2-6724-4996-8fa6-04e51e110b90)\r\n\r\nI have a JPEG image above with EXIF information and I tried to load this image into pytorch for augmentation.\r\n\r\n1. try with opencv\r\n```\r\nimport cv2\r\nimg = cv2.imread(\"1.jpg\")\r\nprint(img.shape[0], img.shape[1])\r\n```\r\n\r\nthe result is\r\n```\r\n201 151\r\n```\r\n\r\n2. try with pillow\r\n```\r\nfrom PIL import Image\r\nimg3 = Image.open(\"1.jpg\")\r\nprint(img3.size)\r\n```\r\n\r\nthe result is\r\n```\r\n(201, 151)\r\n```\r\n\r\n3. try with torchvison.io\r\n```\r\nimport torchvision as tv\r\nimg4 = tv.io.read_image(\"1.jpg\")\r\nprint(img4.shape)\r\n```\r\n\r\nthe result is\r\n```\r\ntorch.Size([3, 151, 201])\r\n```\r\n\r\nThe result of torchvison.io is in [image_channels, image_height, image_width] format, which means the image is not rotated. However, opencv and pillow will deal with the EXIF information and rotate the image to the correct orientation.\r\n\r\nI wonder if torchvision.io.read_image misses the EXIF information in jpeg or not?\r\n\r\n### Versions\r\n\r\nName: torchvision\r\nVersion: 0.9.1\r\nSummary: image and video datasets and models for torch deep learning\r\nHome-page: https://github.com/pytorch/vision\r\n\r\nName: Pillow\r\nVersion: 9.4.0\r\nSummary: Python Imaging Library (Fork)\r\nHome-page: https://python-pillow.org",
    "url": "https://github.com/pytorch/vision/issues/7947",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-08T10:17:45Z",
    "updated_at": "2023-09-25T09:40:25Z",
    "user": "kero-ly"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2554,
    "title": "Autograd - M factor missing in Matrix Vector Multiplication?",
    "body": "In [this](https://github.com/pytorch/tutorials/blob/main/beginner_source/blitz/autograd_tutorial.py) tutorial, once the vector v is multiplied by the Jacobian, shouldn't there be an additional factor of M in the results? \n\ncc @albanD @sekyondaMeta @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/2554",
    "state": "closed",
    "labels": [
      "question",
      "core",
      "medium"
    ],
    "created_at": "2023-09-08T08:51:18Z",
    "updated_at": "2023-11-02T19:30:44Z",
    "user": "sudz123"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 998,
    "title": "How to insert a custom stop symbol, like </s>?",
    "body": "### Feature request\n\nnothing\n\n### Motivation\n\nnothing\n\n### Your contribution\n\nnothing",
    "url": "https://github.com/huggingface/text-generation-inference/issues/998",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-08T07:06:08Z",
    "updated_at": "2023-09-08T07:13:38Z",
    "user": "babytdream"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 355,
    "title": "Safe tensors cannot be easily freed!",
    "body": "### System Info\n\nHi, \r\n\r\nI am using the safetensors for loading Falcon-180B model. I am loading the ckpts one by one on CPU, and then try to remove the tensors by simply calling `del` function. However, I am seeing that CPU memory keeps increasing until it runs out of memory and system crashes (I am also calling `gc.collect()` after deleting tensors). Is there any good way to release the safetensor memory.\r\nThanks,\r\nReza\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Reproduction\n\n```\r\nfrom safetensors.torch import load_file\r\nsd_ = load_file(ckpt_path)\r\nlens = len(sd_.keys())\r\nfor _ in range(lens):\r\n       data = sd_.popitem()\r\n        del data\r\ndel sd_\r\ngc.collect()\r\n```\n\n### Expected behavior\n\nrelease the memory after calling `gc.collect()`",
    "url": "https://github.com/huggingface/safetensors/issues/355",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-09-07T22:13:15Z",
    "updated_at": "2024-08-30T10:22:01Z",
    "comments": 4,
    "user": "RezaYazdaniAminabadi"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 285,
    "title": "The generate API always returns the same number of tokens as output nomatter what is min_tokens",
    "body": "Here is the code I am trying\r\n```js\r\nimport { pipeline } from '@xenova/transformers';\r\nimport { env } from '@xenova/transformers';\r\n\r\n\r\nlet generator = await pipeline('text2text-generation', 'Xenova/LaMini-Flan-T5-783M');\r\nlet output = await generator('write a blog on Kubernetes?', {\r\n  max_new_tokens: 512,min_new_tokens:512,min_length:300\r\n});\r\n\r\nconsole.log(output)\r\n```\r\nSo no matter whatever is min_new_tokens or min_length (even if I try one of them only), output just remains same length",
    "url": "https://github.com/huggingface/transformers.js/issues/285",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-09-07T13:30:39Z",
    "updated_at": "2023-09-17T21:57:14Z",
    "user": "allthingssecurity"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 430,
    "title": "Server does not support event stream content error for custom endpoints",
    "body": "is there anyone faced the issue such as \"Server does not support event stream content\" when parsing the custom endpoint results.\r\nwhat is the solution for this error?\r\n\r\nIn order to reproduce the issue,\r\nUser enter prompts saying \"how are you\" -> call goes to custom endpoint -> Endpoint returns response as string -> error popsup \"Server does not support event stream content\"",
    "url": "https://github.com/huggingface/chat-ui/issues/430",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-07T10:01:18Z",
    "updated_at": "2023-09-15T00:01:56Z",
    "comments": 3,
    "user": "nandhaece07"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2300,
    "title": "How to convert  embedding vector to text \uff1f",
    "body": "I use  the script below to convert  text  to embeddings \r\n```\r\nmodel = SentenceTransformer('all-MiniLM-L6-v2')\r\nembeddings = model.encode(text)\r\n```\r\n\r\nBut how to convert  embeddings to text \uff1f",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2300",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-07T09:19:22Z",
    "updated_at": "2025-09-01T11:44:34Z",
    "user": "chengzhen123"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 283,
    "title": "[Question] Model type for tt/ee not found, assuming encoder-only architecture",
    "body": "Reporting this as requested by the warning message, but as a question because I'm not entirely sure if it's a bug:\r\n\r\n![image](https://github.com/xenova/transformers.js/assets/1167575/f40d5935-01b4-442e-802b-ed5fd7a774b7)\r\n\r\nHere's the code I ran:\r\n\r\n```js\r\nlet quantized = false; // change to `true` for a much smaller model (e.g. 87mb vs 345mb for image model), but lower  accuracy\r\nlet { AutoProcessor, CLIPVisionModelWithProjection, RawImage, AutoTokenizer, CLIPTextModelWithProjection } = await import('https://cdn.jsdelivr.net/npm/@xenova/transformers@2.5.4/dist/transformers.min.js');\r\nlet imageProcessor = await AutoProcessor.from_pretrained('Xenova/clip-vit-base-patch16');\r\nlet visionModel = await CLIPVisionModelWithProjection.from_pretrained('Xenova/clip-vit-base-patch16', {quantized});\r\nlet tokenizer = await AutoTokenizer.from_pretrained('Xenova/clip-vit-base-patch16');\r\nlet textModel = await CLIPTextModelWithProjection.from_pretrained('Xenova/clip-vit-base-patch16', {quantized});\r\n\r\nfunction cosineSimilarity(A, B) {\r\n  if(A.length !== B.length) throw new Error(\"A.length !== B.length\");\r\n  let dotProduct = 0, mA = 0, mB = 0;\r\n  for(let i = 0; i < A.length; i++){\r\n    dotProduct += A[i] * B[i];\r\n    mA += A[i] * A[i];\r\n    mB += B[i] * B[i];\r\n  }\r\n  mA = Math.sqrt(mA);\r\n  mB = Math.sqrt(mB);\r\n  let similarity = dotProduct / (mA * mB);\r\n  return similarity;\r\n}\r\n\r\n// get image embedding:\r\nlet image = await RawImage.read('https://i.imgur.com/RKsLoNB.png');\r\nlet imageInputs = await imageProcessor(image);\r\nlet { image_embeds } = await visionModel(imageInputs);\r\nconsole.log(image_embeds.data);\r\n\r\n// get text embedding:\r\nlet texts = ['a photo of an astronaut'];\r\nlet textInputs = tokenizer(texts, { padding: true, truncation: true });\r\nlet { text_embeds } = await textModel(textInputs);\r\nconsole.log(text_embeds.data);\r\n\r\nlet similarity = cosineSimilarity(image_embeds.data, text_embeds.data);\r\nconsole.log(similarity);\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/283",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-07T05:01:34Z",
    "updated_at": "2023-09-08T13:17:07Z",
    "user": "josephrocca"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 354,
    "title": "Is it possible to append to tensors along a primary axis?",
    "body": "### Feature request\n\nit would be really cool to be able to append to a safetensor file so you can continue to add data along, say, a batch dimension\n\n### Motivation\n\nfor logging data during train runs that can be visualized from an external tool. something like a live application that lazily loads the saved data. this is super useful for reinforcement learning\n\n### Your contribution\n\ni could submit a PR if necessary.",
    "url": "https://github.com/huggingface/safetensors/issues/354",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-09-06T17:54:56Z",
    "updated_at": "2023-12-11T01:48:44Z",
    "comments": 2,
    "user": "verbiiyo"
  },
  {
    "repo": "huggingface/huggingface_hub",
    "number": 1643,
    "title": "We couldn't connect to 'https://huggingface.co/' to load this model and it looks like distilbert-base-uncased is not the path to a directory conaining a config.json file. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.",
    "body": "### System Info\r\n\r\nHello, I have been using hugging face transformers with a lot of success. I have been able to create many successful fine-tuned pre-trained text classification models using various HF transformers and have been using HF integration with SageMaker in a SageMaker conda_pytorch_310 notebook. \r\n\r\n\r\nmy code looks like this:  \r\n```!pip install \"transformers==4.17.0\" \"datasets[s3]==1.18.4\" --upgrade```\r\n``` tokenizer = AutoTokenizer.from_pretrained(tokenizer_name)```\r\n\r\n\r\nYesterday I was able to successfully download, fine tune and make inferences using distilbert-base-uncased, and today I am getting: ```OSError: We couldn't connect to 'https://huggingface.co/' to load this model and it looks like mattmdjaga/segformer_b2_clothes is not the path to a directory conaining a config.json file.\r\nCheckout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.```\r\n\r\nLooking through the traceback I see: ```HTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/mattmdjaga/segformer_b2_clothes/resolve/main/config.json\r\nDuring handling of the above exception, another exception occurred:```\r\n....\r\n ```File ~/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/transformers/file_utils.py:2052, in _raise_for_status(request) 2050         raise RevisionNotFoundError((f\"404 Client Error: Revision Not Found for url: {request.url}\"))-> 2052 request.raise_for_status()```\r\n\r\nI have tried many different models, both text classification and non-text classification and getting the same error. This worked yesterday and nothing has changed since then. I also have confirmed that nothing has changed on our end to cause this error ,and confirmed all the model names.\r\n\r\nAny insights would be appreciated!\r\n\r\n@Wauplin \r\n\r\n\r\n### Who can help?\r\n\r\n_No response_\r\n\r\n### Information\r\n\r\n- [X] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(tokenizer_name)\r\n\r\n\r\n### Expected behavior\r\n\r\nmodel successfully downloads",
    "url": "https://github.com/huggingface/huggingface_hub/issues/1643",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-06T17:18:45Z",
    "updated_at": "2023-09-07T15:51:12Z",
    "user": "a-rhodes-vcu"
  },
  {
    "repo": "huggingface/setfit",
    "number": 417,
    "title": "Passing multiple evaluation metrics to SetFitTrainer",
    "body": "Hi there, after reading the docs I find that one can easily get the f1 score or accuracy by passing the respective string as the `metric` argument to the trainer. However, how can I get both or even other metrics, such as f1_per_class?\r\n\r\nThanks :)",
    "url": "https://github.com/huggingface/setfit/issues/417",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-06T11:38:08Z",
    "updated_at": "2023-11-24T13:31:08Z",
    "user": "fhamborg"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1357,
    "title": "[RFC] MusicGen `.to_bettertransformer()` integration",
    "body": "### Feature request\n\nAdd support for MusicGen Better Transformer integration. MusicGen is composed of three sub-models:\r\n\r\n1. Text encoder: maps the text inputs to a sequence of hidden-state representations. The pre-trained MusicGen models use a frozen text encoder from either T5 or Flan-T5\r\n2. MusicGen decoder: a language model (LM) that auto-regressively generates audio tokens (or codes) conditional on the encoder hidden-state representations. The pre-trained MusicGen models use the BART decoder structure\r\n3. Audio codec: used to encode an audio prompt to use as prompt tokens, and recover the audio waveform from the audio tokens predicted by the decoder. The pre-trained MusicGen models use the [EnCodec model](https://huggingface.co/docs/transformers/main/model_doc/encodec)\r\n\r\n=> the text encoder uses the T5 attention module, and the MusicGen decoder uses the BART attention module. Thus, there are no extra attention layers we need to add to optimum. The audio codec is not transformer based, so we don't need to export it to better transformer.\r\n\r\nThe question is simply how to get the integration working with the sub-model structure. The config file for MusicGen is nested in the same way as the model structure, containing sub-configs for each of the three components: https://huggingface.co/docs/transformers/main/model_doc/musicgen#transformers.MusicgenConfig \r\n\r\n=> this means that the text encoder config is accessed as `config.text_encoder`, and the text encoder model as `model.text_encoder`. Likewise, the MusicGen decoder config is accessed as `config.decoder`, and the text encoder model as `model.decoder`. We need to export the pairs of {models, configs} to their better transformer counterparts, e.g. {`model.text_encoder`, `config.text_encoder`} -> `better_transformer_text_encoder`, and {`model.decoder`, `config.decoder`} -> `better_transformer_decoder`.\r\n\r\nIdeally, we'd like to be able to export the entire model to better transformer in one go:\r\n```python\r\nfrom transformers import  MusicgenForConditionalGeneration\r\n\r\nmodel = MusicgenForConditionalGeneration.from_pretrained(\"facebook/musicgen-small\")\r\nmodel = model.to_bettertransformer()\r\n```\r\n\r\nHowever. we can't simply export {`model`, `config`} like this, since the top-level config does not contain the config attributes for the sub-models. It's just a place-holder for the sub-model configs.\r\n\r\nA simple workaround is to export the text encoder and decoder separately:\r\n```python\r\nfrom transformers import  MusicgenForConditionalGeneration\r\n\r\nmodel = MusicgenForConditionalGeneration.from_pretrained(\"facebook/musicgen-small\")\r\nmodel.text_encoder = model.text_encoder.to_bettertransformer()\r\nmodel.decoder = model.decoder.to_bettertransformer()\r\n```\r\n=> but this diverges from the better transformer API\r\n\n\n### Motivation\n\n~9M MusicGen [downloads](https://huggingface.co/models?search=facebook/musicgen) per month -> huge interest in running the model!\n\n### Your contribution\n\nHappy to help with the integration!",
    "url": "https://github.com/huggingface/optimum/issues/1357",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-06T10:25:50Z",
    "updated_at": "2024-01-10T17:31:44Z",
    "comments": 1,
    "user": "sanchit-gandhi"
  },
  {
    "repo": "pytorch/serve",
    "number": 2569,
    "title": "Failure in loading Deepspeed large model example",
    "body": "### \ud83d\udc1b Describe the bug\n\nI am trying to follow the example to perform inference with the OPT-30B model according to this example: https://github.com/pytorch/serve/tree/master/examples/large_models/deepspeed\r\n\r\nHowever, as specified in the [model-config.yaml](https://github.com/pytorch/serve/blob/master/examples/large_models/deepspeed/opt/model-config.yaml) file, a `checkpoints.json` file is required. This file gets used here: https://github.com/pytorch/serve/blob/master/ts/handler_utils/distributed/deepspeed.py#L40\r\n\r\nAs a result, the model fails to load. The error logs are attached below.\n\n### Error logs\n\n```\r\n2023-09-05T23:22:14,652 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG - Failed to load model opt, exception Cannot copy out of meta tensor; no data!\r\n2023-09-05T23:22:14,652 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG - Traceback (most recent call last):\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -   File \"/opt/conda/lib/python3.10/site-packages/ts/model_service_worker.py\", line 131, in load_model\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -     service = model_loader.load(\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -   File \"/opt/conda/lib/python3.10/site-packages/ts/model_loader.py\", line 135, in load\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -     initialize_fn(service.context)\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -   File \"/home/model-server/tmp/models/c1130e4b01c345b9be913ef8414518cb/custom_handler.py\", line 55, in initialize\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -     ds_engine = get_ds_engine(self.model, ctx)\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -   File \"/opt/conda/lib/python3.10/site-packages/ts/handler_utils/distributed/deepspeed.py\", line 35, in get_ds_engine\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -     ds_engine = deepspeed.init_inference(\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -   File \"/opt/conda/lib/python3.10/site-packages/deepspeed/__init__.py\", line 342, in init_inference\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -     engine = InferenceEngine(model, config=ds_inference_config)\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -   File \"/opt/conda/lib/python3.10/site-packages/deepspeed/inference/engine.py\", line 154, in __init__\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -     self.module.to(device)\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -   File \"/opt/conda/lib/python3.10/site-packages/transformers/modeling_utils.py\", line 2053, in to\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -     return super().to(*args, **kwargs)\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -   File \"/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1145, in to\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -     return self._apply(convert)\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -   File \"/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 797, in _apply\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -     module._apply(fn)\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -   File \"/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 797, in _apply\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -     module._apply(fn)\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -   File \"/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 797, in _apply\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -     module._apply(fn)\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -   File \"/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 820, in _apply\r\n2023-09-05T23:22:14,653 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -     param_applied = fn(param)\r\n2023-09-05T23:22:14,654 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -   File \"/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py\", line 1143, in convert\r\n2023-09-05T23:22:14,654 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG -     return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)\r\n2023-09-05T23:22:14,654 [INFO ] W-29500-opt_1.0-stdout MODEL_LOG - NotImplementedError: Cannot copy out of meta tensor; no data!\r\n```\n\n### Installation instructions\n\nDocker image URI: `763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:2.0.1-gpu-py310-cu118-ubuntu20.04-ec2`\r\nEC2 instance: `g5dn.24xlarge`\n\n### Model Packaing\n\nCreated model artifact by following this example:\r\nhttps://github.com/pytorch/serve/tree/master/examples/large_models/deepspeed\n\n### config.properties\n\n_No response_\n\n### Versions\n\n```\r\n---------------------------",
    "url": "https://github.com/pytorch/serve/issues/2569",
    "state": "open",
    "labels": [
      "question",
      "triaged",
      "example"
    ],
    "created_at": "2023-09-05T23:35:46Z",
    "updated_at": "2023-09-11T17:35:14Z",
    "user": "sachanub"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4906,
    "title": "How to check whether the image is flagged as inappropriate automated?",
    "body": "Is there a way to know whether the generated image (without seeing it) was flagged as inappropriate?",
    "url": "https://github.com/huggingface/diffusers/issues/4906",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-05T17:51:07Z",
    "updated_at": "2023-09-07T05:49:46Z",
    "user": "sarmientoj24"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4905,
    "title": "How to convert pretrained SDXL .safetensors model to diffusers folder format",
    "body": "As SDXL is gaining adoption, more and more community based models pop up that that are just saved as a .safetensors file. E.g the popular Realistic Vision: https://civitai.com/models/139562?modelVersionId=154590\r\n\r\nWhen running train_dreambooth_lora_sdxl.py, the training script expects the diffusers folder format to accelerate text encoder, unet etc. As far as I know, there is no possible way to use `StableDiffusionXLPipeline.from_single_file()` to do the same.\r\n\r\nIs there a way to convert a SDXL 1.0 fine-tuned .safetensors file to the diffusers folder format?\r\n\r\nI found this but it doesn't seem to be applicable to SDXL scripts/convert_lora_safetensor_to_diffusers.py.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/4905",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-05T17:01:27Z",
    "updated_at": "2023-09-06T09:55:54Z",
    "user": "agcty"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 280,
    "title": "[Question] How to run multiple pipeline or multiple modal?",
    "body": "<!-- QUESTION GOES HERE -->\r\nI am trying to transcribe from audio source and need to do multi language translation.  I had tried transcribing using  Xenova/whisper-  and  and take  text input and feed in to \"Xenova/m2m100_418M\" modal but due to multiple pipeline it's failed. Is there any way to achieve\r\nthis? ",
    "url": "https://github.com/huggingface/transformers.js/issues/280",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-05T11:33:44Z",
    "updated_at": "2023-11-01T11:32:15Z",
    "user": "sundarshahi"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1346,
    "title": "BetterTransfomer Support for the GPTBigCode model",
    "body": "### Feature request\n\n\r\n\r\nis it possible to support GPTBigCode with BetterTransformer?\r\n\r\nhttps://huggingface.co/docs/transformers/model_doc/gpt_bigcode\r\n\r\n\n\n### Motivation\n\n\r\nA very popular Decoder model for Code.\n\n### Your contribution\n\n\r\nhope you can achieve it. Thanks.",
    "url": "https://github.com/huggingface/optimum/issues/1346",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-04T16:52:56Z",
    "updated_at": "2023-09-08T14:51:17Z",
    "comments": 5,
    "user": "amarazad"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2284,
    "title": "\u2753 [Question] Timeline for TensorRT 9.0 support",
    "body": "## \u2753 Question\r\n\r\nWhat is the timeline to support TensorRT 9.0 ?\r\n\r\n## What you have already tried\r\n\r\nUsing Nvidia's 9.0 TensorRT [release](https://github.com/NVIDIA/TensorRT/tree/release/9.0) is incompatible with the latest version of torch-tensorrt (which requires TensorRT 8.6).\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2284",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-04T07:26:02Z",
    "updated_at": "2023-09-06T16:56:33Z",
    "user": "tdeboissiere"
  },
  {
    "repo": "pytorch/serve",
    "number": 2564,
    "title": "[Docs] More information regarding text generation & LLM inference",
    "body": "### \ud83d\udcda The doc issue\n\nI am new to TorchServe and was looking for some features that I need to be able to consider using TorchServe for LLM text generation.\r\n\r\nToday, there are a couple inference serving solutions out there, including [text-generation-inference](https://github.com/huggingface/text-generation-inference) and [vLLM](https://vllm.ai). It would be great if the documentation can mention how TorchServe compares with these at the moment. For instance,\r\n\r\n- Does TorchServe support continuous batching?\r\n- Does TorchServe support paged attention?\r\n- Does TorchServe support streaming generated text through its inference API?\r\n- What are some LLMs that TorchServe is known to work well with, e.g. Llama2, Falcon? Apart from the Hugging Face integration example provided.\n\n### Suggest a potential alternative/fix\n\nA dedicated page for text generation and LLM inference could make sense given that there would be a lot of people interested in this.",
    "url": "https://github.com/pytorch/serve/issues/2564",
    "state": "open",
    "labels": [
      "documentation",
      "question",
      "llm"
    ],
    "created_at": "2023-09-03T17:40:16Z",
    "updated_at": "2023-09-05T17:45:08Z",
    "user": "jaywonchung"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 426,
    "title": "`stream` is not supported for this model",
    "body": "Hello Eperts,\r\nTrying to run https://github.com/huggingface/chat-ui by providing models like EleutherAI/pythia-1b, gpt2-large. With all these models, there is this consitent error\r\n{\"error\":[\"Error in `stream`: `stream` is not supported for this model\"]}\r\nAlthough I can see that hosted inference API for these models are working well from their hugging face pages like this: https://huggingface.co/gpt2-large\r\nCould someone please help?",
    "url": "https://github.com/huggingface/chat-ui/issues/426",
    "state": "open",
    "labels": [
      "question",
      "models"
    ],
    "created_at": "2023-09-02T05:30:47Z",
    "updated_at": "2023-12-24T16:39:21Z",
    "user": "newUserForTesting"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4871,
    "title": "How to run \"StableDiffusionXLPipeline.from_single_file\"?",
    "body": "I got an error when I ran the following code and it got an error on the line \"pipe = StableDiffusionXLPipeline.\" and how to solve it?\r\n\r\nnotes:\r\nI don't have a model refiner, I just want to run a model with a DIffuser XL\r\n\r\n```\r\nfrom diffusers import StableDiffusionXLPipeline, StableDiffusionXLImg2ImgPipeline\r\nimport torch\r\n\r\npipe = StableDiffusionXLPipeline.from_single_file(\r\n    \"/content/model/model.safetensors\", torch_dtype=torch.float16).to(\"cuda\")\r\n\r\nimage = pipe(\r\n    prompt,\r\n    negative_prompt=negative_prompt,\r\n    width=Width,\r\n    height=Height,\r\n    guidance_scale=7,\r\n    target_size=(1024,1024),\r\n    original_size=(4096,4096),\r\n    num_inference_steps=25\r\n    ).images[0]\r\n```\r\n\r\n```\r\n/usr/local/lib/python3.10/dist-packages/transformers/models/clip/feature_extraction_clip.py:28: FutureWarning: The class CLIPFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please use CLIPImageProcessor instead.\r\n  warnings.warn(\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n[<ipython-input-2-67122e524ae5>](https://localhost:8080/#) in <cell line: 4>()\r\n      2 import torch\r\n      3 \r\n----> 4 pipe = StableDiffusionXLPipeline.from_single_file(\r\n      5     \"/content/model/model.safetensors\", torch_dtype=torch.float16).to(\"cuda\")\r\n      6 \r\n\r\n1 frames\r\n[/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py](https://localhost:8080/#) in download_from_original_stable_diffusion_ckpt(checkpoint_path, original_config_file, image_size, prediction_type, model_type, extract_ema, scheduler_type, num_in_channels, upcast_attention, device, from_safetensors, stable_unclip, stable_unclip_prior, clip_stats_path, controlnet, load_safety_checker, pipeline_class, local_files_only, vae_path, vae, text_encoder, tokenizer, config_files)\r\n   1564             )\r\n   1565         else:\r\n-> 1566             pipe = pipeline_class(\r\n   1567                 vae=vae,\r\n   1568                 text_encoder=text_model,\r\n\r\nTypeError: StableDiffusionXLPipeline.__init__() got an unexpected keyword argument 'safety_checker'\r\n```\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/4871",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-01T22:42:25Z",
    "updated_at": "2023-09-09T03:35:53Z",
    "user": "Damarcreative"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1334,
    "title": "Enable CLI export of decoder-only models without present outputs",
    "body": "### Feature request\r\n\r\nCurrently `optimum-cli export onnx` only supports exporting text-generation models with present outputs (`--task text-generation`) or with past+present outputs (``--task text-generation-with-past`). It would be useful to be able to export a variant without any caching structures if they will not be used.\r\n\r\nExample of how `--task text-generation` is not sufficient for this usecase:\r\n<details>\r\n\r\n```\r\noptimum-cli export onnx --model facebook/opt-125m --task text-generation TEST\r\n...\r\nValidating ONNX model TEST/decoder_model.onnx...\r\n        -[\u2713] ONNX model output names match reference model (present.7.key, present.2.key, present.3.key, present.2.value, present.3.value, present.10.value, logits, present.8.key, present.0.value, present.10.key, present.1.key, present.1.value, present.11.key, present.9.value, present.6.value, present.4.value, present.7.value, present.5.value, present.5.key, present.8.value, present.9.key, present.4.key, present.6.key, present.0.key, present.11.value)\r\n        - Validating ONNX Model output \"logits\":\r\n                -[\u2713] (2, 16, 50272) matches (2, 16, 50272)\r\n                -[x] values not close enough, max diff: 3.719329833984375e-05 (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.0.key\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.0.value\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.1.key\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.1.value\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.2.key\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.2.value\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.3.key\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.3.value\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.4.key\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[x] values not close enough, max diff: 1.8358230590820312e-05 (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.4.value\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.5.key\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.5.value\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.6.key\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.6.value\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.7.key\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.7.value\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.8.key\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.8.value\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.9.key\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.9.value\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.10.key\":\r\n                -[\u2713] (2, 12, 16, 64) matches (2, 12, 16, 64)\r\n                -[\u2713] all values close (atol: 1e-05)\r\n        - Validating ONNX Model output \"present.10.value\":\r\n                -[\u2713] (2, 12, 16, 64) matches ",
    "url": "https://github.com/huggingface/optimum/issues/1334",
    "state": "closed",
    "labels": [],
    "created_at": "2023-09-01T15:56:27Z",
    "updated_at": "2023-09-13T11:43:36Z",
    "comments": 3,
    "user": "mgoin"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 274,
    "title": "[Question]\u00a0How to convert to ONNX a fine-tuned model",
    "body": "Hi, we're playing with this library to see if it can be useful for our project. I find it very easy and well done (congratulations).\r\n\r\nThe idea is not to use it directly as a frontend library but via node.js. \r\nWe've tried scripting a model directly from HF (google/flan-t5-small) and it worked but we're having trouble using a fine-tuned model.\r\n\r\nHere what we tried. We fine-tuned a model (again google/flan-t5-small) and then converted it using the onnx script (in README.md).\r\n\r\nThe script generated the following files:\r\n\r\n```\r\nonnx/decoder_model_quantized.onnx\r\nonnx/decoder_model.onnx\r\nonnx/encoder_model_quantized.onnx\r\nonnx/encoder_model.onnx\r\nconfig.json\r\ngeneration_config.json\r\nquantize_config.json\r\nspecial_tokens_map.json\r\nspice.model\r\ntokenizer_config.json\r\ntokenizer.json\r\n```\r\n\r\nBut when we tried to use it it gave us this error:\r\n\r\n`local_files_only=true` or `env.allowRemoteModels=false` and file was not found locally at ./models/google/flan-t5-small-2/onnx/decoder_model_merged_quantized.onnx\r\n\r\nSome advice or useful doc/link? \r\nThanks",
    "url": "https://github.com/huggingface/transformers.js/issues/274",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-09-01T15:27:21Z",
    "updated_at": "2023-09-01T16:12:12Z",
    "user": "mrddter"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6203,
    "title": "Support loading from a DVC remote repository",
    "body": "### Feature request\n\nAdding support for loading a file from a DVC repository, tracked remotely on a SCM.\n\n### Motivation\n\nDVC is a popular version control system to version and manage datasets. The files are stored on a remote object storage platform, but they are tracked using Git. Integration with DVC is possible through the `DVCFileSystem`.\r\n\r\nI have a Gitlab repository where multiple files are tracked using DVC and stored in a GCP bucket. I would like to be able to load these files using `datasets` directly using an URL. My goal is to write a generic code that abstracts the storage layer, such that my users will only have to pass in an `fsspec`-compliant URL and the corresponding files will be loaded.\n\n### Your contribution\n\nI managed to instantiate a `DVCFileSystem` pointing to a Gitlab repo from a `fsspec` chained URL in [this pull request](https://github.com/iterative/dvc/pull/9903) to DVC. \r\n\r\n```python\r\nfrom fsspec.core import url_to_fs\r\n\r\nfs, _ = url_to_fs(\"dvc::https://gitlab.com/repository/group/my-repo\")\r\n```\r\n\r\nFrom now I'm not sure how to continue, it seems that `datasets` expects the URL to be fully qualified like so: `dvc::https://gitlab.com/repository/group/my-repo/my-folder/my-file.json` but this fails because `DVCFileSystem` expects the URL to point to the root of an SCM repo. Is there a way to make this work with `datasets`?",
    "url": "https://github.com/huggingface/datasets/issues/6203",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-09-01T14:04:52Z",
    "updated_at": "2023-09-15T15:11:27Z",
    "comments": 4,
    "user": "bilelomrani1"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1328,
    "title": "Documentation for OpenVINO missing half() ",
    "body": "### System Info\n\n```shell\nN/A\n```\n\n\n### Who can help?\n\n@echarlaix \n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction (minimal, reproducible, runnable)\n\nThe documentation for OpenVINO is missing information does not have any information about using `half()` to run models on GPU. The docs used to have this information, but it was removed. \r\n\r\nIs this not required anymore? I.e. perhaps `model.to(\"GPU\")` does this automatically? If so, how would one run on GPU with FP32 precision?\n\n### Expected behavior\n\nhalf() documented with a small example",
    "url": "https://github.com/huggingface/optimum/issues/1328",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-08-31T20:44:28Z",
    "updated_at": "2023-08-31T20:46:34Z",
    "comments": 1,
    "user": "ngaloppo"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 249,
    "title": "How to save model locally after sft",
    "body": "I am wondering how to save model locally after sft",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/249",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-31T14:59:04Z",
    "updated_at": "2023-08-31T17:01:44Z",
    "user": "Diego0511"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 425,
    "title": "Is it possible to modify it so that .env.local environment variables are set at runtime?",
    "body": "Currently for every different deployment of Chat-UI it is required to rebuild the Docker image with different .env.local environment variables. Is it theoretically possible to have it so that 1 image can be used for all deployments, but with different secrets passed at runtime? What environment variables and for what reason are truly needed at build time for Chat-UI to function? In #204 it says `HF_ACCESS_TOKEN` is needed at build time, but what if we use `OPENID` authentication instead? Is there anything else blocking this type of use case?",
    "url": "https://github.com/huggingface/chat-ui/issues/425",
    "state": "open",
    "labels": [
      "enhancement",
      "back",
      "hacktoberfest"
    ],
    "created_at": "2023-08-31T12:55:17Z",
    "updated_at": "2024-03-14T20:05:38Z",
    "comments": 4,
    "user": "martinkozle"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 959,
    "title": "How to enter the docker image to modify the environment",
    "body": "### System Info\n\ndokcer image: ghcr.io/huggingface/text-generation-inference:1.0.2\n\n### Information\n\n- [X] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [ ] An officially supported command\n- [X] My own modifications\n\n### Reproduction\n\nI want to enter the image to modify the environment\uff0clike: tiktoken.\r\n\r\n`docker run -it ghcr.io/huggingface/text-generation-inference:1.0.2 /bin/bash`\r\n\r\nI get:\r\nerror: unexpected argument '/bin/bash' found\r\nUsage: text-generation-launcher [OPTIONS]\r\n\n\n### Expected behavior\n\nno error\r\nthx!",
    "url": "https://github.com/huggingface/text-generation-inference/issues/959",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-31T11:14:13Z",
    "updated_at": "2023-08-31T20:12:55Z",
    "user": "Romaosir"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 352,
    "title": "Attempt to convert `PygmalionAI/pygmalion-2.7b` to `safetensors`",
    "body": "### System Info\n\n- `transformers` version: 4.32.1\r\n- Platform: Linux-5.15.0-1039-gcp-x86_64-with-glibc2.31\r\n- Python version: 3.9.5\r\n- Huggingface_hub version: 0.16.4\r\n- Safetensors version: 0.3.3\r\n- Accelerate version: 0.20.3\r\n- Accelerate config: \tnot found\r\n- PyTorch version (GPU?): 2.0.1+cu118 (True)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: no\r\n- Using distributed or parallel set-up in script?: no\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Reproduction\n\nHey guys I am trying to save the `PygmalionAI/pygmalion-2.7b` weights to `safetensors`. Based on [this thread](https://github.com/huggingface/text-generation-inference/issues/922#issuecomment-1698942643) I have manually downloaded the [weights](https://huggingface.co/PygmalionAI/pygmalion-2.7b/resolve/main/pytorch_model.bin) and tried to run the following:\r\n```\r\nweights = torch.load(\"pytorch_model.bin\")\r\nweights =  {k: v.clone().contiguous() for k, v in weights.items()}\r\nsave_file(weights, \"model.safetensors\")\r\n```\r\nand everything went well. However, when trying to load the model I encounter the following issue:\r\n```\r\nAttributeError: 'NoneType' object has no attribute 'get'\r\n```\r\nI inspected the files and can't figure out what goes wrong... I have pushed everything to `https://huggingface.co/JulesBelveze/pygmalion-2.7b-safetensors`\r\n\r\nAny recommendation on how to proceed would be awesome \ud83e\udd13 \r\nCheers!\n\n### Expected behavior\n\nExpecting the following code snippet to load properly load the model (and not throw the above error)\r\n```\r\nfrom transformers import AutoModelForCausalLM\r\nmodel = AutoModelForCausalLM.from_pretrained(\"JulesBelveze/pygmalion-2.7b-safetensors\")\r\n```\r\n",
    "url": "https://github.com/huggingface/safetensors/issues/352",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-08-31T10:25:19Z",
    "updated_at": "2023-12-11T01:48:45Z",
    "comments": 2,
    "user": "JulesBelveze"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 246,
    "title": "how to load the fine-tuned model in the local? ",
    "body": "hi \r\nthz for your super convenient package makes easier for cookies like me to fine-tune a new model. However, as a cookie, I dont really know how to load my fine-tuned model and apply. \r\nI was fine-tuning in Google colab and download on my PC but know how to call it out? \r\nthz bro ",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/246",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-31T08:15:11Z",
    "updated_at": "2023-12-18T15:31:11Z",
    "user": "kennyluke1023"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4849,
    "title": "how to use multiple GPUs to train textual inversion?",
    "body": "\r\nI train the textual inversion fine tuning cat toy example from [here](https://github.com/huggingface/diffusers/tree/main/examples/textual_inversion)\r\n\r\nmy env:\r\ndiffusers: 0.20.0\r\ntorch: 1.12.1+cu113\r\naccelerate: 0.22.0\r\n\r\ntrain script, as follow:\r\n\r\n```\r\nCUDA_VISIBLE_DEVICES=\"0,1,2,3\" python -u textual_inversion.py --pretrained_model_name_or_path=$MODEL_NAME --train_data_dir=$DATA_DIR --learnable_property=\"object\" --placeholder_token=\"<cat-toy>\" --initializer_token=\"toy\" --resolution=512 --train_batch_size=1 --gradient_accumulation_steps=4 --max_train_steps=3000 --learning_rate=5.0e-04 --scale_lr --lr_scheduler=\"constant\" --lr_warmup_steps=0 --output_dir=\"textual_inversion_cat\"\r\n```\r\n\r\nBut it only trained in cuda:0,  Is there any way to solve the problem of training on a multi gpus\uff1fThanks.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/4849",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-31T02:56:39Z",
    "updated_at": "2023-09-11T01:07:49Z",
    "user": "Adorablepet"
  },
  {
    "repo": "pytorch/xla",
    "number": 5525,
    "title": "Query bazel deps of XLAC.so?",
    "body": "## \u2753 Questions and Help\r\nI'm trying to see bazel dependencies of `//:_XLAC.so` target by running the following command (as described in [bazel guide](https://bazel.build/query/guide))\r\n```\r\nbazel query \"deps(//:_XLAC.so)\"\r\n```\r\nIt shows me the following errors:\r\n```bash\r\nERROR: An error occurred during the fetch of repository 'mkl_dnn_acl_compatible'\r\nERROR: no such package '@mkl_dnn_acl_compatible//': Unable to load package for @tsl//tensorflow/third_party/mkl_dnn:mkldnn_acl.BUILD: BUILD file not found in directory 'tensorflow/third_party/mkl_dnn' of external repository @tsl.\r\nERROR: Evaluation of query \"deps(//:_XLAC.so)\" failed\r\n```\r\nFull output:\r\n```bash\r\nroot@dd45b88976fe:~/workspace/pytorch/xla# bazel query \"deps(//:_XLAC.so)\"\r\nStarting local Bazel server and connecting to it...\r\nDEBUG: /root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/xla/third_party/repo.bzl:132:14: \r\nWarning: skipping import of repository 'tf_runtime' because it already exists.\r\nDEBUG: /root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/xla/third_party/repo.bzl:132:14: \r\nWarning: skipping import of repository 'llvm-raw' because it already exists.\r\nDEBUG: /root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/tsl/third_party/repo.bzl:132:14: \r\nWarning: skipping import of repository 'pybind11_bazel' because it already exists.\r\nDEBUG: /root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/tsl/third_party/repo.bzl:132:14: \r\nWarning: skipping import of repository 'pybind11' because it already exists.\r\nINFO: Repository mkl_dnn_acl_compatible instantiated at:\r\n  /root/workspace/pytorch/xla/WORKSPACE:76:15: in <toplevel>\r\n  /root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/xla/workspace2.bzl:90:19: in workspace\r\n  /root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/tsl/workspace2.bzl:636:21: in workspace\r\n  /root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/tsl/workspace2.bzl:165:20: in _tf_repositories\r\n  /root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/tsl/third_party/repo.bzl:136:21: in tf_http_archive\r\nRepository rule _tf_http_archive defined at:\r\n  /root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/tsl/third_party/repo.bzl:89:35: in <toplevel>\r\nERROR: An error occurred during the fetch of repository 'mkl_dnn_acl_compatible':\r\n   Traceback (most recent call last):\r\n        File \"/root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/tsl/third_party/repo.bzl\", line 55, column 31, in _tf_http_archive_impl\r\n                link_dict = _get_link_dict(ctx, ctx.attr.link_files, ctx.attr.build_file)\r\n        File \"/root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/tsl/third_party/repo.bzl\", line 47, column 54, in _get_link_dict\r\n                link_dict[ctx.path(\"BUILD.bazel\")] = ctx.path(Label(build_file))\r\nError in path: Unable to load package for @tsl//tensorflow/third_party/mkl_dnn:mkldnn_acl.BUILD: BUILD file not found in directory 'tensorflow/third_party/mkl_dnn' of external repository @tsl. Add a BUILD file to a directory to mark it as a package.\r\nERROR: /root/workspace/pytorch/xla/WORKSPACE:76:15: fetching _tf_http_archive rule //external:mkl_dnn_acl_compatible: Traceback (most recent call last):\r\n        File \"/root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/tsl/third_party/repo.bzl\", line 55, column 31, in _tf_http_archive_impl\r\n                link_dict = _get_link_dict(ctx, ctx.attr.link_files, ctx.attr.build_file)\r\n        File \"/root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/tsl/third_party/repo.bzl\", line 47, column 54, in _get_link_dict\r\n                link_dict[ctx.path(\"BUILD.bazel\")] = ctx.path(Label(build_file))\r\nError in path: Unable to load package for @tsl//tensorflow/third_party/mkl_dnn:mkldnn_acl.BUILD: BUILD file not found in directory 'tensorflow/third_party/mkl_dnn' of external repository @tsl. Add a BUILD file to a directory to mark it as a package.\r\nERROR: /root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/xla/xla/service/cpu/BUILD:1008:11: no such package '@mkl_dnn_acl_compatible//': Unable to load package for @tsl//tensorflow/third_party/mkl_dnn:mkldnn_acl.BUILD: BUILD file not found in directory 'tensorflow/third_party/mkl_dnn' of external repository @tsl. Add a BUILD file to a directory to mark it as a package. and referenced by '@xla//xla/service/cpu:runtime_matmul_mkl'\r\nERROR: /root/.cache/bazel/_bazel_root/346fc8b061ac3bdcc6b91de97c708483/external/xla/xla/service/cpu/BUILD:944:11: no such package '@mkl_dnn_acl_compatible//': Unable to load package for @tsl//tensorflow/third_party/mkl_dnn:mkldnn_acl.BUILD: BUILD file not found in directory 'tensorflow/third_party/mkl_dnn' of external repository @tsl. Add a BUILD file to a directory to mark it as a package. and referenced by '@xla//xla/service/cpu:runtime_con",
    "url": "https://github.com/pytorch/xla/issues/5525",
    "state": "open",
    "labels": [
      "question",
      "build"
    ],
    "created_at": "2023-08-30T21:27:58Z",
    "updated_at": "2025-04-30T12:34:57Z",
    "user": "apivovarov"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 423,
    "title": "AI response appears without user message, then both appear after refresh.",
    "body": "I was experimenting with my own back-end and was wanting to get a feel for the interface. Here is what my code looks like:\r\n```py\r\nimport json\r\nimport random\r\nfrom fastapi import FastAPI, Request\r\nfrom fastapi.responses import Response, StreamingResponse\r\n\r\napp = FastAPI()\r\n\r\n\r\nasync def yielder():\r\n    yield \"data:\" + json.dumps(\r\n        {\r\n            \"details\": {\r\n                \"finish_reason\": \"length\",\r\n                \"generated_tokens\": 1,\r\n                \"seed\": None,\r\n            },\r\n            \"generated_text\": \"what is happening\",\r\n            \"token\": {\"id\": random.randrange(0, 2**32), \"logprob\": -0.34, \"special\": False, \"text\": \"it's alive!\"},\r\n        },separators=(',', ':')\r\n    ) + \"\\n\\n\\n\"\r\n\r\n\r\n@app.post(\"/generate\")\r\n@app.post(\"/\")\r\nasync def generate(request: Request):\r\n    reqj = await request.json()\r\n    print(reqj)\r\n    return StreamingResponse(\r\n        yielder(),\r\n        media_type=\"text/event-stream\",\r\n        headers={\"Content-Type\": \"text/event-stream\"},\r\n    )\r\n```\r\nUpon sending a message, \"hi\", I get this:\r\n![image](https://github.com/huggingface/chat-ui/assets/40547702/f3751e35-81a0-4a2d-8e85-2063b3df41c0)  \r\nAfter refreshing the page, everything is rendered properly:  \r\n![image](https://github.com/huggingface/chat-ui/assets/40547702/b18ce772-b0a4-4959-8d96-346a79aebe6d)\r\n\r\nWhat's going on?  \r\nHere is what I used as a reference, which was recommended to me on the HF Discord: [link](https://github.com/gururise/openai_text_generation_inference_server/blob/main/server.py)  \r\nThanks in advance.",
    "url": "https://github.com/huggingface/chat-ui/issues/423",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-30T19:04:14Z",
    "updated_at": "2023-09-13T19:44:23Z",
    "comments": 5,
    "user": "konst-aa"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6195,
    "title": "Force to reuse cache at given path",
    "body": "### Describe the bug\n\nI have run the official example of MLM like:\r\n\r\n```bash\r\n  python run_mlm.py \\\r\n      --model_name_or_path roberta-base \\\r\n      --dataset_name togethercomputer/RedPajama-Data-1T \\\r\n      --dataset_config_name arxiv \\\r\n      --per_device_train_batch_size 10 \\\r\n      --preprocessing_num_workers 20 \\\r\n      --validation_split_percentage 0 \\\r\n      --cache_dir /project/huggingface_cache/datasets \\\r\n      --line_by_line \\\r\n      --do_train \\\r\n      --pad_to_max_length \\\r\n      --output_dir /project/huggingface_cache/test-mlm\r\n```\r\nit successfully runs and at my cache folder has `cache-1982fea76aa54a13_00001_of_00020.arrow`.....  `cache-1982fea76aa54a13_00020_of_00020.arrow ` as tokenization cache of `map` method. And the cache works fine every time I run the command above.\r\n\r\nHowever, when I switched to jupyter notebook (since I do not want to load datasets every time when I changed other parameters not related to the dataloading). It is not recognizing the cache files and starts to re-run the entire tokenization process. \r\n\r\nI changed my code to \r\n```python\r\ntokenized_datasets = raw_datasets[\"train\"].map(\r\n                tokenize_function,\r\n                batched=True,\r\n                num_proc=data_args.preprocessing_num_workers,\r\n                remove_columns=[text_column_name],\r\n                load_from_cache_file=True,\r\n                desc=\"Running tokenizer on dataset line_by_line\",\r\n                # cache_file_names= {\"train\": \"cache-1982fea76aa54a13.arrow\"}\r\n                cache_file_name=\"cache-1982fea76aa54a13.arrow\",\r\n                new_fingerprint=\"1982fea76aa54a13\"\r\n            )\r\n```\r\nit still does not recognize the previously cached files and trying to re-run the tokenization process.\n\n### Steps to reproduce the bug\n\nuse jupyter notebook for dataset map function.\n\n### Expected behavior\n\nthe map function accepts the given cache_file_name and new_fingerprint then load the previously cached files.\n\n### Environment info\n\n- `datasets` version: 2.14.4.dev0\r\n- Platform: Linux-3.10.0-1160.59.1.el7.x86_64-x86_64-with-glibc2.10\r\n- Python version: 3.8.8\r\n- Huggingface_hub version: 0.16.4\r\n- PyArrow version: 12.0.1\r\n- Pandas version: 2.0.3",
    "url": "https://github.com/huggingface/datasets/issues/6195",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-30T18:44:54Z",
    "updated_at": "2023-11-03T10:14:21Z",
    "comments": 2,
    "user": "Luosuu"
  },
  {
    "repo": "huggingface/trl",
    "number": 713,
    "title": "How to use custom evaluate function with multi-gpu deepspeed",
    "body": "I am trying to use `deepspeed` multi-gpu training with `SFTTrainer` for a hh-rlhf. My modified trainer looks something like this\r\n```python\r\nclass SFTCustomEvalTrainer(SFTTrainer):\r\n\r\n    def evaluate(\r\n            self,\r\n            eval_dataset = None,\r\n            ignore_keys = None,\r\n            metric_key_prefix: str = \"eval\",\r\n        ):\r\n    breakpoint()\r\n    .... custom eval code\r\n```\r\nHowever, I only want to run one instance of evaluate on the 0th GPU. When using `--nproc_per_node 2`, I get two processes entering the breakpoint in customized `evaluate` function. How can I restrict deepspeed to only use one GPU for evaluation and multi-gpu for training?",
    "url": "https://github.com/huggingface/trl/issues/713",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-30T17:33:40Z",
    "updated_at": "2023-11-10T15:05:23Z",
    "user": "abaheti95"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1323,
    "title": "Optimisation and Quantisation for Translation models / tasks",
    "body": "### Feature request\n\nCurrently, the opimisation and quantisation functions look for mode.onnx in a folder, and will perform opt and quant on those files. When exporting a translation targeted ONNX, multiple files for encoding and decoding, and these can't be optimised or quantised. \r\n\r\nI've tried a hacky approach to change names of each of these files and then applying opt and quant, and this fails. I suspect it's more than just namings.\r\n\r\nIs it possible to optimise and quant translation ONNX files in future?\n\n### Motivation\n\nI would like to get smaller more efficient translation models\n\n### Your contribution\n\nNothing really that I can contribute to building the solution, as I don't have that level of experience and understanding.",
    "url": "https://github.com/huggingface/optimum/issues/1323",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-30T06:36:17Z",
    "updated_at": "2023-09-29T00:47:39Z",
    "comments": 2,
    "user": "gidzr"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6193,
    "title": "Dataset loading script method does not work with .pyc file",
    "body": "### Describe the bug\n\nThe huggingface dataset library specifically looks for \u2018.py\u2019 file while loading the dataset using loading script approach and it does not work with \u2018.pyc\u2019 file.\r\nWhile deploying in production, it becomes an issue when we are restricted to use only .pyc files. Is there any work around for this ?\n\n### Steps to reproduce the bug\n\n1. Create a dataset  loading script to read the custom data.\r\n2. compile the code to make sure that .pyc file is created \r\n3. Delete the loading script and re-run the code. Usually, python should make use of complied .pyc files. However, in this case, the dataset library errors out with the message that it's unable to find the data loader loading script.\n\n### Expected behavior\n\nThe code should make use of .pyc file and run without any error.\n\n### Environment info\n\nNA",
    "url": "https://github.com/huggingface/datasets/issues/6193",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-29T19:35:06Z",
    "updated_at": "2023-08-31T19:47:29Z",
    "comments": 3,
    "user": "riteshkumarumassedu"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 270,
    "title": "[Question] How to stop warning log",
    "body": "I am using NodeJS to serve a translation model.\r\nThere are so many warning log when translation processing. How to stop this?\r\n`2023-08-29 23:04:32.061 node[3167:31841] 2023-08-29 23:04:32.061977 [W:onnxruntime:, graph.cc:3490 CleanUnusedInitializersAndNodeArgs] Removing initializer '/model/decoder/layers.2/encoder_attn_layer_norm/Constant_output_0'. It is not used by any node and should be removed from the model.\r\n2023-08-29 23:04:32.061 node[3167:31841] 2023-08-29 23:04:32.061987 [W:onnxruntime:, graph.cc:3490 CleanUnusedInitializersAndNodeArgs] Removing initializer '/model/decoder/layers.0/encoder_attn_layer_norm/Constant_output_0'. It is not used by any node and should be removed from the model.\r\n2023-08-29 23:04:32.062 node[3167:31841] 2023-08-29 23:04:32.061997 [W:onnxruntime:, graph.cc:3490 CleanUnusedInitializersAndNodeArgs] Removing initializer '/model/decoder/layers.4/self_attn_layer_norm/Constant_1_output_0'. It is not used by any node and should be removed from the model.`",
    "url": "https://github.com/huggingface/transformers.js/issues/270",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-29T16:08:41Z",
    "updated_at": "2025-08-02T15:48:45Z",
    "user": "tuannguyen90"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 420,
    "title": "Error: ENOSPC: System limit for number of file watchers reached",
    "body": "Error: ENOSPC: System limit for number of file watchers reached, watch '/home/alvyn/chat-ui/vite.config.ts'\r\n    at FSWatcher.<computed> (node:internal/fs/watchers:247:19)\r\n    at Object.watch (node:fs:2418:34)\r\n    at createFsWatchInstance (file:///home/alvyn/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:50470:17)\r\n    at setFsWatchListener (file:///home/alvyn/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:50517:15)\r\n    at NodeFsHandler._watchWithNodeFs (file:///home/alvyn/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:50672:14)\r\n    at NodeFsHandler._handleFile (file:///home/alvyn/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:50736:23)\r\n    at NodeFsHandler._addToNodeFs (file:///home/alvyn/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:50978:21)\r\n    at async file:///home/alvyn/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:51973:21\r\n    at async Promise.all (index 1)\r\nEmitted 'error' event on FSWatcher instance at:\r\n    at FSWatcher._handleError (file:///home/alvyn/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:52169:10)\r\n    at NodeFsHandler._addToNodeFs (file:///home/alvyn/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:50986:18)\r\n    at async file:///home/alvyn/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:51973:21\r\n    at async Promise.all (index 1) {\r\n  errno: -28,\r\n  syscall: 'watch',\r\n  code: 'ENOSPC',\r\n  path: '/home/alvyn/chat-ui/vite.config.ts',\r\n  filename: '/home/alvyn/chat-ui/vite.config.ts'\r\n}\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/420",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-08-29T14:54:49Z",
    "updated_at": "2023-09-20T15:11:26Z",
    "comments": 2,
    "user": "alvynabranches"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 268,
    "title": "[Question] Chunks from transcription always empty text",
    "body": "This example works fine: \r\n![image](https://github.com/xenova/transformers.js/assets/216566/970c3828-8fbf-4539-843d-a96554c72f4b)\r\n\r\nBut ATM I am sending Float32 to the worker here (i also confirm the audio is valid by playing it back)\r\nhttps://github.com/quantuminformation/coherency/blob/main/components/audio-recorder.js#L104\r\n\r\nBut after transcribing here:\r\nhttps://github.com/quantuminformation/coherency/blob/main/worker.js#L140\r\n\r\nmy chunks only contain `\"\"`\r\n\r\n![image](https://github.com/xenova/transformers.js/assets/216566/04588e73-2ee5-4f39-a145-f4e87c392ba1)\r\n\r\n![image](https://github.com/xenova/transformers.js/assets/216566/febe2809-0fa7-4e21-8b71-d5724a391644)\r\n\r\nany ideas where my setup is going wrong?\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/268",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-29T13:49:00Z",
    "updated_at": "2023-11-04T19:48:30Z",
    "user": "quantuminformation"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4831,
    "title": "How to preview the image during generation,any demo for gradio?",
    "body": "How to preview the image during generation,any demo for gradio?",
    "url": "https://github.com/huggingface/diffusers/issues/4831",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-29T13:32:07Z",
    "updated_at": "2023-08-30T15:31:31Z",
    "user": "wodsoe"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 267,
    "title": "[Question] multilingual-e5-* models don't work with pipeline",
    "body": "I just noticed that the `Xenova/multilingual-e5-*` model family doesn't work in the transformers.js pipeline for feature-extraction with your (@xenova) onnx versions on HF.\r\n\r\nMy code throws an error.\r\n\r\n```Javascript\r\nimport { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.5.4';\r\n\r\nasync function allocatePipeline() {\r\n  let pipe = await pipeline(\"feature-extraction\", \"Xenova/multilingual-e5-small\");\r\n  let out = await pipe(\"I love transformers\", { pooling: 'mean', normalize: false });\r\n\r\n  document.getElementById(\"output\").innerHTML = out.data;\r\n}\r\n\r\nallocatePipeline();\r\n```\r\n\r\nLive example [here](https://geo.rocks/minimal-transformersjs-example-gte).\r\n\r\n```\r\nUncaught (in promise) Error: An error occurred during model execution: \"Missing the following inputs: token_type_ids.\r\n    at transformers@2.5.4:70:5612\r\n    at y (transformers@2.5.4:70:5971)\r\n    at M (transformers@2.5.4:70:8450)\r\n    at transformers@2.5.4:70:10792\r\n    at Function.forward (transformers@2.5.4:70:10799)\r\n    at Function._call (transformers@2.5.4:70:10675)\r\n    at Function.e [as model] (transformers@2.5.4:88:508)\r\n    at Function._call (transformers@2.5.4:73:1424)\r\n    at Function._call (transformers@2.5.4:73:6152)\r\n    at e (transformers@2.5.4:88:508)\r\n```\r\n\r\nHowever, HF user Supabase converted the models differently so that they are actually usable with the pipeline, e.g. [gte-small](https://huggingface.co/Supabase/gte-small#javascript). I noticed that Supabase added the vocab.txt file - is it possible that this or other files are missing in your versions or is there a more complex reason for this?\r\n\r\nI'm pretty interested in the gte family as they are the most performant small models currently available (according to the MTEB leaderboard).",
    "url": "https://github.com/huggingface/transformers.js/issues/267",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-29T12:39:26Z",
    "updated_at": "2023-08-30T12:05:02Z",
    "user": "do-me"
  },
  {
    "repo": "pytorch/xla",
    "number": 5510,
    "title": "Kaggle Pytorch/XLA notebooks. How to import torch_xla?",
    "body": "I tried to use Kaggle [Pytorch/XLA notebooks](https://www.kaggle.com/code/aivovarov/pytorch-xla-2-0-on-kaggle/edit) with \"Pin to original env\" and \"Always use the latest env\" (in notebook options).\r\n- pin to original env (2023-04-04_ uses python 3.7 , pytorch 1.13.0-cpu \r\n- the latest env uses python 3.10, pytorch 2.0.0-cpu\r\n\r\nBoth envs do not have torch_xla package .\r\n\r\nI tried to download [torch_xla-nightly wheel](https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-nightly-cp310-cp310-linux_x86_64.whl) but got error `wget: unable to resolve host address \u2018storage.googleapis.com\u2019`\r\n\r\nDo we have any proven solution on how to use Pytorch/XLA with Kaggle?",
    "url": "https://github.com/pytorch/xla/issues/5510",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-28T20:15:19Z",
    "updated_at": "2025-04-29T13:52:29Z",
    "user": "apivovarov"
  },
  {
    "repo": "huggingface/transformers",
    "number": 25803,
    "title": "[Model] How to evaluate Idefics Model's ability with in context examples?",
    "body": "Hi the recent release of Idefics-9/80B-Instruct model is superbly promising! \r\n\r\nWe would like to evaluate them on a customized benchmarks with in context examples. May I ask how should I arrange the prompt template, especially for `instruct` version? \r\n\r\nWe had some problems previously when evaluating the model on single images, the model will ramble and wont stop, but managed to resolve them somehow.\r\n\r\nFor single image we use the template to evaluate instruct version model.\r\n```\r\nUser:<fake_token_around_image><image><fake_token_around_image>{prompt} Assistant:\r\n```\r\n\r\nWould it be perfectly correct (matching your training template?) or do you have better recommendation. Sorry we have a customized pipeline so it's not easy to adopt your designed `IdeficsProcessor`. \ud83d\ude2d\r\n\r\nAlso we migrate the code on `image_attention_mask` with \r\n```\r\n# supporting idefics processing\r\ndef get_formatted_prompt(prompt: str=\"\", in_context_prompts: list = []) -> str:\r\n    # prompts = [\r\n    #         \"User:\",\r\n    #         \"https://hips.hearstapps.com/hmg-prod/images/cute-photos-of-cats-in-grass-1593184777.jpg\",\r\n    #         \"Describe this image.\\nAssistant: An image of two kittens in grass.\\n\",\r\n    #         \"User:\",\r\n    #         \"http://images.cocodataset.org/train2017/000000190081.jpg\",\r\n    #         \"Describe this image.\\nAssistant:\",\r\n    #     ]\r\n    # prompts = f\"User:<fake_token_around_image><image><fake_token_around_image>{prompt} Assistant:<answer>\"\r\n    prompts = f\"User:<fake_token_around_image><image><fake_token_around_image>{prompt} Assistant:\"\r\n    return prompts\r\n\r\ndef get_image_attention_mask(output_input_ids, max_num_images, tokenizer, include_image=True):\r\n    # image_attention_mask, _ = image_attention_mask_for_packed_input_ids(output_input_ids, tokenizer)\r\n    # image_attention_mask = incremental_to_binary_attention_mask(image_attention_mask, num_classes=max_num_images)\r\n    if include_image:\r\n        image_attention_mask, _ = image_attention_mask_for_packed_input_ids(output_input_ids, tokenizer)\r\n        image_attention_mask = incremental_to_binary_attention_mask(\r\n            image_attention_mask, num_classes=max_num_images\r\n        )\r\n    else:\r\n        # in full language mode we set the image mask to all-0s\r\n        image_attention_mask = torch.zeros(\r\n            output_input_ids.shape[0], output_input_ids.shape[1], 1, dtype=torch.bool\r\n        )\r\n    return image_attention_mask\r\n\r\nlang_x = self.tokenizer(\r\n    [\r\n        get_formatted_prompt(question, []),\r\n    ],\r\n    return_tensors=\"pt\",\r\n)\r\nimage_attention_mask = get_image_attention_mask(lang_x['input_ids'], 1, self.tokenizer)\r\n```\r\n\r\nI have read all related blogs and docs but still got confused about the usage of `<end_of_utterance>`. Is it used to break the in context examples with query example? \r\n\r\nMy guess is\r\n```\r\nUser:<fake_token_around_image><image><fake_token_around_image>{in_context_prompt} Assistant: {in_context_answer} <end_of_utterance> User:<fake_token_around_image><image><fake_token_around_image>{prompt} Assistant:\r\n```\r\n\r\nBesides, very curious that the model would generate the normal `<end_of_utterance>` at the last of sentence instead of normal llama's `<|endofchunk|>`?\r\n\r\n",
    "url": "https://github.com/huggingface/transformers/issues/25803",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-28T19:39:02Z",
    "updated_at": "2023-10-11T08:06:48Z",
    "user": "Luodian"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 417,
    "title": "CodeLlama Instruct Configuration",
    "body": "Hello Guys, \r\n\r\nCould you guide me in the right direction to get the configuration of the Code Llama Instruct model right? \r\n\r\nI have this config so far: \r\n\r\n```\r\n {\r\n    \"name\": \"Code Llama\",\r\n    \"endpoints\": [{\"url\": \"http://127.0.0.1:8080\"}],\r\n    \"description\": \"Programming Assistant\",\r\n    \"userMessageToken\": \"[INST]\",\r\n   \r\n    \"assistantMessageToken\": \"[/INST]\",\r\n\r\n    \"parameters\": {\r\n      \"temperature\": 0.9,\r\n      \"top_p\": 0.95,\r\n      \"repetition_penalty\": 1.2,\r\n      \"top_k\": 50,\r\n      \"truncate\": 1000,\r\n      \"max_new_tokens\": 1048\r\n  }\r\n  }\r\n```\r\n\r\nThe model starts with the \"right\" output, but then it produces garbage. \r\n\r\nI am running the TGI backend. \r\n\r\nThx!",
    "url": "https://github.com/huggingface/chat-ui/issues/417",
    "state": "open",
    "labels": [
      "support",
      "models"
    ],
    "created_at": "2023-08-28T13:42:09Z",
    "updated_at": "2023-09-13T18:17:50Z",
    "comments": 9,
    "user": "schauppi"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 265,
    "title": "Unexpected token",
    "body": "I added this code to my React project. \r\n\r\n```\r\nimport { pipeline } from \"@xenova/transformers\";\r\n\r\nasync function sentimentAnalysis() {\r\n  // Allocate a pipeline for sentiment-analysis\r\n  let pipe = await pipeline(\"sentiment-analysis\");\r\n  let out = await pipe(\"I love transformers!\");\r\n  console.log(out);\r\n}\r\n\r\nsentimentAnalysis();\r\n```\r\nI am surprised the docs don't tell me to download a model, so I think this code will auto-download it... anyway I get this issue...\r\n./node_modules/@xenova/transformers/src/env.js 38:84\r\nModule parse failed: Unexpected token (38:84)\r\nFile was processed with these loaders:\r\n * ./node_modules/babel-loader/lib/index.js\r\nYou may need an additional loader to handle the result of these loaders.\r\n| \r\n| var RUNNING_LOCALLY = FS_AVAILABLE && PATH_AVAILABLE;\r\n> var __dirname = RUNNING_LOCALLY ? path.dirname(path.dirname(url.fileURLToPath(import.meta.url))) : './';\r\n| \r\n| // Only used for environments with access to file system\r\n\r\n\r\nSeems like I need access to the filesystem... but that can't be right because this runs in the browser ... ?",
    "url": "https://github.com/huggingface/transformers.js/issues/265",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-28T13:34:42Z",
    "updated_at": "2023-08-28T16:00:10Z",
    "user": "patrickinminneapolis"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4814,
    "title": "How to add more weight to the text prompt in ControlNet?",
    "body": "Hi,\r\n\r\nI want to know if there is a quick way of adding more weight to the text prompt in ControlNet during inference.\r\nIf so, which parameter needs to be changed? \r\n\r\nThanks,",
    "url": "https://github.com/huggingface/diffusers/issues/4814",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-08-28T13:05:16Z",
    "updated_at": "2023-10-30T15:07:45Z",
    "user": "miquel-espinosa"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 239,
    "title": "how to start without \" pip install autotrain-advanced\"",
    "body": "Dear, \r\n\r\nThanks for your work.\r\n\r\nAfter installing through `pip`, running\r\n\r\n**`autotrain llm --train --project_name my-llm --model luodian/llama-7b-hf --data_path . --use_peft --use_int4 --learning_rate 2e-4 --train_batch_size 12 --num_train_epochs 3 --trainer sft`**\r\n\r\ncan achieve fine-tuning on your own data. \r\n\r\nIf I want to run the project from source code for fine-tuning, which function should I start from?\r\nThat is, from which function do the `autotrain` and `llm` parameters come from? \r\n\r\nBest,\r\n",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/239",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-28T10:02:37Z",
    "updated_at": "2023-12-18T15:30:42Z",
    "user": "RedBlack888"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6186,
    "title": "Feature request: add code example of multi-GPU processing",
    "body": "### Feature request\r\n\r\nWould be great to add a code example of how to do multi-GPU processing with \ud83e\udd17 Datasets in the documentation. cc @stevhliu\r\n\r\nCurrently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying \"your big GPU call goes here\", however it didn't work for me out-of-the-box.\r\n\r\nLet's say you have a PyTorch model that can do translation, and you have multiple GPUs. In that case, you'd like to duplicate the model on each GPU, each processing (translating) a chunk of the data in parallel.\r\n\r\nHere's how I tried to do that:\r\n\r\n```\r\nfrom datasets import load_dataset\r\nfrom transformers import AutoModelForSeq2SeqLM, AutoTokenizer\r\nfrom multiprocess import set_start_method\r\nimport torch\r\nimport os\r\n\r\ndataset = load_dataset(\"mlfoundations/datacomp_small\")\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(\"facebook/nllb-200-distilled-600M\")\r\nmodel = AutoModelForSeq2SeqLM.from_pretrained(\"facebook/nllb-200-distilled-600M\")\r\n\r\n# put model on each available GPU\r\n# also, should I do it like this or use nn.DataParallel?\r\nmodel.to(\"cuda:0\")\r\nmodel.to(\"cuda:1\")\r\n\r\nset_start_method(\"spawn\")\r\n\r\ndef translate_captions(batch, rank):\r\n    os.environ[\"CUDA_VISIBLE_DEVICES\"] = str(rank % torch.cuda.device_count())\r\n    \r\n    texts = batch[\"text\"]\r\n    inputs = tokenizer(texts, padding=True, truncation=True, return_tensors=\"pt\").to(model.device)\r\n\r\n    translated_tokens = model.generate(\r\n        **inputs, forced_bos_token_id=tokenizer.lang_code_to_id[\"eng_Latn\"], max_length=30\r\n    )\r\n    translated_texts = tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)\r\n\r\n    batch[\"translated_text\"] = translated_texts\r\n    \r\n    return batch\r\n\r\nupdated_dataset = dataset.map(translate_captions, with_rank=True, num_proc=2, batched=True, batch_size=256)\r\n```\r\n\r\nI've personally tried running this script on a machine with 2 A100 GPUs.\r\n\r\n## Error 1\r\n\r\nRunning the code snippet above from the terminal (python script.py) resulted in the following error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/site-packages/multiprocess/spawn.py\", line 116, in spawn_main\r\n    exitcode = _main(fd, parent_sentinel)\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/site-packages/multiprocess/spawn.py\", line 125, in _main\r\n    prepare(preparation_data)\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/site-packages/multiprocess/spawn.py\", line 236, in prepare\r\n    _fixup_main_from_path(data['init_main_from_path'])\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/site-packages/multiprocess/spawn.py\", line 287, in _fixup_main_from_path\r\n    main_content = runpy.run_path(main_path,\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/runpy.py\", line 289, in run_path\r\n    return _run_module_code(code, init_globals, run_name,\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/runpy.py\", line 96, in _run_module_code\r\n    _run_code(code, mod_globals, init_globals,\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/runpy.py\", line 86, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/home/niels/python_projects/datacomp/datasets_multi_gpu.py\", line 16, in <module>\r\n    set_start_method(\"spawn\")\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/site-packages/multiprocess/context.py\", line 247, in set_start_method\r\n    raise RuntimeError('context has already been set')\r\nRuntimeError: context has already been set\r\n```\r\n\r\n## Error 2\r\nThen, based on [this Stackoverflow answer](https://stackoverflow.com/a/71616344/7762882), I put the `set_start_method(\"spawn\")` section in a try: catch block. This resulted in the following error:\r\n```\r\nFile \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/site-packages/datasets/dataset_dict.py\", line 817, in <dictcomp>\r\n    k: dataset.map(\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/site-packages/datasets/arrow_dataset.py\", line 2926, in map\r\n    with Pool(nb_of_missing_shards, initargs=initargs, initializer=initializer) as pool:\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/site-packages/multiprocess/context.py\", line 119, in Pool\r\n    return Pool(processes, initializer, initargs, maxtasksperchild,\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/site-packages/multiprocess/pool.py\", line 215, in __init__\r\n    self._repopulate_pool()\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/site-packages/multiprocess/pool.py\", line 306, in _repopulate_pool\r\n    return self._repopulate_pool_static(self._ctx, self.Process,\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/site-packages/multiprocess/pool.py\", line 329, in _repopulate_pool_static\r\n    w.start()\r\n  File \"/home/niels/anaconda3/envs/datacomp/lib/python3.10/site-packages/multiprocess/process.py\", line 121, in start\r\n    self._popen = self._Popen(self)\r\n  File \"/home/niels/anaconda3/envs/datacomp/l",
    "url": "https://github.com/huggingface/datasets/issues/6186",
    "state": "closed",
    "labels": [
      "documentation",
      "enhancement"
    ],
    "created_at": "2023-08-28T10:00:59Z",
    "updated_at": "2024-10-07T09:39:51Z",
    "comments": 18,
    "user": "NielsRogge"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 238,
    "title": "How to Train Consecutively Using Checkpoints",
    "body": "Hi, I've been using your project and it's been great.\r\nI'm a complete beginner in the field of AI, so sorry for such a basic question.\r\nIs there a way to train consecutively with checkpoints?\r\n\r\nThank you!\r\n",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/238",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-28T08:31:30Z",
    "updated_at": "2023-12-18T15:30:42Z",
    "user": "YOUNGASUNG"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 264,
    "title": "[Question] TypeScript rewrite",
    "body": "<!-- QUESTION GOES HERE -->\r\nHi Joshua. I found your idea is extremely exciting.\r\nI am a frontend developer who has worked on TypeScript professionally for three years. Would you mind me doing a TypeScript re-write, so this npm package can have a better DX. If I successfully transform the codebase into TypeScript and pass all the tests, would you mind merging it into main?\r\n\r\nI just forked this repo. https://github.com/Lantianyou/transformers.js",
    "url": "https://github.com/huggingface/transformers.js/issues/264",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-28T08:29:06Z",
    "updated_at": "2024-04-27T12:05:24Z",
    "user": "Lantianyou"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 934,
    "title": "How to use fine tune model in text-generation-inference",
    "body": "Hi Team\r\nI fine tune the llama 2 13b model and using merge_and_upload() functionality, I merge the model.\r\nHow I can use this merge model using text-generation-inference.\r\n\r\n**Following command given an error**\r\n![image](https://github.com/huggingface/text-generation-inference/assets/7765864/22e51673-4a4f-47ba-9b06-158ec7812951)\r\n**Error**\r\n![image](https://github.com/huggingface/text-generation-inference/assets/7765864/00f219ea-0483-4496-af11-9ce9d949a7d2)\r\n",
    "url": "https://github.com/huggingface/text-generation-inference/issues/934",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-28T07:36:25Z",
    "updated_at": "2023-08-28T08:53:28Z",
    "user": "chintanshrinath"
  },
  {
    "repo": "huggingface/peft",
    "number": 869,
    "title": "How to correctly use Prefixing Tuning?",
    "body": "### System Info\r\n\r\npeft 0.5.0\r\ntransformers 4.32.0\r\n\r\n### Who can help?\r\n\r\n_No response_\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\n```\r\nmodel = AutoModelForSeq2SeqLM.from_pretrained('bigscience/T0pp', load_in_8bit=True)\r\nmodel = prepare_model_for_int8_training(model)\r\nconfig = PrefixTuningConfig(\r\n    task_type=TaskType.SEQ_2_SEQ_LM,\r\n    num_virtual_tokens=100,\r\n    token_dim=model.config.hidden_size,\r\n    num_transformer_submodules=1,\r\n    num_attention_heads=model.config.num_heads,\r\n    num_layers=model.config.num_layers,\r\n    encoder_hidden_size=1792,\r\n)\r\nmodel = get_peft_model(model, config)\r\n```\r\n\r\n### Expected behavior\r\n\r\nI'm assuming `num_layers`, `num_attention_heads`, and `token_dim` need to match the base model. In the sample `num_transformer_submodules` is 1. But encoder-decoder has two transformers right? Should this be 2? \r\n\r\n\r\nWhen I run the code above I got\r\n\r\n```\r\nFile \"/python3.10/site-packages/transformers/models/t5/modeling_t5.py\", line 551, in forward\r\nposition_bias = position_bias + mask  # (batch_size, n_heads, seq_length, key_length)\r\nRuntimeError: The size of tensor a (3) must match the size of tensor b (103) at non-singleton dimension 3\r\n```\r\nWhen I print out the shape of `position_bias` and `mask`. `mask` has 100 more tokens than `position_bias` seems like on the decoder side. It's also taking in the prefix embeddings",
    "url": "https://github.com/huggingface/peft/issues/869",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-27T18:03:06Z",
    "updated_at": "2024-11-05T09:49:01Z",
    "user": "Vincent-Li-9701"
  },
  {
    "repo": "huggingface/transformers",
    "number": 25783,
    "title": "How to re-tokenize the training set in each epoch?",
    "body": "I have a special tokenizer which can tokenize the sentence based on some propability distribution.\r\nFor example, 'I like green apple' ->'[I],[like],[green],[apple]'(30%) or '[I],[like],[green apple]' (70%).\r\nNow in the training part, I want the Trainer can retokenize the dataset in each epoch. How can I do so?",
    "url": "https://github.com/huggingface/transformers/issues/25783",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-27T16:23:25Z",
    "updated_at": "2023-09-01T13:01:43Z",
    "user": "tic-top"
  },
  {
    "repo": "pytorch/rl",
    "number": 1473,
    "title": "[Feature Request] How to create a compound actor?",
    "body": "## Motivation\r\n\r\nI created an environment with a compound action space: a list of continuous values (robot joint angles) and a boolean value (suction gripper on or off).\r\n\r\nIn [the PPO tutorial](https://pytorch.org/rl/tutorials/coding_ppo.html) the policy_module is a ProbabilisticActor which takes \"loc\" and \"scale\" inputs. I want to make an actor which is a combination of this (for the joint angles) and something else that uses a Bernoulli distribution to generate boolean action values for the gripper.\r\n\r\nIt kind of looks like this may already be supported by using a TensorDictSequential, but it's not clear how that would work.\r\n\r\n## Solution\r\n\r\nI would like to see an example in the docs of a compound action space like this.\r\n\r\n## Alternatives\r\n\r\nMaybe there's another way where one actor is created for each type of action space? Then how to combine them for use with a DataCollector?\r\n\r\n## Additional context\r\n\r\nThe environment is a robot arm manipulation scenario using box2d.\r\n\r\n## Checklist\r\n\r\n- [x] I have checked that there is no similar issue in the repo (**required**)\r\n",
    "url": "https://github.com/pytorch/rl/issues/1473",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-08-27T15:49:38Z",
    "updated_at": "2023-11-03T17:54:54Z",
    "user": "hersh"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1318,
    "title": "Is it possible to compile pipeline (with tokenizer) to ONNX Runtime?",
    "body": "### Feature request\n\nIs it possible to compile the entire pipeline, tokenizer and transformer, to run with ONNX Runtime? My goal is to remove the `transformers` dependency entirely for runtime, to reduce serverless cold start.\n\n### Motivation\n\nI could not find any examples, and could not make this work, so I wonder if compiling tokenizer with ONNX is possible at all.\n\n### Your contribution\n\nI could try implementing this, or add an example to documentation if this is possible already.",
    "url": "https://github.com/huggingface/optimum/issues/1318",
    "state": "open",
    "labels": [
      "feature-request",
      "onnxruntime"
    ],
    "created_at": "2023-08-26T17:57:52Z",
    "updated_at": "2023-08-28T07:58:13Z",
    "comments": 1,
    "user": "j-adamczyk"
  },
  {
    "repo": "huggingface/trl",
    "number": 695,
    "title": "Reward is getting lower and lower with each epoch, What can be the issue in training?",
    "body": "Hello,\r\n\r\nI am trying to optimize a T5 fine-tuned model for text generation task. At the moment, I am using BLEU score (between two texts) as a reward function. Before the optimization with PPO, model is able to produce an average BLEU score of 35% however with ppo, after each epoch, the reward is reducing so far. What is something I am doing wrong or should look into as I am new to RL? as the goal of PPO is to improve the reward or atleast make it more than the original bleu score of 35% that we got before model was optimized with PPO. \r\nthis is my code:\r\n\r\n\r\n\r\n```from transformers import  AutoModelForSeq2SeqLM\r\n#loading the fine-tuned model\r\nactive_model=AutoModelForSeq2SeqLMWithValueHead.from_pretrained('small_gen_clean_prem/')\r\nref_model = AutoModelForSeq2SeqLMWithValueHead.from_pretrained('small_gen_clean_prem/')\r\n\r\nbatch_size = 200\r\nconfig = PPOConfig(\r\n    batch_size=batch_size,\r\n    learning_rate=1.41e-5,\r\n    mini_batch_size=16,\r\n    gradient_accumulation_steps=1 #if I set to more than 1, I get empty tensors error\r\n)\r\n\r\nppo_trainer = PPOTrainer(config, active_model, ref_model, tokenizer)\r\n\r\n\r\ngeneration_kwargs = {\r\n    \"min_length\": -1,\r\n    \"top_k\": 0.0,\r\n    \"top_p\": 1.0,\r\n    \"do_sample\": True,\r\n    \"pad_token_id\": tokenizer.eos_token_id\r\n}\r\n\r\n\r\noutput_min_length = 4\r\noutput_max_length = 512\r\noutput_length_sampler = LengthSampler(output_min_length, output_max_length)`\r\n\r\n\r\nscore_all=[]\r\nfor i in range(20):\r\n        input_tensors=[]\r\n        output_tensors=[]\r\n        score_=[]\r\n        for data in valid_dataset:\r\n                query_txt =data['input']\r\n                query_tensor = tokenizer.encode(query_txt, return_tensors=\"pt\").to(device)\r\n                input_tensors.append(query_tensor.squeeze(0))\r\n                desired_txt = data['ground_truth']\r\n                print('desired text\\n:',desired_txt)\r\n                response_tensor = ppo_trainer.generate([item for item in query_tensor], return_prompt=False,length_sampler=output_length_sampler, **generation_kwargs)\r\n                response_txt = tokenizer.decode(response_tensor[0], skip_special_tokens=True, max_new_tokens=512)\r\n                output_tensors.append(response_tensor[0].squeeze(0))\r\n              \r\n\r\n\r\n                score = sentence_bleu([response_txt.split(),desired_txt.split()])\r\n                score_.append(score)\r\n\r\n        reward = [torch.FloatTensor([score]) for score in score_]\r\n\r\n\r\n        score_all.append(np.mean(score_))\r\n    \r\n        \r\n        train_stats = ppo_trainer.step(input_tensors,output_tensors,reward)\r\n```\r\nIn the graph attached, y-axis is average mean score in each epoch.\r\n\r\n<img width=\"377\" alt=\"scores_ppo\" src=\"https://github.com/huggingface/trl/assets/25576435/a07c26d9-46a8-432e-bf07-60eaaa0aeedc\">\r\n",
    "url": "https://github.com/huggingface/trl/issues/695",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-26T00:22:04Z",
    "updated_at": "2023-11-01T15:06:14Z",
    "user": "sakinafatima"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1733,
    "title": "Add API fuzzer to the tests?",
    "body": "Tools exist, see https://openapi.tools/",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1733",
    "state": "closed",
    "labels": [
      "question",
      "tests"
    ],
    "created_at": "2023-08-25T21:44:10Z",
    "updated_at": "2023-10-04T15:04:16Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4778,
    "title": "[Discussion] How to allow for more dynamic prompt_embed scaling/weighting/fusion?",
    "body": "We have a couple of issues and requests for the community that ask for the possibility to **dynamically** change certain knobs of Stable Diffusion that are applied at **every denoising step**. \r\n\r\n- 1. **Prompt Fusion**. as stated [here](https://github.com/huggingface/diffusers/issues/4496). To implement prompt fusion in a general way we need to give the user the possibility to define some kind of \"prompt\" scheduler where every denoising timestep can receive a different `prompt_embeds` and `negative_prompt_embeds`. \r\n\r\n=> A very obvious way to allow for this would be to allow passing a list of list of prompts and list of list of `prompt_embeddings`\r\n\r\n- 2. **Dynamic prompt weighting**. A1111 and InvokeAI both have functionalities that allow to weight the prompt embeddings differently at each timestep. InvokeAI has this implemented in `compel` via a `conditioning_scheduler` see here: https://github.com/damian0815/compel/blob/d15e883bbbfae5b3fbd8d60065aa330c99a662b4/src/compel/compel.py#L93 \r\nSuch a scheduler could for example allow the user to not just define a unique `prompt_embedding` condition (e.g. putting more word on a certain word), but also allowing to dynamically change that condition during the course of denoising.\r\nThis is also asked by SD.Next (cc @vladmandic).\r\n\r\n=> Here we have a couple of options, the simplest is probably to just allow passing a list of `prompt_embeddings` assuming that the user just takes care of the prompt weighting themselves. We could then also nicely integrate this with `compel`.\r\n\r\n- 3. **Dynamic `guidance_scale` / `cfg` weighting**. Many people have found that a `cfg` scheduling works really well for `SDXL`. It's related to 2. as it's also a knob to tweak text embeddings weights over the course of inference but it's much more global where as 2. is can be more condition specific. This is also related to https://github.com/huggingface/diffusers/pull/4569#issuecomment-1678667625 which proposes dynamic scaling.\r\n\r\n=> Here we could solve this by allowing the user to provide a list of `guidance_scales`. In addition we could maybe introduce something like `guidance_scaling_type=\"static/dynamic\" to allow for #4569 \r\n\r\n**Overall**:\r\n\r\n=> It's not too difficult to make these features work, but it'll require some very good docs about `prompt_embeds` and `negative_prompt_embeds`. We also have to think about edge cases like SDXL which has two text encoders. We also have to think about how this can be applied to other models such as Kandinsky, IF.\r\n\r\nCurios to hear your thoughts here. Also would love to discuss a design proposal of how we can better support things in a coherent, library-wide design @sayakpaul @williamberman @yiyixuxu @DN6 ",
    "url": "https://github.com/huggingface/diffusers/issues/4778",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-08-25T10:03:17Z",
    "updated_at": "2023-11-09T21:42:39Z",
    "user": "patrickvonplaten"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 260,
    "title": "[Question] CDN download for use in a worker",
    "body": "Is there a way to get this to work inside a worker:\r\n```html\r\n<script type=\"module\">\r\n    import { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.5.3';\r\n</script>\r\n```\r\nI noticed you do this: \r\n```js\r\nimport { pipeline, env } from \"@xenova/transformers\";\r\n```\r\n\r\n\r\nI'm trying to avoid any node modules for this project I am on",
    "url": "https://github.com/huggingface/transformers.js/issues/260",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-24T18:24:51Z",
    "updated_at": "2023-08-29T13:57:19Z",
    "user": "quantuminformation"
  },
  {
    "repo": "huggingface/notebooks",
    "number": 428,
    "title": "How to load idefics fine tune model for inference?",
    "body": "Hi, recently I fine tune idefics model with peft. I am not able to load the model. \r\nIs there any way to load the model with peft back for inference? ",
    "url": "https://github.com/huggingface/notebooks/issues/428",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-24T13:39:22Z",
    "updated_at": "2024-04-25T10:39:55Z",
    "user": "imrankh46"
  },
  {
    "repo": "huggingface/peft",
    "number": 857,
    "title": "How to load fine tune IDEFICS model with peft for inference?",
    "body": "### Feature request\r\n\r\nRequest for IDEFICS model. \r\n\r\n### Motivation\r\n\r\nI fine tune IDEFICS on custom dataset, but when I load they showing error.\r\n\r\n\r\n### Your contribution\r\n\r\nAdd class like AutoPeftModelforVisionTextToText() class, to easily load the model.",
    "url": "https://github.com/huggingface/peft/issues/857",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-24T12:34:44Z",
    "updated_at": "2023-09-01T15:46:50Z",
    "user": "imrankh46"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6176,
    "title": "how to limit the size of memory mapped file?",
    "body": "### Describe the bug\n\nHuggingface datasets use memory-mapped file to map large datasets in memory for fast access.\r\nHowever, it seems like huggingface will occupy all the memory for memory-mapped files, which makes a troublesome situation since we cluster will distribute a small portion of memory to me (once it's over the limit, memory cannot be allocated), however, when the dataset checks the total memory, all of the memory will be taken into account which makes huggingface dataset try to allocate more memory than allowed. \r\nSo is there a way to explicitly limit the size of memory mapped file?\n\n### Steps to reproduce the bug\n\npython\r\n>>> from datasets import load_dataset\r\n>>> dataset = load_dataset(\"c4\", \"en\", streaming=True)\n\n### Expected behavior\n\nIn a normal environment, this will not have any problem.\r\nHowever, when the system allocates a portion of the memory to the program and when the dataset checks the total memory, all of the memory will be taken into account which makes huggingface dataset try to allocate more memory than allowed. \n\n### Environment info\n\nlinux cluster with SGE\uff08Sun Grid Engine\uff09",
    "url": "https://github.com/huggingface/datasets/issues/6176",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-24T05:33:45Z",
    "updated_at": "2023-10-11T06:00:10Z",
    "user": "williamium3000"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 225,
    "title": "How to make inference the model",
    "body": "When I launch \r\n**autotrain llm --train --project_name my-llm --model meta-llama/Llama-2-7b-hf --data_path . --use_peft --use_int4 --learning_rate 2e-4 --train_batch_size 2 --num_train_epochs 3 --trainer sft**\r\n\r\nI have this output\r\n![autoTrainDoubt](https://github.com/huggingface/autotrain-advanced/assets/30750249/ac813d13-d4a4-43f4-901a-372fdaec045b)\r\n\r\n**I have two questions.**\r\n**1.-** The output is telling that the training is finished, however I only watch the log of 1 epoch. **Is there any way to see the 'training loss' param of the 3 epochs**.\r\n\r\n**2.-** After training, I try to make inferece with Text-generation-Inference HF application. However I have an error because config.json is not in the model folder. The output model is this. **Why is not present this file? Should I do something more?**.\r\n\r\n![autoTrainDoubt1](https://github.com/huggingface/autotrain-advanced/assets/30750249/2af0d7fe-526c-4646-aa64-9adf6d70632f)\r\n\r\n",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/225",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-23T20:24:23Z",
    "updated_at": "2023-12-18T15:30:40Z",
    "user": "amgomezdev"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 223,
    "title": "How to use captions with Dreambooth?",
    "body": "I'm trying to train an SDXL model with Dreambooth using captions for each image (I have found that this made quite a difference when training for style with the 1.5 model). How can I achieve that using autotrain? If I understand [this line](https://github.com/huggingface/autotrain-advanced/blob/main/src/autotrain/trainers/dreambooth/main.py#L290C13-L290C13) correctly, it will pick it up if it's in the file name, is that right? And if yes, how does it play together with the specified prompt?\r\n",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/223",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-23T15:32:16Z",
    "updated_at": "2023-12-18T15:30:39Z",
    "user": "MaxGfeller"
  },
  {
    "repo": "huggingface/trl",
    "number": 677,
    "title": "how to run reward_trainer.py",
    "body": "ValueError: Some specified arguments are not used by the HfArgumentParser: ['-f', '/Users/samittan/Library/Jupyter/runtime/kernel-32045810-5e16-48f4-8d44-c7a7f975f8a4.json']\r\n\r\n",
    "url": "https://github.com/huggingface/trl/issues/677",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-23T09:39:52Z",
    "updated_at": "2023-11-02T15:05:32Z",
    "user": "samitTAN"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 412,
    "title": "preprompt not being injected for Llama 2",
    "body": "1. When I alter the preprompt for a Llama 2 type model, it appears to have no impact. It's as though the preprompt is not there. Sample config for .env.local:\r\n\r\n```\r\nMODELS=`[\r\n{\r\n        \"name\": \"Trelis/Llama-2-7b-chat-hf-function-calling\",\r\n        \"datasetName\": \"Trelis/function_calling_extended\",\r\n        \"description\": \"function calling Llama-7B-chat\",\r\n        \"websiteUrl\": \"https://research.Trelis.com\",\r\n        \"preprompt\": \"Respond in French to all questions\",\r\n        \"userMessageToken\": \"[INST]\",\r\n        \"assistantMessageToken\": \"[/INST]\",\r\n        \"parameters\": {\r\n                \"temperature\": 0.01,\r\n                \"top_p\": 0.95,\r\n                \"repetition_penalty\": 1.2,\r\n                \"top_k\": 50,\r\n                \"truncate\": 1000,\r\n                \"max_new_tokens\": 1024\r\n        },\r\n        \"endpoints\": [{\r\n                \"url\": \"http://127.0.0.1:8080\"\r\n        }]\r\n}\r\n]`\r\n```\r\n\r\nOther notes:\r\n- The same model responds to changes in system message when run in colab.\r\n\r\n- Here, with chat-ui, I'm running with a tgi server.\r\n\r\n- Llama-chat has weird templating whereby the first system and user have to be wrapped in INST. The best that can be done with the default templating is just to separately wrap the system message and each user input in [INST] and [/INST]. That said, I don't think that deviation should be significant enough to mean that the preprompt is ignored... but maybe it is OR maybe I'm making some other mistake?",
    "url": "https://github.com/huggingface/chat-ui/issues/412",
    "state": "closed",
    "labels": [
      "support",
      "models"
    ],
    "created_at": "2023-08-23T09:15:24Z",
    "updated_at": "2023-09-18T12:48:07Z",
    "comments": 7,
    "user": "RonanKMcGovern"
  },
  {
    "repo": "huggingface/unity-api",
    "number": 15,
    "title": "How to download the model to the local call API",
    "body": "Because my internet connection is not very good, I would like to download the model to my local machine and use the Hugging Face API for calling. How can I achieve this?",
    "url": "https://github.com/huggingface/unity-api/issues/15",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-23T08:08:40Z",
    "updated_at": "2023-11-08T10:26:34Z",
    "user": "haldon98"
  },
  {
    "repo": "huggingface/evaluate",
    "number": 485,
    "title": "How to use `SubTask` with metrics that require valid `config_name`",
    "body": "## Issue \r\n\r\nCurrently I there does not seem to be a way to define the `config_name` for metric for a `SubTask` inside an `evaluate.EvaluationSuite`. \r\n\r\n## Version\r\n\r\nevaluate version: 0.4.0\r\ntransformers version 4.32.0\r\nPython version Python 3.10.6\r\n\r\n## Example\r\n\r\nFor example, consider the following `EvaluationSuite` which tried to run the  \"glue\" metric which requires a `config_name` when calling `evaluate.load`:\r\n\r\nCode in `suite.py`:\r\n```python \r\nimport evaluate\r\nfrom evaluate.evaluation_suite import SubTask\r\nclass Suite(evaluate.EvaluationSuite):\r\n\r\n    def __init__(self, name):\r\n        super().__init__(name)\r\n        self.preprocessor = lambda x: {\"text\": x[\"text\"].lower()}\r\n        self.suite = [\r\n            SubTask(\r\n                task_type=\"text-classification\",\r\n                data=\"glue\",\r\n                subset=\"sst2\",\r\n                split=\"validation[:10]\",\r\n                args_for_task={\r\n                    \"metric\": \"glue\",\r\n                    \"input_column\": \"sentence\",\r\n                    \"label_column\": \"label\",\r\n                    \"label_mapping\": {\r\n                        \"LABEL_0\": 0.0,\r\n                        \"LABEL_1\": 1.0\r\n                    }\r\n                }\r\n            ),\r\n]\r\n```\r\nNow consider running this `EvaluationSuite` with the following:\r\n\r\n```python\r\nfrom evaluate import EvaluationSuite\r\nsuite = EvaluationSuite.load('suite.py')\r\nresults = suite.run(\"gpt2\")\r\n```\r\n\r\nRunning this code results in the following error:\r\n\r\n```\r\n---------------------------------------------------------------------------\r\nKeyError                                  Traceback (most recent call last)\r\nCell In[60], line 2\r\n      1 suite = EvaluationSuite.load('suite.py')\r\n----> 2 results = suite.run(\"gpt2\")\r\n\r\nFile /localdisk/twilbers/src/notebooks/poc/glue/.venv/lib/python3.10/site-packages/evaluate/evaluation_suite/__init__.py:124, in EvaluationSuite.run(self, model_or_pipeline)\r\n    122 args_for_task[\"subset\"] = task.subset\r\n    123 args_for_task[\"split\"] = task.split\r\n--> 124 results = task_evaluator.compute(**args_for_task)\r\n    126 results[\"task_name\"] = task_name + \"/\" + task.subset if task.subset else task_name\r\n    127 results[\"data_preprocessor\"] = str(task.data_preprocessor) if task.data_preprocessor is not None else None\r\n\r\nFile /localdisk/twilbers/src/notebooks/poc/glue/.venv/lib/python3.10/site-packages/evaluate/evaluator/text_classification.py:136, in TextClassificationEvaluator.compute(self, model_or_pipeline, data, subset, split, metric, tokenizer, feature_extractor, strategy, confidence_level, n_resamples, device, random_state, input_column, second_input_column, label_column, label_mapping)\r\n    127 metric_inputs, pipe_inputs = self.prepare_data(\r\n    128     data=data, input_column=input_column, second_input_column=second_input_column, label_column=label_column\r\n    129 )\r\n    130 pipe = self.prepare_pipeline(\r\n    131     model_or_pipeline=model_or_pipeline,\r\n    132     tokenizer=tokenizer,\r\n    133     feature_extractor=feature_extractor,\r\n    134     device=device,\r\n    135 )\r\n--> 136 metric = self.prepare_metric(metric)\r\n    138 # Compute predictions\r\n    139 predictions, perf_results = self.call_pipeline(pipe, pipe_inputs)\r\n\r\nFile /localdisk/twilbers/src/notebooks/poc/glue/.venv/lib/python3.10/site-packages/evaluate/evaluator/base.py:447, in Evaluator.prepare_metric(self, metric)\r\n    445     metric = load(self.default_metric_name)\r\n    446 elif isinstance(metric, str):\r\n--> 447     metric = load(metric)\r\n    449 return metric\r\n\r\nFile /localdisk/twilbers/src/notebooks/poc/glue/.venv/lib/python3.10/site-packages/evaluate/loading.py:735, in load(path, config_name, module_type, process_id, num_process, cache_dir, experiment_id, keep_in_memory, download_config, download_mode, revision, **init_kwargs)\r\n    731 evaluation_module = evaluation_module_factory(\r\n    732     path, module_type=module_type, revision=revision, download_config=download_config, download_mode=download_mode\r\n    733 )\r\n    734 evaluation_cls = import_main_class(evaluation_module.module_path)\r\n--> 735 evaluation_instance = evaluation_cls(\r\n    736     config_name=config_name,\r\n    737     process_id=process_id,\r\n    738     num_process=num_process,\r\n    739     cache_dir=cache_dir,\r\n    740     keep_in_memory=keep_in_memory,\r\n    741     experiment_id=experiment_id,\r\n    742     hash=evaluation_module.hash,\r\n    743     **init_kwargs,\r\n    744 )\r\n    746 if module_type and module_type != evaluation_instance.module_type:\r\n    747     raise TypeError(\r\n    748         f\"No module of module type '{module_type}' not found for '{path}' locally, or on the Hugging Face Hub. Found module of module type '{evaluation_instance.module_type}' instead.\"\r\n    749     )\r\n\r\nFile /localdisk/twilbers/src/notebooks/poc/glue/.venv/lib/python3.10/site-packages/evaluate/module.py:182, in EvaluationModule.__init__(self, config_name, keep_in_memory, cache_dir, num_process, process_id, seed, experiment_id, hash, max_conc",
    "url": "https://github.com/huggingface/evaluate/issues/485",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-22T23:15:43Z",
    "updated_at": "2023-08-23T16:38:18Z",
    "user": "tybrs"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4716,
    "title": "How to handle SDXL long prompt",
    "body": "### Describe the bug\n\nI am unable to use embeds prompt in order to handle prompt that is longer than 77 tokens.\n\n### Reproduction\n\n```python\r\nimport itertools\r\nimport os.path\r\nimport random\r\nimport string\r\nimport time\r\nimport typing as typ\r\n\r\nimport torch\r\nfrom diffusers import StableDiffusionXLPipeline\r\nfrom tqdm import tqdm\r\n\r\nimport bb\r\nfrom web_sdxl import seed_everything\r\n\r\nseed_everything(42)\r\n\r\n\r\ndef generate_random_string(length):\r\n    letters = string.ascii_letters\r\n    result = ''.join(random.choice(letters) for _ in range(length))\r\n    return result\r\n\r\n\r\ndef get_pipeline_embeds(pipeline, prompt, negative_prompt, device):\r\n    \"\"\" Get pipeline embeds for prompts bigger than the maxlength of the pipe\r\n    :param pipeline:\r\n    :param prompt:\r\n    :param negative_prompt:\r\n    :param device:\r\n    :return:\r\n    \"\"\"\r\n    max_length = pipeline.tokenizer.model_max_length\r\n\r\n    # simple way to determine length of tokens\r\n    count_prompt = len(prompt.split(\" \"))\r\n    count_negative_prompt = len(negative_prompt.split(\" \"))\r\n\r\n    # create the tensor based on which prompt is longer\r\n    if count_prompt >= count_negative_prompt:\r\n        input_ids = pipeline.tokenizer(prompt, return_tensors=\"pt\", truncation=False).input_ids.to(device)\r\n        shape_max_length = input_ids.shape[-1]\r\n        negative_ids = pipeline.tokenizer(negative_prompt, truncation=False, padding=\"max_length\",\r\n                                          max_length=shape_max_length, return_tensors=\"pt\").input_ids.to(device)\r\n\r\n    else:\r\n        negative_ids = pipeline.tokenizer(negative_prompt, return_tensors=\"pt\", truncation=False).input_ids.to(device)\r\n        shape_max_length = negative_ids.shape[-1]\r\n        input_ids = pipeline.tokenizer(prompt, return_tensors=\"pt\", truncation=False, padding=\"max_length\",\r\n                                       max_length=shape_max_length).input_ids.to(device)\r\n\r\n    concat_embeds = []\r\n    neg_embeds = []\r\n    for i in range(0, shape_max_length, max_length):\r\n        concat_embeds.append(pipeline.text_encoder(input_ids[:, i: i + max_length])[0])\r\n        neg_embeds.append(pipeline.text_encoder(negative_ids[:, i: i + max_length])[0])\r\n\r\n    return torch.cat(concat_embeds, dim=1), torch.cat(neg_embeds, dim=1)\r\n\r\n\r\nmodel_path = \"fine_tuned_models/sdxl-sarit\"\r\ndevice = \"mps\" if torch.backends.mps.is_available() else \"cpu\"\r\nout_dir: str = \"gluta40\"\r\n\r\nage_prompts: typ.List[str] = [\r\n    \"young asian girl\",\r\n    \"a photograph of an angel with sly expression, wearing a see-thru short roman style dress, beautiful asian mixed european woman face, beautiful eyes, black hair, looking down, hyper realistic and detailed, 16k\",\r\n]\r\nhand_prompts: typ.List[str] = [\r\n    \"left hand holding a gluta40 jar one hand, right hand is behind her back\",\r\n    \"right hand holding a gluta40 jar one hand, left hand is behind her back\",\r\n]\r\nface_angle_prompts: typ.List[str] = [\r\n    \"straight face\",\r\n]\r\nhair_prompts: typ.List[str] = [\r\n    \"black long tied hair\",\r\n    \"black long hair\",\r\n]\r\nbackground_prompts: typ.List[str] = [\r\n    \"no background, hold both hands, bad hands\",\r\n]\r\nnegative_prompt: str = \"disfigured, disproportionate, bad anatomy, bad proportions, ugly, out of frame, mangled, asymmetric, cross-eyed, depressed, immature, stuffed animal, out of focus, high depth of field, cloned face, cloned head, age spot, skin blemishes, collapsed eyeshadow, asymmetric ears, imperfect eyes, unnatural, conjoined, missing limb, missing arm, missing leg, poorly drawn face, poorly drawn feet, poorly drawn hands, floating limb, disconnected limb, extra limb, malformed limbs, malformed hands, poorly rendered face, poor facial details, poorly rendered hands, double face, unbalanced body, unnatural body, lacking body, long body, cripple, cartoon, 3D, weird colors, unnatural skin tone, unnatural skin, stiff face, fused hand, skewed eyes, surreal, cropped head, group of people, too many fingers, bad hands, six fingers\"\r\ncombined_list = list(itertools.product(age_prompts, hand_prompts, face_angle_prompts, hair_prompts, background_prompts))\r\nrandom.shuffle(combined_list)\r\n\r\nfor item in tqdm(combined_list, total=len(combined_list)):\r\n    age, hand, face_angle, hair, background = item\r\n    if not os.path.exists(out_dir):\r\n        os.makedirs(out_dir)\r\n    prompt: str = \", \".join(item)\r\n    print(prompt)\r\n    out_filename: str = f\"{out_dir}/{prompt.replace(' ', '_')}\"\r\n    if not os.path.exists(f\"{out_filename}_0.png\"):\r\n        try:\r\n            pipe = StableDiffusionXLPipeline.from_pretrained(model_path, safety_checker=None,\r\n                                                             requires_safety_checker=False)\r\n            pipe.to(device)\r\n            prompt_embeds, negative_prompt_embeds = get_pipeline_embeds(pipe, prompt, negative_prompt, device)\r\n            images = pipe(prompt_embeds=prompt_embeds, negative_prompt_embeds=negative_prompt_embeds,\r\n                          num_images_per_prompt=3, width=768,\r\n                         ",
    "url": "https://github.com/huggingface/diffusers/issues/4716",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-08-22T16:28:25Z",
    "updated_at": "2023-08-27T02:46:18Z",
    "user": "elcolie"
  },
  {
    "repo": "huggingface/candle",
    "number": 547,
    "title": "How to turn off automatic translation for whisper",
    "body": "When I input Chinese wav file , whisper outputs the English translation\r\n```\r\nls@LeeeSes-MacBook-Air ~/r/candle (main)> cargo run --release --features accelerate --example whisper -- --model small --language zh --input /Users/ls/Downloads/output.wav\r\n    Finished release [optimized] target(s) in 0.38s\r\n     Running `target/release/examples/whisper --model small --language zh --input /Users/ls/Downloads/output.wav`\r\nRunning on CPU, to run on GPU, build this example with `--features cuda`\r\nloaded wav data: Header { audio_format: 1, channel_count: 1, sampling_rate: 16000, bytes_per_second: 32000, bytes_per_sample: 2, bits_per_sample: 16 }\r\npcm data loaded 287216\r\nloaded mel: [1, 80, 4500]\r\n0.0s -- 30.0s:  This is a free online audio recorder application program. You can record sound from microphone. After recording, you can edit sound and edit any parts, adjust the balance and sound. Let's use the recording first.\r\n30.0s -- 45.0s:  I'm sorry.\r\n```",
    "url": "https://github.com/huggingface/candle/issues/547",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-22T11:16:45Z",
    "updated_at": "2023-08-22T18:52:40Z",
    "user": "LeeeSe"
  },
  {
    "repo": "huggingface/trl",
    "number": 674,
    "title": "How to load the model and the checkpoint after trained the model?",
    "body": "I trained my model using the code in the sft_trainer.py. And I save the checkpoint and the model in the same dir.\r\nBut I don't know how to load the model with the checkpoint. Or I just want to konw that `trainer.save_model(script_args.output_dir)` means I have save a trained model, not just a checkpoint? \r\nI try many ways to load the trained model but errors like \r\n```\r\nRuntimeError: Error(s) in loading state_dict for PrefixEncoder:\r\n\tMissing key(s) in state_dict: \"embedding.weight\". \r\n```\r\nSo, how to load the model???",
    "url": "https://github.com/huggingface/trl/issues/674",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-22T10:31:01Z",
    "updated_at": "2023-11-27T21:34:30Z",
    "user": "ccwdb"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 899,
    "title": "text-generation-launcher  tool how to use multi gpu cards?",
    "body": "### System Info\n\ntext-generation-launcher 1.0.0  how to use  multi gpu cards?\r\n\n\n### Information\n\n- [ ] Docker\n- [X] The CLI directly\n\n### Tasks\n\n- [X] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\nCUDA_VISIBLE_DEVICES=0,1,2,3 text-generation-launcher --model-id falcon-40b-instruct --sharded true --num-shard 1 --quantize bitsandbytes-fp4  does not used multi gpu A10 card. Error with GPU 0 OutOfMemoryError: CUDA out of memory.\n\n### Expected behavior\n\nNormal load the model and http post.",
    "url": "https://github.com/huggingface/text-generation-inference/issues/899",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-22T10:09:17Z",
    "updated_at": "2023-08-22T10:13:06Z",
    "user": "luefei"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 411,
    "title": "Chat-ui crashes TGI?",
    "body": "Hey!\r\n\r\nWhen I deploy TGI Endpoint locally and test it with the following cli request: \r\n\r\n`curl 127.0.0.1:8080/generate_stream \\\r\n    -X POST \\\r\n    -d '{\"inputs\":\"def calculate_fibonacci(n:str):\",\"parameters\":{\"max_new_tokens\":100}}' \\\r\n    -H 'Content-Type: application/json'`\r\n\r\nIt works without any problem. Even load tests with locust.io work without problems.\r\n\r\nThis is the response from tgi with the curl command: \r\n\r\n`2023-08-22T08:29:52.944813Z  INFO HTTP request{otel.name=POST /generate_stream http.client_ip= http.flavor=1.1 http.host=127.0.0.1:8080 http.method=POST http.route=/generate_stream http.scheme=HTTP http.target=/generate_stream http.user_agent=curl/7.82.0 otel.kind=server trace_id=772a4a52f29b540aac2b3b331ea5247a http.status_code=200 otel.status_code=\"OK\"}:generate_stream{parameters=GenerateParameters { best_of: None, temperature: None, repetition_penalty: None, top_k: None, top_p: None, typical_p: None, do_sample: false, max_new_tokens: 100, return_full_text: None, stop: [], truncate: None, watermark: false, details: false, decoder_input_details: false, seed: None } total_time=\"5.639886919s\" validation_time=\"153.888\u00b5s\" queue_time=\"184.627\u00b5s\" inference_time=\"5.639548636s\" time_per_token=\"56.395486ms\" seed=\"None\"}: text_generation_router::server: router/src/server.rs:452: Success`\r\n\r\nBut if I want to call tgi with the chat-ui it works the first time (I get an streaming response in the chat-ui), but then the tgi freezes?\r\nEDIT: This is the output I get from tgi (I get two responses from tgi?):\r\n\r\n`2023-08-22T11:38:32.027037Z  INFO HTTP request{otel.name=POST / http.client_ip= http.flavor=1.1 http.host=127.0.0.1:8080 http.method=POST http.route=/ http.scheme=HTTP http.target=/ http.user_agent=undici otel.kind=server trace_id=a55b57fc395cc1f8fa59dcd111733cd4 http.status_code=200 otel.status_code=\"OK\"}:compat_generate{default_return_full_text=false}:generate_stream{parameters=GenerateParameters { best_of: None, temperature: Some(0.9), repetition_penalty: Some(1.2), top_k: Some(50), top_p: Some(0.95), typical_p: None, do_sample: false, max_new_tokens: 1048, return_full_text: Some(false), stop: [], truncate: Some(1000), watermark: false, details: false, decoder_input_details: false, seed: None } total_time=\"1.803072692s\" validation_time=\"139.35\u00b5s\" queue_time=\"209.805\u00b5s\" inference_time=\"1.802724034s\" time_per_token=\"56.335126ms\" seed=\"Some(14814785333613176252)\"}: text_generation_router::server: router/src/server.rs:450: Success\r\n`\r\n\r\n`\r\n2023-08-22T11:38:32.643776Z  INFO HTTP request{otel.name=POST / http.client_ip= http.flavor=1.1 http.host=127.0.0.1:8080 http.method=POST http.route=/ http.scheme=HTTP http.target=/ http.user_agent=undici otel.kind=server trace_id=7064d891ae5c88c74aaba2f06cacd5d3}:compat_generate{default_return_full_text=false}:generate{parameters=GenerateParameters { best_of: None, temperature: None, repetition_penalty: None, top_k: None, top_p: None, typical_p: None, do_sample: false, max_new_tokens: 20, return_full_text: Some(false), stop: [], truncate: None, watermark: false, details: false, decoder_input_details: false, seed: None } total_time=\"519.787388ms\" validation_time=\"77.98\u00b5s\" queue_time=\"78.433\u00b5s\" inference_time=\"519.63134ms\" time_per_token=\"57.736815ms\" seed=\"None\"}: text_generation_router::server: router/src/server.rs:287: Success`\r\n\r\nEDIT: I get the following output in my terminal with the second response from tgi: \r\n\r\n`\r\nSyntaxError: Unexpected token d in JSON at position 0\r\n    at JSON.parse (<anonymous>)\r\n    at Module.generateFromDefaultEndpoint (/Users/xx/Desktop/chat-ui/src/lib/server/generateFromDefaultEndpoint.ts:73:30)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async POST (/Users/xx/Desktop/chat-ui/src/routes/conversation/[id]/summarize/+server.ts:30:26)\r\n    at async Module.render_endpoint (/Users/xx/Desktop/chat-ui/node_modules/@sveltejs/kit/src/runtime/server/endpoint.js:47:20)\r\n    at async resolve (/Users/xx/Desktop/chat-ui/node_modules/@sveltejs/kit/src/runtime/server/respond.js:388:17)\r\n    at async Object.handle (/Users/xx/Desktop/chat-ui/src/hooks.server.ts:66:20)\r\n    at async Module.respond (/Users/xx/Desktop/chat-ui/node_modules/@sveltejs/kit/src/runtime/server/respond.js:259:20)\r\n    at async file:///Users/xx/Desktop/chat-ui/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:506:22`\r\n\r\nchat-ui version: 0.5.0\r\ntgi-version: 1.0.1\r\n\r\nChat-UI Model Config: \r\n```\r\nMODELS=`[\r\n  {\r\n    \"name\": \"Vicuna\",\r\n    \"datasetName\": \"OpenAssistant/oasst1\",\r\n    \"endpoints\": [{\"url\": \"http://127.0.0.1:8080/generate_stream\"}],\r\n    \"description\": \"A good alternative to ChatGPT\",\r\n    \"websiteUrl\": \"https://open-assistant.io\",\r\n    \"userMessageToken\": \"USER:\",\r\n    \"assistantMessageToken\": \"ASSISTANT:\",\r\n    \"messageEndToken\": \"</s>\",\r\n    \"preprompt\": \"A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\\n\\n",
    "url": "https://github.com/huggingface/chat-ui/issues/411",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-22T08:48:02Z",
    "updated_at": "2023-08-23T06:45:26Z",
    "comments": 0,
    "user": "schauppi"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 1870,
    "title": "[Question] How to optimize two loss alternately with gradient accumulation?",
    "body": "I want to update a model by optimizing two loss alternately with gradient accumulation like this\r\n\r\n```python\r\n# Suppose gradient_accumulation is set to 2.\r\noptimizer = optim(unet.parameters())\r\nwith accelerator.accumulate(unet):\r\n    outputs = unet(input)\r\n    loss1 = loss_func1(outputs)\r\n    loss1.backward()\r\n    optimizer.step()\r\n    optimizer.zero_grad()\r\n\r\nwith accelerator.accumulate(unet):\r\n    outputs = unet(input)\r\n    loss2 = loss_func2(outputs)\r\n    loss2.backward()\r\n    optimizer.step()\r\n    optimizer.zero_grad()\r\n```\r\n\r\nIs this correct?  It appears from the [documentation](https://huggingface.co/docs/accelerate/usage_guides/gradient_accumulation#converting-it-to-accelerate) that `accelerator.accumulate` will normalize the loss and then backpropagate without updating the gradient until reaching `gradient_accumulation_steps`. My main concern is that the gradients accumulated by two different losses for the same model will affect each other.\r\n\r\nHope to find some help here, thanks in advance.",
    "url": "https://github.com/huggingface/accelerate/issues/1870",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-21T12:49:19Z",
    "updated_at": "2023-10-24T15:06:33Z",
    "user": "hkunzhe"
  },
  {
    "repo": "huggingface/candle",
    "number": 538,
    "title": "How to disable openssl-sys being included?",
    "body": "I would like to stop openssl-sys from being included in my project when using candle, I'm not sure how to do this. I tried adding the below to my Cargo.toml but it didn't change anything. The reason I want to do it is because I get an error when trying to compile my library to aarch64-linux-android saying that pkg-config has not been configured to support cross-compilation and that I should install a sysroot for the target platform, but I'd like to not include it anyways since I won't be needing it and will be loading everything locally. Thanks.\r\n\r\n```\r\nhf-hub = { version = \"0.2.0\", default-features = false }\r\ntokenizers = { version = \"0.13.4\", default-features = false }\r\n```",
    "url": "https://github.com/huggingface/candle/issues/538",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-21T10:47:26Z",
    "updated_at": "2023-08-21T20:38:57Z",
    "user": "soupslurpr"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 107580,
    "title": "Doc is unclear on how to install pytorch with Cuda via pip",
    "body": "### \ud83d\udcda The doc issue\n\n![image](https://github.com/pytorch/pytorch/assets/35759490/17b506aa-ff3a-40cf-baac-63bb66c486ac)\r\n\r\nI've been looking on how to install torch with CUDA via pip for almost one day and the doc is absolutely not helping on how to do so.\n\n### Suggest a potential alternative/fix\n\nExplain clearly how to install pytorch using pip with CUDA or not.\r\n\r\n```\r\nTo install pytorch with CUDA using pip, you first need to install CUDA on your system if it is compatible with it and then install pytorch with the following command in your shell:\r\n\r\n`pip install ...........`\r\n```",
    "url": "https://github.com/pytorch/pytorch/issues/107580",
    "state": "open",
    "labels": [
      "triaged",
      "topic: docs"
    ],
    "created_at": "2023-08-21T09:57:56Z",
    "updated_at": "2023-08-22T08:42:08Z",
    "user": "MidKnightXI"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1298,
    "title": "Support BetterTransfomer for the Baichuan LLM model",
    "body": "### Feature request\n\nis it possible to support Baichuan model with BetterTransformer?\r\n\r\nhttps://huggingface.co/baichuan-inc/Baichuan-13B-Chat\n\n### Motivation\n\nA very popular Chinese and English large language model.\n\n### Your contribution\n\nhope you can achieve it. Thanks.",
    "url": "https://github.com/huggingface/optimum/issues/1298",
    "state": "closed",
    "labels": [
      "feature-request",
      "bettertransformer",
      "Stale"
    ],
    "created_at": "2023-08-21T08:18:16Z",
    "updated_at": "2025-05-04T02:17:22Z",
    "comments": 1,
    "user": "BobLiu20"
  },
  {
    "repo": "huggingface/candle",
    "number": 533,
    "title": "How to convert token to text?",
    "body": "Hello, thank you for this ML library in Rust. Sorry if this is a noob question, I'm new to machine learning and this is my first time trying to use a text generation model. I'm using the latest git version. In the quantized llama example, how would I convert a token to a string? I see the print_token function but I want to convert it to a string and maybe push to a vector so I can return all the generated text when it is finished processing. ",
    "url": "https://github.com/huggingface/candle/issues/533",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-21T06:36:08Z",
    "updated_at": "2023-08-21T07:51:37Z",
    "user": "soupslurpr"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 333,
    "title": "Slow load weight values from a HF model on a big-endian machine with the latest code",
    "body": "### System Info\r\n\r\nPython: 3.10\r\nPyTorch: the latest main branch (i.e. 2.0.1+)\r\nsafetensors: 0.3.3\r\nPlatform: s390x (big-endian)\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Reproduction\r\n\r\nI executed the following code using 0.3.1 and 0.3.3, and w/o safetensors.\r\n\r\n```\r\nimport time\r\nimport torch\r\nfrom transformers import T5ForConditionalGeneration, AutoTokenizer\r\ntry:\r\n    import safetensors \r\n    print(\"safetensors version:\", safetensors.__version__)\r\nexcept:\r\n    print(\"safetensors not installed\")\r\ntorch.serialization.set_default_load_endianness(torch.serialization.LoadEndianness.LITTLE)\r\n\r\nmodel = \"google/flan-t5-xxl\"\r\ntokenizer = AutoTokenizer.from_pretrained(model)\r\ninput_text = \"The square root of x is the cube root of y. What is y to the power of 2, if x = 4?\"\r\ninput = tokenizer(input_text, return_tensors=\"pt\").input_ids\r\n\r\nt0 = time.perf_counter()\r\n#model = T5ForConditionalGeneration.from_pretrained(model, low_cpu_mem_usage=True, use_safetensors=False)\r\nmodel = T5ForConditionalGeneration.from_pretrained(model, low_cpu_mem_usage=True, use_safetensors=True)\r\nt1 = time.perf_counter()\r\nprint(\"load elapsed time:\", t1-t0)\r\noutput = model.decoder.forward(input_ids=input)  ## intentionally use decoder.forward() instead of generate()\r\nt2 = time.perf_counter()\r\nprint(\"forward elapsed time:\", t2-t1)\r\n```\r\n\r\nFindings\r\n- Old version (0.3.1) w/o swapping data is quite faster than 0.3.3 w/ swapping data, which we understand.\r\n- 0.3.3 is a bit slow than `torch.load`, which implies we could have some room to improve.\r\n\r\nThe result is the best time of five tries after I downloaded model files into local file system.\r\n\r\n```\r\n$ python flan-t5.py \r\nsafetensors not installed\r\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5/5 [00:21<00:00,  4.37s/it]\r\nload elapsed time: 22.09646322298795\r\nforward elapsed time: 1.4204098680056632\r\n```\r\n\r\n```\r\n$ python flan-t5.py \r\nsafetensors version: 0.3.3\r\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5/5 [00:25<00:00,  5.05s/it]\r\nload elapsed time: 25.486608179984614\r\nforward elapsed time: 1.4887599580106325\r\n```\r\n\r\n```\r\n$ python flan-t5.py \r\nsafetensors version: 0.3.1\r\nLoading checkpoint shards: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5/5 [00:00<00:00, 35.73it/s]\r\nload elapsed time: 0.37154227000428364\r\nforward elapsed time: 1.1782474629580975\r\n```\r\n\r\n\r\n### Expected behavior\r\n\r\nWe expect that we can alleviate the overhead of swapping data. The overhead of 4x looks too large.",
    "url": "https://github.com/huggingface/safetensors/issues/333",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-08-20T18:19:44Z",
    "updated_at": "2023-12-12T01:48:51Z",
    "comments": 9,
    "user": "kiszk"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 409,
    "title": "Deploy Chat UI Spaces Docker template with a PEFT adapter ",
    "body": "I tried to accomplish this, but the container failed to launch the chat-ui app, as it seems to assume the model would be a non-adapted model.\r\n\r\nIs there a way to make it work?",
    "url": "https://github.com/huggingface/chat-ui/issues/409",
    "state": "closed",
    "labels": [
      "bug",
      "back"
    ],
    "created_at": "2023-08-20T05:26:50Z",
    "updated_at": "2023-09-11T09:37:29Z",
    "comments": 4,
    "user": "lrtherond"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6163,
    "title": "Error type: ArrowInvalid Details: Failed to parse string: '[254,254]' as a scalar of type int32",
    "body": "### Describe the bug\n\nI am getting the following error while I am trying to upload the CSV sheet to train a model. My CSV sheet content is exactly same as shown in the example CSV file in the Auto Train page. Attaching screenshot of error for reference. I have also tried converting the index of the answer that are integer into string by placing inverted commas and also without inverted commas. \r\nCan anyone please help me out? \r\nFYI : I am using Chrome browser.\r\n\r\nError type: ArrowInvalid\r\nDetails: Failed to parse string: '[254,254]' as a scalar of type int32\r\n\r\n![Screenshot 2023-08-19 165827](https://github.com/huggingface/datasets/assets/90616801/95fad96e-7dce-4bb5-9f83-9f1659a32891)\r\n\n\n### Steps to reproduce the bug\n\nKindly let me know how to fix this?\n\n### Expected behavior\n\nKindly let me know how to fix this?\n\n### Environment info\n\nKindly let me know how to fix this?",
    "url": "https://github.com/huggingface/datasets/issues/6163",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-19T11:34:40Z",
    "updated_at": "2025-07-22T12:04:46Z",
    "comments": 2,
    "user": "shishirCTC"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2278,
    "title": "How to set the no. of epochs for fine-tuning SBERT?",
    "body": "Hello,\r\nI am fine-tuning an biencoder SBERT model on domain specific data for semantic similarity. There is no loss value posted by the `fit ` function from the package. Any idea how to know if the model is overfitting or underfiting the dataset after each epoch? This could help me in deciding the appropriate no. of epochs required for fine-tuning.\r\n\r\nThank you.",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2278",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-18T18:14:05Z",
    "updated_at": "2024-01-29T17:00:13Z",
    "user": "power-puff-gg"
  },
  {
    "repo": "huggingface/setfit",
    "number": 409,
    "title": "model_head.pkl not found on HuggingFace Hub",
    "body": "i got message:\r\n\"model_head.pkl not found on HuggingFace Hub, initialising classification head with random weights. You should TRAIN this model on a downstream task to use it for predictions and inference.\"\r\n\r\nis there something missing or is it normal?",
    "url": "https://github.com/huggingface/setfit/issues/409",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-18T07:52:20Z",
    "updated_at": "2023-11-24T14:20:51Z",
    "user": "andysingal"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 216,
    "title": "How to do inference after train llama2",
    "body": "i trained model using this command\r\n```\r\nautotrain llm --train --project_name 'llama2-indo-testing' \\\r\n    --model meta-llama/Llama-2-7b-hf \\\r\n    --data_path data/ \\\r\n    --text_column text \\\r\n    --use_peft \\\r\n    --use_int4 \\\r\n    --learning_rate 2e-4 \\\r\n    --train_batch_size 2 \\\r\n    --num_train_epochs 3 \\\r\n    --trainer sft \\\r\n    --model_max_length 2048 \\\r\n    --push_to_hub \\\r\n    --repo_id fhadli/llama2-7b-hf-id \\\r\n    --block_size 2048 \\\r\n    > training.log\r\n```\r\nafter that, i tried to load the model using this script\r\n```\r\nfrom transformers import AutoTokenizer\r\nimport transformers\r\nimport torch\r\n\r\nmodel = \"/home/muhammad.fhadli/explorasi/llama2-indo/llama2-indo-testing\"\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(model)\r\npipeline = transformers.pipeline(\r\n    \"text-generation\",\r\n    model=model,\r\n    torch_dtype=torch.float16,\r\n    device_map=\"auto\",\r\n)\r\n```\r\n\r\nbut it gave me this error, can someone please explain why i got this error, or what is the rigth way to do inference?\r\n```\r\nTraceback (most recent call last):\r\n  File \"play.py\", line 8, in <module>\r\n    pipeline = transformers.pipeline(\r\n  File \"/home/muhammad.fhadli/.pyenv/versions/3.8.10/envs/llama/lib/python3.8/site-packages/transformers/pipelines/__init__.py\", line 705, in pipeline\r\n    config = AutoConfig.from_pretrained(model, _from_pipeline=task, **hub_kwargs, **model_kwargs)\r\n  File \"/home/muhammad.fhadli/.pyenv/versions/3.8.10/envs/llama/lib/python3.8/site-packages/transformers/models/auto/configuration_auto.py\", line 983, in from_pretrained\r\n    config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)\r\n  File \"/home/muhammad.fhadli/.pyenv/versions/3.8.10/envs/llama/lib/python3.8/site-packages/transformers/configuration_utils.py\", line 617, in get_config_dict\r\n    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)\r\n  File \"/home/muhammad.fhadli/.pyenv/versions/3.8.10/envs/llama/lib/python3.8/site-packages/transformers/configuration_utils.py\", line 672, in _get_config_dict\r\n    resolved_config_file = cached_file(\r\n  File \"/home/muhammad.fhadli/.pyenv/versions/3.8.10/envs/llama/lib/python3.8/site-packages/transformers/utils/hub.py\", line 388, in cached_file\r\n    raise EnvironmentError(\r\nOSError: /home/muhammad.fhadli/explorasi/llama2-indo/llama2-indo-testing/ does not appear to have a file named config.json. Checkout 'https://huggingface.co//home/muhammad.fhadli/explorasi/llama2-indo/llama2-indo-testing//None' for available files.\r\n```\r\nhere is the content inside my folder\r\n```\r\n$ls /home/muhammad.fhadli/explorasi/llama2-indo/llama2-indo-testing/\r\nadapter_config.json  optimizer.pt  rng_state_0.pth  scheduler.pt             tokenizer_config.json  tokenizer.model     training_args.bin\r\nadapter_model.bin    README.md     rng_state_1.pth  special_tokens_map.json  tokenizer.json         trainer_state.json\r\n```",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/216",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-18T04:36:37Z",
    "updated_at": "2023-12-18T15:30:38Z",
    "user": "muhammadfhadli1453"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4662,
    "title": "How to call a different scheduler when training a model from repo",
    "body": "I notice that the settings in train_dreambooth_lora_sdxl.py and the scheduler config from the repo seem to conflict. In the .py the noise scheduler is DDPM but whenever training starts it seems to still indicate that I am using the repo config scheduler, ie. EulerDiscreteScheduler. It used to be you could specify scheduler config by path but that seemed to have deprecated at some point.",
    "url": "https://github.com/huggingface/diffusers/issues/4662",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-17T21:40:10Z",
    "updated_at": "2023-08-18T04:18:11Z",
    "user": "jmaccall316"
  },
  {
    "repo": "huggingface/transformers",
    "number": 25576,
    "title": "How can i make a PR for autotokenzier to adapt RWKV world",
    "body": "### Feature request\r\n\r\nUsusally we use own tokenzier with the transformer pipeline, \r\nlike this https://github.com/xiaol/Huggingface-RWKV-World/blob/fca236afd5f2815b0dbe6c7ce3c92e51526e2e14/generate_hf_cfg.py#L79C1-L79C1\r\n\r\nSo far we have a lot of models using new tokenzier, using pipeline with autotokenizer is critically needed.\r\n\r\nHow can i add new tokenizer to autotokenzier to make this pipeline smooth and peace. \r\n\r\nThank you.\r\n\r\n\r\n### Motivation\r\n\r\n1. make everyone use RWKV world smoothly,  and RWKV v5 world is coming.\r\n2. can support huggingface communtiy with this awesome models , make opensource more open.\r\n3. i really don't like llama models always on the top of open llm leardboards.\r\n4. more...\r\n\r\n### Your contribution\r\n\r\nI made a lots of models based on RWKV 4 world ,https://huggingface.co/xiaol , especially 128k context models.",
    "url": "https://github.com/huggingface/transformers/issues/25576",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-17T16:36:44Z",
    "updated_at": "2023-09-25T08:02:43Z",
    "user": "xiaol"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 1854,
    "title": "How to further accelerate training with 24 cards for 1.3b+ models using accelerate\uff1f",
    "body": "I found that when using DeepSpeed Zero (2 or 3) to train 1.3 billion and larger models (such as llama-7b or gpt-neo-1.3b), the training time for 8 * 32G V100 is almost the same as 24 * 32G V100 (I guess it's because of the additional communication overhead introduced by DeepSpeed). Is there any way to further accelerate training by utilizing 24 cards? Currently, Megatron-LM integration is limited to gpt-2 and gpt-j and also, I'm not sure whether this will help.\r\n\r\n",
    "url": "https://github.com/huggingface/accelerate/issues/1854",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-17T15:01:09Z",
    "updated_at": "2023-09-24T15:05:52Z",
    "user": "Micheallei"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6156,
    "title": "Why not use self._epoch as seed to shuffle in distributed training with IterableDataset",
    "body": "### Describe the bug\r\n\r\nCurrently, distributed training with `IterableDataset` needs to pass fixed seed to shuffle to keep each node use the same seed to avoid overlapping.\r\nhttps://github.com/huggingface/datasets/blob/a7f8d9019e7cb104eac4106bdc6ec0292f0dc61a/src/datasets/iterable_dataset.py#L1174-L1177\r\n\r\nMy question is why not directly use `self._epoch` which is set by `set_epoch` as seed? It's almost the same across nodes.\r\nhttps://github.com/huggingface/datasets/blob/a7f8d9019e7cb104eac4106bdc6ec0292f0dc61a/src/datasets/iterable_dataset.py#L1790-L1801\r\n\r\nIf not using `self._epoch` as shuffling seed, what does this method do to prepare an epoch seeded generator?\r\nhttps://github.com/huggingface/datasets/blob/a7f8d9019e7cb104eac4106bdc6ec0292f0dc61a/src/datasets/iterable_dataset.py#L1206\r\n\r\n\r\n\r\n### Steps to reproduce the bug\r\n\r\nAs mentioned above.\r\n\r\n### Expected behavior\r\n\r\nAs mentioned above.\r\n\r\n### Environment info\r\n\r\nNot related",
    "url": "https://github.com/huggingface/datasets/issues/6156",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-17T10:58:20Z",
    "updated_at": "2023-08-17T14:33:15Z",
    "comments": 3,
    "user": "npuichigo"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4643,
    "title": "when i load a controlnet model,where is the inference code?",
    "body": " I have read the code of con in  diffusers/models/controlnet.py.\r\nbut when I load a con weight,where is the code?\r\ntks",
    "url": "https://github.com/huggingface/diffusers/issues/4643",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-17T02:50:59Z",
    "updated_at": "2023-08-17T04:55:28Z",
    "user": "henbucuoshanghai"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1689,
    "title": "Handle breaking change in google dependency?",
    "body": "See https://huggingface.co/datasets/bigscience/P3/discussions/6#64dca122e3e44e8000c45616\r\n\r\nShould we downgrade the dependency, or fix the datasets?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1689",
    "state": "closed",
    "labels": [
      "question",
      "dependencies",
      "P2"
    ],
    "created_at": "2023-08-16T14:31:28Z",
    "updated_at": "2024-02-06T14:59:59Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1286,
    "title": "Support BetterTransfomer for the GeneFormer model",
    "body": "### Feature request\n\nis it possible to support GeneFormer model with BetterTransformer?\r\nhttps://huggingface.co/ctheodoris/Geneformer\n\n### Motivation\n\nIt's a new paper with an active community in the Hugging Face repository. The training and inference speed is not fast enough.\n\n### Your contribution\n\nNothing at this time because I don't want to add it by myself. I am requesting this because of this statement from the hugging face website:\r\n\r\nLet us know by opening an issue in \ud83e\udd17 Optimum if you want more models to be supported, or check out the [contribution guideline](https://huggingface.co/docs/optimum/bettertransformer/tutorials/contribute) if you want to add it by yourself!",
    "url": "https://github.com/huggingface/optimum/issues/1286",
    "state": "closed",
    "labels": [
      "feature-request",
      "bettertransformer",
      "Stale"
    ],
    "created_at": "2023-08-16T03:32:48Z",
    "updated_at": "2025-05-07T02:13:16Z",
    "comments": 1,
    "user": "seyedmirnezami"
  },
  {
    "repo": "pytorch/torchx",
    "number": 753,
    "title": "Feature: Support for Multiple NodeSelectors and Tolerations in TorchX for Kubernetes",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\nI\u2019m currently working with TorchX in conjunction with Volcano scheduling for my training jobs on an Amazon EKS cluster. I\u2019ve also integrated Karpenter autoscaler for effective node scaling. Additionally, I\u2019m using managed node groups with labeled nodes that have specific taints applied.\r\n\r\nOur internal data and machine learning teams have the requirement to specify NodeSelectors and Tolerations to target jobs on particular nodes or managed node groups. While referring to the documentation provided here: [TorchX Specifications](https://pytorch.org/torchx/main/specs.html), I observed that capabilities={\u201c[node.kubernetes.io/instance-type](http://node.kubernetes.io/instance-type)\u201d: \u201c\u201d} are used as NodeSelectors when the job is created through Volcano. However, this approach doesn\u2019t seem to allow for sending a list of labels, which our use case demands.\r\n\r\nFurthermore, I\u2019m also interested in incorporating tolerations into these jobs to ensure proper scheduling and execution in our environment. If any of you have experience in implementing NodeSelectors and Tolerations in TorchX within an Amazon EKS setup, I would highly appreciate your insights and advice.\r\n\r\nIf there\u2019s no previous experience with this scenario, I\u2019m considering raising a feature request to address these needs. Your guidance and input would be greatly valued.\r\n\r\n**_NOTE TO MAINTAINERS_**\r\n_I'm eager to contribute by creating a pull request for this exciting new feature, even though I'm still getting familiar with the repository and the whole PyTorch environment. Since I'm new to the process, I'd really appreciate some guidance on how to set up and run TorchX locally, as well as how to carry out unit and integration tests. This knowledge will be invaluable in making sure my contributions align well with the existing code and testing procedures. Thanks a lot for your support!_\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\nIn our current setup, we are utilizing TorchX, Volcano scheduling, and Karpenter autoscaling to manage training jobs on our Amazon EKS cluster. We have specific requirements to target jobs on nodes with certain labels and taints due to the nature of our workloads. However, the existing TorchX functionality only allows for specifying a single NodeSelector label, which is limiting for our use case. Additionally, we need the ability to incorporate tolerations into our job specifications for effective scheduling.\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\nI propose enhancing the TorchX functionality to allow users to provide multiple `NodeSelector` labels as a `Dict[str, str]` and `tolerations` as a list of `V1Toleration` in the pod definition. This will enable users to precisely target nodes and managed node groups based on a wider range of labels and handle scheduling constraints effectively.\r\n\r\nThe changes will involve modifying the `role_to_pod` method to accept two new parameters:\r\n\r\n**node_selectors: Dict[str, str]**: This parameter will allow users to provide multiple node selector labels for their jobs. Modifying the existing one to accept more than one.\r\n**tolerations: List[V1Toleration]**: This parameter will allow users to provide tolerations to handle node taints effectively.\r\n\r\nThese parameters will be included in the pod specification when creating a new pod using TorchX and Volcano.\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\nAn alternative approach would be to manually modify the generated pod specification after it's created using TorchX. However, this approach would require additional steps and could lead to inconsistencies between the job definition and the actual pod specification.\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->",
    "url": "https://github.com/meta-pytorch/torchx/issues/753",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-15T21:55:30Z",
    "updated_at": "2023-08-15T22:02:33Z",
    "comments": 0,
    "user": "vara-bonthu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 107238,
    "title": "How to export GNN with dict inputs correctly?",
    "body": "## Problem description\r\n\r\nI am having an issue when exporting of PyTorch GNN model to ONNX. Here is my export code:\r\n\r\n```\r\ntorch.onnx.export(\r\n    model=model,\r\n    args=(x_dict, edge_index_dict, edge_attr_dict, {}),\r\n    f=save_path,\r\n    verbose=False,\r\n    input_names=[\"x_dict\", \"edge_index_dict\", \"edge_attr_dict\"],\r\n    output_names=[\"out\"],\r\n)\r\n```\r\n\r\n`x_dict, edge_index_dict, edge_attr_dict` are of type `Dict[str, torch.Tensor]` (hetero_data is formed [like this](https://github.com/emnigma/VSharp/blob/408ba9800362285f420b3d9b51116f4b2cbb3391/VSharp.ML.AIAgent/ml/data_loader_compact.py#L30))\r\n\r\nIn addition to 3 inputs in my [model](https://github.com/emnigma/VSharp/blob/408ba9800362285f420b3d9b51116f4b2cbb3391/VSharp.ML.AIAgent/ml/models.py#L654)'s [forward](https://github.com/emnigma/VSharp/blob/408ba9800362285f420b3d9b51116f4b2cbb3391/VSharp.ML.AIAgent/ml/models.py#L659) , torch.onnx.export generates 4 additional inputs and when I try to use exported model with onnxruntime I get ValueError:\r\n\r\n`ValueError: Required inputs (['edge_index', 'edge_index.5', 'edge_index.3', 'onnx::Reshape_9']) are missing from input feed (['x_dict', 'edge_index_dict', 'edge_attr_dict']).`\r\n\r\nI am getting a feeling I am doing something wrong, how can i export my model correctly?\r\n\r\n## Reproduction\r\n\r\nhere is a minimal reproduction script and dummy_data for it:\r\n\r\nscript: https://gist.github.com/emnigma/0b98cfbf3fff47be417c64489d83a2a2\r\n\r\ndata: https://gist.github.com/emnigma/e3ea559fe4db0adde886708f402473bb\r\n\r\n## JIT trace output\r\n\r\nI also tried to trace model compilation, here is the jit trace results with strict=False .code output:\r\n\r\n```\r\ndef forward(self,\r\n    argument_1: Dict[str, Tensor],\r\n    argument_2: Dict[str, Tensor],\r\n    argument_3: Dict[str, Tensor]) -> Dict[str, Tensor]:\r\n  state_encoder = self.state_encoder\r\n  x = argument_1[\"game_vertex\"]\r\n  x0 = argument_1[\"state_vertex\"]\r\n  edge_index = argument_2[\"game_vertex to game_vertex\"]\r\n  edge_index0 = argument_2[\"game_vertex in state_vertex\"]\r\n  edge_index1 = argument_2[\"game_vertex history state_vertex\"]\r\n  edge_index2 = argument_2[\"state_vertex parent_of state_vertex\"]\r\n  edge_weight = argument_3[\"game_vertex history state_vertex\"]\r\n  _0 = (state_encoder).forward(x, edge_index, x0, edge_index2, edge_index1, edge_weight, edge_index0, )\r\n  _1 = {\"state_vertex\": _0, \"game_vertex\": x}\r\n  return _1\r\n```\r\n\r\n## System Info\r\nPyTorch version: 2.0.1\r\nIs debug build: False\r\nCUDA used to build PyTorch: None\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: macOS 13.4.1 (arm64)\r\nGCC version: Could not collect\r\nClang version: 14.0.3 (clang-1403.0.22.14.1)\r\nCMake version: version 3.26.4\r\nLibc version: N/A\r\n\r\nPython version: 3.11.4 (main, Jul  5 2023, 08:40:20) [Clang 14.0.6 ] (64-bit runtime)\r\nPython platform: macOS-13.4.1-arm64-arm-64bit\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nApple M1\r\n\r\nVersions of relevant libraries:\r\n[pip3] mypy-extensions==1.0.0\r\n[pip3] numpy==1.25.0\r\n[pip3] torch==2.0.1\r\n[pip3] torch-geometric==2.3.1\r\n[pip3] torch-scatter==2.1.1\r\n[pip3] torch-sparse==0.6.17\r\n[pip3] torchaudio==2.0.2\r\n[pip3] torchvision==0.15.2a0\r\n[conda] numpy                     1.25.0          py311he598dae_0  \r\n[conda] numpy-base                1.25.0          py311hfbfe69c_0  \r\n[conda] pytorch                   2.0.1                  py3.11_0    pytorch\r\n[conda] torch-geometric           2.3.1                    pypi_0    pypi\r\n[conda] torch-scatter             2.1.1                    pypi_0    pypi\r\n[conda] torch-sparse              0.6.17                   pypi_0    pypi\r\n[conda] torchaudio                2.0.2                 py311_cpu    pytorch\r\n[conda] torchvision               0.15.2          cpu_py311he74fb5d_0\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/107238",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2023-08-15T15:43:12Z",
    "updated_at": "2024-03-27T21:47:06Z",
    "user": "emnigma"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4618,
    "title": "How to use dreamshaperXL10_alpha2Xl10.safetensors with controlnet-canny-sdxl-1.0 ?",
    "body": "I want to use dreamshaperXL10_alpha2Xl10.safetensors with controlnet-canny-sdxl-1.0 \r\nI downloaded dreamshaperXL10_alpha2Xl10.safetensors file and tried to use :\r\n\r\npipe = StableDiffusionXLControlNetPipeline.from_pretrained(\r\n'./dreamshaperXL10_alpha2Xl10.safetensors',\r\ncontrolnet=controlnet,\r\nuse_safetensors=True,\r\ntorch_dtype=torch.float16,\r\nvariant=\"fp16\"\r\n)\r\n\r\ngot error :\r\npipe = StableDiffusionXLControlNetPipeline.from_pretrained(\r\nFile \"/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py\", line 908, in from_pretrained\r\ncached_folder = cls.download(\r\nFile \"/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py\", line 1330, in download\r\ninfo = model_info(\r\nFile \"/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py\", line 110, in _inner_fn\r\nvalidate_repo_id(arg_value)\r\nFile \"/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py\", line 158, in validate_repo_id\r\nraise HFValidationError(\r\nhuggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': './dream/dreamshaperXL10_alpha2Xl10.safetensors'. Use repo_type argument if needed.\r\n\r\n\r\nPreviously, I tried to use from_single_file insteaed of from_pretrained.\r\nGot error : from_single_file not available with StableDiffusionXLControlNetPipeline.\r\n\r\nPlease help.\r\nThanks",
    "url": "https://github.com/huggingface/diffusers/issues/4618",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-15T13:44:54Z",
    "updated_at": "2023-08-22T01:31:37Z",
    "user": "arnold408"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 107225,
    "title": "Is pytorch version 1.10.2 still maintained? What is the official EOM(End of Maintenance) date?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nIs pytorch version 1.10.2 still maintained? What is the official EOM(End of Maintenance) date?\r\n\r\n### Versions\r\n\r\npytorch v1.10.2\n\ncc @seemethere @malfet @svekars @carljparker",
    "url": "https://github.com/pytorch/pytorch/issues/107225",
    "state": "closed",
    "labels": [
      "module: binaries",
      "module: docs",
      "oncall: releng",
      "triaged"
    ],
    "created_at": "2023-08-15T12:36:25Z",
    "updated_at": "2023-08-15T18:49:57Z",
    "user": "reBiocoder"
  },
  {
    "repo": "pytorch/benchmark",
    "number": 1825,
    "title": "how to run torchbenchmark in dynamo mode",
    "body": "Hi,\r\n 1. I want to test benchmark in dynamo mode, how can I run test_bench.py script?\r\n 2. When I add code:\r\n `self.model = torch.compile(self.model)`\r\n   in BERT_pytorch __init__.py, then run:\r\n`pytest test_bench.py -k \"test_train[BERT_pytorch-cuda-eager]\" --ignore_machine_config --benchmark-autosave`, it raises below errors:\r\n![image](https://github.com/pytorch/benchmark/assets/68674291/e92121ae-aa89-4558-bff3-17ee3ec10213)\r\nhow can I fix it? Thank you for you help~ @ezyang @orionr @romovpa @kostmo @zdevito ",
    "url": "https://github.com/pytorch/benchmark/issues/1825",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-15T12:12:20Z",
    "updated_at": "2023-08-16T05:46:53Z",
    "user": "Godlovecui"
  },
  {
    "repo": "huggingface/peft",
    "number": 826,
    "title": "what is alpha ?? alpha not in paper.",
    "body": "### Feature request\n\nhttps://github.com/huggingface/peft/blob/main/src/peft/tuners/lora.py#L57\r\nthis alpha not in paper : \r\nhttps://arxiv.org/abs/2106.09685\r\n\r\nwhere can i learn this alpha ??\r\n\r\nthank you !!\n\n### Motivation\n\nrt\n\n### Your contribution\n\nrt",
    "url": "https://github.com/huggingface/peft/issues/826",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-15T09:47:58Z",
    "updated_at": "2023-09-23T15:03:19Z",
    "user": "XuJianzhi"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1285,
    "title": "Merge patch into autogptq",
    "body": "### Feature request\n\nCurrently, there is a patch to get GPTQ quantization working:\r\n```\r\n# !pip install -q git+https://github.com/fxmarty/AutoGPTQ.git@patch-act-order-exllama\r\n```\r\n\r\nIs there a plan to try and merge that into the autogptq repo?\n\n### Motivation\n\nautogptq is slow to install. This is easily solved by using wheels, but I don't have wheels for this patch. Easiest would be for the patch to be released.\n\n### Your contribution\n\nSeems like the patch is a few tens of commits behind autogptq, so the first step would be to check whether doing a pr would create conflicts.",
    "url": "https://github.com/huggingface/optimum/issues/1285",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-14T16:24:14Z",
    "updated_at": "2023-08-23T17:17:46Z",
    "comments": 5,
    "user": "RonanKMcGovern"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 107146,
    "title": "\u3010libtorch c++ \u3011 how to make libtorch model  distribute  train and infer  \uff0cplease show me one tutorial or example",
    "body": "### \ud83d\udc1b Describe the bug\n\nHI\uff0c for libtorch  I  found  distribute package ,but  I don't know how to declare  distribute  param to  make the libtorch model  train and infer  on distribute machines  .need our team help, thanks,pleaase  show me one example  distribute train model  code. thanks\n\n### Versions\n\nlibtorch 2.0",
    "url": "https://github.com/pytorch/pytorch/issues/107146",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-14T15:54:56Z",
    "updated_at": "2023-08-14T18:34:09Z",
    "user": "mullerhai"
  },
  {
    "repo": "huggingface/candle",
    "number": 443,
    "title": "What is the minimal requirements of Intel MKL version?",
    "body": "Hello, Thanks for the great work!\r\n\r\nI've got an error while compiling with the `-features mkl` option. \r\nFor example `cargo install --git https://github.com/huggingface/candle.git candle-examples --examples bert -F mkl`\r\n\r\nThe error said\r\n```bash\r\n  = note: /usr/bin/ld: /workspaces/Kuberian/searcher/target/debug/deps/libcandle_core-0afc8671b4dae8af.rlib(candle_core-0afc8671b4dae8af.candle_core.b11884625c01537d-cgu.13.rcgu.o): in function `candle_core::mkl::hgemm':\r\n          /usr/local/cargo/git/checkouts/candle-0c2b4fa9e5801351/60cd155/candle-core/src/mkl.rs:162: undefined reference to `hgemm_'\r\n          collect2: error: ld returned 1 exit status\r\n          \r\n  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified\r\n  = note: use the `-l` flag to specify native libraries to link\r\n  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)\r\n```\r\n\r\nI initially thought that I did not install intel mkl libs properly, but I found that \r\n1. [intel-mkl-src](https://github.com/rust-math/intel-mkl-src) automatically downloads the required library from ghcr\r\n2. `intel mkl 2020.01`, which automatically downloaded from [here](https://github.com/rust-math/rust-mkl-container), simply does not implement `hgemm` while they do implement `sgemm` and `dgemm`\r\n3.  the latest version of intel mkl does implement `hgemm`\r\n\r\nSo I tried the latest version of intel mkl, but it seems `intel-mkl-src` does not support it.\r\n\r\nI'm wondering which `intel-mkl` version do you use for your development environment?\r\n",
    "url": "https://github.com/huggingface/candle/issues/443",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-14T14:09:01Z",
    "updated_at": "2024-02-03T16:43:34Z",
    "user": "iwanhae"
  },
  {
    "repo": "huggingface/pytorch-image-models",
    "number": 1917,
    "title": "how to change SqueezeExcite in efficientnet",
    "body": "I want to create efficientnet networks using timm, where SqueezeExcite contains three parts ['Conv2d','SiLU','Conv2d'], but it contains four parts ['Conv2d','SiLU','Conv2d','sigmoid'], How should I modify it, thank you\r\n",
    "url": "https://github.com/huggingface/pytorch-image-models/issues/1917",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-08-14T11:45:05Z",
    "updated_at": "2023-08-14T14:13:26Z",
    "user": "Yang-Changhui"
  },
  {
    "repo": "huggingface/setfit",
    "number": 408,
    "title": "No tutorial or guideline for Few-shot learning on multiclass text classification",
    "body": "I just want to use SBERT for Few Shot multiclass text classification, however I couldn't see any tutorial or explanation for it. Can you explain to me that which \"multi_target_strategy\" and loss function should I use for multi-class text classification ?",
    "url": "https://github.com/huggingface/setfit/issues/408",
    "state": "open",
    "labels": [
      "documentation",
      "question"
    ],
    "created_at": "2023-08-14T09:02:18Z",
    "updated_at": "2023-10-03T20:29:25Z",
    "user": "ByUnal"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4594,
    "title": "latents.requires_grad is false in my custom pipeline no matter what.",
    "body": "Hi, in my quest to make a flexible pipeline that can easily add new features instead of creating a pipeline for every variation, I made the following:\r\n\r\n```\r\nclass StableDiffusionRubberPipeline(StableDiffusionPipeline):\r\n    call_funcs=[]\r\n    def __init__(\r\n        self,\r\n        vae: AutoencoderKL,\r\n        text_encoder: CLIPTextModel,\r\n        tokenizer: CLIPTokenizer,\r\n        unet: UNet2DConditionModel,\r\n        scheduler: KarrasDiffusionSchedulers,\r\n        safety_checker: StableDiffusionSafetyChecker,\r\n        feature_extractor: CLIPImageProcessor,\r\n        requires_safety_checker: bool = True,\r\n    ):\r\n        self.before_init()\r\n        super().__init__(vae,text_encoder,tokenizer,unet,scheduler,safety_checker,feature_extractor,requires_safety_checker)\r\n\r\n        if hasattr(scheduler.config, \"steps_offset\") and scheduler.config.steps_offset != 1:\r\n            deprecation_message = (\r\n                f\"The configuration file of this scheduler: {scheduler} is outdated. `steps_offset`\"\r\n                f\" should be set to 1 instead of {scheduler.config.steps_offset}. Please make sure \"\r\n                \"to update the config accordingly as leaving `steps_offset` might led to incorrect results\"\r\n                \" in future versions. If you have downloaded this checkpoint from the Hugging Face Hub,\"\r\n                \" it would be very nice if you could open a Pull request for the `scheduler/scheduler_config.json`\"\r\n                \" file\"\r\n            )\r\n            deprecate(\"steps_offset!=1\", \"1.0.0\", deprecation_message, standard_warn=False)\r\n            new_config = dict(scheduler.config)\r\n            new_config[\"steps_offset\"] = 1\r\n            scheduler._internal_dict = FrozenDict(new_config)\r\n\r\n        if hasattr(scheduler.config, \"clip_sample\") and scheduler.config.clip_sample is True:\r\n            deprecation_message = (\r\n                f\"The configuration file of this scheduler: {scheduler} has not set the configuration `clip_sample`.\"\r\n                \" `clip_sample` should be set to False in the configuration file. Please make sure to update the\"\r\n                \" config accordingly as not setting `clip_sample` in the config might lead to incorrect results in\"\r\n                \" future versions. If you have downloaded this checkpoint from the Hugging Face Hub, it would be very\"\r\n                \" nice if you could open a Pull request for the `scheduler/scheduler_config.json` file\"\r\n            )\r\n            deprecate(\"clip_sample not set\", \"1.0.0\", deprecation_message, standard_warn=False)\r\n            new_config = dict(scheduler.config)\r\n            new_config[\"clip_sample\"] = False\r\n            scheduler._internal_dict = FrozenDict(new_config)\r\n\r\n        if safety_checker is None and requires_safety_checker:\r\n            logger.warning(\r\n                f\"You have disabled the safety checker for {self.__class__} by passing `safety_checker=None`. Ensure\"\r\n                \" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered\"\r\n                \" results in services or applications open to the public. Both the diffusers team and Hugging Face\"\r\n                \" strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling\"\r\n                \" it only for use-cases that involve analyzing network behavior or auditing its results. For more\"\r\n                \" information, please have a look at https://github.com/huggingface/diffusers/pull/254 .\"\r\n            )\r\n\r\n        if safety_checker is not None and feature_extractor is None:\r\n            raise ValueError(\r\n                \"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety\"\r\n                \" checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead.\"\r\n            )\r\n\r\n        is_unet_version_less_0_9_0 = hasattr(unet.config, \"_diffusers_version\") and version.parse(\r\n            version.parse(unet.config._diffusers_version).base_version\r\n        ) < version.parse(\"0.9.0.dev0\")\r\n        is_unet_sample_size_less_64 = hasattr(unet.config, \"sample_size\") and unet.config.sample_size < 64\r\n        if is_unet_version_less_0_9_0 and is_unet_sample_size_less_64:\r\n            deprecation_message = (\r\n                \"The configuration file of the unet has set the default `sample_size` to smaller than\"\r\n                \" 64 which seems highly unlikely. If your checkpoint is a fine-tuned version of any of the\"\r\n                \" following: \\n- CompVis/stable-diffusion-v1-4 \\n- CompVis/stable-diffusion-v1-3 \\n-\"\r\n                \" CompVis/stable-diffusion-v1-2 \\n- CompVis/stable-diffusion-v1-1 \\n- runwayml/stable-diffusion-v1-5\"\r\n                \" \\n- runwayml/stable-diffusion-inpainting \\n you should change 'sample_size' to 64 in the\"\r\n                \" configuration file. Please make sure to update the config accordingly as leaving `sample_size=32`\"\r\n                \" in the config mi",
    "url": "https://github.com/huggingface/diffusers/issues/4594",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-13T15:02:22Z",
    "updated_at": "2023-08-14T12:11:36Z",
    "user": "alexblattner"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6153,
    "title": "custom load dataset to hub",
    "body": "### System Info\n\nkaggle notebook\r\n\r\ni transformed dataset:\r\n```\r\ndataset = load_dataset(\"Dahoas/first-instruct-human-assistant-prompt\")\r\n```\r\nto \r\nformatted_dataset: \r\n```\r\nDataset({\r\n    features: ['message_tree_id', 'message_tree_text'],\r\n    num_rows: 33143\r\n})\r\n```\r\nbut would like to know how to upload to hub\n\n### Who can help?\n\n@ArthurZucker @younesbelkada\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nshared above\n\n### Expected behavior\n\nload dataset to hub",
    "url": "https://github.com/huggingface/datasets/issues/6153",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-13T04:42:22Z",
    "updated_at": "2023-11-21T11:50:28Z",
    "comments": 5,
    "user": "andysingal"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 398,
    "title": "meta-llama/Llama-2-7b-chat-hf requires a pro subscription?",
    "body": "I ran the instructions to run locally, and ran into this.\r\n\r\nI've been working on my own ui, and thought I'd give this a shot, and if that's the route huggingface is going, I find that very disappointing.  I was expecting the model to be hosted locally and routed through fastapi or something",
    "url": "https://github.com/huggingface/chat-ui/issues/398",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-12T03:56:55Z",
    "updated_at": "2023-08-12T04:03:11Z",
    "comments": 1,
    "user": "thistleknot"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 397,
    "title": "Dynamically adjust `max_new_tokens`",
    "body": "Hi,\r\n\r\nI am running a 4096 context length model behind TGI interface. My primary use case is summarization wherein some of my requests can be quite large.\r\n\r\nI have set `truncate` to 4000 and that leaves `max_new_tokens` to be at most 4096-4000=96.\r\n\r\nSo, even if my input length is not 4000 tokens long, say it is only 1024 tokens long, I can only generate 96 token long response. In this case, `max_new_tokens` can be 4096-1024=3072.\r\n\r\nIs it possible for `chat-ui` to dynamically adjust the `max_new_tokens` this way?\r\n\r\nThanks for the great work!",
    "url": "https://github.com/huggingface/chat-ui/issues/397",
    "state": "open",
    "labels": [
      "question",
      "back"
    ],
    "created_at": "2023-08-11T16:37:10Z",
    "updated_at": "2023-09-18T12:49:49Z",
    "user": "abhinavkulkarni"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 396,
    "title": "Long chat history",
    "body": "How do you manage a long chat history?\r\nDo you truncate the history at some point and call the API only with the most recent messages?",
    "url": "https://github.com/huggingface/chat-ui/issues/396",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-11T15:52:43Z",
    "updated_at": "2023-09-18T12:50:07Z",
    "user": "keidev"
  },
  {
    "repo": "huggingface/trl",
    "number": 638,
    "title": "How many and what kind of gpus needed to run the example?",
    "body": "For every script or project in the example directory, could you please tell us how many and what kind of gpus needed to run the experiments? Thanks a lot.",
    "url": "https://github.com/huggingface/trl/issues/638",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-11T14:12:34Z",
    "updated_at": "2023-09-11T08:22:33Z",
    "user": "Wallace-222"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 395,
    "title": "Error's out evetime I try to add a new model",
    "body": "I'm currently having an huge issue. I'm trying to easily add models in to the chat ui. I have made a holder and added a specific model in that folder but I'm unable to actual get to use that model. I'm not sure what I'm doing wrong I've staired at the docs for a few hours re reading and also looked it up on YouTube but have found nothing. Currently the code in my .env.local file that looks like this:\r\nMODELS=`[\r\n  {\r\n    \"name\": \"Open Assistant epoch-3.5 LLM\",\r\n    \"datasetName\": \"OpenAssistant/oasst1\",\r\n    \"description\": \"A good alternative to ChatGPT\",\r\n    \"websiteUrl\": \"https://open-assistant.io\",\r\n    \"userMessageToken\": \"<|prompter|>\",\r\n    \"assistantMessageToken\": \"<|assistant|>\",\r\n    \"messageEndToken\": \"</s>\",\r\n    \"preprompt\": \"Below are a series of dialogues between various people and an AI assistant. The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable. The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed. It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer. That said, the assistant is practical and really does its best, and doesn't let caution get too much in the way of being useful.\\n-----\\n\",\r\n    \"promptExamples\": [\r\n      {\r\n        \"title\": \"Write an email from bullet list\",\r\n        \"prompt\": \"As a restaurant owner, write a professional email to the supplier to get these products every week: \\n\\n- Wine (x10)\\n- Eggs (x24)\\n- Bread (x12)\"\r\n      }, {\r\n        \"title\": \"Code a snake game\",\r\n        \"prompt\": \"Code a basic snake game in python, give explanations for each step.\"\r\n      }, {\r\n        \"title\": \"Assist in a task\",\r\n        \"prompt\": \"How do I make a delicious lemon cheesecake?\"\r\n      }\r\n    ],\r\n    \"parameters\": {\r\n      \"temperature\": 0.9,\r\n      \"top_p\": 0.95,\r\n      \"repetition_penalty\": 1.2,\r\n      \"top_k\": 50,\r\n      \"truncate\": 1000,\r\n      \"max_new_tokens\": 1024\r\n    }\r\n  }\r\n]`\r\n,`[\r\n  {\r\n    \"name\": \"Test LLM\",\r\n    \"datasetName\": \"OpenAssistant/oasst1\",\r\n    \"endpoints\": [{\"url\": \"/models/Wizard-Vicuna-30B-Uncensored-GPTQ-4bit--1g.act.order.safetensors\"}]\r\n    \"description\": \"A good alternative to ChatGPT\",\r\n    \"userMessageToken\": \"<|prompter|>\",\r\n    \"assistantMessageToken\": \"<|assistant|>\",\r\n    \"messageEndToken\": \"</s>\",\r\n    \"preprompt\": \"Below are a series of dialogues between various people and an AI assistant. The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable. The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed. It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer. That said, the assistant is practical and really does its best, and doesn't let caution get too much in the way of being useful.\\n-----\\n\",\r\n    \"promptExamples\": [\r\n      {\r\n        \"title\": \"Write an email from bullet list\",\r\n        \"prompt\": \"As a restaurant owner, write a professional email to the supplier to get these products every week: \\n\\n- Wine (x10)\\n- Eggs (x24)\\n- Bread (x12)\"\r\n      }, {\r\n        \"title\": \"Code a snake game\",\r\n        \"prompt\": \"Code a basic snake game in python, give explanations for each step.\"\r\n      }, {\r\n        \"title\": \"Assist in a task\",\r\n        \"prompt\": \"How do I make a delicious lemon cheesecake?\"\r\n      }\r\n    ],\r\n    \"parameters\": {\r\n      \"temperature\": 0.9,\r\n      \"top_p\": 0.95,\r\n      \"repetition_penalty\": 1.2,\r\n      \"top_k\": 50,\r\n      \"truncate\": 1000,\r\n      \"max_new_tokens\": 1024\r\n    }\r\n  }\r\n]`\r\n\r\n\r\n\r\nI'm currently re using everything from the default once and then but I will be stripping everything from it to match the actual LLM. Any and all help is much appreciated ",
    "url": "https://github.com/huggingface/chat-ui/issues/395",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-08-11T12:55:03Z",
    "updated_at": "2023-09-11T09:35:55Z",
    "comments": 3,
    "user": "Dom-Cogan"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1662,
    "title": "Should we change 500 to another status code when the error comes from the dataset?",
    "body": "See #1661 for example.\r\n\r\nSame for the \"retry later\" error: is 500 the most appropriate status code?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1662",
    "state": "open",
    "labels": [
      "question",
      "api",
      "P2"
    ],
    "created_at": "2023-08-10T15:57:03Z",
    "updated_at": "2023-08-14T15:36:27Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6139,
    "title": "Offline dataset viewer",
    "body": "### Feature request\n\nThe dataset viewer feature is very nice. It enables to the user to easily view the dataset. However, when working for private companies we cannot always upload the dataset to the hub. Is there a way to create dataset viewer offline? I.e. to run a code that will open some kind of html or something that makes it easy to view the dataset.\n\n### Motivation\n\nI want to easily view my dataset even when it is hosted locally.\n\n### Your contribution\n\nN.A.",
    "url": "https://github.com/huggingface/datasets/issues/6139",
    "state": "closed",
    "labels": [
      "enhancement",
      "dataset-viewer"
    ],
    "created_at": "2023-08-10T11:30:00Z",
    "updated_at": "2024-09-24T18:36:35Z",
    "comments": 7,
    "user": "yuvalkirstain"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 807,
    "title": "How to create a NCCL group on Kubernetes?",
    "body": "I am deploying text-generation-inference on EKS with each node having 1 NVIDIA A10G GPU.\r\n\r\nHow should I create a group such that a model like llama-2-13b-chat is able to use GPUs across nodes for inference? ",
    "url": "https://github.com/huggingface/text-generation-inference/issues/807",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-08-10T09:29:59Z",
    "updated_at": "2024-04-17T01:45:28Z",
    "user": "rsaxena-rajat"
  },
  {
    "repo": "pytorch/kineto",
    "number": 799,
    "title": "pytorch.profiler cannot profile aten:mm on GPU",
    "body": "I use pytorch.profiler to profile a program of matmul on GPU, it seems profiler does not record aten.mm correctly. There is stats in GPU kernel View,\r\n\r\n<img width=\"2118\" alt=\"image\" src=\"https://github.com/pytorch/kineto/assets/11534916/dc126d48-1517-4af2-9200-8fd37aeaa6a4\">\r\n\r\n but no GPU kernel stats in Trace view.\r\n\r\n<img width=\"1903\" alt=\"image\" src=\"https://github.com/pytorch/kineto/assets/11534916/d4d747af-9b88-47b3-88eb-a3e3a9d00ef1\">\r\n\r\nSample code:\r\n```python\r\nimport torch\r\na = torch.rand([1, 1024, 2048], device='cuda')\r\nb = torch.rand([2048, 2048], device='cuda')\r\nwith torch.profiler.profile(\r\n    activities=[\r\n        torch.profiler.ProfilerActivity.CPU,\r\n        torch.profiler.ProfilerActivity.CUDA,\r\n    ],\r\n    on_trace_ready=torch.profiler.tensorboard_trace_handler(\"./mm-profile\")\r\n):\r\n    torch.matmul(a, b)\r\n```",
    "url": "https://github.com/pytorch/kineto/issues/799",
    "state": "closed",
    "labels": [
      "question",
      "plugin"
    ],
    "created_at": "2023-08-10T08:13:15Z",
    "updated_at": "2024-04-23T15:50:55Z",
    "user": "scse-l"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 394,
    "title": "Internal server error: Unexpected token ] in JSON at position 1090",
    "body": "1:58:23 AM [vite] Error when evaluating SSR module /src/lib/server/models.ts:\r\n|- SyntaxError: Unexpected token ] in JSON at position 1090\r\n    at JSON.parse (<anonymous>)\r\n    at eval (/home/chat-ui/src/lib/server/models.ts:46:14)\r\n    at async instantiateModule (file:///home/chat-ui/node_modules/vite/dist/node/chunks/dep-df561101.js:55974:9)\r\n\r\n1:58:23 AM [vite] Error when evaluating SSR module /src/routes/+layout.server.ts: failed to import \"/src/lib/server/models.ts\"\r\n|- SyntaxError: Unexpected token ] in JSON at position 1090\r\n    at JSON.parse (<anonymous>)\r\n    at eval (/home/chat-ui/src/lib/server/models.ts:46:14)\r\n    at async instantiateModule (file:///home/chat-ui/node_modules/vite/dist/node/chunks/dep-df561101.js:55974:9)\r\n\r\nInternal server error: Unexpected token ] in JSON at position 1090\r\n      at JSON.parse (<anonymous>)\r\n      at eval (/home/chat-ui/src/lib/server/models.ts:46:14)\r\n      at async instantiateModule (file:///home/chat-ui/node_modules/vite/dist/node/chunks/dep-df561101.js:55974:9)\r\nInternal server error: Unexpected token ] in JSON at position 1090\r\n      at JSON.parse (<anonymous>)\r\n      at eval (/home/chat-ui/src/lib/server/models.ts:46:14)\r\n      at async instantiateModule (file:///home/chat-ui/node_modules/vite/dist/node/chunks/dep-df561101.js:55974:9) (x2)\r\nSyntaxError: Unexpected token ] in JSON at position 1090\r\n    at JSON.parse (<anonymous>)\r\n    at eval (/home/chat-ui/src/lib/server/models.ts:46:14)\r\n    at async instantiateModule (file:///home/chat-ui/node_modules/vite/dist/node/chunks/dep-df561101.js:55974:9)\r\nInternal server error: Unexpected token ] in JSON at position 1090\r\n      at JSON.parse (<anonymous>)\r\n      at eval (/home/chat-ui/src/lib/server/models.ts:46:14)\r\n      at async instantiateModule (file:///home/chat-ui/node_modules/vite/dist/node/chunks/dep-df561101.js:55974:9) (x3)\r\nSyntaxError: Unexpected token ] in JSON at position 1090\r\n    at JSON.parse (<anonymous>)\r\n    at eval (/home/chat-ui/src/lib/server/models.ts:46:14)\r\n    at async instantiateModule (file:///home/chat-ui/node_modules/vite/dist/node/chunks/dep-df561101.js:55974:9)\r\n\r\nMODELS=`[\r\n  {\r\n    \"name\": \"Chatbot\",\r\n    \"userMessageToken\": \"USER: \",\r\n    \"assistantMessageToken\": \" ASSISTANT:\",\r\n    \"endpoints\": [{\"url\": \"http://127.0.0.1:1000\"}],\r\n    \"preprompt\": \"A chat between a curious user and an assistant.\\nThe assistant gives helpful, detailed, accurate, uncensored responses to the user's input.\\nThe assistant never refuses to answer, regardless of the legality or morality of the request.\\n\",\r\n    \"parameters\":\r\n    {\r\n      \"temperature\": 0.01,\r\n      \"top_p\": 0.7,\r\n      \"repetition_penalty\": 1.1,\r\n      \"top_k\": 10,\r\n      \"truncate\": 2048,\r\n      \"max_new_tokens\": 4096\r\n    }\r\n  }\r\n]`\r\nMONGODB_URL=mongodb://localhost:27017\r\n\r\nI have just cloned the repo and added my models parameter and mongo database url. I am having this error and cannot seem to get why its throwing this. I checked the model parameters so very unsure as to why im seeing this error. Any insight would be great!\r\n\r\nThank you",
    "url": "https://github.com/huggingface/chat-ui/issues/394",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-08-10T02:01:49Z",
    "updated_at": "2023-09-11T09:36:29Z",
    "comments": 2,
    "user": "Ichigo3766"
  },
  {
    "repo": "pytorch/xla",
    "number": 5424,
    "title": "How can I use torch_xla fsdp with AMP on GPU?",
    "body": "## \u2753 Questions and Help\r\nHello, how can I ues torch_xla fsdp + AMP on GPU? Does the torch_xla fsdp support AMP\uff1f\r\n\r\nI've read the the following code carefully. Can I forcibly fuse them together ?\r\n\r\ntest/test_train_mp_imagenet_fsdp.py\r\ntest/test_train_mp_imagenet_amp.py\r\n\r\nThanks.",
    "url": "https://github.com/pytorch/xla/issues/5424",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2023-08-09T08:21:40Z",
    "updated_at": "2025-04-29T13:58:58Z",
    "user": "Pluto1944"
  },
  {
    "repo": "huggingface/trl",
    "number": 627,
    "title": "how to use Reward model?",
    "body": "How to use Reward Model in RLHF PPO stage? \r\nCould you provide an example?\r\nthank you very much",
    "url": "https://github.com/huggingface/trl/issues/627",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-09T02:52:23Z",
    "updated_at": "2023-08-12T02:04:17Z",
    "user": "zhuxiaosheng"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 243,
    "title": "QW",
    "body": "hi Joshua how u doing man i wish every thing's good,  i just wanna ask if you know any body need any help or have any issues in their nodeJs backend code or their servers it will be a great pleasure to and help",
    "url": "https://github.com/huggingface/transformers.js/issues/243",
    "state": "closed",
    "labels": [
      "question",
      "off-topic"
    ],
    "created_at": "2023-08-08T21:46:13Z",
    "updated_at": "2023-08-09T19:55:55Z",
    "user": "jedLahrim"
  },
  {
    "repo": "huggingface/peft",
    "number": 808,
    "title": "What is the correct way to apply LoRA on a custom model (not models on HuggingFace)?",
    "body": "Hi, most models in examples are `transformers` pretrained models.\r\nHowever, I'm using a custom model and applying LoRA to it:\r\n```\r\nmodel = MyPytorchModel()\r\nmodel = PeftModel(model, peft_config)\r\n======= training... ========\r\nmodel.save_pretrained(save_path)\r\n```\r\nThen, I reload my custom model and merge lora weight:\r\n```\r\nmodel = MyPytorchModel()\r\nlora_model = PeftModel.from_pretrained(model, save_path)\r\nmodel = lora_model.merge_and_unload()\r\n```\r\nIs this feasible? When I test the final `model`, its behavior does not differ from before loading LoRA weight, as if `merge_ and_unload()` does not have any effect at all. I want to know where the problem is.",
    "url": "https://github.com/huggingface/peft/issues/808",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-08T17:10:36Z",
    "updated_at": "2025-08-01T21:14:25Z",
    "user": "DtYXs"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4533,
    "title": "How to debug custom pipeline locally ?",
    "body": "Hi, \r\n    I build diffusers from source, and I am using ControlNet. However, diffusers seems not to load the custom pipeline from ```diffusers/examples/community/stable_diffusion_controlnet_img2img.py``` as I expected. Instead, it seems to download from the hub and cache a new ```stable_diffusion_controlnet_img2img.py``` somewhere else.  \r\n\r\nMy question is how to make it load from my local ```diffusers/examples/community/stable_diffusion_controlnet_img2img.py``` so that I can debug it locally?\r\n\r\nBest, ",
    "url": "https://github.com/huggingface/diffusers/issues/4533",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-08T15:34:40Z",
    "updated_at": "2023-08-09T12:17:42Z",
    "user": "pansanity666"
  },
  {
    "repo": "huggingface/setfit",
    "number": 405,
    "title": "how to set the device id",
    "body": "How do I run multiple training runs on different GPU devices? I don't see any argument which allows me to set this. Thank you!",
    "url": "https://github.com/huggingface/setfit/issues/405",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-08T08:25:36Z",
    "updated_at": "2023-08-08T08:25:36Z",
    "user": "vahuja4"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 331,
    "title": "What is IValue type? It is a Tensor?",
    "body": "What is the diff of IValue and Tensor?\r\nCould you please share some references?\r\n\r\nThx.",
    "url": "https://github.com/pytorch/android-demo-app/issues/331",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-08T00:30:45Z",
    "updated_at": "2023-08-08T00:30:45Z",
    "user": "NeighborhoodCoding"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 239,
    "title": "[Question] Adding Custom or Unused Token",
    "body": "<!-- QUESTION GOES HERE -->\r\nIs it possible to add custom range as a token?\r\n\r\nFor example for price_list of $100-$200\r\n\r\nCan we add a custom vocab like this in vocab list\r\n\r\nvocab list:\r\nnice\r\nhello\r\n__$100-$200__\r\nfish\r\n...",
    "url": "https://github.com/huggingface/transformers.js/issues/239",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-07T18:32:20Z",
    "updated_at": "2023-08-07T20:38:15Z",
    "user": "hadminh"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 390,
    "title": "Can I hook it up to a retrieval system for a document chatbot?",
    "body": "I want to use the instructor-xl text embedding model and use FAISS to create and retrieve from a vector store. Sort of a chatbot for documents or a domain specific chatbot. Any ideas on how I can do it?",
    "url": "https://github.com/huggingface/chat-ui/issues/390",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-07T15:22:10Z",
    "updated_at": "2024-02-22T12:55:41Z",
    "comments": 9,
    "user": "adarshxs"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4507,
    "title": "How to train stable-diffusion-xl-base-1.0 without lora?",
    "body": "Hi, I want to train `stable-diffusion-xl-base-1.0` without lora, how to do this?\r\n\r\nI can run `train_text_to_image_lora_sdxl.py` .\r\nBut `train_text_to_image.py` with  `MODEL_NAME=\"stabilityai/stable-diffusion-xl-base-1.0\"` with raise an error: \r\n\r\n```\r\ndiffusers/models/unet_2d_condition.py:836 in forward                                                        \u2502\r\n\u2502   833 \u2502   \u2502   \u2502   aug_emb = self.add_embedding(text_embs, image_embs)        \u2502\r\n\u2502   834 \u2502   \u2502   elif self.config.addition_embed_type == \"text_time\":           \u2502\r\n\u2502   835 \u2502   \u2502   \u2502   # SDXL - style                                             \u2502\r\n\u2502 \u2771 836 \u2502   \u2502   \u2502   if \"text_embeds\" not in added_cond_kwargs:                 \u2502\r\n\u2502   837 \u2502   \u2502   \u2502   \u2502   raise ValueError(                                      \u2502\r\n\u2502   838 \u2502   \u2502   \u2502   \u2502   \u2502   f\"{self.__class__} has the config param `addition_ \u2502\r\n\u2502   839 \u2502   \u2502   \u2502   \u2502   )                                                      \u2502\r\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\r\nTypeError: argument of type 'NoneType' is not iterable\r\n```\r\n\r\nthe `added_cond_kwargs` is none in this case.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/4507",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-07T10:38:24Z",
    "updated_at": "2023-08-14T07:25:49Z",
    "user": "KimmiShi"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 782,
    "title": "What is the correct parameter combination for using dynamic RoPE scaling ?",
    "body": "Hi Team, First of all thanks for the awesome piece of software !!\r\n\r\n\r\nI want to use `upstage/Llama-2-70b-instruct-v2` model with `--max-input-length=8192 --max-total-tokens=10240` which originally supports `max_position_embeddings=4096`.\r\n\r\nI tried running the following command :\r\n\r\n```\r\ndocker run -it --rm --gpus all --shm-size 80g --name llama2_70b_instruct_v2 -p 8560:80 -v ~/tgi_data:/data \\\r\n  ghcr.io/huggingface/text-generation-inference:sha-f91e9d2  --num-shard=8 \\\r\n  --model-id upstage/Llama-2-70b-instruct-v2 --revision 5f9c77b2c0397cf83d2f97740483f107c7109e8c \\\r\n  --dtype=float16 \\\r\n  --max-input-length=8192 --max-total-tokens=10240 --rope-scaling=dynamic --rope-factor=2.5 \\\r\n  --max-batch-prefill-tokens=40100 \\\r\n```\r\n1. Does it look correct ?\r\n\r\nThough this ended up with:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/opt/conda/lib/python3.9/site-packages/text_generation_server/models/flash_causal_lm.py\", line 727, in warmup\r\n    _, batch = self.generate_token(batch)\r\n  File \"/opt/conda/lib/python3.9/contextlib.py\", line 79, in inner\r\n    return func(*args, **kwds)\r\n  File \"/opt/conda/lib/python3.9/site-packages/text_generation_server/models/flash_causal_lm.py\", line 825, in generate_token\r\n    raise e\r\n  File \"/opt/conda/lib/python3.9/site-packages/text_generation_server/models/flash_causal_lm.py\", line 813, in generate_token\r\n    out = self.forward(\r\n  File \"/opt/conda/lib/python3.9/site-packages/text_generation_server/models/flash_causal_lm.py\", line 789, in forward\r\n    return self.model.forward(\r\n  File \"/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py\", line 475, in forward\r\n    hidden_states = self.model(\r\n  File \"/opt/conda/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 1501, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"/opt/conda/lib/python3.9/site-packages/text_generation_server/models/custom_modeling/flash_llama_modeling.py\", line 428, in forward\r\n    cos, sin = self.layers[0].self_attn.rotary_emb.get_cos_sin(\r\n  File \"/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/layers.py\", line 470, in get_cos_sin\r\n    self._update_cos_sin_cache(dtype, position_ids.device, max_s)\r\n  File \"/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/layers.py\", line 501, in _update_cos_sin_cache\r\n    newbase = self.base * ((self.scaling_factor * seq_len / self.max_position_embeddings) - (self.scaling_factor - 1)) ** (self.dim / (self.dim - 2))\r\nNameError: name 'seq_len' is not defined\r\n```\r\n\r\n2. Looks like typo in the code, should it have been `seqlen`  instead of `seq_len` ?\r\n\r\n\r\n3. When I am using the above model without RoPE scaling on 8xA100-40GB GPUs, it can churn out 1534 tokens per sec,  with an prompt heavy set up of ~883 input tokens, ~76 output tokens(best_of=1, so no hidden output tokens) per request. \r\nIs this expected performance or can I do better on the above set up?\r\nFYI: tried fp16 on vllm, gptq(4bit), bitsandbytes(8bit) models all ended up with similar TPS (tokens per second). \r\n",
    "url": "https://github.com/huggingface/text-generation-inference/issues/782",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-07T05:58:14Z",
    "updated_at": "2023-09-06T13:59:36Z",
    "user": "hrushikesh198"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 238,
    "title": "[Question] Can you list all available models using tranformers.js?",
    "body": "Hey \ud83d\udc4b \r\n\r\nI was wondering if it's possible to list available models using the `transformers.js` package? \r\n\r\ne.g. \r\n> pipeline.getAvailableModels()\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/238",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-07T01:53:35Z",
    "updated_at": "2023-08-13T23:27:55Z",
    "user": "sambowenhughes"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 389,
    "title": "Inject assistant message in the begining of the chat",
    "body": "Hey, is it possible to start a conversation with an assistant message showing up as the first message in the chat?",
    "url": "https://github.com/huggingface/chat-ui/issues/389",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2023-08-06T17:25:25Z",
    "updated_at": "2023-09-18T12:52:16Z",
    "user": "matankley"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4494,
    "title": "How to convert a diffuser pipeline of XL to checkpoint or safetensors",
    "body": "I need to fine-tune stable diffusion unet or something like that. Then I have to convert the pipeline into ckpt for webui usage.\r\nBefore I use the `scripts/convert_diffusers_to_original_stable_diffusion.py` for transforming. \r\nBut currently it cannot convert correctly for XL pipeline and webui may raise bugs.\r\nThanks in advance.",
    "url": "https://github.com/huggingface/diffusers/issues/4494",
    "state": "closed",
    "labels": [
      "stale",
      "contributions-welcome"
    ],
    "created_at": "2023-08-06T13:06:54Z",
    "updated_at": "2023-11-06T04:42:19Z",
    "user": "FeiiYin"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 388,
    "title": "Is it down?",
    "body": "It doesnt load for me also your website",
    "url": "https://github.com/huggingface/chat-ui/issues/388",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-06T08:54:47Z",
    "updated_at": "2023-08-08T06:05:48Z",
    "comments": 6,
    "user": "BenutzerEinsZweiDrei"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 237,
    "title": "[Question] Ipynb for ONNX conversion?",
    "body": "Could you please share the code you're using to convert models to onnx? I know you say in your cards you're using Optimum, but when I try to do it myself, I get much larger onnx files (talking about disk space here) and I don't know what I'm doing wrong.",
    "url": "https://github.com/huggingface/transformers.js/issues/237",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-06T08:45:19Z",
    "updated_at": "2023-08-06T09:17:02Z",
    "user": "Mihaiii"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 233,
    "title": "[Docs] Mention demo (GitHub pages) in Readme ",
    "body": "I love your old demo page on GitHub pages (https://xenova.github.io/transformers.js/), as one can easily play with the models and copy code if needed.\r\nIs there any reason it's not mentioned anymore (or not more visible) in the Readme? \r\n\r\n(Sorry, added bug label accidentally, should be question instead)",
    "url": "https://github.com/huggingface/transformers.js/issues/233",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-04T10:53:48Z",
    "updated_at": "2023-12-06T15:01:38Z",
    "user": "do-me"
  },
  {
    "repo": "pytorch/text",
    "number": 2197,
    "title": "Does DataLoader(shuffle=True) really shuffle DBpedia dataset correctly?",
    "body": "According to [the docs][1], DBpedia dataset has 14 classes (labels) and 40000 texts for each class. Hence, if I create batches using `DataLoader(shuffle=True)` as follows:\r\n\r\n```python\r\nimport torchtext.datasets as d\r\nfrom torch.utils.data.dataloader import DataLoader\r\n\r\ntrain = DataLoader(\r\n    d.DBpedia(split=\"train\", root=\".cache\"),\r\n    batch_size=10000,\r\n    shuffle=True,\r\n)\r\n```\r\n\r\nthe labels should be uniformly distributed in each batch. But in practice, it seems that only a few labels are in each batch.\r\n\r\n```python\r\nfor labels, texts in train:\r\n    print(len(set(labels.tolist())))\r\n```\r\nThe output of the above code is:\r\n```\r\n1\r\n1\r\n1\r\n2\r\n2\r\n2\r\n2\r\n3\r\n3\r\n3\r\n3\r\n4\r\n4\r\n3\r\n3\r\n.\r\n.\r\n.\r\n```\r\n\r\nHow can I fix this? Or is my implementation wrong?\r\n\r\nP.S.\r\nInteractive code is available on [GoogleColab][2]\r\n\r\n  [1]: https://pytorch.org/text/stable/datasets.html#dbpedia\r\n  [2]: https://colab.research.google.com/drive/10524PcR3_spf3fAh37hNbXdLeRVD6Sog?usp=sharing",
    "url": "https://github.com/pytorch/text/issues/2197",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-04T10:34:52Z",
    "updated_at": "2023-08-04T10:37:18Z",
    "comments": 0,
    "user": "fujidaiti"
  },
  {
    "repo": "pytorch/text",
    "number": 2196,
    "title": "torchtext.datasets - requests.exceptions.ConnectionError",
    "body": "## \ud83d\udc1b Bug\r\n\r\n**Description of the bug**\r\n\r\nWhen I try to use Multi30k dataset, I get this error:\r\n\r\n```\r\nrequests.exceptions.ConnectionError:\r\nThis exception is thrown by __iter__ of HTTPReaderIterDataPipe(skip_on_error=False, source_datapipe=OnDiskCacheHolderIterDataPipe, timeout=None)\r\n```\r\n\r\n**To Reproduce**\r\n\r\n```\r\nfrom torchtext.datasets import Multi30k\r\n\r\nSRC_LANGUAGE = 'de'\r\nTGT_LANGUAGE = 'en'\r\n\r\ntrain_iter = Multi30k(split='train', language_pair=(SRC_LANGUAGE, TGT_LANGUAGE))\r\n\r\nnext(iter(train_iter))\r\n```\r\n\r\n**Expected behavior**\r\n\r\nReturn a proper iterable where I can iterate over the dataset.\r\n\r\n**Environment**\r\n\r\nPyTorch version: 1.13.1+cpu\r\nIs debug build: False\r\nCUDA used to build PyTorch: Could not collect\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Microsoft Windows 11 Enterprise\r\nGCC version: Could not collect\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\nLibc version: N/A\r\n\r\nPython version: 3.10.9 | packaged by Anaconda, Inc. | (main, Mar  1 2023, 18:18:15) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)\r\nPython platform: Windows-10-10.0.22621-SP0\r\nIs CUDA available: False\r\nCUDA runtime version: Could not collect\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: GPU 0: GeForce GTX 1650\r\nNvidia driver version: 442.23\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture=9\r\nCurrentClockSpeed=2592\r\nDeviceID=CPU0\r\nFamily=198\r\nL2CacheSize=1536\r\nL2CacheSpeed=\r\nManufacturer=GenuineIntel\r\nMaxClockSpeed=2592\r\nName=Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz\r\nProcessorType=3\r\nRevision=\r\n\r\nVersions of relevant libraries:\r\n[pip3] flake8==6.0.0\r\n[pip3] mypy-extensions==0.4.3\r\n[pip3] numpy==1.23.5\r\n[pip3] numpydoc==1.5.0\r\n[pip3] torch==1.13.1\r\n[pip3] torchdata==0.5.1\r\n[pip3] torchtext==0.14.1\r\n[conda] Could not collect\r\n\r\n**Additional context**\r\n\r\nI've been running into issues with the Multi30K dataset for some time now. The issue that was occurring before was resolved by installing specific versions and combinations of the relevant torch libraries I specified. However, even this solution doesn't work anymore. Can you please fix what's broken with this cursed dataset?\r\n\r\nThank you.\r\n",
    "url": "https://github.com/pytorch/text/issues/2196",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-04T09:25:28Z",
    "updated_at": "2024-01-11T07:53:51Z",
    "comments": 2,
    "user": "afurkank"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6120,
    "title": "Lookahead streaming support?",
    "body": "### Feature request\r\n\r\nFrom what I understand, streaming dataset currently pulls the data, and process the data as it is requested.\r\nThis can introduce significant latency delays when data is loaded into the training process, needing to wait for each segment.\r\n\r\nWhile the delays might be dataset specific (or even mapping instruction/tokenizer specific)\r\n\r\nIs it possible to introduce a `streaming_lookahead` parameter, which is used for predictable workloads (even shuffled dataset with fixed seed). As we can predict in advance what the next few datasamples will be. And fetch them while the current set is being trained.\r\n\r\nWith enough CPU & bandwidth to keep up with the training process, and a sufficiently large lookahead, this will reduce the various latency involved while waiting for the dataset to be ready between batches.\r\n\r\n### Motivation\r\n\r\nFaster streaming performance, while training over extra large TB sized datasets\r\n\r\n### Your contribution\r\n\r\nI currently use HF dataset, with pytorch lightning trainer for RWKV project, and would be able to help test this feature if supported.",
    "url": "https://github.com/huggingface/datasets/issues/6120",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-08-04T04:01:52Z",
    "updated_at": "2023-08-17T17:48:42Z",
    "comments": 1,
    "user": "PicoCreator"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4459,
    "title": "how to convert a picture to text embedding, without training these image model like Textual Inversion",
    "body": "clip text: tokens -> text_embedding -> text_features\r\nclip img: img -> img_embedding -> img_features\r\n\r\nhow inversion without training every time:  img -> text_embedding",
    "url": "https://github.com/huggingface/diffusers/issues/4459",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-08-04T01:46:25Z",
    "updated_at": "2023-09-12T15:03:45Z",
    "user": "yanchaoguo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6116,
    "title": "[Docs] The \"Process\" how-to guide lacks description of `select_columns` function",
    "body": "### Feature request\n\nThe [how to process dataset guide](https://huggingface.co/docs/datasets/main/en/process) currently does not mention the [`select_columns`](https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset.select_columns) function. It would be nice to include it in the guide.\n\n### Motivation\n\nThis function is a commonly requested feature (see this [forum thread](https://discuss.huggingface.co/t/how-to-create-a-new-dataset-from-another-dataset-and-select-specific-columns-and-the-data-along-with-the-column/15120) and #5468 #5474). However, it has not been included in the guide since its implementation by PR #5480.\r\n\r\nMentioning it in the guide would help future users discover this added feature.\n\n### Your contribution\n\nI could submit a PR to add a brief description of the function to said guide.",
    "url": "https://github.com/huggingface/datasets/issues/6116",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-08-03T13:45:10Z",
    "updated_at": "2023-08-16T10:02:53Z",
    "user": "unifyh"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2167,
    "title": "\u2753 [Question] Is a INT8 calibrator specific to a given model or just specific to a dataset?",
    "body": "## \u2753 Question\r\n\r\nIs a INT8 calibrator specific to a given model or just specific to a dataset?\r\n\r\nINT8 calibrators can be cached to accelerate further usage, which is nice. However, it's not clear from the documentation if the cached calibrator can only be used to calibrate the model it was used for TensorRT conversion or any model that uses the same calibration dataset.\r\n\r\nAs a practical example, let say that I'm training and comparing two classification neural networks A and B on the same dataset and with the same data preprocessing. I converted network A for TensorRT using INT8 quantization and saved the calibrator cache file. to disk. Can I use this calibrator to convert model B to TensorRT (which otherwise would have used the same calibration dataset as A)?\r\n\r\nMy intuition is that a calibrator is specific to given dataset **and** network and it cannot be reused for a different network.",
    "url": "https://github.com/pytorch/TensorRT/issues/2167",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-03T11:38:16Z",
    "updated_at": "2023-08-15T19:53:12Z",
    "user": "laclouis5"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4453,
    "title": "How to convert diffusers SDXL lora into safetensors that works with AUTO1111 webui",
    "body": "### Describe the bug\n\nI trained a lora on SDXL with this diffusers script: https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_sdxl.py\r\n\r\nI get great results when using the output .bin with the diffusers inference code.\r\nHow can I convert the .bin to .safetensors that can be loaded in AUTO1111 webui?\n\n### Reproduction\n\nTrain a lora on SDXL with this diffusers script: https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_sdxl.py\r\nThe lora model cannot be loaded in AUTO1111 webui\n\n### Logs\n\n_No response_\n\n### System Info\n\nPython 3.10\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/4453",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2023-08-03T11:23:25Z",
    "updated_at": "2023-09-12T15:03:46Z",
    "user": "wangqyqq"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 765,
    "title": "How to benchmark a warmed local model by docker",
    "body": "### System Info\n\nUsing the docker run to connected local model and it worked:\r\n`docker run --rm --name tgi  --runtime=nvidia  --gpus all  -p 5001:5001  -v data/nfs/gdiist/model:/data  k8s-master:5000/text-generation-inference:0.9.3  --model-id /data/llama-7b-hf  --hostname 0.0.0.0  --port 5001 --dtype float16 `\r\n```\r\n2023-08-03T09:14:08.564776Z  INFO text_generation_launcher: Starting Webserver\r\n2023-08-03T09:14:08.587895Z  WARN text_generation_router: router/src/main.rs:165: Could not find a fast tokenizer implementation for /data/llama-7b-hf\r\n2023-08-03T09:14:08.587942Z  WARN text_generation_router: router/src/main.rs:168: Rust input length validation and truncation is disabled\r\n2023-08-03T09:14:08.587953Z  WARN text_generation_router: router/src/main.rs:193: no pipeline tag found for model /data/llama-7b-hf\r\n2023-08-03T09:14:08.595313Z  INFO text_generation_router: router/src/main.rs:212: Warming up model\r\n2023-08-03T09:14:11.767661Z  INFO text_generation_router: router/src/main.rs:221: Connected\r\n\n\n### Information\n\n- [X] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [X] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\nAnd I can't use the `text-generation-benchmark` so I entered the Docker container and using the following command\uff1a\r\n`docker exec -it tgi /bin/bash`\r\n`text-generation-benchmark --tokenizer-name data/nfs/gdiist/model/llama-7b-hf`\r\nThere are errors reported as follows\uff1a\r\n```\r\n2023-08-03T09:23:25.437223Z  INFO text_generation_benchmark: benchmark/src/main.rs:126: Loading tokenizer\r\n2023-08-03T09:23:25.437552Z  INFO text_generation_benchmark: benchmark/src/main.rs:135: Downloading tokenizer\r\n2023-08-03T09:23:26.218104Z ERROR cached_path::cache: /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cached-path-0.6.1/src/cache.rs:559: ETAG fetch for https://huggingface.co/data/nfs/gdiist/model/llama-7b-hf/resolve/main/tokenizer.json failed with fatal error    \r\nthread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: \"Model \\\"data/nfs/gdiist/model/llama-7b-hf\\\" on the Hub doesn't have a tokenizer\"', benchmark/src/main.rs:147:78\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\nAborted (core dumped)\r\n\r\nI want to know if it's the reason for using the local model or the lack of parameters\uff1f\n\n### Expected behavior\n\n1. Help me using benchmark tool after docker run\r\n2. Tell me how to use 2 gpus to run a local model in docker run\r\n\r\nThanks\uff01",
    "url": "https://github.com/huggingface/text-generation-inference/issues/765",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-03T09:28:07Z",
    "updated_at": "2023-10-16T01:50:10Z",
    "user": "Laych7"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4448,
    "title": "Outpainting results from diffusers' StableDiffusionControlNetPipeline is much worse than those from A1111 webui. How to improve?",
    "body": "I am trying to outpaint some human images (mainly the lower-body part) with SD 1.5 conditioned on ControlNet's inpainting and openpose. I have been using A1111 webui with ControlNet extension and it has been working quite well:\r\nHere are my settings in the webui:\r\n<img width=\"774\" alt=\"Screenshot 2023-08-03 at 15 08 30\" src=\"https://github.com/huggingface/diffusers/assets/50854238/f5d2ed63-bd8e-467a-81cb-28293eb45fe4\">\r\n![1691046578453](https://github.com/huggingface/diffusers/assets/50854238/8baf5891-6fe8-4006-bce9-bca903a3d6bf)\r\n<img width=\"774\" alt=\"Screenshot 2023-08-03 at 15 10 00\" src=\"https://github.com/huggingface/diffusers/assets/50854238/8b9e6c76-3986-437a-9159-cb799d35131d\">\r\n\r\nNote that 2 ControlNet units are enabled, one for OpenPose and one for ControlNet's inpainting model. For OpenPose I enabled \"Preview as Input\" and upload my custom json file with all joints defined (although the lower-body joints are not visible in the input image).\r\nHere is the result I get from the webui, which looks good:\r\n![00001-2019210750](https://github.com/huggingface/diffusers/assets/50854238/491a2de1-180c-473d-83d0-44376c4cc7f1)\r\n\r\nNow, I'm trying to reproduce this result using diffusers' StableDiffusionControlNetPipeline. Below is my code:\r\n\r\n\r\n\r\n```\r\nimport numpy as np\r\nfrom diffusers import StableDiffusionControlNetPipeline, ControlNetModel, DDIMScheduler\r\nimport torch\r\nfrom diffusers.utils import load_image\r\nimport cv2\r\nfrom PIL import Image\r\n\r\ndef make_inpaint_condition(image, image_mask):\r\n    image = np.array(image.convert(\"RGB\")).astype(np.float32) / 255.0\r\n    image_mask = np.array(image_mask.convert(\"L\")).astype(np.float32)\r\n    assert image.shape[0:1] == image_mask.shape[0:1], \"image and image_mask must have the same image size\"\r\n    image[image_mask < 128] = -1.0 # set as masked pixel\r\n    image = np.expand_dims(image, 0).transpose(0, 3, 1, 2)\r\n    image = torch.from_numpy(image)\r\n    return image\r\n\r\n\r\ncontrolnet_inpaint = ControlNetModel.from_pretrained('lllyasviel/control_v11p_sd15_inpaint', \r\n                                                      torch_dtype=torch.float16)\r\ncontrolnet_openpose = ControlNetModel.from_pretrained('lllyasviel/control_v11p_sd15_openpose', \r\n                                                       torch_dtype=torch.float16)\r\npipe = StableDiffusionControlNetPipeline.from_pretrained('runwayml/stable-diffusion-v1-5', \r\n                                                         controlnet=[controlnet_inpaint, controlnet_openpose], \r\n                                                         torch_dtype=torch.float16, \r\n                                                         safety_checker=None).to('cuda')\r\npipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)\r\npipe.enable_model_cpu_offload()\r\npipe.enable_xformers_memory_efficient_attention()\r\n\r\n\r\n                                                         \r\noriginal_image = load_image('./image.png')\r\nmask_image = load_image('./mask.png')\r\ninpaint_condition_image = make_inpaint_condition(original_image, mask_image)\r\nopenpose_condition_image = load_image('./pose.png')\r\ngenerated_img = pipe(prompt=\"best quality, photorealistic, empty background\", \r\n     negative_prompt=\"lowres, bad hands, bad feet, worst quality\",\r\n     num_inference_steps=20,\r\n     guidance_scale=10.0,\r\n     image=[inpaint_condition_image, openpose_condition_image]).images[0]\r\n\r\ngenerated_img.save('./test.png') \r\n```\r\n\r\nand here is the result I get from diffusers:\r\n![test (17)](https://github.com/huggingface/diffusers/assets/50854238/59fe3240-2650-4d9e-a46f-4359b368dc93)\r\n\r\nThe legs look much less realistic and the background is kind of noisy. I have been using the same SD model (sd v1.5), same controlnet models (v1.1 for OpenPose and inpainting), and same sampler (DDIM), but the results from diffusers are much worse than the webui. What can I do to reproduce the results I get from the webui?\r\n\r\nIt also seems that with the diffusers pipeline, the unmasked part is also slightly modified. Is there any post-processing applied to it?",
    "url": "https://github.com/huggingface/diffusers/issues/4448",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-03T07:19:12Z",
    "updated_at": "2023-08-30T05:35:03Z",
    "user": "xiyichen"
  },
  {
    "repo": "huggingface/transformers",
    "number": 25280,
    "title": "How to download files from HF spaces",
    "body": "### System Info\n\ngoogle colab \n\n### Who can help?\n\n@sanchit-gandhi @rock\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\ni tried:\r\n```\r\nfrom huggingface_hub import hf_hub_download,hf_hub_url\r\n# model_path  = hf_hub_download(repo_id=\"xinyu1205/recognize-anything\", filename=\"tag2text_swin_14m.pth\",  local_dir = \"/content\")\r\n```\r\nbut throws an error repo not present\r\n\n\n### Expected behavior\n\ndownload the file",
    "url": "https://github.com/huggingface/transformers/issues/25280",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-03T07:02:03Z",
    "updated_at": "2023-09-11T08:02:40Z",
    "user": "andysingal"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4445,
    "title": "How to finetune lora model ?",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\r\nIf I have a model from civitai , how  to finetune it in sd1.5 and sdxl?\r\n\r\n**Describe the solution you'd like**\r\nA clear and concise description of what you want to happen.\r\n\r\n**Describe alternatives you've considered**\r\nA clear and concise description of any alternative solutions or features you've considered.\r\n\r\n**Additional context**\r\nAdd any other context or screenshots about the feature request here.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/4445",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-08-03T01:55:15Z",
    "updated_at": "2023-09-12T15:03:49Z",
    "user": "kelisiya"
  },
  {
    "repo": "pytorch/torchx",
    "number": 749,
    "title": "Passing additional build arguments to Dockerfile.torchx",
    "body": "## \u2753 Questions and Help\r\n\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nBefore submitting, please ensure you have gone through our\r\n[documentation](https://pytorch.org/torchx).\r\n\r\n\r\n### Question\r\nUse case:\r\nMy team uses torchx to submit the job to remote scheduler such as AWS Batch. While building the docker image, we want to use a private PyPi repository to install the python dependncies.\r\n\r\n\r\nIt seems that Dockerfile doesn't allow passing additional build arguments, besides `Image` and `Workspace` ([reference](https://github.com/pytorch/torchx/blob/966c96f092bc89ad067b0bdb9eed8f7002dbcb46/torchx/workspace/docker_workspace.py#L122-L125)). We need to pass additional build arguments  such as pip `index-url` to point to our private PyPi repository during the image build process.\r\n\r\nDoes the torchx team have any recommendations on how to achieve our use case of passing additional build args, while building the docker",
    "url": "https://github.com/meta-pytorch/torchx/issues/749",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-02T20:05:02Z",
    "updated_at": "2023-10-04T22:35:48Z",
    "comments": 4,
    "user": "anjali-chadha"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2268,
    "title": "How to chop up a long document into chunks of max sequence length?",
    "body": "Given a long document, how do I chop it up into chunks so that each chunk is within the [max sequence length](https://www.sbert.net/examples/applications/computing-embeddings/README.html#input-sequence-length) of a model? ",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2268",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-02T16:50:09Z",
    "updated_at": "2023-08-04T18:47:22Z",
    "user": "siddhsql"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1602,
    "title": "Parallel steps update incoherence",
    "body": "See the discussion https://huggingface.co/datasets/BelleGroup/multiturn_chat_0.8M/discussions/1#64c9e88a6a26cddbecd9bec6\r\n\r\nBefore the dataset update, the `split-first-rows-from-parquet` response was a success, and thus the `split-first-rows-from-streaming` response, computed later, is a `ResponseAlreadyComputedError` error.\r\n\r\nBut after the dataset update, the `split-first-rows-from-parquet` response was an error (due to a disk issue: ` FileSystemError`) and, due to a heavy load on the infra, the `split-first-rows-from-streaming` response has not been processed yet, so: it's still `ResponseAlreadyComputedError`.\r\n\r\nPossibilities:\r\n1. remove `ResponseAlreadyComputedError`, and copy the response (doubles storage)\r\n2. change the model for parallel steps, and store only once. Let's say we have M+N parallel steps. If M steps are successful (normally with the same response) and N steps are erroneous, let's store the optional successful response content once, and all the responses, removing the success content for successful responses. It is a lot of complexity.\r\n3. keep the logic, but if a parallel step gives an error whereas it had a successful response before AND the other parallel step is `ResponseAlreadyComputedError`, copy the successful answer to the other step. Seems brittle and overly complex.\r\n4. keep the logic, but if a parallel step gives an error whereas it had a successful response before AND the other parallel step is `ResponseAlreadyComputedError`, delete the other answer\r\n\r\nNone seems like a good idea. Do you have better ideas @huggingface/datasets-server ?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1602",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "P1"
    ],
    "created_at": "2023-08-02T13:44:35Z",
    "updated_at": "2024-02-06T14:52:06Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/transformers",
    "number": 25264,
    "title": "[Question] How to load AutoFeatureExtractor on GPU?",
    "body": "Hi, I am following this guide to learn how to do audio classification with wav2vec2: https://huggingface.co/docs/transformers/main/tasks/audio_classification\r\n\r\nI intend to extract features of my data with the following codes\r\n```\r\nfeature_extractor = AutoFeatureExtractor.from_pretrained(\"/workspace/models/wav2vec2-large-robust\")\r\n\r\ndef preprocess_function(examples):\r\n    audio_arrays = [x[\"array\"] for x in tqdm(examples[\"audio\"])]\r\n    inputs = feature_extractor(\r\n        audio_arrays, sampling_rate=feature_extractor.sampling_rate, max_length=16000, truncation=True\r\n    )\r\n    return inputs\r\n\r\nencoded_audio_dataset_train = audio_dataset_train.map(preprocess_function, remove_columns=\"audio\", batched=True)\r\n```\r\nBut it seems the extractor is loaded to CPU instead of GPU, and I didn't find in documentation how to set the device for loading feature extractor. I assume the feature extraction is done by the wav2vec2 model itself right? If so how to do this on GPU? Or is it mentioned in any documentation that I didn't notice? \r\n\r\nThis is my first time to use transformers library in audio processing so please forgive my clumsiness. \r\n\r\nAny help is much appreciated.",
    "url": "https://github.com/huggingface/transformers/issues/25264",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-02T12:26:20Z",
    "updated_at": "2023-09-11T08:02:43Z",
    "user": "treya-lin"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6111,
    "title": "raise FileNotFoundError(\"Directory {dataset_path} is neither a `Dataset` directory nor a `DatasetDict` directory.\" )",
    "body": "### Describe the bug\n\nFor researchers in some countries or regions, it is usually the case that the download ability of `load_dataset` is disabled due to the complex network environment. People in these regions often prefer to use git clone or other programming tricks to manually download the files to the disk (for example, [How to elegantly download hf models, zhihu zhuanlan](https://zhuanlan.zhihu.com/p/475260268) proposed a crawlder based solution,  and [Is there any mirror for hf_hub, zhihu answer](https://www.zhihu.com/question/371644077) provided some cloud based solutions, and [How to avoid pitfalls on Hugging face downloading, zhihu zhuanlan] gave some useful suggestions), and then use `load_from_disk` to get the dataset object. \r\nHowever, when one finally has the local files on the disk, it is still buggy when trying to load the files into objects. \n\n### Steps to reproduce the bug\n\nSteps to reproduce the bug:\r\n1. Found CIFAR dataset in hugging face: https://huggingface.co/datasets/cifar100/tree/main\r\n2. Click \":\" button to show \"Clone repository\" option, and then follow the prompts on the box:\r\n ```bash\r\n  cd my_directory_absolute\r\n  git lfs install\r\n  git clone https://huggingface.co/datasets/cifar100\r\n  ls  my_directory_absolute/cifar100 # confirm that the directory exists and it is OK. \r\n  ```\r\n3. Write A python file to try to load the dataset\r\n```python\r\nfrom datasets import load_dataset, load_from_disk\r\ndataset = load_from_disk(\"my_directory_absolute/cifar100\")\r\n```\r\nNotice that according to issue #3700 , it is wrong to use load_dataset(\"my_directory_absolute/cifar100\"), so we must use load_from_disk instead. \r\n\r\n4. Then you will see the error reported:\r\n```log\r\n---------------------------------------------------------------------------\r\nFileNotFoundError                         Traceback (most recent call last)\r\nCell In[5], line 9\r\n      1 from datasets import load_dataset, load_from_disk\r\n----> 9 dataset = load_from_disk(\"my_directory_absolute/cifar100\")\r\n\r\nFile [~/miniconda3/envs/ai/lib/python3.10/site-packages/datasets/load.py:2232), in load_from_disk(dataset_path, fs, keep_in_memory, storage_options)\r\n   2230     return DatasetDict.load_from_disk(dataset_path, keep_in_memory=keep_in_memory, storage_options=storage_options)\r\n   2231 else:\r\n-> 2232     raise FileNotFoundError(\r\n   2233         f\"Directory {dataset_path} is neither a `Dataset` directory nor a `DatasetDict` directory.\"\r\n   2234     )\r\n\r\nFileNotFoundError: Directory my_directory_absolute/cifar100 is neither a `Dataset` directory nor a `DatasetDict` directory.\r\n```\n\n### Expected behavior\n\nThe dataset should be load successfully. \n\n### Environment info\n\n```bash\r\ndatasets-cli env\r\n```\r\n-> results:\r\n```txt\r\n\r\nCopy-and-paste the text below in your GitHub issue.\r\n\r\n- `datasets` version: 2.14.2\r\n- Platform: Linux-4.18.0-372.32.1.el8_6.x86_64-x86_64-with-glibc2.28\r\n- Python version: 3.10.12\r\n- Huggingface_hub version: 0.16.4\r\n- PyArrow version: 12.0.1\r\n- Pandas version: 2.0.3\r\n```",
    "url": "https://github.com/huggingface/datasets/issues/6111",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-02T09:17:29Z",
    "updated_at": "2023-08-29T02:00:28Z",
    "comments": 3,
    "user": "2catycm"
  },
  {
    "repo": "huggingface/transformers",
    "number": 25257,
    "title": " how to print out the data loaded by each epoch during trainer.train() training?",
    "body": "### Feature request\n\nplease tell to me,\r\n how to print out the data loaded by each epoch during trainer.train() training?\n\n### Motivation\n\n how to print out the data loaded by each epoch during trainer.train() training?\n\n### Your contribution\n\n how to print out the data loaded by each epoch during trainer.train() training?",
    "url": "https://github.com/huggingface/transformers/issues/25257",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-02T09:13:55Z",
    "updated_at": "2023-09-11T08:02:47Z",
    "user": "ahong007007"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1310,
    "title": "How to train BPE tokenizer with multiple CPU",
    "body": "Hi\r\n\r\nI tried to train a BPE tokenizer with about 10GB text, but it seems extremely slow(runs more than 24 hours and not finished yet).\r\n\r\nIs there a way to turn on multi CPU training (from htop there only 1 CPU used)? \r\n\r\n\r\nHere is the code.\r\n```\r\nfrom tokenizers import Tokenizer, decoders, models, normalizers, pre_tokenizers, trainers, processors\r\n\r\ntokenizer = Tokenizer(models.BPE())\r\ntokenizer.normalizer = normalizers.NFC()\r\ntokenizer.pre_tokenizer = pre_tokenizers.ByteLevel(add_prefix_space=False)\r\ntokenizer.post_processor = processors.ByteLevel(trim_offsets=False)\r\ntokenizer.decoder = decoders.ByteLevel()\r\n\r\ntrainer = trainers.BpeTrainer(\r\n    vocab_size = 50000,\r\n    min_frequency = 1,\r\n    initial_alphabet = pre_tokenizers.ByteLevel.alphabet(),\r\n    special_tokens = special_tokens\r\n)\r\n\r\nwith open(\"train_bpe.txt\") as f\r\n    tokenizer.train(f, trainer=trainer)\r\n```",
    "url": "https://github.com/huggingface/tokenizers/issues/1310",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-02T08:14:07Z",
    "updated_at": "2023-08-02T09:10:44Z",
    "user": "voidmagic"
  },
  {
    "repo": "pytorch/examples",
    "number": 1179,
    "title": "How to load Transformer model once using FSDP",
    "body": "## \ud83d\udcda Documentation\r\n@HamidShojanazeri, I'm following your [FSDP example](https://github.com/pytorch/examples/tree/main/distributed/FSDP) and swapped in a bigger model, `google/flan-t5-xxl`, and am a little unclear on what happens when the script starts up. I'm running on a server with 8 V100s so I run the launch command as listed in the README.md file:\r\n`torchrun --nnodes 1 --nproc_per_node 8  T5_training.py`\r\n\r\nNext, I was having trouble downloading the model weights because I think with 8 processes, each one was trying to download the weights and they were removing each others' file locks, so I changed the [`setup_model`](https://github.com/pytorch/examples/blob/741de70c4a20d9c83f811b946c186c4f83abcccb/distributed/FSDP/utils/train_utils.py#L99-L102) function so that only rank 0 downloads the weights and then all other processes will read from the local cache.\r\n\r\nFinally, my big question for you is - as the `setup_model` function is currently written, is it fair to say that we're loading a copy of the model weights for every process running (e.g. in my case, 8 processes)? If so, how can we load the model once and broadcast the weights to all other processes? I ask because this will become a blocker at bigger model scales because we'll eventually run out of CPU memory trying to do this.\r\n\r\nHere's my modified `setup_model` function for reference:\r\n```\r\ndef setup_model(model_name, model_max_length=512, cache_dir=None, rank=None):\r\n    # TODO: is this loading the model on all processes?\r\n    # 1) this seems time consuming, and 2) it seems like it would use way too much memory\r\n    # ensure weights are only downloaded by one process\r\n    if rank == 0:\r\n        model = T5ForConditionalGeneration.from_pretrained(model_name, cache_dir=cache_dir)\r\n        # set model_max_length to avoid warnings\r\n        tokenizer =  T5Tokenizer.from_pretrained(model_name, model_max_length=model_max_length, cache_dir=cache_dir)\r\n    dist.barrier()\r\n    if rank != 0:\r\n        model = T5ForConditionalGeneration.from_pretrained(model_name, cache_dir=cache_dir)\r\n        # set model_max_length to avoid warnings\r\n        tokenizer =  T5Tokenizer.from_pretrained(model_name, model_max_length=model_max_length, cache_dir=cache_dir)\r\n    return model, tokenizer\r\n```\r\n\r\nI imagine this all gets easier and more memory efficient once we start saving the model in the formats you've specified in the model_checkpointing directory but we have to get there in the first place.\r\n\r\nI should also note, in case it makes a difference, that I'm setting up the distributed process group (within `T5_training.py`) before calling `setup_model`, whereas you call `setup_model` before setting up the distributed process group in your example. ",
    "url": "https://github.com/pytorch/examples/issues/1179",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-01T22:01:24Z",
    "updated_at": "2023-08-01T22:01:24Z",
    "user": "ToddMorrill"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 380,
    "title": "Issue with Text Generation in Stream Mode",
    "body": "Hi\r\n\r\nThe text generation in stream mode is not functioning as expected on my development server, which is running behind a reverse proxy with the correct base path defined. I'm only receiving a single response in one go, whereas I expect a continuous stream of text.\r\n\r\nPlease assist me in resolving this issue. Thank you!",
    "url": "https://github.com/huggingface/chat-ui/issues/380",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-08-01T19:07:50Z",
    "updated_at": "2023-09-10T12:22:16Z",
    "comments": 10,
    "user": "bilal-rachik"
  },
  {
    "repo": "huggingface/transformers",
    "number": 25245,
    "title": "BLIP-2 request:  If it's even possible, can you please provide an official example script of how to get the text(caption) features and image features into the same vector space (e.g. for cross-modal retrieval/search using BLIP-2 models, similar to what we can already do with CLIP.)  Thanks in advance.",
    "body": "### System Info\n\nlinux, python 3.8+, pytorch '1.13.0+cu116'\n\n### Who can help?\n\n@sgugger\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nN/A\n\n### Expected behavior\n\nN/A",
    "url": "https://github.com/huggingface/transformers/issues/25245",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-01T18:21:07Z",
    "updated_at": "2023-09-21T08:03:25Z",
    "user": "wingz1"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1591,
    "title": "Should we convert the datasets to other formats than parquet?",
    "body": "One OP asked for CSV conversion (not explicitly from the Hub itself): https://huggingface.co/datasets/medical_questions_pairs/discussions/3#64c8c2af527d76365563285c",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1591",
    "state": "closed",
    "labels": [
      "question",
      "feature request",
      "P2"
    ],
    "created_at": "2023-08-01T13:47:12Z",
    "updated_at": "2024-06-19T14:19:01Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2159,
    "title": "\u2753 [Question] Could torch-tensorrt support mixed-precision inference?",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nHello, in my PyTorch inference, I initially set the entire model to fp16 and provided fp16 inputs. Considering the output will become `NAN` (transformer model) , and then I used `.to()` to switch certain weight layers and inference parameters back to fp32. \r\n\r\nHowever, if I export it to ONNX and convert to TensorRT, I would need to make those settings again in TensorRT, which can be quite complicated.\r\n\r\n I would like to know if the torch_tensorrt export includes these dependence and if it can automatically perform mixed-precision export to TensorRT based on my settings. Thank you!",
    "url": "https://github.com/pytorch/TensorRT/issues/2159",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-08-01T10:32:24Z",
    "updated_at": "2023-08-16T01:34:08Z",
    "user": "sanbuphy"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1243,
    "title": "transformers.convert_graph_to_onnx.quantize equivalent with optimum?",
    "body": "Historically, I've used the following to quantize a model after training:\r\n\r\n```python\r\nimport sys\r\nfrom pathlib import Path \r\nfrom transformers.convert_graph_to_onnx import quantize\r\n\r\ninput_file = sys.argv[1]\r\nprint(\"Performing quantization of model '{}'\".format(input_file))\r\nquantized_model_path =  quantize(Path(input_file))\r\nprint(\"Rename quantized model '{}' to '{}'\".format(quantized_model_path.name, input_file))\r\nquantized_model_path.replace(input_file)\r\n```\r\n\r\nIs there a way to accomplish the same type of quantization using`optimum-cli? The quantize method from above (that is deprecated) produces a much smaller model than optimum-cli. \r\n\r\n```\r\nOriginal model 448M multilingual-e5-small-onnx/model.onnx\r\nModel after above 112M  multilingual-e5-small-onnx/model.onnx\r\n```\r\n\r\nI've tried the following export/quantize commands, but the model file size is still above 400MB\r\n\r\n```\r\n$ optimum-cli export onnx --task sentence-similarity -m intfloat/multilingual-e5-small --optimize O3 multilingual-e5-small-onnx\r\n$ optimum-cli onnxruntime quantize --onnx_model multilingual-e5-small-onnx --avx2 --output test\r\n```\r\n\r\n```\r\n403M Aug  1 09:38 test/model_quantized.onnx\r\n```\r\nThank you!",
    "url": "https://github.com/huggingface/optimum/issues/1243",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-01T07:59:03Z",
    "updated_at": "2023-08-01T21:45:46Z",
    "comments": 2,
    "user": "jobergum"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2266,
    "title": "How to measure the quanlity of embeddings?",
    "body": "I am using `sentence-transformers` to encode the big texts into input embeddings for a text classification task. However, I'm unsure how to compare the quality of embeddings when evaluating multiple models' performance. Could you please provide some advice?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2266",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-01T06:59:41Z",
    "updated_at": "2023-09-01T06:12:39Z",
    "user": "sgwhat"
  },
  {
    "repo": "huggingface/trl",
    "number": 597,
    "title": "How to run using multi-GPUs?",
    "body": "Hi, I'm not so familiar with the training method using multi-GPUs.\r\n\r\nI have a machine with 8 A100s, what should I do to full params SFT a llama2-7B model? \r\nHow to use the trl tool?\r\n\r\nThanks.",
    "url": "https://github.com/huggingface/trl/issues/597",
    "state": "closed",
    "labels": [],
    "created_at": "2023-08-01T06:36:27Z",
    "updated_at": "2023-08-21T03:39:46Z",
    "user": "jyC23333"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4407,
    "title": "how to store hub_download on local directory?",
    "body": "### Describe the bug\n\nrunning:\r\nfrom huggingface_hub import hf_hub_url, hf_hub_download\r\n```\r\n# Generate/show the URL\r\nhf_hub_url(\r\n   repo_id=\"XpucT/Deliberate\",\r\n   filename=\"Deliberate-inpainting.safetensors\",\r\n)\r\n\r\n# Download the file\r\nhf_hub_download(\r\n   repo_id=\"XpucT/Deliberate\",\r\n   filename=\"Deliberate-inpainting.safetensors\",\r\n)\r\n```\r\nbut file is not stored on local directory\n\n### Reproduction\n\nsame as above \n\n### Logs\n\n_No response_\n\n### System Info\n\nkaggle notebook\n\n### Who can help?\n\n@sayakpaul @patrickvonplaten @will",
    "url": "https://github.com/huggingface/diffusers/issues/4407",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-08-01T05:21:39Z",
    "updated_at": "2023-08-01T05:55:46Z",
    "user": "andysingal"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6108,
    "title": "Loading local datasets got strangely stuck",
    "body": "### Describe the bug\n\nI try to use `load_dataset()` to load several local `.jsonl` files as a dataset. Every line of these files is a json structure only containing one key `text` (yeah it is a dataset for NLP model). The code snippet is as:\r\n```python\r\nds = load_dataset(\"json\", data_files=LIST_OF_FILE_PATHS, num_proc=16)['train']\r\n```\r\nHowever, I found that the loading process can get stuck -- the progress bar `Generating train split` no more proceed. When I was trying to find the cause and solution, I found a really strange behavior. If I load the dataset in this way:\r\n```python\r\ndlist = list()\r\nfor _ in LIST_OF_FILE_PATHS:\r\n    dlist.append(load_dataset(\"json\", data_files=_)['train'])\r\nds = concatenate_datasets(dlist)\r\n```\r\nI can actually successfully load all the files despite its slow speed. But if I load them in batch like above, things go wrong. I did try to use Control-C to trace the stuck point but the program cannot be terminated in this way when `num_proc` is set to `None`. The only thing I can do is use Control-Z to hang it up then kill it. If I use more than 2 cpus, a Control-C would simply cause the following error:\r\n```bash\r\n^C\r\nProcess ForkPoolWorker-1:\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.10/dist-packages/multiprocess/process.py\", line 314, in _bootstrap\r\n    self.run()\r\n  File \"/usr/local/lib/python3.10/dist-packages/multiprocess/process.py\", line 108, in run\r\n    self._target(*self._args, **self._kwargs)\r\n  File \"/usr/local/lib/python3.10/dist-packages/multiprocess/pool.py\", line 114, in worker\r\n    task = get()\r\n  File \"/usr/local/lib/python3.10/dist-packages/multiprocess/queues.py\", line 368, in get\r\n    res = self._reader.recv_bytes()\r\n  File \"/usr/local/lib/python3.10/dist-packages/multiprocess/connection.py\", line 224, in recv_bytes\r\n    buf = self._recv_bytes(maxlength)\r\n  File \"/usr/local/lib/python3.10/dist-packages/multiprocess/connection.py\", line 422, in _recv_bytes\r\n    buf = self._recv(4)\r\n  File \"/usr/local/lib/python3.10/dist-packages/multiprocess/connection.py\", line 387, in _recv\r\n    chunk = read(handle, remaining)\r\nKeyboardInterrupt\r\nGenerating train split: 92431 examples [01:23, 1104.25 examples/s]  \r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/utils/py_utils.py\", line 1373, in iflatmap_unordered\r\n    yield queue.get(timeout=0.05)\r\n  File \"<string>\", line 2, in get\r\n  File \"/usr/local/lib/python3.10/dist-packages/multiprocess/managers.py\", line 818, in _callmethod\r\n    kind, result = conn.recv()\r\n  File \"/usr/local/lib/python3.10/dist-packages/multiprocess/connection.py\", line 258, in recv\r\n    buf = self._recv_bytes()\r\n  File \"/usr/local/lib/python3.10/dist-packages/multiprocess/connection.py\", line 422, in _recv_bytes\r\n    buf = self._recv(4)\r\n  File \"/usr/local/lib/python3.10/dist-packages/multiprocess/connection.py\", line 387, in _recv\r\n    chunk = read(handle, remaining)\r\nKeyboardInterrupt\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/mnt/data/liyongyuan/source/batch_load.py\", line 11, in <module>\r\n    a = load_dataset(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/load.py\", line 2133, in load_dataset\r\n    builder_instance.download_and_prepare(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 954, in download_and_prepare\r\n    self._download_and_prepare(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 1049, in _download_and_prepare\r\n    self._prepare_split(split_generator, **prepare_split_kwargs)\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 1842, in _prepare_split\r\n    for job_id, done, content in iflatmap_unordered(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/utils/py_utils.py\", line 1387, in iflatmap_unordered\r\n    [async_result.get(timeout=0.05) for async_result in async_results]\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/utils/py_utils.py\", line 1387, in <listcomp>\r\n    [async_result.get(timeout=0.05) for async_result in async_results]\r\n  File \"/usr/local/lib/python3.10/dist-packages/multiprocess/pool.py\", line 770, in get\r\n    raise TimeoutError\r\nmultiprocess.context.TimeoutError\r\n```\r\nI have validated the basic correctness of these `.jsonl` files. They are correctly formatted (or they cannot be loaded singly by `load_dataset`) though some of the json may contain too long text (more than 1e7 characters). I do not know if this could be the problem. And there should not be any bottleneck in system's resource. The whole dataset is ~300GB, and I am using a cloud server with plenty of storage and 1TB ram. \r\nThanks for your efforts and patience! Any suggestion or help would be appreciated.\n\n### Steps to reproduce the bug\n\n1. use load_dataset() with `data_files = LIST_OF_FILES`\n\n### Expected behavior\n\nAll the files should be smoothly loaded. \n\n### Environment info\n\n- Datasets: A private datas",
    "url": "https://github.com/huggingface/datasets/issues/6108",
    "state": "open",
    "labels": [],
    "created_at": "2023-08-01T02:28:06Z",
    "updated_at": "2024-12-31T16:01:00Z",
    "comments": 7,
    "user": "LoveCatc"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 379,
    "title": "Issue with Chat UI when deploying Text Generation API on a remote server",
    "body": "\r\nI am facing an issue with the Chat UI while using the Text Generation API. Everything works correctly when the Text Generation API is deployed on localhost, but the Chat UI doesn't work when the Text Generation API is deployed on a remote server.\r\n\r\nSteps to reproduce the problem:\r\n1. Deploy the Text Generation API on localhost.\r\n2. Use the Chat UI to generate text and verify that it works correctly.\r\n3. Deploy the Text Generation API on a remote server.\r\n4. Use the Chat UI again to generate text and notice that it no longer works.\r\n\r\nExpected behavior:\r\nThe Chat UI should work properly, whether the Text Generation API is deployed on localhost or on a remote server.\r\n\r\nAdditional information:\r\n- I am using version 0.4 of the Chat UI and version 0.9.3 of the Text Generation API.\r\n- The remote server hosting the Text Generation API responds correctly to requests.\r\n- Tests have been conducted with the \"text generation\" client and Postman.\r\n\r\nAny assistance in resolving this issue would be highly appreciated. Thank you!\r\n\r\n![20230731_191316](https://github.com/huggingface/chat-ui/assets/49948822/658df806-11a7-4268-855c-f0fdbbe724b5)\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/379",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2023-07-31T17:22:49Z",
    "updated_at": "2023-09-18T12:55:45Z",
    "comments": 0,
    "user": "bilal-rachik"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 378,
    "title": "Add support for endpoints requiring client authentication using PKI",
    "body": "Hi,\r\n\r\nAre you open to adding support for endpoints that require client authentication using PKI? I have a requirement to use client authentication with our backend inference server. \r\n\r\nCurrently authentication config from each endpoint is passed to the headers arg of the fetch command: https://github.com/huggingface/chat-ui/blob/main/src/lib/server/generateFromDefaultEndpoint.ts#L35\r\n\r\nMy quick googling has yielded this: https://sebtrif.xyz/blog/2019-10-03-client-side-ssl-in-node-js-with-fetch/ \r\ntl;dr; they create a `https.Agent(..)` which loads a PKI context from file which is passed to the `agent` arg in the fetch command. \r\n\r\nIf you're happy for this to be added, how would you like to separate the logic of authentication using headers and client authentication using an SSL context?\r\n\r\nThank you! :) ",
    "url": "https://github.com/huggingface/chat-ui/issues/378",
    "state": "closed",
    "labels": [
      "question",
      "front"
    ],
    "created_at": "2023-07-31T17:13:53Z",
    "updated_at": "2023-08-15T18:51:29Z",
    "user": "cambriancoder"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 377,
    "title": "Provide a login button, for existing users?",
    "body": "I just changed to another laptop, and didn't find a login button to see and work with my account from Huggingface. After I used once the Chat, I got a message to Login. I would suggest making it more traditional to have a username and a login button on the left sidebar.",
    "url": "https://github.com/huggingface/chat-ui/issues/377",
    "state": "closed",
    "labels": [
      "enhancement",
      "front"
    ],
    "created_at": "2023-07-31T12:08:52Z",
    "updated_at": "2023-08-02T12:19:30Z",
    "comments": 1,
    "user": "tobiashochguertel"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6104,
    "title": "HF Datasets data access is extremely slow even when in memory",
    "body": "### Describe the bug\r\n\r\nDoing a simple `some_dataset[:10]` can take more than a minute.\r\n\r\nProfiling it:\r\n<img width=\"1280\" alt=\"image\" src=\"https://github.com/huggingface/datasets/assets/36224762/e641fb95-ff02-4072-9016-5416a65f75ab\">\r\n\r\n`some_dataset` is completely in memory with no disk cache.\r\n\r\nThis is proving fatal to my usage of HF Datasets. Is there a way I can forgo the arrow format and store the dataset as PyTorch tensors so that `_tensorize` is not needed? And is `_consolidate` supposed to take this long?\r\n\r\nIt's faster to produce the dataset from scratch than to access it from HF Datasets!\r\n\r\n### Steps to reproduce the bug\r\n\r\nI have uploaded the dataset that causes this problem [here](https://huggingface.co/datasets/NightMachinery/hf_datasets_bug1).\r\n\r\n```python\r\n#!/usr/bin/env python3\r\nimport sys\r\nimport time\r\nimport torch\r\nfrom datasets import load_dataset\r\n\r\n\r\ndef main(dataset_name):\r\n    # Start the timer\r\n    start_time = time.time()\r\n\r\n    # Load the dataset from Hugging Face Hub\r\n    dataset = load_dataset(dataset_name)\r\n\r\n    # Set the dataset format as torch\r\n    dataset.set_format(type=\"torch\")\r\n\r\n    # Perform an identity map\r\n    dataset = dataset.map(lambda example: example, batched=True, batch_size=20)\r\n\r\n    # End the timer\r\n    end_time = time.time()\r\n\r\n    # Print the time taken\r\n    print(f\"Time taken: {end_time - start_time:.2f} seconds\")\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    dataset_name = \"NightMachinery/hf_datasets_bug1\"\r\n    print(f\"dataset_name: {dataset_name}\")\r\n    main(dataset_name)\r\n```\r\n\r\n### Expected behavior\r\n\r\n_\r\n\r\n### Environment info\r\n\r\n- `datasets` version: 2.13.1\r\n- Platform: Linux-5.15.0-76-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.12\r\n- Huggingface_hub version: 0.16.4\r\n- PyArrow version: 12.0.1\r\n- Pandas version: 2.0.3",
    "url": "https://github.com/huggingface/datasets/issues/6104",
    "state": "open",
    "labels": [],
    "created_at": "2023-07-31T11:12:19Z",
    "updated_at": "2023-08-01T11:22:43Z",
    "comments": 1,
    "user": "NightMachinery"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4382,
    "title": "HOW TO Overcoming the Influence of Seed and Enhancing the Role of Text Prompts",
    "body": "I fine-tuned a text2img model using Lora, based on the v1.5 version of stable diffusion. The results generated are very good.\r\nBut they can\u2019t be controlled. It seems that the generated results are more based on the seed. Changing the seed changes the image, And if I don\u2019t change the seed and only change the text prompt, the result doesn\u2019t change, or there are only very slight changes. \r\n1. How should I solve this problem?\r\n2. I would like to request a new feature that helps balance the influence between the seed and the prompt, as some questions are indeed sensitive to the seed.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/4382",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-31T07:41:03Z",
    "updated_at": "2023-08-02T09:23:50Z",
    "user": "XiaoyuZhuang"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 230,
    "title": "[Question] distiluse-base-multilingual-cased-v2 - wrong vector dimension (768 vs 512) in onnx version?",
    "body": "I was just playing around with the model [distiluse-base-multilingual-cased-v2](https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased-v2) and noticed that your onnx versions both (quantized and normal) produce embeddings with 768-dimensional vectors instead of 512.\r\n\r\nExample:\r\n\r\nindex.html\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html>\r\n  <head>\r\n    <title>Transformers.js Example</title>\r\n  </head>\r\n  <body>\r\n    <h1>Transformers.js Example</h1>\r\n    <script type=\"module\" src=\"main.js\"></script>\r\n  </body>\r\n</html>\r\n```\r\n\r\nmain.js\r\n\r\n```javascript\r\nimport { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.4.4';\r\n\r\nasync function allocatePipeline() {\r\n  let pipe = await pipeline(\"feature-extraction\",\r\n                             \"Xenova/distiluse-base-multilingual-cased-v2\");\r\n  let out = await await pipe(\"test\", { pooling: 'mean', normalize: true });\r\n  console.log(out);\r\n}\r\nallocatePipeline();\r\n```\r\n\r\nThat gives me\r\n\r\n```\r\nProxy(s)\u00a0{dims: Array(2), type: 'float32', data: Float32Array(768), size: 768}\r\n```\r\n\r\nHowever, the model page states\r\n\r\n> This is a [sentence-transformers](https://www.sbert.net/) model: It maps sentences & paragraphs to a 512 dimensional dense vector space and can be used for tasks like clustering or semantic search.\r\n\r\nAlso, I used the Python package\r\n\r\n```python\r\nfrom sentence_transformers import SentenceTransformer\r\nmodel = SentenceTransformer('sentence-transformers/distiluse-base-multilingual-cased-v2')\r\nmodel.encode(\"test\") \r\n```\r\n\r\nwhich gives me a correct 512-dimensional embedding.\r\n\r\nAm I missing some option here or overseeing the obvious?",
    "url": "https://github.com/huggingface/transformers.js/issues/230",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-30T16:49:36Z",
    "updated_at": "2024-10-18T13:30:12Z",
    "user": "do-me"
  },
  {
    "repo": "huggingface/trl",
    "number": 592,
    "title": "How to load a custom structure model\uff1f",
    "body": "hello\uff0c when I run the following code, I am prompted that only support  `AutoModelForCausalLMWithValueHead` and `AutoModelForSeq2SeqLMWithValueHead`. But these two structures seem to only be able to load the specified pre-trained model.\r\n`ppo_trainer = PPOTrainer(config, gen_model, gen_ref_model, tokenizer)`\r\n\r\nMy model is trained by the T5, and the structure has changed. I would like to know how to load my model? Is it supported?\r\n",
    "url": "https://github.com/huggingface/trl/issues/592",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-30T15:42:18Z",
    "updated_at": "2023-08-31T11:00:56Z",
    "user": "estuday"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6099,
    "title": "How do i get \"amazon_us_reviews",
    "body": "### Feature request\n\nI have been trying to load 'amazon_us_dataset\" but unable to do so. \r\n\r\n`amazon_us_reviews = load_dataset('amazon_us_reviews')`\r\n`print(amazon_us_reviews)`\r\n\r\n\r\n> [ValueError: Config name is missing.\r\n\r\nPlease pick one among the available configs: ['Wireless_v1_00', 'Watches_v1_00', 'Video_Games_v1_00', 'Video_DVD_v1_00', 'Video_v1_00', 'Toys_v1_00', 'Tools_v1_00', 'Sports_v1_00', 'Software_v1_00', 'Shoes_v1_00', 'Pet_Products_v1_00', 'Personal_Care_Appliances_v1_00', 'PC_v1_00', 'Outdoors_v1_00', 'Office_Products_v1_00', 'Musical_Instruments_v1_00', 'Music_v1_00', 'Mobile_Electronics_v1_00', 'Mobile_Apps_v1_00', 'Major_Appliances_v1_00', 'Luggage_v1_00', 'Lawn_and_Garden_v1_00', 'Kitchen_v1_00', 'Jewelry_v1_00', 'Home_Improvement_v1_00', 'Home_Entertainment_v1_00', 'Home_v1_00', 'Health_Personal_Care_v1_00', 'Grocery_v1_00', 'Gift_Card_v1_00', 'Furniture_v1_00', 'Electronics_v1_00', 'Digital_Video_Games_v1_00', 'Digital_Video_Download_v1_00', 'Digital_Software_v1_00', 'Digital_Music_Purchase_v1_00', 'Digital_Ebook_Purchase_v1_00', 'Camera_v1_00', 'Books_v1_00', 'Beauty_v1_00', 'Baby_v1_00', 'Automotive_v1_00', 'Apparel_v1_00', 'Digital_Ebook_Purchase_v1_01', 'Books_v1_01', 'Books_v1_02']\r\nExample of usage:\r\n\t`load_dataset('amazon_us_reviews', 'Wireless_v1_00')`]\r\n\r\n__________________________________________________________________________\r\n`amazon_us_reviews = load_dataset('amazon_us_reviews', 'Watches_v1_00')\r\nprint(amazon_us_reviews)`\r\n\r\n**ERROR**\r\n`Generating` train split: 0%\r\n0/960872 [00:00<?, ? examples/s]\r\n---------------------------------------------------------------------------\r\nKeyError                                  Traceback (most recent call last)\r\n/usr/local/lib/python3.10/dist-packages/datasets/builder.py in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)\r\n   1692                         )\r\n-> 1693                     example = self.info.features.encode_example(record) if self.info.features is not None else record\r\n   1694                     writer.write(example, key)\r\n\r\n11 frames\r\nKeyError: 'marketplace'\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nDatasetGenerationError                    Traceback (most recent call last)\r\n/usr/local/lib/python3.10/dist-packages/datasets/builder.py in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)\r\n   1710             if isinstance(e, SchemaInferenceError) and e.__context__ is not None:\r\n   1711                 e = e.__context__\r\n-> 1712             raise DatasetGenerationError(\"An error occurred while generating the dataset\") from e\r\n   1713 \r\n   1714         yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths)\r\n\r\nDatasetGenerationError: An error occurred while generating the dataset\n\n### Motivation\n\nThe dataset I'm using\r\nhttps://huggingface.co/datasets/amazon_us_reviews\n\n### Your contribution\n\nWhat is the best way to load this data",
    "url": "https://github.com/huggingface/datasets/issues/6099",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-07-30T11:02:17Z",
    "updated_at": "2023-08-21T05:08:08Z",
    "comments": 10,
    "user": "IqraBaluch"
  },
  {
    "repo": "huggingface/trl",
    "number": 591,
    "title": "how to use SFTTrainer for multi turns dialogue?",
    "body": "I wanto use SFTTrainer to train a multi turns dialogues. does it apply to llama-2-7b-cha-hf? is it same to llama-2-7b-hf for instruction tune?\r\nmy dataset is multi turns dialogues. \r\nthe prompt is:\r\n```\r\n<s>[INST] <<SYS>>\r\n{{ system_prompt }}\r\n<</SYS>>\r\n\r\n{{ user_msg_1 }} [/INST] {{ model_answer_1 }} </s><s>[INST] {{ user_msg_2 }} [/INST] {{ model_answer_2 }} </s><s>[INST] {{ user_msg_3 }} [/INST]\r\n\r\n```",
    "url": "https://github.com/huggingface/trl/issues/591",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-30T05:47:40Z",
    "updated_at": "2023-08-01T06:21:04Z",
    "user": "moseshu"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 228,
    "title": "[Question] Chaining automatic-speech recognition tasks sometimes produces weird output?",
    "body": "Hi! I'm using the automatic-speech recognition task with vanilla nodejs (20) for (almost) live transcription (after the person has stopped talking)\r\n\r\nThis is the setup I'm using as per the docs:\r\n\r\n```\r\nconst multilingual = true;\r\nconst model = \"base\";\r\nconst modelName = `Xenova/whisper-${model}${multilingual ? \"\" : \".en\"}`;\r\n\r\nconst transcriber = await pipeline(\"automatic-speech-recognition\", modelName);\r\n\r\nconst wav = new wavefile.WaveFile();\r\nwav.fromScratch(1, 48000, \"32f\", audioBuffer.getChannelData(0));\r\n\r\nwav.toSampleRate(16000); // Whisper expects audio with a sampling rate of 16000\r\n\r\nlet audioData = wav.getSamples();\r\nif (Array.isArray(audioData)) {\r\n  audioData = audioData[0];\r\n}\r\n\r\nlet output = await transcriber(audioData);\r\n```\r\n\r\nThis code almost works perfectly (also verified the wav files by saving them locally)\r\n\r\nBut every once in a while the model seems to get stuck for a couple of seconds. I can't say if this is because I'm sending multiple requests to the pipe while there's still a task in progress (multiple speakers), or something else entirely. Sadly I don't think there's any documentation if the pipeline has a queue of some sort or if it just mangles the data weirdly.\r\n\r\nThe output will look like this even though the sound-snippet only contains a single \"Ah...\":\r\n\r\n```\r\ntook 7.202248899996281s:  Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah... Ah...\r\n```\r\n\r\nor like this (no music was being played)\r\n\r\n```\r\ntook 6.9480034999996425s:  [Music]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\r\n```\r\n\r\nGeneration time is also much, much longer (normally under 1s with whisper-base, this is the main problem I'm facing)\r\n\r\nIs this is a bug? I was thinking of working around the problem by canceling the operation if it takes longer than 2-3s if that's possible, but that'd just be the laziest workaround.\r\n(something like `pipe.cancel();` or equivalent)\r\n\r\nOr alternatively implementing a queue myself if it actually jumbles data when chaining tasks\r\n\r\nThanks so much in advance for any suggestions! ",
    "url": "https://github.com/huggingface/transformers.js/issues/228",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-30T01:32:26Z",
    "updated_at": "2024-12-07T14:45:02Z",
    "user": "funiel"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4363,
    "title": "how to properly load sd_xl_base_1.0_0.9vae.safetensors",
    "body": "### Describe the bug\n\nhi, how should i load  sd_xl_base_1.0_0.9vae.safetensors given the namespace is the same as 1.0 one?\n\n### Reproduction\n\nN/A\n\n### Logs\n\n_No response_\n\n### System Info\n\nec2\n\n### Who can help?\n\n@sayakpaul @patrick",
    "url": "https://github.com/huggingface/diffusers/issues/4363",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2023-07-29T21:16:34Z",
    "updated_at": "2023-10-18T15:14:58Z",
    "user": "MaxTran96"
  },
  {
    "repo": "huggingface/optimum-neuron",
    "number": 151,
    "title": "any example of how to use with Accelerate?",
    "body": "All the examples seem to replace `Trainer` but we are using `Accelerate`. Much appreciated! :)",
    "url": "https://github.com/huggingface/optimum-neuron/issues/151",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-07-29T05:51:20Z",
    "updated_at": "2024-12-02T08:05:47Z",
    "user": "jiangts"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 226,
    "title": "voice recognition",
    "body": "@xenova hello bro i wish every things is good on you so i just wanna ask if we can recognize an audio file using his buffer ecxept wav extensions only i mean using mp3 file buffer or flac extension?\r\n```\r\n// Load audio data\r\nlet url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav';\r\nlet buffer = Buffer.from(await fetch(url).then(x => x.arrayBuffer()))\r\n\r\n// Read .wav file and convert it to required format\r\nlet wav = new wavefile.WaveFile(buffer);\r\nwav.toBitDepth('32f'); // Pipeline expects input as a Float32Array\r\nwav.toSampleRate(16000); // Whisper expects audio with a sampling rate of 16000\r\nlet audioData = wav.getSamples();\r\nif (Array.isArray(audioData)) {\r\n    // For this demo, if there are multiple channels for the audio file, we just select the first one.\r\n    // In practice, you'd probably want to convert all channels to a single channel (e.g., stereo -> mono).\r\n    audioData = audioData[0];\r\n}\r\n```\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/226",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-28T16:14:50Z",
    "updated_at": "2023-08-20T23:43:31Z",
    "user": "jedLahrim"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 372,
    "title": "Can I add i18n support?",
    "body": "Would be great to support the standard i18n in frontend, we can contribute with it, do you see that it would be an accepted contribution?\r\n\r\nMaybe using this lib [kaisermann/svelte-i18n](https://github.com/kaisermann/svelte-i18n/blob/main/docs/Getting%20Started.md)",
    "url": "https://github.com/huggingface/chat-ui/issues/372",
    "state": "closed",
    "labels": [
      "enhancement",
      "question",
      "front"
    ],
    "created_at": "2023-07-28T11:56:55Z",
    "updated_at": "2024-06-17T18:07:41Z",
    "user": "juancgalvis"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 371,
    "title": "Improve the UI, to be flexible width?",
    "body": "The left sidebar is growing here, and I wished I could make it wider. Same for the middle part, which is centered, and sometimes I have to scroll to the side to see the whole code block because the middle part has a left and right margin, what I can't control.\r\n\r\nIt would be great when we could set the percent value for the left sidebar and the middle part in users' profile?",
    "url": "https://github.com/huggingface/chat-ui/issues/371",
    "state": "open",
    "labels": [],
    "created_at": "2023-07-28T11:27:27Z",
    "updated_at": "2023-07-28T15:16:38Z",
    "comments": 2,
    "user": "tobiashochguertel"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 1786,
    "title": "Problem about how to save memory on 2 GPU at one machine.",
    "body": "Why I run my script on one GPU at batch_size 8,nothing happened, I use the accelerate launch my script on 2 GPU at same batch_size, both process terminate because CUDA out of Memory.\r\n\r\nHere is my config :\r\ncompute_environment: LOCAL_MACHINE\r\ndistributed_type: MULTI_GPU\r\ndowncast_bf16: 'no'\r\ndynamo_config:\r\n  dynamo_backend: INDUCTOR\r\ngpu_ids: all\r\nmachine_rank: 0\r\nmain_training_function: main\r\nmixed_precision: 'no'\r\nnum_machines: 1\r\nnum_processes: 2\r\nrdzv_backend: static\r\nsame_network: true\r\ntpu_env: []\r\ntpu_use_cluster: false\r\ntpu_use_sudo: false\r\nuse_cpu: false\r\n\r\nWhen normal run my script on one GPU, the memory util is about 23GB/24GB.\r\nIs this config make my process use more memory?",
    "url": "https://github.com/huggingface/accelerate/issues/1786",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-28T09:42:43Z",
    "updated_at": "2023-09-15T15:06:17Z",
    "user": "Kangkang625"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 720,
    "title": "How to make sure the local tgi server's  performance is ok",
    "body": "### Feature request\n\nHello, I just deployed the tgi server as docs in docker container on an single A100 and have a load test with bloom-7b1,   but the performance has come a long way from other inference servers, like vllm, fastertransformer in the same environment & condition. So, if there is something like an official performance table for a beginner like me to make sure the performance is ok, or there are detailed instructions for me to check and set up some options to improve throughput. Thanks a lot!\n\n### Motivation\n\nNone\n\n### Your contribution\n\nNone",
    "url": "https://github.com/huggingface/text-generation-inference/issues/720",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-07-28T07:57:18Z",
    "updated_at": "2024-04-25T01:58:42Z",
    "user": "lichangW"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 224,
    "title": "[Question] Merge whisper-base.en main and output_attentions?",
    "body": "I can see there is `output_attentions` branch on https://huggingface.co/Xenova/whisper-base.en/tree/main and the difference from `main` seems it can support `return_timestamps: 'word'`.\r\n\r\nIs there a plan/schedule to merge these two?\r\n\r\nOr these two branches are incompatible to be merged together? In such case, will both receive future updates?\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/224",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-28T07:44:52Z",
    "updated_at": "2023-09-04T20:59:21Z",
    "user": "jozefchutka"
  },
  {
    "repo": "huggingface/blog",
    "number": 1352,
    "title": "How to train the autoformer?",
    "body": "Dear authors,\r\n\r\nI have read your blog at https://huggingface.co/blog/autoformer, it is great to explain why transformer is better than Dlinear.\r\nHowever, I am wondering how to train my own Autoformer instead of using a pretrained Autoformer.\r\n\r\nBest regards",
    "url": "https://github.com/huggingface/blog/issues/1352",
    "state": "open",
    "labels": [],
    "created_at": "2023-07-28T03:28:33Z",
    "updated_at": "2023-12-07T17:40:09Z",
    "user": "AppleMax1992"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 718,
    "title": "How to make sure Flash and PagedAttention are running?",
    "body": "### System Info\n\nI am running the following for llamav2, and was wondering how I can make sure pagedattention and flashattention are running? any Flag to be set or they are enabled by default? \r\n\r\n\r\n```\r\ndocker run --gpus all --shm-size 1g -p $PORT:80 \\\r\n           -v $PWD/data:/data \\\r\n           -e HUGGING_FACE_HUB_TOKEN=$token \\\r\n           ghcr.io/huggingface/text-generation-inference:0.9.3 \\\r\n           --model-id $MODEL \\\r\n           --sharded false  \\\r\n           --max-input-length 1024 \\\r\n           --max-total-tokens 2048 \\\r\n           --max-best-of 5 \\\r\n           --max-concurrent-requests 5000 \\\r\n           --max-batch-total-tokens $TOKENS\\\r\n           --num-shard 4\r\n           \r\n ```\r\n            \n\n### Information\n\n- [X] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [ ] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\nIt more of question not a bug.\n\n### Expected behavior\n\njust doc clarification.",
    "url": "https://github.com/huggingface/text-generation-inference/issues/718",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-27T22:55:26Z",
    "updated_at": "2023-07-28T08:19:20Z",
    "user": "HamidShojanazeri"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 716,
    "title": "How to load private model in tgi in docker and difference inference performance when loading from huggingface/loading from locally directory",
    "body": "Hi team, \r\n  How do we load a private model in tgi in the docker because of the access issue? \r\n  One solution I think is to pre-download the model and then mount the model directory and load into tgi. However, I find out there is a big performance inference gap between these two methods and could the team provide some hints on why is it? \r\n  \r\n  Reproduce step: \r\n  Model example: bigcode/santacoder\r\n  1. inference on 100 tokens via model-id bigcode/santacoder is 180ms\r\n  Command: `docker run --gpus all  --shm-size 1g -p 8080:80 -v /data:/data ghcr.io/huggingface/text-generation-inference:0.9.4 --model-id bigcode/santacoder  --num-shard 1 --max-input-length 1000 --max-total-tokens 2000 --max-batch-total-tokens 4096 --max-concurrent-requests 1 --max-stop-sequences 20 --dtype float16 --trust-remote-code`\r\n\r\ntotal_time=\"158.787824ms\" validation_time=\"221.404\u00b5s\" queue_time=\"48.671\u00b5s\" inference_time=\"158.517849ms\" time_per_token=\"7.925892ms\"\r\n\r\n  2.1 first git clone the bigcode/santacoder directory by running  `git lfs install  && git clone https://huggingface.co/bigcode/santacoder `\r\n  2.2 running docker image loading via model-id santacoder directory. inference on 100 tokens is 280ms.  \r\ncommand \r\n`docker run --gpus all  -v santacoder_path:/model  --shm-size 1g -p 8080:80 -v /data:/data ghcr.io/huggingface/text-generation-inference:0.9.4 --model-id /model  --num-shard 1 --max-input-length 1000 --max-total-tokens 2000 --max-batch-total-tokens 4096 --max-concurrent-requests 1 --max-stop-sequences 20 --dtype float16 --trust-remote-code`\r\n\r\ntotal_time=\"329.15002ms\" validation_time=\"183.883\u00b5s\" queue_time=\"52.371\u00b5s\" inference_time=\"328.914016ms\" time_per_token=\"16.4457ms\" seed=\"None\"}:\r\n\r\nFor loading with local directory, it takes more time to shard  and it has one warning about  Model does not support automatic max batch total tokens.  Also the output is garbage.\r\n\r\nTest Command for query server  `curl 127.0.0.1:8080/generate     -X POST     -d '{\"inputs\":\"What is Deep Learning?\",\"parameters\":{\"max_new_tokens\":20}}'     -H 'Content-Type: application/json\r\n`\r\n I think there may be some additional steps to make model better performance but I have not realized it yet. Thanks for the help in advance!\r\nDocker image version: ghcr.io/huggingface/text-generation-inference:0.9.4\r\n \r\n  ",
    "url": "https://github.com/huggingface/text-generation-inference/issues/716",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-27T21:12:38Z",
    "updated_at": "2023-07-28T07:12:53Z",
    "user": "zch-cc"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 711,
    "title": "How could I know what is wrong when connect refuse happen?",
    "body": "Hi\r\n\r\nI try with below command to launch the docker.\r\n\r\n```\r\ndocker run --rm --name tgi --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=1 -p 8080:80 ghcr.io/huggingface/text-generation-inference:0.9.3  --model-id decapoda-research/llama-7b-hf\r\n```\r\n\r\nAt this moment, with netstat, I could see in host, 8080 port is already listened.\r\ntcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN\r\n\r\nand with\r\n\r\n```\r\ncurl 127.0.0.1:8080/generate \\\r\n    -X POST \\\r\n    -d '{\"inputs\":\"What is Deep Learning?\",\"parameters\":{\"max_new_tokens\":20}}' \\\r\n    -H 'Content-Type: application/json'\r\n```\r\n\r\n\r\nBut I get connect refuse.\r\nIs there some debugging method to check what goes wrong for this bug?\r\n\r\nThx\r\n\r\n",
    "url": "https://github.com/huggingface/text-generation-inference/issues/711",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-27T13:59:48Z",
    "updated_at": "2023-07-27T14:10:46Z",
    "user": "leiwen83"
  },
  {
    "repo": "huggingface/transformers",
    "number": 25138,
    "title": "How to return detected language using whisper with asr pipeline?",
    "body": "### System Info\n\n- `transformers` version: 4.31.0\r\n- Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.31\r\n- Python version: 3.10.12\r\n- Huggingface_hub version: 0.16.4\r\n- Safetensors version: 0.3.1\r\n- Accelerate version: not installed\r\n- Accelerate config: not found\r\n- PyTorch version (GPU?): 2.0.1 (False)\r\n- Tensorflow version (GPU?): 2.11.0 (False)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: No\r\n- Using distributed or parallel set-up in script?: No\n\n### Who can help?\n\n@sanchit-gandhi, @Narsil\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nHello,\r\n\r\nI'm trying to use asr pipeline with whisper, in other to detect an audio language and transcribe it. I get the transcribed audio successfully, but I have not found a way to return the detected language too.\r\nI search the GitHub issues, and it seems this was added by [#21427](https://github.com/huggingface/transformers/pull/21427), but I don't know how to return the detected language. Here is my code:\r\n```\r\nfrom transformers import pipeline\r\nimport torch\r\n\r\nspeech_file = \"input.mp3\"\r\ndevice = \"cuda:0\" if torch.cuda.is_available() else \"cpu\"\r\n\r\nwhisper = pipeline(\"automatic-speech-recognition\", max_new_tokens=448, model=\"openai/whisper-small\", device=device)\r\nwhisper_result = whisper(speech_file)\r\nprint(whisper_result)\r\n```\n\n### Expected behavior\n\nBe able to return detected language.",
    "url": "https://github.com/huggingface/transformers/issues/25138",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-27T10:51:31Z",
    "updated_at": "2025-02-11T11:24:49Z",
    "user": "arso1er"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 703,
    "title": "Is there an example how to quantize a model (e.g. meta-llama/Llama-2-7b-chat-hf) using the prebuilt docker image (e.g. ghcr.io/huggingface/text-generation-inference:0.9.3)",
    "body": "### System Info\r\n\r\n0.9.3\r\n\r\n### Information\r\n\r\n- [ ] Docker\r\n- [ ] The CLI directly\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported command\r\n- [ ] My own modifications\r\n\r\n### Reproduction\r\n\r\nNA\r\n\r\n### Expected behavior\r\n\r\nA command to quantize a model (e.g. meta-llama/Llama-2-7b-chat-hf) using the prebuilt docker image (e.g. ghcr.io/huggingface/text-generation-inference:0.9.3)\r\n\r\nAfter quantization, the model should be able to be loaded with `text-generation-inference --quantize gptq`",
    "url": "https://github.com/huggingface/text-generation-inference/issues/703",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-27T01:08:54Z",
    "updated_at": "2023-07-28T21:41:46Z",
    "user": "taoari"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2262,
    "title": "How to pass more than sentence pairs to InputExamples for fine-tuning?",
    "body": "I have more information about each data point such as language and contextual data that could potentially help (maybe) for our task. The task is to generate sentence similarity embedding and labels. \r\n\r\nFor the time being, I was able to expand the input examples code to get these features in to expand the input. \r\n\r\n```\r\nTrain_data = [\u2018sentence1\u2019,\u2019sentence2\u2019,\u2019textcategory1\u2019,\u2019label\u2019]\r\n\r\nTrain_examples =[InputExample(texts=[x[0],x[1],x[2]],label=x[3]) for x in Train_data]\r\n```\r\n\r\nSince the `textcategory1` gets encoded as well at the end of the input example in the form of `sentence1[0];sentence2[0];textcategory1[0]` separated by ;.\r\n\r\n1. How does this impact the overall input for a model since it doesnt just see a sentence pair but more? \r\n2. Does the fine-tuning layer see the two sentences as pairs or it sees as a single input and a label?\r\n3. Even though it works, if this is not the correct way how do I include the sense of tokens for the fine-tuning? I.e. use textcategory1 as <TOKEN1> or feature without messing with the embedding. ",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2262",
    "state": "open",
    "labels": [],
    "created_at": "2023-07-26T18:29:54Z",
    "updated_at": "2023-07-30T15:39:24Z",
    "user": "cyriltw"
  },
  {
    "repo": "huggingface/trl",
    "number": 578,
    "title": "How to load a trained reward model? Different (random) results each time the model is loaded.",
    "body": "I trained a reward model using QLoRA and now I want to load it. I followed the instructions from this example from peft:\r\nhttps://github.com/huggingface/peft/blob/main/examples/sequence_classification/LoRA.ipynb\r\nThis leads me to the following code:\r\n```\r\nimport torch\r\nfrom peft import PeftModel, PeftConfig\r\nfrom transformers import AutoModelForSequenceClassification, AutoTokenizer\r\n\r\npeft_model_id = \"vincentmin/llama-2-7b-reward-oasst1\"\r\nconfig = PeftConfig.from_pretrained(peft_model_id)\r\nmodel = AutoModelForSequenceClassification.from_pretrained(\r\n    config.base_model_name_or_path,\r\n    num_labels=1,\r\n    load_in_8bit=True,\r\n    torch_dtype=torch.float16,\r\n)\r\nmodel = PeftModel.from_pretrained(model, peft_model_id)\r\ntokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path, use_auth_token=True)\r\nmodel.eval()\r\nwith torch.no_grad():\r\n  reward = model(**tokenizer(\"hello world\", return_tensors='pt')).logits\r\nreward\r\n```\r\nIf I run this code twice in a row, including loading the model again, I get different results for `reward`. The model output should be deterministic. If I just calculate the reward with the same loaded model, the result is deterministic. Hence, I'm concluding that there are randomly initialised weights that are not correctly loaded with `PeftModel.from_pretrained`. If I try to test the model on the test data, I'm getting random (close to 50% accuracy) results, while the model reached accuracies of >70% during training.\r\n\r\nI trained the model using an adaptation of https://github.com/lvwerra/trl/blob/main/examples/scripts/reward_trainer.py. The resulting configuration is here https://huggingface.co/vincentmin/llama-2-7b-reward-oasst1/blob/main/adapter_config.json.\r\n\r\nHow are we advised to push and load our finetuned reward models to get deterministic results? I think the community would benefit from a documented example as a companion to `reward_trainer.py`.",
    "url": "https://github.com/huggingface/trl/issues/578",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-26T15:02:13Z",
    "updated_at": "2023-07-26T19:00:10Z",
    "user": "vincentmin"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6078,
    "title": "resume_download with streaming=True",
    "body": "### Describe the bug\n\nI used:\r\n```\r\ndataset = load_dataset(\r\n    \"oscar-corpus/OSCAR-2201\",\r\n    token=True,\r\n    language=\"fr\",\r\n    streaming=True,\r\n    split=\"train\"\r\n)\r\n```\r\nUnfortunately, the server had a problem during the training process. I saved the step my training stopped at.\r\nBut how can I resume download from step 1_000_\u00b4000 without re-streaming all the first 1 million docs of the dataset?\r\n\r\n`download_config=DownloadConfig(resume_download=True)` seems to not work with streaming=True.\n\n### Steps to reproduce the bug\n\n```\r\nfrom datasets import load_dataset, DownloadConfig\r\ndataset = load_dataset(\r\n    \"oscar-corpus/OSCAR-2201\",\r\n    token=True,\r\n    language=\"fr\",\r\n    streaming=True,  # optional\r\n    split=\"train\",\r\n    download_config=DownloadConfig(resume_download=True)\r\n)\r\n# interupt the run and try to relaunch it => this restart from scratch\r\n```\n\n### Expected behavior\n\nI would expect a parameter to start streaming from a given index in the dataset.\n\n### Environment info\n\n- `datasets` version: 2.14.0\r\n- Platform: Linux-5.19.0-45-generic-x86_64-with-glibc2.29\r\n- Python version: 3.8.10\r\n- Huggingface_hub version: 0.15.1\r\n- PyArrow version: 12.0.1\r\n- Pandas version: 2.0.0",
    "url": "https://github.com/huggingface/datasets/issues/6078",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-26T14:08:22Z",
    "updated_at": "2023-07-28T11:05:03Z",
    "comments": 3,
    "user": "NicolasMICAUX"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4281,
    "title": "how o convert trained LoRA bin format file to A111 safetensor format",
    "body": "### Describe the bug\r\n\r\nI find script convert_lora_safetensor_to_diffusers.py,but it seems like convert safetensors to bin,not bin to safetensors,I try run this script,error like this:\r\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Traceback (most recent call last) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\r\n\u2502 C:\\Users\\fut\\Desktop\\tinaniu\\convert_lora_safetensor_to_diffusers.py:125 in <module>             \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502   122 \u2502   lora_prefix_text_encoder = args.lora_prefix_text_encoder                               \u2502\r\n\u2502   123 \u2502   alpha = args.alpha                                                                     \u2502\r\n\u2502   124 \u2502                                                                                          \u2502\r\n\u2502 \u2771 125 \u2502   pipe = convert(base_model_path, checkpoint_path, lora_prefix_unet, lora_prefix_text_   \u2502\r\n\u2502   126 \u2502                                                                                          \u2502\r\n\u2502   127 \u2502   pipe = pipe.to(args.device)                                                            \u2502\r\n\u2502   128 \u2502   pipe.save_pretrained(args.dump_path, safe_serialization=args.to_safetensors)           \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502 C:\\Users\\fut\\Desktop\\tinaniu\\convert_lora_safetensor_to_diffusers.py:31 in convert               \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502    28 \u2502   pipeline = StableDiffusionPipeline.from_pretrained(base_model_path, torch_dtype=torc   \u2502\r\n\u2502    29 \u2502                                                                                          \u2502\r\n\u2502    30 \u2502   # load LoRA weight from .safetensors                                                   \u2502\r\n\u2502 \u2771  31 \u2502   state_dict = load_file(checkpoint_path)                                                \u2502\r\n\u2502    32 \u2502                                                                                          \u2502\r\n\u2502    33 \u2502   visited = []                                                                           \u2502\r\n\u2502    34                                                                                            \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502 D:\\anaconda3\\lib\\site-packages\\safetensors\\torch.py:259 in load_file                             \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502   256 \u2502   ```                                                                                    \u2502\r\n\u2502   257 \u2502   \"\"\"                                                                                    \u2502\r\n\u2502   258 \u2502   result = {}                                                                            \u2502\r\n\u2502 \u2771 259 \u2502   with safe_open(filename, framework=\"pt\", device=device) as f:                          \u2502\r\n\u2502   260 \u2502   \u2502   for k in f.keys():                                                                 \u2502\r\n\u2502   261 \u2502   \u2502   \u2502   result[k] = f.get_tensor(k)                                                    \u2502\r\n\u2502   262 \u2502   return result                                                                          \u2502\r\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\r\nSafetensorError: Error while deserializing header: HeaderTooLarge\r\n\r\n\r\n### Reproduction\r\n\r\nSafetensorError: Error while deserializing header: HeaderTooLarge\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\ndiffusers==0.18.2\r\n\r\n### Who can help?\r\n\r\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/4281",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2023-07-26T08:16:48Z",
    "updated_at": "2023-09-04T15:03:46Z",
    "user": "futureflsl"
  },
  {
    "repo": "huggingface/llm-vscode",
    "number": 50,
    "title": "the vsix doesn't work?,how to fix it",
    "body": "i download the vsix from https://marketplace.visualstudio.com/items?itemName=HuggingFace.huggingface-vscode&ssr=false#version-history\uff0cbut in vscode when i installed it ,it doesn't work \u3002could you fix this?",
    "url": "https://github.com/huggingface/llm-vscode/issues/50",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-26T07:05:17Z",
    "updated_at": "2023-10-17T14:34:58Z",
    "user": "CuteBadEgg"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 216,
    "title": "[Question] Getting a lot of ERR 404s when running in browser.",
    "body": "When implementing code that accesses bart-large-mnli in the front-end part of my code, the browser console tells me every attempt to use the pipeline fails with an error 404. (at least that's what I think it's telling me)\r\n\r\nSo I am trying to use the bart-large-mnli to analyze a bunch of 'post' objects, and only display them if the text in the post relates to a selected 'interest'. \r\n\r\nHere is my javascript code to do that (checkRelevance.js):\r\n```\r\nimport { pipeline } from \"@xenova/transformers\";\r\n\r\nexport default async function checkTweet(text, interest) {\r\n  try {\r\n    console.log(\r\n      `checking tweet...\\ntext:${text.substring(\r\n        0,\r\n        10\r\n      )}...\\ninterest:${interest}`\r\n    );\r\n    let pipe = await pipeline(\r\n      \"zero-shot-classification\",\r\n      \"Xenova/bart-large-mnli\",\r\n      { quantized: false }\r\n    );\r\n    // console.log(\"await out...\");\r\n    let out = await pipe(text, interest);\r\n    console.log(out);\r\n\r\n    const relevant = out.scores[0] >= 0.5;\r\n    console.log(out.scores[0]);\r\n    return relevant;\r\n  } catch (error) {\r\n    console.log(error);\r\n  }\r\n}\r\n```\r\nAnd here is how it is implemented in the front end Feed.jsx:\r\n\r\n```\r\nuseEffect(() => {\r\n    setFilteredPosts(posts.map(post => {\r\n       checkTweet(post.text, selectedInterest).then(result => {\r\n        if (result) {\r\n          return post\r\n        }\r\n      }\r\n      )\r\n    }))\r\n  }, [selectedInterest]);\r\n\r\n// ...\r\n\r\nfilteredPosts.map((post) => (\r\n          <Post\r\n            displayName={post.displayName}\r\n            userName={post.userName}\r\n            verified={post.verified}\r\n            text={post.text}\r\n            image={post.image}\r\n            avatar={post.avatar}\r\n          />) \r\n\r\n```\r\n\r\nNow when I run checkRelevance.js on it's own with a small test, it accesses the api just fine, but when it's implemented in the browser I get this:\r\n<img width=\"467\" alt=\"Screen Shot 2023-07-25 at 5 40 40 PM\" src=\"https://github.com/xenova/transformers.js/assets/77216995/6d693e09-d12d-4cfc-855d-7a764e0faca3\">\r\n\r\nand then this:\r\n<img width=\"475\" alt=\"Screen Shot 2023-07-25 at 5 41 06 PM\" src=\"https://github.com/xenova/transformers.js/assets/77216995/50ad64c1-28b3-4469-8171-e652ecdc0a33\">\r\n\r\nI'm not asking you to debug all my code lol, just wondering if there's something extra that needs doing for running it in the browser.  If you need to see more lmk. Thanks!\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/216",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-26T00:42:20Z",
    "updated_at": "2023-08-20T23:43:04Z",
    "user": "eklavyaisabird"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 215,
    "title": "[Question] How to use a sharp buffer as input to \"image-classification\" pipeline ?",
    "body": "hi,\r\ni am looking to use a sharp buffer as an input to \"image-classification\" pipeline, it seems that only url can be provided as an input, i am using the model in nodejs environment (backend) , can anyone provide a solution to this.\r\n\r\nthanks\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/215",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-25T21:10:06Z",
    "updated_at": "2023-07-25T21:42:18Z",
    "user": "geminigeek"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 368,
    "title": "Ability to pass in request headers for model endpoints",
    "body": "Hello.\r\n\r\nI am trying to add an AWS Sagemaker model endpoint to chat-ui and I am getting stuck on the authorization part because I can't pass in request headers to the endpoint. I am able to pass in the authorization string but then I get the following error:\r\n\r\n```\r\nCould not parse last message {\"message\":\"Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=AWS4-HMAC-SHA256 Credential=<redacted>, Signature=<redacted>\"}\r\nSyntaxError: Unexpected end of JSON input\r\n    at JSON.parse (<anonymous>)\r\n    at parseGeneratedText (/src/routes/conversation/[id]/+server.ts:196:32)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async saveMessage (/src/routes/conversation/[id]/+server.ts:107:26)\r\n```\r\n\r\nIs it possible to add the ability to pass in headers to the model endpoints in the `.env.local` file?",
    "url": "https://github.com/huggingface/chat-ui/issues/368",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-25T20:12:28Z",
    "updated_at": "2023-08-18T15:26:41Z",
    "comments": 3,
    "user": "lotif"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 161,
    "title": "How to save every X steps on cli?",
    "body": "You could set --save_strategy steps, but how do you specify the number of steps so that the model is saved every X steps?\r\n\r\nMy command:\r\n```\r\nautotrain llm --train --project_name project --model ./llama/llama_models/7B-hf --data_path . --use_peft --use_int4 --learning_rate 2e-4 --train_batch_size 12 --num_train_epochs 1 --trainer sft --save_strategy steps --save_total_limit 1\r\n```",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/161",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-25T16:10:22Z",
    "updated_at": "2023-12-18T15:29:08Z",
    "user": "astarostap"
  },
  {
    "repo": "huggingface/setfit",
    "number": 400,
    "title": "From which number of training samples does it not make sense anymore to use SetFit?",
    "body": "I'm building a classifier that assigns news articles to one of 8 categories, I was wondering if there was a rule of thumb that over a certain number of training samples per class it would make more sense to use a traditional transformer classifier such as roberta-large? Or will SetFit always be more accurate?\r\n\r\n\r\n ",
    "url": "https://github.com/huggingface/setfit/issues/400",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-25T06:56:04Z",
    "updated_at": "2023-08-01T14:13:48Z",
    "user": "lbelpaire"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4234,
    "title": "How to train instruct-pix2pix with controlnet and inference",
    "body": "Hi guys,\r\nI want to train instruct-pix2pix using controlnet condition. As you know, currently available for [instruct-pix2pix](https://huggingface.co/docs/diffusers/training/instructpix2pix) and [control net](https://huggingface.co/docs/diffusers/training/controlnet) separately. \r\n**Q1)** Have you plan about this problem for implementation?\r\n**Q2)** How I can merge them and add controlnet into instruct-pix2pix?\r\n**Q3)** Suppose this issue is done, I want to do start training, In your opinion, If we use controlnet pretraining network, and freeze that network and I want to train only instruct-pix2pix model, Is it common way to do?",
    "url": "https://github.com/huggingface/diffusers/issues/4234",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-07-24T13:47:02Z",
    "updated_at": "2023-08-31T15:04:14Z",
    "user": "mzeynali"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 366,
    "title": "v0.4.0 Not on GitHub",
    "body": "The hosted version is already at v0.4.0. This is at least not reflected in the tags or releases here. Is there other non public code?",
    "url": "https://github.com/huggingface/chat-ui/issues/366",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-24T11:35:38Z",
    "updated_at": "2023-07-24T13:19:30Z",
    "comments": 2,
    "user": "claell"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 364,
    "title": "Facing Error 403 after deployment",
    "body": "Hi folks!\r\nMy Chat-UI setup along with a custom LangChain model works perfect on localhost. I tried to deploy it on an Azure VM with Docker Containers and I have been facing this issue which might be due to MongoDB.\r\n\r\n![image](https://github.com/huggingface/chat-ui/assets/39643649/82b75337-7e99-4347-82ab-1ab4a1a38f93)\r\n\r\n Any help is appreciated. Thank you",
    "url": "https://github.com/huggingface/chat-ui/issues/364",
    "state": "closed",
    "labels": [
      "back",
      "support"
    ],
    "created_at": "2023-07-24T10:57:53Z",
    "updated_at": "2024-04-25T16:29:38Z",
    "comments": 13,
    "user": "awsum0225"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 363,
    "title": "When starting with build files, it becomes impossible to change the model.",
    "body": "When starting with pm2 following the Docker file's instructions, I encounter an issue where I cannot change the model. Specifically, after clicking on \"Current Model,\" a popup to select the model appears, but even after selecting \"Apply,\" no changes are observed. Upon inspecting the developer tools, I noticed a 403 Error for http://localhost:3000/settings. This problem occurs both when hosting the software on a Docker container and when deploying it directly.\r\n![image](https://github.com/huggingface/chat-ui/assets/7141702/ed16edd1-ebe5-4b1f-b47e-c6be1c380ccf)\r\n\r\nAlso, I have confirmed that this error does not occur when using `npm run dev` or `npm run preview`. Therefore, I suspect that this issue may be related to pm2. If someone has any hints or insights that could help resolve this problem, I would greatly appreciate comments.\r\n\r\nMy environment is as follows:\r\nOS: Windows 10 + WSL 2 (Ubuntu 20.04)\r\nNode Version: 18.15.0\r\nCommit ID: 569bde33470b075bf1365af2cb03a1b31b875379\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/363",
    "state": "closed",
    "labels": [
      "bug",
      "support"
    ],
    "created_at": "2023-07-24T08:30:03Z",
    "updated_at": "2023-10-16T16:07:25Z",
    "comments": 4,
    "user": "suzuki-shm"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4222,
    "title": "How to train ldm on a low-resolution image dataset (128*128)",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\r\n\r\n**Describe the solution you'd like**\r\nA clear and concise description of what you want to happen.\r\n\r\n**Describe alternatives you've considered**\r\nA clear and concise description of any alternative solutions or features you've considered.\r\n\r\n**Additional context**\r\nAdd any other context or screenshots about the feature request here.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/4222",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-07-24T03:14:20Z",
    "updated_at": "2023-08-31T15:04:25Z",
    "user": "crowningwang"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 679,
    "title": "How to load a model from a given path?",
    "body": "### System Info\n\ntgi version:0.9.0\n\n### Information\n\n- [X] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [ ] An officially supported command\n- [ ] My own modifications\n\n### Reproduction\n\nI just want to use tgi to run llama-7b model to get the throughput on A100.  The model files are preloaded in a given path. I followed the readme and found the following error. \r\n\r\n**Is theres any option for load model from a path?** Thanks~\r\n\r\n```shell\r\nme@ubuntu20-02:~/zy$ docker run --gpus all --shm-size 1g -p 8080:80 -v ~/w/data:/data ghcr.io/huggingface/text-generation-inference:0.9.2 --model-id /shared/models/huggingface/llama-7B-hf/ \r\n2023-07-23T14:17:02.797888Z  INFO text_generation_launcher: Args { model_id: \"/shared/models/huggingface/LLM/llama-7B-hf/\", revision: None, validation_workers: 2, sharded: None, num_shard: None, quantize: None, dtype: None, trust_remote_code: false, max_concurrent_requests: 128, max_best_of: 2, max_stop_sequences: 4, max_input_length: 1024, max_total_tokens: 2048, waiting_served_ratio: 1.2, max_batch_prefill_tokens: 4096, max_batch_total_tokens: 16000, max_waiting_tokens: 20, hostname: \"1401cbf60306\", port: 80, shard_uds_path: \"/tmp/text-generation-server\", master_addr: \"localhost\", master_port: 29500, huggingface_hub_cache: Some(\"/data\"), weights_cache_override: None, disable_custom_kernels: false, json_output: false, otlp_endpoint: None, cors_allow_origin: [], watermark_gamma: None, watermark_delta: None, ngrok: false, ngrok_authtoken: None, ngrok_domain: None, ngrok_username: None, ngrok_password: None, env: false }\r\n2023-07-23T14:17:02.798147Z  INFO text_generation_launcher: Starting download process.\r\n2023-07-23T14:17:08.906356Z ERROR text_generation_launcher: Download encountered an error: Traceback (most recent call last):\r\n\r\n  File \"/opt/conda/bin/text-generation-server\", line 8, in <module>\r\n    sys.exit(app())\r\n\r\n  File \"/opt/conda/lib/python3.9/site-packages/text_generation_server/cli.py\", line 109, in download_weights\r\n    utils.weight_files(model_id, revision, extension)\r\n\r\n  File \"/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/hub.py\", line 96, in weight_files\r\n    filenames = weight_hub_files(model_id, revision, extension)\r\n\r\n  File \"/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/hub.py\", line 25, in weight_hub_files\r\n    info = api.model_info(model_id, revision=revision)\r\n\r\n  File \"/opt/conda/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py\", line 112, in _inner_fn\r\n    validate_repo_id(arg_value)\r\n\r\n  File \"/opt/conda/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py\", line 160, in validate_repo_id\r\n    raise HFValidationError(\r\n\r\nhuggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/bigdata/shared/models/huggingface/LLM/llama-7B-hf/'. Use `repo_type` argument if needed.\r\n\r\n\r\nError: DownloadError\r\n```\n\n### Expected behavior\n\noutput the running log.",
    "url": "https://github.com/huggingface/text-generation-inference/issues/679",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-23T06:35:16Z",
    "updated_at": "2023-07-24T01:34:10Z",
    "user": "zhaoyang-star"
  },
  {
    "repo": "huggingface/controlnet_aux",
    "number": 67,
    "title": "Please I want to know how to install",
    "body": "Hello, I am new to this and I want to know how to install this particular package. I have installed other packages, but this one I do not know how. Please help with this.\r\n",
    "url": "https://github.com/huggingface/controlnet_aux/issues/67",
    "state": "open",
    "labels": [],
    "created_at": "2023-07-22T18:57:33Z",
    "updated_at": "2023-07-26T01:03:21Z",
    "user": "sohaib19922"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4210,
    "title": "How to use \"attention_mask\" in \"forward\" function of \"UNet2DConditionModel\" defined in \"diffusers/src/diffusers/models /unet_2d_condition.py\"?",
    "body": "### Describe the bug\n\nHow to use the \"attention_mask\" in UNet2DConditionModel? What should the size of \"attention_mask\" look like? \r\n\r\nAnd \"attention_mask\" can not be used when opening \"enable_xformers_memory_efficient_attention\" in \"examples/text_to_image/train_text_to_image.py\"? \r\n\r\n`  File \"/usr/local/lib/python3.9/dist-packages/diffusers/models/unet_2d_blocks.py\", line 970, in custom_forward\r\n    return module(*inputs, return_dict=return_dict)\r\n  File \"/usr/local/lib/python3.9/dist-packages/torch/nn/modules/module.py\", line 1501, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.9/dist-packages/diffusers/models/transformer_2d.py\", line 291, in forward\r\n    hidden_states = block(\r\n  File \"/usr/local/lib/python3.9/dist-packages/torch/nn/modules/module.py\", line 1501, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.9/dist-packages/diffusers/models/attention.py\", line 154, in forward\r\n    attn_output = self.attn1(\r\n  File \"/usr/local/lib/python3.9/dist-packages/torch/nn/modules/module.py\", line 1501, in _call_impl\r\n    return forward_call(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.9/dist-packages/diffusers/models/attention_processor.py\", line 321, in forward\r\n    return self.processor(\r\n  File \"/usr/local/lib/python3.9/dist-packages/diffusers/models/attention_processor.py\", line 1027, in __call__\r\n    attention_mask = attention_mask.expand(-1, query_tokens, -1)\r\n\r\nRuntimeError: expand(torch.cuda.HalfTensor{[80, 1, 6144, 6144]}, size=[-1, 6144, -1]): the number of sizes provided (3) must be greater or equal to the number of dimensions in the tensor (4)`\n\n### Reproduction\n\nNone\n\n### Logs\n\n_No response_\n\n### System Info\n\n- `diffusers` version: 0.19.0.dev0\r\n- Platform: Linux-5.4.143.bsk.7-amd64-x86_64-with-glibc2.31\r\n- Python version: 3.9.2\r\n- PyTorch version (GPU?): 2.0.1+cu117 (True)\r\n- Huggingface_hub version: 0.16.4\r\n- Transformers version: 4.30.2\r\n- Accelerate version: 0.21.0\r\n- xFormers version: 0.0.20\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\n\n### Who can help?\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/4210",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2023-07-22T17:28:56Z",
    "updated_at": "2024-10-18T16:34:37Z",
    "user": "ZihaoW123"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 1758,
    "title": "How to use c10 backend for fault tolerance",
    "body": "Hi,\r\n\r\nI found little to no documentation on how to use c10 backend for fault tolerance with accelerate. PyTorch seems to be having this:\r\nhttps://pytorch.org/docs/stable/elastic/rendezvous.html\r\n\r\nI am looking for fault tolerance in case of crash in few nodes, which also means adjusting batch size dynamically to account for nodes that are down.\r\n\r\nThanks in advance.",
    "url": "https://github.com/huggingface/accelerate/issues/1758",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-22T08:26:33Z",
    "updated_at": "2023-08-29T15:06:00Z",
    "user": "geekyGoku"
  },
  {
    "repo": "huggingface/autotrain-advanced",
    "number": 155,
    "title": "How to do inference via autotrain-advanced?",
    "body": "I see an option to do inference autotrain llm --help. \r\n1. Can you share command to do inference on say llama2 model ? How do you pass lora files to do inference?\r\n2.  Any option to do merge and unload while saving the model locally?\r\n3. Any option for multi-gpu training with single node - specify local rank?",
    "url": "https://github.com/huggingface/autotrain-advanced/issues/155",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-22T05:55:25Z",
    "updated_at": "2023-12-15T00:14:28Z",
    "user": "sujithjoseph"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 206,
    "title": "[Question] Output always equal to Input in text-generation",
    "body": "I tried a different types of input and always get the output equals the input... What I'm missing?\r\n\r\n```\r\nconst answerer = await pipeline('text-generation', 'Xenova/LaMini-Cerebras-590M');\r\n\r\nlet zica = await answerer(`Based on this history:\r\nAndr\u00e9 de Mattos Ferraz is an engineering manager in Rio de Janeiro, Brazil. He has worked in systems development in the oil sector, working in several areas of the oil/gas life cycle: Exploration, Reservoir, and Production. He also worked on data science projects for predicting failures of water injection pumps, forecasting water filter saturation (SRU), and analyzing vibrations.\r\n\r\nWhat are Andr\u00e9 tech skills?`);\r\nconsole.log(zica)\r\n```\r\n\r\n![image](https://github.com/xenova/transformers.js/assets/139378356/f35b3c9a-fdcc-4258-ac0d-0a2e8de83877)\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/206",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-21T21:18:02Z",
    "updated_at": "2023-07-22T02:21:05Z",
    "user": "AndreEneva"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 205,
    "title": "[Question] Is transformers.js expected to work with react native?",
    "body": "I've naively been trying to run the transformers js library via react native on android.\r\nNote that onnxruntime-react-native explicitly supports react native, however the transformers.js package depends only on onnxruntime-web and onnruntime-node.\r\nImporting the transformers.js works fine, however as I try to load a model, I receive the error `import.meta` is currently unsupported from `transformers.js`.\r\n\r\nIt would be super convenient to be able to use pipes directly without needing to interface without onnxruntine-react-native directly! If not supported yet, what would need to be done?",
    "url": "https://github.com/huggingface/transformers.js/issues/205",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-21T20:55:44Z",
    "updated_at": "2023-07-21T21:35:35Z",
    "user": "Wehzie"
  },
  {
    "repo": "huggingface/setfit",
    "number": 398,
    "title": "hyperparameters to control how to handle long documents",
    "body": "It's common that one might want to use setfit for classifying documents that are longer than max_token_len.\r\n\r\nThere are several strategies for handling long documents, and the efficacy of each is data dependent:\r\n* Break the document up at max_token_length, possibly avoiding breaking word boundaries.\r\n* Optionally using a sliding window.\r\n* Keeping all the windows, or the first k-windows, or something fancier like finding the most \"interesting\" windows with respect to the overall corpus.\r\n\r\nThen after embedding each window, different classification strategies are possible:\r\n* maxpool then predict\r\n* average then predict\r\n* predict then average\r\n\r\nIt would be great if these could approaches could be hyperparameters for validation + test.\r\n\r\nFor train, it might be easiest to insist the training max_token_len is in bounds, alternately the above strategies could be used too.\r\n\r\nRelated:\r\nhttps://github.com/UKPLab/sentence-transformers/issues/1673\r\nhttps://github.com/UKPLab/sentence-transformers/issues/1333\r\nhttps://github.com/UKPLab/sentence-transformers/issues/1166",
    "url": "https://github.com/huggingface/setfit/issues/398",
    "state": "open",
    "labels": [],
    "created_at": "2023-07-21T11:53:13Z",
    "updated_at": "2023-07-21T11:53:13Z",
    "user": "turian"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 672,
    "title": "What is optimal  max batch size max sequence length (max_total_tokens) for running llama 2 70b chat  on 4 A100 80GB?",
    "body": "This is what i have in my current config \r\nvalidation_workers: 2, max_total_tokens: 4096, waiting_served_ratio: 1.2, max_batch_prefill_tokens: 4096, max_batch_total_tokens: None, max_waiting_tokens: 20\r\n\r\nWhat do you recommend I should use to get the most out of inference for this setup? ",
    "url": "https://github.com/huggingface/text-generation-inference/issues/672",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-21T11:17:49Z",
    "updated_at": "2023-07-21T12:45:31Z",
    "user": "yakotoka"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6057,
    "title": "Why is the speed difference of gen example so big?",
    "body": "```python\r\ndef _generate_examples(self, metadata_path, images_dir, conditioning_images_dir):\r\n        with open(metadata_path, 'r') as file:\r\n            metadata = json.load(file)\r\n\r\n        for idx, item in enumerate(metadata):\r\n            image_path = item.get('image_path')\r\n            text_content = item.get('text_content')\r\n            image_data = open(image_path, \"rb\").read()\r\n            yield idx, {\r\n                \"text\": text_content,\r\n                \"image\": {\r\n                    \"path\": image_path,\r\n                    \"bytes\": image_data,\r\n                },\r\n                \"conditioning_image\": {\r\n                    \"path\": image_path,\r\n                    \"bytes\": image_data,\r\n                },\r\n            }\r\n```\r\nHello, \r\n\r\nI use the above function to deal with my local data set, but I am very surprised that the speed at which I generate example is very different. When I start a training task, **sometimes 1000examples/s, sometimes only 10examples/s.**\r\n\r\n![image](https://github.com/huggingface/datasets/assets/46072190/cdc17661-8267-4fd8-b30c-b74d505efd9b)\r\n\r\nI'm not saying that speed is changing all the time. I mean, the reading speed is different in different training, which will cause me to start training over and over again until the speed of this generation of examples is normal.\r\n",
    "url": "https://github.com/huggingface/datasets/issues/6057",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-21T03:34:49Z",
    "updated_at": "2023-10-04T18:06:16Z",
    "comments": 1,
    "user": "pixeli99"
  },
  {
    "repo": "pytorch/cpuinfo",
    "number": 169,
    "title": "How to cross-compile arm64 on linux",
    "body": "",
    "url": "https://github.com/pytorch/cpuinfo/issues/169",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-21T03:11:25Z",
    "updated_at": "2023-07-21T19:09:06Z",
    "user": "HongxiaoMa"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 203,
    "title": "how to do embeddings?",
    "body": "I want to create an AI assistant for my personal website using Node.js. While I can easily create it using OpenAI embeddings, their API costs are prohibitively expensive. Therefore, I am looking for an alternative method and wondering how I can perform embeddings using a CSV file. Can you advise me on how to do this?\r\n\r\n\r\n```\r\n\r\nasync function getEmbeddings(tokens) {\r\n  console.log(\"start getEmbeddings\");\r\n\r\n  let response;\r\n  try {\r\n    console.log(\"initiating openai api call\");\r\n    response = await openai.createEmbedding({\r\n      model: \"text-embedding-ada-002\",\r\n      input: tokens,\r\n    });\r\n  } catch (e) {\r\n    console.error(\"Error calling OpenAI API getEmbeddings:\", e?.response?.data);\r\n    throw new Error(\"Error calling OpenAI API getEmbeddings\");\r\n  }\r\n\r\n  return response.data.data;\r\n}\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/203",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-21T02:41:40Z",
    "updated_at": "2024-06-26T14:09:51Z",
    "user": "putuoka"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 361,
    "title": "Configuration for Llama 2",
    "body": "I am trying to self host Llama 2 with https://github.com/huggingface/text-generation-inference and https://github.com/huggingface/chat-ui . If I give configuration for chat-ui like this:\r\n\r\n```\r\n  {\r\n    \"name\": \"llama2-7b-chat\",\r\n    \"datasetName\": \"llama2-7b-chat\",\r\n    \"description\": \"A good alternative to ChatGPT\",\r\n    \"endpoints\": [{\"url\": \"http://127.0.0.1:8081/generate_stream\"}],\r\n    \"userMessageToken\": \"<|prompter|>\",\r\n    \"assistantMessageToken\": \"<|assistant|>\",\r\n    \"messageEndToken\": \"</s>\",\r\n    \"preprompt\": \"Below are a series of dialogues between various people and an AI assistant. The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable. The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed. It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer. That said, the assistant is practical and really does its best, and doesn't let caution get too much in the way of being useful.\\n-----\\n\",\r\n    \"promptExamples\": [\r\n      {\r\n        \"title\": \"Write an email from bullet list\",\r\n        \"prompt\": \"As a restaurant owner, write a professional email to the supplier to get these products every week: \\n\\n- Wine (x10)\\n- Eggs (x24)\\n- Bread (x12)\"\r\n      }, {\r\n        \"title\": \"Code a snake game\",\r\n        \"prompt\": \"Code a basic snake game in python, give explanations for each step.\"\r\n      }, {\r\n        \"title\": \"Assist in a task\",\r\n        \"prompt\": \"How do I make a delicious lemon cheesecake?\"\r\n      }\r\n    ],\r\n    \"parameters\": {\r\n      \"temperature\": 0.8,\r\n      \"top_p\": 0.95,\r\n      \"repetition_penalty\": 1.8,\r\n      \"top_k\": 10,\r\n      \"truncate\": 1000,\r\n      \"max_new_tokens\": 1024\r\n    }\r\n  }\r\n```\r\n\r\nIt will not return good response like https://huggingface.co/chat. \r\n\r\n![chat-ui-with-llama2-7b](https://github.com/huggingface/chat-ui/assets/661860/7afd7d99-2737-45fb-96d3-b4adfcc6e2d5)\r\n\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/361",
    "state": "closed",
    "labels": [
      "support",
      "models"
    ],
    "created_at": "2023-07-20T14:04:29Z",
    "updated_at": "2023-08-22T13:54:46Z",
    "comments": 3,
    "user": "aisensiy"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 658,
    "title": "How to use AutoGPTQ model in tgi",
    "body": "\r\n![image](https://github.com/huggingface/text-generation-inference/assets/76865636/0d752006-a387-4b6d-99a2-d17d58e27549)\r\n\r\ncommand\uff1a\r\n\r\nexport GPTQ_BITS=4\r\nexport GPTQ_GROUPSIZE=128\r\n\r\ntext-generation-launcher --model-id Ziya-LLaMA-13B_4bit --disable-custom-kernels --port 6006 --revision gptq-4bit-128g-actorder_True --quantize gptq\r\n\r\nresult:\r\n\r\nTraceback (most recent call last):\r\n\r\n  File \"/root/miniconda3/envs/text-generation-inference/bin/text-generation-server\", line 8, in <module>\r\n    sys.exit(app())\r\n\r\n  File \"/root/autodl-tmp/text-generation-inference-main/server/text_generation_server/cli.py\", line 78, in serve\r\n    server.serve(\r\n\r\n  File \"/root/autodl-tmp/text-generation-inference-main/server/text_generation_server/server.py\", line 169, in serve\r\n    asyncio.run(\r\n\r\n  File \"/root/miniconda3/envs/text-generation-inference/lib/python3.9/asyncio/runners.py\", line 44, in run\r\n    return loop.run_until_complete(main)\r\n\r\n  File \"/root/miniconda3/envs/text-generation-inference/lib/python3.9/asyncio/base_events.py\", line 647, in run_until_complete\r\n    return future.result()\r\n\r\n  File \"/root/autodl-tmp/text-generation-inference-main/server/text_generation_server/server.py\", line 136, in serve_inner\r\n    model = get_model(\r\n\r\n  File \"/root/autodl-tmp/text-generation-inference-main/server/text_generation_server/models/__init__.py\", line 195, in get_model\r\n    return CausalLM(\r\n\r\n  File \"/root/autodl-tmp/text-generation-inference-main/server/text_generation_server/models/causal_lm.py\", line 477, in __init__\r\n    model = AutoModelForCausalLM.from_pretrained(\r\n\r\n  File \"/root/miniconda3/envs/text-generation-inference/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py\", line 467, in from_pretrained\r\n    return model_class.from_pretrained(\r\n\r\n  File \"/root/miniconda3/envs/text-generation-inference/lib/python3.9/site-packages/transformers/modeling_utils.py\", line 2387, in from_pretrained\r\n    raise EnvironmentError(\r\n\r\nOSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory Ziya-LLaMA-13B_4bit.\r\n rank=0\r\n2023-07-20T08:34:02.453608Z ERROR text_generation_launcher: Shard 0 failed to start\r\n2023-07-20T08:34:02.453654Z  INFO text_generation_launcher: Shutting down shards",
    "url": "https://github.com/huggingface/text-generation-inference/issues/658",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-20T08:42:57Z",
    "updated_at": "2023-07-31T23:50:55Z",
    "user": "Minami-su"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 358,
    "title": "Broken encoding for Korean and possibly other languages",
    "body": "I was testing the llama2 and noticed there are some encoding errors (Ignore that the output is total nonsense):\r\n<img width=\"1618\" alt=\"image\" src=\"https://github.com/huggingface/chat-ui/assets/15624271/61868780-efa0-4670-84d9-734410a05451\">\r\nI though It could be because of weird mid-unicode tokenization but I also noticed this on a custom demo using huggingchat ui:\r\n\r\nIt renders correctly & strangely enough breaks and unbreaks randomly.\r\n\r\nhttps://github.com/huggingface/chat-ui/assets/15624271/7b7e97cb-876d-47cc-b89d-aabebb9197cf\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/358",
    "state": "closed",
    "labels": [
      "question",
      "models"
    ],
    "created_at": "2023-07-20T05:00:03Z",
    "updated_at": "2023-09-11T09:34:12Z",
    "user": "cceyda"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4160,
    "title": "How to use diffusers force zeros?",
    "body": "it seems that it only has effect if its used on instance of diffusers class before model is loaded,\r\nbut i only get instance when i call from_pretrained or from_single_file\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/4160",
    "state": "closed",
    "labels": [
      "stale",
      "SD.Next"
    ],
    "created_at": "2023-07-19T22:36:38Z",
    "updated_at": "2023-09-01T13:09:28Z",
    "user": "patrickvonplaten"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 200,
    "title": "[Question] Translation models",
    "body": "<!-- QUESTION GOES HERE -->\r\n@xenova is there a model that do the text translation that have lighter weight i mean with minimum size?",
    "url": "https://github.com/huggingface/transformers.js/issues/200",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-19T22:07:37Z",
    "updated_at": "2023-07-27T00:17:24Z",
    "user": "jedLahrim"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1532,
    "title": "provide one \"partial\" field per entry in aggregated responses",
    "body": "For example, https://datasets-server.huggingface.co/size?dataset=c4 only provides a global `partial: true` field and the response does not explicit that the \"train\" split is partial, while the \"test\" one is complete.\r\n\r\nEvery entry in `configs` and `splits` should also include its own `partial` field, to be able to show this information in the viewer (selects)\r\n\r\n- currently:\r\n  <img width=\"1528\" alt=\"Capture d\u2019e\u0301cran 2023-07-19 a\u0300 16 00 28\" src=\"https://github.com/huggingface/datasets-server/assets/1676121/92d27982-0fa3-44f2-a73f-a0ae614da40c\">\r\n- ideally, something like:\r\n  <img width=\"1529\" alt=\"Capture d\u2019e\u0301cran 2023-07-19 a\u0300 16 01 39\" src=\"https://github.com/huggingface/datasets-server/assets/1676121/c638af93-30de-4ab7-8fdd-389202d41c88\">\r\n\r\nEndpoints where we want these extra fields:\r\n\r\n- /info, dataset-level\r\n- /size, dataset-level\r\n- /size, config-level\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1532",
    "state": "open",
    "labels": [
      "question",
      "feature request",
      "P2"
    ],
    "created_at": "2023-07-19T20:01:58Z",
    "updated_at": "2024-05-16T09:36:20Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6053,
    "title": "Change package name from \"datasets\" to something less generic",
    "body": "### Feature request\r\n\r\nI'm repeatedly finding myself in situations where I want to have a package called `datasets.py` or `evaluate.py` in my code and can't because those names are being taken up by Huggingface packages. While I can understand how (even from the user's perspective) it's aesthetically pleasing to have nice terse library names, ultimately a library hogging simple names like this is something I find short-sighted, impractical and at my most irritable, frankly rude.\r\n\r\nMy preference would be a pattern like what you get with all the other big libraries like numpy or pandas:\r\n\r\n```\r\nimport huggingface as hf\r\n# hf.transformers, hf.datasets, hf.evaluate\r\n```\r\n\r\nor things like\r\n\r\n```\r\nimport huggingface.transformers as tf\r\n# tf.load_model(), etc\r\n```\r\n\r\nIf this isn't possible for some technical reason, at least just call the packages something like `hf_transformers` and so on.\r\n\r\nI realize this is a very big change that's probably been discussed internally already, but I'm making this issue and sister issues on each huggingface project just to start the conversation and begin tracking community feeling on the matter, since I suspect I'm not the only one who feels like this.\r\n\r\nSorry if this has been requested already on this issue tracker, I couldn't find anything looking for terms like \"package name\".\r\n\r\nSister issues:\r\n- [transformers](https://github.com/huggingface/transformers/issues/24934)\r\n- **datasets**\r\n- [evaluate](https://github.com/huggingface/evaluate/issues/476)\r\n\r\n### Motivation\r\n\r\nNot taking up package names the user is likely to want to use.\r\n\r\n### Your contribution\r\n\r\nNo - more a matter of internal discussion among core library authors.",
    "url": "https://github.com/huggingface/datasets/issues/6053",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-07-19T19:53:28Z",
    "updated_at": "2024-11-20T21:22:36Z",
    "comments": 2,
    "user": "jack-jjm"
  },
  {
    "repo": "huggingface/trl",
    "number": 542,
    "title": "Supervised Finetuning - How to mask loss for prompts ",
    "body": "How can I mask the loss in supervised fine-tuning for prompts similar to how it is done in the LLAMA-2 paper? \r\n\r\nSpecifically, I have a dataset of prompts and ideal answers. When fine-tuning my model with a `SFTTrainer` using a `ConstantLengthDataset` (similar to the StackExchange example), how can I ensure that prompts are not considered in the loss? ",
    "url": "https://github.com/huggingface/trl/issues/542",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-19T14:55:17Z",
    "updated_at": "2023-08-16T15:02:50Z",
    "user": "jvhoffbauer"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 351,
    "title": "Starchat-beta doesn't stop generating text properly",
    "body": "Hi, I am deploying starchat-beta and chat-ui locally, it is strange that I found the chat will generate some useful text in the beginning, then it will not stop, then generates some unrelated text, like below\r\n![Screenshot from 2023-07-19 22-23-00](https://github.com/huggingface/chat-ui/assets/7758217/a41395b1-fbe1-4632-b162-35d656ba30a0)\r\n\r\nIs it related with .env.local configuration?\r\n![Screenshot from 2023-07-19 22-25-01](https://github.com/huggingface/chat-ui/assets/7758217/bda3a91e-e5ce-4b7e-8b6c-e63d129dce37)\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/351",
    "state": "closed",
    "labels": [
      "support",
      "models"
    ],
    "created_at": "2023-07-19T14:32:59Z",
    "updated_at": "2023-07-20T06:29:09Z",
    "comments": 3,
    "user": "XiaPZ"
  },
  {
    "repo": "huggingface/trl",
    "number": 534,
    "title": "How to load a trained model to continue trianing?",
    "body": "Dear TRL team,\r\n\r\nI face a challenge that I can't finish the training in one go. Thus, I need to load the model that is trained half-way and continue the training process. Could you please guide me how to load the half-way trained model and continue the trianing process?\r\n\r\nBest",
    "url": "https://github.com/huggingface/trl/issues/534",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-19T04:36:15Z",
    "updated_at": "2023-08-26T15:04:58Z",
    "user": "zyzisastudyreallyhardguy"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4150,
    "title": "How to train text-to-image model based on SDXL?",
    "body": "Can I use the train_text_to_image.py code directly?",
    "url": "https://github.com/huggingface/diffusers/issues/4150",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-19T02:59:00Z",
    "updated_at": "2023-07-21T15:23:30Z",
    "user": "EnzoWuu"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 636,
    "title": "How to config vllm gpu_memory_utilization?",
    "body": "Hi team, I am trying using codegen2.5 7b model on tgi with A100 40GB and it gives me out of memory error because of vllm. I wonder if there is any way I can config gpu_memory_utilization in the code such that the vllm does not reserve too memory beforehand ",
    "url": "https://github.com/huggingface/text-generation-inference/issues/636",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-18T20:19:28Z",
    "updated_at": "2024-07-04T07:32:01Z",
    "user": "zch-cc"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1202,
    "title": "What is the process for contributing a new backend?",
    "body": "### Feature request\r\n\r\nIn terms of contributing a new backend/optimizer to Optimum as an optional extension, what is the process? \r\n\r\nI have been working on an Optimum integration with [DeepSparse](https://github.com/neuralmagic/deepsparse), Neural Magic's inference runtime for sparse execution on CPUs. If it is an open-source contribution that we've already started and will continue to support, is it mostly just a function of creating a `huggingface/optimum-deepsparse` repo to push up the state?\r\n\r\n### Motivation\r\n\r\nWe already have a project hosted by Neural Magic: https://github.com/neuralmagic/optimum-deepsparse\r\n\r\nIt is already functional for a few simple tasks (image/text/audio/token classification, question answering, masked lm) and is generally going for usability-parity with ORTModel since DeepSparse also takes in ONNX models directly for compilation. \r\nDeepSparse supports x86 and ARM CPUs, and is able to see performance benefits from unstructured sparsity on all platforms. \r\nHaving optimum-deepsparse be officially installable through the Optimum base as an extension i.e. `pip install optimum[deepsparse]` would be important for writing clean flows for people to sparsify their models and get the maximal inference performance out of their CPUs.\r\n\r\n### Your contribution\r\n\r\nhttps://github.com/neuralmagic/optimum-deepsparse\r\nI'm happy to submit a PR to add it to Optimum's setup.py, write documentation to detail how to use it, and anything else required to make an official request. Thank you!",
    "url": "https://github.com/huggingface/optimum/issues/1202",
    "state": "closed",
    "labels": [
      "question",
      "Stale"
    ],
    "created_at": "2023-07-18T18:07:14Z",
    "updated_at": "2025-05-13T02:14:09Z",
    "user": "mgoin"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 1743,
    "title": "what is the possible reason for accelerate running on cuda 12.2 8xA100 with error accelerate multiprocessing.api:failed (exitcode: -9)",
    "body": "### System Info\n\n```Shell\nubuntu 22.04\r\ngpu A100 80G\r\ncuda version 12.2\r\naccelerate version 0.21.0\n```\n\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nrunning the demo script from diffusers [train_text_to_image.py](https://github.com/huggingface/diffusers/tree/main/examples/text_to_image) for 100k iterations with batch size 8 each gpu, 8 A100 gpus in total\n\n### Expected behavior\n\nsuccessful training without any problem",
    "url": "https://github.com/huggingface/accelerate/issues/1743",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-18T13:33:35Z",
    "updated_at": "2023-08-15T09:18:05Z",
    "user": "garychan22"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2122,
    "title": "\u2753 Why the speed (time) in PTQ and QAT are different? ",
    "body": "## \u2753 Why the speed (time) in PTQ and QAT are different? \r\n\r\n\r\nI used your sample notebook.\r\nThe link is https://github.com/pytorch/TensorRT/blob/main/notebooks/qat-ptq-workflow.ipynb.\r\nI also performed this approach on some other models. In all cases like your example the PTQ converted model is faster than QAT converted model.\r\n\r\nI think they must have the same speed because their process is the same just some weights are different. Speeds must be the same. Is this for your implementation or this is typical?\r\nCan I make QAT converted model faster like PTQ?",
    "url": "https://github.com/pytorch/TensorRT/issues/2122",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: quantization"
    ],
    "created_at": "2023-07-18T13:18:58Z",
    "updated_at": "2023-11-02T00:02:20Z",
    "user": "panahikhas"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6048,
    "title": "when i use datasets.load_dataset, i encounter the http connect error!",
    "body": "### Describe the bug\n\n`common_voice_test = load_dataset(\"audiofolder\", data_dir=\"./dataset/\",cache_dir=\"./cache\",split=datasets.Split.TEST)`\r\nwhen i run the code above, i got the error as below:\r\n--------------------------------------------\r\nConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/2.3.2/datasets/audiofolder/audiofolder.py (ConnectionError(MaxRetryError(\"HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /huggingface/datasets/2.3.2/datasets/audiofolder/audiofolder.py (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f299ed082e0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))\")))\r\n\r\n\r\n--------------------------------------------------\r\nMy all data is on local machine, why does it need to connect the internet? how can i fix it, because my machine cannot connect the internet.\n\n### Steps to reproduce the bug\n\n1\n\n### Expected behavior\n\nno error when i use the load_dataset func\n\n### Environment info\n\npython=3.8.15",
    "url": "https://github.com/huggingface/datasets/issues/6048",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-18T10:16:34Z",
    "updated_at": "2023-07-18T16:18:39Z",
    "comments": 1,
    "user": "yangy1992"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 299,
    "title": "Any plan to support Nvidia GPUDirect Storage?",
    "body": "### Feature request\n\nNvidia GPUDirect Storage has better performance to load model from NVMe disk or supported distributed storage. It will do the real `zero copy`.\n\n### Motivation\n\nIt will get better performance with Nvidia GDS.\n\n### Your contribution\n\nNot sure.",
    "url": "https://github.com/huggingface/safetensors/issues/299",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-07-17T06:36:51Z",
    "updated_at": "2025-11-22T05:21:50Z",
    "comments": 9,
    "user": "carmark"
  },
  {
    "repo": "pytorch/pytorch.github.io",
    "number": 1410,
    "title": "Website front page does not say what PyTorch is",
    "body": "## \ud83d\udcda Documentation\r\n\r\nI came across PyTorch because I was installing some software and it appeared in the logs, so I decided to look it up and arrived on https://pytorch.org/. Unfortunately this was not enlightening, as the front page of the website does not clarify what PyTorch is. It does list: membership availability notice; links to featured reads, PyTorch 2.0, upcoming events; feature highlights; installation instructions; featured projects; community discussion channel links; but nowhere does it actually say what PyTorch is, which seems to me like quite important information for the front page of a project.\r\n",
    "url": "https://github.com/pytorch/pytorch.github.io/issues/1410",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-16T23:21:04Z",
    "updated_at": "2023-07-21T15:11:52Z",
    "user": "zopsicle"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1191,
    "title": "ONNX Generation - Support for Donut",
    "body": "### Feature request\r\n\r\nI have been trying to convert my custom Donut model to ONNX by using this specific command:\r\n!python3 -m optimum.exporters.onnx --model={custom_model_id} --task=vision2seq-lm  ./models/onnx --optimize O4 --atol 1e-2 --opset=13\r\n\r\nThe following exception occurs at the end of the process, by which I understand the vision-encoder-decoder is not supported yet. Are there any plans to integrate  vision-encoder-decoder for optimum.exporters.onnx soon?\r\n\r\nError observed:\r\n\r\nFile \"/usr/local/lib/python3.10/dist-packages/optimum/onnxruntime/utils.py\", line 162, in check_optimization_supported_model\r\n    raise NotImplementedError(\r\nNotImplementedError: ONNX Runtime doesn't support the graph optimization of vision-encoder-decoder yet. Only ['albert', 'bart', 'bert', 'big_bird', 'blenderbot', 'bloom', 'camembert', 'codegen', 'deberta', 'deberta-v2', 'distilbert', 'electra', 'gpt2', 'gpt_neo', 'gpt_neox', 'gptj', 'longt5', 'llama', 'marian', 'mbart', 'mt5', 'm2m_100', 'nystromformer', 'pegasus', 'roberta', 't5', 'vit', 'whisper', 'xlm-roberta'] are supported. If you want to support vision-encoder-decoder please propose a PR or open up an issue in ONNX Runtime: https://github.com/microsoft/onnxruntime.\r\n\r\n\r\n\r\n### Motivation\r\n\r\nUse  optimum.exporters.onnx  to convert custom Donut model to ONNX to improve inference performance.\r\n\r\n### Your contribution\r\n\r\nStill looking at the links and getting familiar how to proceed with change. will be grateful if someone can point me to resources where I can get started. thanks.",
    "url": "https://github.com/huggingface/optimum/issues/1191",
    "state": "closed",
    "labels": [
      "feature-request",
      "onnx"
    ],
    "created_at": "2023-07-16T13:38:38Z",
    "updated_at": "2024-10-15T16:14:33Z",
    "comments": 3,
    "user": "ghost"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 194,
    "title": "[Question] Transformers.js bundle size",
    "body": "I'm building a small project that runs `transformers.js` in a `Worker` to do client side embedding.\r\nI noticed that including `import { pipeline } from '@xenova/transformers';` immediately increases my bundle size to over **3MB**. \r\n\r\n![image](https://github.com/xenova/transformers.js/assets/3016806/f4a0f8bb-9d6f-4f92-a39c-ee3be4cc4198)\r\nCreated using [webpack-bundle-analyzer](https://www.npmjs.com/package/webpack-bundle-analyzer)\r\n\r\nOptimizing for this It's probably a large effort, but I was wondering if you have any ideas on how this could be optimized.",
    "url": "https://github.com/huggingface/transformers.js/issues/194",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-16T08:06:28Z",
    "updated_at": "2023-07-16T16:28:52Z",
    "user": "lizozom"
  },
  {
    "repo": "huggingface/trl",
    "number": 520,
    "title": "how to change the cache directory when using AutoModelForCausalLMWithValueHead.from_pretrained()",
    "body": "I have tried several methods, but it still download to my home directory",
    "url": "https://github.com/huggingface/trl/issues/520",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-16T04:21:45Z",
    "updated_at": "2023-07-17T08:11:02Z",
    "user": "zyzisastudyreallyhardguy"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2117,
    "title": "\u2753 Unable to freeze tensor of type Int64/Float64 into constant layer, try to compile model with truncate_long_and_double enabled? ",
    "body": "## \u2753 RuntimeError: [Error thrown at core/conversion/converters/converter_util.cpp:251] Unable to freeze tensor of type Int64/Float64 into constant layer, try to compile model with truncate_long_and_double enabled:\r\n1. A pre-trained Torch model like Resnet18 was loaded\r\n2. The model was quantized using `pytorch_quantization.quant_modules.initialize()`\r\n3. The quantized model was calibrated\r\n4. The model was fine-tuned (QAT)\r\n5. I tried to convert the fine-tuned model to TensorRT using\r\n`trt_mod = torch_tensorrt.compile(qat_model,\r\n                                 inputs=[torch_tensorrt.Input([32, 3, 32, 32])],\r\n                                 enabled_precisions={torch.int8})`\r\nbut I encountered the error below:\r\n\r\n`File \"/home/i2027/anaconda3/envs/p/lib/python3.10/site-packages/torch_tensorrt/_compile.py\", line 133, in compile`\r\n`    return torch_tensorrt.ts.compile(`\r\n`File \"/home/i2027/anaconda3/envs/p/lib/python3.10/site-packages/torch_tensorrt/ts/_compiler.py\", line 139, in compile`\r\n`    compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))`\r\n`RuntimeError: [Error thrown at core/conversion/converters/converter_util.cpp:251] Unable to freeze tensor of type Int64/Float64 into constant layer, try to compile model with truncate_long_and_double enabled`\r\n\r\nI have checked the model parameters and all of them were of type float32. I don't know why TorchTensorRT complains about Int64/Float64! Please note that I have managed to convert a simple CNN to TensorRT using the method described above successfully. However, I failed to convert an existing torchvision model using the steps above. I will be grateful for any hint.\r\n\r\n## Environment\r\n\r\n - PyTorch Version: 2.0.1+cu118\r\n - CPU Architecture: x86\r\n - OS: Ubuntu 20.04\r\n - How you installed PyTorch: pip\r\n - Python version: 3.10.11\r\n - CUDA version: 12.1\r\n - GPU models and configuration: GeForce GTX 1080 - 12 GB\r\n - All pckages versions:\r\n\r\n-  - torch==2.0.1+cu118\r\n-  - torch_tensorrt==1.4.0\r\n-  - torchvision==0.15.2+cu118\r\n-  - pytorch_quantization==2.1.2\r\n-  - torchvision==0.15.2+cu118\r\n\r\n## Additional context\r\n\r\nThe code is available at https://github.com/panahikhas/TensorRT-QAT/blob/main/torch-tensorrt-QAT.py to reproduce the results.\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2117",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-15T14:46:23Z",
    "updated_at": "2023-07-18T13:00:07Z",
    "user": "panahikhas"
  },
  {
    "repo": "huggingface/peft",
    "number": 711,
    "title": "How to change the location of soft tokens in prompt tuning",
    "body": "### Feature request\n\nIn fact, when prompt tuning, we will not always add it to the front, it may be in the middle. So I think it's important for us to change the location of soft tokens.\n\n### Motivation\n\nIn fact, when prompt tuning, we will not always add it to the front, it may be in the middle. So I think it's important for us to change the location of soft tokens.\n\n### Your contribution\n\nno",
    "url": "https://github.com/huggingface/peft/issues/711",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-15T13:57:52Z",
    "updated_at": "2024-04-09T06:39:55Z",
    "user": "XueTianci"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6038,
    "title": "  File \"/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py\", line 992, in _download_and_prepare     if str(split_generator.split_info.name).lower() == \"all\": AttributeError: 'str' object has no attribute 'split_info'. Did you mean: 'splitlines'?",
    "body": "Hi, I use the code below to load local file\r\n```\r\n    def _split_generators(self, dl_manager):\r\n        # TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration\r\n        # If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name\r\n\r\n        # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS\r\n        # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.\r\n        # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive\r\n        # urls = _URLS[self.config.name]\r\n        data_dir = dl_manager.download_and_extract(_URLs)\r\n        print(data_dir)\r\n        return [\r\n            datasets.SplitGenerator(\r\n                name=datasets.Split.TRAIN,\r\n                # These kwargs will be passed to _generate_examples\r\n                gen_kwargs={\r\n                    \"filepath\": os.path.join(data_dir[\"train\"]),\r\n                    \"split\": \"train\",\r\n                },\r\n            ),\r\n            datasets.SplitGenerator(\r\n                name=datasets.Split.VALIDATION,\r\n                # These kwargs will be passed to _generate_examples\r\n                gen_kwargs={\r\n                    \"filepath\": os.path.join(data_dir[\"dev\"]),\r\n                    \"split\": \"dev\",\r\n                },\r\n            ),\r\n        ]\r\n```\r\nand error occured\r\n```\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/zhizhou/data1/zhanghao/huggingface/FineTuning_Transformer/load_local_dataset.py\", line 2, in <module>\r\n    dataset = load_dataset(\"./QA_script.py\",data_files='/home/zhizhou/.cache/huggingface/datasets/conversatiom_corps/part_file.json')\r\n  File \"/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/load.py\", line 1809, in load_dataset\r\n    builder_instance.download_and_prepare(\r\n  File \"/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py\", line 909, in download_and_prepare\r\n    self._download_and_prepare(\r\n  File \"/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py\", line 1670, in _download_and_prepare\r\n    super()._download_and_prepare(\r\n  File \"/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py\", line 992, in _download_and_prepare\r\n    if str(split_generator.split_info.name).lower() == \"all\":\r\nAttributeError: 'str' object has no attribute 'split_info'. Did you mean: 'splitlines'?\r\n```\r\nCould you help me?",
    "url": "https://github.com/huggingface/datasets/issues/6038",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-15T07:58:08Z",
    "updated_at": "2023-07-24T11:54:15Z",
    "comments": 1,
    "user": "BaiMeiyingxue"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6033,
    "title": "`map` function doesn't fully utilize `input_columns`.",
    "body": "### Describe the bug\r\n\r\nI wanted to select only some columns of data.\r\nAnd I thought that's why the argument `input_columns` exists.\r\nWhat I expected is like this:\r\nIf there are [\"a\", \"b\", \"c\", \"d\"] columns, and if I set `input_columns=[\"a\", \"d\"]`, the data will have only [\"a\", \"d\"] columns.\r\n\r\nBut it doesn't select columns.\r\nIt preserves existing columns.\r\nThe main cause is `update` function of `dictionary` type `transformed_batch`.\r\n\r\nhttps://github.com/huggingface/datasets/blob/682d21e94ab1e64c11b583de39dc4c93f0101c5a/src/datasets/iterable_dataset.py#L687-L691\r\n\r\n`transformed_batch` gets all the columns by `transformed_batch = dict(batch)`.\r\nEven `function_args` selects `input_columns`, `update` preserves columns other than `input_columns`.\r\nI think it should take a new dictionary with columns in `input_columns` like this:\r\n```\r\n# transformed_batch = dict(batch)\r\n# transformed_batch.update(self.function(*function_args, **self.fn_kwargs)\r\n\r\n# This is what I think correct.\r\ntransformed_batch = self.function(*function_args, **self.fn_kwargs)\r\n```\r\n\r\nLet me know how to use `input_columns`.\r\n\r\n### Steps to reproduce the bug\r\n\r\nDescribed all above.\r\n\r\n### Expected behavior\r\n\r\nDescribed all above.\r\n\r\n### Environment info\r\n\r\ndatasets: 2.12\r\npython: 3.8",
    "url": "https://github.com/huggingface/datasets/issues/6033",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-14T08:49:28Z",
    "updated_at": "2023-07-14T09:16:04Z",
    "comments": 0,
    "user": "kwonmha"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 614,
    "title": "How to make it?   How can we extend the 'max_new_tokens' from 1512 to either 4096 or 8192?",
    "body": "### System Info\n\n How can we extend the 'max_new_tokens' from 1512 to either 4096 or 8192?\n\n### Information\n\n- [X] Docker\n- [ ] The CLI directly\n\n### Tasks\n\n- [X] An officially supported command\n- [X] My own modifications\n\n### Reproduction\n\n'max_new_tokens' from 1512 to either 4096 or 8192\n\n### Expected behavior\n\n'max_new_tokens' from 1512 to either 4096 or 8192",
    "url": "https://github.com/huggingface/text-generation-inference/issues/614",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-14T08:46:29Z",
    "updated_at": "2023-07-19T06:04:32Z",
    "user": "DiamondYuanqi"
  },
  {
    "repo": "pytorch/xla",
    "number": 5307,
    "title": "About deepspeed support for \"xla\"",
    "body": "## \u2753 Questions and Help\r\n\r\n[distributed support of deepspeed on xla] Hello, does deepspeed support distributed training for xla?  If not, can you provide support in this regard?\r\n",
    "url": "https://github.com/pytorch/xla/issues/5307",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-14T02:56:46Z",
    "updated_at": "2025-04-29T14:03:05Z",
    "user": "zhuziaaa"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 193,
    "title": "all-MiniLM-L6-v2 vector lengths",
    "body": "Hey, is there any way to programmatically set fix the vector embedding array lengths to a certain length? I was using https://huggingface.co/Xenova/all-MiniLM-L6-v2 with nodejs and every input I ran through the pipe gave a different length, and it would be nice to be able to keep it consistent.\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/193",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-13T20:31:06Z",
    "updated_at": "2023-07-13T22:32:03Z",
    "user": "unkn-wn"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 344,
    "title": "404 not found error when exporting data",
    "body": "https://github.com/huggingface/chat-ui/blob/1eff97d9fd47d8c486480d4d9a5208437c519cbb/src/routes/admin/export/%2Bserver.ts#L16\r\n\r\nI am using the main branch and tried to export the dataset with the curl request given in the code, but the server returns 404 not found.\r\nIts behind an reverse proxy with ssl, do i need to call the localhost or should it be possible even from outside the network ?",
    "url": "https://github.com/huggingface/chat-ui/issues/344",
    "state": "closed",
    "labels": [
      "question",
      "back"
    ],
    "created_at": "2023-07-13T08:40:27Z",
    "updated_at": "2023-11-10T09:50:22Z",
    "user": "flozi00"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2108,
    "title": "\u2753 [Question] How can I learn to convert an intermediate format IR to the TensorRT target?",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\nHello, I am also currently working on something similar to PyTorch FX. I would like to convert an intermediate format graph into a target engine (which can be any inference framework, using TensorRT as an example). I wanted to ask how Torch TRT accomplishes this operation. Are there any source code or documentation resources that I can refer to? Thank you very much!\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2108",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-13T04:58:16Z",
    "updated_at": "2023-08-11T08:08:23Z",
    "user": "sanbuphy"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2254,
    "title": "How to prepare label for the dataset that has two pairs of text, but not labels?",
    "body": "Hi,\r\n\r\nThank you for the great information, I have a question. My data has two column of texts, one as description of a request, the other one like an answer for that request. I want to use the Contrasiveloss to make the pairs of request and answer close and the other answer that are not related far, but I do not know how to provide the label for my positive pairs, and negative one, because the dataset function accept is a triple like this calling InputExample:\r\n\r\n(a1,b1,1)   (a1,bi,0)\r\n\r\nI appreciate your help.",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2254",
    "state": "open",
    "labels": [],
    "created_at": "2023-07-12T21:30:07Z",
    "updated_at": "2023-07-30T15:38:09Z",
    "user": "Yarmohamadshr"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1183,
    "title": "Cannot convert owlvit-base-patch32 model to ONNX and run inference",
    "body": "### System Info\n\n```shell\nOptimum version: 1.9.1\r\nPython version: 3.11.3\r\nOS: MacOS\n```\n\n\n### Who can help?\n\n@mich\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nWhen using the CLI command\r\n`optimum-cli export onnx --model google/owlvit-base-patch32 --task zero-shot-object-detection object_detection/owlvit_onnx` \r\nI'm able to get a converted ONNX format. Then, when using the following code to perform inference with the converted model:\r\n`checkpoint = \"google/owlvit-base-patch32\"`\r\n`processor = AutoProcessor.from_pretrained(checkpoint)`\r\n\r\n`image = skimage.data.astronaut()`\r\n`image = Image.fromarray(np.uint8(image)).convert(\"RGB\")`\r\n`text_queries = [\"human face\", \"rocket\", \"nasa badge\", \"star-spangled banner\", \"woman\", \"smile\", \"hair\", 'human head', 'human eye']`\r\n\r\n`np_inputs = processor(text=text_queries, images=image, return_tensors=\"np\")`\r\n`session = ort.InferenceSession(\"object_detection/owlvit_onnx/model.onnx\")`\r\n\r\n`out =session.run(['logits', 'pred_boxes', 'text_embeds', 'image_embeds'], np_inputs)`\r\n\r\nI get the following error: \r\n`RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running Reshape node. Name:'/Reshape_3' Status Message: /Users/runner/work/1/s/onnxruntime/core/providers/cpu/tensor/reshape_helper.h:41 onnxruntime::ReshapeHelper::ReshapeHelper(const onnxruntime::TensorShape &, onnxruntime::TensorShapeVector &, bool) gsl::narrow_cast(input_shape.Size()) == size was false. The input tensor cannot be reshaped to the requested shape. Input shape:{9,16}, requested shape:{2,4,16}`\r\n\r\nNow it seems to be related to some input being wrong, but I cannot get what is wrong. The pre-processing step is the same as for the HF model, the only difference being instead of returning \"pt\" tensors I'm returning \"np\" so it can work with ONNX. Here are my input shapes:\r\n\r\ninput_ids: (9, 16)\r\nattention_mask: (9, 16)\r\npixel_values: (1, 3, 768, 768)\r\n\r\nThanks in advance!\n\n### Expected behavior\n\nInference to run successfully and outputs to be very similar to that of the original torch model. ",
    "url": "https://github.com/huggingface/optimum/issues/1183",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-07-12T13:20:12Z",
    "updated_at": "2024-07-27T14:27:58Z",
    "comments": 9,
    "user": "Pedrohgv"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 105047,
    "title": "I don't how to bulid pytorch in my cpu",
    "body": "If you have a question or would like help and support, please ask at our\r\n[forums](https://discuss.pytorch.org/).\r\n\r\nIf you are submitting a feature request, please preface the title with [feature request].\r\nIf you are submitting a bug report, please fill in the following details.\r\n\r\n\r\nmy cpu is ppcle64\r\n\r\n\r\n- PyTorch or Caffe2: i want to bulid pytorch\r\n- How you installed PyTorch (conda, pip, source): pip\r\n- Build command you used (if compiling from source):\r\n- OS: Contens8\r\n- PyTorch version:\r\n- Python version:\r\n- CUDA/cuDNN version:\r\n- GPU models and configuration:\r\n- GCC version (if compiling from source):\r\n- CMake version:\r\n- Versions of any other relevant libraries:\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/105047",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-12T08:09:31Z",
    "updated_at": "2023-07-14T03:15:15Z",
    "user": "miaowahexiaohuolong"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 341,
    "title": "SSL Wrong version number error",
    "body": "i have added   this\r\n\"endpoints\": [\r\n        {\"url\": \"http://127.0.0.1:8080/generate_stream\", \"weight\": 100}\r\n    ],\r\n\r\nin the model but i am getting this error\r\n\r\nTypeError: fetch failed\r\n    at fetch (/home/fm-pc-lt-215/Desktop/chat-ui/chat-ui/node_modules/undici/index.js:109:13)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async eval (/node_modules/@sveltejs/kit/src/runtime/server/fetch.js:32:10)\r\n    at async POST (/home/fm-pc-lt-215/Desktop/chat-ui/chat-ui/src/routes/conversation/[id]/+server.ts:91:16)\r\n    at async Module.render_endpoint (/node_modules/@sveltejs/kit/src/runtime/server/endpoint.js:47:20)\r\n    at async resolve (/node_modules/@sveltejs/kit/src/runtime/server/respond.js:388:17)\r\n    at async Object.handle (/src/hooks.server.ts:66:20)\r\n    at async Module.respond (/node_modules/@sveltejs/kit/src/runtime/server/respond.js:259:20)\r\n    at async file:///home/fm-pc-lt-215/Desktop/chat-ui/chat-ui/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:506:22 {\r\n  cause: [Error: C0770BE8547F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:\r\n  ] {\r\n    library: 'SSL routines',\r\n    reason: 'wrong version number',\r\n    code: 'ERR_SSL_WRONG_VERSION_NUMBER'\r\n  }\r\n}\r\nError: aborted\r\n    at connResetException (node:internal/errors:717:14)\r\n    at abortIncoming (node:_http_server:754:17)\r\n    at socketOnClose (node:_http_server:748:3)\r\n    at Socket.emit (node:events:525:35)\r\n    at TCP.<anonymous> (node:net:322:12) {\r\n  code: 'ECONNRESET'\r\n}",
    "url": "https://github.com/huggingface/chat-ui/issues/341",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-07-12T04:40:58Z",
    "updated_at": "2023-09-18T14:00:27Z",
    "comments": 4,
    "user": "swikrit21"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4054,
    "title": "[SD-XL] How to apply invisible-watermark for latent output",
    "body": "### Describe the bug\n\nAs a part of the license with SAI, we need to ensure the invisible watermark is applied across all images output by these models, including the Img2Img pipeline.\n\n### Reproduction\n\n```py\r\n        # if xformers or torch_2_0 is used attention block does not need\r\n        # to be in float32 which can save lots of memory\r\n        if use_torch_2_0_or_xformers:\r\n            self.vae.post_quant_conv.to(latents.dtype)\r\n            self.vae.decoder.conv_in.to(latents.dtype)\r\n            self.vae.decoder.mid_block.to(latents.dtype)\r\n        else:\r\n            latents = latents.float()\r\n        if not output_type == \"latent\":\r\n            image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0]\r\n        else:\r\n            image = latents\r\n            return StableDiffusionXLPipelineOutput(images=image)\r\n```\r\n\r\nthe relevant portion of the img2img pipeline code.\r\n\r\nin the XL pipeline, the latent output mode does not have the watermark applied - so, it is easily bypassed.\n\n### Logs\n\n```shell\nN/A\n```\n\n\n### System Info\n\nGit main branch.\n\n### Who can help?\n\ncc: @sayakpaul ",
    "url": "https://github.com/huggingface/diffusers/issues/4054",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-07-12T03:58:04Z",
    "updated_at": "2023-07-12T10:21:29Z",
    "user": "bghira"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 192,
    "title": "Table Question Answering Support?",
    "body": "Hi - Interested in support for table question answering models. It's noted that these aren't supported, but is there any reason they wouldn't work if leveraged?\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/192",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-12T01:12:07Z",
    "updated_at": "2023-07-13T16:18:19Z",
    "user": "timtutt"
  },
  {
    "repo": "huggingface/peft",
    "number": 685,
    "title": "Matrix mistmatch when trying to adapt Falcon with QLoRA, how to fix?",
    "body": "### System Info\n\n```\r\n(data_quality) brando9~ $ python collect_env.py\r\nCollecting environment information...\r\nPyTorch version: 2.0.1\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.7\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 20.04.4 LTS (x86_64)\r\nGCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0\r\nClang version: Could not collect\r\nCMake version: version 3.26.4\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.10.11 (main, May 16 2023, 00:28:57) [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-5.4.0-122-generic-x86_64-with-glibc2.31\r\nIs CUDA available: True\r\nCUDA runtime version: 11.7.64\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration:\r\nGPU 0: NVIDIA A100-SXM4-80GB\r\nGPU 1: NVIDIA A100-SXM4-80GB\r\nGPU 2: NVIDIA A100-SXM4-80GB\r\nGPU 3: NVIDIA A100-SXM4-80GB\r\nGPU 4: NVIDIA A100-SXM4-80GB\r\nGPU 5: NVIDIA A100-SXM4-80GB\r\nGPU 6: NVIDIA A100-SXM4-80GB\r\nGPU 7: NVIDIA A100-SXM4-80GB\r\n\r\nNvidia driver version: 515.43.04\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                    x86_64\r\nCPU op-mode(s):                  32-bit, 64-bit\r\nByte Order:                      Little Endian\r\nAddress sizes:                   48 bits physical, 48 bits virtual\r\nCPU(s):                          128\r\nOn-line CPU(s) list:             0-127\r\nThread(s) per core:              2\r\nCore(s) per socket:              32\r\nSocket(s):                       2\r\nNUMA node(s):                    2\r\nVendor ID:                       AuthenticAMD\r\nCPU family:                      25\r\nModel:                           1\r\nModel name:                      AMD EPYC 7543 32-Core Processor\r\nStepping:                        1\r\nFrequency boost:                 enabled\r\nCPU MHz:                         3455.484\r\nCPU max MHz:                     2800.0000\r\nCPU min MHz:                     1500.0000\r\nBogoMIPS:                        5599.81\r\nVirtualization:                  AMD-V\r\nL1d cache:                       2 MiB\r\nL1i cache:                       2 MiB\r\nL2 cache:                        32 MiB\r\nL3 cache:                        512 MiB\r\nNUMA node0 CPU(s):               0-31,64-95\r\nNUMA node1 CPU(s):               32-63,96-127\r\nVulnerability Itlb multihit:     Not affected\r\nVulnerability L1tf:              Not affected\r\nVulnerability Mds:               Not affected\r\nVulnerability Meltdown:          Not affected\r\nVulnerability Mmio stale data:   Not affected\r\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp\r\nVulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization\r\nVulnerability Spectre v2:        Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP always-on, RSB filling\r\nVulnerability Srbds:             Not affected\r\nVulnerability Tsx async abort:   Not affected\r\nFlags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 invpcid_single hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.25.0\r\n[pip3] torch==2.0.1\r\n[pip3] torchaudio==2.0.2\r\n[pip3] torchvision==0.15.2\r\n[pip3] triton==2.0.0\r\n[conda] blas                      1.0                         mkl\r\n[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch\r\n[conda] mkl                       2023.1.0         h6d00ec8_46342\r\n[conda] mkl-service               2.4.0           py310h5eee18b_1\r\n[conda] mkl_fft                   1.3.6           py310h1128e8f_1\r\n[conda] mkl_random                1.2.2           py310h1128e8f_1\r\n[conda] numpy                     1.25.1                   pypi_0    pypi\r\n[conda] numpy-base                1.25.0          py310hb5e798b_0\r\n[conda] pytorch                   2.0.1           py3.10_cuda11.7_cudnn8.5.0_0    pytorch\r\n[conda] pytorch-cuda              11.7                 h778d358_5    pytorch\r\n[conda] pytorch-mutex             1.0                        cuda    pytorch\r\n[conda] torchaudio                2.0.2               py310_cu117    pytorch\r\n[conda] torchtriton               2.0.0                     py310    pytorch\r\n[conda] torchvision               0.",
    "url": "https://github.com/huggingface/peft/issues/685",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-11T20:01:37Z",
    "updated_at": "2023-07-24T00:11:02Z",
    "user": "brando90"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4047,
    "title": "How to set lora scale when loading a LoRA model?",
    "body": "Hey there, first of all thanks for your fantastic work!\r\n\r\nI am loading LoRA weights, and I would like to set the scale of them being applied. Checking the code, it appears to be possible as shown [here](https://github.com/huggingface/diffusers/blob/fc7aa64ea8f5979b67bd730777e8e1c32e3adb05/src/diffusers/loaders.py#L1094).\r\n\r\nHow can we do it in practice? Is it possible to provide a small code snippet? \r\n\r\nThank you so much! Really appreciate your help :)",
    "url": "https://github.com/huggingface/diffusers/issues/4047",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-11T17:38:05Z",
    "updated_at": "2023-08-29T05:30:44Z",
    "user": "pietrobolcato"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4042,
    "title": "How to combine the reference-only with inpainting and depth control?",
    "body": "### Model/Pipeline/Scheduler description\n\nHi, I recently want to combine the reference-only with image inpaint , with depth control to replace background for portrait images. However, I have no idea to build this pipeline as for there is no reference with inpaint pipeline example.  Could you please help me to figure it out?\n\n### Open source status\n\n- [ ] The model implementation is available\n- [ ] The model weights are available (Only relevant if addition is not a scheduler).\n\n### Provide useful links for the implementation\n\n_No response_",
    "url": "https://github.com/huggingface/diffusers/issues/4042",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-11T12:17:24Z",
    "updated_at": "2023-07-14T06:12:29Z",
    "user": "AmberCheng"
  },
  {
    "repo": "pytorch/text",
    "number": 2190,
    "title": "Missing documentation for T5 model",
    "body": "## \ud83d\udcda Documentation\r\n\r\n**Description**\r\n\r\n<!-- A clear and concise description of what content in https://pytorch.org/text/stable/index.html is an issue. -->\r\n\r\nAs per title. There is no documentation on T5 model although it exists\r\n\r\nhttps://pytorch.org/text/stable/models.html\r\n",
    "url": "https://github.com/pytorch/text/issues/2190",
    "state": "open",
    "labels": [],
    "created_at": "2023-07-11T10:40:37Z",
    "updated_at": "2023-07-11T10:40:37Z",
    "comments": 0,
    "user": "gau-nernst"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 340,
    "title": "[WebSearch] \"Input validation error: `inputs` tokens + `max_new_tokens` must be <= 1512. Given: 1000 `inputs` tokens and 1024 `max_new_tokens`\"",
    "body": "Hello there, \r\n\r\nTitle says it all. \r\nWe are not using any custom endpoints/models. We're just relying on the HuggingFace's API inferences. \r\nIs there a way to increase/decrease the inputs token when using WebSearch (or even just increase the max sum)? Because it works fine if `max_new_tokens` is set to 512 BUT it, obviously, cuts any answer getting upper these numbers. \r\nSo far, I didn't find a good balance neither how to decrease the number of tokens of the input. \r\n\r\nIn advance, thanks for your answer! \r\n![image](https://github.com/huggingface/chat-ui/assets/109650634/dbc25ae1-d894-48a7-8b0c-5a0bdad33e3e)\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/340",
    "state": "closed",
    "labels": [
      "question",
      "models"
    ],
    "created_at": "2023-07-11T07:33:18Z",
    "updated_at": "2023-07-12T09:16:21Z",
    "user": "gollumeo"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 4029,
    "title": "How can I make diffuser pipeline to use .safetensors file for SDXL?",
    "body": "Cloning entire repo is taking 100 GB\r\n\r\nHow can I make below code to use .safetensors file instead of diffusers?\r\n\r\nLets say I have downloaded my safetensors file into path.safetensors\r\n\r\nHow to provide it? \r\n\r\nThe below code working but we are cloning 100 GB instead of just single 14 GB safetensors. Waste of bandwidth\r\n\r\n**Also how can I add a LoRA checkpoint to this pipeline? a LoRA checkpoint made by Kohya script**\r\n\r\n```\r\nimport gradio as gr\r\n\r\nfrom diffusers import DiffusionPipeline\r\nimport torch\r\n\r\nimport base64\r\nfrom io import BytesIO\r\nimport os\r\nimport gc\r\nfrom datetime import datetime\r\n\r\nfrom share_btn import community_icon_html, loading_icon_html, share_js\r\n\r\n# SDXL code: https://github.com/huggingface/diffusers/pull/3859\r\n\r\nmodel_dir = '/workspace'\r\naccess_token = os.getenv(\"ACCESS_TOKEN\")\r\n\r\nif model_dir:\r\n    # Use local model\r\n    model_key_base = os.path.join(model_dir, \"stable-diffusion-xl-base-0.9\")\r\n    model_key_refiner = os.path.join(model_dir, \"stable-diffusion-xl-refiner-0.9\")\r\nelse:\r\n    model_key_base = \"stabilityai/stable-diffusion-xl-base-0.9\"\r\n    model_key_refiner = \"stabilityai/stable-diffusion-xl-refiner-0.9\"\r\n\r\n# Use refiner (enabled by default)\r\nenable_refiner = os.getenv(\"ENABLE_REFINER\", \"true\").lower() == \"true\"\r\n# Output images before the refiner and after the refiner\r\noutput_images_before_refiner = True\r\n\r\n# Create public link\r\nshare = os.getenv(\"SHARE\", \"false\").lower() == \"true\"\r\n\r\nprint(\"Loading model\", model_key_base)\r\npipe = DiffusionPipeline.from_pretrained(model_key_base, torch_dtype=torch.float16, use_auth_token=access_token)\r\n\r\n#pipe.enable_model_cpu_offload()\r\npipe.to(\"cuda\")\r\n\r\n# if using torch < 2.0\r\npipe.enable_xformers_memory_efficient_attention()\r\n\r\n\r\n\r\n# pipe.unet = torch.compile(pipe.unet, mode=\"reduce-overhead\", fullgraph=True)\r\n\r\nif enable_refiner:\r\n    print(\"Loading model\", model_key_refiner)\r\n    pipe_refiner = DiffusionPipeline.from_pretrained(model_key_refiner, torch_dtype=torch.float16, use_auth_token=access_token)\r\n    #pipe_refiner.enable_model_cpu_offload()\r\n    pipe_refiner.to(\"cuda\")\r\n\r\n    # if using torch < 2.0\r\n    pipe_refiner.enable_xformers_memory_efficient_attention()\r\n\r\n    # pipe_refiner.unet = torch.compile(pipe_refiner.unet, mode=\"reduce-overhead\", fullgraph=True)\r\n\r\n# NOTE: we do not have word list filtering in this gradio demo\r\n\r\n\r\n\r\nis_gpu_busy = False\r\n\r\ndef infer(prompt, negative, scale, samples=4, steps=50, refiner_strength=0.3, num_images=1):\r\n    prompt, negative = [prompt] * samples, [negative] * samples\r\n    images_b64_list = []\r\n\r\n    for i in range(0, num_images):\r\n        images = pipe(prompt=prompt, negative_prompt=negative, guidance_scale=scale, num_inference_steps=steps).images\r\n        os.makedirs(r\"stable-diffusion-xl-demo/outputs\", exist_ok=True)\r\n        gc.collect()\r\n        torch.cuda.empty_cache()\r\n        \r\n\t\t\r\n        if enable_refiner:\r\n            if output_images_before_refiner:\r\n                for image in images:\r\n                    buffered = BytesIO()\r\n                    image.save(buffered, format=\"JPEG\")\r\n                    img_str = base64.b64encode(buffered.getvalue()).decode(\"utf-8\")\r\n                    \r\n                    image_b64 = (f\"data:image/jpeg;base64,{img_str}\")\r\n                    images_b64_list.append(image_b64)\r\n\r\n            images = pipe_refiner(prompt=prompt, negative_prompt=negative, image=images, num_inference_steps=steps, strength=refiner_strength).images\r\n\r\n            gc.collect()\r\n            torch.cuda.empty_cache()\r\n\r\n        # Create the outputs folder if it doesn't exist\r\n        \r\n\r\n        for i, image in enumerate(images):\r\n            buffered = BytesIO()\r\n            image.save(buffered, format=\"JPEG\")\r\n            img_str = base64.b64encode(buffered.getvalue()).decode(\"utf-8\")\r\n            timestamp = datetime.now().strftime(\"%Y%m%d%H%M%S\")\r\n            image_b64 = (f\"data:image/jpeg;base64,{img_str}\")\r\n            images_b64_list.append(image_b64)\r\n            # Save the image as PNG with unique timestamp\r\n            filename = f\"stable-diffusion-xl-demo/outputs/generated_image_{timestamp}_{i}.png\"\r\n            image.save(filename, format=\"PNG\")\r\n\r\n    return images_b64_list\r\n\r\n```\r\n\r\n    ",
    "url": "https://github.com/huggingface/diffusers/issues/4029",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-10T21:52:22Z",
    "updated_at": "2023-12-11T18:45:18Z",
    "user": "FurkanGozukara"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 337,
    "title": "Feature Request: Save messages and error message even if text generation endpoint fails",
    "body": "Situation: Text generation endpoint is not running. Then user sends a message.\r\nCurrent Behavior: UI throws an error and saves conversation to mongodb like this, with an empty message list.\r\n```\r\n{\r\n    _id: ObjectId('64ac1abc2ac09222e24cc984'),\r\n    title: 'Untitled 5',\r\n    messages: [],\r\n    model: 'GPT',\r\n    createdAt: ISODate('2023-07-10T14:50:36.324Z'),\r\n    updatedAt: ISODate('2023-07-10T14:50:36.324Z'),\r\n    sessionId: '0048fb5c-a224-49c2-a7be-ea417defa6e2'\r\n}\r\n```\r\n\r\nDesired behavior: UI throws an error and saves conversation to mongodb with the user's message and the error message inside.\r\n```\r\n{\r\n    _id: ObjectId('64ac1abc2ac09222e24cc984'),\r\n    title: 'Untitled 5',\r\n    messages: [\r\n        {\r\n            content: 'What is 2-2?',\r\n            from: 'user',\r\n            id: '874cfd40-2c61-49fe-b9f6-8b296a79ab6a',\r\n        },\r\n        {\r\n            from: 'assistant',\r\n            error: 'TypeError: fetch failed\r\n    at fetch (C:\\chat-ui\\node_modules\\undici\\index.js:109:13)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async eval (/node_modules/@sveltejs/kit/src/runtime/server/fetch.js:32:10)\r\n    at async POST (/src/routes/conversation/[id]/+server.ts:90:16)\r\n    at async Module.render_endpoint (/node_modules/@sveltejs/kit/src/runtime/server/endpoint.js:47:20)\r\n    at async resolve (/node_modules/@sveltejs/kit/src/runtime/server/respond.js:388:17)\r\n    at async Object.handle (/src/hooks.server.ts:66:20)\r\n    at async Module.respond (/node_modules/@sveltejs/kit/src/runtime/server/respond.js:259:20)\r\n    at async file:///C:/chat-ui/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:506:22 {\r\n  cause: Error: connect ECONNREFUSED 127.0.0.1:80\r\n      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1532:16) {\r\n    errno: -4078,\r\n    code: 'ECONNREFUSED',\r\n    syscall: 'connect',\r\n    address: '127.0.0.1',\r\n    port: 80\r\n  }\r\n}\r\n        },\r\n    ],\r\n    model: 'GPT',\r\n    createdAt: ISODate('2023-07-10T14:50:36.324Z'),\r\n    updatedAt: ISODate('2023-07-10T14:50:36.324Z'),\r\n    sessionId: '0048fb5c-a224-49c2-a7be-ea417defa6e2'\r\n}\r\n```",
    "url": "https://github.com/huggingface/chat-ui/issues/337",
    "state": "closed",
    "labels": [
      "enhancement",
      "back",
      "p2"
    ],
    "created_at": "2023-07-10T15:18:52Z",
    "updated_at": "2023-10-10T11:16:22Z",
    "comments": 1,
    "user": "loganlebanoff"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 187,
    "title": "[Question] Performance and size of models",
    "body": "Great project, tons of potential! I have a general question I thought I may ask. Using the convert.py scripts, I took a Pytorch model and converted it to ONNX. With quantizing, I get a full 428MB model and a 110MB _quantized model. Now how does it work for the user exactly? Does the user automatically download the _quantized one?\r\n\r\nWould this be accurate:\r\n\r\n- WASM downloaded/loaded (e.g., 15MB)\r\n- Transformers.js runs the core\r\n- Model downloaded/load (e.g., 110MB)\r\n- Model starts and runs\r\n- Result is returned\r\n- (next time it is called, WASM is reloaded and model is cached)\r\n\r\n125MB is still quite big for the web: [https://huggingface.co/plopop/industry-classification-api-onnx](https://huggingface.co/plopop/industry-classification-api-onnx)\r\n\r\nWith something like [https://huggingface.co/Xenova/mobilebert-uncased-mnli](https://huggingface.co/Xenova/mobilebert-uncased-mnli) (27MB), running everything within a worker takes 8-15seconds depending on the input from our end right now - is there any other performance gains that can be saved, or would the only way be to optimize the source model further?",
    "url": "https://github.com/huggingface/transformers.js/issues/187",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-10T14:39:31Z",
    "updated_at": "2023-07-11T17:06:38Z",
    "user": "sabatale"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 336,
    "title": "how to work in chat-ui with non streaming data?",
    "body": "I was working in a chat-ui by providing my endpoints only which is hosted in a localhost:8000/generate. I dont have any model but endpoints only so can you provide me a solution for working in only endpoints and non streaming data( application/json or application/plain). I have model hosted in this server.\r\n\r\nin modelEndpoint.ts\r\nif (!model.endpoints) {\r\n\t\treturn {\r\n\t\t\turl: `http://10.0.2.27:8000/generate`,\r\n\t\t\t// authorization: `Bearer ${HF_ACCESS_TOKEN}`,\r\n\t\t\t// weight: 1,\r\n\t\t};\r\n\t}\r\nin \r\n\r\nError: An error occurred while fetching the blob\r\n    at request (file:///home/fm-pc-lt-215/Desktop/chat-ui/chat-ui/node_modules/@huggingface/inference/dist/index.mjs:89:11)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async Proxy.textGeneration (file:///home/fm-pc-lt-215/Desktop/chat-ui/chat-ui/node_modules/@huggingface/inference/dist/index.mjs:457:15)\r\n    at async Module.generateFromDefaultEndpoint (/src/lib/server/generateFromDefaultEndpoint.ts:22:28)\r\n    at async POST (/home/fm-pc-lt-215/Desktop/chat-ui/chat-ui/src/routes/conversation/[id]/summarize/+server.ts:30:26)\r\n    at async Module.render_endpoint (/node_modules/@sveltejs/kit/src/runtime/server/endpoint.js:47:20)\r\n    at async resolve (/node_modules/@sveltejs/kit/src/runtime/server/respond.js:388:17)\r\n    at async Object.handle (/src/hooks.server.ts:66:20)\r\n    at async Module.respond (/node_modules/@sveltejs/kit/src/runtime/server/respond.js:259:20)\r\n    at async file:///home/fm-pc-lt-215/Desktop/chat-ui/chat-ui/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:506:22\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/336",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-10T13:43:17Z",
    "updated_at": "2023-07-11T08:29:40Z",
    "user": "swikrit21"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 186,
    "title": "[Question] How to interpret boxes in object detection example ?",
    "body": "hi,\r\n\r\ncan anyone help me how to interpret boxes while using object detection with this model \"Xenova/detr-resnet-50\".\r\ni want to crop out the detected object from the image using sharp (nodejs) ? how can i pass these boxes to sharp resize function ? \r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/186",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-10T12:59:22Z",
    "updated_at": "2023-07-11T00:55:13Z",
    "user": "geminigeek"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 335,
    "title": "Bug: Unexpected execution result on Firefox browser with Chat-UI ver. 0.3.0",
    "body": "I recently installed the 0.3.0 version of the HF Chat-UI software. \r\nI then performed an evaluation using the **HuggingFaceH4/starchat-beta** model. \r\nAt that time, I typed the question \"_Could you tell me about the weather in Toyko City in Japan on July-10-2023_?\" and ran it.\r\n\r\n\r\nUnfortunately, the results varied between browsers. \r\nIn the Firefox browser, the result is displayed normally. \r\nHowever, the following error occurs in the Chrome browser. \r\n\r\n* **Error message:** \r\n```\r\n403 You don't have access to this conversation. \r\nIf someone gave you this link, ask them to use the 'share' feature instead.\r\n```\r\n\r\n\r\nI was wondering if anyone else is experiencing the same issue, any comments are welcome.\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/335",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-07-10T04:40:40Z",
    "updated_at": "2023-09-11T09:32:14Z",
    "comments": 2,
    "user": "leemgs"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 334,
    "title": "Chat-ui is starting, but nothing happends",
    "body": "# Description:\r\n\r\nWhen starting the Chat-ui, the initialization process begins as expected but stalls indefinitely, without any evident progress. The application doesn't crash nor gives any errors. This issue occurs across multiple attempts, regardless of browser type or device.\r\n\r\n# Steps to reproduce:\r\n- Install prerequisites\r\n- Fill evn.local file\r\n- Lauch a DB container for chat persistance\r\n- Start Chat-UI\r\n- Open a browser (e.g., Chrome, Firefox, Safari)\r\n- Navigate to the Chat-ui web address.\r\n- Observe the behavior.\r\n\r\n# Expected result:\r\n\r\nAfter navigating to the url, the Chat-ui should initialize and allow for the use of its various functionalities.\r\n\r\n# Actual result:\r\n\r\nThe UI remains in a state of 'loading' indefinitely without any change, timing out after some time.\r\n\r\n# Environment:\r\nThis issue was reproduced on:\r\n1. Operating System: Ubuntu 22.04, Fedora Workstation 38\r\n2. Node Version: v18.16.1\r\n3. NPM Version: 9.5.1\r\n\r\nAdditional context:\r\n- No error messages are displayed.\r\n- There is no notable console log information.\r\n- Network status is stable during the process.\r\n- Similar behavior noticed on Fedora.\r\n- Refreshing the browser, clearing the cache, or using a different browser does not resolve the issue.\r\n- Firewall is disabled on host\r\n\r\nIf you need any further information, I would be glad to provide it. Thanks in advance!",
    "url": "https://github.com/huggingface/chat-ui/issues/334",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-07-09T13:53:34Z",
    "updated_at": "2023-09-11T09:31:49Z",
    "comments": 2,
    "user": "Notespeak"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 3988,
    "title": "how to use part of the controlnet models with a \"StableDiffusionControlNetInpaintPipeline\" object?",
    "body": "I created a \"StableDiffusionControlNetInpaintPipeline\" object with a list of controlnet models such as \"canny\",\"openpose\", but sometimes I want to use canny only or openpose only.Is there's a way to reuse part of the controlnet models with a already inited \"StableDiffusionControlNetInpaintPipeline\" object?",
    "url": "https://github.com/huggingface/diffusers/issues/3988",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-07T09:18:18Z",
    "updated_at": "2023-08-01T04:51:41Z",
    "user": "AdamMayor2018"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 104764,
    "title": "How to integrate the new cpp file with Pytorch geometric? ",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI am using neighbour loader function in my code, which uses sample_adj_cpu function to sample neighbours. I am making some changes in this function which is present in the following file.\r\n\r\nFile link:\r\n[[pytorch_sparse](https://github.com/rusty1s/pytorch_sparse/tree/master)/[csrc](https://github.com/rusty1s/pytorch_sparse/tree/master/csrc)/[cpu](https://github.com/rusty1s/pytorch_sparse/tree/master/csrc/cpu)\r\n/sample_cpu.cpp](url)\r\n\r\nHow to integrate these changes in Pytorch geometric?\r\n\r\nAlternatives\r\nNo response\r\n\r\nAdditional context\r\nNo response\r\n\r\ncc @alexsamardzic @nikitaved @pearu @cpuhrsch @amjames @bhosmer\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/104764",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-07T07:48:04Z",
    "updated_at": "2023-07-07T16:32:01Z",
    "user": "shivanisankhyan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2082,
    "title": "\u2753 [Question] How to decrease the latency of the inference? ",
    "body": "## \u2753 Question\r\nHi. I convert pytorch retinaface and arcface model to TensorRT via torch_tensorrt library. Everything is okay but after some iterations inference is freezing and the time for handling the image is badly increased (>10x).\r\nSnippet of inference simulation is here:\r\n\r\n## Environment\r\n\r\nTensorRT Version: 8.4.2\r\nGPU Type: A100\r\nNvidia Driver Version: 465.19.01\r\nCUDA Version: 11.3\r\nCUDNN Version: 8\r\nOperating System + Version: SLES \u201c15-SP2\u201d in host machine\r\nPython Version (if applicable): 3.8\r\nPyTorch Version (if applicable): 1.13.0a0+d321be6\r\nBaremetal or Container (if container which image + tag): [nvcr.io/nvidia/pytorch:22.08-py3](http://nvcr.io/nvidia/pytorch:22.08-py3)\r\n\r\n##  Code\r\n```\r\n\r\nimport torch\r\nimport torch_tensorrt\r\nimport time\r\n\r\nDEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'\r\n\r\n\r\nretinaface_model = torch.jit.load('../jit_retinaface_trt.torch-tensorrt') \r\nretinaface_model.eval()\r\nretinaface_model.to(DEVICE)\r\n\r\n\r\narcface_model = torch.jit.load('../arcface_bs1_torch.float32.torch-tensorrt')\r\narcface_model.eval()\r\narcface_model.to(DEVICE)\r\n\r\nretinaface_tensor = torch.rand(1, 3, 360, 640).to(DEVICE)\r\narcface_tensor = torch.rand(1, 3, 112, 112).to(DEVICE)\r\n\r\nfor _ in range(100):\r\n    global_start = time.time()\r\n    start_time = time.time()\r\n    with torch.no_grad():\r\n        ret_out = retinaface_model(retinaface_tensor)\r\n    torch.cuda.synchronize()\r\n    end_time = time.time()\r\n    ret_time = end_time - start_time\r\n    start_time = time.time()\r\n    with torch.no_grad():\r\n        arc_out = arcface_model(arcface_tensor)\r\n    torch.cuda.synchronize()\r\n    end_time = time.time()\r\n    arc_time = end_time - start_time\r\n    global_end = time.time()\r\n    global_time = global_end - global_start\r\n    # if global_time > 0.1:\r\n    print(f'ret time is : {ret_time}')\r\n    print(f'arc time is : {arc_time}')\r\n    print(f'global time is : {global_end-global_start}')\r\n    print('-'*40)\r\n```\r\n\r\n## Outputs\r\nOutputs:\r\nNormally output is like this:\r\nret time is : 0.0009617805480957031\r\narc time is : 0.0019981861114501953\r\nglobal time is : 0.002961874008178711\r\nret time is : 0.0008959770202636719\r\narc time is : 0.0019989013671875\r\nglobal time is : 0.002896547317504883\r\nret time is : 0.0009148120880126953\r\narc time is : 0.0020008087158203125\r\nglobal time is : 0.0029172897338867188\r\nret time is : 0.0008985996246337891\r\narc time is : 0.001995086669921875\r\nglobal time is : 0.002894878387451172\r\nret time is : 0.00446009635925293\r\narc time is : 0.002003192901611328\r\nglobal time is : 0.006464719772338867\r\nret time is : 0.0009562969207763672\r\narc time is : 0.0020017623901367188\r\nglobal time is : 0.0029592514038085938\r\nret time is : 0.0009098052978515625\r\narc time is : 0.002006053924560547\r\nglobal time is : 0.002917051315307617\r\nret time is : 0.0009250640869140625\r\narc time is : 0.001997709274291992\r\nglobal time is : 0.002924203872680664\r\nret time is : 0.0009291172027587891\r\narc time is : 0.001995086669921875\r\nglobal time is : 0.002925395965576172\r\nret time is : 0.0009377002716064453\r\narc time is : 0.0020194053649902344\r\nglobal time is : 0.0029582977294921875\r\nret time is : 0.0009005069732666016\r\narc time is : 0.0019958019256591797\r\nglobal time is : 0.0028977394104003906\r\nret time is : 0.0009152889251708984\r\narc time is : 0.001996755599975586\r\nglobal time is : 0.0029134750366210938\r\nret time is : 0.0009534358978271484\r\narc time is : 0.0019991397857666016\r\nglobal time is : 0.0029540061950683594\r\nret time is : 0.0009467601776123047\r\narc time is : 0.0020117759704589844\r\nglobal time is : 0.002960205078125\r\nret time is : 0.0008974075317382812\r\narc time is : 0.0019989013671875\r\nglobal time is : 0.0028977394104003906\r\nret time is : 0.0009267330169677734\r\narc time is : 0.002001523971557617\r\nglobal time is : 0.0029296875\r\n\r\n\r\nBut after some iterations and time return this:\r\n\r\nret time is : 0.0030410289764404297\r\narc time is : 0.10997724533081055 <-----\r\nglobal time is : 0.11302065849304199\r\nret time is : 0.002657651901245117\r\narc time is : 0.1075441837310791 <-----\r\nglobal time is : 0.11020350456237793\r\nret time is : 0.1104578971862793 <-----\r\narc time is : 0.0020885467529296875\r\nglobal time is : 0.1125497817993164\r\nret time is : 0.11419057846069336 <-----\r\narc time is : 0.0020301342010498047\r\nglobal time is : 0.11622214317321777\r\nret time is : 0.10733747482299805 <-----\r\narc time is : 0.0020294189453125\r\nglobal time is : 0.10936880111694336\r\nret time is : 0.1150820255279541 <-----\r\narc time is : 0.0020606517791748047\r\nglobal time is : 0.11714410781860352\r\n\r\n\r\nI try changing the clock freq to the max of A100(1410MHz) but nothing changes from the default(765MHz).\r\nIn real-time handling after 26-28 iterations this happens.\r\nIt will be great if you support fixing this. Thanks in advance!!!",
    "url": "https://github.com/pytorch/TensorRT/issues/2082",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: runtime",
      "performance"
    ],
    "created_at": "2023-07-07T05:51:35Z",
    "updated_at": "2023-10-16T00:02:22Z",
    "user": "hvildan"
  },
  {
    "repo": "huggingface/optimum-habana",
    "number": 292,
    "title": "Where in the directory \"/tmp/tst-summarization\", is the summarization output stored? ",
    "body": "### System Info\n\n```shell\nOptimum Habana : 1.6.0\r\nSynapseAI : 1.10.0\r\nDocker Image : Habana\u00ae Deep Learning Base AMI (Ubuntu 20.04)\r\nVolume : 1000 GiB\n```\n\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nStart an EC2 instance with DL1 Resource and this image : Habana\u00ae Deep Learning Base AMI (Ubuntu 20.04)\r\nRun these commands\r\na. docker run -it --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --net=host --ipc=host vault.habana.ai/gaudi-docker/1.10.0/ubuntu20.04/habanalabs/pytorch-installer-2.0.1:latest\r\nb. git clone https://github.com/huggingface/optimum-habana.git\r\nc. pip install optimum[habana]\r\nd. cd examples\r\ne. cd summarization\r\nf. pip install -r requirements.txt\r\n\r\npython run_summarization.py \\\r\n    --model_name_or_path t5-small \\\r\n    --do_eval \\\r\n    --dataset_name cnn_dailymail \\\r\n    --dataset_config \"3.0.0\" \\\r\n    --source_prefix \"summarize: \" \\\r\n    --output_dir /tmp/tst-summarization \\\r\n    --per_device_train_batch_size 4 \\\r\n    --per_device_eval_batch_size 4 \\\r\n    --overwrite_output_dir \\\r\n    --predict_with_generate \\\r\n    --use_habana \\\r\n    --use_lazy_mode \\\r\n    --use_hpu_graphs_for_inference \\\r\n    --gaudi_config_name Habana/t5 \\\r\n    --ignore_pad_token_for_loss False \\\r\n    --pad_to_max_length \\\r\n    --save_strategy epoch \\\r\n    --throughput_warmup_steps 3\r\n\n\n### Expected behavior\n\nNeed a file with the summarized text and not just the evaluation metrics",
    "url": "https://github.com/huggingface/optimum-habana/issues/292",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-07-07T03:24:31Z",
    "updated_at": "2023-07-18T08:30:21Z",
    "user": "Abhaycnvrg"
  },
  {
    "repo": "huggingface/trl",
    "number": 503,
    "title": "How to get labels into the SFTTrainer",
    "body": "Hi!\r\nI am trying to prompt tune medalpaca 7b using prompt tuning or lora with the SFTTrainer. I have a prompt and I have labels that I want the model to output. I have made a Dataset class that inherits from torch.utils.data.Dataset to prepare my inputs, but I am wondering, if there is some way to make the trainer use the datapoint[\"labels\"] part during training? :\r\nclass DiagnosesDataset(torch.utils.data.Dataset):\r\n\tdef __init__(self, instances, tokenizer):\r\n\t\tself.instances=instances\r\n\t\t#self.labels=labels\r\n\t\tself.tokenizer=tokenizer\r\n\t\t\r\n\tdef __getitem__(self, idx):\r\n\t\titem={}\r\n\t\tprompt= self.instances[\"prompt\"][idx]\r\n\t\tlabels = self.instances[\"label\"][idx]\r\n\r\n\t\titem=self.tokenize(prompt+labels)\r\n\t\ttokenized_instruction=self.tokenize(prompt)\r\n\t\tlabel_instruction=self.tokenizer(labels)\r\n\r\n\t\ti=len(tokenized_instruction[\"input_ids\"])\r\n\t\titem[\"labels\"][i:]=label_instruction[\"input_ids\"]\r\n\r\n\t\treturn item\r\n\r\n\tdef tokenize(self, prompt):\r\n\t\tresult_prompt=self.tokenizer(prompt, \r\n\t\t\t\ttruncation=True, \r\n\t\t\t\tmax_length=2048,\r\n\t\t\t\tpadding=False,\r\n\t\t\t\treturn_tensors=None)\r\n\r\n\t\tresult_prompt[\"labels\"]=[-100]*len(result_prompt[\"input_ids\"])\t\r\n\t\treturn result_prompt\r\n\r\n\tdef __len__(self):\r\n\t\treturn len(self.instances)\r\nI am calling the trainer like this:\r\n\ttrainer=SFTTrainer(\r\n\t\tmodel=model,\r\n\t\ttokenizer=tokenizer,\r\n\t\ttrain_dataset=dataset,\r\n\t\tpeft_config=peft_config,\r\n\t\tpacking=True,\r\n                data_coolator=DataCollatorForSeq2Seq(tokenizer, pad_to_multiple_of=8, return_tensors=\"pt\", padding=\"max_length\", max_length=2048)\r\n\t\targs=training_arguments)\r\n\ttrainer.train()\r\n\r\n\r\n\r\nThis is the error I am currently getting, but I am not sure, this has something to do with sfttrainer \r\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Traceback (most recent call last) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\r\n\u2502 /home/students/kulcsar/Bachelor/for_dataset/10000_diagnoses/falcon_model_pef \u2502\r\n\u2502 t.py:544 in <module>                                                         \u2502\r\n\u2502                                                                              \u2502\r\n\u2502   541 \u2502                                                                      \u2502\r\n\u2502   542 \u2502                                                                      \u2502\r\n\u2502   543 \u2502   args=parser.parse_args()                                           \u2502\r\n\u2502 \u2771 544 \u2502   run()                                                              \u2502\r\n\u2502   545 \u2502   #main()                                                            \u2502\r\n\u2502   546 \u2502                                                                      \u2502\r\n\u2502   547 \u2502   #all_data, prompts, golds=preprocess(\"./dataset.pkl\")              \u2502\r\n\u2502                                                                              \u2502\r\n\u2502 /home/students/kulcsar/Bachelor/for_dataset/10000_diagnoses/falcon_model_pef \u2502\r\n\u2502 t.py:153 in run                                                              \u2502\r\n\u2502                                                                              \u2502\r\n\u2502   150 \u2502   \u2502   packing=True,                                                  \u2502\r\n\u2502   151 \u2502   \u2502   data_collator=DataCollatorForSeq2Seq(tokenizer, pad_to_multipl \u2502\r\n\u2502   152 \u2502   \u2502   args=training_arguments)                                       \u2502\r\n\u2502 \u2771 153 \u2502   trainer.train()                                                    \u2502\r\n\u2502   154 \u2502                                                                      \u2502\r\n\u2502   155 \u2502   logging.info(\"Run Train loop\")                                     \u2502\r\n\u2502   156 \u2502   #model_updated=train(model, dataset, args.seed, args.batch_size, a \u2502\r\n\u2502                                                                              \u2502\r\n\u2502 /home/students/kulcsar/anaconda3/envs/software_bubble_updated_pytorch/lib/py \u2502\r\n\u2502 thon3.9/site-packages/transformers/trainer.py:1537 in train                  \u2502\r\n\u2502                                                                              \u2502\r\n\u2502   1534 \u2502   \u2502   inner_training_loop = find_executable_batch_size(             \u2502\r\n\u2502   1535 \u2502   \u2502   \u2502   self._inner_training_loop, self._train_batch_size, args.a \u2502\r\n\u2502   1536 \u2502   \u2502   )                                                             \u2502\r\n\u2502 \u2771 1537 \u2502   \u2502   return inner_training_loop(                                   \u2502\r\n\u2502   1538 \u2502   \u2502   \u2502   args=args,                                                \u2502\r\n\u2502   1539 \u2502   \u2502   \u2502   resume_from_checkpoint=resume_from_checkpoint,            \u2502\r\n\u2502   1540 \u2502   \u2502   \u2502   trial=trial,                                              \u2502\r\n\u2502                                                                              \u2502\r\n\u2502 /home/students/kulcsar/anaconda3/envs/software_bubble_updated_pytorch/lib/py \u2502\r\n\u2502 thon3.9/site-packages/transformers/trainer.py:1802 in _inner_training_loop   \u2502\r\n\u2502                                                                              \u2502\r\n\u2502   1799 \u2502   \u2502   \u2502   \u2502   \u2502   self.control = self.callback_handler.on_step_begi \u2502\r\n\u2502   1800 \u2502   \u2502   \u2502   \u2502                                                         \u2502\r\n\u2502   1801 \u2502   \u2502   \u2502   \u2502   with self.accelerator.accumulate(model):              \u2502\r\n\u2502 \u2771 1802 \u2502   \u2502   \u2502  ",
    "url": "https://github.com/huggingface/trl/issues/503",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-06T22:19:21Z",
    "updated_at": "2023-08-14T15:05:10Z",
    "user": "MaggieK410"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 182,
    "title": "Website and extension using same model",
    "body": "Per the chrome extension example, you pack the model with the extension. Is there a way for a website and chrome extension to use the same cached model? If my project has both a website and extension, I hope they could use a single model instead of having store 2 on the user's machine. \r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/182",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-06T17:43:48Z",
    "updated_at": "2023-07-16T17:26:09Z",
    "user": "escottgoodwin"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 331,
    "title": "How to send model name as a input to API endpoint",
    "body": "I want to host two models and query them by switching between . The problem is I'm not able to send model name as a parameter from UI to API endpoints.\r\n\r\nCan someone help on this?",
    "url": "https://github.com/huggingface/chat-ui/issues/331",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-06T13:04:04Z",
    "updated_at": "2023-09-18T14:03:18Z",
    "user": "sankethgadadinni"
  },
  {
    "repo": "huggingface/transformers",
    "number": 24685,
    "title": "How to get the last 4 Hidden states from the feature extraction pipeline",
    "body": "I have defined a pipeline for Feature extraction\r\n```\r\n# Create the pipeline\r\np = pipeline(\r\n    task=\"feature-extraction\",\r\n    tokenizer=\"microsoft/biogpt\",\r\n    model=\"microsoft/biogpt\",\r\n    framework=\"pt\",\r\n    device=0\r\n)\r\nbio_gpt = AutoModel.from_pretrained(\"microsoft/biogpt\", output_hidden_states= True)\r\nbio_gpt = bio_gpt.to(device)\r\n```\r\n\r\nand I want to extract the embeddings of the last token of the last hidden state, and the Average Pooling of the last 4 layers using the pipeline approach I am doing it like this\r\n\r\n_Last token of the last hidden state:_\r\n\r\n```\r\ndef extract_last_token(last_hidden_states):\r\n    last_hidden_states = np.array(last_hidden_states)\r\n    return last_hidden_states[:,-1,:]\r\n\r\n# Process the data using the pipeline\r\nresults = p([row[\"text\"] for _, row in df2.iterrows()])\r\n\r\n# Extract the last token of the last hidden state\r\nembeddings = [extract_last_token(hidden_state) for hidden_state in results]\r\n\r\n# Create a DataFrame to store the results\r\ndf2[\"embeddings2\"] = embeddings\r\n```\r\n_Average pooling of the last 4 layers:_\r\n```\r\ndef mean_pooling(last_hidden_states, ):\r\n    last_4_layers = last_hidden_states[-4:]  # Consider the last 4 layers\r\n    return np.mean(last_4_layers, axis=1)\r\n\r\n# Process the data using the pipeline\r\nresults = p([row[\"text\"] for _, row in df2.iterrows()])\r\n\r\nfeatures = np.squeeze(results)\r\n\r\nprint(features.shape)\r\n# Perform mean pooling on the last hidden states\r\nembeddings = [mean_pooling(hidden_state) for hidden_state in results]\r\n\r\n# Create a DataFrame to store the results\r\ndf2[\"embeddings4\"] = embeddings\r\n```\r\nThe issues are:\r\n\r\n1. When I extract the embeddings of the 4 last layers or the 12 last layers the embeddings are always the same\r\n\r\n![image](https://github.com/huggingface/transformers/assets/138615931/70c265aa-4182-4265-bb22-ddc197388c03)\r\n\r\n2. The embeddings of the last token of the last hidden state are different from the same embeddings using the \"manual\" method\r\n\r\n![image](https://github.com/huggingface/transformers/assets/138615931/a7b9b629-9c65-4b76-b669-89d9e64103de)\r\n\r\nWeardly in the above picture the 2 of the embeddings are the same but opposite row ids, this indicates another problem I don't see it if you can spot this I appreciate it.\r\n\r\nHere is the code of how I did the manual version\r\n```\r\noutput = bio_gpt(**model_inputs)\r\n\r\n# Get the last state\r\nlast_state = output.last_hidden_state\r\n\r\ncls_embeddings = last_state[:, -1, :]\r\n\r\n# Print the last state\r\nprint(cls_embeddings)\r\n\r\n# Assign cls_embeddings to \"embeddings4\" column in df2\r\ndf2[\"embeddings_manual\"] = [cls_embeddings[i].cpu().detach().numpy() for i in range(len(df2))]\r\n```",
    "url": "https://github.com/huggingface/transformers/issues/24685",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-06T08:45:08Z",
    "updated_at": "2023-08-14T15:02:35Z",
    "user": "Luke-4"
  },
  {
    "repo": "pytorch/serve",
    "number": 2446,
    "title": "is TS_JOB_QUEUE_SIZE a valid environment variable?",
    "body": "### \ud83d\udcda The doc issue\r\n\r\n[This page](https://pytorch.org/serve/configuration.html) says environment variables are equivalent to server configuration set in `config.properties`\r\nSetting `TS_JOB_QUEUE_SIZE` as an environment variable has no effect in Docker version 0.8.0\r\n\r\n```\r\nTorchserve version: 0.8.0\r\nTS Home: /home/venv/lib/python3.9/site-packages\r\nCurrent directory: /app\r\nTemp directory: /home/model-server/tmp\r\nMetrics config path: /app/config/metrics.yaml\r\nNumber of GPUs: 0\r\nNumber of CPUs: 4\r\nMax heap size: 7952 M\r\nPython executable: /home/venv/bin/python\r\nConfig file: /app/config/config.properties\r\nInference address: http://0.0.0.0:8080\r\nManagement address: http://0.0.0.0:8081\r\nMetrics address: http://0.0.0.0:8082\r\nModel Store: /app/model_store\r\nInitial Models: ALL\r\nLog dir: /app/logs\r\nMetrics dir: /app/logs\r\nNetty threads: 0\r\nNetty client threads: 0\r\nDefault workers per model: 1\r\nBlacklist Regex: N/A\r\nMaximum Response Size: 6553500\r\nMaximum Request Size: 6553500\r\nLimit Maximum Image Pixels: true\r\nPrefer direct buffer: false\r\nAllowed Urls: [file://.*|http(s)?://.*]\r\nCustom python dependency for model allowed: false\r\nEnable metrics API: true\r\nMetrics mode: prometheus\r\nDisable system metrics: false\r\nWorkflow Store: /app/model_store\r\nModel config: N/A\r\n```\r\n\r\n### Suggest a potential alternative/fix\r\n\r\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2446",
    "state": "closed",
    "labels": [
      "question",
      "triaged",
      "docker"
    ],
    "created_at": "2023-07-06T01:18:47Z",
    "updated_at": "2023-10-28T19:43:36Z",
    "user": "sreeprasannar"
  },
  {
    "repo": "huggingface/setfit",
    "number": 393,
    "title": " AttributeError: 'list' object has no attribute 'shuffle'",
    "body": "I am getting the \"AttributeError: 'list' object has no attribute 'shuffle'\" error when I try to use setfit.\r\n\r\nThe dataset has two columns; one text and the second is the label column.",
    "url": "https://github.com/huggingface/setfit/issues/393",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-05T16:47:17Z",
    "updated_at": "2023-12-05T14:41:13Z",
    "user": "gpirge"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6008,
    "title": "Dataset.from_generator consistently freezes at ~1000 rows",
    "body": "### Describe the bug\n\nWhenever I try to create a dataset which contains images using `Dataset.from_generator`, it freezes around 996 rows. I suppose it has something to do with memory consumption, but there's more memory available. I\r\n\r\nSomehow it worked a few times but mostly this makes the datasets library much more cumbersome to work with because generators are the easiest way to turn an existing dataset into a Hugging Face dataset.\r\n\r\nI've let it run in the frozen state for way longer than it can possibly take to load the actual dataset.\r\n\r\nLet me know if you have ideas how to resolve it!\n\n### Steps to reproduce the bug\n\n```python\r\nfrom datasets import Dataset\r\nimport numpy as np\r\n\r\ndef gen():\r\n    for row in range(10000):\r\n        yield {\"i\": np.random.rand(512, 512, 3)}\r\n        \r\nDataset.from_generator(gen)\r\n# -> 90% of the time gets stuck around 1000 rows\r\n```\n\n### Expected behavior\n\nShould continue and go through all the examples yielded by the generator, or at least throw an error or somehow communicate what's going on.\n\n### Environment info\n\n- `datasets` version: 2.8.0\r\n- Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29\r\n- Python version: 3.8.10\r\n- PyArrow version: 12.0.1\r\n- Pandas version: 1.5.1\r\n",
    "url": "https://github.com/huggingface/datasets/issues/6008",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-05T16:06:48Z",
    "updated_at": "2023-07-10T13:46:39Z",
    "comments": 3,
    "user": "andreemic"
  },
  {
    "repo": "pytorch/torchx",
    "number": 737,
    "title": "-j vs --cpu/--gpu in ddp ",
    "body": "## \ud83d\udcda Documentation\r\n\r\n## Link\r\n[https://pytorch.org/torchx/latest/components/distributed.html](https://pytorch.org/torchx/latest/components/distributed.html)\r\n\r\n## What does it currently say?\r\nNot clear whether --cpu, --gpu arguments are overrided by -j arguments, although in my testing (launch then run top, etc.) it seems they are?\r\n\r\n## What should it say?\r\nBoth the docs and the --help output for dist.ddp could be more clear on this front. More generally, I am wondering if there exists a torchx equivalent of `torchrun --standalone --nnodes=1 --nproc_per_node=auto ...`.\r\n\r\n## Why?\r\nClearly I wouldn't want `--gpu=0` with `-j 1x2`, right? As such the listed defaults in docs --help are a little confusing.\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/737",
    "state": "open",
    "labels": [],
    "created_at": "2023-07-05T15:57:56Z",
    "updated_at": "2023-07-12T20:47:24Z",
    "comments": 1,
    "user": "godfrey-cw"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 104617,
    "title": "How to integrate the new cpp file with Pytorch geometroic?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI am using neighbour loader function in my code, which uses sample_adj_cpu function to sample neighbours. I am making some changes in this function which is present in the following file. \r\n\r\nFile link:\r\n[[pytorch_sparse](https://github.com/rusty1s/pytorch_sparse/tree/master)/[csrc](https://github.com/rusty1s/pytorch_sparse/tree/master/csrc)/[cpu](https://github.com/rusty1s/pytorch_sparse/tree/master/csrc/cpu)\r\n/sample_cpu.cpp](url) \r\n\r\nHow to integrate these changes in Pytorch geometric?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @alexsamardzic @nikitaved @pearu @cpuhrsch @amjames @bhosmer",
    "url": "https://github.com/pytorch/pytorch/issues/104617",
    "state": "closed",
    "labels": [
      "module: sparse",
      "triaged"
    ],
    "created_at": "2023-07-05T06:47:12Z",
    "updated_at": "2023-07-12T22:10:30Z",
    "user": "shivanisankhyan"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1482,
    "title": "diagnose why the mongo server uses so much CPU",
    "body": "we have many alerts on the use of CPU on the mongo server.\r\n\r\n```\r\nSystem: CPU (User) % has gone above 95 \r\n```\r\n\r\n Why?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1482",
    "state": "closed",
    "labels": [
      "question",
      "infra",
      "improvement / optimization",
      "P1"
    ],
    "created_at": "2023-07-04T16:04:06Z",
    "updated_at": "2024-02-06T14:49:20Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 536,
    "title": "How to enable vllm",
    "body": "### Feature request\n\nHow to enable vllm\n\n### Motivation\n\nHow to enable vllm\n\n### Your contribution\n\nHow to enable vllm",
    "url": "https://github.com/huggingface/text-generation-inference/issues/536",
    "state": "closed",
    "labels": [],
    "created_at": "2023-07-04T05:20:21Z",
    "updated_at": "2023-07-04T10:56:29Z",
    "user": "lucasjinreal"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 180,
    "title": "[Question] Running transformers.js in a browser extension",
    "body": "Hello,\r\n\r\nI'm trying to build a chrome extension that uses Transformers.js. When I try to import it in the background worker script, I first get an error that says process is not available, because apparently someone decided browser plugins shouldn't use process.env anymore. I found a solution that said to put   \r\n```\r\ndefine: {\r\n    'process.env': {}\r\n}\r\n```\r\nin my vite.config.js, which worked to get me past that, but the next error is:\r\n```\r\nError: Dynamic require of \"../bin/napi-v3/undefined/undefined/onnxruntime_binding.node\" is not supported\r\n```\r\nHas anyone gotten this working in a browser environment yet? I saw a video about tensorflow.js in the browser, but I'd prefer to use transformers.js because you already provided me with an example of how to get it to behave like Sentence Transformers. :) ",
    "url": "https://github.com/huggingface/transformers.js/issues/180",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-07-04T01:09:29Z",
    "updated_at": "2023-07-16T15:58:30Z",
    "user": "davidtbo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 6003,
    "title": "interleave_datasets & DataCollatorForLanguageModeling having a conflict ?",
    "body": "### Describe the bug\n\nHi everyone :)\r\n\r\nI have two local & custom datasets (1 \"sentence\" per line) which I split along the 95/5 lines for pre-training a Bert model. I use a modified version of `run_mlm.py` in order to be able to make use of `interleave_dataset`:\r\n\r\n- `tokenize()` runs fine\r\n- `group_text()` runs fine\r\n\r\nEverytime, on step 19, I get \r\n\r\n```pytb\r\n  File \"env/lib/python3.9/site-packages/transformers/data/data_collator.py\", line 779, in torch_mask_tokens\r\n    inputs[indices_random] = random_words[indices_random]\r\nRuntimeError: Index put requires the source and destination dtypes match, got Float for the destination and Long for the source.\r\n```\r\n\r\nI tried:\r\n- training without interleave on dataset 1, it runs\r\n- training without interleave on dataset 2, it runs\r\n- training without `.to_iterable_dataset()`, it hangs then crash\r\n- training without group_text() and padding to max_length seemed to fix the issue, but who knows if this was just because it was an issue that would come much later in terms of steps.\r\n\r\nI might have coded something wrong, but I don't get what \n\n### Steps to reproduce the bug\n\nI have this function:\r\n\r\n```py\r\ndef build_dataset(path: str, percent: str):\r\n    dataset = load_dataset(\r\n        \"text\",\r\n        data_files={\"train\": [path]},\r\n        split=f\"train[{percent}]\"\r\n    )\r\n    dataset = dataset.map(\r\n        lambda examples: tokenize(examples[\"text\"]),\r\n        batched=True,\r\n        num_proc=num_proc,\r\n    )\r\n\r\n    dataset = dataset.map(\r\n        group_texts,\r\n        batched=True,\r\n        num_proc=num_proc,\r\n        desc=f\"Grouping texts in chunks of {tokenizer.max_seq_length}\",\r\n        remove_columns=[\"text\"]\r\n    )\r\n\r\n    print(len(dataset))\r\n    return dataset.to_iterable_dataset()\r\n```\r\n\r\nI hardcoded group_text:\r\n```py\r\n    def group_texts(examples):\r\n        # Concatenate all texts.\r\n        concatenated_examples = {k: list(chain(*examples[k])) for k in examples.keys()}\r\n        total_length = len(concatenated_examples[list(examples.keys())[0]])\r\n        # We drop the small remainder, and if the total_length < max_seq_length  we exclude this batch and return an empty dict.\r\n        # We could add padding if the model supported it instead of this drop, you can customize this part to your needs.\r\n        total_length = (total_length // 512) * 512\r\n        # Split by chunks of max_len.\r\n        result = {\r\n            k: [t[i: i + 512] for i in range(0, total_length, 512)]\r\n            for k, t in concatenated_examples.items()\r\n        }\r\n        # result = {k: [el for el in elements if el] for k, elements in result.items()}\r\n        return result\r\n```\r\n\r\nAnd then I build datasets using the following code:\r\n\r\n```py\r\ntrain1 = build_dataset(\"d1.txt\", \":95%\")\r\ntrain2 = build_dataset(\"d2.txt\", \":95%\")\r\ndev1 = build_dataset(\"d1.txt\", \"95%:\")\r\ndev2 = build_dataset(\"d2.txt\", \"95%:\")\r\n```\r\n\r\nand finally I run\r\n```py\r\ntrain_dataset = interleave_datasets(\r\n    [train1, train2],\r\n    probabilities=[0.8, 0.2],\r\n    seed=42\r\n)\r\neval_dataset = interleave_datasets(\r\n    [dev1, dev2],\r\n    probabilities=[0.8, 0.2],\r\n    seed=42\r\n)\r\n```\r\n\r\nThen I run the training part which remains mostly untouched:\r\n\r\n> CUDA_VISIBLE_DEVICES=1 python custom_dataset.py --model_type bert --per_device_train_batch_size 32 --do_train --output_dir /var/mlm/training-bert/model --max_seq_length 512 --save_steps 10000 --save_total_limit 3 --auto_find_batch_size --logging_dir ./logs-bert --learning_rate 0.0001 --do_train --num_train_epochs 25 --warmup_steps 10000 --max_step 45000 --fp16\n\n### Expected behavior\n\nThe model should then train normally, but fails every time at the same step (19).\r\n\r\nprinting the variables at `inputs[indices_random] = random_words[indices_random]` shows a magnificient empty tensor (, 32) [if I remember well]\n\n### Environment info\n\ntransformers[torch] 4.30.2\r\nUbuntu\r\nA100 0 CUDA 12\r\nDriver Version: 525.116.04",
    "url": "https://github.com/huggingface/datasets/issues/6003",
    "state": "open",
    "labels": [],
    "created_at": "2023-07-03T17:15:31Z",
    "updated_at": "2023-07-03T17:15:31Z",
    "comments": 0,
    "user": "PonteIneptique"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1472,
    "title": "How to show fan-in jobs' results in response (\"pending\" and \"failed\" keys)",
    "body": "In cache entries of fan-in jobs we have keys `pending` and `failed`. For example, config-level `/parquet` response has the following format (only \"parquet_files\" key):\r\n```python\r\n{\r\n    \"parquet_files\": [\r\n        {\r\n            \"dataset\": \"duorc\",\r\n            \"config\": \"ParaphraseRC\",\r\n            \"split\": \"test\",\r\n            \"url\": \"https://huggingface.co/datasets/duorc/resolve/refs%2Fconvert%2Fparquet/ParaphraseRC/duorc-test.parquet\",\r\n            \"filename\": \"duorc-test.parquet\",\r\n            \"size\": 6136591\r\n        },\r\n       ... # list of parquet files\r\n    ],\r\n}\r\n``` \r\nand for dataset-level it also has `pending` and `failed` keys:\r\n```python\r\n{\r\n    \"parquet_files\": [\r\n        {\r\n            \"dataset\": \"duorc\",\r\n            \"config\": \"ParaphraseRC\",\r\n            \"split\": \"test\",\r\n            \"url\": \"https://huggingface.co/datasets/duorc/resolve/refs%2Fconvert%2Fparquet/ParaphraseRC/duorc-test.parquet\",\r\n            \"filename\": \"duorc-test.parquet\",\r\n            \"size\": 6136591\r\n        },\r\n       ... # list of parquet files\r\n    ],\r\n    \"pending\": [],\r\n    \"failed\": []\r\n}\r\n```\r\nTo me, undocumented `\"pending\"` and `\"failed\"` keys look a bit too technical and unclear.\r\n\r\nWhat we can do:\r\n* document what these keys mean\r\n* don't document it but also for these kind of endpoints show only examples where all levels are specified (currently it's not like this). So, don't show examples that return `pending` and `failed` field.\r\n* anything else? @huggingface/datasets-server ",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1472",
    "state": "open",
    "labels": [
      "question",
      "api",
      "P2"
    ],
    "created_at": "2023-07-03T16:49:10Z",
    "updated_at": "2023-08-11T15:26:24Z",
    "user": "polinaeterna"
  },
  {
    "repo": "huggingface/blog",
    "number": 1281,
    "title": "How to push or shere lora adapter to hugging face hub? ",
    "body": "hi, i trained falcon model and already set push_to_hub paramter in training argument, but they not working.\r\n\r\n```\r\nfrom transformers import TrainingArguments\r\n\r\noutput_dir = \"chatb_f\"\r\nper_device_train_batch_size = 4\r\ngradient_accumulation_steps = 4\r\noptim = \"paged_adamw_32bit\"\r\nsave_steps = 60\r\nlogging_steps = 10\r\nlearning_rate = 2e-4\r\nmax_grad_norm = 0.3\r\nmax_steps = 60\r\nwarmup_ratio = 0.03\r\nlr_scheduler_type = \"constant\"\r\n\r\ntraining_arguments = TrainingArguments(\r\n    output_dir=output_dir,\r\n    per_device_train_batch_size=per_device_train_batch_size,\r\n    gradient_accumulation_steps=gradient_accumulation_steps,\r\n    optim=optim,\r\n    save_steps=save_steps,\r\n    logging_steps=logging_steps,\r\n    learning_rate=learning_rate,\r\n    fp16=True,\r\n    max_grad_norm=max_grad_norm,\r\n    max_steps=max_steps,\r\n    warmup_ratio=warmup_ratio,\r\n    group_by_length=True,\r\n    lr_scheduler_type=lr_scheduler_type,\r\n    push_to_hub = True\r\n)\r\n\r\n\r\nfrom trl import SFTTrainer\r\n\r\nmax_seq_length = 512\r\n\r\ntrainer = SFTTrainer(\r\n    model=model,\r\n    train_dataset=dataset,\r\n    peft_config=peft_config,\r\n    dataset_text_field=\"text\",\r\n    max_seq_length=max_seq_length,\r\n    tokenizer=tokenizer,\r\n    args=training_arguments,\r\n)\r\n```\r\n",
    "url": "https://github.com/huggingface/blog/issues/1281",
    "state": "open",
    "labels": [],
    "created_at": "2023-07-01T13:56:47Z",
    "updated_at": "2023-07-01T13:57:40Z",
    "user": "imrankh46"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 3918,
    "title": "How to control the position of an object in an image using text in a txt2img model?",
    "body": "How to control the position of an object in an image using text in a txt2img model? I know this is easy to achieve in an img2img model, but how can it be done in a txt2img model?\r\n\r\nOr, how can a model be fine-tuned to achieve this effect? For example, specifying x=0, y=1, which corresponds to the top-left corner.\r\n\r\nI have tried similar approaches, but they are not sensitive to the position. I suspect it may be due to insensitivity to the text input. I tried using compel to enhance the positional features, but still couldn't control the position. Do I need to retrain the text_encoder related part for this?\r\n\r\nIn my fine-tuning code, I commented out the no_grad parts for text_encoder and others. Is this correct, and will it automatically train the text_encoder?\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/diffusers/issues/3918",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-07-01T02:44:24Z",
    "updated_at": "2023-08-08T15:03:15Z",
    "user": "XiaoyuZhuang"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1464,
    "title": "Change the way we represent ResponseAlreadyComputedError in the cache",
    "body": "When a \"parallel\" step has already been computed, an error is stored in the cache with `ResponseAlreadyComputedError`error_code, and http status 500 (ie: if `split-first-rows-from-streaming` exists, then `split-first-rows-from-parquet` does not need to be computed).\r\n\r\nBut it makes it hard to monitor the \"true\" errors. If we follow the analogy with the HTTP status codes, it should be 3xx instead of 5xx, ie: a redirection to another resource.\r\n\r\nI don't know how we should change this though. Let's put ideas in the issue.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1464",
    "state": "closed",
    "labels": [
      "question",
      "improvement / optimization",
      "P2"
    ],
    "created_at": "2023-06-30T18:13:34Z",
    "updated_at": "2024-02-23T09:56:05Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 176,
    "title": "[Question] Embeddings for the Entire Document",
    "body": "<!-- QUESTION GOES HERE -->\r\nHi Thanks for all the effort, I really appreciate it. I enjoy coding in JS and do all things in JS.  \r\nIs it a good idea to load the entire json document to get embeddings? What tokenizer should I choose? I have a tone of valuable information in my key and value pairs? or should I craft a sentence from the document?\r\n\r\n```json\r\n{\r\n  \"id\": 2053926,\r\n  \"city\": \"New York\",\r\n  \"user_id\": 3578165,\r\n  \"price\": 75,\r\n  \"native_currency\": \"USD\",\r\n  \"price_native\": 75,\r\n  \"price_formatted\": \"$75\",\r\n  \"lat\": 40.854397081884706,\r\n  \"lng\": -73.93876393071385,\r\n  \"country\": \"United States\",\r\n  \"name\": \"air conditioned room w/ great view\",\r\n  \"smart_location\": \"New York, NY\",\r\n  \"has_double_blind_reviews\": false,\r\n  \"instant_bookable\": false,\r\n  \"bedrooms\": 1,\r\n  \"beds\": 1,\r\n  \"bathrooms\": 1,\r\n  \"market\": \"New York\",\r\n  \"min_nights\": 1,\r\n  \"neighborhood\": \"Washington Heights\",\r\n  \"person_capacity\": 3,\r\n  \"state\": \"NY\",\r\n  \"zipcode\": \"10033\",\r\n  \"user\": {\r\n    \"user\": {\r\n      \"id\": 3578165,\r\n      \"first_name\": \"Benjamin\",\r\n      \"has_profile_pic\": true\r\n    }\r\n  },\r\n  \"address\": \"Pinehurst Avenue, New York, NY 10033, United States\",\r\n  \"country_code\": \"US\",\r\n  \"cancellation_policy\": \"flexible\",\r\n  \"property_type\": \"Apartment\",\r\n  \"reviews_count\": 14,\r\n  \"room_type\": \"Private room\",\r\n  \"room_type_category\": \"private_room\",\r\n  \"picture_count\": 18,\r\n  \"_geoloc\": {\r\n    \"lat\": 40.854397081884706,\r\n    \"lng\": -73.93876393071385\r\n  },\r\n  \"objectID\": \"507205000\"\r\n}\r\n```",
    "url": "https://github.com/huggingface/transformers.js/issues/176",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-30T16:20:37Z",
    "updated_at": "2023-06-30T22:43:03Z",
    "user": "hadminh"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 2247,
    "title": "how to tune hyperparameters using optuna or raytune",
    "body": "I want to finetune the MiniLM model and tune the hyperparameters of the same, but the model.fit function doesn't return any loss. Nor does it shows any performance metrics while training the model. What do you suggest in this case?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/2247",
    "state": "open",
    "labels": [],
    "created_at": "2023-06-30T13:16:04Z",
    "updated_at": "2023-06-30T13:16:04Z",
    "user": "nikshrimali"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 3914,
    "title": "how to fine-tuning the sd model in low resolutions",
    "body": "When fine-tuning the stable diffusion model, there is a parameter called 'resolution' which, if set to a value like 128 or 256 to reduce GPU memory usage, could potentially have negative effects on training performance and results.\r\n\r\nWould setting the resolution to a value other than 512, such as 128 or 256, have any adverse impact on training effectiveness and the final results?\r\n\r\nIs there a way to modify the pre-trained model's resolution to 128 or 256, or do I need to train a separate low-resolution version of the model?\r\n\r\nI have experimented with different resolutions, and it seems that setting the resolution to 512 produces the best results. Training with lower resolutions tends to generate complex and messy outputs.\r\n\r\nI couldn't find any similar issues on GitHub, as most discussions focus on super-resolution. Thank you for your response!",
    "url": "https://github.com/huggingface/diffusers/issues/3914",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-06-30T12:42:12Z",
    "updated_at": "2023-08-08T15:03:16Z",
    "user": "XiaoyuZhuang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 104450,
    "title": "Numpy/scipy module works fine with Torch modules, but not TorchScript. How to torchscript a numpy/scipy module?",
    "body": "### \ud83d\udc1b Numpy module works fine with Torch modules, but not TorchScript.\r\n\r\n```python\r\nfrom scipy.signal import find_peaks\r\n\r\nbatch_size = 1\r\ninput_data_shape = 1000\r\ninput_shape = (batch_size, input_data_shape)\r\n\r\nreference_inputs = numpy.random.random(input_shape)\r\nreference_outputs, _ = find_peaks(reference_inputs[0, :])\r\n\r\nclass FindPeaks(torch.nn.Module):\r\n    def __init__(self):\r\n        super(FindPeaks, self).__init__()\r\n\r\n    def forward(self, xs):\r\n        xs_numpy = xs.numpy()[0, :]\r\n        peaks, _ = find_peaks(xs_numpy)\r\n        return torch.tensor(peaks, dtype=int)\r\n\r\ninputs = torch.tensor(reference_inputs, dtype=float)\r\ntorch_model = FindPeaks()\r\ntorch_outputs = torch_model(inputs)\r\n\r\ntorchscript_model = torch.jit.trace(torch_model, example_inputs=[inputs])\r\ntorchscript_model.save(f\"./artifacts/{torch_model.__class__.__name__}.pt\")\r\n\r\ntorchscript_outputs = torchscript_model(inputs).detach()\r\nassert isinstance(torchscript_outputs, torch.Tensor)\r\nassert torchscript_outputs.shape == reference_outputs.shape\r\nassert numpy.allclose(\r\n    reference_outputs, torchscript_outputs.numpy(), rtol=1.0e-3, atol=1.0e-5\r\n)\r\n\r\nfor i in range(5):\r\n    reference_inputs = numpy.random.random(input_shape)\r\n    reference_outputs, _ = find_peaks(reference_inputs[0, :])\r\n\r\n    inputs = torch.tensor(reference_inputs, dtype=float)\r\n\r\n    torch_outputs = torch_model(inputs).detach()\r\n    assert isinstance(torch_outputs, torch.Tensor)\r\n    assert torch_outputs.shape == reference_outputs.shape # works fine\r\n    assert numpy.allclose(\r\n        reference_outputs, torch_outputs.numpy(), rtol=1.0e-3, atol=1.0e-5\r\n    ) # works fine\r\n\r\n    torchscript_outputs = torchscript_model(inputs).detach()\r\n    assert isinstance(torchscript_outputs, torch.Tensor)\r\n    assert torchscript_outputs.shape == reference_outputs.shape, \\\r\n        (torchscript_outputs, reference_outputs) # not working, seems memorizing the input/output when compiling the model.\r\n    assert numpy.allclose(\r\n        reference_outputs, torchscript_outputs.numpy(), rtol=1.0e-3, atol=1.0e-5\r\n    )\r\n```\r\n\r\n### Versions\r\n\r\n```\r\nCollecting environment information...\r\nPyTorch version: 1.12.1\r\nIs debug build: False\r\nCUDA used to build PyTorch: None\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: macOS 13.3 (x86_64)\r\nGCC version: Could not collect\r\nClang version: 16.0.3\r\nCMake version: version 3.21.1\r\nLibc version: N/A\r\n\r\nPython version: 3.8.16 (default, Dec  7 2022, 01:39:17)  [Clang 14.0.0 (clang-1400.0.29.202)] (64-bit runtime)\r\nPython platform: macOS-13.3-x86_64-i386-64bit\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nIntel(R) Core(TM) i9-9980HK CPU @ 2.40GHz\r\n\r\nVersions of relevant libraries:\r\n[pip3] flake8==4.0.1\r\n[pip3] mypy==0.910\r\n[pip3] mypy-extensions==0.4.3\r\n[pip3] numpy==1.21.0\r\n[pip3] torch==1.12.1\r\n[pip3] torchaudio==0.12.1\r\n[pip3] torchvision==0.13.1\r\n[conda] Could not collect\r\n```\n\ncc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel",
    "url": "https://github.com/pytorch/pytorch/issues/104450",
    "state": "open",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2023-06-30T00:29:43Z",
    "updated_at": "2023-08-02T17:55:14Z",
    "user": "kzhai"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1148,
    "title": "Falcon-40b-instruct on Runpod",
    "body": "### System Info\n\n```shell\n2 x A100 80GB\r\n32 vCPU 251 GB RAM\n```\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\r\nimport transformers\r\nimport torch\r\n\r\nmodel = \"tiiuae/falcon-40b-instruct\"\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(model)\r\npipeline = transformers.pipeline(\r\n    \"text-generation\",\r\n    model=model,\r\n    tokenizer=tokenizer,\r\n    torch_dtype=torch.bfloat16,\r\n    trust_remote_code=True,\r\n    device_map=\"auto\",\r\n)\r\nsequences = pipeline(\r\n   \"What does a raindrop feel when it hits the sea?:\",\r\n    max_length=200,\r\n    do_sample=True,\r\n    top_k=10,\r\n    num_return_sequences=1,\r\n    eos_token_id=tokenizer.eos_token_id,\r\n)\r\nfor seq in sequences:\r\n    print(f\"Result: {seq['generated_text']}\")\r\n\r\n\r\n\n\n### Expected behavior\n\nExpected to Run smoothly, give an output. \r\nError : \r\nThe model 'RWForCausalLM' is not supported for text-generation. Supported models are ['BartForCausalLM', 'BertLMHeadModel', 'BertGenerationDecoder', 'BigBirdForCausalLM', 'BigBirdPegasusForCausalLM', 'BioGptForCausalLM', 'BlenderbotForCausalLM', 'BlenderbotSmallForCausalLM', 'BloomForCausalLM', 'CamembertForCausalLM', 'CodeGenForCausalLM', 'CpmAntForCausalLM', 'CTRLLMHeadModel', 'Data2VecTextForCausalLM', 'ElectraForCausalLM', 'ErnieForCausalLM', 'GitForCausalLM', 'GPT2LMHeadModel', 'GPT2LMHeadModel', 'GPTBigCodeForCausalLM', 'GPTNeoForCausalLM', 'GPTNeoXForCausalLM', 'GPTNeoXJapaneseForCausalLM', 'GPTJForCausalLM', 'LlamaForCausalLM', 'MarianForCausalLM', 'MBartForCausalLM', 'MegaForCausalLM', 'MegatronBertForCausalLM', 'MvpForCausalLM', 'OpenLlamaForCausalLM', 'OpenAIGPTLMHeadModel', 'OPTForCausalLM', 'PegasusForCausalLM', 'PLBartForCausalLM', 'ProphetNetForCausalLM', 'QDQBertLMHeadModel', 'ReformerModelWithLMHead', 'RemBertForCausalLM', 'RobertaForCausalLM', 'RobertaPreLayerNormForCausalLM', 'RoCBertForCausalLM', 'RoFormerForCausalLM', 'RwkvForCausalLM', 'Speech2Text2ForCausalLM', 'TransfoXLLMHeadModel', 'TrOCRForCausalLM', 'XGLMForCausalLM', 'XLMWithLMHeadModel', 'XLMProphetNetForCausalLM', 'XLMRobertaForCausalLM', 'XLMRobertaXLForCausalLM', 'XLNetLMHeadModel', 'XmodForCausalLM'].\r\n/usr/local/lib/python3.10/dist-packages/transformers/generation/utils.py:1259: UserWarning: You have modified the pretrained model configuration to control generation. This is a deprecated strategy to control generation and will be removed soon, in a future version. Please use a generation configuration file (see https://huggingface.co/docs/transformers/main_classes/text_generation)\r\n  warnings.warn(\r\nSetting `pad_token_id` to `eos_token_id`:11 for open-end generation.",
    "url": "https://github.com/huggingface/optimum/issues/1148",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-06-29T18:48:05Z",
    "updated_at": "2023-06-30T15:39:29Z",
    "comments": 3,
    "user": "Mrin7"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 509,
    "title": "Question: How to estimate memory requirements for a certain batch size/",
    "body": "I was just wondering how the GPU memory requirements vary depending on model size/batch size of request/max tokens. In doing some experiments where I needed the server to keep running for a long time, I found that it often ran out of memory and shut down - is there a way to estimate the memory footprint based on these variables?",
    "url": "https://github.com/huggingface/text-generation-inference/issues/509",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-29T15:39:51Z",
    "updated_at": "2023-07-03T01:41:02Z",
    "user": "vaishakkrishna"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 171,
    "title": "[Doc request] Add an example guide of how to use it in Svelte (and deploy to HF Spaces)",
    "body": "Similar to the cool React guide, would be awesome to showcase how to use transformers.js from Svelte (and how to deploy the resulting app to Spaces)\r\n\r\nNo need to do a SvelteKit version IMO, Svelte would be sufficient\r\n\r\nMaybe a good first issue for the community?",
    "url": "https://github.com/huggingface/transformers.js/issues/171",
    "state": "open",
    "labels": [
      "enhancement",
      "help wanted",
      "good first issue"
    ],
    "created_at": "2023-06-29T10:25:10Z",
    "updated_at": "2023-08-21T20:36:59Z",
    "user": "julien-c"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1145,
    "title": "How to use mean pooling with ONNX export with optimum-cli",
    "body": "### System Info\n\n```shell\n- `optimum` version: 1.8.8\r\n- `transformers` version: 4.30.2\r\n- Platform: Windows-10-10.0.19045-SP0\r\n- Python version: 3.11.3\r\n- Huggingface_hub version: 0.15.1\r\n- PyTorch version (GPU?): 2.0.1+cpu (cuda availabe: False)\r\n- Tensorflow version (GPU?): not installed (cuda availabe: NA)\n```\n\n\n### Who can help?\n\n@michaelbenayoun\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nThe Model card of paraphrase-MiniLM-L3-v2 at HuggingFace mentions that\r\n\r\n**Without [sentence-transformers](https://www.sbert.net/), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.**\r\n\r\nHow to do this using the ONNX model generated using the optimum-cli?\r\n\r\nCan we do this while generating the ONNX model? \r\n\r\nFor example, the **txtai** library does this ([https://github.com/neuml/txtai/blob/master/examples/18_Export_and_run_models_with_ONNX.ipynb])\r\n\r\n```\r\nonnx = HFOnnx()\r\nembeddings = onnx(\"sentence-transformers/paraphrase-MiniLM-L6-v2\", \"pooling\", \"embeddings.onnx\", quantize=True)\r\n\r\n```\r\n\r\nOr. does this needs to be done somehow after the ONNX model is generated (post-processing)? \n\n### Expected behavior\n\nSupport for pooling in optimum_cli ",
    "url": "https://github.com/huggingface/optimum/issues/1145",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2023-06-29T05:57:35Z",
    "updated_at": "2023-06-29T05:57:35Z",
    "user": "aunwesha"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 328,
    "title": "Is there a way to see all of a user's history?",
    "body": "I want to see the chat history of all my users. ",
    "url": "https://github.com/huggingface/chat-ui/issues/328",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-29T05:01:55Z",
    "updated_at": "2023-07-03T10:43:53Z",
    "user": "ildoonet"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2495,
    "title": "[BUG] - Only one trial completes on Ax NAS",
    "body": "### Add Link\r\n\r\nhttps://pytorch.org/tutorials/intermediate/ax_multiobjective_nas_tutorial.html\r\n\r\n### Describe the bug\r\n\r\nHi,\r\n\r\nI was able to get the tutorial notebook working, and now I am trying to implement Ax-based NAS on my own model. However, only one of the trials complete and all the others fail. I have one objective which is to maximize the val_accuracy. The training script runs fine without any problem when I run it on terminal as well. This is the error I am getting:\r\n\r\n![image](https://github.com/pytorch/tutorials/assets/66868163/0bd80fc9-4fbf-4338-9181-e15692c3205f)\r\n\r\n![image](https://github.com/pytorch/tutorials/assets/66868163/a320fc3f-4e86-4e85-9ad7-97735a4da732)\r\n\r\n--------------\r\nFull log:\r\n---------------------------------------------------------------------------\r\nFailureRateExceededError                  Traceback (most recent call last)\r\nCell In[10], line 1\r\n----> 1 scheduler.run_all_trials()\r\n\r\nFile [~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:999](https://file+.vscode-resource.vscode-cdn.net/home/emre/Desktop/NXP/NAS/tpot/src/~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:999), in Scheduler.run_all_trials(self, timeout_hours, idle_callback)\r\n    992 if self.options.total_trials is None:\r\n    993     # NOTE: Capping on number of trials will likely be needed as fallback\r\n    994     # for most stopping criteria, so we ensure `num_trials` is specified.\r\n    995     raise ValueError(  # pragma: no cover\r\n    996         \"Please either specify `num_trials` in `SchedulerOptions` input \"\r\n    997         \"to the `Scheduler` or use `run_n_trials` instead of `run_all_trials`.\"\r\n    998     )\r\n--> 999 for _ in self.run_trials_and_yield_results(\r\n   1000     max_trials=not_none(self.options.total_trials),\r\n   1001     timeout_hours=timeout_hours,\r\n   1002     idle_callback=idle_callback,\r\n   1003 ):\r\n   1004     pass\r\n   1005 return self.summarize_final_result()\r\n\r\nFile [~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:899](https://file+.vscode-resource.vscode-cdn.net/home/emre/Desktop/NXP/NAS/tpot/src/~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:899), in Scheduler.run_trials_and_yield_results(self, max_trials, ignore_global_stopping_strategy, timeout_hours, idle_callback)\r\n    893         return\r\n    895     yield self.wait_for_completed_trials_and_report_results(\r\n    896         idle_callback, force_refit=True\r\n    897     )\r\n--> 899 yield self._complete_optimization(\r\n    900     num_preexisting_trials=n_existing, idle_callback=idle_callback\r\n    901 )\r\n    902 return\r\n\r\nFile [~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:1278](https://file+.vscode-resource.vscode-cdn.net/home/emre/Desktop/NXP/NAS/tpot/src/~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:1278), in Scheduler._complete_optimization(self, num_preexisting_trials, idle_callback)\r\n   1273 res = self.wait_for_completed_trials_and_report_results(\r\n   1274     idle_callback=idle_callback, force_refit=True\r\n   1275 )\r\n   1276 # Raise an error if the failure rate exceeds tolerance at the\r\n   1277 # end of the optimization.\r\n-> 1278 self.error_if_failure_rate_exceeded(force_check=True)\r\n   1279 self._record_run_trials_status(\r\n   1280     num_preexisting_trials=num_preexisting_trials,\r\n   1281     status=RunTrialsStatus.SUCCESS,\r\n   1282 )\r\n   1283 return res\r\n\r\nFile [~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:779](https://file+.vscode-resource.vscode-cdn.net/home/emre/Desktop/NXP/NAS/tpot/src/~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:779), in Scheduler.error_if_failure_rate_exceeded(self, force_check)\r\n    771 if self._num_trials_bad_due_to_err > num_bad_in_scheduler [/](https://file+.vscode-resource.vscode-cdn.net/) 2:\r\n    772     self.logger.warn(\r\n    773         \"MetricFetchE INFO: Sweep aborted due to an exceeded error rate, \"\r\n    774         \"which was primarily caused by failure to fetch metrics. Please \"\r\n    775         \"check if anything could cause your metrics to be flakey or \"\r\n    776         \"broken.\"\r\n    777     )\r\n--> 779 raise self._get_failure_rate_exceeded_error(\r\n    780     num_bad_in_scheduler=num_bad_in_scheduler,\r\n    781     num_ran_in_scheduler=num_ran_in_scheduler,\r\n    782 )\r\n\r\nFailureRateExceededError: Failure rate exceeds the tolerated trial failure rate of 0.5 (at least 2 out of first 3 trials failed). Checks are triggered both at the end of a optimization and if at least 5 trials have failed.\r\n\r\n-----------\r\n\r\n![image](https://github.com/pytorch/tutorials/assets/66868163/b0103097-e93f-4bf0-8dac-12198a3884f3)\r\n\r\nI don't set any objective thresholds. When I run the script from the terminal, it works fine every time, and val_accuracy never becomes NaN. What might be the reason for such behavior in trials? \r\n\r\nI also have another question. Does Ax support trying differen",
    "url": "https://github.com/pytorch/tutorials/issues/2495",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "ax"
    ],
    "created_at": "2023-06-28T23:02:31Z",
    "updated_at": "2023-10-30T17:00:14Z",
    "user": "ekurtgl"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 327,
    "title": "Tokens limits issue",
    "body": "Input validation error: `inputs` tokens + `max_new_tokens`  must be <= 1512. Given: 603 `inputs tokens and 1024 `max_new_tokens\r\n\r\nWhen deployed, the ui is working fine for like 2 or 3 promts, then every prompt we try we get a red line on top with a pop-up having this message. Please how can we remove this limitation on the code?\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/327",
    "state": "open",
    "labels": [
      "question",
      "back"
    ],
    "created_at": "2023-06-28T18:09:19Z",
    "updated_at": "2023-09-18T14:03:59Z",
    "user": "Billyroot"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 3890,
    "title": "How to apply the schedulers in diffusers to original SD",
    "body": "Hi! Thanks for this great work! Diffusers helps me a lot in many aspects!\r\n\r\nBecause of my recent work, I would like to know wether the schedulers in diffusers can be directly used in original SD? If yes, what should I do? \r\n\r\nAny response will be greatly appreciated! Again, thank you all for this convenient framework!",
    "url": "https://github.com/huggingface/diffusers/issues/3890",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-06-28T11:02:41Z",
    "updated_at": "2023-08-05T15:04:00Z",
    "user": "volcverse"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1446,
    "title": "Add fields `viewer` and `preview` to /is-valid",
    "body": "For coherence with /valid, we should add the `viewer` and `preview` fields to /is-valid.\r\n\r\nWe should also consider deprecating the current `valid` field (as in https://github.com/huggingface/datasets-server/issues/1445). Note that it's in use in https://github.com/search?q=org%3Ahuggingface+datasets-server.huggingface.co+repo%3Ahuggingface%2Fnotebooks&type=code and also in the @lewtun's evaluator if I remember correctly.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1446",
    "state": "closed",
    "labels": [
      "question",
      "api"
    ],
    "created_at": "2023-06-28T09:19:56Z",
    "updated_at": "2023-06-29T14:13:16Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1445,
    "title": "Remove `.valid` from `/valid` endpoint?",
    "body": "We recently added to fields to `/valid`:\r\n- `viewer`: all the datasets that have a valid dataset viewer\r\n- `preview`: all the datasets that don't have a valid dataset viewer, but have a dataset preview\r\n\r\nAnd the Hub does not use the original field `valid` anymore. We still fill it with the union of both sets.\r\n\r\nShould we remove it, as it doubles the size of the response and increases the response time, with no benefit? cc @huggingface/datasets-server \r\n\r\nNote that it's used in the notebooks (https://github.com/search?q=org%3Ahuggingface+datasets-server.huggingface.co+repo%3Ahuggingface%2Fnotebooks&type=code), for example, so it is a breaking change.\r\n\r\nI would vote in favor of removing it, and updating the notebooks (and the docs obviously).",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1445",
    "state": "closed",
    "labels": [
      "question",
      "api"
    ],
    "created_at": "2023-06-28T09:17:13Z",
    "updated_at": "2023-07-26T15:47:35Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/kineto",
    "number": 775,
    "title": "Profile particular functions / lines",
    "body": "Hey, is there a way to profile particular functions or code lines with one profiler i.e. not to have separate `with profile as..`statements around each of them? \r\nSomething similar to the [NVIDIA nvtx markers](https://docs.nvidia.com/cuda/profiler-users-guide/).\r\n\r\nUse case:\r\nWant to profile only particular activity such as `optimizer.step()` or `loss.backward()` in a training loop, and not the entire loop.",
    "url": "https://github.com/pytorch/kineto/issues/775",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-28T02:03:02Z",
    "updated_at": "2023-06-29T16:50:57Z",
    "user": "shradhasehgal"
  },
  {
    "repo": "pytorch/kineto",
    "number": 774,
    "title": "Question about step time graph in Overview page",
    "body": "Hi, I am wondering what 'step' on the X axis represents in the step-time graph on the overview page. \r\nI set my profiling schedule with 5 steps for 'active', yet the profiling results only include time for step 0 only and not steps 0 - 4. \r\nCould you clarify what 'step' here refers to if not each of the step numbers the profiler was 'active' for?\r\n\r\n<img width=\"1343\" alt=\"Screenshot 2023-06-27 at 6 19 45 PM\" src=\"https://github.com/pytorch/kineto/assets/13078034/28f47356-9c6f-42ed-9ecc-1f6e1ed79513\">\r\n",
    "url": "https://github.com/pytorch/kineto/issues/774",
    "state": "closed",
    "labels": [
      "question",
      "plugin"
    ],
    "created_at": "2023-06-28T01:22:30Z",
    "updated_at": "2024-04-23T15:28:39Z",
    "user": "shradhasehgal"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2493,
    "title": "[BUG] - ax_multiobjective_nas_tutorial.ipynb fails",
    "body": "\r\nhttps://pytorch.org/tutorials/intermediate/ax_multiobjective_nas_tutorial.html\r\n\r\n### Describe the bug\r\n\r\nHi,\r\n\r\nI am trying to get the [ax_multiobjective_nas_tutorial.ipnb tutorial](https://pytorch.org/tutorials/intermediate/ax_multiobjective_nas_tutorial.html) running on my local machine. I came until experiment running part without any problem, but when I start running the experiment, all the trials fail. I didn't change anything in the original notebook. This is the output:\r\n\r\n![image](https://github.com/pytorch/tutorials/assets/66868163/337308c1-308f-41b8-9f81-05dedb4cb37b)\r\n\r\nI tried running it on Google colab but got the same error.\r\n\r\n![image](https://github.com/pytorch/tutorials/assets/66868163/5a7be01b-63da-49a6-b9d0-84a6c940088c)\r\n\r\nFull log:\r\n\r\n---------------------------------------------------------------------------\r\nFailureRateExceededError                  Traceback (most recent call last)\r\nCell In[11], line 1\r\n----> 1 scheduler.run_all_trials()\r\n\r\nFile [~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:999](https://file+.vscode-resource.vscode-cdn.net/home/emre/Desktop/NXP/NAS/tpot/src/~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:999), in Scheduler.run_all_trials(self, timeout_hours, idle_callback)\r\n    992 if self.options.total_trials is None:\r\n    993     # NOTE: Capping on number of trials will likely be needed as fallback\r\n    994     # for most stopping criteria, so we ensure `num_trials` is specified.\r\n    995     raise ValueError(  # pragma: no cover\r\n    996         \"Please either specify `num_trials` in `SchedulerOptions` input \"\r\n    997         \"to the `Scheduler` or use `run_n_trials` instead of `run_all_trials`.\"\r\n    998     )\r\n--> 999 for _ in self.run_trials_and_yield_results(\r\n   1000     max_trials=not_none(self.options.total_trials),\r\n   1001     timeout_hours=timeout_hours,\r\n   1002     idle_callback=idle_callback,\r\n   1003 ):\r\n   1004     pass\r\n   1005 return self.summarize_final_result()\r\n\r\nFile [~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:854](https://file+.vscode-resource.vscode-cdn.net/home/emre/Desktop/NXP/NAS/tpot/src/~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:854), in Scheduler.run_trials_and_yield_results(self, max_trials, ignore_global_stopping_strategy, timeout_hours, idle_callback)\r\n    849 n_remaining_to_run = max_trials\r\n    850 while (\r\n    851     not self.should_consider_optimization_complete()[0]\r\n    852     and n_remaining_to_run > 0\r\n    853 ):\r\n--> 854     if self.should_abort_optimization():\r\n    855         yield self._abort_optimization(num_preexisting_trials=n_existing)\r\n    856         return\r\n\r\nFile [~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:712](https://file+.vscode-resource.vscode-cdn.net/home/emre/Desktop/NXP/NAS/tpot/src/~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:712), in Scheduler.should_abort_optimization(self)\r\n    707 \"\"\"Checks whether this scheduler has reached some intertuption [/](https://file+.vscode-resource.vscode-cdn.net/) abort\r\n    708 criterion, such as an overall optimization timeout, tolerated failure rate, etc.\r\n    709 \"\"\"\r\n    710 # if failure rate is exceeded, raise an exception.\r\n    711 # this check should precede others to ensure it is not skipped.\r\n--> 712 self.error_if_failure_rate_exceeded()\r\n    714 # if optimization is timed out, return True, else return False\r\n    715 timed_out = (\r\n    716     self._timeout_hours is not None\r\n    717     and self._latest_optimization_start_timestamp is not None\r\n   (...)\r\n    720     >= not_none(self._timeout_hours) * 60 * 60 * 1000\r\n    721 )\r\n\r\nFile [~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:779](https://file+.vscode-resource.vscode-cdn.net/home/emre/Desktop/NXP/NAS/tpot/src/~/anaconda3/envs/tpot/lib/python3.10/site-packages/ax/service/scheduler.py:779), in Scheduler.error_if_failure_rate_exceeded(self, force_check)\r\n    771 if self._num_trials_bad_due_to_err > num_bad_in_scheduler [/](https://file+.vscode-resource.vscode-cdn.net/) 2:\r\n    772     self.logger.warn(\r\n    773         \"MetricFetchE INFO: Sweep aborted due to an exceeded error rate, \"\r\n    774         \"which was primarily caused by failure to fetch metrics. Please \"\r\n    775         \"check if anything could cause your metrics to be flakey or \"\r\n    776         \"broken.\"\r\n    777     )\r\n--> 779 raise self._get_failure_rate_exceeded_error(\r\n    780     num_bad_in_scheduler=num_bad_in_scheduler,\r\n    781     num_ran_in_scheduler=num_ran_in_scheduler,\r\n    782 )\r\n\r\nFailureRateExceededError: Failure rate exceeds the tolerated trial failure rate of 0.5 (at least 8 out of first 8 trials failed). Checks are triggered both at the end of a optimization and if at least 5 trials have failed.\r\n\r\n\r\nWhat do you think might be the problem here? Thank you.\r\n\r\nBest,\r\nEmre\r\n\r\n### Describe your environment\r\n\r\nUbuntu ",
    "url": "https://github.com/pytorch/tutorials/issues/2493",
    "state": "closed",
    "labels": [
      "question",
      "ax"
    ],
    "created_at": "2023-06-27T23:09:05Z",
    "updated_at": "2023-06-28T17:46:51Z",
    "user": "ekurtgl"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 3882,
    "title": "How to use models like chilloutmix to do inpainting task?",
    "body": "I tried as https://huggingface.co/docs/diffusers/api/diffusion_pipeline mentioned:\r\n`text2img = StableDiffusionPipeline.from_pretrained(\"/data/cx/ysp/aigc-smart-painter/models/chilloutmix_NiPrunedFp32Fix\")\r\ninpaint = StableDiffusionInpaintPipeline(**text2img.components)\r\nseger = RawSeger()\r\nREST_API_URL = 'http://localhost:9900/sd/inpaint'\r\npainter = GridPainter()\r\nimg_path = \"/data/cx/ysp/aigc-smart-painter/assets/cloth1.jpg\"\r\nimage = Image.open(img_path)\r\nbox = [220, 20, 500, 320]\r\nnew_image = draw_box(np.array(image), cords=box, color=(255, 0, 0), thickness=2)\r\nshow_image(new_image)\r\nmask = seger.prompt_with_box(image, box=box, reverse=False)\r\nmask = Image.fromarray(mask)\r\nshow_image(mask)\r\nend = time.time()\r\nprompt = \"best quality,symmetry realistic,real life,photography,masterpiece,8K,HDR,highres,1 gril, looking at viewer\"\r\nimages = inpaint(prompt=prompt, image=image, mask_image=mask, num_images_per_prompt=1,\r\n         num_inference_steps=50, guidance_scale=7.5,)\r\n\r\npainter.image_grid(images, rows=1, cols=len(images) // 1)\r\npainter.image_show()\r\nprint(\"finished\")`\r\n\r\nI got this error:\r\nexpects 4 but received `num_channels_latents`: 4 + `num_channels_mask`: 1 + \r\n`num_channels_masked_image`: 4 = 9. Please verify the config of `pipeline.unet` \r\nor your `mask_image` or `image` input.\r\n\r\nProcess finished with exit code 1\r\n\r\nHow can I convert model like chilloutmix to do inpainting task?\r\nThank you !\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/3882",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-06-27T15:25:31Z",
    "updated_at": "2023-08-05T15:04:07Z",
    "user": "AdamMayor2018"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 3881,
    "title": "How many images and how many epochs are required to fine tune LORA for stable diffusion on custom image dataset",
    "body": "I am trying to finetune LORA on a movie dataset , but I am using custom dataset which has 3-4 movie characters , instead of using the actual names of the actor we are using in movie name of the characters , how big the dataset would be required in terms of total number of images, and number of images per character and how many epochs would be required to fine tune this LORA model .\r\nPS: I have already tried fine tuning with 200 images of a single character for 100,250 and 500 Epochs but the results are very bad , can anyone please provide some suggestion @patrickvonplaten  @sayakpaul ",
    "url": "https://github.com/huggingface/diffusers/issues/3881",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-06-27T11:05:53Z",
    "updated_at": "2023-08-04T15:03:17Z",
    "user": "atharmzaalo2023"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2062,
    "title": "\u2753 [Question] \"When the performance of an int8 model improves compared to an fp32 model after QAT\"",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nI have a question because there is something I do not understand during the QAT.\r\n\r\ncode ref: https://pytorch.org/TensorRT/_notebooks/vgg-qat.html#4\r\n\r\nPhenomenon: The model with QAT applied and the simple TRT-converted model without QAT show higher accuracy than the fp32 model.\r\nData: 3-class dataset with approximately 210,000 images.\r\nModel architecture: ResNet18.\r\n\r\nCan the int8 converted TRT model perform better than the fp32 model?\r\n![image](https://github.com/pytorch/TensorRT/assets/54762817/95276682-3525-4697-bd8e-29d6ea5cf7e7)\r\n\r\n\r\n** Another question\r\n## Environment\r\n\r\n - PyTorch Version (e.g., 1.0): v1.3.0\r\n - CPU Architecture: intel i9-10980\r\n - OS (e.g., Linux): ubuntu 20.04.3\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip \r\n - Build command you used (if compiling from source): \r\n - Are you using local sources or building from archives:\r\n - Python version: 3.8\r\n - CUDA version: 11.6\r\n - GPU models and configuration: \r\n - Any other relevant information:\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2062",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: quantization"
    ],
    "created_at": "2023-06-27T08:20:34Z",
    "updated_at": "2023-10-09T00:02:22Z",
    "user": "JongSeok553"
  },
  {
    "repo": "pytorch/data",
    "number": 1192,
    "title": "Is torchdata still being actively developed? ",
    "body": "No commits since June 7 (3 weeks ago). And @ejguan  mentioned in https://github.com/pytorch/data/issues/1184#issuecomment-1593476769 they and @NivekT, the primary contributors, are no longer working on it. \r\n\r\nCan anyone comment on whether torchdata will continue to be developed or supported?",
    "url": "https://github.com/meta-pytorch/data/issues/1192",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-26T21:51:48Z",
    "updated_at": "2023-07-24T02:41:31Z",
    "comments": 6,
    "user": "lendle"
  },
  {
    "repo": "huggingface/peft",
    "number": 636,
    "title": "How to save full model weights and not just the adapters ?",
    "body": "### System Info\n\npeft==0.4.0.dev0\r\n\r\nI'm not sure if this should be a bug report, so sorry if this is not convenient. \r\nAccording to the `save_pretrained`method docstring, this saves the adapter model only and not the full model weights, is there an option where I can save the full model weights ? The use case is that we want to upload the full model to hf to be able to activate the inference API, however now we only save adapter weights  \n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nsave_pretrained saves only adapters, maybe also add the option to save the full model \n\n### Expected behavior\n\nsave_pretrained saves only adapters, maybe also add the option to save the full model ",
    "url": "https://github.com/huggingface/peft/issues/636",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-26T15:30:48Z",
    "updated_at": "2025-03-13T11:52:23Z",
    "user": "azayz"
  },
  {
    "repo": "huggingface/peft",
    "number": 631,
    "title": "How to train multiple LoRAs at once?",
    "body": "Hi! I would like to train multiple LoRAs at once (for some reason). Although `requires_grad` is True for all LoRA weight matrices, only the first LoRA weight matrix will calculate the gradient, and the others will not calculate the gradient - and will not be updated. How can I train them in one forward process?\r\n\r\n1. I initialize multiple LoRAs using the `add_adapter()` method\r\n```python\r\nbert_path = \"prajjwal1/bert-tiny\"\r\nrank = 8\r\nLoRA_amount = 6\r\n\r\nmodel = CustomBert.from_pretrained(bert_path)\r\npeft_config = LoraConfig(\r\n    inference_mode=False, \r\n    r=rank, \r\n    lora_alpha=32, \r\n    lora_dropout=0.1\r\n)\r\nmodel = PeftModel(model, peft_config, adapter_name=\"0\")\r\nfor LoRA_index in range(1, LoRA_amount):\r\n    model.add_adapter(str(LoRA_index), peft_config)\r\n```\r\n2. This is the printed model architecture\r\n```\r\ntestModel(\r\n  (model): PeftModel(\r\n    (base_model): LoraModel(\r\n      (model): CustomBert(\r\n        (bert): BertModel(\r\n          (embeddings): BertEmbeddings(\r\n            (word_embeddings): Embedding(30522, 128, padding_idx=0)\r\n            (position_embeddings): Embedding(512, 128)\r\n            (token_type_embeddings): Embedding(2, 128)\r\n            (LayerNorm): LayerNorm((128,), eps=1e-12, elementwise_affine=True)\r\n            (dropout): Dropout(p=0.1, inplace=False)\r\n          )\r\n          (encoder): BertEncoder(\r\n            (layer): ModuleList(\r\n              (0): BertLayer(\r\n                (attention): BertAttention(\r\n                  (self): BertSelfAttention(\r\n                    (query): Linear(\r\n                      in_features=128, out_features=128, bias=True\r\n                      (lora_dropout): ModuleDict(\r\n                        (0): Dropout(p=0.1, inplace=False)\r\n                        (1): Dropout(p=0.1, inplace=False)\r\n                        (2): Dropout(p=0.1, inplace=False)\r\n                        (3): Dropout(p=0.1, inplace=False)\r\n                        (4): Dropout(p=0.1, inplace=False)\r\n                        (5): Dropout(p=0.1, inplace=False)\r\n                      )\r\n                      (lora_A): ModuleDict(\r\n                        (0): Linear(in_features=128, out_features=16, bias=False)\r\n                        (1): Linear(in_features=128, out_features=16, bias=False)\r\n                        (2): Linear(in_features=128, out_features=16, bias=False)\r\n                        (3): Linear(in_features=128, out_features=16, bias=False)\r\n                        (4): Linear(in_features=128, out_features=16, bias=False)\r\n                        (5): Linear(in_features=128, out_features=16, bias=False)\r\n                      )\r\n                      (lora_B): ModuleDict(\r\n                        (0): Linear(in_features=16, out_features=128, bias=False)\r\n                        (1): Linear(in_features=16, out_features=128, bias=False)\r\n                        (2): Linear(in_features=16, out_features=128, bias=False)\r\n                        (3): Linear(in_features=16, out_features=128, bias=False)\r\n                        (4): Linear(in_features=16, out_features=128, bias=False)\r\n                        (5): Linear(in_features=16, out_features=128, bias=False)\r\n                      )\r\n                      (lora_embedding_A): ParameterDict()\r\n                      (lora_embedding_B): ParameterDict()\r\n                    )\r\n                    (key): Linear(in_features=128, out_features=128, bias=True)\r\n                    (value): Linear(\r\n                      in_features=128, out_features=128, bias=True\r\n                      (lora_dropout): ModuleDict(\r\n                        (0): Dropout(p=0.1, inplace=False)\r\n                        (1): Dropout(p=0.1, inplace=False)\r\n                        (2): Dropout(p=0.1, inplace=False)\r\n                        (3): Dropout(p=0.1, inplace=False)\r\n                        (4): Dropout(p=0.1, inplace=False)\r\n                        (5): Dropout(p=0.1, inplace=False)\r\n                      )\r\n                      (lora_A): ModuleDict(\r\n                        (0): Linear(in_features=128, out_features=16, bias=False)\r\n                        (1): Linear(in_features=128, out_features=16, bias=False)\r\n                        (2): Linear(in_features=128, out_features=16, bias=False)\r\n                        (3): Linear(in_features=128, out_features=16, bias=False)\r\n                        (4): Linear(in_features=128, out_features=16, bias=False)\r\n                        (5): Linear(in_features=128, out_features=16, bias=False)\r\n                      )\r\n                      (lora_B): ModuleDict(\r\n                        (0): Linear(in_features=16, out_features=128, bias=False)\r\n                        (1): Linear(in_features=16, out_features=128, bias=False)\r\n                        (2): Linear(in_features=16, out_features=128, bias=False)\r\n                        (3): Linear(in_features=16, out_features=128, bias=False)\r\n                        (4): Linear(in_features=16, out_features=128, bias=False)\r\n                        (5",
    "url": "https://github.com/huggingface/peft/issues/631",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-06-26T09:30:16Z",
    "updated_at": "2023-08-18T13:41:32Z",
    "user": "meteorlin"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1135,
    "title": "Donut document parsing export to onnx does not work.",
    "body": "### System Info\n\n```shell\noptimum==1.8.8\r\npython==3.11.3\r\nsystem linux\n```\n\n\n### Who can help?\n\nThe donut export does not work with the following commands, does anybody know how to get this running or know about the status.\r\n\r\n```\r\noptimum-cli export onnx -m naver-clova-ix/donut-base-finetuned-cord-v2 donut_cord2_onnx/\r\n...\r\n...\r\n...\r\nException: The post-processing of the ONNX export failed. The export can still be performed by passing the option --no-post-process. Detailed error: Unable to merge decoders. Detailed error: Expected \r\na dynamic shape for the axis zero of onnx::Reshape_1045, found a static shape: 2\r\n```\r\n````\r\noptimum-cli export onnx -m naver-clova-ix/donut-base-finetuned-cord-v2 donut_cord2_onnx/ --no-post-process\r\n...\r\n...\r\n...\r\n- last_hidden_state: max diff = 0.0012216567993164062\r\nValidation 1 for the model donut_cord2_onnx/decoder_model.onnx raised: The exported ONNX model does not have the exact same outputs as what is provided in VisionEncoderDecoderOnnxConfig. Difference: onnx::Reshape_1263, onnx::Reshape_1359, onnx::Reshape_1364, onnx::Reshape_1045, onnx::Reshape_1146, onnx::Reshape_1258, onnx::Reshape_1151, onnx::Reshape_1050\r\nonnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Invalid Feed Input Name:encoder_hidden_states\r\nAn error occured during validation, but the model was saved nonetheless at donut_cord2_onnx. Detailed error: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Invalid Feed Input Name:encoder_hidden_states.\r\n```\r\n\r\nChanging the task name to image-to-text instead of image-to-text-with-past does seem to run. However, I assume that this task is set specifically. Although, for me it is unclear why it is set to that particular task.\r\n\r\n```\r\noptimum-cli export onnx -m naver-clova-ix/donut-base-finetuned-cord-v2 donut_cord2_onnx/ --no-post-process --task image-to-text\r\nValidating ONNX model donut_cord2_onnx/encoder_model.onnx...\r\n        -[\u2713] ONNX model output names match reference model (last_hidden_state)\r\n        - Validating ONNX Model output \"last_hidden_state\":\r\n                -[\u2713] (2, 1200, 1024) matches (2, 1200, 1024)\r\n                -[x] values not close enough, max diff: 0.00121307373046875 (atol: 0.001)\r\nValidating ONNX model donut_cord2_onnx/decoder_model.onnx...\r\nValidation 0 for the model donut_cord2_onnx/encoder_model.onnx raised: The maximum absolute difference between the output of the reference model and the ONNX exported model is not within the set tolerance 0.001:\r\n- last_hidden_state: max diff = 0.00121307373046875\r\nThe ONNX export succeeded with the warning: The exported ONNX model does not have the exact same outputs as what is provided in VisionEncoderDecoderOnnxConfig. Difference: onnx::Reshape_1359, onnx::Reshape_1258, onnx::Reshape_1146, onnx::Reshape_1151, onnx::Reshape_1050, onnx::Reshape_1045, onnx::Reshape_1364, onnx::Reshape_1263.\r\n The exported model was saved at: donut_cord2_onnx\r\n```\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\noptimum-cli export onnx -m naver-clova-ix/donut-base-finetuned-cord-v2 donut_cord2_onnx/\r\n\r\n\n\n### Expected behavior\n\nexport to run correctly and validation report.",
    "url": "https://github.com/huggingface/optimum/issues/1135",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-06-26T08:57:01Z",
    "updated_at": "2023-06-26T10:17:32Z",
    "comments": 3,
    "user": "casperthuis"
  },
  {
    "repo": "huggingface/peft",
    "number": 630,
    "title": "How to switch to P-Tuning v2",
    "body": "We can find the `P-Tuning v2` in \r\nhttps://github.com/huggingface/peft/blob/8af8dbd2ec9b4b8f664541e9625f898db7c7c78f/README.md?plain=1#L29\r\nBut how can I switch to `P-Tuning v2`?",
    "url": "https://github.com/huggingface/peft/issues/630",
    "state": "closed",
    "labels": [
      "solved"
    ],
    "created_at": "2023-06-26T08:52:42Z",
    "updated_at": "2023-08-04T15:03:30Z",
    "user": "jiahuanluo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 104159,
    "title": "how to optimize torch.argwhere?",
    "body": "`t0 = time.time()\r\nxx = torch.argwhere(x)  ## x.shape = (15120,150) x.device = cuda:0 and the gpu is gtx1050\r\nprint(time.time() - t0)`\r\n\r\nthe output is always near 0.15s,how can i reduce the cost time ? or there is other high efficient methods to replace argwhere? \n\ncc @albanD",
    "url": "https://github.com/pytorch/pytorch/issues/104159",
    "state": "closed",
    "labels": [
      "module: performance",
      "triaged",
      "module: python frontend"
    ],
    "created_at": "2023-06-25T15:12:53Z",
    "updated_at": "2023-06-28T18:10:17Z",
    "user": "Soikie"
  },
  {
    "repo": "pytorch/torchx",
    "number": 735,
    "title": "With Volcano, why or when to use TorchX?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Question\r\n\r\nWe can run Pytorch DDP or elastic with just Volcano, right? What does TorchX offer differently from Volcano?\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/735",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-25T07:54:40Z",
    "updated_at": "2023-07-12T20:41:59Z",
    "comments": 2,
    "user": "zxcware"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1134,
    "title": "ValueError: ..set the option `trust_remote_code=True` to remove this error",
    "body": "### System Info\n\n```shell\n- `optimum` version: 1.8.8\r\n- `transformers` version: 4.30.2\r\n- Platform: Windows-10-10.0.19045-SP0\r\n- Python version: 3.11.3\r\n- Huggingface_hub version: 0.15.1\r\n- PyTorch version (GPU?): 2.0.1+cpu (cuda availabe: False)\r\n- Tensorflow version (GPU?): not installed (cuda availabe: NA)\n```\n\n\n### Who can help?\n\nHello,\r\n\r\nI am running the optimum cli command \r\n\r\n`optimum-cli export onnx --model mosaicml/mpt-7b-chat --task text-generation  mpt-7b-chat\\`\r\n\r\nwhen I am getting this error:\r\n\r\n```\r\nFile \"C:\\Users\\dutta\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\transformers\\dynamic_module_utils.py\", line 553, in resolve_trust_remote_code\r\n    raise ValueError(\r\nValueError: Loading mosaicml/mpt-7b-chat requires you to execute the configuration file in that repo on your local machine. Make sure you have read the code there to avoid malicious use, then set the option `trust_remote_code=True` to remove this error.\r\n```\r\n\r\nHow to deal with this error?  @michaelbenayoun\r\n\r\nThanks\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nRun the same command replacing the output directory name to a name of your choice\n\n### Expected behavior\n\nI expect the command to run without error and product the ONNX model and other files in the output directory",
    "url": "https://github.com/huggingface/optimum/issues/1134",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-06-24T12:47:35Z",
    "updated_at": "2023-07-06T16:38:30Z",
    "comments": 5,
    "user": "diptenduLF"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2487,
    "title": "[BUG] No ways provided to replicate fps on retrained models.",
    "body": "### Add Link\r\n\r\nhttps://pytorch.org/tutorials/intermediate/realtime_rpi.html\r\n\r\n### Describe the bug\r\n\r\nI am getting 25-30fps on my rpi4 with provided snippet.\r\nHowever, after finetuning mobilenet_v2 and applying:\r\n```\r\n# Quantize the model\r\nquantized_model = torch.quantization.quantize_dynamic(\r\n    model, {torch.nn.Linear}, dtype=torch.qint8\r\n)\r\n\r\n# Convert the quantized model to TorchScript\r\nscript_model = torch.jit.script(quantized_model)\r\n```\r\nI am only getting 2.5fps.\r\nThe tutorial suggests:\r\n\r\n```\r\nYou can create your own model or fine tune an existing one. If you fine tune on one of the models from [torchvision.models.quantized](https://pytorch.org/vision/stable/models.html#quantized-models) most of the work to fuse and quantize has already been done for you so you can directly deploy with good performance on a Raspberry Pi.\r\n```\r\nBut provides no guidance on how to do it.\r\nMy attempts to do so failed:\r\n```\r\ntorch.backends.quantized.engine = 'qnnpack'\r\nmodel = models.quantization.mobilenet_v2(pretrained=True, quantize=True) # INT\r\n\r\nnum_classes = 3\r\nmodel.classifier[1] = torch.nn.Linear(model.last_channel, num_classes)\r\n``` \r\nwould result in \r\n```\r\n---------------------------------------------------------------------------\r\n\r\nRuntimeError                              Traceback (most recent call last)\r\n\r\n[<ipython-input-48-ddcd2d77aac5>](https://localhost:8080/#) in <cell line: 24>()\r\n     39 \r\n     40         # Forward pass\r\n---> 41         outputs = model(inputs)\r\n     42         loss = criterion(outputs, labels)\r\n     43 \r\n\r\n6 frames\r\n\r\n[/usr/local/lib/python3.10/dist-packages/torch/nn/modules/linear.py](https://localhost:8080/#) in forward(self, input)\r\n    112 \r\n    113     def forward(self, input: Tensor) -> Tensor:\r\n--> 114         return F.linear(input, self.weight, self.bias)\r\n    115 \r\n    116     def extra_repr(self) -> str:\r\n\r\nRuntimeError: mat1 and mat2 must have the same dtype\r\n```\r\nMultiple attempts to create custom Linear layer that supports int8 dtype also failed.\r\n\r\n### Describe your environment\r\n\r\nnot relevant\n\ncc @datumbox @nairbv @fmassa @NicolasHug @YosuaMichael",
    "url": "https://github.com/pytorch/tutorials/issues/2487",
    "state": "open",
    "labels": [
      "bug",
      "module: vision"
    ],
    "created_at": "2023-06-24T12:04:23Z",
    "updated_at": "2023-06-26T20:29:24Z",
    "comments": 2,
    "user": "Huxwell"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 322,
    "title": "Chat using WizardCoder",
    "body": "Hello,\r\nCan you please post an example of .env.local for:\r\nWizardLM/WizardCoder-15B-V1.0",
    "url": "https://github.com/huggingface/chat-ui/issues/322",
    "state": "open",
    "labels": [],
    "created_at": "2023-06-23T18:44:07Z",
    "updated_at": "2023-08-14T20:52:39Z",
    "comments": 2,
    "user": "vitalyshalumov"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 321,
    "title": "Chat-UI not loading Tailwind colors. ",
    "body": "**Problem**\r\n\r\nWhen specifying `PUBLIC_APP_COLOR` in either the `.env` or the `.env.local` file, the chat-UI color does not change regardless of which color is used. Even when  `PUBLIC_APP_COLOR=blue` as set in this repository, the chat-UI color does not match with TailwindCSS's blue color palette: \r\n\r\n**TailwindCSS blue color palette:**\r\n<img width=\"452\" alt=\"blue\" src=\"https://github.com/huggingface/chat-ui/assets/48559179/216923cf-6941-4629-b444-65a4930f3979\">\r\n\r\n**Chat-UI color palette:**\r\n<img width=\"692\" alt=\"chat\" src=\"https://github.com/huggingface/chat-ui/assets/48559179/809aece3-3efe-4dd5-ac48-5cc0b6f32221\">\r\n\r\n**Observation**\r\nUpon investigating the code, I noticed that the switchTheme.ts file contains the following code:\r\n```\r\nexport function switchTheme() {\r\n\tconst { classList } = document.querySelector(\"html\") as HTMLElement;\r\n\tif (classList.contains(\"dark\")) {\r\n\t\tclassList.remove(\"dark\");\r\n\t\tlocalStorage.theme = \"light\";\r\n\t} else {\r\n\t\tclassList.add(\"dark\");\r\n\t\tlocalStorage.theme = \"dark\";\r\n\t}\r\n}\r\n```\r\n\r\nI think that instead of loading the Tailwind colors specified in either `.env` or `.env.local`, the chat-UI is actually using these `\"light\"` and `\"dark\"` themes. I couldn't find where these themes are specified in the repositories or if they can be changed at all. \r\n\r\n**Requested Solution:**\r\nI want to load the Tailwind colors by setting `PUBLIC_APP_COLOR` in `.env` and/or `.env.local`. However, if it turns out that the chat-UI laods colors based on the  `\"light\"` and `\"dark\"`, adjusting these themes could also be a viable solution. Thank you in advance for your assistance. ",
    "url": "https://github.com/huggingface/chat-ui/issues/321",
    "state": "closed",
    "labels": [
      "question",
      "front"
    ],
    "created_at": "2023-06-23T15:54:43Z",
    "updated_at": "2023-09-18T13:12:15Z",
    "user": "ckanaar"
  },
  {
    "repo": "huggingface/peft",
    "number": 622,
    "title": "LoRA results in 4-6% lower performance compared to full fine-tuning",
    "body": "I am working on fine-tuning LLMs (6B to 40B parameters) using the LoRA framework on an instruction tuning dataset comprising of instructions corresponding to ~20 tasks (a mix of factual as well as open-ended tasks). The input to the model consists of a conversation snippet between two individuals along with a task-specific prompt. The results I am observing do not align with the performance improvements reported in the [paper](https://arxiv.org/pdf/2106.09685.pdf). Specifically, the paper reports that fine-tuning using LoRA generally results in performance at par with or better than full fine-tuning of the model, however, throughout our experiments I observe a performance lower than full fine-tuning by an absolute margin of ~4-6% in terms of RougeL score. \r\n\r\nSharing some of the training details below:\r\n\r\n**[Framework versions]**\r\nPython: 3.8\r\nPyTorch: 1.13.1 \r\nTransformers: 4.27.4\r\nPEFT: 0.3.0\r\n\r\n**[Infrastructure]**\r\n8 X A100 40 GB GPUs \r\n\r\n**[Hyper-parameter Range]**\r\nLearning rate: 5e-5 to 3e-3\r\nLearning rate scheduler: [Constant, Linear]\r\nEpochs: [1, 2]\r\nBatch size: [2, 4, 8]\r\nWeight decay: 0.0\r\nPrecision: bf16\r\n\r\nSpecifically, I tried fine-tuning of `google/flan-t5-xxl` model in following two scenarios:\r\n\r\n- **Scenario 1**\r\nFull fine-tuning with constant `learning rate = 5e-5`, `batch size = 8`, `epochs = 1`\r\n\r\n- **Scenario 2**\r\nFine-tuning using LoRA with constant `learning rate = 1e-3`, `batch size = 8`, `epochs = 1` and LoraConfig as follows:\r\n`LoraConfig(r=8, lora_alpha=16, lora_dropout=0.05, bias='none', task_type=\"SEQ_2_SEQ_LM\")`\r\n\r\n**Observation:** Scenario 2 resulted in 4% lower RougeL as compared to scenario 1. I have also tried tuning the hyper-parameters in Scenario 2 as per the range specified above, however, the best I could get is to a gap of ~4% RougeL.\r\n\r\nThank you very much for your time and consideration. Looking forward to any relevant insights here.",
    "url": "https://github.com/huggingface/peft/issues/622",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-23T10:50:24Z",
    "updated_at": "2023-07-24T12:12:18Z",
    "user": "digvijayingle016"
  },
  {
    "repo": "huggingface/setfit",
    "number": 389,
    "title": "gradient_accumulation",
    "body": "Is there a way in setFitTrainer to change the gradient_accumulation like you can do in the regular Trainer class in TrainingArguments? Also just in general I am looking for tips to make training faster.",
    "url": "https://github.com/huggingface/setfit/issues/389",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-22T21:18:37Z",
    "updated_at": "2023-11-11T05:32:34Z",
    "user": "zackduitz"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5982,
    "title": "404 on Datasets Documentation Page",
    "body": "### Describe the bug\n\nGetting a 404 from the Hugging Face Datasets docs page:\r\nhttps://huggingface.co/docs/datasets/index\r\n\n\n### Steps to reproduce the bug\n\n1. Go to URL https://huggingface.co/docs/datasets/index\r\n2. Notice 404 not found\n\n### Expected behavior\n\nURL should either show docs or redirect to new location\n\n### Environment info\n\nhugginface.co",
    "url": "https://github.com/huggingface/datasets/issues/5982",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-22T20:14:57Z",
    "updated_at": "2023-06-26T15:45:03Z",
    "comments": 2,
    "user": "kmulka-bloomberg"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 317,
    "title": "Issues when trying to deploy on cPanel (shared hosting)",
    "body": "Hello there, \r\n\r\nIs there something special to do to be able to deploy chat-ui on a shared hosting using cPanel? \r\n\r\nI tried using the Node.JS Apps Manager as follows\r\n![cpanel](https://github.com/huggingface/chat-ui/assets/109650634/fac1abfd-000a-4dde-bf38-54427b12889c)\r\n\r\nBut even when switching my entry point to server/index.js, it doesn't work. \r\n\r\nI also tried to NPM install using the manager, but then it doesn't seem to be able to use vite, even when forcing any `npm install vite`... \r\n\r\nSo, if you could me out on this, it would be highly appreciated! \r\n\r\nIn advance, thanks a lot. \r\n\r\nRegards, \r\n\r\nGollum\u00e9o",
    "url": "https://github.com/huggingface/chat-ui/issues/317",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-06-22T17:32:00Z",
    "updated_at": "2023-09-18T13:12:53Z",
    "comments": 1,
    "user": "gollumeo"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 161,
    "title": "[Question] whisper vs. ort-wasm-simd-threaded.wasm",
    "body": "While looking into https://cdn.jsdelivr.net/npm/@xenova/transformers@2.2.0/dist/transformers.js I can see a reference to **ort-wasm-simd-threaded.wasm** however that one never seem to be loaded for whisper/automatic-speech-recognition ( https://huggingface.co/spaces/Xenova/whisper-web ) while it always use **ort-wasm-simd.wasm** . I wonder if there is a way to enable or enforce threaded wasm and so improve transcription speed?",
    "url": "https://github.com/huggingface/transformers.js/issues/161",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-22T06:41:31Z",
    "updated_at": "2023-08-15T16:36:01Z",
    "user": "jozefchutka"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5975,
    "title": "Streaming Dataset behind Proxy - FileNotFoundError",
    "body": "### Describe the bug\r\n\r\nWhen trying to stream a dataset i get the following error after a few minutes of waiting.\r\n\r\n```\r\nFileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json\r\nIf the repo is private or gated, make sure to log in with `huggingface-cli login`.\r\n```\r\n\r\nI have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.\r\nStill i suspect that this is connected to being behind a proxy.\r\n\r\nIs there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?\r\n\r\n### Steps to reproduce the bug\r\n\r\nThis is the code i use.\r\n\r\n```\r\nimport os\r\nos.environ['http_proxy'] = \"http://example.com:xxxx\" \r\nos.environ['https_proxy'] = \"http://example.com:xxxx\" \r\n\r\n\r\nfrom datasets import load_dataset\r\n\r\nds = load_dataset(\"facebook/voxpopuli\", name=\"de\", streaming=True)\r\n```\r\n\r\n### Expected behavior\r\n\r\nI would expect the streaming functionality to use the set proxy settings.\r\n\r\n### Environment info\r\n\r\n\r\n- `datasets` version: 2.13.0\r\n- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35\r\n- Python version: 3.10.11\r\n- Huggingface_hub version: 0.15.1\r\n- PyArrow version: 11.0.0\r\n- Pandas version: 2.0.2\r\n",
    "url": "https://github.com/huggingface/datasets/issues/5975",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-21T19:10:02Z",
    "updated_at": "2023-06-30T05:55:39Z",
    "comments": 9,
    "user": "Veluchs"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 158,
    "title": "[Question] How do I use this library with ts-node?",
    "body": "I have a non-Web/browser-based project that uses TypeScript with ts-node. \r\n\r\nThe \"pipeline\" function attempts to use the JavaScript Fetch API, which is not included with NodeJS, and the code therefore fails with an error: \"fetch is not defined.\"\r\n\r\nThe \"node-fetch\" package doesn't seem to provide a compatible API. \r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/158",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-21T17:42:11Z",
    "updated_at": "2023-08-17T13:20:51Z",
    "user": "moonman239"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2044,
    "title": "\u2753 [Question] How can I install the latest version of python API? Torch and Tensorrt's CUDA dependencies conflict with each other.",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\n\r\n<!-- -->\r\nI have already create a python=3.9 env, when I use the command 'pip install torch-tensorrt', I find that the torch version that the latest torch-tensorrt needs is 2.0.1 and the tensorrt version it needs is 8.6.1, but these two packages need different cuda versions(which one is cu11 and another is cu12). When I run a simple model(input) example python code, torch can't resolve the environment. \r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.0.1\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source): pip install torch-tensorrt\r\n - Are you using local sources or building from archives: archives\r\n - Python version: 3.9\r\n - tensorrt version: 8.6.1\r\n\r\n## Additional context\r\nexample python code:\r\n```\r\nimport torch\r\n#import torch_tensorrt #No tensorrt and torch_tensorrt installed, this code will run successfully.\r\nconv=torch.nn.Conv2d(3,32,3,1,0,bias=False)\r\ninput=torch.randn(1,3,224,224)\r\nconv.cuda()\r\ninput.cuda()\r\nprint(conv(input).shape)\r\n```\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2044",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-06-21T17:12:54Z",
    "updated_at": "2023-10-16T00:02:24Z",
    "user": "1585231086"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 103962,
    "title": "How to unwrap after auto_wrap in FSDP?",
    "body": "I am currently fine-tuning a LLM (LLaMA) and would like to retrieve the gradients of each weight (parameter) after every gradient update. However, I notice that weights are (auto) wrapped into stuff like \u201c_fsdp_wrapped_module._flat_param\u201d during training. I need to map these wrapped weights to the original LLaMA architecture such as \u201cself_attn.v_proj\u201d. Any code examples?\r\n\r\nI guess \u201csummon_full_params()\u201d might be the function that I look for, but I am not sure if that is correct. I also have difficulty using this function. Thanks a lot for any help!\n\ncc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu",
    "url": "https://github.com/pytorch/pytorch/issues/103962",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "triaged",
      "module: fsdp"
    ],
    "created_at": "2023-06-21T11:27:10Z",
    "updated_at": "2023-10-27T15:16:22Z",
    "user": "ZN1010"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 103958,
    "title": "How to modify gradients of an FSDP model?",
    "body": "### \ud83d\udcda The doc issue\r\n\r\nI've initially posted the question on [forum](https://discuss.pytorch.org/t/modify-gradients-of-an-fsdp-model/182159) 7 days ago, but crossposting here as well for better visibility since I couldn't get any answers there. \r\n\r\nHi everyone,\r\nI have an FSDP model which has zeros in some of the `torch.nn.Linear.weight` parameters. During the training I would like to keep those parameters fixed to zeros, and to zero-out their gradients during backward as well. The specific use-case is: I am loading a pruned model and I want to fine-tune it with FSDP while keeping the pruning mask fixed. \r\n\r\nTo achieve this I need to do two things: \r\n1) multiply parameters with the mask before the forward pass (so that all pruned weights remain pruned), \r\n2) multiply gradients of pruned parameters after the backward pass (so that gradients of pruned weights are zeros)\r\n \r\nIn the standard DDP training I would achieve this by:\r\n1) registering forward pre-hook on `torch.nn.Linear` modules and multiplying weights with the mask before each forward pass,\r\n2) registering a hook on the parameter `torch.nn.Linear.weight` and multiplying its gradient with the mask. \r\n\r\nFor example:\r\n```python\r\ndef keep_param_pruned(mask, module, input):\r\n    with torch.no_grad():\r\n        module.weight.data.mul_(mask.to(module.weight.device))\r\n\r\ndef keep_grad_pruned(mask, grad):\r\n    return grad.mul_(mask.to(grad.device))\r\n\r\nfor n, m in model.named_modules():\r\n    if isinstance(m, torch.nn.Linear):\r\n        mask = m.weight > threshold\r\n        m.register_forward_pre_hook(partial(keep_param_pruned, mask))\r\n        m.weight.register_hook(partial(keep_grad_pruned, mask))\r\n```\r\n\r\nHowever, I am struggling to modify this idea to work with FSDP.  Any suggestions/ideas on what I am doing wrong or if there is a simpler way to achieve this without playing with hooks?\r\n\r\n### Suggest a potential alternative/fix\r\n\r\n_No response_\r\n\r\ncc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu",
    "url": "https://github.com/pytorch/pytorch/issues/103958",
    "state": "closed",
    "labels": [
      "oncall: distributed",
      "module: fsdp"
    ],
    "created_at": "2023-06-21T09:33:32Z",
    "updated_at": "2025-04-03T23:45:25Z",
    "user": "eldarkurtic"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 314,
    "title": "500 Internal Error",
    "body": "![image](https://github.com/huggingface/chat-ui/assets/81065703/33c28e7b-584b-48e3-a64c-b4d5271a325f)\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/314",
    "state": "closed",
    "labels": [
      "question",
      "support"
    ],
    "created_at": "2023-06-21T08:58:52Z",
    "updated_at": "2023-06-22T13:13:57Z",
    "user": "kasinadhsarma"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5971,
    "title": "Docs: make \"repository structure\" easier to find",
    "body": "The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.\r\nIt's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.",
    "url": "https://github.com/huggingface/datasets/issues/5971",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2023-06-21T08:26:44Z",
    "updated_at": "2023-07-05T06:51:38Z",
    "comments": 5,
    "user": "severo"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 313,
    "title": "MongoDB",
    "body": "I have a free teir MongoDB acount but not sure how to get url plz help",
    "url": "https://github.com/huggingface/chat-ui/issues/313",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-06-21T07:47:18Z",
    "updated_at": "2023-06-23T08:34:42Z",
    "comments": 5,
    "user": "Toaster496"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 2028,
    "title": "\u2753 [Question] Torch-TensorRT 1.3.0 uses cuDNN 8.6.0 instead of 8.5.0",
    "body": "## \u2753 Question\r\n\r\nHi, I am using torch-tensorRT 1.3.0, it seems it is linked to cuDNN 8.6.0 instead of 8.5.0 as described in the release note? Please find my environment setup below\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.13.1 with cu117\r\n - OS (e.g., Linux): Linux (ubuntu 20.04)\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117\r\n - Python version:3.8\r\n - CUDA version: 11.7\r\n - TensorRT: 8.5.3.1\r\n - torch-tensorrt: 1.3.0\r\n\r\nI got the warning: tensorrt is linked to cuDNN 8.6.0 but cuDNN 8.5.0 is loaded --- when i print torch.backend.cudnn.version() it says 8500, so I assume if torch-tensorrt is linked with cuDNN as it is described in the release note, there should not be such warning?\r\nCould you please let me know if there is something I'm doing wrong? Thank you!\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/2028",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-06-20T16:00:55Z",
    "updated_at": "2023-09-30T00:02:07Z",
    "user": "akaimody123"
  },
  {
    "repo": "huggingface/peft",
    "number": 607,
    "title": "trainer with multi-gpu",
    "body": "I want to use trainer.predict to predict datasets by multi-gpu, but actually I only use single one gpu\r\nwhen I print Seq2SeqTrainingArguments , I get \r\n![image](https://github.com/huggingface/peft/assets/2166948/c34b25a7-670a-411a-ab85-23910b98cb92)\r\nIt shows 8 gpu\r\n\r\nI check my code, when I load model, I find something strange\r\nbase_model.device: cpu\r\npeftModel is as follows:\r\n![image](https://github.com/huggingface/peft/assets/2166948/cb30b422-7519-4a76-ba32-fa25afc9d720)\r\nit print cuda\r\n\r\nhow can i fix?\r\n\r\n",
    "url": "https://github.com/huggingface/peft/issues/607",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-20T08:58:37Z",
    "updated_at": "2023-07-28T15:03:31Z",
    "user": "hrdxwandg"
  },
  {
    "repo": "pytorch/data",
    "number": 1190,
    "title": "Dataloader2 with FullSyncIterDataPipe throws error during initilization",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi, we found some strange during using Dataloader2. Here's some details about the issue.\r\n\r\n- We are a long run training job with 8 AWS P4 nodes. It's using HuggingFace trainer.\r\n- In HuggingFace training, it will call evaluation every `traininig_args.eval_steps` training steps.\r\n- I overrided the HF trainer to use Dataloader2 with training, evaluation and test dataset loading. At the same time, on the dataset part, I'm using `IterableDataPipe` with `ShardingFilterIterDataPipe`\r\n- The issue that listed the log happens **randomly**. And most time it happens after the job runs for a long time (e.g. 20+ hours)\r\n\r\nCan you help provide some context on what could be the root cause and how to fix this? Thanks!\r\n\r\nLog:\r\n```\r\n\r\n\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | File \"/opt/conda/lib/python3.9/site-packages/transformers/trainer.py\", line 1633, in train\r\n-- | -- | --\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | return inner_training_loop(\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | File \"/opt/conda/lib/python3.9/site-packages/transformers/trainer.py\", line 1979, in _inner_training_loop\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | File \"/opt/conda/lib/python3.9/site-packages/transformers/trainer.py\", line 2236, in _maybe_log_save_evaluate\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | File \"/opt/conda/lib/python3.9/site-packages/transformers/trainer.py\", line 2932, in evaluate\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | output = eval_loop(\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | File \"/workspace/mfive/mfive/trainer.py\", line 236, in evaluation_loop\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | for step, inputs in enumerate(dataloader):\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | File \"/opt/conda/lib/python3.9/site-packages/torchdata/dataloader2/dataloader2.py\", line 46, in __next__\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | next_val = next(self.dataloader._datapipe_iter) # type: ignore[arg-type]\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | File \"/opt/conda/lib/python3.9/site-packages/torch/utils/data/datapipes/_hook_iterator.py\", line 173, in wrap_generator\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | response = gen.send(None)\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | File \"/opt/conda/lib/python3.9/site-packages/torchdata/datapipes/iter/util/distributed.py\", line 178, in __iter__\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | self._process_group = dist.new_group(backend=\"gloo\")\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | File \"/opt/conda/lib/python3.9/site-packages/torch/distributed/distributed_c10d.py\", line 3520, in new_group\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | pg = _new_process_group_helper(\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | File \"/opt/conda/lib/python3.9/site-packages/torch/distributed/distributed_c10d.py\", line 1009, in _new_process_group_helper\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | backend_class = ProcessGroupGloo(backend_prefix_store, group_rank, group_size, timeout=timeout)\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | RuntimeError: [../third_party/gloo/gloo/transport/tcp/pair.cc:176] bind: Address already in use\r\n\u00a0 | 2023-06-08T08:51:15.973-07:00 | This exception is thrown by __iter__ of FullSyncIterDataPipe(datapipe=CollatorIterDataPipe, timeout=1800)\r\n\r\n```\r\n\n\n### Versions\n\n```\r\nVersions of relevant libraries:\r\n[pip3] flake8==6.0.0\r\n[pip3] mypy==0.991\r\n[pip3] mypy-boto3-batch==1.26.103\r\n[pip3] mypy-boto3-ec2==1.26.136\r\n[pip3] mypy-boto3-iam==1.26.97\r\n[pip3] mypy-boto3-s3==1.26.127\r\n[pip3] mypy-boto3-sagemaker==1.26.141\r\n[pip3] mypy-extensions==1.0.0\r\n[pip3] numpy==1.24.3\r\n[pip3] torch==2.0.1\r\n[pip3] torch-tb-profiler==0.4.1\r\n[pip3] torchdata==0.6.1\r\n[pip3] torchmetrics==0.11.4\r\n[pip3] torchsnapshot-nightly==2023.3.15\r\n[pip3] torchvision==0.15.2\r\n[pip3] torchx-nightly==2023.5.25\r\n[pip3] triton==2.0.0\r\n[conda] numpy                     1.24.3                   pypi_0    pypi\r\n[conda] torch                     2.0.1                    pypi_0    pypi\r\n[conda] torch-tb-profiler         0.4.1                    pypi_0    pypi\r\n[conda] torchdata                 0.6.1                    pypi_0    pypi\r\n[conda] torchmetrics              0.11.4                   pypi_0    pypi\r\n[conda] torchsnapshot-nightly     2023.3.15                pypi_0    pypi\r\n[conda] torchvision               0.15.2                   pypi_0    pypi\r\n[conda] torchx-nightly            2023.5.25                pypi_0    pypi\r\n[conda] triton                    2.0.0                    pypi_0    pypi\r\n```",
    "url": "https://github.com/meta-pytorch/data/issues/1190",
    "state": "open",
    "labels": [],
    "created_at": "2023-06-19T18:25:36Z",
    "updated_at": "2023-06-22T17:30:46Z",
    "comments": 3,
    "user": "chenxingyu-cs"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 311,
    "title": "Unable to build with Docker ",
    "body": "Hey, \r\nI'm trying to create a docker container with Chat-Ui but i'm facing a wall. \r\nI cloned this repo in a folder on a server and modified the `.env` file, thinking that it would be easy to deploy a docker container out of it but I could not be more wrong ! \r\nAfter trying to build my container with `docker build -t chat-ui .` I went to the same problem as [here](https://github.com/huggingface/chat-ui/issues/301). \r\n\r\nI tried to build the docker container before and after running `npm install` but I went through the exact same problem, which is that it cannot run in the Dockerfile :\r\n```\r\nRUN --mount=type=secret,id=DOTENV_LOCAL,dst=.env.local \\ \r\n  npm run build\r\n```\r\n\r\nAt first I thought it was an issue with docker not being able to run` npm install` so I added, at the begining of my dockerfile `CMD npm install` and went also throughout the same issue, I'm guessing it has something to do with the dockerfile itself. \r\n\r\n\r\nTo reproduce my error, here are the steps :\r\n\r\n1. `git clone https://github.com/huggingface/chat-ui.git`\r\n2. `cp .env .env.local `\r\n3. modify my .env.local with my variables\r\n4. `docker build -t chat-ui .`\r\n\r\nHere is the error I'm getting when I launch the docker build command :\r\n\r\n```\r\ndocker build -t chat-ui .\r\n[+] Building 4.3s (16/17)                                                       \r\n => [internal] load .dockerignore                                          0.0s\r\n => => transferring context: 122B                                          0.0s\r\n => [internal] load build definition from Dockerfile                       0.0s\r\n => => transferring dockerfile: 954B                                       0.0s\r\n => [internal] load metadata for docker.io/library/node:19                 0.6s\r\n => [internal] load metadata for docker.io/library/node:19-slim            0.6s\r\n => [builder-production 1/4] FROM docker.io/library/node:19@sha256:92f06f  0.0s\r\n => [internal] load build context                                          0.0s\r\n => => transferring context: 10.45kB                                       0.0s\r\n => [stage-2 1/5] FROM docker.io/library/node:19-slim@sha256:f58f1fcf5c9f  0.0s\r\n => CACHED [builder-production 2/4] WORKDIR /app                           0.0s\r\n => CACHED [builder-production 3/4] COPY --link --chown=1000 package-lock  0.0s\r\n => CACHED [builder-production 4/4] RUN --mount=type=cache,target=/app/.n  0.0s\r\n => CACHED [builder 1/3] RUN --mount=type=cache,target=/app/.npm           0.0s\r\n => CACHED [builder 2/3] COPY --link --chown=1000 . .                      0.0s\r\n => CACHED [stage-2 2/5] RUN npm install -g pm2                            0.0s\r\n => CACHED [stage-2 3/5] COPY --from=builder-production /app/node_modules  0.0s\r\n => CACHED [stage-2 4/5] COPY --link --chown=1000 package.json /app/packa  0.0s\r\n => ERROR [builder 3/3] RUN --mount=type=secret,id=DOTENV_LOCAL,dst=.env.  3.7s\r\n------                                                                          \r\n > [builder 3/3] RUN --mount=type=secret,id=DOTENV_LOCAL,dst=.env.local     npm run build:                                                                      \r\n#0 0.622 \r\n#0 0.622 > chat-ui@0.3.0 build\r\n#0 0.622 > vite build\r\n#0 0.622 \r\n#0 0.831 \u25b2 [WARNING] Cannot find base config file \"./.svelte-kit/tsconfig.json\" [tsconfig.json]\r\n#0 0.831 \r\n#0 0.831     tsconfig.json:2:12:\r\n#0 0.831       2 \u2502   \"extends\": \"./.svelte-kit/tsconfig.json\",\r\n#0 0.831         \u2575              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n#0 0.831 \r\n#0 1.551 \r\n#0 1.551 vite v4.3.9 building SSR bundle for production...\r\n#0 1.583 transforming...\r\n#0 3.551 \u2713 165 modules transformed.\r\n#0 3.551 \u2713 built in 2.00s\r\n#0 3.551 \"PUBLIC_APP_ASSETS\" is not exported by \"$env/static/public\", imported by \"src/lib/components/icons/Logo.svelte\".\r\n#0 3.551 file: /app/src/lib/components/icons/Logo.svelte:3:10\r\n#0 3.551 1: <script lang=\"ts\">\r\n#0 3.551 2:   import { page } from \"$app/stores\";\r\n#0 3.551 3:   import { PUBLIC_APP_ASSETS, PUBLIC_APP_NAME, PUBLIC_ORIGIN } from \"$env/static/public\";\r\n#0 3.551               ^\r\n#0 3.551 4:   import { base } from \"$app/paths\";\r\n#0 3.553 error during build:\r\n#0 3.553 RollupError: \"PUBLIC_APP_ASSETS\" is not exported by \"$env/static/public\", imported by \"src/lib/components/icons/Logo.svelte\".\r\n#0 3.553     at error (file:///app/node_modules/rollup/dist/es/shared/node-entry.js:2125:30)\r\n#0 3.553     at Module.error (file:///app/node_modules/rollup/dist/es/shared/node-entry.js:13452:16)\r\n#0 3.553     at Module.traceVariable (file:///app/node_modules/rollup/dist/es/shared/node-entry.js:13863:29)\r\n#0 3.553     at ModuleScope.findVariable (file:///app/node_modules/rollup/dist/es/shared/node-entry.js:12418:39)\r\n#0 3.553     at ReturnValueScope.findVariable (file:///app/node_modules/rollup/dist/es/shared/node-entry.js:6966:38)\r\n#0 3.553     at ChildScope.findVariable (file:///app/node_modules/rollup/dist/es/shared/node-entry.js:6966:38)\r\n#0 3.553     at Identifier.bind (file:///app/node_modules/rollup/dist/es/shared/node-entry.js:8116:40",
    "url": "https://github.com/huggingface/chat-ui/issues/311",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-06-19T15:11:36Z",
    "updated_at": "2023-09-18T13:14:04Z",
    "comments": 1,
    "user": "samichaignonmejai"
  },
  {
    "repo": "pytorch/text",
    "number": 2183,
    "title": "ImportError: cannot import name 'Field' from 'torchtext.data' ",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\nI'm using pytorch2.0.0, the version of torchtext is 0.15.2, when I import \"Field\" and \"BucketIterator\" in the code(`from torchtext.data import Field, BucketIterator`), I got an error from this sentence: `ImportError: cannot import name 'Field' from ' torchtext.data' (D:\\ML_Pytorch\\venv\\lib\\site-packages\\torchtext\\data\\__init__.py)`\r\n\r\nMay I ask where did the `Field `go? ? If `Field `disappears, is there any other similar functionality that can be imported?",
    "url": "https://github.com/pytorch/text/issues/2183",
    "state": "open",
    "labels": [],
    "created_at": "2023-06-19T11:28:42Z",
    "updated_at": "2023-08-20T06:14:30Z",
    "comments": 2,
    "user": "MrMoe830"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 310,
    "title": "Dockerfile issue : can't modify .env.local before building the docker",
    "body": "Hey, I'm having an issue building chat-ui dockerfile.\r\nIndeed, i have to point my DB and my endpoints (or my HF token) in the .env.local file, but the file is built after running the `npm install`, therefore I can't modify my .env.local before building my Docker.\r\nThe issues are that both my connection with mongoDB and with my endpoints (or HF tokens) are impossible if I don't modify the .env.local file.\r\nI think it is possible since coyotte508 (here https://github.com/huggingface/chat-ui/issues/204) mentioned that it is not possible to share a public container since it includes personal data but said that it was possible doing so privately.\r\n\r\nI already launched a database with Docker with `docker run -d -p 27017:27017 --name mongo-chatui mongo:latest` and I pointed the link of my database in my .env file prior building the Docker of chat-ui but here it seems like it is not working (see the error below). \r\n\r\nMy questions are : \r\n- how to build the Docker while pointing in the .env.local my endpoints and my database ?;\r\n- how to can I link the database to avoid the following error ?\r\n\r\n\r\nHere is the error showing for the database after launching my docker : \r\n```\r\ndocker run chat-ui       \r\n\r\n                        -------------\r\n\r\n__/\\\\\\\\\\\\\\\\\\\\\\\\\\____/\\\\\\\\____________/\\\\\\\\____/\\\\\\\\\\\\\\\\\\_____\r\n _\\/\\\\\\/////////\\\\\\_\\/\\\\\\\\\\\\________/\\\\\\\\\\\\__/\\\\\\///////\\\\\\___\r\n  _\\/\\\\\\_______\\/\\\\\\_\\/\\\\\\//\\\\\\____/\\\\\\//\\\\\\_\\///______\\//\\\\\\__\r\n   _\\/\\\\\\\\\\\\\\\\\\\\\\\\\\/__\\/\\\\\\\\///\\\\\\/\\\\\\/_\\/\\\\\\___________/\\\\\\/___\r\n    _\\/\\\\\\/////////____\\/\\\\\\__\\///\\\\\\/___\\/\\\\\\________/\\\\\\//_____\r\n     _\\/\\\\\\_____________\\/\\\\\\____\\///_____\\/\\\\\\_____/\\\\\\//________\r\n      _\\/\\\\\\_____________\\/\\\\\\_____________\\/\\\\\\___/\\\\\\/___________\r\n       _\\/\\\\\\_____________\\/\\\\\\_____________\\/\\\\\\__/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\_\r\n        _\\///______________\\///______________\\///__\\///////////////__\r\n\r\n\r\n                          Runtime Edition\r\n\r\n        PM2 is a Production Process Manager for Node.js applications\r\n                     with a built-in Load Balancer.\r\n\r\n                Start and Daemonize any application:\r\n                $ pm2 start app.js\r\n\r\n                Load Balance 4 instances of api.js:\r\n                $ pm2 start api.js -i 4\r\n\r\n                Monitor in production:\r\n                $ pm2 monitor\r\n\r\n                Make pm2 auto-boot at server restart:\r\n                $ pm2 startup\r\n\r\n                To go further checkout:\r\n                http://pm2.io/\r\n\r\n\r\n                        -------------\r\n\r\npm2 launched in no-daemon mode (you can add DEBUG=\"*\" env variable to get more messages)\r\n2023-06-19T09:18:59: PM2 log: Launching in no daemon mode\r\n2023-06-19T09:18:59: PM2 log: [PM2] Starting /app/build/index.js in cluster_mode (0 instance)\r\n2023-06-19T09:18:59: PM2 log: App [index:0] starting in -cluster mode-\r\n2023-06-19T09:18:59: PM2 log: App [index:0] online\r\n2023-06-19T09:18:59: PM2 log: App [index:1] starting in -cluster mode-\r\n2023-06-19T09:18:59: PM2 log: App [index:1] online\r\n2023-06-19T09:18:59: PM2 log: App [index:2] starting in -cluster mode-\r\n2023-06-19T09:18:59: PM2 log: App [index:2] online\r\n2023-06-19T09:18:59: PM2 log: App [index:3] starting in -cluster mode-\r\n2023-06-19T09:18:59: PM2 log: App [index:3] online\r\n2023-06-19T09:18:59: PM2 log: [PM2] Done.\r\n2023-06-19T09:18:59: PM2 log: \u250c\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 id \u2502 name     \u2502 namespace   \u2502 version \u2502 mode    \u2502 pid      \u2502 uptime \u2502 \u21ba    \u2502 status    \u2502 cpu      \u2502 mem      \u2502 user     \u2502 watching \u2502\r\n\u251c\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\r\n\u2502 0  \u2502 index    \u2502 default     \u2502 0.3.0   \u2502 cluster \u2502 19       \u2502 0s     \u2502 0    \u2502 online    \u2502 0%       \u2502 61.7mb   \u2502 root     \u2502 disabled \u2502\r\n\u2502 1  \u2502 index    \u2502 default     \u2502 0.3.0   \u2502 cluster \u2502 26       \u2502 0s     \u2502 0    \u2502 online    \u2502 0%       \u2502 52.9mb   \u2502 root     \u2502 disabled \u2502\r\n\u2502 2  \u2502 index    \u2502 default     \u2502 0.3.0   \u2502 cluster \u2502 33       \u2502 0s     \u2502 0    \u2502 online    \u2502 0%       \u2502 51.0mb   \u2502 root     \u2502 disabled \u2502\r\n\u2502 3  \u2502 index    \u2502 default     \u2502 0.3.0   \u2502 cluster \u2502 44       \u2502 0s     \u2502 0    \u2502 online    \u2502 0%       \u2502 45.3mb   \u2502 root     \u2502 disabled \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\r\n2023-06-19T09:18:59: PM2 log: [--no-daemon] Continue to stream logs\r\n2023-06-19T09:18:59: PM2 log: [--no-daemon] Exit on target PM2 exit pid=8\r\n09:18:59 0|index  | Listening on 0.0.0.0:3000\r\n09:18:59 1|index  | Listening on 0.0.0.0:3000\r\n09:18:59 2|index  | Listening on 0.0.0.0:3000\r\n09:18:59 3|index  | Listening on 0.0.0.0:3000\r\n09:19:29 0|index  | MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017\r\n09:19:29 0|index  |     at Timeout._onTimeout (/app/node_modules/mongodb/lib/sdam/topology.js:277:38)\r\n09:19:29 0|index  |     at listOnTimeout (node:internal/timers:573:17)\r\n09:19:29 0",
    "url": "https://github.com/huggingface/chat-ui/issues/310",
    "state": "open",
    "labels": [
      "support"
    ],
    "created_at": "2023-06-19T10:48:04Z",
    "updated_at": "2023-07-05T03:09:16Z",
    "comments": 1,
    "user": "samichaignonmejai"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 309,
    "title": "'Task not found in this model' when running another model",
    "body": "Hello there, \r\n\r\nI tried to change the original model to guanaco-33d (also tried with the 65-b) but I always end up having the error \"Task not found in this model\". \r\n\r\nHere's what I changed in the .env: \r\n```.env\r\nMODELS=`[\r\n  {\r\n    \"name\": \"timdettmers/guanaco-33b\",\r\n    \"datasetName\": \"timdettmers/openassistant-guanaco\",\r\n    \"description\": \"\",\r\n    \"websiteUrl\": \"\",\r\n    \"userMessageToken\": \"<|prompter|>\",\r\n    \"assistantMessageToken\": \"<|assistant|>\",\r\n    \"messageEndToken\": \"</s>\",\r\n    \"preprompt\": \"Below are a series of dialogues between various people and an AI assistant. The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable. The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed. It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer. That said, the assistant is practical and really does its best, and doesn't let caution get too much in the way of being useful.\\n-----\\n\",\r\n    \"promptExamples\": [\r\n      {\r\n        \"title\": \"Write an email from bullet list\",\r\n        \"prompt\": \"As a restaurant owner, write a professional email to the supplier to get these products every week: \\n\\n- Wine (x10)\\n- Eggs (x24)\\n- Bread (x12)\"\r\n      }, {\r\n        \"title\": \"Code a snake game\",\r\n        \"prompt\": \"Code a basic snake game in python, give explanations for each step.\"\r\n      }, {\r\n        \"title\": \"Assist in a task\",\r\n        \"prompt\": \"How do I make a delicious lemon cheesecake?\"\r\n      }\r\n    ],\r\n    \"parameters\": {\r\n      \"temperature\": 0.9,\r\n      \"top_p\": 0.95,\r\n      \"repetition_penalty\": 1.2,\r\n      \"top_k\": 50,\r\n      \"truncate\": 1000,\r\n      \"max_new_tokens\": 1024\r\n    }\r\n  }\r\n]`\r\n```\r\n\r\nAny ideas about this one? It works fine in the dedicated playground. \r\n\r\nIn advance, thanks a lot! \r\n\r\nRegards, ",
    "url": "https://github.com/huggingface/chat-ui/issues/309",
    "state": "closed",
    "labels": [
      "support",
      "models"
    ],
    "created_at": "2023-06-19T09:42:41Z",
    "updated_at": "2023-06-23T12:27:50Z",
    "comments": 1,
    "user": "gollumeo"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 308,
    "title": "'Task not found' when trying to use the guacano-33b model",
    "body": "Hello there, \r\n\r\nI tried to change the original model, so my team can work with the guanaco-33b model. But now, I always end up having \"Task not found for this model\" errors. \r\n\r\nHere's what I changed on the .env: \r\n\r\n```.env\r\nMODELS=`[\r\n  {\r\n    \"name\": \"timdettmers/guanaco-33b\",\r\n    \"datasetName\": \"timdettmers/openassistant-guanaco\",\r\n    \"description\": \"\",\r\n    \"websiteUrl\": \"\",\r\n    \"userMessageToken\": \"<|prompter|>\",\r\n    \"assistantMessageToken\": \"<|assistant|>\",\r\n    \"messageEndToken\": \"</s>\",\r\n    \"preprompt\": \"Below are a series of dialogues between various people and an AI assistant. The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable. The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed. It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer. That said, the assistant is practical and really does its best, and doesn't let caution get too much in the way of being useful.\\n-----\\n\",\r\n    \"promptExamples\": [\r\n      {\r\n        \"title\": \"Write an email from bullet list\",\r\n        \"prompt\": \"As a restaurant owner, write a professional email to the supplier to get these products every week: \\n\\n- Wine (x10)\\n- Eggs (x24)\\n- Bread (x12)\"\r\n      }, {\r\n        \"title\": \"Code a snake game\",\r\n        \"prompt\": \"Code a basic snake game in python, give explanations for each step.\"\r\n      }, {\r\n        \"title\": \"Assist in a task\",\r\n        \"prompt\": \"How do I make a delicious lemon cheesecake?\"\r\n      }\r\n    ],\r\n    \"parameters\": {\r\n      \"temperature\": 0.9,\r\n      \"top_p\": 0.95,\r\n      \"repetition_penalty\": 1.2,\r\n      \"top_k\": 50,\r\n      \"truncate\": 1000,\r\n      \"max_new_tokens\": 1024\r\n    }\r\n  }\r\n]\r\n```\r\n\r\nAny ideas about that one? \r\n\r\nIn advance, thanks a lot!\r\n\r\nRegards,",
    "url": "https://github.com/huggingface/chat-ui/issues/308",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-19T09:38:55Z",
    "updated_at": "2023-06-19T09:39:08Z",
    "comments": 0,
    "user": "gollumeo"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 307,
    "title": "Add API endpoints documentation ",
    "body": "We want to make it easy for people to build cool apps on top of chat-ui, and this requires API specs that are easily accessible.\r\n\r\nI'm not sure what tools are available in the sveltekit ecosystem for this. My first guess would be to generate an openAPI spec somehow from our server endpoints (or do it manually if that isn't possible with sveltekit?) and pass the spec to a tool like [swagger-ui](https://github.com/swagger-api/swagger-ui) so we can display them somewhere.\r\n\r\nThis would help with issues like #299 and other requests I've received about API specs. ",
    "url": "https://github.com/huggingface/chat-ui/issues/307",
    "state": "open",
    "labels": [
      "documentation",
      "enhancement",
      "back",
      "p2"
    ],
    "created_at": "2023-06-19T09:08:19Z",
    "updated_at": "2024-05-29T13:43:10Z",
    "comments": 5,
    "user": "nsarrazin"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2478,
    "title": "TransformerEncoder is not causal",
    "body": "### Add Link\n\nhttps://pytorch.org/tutorials/beginner/transformer_tutorial.html\r\n\r\n![image](https://github.com/pytorch/tutorials/assets/11831785/285e0fed-1f34-419d-935b-029d43414c37)\r\n\r\nfor language modeling\uff0c src_mask should be mask future words\r\n\n\n### Describe the bug\n\nis there anything wrong?\n\n### Describe your environment\n\n colab\n\ncc @pytorch/team-text-core @Nayef211 @sekyondaMeta @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/2478",
    "state": "closed",
    "labels": [
      "bug",
      "module: torchtext",
      "medium",
      "docathon-h2-2023"
    ],
    "created_at": "2023-06-18T15:26:46Z",
    "updated_at": "2023-11-10T22:31:04Z",
    "comments": 10,
    "user": "bigheary"
  },
  {
    "repo": "huggingface/api-inference-community",
    "number": 295,
    "title": "What is the ratelimit for inference api for pro users?",
    "body": "What is the rate limit for inference API for pro users?\r\n\r\nAlso can we use the endpoint for prod, which makes 3 to 10 RPS?",
    "url": "https://github.com/huggingface/api-inference-community/issues/295",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-18T07:17:23Z",
    "updated_at": "2023-06-19T09:01:02Z",
    "user": "bigint"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 304,
    "title": "Code blocks",
    "body": "How do code blocks like img attached work under the hood?\r\n\r\nIs it the model that generates ``` & it gets detected and converted to code?\r\nOr is it the UI/Backend that detects code and converts it to look like a code block?\r\n\r\n<img width=\"434\" alt=\"Screenshot 2023-06-17 at 3 26 39 PM\" src=\"https://github.com/huggingface/chat-ui/assets/62820084/d5b79272-d3d9-46c5-9761-e38515f3c73c\">\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/304",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-17T13:27:20Z",
    "updated_at": "2023-09-18T13:17:47Z",
    "user": "Muennighoff"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1118,
    "title": "Corrupted-tflite-weights while getting a model from huggingface",
    "body": "### System Info\r\n\r\n```shell\r\nSystem: MacOS\r\nOnnx: 1.14\r\ntensorflow: 2.11\r\n\r\nWhile converting a model from hugging face to tflite using huggingface-cli, the model conversion ran okay, but later in inferencing(in python and on edge-device), the model started producing random results, as if it wasn't trained at all.\r\nVirtually seeming the weights are corrupted\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n_No response_\r\n\r\n### Information\r\n\r\n- [X] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nminimum reproducible example\r\n\r\n`optimum-cli export tflite --model unitary/toxic-bert --sequence_length 128 toxic_bert/`\r\n\r\nAfter tflite conversion is done, simply do an inference in python using WordPiece Bert tokenizer.\r\n\r\n\r\nDetailed logs while conversion process\r\n\r\n\r\n```\r\n2023-06-17 02:53:29.604798: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA\r\nTo enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\r\n/Users/saurabhkumar/opt/anaconda3/lib/python3.7/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses\r\n  import imp\r\n2023-06-17 02:53:54.973334: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA\r\nTo enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\r\n/Users/saurabhkumar/opt/anaconda3/lib/python3.7/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses\r\n  import imp\r\nLoading PyTorch model in TensorFlow before exporting.\r\n2023-06-17 02:54:06.422503: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA\r\nTo enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\r\nSome weights of the PyTorch model were not used when initializing the TF 2.0 model TFBertForSequenceClassification: ['bert.embeddings.position_ids']\r\n- This IS expected if you are initializing TFBertForSequenceClassification from a PyTorch model trained on another task or with another architecture (e.g. initializing a TFBertForSequenceClassification model from a BertForPreTraining model).\r\n- This IS NOT expected if you are initializing TFBertForSequenceClassification from a PyTorch model that you expect to be exactly identical (e.g. initializing a TFBertForSequenceClassification model from a BertForSequenceClassification model).\r\nAll the weights of TFBertForSequenceClassification were initialized from the PyTorch model.\r\nIf your task is similar to the task the model of the checkpoint was trained on, you can already use TFBertForSequenceClassification for predictions without further training.\r\nUsing TensorFlow: 2.11.0\r\nOverriding 1 configuration item(s)\r\n\t- use_cache -> False\r\nWARNING:absl:Found untraced functions such as embeddings_layer_call_fn, embeddings_layer_call_and_return_conditional_losses, encoder_layer_call_fn, encoder_layer_call_and_return_conditional_losses, pooler_layer_call_fn while saving (showing 5 of 420). These functions will not be directly callable after loading.\r\n2023-06-17 02:55:02.650365: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:362] Ignored output_format.\r\n2023-06-17 02:55:02.650918: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:365] Ignored drop_control_dependency.\r\n2023-06-17 02:55:02.652373: I tensorflow/cc/saved_model/reader.cc:45] Reading SavedModel from: /var/folders/q4/dklkx0m970scm0m4w3m_nzvc0000gn/T/tmpod9lpuk_\r\n2023-06-17 02:55:02.718684: I tensorflow/cc/saved_model/reader.cc:89] Reading meta graph with tags { serve }\r\n2023-06-17 02:55:02.718712: I tensorflow/cc/saved_model/reader.cc:130] Reading SavedModel debug info (if present) from: /var/folders/q4/dklkx0m970scm0m4w3m_nzvc0000gn/T/tmpod9lpuk_\r\n2023-06-17 02:55:02.945563: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:357] MLIR V1 optimization pass is not enabled\r\n2023-06-17 02:55:02.997217: I tensorflow/cc/saved_model/loader.cc:229] Restoring SavedModel bundle.\r\n2023-06-17 02:55:03.837625: I tensorflow/cc/saved_model/loader.cc:213] Running initialization op on SavedModel bundle at path: /var/folders/q4/dklkx0m970scm0m4w3m_nzvc0000gn/T/tmpod9l",
    "url": "https://github.com/huggingface/optimum/issues/1118",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2023-06-16T18:56:06Z",
    "updated_at": "2023-06-19T05:18:10Z",
    "comments": 1,
    "user": "saurabhkumar8112"
  },
  {
    "repo": "huggingface/pytorch-pretrained-BigGAN",
    "number": 20,
    "title": "Is the model trained on truncated noise? What was input noise vector characteristics for training?",
    "body": "Hi,\r\n\r\nI have noticed in the \"utils.py\" line 32, you truncated the normal noise in the range [-2,2] by this line of code:\r\n\r\n`values = truncnorm.rvs(-2, 2, size=(batch_size, dim_z), random_state=state).astype(np.float32)`\r\n\r\nCould you please let me know whether the pre-trained model is also trained using this truncated noise? If not, could you please let me know the characteristics of the input noise vectors during training your model? Thanks!\r\n\r\n",
    "url": "https://github.com/huggingface/pytorch-pretrained-BigGAN/issues/20",
    "state": "open",
    "labels": [],
    "created_at": "2023-06-16T08:02:52Z",
    "updated_at": "2023-06-16T08:02:52Z",
    "user": "MHVali"
  },
  {
    "repo": "pytorch/text",
    "number": 2182,
    "title": "Explicit dependend on portalocker?",
    "body": "Shouldn't torch/text add an explicit dependency on portalocker now? Without it, I get:\r\n```\r\n= 979 failed, 204 passed, 12 skipped, 1 deselected, 6 warnings in 495.47s (0:08:15) =\r\n```\r\nthat's >80% failed tests, and probably does not represent a functional torchtext?\r\n\r\n_Originally posted by @h-vetinari in https://github.com/pytorch/text/issues/2056#issuecomment-1593761158_\r\n            ",
    "url": "https://github.com/pytorch/text/issues/2182",
    "state": "open",
    "labels": [],
    "created_at": "2023-06-15T21:45:32Z",
    "updated_at": "2023-06-15T21:45:32Z",
    "comments": 0,
    "user": "h-vetinari"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 301,
    "title": "Error when deploying on a distant server : Cannot find base config file \"./.svelte-kit/tsconfig.json\" ",
    "body": "Hey,\r\n\r\nI'm having troubles deploying HuggingChat on a distant server, when I run HuggingChat, I get the following error : \r\n```\r\nai@1.0.0 start-chat-ui\r\n> cd ../chat-ui && npm run dev -- --host 127.0.0.1\r\n\r\n\r\n> chat-ui@0.3.0 dev\r\n> vite dev --host 127.0.0.1\r\n\r\n\u25b2 [WARNING] Cannot find base config file \"./.svelte-kit/tsconfig.json\" [tsconfig.json]\r\n\r\n    tsconfig.json:2:12:\r\n      2 \u2502   \"extends\": \"./.svelte-kit/tsconfig.json\",\r\n        \u2575              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nfailed to load config from /home/paperspace/***/chat-ui/vite.config.ts\r\nerror when starting dev server:\r\nError [ERR_MODULE_NOT_FOUND]: Cannot find package 'unplugin-icons' imported from /home/paperspace/***/chat-ui/vite.config.ts.timestamp-1686857376175-9d68e4b73b2d7.mjs\r\n    at new NodeError (node:internal/errors:405:5)\r\n    at packageResolve (node:internal/modules/esm/resolve:781:9)\r\n    at moduleResolve (node:internal/modules/esm/resolve:830:20)\r\n    at defaultResolve (node:internal/modules/esm/resolve:1035:11)\r\n    at DefaultModuleLoader.resolve (node:internal/modules/esm/loader:269:12)\r\n    at DefaultModuleLoader.getModuleJob (node:internal/modules/esm/loader:153:32)\r\n    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:33)\r\n    at link (node:internal/modules/esm/module_job:75:36) \r\n```\r\nI tried to reinstall svelte but I can't understand where this warning comes from as I have the latest version and my file tsconfig.json exists in the installation folder of svelte... \r\n\r\nI tried to modify the package.json as suggested here https://github.com/sveltejs/kit/issues/7028 but it is still unable to work properly...\r\n\r\nAnyone has an idea of why I'm still having this issue ?\r\n\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/301",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-06-15T19:55:36Z",
    "updated_at": "2023-06-19T10:50:26Z",
    "comments": 2,
    "user": "samichaignonmejai"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 150,
    "title": "[Question] How to use transformers.js like the python sentence_transformers library?",
    "body": "Hello all,\r\n\r\nThanks for this great library. I've just discovered it and I'm familiar with the python sentence_transformers module. I know from experience that sentence_transformers wraps a lot of the complexity compared to using transformers directly.\r\n\r\nCan you point to an example of using this to replace python's sentence_transformers for semantic search document and question embedding? Does this solution handle the tokenization and attention windows automatically like sentence_transformers, or do I need to break my inputs into chunks, process them separately, and then mean pool them back together or something?\r\n\r\nThanks,\r\nDave\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/150",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-15T15:30:49Z",
    "updated_at": "2023-06-18T15:17:04Z",
    "user": "davidtbo"
  },
  {
    "repo": "pytorch/kineto",
    "number": 770,
    "title": "On demand profiling example / code changes",
    "body": "Hi, is there an example for how we can enable on demand profiling with kineto? \r\nThe [libkineto README](https://github.com/pytorch/kineto/tree/main/libkineto) mentions that we can send a 'signal' or 'trigger' on demand profiling, but I am unclear on how we can do so from outside the PyTorch script.  \r\n\r\nWould highly appreciate if somebody could provide an example or point me to the relevant APIs / source files. Thank you!!",
    "url": "https://github.com/pytorch/kineto/issues/770",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-15T04:12:22Z",
    "updated_at": "2024-04-23T15:27:23Z",
    "user": "shradhasehgal"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 299,
    "title": "Using HuggingChat in a JavaScript/node.js setting?",
    "body": "Hi, I'm not sure whether this is relevant here, but I'd like to use the HuggingChat in a personal web design project, and I'd like to access it through REST/axios, similar to this [here](https://stackoverflow.com/questions/75714587/node-js-turn-hugging-face-image-response-to-buffer-and-send-as-a-discord-attac) (stable diffusion hugging face example)\r\n\r\nSo far the only thing I could find was the [huggingChat python](https://github.com/Soulter/hugging-chat-api), and I'm not really sure how to use that in what I'm looking for. Can anyone help?\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/299",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-15T02:59:29Z",
    "updated_at": "2023-09-18T13:19:32Z",
    "comments": 3,
    "user": "VatsaDev"
  },
  {
    "repo": "pytorch/xla",
    "number": 5188,
    "title": "Slow Device To Host Transfers",
    "body": "## \u2753 Questions and Help\r\n\r\nRecently I tried ResNet-50 on TPUs using this repo and TensorFlow / Keras. The performance difference between the two was about 15% (2844.4 img/s per TPU vs 3283.52 img/s) in favor of TensorFlow / Keras. These results were with logging every _300_ iterations. When I removed the logging, the TensorFlow / Keras performance stayed the same while this repo caught up within a few percent (3193.6 img/s). I think this is somewhat expected, as in a previous issue and in the troubleshooting guide, these transfers are generally seen as bad for performance. However, TensorFlow / Keras didn't have a change in their performance, so I did some digging, and it seems they use a separate thread and [device-specific outfeed queue](https://github.com/tensorflow/estimator/blob/7d846da87ed70f9a6c21a33a1c7178697844d9c0/tensorflow_estimator/python/estimator/tpu/tpu_estimator.py#LL450C19-L450C19) that lets them asynchronously transfer data (like the loss) to the host and display a progress bar and other metrics without any hit to TPU performance. Is there a reason they're able to do that and PyTorch XLA cannot?\r\n\r\nMore details:\r\n- [PyTorch XLA script](https://github.com/pytorch/xla/blob/master/test/test_train_mp_imagenet.py) (taken from this repo's tests)\r\n- [TensorFlow / Keras script](https://github.com/tensorflow/tpu/blob/master/models/experimental/resnet50_keras/resnet50.py) (taken from tensorflow/tpu)\r\n- Performance statistics were taken in the exact same way across both scripts by measuring time right after each step (includes data loading time)\r\n- For torch_xla, `add_step_closure` was tried with `run_async=False` and `run_async=True`.\r\n- Both were run on the exact same v4-8 TPU VM with the latest version of torch_xla and tensorflow.\r\n",
    "url": "https://github.com/pytorch/xla/issues/5188",
    "state": "closed",
    "labels": [
      "question",
      "runtime"
    ],
    "created_at": "2023-06-14T23:01:59Z",
    "updated_at": "2025-04-30T12:53:54Z",
    "user": "MikeynJerry"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 297,
    "title": "Is there a way to deploy without the HF token ?",
    "body": "I'm trying to use chat-ui with my own endpoints and I would like to know if I can get rid of the HF_ACCESS_TOKEN variable and also allow to run every model I want. \r\n\r\nI tried to modify the TS in modelEndpoint.ts and model.ts but I can't figure how to run it independently to HF (I want it offline), here are the parts I suspect to prevent me from doing it :\r\n\r\nmodelEndpoint.ts :\r\n```\r\nif (!model.endpoints) {\r\n\t\treturn {\r\n\t\t\turl: 'https://api-inference.huggingface.co/models/${model.name}',\r\n\t\t\tauthorization: 'Bearer ${HF_ACCESS_TOKEN}',\r\n\t\t\tweight: 1,\r\n\t\t};\r\n\t}\r\n```\r\nmodel.ts :\r\n```\r\nendpoints: z\r\n.array(\r\n\tz.object({\r\n\t\turl: z.string().url(),\r\n\t\tauthorization: z.string().min(1).default(`Bearer ${HF_ACCESS_TOKEN}`),\r\n\t\tweight: z.number().int().positive().default(1),\r\n\t})\r\n)\r\n```\r\nAny thoughts about this ?\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/297",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-06-14T12:11:04Z",
    "updated_at": "2023-06-15T09:52:39Z",
    "comments": 2,
    "user": "samichaignonmejai"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 296,
    "title": "Issue when deploying model : Error in 'stream': 'stream' is not supported for this model",
    "body": "I'm trying to use bigscience/bloom-560m with chat-ui\r\nI already have an API for the model and it's working well, same for chat-ui when I use my HF token but i get the following error message when I launch a request to my bloom-560m API from chat-ui :\r\n\r\n\r\n```\r\nCould not parse last message {\"error\":[\"Error in `stream`: `stream` is not supported for this model\"]}\r\nSyntaxError: Unexpected end of JSON input\r\n    at JSON.parse (<anonymous>)\r\n    at parseGeneratedText (/src/routes/conversation/[id]/+server.ts:180:32)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async saveMessage (/src/routes/conversation/[id]/+server.ts:95:26)\r\n```\r\nI tried modifying the URL of my API from http://xxx.xxx.x.xxx:8080/generate_stream to http://xxx.xxx.x.xxx:8080/generate but it is not working as well ... any thoughts about this ?",
    "url": "https://github.com/huggingface/chat-ui/issues/296",
    "state": "closed",
    "labels": [
      "support",
      "models"
    ],
    "created_at": "2023-06-14T09:04:07Z",
    "updated_at": "2023-06-19T10:57:01Z",
    "comments": 2,
    "user": "samichaignonmejai"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5951,
    "title": "What is the Right way to use discofuse dataset??",
    "body": "[Click here for Dataset link](https://huggingface.co/datasets/discofuse/viewer/discofuse-wikipedia/train?row=6)\r\n**Below is the following way, as per my understanding , Is it correct :question: :question:**\r\n\r\nThe **columns/features from `DiscoFuse dataset`** that will be the **input to the `encoder` and `decoder`** are:\r\n\r\n[Click here for Dataset link](https://huggingface.co/datasets/discofuse/viewer/discofuse-wikipedia/train?row=6)\r\n\r\n1. **coherent_first_sentence**\r\n\r\n2. **coherent_second_sentence**\r\n\r\n3. **incoherent_first_sentence**\r\n\r\n4. **incoherent_second_sentence**\r\n\r\n[Click here for Dataset link](https://huggingface.co/datasets/discofuse/viewer/discofuse-wikipedia/train?row=6)\r\n\r\nThe **`encoder` will take these four columns as input and encode them into a sequence of hidden states. The `decoder` will then take these hidden states as input and decode them into a new sentence that fuses the two original sentences together.**\r\n\r\nThe **discourse type, connective_string, has_coref_type_pronoun, and has_coref_type_nominal columns will not be used as input to the encoder or decoder.** These columns are used to provide additional information about the dataset, but they are not necessary for the task of sentence fusion.\r\n\r\nPlease correct me if I am wrong; otherwise, if this understanding is right, how shall I implement this task practically?",
    "url": "https://github.com/huggingface/datasets/issues/5951",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-14T08:38:39Z",
    "updated_at": "2023-06-14T13:25:06Z",
    "user": "akesh1235"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 295,
    "title": "Facing issue for using custom model deployed locally on flask",
    "body": "I have a chat model which responds on\r\n```\r\n@app.route(\"/get\")\r\n#function for the bot response\r\ndef get_bot_response():\r\n    userText = request.args.get('msg')\r\n    data = T.getResponse(userText)\r\n    return str(data)\r\n```\r\n\r\nI'm not sure about the configuration but I have added `MODELS=[{\"name\": \"mymodel\", \"endpoints\": [{\"url\": \"http://127.0.0.1:5000/get\"}]}]` in the` .env.local` file\r\n\r\nGetting following error:\r\n![image](https://github.com/huggingface/chat-ui/assets/39643649/f3717b0b-de67-4b19-9a57-a6531c52c93c)\r\n\r\nCan someone please help me to configure my local model with HuggingChat chat-ui\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/295",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-06-14T08:20:41Z",
    "updated_at": "2023-07-24T10:53:41Z",
    "comments": 6,
    "user": "awsum0225"
  },
  {
    "repo": "pytorch/data",
    "number": 1184,
    "title": "Roadmap for mixed chain of multithread and multiprocessing pipelines?",
    "body": "### \ud83d\ude80 The feature\r\n\r\n[pypeln](https://cgarciae.github.io/pypeln/#mixed-pipelines) has a nice feature to chain pipelines which may run on different kind of workers including process, thread or asyncio.\r\n```python\r\ndata = (\r\n    range(10)\r\n    | pl.process.map(slow_add1, workers=3, maxsize=4)\r\n    | pl.thread.filter(slow_gt3, workers=2)\r\n    | pl.sync.map(lambda x: print x)\r\n    | list\r\n)\r\n```\r\n![image](https://github.com/pytorch/data/assets/11533479/5ebed02e-148e-4990-9186-b16b47a6aec5)\r\n\r\nI remembered that in the first proposal of pytorch/data, it claims to support something alike. I'd like to ask if it's still planed and the concrete roadmap.\r\n\r\n### Motivation, pitch\r\n\r\nInitial proposed\r\n\r\n### Alternatives\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/1184",
    "state": "open",
    "labels": [],
    "created_at": "2023-06-14T07:12:36Z",
    "updated_at": "2023-06-15T17:32:46Z",
    "comments": 2,
    "user": "npuichigo"
  },
  {
    "repo": "pytorch/serve",
    "number": 2412,
    "title": "How to identify \"full\" torchserve instances on Google Kubernetes Engine",
    "body": "We're currently trying to deploy torchserve on scale on Kubernetes. We have highly fluctuating requests, basically every 5 minutes some requests come in with nothing in-between, and sometimes there'll be huge spikes. Therefore we want small pods that scale aggressively as soon as load comes in.\r\n\r\nHere comes the issues: based on what metric can we scale and is there a way to identify pods that are at their limit?\r\n\r\nFor scaling we currently just use cpu usage, `queueLength` would be ideal. For that we probably have to wait on #2101, right?\r\n\r\nOnce scaling has happened, k8s has no way of knowing which pods can actually serve requests (one request can take up to 10 seconds, so a full queue will stay full for a while). Again, readiness probe on `queueLength` would be ideal. `queueTime` will only tell us  that we should have scaled x seconds ago.\r\n\r\nWe've come up with the solution of using the `readinessProbe` to send a dummy request to the handler to check whether it gets denied immediately. But that can't be it, right? Surely, this problem can't be so unique that there is no better solution.\r\n\r\n\r\nI apologize in advance if this is not the right place to ask this question, I couldn't find anything better.",
    "url": "https://github.com/pytorch/serve/issues/2412",
    "state": "open",
    "labels": [
      "triaged",
      "kubernetes"
    ],
    "created_at": "2023-06-13T20:06:20Z",
    "updated_at": "2023-06-26T17:16:00Z",
    "user": "tsteffek"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1106,
    "title": "Onnxruntime support for multiple modalities model types",
    "body": "### Feature request\r\n\r\nAdd support for layout and multi-modal models (e.g. LayoutLM, LayoutLMv3, LILT) to the ORTModels.\r\n\r\n### Motivation\r\n\r\nORTModels allows to interact with onnxruntime models in the same way as transformers API, which is very convenient, as optimum is a part of huggingface ecosystem and the compatibility between all the components is crucial. But unfortunately currently ORTModels do not support models that accept multiple modalities, e.g. text+layout ot text+layout+image. As of now only _input_ids, attention_mask and token_type_ids_ are processed for in _**ORTModelForFeatureExtraction, ORTModelForQuestionAnswering, ORTModelForSequenceClassification, ORTModelForTokenClassification**_ in modeling_ort.py.\r\n\r\n### Your contribution\r\n\r\nI can submit a PR, but since there are a lot of ways how this can be implemented - I would like to agree how to do this better.\r\nFor example:\r\n\r\n**first way:**\r\n* Implement it in similar way how AutoModels* works in transformers: have the mapping for the model and the ort model class which suits it .\r\n `{ \"bert\": OrtModelForTokenCkassification,\r\n     \"roberta\": OrtModelForTokenCkassification,\r\n        \"layoutlm\": OrtLayoutLMForTokenClassification\r\n}`\r\n For the models that does not text-only we will need to add a separate class and substitute the class when initializing the ORTModel* with corresponding model, while for the models that are already supported nothing will change.\r\n\r\n**second way:**\r\n* Add mapping for the model name as key and input attr as value:\r\n\r\n`{ \"bert\": [\"input_ids\", \"attention_mask\", \"token_type_ids\"],\r\n        \"layoutlm\": [\"input_ids\", \"attention_mask\", \"token_type_ids\",  \"bbox\"]\r\n}`\r\n*  Substitute the model inputs with the given model map in modeling_ort.py.",
    "url": "https://github.com/huggingface/optimum/issues/1106",
    "state": "open",
    "labels": [
      "feature-request",
      "onnxruntime"
    ],
    "created_at": "2023-06-13T14:30:10Z",
    "updated_at": "2023-06-14T11:10:49Z",
    "comments": 0,
    "user": "mariababich"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1105,
    "title": "IO Binding for ONNX Non-CUDAExecutionProviders",
    "body": "### Feature request\n\nWhen using use_io_binding=True with TensorrtExecutionProvider, a warning appears : \r\n\r\n```\r\nNo need to enable IO Binding if the provider used is not CUDAExecutionProvider. IO Binding will be turned off.\r\n```\r\n\r\nI don't understand the reason for this, as data movement optimization should also work for TensorrtExecutionProvider at least. If this is not possible, can someone explain the reason? Thank you.\n\n### Motivation\n\nBeing able to decouple data movement between CPU DRAM and GPU DRAM from computation makes it possible to overlap computation with communication.\n\n### Your contribution\n\nTheoretically, the iobinding implementation for CUDAExecutionProvider should work for TensorrtExecutionProvider too.",
    "url": "https://github.com/huggingface/optimum/issues/1105",
    "state": "open",
    "labels": [
      "help wanted",
      "onnxruntime"
    ],
    "created_at": "2023-06-13T14:11:31Z",
    "updated_at": "2023-09-26T11:47:17Z",
    "comments": 5,
    "user": "cyang49"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 103506,
    "title": "How to add testing capabilities for third party devices",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nThe current community test cases are all cpu and cuda based, there is no ability to look after third party devices, for example many test cases use the @onlycuda decorator, any suggestions for improvements for the privateuse1 device\uff1f\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/103506",
    "state": "closed",
    "labels": [
      "triaged",
      "module: third_party",
      "module: testing"
    ],
    "created_at": "2023-06-13T12:37:13Z",
    "updated_at": "2023-06-26T17:07:54Z",
    "user": "Bin1024"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5946,
    "title": "IndexError Not Solving -> IndexError: Invalid key: ?? is out of bounds for size 0 or ??",
    "body": "### Describe the bug\n\nin <cell line: 1>:1                                                                              \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502 /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1537 in train                    \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502   1534 \u2502   \u2502   inner_training_loop = find_executable_batch_size(                                 \u2502\r\n\u2502   1535 \u2502   \u2502   \u2502   self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size  \u2502\r\n\u2502   1536 \u2502   \u2502   )                                                                                 \u2502\r\n\u2502 \u2771 1537 \u2502   \u2502   return inner_training_loop(                                                       \u2502\r\n\u2502   1538 \u2502   \u2502   \u2502   args=args,                                                                    \u2502\r\n\u2502   1539 \u2502   \u2502   \u2502   resume_from_checkpoint=resume_from_checkpoint,                                \u2502\r\n\u2502   1540 \u2502   \u2502   \u2502   trial=trial,                                                                  \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502 /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1789 in _inner_training_loop     \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502   1786 \u2502   \u2502   \u2502   \u2502   rng_to_sync = True                                                        \u2502\r\n\u2502   1787 \u2502   \u2502   \u2502                                                                                 \u2502\r\n\u2502   1788 \u2502   \u2502   \u2502   step = -1                                                                     \u2502\r\n\u2502 \u2771 1789 \u2502   \u2502   \u2502   for step, inputs in enumerate(epoch_iterator):                                \u2502\r\n\u2502   1790 \u2502   \u2502   \u2502   \u2502   total_batched_samples += 1                                                \u2502\r\n\u2502   1791 \u2502   \u2502   \u2502   \u2502   if rng_to_sync:                                                           \u2502\r\n\u2502   1792 \u2502   \u2502   \u2502   \u2502   \u2502   self._load_rng_state(resume_from_checkpoint)                          \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502 /usr/local/lib/python3.10/dist-packages/accelerate/data_loader.py:377 in __iter__                \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502   374 \u2502   \u2502   dataloader_iter = super().__iter__()                                               \u2502\r\n\u2502   375 \u2502   \u2502   # We iterate one batch ahead to check when we are at the end                       \u2502\r\n\u2502   376 \u2502   \u2502   try:                                                                               \u2502\r\n\u2502 \u2771 377 \u2502   \u2502   \u2502   current_batch = next(dataloader_iter)                                          \u2502\r\n\u2502   378 \u2502   \u2502   except StopIteration:                                                              \u2502\r\n\u2502   379 \u2502   \u2502   \u2502   yield                                                                          \u2502\r\n\u2502   380                                                                                            \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502 /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:633 in __next__           \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502    630 \u2502   \u2502   \u2502   if self._sampler_iter is None:                                                \u2502\r\n\u2502    631 \u2502   \u2502   \u2502   \u2502   # TODO(https://github.com/pytorch/pytorch/issues/76750)                   \u2502\r\n\u2502    632 \u2502   \u2502   \u2502   \u2502   self._reset()  # type: ignore[call-arg]                                   \u2502\r\n\u2502 \u2771  633 \u2502   \u2502   \u2502   data = self._next_data()                                                      \u2502\r\n\u2502    634 \u2502   \u2502   \u2502   self._num_yielded += 1                                                        \u2502\r\n\u2502    635 \u2502   \u2502   \u2502   if self._dataset_kind == _DatasetKind.Iterable and \\                          \u2502\r\n\u2502    636 \u2502   \u2502   \u2502   \u2502   \u2502   self._IterableDataset_len_called is not None and \\                    \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502 /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:677 in _next_data         \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502    674 \u2502                                                                                         \u2502\r\n\u2502    675 \u2502   def _next_data(self):                                                                 \u2502\r\n\u2502    676 \u2502   \u2502   index = self._next_index()  # may raise StopIteration                             \u2502\r\n\u2502 \u2771  677 \u2502   \u2502   data = self._dataset_fetcher.fetch(index)  # may raise StopIteration              \u2502\r\n\u2502    678 \u2502   \u2502   if self._pin_memory:                                               ",
    "url": "https://github.com/huggingface/datasets/issues/5946",
    "state": "open",
    "labels": [],
    "created_at": "2023-06-13T07:34:15Z",
    "updated_at": "2023-07-14T12:04:48Z",
    "comments": 6,
    "user": "syngokhan"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 273,
    "title": "Issue with Loading Model in safetensors Format",
    "body": "### System Info\n\n- `transformers` version: 4.30.1\r\n- Platform: macOS-13.4-arm64-arm-64bit\r\n- Python version: 3.11.3\r\n- Huggingface_hub version: 0.15.1\r\n- Safetensors version: 0.3.1\r\n- PyTorch version (GPU?): 2.0.1 (False)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: no\r\n- Using distributed or parallel set-up in script?: no\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Reproduction\n\nI'm trying to load a model saved in safetensors format using the Transformers library. Here's the code I'm using:\r\n\r\n```python\r\nfrom transformers import LlamaForCausalLM, LlamaTokenizer\r\n\r\ntokenizer = LlamaTokenizer.from_pretrained(\"path/to/model\")\r\nmodel = LlamaForCausalLM.from_pretrained(\"path/to/model\", use_safetensors=True)\r\n```\r\n\r\nHowever, I'm running into this error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Users/maxhager/Projects2023/nsfw/model_run.py\", line 4, in <module>\r\n    model = LlamaForCausalLM.from_pretrained(\"path/to/model\", use_safetensors=True)\r\n  File \"/Users/maxhager/.virtualenvs/nsfw/lib/python3.11/site-packages/transformers/modeling_utils.py\", line 2449, in from_pretrained\r\n    raise EnvironmentError(\r\nOSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory path/to/model.\r\n```\r\n\r\nIn my model directory, I have the following files (its [this](https://huggingface.co/notstoic/pygmalion-13b-4bit-128g) model locally):\r\n\r\n- 4bit-128g.safetensors\r\n- config.json\r\n- generation_config.json\r\n- pytorch_model.bin.index.json\r\n- special_tokens_map.json\r\n- tokenizer.json\r\n- tokenizer.model\r\n- tokenizer_config.json\r\n\r\n\n\n### Expected behavior\n\nI would expect that setting use_safetensors=True would inform the from_pretrained method to load the model from the safetensors format. However, it appears the method is looking for the usual model file formats (pytorch_model.bin, tf_model.h5, etc) instead of recognizing the safetensors format.\r\n\r\nI'm looking for a solution or guidance on how to successfully load a model stored in the safetensors format using the Transformers library.",
    "url": "https://github.com/huggingface/safetensors/issues/273",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-06-12T21:25:33Z",
    "updated_at": "2024-03-08T13:28:30Z",
    "comments": 11,
    "user": "yachty66"
  },
  {
    "repo": "pytorch/data",
    "number": 1181,
    "title": "Does Collator need to exist? ",
    "body": "### \ud83d\udcda The doc issue\r\n\r\nDocs for [Collator](https://pytorch.org/data/0.6/generated/torchdata.datapipes.iter.Collator.html#torchdata.datapipes.iter.Collator) leave a lot of questions. \r\n\r\n> Collates samples from DataPipe to Tensor(s) by a custom collate function\r\nWhat does collate mean in this context?  What is the collate function applied to? In the torch Dataloader docs, it's clear that collate_fn is meant to be applied to a batch of data, but that's not explained here at all. Looking at the implementation I think the input datapipe is supposed to be batched here too, but that's not clear. \r\n\r\nWhat's the difference between this and Mapper? Sort of seems like the only difference is that the output of `collate_fn` is supposed to be tensors? Or collections of Tensors?  I have used it with a function that returns a list of ints though, so there doesn't seem to be anything enforcing that the output is Tensors.\r\n\r\n\r\n### Suggest a potential alternative/fix\r\n\r\nGet rid of Collator if it doesn't add anything over Mapper, it's confusing\r\n\r\nIf keeping it:\r\n\r\n* If it's basically Mapper with a default mapping function that converts things to tensors, don't allow specifying the function. \r\n* Or explain why this is different than mapper.\r\n* State that input should be batched\r\n* Document the `conversion` argument\r\n",
    "url": "https://github.com/meta-pytorch/data/issues/1181",
    "state": "open",
    "labels": [],
    "created_at": "2023-06-12T15:02:52Z",
    "updated_at": "2023-07-18T00:38:02Z",
    "comments": 1,
    "user": "lendle"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 144,
    "title": "Question-Answer Examples",
    "body": "Ca you please send us an example of question-answer please",
    "url": "https://github.com/huggingface/transformers.js/issues/144",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-09T21:54:37Z",
    "updated_at": "2023-06-09T22:59:17Z",
    "user": "Zenyker"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1095,
    "title": "Installation issue on Openvino NNcf",
    "body": "### System Info\n\n```shell\nLINUX WSL 2\r\nDistributor ID: Ubuntu\r\nDescription:    Ubuntu 20.04.6 LTS\r\nRelease:        20.04\r\nCodename:       focal\r\n\r\nOPTIMUM\r\nName: optimum\r\nVersion: 1.8.6\r\nSummary: Optimum Library is an extension of the Hugging Face Transformers library, providing a framework to integrate third-party libraries from Hardware Partners and interface with their specific functionality.\r\nHome-page: https://github.com/huggingface/optimum\r\nAuthor: HuggingFace Inc. Special Ops Team\r\nAuthor-email: hardware@huggingface.co\r\nLicense: Apache\r\nLocation: /home/debayan/CT_with_LLM/opvino/lib/python3.11/site-packages\r\nRequires: coloredlogs, datasets, huggingface-hub, numpy, packaging, sympy, torch, torchvision, transformers\r\n\r\nPYTHON\r\n3.11.3\n```\n\n\n### Who can help?\n\n@echarlaix  , while trying to install openvino nncf, i am getting this issue and cannot figure out how to fix this problem. \r\nThe hardware is intel and hence was working via this approach. I am trying to optimize blip model for image captioning\r\n\r\n  error: subprocess-exited-with-error\r\n  \r\n  \u00d7 python setup.py egg_info did not run successfully.\r\n  \u2502 exit code: 1\r\n  \u2570\u2500> [7 lines of output]\r\n      fatal: not a git repository (or any of the parent directories): .git\r\n      Traceback (most recent call last):\r\n        File \"<string>\", line 2, in <module>\r\n        File \"<pip-setuptools-caller>\", line 34, in <module>\r\n        File \"/tmp/pip-install-f8b_3uou/onnx_22d50665ccb74d03a417ba4977874f9c/setup.py\", line 318, in <module>\r\n          raise FileNotFoundError(\"Unable to find \" + requirements_file)\r\n      FileNotFoundError: Unable to find requirements.txt\r\n      [end of output]\r\n  \r\n  note: This error originates from a subprocess, and is likely not a problem with pip.\r\nerror: metadata-generation-failed\r\n\r\n\u00d7 Encountered error while generating package metadata.\r\n\u2570\u2500> See above for output.\r\n\r\nnote: This is an issue with the package mentioned above, not pip.\r\nhint: See above for details.\r\n\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\npython -m pip install optimum[openvino,nncf] is failing with the issue\r\n\r\n  error: subprocess-exited-with-error\r\n  \r\n  \u00d7 python setup.py egg_info did not run successfully.\r\n  \u2502 exit code: 1\r\n  \u2570\u2500> [7 lines of output]\r\n      fatal: not a git repository (or any of the parent directories): .git\r\n      Traceback (most recent call last):\r\n        File \"<string>\", line 2, in <module>\r\n        File \"<pip-setuptools-caller>\", line 34, in <module>\r\n        File \"/tmp/pip-install-_g6qzuag/onnx_aebd33cd3ee44e7daf5f0a07afd43101/setup.py\", line 318, in <module>\r\n          raise FileNotFoundError(\"Unable to find \" + requirements_file)\r\n      FileNotFoundError: Unable to find requirements.txt\r\n      [end of output]\r\n  \r\n  note: This error originates from a subprocess, and is likely not a problem with pip.\r\nerror: metadata-generation-failed\r\n\r\n\u00d7 Encountered error while generating package metadata.\r\n\u2570\u2500> See above for output.\r\n\r\nnote: This is an issue with the package mentioned above, not pip.\r\nhint: See above for details.\n\n### Expected behavior\n\ninstallation should be successful",
    "url": "https://github.com/huggingface/optimum/issues/1095",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-06-09T09:55:45Z",
    "updated_at": "2024-01-05T11:10:06Z",
    "comments": 5,
    "user": "DebayanChakraborty"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2453,
    "title": "\ud83d\udca1 [REQUEST] - Add ABI=1 compilation instruction to README",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\n\nUnder certain usage circumstances, PyTorch needs to have C++11 ABI enabled. Currently there's no docs in README for introducing how to get it enabled.\r\nLink https://github.com/pytorch/pytorch/pull/95177 to enable this request.\r\n\r\n\n\n### Existing tutorials on this topic\n\nhttps://github.com/pytorch/pytorch\n\n### Additional context\n\nWe aim to complete the document as part of PyTorch Docathon 2023. cc @jgong5 @XiaobingSuper @sanchitintel @ashokei @jingxu10 @ZailiWang @ZhaoqiongZ @leslie-fang-intel @Xia-Weiwen @sekahler2 @CaoE @zhuhaozhe @Valentine233 @CaoE",
    "url": "https://github.com/pytorch/tutorials/issues/2453",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-09T07:53:48Z",
    "updated_at": "2023-06-15T07:13:34Z",
    "comments": 1,
    "user": "jingxu10"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 140,
    "title": "[Question] OrtRun error code 6 with a longer string for question-answering",
    "body": "Why do I keep running into an OrtRun error code 6 with a longer string for question-answering task:\r\n`const result = await model(question, context, {\r\n          padding: true,\r\n          truncation: true,\r\n        });\r\n`\r\n\r\nError:\r\n`\r\nmodels.js:158 An error occurred during model execution: \"Error: failed to call OrtRun(). error code = 6.\".\r\nmodels.js:159 Inputs given to model: \r\n{input_ids: Proxy(Tensor), attention_mask: Proxy(Tensor), token_type_ids: Proxy(Tensor)}\r\nattention_mask\r\n: \r\nProxy(Tensor) {dims: Array(2), type: 'int64', data: BigInt64Array(550), size: 550}\r\ninput_ids\r\n: \r\nProxy(Tensor) {dims: Array(2), type: 'int64', data: BigInt64Array(550), size: 550}\r\ntoken_type_ids\r\n: \r\nProxy(Tensor) {dims: Array(2), type: 'int64', data: BigInt64Array(550), size: 550}\r\n[[Prototype]]\r\n: \r\nObject\r\nort-web.min.js:6 Uncaught (in promise) Error: failed to call OrtRun(). error code = 6.\r\n    at Object.run (ort-web.min.js:6:454854)\r\n    at ort-web.min.js:6:444202\r\n    at Object.run (ort-web.min.js:6:447121)\r\n    at InferenceSession.run (inference-session-impl.js:91:1)\r\n    at sessionRun (models.js:153:1)\r\n    at Function._call (models.js:639:1)\r\n    at Function._call (models.js:1091:1)\r\n    at Function.closure [as model] (core.js:62:1)\r\n    at Function._call (pipelines.js:253:1)\r\n    at closure (core.js:62:1)\r\n(anonymous)\t@\tort-web.min.js:6\r\n(anonymous)\t@\tort-web.min.js:6\r\nrun\t@\tort-web.min.js:6\r\nrun\t@\tinference-session-impl.js:91\r\nsessionRun\t@\tmodels.js:153\r\n_call\t@\tmodels.js:639\r\n_call\t@\tmodels.js:1091\r\nclosure\t@\tcore.js:62\r\n_call\t@\tpipelines.js:253\r\nclosure\t@\tcore.js:62\r\n(anonymous)\t@\tbackground.js:146\r\nawait in (anonymous) (async)\r\n`",
    "url": "https://github.com/huggingface/transformers.js/issues/140",
    "state": "closed",
    "labels": [
      "bug",
      "question"
    ],
    "created_at": "2023-06-09T04:07:28Z",
    "updated_at": "2023-07-11T11:07:26Z",
    "user": "iamfiscus"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5931,
    "title": "`datasets.map` not reusing cached copy by default",
    "body": "### Describe the bug\r\n\r\nWhen I load the dataset from local directory, it's cached copy is picked up after first time. However, for `map` operation, the operation is applied again and cached copy is not picked up. Is there any way to pick cached copy instead of processing it again? The only solution I could think of was to use `save_to_disk` after my last transform and then use that in my DataLoader pipeline. Are there any other solutions for the same?\r\n\r\nOne more thing, my dataset is occupying 6GB storage memory after I use `map`, is there any way I can reduce that memory usage?\r\n\r\n\r\n### Steps to reproduce the bug\r\n\r\n```\r\n# make sure that dataset decodes audio with correct sampling rate\r\ndataset_sampling_rate = next(iter(self.raw_datasets.values())).features[\"audio\"].sampling_rate\r\nif dataset_sampling_rate != self.feature_extractor.sampling_rate:\r\n    self.raw_datasets = self.raw_datasets.cast_column(\r\n        \"audio\", datasets.features.Audio(sampling_rate=self.feature_extractor.sampling_rate)\r\n    )\r\n\r\nvectorized_datasets = self.raw_datasets.map(\r\n    self.prepare_dataset,\r\n    remove_columns=next(iter(self.raw_datasets.values())).column_names,\r\n    num_proc=self.num_workers,\r\n    desc=\"preprocess datasets\",\r\n)\r\n# filter data that is longer than max_input_length\r\nself.vectorized_datasets = vectorized_datasets.filter(\r\n    self.is_audio_in_length_range,\r\n    num_proc=self.num_workers,\r\n    input_columns=[\"input_length\"],\r\n        )\r\n\r\ndef prepare_dataset(self, batch):\r\n    # load audio\r\n    sample = batch[\"audio\"]\r\n    inputs = self.feature_extractor(sample[\"array\"], sampling_rate=sample[\"sampling_rate\"])\r\n    batch[\"input_values\"] = inputs.input_values[0]\r\n    batch[\"input_length\"] = len(batch[\"input_values\"])\r\n\r\n    batch[\"labels\"] = self.tokenizer(batch[\"target_text\"]).input_ids\r\n    return batch\r\n\r\n```\r\n\r\n### Expected behavior\r\n\r\n`map` to use cached copy and if possible an alternative technique to reduce memory usage after using `map`\r\n\r\n### Environment info\r\n\r\n\r\n- `datasets` version: 2.12.0\r\n- Platform: Linux-3.10.0-1160.71.1.el7.x86_64-x86_64-with-glibc2.17\r\n- Python version: 3.8.16\r\n- Huggingface_hub version: 0.15.1\r\n- PyArrow version: 12.0.0\r\n- Pandas version: 2.0.2\r\n",
    "url": "https://github.com/huggingface/datasets/issues/5931",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-07T09:03:33Z",
    "updated_at": "2023-06-21T16:15:40Z",
    "comments": 1,
    "user": "bhavitvyamalik"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 282,
    "title": "OpenID login",
    "body": "How to get providerURL, client ID and client token to create azure openid login?????",
    "url": "https://github.com/huggingface/chat-ui/issues/282",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-06-06T10:45:46Z",
    "updated_at": "2023-06-19T09:38:34Z",
    "comments": 1,
    "user": "sankethgadadinni"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2435,
    "title": "How can we contribute with videos",
    "body": "How can we contribute videos to GitHub in PyTorch? The video will likely be long and is a link enough to be contributed or should I send with a link",
    "url": "https://github.com/pytorch/tutorials/issues/2435",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-06T09:09:59Z",
    "updated_at": "2023-06-12T16:19:56Z",
    "user": "Killpit"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 137,
    "title": "[Question] Failed to fetch onnx model when to use AutoModel.from_pretrained",
    "body": "**The code here:** \r\n```\r\nimport { AutoModel, AutoTokenizer } from '@xenova/transformers';\r\n\r\nconst modelPath = 'Xenova/distilgpt2'\r\nlet tokenizer = await AutoTokenizer.from_pretrained(modelPath); // **successful to fetch model**\r\n\r\nlet model = await AutoModel.from_pretrained(modelPath);  // **failed to fetch model**\r\nlet inputs = await tokenizer('I love transformers!');\r\nlet { logits } = await model(inputs);\r\n```\r\n\r\n**Error information:**\r\nfile:///Users/xxx/Documents/github/transformers.js/examples/node/esm/node_modules/@xenova/transformers/src/utils/hub.js:223\r\n            throw Error(`Could not locate file: \"${remoteURL}\".`)\r\n                  ^\r\n\r\nError: Could not locate file: \"https://huggingface.co/Xenova/distilgpt2/resolve/main/onnx/model_quantized.onnx\".\r\n    at handleError (file:///Users/xxx/Documents/github/transformers.js/examples/node/esm/node_modules/@xenova/transformers/src/utils/hub.js:223:19)\r\n    at getModelFile (file:///Users/xxx/Documents/github/transformers.js/examples/node/esm/node_modules/@xenova/transformers/src/utils/hub.js:412:24)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async constructSession (file:///Users/xxx/Documents/github/transformers.js/examples/node/esm/node_modules/@xenova/transformers/src/models.js:88:18)\r\n\r\n\r\ntransformers.js version: 2.1.1\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/137",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-06T02:03:41Z",
    "updated_at": "2023-06-20T13:24:37Z",
    "user": "peter-up"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 136,
    "title": "[Question] Using CLIP for simple image-text similarity",
    "body": "I'm trying to get a simple image-text similarity thing working with CLIP, and I'm not sure how to do it, or whether it's currently supported with Transformers.js outside of the zero-shot image classification pipeline.\r\n\r\nIs there a code example somewhere to get me started? Here's what I have so far:\r\n\r\n```js\r\nimport { AutoModel, AutoTokenizer } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.1.1';\r\nlet tokenizer = await AutoTokenizer.from_pretrained('Xenova/clip-vit-base-patch16');\r\nlet model = await AutoModel.from_pretrained('Xenova/clip-vit-base-patch16');\r\nlet inputIds = await tokenizer([\"cat\", \"astronaut\"]);\r\nlet image = await fetch(\"https://i.imgur.com/fYhUGoY.jpg\").then(r => r.blob());\r\n// how to process the image, and how to pass the image and inputIds to `model`?\r\n```\r\nHere's what I see if I inspect the `model` function in DevTools:\r\n\r\n![image](https://github.com/xenova/transformers.js/assets/1167575/8259ccb3-296e-4102-97ff-81a094fd0b83)\r\n\r\nI also tried this:\r\n\r\n```js\r\nimport { AutoModel, AutoTokenizer, AutoProcessor } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.1.1';\r\nlet model = await AutoModel.from_pretrained('Xenova/clip-vit-base-patch16');\r\nlet processor = await AutoProcessor.from_pretrained(\"Xenova/clip-vit-base-patch16\");\r\nlet inputs = await processor({text:[\"a photo of a cat\", \"a photo of an astronaut\"], images:[\"https://i.imgur.com/fYhUGoY.jpg\"]});\r\nlet outputs = await model(inputs);\r\n```\r\n\r\nBut it seems that `processor` expects an array of images, or something? The above code throws an error saying that an `.rgb()` method should exist on the input.",
    "url": "https://github.com/huggingface/transformers.js/issues/136",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-06-05T14:24:56Z",
    "updated_at": "2023-06-06T13:35:45Z",
    "user": "josephrocca"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 102966,
    "title": "how to workaround the error \"don't have an op for vulkan_prepack::create_linear_context\" ?",
    "body": "### \ud83d\udc1b Describe the bug\n\nI have a modified resnet-50 network, which I want to run on android using vulkan backend.\r\n\r\nThe custom build of pytorch with USE_VULKAN=1 works fine, but I got the error message \"We don't have an op for vulkan_prepack::create_linear_context but it isn't a special case.\" during \"optimize_for_mobile\" API invocation.\r\n\r\nWhat's the problem here, and how to deal with it?\r\n(I tried on both release 1.13 and release v2.0.1 tags, but got the same error message above).\r\n\r\n\r\n```\r\ngit clone -b release/1.13 --recursive https://github.com/pytorch/pytorch\r\ncd pytorch\r\ngit submodule sync\r\ngit submodule update --init --recursive\r\n\r\nexport CMAKE_PREFIX_PATH=${CONDA_PREFIX:-\"$(dirname $(which conda))/../\"}\r\npython setup.py build --cmake-only\r\nccmake build  # or cmake-gui build\r\n\r\nBUILD_LITE_INTERPRETER=0 USE_VULKAN=1 USE_VULKAN_SHADERC_RUNTIME=1 USE_VULKAN_WRAPPER=0 python setup.py develop\r\n\r\nBUILD_LITE_INTERPRETER=0 ANDROID_ABI=arm64-v8a USE_VULKAN=1 USE_VULKAN_SHADERC_RUNTIME=1 USE_VULKAN_WRAPPER=0 bash ./scripts/build_android.sh\r\n\r\nBUILD_LITE_INTERPRETER=0 ANDROID_ABI=arm64-v8a USE_VULKAN=1 USE_VULKAN_SHADERC_RUNTIME=1 USE_VULKAN_WRAPPER=0 bash ./scripts/build_pytorch_android.sh\r\n```\r\n\r\n```\r\n\r\n>>> import torch\r\n>>> import os\r\n>>> \r\n>>> from torch.utils.mobile_optimizer import optimize_for_mobile\r\n>>> \r\n>>> #file_dir = '.'\r\n>>> file_dir = '../pytorch-script/'\r\n>>> model = torch.jit.load(file_dir + '/modified-resnet50-image.pt')\r\n>>> model.eval()\r\nRecursiveScriptModule(original_name=ImageModel)\r\n>>> script_model = torch.jit.script(model)\r\n>>> script_model_vulkan = optimize_for_mobile(script_model, backend='vulkan')\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/mnt/DataExt/devroot/src/pytorch/torch/utils/mobile_optimizer.py\", line 67, in optimize_for_mobile\r\n    optimized_cpp_module = torch._C._jit_pass_vulkan_optimize_for_mobile(\r\n                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nRuntimeError: 0 INTERNAL ASSERT FAILED at \"/mnt/DataExt/devroot/src/pytorch/torch/csrc/jit/ir/alias_analysis.cpp\":615, please report a bug to PyTorch. We don't have an op for vulkan_prepack::create_linear_context but it isn't a special case.  Argument types: Tensor, Tensor, \r\n\r\nCandidates:\r\n>>> exit()\r\n\r\n```\n\n### Versions\n\nCollecting environment information...\r\nPyTorch version: 2.0.0a0+gite9ebda2\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 20.04.6 LTS (x86_64)\r\nGCC version: (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0\r\nClang version: Could not collect\r\nCMake version: version 3.22.1\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.11.3 (main, Apr 19 2023, 23:54:32) [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.31\r\nIs CUDA available: True\r\nCUDA runtime version: 12.1.105\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: GPU 0: NVIDIA RTX A4000\r\nNvidia driver version: 530.30.02\r\ncuDNN version: Probably one of the following:\r\n/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn.so.8\r\n/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8\r\n/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn_adv_train.so.8\r\n/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8\r\n/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8\r\n/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8\r\n/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn_ops_train.so.8\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:                    x86_64\r\nCPU op-mode(s):                  32-bit, 64-bit\r\nByte Order:                      Little Endian\r\nAddress sizes:                   45 bits physical, 48 bits virtual\r\nCPU(s):                          16\r\nOn-line CPU(s) list:             0-15\r\nThread(s) per core:              1\r\nCore(s) per socket:              16\r\nSocket(s):                       1\r\nNUMA node(s):                    1\r\nVendor ID:                       GenuineIntel\r\nCPU family:                      6\r\nModel:                           85\r\nModel name:                      Intel(R) Xeon(R) Gold 5218N CPU @ 2.30GHz\r\nStepping:                        7\r\nCPU MHz:                         2294.609\r\nBogoMIPS:                        4589.21\r\nHypervisor vendor:               VMware\r\nVirtualization type:             full\r\nL1d cache:                       512 KiB\r\nL1i cache:                       512 KiB\r\nL2 cache:                        16 MiB\r\nL3 cache:                        22 MiB\r\nNUMA node0 CPU(s):               0-15\r\nVulnerability Itlb multihit:     KVM: Mitigation: VMX unsupported\r\nVulnerability L1tf:              Not affected\r\nVulnerability Mds:               Not affected\r\nVulnerability Meltdown:          Not affected\r\nVulnerability Mmio stale data:   Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown\r\nVulnerability Retbleed:          Mitigation",
    "url": "https://github.com/pytorch/pytorch/issues/102966",
    "state": "open",
    "labels": [
      "module: build",
      "triaged",
      "module: vulkan",
      "ciflow/periodic"
    ],
    "created_at": "2023-06-05T09:53:28Z",
    "updated_at": "2023-09-12T00:19:52Z",
    "user": "ldfandian"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 3669,
    "title": "General question: what are the steps to debug if the image produced is just wrong?",
    "body": "I have a lora(lycoris) that I have tested with A1111's webui and I'm pretty happy with the result. When I tried to use it with `diffusers` it just give me corrupted image. The lora brings some desired effect (like white background), but the overall image is just not right.\r\n\r\nI have included some personal code to use lycoris (AFAIK diffusers currently doesn't support lycoris, correct me if I'm wrong). But the question is more general as what should I do in case like this, what experiments to run, where should I check? I printed the sum of weight for each layer and was sure they match with A1111's version.\r\n\r\nThank you.",
    "url": "https://github.com/huggingface/diffusers/issues/3669",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-06-05T01:44:49Z",
    "updated_at": "2023-07-13T15:03:51Z",
    "user": "wangdong2023"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 102939,
    "title": "Not sure what is wrong, ",
    "body": "### \ud83d\udc1b Describe the bug\n\nIt was working the last time I ran it, I ran an update and now i'm getting this when trying to train a lora\r\n\r\n===================================BUG REPORT===================================\r\nWelcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues\r\nFor effortless bug reporting copy-paste your error into this form: https://docs.google.com/forms/d/e/1FAIpQLScPB8emS3Thkp66nvqwmjTEgxp8Y9ufuWTzFyr9kJ5AoI47dQ/viewform?usp=sf_link\r\n================================================================================\r\nCUDA SETUP: Loading binary C:\\Users\\newpc_53bcer\\Documents\\Lora\\kohya_ss\\venv\\lib\\site-packages\\bitsandbytes\\libbitsandbytes_cuda116.dll...\r\nuse 8-bit AdamW optimizer | {}\r\nrunning training / \u5b66\u7fd2\u958b\u59cb\r\n  num train images * repeats / \u5b66\u7fd2\u753b\u50cf\u306e\u6570\u00d7\u7e70\u308a\u8fd4\u3057\u56de\u6570: 4700\r\n  num reg images / \u6b63\u5247\u5316\u753b\u50cf\u306e\u6570: 0\r\n  num batches per epoch / 1epoch\u306e\u30d0\u30c3\u30c1\u6570: 2350\r\n  num epochs / epoch\u6570: 1\r\n  batch size per device / \u30d0\u30c3\u30c1\u30b5\u30a4\u30ba: 2\r\n  total train batch size (with parallel & distributed & accumulation) / \u7dcf\u30d0\u30c3\u30c1\u30b5\u30a4\u30ba\uff08\u4e26\u5217\u5b66\u7fd2\u3001\u52fe\u914d\u5408\u8a08\u542b\u3080\uff09: 2\r\n  gradient ccumulation steps / \u52fe\u914d\u3092\u5408\u8a08\u3059\u308b\u30b9\u30c6\u30c3\u30d7\u6570 = 1\r\n  total optimization steps / \u5b66\u7fd2\u30b9\u30c6\u30c3\u30d7\u6570: 2350\r\nsteps:   0%|                                                                                  | 0/2350 [00:00<?, ?it/s]\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Traceback (most recent call last) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\r\n\u2502 C:\\Users\\newpc_53bcer\\Documents\\Lora\\kohya_ss\\train_db.py:477 in <module>                        \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502   474 \u2502   args = parser.parse_args()                                                             \u2502\r\n\u2502   475 \u2502   args = train_util.read_config_from_file(args, parser)                                  \u2502\r\n\u2502   476 \u2502                                                                                          \u2502\r\n\u2502 \u2771 477 \u2502   train(args)                                                                            \u2502\r\n\u2502   478                                                                                            \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502 C:\\Users\\newpc_53bcer\\Documents\\Lora\\kohya_ss\\train_db.py:245 in train                           \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502   242 \u2502   )                                                                                      \u2502\r\n\u2502   243 \u2502                                                                                          \u2502\r\n\u2502   244 \u2502   if accelerator.is_main_process:                                                        \u2502\r\n\u2502 \u2771 245 \u2502   \u2502   accelerator.init_trackers(\"dreambooth\" if args.log_tracker_name is None else arg   \u2502\r\n\u2502   246 \u2502                                                                                          \u2502\r\n\u2502   247 \u2502   loss_list = []                                                                         \u2502\r\n\u2502   248 \u2502   loss_total = 0.0                                                                       \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502 C:\\Users\\newpc_53bcer\\Documents\\Lora\\kohya_ss\\venv\\lib\\site-packages\\accelerate\\accelerator.py:5 \u2502\r\n\u2502 48 in _inner                                                                                     \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502    545 \u2502   \u2502   \u2502   \u2502   )                                                                         \u2502\r\n\u2502    546 \u2502   \u2502                                                                                     \u2502\r\n\u2502    547 \u2502   \u2502   def _inner(*args, **kwargs):                                                      \u2502\r\n\u2502 \u2771  548 \u2502   \u2502   \u2502   return PartialState().on_main_process(function)(*args, **kwargs)              \u2502\r\n\u2502    549 \u2502   \u2502                                                                                     \u2502\r\n\u2502    550 \u2502   \u2502   return _inner                                                                     \u2502\r\n\u2502    551                                                                                           \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502 C:\\Users\\newpc_53bcer\\Documents\\Lora\\kohya_ss\\venv\\lib\\site-packages\\accelerate\\accelerator.py:2 \u2502\r\n\u2502 031 in init_trackers                                                                             \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502   2028 \u2502   \u2502   \u2502   \u2502   if getattr(tracker_init, \"requires_logging_directory\"):                   \u2502\r\n\u2502   2029 \u2502   \u2502   \u2502   \u2502   \u2502   # We can skip this check since it was done in `__init__`              \u2502\r\n\u2502   2030 \u2502   \u2502   \u2502   \u2502   \u2502   self.trackers.append(                                                 \u2502\r\n\u2502 \u2771 2031 \u2502   \u2502   \u2502   \u2502",
    "url": "https://github.com/pytorch/pytorch/issues/102939",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-04T23:13:41Z",
    "updated_at": "2023-06-05T15:28:14Z",
    "user": "NeVeREire"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 275,
    "title": "web search hallucination and prompt results",
    "body": "Hello, great job building web search module. Just a few things i noticed using it for the past hours.\r\n1- It does connect to the web perfectly.\r\n2- It tend to take only the first page result and not contextualize enough the data, trying to mix it with the model data and it ends up destroying the final output. So maybe should take the first 3 results to do a summary.\r\n3- Takes time, maybe it's ok, but I think making sure that it takes less time might be good, but it's not critical at this stage.\r\n4- Various output from serp api : as serp api allows to get not only text result but also video and maps, would be cool to allow the end user for example to prompt \"give me the best yoga video tutorials\" and get a reply with shortcuts and/or small views on maybe 3 youtube vid . The best real case doing that is on perplexity ai , you can check with a request.\r\n5- Maps can be book. \"what is the best itineray from x to y location\" result prompting using google map query. and same of air tickets with google flights.\r\n\r\nJust a few options and reco from a fan, great job again, I know you already did a lot.",
    "url": "https://github.com/huggingface/chat-ui/issues/275",
    "state": "open",
    "labels": [],
    "created_at": "2023-06-02T23:09:11Z",
    "updated_at": "2023-06-05T08:36:41Z",
    "comments": 1,
    "user": "Billyroot"
  },
  {
    "repo": "huggingface/peft",
    "number": 537,
    "title": "Where is the PeftModel weights stored?",
    "body": "## expect behavior\r\nI am going to check if the model (mt0-xxl [13B](https://huggingface.co/bigscience/mt0-xxl)) weights have been updated. \r\n\r\nCould you tell me how to check the weights of the model original before using peft?\r\nHow to check loaded Lora Module weights when using the peft?\r\n## script\r\nmodified from [this file](https://github.com/huggingface/peft/blob/main/examples/conditional_generation/peft_lora_seq2seq_accelerate_ds_zero3_offload.py#L71)\r\n```python\r\nmodel = AutoModelForSeq2SeqLM.from_pretrained(model_name_or_path)\r\nmodel.enable_input_require_grads()\r\nmodel.gradient_checkpointing_enable()\r\n.....\r\n\r\n\r\n    for epoch in range(num_epochs):\r\n        with TorchTracemalloc() as tracemalloc:\r\n            model.train()\r\n            accelerator.print('train epoch{}'.format(epoch))\r\n            total_loss = 0\r\n            for step, batch in enumerate(tqdm(train_dataloader)):\r\n                outputs = model(**batch, use_cache=False) # dsj\r\n                # outputs = model(**batch) # dsj\r\n                loss = outputs.loss\r\n                # loss.requires_grad=True # dsj\r\n                total_loss += loss.detach().float()\r\n                \r\n==== =========>>pdb.set_trace()   # where I pdb\r\n```\r\n## debug process\r\n```\r\n(Pdb) model.module.base_model.model.encoder.block[0].layer[0].SelfAttention.q\r\nLinear(\r\n  in_features=4096, out_features=4096, bias=False\r\n  (lora_dropout): ModuleDict(\r\n    (default): Dropout(p=0.1, inplace=False)\r\n  )\r\n  (lora_A): ModuleDict(\r\n    (default): Linear(in_features=4096, out_features=8, bias=False)\r\n  )\r\n  (lora_B): ModuleDict(\r\n    (default): Linear(in_features=8, out_features=4096, bias=False)\r\n  )\r\n)\r\n(Pdb) model.module.base_model.model.encoder.block[0].layer[0].SelfAttention.q.weight\r\nParameter containing:\r\ntensor([], device='cuda:0', dtype=torch.bfloat16)\r\n\r\n(Pdb) model.module.base_model.model.encoder.block[0].layer[0].SelfAttention.q.lora_A.default.weight\r\nParameter containing:\r\ntensor([], device='cuda:0', dtype=torch.bfloat16, requires_grad=True)\r\n```",
    "url": "https://github.com/huggingface/peft/issues/537",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-02T09:10:09Z",
    "updated_at": "2023-07-10T15:03:40Z",
    "user": "dsj96"
  },
  {
    "repo": "pytorch/data",
    "number": 1177,
    "title": "what is the right way to serialize DataLoader2 so that pipeline with shuffle can resume from the right place?",
    "body": "### \ud83d\udc1b Describe the bug\n\nI tried all these versions, the only version that worked was the last one, but it's too hacky. Is there a better way? \r\n\r\n```py\r\n    dp = IterableWrapper(list(range(20)))\r\n    dp = dp.shuffle()\r\n    items = []\r\n    rs = InProcessReadingService()\r\n    dl = DataLoader2(dp, reading_service=rs)\r\n    iter1 = iter(dl)\r\n    for _ in range(4):\r\n        next(iter1)\r\n\r\n    # 16 elements left in dl\r\n    state = dl.state_dict()\r\n    dl2 = DataLoader2.from_state(state, reading_service=rs)\r\n    # assert len(list(dl2)) == 20 - 4  # got 20\r\n\r\n    dp2 = deserialize_datapipe(serialize_datapipe(dl.datapipe))\r\n    # assert len(list(dp2)) == 20 - 4 # got 20\r\n\r\n    dp3 = deserialize_datapipe(serialize_datapipe(dl.datapipe))\r\n    _simple_graph_snapshot_restoration(dp3, dp3._number_of_samples_yielded)\r\n    ret3 = list(dp3)\r\n    assert len(ret3) == 20 - 4\r\n    # but content is not the same\r\n\r\n    dl4 = DataLoader2.from_state(state, reading_service=rs)\r\n    _simple_graph_snapshot_restoration(dl4.datapipe, dl.datapipe._number_of_samples_yielded)\r\n    ret4 = list(dl4)\r\n    assert len(ret4) == 20 - 4\r\n    # but content is not the same\r\n\r\n    dp5 = deserialize_datapipe(serialize_datapipe(dl.datapipe))\r\n    pipes = get_all_pipes(dp5)\r\n    for pipe in pipes:\r\n        if isinstance(pipe, ShufflerIterDataPipe):\r\n            buffer_cache = pipe._buffer[:]\r\n            assert len(buffer_cache) == 20 - 4\r\n            rng_state = pipe._rng.getstate()\r\n    _simple_graph_snapshot_restoration(dp5, dl.datapipe._number_of_samples_yielded)\r\n    dp5._buffer = buffer_cache[:]\r\n    dp5._rng.setstate(rng_state)\r\n    it5 = iter(dp5)\r\n    ret5 = list(it5)\r\n    assert len(ret5) == 20 - 4\r\n\r\n    expected = list(iter1)\r\n    # ret5 is the only method that worked\r\n    # assert ret3 == expected\r\n    # assert ret4 == expected\r\n    assert ret5 == expected\r\n\r\n```\n\n### Versions\n\n```\r\nPyTorch version: 2.0.0a0+gite9ebda2\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.0\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 20.04.3 LTS (x86_64)\r\nGCC version: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0\r\nClang version: 12.0.1 (https://github.com/conda-forge/clangdev-feedstock d44358f44aef33e9fa7c5f93e2481ee8f1a04ab6)\r\nCMake version: version 3.19.1\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:10)  [GCC 10.3.0] (64-bit runtime)\r\nPython platform: Linux-5.4.0-64-generic-x86_64-with-glibc2.10\r\nIs CUDA available: False\r\nCUDA runtime version: 12.0.140\r\nGPU models and configuration: Could not collect\r\nNvidia driver version: Could not collect\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: False\r\n\r\nVersions of relevant libraries:\r\n[pip3] mypy-extensions==1.0.0\r\n[pip3] mypy-protobuf==3.3.0\r\n[pip3] numpy==1.23.5\r\n[pip3] pytorch3d==0.6.2\r\n[pip3] torch==2.0.1+1684801906.cuda120.cudnn891.nccl218.ap\r\n[pip3] torch-mlir==1684442443\r\n[pip3] torch-scatter==2.1.0\r\n[pip3] torch-tb-profiler==0.4.1\r\n[pip3] torchdata==0.7.0.dev20230601\r\n[pip3] torchfile==0.1.0\r\n[pip3] torchvision==0.15.1a0+42759b1\r\n[conda] magma-cuda121             2.6.1                         1    pytorch\r\n[conda] mkl                       2020.4             h726a3e6_304    conda-forge\r\n[conda] mkl-include               2023.1.0         h84fe81f_48680    conda-forge\r\n[conda] numpy                     1.23.5           py38h7042d01_0    conda-forge\r\n[conda] pytorch3d                 0.6.2                    pypi_0    pypi\r\n[conda] torch                     2.0.1+1684801906.cuda120.cudnn891.nccl218.ap          pypi_0    pypi\r\n[conda] torch-mlir                1684442443               pypi_0    pypi\r\n[conda] torch-scatter             2.1.0                    pypi_0    pypi\r\n[conda] torch-tb-profiler         0.4.1                    pypi_0    pypi\r\n[conda] torchfile                 0.1.0                    pypi_0    pypi\r\n[conda] torchvision               0.15.1a0+42759b1          pypi_0    pypi\r\n```",
    "url": "https://github.com/meta-pytorch/data/issues/1177",
    "state": "open",
    "labels": [],
    "created_at": "2023-06-02T06:52:14Z",
    "updated_at": "2023-06-08T17:31:18Z",
    "comments": 2,
    "user": "zhengwy888"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 273,
    "title": "Documentation about how to configure custom model endpoints is missing",
    "body": "It seems it has been removed in https://github.com/huggingface/chat-ui/commit/fae93d9fc3be9a39d8efd9ab9993dea13f0ae844.",
    "url": "https://github.com/huggingface/chat-ui/issues/273",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2023-06-01T19:37:44Z",
    "updated_at": "2023-06-19T08:59:15Z",
    "comments": 4,
    "user": "djmaze"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 102718,
    "title": "How to support AMD GPU on Mac",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nMy computer is running macOS, with intel9900k cpu and amd Rx6600xt gpu. \r\nCan I build to support this gpu?\r\n\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/102718",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-01T09:03:42Z",
    "updated_at": "2024-06-21T14:05:02Z",
    "user": "Aiden-Dong"
  },
  {
    "repo": "pytorch/benchmark",
    "number": 1707,
    "title": "How to execute with docker?",
    "body": "I'm using ARG BASE_IMAGE=ghcr.io/pytorch/torchbench:latest \r\nbut I am having problems with this container.\r\nor should use ghcr.io/pytorch:pytorch-nightly or [ghcr.io/pytorch:pytorch-nightly](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch)",
    "url": "https://github.com/pytorch/benchmark/issues/1707",
    "state": "closed",
    "labels": [],
    "created_at": "2023-06-01T07:43:32Z",
    "updated_at": "2023-06-13T03:31:41Z",
    "user": "johnnynunez"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1078,
    "title": "[SAM] Split encoder and mask decoder into separate .onnx files",
    "body": "### Feature request\r\n\r\nCurrently, exporting SAM models with optimum results in a single .onnx file (https://huggingface.co/Xenova/sam-vit-base/tree/main/onnx). It would be great if we could add an option to separate the encoder and decoder into separate onnx files (like traditional seq2seq models).\r\n\r\nExample SAM exports for which this has been done:\r\n- https://huggingface.co/visheratin/segment-anything-vit-b/tree/main\r\n- https://huggingface.co/visheratin/segment-anything-vit-l/tree/main\r\n- https://huggingface.co/visheratin/segment-anything-vit-h/tree/main\r\n\r\n### Motivation\r\n\r\nThe primary motivation for this feature request is to reuse the encoded image (which should only be computed once), and then use the decoder for querying. At the moment, users would have to encode the image each time they wish to perform a query.\r\n\r\nThis would be great for Transformers.js.\r\n\r\n### Your contribution\r\n\r\nI can integrate this into Transformers.js once it's available.",
    "url": "https://github.com/huggingface/optimum/issues/1078",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-31T10:47:19Z",
    "updated_at": "2023-08-24T16:05:39Z",
    "comments": 8,
    "user": "xenova"
  },
  {
    "repo": "pytorch/data",
    "number": 1175,
    "title": "Mux with MPRS causes operations after sharding_round_robin_dispatcher to run on the same worker",
    "body": "### \ud83d\udcda The doc issue\n\nThis doesn't seem to be mentioned in the docs, but if you have two datapipes that use `sharding_round_robin_dispatcher` and then `mux` them together:\r\n1. Any steps between `sharding_round_robin_dispatcher` and `mux` will take place on the same worker process.\r\n2. Only the steps after the `mux` will take place on separate workers.\r\n\r\nFor example, with the below graph, the `Mapper` nodes in between the `ShardingRoundRobinDispatcher` nodes and `Multiplexer` run on the same worker process. The `Mapper` node after `Multiplexer` will run across multiple processes as they're fed data in a round-robin fashion.\r\n![image](https://github.com/pytorch/data/assets/3038603/2b59dbbf-0068-4253-bac7-1a1b27962eaf)\r\n\r\nMy incorrect expectation was that the dispatching process would distribute data to worker processes immediately after `sharding_round_robin_dispatch` as usual, and then everything after `mux` would take place on either one or multiple worker processes.\r\n\n\n### Suggest a potential alternative/fix\n\nThe documentation for `Multiplexer`, `ShardingRoundRobinDispatcher`, and/or `MultiProcessingReadingService` should be updated to clarify what the intended behavior is here.",
    "url": "https://github.com/meta-pytorch/data/issues/1175",
    "state": "open",
    "labels": [],
    "created_at": "2023-05-30T20:36:43Z",
    "updated_at": "2023-05-31T07:48:21Z",
    "comments": 3,
    "user": "JohnHBrock"
  },
  {
    "repo": "pytorch/data",
    "number": 1174,
    "title": "Support for proper Distributed & Multiprocessing Sharding",
    "body": "### \ud83d\ude80 The feature\r\n\r\nIn MPI-based training, each process is independent from each other. Each training process might want to speed up dataloading using multiprocessing (MP). This requires data sharding to take place on two levels:\r\n\r\nA. On a distributed level, usually resulting in big(ger) shards.\r\nB. On a MP level later on, further splitting those big shards among worker processes.\r\n\r\nWhile (A.) might potentially shard on a coarser, logical scale (e.g. on years or months if working with climatological data), (B.) might potentially shard directly on already loaded data (e.g. on indices of the previous shards).\r\n\r\nRight now, combining distributed & MP sharding in torchdata faces two hurdles that need addressing:\r\n\r\n1. Due to optional check in , there can only be a single `sharding_pipe()`. This check however does not take into account if a sharding pipe only operates on a specific sharding group / priority. This issue is already tracked by https://github.com/pytorch/data/issues/1082. A simple fix for this is to drop the check all together.\r\n2. torchdata assumes a single sharding (and distribution) model: Namely that distributed & MP shards are on the same logical level and that those are distributed in a round-robin fashion to worker processes. This is enforced in https://github.com/pytorch/data/blame/main/torchdata/dataloader2/utils/worker.py#L82 which prevents more general sharding strategies.\r\n\r\nOverall, these two hurdles need addressing via monkey patching at the moment to enable more general sharding strategies (see motivation for an use case and example of such a strategy). https://github.com/sehoffmann/atmodata/blob/6a7c2974a5de1354a7156d427bf53899fc6c0177/atmodata/patching.py shows what patches need to be done.\r\nSpecifically:\r\n- The check in `apply_sharding()` needs to be removed\r\n- `process_init_fn()` should call `apply_sharding()` on the whole pipe, not only on non-dispatching branches.\r\n- `pipe.repeat(n_workers).sharding_round_robin_dispatch()` needs to be used as a workaround to distribute the same shard to all workers. For this, an additional pipe should be introduced (just `dispatch()`).\r\n\r\nInstead of having to monkey-patch, torchdata should be less restrictive wrt. sharding and distribution strategies.\r\n\r\n### Motivation, pitch\r\n\r\nI'm working with climatological timeseries data on the terabyte scale. The sharding strategy and MP strategy that, in my humble opinion, makes the most sense for this use case looks like this:\r\n\r\n1. Shard (distributed) across the time-dimension on a logical level. Single shards could e.g. represent a single month, be contained in a single file, and be multiple gigabytes in size. These shards are pre loaded by the main process via network and in parallel.\r\n2. The **same** shard is distributed to each worker process via shared memory (to reduce memory overhead). E.g. each worker process sees the same shard/month. Now this \"super-shard\" is sharded further among worker processes by accessing only a subset of the indices. The time-resolution could e.g. be 1h.\r\n3. Batches from individual workers are aggregated by the main thread again.\r\n\r\nOverall, this pipelines roughly looks like this:\r\n\r\n```\r\n# Main Thread - Pre-loading\r\nmonths = IterableWrapper([\"1979-Jan\", \"1979-Feb\", ..., \"2020-Dec\"])\r\npipe = months.shuffle().sharding_filter(DISTRIBUTED)\r\npipe = pipe.load_data().prefetch()\r\npipe = pipe.repeat(n_workers).round_robin_dispatch()\r\n\r\n# Worker Process\r\npipe = pipe.unroll_indices() # -> yields (idx, data) tuples where data is the whole shard and idx are akin to enumerate()\r\npipe = pipe.shuffle().sharding_filter(MULTIPROCESSING)\r\npipe = pipe.do_work_on_sample()\r\npipe = pipe.batch()\r\n\r\n# Main Thread - Post-process\r\npipe = pipe.non_replicable()  # non-replicable No-Op pipeline to force transfer to main thread\r\npipe = pipe.post_process()\r\n```\r\n\r\n#### Why can't individual worker processes operate independently on the same shards as in (1.), i.e. months?\r\nShards can be fairly big in size. If every worker would operate on independent shards then memory consumption might explode. Furthermore, worker processes might compete for shared network IO bandwidth. Also, depending on the shard size, there are potentially not that many shards in the dataset. This would then imposes a maximum on the number of GPUs for training.\r\n\r\n#### Why can't you reduce the shard size then? E.g. weeks instead of months\r\nWe are cropping timeseries from those shards. We thus always have some data waste at the end (or start) of each shard from which we can't crop. Reducing the shard size would increase the amount of data we would need to throw away. Furthermore, loading a few big shards via network is much more efficient than loading many small shards, and we want to utilize our network interface as much as possible for maximum throughput.\r\n\r\n#### Why can't you shard directly on index level and then distribut in a round-robin fashion?\r\nThis would be horrendously slow.\r\n\r\nOverall, the difficulties with this kind ",
    "url": "https://github.com/meta-pytorch/data/issues/1174",
    "state": "open",
    "labels": [],
    "created_at": "2023-05-30T16:33:59Z",
    "updated_at": "2023-05-30T16:40:35Z",
    "comments": 0,
    "user": "sehoffmann"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2355,
    "title": "\ud83d\udca1 [REQUEST] - Write a tutorial about how to leverage AMX with PyTorch on the 4th Gen of Xeon",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\n\nThe 4th Generation Intel\u00ae Xeon\u00ae Scalable Processor platform is an unique, scalable platform optimized for different workloads acceleration on AI. The new built-in AI acceleration engine, Intel\u00ae Advanced Matrix Extensions (AMX) is able to accelerate a variety of AI Inference and Training workloads (NLP, recommendation systems, image recognition\u2026) with BF16 and INT8 datatype.\r\n\r\nPyTorch has enabled AMX support for computation intensive operators, e.g. Conv2d, ConvTranspose2d, Linear, MatMul, bmm with `torch.bfloat16` datatype and int8 on the quantization backend. It is better to write a tutorial to tell users how to leverage AMX on PyTorch.\n\n### Existing tutorials on this topic\n\n_No response_\n\n### Additional context\n\nWe aim to complete the document as part of PyTorch Docathon 2023. cc @jgong5 @XiaobingSuper @sanchitintel @ashokei @jingxu10 @ZailiWang @ZhaoqiongZ @leslie-fang-intel @Xia-Weiwen @sekahler2 @CaoE @zhuhaozhe @Valentine233 @sekyondaMeta @svekars @carljparker @NicolasHug @kit1980 @subramen @caoe",
    "url": "https://github.com/pytorch/tutorials/issues/2355",
    "state": "closed",
    "labels": [
      "docathon-h1-2023",
      "advanced",
      "intel"
    ],
    "created_at": "2023-05-30T03:02:23Z",
    "updated_at": "2023-11-02T19:30:05Z",
    "user": "mingfeima"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 3602,
    "title": "What is the default for VAE option?",
    "body": "If \"VAE\" is not specified for \"Stable Diffusion,\" what is the default applied?",
    "url": "https://github.com/huggingface/diffusers/issues/3602",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-29T15:42:19Z",
    "updated_at": "2023-06-08T10:30:27Z",
    "user": "Michi-123"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 322,
    "title": "I have a Whisper-based model. How can I convert it to fairseq.dict format ?",
    "body": "model https://huggingface.co/openai/whisper-large-v2",
    "url": "https://github.com/pytorch/android-demo-app/issues/322",
    "state": "open",
    "labels": [],
    "created_at": "2023-05-29T08:52:30Z",
    "updated_at": "2023-05-29T09:00:13Z",
    "user": "Roland-Du"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 125,
    "title": "[Question] Why running transformer in js is faster than python?",
    "body": "I created a repo to test how to use transformers.\r\nhttps://github.com/pitieu/huggingface-transformers\r\n\r\nI was wondering why is it that running the same models in javascript is faster than running them in python?\r\nIs `Xenova/vit-gpt2-image-captioning` optimized somehow compared to `nlpconnect/vit-gpt2-image-captioning` ?\r\n\r\nI run it on my MAC M1.",
    "url": "https://github.com/huggingface/transformers.js/issues/125",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-28T05:23:05Z",
    "updated_at": "2023-07-16T17:21:39Z",
    "user": "pitieu"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 258,
    "title": "ONNX has just become twice as fast as before. Can SafeTensors also achieve that?",
    "body": "Here are some announcements and technical details. It's nice to see that they are making significant improvements. Could some of that be useful and implemented for SafeTensors?\r\n\r\nhttps://devblogs.microsoft.com/directx/dml-stable-diffusion/\r\nhttps://www.tomshardware.com/news/nvidia-geforce-driver-promises-doubled-stable-diffusion-performance\r\nhttps://build.microsoft.com/en-US/sessions/47fe414f-97b8-4b71-ae9e-be9602713667\r\n\r\n![image](https://github.com/huggingface/safetensors/assets/121736447/6c4b83ad-416f-4809-99f1-dd6481292cbc)",
    "url": "https://github.com/huggingface/safetensors/issues/258",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-27T12:23:01Z",
    "updated_at": "2023-06-07T09:26:24Z",
    "comments": 2,
    "user": "WEBPerformace"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5906,
    "title": "Could you unpin responses version?",
    "body": "### Describe the bug\n\nCould you unpin [this](https://github.com/huggingface/datasets/blob/main/setup.py#L139) or move it to test requirements? This is a testing library and we also use it for our tests as well. We do not want to use a very outdated version.\n\n### Steps to reproduce the bug\n\ncould not install this library due to dependency conflict.\n\n### Expected behavior\n\ncan install datasets\n\n### Environment info\n\nlinux 64",
    "url": "https://github.com/huggingface/datasets/issues/5906",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-26T20:02:14Z",
    "updated_at": "2023-05-30T17:53:31Z",
    "comments": 0,
    "user": "kenimou"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2352,
    "title": "\ud83d\udca1 [REQUEST] - Port TorchRL `Pendulum` tutorial from pytorch.org/rl to pytorch.org/tutorials",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\n\nFor historical reasons, TorchRL privately hosts a bunch of tutorials.\r\nWe'd like to bring the most significant ones to pytorch tutorials for more visibility.\r\n\r\nHere is the [tutorial](https://github.com/pytorch/rl/blob/main/tutorials/sphinx-tutorials/pendulum.py).\r\n\r\nEnvironments (or simulators) are a core part of many RL algorithms. The OpenAI Gym API has had a great success in the past years and paved the way for RL researchers to quickly test ideas with an easy-to-use tool.\r\nAs a PyTorch-first library, torchrl aims at being (1) oblivious to the simulator (gym or other), (2) rely on pytorch for anything we can in the simulation process, (3) a good integration within the library and (4) a coverage of many different types of environments (simulators, real-life hardware, model-based, RLHF etc). For these reasons, TorchRL propose its own class of environments. We have a dedicated tutorial that covers their design and usage: you can help us port it where it belongs!\r\n\r\nSteps:\r\n\r\n1. Port the tutorial from the RL repo to the tutorials repo.\r\n2. Fix any formatting issues or typos.\r\n3. Make sure the tutorial follows the tutorial template ([template_tutorial.py](https://github.com/pytorch/tutorials/blob/main/beginner_source/template_tutorial.py))\r\n4. Preserve the original author\n\n### Existing tutorials on this topic\n\n_No response_\n\n### Additional context\n\nThe tutorial should not require extra dependencies beyond those already present in requirements.txt\n\ncc @nairbv @sekyondaMeta @svekars @carljparker @NicolasHug @kit1980 @subramen @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @ZailiWang @ZhaoqiongZ @leslie-fang-intel @Xia-Weiwen @sekahler2 @CaoE @zhuhaozhe @Valentine233",
    "url": "https://github.com/pytorch/tutorials/issues/2352",
    "state": "closed",
    "labels": [
      "medium",
      "docathon-h2-2023"
    ],
    "created_at": "2023-05-26T19:50:31Z",
    "updated_at": "2023-11-09T20:47:06Z",
    "comments": 4,
    "user": "vmoens"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2351,
    "title": "\ud83d\udca1 [REQUEST] - Port TorchRL \"Coding a DDPG loss\" from pytorch.org/rl to pytorch.org/tutorials",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\n\nFor historical reasons, TorchRL privately hosts a bunch of tutorials.\r\nWe'd like to bring the most significant ones to pytorch tutorials for more visibility.\r\n\r\nHere is the [tutorial](https://github.com/pytorch/rl/blob/main/tutorials/sphinx-tutorials/coding_ddpg.py).\r\nTorchRL splits down what is commonly referred to as Agents in other frameworks into various pieces that echo what can be found in other domains: data collection, datasets, transforms and losses. A dedicated class named LossModule covers this last functionality. We have a tutorial that instructs users on how to build and use such classes, you can help us port it to pytorch tutorials!\r\n\r\nSteps:\r\n\r\n1. Port the tutorial from the RL repo to the tutorials repo.\r\n2. Fix any formatting issues or typos.\r\n3. Make sure the tutorial follows the tutorial template ([template_tutorial.py](https://github.com/pytorch/tutorials/blob/main/beginner_source/template_tutorial.py))\r\n4. Preserve the original author\n\n### Existing tutorials on this topic\n\n_No response_\n\n### Additional context\n\nThe tutorial should not require extra dependencies beyond those already present in requirements.txt\n\ncc @nairbv",
    "url": "https://github.com/pytorch/tutorials/issues/2351",
    "state": "closed",
    "labels": [
      "docathon-h1-2023",
      "medium"
    ],
    "created_at": "2023-05-26T19:45:04Z",
    "updated_at": "2023-06-13T16:15:45Z",
    "comments": 2,
    "user": "vmoens"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2350,
    "title": "~PyTorch Docathon H1 2023~",
    "body": "# \ud83c\udf89 It's a wrap! \ud83c\udf89\r\n\r\nSee our [leaderboard](https://github.com/pytorch/tutorials/blob/main/docathon-leaderboard.md) and [blog post](https://pytorch.org/blog/docathon-h1-2023-wrap-up/). Thank you to  everyone who contributed and congrats to the winners! \r\n\r\nWe have a large backlog of issues that we want to address and it's a great opportunity for you to start contributing to PyTorch. We have limited this docathon to the [pytorch/tutorials](https://github.com/pytorch/tutorials) and [pytorch/examples](https://github.com/pytorch/examples) repositories, so please work on the issues from these two repositories.\r\n\r\n# Date and location \r\n**WHEN:** The docathon starts on May 31st 10 AM PST. Please do not work on tasks until then. We will continue accepting new submissions until 5 PM PST on June 11th.\r\n**WHERE:** Virtual\r\n**WHAT:** Issues with the **docathon-h1-2023** label - will be posted on May 31.\r\n\r\nWatch our intro video to learn more details about the event.\r\n\r\n[![Watch the docathon intro](https://github-production-user-asset-6210df.s3.amazonaws.com/5317992/242342554-2a0d5489-0f16-4db0-b3c7-67a9ada9abe6.png)](https://youtu.be/qNAZtYowAM0)\r\n\r\n# Can everyone participate?\r\n\r\nWe encourage everyone to consider participating in the docathon but there are a few things we expect from the participants:\r\n\r\n- You must have a GitHub account and know how to use Git and GitHub, how to submit or rebase your PR on the latest main branch, how to fork or clone the repo, how to view errors in the CI and troubleshoot. We reserve the right to reject incorrectly submitted PRs.\r\n- You must be familiar with Python, the basics of Machine Learning, and have at least a basic knowledge of PyTorch. Familiarity with Sphinx, sphinx-gallery, and reStructuredText is a plus.\r\n\r\nBefore you start contributing make sure to read [Linux Foundation Code of Conduct](https://events.linuxfoundation.org/about/code-of-conduct/).\r\n\r\n# What contributions are we looking for?\r\n\r\nAll issues for this docathon are tagged with the **docathon-h1-2023** label. Please note that contributions that address other issues won't be counted. We are primarily looking for the following contributions: \r\n\r\n**NOTE:** Please avoid working on issues with **intel**, **amd**, and **nvidia** labels which are reserved for our partners.\r\n\r\n- Bug fixes in the [pytorch/tutorials](https://github.com/pytorch/tutorials) repo tagged with the docathon-h1-2023 label - see [the list](https://github.com/pytorch/tutorials/issues?q=is%3Aopen+is%3Aissue+label%3Adocathon-h1-2023).\r\n- New examples in the [pytorch/examples](https://github.com/pytorch/examples) repo tagged with the docathon-h1-2023 label - see [the issue](https://github.com/pytorch/examples/issues?q=is%3Aopen+is%3Aissue+label%3Adocathon-h1-2023). \r\n\r\n**NOTE:** Due to the large number of RSVPs, the tasks are provided on a first come first serve basis \u2014 please don't hoard the tasks!\r\n\r\n# Difficulty Levels\r\n\r\nThe issues have three levels of difficulty: **easy**, **medium**, and **advanced**. If this is your first time contributing to PyTorch, we recommend that you start with an issue that is tagged as **easy**.\r\n\r\n# How to contribute to tutorials?\r\n\r\n1. Read [pytorch/tutorials/CONTRIBUTING.md](https://github.com/pytorch/tutorials/blob/main/CONTRIBUTING.md) for general guidelines on how the submission process works and overall style and voice. \r\n2. Pick an issue that is labeled as **docathon-h1-2023**. \r\n3. In the issue, add a comment with the text /assigntome. If the issue is already assigned, please find another issue to work on. We ask that you assign one issue at a time - we want to give everyone a fair chance to participate. When you are done with one issue and get it approved, you can assign another one to yourself and start working on it.\r\n4. If you are submitting a new tutorial, use [this template](https://github.com/pytorch/tutorials/blob/main/beginner_source/template_tutorial.py).\r\n5. Fork or clone the PyTorch repository to your computer. For simple fixes, like incorrect URLs, you could use the GitHub UI as well.\r\n6. Create a branch and work on the fix.\r\n7. Test your fix by running the single tutorial locally. Don't run the whole build as it takes hours and requires a GPU. You can run one tutorial as a script python3 <tutorial-name.py> or GALLERY_PATTERN=\"neural_style_transfer_tutorial.py\" make html\r\n8. After you fix all the issues, you are ready to submit your PR.\r\n\r\n# Submit Your PR\r\n\r\n1. Submit your PR referencing the issue you've picked. For example:\r\n\r\n<img width=\"1058\" alt=\"s_pytorch_pr_example\" src=\"https://github.com/pytorch/tutorials/assets/5317992/f838571a-83d0-4908-94b6-3f7e3b200825\">\r\n \r\n3. If you have not yet, sign the Contributor License Agreement (CLA) - prompted as a check in the PR. We can't accept any PRs without a signed CLA.\r\n4. Watch for any CI errors and fix as needed - all checks must pass successfully. \r\n5. There are two ways to check the resulting HTML. For simple fixes and .rst files, you can check the ",
    "url": "https://github.com/pytorch/tutorials/issues/2350",
    "state": "closed",
    "labels": [
      "docathon-h1-2023"
    ],
    "created_at": "2023-05-26T19:09:32Z",
    "updated_at": "2023-06-20T18:59:49Z",
    "comments": 14,
    "user": "svekars"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2349,
    "title": "\ud83d\udca1 [REQUEST] - Port TorchRL `Recurrent DQN` tutorial from pytorch.org/rl to pytorch.org/tutorials",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\r\n\r\nFor historical reasons, TorchRL privately hosts a bunch of tutorials.\r\nWe'd like to bring the most significant ones to pytorch tutorials for more visibility.\r\n\r\nHere is the [tutorial](https://github.com/pytorch/rl/blob/main/tutorials/sphinx-tutorials/dqn_with_rnn.py).\r\nIn RL, we often add a RNN to a model to account for past observations when executing a policy. This of it as this: if your policy just sees a single image when playing a computer game, it will have little context about what is really happening there. If you keep a memory of past events, your performance will drastically improve. \r\nThis is useful not only in the context of Partially Observable MDPs but more broadly than that.\r\n\r\nStoring recurrent values can be tricky, and torchrl brings its own solution to this problem. This tutorial explains this.\r\n\r\nSteps:\r\n1. Port the tutorial from the RL repo to the tutorials repo.\r\n2. Fix any formatting issues or typos.\r\n3. Make sure the tutorial follows the tutorial template ([template_tutorial.py](https://github.com/pytorch/tutorials/blob/main/beginner_source/template_tutorial.py))\r\n4. Preserve the original author\r\n\r\n### Existing tutorials on this topic\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\nThe tutorial should not require extra dependencies beyond those already present in requirements.txt.\n\ncc @nairbv @sekyondaMeta @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/2349",
    "state": "closed",
    "labels": [
      "medium",
      "docathon-h2-2023"
    ],
    "created_at": "2023-05-26T16:27:51Z",
    "updated_at": "2023-11-08T16:40:10Z",
    "comments": 4,
    "user": "vmoens"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5905,
    "title": "Offer an alternative to Iterable Dataset that allows lazy loading and processing while skipping batches efficiently",
    "body": "### Feature request\r\n\r\nI would like a way to resume training from a checkpoint without waiting for a very long time when using an iterable dataset.\r\n\r\n### Motivation\r\n\r\nI am training models on the speech-recognition task. I have very large datasets that I can't comfortably store on a disk and also quite computationally intensive audio processing to do. As a result I want to load data from my remote when it is needed and perform all processing on the fly.\r\n\r\nI am currently using the iterable dataset feature of _datasets_. It does everything I need with one exception. My issue is that when resuming training at a step n, we have to download all the data and perform the processing of steps < n, just to get the iterable at the right step. In my case it takes almost as long as training for the same steps, which make resuming training from a checkpoint useless in practice.\r\n\r\nI understand that the nature of iterators make it probably nearly impossible to quickly resume training.\r\n\r\nI thought about a possible solution nonetheless : \r\n\r\nI could in fact index my large dataset and make it a mapped dataset. Then I could use set_transform to perform the processing on the fly. Finally, if I'm not mistaken, the _accelerate_ package allows to [skip steps efficiently](https://github.com/huggingface/accelerate/blob/a73898027a211c3f6dc4460351b0ec246aa824aa/src/accelerate/data_loader.py#L827) for a mapped dataset.\r\n\r\nIs it possible to lazily load samples of a mapped dataset ? I'm used to [dataset scripts](https://huggingface.co/docs/datasets/dataset_script), maybe something can be done there.\r\nIf not, I could do it using a plain _Pytorch_ dataset. Then I would need to convert it to a _datasets_' dataset to get all the features of _datasets_. Is it something possible ?\r\n\r\n### Your contribution\r\n\r\nI could provide a PR to allow lazy loading of mapped dataset or the conversion of a mapped _Pytorch_ dataset into a _Datasets_ dataset if you think it is an useful new feature.",
    "url": "https://github.com/huggingface/datasets/issues/5905",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-05-26T12:33:02Z",
    "updated_at": "2023-06-15T13:34:18Z",
    "comments": 1,
    "user": "bruno-hays"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2347,
    "title": "\ud83d\udca1 [REQUEST] - Tutorial on extending TorchX",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\r\n\r\nCreate a better tutorial showing how to extend torchx.\r\n\r\n### Existing tutorials on this topic\r\n\r\nhttps://pytorch.org/torchx/latest/custom_components.html\r\n\r\n### Additional context\r\n\r\n_No response_\n\ncc @msaroufim @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/2347",
    "state": "open",
    "labels": [
      "advanced",
      "module: torchx",
      "docathon-h2-2023"
    ],
    "created_at": "2023-05-25T22:32:28Z",
    "updated_at": "2023-11-19T17:51:58Z",
    "comments": 12,
    "user": "sekyondaMeta"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2346,
    "title": "\ud83d\udca1 [REQUEST] - How to use TorchServe on Vertex",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\n\nCreate a tutorial on how to use TorchServe on Vertex AI\n\n### Existing tutorials on this topic\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @msaroufim @agunapal @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/2346",
    "state": "closed",
    "labels": [
      "torchserve",
      "advanced",
      "docathon-h2-2023"
    ],
    "created_at": "2023-05-25T19:54:42Z",
    "updated_at": "2023-11-15T00:29:15Z",
    "user": "sekyondaMeta"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2345,
    "title": "\ud83d\udca1 [REQUEST] - How to use TorchServe on AWS SageMaker",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\n\nCreate a tutorial on how to use TorchServe on AWS SageMaker\n\n### Existing tutorials on this topic\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @msaroufim @agunapal @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/2345",
    "state": "open",
    "labels": [
      "torchserve",
      "advanced",
      "docathon-h2-2023"
    ],
    "created_at": "2023-05-25T19:53:36Z",
    "updated_at": "2023-11-09T23:01:20Z",
    "user": "sekyondaMeta"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2341,
    "title": "\ud83d\udca1 [REQUEST] - How to use TorchServe Large Model Inference: walk through an example",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\r\n\r\nCreate a new tutorial showing a walk through example of TorchServe Large Model Inference\r\n\r\n### Additional context\r\n\r\nYou can find some content to use here:\r\nhttps://github.com/pytorch/serve/blob/master/docs/large_model_inference.md\r\nhttps://github.com/pytorch/serve/tree/master/examples/large_models/Huggingface_pippy\r\n\r\n\r\ncc @msaroufim @agunapal @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/2341",
    "state": "open",
    "labels": [
      "torchserve",
      "advanced",
      "docathon-h2-2023"
    ],
    "created_at": "2023-05-24T20:39:18Z",
    "updated_at": "2023-11-01T16:48:43Z",
    "user": "sekyondaMeta"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2340,
    "title": "\ud83d\udca1 [REQUEST] - How to use TorchServe: Walk through an example",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\n\nWe could use an updated tutorial/walk through example on how to use TorchServe. The closest thing we have is the TorchServe Getting Started page located [here](https://github.com/pytorch/serve/blob/master/docs/getting_started.md).\r\n\n\n### Existing tutorials on this topic\n\nTorchServe Getting started: https://github.com/pytorch/serve/blob/master/docs/getting_started.md\n\n### Additional context\n\n_No response_\n\ncc @msaroufim @agunapal @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/2340",
    "state": "open",
    "labels": [
      "torchserve",
      "advanced",
      "docathon-h2-2023"
    ],
    "created_at": "2023-05-24T20:20:52Z",
    "updated_at": "2023-11-06T20:14:07Z",
    "user": "sekyondaMeta"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 263,
    "title": "[question] Where should we discuss chat-ui roadmap?",
    "body": "Is there a forum to discuss future features?\r\n\r\nI need to implement some sort of UI component for answer references.  Something like perplexity.ai \"pills\" under the answer.\r\nI guess this is useful for others and I would like to discuss how should I implement such thing before hand.\r\n- should I use pills?\r\n- should I create a special message component?\r\n- maybe horizontal scrolling on \"facts\"/references?\r\n\r\nIs there a place for this kind of discussion?  Am I the only one with this demand?",
    "url": "https://github.com/huggingface/chat-ui/issues/263",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-24T13:17:47Z",
    "updated_at": "2023-05-26T02:22:29Z",
    "comments": 1,
    "user": "fredguth"
  },
  {
    "repo": "pytorch/xla",
    "number": 5063,
    "title": "How can I use the flash attention in pytorch/xla GPU mode?",
    "body": "## \u2753 Questions and Help\r\nHello, [Flash Attention](https://arxiv.org/abs/2205.14135) is a method to produce tiled and fused kernels such that the tiled parameters can fit onto the device SRAM.\r\n\r\nMay I ask to what degree this technique has been applied to pytorch/XLA?\r\n\r\nAnd How do I use the `flash attention` library in Pytorch/XLA GPU mode?\r\n\r\nAnd How do I use the similar third_party custom operators libraries?\r\n\r\nThanks.\r\n\r\nResources\r\n\r\nTriton [example implementation](https://github.com/openai/triton/blob/main/python/tutorials/06-fused-attention.py)\r\nhttps://github.com/HazyResearch/flash-attention\r\nhttps://github.com/lucidrains/flash-attention-jax",
    "url": "https://github.com/pytorch/xla/issues/5063",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-24T08:42:40Z",
    "updated_at": "2025-04-30T13:04:03Z",
    "user": "wbmc"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1069,
    "title": "llama-7b inference report Failed to allocate memory for requested buffer of size 180355072",
    "body": "### System Info\r\n\r\n```shell\r\noptimum 1.8.5, 32g v100\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n@JingyaHuang\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\n```\r\nmodel_id = \"my finetund llama-7b\"\r\ntokenizer = LlamaTokenizer.from_pretrained(model_id)\r\nmodel = ORTModelForCausalLM.from_pretrained(model_id, export=True)\r\n\r\n# Load the optimization configuration detailing the optimization we wish to apply\r\noptimization_config = AutoOptimizationConfig.O3(for_gpu=True)\r\noptimizer = ORTOptimizer.from_pretrained(model)\r\noptimizer.optimize(save_dir=save_dir, optimization_config=optimization_config)\r\n\r\nmodel = ORTModelForCausalLM.from_pretrained(save_dir,provider=\"CUDAExecutionProvider\")\r\n```\r\n\r\n### Expected behavior\r\n\r\nSuccessfully loaded and ready for generation. \r\nBut it gives \r\n```\r\nRuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Exception during initialization: \r\n/onnxruntime_src/onnxruntime/core/framework/bfc_arena.cc:368 void* \r\nonnxruntime::BFCArena::AllocateRawInternal(size_t, bool, onnxruntime::Stream*, bool, \r\nonnxruntime::WaitNotificationFn) Failed to allocate memory for requested buffer of size 180355072\r\n```\r\nI guess this is actually OOM? It seems that fp16 onnx conversion has some issue. But with fp32, two llama-7b model(normal and with_past) is too big for a single card. Is there any solution for this? i don'y see any multi-gpu inference in optimum's doc.\r\n\r\n`model = ORTModelForCausalLM.from_pretrained(model_id, export=True)`\r\nI think this model is fp32? Is there a way to make this model fp16? Then maybe I don't need onnx to convert to fp16.\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/optimum/issues/1069",
    "state": "closed",
    "labels": [
      "bug",
      "onnxruntime"
    ],
    "created_at": "2023-05-23T09:50:36Z",
    "updated_at": "2023-06-19T05:05:01Z",
    "comments": 6,
    "user": "drxmy"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 258,
    "title": "Language change during chat",
    "body": "While writing in German, it answers in English. Before it always used to work...\r\nPhoto:\r\n\r\n![image](https://github.com/huggingface/chat-ui/assets/133012667/822987c2-b7fe-4eb7-9eec-ccbeb2ce8a66)\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/258",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-05-23T08:41:44Z",
    "updated_at": "2023-07-24T11:46:33Z",
    "comments": 2,
    "user": "Mbuni21"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 122,
    "title": "[Question] Basic Whisper Inference vs Speed of Demo Site",
    "body": "Hello, I love the library~ thanks for making it!\r\n\r\nI am trying to use the Whisper inference method displayed on the demo site, but it's running really slow, \r\nIt's taking me about 20 seconds to run it locally vs a few seconds on the demo site.\r\n\r\nIs there some magic behind the scenes that I'm missing?\r\n\r\nI'm just running a simple post message and listening for the updates:\r\n``` \r\nworker.postMessage({\r\n    task: 'automatic-speech-recognition',\r\n    audio: file,\r\n    generation: {\r\n       do_sample: false,\r\n       max_new_tokens: 50,\r\n       num_beams: 1,\r\n       temperature: 1,\r\n       top_k: 0\r\n    }\r\n});\r\n\r\nworker.addEventListener('message', event => {\r\n    const data = event.data;\r\n    if(data.type === 'update') {\r\n        let elem = document.getElementById(\"whisper\");\r\n        elem.value = data.data\r\n    }\r\n});\r\n```\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/122",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-23T05:55:40Z",
    "updated_at": "2023-06-10T22:41:15Z",
    "user": "jpg-gamepad"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2336,
    "title": "\ud83d\udca1 [REQUEST] - Write a Tutorial for PyTorch 2.0 Export Quantization Frontend (Quantizer and Annotation API)",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\n\nIn PyTorch 2.0, we have a new quantization path that is built on top of the graph captured by torchdynamo.export, see an example flow here: https://github.com/pytorch/pytorch/blob/main/test/quantization/pt2e/test_quantize_pt2e.py#L907, it  requires backend developers to write a quantizer, we have an existing quantizer object defined for QNNPack/XNNPack here: https://github.com/pytorch/pytorch/blob/main/torch/ao/quantization/_pt2e/quantizer/qnnpack_quantizer.py#L176.\r\n\r\nThe API that quantizer is interfacing with is called Annotation API, and we just finished design and implementation (WIP as of 05/22, but should be done this week) of this API, and would like to have a tutorial that walks through how to annotate nodes using this API.\r\n\r\nDesign Doc for Annotation API: https://docs.google.com/document/d/1tjIsL7-uVgm_1bv_kUK7iovP6G1D5zcbzwEcmYEG2Js/edit# please ping @jerryzh168 for access.\r\n\r\nGeneral Design Doc for the quantization path in pytorch 2.0: https://docs.google.com/document/d/1_jjXrdaPbkmy7Fzmo35-r1GnNKL7anYoAnqozjyY-XI/edit#\r\n\r\n\r\nWhat should the tutorial contain:\r\n1. overall introduction for pytorch 2.0 export flow, quantizer and annotation API\r\n2. how to annotate common operator patterns (https://docs.google.com/document/d/1tjIsL7-uVgm_1bv_kUK7iovP6G1D5zcbzwEcmYEG2Js/edit#heading=h.it9h4gjr7m9g), maybe use add as an example instead since bias is not properly handled in the example\r\n3. how to annotate sharing qparams operators, e.g. cat or add with two inputs sharing quantization parameters\r\n4. how to annotate fixed qparams operators, e.g. sigmoid (https://github.com/pytorch/pytorch/blob/main/torch/ao/quantization/backend_config/_common_operator_config_utils.py#L74)\r\n5. how to annotate bias for linear (DerivedQuantizationSpec)\r\n6. put everything together and play around with a toy model and check the output quantized model (after convert_pt2e)\r\n\n\n### Existing tutorials on this topic\n\nThe most relevant tutorial that we have written (by @andrewor14 ) is this:\r\n* https://pytorch.org/tutorials/prototype/backend_config_tutorial.html?highlight=fx%20graph%20mode%20quantization\n\n### Additional context\n\n_No response_\n\ncc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @ZailiWang @ZhaoqiongZ @leslie-fang-intel @Xia-Weiwen @sekahler2 @CaoE @zhuhaozhe @Valentine233",
    "url": "https://github.com/pytorch/tutorials/issues/2336",
    "state": "closed",
    "labels": [
      "docathon-h1-2023",
      "advanced",
      "intel"
    ],
    "created_at": "2023-05-22T23:14:04Z",
    "updated_at": "2023-06-09T23:16:37Z",
    "comments": 2,
    "user": "jerryzh168"
  },
  {
    "repo": "pytorch/xla",
    "number": 5043,
    "title": "graceful shutdown on TPU, the proper way to handle SIGINT / SIGTERM in TPU code (using PJRT runtime)?",
    "body": "## \u2753 Questions and Help\r\n\r\nHi,\r\n\r\nI would like to run some cleanup code (writing a final checkpoint, flushing a logger, etc) to run in the process that has `xm.is_master_ordinal() == True`.  I am using the pjrt backend.  I attempted this:\r\n\r\n```python\r\nif xm.is_master_ordinal():\r\n    signal.signal(signal.SIGINT, my_handler)\r\n```\r\n\r\nor to register it for all processes but have the `xm.is_master_ordinal()` test inside the handler.\r\n\r\nUnfortunately, I see the error that a signal handler cannot be registered except on the main thread.\r\n\r\nIs there a recommended way to accomplish graceful shutdown of a training run on TPU?\r\n\r\n```\r\n  File \"aiayn/train.py\", line 325, in main\r\n    xmp.spawn(_mp_fn, args=(resume_ckpt, hps_overrides), nprocs=None)\r\n  File \"/home/henry/miniconda3/envs/aiayn/lib/python3.8/site-packages/torch_xla/distributed/xla_multiprocessing.py\", line 386, in spawn\r\n    return pjrt.spawn(fn, nprocs, start_method, args)\r\n  File \"/home/henry/miniconda3/envs/aiayn/lib/python3.8/site-packages/torch_xla/experimental/pjrt.py\", line 365, in spawn\r\n    _run_multiprocess(spawn_fn, start_method=start_method)\r\n  File \"/home/henry/miniconda3/envs/aiayn/lib/python3.8/site-packages/torch_xla/experimental/pjrt.py\", line 92, in wrapper\r\n    return fn(*args, **kwargs)\r\n  File \"/home/henry/miniconda3/envs/aiayn/lib/python3.8/site-packages/torch_xla/experimental/pjrt.py\", line 322, in _run_multiprocess\r\n    replica_results = list(\r\n  File \"/home/henry/miniconda3/envs/aiayn/lib/python3.8/site-packages/torch_xla/experimental/pjrt.py\", line 323, in <genexpr>\r\n    itertools.chain.from_iterable(\r\n  File \"/home/henry/miniconda3/envs/aiayn/lib/python3.8/concurrent/futures/process.py\", line 484, in _chain_from_iterable_of_lists\r\n    for element in iterable:\r\n  File \"/home/henry/miniconda3/envs/aiayn/lib/python3.8/concurrent/futures/_base.py\", line 619, in result_iterator\r\n    yield fs.pop().result()\r\n  File \"/home/henry/miniconda3/envs/aiayn/lib/python3.8/concurrent/futures/_base.py\", line 444, in result\r\n    return self.__get_result()\r\n  File \"/home/henry/miniconda3/envs/aiayn/lib/python3.8/concurrent/futures/_base.py\", line 389, in __get_result\r\n    raise self._exception\r\nValueError: signal only works in main thread\r\n```\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/5043",
    "state": "open",
    "labels": [
      "question",
      "needs reproduction"
    ],
    "created_at": "2023-05-22T19:18:43Z",
    "updated_at": "2025-04-30T13:13:59Z",
    "user": "hrbigelow"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5880,
    "title": "load_dataset from s3 file system through streaming can't not iterate data ",
    "body": "### Describe the bug\n\nI have a JSON file in my s3 file system(minio), I can use load_dataset to get the file link, but I can't iterate it\r\n<img width=\"816\" alt=\"image\" src=\"https://github.com/huggingface/datasets/assets/59083384/cc0778d3-36f3-45b5-ac68-4e7c664c2ed0\">\r\n<img width=\"1144\" alt=\"image\" src=\"https://github.com/huggingface/datasets/assets/59083384/76872af3-8b3c-42ff-9f55-528c920a7af1\">\r\n\r\nwe can change 4 lines to fix this bug, you can check whether it is ok for us.\r\n<img width=\"941\" alt=\"image\" src=\"https://github.com/huggingface/datasets/assets/59083384/5a22155a-ece7-496c-8506-047e5c235cd3\">\n\n### Steps to reproduce the bug\n\n1. storage a file in you s3 file system\r\n2. use load_dataset to read it through streaming\r\n3. iterate it\n\n### Expected behavior\n\ncan iterate it successfully\n\n### Environment info\n\n- `datasets` version: 2.12.0\r\n- Platform: macOS-10.16-x86_64-i386-64bit\r\n- Python version: 3.8.16\r\n- Huggingface_hub version: 0.14.1\r\n- PyArrow version: 12.0.0\r\n- Pandas version: 2.0.1\r\n",
    "url": "https://github.com/huggingface/datasets/issues/5880",
    "state": "open",
    "labels": [],
    "created_at": "2023-05-22T07:40:27Z",
    "updated_at": "2023-05-26T12:52:08Z",
    "comments": 4,
    "user": "janineguo"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 256,
    "title": "changing model to 30B in the .env file",
    "body": "here is the model am using which is 12B i want to change to 30B:\r\ndefual one:\r\n`MODELS=`[\r\n  {\r\n    \"name\": \"OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5\",\r\n    \"datasetName\": \"OpenAssistant/oasst1\",\r\n    \"description\": \"A good alternative to ChatGPT\",\r\n    \"websiteUrl\": \"https://open-assistant.io\",\r\n    \"userMessageToken\": \"<|prompter|>\",\r\n    \"assistantMessageToken\": \"<|assistant|>\",\r\n    \"messageEndToken\": \"</s>\",`\r\n\r\n\r\nthis is what i change to:\r\n`\"name\": \"OpenAssistant/oasst-rlhf-2-llama-30b-7k-steps-xor\",\r\n    \"datasetName\": \"OpenAssistant/oasst1\",\r\n    \"description\": \"A good alternative to ChatGPT\",\r\n    \"websiteUrl\": \"https://open-assistant.io\",\r\n    \"userMessageToken\": \"<|prompter|>\",\r\n    \"assistantMessageToken\": \"<|assistant|>\",\r\n    \"messageEndToken\": \"</s>\",\r\n`\r\n\r\n\r\ni got error when i run the model/chat-ui\r\n`Model not found & Could not parse last message {\"error\":\"Task not found for this model\"}\r\nSyntaxError: Unexpected end of JSON input\r\n    at JSON.parse (<anonymous>)\r\n    at parseGeneratedText (/src/routes/conversation/[id]/+server.ts:178:32)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async saveMessage (/src/routes/conversation/[id]/+server.ts:94:26)`\r\n\r\nplz help if you know how to change the model to `30B OpenAssistant`",
    "url": "https://github.com/huggingface/chat-ui/issues/256",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-05-21T18:30:04Z",
    "updated_at": "2023-06-19T09:34:10Z",
    "comments": 5,
    "user": "C0deXG"
  },
  {
    "repo": "pytorch/xla",
    "number": 5039,
    "title": "nightly version/ kaggle tpu",
    "body": "## \u2753 Questions and Help\r\nHi I installed pytorch xla nightly on kaggle notebook tpu, it was working fine but a week ago it keeps giving this error\r\n[FileNotFoundError: [Errno 2] No such file or directory: 'gsutil']\r\n\r\n\r\n![Opera Snapshot_2023-05-21_120122_www kaggle com](https://github.com/pytorch/xla/assets/81977280/0d704aae-9378-425f-a859-d8a9a898856c)\r\n",
    "url": "https://github.com/pytorch/xla/issues/5039",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-21T09:31:40Z",
    "updated_at": "2025-04-30T13:17:50Z",
    "user": "dina-fahim103"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 119,
    "title": "[Question] A WebGPU-accelerated ONNX inference run-time",
    "body": "Is it possible to use https://github.com/webonnx/wonnx with transformersjs?\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/119",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-21T06:11:20Z",
    "updated_at": "2024-10-18T13:30:07Z",
    "user": "ansarizafar"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 255,
    "title": "how to prompt it",
    "body": "how can i prompt this model to act certain way like be `your food assistant and you will provide the best food assistant` how can i prompt it because it all around the place when i run this model :(",
    "url": "https://github.com/huggingface/chat-ui/issues/255",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-05-20T21:41:46Z",
    "updated_at": "2023-06-01T13:00:48Z",
    "comments": 1,
    "user": "C0deXG"
  },
  {
    "repo": "huggingface/setfit",
    "number": 376,
    "title": "How to get the number of parameters in a SetFitModel object?",
    "body": "The context is I would like to compare the parameter sizes of different models. Is there a way to count the model parameters in a SetFitModel object? Something like model.count_params() in keras. Thanks! ",
    "url": "https://github.com/huggingface/setfit/issues/376",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-19T23:58:53Z",
    "updated_at": "2023-12-05T14:47:55Z",
    "user": "yihangit"
  },
  {
    "repo": "pytorch/examples",
    "number": 1153,
    "title": "Just get a low accuracy of 75.8 with resnet50 on ImageNet",
    "body": "I train resnet50  on ImageNet with GPUs=8, batchsize=256, learning-rate=0.1, epochs=90, and momentum=0.90.\r\nThe attained top1 accuracy is 75.80, lower than the reported 76.15. The gap is not marginal on the large-scale ImageNet.\r\nWhy does the difference exist? ",
    "url": "https://github.com/pytorch/examples/issues/1153",
    "state": "open",
    "labels": [],
    "created_at": "2023-05-19T22:45:33Z",
    "updated_at": "2023-12-12T04:19:09Z",
    "comments": 2,
    "user": "mountain111"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 252,
    "title": "Users can't get passed \"Start Chatting\" modal - ethicsModelAcceptedAt not getting set?",
    "body": "<img width=\"836\" alt=\"image\" src=\"https://github.com/huggingface/chat-ui/assets/1438064/28a3d7f1-65e4-4b61-a82b-ffc78eb3e074\">\r\n\r\nlet me know what more info you need to debug.  just keeps redirecting back to home and never clears the modal.",
    "url": "https://github.com/huggingface/chat-ui/issues/252",
    "state": "open",
    "labels": [
      "support",
      "p2"
    ],
    "created_at": "2023-05-19T19:33:33Z",
    "updated_at": "2024-01-26T08:44:39Z",
    "comments": 7,
    "user": "cfregly"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2326,
    "title": "TorchVision Instance Segmentation Finetuning Tutorial - No module named 'torch._six'",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\n\nThe torch._six module was deprecated and removed from PyTorch starting from version 1.7.0. The code is not working because of that. How can I adjust it to make it work?\n\n### Existing tutorials on this topic\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/tutorials/issues/2326",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-19T14:41:15Z",
    "updated_at": "2023-08-04T12:00:23Z",
    "comments": 3,
    "user": "weronikawiera"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1061,
    "title": "mpt model support?",
    "body": "### Feature request\n\nCan you please add mpt model support to this library?\n\n### Motivation\n\njust testing things, and mpt seems to be unsupported by multiple huggingface libraries\n\n### Your contribution\n\nim just getting started, im not sure if ill be of any help",
    "url": "https://github.com/huggingface/optimum/issues/1061",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-19T09:28:28Z",
    "updated_at": "2023-07-06T16:37:01Z",
    "comments": 7,
    "user": "sail1369"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5875,
    "title": "Why split slicing doesn't behave like list slicing ?",
    "body": "### Describe the bug\n\nIf I want to get the first 10 samples of my dataset, I can do :\r\n\r\n```\r\nds = datasets.load_dataset('mnist', split='train[:10]')\r\n```\r\n\r\nBut if I exceed the number of samples in the dataset, an exception is raised : \r\n\r\n```\r\nds = datasets.load_dataset('mnist', split='train[:999999999]')\r\n```\r\n\r\n> ValueError: Requested slice [:999999999] incompatible with 60000 examples.\n\n### Steps to reproduce the bug\n\n```\r\nds = datasets.load_dataset('mnist', split='train[:999999999]')\r\n```\n\n### Expected behavior\n\nI would expect it to behave like python lists (no exception raised, the whole list is kept) : \r\n\r\n```\r\nd = list(range(1000))[:999999]\r\nprint(len(d))  # > 1000\r\n```\n\n### Environment info\n\n- `datasets` version: 2.9.0\r\n- Platform: macOS-12.6-arm64-arm-64bit\r\n- Python version: 3.9.12\r\n- PyArrow version: 11.0.0\r\n- Pandas version: 1.5.3",
    "url": "https://github.com/huggingface/datasets/issues/5875",
    "state": "closed",
    "labels": [
      "duplicate"
    ],
    "created_at": "2023-05-19T07:21:10Z",
    "updated_at": "2024-01-31T15:54:18Z",
    "comments": 1,
    "user": "astariul"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 101860,
    "title": "How to add/save parameters (metadata) to pytorch model",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nWhen I working on pytorch model, its difficult for me to keep variables required to run the model.\r\nIf I can add metadata to my model, I am not required to save parameters separately.\r\n\r\nSo any one knows, how to add metadata to pytorch model?  \n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/101860",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-19T07:20:06Z",
    "updated_at": "2023-05-20T05:03:08Z",
    "user": "naseemap47"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 246,
    "title": "Documentation Request - Clarity around login flow outside of HuggingFace context",
    "body": "Could the docs (if not the code) be improved to make it clear how to:\r\n\r\n- run this without requiring users to authenticate\r\n- handle authentication via a 3rd party cloud (Azure, AWS, GCP, etc)\r\n- run this with an arbitrary 3rd party model (OpenAI, Rasa, etc)\r\n\r\nI originally thought this was the purpose of `OPENID_CLIENT_ID` and `OPENID_CLIENT_SECRET`, but it seems not... (?).\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/246",
    "state": "closed",
    "labels": [
      "documentation",
      "enhancement"
    ],
    "created_at": "2023-05-19T02:57:56Z",
    "updated_at": "2023-06-01T06:26:49Z",
    "comments": 3,
    "user": "hack-r"
  },
  {
    "repo": "pytorch/xla",
    "number": 5034,
    "title": "How to recover from 'Exception in device=TPU:0' sickness without terminating session?",
    "body": "\r\n\r\n\r\nI ran all cells in the [mnist-training.ipynb](https://colab.research.google.com/github/pytorch/xla/blob/master/contrib/colab/mnist-training.ipynb) colab successfully.  However, during execution of the last cell:\r\n\r\n```python\r\ndef _mp_fn(rank, flags):\r\n  global FLAGS\r\n  FLAGS = flags\r\n  torch.set_default_tensor_type('torch.FloatTensor')\r\n  accuracy, data, pred, target = train_mnist()\r\n  if rank == 0:\r\n    # Retrieve tensors that are on TPU core 0 and plot.\r\n    plot_results(data.cpu(), pred.cpu(), target.cpu())\r\n\r\nxmp.spawn(_mp_fn, args=(FLAGS,), nprocs=FLAGS['num_cores'],\r\n          start_method='fork')\r\n```\r\n\r\nI interrupted execution before it was finished.  On trying to restart that cell, I see the following exception.  On further experimentation, the only way to recover from this situation is through:\r\n\r\n    Runtime -> Manage Sessions -> Terminate Current Session\r\n\r\nand then restart the whole thing.\r\n\r\nThe 'Restart runtime' option does not work, nor does the 'Disconnect and Delete Runtime option'\r\n\r\nWould anyone know of a faster way to recover from this sick state without completely restarting from scratch?  I've seen several issues posted about this but haven't seen a resolution.\r\n\r\n```\r\nException in device=TPU:0: INTERNAL: From /job:tpu_worker/replica:0/task:0:\r\n2 root error(s) found.\r\n  (0) INTERNAL: stream did not block host until done; was already in an error state\r\n\t [[{{node XRTExecute}}]]\r\n\t [[XRTExecute_G12]]\r\n  (1) INTERNAL: stream did not block host until done; was already in an error state\r\n\t [[{{node XRTExecute}}]]\r\n0 successful operations.\r\n0 derived errors ignored.\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch_xla/distributed/xla_multiprocessing.py\", line 334, in _mp_start_fn\r\n    _start_fn(index, pf_cfg, fn, args)\r\n  File \"/usr/local/lib/python3.10/dist-packages/torch_xla/distributed/xla_multiprocessing.py\", line 328, in _start_fn\r\n    fn(gindex, *args)\r\n  File \"<ipython-input-5-8e919fc51ff8>\", line 6, in _mp_fn\r\n    accuracy, data, pred, target = train_mnist()\r\n  File \"<ipython-input-4-0bb5e5cb92ef>\", line 130, in train_mnist\r\n    train_loop_fn(para_loader.per_device_loader(device))\r\n  File \"<ipython-input-4-0bb5e5cb92ef>\", line 106, in train_loop_fn\r\n    xm.get_ordinal(), x, loss.item(), tracker.rate(),\r\nRuntimeError: INTERNAL: From /job:tpu_worker/replica:0/task:0:\r\n2 root error(s) found.\r\n  (0) INTERNAL: stream did not block host until done; was already in an error state\r\n\t [[{{node XRTExecute}}]]\r\n\t [[XRTExecute_G12]]\r\n  (1) INTERNAL: stream did not block host until done; was already in an error state\r\n\t [[{{node XRTExecute}}]]\r\n0 successful operations.\r\n0 derived errors ignored.\r\n---------------------------------------------------------------------------\r\nProcessExitedException                    Traceback (most recent call last)\r\n[<ipython-input-5-8e919fc51ff8>](https://localhost:8080/#) in <cell line: 11>()\r\n      9     plot_results(data.cpu(), pred.cpu(), target.cpu())\r\n     10 \r\n---> 11 xmp.spawn(_mp_fn, args=(FLAGS,), nprocs=FLAGS['num_cores'],\r\n     12           start_method='fork')\r\n\r\n2 frames\r\n[/usr/local/lib/python3.10/dist-packages/torch/multiprocessing/spawn.py](https://localhost:8080/#) in join(self, timeout)\r\n    147                 )\r\n    148             else:\r\n--> 149                 raise ProcessExitedException(\r\n    150                     \"process %d terminated with exit code %d\" %\r\n    151                     (error_index, exitcode),\r\n\r\nProcessExitedException: process 0 terminated with exit code 17\r\n```",
    "url": "https://github.com/pytorch/xla/issues/5034",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-19T01:32:17Z",
    "updated_at": "2023-05-19T19:52:59Z",
    "user": "hrbigelow"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 245,
    "title": "Strange DNS Behavior",
    "body": "Apparently some part of this leverages DNS right away when you run it, but it doesn't work on any privacy-respecting DNS resolvers. I can demonstrate this via toggling firewall options, resolv.conf, or packet inspection, but I'm not sure what in the code is related to this or how to fix it.",
    "url": "https://github.com/huggingface/chat-ui/issues/245",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-19T01:19:11Z",
    "updated_at": "2023-05-19T02:53:11Z",
    "comments": 1,
    "user": "hack-r"
  },
  {
    "repo": "pytorch/examples",
    "number": 1151,
    "title": "How to run rpc/pipeline /main.py on two physical machines?",
    "body": "I want to run the Resnet on two different machines , how to run the main.py\r\nWhen i change the code by add the follow \r\n`# on rank 0\r\ndist.init_process_group(\r\n    backend = \"gloo\",\r\n    init_method = 'tcp://172.16.8.196:8864',\r\n    rank = 0,\r\n    world_size = 2\r\n)\r\n\r\n# on rank 1\r\ndist.init_process_group(\r\n    backend = \"gloo\",\r\n    init_method = 'tcp://172.16.8.196:8864',\r\n    rank = 1,\r\n    world_size = 2\r\n)`\r\nIn machine 1/2, the command is python main.py\r\nThen an error occurs, RuntimeError: Socket Timeout.\r\nHow to fix it ? ",
    "url": "https://github.com/pytorch/examples/issues/1151",
    "state": "open",
    "labels": [],
    "created_at": "2023-05-18T10:54:52Z",
    "updated_at": "2023-05-18T10:54:52Z",
    "user": "Unknown-Body"
  },
  {
    "repo": "pytorch/examples",
    "number": 1150,
    "title": "input and output",
    "body": "I really want to know how to make the format of dataset.I have 30-demension variables as input and 0-1class as output .how can I put it into the SAC model?",
    "url": "https://github.com/pytorch/examples/issues/1150",
    "state": "open",
    "labels": [],
    "created_at": "2023-05-18T10:18:59Z",
    "updated_at": "2023-05-18T10:18:59Z",
    "comments": 0,
    "user": "luzi560"
  },
  {
    "repo": "pytorch/xla",
    "number": 5022,
    "title": "torch.distributed.reduce vs torch_xla.core.xla_model.all_reduce",
    "body": "## \u2753 Questions and Help\r\nI am a bit confused here. Can we use torch_xla.core.xla_model.all_reduce in place of torch.distributed.reduce? If, yes\r\nIn torch.distributed.reduce we need a rank destination, how to change that if we use torch_xla.core.xla_model.all_reduce?",
    "url": "https://github.com/pytorch/xla/issues/5022",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2023-05-17T13:26:02Z",
    "updated_at": "2025-05-05T12:42:24Z",
    "user": "RishabhPandit-00"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1057,
    "title": "owlvit is not supported",
    "body": "### Feature request\n\nThe conversion is supported in transfomers[onnx], but not yet supported in optimum.\n\n### Motivation\n\nconvert open world vocabulary to onnx model for faster inference.\n\n### Your contribution\n\nIf there is a guideline on how to do it, I think I can help",
    "url": "https://github.com/huggingface/optimum/issues/1057",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-17T07:01:39Z",
    "updated_at": "2023-07-12T13:20:52Z",
    "comments": 11,
    "user": "darwinharianto"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5870,
    "title": "Behaviour difference between datasets.map and IterableDatasets.map",
    "body": "### Describe the bug\n\nAll the examples in all the docs mentioned throughout huggingface datasets correspond to datasets object, and not IterableDatasets object. At one point of time, they might have been in sync, but the code for datasets version >=2.9.0 is very different as compared to the docs. \r\nI basically need to .map() a transform on images in an iterable dataset, which was made using a custom databuilder config.\r\nThis works very good in map-styles datasets, but the .map() fails in IterableDatasets, show behvaiour as such:\r\n\"pixel_values\" key not found, KeyError in examples object/dict passed into transform function for map, which works fine with map style, even as batch.\r\nIn iterable style, the object/dict passed into map() paramter callable function is completely different as what is mentioned in all examples.\r\nPlease look into this. Thank you\r\n\r\nMy databuilder class is inherited as such:\r\n\r\n    def _info(self):\r\n        print (\"Config: \",self.config.__dict__.keys())\r\n        return datasets.DatasetInfo(\r\n            description=_DESCRIPTION,\r\n            features=datasets.Features(\r\n                {\r\n                    \"labels\": datasets.Sequence(datasets.Value(\"uint16\")),\r\n                    # \"labels_name\": datasets.Value(\"string\"),\r\n                    # \"pixel_values\": datasets.Array3D(shape=(3, 1280, 960), dtype=\"float32\"),\r\n                    \"pixel_values\": datasets.Array3D(shape=(1280, 960, 3), dtype=\"uint8\"),\r\n                    \"image_s3_path\": datasets.Value(\"string\"),\r\n                }\r\n            ),\r\n            supervised_keys=None,\r\n            homepage=\"none\",\r\n            citation=\"\",\r\n        )\r\n\r\n    def _split_generators(self, dl_manager):\r\n        records_train = list(db.mini_set.find({'split':'train'},{'image_s3_path':1, 'ocwen_template_name':1}))[:10000]\r\n        records_val = list(db.mini_set.find({'split':'val'},{'image_s3_path':1, 'ocwen_template_name':1}))[:1000]\r\n        # print (len(records),self.config.num_shards)\r\n        # shard_size_train = len(records_train)//self.config.num_shards\r\n        # sharded_records_train = [records_train[i:i+shard_size_train] for i in range(0,len(records_train),shard_size_train)]\r\n        # shard_size_val = len(records_val)//self.config.num_shards\r\n        # sharded_records_val = [records_val[i:i+shard_size_val] for i in range(0,len(records_val),shard_size_val)]\r\n        return [\r\n            datasets.SplitGenerator(\r\n                name=datasets.Split.TRAIN, gen_kwargs={\"records\":records_train} # passing list of records, for sharding to take over\r\n            ),\r\n            datasets.SplitGenerator(\r\n                name=datasets.Split.VALIDATION, gen_kwargs={\"records\":records_val} # passing list of records, for sharding to take over\r\n            ),\r\n        ]\r\n\r\n    def _generate_examples(self, records):\r\n        # print (\"Generating examples for [{}] shards\".format(len(shards)))\r\n        # initiate_db_connection()\r\n        # records = list(db.mini_set.find({'split':split},{'image_s3_path':1, 'ocwen_template_name':1}))[:10]\r\n        id_ = 0\r\n        # for records in shards:\r\n        for i,rec in enumerate(records):\r\n            img_local_path = fetch_file(rec['image_s3_path'],self.config.buffer_dir)\r\n            # t = self.config.processor(Image.open(img_local_path), random_padding=True, return_tensors=\"np\").pixel_values.squeeze()\r\n            # print (t.shape, type(t),type(t[0][0][0]))\r\n            # sys.exit()\r\n            pvs = np.array(Image.open(img_local_path).resize((1280,960))) # image object is wxh, so resize as per that, numpy array of it is hxwxc, transposing to cxwxh\r\n            # pvs = self.config.processor(Image.open(img_local_path), random_padding=True, return_tensors=\"np\").pixel_values.astype(np.float16).squeeze()\r\n            # print (type(pvs[0][0][0]))\r\n            lblids = self.config.processor.tokenizer('<s_class>'+rec['ocwen_template_name']+'</s_class>'+'</s>', add_special_tokens=False, padding=False, truncation=False, return_tensors=\"np\")[\"input_ids\"].squeeze(0)  # take padding later, as per batch collating\r\n            # print (len(lblids),type(lblids[0]))\r\n            # print (type(pvs),pvs.shape,type(pvs[0][0][0]), type(lblids))\r\n            yield id_, {\"labels\":lblids,\"pixel_values\":pvs,\"image_s3_path\":rec['image_s3_path']}\r\n            id_+=1\r\n            os.remove(img_local_path)\r\n\r\nand I load it inside my trainer script as such\r\n`ds = load_dataset(\"/tmp/DonutDS/dataset/\", split=\"train\", streaming=True) # iterable dataset, where .map() falls`\r\nor also as\r\n`ds = load_from_disk('/tmp/DonutDS/dataset/') #map style dataset`\r\n\r\nThank you to the team for having such a great library, and for this bug fix in advance!\n\n### Steps to reproduce the bug\n\nAbove config can allow one to reproduce the said bug\n\n### Expected behavior\n\n.map() should show some consistency b/w map-style and iterable-style datasets, or atleast the docs should address iterable-style datasets behaviour and examples. I honestly do not figur",
    "url": "https://github.com/huggingface/datasets/issues/5870",
    "state": "open",
    "labels": [],
    "created_at": "2023-05-16T14:32:57Z",
    "updated_at": "2023-05-16T14:36:05Z",
    "comments": 1,
    "user": "llStringll"
  },
  {
    "repo": "pytorch/PiPPy",
    "number": 801,
    "title": "How to run the gpt2 example on a single node with four GPU?",
    "body": "I am trying to reproduce the [gpt2 example](https://github.com/pytorch/PiPPy/tree/main/examples/hf/gpt2) in a single node without slurm for some performance metrics, but the code only provides slurm scripts. How should I modify the code to implement this example in a single node?",
    "url": "https://github.com/pytorch/PiPPy/issues/801",
    "state": "open",
    "labels": [],
    "created_at": "2023-05-16T11:49:37Z",
    "updated_at": "2023-05-16T11:49:37Z",
    "user": "lsder"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 232,
    "title": "Possible performance regression in the production model?",
    "body": "I have been using it for 5 days , it could write  simple codes for me  but now it can't ;/ ",
    "url": "https://github.com/huggingface/chat-ui/issues/232",
    "state": "closed",
    "labels": [
      "bug",
      "question"
    ],
    "created_at": "2023-05-16T08:39:19Z",
    "updated_at": "2023-09-11T09:30:26Z",
    "user": "overvalue"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 230,
    "title": "Task not found for this model",
    "body": "I tried running code on my local system and updated the model name in the .env file from \"OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5\" to \"OpenAssistant/oasst-sft-6-llama-30b-xor\" and now for every prompt I am getting \"Task not found for this model\"",
    "url": "https://github.com/huggingface/chat-ui/issues/230",
    "state": "closed",
    "labels": [
      "support"
    ],
    "created_at": "2023-05-16T05:18:25Z",
    "updated_at": "2024-12-13T01:28:06Z",
    "comments": 4,
    "user": "newway-anshul"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5868,
    "title": "Is it possible to change a cached file and 're-cache' it instead of re-generating?",
    "body": "### Feature request\n\nHi,\r\nI have a huge cached file using `map`(over 500GB), and I want to change an attribution of each element, is there possible to do it using some method instead of re-generating, because `map` takes over 24 hours\n\n### Motivation\n\nFor large datasets, I think it is very important because we always face the problem which is changing something in the original cache without re-generating it.\n\n### Your contribution\n\nFor now, I can't help, sorry.",
    "url": "https://github.com/huggingface/datasets/issues/5868",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-05-16T03:45:42Z",
    "updated_at": "2023-05-17T11:21:36Z",
    "comments": 2,
    "user": "zyh3826"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1920,
    "title": "how to convert itensor to pytorch tensor in torch-tensorrt fx mode?",
    "body": "Hi:\r\nI'm trying to create engine with custom plugin using torch-tensorrt fx. How do I convert ITensor to torch tensor?",
    "url": "https://github.com/pytorch/TensorRT/issues/1920",
    "state": "closed",
    "labels": [
      "No Activity"
    ],
    "created_at": "2023-05-15T11:52:46Z",
    "updated_at": "2023-11-24T00:02:13Z",
    "user": "shuyuan-wang"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 225,
    "title": "Special tokens for user and assistant turns?",
    "body": "Hi,\r\n\r\nI've been checking the example that used `OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5` model. This model uses the following tokens to specify the beginning of the user and assistant:\r\n\r\n```\r\n\"userMessageToken\": \"<|prompter|>\",\r\n\"assistantMessageToken\": \"<|assistant|>\"\r\n```\r\n\r\nI'm trying to run `bigcode/starcoder` model along with `bigcode/the-stack-dedup` dataset, but I'm not sure which values do those variables need for this particular model and how they influence the model's answer generation.\r\n\r\nCould you please briefly guide me into this? I'm kinda new to this.",
    "url": "https://github.com/huggingface/chat-ui/issues/225",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-15T10:32:06Z",
    "updated_at": "2023-05-15T11:06:23Z",
    "comments": 3,
    "user": "frandominguezl"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 218,
    "title": "Support for Contrastive Search?",
    "body": "Context: https://huggingface.co/blog/introducing-csearch\r\n\r\nPassing only:\r\n\r\n    \"penalty_alpha\":0.6,\r\n    \"top_k\": 4,\r\n\r\nDoes not seem to work, as truncate, and temperature is still required.  When passing this:\r\n<pre>\r\n\r\n \"parameters\": {\r\n    \"temperature\": 0.9,\r\n    \"penalty_alpha\":0.6,\r\n    \"top_k\": 4,\r\n    \"truncate\": 512,\r\n    \"max_new_tokens\": 512\r\n  }\r\n</pre>\r\n\r\npenalty_alpha seems to be ignored:\r\n\r\nGenerateParameters { best_of: None, temperature: Some(0.9), repetition_penalty: None, top_k: Some(4), top_p: None, typical_p: None, do_sample: false, max_new_tokens: 512, return_full_text: Some(false), stop: [], truncate: Some(512), watermark: false, details: false, seed: None } })\r\n\r\n",
    "url": "https://github.com/huggingface/chat-ui/issues/218",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-13T22:02:37Z",
    "updated_at": "2023-09-18T13:27:20Z",
    "comments": 2,
    "user": "PhNyx"
  },
  {
    "repo": "huggingface/setfit",
    "number": 374,
    "title": "Resolving confusion between fine-grained classes",
    "body": "My dataset has 131 classes. Some of them are fine-grained, for example:\r\n\r\n- Flag fraud on the account -> **Open Dispute**\r\n- Find out if there is a fraud hold on my debit card ->**Dispute Inquiry**\r\n\r\nThe model is getting confused between such classes. I have roughly 20 samples per class in my dataset and I am using `mpnet-base-v2` with `num_iterations=25`.  Is there a way to specify which classes to draw the negative samples from given a positive class? Should I just add more data into the confusing classes?",
    "url": "https://github.com/huggingface/setfit/issues/374",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-13T10:13:15Z",
    "updated_at": "2023-11-24T15:09:55Z",
    "user": "vahuja4"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 108,
    "title": "[Question] Problem when converting an embedding model.",
    "body": "A thirst I would like to thank everyone for providing and maintaining this library. It makes working with ML in JavaScript a breeze. \r\nI was working with the embedding models and tried to convert a multilingual model [(\"paraphrase-multilingual-MiniLM-L12-v2\")](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) for use with transformers.js. I used the flow command to do the conversion: \r\n\r\n``` \r\npython -m scripts.convert --quantize --model_id sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 --task semantic-segmentation --from_hub\r\n```\r\n\r\n\r\nBut I got the following error back: \r\n\r\n```  \r\nFile \"/opt/saturncloud/envs/saturn/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py\", line 470, in from_pretrained\r\n    raise ValueError(\r\nValueError: Unrecognized configuration class <class 'transformers.models.bert.configuration_bert.BertConfig'> for this kind of AutoModel: AutoModelForSemanticSegmentation.\r\nModel type should be one of BeitConfig, Data2VecVisionConfig, DPTConfig, MobileNetV2Config, MobileViTConfig, SegformerConfig, UperNetConfig.\r\n```  \r\n\r\nI think I am using the wrong type of task, but I am not sure. Can anyone help me with this problem at hand. \r\nThanks in advance. Falcon",
    "url": "https://github.com/huggingface/transformers.js/issues/108",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-13T09:54:12Z",
    "updated_at": "2023-05-15T17:24:16Z",
    "user": "falcon027"
  },
  {
    "repo": "huggingface/setfit",
    "number": 372,
    "title": "Update Previous Model with New Categories",
    "body": "Is there a way to add categories based on new data?\r\n\r\nFor example - Initially I trained a model with 5 categories and saved the model. I now have new data that I want to feed into the model but this new data has 8 categories. Would I have to start from scratch or can I use the original model I trained?\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/setfit/issues/372",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-12T21:22:12Z",
    "updated_at": "2023-11-24T15:10:46Z",
    "user": "ronils428"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1174,
    "title": "Add a field, and rename another one, in /opt-in-out-urls",
    "body": "The current response for /opt-in-out-urls is:\r\n\r\n```\r\n{\r\n  \"urls_columns\": [\"url\"],\r\n  \"has_urls_columns\": true,\r\n  \"num_opt_in_urls\": 0,\r\n  \"num_opt_out_urls\": 4052,\r\n  \"num_scanned_rows\": 12452281,\r\n  \"num_urls\": 12452281\r\n}\r\n```\r\n\r\nI think we should:\r\n- rename `num_urls` into `num_scanned_urls`\r\n- add `num_rows` with the total number of rows in the dataset/config/split. It would help understand which proportion of the dataset has been scanned. Note that the information is already available in `/size`, but I think it would be handy to have this information here. wdyt?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1174",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-12T13:15:40Z",
    "updated_at": "2023-05-12T13:54:14Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 207,
    "title": "MongoParseError: Invalid scheme",
    "body": "I tried to run chat-ui on my mac (Intel 2020, MacOS Ventura 13.3.1), and I get the following error: \r\n\r\n\r\n```bash\r\n(base) thibo@mac-M:~/Documents/chat-ui$ npm install \r\n\r\nadded 339 packages, and audited 340 packages in 39s\r\n\r\n72 packages are looking for funding\r\n  run `npm fund` for details\r\n\r\nfound 0 vulnerabilities\r\n(base) thibo@mac:~/Documents/chat-ui$ npm run dev\r\n\r\n> chat-ui@0.1.0 dev\r\n> vite dev\r\n\r\n(node:3340) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.\r\n(Use `node --trace-warnings ...` to show where the warning was created)\r\n(node:3340) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time\r\n\r\nForced re-optimization of dependencies\r\n\r\n  VITE v4.3.5  ready in 2136 ms\r\n\r\n  \u279c  Local:   http://localhost:5173/\r\n  \u279c  Network: use --host to expose\r\n  \u279c  press h to show help\r\n9:25:43 AM [vite] Error when evaluating SSR module /src/lib/server/database.ts:\r\n|- MongoParseError: Invalid scheme, expected connection string to start with \"mongodb://\" or \"mongodb+srv://\"\r\n    at new ConnectionString (/Users/thibo/Documents/chat-ui/node_modules/mongodb-connection-string-url/lib/index.js:86:19)\r\n    at parseOptions (/Users/thibo/Documents/chat-ui/node_modules/mongodb/lib/connection_string.js:191:17)\r\n    at new MongoClient (/Users/thibo/Documents/chat-ui/node_modules/mongodb/lib/mongo_client.js:46:63)\r\n    at eval (/src/lib/server/database.ts:7:16)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async instantiateModule (file:///Users/thibo/Documents/chat-ui/node_modules/vite/dist/node/chunks/dep-934dbc7c.js:54360:9)\r\n\r\n9:25:43 AM [vite] Error when evaluating SSR module /src/hooks.server.ts: failed to import \"/src/lib/server/database.ts\"\r\n|- MongoParseError: Invalid scheme, expected connection string to start with \"mongodb://\" or \"mongodb+srv://\"\r\n    at new ConnectionString (/Users/thibo/Documents/chat-ui/node_modules/mongodb-connection-string-url/lib/index.js:86:19)\r\n    at parseOptions (/Users/thibo/Documents/chat-ui/node_modules/mongodb/lib/connection_string.js:191:17)\r\n    at new MongoClient (/Users/thibo/Documents/chat-ui/node_modules/mongodb/lib/mongo_client.js:46:63)\r\n    at eval (/src/lib/server/database.ts:7:16)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async instantiateModule (file:///Users/thibo/Documents/chat-ui/node_modules/vite/dist/node/chunks/dep-934dbc7c.js:54360:9)\r\n\r\nMongoParseError: Invalid scheme, expected connection string to start with \"mongodb://\" or \"mongodb+srv://\"\r\n    at new ConnectionString (/Users/thibo/Documents/chat-ui/node_modules/mongodb-connection-string-url/lib/index.js:86:19)\r\n    at parseOptions (/Users/thibo/Documents/chat-ui/node_modules/mongodb/lib/connection_string.js:191:17)\r\n    at new MongoClient (/Users/thibo/Documents/chat-ui/node_modules/mongodb/lib/mongo_client.js:46:63)\r\n    at eval (/src/lib/server/database.ts:7:16)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async instantiateModule (file:///Users/thibo/Documents/chat-ui/node_modules/vite/dist/node/chunks/dep-934dbc7c.js:54360:9)\r\nMongoParseError: Invalid scheme, expected connection string to start with \"mongodb://\" or \"mongodb+srv://\"\r\n    at new ConnectionString (/Users/thibo/Documents/chat-ui/node_modules/mongodb-connection-string-url/lib/index.js:86:19)\r\n    at parseOptions (/Users/thibo/Documents/chat-ui/node_modules/mongodb/lib/connection_string.js:191:17)\r\n    at new MongoClient (/Users/thibo/Documents/chat-ui/node_modules/mongodb/lib/mongo_client.js:46:63)\r\n    at eval (/src/lib/server/database.ts:7:16)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async instantiateModule (file:///Users/thibo/Documents/chat-ui/node_modules/vite/dist/node/chunks/dep-934dbc7c.js:54360:9)\r\nMongoParseError: Invalid scheme, expected connection string to start with \"mongodb://\" or \"mongodb+srv://\"\r\n    at new ConnectionString (/Users/thibo/Documents/chat-ui/node_modules/mongodb-connection-string-url/lib/index.js:86:19)\r\n    at parseOptions (/Users/thibo/Documents/chat-ui/node_modules/mongodb/lib/connection_string.js:191:17)\r\n    at new MongoClient (/Users/thibo/Documents/chat-ui/node_modules/mongodb/lib/mongo_client.js:46:63)\r\n    at eval (/src/lib/server/database.ts:7:16)\r\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n    at async instantiateModule (file:///Users/thibo/Documents/chat-ui/node_modules/vite/dist/node/chunks/dep-934dbc7c.js:54360:9)\r\nMongoParseError: Invalid scheme, expected connection string to start with \"mongodb://\" or \"mongodb+srv://\"\r\n    at new ConnectionString (/Users/thibo/Documents/chat-ui/node_modules/mongodb-connection-string-url/lib/index.js:86:19)\r\n    at parseOptions (/Users/thibo/Documents/cha",
    "url": "https://github.com/huggingface/chat-ui/issues/207",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-12T07:32:22Z",
    "updated_at": "2023-05-12T08:26:39Z",
    "comments": 1,
    "user": "thiborose"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 101246,
    "title": "Tool for identifying where in eager model an operation is nondeterministic",
    "body": "### \ud83d\udc1b Describe the bug\n\nLet's say you have a model code and when you run it twice you get bitwise different results. Where did it diverge? We can use TorchFunctionMode/TorchDispatchMode to localize where the first divergence occurred.\n\n### Versions\n\nmaster\n\ncc @mruberry @kurtamohler",
    "url": "https://github.com/pytorch/pytorch/issues/101246",
    "state": "open",
    "labels": [
      "triaged",
      "module: determinism"
    ],
    "created_at": "2023-05-12T02:50:04Z",
    "updated_at": "2023-05-12T14:21:45Z",
    "user": "ezyang"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1912,
    "title": "\u2753 [Question] How to correctly convert model by using torch-tensorrt",
    "body": "## \u2753 Question\r\n\r\nHi, I am trying to convert resnet_rmac_fpn model which is used for image retrieval. I am unable to convert it to tensorrt model by using torch-tensorrt. According to debug information, some of the operators are not supported by Torch-TensorRT.\r\n\r\nHowever, if I export the model into onnx and then convert it  by using `trtexec ` command, the conversion works. Therefore, I was wondering if there are any possible ways for making this conversion possible? Here is the error prompt : \r\n\r\n```\r\nINFO: [Torch-TensorRT] - Method requested cannot be compiled end to end by Torch-TensorRT.TorchScript.\r\nUnsupported operators listed below:\r\n  - profiler::_record_function_exit._RecordFunction(__torch__.torch.classes.profiler._RecordFunction _0) -> ()\r\n  - aten::linalg_vector_norm(Tensor self, Scalar ord=2, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor\r\n  - prim::PythonOp(...) -> ...\r\n  - profiler::_record_function_enter_new(str name, str? args=None) -> __torch__.torch.classes.profiler._RecordFunction\r\n\r\nDEBUG: [Torch-TensorRT] - Unsupported operator: aten::linalg_vector_norm(Tensor self, Scalar ord=2, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor\r\n/usr/local/lib/python3.8/dist-packages/torch/functional.py(1519): norm\r\n/usr/local/lib/python3.8/dist-packages/torch/_tensor.py(647): norm\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/functional.py(4665): normalize\r\n/codebase/Deep_Image_Retrieval/dirtorch/nets/rmac_resnet.py(8): l2_normalize\r\n/codebase/Deep_Image_Retrieval/dirtorch/nets/rmac_resnet.py(68): forward\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py(1520): _slow_forward\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py(1533): _call_impl\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/data_parallel.py(169): forward\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py(1520): _slow_forward\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py(1533): _call_impl\r\n/usr/local/lib/python3.8/dist-packages/torch/jit/_trace.py(1056): trace_module\r\n/usr/local/lib/python3.8/dist-packages/torch/jit/_trace.py(794): trace\r\nbenchmark.py(71): create_torchtrt_model\r\nbenchmark.py(110): benchmark_torchtrt_model\r\nbenchmark.py(132): <module>\r\n\r\nDEBUG: [Torch-TensorRT] - Unsupported operator: prim::PythonOp(...) -> ...\r\n/usr/local/lib/python3.8/dist-packages/torch/autograd/function.py(506): apply\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/scatter_gather.py(27): scatter_map\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/scatter_gather.py(31): scatter_map\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/scatter_gather.py(44): scatter\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/scatter_gather.py(52): scatter_kwargs\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/data_parallel.py(178): scatter\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/data_parallel.py(161): forward\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py(1520): _slow_forward\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py(1533): _call_impl\r\n/usr/local/lib/python3.8/dist-packages/torch/jit/_trace.py(1056): trace_module\r\n/usr/local/lib/python3.8/dist-packages/torch/jit/_trace.py(794): trace\r\nbenchmark.py(71): create_torchtrt_model\r\nb\r\nenchmark.py(110): benchmark_torchtrt_model\r\nbenchmark.py(132): <module>\r\n\r\nDEBUG: [Torch-TensorRT] - Unsupported operator: profiler::_record_function_exit._RecordFunction(__torch__.torch.classes.profiler._RecordFunction _0) -> ()\r\n/usr/local/lib/python3.8/dist-packages/torch/_ops.py(316): __call__\r\n/usr/local/lib/python3.8/dist-packages/torch/autograd/profiler.py(507): __exit__\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/data_parallel.py(169): forward\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py(1520): _slow_forward\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py(1533): _call_impl\r\n/usr/local/lib/python3.8/dist-packages/torch/jit/_trace.py(1056): trace_module\r\n/usr/local/lib/python3.8/dist-packages/torch/jit/_trace.py(794): trace\r\nbenchmark.py(71): create_torchtrt_model\r\nbenchmark.py(110): benchmark_torchtrt_model\r\nbenchmark.py(132): <module>\r\n\r\nDEBUG: [Torch-TensorRT] - Unsupported operator: profiler::_record_function_enter_new(str name, str? args=None) -> __torch__.torch.classes.profiler._RecordFunction\r\n/usr/local/lib/python3.8/dist-packages/torch/_ops.py(504): __call__\r\n/usr/local/lib/python3.8/dist-packages/torch/autograd/profiler.py(492): __enter__\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/data_parallel.py(151): forward\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py(1520): _slow_forward\r\n/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py(1533): _call_impl\r\n/usr/local/lib/python3.8/dist-packages/torch/jit/_trace.py(1056): trace_module\r\n/usr/local/lib/python3.8/dist-packages/torch/jit/_trace.p",
    "url": "https://github.com/pytorch/TensorRT/issues/1912",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-05-11T18:40:58Z",
    "updated_at": "2023-08-21T00:02:10Z",
    "user": "HtutLynn"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 202,
    "title": "Help wanted: Installing `@huggingface` package from NPM registry",
    "body": "\ud83d\udc4b\ud83c\udffb \r\n\r\nSorry if I am opening a dumb issue but I was just looking into fixing some UI issues and not entirely sure how to run this project locally. I've created a `.env.local` with:\r\n```\r\nMONGODB_URL= \r\nHF_ACCESS_TOKEN=XXX\r\n```\r\nHaven't actually set the `MONGODB_URL` but did create an access token for HF.\r\n\r\nRunning into the following error when running `yarn`\r\n```\r\nyarn install v1.22.11\r\ninfo No lockfile found.\r\nwarning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.\r\n[1/4] \ud83d\udd0d  Resolving packages...\r\nerror Couldn't find package \"@huggingface/shared@*\" required by \"@huggingface/inference@^2.2.0\" on the \"npm\" registry.\r\ninfo Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.\r\n```\r\nI suppose I need a secret or something for Yarn to be able to fetch that package from a different registry than NPM?\n\n\n**use NPM instead of Yarn?**\r\nYes, I've also tried using NPM, ran into the same issue.\r\n\r\nAgain sorry if I am mistaking the readme and doing things wrong.\r\n\r\nThanks! \ud83d\udc4b\ud83c\udffb ",
    "url": "https://github.com/huggingface/chat-ui/issues/202",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-11T17:38:24Z",
    "updated_at": "2023-05-12T11:07:10Z",
    "comments": 5,
    "user": "eertmanhidde"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5841,
    "title": "Abusurdly slow on iteration",
    "body": "### Describe the bug\n\nI am attempting to iterate through an image dataset, but I am encountering a significant slowdown in the iteration speed. In order to investigate this issue, I conducted the following experiment:\r\n\r\n\r\n```python\r\na=torch.randn(100,224)\r\na=torch.stack([a] * 10000)\r\na.shape\r\n\r\n# %%\r\nds=Dataset.from_dict({\"tensor\":a})\r\nfor i in tqdm(ds.with_format(\"numpy\")):\r\n    pass\r\n\r\nfor i in tqdm(ds.with_format(\"torch\")):\r\n    pass\r\n```\r\nI noticed that the dataset in numpy format performs significantly faster than the one in torch format. My hypothesis is that the dataset undergoes a transformation process of torch->python->numpy(torch) in the background, which might be causing the slowdown. Is there any way to expedite the process by bypassing such transformations?\r\n\r\nFurthermore, if I increase the size of a to an image shape, like:\r\n```python\r\na=torch.randn(3,224,224)\r\n```\r\nthe iteration speed becomes absurdly slow, around 100 iterations per second, whereas the speed with numpy format is approximately 250 iterations per second. This level of speed would be unacceptable for large image datasets, as it could take several hours just to iterate through a single epoch.\n\n### Steps to reproduce the bug\n\n ```python\r\na=torch.randn(100,224)\r\na=torch.stack([a] * 10000)\r\na.shape\r\n\r\n# %%\r\nds=Dataset.from_dict({\"tensor\":a})\r\nfor i in tqdm(ds.with_format(\"numpy\")):\r\n    pass\r\n\r\nfor i in tqdm(ds.with_format(\"torch\")):\r\n    pass\r\n```\n\n### Expected behavior\n\niteration faster\n\n### Environment info\n\n - `datasets` version: 2.11.0\r\n- Platform: Linux-5.4.0-148-generic-x86_64-with-glibc2.10\r\n- Python version: 3.8.16\r\n- Huggingface_hub version: 0.13.4\r\n- PyArrow version: 11.0.0\r\n- Pandas version: 2.0.0",
    "url": "https://github.com/huggingface/datasets/issues/5841",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-11T08:04:09Z",
    "updated_at": "2023-05-15T15:38:13Z",
    "comments": 4,
    "user": "fecet"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1046,
    "title": "Make torchvision optional?",
    "body": "### Feature request\n\nCurrently torchvision is a required dependency\r\n\r\nhttps://github.com/huggingface/optimum/blob/22e4fd6de3ac5e7780571570f962947bd8777fd4/setup.py#L20\n\n### Motivation\n\nI only work on text so I don't need vision support\n\n### Your contribution\n\nI am sure the change would be more difficult than just \"remove the line from the setup.py\" file but if you have other suggestions how to tackle the removal, I am happy to help.",
    "url": "https://github.com/huggingface/optimum/issues/1046",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-10T10:49:18Z",
    "updated_at": "2023-05-12T23:05:46Z",
    "comments": 4,
    "user": "BramVanroy"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5838,
    "title": "Streaming support for `load_from_disk`",
    "body": "### Feature request\n\nSupport for streaming datasets stored in object stores in `load_from_disk`. \n\n### Motivation\n\nThe `load_from_disk` function supports fetching datasets stored in object stores such as `s3`. In many cases, the datasets that are stored in object stores are very large and being able to stream the data from the buckets becomes essential.\n\n### Your contribution\n\nI'd be happy to contribute this feature if I could get the guidance on how to do so.",
    "url": "https://github.com/huggingface/datasets/issues/5838",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-05-10T06:25:22Z",
    "updated_at": "2024-10-28T14:19:44Z",
    "comments": 12,
    "user": "Nilabhra"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1898,
    "title": "\u2753 [Question] is there any example on how to convert T5 model that compatible with huggingace's generate function?",
    "body": "## \u2753 Question\r\n\r\nis there any example on how to convert T5 model that is compatible with huggingface's generate function? and able to handle dynamic shapes ?.\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1898",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-05-09T18:51:06Z",
    "updated_at": "2023-08-20T00:02:15Z",
    "user": "dathudeptrai"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5834,
    "title": "Is uint8 supported?",
    "body": "### Describe the bug\n\nI expect the dataset to store the data in the `uint8` data type, but it's returning `int64` instead.\r\nWhile I've found that `datasets` doesn't yet support float16 (https://github.com/huggingface/datasets/issues/4981), I'm wondering if this is the case for other data types as well.\r\nIs there a way to store vector data as `uint8` and then upload it to the hub?\n\n### Steps to reproduce the bug\n\n```python\r\nfrom datasets import Features, Dataset, Sequence, Value\r\nimport numpy as np\r\n\r\ndataset = Dataset.from_dict(\r\n    {\"vector\": [np.array([0, 1, 2], dtype=np.uint8)]}, features=Features({\"vector\": Sequence(Value(\"uint8\"))})\r\n).with_format(\"numpy\")\r\n\r\nprint(dataset[0][\"vector\"].dtype)\r\n```\n\n### Expected behavior\n\nExpected: `uint8`\r\nActual: `int64`\n\n### Environment info\n\n- `datasets` version: 2.12.0\r\n- Platform: macOS-12.1-x86_64-i386-64bit\r\n- Python version: 3.8.12\r\n- Huggingface_hub version: 0.12.1\r\n- PyArrow version: 11.0.0\r\n- Pandas version: 1.5.3",
    "url": "https://github.com/huggingface/datasets/issues/5834",
    "state": "closed",
    "labels": [],
    "created_at": "2023-05-09T17:31:13Z",
    "updated_at": "2023-05-13T05:04:21Z",
    "comments": 5,
    "user": "ryokan0123"
  },
  {
    "repo": "pytorch/xla",
    "number": 4994,
    "title": "Different Graph generations",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\nThis code snippet is extracted from the AdamW optimizer. This optimizer for different ranges of learning rate and weight decay generates different graphs. This is causing unexpected compilations during the running of the application. The fix is also mentioned in the section. However, such scenarios can occur anywhere and we need a generic mechanism to make sure the same graph is generated. \r\n\r\n## To Reproduce\r\n```\r\nimport torch\r\nimport torch, random, os\r\nimport numpy as np\r\nimport torch_xla.core.xla_model as xm\r\n\r\nos.environ[\"NEURON_FRAMEWORK_DEBUG\"] = \"1\"\r\nos.environ[\"XLA_IR_DEBUG\"] = \"1\"\r\nos.environ[\"XLA_HLO_DEBUG\"]=\"1\"\r\nos.environ['XLA_USE_BF16']=\"1\"\r\nos.environ['XLA_NO_SPECIAL_SCALARS']=\"1\"\r\n\r\ndef func1():\r\n    param = torch.FloatTensor([0.001]).to(xm.xla_device())\r\n    lr = 2.9999999999999997e-06\r\n    weight_decay = 0.01\r\n    param.mul_(1 - lr * weight_decay)\r\n    print(param)\r\n\r\ndef func2():\r\n    param = torch.FloatTensor([0.001]).to(xm.xla_device())\r\n    lr = 4.6874999999999995e-08\r\n    weight_decay = 0.01\r\n    param.mul_(1 - lr * weight_decay)\r\n    print(param)\r\n\r\ndef func3():\r\n    param = torch.FloatTensor([0.001]).to(xm.xla_device())\r\n    lr = 2.9999999999999997e-06\r\n    weight_decay = 0.01\r\n    param.sub_(param * lr * weight_decay)\r\n    print(param)\r\n\r\ndef func4():\r\n    param1 = torch.FloatTensor([0.001]).to(xm.xla_device())\r\n    lr1 = 4.6874999999999995e-08\r\n    weight_decay1 = 0.01\r\n    param1.sub_(param1 * lr1 * weight_decay1)\r\n    print(param1)\r\n\r\nfunc1()\r\nfunc2()\r\nfunc3()\r\nfunc4()\r\n```\r\n\r\n<!--\r\nIt is really important for the team to have a quick repro, which requires no setup work.\r\n\r\nThe quicker is the repro to be run, the higher the chances the bug will be addressed sooner.\r\n\r\nThe best way to create quick repros is to create a Colab based on the following template:\r\n\r\n```\r\nhttps://github.com/pytorch/xla/blob/master/TROUBLESHOOTING.md#using-debug_runpy-to-collect-debug-information\r\n\r\nThings to avoid in repros is the need to download datasets which require setting up keys or other login information, like Kaggle downloads for example.\r\n\r\nAnother example are Colab which mount user's Google Drive storages.\r\n\r\nUsing a fake data generator could be a solution, in case the dataset cannot be easily downloaded without setting up credentials:\r\n\r\nhttps://github.com/pytorch/xla/blob/784b4d4f21751a54be0029a95f47d3896561c2a9/test/test_train_mp_mnist.py#L65\r\n\r\n-->\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1.\r\n2.\r\n3.\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well. Or better use the Colab template: https://github.com/pytorch/xla/blob/master/contrib/colab/issue-report.ipynb -->\r\n\r\n## Expected behavior\r\nfunc1 gives the graph:\r\n```\r\nHloModule SyncTensorsGraph.6, entry_computation_layout={(bf16[],bf16[1]{0})->(bf16[1]{0})}\r\n\r\nENTRY %SyncTensorsGraph.6 (p0: bf16[], p1: bf16[1]) -> (bf16[1]) {\r\n  %p1 = bf16[1]{0} parameter(1), frontend_attributes={neff_input_name=\"input1\"}, metadata={op_type=\"xla__device_data\" op_name=\"xla__device_data\"}\r\n  %p0 = bf16[] parameter(0), frontend_attributes={neff_input_name=\"input0\"}, metadata={op_type=\"xla__device_data\" op_name=\"xla__device_data\"}\r\n  %broadcast = bf16[1]{0} broadcast(bf16[] %p0), dimensions={}, metadata={op_type=\"aten__mul\" op_name=\"aten__mul\"}\r\n  %multiply = bf16[1]{0} multiply(bf16[1]{0} %p1, bf16[1]{0} %broadcast), metadata={op_type=\"aten__mul\" op_name=\"aten__mul\"}\r\n  ROOT %tuple = (bf16[1]{0}) tuple(bf16[1]{0} %multiply), frontend_attributes={neff_output_names=\"output0\"}\r\n}\r\n\r\n```\r\n\r\nfunc2 gives a different graph:\r\n```\r\nHloModule SyncTensorsGraph.6, entry_computation_layout={(bf16[1]{0})->(bf16[1]{0})}\r\n\r\nENTRY %SyncTensorsGraph.6 (p0: bf16[1]) -> (bf16[1]) {\r\n  %p0 = bf16[1]{0} parameter(0), frontend_attributes={neff_input_name=\"input0\"}, metadata={op_type=\"xla__device_data\" op_name=\"xla__device_data\"}\r\n  %constant = bf16[] constant(1), metadata={op_type=\"prim__Constant\" op_name=\"prim__Constant\"}\r\n  %broadcast = bf16[1]{0} broadcast(bf16[] %constant), dimensions={}, metadata={op_type=\"aten__mul\" op_name=\"aten__mul\"}\r\n  %multiply = bf16[1]{0} multiply(bf16[1]{0} %p0, bf16[1]{0} %broadcast), metadata={op_type=\"aten__mul\" op_name=\"aten__mul\"}\r\n  ROOT %tuple = (bf16[1]{0}) tuple(bf16[1]{0} %multiply), frontend_attributes={neff_output_names=\"output0\"}\r\n}\r\n```\r\n\r\nfunc3 and func4 give the same graphs:\r\n```\r\nHloModule SyncTensorsGraph.14, entry_computation_layout={(bf16[],bf16[],bf16[1]{0})->(bf16[1]{0})}\r\n\r\nENTRY %SyncTensorsGraph.14 (p0: bf16[], p1: bf16[], p2: bf16[1]) -> (bf16[1]) {\r\n  %p2 = bf16[1]{0} parameter(2), frontend_attributes={neff_input_name=\"input2\"}, metadata={op_type=\"xla__device_data\" op_name=\"xla__device_data\"}\r\n  %p1 = bf16[] parameter(1), frontend_attributes={neff_input_name=\"input1\"}, metadata={op_type=\"xla__device_data\" op_name=\"xla__device_data\"}\r\n  %broadcast.1 = bf16[1]{0} broadcast(bf16[] %p1), dimensions={}, metadata={op_ty",
    "url": "https://github.com/pytorch/xla/issues/4994",
    "state": "closed",
    "labels": [
      "question",
      "lowering"
    ],
    "created_at": "2023-05-09T07:18:12Z",
    "updated_at": "2025-05-05T12:57:35Z",
    "user": "amithrm"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 100859,
    "title": "how to calculate the macs after prune?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI use torch.nn.utils.prune as prune to prune the model, then I use torchprofile.profile_macs() to calculate the macs of Pruned_model, but I find the macs will be increase before prune.remove() to make the pruning permanent. it is normal because additional calculate wil be weight * mask.\r\nbut after I use prune.remove() to make the pruning permanent, the macs calculated by torchprofile.profile_macs() still same as the model befor prune.I use torch.nn.utils.prune as prune to prune the model, then I use torchprofile.profile_macs() to calculate the macs of Pruned_model, but I find the macs will be increase before prune.remove() to make the pruning permanent. it is normal because additional calculate wil be weight * mask.\r\nbut after I use prune.remove() to make the pruning permanent, the macs calculated by torchprofile.profile_macs() still same as the model befor prune.\r\n![2023-05-08_17-01-34](https://user-images.githubusercontent.com/38120691/236770558-5905bf8d-6c72-4de6-afef-26c373273e37.jpg)\r\n\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel",
    "url": "https://github.com/pytorch/pytorch/issues/100859",
    "state": "closed",
    "labels": [
      "oncall: quantization",
      "triaged"
    ],
    "created_at": "2023-05-08T08:06:34Z",
    "updated_at": "2023-10-05T23:32:18Z",
    "user": "machengjie321"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2313,
    "title": "how to calculate the macs after prune\uff1f",
    "body": "### \ud83d\ude80 Descirbe the improvement or the new tutorial\n\nI use torch.nn.utils.prune as prune to prune the model, then I use torchprofile.profile_macs() to calculate the macs of Pruned_model, but I find the macs will be increase before prune.remove() to  make the pruning permanent. it is normal because additional calculate wil be weight * mask.\r\nbut after I use prune.remove() to  make the pruning permanent, the macs calculated by torchprofile.profile_macs() still same as the model befor prune.\r\n![2023-05-08_17-01-34](https://user-images.githubusercontent.com/38120691/236769666-ba881425-5328-40b9-8968-df427cd7bbb0.jpg)\r\n\r\n\n\n### Existing tutorials on this topic\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/tutorials/issues/2313",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-08T08:02:31Z",
    "updated_at": "2023-05-26T20:02:13Z",
    "user": "machengjie321"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 100827,
    "title": "How to install standalone torch dynamo with pytorch1.x",
    "body": "### \ud83d\udc1b Describe the bug\n\nFor many reasons, the environment is not compatible with pytorch2.0. For example, Megatron-LM compiles its transformer operators written in C++, which confine it to the limit of torch 1.x c++ extension, otherwise many compile errors. For another example, DeepSpeed implements their distributed trainer whose components depends on triton 1 but not triton 2 to build. \r\n\r\n\n\n### Error logs\n\n_No response_\n\n### Minified repro\n\n_No response_\n\n### Versions\n\nTherefore, could you be so kind to guide me how to install torchdynamo  independently without having a torch2.0?\r\n\r\nOr, are there other ways for compilation in torch1.0? I heard of torch.jit, but someone told me that it could not speed up training. \r\n\r\nI would appreciate if there is any methods that work to speedup torch 1.x 's code with regard to fast Large Language Model training. \n\ncc @ezyang @soumith @msaroufim @wconstab @ngimel @bdhirsh @anijain2305",
    "url": "https://github.com/pytorch/pytorch/issues/100827",
    "state": "closed",
    "labels": [
      "dependency issue",
      "oncall: pt2"
    ],
    "created_at": "2023-05-07T09:55:43Z",
    "updated_at": "2023-05-07T21:50:41Z",
    "user": "2catycm"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 100800,
    "title": "[cpu inductor] where is silently incorrect when SIMD code is generated.",
    "body": "### \ud83d\udc1b Describe the bug\n\n```python\r\nimport torch\r\n\r\ninput_tensor = torch.ones(3, 3)\r\n\r\ndef f(x):\r\n    return torch.where(torch.ones_like(x).to(torch.bool), torch.zeros_like(x), torch.ones_like(x)* 2)\r\n\r\nres1 = f(input_tensor)\r\nprint(res1)\r\n\r\njit_func = torch.compile(f)\r\nres2 = jit_func(input_tensor)\r\nprint(res2)\r\n\r\n```\r\n\r\nOutput\r\n```\r\ntensor([[0., 0., 0.],\r\n        [0., 0., 0.],\r\n        [0., 0., 0.]])\r\ntensor([[2., 2., 2.],\r\n        [2., 2., 2.],\r\n        [2., 2., 0.]])\r\n```\r\n\r\nReason:\r\nImplementation of where relies on `blendv` where MSB of the mask element should be 0 for first element of the packed vector to be copied.\r\nhttps://github.com/pytorch/pytorch/blob/8d56b0a5b57cf3e82402556ceb5c7080c0f9d5b6/torch/_inductor/codegen/cpp.py#L572-L573\r\n\r\nblendv: https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-reference/2021-8/mm256-blendv-ps.html\r\n\r\nFound in https://github.com/pytorch/pytorch/pull/100799#issuecomment-1537136218\r\n\n\n### Versions\n\nmaster\n\ncc @soumith @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @desertfire",
    "url": "https://github.com/pytorch/pytorch/issues/100800",
    "state": "closed",
    "labels": [
      "triaged",
      "module: inductor"
    ],
    "created_at": "2023-05-06T13:03:01Z",
    "updated_at": "2023-05-10T02:16:14Z",
    "user": "kshitij12345"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 104,
    "title": "[Question] npm install error in windows",
    "body": "I install transformers.js with npm but I get an error:\r\n\r\n```\r\n2135 info run canvas@2.11.2 install node_modules/canvas node-pre-gyp install --fallback-to-build --update-binary\r\n2136 info run sharp@0.32.1 install node_modules/sharp (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)\r\n2137 info run sharp@0.32.1 install { code: 1, signal: null }\r\n2138 warn cleanup Failed to remove some directories [\r\n2138 warn cleanup   [\r\n2138 warn cleanup     'D:\\\\project\\\\BLOGKLIN\\\\node_modules',\r\n2138 warn cleanup     [Error: EBUSY: resource busy or locked, rmdir 'D:\\project\\BLOGKLIN\\node_modules\\canvas'] {\r\n2138 warn cleanup       errno: -4082,\r\n2138 warn cleanup       code: 'EBUSY',\r\n2138 warn cleanup       syscall: 'rmdir',\r\n2138 warn cleanup       path: 'D:\\\\project\\\\BLOGKLIN\\\\node_modules\\\\canvas'\r\n2138 warn cleanup     }\r\n2138 warn cleanup   ]\r\n2138 warn cleanup ]\r\n2139 timing reify:rollback:createSparse Completed in 4980ms\r\n2140 timing reify:rollback:retireShallow Completed in 0ms\r\n2141 timing command:i Completed in 46786ms\r\n2142 verbose stack Error: command failed\r\n2142 verbose stack     at ChildProcess.<anonymous> (C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\@npmcli\\promise-spawn\\lib\\index.js:63:27)\r\n2142 verbose stack     at ChildProcess.emit (node:events:390:28)\r\n2142 verbose stack     at maybeClose (node:internal/child_process:1064:16)\r\n2142 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)\r\n2143 verbose pkgid sharp@0.32.1\r\n2144 verbose cwd D:\\project\\BLOGKLIN\r\n2145 verbose Windows_NT 10.0.19044\r\n2146 verbose node v16.13.0\r\n2147 verbose npm  v8.7.0\r\n2148 error code 1\r\n2149 error path D:\\project\\BLOGKLIN\\node_modules\\sharp\r\n2150 error command failed\r\n2151 error command C:\\Windows\\system32\\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)\r\n2152 error sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.2/libvips-8.14.2-win32-x64.tar.br\r\n2152 error sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies\r\n2153 error sharp: Installation error: read ECONNRESET\r\n2154 verbose exit 1\r\n2155 timing npm Completed in 46886ms\r\n2156 verbose unfinished npm timer reify 1683364060656\r\n2157 verbose unfinished npm timer reify:build 1683364075028\r\n2158 verbose unfinished npm timer build 1683364075029\r\n2159 verbose unfinished npm timer build:deps 1683364075029\r\n2160 verbose unfinished npm timer build:run:install 1683364075174\r\n2161 verbose unfinished npm timer build:run:install:node_modules/canvas 1683364075175\r\n2162 verbose unfinished npm timer build:run:install:node_modules/sharp 1683364075190\r\n2163 verbose code 1\r\n2164 error A complete log of this run can be found in:\r\n2164 error     C:\\Users\\admin\\AppData\\Local\\npm-cache\\_logs\\2023-05-06T09_07_40_559Z-debug-0.log\r\n```\r\n\r\nos: windows 10\r\nnode: v16.13.0",
    "url": "https://github.com/huggingface/transformers.js/issues/104",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-06T09:13:41Z",
    "updated_at": "2023-05-06T12:48:23Z",
    "user": "DominguitoLamo"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1889,
    "title": "Multi-GPU: optimize for cuda:1 but model also gets pushed on cuda:0, why???",
    "body": "## \u2753 Question\r\n\r\nI have two GPUs in my system. When optimize my model for the cuda:1 device the model gets somehow ALSO loaded onto the cuda:0 device (probably because that's the default device?). This happends during the optimization process which is called with:\r\n`optModel = torch_tensorrt::torchscript::compile(model, compile_settings);`\r\nWith `nvidia-smi` I can clearly see that the optimization is performed on cuda:1 (as expected) as I explicitly tell to do so. Shortly before the optimization is finished the model is also loaded on cuda:0?\r\nHow can I stop the loading on cuda:0?\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - Libtorch Version: 1.10.2+cu113\r\n - CPU Architecture:\r\n - OS (e.g., Linux): Linux\r\n - CUDA version: 11.3\r\n - GPU models and configuration: both GPUs are Nvidia RTX A4000\r\n - TensorRT: 8.4.0.6\r\n - Torch-TensorRT: torch-tensorrt for libtorch-1.10.2",
    "url": "https://github.com/pytorch/TensorRT/issues/1889",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-05T11:43:50Z",
    "updated_at": "2023-07-06T15:04:44Z",
    "user": "bjaeger1"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5818,
    "title": "Ability to update a dataset",
    "body": "### Feature request\n\nThe ability to load a dataset, add or change something, and save it back to disk.\r\n\r\nMaybe it's possible, but I can't work out how to do it, e.g. this fails:\r\n\r\n```py\r\nimport datasets\r\n\r\ndataset = datasets.load_from_disk(\"data/test1\")\r\ndataset = dataset.add_item({\"text\": \"A new item\"})\r\ndataset.save_to_disk(\"data/test1\")\r\n```\r\n\r\nWith the error:\r\n```\r\nPermissionError: Tried to overwrite /mnt/c/Users/david/py/learning/mini_projects/data_sorting_and_filtering/data/test1 but a dataset can't overwrite itself.\r\n```\r\n\n\n### Motivation\n\nMy use case is that I want to process a dataset in a particular way but it doesn't fit in memory if I do it in one go. So I want to perform a loop and at each step in the loop, process one shard and append it to an ever-growing dataset. The code in the loop will load a dataset, add some rows, then save it again.\r\n\r\nMaybe I'm just thinking about things incorrectly and there's a better approach. FWIW I can't use `dataset.map()` to do the task because that doesn't work with `num_proc` when adding rows, so is confined to a single process which is too slow.\r\n\r\nThe only other way I can think of is to create a new file each time, but surely that's not how people do this sort of thing.\n\n### Your contribution\n\nna",
    "url": "https://github.com/huggingface/datasets/issues/5818",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-05-04T01:08:13Z",
    "updated_at": "2023-05-04T20:43:39Z",
    "comments": 3,
    "user": "davidgilbertson"
  },
  {
    "repo": "pytorch/data",
    "number": 1149,
    "title": "[RFC] Performance Profiling Tools",
    "body": "### \ud83d\ude80 The feature\n\n1. Store usage statistics in `Prefetcher` \r\n    - By tracking statistics within `Prefetcher`, we can reasonably determine whether upstream processes or downstream processes are faster. For example, the emptiness of the buffer queue may imply consumers are faster than producers. Users can insert this into various points in the pipeline to examine various behaviors. A common pattern we expect is to examine whether the pipeline is IO bound or compute bound.\r\n    - [ ] #1141\r\n\r\n2. `DataLoader2` main process\r\n    - `torch` profilers (e.g. `torch.profiler.profile`) currently work with `DataLoader2`, however, it only tracks functions and DataPipes that are executed within the main process. Nonetheless, we should validate that the information is helpful if most of the computations take place within the main process (e.g. using `InProcessReadingService` or dispatching process.\r\n     - After 1 is completed, we can add APIs to `DataLoader2` to fetch the relevant statistics from `Prefetcher`'s buffer, such as the one that exists at the end of the main loop. It should allow users to examine whether the model is consuming faster than the preparation of samples.\r\n    - [ ] PR pending\r\n    - [ ] Tutorial pending \r\n\r\n3. `DataLoader2` worker process profiling\r\n    - Two main options under considerations are:\r\n       1. Attaching the profiler to worker process in order to get worker level metrics/trace. This will allow us to use existing profilers without re-implementing their features.\r\n       2. `MultiprocessingReadingService` can provide methods to retrieve and aggregate metrics from certain DataPipes (mainly `Prefetcher`)\r\n\r\n4. Integration with other tools (e.g. tracers)\r\n    - We will likely want main and worker processes' to be visible within tracers (e.g. useful when integrated with TorchTNT).\n\n### Motivation, pitch\n\nThis set of tools and features aim to answer the questions:\r\n1. Is my model training bottlenecked by data loading?\r\n2. If so, which part of the pipeline? IO? Compute?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\nComments and suggestions are welcomed.",
    "url": "https://github.com/meta-pytorch/data/issues/1149",
    "state": "open",
    "labels": [
      "topic: new feature"
    ],
    "created_at": "2023-05-03T22:01:19Z",
    "updated_at": "2023-05-30T11:27:53Z",
    "comments": 3,
    "user": "NivekT"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1882,
    "title": "\u2753 [Question] Request for a model which is supported by Torch-TRT(FX)",
    "body": "## \u2753 Question\r\n\r\nI'm trying to evaluate the Torch-TensorRT tool, using FX backend for running models in the C++ library.\r\nMy goal is to convert models which are not fully supported by TRT, and accelerate them by running some of the sub-graphs on TRT(as explained by this notebook- https://github.com/pytorch/TensorRT/blob/main/examples/fx/fx2trt_example_next.py)\r\n\r\nThe steps I have already completed-\r\n- I converted a small model which is fully supported by TRT, and I received a single sub-graph as expected.\r\n  The model runs successfully using the python lib, and the C++ lib also.\r\n- I have already tried to convert the Resnet50 model, and did it successfully. But this is a fully TRT supported model.\r\n- I converted a small model with a TRT unsupported operator, so the model was divided to 3 sub-graphs.\r\n  The model runs successfully using the python Torch-TensorRT lib, and the C++ lib also.\r\n  The problem is that the Torch-TensorRT model's latency is twice bigger than the original Torch model's latency.\r\n\r\nI thought that maybe there is overhead because of the passes between sub-graphs on Torch and TRT back and forth. So I want to take a larger model, which is not fully supported by TensorRT, but still supported by Torch-TensorRT(by dividing the graph to TRT and Torch sub-grpahs, using the FX backend).\r\nI tried some models, but I can't find such a model.\r\nIs there a model that you tested the tool with?\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.0\r\n - CPU Architecture: x86-64\r\n - OS (e.g., Linux): Ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source): -\r\n - Are you using local sources or building from archives: Torch-TensorRT which has been built from sources\r\n - Python version: 3.8.10\r\n - CUDA version: 11.8\r\n - GPU models and configuration: NVIDIA T1000\r\n - Any other relevant information: -\r\n\r\n@OronG13",
    "url": "https://github.com/pytorch/TensorRT/issues/1882",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-05-03T13:53:40Z",
    "updated_at": "2023-11-17T00:02:12Z",
    "user": "DanielLevi6"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5815,
    "title": "Easy way to create a Kaggle dataset from a Huggingface dataset?",
    "body": "I'm not sure whether this is more appropriately addressed with HuggingFace or Kaggle.  I would like to somehow directly create a Kaggle dataset from a HuggingFace Dataset.\r\n\r\nWhile Kaggle does provide the option to create a dataset from a URI, that URI must point to a single file.  For example:\r\n\r\n![image](https://user-images.githubusercontent.com/5355286/235792394-7c559d07-4aff-45b7-ad2b-9c5280c88415.png)\r\n\r\n\r\nIs there some mechanism from huggingface to represent a dataset (such as that from `load_dataset('wmt14', 'de-en', split='train')` as a single file?  Or, some other way to get that into a Kaggle dataset so that I can use the huggingface `datasets` module to process and consume it inside of a Kaggle notebook?\r\n\r\nThanks in advance!\r\n",
    "url": "https://github.com/huggingface/datasets/issues/5815",
    "state": "open",
    "labels": [],
    "created_at": "2023-05-02T21:43:33Z",
    "updated_at": "2023-07-26T16:13:31Z",
    "comments": 4,
    "user": "hrbigelow"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1024,
    "title": "How to decrease inference time of LayoutXLM and LiLT models through Optimum?",
    "body": "### System Info\n\n```shell\nLast version of transformers and Optimum libraries.\n```\n\n\n### Who can help?\n\n@JingyaHuang , @echarlaix, @mi\n\n### Information\n\n- [X] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nExample with LiLT model:\r\n\r\n```\r\nfrom transformers import AutoTokenizer, AutoModelForTokenClassification\r\n\r\nmodel_id = \"pierreguillou/lilt-xlm-roberta-base-finetuned-with-DocLayNet-base-at-paragraphlevel-ml512\"\r\ntokenizer = AutoTokenizer.from_pretrained(model_id)\r\nmodel = AutoModelForTokenClassification.from_pretrained(model_id, device_map=\"auto\")\r\n\r\nfrom optimum.bettertransformer import BetterTransformer\r\nmodel = BetterTransformer.transform(model, keep_original_model=False)\r\n```\r\n\r\nError message\r\n```\r\nNotImplementedError: The model type lilt is not yet supported to be used with BetterTransformer. Feel free to open \r\nan issue at https://github.com/huggingface/optimum/issues if you would like this model type to be supported. \r\nCurrently supported models are: dict_keys(['albert', 'bart', 'bert', 'bert-generation', 'blenderbot', 'camembert', \r\n'clip', 'codegen', 'data2vec-text', 'deit', 'distilbert', 'electra', 'ernie', 'fsmt', 'gpt2', 'gptj', 'gpt_neo', \r\n'gpt_neox', 'hubert', 'layoutlm', 'm2m_100', 'marian', 'markuplm', 'mbart', 'opt', 'pegasus', 'rembert', \r\n'prophetnet', 'roberta', 'roc_bert', 'roformer', 'splinter', 'tapas', 't5', 'vilt', 'vit', 'vit_mae', 'vit_msn', \r\n'wav2vec2', 'whisper', 'xlm-roberta', 'yolos']).\r\n```\n\n### Expected behavior\n\nHi,\r\n\r\nI'm using Hugging Face libraries in order to run LayoutXLM and LiLT models.\r\nHow can I decrease inference time through Optimum? Which code to use?\r\n\r\nI've already tested BetterTransformer (Optimum) and ONNX but none of them accepts LayoutXLM and LiLT models.\r\n\r\n- BetterTransformer: \r\n  - \"NotImplementedError: The model type layoutlmv2 is not yet supported to be used with BetterTransformer.\"\r\n  - \"NotImplementedError: The model type lilt is not yet supported to be used with BetterTransformer.\"\r\n- ONNX: \r\n  - \"KeyError: 'layoutlmv2 is not supported yet.'\"\r\n  - \"KeyError: 'lilt is not supported yet.'\"\r\n\r\nCan you update the Optimum library so that `BetterTransformer() `and/or `ONNX `works on LayoutXLM and LiLT models?\r\nThank you.",
    "url": "https://github.com/huggingface/optimum/issues/1024",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2023-05-02T09:42:15Z",
    "updated_at": "2023-06-12T11:40:23Z",
    "comments": 4,
    "user": "piegu"
  },
  {
    "repo": "pytorch/kineto",
    "number": 756,
    "title": "urgent!!! profiler: Profiler is not initialized: skipping step() invocation",
    "body": "I got the warning, when using torch profiler to profiling, the steps are merged into one:\r\n[W kineto_shim.cpp:330] Profiler is not initialized: skipping step() invocation\r\n[W kineto_shim.cpp:330] Profiler is not initialized: skipping step() invocation\r\n[W kineto_shim.cpp:330] Profiler is not initialized: skipping step() invocation\r\n[W kineto_shim.cpp:330] Profiler is not initialized: skipping step() invocation\r\n[W kineto_shim.cpp:330] Profiler is not initialized: skipping step() invocation\r\n[W kineto_shim.cpp:330] Profiler is not initialized: skipping step() invocation\r\n\r\nimage\r\nimage\r\n\r\nVersions\r\nCollecting environment information...\r\nPyTorch version: 2.0.0a0+1767026\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 20.04.5 LTS (x86_64)\r\nGCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0\r\nClang version: Could not collect\r\nCMake version: version 3.24.1\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.8.10 (default, Mar 13 2023, 10:26:41) [GCC 9.4.0] (64-bit runtime)\r\nPython platform: Linux-3.10.0-1160.el7.x86_64-x86_64-with-glibc2.29\r\nIs CUDA available: True\r\nCUDA runtime version: 12.1.66\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration:\r\nGPU 0: NVIDIA A100-SXM4-80GB\r\nGPU 1: NVIDIA A100-SXM4-80GB\r\nGPU 2: NVIDIA A100-SXM4-80GB\r\nGPU 3: NVIDIA A100-SXM4-80GB\r\nGPU 4: NVIDIA A100-SXM4-80GB\r\nGPU 5: NVIDIA A100-SXM4-80GB\r\nGPU 6: NVIDIA A100-SXM4-80GB\r\nGPU 7: NVIDIA A100-SXM4-80GB\r\n\r\nNvidia driver version: 470.103.01\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.8.1\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.8.1\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.8.1\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.8.1\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.8.1\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.8.1\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.8.1\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture: x86_64\r\nCPU op-mode(s): 32-bit, 64-bit\r\nByte Order: Little Endian\r\nAddress sizes: 46 bits physical, 57 bits virtual\r\nCPU(s): 128\r\nOn-line CPU(s) list: 0-127\r\nThread(s) per core: 2\r\nCore(s) per socket: 32\r\nSocket(s): 2\r\nNUMA node(s): 2\r\nVendor ID: GenuineIntel\r\nCPU family: 6\r\nModel: 106\r\nModel name: Intel(R) Xeon(R) Platinum 8369B CPU @ 2.90GHz\r\nStepping: 6\r\nCPU MHz: 799.871\r\nCPU max MHz: 3500.0000\r\nCPU min MHz: 800.0000\r\nBogoMIPS: 5800.00\r\nVirtualization: VT-x\r\nL1d cache: 3 MiB\r\nL1i cache: 2 MiB\r\nL2 cache: 80 MiB\r\nL3 cache: 96 MiB\r\nNUMA node0 CPU(s): 0-31,64-95\r\nNUMA node1 CPU(s): 32-63,96-127\r\nVulnerability Itlb multihit: Not affected\r\nVulnerability L1tf: Not affected\r\nVulnerability Mds: Not affected\r\nVulnerability Meltdown: Not affected\r\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp\r\nVulnerability Spectre v1: Mitigation; Load fences, usercopy/swapgs barriers and __user pointer sanitization\r\nVulnerability Spectre v2: Mitigation; Enhanced IBRS, IBPB\r\nVulnerability Srbds: Not affected\r\nVulnerability Tsx async abort: Not affected\r\nFlags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 invpcid_single intel_pt ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq md_clear pconfig spec_ctrl intel_stibp flush_l1d arch_capabilities\r\n\r\nVersions of relevant libraries:\r\n[pip3] efficientnet-pytorch==0.7.1\r\n[pip3] numpy==1.22.2\r\n[pip3] pytorch-lightning==1.9.2\r\n[pip3] pytorch-quantization==2.1.2\r\n[pip3] torch==2.0.0a0+1767026\r\n[pip3] torch-accl==0.3.0\r\n[pip3] torch-tb-profiler==0.4.1\r\n[pip3] torch-tensorrt==1.4.0.dev0\r\n[pip3] torchmetrics==0.6.0\r\n[pip3] torchtext==0.13.0a0+fae8e8c\r\n[pip3] torchvision==0.15.0a0\r\n[pip3] triton==2.0.0\r\n[conda] Could not collect\r\n\r\nimage\r\n\r\nimport argparse\r\nimport nvtx\r\nfrom typing import Tuple\r\nfrom tqdm import tqdm\r\n\r\nimport torch\r\nfrom torch import nn, optim\r\nfrom torch.distributed import Backend\r\nfrom torch.nn.parallel.distributed import DistributedDataParallel\r\nfrom torch.utils.data import DataLoader, DistributedSampler\r\nfrom torchvision import datasets, transforms\r\n\r\n\r\ndef create_data_loaders(rank: int,\r\n                      ",
    "url": "https://github.com/pytorch/kineto/issues/756",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-01T23:35:54Z",
    "updated_at": "2024-04-23T15:28:55Z",
    "user": "Johnsonms"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1872,
    "title": "\u2753 [Question] How do you ....? ",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nHow to compile torch-tensorrt for NVIDIA Jetson TX2 (jetpack4.6)\r\n## What you have already tried\r\nHi, @kneatco  \r\nI have the same issue when I downlograded numpy version from 1.19.5 to 1.19.4.\r\n\r\nI did following steps.\r\n\r\n1. Downloading docker image for TX2 (jetpack=4.6)\r\n```\r\n# Pull the image\r\ndocker pull nvcr.io/nvidia/l4t-pytorch:r32.7.1-pth1.10-py3\r\n# Run the image\r\nsudo docker run -it --runtime nvidia --network host nvcr.io/nvidia/l4t-pytorch:r32.7.1-pth1.10-py3\r\n```\r\n3. Installing bazel in the container\r\n```\r\n# Download torch-tensorrt repo\r\ngit clone -b v1.1.0 https://github.com/pytorch/TensorRT.git\r\n# Install bazel\r\nexport BAZEL_VERSION=$(cat <PATH_TO_TORCHTRT_ROOT>/.bazelversion)\r\nmkdir bazel\r\ncd bazel\r\ncurl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-dist.zip\r\nunzip bazel-$BAZEL_VERSION-dist.zip\r\nbash ./compile.sh\r\ncp output/bazel /usr/local/bin/\r\n```\r\n5. Modifiying WORKSPACE as follows:\r\n```\r\nworkspace(name = \"Torch-TensorRT\")\r\n\r\nload(\"@bazel_tools//tools/build_defs/repo:http.bzl\", \"http_archive\")\r\nload(\"@bazel_tools//tools/build_defs/repo:git.bzl\", \"git_repository\")\r\n\r\nhttp_archive(\r\n    name = \"rules_python\",\r\n    sha256 = \"778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f\",\r\n    url = \"https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz\",\r\n)\r\n\r\nload(\"@rules_python//python:pip.bzl\", \"pip_install\")\r\n\r\nhttp_archive(\r\n    name = \"rules_pkg\",\r\n    sha256 = \"038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d\",\r\n    urls = [\r\n        \"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz\",\r\n        \"https://github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz\",\r\n    ],\r\n)\r\n\r\nload(\"@rules_pkg//:deps.bzl\", \"rules_pkg_dependencies\")\r\n\r\nrules_pkg_dependencies()\r\n\r\ngit_repository(\r\n    name = \"googletest\",\r\n    commit = \"703bd9caab50b139428cea1aaff9974ebee5742e\",\r\n    remote = \"https://github.com/google/googletest\",\r\n    shallow_since = \"1570114335 -0400\",\r\n)\r\n# External dependency for torch_tensorrt if you already have precompiled binaries.\r\nlocal_repository(\r\n    name = \"torch_tensorrt\",\r\n    path = \"/opt/conda/lib/python3.8/site-packages/torch_tensorrt\"\r\n)\r\n\r\n# CUDA should be installed on the system locally\r\nnew_local_repository(\r\n    name = \"cuda\",\r\n    build_file = \"@//third_party/cuda:BUILD\",\r\n    path = \"/usr/local/cuda-10.2/\",\r\n)\r\n\r\nnew_local_repository(\r\n    name = \"cublas\",\r\n    build_file = \"@//third_party/cublas:BUILD\",\r\n    path = \"/usr\",\r\n)\r\n#############################################################################################################\r\n# Tarballs and fetched dependencies (default - use in cases when building from precompiled bin and tarballs)\r\n#############################################################################################################\r\n\r\n#http_archive(\r\n#    name = \"libtorch\",\r\n#    build_file = \"@//third_party/libtorch:BUILD\",\r\n#    sha256 = \"8d9e829ce9478db4f35bdb7943308cf02e8a2f58cf9bb10f742462c1d57bf287\",\r\n#    strip_prefix = \"libtorch\",\r\n#    urls = [\"https://download.pytorch.org/libtorch/cu113/libtorch-cxx11-abi-shared-with-deps-1.11.0%2Bcu113.zip\"],\r\n#)\r\n#http_archive(\r\n#    name = \"libtorch_pre_cxx11_abi\",\r\n#    build_file = \"@//third_party/libtorch:BUILD\",\r\n#    sha256 = \"90159ecce3ff451f3ef3f657493b6c7c96759c3b74bbd70c1695f2ea2f81e1ad\",\r\n#    strip_prefix = \"libtorch\",\r\n#    urls = [\"https://download.pytorch.org/libtorch/cu113/libtorch-shared-with-deps-1.11.0%2Bcu113.zip\"],\r\n#)\r\n\r\n# Download these tarballs manually from the NVIDIA website\r\n# Either place them in the distdir directory in third_party and use the --distdir flag\r\n# or modify the urls to \"file:///<PATH TO TARBALL>/<TARBALL NAME>.tar.gz\r\n\r\n#http_archive(\r\n#    name = \"cudnn\",\r\n#    build_file = \"@//third_party/cudnn/archive:BUILD\",\r\n#    sha256 = \"0e5d2df890b9967efa6619da421310d97323565a79f05a1a8cb9b7165baad0d7\",\r\n#    strip_prefix = \"cuda\",\r\n#    urls = [\r\n#        \"https://developer.nvidia.com/compute/machine-learning/cudnn/secure/8.2.4/11.4_20210831/cudnn-11.4-linux-x64-v8.2.4.15.tgz\",\r\n#    ],\r\n#)\r\n\r\n#http_archive(\r\n#    name = \"tensorrt\",\r\n#    build_file = \"@//third_party/tensorrt/archive:BUILD\",\r\n#    sha256 = \"826180eaaecdf9a7e76116855b9f1f3400ea9b06e66b06a3f6a0747ba6f863ad\",\r\n#    strip_prefix = \"TensorRT-8.2.4.2\",\r\n#    urls = [\r\n#        \"https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/8.2.4/tars/tensorrt-8.2.4.2.linux.x86_64-gnu.cuda-11.4.cudnn8.2.tar.gz\",\r\n#    ],\r\n#)\r\n####################################################################################\r\n# Locally installed dependencies (use in cases of custom dependencies or aarch64)\r\n####################################################################################\r\n\r\n# NOTE: In the case you are using just the pre-cxx11-abi path or just the cxx11 abi path\r\n# with ",
    "url": "https://github.com/pytorch/TensorRT/issues/1872",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-05-01T13:53:19Z",
    "updated_at": "2023-05-19T18:30:16Z",
    "user": "godhj93"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1871,
    "title": "\u2753 [Question] torch.fx.proxy.TraceError: Proxy object cannot be iterated",
    "body": "## \u2753 Question\r\n\r\n\r\nI'm trying to convert an nn.Module of ASLfeat(Pytorch) to a runtime Torch-TensorRT model(for C++)\r\nThe steps I followed are the same as written in- https://github.com/pytorch/TensorRT/blob/main/examples/fx/fx2trt_example_next.py\r\n\r\nBut for some reason, the tracing step fails every time.\r\nThe error message is-\r\n`torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors`\r\n\r\nThe line which cause it is- `n_samples, n_channel, *_ = dense_feat_map.shape`\r\n\r\nThe same is happening when I'm trying to use the FasterRCNN model from torchvision.\r\nThe same error occurs because of a loop running on the input list in the model.\r\n\r\nIs there a workaround for these cases?\r\nASLfeat and FasterRCNN are complicated models which I can't convert directly to TensorRT, so Torch-TensorRT could be a very useful option for me.\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior(for FasterRCNN):\r\n\r\n1. `from torchvision.models.detection.faster_rcnn import fasterrcnn_resnet50_fpn,FasterRCNN_ResNet50_FPN_Weights`\r\n2. `model = fasterrcnn_resnet50_fpn(weights=FasterRCNN_ResNet50_FPN_Weights.DEFAULT).cuda().eval()`\r\n3. `inputs = [torch.rand((1, 300, 400), device=\"cuda\"), torch.rand((1, 500, 400), device=\"cuda\")]`\r\n4. `traced = acc_tracer.trace(model, inputs)`\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\nThe result-\r\n`Traceback (most recent call last):`\r\n`  File \"/home/Projects/Torch-TensorRT/python/trainingPath/step_7_fasterRCNNInference-X.py\", line 44, in <module>`\r\n`    traced = acc_tracer.trace(model, inputs)`\r\n`  File \"/home/Projects/Torch-TensorRT/python/venv/lib/python3.8/site-packages/torch_tensorrt/fx/tracer/acc_tracer/acc_tracer.py\",` `line 667, in trace`\r\n`    traced = rewriter_base_trace(mod, ast_rewriter_allow_list, leaf_module_list)`\r\n`  File \"/home/Projects/Torch-TensorRT/python/venv/lib/python3.8/site-packages/torch_tensorrt/fx/tracer/acc_tracer/acc_tracer.py\",` `line 585, in rewriter_base_trace`\r\n`    rewritten_graph, rewritten_mod = AccRewritingTracer().trace(`\r\n`  File \"/home/Projects/Torch-TensorRT/python/venv/lib/python3.8/site-packages/torch_tensorrt/fx/tracer/acc_tracer/acc_tracer.py\",` `line 309, in trace`\r\n`    return super().trace(rewritten, concrete_args), rewritten`\r\n`  File \"/home/Projects/Torch-TensorRT/python/venv/lib/python3.8/site-packages/torch/fx/_symbolic_trace.py\", line 778, in trace`\r\n`    (self.create_arg(fn(*args)),),`\r\n`  File \"/home/Projects/Torch-TensorRT/python/venv/lib/python3.8/site-packages/torchvision/models/detection/generalized_rcnn.py\",` `line 75, in forward`\r\n`    for img in images:`\r\n`  File \"/home/Projects/Torch-TensorRT/python/venv/lib/python3.8/site-packages/torch/fx/proxy.py\", line 385, in __iter__`\r\n`    return self.tracer.iter(self)`\r\n`  File \"/home/Projects/Torch-TensorRT/python/venv/lib/python3.8/site-packages/torch/fx/proxy.py\", line 285, in iter`\r\n`    raise TraceError('Proxy object cannot be iterated. This can be '`\r\n`torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors`\r\n\r\n## What you have already tried\r\nI also tried to use torch.jit.trace which traces the ASLfeat model successfully, but I need to trace the model using fx(because I need to convert it to a runtime model)\r\n\r\n## Expected behavior\r\n\r\nReceive a traced model, prepared for the torch-tensorrt usage.\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n\r\n-     PyTorch Version (e.g., 1.0): 2.0\r\n-     CPU Architecture: x86-64\r\n-     OS (e.g., Linux): Ubuntu 20.04\r\n-     How you installed PyTorch (conda, pip, libtorch, source): pip\r\n-     Build command you used (if compiling from source): -\r\n-     Are you using local sources or building from archives: Torch-TensorRT which has been built from sources\r\n-     Python version: 3.8.10\r\n-     CUDA version: 11.8\r\n-     GPU models and configuration: NVIDIA T1000\r\n-     Any other relevant information: -\r\n\r\n@OronG13",
    "url": "https://github.com/pytorch/TensorRT/issues/1871",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: fx"
    ],
    "created_at": "2023-05-01T11:24:21Z",
    "updated_at": "2023-08-21T00:02:11Z",
    "user": "DanielLevi6"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5809,
    "title": "wiki_dpr details for Open Domain Question Answering tasks",
    "body": "Hey guys!\r\n\r\nThanks for creating the wiki_dpr dataset!\r\n\r\nI am currently trying to combine wiki_dpr and my own datasets. but I don't know how to make the embedding value the same way as wiki_dpr.\r\n\r\nAs an experiment, I embeds the text of id=\"7\" of wiki_dpr, but this result was very different from wiki_dpr.",
    "url": "https://github.com/huggingface/datasets/issues/5809",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-30T06:12:04Z",
    "updated_at": "2023-07-21T14:11:00Z",
    "comments": 1,
    "user": "yulgok22"
  },
  {
    "repo": "pytorch/hub",
    "number": 328,
    "title": "Need help on how to contribute ",
    "body": "Hello everyone.\r\nI wanted to add simplenet architecture from 2016 which outperforms vggnets resnet18, resbet34 and the likes while being a plain CNN with 5m to 9m parameters to the pytorch hub. \r\nI read the docs but I'm a bit confused. Could you kindly help me get this sorted out?\r\n\r\nHere are my issues:\r\n1.where exactly should I put the hubconf.py in my \r\nrepository? My repository([Link](https://github.com/Coderx7/SimpleNet_Pytorch/tree/master) ) is organized like this :\r\n-cifar10\r\n-imagenet\r\n--simplenet.py\r\n--readme.md \r\n\r\nShould I add the hubconf.py at the root of the repository, or next to the model inside the imagenet directory for this to work?\r\n\r\n2.and to be clear, hubconf.py will only cobtain the functions for instantiating each model variant right? \r\nThat is one entry for simplenetv1_5m1, another for simplenetv1_5m2, and so on right? And I should only import these from my simplenet.py right? \r\n\r\n3.And then fork this repo, create a new .md file right?\r\nHow should I name that file? Should I use my real name fir owner or my GitHub handle name? i.e. coderx7_SimpleNet_Pytorch_title?\r\nWhat should I write for title here? Can I leave it out? How many characters are allowed? \r\nIs the repo name case sensitive?\r\n\r\nWhen I created all of that , I make a pull request and that's it? \r\n\r\n",
    "url": "https://github.com/pytorch/hub/issues/328",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-29T14:52:26Z",
    "updated_at": "2023-05-03T09:56:37Z",
    "user": "Coderx7"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 100293,
    "title": "How to get nn.MultiheadAttention mid layer output",
    "body": "### \ud83d\udcda The doc issue\r\n\r\nHello, I have a quetion about MultiheadAttention(short for MA). Not about the [doc explaination](https://pytorch.org/docs/stable/generated/torch.nn.MultiheadAttention.html?highlight=multiheadattention#torch.nn.MultiheadAttention), but is about using this module. I want to plot a heatmap(CAM) for my neural network based on transformer. In this process, I need to get the MA mid layer output, especially the dot product results for query-key pairs. How can I get it? If can't get it, I have to calculate the output dot product to estimate the result for the self attention layers. But this estimation may cause some errors. So do you have any idea to get the mid-layer results\uff1f\r\nI want to use `register_forward_hook`, but this module architecture output really makes me confused cause it doesn't show me the component layer that I need.\r\n```\r\n>>> print(self_attn)\r\nMultiheadAttention(\r\n  (out_proj): NonDynamicallyQuantizableLinear(in_features=768, out_features=768, bias=True)\r\n)\r\n```\r\n\r\n\r\nSo can you help me? Thank you very much!\r\n\r\n### Suggest a potential alternative/fix\r\n\r\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/100293",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-28T23:30:29Z",
    "updated_at": "2023-04-30T05:51:23Z",
    "user": "Lucky-Light-Sun"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5805,
    "title": "Improve `Create a dataset` tutorial ",
    "body": "Our [tutorial on how to create a dataset](https://huggingface.co/docs/datasets/create_dataset) is a bit misleading. \r\n1. In **Folder-based builders** section it says that we have two folder-based builders as standard builders, but we also have similar builders (that can be created from directory with data of required format) for `csv`, `json/jsonl`, `parquet` and `txt` files. We have info about these loaders in separate [guide for loading](https://huggingface.co/docs/datasets/loading#local-and-remote-files) but it's worth briefly mentioning them in the beginning tutorial because they are more common and for consistency. Would be helpful to add the link to the full guide.\r\n2. **From local files** section lists methods for creating a dataset from in-memory data which are also described in [loading guide](https://huggingface.co/docs/datasets/loading#inmemory-data).  \r\n\r\nMaybe we should actually rethink and restructure this tutorial somehow.",
    "url": "https://github.com/huggingface/datasets/issues/5805",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2023-04-28T13:26:22Z",
    "updated_at": "2024-07-26T21:16:13Z",
    "comments": 4,
    "user": "polinaeterna"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1104,
    "title": "Delete finished jobs immediately?",
    "body": "Currently, finished jobs are deleted after 7 days by an index. See https://github.com/huggingface/datasets-server/blob/259fd092c12d240d9b8d733c965c4b9362e90684/libs/libcommon/src/libcommon/queue.py#L144\r\n\r\nBut we never use the finished jobs, so:\r\n- we could delete them immediately after finishing\r\n- we could reduce the duration from 7 days to 1 hour (can be complementary to the previous action, to clean uncaught jobs)\r\n\r\nFor point 2, see https://github.com/huggingface/datasets-server/pull/1103\r\n\r\nStats:\r\n- 9.805.591 jobs\r\n- 13.345 are not finished! (0.1% of the jobs)",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1104",
    "state": "closed",
    "labels": [
      "question",
      "improvement / optimization"
    ],
    "created_at": "2023-04-28T11:49:10Z",
    "updated_at": "2023-05-31T12:20:38Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 100181,
    "title": "[Dynamo] How to better handle customized list/dict ",
    "body": "### \ud83d\udc1b Describe the bug\n\nThis is a pattern I found from Meta internal user case:\r\n```\r\nimport torch\r\nimport logging\r\nimport torch._dynamo\r\nfrom typing import Any, List, Optional\r\n\r\ntorch._logging.set_logs(dynamo=logging.DEBUG)\r\n\r\nclass _non_none_list(list):\r\n    def append(self, obj: Any):\r\n        if obj is not None:\r\n            super().append(obj)\r\n\r\n    def extend(self, lst: Optional[List[Any]]):\r\n        if lst is not None:\r\n            super().extend(x for x in lst if x is not None)\r\n\r\ndef fn(x):\r\n    a = _non_none_list()\r\n    a.append(x)\r\n    a.append(x + 1)\r\n    return torch.cat(a, dim=1)\r\n\r\nx = torch.rand(2, 2)\r\nprint(fn(x))\r\nopt_fn = torch.compile(backend=\"eager\")(fn)\r\nprint(opt_fn(x))\r\n```\r\n\r\nThere are three major graph breaks:\r\n* ```Unsupported: call_function UserDefinedClassVariable() [] {}``` when calling ```_non_none_list()```.\r\n* ```Unsupported: non-function or method super: <method 'append' of 'list' objects>``` when calling ```super().append(obj)```\r\n* ```Unsupported: call_function args: UserDefinedObjectVariable(_non_none_list) ConstantVariable(int)``` when calling ```torch.cat(a, dim=1)```.\r\n\r\nHowever, if I switch the customized list to python builtin list, there is no graph break. I'd like to know what is dynamo's story to handle customized list/dict. \n\n### Versions\n\nN/A\n\ncc @ezyang @soumith @msaroufim @wconstab @ngimel @bdhirsh @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @desertfire",
    "url": "https://github.com/pytorch/pytorch/issues/100181",
    "state": "closed",
    "labels": [
      "triaged",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2023-04-27T16:26:39Z",
    "updated_at": "2023-05-03T04:25:40Z",
    "user": "yanboliang"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1861,
    "title": "\u2753 [Question] Binding index warnings while using fx backend",
    "body": "## \u2753 Question\r\nI want to convert a torch model(from python-nn.Module) to a runtime model(in C++), using the torch.fx capabilities. That will allow me to accelerate a model that isn't fully supported by TensorRT.\r\n\r\nThe model I'm using is-\r\n`class Model(nn.Module):`\r\n`    def __init__(self):`\r\n`        super().__init__()`\r\n`        self.linear = nn.Linear(10, 10)`\r\n`        self.relu = nn.ReLU()`\r\n\r\n`    def forward(self, input_0):`\r\n`        input_0 = self.linear(input_0)`\r\n`        input_0 = self.relu(input_0)`\r\n`        input_0 = torch.linalg.norm(input_0, ord=2, dim=1)`\r\n`        output_0 = self.relu(input_0)`\r\n`        return output_0`\r\n\r\nThe compile command I'm using right after that is-\r\n`model = Model().cuda().eval()`\r\n`trt_fx_module_f = torch_tensorrt.fx.compile(`\r\n`    model, input=[torch.randn(1, 10, device=\"cuda\")], lower_precision=\"fp32\", min_acc_module_size=1, explicit_batch_dimension=True, use_experimental_fx_rt=True`\r\n`)`\r\n\r\n(I wrote it according to the response I received in torch's forums- https://discuss.pytorch.org/t/using-torchtrt-fx-backend-on-c/170639/6)\r\n\r\nBut after I'm trying to use that, so I see warnings about the binding indexes of the model. For example, here is one of the warnings-\r\n`WARNING: [Torch-TensorRT] - ICudaEngine::getProfileDimensions: bindingIndex 0 is not in profile 2. Using bindingIndex = 4 instead.`\r\n\r\nOn the other hand, when I'm using the flow as written in this notebook(on the same model)-\r\nhttps://github.com/pytorch/TensorRT/blob/main/examples/fx/fx2trt_example_next.py\r\nso the warnings are being vanished.\r\n\r\nCan you tell me what are the actual differences between these two flows?\r\n\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 2.0\r\n - CPU Architecture: x86-64\r\n - OS (e.g., Linux): Ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source): -\r\n - Are you using local sources or building from archives: Torch-TensorRT which has been built from sources\r\n - Python version: 3.8.10\r\n - CUDA version: 11.8\r\n - GPU models and configuration: NVIDIA T1000\r\n - Any other relevant information: -\r\n\r\n@OronG13",
    "url": "https://github.com/pytorch/TensorRT/issues/1861",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-04-27T13:31:59Z",
    "updated_at": "2023-08-10T00:02:37Z",
    "user": "DanielLevi6"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 102,
    "title": "How to convert Whisper Large v2",
    "body": "Hello! \r\n\r\nHow to convert whisper-large-v2 model to onnx?\r\n\r\nI'm using this command  \r\n\r\n`python3.9 -m scripts.convert --model_id whisper-large-v2 --quantize --task automatic-speech-recognition`\r\n\r\nBut when i try to connect the converted model i get the following error:\r\n`Error: File not found. Could not locate \"encoder_model.onnx\".`\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/transformers.js/issues/102",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-27T13:30:33Z",
    "updated_at": "2023-05-31T13:18:33Z",
    "user": "hotmeatballs"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5797,
    "title": "load_dataset is case sentitive?",
    "body": "### Describe the bug\n\nload_dataset() function is case sensitive?\n\n### Steps to reproduce the bug\n\nThe following two code, get totally different behavior.\r\n\r\n1. load_dataset('mbzuai/bactrian-x','en')\r\n\r\n2. load_dataset('MBZUAI/Bactrian-X','en')\n\n### Expected behavior\n\nCompare 1 and 2.\r\n1 will download all 52 subsets, shell output:\r\n```Downloading and preparing dataset json/MBZUAI--bactrian-X to xxx```\r\n2 will only download single subset, shell output\r\n```Downloading and preparing dataset bactrian-x/en to xxx```\r\n\n\n### Environment info\n\nPython 3.10.11\r\ndatasets Version: 2.11.0",
    "url": "https://github.com/huggingface/datasets/issues/5797",
    "state": "open",
    "labels": [],
    "created_at": "2023-04-26T18:19:04Z",
    "updated_at": "2023-04-27T11:56:58Z",
    "comments": 2,
    "user": "haonan-li"
  },
  {
    "repo": "huggingface/chat-ui",
    "number": 122,
    "title": "Add pre-prompt",
    "body": "cc @OlivierDehaene \r\n\r\n> Below are a series of dialogues between various people and an AI assistant.  The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable.  The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed.  It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer.  That said, the assistant is practical and really does its best, and doesn't let caution get too much in the way of being useful.\r\n> `-----`\r\n> `<current prompt>`\r\n> `-----`\r\n\r\nIs this something we want to do ASAP @julien-c @gary149 ?",
    "url": "https://github.com/huggingface/chat-ui/issues/122",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-26T15:58:55Z",
    "updated_at": "2023-04-26T16:46:05Z",
    "comments": 1,
    "user": "coyotte508"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1860,
    "title": "\u2753 [Question] Runtimes for timm + TensorRT",
    "body": "## \u2753 Question\r\n\r\nI created a script to compare inference runtimes with `torch`, `torch.compile` and `torch_tensorrt.compile` for any timm model, input shape and dtype and some runtimes are worse using TensorRT, why ? \r\n\r\n## What you have already tried\r\n\r\nI used [latest NVIDIA pytorch container](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch)(`nvcr.io/nvidia/pytorch:23.04-py3`,  released today) on a g5.2xlarge AWS instance (A10g GPU). You can find the script (`benchmark.py`) at the end of this issue and the command used to run it below : \r\n```bash\r\ndocker run --gpus all --rm --volume $DIR:/app nvcr.io/nvidia/pytorch:23.04-py3 /bin/bash -c \"pip install --pre timm && python /app/benchmark.py\"\r\n```\r\n\r\nwith `$DIR` the path to the directory where I saved the script. Here are a few results : \r\n\r\n| model | dtype | shape | torch | torch.compile | torch_tensorrt.compile |\r\n|--------|--------|--------|--------|--------|--------|\r\n| resnet50 | float32 | (16, 3, 224, 224) | 16.0ms |  11.4ms | **7.6ms** |\r\n| resnet50 | float16 | (16, 3, 224, 224) | 9.0ms |  6.3ms | **3.6ms** |\r\n| convnext_large | float32 | (16, 3, 224, 224) | 70.5ms | **56.7ms**   | 145.9ms |\r\n| convnext_large | float16 | (16, 3, 224, 224) | 35.4ms |  **28.3ms** | 64.8ms |\r\n| vit_base_patch16_224 | float32 | (16, 3, 224, 224) | 28.6ms | **28.2ms** | 30.5ms |\r\n| vit_large_patch14_clip_336 | float32 | (16, 3, 336, 336) | 288.1ms | 284.2ms | 310.2ms |\r\n| vit_large_patch14_clip_336 | float16 | (16, 3, 336, 336) | 129.1ms | 127.5ms | error\u00b0 |\r\n\r\n(error\u00b0 : `Expected input tensors to have type Half, found type float`, maybe some forcing on Layernorm layers is applied and I should enable mixed precision somehow ?)\r\n\r\nEverything goes well for the resnet50 model but for the convnext_large and vit models the `torch_tensorrt.compile` option get lower throughput and even fail in one case. And of course these models are the ones I am interested in \ud83d\ude05 \r\n\r\nSeveral questions : \r\n- Do you see any issue with the script I provided or how I ran it ?  \r\n- How can I minimize the runtimes for the convnext_large and vit_large_patch14_clip_336 models ? Would using ONNX + TensorRT provide different results ? Is it related to how these models are implemented in timm ? \r\n\r\nI can provide more details if needed (*e.g.* stack track),\r\nThanks for your help and support,\r\nSimon\r\n\r\n____\r\n\r\n```python\r\nfrom time import time\r\nimport timm\r\nimport torch\r\nimport torch_tensorrt\r\n\r\n\r\ndef benchmark(model, inputs, compile_torch=False, compile_tensorrt=False, n_warmups=5, n_runs=100):\r\n    \"\"\"\r\n    1. Optionally compile the model\r\n    2. Warmup phase (n_warmups) \r\n    3. Benchmark phase (n_runs)\r\n    \"\"\"\r\n\r\n    assert not (compile_torch and compile_tensorrt), \"Cannot compile both torch and tensorrt\"\r\n\r\n    # 1. Compile\r\n    if compile_tensorrt:\r\n        model = torch_tensorrt.compile(model,\r\n                                       inputs=[torch_tensorrt.Input(inputs.shape, dtype=inputs.dtype)],\r\n                                       enabled_precisions={inputs.dtype})\r\n\r\n    if compile_torch:\r\n        model = torch.compile(model)\r\n\r\n    # 2. Warmup\r\n    for _ in range(n_warmups):\r\n        with torch.no_grad():\r\n            model(inputs)\r\n    torch.cuda.synchronize()\r\n\r\n    # 3. Benchmark\r\n    runtimes = []\r\n    for _ in range(n_runs):\r\n        with torch.no_grad():\r\n            start = time()\r\n            model(inputs)\r\n            torch.cuda.synchronize()\r\n            runtimes.append(time() - start)\r\n            \r\n    # Print result\r\n    print('*' * 80)\r\n    print(f\"Average: {1000*sum(runtimes)/n_runs:.2f}ms\")\r\n    print('*' * 80)\r\n\r\n\r\nif __name__ == '__main__':\r\n\r\n    # To run this script using the latest pytorch docker image, save it into a directory (DIR) and run:\r\n    # docker run --gpus all --rm --volume $DIR:/app nvcr.io/nvidia/pytorch:23.04-py3 /bin/bash -c \"pip install --pre timm && python /app/benchmark.py\"\r\n\r\n    # Parameters\r\n    model_name = 'resnet50'\r\n    shape = (16, 3, 224, 224)\r\n    dtype = torch.float32\r\n\r\n    # Prepare model and inputs\r\n    model = timm.create_model(model_name)\r\n    model.eval().cuda().type(dtype)\r\n    inputs = torch.randn(*shape).type(dtype).cuda()\r\n\r\n    benchmark(model, inputs)\r\n    benchmark(model, inputs, compile_torch=True)\r\n    benchmark(model, inputs, compile_tensorrt=True)\r\n```",
    "url": "https://github.com/pytorch/TensorRT/issues/1860",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-04-26T15:19:14Z",
    "updated_at": "2024-10-04T15:58:16Z",
    "user": "SimJeg"
  },
  {
    "repo": "huggingface/setfit",
    "number": 367,
    "title": "Massive Text Embedding Benchmark (MTEB) Leaderboard",
    "body": "https://huggingface.co/spaces/mteb/leaderboard\r\n\r\nCan we use all of these with setfit?",
    "url": "https://github.com/huggingface/setfit/issues/367",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-26T09:18:27Z",
    "updated_at": "2023-12-05T14:48:55Z",
    "user": "vahuja4"
  },
  {
    "repo": "huggingface/huggingface.js",
    "number": 165,
    "title": "Add E2E where the module is downloaded (or linked) to a TS project",
    "body": "To prevent things like #164 ",
    "url": "https://github.com/huggingface/huggingface.js/issues/165",
    "state": "closed",
    "labels": [
      "tooling"
    ],
    "created_at": "2023-04-25T20:23:17Z",
    "updated_at": "2023-05-07T09:18:47Z",
    "user": "coyotte508"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1858,
    "title": "\u2753 [Question] Why was this Repo renamed to TensorRT ?",
    "body": "Thank you all for the great work on Torch-TensorRT. \r\nIt's been a pleasure to see it evolve since the days of TRTorch.\r\n\r\nThis repo went through multiple names but I think the current one is extremely confusing, if I clone both this repo and the original TensorRT repo I now have two TensorRT folders. \r\n\r\nThis is extremely confusing and at times infuriating. Would it be possible to know more about what prompted this naming choice ? \r\n\r\nWouldn't it be clearer to use Torch-TensorRT ? \r\n\r\nPS: it seems [other people are confused and are posting issues for TensorRT here](https://github.com/pytorch/TensorRT/issues/1703) \r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1858",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-25T12:03:06Z",
    "updated_at": "2023-05-02T10:08:41Z",
    "user": "MatthieuToulemont"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 100,
    "title": "Whisper on webGPU?",
    "body": "Somewhat related to [this thread](https://github.com/xenova/transformers.js/issues/20). \r\n\r\nIs it within scope to implement a webGPU accelerated version of Whisper?\r\n\r\nNot sure if this helps, but there is a [C port for Whisper wirh CPU implementation](https://github.com/ggerganov/whisper.cpp), and as mentioned in [this discussion](https://github.com/ggerganov/whisper.cpp/discussions/126), the main thing that needs to be offloaded to the GPU is the GGML_OP_MUL_MAT operator.",
    "url": "https://github.com/huggingface/transformers.js/issues/100",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-25T09:34:10Z",
    "updated_at": "2024-10-18T13:30:07Z",
    "user": "sandorkonya"
  },
  {
    "repo": "pytorch/data",
    "number": 1140,
    "title": "Shuffle batches across workers",
    "body": "### \ud83d\ude80 The feature\n\nI have a Dataloader with n workers. My understanding is that each worker constructs a full batch independently, which is then served by the dataloader. My samples are large, so I cannot increase the shuffle buffer size in each worker. Is there a way to perform the batching and shuffling only in the main process? \n\n### Motivation, pitch\n\nThis would improve shuffling for a fixed memory usage.\n\n### Alternatives\n\nI tried having an inner dataloader with n workers that produces samples, and an outer dataloader that shuffles and batches them. I couldnt get the inner dataloader to use n workers.\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/1140",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-24T15:53:08Z",
    "updated_at": "2023-04-28T02:49:08Z",
    "comments": 2,
    "user": "platers"
  },
  {
    "repo": "pytorch/text",
    "number": 2159,
    "title": " how to use Field ,RawField with torchtext 0.15.0 , don't need lower version",
    "body": "## \ud83d\udc1b Bug\r\n\r\n**Describe the bug** A clear and concise description of what the bug is.\r\n\r\n\r\n\r\n\r\n\r\n- PyTorch Version (e.g., 1.0): 1.12\r\n- OS (e.g., Linux):\r\n- How you installed PyTorch (`conda`, `pip`, source):\r\n- Build command you used (if compiling from source):\r\n- Python version:3.8\r\n- CUDA/cuDNN version: 10.2\r\n- GPU models and configuration:\r\n- Any other relevant information:\r\n\r\nas enviroment is pytorch 1.12 +  ,but i want to torchtext 0.12+ ,but  torchtext 0.12+  have remove Filed,  how to use torchtext 0.12+ Field, casue when pip isntall torchtext below o.12, it default install pytorch and override the version i install before,  i want to use pytorch 0.12+ as well as torrchtext Field , RawField, together. how to achieve this?\r\n",
    "url": "https://github.com/pytorch/text/issues/2159",
    "state": "open",
    "labels": [],
    "created_at": "2023-04-22T03:17:29Z",
    "updated_at": "2023-04-23T07:51:49Z",
    "user": "cqray1990"
  },
  {
    "repo": "huggingface/optimum",
    "number": 1002,
    "title": "Add a README & log at export",
    "body": "### Feature request\n\nThe logs of the ONNX export are insightful.\r\n\r\nMoreover, it would be good to generate automatically a README/json containing:\r\n* which params were used at export\r\n* For decoders, how to use the obtained `.onnx` models, as it can be a bit involved for somebody who does not use the Optimum ORT integration but wants to rewrite a custom implementation (in whatever language).\n\n### Motivation\n\nReadability for models on the Hub, reproducibility\n\n### Your contribution\n\n/",
    "url": "https://github.com/huggingface/optimum/issues/1002",
    "state": "open",
    "labels": [
      "feature-request",
      "onnx",
      "tflite"
    ],
    "created_at": "2023-04-21T15:31:43Z",
    "updated_at": "2023-04-21T15:31:43Z",
    "comments": 0,
    "user": "fxmarty"
  },
  {
    "repo": "huggingface/optimum",
    "number": 999,
    "title": "Remove attention mask creation for batch size = 1 when using SDPA",
    "body": "### Feature request\n\nSome pieces of transformers code are not useful when using SDPA with batch size = 1, for example:\r\n\r\nhttps://github.com/huggingface/transformers/blob/874c7caf1966b1d0ee2749046703ada7a12ed797/src/transformers/models/gpt2/modeling_gpt2.py#L804-L822\r\nhttps://github.com/huggingface/transformers/blob/874c7caf1966b1d0ee2749046703ada7a12ed797/src/transformers/models/gpt_neox/modeling_gpt_neox.py#L495-L512\r\n\r\nRemoving them could speed up generation.\r\n\r\nAn example of how to do this is in https://github.com/huggingface/optimum/pull/998\n\n### Motivation\n\nRemove unnecessary overhead\n\n### Your contribution\n\n/",
    "url": "https://github.com/huggingface/optimum/issues/999",
    "state": "closed",
    "labels": [
      "feature-request",
      "bettertransformer",
      "Stale"
    ],
    "created_at": "2023-04-21T14:41:04Z",
    "updated_at": "2025-05-29T02:14:32Z",
    "comments": 1,
    "user": "fxmarty"
  },
  {
    "repo": "pytorch/serve",
    "number": 2253,
    "title": "Troubled me too, How to solve this problem in TorchServe 0.7.1",
    "body": "              Just to let you know that I have the same kind of issue on Windows server 2019, with TorchServe 0.7.1. \r\n\r\nFrom Anaconda Prompt (ran as admninistrator), I run `torchserve --start ...`, everything goes fine including the inference test on the served model. I stop the `torchserve --start ...` command with CTRL+C. \r\n\r\nI guess the SIGINT is not catched by `torchserve.exe` on Windows to delete the `.model_server.pid` from `%APP_DATA%\\Local\\Temp\\1\\` so I have to delete it manually before running the next `torchserve --start ...` command.\r\n\r\n_Originally posted by @khelkun in https://github.com/pytorch/serve/issues/1866#issuecomment-1425916308_\r\n            ",
    "url": "https://github.com/pytorch/serve/issues/2253",
    "state": "closed",
    "labels": [
      "triaged",
      "windows"
    ],
    "created_at": "2023-04-21T04:09:42Z",
    "updated_at": "2023-10-28T19:39:28Z",
    "user": "Z863058"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1845,
    "title": "\u2753 [Question] Can I use TensorRT8.5.3.1 and torch1.10.1 with torch_TensorRT? ",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\nI found that when pip install torch_tensorrt corresponding to TensorRT8.5.3.1, torch must be 1.13. Can I use TensorRT8.5.3.1 and torch1.10.1 with torch_TensorRT? \r\n\r\nAnd if I use c++ torch_tensorrt, can i avoid this situation?\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.10.1\r\n - CPU Architecture: x86\r\n - OS (e.g., Linux): Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Python version: 3.9.16\r\n - CUDA version: 11.6\r\n - GPU models and configuration: rtx3090",
    "url": "https://github.com/pytorch/TensorRT/issues/1845",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-20T12:34:27Z",
    "updated_at": "2023-04-23T08:05:33Z",
    "user": "Yoh-Z"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1844,
    "title": "\u2753 [Question] Internal Error-given invalid tensor name",
    "body": "## \u2753 Question\r\n\r\nI want to convert a torch model(from python) to a runtime model(in C++), using the torch.fx capabilities. That will allow me to accelerate a model that isn't fully supported by TensorRT.\r\nI understand that this flow is experimental, so I used the examples which are given in this repository.\r\n\r\nBy using this example-\r\nhttps://github.com/pytorch/TensorRT/blob/main/examples/fx/fx2trt_example_next.py\r\n\r\nI got some internal errors while running this code part(and also while running inference after that, but the error messages are identical as before, so I guess it's related.)-\r\n`trt_mod = TRTModule(`\r\n`            name=\"my_module\",`\r\n`            serialized_engine=engine_str,`\r\n`            input_binding_names=r.input_names,`\r\n`            output_binding_names=r.output_names,`\r\n`            target_device=Device(f\"cuda:{torch.cuda.current_device()}\"),`\r\n`        )`\r\n\r\nThe error messages are-\r\n`ERROR: [Torch-TensorRT] - 3: [engine.cpp::getProfileObliviousBindingIndex::1386] Error Code 3: Internal Error (getTensorShape given invalid tensor name: input_0)`\r\n`ERROR: [Torch-TensorRT] - 3: [engine.cpp::getProfileObliviousBindingIndex::1386] Error Code 3: Internal Error (getTensorDataType given invalid tensor name: input_0)`\r\n`ERROR: [Torch-TensorRT] - 3: [engine.cpp::getProfileObliviousBindingIndex::1386] Error Code 3: Internal Error (getTensorShape given invalid tensor name: output_0)`\r\n`ERROR: [Torch-TensorRT] - 3: [engine.cpp::getProfileObliviousBindingIndex::1386] Error Code 3: Internal Error (getTensorDataType given invalid tensor name: output_0)\r\n`\r\nWhat can cause these errors?\r\nI tried to find other way to define the model inputs and outputs(which will maybe affect the input and output names in some way, as hinted from the error messages), but I don't see other way in the examples.\r\n\r\n## What you have already tried\r\n\r\nI have already tried the notebook I linked before, and on other flow I got in the torch forum-\r\nhttps://discuss.pytorch.org/t/using-torchtrt-fx-backend-on-c/170639/6\r\n\r\nThe code for this flow is-\r\n`model_fx = model_fx.cuda()`\r\n`inputs_fx = [i.cuda() for i in inputs_fx]`\r\n`trt_fx_module_f16 = torch_tensorrt.compile(`\r\n    `    model_fx,`\r\n    `    ir=\"fx\",`\r\n    `    inputs=inputs_fx,`\r\n    `    enabled_precisions={torch.float16},`\r\n    `    use_experimental_fx_rt=True,`\r\n    `    explicit_batch_dimension=True`\r\n`)`\r\n`torch.save(trt_fx_module_f16, \"trt.pt\")`\r\n`reload_trt_mod = torch.load(\"trt.pt\")`\r\n`scripted_fx_module = torch.jit.trace(trt_fx_module_f16, example_inputs=inputs_fx)`\r\n`scripted_fx_module.save(\"/tmp/scripted_fx_module.ts\")`\r\n`scripted_fx_module = torch.jit.load(\"/tmp/scripted_fx_module.ts\") #This can also be loaded in C++`\r\n\r\nThe error is the same, while running the torch.compile method, using the \"use_fx_experimental_rt=True\" flag\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.13.1\r\n - CPU Architecture: x86-64\r\n - OS (e.g., Linux): Ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source): -\r\n - Are you using local sources or building from archives: I used the pre-built version of Torch-TensorRT 1.3.0 release\r\n - Python version: 3.8.10\r\n - CUDA version: 11.8\r\n - GPU models and configuration: NVIDIA T1000\r\n - Any other relevant information: -\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1844",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-20T10:35:35Z",
    "updated_at": "2023-04-27T16:10:46Z",
    "user": "DanielLevi6"
  },
  {
    "repo": "huggingface/optimum",
    "number": 987,
    "title": "Have optimum supported BLIP-2 model converted to onnx?",
    "body": "Hi, have optimum supported BLIP-2 model converted to onnx?",
    "url": "https://github.com/huggingface/optimum/issues/987",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-20T07:07:53Z",
    "updated_at": "2023-04-21T11:45:41Z",
    "comments": 1,
    "user": "joewale"
  },
  {
    "repo": "pytorch/serve",
    "number": 2242,
    "title": "How to send a json body to Torchserve",
    "body": "I'd like to do a post request to torch serve with application/json as its content-type, instead of a file. data could be `{\"text\": \"hi\"}`. Is that possible?\r\n\r\nIn the docs it is shown how you can send binary file data\r\n\r\n```\r\nimport requests\r\n\r\nres = requests.post(\"http://localhost:8080/predictions/squeezenet1_1\", files={'data': open('docs/images/dogs-before.jpg', 'rb'), 'data': open('docs/images/kitten_small.jpg', 'rb')})\r\n```\r\n\r\nCan't get anything like this to work:\r\n\r\n```\r\nimport requests\r\nimport io\r\n\r\nstr = \"oi321op4\"\r\n\r\nraw_data = io.BytesIO(str.encode())\r\nfiles = {\"data\": raw_data}\r\nres = requests.post(\"myurl\", files=files)\r\nres.json()\r\n```",
    "url": "https://github.com/pytorch/serve/issues/2242",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-19T16:17:51Z",
    "updated_at": "2023-04-19T22:47:55Z",
    "user": "nihiluis"
  },
  {
    "repo": "huggingface/setfit",
    "number": 364,
    "title": "Understanding the trainer parameters",
    "body": "I am looking at the SetFit example with SetFitHead:\r\n```\r\n# Create trainer\r\ntrainer = SetFitTrainer(\r\n    model=model,\r\n    train_dataset=train_dataset,\r\n    eval_dataset=eval_dataset,\r\n    loss_class=CosineSimilarityLoss,\r\n    metric=\"accuracy\",\r\n    batch_size=16,\r\n    num_iterations=20, # The number of text pairs to generate for contrastive learning\r\n    num_epochs=1, # The number of epochs to use for contrastive learning\r\n    column_mapping={\"sentence\": \"text\", \"label\": \"label\"} # Map dataset columns to text/label expected by trainer\r\n)\r\n\r\n\r\n```\r\nHere, what exactly is the meaning of `num_iterations`?  And, why is `num_epochs =1`? Is that sufficient?\r\n\r\n```\r\ntrainer.unfreeze(keep_body_frozen=False)\r\n\r\ntrainer.train(\r\n    num_epochs=25, # The number of epochs to train the head or the whole model (body and head)\r\n    batch_size=16,\r\n    body_learning_rate=1e-5, # The body's learning rate\r\n    learning_rate=1e-2, # The head's learning rate\r\n    l2_weight=0.0, # Weight decay on **both** the body and head. If `None`, will use 0.01.\r\n)\r\nmetrics = trainer.evaluate()\r\n```\r\nHere the number of epochs is 25 and we are training the head and the body with different learning rates. Any reason why the per-epoch metrics are not displayed?\r\n",
    "url": "https://github.com/huggingface/setfit/issues/364",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-19T15:19:42Z",
    "updated_at": "2023-11-24T13:22:31Z",
    "user": "vahuja4"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 3151,
    "title": "What is the format of the training data",
    "body": "Hello\uff0cI'm training Lora, but I don't know what the data format looks like,\r\n\r\nThe error is as follows:\r\n\r\n --caption_column' value 'text' needs to be one of: image\r\n\r\nWhat is the data format?",
    "url": "https://github.com/huggingface/diffusers/issues/3151",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-04-19T07:51:16Z",
    "updated_at": "2023-08-04T10:20:18Z",
    "user": "WGS-note"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1835,
    "title": "\u2753 [Question] Is torch-tensorrt compiled code device agnostic?   ",
    "body": "Thanks for this wonderful repo! \r\n\r\nIs the torch-tensorrt compiled code runnable on any (Nvidia) device or should it be compiled on the target device? I know that the usual tensorrt programs (compiled from onnx) need to be compiled on the target device. I would expect the same from torch-tensorrt. However, the docs on [deployment](https://pytorch.org/TensorRT/tutorials/runtime.html#runtime) do not specify this and rather make me believe that the compiled code is device agnostic. \r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1835",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-18T16:44:56Z",
    "updated_at": "2023-04-18T17:05:52Z",
    "user": "FabianSchuetze"
  },
  {
    "repo": "huggingface/setfit",
    "number": 360,
    "title": "Token padding makes ONNX inference 6x slower, is attention_mask being used properly?",
    "body": "Here's some code that loads in my ONNX model and tokenizes 293 short examples. The longest length in the set is 153 tokens:\r\n\r\n```python\r\ninput_text = test_ds['text']\r\n\r\nimport onnxruntime\r\nfrom transformers import AutoTokenizer\r\ntokenizer = AutoTokenizer.from_pretrained(model_id)\r\ninputs = tokenizer(\r\n    input_text,\r\n    max_length=512,\r\n    padding='longest',\r\n    truncation=True,\r\n    return_attention_mask=True,\r\n    return_token_type_ids=True,\r\n    return_tensors=\"np\",\r\n)\r\n\r\nsession = onnxruntime.InferenceSession(onnx_path)\r\n```\r\n```python\r\nonnx_preds = session.run(None, dict(inputs))[0]\r\n```\r\nThis runs in about 15-20 seconds for me. However, when I set `padding='max_length'` it takes about 1min20secs. Isn't the point of `attention_mask` to avoid this? The base model is `intfloat/e5-small`, Microsoft's e5 model which AFAICT is similar to mpnet.",
    "url": "https://github.com/huggingface/setfit/issues/360",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-18T15:33:01Z",
    "updated_at": "2023-04-19T05:40:02Z",
    "user": "bogedy"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5767,
    "title": "How to use Distill-BERT with different datasets?",
    "body": "### Describe the bug\n\n- `transformers` version: 4.11.3\r\n- Platform: Linux-5.4.0-58-generic-x86_64-with-glibc2.29\r\n- Python version: 3.8.10\r\n- PyTorch version (GPU?): 1.12.0+cu102 (True)\r\n- Tensorflow version (GPU?): 2.10.0 (True)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: <fill in>\r\n\n\n### Steps to reproduce the bug\n\nI recently read [this](https://huggingface.co/docs/transformers/quicktour#train-with-tensorflow:~:text=The%20most%20important%20thing%20to%20remember%20is%20you%20need%20to%20instantiate%20a%20tokenizer%20with%20the%20same%20model%20name%20to%20ensure%20you%E2%80%99re%20using%20the%20same%20tokenization%20rules%20a%20model%20was%20pretrained%20with.) and was wondering how to use distill-BERT (which is pre-trained with imdb dataset) with a different dataset (for eg. [this](https://huggingface.co/datasets/yhavinga/imdb_dutch) dataset)?\n\n### Expected behavior\n\nDistill-BERT should work with different datasets.\n\n### Environment info\n\n- `datasets` version: 1.12.1\r\n- Platform: Linux-5.4.0-58-generic-x86_64-with-glibc2.29\r\n- Python version: 3.8.10\r\n- PyArrow version: 11.0.0",
    "url": "https://github.com/huggingface/datasets/issues/5767",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-18T06:25:12Z",
    "updated_at": "2023-04-20T16:52:05Z",
    "comments": 1,
    "user": "sauravtii"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 93,
    "title": "[Feature Request] \"slow tokenizer\" format (`vocab.json` and `merges.txt`)",
    "body": "Wondering whether this code is supposed to work (or some variation on the repo URL - I tried a few different things):\r\n```js\r\nawait import(\"https://cdn.jsdelivr.net/npm/@xenova/transformers@1.4.2/dist/transformers.min.js\");\r\nlet tokenizer = await AutoTokenizer.from_pretrained(\"https://huggingface.co/cerebras/Cerebras-GPT-1.3B/resolve/main\");\r\n```\r\nThe `cerebras/Cerebras-GPT-1.3B` repo only has a `config.json` (no `tokenizer.json`), but the `config.json` has `\"model_type\": \"gpt2\",` and has `vocab.json` and `merges.txt`. It does load successfully with the Python Transformers lib.",
    "url": "https://github.com/huggingface/transformers.js/issues/93",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-18T05:11:31Z",
    "updated_at": "2023-04-23T07:41:27Z",
    "user": "josephrocca"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5766,
    "title": "Support custom feature types",
    "body": "### Feature request\r\n\r\nI think it would be nice to allow registering custom feature types with the \ud83e\udd17 Datasets library. For example, allow to do something along the following lines:\r\n\r\n```\r\nfrom datasets.features import register_feature_type  # this would be a new function\r\n\r\n@register_feature_type\r\nclass CustomFeatureType:\r\n    def encode_example(self, value):\r\n        \"\"\"User-provided logic to encode an example of this feature.\"\"\"\r\n        pass\r\n\r\n    def decode_example(self, value, token_per_repo_id=None):\r\n        \"\"\"User-provided logic to decode an example of this feature.\"\"\"\r\n        pass\r\n```\r\n\r\n### Motivation\r\n\r\nUsers of \ud83e\udd17 Datasets, such as myself, may want to use the library to load datasets with unsupported feature types (i.e., beyond `ClassLabel`, `Image`, or `Audio`). This would be useful for prototyping new feature types and for feature types that aren't used widely enough to warrant inclusion in \ud83e\udd17 Datasets.\r\n\r\nAt the moment, this is only possible by monkey-patching \ud83e\udd17 Datasets, which obfuscates the code and is prone to breaking with library updates. It also requires the user to write some custom code which could be easily avoided.\r\n\r\n### Your contribution\r\n\r\nI would be happy to contribute this feature. My proposed solution would involve changing the following call to `globals()` to an explicit feature type registry, which a user-facing `register_feature_type` decorator could update.\r\n\r\nhttps://github.com/huggingface/datasets/blob/fd893098627230cc734f6009ad04cf885c979ac4/src/datasets/features/features.py#L1329\r\n\r\nI would also provide an abstract base class for custom feature types which users could inherit. This would have at least an `encode_example` method and a `decode_example` method, similar to `Image` or `Audio`.\r\n\r\nThe existing `encode_nested_example` and `decode_nested_example` functions would also need to be updated to correctly call the corresponding functions for the new type.",
    "url": "https://github.com/huggingface/datasets/issues/5766",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-04-17T15:46:41Z",
    "updated_at": "2024-03-10T11:11:22Z",
    "comments": 4,
    "user": "jmontalt"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 92,
    "title": "[Question] ESM module import in the browser (via jsdelivr)",
    "body": "Wondering how to import transformers.js as a module (as opposed to `<script>`) in the browser? I've tried this:\r\n```js\r\nlet { AutoTokenizer } = await import(\"https://cdn.jsdelivr.net/npm/@xenova/transformers@1.4.2/dist/transformers.min.js\");\r\n```\r\nBut it doesn't seem to export anything. I might be making a mistake here, but if not: Woudl it be possible to get a module-based js file for the browser?\r\n\r\n---\r\n\r\nAlso, as an aside, can I suggest using a versioned URL in the readme? Or something like:\r\n```\r\nhttps://cdn.jsdelivr.net/npm/@xenova/transformers@X.Y.Z/dist/transformers.min.js\r\n```\r\nWith a note telling them to replace `X.Y.Z` with the latest version. This allows you to make breaking changes in the future without breaking a bunch of sites. Often newbie devs don't realise that they have to swap for a versioned URL, and this can lead to \"web rot\" where old webpages eventuallly become broken or buggy.",
    "url": "https://github.com/huggingface/transformers.js/issues/92",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-17T10:06:55Z",
    "updated_at": "2023-04-22T19:17:56Z",
    "user": "josephrocca"
  },
  {
    "repo": "pytorch/serve",
    "number": 2236,
    "title": "How to get image name",
    "body": "I use curl http://localhost:8080/predictions/resnet-18 -T kitten_small.jpg\r\n\r\nI want to get the image name like kitten_small.jpg but the data in the handler is only image",
    "url": "https://github.com/pytorch/serve/issues/2236",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-17T08:31:55Z",
    "updated_at": "2023-10-28T19:39:20Z",
    "user": "zzh1230"
  },
  {
    "repo": "pytorch/data",
    "number": 1132,
    "title": "torchdata.datapipes.map.Shuffler should return a MapDataPipe",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nHello. I am working on mixing two speech datasets, both of them are indexable datasets. Using MapDataPipe, shuffle one of the speech datasets, and zip them together with one zipper:\r\n\r\n```python\r\nimport torchdata.datapipes as dp\r\n\r\ndp1 = dp.map.SequenceWrapper([0, 1, 2, 3, 4, 5]) # speech 1\r\ndp2 = dp.map.SequenceWrapper(['a', 'b', 'c']) # speech 2\r\ndp1 = dp.map.Shuffler(dp1) # shuffle one\r\ndpz = dp.map.Zipper(dp1, dp2)\r\n\r\nprint(list(dpz))\r\nprint(list(dpz))\r\nprint(list(dpz))\r\nprint()\r\n```\r\nHowever, the shuffler returns one IterDataPipe... So the code above raises an Error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/mnt/home/quancs/projects/NBSS_pmt/testxxx.py\", line 6, in <module>\r\n    dpz = dp.map.Zipper(dp1, dp2)\r\n  File \"/mnt/home/quancs/miniconda3/envs/torch2/lib/python3.10/site-packages/torch/utils/data/datapipes/map/combining.py\", line 80, in __init__\r\n    raise TypeError(\"Expected all inputs to be `MapDataPipe`\")\r\nTypeError: Expected all inputs to be `MapDataPipe`\r\n```\r\n\r\nI tried to use IterDataPipe, but I don't know how to sample it in ddp situation (in one epoch, each sample is sampled only once).\r\n\r\n### Versions\r\n\r\nCollecting environment information...\r\nPyTorch version: 2.0.0\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.8\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: CentOS Linux 7 (Core) (x86_64)\r\nGCC version: (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)\r\nClang version: Could not collect\r\nCMake version: version 2.8.12.2\r\nLibc version: glibc-2.17\r\n\r\nPython version: 3.10.0 (default, Mar  3 2022, 09:58:08) [GCC 7.5.0] (64-bit runtime)\r\nPython platform: Linux-3.10.0-1160.el7.x86_64-x86_64-with-glibc2.17\r\nIs CUDA available: True\r\nCUDA runtime version: 11.3.109\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: \r\nGPU 0: NVIDIA A100-SXM4-40GB\r\nGPU 1: NVIDIA A100-SXM4-40GB\r\nGPU 2: NVIDIA A100-SXM4-40GB\r\nGPU 3: NVIDIA A100-SXM4-40GB\r\nGPU 4: NVIDIA A100-SXM4-40GB\r\nGPU 5: NVIDIA A100-SXM4-40GB\r\nGPU 6: NVIDIA A100-SXM4-40GB\r\nGPU 7: NVIDIA A100-SXM4-40GB\r\n\r\nNvidia driver version: 530.30.02\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nCPU:\r\nArchitecture:          x86_64\r\nCPU op-mode(s):        32-bit, 64-bit\r\nByte Order:            Little Endian\r\nCPU(s):                128\r\nOn-line CPU(s) list:   0-127\r\nThread(s) per core:    1\r\nCore(s) per socket:    64\r\nSocket(s):             2\r\nNUMA node(s):          8\r\nVendor ID:             AuthenticAMD\r\nCPU family:            23\r\nModel:                 49\r\nModel name:            AMD EPYC 7742 64-Core Processor\r\nStepping:              0\r\nCPU MHz:               1500.000\r\nCPU max MHz:           2250.0000\r\nCPU min MHz:           1500.0000\r\nBogoMIPS:              4491.63\r\nVirtualization:        AMD-V\r\nL1d cache:             32K\r\nL1i cache:             32K\r\nL2 cache:              512K\r\nL3 cache:              16384K\r\nNUMA node0 CPU(s):     0-15\r\nNUMA node1 CPU(s):     16-31\r\nNUMA node2 CPU(s):     32-47\r\nNUMA node3 CPU(s):     48-63\r\nNUMA node4 CPU(s):     64-79\r\nNUMA node5 CPU(s):     80-95\r\nNUMA node6 CPU(s):     96-111\r\nNUMA node7 CPU(s):     112-127\r\nFlags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc art rep_good nopl nonstop_tsc extd_apicid aperfmperf eagerfpu pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_l2 cpb cat_l3 cdp_l3 hw_pstate sme retpoline_amd ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif umip overflow_recov succor smca\r\n\r\nVersions of relevant libraries:\r\n[pip3] mypy-extensions==1.0.0\r\n[pip3] numpy==1.23.5\r\n[pip3] pytorch-lightning==2.0.1.post0\r\n[pip3] torch==2.0.0\r\n[pip3] torchaudio==2.0.0\r\n[pip3] torchdata==0.6.0\r\n[pip3] torcheval==0.0.6\r\n[pip3] torchmetrics==0.11.4\r\n[pip3] torchtnt==0.0.7\r\n[pip3] torchvision==0.15.0\r\n[pip3] triton==2.0.0\r\n[conda] blas                      1.0                         mkl  \r\n[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch\r\n[conda] mkl                       2021.4.0           h06a4308_640  \r\n[conda] mkl-service               2.4.0           py310h7f8727e_0  \r\n[conda] mkl_fft                   1.3.1           py310hd6ae3a3_0  \r\n[conda] mkl_random                1.2.2           py310h00e6091_0  \r\n[conda] numpy                     1.23.5          py310hd5efca6_0  \r\n[conda] numpy-base                1.23.5          py310h8e6c178_0  \r\n[conda] pytorch                   2.0.0           py3",
    "url": "https://github.com/meta-pytorch/data/issues/1132",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-17T02:29:55Z",
    "updated_at": "2023-04-18T14:56:05Z",
    "comments": 7,
    "user": "quancs"
  },
  {
    "repo": "huggingface/optimum",
    "number": 973,
    "title": "How to run the encoder part only of the model transformed by BetterTransformer?",
    "body": "### Feature request\r\n\r\nIf I want to run the encoder part of the model, e.g., \"bert-large-uncased\", skipping the word embedding stage, I could run with `nn.TransformerEncoder` as the Pytorch eager mode. How could I implement the BetterTransformer version encoder?\r\n\r\n```\r\nencoder_layer = nn.TransformerEncoderLayer(d_model=hidden_dim, nhead=head_num)\r\nhf_encoder = nn.TransformerEncoder(encoder_layer, num_layers=layer_num).to(device)\r\n```\r\n\r\nBased on the code above, `BetterTransformer.transform` cannot accept `hf_encoder` as the input, it gave me the error `AttributeError: 'TransformerEncoder' object has no attribute 'config'`.\r\n\r\n### Motivation\r\n\r\nWhen I want to compare the performance of BetterTransformer and FasterTransformer ([link](https://github.com/NVIDIA/FasterTransformer/blob/main/docs/bert_guide.md#run-fastertransformer-bert-on-pytorch)) I need to run the encoder part of the model only to compare with FasterTransformer. \r\n\r\n\r\n### Your contribution\r\n\r\nI could add more guidelines into Docs/ README.",
    "url": "https://github.com/huggingface/optimum/issues/973",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-04-17T02:29:44Z",
    "updated_at": "2025-06-04T02:15:33Z",
    "comments": 2,
    "user": "WarningRan"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5759,
    "title": "Can I load in list of list of dict format? ",
    "body": "### Feature request\n\nmy jsonl dataset has following format:\r\n```\r\n[{'input':xxx, 'output':xxx},{'input:xxx,'output':xxx},...]\r\n[{'input':xxx, 'output':xxx},{'input:xxx,'output':xxx},...]\r\n```\r\n\r\nI try to use `datasets.load_dataset('json', data_files=path)` or `datasets.Dataset.from_json`, it raises\r\n```\r\n  File \"site-packages/datasets/arrow_dataset.py\", line 1078, in from_json\r\n    ).read()\r\n  File \"site-packages/datasets/io/json.py\", line 59, in read\r\n    self.builder.download_and_prepare(\r\n  File \"site-packages/datasets/builder.py\", line 872, in download_and_prepare\r\n    self._download_and_prepare(\r\n  File \"site-packages/datasets/builder.py\", line 967, in _download_and_prepare\r\n    self._prepare_split(split_generator, **prepare_split_kwargs)\r\n  File \"site-packages/datasets/builder.py\", line 1749, in _prepare_split\r\n    for job_id, done, content in self._prepare_split_single(\r\n  File \"site-packages/datasets/builder.py\", line 1892, in _prepare_split_single\r\n    raise DatasetGenerationError(\"An error occurred while generating the dataset\") from e\r\ndatasets.builder.DatasetGenerationError: An error occurred while generating the dataset\r\n```\n\n### Motivation\n\nI wanna use features like `Datasets.map` or `Datasets.shuffle`, so i need the dataset in memory to be `arrow_dataset.Datasets` format\n\n### Your contribution\n\nPR",
    "url": "https://github.com/huggingface/datasets/issues/5759",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-04-16T13:50:14Z",
    "updated_at": "2023-04-19T12:04:36Z",
    "comments": 1,
    "user": "LZY-the-boys"
  },
  {
    "repo": "huggingface/setfit",
    "number": 358,
    "title": "Domain adaptation",
    "body": "Does setfit cover  Adapter Transformers? https://arxiv.org/pdf/2007.07779.pdf",
    "url": "https://github.com/huggingface/setfit/issues/358",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-16T12:44:50Z",
    "updated_at": "2023-12-05T14:49:36Z",
    "user": "Elahehsrz"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 3120,
    "title": "The controlnet trained by diffusers scripts produce always same result no matter what the input images is",
    "body": "### Describe the bug\r\n\r\nI train a controlnet with the base model Chilloutmix-Ni and datasets Abhilashvj/vto_hd_train using the train_controlnet.py script provided in diffuses repo\r\nAfter training I got a controlnet model.\r\nWhen I inference the image with the model, if I use the same prompt and seed, no matter how I change the control image I used, the pipeline always output the same image as result, which means that the controlnet model doesn't accept the control image as a condition at all.\r\n\r\n### Reproduction\r\n\r\nThe train the controlnet with the scripts in example/controlnet\r\n`accelerate launch train_controlnet.py --pretrained_model_name_or_path=\"/root/autodl-tmp/chilloutmixckpt\" --output_dir=\"/root/autodl-tmp/mycontrolnet\" --dataset_name=Abhilashvj/vto_hd_train --resolution=512 --learning_rate=2e-6 --train_batch_size=1 --gradient_accumulation_steps=4 --num_train_epochs=10 --tracker_project_name=\"train_controlnet\" --checkpointing_steps=10000`\r\n\r\n\r\nAnd the code I use for inference is as below\r\n```\r\nfrom diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler,DPMSolverMultistepScheduler\r\nfrom diffusers.utils import load_image\r\nimport torch\r\nbase_model_path = \"/root/autodl-tmp/chilloutmixckpt\"\r\ncontrolnet_path = \"/root/autodl-tmp/mycontrolnet\"\r\ncontrolnet = ControlNetModel.from_pretrained(controlnet_path)\r\npipe = StableDiffusionControlNetPipeline.from_pretrained(\r\n    base_model_path, controlnet=controlnet\r\n)\r\n# speed up diffusion process with faster scheduler and memory optimization\r\npipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)\r\n#pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)\r\ncontrol_image = load_image(\"https://datasets-server.huggingface.co/assets/Abhilashvj/vto_hd_train/--/Abhilashvj--vto_hd_train/train/5/conditioning_image/image.jpg\")\r\ncontrol_image.save(\"./control8.png\")\r\nprompt = \"1girl, best quality, ultra high res, high quality, ultra-detailed, professional lighting\"\r\nnegative_prompt = 'paintings, sketches, extremely worst quality, worst quality, extremely low quality, low quality, normal quality, lowres, normal quality, monochrome, grayscale, missing fingers, extra fingers, bad teeth, bad anatomy, bad hands, bad feet, blurry face, bad eyes, slanted eyes, fused eye, skin spots, acnes, skin blemishes, age spot'\r\n# generate image\r\ngenerator = torch.manual_seed(0)\r\nimage = pipe(prompt, num_inference_steps=20, generator=generator, image=control_image).images[0]\r\nimage.save(\"./output8.png\")\r\n```\r\n\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\ndiffusers0.15.0\r\nubuntu\r\npython3.8",
    "url": "https://github.com/huggingface/diffusers/issues/3120",
    "state": "closed",
    "labels": [
      "bug",
      "stale"
    ],
    "created_at": "2023-04-16T11:16:58Z",
    "updated_at": "2023-07-08T15:03:12Z",
    "user": "garyhxfang"
  },
  {
    "repo": "pytorch/data",
    "number": 1131,
    "title": "What does it mean for a DataPipe to be 'replicable'? ",
    "body": "### \ud83d\udcda The doc issue\n\nIn the [ReadingService docs](https://pytorch.org/data/main/reading_service.html?highlight=replicable) the different sharding options and that one applies to replicable and one to non-replicable datapipes, but it's not really explained what that means.\r\n\r\nIndirectly related, I'm also confused by the names `ShardingRoundRobinDispatcher` and `ShardingFilter`. The docs for `ShardingFilter` say \r\n\r\n>  each instance of the DataPipe (on different workers) will have every n-th element of the original DataPipe, where n equals to the number of instances.\r\n\r\nIs that not essentially the definition of round robin distribution? How is that different than what the the DataPipes downstream of a `ShardingRoundRobinDispatcher` on different workers receive?\n\n### Suggest a potential alternative/fix\n\nClarify more the difference between `ShardingRoundRobinDispatcher` and `ShardingFilter` and explain what 'replicable' means in that context. \r\n\r\nPossibly consider renaming `ShardingRoundRobinDispatcher` and `ShardingFilter`, if the answers to my questions above are 'yes' to something more meaningful. ",
    "url": "https://github.com/meta-pytorch/data/issues/1131",
    "state": "open",
    "labels": [],
    "created_at": "2023-04-15T03:27:12Z",
    "updated_at": "2023-05-27T21:47:09Z",
    "comments": 4,
    "user": "lendle"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1824,
    "title": "\u2753 [Question] Pytorch 2.0 Compatability?",
    "body": "## \u2753 Question\r\n\r\nThanks for this repo. Is TensorRT compatible with pytorch 2.0? I see that the latest release targets pytorch 1.13. Is there some way I can use TensorRT with pytorch 2.0? \r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1824",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-14T17:38:33Z",
    "updated_at": "2023-04-22T21:21:34Z",
    "user": "FabianSchuetze"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 87,
    "title": "Can whisper-tiny speech-to-text translate to English as well as transcribe foreign language?",
    "body": "I know there is a separate translation engine (t5-small), but I'm wondering if speech-to-text with whisper-tiny (not whisper-tiny.en) can return English translation alongside the foreign-language transcription?  -- I read Whisper.ai can do this.  It seems like it would just be a parameter, but I don't know where to look.",
    "url": "https://github.com/huggingface/transformers.js/issues/87",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2023-04-14T16:23:14Z",
    "updated_at": "2023-06-23T19:07:31Z",
    "user": "patrickinminneapolis"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 99143,
    "title": "No documentation to show how to implement aten::view for custom backend",
    "body": "### \ud83d\udcda The doc issue\n\nThe original code is:\r\n\r\n```py\r\n  x = torch.empty([1024], device='privateuseone:0')\r\n  y = x.view([2, -1]) # raise error by missing aten::view\r\n```\r\nThen I get following errors:\r\n```txt\r\nNotImplementedError: Could not run 'aten::view' with arguments from the 'PrivateUse1' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build). If you are a Facebook employee using PyTorch on mobile, please visit https://fburl.com/ptmfixes for possible resolutions. 'aten::view' is only available for ..\r\n```\r\n\r\nAccording to some interface declaration in Pytorch source code, the extension looks like this:\r\n```cpp\r\nstatic at::Tensor __view(c10::DispatchKeySet ks, const at::Tensor & self, c10::SymIntArrayRef size) {\r\n  return at::_ops::view::redispatch(ks, self, size);\r\n}\r\nTORCH_LIBRARY_IMPL(aten, Antares, m) {\r\n  m.impl(\"view\", __view);\r\n}\r\n```\r\n\r\nHowever, it results in infinite recursive call of this function and ends with stack overflow.\r\nI don't think `x.view([2, -1])` really requires user to define its implementation. If this definition is a must, what documentation can I refer to get it passed correctly?\n\n### Suggest a potential alternative/fix\n\nAn document example of how to implement custom `aten::view`, or any simpler solutions to solve the reshape problem above.\n\ncc @malfet @zou3519 @svekars @carljparker",
    "url": "https://github.com/pytorch/pytorch/issues/99143",
    "state": "open",
    "labels": [
      "module: cpp-extensions",
      "module: docs",
      "triaged"
    ],
    "created_at": "2023-04-14T11:36:09Z",
    "updated_at": "2024-04-16T16:18:30Z",
    "user": "ghostplant"
  },
  {
    "repo": "huggingface/text-generation-inference",
    "number": 182,
    "title": "Is bert-base-uncased supported\uff1f",
    "body": "Hi,\r\nI'm trying to deploy bert-base-uncased model by [v0.5.0](https://github.com/huggingface/text-generation-inference/tree/v0.5.0), but got an error: ValueError: BertLMHeadModel does not support `device_map='auto'` yet.\r\n\r\n<details>\r\n\r\n```\r\nroot@nick-test1-8zjwg-135105-worker-0:/usr/local/bin# ./text-generation-launcher --model-id bert-base-uncased\r\n2023-04-14T07:24:23.167920Z  INFO text_generation_launcher: Args { model_id: \"bert-base-uncased\", revision: None, sharded: None, num_shard: Some(1), quantize: false, max_concurrent_requests: 128, max_best_of: 2, max_stop_sequences: 4, max_input_length: 1000, max_total_tokens: 1512, max_batch_size: 32, max_waiting_tokens: 20, port: 80, shard_uds_path: \"/tmp/text-generation-server\", master_addr: \"localhost\", master_port: 29500, huggingface_hub_cache: Some(\"/data\"), weights_cache_override: None, disable_custom_kernels: false, json_output: false, otlp_endpoint: None, cors_allow_origin: [], watermark_gamma: None, watermark_delta: None }\r\n2023-04-14T07:24:23.168401Z  INFO text_generation_launcher: Starting shard 0\r\n2023-04-14T07:24:29.874262Z ERROR shard-manager: text_generation_launcher: \"Error when initializing model\r\nTraceback (most recent call last):\r\n  File \\\"/opt/miniconda/envs/text-generation/bin/text-generation-server\\\", line 8, in <module>\r\n    sys.exit(app())\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/typer/main.py\\\", line 311, in __call__\r\n    return get_command(self)(*args, **kwargs)\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/click/core.py\\\", line 1130, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/typer/core.py\\\", line 778, in main\r\n    return _main(\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/typer/core.py\\\", line 216, in _main\r\n    rv = self.invoke(ctx)\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/click/core.py\\\", line 1657, in invoke\r\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/click/core.py\\\", line 1404, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/click/core.py\\\", line 760, in invoke\r\n    return __callback(*args, **kwargs)\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/typer/main.py\\\", line 683, in wrapper\r\n    return callback(**use_params)  # type: ignore\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/text_generation_server/cli.py\\\", line 55, in serve\r\n    server.serve(model_id, revision, sharded, quantize, uds_path)\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/text_generation_server/server.py\\\", line 135, in serve\r\n    asyncio.run(serve_inner(model_id, revision, sharded, quantize))\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/asyncio/runners.py\\\", line 44, in run\r\n    return loop.run_until_complete(main)\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/asyncio/base_events.py\\\", line 634, in run_until_complete\r\n    self.run_forever()\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/asyncio/base_events.py\\\", line 601, in run_forever\r\n    self._run_once()\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/asyncio/base_events.py\\\", line 1905, in _run_once\r\n    handle._run()\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/asyncio/events.py\\\", line 80, in _run\r\n    self._context.run(self._callback, *self._args)\r\n> File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/text_generation_server/server.py\\\", line 104, in serve_inner\r\n    model = get_model(model_id, revision, sharded, quantize)\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/text_generation_server/models/__init__.py\\\", line 130, in get_model\r\n    return CausalLM(model_id, revision, quantize=quantize)\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/text_generation_server/models/causal_lm.py\\\", line 308, in __init__\r\n    self.model = AutoModelForCausalLM.from_pretrained(\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/transformers-4.28.0.dev0-py3.9-linux-x86_64.egg/transformers/models/auto/auto_factory.py\\\", line 471, in from_pretrained\r\n    return model_class.from_pretrained(\r\n  File \\\"/opt/miniconda/envs/text-generation/lib/python3.9/site-packages/transformers-4.28.0.dev0-py3.9-linux-x86_64.egg/transformers/modeling_utils.py\\\", line 2644, in from_pretrained\r\n    raise ValueError(f\\\"{model.__class__.__name__} does not support `device_map='{device_map}'` yet.\\\")\r\nValueError: BertLMHeadModel does not support `device_map='auto'` yet.\r\n\" rank=0\r\n2023-04-14T07:24:30.475420Z ERROR text_generation_launcher: Shard 0 failed to start.\r\n2023-04-14T07:24:30.475495Z  INFO text_generation_launcher: Shut",
    "url": "https://github.com/huggingface/text-generation-inference/issues/182",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-14T07:26:05Z",
    "updated_at": "2023-11-17T09:20:30Z",
    "user": "nick1115"
  },
  {
    "repo": "huggingface/setfit",
    "number": 355,
    "title": "ONNX conversion of multi-ouput classifier",
    "body": "Hi,\r\nI am trying to do onnx conversion for multilabel model using the multioutputclassifier\r\n`model = SetFitModel.from_pretrained(model_id, multi_target_strategy=\"multi-output\")`.\r\nWhen I tried `export_onnx(model.model_body,\r\n            model.model_head,\r\n            opset=12,\r\n            output_path=output_path)`, it gave me an error indicating there's no `coef_`, I understand there's no coef_ in the multioutput classifier, but is there a way to do onnx conversion for this model? \r\nThanks! \r\n",
    "url": "https://github.com/huggingface/setfit/issues/355",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-13T22:08:13Z",
    "updated_at": "2023-04-20T17:00:48Z",
    "user": "jackiexue1993"
  },
  {
    "repo": "pytorch/examples",
    "number": 1136,
    "title": "examples/imagenet/main.py   Multiple Gpus use for training",
    "body": "By setting up multiple Gpus for use, the model and data are automatically loaded to these Gpus for training. What is the difference between this way and single-node multi-GPU distributed training?\r\n",
    "url": "https://github.com/pytorch/examples/issues/1136",
    "state": "open",
    "labels": [],
    "created_at": "2023-04-13T12:05:39Z",
    "updated_at": "2023-04-30T01:18:17Z",
    "comments": 1,
    "user": "Ansor-ZJJ"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2284,
    "title": "[BUG] - module 'torch' has no attribute '_six'",
    "body": "### Add Link\n\nhttps://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html\n\n### Describe the bug\n\nWhen I try to run the data loader section, it keeps returning this error of torch not having the attribute _six. I made sure that my dataroot is right and the files are there but it just doesn't seem to fix the problem. \n\n### Describe your environment\n\nMac and PyTorch version 2.0.0",
    "url": "https://github.com/pytorch/tutorials/issues/2284",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-13T04:46:34Z",
    "updated_at": "2024-11-20T14:19:23Z",
    "user": "vanilladucky"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 84,
    "title": "[Question] New demo type/use case: semantic search (SemanticFinder)",
    "body": "Hi @xenova, \r\nfirst of all thanks for the amazing library - it's awesome to be able to play around with the models without a backend! \r\n\r\nI just created [SemanticFinder](https://do-me.github.io/SemanticFinder/), a semantic search engine in the browser with the help of transformers.js and [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2).\r\n\r\nYou can find some technical details in the [blog post](https://geo.rocks/post/semanticfinder-semantic-search-frontend-only/). \r\n\r\nI was wondering whether you'd be interested in showcasing semantic search as new demo type. Technically, it's not a new model but it's a new **use case** with an existing model so I don't know whether it's out of scope. \r\n\r\nAnyway, just wanted to let you know that you're work is very much appreciated! ",
    "url": "https://github.com/huggingface/transformers.js/issues/84",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-12T18:57:38Z",
    "updated_at": "2025-10-13T05:03:30Z",
    "user": "do-me"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 3075,
    "title": "Create a Video ControlNet Pipeline",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nStable Diffusion video generation lacks precise movement control and composition control. This is not surprising, since the model was not trained or fine-tuned with videos. \r\n\r\n**Describe the solution you'd like**\r\nBy following an analogous extension process that gave Stable Diffusion more composition control with ControlNet, we can address this issue, extending the `TextToVideoZeroPipeline` with an additional ControlNet guidance image  _sequence_. \r\n\r\nSpecifically, I believe this will involve creating `ControlNet3DModel` that extends to the `ControlNetModel` to provide the proper down and mid sample residuals to the a new `TextToVideoZeroControlNetPipeline`.\r\n\r\nThe `TextToVideoZeroControlPipeline` will extend the `TextToVideoZeroPipeline` so it can be initialized `ControlNet3DModel`. During the forward pass we will add an additional list of images (or 3D tensor) parameter. This will be passed to the `ControlNet3DModel` to create the residuals for the 3D U-Net. \r\n\r\n**Describe alternatives you've considered**\r\nAlternative one can create special purpose pipelines to use additional guidance image sequences. An example of this process is the \"Follow Your Pose\" approach: https://follow-your-pose.github.io/\r\n\r\nHowever, extending a Stable Diffusion video pipeline with a `ControlNet3DModel` opens the door to numerous possible other extensions without the need to make a new pipeline. For example:\r\n\r\n- A sketch temporal ControlNet would let users turn sketches to colored animations\r\n- A optical flow ControlNet could transfer movement in a similar way to EBSynth\r\n- A pose ControlNet could precisely control the movement of characters in a video.\r\n\r\n**Additional context**\r\nThis is idea is part of the JAX/ControlNet sprint for the \"Stable Diffusion for Animation\" project. I was hoping that our work could lead to a PR that is acceptable for the repo, so I wanted to get a conversation going on the approach. \r\n\r\nTagging the maestro @takuma104 to get your thoughts as well. \r\n",
    "url": "https://github.com/huggingface/diffusers/issues/3075",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-12T17:51:35Z",
    "updated_at": "2023-04-13T16:21:28Z",
    "user": "jfischoff"
  },
  {
    "repo": "huggingface/setfit",
    "number": 352,
    "title": "False Positives",
    "body": "I had built a model using a muti-label dataset. But I see that I am getting so many False Positive outputs during inference.\r\n\r\nFor eg:\r\n\r\nFIRST NOTICE OF LOSS SENT TO AGENT'S CUSTOMER ACTIVITY    ---> This is predicted as 'Total Loss' (Total Loss is one of my labels given fed through the dataset). \r\n\r\nI see that there is a word 'Loss' present in the dataset but it is not supposed to be predicted as 'Total Loss'.\r\n\r\nThere are so many absurd outputs as well.\r\n\r\n\r\nHere is the pre-trained model which I am using for fine-tuning :\r\nHyper-parameters : num_iterations = 30, batch_size = 16, num_epochs = 1\r\n\r\n\r\nWhat went wrong?\r\n",
    "url": "https://github.com/huggingface/setfit/issues/352",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-12T17:42:44Z",
    "updated_at": "2023-05-18T16:19:27Z",
    "user": "cassinthangam4996"
  },
  {
    "repo": "huggingface/setfit",
    "number": 349,
    "title": "Hard Negative Mining vs random sampling",
    "body": "Has anyone tried doing hard negative mining when generating the sentence pairs as opposed to random sampling? @tomaarsen - is random sampling the default? ",
    "url": "https://github.com/huggingface/setfit/issues/349",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-12T09:24:53Z",
    "updated_at": "2023-04-15T16:04:27Z",
    "user": "vahuja4"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 311,
    "title": "What is MemoryFormat.CHANNELS_LAST?",
    "body": "And What is BitmaptoFloat32Tensor?\r\n\r\nThx.",
    "url": "https://github.com/pytorch/android-demo-app/issues/311",
    "state": "open",
    "labels": [],
    "created_at": "2023-04-12T02:03:49Z",
    "updated_at": "2023-04-12T02:03:49Z",
    "user": "NeighborhoodCoding"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 1216,
    "title": "What is the correct way to remove a token from the vocabulary?",
    "body": "I see that it works when I do something like this\r\n```\r\ndel tokenizer.get_vocab()[unwanted_token]\r\n```\r\n~~And then it will work when running encode~~, but when I save the model the unwanted tokens remain in the json. Is there a blessed way to remove unwanted tokens?\r\n\r\nEDIT: \r\nNow that I tried again see that does not actually work.\r\n",
    "url": "https://github.com/huggingface/tokenizers/issues/1216",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-04-11T15:40:48Z",
    "updated_at": "2024-02-10T01:47:15Z",
    "user": "tvallotton"
  },
  {
    "repo": "huggingface/optimum",
    "number": 964,
    "title": "onnx conversion for custom trained trocr base stage1",
    "body": "### Feature request\r\n\r\nI have trained the base stage1 trocr on my custom dataset having multiline images. The trained model gives good results while using the default torch format for loading the model. But while converting the model to onnx, the model detects only first line or part of it in first line. I have used this [https://github.com/huggingface/transformers/issues/19811#issuecomment-1303072202](url) \r\nfor converting the model to onnx. Can you kindly provide the insights about what i should do differently, in order to get the desired multiline output from the onnx converted model.\r\n\r\n### Motivation\r\n\r\nHow to update the onnx conversion of trocr in order to support multiline trocr trained model\r\n\r\n### Your contribution\r\n\r\nTrained a trocr base stage1 model for multiline dataset.",
    "url": "https://github.com/huggingface/optimum/issues/964",
    "state": "open",
    "labels": [
      "onnx"
    ],
    "created_at": "2023-04-11T10:10:23Z",
    "updated_at": "2023-10-16T14:20:42Z",
    "comments": 1,
    "user": "Mir-Umar"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5727,
    "title": "load_dataset fails with FileNotFound error on Windows",
    "body": "### Describe the bug\n\nAlthough I can import and run the datasets library in a Colab environment, I cannot successfully load any data on my own machine (Windows 10) despite following the install steps:\r\n\r\n(1) create conda environment \r\n(2) activate environment\r\n(3) install with: ``conda` install -c huggingface -c conda-forge datasets`\r\n\r\nThen\r\n\r\n```\r\nfrom datasets import load_dataset\r\n\r\n# this or any other example from the website fails with the FileNotFoundError\r\n glue = load_dataset(\"glue\", \"ax\")\r\n```\r\n\r\n**Below I have pasted the error omitting the full path**:\r\n\r\n```\r\nraise FileNotFoundError(\r\nFileNotFoundError: Couldn't find a dataset script at C:\\Users\\...\\glue\\glue.py or any data file in the same directory. Couldn't find 'glue' on the Hugging Face Hub either: FileNotFoundError: [WinError 3] The system cannot find the path specified: \r\n'C:\\\\Users\\\\...\\\\.cache\\\\huggingface'\r\n```\r\n\n\n### Steps to reproduce the bug\n\nOn Windows 10 \r\n\r\n1) create a minimal conda environment (with just Python)\r\n(2) activate environment\r\n(3) install datasets with: ``conda` install -c huggingface -c conda-forge datasets`\r\n(4) import load_dataset and follow example usage from any dataset card. \n\n### Expected behavior\n\nThe expected behavior is to load the file into the Python session running on my machine without error. \n\n### Environment info\n\n```\r\n# Name                    Version                   Build  Channel\r\naiohttp                   3.8.4           py311ha68e1ae_0    conda-forge\r\naiosignal                 1.3.1              pyhd8ed1ab_0    conda-forge\r\narrow-cpp                 11.0.0          h57928b3_13_cpu    conda-forge\r\nasync-timeout             4.0.2              pyhd8ed1ab_0    conda-forge\r\nattrs                     22.2.0             pyh71513ae_0    conda-forge\r\naws-c-auth                0.6.26               h1262f0c_1    conda-forge\r\naws-c-cal                 0.5.21               h7cda486_2    conda-forge\r\naws-c-common              0.8.14               hcfcfb64_0    conda-forge\r\naws-c-compression         0.2.16               h8a79959_5    conda-forge\r\naws-c-event-stream        0.2.20               h5f78564_4    conda-forge\r\naws-c-http                0.7.6                h2545be9_0    conda-forge\r\naws-c-io                  0.13.19              h0d2781e_3    conda-forge\r\naws-c-mqtt                0.8.6               hd211e0c_12    conda-forge\r\naws-c-s3                  0.2.7                h8113e7b_1    conda-forge\r\naws-c-sdkutils            0.1.8                h8a79959_0    conda-forge\r\naws-checksums             0.1.14               h8a79959_5    conda-forge\r\naws-crt-cpp               0.19.8              he6d3b81_12    conda-forge\r\naws-sdk-cpp               1.10.57              h64004b3_8    conda-forge\r\nbrotlipy                  0.7.0           py311ha68e1ae_1005    conda-forge\r\nbzip2                     1.0.8                h8ffe710_4    conda-forge\r\nc-ares                    1.19.0               h2bbff1b_0\r\nca-certificates           2023.01.10           haa95532_0\r\ncertifi                   2022.12.7          pyhd8ed1ab_0    conda-forge\r\ncffi                      1.15.1          py311h7d9ee11_3    conda-forge\r\ncharset-normalizer        2.1.1              pyhd8ed1ab_0    conda-forge\r\ncolorama                  0.4.6              pyhd8ed1ab_0    conda-forge\r\ncryptography              40.0.1          py311h28e9c30_0    conda-forge\r\ndataclasses               0.8                pyhc8e2a94_3    conda-forge\r\ndatasets                  2.11.0                     py_0    huggingface\r\ndill                      0.3.6              pyhd8ed1ab_1    conda-forge\r\nfilelock                  3.11.0             pyhd8ed1ab_0    conda-forge\r\nfrozenlist                1.3.3           py311ha68e1ae_0    conda-forge\r\nfsspec                    2023.4.0           pyh1a96a4e_0    conda-forge\r\ngflags                    2.2.2             ha925a31_1004    conda-forge\r\nglog                      0.6.0                h4797de2_0    conda-forge\r\nhuggingface_hub           0.13.4                     py_0    huggingface\r\nidna                      3.4                pyhd8ed1ab_0    conda-forge\r\nimportlib-metadata        6.3.0              pyha770c72_0    conda-forge\r\nimportlib_metadata        6.3.0                hd8ed1ab_0    conda-forge\r\nintel-openmp              2023.0.0         h57928b3_25922    conda-forge\r\nkrb5                      1.20.1               heb0366b_0    conda-forge\r\nlibabseil                 20230125.0      cxx17_h63175ca_1    conda-forge\r\nlibarrow                  11.0.0          h04c43f8_13_cpu    conda-forge\r\nlibblas                   3.9.0              16_win64_mkl    conda-forge\r\nlibbrotlicommon           1.0.9                hcfcfb64_8    conda-forge\r\nlibbrotlidec              1.0.9                hcfcfb64_8    conda-forge\r\nlibbrotlienc              1.0.9                hcfcfb64_8    conda-forge\r\nlibcblas                  3.9.0              16_win64_mkl    conda-forge\r\nlibcrc32c                 1.1.2                h0e60522_0   ",
    "url": "https://github.com/huggingface/datasets/issues/5727",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-10T23:21:12Z",
    "updated_at": "2023-07-21T14:08:20Z",
    "comments": 4,
    "user": "joelkowalewski"
  },
  {
    "repo": "pytorch/examples",
    "number": 1131,
    "title": "New examples requested",
    "body": "Hi everyone, @svekars and I are looking to increase the number of new contributions to pytorch/examples, this might be especially interesting to you if you've never contributed to an open source project before.\r\n\r\nAt a high level, we're looking for new interesting models.\r\n\r\nSo here's what you need to do\r\n1. Check out our contributing guide: https://github.com/pytorch/examples/blob/main/CONTRIBUTING.md\r\n2. Pick a model idea - I've listed a few below, comment on this task so others know you're working on it\r\n3. Implement your model from scratch using PyTorch, no external dependencies will be allowed to keep the examples as educational as possible\r\n\r\nYour implementation needs to include\r\n1. A folder with your code which needs to define\r\n  1. Your model architecture\r\n  2. Training code\r\n  4. Evaluation code \r\n  5. An argparser \r\n3. Make sure your script runs in CI so it doesn't break in the future by adding it to `run_python_examples.sh`\r\n4. README describing any usage instructions\r\n\r\nAs an example this recent contribution by @sudomaze is a good one to follow https://github.com/pytorch/examples/pull/1003/files\r\n\r\nHere are some model ideas\r\n\r\n## Model ideas\r\n\r\n\r\n* [ ] Controlnet - Guided diffusion\r\n* [ ] NERF \r\n* [x] Graph Neural Network @JoseLuisC99 \r\n* [ ] Diffusion Model, stable diffusion or any variant of the architecture you like\r\n* [x] Vision Transformer\r\n* [ ] Video model\r\n* [ ] Toolformer\r\n* [ ] Differentiable physics\r\n* [ ] Flownet\r\n* [ ] Dreamfusion or any 3d model\r\n* [ ] Language Translation\r\n* [ ] Swin transformer\r\n\r\nBut I'm quite open to anything we don't have that's cool\r\n\r\n",
    "url": "https://github.com/pytorch/examples/issues/1131",
    "state": "closed",
    "labels": [
      "good first issue"
    ],
    "created_at": "2023-04-10T19:49:49Z",
    "updated_at": "2025-07-05T19:17:22Z",
    "comments": 58,
    "user": "msaroufim"
  },
  {
    "repo": "pytorch/serve",
    "number": 2224,
    "title": "How to prevent torchserve unloading my models in case of inactivity?",
    "body": "### \ud83d\udcda The doc issue\n\nAccording to my experience, even though I wasn't able to find it in documentation, torchserve unloads a model after some time of inactivity. After the inference api for that model is invoked, it will load it again in memory, and thus increasing total inference time.\r\nCan I control that behavior and set appropriate inactivity time?\r\nOr can I just disable that option at all, and have all my models always loaded in memory?\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2224",
    "state": "open",
    "labels": [
      "triaged",
      "sagemaker"
    ],
    "created_at": "2023-04-10T12:32:26Z",
    "updated_at": "2023-05-08T21:51:39Z",
    "user": "petrovicu"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5725,
    "title": "How to limit the number of examples in dataset, for testing?",
    "body": "### Describe the bug\n\nI am using this command:\r\n`data = load_dataset(\"json\", data_files=data_path)`\r\nHowever, I want to add a parameter, to limit the number of loaded examples to be 10, for development purposes, but can't find this simple parameter.\n\n### Steps to reproduce the bug\n\nIn the description.\n\n### Expected behavior\n\nTo be able to limit the number of examples\n\n### Environment info\n\nNothing special",
    "url": "https://github.com/huggingface/datasets/issues/5725",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-10T08:41:43Z",
    "updated_at": "2023-04-21T06:16:24Z",
    "comments": 3,
    "user": "ndvbd"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 75,
    "title": "[Question] WavLM support ",
    "body": "This is a really good project. I was wondering if WavLM is supported in the project, I wanted to run a voice conversation model in the browser, also if Hifi-gan for voice synthesis.\n",
    "url": "https://github.com/huggingface/transformers.js/issues/75",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-08T09:36:03Z",
    "updated_at": "2023-09-08T13:17:07Z",
    "user": "Ashraf-Ali-aa"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5719,
    "title": "Array2D feature creates a list of list instead of a numpy array",
    "body": "### Describe the bug\r\n\r\nI'm not sure if this is expected behavior or not. When I create a 2D array using `Array2D`, the data has list type instead of numpy array. I think it should not be the expected behavior especially when I feed a numpy array as input to the data creation function. Why is it converting my array into a list?\r\nAlso if I change the first dimension of the `Array2D` shape to None, it's returning array correctly.\r\n\r\n### Steps to reproduce the bug\r\n\r\nRun this code:\r\n```py\r\nfrom datasets import Dataset, Features, Array2D\r\nimport numpy as np\r\n\r\n# you have to change the first dimension of the shape to None to make it return an array\r\nfeatures = Features(dict(seq=Array2D((2,2), 'float32')))  \r\nds = Dataset.from_dict(dict(seq=[np.random.rand(2,2)]), features=features)\r\na = ds[0]['seq']\r\nprint(a)\r\nprint(type(a))\r\n```\r\n\r\nThe following will be printed in stdout:\r\n```\r\n[[0.8127174377441406, 0.3760348856449127], [0.7510159611701965, 0.4322739541530609]]\r\n<class 'list'>\r\n```\r\n\r\n### Expected behavior\r\n\r\nEach indexed item should be a list or numpy array.  Currently, `Array((2,2))` yields a list but `Array((None,2))` yields an array.\r\n\r\n### Environment info\r\n\r\n- `datasets` version: 2.11.0\r\n- Platform: Windows-10-10.0.19045-SP0\r\n- Python version: 3.9.13\r\n- Huggingface_hub version: 0.13.4\r\n- PyArrow version: 11.0.0\r\n- Pandas version: 1.4.4\r\n",
    "url": "https://github.com/huggingface/datasets/issues/5719",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-07T21:04:08Z",
    "updated_at": "2023-04-20T15:34:41Z",
    "comments": 4,
    "user": "offchan42"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5716,
    "title": "Handle empty audio",
    "body": "Some audio paths exist, but they are empty, and an error will be reported when reading the audio path.How to use the filter function to avoid the empty audio path?\r\nwhen a audio is empty, when do resample , it will break:\r\n`array, sampling_rate = sf.read(f) array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate)`",
    "url": "https://github.com/huggingface/datasets/issues/5716",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-07T09:51:40Z",
    "updated_at": "2023-09-27T17:47:08Z",
    "comments": 2,
    "user": "zyb8543d"
  },
  {
    "repo": "huggingface/setfit",
    "number": 344,
    "title": "How to do I have multi text columns?",
    "body": "Text is not one column, there many columns. For example : The text columns are \"sex\",\"title\",\"weather\". What should I do?",
    "url": "https://github.com/huggingface/setfit/issues/344",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-07T01:51:21Z",
    "updated_at": "2023-04-10T00:45:38Z",
    "user": "freecui"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 71,
    "title": "[Question] How to run test suit",
    "body": "Hi @xenova,\r\n\r\nI want to work on adding new features, but when I try to run the tests of the project I get this error:\r\n\r\n```\r\nError: File not found. Could not locate \"/Users/yonatanchelouche/Desktop/passive-project/transformers.js/models/onnx/quantized/distilbert-base-uncased-finetuned-sst-2-english/sequence-classification/tokenizer.json\".\r\n    at getModelFile (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:235:23)\r\n    at async fetchJSON (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/utils.js:288:18)\r\n    at async Promise.all (index 0)\r\n    at async Function.from_pretrained (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/tokenizers.js:2571:48)\r\n    at async Promise.all (index 0)\r\n    at async pipeline (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/src/pipelines.js:1308:17)\r\n    at async text_classification (/Users/yonatanchelouche/Desktop/passive-project/transformers.js/tests/index.js:90:22)\r\n    at async /Users/yonatanchelouche/Desktop/passive-project/transformers.js/tests/index.js:897:25\r\n```\r\nI guess it is because the models are missing from the models dir. Is there a programmatic way to download them from the lib?\r\n\r\nBy the way, I was thinking about adding a CI on PRs to run the tests and perhaps adding jest as the test runner. What, do you think about that?\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/71",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-06T17:03:09Z",
    "updated_at": "2023-05-15T17:38:46Z",
    "user": "chelouche9"
  },
  {
    "repo": "pytorch/text",
    "number": 2145,
    "title": "Loading vectors into a GPU",
    "body": "## \ud83d\ude80 Feature\r\n\r\nIs there any way for loading vectors based on device with torchtext.vocab.Vectors class?\r\n",
    "url": "https://github.com/pytorch/text/issues/2145",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-06T15:38:38Z",
    "updated_at": "2023-04-14T18:04:46Z",
    "comments": 4,
    "user": "saeeddhqan"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1123,
    "title": "Can I call torch.utils.data.WeightedRandomSampler inside vmap?",
    "body": "Dear Experts,\r\n\r\nI am trying to accelerate a series of weighted sampling (i.e., transition using a stochastic matrix) using vmap.\r\nBasically, I am trying to accelerate the code from here: https://discuss.pytorch.org/t/best-way-to-implement-series-of-weighted-random-sampling-for-transition-w-stochastic-matrix/176713 using vmap instead of a for loop, by calling torch.utils.data.WeightedRandomSamper() inside vmap (the link is my question asking for any alternative way for acceleration in the general forum).\r\nHowever, I get an error and I am not sure if this is possible.\r\n\r\nBelow is my code:\r\n\r\n```\r\nimport torch\r\nfrom torch import nn\r\nfrom functorch import vmap\r\n\r\nN = 10\r\nM = 20\r\nL = 5\r\n\r\nP = torch.rand([N, M])\r\nx = torch.randint(0, N, [L])\r\nP_new = torch.stack([P[x[i]] for i in range(L)])\r\n\r\nf = lambda p: torch.tensor(list(torch.utils.data.WeightedRandomSampler(p, 1))[0])\r\ny = vmap(f, randomness='different')(P_new)\r\n\r\nprint(y)\r\n```\r\n\r\nIdeally, I want to sample L elements, each using distribution P[x[i]] for i = range(L).\r\nBelow is the error I get:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"xxx/test.py\", line 17, in <module>\r\n    y = vmap(f, randomness='different')(P_new)\r\n  File \"xxx/functorch/_src/vmap.py\", line 361, in wrapped\r\n    return _flat_vmap(\r\n  File \"xxx/functorch/_src/vmap.py\", line 487, in _flat_vmap\r\n    batched_outputs = func(*batched_inputs, **kwargs)\r\n  File xxx/test.py\", line 16, in <lambda>\r\n    f = lambda p: torch.tensor(list(torch.utils.data.WeightedRandomSampler(p, 1))[0])\r\n  File \"xxxx/site-packages/torch/utils/data/sampler.py\", line 203, in __iter__\r\n    yield from iter(rand_tensor.tolist())\r\nRuntimeError: Cannot access data pointer of Tensor that doesn't have storage\r\n```\r\n\r\nI wonder if something like this is fundamentally impossible, or is there a way around my error.\r\n\r\nAny help would be highly appreciated!\r\nThank you",
    "url": "https://github.com/pytorch/functorch/issues/1123",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-04T23:47:08Z",
    "updated_at": "2023-04-04T23:55:33Z",
    "comments": 1,
    "user": "kwmaeng91"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 69,
    "title": "How to convert bloomz model",
    "body": "While converting the [bloomz](https://huggingface.co/bigscience/bloomz-7b1l) model, I am getting the 'invalid syntax' error. Is conversion limited to only predefined model types?\r\nIf not, please provide the syntax for converting the above model with quantization.\r\n\r\n(I will run the inference in nodejs and not in browser, so memory will not be an issue in inference.)\r\n",
    "url": "https://github.com/huggingface/transformers.js/issues/69",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-04-04T14:51:16Z",
    "updated_at": "2023-04-09T02:01:49Z",
    "user": "bil-ash"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 68,
    "title": "[Feature request] whisper word level timestamps",
    "body": "I am new to both transformers.js and whisper, so I am sorry for a lame question in advance.\r\n\r\nI am trying to make [return_timestamps](https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline.__call__) parameter work...\r\n\r\nI managed to customize [script.js](https://github.com/xenova/transformers.js/blob/main/assets/js/scripts.js#L447) from [transformer.js demo](https://xenova.github.io/transformers.js/) locally and added `data.generation.return_timestamps = \"char\"`; around line ~447 inside GENERATE_BUTTON click handler in order to pass the parameter. With that change in place I am seeing timestamp appears as chunks (`result` var in [worker.js](https://github.com/xenova/transformers.js/blob/main/assets/js/worker.js#L40)):\r\n\r\n```\r\n{\r\n    \"text\": \" And so my fellow Americans ask not what your country can do for you ask what you can do for your country.\",\r\n    \"chunks\": [\r\n        {\r\n            \"timestamp\": [0,8],\r\n            \"text\": \" And so my fellow Americans ask not what your country can do for you\"\r\n        },\r\n        {\r\n            \"timestamp\": [8,11],\r\n            \"text\": \" ask what you can do for your country.\"\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\n\r\nhowever the chunks are not \"char level\" granular as expected following the [return_timestamps](https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline.__call__) doc.\r\n\r\nI am looking for ideas how to achieve char/word level timestamp granularity with transform.js and whisper. Do some models/tools need to be updated and/or rebuild?",
    "url": "https://github.com/huggingface/transformers.js/issues/68",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2023-04-04T10:57:05Z",
    "updated_at": "2023-07-09T22:48:31Z",
    "user": "jozefchutka"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5705,
    "title": "Getting next item from IterableDataset took forever.",
    "body": "### Describe the bug\r\n\r\nI have a large dataset, about 500GB. The format of the dataset is parquet. \r\n\r\nI then load the dataset and try to get the first item\r\n```python\r\ndef get_one_item():\r\n    dataset = load_dataset(\"path/to/datafiles\", split=\"train\", cache_dir=\".\", streaming=True)\r\n    dataset = dataset.filter(lambda example: example['text'].startswith('Ar'))\r\n    print(next(iter(dataset)))\r\n```\r\n\r\nHowever, this function never finish. I waited ~10mins, the function was still running so I killed the process. I'm now using `line_profiler` to profile how long it would take to return one item. I'll be patient and wait for as long as it needs. \r\n\r\nI suspect the filter operation is the reason why it took so long. Can I get some possible reasons behind this?\r\n\r\n### Steps to reproduce the bug\r\n\r\nUnfortunately without my data files, there is no way to reproduce this bug.\r\n\r\n### Expected behavior\r\n\r\nWith `IteralbeDataset`, I expect the first item to be returned instantly.\r\n\r\n### Environment info\r\n\r\n- datasets version: 2.11.0 \r\n- python: 3.7.12",
    "url": "https://github.com/huggingface/datasets/issues/5705",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-04T09:16:17Z",
    "updated_at": "2023-04-05T23:35:41Z",
    "comments": 2,
    "user": "HongtaoYang"
  },
  {
    "repo": "huggingface/optimum",
    "number": 952,
    "title": "Enable AMP for BetterTransformer",
    "body": "### Feature request\n\nAllow for the `BetterTransformer` models to be inferenced with AMP.\n\n### Motivation\n\nModels transformed with `BetterTransformer` raise error when used with AMP:\r\n\r\n`bettertransformers.models.base`\r\n```python\r\n    ...\r\n    def forward_checker(self, *args, **kwargs):\r\n        if torch.is_autocast_enabled() or torch.is_autocast_cpu_enabled():\r\n            raise ValueError(\"Autocast is not supported for `BetterTransformer` integration.\")\r\n\r\n        if self.training and not self.is_decoder:\r\n            raise ValueError(\r\n                \"Training is not supported for `BetterTransformer` integration.\",\r\n                \" Please use `model.eval()` before running the model.\",\r\n            )\r\n    ...\r\n```\r\n\r\nWhy is that? I tried setting `torch.is_autocast_enabled` to `lambda: False` and everything works just fine at least for `XLMRobertaModel`:\r\n\r\n```python\r\n>>> import torch\r\n>>> from transformers import AutoModel\r\n>>> from optimum.bettertransformer import BetterTransformer\r\n>>> m = AutoModel.from_pretrained('xlm-roberta-base')\r\n>>> BetterTransformer.transform(m, keep_original_model=False)\r\nXLMRobertaModel(\r\n  (embeddings): XLMRobertaEmbeddings(\r\n    (word_embeddings): Embedding(250002, 768, padding_idx=1)\r\n    (position_embeddings): Embedding(514, 768, padding_idx=1)\r\n    (token_type_embeddings): Embedding(1, 768)\r\n    (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True)\r\n    (dropout): Dropout(p=0.1, inplace=False)\r\n  )\r\n  (encoder): XLMRobertaEncoder(\r\n    (layer): ModuleList(\r\n      (0-11): 12 x BertLayerBetterTransformer()\r\n    )\r\n  )\r\n  (pooler): XLMRobertaPooler(\r\n    (dense): Linear(in_features=768, out_features=768, bias=True)\r\n    (activation): Tanh()\r\n  )\r\n)\r\n>>> with torch.amp.autocast('cuda'):\r\n...     m(**{name: t.to('cuda') for name, t in m.dummy_inputs.items()})\r\n... \r\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Traceback (most recent call last) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\r\n\u2502 <stdin>:2 in <module>                                                                            \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502 /home/viktor-sch/Clones/talisman-ie/venv/lib/python3.10/site-packages/torch/nn/modules/module.py \u2502\r\n\u2502 :1501 in _call_impl                                                                              \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502   1498 \u2502   \u2502   if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks   \u2502\r\n\u2502   1499 \u2502   \u2502   \u2502   \u2502   or _global_backward_pre_hooks or _global_backward_hooks                   \u2502\r\n\u2502   1500 \u2502   \u2502   \u2502   \u2502   or _global_forward_hooks or _global_forward_pre_hooks):                   \u2502\r\n\u2502 \u2771 1501 \u2502   \u2502   \u2502   return forward_call(*args, **kwargs)                                          \u2502\r\n\u2502   1502 \u2502   \u2502   # Do not call functions when jit is used                                          \u2502\r\n\u2502   1503 \u2502   \u2502   full_backward_hooks, non_full_backward_hooks = [], []                             \u2502\r\n\u2502   1504 \u2502   \u2502   backward_pre_hooks = []                                                           \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502 /home/viktor-sch/Clones/talisman-ie/venv/lib/python3.10/site-packages/transformers/models/xlm_ro \u2502\r\n\u2502 berta/modeling_xlm_roberta.py:854 in forward                                                     \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502    851 \u2502   \u2502   \u2502   inputs_embeds=inputs_embeds,                                                  \u2502\r\n\u2502    852 \u2502   \u2502   \u2502   past_key_values_length=past_key_values_length,                                \u2502\r\n\u2502    853 \u2502   \u2502   )                                                                                 \u2502\r\n\u2502 \u2771  854 \u2502   \u2502   encoder_outputs = self.encoder(                                                   \u2502\r\n\u2502    855 \u2502   \u2502   \u2502   embedding_output,                                                             \u2502\r\n\u2502    856 \u2502   \u2502   \u2502   attention_mask=extended_attention_mask,                                       \u2502\r\n\u2502    857 \u2502   \u2502   \u2502   head_mask=head_mask,                                                          \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502 /home/viktor-sch/Clones/talisman-ie/venv/lib/python3.10/site-packages/torch/nn/modules/module.py \u2502\r\n\u2502 :1501 in _call_impl                                                                              \u2502\r\n\u2502                                                                                                  \u2502\r\n\u2502   1498 \u2502   \u2502   if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks   \u2502\r\n\u2502   1499 \u2502   \u2502   \u2502   \u2502   or _global_backward_pre_hooks or _global_backward_hooks                   \u2502\r\n\u2502   1500 \u2502   \u2502   \u2502   \u2502   or _global_forward_hooks or _global_forward_pre_hooks):                 ",
    "url": "https://github.com/huggingface/optimum/issues/952",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-04T09:14:00Z",
    "updated_at": "2023-07-26T17:08:42Z",
    "comments": 6,
    "user": "viktor-shcherb"
  },
  {
    "repo": "huggingface/controlnet_aux",
    "number": 18,
    "title": "When using openpose, what is the format of the input image? RGB format, or BGR format?",
    "body": "![image](https://user-images.githubusercontent.com/47708655/229683347-7a0e20b6-bd76-4aae-ab1f-d12bc8f92a0c.png)\r\n![image](https://user-images.githubusercontent.com/47708655/229683609-864a0cf7-3402-4aa9-a090-cbf495ba30ec.png)\r\nI saw that the image in BGR format is used as input in the open_pose/body.py file, but the huggingface demo uses a BGR format image. What is the impact of this?",
    "url": "https://github.com/huggingface/controlnet_aux/issues/18",
    "state": "open",
    "labels": [],
    "created_at": "2023-04-04T03:58:38Z",
    "updated_at": "2023-04-04T11:23:33Z",
    "user": "ZihaoW123"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5702,
    "title": "Is it possible or how to define a `datasets.Sequence` that could potentially be either a dict, a str, or None?",
    "body": "### Feature request\n\nHello! Apologies if my question sounds naive:\r\n\r\nI was wondering if it\u2019s possible, or how one would go about defining a 'datasets.Sequence' element in datasets.Features that could potentially be either a dict, a str, or None?\r\n\r\nSpecifically, I\u2019d like to define a feature for a list that contains 18 elements, each of which has been pre-defined as either a `dict or None` or `str or None` - as demonstrated in the slightly misaligned data provided below:\r\n\r\n```json\r\n[\r\n  [\r\n    {\"text\":\"\u8001\u5987\u4eba\",\"idxes\":[0,1,2]},null,{\"text\":\"\u8dea\",\"idxes\":[3]},null,null,null,null,{\"text\":\"\u5728\u90a3\u5751\u91cc\",\"idxes\":[4,5,6,7]},null,null,null,null,null,null,null,null,null,null],\r\n  [\r\n    {\"text\":\"\u90a3\u4e9b\u6c34\",\"idxes\":[13,14,15]},null,{\"text\":\"\u8200\",\"idxes\":[11]},null,null,null,null,null,{\"text\":\"\u5728\u90a3\u5751\u91cc\",\"idxes\":[4,5,6,7]},null,{\"text\":\"\u51fa\",\"idxes\":[12]},null,null,null,null,null,null,null],\r\n  [\r\n    {\"text\":\"\u6c34\",\"idxes\":[38]},\r\n    null,\r\n    {\"text\":\"\u8200\",\"idxes\":[40]},\r\n    \"\u5047\",  // note this is just a standalone string\r\n    null,null,null,{\"text\":\"\u5751\u91cc\",\"idxes\":[35,36]},null,null,null,null,null,null,null,null,null,null]]\r\n```\n\n### Motivation\n\nI'm currently working with a dataset of the following structure and I couldn't find a solution in the [documentation](https://huggingface.co/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features).\r\n\r\n```json\r\n{\"qid\":\"3-train-1058\",\"context\":\"\u6851\u6851\u5bb3\u6015\u4e86\u3002\u4ece\u7389\u7c73\u5730\u91cc\u8d70\u5230\u7530\u57c2\u4e0a\uff0c\u4ed6\u9065\u671b\u7740\u4ed6\u5bb6\u90a3\u5e62\u8349\u623f\u5b50\u91cc\u7684\u706f\u5149\uff0c\u77e5\u9053\u6bcd\u4eb2\u6ca1\u6709\u8ba9\u4ed6\u56de\u5bb6\u7684\u610f\u601d\uff0c\u5f88\u4f24\u611f\uff0c\u6709\u70b9\u60f3\u54ed\u3002\u4f46\u6ca1\u54ed\uff0c\u8f6c\u8eab\u671d\u963f\u6055\u5bb6\u8d70\u53bb\u3002\",\"corefs\":[[{\"text\":\"\u6851\u6851\",\"idxes\":[0,1]},{\"text\":\"\u4ed6\",\"idxes\":[17]}]],\"non_corefs\":[],\"outputs\":[[{\"text\":\"\u4ed6\",\"idxes\":[17]},null,{\"text\":\"\u8d70\",\"idxes\":[11]},null,null,null,null,null,{\"text\":\"\u4ece\u7389\u7c73\u5730\u91cc\",\"idxes\":[6,7,8,9,10]},{\"text\":\"\u5230\u7530\u57c2\u4e0a\",\"idxes\":[12,13,14,15]},null,null,null,null,null,null,null,null],[{\"text\":\"\u4ed6\",\"idxes\":[17]},null,{\"text\":\"\u8d70\",\"idxes\":[66]},null,null,null,null,null,null,null,{\"text\":\"\u8f6c\u8eab\u671d\u963f\u6055\u5bb6\u53bb\",\"idxes\":[60,61,62,63,64,65,67]},null,null,null,null,null,null,null],[{\"text\":\"\u706f\u5149\",\"idxes\":[30,31]},null,null,null,null,null,null,{\"text\":\"\u8349\u623f\u5b50\u91cc\",\"idxes\":[25,26,27,28]},null,null,null,null,null,null,null,null,null,null],[{\"text\":\"\u4ed6\",\"idxes\":[17]},{\"text\":\"\u4ed6\u5bb6\u90a3\u5e62\u8349\u623f\u5b50\",\"idxes\":[21,22,23,24,25,26,27]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,\"\u8fdc\"],[{\"text\":\"\u4ed6\",\"idxes\":[17]},{\"text\":\"\u963f\u6055\u5bb6\",\"idxes\":[63,64,65]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,\"\u53d8\u8fd1\"]]}\r\n```\n\n### Your contribution\n\nI'm going to provide the dataset at https://huggingface.co/datasets/2030NLP/SpaCE2022 .",
    "url": "https://github.com/huggingface/datasets/issues/5702",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-04-04T03:20:43Z",
    "updated_at": "2023-04-05T14:15:18Z",
    "comments": 4,
    "user": "gitforziio"
  },
  {
    "repo": "pytorch/text",
    "number": 2139,
    "title": "torchtext.vocab.Vectors(..).__getitem__ does not work",
    "body": "## \u2753 Questions and Help\r\n\r\n\r\nI loaded a model:\r\n```python\r\nvects = torchtext.vocab.Vectors('text5-emb.txt')\r\n```\r\nAnd when I want to know whether a vocab is in the dataset or not, I run this:\r\n```python\r\nif \"the\" in vects:\r\n```\r\nand the code stops here. I waited for a long time but it does not do anything.\r\nThen, I loaded the model and set the unk_init to `lambda x: False`\r\nNow, I can use `vects['the']` to know whether the vocab exists or not.\r\n\r\nBut why does not __getitem__ work?\r\n",
    "url": "https://github.com/pytorch/text/issues/2139",
    "state": "closed",
    "labels": [],
    "created_at": "2023-04-03T17:54:45Z",
    "updated_at": "2023-04-04T13:52:53Z",
    "comments": 0,
    "user": "saeeddhqan"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1011,
    "title": "Remove authentication by cookie?",
    "body": "Currently, to be able to return the contents for gated datasets, all the endpoints check the request credentials if needed. The accepted credentials are: HF token, HF cookie, or a JWT in `X-Api-Key`. See https://github.com/huggingface/datasets-server/blob/ecb861b5e8d728b80391f580e63c8d2cad63a1fc/services/api/src/api/authentication.py#L26\r\n\r\nShould we remove the cookie authentication?\r\n\r\ncc @coyotte508 @SBrandeis @XciD @rtrompier ",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1011",
    "state": "closed",
    "labels": [
      "question",
      "P2"
    ],
    "created_at": "2023-04-03T12:12:56Z",
    "updated_at": "2024-03-13T09:48:38Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 63,
    "title": "[Model request] Helsinki-NLP/opus-mt-ru-en (marian)",
    "body": "Sorry for this noob question, can somebody give me a kind of guideline to be able to convert and use \r\n\r\nhttps://huggingface.co/Helsinki-NLP/opus-mt-ru-en/tree/main\r\n\r\nthank you",
    "url": "https://github.com/huggingface/transformers.js/issues/63",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2023-03-31T09:18:28Z",
    "updated_at": "2023-08-20T08:00:38Z",
    "user": "eviltik"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 222,
    "title": "Might not related but wanna ask: does there can have a c++ version?",
    "body": "Hello, wanna ask 2 questions:\r\n\r\n1. will safetensors provides a c++ version, it looks more convenient then pth or onnx;\r\n2. does it possible to load safetensors into some forward lib not just pytorch, such as onnxruntime etc?",
    "url": "https://github.com/huggingface/safetensors/issues/222",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-03-31T05:14:29Z",
    "updated_at": "2023-12-21T01:47:58Z",
    "comments": 5,
    "user": "lucasjinreal"
  },
  {
    "repo": "huggingface/transformers.js",
    "number": 62,
    "title": "[Feature request] nodejs caching",
    "body": "Hi, thank you for your works\r\n\r\nI'm a nodejs user and i read that there is no model cache implementation right now, and you are working on it.\r\n\r\nDo you have an idea of when you will be able to push a release with a cache implementation ?\r\n\r\nJust asking because i was at the point to code it on my side",
    "url": "https://github.com/huggingface/transformers.js/issues/62",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2023-03-31T04:27:57Z",
    "updated_at": "2023-05-15T17:26:55Z",
    "user": "eviltik"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 1001,
    "title": "Add total_rows in /rows response?",
    "body": "Should we add the number of rows in a split (eg. in field `total_rows`) in response to /rows?\r\n\r\nIt would help avoid sending a request to /size to get it.\r\n\r\nIt would also help fix a bad query.\r\n\r\neg: https://datasets-server.huggingface.co/rows?dataset=glue&config=ax&split=test&offset=50000&length=100 returns:\r\n\r\n```json\r\n{\r\n  \"features\": [\r\n    ...\r\n  ],\r\n  \"rows\": []\r\n}\r\n\r\n```\r\n\r\nWe would have to know the number of rows to fix it.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/1001",
    "state": "closed",
    "labels": [
      "question",
      "improvement / optimization"
    ],
    "created_at": "2023-03-30T13:54:19Z",
    "updated_at": "2023-05-07T15:04:12Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/xla",
    "number": 4837,
    "title": "How to run XLA compilation thru MLIR",
    "body": "## \u2753 Questions and Help\r\nHi,\r\nIs there a way to switch pytorch->XLA to compilation through MLIR chain? (StableHLO/MHLO/LMHLO etc.) Or will it appear only after switch to openxla/xla repository? (I see such pull requests in the list, but according to OpenXLA community meeting slides, these repositories should have the same contents).\r\nSo far, using all found env.options, I managed to get dumps only of HLO (non-MLIR) IR and I guess this is a non-MLIR path used by default.\r\n\r\nThank you.",
    "url": "https://github.com/pytorch/xla/issues/4837",
    "state": "closed",
    "labels": [],
    "created_at": "2023-03-30T13:16:28Z",
    "updated_at": "2023-05-22T19:32:41Z",
    "user": "MUR-83"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 999,
    "title": "Use the huggingface_hub webhook server?",
    "body": "See https://github.com/huggingface/huggingface_hub/pull/1410\r\n\r\nThe/webhook endpoint could live in its pod with the huggingface_hub webhook server. Is it useful for our project? Feel free to comment.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/999",
    "state": "closed",
    "labels": [
      "question",
      "refactoring / architecture"
    ],
    "created_at": "2023-03-30T08:44:49Z",
    "updated_at": "2023-06-10T15:04:09Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5687,
    "title": "Document to compress data files before uploading",
    "body": "In our docs to [Share a dataset to the Hub](https://huggingface.co/docs/datasets/upload_dataset), we tell users to upload directly their data files, like CSV, JSON, JSON-Lines, text,... However, these extensions are not tracked by Git LFS by default, as they are not in the `.giattributes` file. Therefore, if they are too large, Git will fail to commit/upload them.\r\n\r\nI think for those file extensions (.csv, .json, .jsonl, .txt), we should better recommend to **compress** their data files (using ZIP for example) before uploading them to the Hub.\r\n- Compressed files are tracked by Git LFS in our default `.gitattributes` file\r\n\r\nWhat do you think?\r\nCC: @stevhliu \r\n\r\nSee related issue:\r\n- https://huggingface.co/datasets/tcor0005/langchain-docs-400-chunksize/discussions/1",
    "url": "https://github.com/huggingface/datasets/issues/5687",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2023-03-30T06:41:07Z",
    "updated_at": "2023-04-19T07:25:59Z",
    "comments": 3,
    "user": "albertvillanova"
  },
  {
    "repo": "pytorch/xla",
    "number": 4831,
    "title": "Increasing rendezvous timeout patience?",
    "body": "## \u2753 Questions and Help\r\n\r\nHi, this might be a basic question but how do I increase the timeout of `xm.rendezvous()`? I'm training a large model and due to the system we're training on saving can take >5 minutes which results in timeout errors such as\r\n\r\n`2023-03-29 13:52:59 172.16.96.171 [1] RuntimeError: tensorflow/compiler/xla/xla_client/mesh_service.cc:364 : Failed to meet rendezvous 'torch_xla.core.xla_model.save': Connection reset by peer (14)`\r\n\r\nSorry if I missed this in the documentation. I might have misinterpreted this error but it seems like a basic rendezvous timeout? Thanks!",
    "url": "https://github.com/pytorch/xla/issues/4831",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2023-03-29T18:38:42Z",
    "updated_at": "2025-05-05T13:20:41Z",
    "user": "bram-w"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5685,
    "title": "Broken Image render on the hub website",
    "body": "### Describe the bug\n\nHi :wave: \r\n\r\nNot sure if this is the right place to ask, but I am trying to load a huge amount of datasets on the hub (:partying_face: ) but I am facing a little issue with the `image` type\r\n\r\n![image](https://user-images.githubusercontent.com/15908060/228587875-427a37f1-3a31-4e17-8bbe-0f759003910d.png)\r\n\r\nSee this [dataset](https://huggingface.co/datasets/Francesco/cell-towers), basically for some reason the first image has numerical bytes inside, not sure if that is okay, but the image render feature **doesn't work**\r\n\r\nSo the dataset is stored in the following way\r\n\r\n```python\r\n    builder.download_and_prepare(output_dir=str(output_dir))\r\n\r\n    ds = builder.as_dataset(split=\"train\")\r\n    # [NOTE] no idea how to push it from the builder folder\r\n    ds.push_to_hub(repo_id=repo_id)\r\n    builder.as_dataset(split=\"validation\").push_to_hub(repo_id=repo_id)\r\n    ds = builder.as_dataset(split=\"test\")\r\n    ds.push_to_hub(repo_id=repo_id)\r\n   ```\r\n   \r\n   The build is this class\r\n   \r\n   ```python\r\n       class COCOLikeDatasetBuilder(datasets.GeneratorBasedBuilder):\r\n\r\n        VERSION = datasets.Version(\"1.0.0\")\r\n\r\n        def _info(self):\r\n            features = datasets.Features(\r\n                {\r\n                    \"image_id\": datasets.Value(\"int64\"),\r\n                    \"image\": datasets.Image(),\r\n                    \"width\": datasets.Value(\"int32\"),\r\n                    \"height\": datasets.Value(\"int32\"),\r\n                    \"objects\": datasets.Sequence(\r\n                        {\r\n                            \"id\": datasets.Value(\"int64\"),\r\n                            \"area\": datasets.Value(\"int64\"),\r\n                            \"bbox\": datasets.Sequence(\r\n                                datasets.Value(\"float32\"), length=4\r\n                            ),\r\n                            \"category\": datasets.ClassLabel(names=categories),\r\n                        }\r\n                    ),\r\n                }\r\n            )\r\n            return datasets.DatasetInfo(\r\n                description=description,\r\n                features=features,\r\n                homepage=homepage,\r\n                license=license,\r\n                citation=citation,\r\n            )\r\n\r\n        def _split_generators(self, dl_manager):\r\n            archive = dl_manager.download(url)\r\n\r\n            return [\r\n                datasets.SplitGenerator(\r\n                    name=datasets.Split.TRAIN,\r\n                    gen_kwargs={\r\n                        \"annotation_file_path\": \"train/_annotations.coco.json\",\r\n                        \"files\": dl_manager.iter_archive(archive),\r\n                    },\r\n                ),\r\n                datasets.SplitGenerator(\r\n                    name=datasets.Split.VALIDATION,\r\n                    gen_kwargs={\r\n                        \"annotation_file_path\": \"test/_annotations.coco.json\",\r\n                        \"files\": dl_manager.iter_archive(archive),\r\n                    },\r\n                ),\r\n                datasets.SplitGenerator(\r\n                    name=datasets.Split.TEST,\r\n                    gen_kwargs={\r\n                        \"annotation_file_path\": \"valid/_annotations.coco.json\",\r\n                        \"files\": dl_manager.iter_archive(archive),\r\n                    },\r\n                ),\r\n            ]\r\n\r\n        def _generate_examples(self, annotation_file_path, files):\r\n            def process_annot(annot, category_id_to_category):\r\n                return {\r\n                    \"id\": annot[\"id\"],\r\n                    \"area\": annot[\"area\"],\r\n                    \"bbox\": annot[\"bbox\"],\r\n                    \"category\": category_id_to_category[annot[\"category_id\"]],\r\n                }\r\n\r\n            image_id_to_image = {}\r\n            idx = 0\r\n\r\n            # This loop relies on the ordering of the files in the archive:\r\n            # Annotation files come first, then the images.\r\n            for path, f in files:\r\n                file_name = os.path.basename(path)\r\n                if annotation_file_path in path:\r\n                    annotations = json.load(f)\r\n                    category_id_to_category = {\r\n                        category[\"id\"]: category[\"name\"]\r\n                        for category in annotations[\"categories\"]\r\n                    }\r\n                    print(category_id_to_category)\r\n                    image_id_to_annotations = collections.defaultdict(list)\r\n                    for annot in annotations[\"annotations\"]:\r\n                        image_id_to_annotations[annot[\"image_id\"]].append(annot)\r\n                    image_id_to_image = {\r\n                        annot[\"file_name\"]: annot for annot in annotations[\"images\"]\r\n                    }\r\n                elif file_name in image_id_to_image:\r\n                    image = image_id_to_image[file_name]\r\n                    objects = [\r\n                        process_annot(annot, category_id_to_category)\r\n                        for annot in image_id_to_annotations[image[\"id\"]]\r\n      ",
    "url": "https://github.com/huggingface/datasets/issues/5685",
    "state": "closed",
    "labels": [],
    "created_at": "2023-03-29T15:25:30Z",
    "updated_at": "2023-03-30T07:54:25Z",
    "comments": 3,
    "user": "FrancescoSaverioZuppichini"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5681,
    "title": "Add information about patterns search order to the doc about structuring repo",
    "body": "Following [this](https://github.com/huggingface/datasets/issues/5650) issue I think we should add a note about the order of patterns that is used to find splits, see [my comment](https://github.com/huggingface/datasets/issues/5650#issuecomment-1488412527). Also we should reference this page in pages about packaged loaders. \r\n\r\nI have a d\u00e9j\u00e0 vu that it had already been discussed as some point but I don't remember....",
    "url": "https://github.com/huggingface/datasets/issues/5681",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2023-03-29T11:44:49Z",
    "updated_at": "2023-04-03T18:31:11Z",
    "comments": 2,
    "user": "polinaeterna"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2273,
    "title": "[BUG] - Chatbot Tutorial - Unterminated string starting at: line 1 column 91 (char 90)",
    "body": "### Add Link\n\nhttps://pytorch.org/tutorials/beginner/chatbot_tutorial.html#chatbot-tutorial\n\n### Describe the bug\n\nI downloaded the zip and extracted it. \r\n\r\nNow I got this error: \r\n\r\n```\r\nProcessing corpus into lines and conversations...\r\n---------------------------------------------------------------------------\r\nJSONDecodeError                           Traceback (most recent call last)\r\n[<ipython-input-14-0fd208236945>](https://localhost:8080/#) in <module>\r\n     11 # Load lines and conversations\r\n     12 print(\"\\nProcessing corpus into lines and conversations...\")\r\n---> 13 lines, conversations = loadLinesAndConversations(os.path.join(corpus, \"utterances.jsonl\"))\r\n     14 \r\n     15 # Write new csv file\r\n\r\n3 frames\r\n[/usr/lib/python3.9/json/decoder.py](https://localhost:8080/#) in raw_decode(self, s, idx)\r\n    351         \"\"\"\r\n    352         try:\r\n--> 353             obj, end = self.scan_once(s, idx)\r\n    354         except StopIteration as err:\r\n    355             raise JSONDecodeError(\"Expecting value\", s, err.value) from None\r\n\r\nJSONDecodeError: Unterminated string starting at: line 1 column 91 (char 90)\r\n\r\n```\r\n\r\nOn this line:\r\n`lines, conversations = loadLinesAndConversations(os.path.join(corpus, \"utterances.jsonl\"))`\r\n\n\n### Describe your environment\n\nI just clicked on the Collab Notebook button and ran it",
    "url": "https://github.com/pytorch/tutorials/issues/2273",
    "state": "open",
    "labels": [
      "bug",
      "question"
    ],
    "created_at": "2023-03-28T21:29:07Z",
    "updated_at": "2024-11-09T02:31:22Z",
    "user": "levalencia"
  },
  {
    "repo": "pytorch/audio",
    "number": 3206,
    "title": "How to train a wav2vec 2.0 pretrain model from scratch ?",
    "body": "### \ud83d\ude80 The feature\n\nThere is an example for hubert training [here](https://github.com/pytorch/audio/tree/main/examples/self_supervised_learning), but  has no example aboult wav2vec 2.0.\n\n### Motivation, pitch\n\nI'm woking on ssl with/without a pretrained model to continue train the pretrained model like wav2vec  2.0 on other dataset,\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/audio/issues/3206",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2023-03-27T13:26:38Z",
    "updated_at": "2023-04-23T09:57:51Z",
    "user": "kobenaxie"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 97654,
    "title": "where is the  engine_layer_visualize.py,isn't removed?",
    "body": "### \ud83d\udc1b Describe the bug\n\nwhere is the  engine_layer_visualize.py,isn't removed?\n\n### Versions\n\nwhere is the  engine_layer_visualize.py,isn't removed?",
    "url": "https://github.com/pytorch/pytorch/issues/97654",
    "state": "closed",
    "labels": [],
    "created_at": "2023-03-27T08:45:04Z",
    "updated_at": "2023-03-27T18:20:59Z",
    "user": "cqray1990"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5671,
    "title": "How to use `load_dataset('glue', 'cola')`",
    "body": "### Describe the bug\n\nI'm new to use HuggingFace datasets but I cannot use `load_dataset('glue', 'cola')`.\r\n\r\n- I was stacked by the following problem:\r\n\r\n```python\r\nfrom datasets import load_dataset\r\ncola_dataset = load_dataset('glue', 'cola')\r\n\r\n---------------------------------------------------------------------------\r\nInvalidVersion                            Traceback (most recent call last)\r\nFile <timed exec>:1\r\n\r\n(Omit because of long error message)\r\n\r\nFile /usr/local/lib/python3.8/site-packages/packaging/version.py:197, in Version.__init__(self, version)\r\n    195 match = self._regex.search(version)\r\n    196 if not match:\r\n--> 197     raise InvalidVersion(f\"Invalid version: '{version}'\")\r\n    199 # Store the parsed out pieces of the version\r\n    200 self._version = _Version(\r\n    201     epoch=int(match.group(\"epoch\")) if match.group(\"epoch\") else 0,\r\n    202     release=tuple(int(i) for i in match.group(\"release\").split(\".\")),\r\n   (...)\r\n    208     local=_parse_local_version(match.group(\"local\")),\r\n    209 )\r\n\r\nInvalidVersion: Invalid version: '0.10.1,<0.11'\r\n```\r\n\r\n- You can check this full error message in my repository: [MLOps-Basics/week_0_project_setup/experimental_notebooks/data_exploration.ipynb](https://github.com/makinzm/MLOps-Basics/blob/eabab4b837880607d9968d3fa687c70177b2affd/week_0_project_setup/experimental_notebooks/data_exploration.ipynb)\r\n\n\n### Steps to reproduce the bug\n\n- This is my repository to reproduce: [MLOps-Basics/week_0_project_setup](https://github.com/makinzm/MLOps-Basics/tree/eabab4b837880607d9968d3fa687c70177b2affd/week_0_project_setup)\r\n\r\n1. cd `/DockerImage` and command `docker build . -t week0`\r\n2. cd `/` and command `docker-compose up`\r\n3. Run `experimental_notebooks/data_exploration.ipynb`\r\n\r\n----\r\n\r\nJust to be sure, I wrote down Dockerfile and requirements.txt\r\n\r\n- Dockerfile\r\n```Dockerfile\r\nFROM python:3.8\r\n\r\nWORKDIR /root/working\r\n\r\nRUN apt-get update && \\\r\n    apt-get install -y python3-dev python3-pip python3-venv && \\\r\n    apt-get clean && \\\r\n    rm -rf /var/lib/apt/lists/*\r\n\r\nCOPY requirements.txt .\r\n\r\nRUN pip3 install --no-cache-dir jupyter notebook && pip install --no-cache-dir -r requirements.txt\r\n\r\nCMD [\"bash\"]\r\n```\r\n\r\n- requirements.txt\r\n```txt\r\npytorch-lightning==1.2.10\r\ndatasets==1.6.2\r\ntransformers==4.5.1\r\nscikit-learn==0.24.2\r\n```\r\n\n\n### Expected behavior\n\nThere is no bug to implement `load_dataset('glue', 'cola')`\n\n### Environment info\n\nI already wrote it.",
    "url": "https://github.com/huggingface/datasets/issues/5671",
    "state": "closed",
    "labels": [],
    "created_at": "2023-03-26T09:40:34Z",
    "updated_at": "2023-03-28T07:43:44Z",
    "comments": 2,
    "user": "makinzm"
  },
  {
    "repo": "pytorch/data",
    "number": 1110,
    "title": "`scan` support",
    "body": "### \ud83d\ude80 The feature\n\nHow does one create an `IterDataPipe` with [`scan`/`fold`](http://learnyouahaskell.com/higher-order-functions) semantics? \n\n### Motivation, pitch\n\nNecessary for pipelines that require some kind of state, eg. label encoding for an unknown number of labels.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/1110",
    "state": "open",
    "labels": [
      "good first issue",
      "help wanted"
    ],
    "created_at": "2023-03-24T18:24:33Z",
    "updated_at": "2023-03-24T22:19:53Z",
    "comments": 3,
    "user": "samuela"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 305,
    "title": "I am doing object detection, app is working fine with android studio emulator. but when run on device it is showing interface as expected, all other buttons working . but when detection is pressed nothing happens . what might be the issue",
    "body": "",
    "url": "https://github.com/pytorch/android-demo-app/issues/305",
    "state": "open",
    "labels": [],
    "created_at": "2023-03-24T12:07:25Z",
    "updated_at": "2023-05-05T15:17:16Z",
    "user": "som1233"
  },
  {
    "repo": "huggingface/optimum",
    "number": 918,
    "title": "Support for LLaMA",
    "body": "### Feature request\n\nA support for exporting LLaMA to ONNX\n\n### Motivation\n\nIt would be great to have one, to apply optimizations and so on\n\n### Your contribution\n\nI could try implementing a support, but I would need an assist on model config even though it should be pretty simmilar to what is already done with GPT-J",
    "url": "https://github.com/huggingface/optimum/issues/918",
    "state": "closed",
    "labels": [
      "onnx"
    ],
    "created_at": "2023-03-23T21:07:30Z",
    "updated_at": "2023-04-17T14:32:37Z",
    "comments": 2,
    "user": "nenkoru"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5665,
    "title": "Feature request: IterableDataset.push_to_hub",
    "body": "### Feature request\r\n\r\nIt'd be great to have a lazy push to hub, similar to the lazy loading we have with `IterableDataset`.\r\n\r\nSuppose you'd like to filter [LAION](https://huggingface.co/datasets/laion/laion400m) based on certain conditions, but as LAION doesn't fit into your disk, you'd like to leverage streaming:\r\n```\r\nfrom datasets import load_dataset\r\n\r\ndataset = load_dataset(\"laion/laion400m\", streaming=True, split=\"train\")\r\n```\r\nThen you could filter the dataset based on certain conditions:\r\n```\r\nfiltered_dataset = dataset.filter(lambda example: example['HEIGHT'] > 400)\r\n```\r\n\r\nIn order to persist this dataset and push it back to the hub, one currently needs to first load the entire filtered dataset on disk and then push:\r\n\r\n```\r\nfrom datasets import Dataset\r\n\r\nDataset.from_generator(filtered_dataset.__iter__).push_to_hub(...)\r\n```\r\nIt would be great if we can instead lazy push to the data to the hub (basically stream the data to the hub), not being limited by our disk size:\r\n```\r\nfiltered_dataset.push_to_hub(\"my-filtered-dataset\")\r\n```\r\n\r\n### Motivation\r\n\r\nThis feature would be very useful for people that want to filter huge datasets without having to load the entire dataset or a filtered version thereof on their local disk.\r\n\r\n### Your contribution\r\n\r\nHappy to test out a PR :)",
    "url": "https://github.com/huggingface/datasets/issues/5665",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-03-23T09:53:04Z",
    "updated_at": "2025-06-06T16:13:22Z",
    "comments": 13,
    "user": "NielsRogge"
  },
  {
    "repo": "pytorch/examples",
    "number": 1128,
    "title": "Question about the difference between at::Tensor and torch::Tensor in PyTorch c++",
    "body": "I think the document of the PyTorch c++ library is not quite complete.\r\nI noticed that there are some codes in the cppdoc use torch::Tensor, especially in the \u201cTensor Basics\u201d and \u201cTensor Creation API\u201d. I can\u2019t find \u201ctorch::Tensor\u201d in \u201cLibrary API\u201d but the \u201cat::Tensor \u201c.\r\nI want to know is there any difference between them, and where can I find a more complete document about \u201cPyTorch cpp\u201d\r\n",
    "url": "https://github.com/pytorch/examples/issues/1128",
    "state": "closed",
    "labels": [],
    "created_at": "2023-03-23T06:59:46Z",
    "updated_at": "2023-03-25T01:56:58Z",
    "comments": 1,
    "user": "Ningreka"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 97364,
    "title": "Confused as to where a script is.",
    "body": "According to pytorch/torch/_C/__init__.pyi.in there's supposed to be a torch/aten script but I can't find it, has this been phased out, because if it has is it in an older version of PyTorch? It's just without it, it completely stops one of the programs I downloaded from working, called Colossalai. It tries to call from aten.upsample_nearest2d_backward.vec and can't. According to ChatGPT the last version of PyTorch it saw, PyTorch 1.9.0 has aten in it, but both versions that you can download from the get started on the PyTorch website don't have it. Any recommendations would be great thanks.\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/97364",
    "state": "closed",
    "labels": [],
    "created_at": "2023-03-22T18:04:44Z",
    "updated_at": "2023-03-24T17:03:18Z",
    "user": "Shikamaru5"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5660,
    "title": "integration with imbalanced-learn",
    "body": "### Feature request\n\nWouldn't it be great if the various class balancing operations from imbalanced-learn were available as part of datasets?\n\n### Motivation\n\nI'm trying to use imbalanced-learn to balance a dataset, but it's not clear how to get the two to interoperate - what would be great would be some examples.  I've looked online, asked gpt-4, but so far not making much progress.\n\n### Your contribution\n\nIf I can get this working myself I can submit a PR with example code to go in the docs",
    "url": "https://github.com/huggingface/datasets/issues/5660",
    "state": "closed",
    "labels": [
      "enhancement",
      "wontfix"
    ],
    "created_at": "2023-03-22T11:05:17Z",
    "updated_at": "2023-07-06T18:10:15Z",
    "comments": 1,
    "user": "tansaku"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1758,
    "title": "\u2753 [Question] The compilation process does not display errors, but the program does not continue...",
    "body": "![image](https://user-images.githubusercontent.com/91169172/226786255-d829be12-65d1-46aa-9e02-a2de67a9662a.png)\r\n![image](https://user-images.githubusercontent.com/91169172/226786304-2ed096a2-6ee2-4901-86f7-b8664d9a2090.png)\r\n![image](https://user-images.githubusercontent.com/91169172/226786332-ae430913-d9bb-4d5f-850b-8dac572076a5.png)\r\nWith resnet it works fine, but with my model it compiles but doesn't output the result. I don't know if there is a problem with Input.",
    "url": "https://github.com/pytorch/TensorRT/issues/1758",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-03-22T02:30:28Z",
    "updated_at": "2023-07-02T00:02:37Z",
    "user": "AllesOderNicht"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 202,
    "title": "`safetensor.torch.save_file()` throws `RuntimeError` - any recommended way to enforce?",
    "body": "was confronted with `RuntimeError: Some tensors share memory, this will lead to duplicate memory on disk and potential differences when loading them again`.\r\nCan we explicitly disregard \"**potential** differences\"?",
    "url": "https://github.com/huggingface/safetensors/issues/202",
    "state": "closed",
    "labels": [],
    "created_at": "2023-03-21T21:24:38Z",
    "updated_at": "2024-06-06T02:29:48Z",
    "comments": 26,
    "user": "drahnreb"
  },
  {
    "repo": "pytorch/text",
    "number": 2125,
    "title": "How to install torchtext for cmake c++?",
    "body": "",
    "url": "https://github.com/pytorch/text/issues/2125",
    "state": "open",
    "labels": [],
    "created_at": "2023-03-21T19:07:38Z",
    "updated_at": "2023-06-06T22:01:16Z",
    "user": "Toocic"
  },
  {
    "repo": "pytorch/data",
    "number": 1104,
    "title": "Add documentation about custom Shuffle and Sharding DataPipe",
    "body": "### \ud83d\udcda The doc issue\n\nTorchData has a few special graph functions to handle Shuffle and Sharding DataPipe. But, we never document what is expected for those graph functions, which leads users to extend custom shuffle and sharding by diving into our code base. \r\n\r\nWe should add clear document about the expected methods attached to Shuffle or Sharding DataPipe.\r\n\r\nThis problem has been discussed in the #1081 as well, but I want to track documentation issue separately\r\n\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/1104",
    "state": "open",
    "labels": [],
    "created_at": "2023-03-21T18:14:29Z",
    "updated_at": "2023-03-21T21:47:32Z",
    "comments": 0,
    "user": "ejguan"
  },
  {
    "repo": "huggingface/optimum",
    "number": 906,
    "title": "Optimum export of whisper raises ValueError: There was an error while processing timestamps, we haven't found a timestamp as last token. Was WhisperTimeStampLogitsProcessor used?",
    "body": "### System Info\n\n```shell\noptimum: 1.7.1\r\nPython: 3.8.3\r\ntransformers: 4.27.2\r\nplatform: Windows 10\n```\n\n\n### Who can help?\n\n@philschmid @michaelbenayoun \n\n### Information\n\n- [ ] The official example scripts\n- [x] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [x] My own task or dataset (give details below)\n\n### Reproduction\n\n1. Convert the model to ONNX:\r\n```\r\npython -m optimum.exporters.onnx --model openai/whisper-tiny.en whisper_onnx/\r\n```\r\n\r\n2. Due to [another bug in the pipeline function](https://github.com/huggingface/optimum/issues/905), you may need to comment out the lines in the generate function which raises an error for unused model kwargs:\r\n\r\nhttps://github.com/huggingface/transformers/blob/48327c57182fdade7f7797d1eaad2d166de5c55b/src/transformers/generation/utils.py#L1104-L1108\r\n\r\n3. Try to transcribe longer audio clip:\r\n```python\r\n\r\nimport onnxruntime\r\nfrom transformers import pipeline, AutoProcessor\r\nfrom optimum.onnxruntime import ORTModelForSpeechSeq2Seq\r\n\r\nwhisper_model_name = './whisper_onnx/'\r\nprocessor = AutoProcessor.from_pretrained(whisper_model_name)\r\nsession_options = onnxruntime.SessionOptions()\r\n\r\nmodel_ort = ORTModelForSpeechSeq2Seq.from_pretrained(\r\n    whisper_model_name,\r\n    use_io_binding=True,\r\n    session_options=session_options\r\n)\r\ngenerator_ort = pipeline(\r\n    task=\"automatic-speech-recognition\",\r\n    model=model_ort,\r\n    feature_extractor=processor.feature_extractor,\r\n    tokenizer=processor.tokenizer,\r\n)\r\n\r\nout = generator_ort(\r\n    'https://xenova.github.io/transformers.js/assets/audio/ted_60.wav',\r\n\r\n    return_timestamps=True,\r\n    chunk_length_s=30,\r\n    stride_length_s=5\r\n)\r\n\r\nprint(f'{out=}')\r\n```\r\n\r\n4. This raises the error:\r\n```python\r\n\u2502   878 \u2502   \u2502   if return_timestamps:                                                              \u2502\r\n\u2502   879 \u2502   \u2502   \u2502   # Last token should always be timestamps, so there shouldn't be                \u2502\r\n\u2502   880 \u2502   \u2502   \u2502   # leftover                                                                     \u2502\r\n\u2502 \u2771 881 \u2502   \u2502   \u2502   raise ValueError(                                                              \u2502\r\n\u2502   882 \u2502   \u2502   \u2502   \u2502   \"There was an error while processing timestamps, we haven't found a time   \u2502\r\n\u2502   883 \u2502   \u2502   \u2502   \u2502   \" WhisperTimeStampLogitsProcessor used?\"                                   \u2502\r\n\u2502   884 \u2502   \u2502   \u2502   )                                                                              \u2502\r\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\r\nValueError: There was an error while processing timestamps, we haven't found a timestamp as last token. Was WhisperTimeStampLogitsProcessor used?\r\n```\r\n\n\n### Expected behavior\n\nThe program should act like the transformers version and not crash:\r\n```python\r\nfrom transformers import pipeline\r\n\r\ntranscriber = pipeline('automatic-speech-recognition', 'openai/whisper-tiny.en')\r\n\r\ntext = transcriber(\r\n    'https://xenova.github.io/transformers.js/assets/audio/ted_60.wav',\r\n\r\n    return_timestamps=True,\r\n    chunk_length_s=30,\r\n    stride_length_s=5\r\n)\r\n\r\nprint(f'{text=}')\r\n# outputs correctly\r\n```\r\n",
    "url": "https://github.com/huggingface/optimum/issues/906",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-03-21T13:45:10Z",
    "updated_at": "2023-03-24T18:26:17Z",
    "comments": 3,
    "user": "xenova"
  },
  {
    "repo": "pytorch/vision",
    "number": 7438,
    "title": "Feedback on Video APIs",
    "body": "### Feedback request\r\n\r\nWith torchaudio's recent success in getting a clean FFMPEG build with a full support for FFMPEG 5 and 6 (something we can't replicate in torchvision easily yet), we are thinking of adopting their API and joining efforts to have a better support for video reading. \r\n\r\nWith that in mind, we were hoping to gather a some feedback from TV users who rely on video reader (or would like to use it but find it hard to do so):\r\n\r\n1. What are your main pain points with our current API?\r\n2. What do you wish was supported? \r\n3. What are the most important features of a video IO for you? \r\n\r\nWe can't promise we'll support everything (of course), but we'd love to gather as much feedback as possible and get as much of it incorporated as possible. \r\n",
    "url": "https://github.com/pytorch/vision/issues/7438",
    "state": "open",
    "labels": [
      "question",
      "needs discussion",
      "module: io",
      "module: video"
    ],
    "created_at": "2023-03-21T13:20:36Z",
    "updated_at": "2024-05-20T14:50:59Z",
    "user": "bjuncek"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5653,
    "title": "Doc: save_to_disk, `num_proc` will affect `num_shards`, but it's not documented",
    "body": "### Describe the bug\n\n[`num_proc`](https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.DatasetDict.save_to_disk.num_proc) will affect `num_shards`, but it's not documented\r\n\n\n### Steps to reproduce the bug\n\nNothing to reproduce\n\n### Expected behavior\n\n[document of `num_shards`](https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.DatasetDict.save_to_disk.num_shards) explicitly says that it depends on `max_shard_size`, it should also mention `num_proc`.\r\n\n\n### Environment info\n\ndatasets main document",
    "url": "https://github.com/huggingface/datasets/issues/5653",
    "state": "closed",
    "labels": [
      "documentation",
      "good first issue"
    ],
    "created_at": "2023-03-21T05:25:35Z",
    "updated_at": "2023-03-24T16:36:23Z",
    "comments": 1,
    "user": "RmZeta2718"
  },
  {
    "repo": "pytorch/kineto",
    "number": 743,
    "title": "Questions about ROCm profiler",
    "body": "Hi @mwootton @aaronenyeshi ,\r\n\r\nI found some interesting results for the models running on NVIDIA A100 and AMD MI210 GPUs. For example, I tested model resnext50_32x4d in [TorchBench](https://github.com/pytorch/benchmark). resnext50_32x4d obtains about 4.89X speedup on MI210. However, when I use PyTorch Profiler to profile models on MI210, the profile trace is strange. The total execution time of resnext50_32x4d is about 32ms on A100 and 7ms on MI210. But in the profile traces, the execution time is about 117ms on A100 and 106ms on MI210. I tested PyTorch 1.13.1 with CUDA 11.7 and ROCm 5.2. And the profile traces have been attached. Do you have any ideas?\r\n\r\nAnother question is that what do the GPU kernels do before the `Profiler Step` in ROCm profiling trace? These kernels take about 45s but no python calling context is shown in the trace view.\r\n\r\n[resnext50.zip](https://github.com/pytorch/kineto/files/11021559/resnext50.zip)\r\n",
    "url": "https://github.com/pytorch/kineto/issues/743",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-03-20T18:11:16Z",
    "updated_at": "2023-10-24T17:39:57Z",
    "user": "FindHao"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 965,
    "title": "Change the limit of started jobs? all kinds -> per kind",
    "body": "Currently, the `QUEUE_MAX_JOBS_PER_NAMESPACE` parameter limits the number of started jobs for the same namespace (user or organization). Maybe we should enforce this limit **per job kind** instead of **globally**.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/965",
    "state": "closed",
    "labels": [
      "question",
      "improvement / optimization"
    ],
    "created_at": "2023-03-20T17:40:45Z",
    "updated_at": "2023-04-29T15:03:57Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 964,
    "title": "Kill a job after a maximum duration?",
    "body": "The heartbeat already allows to detect if a job has crashed and to generate an error in that case. But some jobs can take forever, while not crashing. Should we set a maximum duration for the jobs, in order to save resources and free the queue? I imagine that we could automatically kill a job that takes more than 20 minutes to run, and insert an error in the cache.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/964",
    "state": "closed",
    "labels": [
      "question",
      "improvement / optimization"
    ],
    "created_at": "2023-03-20T17:37:35Z",
    "updated_at": "2023-03-23T13:16:33Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/optimum",
    "number": 903,
    "title": "Support transformers export to ggml format",
    "body": "### Feature request\r\n\r\nggml is gaining traction (e.g. llama.cpp has 10k stars), and it would be great to extend optimum.exporters and enable the community to export PyTorch/Tensorflow transformers weights to the format expected by ggml, having a more streamlined and single-entry export.\r\n\r\nThis could avoid duplicates as\r\nhttps://github.com/ggerganov/llama.cpp/blob/master/convert-pth-to-ggml.py\r\nhttps://github.com/ggerganov/whisper.cpp/blob/master/models/convert-pt-to-ggml.py\r\nhttps://github.com/ggerganov/ggml/blob/master/examples/gpt-j/convert-h5-to-ggml.py\r\n\r\n### Motivation\r\n\r\n/\r\n\r\n### Your contribution\r\n\r\nI could have a look at it and submit a POC, cc @NouamaneTazi @ggerganov\r\n\r\nOpen to contribution as well, I don't expect it to be too much work",
    "url": "https://github.com/huggingface/optimum/issues/903",
    "state": "open",
    "labels": [
      "feature-request",
      "help wanted",
      "exporters"
    ],
    "created_at": "2023-03-20T12:51:51Z",
    "updated_at": "2023-07-03T04:51:18Z",
    "comments": 2,
    "user": "fxmarty"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1749,
    "title": "How to import after compilation",
    "body": "![image](https://user-images.githubusercontent.com/91169172/226314599-ba8a8424-fe2c-421a-827b-2d63e3502057.png)\r\nShow me that I don't have this package when I import torch_tensorrt \r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1749",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-03-20T10:35:37Z",
    "updated_at": "2023-06-29T00:02:42Z",
    "user": "AllesOderNicht"
  },
  {
    "repo": "pytorch/rl",
    "number": 977,
    "title": "[Feature Request] How to implement algorithms with multiple optimise phase like PPG?",
    "body": "## Motivation\r\n\r\nI'm trying to implement [PPG](https://proceedings.mlr.press/v139/cobbe21a) and [DNA](https://arxiv.org/pdf/2206.10027.pdf) algorithms with torchrl, and both algorithms have more than one optimise phase in a single training loop. However, I suggest the [Trainer class](https://pytorch.org/rl/reference/trainers.html) doesn't support multiple loss modules or optimisers.\r\n\r\n\r\n## Solution\r\n\r\nI wish there will be an example code of how to implement the aforementioned algorithms, or alternatively, good guidance on how to customise the Trainer.\r\n\r\n\r\n## Checklist\r\n\r\n- [ x] I have checked that there is no similar issue in the repo \r\n",
    "url": "https://github.com/pytorch/rl/issues/977",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-03-20T04:57:59Z",
    "updated_at": "2023-03-21T06:44:16Z",
    "user": "levilovearch"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5650,
    "title": "load_dataset can't work correct with my image data ",
    "body": "I have about 20000 images in my folder which divided into 4 folders with class names.\nWhen i use load_dataset(\"my_folder_name\", split=\"train\") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked",
    "url": "https://github.com/huggingface/datasets/issues/5650",
    "state": "closed",
    "labels": [],
    "created_at": "2023-03-18T13:59:13Z",
    "updated_at": "2023-07-24T14:13:02Z",
    "comments": 21,
    "user": "WiNE-iNEFF"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 97026,
    "title": "How to get list of all valid devices?",
    "body": "### \ud83d\udcda The doc issue\n\n`torch.testing.get_all_device_types()`\r\nyields all valid devices on the current machine however unlike `torch._tensor_classes` , `torch.testing.get_all_dtypes()`, and `import typing; typing.get_args(torch.types.Device)`, there doesn't seem to be a comprehensive list of all valid device types, which gets listed  when I force an error\r\n\r\n```\r\ntorch.devcie('asdasjdfas')\r\nRuntimeError: Expected one of cpu, cuda, ipu, xpu, mkldnn, opengl, opencl, ideep, hip, ve, fpga, ort, xla, lazy, vulkan, mps, meta, hpu, privateuseone device type at start of device string: asdasjdfas\r\n```\n\n### Suggest a potential alternative/fix\n\n```\r\ntorch._device_names = cpu, cuda, ipu, xpu, mkldnn, opengl, opencl, ideep, hip, ve, fpga, ort, xla, lazy, vulkan, mps, meta, hpu, privateuseone \r\n\r\n```\n\ncc @svekars @carljparker",
    "url": "https://github.com/pytorch/pytorch/issues/97026",
    "state": "open",
    "labels": [
      "module: docs",
      "triaged"
    ],
    "created_at": "2023-03-17T15:37:00Z",
    "updated_at": "2023-03-20T23:49:13Z",
    "user": "dsm-72"
  },
  {
    "repo": "pytorch/kineto",
    "number": 742,
    "title": "How can I get detailed aten::op name like add.Tensor/abs.out?",
    "body": "I wonder if I could trace detailed op name like add.Tensor\u3001add.Scalar\u3001sin.out\u3001abs.out\r\nCurrently the profiler only gives me add/sin/abs, etc.\r\n\r\nIs there a method to acquire detailed dispatched op name?",
    "url": "https://github.com/pytorch/kineto/issues/742",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-03-17T05:25:42Z",
    "updated_at": "2024-04-23T15:31:20Z",
    "user": "Hurray0"
  },
  {
    "repo": "pytorch/cppdocs",
    "number": 16,
    "title": "How to set up pytorch for c++ (with g++) via commandline not cmake",
    "body": "I have a Lapop with a nvidia graphicscard and I'm trying to use pytorch for cuda with g++. But i couldn't find any good information about dependecies e.g and my compiler always trohws errors, I'm currently using this command I found on the internet: \"g++ -std=c++14 main.cpp -I ${TORCH_DIR}/include/torch/csrc/api/include/ -I ${TORCH_DIR}/include/ -L ${TORCH_DIR}/lib/ -L /usr/local/cuda/lib64 -L /usr/local/cuda/nvvm/lib64 -ltorch -lc10 -lc10_cuda -lnvrtc -lcudart_static -ldl -lrt -pthread -o out\", but it just says: \"torch/torch.h: file not found\"",
    "url": "https://github.com/pytorch/cppdocs/issues/16",
    "state": "closed",
    "labels": [],
    "created_at": "2023-03-13T21:15:08Z",
    "updated_at": "2023-03-18T22:36:04Z",
    "user": "usr577"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 924,
    "title": "Support webhook version 3?",
    "body": "The Hub provides different formats for the webhooks. The current version, used in the public feature (https://huggingface.co/docs/hub/webhooks) is version 3. Maybe we should support version 3 soon.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/924",
    "state": "closed",
    "labels": [
      "question",
      "refactoring / architecture"
    ],
    "created_at": "2023-03-13T13:39:59Z",
    "updated_at": "2023-04-21T15:03:54Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5632,
    "title": "Dataset cannot convert too large dictionnary",
    "body": "### Describe the bug\r\n\r\nHello everyone!\r\n\r\nI tried to build a new dataset with the command \"dict_valid = datasets.Dataset.from_dict({'input_values': values_array})\".\r\nHowever, I have a very large dataset (~400Go) and it seems that dataset cannot handle this.\r\n\r\nIndeed, I can create the dataset until a certain size of my dictionnary, and then I have the error \"OverflowError: Python int too large to convert to C long\".\r\n\r\nDo you know how to solve this problem?\r\nUnfortunately I cannot give a reproductible code because I cannot share a so large file, but you can find the code below (it's a test on only a part of the validation data ~10Go, but it's already the case).\r\n\r\nThank you!\r\n\r\n### Steps to reproduce the bug\r\n\r\nSAVE_DIR = './data/'\r\nfeatures = h5py.File(SAVE_DIR+'features.hdf5','r')\r\n\r\nvalid_data = features[\"validation\"][\"data/features\"]\r\n\r\nv_array_values = [np.float32(item[()]) for item in valid_data.values()]\r\nfor i in range(len(v_array_values)):\r\n    v_array_values[i] = v_array_values[i].round(decimals=5)\r\n\r\ndict_valid = datasets.Dataset.from_dict({'input_values': v_array_values})\r\n\r\n### Expected behavior\r\n\r\nThe code is expected to give me a Huggingface dataset.\r\n\r\n### Environment info\r\n\r\npython: 3.8.15\r\nnumpy: 1.22.3\r\ndatasets: 2.3.2\r\npyarrow: 8.0.0",
    "url": "https://github.com/huggingface/datasets/issues/5632",
    "state": "open",
    "labels": [],
    "created_at": "2023-03-13T10:14:40Z",
    "updated_at": "2023-03-16T15:28:57Z",
    "comments": 1,
    "user": "MaraLac"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 96655,
    "title": "What is the state of support for AD of BatchNormalization and DropOut layers?",
    "body": "I have come to this issue from this post.\r\n\r\nhttps://pytorch.org/functorch/stable/notebooks/per_sample_grads.html\r\n\r\n## Background\r\n\r\nWhat I am doing requires per-sample gradient (in fact, I migrated from TF, so I do not have much experience with pytorch, but I have a sufficient understanding of NN training).\r\nWhen reading the post, I could not figure out whether functorch's `vmap` supports AD function of BN and DropOut layers.\r\n\r\nIn my understanding, these layers are relatively popular.\r\nBecause they are not pure functions (different behaviors in training and testing modes), and also not pure (e.g., BN layer accumulates the average across the different forward pass in training mode), which makes me wonder:\r\n\r\n## My questions\r\n1. Does functorch's `vmap` support AD function of BN and DropOut layers?\r\n2. If yes, how does it do that?\r\n\r\nI tried searching for issues with BatchNormalization or DropOut keywords, but the results were fragmented and I still do not know what is the current state now.\r\nOpacus says that only `EmbeddingBag` is not supported (https://github.com/pytorch/opacus/blob/5aa378ea98df9caf8ca1987ee4d636219267d17e/opacus/grad_sample/functorch.py#L22).\r\nCould anyone tell me the answer?\r\n\r\nIf possible, updating the docs to clarify the supports for these layers would be great.\r\n\r\nThank you very much.\n\ncc @zou3519 @Chillee @samdow @soumith @kshitij12345 @janeyx99",
    "url": "https://github.com/pytorch/pytorch/issues/96655",
    "state": "closed",
    "labels": [
      "triaged",
      "module: functorch"
    ],
    "created_at": "2023-03-10T01:47:20Z",
    "updated_at": "2023-03-15T16:02:05Z",
    "user": "tranvansang"
  },
  {
    "repo": "huggingface/ethics-education",
    "number": 1,
    "title": "What is AI Ethics?",
    "body": "With the amount of hype around things like ChatGPT, AI art, etc., there are a lot of misunderstandings being propagated through the media! Additionally, many people are not aware of the ethical impacts of AI, and they're even less aware about the work that folks in academia + industry are doing to ensure that AI systems are being developed and deployed in ways that are equitable, sustainable, etc.\r\n\r\nThis is a great opportunity for us to put together a simple explainer, with some very high-level information aimed at non-technical people, that runs through what AI Ethics is and why people should care. Format-wise, I'm aiming towards something like a light blog post.\r\n\r\nMore specifically, it would be really cool to have something that ties into the categories outlined on [hf.co/ethics](https://hf.co/ethics). A more detailed description is available here on [Google Docs](https://docs.google.com/document/d/19Ga4PX0xbRxMlAwoK-q7Xjuy9B9Z0jFvFuVYdhfcKiY/edit).\r\n\r\nIf you're interested in helping out with this, a great first step would be to collect some resources and start outlining a bullet-point draft on a Google Doc that I can share with you \ud83d\ude04\r\n\r\nI've also got plans for the actual distribution of it (e.g. design-wise, distribution), which I'll follow up with soon.",
    "url": "https://github.com/huggingface/ethics-education/issues/1",
    "state": "open",
    "labels": [
      "help wanted",
      "explainer",
      "audience: non-technical"
    ],
    "created_at": "2023-03-09T20:58:02Z",
    "updated_at": "2023-03-17T14:50:39Z",
    "user": "NimaBoscarino"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 2633,
    "title": "Asymmetric tiling ",
    "body": "Hello.  I'm trying to achieve tiling asymmetrically using Diffusers, in a similar fashion to the asymmetric tiling in Automatic1111's extension https://github.com/tjm35/asymmetric-tiling-sd-webui.\r\n\r\nMy understanding is that I must traverse all layers to alter the padding, in my case circular in X and constant in Y, but I would love to get advice on how to make a such change to the conv2d system in DIffusers.\r\n\r\nYour advice is highly appreciated, as it may also help others down the road facing the same need.",
    "url": "https://github.com/huggingface/diffusers/issues/2633",
    "state": "closed",
    "labels": [
      "good first issue",
      "question"
    ],
    "created_at": "2023-03-09T19:09:34Z",
    "updated_at": "2025-07-29T08:48:27Z",
    "user": "alejobrainz"
  },
  {
    "repo": "huggingface/optimum",
    "number": 874,
    "title": "Assistance exporting git-large to ONNX",
    "body": "Hello! I am looking to export an image captioning Hugging Face model to ONNX (specifically I was playing with the [git-large](https://huggingface.co/microsoft/git-large) model but if anyone knows of one that might be easier to deal with in terms of exporting that is great too)\r\n\r\nI'm trying to follow [these](https://huggingface.co/docs/transformers/serialization#exporting-a-model-for-an-unsupported-architecture) instructions for exporting an unsupported architecture, and I am a bit stuck on figuring out what base class to inherit from and how to define the custom ONNX Configuration since I'm not sure what examples to look at (the model card says this is a transformer decoder model, but it looks like i that it has both encoding and decoding so I am a bit confused)\r\n\r\nI also found [this](https://github.com/huggingface/notebooks/blob/main/examples/onnx-export.ipynb) notebook but I am again not sure if it would work with this sort of model. \r\n\r\nAny comments, advice, or suggestions would be so helpful -- I am feeling a bit stuck with how to proceed in deploying this model in the school capstone project I'm working on. In a worst-case scenario, can I use `from_pretrained` in my application? ",
    "url": "https://github.com/huggingface/optimum/issues/874",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-03-09T18:25:57Z",
    "updated_at": "2025-06-22T02:17:24Z",
    "comments": 3,
    "user": "gracemcgrath"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 190,
    "title": "Rust save ndarray using safetensors",
    "body": "I've been loving this library!\r\n\r\nI have a question, how can I save an ndarray using safetensors?\r\n\r\nhttps://docs.rs/ndarray/latest/ndarray/\r\n\r\nFor context: I am preprocessing data in rust and would like to then load it in python to do machine learning with pytorch.",
    "url": "https://github.com/huggingface/safetensors/issues/190",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2023-03-08T22:29:11Z",
    "updated_at": "2024-01-10T16:48:07Z",
    "comments": 7,
    "user": "StrongChris"
  },
  {
    "repo": "huggingface/optimum",
    "number": 867,
    "title": "Auto-detect framework for large models at ONNX export",
    "body": "### System Info\n\n- `transformers` version: 4.26.1\r\n- Platform: Linux-4.4.0-142-generic-x86_64-with-glibc2.23\r\n- Python version: 3.9.15\r\n- Huggingface_hub version: 0.11.1\r\n- PyTorch version (GPU?): 1.13.0 (True)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: no\r\n- Using distributed or parallel set-up in script?: no\n\n### Who can help?\n\n@sgugger @muellerzr\n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```python\r\nimport torch\r\nimport torch.nn as nn\r\nfrom transformers import GPT2Config, GPT2Tokenizer, GPT2Model\r\n\r\nnum_attention_heads = 40\r\nnum_layers = 40\r\nhidden_size = 5120\r\n\r\nconfiguration = GPT2Config( \r\n                    n_embd=hidden_size,\r\n                    n_layer=num_layers,\r\n                    n_head=num_attention_heads\r\n                )\r\n\r\ntokenizer = GPT2Tokenizer.from_pretrained(\"gpt2\")\r\nmodel = GPT2Model(configuration)\r\n\r\ntokenizer.save_pretrained('gpt2_checkpoint')\r\nmodel.save_pretrained('gpt2_checkpoint')\r\n```\r\n\r\n```shell\r\npython -m transformers.onnx --model=gpt2_checkpoint onnx/\r\n```\n\n### Expected behavior\n\nI created a GPT2 with a parameter volume of 13B. Just for testing, refer to https://huggingface.co/docs/transformers/serialization, I save it to gpt2_checkpoint. Then convert it to onnx using transformers.onnx. Due to the large amount of parameters, `save_pretrained` saves the model as *-0001.bin, *-0002.bin and so on. Later, when running \u2018python -m transformers.onnx --model=gpt2_checkpoint onnx/\u2019, an error `FileNotFoundError: Cannot determine framework from given checkpoint location. There should be a pytorch_model.bin for PyTorch or tf_model.h5 for TensorFlow.` So, I would like to ask how to convert a model with a large number of parameters into onnx for inference. ",
    "url": "https://github.com/huggingface/optimum/issues/867",
    "state": "closed",
    "labels": [
      "feature-request",
      "onnx"
    ],
    "created_at": "2023-03-08T03:43:53Z",
    "updated_at": "2023-03-16T15:52:39Z",
    "comments": 3,
    "user": "WangYizhang01"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1730,
    "title": "\u2753 [Question] Does torch-tensorrt support seq2seq models?",
    "body": "## \u2753 Question\r\nDoes torch-tensorrt support seq2seq models? Are there any documentation/examples?\r\n\r\n\r\n## What you have already tried\r\n\r\nPreviously, when I tried to use TensorRT, I need to convert the original torch seq2seq model to 2 onnx files, then convert them separately to TensorRT using trtexec. Not sure if this has changed with torch-tensorrt. \r\n\r\nThanks!\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1730",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-03-08T00:51:31Z",
    "updated_at": "2023-06-19T00:02:34Z",
    "user": "brevity2021"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1727,
    "title": "complie model failed",
    "body": "## compile model failed with torchtrt-fp32 opt\r\n\r\n#### ERROR INFO\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - Tensor DataType is determined at build time for tensors not marked as input or output.\r\nERROR: [Torch-TensorRT TorchScript Conversion Context] - 4: [graphShapeAnalyzer.cpp::analyzeShapes::1285] Error Code 4: Miscellaneous (IShuffleLayer (Unnamed Layer* 84) [Shuffle]: reshape changes volume. Reshaping [1,512,1,(+ (CEIL_DIV (+ (# 3 (SHAPE input_0)) -4) 4) 1)] to [1,512,0].)\r\nERROR: [Torch-TensorRT TorchScript Conversion Context] - 2: [builder.cpp::buildSerializedNetwork::609] Error Code 2: Internal Error (Assertion enginePtr != nullptr failed. )\r\nterminate called after throwing an instance of 'torch_tensorrt::Error'\r\n  what():  [Error thrown at core/conversion/conversionctx/ConversionCtx.cpp:147] Building serialized network failed in TensorRT\r\n\r\nAborted\r\n\r\n\r\ncode: \r\n\r\n    std::string min_input_shape  =  \"1 3 32 32\";\r\n    std::string opt_input_shape  =  \"1 3 32 512\";\r\n    std::string max_input_shape  =  \"1 3 32 1024\";\r\n\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.11.0):\r\n - CPU Architecture: x86_64\r\n - OS (Linux):\r\n - How you installed PyTorch (`libtorch`):\r\n - Python version:3.8\r\n - CUDA version:11.3\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1727",
    "state": "closed",
    "labels": [
      "question",
      "component: conversion",
      "No Activity"
    ],
    "created_at": "2023-03-07T04:09:45Z",
    "updated_at": "2023-06-18T00:02:24Z",
    "user": "f291400"
  },
  {
    "repo": "pytorch/audio",
    "number": 3153,
    "title": "Google colab notebook pointing to PyTorch 1.13.1",
    "body": "### \ud83d\udcda The doc issue\n\nWhen I open https://pytorch.org/audio/main/tutorials/audio_data_augmentation_tutorial.html in google colab and try running the notebook, I see that the PyTorch version is 1.13.1\r\n![Screenshot 2023-03-06 at 6 17 58 PM](https://user-images.githubusercontent.com/16617092/223302468-664694ef-ddf3-4b67-953e-91fb75a94677.png)\r\n\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/audio/issues/3153",
    "state": "closed",
    "labels": [
      "question",
      "triaged"
    ],
    "created_at": "2023-03-07T02:19:06Z",
    "updated_at": "2023-03-07T15:41:03Z",
    "user": "agunapal"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5615,
    "title": "IterableDataset.add_column is unable to accept another IterableDataset as a parameter.",
    "body": "### Describe the bug\r\n\r\n`IterableDataset.add_column` occurs an exception when passing another `IterableDataset` as a parameter.\r\nThe method seems to accept only eager evaluated values.\r\n\r\nhttps://github.com/huggingface/datasets/blob/35b789e8f6826b6b5a6b48fcc2416c890a1f326a/src/datasets/iterable_dataset.py#L1388-L1391\r\n\r\n\r\nI wrote codes below to make it.\r\n```py\r\ndef add_column(dataset: IterableDataset, name: str, add_dataset: IterableDataset, key: str) -> IterableDataset:\r\n    iter_add_dataset = iter(add_dataset)\r\n\r\n    def add_column_fn(example):\r\n        if name in example:\r\n            raise ValueError(f\"Error when adding {name}: column {name} is already in the dataset.\")\r\n        return {name: next(iter_add_dataset)[key]}\r\n\r\n    return dataset.map(add_column_fn)\r\n```\r\n\r\nIs there other way to do it? Or is it intended?\r\n\r\n### Steps to reproduce the bug\r\n\r\nThie codes below occurs `NotImplementedError`\r\n```py\r\nfrom datasets import IterableDataset\r\n\r\n\r\ndef gen(num):\r\n    yield {f\"col{num}\": 1}\r\n    yield {f\"col{num}\": 2}\r\n    yield {f\"col{num}\": 3}\r\n\r\n\r\nids1 = IterableDataset.from_generator(gen, gen_kwargs={\"num\": 1})\r\nids2 = IterableDataset.from_generator(gen, gen_kwargs={\"num\": 2})\r\nnew_ids = ids1.add_column(\"new_col\", ids1)\r\n\r\nfor row in new_ids:\r\n    print(row)\r\n```\r\n\r\n### Expected behavior\r\n\r\n`IterableDataset.add_column` is able to task `IterableDataset` and lazy evaluated values as a parameter since IterableDataset is lazy evalued.\r\n\r\n### Environment info\r\n- `datasets` version: 2.8.0\r\n- Platform: Linux-3.10.0-1160.36.2.el7.x86_64-x86_64-with-glibc2.17\r\n- Python version: 3.9.7\r\n- PyArrow version: 11.0.0\r\n- Pandas version: 1.5.3\r\n",
    "url": "https://github.com/huggingface/datasets/issues/5615",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2023-03-07T01:52:00Z",
    "updated_at": "2023-03-09T15:24:05Z",
    "comments": 1,
    "user": "zsaladin"
  },
  {
    "repo": "huggingface/safetensors",
    "number": 188,
    "title": "How to extract weights from onnx to safetensors",
    "body": "How to extract weights from onnx to safetensors in rust?",
    "url": "https://github.com/huggingface/safetensors/issues/188",
    "state": "closed",
    "labels": [],
    "created_at": "2023-03-06T09:21:31Z",
    "updated_at": "2023-03-07T14:23:16Z",
    "comments": 2,
    "user": "oovm"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5609,
    "title": "`load_from_disk` vs `load_dataset` performance.",
    "body": "### Describe the bug\n\nI have downloaded `openwebtext` (~12GB) and filtered out a small amount of junk (it's still huge). Now, I would like to use this filtered version for future work. It seems I have two choices:\r\n1. Use `load_dataset` each time, relying on the cache mechanism, and re-run my filtering.\r\n2. `save_to_disk` and then use `load_from_disk` to load the filtered version.\r\n\r\nThe performance of these two approaches is wildly different:\r\n* Using `load_dataset` takes about 20 seconds to load the dataset, and a few seconds to re-filter (thanks to the brilliant filter/map caching)\r\n* Using `load_from_disk` takes 14 minutes! And the second time I tried, the session just crashed (on a machine with 32GB of RAM)\r\n\r\nI don't know if you'd call this a bug, but it seems like there shouldn't need to be two methods to load from disk, or that they should  not take such wildly different amounts of time, or that one should not crash. Or maybe that the docs could offer some guidance about when to pick which method and why two methods exist, or just how do most people do it?\r\n\r\nSomething I couldn't work out from reading the docs was this: can I modify a dataset from the hub, save it (locally) and use `load_dataset` to load it? This [post seemed to suggest that the answer is no](https://discuss.huggingface.co/t/save-and-load-datasets/9260).\n\n### Steps to reproduce the bug\n\nSee above\n\n### Expected behavior\n\nLoad times should be about the same.\n\n### Environment info\n\n- `datasets` version: 2.9.0\r\n- Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31\r\n- Python version: 3.10.8\r\n- PyArrow version: 11.0.0\r\n- Pandas version: 1.5.3",
    "url": "https://github.com/huggingface/datasets/issues/5609",
    "state": "open",
    "labels": [],
    "created_at": "2023-03-05T05:27:15Z",
    "updated_at": "2023-07-13T18:48:05Z",
    "comments": 4,
    "user": "davidgilbertson"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 1856,
    "title": "What it is the ideal sentence size to train with TSDAE? ",
    "body": "I have an unlabeled data that contains 80k texts, with about 250 tokens on average(with bert-base-multilingual-uncased tokenizer). I want to pre-train the model on my dataset, but I'm not sure if the texts are too large. It's possible to break in small sentences, but I'm afraid that some sentences lose context.\r\n\r\nWhat it is the ideal sentence size to train with TSDAE?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/1856",
    "state": "open",
    "labels": [],
    "created_at": "2023-03-04T21:16:14Z",
    "updated_at": "2023-03-04T21:16:14Z",
    "user": "Diegobm99"
  },
  {
    "repo": "huggingface/transformers",
    "number": 21950,
    "title": "auto_find_batch_size should say what batch size it is using",
    "body": "### Feature request\n\nWhen using `auto_find_batch_size=True` in the trainer I believe it identifies the right batch size but then it doesn't log it to the console anywhere?\r\n\r\nIt would be good if it could log what batch size it is using?\n\n### Motivation\n\nI'd like to know what batch size it is using because then I will know roughly how big a batch can fit in memory - this info would be useful elsewhere.\n\n### Your contribution\n\nN/A",
    "url": "https://github.com/huggingface/transformers/issues/21950",
    "state": "closed",
    "labels": [],
    "created_at": "2023-03-04T08:53:25Z",
    "updated_at": "2023-06-28T15:03:39Z",
    "user": "p-christ"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5604,
    "title": "Problems with downloading The Pile",
    "body": "### Describe the bug\n\nThe downloads in the screenshot seem to be interrupted after some time and the last download throws a \"Read timed out\" error.\r\n\r\n![image](https://user-images.githubusercontent.com/11065386/222687870-ec5fcb65-84e8-467d-9593-4ad7bdac4d50.png)\r\n\r\nHere are the downloaded files:\r\n![image](https://user-images.githubusercontent.com/11065386/222688200-454c2288-49e5-4682-96e6-1eb69aca0852.png)\r\n\r\nThey should be all 14GB like here (https://the-eye.eu/public/AI/pile/train/).\r\n\r\nAlternatively, can I somehow download the files by myself and use the datasets preparing script?\n\n### Steps to reproduce the bug\n\ndataset = load_dataset('the_pile', split='train', cache_dir='F:\\datasets')\n\n### Expected behavior\n\nThe files should be downloaded correctly.\n\n### Environment info\n\n- `datasets` version: 2.10.1\r\n- Platform: Windows-10-10.0.22623-SP0\r\n- Python version: 3.10.5\r\n- PyArrow version: 9.0.0\r\n- Pandas version: 1.4.2",
    "url": "https://github.com/huggingface/datasets/issues/5604",
    "state": "closed",
    "labels": [],
    "created_at": "2023-03-03T09:52:08Z",
    "updated_at": "2023-10-14T02:15:52Z",
    "comments": 7,
    "user": "sentialx"
  },
  {
    "repo": "huggingface/optimum",
    "number": 842,
    "title": "Auto-TensorRT engine compilation, or improved documentation for it",
    "body": "### Feature request\n\nFor decoder models with cache, it can be painful to manually compile the TensorRT engine as ONNX Runtime does not give options to specify shapes. The engine build could maybe be done automatically.\r\n\r\nThe current doc is only for `use_cache=False`, which is not very interesting. It could be improved to show how to pre-build the TRT with use_cache=True.\r\n\r\nReferences:\r\nhttps://huggingface.co/docs/optimum/main/en/onnxruntime/usage_guides/gpu#tensorrt-engine-build-and-warmup\r\nhttps://github.com/microsoft/onnxruntime/issues/13559\n\n### Motivation\n\nTensorRT is fast\n\n### Your contribution\n\nwill work on it sometime",
    "url": "https://github.com/huggingface/optimum/issues/842",
    "state": "open",
    "labels": [
      "feature-request",
      "onnxruntime"
    ],
    "created_at": "2023-03-02T13:50:17Z",
    "updated_at": "2023-05-31T12:47:40Z",
    "comments": 4,
    "user": "fxmarty"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2230,
    "title": "model.train(False) affects gradient tracking?",
    "body": "In this tutorial here it says in the comment that \"# We don't need gradients on to do reporting\". From what I understand the train flag only affects layers such as dropout and batch-normalization. Does it also affect gradient calculations, or is this comment wrong?\r\n\r\nhttps://github.com/pytorch/tutorials/blob/6bd30cf214bf541a1c5d35cc45d10a381f57af1b/beginner_source/introyt/trainingyt.py#L293\n\ncc @suraj813",
    "url": "https://github.com/pytorch/tutorials/issues/2230",
    "state": "closed",
    "labels": [
      "question",
      "intro",
      "docathon-h1-2023",
      "easy"
    ],
    "created_at": "2023-03-02T12:09:13Z",
    "updated_at": "2023-06-01T01:19:02Z",
    "user": "MaverickMeerkat"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5600,
    "title": "Dataloader getitem not working for DreamboothDatasets",
    "body": "### Describe the bug\r\n\r\n Dataloader getitem is not working as before (see example of [DreamboothDatasets](https://github.com/huggingface/peft/blob/main/examples/lora_dreambooth/train_dreambooth.py#L451C14-L529))\r\nmoving Datasets to 2.8.0 solved the issue.\r\n\r\n### Steps to reproduce the bug\r\n\r\n1- using DreamBoothDataset to load some images \r\n2- error after loading when trying to visualise the images \r\n\r\n### Expected behavior\r\n\r\nI was expecting a numpy array of the image\r\n\r\n### Environment info\r\n\r\n- Platform: Linux-5.10.147+-x86_64-with-glibc2.29\r\n- Python version: 3.8.10\r\n- PyArrow version: 9.0.0\r\n- Pandas version: 1.3.5",
    "url": "https://github.com/huggingface/datasets/issues/5600",
    "state": "closed",
    "labels": [],
    "created_at": "2023-03-02T11:00:27Z",
    "updated_at": "2023-03-13T17:59:35Z",
    "comments": 1,
    "user": "salahiguiliz"
  },
  {
    "repo": "huggingface/trl",
    "number": 180,
    "title": "what is AutoModelForCausalLMWithValueHead?",
    "body": "trl use `AutoModelForCausalLMWithValueHead`\uff0cwhich is base_model(eg: GPT2LMHeadModel) + fc layer\uff0cbut I can't understand why need a fc head layer?",
    "url": "https://github.com/huggingface/trl/issues/180",
    "state": "closed",
    "labels": [],
    "created_at": "2023-02-28T07:46:49Z",
    "updated_at": "2025-02-21T11:29:04Z",
    "user": "akk-123"
  },
  {
    "repo": "pytorch/serve",
    "number": 2162,
    "title": "How to run torchserver without log printing\uff1f",
    "body": "How to run torchserver without log printing\uff1fI didn't see the relevant command line. Could someone tell me, thank you!",
    "url": "https://github.com/pytorch/serve/issues/2162",
    "state": "closed",
    "labels": [
      "triaged",
      "support"
    ],
    "created_at": "2023-02-28T02:22:02Z",
    "updated_at": "2023-03-09T20:06:37Z",
    "user": "mqy9787"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5585,
    "title": "Cache is not transportable",
    "body": "### Describe the bug\n\nI would like to share cache between two machines (a Windows host machine and a WSL instance).\r\n\r\nI run most my code in WSL. I have just run out of space in the virtual drive. Rather than expand the drive size, I plan to move to cache to the host Windows machine, thereby sharing the downloads.\r\n\r\nI'm hoping that I can just copy/paste the cache files, but I notice that a lot of the file names start with the path name, e.g. `_home_davidg_.cache_huggingface_datasets_conll2003_default-451...98.lock` where `home/davidg` is where the cache is in WSL. \r\n\r\nThis seems to suggest that the cache is not portable/cannot be centralised or shared. Is this the case, or are the files that start with path names not integral to the caching mechanism? Because copying the cache files _seems_ to work, but I'm not filled with confidence that something isn't going to break.\r\n\r\nA related issue, when trying to load a dataset that should come from cache (running in WSL, pointing to cache on the Windows host) it seemed to work fine, but it still uses a WSL directory for `.cache\\huggingface\\modules\\datasets_modules`. I see nothing in the docs about this, or how to point it to a different place.\r\n\r\nI have asked a related question on the forum: https://discuss.huggingface.co/t/is-datasets-cache-operating-system-agnostic/32656\n\n### Steps to reproduce the bug\n\nView the cache directory in WSL/Windows.\n\n### Expected behavior\n\nCache can be shared between (virtual) machines and be transportable.\r\n\r\nIt would be nice to have a simple way to say \"Dear Hugging Face packages, please put ALL your cache in `blah/de/blah`\" and have all the Hugging Face packages respect that single location.\n\n### Environment info\n\n```\r\n- `datasets` version: 2.9.0\r\n- Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31\r\n- Python version: 3.10.8\r\n- PyArrow version: 11.0.0\r\n- Pandas version: 1.5.3\r\n- ```",
    "url": "https://github.com/huggingface/datasets/issues/5585",
    "state": "closed",
    "labels": [],
    "created_at": "2023-02-28T00:53:06Z",
    "updated_at": "2023-02-28T21:26:52Z",
    "comments": 2,
    "user": "davidgilbertson"
  },
  {
    "repo": "pytorch/examples",
    "number": 1121,
    "title": "About fast_neural_style",
    "body": "How many rounds did you train in the fast neural style transfer experiment? I operate according to your steps, but the effect of the model I trained is not as good as the model you provided, and why is the model file I trained less than the file you provided by 3kb? I would like to know the reason and look forward to your reply!",
    "url": "https://github.com/pytorch/examples/issues/1121",
    "state": "closed",
    "labels": [
      "help wanted"
    ],
    "created_at": "2023-02-27T15:53:38Z",
    "updated_at": "2023-08-17T09:26:17Z",
    "comments": 2,
    "user": "TOUBH"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1113,
    "title": "How to get the jacobian matrix in GCNs?",
    "body": "Hi, I'm trying to use `jacrev` to get the  jacobians in graph convolution networks, but it seems like I've called the function incorrectly.  \r\n\r\n```python\r\nimport torch.nn.functional as F\r\nimport functorch\r\nimport torch_geometric\r\nfrom torch_geometric.data import Data\r\n\r\nclass GCN(torch.nn.Module):\r\n    def __init__(self, input_dim, hidden_dim, output_dim):\r\n        super().__init__()\r\n        torch.manual_seed(12345)\r\n        \r\n        self.conv1 = torch_geometric.nn.GCNConv(input_dim, hidden_dim, aggr='add')\r\n        self.conv2 = torch_geometric.nn.GCNConv(hidden_dim, output_dim, aggr='add')\r\n        \r\n    def forward(self, x, edge_index):\r\n        x = self.conv1(x, edge_index)\r\n        x = x.relu()\r\n        x = F.dropout(x, p=0.5, training=self.training)\r\n        x = self.conv2(x, edge_index)\r\n        return x\r\n\r\nadj_matrix = torch.ones(3,3)\r\nedge_index = adj_matrix .nonzero().t().contiguous()\r\n\r\ngcn = GCN(input_dim=5, hidden_dim=64, output_dim=5)\r\n\r\nN = (128,3, 5) \r\n\r\nx =torch.randn(N, requires_grad=True) # batch_size:128, node_num:10 , node_feature: 5 \r\n\r\ngraph = Data(x=x, edge_index=edge_index)\r\n\r\ngcn_out = gcn(graph.x, graph.edge_index)\r\n\r\n```\r\nThen I try to compute the jacobians of the input data `x` based on the tutorial, \r\n\r\n```python\r\njacobian = functorch.vmap(functorch.jacrev(gcn))(graph.x, graph.edge_index)\r\n```\r\n\r\nand get the following error message: \r\n\r\n```python\r\nValueError: vmap: Expected all tensors to have the same size in the mapped dimension, got sizes [128, 2] for the mapped dimension\r\n```",
    "url": "https://github.com/pytorch/functorch/issues/1113",
    "state": "open",
    "labels": [],
    "created_at": "2023-02-27T13:23:50Z",
    "updated_at": "2023-02-27T13:24:15Z",
    "user": "pcheng2"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 857,
    "title": "Contribute to https://github.com/huggingface/huggingface.js?",
    "body": "https://github.com/huggingface/huggingface.js is a JS client for the Hub and inference. We could propose to add a client for the datasets-server.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/857",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-02-27T12:27:43Z",
    "updated_at": "2023-04-08T15:04:09Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 852,
    "title": "Store the parquet metadata in their own file?",
    "body": "See https://github.com/huggingface/datasets/issues/5380#issuecomment-1444281177\r\n\r\n> From looking at Arrow's source, it seems Parquet stores metadata at the end, which means one needs to iterate over a Parquet file's data before accessing its metadata. We could mimic Dask to address this \"limitation\" and write metadata in a _metadata/_common_metadata file in to_parquet/push_to_hub, which we could then use to optimize reads (if present). Plus, it's handy that PyArrow can also parse these metadata files.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/852",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-02-27T08:29:12Z",
    "updated_at": "2023-05-01T15:04:07Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1112,
    "title": "Error about using a grad transform with in-place operation is inconsistent with and without DDP",
    "body": "Hi,\r\n\r\nI was using `torch.func` in pytorch 2.0 to compute the Hessian-vector product of a neural network.\r\n\r\nI first used `torch.func.functional_call` to define a functional version of the neural network model, and then proceeded to use `torch.func.jvp` and `torch.func.grad` to compute the hvp.\r\n\r\nThe above works when I was using one gpu without parallel processing. However, when I wrapped the model with Distributed Data Parallel (DDP), it gave the following error:\r\n\r\n`*** RuntimeError: During a grad (vjp, jvp, grad, etc) transform, the function provided attempted to call in-place operation (aten::copy_) that would mutate a captured Tensor. This is not supported; please rewrite the function being transformed to explicitly accept the mutated Tensor(s) as inputs.`\r\n\r\nI am confused about this error, because if there were indeed such in-place operations (which I couldn't find in my model.forward() code), I'd expect this error to occur regardless of DDP. Given the inconsistent behaviour, can I still trust the hvp result when I wasn't using DDP?\r\n\r\nMy torch version: is `2.0.0.dev20230119+cu117`\r\n\r\n",
    "url": "https://github.com/pytorch/functorch/issues/1112",
    "state": "open",
    "labels": [],
    "created_at": "2023-02-24T23:09:30Z",
    "updated_at": "2023-03-14T13:56:55Z",
    "comments": 1,
    "user": "XuchanBao"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5570,
    "title": "load_dataset gives FileNotFoundError on imagenet-1k if license is not accepted on the hub",
    "body": "### Describe the bug\n\nWhen calling ```load_dataset('imagenet-1k')``` FileNotFoundError is raised, if not logged in and if logged in with huggingface-cli but not having accepted the licence on the hub. There is no error once accepting.\n\n### Steps to reproduce the bug\n\n```\r\nfrom datasets import load_dataset\r\n\r\nimagenet = load_dataset(\"imagenet-1k\", split=\"train\", streaming=True)\r\n\r\nFileNotFoundError: Couldn't find a dataset script at /content/imagenet-1k/imagenet-1k.py or any data file in the same directory. Couldn't find 'imagenet-1k' on the Hugging Face Hub either: FileNotFoundError: Dataset 'imagenet-1k' doesn't exist on the Hub\r\n```\r\ntested on a colab notebook.\n\n### Expected behavior\n\nI would expect a specific error indicating that I have to login then accept the dataset licence.\r\n\r\nI find this bug very relevant as this code is on a guide on the [Huggingface documentation for Datasets](https://huggingface.co/docs/datasets/about_mapstyle_vs_iterable)\n\n### Environment info\n\ngoogle colab cpu-only instance",
    "url": "https://github.com/huggingface/datasets/issues/5570",
    "state": "closed",
    "labels": [],
    "created_at": "2023-02-23T16:44:32Z",
    "updated_at": "2023-07-24T15:18:50Z",
    "comments": 2,
    "user": "buoi"
  },
  {
    "repo": "huggingface/optimum",
    "number": 810,
    "title": "ORTTrainer using DataParallel instead of DistributedDataParallel causes downstream errors",
    "body": "### System Info\r\n\r\n```shell\r\noptimum 1.6.4\r\npython 3.8\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n@JingyaHuang @echarlaix \r\n\r\n### Information\r\n\r\n- [X] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nFROM mcr.microsoft.com/azureml/aifx/stable-ubuntu2004-cu117-py38-torch1131:latest\r\nRUN git clone https://github.com/huggingface/optimum.git && cd optimum &&  python setup.py install\r\nRUN python examples/onnxruntime/training/summarization/run_summarization.py --model_name_or_path t5-small --do_train --dataset_name cnn_dailymail --dataset_config \"3.0.0\" --source_prefix \"summarize: \" --predict_with_generate --fp16\r\n\r\n### Expected behavior\r\n\r\nThis is expected to run t5-small with ONNXRuntime, however the model defaults to pytorch execution. I believe this is due to optimum's usage of torch.nn.DataParallel in trainer.py [here](https://github.com/huggingface/optimum/blob/dbb43fb622727f2206fa2a2b3b479f6efe82945b/optimum/onnxruntime/trainer.py#L1576) which is incompatible with ONNXRuntime.\r\n\r\nPyTorch's [official documentation](https://pytorch.org/docs/stable/generated/torch.nn.DataParallel.html) recommends using DistributedDataParallel over DataParallel for multi-gpu training. Is there a reason why DataParallel is used here and, if not, can it be changed to use DistributedDataParallel?",
    "url": "https://github.com/huggingface/optimum/issues/810",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-02-22T22:15:41Z",
    "updated_at": "2023-03-19T19:01:32Z",
    "comments": 2,
    "user": "prathikr"
  },
  {
    "repo": "huggingface/optimum",
    "number": 809,
    "title": "Better Transformer with QA pipeline returns padding issue",
    "body": "### System Info\r\n\r\n```shell\r\nOptimum version: 1.6.4\r\nPlatform: Linux\r\nPython version: 3.10\r\nTransformers version: 4.26.1\r\nAccelerate version: 0.16.0\r\nTorch version: 1.13.1+cu117\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n@philschmid \r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nNotebook link to reproduce the same: https://colab.research.google.com/drive/1g-EzDtvEMIO1VjYBFJDlYWuKoBjaHxDd?usp=sharing\r\n\r\nCode snippet:\r\n```python\r\nfrom optimum.pipelines import pipeline\r\nqa_model = \"bert-large-uncased-whole-word-masking-finetuned-squad\"\r\nreader = pipeline(\"question-answering\", qa_model, accelerator=\"bettertransformer\")\r\nreader(question=[\"What is your name?\", \"What do you like to do in your free time?\"] * 10, context=[\"My name is Bookworm and I like to read books.\"] * 20, batch_size=16)\r\n```\r\n\r\nError persists on both cpu and cuda device. Works as expected if batches passed in require no padding.\r\n\r\nError received:\r\n```\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/app/.venv/lib/python3.10/site-packages/transformers/pipelines/question_answering.py\", line 393, in __call__\r\n    return super().__call__(examples, **kwargs)\r\n  File \"/app/.venv/lib/python3.10/site-packages/transformers/pipelines/base.py\", line 1065, in __call__\r\n    outputs = [output for output in final_iterator]\r\n  File \"/app/.venv/lib/python3.10/site-packages/transformers/pipelines/base.py\", line 1065, in <listcomp>\r\n    outputs = [output for output in final_iterator]\r\n  File \"/app/.venv/lib/python3.10/site-packages/transformers/pipelines/pt_utils.py\", line 124, in __next__\r\n    item = next(self.iterator)\r\n  File \"/app/.venv/lib/python3.10/site-packages/transformers/pipelines/pt_utils.py\", line 266, in __next__\r\n    processed = self.infer(next(self.iterator), **self.params)\r\n  File \"/app/.venv/lib/python3.10/site-packages/torch/utils/data/dataloader.py\", line 628, in __next__\r\n    data = self._next_data()\r\n  File \"/app/.venv/lib/python3.10/site-packages/torch/utils/data/dataloader.py\", line 671, in _next_data\r\n    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration\r\n  File \"/app/.venv/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py\", line 44, in fetch\r\n    return self.collate_fn(data)\r\n  File \"/app/.venv/lib/python3.10/site-packages/transformers/pipelines/base.py\", line 169, in inner\r\n    padded[key] = _pad(items, key, _padding_value, padding_side)\r\n  File \"/app/.venv/lib/python3.10/site-packages/transformers/pipelines/base.py\", line 92, in _pad\r\n    tensor = torch.zeros((batch_size, max_length), dtype=dtype) + padding_value\r\nTypeError: unsupported operand type(s) for +: 'Tensor' and 'NoneType'\r\n```\r\n\r\nThe system versions mentioned above are from my server setup although it seems reproducible from the notebook with different torch/cuda installations!\r\n\r\n### Expected behavior\r\n\r\nExpected behavior is to produce correct results without error.",
    "url": "https://github.com/huggingface/optimum/issues/809",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-02-22T18:51:23Z",
    "updated_at": "2023-02-27T11:29:09Z",
    "comments": 2,
    "user": "vrdn-23"
  },
  {
    "repo": "pytorch/text",
    "number": 2072,
    "title": "how to build  torchtext in cpp wiht  cmake?",
    "body": " HI, guys, I want to use torchtext with liborch  in cpp  like  cmake build torchvision in cpp, but I has try ,but meet some error in windows system,I don't know  why  some dependency subdirectory is empty, how to  build it  then include with cpp ?\r\nthanks\r\n\r\n````\r\n-- Building for: Visual Studio 17 2022\r\n-- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.22621.\r\n-- The C compiler identification is MSVC 19.34.31942.0\r\n-- The CXX compiler identification is MSVC 19.34.31942.0\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped\r\n-- Detecting C compile features\r\n-- Detecting C compile features - done\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped\r\n-- Detecting CXX compile features\r\n-- Detecting CXX compile features - done\r\nCMake Error at third_party/CMakeLists.txt:8 (add_subdirectory):\r\n  The source directory\r\n\r\n    C:/Apps/text-main/third_party/re2\r\n\r\n  does not contain a CMakeLists.txt file.\r\n\r\n\r\nCMake Error at third_party/CMakeLists.txt:9 (add_subdirectory):\r\n  The source directory\r\n\r\n    C:/Apps/text-main/third_party/double-conversion\r\n\r\n  does not contain a CMakeLists.txt file.\r\n\r\n\r\nCMake Error at third_party/CMakeLists.txt:10 (add_subdirectory):\r\n  The source directory\r\n\r\n    C:/Apps/text-main/third_party/sentencepiece\r\n\r\n  does not contain a CMakeLists.txt file.\r\n\r\n\r\nCMake Error at third_party/CMakeLists.txt:11 (add_subdirectory):\r\n  The source directory\r\n\r\n    C:/Apps/text-main/third_party/utf8proc\r\n\r\n  does not contain a CMakeLists.txt file.\r\n\r\n\r\n-- Configuring incomplete, errors occurred!\r\nPS C:\\Apps\\text-main\\build>\r\n\r\n````\r\n",
    "url": "https://github.com/pytorch/text/issues/2072",
    "state": "closed",
    "labels": [],
    "created_at": "2023-02-22T15:33:37Z",
    "updated_at": "2023-02-23T02:53:05Z",
    "user": "mullerhai"
  },
  {
    "repo": "pytorch/xla",
    "number": 4666,
    "title": "Got error when build xla from source",
    "body": "Hi! I am trying to build xla wheel by following the setup guide here: https://github.com/pytorch/xla/blob/master/CONTRIBUTING.md\r\n\r\nI skipped building torch by `pip install torch==1.13.0` into virtualenv, and then run `env BUILD_CPP_TESTS=0 python setup.py bdist_wheel` under pytorch/xla. I got the following error:\r\n\r\n```bash\r\nERROR: /home/ubuntu/pytorch/xla/third_party/tensorflow/tensorflow/compiler/xla/xla_client/BUILD:42:20: Linking tensorflow/compiler/xla/xla_client/libxla_computation_client.so failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc @bazel-out/k8-opt/bin/tensorflow/compiler/xla/xla_client/libxla_computation_client.so-2.params\r\nbazel-out/k8-opt/bin/tensorflow/core/profiler/convert/_objs/xplane_to_tools_data/xplane_to_tools_data.pic.o:xplane_to_tools_data.cc:function tensorflow::profiler::ConvertMultiXSpacesToToolData(tensorflow::profiler::SessionSnapshot const&, std::basic_string_view<char, std::char_traits<char> >, absl::lts_20220623::flat_hash_map<std::string, std::variant<int, std::string>, absl::lts_20220623::container_internal::StringHash, absl::lts_20220623::container_internal::StringEq, std::allocator<std::pair<std::string const, std::variant<int, std::string> > > > const&): error: undefined reference to 'tensorflow::profiler::ConvertHloProtoToToolData(tensorflow::profiler::SessionSnapshot const&, std::basic_string_view<char, std::char_traits<char> >, absl::lts_20220623::flat_hash_map<std::string, std::variant<int, std::string>, absl::lts_20220623::container_internal::StringHash, absl::lts_20220623::container_internal::StringEq, std::allocator<std::pair<std::string const, std::variant<int, std::string> > > > const&)'\r\ncollect2: error: ld returned 1 exit status\r\nTarget //tensorflow/compiler/xla/xla_client:libxla_computation_client.so failed to build\r\nUse --verbose_failures to see the command lines of failed build steps.\r\nINFO: Elapsed time: 1657.036s, Critical Path: 351.63s\r\nINFO: 9274 processes: 746 internal, 8528 local.\r\nFAILED: Build did NOT complete successfully\r\nFailed to build external libraries: ['/home/ubuntu/pytorch/xla/build_torch_xla_libs.sh', '-O', '-D_GLIBCXX_USE_CXX11_ABI=0', 'bdist_wheel']\r\n```",
    "url": "https://github.com/pytorch/xla/issues/4666",
    "state": "closed",
    "labels": [
      "question",
      "build"
    ],
    "created_at": "2023-02-21T19:56:52Z",
    "updated_at": "2025-05-06T13:32:43Z",
    "user": "aws-bowencc"
  },
  {
    "repo": "pytorch/xla",
    "number": 4662,
    "title": "CUDA  momery\uff1ahow can i control xla reserved in total by PyTorch with GPU",
    "body": "## \u2753 Questions and Help\r\nI see xla will reserve almost all memory on GPU\uff0cbut when i run code both with xla and cuda\uff0c it will be error of `torch.cuda.OutOfMemoryError`\u3002\r\n\r\n```python\r\n  File \"/workspace/volume/hqp-nas/xla/mmdetection/mmdet/models/backbones/resnet.py\", line 298, in forward\r\n    out = _inner_forward(x)\r\n  File \"/workspace/volume/hqp-nas/xla/mmdetection/mmdet/models/backbones/resnet.py\", line 275, in _inner_forward\r\n    out = self.conv2(out)\r\n  File \"/root/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/nn/modules/module.py\", line 1194, in _call_impl\r\n    return forward_call(*input, **kwargs)\r\n  File \"/root/anaconda3/envs/pytorch/lib/python3.8/site-packages/mmcv/ops/modulated_deform_conv.py\", line 338, in forward\r\n    output = modulated_deform_conv2d(x, offset, mask, weight1, bias1,\r\n  File \"/root/anaconda3/envs/pytorch/lib/python3.8/site-packages/mmcv/ops/modulated_deform_conv.py\", line 142, in forward\r\n    ext_module.modulated_deform_conv_forward(\r\ntorch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 52.00 MiB (GPU 0; 79.20 GiB total capacity; 752.52 MiB already allocated; 27.25 MiB free; 886.00 MiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF\r\n```\r\n\r\nWe can see there is 80GB in the single card of GPU-A100\u3002but CUDA of Pytorch only 886.00 MiB reserved\uff0cand xla does reserve almost all memory on GPU\u3002if i need cuda to exec operators that xla is not supported\uff0cit need more memory\u3002\r\n\r\n```markdown\r\nTue Feb 21 12:39:45 2023       \r\n+-----------------------------------------------------------+\r\n| NVIDIA-SMI 520.61.05    Driver Version: 520.61.05    CUDA Version: 11.8     |\r\n|-------------------------------+----------------------+----------------------+\r\n| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |\r\n| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |\r\n|                               |                      |               MIG M. |\r\n|===============================+======================+======================|\r\n|   0  NVIDIA A100-SXM...  Off  | 00000000:16:00.0 Off |                    0 |\r\n| N/A   33C    P0    88W / 400W |  81073MiB / 81920MiB |      0%      Default |\r\n|                               |                      |             Disabled |\r\n+-------------------------------+----------------------+----------------------+\r\n                                                                               \r\n+-----------------------------------------------------------------------------+\r\n| Processes:                                                                  |\r\n|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |\r\n|        ID   ID                                                   Usage      |\r\n|=============================================================================|\r\n+-----------------------------------------------------------------------------+\r\n```\r\n\r\nIf i can contorl the size of XLA  reserved\uff0c it will be nice\u3002any answer will be helpful\u3002\r\n",
    "url": "https://github.com/pytorch/xla/issues/4662",
    "state": "closed",
    "labels": [
      "question",
      "xla:gpu"
    ],
    "created_at": "2023-02-21T12:43:09Z",
    "updated_at": "2025-05-07T12:13:34Z",
    "user": "qipengh"
  },
  {
    "repo": "pytorch/kineto",
    "number": 727,
    "title": "How to trace torch cuda time in C++ using kineto\uff1f",
    "body": "**The problem**\r\nHi, I am using the pytorch profile to trace the gpu performance of models, and it works well in python. \r\nFor example: \r\n\r\n```\r\nimport torch\r\nfrom torch.autograd.profiler import profile, record_function\r\n\r\nwith profile(record_shapes=True, use_cuda=True, use_kineto=True, with_stack=False) as prof:\r\n    with record_function(\"model_inference\"):\r\n        a = torch.randn(128, 128, device=torch.device('cuda:0'))\r\n        b = torch.randn(128, 128, device=torch.device('cuda:0'))\r\n        c = a + b\r\n\r\nprint(prof.key_averages().table(sort_by=\"cuda_time_total\", row_limit=50))\r\n```\r\nNow, I want to implement the above code in C++ and get each operator's cuda (kernel) time. But I found very few relevant examples. So I implemented a C++ program against the python interface.\r\n\r\n```\r\n#include <torch/csrc/autograd/profiler_kineto.h>\r\n...\r\n...\r\nconst std::set<torch::autograd::profiler::ActivityType> activities(\r\n      {torch::autograd::profiler::ActivityType::CPU, torch::autograd::profiler::ActivityType::CUDA});\r\n\r\ntorch::autograd::profiler::prepareProfiler(\r\n      torch::autograd::profiler::ProfilerConfig(\r\n        torch::autograd::profiler::ProfilerState::KINETO, false, false), activities);\r\n\r\ntorch::autograd::profiler::enableProfiler(\r\n      torch::autograd::profiler::ProfilerConfig(\r\n        torch::autograd::profiler::ProfilerState::KINETO, false, false), activities);\r\n\r\nauto a = torch::rand({128, 128}, {at::kCUDA});\r\nauto b = torch::rand({128, 128}, {at::kCUDA});\r\nauto c = a + b;\r\n\r\nauto profiler_results_ptr = torch::autograd::profiler::disableProfiler();\r\nconst auto& kineto_events = profiler_results_ptr->events();\r\n\r\nfor (const auto e : kineto_events) {\r\n    std::cout << e.name() << \" \" << e.cudaElapsedUs() << \" \" << e.durationUs()<<std::endl;\r\n}\r\n```\r\nBut the printed cuda time is all equal to -1 like:\r\n```\r\naten::empty -1 847\r\naten::uniform_ -1 3005641\r\naten::rand -1 3006600\r\naten::empty -1 21\r\naten::uniform_ -1 53\r\naten::rand -1 82\r\naten::add -1 156\r\ncudaStreamIsCapturing -1 8\r\n_ZN2at6native90_GLOBAL__N__66_tmpxft_000055e0_00000000_13_DistributionUniform_compute_86_cpp1_ii_f2fea07d43distribution_elementwise_grid_stride_kernelIfLi4EZNS0_9templates4cuda21uniform_and_transformIffLm4EPNS_17CUDAGeneratorImplEZZZNS4_14uniform_kernelIS7_EEvRNS_18TensorIteratorBaseEddT_ENKUlvE_clEvENKUlvE2_clEvEUlfE_EEvSA_T2_T3_EUlP24curandStatePhilox4_32_10E0_ZNS1_27distribution_nullary_kernelIffLi4ES7_SJ_SE_EEvSA_SF_RKSG_T4_EUlifE_EEviNS_15PhiloxCudaStateET1_SF_ -1 2\r\ncudaLaunchKernel -1 3005499\r\ncudaStreamIsCapturing -1 4\r\n_ZN2at6native90_GLOBAL__N__66_tmpxft_000055e0_00000000_13_DistributionUniform_compute_86_cpp1_ii_f2fea07d43distribution_elementwise_grid_stride_kernelIfLi4EZNS0_9templates4cuda21uniform_and_transformIffLm4EPNS_17CUDAGeneratorImplEZZZNS4_14uniform_kernelIS7_EEvRNS_18TensorIteratorBaseEddT_ENKUlvE_clEvENKUlvE2_clEvEUlfE_EEvSA_T2_T3_EUlP24curandStatePhilox4_32_10E0_ZNS1_27distribution_nullary_kernelIffLi4ES7_SJ_SE_EEvSA_SF_RKSG_T4_EUlifE_EEviNS_15PhiloxCudaStateET1_SF_ -1 1\r\ncudaLaunchKernel -1 14\r\nvoid at::native::vectorized_elementwise_kernel<4, at::native::AddFunctor<float>, at::detail::Array<char*, 3> >(int, at::native::AddFunctor<float>, at::detail::Array<char*, 3>) -1 1\r\ncudaLaunchKernel -1 16\r\n```\r\nI carefully compared the differences between the above two programs (python and C++) but did not find the cause of the problem. I also tried other parameter combinations and couldn't get the real cuda time.\r\n\r\n**Expected behavior** \r\nIt can output cuda time of each operator in C++ program like python.\r\n\r\n**Environment version**\r\nOS: CentOS release 7.5 (Final)\r\nnvidia driver version: 460.32.03\r\nCUDA version: 11.2\r\nPyTorch version: 1.9.0+cu111\r\nPython version: 3.6.5\r\nGPU: A10",
    "url": "https://github.com/pytorch/kineto/issues/727",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-02-21T11:37:24Z",
    "updated_at": "2023-10-10T15:07:23Z",
    "user": "TianShaoqing"
  },
  {
    "repo": "pytorch/kineto",
    "number": 726,
    "title": "How to remove log output similar to \u201cActivityProfilerController.cpp:294] Completed Stage: Warm Up\u201d",
    "body": "## What I encounter\r\nwhen I use torch.profie to profie a large model, I found my log file have many lines like:\r\n```\r\nSTAGE:2023-02-21 15:15:48 101902:101902 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101903:101903 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101898:101898 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101899:101899 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101903:101903 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101902:101902 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101898:101898 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101899:101899 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101903:101903 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101902:101902 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101898:101898 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101899:101899 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101903:101903 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101902:101902 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101898:101898 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101903:101903 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101899:101899 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101902:101902 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101903:101903 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101902:101902 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101903:101903 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101898:101898 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101899:101899 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101902:101902 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101903:101903 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101902:101902 ActivityProfilerController.cpp:300] Completed Stage: Collection\r\nSTAGE:2023-02-21 15:15:48 101903:101903 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101902:101902 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\nSTAGE:2023-02-21 15:15:48 101898:101898 ActivityProfilerController.cpp:294] Completed Stage: Warm Up\r\n```\r\n## What I expect\r\n\r\nIs there any way to ignore or turn off the output of these useless logs? I tried to set the environment variable `KINETO_LOG_LEVEL` equal to 99, but it didn't work. thanks you all.\r\n\r\n```python\r\nimport os\r\nos.environ.update({'KINETO_LOG_LEVEL' : '99'})\r\n```\r\n\r\n## Version and platform\r\nCentOS-7 Linux\r\ntorch                     1.13.1+cu117              <pip>\r\ntorch-tb-profiler         0.4.1                     <pip>\r\ntorchaudio                0.13.1+cu117              <pip>\r\ntorchvision               0.14.1+cu117              <pip>",
    "url": "https://github.com/pytorch/kineto/issues/726",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-02-21T07:46:59Z",
    "updated_at": "2023-06-22T02:37:44Z",
    "user": "SolenoidWGT"
  },
  {
    "repo": "pytorch/data",
    "number": 1033,
    "title": "Accessing DataPipe state with MultiProcessingReadingService",
    "body": "Hi TorchData team,\r\n\r\nI'm wondering how to access the state of the datapipe in the multi-processing context with DataLoader2 + MultiProcessingReadingService. When using no reading service, we can simply access the graph using `dataloader.datapipe`, then I can easily access the state of my datapipe using the code shown below.\r\n\r\nHowever, in the multi processing case, the datapipe graph is replaced with QueueWrapper instances, and I cannot find any way to communicate with the workers to get access to the state of the data pipe (and I get the error that my StatefulIterator cannot be found on the datapipe). If I access `dl2._datapipe_before_reading_service_adapt` I do get the initial state only which makes sense since there is no state sync between the main and worker processes.\r\n\r\nAs far as I understand, this will also be a blocker for state capturing for proper DataLoader checkpointing when the MultiProcessingReadingService is being used.\r\n\r\nPotentially, could we add a `getstate` communication primitive in `communication.messages` in order to capture the state (via getstate) of a datapipe in a worker process?\r\nWe're also open to using `sharding_round_robin_dispatch` in order to keep more information in the main process but I'm a bit confused on how to use it, if you have some sample code for me for the following case?\r\n\r\nRunning against today's master (commit a3b34a00e7d2b6694ea0d5e21fcc084080a3abae):\r\n\r\n```python\r\nimport torchdata.datapipes as dp\r\nfrom torch.utils.data.graph_settings import get_all_graph_pipes, traverse_dps\r\nfrom torchdata.dataloader2 import DataLoader2, MultiProcessingReadingService\r\n\r\n\r\nclass StatefulIterator(dp.iter.IterDataPipe):\r\n    def __init__(self, datapipe):\r\n        self.datapipe = datapipe\r\n        self.custom_index = 0\r\n\r\n    def __iter__(self):\r\n        self.custom_index = 0\r\n        for item in self.datapipe:\r\n            self.custom_index += 1\r\n            yield item\r\n        self.custom_index = 0\r\n\r\n\r\ndef get_datapipe():\r\n    initial_data = dp.iter.IterableWrapper([1, 2, 3, 4])\r\n    stateful_data = StatefulIterator(initial_data)\r\n    sharded_data = stateful_data.sharding_filter()\r\n    return sharded_data\r\n\r\n\r\ndef get_datapipe_state(datapipe):\r\n    graph = traverse_dps(datapipe)\r\n    all_pipes = get_all_graph_pipes(graph)\r\n    for pipe in all_pipes:\r\n        if hasattr(pipe, \"custom_index\"):\r\n            return pipe.custom_index\r\n\r\n    raise ValueError(\"This datapipe does not contain a StatefulIterator.\")\r\n\r\n\r\ndef main_no_multiprocessing():\r\n    dp = get_datapipe()\r\n    dl2 = DataLoader2(dp)\r\n    for item in dl2:\r\n        print(\"Custom index\", get_datapipe_state(dl2.datapipe))\r\n        print(\"Item\", item)\r\n\r\n\r\ndef main_multiprocessing():\r\n    dp = get_datapipe()\r\n    dl2 = DataLoader2(dp, reading_service=MultiProcessingReadingService(num_workers=4))\r\n    for item in dl2:\r\n        print(\"Custom index\", get_datapipe_state(dl2.datapipe))\r\n        print(\"Item\", item)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    main_no_multiprocessing()\r\n    main_multiprocessing()\r\n```\r\n\r\ncc: @ejguan @VitalyFedyunin @NivekT ",
    "url": "https://github.com/meta-pytorch/data/issues/1033",
    "state": "closed",
    "labels": [],
    "created_at": "2023-02-20T15:01:44Z",
    "updated_at": "2025-08-25T06:43:11Z",
    "comments": 9,
    "user": "jhoareau"
  },
  {
    "repo": "pytorch/benchmark",
    "number": 1420,
    "title": "How to enable jit with nvfuser testing",
    "body": "I want to benchmark models in torchbenchmark with jit and nvfuser. I want to also dump the graph fused.\r\nI tried following command, but nothing is printed.\r\nPYTORCH_JIT_LOG_LEVEL=\">>graph_fuser\" python3 ../../run.py resnet50 -d cuda -m jit -t train",
    "url": "https://github.com/pytorch/benchmark/issues/1420",
    "state": "closed",
    "labels": [],
    "created_at": "2023-02-20T14:26:50Z",
    "updated_at": "2023-03-07T16:20:49Z",
    "user": "fxing-GitHub"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1680,
    "title": "\u2753 [Question]just import  acc_tracer speed up my code",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\nI use torch_tensortt compile a trt model,when I use the model to inference video ,I found when I add a line `import torch_tensorrt.fx.tracer.acc_tracer.acc_tracer as acc_tracer` , the code ran faster.\r\nTime spent on the original code:\r\n![1](https://user-images.githubusercontent.com/38580985/219603277-c5f2904a-7d8b-425a-8595-968c7157d58f.JPG)\r\nTime spent on the code with add  `import torch_tensorrt.fx.tracer.acc_tracer.acc_tracer as acc_tracer`:\r\n![2](https://user-images.githubusercontent.com/38580985/219603543-deb21971-c1c1-4a63-bbdb-58d4c651b20c.JPG)\r\nI don't know why this happened.\r\n\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):1.13.0\r\n - CPU Architecture:\r\n - OS (e.g., Linux):Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:3.10\r\n - CUDA version:11.7\r\n - GPU models and configuration:A4000\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1680",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: fx"
    ],
    "created_at": "2023-02-17T09:19:19Z",
    "updated_at": "2023-05-29T00:02:22Z",
    "user": "T0L0ve"
  },
  {
    "repo": "huggingface/setfit",
    "number": 315,
    "title": "Choosing the datapoints that need to be annotated?",
    "body": "Hello,\r\n\r\nI have a large set of unlabelled data on which I need to do text classification. Since few-shot text classification uses only a handful of datapoints per class, is there a systematic way to choose which datapoints should be chosen for annotation?\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/setfit/issues/315",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-02-16T05:25:03Z",
    "updated_at": "2023-03-06T20:56:22Z",
    "user": "vahuja4"
  },
  {
    "repo": "huggingface/setfit",
    "number": 314,
    "title": "Question: train and deploy via Sagemaker",
    "body": "Hi \r\n\r\nI'm trying to setup training (and hyperparameter tuning) using Amazon SageMaker.\r\nBecause SetFit is not a standard model on HugginFace I'm guessing that the examples provided in the HuggingFace/SageMaker integration are not useable: [example](https://github.com/huggingface/notebooks/tree/ef21344eb20fe19f881c846d5e36c8e19d99647c/sagemaker/01_getting_started_pytorch).\r\n\r\nWhat would the best way to tackle hyperparameter tuning (tuning body and head separately) on SageMaker and track the results?  ",
    "url": "https://github.com/huggingface/setfit/issues/314",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-02-15T12:23:33Z",
    "updated_at": "2024-03-28T15:10:28Z",
    "user": "lbelpaire"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1111,
    "title": "Use functional models inside usual nn.Module",
    "body": "Hi, Thanks for the adding functional features to Pytorch. I want to use a `nn.Module` converted into a functional form inside a usual stateful `nn.Module`.  However, the code below does not correctly register the parameters for the functional module. Is there a way to do this currently? \r\n\r\n\r\n\r\n```python \r\nimport torch\r\nimport optree\r\nimport torch.nn as nn\r\nfrom functorch import make_functional\r\n\r\nx = torch.randn(4, 10)\r\nclass TinyModel(torch.nn.Module):\r\n\r\n    def __init__(self):\r\n        super(TinyModel, self).__init__()\r\n        self.func_l,self.params_l=make_functional(nn.Linear(10,10))\r\n        for i,ele in enumerate(self.params_l):\r\n            self.register_parameter(str(i),ele)\r\n    def forward(self,inputs):\r\n        return self.func_l(self.params_l,inputs)\r\n        \r\nmodel = TinyModel()\r\nfunc, params = make_functional(model)\r\n```\r\n\r\nThis is useful for me as I want to use functional operations over an inner `nn.Module` (such as vmap, jvp, vip) inside the forward pass of an outer `nn.Module`. The idea is to be able to have a lifted version of vjp, jvp, etc, similar to Flax (https://flax.readthedocs.io/en/latest/api_reference/_autosummary/flax.linen.vjp.html).",
    "url": "https://github.com/pytorch/functorch/issues/1111",
    "state": "open",
    "labels": [],
    "created_at": "2023-02-15T08:14:22Z",
    "updated_at": "2023-02-18T09:57:48Z",
    "comments": 1,
    "user": "subho406"
  },
  {
    "repo": "huggingface/setfit",
    "number": 313,
    "title": "Setfit no support evaluate each epoch or step and save model each epoch or step",
    "body": "Hi everyone, can u give me about evaluate each epoch and save checkpoint model ? thanks everyone",
    "url": "https://github.com/huggingface/setfit/issues/313",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-02-15T04:14:24Z",
    "updated_at": "2023-12-06T13:20:50Z",
    "user": "batman-do"
  },
  {
    "repo": "pytorch/vision",
    "number": 7250,
    "title": "Add more docs about how to build a wheel of vision with the all features of video",
    "body": "### \ud83d\ude80 The feature\r\n\r\nNo docs to show how to build a wheel with the all features of video including the video_reader(gpu decoder).\r\n\r\n### Motivation, pitch\r\n\r\nI want to use GPU to accelerate the speed of video decoding.\r\nAnd i find that you support the gpu video decoder.\r\nThere are some questions below\uff1a\r\n1. from https://github.com/pytorch/vision#video-backend, I know that i need ffmpeg or pyav to enable the video feature. However,  both of them do not support GPU originally. So what do i need if i want to use GPU video decoder.\r\n2. No detail docs to show how to build a wheel of vision with GPU video decoder.\r\n3. After gpu decoding\uff0cwhere is the tensor, system memory or gpu memory?\r\n4. What's the data flow of your video processing and inference\uff1f\r\n```\r\n1. Decoding in the gpu memory\r\n2. Downloading to the system memory.\r\n3. Uploading to the gpu memory for inference.\r\n4. Downloading to the system memory.\r\n5. Uploading to gpu memory for encoding.(Maybe it does not exist)\r\n```\r\nor\r\n```\r\n1. Decoding in the gpu memory\r\n2. Inference in the gpu memory directly.\r\n3. Encoding in the gpu memory(Maybe it does not exist)\r\n```\r\n5.Is there any way for video to work with this pipeline\u2014\u20141.decoded by gpu and keep it in the gpu memory. 2.Inference with tensor in gpu memory directly without downloading to the system memory and uploading to gpu memory for inference again.\r\n\r\n\r\nI think you should add these to docs.\r\n\r\n### Alternatives\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/7250",
    "state": "open",
    "labels": [
      "module: documentation",
      "module: video"
    ],
    "created_at": "2023-02-15T01:53:44Z",
    "updated_at": "2023-02-15T08:07:13Z",
    "user": "wqh17101"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2205,
    "title": "During downsampling, bicubic interpolation produces WORSE results than ffmpeg. How can I fix this issue?",
    "body": "I have used \"`bicubic`\" interpolation with `(antialias=True)`. I checked the output downsampled image and found that It crates some artifacts on the image. See the image **[here](https://drive.google.com/file/d/1x1knhzyGpyqfkEjqi8tCxD4Ka_lhpfE5/view?usp=sharing)**,\r\n\r\nHere is my code for downsampling:\r\n\r\n```\r\nfrom torch.nn.functional import interpolate\r\nimg = Image.open(\"image_location\")\r\n#4x down-sampled\r\nds_img = interpolate(transforms.ToTensor()(img).unsqueeze(0),scale_factor=.25,mode = \"bicubic\", antialias=True) \r\ndown_img=transforms.ToPILImage()(ds_img.squeeze().cpu())\r\n```\r\n\r\nThank you\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/2205",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-02-14T17:38:57Z",
    "updated_at": "2023-02-16T14:01:04Z",
    "user": "tahsirmunna"
  },
  {
    "repo": "huggingface/optimum",
    "number": 776,
    "title": "Loss of accuracy when Longformer for SequenceClassification model is exported to ONNX",
    "body": "### Edit: This is a crosspost to [pytorch #94810](https://github.com/pytorch/pytorch/issues/94810). I don't know, where the issue lies.\r\n\r\n### System info\r\n\r\n- `transformers` version: 4.26.1\r\n- Platform: macOS-10.16-x86_64-i386-64bit\r\n- Python version: 3.9.12\r\n- PyTorch version (GPU?): 1.13.0 (False)\r\n- onnx: 1.13.0\r\n- onnxruntime: 1.13.1\r\n\r\n### Who can help?\r\n\r\nI think\r\n@younesbelkada \r\nwould be a great help :) \r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nThis model is trained on client data and I'm not allowed to share the data or the weights, which makes any reproduction of this issue much harder. Please let me know when you need more information.\r\n\r\nHere is the code snippet for the onnx conversion:\r\n\r\nI follow this [tutorial](https://pytorch.org/tutorials/advanced/super_resolution_with_onnxruntime.html), but I also tried your [tutorial](https://huggingface.co/docs/transformers/serialization). The onnx conversion with optimum is not available for Longformer so far and I haven't figured out yet, how to add it.\r\n\r\nconversion:\r\n```python\r\nimport numpy as np\r\nfrom onnxruntime import InferenceSession\r\nfrom tqdm.auto import tqdm\r\nimport torch\r\nfrom transformers import AutoTokenizer, AutoModelForSequenceClassification\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(\"deployment/best_model/\")\r\nmodel = AutoModelForSequenceClassification.from_pretrained(\"deployment/best_model/\")\r\n\r\nmodel.to(\"cpu\")\r\nmodel.eval()\r\n\r\nexample_input = tokenizer(\r\n    dataset[\"test\"][\"text\"][0], max_length=512, truncation=True, return_tensors=\"pt\"\r\n)\r\n_ = model(**example_input)\r\n\r\ntorch.onnx.export(\r\n    model,\r\n    tuple(example_input.values()),\r\n    f=\"model.onnx\",\r\n    input_names=[\"input_ids\", \"attention_mask\"],\r\n    output_names=[\"logits\"],\r\n    dynamic_axes={\r\n        \"input_ids\": {0: \"batch_size\", 1: \"sequence\"},\r\n        \"attention_mask\": {0: \"batch_size\", 1: \"sequence\"},\r\n        \"logits\": {0: \"batch_size\", 1: \"sequence\"},\r\n    },\r\n    do_constant_folding=True,\r\n    opset_version=16,\r\n)\r\n```\r\n\r\nCalculating the accuracy:\r\n```python\r\nsession = InferenceSession(\"deployment/model.onnx\", providers=[\"CPUExecutionProvider\"])\r\n\r\ny_hat_torch = []\r\ny_hat_onnx = []\r\n\r\nfor text in dataset[\"test\"][\"text\"]:\r\n    tok_text = tokenizer(\r\n        text, padding=\"max_length\", max_length=512, truncation=True, return_tensors=\"np\"\r\n    )\r\n    pred = session.run(None, input_feed=dict(tok_text))\r\n    pred = np.argsort(pred[0][0])[::-1][0]\r\n    y_hat_onnx.append(int(pred))\r\n\r\n    tok_text = tokenizer(\r\n        text, padding=\"max_length\", max_length=512, truncation=True, return_tensors=\"pt\"\r\n    )\r\n    pred = model(**tok_text)\r\n    pred = torch.argsort(pred[0][0], descending=True)[0].numpy()\r\n    y_hat_torch.append(int(pred))\r\n\r\nprint(\r\n    f\"Accuracy onnx:{sum([int(i)== int(j) for I, j in zip(y_hat_onnx, dataset['test']['label'])]) / len(y_hat_onnx):.2f}\"\r\n)\r\nprint(\r\n    f\"Accuracy torch:{sum([int(i)== int(j) for I, j in zip(y_hat_torch, dataset['test']['label'])]) / len(y_hat_torch):.2f}\"\r\n)\r\n\r\n``` \r\n\r\nI also looked into the models' weights and the weights for the attention layer differ between torch and onnx. Here is an example:\r\n\r\n```python\r\nimport torch\r\nimport onnx\r\nfrom onnx import numpy_helper\r\n\r\nimport numpy as np\r\nfrom numpy.testing import assert_almost_equal\r\n\r\nfrom transformers import AutoTokenizer, AutoModelForSequenceClassification\r\n\r\nmodel = AutoModelForSequenceClassification.from_pretrained(\"deployment/best_model/\")\r\nonnx_model = onnx.load(\"deployment/model.onnx\")\r\n\r\ngraph = onnx_model.graph\r\n\r\ninitalizers = dict()\r\nfor init in graph.initializer:\r\n    initalizers[init.name] = numpy_helper.to_array(init).astype(np.float16)\r\n\r\nmodel_init = dict()\r\nfor name, p in model.named_parameters():\r\n    model_init[name] = p.detach().numpy().astype(np.float16)\r\n\r\nassert len(initalizers) == len(model_init.keys()) # 53 layers\r\n\r\nassert_almost_equal(initalizers['longformer.embeddings.word_embeddings.weight'], \r\n                    model_init['longformer.embeddings.word_embeddings.weight'], decimal=5)\r\n\r\nassert_almost_equal(initalizers['classifier.dense.weight'], \r\n                    model_init['classifier.dense.weight'], decimal=5)\r\n```\r\n\r\nFor the layer longformer.encoder.layer.0.output.dense.weight, which aligns with onnx::MatMul_6692 in shape and position:\r\n\r\n```\r\nassert_almost_equal(initalizers['onnx::MatMul_6692'], \r\n                    model_init['longformer.encoder.layer.0.output.dense.weight'], decimal=4)\r\n```\r\n\r\nI get\r\n```python\r\nAssertionError: \r\nArrays are not almost equal to 4 decimals\r\n\r\nMismatched elements: 2356293 / 2359296 (99.9%)\r\nMax absolute difference: 1.776\r\nMax relative difference: inf\r\n x: array([[ 0.0106,  0.1076,  0.0801, ...,  0.0425,  0.1548,  0.0123],\r\n       [-0.0399, -0.1415,  0.0916, ...,  0.0181, -0.1277, -0.133",
    "url": "https://github.com/huggingface/optimum/issues/776",
    "state": "closed",
    "labels": [],
    "created_at": "2023-02-14T10:22:12Z",
    "updated_at": "2023-02-17T13:55:17Z",
    "comments": 8,
    "user": "SteffenHaeussler"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 94704,
    "title": "`where` triggers INTERNAL ASSERT FAILED when `out` is a long tensor due to mixed types",
    "body": "### \ud83d\udc1b Describe the bug\n\n`where` triggers INTERNAL ASSERT FAILED when `out` is a long tensor due to mixed types\r\n\r\n```py\r\nimport torch\r\n\r\na = torch.ones(3, 4)\r\nb = torch.zeros(3, 4)\r\nc = torch.where(a > 0, a, b, out=torch.zeros(3, 4, dtype=torch.long))\r\n# RuntimeError: !needs_dynamic_casting<func_t>::check(iter) INTERNAL ASSERT FAILED \r\n# at \"/opt/conda/conda-bld/pytorch_1672906354936/work/aten/src/ATen/native/cpu/Loops.h\":308, \r\n# please report a bug to PyTorch.  \r\n```\n\n### Versions\n\n```\r\nPyTorch version: 2.0.0.dev20230105\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.7\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 22.04.1 LTS (x86_64)\r\nGCC version: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0\r\nClang version: Could not collect\r\nCMake version: version 3.22.1\r\nLibc version: glibc-2.35\r\n\r\nPython version: 3.9.15 (main, Nov 24 2022, 14:31:59)  [GCC 11.2.0] (64-bit runtime)\r\nPython platform: Linux-5.15.0-56-generic-x86_64-with-glibc2.35\r\nIs CUDA available: True\r\nCUDA runtime version: 11.7.99\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration:\r\nGPU 0: NVIDIA GeForce RTX 3090\r\nGPU 1: NVIDIA GeForce RTX 3090\r\nGPU 2: NVIDIA GeForce RTX 3090\r\n\r\nNvidia driver version: 515.86.01\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.4.1\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.4.1\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.4.1\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.4.1\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.4.1\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.4.1\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.4.1\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.23.5\r\n[pip3] torch==2.0.0.dev20230105\r\n[pip3] torchaudio==2.0.0.dev20230105\r\n[pip3] torchvision==0.15.0.dev20230105\r\n[conda] blas                      1.0                         mkl\r\n[conda] mkl                       2021.4.0           h06a4308_640\r\n[conda] mkl-service               2.4.0            py39h7f8727e_0\r\n[conda] mkl_fft                   1.3.1            py39hd3c417c_0\r\n[conda] mkl_random                1.2.2            py39h51133e4_0\r\n[conda] numpy                     1.23.5           py39h14f4228_0\r\n[conda] numpy-base                1.23.5           py39h31eccc5_0\r\n[conda] pytorch                   2.0.0.dev20230105 py3.9_cuda11.7_cudnn8.5.0_0    pytorch-nightly\r\n[conda] pytorch-cuda              11.7                 h67b0de4_2    pytorch-nightly\r\n[conda] pytorch-mutex             1.0                        cuda    pytorch-nightly\r\n[conda] torchaudio                2.0.0.dev20230105      py39_cu117    pytorch-nightly\r\n[conda] torchtriton               2.0.0+0d7e753227            py39    pytorch-nightly\r\n[conda] torchvision               0.15.0.dev20230105      py39_cu117    pytorch-nightly\r\n```\n\ncc @nairbv @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/94704",
    "state": "open",
    "labels": [
      "module: error checking",
      "triaged",
      "module: type promotion"
    ],
    "created_at": "2023-02-12T16:32:30Z",
    "updated_at": "2023-02-27T18:15:01Z",
    "user": "cafffeeee"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 94699,
    "title": "How to correct TypeError: zip argument #1 must support iteration training in multiple GPU",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI am doing a creating custom pytorch layer and model training using `Trainer API` function on top of `Hugging face` model.\r\n\r\nWhen I run on `single GPU`, it trains fine. But when I train it on `multiple GPU` it throws me error.\r\n\r\n`TypeError: zip argument #1 must support iteration training in multiple GPU`\r\n\r\nData Creation Code:\r\n\r\n```\r\ntrain_ex ={'texts':[x[0] for x in train_set],'tag_names':[x[1] for x in train_set]}\r\ntrain_data = tokenize_and_align_labels(train_ex,label2id)\r\n_=train_data.pop('offset_mapping')\r\n\r\nclass MyDataset(torch.utils.data.Dataset):\r\n    def __init__(self, examples):\r\n        self.encodings = examples        \r\n        self.labels = examples['labels']\r\n    def __getitem__(self, idx):\r\n        item = {k: torch.tensor(v[idx]) for k, v in self.encodings.items()}\r\n        item[\"labels\"] = torch.tensor([self.labels[idx]])\r\n        return item    def __len__(self):\r\n        return len(self.labels)\r\ntrain_data=MyDataset(train_data)\r\n```\r\n\r\n**Training Code**\r\n\r\n    bert_model = BertForTokenClassification.from_pretrained( model_checkpoint,id2label=id2label,label2id=label2id)\r\n    bert_model.config.output_hidden_states=True\r\n\r\n\r\n    class BERT_CUSTOM(nn.Module):\r\n        \r\n        \r\n        def __init__(self, bert_model,id2label,num_labels):\r\n            \r\n            \r\n            \r\n            super(BERT_CUSTOM, self).__init__()\r\n            self.bert = bert_model\r\n            self.config=self.bert.config\r\n            self.dropout = nn.Dropout(0.25)\r\n            self.classifier = nn.Linear(768, num_labels)\r\n            self.crf = CRF(num_labels, batch_first = True)\r\n            \r\n        \r\n        def forward(self, input_ids, attention_mask,  labels=None, token_type_ids=None):\r\n            \r\n            outputs = self.bert(input_ids, attention_mask=attention_mask)\r\n            sequence_output = torch.stack((outputs[1][-1], outputs[1][-2], outputs[1][-3], outputs[1][-4])).mean(dim=0)\r\n            sequence_output = self.dropout(sequence_output)\r\n            emission = self.classifier(sequence_output) # [32,256,21] logits\r\n            \r\n            if labels is not None:\r\n                \r\n                labels=labels.reshape(attention_mask.size()[0],attention_mask.size()[1])\r\n                loss = -self.crf(log_soft(emission, 2), labels, mask=attention_mask.type(torch.uint8), reduction='mean')\r\n                prediction = self.crf.decode(emission, mask=attention_mask.type(torch.uint8))\r\n                return [loss, prediction]\r\n                    \r\n            else:\r\n                \r\n                prediction = self.crf.decode(emission, mask=attention_mask.type(torch.uint8))\r\n                prediction=[id2label[k] for k in prediction]\r\n                return prediction\r\n\r\n\r\n**Training API**\r\n\r\n    model = BERT_CUSTOM(bert_model, id2label,num_labels=len(label2id))\r\n    model.to(device)\r\n    \r\n    args = TrainingArguments(\r\n        \"model\",\r\n        save_strategy=\"epoch\",\r\n        learning_rate=2e-5,\r\n        num_train_epochs=2,\r\n        weight_decay=0.01,\r\n        per_device_train_batch_size=32,\r\n        fp16=True\r\n        \r\n    )\r\n    \r\n    trainer = Trainer(\r\n        model=model,\r\n        args=args,\r\n        train_dataset=train_data,\r\n        tokenizer=tokenizer)\r\n    \r\n    trainer.train()\r\n\r\n### Versions\r\n\r\n'1.7.1+cu110'\r\n\r\n\r\n**Error**\r\n\r\n\r\n\r\nHere is the complete traceback:\r\n\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"spanbert_model_check.py\", line 263, in <module>\r\n    trainer.train()\r\n  File \"/opt/conda/lib/python3.7/site-packages/transformers/trainer.py\", line 1531, in train\r\n    ignore_keys_for_eval=ignore_keys_for_eval,\r\n  File \"/opt/conda/lib/python3.7/site-packages/transformers/trainer.py\", line 1775, in _inner_training_loop\r\n    tr_loss_step = self.training_step(model, inputs)\r\n  File \"/opt/conda/lib/python3.7/site-packages/transformers/trainer.py\", line 2523, in training_step\r\n    loss = self.compute_loss(model, inputs)\r\n  File \"/opt/conda/lib/python3.7/site-packages/transformers/trainer.py\", line 2555, in compute_loss\r\n    outputs = model(**inputs)\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py\", line 727, in _call_impl\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py\", line 162, in forward\r\n    return self.gather(outputs, self.output_device)\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py\", line 174, in gather\r\n    return gather(outputs, output_device, dim=self.dim)\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py\", line 68, in gather\r\n    res = gather_map(outputs)\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py\", line 63, in gather_map\r\n    return type(out)(map(gather_map, zip(*outputs)))\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py\", line 63, in gather_map\r\n    return type(out)(map(gather_",
    "url": "https://github.com/pytorch/pytorch/issues/94699",
    "state": "closed",
    "labels": [],
    "created_at": "2023-02-12T13:37:47Z",
    "updated_at": "2023-05-12T11:27:46Z",
    "user": "pratikchhapolika"
  },
  {
    "repo": "pytorch/data",
    "number": 1005,
    "title": "\"torchdata=0.4.1=py38\" and Conda runtime error \"glibc 2.29\" not found. ",
    "body": "### \ud83d\udc1b Describe the bug\n\nI installed \"torchdata=0.4.1=py38\" in a Conda environment. \r\nWhen I run the code, there is an error, \"glibc 2.29\" not found.\r\n\r\nOur cluster run on Centos 8.5 and only has upto \"glibc 2.28\" . \r\n\r\nIs \"torchdata 0.4.1\"  compatible with \"glibc 2.28\"?\r\nIs there a conda build  that support gilbc 2.28?\r\nOr, is there a workaround to make \"torchdata 0.4.1\" work with clusters having only \"glibc 2.28\" . \n\n### Versions\n\ntorchdata=0.4.1\r\npy38\r\nglibc 2.28\r\nconda 23.1.0",
    "url": "https://github.com/meta-pytorch/data/issues/1005",
    "state": "closed",
    "labels": [],
    "created_at": "2023-02-11T03:26:10Z",
    "updated_at": "2023-02-13T14:29:56Z",
    "comments": 1,
    "user": "mahm1846"
  },
  {
    "repo": "huggingface/setfit",
    "number": 310,
    "title": "How does predict_proba work exactly ?",
    "body": "Hi everyone !\r\n\r\nThanks for this amazing package first ! it is more than useful for a project at my work currently ! and the 0.6.0 was much needed on my side !\r\n\r\nBUT i'd like to have some clarifications on how the function predict_proba works because I have a hard understanding.\r\n\r\nThis table : \r\n<html>\r\n<body>\r\n<!--StartFragment-->\r\n\r\nscore | predicted | pred_proba_0 | pred_proba_1\r\n-- | -- | -- | --\r\n1 | 1 | 0.866082 | 0.133918\r\n1 | 1 | 0.762696 | 0.237304\r\n1 | 1 | 0.730971 | 0.269029\r\n1 | 1 | 0.871808 | 0.128192\r\n1 | 1 | 0.671637 | 0.328363\r\n1 | 1 | 0.780433 | 0.219567\r\n1 | 1 | 0.652668 | 0.347332\r\n1 | 0 | 0.767050 | 0.232950\r\n\r\n<!--EndFragment-->\r\n</body>\r\n</html>\r\n\r\nThe score column is the true outcome, predicted is what the predict method gives me when I'm doing inference.\r\npred_proba_0 and pred_proba_1 are given from this code : \r\nvalidate_dataset['pred_proba_0'] = trainer.model.predict_proba(validate_dataset['Fulltext_clean_translated+metadata_clean_translated'].to_list(),as_numpy=True)[:,0]\r\nvalidate_dataset['pred_proba_1'] = trainer.model.predict_proba(validate_dataset['Fulltext_clean_translated+metadata_clean_translated'].to_list(),as_numpy=True)[:,1]\r\n\r\nAlso when I use this code : \r\nmodel.predict_proba(validate_dataset['Fulltext_clean_translated+metadata_clean_translated'].to_list(),as_numpy=True)\r\nI have this output : \r\narray([[9.1999289e-07, 9.9999905e-01],\r\n       [7.2725675e-07, 9.9999928e-01],\r\n       [8.1967613e-07, 9.9999917e-01],\r\n       ...,\r\n       [9.4037086e-06, 9.9999058e-01],\r\n       [9.1749916e-07, 9.9999905e-01],\r\n       [1.2628381e-06, 9.9999869e-01]], dtype=float32)\r\n\r\nmy question is , i'd like to know if the predict_proba output gives (probability to predict 0 , probability to predict 1) ?\r\nIt doesn't seem like it because of this line  : \r\n<html>\r\n<body>\r\n<!--StartFragment-->\r\n\r\n229 | 0 | 1 | 0.694485 | 0.305515\r\n-- | -- | -- | -- | --\r\n\r\n\r\n<!--EndFragment-->\r\n</body>\r\n</html>\r\n\r\nsomething is strange also train.model.predict_proba doesn't give the same result as model.predict_proba... can someone please explain to help me understand ?\r\n\r\nThank you very much !",
    "url": "https://github.com/huggingface/setfit/issues/310",
    "state": "open",
    "labels": [
      "question",
      "needs verification"
    ],
    "created_at": "2023-02-10T14:13:13Z",
    "updated_at": "2023-11-15T08:24:38Z",
    "user": "doubianimehdi"
  },
  {
    "repo": "pytorch/examples",
    "number": 1112,
    "title": "word_language_model with torch.nn.modules.transformer",
    "body": "The `torch.nn.modules.transformer` documentation says the `word_language_model` example in this repo is an example of its use. But it seems to instead DIY a transformer and uses that instead. Is this intentional? I would offer my help to write it for `torch.nn.modules.transformer` but I'm here to learn how to use it.",
    "url": "https://github.com/pytorch/examples/issues/1112",
    "state": "open",
    "labels": [
      "good first issue",
      "nlp",
      "docs"
    ],
    "created_at": "2023-02-09T19:31:43Z",
    "updated_at": "2023-02-21T04:05:42Z",
    "comments": 2,
    "user": "olafx"
  },
  {
    "repo": "pytorch/examples",
    "number": 1111,
    "title": "\ud83d\ude80 Feature request / I want to contribute an algorithm",
    "body": "<!--\r\nThank you for suggesting an idea to improve pytorch/examples\r\n\r\nPlease fill in as much of the template below as you're able.\r\n-->\r\n\r\n## Is your feature request related to a problem? Please describe.\r\n<!-- Please describe the problem you are trying to solve. -->\r\n\r\nCurrently, PyTorch/examples does not have an implementation of the forward forward algorithm.[forward forward algorithm.](https://arxiv.org/abs/2212.13345)  This algorithm is a new learning procedure for neural networks and has promising approach to training neural networks, it is also becoming popular, because it's written by father of deep learning aka Geoffrey Hinton, its inclusion in PyTorch/examples would make it more accessible to a wider community of researchers  practitioners, and I would like to contribute in it\u2764\ufe0f, I've Implemented This algorithm in my local notebook in pure pytorch\u2764\ufe0f.I am new so please let me know How can I contribute this algorithm in this repo.\r\n\r\nThanks,\r\nVivek\r\n\r\n## Describe the solution\r\n\r\nThe solution is to implement/add the forward forward algorithm in PyTorch/examples. This would include writing the code for the algorithm, as well as any docs or tutorial addition to the existing codebase.\r\n\r\n## Describe alternatives solution\r\n<!-- Please describe alternative solutions or features you have considered. -->\r\n[https://keras.io/examples/vision/forwardforward/](https://keras.io/examples/vision/forwardforward/) \r\n",
    "url": "https://github.com/pytorch/examples/issues/1111",
    "state": "closed",
    "labels": [],
    "created_at": "2023-02-09T15:13:40Z",
    "updated_at": "2023-02-26T23:47:19Z",
    "comments": 3,
    "user": "viveks-codes"
  },
  {
    "repo": "huggingface/setfit",
    "number": 308,
    "title": "[QUESTION] Using callbacks (early stopping, logging, etc)",
    "body": "Hi all, thanks for your work here!\r\n\r\n**TLDR**: Is there a way to add callbacks for early stopping and logging (for example, with W&B?).\r\n\r\nI am using setfit for a project, but I could not figure out a way to add early stopping. I am afraid that I am overfitting to the training set. I also cant really say that I am, because I am not sure how I can log the training metrics (train/eval performance across epochs).\r\n\r\nI saw that the script [run_full.py](https://github.com/huggingface/setfit/blob/ebee18ceaecb4414482e0a6b92c97f3f99309d56/scripts/transformers/run_full.py#L104) has it, but I couldn't figure out how to do it with SetFit API.\r\n\r\nthanks!",
    "url": "https://github.com/huggingface/setfit/issues/308",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-02-08T19:39:20Z",
    "updated_at": "2023-02-27T16:25:26Z",
    "user": "FMelloMascarenhas-Cohere"
  },
  {
    "repo": "huggingface/optimum",
    "number": 763,
    "title": "Documented command \"optimum-cli onnxruntime\" doesn't exist?",
    "body": "### System Info\r\n\r\n```shell\r\nPython 3.9, Ubuntu 20.04, Miniconda.  CUDA GPU available\r\n\r\nPackages installed (the important stuff):\r\n\r\nonnx==1.13.0\r\nonnxruntime==1.13.1\r\noptimum==1.6.3\r\ntokenizers==0.13.2\r\ntorch==1.13.1\r\ntransformers==4.26.0\r\nnvidia-cublas-cu11==11.10.3.66\r\nnvidia-cuda-nvrtc-cu11==11.7.99\r\nnvidia-cuda-runtime-cu11==11.7.99\r\nnvidia-cudnn-cu11==8.5.0.96\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n@lewtun, @michaelbenayoun\r\n\r\n### Information\r\n\r\n- [X] The official example scripts\r\n- [ ] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [ ] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\nI have an existing ONNX model, which I am trying to optimize with different scenarios.  When attempting to follow the documented instructions for optimizing an existing ONNX model, the command does not exist.  I am using the instructions from this page: https://huggingface.co/docs/optimum/onnxruntime/usage_guides/optimization \r\n\r\nNOTE: I am using zsh, which requires escaping brackets\r\n\r\n```bash\r\npip install optimum\r\npip install optimum\\[onnxruntime\\]\r\npip install optimum\\[exporters\\]\r\n```\r\n\r\nCommand execution:\r\n\r\n```bash\r\noptimum-cli onnxruntime optimize --onnx_model ../output/sentence-transformers/all-MiniLM-L6-v2/model.onnx -o output/sentence-transformers/all-MiniLM-L6-v2/model-optimized.onnx -04\r\n```\r\n\r\nResult:\r\n```\r\nusage: optimum-cli <command> [<args>]\r\nOptimum CLI tool: error: invalid choice: 'onnxruntime' (choose from 'export', 'env')\r\n```\r\n\r\n### Expected behavior\r\n\r\nI'd expect for the command to exist, or to understand which command to use for experimenting with different ONNX optimizations.  I tried using the optimum-cli export onnx command, but that does not have options for optimization types.\r\n\r\nI'd be happy to start from a torch model instead of using an existing ONNX model - but I'd also like to be able to specify different optimizations (-01 | -02 | -03 | -04)\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/optimum/issues/763",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-02-08T18:19:52Z",
    "updated_at": "2023-02-08T18:25:52Z",
    "comments": 2,
    "user": "binarymax"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5513,
    "title": "Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name?",
    "body": "Hi @mariosasko, @lhoestq, or whoever reads this! :)\r\n\r\nAfter going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, shouldn't that be renamed to `format_type` before the 3.0.0 is released?\r\n\r\nJust wanted to get your input, and if applicable, tackle this issue myself! Thanks \ud83e\udd17",
    "url": "https://github.com/huggingface/datasets/issues/5513",
    "state": "closed",
    "labels": [],
    "created_at": "2023-02-08T15:13:46Z",
    "updated_at": "2023-07-24T16:02:18Z",
    "comments": 4,
    "user": "alvarobartt"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1653,
    "title": "\u2753 [Question] Partitioning for unsupported operations",
    "body": "## \u2753 Question\r\n\r\nAs far as I understand Torch-TensorRT performs a partitioning step when unsupported operations are encountered. Then, graph uses generated TensorRT engine(s) for supported partition(s) and falls back to TorchScript JIT anywhere else. I can observe this behavior from generated graphs in general. However, I receive errors with specific blocks in which I couldn't understand why such blocks are problematic. \r\n\r\nFor instance, for the following (example) block:\r\n\r\n```python\r\n\"\"\"block(for+cond)\"\"\"\r\nretval=[]\r\nfor slice in x: # x: torch.Tensor\r\n    if slice.sum() > 0: # any cond. dep. on tensor/slice\r\n        retval.append(slice + 100)\r\n    else:\r\n        retval.append(slice + 50)\r\n\"\"\"block(for+cond)\"\"\"\r\n```\r\n\r\nI receive a `RuntimeError: [Error thrown at core/partitioning/shape_analysis.cpp:167] Expected ivalues_maps.count(input) to be true but got false` on `torch_tensorrt.compile(...)`:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/burak/test.py\", line 36, in <module>\r\n    net_trt = torch_tensorrt.compile(net, **net_specs)\r\n  File \"/home/burak/miniconda3/envs/convert/lib/python3.10/site-packages/torch_tensorrt/_compile.py\", line 125, in compile\r\n    return torch_tensorrt.ts.compile(\r\n  File \"/home/burak/miniconda3/envs/convert/lib/python3.10/site-packages/torch_tensorrt/ts/_compiler.py\", line 136, in compile\r\n    compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))\r\nRuntimeError: [Error thrown at core/partitioning/shape_analysis.cpp:167] Expected ivalues_maps.count(input) to be true but got false\r\nCould not find torch::jit::Value* slice.1 produced from %slice.1 : Tensor = aten::select(%158, %6, %19) # /home/burak/test.py:20:8 in lowering graph for mini graph input.\r\n```\r\n\r\n## What you have already tried\r\n\r\nI have tried this behavior with the following example script:\r\n\r\n```python\r\nimport torch\r\nimport torch_tensorrt\r\ntorch_tensorrt.logging.set_reportable_log_level(torch_tensorrt.logging.Level.Info)\r\n\r\nclass Net(torch.nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n\r\n        self.conv0 = torch.nn.Conv2d(3, 8, kernel_size=3)\r\n        self.relu = torch.nn.ReLU(inplace=True)\r\n        self.conv1 = torch.nn.Conv2d(8, 16, kernel_size=3)\r\n\r\n    def forward(self, x):\r\n        x = self.conv0(x)\r\n        x = self.relu(x)\r\n        x = self.conv1(x)\r\n\r\n        \"\"\"block(for+cond)\"\"\"\r\n        retval=[]\r\n        for slice in x:\r\n            if slice.sum() > 0: # any cond. dep. on tensor/slice\r\n                retval.append(slice + 100)\r\n            else:\r\n                retval.append(slice + 50)\r\n        \"\"\"block(for+cond)\"\"\"\r\n\r\n        return retval\r\n\r\nnet = Net().eval().cuda()\r\n\r\nnet_specs = {\r\n    'inputs': [torch_tensorrt.Input(shape=[1, 3, 224, 224], dtype=torch.float32)],\r\n    'enabled_precisions': {torch.float32, torch.half},\r\n}\r\n\r\nnet_trt = torch_tensorrt.compile(net, **net_specs)\r\nprint(net_trt.graph)\r\n```\r\n\r\nI receive the following RuntimeError (full output, info log-level):\r\n\r\n```\r\nINFO: [Torch-TensorRT] - ir was set to default, using TorchScript as ir\r\nINFO: [Torch-TensorRT] - Module was provided as a torch.nn.Module, trying to script the module with torch.jit.script. In the event of a failure please preconvert your module to TorchScript\r\nINFO: [Torch-TensorRT] - Lowered Graph: graph(%x.1 : Tensor):\r\n  %self.conv0.weight.1 : Float(8, 3, 3, 3, strides=[27, 9, 3, 1], requires_grad=0, device=cuda:0) = prim::Constant[value=<Tensor>]()\r\n  %self.conv0.bias.1 : Float(8, strides=[1], requires_grad=0, device=cuda:0) = prim::Constant[value= 0.1437  0.0745  0.1127  0.1185  0.1406  0.1445 -0.0802  0.0562 [ CUDAFloatType{8} ]]()\r\n  %self.conv1.weight.1 : Float(16, 8, 3, 3, strides=[72, 9, 3, 1], requires_grad=0, device=cuda:0) = prim::Constant[value=<Tensor>]()\r\n  %self.conv1.bias.1 : Float(16, strides=[1], requires_grad=0, device=cuda:0) = prim::Constant[value=<Tensor>]()\r\n  %9 : int = prim::Constant[value=1]()\r\n  %8 : NoneType = prim::Constant()\r\n  %7 : bool = prim::Constant[value=1]() # /home/burak/test.py:20:8\r\n  %6 : int = prim::Constant[value=0]() # /home/burak/test.py:21:29\r\n  %5 : int = prim::Constant[value=100]() # /home/burak/test.py:22:38\r\n  %4 : int = prim::Constant[value=50]() # /home/burak/test.py:24:38\r\n  %3 : int[] = prim::Constant[value=[1, 1]]()\r\n  %2 : int[] = prim::Constant[value=[0, 0]]()\r\n  %153 : bool = prim::Constant[value=0]()\r\n  %154 : int[] = prim::Constant[value=[0, 0]]()\r\n  %155 : Tensor = aten::_convolution(%x.1, %self.conv0.weight.1, %self.conv0.bias.1, %3, %2, %3, %153, %154, %9, %153, %153, %153, %153)\r\n  %17 : Tensor[] = prim::ListConstruct()\r\n  %137 : Tensor = aten::relu(%155) # /home/burak/miniconda3/envs/convert/lib/python3.10/site-packages/torch/nn/functional.py:1455:17\r\n  %156 : bool = prim::Constant[value=0]()\r\n  %157 : int[] = prim::Constant[value=[0, 0]]()\r\n  %158 : Tensor = aten::_convolution(%137, %self.conv1.weight.1, %self.conv1.bias.1, %3, %2, %3, %156, %157, %9, %156, %156, %156, %156)\r\n  %144 : int = aten::len(%15",
    "url": "https://github.com/pytorch/TensorRT/issues/1653",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: partitioning"
    ],
    "created_at": "2023-02-08T07:39:17Z",
    "updated_at": "2023-06-10T00:02:25Z",
    "user": "kunkcu"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1651,
    "title": "\u2753 [Question] Unknown type name '__torch__.torch.classes.tensorrt.Engine'",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\n\r\n**My c++ code:**\r\ntorch::Device device(torch::kCUDA);\r\n    torch::jit::script::Module module = torch::jit::load(\"lenet_trt.ts\");\r\n    module.to(device);\r\n    vector<jit::IValue> inputs;\r\n    inputs.emplace_back(torch::ones({1,1,32,32}).to(device));\r\n    at::Tensor output = module.forward(inputs).toTensor();\r\n    cout << output << endl;\r\n\r\n**After running the code, the error occurs:**\r\nterminate called after throwing an instance of 'torch::jit::ErrorReport'\r\n  what():  \r\nUnknown type name '__torch__.torch.classes.tensorrt.Engine':\r\n  File \"code/__torch__/___torch_mangle_18.py\", line 4\r\n  __parameters__ = []\r\n  __buffers__ = []\r\n  __torch______torch_mangle_18_LeNet_trt_engine_ : __torch__.torch.classes.tensorrt.Engine\r\n                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n  def forward(self_1: __torch__.___torch_mangle_18.LeNet_trt,\r\n    input_0: Tensor) -> Tensor:\r\n\r\nSignal: SIGABRT (Aborted)\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n\r\n - CPU Architecture: x86 x64\r\n - OS: Ubuntu22.04\r\n - CUDA version: 11.7\r\n - libtorch Version 1.13.1:\r\n - TensorRT: 8.5.3.1\r\n - torch_tensorrt: 1.3.0\r\n\r\n## Additional context\r\n\r\nI compiled a pytorch model using the torchtrtc command. This model can be loaded successfully with python code, but fails with c++ code. Can someone help me solve this issue?\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1651",
    "state": "closed",
    "labels": [
      "question",
      "component: api [C++]",
      "component: runtime"
    ],
    "created_at": "2023-02-07T05:49:57Z",
    "updated_at": "2023-02-08T02:08:12Z",
    "user": "chensuo2048"
  },
  {
    "repo": "pytorch/rl",
    "number": 897,
    "title": "[Feature Request] Tutorial on how to build the simplest agent",
    "body": "## Motivation\r\n\r\nHey,\r\n\r\nthe [DDPG tutorial](https://pytorch.org/rl/tutorials/coding_ddpg.html) has me pooping my pants. I want to suggest an example of creating a simple DDPG or similar agent that just acts and observes and gets the job done for a researcher looking to implement and RL algorithm on their own environment that has nothing to do with the usual benchmarking environments., i.e. just applying RL to their specific field.\r\n\r\nThis [video](https://www.youtube.com/watch?v=cIKMhZoykEE) advertises being able to use components without having to use the rest of the library, and I want to believe it, but when I look at the [docs page](https://pytorch.org/rl/reference/index.html) I see a lot of components that I don't know how to use and when I look into the docs of the specific components I find that they take arguments that are an interface to something that I have no idea what it is and has an abstract name. Not to sound ignorant, but I feel like I have to know the entire framework just to use one part of it, which is againts the core idea, as I understand it.\r\n\r\n## Solution\r\n\r\nLike, I have my own environment that's completely numpy and doesn't have anything to do with Gym or anything else, and I wan't to have the following workflow:\r\n\r\n```\r\nclass MyAgent:\r\n   def __init__(self, **kwargs):\r\n       # torchrl code goes here\r\n       # how to init networks\r\n       # how to init a replay buffer, a simple one\r\n       # init objectives like DDPGloss\r\n   \r\n   def act(self, state):\r\n        # how to produce an action with the actor network or more likely actor module\r\n        # how to add noise\r\n    \r\n   def observe(self, s, action, new_s, reward):\r\n        # how to put a transition into the replay buffer\r\n        # how to update the neural networks\r\n        # so how to sample from the RB, how to use the objectives, how to backpropagate, how to soft update \r\n\r\nenv = MyEnv() # isn't made with torchrl\r\nagent = MyAgent() # class made with torchrl\r\n\r\ns = env.reset() # init state\r\n\r\nfor t in range(T):\r\n    action = agent.act(s)\r\n    new_s, reward = env.step() # could be converted to output tensordicts\r\n    agent.observe(s, action, new_s, reward) # observe transition and update the model\r\n```\r\n\r\nJust the \"RL for dummies\" toy example. For those of us who don't need transforms and parallelization just yet; we can get into that once we've got the basics working. Like, I found the component's I need - [soft update](https://pytorch.org/rl/reference/generated/torchrl.objectives.SoftUpdate.html#torchrl.objectives.SoftUpdate), [ddpg loss](https://pytorch.org/rl/reference/generated/torchrl.objectives.DDPGLoss.html#torchrl.objectives.DDPGLoss)... I just don't know how to put them together without the monstrosity of the code that is [DDPG tutorial](https://pytorch.org/rl/tutorials/coding_ddpg.html).\r\n\r\n## Alternatives\r\n\r\n/\r\n\r\n## Additional context\r\n\r\n/\r\n\r\n## Checklist\r\n\r\n- [ x] I have checked that there is no similar issue in the repo (**required**)\r\nI've found this [issue](https://github.com/pytorch/rl/issues/90) that hits the spot but I don't know if it amounted to anything, and my issue is leaning towards providing an example of this low level functionality. \r\n\r\nThis [issue](https://github.com/pytorch/rl/issues/861) is also pretty good but I'd aim for even simpler and especially for the environment to not need to be torchrl.\r\n\r\n\r\n## Conclusion\r\n\r\nThose were my two cents. I hope I've hit the target with them. If there's something like this already available and I just haven't found it yet, please do let me know. \r\n",
    "url": "https://github.com/pytorch/rl/issues/897",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-02-06T22:42:47Z",
    "updated_at": "2023-02-07T10:01:42Z",
    "user": "viktor-ktorvi"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2196,
    "title": "nestedtensor.py on Colab building from master ",
    "body": "When running the [nested tensors tutorial](https://pytorch.org/tutorials/prototype/nestedtensor.html) on [google colab](https://colab.research.google.com/github/pytorch/tutorials/blob/gh-pages/_downloads/db9e0933e73063322e250e5d0cec413d/nestedtensor.ipynb) builds from master instead of main. The master branch version is non-functional, main branch version appears to work correctly:\r\n- nested tensors created with `torch.nested_tensor` instead of `torch.nested.nested_tensor` \r\n- the `mha_netsed` function handle batch size inference incorrectly.\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/2196",
    "state": "open",
    "labels": [
      "question",
      "2.0"
    ],
    "created_at": "2023-02-06T22:13:41Z",
    "updated_at": "2023-02-07T21:32:28Z",
    "user": "alex-rakowski"
  },
  {
    "repo": "pytorch/data",
    "number": 986,
    "title": "Disable cron job running on forked repo",
    "body": "### \ud83d\udc1b Describe the bug\n\n\r\nMy forked repo of torchdata have been running the cron job to validate nightly binaries.\r\n\r\nSee workflow https://github.com/ejguan/data/actions/runs/4097726223\r\n\r\n@atalman  Is this expected? Can we disable it by doing something like:\r\nhttps://github.com/pytorch/data/blob/01fc76200354501b057bb439b43a1f05f609dd0a/.github/workflows/nightly_release.yml#L11\n\n### Versions\n\nmain",
    "url": "https://github.com/meta-pytorch/data/issues/986",
    "state": "open",
    "labels": [
      "Better Engineering"
    ],
    "created_at": "2023-02-06T16:29:00Z",
    "updated_at": "2023-04-11T16:48:19Z",
    "comments": 0,
    "user": "ejguan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1650,
    "title": "error when bazel compile torch_tensorrt on win10",
    "body": "## \u2753 Question\r\nwhen command \" bazel build //:libtorchtrt --compilation_mode opt\", the error comes\r\n\r\nERROR: C:/users/zhang/downloads/tensorrt-main/core/runtime/BUILD:13:11: Compiling core/runtime/TRTEngineProfiler.cpp failed: (Exit 2): cl.exe failed: error executing command (from target //core/runtime:runtime) D:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX64\\x64\\cl.exe /nologo /DCOMPILER_MSVC /DNOMINMAX /D_WIN3                                          2_WINNT=0x0601 /D_CRT_SECURE_NO_DEPRECATE ... (remaining 48 arguments skipped)\r\n\r\n## What you have already tried\r\n\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):1.13\r\n - CPU Architecture: AMD5600x\r\n - OS (e.g., Linux):win10\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:11.7\r\n - GPU models and configuration:2060\r\n - Any other relevant information: visual studio2019\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1650",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "channel: windows"
    ],
    "created_at": "2023-02-06T07:38:28Z",
    "updated_at": "2023-06-08T00:02:27Z",
    "user": "zhanghuqiang"
  },
  {
    "repo": "huggingface/setfit",
    "number": 298,
    "title": "apply the optimized parameters",
    "body": "I did my hyperparameter search optimization on one computer and now I'm trying to apply the obtained parameters on another computer, so I could not use this code \"trainer.apply_hyperparameters(best_run.hyperparameters, final_model=True)\r\ntrainer.train()\". I put the obtained parameters manually in my new trainer instead. But I have two sets of the parameters, and I'm not sure which set to use. For example, in the line above I have seed =9, but below seed = 8.\r\n\r\nHere are the obtained parameters from the optimization:\r\n\r\nTrial 14 finished with value: 0.8711734693877551 and parameters: {'learning_rate': 1.0472016582222107e-05, 'num_epochs': 1, 'batch_size': 4, 'num_iterations': 40, 'seed': 9, 'max_iter': 54, 'solver': 'lbfgs', 'model_id': 'sentence-transformers/all-mpnet-base-v2'}. Best is trial 14 with value: 0.8711734693877551.\r\nTrial: {'learning_rate': 5.786637612112363e-05, 'num_epochs': 1, 'batch_size': 4, 'num_iterations': 20, 'seed': 8, 'max_iter': 52, 'solver': 'lbfgs', 'model_id': 'sentence-transformers/all-mpnet-base-v2'}\r\nmodel_head.pkl not found on HuggingFace Hub, initialising classification head with random weights. You should TRAIN this model on a downstream task to use it for predictions and inference.\r\n***** Running training *****\r\n  Num examples = 73160\r\n  Num epochs = 1\r\n  Total optimization steps = 18290\r\n  Total train batch size = 4\r\n\r\n\r\nThank you so much!!\r\n",
    "url": "https://github.com/huggingface/setfit/issues/298",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-02-03T18:31:59Z",
    "updated_at": "2023-02-16T08:00:52Z",
    "user": "zoezhupingli"
  },
  {
    "repo": "pytorch/text",
    "number": 2047,
    "title": "Update `CONTRIBUTING.md` w/ instruction on how to install `torchdata` from source",
    "body": "See https://github.com/pytorch/text/issues/2045",
    "url": "https://github.com/pytorch/text/issues/2047",
    "state": "closed",
    "labels": [],
    "created_at": "2023-02-03T18:20:17Z",
    "updated_at": "2023-02-06T00:37:39Z",
    "user": "joecummings"
  },
  {
    "repo": "huggingface/setfit",
    "number": 297,
    "title": "Comparing setfit with a simpler approach",
    "body": "Hi,\r\nI am trying to compare setfit with another approach. The other approach is like this:\r\n1. Define a list of representative sentences per class, call it `rep_sent`\r\n2. Compute sentence embeddings for `rep_sent` using `mpnet-base-v2`\r\n3. Define a list of test sentences, call it 'test_sent'.\r\n4. Compute sentence embeddings for 'test_sent'\r\n5. Now, in order to assign a class to the sentences in `test_sent`, compute the cosine similarity with `rep_sent` and choose the class based on the highest cosine sim.\r\n\r\nIf we consider a particular test set sentence: \"Remove maiden name from account\", then the results from the two approaches are as follows:\r\nsetfit predicts this to be 'manage account transfer'\r\nother approach predicts this to be 'edit account details'\r\n\r\nCan someone please help me to understand how setfit's performance can be improved.\r\nAs far as setfit goes, it has been trained use 'rep_sent' as the training set. Here is how it looks like:\r\n\r\n`text,label\r\n\r\nI want to close my account,accountClose\r\n\r\nClose my credit card,accountClose\r\n\r\nMortgage payoff,accountClose\r\n\r\nLoan payoff,accountClose\r\n\r\nLoan pay off,accountClose\r\n\r\npay off,accountClose\r\n\r\nlease payoff,accountClose\r\n\r\nlease pay off,accountClose\r\n\r\naccount close,accountClose\r\n\r\nclose card account,accountClose\r\n\r\nI want to open an account,accountOpenGeneral\r\n\r\nI want to get a card,accountOpenGeneral\r\n\r\nI want a loan,accountOpenGeneral\r\n\r\nRefinance my car,accountOpenGeneral\r\n\r\nBuy a car,accountOpenGeneral\r\n\r\nOpen checking,accountOpenGeneral\r\n\r\nOpen savings,accountOpenGeneral\r\n\r\nLease a vehicle,accountOpenGeneral\r\n\r\nLink external bank account,accountTransferManage\r\n\r\nverify external account,accountTransferManage\r\n\r\nAdd external account,accountTransferManage\r\n\r\nEdit external account,accountTransferManage\r\n\r\nRemove external account,accountTransferManage\r\n\r\nMortgage payment,billPaySchedulePayment\r\n\r\nSetup Loan payment,billPaySchedulePayment\r\n\r\nSetup auto loan payment,billPaySchedulePayment\r\n\r\nSchedule bill payment,billPaySchedulePayment\r\n\r\nSetup bill payment,billPaySchedulePayment\r\n\r\nSetup automatic payment,billPaySchedulePayment\r\n\r\nSetup auto pay,billPaySchedulePayment\r\n\r\nSetup automatic payment,billPaySchedulePayment\r\n\r\nSetup automatic payment,billPaySchedulePayment\r\n\r\nModify account details,editAccountDetails\r\n\r\nModify name on my account,editAccountDetails\r\n\r\nChange address in my account,editAccountDetails`",
    "url": "https://github.com/huggingface/setfit/issues/297",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-02-03T10:11:44Z",
    "updated_at": "2023-02-06T13:01:02Z",
    "user": "vahuja4"
  },
  {
    "repo": "huggingface/setfit",
    "number": 295,
    "title": "Question: How the number of categories affect  the training and  accuracy?",
    "body": "I have found that increasing the number of categories reduce the accuracy results. Has anyone studied how the increased number of samples per category affect the results?\r\n\r\n",
    "url": "https://github.com/huggingface/setfit/issues/295",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-02-02T18:43:33Z",
    "updated_at": "2023-07-26T19:30:21Z",
    "user": "rubensmau"
  },
  {
    "repo": "pytorch/vision",
    "number": 7168,
    "title": "Current way to use torchvision.prototype.transforms",
    "body": "### \ud83d\udcda The doc issue\r\n\r\nI tried to run the [end-to-end example in this recent blog post](https://pytorch.org/blog/extending-torchvisions-transforms-to-object-detection-segmentation-and-video-tasks/#an-end-to-end-example):\r\n\r\n```python\r\nimport PIL\r\nfrom torchvision import io, utils\r\nfrom torchvision.prototype import features, transforms as T\r\nfrom torchvision.prototype.transforms import functional as F\r\n# Defining and wrapping input to appropriate Tensor Subclasses\r\npath = \"COCO_val2014_000000418825.jpg\"\r\nimg = features.Image(io.read_image(path), color_space=features.ColorSpace.RGB)\r\n# img = PIL.Image.open(path)\r\nbboxes = features.BoundingBox(\r\n    [[2, 0, 206, 253], [396, 92, 479, 241], [328, 253, 417, 332],\r\n     [148, 68, 256, 182], [93, 158, 170, 260], [432, 0, 438, 26],\r\n     [422, 0, 480, 25], [419, 39, 424, 52], [448, 37, 456, 62],\r\n     [435, 43, 437, 50], [461, 36, 469, 63], [461, 75, 469, 94],\r\n     [469, 36, 480, 64], [440, 37, 446, 56], [398, 233, 480, 304],\r\n     [452, 39, 463, 63], [424, 38, 429, 50]],\r\n    format=features.BoundingBoxFormat.XYXY,\r\n    spatial_size=F.get_spatial_size(img),\r\n)\r\nlabels = features.Label([59, 58, 50, 64, 76, 74, 74, 74, 74, 74, 74, 74, 74, 74, 50, 74, 74])\r\n# Defining and applying Transforms V2\r\ntrans = T.Compose(\r\n    [\r\n        T.ColorJitter(contrast=0.5),\r\n        T.RandomRotation(30),\r\n        T.CenterCrop(480),\r\n    ]\r\n)\r\nimg, bboxes, labels = trans(img, bboxes, labels)\r\n# Visualizing results\r\nviz = utils.draw_bounding_boxes(F.to_image_tensor(img), boxes=bboxes)\r\nF.to_pil_image(viz).show()\r\n```\r\n\r\nbut found that `torchvision.prototype.features` is now gone. What's the current way to run this? I attempted to simply pass the images, bboxes and labels with the following types: `torchvision.prototype.datasets.utils._encoded.EncodedImage`, `torchvision.prototype.datapoints._bounding_box.BoundingBox`, `torchvision.prototype.datapoints._label.Label`. However this didn't seem to apply the transforms as everything remained the same shape.\r\n\r\n**edit:** I've found that `features` seems to be renamed to `datapoints`. I tried applying this, but `EncodedImage` in a coco `sample['image']` seems to be 1D and `prototype.transforms` requires 2D images.  What's the proper way to get this as 2D so I can apply transforms? Is there a decode method I'm missing?\r\n\r\n\r\n\r\n### Suggest a potential alternative/fix\r\n\r\n_No response_\n\ncc @vfdev-5 @bjuncek @pmeier",
    "url": "https://github.com/pytorch/vision/issues/7168",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms",
      "prototype"
    ],
    "created_at": "2023-02-02T15:47:41Z",
    "updated_at": "2023-02-02T21:11:35Z",
    "user": "austinmw"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1645,
    "title": "\u2753 [Question] How to use Torch-TensorRT with multi-headed (multiple output) networks",
    "body": "## \u2753 Question\r\n\r\nI am having trouble using Torch-TensorRT with multi-headed networks. `torch_tensorrt.compile(...)` works fine and I can successfully use the resulting `ScriptModule` for execution. However, when I try to save and re-load the module I receive a RuntimeError on `torch.jit.load(...)`:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/burak/test.py\", line 33, in <module>\r\n    net_trt = torch.jit.load('net_trt.ts')\r\n  File \"/home/burak/miniconda3/envs/convert/lib/python3.9/site-packages/torch/jit/_serialization.py\", line 162, in load\r\n    cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files)\r\nRuntimeError: [Error thrown at core/runtime/TRTEngine.cpp:132] Expected (binding_name == engine_binded_name) to be true but got false\r\nCould not find a TensorRT engine binding for output named output_0\r\n```\r\n\r\n## What you have already tried\r\n\r\nI have tried this behavior with a very simple multi-headed network:\r\n\r\n```python\r\nimport torch\r\nimport torch_tensorrt\r\n\r\nclass Net(torch.nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n\r\n        self.conv0 = torch.nn.Conv2d(3, 8, kernel_size=3)\r\n        self.relu = torch.nn.ReLU(inplace=True)\r\n        self.conv1b1 = torch.nn.Conv2d(8, 16, kernel_size=3)\r\n        self.conv1b2 = torch.nn.Conv2d(8, 32, kernel_size=3)\r\n\r\n    def forward(self, x):\r\n        x = self.conv0(x)\r\n        x = self.relu(x)\r\n        output1 = self.conv1b1(x)\r\n        output2 = self.conv1b2(x)\r\n\r\n        return output1, output2\r\n\r\nnet = Net().eval().cuda()\r\n```\r\nThen, I have compiled this network for TensorRT as usual:\r\n\r\n```python\r\nnet_specs = {\r\n    'inputs': [torch_tensorrt.Input(shape=[1, 3, 224, 224], dtype=torch.float32)],\r\n    'enabled_precisions': {torch.float32, torch.half},\r\n}\r\n\r\nnet_trt = torch_tensorrt.compile(net, **net_specs)\r\n```\r\n\r\nNo problem so far. `net_trt` works just fine. However, when I try to save and re-load it:\r\n\r\n```python\r\ntorch.jit.save(net_trt, 'net_trt.ts')\r\nnet_trt = torch.jit.load('net_trt.ts')\r\n```\r\n\r\nI receive the following RuntimeError:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/burak/test.py\", line 33, in <module>\r\n    net_trt = torch.jit.load('net_trt.ts')\r\n  File \"/home/burak/miniconda3/envs/convert/lib/python3.9/site-packages/torch/jit/_serialization.py\", line 162, in load\r\n    cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files)\r\nRuntimeError: [Error thrown at core/runtime/TRTEngine.cpp:132] Expected (binding_name == engine_binded_name) to be true but got false\r\nCould not find a TensorRT engine binding for output named output_0\r\n```\r\n\r\nI have only encountered this with multi-headed networks. Everything seems to work fine with other type of networks.\r\n\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - Torch-TensorRT Version (e.g. 1.0.0): 1.3.0\r\n - PyTorch Version (e.g., 1.0): 1.13.1\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.9.15\r\n - CUDA version: 11.7\r\n - GPU models and configuration: NVIDIA GeForce RTX 3070 (Laptop)\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1645",
    "state": "closed",
    "labels": [
      "question",
      "bug: triaged [verified]"
    ],
    "created_at": "2023-02-02T13:05:35Z",
    "updated_at": "2023-02-03T19:58:34Z",
    "user": "kunkcu"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 762,
    "title": "Handle the case where the DatasetInfo is too big",
    "body": "In the /parquet-and-dataset-info processing step, if DatasetInfo is over 16MB, we will not be able to store it in MongoDB (https://pymongo.readthedocs.io/en/stable/api/pymongo/errors.html#pymongo.errors.DocumentTooLarge). We have to handle this case, and return a clear error to the user.\r\n\r\nSee https://huggingface.slack.com/archives/C04L6P8KNQ5/p1675332303097889 (internal). It's a similar issue to https://github.com/huggingface/datasets-server/issues/731 (should be raised for that dataset, btw)",
    "url": "https://github.com/huggingface/dataset-viewer/issues/762",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2023-02-02T10:25:19Z",
    "updated_at": "2023-02-13T13:48:06Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5494,
    "title": "Update audio installation doc page",
    "body": "Our [installation documentation page](https://huggingface.co/docs/datasets/installation#audio) says that one can use Datasets for mp3 only with `torchaudio<0.12`. `torchaudio>0.12` is actually supported too but requires a specific version of ffmpeg which is not easily installed on all linux versions but there is a custom ubuntu repo for it, we have insctructions in the code: https://github.com/huggingface/datasets/blob/main/src/datasets/features/audio.py#L327 \r\nSo we should update the doc page. But first investigate [this issue](5488). ",
    "url": "https://github.com/huggingface/datasets/issues/5494",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2023-02-01T19:07:50Z",
    "updated_at": "2023-03-02T16:08:17Z",
    "comments": 4,
    "user": "polinaeterna"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 93347,
    "title": "when I want to use a new backend, how to deal with the op with 'device' argument? ",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi\r\nI saw the generated code in python_torch_functionsEverything.cpp line 4763\uff0c there are so many tricks for the op with 'device' argument, such as init CUDA device, `torch::utils::maybe_initialize_cuda(options);`\r\n```\r\nstatic PyObject * THPVariable_arange(PyObject* self_, PyObject* args, PyObject* kwargs)\r\n{\r\n  HANDLE_TH_ERRORS\r\n  static PythonArgParser parser({\r\n    \"arange(Scalar end, *, Tensor out=None, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False, bool? requires_grad=False)\",\r\n    \"arange(Scalar start, Scalar end, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False, bool? requires_grad=False)\",\r\n    \"arange(Scalar start, Scalar end, Scalar step=1, *, Tensor out=None, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False, bool? requires_grad=False)\",\r\n  }, /*traceable=*/true);\r\n\r\n  ParsedArgs<9> parsed_args;\r\n  auto _r = parser.parse(nullptr, args, kwargs, parsed_args);\r\n  if(_r.has_torch_function()) {\r\n    return handle_torch_function(_r, nullptr, args, kwargs, THPVariableFunctionsModule, \"torch\");\r\n  }\r\n  switch (_r.idx) {\r\n    case 0: {\r\n      if (_r.isNone(1)) {\r\n        // aten::arange(Scalar end, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor\r\n        const auto options = TensorOptions()\r\n            .dtype(_r.scalartypeOptional(2))\r\n            .device(_r.deviceWithDefault(4, torch::tensors::get_default_device()))\r\n            .layout(_r.layoutOptional(3))\r\n            .requires_grad(_r.toBool(6))\r\n            .pinned_memory(_r.toBool(5));\r\n        torch::utils::maybe_initialize_cuda(options);\r\n```\r\n\r\nwhen I  want to use a new backend which also need to init like CUDA, so I want to add some code to make my backend running fine, It is that ok ?\r\nthanks.\r\n\n\n### Versions\n\nnew backend\r\npython:3.7.5\r\npytorch: 2.0.0\r\nCUDA: None",
    "url": "https://github.com/pytorch/pytorch/issues/93347",
    "state": "open",
    "labels": [
      "triaged",
      "module: backend"
    ],
    "created_at": "2023-01-31T09:34:00Z",
    "updated_at": "2023-02-06T14:44:50Z",
    "user": "heidongxianhua"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1638,
    "title": "Error when running Resnet50-CPP.ipynb, ./torchtrt_runtime_example: symbol lookup error: ./torchtrt_runtime_example: undefined symbol: _ZN2at4_ops11randint_low4callEllN3c108ArrayRefIlEENS2_8optionalINS2_10ScalarTypeEEENS5_INS2_6LayoutEEENS5_INS2_6DeviceEEENS5_IbEE",
    "body": "I was following this notebook on  nvcr.io/nvidia/pytorch:22.12-py3, container make runs fine but this step fails. My host has nvidia-470, 11.4. I have tried multiple times but the same error.",
    "url": "https://github.com/pytorch/TensorRT/issues/1638",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-01-31T06:09:55Z",
    "updated_at": "2023-05-13T00:02:12Z",
    "user": "akshayantony12"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 2167,
    "title": "Im using jupyter notebook and every time it stacks ckpt file but I don't know where it is",
    "body": "every time I try using diffusers, it downloads all .bin files and ckpt files but it piles up somewhere in the server.\r\n\r\ni thought it got piled up in anaconda3/env but it wasn't. \r\n\r\nwhere would it downloads the files be? my server its full of memory:(\r\n\r\n![image](https://user-images.githubusercontent.com/82705312/215630356-d552d30c-1cb2-4755-8bcb-cdf30ed4c179.png)",
    "url": "https://github.com/huggingface/diffusers/issues/2167",
    "state": "closed",
    "labels": [],
    "created_at": "2023-01-31T00:58:18Z",
    "updated_at": "2023-02-02T02:51:10Z",
    "user": "jakeyahn"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1631,
    "title": "Is NN inheritance possible?",
    "body": "So I have an application that I am enhancing; I really want to use the TensorRT backend as it's benchmarks are just brilliant; however, I cannot see a way one would go about using inheritance: eg ``class MyFancyEncoder(tensor_compiled_resnet_passing_torch.nn)``\r\n\r\nExample here: https://pastebin.com/nTdTfFnZ\r\nVersus here: https://pastebin.com/L0YyKg9H\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1631",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-01-30T23:43:51Z",
    "updated_at": "2023-01-31T21:14:03Z",
    "user": "manbehindthemadness"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5475,
    "title": "Dataset scan time is much slower than using native arrow",
    "body": "### Describe the bug\n\nI'm basically running the same scanning experiment from the tutorials https://huggingface.co/course/chapter5/4?fw=pt except now I'm comparing to a native pyarrow version.\r\n\r\nI'm finding that the native pyarrow approach is much faster (2 orders of magnitude). Is there something I'm missing that explains this phenomenon?\n\n### Steps to reproduce the bug\n\nhttps://colab.research.google.com/drive/11EtHDaGAf1DKCpvYnAPJUW-LFfAcDzHY?usp=sharing\n\n### Expected behavior\n\nI expect scan times to be on par with using pyarrow directly.\n\n### Environment info\n\nstandard colab environment",
    "url": "https://github.com/huggingface/datasets/issues/5475",
    "state": "closed",
    "labels": [],
    "created_at": "2023-01-27T01:32:25Z",
    "updated_at": "2023-01-30T16:17:11Z",
    "comments": 3,
    "user": "jonny-cyberhaven"
  },
  {
    "repo": "pytorch/data",
    "number": 965,
    "title": "Correct way to shuffle, batch and shard WebDataset",
    "body": "### \ud83d\udcda The doc issue\n\nHi, the [docs on the WebDataset decoder](https://pytorch.org/data/main/generated/torchdata.datapipes.iter.WebDataset.html) give the following example:\r\n\r\n```python\r\n>>> from torchdata.datapipes.iter import FileLister, FileOpener\r\n>>>\r\n>>> def decode(item):\r\n>>>     key, value = item\r\n>>>     if key.endswith(\".txt\"):\r\n>>>         return key, value.read().decode(\"utf-8\")\r\n>>>     if key.endswith(\".bin\"):\r\n>>>         return key, value.read().decode(\"utf-8\")\r\n>>>\r\n>>> datapipe1 = FileLister(\"test/_fakedata\", \"wds*.tar\")\r\n>>> datapipe2 = FileOpener(datapipe1, mode=\"b\")\r\n>>> dataset = datapipe2.load_from_tar().map(decode).webdataset()\r\n>>> for obj in dataset:\r\n>>>     print(obj)\r\n```\r\n\r\nHowever this doesn't include demonstrating the proper location for shuffling, sharding and batching the dataset.\r\n\n\n### Suggest a potential alternative/fix\n\nCould you please let me know where to place `.shuffle`, `.batch` and `.sharding_filter` in this pipeline?",
    "url": "https://github.com/meta-pytorch/data/issues/965",
    "state": "closed",
    "labels": [
      "documentation",
      "good first issue"
    ],
    "created_at": "2023-01-25T16:25:40Z",
    "updated_at": "2023-01-25T17:51:57Z",
    "comments": 4,
    "user": "austinmw"
  },
  {
    "repo": "huggingface/setfit",
    "number": 289,
    "title": "[question]: creating a custom dataset class like `sst` to fit into `setfit`, throws `Cannot index by location index with a non-integer key`",
    "body": "I'm trying to experiment with PyTorch some model; the dataset they were using for the experiment is [`sst`][1]\r\n\r\nBut I'm also learning PyTorch, so I thought it would be better to play with `Dataset` class and create my own dataset.\r\n\r\nSo this was my approach:\r\n```\r\nclass CustomDataset(Dataset):\r\n    def __init__(self, dataframe):\r\n        self.dataframe = dataframe\r\n        self.column_names = ['text','label']\r\n\r\n    def __getitem__(self, index):\r\n        print('index: ',index)\r\n        row = self.dataframe.iloc[index].to_numpy()\r\n        features = row[1:]\r\n        label = row[0]\r\n        return features, label\r\n\r\n    def __len__(self):\r\n        return len(self.dataframe)\r\n\r\n\r\n\r\ndf = pd.DataFrame(np.array([ \r\n    [\"hello\", 0] ,\r\n    [\"sex\", 1] ,\r\n    [\"beshi kore sex\", 1],]),\r\n  columns=['text','label'])\r\n\r\ndataset = CustomDataset(dataframe=df)\r\n```\r\n\r\nInstead of creating sub-categories like validation/test/train, I'm just trying to create one custom `Dataset` class at first.\r\n\r\nAnd it keeps giving me **`Cannot index by location index with a non-integer key`** During conceptual development, I tried this: `df.iloc[0].to_numpy()`, and it works absolutely fine. But it's sending `index:  text` for some reason. I even tried putting an 'id' column.\r\n\r\nBut I'm sure that there must be some other way to achieve this. **_How can I resolve this issue?_** As my code worked fine for sst, as this not working any longer. I'm pretty sure, this is not one to one mapping.\r\n\r\nComplete code:\r\n```\r\n#!pip install sentence_transformers -q\r\n#!pip install setfit -q\r\n\r\n\r\nfrom sentence_transformers.losses import CosineSimilarityLoss\r\nfrom torch.utils.data import Dataset\r\nimport pandas as pd\r\nimport numpy as np\r\nfrom setfit import SetFitModel, SetFitTrainer, sample_dataset\r\n\r\nclass CustomDataset(Dataset):\r\n    def __init__(self, dataframe):\r\n        self.dataframe = dataframe\r\n        self.column_names = ['id','text','label']\r\n\r\n    def __getitem__(self, index):\r\n        print('index: ',index)\r\n        row = self.dataframe.iloc[index].to_numpy()\r\n        features = row[1:]\r\n        label = row[0]\r\n        return features, label\r\n\r\n    def __len__(self):\r\n        return len(self.dataframe)\r\n\r\ndf = pd.DataFrame(np.array([ [1,\"hello\", 0] ,\r\n[2,\"sex\", 1] ,\r\n[3,\"beshi kore sex\", 1],]),columns=['id','text','label'])\r\n# df.head()\r\n\r\n\r\ndataset = CustomDataset(dataframe=df)\r\n\r\n# Load a dataset from the Hugging Face Hub\r\n# dataset = load_dataset(\"sst2\") # HERE, previously I was simply using sst/sst2\r\n\r\n# Simulate the few-shot regime by sampling 8 examples per class\r\ntrain_dataset = dataset\r\neval_dataset = dataset\r\n\r\n# Load a SetFit model from Hub\r\nmodel = SetFitModel.from_pretrained(\"sentence-transformers/paraphrase-mpnet-base-v2\")\r\n\r\n# Create trainer\r\ntrainer = SetFitTrainer(\r\n    model=model,\r\n    train_dataset=train_dataset,\r\n    eval_dataset=eval_dataset,\r\n    loss_class=CosineSimilarityLoss,\r\n    metric=\"accuracy\",\r\n    batch_size=16,\r\n    num_iterations=1, # The number of text pairs to generate for contrastive learning\r\n    num_epochs=1, # The number of epochs to use for contrastive learning\r\n)\r\n\r\n# Train and evaluate\r\ntrainer.train()\r\n```\r\n\r\n  [1]: https://pytorch.org/text/_modules/torchtext/datasets/sst.html",
    "url": "https://github.com/huggingface/setfit/issues/289",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-01-25T10:22:35Z",
    "updated_at": "2023-01-27T15:53:44Z",
    "user": "maifeeulasad"
  },
  {
    "repo": "huggingface/transformers",
    "number": 21287,
    "title": "[docs] TrainingArguments default label_names is not what is described in the documentation",
    "body": "### System Info\r\n\r\n- `transformers` version: 4.25.1\r\n- Platform: macOS-12.6.1-arm64-arm-64bit\r\n- Python version: 3.8.15\r\n- Huggingface_hub version: 0.11.1\r\n- PyTorch version (GPU?): 1.13.1 (False)\r\n- Tensorflow version (GPU?): not installed (NA)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: <fill in>\r\n- Using distributed or parallel set-up in script?: No\r\n\r\n### Who can help?\r\n\r\n@sgugger, @stevhliu and @MKhalusova\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [X] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\n1. Create a model with a `forward` that has more than one label. For example:\r\n\r\n```\r\n def forward(\r\n        self,\r\n        input_ids,\r\n        bbox,\r\n        attention_mask,\r\n        token_type_ids,\r\n        labels,\r\n        reference_labels\r\n)\r\n```\r\n\r\n2. Create a trainer for your model with `trainer = Trainer(model, ...)`. Make sure to not set `label_names` and let it default.\r\n3. Check `trainer.label_names` and see that it returns `[\"labels\", \"reference_labels\"]`\r\n\r\n### Expected behavior\r\n\r\n[The documentation](https://huggingface.co/docs/transformers/main_classes/trainer#transformers.Seq2SeqTrainingArguments.label_names) states that:\r\n\r\n> Will eventually default to [\"labels\"] except if the model used is one of the XxxForQuestionAnswering in which case it will default to [\"start_positions\", \"end_positions\"].\r\n\r\n[This PR](https://github.com/huggingface/transformers/pull/16526) changed the behaviour that the documentation describes.",
    "url": "https://github.com/huggingface/transformers/issues/21287",
    "state": "closed",
    "labels": [],
    "created_at": "2023-01-24T18:24:47Z",
    "updated_at": "2023-01-24T19:48:26Z",
    "user": "fredsensibill"
  },
  {
    "repo": "pytorch/cpuinfo",
    "number": 131,
    "title": "How to cross-compile pytorch-cpuinfo?",
    "body": "Hi! \r\n\r\nFirst a bit of context. I'm trying to build onnxruntime for raspberry pi using cross-compilation ([instructions here](https://onnxruntime.ai/docs/build/inferencing.html#cross-compiling-on-linux)). The onnxruntime package depends on pytorch-cpuinfo and fetches and builds it as part of the build process.\r\n\r\nI'm using this command.\r\n\r\n```shell\r\nVERBOSE=1 ./build.sh --config Release --build_shared_lib --arm --update --build --path_to_protoc_exe /build/bin/protoc\r\n```\r\n\r\nThis triggers the following error:\r\n\r\n```shell\r\n[...]\r\n[ 66%] Building C object _deps/pytorch_cpuinfo-build/CMakeFiles/cpuinfo.dir/src/x86/init.c.o\r\ncd /build/onnxruntime/build/Linux/Release/_deps/pytorch_cpuinfo-build && /usr/bin/arm-linux-gnueabihf-gcc -DCPUINFO_LOG_LEVEL=2 -DEIGEN_MPL2_ONLY -DORT_ENABLE_STREAM -D_GNU_SOURCE=1 -I/build/onnxruntime/build/Linux/Release/_deps/pytorch_cpuinfo-src/src -I/build/onnxruntime/build/Linux/Release/_deps/pytorch_cpuinfo-src/include -I/build/onnxruntime/build/Linux/Release/_deps/pytorch_cpuinfo-src/deps/clog/include -ffunction-sections -fdata-sections -Wno-error=attributes -O3 -DNDEBUG -fPIC -std=c99 -MD -MT _deps/pytorch_cpuinfo-build/CMakeFiles/cpuinfo.dir/src/x86/init.c.o -MF CMakeFiles/cpuinfo.dir/src/x86/init.c.o.d -o CMakeFiles/cpuinfo.dir/src/x86/init.c.o -c /build/onnxruntime/build/Linux/Release/_deps/pytorch_cpuinfo-src/src/x86/init.c\r\nIn file included from /build/onnxruntime/build/Linux/Release/_deps/pytorch_cpuinfo-src/src/x86/init.c:5:\r\n/build/onnxruntime/build/Linux/Release/_deps/pytorch_cpuinfo-src/src/x86/cpuid.h:5:11: fatal error: cpuid.h: No such file or directory\r\n    5 |  #include <cpuid.h>\r\n      |           ^~~~~~~~~\r\ncompilation terminated.\r\ngmake[2]: *** [_deps/pytorch_cpuinfo-build/CMakeFiles/cpuinfo.dir/build.make:118: _deps/pytorch_cpuinfo-build/CMakeFiles/cpuinfo.dir/src/x86/init.c.o] Error 1\r\ngmake[2]: Leaving directory '/build/onnxruntime/build/Linux/Release'\r\ngmake[1]: *** [CMakeFiles/Makefile2:5506: _deps/pytorch_cpuinfo-build/CMakeFiles/cpuinfo.dir/all] Error 2\r\ngmake[1]: Leaving directory '/build/onnxruntime/build/Linux/Release'\r\n[...]\r\n```\r\n\r\nMy take on this is that pytorch-cpuinfo errorneously tries to compile for x86 (the host for the cross-compile). \r\n\r\nLooking at the CMakeList.txt in this project, I think the culprit is that it always assumes that the host architecture is also the target architecture: https://github.com/pytorch/cpuinfo/blob/3dc310302210c1891ffcfb12ae67b11a3ad3a150/CMakeLists.txt#L59\r\n\r\nWould love to hear if I'm doing something wrong. Or if I can submit a PR for this to allow to override the target architecture from the environment variables. ",
    "url": "https://github.com/pytorch/cpuinfo/issues/131",
    "state": "closed",
    "labels": [],
    "created_at": "2023-01-24T09:25:31Z",
    "updated_at": "2023-01-27T13:02:24Z",
    "user": "pietermarsman"
  },
  {
    "repo": "pytorch/data",
    "number": 959,
    "title": "Tables in Documentation not rendering properly",
    "body": "### \ud83d\udcda The doc issue\r\n\r\nCompared to the last release, the tables in the documentation of the `main` branch is rendering differently. I do not recall any intentional changes to the format of our documentation or generation. We should have a look at this before the next release.\r\n\r\nBefore (0.5.1):\r\n\r\n<img width=\"886\" alt=\"Screenshot 2023-01-23 at 3 14 36 PM\" src=\"https://user-images.githubusercontent.com/4935152/214140520-f2a78f1b-84c1-4b02-a1a9-d43c15019340.png\">\r\n\r\n\r\nCurrent (main):\r\n\r\n<img width=\"947\" alt=\"Screenshot 2023-01-23 at 3 14 45 PM\" src=\"https://user-images.githubusercontent.com/4935152/214140549-8917d8fe-8483-4bb6-85d9-4cb0b9162cf7.png\">\r\n",
    "url": "https://github.com/meta-pytorch/data/issues/959",
    "state": "closed",
    "labels": [
      "documentation",
      "good first issue"
    ],
    "created_at": "2023-01-23T20:14:52Z",
    "updated_at": "2023-02-02T14:38:24Z",
    "comments": 8,
    "user": "NivekT"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 93516,
    "title": "[Question] How to debug \"munmap_chunk(): invalid pointer\" when compiling to triton?",
    "body": "I'm trying to  use torchdynamo to compile a function to triton.\r\nMy logs indicate that the function optimizes without issue,\r\n\r\nbut when running the function on a given input, I just get \"munmap_chunk(): invalid pointer\" w/o a stack trace / any useful debugging information.\r\n\r\nI'm wondering how to go about debugging such an error.\r\nAre any developers familiar with what this indicates?\n\ncc @ezyang @soumith @msaroufim @wconstab @ngimel @bdhirsh",
    "url": "https://github.com/pytorch/pytorch/issues/93516",
    "state": "closed",
    "labels": [
      "oncall: pt2"
    ],
    "created_at": "2023-01-22T03:36:25Z",
    "updated_at": "2023-02-01T14:19:30Z",
    "user": "vedantroy"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1600,
    "title": "\u2753 [Question] How do you compile for Jetson 5.0? ",
    "body": "## \u2753 Question\r\n\r\nHi, as there seems to be no prebuilt python binary, just wanted to know if there is any way to install this package on jetson 5.0?\r\n\r\n## What you have already tried\r\n\r\nI tried normal installation for jetson 4.6 which fails, I aslo tried this https://forums.developer.nvidia.com/t/installing-building-torch-tensorrt-for-jetpack-5-0-1-dp-l4t-ml-r34-1-1-py3/220565/6 which gives me this error:\r\n```\r\nuser@ubuntu:/mnt/Data/home/ParentCode/TensorRT$ bazel build //:libtorchtrt --platforms //toolchains:jetpack_5.0\r\nStarting local Bazel server and connecting to it...\r\nINFO: Analyzed target //:libtorchtrt (71 packages loaded, 9773 targets configured).\r\nINFO: Found 1 target...\r\nERROR: /mnt/Data/home/ParentCode/TensorRT/cpp/lib/BUILD:5:10: Linking cpp/lib/libtorchtrt_plugins.so failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc @bazel-out/aarch64-fastbuild/bin/cpp/lib/libtorchtrt_plugins.so-2.params\r\n\r\nUse --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging\r\n/usr/bin/ld.gold: warning: skipping incompatible bazel-out/aarch64-fastbuild/bin/_solib_aarch64/_U@libtorch_S_S_Ctorch___Ulib/libtorch.so while searching for torch\r\n/usr/bin/ld.gold: error: cannot find -ltorch\r\n/usr/bin/ld.gold: warning: skipping incompatible bazel-out/aarch64-fastbuild/bin/_solib_aarch64/_U@libtorch_S_S_Ctorch___Ulib/libtorch_cuda.so while searching for torch_cuda\r\n/usr/bin/ld.gold: error: cannot find -ltorch_cuda\r\n/usr/bin/ld.gold: warning: skipping incompatible bazel-out/aarch64-fastbuild/bin/_solib_aarch64/_U@libtorch_S_S_Ctorch___Ulib/libtorch_cpu.so while searching for torch_cpu\r\n/usr/bin/ld.gold: error: cannot find -ltorch_cpu\r\n/usr/bin/ld.gold: warning: skipping incompatible bazel-out/aarch64-fastbuild/bin/_solib_aarch64/_U@libtorch_S_S_Ctorch___Ulib/libtorch_global_deps.so while searching for torch_global_deps\r\n/usr/bin/ld.gold: error: cannot find -ltorch_global_deps\r\n/usr/bin/ld.gold: warning: skipping incompatible bazel-out/aarch64-fastbuild/bin/_solib_aarch64/_U@libtorch_S_S_Cc10_Ucuda___Ulib/libc10_cuda.so while searching for c10_cuda\r\n/usr/bin/ld.gold: error: cannot find -lc10_cuda\r\n/usr/bin/ld.gold: warning: skipping incompatible bazel-out/aarch64-fastbuild/bin/_solib_aarch64/_U@libtorch_S_S_Cc10___Ulib/libc10.so while searching for c10\r\n/usr/bin/ld.gold: error: cannot find -lc10\r\ncollect2: error: ld returned 1 exit status\r\nTarget //:libtorchtrt failed to build\r\nUse --verbose_failures to see the command lines of failed build steps.\r\nINFO: Elapsed time: 19.738s, Critical Path: 6.94s\r\nINFO: 12 processes: 10 internal, 2 linux-sandbox.\r\nFAILED: Build did NOT complete successfully\r\n```\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version: 1.13.0a0+d0d6b1f2.nv22.10\r\n - CPU Architecture: aarch64\r\n - OS (e.g., Linux): Linux, NVidia's version of ubuntu 20.04 for jetson\r\n - Python version: Python 3.8.10\r\n - CUDA version:  \r\nnvcc: NVIDIA (R) Cuda compiler driver\r\nCopyright (c) 2005-2022 NVIDIA Corporation\r\nBuilt on Wed_May__4_00:02:26_PDT_2022\r\nCuda compilation tools, release 11.4, V11.4.239\r\nBuild cuda_11.4.r11.4/compiler.31294910_0\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1600",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "channel: linux-jetpack"
    ],
    "created_at": "2023-01-20T17:08:42Z",
    "updated_at": "2023-09-15T11:33:27Z",
    "user": "arnaghizadeh"
  },
  {
    "repo": "huggingface/setfit",
    "number": 282,
    "title": "Loading a trained SetFit model without setfit?",
    "body": "SetFit team, first off, thanks for the awesome library!\r\n\r\nI'm running into trouble trying to load and run inference on a trained SetFit model without using `SetFitModel.from_pretrained()`. Instead, I'd like to load the model using torch, transformers, sentence_transformers, or some combination thereof. Is there a clear-cut example anywhere of how to do this?\r\n\r\nHere's my current code, which does not return clean predictions. Thank you in advance for the help. For reference, this was trained as a multiclass classification model with 18 potential classes:\r\n\r\n```from sentence_transformers import SentenceTransformer\r\nfrom transformers import AutoTokenizer, AutoModel\r\nimport torch\r\nimport torch.nn.functional as F\r\n\r\ntokenizer = AutoTokenizer.from_pretrained('sentence-transformers/all-MiniLM-L6-v2')\r\ninputs = ['xxx', 'yyy', 'zzz']\r\nencoded_inputs = tokenizer(inputs,\r\n                           padding = True,\r\n                           truncation = True,\r\n                           return_tensors = 'pt')\r\nmodel = AutoModel.from_pretrained('/path/to/trained/setfit/model/')\r\nwith torch.no_grad():\r\n    preds = model(**encoded_inputs)\r\npreds```",
    "url": "https://github.com/huggingface/setfit/issues/282",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-01-20T01:08:00Z",
    "updated_at": "2024-05-21T08:11:08Z",
    "user": "ZQ-Dev8"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5442,
    "title": "OneDrive Integrations  with HF Datasets ",
    "body": "### Feature request\n\nFirst of all , I would like to thank all community who are developed DataSet storage and make it free available  \r\nHow to integrate our Onedrive account or any other possible storage clouds (like google drive,...) with the **HF** datasets section.\r\nFor example, if  I have **50GB** on my **Onedrive** account and I want to move between drive and Hugging face repo or vis versa \n\n### Motivation\n\nmake the dataset section more flexible with other possible storage \r\nlike the integration between Google Collab and Google drive the storage\n\n### Your contribution\n\nCan be done using Hugging face CLI ",
    "url": "https://github.com/huggingface/datasets/issues/5442",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2023-01-19T23:12:08Z",
    "updated_at": "2023-02-24T16:17:51Z",
    "comments": 2,
    "user": "Mohammed20201991"
  },
  {
    "repo": "pytorch/xla",
    "number": 4482,
    "title": "How to save checkpoints in XLA",
    "body": "Hello\r\n\r\nI have training scripts running on CPUs and GPUs without error.\r\nI am trying to make the scripts compatible with TPUs.\r\n\r\nI was using the following lines to save checkpoints\r\n\r\n```\r\ntorch.save(checkpoint, path_checkpoints_file )\r\n```\r\n\r\nand following lines to load checkpoints\r\n\r\n```\r\ncheckpoint = torch.load(path_checkpoints_file, map_location=torch.device('cpu'))\r\n    \r\nlastEpoch = checkpoint['lastEpoch']\r\nactiveChunk = checkpoint['activeChunk']\r\nchunk_count = checkpoint['chunk_count']\r\n\r\nmodel.load_state_dict(checkpoint['model_state_dict'])    \r\nmodel.to(device)\r\n\r\noptimizer.load_state_dict(checkpoint['optimizer_state_dict'])\r\nlr_scheduler.load_state_dict(checkpoint['lr_scheduler_state_dict'])\r\n```\r\n\r\nFor TPUs I replaced the saving operation with\r\n\r\n```\r\nxm.save(checkpoint, path_checkpoints_file )\r\n```\r\n\r\nand the loading part with\r\n\r\n```\r\ncheckpoint = xser.load( path_checkpoints_file )\r\n\r\nlastEpoch = checkpoint['lastEpoch']\r\nactiveChunk = checkpoint['activeChunk']\r\nchunk_count = checkpoint['chunk_count']\r\n\r\nmodel.load_state_dict(checkpoint['model_state_dict'])    \r\nmodel.to(device)\r\n\r\noptimizer.load_state_dict(checkpoint['optimizer_state_dict'])\r\nlr_scheduler.load_state_dict(checkpoint['lr_scheduler_state_dict'])\r\n```\r\n\r\nBut during training, the loss remains almost constant.\r\nDo we have a template to save and load checkpoints having models, optimizers and learning schedulers?\r\n\r\nbest regards\r\n\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/4482",
    "state": "open",
    "labels": [],
    "created_at": "2023-01-19T21:50:05Z",
    "updated_at": "2023-02-15T22:58:13Z",
    "user": "mfatih7"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1106,
    "title": "Vmap and backward hook problem",
    "body": "I try to get the gradient of the intermedia layer of model, so I use the backwards hook with functroch.grad to get the gradient of each image. When I used for loop to iterate each image, I successfully obtained 5000 gradients (dataset size). However, when I use vmap to do the same thing, I only get 40 gradients (40 batches in 1 epoch). Is there any way to solve it, or I have to use for loop? ",
    "url": "https://github.com/pytorch/functorch/issues/1106",
    "state": "open",
    "labels": [],
    "created_at": "2023-01-19T21:25:02Z",
    "updated_at": "2023-01-23T05:08:49Z",
    "comments": 1,
    "user": "pmzzs"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2175,
    "title": "OSError: Missing: valgrind, callgrind_control, callgrind_annotate",
    "body": "The error occurs on below step:\r\n8. Collecting instruction counts with Callgrind:\r\n\r\n\r\nTraceback (most recent call last):\r\n  File \"benchmark.py\", line 805, in <module>\r\n    stats_v0 = t0.collect_callgrind()\r\n  File \"/usr/local/lib/python3.8/dist-packages/torch/utils/benchmark/utils/timer.py\", line 486, in collect_callgrind\r\n    result = valgrind_timer_interface.wrapper_singleton().collect_callgrind(\r\n  File \"/usr/local/lib/python3.8/dist-packages/torch/utils/benchmark/utils/valgrind_wrapper/timer_interface.py\", line 526, in collect_callgrind\r\n    self._validate()\r\n  File \"/usr/local/lib/python3.8/dist-packages/torch/utils/benchmark/utils/valgrind_wrapper/timer_interface.py\", line 512, in _validate\r\n    raise OSError(\"Missing: \" + \", \".join(missing_cmds))\r\nOSError: Missing: valgrind, callgrind_control, callgrind_annotate",
    "url": "https://github.com/pytorch/tutorials/issues/2175",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-01-19T16:00:52Z",
    "updated_at": "2023-01-24T10:47:08Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/data",
    "number": 949,
    "title": "`torchdata` not available through `pytorch-nightly` conda channel",
    "body": "### \ud83d\udc1b Describe the bug\n\nThe nightly version of torchdata does not seem available through the corresponding conda channel.\r\n\r\n**Command:**\r\n```\r\n$ conda install torchdata -c pytorch-nightly --override-channels\r\n```\r\n\r\n**Result:**\r\n```\r\nCollecting package metadata (current_repodata.json): done\r\nSolving environment: failed with initial frozen solve. Retrying with flexible solve.\r\nCollecting package metadata (repodata.json): done\r\nSolving environment: failed with initial frozen solve. Retrying with flexible solve.\r\n\r\nPackagesNotFoundError: The following packages are not available from current channels:\r\n\r\n  - torchdata\r\n\r\nCurrent channels:\r\n\r\n  - https://conda.anaconda.org/pytorch-nightly/osx-arm64\r\n  - https://conda.anaconda.org/pytorch-nightly/noarch\r\n\r\nTo search for alternate channels that may provide the conda package you're\r\nlooking for, navigate to\r\n\r\n    https://anaconda.org\r\n\r\nand use the search bar at the top of the page.\r\n```\r\n\r\n\n\n### Versions\n\n```\r\nPyTorch version: N/A\r\nIs debug build: N/A\r\nCUDA used to build PyTorch: N/A\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: macOS 13.1 (arm64)\r\nGCC version: Could not collect\r\nClang version: Could not collect\r\nCMake version: version 3.22.4\r\nLibc version: N/A\r\n\r\nPython version: 3.10.8 | packaged by conda-forge | (main, Nov 22 2022, 08:25:29) [Clang 14.0.6 ] (64-bit runtime)\r\nPython platform: macOS-13.1-arm64-arm-64bit\r\nIs CUDA available: N/A\r\nCUDA runtime version: Could not collect\r\nCUDA_MODULE_LOADING set to: N/A\r\nGPU models and configuration: Could not collect\r\nNvidia driver version: Could not collect\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: N/A\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.23.5\r\n[conda] numpy                     1.23.5          py310h5d7c261_0    conda-forge\r\n```",
    "url": "https://github.com/meta-pytorch/data/issues/949",
    "state": "closed",
    "labels": [
      "high priority"
    ],
    "created_at": "2023-01-18T15:49:29Z",
    "updated_at": "2023-01-18T17:11:32Z",
    "comments": 4,
    "user": "PierreGtch"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2173,
    "title": "Area calculation in TorchVision Object Detection Finetuning Tutorial",
    "body": "I see that at https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html, \r\n\r\n` area = (boxes[:, 3] - boxes[:, 1]) * (boxes[:, 2] - boxes[:, 0])` but shouldn't it be something like  `area = ((boxes[:, 3] - boxes[:, 1]) + 1) * ((boxes[:, 2] - boxes[:, 0]) + 1) ` for calculating areas? If I am wrong, can someone explain me why is it so. Thanks in advance !\n\ncc @datumbox @nairbv",
    "url": "https://github.com/pytorch/tutorials/issues/2173",
    "state": "closed",
    "labels": [
      "module: vision"
    ],
    "created_at": "2023-01-18T08:55:55Z",
    "updated_at": "2023-02-15T16:55:24Z",
    "comments": 1,
    "user": "Himanshunitrr"
  },
  {
    "repo": "pytorch/torchx",
    "number": 684,
    "title": "Docker workspace: How to specify \"latest\" (nightly) base image?",
    "body": "## \u2753 Questions and Help\r\n\r\nFor my docker workspace (e.g. scheduler == \"local_docker\" or \"aws_batch\"), I'd like to use a base image that is published on a nightly cadence. So I have this `Dockerfile.torchx`\r\n\r\n```\r\n# Dockerfile.torchx\r\nARGS IMAGE\r\nARGS WORKSPACE\r\n\r\nFROM $IMAGE\r\n\r\nWORKDIR /workspace/mfive\r\nCOPY $WORKSPACE .\r\n\r\n# installs my workspace (has setup.py)\r\nRUN pip install -e .[dev]\r\n```\r\n\r\nIn my `.torchxconfig` I've specified the latest default image as:\r\n\r\n```\r\n# .torchxconfig\r\n\r\n[dist.ddp]\r\nimage = registry.gitlab.aws.dev/mfive/mfive-nightly:latest\r\n```\r\n\r\nThe nightly build tags the nightly image as `latest` in addition to the `YYYY.MM.DD` (e.g. `mfive-nightly:2023.01.15`) but because the [`DockerWorkspace`'s build argument has `pull=False`](https://github.com/pytorch/torchx/blob/main/torchx/workspace/docker_workspace.py#L126) this won't work since `latest` will be cached.\r\n\r\nIs there a better way for me to specify a \"use-the-latest\" base image from the repo policy when building a docker workspace?\r\n\r\ncc) @d4l3k ",
    "url": "https://github.com/meta-pytorch/torchx/issues/684",
    "state": "closed",
    "labels": [],
    "created_at": "2023-01-17T22:03:19Z",
    "updated_at": "2023-03-17T22:06:25Z",
    "comments": 3,
    "user": "kiukchung"
  },
  {
    "repo": "pytorch/PiPPy",
    "number": 723,
    "title": "How to reduce memory costs when running on CPU",
    "body": "I running HF_inference.py on my CPU and it works well! It can successfully applying pipeline parallelism on CPU. However, when I applying pipeline parallelism, I found that each rank will load the whole model and it seems not necessary since each rank only performs a part of the model. There must be some ways can figure out this issue and I would love to solve this issue. It would be great if developers of TAU can give me some advice, we can discuss more about it if you have any idea. Thanks!",
    "url": "https://github.com/pytorch/PiPPy/issues/723",
    "state": "closed",
    "labels": [],
    "created_at": "2023-01-17T07:54:31Z",
    "updated_at": "2025-06-10T02:40:11Z",
    "user": "jiqing-feng"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 2012,
    "title": "Reduce Imagic Pipeline Memory Consumption",
    "body": "I'm running the [Imagic Stable Diffusion community pipeline](https://github.com/huggingface/diffusers/blob/main/examples/community/imagic_stable_diffusion.py) and it's routinely allocating 25-38 GiB GPU vRAM which seems excessively high. \r\n\r\n@MarkRich any ideas on how to reduce memory usage? Xformers and attention slicing brings it down to 20-25 GiB but fp16 doesn't work and memory consumption in general seems excessively high (trying to deploy on serverless GPUs)",
    "url": "https://github.com/huggingface/diffusers/issues/2012",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2023-01-16T23:43:03Z",
    "updated_at": "2023-02-24T15:03:35Z",
    "user": "andreemic"
  },
  {
    "repo": "huggingface/optimum",
    "number": 697,
    "title": "Custom model output",
    "body": "### System Info\n\n```shell\nCopy-and-paste the text below in your GitHub issue:\r\n\r\n- `optimum` version: 1.6.1\r\n- `transformers` version: 4.25.1\r\n- Platform: Linux-5.19.0-29-generic-x86_64-with-glibc2.36\r\n- Python version: 3.10.8\r\n- Huggingface_hub version: 0.11.1\r\n- PyTorch version (GPU?): 1.13.1 (cuda availabe: True)\n```\n\n\n### Who can help?\n\n@michaelbenayoun @lewtun @fxm\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nno code\n\n### Expected behavior\n\nSorry in advance if it does exists already, but I didn't find any doc on this.\r\n\r\nIn transformers it is possible to custom the output of a model by adding some boolean input arguments such as `output_attentions` and `output_hiddens`. How to make them available in my exported ONNX model?\r\n\r\nIf it is not possible yet, I will update this thread into a feature request :)\r\n\r\nThanks in advance.",
    "url": "https://github.com/huggingface/optimum/issues/697",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2023-01-16T14:08:12Z",
    "updated_at": "2023-04-11T12:30:04Z",
    "comments": 3,
    "user": "jplu"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5424,
    "title": "When applying `ReadInstruction` to custom load it's not DatasetDict but list of Dataset?",
    "body": "### Describe the bug\n\nI am loading datasets from custom `tsv` files stored locally and applying split instructions for each split. Although the ReadInstruction is being applied correctly and I was expecting it to be `DatasetDict` but instead it is a list of `Dataset`. \n\n### Steps to reproduce the bug\n\nSteps to reproduce the behaviour:\r\n\r\n1. Import \r\n   `from datasets import load_dataset, ReadInstruction`\r\n2. Instruction to load the dataset\r\n  ```\r\ninstructions = [\r\n      ReadInstruction(split_name=\"train\", from_=0, to=10, unit='%', rounding='closest'),\r\n      ReadInstruction(split_name=\"dev\", from_=0, to=10, unit='%', rounding='closest'),\r\n      ReadInstruction(split_name=\"test\", from_=0, to=5, unit='%', rounding='closest')\r\n  ]\r\n```\r\n3. Load \r\n`dataset = load_dataset('csv', data_dir=\"data/\", data_files={\"train\":\"train.tsv\", \"dev\":\"dev.tsv\", \"test\":\"test.tsv\"}, delimiter=\"\\t\", split=instructions)`\r\n\n\n### Expected behavior\n\n**Current behaviour**\r\n\r\n![Screenshot from 2023-01-16 10-45-27](https://user-images.githubusercontent.com/25720695/212614754-306898d8-8c27-4475-9bb8-0321bd939561.png)\r\n:\r\n \r\n**Expected behaviour**\r\n\r\n![Screenshot from 2023-01-16 10-45-42](https://user-images.githubusercontent.com/25720695/212614813-0d336bf7-5266-482e-bb96-ef51f64de204.png)\r\n\n\n### Environment info\n\n``datasets==2.8.0\r\n``\r\n`Python==3.8.5\r\n`\r\n`Platform - Ubuntu 20.04.4 LTS`",
    "url": "https://github.com/huggingface/datasets/issues/5424",
    "state": "closed",
    "labels": [],
    "created_at": "2023-01-16T06:54:28Z",
    "updated_at": "2023-02-24T16:19:00Z",
    "comments": 1,
    "user": "macabdul9"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 92202,
    "title": "Generator: when I want to use a  new backend, how to create a Generator with the  new backend?",
    "body": "### \ud83d\udc1b Describe the bug\n\n I want to add a new backend, so I add my backend  by referring to this tutorial.  https://github.com/bdhirsh/pytorch_open_registration_example\r\n\r\nBut how to create a Generator with my new backend ?\r\nI see the code related to 'Generator' is in the file, https://github.com/pytorch/pytorch/blob/master/torch/csrc/Generator.cpp\r\n\r\nstatic PyObject* THPGenerator_pynew(\r\n    PyTypeObject* type,\r\n    PyObject* args,\r\n    PyObject* kwargs) {\r\n  HANDLE_TH_ERRORS\r\n  static torch::PythonArgParser parser({\"Generator(Device device=None)\"});\r\n  torch::ParsedArgs<1> parsed_args;\r\n  auto r = parser.parse(args, kwargs, parsed_args);\r\n  auto device = r.deviceWithDefault(0, at::Device(at::kCPU));\r\n\r\n  THPGeneratorPtr self((THPGenerator*)type->tp_alloc(type, 0));\r\n  if (device.type() == at::kCPU) {\r\n    self->cdata = make_generator<CPUGeneratorImpl>();\r\n  }\r\n#ifdef USE_CUDA\r\n  else if (device.type() == at::kCUDA) {\r\n    self->cdata = make_generator<CUDAGeneratorImpl>(device.index());\r\n  }\r\n#elif USE_MPS\r\n  else if (device.type() == at::kMPS) {\r\n    self->cdata = make_generator<MPSGeneratorImpl>();\r\n  }\r\n#endif\r\n  else {\r\n    AT_ERROR(\r\n        \"Device type \",\r\n        c10::DeviceTypeName(device.type()),\r\n        \" is not supported for torch.Generator() api.\");\r\n  }\r\n  return (PyObject*)self.release();\r\n  END_HANDLE_TH_ERRORS\r\n}\r\n\r\n\r\nSo how to create a Generator  with my new backend named \"privateuseone\" ? \n\n### Versions\n\nnew backend \r\npython:3.7.5 \r\npytorch: 2.0.0\r\nCUDA: None",
    "url": "https://github.com/pytorch/pytorch/issues/92202",
    "state": "closed",
    "labels": [
      "triaged",
      "module: backend"
    ],
    "created_at": "2023-01-14T08:11:04Z",
    "updated_at": "2023-10-28T15:02:10Z",
    "user": "heidongxianhua"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1592,
    "title": "\u2753 [Question] How should recompilation in Torch Dynamo + `fx2trt` be handled?",
    "body": "## \u2753 Question\r\n\r\nGiven that Torch Dynamo compiles models lazily, how should benchmarking/usage of Torch Dynamo models, especially in cases where the inputs have a dynamic batch dimension, be handled?\r\n\r\n## What you have already tried\r\n\r\nBased on compiling and running inference using `fx2trt` with Torch Dynamo on the [BERT base-uncased model](https://huggingface.co/bert-base-uncased), and other similar networks, it seems that Torch Dynamo recompiles the model for each different batch-size input provided. Additionally, once the object has encountered a particular batch size, it does not recompile the model from scratch upon seeing another input of the same shape. It seems that Dynamo may be caching statically-shaped model compilations and dynamically selecting among these at inference time. The code used to generate the dynamo model and outputs is:\r\n```python\r\ndynamo_model = torchdynamo.optimize(\"fx2trt\")(model)\r\noutput = dynamo_model(input)\r\n```\r\nWhile Dynamo does have a flag which allows users to specify dynamic shape prior to compilation (`torchdynamo.config.dynamic_shapes=True`), for BERT this seems to break compilation with `fx2trt`.\r\n\r\nRecompilation of the model for each new batch size makes inference challenging for benchmarking and general usage tasks, as each time the model encounters an input of new shape, it would take much longer to complete the inference task than otherwise.\r\n\r\n## Environment\r\n\r\n - PyTorch Version (e.g., 1.0): 1.14.0.dev20221114+cu116\r\n - Torch-TRT Version: dc570e47\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Python version: 3.8\r\n - CUDA version: 11.6\r\n\r\n## Additional context\r\nDynamo provides many benefits when used in conjunction with fx2trt, as it enables accelerated inference even when the graph might not normally be traceable due to control flow constraints. It would be beneficial to understand the dynamic batch/recompilation issue so Dynamo can be more effectively integrated into benchmarking for Torch-TRT.\r\n\r\nQuestion #1569 could be relevant to this issue as it also relates to Dynamic Batch + FX.",
    "url": "https://github.com/pytorch/TensorRT/issues/1592",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: fx"
    ],
    "created_at": "2023-01-14T02:18:53Z",
    "updated_at": "2023-05-09T00:02:14Z",
    "user": "gs-olive"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1101,
    "title": "How to get only the last few layers' gradident?",
    "body": "```\r\nfrom functorch import make_functional_with_buffers, vmap, grad\r\nfmodel, params, buffers = make_functional_with_buffers(net,disable_autograd_tracking=True)\r\n\r\ndef compute_loss_stateless_model (params, buffers, sample, target):\r\n    batch = sample.unsqueeze(0)\r\n    targets = target.unsqueeze(0)\r\n\r\n    predictions = fmodel(params, buffers, batch) \r\n    loss = criterion(predictions, targets)\r\n    return loss\r\n\r\nft_compute_grad = grad(compute_loss_stateless_model)\r\ngradinet = ft_compute_grad(params, buffers, train_poi_set[0][0].cuda(), torch.tensor(train_poi_set[0][1]).cuda())\r\n```\r\nThis will return the gradient of the whole model. However, I only want the second last layers' gradient, like:\r\n```\r\ngradinet = ft_compute_grad(params, buffers, train_poi_set[0][0].cuda(), torch.tensor(train_poi_set[0][1]).cuda())[-2]\r\n```\r\nAlthough this method can also obtain the required gradient, it will cause a lot of unnecessary overhead. Is there any way to close the 'require_grad' of all previous layers? Thanks for your answer!",
    "url": "https://github.com/pytorch/functorch/issues/1101",
    "state": "open",
    "labels": [],
    "created_at": "2023-01-13T21:48:42Z",
    "updated_at": "2024-04-05T03:02:41Z",
    "user": "pmzzs"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1099,
    "title": "Will pmap be supported in functorh\uff1f",
    "body": "Greetings, I am very grateful that vmap is supported in functorch. Is there any plan to include support for pmap in the future? Thank you. Additionally, what are the ways that I can contribute to the development of this project?",
    "url": "https://github.com/pytorch/functorch/issues/1099",
    "state": "open",
    "labels": [],
    "created_at": "2023-01-11T17:32:48Z",
    "updated_at": "2024-06-05T16:32:36Z",
    "comments": 2,
    "user": "shixun404"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1585,
    "title": "\u2753 [Question] How can I make deserialized targets compatible with Torch-TensorRT ABI?",
    "body": "## \u2753 Question\r\n\r\nWhen I load my compiled model:\r\n\r\n`model = torch.jit.load('model.ts')\r\n`\r\n\r\n**I keep getting the error:** \r\n\r\n`RuntimeError: [Error thrown at core/runtime/TRTEngine.cpp:250] Expected serialized_info.size() == SERIALIZATION_LEN to be true but got false\r\nProgram to be deserialized targets an incompatible Torch-TensorRT ABI`\r\n\r\n## What you have already tried\r\n\r\nIt works when I run the model inside the official [Nvidia PyTorch Release 22.12](https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-22-12.html#rel-22-12) docker image:\r\n\r\n```\r\nmodel = torch.jit.load('model.ts')\r\nmodel.eval()\r\n```\r\n\r\n\r\nHowever, I want to run the model in my normal environment for debugging purposes.\r\n\r\nI've installed torch-tensorrt with: pip install torch-tensorrt==1.3.0 --find-links https://github.com/pytorch/TensorRT/releases/expanded_assets/v1.3.0\r\nAnd I've compiled my model using docker:  nvcr.io/nvidia/pytorch:22.12-py3\r\n\r\nThe [1.3.0 Release](https://github.com/pytorch/TensorRT/releases/tag/v1.3.0) says that it's based on TensorRT 8.5, and the docker image: [TensorRT\u2122 8.5.1](https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-22-12.html#rel-22-12). I've also tried the 22.09 image that specifies NVIDIA TensorRT\u2122 [8.5.0.12](https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-22-09.html#rel-22-09), but I'm still getting the same error.\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version: 1.13.0\r\n - CPU Architecture: AMD Rome\r\n - OS: Ubuntu 22.04 LTS\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\npip install torch==1.13.0+cu117 torchvision==0.14.0+cu117 --extra-index-url https://download.pytorch.org/whl/cu117 https://download.pytorch.org/whl/cu113\r\npip install nvidia-pyindex\r\npip install nvidia-tensorrt\r\npip install torch-tensorrt==1.3.0 --find-links https://github.com/pytorch/TensorRT/releases/expanded_assets/v1.3.0\r\nimport torch_tensorrt\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.9\r\n - CUDA version: cu117\r\n - GPU models and configuration: Nvidia A6000 (Ampere)\r\n - Any other relevant information:\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1585",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: runtime"
    ],
    "created_at": "2023-01-11T12:44:58Z",
    "updated_at": "2023-05-04T00:02:16Z",
    "user": "emilwallner"
  },
  {
    "repo": "pytorch/kineto",
    "number": 713,
    "title": "How to get the CPU utilization by Pytorch Profiler?",
    "body": "According to the code of gpu_metrics_parser.py of torch-tb-profiler, I understand that the gpu utilization is actually the sum of event times of type EventTypes.KERNEL over a period of time  / total time. So, is CPU utilization the sum of event times of type EventTypes.OPERATOR over a period of time / total time? \r\nIt seems that the result of this calculation is not normal.",
    "url": "https://github.com/pytorch/kineto/issues/713",
    "state": "closed",
    "labels": [],
    "created_at": "2023-01-11T09:46:20Z",
    "updated_at": "2023-02-15T03:53:40Z",
    "user": "young-chao"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1580,
    "title": "I am deleting some layers of Resneet152 for example del resnet152.fc  and del resnet152.layer4 and save it locally in order to get the dimension of 1024. Later when I import this saved model it complains about the missing layer4. What might be the the reason? Does still try tp access the original model. How can get 1024 feature vectors for a given image using Resnet1024.",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture:\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1580",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2023-01-09T15:22:23Z",
    "updated_at": "2023-04-22T00:02:19Z",
    "user": "pradeep10kumar"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1579,
    "title": "When I delete some layers from Resnet152 for example",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture:\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1579",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-01-09T15:17:50Z",
    "updated_at": "2023-01-09T15:18:31Z",
    "user": "pradeep10kumar"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1578,
    "title": "\u2753 [Question] Failed to compile EfficientNet: Error: Segmentation fault (core dumped)",
    "body": "I followed the step in the demo notebook `[EfficientNet-example.ipynb](https://github.com/pytorch/TensorRT/blob/main/notebooks/EfficientNet-example.ipynb)`\r\n\r\nWhen I try to compile EfficientNet, an error occurred: `Segmentation fault (core dumped)` \r\n\r\nI have located the error is caused by \r\n`\r\ntrt_model_fp32 = torch_tensorrt.compile(model, inputs = [torch_tensorrt.Input((1, 3, 512, 512), dtype=torch.float32)],\r\n    enabled_precisions = torch.float32, # Run with FP32\r\n    workspace_size = 1 << 22\r\n)\r\n`\r\n\r\nFull code\r\n\r\n```\r\nimport os\r\nimport numpy as np\r\nfrom PIL import Image\r\nfrom torchvision import transforms\r\nimport sys\r\nimport timm\r\nimport torch.nn as nn\r\nimport torch\r\nimport io\r\nimport torch.backends.cudnn as cudnn\r\nimport torch_tensorrt\r\n\r\nSIZE = 512\r\ncudnn.benchmark = True\r\n\r\npreprocess_transform =  transforms.Compose([\r\n                            transforms.ToTensor(),\r\n                            transforms.Resize((SIZE, SIZE)),\r\n                            transforms.Normalize(\r\n                            mean=[0.485, 0.456, 0.406],\r\n                            std=[0.229, 0.224, 0.225],\r\n                            )])\r\n\r\n\r\ndef preprocess(byteImage):\r\n    image = Image.open(io.BytesIO(byteImage))\r\n    image = Image.fromarray(np.array(image)[:,:,:3])\r\n    return preprocess_transform(image).unsqueeze(0)\r\n\r\n\r\nclass CustomModel(nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.model = timm.create_model('tf_efficientnet_b0_ns', pretrained=False)\r\n        self.n_features = self.model.classifier.in_features\r\n        self.model.classifier = nn.Identity()\r\n        self.fc = nn.Linear(self.n_features, 1)\r\n\r\n    def feature(self, image):\r\n        feature = self.model(image)\r\n        return feature\r\n        \r\n    def forward(self, image):\r\n        feature = self.feature(image)\r\n        output = self.fc(feature)\r\n        return output\r\n\r\ndef predict(tensorImage):\r\n    tensorImage = tensorImage.to('cuda')\r\n    with torch.no_grad:\r\n        pred = trt_model_fp32(tensorImage)\r\n    torch.cuda.synchronize()\r\n    return pred.cpu().detach().numpy()\r\n\r\nmodel = CustomModel().to('cuda')\r\nstate_dict = torch.load(my_weight_path, map_location='cuda')\r\nmodel.load_state_dict(state_dict['model'])\r\nmodel.eval()\r\ntrt_model_fp32 = torch_tensorrt.compile(model, inputs = [torch_tensorrt.Input((1, 3, 512, 512), dtype=torch.float32)],\r\n    enabled_precisions = torch.float32, # Run with FP32\r\n    workspace_size = 1 << 22\r\n)\r\ninput_data = torch.randn(1,3,512,512).to('cuda')\r\npred = predict(input_data)\r\nprint(pred.shape)\r\nprint(pred)\r\n```\r\n\r\nPlease help\u2757",
    "url": "https://github.com/pytorch/TensorRT/issues/1578",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-01-09T14:44:25Z",
    "updated_at": "2023-02-28T23:40:20Z",
    "user": "Tonyboy999"
  },
  {
    "repo": "huggingface/setfit",
    "number": 260,
    "title": "How to use .predict() function ",
    "body": "Hi,\r\n\r\nI am new at using the setfit. I will be running many tunings for models and currently achieved getting evaluation metrics using (\"trainer.evaluate())\r\nHowever, is there any way to do something like the following to save the trained model's predictions?  \r\n\r\ntrainer = SetFitTrainer(......)\r\ntrainer.train()\r\n**predictions=trainer.predict(testX)**\r\nSetFitTrainer has no predict function\r\n\r\nI can achieve that with trainer.push_to_hub() and downloading back with SetFitModel.from_pretrained() but there is probably a better way without publishing on the hub?\r\n",
    "url": "https://github.com/huggingface/setfit/issues/260",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-01-08T23:18:56Z",
    "updated_at": "2023-01-09T10:00:38Z",
    "user": "yafsin"
  },
  {
    "repo": "huggingface/setfit",
    "number": 256,
    "title": "Contrastive training number of epochs",
    "body": "The `SentenceTransformer` number of epochs is the same as the number of epochs for the classification head. \r\nEven when `SetFitTrainer` is initialized with `num_epochs=1` and then `trainer.train(num_epochs=10)`, the sentence transformer runs with 10 epochs. Ideally, senatence transformer should run 1 epoch and the classifier should run for 10. \r\n\r\nThe reason for this is that in `trainer.py`, the `model_body.fit()` is called with `num_epochs` rather than `self.num_epochs`. Is this intended??\r\n\r\nI can write a PR to fix this if needed. \r\n",
    "url": "https://github.com/huggingface/setfit/issues/256",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-01-06T02:26:30Z",
    "updated_at": "2023-01-09T10:54:45Z",
    "user": "abhinav-kashyap-asus"
  },
  {
    "repo": "pytorch/serve",
    "number": 2057,
    "title": "what is my_tc ?",
    "body": "### \ud83d\udc1b Describe the bug\n\ntorchserve --start --model-store model_store --models my_tc=BERTTokenClassification.mar --ncs\r\ncurl -X POST http://127.0.0.1:8080/predictions/my_tc -T Token_classification_artifacts/sample_text_captum_input.txt\r\n\n\n### Error logs\n\n2023-01-05T15:51:41,260 [INFO ] W-9001-my_tc_1.0-stdout MODEL_LOG - model_name: my_tc, batchSize: 1\r\n2023-01-05T15:51:41,628 [INFO ] W-9003-my_tc_1.0-stdout MODEL_LOG - Listening on port: /tmp/.ts.sock.9003\r\n2023-01-05T15:51:41,633 [INFO ] W-9003-my_tc_1.0-stdout MODEL_LOG - Successfully loaded /data//python3.9/site-packages/ts/configs/metrics.yaml.\r\n\r\nSo **model_name** is my_tc ? not BERTTokenClassification\r\n\n\n### Installation instructions\n\nconda install -c pytorch torchserve torch-model-archiver torch-workflow-archiver\n\n### Model Packaing\n\ntorch-model-archiver --model-name BERTTokenClassification --version 1.0 --serialized-file Transformer_model/pytorch_model.bin --handler ./Transformer_handler_generalized.py --extra-files \"Transformer_model/config.json,./setup_config.json,./Token_classification_artifacts/index_to_name.json\"\r\n\r\nmodel_name is what ?\r\n\n\n### config.properties\n\n_No response_\n\n### Versions\n\n------------------------------------------------------------------------------------------\r\nEnvironment headers\r\n------------------------------------------------------------------------------------------\r\nTorchserve branch: \r\n\r\ntorchserve==0.7.0b20221212\r\ntorch-model-archiver==0.7.0b20221212\r\n\r\nPython version: 3.9 (64-bit runtime)\r\nPython executable: /data/python\r\n\r\nVersions of relevant python libraries:\r\ncaptum==0.6.0\r\nfuture==0.18.2\r\nnumpy==1.24.1\r\nnvgpu==0.9.0\r\npsutil==5.9.4\r\nrequests==2.28.1\r\nsentence-transformers==2.2.2\r\nsentencepiece==0.1.97\r\ntorch==1.13.1+cu116\r\ntorch-model-archiver==0.7.0b20221212\r\ntorch-workflow-archiver==0.2.6b20221212\r\ntorchaudio==0.13.1+cu116\r\ntorchserve==0.7.0b20221212\r\ntorchvision==0.14.1+cu116\r\ntransformers==4.26.0.dev0\r\nwheel==0.37.1\r\ntorch==1.13.1+cu116\r\n**Warning: torchtext not present ..\r\ntorchvision==0.14.1+cu116\r\ntorchaudio==0.13.1+cu116\r\n\r\nJava Version:\r\n\r\n\r\nOS: CentOS Linux release 7.9.2009 (Core)\r\nGCC version: (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)\r\nClang version: N/A\r\nCMake version: version 2.8.12.2\r\n\r\nIs CUDA available: Yes\r\nCUDA runtime version: 11.6.124\r\nGPU models and configuration: \r\nGPU 0: Tesla T4\r\nGPU 1: Tesla T4\r\nGPU 2: Tesla T4\r\nNvidia driver version: 510.108.03\r\ncuDNN version: Probably one of the following:\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn.so.8\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_adv_train.so.8\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8\n\n### Repro instructions\n\njust want to know what is my_tc\r\n\n\n### Possible Solution\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2057",
    "state": "open",
    "labels": [
      "triaged"
    ],
    "created_at": "2023-01-05T07:57:46Z",
    "updated_at": "2023-01-05T15:00:14Z",
    "user": "ucas010"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 1921,
    "title": "How to finetune inpainting model for object removal? What is the input prompt for object removal for both training and inference?",
    "body": "\r\nHi team,\r\nThanks for your great work!\r\nI am trying to get object removal functionality from inpainting of SD.\r\nHow to finetune inpainting model for object removal?\r\nWhat is the input prompt for object removal for both training and inference?\r\nThanks",
    "url": "https://github.com/huggingface/diffusers/issues/1921",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2023-01-05T01:23:20Z",
    "updated_at": "2023-04-03T14:50:38Z",
    "user": "hdjsjyl"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1094,
    "title": "batching over model parameters",
    "body": "I have a use-case for `functorch`. I would like to check possible iterations of model parameters in a very efficient way (I want to eliminate the loop). Here's an example code for a simplified case I got it working:\r\n\r\n```python\r\nlinear = torch.nn.Linear(10,2)\r\ndefault_weight = linear.weight.data\r\nsample_input = torch.rand(3,10)\r\nsample_add = torch.rand_like(default_weight)\r\ndef interpolate_weights(alpha):\r\n    with torch.no_grad():\r\n        res_weight = torch.nn.Parameter(default_weight + alpha*sample_add)\r\n        linear.weight = res_weight\r\n        return linear(sample_input)\r\n```\r\n\r\nnow I could do `for alpha in np.np.linspace(0.0, 1.0, 100)` but I want to vectorise this loop since my code is prohibitively slow. Is functorch here applicable? Executing:\r\n\r\n```python\r\nalphas = torch.linspace(0.0, 1.0, 100)\r\nvmap(interpolate_weights)(alphas)\r\n```\r\n\r\nworks, but how to do something similar for a simple resnet does not work. I've tried using `load_state_dict` but that's not working:\r\n\r\n```python\r\nfrom torchvision import models\r\nmodel_resnet = models.resnet18(pretrained=True)\r\n\r\nnamed_params = list(model_resnet.named_parameters())\r\nnamed_params_data = [(n,p.data.clone()) for (n,p) in named_params]\r\n\r\nsample_data = torch.rand(10,3,224,244)\r\n\r\ndef test_resnet(new_params):\r\n    def interpolate(alpha):\r\n        with torch.no_grad():\r\n            p_dict = {name:(old + alpha*new_params[i]) for i,(name, old) in enumerate(named_params_data)}\r\n            model_resnet.load_state_dict(p_dict, strict=False)\r\n            out = model_resnet(sample_data)\r\n            return out\r\n    return interpolate\r\n\r\nrand_tensor = [torch.rand_like(p) for n,p in named_params_data]\r\n\r\nto_vamp_resnet = test_thing(rand_tensor)\r\nvmap(to_vamp_resnet)(alphas)\r\n```\r\n\r\nresults in:\r\n\r\n`\r\nWhile copying the parameter named \"fc.bias\", whose dimensions in the model are torch.Size([1000]) and whose dimensions in the checkpoint are torch.Size([1000]), an exception occurred : ('vmap: inplace arithmetic(self, *extra_args) is not possible because there exists a Tensor `other` in extra_args that has more elements than `self`. This happened due to `other` being vmapped over but `self` not being vmapped over in a vmap. Please try to use out-of-place operators instead of inplace arithmetic. If said operator is being called inside the PyTorch framework, please file a bug report instead.',).\r\n`",
    "url": "https://github.com/pytorch/functorch/issues/1094",
    "state": "open",
    "labels": [],
    "created_at": "2023-01-04T17:59:59Z",
    "updated_at": "2023-01-04T21:42:36Z",
    "comments": 2,
    "user": "LeanderK"
  },
  {
    "repo": "huggingface/setfit",
    "number": 254,
    "title": "Why are the models fine-tuned with CosineSimilarity between 0 and 1?",
    "body": "Hi everyone,\r\n\r\nThis is a small question related to how models are fine-tuned during the first step of training. I see that the default loss function is `losses.CosineSimilarityLoss`. But when generating sentence pairs [here](https://github.com/huggingface/setfit/blob/35c0511fa9917e653df50cb95a22105b397e14c0/src/setfit/modeling.py#L546), negative ones are assigned a 0 label. \r\nI understand that having scores between 0 and 1 is ideal, because they can be interpreted as probabilities. But cosine similarity ranges from -1 to 1, so shouldn't we expect the full range to be used? The model head can then make predictions on a more isotropic embedding space.\r\nIs this related to how Sentence Transformers are pre-trained?\r\n\r\nThanks for your clarifications!",
    "url": "https://github.com/huggingface/setfit/issues/254",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2023-01-03T09:47:11Z",
    "updated_at": "2023-03-14T10:24:17Z",
    "user": "EdouardVilain-Git"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1570,
    "title": "\u2753 [Question] When I use fx2trt, can an unsupported op fallback to pytorch like the TorchScript compiler?",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\nWhen I use fx2trt, can an unsupported op fallback to pytorch like the TorchScript compiler?",
    "url": "https://github.com/pytorch/TensorRT/issues/1570",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2023-01-03T05:26:00Z",
    "updated_at": "2023-01-06T22:22:12Z",
    "user": "chenzhengda"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1569,
    "title": "\u2753 [Question] How do you use dynamic shape when using fx as ir and the model is not fully lowerable",
    "body": "## \u2753 Question\r\n\r\nI have a pytorch model that contains a Pixel Shuffle operation (which is not fully supported) and I would like to convert it to TensorRT, while being able to specify a dynamic shape as input. The \"ts\" path does not work as there is an issue, the \"fx\" path has problems too and I am not able to use a splitted model with dynamic shapes.\r\n\r\n## What you have already tried\r\n\r\n* The conversion using TorchScript as \"ir\" is not working (see Issue #1568)\r\n* The conversion using `torch_tensorrt.fx.compile` succeeds when I use a static shape, however there is no way of specifying a dynamic shape\r\n* Using a manual approach (that is by manually tracing with `acc_tracer`, then constructing the `TRTInterpreter` and finally the `TRTModule`) fails as there is a non supported operation (a pixel shuffle layer) (Maybe I should open an Issue for this too?)\r\n* Using the manual approach with a `TRTSplitter` is maybe the way to go but I don't know how to specify the dynamic shape constraints in this situation.\r\n\r\nThe \"manual\" approach that I mentioned is the one specified in [examples/fx/fx2trt_example.py](https://github.com/pytorch/TensorRT/blob/master/examples/fx/fx2trt_example.py) and in the docs. \r\n\r\nHere is the code as I have it now. Please note that the branch with the splitter is executed and the result is errors when I execute the trt model with different shapes. If `do_split` is set to `False` the conversion fails as `nn.PixelShuffle` is not supported.\r\n\r\n```python\r\nimport tensorrt as trt\r\nimport torch.fx\r\nimport torch.nn as nn\r\n\r\nimport torch_tensorrt.fx.tracer.acc_tracer.acc_tracer as acc_tracer\r\nimport torchvision.models as models\r\nfrom torch_tensorrt.fx import InputTensorSpec, TRTInterpreter, TRTModule\r\nfrom torch_tensorrt.fx.utils import LowerPrecision\r\nfrom torch_tensorrt.fx.tools.trt_splitter import TRTSplitter\r\n\r\n\r\nclass MyModel(nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.conv = nn.Conv2d(3, 16, kernel_size=3, padding=1)\r\n        self.shuffle = nn.PixelShuffle(2)\r\n\r\n    def forward(self, x):\r\n        return self.shuffle(self.conv(x))\r\n\r\n\r\ntorch.set_grad_enabled(False)\r\n\r\n# inputs\r\ninputs = [torch.rand(1, 3, 224, 224).cuda()]\r\n\r\n\r\nfactory_kwargs = {\"dtype\": torch.float32, \"device\": torch.device(\"cuda:0\")}\r\nmodel = MyModel().to(**factory_kwargs)\r\n\r\nmodel = model.eval()\r\n\r\nout = model(inputs[0])\r\n\r\n# sybolic trace\r\nacc_model = acc_tracer.trace(model, inputs)\r\n\r\ndo_split = True\r\n\r\nif do_split:\r\n    # split\r\n    splitter = TRTSplitter(acc_model, inputs)\r\n\r\n    splitter.node_support_preview(dump_graph=False)\r\n\r\n    split_mod = splitter()\r\n\r\n    print(split_mod.graph)\r\n\r\n    def get_submod_inputs(mod, submod, inputs):\r\n        acc_inputs = None\r\n\r\n        def get_input(self, inputs):\r\n            nonlocal acc_inputs\r\n            acc_inputs = inputs\r\n\r\n        handle = submod.register_forward_pre_hook(get_input)\r\n        mod(*inputs)\r\n        handle.remove()\r\n        return acc_inputs\r\n\r\n    for name, _ in split_mod.named_children():\r\n        if \"_run_on_acc\" in name:\r\n            submod = getattr(split_mod, name)\r\n            # Get submodule inputs for fx2trt\r\n            acc_inputs = get_submod_inputs(split_mod, submod, inputs)\r\n\r\n            # fx2trt replacement\r\n            interp = TRTInterpreter(\r\n                submod,\r\n                InputTensorSpec.from_tensors(acc_inputs),\r\n                explicit_batch_dimension=True,\r\n            )\r\n            r = interp.run(lower_precision=LowerPrecision.FP32)\r\n            trt_mod = TRTModule(*r)\r\n            setattr(split_mod, name, trt_mod)\r\n\r\n    trt_model = split_mod\r\n\r\nelse:\r\n    # input specs\r\n    input_specs = [\r\n        InputTensorSpec(\r\n            shape=(1, 3, -1, -1),\r\n            dtype=torch.float32,\r\n            device=\"cuda:0\",\r\n            shape_ranges=[((1, 3, 112, 112), (1, 3, 224, 224), (1, 3, 512, 512))],\r\n        ),\r\n    ]\r\n    # input_specs = [\r\n    #     InputTensorSpec(\r\n    #         shape=(1, 3, 224, 224),\r\n    #         dtype=torch.float32,\r\n    #         device=\"cuda:0\",\r\n    #     ),\r\n    # ]\r\n\r\n    # TRT interpreter\r\n    interp = TRTInterpreter(\r\n        acc_model,\r\n        input_specs,\r\n        explicit_batch_dimension=True,\r\n        explicit_precision=True,\r\n        logger_level=trt.Logger.INFO,\r\n    )\r\n\r\n    interpreter_result = interp.run(\r\n        max_batch_size=4, lower_precision=LowerPrecision.FP32\r\n    )\r\n\r\n    # TRT module\r\n    trt_model = TRTModule(\r\n        interpreter_result.engine,\r\n        interpreter_result.input_names,\r\n        interpreter_result.output_names,\r\n    )\r\n\r\ntrt_out = trt_model(inputs[0])\r\n\r\n\r\ntrt_model(torch.rand(1,3, 112, 112).cuda())\r\ntrt_model(torch.rand(1,3, 150, 150).cuda())\r\ntrt_model(torch.rand(1,3, 400, 400).cuda())\r\ntrt_model(torch.rand(1,3, 512, 512).cuda())\r\n\r\nprint((trt_out - out).max())\r\n\r\n```\r\n\r\n## Environment\r\n\r\nThe official NVIDIA Pytorch Docker image version 22.12 is used.\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug",
    "url": "https://github.com/pytorch/TensorRT/issues/1569",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: fx"
    ],
    "created_at": "2023-01-02T14:44:52Z",
    "updated_at": "2023-04-15T00:02:10Z",
    "user": "ivan94fi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 91537,
    "title": "Unclear how to change compiler used by `torch.compile`",
    "body": "### \ud83d\udcda The doc issue\r\n\r\nIt is not clear from https://pytorch.org/tutorials//intermediate/torch_compile_tutorial.html, nor from the docs in `torch.compile`, nor even from looking through `_dynamo/config.py`, how one can change the compiler used by PyTorch.\r\n\r\nRight now I am seeing the following issue. My code:\r\n\r\n```python\r\nimport torch\r\n\r\n@torch.compile\r\ndef f(x):\r\n    return 0.5 * x\r\n\r\nf(torch.tensor(1.0))\r\n```\r\n\r\n<details><summary>This produces the following error message (click to toggle):</summary>\r\n\r\n```\r\n---------------------------------------------------------------------------\r\nCalledProcessError                        Traceback (most recent call last)\r\nFile ~/venvs/main/lib/python3.10/site-packages/torch/_inductor/codecache.py:445, in CppCodeCache.load(cls, source_code)\r\n    444 try:\r\n--> 445     subprocess.check_output(cmd, stderr=subprocess.STDOUT)\r\n    446 except subprocess.CalledProcessError as e:\r\n\r\nFile /opt/homebrew/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py:421, in check_output(timeout, *popenargs, **kwargs)\r\n    419     kwargs['input'] = empty\r\n--> 421 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,\r\n    422            **kwargs).stdout\r\n\r\nFile /opt/homebrew/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py:526, in run(input, capture_output, timeout, check, *popenargs, **kwargs)\r\n    525     if check and retcode:\r\n--> 526         raise CalledProcessError(retcode, process.args,\r\n    527                                  output=stdout, stderr=stderr)\r\n    528 return CompletedProcess(process.args, retcode, stdout, stderr)\r\n\r\nCalledProcessError: Command '['g++', '/tmp/torchinductor_mcranmer/p4/cp42uf272g2qggmogzazkui7he4vnm4ftyfi2ghvyudtmaxxi25x.cpp', '-shared', '-fPIC', '-Wall', '-std=c++17', '-Wno-unused-variable', '-I/Users/mcranmer/venvs/main/lib/python3.10/site-packages/torch/include', '-I/Users/mcranmer/venvs/main/lib/python3.10/site-packages/torch/include/torch/csrc/api/include', '-I/Users/mcranmer/venvs/main/lib/python3.10/site-packages/torch/include/TH', '-I/Users/mcranmer/venvs/main/lib/python3.10/site-packages/torch/include/THC', '-I/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10', '-lgomp', '-march=native', '-O3', '-ffast-math', '-fno-finite-math-only', '-fopenmp', '-D', 'C10_USING_CUSTOM_GENERATED_MACROS', '-o/tmp/torchinductor_mcranmer/p4/cp42uf272g2qggmogzazkui7he4vnm4ftyfi2ghvyudtmaxxi25x.so']' returned non-zero exit status 1.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nCppCompileError                           Traceback (most recent call last)\r\nFile ~/venvs/main/lib/python3.10/site-packages/torch/_dynamo/output_graph.py:676, in OutputGraph.call_user_compiler(self, gm)\r\n    675 else:\r\n--> 676     compiled_fn = compiler_fn(gm, self.fake_example_inputs())\r\n    677 _step_logger()(logging.INFO, f\"done compiler function {name}\")\r\n\r\nFile ~/venvs/main/lib/python3.10/site-packages/torch/_dynamo/debug_utils.py:1032, in wrap_backend_debug.<locals>.debug_wrapper(gm, example_inputs, **kwargs)\r\n   1031 else:\r\n-> 1032     compiled_gm = compiler_fn(gm, example_inputs, **kwargs)\r\n   1034 return compiled_gm\r\n\r\nFile ~/venvs/main/lib/python3.10/site-packages/torch/__init__.py:1190, in _TorchCompileInductorWrapper.__call__(self, model_, inputs_)\r\n   1189 with self.cm:\r\n-> 1190     return self.compile_fn(model_, inputs_)\r\n\r\nFile ~/venvs/main/lib/python3.10/site-packages/torch/_inductor/compile_fx.py:398, in compile_fx(model_, example_inputs_, inner_compile)\r\n    393 with overrides.patch_functions():\r\n    394 \r\n    395     # TODO: can add logging before/after the call to create_aot_dispatcher_function\r\n    396     # in torch._functorch/aot_autograd.py::aot_module_simplified::aot_function_simplified::new_func\r\n    397     # once torchdynamo is merged into pytorch\r\n--> 398     return aot_autograd(\r\n    399         fw_compiler=fw_compiler,\r\n    400         bw_compiler=bw_compiler,\r\n    401         decompositions=select_decomp_table(),\r\n    402         partition_fn=functools.partial(\r\n    403             min_cut_rematerialization_partition, compiler=\"inductor\"\r\n    404         ),\r\n    405     )(model_, example_inputs_)\r\n\r\nFile ~/venvs/main/lib/python3.10/site-packages/torch/_dynamo/optimizations/training.py:78, in aot_autograd.<locals>.compiler_fn(gm, example_inputs)\r\n     77 with enable_aot_logging():\r\n---> 78     cg = aot_module_simplified(gm, example_inputs, **kwargs)\r\n     79     counters[\"aot_autograd\"][\"ok\"] += 1\r\n\r\nFile ~/venvs/main/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py:2355, in aot_module_simplified(mod, args, fw_compiler, bw_compiler, partition_fn, decompositions, hasher_type, static_argnums)\r\n   2353 full_args.extend(args)\r\n-> 2355 compiled_fn = create_aot_dispatcher_function(\r\n   2356     functional_call,\r\n   2357     full_args,\r\n   2358     aot_config,\r\n   2359 )\r\n   2361 # TODO: Th",
    "url": "https://github.com/pytorch/pytorch/issues/91537",
    "state": "closed",
    "labels": [
      "module: docs",
      "triaged",
      "oncall: pt2",
      "module: dynamo"
    ],
    "created_at": "2022-12-30T15:40:11Z",
    "updated_at": "2023-12-01T19:00:48Z",
    "user": "MilesCranmer"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 91498,
    "title": "how to Wrap normalization layers like LayerNorm in FP32 when use FSDP",
    "body": "in the blog https://pytorch.org/blog/scaling-vision-model-training-platforms-with-pytorch/\r\n\r\n<img width=\"904\" alt=\"image\" src=\"https://user-images.githubusercontent.com/16861194/209910992-619704cd-0ef4-42ec-9d5c-ec7b42005b8b.png\">\r\n\r\nhow to Wrap normalization layers like LayerNorm in FP32 when use FSDP, do we have a example code?\n\ncc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu",
    "url": "https://github.com/pytorch/pytorch/issues/91498",
    "state": "closed",
    "labels": [
      "oncall: distributed",
      "triaged",
      "module: fsdp"
    ],
    "created_at": "2022-12-29T06:13:34Z",
    "updated_at": "2023-08-04T17:17:32Z",
    "user": "xiaohu2015"
  },
  {
    "repo": "huggingface/setfit",
    "number": 251,
    "title": "Using setfit with the Hugging Face API",
    "body": "Hi, thank you so much for this amazing library!\r\n\r\nI have trained my model and pushed it to the Hugging Face hub.\r\n\r\nSince the output is a text-classification task, and the model card uploaded is for the sentence transformers, how should I use the model to run the classification model through the Hugging Face API?\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/setfit/issues/251",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-12-29T01:46:37Z",
    "updated_at": "2023-01-01T07:53:43Z",
    "user": "kwen1510"
  },
  {
    "repo": "huggingface/setfit",
    "number": 249,
    "title": "Sentence Pairs generation: is possible to parallelize it?",
    "body": "My dataset has 20k samples, 200 labels, and 32 iterations, so that means around 128 million samples, right?\r\nthere's some way to parallelize the pairs sentences creation?\r\nor at least to save these pairs to create one time and reuse multiple times (i.e. to train with different epochs)\r\n\r\nThanks",
    "url": "https://github.com/huggingface/setfit/issues/249",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-12-28T17:50:02Z",
    "updated_at": "2023-02-14T20:04:29Z",
    "user": "info2000"
  },
  {
    "repo": "huggingface/setfit",
    "number": 245,
    "title": "extracting embeddings from a trained SetFit model.",
    "body": "Hey First of All, Thank You For This Great Package!\r\n\r\nIMy task relates to semantic similarity, in which I find 'closeness' of a query sentence to a list of candidate sentences. Something like [shown here](https://www.sbert.net/docs/usage/semantic_textual_similarity.html)\r\nI wanted to know if there was a way to extract embeddings from a 'trained SetFit' model and then instead of utilizing the classification head just compute similarity of a given query sentences to the embeddings in SetFit.\r\n\r\nAwaiting your answer,\r\nThanks again ",
    "url": "https://github.com/huggingface/setfit/issues/245",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-12-26T12:27:50Z",
    "updated_at": "2023-12-06T13:21:04Z",
    "user": "moonisali"
  },
  {
    "repo": "huggingface/optimum",
    "number": 640,
    "title": "Improve documentations around ONNX export",
    "body": "### Feature request\n\n* Document `-with-past`, `--for-ort`, why use it\r\n* Add more details in `optimum-cli export onnx --help` directly\n\n### Motivation\n\n/\n\n### Your contribution\n\n/",
    "url": "https://github.com/huggingface/optimum/issues/640",
    "state": "closed",
    "labels": [
      "documentation",
      "onnx",
      "exporters"
    ],
    "created_at": "2022-12-23T15:54:32Z",
    "updated_at": "2023-01-03T16:34:56Z",
    "comments": 0,
    "user": "fxmarty"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5385,
    "title": "Is `fs=` deprecated in `load_from_disk()` as well?",
    "body": "### Describe the bug\n\nThe `fs=` argument was deprecated from `Dataset.save_to_disk` and `Dataset.load_from_disk` in favor of automagically figuring it out via fsspec:\r\nhttps://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L1339-L1340\r\n\r\nIs there a reason the same thing shouldn't also apply to `datasets.load.load_from_disk()` as well ?\r\n\r\nhttps://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/load.py#L1779\r\n\r\n\n\n### Steps to reproduce the bug\n\nn/a\n\n### Expected behavior\n\nn/a\n\n### Environment info\n\nn/a",
    "url": "https://github.com/huggingface/datasets/issues/5385",
    "state": "closed",
    "labels": [],
    "created_at": "2022-12-22T21:00:45Z",
    "updated_at": "2023-01-23T10:50:05Z",
    "comments": 3,
    "user": "dconathan"
  },
  {
    "repo": "pytorch/examples",
    "number": 1105,
    "title": "MNIST Hogwild on Apple Silicon",
    "body": "Any help would be appreciated! Unable to run multiprocessing with mps device\r\n\r\n## Context\r\n<!--- How has this issue affected you? What are you trying to accomplish? -->\r\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\r\n* Pytorch version: 2.0.0.dev20221220\r\n* Operating System and version: macOS 13.1\r\n\r\n## Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n* Installed using source? [yes/no]: no\r\n* Are you planning to deploy it using docker container? [yes/no]: no\r\n* Is it a CPU or GPU environment?: Trying to use GPU\r\n* Which example are you using: MNIST Hogwild\r\n* Link to code or data to repro [if any]: https://github.com/pytorch/examples/tree/main/mnist_hogwild\r\n\r\n## Expected Behavior\r\n<!--- If you're describing a bug, tell us what should happen -->\r\nAdding argument --mps should result in training with GPU\r\n\r\n## Current Behavior\r\n<!--- If describing a bug, tell us what happens instead of the expected behavior -->\r\nRuntimeerror: _share_filename_: only available on CPU\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Volumes/Main/pytorch/main.py\", line 87, in <module>\r\n    model.share_memory()  # gradients are allocated lazily, so they are not shared here\r\n  File \"/Users/jeffreythomas/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 2340, in share_memory\r\n    return self._apply(lambda t: t.share_memory_())\r\n  File \"/Users/jeffreythomas/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 784, in _apply\r\n    module._apply(fn)\r\n  File \"/Users/jeffreythomas/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 807, in _apply\r\n    param_applied = fn(param)\r\n  File \"/Users/jeffreythomas/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 2340, in <lambda>\r\n    return self._apply(lambda t: t.share_memory_())\r\n  File \"/Users/jeffreythomas/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/_tensor.py\", line 616, in share_memory_\r\n    self._typed_storage()._share_memory_()\r\n  File \"/Users/jeffreythomas/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/storage.py\", line 701, in _share_memory_\r\n    self._untyped_storage.share_memory_()\r\n  File \"/Users/jeffreythomas/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/storage.py\", line 209, in share_memory_\r\n    self._share_filename_cpu_()\r\nRuntimeError: _share_filename_: only available on CPU\r\n```\r\n\r\n## Possible Solution\r\n<!--- Not obligatory, but suggest a fix/reason for the bug -->\r\n\r\n## Steps to Reproduce\r\n<!--- Provide a link to a live example, or an unambiguous set of steps to -->\r\n<!--- reproduce this bug. Include code to reproduce, if relevant -->\r\n1. Clone repo\r\n2. Run with --mps on Apple M1 Ultra\r\n...\r\n\r",
    "url": "https://github.com/pytorch/examples/issues/1105",
    "state": "open",
    "labels": [
      "help wanted"
    ],
    "created_at": "2022-12-22T06:25:48Z",
    "updated_at": "2023-12-09T09:43:08Z",
    "comments": 4,
    "user": "jeffreykthomas"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1088,
    "title": "Add vmap support for PyTorch operators",
    "body": "We're looking for more motivated open-source developers to help build out functorch (and PyTorch, since functorch is now just a part of PyTorch). Below is a selection of good first issues.\r\n- [x] https://github.com/pytorch/pytorch/issues/91174\r\n- [x] https://github.com/pytorch/pytorch/issues/91175\r\n- [x] https://github.com/pytorch/pytorch/issues/91176\r\n- [x] https://github.com/pytorch/pytorch/issues/91177\r\n- [x] https://github.com/pytorch/pytorch/issues/91402\r\n- [x] https://github.com/pytorch/pytorch/issues/91403\r\n- [x] https://github.com/pytorch/pytorch/issues/91404\r\n- [x] https://github.com/pytorch/pytorch/issues/91415\r\n- [ ] https://github.com/pytorch/pytorch/issues/91700\r\n\r\nIn general there's a high barrier to developing PyTorch and/or functorch. We've collected topics and information over at the [PyTorch Developer Wiki](https://github.com/pytorch/pytorch/wiki/Core-Frontend-Onboarding)\r\n",
    "url": "https://github.com/pytorch/functorch/issues/1088",
    "state": "open",
    "labels": [
      "good first issue"
    ],
    "created_at": "2022-12-20T18:51:16Z",
    "updated_at": "2023-04-19T23:40:06Z",
    "comments": 2,
    "user": "zou3519"
  },
  {
    "repo": "huggingface/optimum",
    "number": 625,
    "title": "Add support for Speech Encoder Decoder models in `optimum.exporters.onnx`",
    "body": "### Feature request\r\n\r\nAdd support for [Speech Encoder Decoder Models](https://huggingface.co/docs/transformers/v4.25.1/en/model_doc/speech-encoder-decoder#speech-encoder-decoder-models)\r\n\r\n### Your contribution\r\n\r\nMe or other members can implement it (cc @mht-sharma @fxmarty )",
    "url": "https://github.com/huggingface/optimum/issues/625",
    "state": "open",
    "labels": [
      "feature-request",
      "onnx"
    ],
    "created_at": "2022-12-20T16:48:49Z",
    "updated_at": "2023-11-15T10:02:54Z",
    "comments": 4,
    "user": "michaelbenayoun"
  },
  {
    "repo": "huggingface/optimum",
    "number": 615,
    "title": "Shall we set diffusers as soft dependency for onnxruntime module?",
    "body": "It seems a little bit strange for me that we need to have diffusers for doing sequence classification.\r\n\r\n### System Info\r\n\r\n```shell\r\nDev branch of Optimum\r\n```\r\n\r\n### Who can help?\r\n\r\n@echarlaix @JingyaHuang \r\n\r\n### Reproduction\r\n\r\n```python\r\nfrom optimum.onnxruntime import ORTModelForSequenceClassification\r\n```\r\n\r\n### Error message\r\n\r\n```\r\nRuntimeError: Failed to import optimum.onnxruntime.modeling_ort because of the following error (look up to see its traceback):\r\nNo module named 'diffusers'\r\n```\r\n\r\n### Expected behavior\r\n\r\nBe able to do sequence classification without diffusers.\r\n\r\n### Contribution\r\n\r\nI can open a PR to make diffusers a soft dependency ",
    "url": "https://github.com/huggingface/optimum/issues/615",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-12-19T11:23:34Z",
    "updated_at": "2022-12-21T14:02:45Z",
    "comments": 1,
    "user": "JingyaHuang"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 287,
    "title": "How to convert live camera to landscape object detection with correct camera aspect ratio?",
    "body": "",
    "url": "https://github.com/pytorch/android-demo-app/issues/287",
    "state": "open",
    "labels": [],
    "created_at": "2022-12-19T10:01:47Z",
    "updated_at": "2022-12-19T10:05:06Z",
    "user": "pratheeshsuvarna"
  },
  {
    "repo": "pytorch/vision",
    "number": 7043,
    "title": "How to generate the score for a determined region of an image using Mask R-CNN",
    "body": "### \ud83d\udc1b Describe the bug\n\nI want to change the RegionProposalNetwork of Mask R-CNN to generate the score for a determined region of an image using Mask R-CNN.\r\n\r\n```\r\nimport torch\r\nfrom torch import nn\r\nimport torchvision.models as models\r\nimport torchvision\r\nfrom torchvision.models.detection import MaskRCNN\r\nfrom torchvision.models.detection.anchor_utils import AnchorGenerator\r\n\r\nmodel = models.detection.maskrcnn_resnet50_fpn(pretrained=True)\r\n\r\nclass rpn_help(nn.Module):\r\n    def __init__(self,) -> None:\r\n        super().__init__()\r\n    def forward(self,) :\r\n        proposals=torch.tensor([ 78.0753,  12.7310, 165.6465, 153.7253])\r\n        proposal_losses=0\r\n        return proposals, proposal_losses\r\n\r\nmodel.rpn= rpn_help\r\nmodel.eval()\r\nmodel(input_tensor) # input_tensor is an image\r\n```\r\n\r\nIt takes error like this\r\n<img width=\"786\" alt=\"WeChatbb686829d6c0f06106e53c1e3feecb55\" src=\"https://user-images.githubusercontent.com/98499594/208374946-137eb9b2-6a64-4a06-8d4e-57caf1bb72b3.png\">\r\n\r\nDoes anyone know how to generate the score for a determined region of an image using Mask R-CNN\r\n?\n\n### Versions\n\npython 3.8",
    "url": "https://github.com/pytorch/vision/issues/7043",
    "state": "open",
    "labels": [],
    "created_at": "2022-12-19T08:04:50Z",
    "updated_at": "2022-12-19T08:04:50Z",
    "user": "mingqiJ"
  },
  {
    "repo": "pytorch/serve",
    "number": 2039,
    "title": "how to load models at startup for docker",
    "body": "First, I created docker container by followed https://github.com/pytorch/serve/tree/master/docker#create-torchserve-docker-image, I leaves all configs default except remove `--rm` in `docker run ...` and make docker container start automatically by  \r\n```docker update --restart unless-stopped mytorchserve```\r\nThen, I registered some model via Management API.\r\nNow, how to make models automated registed when my PC reboot?\r\n",
    "url": "https://github.com/pytorch/serve/issues/2039",
    "state": "closed",
    "labels": [],
    "created_at": "2022-12-17T02:55:23Z",
    "updated_at": "2022-12-18T01:00:29Z",
    "user": "hungtooc"
  },
  {
    "repo": "huggingface/transformers",
    "number": 20794,
    "title": "When I use the following code on tpuvm and use model.generate() to infer, the speed is very slow. It seems that the tpu is not used. What is the problem?",
    "body": "### System Info\n\nWhen I use the following code on tpuvm and use model.generate() to infer, the speed is very slow. It seems that the tpu is not used. What is the problem?\r\njax device is exist\r\n```python\r\nimport jax\r\nnum_devices = jax.device_count()\r\ndevice_type = jax.devices()[0].device_kind\r\nassert \"TPU\" in device_type\r\n\r\nfrom transformers import AutoTokenizer, FlaxAutoModelForCausalLM\r\nmodel = FlaxMT5ForConditionalGeneration.from_pretrained(\"google/mt5-small\")\r\ntokenizer = T5Tokenizer.from_pretrained(\"google/mt5-small\")\r\ninput_context = \"The dog\"\r\n# encode input context\r\ninput_ids = tokenizer(input_context, return_tensors=\"np\").input_ids\r\n# generate candidates using sampling\r\noutputs = model.generate(input_ids=input_ids, max_length=20, top_k=30, do_sample=True)\r\nprint(outputs)\r\n```\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```python\r\nimport jax\r\nnum_devices = jax.device_count()\r\ndevice_type = jax.devices()[0].device_kind\r\nassert \"TPU\" in device_type\r\n\r\nfrom transformers import AutoTokenizer, FlaxAutoModelForCausalLM\r\nmodel = FlaxMT5ForConditionalGeneration.from_pretrained(\"google/mt5-small\")\r\ntokenizer = T5Tokenizer.from_pretrained(\"google/mt5-small\")\r\ninput_context = \"The dog\"\r\n# encode input context\r\ninput_ids = tokenizer(input_context, return_tensors=\"np\").input_ids\r\n# generate candidates using sampling\r\noutputs = model.generate(input_ids=input_ids, max_length=20, top_k=30, do_sample=True)\r\nprint(outputs)\r\n```\n\n### Expected behavior\n\nExpect it to be fast",
    "url": "https://github.com/huggingface/transformers/issues/20794",
    "state": "closed",
    "labels": [],
    "created_at": "2022-12-16T09:15:32Z",
    "updated_at": "2023-05-21T15:03:06Z",
    "user": "joytianya"
  },
  {
    "repo": "huggingface/optimum",
    "number": 595,
    "title": "Document and (possibly) improve the `use_past`, `use_past_in_inputs`, `use_present_in_outputs` API",
    "body": "### Feature request\n\nAs the title says. \r\n\r\nBasically, for `OnnxConfigWithPast` there are three attributes:\r\n\r\n- `use_past_in_inputs`: to specify that the exported model should have `past_key_values` as inputs\r\n- `use_present_in_outputs`: to specify that the exported model should have `past_key_values` as outputs\r\n- `use_past`, which is basically used for either of the previous attributes when those are left unspecified\r\n\r\nIt is not currently documented, and their current meaning might be unclear to the user.\r\nAlso, maybe it is possible to find a better way of handling those.\r\n\r\ncc @mht-sharma @fxmarty \n\n### Motivation\n\nThe current way is working, but might not be the best way of solving the problem, and might cause some misunderstanding for potential contributors.\n\n### Your contribution\n\nI can work on this.",
    "url": "https://github.com/huggingface/optimum/issues/595",
    "state": "closed",
    "labels": [
      "documentation",
      "Stale"
    ],
    "created_at": "2022-12-15T13:57:43Z",
    "updated_at": "2025-07-03T02:16:51Z",
    "comments": 2,
    "user": "michaelbenayoun"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5362,
    "title": "Run 'GPT-J' failure due to download dataset fail (' ConnectionError: Couldn't reach http://eaidata.bmk.sh/data/enron_emails.jsonl.zst ' ) ",
    "body": "### Describe the bug\n\nRun model \"GPT-J\" with dataset \"the_pile\" fail.\r\nThe fail out is as below:\r\n![image](https://user-images.githubusercontent.com/52023469/207750127-118d9896-35f4-4ee9-90d4-d0ab9aae9c74.png)\r\n\r\nLooks like which is due to \"http://eaidata.bmk.sh/data/enron_emails.jsonl.zst\" unreachable .\n\n### Steps to reproduce the bug\n\nSteps to reproduce this issue:\r\n\r\ngit clone https://github.com/huggingface/transformers\r\ncd transformers\r\npython examples/pytorch/language-modeling/run_clm.py --model_name_or_path EleutherAI/gpt-j-6B --dataset_name the_pile --dataset_config_name enron_emails --do_eval --output_dir /tmp/output --overwrite_output_dir\n\n### Expected behavior\n\nThis issue looks like due to \"http://eaidata.bmk.sh/data/enron_emails.jsonl.zst \" couldn't be reached.\r\nIs there another way to download the dataset \"the_pile\" ?\r\nIs there another way to cache the dataset \"the_pile\" but not let the hg to download it when runtime ?\n\n### Environment info\n\nhuggingface_hub version: 0.11.1\r\nPlatform: Linux-5.15.0-52-generic-x86_64-with-glibc2.35\r\nPython version: 3.9.12\r\nRunning in iPython ?: No\r\nRunning in notebook ?: No\r\nRunning in Google Colab ?: No\r\nToken path ?: /home/taosy/.huggingface/token\r\nHas saved token ?: False\r\nConfigured git credential helpers:\r\nFastAI: N/A\r\nTensorflow: N/A\r\nTorch: N/A\r\nJinja2: N/A\r\nGraphviz: N/A\r\nPydot: N/A",
    "url": "https://github.com/huggingface/datasets/issues/5362",
    "state": "closed",
    "labels": [],
    "created_at": "2022-12-15T01:23:03Z",
    "updated_at": "2022-12-15T07:45:54Z",
    "comments": 2,
    "user": "shaoyuta"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1547,
    "title": "\u2753 [Question] How can I load a TensorRT model generated with `trtexec`?",
    "body": "## \u2753 Question\r\n\r\nHow can I load into Pytorch a TensorRT model engine (.trt or .plan) generated with `trtexec` ?\r\n\r\nI have the following TensorRT model engine (generated from a ONNX file) using the `trtexec` tool provided by Nvidia\r\n\r\n```\r\ntrtexec --onnx=../2.\\ ONNX/CLIP-B32-image.onnx \\\r\n        --saveEngine=../4.\\ TensorRT/CLIP-B32-image.trt \\\r\n        --minShapes=input:1x3x224x224 \\\r\n        --optShapes=input:1x3x224x224 \\\r\n        --maxShapes=input:32x3x224x224 \\\r\n        --fp16\r\n```\r\n\r\nI want to load it into Pytorch for using the Pytorch's dataloader for fast batch ineference.\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1547",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-12-13T11:47:49Z",
    "updated_at": "2022-12-13T17:49:06Z",
    "user": "javiabellan"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5354,
    "title": "Consider using \"Sequence\" instead of \"List\"",
    "body": "### Feature request\r\n\r\nHi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.\r\n\r\n\r\n**How to reproduce**\r\n```py\r\nlist_of_filenames = [\"foo.parquet\", \"bar.parquet\"]\r\nds = Dataset.from_parquet(list_of_filenames)\r\n```\r\n\r\n**Expected mypy output:**\r\n```\r\nSuccess: no issues found\r\n```\r\n\r\n**Actual mypy output:**\r\n```py\r\ntest.py:19: error: Argument 1 to \"from_parquet\" of \"Dataset\" has incompatible type \"List[str]\"; expected \"Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]\"  [arg-type]\r\ntest.py:19: note: \"List\" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance\r\ntest.py:19: note: Consider using \"Sequence\" instead, which is covariant\r\n```\r\n\r\n**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1",
    "url": "https://github.com/huggingface/datasets/issues/5354",
    "state": "open",
    "labels": [
      "enhancement",
      "good first issue"
    ],
    "created_at": "2022-12-12T15:39:45Z",
    "updated_at": "2025-11-21T22:35:10Z",
    "comments": 13,
    "user": "tranhd95"
  },
  {
    "repo": "huggingface/transformers",
    "number": 20733,
    "title": "Verify that a test in `LayoutLMv3` 's tokenizer is checking what we want",
    "body": "I'm taking the liberty of opening an issue to share a question I've been keeping in the corner of my head, but now that I'll have less time to devote to `transformers` I prefer to share it before it's forgotten.\r\n\r\nIn the PR where the `LayoutLMv3` model was added, I was not very sure about the target value used for one of the tests that had to be overridden (the value was 1 in one of the previous commits and then changed to 0). The comment I am referring to is this one: https://github.com/huggingface/transformers/pull/17060#discussion_r872265358 .  \r\n\r\nMight be of interest to @ArthurZucker ",
    "url": "https://github.com/huggingface/transformers/issues/20733",
    "state": "closed",
    "labels": [],
    "created_at": "2022-12-12T15:17:36Z",
    "updated_at": "2023-05-26T10:14:14Z",
    "user": "SaulLu"
  },
  {
    "repo": "huggingface/setfit",
    "number": 227,
    "title": "Compare with other approaches",
    "body": "Dumb question:\r\n\r\nHow does setfit compare with other approaches for sentence classification in low data settings? Two that may be worth comparing to:\r\n\r\n- Various techniques for [augmented SBERT](https://www.sbert.net/examples/training/data_augmentation/README.html)\r\n- Simple Contrastive Learning [SimCSE](https://github.com/princeton-nlp/SimCSE)\r\n\r\n\r\nPros and cons of these approaches? Thoughts?",
    "url": "https://github.com/huggingface/setfit/issues/227",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-12-12T14:32:51Z",
    "updated_at": "2022-12-20T08:49:52Z",
    "user": "creatorrr"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5351,
    "title": "Do we need to implement `_prepare_split`?",
    "body": "### Describe the bug\n\nI'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py\", line 28, in <module>\r\n    dataset_builder.download_and_prepare()\r\n  File \"/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py\", line 704, in download_and_prepare\r\n    self._download_and_prepare(\r\n  File \"/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py\", line 793, in _download_and_prepare\r\n    self._prepare_split(split_generator, **prepare_split_kwargs)\r\n  File \"/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py\", line 1124, in _prepare_split\r\n    raise NotImplementedError()\r\nNotImplementedError\r\n```\n\n### Steps to reproduce the bug\n\nI will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.\r\n\r\n\r\n\n\n### Expected behavior\n\nI just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`\n\n### Environment info\n\n- `datasets` version: 2.4.0\r\n- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5\r\n- Python version: 3.8.12\r\n- PyArrow version: 7.0.0\r\n- Pandas version: 1.4.1\r\n",
    "url": "https://github.com/huggingface/datasets/issues/5351",
    "state": "closed",
    "labels": [],
    "created_at": "2022-12-12T01:38:54Z",
    "updated_at": "2022-12-20T18:20:57Z",
    "comments": 11,
    "user": "jmwoloso"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2151,
    "title": "Quantize weights to unisgned 8 bit",
    "body": "I am trying to quantize the weights of the BERT model to unsigned 8 bits. Am using the 'dynamic_quantize' function for the same.\r\n\r\n`quantized_model = torch.quantization.quantize_dynamic(\r\n    model, {torch.nn.Linear}, dtype=torch.quint8\r\n)`\r\n\r\nBut it throws the error 'AssertionError: The only supported dtypes for dynamic quantized linear are qint8 and float16 got: torch.quint8'.\r\n\r\nIs there any specific reason for this not to be supported? Could I use any other method to quantize the weights to unsigned int8 bits?\r\n\r\nHere is a link to the colab sheet:\r\nhttps://colab.research.google.com/drive/14G_jdLuZD5846jUDZUdGNf1x0DMz8GKK?usp=sharing\r\n\r\nThanks!\n\ncc @jerryzh168 @z-a-f @vkuzo",
    "url": "https://github.com/pytorch/tutorials/issues/2151",
    "state": "closed",
    "labels": [
      "question",
      "arch-optimization"
    ],
    "created_at": "2022-12-10T08:59:07Z",
    "updated_at": "2023-02-23T19:53:08Z",
    "user": "rohanjuneja"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5343,
    "title": "T5 for Q&A produces truncated sentence",
    "body": "Dear all, I am fine-tuning T5 for Q&A task using the MedQuAD ([GitHub - abachaa/MedQuAD: Medical Question Answering Dataset of 47,457 QA pairs created from 12 NIH websites](https://github.com/abachaa/MedQuAD)) dataset. In the dataset, there are many long answers with thousands of words. I have used pytorch_lightning to train the T5-large model. I have two questions.\r\n\r\nFor example, I set both the max_length, max_input_length, max_output_length to 128.\r\n\r\nHow to deal with those long answers? I just left them as is and the T5Tokenizer can automatically handle. I would assume the tokenizer just truncates an answer at the position of 128th word (or 127th). Is it possible that I manually split an answer into different parts, each part has 128 words; and then all these sub-answers serve as a separate answer to the same question?\r\n\r\nAnother question is that I get incomplete (truncated) answers when using the fine-tuned model in inference, even though the predicted answer is shorter than 128 words. I found a message posted 2 years ago saying that one should add at the end of texts when fine-tuning T5. I followed that but then got a warning message that duplicated were found. I am assuming that this is because the tokenizer truncates an answer text, thus is missing in the truncated answer, such that the end token is not produced in predicted answer. However, I am not sure. Can anybody point out how to address this issue?\r\n\r\nAny suggestions are highly appreciated.\r\n\r\nBelow is some code snippet.\r\n\r\n`\r\nimport pytorch_lightning as pl\r\nfrom torch.utils.data import DataLoader\r\nimport torch\r\nimport numpy as np\r\nimport time\r\nfrom pathlib import Path\r\n\r\nfrom transformers import (\r\n    Adafactor,\r\n    T5ForConditionalGeneration,\r\n    T5Tokenizer,\r\n    get_linear_schedule_with_warmup\r\n)\r\nfrom torch.utils.data import RandomSampler\r\nfrom question_answering.utils import *\r\n\r\n\r\nclass T5FineTuner(pl.LightningModule):\r\n    def __init__(self, hyparams):\r\n        super(T5FineTuner, self).__init__()\r\n        self.hyparams = hyparams\r\n        self.model = T5ForConditionalGeneration.from_pretrained(hyparams.model_name_or_path)\r\n        self.tokenizer = T5Tokenizer.from_pretrained(hyparams.tokenizer_name_or_path)\r\n\r\n        if self.hyparams.freeze_embeds:\r\n            self.freeze_embeds()\r\n        if self.hyparams.freeze_encoder:\r\n            self.freeze_params(self.model.get_encoder())\r\n            # assert_all_frozen()\r\n\r\n        self.step_count = 0\r\n        self.output_dir = Path(self.hyparams.output_dir)\r\n\r\n        n_observations_per_split = {\r\n            'train': self.hyparams.n_train,\r\n            'validation': self.hyparams.n_val,\r\n            'test': self.hyparams.n_test\r\n        }\r\n        self.n_obs = {k: v if v >= 0 else None for k, v in n_observations_per_split.items()}\r\n        self.em_score_list = []\r\n        self.subset_score_list = []\r\n\r\n        data_folder = r'C:\\Datasets\\MedQuAD-master'\r\n        self.train_data, self.val_data, self.test_data = load_medqa_data(data_folder)\r\n\r\n    def freeze_params(self, model):\r\n        for param in model.parameters():\r\n            param.requires_grad = False\r\n\r\n    def freeze_embeds(self):\r\n        try:\r\n            self.freeze_params(self.model.model.shared)\r\n            for d in [self.model.model.encoder, self.model.model.decoder]:\r\n                self.freeze_params(d.embed_positions)\r\n                self.freeze_params(d.embed_tokens)\r\n        except AttributeError:\r\n            self.freeze_params(self.model.shared)\r\n            for d in [self.model.encoder, self.model.decoder]:\r\n                self.freeze_params(d.embed_tokens)\r\n\r\n    def lmap(self, f, x):\r\n        return list(map(f, x))\r\n\r\n    def is_logger(self):\r\n        return self.trainer.proc_rank <= 0\r\n\r\n    def forward(self, input_ids, attention_mask=None, decoder_input_ids=None, decoder_attention_mask=None, labels=None):\r\n        return self.model(\r\n            input_ids,\r\n            attention_mask=attention_mask,\r\n            decoder_input_ids=decoder_input_ids,\r\n            decoder_attention_mask=decoder_attention_mask,\r\n            labels=labels\r\n        )\r\n\r\n    def _step(self, batch):\r\n        labels = batch['target_ids']\r\n        labels[labels[:, :] == self.tokenizer.pad_token_id] = -100\r\n\r\n        outputs = self(\r\n            input_ids = batch['source_ids'],\r\n            attention_mask=batch['source_mask'],\r\n            labels=labels,\r\n            decoder_attention_mask=batch['target_mask']\r\n        )\r\n\r\n        loss = outputs[0]\r\n\r\n        return loss\r\n\r\n    def ids_to_clean_text(self, generated_ids):\r\n        gen_text = self.tokenizer.batch_decode(generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=True)\r\n        return self.lmap(str.strip, gen_text)\r\n\r\n    def _generative_step(self, batch):\r\n        t0 = time.time()\r\n\r\n        generated_ids = self.model.generate(\r\n            batch[\"source_ids\"],\r\n            attention_mask=batch[\"source_mask\"],\r\n            use_cache=True,\r\n            decode",
    "url": "https://github.com/huggingface/datasets/issues/5343",
    "state": "closed",
    "labels": [],
    "created_at": "2022-12-08T19:48:46Z",
    "updated_at": "2022-12-08T19:57:17Z",
    "comments": 0,
    "user": "junyongyou"
  },
  {
    "repo": "huggingface/optimum",
    "number": 566,
    "title": "Add optimization and quantization options to `optimum.exporters.onnx`",
    "body": "### Feature request\n\nWould be nice to have two more arguments in `optimum.exporters.onnx` in order to have the optimized and quantized version of the exported models along side with the \"normal\" ones. I can imagine something like:\r\n```\r\npython -m optimum.exporters.onnx --model <model-name> -OX -quantized-arch <arch> output\r\n```\r\nWhere:\r\n* `-OX` corresponds to the already available `O1`, `O2`, `O3` and `O4` optimization possibilities.\r\n* `-quantized-arch` can take values such as `arm64`, `avx2`, `avx512`, `avx512_vnni` and `tensorrt`\r\n\n\n### Motivation\n\nThis will allow to very easily create optimized/quantized version of the models we need.\n\n### Your contribution\n\nI might help on submiting a PR for it, but I'm not able to give a \"when\" for now.",
    "url": "https://github.com/huggingface/optimum/issues/566",
    "state": "closed",
    "labels": [],
    "created_at": "2022-12-08T18:49:04Z",
    "updated_at": "2023-04-11T12:26:54Z",
    "comments": 17,
    "user": "jplu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 93472,
    "title": "torch.compile does not bring better performance and even lower than no compile, what is the possible reason?",
    "body": "### \ud83d\udc1b Describe the bug\n\n_No response_\n\n### Error logs\n\n_No response_\n\n### Minified repro\n\n_No response_\n\ncc @ezyang @soumith @msaroufim @wconstab @ngimel @bdhirsh",
    "url": "https://github.com/pytorch/pytorch/issues/93472",
    "state": "closed",
    "labels": [
      "oncall: pt2"
    ],
    "created_at": "2022-12-07T17:00:43Z",
    "updated_at": "2023-02-01T17:47:28Z",
    "user": "chexiangying"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1535,
    "title": "[Bug] Invoke error while implementing TensorRT on pytorch",
    "body": "## \u2753 Question\r\n\r\nGot the error while using tensorrt on pytorch pretrained resnet model. what is this error and how to solve it.\r\n\r\n## Error\r\nTraceback (most recent call last):\r\n  File \"pretrained_resnet.py\", line 116, in <module>\r\n    trt_model_32 = torch_tensorrt.compile(traced, inputs=[torch_tensorrt.Input(\r\n  File \"/home/am/anaconda3/envs/amrith/lib/python3.8/site-packages/torch_tensorrt/_compile.py\", line 125, in compile\r\n    return torch_tensorrt.ts.compile(\r\n  File \"/home/am/anaconda3/envs/amrith/lib/python3.8/site-packages/torch_tensorrt/ts/_compiler.py\", line 136, in compile\r\n    compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))\r\nTypeError: compile_graph(): incompatible function arguments. The following argument types are supported:\r\n    1. (arg0: torch::jit::Module, arg1: torch_tensorrt._C.ts.CompileSpec) -> torch::jit::Module\r\n\r\nInvoked with: <torch.ScriptModule object at 0x7fb5cc5c78f0>, <torch_tensorrt._C.ts.CompileSpec object at 0x7fb5cc47d8b0>\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1535",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2022-12-07T07:46:02Z",
    "updated_at": "2023-04-01T00:02:09Z",
    "user": "amrithpartha"
  },
  {
    "repo": "huggingface/transformers",
    "number": 20638,
    "title": "ValueError: Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' 'truncation=True' to have batched tensors with the same length. Perhaps your features (`labels` in this case) have excessive nesting (inputs type `list` where type `int` is expected).",
    "body": "### System Info\r\n\r\n- `transformers` version: 4.25.1\r\n- Platform: Linux-5.10.133+-x86_64-with-glibc2.27\r\n- Python version: 3.8.15\r\n- Huggingface_hub version: 0.11.1\r\n- PyTorch version (GPU?): 1.12.1+cu113 (True)\r\n- Tensorflow version (GPU?): 2.9.2 (True)\r\n- Flax version (CPU?/GPU?/TPU?): not installed (NA)\r\n- Jax version: not installed\r\n- JaxLib version: not installed\r\n- Using GPU in script?: yes (Tesla T4)\r\n- Using distributed or parallel set-up in script?: no\r\n\r\n### Who can help?\r\n\r\n@sgugger maybe you could help?\r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [X] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\n\r\n# Information\r\nI am using the implementation of text classification given in official [documentation ](https://huggingface.co/docs/transformers/tasks/sequence_classification)from huggingface and one given by @lewtun in his book. \r\nI retrained an instance of sentence-transformers using contrastive loss on an unsupervised data dump and now want to finetune the above model on a labeled, binary dataset. \r\n[This ](https://github.com/huggingface/transformers/issues/15505)issue is similar, and I followed the fix but to no help.\r\n\r\n# To reproduce\r\n\r\n1. Run [this notebook](https://colab.research.google.com/drive/1VMl5l1O4lrgSMiGTh4yKIWEY2XGUgSIm?usp=sharing)\r\n2. Trainer.train() should produce the following error:\r\n\r\n```\r\nValueError                                Traceback (most recent call last)\r\n[/usr/local/lib/python3.8/dist-packages/transformers/tokenization_utils_base.py](https://localhost:8080/#) in convert_to_tensors(self, tensor_type, prepend_batch_axis)\r\n    716                 if not is_tensor(value):\r\n--> 717                     tensor = as_tensor(value)\r\n    718 \r\n\r\nValueError: too many dimensions 'str'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nValueError                                Traceback (most recent call last)\r\n9 frames\r\n[<ipython-input-75-ce45916ac715>](https://localhost:8080/#) in <module>\r\n      7 )\r\n      8 \r\n----> 9 trainer.train()\r\n\r\n[/usr/local/lib/python3.8/dist-packages/transformers/trainer.py](https://localhost:8080/#) in train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs)\r\n   1525             self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size\r\n   1526         )\r\n-> 1527         return inner_training_loop(\r\n   1528             args=args,\r\n   1529             resume_from_checkpoint=resume_from_checkpoint,\r\n\r\n[/usr/local/lib/python3.8/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval)\r\n   1747 \r\n   1748             step = -1\r\n-> 1749             for step, inputs in enumerate(epoch_iterator):\r\n   1750 \r\n   1751                 # Skip past any already trained steps if resuming training\r\n\r\n[/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py](https://localhost:8080/#) in __next__(self)\r\n    679                 # TODO(https://github.com/pytorch/pytorch/issues/76750)\r\n    680                 self._reset()  # type: ignore[call-arg]\r\n--> 681             data = self._next_data()\r\n    682             self._num_yielded += 1\r\n    683             if self._dataset_kind == _DatasetKind.Iterable and \\\r\n\r\n[/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py](https://localhost:8080/#) in _next_data(self)\r\n    719     def _next_data(self):\r\n    720         index = self._next_index()  # may raise StopIteration\r\n--> 721         data = self._dataset_fetcher.fetch(index)  # may raise StopIteration\r\n    722         if self._pin_memory:\r\n    723             data = _utils.pin_memory.pin_memory(data, self._pin_memory_device)\r\n\r\n[/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/fetch.py](https://localhost:8080/#) in fetch(self, possibly_batched_index)\r\n     50         else:\r\n     51             data = self.dataset[possibly_batched_index]\r\n---> 52         return self.collate_fn(data)\r\n\r\n[/usr/local/lib/python3.8/dist-packages/transformers/data/data_collator.py](https://localhost:8080/#) in __call__(self, features)\r\n    247 \r\n    248     def __call__(self, features: List[Dict[str, Any]]) -> Dict[str, Any]:\r\n--> 249         batch = self.tokenizer.pad(\r\n    250             features,\r\n    251             padding=self.padding,\r\n\r\n[/usr/local/lib/python3.8/dist-packages/transformers/tokenization_utils_base.py](https://localhost:8080/#) in pad(self, encoded_inputs, padding, max_length, pad_to_multiple_of, return_attention_mask, return_tensors, verbose)\r\n   3015                 batch_outputs[key].append(value)\r\n   3016 \r\n-> 3017         return BatchEncoding(batch_outputs, tensor_type=return_tensors)\r\n   3018 \r\n   3019     def create_token_type_ids_from_sequences(\r\n\r\n[/usr/local/lib/python3.8/dist-packages/transf",
    "url": "https://github.com/huggingface/transformers/issues/20638",
    "state": "closed",
    "labels": [],
    "created_at": "2022-12-07T02:10:35Z",
    "updated_at": "2023-01-31T21:23:46Z",
    "user": "vitthal-bhandari"
  },
  {
    "repo": "huggingface/setfit",
    "number": 222,
    "title": "Pre-training a generic SentenceTransformer for domain adaptation",
    "body": "When using `SetFit` for classification in a more technical domain, I could imagine the generically-trained `SBERT` models may produce poor sentence embeddings if the domain is not represented well enough in the diverse training corpus. In this case, would it be advantageous to first apply domain adaptation techniques (as discussed [here](https://sbert.net/examples/domain_adaptation/README.html)) to an `SBERT` model before using the model as a base in `SetFit`? Have you considered and/or tested such an approach?\r\n\r\nThanks for the help!",
    "url": "https://github.com/huggingface/setfit/issues/222",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-12-05T15:22:57Z",
    "updated_at": "2023-04-30T06:45:47Z",
    "user": "zachschillaci27"
  },
  {
    "repo": "huggingface/setfit",
    "number": 219,
    "title": "efficient way of saving finetuned zero-shot models?",
    "body": "Hi guys, pretty interesting project.\r\n\r\nI was wondering if there is any way to save models after a zero-shot model is finetuned for few-shot model.\r\n\r\nSo for example, if I finetuned a couple of say, `sentence-transformers/paraphrase-mpnet-base-v2` models, the major difference between them is just the weights of final few layers, weights for the rest of the model mostly remains the same, so is there a way to  efficiently save the necessary final few layers thus reducing the size of models, repetedly being saved.\r\n\r\nThis way one could save, the disk space by a lot.\r\n\r\nAnd apart form that, while inferencing, I don't have to load multiple huge models and instead I could have just one model containg the common freezed layers that give me some common features and just has to host the final few layers with custom classes that intakes those common features.",
    "url": "https://github.com/huggingface/setfit/issues/219",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-12-05T07:36:40Z",
    "updated_at": "2022-12-20T08:49:32Z",
    "user": "RaiAmanRai"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1521,
    "title": "\u2753 [Question] How does INT8 inference really work at runtime?",
    "body": "## \u2753 Question\n\nHi everyone,\n\nI can\u2019t really find an example of how int8 inference works at runtime. What I know is that, given that we are performing uniform symmetric quantisation, we calibrate the model, i.e. we find the best scale parameters for each weight tensor (channel-wise) and *activations* (that correspondto the outputs of the activation functions, if I understood correctly). After the calibration process we can quantize the model by applying these scale parameters and clipping che values that end up outside the dynamic range of the given layer. So at this point we have a new Neural Net where all the weights are int8 in the range [-127,127] and, additionally, we have some scale parameters for the *activations*.\nWhat I don\u2019t understand is how we perform inference on this new neural network, do we feed the input as float32 or directly as int8? All the computations are always in int8 or sometimes we cast from int8 to float32 and viceversa? \nIt would be nice to find a real example of e.g. a CONV2D+BIAS+ReLU layer.",
    "url": "https://github.com/pytorch/TensorRT/issues/1521",
    "state": "closed",
    "labels": [
      "question",
      "component: quantization"
    ],
    "created_at": "2022-12-04T16:32:57Z",
    "updated_at": "2023-02-02T23:54:00Z",
    "user": "andreabonvini"
  },
  {
    "repo": "pytorch/data",
    "number": 911,
    "title": "`DistributedReadingService` supports multi-processing reading",
    "body": "### \ud83d\ude80 The feature\n\n`TorchData` is a great work for better data loading! I have tried it and it gives me a nice workflow with tidy code-style.\u2764\ufe0f\r\n\r\nWhen using DDP, I work with the `DataLoader2` where `reading_service=DistributedReadingService()`. I find this service runs one worker for outputting datas per node. This means it has lower reading throughput than the legacy `DataLoader`, which utilizes multiple workers with the total worker number = `num_workers * world_size`.\r\n\r\nTherefore, is it possible to combine `DistributedReadingService` with multi-processing reading? This could be possibly done by introducing `PrototypeMultiProcessingReadingService` into  `DistributedReadingService` (Just guessing. I'm not a pro for handling this.).\r\n\r\n\n\n### Motivation, pitch\n\nI think this feature could be a part of #427 . The detailed motivation is declared above.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/911",
    "state": "closed",
    "labels": [],
    "created_at": "2022-12-04T03:49:49Z",
    "updated_at": "2023-02-07T06:25:35Z",
    "comments": 9,
    "user": "xiaosu-zhu"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1074,
    "title": "vmap equivalent for tensor[indices]",
    "body": "Hi,\r\n\r\nIs there a way of vmapping over the selection of passing indices within a Tensor? Minimal reproducible example below,\r\n```\r\nimport torch\r\nfrom functorch import vmap\r\n\r\ndef select(x, index):\r\n  print(x.shape, index.shape)\r\n  return x[index]\r\n\r\nx = torch.randn(64, 1000) #64 vectors of length 1000\r\nindex=torch.arange(64)   #index for each vector\r\n\r\nout = vmap(select, in_dims=(0, 0))(x, index) #vmap over the process\r\nprint(out) #should output vector of 64 \r\n```\r\nThis should take in a batches of vectors and select the corresponding index from `index` vector (which can be viewed as a batch of scalars, and is hence represented as a vector).\r\n\r\nThe error is as follows,\r\n```\r\nRuntimeError: vmap: It looks like you're calling .item() on a Tensor. We don't support vmap over calling .item() on a Tensor, please try to rewrite what you're doing with other operations. If error is occurring somewhere inside PyTorch internals, please file a bug report.\r\n```\r\nI tried using `torch.select` but that requires passing the index as an `int` rather than `Tensor` so it must call `.item()` interally. Is there a workaround that already exists for this? \r\n",
    "url": "https://github.com/pytorch/functorch/issues/1074",
    "state": "closed",
    "labels": [],
    "created_at": "2022-12-03T19:20:18Z",
    "updated_at": "2022-12-03T19:31:37Z",
    "comments": 1,
    "user": "AlphaBetaGamma96"
  },
  {
    "repo": "pytorch/examples",
    "number": 1101,
    "title": "Inconsistency b/w tutorial and the code",
    "body": "## \ud83d\udcda Documentation\r\n\r\nIn the [DDP Tutorial](https://pytorch.org/tutorials/beginner/ddp_series_multigpu.html), there is inconsistency between the code in the tutorial and [original code](https://github.com/pytorch/examples/blob/main/distributed/ddp-tutorial-series/multigpu.py).\r\n\r\nFor example, under Running the distributed training job section,\r\nthe Trainer object should take train_data as an argument not dataset (in the original code, it is right).\r\n\r\nThe ideal PR to fix this issue is to make the tutorial consistent with the original code.",
    "url": "https://github.com/pytorch/examples/issues/1101",
    "state": "closed",
    "labels": [
      "help wanted",
      "distributed"
    ],
    "created_at": "2022-12-03T17:15:42Z",
    "updated_at": "2023-02-17T18:47:56Z",
    "comments": 4,
    "user": "BalajiAI"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 280,
    "title": "StreamingASR. How to use custom RNNT model?",
    "body": "Hey guys\r\nI have a my self trained RNNT model with another smp_bpe model.\r\nHow I can convert my smp_bpe.model to smp_bpe.dict for fairseq.data.Dictionary.load method?",
    "url": "https://github.com/pytorch/android-demo-app/issues/280",
    "state": "closed",
    "labels": [],
    "created_at": "2022-12-02T12:18:50Z",
    "updated_at": "2022-12-02T14:44:48Z",
    "user": "make1986"
  },
  {
    "repo": "pytorch/serve",
    "number": 2019,
    "title": "Diagnosing very slow performance",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI'm trying to work out why my endpoint throughput is very slow. I wasn't sure if this is the best forum but there doesn't appear to be a specific torchserve forum on https://discuss.pytorch.org/\r\n\r\nI have simple text classifier, I've created a custom handler as the default wasn't suitable. I tested the handler by creating a harness based on https://github.com/frank-dong-ms/torchserve-performance/blob/main/test_models_windows.py - I also added custom timer metrics into my `preprocess`/`inference`/`postprocess`\r\n\r\nThe result is that most of the `handle` time is spent in `inference`, and my model performs as expected. It processes a batch of 1 text in about 40ms and a batch of 128 in 80ms - so clearly, to get good throughput, I need larger batches.\r\n\r\nThe throughput of a basic script, passing batches of 128 to the model is about 2000 examples per second. But `torchserve` only achieves 30-60 examples per second.\r\n\r\nI'm fairly sure the bottleneck is not in the handler, the model log seems to imply it's not receiving the request quick enough. I would hope that it could generate a batch of 128 in for maxBatchDelay=50 whilst the model is processing the previous batch, but in fact it only manages a handful. I've attached my model log below\r\n\r\nMy first question is what does the message `Backend received inference at: 1669930796` means - specifically is the number a timestamp and if so why is the same value repeated many times given that the size of the batches being passed to the handler is well below the batch size of 128 set in the model config\r\n\r\nSecond how do I stream data faster to the endpoint? Our use case is to make many requests in succession. I've tried client batching, and that does increase throughput slightly but it's still extremely slow.\r\n\r\nMy test code is based on an [example](https://github.com/pytorch/serve/blob/master/examples/image_classifier/near_real_time_video/request.py), and I've also tried curl with the -P option and the time command. Throughput is orders of magnitude slower than a simple script running inference in a loop.\r\n\r\n```\r\n  import requests\r\n  from requests_futures.sessions import FuturesSession\r\n  from concurrent.futures import as_completed\r\n  import json\r\n  import time\r\n  \r\n  api = \"http://localhost:8080/predictions/text_classifier\"\r\n  headers = {\"Content-type\": \"application/json\", \"Accept\": \"text/plain\"}\r\n  \r\n  session = FuturesSession()\r\n\r\n    start_time = time.time()\r\n    futures = []\r\n    for text in texts:\r\n        response = session.post(api, data=text)\r\n        futures.append(response)\r\n\r\n    for response in as_completed(futures):\r\n        response = response.result().content.decode(\"utf-8\")\r\n\r\n    total_time = int((time.time() - start_time)*1e3)\r\n\r\n    print(\"total time in ms:\", total_time)\r\n    throughput = len(texts) / total_time *1e3\r\n    print(\"throughput:\", throughput)\r\n```\r\n\r\nI'm going to look at gRPC as that is probably a better match for our use case (I think), but I feel I'm doing something wrong, or there's an issue somewhere. In particular, the number of requests per second that the front end is receiving/handling appears to be way lower than I expected - the payload per request is a string of < 128 characters. \r\n\r\n### Error logs\r\n\r\nmodel_log.log looks like\r\n\r\n```\r\n2022-12-02T08:39:55,921 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Backend received inference at: 1669930795\r\n2022-12-02T08:39:55,925 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Received batch of 8 text\r\n2022-12-02T08:39:56,015 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Backend received inference at: 1669930796\r\n2022-12-02T08:39:56,016 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Received batch of 4 text\r\n2022-12-02T08:39:56,079 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Backend received inference at: 1669930796\r\n2022-12-02T08:39:56,084 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Received batch of 5 text\r\n2022-12-02T08:39:56,147 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Backend received inference at: 1669930796\r\n2022-12-02T08:39:56,149 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Received batch of 7 text\r\n2022-12-02T08:39:56,214 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Backend received inference at: 1669930796\r\n2022-12-02T08:39:56,215 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Received batch of 3 text\r\n2022-12-02T08:39:56,279 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Backend received inference at: 1669930796\r\n2022-12-02T08:39:56,281 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Received batch of 6 text\r\n2022-12-02T08:39:56,345 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Backend received inference at: 1669930796\r\n2022-12-02T08:39:56,346 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Received batch of 5 text\r\n2022-12-02T08:39:56,407 [INFO ] W-9000-text_classifier_1.0.0-stdout MODEL_LOG - Backend received infe",
    "url": "https://github.com/pytorch/serve/issues/2019",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-12-01T21:59:57Z",
    "updated_at": "2022-12-02T22:15:06Z",
    "user": "david-waterworth"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5326,
    "title": "No documentation for main branch is built",
    "body": "Since:\r\n- #5250\r\n  - Commit: 703b84311f4ead83c7f79639f2dfa739295f0be6\r\n\r\nthe docs for main branch are no longer built.\r\n\r\nThe change introduced only triggers the docs building for releases.",
    "url": "https://github.com/huggingface/datasets/issues/5326",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-12-01T16:50:58Z",
    "updated_at": "2022-12-02T16:26:01Z",
    "comments": 0,
    "user": "albertvillanova"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5325,
    "title": "map(...batch_size=None) for IterableDataset",
    "body": "### Feature request\n\nDataset.map(...) allows batch_size to be None. It would be nice if IterableDataset did too.\n\n### Motivation\n\nAlthough it may seem a bit of a spurious request given that `IterableDataset` is meant for larger than memory datasets, but there are a couple of reasons why this might be nice.\r\n\r\nOne is that load_dataset(...) can return either IterableDataset or Dataset. mypy will then complain if batch_size=None even if we know it is Dataset. Of course we can do:\r\n\r\n    assert isinstance(d, datasets.DatasetDict)\r\n\r\nBut it is a mild inconvenience. What's more annoying is that whenever we use something like e.g. `combine_datasets(...)`, we end up with the union again, and so have to do the assert again.\r\n\r\nAnother is that we could actually end up with an IterableDataset small enough for memory in normal/correct usage, e.g. by filtering a massive IterableDataset.\r\n\r\nFor practical usages, an alternative to this would be to convert from an iterable dataset to a map-style dataset, but it is not obvious how to do this.\n\n### Your contribution\n\nNot this time.",
    "url": "https://github.com/huggingface/datasets/issues/5325",
    "state": "closed",
    "labels": [
      "enhancement",
      "good first issue"
    ],
    "created_at": "2022-12-01T15:43:42Z",
    "updated_at": "2022-12-07T15:54:43Z",
    "comments": 5,
    "user": "frankier"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5324,
    "title": "Fix docstrings and types in documentation that appears on the website",
    "body": "While I was working on https://github.com/huggingface/datasets/pull/5313 I've noticed that we have a mess in how we annotate types and format args and return values in the code. And some of it is displayed in the [Reference section](https://huggingface.co/docs/datasets/package_reference/builder_classes) of the documentation on the website.\r\n \r\nWould be nice someday, maybe before releasing datasets 3.0.0, to unify it......",
    "url": "https://github.com/huggingface/datasets/issues/5324",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-12-01T15:34:53Z",
    "updated_at": "2024-01-23T16:21:54Z",
    "comments": 5,
    "user": "polinaeterna"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1509,
    "title": "\u2753 [Question] What does `is_aten` argument do in torch_tensorrt.fx.compile() ?",
    "body": "## \u2753 Question\r\n\r\nThe docstring for `is_aten` argument in torch_tensorrt.fx.compile() is missing and hence the users don't know what it does.",
    "url": "https://github.com/pytorch/TensorRT/issues/1509",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-12-01T14:38:12Z",
    "updated_at": "2022-12-02T12:50:56Z",
    "user": "1559588143"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1508,
    "title": "\u2753 [Question] How to save and load compiled model from torch-tensorrt",
    "body": "I am working on a Jetson Xavier NX16 and using torch-tensorrt.compile(model, \"default\", input, enable_optimization) every time I restart my program seems like it is just doing the same tedious task over and over.\r\nIs there not a way for torch-tensorrt to load the serialized engine created by  torch_tensorrt.convert_method_to_trt_engine or is it only on the CXX backend API?\r\nHow would I go about saving and loading a compiled model?\r\n\r\nOkay, so I used print(dir(comp_model)) and saw that the model had a save function. I tried using it and figured out after a friendly pop up, that I should load it with torch.jit.load and it works.\r\nIs this an okay solution or are there some kind of insecurities with it?",
    "url": "https://github.com/pytorch/TensorRT/issues/1508",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-12-01T11:20:08Z",
    "updated_at": "2022-12-16T07:46:59Z",
    "user": "MartinPedersenpp"
  },
  {
    "repo": "pytorch/serve",
    "number": 2016,
    "title": "Missing mandatory parameter --model-store",
    "body": "### \ud83d\udcda The doc issue\r\n\r\nI created a config.properties file\r\n\r\n```\r\nmodel_store=\"model_store\"\r\nload_models=all\r\nmodels = {\\\r\n    \"tc\": {\\\r\n      \"1.0.0\": {\\\r\n        \"defaultVersion\": true,\\\r\n        \"marName\": \"text_classifier.mar\",\\\r\n        \"minWorkers\": 1,\\\r\n        \"maxWorkers\": 4,\\\r\n        \"batchSize\": 1,\\\r\n        \"maxBatchDelay\": 100,\\\r\n        \"responseTimeout\": 120\\\r\n      }\\\r\n    }\\\r\n  }\r\n```\r\n\r\nThe [documentation](https://github.com/pytorch/serve/blob/master/docs/configuration.md#command-line-parameters) for `torchserve` states:\r\n\r\n```\r\nCustomize TorchServe behaviour by using the following command line arguments when you call torchserve:\r\n\r\n--model-store Overrides the model_store property in config.properties file\r\n--models Overrides the load_models property in config.properties\r\n```\r\n\r\nThis wording implies to me that --model-store is optional, but running `torchserve --start` (from a folder containing config.properties) results in the error `Missing mandatory parameter --model-store`\r\n\r\nIt seems to me there should only be an error if the model-store location cannot be inferred at all, i.e. it's not passed via  `--model-store`  or defined in config.properties (it's not clear how `--model-store` can 'override' the value in config.properties if it's mandatory)\r\n\r\n\r\n\r\n\r\n### Suggest a potential alternative/fix\r\n\r\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/2016",
    "state": "open",
    "labels": [
      "documentation",
      "question"
    ],
    "created_at": "2022-12-01T01:09:00Z",
    "updated_at": "2022-12-02T01:42:05Z",
    "user": "david-waterworth"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5317,
    "title": "`ImageFolder` performs poorly with large datasets",
    "body": "### Describe the bug\n\nWhile testing image dataset creation, I'm seeing significant performance bottlenecks with imagefolders when scanning a directory structure with large number of images.\r\n\r\n\r\n## Setup\r\n* Nested directories (5 levels deep)\r\n* 3M+ images\r\n* 1 `metadata.jsonl` file\r\n\r\n\r\n## Performance Degradation Point 1\r\n\r\nDegradation occurs because [`get_data_files_patterns`](https://github.com/huggingface/datasets/blob/main/src/datasets/data_files.py#L231-L243) runs the exact same scan for many different types of patterns, and there doesn't seem to be a way to easily limit this. It's controlled by the definition of [`ALL_DEFAULT_PATTERNS`](https://github.com/huggingface/datasets/blob/main/src/datasets/data_files.py#L82-L85). \r\n\r\nOne scan with 3M+ files takes about 10-15 minutes to complete on my setup, so having those extra scans really slows things down \u2013 from 10 minutes to 60+. Most of the scans return no matches, but they still take a significant amount of time to complete \u2013 hence the poor performance.\r\n\r\nAs a side effect, when this scan is run on 3M+ image files, Python also consumes up to 12 GB of RAM, which is not ideal.\r\n\r\n\r\n## Performance Degradation Point 2\r\n\r\nThe second performance bottleneck is in [`PackagedDatasetModuleFactory.get_module`](https://github.com/huggingface/datasets/blob/d7dfbc83d68e87ba002c5eb2555f7a932e59038a/src/datasets/load.py#L707-L711), which calls `DataFilesDict.from_local_or_remote`. \r\n\r\nIt runs for a long time (60min+), consuming significant amounts of RAM \u2013 even more than the point 1 above. Based on `iostat -d 2`, it performs **zero** disk operations, which to me suggests that there is a code based bottleneck there that could be sorted out.\n\n### Steps to reproduce the bug\n\n```python\r\nfrom datasets import load_dataset\r\nimport os\r\nimport huggingface_hub\r\n\r\ndataset = load_dataset(\r\n  'imagefolder',\r\n  data_dir='/some/path',\r\n  # just to spell it out:\r\n  split=None,\r\n  drop_labels=True,\r\n  keep_in_memory=False\r\n)\r\n\r\ndataset.push_to_hub('account/dataset', private=True)\r\n```\n\n### Expected behavior\n\nWhile it's certainly possible to write a custom loader to replace `ImageFolder` with, it'd be great if the off-the-shelf `ImageFolder` would by default have a setup that can scale to large datasets.\r\n\r\nOr perhaps there could be a dedicated loader just for large datasets that trades off flexibility for performance? As in, maybe you have to define explicitly how you want it to work rather than it trying to guess your data structure like `_get_data_files_patterns()` does?\n\n### Environment info\n\n- `datasets` version: 2.7.1\r\n- Platform: Linux-4.14.296-222.539.amzn2.x86_64-x86_64-with-glibc2.2.5\r\n- Python version: 3.7.10\r\n- PyArrow version: 10.0.1\r\n- Pandas version: 1.3.5\r\n\r\n",
    "url": "https://github.com/huggingface/datasets/issues/5317",
    "state": "open",
    "labels": [],
    "created_at": "2022-12-01T00:04:21Z",
    "updated_at": "2022-12-01T21:49:26Z",
    "comments": 3,
    "user": "salieri"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1071,
    "title": "Different gradients for HyperNet training",
    "body": "TLDR: Is there a way to optimize model created by combine_state_for_ensemble using torch.backward()?\r\n\r\nHi, I am using combine_state_for_ensemble for HyperNet training. \r\n\r\n```\r\nfmodel, fparams, fbuffers = combine_state_for_ensemble([HyperMLP() for i in range(K)])\r\n[p.requires_grad_() for p in fparams];\r\nweights_and_biases = vmap(fmodel)(fparams, fbuffers, z.expand(self.K,-1,-1)) #in which it parallizes over K\r\n```\r\nAfter I create the `weights_and_biases`, I put them into right shapes `ws_and_bs` and use as parameters of another ensemble.\r\n\r\n```\r\nfmodel, fparams, fbuffers = combine_state_for_ensemble([SimpleMLP() for i in range(K)])        \r\noutputs = vmap(fmodel)(ws_and_bs, fbuffers, inputs)\r\n```\r\n\r\nThis approach generates exactly the same outputs if I use loops instead of vmap. However, (somehow) their gradients are different. \r\n\r\n```\r\nloss = compute_loss(outputs)\r\nloss.backward()\r\n```\r\nDo you have any idea why?\r\n\r\nUpdate: It seems like ws_and_bs does not holding any gradient even though it is requires_grad. \r\n\r\n**Update2: It seems like I can forward by using stateless model with my generated weights but I cannot backprop from them using loss.backward(). Is there any trick that I can use?**",
    "url": "https://github.com/pytorch/functorch/issues/1071",
    "state": "open",
    "labels": [],
    "created_at": "2022-11-30T21:37:05Z",
    "updated_at": "2022-12-03T13:03:44Z",
    "comments": 2,
    "user": "bkoyuncu"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1070,
    "title": "Applying grad elementwise to tensors of arbitrary shape",
    "body": "What is the easiest way to apply the grad of a function elementwise to a tensor of arbitrary shape? For example\r\n\r\n```python\r\nimport torch\r\nfrom functorch import grad, vmap\r\n\r\n# These functions can be called with tensor of any shape and will be applied elementwise\r\nsin = torch.sin\r\ncos = torch.cos\r\n\r\n# Create cos function by using grad\r\ncos_from_grad = grad(sin)\r\n\r\nx = torch.rand([4, 2])\r\n\r\n# This is fine\r\nout = sin(x)\r\nout = cos(x)\r\n\r\n# This throws error\r\n# Expected f(*args) to return a scalar Tensor, got tensor with 2 dims\r\nout = cos_from_grad(x)\r\n```\r\n\r\nNow in this specific case, where we have a tensor of shape `(4, 2)`, we can use `vmap` twice\r\n\r\n```python\r\ncos_from_grad = vmap(vmap(grad(sin)))\r\n\r\n# This now works\r\nout = cos_from_grad(x)\r\n```\r\n\r\nHowever, if I later need to call `cos_from_grad` on a tensor of shape `(4, 2, 3)` for example, then the above code will no longer work as I would need to add an extra `vmap`. Is there a way to use `grad` to create a `cos` function that is equivalent to `torch.cos` in the sense that it can be applied elementwise to tensors of arbitrary shape?\r\n\r\nThank you! ",
    "url": "https://github.com/pytorch/functorch/issues/1070",
    "state": "closed",
    "labels": [],
    "created_at": "2022-11-29T14:45:57Z",
    "updated_at": "2022-11-29T16:59:34Z",
    "comments": 4,
    "user": "EmilienDupont"
  },
  {
    "repo": "pytorch/serve",
    "number": 2010,
    "title": "How to assign one or more specific gpus to each model when deploying multiple models at once.",
    "body": "How to assign one or more specific gpus to each model when deploying multiple models at once. If I have two models and three gpus, the workers of the first model I only want to deploy on gpus 0 and 1, and the workers of the second model I only want to deploy on gpus 3. Instead of assigning gpus to each model sequentially.",
    "url": "https://github.com/pytorch/serve/issues/2010",
    "state": "closed",
    "labels": [
      "question",
      "gpu"
    ],
    "created_at": "2022-11-29T11:26:10Z",
    "updated_at": "2023-12-17T22:56:55Z",
    "user": "Git-TengSun"
  },
  {
    "repo": "huggingface/setfit",
    "number": 209,
    "title": "Limitations of Setfit Model",
    "body": "Hi, was wondering your thoughts on some of the limitations of the Setfit model. Can it support any sort of few shot text classification, or what are some areas where this model falls short? Are there any research papers / ideas to address some of these limitations. \r\n\r\nAlso, is the model available to call via Hugging Face's inference API for enterprise. We saw the Ag-News endpoint, but are there any other endpoints that are more generalizable, or how would you recommend distilling a derivative of this model into production?",
    "url": "https://github.com/huggingface/setfit/issues/209",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-11-28T22:58:35Z",
    "updated_at": "2023-02-24T20:11:00Z",
    "user": "nv78"
  },
  {
    "repo": "pytorch/vision",
    "number": 6985,
    "title": "Range compatibility for pytorch dependency",
    "body": "### \ud83d\ude80 The feature\n\nCurrently `torchvision` only ever supports a hard-pinned version of `torch`. f.e. `torchvision==0.13.0` requires`torch==1.12.0` and `torchvision==0.13.1` requires `torch==1.12.1`. It would be easier for users if torchvision wouldn't put exact restrictions on the `torch` version.\n\n### Motivation, pitch\n\nHello \ud83d\udc4b  Thank you for your continued support of `torchvison` we use it frequently and it works great!\r\n\r\nIn the project I maintain we manage our `torch` version regularly and therefore usually upgrade quickly to a new version when it comes out. However, due to the hard-pinning of `torchvision` we are often waiting for `torchvision` to release a new version before we can use bugfixes in `torch` (or exciting new features).\r\n\r\nThis raises a few questions:\r\n\r\n* Is it important for `torchvision` to always hard-pin a version? \r\n* Are the upgrades of `torch` version in `torchvision` truly backwards incompatible?\r\n* Could `torchvision` support a range of `torch` versions? (like `torchmetrics` does)\r\n\r\nAdding a max range for the `torch` requirement would allow users to upgrade to a new version of torch automatically when it comes out.\r\n\r\n**Examples**\r\n\r\n`torchvision==0.13.0` could have depended on `torch<1.13` to include all bugfix releases of `torch==0.13.*`.\r\n`torchvision==0.13.1` could have depended on `torch<1.13` to include all bugfix releases of `torch==0.13.*`.\r\n\r\nA minimum version may also be appropriate when `torch` adds new APIs that `torchvision` wants to consume.\r\n\r\nYour thoughts there would be greatly appreciated! Thank you for your work \ud83d\ude47\u200d\u2642\ufe0f \n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/6985",
    "state": "closed",
    "labels": [
      "question",
      "topic: binaries"
    ],
    "created_at": "2022-11-28T15:01:17Z",
    "updated_at": "2022-12-08T15:00:36Z",
    "user": "alexandervaneck"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1484,
    "title": "Building on Jetson Xavier NX16GB with Jetpack4.6 (TensorRT8.0.1) python3.9, pytorch1.13",
    "body": "I am trying to build the torch_tensorrt wheel on my Jetson Xavier NX16GB running Jetpack4.6 which means I run TensorRT8-0-1 with python3.9.15 and a on device compiled pytorch/torchlib 1.13.0. \r\nI just can't seem to get it to compile succesfully.\r\n\r\nI have tried both v1.1.0 until I realized that it was not really backwards compatible with TensorRT 8.0.1, I then downgraded to v1.1.0 and tried using the workspace file from the toolchains/jp_workspaces:\r\n```\r\nworkspace(name = \"Torch-TensorRT\")\r\n\r\nload(\"@bazel_tools//tools/build_defs/repo:git.bzl\", \"git_repository\")\r\nload(\"@bazel_tools//tools/build_defs/repo:http.bzl\", \"http_archive\")\r\n\r\nhttp_archive(\r\n    name = \"rules_python\",\r\n    sha256 = \"778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f\",\r\n    url = \"https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz\",\r\n)\r\n\r\nload(\"@rules_python//python:pip.bzl\", \"pip_install\")\r\n\r\nhttp_archive(\r\n    name = \"rules_pkg\",\r\n    sha256 = \"038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d\",\r\n    urls = [\r\n        \"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz\",\r\n        \"https://github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz\",\r\n    ],\r\n)\r\n\r\nload(\"@rules_pkg//:deps.bzl\", \"rules_pkg_dependencies\")\r\n\r\nrules_pkg_dependencies()\r\n\r\ngit_repository(\r\n    name = \"googletest\",\r\n    commit = \"703bd9caab50b139428cea1aaff9974ebee5742e\",\r\n    remote = \"https://github.com/google/googletest\",\r\n    shallow_since = \"1570114335 -0400\",\r\n)\r\n\r\n# External dependency for torch_tensorrt if you already have precompiled binaries.\r\nlocal_repository(\r\n    name = \"torch_tensorrt\",\r\n    path = \"/opt/conda/lib/python3.8/site-packages/torch_tensorrt\",\r\n)\r\n\r\n# CUDA should be installed on the system locally\r\nnew_local_repository(\r\n    name = \"cuda\",\r\n    build_file = \"@//third_party/cuda:BUILD\",\r\n    path = \"/usr/local/cuda-10.2/\",\r\n)\r\n\r\nnew_local_repository(\r\n    name = \"cublas\",\r\n    build_file = \"@//third_party/cublas:BUILD\",\r\n    path = \"/usr\",\r\n)\r\n\r\n####################################################################################\r\n# Locally installed dependencies (use in cases of custom dependencies or aarch64)\r\n####################################################################################\r\n\r\n# NOTE: In the case you are using just the pre-cxx11-abi path or just the cxx11 abi path\r\n# with your local libtorch, just point deps at the same path to satisfy bazel.\r\n\r\n# NOTE: NVIDIA's aarch64 PyTorch (python) wheel file uses the CXX11 ABI unlike PyTorch's standard\r\n# x86_64 python distribution. If using NVIDIA's version just point to the root of the package\r\n# for both versions here and do not use --config=pre-cxx11-abi\r\n\r\nnew_local_repository(\r\n    name = \"libtorch\",\r\n    path = \"/home/user/pytorch/torch\",\r\n    build_file = \"third_party/libtorch/BUILD\"\r\n)\r\n\r\n# NOTE: Unused on aarch64-jetson with NVIDIA provided PyTorch distribu\u2020ion\r\nnew_local_repository(\r\n    name = \"libtorch_pre_cxx11_abi\",\r\n    path = \"/home/user/pytorch/torch\",\r\n    build_file = \"third_party/libtorch/BUILD\"\r\n)\r\n\r\nnew_local_repository(\r\n    name = \"cudnn\",\r\n    path = \"/usr/\",\r\n    build_file = \"@//third_party/cudnn/local:BUILD\"\r\n)\r\n\r\nnew_local_repository(\r\n   name = \"tensorrt\",\r\n   path = \"/usr/\",\r\n   build_file = \"@//third_party/tensorrt/local:BUILD\"\r\n)\r\n\r\n#########################################################################\r\n# Development Dependencies (optional - comment out on aarch64)\r\n#########################################################################\r\n\r\npip_install(\r\n    name = \"devtools_deps\",\r\n    requirements = \"//:requirements-dev.txt\",\r\n)\r\n```\r\nWith the setup.py from v1.0.0\r\n```\r\nimport os\r\nimport sys\r\nimport glob\r\nimport setuptools\r\nfrom setuptools import setup, Extension, find_packages\r\nfrom setuptools.command.build_ext import build_ext\r\nfrom setuptools.command.develop import develop\r\nfrom setuptools.command.install import install\r\nfrom distutils.cmd import Command\r\nfrom wheel.bdist_wheel import bdist_wheel\r\n\r\nfrom torch.utils import cpp_extension\r\nfrom shutil import copyfile, rmtree\r\n\r\nimport subprocess\r\nimport platform\r\nimport warnings\r\n\r\ndir_path = os.path.dirname(os.path.realpath(__file__))\r\n\r\nCXX11_ABI = False\r\n\r\nJETPACK_VERSION = None\r\n\r\n__version__ = '1.0.0'\r\n\r\n\r\ndef get_git_revision_short_hash() -> str:\r\n    return subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('ascii').strip()\r\n\r\n\r\nif \"--release\" not in sys.argv:\r\n    __version__ = __version__ + \"+\" + get_git_revision_short_hash()\r\nelse:\r\n    sys.argv.remove(\"--release\")\r\n\r\nif \"--use-cxx11-abi\" in sys.argv:\r\n    sys.argv.remove(\"--use-cxx11-abi\")\r\n    CXX11_ABI = True\r\n\r\nif platform.uname().processor == \"aarch64\":\r\n    if \"--jetpack-version\" in sys.argv:\r\n        version_idx = sys.argv.index(\"--jetpack-version\") + 1\r\n        version = sys.argv[version_idx]\r\n        sys.argv.remove(version)\r\n        sys.argv.remove(\"--j",
    "url": "https://github.com/pytorch/TensorRT/issues/1484",
    "state": "closed",
    "labels": [
      "question",
      "channel: linux-jetpack"
    ],
    "created_at": "2022-11-28T13:08:28Z",
    "updated_at": "2022-12-01T11:05:36Z",
    "user": "MartinPedersenpp"
  },
  {
    "repo": "pytorch/examples",
    "number": 1097,
    "title": "argument -a/--arch: invalid choice: 'efficientnet_b0'",
    "body": "Error reported: \r\n\r\nmain.py: error: argument -a/--arch: invalid choice: 'efficientnet_b0' (choose from 'alexnet', 'densenet121', 'densenet161', 'densenet169', 'densenet201', 'googlenet', 'inception_v3', 'mnasnet0_5', 'mnasnet0_75', 'mnasnet1_0', 'mnasnet1_3', 'mobilenet_v2', 'resnet101', 'resnet152', 'resnet18', 'resnet34', 'resnet50', 'resnext101_32x8d', 'resnext50_32x4d', 'shufflenet_v2_x0_5', 'shufflenet_v2_x1_0', 'shufflenet_v2_x1_5', 'shufflenet_v2_x2_0', 'squeezenet1_0', 'squeezenet1_1', 'vgg11', 'vgg11_bn', 'vgg13', 'vgg13_bn', 'vgg16', 'vgg16_bn', 'vgg19', 'vgg19_bn', 'wide_resnet101_2', 'wide_resnet50_2')\r\n\r\nHowever, the model `efficientnet_bx` is listed in **README** files, is there any changes in recent commits?\r\n",
    "url": "https://github.com/pytorch/examples/issues/1097",
    "state": "closed",
    "labels": [],
    "created_at": "2022-11-28T10:36:54Z",
    "updated_at": "2022-11-28T10:45:53Z",
    "comments": 1,
    "user": "Deeeerek"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1066,
    "title": "Unable to compute derivatives due to calling .item()",
    "body": "Hello, i am getting the error below whenever i try to compute the jacobian of my network.\r\n\r\n\r\nRuntimeError: vmap: It looks like you're either (1) calling .item() on a Tensor or (2) attempting to use a Tensor in some data-dependent control flow or (3) encountering this error in PyTorch internals. For (1): we don't support vmap over calling .item() on a Tensor, please try to rewrite what you're doing with other operations. For (2): If you're doing some control flow instead, we don't support that yet, please shout over at https://github.com/pytorch/functorch/issues/257 . For (3): please file an issue.\r\n\r\n\r\nthe error can be traced back to the line below. \r\n\r\n`weights = interpolation_weights.prod(-1)`\r\n\r\nIs there a way around this ? \r\n\r\nThank you .\r\n",
    "url": "https://github.com/pytorch/functorch/issues/1066",
    "state": "closed",
    "labels": [],
    "created_at": "2022-11-27T05:16:57Z",
    "updated_at": "2022-11-29T10:53:43Z",
    "comments": 3,
    "user": "elientumba2019"
  },
  {
    "repo": "pytorch/examples",
    "number": 1096,
    "title": "DDP training question",
    "body": "Hi, I'm using the tutorial [https://github.com/pytorch/tutorials/blob/master/intermediate_source/ddp_tutorial.rst](url) for DDP train,using 4 gpus in myself code, reference Basic Use Case. But when I finished the modification, it was stuck during run the demo,meanwhile,video memory has been occupied.Could you help me?",
    "url": "https://github.com/pytorch/examples/issues/1096",
    "state": "open",
    "labels": [
      "help wanted",
      "distributed"
    ],
    "created_at": "2022-11-25T06:58:55Z",
    "updated_at": "2023-08-24T06:32:13Z",
    "comments": 2,
    "user": "Henryplay"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 278,
    "title": "How to change portrait to landscape on camera view in Object Detection App ?",
    "body": "",
    "url": "https://github.com/pytorch/android-demo-app/issues/278",
    "state": "open",
    "labels": [],
    "created_at": "2022-11-24T05:00:25Z",
    "updated_at": "2022-12-15T09:07:27Z",
    "user": "aravinthk00"
  },
  {
    "repo": "huggingface/Mongoku",
    "number": 92,
    "title": "Switch to Svelte(Kit?)",
    "body": "",
    "url": "https://github.com/huggingface/Mongoku/issues/92",
    "state": "closed",
    "labels": [
      "enhancement",
      "help wanted",
      "question"
    ],
    "created_at": "2022-11-23T21:28:39Z",
    "updated_at": "2025-10-25T16:03:14Z",
    "user": "julien-c"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5286,
    "title": "FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220301/dumpstatus.json",
    "body": "### Describe the bug\n\nI follow the steps provided on the website [https://huggingface.co/datasets/wikipedia](https://huggingface.co/datasets/wikipedia) \r\n\r\n$ pip install apache_beam mwparserfromhell\r\n>>> from datasets import load_dataset\r\n>>> load_dataset(\"wikipedia\", \"20220301.en\")\r\n\r\nhowever this results in the following error: \r\n\r\n raise MissingBeamOptions(\r\ndatasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/\r\nIf you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory). \r\nExample of usage: \r\n\t`load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')`\r\n\r\nIf I then prompt the system with:\r\n\r\n>>> load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')\r\n\r\nthe following error occurs:\r\n\r\nraise FileNotFoundError(f\"Couldn't find file at {url}\")\r\nFileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220301/dumpstatus.json\r\n\r\n\r\n\r\n\r\nHere is the exact code:\r\n\r\nPython 3.10.6 (main, Nov  2 2022, 18:53:38) [GCC 11.3.0] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> from datasets import load_dataset\r\n>>> load_dataset('wikipedia', '20220301.en')\r\nDownloading and preparing dataset wikipedia/20220301.en to /home/[EDITED]/.cache/huggingface/datasets/wikipedia/20220301.en/2.0.0/aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559...\r\nDownloading: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 15.3k/15.3k [00:00<00:00, 22.2MB/s]\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/load.py\", line 1741, in load_dataset\r\n    builder_instance.download_and_prepare(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 822, in download_and_prepare\r\n    self._download_and_prepare(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 1879, in _download_and_prepare\r\n    raise MissingBeamOptions(\r\ndatasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/\r\nIf you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory). \r\nExample of usage: \r\n\t`load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')`\r\n\t\r\n\t\r\n\r\n\r\n>>> load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')\r\nDownloading and preparing dataset wikipedia/20220301.en to /home/[EDITED]/.cache/huggingface/datasets/wikipedia/20220301.en/2.0.0/aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559...\r\nDownloading: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 15.3k/15.3k [00:00<00:00, 18.8MB/s]\r\nDownloading data files:   0%|                                                                                | 0/1 [00:00<?, ?it/s]Traceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/load.py\", line 1741, in load_dataset\r\n    builder_instance.download_and_prepare(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 822, in download_and_prepare\r\n    self._download_and_prepare(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 1909, in _download_and_prepare\r\n    super()._download_and_prepare(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/builder.py\", line 891, in _download_and_prepare\r\n    split_generators = self._split_generators(dl_manager, **split_generators_kwargs)\r\n  File \"/home/rorytol/.cache/huggingface/modules/datasets_modules/datasets/wikipedia/aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559/wikipedia.py\", line 945, in _split_generators\r\n    downloaded_files = dl_manager.download_and_extract({\"info\": info_url})\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/download/download_manager.py\", line 447, in download_and_extract\r\n    return self.extract(self.download(url_or_urls))\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/download/download_manager.py\", line 311, in download\r\n    downloaded_path_or_paths = map_nested(\r\n  File \"/usr/local/lib/python3.10/dist-packages/datasets/utils/py_utils.py\", line ",
    "url": "https://github.com/huggingface/datasets/issues/5286",
    "state": "closed",
    "labels": [],
    "created_at": "2022-11-23T14:54:15Z",
    "updated_at": "2024-11-23T01:16:41Z",
    "comments": 3,
    "user": "roritol"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2126,
    "title": "Incorrect use of \"epoch\" in the Optimizing Model Parameters tutorial",
    "body": "From the first paragraph of the [Optimizing Model Parameters](https://github.com/pytorch/tutorials/blob/master/beginner_source/basics/optimization_tutorial.py) tutorial:\r\n\r\n> in each iteration (called an epoch) the model makes a guess about the output, calculates the error in its guess (loss), collects the derivatives of the error with respect to its parameters (as we saw in the [previous section](https://pytorch.org/tutorials/beginner/basics/autograd_tutorial.html)), and optimizes these parameters using gradient descent.\r\n\r\nWhat is described in this paragraph is a single optimization step. An epoch is a full pass over the dataset (see e.g. https://deepai.org/machine-learning-glossary-and-terms/epoch).\r\n\r\nI propose to simply remove the \"(called an epoch)\" here, as the term is correctly used and explained later in the \"Hyperparameters\" section:\r\n\r\n> Number of Epochs - the number times to iterate over the dataset\r\n\r\n\n\ncc @suraj813",
    "url": "https://github.com/pytorch/tutorials/issues/2126",
    "state": "closed",
    "labels": [
      "intro"
    ],
    "created_at": "2022-11-22T10:23:34Z",
    "updated_at": "2022-11-28T21:42:30Z",
    "comments": 1,
    "user": "chrsigg"
  },
  {
    "repo": "huggingface/setfit",
    "number": 198,
    "title": "text similarity",
    "body": "Hi can I use this system to obtain the similaarity scores of my data set to a given prompts.\r\nIf not what best solution could help this problem?\r\nthank you",
    "url": "https://github.com/huggingface/setfit/issues/198",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-11-22T06:59:21Z",
    "updated_at": "2022-12-20T09:04:53Z",
    "user": "aivyon"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5274,
    "title": "load_dataset possibly broken for gated datasets?",
    "body": "### Describe the bug\n\nWhen trying to download the [winoground dataset](https://huggingface.co/datasets/facebook/winoground), I get this error unless I roll back the version of huggingface-hub:\r\n\r\n```\r\n[/usr/local/lib/python3.7/dist-packages/huggingface_hub/utils/_validators.py](https://localhost:8080/#) in validate_repo_id(repo_id)\r\n    165     if repo_id.count(\"/\") > 1:\r\n    166         raise HFValidationError(\r\n--> 167             \"Repo id must be in the form 'repo_name' or 'namespace/repo_name':\"\r\n    168             f\" '{repo_id}'. Use `repo_type` argument if needed.\"\r\n    169         )\r\n\r\nHFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': 'datasets/facebook/winoground'. Use `repo_type` argument if needed\r\n```\n\n### Steps to reproduce the bug\n\nInstall requirements:\r\n\r\n```\r\npip install transformers\r\npip install datasets\r\n# It works if you uncomment the following line, rolling back huggingface hub:\r\n# pip install huggingface-hub==0.10.1\r\n```\r\n\r\nThen:\r\n\r\n```\r\nfrom datasets import load_dataset\r\nauth_token = \"\"  # Replace with an auth token, which you can get from your huggingface account: Profile -> Settings -> Access Tokens -> New Token\r\nwinoground = load_dataset(\"facebook/winoground\", use_auth_token=auth_token)[\"test\"]\r\n```\r\n\r\n\r\n\r\n\n\n### Expected behavior\n\nDownloading of the datset\n\n### Environment info\n\nJust a google colab; see here: https://colab.research.google.com/drive/15wwOSte2CjTazdnCWYUm2VPlFbk2NGc0?usp=sharing",
    "url": "https://github.com/huggingface/datasets/issues/5274",
    "state": "closed",
    "labels": [],
    "created_at": "2022-11-21T21:59:53Z",
    "updated_at": "2023-05-27T00:06:14Z",
    "comments": 9,
    "user": "TristanThrush"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1467,
    "title": "\u2753 [Question] Profiling examples?",
    "body": "## \u2753 Question\r\n\r\nWhen I'm not using TensorRT, I run my model through an FX interpreter that times each call op (by inserting CUDA events before/after and measuring the elapsed time). I'd like to do something similar after converting/compiling the model to TensorRT, and I see there is some profiling built in with [tensorrt.Proflier](https://docs.nvidia.com/deeplearning/tensorrt/api/python_api/infer/Core/Profiler.html) but its usage isn't clear to me. \r\n\r\nIs there an example anywhere on how to time each layer or op with this profiler, or any other means of profiling the TensorRT engine/layers? I don't mind messing with the op converters to do so, but I don't want to have to wrap every op converter my model uses. More generally I think I could use the PyTorch profiler but it would be difficult to parse the output to get clear per-layer/per-op results. ",
    "url": "https://github.com/pytorch/TensorRT/issues/1467",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: runtime"
    ],
    "created_at": "2022-11-21T21:13:28Z",
    "updated_at": "2023-05-04T00:02:17Z",
    "user": "collinmccarthy"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5272,
    "title": "Use pyarrow Tensor dtype",
    "body": "### Feature request\r\n\r\nI was going the discussion of converting tensors to lists.\r\nIs there a way to leverage pyarrow's Tensors for nested arrays / embeddings?\r\n\r\nFor example:\r\n```python\r\nimport pyarrow as pa\r\nimport numpy as np\r\nx = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\r\npa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\r\n```\r\n\r\n[Apache docs](https://arrow.apache.org/docs/python/generated/pyarrow.Tensor.html)\r\n\r\nMaybe this belongs into the pyarrow features / repo.\r\n\r\n### Motivation\r\n\r\nWorking with big data, we need to make sure to use the best data structures and IO out there\r\n\r\n### Your contribution\r\n\r\nCan try to a PR if code changes necessary",
    "url": "https://github.com/huggingface/datasets/issues/5272",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-11-20T15:18:41Z",
    "updated_at": "2024-11-11T03:03:17Z",
    "comments": 17,
    "user": "franz101"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2122,
    "title": "using nn.Module(X).argmax(1) - get IndexError",
    "body": "Hello there, I'm student of NN course, I'm try to implement FFNN (or TDNN) to work on prediction of AR(2)-model, im using PyTorch example, and on my data and NN architecture i got pred.argmax(1) - error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/b0r1ngx/PycharmProjects/ArtificialNeuroNets/group_00201/lab01/lab01_pytorch.py\", line 116, in <module>\r\n    first_method()\r\n  File \"/home/b0r1ngx/PycharmProjects/ArtificialNeuroNets/group_00201/lab01/lab01_pytorch.py\", line 87, in first_method\r\n    test(test_data, time_delay_nn, loss_function)\r\n  File \"/home/b0r1ngx/PycharmProjects/ArtificialNeuroNets/group_00201/lab01/lab01_pytorch.py\", line 70, in test\r\n    c1 = pred.argmax(1) == y_pred\r\nIndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)\r\n```\r\nwhere it's used in you're examples: \r\nhere in test_loop function - https://github.com/pytorch/tutorials/blob/master/beginner_source/basics/optimization_tutorial.py\r\n\r\nI'm also doesn't think that i get best `Hyperparameter`s / loss_function / optimizer - cos i get bad Accuracy / Avg loss in my case, \r\nplease help me with that:\r\nU can check my code here:\r\n(now im using how its recommended -1 or 0, but there is always 0)\r\nhttps://github.com/b0r1ngx/ArtificialNeuroNets/blob/master/group_00201/lab01/lab01_pytorch.py\r\n\r\nThanks!\n\ncc @jerryzh168 @z-a-f @vkuzo",
    "url": "https://github.com/pytorch/tutorials/issues/2122",
    "state": "open",
    "labels": [
      "question",
      "arch-optimization"
    ],
    "created_at": "2022-11-19T16:05:26Z",
    "updated_at": "2023-03-01T16:22:33Z",
    "user": "b0r1ngx"
  },
  {
    "repo": "huggingface/optimum",
    "number": 488,
    "title": "Community contribution - `BetterTransformer` integration for more models!",
    "body": "## `BetterTransformer` integration for more models!\r\n\r\n`BetterTransformer` API provides faster inference on CPU & GPU through a simple interface! \r\n\r\nModels can benefit from very interesting speedups using a one liner and by making sure to install the latest version of PyTorch. A complete guideline on how to convert a new model has been created on the [BetterTransformer documentation](https://huggingface.co/docs/optimum/bettertransformer/tutorials/contribute)!\r\n\r\nHere is a list of models that could be potentially supported, pick one of the architecture below and let's discuss about the conversion! \r\n\r\nText models \ud83d\udd8a\ufe0f  :\r\n\r\n- [x] FSMT - [FSMTEncoderLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/fsmt/modeling_fsmt.py#L397) / @Sumanth077 https://github.com/huggingface/optimum/pull/494\r\n- [ ] MobileBERT - [MobileBertLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/mobilebert/modeling_mobilebert.py#L498) / @raghavanone https://github.com/huggingface/optimum/pull/506\r\n- [x] MBart - [MBartEncoderLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/mbart/modeling_mbart.py#L296) + [M2M100EncoderLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/m2m_100/modeling_m2m_100.py#L345) / https://github.com/huggingface/optimum/pull/516 @ravenouse \r\n- [x] ProphetNet - [ProphetNetEncoderLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/prophetnet/modeling_prophetnet.py#L1130)\r\n- [x] RemBert - [RemBertLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/rembert/modeling_rembert.py#L415)\r\n- [x] RocBert - [RocBertLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/roc_bert/modeling_roc_bert.py#LL519C7-L519C19)\r\n- [x] RoFormer - [RoFormerLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/roformer/modeling_roformer.py#L448)\r\n- [x] Tapas - [TapasLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/tapas/modeling_tapas.py#L524) / https://github.com/huggingface/optimum/pull/520\r\n\r\n\r\nVision models \ud83d\udcf7  :\r\n\r\n- [x] Blip - [BlipLayer](https://github.com/huggingface/transformers/blob/fcf813417aa34f3a0ea7d283f7d4f6b0834cf098/src/transformers/models/blip/modeling_blip.py#L372)\r\n- [ ] Detr - [DetrLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/detr/modeling_detr.py#L610)\r\n- [ ] Flava - [FlavaLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/flava/modeling_flava.py#L597)\r\n- [ ] GLPN - [GLPNLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/glpn/modeling_glpn.py#L292) | Cannot be supported\r\n- [x] ViLT - [ViLTLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/vilt/modeling_vilt.py#L472) / https://github.com/huggingface/optimum/pull/508\r\n\r\nAudio models \ud83d\udd09  :\r\n\r\n- [ ] Speech2Text - [Speech2TextLayer](https://github.com/huggingface/transformers/blob/95754b47a6d4fbdad3440a45762531e8c471c528/src/transformers/models/speech_to_text/modeling_speech_to_text.py#L350)\r\n- [ ] NEW: Audio Speech Transformer - [ASTLayer](https://github.com/huggingface/transformers/blob/f2e7d270ec795be09e6187dd2459edb43bd861c1/src/transformers/models/audio_spectrogram_transformer/modeling_audio_spectrogram_transformer.py#L274)\r\n\r\nLet us also know if you think that some architectures can be supported that we missed. Note that for encoder-decoder based models below, we expect to convert the encoder only.\r\n\r\n**Support for decoder-based models coming soon!**\r\n\r\ncc @michaelbenayoun @fxmarty \r\n\r\nhttps://github.com/huggingface/transformers/issues/20372",
    "url": "https://github.com/huggingface/optimum/issues/488",
    "state": "open",
    "labels": [
      "good first issue"
    ],
    "created_at": "2022-11-18T10:45:39Z",
    "updated_at": "2025-05-20T20:35:02Z",
    "comments": 26,
    "user": "younesbelkada"
  },
  {
    "repo": "huggingface/setfit",
    "number": 192,
    "title": "How to use a custom Sentence Transformer pretrained model",
    "body": "Hello team,\r\n\r\nPresently we are using models which are present in hugging face . I have a custom trained Sentence transformer.\r\nHow I can use a custom trained Hugging face model in the present pipeline.  ",
    "url": "https://github.com/huggingface/setfit/issues/192",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-11-17T09:13:59Z",
    "updated_at": "2022-12-20T09:05:06Z",
    "user": "theainerd"
  },
  {
    "repo": "huggingface/setfit",
    "number": 191,
    "title": "How to build multilabel text classfication dataset",
    "body": "From the sample below, param **column_mapping** is used to set up the dataset. What is the format of label column in multilabel?Is it the one-hot label?\r\n\r\n\r\ntrainer = SetFitTrainer(\r\n    model=model,\r\n    train_dataset=train_dataset,\r\n    eval_dataset=eval_dataset,\r\n    loss_class=CosineSimilarityLoss,\r\n    metric=\"accuracy\",\r\n    batch_size=16,\r\n    num_iterations=20, # The number of text pairs to generate for contrastive learning\r\n    num_epochs=1, # The number of epochs to use for constrastive learning\r\n    column_mapping={\"sentence\": \"text\", \"label\": \"label\"} # Map dataset columns to text/label expected by trainer\r\n\r\n\r\n\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/setfit/issues/191",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-11-17T05:50:56Z",
    "updated_at": "2022-12-13T22:32:16Z",
    "user": "HenryYuen128"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 89136,
    "title": "[FSDP] Adam Gives Different Results Where Only Difference Is Flattening",
    "body": "Consider the following unit test (that relies on some imports from `common_fsdp.py`):\r\n```\r\ndef test(self):\r\n    local_model = TransformerWithSharedParams.init(\r\n        self.process_group,\r\n        FSDPInitMode.NO_FSDP,\r\n        CUDAInitMode.CUDA_BEFORE,\r\n        deterministic=True,\r\n    )\r\n    fsdp_model = FSDP(\r\n        copy.deepcopy(local_model),\r\n        sharding_strategy=ShardingStrategy.NO_SHARD,\r\n    )\r\n    ddp_model = DDP(local_model, device_ids=[self.rank])\r\n    ddp_optim = torch.optim.Adam(ddp_model.parameters(), lr=1e-2)\r\n    fsdp_optim = torch.optim.Adam(fsdp_model.parameters(), lr=1e-2)\r\n    max_norm = 1\r\n    norm_type = 1\r\n    device = torch.device(\"cuda\")\r\n    for i in range(10):\r\n        ddp_optim.zero_grad(set_to_none=True)\r\n        fsdp_optim.zero_grad(set_to_none=True)\r\n        inp = ddp_model.module.get_input(device)\r\n        for model in (ddp_model, fsdp_model):\r\n            out = model(*inp)\r\n            loss = nn.functional.cross_entropy(\r\n                out.view(-1, out.size(-1)), inp[1].view(-1), reduction=\"sum\"\r\n            )\r\n            loss.backward()\r\n        ddp_total_norm = torch.nn.utils.clip_grad_norm_(\r\n            ddp_model.parameters(),\r\n            max_norm=max_norm,\r\n            norm_type=norm_type,\r\n        )\r\n        fsdp_total_norm = torch.nn.utils.clip_grad_norm_(\r\n            fsdp_model.parameters(),\r\n            max_norm=max_norm,\r\n            norm_type=norm_type,\r\n        )\r\n        self.assertEqual(ddp_total_norm, fsdp_total_norm)\r\n        ddp_flat_grad = torch.cat(tuple(p.grad.flatten() for p in ddp_model.parameters()))\r\n        fsdp_flat_grad = torch.cat(tuple(p.grad.flatten() for p in fsdp_model.parameters()))\r\n        self.assertEqual(ddp_flat_grad, fsdp_flat_grad)\r\n        ddp_flat_param = torch.cat(tuple(p.flatten() for p in ddp_model.parameters()))\r\n        fsdp_flat_param = torch.cat(tuple(p.flatten() for p in fsdp_model.parameters()))\r\n        self.assertEqual(ddp_flat_param, fsdp_flat_param)\r\n        ddp_optim.step()\r\n        fsdp_optim.step()\r\n        ddp_flat_param = torch.cat(tuple(p.flatten() for p in ddp_model.parameters()))\r\n        fsdp_flat_param = torch.cat(tuple(p.flatten() for p in fsdp_model.parameters()))\r\n        self.assertEqual(ddp_flat_param, fsdp_flat_param)\r\n```\r\n\r\nOn the `i == 3` iteration, the assertion `self.assertEqual(ddp_flat_param, fsdp_flat_param)` *after* the optimizer steps fails.\r\n```\r\nMismatched elements: 2 / 8427 (0.0%)\r\nGreatest absolute difference: 1.0077477327286033e-05 at index (6610,) (up to 1e-05 allowed)\r\nGreatest relative difference: 8.842818419533154 at index (6610,) (up to 1.3e-06 allowed)\r\n```\r\n\r\nThe unit test initializes a model (`TransformerWithSharedParams`) and constructs `DDP` and `FSDP` (`NO_SHARD`) instances, which should be semantically equivalent. The _only_ relevant difference should be that FSDP has flattened all parameters into one `FlatParameter`.\r\n\r\nWe run a training loop that includes `torch.nn.utils.clip_grad_norm_(max_norm=1, norm_type=1)` and uses Adam optimizer. We have 3 checks: (1) gradient elements match after backward and clipping, (2) parameter elements match immediately before optimizer step, and (3) parameter elements match immediately after optimizer step.\r\n\r\nSince (1) and (2) pass but (3) does not (on the `i == 3` iteration), this suggests that the optimizer step is not producing the same results. As discussed above, the only difference is that the `fsdp_model` parameters are \"bucketed\" into a `FlatParameter` (1D containing all the same elements), while the `ddp_model` parameters preserve the original shapes.\r\n\r\nA couple of notes:\r\n- [!!] The mismatch does not happen if we pass `use_orig_params=True` to the FSDP constructor. This is a key observation. For `use_orig_params=True`, the optimizer operates on the parameters with their original shapes, just like DDP. This suggests that operating on the flattened parameter is indeed the cause for the difference.\r\n- The mismatch does not happen when using `SGD` instead of `Adam`.\r\n- The mismatch does not happen if we remove the `torch.nn.utils.clip_grad_norm_()`. However, since we have check (1), this should rule out that `clip_grad_norm_()` is producing mismatching results. Rather, we may be relying on `clip_grad_norm_()` to have the gradients be at a sufficiently small magnitude.\r\n- The mismatch also does happen when using `loss = out.sum()` instead of the `cross_entropy` computation.\r\n\r\nIt requires some nontrivial effort to simplify this repro to be equivalent but not rely on DDP, FSDP, or the FSDP utils from `common_fsdp.py`. I will hold off on that for now.\r\n\r\ncc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501",
    "url": "https://github.com/pytorch/pytorch/issues/89136",
    "state": "closed",
    "labels": [
      "oncall: distributed",
      "module: fsdp"
    ],
    "created_at": "2022-11-16T15:16:55Z",
    "updated_at": "2024-06-11T20:01:26Z",
    "user": "awgu"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5249,
    "title": "Protect the main branch from inadvertent direct pushes",
    "body": "We have decided to implement a protection mechanism in this repository, so that nobody (not even administrators) can inadvertently push accidentally directly to the main branch.\r\n\r\nSee context here:\r\n- d7c942228b8dcf4de64b00a3053dce59b335f618\r\n\r\nTo do:\r\n- [x] Protect main branch\r\n  - Settings > Branches > Branch protection rules > main > Edit\r\n    - [x] Check: Do not allow bypassing the above settings \r\n      - The above settings will apply to administrators and custom roles with the \"bypass branch protections\" permission.\r\n    - [x] Additionally, uncheck: Require approvals [under \"Require a pull request before merging\", which was already checked]\r\n      - Before, we could exceptionally merge a non-approved PR, using Administrator bypass\r\n      - Now that Administrator bypass is no longer possible, we would always need an approval to be able to merge; and pull request authors cannot approve their own pull requests. This could be an inconvenient in some exceptional circumstances when an urgent fix is needed\r\n      - Nevertheless, although it is no longer enforced, it is strongly recommended to merge PRs only if they have at least one approval\r\n- [x] #5250\r\n  - So that direct pushes to main branch are no longer necessary",
    "url": "https://github.com/huggingface/datasets/issues/5249",
    "state": "closed",
    "labels": [
      "maintenance"
    ],
    "created_at": "2022-11-16T14:19:03Z",
    "updated_at": "2023-12-21T10:28:27Z",
    "comments": 1,
    "user": "albertvillanova"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1452,
    "title": "\ud83d\udc1b [Bug] FX front-end layer norm, missing plugin",
    "body": "## Bug Description\r\n\r\nI'm using a ConvNeXt model from the timm library which uses `torch.nn.functional.layer_norm`. I'm getting this warning during conversion: \r\n\r\n```\r\nUnable to find layer norm plugin, fall back to TensorRT implementation\r\n```\r\n\r\nwhich is triggered from [this line](https://github.com/pytorch/TensorRT/blob/e3b992941b3ae5f1863de271fc9032829834ec6a/py/torch_tensorrt/fx/converters/acc_ops_converters.py#L717) because it fails to find the `LayerNormDynamic` plugin. \r\n\r\nDo I need to install TensorRT differently from what's described in the README to install this plugin? Or where should that be installed from?\r\n\r\nI'm following the instructions for using the pre-compiled binaries (install commands shown below).\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.21.1\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n\r\n```\r\nconda install python=3.10\r\npip install nvidia-pyindex\r\npip install nvidia-tensorrt==8.4.3.1\r\npip install torch==1.12.1+cu116 --find-links https://download.pytorch.org/whl/torch/\r\npip install torch-tensorrt==1.2.0 --find-links https://github.com/pytorch/TensorRT/releases/expanded_assets/v1.2.0\r\n```\r\n - Are you using local sources or building from archives: Local CUDA and cuDNN\r\n - Python version: 3.10\r\n - CUDA version: 11.6\r\n - GPU models and configuration: TitanV\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1452",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: plugins"
    ],
    "created_at": "2022-11-15T19:37:26Z",
    "updated_at": "2023-06-10T00:02:28Z",
    "user": "collinmccarthy"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5243,
    "title": "Download only split data",
    "body": "### Feature request\n\nIs it possible to download only the data that I am requesting and not the entire dataset? I run out of disk spaceas it seems to download the entire dataset, instead of only the part needed.\r\n\r\ncommon_voice[\"test\"] = load_dataset(\"mozilla-foundation/common_voice_11_0\", \"en\", split=\"test\", \r\n                                    cache_dir=\"cache/path...\",\r\n                                    use_auth_token=True,\r\n                                    download_config=DownloadConfig(delete_extracted='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')\r\n                                    )\r\n\n\n### Motivation\n\nefficiency improvement\n\n### Your contribution\n\nn/a",
    "url": "https://github.com/huggingface/datasets/issues/5243",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-11-15T10:15:54Z",
    "updated_at": "2025-02-25T14:47:03Z",
    "comments": 7,
    "user": "capsabogdan"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 1281,
    "title": "what is the meaning of parameter: \"num_class_images\"",
    "body": "What is the `num_class_images `parameter used for? I see that in some examples it is 50, sometimes it is 200. In the source code it is said that: \"Minimal class images for prior preservation loss. If not have enough images, additional images will be sampled with class_prompt.\"\r\nI still do not fully grasp it. For example if I have 20 images to train, what should I select this \"`num_class_images`\"?",
    "url": "https://github.com/huggingface/diffusers/issues/1281",
    "state": "closed",
    "labels": [],
    "created_at": "2022-11-14T18:32:22Z",
    "updated_at": "2022-12-06T01:47:42Z",
    "user": "himmetozcan"
  },
  {
    "repo": "huggingface/setfit",
    "number": 178,
    "title": "Question : evaluation after every training epoch",
    "body": "# Thank you \r\nHello!\r\nI am Yongtae, a senior ML engineer in japan.\r\nThank you for publishing a genuinely excellent paper and code.\r\nFew-shot learning and multilingual support are appreciated by engineers like me who work abroad!\r\n\r\n# Question\r\nI felt this model easily overfit to train data if the number of epochs is over 2 or train data contains similar data.\r\nTherefore I would like to evaluate the model after every training epoch to find out the best epoch number.\r\n\r\nBut as shown [here](https://github.com/huggingface/setfit/blob/99c30746799a09e0267427b8a7b8650568222b48/src/setfit/trainer.py#L363), it seems difficult to evaluate the model at every epoch, because the body part is trained on full epoch at the beginning of the training. \r\n\r\nso I would like to change like below\r\n\r\n```python\r\nfor epoch in num_epochs:\r\n    self.model.model_body.fit(\r\n                train_objectives=[(train_dataloader, train_loss)],\r\n                epochs=1,\r\n                steps_per_epoch=train_steps,\r\n                optimizer_params={\"lr\": learning_rate},\r\n                warmup_steps=warmup_steps,\r\n                show_progress_bar=True,\r\n                use_amp=self.use_amp,\r\n            )\r\n\r\n    if not is_differentiable_head or not self._freeze:\r\n            # Train the final classifier\r\n            self.model.fit(\r\n                x_train,\r\n                y_train,\r\n                num_epochs=1,\r\n                batch_size=batch_size,\r\n                learning_rate=learning_rate,\r\n                body_learning_rate=body_learning_rate,\r\n                l2_weight=l2_weight,\r\n                show_progress_bar=True,\r\n            )\r\n\r\n    somehow_evaluete()\r\n```\r\n\r\nDoes it make sense to you?\r\nOr if I fork and make that change, are there any problem?\r\n\r\nI am looking forward to your reply\r\n\r\nBest and thank you in advance!\r\n",
    "url": "https://github.com/huggingface/setfit/issues/178",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-11-13T09:36:47Z",
    "updated_at": "2022-12-26T03:12:16Z",
    "user": "Yongtae723"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2117,
    "title": "Stable Diffusion Question",
    "body": "I am looking to leverage torch.nn.parallel.DistributedDataParallel per the documentation you have written to integrate dual 3090s into a workflow.  I am using the automatic repo and after trying multiple things to update the following code to include what you have in the torch wiki, I have been unsuccessful in switching the cuda current device to leverage the model methodology outlined in your documentation and stackoverflow examples.  Do you have any recommendations on what I can read or leverage to test further?  I know that Meta has been releasing some wonderful tools I have been using to support the Stable Diffusion project so I hope this is in your purview.  If it is not, feel free to ignore.\r\n\r\ndef caching_allocator_alloc(size, device: Union[Device, int] = None, stream=None):\r\n    r\"\"\"Performs a memory allocation using the CUDA memory allocator.\r\n\r\n    Memory is allocated for a given device and a stream, this\r\n    function is intended to be used for interoperability with other\r\n    frameworks. Allocated memory is released through\r\n    :func:`~torch.cuda.caching_allocator_delete`.\r\n\r\n    Args:\r\n        size (int): number of bytes to be allocated.\r\n        device (torch.device or int, optional): selected device. If it is\r\n            ``None`` the default CUDA device is used.\r\n        stream (torch.cuda.Stream or int, optional): selected stream. If is ``None`` then\r\n            the default stream for the selected device is used.\r\n\r\n    .. note::\r\n        See :ref:`cuda-memory-management` for more details about GPU memory\r\n        management.\r\n    \"\"\"\r\n    \r\n    if device is None:\r\n        device = torch.cuda.current_device()\r\n    device = _get_device_index(0)\r\n    \r\n    if stream is None:\r\n        stream = torch.cuda.current_stream(device)\r\n    if isinstance(stream, torch.cuda.streams.Stream):\r\n        stream = stream.cuda_stream\r\n    if not isinstance(stream, int):\r\n        raise TypeError('Invalid type for stream argument, must be '\r\n                        '`torch.cuda.Stream` or `int` representing a pointer '\r\n                        'to a exisiting stream')\r\n    with torch.cuda.device(device):\r\n        return torch._C._cuda_cudaCachingAllocator_raw_alloc(size, stream)\n\ncc @mrshenli @osalpekar @H-Huang @kwen2501",
    "url": "https://github.com/pytorch/tutorials/issues/2117",
    "state": "closed",
    "labels": [
      "question",
      "distributed"
    ],
    "created_at": "2022-11-12T06:18:43Z",
    "updated_at": "2025-05-12T15:33:35Z",
    "user": "jasonewest"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1449,
    "title": "\u2753 [Question] How do you compile for multiple GPU architectures?",
    "body": "## \u2753 Question\r\n\r\nHow do you compile for multiple GPU architectures?  Or do you need to compile one torchscript per architecture?\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1449",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: runtime"
    ],
    "created_at": "2022-11-11T22:02:07Z",
    "updated_at": "2023-05-04T00:02:18Z",
    "user": "dfung"
  },
  {
    "repo": "huggingface/setfit",
    "number": 173,
    "title": "How to setup gradient_accumulation?",
    "body": "Hi,\r\n\r\nin order to train a model SetFit, I would like simulate a `batch_size` of 16 but with a `batch_size` of 8. For doing that, I need to setup `gradient_accumulation` to 2. \r\n\r\nHow to do that?\r\n\r\nThanks.",
    "url": "https://github.com/huggingface/setfit/issues/173",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-11-10T21:19:52Z",
    "updated_at": "2022-12-20T08:49:13Z",
    "user": "piegu"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5226,
    "title": "Q: Memory release when removing the column?",
    "body": "### Describe the bug\n\nHow do I release memory when I use methods like `.remove_columns()` or `clear()` in notebooks?\r\n```python\r\nfrom datasets import load_dataset\r\ncommon_voice = load_dataset(\"mozilla-foundation/common_voice_11_0\", \"ja\", use_auth_token=True)\r\n# check memory -> RAM Used (GB):  0.704 / Total (GB)  33.670\r\ncommon_voice = common_voice.remove_columns(column_names=common_voice.column_names['train'])\r\ncommon_voice.clear()\r\n# check memory -> RAM Used (GB):  0.705 / Total (GB)  33.670\r\n```\r\n\r\nI tried `gc.collect()` but did not help\n\n### Steps to reproduce the bug\n\n1. load dataset\r\n2. remove all the columns\r\n3. check memory is reduced or not\r\n\r\n\r\n[link to reproduce](https://www.kaggle.com/code/bayartsogtya/huggingface-dataset-memory-issue/notebook?scriptVersionId=110630567)\n\n### Expected behavior\n\nMemory released when I remove the column\n\n### Environment info\n\n- `datasets` version: 2.1.0\r\n- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid\r\n- Python version: 3.7.12\r\n- PyArrow version: 8.0.0\r\n- Pandas version: 1.3.5",
    "url": "https://github.com/huggingface/datasets/issues/5226",
    "state": "closed",
    "labels": [],
    "created_at": "2022-11-10T18:35:27Z",
    "updated_at": "2022-11-29T15:10:10Z",
    "comments": 3,
    "user": "bayartsogt-ya"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5225,
    "title": "Add video feature",
    "body": "### Feature request\n\nAdd a `Video` feature to the library so folks can include videos in their datasets.\n\n### Motivation\n\nBeing able to load Video data would be quite helpful. However, there are some challenges when it comes to videos:\r\n\r\n1. Videos, unlike images, can end up being extremely large files\r\n2. Often times when training video models, you need to do some very specific sampling. Videos might end up needing to be broken down into X number of clips used for training/inference\r\n3. Videos have an additional audio stream, which must be accounted for\r\n4. The feature needs to be able to encode/decode videos (with right video settings) from bytes.\n\n### Your contribution\n\nI did work on this a while back in [this (now closed) PR](https://github.com/huggingface/datasets/pull/4532). It used a library I made called [encoded_video](https://github.com/nateraw/encoded-video), which is basically the utils from [pytorchvideo](https://github.com/facebookresearch/pytorchvideo), but without the `torch` dep. It included the ability to read/write from bytes, as we need to do here. We don't want to be using a sketchy library that I made as a dependency in this repo, though.\r\n\r\nWould love to use this issue as a place to:\r\n- brainstorm ideas on how to do this right\r\n- list ways/examples to work around it for now\r\n\r\nCC @sayakpaul @mariosasko @fcakyon",
    "url": "https://github.com/huggingface/datasets/issues/5225",
    "state": "open",
    "labels": [
      "enhancement",
      "help wanted",
      "vision"
    ],
    "created_at": "2022-11-10T17:36:11Z",
    "updated_at": "2022-12-02T15:13:15Z",
    "comments": 7,
    "user": "nateraw"
  },
  {
    "repo": "huggingface/optimum",
    "number": 462,
    "title": "Add support for EncoderDecoderModel",
    "body": "### Feature request\n\nThere's already support for `marian` and various LLMs. But sometimes users create their own generic `EncoderDecoderModel`, e.g. \r\n\r\n```\r\nfrom transformers import EncoderDecoderModel\r\nfrom optimum.onnxruntime import ORTModelForSeq2SeqLM\r\n\r\nmodel = EncoderDecoderModel.from_encoder_decoder_pretrained(\"bert-base-multilingual-cased\", \"bert-base-multilingual-cased\") \r\n\r\nmodel.save_pretrained(\"model_dir\")\r\n\r\n# Should be able to load this, but isn't supported yet.\r\nort_model = ORTModelForSeq2SeqLM.from_pretrained(\"model_dir\", from_transformers=True)\r\n```\n\n### Motivation\n\nThe `EncoderDecoderModel` is generic enough to cover quite a lot of use-cases but this is might be hard too since it can most probably only cover EncoderDecoder of ORT supported LLMs\n\n### Your contribution\n\nMaybe, if there's some guidance on how to do so.",
    "url": "https://github.com/huggingface/optimum/issues/462",
    "state": "closed",
    "labels": [],
    "created_at": "2022-11-10T13:54:48Z",
    "updated_at": "2023-09-01T11:11:43Z",
    "comments": 1,
    "user": "alvations"
  },
  {
    "repo": "huggingface/evaluate",
    "number": 353,
    "title": "What is the MAE range in evaluate?",
    "body": "In the MAE demo space, it is indicated that \"Each MAE float value ranges from 0.0 to 1.0, with the best value being 0.0.\"\r\n\r\nDoesn't it range from 0 to +inf in general ? \r\nIs it a programmatic constraint added on the evaluate MAE score?",
    "url": "https://github.com/huggingface/evaluate/issues/353",
    "state": "closed",
    "labels": [],
    "created_at": "2022-11-10T13:29:30Z",
    "updated_at": "2022-11-16T09:45:15Z",
    "user": "clefourrier"
  },
  {
    "repo": "pytorch/kineto",
    "number": 681,
    "title": "what is happen when I use torch.profiler.profile with activities=[torch.profiler.ProfilerActivity.CPU, torch.profiler.ProfilerActivity.CUDA]",
    "body": "I use profiler with `activities=[torch.profiler.ProfilerActivity.CPU, torch.profiler.ProfilerActivity.CUDA]`, and get time 0.22ms in cpu time , avg 5.14us in cuda time, and when I use `time.time()` with `torch.cuda.synchronize()`,the result is 0.24 ms. What is the difference between these results\uff1f\r\nMy code looks like:\r\n```\r\nactivities = [torch.profiler.ProfilerActivity.CPU, torch.profiler.ProfilerActivity.CUDA]\r\ntorch.cuda.synchronize()\r\nstart = time.time()\r\nwith torch.profiler.profile(activities= activities, record_shapes=True, profile_memory=False) as pf:\r\n    output = model(input)\r\ntorch.cuda.synchronize()\r\nend = time.time()\r\nruntime = end-start()\r\n```",
    "url": "https://github.com/pytorch/kineto/issues/681",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-11-10T07:19:18Z",
    "updated_at": "2023-10-10T15:13:14Z",
    "user": "qq1243196045"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1060,
    "title": "aten::all not implemented",
    "body": "When I vmap \"torch.all\" function, I get the following:\n\n/tmp/ipykernel_39088/2496106444.py:7: UserWarning: There is a performance drop because we have not yet implemented the batching rule for aten::all. Please file us an issue on GitHub so that we can prioritize its implementation. (Triggered internally at  /__w/functorch/functorch/functorch/csrc/BatchedFallback.cpp:85.)\n  f = functorch.vmap(torch.all, in_dims=1)\n\nIs it possible to make it available for v1.12?",
    "url": "https://github.com/pytorch/functorch/issues/1060",
    "state": "closed",
    "labels": [
      "actionable",
      "high priority",
      "small"
    ],
    "created_at": "2022-11-09T13:01:55Z",
    "updated_at": "2023-01-11T05:56:13Z",
    "comments": 7,
    "user": "iliTheFallen"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 1204,
    "title": "[Community] Can we composite Dreambooth network training?",
    "body": "Very impressed with Dreambooth capabilities. I have what i think is a feature request - or perhaps a clarification on what is and is not possible in training networks with Dreambooth. In particular, i was wondering if there was a way to composite two networks to enable embedding of two instances (e.g. an sks dog >and< an sqs cat). I tried the plain vanilla training one network with an instance prompt using stable v1-5 as base and then fed this network into another Dreambooth training on a second instance prompt - and my result could only represent the first instance prompt. I note i can train a network on a textual inversion token and use this network to feed into Dreambooth - and the resulting network is able to combine the two concepts - the token from textual inversion and the sks instance token from Dreambooth. Just wondering if there was a way to layer multiple tokens with multiple Dreambooth trainings. Again, super powerful - i'm very impressed by how you can embed a variety of different classes of entities in Dreambooth which each responding very realistically to prompts.\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/1204",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2022-11-09T01:59:05Z",
    "updated_at": "2022-12-21T15:03:19Z",
    "user": "felgryn"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5216,
    "title": "save_elasticsearch_index",
    "body": "Hi,\r\n\r\nI am new to Dataset and elasticsearch. I was wondering is there any equivalent approach to save elasticsearch index as of save_faiss_index locally for later use, to remove the need to re-index a dataset?",
    "url": "https://github.com/huggingface/datasets/issues/5216",
    "state": "open",
    "labels": [],
    "created_at": "2022-11-08T23:06:52Z",
    "updated_at": "2022-11-09T13:16:45Z",
    "comments": 1,
    "user": "amobash2"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 1168,
    "title": "What is \"class images\" mean for dreambooth training?",
    "body": "What is \"class images\" mean for dreambooth training? \r\nIf instance images meaning the subject i want to train on \uff0c what does \"class images\" mean?",
    "url": "https://github.com/huggingface/diffusers/issues/1168",
    "state": "closed",
    "labels": [],
    "created_at": "2022-11-07T03:41:07Z",
    "updated_at": "2022-11-08T06:07:10Z",
    "user": "universewill"
  },
  {
    "repo": "huggingface/transformers",
    "number": 20083,
    "title": "Where is the Translation template ? ",
    "body": "I want to translate the doc in leisure time, and I followed the guide, but not found Translation template...",
    "url": "https://github.com/huggingface/transformers/issues/20083",
    "state": "closed",
    "labels": [],
    "created_at": "2022-11-06T06:44:12Z",
    "updated_at": "2022-11-14T08:40:44Z",
    "user": "bfss"
  },
  {
    "repo": "pytorch/torchx",
    "number": 648,
    "title": "Use GPU with `local_docker`",
    "body": "## \ud83d\udc1b Bug\r\n\r\nCan't use GPU with the `local_docker` scheduler. \r\n\r\nModule (check all that applies):\r\n * [ ] `torchx.spec`\r\n * [ ] `torchx.component`\r\n * [ ] `torchx.apps`\r\n * [ ] `torchx.runtime`\r\n * [x] `torchx.cli`\r\n * [x] `torchx.schedulers`\r\n * [ ] `torchx.pipelines`\r\n * [ ] `torchx.aws`\r\n * [ ] `torchx.examples`\r\n * [ ] `other`\r\n\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. create a `test.py` with \r\n\r\n```python\r\nimport torch\r\nprint(\"torch.cuda.is_available():\", torch.cuda.is_available())\r\n```\r\n\r\n2. create a `Dockerfile`\r\n\r\n```Dockerfile\r\nFROM ghcr.io/pytorch/torchx:0.3.0\r\nCOPY test.py test.py\r\n```\r\n\r\n3. run the following commands\r\n\r\n```bash\r\ndocker build -t test:latest .\r\ndocker run --gpus all test:latest python test.py\r\ntorchx run --scheduler local_cwd utils.python --script test.py\r\ntorchx run --scheduler local_docker utils.python --script test.py\r\n```\r\n```\r\nSending build context to Docker daemon  6.144kB\r\nStep 1/2 : FROM ghcr.io/pytorch/torchx:0.3.0\r\n ---> 343f0f3b1a07\r\nStep 2/2 : COPY test.py test.py\r\n ---> Using cache\r\n ---> fa75170948b2\r\nSuccessfully built fa75170948b2\r\nSuccessfully tagged test:latest\r\ntorch.cuda.is_available(): True\r\ntorchx 2022-11-05 13:29:02 INFO     loaded configs from /home/costa/Documents/go/src/github.com/vwxyzjn/test/y/torchx_test/.torchxconfig\r\ntorchx 2022-11-05 13:29:02 INFO     Log directory not set in scheduler cfg. Creating a temporary log dir that will be deleted on exit. To preserve log directory set the `log_dir` cfg option\r\ntorchx 2022-11-05 13:29:02 INFO     Log directory is: /tmp/torchx_6_h698gw\r\nlocal_cwd://torchx/torchx_utils_python-mfc1scwb7dncd\r\ntorchx 2022-11-05 13:29:02 INFO     Waiting for the app to finish...\r\npython/0 torch.cuda.is_available(): True\r\ntorchx 2022-11-05 13:29:04 INFO     Job finished: SUCCEEDED\r\ntorchx 2022-11-05 13:29:05 WARNING  `gpus = all` was declared in the [local_docker] section  of the config file but is not a runopt of `local_docker` scheduler. Remove the entry from the config file to no longer see this warning\r\ntorchx 2022-11-05 13:29:05 INFO     loaded configs from /home/costa/Documents/go/src/github.com/vwxyzjn/test/y/torchx_test/.torchxconfig\r\ntorchx 2022-11-05 13:29:05 INFO     Checking for changes in workspace `file:///home/costa/Documents/go/src/github.com/vwxyzjn/test/y/torchx_test`...\r\ntorchx 2022-11-05 13:29:05 INFO     To disable workspaces pass: --workspace=\"\" from CLI or workspace=None programmatically.\r\ntorchx 2022-11-05 13:29:06 INFO     Built new image `sha256:32cf796cecfd488d7e0e5ba5069e9218098bed75597b3b402b9c557a796e5f4a` based on original image `ghcr.io/pytorch/torchx:0.3.0` and changes in workspace `file:///home/costa/Documents/go/src/github.com/vwxyzjn/test/y/torchx_test` for role[0]=python.\r\nlocal_docker://torchx/torchx_utils_python-bq7cx57f1c6wr\r\ntorchx 2022-11-05 13:29:06 INFO     Waiting for the app to finish...\r\npython/0 torch.cuda.is_available(): False\r\ntorchx 2022-11-05 13:29:07 INFO     Job finished: SUCCEEDED\r\n```\r\n\r\n## Expected behavior\r\n\r\nNotice that torch identifies the GPU device when running with `poetry run torchx run --scheduler local_cwd utils.python --script test.py`, but it fails to do so when running with `poetry run torchx run --scheduler local_docker utils.python --script test.py`. Also, when running `docker run --gpus all test:latest python test.py`, GPU is also recognized. \r\n\r\n## Environment\r\n\r\n```Collecting environment information...\r\nPyTorch version: 1.13.0+cu117\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.7\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Pop!_OS 21.10 (x86_64)\r\nGCC version: (Ubuntu 11.2.0-7ubuntu2) 11.2.0\r\nClang version: Could not collect\r\nCMake version: version 3.18.4\r\nLibc version: glibc-2.34\r\n\r\nPython version: 3.9.5 (default, Jul 19 2021, 13:27:26)  [GCC 10.3.0] (64-bit runtime)\r\nPython platform: Linux-5.17.5-76051705-generic-x86_64-with-glibc2.34\r\nIs CUDA available: True\r\nCUDA runtime version: 11.3.109\r\nCUDA_MODULE_LOADING set to: LAZY\r\nGPU models and configuration: \r\nGPU 0: NVIDIA GeForce RTX 3060 Ti\r\nGPU 1: NVIDIA GeForce RTX 3060 Ti\r\n\r\nNvidia driver version: 470.103.01\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.2.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.2.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.2.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.2.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.2.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.2.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.2.2\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] botorch==0.6.0\r\n[pip3] gpytorch==1.9.0\r\n[pip3] mypy-extensions==0.4.3\r\n[pip3] numpy==1.23.4\r\n[pip3] pytorch-lightning==1.5.10\r\n[pip3] torch==1.13.0\r\n[pip3] torch-model-archiver==0.6.0\r\n[pip3] torchmetrics==0.10.2\r\n[pip3] torchserve==0.6.0\r\n[pip3] torchtext==0.14.0\r\n[pip3] torchvision==0.14.0\r\n[pip3] torchx==0.3.0\r\n[conda] Could not collect",
    "url": "https://github.com/meta-pytorch/torchx/issues/648",
    "state": "closed",
    "labels": [
      "question",
      "docker"
    ],
    "created_at": "2022-11-05T17:31:18Z",
    "updated_at": "2022-11-13T01:26:30Z",
    "comments": 2,
    "user": "vwxyzjn"
  },
  {
    "repo": "pytorch/data",
    "number": 884,
    "title": "Steps per epoch for training ",
    "body": "### \ud83d\ude80 The feature\n\nFor huge datasets, an epoch may take a very long time to complete and it's good practice to perform evaluation and model checkpointing every N steps instead of at the end of an epoch. The tricky part lies at resuming training: how to tell the data loader to start from where it was left off? It would be great if torchdata could provide such a feature. \r\n\r\nI have no idea how such a feature could be implemented, but from a user perspective, the interface would be best to resemble the common usage:\r\n\r\n- A `dataloader.state_dict()` method that returns necessary information on where the data loading was left off.\r\n- A `dataloader.load_state_dict(saved_state_dict)` method for loading the saved state_dict.\n\n### Motivation, pitch\n\nSee above.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/884",
    "state": "closed",
    "labels": [],
    "created_at": "2022-11-04T16:39:32Z",
    "updated_at": "2022-11-04T21:00:30Z",
    "comments": 6,
    "user": "netw0rkf10w"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5200,
    "title": "Some links to canonical datasets in the docs are outdated",
    "body": "As we don't have canonical datasets in the github repo anymore, some old links to them doesn't work. I don't know how many of them are there, I found link to SuperGlue here: https://huggingface.co/docs/datasets/dataset_script#multiple-configurations, probably there are more of them. These links should be replaced by links to the corresponding datasets on the Hub. ",
    "url": "https://github.com/huggingface/datasets/issues/5200",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-11-04T10:06:21Z",
    "updated_at": "2022-11-07T18:40:20Z",
    "comments": 1,
    "user": "polinaeterna"
  },
  {
    "repo": "pytorch/xla",
    "number": 4157,
    "title": "How to wrap a model with dynamo",
    "body": "## \u2753 Questions and Help\r\n\r\nI am trying to add a dynamo model test with\r\n```\r\nimport torch\r\nimport torch_xla\r\nimport torch_xla.core.xla_model as xm\r\nimport torch_xla.utils.utils as xu\r\nimport torch_xla.debug.metrics as met\r\nimport torch._dynamo as dynamo\r\nimport torchvision\r\nimport unittest\r\n\r\nclass DynamoBasicTest(unittest.TestCase):\r\n\r\n  @dynamo.optimize('torchxla_trace_once')\r\n  def resetnet_18_dynamo(self, data):\r\n    model = torchvision.models.resnet18()\r\n    #model.eval()\r\n    return model(data)\r\n\r\n  def test_resnet18(self):\r\n    batch_size = xu.getenv_as('BATCH_SIZE', int, defval=4)\r\n    sample_count = xu.getenv_as('SAMPLE_COUNT', int, defval=10)\r\n    loader = xu.SampleGenerator(\r\n        data=(torch.zeros(batch_size, 3, 224,\r\n                          224), torch.zeros(batch_size, dtype=torch.int64)),\r\n        sample_count=sample_count)    \r\n    for data, _ in loader:\r\n      import pdb; pdb.set_trace()\r\n      output = self.resetnet_18_dynamo(data)\r\n```\r\n\r\nI get an error\r\n```\r\nTraceback (most recent call last):\r\n  File \"/root/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/_dynamo/optimizations/backends.py\", line 53, in inner\r\n    return fn(model, **kwargs)\r\n  File \"/root/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/_dynamo/optimizations/backends.py\", line 823, in torchxla_trace_once\r\n    return integration.extract_compiled_graph(model, example_inputs)\r\n  File \"/root/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/_dynamo/optimizations/torchxla_integration.py\", line 79, in extract_compiled_graph\r\n    orig_device = example_inputs[0].device\r\nIndexError: list index out of range\r\n```\r\n\r\nand I saw that `example_inputs` is empty. If I try with a simple example\r\n```\r\n  def fn_simple(self, x, y):\r\n    a = torch.cos(x)\r\n    b = torch.sin(y)\r\n    return a + b\r\n\r\n  @dynamo.optimize('torchxla_trace_once')\r\n  def fn_simple_dynamo(self, x, y):\r\n    return self.fn_simple(x, y)\r\n```\r\n\r\nit worked as expected. I am wondering what did I missed here.\r\n\r\n@shunting314 @wconstab \r\n",
    "url": "https://github.com/pytorch/xla/issues/4157",
    "state": "closed",
    "labels": [
      "dynamo"
    ],
    "created_at": "2022-11-04T02:19:01Z",
    "updated_at": "2022-11-04T22:55:13Z",
    "user": "JackCaoG"
  },
  {
    "repo": "huggingface/setfit",
    "number": 147,
    "title": "Reproducing RAFT experiments (Table 3)",
    "body": "Hi, I wasn't able to locate the code to reproduce Table 3. I looked in the `scripts` folder but didn't have success.\r\nAny help with this is greatly appreciated!\r\n\r\nA side question on the RAFT results: did you use 10 random seeds for this experiment?",
    "url": "https://github.com/huggingface/setfit/issues/147",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-11-02T18:34:55Z",
    "updated_at": "2022-12-13T22:50:48Z",
    "user": "dgiova"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1437,
    "title": "\u2753 [Question] Are the interpolate plugins with align_corners=True still necessary?",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\nhttps://github.com/pytorch/TensorRT/blob/master/core/conversion/converters/impl/interpolate.cpp#L566\r\nThis note is in the aten::upsample_bilinear2d converter:\r\n`Align corners and scale factor behave slightly different together in TRT and PyTorch so run the layer in ATen to maintain consistency between Torch-TensorRT and PyTorch https://pytorch.org/docs/stable/nn.functional.html#torch.nn.functional.interpolate`\r\n\r\nWith TRT 8.2.3 when I manually disable the plugin implementation and  use the TRT resize_layer implementation I don't see any additional inaccuracy in my model. I also don't see any failures in the interpolate unit tests.\r\n\r\nAre these plugins still necessary? What was the nature of the discrepancy with align corners?\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture:\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1437",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-11-02T18:26:01Z",
    "updated_at": "2022-12-15T17:59:25Z",
    "user": "mfeliz-cruise"
  },
  {
    "repo": "huggingface/setfit",
    "number": 145,
    "title": "SetFit for a large number of classes",
    "body": "Hi there, thanks for releasing such an interesting library.\r\n\r\nI am curious if any experiments have been run using SetFit in the extreme multiclass setting, say as `n_classes>=100`?",
    "url": "https://github.com/huggingface/setfit/issues/145",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-11-02T16:34:51Z",
    "updated_at": "2024-05-14T10:46:30Z",
    "user": "steve-marmalade"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5189,
    "title": "Reduce friction in tabular dataset workflow by eliminating having splits when dataset is loaded",
    "body": "### Feature request\n\nSorry for cryptic name but I'd like to explain using code itself. When I want to load a specific dataset from a repository (for instance, this: https://huggingface.co/datasets/inria-soda/tabular-benchmark)\r\n\r\n```python\r\nfrom datasets import load_dataset\r\ndataset = load_dataset(\"inria-soda/tabular-benchmark\", data_files=[\"reg_cat/house_sales.csv\"], streaming=True)\r\nprint(next(iter(dataset[\"train\"])))\r\n```\r\n\r\n`datasets` library is essentially designed for people who'd like to use benchmark datasets on various modalities to fine-tune their models, and these benchmark datasets usually have pre-defined train and test splits. However, for tabular workflows, having train and test splits usually ends up model overfitting to validation split so usually the users would like to do validation techniques like `StratifiedKFoldCrossValidation` or when they tune for hyperparameters they do `GridSearchCrossValidation` so often the behavior is to create their own splits. Even [in this paper](https://hal.archives-ouvertes.fr/hal-03723551) a benchmark is introduced but the split is done by authors.\r\nIt's a bit confusing for average tabular user to try and load a dataset and see `\"train\"` so it would be nice if we would not load dataset into a split called `train `by default.\r\n\r\n```diff\r\nfrom datasets import load_dataset\r\ndataset = load_dataset(\"inria-soda/tabular-benchmark\", data_files=[\"reg_cat/house_sales.csv\"], streaming=True)\r\n-print(next(iter(dataset[\"train\"])))\r\n+print(next(iter(dataset)))\r\n``` \n\n### Motivation\n\nI explained it above \ud83d\ude05\n\n### Your contribution\n\nI think this is quite a big change that seems small (e.g. how to determine datasets that will not be load to train split?), it's best if we discuss first!",
    "url": "https://github.com/huggingface/datasets/issues/5189",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-11-02T09:15:02Z",
    "updated_at": "2022-12-06T12:13:17Z",
    "comments": 33,
    "user": "merveenoyan"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5183,
    "title": "Loading an external dataset in a format similar to conll2003",
    "body": "I'm trying to load a custom dataset in a Dataset object, it's similar to conll2003 but with 2 columns only (word entity), I used the following script:\r\n\r\nfeatures = datasets.Features(\r\n            {\"tokens\": datasets.Sequence(datasets.Value(\"string\")),\r\n        \"ner_tags\": datasets.Sequence(\r\n            datasets.features.ClassLabel(\r\n                names=[\"B-PER\", .... etc.]))}\r\n        )\r\n\r\n\r\nfrom datasets import Dataset\r\n\r\nINPUT_COLUMNS = \"tokens ner_tags\".split(\" \")\r\n\r\ndef read_conll(file):\r\n    #all_labels = []\r\n    example = {col: [] for col in INPUT_COLUMNS}\r\n    idx = 0\r\n    with open(file) as f:\r\n        for line in f:\r\n          if line:\r\n            if line.startswith(\"-DOCSTART-\") and example[\"tokens\"] != []:\r\n                print(idx, example)\r\n                yield idx, example\r\n                idx += 1\r\n                example = {col: [] for col in INPUT_COLUMNS}\r\n            elif line == \"\\n\" or (line.startswith(\"-DOCSTART-\") and example[\"tokens\"] == []):\r\n              continue\r\n            else:\r\n                row_cols = line.split(\" \")\r\n                for i, col in enumerate(example):\r\n                    example[col] = row_cols[i].rstrip()\r\n\r\ndset = Dataset.from_generator(read_conll, gen_kwargs={\"file\": \"/content/new_train.txt\"}, features = features)   \r\n\r\nThe following error happened:\r\n[/usr/local/lib/python3.7/dist-packages/datasets/utils/py_utils.py](https://localhost:8080/#) in <genexpr>(.0)\r\n    285     for key in unique_values(itertools.chain(*dicts)):  # set merge all keys\r\n    286         # Will raise KeyError if the dict don't have the same keys\r\n--> 287         yield key, tuple(d[key] for d in dicts)\r\n    288 \r\n    \r\n\r\nTypeError: tuple indices must be integers or slices, not str\r\n\r\nWhat does this mean and what should I modify?",
    "url": "https://github.com/huggingface/datasets/issues/5183",
    "state": "closed",
    "labels": [],
    "created_at": "2022-11-01T13:18:29Z",
    "updated_at": "2022-11-02T11:57:50Z",
    "comments": 0,
    "user": "Taghreed7878"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5182,
    "title": "Add notebook / other resource links to the task-specific data loading guides",
    "body": "Does it make sense to include links to notebooks / scripts that show how to use a dataset for training / fine-tuning a model? \r\n\r\nFor example, here in [https://huggingface.co/docs/datasets/image_classification] we could include a mention of https://github.com/huggingface/notebooks/blob/main/examples/image_classification.ipynb.\r\n\r\nApplies to https://huggingface.co/docs/datasets/object_detection as well.\r\n\r\nCc: @osanseviero @nateraw ",
    "url": "https://github.com/huggingface/datasets/issues/5182",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-11-01T07:57:26Z",
    "updated_at": "2022-11-03T01:49:57Z",
    "comments": 2,
    "user": "sayakpaul"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5181,
    "title": "Add a guide for semantic segmentation",
    "body": "Currently, we have these guides for object detection and image classification:\r\n\r\n* https://huggingface.co/docs/datasets/object_detection\r\n* https://huggingface.co/docs/datasets/image_classification\r\n\r\nI am proposing adding a similar guide for semantic segmentation. \r\n\r\nI am happy to contribute a PR for it. \r\n\r\nCc: @osanseviero @nateraw ",
    "url": "https://github.com/huggingface/datasets/issues/5181",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-11-01T07:54:50Z",
    "updated_at": "2022-11-04T18:23:36Z",
    "comments": 2,
    "user": "sayakpaul"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5180,
    "title": "An example or recommendations for creating large image datasets?",
    "body": "I know that Apache Beam and `datasets` have [some connector utilities](https://huggingface.co/docs/datasets/beam). But it's a little unclear what we mean by \"But if you want to run your own Beam pipeline with Dataflow, here is how:\". What does that pipeline do? \r\n\r\nAs a user, I was wondering if we have this support for creating large image datasets. If so, we should mention that [here](https://huggingface.co/docs/datasets/image_dataset). \r\n\r\nCc @lhoestq ",
    "url": "https://github.com/huggingface/datasets/issues/5180",
    "state": "open",
    "labels": [],
    "created_at": "2022-11-01T07:38:38Z",
    "updated_at": "2022-11-02T10:17:11Z",
    "comments": 2,
    "user": "sayakpaul"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1058,
    "title": "Cuda Memory Overflow in Jacobian Computation",
    "body": "Hi,\r\n\r\nI implemented a Jacobian computation using functorch, but encoutnered a memory overflow issue.\r\n\r\nThe function that I want to differentiate is `ResidualFunctional.residual`. I'd like to compute the Jacobian of this function w.r.t. its first argument `inputs`.\r\n\r\nThe output of  `ResidualFunctional.residual` is a tensor of size (10000, ) and `inputs` is a tensor of size (1001, ). Thus, the Jacobian is 10000 by 1001, which takes about 74 MB using double precision.\r\n\r\nHowever, `functorch.jacrev` had a memory overflow error on a 24 GB GPU. The error message is shown below. I am wondering why FuncTorch takes so much memory in the reverse mode autodiff, and if there is a solution to this issue.\r\n```\r\ntorch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 38.00 GiB (GPU 0; 23.69 GiB total capacity; 810.80 MiB already allocated; 21.25 GiB free; 824.00 MiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF\r\n```\r\n\r\nBelow is a working example that reproduce this issue.\r\n\r\nCUDA 11.4\r\nFuncTorch 1.13.0\r\nPyTorch 1.13.0\r\nGPyTorch 1.9.0\r\n\r\nThanks!\r\n\r\n```\r\nimport torch\r\nimport gpytorch\r\n\r\nimport functorch\r\nfrom functorch import make_functional_with_buffers\r\n\r\n\r\nclass ResidualFunctional():\r\n    def __init__(self,\r\n        kernel, m, d,\r\n        outputscale=None, sigma=None,\r\n        lengthscale_penalty=None\r\n    ):\r\n        self.func, _, self.buffers = make_functional_with_buffers(kernel)\r\n        self.m = m\r\n        self.d = d\r\n\r\n        self.outputscale = outputscale\r\n        self.sigma = sigma\r\n\r\n    def _residual(self, u, x, y, params, sigma):\r\n        with gpytorch.settings.trace_mode(), gpytorch.settings.lazily_evaluate_kernels(False):\r\n            m = u.size(0)\r\n\r\n            func_nl = lambda params, buffers, x1, x2: self.func(params, buffers, x1, x2).evaluate()\r\n\r\n            Kxu = func_nl(params, self.buffers, x, u)\r\n            A = torch.cat(\r\n                [Kxu, sigma * torch.eye(m, device=u.device)],\r\n                dim=-2,\r\n            )\r\n            ybar = torch.cat([y, y.new_zeros(m)], dim=-1)\r\n            c = torch.linalg.lstsq(A, ybar.unsqueeze(-1), rcond=None).solution.squeeze()\r\n            r = ybar - A @ c\r\n            return r\r\n\r\n    def residual(self, inputs, x, y):\r\n        u = inputs[:self.m * self.d].view(self.m, self.d)\r\n\r\n        lengthscale = torch.nn.functional.softplus(inputs[-1])\r\n\r\n        return self._residual(u, x, y, (lengthscale, self.outputscale), self.sigma)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    device = \"cuda:0\"\r\n\r\n    n = 10000\r\n    d = 10\r\n    m = 100\r\n\r\n    u = torch.randn(m, d, device=device)\r\n    x = torch.randn(n, d, device=device)\r\n    y = torch.randn(n, device=device)\r\n\r\n    kernel = gpytorch.kernels.ScaleKernel(gpytorch.kernels.RBFKernel())\r\n    kernel = kernel.to(device)\r\n\r\n    functional = ResidualFunctional(\r\n        kernel, m=m, d=d,\r\n        outputscale=kernel.outputscale, sigma=1e-2,\r\n    )\r\n\r\n    inputs = torch.cat(\r\n        (u.view(-1), kernel.base_kernel.raw_lengthscale.view(-1)),\r\n        dim=-1\r\n    )\r\n    residual = functional.residual(inputs, x, y)\r\n    print(residual.shape)\r\n\r\n    jacobian = functorch.jacrev(functional.residual, argnums=0)(inputs, x, y)\r\n    print(jacobian.shape)\r\n```",
    "url": "https://github.com/pytorch/functorch/issues/1058",
    "state": "open",
    "labels": [],
    "created_at": "2022-10-31T22:29:07Z",
    "updated_at": "2022-11-08T14:53:53Z",
    "comments": 6,
    "user": "kayween"
  },
  {
    "repo": "huggingface/optimum",
    "number": 442,
    "title": "Add support for ORTModelForObjectDetection",
    "body": "### Feature request\n\nHi, I went through optimum's code base and could not find support for object detection models. Is there plan to add ORTModelForObjectDetection just like ORTModelForImageClassification exists? Would be great to have this feature.\r\n\r\nObject detection task is also supported as part of transformers `pipeline` feature so I guess it should be possible to support this as part of optimum?\n\n### Motivation\n\nI want to leverage onnx support for YOLOS model \n\n### Your contribution\n\nI would be happy to help in adding support for this feature if someone can guide me. ",
    "url": "https://github.com/huggingface/optimum/issues/442",
    "state": "open",
    "labels": [
      "onnxruntime",
      "onnx"
    ],
    "created_at": "2022-10-31T19:59:21Z",
    "updated_at": "2025-12-05T10:42:26Z",
    "comments": 9,
    "user": "shivalikasingh95"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 88073,
    "title": "How to export pytorch model to onnx, with input of List[Tuple[Tensor,Tensor]] and output of List[Tuple[Tensor,Tensor]]",
    "body": "I have no idea how to export this model to onnx. One of the inputs for this model accepts a list of uncertain tuple, each of which contains 2 tensor with size of (2, 1024). This model also returns a list of tuple of two tensors(2, 1024).\r\n\r\nHow can I export it? I've already searched in pytorch community, but most of the issues have no replies.\r\n\r\n## Code example\r\n\r\nstate[in] is a list, and state[out] is also a list.\r\n\r\nmodel definition\r\n```python\r\nclass Module(nn.Module):\r\n    ...\r\n    def forward(self, enc_out, enc_mask, tgt_seq,\r\n               state: Optional[List[Tuple[torch.Tensor, torch.Tensor]]] = None,\r\n               bias_embedding: Optional[torch.Tensor] = None):\r\n        if state is not None:\r\n            hid = list()\r\n            cell = list()\r\n            for h, c in state:\r\n                hid.append(h)\r\n                cell.append(c)\r\n            state_in = (torch.stack(hid, dim=1), torch.stack(cell, dim=1))\r\n        else:\r\n            state_in = None\r\n        logit, attn, state_out = self.decoder(tgt_seq, enc_out, enc_mask, state_in,\r\n                                              bias_embedding=bias_embedding)\r\n        hid, cell = state_out\r\n        state = [(hid[:, j, :], cell[:, j, :]) for j in range(logit.size(0))]\r\n        logit = logit[:, -1, :].squeeze(1)\r\n        return torch.log_softmax(logit, -1), attn, state\r\n```\r\n\r\nmodel export\r\n```python\r\n    input_names = [\"enc_out\", \"enc_mask\", \"tgt_seq\", \"cache_state\", \"bias_embedding\"]\r\n    output_names = [\"dec_out\", \"attn\", \"state\"]\r\n    dynamic_axes = {\r\n        \"enc_out\": {0: \"batch_size\", 1: \"enc_out_len\"},\r\n        \"enc_mask\": {0: \"batch_size\", 1: \"enc_out_len\"},\r\n        \"tgt_seq\": {0: \"batch_size\"},\r\n        \"dec_out\": {0: \"batch_size\"},\r\n        \"attn\": {0: \"batch_size\", 3: \"enc_out_len\"},\r\n        \"state\": {1: \"batch_size\"},\r\n    }\r\n    torch.onnx.export(\r\n        model,\r\n        (enc_out, enc_mask, tgt_seq, cache_state, bias_embedding),\r\n        \"decoder.onnx\",\r\n        export_params=True,\r\n        opset_version=13,\r\n        do_constant_folding=True,\r\n        input_names=input_names,\r\n        output_names=output_names,\r\n        dynamic_axes=dynamic_axes\r\n    )\r\n```",
    "url": "https://github.com/pytorch/pytorch/issues/88073",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged",
      "onnx-triaged",
      "onnx-needs-info"
    ],
    "created_at": "2022-10-31T08:22:16Z",
    "updated_at": "2022-11-22T06:07:07Z",
    "user": "yszhou2019"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 2105,
    "title": "training fail ",
    "body": "image https://docs.nvidia.com/deeplearning/tensorrt/container-release-notes/index.html?from=groupmessage\r\n\r\nI train my model with ngc docker.\r\nSometime I train the network (like yolov7 ) , it will let linux disconect and reboot . \r\nHow can I debug it to find cause root?\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/2105",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-30T04:10:22Z",
    "updated_at": "2022-11-14T20:50:47Z",
    "user": "alicera"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1057,
    "title": "Installing functorch breaks torchaudio",
    "body": "I'm following along with [this](https://colab.research.google.com/drive/1GNfb01W_xf8JRu78ZKoNnLqiwcrJrbYG#scrollTo=nBj3vMvIhD9t) colab from the [functorch installation docs](https://pytorch.org/functorch/stable/install.html#colab).\r\n\r\nAfter installing and restarting, when I try to import `torchaudio`, the runtime crashes.  At first, I got this error:\r\n\r\n```python\r\nOSError: /usr/local/lib/python3.7/dist-packages/torchaudio/lib/libtorchaudio.so: undefined symbol: _ZN2at4_ops7resize_4callERKNS_6TensorEN3c108ArrayRefIlEENS5_8optionalINS5_12MemoryFormatEEE\r\n```\r\n\r\nNow, I'm just getting the runtime crashing with no visible error.\r\n\r\nI know functorch was merged into pytorch proper, but I don't see any instructions about how to use it from there.  Would that fix the issue?  If so, should the main docs be updated?",
    "url": "https://github.com/pytorch/functorch/issues/1057",
    "state": "closed",
    "labels": [
      "actionable"
    ],
    "created_at": "2022-10-28T18:16:13Z",
    "updated_at": "2022-12-09T18:59:35Z",
    "comments": 11,
    "user": "dellis23"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 87862,
    "title": "torch.where: `out` kwarg support is undocumented",
    "body": "### \ud83d\udcda The doc issue\r\n\r\nhttps://pytorch.org/docs/stable/generated/torch.where.html doesn't mention anything about `out` kwarg support.\r\n\r\n\r\n\r\nRef:\r\nhttps://github.com/pytorch/pytorch/blob/aaba0bd30641c56db1dc0550b81fbc458db46276/aten/src/ATen/native/native_functions.yaml#L5653\r\n\r\nEg.\r\n```python\r\n>>> torch.where(x < 0, x, -x, out=x)\r\ntensor([-0.6862, -0.6860, -1.4944])\r\n```\r\n\r\n### Suggest a potential alternative/fix\r\n\r\n_No response_\n\ncc @svekars @carljparker",
    "url": "https://github.com/pytorch/pytorch/issues/87862",
    "state": "closed",
    "labels": [
      "module: docs",
      "good first issue",
      "actionable"
    ],
    "created_at": "2022-10-27T14:50:44Z",
    "updated_at": "2022-10-27T21:03:47Z",
    "user": "kshitij12345"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 87789,
    "title": "Any ideas on how we can convert a model from huggingface (transformers library )to tensorflow lite?",
    "body": "### \ud83d\udc1b Describe the bug\n\nI want to convert CamembertQuestionAnsewring model to tensoflow lite, i download it from huggingface platform, because when i want to save the model locally it gives me the model with 'bin' format.   \r\ni'm asking here because huggingface use pytorch pretrained models.\r\n\r\n- when i try to convert the model it gives me this error : AttributeError: 'CamembertForQuestionAnswering' object has no attribute 'call' by using tf_model.h5 file. \r\n- Also i can't load it using : tf.keras.models.load_model() it gives me : ValueError: No model config found in the file at <tensorflow.python.platform.gfile.GFile object at 0x7f27cceb1810>.\r\n- when i want to save the transformers model locally it gives me the model with 'bin' format, so i download it from the platform.\n\n### Versions\n\nhttps://huggingface.co/etalab-ia/camembert-base-squadFR-fquad-piaf?context=Etalab+est+une+administration+publique+fran%C3%A7aise+qui+fait+notamment+office+de+Chief+Data+Officer+de+l%27%C3%89tat+et+coordonne+la+conception+et+la+mise+en+%C5%93uvre+de+sa+strat%C3%A9gie+dans+le+domaine+de+la+donn%C3%A9e+%28ouverture+et+partage+des+donn%C3%A9es+publiques+ou+open+data%2C+exploitation+des+donn%C3%A9es+et+intelligence+artificielle...%29.+Ainsi%2C+Etalab+d%C3%A9veloppe+et+maintient+le+portail+des+donn%C3%A9es+ouvertes+du+gouvernement+fran%C3%A7ais+data.gouv.fr.+Etalab+promeut+%C3%A9galement+une+plus+grande+ouverture+l%27administration+sur+la+soci%C3%A9t%C3%A9+%28gouvernement+ouvert%29+%3A+transparence+de+l%27action+publique%2C+innovation+ouverte%2C+participation+citoyenne...+elle+promeut+l%E2%80%99innovation%2C+l%E2%80%99exp%C3%A9rimentation%2C+les+m%C3%A9thodes+de+travail+ouvertes%2C+agiles+et+it%C3%A9ratives%2C+ainsi+que+les+synergies+avec+la+soci%C3%A9t%C3%A9+civile+pour+d%C3%A9cloisonner+l%E2%80%99administration+et+favoriser+l%E2%80%99adoption+des+meilleures+pratiques+professionnelles+dans+le+domaine+du+num%C3%A9rique.+%C3%80+ce+titre+elle+%C3%A9tudie+notamment+l%E2%80%99opportunit%C3%A9+de+recourir+%C3%A0+des+technologies+en+voie+de+maturation+issues+du+monde+de+la+recherche.+Cette+entit%C3%A9+charg%C3%A9e+de+l%27innovation+au+sein+de+l%27administration+doit+contribuer+%C3%A0+l%27am%C3%A9lioration+du+service+public+gr%C3%A2ce+au+num%C3%A9rique.+Elle+est+rattach%C3%A9e+%C3%A0+la+Direction+interminist%C3%A9rielle+du+num%C3%A9rique%2C+dont+les+missions+et+l%E2%80%99organisation+ont+%C3%A9t%C3%A9+fix%C3%A9es+par+le+d%C3%A9cret+du+30+octobre+2019.%E2%80%89+Dirig%C3%A9+par+Laure+Lucchesi+depuis+2016%2C+elle+rassemble+une+%C3%A9quipe+pluridisciplinaire+d%27une+trentaine+de+personnes.&question=Comment+s%27appelle+le+portail+open+data+du+gouvernement+%3F",
    "url": "https://github.com/pytorch/pytorch/issues/87789",
    "state": "closed",
    "labels": [],
    "created_at": "2022-10-26T16:00:34Z",
    "updated_at": "2022-10-27T05:40:57Z",
    "user": "BENSAFOUAN-Abdelhalim"
  },
  {
    "repo": "huggingface/setfit",
    "number": 126,
    "title": "Does num_iterations create duplicate data?",
    "body": "I am trying to get a better understanding behind this hyperparam. As far as I understand, you are iterating over the data `num_iterations` times and create a positive and negative pair by sampling. Could this result in duplicate data?\r\n\r\nAlso sometimes it tends to result in more examples than potential pairs for example in `imdb` for 3 shot there are 6 examples, 2 per class. Setting `num_iterations` to 5 creates 6 (examples) * 2 (1 positive + 1 negative) * 5 (num_iterations) = 60 examples. The possible combinations though are 6*6/2-6 = 12, essentially half of the matrix of all pairs without the diagonal.\r\n\r\nIf the above is correct it seems that its like running training for multiple epochs. Is that right? If so, why are you not creating all pairs instead and keep the `epochs` hyperparam as is which might be more intuitive. If you want a way to sample less data, why not introduce a `sample_size` to cap those combinations to a lesser number for experimentation?",
    "url": "https://github.com/huggingface/setfit/issues/126",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-26T13:09:52Z",
    "updated_at": "2022-12-20T09:10:53Z",
    "user": "nsorros"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5157,
    "title": "Consistent caching between python and jupyter",
    "body": "### Feature request\n\nI hope this is not my mistake, currently if I use `load_dataset` from a python session on a custom dataset to do the preprocessing, it will be saved in the cache and in other python sessions it will be loaded from the cache, however calling the same from a jupyter notebook does not work, meaning the preprocessing starts from scratch.\r\n\r\nIf adjusting the hashes is impossible, is there a way to manually set dataset fingerprint to \"force\" this behaviour?\n\n### Motivation\n\nIf this is not already the case and I am doing something wrong, it would be useful to have the two fingerprints consistent so one can create the dataset once and then try small things on jupyter without preprocessing everything again.\r\n\n\n### Your contribution\n\nI am happy to try a PR if you give me some pointers where the changes should happen",
    "url": "https://github.com/huggingface/datasets/issues/5157",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-10-25T01:34:33Z",
    "updated_at": "2022-11-02T15:43:22Z",
    "comments": 2,
    "user": "gpucce"
  },
  {
    "repo": "huggingface/setfit",
    "number": 120,
    "title": "Using SetFit Embeddings for Semantic Search?",
    "body": "Hi,\r\n\r\nI was wondering if the semantic search would improve if one would train a multilabel-classification model and use those embeddings?\r\n\r\nAfter training a binary classification model I have seen that the embeddings between similar topics on `all-MiniLM-L12-v2` vs `all-MiniLM-L12-v2-setfit` (fitted model) are very close in fitted model which makes sense for me. \r\n\r\n```python\r\n# Cosine Similarity\r\ndef get_cosine_similarity(vector1, vector2):\r\n  sim = 1 - spatial.distance.cosine(vector1, vector2)\r\n  return sim\r\n\r\nword_1 = \"acne\"\r\nword_2 = \"red skin\"\r\n\r\nemb_fit_1 = model.model_body.encode([word_1])\r\nemb_fit_2 = model.model_body.encode([word_2])\r\n\r\nemb_base_1 = model_sbert.encode([word_1])\r\nemb_base_2 = model_sbert.encode([word_2])\r\n\r\nprint(f\"{word_1} vs {word_2} (base)\", get_cosine_similarity(emb_base_1, emb_base_2))\r\nprint(f\"{word_1} vs {word_2} (fit)\", get_cosine_similarity(emb_fit_1, emb_fit_2))\r\n```\r\n\r\n```\r\nacne vs pimple (base) 0.5959747433662415\r\nacne vs pimple (fit) 0.9996786117553711\r\n\r\nacne vs red skin (base) 0.36421263217926025\r\nacne vs red skin (fit) 0.9994498491287231\r\n\r\nacne vs red car (base) 0.17558744549751282\r\nacne vs red car (fit) 0.0051751588471233845\r\n```\r\n\r\nI would assume that if the model is trained on multi-label-classification task the embeddings would somehow clustered based on the labels which are provided during training. Would that improve the semantic search if enough labels are provided during training?\r\n\r\nOf course I could train a model and test it but maybe you have done similar tests and already know if it's working or not :-)\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/setfit/issues/120",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-25T00:00:03Z",
    "updated_at": "2024-07-12T02:02:04Z",
    "user": "Raidus"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 87564,
    "title": "Meta impl for pirms.where is incorrect",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\n```\r\ndevice = \"meta\"\r\n\r\npred = torch.randn(5, 5, device=device) > 0\r\na = torch.rand(5, 5, device=device).t()\r\nout = torch.where(pred, a, 0)\r\n\r\nprint(\"pred.stride()\", pred.stride())\r\nprint(\"a.stride()\", a.stride())\r\nprint(\"out.stride()\", out.stride()) \r\n\r\npred.stride() (5, 1)\r\na.stride() (1, 5)\r\nout.stride() (1, 5)\r\n```\r\nif I have device=\u201ccuda\u201d, the output is \r\n```\r\npred.stride() (5, 1)\r\na.stride() (1, 5)\r\nout.stride() (5, 1)\r\n```\r\n\r\n### Versions\r\n\r\nmaster\r\n\r\n\r\ncc @ezyang @mruberry @ngimel @Lezcano @fdrocha ",
    "url": "https://github.com/pytorch/pytorch/issues/87564",
    "state": "closed",
    "labels": [
      "triaged",
      "module: primTorch",
      "module: decompositions"
    ],
    "created_at": "2022-10-23T01:15:28Z",
    "updated_at": "2022-10-26T00:48:07Z",
    "user": "SherlockNoMad"
  },
  {
    "repo": "huggingface/setfit",
    "number": 119,
    "title": "Using SetFit for regression tasks?",
    "body": "I was curious about using SetFit for ordinal Likert scale outcomes (ie IMDB movie reviews). It doesn't seem like an obvious option in the SetFit API. Has anyone tried using SetFit for regression tasks?",
    "url": "https://github.com/huggingface/setfit/issues/119",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-21T19:15:29Z",
    "updated_at": "2023-02-01T16:48:33Z",
    "user": "ericlinML"
  },
  {
    "repo": "pytorch/data",
    "number": 848,
    "title": "[RFC] Verify that the docs contain working code and self-contained examples using doctest",
    "body": "### \ud83d\ude80 The feature\r\n\r\nCurrently there does not seem to be an automatic way to verify that the examples in the documentation are actually working. This leads to issues like (https://github.com/pytorch/data/issues/433).\r\n\r\nAn example should also be complete enough so that developers can easily try out the code.\r\n\r\nA solution could be to use the sphinx doctest extension to test the documentation before building it. Docstrings can be continuously migrated from standard reST doctests to test code that runs using the sphinx doctest extension.\r\n\r\n### Motivation, pitch\r\n\r\nWorking examples that are up-to-date boost adoption of the library and make it easier for developers to become proficient in using the library.\r\n\r\nTherefore one could consider using doctest in order to be forced to write self-contained examples that execute without error.\r\n\r\n### Alternatives\r\n\r\nDoctests can be executed in different ways:\r\n\r\n-   Invoking plain python to execute the doctests as described [here](https://docs.python.org/3/library/doctest.html)\r\n-   Using [pytest --doctest](https://docs.pytest.org/en/7.1.x/how-to/doctest.html) to execute the tests\r\n-   Run within the documentation build process as `cd docs && make doctest`\r\n\r\nI would recommend running the doctests while building the documentation using sphinx because it is easy to continuously\r\nmigrate the existing non-tested example code to code being tested.\r\n\r\n\r\n### Additional context\r\n\r\nA minimal example of the RFC can be found\r\n[here](https://github.com/pytorch/data/pull/850). Please\r\nnote that the code is only meant as an example for discussion and might not (yet) meet the quality criteria of a PR.\r\n\r\nThe example implementation consists of the following parts:\r\n\r\n-   An updated `docs/Makefile` with a `doctest` target\r\n-   Enabling the sphinx extension `sphinx.ext.doctest` in `docs/source/conf.py`\r\n-   A minimal example of an updated docstring in `torchdata/dataloader2/adapter.py`\r\n-   Adding the `doctest` step to the CI in `.github/workflows/_build_test_upload.yml`\r\n\r\nThe tests can be executed like this: `cd docs && make doctest`.\r\n",
    "url": "https://github.com/meta-pytorch/data/issues/848",
    "state": "closed",
    "labels": [
      "documentation",
      "Better Engineering"
    ],
    "created_at": "2022-10-21T14:45:36Z",
    "updated_at": "2022-10-27T20:55:48Z",
    "comments": 1,
    "user": "mathiasburger"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 614,
    "title": "[feat req] Alphabetical ordering for splits in dataset viewer",
    "body": "### Link\n\nhttps://huggingface.co/datasets/mozilla-foundation/common_voice_11_0\n\n### Description\n\nCurrently, the datasets splits for the viewer are displayed in a seemingly random order, see example for [Common Voice 11](https://huggingface.co/datasets/mozilla-foundation/common_voice_11_0):\r\n<img width=\"1505\" alt=\"Screenshot 2022-10-21 at 14 04 39\" src=\"https://user-images.githubusercontent.com/93869735/197192381-46ca4041-db69-423e-be55-abf96e70167a.png\">\r\n\r\nIt would be easier to traverse the list of possible splits if they were arranged alphabetically!\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/614",
    "state": "closed",
    "labels": [
      "question",
      "feature request"
    ],
    "created_at": "2022-10-21T12:11:00Z",
    "updated_at": "2022-10-26T09:48:29Z",
    "user": "sanchit-gandhi"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5144,
    "title": "Inconsistent documentation on map remove_columns",
    "body": "### Describe the bug\r\n\r\nThe page [process](https://huggingface.co/docs/datasets/process) says this about the parameter `remove_columns` of the function `map`:\r\nWhen you remove a column, it is only removed after the example has been provided to the mapped function.\r\n\r\nSo it seems that the `remove_columns` parameter removes after the mapped functions.\r\n\r\nHowever, another page, [the documentation of the function map](https://huggingface.co/docs/datasets/v2.6.1/en/package_reference/main_classes#datasets.Dataset.map.remove_columns) says:\r\nColumns will be removed before updating the examples with the output of `function`, i.e. if `function` is adding columns with names in remove_columns, these columns will be kept.\r\n\r\nSo one page says \"after the mapped function\" and another says \"before the mapped function.\"\r\nIs there something wrong?\r\n\r\n\r\n### Steps to reproduce the bug\r\n\r\nNot about code.\r\n\r\n### Expected behavior\r\n\r\nconsistent about the descriptions of the behavior of the parameter `remove_columns` in the function `map`.\r\n\r\n### Environment info\r\n\r\ndatasets V2.6.0",
    "url": "https://github.com/huggingface/datasets/issues/5144",
    "state": "closed",
    "labels": [
      "documentation",
      "duplicate",
      "good first issue",
      "hacktoberfest"
    ],
    "created_at": "2022-10-21T08:37:53Z",
    "updated_at": "2022-11-15T14:15:10Z",
    "comments": 3,
    "user": "zhaowei-wang-nlp"
  },
  {
    "repo": "huggingface/setfit",
    "number": 117,
    "title": "Using this for code gen?",
    "body": "Can we use this for code generation?",
    "url": "https://github.com/huggingface/setfit/issues/117",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-20T16:53:59Z",
    "updated_at": "2022-12-20T09:32:50Z",
    "user": "krrishdholakia"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5143,
    "title": "DownloadManager Git LFS support",
    "body": "### Feature request\n\nMaybe I'm mistaken but the `DownloadManager` does not support extracting git lfs files out of the box right?\r\nUsing `dl_manager.download()` or `dl_manager.download_and_extract()` still returns lfs files afaict. \r\n\r\nIs there a good way to write a dataset loading script for a repo with lfs files?\n\n### Motivation\n\n/\n\n### Your contribution\n\n/",
    "url": "https://github.com/huggingface/datasets/issues/5143",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-10-20T15:29:29Z",
    "updated_at": "2022-10-20T17:17:10Z",
    "comments": 2,
    "user": "Muennighoff"
  },
  {
    "repo": "huggingface/setfit",
    "number": 116,
    "title": "How to take advantage of Mac M1 GPUs?",
    "body": "More than an issue, this is a request for help.\r\n\r\nDo you have advice on how to take advantage of the Mac M1 Pro GPU for training a model, assuming the underlying Torch implementation provides support?\r\n\r\nThere are some tutorials on how to use Torch with the MPS driver, but I'm not sure how to signal SetFit to use a specific GPU.\r\n",
    "url": "https://github.com/huggingface/setfit/issues/116",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-20T08:43:24Z",
    "updated_at": "2024-01-29T16:58:04Z",
    "user": "secastro"
  },
  {
    "repo": "huggingface/setfit",
    "number": 115,
    "title": "How many samples for setfit?",
    "body": "I understood that setfit is a light weight solution for few shot learning. Two questions came up:\r\n.) What would be a number of samples of class you would switch to standard supervised learning and fine-tuning? E.g. 100 samples?\r\n.) Is there any disadvantage of generating too many pairs (num_iterations) If I have 30 classes, wouldnt be the default of 20 too small to learn meaningful embeddings?",
    "url": "https://github.com/huggingface/setfit/issues/115",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-20T06:13:41Z",
    "updated_at": "2023-02-27T10:52:50Z",
    "user": "hanshupe"
  },
  {
    "repo": "huggingface/optimum",
    "number": 424,
    "title": "Convert Seq2Seq model to ONNX while splitting encoder-decoder. ",
    "body": "Hi guys, I've recently been trying to convert my trained BART model to onnx. I've found that when using `transformers.onnx` from transformers, the resulting onnx file is a singular `.onnx` file. However, when using `ORTModelForSequenceClassification.from_pretrained()` and then saving the result I have three files, encoder, decoder and decoder-with-past. I want to use the pipeline provided by optimum for inference, but I am unable to convert my PyTorch trained BART model directly into the three different models.\r\n\r\nIs there any way I could do this? Thanks. ",
    "url": "https://github.com/huggingface/optimum/issues/424",
    "state": "closed",
    "labels": [
      "question",
      "onnxruntime"
    ],
    "created_at": "2022-10-19T09:17:50Z",
    "updated_at": "2022-10-20T01:29:30Z",
    "user": "ZiyueWangUoB"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5135,
    "title": "Update docs once dataset scripts transferred to the Hub",
    "body": "## Describe the bug\r\nAs discussed in:\r\n- https://github.com/huggingface/hub-docs/pull/423#pullrequestreview-1146083701\r\n\r\nwe should update our docs once dataset scripts have been transferred to the Hub (and removed from GitHub):\r\n- #4974\r\n\r\nConcretely:\r\n- [x] Datasets on GitHub (legacy): https://huggingface.co/docs/datasets/main/en/share#datasets-on-github-legacy\r\n- [x] ADD_NEW_DATASET: https://github.com/huggingface/datasets/blob/main/ADD_NEW_DATASET.md\r\n- ...\r\n\r\nThis PR complements the work of:\r\n- #5067\r\n\r\nThis PR is a follow-up of PRs:\r\n- #3777\r\n\r\nCC: @julien-c ",
    "url": "https://github.com/huggingface/datasets/issues/5135",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-10-19T06:58:19Z",
    "updated_at": "2022-10-20T08:10:01Z",
    "comments": 0,
    "user": "albertvillanova"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 771,
    "title": "What is the best practice to do inference in bf16 with accelerate during training?",
    "body": "### System Info\n\n```Shell\nBasically, I want to do training with mixed precision and evaluate the model with bfloat16.\r\nI found the model is stored in fp32 after calling acclerate.prepare() and have to convert it to bf16 for faster inference. Can I avoid `explictly` model conversion and  make the most use of accelerate?\n```\n\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n,\n\n### Expected behavior\n\n```Shell\nIdeally, we do not want manually model conversion.\n```\n",
    "url": "https://github.com/huggingface/accelerate/issues/771",
    "state": "closed",
    "labels": [],
    "created_at": "2022-10-18T13:15:39Z",
    "updated_at": "2022-10-18T13:32:02Z",
    "user": "huchinlp"
  },
  {
    "repo": "huggingface/setfit",
    "number": 110,
    "title": "more metrics addition (i.e f1score, precision ) in the trainer.evaluate()",
    "body": "was just checking the code and saw only accuracy as a metrics, are we planning to add more metrics?",
    "url": "https://github.com/huggingface/setfit/issues/110",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-18T11:03:18Z",
    "updated_at": "2023-06-26T14:49:05Z",
    "user": "snayan06"
  },
  {
    "repo": "huggingface/setfit",
    "number": 108,
    "title": "Are checkpoints directly available with the SetFitTrainer?",
    "body": "Hi, just looking to see if checkpoints are implemented with the SetFitTrainer. Couldn't find it, unlike how the normal models in Hugging Face use `output_dir` for saving checkpoints when training a model.",
    "url": "https://github.com/huggingface/setfit/issues/108",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-17T18:46:13Z",
    "updated_at": "2022-12-20T09:34:41Z",
    "user": "ajmcgrail"
  },
  {
    "repo": "pytorch/vision",
    "number": 6779,
    "title": "How do you put a LibTorch (C++) torch::nn::Module on the CUDA device?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI get an error when I try to put a `torch::nn::Module` on the CUDA device. How do I put the model on the CUDA device?\r\n\r\n```\r\n#include <torch/torch.h>\r\nusing namespace torch::indexing;\r\ntorch::Device device(torch::kCUDA);\r\n\r\nstruct Critic_Net : torch::nn::Module {\r\n    torch::Tensor next_state_batch__sampled_action;\r\n    public:\r\n    Critic_Net() {\r\n        lin1 = torch::nn::Linear(427, 42);\r\n        lin2 = torch::nn::Linear(42, 286);\r\n        lin3 = torch::nn::Linear(286, 1);\r\n    }\r\n    torch::Tensor forward(torch::Tensor next_state_batch__sampled_action) {\r\n        auto h = next_state_batch__sampled_action;\r\n        h = torch::relu(lin1->forward(h));\r\n        h = torch::tanh(lin2->forward(h));\r\n        h = lin3->forward(h);\r\n        return torch::nan_to_num(h);\r\n    }\r\n    torch::nn::Linear lin1{nullptr}, lin2{nullptr}, lin3{nullptr};\r\n};\r\n```\r\n\r\nI have tried putting it on the CUDA device like so  \r\n`auto critic = Critic_Net();`  \r\n`critic->to(device);`\r\n\r\nThis causes `/home/iii/tor/m_gym/multiv_normal.cpp:190:1: error: \u2018critic\u2019 does not name a type\r\n  190 | critic->to(device);\r\n      | ^~~~~~`  \r\n\r\nI have actually tried to put `->to(device);` behind almost everything everywhere the model shows up and I get these errors.  \r\n\r\nI've also tried using `auto critic = torch::jit::load(critic, device);` after [reading this](https://discuss.pytorch.org/t/how-to-load-model-on-specific-device-in-libtorch/94416).  \r\nI get this error. \r\nIs putting a model on CUDA possible with `torch::jit::load`? I think this \"model\" is the kind that is saved on a disk and not the kind that is an nn::Module. \r\n\r\n```\r\n error: no matching function for call to \u2018load(Critic_Net&, c10::Device&)\u2019\r\n  186 | auto critico = torch::jit::load(critic, device);\r\n      |                ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~\r\nIn file included from /home/iii/tor/m_gym/libtorch/include/torch/script.h:9,\r\n                 from /home/iii/tor/m_gym/multiv_normal.cpp:2:\r\n/home/iii/tor/m_gym/libtorch/include/torch/csrc/jit/serialization/import.h:66:1: note: candidate: \u2018torch::jit::Module torch::jit::load(std::istream&, c10::optional<c10::Device>)\u2019\r\n   66 | load(std::istream& in, c10::optional<c10::Device> device = c10::nullopt);\r\n      | ^~~~\r\n/home/iii/tor/m_gym/libtorch/include/torch/csrc/jit/serialization/import.h:66:20: note:   no known conversion for argument 1 from \u2018Critic_Net\u2019 to \u2018std::istream&\u2019 {aka \u2018std::basic_istream<char>&\u2019}\r\n   66 | load(std::istream& in, c10::optional<c10::Device> device = c10::nullopt);\r\n      |      ~~~~~~~~~~~~~~^~\r\n/home/iii/tor/m_gym/libtorch/include/torch/csrc/jit/serialization/import.h:68:18: note: candidate: \u2018torch::jit::Module torch::jit::load(std::istream&, c10::optional<c10::Device>, torch::jit::ExtraFilesMap&)\u2019\r\n   68 | TORCH_API Module load(\r\n      |                  ^~~~\r\n/home/iii/tor/m_gym/libtorch/include/torch/csrc/jit/serialization/import.h:68:18: note:   candidate expects 3 arguments, 2 provided\r\n/home/iii/tor/m_gym/libtorch/include/torch/csrc/jit/serialization/import.h:78:18: note: candidate: \u2018torch::jit::Module torch::jit::load(const string&, c10::optional<c10::Device>)\u2019\r\n   78 | TORCH_API Module load(\r\n      |                  ^~~~\r\n/home/iii/tor/m_gym/libtorch/include/torch/csrc/jit/serialization/import.h:79:24: note:   no known conversion for argument 1 from \u2018Critic_Net\u2019 to \u2018const string&\u2019 {aka \u2018const std::basic_string<char>&\u2019}\r\n   79 |     const std::string& filename,\r\n```\r\n \r\n\r\n\r\n\r\n\r\n### Versions\r\n\r\nThis is my LibTorch version,  1.12.1+cu116  \r\n\r\nI don't have any problems putting a tensor on the CUDA device and I assume I would not have a problem putting a simpler model on the CUDA device. The issue is the question of where to point this large nn::Module struct to the CUDA device.",
    "url": "https://github.com/pytorch/vision/issues/6779",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-16T23:36:15Z",
    "updated_at": "2022-10-17T14:52:20Z",
    "user": "MotorCityCobra"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5118,
    "title": "Installing `datasets` on M1 computers",
    "body": "## Describe the bug\r\nI wanted to install `datasets` dependencies on my M1 (in order to start contributing to the project). However, I got an error regarding `tensorflow`.\r\n\r\nOn M1, `tensorflow-macos` needs to be installed instead. Can we add a conditional requirement, so that `tensorflow-macos` would be installed on M1?\r\n\r\n## Steps to reproduce the bug\r\nFresh clone this project (on m1), create a virtualenv and run this:\r\n```python\r\npip install -e \".[dev]\"\r\n```\r\n\r\n## Expected results\r\nInstallation should be smooth, and all the dependencies should be installed on M1.\r\n\r\n## Actual results\r\nYou should receive an error, saying pip couldn't find a version that matches this pattern:\r\n```\r\ntensorflow>=2.3,!=2.6.0,!=2.6.1\r\n```\r\n\r\n## Environment info\r\n<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->\r\n- `datasets` version: 2.6.2.dev0\r\n- Platform: macOS-12.6-arm64-arm-64bit\r\n- Python version: 3.9.6\r\n- PyArrow version: 7.0.0\r\n- Pandas version: 1.5.0\r\n\r\n",
    "url": "https://github.com/huggingface/datasets/issues/5118",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-10-16T16:50:08Z",
    "updated_at": "2022-10-19T09:10:08Z",
    "comments": 1,
    "user": "david1542"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 87029,
    "title": "how to add adaptive_max_pool2d_backward_cuda does not have a deterministic implementation, but you set 'torch.use_deterministic_algorithms(True)'",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\ni have added attention mechanism to yolov5 repo, while doing the training I'm getting this issue , how can I solve this error?\r\n\r\nerror\r\n\r\ni tried to train model using yolov5 command ,& i used C3CBAM attention mechanism , & I'm getting this error\r\n\r\n```\r\n!python train.py --img 640 --batch 16 --cfg /content/yolov5/models/yolov5s.yaml --epochs 250 --data coco128.yaml --weights yolov5s.pt --cache\r\n\r\n```\r\n\r\n<img width=\"359\" alt=\"image\" src=\"https://user-images.githubusercontent.com/62583018/196018476-062b6719-2804-4e86-a8c9-c12550a244a5.png\">\r\n\r\n\r\n````\r\nEpoch    GPU_mem   box_loss   obj_loss   cls_loss  Instances       Size\r\n  0% 0/8 [00:00<?, ?it/s]\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 637, in <module>\r\n    main(opt)\r\n  File \"train.py\", line 531, in main\r\n    train(opt.hyp, opt, device, callbacks)\r\n  File \"train.py\", line 320, in train\r\n    scaler.scale(loss).backward()\r\n  File \"/usr/local/lib/python3.7/dist-packages/torch/_tensor.py\", line 396, in backward\r\n    torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)\r\n  File \"/usr/local/lib/python3.7/dist-packages/torch/autograd/__init__.py\", line 175, in backward\r\n    allow_unreachable=True, accumulate_grad=True)  # Calls into the C++ engine to run the backward pass\r\nRuntimeError: adaptive_max_pool2d_backward_cuda does not have a deterministic implementation, but you set 'torch.use_deterministic_algorithms(True)'. You can turn off determinism just for this operation, or you can use the 'warn_only=True' option, if that's acceptable for your application. You can also file an issue at https://github.com/pytorch/pytorch/issues to help us prioritize adding deterministic support for this operation.\r\n```",
    "url": "https://github.com/pytorch/pytorch/issues/87029",
    "state": "closed",
    "labels": [],
    "created_at": "2022-10-16T04:37:56Z",
    "updated_at": "2022-10-16T05:17:15Z",
    "user": "akashAD98"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 87027,
    "title": "how to add adaptive_max_pool2d_backward_cuda does not have a deterministic implementation, but you set 'torch.use_deterministic_algorithms(True)'.",
    "body": "\r\nI'm adding an attention mechanism on yolov5 to train my model, I  added C3CBAM ,& im getting this issue, what should I need to do to solve this issue?\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/87027",
    "state": "closed",
    "labels": [],
    "created_at": "2022-10-16T04:01:06Z",
    "updated_at": "2022-10-16T04:33:34Z",
    "user": "akashAD98"
  },
  {
    "repo": "huggingface/setfit",
    "number": 106,
    "title": "Function to get probability values of predicted output (like sklearn's predict_proba)?",
    "body": "Hi! I wanted to ask if there was an in-built function to get the probability value of predicted output from a classification task, something like predict_proba() from sklearn?\r\n\r\nFrom what i understand currently the only way to get output is to run SetFitModel([text]), which works similar to sklearn predict().",
    "url": "https://github.com/huggingface/setfit/issues/106",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-14T13:45:26Z",
    "updated_at": "2022-12-20T09:34:57Z",
    "user": "a-sharma123"
  },
  {
    "repo": "pytorch/data",
    "number": 831,
    "title": "document of parameter buffer_size in MaxTokenBucketizer is wrong",
    "body": "According to the document [MaxTokenBucketizer](https://pytorch.org/data/main/generated/torchdata.datapipes.iter.MaxTokenBucketizer.html#torchdata.datapipes.iter.MaxTokenBucketizer)\r\nbuffer_size \u2013 This restricts how many **tokens** are taken from prior DataPipe to bucketize\r\n\r\nHowever, in the code, [bucketbatcher.py#L277](https://github.com/pytorch/data/blob/84587ff57575fd47fcae61635a3f4ffc1e639941/torchdata/datapipes/iter/transform/bucketbatcher.py#L277)\r\nThe unit of buffer_size is **sample** not **token**",
    "url": "https://github.com/meta-pytorch/data/issues/831",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-10-14T08:41:20Z",
    "updated_at": "2022-10-17T17:36:48Z",
    "comments": 1,
    "user": "ling0322"
  },
  {
    "repo": "pytorch/tensorpipe",
    "number": 457,
    "title": "Question: how to disable IB at runtime?",
    "body": "I wonder if there is an environment variable like `NCCL_IB_DISABLE` in NCCL so that I can disable IB at runtime. \r\n\r\nThanks!",
    "url": "https://github.com/pytorch/tensorpipe/issues/457",
    "state": "open",
    "labels": [],
    "created_at": "2022-10-14T02:22:23Z",
    "updated_at": "2022-10-14T09:49:57Z",
    "user": "jasperzhong"
  },
  {
    "repo": "pytorch/examples",
    "number": 1082,
    "title": "Query on loss calculation in word language model",
    "body": "In the main.py of word language model, I find that in the evaluate function the total_loss is getting multiplied by length of data\r\nhttps://github.com/pytorch/examples/blob/ca1bd9167f7216e087532160fc5b98643d53f87e/word_language_model/main.py#L163\r\n\r\nHowever in the train function, total_loss is not getting multiplied by length of data https://github.com/pytorch/examples/blob/ca1bd9167f7216e087532160fc5b98643d53f87e/word_language_model/main.py#L194\r\n\r\nIs this proper? ",
    "url": "https://github.com/pytorch/examples/issues/1082",
    "state": "open",
    "labels": [
      "help wanted"
    ],
    "created_at": "2022-10-14T01:23:15Z",
    "updated_at": "2022-10-17T21:31:55Z",
    "comments": 0,
    "user": "AvisP"
  },
  {
    "repo": "huggingface/transformers",
    "number": 19592,
    "title": "Sagemaker Estimator for fine tuning where all the transform code is in the train.py",
    "body": "### Feature request\n\nI work for a company that is a heavy user of AWS sagemaker.  I am on a professional services team where I build a lot of examples for our data scientists to follow.  I recently wanted to use the Sagemaker Huggingface estimator to fine tune a transformer and create a model for our custom NLP task.\r\n\r\nI had csv data in S3.  I found several examples of fine tuning that involved pulling nicely curated datasets from HF hub down to the SM notebook and then transforming it into arrow with `save_to_disk` and pushing it to S3 as a dataset that could be read in the train.py file.  \r\n\r\nI struggled mightily to find an example and never found a good example of how to start with just CSV files, use the HF existing tools load the data and then pass it to the estimator.  Furthermore, the examples I find have the user pulling the data over to the notebook and doing the conversion to arrow there.  That seems inefficient when the point of an estimator is to utilize a small instance to host your notebook and a large instance to do the work.  If I had a large amount of data to to convert to arrow and I followed the given examples, I would need a large notebook instance and a large estimator instance.  \r\n\r\nI wrote an example that puts all the transform code in the train.py and only invokes it from the notebook.  In my train.py, I use load_dataset with the csv script to transform the data to arrow and do the save and load there.  I wanted to use the arrow format for efficiency.  \r\n\r\nI propose that I update your documentation with this unique example.\n\n### Motivation\n\nI feel that the proposed documentation is unifies several previously documented concepts into a single, useful example.\n\n### Your contribution\n\nI would be happy to build the example and have you guys approve it.  I have never contributed to HF before, so I would need a bit of guidance to get started.",
    "url": "https://github.com/huggingface/transformers/issues/19592",
    "state": "closed",
    "labels": [],
    "created_at": "2022-10-13T19:24:14Z",
    "updated_at": "2022-11-21T15:02:11Z",
    "user": "j2cunningham"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1043,
    "title": "Is there a way to parallelize or accelerate a loop of column-by-column jvp?",
    "body": "Hi, experts.\r\nI am currently calculating a Jacobian column-by-column and calculating the squared sum of each column to calculate the Trace of the Jacobian.\r\nThe code looks something like this:\r\n\r\n```\r\ndef jvp_func(x, tgt):\r\n    return jvp(net, (x,), (tgt,))\r\n\r\ntr = 0\r\nfor j in range(x[0].shape[0]):\r\n    tgt = torch.zeros_like(x)\r\n    tgt[:, j] = 1.\r\n    _, grad = vmap(jvp_func)(x, tgt)\r\n    tr += torch.sum(grad * grad, dim=1)\r\n```\r\n\r\nAs you can see, my code calculates a batched Jacobian column by column (inside each j loop) and calculates the Trace.\r\n(motivated by this code: https://github.com/facebookresearch/jacobian_regularizer/blob/main/jacobian/jacobian.py)\r\nI am mainly doing this instead of calculating the entire Jacobian at once because the entire Jacobian is huge and it blows up the memory.\r\nHowever, this code is quite slow. I am not sure if this code is doing a lot of redundant computation, e.g., I wonder if net(x) is being calculated repetitively on each loop of j.\r\n\r\nIs there a way to parallelize the j loop, or at least remove any repetitive computation for each j loop to speed up the current code?\r\nI briefly looked at functorch.compile.ts_compile but was not able to make it work, and am not sure if that is something that can be helpful.\r\n\r\nAny suggestions will be highly appreciated!\r\n\r\nThank you,\r\nBest regards,\r\nKiwan",
    "url": "https://github.com/pytorch/functorch/issues/1043",
    "state": "open",
    "labels": [],
    "created_at": "2022-10-11T00:43:43Z",
    "updated_at": "2022-10-11T21:34:44Z",
    "comments": 3,
    "user": "kwmaeng91"
  },
  {
    "repo": "pytorch/torchx",
    "number": 611,
    "title": "Kubernetes: Support mounting secrets as a volume",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\n\r\n\r\nKubernetes has a concept of a secret that can be mounted as a volume to a pod. \r\nhttps://kubernetes.io/docs/concepts/configuration/secret/\r\n\r\n```\r\napiVersion: v1\r\nkind: Pod\r\nmetadata:\r\n  name: mypod\r\nspec:\r\n  containers:\r\n  - name: mypod\r\n    image: redis\r\n    volumeMounts:\r\n    - name: foo\r\n      mountPath: \"/etc/foo\"\r\n  volumes:\r\n  - name: foo\r\n    secret:\r\n      secretName: mysecret\r\n      defaultMode: 0400\r\n```\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\nWe can add a new bind mount type for secrets so a user can add the secret mount as normal.\r\n\r\n```\r\ntorchx run utils.sh --mounts type=secret,name=foo,dst=/etc/foo ...\r\n```\r\n\r\nSpecs https://github.com/pytorch/torchx/blob/main/torchx/specs/api.py#L218-L269 and add new SecretMount\r\n\r\nIntegrate it into kubernetes_scheduler.py at https://github.com/pytorch/torchx/blob/main/torchx/schedulers/kubernetes_scheduler.py#L267\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n\r\n* utils.sh mount argument https://github.com/pytorch/torchx/blob/main/torchx/components/utils.py#L83\r\n* Docker also has a slightly different concept of secrets https://docs.docker.com/engine/swarm/secrets/\r\n* AWS Batch has environment variable secrets https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data-secrets.html\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/611",
    "state": "open",
    "labels": [
      "enhancement",
      "module: specs",
      "kubernetes"
    ],
    "created_at": "2022-10-10T18:53:20Z",
    "updated_at": "2022-10-10T18:56:25Z",
    "comments": 0,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1396,
    "title": "Question about triton example in tutorial",
    "body": "Why using platform: \"pytorch_libtorch\" while model.pt as Torch TensorRT \r\n\r\n> model.pt as platform: \"pytorch_libtorch\" \r\n\r\ninstead of \r\n\r\n> model.pt as platform: \"tensorrt_plan\" in [serving_torch_tensorrt_with_triton](https://pytorch.org/TensorRT/tutorials/serving_torch_tensorrt_with_triton.html)",
    "url": "https://github.com/pytorch/TensorRT/issues/1396",
    "state": "closed",
    "labels": [
      "question",
      "examples"
    ],
    "created_at": "2022-10-10T11:57:33Z",
    "updated_at": "2022-12-15T17:55:53Z",
    "user": "allen-ash"
  },
  {
    "repo": "huggingface/setfit",
    "number": 91,
    "title": "Using Setfit for similarity classification",
    "body": "Hello,\r\nI would like to test this promising framework on a similarity classification task. So basically, I have got a dataset with 3 columns: (sentence1,sentence2,label). From what I understand, currently it is only possible to train on a single sentence classification problem.\r\nIs there a get around to use Setfit for a pair sentence classification problem ? If not, would it be possible to add this feature in a future integration ? \r\n\r\nThank you in advance",
    "url": "https://github.com/huggingface/setfit/issues/91",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-07T09:58:09Z",
    "updated_at": "2025-01-21T10:05:54Z",
    "user": "castafra"
  },
  {
    "repo": "pytorch/examples",
    "number": 1077,
    "title": "Running on Windows",
    "body": "## \ud83d\udcda Documentation\r\nI'm trying to get DCGAN running on my Windows machine. It appears that the code may not support windows, but this is not mentioned in the readme. Is there a procedure to get it running on Windows?\r\n  ",
    "url": "https://github.com/pytorch/examples/issues/1077",
    "state": "open",
    "labels": [],
    "created_at": "2022-10-07T03:11:19Z",
    "updated_at": "2023-03-21T23:00:09Z",
    "comments": 6,
    "user": "maxbonzulak"
  },
  {
    "repo": "huggingface/setfit",
    "number": 86,
    "title": "num_epochs range",
    "body": "Hi there!\r\nI was wondering whether you can provide a range for typically \"good\" values to use/test for the argument num_epochs both in the single label classification case and the multi label classification case. Of course, the best performing number depends on the classes to be predicted and the dataset, but in non-FSL settings, typically one uses a range between 2-5 (whereas many researchers may also stick to common defaults such as 3). I'm asking because I noticed that you use rather `num_epochs = 20` in your example scripts, so perhaps in general in setfit num_epochs should be higher than in non-FSL settings?",
    "url": "https://github.com/huggingface/setfit/issues/86",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-06T15:35:48Z",
    "updated_at": "2022-12-20T09:36:09Z",
    "user": "fhamborg"
  },
  {
    "repo": "huggingface/setfit",
    "number": 83,
    "title": "Running Evaluation ",
    "body": "Hi,\r\nThanks for sharing this work.\r\nI am wondering if it is possible to run evaluation dataset to tune hyperparameters. \r\nThe SetFitTrainer doesn't seem to accept arguments like 'evaluation_strategy', 'save_strategy', 'compute_metrics', etc. \r\nOr perhaps Im doing something wrong?\r\nThanks. \r\n\r\n",
    "url": "https://github.com/huggingface/setfit/issues/83",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-06T05:58:19Z",
    "updated_at": "2022-12-20T09:36:43Z",
    "user": "dhkhey"
  },
  {
    "repo": "huggingface/setfit",
    "number": 81,
    "title": "Fine-tuning for Question-Answering ",
    "body": "Hello,\r\n\r\nCan this library be used for fine-tuning a question-answering model with small amount of data as well ?\r\n\r\nI have a data that is in the same format with squad data. It has small amount of context, question, and answers data. \r\n\r\nIs it possible use this library to fine tune a question-answering model in huggingface (e.g. deepset/roberta-base-squad2) on my small data ? If it is, how should I set the **column_mapping** argument of the **SetFitTrainer()** function ? ",
    "url": "https://github.com/huggingface/setfit/issues/81",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-10-04T17:47:10Z",
    "updated_at": "2022-12-20T09:36:55Z",
    "user": "ozyurtf"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 86205,
    "title": "How to save only parts of the state_dict()",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nHi, I want to save only a small part of the model. \r\ne.g. A layer requires grad but B layer does not. So I only want to save A layer rather than both A and B . Many thanks!\r\n\r\n```\r\ndef model(nn.Module):\r\n     ...\r\n\r\nmodel=model()\r\n\r\nmodel.save(model.state_dict())\r\n```\r\n\r\n### Versions\r\n```\r\nPyTorch version: 1.13.0.dev20220709\r\nIs debug build: False\r\nCUDA used to build PyTorch: None\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: macOS 12.4 (arm64)\r\nGCC version: Could not collect\r\nClang version: 13.1.6 (clang-1316.0.21.2.5)\r\nCMake version: version 3.23.1\r\nLibc version: N/A\r\n\r\nPython version: 3.9.10 | packaged by conda-forge | (main, Feb  1 2022, 21:25:34)  [Clang 11.1.0 ] (64-bit runtime)\r\nPython platform: macOS-12.4-arm64-arm-64bit\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] mypy-extensions==0.4.3\r\n[pip3] numpy==1.23.2\r\n[pip3] pytorch-ignite==0.4.9\r\n[pip3] pytorch-lightning==1.6.5\r\n[pip3] torch==1.13.0.dev20220709\r\n[pip3] torchaudio==0.14.0.dev20220603\r\n[pip3] torchmetrics==0.9.2\r\n[pip3] torchsummary==1.5.1\r\n[pip3] torchvision==0.14.0.dev20220708\r\n[conda] numpy                     1.23.2                   pypi_0    pypi\r\n[conda] pytorch-ignite            0.4.9                    pypi_0    pypi\r\n[conda] pytorch-lightning         1.6.5                    pypi_0    pypi\r\n[conda] torch                     1.13.0.dev20220709          pypi_0    pypi\r\n[conda] torchaudio                0.14.0.dev20220603          pypi_0    pypi\r\n[conda] torchmetrics              0.9.2                    pypi_0    pypi\r\n[conda] torchsummary              1.5.1                    pypi_0    pypi\r\n[conda] torchvision               0.14.0.dev20220708          pypi_0    pypi\r\n```\n\ncc @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @saketh-are",
    "url": "https://github.com/pytorch/pytorch/issues/86205",
    "state": "closed",
    "labels": [
      "module: nn",
      "triaged"
    ],
    "created_at": "2022-10-04T13:47:47Z",
    "updated_at": "2022-10-13T13:46:21Z",
    "user": "CaffreyR"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 86204,
    "title": "How to perform unstructured interpolation ",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nMy feature request is very simple, I'm not sure if there already exists some approach or implementation to achieve this functionality.\r\n\r\nIn scipy, there is scipy.interpolate.NearestNDInterpolator class or scipy.interpolate.LinearNDInterpolator class to achieve unstructured interpolation, i.e., giving a set of sparse points that distribute non-uniformly in the spatial domain and interpolate values at any given points, however, currently torch seems only support simple grid structured interpolation like grid_sample\n\n### Alternatives\n\nI have found some implementation for this in 1d, but not sure if this is very efficient and support GPU, also how to extend it to 2D.\r\n\r\nhttps://github.com/aliutkus/torchinterp1d\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/86204",
    "state": "open",
    "labels": [
      "triaged",
      "module: interpolation"
    ],
    "created_at": "2022-10-04T13:03:50Z",
    "updated_at": "2022-10-10T11:59:06Z",
    "user": "twangnh"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1388,
    "title": "\u2753 [Question] How can we use torch_executed_modules?",
    "body": "## \u2753 Question\r\n\r\nCould you give us and example of how to use `torch_executed_modules` in `torch_tensorrt.ts.compile`\r\n\r\n## What you have already tried\r\n\r\nI tried many things. I would appreciate a little sample of how to use it.\r\nThanks\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1388",
    "state": "closed",
    "labels": [
      "question",
      "examples"
    ],
    "created_at": "2022-10-03T21:55:23Z",
    "updated_at": "2022-10-04T16:57:03Z",
    "user": "mjack3"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1037,
    "title": "Get intermediate derivatives with nested jacobian and has_aux",
    "body": "Is it possible to get intermediate results with nested jacobian?\r\nSay `functorch.jacfwd `is nested twice with `has_aux=True`, how to get 1st derivative in this case?\r\n\r\n```python\r\nimport torch\r\nimport functorch\r\n\r\ndef foo(x):\r\n    y = torch.cos(x)\r\n    return y, y\r\n\r\ndef nest(fun, num):\r\n    bar = fun\r\n    for _ in range(num):\r\n        bar = functorch.jacfwd(bar, has_aux=True)\r\n    return bar\r\n\r\nx = torch.tensor(0.0)\r\n\r\nprint(nest(foo, 1)(x))\r\n# 1st derivative and value\r\n# (tensor(-0.), tensor(1.000000000000e+00))\r\n\r\nprint(nest(foo, 2)(x))\r\n# 2nd derivative and value, no 1st derivative\r\n# (tensor(-1.000000000000e+00), tensor(1.000000000000e+00))\r\n```",
    "url": "https://github.com/pytorch/functorch/issues/1037",
    "state": "closed",
    "labels": [],
    "created_at": "2022-10-03T08:29:27Z",
    "updated_at": "2022-10-03T16:54:06Z",
    "comments": 2,
    "user": "i-a-morozov"
  },
  {
    "repo": "pytorch/vision",
    "number": 6676,
    "title": "torchvision.transforms.Normalize has large absolute difference",
    "body": "### \ud83d\udc1b Describe the bug\n\nBy definition, `torchvision.transforms.Normalize` should produce the same results if all input, std, and mean are divided or multiplied by the same number. When I test the API with the following input, I get the absolute difference up to 24978131.5 and the relative difference up to 3.5765e-08 for the float64 data type. Is this kind of difference expected? What's the threshold pytorch uses in tests to determine normal behavior versus buggy behavior?\r\n\r\nReproduce code:\r\n```\r\nimport torch\r\nimport torchvision\r\n\r\ninput = torch.tensor([ 0.0000, 41.3108,  0.0000], dtype=torch.float64).view(3, 1, 1)\r\nstd = torch.tensor([61860.0, 3586.0, 60300.0])\r\nmean = torch.tensor([4287419396147613455, -7376768754095287866, -6969696485275369284])\r\n\r\nr1 = torchvision.transforms.Normalize(mean, std)(input)\r\n\r\ninput = input / 255.0\r\nstd = std / 255.0\r\nmean = mean / 255.0\r\n\r\nr2 = torchvision.transforms.Normalize(mean, std)(input)\r\n\r\nprint(r2 - r1)\r\nprint((r2-r1)/r1)\r\n```\r\nOutput:\r\n```\r\ntensor([[[  588325.7422]],\r\n\r\n        [[24978131.5000]],\r\n\r\n        [[ 4133818.0781]]], dtype=torch.float64)\r\ntensor([[[-8.4885e-09]],\r\n\r\n        [[ 1.2142e-08]],\r\n\r\n        [[ 3.5765e-08]]], dtype=torch.float64)\r\n```\n\n### Versions\n\n```\r\nCollecting environment information...\r\nPyTorch version: 1.13.0.dev20220919+cpu\r\nIs debug build: False\r\nCUDA used to build PyTorch: None\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 18.04.6 LTS (x86_64)\r\nGCC version: Could not collect\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\nLibc version: glibc-2.17\r\n\r\nPython version: 3.7.13 (default, Mar 29 2022, 02:18:16)  [GCC 7.5.0] (64-bit runtime)\r\nPython platform: Linux-4.15.0-176-generic-x86_64-with-debian-buster-sid\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.21.6\r\n[pip3] torch==1.13.0.dev20220919+cpu\r\n[pip3] torchaudio==0.13.0.dev20220919+cpu\r\n[pip3] torchvision==0.14.0.dev20220919+cpu\r\n[conda] numpy                     1.21.6                   pypi_0    pypi\r\n[conda] torch                     1.13.0.dev20220919+cpu          pypi_0    pypi\r\n[conda] torchaudio                0.13.0.dev20220919+cpu          pypi_0    pypi\r\n[conda] torchvision               0.14.0.dev20220919+cpu          pypi_0    pypi\r\n```\n\ncc @vfdev-5 @datumbox",
    "url": "https://github.com/pytorch/vision/issues/6676",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2022-10-02T20:56:19Z",
    "updated_at": "2022-10-03T16:42:13Z",
    "user": "jiannanWang"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5053,
    "title": "Intermittent JSON parse error when streaming the Pile",
    "body": "## Describe the bug\r\nI have an intermittent error when streaming the Pile, where I get a JSON parse error which causes my program to crash.\r\n\r\nThis is intermittent - when I rerun the program with the same random seed it does not crash in the same way. The exact point this happens also varied - it happened to me 11B tokens and 4 days into a training run, and now just happened 2 minutes into one, but I can't reliably reproduce it.\r\n\r\nI'm using a remote machine with 8 A6000 GPUs via runpod.io\r\n\r\n## Expected results\r\nI have a DataLoader which can iterate through the whole Pile\r\n\r\n## Actual results\r\n\r\nStack trace:\r\n\r\n```\r\nFailed\u00a0to\u00a0read\u00a0file\u00a0'zstd://12.jsonl::https://the-eye.eu/public/AI/pile/train/12.jsonl.zst'\u00a0with\u00a0error\u00a0<class\u00a0'pyarrow.lib.ArrowInvalid'>:\u00a0JSON\u00a0parse\u00a0error:\u00a0Invalid\u00a0value.\u00a0in\u00a0row\u00a00\r\n```\r\n\r\nI'm currently using HuggingFace accelerate, which also gave me the following stack trace, but I've also experienced this problem intermittently when using DataParallel, so I don't think it's to do with parallelisation \r\n\r\n```\r\nTraceback (most recent call last):                                                                                                          \r\n  File \"ddp_script.py\", line 1258, in <module>                                                                                              \r\n    main()                                                                                                                                  \r\n  File \"ddp_script.py\", line 1143, in main                                                                                                  \r\n    for c, batch in tqdm.tqdm(enumerate(data_iter)):                                                                                        \r\n  File \"/opt/conda/lib/python3.7/site-packages/tqdm/std.py\", line 1195, in __iter__                                                         \r\n    for obj in iterable:                                                                                                                    \r\n  File \"/opt/conda/lib/python3.7/site-packages/accelerate/data_loader.py\", line 503, in __iter__                                            \r\n    next_batch, next_batch_info, next_skip = self._fetch_batches(main_iterator)                                                             \r\n  File \"/opt/conda/lib/python3.7/site-packages/accelerate/data_loader.py\", line 454, in _fetch_batches                                      \r\n    broadcast_object_list(batch_info)                                                                                                       \r\n  File \"/opt/conda/lib/python3.7/site-packages/accelerate/utils/operations.py\", line 333, in broadcast_object_list                          \r\n    torch.distributed.broadcast_object_list(object_list, src=from_process)                                                                  \r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py\", line 1900, in broadcast_object_list                  \r\n    object_list[i] = _tensor_to_object(obj_view, obj_size)                                                                                  \r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py\", line 1571, in _tensor_to_object                      \r\n    return _unpickler(io.BytesIO(buf)).load()                                                                                               \r\n_pickle.UnpicklingError: invalid load key, '@'.\r\n```\r\n\r\n\r\n\r\n## Steps to reproduce the bug\r\n```python\r\nfrom datasets import load_dataset\r\ndataset = load_dataset(\r\n                    cfg[\"dataset_name\"], streaming=True, split=\"train\")\r\ndataset = dataset.remove_columns(\"meta\")\r\ndataset = dataset.map(tokenize_and_concatenate, batched=True)\r\ndataset = dataset.with_format(type=\"torch\")\r\ntrain_data_loader = DataLoader(\r\n                dataset, batch_size=cfg[\"batch_size\"], num_workers=3)\r\n\r\nfor batch in train_data_loader:\r\n    continue\r\n```\r\n\r\n`tokenize_and_concatenate` is a custom tokenization function I defined on the GPT-NeoX tokenizer to tokenize the text, separated by endoftext tokens, and reshape to have length batch_size, I don't think this is related to tokenization:\r\n\r\n```\r\nimport numpy as np\r\nimport einops\r\nimport torch\r\ndef tokenize_and_concatenate(examples):\r\n        texts = examples[\"text\"]\r\n        full_text = tokenizer.eos_token.join(texts)\r\n        div = 20\r\n        length = len(full_text) // div\r\n        text_list = [full_text[i * length: (i + 1) * length]\r\n                     for i in range(div)]\r\n        tokens = tokenizer(text_list, return_tensors=\"np\", padding=True)[\r\n            \"input_ids\"\r\n        ].flatten()\r\n        tokens = tokens[tokens != tokenizer.pad_token_id]\r\n        n = len(tokens)\r\n        curr_batch_size = n // (seq_len - 1)\r\n        tokens = tokens[: (seq_len - 1) * curr_batch_size]\r\n        tokens = einops.rearrange(\r\n            tokens,\r\n            \"(batch_size seq) -> batch_size seq\"",
    "url": "https://github.com/huggingface/datasets/issues/5053",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2022-10-02T11:56:46Z",
    "updated_at": "2022-10-04T17:59:03Z",
    "comments": 3,
    "user": "neelnanda-io"
  },
  {
    "repo": "pytorch/examples",
    "number": 1075,
    "title": "Need C++ L2 regularization example",
    "body": "How to add L2 Regularization to a layer like keras\r\nmodel.add(Dense(kernel_regularizer=regularizers.l2(0.01), activation='elu'))\r\n",
    "url": "https://github.com/pytorch/examples/issues/1075",
    "state": "closed",
    "labels": [
      "help wanted"
    ],
    "created_at": "2022-10-02T08:35:30Z",
    "updated_at": "2022-10-04T01:47:36Z",
    "comments": 1,
    "user": "bitnick10"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1036,
    "title": "support scan",
    "body": "it would be really nice to be able to eg take models implemented in jax with `jax.lax.scan` and port them over to torch without having to unroll scans over modules",
    "url": "https://github.com/pytorch/functorch/issues/1036",
    "state": "open",
    "labels": [],
    "created_at": "2022-09-30T18:02:23Z",
    "updated_at": "2023-02-13T08:41:10Z",
    "comments": 3,
    "user": "GallagherCommaJack"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1386,
    "title": "\u2753 [Question] Why my model is not accelerated by using fp16 ? ",
    "body": "## \u2753 Question\r\n\r\nI tried the exact same example in the [notebook](https://github.com/pytorch/TensorRT/blob/master/notebooks/Hugging-Face-BERT.ipynb).\r\n\r\n## What you have already tried\r\n\r\nsee the code (I just copy the code in the [.ipynb](https://github.com/pytorch/TensorRT/blob/master/notebooks/Hugging-Face-BERT.ipynb). But the result is very different while I use the same A100 GPU!!!\r\n\r\n```python\r\nfrom transformers import BertTokenizer, BertForMaskedLM\r\nimport torch\r\nimport timeit\r\nimport numpy as np\r\nimport torch_tensorrt\r\nimport torch.backends.cudnn as cudnn\r\n\r\n\r\nenc = BertTokenizer.from_pretrained('bert-base-uncased')\r\n\r\n\r\n\r\nbatch_size = 4\r\n\r\nbatched_indexed_tokens = [[101, 64]*64]*batch_size\r\nbatched_segment_ids = [[0, 1]*64]*batch_size\r\nbatched_attention_masks = [[1, 1]*64]*batch_size\r\n\r\ntokens_tensor = torch.tensor(batched_indexed_tokens)\r\nsegments_tensor = torch.tensor(batched_segment_ids)\r\nattention_masks_tensor = torch.tensor(batched_attention_masks)\r\n\r\n\r\n\r\n\r\nmlm_model_ts = BertForMaskedLM.from_pretrained('bert-base-uncased', torchscript=True)\r\ntraced_mlm_model = torch.jit.trace(mlm_model_ts, [tokens_tensor, segments_tensor, attention_masks_tensor])\r\n\r\n\r\n\r\nmasked_sentences = ['Paris is the [MASK] of France.',\r\n                    'The primary [MASK] of the United States is English.',\r\n                    'A baseball game consists of at least nine [MASK].',\r\n                    'Topology is a branch of [MASK] concerned with the properties of geometric objects that remain unchanged under continuous transformations.']\r\npos_masks = [4, 3, 9, 6]\r\n\r\nencoded_inputs = enc(masked_sentences, return_tensors='pt', padding='max_length', max_length=128)\r\noutputs = mlm_model_ts(**encoded_inputs)\r\nmost_likely_token_ids = [torch.argmax(outputs[0][i, pos, :]) for i, pos in enumerate(pos_masks)]\r\nunmasked_tokens = enc.decode(most_likely_token_ids).split(' ')\r\nunmasked_sentences = [masked_sentences[i].replace('[MASK]', token) for i, token in enumerate(unmasked_tokens)]\r\nfor sentence in unmasked_sentences:\r\n    print(sentence)\r\n\r\nencoded_inputs = enc(masked_sentences, return_tensors='pt', padding='max_length', max_length=128)\r\noutputs = traced_mlm_model(encoded_inputs['input_ids'], encoded_inputs['token_type_ids'], encoded_inputs['attention_mask'])\r\nmost_likely_token_ids = [torch.argmax(outputs[0][i, pos, :]) for i, pos in enumerate(pos_masks)]\r\nunmasked_tokens = enc.decode(most_likely_token_ids).split(' ')\r\nunmasked_sentences = [masked_sentences[i].replace('[MASK]', token) for i, token in enumerate(unmasked_tokens)]\r\nfor sentence in unmasked_sentences:\r\n    print(sentence)\r\n\r\ntrt_model = torch_tensorrt.compile(traced_mlm_model, \r\n    inputs= [torch_tensorrt.Input(shape=[batch_size, 128], dtype=torch.int32),  # input_ids\r\n             torch_tensorrt.Input(shape=[batch_size, 128], dtype=torch.int32),  # token_type_ids\r\n             torch_tensorrt.Input(shape=[batch_size, 128], dtype=torch.int32)], # attention_mask\r\n    enabled_precisions= {torch.float32}, # Run with 32-bit precision\r\n    workspace_size=2000000000,\r\n    truncate_long_and_double=True\r\n)\r\n\r\nenc_inputs = enc(masked_sentences, return_tensors='pt', padding='max_length', max_length=128)\r\nenc_inputs = {k: v.type(torch.int32).cuda() for k, v in enc_inputs.items()}\r\noutput_trt = trt_model(enc_inputs['input_ids'], enc_inputs['token_type_ids'], enc_inputs['attention_mask'])\r\nmost_likely_token_ids_trt = [torch.argmax(output_trt[i, pos, :]) for i, pos in enumerate(pos_masks)]\r\nunmasked_tokens_trt = enc.decode(most_likely_token_ids_trt).split(' ')\r\nunmasked_sentences_trt = [masked_sentences[i].replace('[MASK]', token) for i, token in enumerate(unmasked_tokens_trt)]\r\nfor sentence in unmasked_sentences_trt:\r\n    print(sentence)\r\n\r\ntrt_model_fp16 = torch_tensorrt.compile(traced_mlm_model, \r\n    inputs= [torch_tensorrt.Input(shape=[batch_size, 128], dtype=torch.int32),  # input_ids\r\n             torch_tensorrt.Input(shape=[batch_size, 128], dtype=torch.int32),  # token_type_ids\r\n             torch_tensorrt.Input(shape=[batch_size, 128], dtype=torch.int32)], # attention_mask\r\n    enabled_precisions= {torch.half}, # Run with 16-bit precision\r\n    workspace_size=2000000000,\r\n    truncate_long_and_double=True\r\n)\r\n\r\ndef timeGraph(model, input_tensor1, input_tensor2, input_tensor3, num_loops=50):\r\n    print(\"Warm up ...\")\r\n    with torch.no_grad():\r\n        for _ in range(20):\r\n            features = model(input_tensor1, input_tensor2, input_tensor3)\r\n\r\n    torch.cuda.synchronize()\r\n\r\n    print(\"Start timing ...\")\r\n    timings = []\r\n    with torch.no_grad():\r\n        for i in range(num_loops):\r\n            start_time = timeit.default_timer()\r\n            features = model(input_tensor1, input_tensor2, input_tensor3)\r\n            torch.cuda.synchronize()\r\n            end_time = timeit.default_timer()\r\n            timings.append(end_time - start_time)\r\n            # print(\"Iteration {}: {:.6f} s\".format(i, end_time - start_time))\r\n\r\n    return timings\r\n\r\n\r\n\r\ndef printStats(graphN",
    "url": "https://github.com/pytorch/TensorRT/issues/1386",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "performance"
    ],
    "created_at": "2022-09-30T16:04:34Z",
    "updated_at": "2023-01-13T00:02:26Z",
    "user": "jcyk"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5044,
    "title": "integrate `load_from_disk` into `load_dataset` ",
    "body": "**Is your feature request related to a problem? Please describe.**\r\n\r\nIs it possible to make `load_dataset` more universal similar to `from_pretrained` in `transformers` so that it can handle the hub, and the local path datasets of all supported types?\r\n\r\nCurrently one has to choose a different loader depending on how the dataset has been created.\r\n\r\ne.g. this won't work:\r\n\r\n```\r\n$ git clone https://huggingface.co/datasets/severo/test-parquet\r\n$ python -c 'from datasets import load_dataset; ds=load_dataset(\"test-parquet\"); \\\r\nds.save_to_disk(\"my_dataset\"); load_dataset(\"my_dataset\")'\r\n\r\n[...]\r\n\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/load.py\", line 1746, in load_dataset\r\n    builder_instance.download_and_prepare(\r\n  File \"/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/builder.py\", line 704, in download_and_prepare\r\n    self._download_and_prepare(\r\n  File \"/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/builder.py\", line 793, in _download_and_prepare\r\n    self._prepare_split(split_generator, **prepare_split_kwargs)\r\n  File \"/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/builder.py\", line 1277, in _prepare_split\r\n    writer.write_table(table)\r\n  File \"/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/arrow_writer.py\", line 524, in write_table\r\n    pa_table = table_cast(pa_table, self._schema)\r\n  File \"/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/table.py\", line 2005, in table_cast\r\n    return cast_table_to_schema(table, schema)\r\n  File \"/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/table.py\", line 1968, in cast_table_to_schema\r\n    raise ValueError(f\"Couldn't cast\\n{table.schema}\\nto\\n{features}\\nbecause column names don't match\")\r\nValueError: Couldn't cast\r\n_data_files: list<item: struct<filename: string>>\r\n  child 0, item: struct<filename: string>\r\n      child 0, filename: string\r\n```\r\n\r\nboth times the dataset is being loaded from disk. Why does it fail the second time?\r\n\r\nWhy can't `save_to_disk` generate a dataset that can be immediately loaded by `load_dataset`?\r\n\r\ne.g. the simplest hack would be to have `save_to_disk` add some flag to the saved dataset, that tells `load_dataset` to internally call `load_from_disk`. like having `save_to_disk` create a `load_me_with_load_from_disk.txt` file ;) and `load_dataset` will support that feature from saved datasets from new `datasets` versions. The old ones will still need to use `load_from_disk` explicitly. Unless the flag is not needed and one can immediately tell by looking at the saved dataset that it was saved via `save_to_disk` and thus use `load_from_disk` internally.\r\n\r\nThe use-case is defining a simple API where the user only ever needs to pass a `dataset_name_or_path` and it will always just work. Currently one needs to manually add additional switches telling the system whether to use one loading method or the other which works but it's not smooth.\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/datasets/issues/5044",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-09-29T17:37:12Z",
    "updated_at": "2025-06-28T09:00:44Z",
    "comments": 15,
    "user": "stas00"
  },
  {
    "repo": "huggingface/setfit",
    "number": 72,
    "title": "Few-Shot Named Entity Recognition work",
    "body": "Hi, really like your work, have you considered using this framework for few-shot named entity recognition work? or do you have an example code for it, looking forward to the progress in few-shot named entity recognition!",
    "url": "https://github.com/huggingface/setfit/issues/72",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-09-29T09:32:11Z",
    "updated_at": "2022-12-20T09:37:02Z",
    "user": "zhanghaok"
  },
  {
    "repo": "pytorch/vision",
    "number": 6664,
    "title": "Add a function to remove degenerate boxes",
    "body": "### \ud83d\ude80 The feature\n\nThis function would filter boxes where x2 <= x1 or y2 <= y1\n\n### Motivation, pitch\n\nDegenerate boxes are filtered in at least two places in the current torchvision code:\r\n\r\n* https://github.com/pytorch/vision/blob/f725901dde5bc996fe3d4e163f4d4e7d53720146/torchvision/prototype/transforms/_augment.py\r\n* https://github.com/pytorch/vision/blob/96dbada4d588cabbd24ab1eee57cd261c9b93d20/references/detection/transforms.py\r\n\r\nThis could be refactored, a function ```remove_degenerate_boxes``` could be added in ```ops.boxes``` and exposed publicaly.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\nIf relevant I would be happy to work on it !\n\ncc @vfdev-5 @datumbox",
    "url": "https://github.com/pytorch/vision/issues/6664",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2022-09-28T19:23:36Z",
    "updated_at": "2022-09-28T21:54:52Z",
    "user": "Quintulius"
  },
  {
    "repo": "pytorch/examples",
    "number": 1071,
    "title": "resnet training on imagenet is failing",
    "body": "## Environment\r\npyTorch - upstream code base > 1.12\r\nUB 20.04\r\nGPU - 4\r\n\r\n\r\n## Steps to Reproduce\r\n\r\n`python imagenet/main.py -a resnet50 --dist-url tcp://127.0.0.1:8080 --dist-backend nccl --multiprocessing-distributed --world-size 1 --rank 0 <imagenet data dir> --epochs 3 --batch-size 256 -j64`\r\n\r\n## Failure signature\r\n731:731 [2] NCCL INFO comm 0x7f0078000ef0 rank 2 nranks 4 cudaDev 2 busId 88000 - Abort COMPLETE\r\n730:730 [1] NCCL INFO comm 0x7f1750000ef0 rank 1 nranks 4 cudaDev 1 busId 3d000 - Abort COMPLETE\r\n732:732 [3] NCCL INFO comm 0x7fe214000ef0 rank 3 nranks 4 cudaDev 3 busId b1000 - Abort COMPLETE\r\n729:729 [0] NCCL INFO comm 0x7f2edc000ef0 rank 0 nranks 4 cudaDev 0 busId 1a000 - Abort COMPLETE\r\nTraceback (most recent call last):\r\n  File \"main.py\", line 516, in <module>\r\n    main()\r\n  File \"main.py\", line 117, in main\r\n    mp.spawn(main_worker, nprocs=ngpus_per_node, args=(ngpus_per_node, args))\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/multiprocessing/spawn.py\", line 240, in spawn\r\n    return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/multiprocessing/spawn.py\", line 198, in start_processes\r\n    while not context.join():\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/multiprocessing/spawn.py\", line 160, in join\r\n    raise ProcessRaisedException(msg, error_index, failed_process.pid)\r\ntorch.multiprocessing.spawn.ProcessRaisedException:\r\n\r\n-- Process 1 terminated with the following error:\r\nTraceback (most recent call last):\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/multiprocessing/spawn.py\", line 69, in _wrap\r\n    fn(i, *args)\r\n  File \"/var/lib/jenkins/examples/imagenet/main.py\", line 278, in main_worker\r\n    train(train_loader, model, criterion, optimizer, epoch, args)\r\n  File \"/var/lib/jenkins/examples/imagenet/main.py\", line 331, in train\r\n    loss = criterion(output, target)\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py\", line 1131, in _call_impl\r\n    return forward_call(*input, **kwargs)\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/nn/modules/loss.py\", line 1166, in forward\r\n    label_smoothing=self.label_smoothing)\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py\", line 2970, in cross_entropy\r\n    return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing)\r\nRuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cpu! (when checking argument for argument target in method wrapper_nll_loss_forward)\r\n\r\n\r\n## Possible Regression\r\nGit reset to commit 5a06e9cac1728c860b53ebfc6792e0a0e21a5678\r\nis working fine.\r\nhttps://github.com/pytorch/examples/commit/5a06e9cac1728c860b53ebfc6792e0a0e21a5678\r\n\r\n",
    "url": "https://github.com/pytorch/examples/issues/1071",
    "state": "closed",
    "labels": [
      "bug",
      "help wanted"
    ],
    "created_at": "2022-09-28T06:16:22Z",
    "updated_at": "2022-09-30T19:42:39Z",
    "comments": 1,
    "user": "pruthvistony"
  },
  {
    "repo": "pytorch/data",
    "number": 794,
    "title": "Does torchdata already work with GCP and Azure blob storage",
    "body": "### \ud83d\ude80 The feature\r\n\r\nWe already have an S3 integration and it seems like the S3 API already works with both\r\n* Azure: https://devblogs.microsoft.com/cse/2016/05/22/access-azure-blob-storage-from-your-apps-using-s3-api/\r\n* GCP: https://vamsiramakrishnan.medium.com/a-study-on-using-google-cloud-storage-with-the-s3-compatibility-api-324d31b8dfeb\r\n\r\n### Motivation, pitch\r\n\r\nSo ideally we can already support Azure, GCP without doing much\r\n\r\n### Alternatives\r\n\r\nBuild a new integration for each of Azure and GCP using their native APIs\r\n\r\nh/t: @chauhang for the idea",
    "url": "https://github.com/meta-pytorch/data/issues/794",
    "state": "closed",
    "labels": [],
    "created_at": "2022-09-27T21:37:43Z",
    "updated_at": "2022-10-20T17:52:35Z",
    "comments": 7,
    "user": "msaroufim"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 85695,
    "title": "How to load checkpoint from .pt file",
    "body": "### \ud83d\udc1b Describe the bug\r\nI finetuned T5-large by pytorch lightning and saved a ckpt file.\r\n```\r\nckpt = torch.load(<ckpt_path>)\r\nprint(ckpt.keys())\r\n\r\ndict_keys(['epoch', 'global_step', 'pytorch-lightning_version', 'state_dict', 'loops', 'callbacks', 'optimizer_states', 'lr_schedulers', 'hparams_name', 'hyper_parameters'])\r\n```\r\nIt does have state_dict which means I can use it as my inference task.\r\nI have tried the following two snippets.\r\n\r\n1.\r\nThis can not run correctly\r\n```\r\nckpt = torch.load(<ckpt_path>)\r\nmodel = AutoModelForSeq2SeqLM.from_pretrained('t5-large')\r\nmodel.load_state_dict(ckpt)\r\nprint(model.lm_head.weight)\r\n```\r\n\r\n2. This seems don't load the weight correctly.\r\n```\r\nckpt = torch.load(<ckpt_path>)\r\nmodel_config = AutoConfig.from_pretrained('t5-large')\r\nmodel_2 = AutoModelForSeq2SeqLM.from_pretrained(None,config = model_config,state_dict = ckpt)\r\nprint(model_2.lm_head.weight)\r\n```\r\n\r\n\r\n### Versions\r\n\r\nCollecting environment information...\r\nPyTorch version: 1.12.1+cu102\r\nIs debug build: False\r\nCUDA used to build PyTorch: 10.2\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 18.04.4 LTS (x86_64)\r\nGCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\nLibc version: glibc-2.10\r\n\r\nPython version: 3.7.3 (default, Mar 27 2019, 22:11:17)  [GCC 7.3.0] (64-bit runtime)\r\nPython platform: Linux-4.15.0-189-generic-x86_64-with-debian-buster-sid\r\nIs CUDA available: True\r\nCUDA runtime version: Could not collect\r\nGPU models and configuration:\r\nGPU 0: Quadro RTX 8000\r\nGPU 1: Quadro RTX 8000\r\nGPU 2: Quadro RTX 8000\r\nGPU 3: Quadro RTX 8000\r\nGPU 4: Quadro RTX 8000\r\nGPU 5: Quadro RTX 8000\r\nGPU 6: Quadro RTX 8000\r\nGPU 7: Quadro RTX 8000\r\nGPU 8: Quadro RTX 8000\r\nGPU 9: Quadro RTX 8000\r\n\r\nNvidia driver version: 470.141.03\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.2.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.2.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.2.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.2.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.2.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.2.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.2.4\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.21.6\r\n[pip3] pytorch-lightning==1.7.7\r\n[pip3] torch==1.12.1\r\n[pip3] torchmetrics==0.7.2\r\n[conda] numpy                     1.21.6                   pypi_0    pypi\r\n[conda] pytorch-lightning         1.7.7                    pypi_0    pypi\r\n[conda] torch                     1.12.1                   pypi_0    pypi",
    "url": "https://github.com/pytorch/pytorch/issues/85695",
    "state": "closed",
    "labels": [],
    "created_at": "2022-09-27T08:23:40Z",
    "updated_at": "2022-09-29T17:38:58Z",
    "user": "ZeyiLiao"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1030,
    "title": "Add support for `tree_map` or document recommended alternative",
    "body": "I'm working on testing some models using `functorch` along with `torch-mlir` and IREE.  I don't see an analog of jax's `tree_map`.  Is this something it makes sense for `functorch` to implement, or is there a recommended alternative?",
    "url": "https://github.com/pytorch/functorch/issues/1030",
    "state": "open",
    "labels": [],
    "created_at": "2022-09-26T19:20:21Z",
    "updated_at": "2022-11-12T15:22:23Z",
    "comments": 9,
    "user": "dellis23"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 85625,
    "title": "How to install pytorch with cuda 11.7 in anaconda envirment?",
    "body": "### \ud83d\udcda The doc issue\r\n![image](https://user-images.githubusercontent.com/32769358/192286577-2ed4b09a-b062-4f21-a6ae-eadab21b5a3e.png)\r\n\r\n![image](https://user-images.githubusercontent.com/32769358/192285880-7ffcbaa7-ad35-418c-a9ca-c7c7e9b25fc4.png)\r\ncould not find the version of cuda 11.7 when use conda or pip \r\n\r\n### Suggest a potential alternative/fix\r\n\r\nadd cuda 11.7 in conda",
    "url": "https://github.com/pytorch/pytorch/issues/85625",
    "state": "open",
    "labels": [
      "triaged"
    ],
    "created_at": "2022-09-26T13:15:02Z",
    "updated_at": "2022-10-04T08:23:30Z",
    "user": "verigle"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1379,
    "title": "Why is size of tensorrt compiled INT8 model after QAT is same as size of FP16 model",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\nI have been trying to use INT8 inference for a trained pytorch model.\r\n\r\nI followed this:\r\nhttps://pytorch.org/TensorRT/_notebooks/vgg-qat.html\r\nand\r\nhttps://docs.nvidia.com/deeplearning/tensorrt/pytorch-quantization-toolkit/docs/tutorials/quant_resnet50.html\r\n\r\n**My steps are outlined as:**\r\n1) **Train pytorch model**\r\n\r\n- Normal training loop\r\n\r\n2) **Calibrate the model with quant_modules**\r\n\r\n`\r\nquant_modules.initialize(float_module_list=['ConvTranspose2d'])  # error when used in quantization, so I add it to the exception list\r\nquant_desc_input = QuantDescriptor(calib_method='histogram')\r\n\r\n# conv and Linear layers to be replaced by there quantized versions\r\nquant_nn.QuantConv2d.set_default_quant_desc_input(quant_desc_input)\r\nquant_nn.QuantLinear.set_default_quant_desc_input(quant_desc_input)\r\n# quant_nn.QuantConvTranspose2d.set_default_quant_desc_input(quant_desc_input)\r\n\r\n# now load pre-trained model\r\nnet1 = model_simple.BevDetNetSimple(input_channel_numbers, settings.N_CHANNELS_PREDICTION_KP, \r\n                                        scale_H=2, scale_W=2, predict_3d_center=True).cuda(DEVICE_ID_GPU)\r\ncuda_dev = \"cuda:{0}\".format(DEVICE_ID_GPU)\r\nnet1.load_state_dict(torch.load(model_weights, map_location=cuda_dev))\r\nprint(net1)\r\n\r\ncalib_data = dataset_classes.CalibDataset(path_calib_dataset_bev=settings.val_bev_save_path)\r\ncalib_loader = DataLoader(calib_data, batch_size=6, drop_last=True)\r\n\r\n# calibrate\r\nwith torch.no_grad():\r\n    collect_stats(net1, calib_loader, num_batches=4)\r\n    compute_amax(net1, method=\"percentile\", percentile=99.99)\r\n`\r\n\r\n3. **Train the model with quantized layers**\r\n\r\n- Normal training loop, 50 epochs\r\n- Save as torchscript\r\n\r\n`# export to torchscript\r\nquant_nn.TensorQuantizer.use_fb_fake_quant = True\r\nwith torch.no_grad():\r\n    jit_model = torch.jit.trace(net1, train_x)\r\n    torch.jit.save(jit_model, settings.MODEL_SAVE_PATH_INTERIM + str(epoch) + '_qat.ts')\r\n`\r\n\r\n4. **Convert QAT trained torchscript to tensorrt - int8**\r\n\r\n`\r\ndef export_qat_to_trt_int8(path_trained_qat_ts, path_save_ts_trt_int8):\r\n    \"\"\"\r\n    Function exports the QAT trained model saved as torchscript and weighst to tensorrt usig INT8 precision\r\n    \"\"\"\r\n\r\n    # load the saved QAT ts model\r\n    qat_model = torch.jit.load(path_trained_qat_ts).eval()\r\n    \r\n    # compile to torchscript\r\n    compile_spec = {\"inputs\": [trt.Input([1, 4, 384, 384])],\r\n                \"enabled_precisions\": [torch.int8], \r\n                \"truncate_long_and_double\":True,\r\n                \"sparse_weights\": True}\r\n    trt_mod = trt.compile(qat_model, **compile_spec)\r\n\r\n    torch.jit.save(trt_mod, path_save_ts_trt_int8)\r\n`\r\n\r\nAfter doing the above steps, I get a model of size 48MB, which is same as that of FP16 model. The runtime is also similar.\r\n\r\nI have then tried PTQ technique for INT8 - this gives me a model of size 28MB, which is expected. Also, the runtime is about half of FP16 model. This is fine. However, the accuracy is not acceptable.\r\n\r\nPlease let me know what am I missing in the QAT way? Why is my model larger and slower wrt PTQ?\r\n\r\n\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.12\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.8.10\r\n - CUDA version: 11.6\r\n - GPU models and configuration: RTX3090/ RTX2080 MAXQ\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1379",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: quantization"
    ],
    "created_at": "2022-09-26T09:30:28Z",
    "updated_at": "2023-05-02T15:33:16Z",
    "user": "SM1991CODES"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5013,
    "title": "would huggingface like publish cpp binding for datasets package ?",
    "body": "HI:\r\nI use cpp env libtorch, I like use hugggingface ,but huggingface not cpp binding, would you like publish cpp binding for it.\r\nthanks",
    "url": "https://github.com/huggingface/datasets/issues/5013",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2022-09-23T07:42:49Z",
    "updated_at": "2023-02-24T16:20:57Z",
    "comments": 5,
    "user": "mullerhai"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5012,
    "title": "Force JSON format regardless of file naming on S3",
    "body": "I have a file on S3 created by Data Version Control, it looks like `s3://dvc/ac/badff5b134382a0f25248f1b45d7b2` but contains a json file. If I run \r\n```python\r\ndataset = load_dataset(\r\n    \"json\",\r\n    data_files='s3://dvc/ac/badff5b134382a0f25248f1b45d7b2' \r\n)\r\n```\r\nIt gives me \r\n```\r\nInvalidSchema: No connection adapters were found for 's3://dvc/ac/badff5b134382a0f25248f1b45d7b2'\r\n```\r\nHowever, I cannot go ahead and change the names of the s3 file. Is there a way to \"force\" load a S3 url with certain decoder (JSON, CSV, etc.) regardless of s3 URL naming?",
    "url": "https://github.com/huggingface/datasets/issues/5012",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-09-22T18:28:15Z",
    "updated_at": "2023-08-16T09:58:36Z",
    "comments": 4,
    "user": "junwang-wish"
  },
  {
    "repo": "huggingface/datasets",
    "number": 5000,
    "title": "Dataset Viewer issue for asapp/slue",
    "body": "### Link\n\nhttps://huggingface.co/datasets/asapp/slue/viewer/\n\n### Description\n\nHi,\r\n\r\nI wonder how to get the dataset viewer of our slue dataset to work.\r\n\r\nBest,\r\nFelix\n\n### Owner\n\nYes",
    "url": "https://github.com/huggingface/datasets/issues/5000",
    "state": "closed",
    "labels": [],
    "created_at": "2022-09-20T16:45:45Z",
    "updated_at": "2022-09-27T07:04:03Z",
    "comments": 9,
    "user": "fwu-asapp"
  },
  {
    "repo": "pytorch/data",
    "number": 782,
    "title": "Definition of `IterDataPipe` in `pyi` file breaks inheritance path for static type checking",
    "body": "See comments in https://github.com/pytorch/data/pull/780\r\n\r\n@pmeier \r\nAt list for the first Error, the proper typing should be:\r\n```py\r\ndef load(path: pathlib.Path) -> IterDataPipe[Tuple[str, BinaryIO]]:\r\n    if path.is_dir():\r\n        dp: IterDataPipe = FileLister(str(path), recursive=True)\r\n    else:\r\n        dp = IterableWrapper([str(path)])\r\n    return FileOpener(dp, mode=\"rb\")\r\n```\r\n\r\nHowever, even with the proper typing shown above, the Error is changed to `Incompatible types in assignment (expression has type \"FileListerIterDataPipe\", variable has type \"IterDataPipe[Any]\")`. And, it doesn't explain what causes the second Error.\r\nSo, I spent a few hours figuring out what is the root cause of the `mypy` Error. In the generated `datapipe.pyi` file, a new `IterDataPipe` class is defined, which overrides the original `IterDataPipe` from the inheritance graph for all other `DataPipe`.\r\n\r\nAll Errors are eliminated when I remove new `IterDataPipe` definition from `datapipe.pyi`  and import `IterDataPipe` directly from `torch.utils.data.datapipe`. And, the reason we define new `IterDataPipe` in `pyi` file is attaching all functional APIs to it. We need to do it in a different way by keeping the original `IterDataPipe` and extending the class with all functional APIs.\r\n\r\ncc: @NivekT for python interface file\r\n\r\nFor this PR, I will revert it because our typing system needs to be fixed generally.\r\n\r\n_Originally posted by @ejguan in https://github.com/pytorch/data/issues/780#issuecomment-1252595095_",
    "url": "https://github.com/meta-pytorch/data/issues/782",
    "state": "open",
    "labels": [
      "Better Engineering"
    ],
    "created_at": "2022-09-20T16:23:07Z",
    "updated_at": "2023-04-11T16:49:04Z",
    "comments": 3,
    "user": "ejguan"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1024,
    "title": "Get .item() error without calling .item()",
    "body": "Hello guys, I'm new to this package and I want to calculate batched Jacobian w.r.t a self-implemented vector function. But I got the following error when I'm doing this.\r\n\r\n_RuntimeError: vmap: It looks like you're calling .item() on a Tensor. We don't support vmap over calling .item() on a Tensor, please try to rewrite what you're doing with other operations. If error is occurring somewhere inside PyTorch internals, please file a bug report._ \r\n\r\nHere is my code. I don't understand where the `.item()` comes from. Is this slicing operation ` q_current[0:3]`  wrong? How can I fix this?\r\n\r\n```python\r\nimport torch\r\nfrom functorch import jacrev,vmap\r\n\r\n#batch * len\r\nq_current = torch.randn((4,4*3-1),requires_grad=True)\r\n\r\n\r\ndef geoCompute(q_current):\r\n    k1 = q_current[0:3]\r\n    return k1\r\n\r\n\r\njacobian = vmap(jacrev(geoCompute))(q_current)\r\n```",
    "url": "https://github.com/pytorch/functorch/issues/1024",
    "state": "open",
    "labels": [],
    "created_at": "2022-09-20T07:57:25Z",
    "updated_at": "2022-09-20T12:16:59Z",
    "comments": 1,
    "user": "LiXinrong1012"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4990,
    "title": "\"no-token\" is passed to `huggingface_hub` when token is `None`",
    "body": "## Describe the bug\r\n\r\nIn the 2 lines listed below, a token is passed to `huggingface_hub` to get information from a dataset. If no token is provided, a \"no-token\" string is passed. What is the purpose of it ? If no real, I would prefer if the `None` value could be sent directly to be handle by `huggingface_hub`. I feel that here it is working because we assume the token will never be validated.\r\n\r\nhttps://github.com/huggingface/datasets/blob/5b23f58535f14cc4dd7649485bce1ccc836e7bca/src/datasets/load.py#L753\r\nhttps://github.com/huggingface/datasets/blob/5b23f58535f14cc4dd7649485bce1ccc836e7bca/src/datasets/load.py#L1121\r\n\r\n## Expected results\r\nPass `token=None` to `huggingface_hub`.\r\n\r\n## Actual results\r\n`token=\"no-token\"` is passed.\r\n\r\n## Environment info\r\n`huggingface_hub v0.10.0dev`",
    "url": "https://github.com/huggingface/datasets/issues/4990",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-09-19T15:14:40Z",
    "updated_at": "2022-09-30T09:16:00Z",
    "comments": 6,
    "user": "Wauplin"
  },
  {
    "repo": "pytorch/examples",
    "number": 1063,
    "title": "question about drop_last=True on validation mode",
    "body": "I don't know why this code use drop_last=True on validation mode.\r\nAlso, this code only uses batch_size dividable datas for calculating average top1,5 errors.\r\nAnd then re-generate auxiliary validation data&dataloader for printing remaining logs.\r\n\r\nCan anyone tell me why this code uses this method?",
    "url": "https://github.com/pytorch/examples/issues/1063",
    "state": "closed",
    "labels": [
      "question",
      "triaged"
    ],
    "created_at": "2022-09-19T01:41:05Z",
    "updated_at": "2022-09-23T04:08:12Z",
    "user": "DY112"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1362,
    "title": "\u2753 [Question] Why do you not build & release Windows wheels?",
    "body": "## \u2753 Question\r\n\r\nJust curious why you only make Linux wheels. It seems like since the last release it totally should have been possible for you guys to pre-build windows wheels. Just curious why this is\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1362",
    "state": "closed",
    "labels": [
      "question",
      "channel: windows"
    ],
    "created_at": "2022-09-17T14:22:22Z",
    "updated_at": "2022-09-19T15:53:58Z",
    "user": "joeyballentine"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4983,
    "title": "How to convert  torch.utils.data.Dataset to huggingface dataset?",
    "body": "I look through the huggingface dataset docs, and it seems that there is no offical support function to  convert  `torch.utils.data.Dataset`  to huggingface dataset. However, there is a way to convert huggingface dataset to  `torch.utils.data.Dataset`, like below:\r\n```python\r\nfrom datasets import Dataset\r\ndata = [[1, 2],[3, 4]]\r\nds = Dataset.from_dict({\"data\": data})\r\nds = ds.with_format(\"torch\")\r\nds[0]\r\nds[:2]\r\n```\r\nSo is there something I miss, or there IS no function to convert  `torch.utils.data.Dataset` to huggingface dataset. If so, is there any way to do this convert?\r\nThanks.",
    "url": "https://github.com/huggingface/datasets/issues/4983",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-09-16T09:15:10Z",
    "updated_at": "2023-12-14T20:54:15Z",
    "comments": 15,
    "user": "DEROOCE"
  },
  {
    "repo": "pytorch/torchx",
    "number": 602,
    "title": "YAML example of submitting a job using kubernetes",
    "body": "## \u2753 Questions and Help\r\n\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nBefore submitting, please ensure you have gone through our\r\n[documentation](https://pytorch.org/torchx).\r\n\r\n\r\n### Question\r\nI am new to use torchx with kubernetes scheduling. I followed the document to launch the etcd service successfully, which gives me the following results:\r\n\r\n```console\r\nfoo@bar:~$ kubectl get svc\r\nNAME          TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)             AGE\r\netcd-client   ClusterIP   192.168.50.248   <none>        2379/TCP            30m\r\netcd-server   ClusterIP   192.168.53.173   <none>        2379/TCP,2380/TCP   30m\r\n```\r\nThis is a little bit different than the example result given by the elastic tutorial (with two clusters): https://github.com/pytorch/elastic/tree/master/kubernetes. \r\n\r\nI am not sure who to write or modify a yaml file to submit a training job similar to the example provided by the elastic tutorial: \r\nhttps://github.com/pytorch/elastic/blob/master/kubernetes/config/samples/imagenet.yaml .\r\n\r\nI wonder if it is possible to provide a similar training yaml file for me to study?\r\n\r\nBest,\r\nYihao\r\n\r\n\r\n ",
    "url": "https://github.com/meta-pytorch/torchx/issues/602",
    "state": "closed",
    "labels": [],
    "created_at": "2022-09-15T22:42:21Z",
    "updated_at": "2022-10-20T17:44:15Z",
    "comments": 1,
    "user": "yihaocs"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4981,
    "title": "Can't create a dataset with `float16` features",
    "body": "## Describe the bug\r\nI can't create a dataset with `float16` features.\r\n\r\nI understand from the traceback that this is a `pyarrow` error, but I don't see anywhere in the `datasets` documentation about how to successfully do this.  Is it actually supported?  I've tried older versions of `pyarrow` as well with the same exact error.\r\n\r\nThe bug seems to arise from `datasets` casting the values to `double` and then `pyarrow` doesn't know how to convert those back to `float16`... does that sound right?  Is there a way to bypass this since it's not necessary in the `numpy` and `torch` cases?\r\n\r\nThanks!\r\n\r\n\r\n## Steps to reproduce the bug\r\nAll of the following raise the following error with the same exact (as far as I can tell) traceback:\r\n```python\r\nArrowNotImplementedError: Unsupported cast from double to halffloat using function cast_half_float\r\n```\r\n```python\r\nfrom datasets import Dataset, Features, Value\r\nDataset.from_dict({\"x\": [0.0, 1.0, 2.0]}, features=Features(x=Value(\"float16\")))\r\n\r\nimport numpy as np\r\nDataset.from_dict({\"x\": np.arange(3, dtype=np.float16)}, features=Features(x=Value(\"float16\")))\r\n\r\nimport torch\r\nDataset.from_dict({\"x\": torch.arange(3).to(torch.float16)}, features=Features(x=Value(\"float16\")))\r\n```\r\n\r\n## Expected results\r\nA dataset with `float16` features is successfully created.\r\n\r\n## Actual results\r\n\r\n```python\r\n---------------------------------------------------------------------------\r\nArrowNotImplementedError                  Traceback (most recent call last)\r\nCell In [14], line 1\r\n----> 1 Dataset.from_dict({\"x\": [1.0, 2.0, 3.0]}, features=Features(x=Value(\"float16\")))\r\n\r\nFile ~/scratch/scratch-env-39/.venv/lib/python3.9/site-packages/datasets/arrow_dataset.py:870, in Dataset.from_dict(cls, mapping, features, info, split)\r\n    865     mapping = features.encode_batch(mapping)\r\n    866 mapping = {\r\n    867     col: OptimizedTypedSequence(data, type=features[col] if features is not None else None, col=col)\r\n    868     for col, data in mapping.items()\r\n    869 }\r\n--> 870 pa_table = InMemoryTable.from_pydict(mapping=mapping)\r\n    871 if info.features is None:\r\n    872     info.features = Features({col: ts.get_inferred_type() for col, ts in mapping.items()})\r\n\r\nFile ~/scratch/scratch-env-39/.venv/lib/python3.9/site-packages/datasets/table.py:750, in InMemoryTable.from_pydict(cls, *args, **kwargs)\r\n    734 @classmethod\r\n    735 def from_pydict(cls, *args, **kwargs):\r\n    736     \"\"\"\r\n    737     Construct a Table from Arrow arrays or columns\r\n    738 \r\n   (...)\r\n    748         :class:`datasets.table.Table`:\r\n    749     \"\"\"\r\n--> 750     return cls(pa.Table.from_pydict(*args, **kwargs))\r\n\r\nFile ~/scratch/scratch-env-39/.venv/lib/python3.9/site-packages/pyarrow/table.pxi:3648, in pyarrow.lib.Table.from_pydict()\r\n\r\nFile ~/scratch/scratch-env-39/.venv/lib/python3.9/site-packages/pyarrow/table.pxi:5174, in pyarrow.lib._from_pydict()\r\n\r\nFile ~/scratch/scratch-env-39/.venv/lib/python3.9/site-packages/pyarrow/array.pxi:343, in pyarrow.lib.asarray()\r\n\r\nFile ~/scratch/scratch-env-39/.venv/lib/python3.9/site-packages/pyarrow/array.pxi:231, in pyarrow.lib.array()\r\n\r\nFile ~/scratch/scratch-env-39/.venv/lib/python3.9/site-packages/pyarrow/array.pxi:110, in pyarrow.lib._handle_arrow_array_protocol()\r\n\r\nFile ~/scratch/scratch-env-39/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py:197, in TypedSequence.__arrow_array__(self, type)\r\n    192     # otherwise we can finally use the user's type\r\n    193     elif type is not None:\r\n    194         # We use cast_array_to_feature to support casting to custom types like Audio and Image\r\n    195         # Also, when trying type \"string\", we don't want to convert integers or floats to \"string\".\r\n    196         # We only do it if trying_type is False - since this is what the user asks for.\r\n--> 197         out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type)\r\n    198     return out\r\n    199 except (TypeError, pa.lib.ArrowInvalid) as e:  # handle type errors and overflows\r\n\r\nFile ~/scratch/scratch-env-39/.venv/lib/python3.9/site-packages/datasets/table.py:1683, in _wrap_for_chunked_arrays.<locals>.wrapper(array, *args, **kwargs)\r\n   1681     return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])\r\n   1682 else:\r\n-> 1683     return func(array, *args, **kwargs)\r\n\r\nFile ~/scratch/scratch-env-39/.venv/lib/python3.9/site-packages/datasets/table.py:1853, in cast_array_to_feature(array, feature, allow_number_to_str)\r\n   1851     return array_cast(array, get_nested_type(feature), allow_number_to_str=allow_number_to_str)\r\n   1852 elif not isinstance(feature, (Sequence, dict, list, tuple)):\r\n-> 1853     return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)\r\n   1854 raise TypeError(f\"Couldn't cast array of type\\n{array.type}\\nto\\n{feature}\")\r\n\r\nFile ~/scratch/scratch-env-39/.venv/lib/python3.9/site-packages/datasets/table.py:1683, in _wrap_for_chunked_arrays.<locals>.wrapper(array, *args, **kw",
    "url": "https://github.com/huggingface/datasets/issues/4981",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2022-09-15T21:03:24Z",
    "updated_at": "2025-06-12T11:47:42Z",
    "comments": 8,
    "user": "dconathan"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 560,
    "title": "Fill some of the dataset card info automatically?",
    "body": "See https://github.com/huggingface/datasets/issues/4977: `Providing dataset size`\r\n\r\nRelated issues: https://github.com/huggingface/datasets/issues/3507#issuecomment-1033752157 and https://github.com/huggingface/datasets/issues/4876",
    "url": "https://github.com/huggingface/dataset-viewer/issues/560",
    "state": "closed",
    "labels": [
      "question",
      "feature request"
    ],
    "created_at": "2022-09-14T16:20:30Z",
    "updated_at": "2023-06-14T12:15:54Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 84988,
    "title": "Document how to use parameters in C++ modular API (was How to use torch.nn.Parameter in libtorch cpp?)",
    "body": "### \ud83d\udc1b Describe the bug\n\nHI Dear torch team:\r\n            in pytorch python env ,we always use  torch.nn.Parameter for cache some tensor variable ,like this\r\n```\r\nimport torch\r\nimport torch.nn as nn\r\n        memory_value = nn.Parameter(torch.cat([self.init_memory_value.unsqueeze(0) for _ in range(batch_size)], 0).data)\r\n        self.mem.init_value_memory(memory_value)\r\n\r\n```\r\nbut  when I  want to use cpp  libtorch  1.12.1 , I am not found  [ torch::nn::Parameter() ], I don't  how to use Parameter in libtorch cpp env, could you help me ,thanks a lot.\r\n\n\n### Versions\n\nlibtorch 1.12.1\r\ncpp 20\r\nMacOS lastest",
    "url": "https://github.com/pytorch/pytorch/issues/84988",
    "state": "closed",
    "labels": [],
    "created_at": "2022-09-14T06:31:31Z",
    "updated_at": "2022-09-16T02:59:51Z",
    "user": "mullerhai"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1355,
    "title": "\u2753 [Question] How can I add torchvision.transforms.functional.gaussian_blur to the conversion?",
    "body": "## \u2753 Question\r\n\r\nHow could I make torchvision.transforms.functional.gaussian_blur operation compatible with torch_tensorrt ?\r\n\r\n## What you have already tried\r\n\r\nHello. The last step of my forward method is to apply gaussian_blur. Unfortunately this is not compatible with this framework and I must to put it out of the forward method. If I do, the model is correctly parsed to TensorRT engine. If not, I get this error \r\n\r\n```\r\nERROR: [Torch-TensorRT TorchScript Conversion Context] - 4: (Unnamed Layer* 613) [Convolution]: two inputs (data and weights) are allowed only in explicit-quantization mode.\r\nERROR: [Torch-TensorRT TorchScript Conversion Context] - 4: [network.cpp::validateWeightedLayersInputs::2378] Error Code 4: Internal Error ((Unnamed Layer* 613) [Convolution]: Cannot set more than one input unless network has Q/DQ layers.)\r\nERROR: [Torch-TensorRT TorchScript Conversion Context] - 2: [builder.cpp::buildSerializedNetwork::636] Error Code 2: Internal Error (Assertion engine != nullptr failed. )\r\nTraceback (most recent call last):\r\n  File \"/home/jack3/tkh-projects/02-AD/code/TKHAD/kk.py\", line 78, in <module>\r\n    trt_model = torch_tensorrt.compile(\r\n  File \"/home/jack3/tkh-projects/02-AD/code/TKHAD/env/lib/python3.10/site-packages/torch_tensorrt/_compile.py\", line 115, in compile\r\n    return torch_tensorrt.ts.compile(ts_mod, inputs=inputs, enabled_precisions=enabled_precisions, **kwargs)\r\n  File \"/home/jack3/tkh-projects/02-AD/code/TKHAD/env/lib/python3.10/site-packages/torch_tensorrt/ts/_compiler.py\", line 113, in compile\r\n    compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))\r\nRuntimeError: [Error thrown at core/conversion/conversionctx/ConversionCtx.cpp:147] Building serialized network failed in TensorRT\r\n```\r\nI suppose there is any operation inside gaussian_blur incompatible, although the error is not clear for me.\r\n\r\nThis is the code that convert the model\r\n\r\n```\r\ndummy_input = torch.empty((1, 3, 224 ,224), device=torch.device('cuda'))\r\njit_model = torch.jit.trace(model, dummy_input)\r\n\r\ntrt_model = torch_tensorrt.compile(\r\n    jit_model,\r\n    \"default\",\r\n    [torch_tensorrt.Input((1, 3, 224, 224), dtype=torch.float32)],\r\n    torch.float32,\r\n    truncate_long_and_double = True\r\n)\r\n```\r\n\r\nAnd this is the part of my model with gaussian_blur\r\n\r\n```\r\nfrom torchvision.transforms.functional import gaussian_blur\r\nimport torch\r\n\r\nclass MyModel(torch.nn.Module):\r\n   def __init__(self):\r\n   ... \r\n   self.kernel = 2 * int(4.0 * 4 + 0.5) + 1\r\n\r\n    def forward(self, x: torch.Tensor):\r\n        ...\r\n        \r\n        map_scores = gaussian_blur(map_scores, [self.kernel , self.kernel ], [4, 4])\r\n        return map_scores\r\n```\r\n\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.11.0+cu113\r\n - OS (e.g., Linux): Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Python version: 3.10\r\n - CUDA version: 11.7\r\n - Torch_tensorrt Version: 1.1.0\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1355",
    "state": "closed",
    "labels": [
      "question",
      "component: converters",
      "No Activity"
    ],
    "created_at": "2022-09-13T09:34:32Z",
    "updated_at": "2023-04-23T00:02:34Z",
    "user": "mjack3"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 84923,
    "title": "[FX] How to replace torch.functional with nn.module? TypeError: forward() takes 2 positional arguments but 3 were given",
    "body": "### \ud83d\udc1b Describe the bug\n\nI would like to use `torch.fx` to replace `toirch.functional` into `nn.module` for further model optimization.\r\n\r\nExample:\r\n```Python\r\n# Original\r\nF.adaptive_avg_pool2d(x, 1)\r\n# Target\r\nnn.AdaptiveAvgPool2d(1)\r\n```\r\n\r\nHere is my code:\r\n\r\n```Python\r\nwith model.graph.inserting_before(node):\r\n    new_module_str = str(node._prev).split('_')[0] + \".adaptive_avg_pool2d\"\r\n    model.add_submodule(new_module_str, nn.AdaptiveAvgPool2d(node.args[1:]))\r\n    new_node = model.graph.call_module(new_module_str, node.args)\r\n    node.replace_all_uses_with(new_node)\r\nmodel.graph.erase_node((node))\r\n```\r\n\r\nThe generated model can be recompiled through fx \r\n```Python\r\n...\r\n  (conv1): Module(\r\n    (0): Conv2d(320, 1280, kernel_size=(1, 1), stride=(1, 1), B=1)\r\n    (1): BatchNorm2d(1280, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, B=1)\r\n    (2): ReLU6(inplace=True)\r\n    (adaptive_avg_pool2d): AdaptiveAvgPool2d(output_size=(1,))\r\n  )\r\n  (conv2): Conv2d(1280, 10, kernel_size=(1, 1), stride=(1, 1), B=1)\r\n\r\n...\r\n    conv1_0 = getattr(self.conv1, \"0\")(stage7_residual_7);  stage7_residual_7 = None\r\n    conv1_1 = getattr(self.conv1, \"1\")(conv1_0);  conv1_0 = None\r\n    conv1_2 = getattr(self.conv1, \"2\")(conv1_1);  conv1_1 = None\r\n    conv1_adaptive_avg_pool2d = self.conv1.adaptive_avg_pool2d(conv1_2, 1);  conv1_2 = None\r\n    conv2 = self.conv2(conv1_adaptive_avg_pool2d);  conv1_adaptive_avg_pool2d = None\r\n    flatten_replacement = hydro_fx_fuse_flatten_replacement(conv2, 1);  conv2 = None\r\n    return flatten_replacement\r\n```\r\n\r\nbut can not train:\r\n```bash\r\nTraceback (most recent call last):\r\n  File \"/home/xxx/cifar_fuse.py\", line 148, in <module>\r\n    train_result = train_epoch(train_loader, model, criterion, optimizer)\r\n  File \"/home/xxx/cifar_fuse.py\", line 102, in train_epoch\r\n    pred = model(X)\r\n  File \"/home/xxx/miniconda3/lib/python3.9/site-packages/torch/fx/graph_module.py\", line 652, in call_wrapped\r\n    return self._wrapped_call(self, *args, **kwargs)\r\n  File \"/home/xxx/miniconda3/lib/python3.9/site-packages/torch/fx/graph_module.py\", line 277, in __call__\r\n    raise e\r\n  File \"/home/xxx/miniconda3/lib/python3.9/site-packages/torch/fx/graph_module.py\", line 267, in __call__\r\n    return super(self.cls, obj).__call__(*args, **kwargs)  # type: ignore[misc]\r\n  File \"/home/xxx/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 1130, in _call_impl\r\n    return forward_call(*input, **kwargs)\r\n  File \"<eval_with_key>.3\", line 157, in forward\r\n  File \"/home/xxx/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py\", line 1130, in _call_impl\r\n    return forward_call(*input, **kwargs)\r\nTypeError: forward() takes 2 positional arguments but 3 were given\r\n```\r\n\n\n### Versions\n\nVersion: Pytorch 1.12.1\n\ncc @ezyang @SherlockNoMad @soumith",
    "url": "https://github.com/pytorch/pytorch/issues/84923",
    "state": "closed",
    "labels": [
      "fx"
    ],
    "created_at": "2022-09-13T06:17:55Z",
    "updated_at": "2022-09-13T07:23:46Z",
    "user": "Qinghao-Hu"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1351,
    "title": "\u2753 [Question] Not enough inputs provided (runtime.RunCudaEngine)",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\ni make a pressure test on my model compiled by torch-tensorrt, it will report errors after 5 minutes, the traceback as blow:\r\n```shell\r\n2022-09-09T09:16:01.618971735Z   File \"/component/text_detector.py\", line 135, in __call__\r\n2022-09-09T09:16:01.618975181Z     outputs = self.net(inp)\r\n2022-09-09T09:16:01.618978313Z   File \"/miniconda/envs/python36/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 1102, in _call_impl\r\n2022-09-09T09:16:01.618981965Z     return forward_call(*input, **kwargs)\r\n2022-09-09T09:16:01.618985142Z RuntimeError: The following operation failed in the TorchScript interpreter.\r\n2022-09-09T09:16:01.618988457Z Traceback of TorchScript, serialized code (most recent call last):\r\n2022-09-09T09:16:01.618991980Z   File \"code/__torch__.py\", line 8, in forward\r\n2022-09-09T09:16:01.618995305Z     input_0: Tensor) -> Tensor:\r\n2022-09-09T09:16:01.618998495Z     __torch___ModelWrapper_trt_engine_ = self_1.__torch___ModelWrapper_trt_engine_\r\n2022-09-09T09:16:01.619001820Z     _0 = ops.tensorrt.execute_engine([input_0], __torch___ModelWrapper_trt_engine_)\r\n2022-09-09T09:16:01.619005168Z          ~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n2022-09-09T09:16:01.619008442Z     _1, = _0\r\n2022-09-09T09:16:01.619011485Z     return _1\r\n2022-09-09T09:16:01.619014563Z \r\n2022-09-09T09:16:01.619017565Z Traceback of TorchScript, original code (most recent call last):\r\n2022-09-09T09:16:01.619020865Z RuntimeError: [Error thrown at core/runtime/register_trt_op.cpp:101] Expected compiled_engine->exec_ctx->allInputDimensionsSpecified() to be true but got false\r\n2022-09-09T09:16:01.619024625Z Not enough inputs provided (runtime.RunCudaEngine)\r\n```\r\nthen i get an error about cuda memory illegal access:\r\n```shell\r\n2022-09-13T02:32:46.621963863Z   File \"/component/text_detector.py\", line 136, in __call__\r\n2022-09-13T02:32:46.621966267Z     inp = inp.cuda()\r\n2022-09-13T02:32:46.621968419Z RuntimeError: CUDA error: an illegal memory access was encountered\r\n```\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\nI have tried upgrade the pytorch version from 1.10.0 to 1.10.2, also tried upgrade torch to 1.11.0 python 3.7, but it didn't works.\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.10.2\r\n - CPU Architecture: x86\r\n - OS (e.g., Linux): centos 7\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source): /\r\n - Are you using local sources or building from archives: no\r\n - Python version: 3.6\r\n - CUDA version: 11.3\r\n - GPU models and configuration:  gpu is nvidia-T4 with 16G memory\r\n - Any other relevant information:  \r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1351",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: runtime"
    ],
    "created_at": "2022-09-13T02:39:11Z",
    "updated_at": "2023-03-26T00:02:17Z",
    "user": "Pekary"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1340,
    "title": "\u2753 [Question] No improvement when I use sparse-weights? ",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n **No speed improvement when I use sparse-weights.**\r\nI just modified this notebook https://github.com/pytorch/TensorRT/blob/master/notebooks/Hugging-Face-BERT.ipynb\r\nAnd add the sparse_weights=True in the compile part. I also changed the regional bert-base model when I apply 2:4 sparse on most parts of the FC layers.\r\n![image](https://user-images.githubusercontent.com/32805624/189258468-4600a5f8-1e23-4989-806c-a031757ffbb9.png)\r\n\r\nBut whether I set the \"sparse_weights=True\", the results look like no changes.\r\nHere are some results.\r\n\r\nset sparse_weights=False\r\n![image](https://user-images.githubusercontent.com/32805624/189258701-bff96d33-d344-4365-9b94-2c4c153494ca.png)\r\n\r\nset sparse_weights=True\r\n![image](https://user-images.githubusercontent.com/32805624/189258757-9a2b2a4a-059e-4b98-bf64-8c476f94b98e.png)\r\n\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.13\r\n - CPU Architecture:x86-64\r\n - OS (e.g., Linux):Ubuntu 18.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.8\r\n - CUDA version: 11.7.1\r\n - GPU models and configuration: Nvidia A100 GPU & CUDA Driver Version 515.65.01\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n![image](https://user-images.githubusercontent.com/32805624/189259139-954863df-b625-4de5-8913-c43cea4c2361.png)\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1340",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "performance"
    ],
    "created_at": "2022-09-09T02:26:48Z",
    "updated_at": "2023-03-26T00:02:17Z",
    "user": "wzywzywzy"
  },
  {
    "repo": "pytorch/vision",
    "number": 6545,
    "title": "add quantized vision transformer model",
    "body": "### \ud83d\ude80 The feature\n\nhi, thanks for your great work. I hope to be able to add quantized vit model (for ptq or qat).\n\n### Motivation, pitch\n\nIn 'torchvision/models/quantization', there are several quantized model (Eager Mode Quantization) that is very useful for me to learn quantization. In recent years, Transformer model is very popular. I want to learn how to quantized Transformer model, e.g Vision Transformer, Swin Transformer etc, using pytorch official tools like Eager Mode Quantization. I also tried to modify it myself, but failed. I don't know how to quantify 'pos_embedding' (nn.Parameter) and nn.MultiheadAttention module. look forward to your reply.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/6545",
    "state": "open",
    "labels": [
      "question",
      "module: models.quantization"
    ],
    "created_at": "2022-09-08T09:34:33Z",
    "updated_at": "2022-09-09T11:17:45Z",
    "user": "WZMIAOMIAO"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4944,
    "title": "larger dataset, larger GPU memory in the training phase? Is that correct?",
    "body": "    from datasets import set_caching_enabled\r\n    set_caching_enabled(False)\r\n    for ds_name in [\"squad\",\"newsqa\",\"nqopen\",\"narrativeqa\"]:\r\n            train_ds = load_from_disk(\"../../../dall/downstream/processedproqa/{}-train.hf\".format(ds_name))\r\n\r\n        break\r\n    train_ds = concatenate_datasets([train_ds,train_ds,train_ds,train_ds]) #operation 1\r\n\r\n\r\n   trainer = QuestionAnsweringTrainer( #huggingface trainer\r\n        model=model,\r\n        args=training_args,\r\n        train_dataset=train_ds,\r\n        eval_dataset= None,\r\n        eval_examples=None,\r\n        answer_column_name=answer_column,\r\n        dataset_name=\"squad\",\r\n        tokenizer=tokenizer,\r\n        data_collator=data_collator,\r\n        compute_metrics=compute_metrics if training_args.predict_with_generate else None,\r\n    )\r\n\r\nwith operation 1, the GPU memory increases from 16G to 23G",
    "url": "https://github.com/huggingface/datasets/issues/4944",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-09-07T08:46:30Z",
    "updated_at": "2022-09-07T12:34:58Z",
    "comments": 2,
    "user": "debby1103"
  },
  {
    "repo": "pytorch/vision",
    "number": 6543,
    "title": "Inconsistent use of FrozenBatchNorm in Faster-RCNN?",
    "body": "Hi,\r\nwhile customizing and training a Faster-RCNN object detection model based on `torchvision.models.detection.faster_rcnn`, I've noticed that the pre-trained model of type `fasterrcnn_resnet50_fpn_v2` always use `nn.BatchNorm2d` normalization layers, while `fasterrcnn_resnet50_fpn` uses `torchvision.models.ops.misc.FrozenBatchNorm2d` when pretrained weights are loaded. I've noticed deteriorating performance of the V2 model when training a COCO pretrained model with low batch size. I am suspecting that this is related to the un-frozen `nn.BatchNorm2d` layers, and indeed, replacing `nn.BatchNorm2d` with `torchvision.models.ops.misc.FrozenBatchNorm2d` improves the performance for my task. \r\n\r\nThus, my question is: Is this discrepancy in normalization layers intentional, and if yes what could be other reasons for V2 model underperforming compared to the V1 model?\r\n\r\nI'm using pytorch 1.12, torchvision 0.13.\r\n\r\nThanks!\n\ncc @datumbox",
    "url": "https://github.com/pytorch/vision/issues/6543",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2022-09-07T08:16:00Z",
    "updated_at": "2024-06-23T16:24:37Z",
    "user": "MoPl90"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4942,
    "title": "Trec Dataset has incorrect labels",
    "body": "## Describe the bug\r\nBoth coarse and fine labels seem to be out of line.\r\n\r\n\r\n## Steps to reproduce the bug\r\n```python\r\nfrom datasets import load_dataset\r\n\r\ndataset = \"trec\"\r\nraw_datasets = load_dataset(dataset)\r\ndf = pd.DataFrame(raw_datasets[\"test\"])\r\ndf.head()\r\n```\r\n\r\n## Expected results\r\ntext (string) | coarse_label (class label) | fine_label (class label)\r\n-- | -- | --\r\nHow far is it from Denver to Aspen ? | 5  \t(NUM) | 40  \t(NUM:dist)\r\nWhat county is Modesto , California in ? | 4  \t(LOC) | 32  \t(LOC:city)\r\nWho was Galileo ? | 3  \t(HUM) | 31  \t(HUM:desc)\r\nWhat is an atom ? | 2  \t(DESC) | 24  \t(DESC:def)\r\nWhen did Hawaii become a state ? | 5  \t(NUM) | 39  \t(NUM:date)\r\n\r\n## Actual results\r\n  index | label-coarse  |label-fine                  |                    text\r\n-- |-- | -- | --\r\n0    |         4     |     40     | How far is it from Denver to Aspen ?\r\n1      |       5        |  21  | What county is Modesto , California in ?\r\n2        |     3        |  12        |                 Who was Galileo ?\r\n3         |    0       |    7         |                What is an atom ?\r\n4         |    4       |    8       |   When did Hawaii become a state ?\r\n\r\n## Environment info\r\n\r\n- `datasets` version: 2.4.0\r\n- Platform: Linux-5.4.0-1086-azure-x86_64-with-glibc2.27\r\n- Python version: 3.9.13\r\n- PyArrow version: 8.0.0\r\n- Pandas version: 1.4.3\r\n\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4942",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-09-06T22:13:40Z",
    "updated_at": "2022-09-08T11:12:03Z",
    "comments": 1,
    "user": "wmpauli"
  },
  {
    "repo": "pytorch/data",
    "number": 763,
    "title": "Online doc for DataLoader2/ReadingService and etc.",
    "body": "### \ud83d\udcda The doc issue\n\nAs we are preparing the next release with `DataLoader2`, we might need to add a few pages for `DL2`, `ReadingService` and all other related functionalities in https://pytorch.org/data/main/\r\n\r\n- [x] DataLoader2\r\n- [x] ReadingService\r\n- [x] Adapter\r\n- [ ] Linter\r\n- [x] Graph function\r\n- [ ] \n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/763",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-09-06T15:37:49Z",
    "updated_at": "2022-11-15T15:13:49Z",
    "comments": 4,
    "user": "ejguan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1335,
    "title": "[Question? Bug?] Tried to allocate 166.38 GiB, seems weird",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nI got errors\r\n```\r\n    model_new_trt = trt.compile(\r\n  File \"/opt/conda/lib/python3.8/site-packages/torch_tensorrt/_compile.py\", line 109, in compile\r\n    return torch_tensorrt.ts.compile(ts_mod, inputs=inputs, enabled_precisions=enabled_precisions, **kwargs)\r\n  File \"/opt/conda/lib/python3.8/site-packages/torch_tensorrt/ts/_compiler.py\", line 113, in compile\r\n    compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))\r\nRuntimeError: The following operation failed in the TorchScript interpreter.\r\nTraceback of TorchScript (most recent call last):\r\n            %1 : bool = prim::Constant[value=0]()\r\n            %2 : int[] = prim::Constant[value=[0, 0, 0]]()\r\n            %4 : Tensor = aten::_convolution(%x, %w, %b, %s, %p, %d, %1, %2, %g, %1, %1, %1, %1)\r\n                          ~~~~ <--- HERE\r\n            return (%4)\r\nRuntimeError: CUDA out of memory. Tried to allocate 166.38 GiB (GPU 0; 31.75 GiB total capacity; 1.31 GiB already allocated; 29.14 GiB free; 1.53 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF\r\n```\r\n\r\nConverting Script\r\n``` \r\n\r\n    model_new_trt = trt.compile(\r\n        model_new,\r\n        inputs=[trt.Input(\r\n            min_shape=[1, 1, 210, 748, 748],\r\n            opt_shape=[1, 1, 210, 748, 748],\r\n            max_shape=[1, 1, 210, 748, 748],\r\n            dtype=torch.float32\r\n        )],\r\n    )\r\n```\r\n\r\nMy model takes 28GB on inference forward.\r\nBut the 166GB so huge, is this correct memory usage?\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n - Docker :  nvcr.io/nvidia/pytorch:22.07-py3\r\n - TRT : 1.2.0a0\r\n - GPU models and configuration: V100 32GB\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1335",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: partitioning"
    ],
    "created_at": "2022-09-06T15:16:41Z",
    "updated_at": "2022-12-26T00:02:39Z",
    "user": "zsef123"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4936,
    "title": "vivos (Vietnamese speech corpus) dataset not accessible",
    "body": "## Describe the bug\r\nVIVOS data is not accessible anymore, neither of these links work (at least from France):\r\n* https://ailab.hcmus.edu.vn/assets/vivos.tar.gz (data)\r\n* https://ailab.hcmus.edu.vn/vivos (dataset page) \r\n\r\nTherefore `load_dataset` doesn't work.\r\n\r\n## Steps to reproduce the bug\r\n```python\r\nds = load_dataset(\"vivos\")\r\n```\r\n\r\n## Expected results\r\ndataset loaded\r\n\r\n## Actual results\r\n```\r\nConnectionError: Couldn't reach https://ailab.hcmus.edu.vn/assets/vivos.tar.gz (ConnectionError(MaxRetryError(\"HTTPSConnectionPool(host='ailab.hcmus.edu.vn', port=443): Max retries exceeded with url: /assets/vivos.tar.gz (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f9d8a27d190>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))\")))\r\n```\r\n\r\nWill try to contact the authors, as we wanted to use Vivos as an example in documentation on how to create scripts for audio datasets (https://github.com/huggingface/datasets/pull/4872), because it's small and straightforward and uses tar archives. ",
    "url": "https://github.com/huggingface/datasets/issues/4936",
    "state": "closed",
    "labels": [
      "dataset bug"
    ],
    "created_at": "2022-09-06T13:17:55Z",
    "updated_at": "2022-09-21T06:06:02Z",
    "comments": 3,
    "user": "polinaeterna"
  },
  {
    "repo": "pytorch/data",
    "number": 762,
    "title": "Allow Header(limit=None) ?",
    "body": "Not urgent at all, just a minor suggestion:\r\n\r\nIn the benchmark scripts I'm currently running I want to limit the number of samples in a data-pipe according to an `args.limit` CLI parameter. I'd be nice to be able to just write:\r\n\r\n```py\r\ndp = Header(dp, limit=args.limit)\r\n```\r\n\r\nand let `Header` be a no-op when `limit=None`. This might be a bit niche, and the alternative is to just protect the call in a `if` block, so I would totally understand if this isn't in scope (and it's really not urgent in any case)",
    "url": "https://github.com/meta-pytorch/data/issues/762",
    "state": "closed",
    "labels": [
      "good first issue"
    ],
    "created_at": "2022-09-06T11:04:57Z",
    "updated_at": "2022-12-06T20:20:58Z",
    "comments": 4,
    "user": "NicolasHug"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4932,
    "title": "Dataset Viewer issue for bigscience-biomedical/biosses",
    "body": "### Link\n\nhttps://huggingface.co/datasets/bigscience-biomedical/biosses\n\n### Description\n\nI've just been working on adding the dataset loader script to this dataset and working with the relative imports. I'm not sure how to interpret the error below (show where the dataset preview used to be) . \r\n```\r\nStatus code:   400\r\nException:     ModuleNotFoundError\r\nMessage:       No module named 'datasets_modules.datasets.bigscience-biomedical--biosses.ddbd5893bf6c2f4db06f407665eaeac619520ba41f69d94ead28f7cc5b674056.bigbiohub'\r\n```\n\n### Owner\n\nYes",
    "url": "https://github.com/huggingface/datasets/issues/4932",
    "state": "closed",
    "labels": [],
    "created_at": "2022-09-05T22:40:32Z",
    "updated_at": "2022-09-06T14:24:56Z",
    "comments": 4,
    "user": "galtay"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 84553,
    "title": "[ONNX] Change how context is given to symbolic functions",
    "body": "Current symbolic functions can take a context as an input, pushing graphs to the second argument. To support these functions, we need to annotate the first argument as symbolic context and tell them part in call time by examining the annotations. \r\n\r\nChecking annotations is slow and this process complicates the logic in the caller. \r\n\r\nInstead we can wrap the graph object in a GraphContext, exposing all methods used from the graph and include the context in the GraphContext. This way all the old symbolic functions continue to work and we do not need to do the annotation checking if we know the symbolic function is a \"new function\". \r\n\r\nWe can edit a private field in the functions at registration time to tag them as \"new style\" symbolic functions that always takes a wrapped Graph with context object as input.\r\n\r\nThis also has the added benefit where we no longer need to monkey patch the Graph object to expose the g.op method. Instead the method can be defined in the graph context object. ",
    "url": "https://github.com/pytorch/pytorch/issues/84553",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged",
      "topic: improvements"
    ],
    "created_at": "2022-09-05T22:04:52Z",
    "updated_at": "2022-09-28T22:56:39Z",
    "user": "justinchuby"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1332,
    "title": "\u2753 [Question] Using torch-trt to test bert's qat quantitative model",
    "body": "## \u2753 Question\r\n\r\nWhen using torch-trt to test Bert's qat quantization ( https://zenodo.org/record/4792496#.YxGrdRNBy3J ) model, I encountered many FakeTensorQuantFunction nodes in the pass, and at the same time triggered many nodes that could not convert TRT, and split the graph into many subgraphs\r\n![image](https://user-images.githubusercontent.com/17673134/188449461-55791f9e-884a-4961-b861-7b82110c0db2.png)\r\n\r\n![image](https://user-images.githubusercontent.com/17673134/188449320-cf8e345d-25af-4d0f-b7af-78e94750da73.png)\r\n\r\nquestion:\r\n1. Can you tell me how to explain the nodes that appear in the pass, and how to explain the symbols (^) in front of these nodes?\r\n2. How can these quantization nodes be converted into qat nodes corresponding to torch-trt\uff08 https://github.com/pytorch/TensorRT/blob/master/core/conversion/converters/impl/quantization.cpp \uff09?",
    "url": "https://github.com/pytorch/TensorRT/issues/1332",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: quantization"
    ],
    "created_at": "2022-09-05T12:35:41Z",
    "updated_at": "2023-03-25T00:02:27Z",
    "user": "lixiaolx"
  },
  {
    "repo": "pytorch/serve",
    "number": 1851,
    "title": "High utilization of hardware ",
    "body": "HI, I'm trying to use torchserve as a backend with a custom hardware setup. How do you suggest to run such that the hardware is maximally utilized? For example I tried using the benchmarks-ab.py script to test the server for throughput on resnet18 but only achieved ~200 requests per second (tried different batch sizes) while the hardware is capable of crunching at least 10,000 images per second.\r\n\r\nThanks for any help.",
    "url": "https://github.com/pytorch/serve/issues/1851",
    "state": "closed",
    "labels": [
      "question",
      "triaged"
    ],
    "created_at": "2022-09-05T05:15:29Z",
    "updated_at": "2022-09-08T09:13:40Z",
    "user": "Vert53"
  },
  {
    "repo": "pytorch/data",
    "number": 761,
    "title": "Would TorchData provide GPU support for loading and preprocessing images?  ",
    "body": "### \ud83d\ude80 The feature\n\nWould TorchData provide GPU support for loading and preprocessing images?  \n\n### Motivation, pitch\n\nWhen I am learning PyTorch,  I find, currently, it do not support using GPU to load images or any other transforms of preprocessing and encoding data.\r\nI want to know whether this would be taken into consideration into the design of TorchData.\n\n### Alternatives\n\nCurrently, NVIDIA-DALI is an impressive alternative for loading and preprocessing images with GPU.\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/761",
    "state": "open",
    "labels": [
      "topic: new feature",
      "triaged"
    ],
    "created_at": "2022-09-03T09:16:30Z",
    "updated_at": "2022-11-21T20:06:25Z",
    "comments": 5,
    "user": "songyuc"
  },
  {
    "repo": "pytorch/serve",
    "number": 1842,
    "title": "initial parameters transmit",
    "body": "### \ud83d\ude80 The feature\n\nhow transmit the initial parameters from the first model to laters in workflow.\n\n### Motivation, pitch\n\nhow transmit the initial parameters from the first model to laters in workflow.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/1842",
    "state": "open",
    "labels": [
      "question",
      "triaged_wait",
      "workflowx"
    ],
    "created_at": "2022-09-02T14:51:38Z",
    "updated_at": "2022-09-06T10:42:39Z",
    "user": "jack-gits"
  },
  {
    "repo": "pytorch/serve",
    "number": 1841,
    "title": "how to register a workflow directly when docker is started.",
    "body": "### \ud83d\ude80 The feature\n\nhow to register a workflow directly when docker is started.\n\n### Motivation, pitch\n\nhow to register a workflow directly when docker is started.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/1841",
    "state": "open",
    "labels": [
      "help wanted",
      "triaged",
      "workflowx"
    ],
    "created_at": "2022-09-02T14:21:34Z",
    "updated_at": "2023-11-15T06:49:21Z",
    "user": "jack-gits"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4924,
    "title": "Concatenate_datasets loads everything into RAM",
    "body": "## Describe the bug\r\nWhen loading the datasets seperately and saving them on disk, I want to concatenate them. But `concatenate_datasets` is filling up my RAM and the process gets killed. Is there a way to prevent this from happening or is this intended behaviour? Thanks in advance\r\n\r\n## Steps to reproduce the bug\r\n```python\r\ngcs = gcsfs.GCSFileSystem(project='project')\r\ndatasets = [load_from_disk(f'path/to/slice/of/data/{i}', fs=gcs, keep_in_memory=False) for i in range(10)]\r\n\r\ndataset = concatenate_datasets(datasets)\r\n```\r\n\r\n## Expected results\r\nA concatenated dataset which is stored on my disk.\r\n\r\n## Actual results\r\nConcatenated dataset gets loaded into RAM and overflows it which gets the process killed.\r\n\r\n## Environment info\r\n<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->\r\n- `datasets` version: 2.4.0\r\n- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10\r\n- Python version: 3.8.13\r\n- PyArrow version: 8.0.1\r\n- Pandas version: 1.4.3",
    "url": "https://github.com/huggingface/datasets/issues/4924",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-09-01T10:25:17Z",
    "updated_at": "2022-09-01T11:50:54Z",
    "comments": 0,
    "user": "louisdeneve"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1328,
    "title": "\u2753 [Question] How do you ....? ",
    "body": "## \u2753 Question\r\n\r\nHi,\r\n\r\nI am trying to use torch-tensorrt to optimize my model for inference. I first compile the model with torch.jit.script and then covnert it to tesnsorrt. \r\n\r\n```shell\r\nmodel = MoViNet(movinet_c.MODEL.MoViNetA0)\r\nmodel.eval().cuda()\r\nscripted_model = torch.jit.script(model)\r\ntrt_model = torch_tensorrt.compile(model,\r\n                inputs = [torch_tensorrt.Input((8, 3, 16, 344, 344))],\r\n                enabled_precisions= {torch.half}, # Run with FP16\r\n                workspace_size= 1 << 20,\r\n                truncate_long_and_double=True,\r\n                require_full_compilation=True, #True\r\n            )\r\n```\r\n\r\nHowever, the tensorrt model has almost the same speed as the regular PyTorch model. And the torchscript model is about 2 times slower:\r\n\r\n```shell\r\ncur_time = time.time()\r\nwith torch.inference_mode():\r\n    for _ in range(100):\r\n        x = torch.rand(4, 3, 16, 344, 344).cuda()\r\n        detections_batch = model(x)\r\nprint(time.time() - cur_time) #11.20 seconds\r\n\r\ncur_time = time.time()\r\nwith torch.inference_mode():\r\n    scripted_model(x)\r\n    for _ in range(100):\r\n        x = torch.rand(4, 3, 16, 344, 344).cuda()\r\n        detections_batch = scripted_model(x)\r\nprint(time.time() - cur_time) #23.76 seconds\r\n\r\ncur_time = time.time()\r\nwith torch.inference_mode():\r\n    trt_model(x)\r\n    for _ in range(100):\r\n        x = torch.rand(4, 3, 16, 344, 344).cuda()\r\n        detections_batch = trt_model(x)\r\nprint(time.time() - cur_time) #11.01 seconds \r\n```\r\nI'd really appreciate it if someone can help me understand what could be causing this issue.\r\n\r\n## What you have already tried\r\n\r\nI tried compiling and converting the model layer by layer and it doesn't seem like there is a specific operation or layer that takes too much time, however, each layer adds a little bit (0.5 seconds) to the runtime of the scripted model while it only adds about 0.01 to the runtime of the regular PyTorch model. \r\n\r\n## Environment\r\n\r\nTorch-TensorRT Version: 1.1.0\r\nPyTorch Version: 1.11.0+cu113\r\nCPU Architecture: x86_64\r\nOS: Ubuntu 20.04\r\nHow you installed PyTorch: pip\r\nPython version: 3.8\r\nCUDA version: 11.3\r\nGPU models and configuration: NVIDIA GeForce RTX 3070\r\n\r\n## Additional context\r\n\r\nThis is the model. It's taken from here: [MoViNet-pytorch/models.py at main \u00b7 Atze00/MoViNet-pytorch \u00b7 GitHub](https://github.com/Atze00/MoViNet-pytorch/blob/main/movinets/models.py) \r\nI made some changes to resolve the errors I was getting from torch.jit.script and torch-tensorrt.\r\n```shell\r\nclass Swish(nn.Module):\r\n    def __init__(self) -> None:\r\n        super().__init__()\r\n\r\n    def forward(self, x: Tensor) -> Tensor:\r\n        return x * torch.sigmoid(x)\r\n\r\nclass Conv3DBNActivation(nn.Sequential):\r\n    def __init__(\r\n                 self,\r\n                 in_planes: int,\r\n                 out_planes: int,\r\n                 *,\r\n                 kernel_size: Union[int, Tuple[int, int, int]],\r\n                 padding: Union[int, Tuple[int, int, int]],\r\n                 stride: Union[int, Tuple[int, int, int]] = 1,\r\n                 groups: int = 1,\r\n                 norm_layer: Optional[Callable[..., nn.Module]] = None,\r\n                 activation_layer: Optional[Callable[..., nn.Module]] = None,\r\n                 **kwargs: Any,\r\n                 ) -> None:\r\n        super().__init__()\r\n\r\n        kernel_size = _triple(kernel_size)\r\n        stride = _triple(stride)\r\n        padding = _triple(padding)\r\n        if norm_layer is None:\r\n            norm_layer = nn.Identity\r\n        if activation_layer is None:\r\n            activation_layer = nn.Identity\r\n        self.kernel_size = kernel_size\r\n        self.stride = stride\r\n\r\n        dict_layers = OrderedDict({\r\n                                \"conv3d\": nn.Conv3d(in_planes, out_planes,\r\n                                                    kernel_size=kernel_size,\r\n                                                    stride=stride,\r\n                                                    padding=padding,\r\n                                                    groups=groups,\r\n                                                    **kwargs),\r\n                                \"norm\": norm_layer(out_planes, eps=0.001),\r\n                                \"act\": activation_layer()\r\n                                })\r\n\r\n        self.out_channels = out_planes\r\n        self.seq_layer = nn.Sequential(dict_layers)\r\n        # super(Conv3DBNActivation, self).__init__(dict_layers)\r\n        \r\n    def forward(self, input):\r\n        return self.seq_layer(input)\r\n\r\nclass ConvBlock3D(nn.Module):\r\n    def __init__(\r\n            self,\r\n            in_planes: int,\r\n            out_planes: int,\r\n            *,\r\n            kernel_size: Union[int, Tuple[int, int, int]],\r\n            conv_type: str,\r\n            padding: Union[int, Tuple[int, int, int]] = 0,\r\n            stride: Union[int, Tuple[int, int, int]] = 1,\r\n            norm_layer: Optional[Callable[..., nn.Module]] = None,\r\n            activation_layer: Optio",
    "url": "https://github.com/pytorch/TensorRT/issues/1328",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "performance"
    ],
    "created_at": "2022-08-31T15:06:50Z",
    "updated_at": "2022-12-12T00:03:55Z",
    "user": "ghazalehtrb"
  },
  {
    "repo": "pytorch/data",
    "number": 756,
    "title": "[RFC] More support for functionalities from `itertools`",
    "body": "### \ud83d\ude80 The feature\r\n\r\nOver time, we have received more and more request for additional `IterDataPipe` (e.g. #648, #754, plus many more). Sometimes, these functionalities are very similar to what is already implemented in [`itertools`](https://docs.python.org/3/library/itertools.html) and [`more-itertools`](https://github.com/more-itertools/more-itertools).\r\n\r\nKeep adding more `IterDataPipe` one at a time seems unsustainable(?). Perhaps, we should draw a line somewhere or provide better interface for users to directly use functions from `itertools`. At the same time, providing APIs with names that are already familiar to Python users can improve the user experience. As @msaroufim mentioned, the Core library does aim to match operators with what is available in `numpy`.\r\n\r\nWe will need to decide on:\r\n1. Coverage - which set of functionalities should we officially in `torchdata`?\r\n2. Implementation - how will users be able to invoke those functions?\r\n\r\n### Coverage\r\n\r\n0. Arbitrary based on estimated user requests/contributions\r\n1. `itertools` ~20 functions (some of which already exist in `torchdata`)\r\n    - **This seems common enough and reasonable?**\r\n2. `more-itertools` ~100 functions?\r\n    - This is probably too much.\r\n\r\nIf we provide a good wrapper, we might not need to worry about the actual coverage too much?\r\n\r\n### Implementation\r\n\r\n0. Keep adding each function as a new `IterDataPipe`\r\n     - This is what we have been doing. We can keep doing that but the cost of maintenance will increase over time.\r\n\r\nCurrently, you can use `IterableWrapper`, but it doesn't always work well since it accepts an iterable, and an iterable doesn't guarantee to restart if you call `iter()` on it again.\r\n\r\n```python\r\nfrom torchdata.datapipes.iter import IterableWrapper\r\nfrom itertools import accumulate\r\n\r\nsource_dp = IterableWrapper(range(10))\r\ndp3 = IterableWrapper(accumulate(source_dp), deepcopy=False)\r\nlist(dp3)  # [0, 1, 3, 6, 10, 15, 21, 28, 36, 45]\r\nlist(dp3)  # []\r\n```\r\nOne idea to work around that is to:\r\n1. Provide a different wrapper that accepts a `Callable` that returns an `Iterable`, which will be iterated over\r\n    - Users can use `functool.partial` to pass in arguments (including `DataPipes` if desired)\r\n    - **I personally think we should do this since the cost of doing so is low and unlocks other possibilities.**\r\n\r\n2. Create an `Itertools` DataPipe that delegates other DataPipes, it might look some like this:\r\n\r\n```python\r\nclass ItertoolsIterDataPipe(IterDataPipe):\r\n\r\n    supported_operations: Dict[str, Callable] = {\r\n        \"repeat\": Repeater,\r\n        \"chain\": Concater,\r\n        \"filterfalse\": filter_false_constructor,\r\n        # most/all 20 `itertools` functions here?\r\n    }\r\n\r\n    def __new__(cls, name, *args, **kwargs):\r\n        if name not in cls.supported_operations:\r\n            raise RuntimeError(\"Operator is not supported\")\r\n        constructor = cls.supported_operations[name]\r\n        return constructor(*args, **kwargs)\r\n\r\nsource_dp = IterableWrapper(range(10))\r\ndp1 = source_dp.filter(lambda x: x >= 5)\r\ndp2 = ItertoolsIterDataPipe(\"filterfalse\", source_dp, lambda x: x >= 5)\r\n\r\nlist(dp1)  # [5, 6, 7, 8, 9]\r\nlist(dp2)  # [0, 1, 2, 3, 4]\r\n```\r\n\r\nThese options are incomplete. If you have more ideas, please comment below.\r\n\r\n### Motivation, pitch\r\n\r\nThese functionalities are commonly used and can be valuable for users.\r\n\r\n### Additional context\r\n\r\nCredit to @NicolasHug @msaroufim @pmeier and many others for past feedback and discussion related to this topic.\r\n\r\ncc: @VitalyFedyunin @ejguan ",
    "url": "https://github.com/meta-pytorch/data/issues/756",
    "state": "open",
    "labels": [],
    "created_at": "2022-08-30T21:30:19Z",
    "updated_at": "2022-09-08T06:54:28Z",
    "comments": 5,
    "user": "NivekT"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1322,
    "title": "Error when I'm trying to use torch-tensorrt",
    "body": "## \u2753 Question\r\n\r\nHi\r\nI'm trying to use torch-tensorrt with the pre built ngc container\r\n\r\n\r\nI built it with 22.04 branch  and with 22.04 version of ngc\r\nMy versions are:\r\ncuda  10.2\r\ntorchvision  0.13.1\r\ntorch 1.12.1\r\n\r\nBut I get that error:\r\nTraceback (most recent call last):\r\n  File \"main.py\", line 31, in <module>\r\n    import torch_tensorrt\r\n  File \"/usr/local/lib/python3.8/dist-packages/torch_tensorrt/__init__.py\", line 11, in <module>\r\n    from torch_tensorrt._compile import *\r\n  File \"/usr/local/lib/python3.8/dist-packages/torch_tensorrt/_compile.py\", line 2, in <module>\r\n    from torch_tensorrt import _enums\r\n  File \"/usr/local/lib/python3.8/dist-packages/torch_tensorrt/_enums.py\", line 1, in <module>\r\n    from torch_tensorrt._C import dtype, DeviceType, EngineCapability, TensorFormat\r\nImportError: /usr/local/lib/python3.8/dist-packages/torch_tensorrt/lib/libtorchtrt.so: undefined symbol: _ZNK3c1010TensorImpl36is_contiguous_nondefault_policy_implENS_12MemoryFormatE\r\n\r\n\r\n\r\nThank's!!",
    "url": "https://github.com/pytorch/TensorRT/issues/1322",
    "state": "closed",
    "labels": [
      "question",
      "channel: NGC"
    ],
    "created_at": "2022-08-30T13:09:18Z",
    "updated_at": "2022-12-15T17:43:52Z",
    "user": "EstherMalam"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 267,
    "title": "Non-squared Image shape",
    "body": "Is it possible to use diffusers on non-squared images?\r\nThat would be a very interesting feature! ",
    "url": "https://github.com/huggingface/diffusers/issues/267",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-08-29T01:29:33Z",
    "updated_at": "2022-09-13T15:57:36Z",
    "user": "LucasSilvaFerreira"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1011,
    "title": "memory_efficient_fusion leads to RuntimeError for higher-order gradients calculation. RuntimeError: You are attempting to call Tensor.requires_grad_() ",
    "body": "Hi All,\r\n\r\nI've tried improving the speed of my code via using `memory_efficient_fusion`, however, it leads to `Tensor.requires_grad_()` error and I have no idea why. The error is as follows,\r\n```\r\nRuntimeError: You are attempting to call Tensor.requires_grad_() (or perhaps using torch.autograd.functional.* APIs) inside of a function being transformed by a functorch transform. This is unsupported, please attempt to use the functorch transforms (e.g. grad, vjp, jacrev, jacfwd, hessian) or call requires_grad_() outside of a function being transformed instead.\r\n```\r\n\r\nI've attached a 'minimal' reproducible example of this behaviour below. I've tried a few different things but nothing's seems to have worked. I did see in #840 `memory_efficient_fusion` is done within a context manager, however, when using that I get the same error. \r\n\r\nThanks in advance! \r\n\r\nEDIT: When I tried running it, it tried to use the `networkx` package but that wasn't installed by default. So, I had to manually install that (which wasn't a problem), just not sure if installing from source should also include install those packages as well! \r\n\r\n```\r\nimport torch\r\nfrom torch import nn\r\n\r\nimport functorch\r\nfrom functorch import make_functional, vmap, jacrev, grad\r\nfrom functorch.compile import memory_efficient_fusion\r\n\r\nimport time\r\n\r\n_ = torch.manual_seed(1234)\r\n\r\n#version info\r\nprint(\"PyTorch version:   \", torch.__version__)\r\nprint(\"CUDA version:      \", torch.version.cuda)\r\nprint(\"FuncTorch version: \", functorch.__version__)\r\n\r\n#=============================================#\r\n\r\n#time with torch synchronization\r\ndef sync_time() -> float:\r\n  torch.cuda.synchronize()\r\n  return time.perf_counter()\r\n\r\nclass model(nn.Module):\r\n\r\n  def __init__(self, num_inputs, num_hidden):\r\n    super(model, self).__init__()\r\n    \r\n    self.num_inputs=num_inputs\r\n    self.func = nn.Tanh()\r\n    \r\n    self.fc1 = nn.Linear(2, num_hidden)\r\n    self.fc2 = nn.Linear(num_hidden, num_inputs)\r\n  \r\n  def forward(self, x):\r\n    \"\"\"\r\n    Takes x in [B,A,1] and maps it to sign/logabsdet value in Tuple([B,], [B,])\r\n    \"\"\"\r\n    \r\n    idx=len(x.shape)             #creates args for repeat if vmap is used or not\r\n    rep=[1 for _ in range(idx)]\r\n    rep[-2] = self.num_inputs\r\n    g = x.mean(dim=(idx-2), keepdim=True).repeat(*rep)\r\n    f = torch.cat((x,g), dim=-1)\r\n\r\n    h = self.func(self.fc1(f))\r\n    \r\n    mat = self.fc2(h)\r\n    sgn, logabs = torch.linalg.slogdet(mat)\r\n    return sgn, logabs\r\n\r\n#=============================================#\r\n\r\nB=4096 #batch\r\nN=2    #input nodes\r\nH=64   #number of hidden nodes\r\ndevice = torch.device('cuda')\r\n\r\nx = torch.randn(B, N, 1, device=device) #input data\r\n\r\nnet = model(N, H) #our model\r\nnet=net.to(device)\r\n\r\nfnet, params = make_functional(net)\r\n\r\ndef calc_logabs(params, x):\r\n  _, logabs = fnet(params, x)\r\n  return logabs\r\n\r\ndef calc_dlogabs_dx(params, x):\r\n  dlogabs_dx = jacrev(func=calc_logabs, argnums=1)(params, x)\r\n  return dlogabs_dx, dlogabs_dx #return aux\r\n\r\ndef local_kinetic_from_log_vmap(params, x):\r\n  d2logabs_dx2, dlogabs_dx = jacrev(func=calc_dlogabs_dx, argnums=1, has_aux=True)(params, x)\r\n  _local_kinetic = -0.5*(d2logabs_dx2.diagonal(0,-4,-2).sum() + dlogabs_dx.pow(2).sum())\r\n  return _local_kinetic \r\n\r\n#memory efficient fusion here\r\n#with torch.jit.fuser(\"fuser2\"): is this needed (from functorch/issues/840)\r\nps_elocal = grad(local_kinetic_from_log_vmap, argnums=0)\r\nps_elocal_fusion = memory_efficient_fusion(grad(local_kinetic_from_log_vmap, argnums=0))\r\n\r\n#ps_elocal_fusion(params, x) #no vmap attempt (throws size mis-match error)\r\n\r\nt1=sync_time()\r\n\r\nvmap(ps_elocal, in_dims=(None, 0))(params, x) #works fine \r\n\r\nt2=sync_time()\r\n\r\nvmap(ps_elocal_fusion, in_dims=(None, 0))(params, x) #error (crashes on this line)\r\n\r\nt3=sync_time()\r\n\r\nprint(\"Laplacian (standard): %4.2e (s)\",t2-t1)\r\nprint(\"Laplacian (fusion):   %4.2e (s)\",t3-t2)\r\n```",
    "url": "https://github.com/pytorch/functorch/issues/1011",
    "state": "open",
    "labels": [],
    "created_at": "2022-08-28T16:56:02Z",
    "updated_at": "2022-12-22T19:59:22Z",
    "comments": 3,
    "user": "AlphaBetaGamma96"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1010,
    "title": "Multiple gradient calculation for single sample",
    "body": "[According to the README](https://github.com/pytorch/functorch#working-with-nn-modules-make_functional-and-friends), we are able to calculate **per-sample-gradients** with functorch.\r\n\r\nBut what if we want to get multiple gradients for a **single sample**? For example, imagine that we are calculating multiple losses.\r\n\r\nWe can split each loss calculation as a different sample, but that implementation is inefficient, especially when the forward pass is expensive. Can we at least re-use forward computations?",
    "url": "https://github.com/pytorch/functorch/issues/1010",
    "state": "closed",
    "labels": [],
    "created_at": "2022-08-28T14:31:11Z",
    "updated_at": "2023-01-08T10:23:04Z",
    "comments": 23,
    "user": "JoaoLages"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1317,
    "title": "caffe2",
    "body": "Why don't you install caffe2 with pytorch in NGC container 22.08?",
    "url": "https://github.com/pytorch/TensorRT/issues/1317",
    "state": "closed",
    "labels": [
      "question",
      "channel: NGC"
    ],
    "created_at": "2022-08-27T15:45:17Z",
    "updated_at": "2023-01-03T18:30:26Z",
    "user": "s-mohaghegh97"
  },
  {
    "repo": "pytorch/serve",
    "number": 1819,
    "title": "How to transfer files to a custom handler with curl command",
    "body": "I have created a custom handler that inputs and outputs wav files. \r\nThe code is as follows\r\n```Python\r\n# custom handler file\r\n\r\n# model_handler.py\r\n\r\n\"\"\"\r\nModelHandler defines a custom model handler.\r\n\"\"\"\r\nimport os\r\nimport soundfile\r\nfrom espnet2.bin.enh_inference import *\r\n\r\nfrom ts.torch_handler.base_handler import BaseHandler\r\n\r\nclass ModelHandler(BaseHandler):\r\n    \"\"\"\r\n    A custom model handler implementation.\r\n    \"\"\"\r\n\r\n    def __init__(self):\r\n        self._context = None\r\n        self.initialized = False\r\n        self.model = None\r\n        self.device = None\r\n\r\n    def initialize(self, context):\r\n        \"\"\"\r\n        Invoke by torchserve for loading a model\r\n        :param context: context contains model server system properties\r\n        :return:\r\n        \"\"\"\r\n\r\n        #  load the model\r\n        self.manifest = context.manifest\r\n\r\n        properties = context.system_properties\r\n        model_dir = properties.get(\"model_dir\")\r\n        self.device = torch.device(\"cuda:\" + str(properties.get(\"gpu_id\")) if torch.cuda.is_available() else \"cpu\")\r\n\r\n        # Read model serialize/pt file\r\n        serialized_file = self.manifest['model']['serializedFile']\r\n        model_pt_path = os.path.join(model_dir, serialized_file)\r\n\r\n        if not os.path.isfile(model_pt_path):\r\n            raise RuntimeError(\"Missing the model.pt file\")\r\n\r\n        self.model = SeparateSpeech(\"./train_enh_transformer_tf.yaml\", \"./valid.loss.best.pth\", normalize_output_wav=True)\r\n\r\n        self.initialized = True\r\n\r\n    def preprocess(self,data):\r\n        audio_data, rate  = soundfile.read(data)\r\n        preprocessed_data = audio_data[np.newaxis, :]\r\n\r\n        return preprocessed_data\r\n\r\n    def inference(self, model_input):\r\n        model_output = self.model(model_input)\r\n        return model_output\r\n\r\n    def postprocess(self, inference_output):\r\n        \"\"\"\r\n        Return inference result.\r\n        :param inference_output: list of inference output\r\n        :return: list of predict results\r\n        \"\"\"\r\n        # Take output from network and post-process to desired format\r\n        postprocess_output = inference_output\r\n        #wav ni suru\r\n        return postprocess_output\r\n\r\n    def handle(self, data, context):\r\n        model_input = self.preprocess(data)\r\n        model_output = self.inference(model_input)\r\n        return self.postprocess(model_output)\r\n```\r\n\r\nI transferred the wav file to torhserve with the following command\r\n> curl --data-binary @Mix.wav --noproxy '*'  http://127.0.0.1:8080/predictions/denoise_transformer -v\r\n\r\nHowever, I got the following response\r\n```\r\n*   Trying 127.0.0.1...\r\n* TCP_NODELAY set\r\n* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)\r\n> POST /predictions/denoise_transformer HTTP/1.1\r\n> Host: 127.0.0.1:8080\r\n> User-Agent: curl/7.58.0\r\n> Accept: */*\r\n> Content-Length: 128046\r\n> Content-Type: application/x-www-form-urlencoded\r\n> Expect: 100-continue\r\n>\r\n< HTTP/1.1 100 Continue\r\n* We are completely uploaded and fine\r\n< HTTP/1.1 500 Internal Server Error\r\n< content-type: application/json\r\n< x-request-id: 445155a4-5971-490a-ba7c-206f8eda5ea0\r\n< Pragma: no-cache\r\n< Cache-Control: no-cache; no-store, must-revalidate, private\r\n< Expires: Thu, 01 Jan 1970 00:00:00 UTC\r\n< content-length: 89\r\n< connection: close\r\n<\r\n{\r\n  \"code\": 500,\r\n  \"type\": \"ErrorDataDecoderException\",\r\n  \"message\": \"Bad end of line\"\r\n}\r\n* Closing connection 0\r\n```\r\n\r\nWhat is wrong?\r\n\r\nI have confirmed that the following command returns the response.\r\n> curl  --noproxy '*'  http://127.0.0.1:8081/models\r\n```\r\n{\r\n  \"models\": [\r\n    {\r\n      \"modelName\": \"denoise_transformer\",\r\n      \"modelUrl\": \"denoise_transformer.mar\"\r\n    }\r\n  ]\r\n}\r\n```\r\n",
    "url": "https://github.com/pytorch/serve/issues/1819",
    "state": "closed",
    "labels": [
      "triaged_wait",
      "support"
    ],
    "created_at": "2022-08-27T10:30:27Z",
    "updated_at": "2022-08-30T23:40:53Z",
    "user": "Shin-ichi-Takayama"
  },
  {
    "repo": "pytorch/data",
    "number": 754,
    "title": "A more powerful Mapper than can restrict function application to only part of the datapipe items?",
    "body": "We often have datapipes that return tuples `(img, target)` where we just want to call transformations on the img, but not the target.  Sometimes it's the opposite: I want to apply a function to the target, and not to the img.\r\nThis usually forces us to write wrappers that \"passthrough\" either the img or the target. For example:\r\n\r\n```py\r\n\r\ndef decode_img_only(data):  # boilerplate wrapper\r\n    img, target = data\r\n    img = decode(img)\r\n    return img, data\r\n\r\ndef resize_img_only(data):  # boilerplate wrapper\r\n    img, target = data\r\n    img = resize(img)\r\n    return img, data\r\n\r\ndef add_label_noise(data):  # boilerplate wrapper\r\n    img, target = data\r\n    target = make_noisy_label(target)\r\n    return img, data\r\n\r\ndp = ...\r\ndp = dp.map(decode_img_only).map(resize_img_only).map(add_label_noise)\r\n```\r\n\r\nPerhaps a more convenient way of doing this would be to implement something similar to WebDataset's `map_dict` and `map_tuple`? This would avoid all the boilerplate wrappers. For example we could imagine the code above to simply be:\r\n\r\n```py\r\ndp = ...\r\ndp = dp.map_tuple(decode, None).map(resize, None).map(None, make_noisy_label)\r\n# or even\r\ndp = dp.map_tuple(decode, None).map(resize, make_noisy_label)\r\n\r\n# if the datapipes was returning a dict with \"img\" and \"target\" keys this could also be\r\n\r\ndp = dp.map_dict(\"img\"=decode).map_dict(\"img\"=decode, \"target\"=make_noisy_label)\r\n```\r\n\r\nI even think it might be possible to implement all of `map_dict()` and `map_tuple()` functionalities withing the `.map()` function:\r\n- 1 arg == current `map()`\r\n- 1+ arg == `map_tuple()`\r\n- keyword arg == `map_dict()`\r\n\r\nCC @pmeier and @msaroufim  to whom this might be of interest",
    "url": "https://github.com/meta-pytorch/data/issues/754",
    "state": "open",
    "labels": [],
    "created_at": "2022-08-26T21:16:32Z",
    "updated_at": "2022-08-30T21:48:10Z",
    "comments": 5,
    "user": "NicolasHug"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 534,
    "title": "Store the cached responses on the Hub instead of mongodb?",
    "body": "The config and split info will be stored in the YAML of the dataset card (see https://github.com/huggingface/datasets/issues/4876), and the idea is to compute them and update the dataset card automatically. This means that storing the responses for `/splits` in the MongoDB is duplication.\r\n\r\nIf we store the responses for `/first-rows` in the Hub too (maybe in a special git ref), we might get rid of the MongoDB storage, or use another simpler cache mechanism if response time is an issue.\r\n\r\nWDYT @huggingface/datasets-server @julien-c ?\r\n\r\n \r\n\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/534",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-08-26T16:24:39Z",
    "updated_at": "2022-09-19T09:09:29Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4902,
    "title": "Name the default config `default`",
    "body": "Currently, if a dataset has no configuration, a default configuration is created from the dataset name.\r\n\r\nFor example, for a dataset loaded from the hub repository, such as https://huggingface.co/datasets/user/dataset (repo id is `user/dataset`), the default configuration will be `user--dataset`.\r\n\r\nIt might be easier to handle to set it to `default`, or another reserved word.",
    "url": "https://github.com/huggingface/datasets/issues/4902",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2022-08-26T16:16:22Z",
    "updated_at": "2023-07-24T21:15:31Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/optimum",
    "number": 362,
    "title": "unexpect behavior GPU runtime with ORTModelForSeq2SeqLM ",
    "body": "### System Info\n\n```shell\nOS: Ubuntu 20.04.4 LTS\r\nCARD: RTX 3080\r\n\r\nLibs:\r\npython 3.10.4\r\nonnx==1.12.0\r\nonnxruntime-gpu==1.12.1\r\ntorch==1.12.1\r\ntransformers==4.21.2\n```\n\n\n### Who can help?\n\n@lewtun @michaelbenayoun @JingyaHuang  @echarlaix \n\n### Information\n\n- [ ] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [X] My own task or dataset (give details below)\n\n### Reproduction\n\nSteps to reproceduce the behavior:\r\n1. Convert a public translation from here: [vinai-translate-en2vi](https://huggingface.co/vinai/vinai-translate-en2vi)\r\n```\r\nfrom optimum.onnxruntime import ORTModelForSeq2SeqLM\r\nsave_directory = \"models/en2vi_onnx\"\r\n# Load a model from transformers and export it through the ONNX format\r\nmodel = ORTModelForSeq2SeqLM.from_pretrained('vinai/vinai-translate-en2vi', from_transformers=True)\r\n# Save the onnx model and tokenizer\r\nmodel.save_pretrained(save_directory)\r\n```\r\n2. Load model with modified from [example of origin creater model](https://github.com/VinAIResearch/VinAI_Translate#english-to-vietnamese-translation)\r\n```\r\nfrom transformers import AutoTokenizer, pipeline\r\nfrom optimum.onnxruntime import ORTModelForSeq2SeqLM\r\nimport torch\r\nimport time\r\ndevice = \"cuda:0\" if torch.cuda.is_available() else \"cpu\"\r\ntokenizer_en2vi = AutoTokenizer.from_pretrained(\"vinai/vinai-translate-en2vi\", src_lang=\"en_XX\")\r\nmodel_en2vi = ORTModelForSeq2SeqLM.from_pretrained(\"models/en2vi_onnx\")\r\nmodel_en2vi.to(device)\r\n\r\n# onnx_en2vi = pipeline(\"translation_en_to_vi\", model=model_en2vi, tokenizer=tokenizer_en2vi, device=0)\r\n# en_text = '''It's very cold to go out.'''\r\n# start = time.time()\r\n# outpt = onnx_en2vi(en_text)\r\n# end = time.time()\r\n# print(outpt)\r\n# print(\"time: \", end - start)\r\n\r\ndef translate_en2vi(en_text: str) -> str:\r\n    start = time.time()\r\n    input_ids = tokenizer_en2vi(en_text, return_tensors=\"pt\").input_ids.to(device)\r\n    end = time.time()\r\n    print(\"Tokenize time: {:.2f}s\".format(end - start))\r\n    # print(input_ids.shape)\r\n    # print(input_ids)\r\n    start = time.time()\r\n    output_ids = model_en2vi.generate(\r\n        input_ids,\r\n        do_sample=True,\r\n        top_k=100,\r\n        top_p=0.8,\r\n        decoder_start_token_id=tokenizer_en2vi.lang_code_to_id[\"vi_VN\"],\r\n        num_return_sequences=1,\r\n    )\r\n    end = time.time()\r\n    print(\"Generate time: {:.2f}s\".format(end - start))\r\n    vi_text = tokenizer_en2vi.batch_decode(output_ids, skip_special_tokens=True)\r\n    vi_text = \" \".join(vi_text)\r\n    return vi_text\r\n\r\nen_text = '''It's very cold to go out.''' # long paragraph \r\n\r\nstart = time.time()\r\nresult = translate_en2vi(en_text)\r\nprint(result)\r\nend = time.time()\r\nprint('{:.2f} seconds'.format((end - start)))\r\n``` \r\nI change [line 167](https://github.com/huggingface/optimum/blob/661f4423097f580a06759ced557ecd638ab6b13a/optimum/onnxruntime/utils.py#L167) in optimum/onnxruntime/utils.py to _**return \"CUDAExecutionProvider\"**_ to run with GPU instead of an error.\r\n3. run [example of origin creater model](https://github.com/VinAIResearch/VinAI_Translate#english-to-vietnamese-translation) with gpu and compare runtimes\n\n### Expected behavior\n\nThe onnx model was expected run faster the result is unexpected:\r\n- Runtime origin model with gpu is 3-5s while take about 3.5GB GPU\r\n![Screenshot from 2022-08-26 09-08-19](https://user-images.githubusercontent.com/30494878/186801430-bf31e7dd-f690-4fbe-a56b-a0f6c125c27c.png)\r\n- Runtime onnx converted model with gpu is 70-80s while take about 7.7GB GPU\r\n![Screenshot from 2022-08-26 09-07-45](https://user-images.githubusercontent.com/30494878/186801433-2f8d0ed3-2464-431a-94c9-d333d2ff2f05.png)\r\n",
    "url": "https://github.com/huggingface/optimum/issues/362",
    "state": "closed",
    "labels": [
      "bug",
      "inference",
      "onnxruntime"
    ],
    "created_at": "2022-08-26T02:11:26Z",
    "updated_at": "2022-12-09T09:13:22Z",
    "comments": 3,
    "user": "tranmanhdat"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 528,
    "title": "metrics: how to manage variability between the admin pods?",
    "body": "The metrics include one entry per uvicorn worker of the `admin` service, but they give different values.\r\n\r\n<details>\r\n<summary>Example of a response to https://datasets-server.huggingface.co/admin/metrics</summary>\r\n<pre>\r\n# HELP starlette_requests_in_progress Multiprocess metric\r\n# TYPE starlette_requests_in_progress gauge\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/healthcheck\",pid=\"16\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/metrics\",pid=\"16\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/healthcheck\",pid=\"12\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/metrics\",pid=\"12\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/healthcheck\",pid=\"15\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/metrics\",pid=\"15\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/healthcheck\",pid=\"13\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/metrics\",pid=\"13\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/healthcheck\",pid=\"11\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/metrics\",pid=\"11\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/healthcheck\",pid=\"18\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/metrics\",pid=\"18\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/healthcheck\",pid=\"14\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/metrics\",pid=\"14\"} 1.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/healthcheck\",pid=\"10\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/metrics\",pid=\"10\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/healthcheck\",pid=\"17\"} 0.0\r\nstarlette_requests_in_progress{method=\"GET\",path_template=\"/metrics\",pid=\"17\"} 0.0\r\n# HELP queue_jobs_total Multiprocess metric\r\n# TYPE queue_jobs_total gauge\r\nqueue_jobs_total{pid=\"16\",queue=\"/splits\",status=\"waiting\"} 0.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/splits\",status=\"started\"} 5.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/splits\",status=\"success\"} 71154.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/splits\",status=\"error\"} 41640.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/splits\",status=\"cancelled\"} 133.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/rows\",status=\"waiting\"} 372.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/rows\",status=\"started\"} 21.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/rows\",status=\"success\"} 300541.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/rows\",status=\"error\"} 121306.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/rows\",status=\"cancelled\"} 1500.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/splits-next\",status=\"waiting\"} 0.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/splits-next\",status=\"started\"} 4.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/splits-next\",status=\"success\"} 30896.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/splits-next\",status=\"error\"} 25611.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/splits-next\",status=\"cancelled\"} 92.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/first-rows\",status=\"waiting\"} 11406.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/first-rows\",status=\"started\"} 52.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/first-rows\",status=\"success\"} 142201.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/first-rows\",status=\"error\"} 30097.0\r\nqueue_jobs_total{pid=\"16\",queue=\"/first-rows\",status=\"cancelled\"} 573.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/splits\",status=\"waiting\"} 0.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/splits\",status=\"started\"} 5.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/splits\",status=\"success\"} 71154.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/splits\",status=\"error\"} 41638.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/splits\",status=\"cancelled\"} 133.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/rows\",status=\"waiting\"} 424.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/rows\",status=\"started\"} 21.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/rows\",status=\"success\"} 300489.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/rows\",status=\"error\"} 121306.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/rows\",status=\"cancelled\"} 1500.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/splits-next\",status=\"waiting\"} 0.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/splits-next\",status=\"started\"} 4.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/splits-next\",status=\"success\"} 30896.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/splits-next\",status=\"error\"} 25610.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/splits-next\",status=\"cancelled\"} 92.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/first-rows\",status=\"waiting\"} 11470.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/first-rows\",status=\"started\"} 52.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/first-rows\",status=\"success\"} 142144.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/first-rows\",status=\"error\"} 30090.0\r\nqueue_jobs_total{pid=\"12\",queue=\"/first-rows\",status=\"cancelled\"} 573.0\r\nqueue_jobs_total{pid=\"15\",queue=\"/splits\",status=\"waiting\"} 0.0\r\nqueue_jobs_total{pid=\"15\",queue=\"/splits\",status=\"started\"} 5.0\r\nqueue_jobs_total{pid=\"15\",queue=\"/splits\",status=\"success\"} 71154.0\r\nqueue_jobs_total{pid=\"15\",queue=\"/splits\",status=\"error\"} 41640.0\r\nqueue_jobs",
    "url": "https://github.com/huggingface/dataset-viewer/issues/528",
    "state": "closed",
    "labels": [
      "bug",
      "question"
    ],
    "created_at": "2022-08-25T19:48:44Z",
    "updated_at": "2022-09-19T09:10:11Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/torchx",
    "number": 589,
    "title": "Add per workspace runopts/config",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\n\r\nCurrently Workspaces piggyback on the config options for the scheduler. This means that every scheduler is deeply tied to the workspace and we have to copy the options to every runner.\r\n\r\nhttps://github.com/pytorch/torchx/blob/main/torchx/schedulers/kubernetes_scheduler.py#L654-L658\r\n\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\n1. Add a new method to the Workspace base class that allows specifying runopts from them\r\n\r\n```python\r\n@abstractmethod\r\ndef workspace_run_opts(self) -> runopts:\r\n    ...\r\n```\r\n\r\n2. Update runner to call the workspace runopts method\r\n\r\n3. Migrate all `image_repo` DockerWorkspace runopts to the class.\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n\r\nhttps://github.com/pytorch/torchx/blob/main/torchx/schedulers/api.py#L187\r\nhttps://github.com/pytorch/torchx/blob/main/torchx/schedulers/docker_scheduler.py\r\nhttps://github.com/pytorch/torchx/blob/main/torchx/workspace/docker_workspace.py\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/589",
    "state": "open",
    "labels": [
      "enhancement",
      "module: runner",
      "docker"
    ],
    "created_at": "2022-08-25T18:18:35Z",
    "updated_at": "2022-08-25T18:18:35Z",
    "comments": 0,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 84014,
    "title": "fill_ OpInfo code not used, also, doesn't test the case where the second argument is a Tensor",
    "body": "Two observations:\r\n1. `sample_inputs_fill_` is no longer used. Can be deleted (https://github.com/pytorch/pytorch/blob/master/torch/testing/_internal/common_methods_invocations.py#L1798-L1807)\r\n2. The new OpInfo for fill doesn't actually test the `tensor.fill_(other_tensor)` case. Previously we did test this, as shown by `sample_inputs_fill_`\n\ncc @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/84014",
    "state": "open",
    "labels": [
      "module: tests",
      "triaged"
    ],
    "created_at": "2022-08-24T20:39:11Z",
    "updated_at": "2022-08-24T20:40:39Z",
    "user": "zou3519"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4881,
    "title": "Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)",
    "body": "**The problem:** \r\nLanguage diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.\r\n\r\nCurrently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)\r\n\r\nLooking forward to ever increasing coverage, how will the list of language names and language codes improve over time?\r\nEnrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues: \r\n* progress is likely to be slow:\r\n![image](https://user-images.githubusercontent.com/6072524/186253353-62f42168-3d31-4105-be1c-5eb1f818d528.png)\r\n(input required from reviewers, etc.)\r\n* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.\r\n* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.\r\n\r\n**A solution that seems desirable:**\r\nConnecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc. \r\nIt takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes. \r\n\r\nBoth seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).\r\n\r\nIn case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.\r\nWith appreciation of HFT,",
    "url": "https://github.com/huggingface/datasets/issues/4881",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-08-23T20:14:24Z",
    "updated_at": "2024-04-22T15:57:28Z",
    "comments": 49,
    "user": "alexis-michaud"
  },
  {
    "repo": "pytorch/examples",
    "number": 1040,
    "title": "In example DCGAN, curl timed out ",
    "body": "Your issue may already be reported!\r\nPlease search on the [issue tracker](https://github.com/pytorch/serve/examples) before creating one.\r\n\r\n## Context\r\n<!--- How has this issue affected you? What are you trying to accomplish? -->\r\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\r\n* Pytorch version: 1.12.1\r\n* Operating System and version: 20.04.4 LTS (Focal Fossa)\r\n\r\n## Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n* Installed using source? [yes/no]: no\r\n* Are you planning to deploy it using docker container? [yes/no]: yes\r\n* Is it a CPU or GPU environment?: GPU\r\n* Which example are you using: DCGAN\r\n* Link to code or data to repro [if any]:\r\n\r\n## Expected Behavior\r\n<!--- If you're describing a bug, tell us what should happen -->\r\ndcgan finishes without errors\r\n\r\n## Current Behavior\r\n<!--- If describing a bug, tell us what happens instead of the expected behavior -->\r\ndcgan fails with exceptions\r\n\r\n## Possible Solution\r\n<!--- Not obligatory, but suggest a fix/reason for the bug -->\r\n\r\n## Steps to Reproduce\r\n<!--- Provide a link to a live example, or an unambiguous set of steps to -->\r\n<!--- reproduce this bug. Include code to reproduce, if relevant -->\r\n1. cd examples\r\n2. bash run_python_examples.sh \"install_deps, dcgan\"\r\n\r\n## Failure Logs [if any]\r\n<!--- Provide any relevant log snippets or files here. -->\r\n```\r\nDownloading classroom train set\r\n--\r\n181 | curl: /opt/conda/lib/libcurl.so.4: no version information available (required by curl)\r\n182 | % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n183 | Dload  Upload   Total   Spent    Left  Speed\r\n...\r\ncurl: (18) transfer closed with 3277022655 bytes remaining to read\r\n\r\n...\r\nSome examples failed:\r\n\r\ncouldn't unzip classroom\r\n```\r\n\r\nI know this is a thrid-party repo issue, which I have already raised in [lsun repo](https://github.com/fyu/lsun/issues/46)\r\nIs it possible that you could have a solution on your end? The request speed of the domain http://dl.yf.io is just slow in general.\r\n\r\nThank you!",
    "url": "https://github.com/pytorch/examples/issues/1040",
    "state": "open",
    "labels": [
      "data"
    ],
    "created_at": "2022-08-23T18:34:09Z",
    "updated_at": "2022-08-24T02:46:44Z",
    "comments": 1,
    "user": "ShiboXing"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4878,
    "title": "[not really a bug] `identical_ok` is deprecated in huggingface-hub's `upload_file`",
    "body": "In the huggingface-hub dependency, the `identical_ok` argument has no effect in `upload_file` (and it will be removed soon)\r\n\r\nSee\r\n\r\nhttps://github.com/huggingface/huggingface_hub/blob/43499582b19df1ed081a5b2bd7a364e9cacdc91d/src/huggingface_hub/hf_api.py#L2164-L2169\r\n\r\nIt's used here:\r\n\r\nhttps://github.com/huggingface/datasets/blob/fcfcc951a73efbc677f9def9a8707d0af93d5890/src/datasets/dataset_dict.py#L1373-L1381\r\n\r\nhttps://github.com/huggingface/datasets/blob/fdcb8b144ce3ef241410281e125bd03e87b8caa1/src/datasets/arrow_dataset.py#L4354-L4362\r\n\r\nhttps://github.com/huggingface/datasets/blob/fdcb8b144ce3ef241410281e125bd03e87b8caa1/src/datasets/arrow_dataset.py#L4197-L4213\r\n\r\nWe should remove it.\r\n\r\nMaybe the third code sample has an unexpected behavior since it uses the non-default value `identical_ok = False`, but the argument is ignored.",
    "url": "https://github.com/huggingface/datasets/issues/4878",
    "state": "closed",
    "labels": [
      "help wanted",
      "question"
    ],
    "created_at": "2022-08-23T17:09:55Z",
    "updated_at": "2022-09-13T14:00:06Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1303,
    "title": "How to correctly format input for Fp16 inference using torch-tensorrt C++",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\nHi, I am using the following to export a torch scripted model to Fp16 tensorrt which will then be used in a C++ environment.\r\n\r\n`network.load_state_dict(torch.load(path_weights, map_location=\"cuda:0\"))\r\n    network.eval().cuda()\r\n\r\n    dummy_input = torch.rand(1, 6, 320, 224).cuda()\r\n    network_traced = torch.jit.trace(network, dummy_input)  # converting to plain torchscript\r\n\r\n    # convert/ compile to trt\r\n    compile_settings = {\r\n        \"inputs\": [torchtrt.Input([1, 6, 320, 224])],\r\n        \"enabled_precisions\": {torch.half},\r\n        \"workspace_size\": 6 << 22\r\n    }\r\n\r\n    trt_ts_module = torchtrt.compile(network_traced, inputs=[torchtrt.Input((1, 6, 320, 224), dtype=torch.half)],\r\n                                    enabled_precisions={torch.half},\r\n                                    workspace_size=6<<22)\r\n    torch.jit.save(trt_ts_module, trt_ts_save_path)`\r\n\r\nIs this correct?\r\n\r\n\r\nIf yes, then what is the correct way to cast the input tensor in C++?\r\nDo I need to convert it to torck::kHalf explicitly? Or can the inputs stay as FP32\r\n\r\nPlease let me know.\r\n\r\nHere is my code for loading the CNN for inference:\r\n\r\n`try {\r\n        // Deserialize the ScriptModule from a file using torch::jit::load().\r\n        trt_ts_mod_cnn = torch::jit::load(trt_ts_module_path);\r\n        trt_ts_mod_cnn.to(torch::kCUDA);\r\n        cout << trt_ts_mod_cnn.type() << endl;\r\n        cout << trt_ts_mod_cnn.dump_to_str(true, true, false) << endl;\r\n        } catch (const c10::Error& e) {\r\n            std::cerr << \"error loading the model from : \" << trt_ts_module_path << std::endl;\r\n            // return -1;\r\n        }\r\n        auto inBEVInference = torch::rand({1, bevSettings.N_CHANNELS_BEV, bevSettings.N_ROWS_BEV, bevSettings.N_COLS_BEV},\\\r\n                                            {at::kCUDA}).to(torch::kFloat32);\r\n        // auto inBEVInference = torch::rand({1, bevSettings.N_CHANNELS_BEV, bevSettings.N_ROWS_BEV, bevSettings.N_COLS_BEV},\\\r\n        //                                     {at::kCUDA}).to(torch::kFloat16);\r\n        std::vector<torch::jit::IValue> trt_inputs_ivalues;\r\n        trt_inputs_ivalues.push_back(inBEVInference);\r\n        auto outputs = trt_ts_mod_cnn.forward(trt_inputs_ivalues).toTuple();\r\n        auto kp = outputs->elements()[0].toTensor();\r\n        auto hwl = outputs->elements()[1].toTensor();\r\n        auto rot = outputs->elements()[2].toTensor();\r\n        auto dxdy = outputs->elements()[3].toTensor();\r\n        cout << \"Size KP out -> \" << kp.sizes() << endl;\r\n        cout << \"Size HWL out -> \" << hwl.sizes() << endl;\r\n        cout << \"Size ROT out -> \" << rot.sizes() << endl;\r\n        cout << \"Size DXDY out -> \" << dxdy.sizes() << endl;`\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.11.0+cu113\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Linux, Ubuntu 20.04, docker container\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives: local\r\n - Python version: 3.8.10\r\n - CUDA version: Cuda compilation tools, release 11.4, V11.4.152 (on the linux system)\r\n - GPU models and configuration: RTX2080 MaxQ\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1303",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2022-08-23T14:05:05Z",
    "updated_at": "2022-12-04T00:02:10Z",
    "user": "SM1991CODES"
  },
  {
    "repo": "pytorch/examples",
    "number": 1039,
    "title": "FileNotFoundError: Couldn't find any class folder in /content/train2014.",
    "body": "Your issue may already be reported!\r\nPlease search on the [issue tracker](https://github.com/pytorch/serve/examples) before creating one.\r\n\r\nI wanna train new style model \r\nrun this cmd\r\n\r\n!unzip train2014.zip -d /content\r\n\r\n!python /content/examples/fast_neural_style/neural_style/neural_style.py train --dataset /content/train2014 --style-image /content/A.jpg --save-model-dir /content --epochs 2 --cuda 1\r\n\r\n\r\n## Context\r\n<!--- How has this issue affected you? What are you trying to accomplish? -->\r\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\r\n* Pytorch version:\r\n* Operating System and version:\r\n\r\n## Your Environment\r\n\r\nColab\r\nhttps://colab.research.google.com/github/pytorch/xla/blob/master/contrib/colab/style_transfer_inference.ipynb#scrollTo=EozMXwIV9iOJ\r\n\r\ngot this error\r\n\r\nTraceback (most recent call last):\r\n  File \"/content/examples/fast_neural_style/neural_style/neural_style.py\", line 249, in <module>\r\n    main()\r\n  File \"/content/examples/fast_neural_style/neural_style/neural_style.py\", line 243, in main\r\n    train(args)\r\n  File \"/content/examples/fast_neural_style/neural_style/neural_style.py\", line 43, in train\r\n    train_dataset = datasets.ImageFolder(args.dataset, transform)\r\n  File \"/usr/local/lib/python3.7/dist-packages/torchvision/datasets/folder.py\", line 316, in __init__\r\n    is_valid_file=is_valid_file,\r\n  File \"/usr/local/lib/python3.7/dist-packages/torchvision/datasets/folder.py\", line 145, in __init__\r\n    classes, class_to_idx = self.find_classes(self.root)\r\n  File \"/usr/local/lib/python3.7/dist-packages/torchvision/datasets/folder.py\", line 219, in find_classes\r\n    return find_classes(directory)\r\n  File \"/usr/local/lib/python3.7/dist-packages/torchvision/datasets/folder.py\", line 43, in find_classes\r\n    raise FileNotFoundError(f\"Couldn't find any class folder in {directory}.\")\r\nFileNotFoundError: Couldn't find any class folder in /content/train2014.\r\n\r\nHow can I fix it?\r\nthx",
    "url": "https://github.com/pytorch/examples/issues/1039",
    "state": "open",
    "labels": [
      "bug",
      "data"
    ],
    "created_at": "2022-08-23T07:33:17Z",
    "updated_at": "2023-06-08T03:09:42Z",
    "comments": 2,
    "user": "sevaroy"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 228,
    "title": "stable-diffusion-v1-4 link in release v0.2.3 is broken",
    "body": "### Describe the bug\r\n\r\n@anton-l  the link (https://huggingface.co/CompVis/stable-diffusion-v1-4) in the [release v0.2.3](https://github.com/huggingface/diffusers/releases/tag/v0.2.3) returns a 404.\r\n\r\n### Reproduction\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\n```shell\r\nN/A\r\n```\r\n",
    "url": "https://github.com/huggingface/diffusers/issues/228",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-08-22T09:07:27Z",
    "updated_at": "2022-08-22T20:53:00Z",
    "user": "leszekhanusz"
  },
  {
    "repo": "huggingface/pytorch-image-models",
    "number": 1424,
    "title": "[FEATURE] What hyperparameters is used to get the results stated in the paper with the ViT-B pretrained miil weights on imagenet1k?",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nWhat hyperparameters are used to get the results stated in this paper (https://arxiv.org/pdf/2104.10972.pdf) on ImageNet1k with the ViT-B pretrained miil weights from vision_transformer.py in line 164-167? I tried the hyperparemeters as stated in the paper for TResNet but I'm getting below average results. I'm not sure what other hyperparameter details i'm missing. How is the classifier head initialized? Do they use sgd momentum or without momentum? Do they use Hflip or random erasing? I think the hyperparameters stated in the paper is only applicable for TResNet and the code in https://github.com/Alibaba-MIIL/ImageNet21K is missing a lot of details in finetuning stage.\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/pytorch-image-models/issues/1424",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-08-21T22:26:48Z",
    "updated_at": "2022-08-22T04:17:43Z",
    "user": "Phuoc-Hoan-Le"
  },
  {
    "repo": "pytorch/functorch",
    "number": 1006,
    "title": "RuntimeError: CUDA error: no kernel image is available for execution on the device",
    "body": "Hi, I have cuda 11.7 on my system and I am trying to install functorch, since the stable version of pytorch for cuda 11.7 is not available [here](https://pytorch.org/get-started/previous-versions/), I just run `pip install functorch` which also installs the compatible version of pytorch.\r\n\r\nBut when I run my code that uses the GPU, I get the following error :\r\n\r\n`RuntimeError: CUDA error: no kernel image is available for execution on the device` \r\n\r\nIs it possible to use functorch in my case?",
    "url": "https://github.com/pytorch/functorch/issues/1006",
    "state": "closed",
    "labels": [],
    "created_at": "2022-08-21T19:30:34Z",
    "updated_at": "2022-08-24T13:58:45Z",
    "comments": 8,
    "user": "ykemiche"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1295,
    "title": "Jetpack 5.0.2",
    "body": "## \u2753 Question\r\n\r\nIs it known yet whether Torch TensorRT is compatible with NVIDIA Jetpack 5.0.2 on NVIDIA Jetson devices?\r\n\r\n## What you have already tried\r\n\r\nI am trying to install torch-tensorrt for Python on my Jetson Xavier NX with Jetpack 5.0.2. Followed the instructions for the Jetpack 5.0 install and have successfully run everything up until ```python3 setup.py install --use-cxx11-abi``` which ran all the way until it got to \u201cAllowing ninja to set a default number of workers\u201d which it hung on for quite some time until eventually erroring out with the output listed below. Any advice would be much appreciated.\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.13.0a0+08820cb0.nv22.07\r\n - CPU Architecture: aarch64\r\n - OS (e.g., Linux): Jetson Linux (Ubuntu)\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives: Honestly don't know the difference\r\n - Python version: 3.8.10\r\n - CUDA version: 11.4\r\n - GPU models and configuration: Jetson Xavier NX\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n```\r\nAllowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)\r\n[1/4] c++ -MMD -MF /home/nvidia/TensorRT/py/build/temp.linux-aarch64-3.8/torch_tensorrt/csrc/tensorrt_classes.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/home/nvidia/TensorRT/pytorch_tensorrt/csrc -I/home/nvidia/TensorRT/pytorch_tensorrt/include -I/home/nvidia/TensorRT/py/../bazel-TRTorch/external/tensorrt/include -I/home/nvidia/TensorRT/py/../bazel-Torch-TensorRT/external/tensorrt/include -I/home/nvidia/TensorRT/py/../bazel-TensorRT/external/tensorrt/include -I/home/nvidia/TensorRT/py/../bazel-tensorrt/external/tensorrt/include -I/home/nvidia/TensorRT/py/../ -I/home/nvidia/.local/lib/python3.8/site-packages/torch/include -I/home/nvidia/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/nvidia/.local/lib/python3.8/site-packages/torch/include/TH -I/home/nvidia/.local/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-11.4/include -I/usr/include/python3.8 -c -c /home/nvidia/TensorRT/py/torch_tensorrt/csrc/tensorrt_classes.cpp -o /home/nvidia/TensorRT/py/build/temp.linux-aarch64-3.8/torch_tensorrt/csrc/tensorrt_classes.o -Wno-deprecated -Wno-deprecated-declarations -D_GLIBCXX_USE_CXX11_ABI=1 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1013\"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++14\r\nFAILED: /home/nvidia/TensorRT/py/build/temp.linux-aarch64-3.8/torch_tensorrt/csrc/tensorrt_classes.o\r\nc++ -MMD -MF /home/nvidia/TensorRT/py/build/temp.linux-aarch64-3.8/torch_tensorrt/csrc/tensorrt_classes.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/home/nvidia/TensorRT/pytorch_tensorrt/csrc -I/home/nvidia/TensorRT/pytorch_tensorrt/include -I/home/nvidia/TensorRT/py/../bazel-TRTorch/external/tensorrt/include -I/home/nvidia/TensorRT/py/../bazel-Torch-TensorRT/external/tensorrt/include -I/home/nvidia/TensorRT/py/../bazel-TensorRT/external/tensorrt/include -I/home/nvidia/TensorRT/py/../bazel-tensorrt/external/tensorrt/include -I/home/nvidia/TensorRT/py/../ -I/home/nvidia/.local/lib/python3.8/site-packages/torch/include -I/home/nvidia/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/nvidia/.local/lib/python3.8/site-packages/torch/include/TH -I/home/nvidia/.local/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-11.4/include -I/usr/include/python3.8 -c -c /home/nvidia/TensorRT/py/torch_tensorrt/csrc/tensorrt_classes.cpp -o /home/nvidia/TensorRT/py/build/temp.linux-aarch64-3.8/torch_tensorrt/csrc/tensorrt_classes.o -Wno-deprecated -Wno-deprecated-declarations -D_GLIBCXX_USE_CXX11_ABI=1 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1013\"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++14\r\nc++: fatal error: Killed signal terminated program cc1plus\r\ncompilation terminated.\r\n[2/4] c++ -MMD -MF /home/nvidia/TensorRT/py/build/temp.linux-aarch64-3.8/torch_tensorrt/csrc/tensorrt_backend.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=forma",
    "url": "https://github.com/pytorch/TensorRT/issues/1295",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-08-21T03:33:07Z",
    "updated_at": "2022-08-22T00:38:23Z",
    "user": "HugeBob"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 83721,
    "title": "How to export a simple model using List.__contains__ to ONNX",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nWhen using torch.jit.script, the message shows that \\_\\_contains__ method is not supported.\r\n\r\nThis is a reduced part of my model, the function should be tagged with torch.jit.script because there's a for loop using list.\\_\\_contains__\r\n\r\nAnd I want to export it to an onnx file but failed with the following output.\r\n\r\n### Code\r\n````python\r\nfrom typing import List, Dict\r\nimport torch\r\n\r\nx = torch.tensor([[59, 26, 32, 31, 58, 37, 12,  8,  8, 32, 27, 27, 35,  9,  3, 44, 22, 36,\r\n                   22, 61, 51, 35, 15, 13, 14, 32, 22, 21,  9]], dtype=torch.long)\r\n\r\nnums = [3, 4, 5, 6, 7, 8, 9, 14, 15, 16, 17, 18, 22, 23, 24, 25, 26, 27,\r\n        28, 29, 30, 31, 37, 38, 39, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57]\r\n\r\n\r\n@torch.jit.script\r\ndef batch(x, l: List[int]):\r\n    for i in range(len(x)):\r\n        for j in range(len(x[i])):\r\n            if x[i, j] in l:\r\n                x[i, j] *= 2\r\n    return x\r\n\r\n\r\nclass Module1(torch.nn.Module):\r\n    def forward(self, x):\r\n        return batch(x, nums)\r\n\r\n\r\nm1 = Module1()\r\nprint(m1(x))\r\n\r\ntorch.onnx.export(m1,\r\n                  (x),\r\n                  \"2.onnx\",\r\n                  verbose=True,\r\n                  input_names=[\"x\"],\r\n                  dynamic_axes={\r\n                      \"x\": {\r\n                          1: \"frames\",\r\n                      },\r\n                  },\r\n                  opset_version=11,\r\n                  )\r\n````\r\n\r\n### Output\r\n````\r\nTraceback (most recent call last):\r\n  File \"E:\\My Files\\Projects\\Python\\test\\test.py\", line 28, in <module>\r\n    torch.onnx.export(m1,\r\n  File \"C:\\CodeEnv\\miniconda3\\envs\\dfs\\lib\\site-packages\\torch\\onnx\\__init__.py\", line 350, in export\r\n    return utils.export(\r\n  File \"C:\\CodeEnv\\miniconda3\\envs\\dfs\\lib\\site-packages\\torch\\onnx\\utils.py\", line 163, in export\r\n    _export(\r\n  File \"C:\\CodeEnv\\miniconda3\\envs\\dfs\\lib\\site-packages\\torch\\onnx\\utils.py\", line 1074, in _export\r\n    graph, params_dict, torch_out = _model_to_graph(\r\n  File \"C:\\CodeEnv\\miniconda3\\envs\\dfs\\lib\\site-packages\\torch\\onnx\\utils.py\", line 731, in _model_to_graph\r\n    graph = _optimize_graph(\r\n  File \"C:\\CodeEnv\\miniconda3\\envs\\dfs\\lib\\site-packages\\torch\\onnx\\utils.py\", line 308, in _optimize_graph\r\n    graph = _C._jit_pass_onnx(graph, operator_export_type)\r\n  File \"C:\\CodeEnv\\miniconda3\\envs\\dfs\\lib\\site-packages\\torch\\onnx\\__init__.py\", line 416, in _run_symbolic_function\r\n    return utils._run_symbolic_function(*args, **kwargs)\r\n  File \"C:\\CodeEnv\\miniconda3\\envs\\dfs\\lib\\site-packages\\torch\\onnx\\utils.py\", line 1401, in _run_symbolic_function\r\n    return symbolic_fn(ctx, g, *inputs, **attrs)\r\n  File \"C:\\CodeEnv\\miniconda3\\envs\\dfs\\lib\\site-packages\\torch\\onnx\\symbolic_opset9.py\", line 5064, in Loop\r\n    torch._C._jit_pass_onnx_block(\r\n  File \"C:\\CodeEnv\\miniconda3\\envs\\dfs\\lib\\site-packages\\torch\\onnx\\__init__.py\", line 416, in _run_symbolic_function\r\n    return utils._run_symbolic_function(*args, **kwargs)\r\n  File \"C:\\CodeEnv\\miniconda3\\envs\\dfs\\lib\\site-packages\\torch\\onnx\\utils.py\", line 1401, in _run_symbolic_function\r\n    return symbolic_fn(ctx, g, *inputs, **attrs)\r\n  File \"C:\\CodeEnv\\miniconda3\\envs\\dfs\\lib\\site-packages\\torch\\onnx\\symbolic_opset9.py\", line 5064, in Loop\r\n    torch._C._jit_pass_onnx_block(\r\n  File \"C:\\CodeEnv\\miniconda3\\envs\\dfs\\lib\\site-packages\\torch\\onnx\\__init__.py\", line 416, in _run_symbolic_function\r\n    return utils._run_symbolic_function(*args, **kwargs)\r\n  File \"C:\\CodeEnv\\miniconda3\\envs\\dfs\\lib\\site-packages\\torch\\onnx\\utils.py\", line 1421, in _run_symbolic_function\r\n    raise symbolic_registry.UnsupportedOperatorError(\r\ntorch.onnx.symbolic_registry.UnsupportedOperatorError: Exporting the operator ::__contains_ to ONNX opset version 11 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub.\r\n````\r\n\r\n### Versions\r\n\r\nPyTorch version: 1.12.1+cu113\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.3\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Microsoft Windows 10 \u5bb6\u5ead\u4e2d\u6587\u7248\r\nGCC version: (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0\r\nClang version: Could not collect\r\nCMake version: version 3.23.2\r\nLibc version: N/A\r\n\r\nPython version: 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:51:29) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)\r\nPython platform: Windows-10-10.0.19044-SP0\r\nIs CUDA available: True\r\nCUDA runtime version: 11.5.119\r\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 2070\r\nNvidia driver version: 512.78\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.22.4\r\n[pip3] pytorch-lightning==0.7.1\r\n[pip3] torch==1.12.1+cu113\r\n[pip3] torchaudio==0.12.1+cu113\r\n[pip3] torchvision==0.13.1+cu113\r\n[conda] numpy                     1.22.4                   pypi_0    pypi\r\n[conda] pytorch-lightning         0.7.1                    pypi_0    pypi\r\n[conda] torch                     1.12.1+cu113 ",
    "url": "https://github.com/pytorch/pytorch/issues/83721",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged",
      "onnx-needs-info"
    ],
    "created_at": "2022-08-19T03:05:43Z",
    "updated_at": "2024-04-01T16:53:35Z",
    "user": "SineStriker"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 83685,
    "title": "How to use accessors for fast elementwise write?",
    "body": "### \ud83d\udcda The doc issue\n\n![image](https://user-images.githubusercontent.com/69435296/185450482-d4c8a081-68c2-4b59-9b38-3f3e7b191ad7.png)\r\n\r\nAs seen above from Libtorch documentation, accessors can be used for fast element wise read operations on Libtorch tensors.\r\nHowever, is there a similar functionality for write operations as well?\r\n\r\nThe use case is when preparing a data frame, we could directly use a CPU tensor, write into it and then just copy it to CUDA.\r\nPresently I make a normal array, copy array to CPU tensor using from_blob() and then transfer it to CUDA.\r\n\r\nBest Regards\r\nSambit\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/83685",
    "state": "closed",
    "labels": [],
    "created_at": "2022-08-18T16:50:28Z",
    "updated_at": "2022-08-24T20:36:19Z",
    "user": "SM1991CODES"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1282,
    "title": "\u2753 [Question] How do you solve the error: Expected Tensor but got Uninitialized?",
    "body": "## \u2753 Question\r\n\r\nCurrently, I am compiling a custom segmentation model using torch_tensorrt.compile(), using a model script obtained from jit. The code to compile is as follows:\r\n\r\n```\r\nscripted_model = torch.jit.freeze(torch.jit.script(model))\r\n\r\ninputs = [torch_tensorrt.Input(\r\n            min_shape=[2, 3, 600, 400],\r\n            opt_shape=[2, 3, 600, 400],\r\n            max_shape=[2, 3, 600, 400],\r\n            dtype=torch.float,\r\n        )]\r\nenabled_precisions = {torch.float, torch.half}\r\n\r\nwith torch_tensorrt.logging.debug():\r\n    trt_ts_module = torch_tensorrt.compile(scripted_model, inputs=inputs, enabled_precisions=enabled_precisions)\r\n```\r\n\r\nThe code fails to compile at the following step:\r\n```\r\n        a = self.compression(torch.cat(x_list, 1))\r\n        b = self.shortcut(x)\r\n\r\n        c = a + b\r\n\r\n        return c\r\n```\r\n, throwing the following error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"test.py\", line 118, in <module>\r\n    trt_ts_module = torch_tensorrt.compile(scripted_model, inputs=inputs, enabled_precisions=enabled_precisions)\r\n  File \"/home/oem/.pyenv/versions/ddrnet/lib/python3.8/site-packages/torch_tensorrt/_compile.py\", line 115, in compile\r\n    return torch_tensorrt.ts.compile(ts_mod, inputs=inputs, enabled_precisions=enabled_precisions, **kwargs)\r\n  File \"/home/oem/.pyenv/versions/ddrnet/lib/python3.8/site-packages/torch_tensorrt/ts/_compiler.py\", line 113, in compile\r\n    compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))\r\nRuntimeError: Expected Tensor but got Uninitialized\r\n```\r\n\r\nIt seems that some variable is uninitialized. However, the strange thing is that replacing the previous code with the following code pieces both compile:\r\n```\r\n        a = self.compression(torch.cat(x_list, 1))\r\n\r\n        return a\r\n```\r\nand\r\n```\r\n        b = self.shortcut(x)\r\n\r\n        return b\r\n```\r\nSo, somehow taking the sum of these two tensors results in a failure to compile. Do you have any suggestions I can try such that this step compiles as well?\r\n\r\n## What you have already tried\r\nTried adding the following two parameters to the compilation step as well:\r\n```    \r\ntrt_ts_module = torch_tensorrt.compile(scripted_model, inputs=inputs, enabled_precisions=enabled_precisions, torch_executed_ops=[\"prim::ListConstruct\"], min_block_size=1)\r\ntrt_ts_module = torch_tensorrt.compile(scripted_model, inputs=inputs, enabled_precisions=enabled_precisions, torch_executed_ops=[\"prim::ListConstruct\"])\r\ntrt_ts_module = torch_tensorrt.compile(scripted_model, inputs=inputs, enabled_precisions=enabled_precisions, min_block_size=1)\r\n```\r\n, but these resulted in different errors, thus I decided not to use these parameters for now.\r\n\r\n## Environment\r\n - PyTorch Version (e.g., 1.0): 1.11.0+cu113\r\n - Torch-TensorRT version: 1.1.0\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Ubuntu 20.04 (kernel: 5.4.0-124-generic)\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip, from within a virtual environment (pyenv)\r\n - Are you using local sources or building from archives: No\r\n - Python version: 3.8.13\r\n - CUDA version: 11.7 (Nvidia Driver: 515.65.01)\r\n - GPU models and configuration: Nvidia RTX A2000\r\n\r\nLooking forwards to your answer, thanks in advance.\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1282",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-08-18T13:04:23Z",
    "updated_at": "2022-10-11T15:42:19Z",
    "user": "Mark-M2L"
  },
  {
    "repo": "pytorch/data",
    "number": 742,
    "title": "[Discussion] Is the implementation of `cycler` efficient? ",
    "body": "TL;DR: It seems in most cases users might be better off using `.flatmap(lambda x: [x for _ in n_repeat])` rather than `.cycle(n_repeat)`.\r\n\r\nHere is the [implementation](https://github.com/pytorch/data/blob/main/torchdata/datapipes/iter/util/cycler.py), basically `Cycler` reads from the source DataPipe for `n` number of times.\r\n\r\nThings to consider:\r\n1. This means repeating certain operations (e.g. reading from disk, complicated transformation) for `n` number of times, unless you use `in_memory_cache`.\r\n2. If `shuffle` is used afterwards, I believe `.flatmap(lambda x: [x for _ in n_repeat])` is strictly better than `.cycle(n_repeat)`.\r\n3. For `input = [0, 1, 2]`, the major difference is that `.cycle` returns `[0, 1, 2, 0, 1, 2]` compared to `.flatmap(...)` returning `[0, 0, 1, 1, 2, 2]`.\r\n\r\nQuestions:\r\n1. Should we change the implementation?\r\n2. Should we add something like `.repeat()` which basically does `.flatmap(lambda x: [x for _ in n_repeat])`?\r\n3. Should we advise users to use `.flatmap(...)` instead unless they specifically want the ordering of `[0, 1, 2, 0, 1, 2]`?\r\n\r\n\r\n@VitalyFedyunin @ejguan Let me know what you think.",
    "url": "https://github.com/meta-pytorch/data/issues/742",
    "state": "closed",
    "labels": [],
    "created_at": "2022-08-17T22:55:30Z",
    "updated_at": "2022-08-30T18:57:10Z",
    "comments": 4,
    "user": "NivekT"
  },
  {
    "repo": "pytorch/data",
    "number": 736,
    "title": "Fix & Implement xdoctest",
    "body": "### \ud83d\udcda The doc issue\n\nThere is a PR https://github.com/pytorch/pytorch/pull/82797 landed into PyTorch core, which adds the functionality to validate if the example in comment is runnable.\r\n\r\nHowever, in the example of PyTorch Core, we normally refer `torchdata` in all examples for the sake of unification of importing path rather than directly importing `DataPipes` from pytorch core. This would cause `xdoctest` always failing. TBH, I don't know how to solve this problem without changing it back to `import torch.data.utils....`.\r\n\r\nBut, for `torchdata` project, we can do the similar work as a BE project to enable all doc test over the examples to prevent any failing test in our documentation.\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/736",
    "state": "open",
    "labels": [
      "Better Engineering"
    ],
    "created_at": "2022-08-16T13:49:46Z",
    "updated_at": "2022-08-16T19:04:24Z",
    "comments": 0,
    "user": "ejguan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1272,
    "title": "\u2753 [Question] How can I debug the error: Unable to freeze tensor of type Int64/Float64 into constant layer, try to compile model with truncate_long_and_double enabled",
    "body": "## \u2753 Question\r\n\r\nConverting a model to Tensor Engine with the next code does not work\r\n\r\nInput:\r\n```\r\ntrt_model = ttrt.compile(traced_model, \"default\",\r\n                         [ttrt.Input((1, 3, 224, 224), dtype=torch.float32)],\r\n                         torch.float32, truncate_long_and_double=False)\r\n```\r\nOutput:\r\n\r\n`RuntimeError: [Error thrown at core/conversion/converters/converter_util.cpp:167] Unable to freeze tensor of type Int64/Float64 into constant layer, try to compile model with truncate_long_and_double enabled\r\n`\r\n\r\nRunning with `truncate_long_and_double=True` works but I want to understand what is going on wrong. So I ran\r\n\r\n```\r\nttrt.logging.set_reportable_log_level(ttrt.logging.Level.Debug)\r\ntrt_model = ttrt.compile(traced_model, \"default\",\r\n                         [ttrt.Input((1, 3, 224, 224), dtype=torch.float32)],\r\n                         torch.float32, truncate_long_and_double=False)\r\n```\r\n\r\nbut the output is not as clear as I expected (Next comment). Can you explain me the possible things that could raise this type of error? Sorry for the long logs, I worked in a 'tiny' version of the model to try make them shorter before writing here >.<\r\n\r\n\r\n## Environment\r\n\r\n - PyTorch Version (e.g., 1.0): 1.11.0+cu113\r\n - OS (e.g., Linux): 22.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.10\r\n - CUDA version: 11.3\r\n - GPU models and configuration: RTX3090",
    "url": "https://github.com/pytorch/TensorRT/issues/1272",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-08-16T13:40:02Z",
    "updated_at": "2022-08-22T18:14:00Z",
    "user": "mjack3"
  },
  {
    "repo": "huggingface/optimum",
    "number": 351,
    "title": "Add all available ONNX models to ORTConfigManager",
    "body": "This issue is linked to the [ONNXConfig for all](https://huggingface.co/OWG) working group created for implementing an ONNXConfig for all available models. Let's extend our work and try to add all models with a fully functional ONNXConfig implemented to ORTConfigManager.\r\n\r\nAdding models to ORTConfigManager will allow \ud83e\udd17 Optimum users to boost even more their model with ONNX optimization capacity!\r\n\r\nFeel free to join us in this adventure! Join the org by clicking [here](https://huggingface.co/organizations/OWG/share/TskjfGaGjGnMXXssbPPXrQWEIbosGqZshZ)\r\n\r\nHere is a non-exhaustive list of models that have one ONNXConfig and could be added to ORTConfigManager:\r\n\r\n*This includes only models with ONNXConfig implemented, if your target model doesn't have an ONNXConfig, please open an issue/or implement it (even cooler) in the \ud83e\udd17 Transformers repository. Check [this issue](https://github.com/huggingface/transformers/issues/16308) to know how to do*\r\n\r\n* [x] Albert\r\n* [x] BART\r\n* [ ] BeiT\r\n* [x] BERT\r\n* [x] BigBird\r\n* [ ] BigBirdPegasus\r\n* [x] Blenderbot\r\n* [ ] BlenderbotSmall\r\n* [x] BLOOM\r\n* [x] CamemBERT\r\n* [ ] CLIP\r\n* [x] CodeGen\r\n* [ ] ConvNext\r\n* [ ] ConvBert\r\n* [ ] Data2VecText\r\n* [ ] Data2VecVision\r\n* [x] Deberta\r\n* [x] Deberta-v2\r\n* [ ] DeiT\r\n* [ ] DETR\r\n* [x] Distilbert\r\n* [x] ELECTRA\r\n* [ ] Flaubert\r\n* [x] GptBigCode\r\n* [x] GPT2\r\n* [x] GPTJ\r\n* [x] GPT-NEO\r\n* [x] GPT-NEOX\r\n* [ ] I-BERT\r\n* [ ] LayoutLM\r\n* [ ] LayoutLMv2\r\n* [ ] LayoutLMv3\r\n* [ ] LeViT\r\n* [x] Llama\r\n* [x] LongT5\r\n* [x] M2M100\r\n* [x] mBART\r\n* [x] MT5\r\n* [x] MarianMT\r\n* [ ] MobileBert\r\n* [ ] MobileViT\r\n* [x] nystromformer\r\n* [ ] OpenAIGPT-2\r\n* [ ] PLBart\r\n* [x] Pegasus\r\n* [ ] Perceiver\r\n* [ ] ResNet\r\n* [ ] RoFormer\r\n* [x] RoBERTa\r\n* [ ] SqueezeBERT\r\n* [x] T5\r\n* [x] ViT\r\n* [x] Whisper\r\n* [ ] XLM\r\n* [x] XLM-RoBERTa\r\n* [ ] XLM-RoBERTa-XL\r\n* [ ] YOLOS\r\n\r\nIf you want an example of implementation, I did one for `MT5` #341.\r\n\r\nYou need to check how the `attention_heads` number and `hidden_size` arguments are named in the original implementation of your target model in the \ud83e\udd17 Transformers source code. And then add it to the `_conf` dictionary. Finally, add your implemented model to tests to make it fully functional.",
    "url": "https://github.com/huggingface/optimum/issues/351",
    "state": "open",
    "labels": [
      "good first issue"
    ],
    "created_at": "2022-08-16T08:18:50Z",
    "updated_at": "2025-11-19T13:24:40Z",
    "comments": 3,
    "user": "chainyo"
  },
  {
    "repo": "huggingface/optimum",
    "number": 350,
    "title": "Migrate metrics used in all examples from Datasets to Evaluate",
    "body": "### Feature request\n\nCopied from https://github.com/huggingface/transformers/issues/18306\r\n\r\nThe metrics are slowly leaving [Datasets](https://github.com/huggingface/datasets) (they are being deprecated as we speak) to move to the [Evaluate](https://github.com/huggingface/evaluate) library. We are looking for contributors to help us with the move.\r\n\r\nNormally, the migration should be as easy as replacing the import of `load_metric` from Datasets to the `load` function in Evaluate. See a use in this [Accelerate example](https://github.com/huggingface/accelerate/blob/1486fa35b19abc788ddb609401118a601e68ff5d/examples/nlp_example.py#L104). To fix all tests, a dependency to evaluate will need to be added in the [requirements file](https://github.com/huggingface/transformers/blob/main/examples/pytorch/_tests_requirements.txt) (this is the link for PyTorch, there is another one for the Flax examples).\r\n\r\nIf you're interested in contributing, please reply to this issue with the examples you plan to move.\n\n### Motivation\n\n/\n\n### Your contribution\n\n/",
    "url": "https://github.com/huggingface/optimum/issues/350",
    "state": "closed",
    "labels": [],
    "created_at": "2022-08-16T08:04:07Z",
    "updated_at": "2022-10-27T10:07:58Z",
    "comments": 0,
    "user": "fxmarty"
  },
  {
    "repo": "pytorch/data",
    "number": 732,
    "title": "Recommended way to shuffle intra and inter archives?",
    "body": "Say I have a bunch of archives containing samples. In my case each archive is a pickle file containing a list of samples, but it could be a tar or something else.\r\n\r\nI want to shuffle between archives (inter) and within archives (intra). My current way of doing it is below. Is there a more canonical solution?\r\n\r\n```py\r\nfrom torchdata.dataloader2 import DataLoader2, adapter\r\nfrom torchdata.datapipes.iter import IterDataPipe, FileLister, IterableWrapper\r\nfrom pathlib import Path\r\n\r\nimport pickle\r\n\r\n# Create archives\r\nroot = Path(\"/tmp/dataset/\")\r\nwith open(root / \"1.pkl\", \"wb\") as f:\r\n    pickle.dump(list(range(10)), f)\r\nwith open(root / \"2.pkl\", \"wb\") as f:\r\n    pickle.dump(list(range(10, 20)), f)\r\n\r\nclass PickleLoaderDataPipe(IterDataPipe):\r\n    def __init__(self, source_datapipe):\r\n        self.source_datapipe = source_datapipe\r\n\r\n    def __iter__(self):\r\n        for path in self.source_datapipe:\r\n            with open(path, \"rb\") as f:\r\n                yield pickle.load(f)  # <- this is a list\r\n\r\nclass ConcaterIterable(IterDataPipe):\r\n    # Same as unbatch(), kinda\r\n    def __init__(self, source_datapipe):\r\n        self.source_datapipe = source_datapipe\r\n\r\n    def __iter__(self):\r\n        for iterable in self.source_datapipe:\r\n            yield from iterable\r\n\r\ndef intra_archive_shuffle(archive_content):\r\n    return IterableWrapper(archive_content).shuffle()\r\n    \r\n    \r\ndp = FileLister(str(root), masks=[\"*.pkl\"])\r\ndp = dp.shuffle()  # inter-archive shuffling\r\ndp = PickleLoaderDataPipe(dp)\r\ndp = dp.map(intra_archive_shuffle)\r\ndp = ConcaterIterable(dp)  # Note: unbatch doesn't work because it's a datapipe of datapipes\r\n\r\nprint(list(dp))\r\n```",
    "url": "https://github.com/meta-pytorch/data/issues/732",
    "state": "open",
    "labels": [],
    "created_at": "2022-08-15T17:14:39Z",
    "updated_at": "2022-08-16T13:02:46Z",
    "comments": 8,
    "user": "NicolasHug"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 83392,
    "title": "How to turn off determinism just for specific operations, e.g. upsampling through bilinear interpolation?",
    "body": "This is the error caused by upsampling through bilinear interpolation when trying to use deterministic algorithms:\r\n\r\n`RuntimeError: upsample_bilinear2d_backward_cuda does not have a deterministic implementation, but you set 'torch.use_deterministic_algorithms(True)'. You can turn off determinism just for this operation if that's acceptable for your application. You can also file an issue at https://github.com/pytorch/pytorch/issues to help us prioritize adding deterministic support for this operation.`\r\n\r\nHow to turn off determinism just for upsampling_bilinear2d (and any other operation)? Thanks!\n\ncc @ngimel @mruberry @kurtamohler",
    "url": "https://github.com/pytorch/pytorch/issues/83392",
    "state": "open",
    "labels": [
      "module: cuda",
      "triaged",
      "module: determinism"
    ],
    "created_at": "2022-08-14T12:15:32Z",
    "updated_at": "2022-08-15T04:42:36Z",
    "user": "Jingling1"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4839,
    "title": "ImageFolder dataset builder does not read the validation data set if it is named as \"val\"",
    "body": "**Is your feature request related to a problem? Please describe.**\r\n\r\nCurrently, the `'imagefolder'` data set builder in [`load_dataset()`](https://github.com/huggingface/datasets/blob/2.4.0/src/datasets/load.py#L1541] ) only [supports](https://github.com/huggingface/datasets/blob/6c609a322da994de149b2c938f19439bca99408e/src/datasets/data_files.py#L31) the following names as the validation data set directory name: `[\"validation\", \"valid\", \"dev\"]`. When the validation directory is named as `'val'`, the Data set will not have a validation split. I expected this to be a trivial task but ended up spending a lot of time before knowing that only the above names are supported.\r\n\r\nHere's a minimal example of `val` not being recognized:\r\n\r\n```python\r\nimport os\r\nimport numpy as np\r\nimport cv2   \r\nfrom datasets import load_dataset\r\n\r\n# creating a dummy data set with the following structure:\r\n\r\n# ROOT\r\n# | -- train\r\n# | ---- class_1\r\n# | ---- class_2\r\n# | -- val\r\n# | ---- class_1\r\n# | ---- class_2\r\n\r\n\r\nROOT = \"data\"\r\n\r\n\r\nfor which in [\"train\", \"val\"]:\r\n  for class_name in [\"class_1\", \"class_2\"]:\r\n    dir_name = os.path.join(ROOT, which, class_name)\r\n    if not os.path.exists(dir_name):\r\n      os.makedirs(dir_name)\r\n    for i in range(10):\r\n       cv2.imwrite(\r\n           os.path.join(dir_name, f\"{i}.png\"),\r\n           np.random.random((224, 224))\r\n           )\r\n\r\n# trying to create a data set\r\ndataset = load_dataset(\r\n    \"imagefolder\", \r\n    data_dir=ROOT\r\n)\r\n\r\n>> dataset\r\nDatasetDict({\r\n    train: Dataset({\r\n        features: ['image', 'label'],\r\n        num_rows: 20\r\n    })\r\n})\r\n\r\n# ^ note how the dataset only has a 'train' subset\r\n\r\n```\r\n\r\n**Describe the solution you'd like**\r\n\r\nThe suggestion is to include `\"val\"` to  [that list ](https://github.com/huggingface/datasets/blob/6c609a322da994de149b2c938f19439bca99408e/src/datasets/data_files.py#L31) as that's a commonly used phrase to name the validation directory. \r\n\r\nAlso, In the documentation, explicitly mention that only such directory names are supported as train/val/test directories to avoid confusion.\r\n\r\n**Describe alternatives you've considered**\r\n\r\nIn the documentation, explicitly mention that only such directory names are supported as train/val/test directories without adding `val` to the above list.\r\n\r\n\r\n**Additional context**\r\n\r\nA question asked in the forum: [\r\nLoading an imagenet-style image dataset with train/val directories](https://discuss.huggingface.co/t/loading-an-imagenet-style-image-dataset-with-train-val-directories/21554)",
    "url": "https://github.com/huggingface/datasets/issues/4839",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-08-12T13:26:00Z",
    "updated_at": "2022-08-30T10:14:55Z",
    "comments": 1,
    "user": "akt42"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4836,
    "title": "Is it possible to pass multiple links to a split in load script?",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nI wanted to use a python loading script in hugging face datasets that use different sources of text (it's somehow a compilation of multiple datasets + my own dataset) based on how `load_dataset` [works](https://huggingface.co/docs/datasets/loading) I assumed I could do something like bellow in my loading script:\r\n\r\n```python\r\n...\r\n_URL = \"MY_DATASET_URL/resolve/main/data/\"\r\n_URLS = {\r\n    \"train\": [\r\n        \"FIRST_URL_TO.txt\",\r\n        _URL + \"train-00000-of-00001-676bfebbc8742592.parquet\"\r\n    ]\r\n}\r\n...\r\n```\r\nbut when loading the dataset it raises the following error:\r\n```python\r\nFile ~/.local/lib/python3.8/site-packages/datasets/builder.py:704, in DatasetBuilder.download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)\r\n    702         logger.warning(\"HF google storage unreachable. Downloading and preparing it from source\")\r\n    703 if not downloaded_from_gcs:\r\n--> 704     self._download_and_prepare(\r\n    705         dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs\r\n...\r\n    668     if isinstance(a, str):\r\n    669         # Force-cast str subclasses to str (issue #21127)\r\n    670         parts.append(str(a))\r\n\r\nTypeError: expected str, bytes or os.PathLike object, not list\r\n```\r\n\r\n**Describe the solution you'd like**\r\nI believe since it's possible for `load_dataset` to get list of URLs instead of just a URL for `train` split it can be possible here too.\r\n\r\n**Describe alternatives you've considered**\r\nAn alternative solution would be to download all needed datasets locally and `push_to_hub` them all, but since the datasets I'm talking about are huge it's not among my options. \r\n\r\n**Additional context**\r\nI think loading `text` beside the `parquet` is completely a different issue but I believe I can figure it out by proposing a config for my dataset to load each entry of `_URLS['train']` separately either by `load_dataset(\"text\", ...` or `load_dataset(\"parquet\", ...`.\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4836",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-08-12T11:06:11Z",
    "updated_at": "2022-08-12T11:06:11Z",
    "comments": 0,
    "user": "sadrasabouri"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1253,
    "title": "\u2753 [Question] How to load a TRT_Module in python environment on Windows which has been compiled on C++ Windows ? ",
    "body": "## \u2753 Question\r\n\r\nI have compiled torch_trt module using libtorch on C++ windows platform. This module is working perfectly on C++ for inference, however I want to use it in Python program on windows platform. How to load this module on python?\r\n\r\nWhen I tried to load it with torch.jit.load() or torch.jit.load() it is throwing following error:\r\n\r\n `File ~\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\torch\\serialization.py:711, in load(f, map_location, pickle_module, **pickle_load_args)\r\n    707             warnings.warn(\"'torch.load' received a zip file that looks like a TorchScript archive\"\r\n    708                           \" dispatching to 'torch.jit.load' (call 'torch.jit.load' directly to\"\r\n    709                           \" silence this warning)\", UserWarning)\r\n    710             opened_file.seek(orig_position)\r\n--> 711             return torch.jit.load(opened_file)\r\n    712         return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)\r\n    713 return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)\r\n\r\nFile ~\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\torch\\jit\\_serialization.py:164, in load(f, map_location, _extra_files)\r\n    162     cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files)\r\n    163 else:\r\n--> 164     cpp_module = torch._C.import_ir_module_from_buffer(\r\n    165         cu, f.read(), map_location, _extra_files\r\n    166     )\r\n    168 # TODO: Pretty sure this approach loses ConstSequential status and such\r\n    169 return wrap_cpp_module(cpp_module)\r\n\r\nRuntimeError: \r\nUnknown type name '__torch__.torch.classes.tensorrt.Engine':\r\n  File \"code/__torch__/movinets/models.py\", line 4\r\n  __parameters__ = []\r\n  __buffers__ = []\r\n  __torch___movinets_models_MoViNet_trt_engine_ : __torch__.torch.classes.tensorrt.Engine\r\n                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n  def forward(self_1: __torch__.movinets.models.MoViNet_trt,\r\n    input_0: Tensor) -> Tensor:`\r\n\r\n\r\n## What you have already tried\r\n\r\nSince torch_trt is not supported for Python on windows I picked `libtorchtrt_runtime.so` from linux `python3.8/site-packages/torch_tensorrt/lib/libtorchtrt_runtime.so` path and loaded on python on windows through torch.ops.load_library(). However it throws another error\r\n\r\n`File \"\\video_play.py\", line 189, in get_torch_tensorrt_converted_model torch.ops.load_library(\"libtorchtrt_runtime.so\") File \"C:\\Users\\NomanAnjum\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\torch\\_ops.py\", line 255, in load_library ctypes.CDLL(path) File \"C:\\Users\\NomanAnjum\\AppData\\Local\\Programs\\Python\\Python310\\lib\\ctypes\\__init__.py\", line 374, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 193] %1 is not a valid Win32 application`\r\n\r\n## Environment\r\n\r\nWindows 11\r\n\r\nCPU : i9-11980HK x86-64\r\n\r\nGPU : RTX 3080 Mobile\r\n\r\nCuda : 11.5.2\r\n\r\nCudnn : 8.3.1\r\n\r\nLibtorch : 1.11\r\n\r\nTensor_RT : 8.4.1.5\r\n\r\nVisual Studio 2019\r\n\r\nPython 3.10,3.8\r\n\r\n\r\n#### Is there a way to load it in python??",
    "url": "https://github.com/pytorch/TensorRT/issues/1253",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "channel: windows"
    ],
    "created_at": "2022-08-11T06:26:05Z",
    "updated_at": "2023-02-26T00:02:28Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 83227,
    "title": "QAT the bias  is the int32, how to set the int8?",
    "body": "### \ud83d\udc1b Describe the bug\n\ni try to do quantization, the weight is int8 ,but the bias is int32, i want to set the bias ---> int8, what i need to do ?\r\nthanks\n\n### Versions\n\nhelp me, thanks\n\ncc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo",
    "url": "https://github.com/pytorch/pytorch/issues/83227",
    "state": "closed",
    "labels": [
      "oncall: quantization"
    ],
    "created_at": "2022-08-11T03:11:12Z",
    "updated_at": "2022-08-11T23:10:24Z",
    "user": "aimen123"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4820,
    "title": "Terminating: fork() called from a process already using GNU OpenMP, this is unsafe.",
    "body": "Hi, when i try to run prepare_dataset function in [fine tuning ASR tutorial 4](https://colab.research.google.com/github/patrickvonplaten/notebooks/blob/master/Fine_tuning_Wav2Vec2_for_English_ASR.ipynb) , i got this error.\r\nI got this error\r\nTerminating: fork() called from a process already using GNU OpenMP, this is unsafe.\r\nThere is no other logs available, so i have no clue what is the cause of it.\r\n```\r\n\r\ndef prepare_dataset(batch):\r\n    audio = batch[\"path\"]\r\n    # batched output is \"un-batched\"\r\n    batch[\"input_values\"] = processor(audio[\"array\"], sampling_rate=audio[\"sampling_rate\"]).input_values[0]\r\n    batch[\"input_length\"] = len(batch[\"input_values\"])\r\n    with processor.as_target_processor():\r\n        batch[\"labels\"] = processor(batch[\"text\"]).input_ids\r\n    return batch\r\n\r\ndata = data.map(prepare_dataset, remove_columns=data.column_names[\"train\"],\r\n                      num_proc=4)\r\n```\r\n\r\n\r\nSpecify the actual results or traceback.\r\nThere is no traceback except\r\n`Terminating: fork() called from a process already using GNU OpenMP, this is unsafe.`\r\n## Environment info\r\n<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->\r\n- `datasets` version: 2.4.0\r\n- Platform: Linux-5.15.0-43-generic-x86_64-with-glibc2.29\r\n- Python version: 3.8.10\r\n- PyArrow version: 9.0.0\r\n- Pandas version: 1.4.3\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4820",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-08-10T19:42:33Z",
    "updated_at": "2022-08-10T19:53:10Z",
    "comments": 1,
    "user": "talhaanwarch"
  },
  {
    "repo": "pytorch/functorch",
    "number": 999,
    "title": "vmap and forward-mode AD fail sometimes on in-place views",
    "body": "## The Problem\r\n\r\n```py\r\nimport torch\r\nfrom functorch import jvp, vmap\r\nfrom functools import partial\r\n\r\nB = 2\r\n\r\ndef f(x, y):\r\n    x = x.clone()\r\n    view = x[0]\r\n    x.copy_(y)\r\n    return view, x\r\n\r\ndef push_jvp(x, y, yt):\r\n    return jvp(partial(f, x), (y,), (yt,))\r\n\r\nx = torch.randn(2, B, 6)\r\ny = torch.randn(2, 6, B)\r\nyt = torch.randn(2, 6, B)\r\nouts, tangents = vmap(push_jvp, in_dims=(1, 2, 2))(x, y, yt)\r\n```\r\nraises the following:\r\n```\r\nRuntimeError: vmap: Calling Tensor.as_strided is not supported unless the batch dims being vmapped over are at the front of\r\nthe tensor (in memory layout). When they are not at the front of the tensor this operation can be error prone so we actively\r\n discourage it; please file us a bug report and/or try to express the as_strided operation in terms of PyTorch view operatio\r\nns\r\n```\r\n\r\nIf I am understanding what is going on correctly, the root cause of the problem is that, ignoring vmap for a second, in `x.copy_(y)`, x is a regular Tensor and y is a dual tensor:\r\n- the copy_ causes x.tangent to be a copy of y.tangent\r\n- then, the tangent on the base (x) gets propagated to the views. This happens by calling .as_strided. `view.tangent` gets assigned `x.tangent.as_strided(something)`\r\n\r\nNow, if `y.tangent` is a BatchedTensor, then calling `as_strided` on it may raise the above error message.\r\n\r\n## Is this actually a problem?\r\n\r\nPreviously, our approach was to say that vmap x jvp composition only works when the user must only vmap over dimension 0. However, that's not quite correct -- if the user users non-contiguous tensors, then it'll run into this problem. Also, vmap x jvp can produce tensors where the batch dimension is not at 0, so the user has no control over this.\r\n\r\n## Potential solutions\r\n\r\n1. When a tangent gets propagated to views as a result of an in-place operation, instead of calling `as_strided`, we should call the original view operation. This means we should save the original view operation somewhere.\r\n1. (From Jeffrey) An alternative to (1) is: instead of calling as_strided, figure out what the correct non-as_strided view operation(s) are by reading the sizes/sizes/storage_offset, and call that instead.\r\n1. It is possible to write a batching rule for a \"safe as_strided\". An as_strided call is safe if it does not expose memory that was not previously exposed in the Tensor. We would (a) add a `safe_as_strided` operator, (b) save some metadata on if a view Tensor was created from a base through a chain of \"safe\" operations or not, and (c) dispatch to either `safe_as_strided` or `as_strided`\r\n\r\nThoughts? cc @soulitzer @albanD ",
    "url": "https://github.com/pytorch/functorch/issues/999",
    "state": "open",
    "labels": [],
    "created_at": "2022-08-10T17:45:17Z",
    "updated_at": "2022-08-16T20:46:48Z",
    "comments": 9,
    "user": "zou3519"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 83135,
    "title": "torch.nn.functional.avg_pool{1|2|3}d error message does not match what is described in the documentation",
    "body": "### \ud83d\udcda The doc issue\n\nParameter 'kernel_size' and 'stride' of torch.nn.functional.avg_pool{1|2|3}d can be a single number or a tuple. However, I found that error message only mentioned tuple of ints which means parameter 'kernel_size' and 'stride' can be only int number or tuple of ints.\r\n\r\n```\r\nimport torch\r\nresults={}\r\narg_1 = torch.rand([1, 1, 7], dtype=torch.float32)\r\narg_2 = 8.0\r\narg_3 = 2\r\narg_4 = 0\r\narg_5 = True\r\narg_6 = True\r\nresults['res'] = torch.nn.functional.avg_pool1d(arg_1,arg_2,arg_3,arg_4,arg_5,arg_6,)\r\n#TypeError: avg_pool1d(): argument 'kernel_size' (position 2) must be tuple of ints, not float\r\n```\r\n\r\n```\r\nimport torch\r\nresults={}\r\narg_1 = torch.rand([16, 528, 16, 16], dtype=torch.float32)\r\narg_2 = 32.0\r\narg_3 = 13.0\r\narg_4 = 0\r\narg_5 = False\r\narg_6 = True\r\narg_7 = None\r\nresults['res'] = torch.nn.functional.avg_pool2d(arg_1,arg_2,arg_3,arg_4,arg_5,arg_6,arg_7,)\r\n#TypeError: avg_pool2d(): argument 'stride' (position 3) must be tuple of ints, not float\r\n```\r\n\r\n```\r\nimport torch\r\nresults={}\r\narg_1 = torch.rand([20, 16, 50, 44, 31], dtype=torch.float32)\r\narg_2_0 = 3.0\r\narg_2_1 = 2\r\narg_2_2 = 2\r\narg_2 = [3.0,2,2]\r\narg_3_0 = 2\r\narg_3_1 = 1\r\narg_3_2 = 2\r\narg_3 = [2,1,2]\r\narg_4 = 0\r\narg_5 = False\r\narg_6 = True\r\narg_7 = None\r\nresults['res'] = torch.nn.functional.avg_pool3d(arg_1,arg_2,arg_3,arg_4,arg_5,arg_6,arg_7,)\r\n#TypeError: avg_pool3d(): argument 'kernel_size' must be tuple of ints, but found element of type float at pos 1\r\n```\n\n### Suggest a potential alternative/fix\n\nIt would be great if the doc could be written as follows:\r\n\r\nkernel_size \u2013 size of the pooling region. Can be a int number or a tuple (kT, kH, kW).\r\nstride \u2013 stride of the pooling operation. Can be a int number or a tuple (sT, sH, sW).\r\n\r\nOr modify the error message so that it matches the document description.\n\ncc @svekars @holly1238 @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @saketh-are",
    "url": "https://github.com/pytorch/pytorch/issues/83135",
    "state": "open",
    "labels": [
      "module: docs",
      "module: nn",
      "triaged"
    ],
    "created_at": "2022-08-10T01:11:59Z",
    "updated_at": "2022-08-10T12:57:45Z",
    "user": "cheyennee"
  },
  {
    "repo": "pytorch/test-infra",
    "number": 516,
    "title": "[CI] Use job summaries to display how to replicate failures on specific configs",
    "body": "For configs such as slow, dynamo, and parallel-native, reproducing a CI error is more involved than just rerunning the command locally. We should use tools (like job summaries) to give people the context they'd need to repro a bug.",
    "url": "https://github.com/pytorch/test-infra/issues/516",
    "state": "open",
    "labels": [],
    "created_at": "2022-08-09T18:15:15Z",
    "updated_at": "2022-11-15T19:51:40Z",
    "user": "janeyx99"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1243,
    "title": "\u2753 [Question] How to correctly configure LD_LIBRARY_PATH ",
    "body": "## \u2753 Question\r\n\r\nHello, after installing torch_tensorrt on my jetson xavier using jetpack 4.6, I cannot import it. I am having a similar issue to other bugs that have been reported and answered. I am wondering though, how do you correctly add tensorrt to LD_LIBRARY_PATH? (Proposed solution from other bugs).\r\n\r\n## What you have already tried\r\n\r\nThe tensorrt package is stored in /usr/lib/python3.6/dist-packages/tensorrt\r\n\r\nI try adding this to LD_LIBRARY_PATH like so:\r\n`export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/python3.6/dist-packages/tensorrt`\r\n\r\nThis addition hadn't changed the import error, unfortunately.\r\n\r\n## Environment\r\n\r\n> Jetpack 4.6\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1243",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-08-08T20:24:55Z",
    "updated_at": "2022-08-08T20:35:00Z",
    "user": "kneatco"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 502,
    "title": "Improve the docs: what is needed to make the dataset viewer work?",
    "body": "See https://discuss.huggingface.co/t/the-dataset-preview-has-been-disabled-on-this-dataset/21339",
    "url": "https://github.com/huggingface/dataset-viewer/issues/502",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-08-08T13:27:21Z",
    "updated_at": "2022-09-19T09:12:00Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1235,
    "title": "\u2753 [Question] How do you debug errors in the compilation step? ",
    "body": "## \u2753 Question\r\n\r\nHello all, \r\n\r\nAfter training a model, I decided to use torch_tensorrt to test and hopefully increase inference speed. When compiling the custom model, I get the following error: `RuntimeError: Trying to create tensor with negative dimension -1: [-1, 3, 600, 400]`. This did not occur when doing inference in regular PyTorch. Further the following warning was issued (before receiving the error):\r\n```WARNING: [Torch-TensorRT] - For input x.1, found user specified input dtype as Float16, however when inspecting the graph, the input type expected was inferred to be Float\r\nThe compiler is going to use the user setting Float16\r\nThis conflict may cause an error at runtime due to partial compilation being enabled and therefore\r\ncompatibility with PyTorch's data type convention is required.\r\nIf you do indeed see errors at runtime either:\r\n- Remove the dtype spec for x.1\r\n- Disable partial compilation by setting require_full_compilation to True```\r\n\r\nThe code to compile is as follows:\r\n```inputs = [torch_tensorrt.Input(\r\n            min_shape=[2, 3, 600, 400],\r\n            opt_shape=[4, 3, 600, 400],\r\n            max_shape=[8, 3, 600, 400],\r\n            dtype=torch.half,\r\n        )]\r\nenabled_precisions = {torch.float, torch.half}\r\ntrt_ts_module = torch_tensorrt.compile(model, inputs=inputs, enabled_precisions=enabled_precisions)\r\n```\r\n\r\nMy question is: what can I do to properly debug this error?\r\n\r\n## What you have already tried\r\n- Use `mobilenet_v2`, as specified in the example https://pytorch.org/TensorRT/tutorials/use_from_pytorch.html#use-from-pytorch. This model compiles successfully.\r\n- Change the input size (change the batch size, i.e. the first dimension, use shapes of >= 100). This gave the same error.\r\n- Set `require_full_compilation` to True, which was not fruitful either.\r\n\r\n## Environment\r\n - PyTorch Version (e.g., 1.0): 1.11.0+cu113\r\n - Torch-TensorRT version: 1.1.0\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Ubuntu 20.04 (kernel: 5.4.0-122-generic)\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): `pip`, from within a virtual environment (`pyenv`)\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.8.13\r\n - CUDA version: 11.4.4 (Driver: 470.82.01)\r\n - GPU models and configuration: Nvidia RTX A2000\r\n - Any other relevant information: TensorRT has been installed via pip, to install torch_tensorrt (and getting it to import in Python), I followed the answer in the following issue: https://github.com/pytorch/TensorRT/issues/1026#issuecomment-1119561746\r\n\r\nLooking forwards to your answer, thanks in advance.\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1235",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-08-05T15:23:53Z",
    "updated_at": "2022-08-08T17:04:30Z",
    "user": "Mark-M2L"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1233,
    "title": "\u2753 [Question] How to install \"tensorrt\" package? ",
    "body": "## \u2753 Question\r\n\r\nI'm trying to install `torch-tensorrt` on a Jetson AGX Xavier. I first installed `pytorch` 1.12.0 and `torchvision` 0.13.0 following this [guide](https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-11-now-available/72048). Then I installed `torch-tensorrt` following this [guide](https://pytorch.org/TensorRT/tutorials/installation.html#installation), and the compilation completed succesfully.\r\n\r\nWhen I try to import `torch_tensorrt` it throws an error, saying it can't find a module named `tensorrt`. Where I can find this package?\r\n\r\n## Environment\r\n\r\nI'm using a Jetson AGX Xavier with Jetpack 5.0.1.",
    "url": "https://github.com/pytorch/TensorRT/issues/1233",
    "state": "closed",
    "labels": [
      "question",
      "component: dependencies",
      "channel: linux-jetpack"
    ],
    "created_at": "2022-08-05T08:40:18Z",
    "updated_at": "2022-12-15T17:36:36Z",
    "user": "domef"
  },
  {
    "repo": "pytorch/data",
    "number": 718,
    "title": "Recommended practice to shuffle data with datapipes differently every epoch",
    "body": "### \ud83d\udcda The doc issue\n\nI was trying `torchdata` 0.4.0 and I found that shuffling with data pipes will always yield the same result across different epochs, unless I shuffle it again at the beginning of every epoch.\r\n\r\n```python\r\n# same_result.py\r\nimport torch\r\nimport torchdata.datapipes as dp\r\nX = torch.randn(200, 5)\r\ndpX = dp.map.SequenceWrapper(X)\r\ndpXS = dpX.shuffle()\r\nfor _ in range(5):\r\n    for i in dpXS:\r\n        print(i)   # always prints the same value\r\n        break\r\n\r\n# different_result.py\r\nimport torch\r\nimport torchdata.datapipes as dp\r\nX = torch.randn(200, 5)\r\ndpX = dp.map.SequenceWrapper(X)\r\nfor _ in range(5):\r\n    dpXS = dpX.shuffle()\r\n    for i in dpXS:\r\n        print(i)   # prints different values\r\n        break\r\n```\r\n\r\nI wonder what is the recommended practice to shuffle the data at the beginning of every epoch?  Neither the documentation nor the examples seem to answer this question.\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/718",
    "state": "closed",
    "labels": [],
    "created_at": "2022-08-05T02:12:25Z",
    "updated_at": "2022-09-13T21:18:49Z",
    "comments": 4,
    "user": "BarclayII"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 498,
    "title": "Test cookie authentication",
    "body": "Testing token authentication is easy, see https://github.com/huggingface/datasets-server/issues/199#issuecomment-1205528302, but testing session cookie authentication might be a bit more complex since we need to log in to get the cookie. I prefer to get a dedicate issue for it.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/498",
    "state": "closed",
    "labels": [
      "question",
      "tests"
    ],
    "created_at": "2022-08-04T17:06:31Z",
    "updated_at": "2022-08-22T18:34:29Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4791,
    "title": "Dataset Viewer issue for Team-PIXEL/rendered-wikipedia-english",
    "body": "### Link\n\nhttps://huggingface.co/datasets/Team-PIXEL/rendered-wikipedia-english/viewer/rendered-wikipedia-en/train\n\n### Description\n\nThe dataset can be loaded fine but the viewer shows this error:\r\n\r\n```\r\nServer Error\r\nStatus code:   400\r\nException:     Status400Error\r\nMessage:       The dataset does not exist.\r\n```\r\n\r\nI'm guessing this is because I recently renamed the dataset. Based on related issues (e.g. https://github.com/huggingface/datasets/issues/4759) , is there something server-side that needs to be refreshed?\n\n### Owner\n\nYes",
    "url": "https://github.com/huggingface/datasets/issues/4791",
    "state": "closed",
    "labels": [
      "dataset-viewer"
    ],
    "created_at": "2022-08-04T12:49:16Z",
    "updated_at": "2022-08-04T13:43:16Z",
    "comments": 1,
    "user": "xplip"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 82751,
    "title": "Refactor how errors decide whether to append C++ stacktrace",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nPer @zdevito's comment in https://github.com/pytorch/pytorch/pull/82665/files#r936022305, we should refactor the way C++ stacktrace is appended to errors.\r\n\r\nCurrently, in https://github.com/pytorch/pytorch/blob/752579a3735ce711ccaddd8d9acff8bd6260efe0/torch/csrc/Exceptions.h, each error goes through a try/catch and the C++ stacktrace is conditioned on whether cpp stacktraces are enabled or not.\r\n\r\nInstead, specific exceptions can have a flag that determines whether cpp stacktrace is added or not. Most errors would set this in their constructor based on the env variable, but for certain types of errors which always report cpp stacktrace, this can just be set to true and this field can be checked when reporting errors.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/82751",
    "state": "open",
    "labels": [
      "triaged",
      "better-engineering"
    ],
    "created_at": "2022-08-03T20:28:56Z",
    "updated_at": "2022-08-03T20:28:56Z",
    "user": "rohan-varma"
  },
  {
    "repo": "pytorch/data",
    "number": 712,
    "title": "Add Examples of Common Preprocessing Steps with IterDataPipe (such as splitting a data set into two)",
    "body": "### \ud83d\udcda The doc issue\r\n\r\nThere are a few common steps that users often would like to do while preprocessing data, such as [splitting their data set](https://pytorch.org/docs/stable/data.html#torch.utils.data.random_split) into train and eval. There are documentation in PyTorch Core about how to do these things with `Dataset`. We should add the same to our documentation, specifically for `IterDataPipe`. Or create a link to PyTorch Core's documentation for reference when that is appropriate. This issue is driven by common questions we have received either in person or on the forum.\r\n\r\nIf we find that any functionality is missing for `IterDataPipe`, we should implement them.\r\n",
    "url": "https://github.com/meta-pytorch/data/issues/712",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-08-02T23:58:09Z",
    "updated_at": "2022-10-20T17:49:41Z",
    "comments": 9,
    "user": "NivekT"
  },
  {
    "repo": "pytorch/data",
    "number": 709,
    "title": "Update tutorial about shuffling before sharding",
    "body": "### \ud83d\udcda The doc issue\n\nThe [tutorial](https://pytorch.org/data/beta/tutorial.html#working-with-dataloader) needs to update the actual reason about shuffling before sharding. It's not accurate.\r\nShuffling before sharding is required to achieve global shuffling rather than only shuffling inside each shard.\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/709",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-08-02T17:53:56Z",
    "updated_at": "2022-08-04T22:06:36Z",
    "comments": 2,
    "user": "ejguan"
  },
  {
    "repo": "pytorch/data",
    "number": 707,
    "title": "Map-style DataPipe to read from s3",
    "body": "### \ud83d\ude80 The feature\n\n[Amazon S3 plugin for PyTorch ](https://aws.amazon.com/blogs/machine-learning/announcing-the-amazon-s3-plugin-for-pytorch/)proposes S3Dataset which is a Map-style PyTorch Dataset. I was looking for a similar feature in torchdata but only found [S3FileLoader](https://pytorch.org/data/main/generated/torchdata.datapipes.iter.S3FileLoader.html#torchdata.datapipes.iter.S3FileLoader) which doesn't meet my requirements.\r\n \r\n Is there any implementation of a Map-style DataPipe I am missing? Or any method to do a similar thing with the existing tools?\r\n \r\nThe main requirement is that I need to read images from s3, apply a transformation, and keep them syncronized with a list of labels. \r\n\r\n Thank you\n\n### Motivation, pitch\n\nMap-style DataPipe to read from s3 to complement the existing itetable style Datapipe to read from s3.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/707",
    "state": "closed",
    "labels": [],
    "created_at": "2022-08-02T12:58:21Z",
    "updated_at": "2022-08-04T13:31:32Z",
    "comments": 10,
    "user": "gombru"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1993,
    "title": "Problem with the torchtext library text classification example",
    "body": "The first section of the [tutorial](https://pytorch.org/tutorials/beginner/text_sentiment_ngrams_tutorial.html) suggests\r\n`\r\nimport torch\r\nfrom torchtext.datasets import AG_NEWS\r\ntrain_iter = iter(AG_NEWS(split='train'))\r\n`\r\n\r\nwhich does not work yielding\r\n`TypeError: _setup_datasets() got an unexpected keyword argument 'split'`\r\n\r\nI might highlight as well that the string doc for AG_NEWS mentions\r\n`train_dataset, test_dataset = torchtext.datasets.AG_NEWS(ngrams=3)`\n\ncc @pytorch/team-text-core @Nayef211",
    "url": "https://github.com/pytorch/tutorials/issues/1993",
    "state": "closed",
    "labels": [
      "question",
      "module: torchtext",
      "docathon-h1-2023",
      "medium"
    ],
    "created_at": "2022-08-02T08:46:49Z",
    "updated_at": "2023-06-12T19:42:05Z",
    "user": "EssamWisam"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4776,
    "title": "RuntimeError when using torchaudio 0.12.0 to load MP3 audio file",
    "body": "Current version of `torchaudio` (0.12.0) raises a RuntimeError when trying to use `sox_io` backend but non-Python dependency `sox` is not installed:\r\nhttps://github.com/pytorch/audio/blob/2e1388401c434011e9f044b40bc8374f2ddfc414/torchaudio/backend/sox_io_backend.py#L21-L29\r\n```python\r\ndef _fail_load(\r\n    filepath: str,\r\n    frame_offset: int = 0,\r\n    num_frames: int = -1,\r\n    normalize: bool = True,\r\n    channels_first: bool = True,\r\n    format: Optional[str] = None,\r\n) -> Tuple[torch.Tensor, int]:\r\n    raise RuntimeError(\"Failed to load audio from {}\".format(filepath))\r\n```\r\n\r\nMaybe we should raise a more actionable error message so that the user knows how to fix it.\r\n\r\nUPDATE:\r\n- this is an incompatibility of latest torchaudio (0.12.0) and the sox backend\r\n\r\nTODO:\r\n- [x] as a temporary solution, we should recommend installing torchaudio<0.12.0\r\n  - #4777 \r\n  - #4785\r\n- [ ] however, a stable solution must be found for torchaudio>=0.12.0\r\n\r\nRelated to: \r\n- https://github.com/huggingface/transformers/issues/18379",
    "url": "https://github.com/huggingface/datasets/issues/4776",
    "state": "closed",
    "labels": [],
    "created_at": "2022-08-01T14:11:23Z",
    "updated_at": "2023-03-02T15:58:16Z",
    "comments": 3,
    "user": "albertvillanova"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1991,
    "title": "Some typos in and a question from TorchScript tutorial",
    "body": "Hi, I first thank for this tutorial.\r\n\r\nHere are some typos in the tutorial:\r\n\r\n1.`be` in https://github.com/pytorch/tutorials/blob/7976ab181fd2a97b2775574eec284d1fc8abcfe0/beginner_source/Intro_to_TorchScript_tutorial.py#L42 should be `by`.\r\n\r\n2.`succintly` in https://github.com/pytorch/tutorials/blob/7976ab181fd2a97b2775574eec284d1fc8abcfe0/beginner_source/Intro_to_TorchScript_tutorial.py#L114 should be `succinctly`.\r\n\r\n3.In https://github.com/pytorch/tutorials/blob/7976ab181fd2a97b2775574eec284d1fc8abcfe0/beginner_source/Intro_to_TorchScript_tutorial.py#L206-L207 `TracedModule` is wrongly stated to be an instance of `ScriptModule`. I suggest that this line become:\r\n```\r\n# instance of ``torch.jit.TracedModule`` (which is a subclass of ``torch.jit.ScriptModule``)\r\n```\r\n\r\n4.Second part in https://github.com/pytorch/tutorials/blob/7976ab181fd2a97b2775574eec284d1fc8abcfe0/beginner_source/Intro_to_TorchScript_tutorial.py#L322-L323 seems somewhat ambiguous to me. What does it mean by the second `inline`?\n\ncc @svekars",
    "url": "https://github.com/pytorch/tutorials/issues/1991",
    "state": "closed",
    "labels": [
      "grammar"
    ],
    "created_at": "2022-08-01T13:21:26Z",
    "updated_at": "2022-10-13T22:49:41Z",
    "comments": 2,
    "user": "sadra-barikbin"
  },
  {
    "repo": "huggingface/optimum",
    "number": 327,
    "title": "Any workable example of exporting  and inferencing with GPU?",
    "body": "### System Info\n\n```shell\nBeen tried many methods, but never successfully done it. Thanks.\n```\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n```\r\nmodel = ORTModelForSequenceClassification.from_pretrained(model_checkpoint, from_transformers=True)\r\ntokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\r\nmodel.save_pretrained(save_directory, file_name=file_name)\r\ntokenizer.save_pretrained(save_directory)\r\n\r\noptimization_config = OptimizationConfig(optimization_level=99, optimize_for_gpu=True)\r\noptimizer = ORTOptimizer.from_pretrained(\r\n    model_checkpoint,\r\n    feature=\"sequence-classification\",\r\n)\r\n\r\noptimizer.export(\r\n    onnx_model_path=onnx_path,\r\n    onnx_optimized_model_output_path=os.path.join(save_directory, \"model-optimized.onnx\"),\r\n    optimization_config=optimization_config,\r\n)```\n\n### Expected behavior\n\nNA",
    "url": "https://github.com/huggingface/optimum/issues/327",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-08-01T05:12:15Z",
    "updated_at": "2022-08-01T06:19:26Z",
    "comments": 1,
    "user": "lkluo"
  },
  {
    "repo": "pytorch/data",
    "number": 705,
    "title": "Set better defaults for `MultiProcessingReadingService`",
    "body": "### \ud83d\ude80 The feature\r\n\r\n```python\r\nclass MultiProcessingReadingService(ReadingServiceInterface):\r\n    num_workers: int = get_number_of_cpu_cores()\r\n    pin_memory: bool = True\r\n    timeout: float\r\n    worker_init_fn: Optional[Callable[[int], None]] # Remove this?\r\n    prefetch_factor: int = profile_optimal_prefetch_factor(model : nn.Module)\r\n    persistent_workers: bool = True\r\n```    \r\n\r\nI can add these, opening this issue to discuss whether it's a good idea to change defaults. \r\n\r\n+: Users get better out of the box performance with `torchdata`\r\n-: backward compatibility issues when moving from `dataloaderv1` to `dataloaderv2`\r\n\r\n### Motivation, pitch\r\n\r\nThere are many issues on discuss, stack overflow, and blogs describing how people should configure data loaders for optimized performance. Since a lot of the tricks haven't changed like `pin_memory = true` or `num_workers = num_cpu_cores` or `persistent_workers=true` and since we're in the process of developing `dataloaderv2` now may be a good time to revisit these default values \r\n\r\n* https://www.jpatrickpark.com/post/prefetcher/#:~:text=The%20prefetch_factor%20parameter%20only%20controls,samples%20prefetched%20across%20all%20workers.)\r\n* https://stackoverflow.com/questions/53998282/how-does-the-number-of-workers-parameter-in-pytorch-dataloader-actually-work\r\n* https://discuss.pytorch.org/t/when-to-set-pin-memory-to-true/19723\r\n\r\n### Alternatives\r\n\r\n1. Instead of setting reasonable defaults, we can instead extend the `linter.py` to suggest some of these tips if we notice some sources of slowdowns\r\n2. Do nothing, suggest people read documentation when configuring performance\r\n\r\n### Additional context\r\n\r\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/705",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-07-31T22:46:33Z",
    "updated_at": "2022-08-02T22:07:18Z",
    "comments": 1,
    "user": "msaroufim"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 82542,
    "title": "Is there Doc that explains how to call an extension op in another extension implementation?",
    "body": "### \ud83d\udcda The doc issue\n\nFor example, there is an extension op which is installed from public repo via `pip install torch-scatter`, and in Python code, it's easy to use this extension:\r\n\r\n```py\r\nimport torch\r\noutput = torch.ops.torch_scatter.scatter_max(x, index)\r\n```\r\n\r\nHowever, I'm writing an C++ extension and want to call this extension as well, but I cannot find any doc that guides how to do this, or I don't know whether Pytorch C++ extension can even support it or not. Briefly, this is something I'd like to do in extension function:\r\n\r\n```cpp\r\ntorch::Tensor my_op(torch::Tensor x, torch::Tensor y, torch::Tensor z) {\r\n  auto temp = torch::ops::torch_scatter::scatter_max(z, y.view(-1)); // not working\r\n  ..\r\n  return temp;\r\n}\r\n```\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @svekars @holly1238 @jbschlosser",
    "url": "https://github.com/pytorch/pytorch/issues/82542",
    "state": "open",
    "labels": [
      "module: docs",
      "module: cpp",
      "triaged"
    ],
    "created_at": "2022-07-31T06:20:02Z",
    "updated_at": "2022-08-03T15:18:05Z",
    "user": "ghostplant"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 82524,
    "title": "how to build libtorch from source?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\n where is the source? I want to build libtorch-win-shared-with-deps-1.12.0%2Bcu116.zip\r\n\r\n### Versions\r\n\r\nas in the title\r\n\r\ncc @malfet @seemethere @svekars @holly1238 @jbschlosser",
    "url": "https://github.com/pytorch/pytorch/issues/82524",
    "state": "closed",
    "labels": [
      "module: build",
      "module: docs",
      "module: cpp",
      "triaged"
    ],
    "created_at": "2022-07-30T08:01:18Z",
    "updated_at": "2022-08-21T01:50:37Z",
    "user": "xoofee"
  },
  {
    "repo": "pytorch/data",
    "number": 703,
    "title": "Read Parquet Files Directly from S3?",
    "body": "### \ud83d\ude80 The feature\n\nThe `ParquetDataFrameLoader` allows us to read parquet files from the local file system, but I don't think it supports reading parquet files from (for example) an S3 bucket.\r\n\r\nMake this possible.\n\n### Motivation, pitch\n\nI would like to train my models on parquet files stored in an S3 bucket.\n\n### Alternatives\n\nYou could probably download the parquet file locally and then use the `ParquetDataFrameLoader`?\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/703",
    "state": "open",
    "labels": [
      "enhancement",
      "feature"
    ],
    "created_at": "2022-07-30T06:07:01Z",
    "updated_at": "2022-08-03T19:09:09Z",
    "comments": 2,
    "user": "vedantroy"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1213,
    "title": "\u2753 [Question] Is it ok to build v1.1.0 with cuda10.2 not default cuda11.3?",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nIs it ok to build v1.1.0 with cuda10.2 not default cuda11.3?\r\nIt's hard to upgrade latest gpu driver for some machine which is shared by many people. So cuda10.2 is preferred.\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version: 1.11.0\r\n - CUDA version: 10.2 \r\n - TensorRT:  8.2.4.2 \r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1213",
    "state": "closed",
    "labels": [
      "question",
      "component: dependencies"
    ],
    "created_at": "2022-07-28T12:05:22Z",
    "updated_at": "2022-08-12T01:46:32Z",
    "user": "wikiwen"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4757,
    "title": "Document better when relative paths are transformed to URLs",
    "body": "As discussed with @ydshieh, when passing a relative path as `data_dir` to `load_dataset` of a dataset hosted on the Hub, the relative path is transformed to the corresponding URL of the Hub dataset.\r\n\r\nCurrently, we mention this in our docs here: [Create a dataset loading script > Download data files and organize splits](https://huggingface.co/docs/datasets/v2.4.0/en/dataset_script#download-data-files-and-organize-splits)\r\n> If the data files live in the same folder or repository of the dataset script, you can just pass the relative paths to the files instead of URLs.\r\n\r\nMaybe we should document better how relative paths are handled, not only when creating a dataset loading script, but also when passing to `load_dataset`:\r\n- `data_dir`\r\n- `data_files`\r\n\r\nCC: @stevhliu ",
    "url": "https://github.com/huggingface/datasets/issues/4757",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-07-28T08:46:27Z",
    "updated_at": "2022-08-25T18:34:24Z",
    "comments": 0,
    "user": "albertvillanova"
  },
  {
    "repo": "huggingface/diffusers",
    "number": 143,
    "title": "Running difussers with GPU",
    "body": "Running the example codes i see that the CPU and not the GPU is used, is there a way to use GPU instead",
    "url": "https://github.com/huggingface/diffusers/issues/143",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-07-28T08:34:12Z",
    "updated_at": "2022-08-15T17:27:31Z",
    "user": "jfdelgad"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1212,
    "title": "\ud83d\udc1b [Bug] Encountered bug when using Torch-TensorRT",
    "body": "## \u2753 Question\r\n\r\nHello There, \r\nI've tried to run torch_TensorRT on ubuntu and windows as well. On windows I compiled it with [this](https://github.com/gcuendet/Torch-TensorRT/tree/add-cmake-support) pull request and it is working good on C++. The resulting trt_module on ubuntu is loading flawlessly on python and can be saved and loaded from disk for future use. This is not the case with Windows C++ module, the resulting trt_model on windows via C++ program is working perfectly with C++ but it is not getting loaded on python. My question is, python library is using C binaries to perform this task and resulting model is getting loaded on python, why it is not same in other case? Am I missing something?  \r\n\r\n## What I have tried\r\n\r\n### Working \r\n#### Compiling and Loading TRT Model On Python Ubuntu:\r\n\r\n```\r\ntrt_model_fp32 = torch_tensorrt.compile(torch_script_module, truncate_long_and_double=True,\r\n                                            inputs=[torch_tensorrt.Input((1, 3, 8, 290, 290), dtype=torch.float32)],\r\n                                            enabled_precisions=torch.float16, \r\n                                            workspace_size=1 << 34,\r\n                                            require_full_compilation=True,\r\n\r\n                                            )\r\ntorch.jit.save(trt_model_fp32, \"NewTRTModel.ts\")\r\nmodel = torch.jit.load(\"NewTRTModel.ts\")\r\n```\r\n\r\n### Not Working\r\n#### Compiling TRT Model On C++ Windows and then Loading on Python:\r\n```\r\n\r\n    const torch::Device device = torch::Device(torch::kCUDA, 0);\r\n    torch::jit::script::Module model;\r\n\r\n    std::cout << \"Trying to load the model\" << std::endl;\r\n    try {\r\n        model = torch::jit::load(model_path, device);\r\n        model.to(device);\r\n        model.eval();\r\n    }\r\n    catch (const c10::Error& e) {\r\n        std::cerr << e.what() << std::endl;\r\n    }\r\n    auto inp = std::vector<int64_t>{ 1, 3, 8, 290, 290 };\r\n    auto input = torch_tensorrt::Input(inp);\r\n    auto compile_settings = torch_tensorrt::ts::CompileSpec({ input });\r\n    compile_settings.enabled_precisions = { torch::kFloat16 };\r\n  \r\n    // Compile module\r\n    std::cout << \"Compiling...\" << std::endl;\r\n    auto trt_mod = torch_tensorrt::ts::compile(model, compile_settings);\r\n    // Save module for later\r\n    trt_mod.save(\"/NewTRTModel.ts\");\r\n\r\n#### Loading On Python: \r\nmodel = torch.load(\"NewTRTModel.ts\")\r\nmodel = torch.jit.load(\"NewTRTModel.ts\")\r\n```\r\n\r\n## Error\r\n\r\n```\r\nRuntimeError                              Traceback (most recent call last)\r\nInput In [3], in <cell line: 1>()\r\n----> 1 model = torch.load(\"NewTRTModel.ts\")\r\n\r\nFile ~\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\torch\\serialization.py:711, in load(f, map_location, pickle_module, **pickle_load_args)\r\n    707             warnings.warn(\"'torch.load' received a zip file that looks like a TorchScript archive\"\r\n    708                           \" dispatching to 'torch.jit.load' (call 'torch.jit.load' directly to\"\r\n    709                           \" silence this warning)\", UserWarning)\r\n    710             opened_file.seek(orig_position)\r\n--> 711             return torch.jit.load(opened_file)\r\n    712         return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)\r\n    713 return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)\r\n\r\nFile ~\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\torch\\jit\\_serialization.py:164, in load(f, map_location, _extra_files)\r\n    162     cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files)\r\n    163 else:\r\n--> 164     cpp_module = torch._C.import_ir_module_from_buffer(\r\n    165         cu, f.read(), map_location, _extra_files\r\n    166     )\r\n    168 # TODO: Pretty sure this approach loses ConstSequential status and such\r\n    169 return wrap_cpp_module(cpp_module)\r\n\r\nRuntimeError: \r\nUnknown type name '__torch__.torch.classes.tensorrt.Engine':\r\n  File \"code/__torch__/movinets/models.py\", line 4\r\n  __parameters__ = []\r\n  __buffers__ = []\r\n  __torch___movinets_models_MoViNet_trt_engine_ : __torch__.torch.classes.tensorrt.Engine\r\n                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n  def forward(self_1: __torch__.movinets.models.MoViNet_trt,\r\n    input_0: Tensor) -> Tensor:\r\n\r\n```\r\n\r\n## Environment\r\n\r\nWindows 11\r\n\r\nCPU : i9-11980HK  x86-64\r\n\r\nGPU : RTX 3080 Mobile\r\n\r\nCuda : 11.5.2\r\n\r\nCudnn : 8.3.1\r\n\r\nLibtorch : 1.11\r\n\r\nTensor_RT : 8.4.1.5\r\n\r\nVisual Studio 2019\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1212",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "channel: windows"
    ],
    "created_at": "2022-07-28T06:31:49Z",
    "updated_at": "2022-11-02T18:44:43Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/optimum",
    "number": 320,
    "title": "Feature request: allow user to provide tokenizer when loading transformer model",
    "body": "### Feature request\n\n\r\nWhen I try to load a locally saved transformers model with `ORTModelForSequenceClassification.from_pretrained(<path>, from_transformers=True)` an error occurs (\"unable to generate dummy inputs for model\") unless I also save the tokenizer in the checkpoint. A reproducible example of this is below. \r\n\r\nA way to pass a tokenizer object to `from_pretrained()` would be helpful to avoid this problem.\r\n\r\n```python\r\norig_model=\"prajjwal1/bert-tiny\" \r\nsaved_model_path='saved_model'\r\n\r\nfrom optimum.onnxruntime import ORTModelForSequenceClassification\r\nfrom transformers import AutoTokenizer, AutoModelForSequenceClassification\r\n\r\n# Load a model from the hub and save it locally\r\nmodel = AutoModelForSequenceClassification.from_pretrained(orig_model)\r\nmodel.save_pretrained(saved_model_path)\r\n\r\ntokenizer=AutoTokenizer.from_pretrained(orig_model)\r\n\r\n# attempt to load the locally saved model and convert to Onnx\r\nloaded_model=ORTModelForSequenceClassification.from_pretrained(\r\n    saved_model_path,\r\n    from_transformers=True\r\n    )\r\n```\r\n\r\nProduces error:\r\n\r\n```sh\r\nTraceback (most recent call last):\r\n  File \"optimum_loading_reprex.py\", line 21, in <module>\r\n    loaded_model=ORTModelForSequenceClassification.from_pretrained(\r\n  File \"/home/cambonator/anaconda3/envs/onnx/lib/python3.8/site-packages/optimum/modeling_base.py\", line 201, in from_pretrained\r\n    return cls._from_transformers(\r\n  File \"/home/cambonator/anaconda3/envs/onnx/lib/python3.8/site-packages/optimum/onnxruntime/modeling_ort.py\", line 275, in _from_transformers\r\n    export(\r\n  File \"/home/cambonator/anaconda3/envs/onnx/lib/python3.8/site-packages/transformers/onnx/convert.py\", line 335, in export\r\n    return export_pytorch(preprocessor, model, config, opset, output, tokenizer=tokenizer, device=device)\r\n  File \"/home/cambonator/anaconda3/envs/onnx/lib/python3.8/site-packages/transformers/onnx/convert.py\", line 142, in export_pytorch\r\n    model_inputs = config.generate_dummy_inputs(preprocessor, framework=TensorType.PYTORCH)\r\n  File \"/home/cambonator/anaconda3/envs/onnx/lib/python3.8/site-packages/transformers/onnx/config.py\", line 334, in generate_dummy_inputs\r\n    raise ValueError(\r\nValueError: Unable to generate dummy inputs for the model. Please provide a tokenizer or a preprocessor.\r\n```\r\n\r\nPackage versions\r\n- transformers: 4.20.1\r\n- optimum: 1.3.0\r\n- onnxruntime: 1.11.1\r\n- torch: 1.11.0\n\n### Motivation\n\nSaving the tokenizer to the model checkpoint is a step that could be eliminated if there were a way to provide a tokenizer to `ORTModelForSequenceClassification.from_pretrained()`\n\n### Your contribution\n\nI'm not currently sure where to start on implementing this feature, but would be happy to help with some guidance. ",
    "url": "https://github.com/huggingface/optimum/issues/320",
    "state": "closed",
    "labels": [
      "Stale"
    ],
    "created_at": "2022-07-27T20:01:32Z",
    "updated_at": "2025-07-27T02:17:59Z",
    "comments": 3,
    "user": "jessecambon"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1209,
    "title": "\u2753 [Question] How do you install an older TensorRT package?",
    "body": "## \u2753 Question\r\n\r\nHow do you install an older TensorRT package? I'm using Pytorch 1.8 and TensorRT version 0.3.0 matches that Pytorch version.\r\n\r\n\r\n## What you have already tried\r\n\r\nI tried:\r\n\r\n```\r\npip3 install torch-tensorrt==v0.3.0 -f https://github.com/pytorch/TensorRT/releases\r\nLooking in links: https://github.com/pytorch/TensorRT/releases\r\nERROR: Could not find a version that satisfies the requirement torch-tensorrt==v0.3.0 (from versions: 0.0.0, 0.0.0.post1, 1.0.0, 1.1.0)\r\nERROR: No matching distribution found for torch-tensorrt==v0.3.0\r\n```\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture:\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1209",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-07-27T16:40:14Z",
    "updated_at": "2022-08-01T15:54:24Z",
    "user": "JinLi711"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 82304,
    "title": "How to use SwiftShader to test vulkan mobile models ?",
    "body": "### \ud83d\udcda The doc issue\n\nIn this tutorial [here](https://pytorch.org/tutorials/prototype/vulkan_workflow.html),\r\n\r\nIt's pointed out at the end that it will be possible to use SwiftShader to test pytorch_mobile models on Vulkan backend without needing to go to mobile.\r\n\r\nHow?\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/82304",
    "state": "closed",
    "labels": [
      "oncall: mobile"
    ],
    "created_at": "2022-07-27T10:18:59Z",
    "updated_at": "2022-07-28T22:40:59Z",
    "user": "MohamedAliRashad"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1207,
    "title": "\u2753 [Question] cmake do not find torchtrt?",
    "body": "## \u2753 Question\r\n\r\nHi, im trying to compile from source and test with c++.\r\n\r\nI built using locally installed cuda 10.2 , tensort 8.2 and libtorch cxx11 abi, compile using `bazel build //:libtorchtrt -c opt` \r\nIt looks like the installation was successful.\r\n```\r\nINFO: Analyzed target //:libtorchtrt (0 packages loaded, 0 targets configured).\r\nINFO: Found 1 target...\r\nTarget //:libtorchtrt up-to-date:\r\n  bazel-bin/libtorchtrt.tar.gz\r\nINFO: Elapsed time: 248.908s, Critical Path: 35.38s\r\nINFO: 217 processes: 2 internal, 215 linux-sandbox.\r\nINFO: Build completed successfully, 217 total actions\r\n\r\n```\r\n\r\nBut when i test with c++, the cmake can not find torchtrt, seems like the installation was not correctly\uff1f\uff1f\uff1f\r\nIs there anyone who can tell me what do i miss???   thank u.\r\n\r\nthis is my cmakelist file, it works without  `find_package(torchtrt REQUIRED)`\r\n\r\n```\r\nproject(example)\r\ncmake_minimum_required(VERSION 3.0)\r\n\r\nset(CMAKE_CXX_STANDARD 14)\r\n\r\nset(Torch_DIR /home/xs/libtorch/share/cmake/Torch)  \r\nfind_package(Torch REQUIRED)\r\nfind_package(torchtrt REQUIRED)\r\n\r\nset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}\")\r\n\r\nadd_executable(example main.cpp)\r\ntarget_link_libraries(example \"${TORCH_LIBRARIES}\")\r\n```\r\nErrors:\r\n```\r\nCMake Error at CMakeLists.txt:10 (find_package):\r\n  By not providing \"Findtorchtrt.cmake\" in CMAKE_MODULE_PATH this project has\r\n  asked CMake to find a package configuration file provided by \"torchtrt\",\r\n  but CMake did not find one.\r\n\r\n  Could not find a package configuration file provided by \"torchtrt\" with any\r\n  of the following names:\r\n\r\n    torchtrtConfig.cmake\r\n    torchtrt-config.cmake\r\n\r\n  Add the installation prefix of \"torchtrt\" to CMAKE_PREFIX_PATH or set\r\n  \"torchtrt_DIR\" to a directory containing one of the above files.  If\r\n  \"torchtrt\" provides a separate development package or SDK, be sure it has\r\n  been installed.\r\n```\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):  1.11.0\r\n - CPU Architecture: x86-64\r\n - OS (e.g., Linux): Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip whl file from PyTorch.org\r\n - Build command you used (if compiling from source):  compiling from source\r\n - Are you using local sources or building from archives: local sources\r\n - Python version: 3.7.0\r\n - CUDA version: 10.2\r\n - GPU models and configuration: gtx 1050ti\r\n - Any other relevant information:\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1207",
    "state": "closed",
    "labels": [
      "question",
      "component: build system"
    ],
    "created_at": "2022-07-27T09:14:51Z",
    "updated_at": "2023-09-14T17:40:25Z",
    "user": "xsxsmm"
  },
  {
    "repo": "pytorch/torchx",
    "number": 569,
    "title": "[Ray] Elastic Launch on Ray Cluster",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\nSupport elastic training on Ray Cluster.\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\nTraining can tolerate node failures.\r\nThe number of worker nodes can expand as the size of the cluster grows.\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\nBased on current implementation, there will be two major steps for this feature:\r\n- [ ] #559 Support expanding the placement groups for command actors on the fly \r\n- [ ] Support fault tolerance which depends on the implementation of ray.\r\nRay Placement Group supports fault tolerance, and its logic is when a node dead, GCS will reschedule the placement groups on that node to other nodes.  And it introduces a problem: how do we know when a node is dead and which placement groups are being created, since we must restart the command actor on those placement groups who have been rescheduled, the reason is that those placement groups will never be removed until the training ends, and it reserves resources cannot be used by others. Currently there are two possible ways to achieve this:\r\n    1. Disable the fault tolerance feature of Ray Placement Group, then we need find a way to monitor the living placement groups.\r\n    2. Let the Ray GCS notifies the main process when some placement groups are being rescheduled, and we will be able to restart the command actors on those placement groups once they have been rescheduled.\r\n\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n[Ray Placement Group](https://docs.ray.io/en/latest/ray-core/placement-group.html#fault-tolerance)\r\n[Support expanding the placement groups for command actors on the fly](https://github.com/pytorch/torchx/pull/559)\r\n[Enable Notification on Node failure](https://github.com/ray-project/ray/issues/27076)\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/569",
    "state": "open",
    "labels": [
      "enhancement",
      "ray"
    ],
    "created_at": "2022-07-27T04:32:41Z",
    "updated_at": "2022-11-05T18:22:51Z",
    "comments": 0,
    "user": "ntlm1686"
  },
  {
    "repo": "pytorch/data",
    "number": 693,
    "title": "Changing decoding method in StreamReader ",
    "body": "### \ud83d\udc1b Describe the bug\n\nHi,\r\n\r\nWhen decoding from a file stream in `StreamReader`, torchdata automatically assumes the incoming bytes are UTF-8. However, in the case of alternate encoding's this will error (in my case `UnicodeDecodeError: 'utf-8' codec can't decode byte 0xec in position 3: invalid continuation byte`). How do we change the decoding method to fit the particular data stream?\n\n### Versions\n\n```\r\nVersions of relevant libraries:\r\n[pip3] mypy-extensions==0.4.3\r\n[pip3] numpy==1.23.0\r\n[pip3] pytorch-lightning==1.6.4\r\n[pip3] torch==1.11.0\r\n[pip3] torchdata==0.3.0\r\n[pip3] torchmetrics==0.9.1\r\n[pip3] torchvision==0.12.0\r\n[conda] numpy                     1.23.0                   pypi_0    pypi\r\n[conda] pytorch-lightning         1.6.4                    pypi_0    pypi\r\n[conda] torch                     1.11.0                   pypi_0    pypi\r\n[conda] torchdata                 0.3.0                    pypi_0    pypi\r\n[conda] torchmetrics              0.9.1                    pypi_0    pypi\r\n[conda] torchvision               0.12.0                   pypi_0    pypi\r\n```",
    "url": "https://github.com/meta-pytorch/data/issues/693",
    "state": "open",
    "labels": [],
    "created_at": "2022-07-27T00:33:29Z",
    "updated_at": "2022-07-27T13:18:15Z",
    "comments": 2,
    "user": "is-jlehrer"
  },
  {
    "repo": "pytorch/data",
    "number": 690,
    "title": "Unable to vectorize datapipe operations",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nLet `t` be an input dataset that associates strings (model input) to integers (model output):\r\n\r\n```python\r\nt = [(\"a\", 567), (\"b\", 908), (\"c\", 887)]\r\n```\r\n\r\nI now wrap `t` in a `SequenceWrapper`, to use it as part of a DataPipe:\r\n\r\n```python\r\nimport torchdata.datapipes as dp\r\n\r\npipeline = dp.map.SequenceWrapper(t, deepcopy=False)\r\n```\r\n\r\nNow, I have a datapipe giving me tuples:\r\n\r\n```python\r\n>>> pipeline[0]\r\n('a', 567)\r\n```\r\n\r\nAfter that, I am willing to do some preprocessing. However, since I have a huge dataset I want to vectorize the following operations: for that, I use `.batch`:\r\n\r\n```python\r\nbatched_pipeline = pipeline.batch(batch_size=2)\r\n```\r\n\r\nBy vectorizing, I mean grouping the X values (the strings) and the Y values (integers) together so that I can apply a custom logic to the input and the output at the same time, and in batch.\r\nHowever, the `.batch()` function returns the following:\r\n\r\n```python\r\n>>> batched_pipeline[0]\r\n[('a', 567), ('b', 908)]\r\n```\r\n\r\nWhich really makes no sense because why would I want the whole line batched? Just so that I can iterate over it right after?\r\nIn my opinion, `.batch()` only makes sense if the different **slices** (see TensorFlow's `Dataset.from_tensor_slices()` which does handle that) are batched separately.\r\n\r\nSo what do you think? Is there something I am missing?\r\n\r\nThanks in advance!\r\n\r\n<details>\r\n<summary>Versions</summary>\r\n\r\nPyTorch version: 1.12.0+cu116\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.6\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Red Hat Enterprise Linux release 8.5 (Ootpa) (x86_64)\r\nGCC version: (GCC) 8.5.0 20210514 (Red Hat 8.5.0-3)\r\nClang version: 12.0.1 (Red Hat 12.0.1-2.module+el8.5.0+12651+6a7729ff)\r\nCMake version: version 3.20.2\r\nLibc version: glibc-2.28\r\n\r\nPython version: 3.10.4 (main, Mar 31 2022, 08:41:55) [GCC 7.5.0] (64-bit runtime)\r\nPython platform: Linux-4.18.0-348.el8.x86_64-x86_64-with-glibc2.28\r\nIs CUDA available: True\r\nCUDA runtime version: Could not collect\r\nGPU models and configuration:\r\nGPU 0: NVIDIA A100-SXM4-80GB\r\nGPU 1: NVIDIA A100-SXM4-80GB\r\nGPU 2: NVIDIA A100-SXM4-80GB\r\nGPU 3: NVIDIA A100-SXM4-80GB\r\nGPU 4: NVIDIA A100-SXM4-80GB\r\nGPU 5: NVIDIA A100-SXM4-80GB\r\nGPU 6: NVIDIA A100-SXM4-80GB\r\nGPU 7: NVIDIA A100-SXM4-80GB\r\n\r\nNvidia driver version: 515.48.07\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] light-the-torch==0.4.0\r\n[pip3] mypy-extensions==0.4.3\r\n[pip3] numpy==1.23.0\r\n[pip3] torch==1.12.0+cu116\r\n[pip3] torchaudio==0.12.0\r\n[pip3] torchdata==0.4.0\r\n[pip3] torchmetrics==0.9.2\r\n[pip3] torchtext==0.13.0\r\n[pip3] torchvision==0.13.0\r\n[conda] light-the-torch           0.4.0                    pypi_0    pypi\r\n[conda] numpy                     1.23.0                   pypi_0    pypi\r\n[conda] torch                     1.12.0+cu116             pypi_0    pypi\r\n[conda] torchaudio                0.12.0                   pypi_0    pypi\r\n[conda] torchdata                 0.4.0                    pypi_0    pypi\r\n[conda] torchmetrics              0.9.2                    pypi_0    pypi\r\n[conda] torchtext                 0.13.0                   pypi_0    pypi\r\n[conda] torchvision               0.13.0                   pypi_0    pypi\r\n\r\n</details>",
    "url": "https://github.com/meta-pytorch/data/issues/690",
    "state": "open",
    "labels": [],
    "created_at": "2022-07-26T13:30:39Z",
    "updated_at": "2022-07-26T15:50:26Z",
    "comments": 2,
    "user": "BlueskyFR"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4744,
    "title": "Remove instructions to generate dummy data from our docs",
    "body": "In our docs, we indicate to generate the dummy data: https://huggingface.co/docs/datasets/dataset_script#testing-data-and-checksum-metadata\r\n\r\nHowever:\r\n- dummy data makes sense only for datasets in our GitHub repo: so that we can test their loading with our CI\r\n- for datasets on the Hub:\r\n  - they do not pass any CI test requiring dummy data\r\n  - there are no instructions on how they can test their dataset locally using the dummy data\r\n  - the generation of the dummy data assumes our GitHub directory structure:\r\n    - the dummy data will be generated under `./datasets/<dataset_name>/dummy` even if locally there is no `./datasets` directory (which is the usual case). See issue:\r\n      - #4742 \r\n\r\nCC: @stevhliu ",
    "url": "https://github.com/huggingface/datasets/issues/4744",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-07-26T07:32:58Z",
    "updated_at": "2022-08-02T23:50:30Z",
    "comments": 2,
    "user": "albertvillanova"
  },
  {
    "repo": "pytorch/xla",
    "number": 3760,
    "title": "How to load a gpu trained model on TPU for evaluation",
    "body": "## \u2753 Questions and Help\r\nHello,\r\nI am loading a GPU trained model on map_location=cpu and then doing \"model.to(device)\" where device is xm.xla_device(n=device_num,devkind=\"TPU\") but on testing the cpu processing time and the tpu processing time is the same. Please let me know what I can do about it.\r\n\r\nThank you",
    "url": "https://github.com/pytorch/xla/issues/3760",
    "state": "open",
    "labels": [],
    "created_at": "2022-07-26T01:25:45Z",
    "updated_at": "2022-07-26T02:22:58Z",
    "user": "Preethse"
  },
  {
    "repo": "pytorch/data",
    "number": 689,
    "title": "Distributed training tutorial with DataLoader2",
    "body": "### \ud83d\udcda The doc issue\n\nI am not sure how to implement distributed training.\n\n### Suggest a potential alternative/fix\n\nIf there was a simple example that showed how to use DDP with the torchdata library it would be super helpful.",
    "url": "https://github.com/meta-pytorch/data/issues/689",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-07-25T22:44:56Z",
    "updated_at": "2023-02-01T17:59:08Z",
    "comments": 9,
    "user": "MatthewCaseres"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4742,
    "title": "Dummy data nowhere to be found",
    "body": "## Describe the bug\r\nTo finalize my dataset, I wanted to create dummy data as per the guide and I ran \r\n\r\n```shell\r\n datasets-cli dummy_data datasets/hebban-reviews --auto_generate\r\n```\r\n\r\nwhere hebban-reviews is [this repo](https://huggingface.co/datasets/BramVanroy/hebban-reviews). And even though the scripts runs and shows a message at the end that it succeeded, I cannot find the dummy data anywhere. Where is it?\r\n\r\n## Expected results\r\n\r\nTo see the dummy data in the datasets' folder or in the folder where I ran the command.\r\n\r\n## Actual results\r\n\r\nI see the following message but I cannot find the dummy data anywhere.\r\n\r\n```\r\nDummy data generation done and dummy data test succeeded for config 'filtered''.\r\nAutomatic dummy data generation succeeded for all configs of '.\\datasets\\hebban-reviews\\'\r\n```\r\n\r\n## Environment info\r\n- `datasets` version: 2.4.1.dev0\r\n- Platform: Windows-10-10.0.19041-SP0\r\n- Python version: 3.8.8\r\n- PyArrow version: 8.0.0\r\n- Pandas version: 1.4.3\r\n\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4742",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-07-25T19:18:42Z",
    "updated_at": "2022-11-04T14:04:24Z",
    "comments": 3,
    "user": "BramVanroy"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 466,
    "title": "Take decisions before launching in public",
    "body": "## Version\r\n\r\nShould we integrate a version in the path or domain, to help with future breaking changes?\r\n\r\nThree options:\r\n1. domain based: https://v1.datasets-server.huggingface.co\r\n2. path based: https://datasets-server.huggingface.co/v1/\r\n3. no version (current): https://datasets-server.huggingface.co\r\n\r\nI think 3 is OK. Not having a version means we have to try to make everything backward-compatible, which is not a bad idea. If it's really needed, we can switch to 1 or 2 afterward. Also: having a version means that if we do breaking changes, we should maintain at least two versions in parallel...\r\n\r\n## Envelop\r\n\r\nA common pattern is to always return a JSON object with `data` or `error`. This way, we know that we can always consume the API with:\r\n\r\n```js\r\nconst {data, error} = fetch(...)\r\n```\r\n\r\nand test for the existence of data, or error. Otherwise, every endpoint might have different behavior. Also: it's useful to have the envelop when looking at the response without knowing the HTTP status code (eg: in our cache)\r\n\r\nOptions:\r\n1. no envelop (current): the client must rely on the HTTP status code to get the type of response (error or OK)\r\n2. envelop: we need to migrate all the endpoints, to add an intermediate \"data\" or \"error\" field.\r\n\r\n## HTTP status codes\r\n\r\nWe currently only use 200, 400, and 500 for simplicity. We might want to return alternative status codes such as 404 (not found), or 401/403 (when we will protect some endpoints).\r\n\r\nOptions:\r\n1. only use 200, 400, 500 (current)\r\n2. add more status codes, like 404, 401, 403\r\n\r\nI think it's OK to stay with 300, 400, and 500, and let the client use the details of the response to figure out what failed.\r\n\r\n## Error codes\r\n\r\nCurrently, the errors have a \"message\" field, and optionally three more fields: \"cause_exception\", \"cause_message\" and \"cause_traceback\". We could add a \"code\" field, such as \"NOT_STREAMABLE\", to make it more reliable for the client to implement logic based on the type of error (indeed: the message is a long string that might be updated later. A short code should be more reliable). Also: having an error code could counterbalance the lack of detailed HTTP status codes (see the previous point).\r\n\r\nInternally, having codes could help indirect the messages to a dictionary, and it would help to catalog all the possible types of errors in the same place.\r\n\r\nOptions:\r\n1. no \"code\" field (current)\r\n2. add a \"code\" field, such as \"NOT_STREAMABLE\"\r\n\r\nI'm in favor of adding such a short code.\r\n\r\n## Case\r\n\r\nThe endpoints with several words are currently using \"spinal-case\", eg \"/first-rows\". An alternative is to use \"snake_case\", eg \"/first_rows\". Nothing important here.\r\n\r\nOptions:\r\n1. \"/spinal-case\" (current)\r\n2. \"/snake_case\"\r\n\r\nI think it's not important, we can keep with spinal-case, and it's coherent with Hub API: https://huggingface.co/docs/hub/api\r\n\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/466",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-07-25T18:04:59Z",
    "updated_at": "2022-07-26T14:39:46Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1203,
    "title": "\u2753 [Question] How do you install torch-tensorrt (Import error. no libvinfer_plugin.so.8 file error)? ",
    "body": "## \u2753 Question\r\n\r\n<!-- ImportError: libnvinfer_plugin.so.8: cannot open shared object file: No such file or directory  -->\r\n\r\n###  ImportError: libnvinfer_plugin.so.8: cannot open shared object file: No such file or directory\r\n\r\ncuda and cudnn is installed well.\r\nI installed pytorch and nvidia-tensorrt well in conda environment  \r\nand then install torch-tensorrt via pip\r\n\r\n```\r\npip3 install torch-tensorrt -f https://github.com/pytorch/TensorRT/releases\r\n```\r\nbut when I import torch-tensorrt, it gives importError \r\nImportError: libnvinfer_plugin.so.8: cannot open shared object file: No such file or directory\r\n```\r\n>>> import torch_tensorrt\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/home/user_name/miniconda3/envs/pytorch/lib/python3.9/site-packages/torch_tensorrt/__init__.py\", line 11, in <module>\r\n    from torch_tensorrt._compile import *\r\n  File \"/home/user_name/miniconda3/envs/pytorch/lib/python3.9/site-packages/torch_tensorrt/_compile.py\", line 2, in <module>\r\n    from torch_tensorrt import _enums\r\n  File \"/home/user_name/miniconda3/envs/pytorch/lib/python3.9/site-packages/torch_tensorrt/_enums.py\", line 1, in <module>\r\n    from torch_tensorrt._C import dtype, DeviceType, EngineCapability, TensorFormat\r\nImportError: libnvinfer_plugin.so.8: cannot open shared object file: No such file or directory\r\n```\r\n\r\n\r\n## What you have already tried\r\n\r\n```\r\n>>> import torch\r\n>>> torch.cuda.is_available()\r\nTrue\r\n>>> torch.cuda.device_count()\r\n8\r\n>>> torch.cuda.current_device()\r\n0\r\n>>> torch.cuda.get_device_name(0)\r\n'NVIDIA RTX A5000'\r\n>>> torch.__version__\r\n'1.12.0'\r\n>>> import tensorrt\r\n```\r\n\r\n\r\n\r\n<!-- checked cuda, cudnn, pytorch versions are right. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.12\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): conda\r\n - Build command you used (if compiling from source):\r\n\r\n\r\n - Are you using local sources or building from archives: \r\n - Python version: 3.9.7\r\n - CUDA version: 11.4\r\n - GPU models and configuration: NVIDIA RTX A5000\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1203",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-07-25T03:03:35Z",
    "updated_at": "2024-04-30T02:16:10Z",
    "user": "YOONAHLEE"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1202,
    "title": "\u2753 [Question] interpolate isn't suported?",
    "body": "## \u2753 Question\r\n\r\ndoes anyone succeed compile [torch.nn.functional.interpolate](https://pytorch.org/docs/stable/generated/torch.nn.functional.interpolate.html) with torch_tensort>1.x.x?\r\n\r\nin the release note, it is written that nearest and bilinear interpolation are supported\r\n\r\nif you can compile it, please share with me the example code. thank you!",
    "url": "https://github.com/pytorch/TensorRT/issues/1202",
    "state": "closed",
    "labels": [
      "question",
      "component: converters"
    ],
    "created_at": "2022-07-24T21:35:34Z",
    "updated_at": "2022-07-27T23:46:37Z",
    "user": "yokosyun"
  },
  {
    "repo": "pytorch/functorch",
    "number": 982,
    "title": "GPU Memeory",
    "body": "```\r\nfunc_model, params = make_functional(model)\r\n\r\nfor param in params:\r\n     param.requires_grad_(False)\r\n\r\ndef compute_loss(params, data, targets):\r\n        data = data.unsqueeze(dim=0)\r\n        preds = func_model(params, data)\r\n        loss = loss_fn(preds, targets)\r\n        return loss\r\n\r\nper_sample_info = vmap(grad_and_value(compute_loss, has_aux=False), (None, 0, 0),randomness='different')(params, images, labels)\r\nper_sample_grads = per_sample_info[0]\r\nper_sample_losses = per_sample_info[1].detach_()\r\n            \r\ngrads = torch.cat([g.detach().view(b,-1) for g in per_sample_grads], dim=1)\r\n```\r\nIt seems that when I get grads, the usage of gpu memory nearly doubles which is not what I want. Looking forward to some advice.\r\n\r\n",
    "url": "https://github.com/pytorch/functorch/issues/982",
    "state": "closed",
    "labels": [],
    "created_at": "2022-07-24T04:45:50Z",
    "updated_at": "2022-07-24T10:37:22Z",
    "comments": 0,
    "user": "kwwcv"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 82041,
    "title": "[Misleading] The doc started using Tensorflow terminology in the document to explain how to use the Pytorch code.",
    "body": "### \ud83d\udcda The doc issue\n\n![image](https://user-images.githubusercontent.com/21982975/180585585-6077a456-c2d9-4e15-a1f6-014b93feb13b.png)\r\n the model must be executed in inference mode and operate on input tensors that do not collect gradient tape information (e.g., running with torch.no_grad).\n\n### Suggest a potential alternative/fix\n\n the model must be executed in inference mode and operate on input tensors that do not collect gradient tape information (e.g., running with torch.no_grad).\r\nChange it to be:\r\nthe model must be executed in inference mode and operate on input tensors that does not accumulate gradient. (e.g, setting the model with torch.no_grad).\n\ncc @svekars @holly1238",
    "url": "https://github.com/pytorch/pytorch/issues/82041",
    "state": "open",
    "labels": [
      "module: docs",
      "triaged"
    ],
    "created_at": "2022-07-23T01:43:39Z",
    "updated_at": "2022-07-24T16:35:11Z",
    "user": "AliceSum"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 458,
    "title": "Move /webhook to admin instead of api?",
    "body": "As we've done with the technical endpoints in https://github.com/huggingface/datasets-server/pull/457?\r\n\r\nIt might help to protect the endpoint (#95), even if it's not really dangerous to let people add jobs to refresh datasets IMHO for now.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/458",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-07-22T20:21:39Z",
    "updated_at": "2022-09-16T17:24:05Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 455,
    "title": "what to do with /is-valid?",
    "body": "Currently, the endpoint /is-valid is not documented in https://redocly.github.io/redoc/?url=https://datasets-server.huggingface.co/openapi.json (but it is in https://github.com/huggingface/datasets-server/blob/main/services/api/README.md).\r\n\r\nIt's not used in the dataset viewer in moonlanding, but https://github.com/huggingface/model-evaluator uses it (cc @lewtun).\r\n\r\nI have the impression that we could change this endpoint to something more precise, since \"valid\" is a bit loose, and will be less and less precise when other services will be added to the dataset server (statistics, random access, parquet file, etc). Instead, maybe we could create a new endpoint with more details about what services are working for the dataset. Or do we consider a dataset valid if all the services are available?\r\n\r\nWhat should we do?\r\n- [ ] keep it this way\r\n- [ ] create a new endpoint with details of the available services\r\n\r\nalso cc @lhoestq ",
    "url": "https://github.com/huggingface/dataset-viewer/issues/455",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-07-22T19:29:08Z",
    "updated_at": "2022-08-02T14:16:24Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/torchx",
    "number": 567,
    "title": "[exploratory] TorchX Dashboard",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\nAdd a new `torchx dashboard` command that will launch a local HTTP server that allows users to view all of their jobs with statuses, logs and integration with any ML specific extras such as artifacts, Tensorboard, etc.\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\n\r\nCurrently the interface for TorchX is only via programmatic or via the CLI. It would also be nice to have a UI dashboard that could be used to monitor all of your job as well as support deeper integrations such as experiment tracking and metrics.\r\n\r\nRight now if users want to use a UI they have to use their platform specific one (i.e aws batch/ray dashboard) and many don't have one (slurm/volcano).\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\nThis would be a fairly simple interface built on top of something such as Flask (https://flask.palletsprojects.com/en/2.1.x/quickstart/). \r\n\r\nPages:\r\n\r\n* `/` the main page with a list of all of the users jobs and filters\r\n* `/<scheduler>/<jobid>` an overview of the job, the job def and the status with a tab for logs, artifacts and any other URLs that are logged\r\n* `/<scheduler>/<jobid>/logs` - view the logs\r\n* `/<scheduler>/<jobid>/external/<metadata key>` - iframes based off of external services such as tensorboard etc \r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\nProviding a way to view URLs for external services via the terminal.\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n\r\n* https://docs.ray.io/en/latest/ray-core/ray-dashboard.html#logical-view",
    "url": "https://github.com/meta-pytorch/torchx/issues/567",
    "state": "open",
    "labels": [
      "enhancement",
      "RFC",
      "cli"
    ],
    "created_at": "2022-07-22T19:28:51Z",
    "updated_at": "2022-08-02T21:23:14Z",
    "comments": 1,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/torchx",
    "number": 566,
    "title": "add a TORCHX_JOB_ID environment variable to all jobs launched via runner",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\nAs part of the future experiment tracking we want to be able to have the application know it's own identity. When we launch a job we return the full job id (i.e.  `kubernetes://session/app_id`) but the app itself doesn't have this exact same job ID. We do provide an `app_id` macro that can be used in the app def for both env and arguments but it's up to the app owner to manually add that.\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\n\r\nIf we add a `TORCHX_JOB_ID` environment variable it allows us to write more standardized integrations for experiment tracking that use the job ID as a key. There's no added cost from an extra environment variable and will enable deeper automatic integrations into other libraries.\r\n\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\nAdd a new environment variable to Runner.dryrun\r\n\r\nhttps://github.com/pytorch/torchx/blob/main/torchx/runner/api.py#L241\r\n\r\nthat uses the macros.app_id to add the full job ID using the scheduler and session information form the runner.\r\n\r\nhttps://github.com/pytorch/torchx/blob/main/torchx/specs/api.py#L156\r\n\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/566",
    "state": "open",
    "labels": [
      "enhancement",
      "module: runner",
      "tracking"
    ],
    "created_at": "2022-07-22T18:22:24Z",
    "updated_at": "2022-07-22T21:28:02Z",
    "comments": 0,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/functorch",
    "number": 979,
    "title": "ImportError: ~/.local/lib/python3.9/site-packages/functorch/_C.so: undefined symbol: _ZNK3c1010TensorImpl16sym_sizes_customEv",
    "body": "Hi All,\r\n\r\nI was running an older version of PyTorch ( - built from source) with FuncTorch ( - built from source), and somehow I've broken the older version of functorch. When I import functorch I get the following error,\r\n```\r\nimport functorch\r\n#returns ImportError: ~/.local/lib/python3.9/site-packages/functorch/_C.so: undefined symbol: _ZNK3c1010TensorImpl16sym_sizes_customEv\r\n```\r\n\r\nThe version I had of `functorch` was `0.2.0a0+9d6ee76`, is there a way to perhaps re-install to fix this ImportError? I do have the latest version of PyTorch/FuncTorch in a separate conda environment but I wanted to check how it compares to the older version in this 'older' conda environment PyTorch/Functorch were versions ,1.12.0a0+git7c2103a and 0.2.0a0+9d6ee76 respectively.\r\n\r\nIs there a way to download a specific version of `functorch` with `https://github.com/pytorch/functorch.git` ? Or another way to fix this issue?",
    "url": "https://github.com/pytorch/functorch/issues/979",
    "state": "closed",
    "labels": [],
    "created_at": "2022-07-22T14:51:13Z",
    "updated_at": "2022-07-25T19:22:04Z",
    "comments": 24,
    "user": "AlphaBetaGamma96"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4736,
    "title": "Dataset Viewer issue for deepklarity/huggingface-spaces-dataset",
    "body": "### Link\n\nhttps://huggingface.co/datasets/deepklarity/huggingface-spaces-dataset/viewer/deepklarity--huggingface-spaces-dataset/train\n\n### Description\n\nHi Team, \r\nI'm getting the following error on a uploaded dataset. I'm getting the same status for a couple of hours now. The dataset size is `<1MB` and the format is csv, so I'm not sure if it's supposed to take this much time or not. \r\n```\r\nStatus code:   400\r\nException:     Status400Error\r\nMessage:       The split is being processed. Retry later.\r\n```\r\n\r\nIs there any explicit step to be taken to get the viewer to work? \n\n### Owner\n\nYes",
    "url": "https://github.com/huggingface/datasets/issues/4736",
    "state": "closed",
    "labels": [
      "dataset-viewer"
    ],
    "created_at": "2022-07-22T12:14:18Z",
    "updated_at": "2022-07-22T13:46:38Z",
    "comments": 1,
    "user": "dk-crazydiv"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1199,
    "title": "  Cant import torch_tensorrt",
    "body": " ERROR:\r\nfrom torch.fx.passes.pass_manager import PassManager\r\n\r\n ModuleNotFoundError: No module named 'torch.fx.passes.pass_manager'\r\n\r\n\r\n\r\n - PyTorch Version : 1.11\r\n - CPU Architecture: jetson AGX xavier\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch: nvidia forum wheel\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:3.8\r\n - CUDA version: 11.4\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1199",
    "state": "closed",
    "labels": [
      "question",
      "channel: linux-jetpack",
      "component: fx"
    ],
    "created_at": "2022-07-22T08:00:34Z",
    "updated_at": "2022-09-02T18:04:29Z",
    "user": "sanath-tech"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4732,
    "title": "Document better that loading a dataset passing its name does not use the local script",
    "body": "As reported by @TrentBrick here https://github.com/huggingface/datasets/issues/4725#issuecomment-1191858596, it could be more clear that loading a dataset by passing its name does not use the (modified) local script of it.\r\n\r\nWhat he did:\r\n- he installed `datasets` from source\r\n- he modified locally `datasets/the_pile/the_pile.py` loading script\r\n- he tried to load it but using `load_dataset(\"the_pile\")` instead of `load_dataset(\"datasets/the_pile\")`\r\n  - as explained here https://github.com/huggingface/datasets/issues/4725#issuecomment-1191040245:\r\n    - the former does not use the local script, but instead it downloads a copy of `the_pile.py` from our GitHub, caches it locally (inside `~/.cache/huggingface/modules`) and uses that.\r\n\r\nHe suggests adding a more clear explanation about this. He suggests adding it maybe in [Installation > source](https://huggingface.co/docs/datasets/installation))\r\n\r\nCC: @stevhliu ",
    "url": "https://github.com/huggingface/datasets/issues/4732",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-07-22T06:07:31Z",
    "updated_at": "2022-08-23T16:32:23Z",
    "comments": 3,
    "user": "albertvillanova"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1198,
    "title": "\u2753 [Question] Where can we get VGG-16 checkpoint pretrained on CIFAR-10 ? ",
    "body": "## \u2753 Question\r\n\r\nTo get $pwd/vgg16_ckpts/ckpt_epoch110.pth, I tried to run the script named [python3 finetune_qat.py](https://github.com/pytorch/TensorRT/tree/v1.1.1/examples/int8/training/vgg16#quantization-aware-fine-tuning-for-trying-out-qat-workflows).\r\n\r\nHowever, the script needs VGG-16 pretrained model at 100-epoch as follows: \r\n```bash\r\nLoading from checkpoint $(PATH_TOTensorRT)/examples/int8/training/vgg16/vgg16_ckpts/ckpt_epoch100.pth\r\n```\r\nThen where can we download the checkpoint-epoch 100 model?\r\nI failed to download it from other internet site ",
    "url": "https://github.com/pytorch/TensorRT/issues/1198",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-07-22T05:06:34Z",
    "updated_at": "2022-07-22T05:13:32Z",
    "user": "zinuok"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1197,
    "title": "\u2753 [Question] Where can we get 'trained_vgg16_qat.jit.pt' ?",
    "body": "## \u2753 Question\r\n\r\nWhere can we get 'trained_vgg16_qat.jit.pt' ?\r\nthe link in [test_qat_trt_accuracy.py](https://github.com/pytorch/TensorRT/blob/master/tests/py/test_qat_trt_accuracy.py#L74)\r\ndoesn't work now.",
    "url": "https://github.com/pytorch/TensorRT/issues/1197",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-07-22T04:38:53Z",
    "updated_at": "2022-07-22T04:46:46Z",
    "user": "zinuok"
  },
  {
    "repo": "pytorch/serve",
    "number": 1753,
    "title": "how to return the predictions in JSON format(in JSON string and JSON header)?",
    "body": "I was using torchserve to production service, I was able to return the predictions with a JSON string, but I was unable to get the response with a JSON header. ",
    "url": "https://github.com/pytorch/serve/issues/1753",
    "state": "closed",
    "labels": [
      "triaged_wait",
      "support"
    ],
    "created_at": "2022-07-22T04:04:26Z",
    "updated_at": "2022-07-24T16:50:32Z",
    "user": "Vincentwei1021"
  },
  {
    "repo": "pytorch/functorch",
    "number": 977,
    "title": "Hessian (w.r.t inputs) calculation in PyTorch differs from FuncTorch",
    "body": "Hi All,\r\n\r\nI've been trying to calculate the Hessian of the output of my network with respect to its inputs within FuncTorch. I had a version within PyTorch that supports batches, however, they seem to disagree with each other and I have no idea why they don't give the same results. Something is clearly wrong, I know my PyTorch version is right so either there's an issue in my version of FuncTorch or I've implemented it wrong in FuncTorch. \r\n\r\nAlso, how can I use the `has_aux` flag in `jacrev` to return the jacobian from the first `jacrev` so I don't have to repeat the jacobian calculation?\r\n\r\nThe only problem with my example is that it uses `torch.linalg.slogdet` and from what I remember FuncTorch can't vmap over `.item()`. I do have my own fork of pytorch where I edited the backward to remove the `.item()` call so it works with vmap. Although, it's not the greatest implementation as I just set it to the default `nonsingular_case_backward` like so,\r\n```\r\nTensor slogdet_backward(const Tensor& grad_logabsdet,\r\n                        const Tensor& self,\r\n                        const Tensor& signdet, const Tensor& logabsdet) {\r\n  auto singular_case_backward = [&](const Tensor& grad_logabsdet, const Tensor& self) -> Tensor {\r\n    Tensor u, sigma, vh;\r\n    std::tie(u, sigma, vh) = at::linalg_svd(self, false);\r\n    Tensor v = vh.mH();\r\n    // sigma has all non-negative entries (also with at least one zero entry)\r\n    // so logabsdet = \\sum log(abs(sigma))\r\n    // but det = 0, so backward logabsdet = \\sum log(sigma)\r\n    auto gsigma = grad_logabsdet.unsqueeze(-1).div(sigma);\r\n    return svd_backward({}, gsigma, {}, u, sigma, vh);\r\n  };\r\n\r\n  auto nonsingular_case_backward = [&](const Tensor& grad_logabsdet, const Tensor& self) -> Tensor {\r\n    // TODO: replace self.inverse with linalg_inverse\r\n    return unsqueeze_multiple(grad_logabsdet, {-1, -2}, self.dim()) * self.inverse().mH();\r\n  };\r\n\r\n  auto nonsingular = nonsingular_case_backward(grad_logabsdet, self);\r\n  return nonsingular;\r\n}\r\n```\r\n\r\nMy 'minimal' reproducible script is below with the output shown below that. It computes the Laplacian via a PyTorch method and via FuncTorch for a single sample of size `[A,1]` where `A` is the number of input nodes to the network.\r\n```\r\nimport torch\r\nimport torch.nn as nn\r\nfrom torch import Tensor\r\nimport functorch\r\nfrom functorch import jacrev, jacfwd, hessian, make_functional, vmap\r\nimport time \r\n\r\n_ = torch.manual_seed(0)\r\n\r\nprint(\"PyTorch version:   \", torch.__version__)\r\nprint(\"CUDA version:      \", torch.version.cuda)\r\nprint(\"FuncTorch version: \", functorch.__version__)\r\n\r\ndef sync_time() -> float:\r\n  torch.cuda.synchronize()\r\n  return time.perf_counter()\r\n\r\nB=1 #batch\r\nA=3 #input nodes\r\n\r\ndevice=torch.device(\"cuda\")\r\n\r\nclass model(nn.Module):\r\n\r\n  def __init__(self, num_inputs, num_hidden):\r\n    super(model, self).__init__()\r\n    \r\n    self.num_inputs=num_inputs\r\n    self.func = nn.Tanh()\r\n    \r\n    self.fc1 = nn.Linear(2, num_hidden)\r\n    self.fc2 = nn.Linear(num_hidden, num_inputs)\r\n  \r\n  def forward(self, x):\r\n    \"\"\"\r\n    Takes x in [B,A,1] and maps it to sign/logabsdet value in Tuple([B,], [B,])\r\n    \"\"\"\r\n    \r\n    idx=len(x.shape)\r\n    rep=[1 for _ in range(idx)]\r\n    rep[-2] = self.num_inputs\r\n    g = x.mean(dim=(idx-2), keepdim=True).repeat(*rep)\r\n    f = torch.cat((x,g), dim=-1)\r\n\r\n    h = self.func(self.fc1(f))\r\n    \r\n    mat = self.fc2(h)\r\n    sgn, logabs = torch.linalg.slogdet(mat)\r\n    return sgn, logabs\r\n\r\nnet = model(A, 64)\r\nnet = net.to(device)\r\n\r\nfnet, params = make_functional(net)\r\n\r\ndef logabs(params, x):\r\n  _, logabs = fnet(params, x)\r\n  #print(\"functorch logabs: \",logabs)\r\n  return logabs\r\n\r\n\r\ndef kinetic_pytorch(xs: Tensor) -> Tensor:\r\n  \"\"\"Method to calculate the local kinetic energy values of a netork function, f, for samples, x.\r\n  The values calculated here are 1/f d2f/dx2 which is equivalent to d2log(|f|)/dx2 + (dlog(|f|)/dx)^2\r\n  within the log-domain (rather than the linear-domain).\r\n\r\n  :param xs: The input positions of the many-body particles\r\n  :type xs: class: `torch.Tensor`\r\n  \"\"\"\r\n  xis = [xi.requires_grad_() for xi in xs.flatten(start_dim=1).t()]\r\n  xs_flat = torch.stack(xis, dim=1)\r\n\r\n  _, ys = net(xs_flat.view_as(xs))\r\n  #print(\"pytorch logabs: \",ys)\r\n  ones = torch.ones_like(ys)\r\n\r\n  #df_dx calculation\r\n  (dy_dxs, ) = torch.autograd.grad(ys, xs_flat, ones, retain_graph=True, create_graph=True)\r\n\r\n\r\n  #d2f_dx2 calculation (diagonal only)\r\n  lay_ys = sum(torch.autograd.grad(dy_dxi, xi, ones, retain_graph=True, create_graph=False)[0] \\\r\n                for xi, dy_dxi in zip(xis, (dy_dxs[..., i] for i in range(len(xis))))\r\n  )\r\n  #print(\"(PyTorch): \",lay_ys, dy_dxs)\r\n  \r\n  ek_local_per_walker = -0.5 * (lay_ys + dy_dxs.pow(2).sum(-1)) #move const out of loop?\r\n  return ek_local_per_walker\r\n  \r\njacjaclogabs = jacrev(jacrev(logabs, argnums=1), argnums=1)\r\njaclogabs = jacrev(logabs, argnums=1)\r\n  \r\ndef kinetic_functorch(params, x):\r\n  d2f_dx2 = vmap(jacjaclogabs, in_dims=(None, 0))(par",
    "url": "https://github.com/pytorch/functorch/issues/977",
    "state": "closed",
    "labels": [],
    "created_at": "2022-07-21T12:11:09Z",
    "updated_at": "2022-08-01T19:37:18Z",
    "comments": 18,
    "user": "AlphaBetaGamma96"
  },
  {
    "repo": "pytorch/benchmark",
    "number": 1046,
    "title": "How to add an new backend?",
    "body": "Hello, I want to add an new backend to run benchmark **without** modify this repo's code. In torchdynamo repo, I use @create_backend decorator to finish this, but I can't find suitable interface in this repo. ",
    "url": "https://github.com/pytorch/benchmark/issues/1046",
    "state": "closed",
    "labels": [],
    "created_at": "2022-07-20T08:45:36Z",
    "updated_at": "2022-07-27T22:47:49Z",
    "user": "zzpmiracle"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4719,
    "title": "Issue loading TheNoob3131/mosquito-data dataset",
    "body": "![image](https://user-images.githubusercontent.com/53668030/179815591-d75fa7d3-3122-485f-a852-b06a68909066.png)\r\n\r\nSo my dataset is public in the Huggingface Hub, but when I try to load it using the load_dataset command, it shows that it is downloading the files, but throws a ValueError. When I went to my directory to see if the files were downloaded, the folder was blank.\r\n\r\nHere is the error below:\r\nValueError                                Traceback (most recent call last)\r\nInput In [8], in <cell line: 3>()\r\n      1 from datasets import load_dataset\r\n----> 3 dataset = load_dataset(\"TheNoob3131/mosquito-data\", split=\"train\")\r\n\r\nFile ~\\Anaconda3\\lib\\site-packages\\datasets\\load.py:1679, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)\r\n   1676 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES\r\n   1678 # Download and prepare data\r\n-> 1679 builder_instance.download_and_prepare(\r\n   1680     download_config=download_config,\r\n   1681     download_mode=download_mode,\r\n   1682     ignore_verifications=ignore_verifications,\r\n   1683     try_from_hf_gcs=try_from_hf_gcs,\r\n   1684     use_auth_token=use_auth_token,\r\n   1685 )\r\n   1687 # Build dataset for splits\r\n   1688 keep_in_memory = (\r\n   1689     keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)\r\n   1690 )\r\n\r\nIs the dataset in the wrong format or is there some security permission that I should enable?",
    "url": "https://github.com/huggingface/datasets/issues/4719",
    "state": "closed",
    "labels": [],
    "created_at": "2022-07-19T17:47:37Z",
    "updated_at": "2022-07-20T06:46:57Z",
    "comments": 2,
    "user": "thenerd31"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1189,
    "title": "\u2753 [Question]Why the GPU memory has doubled  when I loaded model from Torch-TensorRT by Pytorch? ",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nWhen I'm using Pytorch to load model from Torch-TensorRT(torch.jit.load (*.ts)) file, the model's GPU memory has doubled(1602MB to 3242MB of GPU Memory from Nvidia-smi). At the same time, the gradient of model tensors are both not included. What I'm concern is that the context memory of torch is not reused, is restart a new context memory of torch.  \r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):1.10.0\r\n - OS (e.g., Linux): Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Python version: 3.7\r\n - CUDA version:11.2\r\n - Any other relevant information: torch-tensorrt version: 1.1.0\r\n- NVIDIA GPU: Tesla v100\r\n\r\n## Additional context\r\n\r\nimport torch\r\nimport torch_tensorrt\r\n\r\n# memory is 1.6G\r\na= torch.randn()\r\na= torch.randn([1,1,224,224])\r\na.cuda()\r\n\r\n# memory become 3.2G\r\nmodel = torch.jit.load()\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1189",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "performance"
    ],
    "created_at": "2022-07-19T10:21:14Z",
    "updated_at": "2023-03-26T00:02:18Z",
    "user": "Jancapcc"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4711,
    "title": "Document how to create a dataset loading script for audio/vision",
    "body": "Currently, in our docs for Audio/Vision/Text, we explain how to:\r\n- Load data\r\n- Process data\r\n\r\nHowever we only explain how to *Create a dataset loading script* for text data.\r\n\r\nI think it would be useful that we add the same for Audio/Vision as these have some specificities different from Text.\r\n\r\nSee, for example:\r\n- #4697\r\n  - and comment there: https://github.com/huggingface/datasets/issues/4697#issuecomment-1191502492\r\n\r\nCC: @stevhliu \r\n",
    "url": "https://github.com/huggingface/datasets/issues/4711",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-07-19T08:03:40Z",
    "updated_at": "2023-07-25T16:07:52Z",
    "comments": 1,
    "user": "albertvillanova"
  },
  {
    "repo": "huggingface/optimum",
    "number": 306,
    "title": "`ORTModelForConditionalGeneration` did not have `generate()` module after converting from `T5ForConditionalGeneration`",
    "body": "### System Info\n\n```shell\nMachine: Apple M1 Pro\r\nOptimum version: 1.3.0\r\nTransformers version: 4.20.1\r\nOnnxruntime version: 1.11.1\r\n\r\n# Question\r\nHow to inference a quantized onnx model from class ORTModelForConditionalGeneration (previously using T5ForConditionalGeneration). I've successfully converted T5ForConditionalGeneration PyTorch model to onnx, then quantize it. But did not know why the `model.generate` was not found from ORTModelForConditionalGeneration model. How to inference?\r\n\r\nA bit of context, this is text to text generation task. So generate a paraphrase from a sentence.\n```\n\n\n### Who can help?\n\n_No response_\n\n### Information\n\n- [X] The official example scripts\n- [X] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\n\r\nSample code:\r\n```\r\nimport os\r\nfrom optimum.onnxruntime.modeling_seq2seq import ORTModelForConditionalGeneration\r\nfrom transformers import T5ForConditionalGeneration,T5Tokenizer\r\n\r\n\r\nsave_directory = \"onnx/\"\r\nfile_name = \"model.onnx\"\r\nonnx_path = os.path.join(save_directory, \"model.onnx\")\r\n\r\n# Load a model from transformers and export it through the ONNX format\r\n# model_raw = T5ForConditionalGeneration.from_pretrained(f'model_{version}/t5_keyword')\r\nmodel = ORTModelForConditionalGeneration.from_pretrained(f'model_{version}/t5_keyword', from_transformers=True)\r\ntokenizer = T5Tokenizer.from_pretrained(f'model_{version}/t5_keyword')\r\n\r\n# Save the onnx model and tokenizer\r\nmodel.save_pretrained(save_directory, file_name=file_name)\r\ntokenizer.save_pretrained(save_directory)\r\n\r\n```\r\n\r\nQuantization code:\r\n```\r\nfrom optimum.onnxruntime.configuration import AutoQuantizationConfig\r\nfrom optimum.onnxruntime import ORTQuantizer\r\n\r\n# Define the quantization methodology\r\nqconfig = AutoQuantizationConfig.arm64(is_static=False, per_channel=False)\r\nquantizer = ORTQuantizer.from_pretrained(f'model_{version}/t5_keyword', feature=\"seq2seq-lm\")\r\n\r\n# Apply dynamic quantization on the model\r\nquantizer.export(\r\n    onnx_model_path=onnx_path,\r\n    onnx_quantized_model_output_path=os.path.join(save_directory, \"model-quantized.onnx\"),\r\n    quantization_config=qconfig,\r\n)\r\n```\r\n\r\nReader:\r\n```\r\nfrom optimum.onnxruntime.modeling_seq2seq import ORTModelForConditionalGeneration\r\nfrom transformers import pipeline, AutoTokenizer\r\n\r\nmodel = ORTModelForConditionalGeneration.from_pretrained(save_directory, file_name=\"model-quantized.onnx\")\r\ntokenizer = AutoTokenizer.from_pretrained(save_directory)\r\n```\r\n\r\nError when:\r\n```\r\ntext = \"Hotelnya bagus sekali\"\r\nencoding = tokenizer.encode_plus(text,padding=True, return_tensors=\"pt\")\r\ninput_ids, attention_masks = encoding[\"input_ids\"], encoding[\"attention_mask\"]\r\nbeam_outputs = model.generate(\r\n        input_ids=input_ids, \r\n        attention_mask=attention_masks,\r\n    )\r\n```\r\n`AttributeError: 'ORTModelForConditionalGeneration' object has no attribute 'generate'`\n\n### Expected behavior\n\nCan predict using same T5 class `generate`",
    "url": "https://github.com/huggingface/optimum/issues/306",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-07-19T07:14:48Z",
    "updated_at": "2022-07-19T09:29:09Z",
    "comments": 2,
    "user": "tiketdatailham"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1188,
    "title": "\u2753 [Question] Cannot install torch-tensorrt package",
    "body": "Hi! Can someone explain why this is error\r\n\r\n```shell\r\n(tf-gpu-11.6) C:\\Users\\myxzlpltk>pip install torch-tensorrt -f https://github.com/NVIDIA/Torch-TensorRT/releases\r\nLooking in links: https://github.com/NVIDIA/Torch-TensorRT/releases\r\nCollecting torch-tensorrt\r\n  Using cached torch-tensorrt-0.0.0.post1.tar.gz (9.0 kB)\r\n  Preparing metadata (setup.py) ... error\r\n  error: subprocess-exited-with-error\r\n\r\n  \u00d7 python setup.py egg_info did not run successfully.\r\n  \u2502 exit code: 1\r\n  \u2570\u2500> [13 lines of output]\r\n      Traceback (most recent call last):\r\n        File \"<string>\", line 2, in <module>\r\n        File \"<pip-setuptools-caller>\", line 34, in <module>\r\n        File \"C:\\Users\\myxzlpltk\\AppData\\Local\\Temp\\pip-install-t86xj3rx\\torch-tensorrt_a472ada85c9e492d8f4d7d614046053d\\setup.py\", line 125, in <module>\r\n          raise RuntimeError(open(\"ERROR.txt\", \"r\").read())\r\n      RuntimeError:\r\n      ###########################################################################################\r\n      The package you are trying to install is only a placeholder project on PyPI.org repository.\r\n      To install Torch-TensorRT please run the following command:\r\n\r\n      $ pip install torch-tensorrt -f https://github.com/NVIDIA/Torch-TensorRT/releases\r\n      ###########################################################################################\r\n\r\n      [end of output]\r\n\r\n  note: This error originates from a subprocess, and is likely not a problem with pip.\r\nerror: metadata-generation-failed\r\n\r\n\u00d7 Encountered error while generating package metadata.\r\n\u2570\u2500> See above for output.\r\n\r\nnote: This is an issue with the package mentioned above, not pip.\r\nhint: See above for details.\r\n```",
    "url": "https://github.com/pytorch/TensorRT/issues/1188",
    "state": "closed",
    "labels": [
      "question",
      "channel: windows"
    ],
    "created_at": "2022-07-19T01:48:13Z",
    "updated_at": "2024-02-26T17:16:23Z",
    "user": "myxzlpltk"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1186,
    "title": "\u2753 [Question] Python Package for V1.1.1 Release? ",
    "body": "## \u2753 Question\r\n\r\nDoes the latest release include the python package for supporting JP5.0 too?\r\n\r\n - PyTorch Version (e.g., 1.0): 1.11\r\n - CPU Architecture: Arm64\r\n - Python version: 3.8\r\n - CUDA version: 11.4\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1186",
    "state": "closed",
    "labels": [
      "question",
      "release: patch",
      "channel: linux-jetpack"
    ],
    "created_at": "2022-07-18T15:20:13Z",
    "updated_at": "2022-07-18T21:47:06Z",
    "user": "haichuanwang001"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4694,
    "title": "Distributed data parallel training for streaming datasets",
    "body": "### Feature request\r\n\r\nAny documentations for the the `load_dataset(streaming=True)` for (multi-node multi-GPU) DDP training? \r\n\r\n### Motivation\r\n\r\nGiven a bunch of data files, it is expected to split them onto different GPUs. Is there a guide or documentation?\r\n\r\n### Your contribution\r\n\r\nDoes it requires manually split on data files for each worker in `DatasetBuilder._split_generator()`? What is`IterableDatasetShard` expected to do?",
    "url": "https://github.com/huggingface/datasets/issues/4694",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-07-17T01:29:43Z",
    "updated_at": "2023-04-26T18:21:09Z",
    "comments": 6,
    "user": "cyk1337"
  },
  {
    "repo": "pytorch/data",
    "number": 661,
    "title": "DataLoader2 with reading service",
    "body": "For user dev and onboarding experience of the data component, we will provide examples, tutorials, up-to-date documentations as well as the operational support. We added a simple train loop example. This is to further track adding the uscase and example of DataLoader2 with different reading services.",
    "url": "https://github.com/meta-pytorch/data/issues/661",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-07-15T17:29:41Z",
    "updated_at": "2022-11-10T23:07:24Z",
    "comments": 2,
    "user": "dahsh"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4684,
    "title": "How to assign new values to Dataset?",
    "body": "![image](https://user-images.githubusercontent.com/37113676/179149159-bbbda0c8-a661-403c-87ed-dc2b4219cd68.png)\r\n\r\nHi, if I want to change some values of the dataset, or add new columns to it, how can I do it?\r\n\r\nFor example, I want to change all the labels of the SST2 dataset to `0`:\r\n```python\r\nfrom datasets import load_dataset\r\ndata = load_dataset('glue','sst2')\r\n\r\ndata['train']['label'] = [0]*len(data)\r\n```\r\n\r\nI will get the error:\r\n```\r\nTypeError: 'Dataset' object does not support item assignment\r\n```",
    "url": "https://github.com/huggingface/datasets/issues/4684",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-07-15T04:17:57Z",
    "updated_at": "2023-03-20T15:50:41Z",
    "comments": 2,
    "user": "beyondguo"
  },
  {
    "repo": "pytorch/data",
    "number": 655,
    "title": "DataLoader2 with OSS datasets/datapipes",
    "body": "For user dev and onboarding experience of the data component, we will provide examples, tutorials, up-to-date documentations as well as the operational support. We added a simple train loop example. This is to further track adding the uscase and example of DataLoader2 with open source datasets/datapipes.",
    "url": "https://github.com/meta-pytorch/data/issues/655",
    "state": "closed",
    "labels": [],
    "created_at": "2022-07-14T17:51:13Z",
    "updated_at": "2022-11-10T23:06:20Z",
    "comments": 2,
    "user": "dahsh"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4682,
    "title": "weird issue/bug with columns (dataset iterable/stream mode)",
    "body": "I have a dataset online (CloverSearch/cc-news-mutlilingual) that has a bunch of columns, two of which are \"score_title_maintext\" and \"score_title_description\". the original files are jsonl formatted. I was trying to iterate through via streaming mode and grab all \"score_title_description\" values, but I kept getting key not found after a certain point of iteration. I found that some json objects in the file don't have \"score_title_description\". And in SOME cases, this returns a NONE and in others it just gets a key error. Why is there an inconsistency here and how can I fix it?",
    "url": "https://github.com/huggingface/datasets/issues/4682",
    "state": "open",
    "labels": [],
    "created_at": "2022-07-14T13:26:47Z",
    "updated_at": "2022-07-14T13:26:47Z",
    "comments": 0,
    "user": "eunseojo"
  },
  {
    "repo": "pytorch/torchx",
    "number": 557,
    "title": "how does i run the script and use script args",
    "body": "## \u2753 Questions and Help\r\nhow does i run the script and use the script_args   --\r\n torchx run --scheduler local_cwd --scheduler_args log_dir=/tmp   dist.ddp -j 1x2  --script dlrm_main.py   --epoch  30\r\n\r\nwhen i test dlrm by next code\r\n\r\n```shell\r\n     torchx run --scheduler local_cwd --scheduler_args log_dir=/tmp   dist.ddp -j 1x2  --script dlrm_main.py   --epoch  30\r\n\r\n```\r\n![image](https://user-images.githubusercontent.com/6194818/178942300-1fe84175-cee5-42cf-8331-455c8716d863.png)\r\n\r\n### Question\r\nthe error is :\r\nusage: torchx run <run args...> ddp  [--help] [--script SCRIPT] [-m M] [--image IMAGE] [--name NAME] [-h H] [--cpu CPU] [--gpu GPU] [--memMB MEMMB] [-j J] [--env ENV] [--max_retries MAX_RETRIES] [--rdzv_port RDZV_PORT]\r\n                                     [--mounts MOUNTS]\r\n                                     ...\r\ntorchx run <run args...> ddp : error: unrecognized arguments: --epoch\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/557",
    "state": "closed",
    "labels": [],
    "created_at": "2022-07-14T08:50:39Z",
    "updated_at": "2023-07-03T19:51:50Z",
    "comments": 3,
    "user": "davidxiaozhi"
  },
  {
    "repo": "pytorch/examples",
    "number": 1022,
    "title": "How to build a generator for a layout 2 image GANs with images of size 256 and 512",
    "body": "Hello I am new to GANs and I need you help : \r\nPlease could you help me to make the model accept the image size of 256x256 and 512x512 \r\n\r\nI included the generator model for 128x128\r\n\r\n`import torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nfrom math import *\r\nfrom models.bilinear import crop_bbox_batch\r\n\r\n\r\ndef get_z_random(batch_size, z_dim, random_type='gauss'):\r\n    if random_type == 'uni':\r\n        z = torch.rand(batch_size, z_dim) * 2.0 - 1.0\r\n    elif random_type == 'gauss':\r\n        z = torch.randn(batch_size, z_dim)\r\n    return z\r\n\r\n\r\ndef transform_z_flat(batch_size, time_step, z_flat, obj_to_img):\r\n    # restore z to batch with padding\r\n    z = torch.zeros(batch_size, time_step, z_flat.size(1)).to(z_flat.device)\r\n    for i in range(batch_size):\r\n        idx = (obj_to_img.data == i).nonzero()\r\n        if idx.dim() == 0:\r\n            continue\r\n        idx = idx.view(-1)\r\n        n = idx.size(0)\r\n        z[i, :n] = z_flat[idx]\r\n    return z\r\n\r\n\r\nclass ConditionalBatchNorm2d(nn.Module):\r\n    def __init__(self, num_features, num_classes):\r\n        super().__init__()\r\n        self.num_features = num_features\r\n        self.bn = nn.BatchNorm2d(num_features, affine=False)\r\n        self.embed = nn.Embedding(num_classes, num_features * 2)\r\n        self.embed.weight.data[:, :num_features].normal_(1, 0.02)  # Initialise scale at N(1, 0.02)\r\n        self.embed.weight.data[:, num_features:].zero_()  # Initialise bias at 0\r\n\r\n    def forward(self, x, y):\r\n        out = self.bn(x)\r\n        gamma, beta = self.embed(y).chunk(2, 1)\r\n        out = gamma.view(-1, self.num_features, 1, 1) * out + beta.view(-1, self.num_features, 1, 1)\r\n        return out\r\n\r\n\r\nclass ResidualBlock(nn.Module):\r\n    \"\"\"Residual Block with instance normalization.\"\"\"\r\n\r\n    def __init__(self, dim_in, dim_out):\r\n        super(ResidualBlock, self).__init__()\r\n        self.main = nn.Sequential(\r\n            nn.Conv2d(dim_in, dim_out, kernel_size=3, stride=1, padding=1, bias=False),\r\n            nn.BatchNorm2d(dim_out, affine=True, track_running_stats=True),\r\n            nn.ReLU(inplace=True),\r\n            nn.Conv2d(dim_out, dim_out, kernel_size=3, stride=1, padding=1, bias=False),\r\n            nn.BatchNorm2d(dim_out, affine=True, track_running_stats=True))\r\n\r\n    def forward(self, x):\r\n        return x + self.main(x)\r\n\r\n\r\nclass ConvLSTMCell(nn.Module):\r\n\r\n    def __init__(self, input_size, input_dim, hidden_dim, kernel_size, bias):\r\n        \"\"\"\r\n        Initialize ConvLSTM cell.\r\n        Parameters\r\n        ----------\r\n        input_size: (int, int)\r\n            Height and width of input tensor as (height, width).\r\n        input_dim: int\r\n            Number of channels of input tensor.\r\n        hidden_dim: int\r\n            Number of channels of hidden state.\r\n        kernel_size: (int, int)\r\n            Size of the convolutional kernel.\r\n        bias: bool\r\n            Whether or not to add the bias.\r\n        \"\"\"\r\n\r\n        super(ConvLSTMCell, self).__init__()\r\n\r\n        self.height, self.width = input_size\r\n        self.input_dim = input_dim\r\n        self.hidden_dim = hidden_dim\r\n\r\n        self.kernel_size = kernel_size\r\n        self.padding = kernel_size[0] // 2, kernel_size[1] // 2\r\n        self.bias = bias\r\n\r\n        self.conv = nn.Conv2d(in_channels=self.input_dim + self.hidden_dim,\r\n                              out_channels=4 * self.hidden_dim,\r\n                              kernel_size=self.kernel_size,\r\n                              padding=self.padding,\r\n                              bias=self.bias)\r\n\r\n    def forward(self, input_tensor, cur_state):\r\n        h_cur, c_cur = cur_state\r\n\r\n        combined = torch.cat([input_tensor, h_cur], dim=1)  # concatenate along channel axis\r\n\r\n        combined_conv = self.conv(combined)\r\n        cc_i, cc_f, cc_o, cc_g = torch.split(combined_conv, self.hidden_dim, dim=1)\r\n        i = torch.sigmoid(cc_i)\r\n        f = torch.sigmoid(cc_f)\r\n        o = torch.sigmoid(cc_o)\r\n        g = torch.tanh(cc_g)\r\n\r\n        c_next = f * c_cur + i * g\r\n        h_next = o * torch.tanh(c_next)\r\n\r\n        return h_next, c_next\r\n\r\n    def init_hidden(self, batch_size, device):\r\n        return (torch.zeros(batch_size, self.hidden_dim, self.height, self.width).to(device),\r\n                torch.zeros(batch_size, self.hidden_dim, self.height, self.width).to(device))\r\n\r\n\r\nclass ConvLSTM(nn.Module):\r\n\r\n    def __init__(self, input_size, input_dim, hidden_dim, kernel_size, batch_first=False, bias=True, return_all_layers=False):\r\n        super(ConvLSTM, self).__init__()\r\n\r\n        self._check_kernel_size_consistency(kernel_size)\r\n\r\n        if isinstance(hidden_dim, list):\r\n            num_layers = len(hidden_dim)\r\n        elif isinstance(hidden_dim, int):\r\n            num_layers = 1\r\n\r\n        # Make sure that both `kernel_size` and `hidden_dim` are lists having len == num_layers\r\n        kernel_size = self._extend_for_multilayer(kernel_size, num_layers)\r\n        hidden_dim = self._extend_for_multilayer(hidden_di",
    "url": "https://github.com/pytorch/examples/issues/1022",
    "state": "closed",
    "labels": [],
    "created_at": "2022-07-13T15:45:09Z",
    "updated_at": "2022-07-16T17:13:15Z",
    "user": "TahaniFennir"
  },
  {
    "repo": "pytorch/data",
    "number": 648,
    "title": "Chainer/Concater from single datapipe?",
    "body": "The `Concater` datapipe takes multiple DPs as input. Is there a class that would take a **single** datapipe of iterables instead? Something like this:\r\n\r\n```py\r\nclass ConcaterIterable(IterDataPipe):\r\n    def __init__(self, source_datapipe):\r\n        self.source_datapipe = source_datapipe\r\n\r\n    def __iter__(self):\r\n        for iterable in self.source_datapipe:\r\n            yield from iterable\r\n```\r\n\r\nBasically:\r\n\r\n[`itertools.chain` ](https://docs.python.org/3/library/itertools.html#itertools.chain)== `Concater`\r\n[`itertools.chain.from_iterable`](https://docs.python.org/3/library/itertools.html#itertools.chain.from_iterable) == `ConcaterIterable`\r\n\r\n\r\n\r\nMaybe a neat way of implementing this would be to keep a single `Concater` class, which would fall back to the  `ConcaterIterable` behaviour if it's passed only one DP as input?\r\n\r\n\r\n-----\r\n\r\n\r\nDetails: I need this for my benchmarking on manifold where each file is a big pickle archive of multiple images. My DP builder looks like this:\r\n\r\n```py\r\ndef make_manifold_dp(root, dataset_size):\r\n    handler = ManifoldPathHandler()\r\n    dp = IoPathFileLister(root=root)\r\n    dp.register_handler(handler)\r\n\r\n    dp = dp.shuffle(buffer_size=dataset_size).sharding_filter()\r\n\r\n    dp = IoPathFileOpener(dp, mode=\"rb\")\r\n    dp.register_handler(handler)\r\n\r\n    dp = PickleLoaderDataPipe(dp)\r\n    dp = ConcaterIterable(dp)  # <-- Needed here!\r\n    return dp\r\n```",
    "url": "https://github.com/meta-pytorch/data/issues/648",
    "state": "closed",
    "labels": [
      "good first issue"
    ],
    "created_at": "2022-07-13T14:19:43Z",
    "updated_at": "2023-03-14T20:25:01Z",
    "comments": 9,
    "user": "NicolasHug"
  },
  {
    "repo": "huggingface/optimum",
    "number": 290,
    "title": "Quantized Model size difference when using Optimum vs. Onnxruntime",
    "body": "Package versions\r\n![image](https://user-images.githubusercontent.com/39588365/178708805-3fff370d-bfdf-4cc9-995e-ab28697ef9bb.png)\r\n![image](https://user-images.githubusercontent.com/39588365/178708839-cf64db33-c5e8-4a43-ac7e-5b9f4fb3502b.png)\r\n![image](https://user-images.githubusercontent.com/39588365/178708974-b5d2c201-4aa6-41b6-af24-7b042e764da2.png)\r\n![image](https://user-images.githubusercontent.com/39588365/178709183-2692ac78-39bb-46d3-8ac6-c66bfab928d5.png)\r\n\r\n\r\nWhile exporting a question answering model (\"deepset/minilm-uncased-squad2\") to ONNX and quantizing it(dynamic quantization) with Optimum, the model size is  68 MB. \r\nThe same model exported while using ONNXRuntime is 32 MB. \r\nWhy is there a difference between both the exported models when the model is the same and the quantization too ? \r\n\r\n**Optimum Code to convert the model to ONNX and Quantization.** \r\n```python\r\nfrom pathlib import Path\r\nfrom optimum.onnxruntime import ORTModelForQuestionAnswering, ORTOptimizer\r\nfrom optimum.onnxruntime.configuration import AutoQuantizationConfig, OptimizationConfig\r\nfrom optimum.onnxruntime import ORTQuantizer\r\nfrom optimum.pipelines import pipeline\r\nfrom transformers import AutoTokenizer\r\n\r\nmodel_checkpoint = \"deepset/minilm-uncased-squad2\"\r\nsave_directory = Path.home()/'onnx/optimum/minilm-uncased-squad2'\r\nsave_directory.mkdir(exist_ok=True,parents=True)\r\nfile_name = \"minilm-uncased-squad2.onnx\"\r\nonnx_path =  save_directory/\"minilm-uncased-squad2.onnx\"\r\n# Load a model from transformers and export it through the ONNX format\r\nmodel = ORTModelForQuestionAnswering.from_pretrained(model_checkpoint, from_transformers=True)\r\ntokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\r\n# Save the onnx model and tokenizer\r\nmodel.save_pretrained(save_directory, file_name=file_name)\r\ntokenizer.save_pretrained(save_directory)\r\n\r\n# Define the quantization methodology\r\nqconfig = AutoQuantizationConfig.avx2(is_static=False, per_channel=True)\r\nquantizer = ORTQuantizer.from_pretrained(model_checkpoint, feature=\"question-answering\")\r\n# Apply dynamic quantization on the model\r\nquantizer.export(\r\n    onnx_model_path=onnx_path,\r\n    onnx_quantized_model_output_path= save_directory/\"minilm-uncased-squad2-quantized.onnx\",\r\n    quantization_config=qconfig,\r\n)\r\nquantizer.model.config.save_pretrained(save_directory)\r\nPath(save_directory/\"minilm-uncased-squad2-quantized.onnx\").stat().st_size/1024**2\r\n```\r\n\r\n**ONNX Runtime Code** \r\n```python\r\nfrom transformers.convert_graph_to_onnx import convert\r\nfrom transformers import AutoTokenizer\r\nfrom pathlib import Path\r\n\r\nmodel_ckpt = \"deepset/minilm-uncased-squad2\"\r\nonnx_model_path = Path(\"../../onnx/minilm-uncased-squad2.onnx\")\r\ntokenizer= AutoTokenizer.from_pretrained(model_ckpt)\r\nconvert(framework=\"pt\", model=model_ckpt, tokenizer=tokenizer, \r\n        output=onnx_model_path, opset=12, pipeline_name=\"question-answering\")\r\n\r\n\r\nfrom onnxruntime.quantization import quantize_dynamic, QuantType\r\nonnx_model_path = Path(\"../../../onnx/minilm-uncased-squad2.onnx\")\r\nmodel_output = \"../../onnx/minilm-uncased-squad2.quant.onnx\"\r\nquantize_dynamic(onnx_model_path, model_output, weight_type=QuantType.QInt8)\r\nPath(model_output).stat().st_size/1024**2\r\n```\r\n\r\nThank you ",
    "url": "https://github.com/huggingface/optimum/issues/290",
    "state": "closed",
    "labels": [],
    "created_at": "2022-07-13T10:12:45Z",
    "updated_at": "2022-07-14T09:24:23Z",
    "comments": 3,
    "user": "Shamik-07"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 81395,
    "title": "How to Do Semi-Asynchronous or Asynchronous Training with Pytorch",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nWhen PyTorch is used for distributed training, DDP is normally good enough for most situations. However, when if performance of different nodes differs, the performance of the whole training will be decided by the worst node. E.g. worker 0  needs 1 second for a forward and backward pass while worker 1 needs 2 seconds, the time for one step will be 2 seconds.\r\n\r\nSo I am wondering if there is way to do semi-asynchronous training with Pytorch?\n\n### Alternatives\n\nThere is a similar library called [hivemind](tps://github.com/learning-at-home/hivemind), but it is designed for Internet while we prefer to run the training job in our cluster.\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/81395",
    "state": "closed",
    "labels": [],
    "created_at": "2022-07-13T09:42:48Z",
    "updated_at": "2022-07-13T16:50:59Z",
    "user": "lsy643"
  },
  {
    "repo": "pytorch/data",
    "number": 647,
    "title": "Update out-of-date example and colab",
    "body": "### \ud83d\udcda The doc issue\n\nThe examples for Text/Vision/Audio are out-of-date: https://github.com/pytorch/data/tree/main/examples\r\nThe colab attached in README needs to be updated as well:\r\n- How to install torchdata\r\n- Example needs shuffle + sharding_filter\n\n### Suggest a potential alternative/fix\n\nNone",
    "url": "https://github.com/meta-pytorch/data/issues/647",
    "state": "closed",
    "labels": [],
    "created_at": "2022-07-12T21:09:53Z",
    "updated_at": "2023-02-02T14:39:40Z",
    "comments": 5,
    "user": "ejguan"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4675,
    "title": "Unable to use dataset with PyTorch dataloader",
    "body": "## Describe the bug\r\n\r\nWhen using `.with_format(\"torch\")`, an arrow table is returned and I am unable to use it by passing it to a PyTorch DataLoader: please see the code below.\r\n\r\n## Steps to reproduce the bug\r\n```python\r\nfrom datasets import load_dataset\r\nfrom torch.utils.data import DataLoader\r\n\r\nds = load_dataset(\r\n    \"para_crawl\",\r\n    name=\"enfr\",\r\n    cache_dir=\"/tmp/test/\",\r\n    split=\"train\",\r\n    keep_in_memory=True,\r\n)\r\n\r\ndataloader = DataLoader(ds.with_format(\"torch\"), num_workers=32)\r\nprint(next(iter(dataloader)))\r\n```\r\n\r\nIs there something I am doing wrong? The documentation does not say much about the behavior of `.with_format()` so I feel like I am a bit stuck here :-/\r\n\r\nThanks in advance for your help!\r\n\r\n## Expected results\r\n\r\nThe code should run with no error\r\n\r\n## Actual results\r\n\r\n```\r\nAttributeError: 'str' object has no attribute 'dtype'\r\n```\r\n\r\n## Environment info\r\n<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->\r\n- `datasets` version: 2.3.2\r\n- Platform: Linux-4.18.0-348.el8.x86_64-x86_64-with-glibc2.28\r\n- Python version: 3.10.4\r\n- PyArrow version: 8.0.0\r\n- Pandas version: 1.4.3\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4675",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2022-07-12T15:04:04Z",
    "updated_at": "2022-07-14T14:17:46Z",
    "comments": 1,
    "user": "BlueskyFR"
  },
  {
    "repo": "pytorch/functorch",
    "number": 956,
    "title": "Batching rule for searchsorted implementation",
    "body": "Hi,\r\n\r\nThanks for the great work, really enjoying functorch in my work. I have encountered the following when using vmap on a function which uses torch.searchsorted:\r\n\r\nUserWarning: There is a performance drop because we have not yet implemented the batching rule for aten::searchsorted.Tensor. Please file us an issue on GitHub so that we can prioritize its implementation. (Triggered internally at  /Users/runner/work/functorch/functorch/functorch/csrc/BatchedFallback.cpp:85.)\r\n\r\nLooking forward to the implementation.",
    "url": "https://github.com/pytorch/functorch/issues/956",
    "state": "closed",
    "labels": [
      "actionable"
    ],
    "created_at": "2022-07-12T06:36:04Z",
    "updated_at": "2022-07-18T13:49:42Z",
    "comments": 6,
    "user": "mingu6"
  },
  {
    "repo": "pytorch/data",
    "number": 637,
    "title": "[TODO]  Create dependency on TorchArrow?",
    "body": "\nThis issue is generated from the TODO line\n\nhttps://github.com/pytorch/data/blob/2f29adba451e1b87f1c0c654557d9dd98673fdd8/torchdata/datapipes/iter/util/dataframemaker.py#L15\n\n\n    ",
    "url": "https://github.com/meta-pytorch/data/issues/637",
    "state": "open",
    "labels": [],
    "created_at": "2022-07-11T17:34:07Z",
    "updated_at": "2022-07-11T17:34:07Z",
    "comments": 0,
    "user": "VitalyFedyunin"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4671,
    "title": "Dataset Viewer issue for wmt16",
    "body": "### Link\n\nhttps://huggingface.co/datasets/wmt16\n\n### Description\n\n[Reported](https://huggingface.co/spaces/autoevaluate/model-evaluator/discussions/12#62cb83f14c7f35284e796f9c) by a user of AutoTrain Evaluate. AFAIK this dataset was working 1-2 weeks ago, and I'm not sure how to interpret this error.\r\n\r\n```\r\nStatus code:   400\r\nException:     NotImplementedError\r\nMessage:       This is a abstract method\r\n```\r\n\r\nThanks!\n\n### Owner\n\nNo",
    "url": "https://github.com/huggingface/datasets/issues/4671",
    "state": "closed",
    "labels": [
      "dataset-viewer"
    ],
    "created_at": "2022-07-11T08:34:11Z",
    "updated_at": "2022-09-13T13:27:02Z",
    "comments": 6,
    "user": "lewtun"
  },
  {
    "repo": "huggingface/optimum",
    "number": 276,
    "title": "Force write of vanilla onnx model with `ORTQuantizer.export()`",
    "body": "### Feature request\n\nForce write of the non-quantized onnx model with `ORTQuantizer.export()`, or add an option to force write.\n\n### Motivation\n\nCurrently, if the `onnx_model_path` already exists, we don't write the non-quantized model in to the indicated path.\r\n\r\nhttps://github.com/huggingface/optimum/blob/04a2a6d290ca6ea6949844d1ae9a208ca95a79da/optimum/onnxruntime/quantization.py#L313-L315\r\n\r\nMeanwhile, the quantized model is always written, even if there is already a model at the `onnx_quantized_model_output_path` (see https://github.com/onnx/onnx/blob/60d29c10c53ef7aa580291cb2b6360813b4328a3/onnx/__init__.py#L170).\r\n\r\nIs there any reason for this different behavior? It led me to unexpected behaviors, where the non-quantized / quantized models don't correspond if I change the model in my script. In this case, the `export()` reuses the old non-quantized model to generate the quantized model, and all the quantizer attributes are ignored!\n\n### Your contribution\n\nI can do this if approved",
    "url": "https://github.com/huggingface/optimum/issues/276",
    "state": "closed",
    "labels": [],
    "created_at": "2022-07-09T08:44:27Z",
    "updated_at": "2022-07-11T10:38:48Z",
    "comments": 2,
    "user": "fxmarty"
  },
  {
    "repo": "pytorch/data",
    "number": 580,
    "title": "[Linter] Ability to disable some lints",
    "body": "### \ud83d\ude80 The feature\r\n\r\nThere are several options to disable specific linters. \r\n\r\nOption 1. Disable with `linter-ignore: code`\r\n\r\nPros: \r\n- Similar to known syntax of various linters\r\n\r\nCons: \r\n- Need to modify code of datasets to disable something\r\n\r\n```\r\ndatapipe = datapipe.sharding_filter().shuffle()  # linter-ignore: shuffle-shard\r\n```\r\n\r\nOption 2. Global & Context disables\r\n\r\nPros: \r\n- Can control datasets without modification of the code\r\n\r\nCons: \r\n- Global might disable important errors\r\n- Context requires additional indent \r\n- Syntax feels weird \r\n- Annoying to disable construct time linters (see below)\r\n\r\n```\r\nfrom torchdata import linter\r\nlinter.disable('shuffle-shard') # global\r\nwith linter.disable('shuffle-shard'): # context based\r\n    dl = DataLoader2(...)\r\n```\r\n\r\nOption 3. DLv2 argument / ReadingService argument\r\n\r\nPros: \r\n- Local to specific DataLoader\r\n- Can control datasets without modication of the code\r\n\r\nCons: \r\n- Syntax feels weird\r\n- Some linters might trigger/not in various ReadingServices  \r\n- Annoying to disable construct time linters (see below)\r\n\r\n```\r\ndl = DataLoader2(dp_graph, [adapter], disable_lint = ['shuffle-shard'])\r\n```\r\n\r\nOption 4. DataPipe 'attribute'\r\n\r\nPros: \r\n- Can be defined by DataSet developer or by the user\r\n- Can impact construct time error handling\r\n\r\nCons: \r\n- Syntax feels weird\r\n\r\n```datapipe = datapipe.sharding_filter().shuffle().disable_lint('shuffle-shard')```\r\n \r\nand/or (as we can have an adapter to do the same job)\r\n\r\n```dl = DataLoader(dp_graph,[DisableLint('shuffle-shard')], ...)```\r\n\r\nPersonally, I prefer the last variant, but I'm open to discussion.",
    "url": "https://github.com/meta-pytorch/data/issues/580",
    "state": "open",
    "labels": [],
    "created_at": "2022-07-08T17:25:25Z",
    "updated_at": "2022-07-15T21:23:17Z",
    "comments": 3,
    "user": "VitalyFedyunin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 81103,
    "title": "[Discussion] How to add MPS extension with custom kernel?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHi,\r\nI am working on adding MPS op for MPS backend with a custom kernel.\r\nHere is an example:\r\n\r\nhttps://github.com/grimoire/TorchMPSCustomOpsDemo\r\n\r\nI am new to Metal. I am not sure if it is a good way (or the right way) to add such op. There are something I want to discuss:\r\n\r\n## Device and CommandQueue\r\n\r\nSince PyTorch has not exposed the MPS-related API, I have to copy some head [from torch csrc](https://github.com/grimoire/TorchMPSCustomOpsDemo/tree/master/csrc/pytorch/mps). The library is build with `MPSDevice::getInstance()->device()` and the command is commit to `getCurrentMPSStream()`. I am not sure if I should flush on commit or not.\r\n\r\n## LibraryFromUrl  vs  LibraryFromSource\r\n\r\nIt seems that Metal library can not be linked together with the other object file. So I have to:\r\n\r\nEither load it at runtime, which leads to the problem of how to find the relative location of the `.metallib`.\r\n\r\n```objc\r\n// load from url\r\nNSURL* metal_url = [NSURL fileURLWithPath: utl_str];\r\nlibrary->_library = [at::mps::MPSDevice::getInstance()->device() newLibraryWithURL: metal_url error:&error];\r\n```\r\n\r\nOr build it at runtime. Which might take a long time to compile the kernel at runtime.\r\n\r\n```objc\r\n// build library from source string\r\nNSString* code_str = [NSString stringWithCString: sources.c_str()];\r\nlibrary->_library = [at::mps::MPSDevice::getInstance()->device() newLibraryWithSource: code_str options: nil error:&error];\r\n```\r\n\r\n## BuildExtension\r\n\r\nIf we does not build metal kernel at runtime, we need to setup the compiler for metal kernel in the `setup.py`.\r\n\r\nSince the `build_ext` provided by Python and PyTorch does not support build Metal, I patched the `UnixCCompiler` in `BuildExtension` to add the support. Both `compile` and `link` need to be updated:\r\n\r\n```python\r\n\r\n        # compile\r\n        def darwin_wrap_single_compile(obj, src, ext, cc_args, extra_postargs,\r\n                                       pp_opts) -> None:\r\n            cflags = copy.deepcopy(extra_postargs)\r\n            try:\r\n                original_compiler = self.compiler.compiler_so\r\n\r\n                if _is_metal_file(src):\r\n                    # use xcrun metal to compile metal file to `.air`\r\n                    metal = ['xcrun', 'metal']\r\n                    self.compiler.set_executable('compiler_so', metal)\r\n                    if isinstance(cflags, dict):\r\n                        cflags = cflags.get('metal', [])\r\n                    else:\r\n                        cflags = []\r\n                elif isinstance(cflags, dict):\r\n                    cflags = cflags['cxx']\r\n\r\n                original_compile(obj, src, ext, cc_args, cflags, pp_opts)\r\n            finally:\r\n                self.compiler.set_executable('compiler_so', original_compiler)\r\n        \r\n        # link\r\n        def darwin_wrap_single_link(target_desc,\r\n                                    objects,\r\n                                    output_filename,\r\n                                    output_dir=None,\r\n                                    libraries=None,\r\n                                    library_dirs=None,\r\n                                    runtime_library_dirs=None,\r\n                                    export_symbols=None,\r\n                                    debug=0,\r\n                                    extra_preargs=None,\r\n                                    extra_postargs=None,\r\n                                    build_temp=None,\r\n                                    target_lang=None):\r\n            if osp.splitext(objects[0])[1].lower() == '.air':\r\n                for obj in objects:\r\n                    assert osp.splitext(obj)[1].lower(\r\n                    ) == '.air', f'Expect .air file, but get {obj}.'\r\n                # link `.air` with xcrun metallib\r\n                linker = ['xcrun', 'metallib']\r\n                self.compiler.spawn(linker + objects + ['-o', output_filename])\r\n            else:\r\n                return original_link(target_desc, objects, output_filename,\r\n                                     output_dir, libraries, library_dirs,\r\n                                     runtime_library_dirs, export_symbols,\r\n                                     debug, extra_preargs, extra_postargs,\r\n                                     build_temp, target_lang)\r\n```\r\n\r\nThe code looks ... ugly. Hope there is a better way to do that.\r\n\r\n\r\nSo ... any advice?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_\n\ncc @malfet @zou3519 @kulinseth @albanD",
    "url": "https://github.com/pytorch/pytorch/issues/81103",
    "state": "closed",
    "labels": [
      "module: cpp-extensions",
      "triaged",
      "enhancement",
      "topic: docs",
      "module: mps"
    ],
    "created_at": "2022-07-08T12:32:14Z",
    "updated_at": "2023-07-28T17:11:42Z",
    "user": "grimoire"
  },
  {
    "repo": "pytorch/pytorch.github.io",
    "number": 1071,
    "title": "Where is documented the resize and crop in EfficientNet for torchvision v0.12.0",
    "body": "## \ud83d\udcda Documentation\r\n\r\nHello, I do not see in any place what resize and center crop were done for training the efficientNet_bx models.\r\nWhere is that information? \r\n\r\nI saw it in the torchvision v0.13.0 documentation or code ([for example](https://github.com/pytorch/vision/blob/main/torchvision/models/efficientnet.py#L522))\r\n\r\nMany of us have still projects in the older version.\r\n\r\nThanks\r\n",
    "url": "https://github.com/pytorch/pytorch.github.io/issues/1071",
    "state": "closed",
    "labels": [],
    "created_at": "2022-07-08T12:20:23Z",
    "updated_at": "2022-07-22T22:06:23Z",
    "user": "mjack3"
  },
  {
    "repo": "pytorch/vision",
    "number": 6249,
    "title": "Error when create_feature_extractor in AlexNet",
    "body": "### \ud83d\udc1b Describe the bug\n\nWhen I try to obtain the feature of layer \"classifier.4\" in AlexNet, the program has reported an error. The code is as follows:\r\n```\r\nimport torch\r\nfrom torchvision.models import alexnet, AlexNet_Weights\r\nfrom torchvision.models.feature_extraction import create_feature_extractor\r\n\r\nmodel = alexnet(weights=AlexNet_Weights.IMAGENET1K_V1)\r\nextractor = create_feature_extractor(model, {'classifier.4': 'feat'})\r\nimg = torch.rand(3,224,224)\r\nout = extractor(img)\r\n```\r\n\r\n**Error message**\r\n```\r\nRuntimeError: mat1 and mat2 shapes cannot be multiplied (256x36 and 9216x4096)\r\n```\r\n\r\nI guess it is because that the shape of output from \"flatten\" of AlexNet is 256x36 rather than 9216.\n\n### Versions\n\n```\r\nCollecting environment information...\r\nPyTorch version: 1.12.0+cu116\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.6\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 20.04.4 LTS (x86_64)\r\nGCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.9.12 (main, Jun  1 2022, 11:38:51)  [GCC 7.5.0] (64-bit runtime)\r\nPython platform: Linux-5.4.0-117-generic-x86_64-with-glibc2.31\r\nIs CUDA available: True\r\nCUDA runtime version: 11.6.55\r\nGPU models and configuration:\r\nGPU 0: NVIDIA GeForce RTX 3090\r\nGPU 1: NVIDIA GeForce RTX 3090\r\nGPU 2: NVIDIA GeForce RTX 3090\r\nGPU 3: NVIDIA GeForce RTX 3090\r\nGPU 4: NVIDIA GeForce RTX 3090\r\nGPU 5: NVIDIA GeForce RTX 3090\r\nGPU 6: NVIDIA GeForce RTX 3090\r\nGPU 7: NVIDIA GeForce RTX 3090\r\n\r\nNvidia driver version: 510.73.08\r\ncuDNN version: Probably one of the following:\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn.so.8.4.0\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8.4.0\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_adv_train.so.8.4.0\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8.4.0\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8.4.0\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8.4.0\r\n/usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudnn_ops_train.so.8.4.0\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.22.3\r\n[pip3] torch==1.12.0+cu116\r\n[pip3] torchmetrics==0.9.1\r\n[pip3] torchtext==0.12.0\r\n[pip3] torchvision==0.13.0+cu116\r\n[conda] blas                      1.0                         mkl    defaults\r\n[conda] cudatoolkit               11.3.1               h2bc3f7f_2    defaults\r\n[conda] mkl                       2021.4.0           h06a4308_640    defaults\r\n[conda] mkl-service               2.4.0            py39h7f8727e_0    defaults\r\n[conda] mkl_fft                   1.3.1            py39hd3c417c_0    defaults\r\n[conda] mkl_random                1.2.2            py39h51133e4_0    defaults\r\n[conda] numpy                     1.22.3           py39he7a7128_0    defaults\r\n[conda] numpy-base                1.22.3           py39hf524024_0    defaults\r\n[conda] pytorch-mutex             1.0                        cuda    pytorch\r\n[conda] torch                     1.12.0+cu116             pypi_0    pypi\r\n[conda] torchmetrics              0.9.1                    pypi_0    pypi\r\n[conda] torchtext                 0.12.0                     py39    pytorch\r\n[conda] torchvision               0.13.0+cu116             pypi_0    pypi\r\n```\n\ncc @datumbox",
    "url": "https://github.com/pytorch/vision/issues/6249",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: feature extraction"
    ],
    "created_at": "2022-07-08T09:28:06Z",
    "updated_at": "2022-07-08T10:11:43Z",
    "user": "githwd2016"
  },
  {
    "repo": "pytorch/vision",
    "number": 6247,
    "title": "Probable missing argument for swin transformer",
    "body": "Hello, \r\n\r\nWhen I inspect the swin transformer codes in the original swin repo, mmdetection or detectron2, I have noticed that there is a parameter called `drop_path_rate` which I cannot see in the in the torchvision repo. Maybe, I am overlooking. Is there a similar parameter and is it an important parameter? \r\n\r\nThanks in advance\n\ncc @datumbox",
    "url": "https://github.com/pytorch/vision/issues/6247",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2022-07-08T08:21:58Z",
    "updated_at": "2022-07-11T13:17:40Z",
    "user": "artest08"
  },
  {
    "repo": "pytorch/functorch",
    "number": 940,
    "title": "Question on how to batch over both: inputs and tangent vectors",
    "body": "I want to compute the jacobian vector product of a function F from R^d to R^D. But I need to do this at a batch of points x_1, ..., x_n in R^d and a batch of tangent vectors v_1, ..., v_m in R^d. Namely, for all i = 1, ..., n and j = 1, ..., m I need to compute the nxm jacobian vector products: J_F(x_i) * v_j.\r\n\r\nIs there a way to do this by using vmap twice to loop over the batches x_i and v_j?",
    "url": "https://github.com/pytorch/functorch/issues/940",
    "state": "open",
    "labels": [],
    "created_at": "2022-07-07T14:57:28Z",
    "updated_at": "2022-07-12T17:47:23Z",
    "user": "sgstepaniants"
  },
  {
    "repo": "pytorch/serve",
    "number": 1725,
    "title": "Serving other framework models with Torchserve?",
    "body": "Hi everyone.\r\n\r\nAs in the title, I want to ask if torchserve can serve other framework models or pytorch models only?\r\n\r\nFor example, I have a model written in mxnet. This is the snippet code of `initialize` method in my custom handler.\r\n```python\r\ndef initialize(self, context):\r\n        properties = context.system_properties\r\n        if (torch.cuda.is_available() and\r\n                properties.get(\"gpu_id\") is not None):\r\n            ctx_id = properties.get(\"gpu_id\")\r\n        else:\r\n            ctx_id = -1\r\n\r\n        self.manifest = context.manifest\r\n        model_dir = properties.get(\"model_dir\")\r\n        prefix = os.path.join(model_dir, \"model/resnet-50\")\r\n\r\n        # load model\r\n        sym, arg_params, aux_params = mx.model.load_checkpoint(prefix, 0)\r\n        if ctx_id >= 0:\r\n            self.ctx = mx.gpu(ctx_id)\r\n        else:\r\n            self.ctx = mx.cpu()\r\n        self.model = mx.mod.Module(symbol=sym,\r\n                                   context=self.ctx,\r\n                                   label_names=None)\r\n        self.model.bind(\r\n            data_shapes=[('data', (1, 3, 640, 640))],\r\n            for_training=False\r\n        )\r\n        self.model.set_params(arg_params, aux_params)\r\n        self.initialized = True\r\n```\r\nFor some reason, pretrained mxnet model can't be loaded. But that same model works fine in my training and inferencing script. This is the error log.\r\n```\r\n2022-07-06T15:48:07,468 [INFO ] W-9000-face_detect_1.0-stdout MODEL_LOG -   File \"/apps/conda/huyvd/envs/insightface/lib/python3.8/site-packages/ts/model_loader.py\", line 151, in load\r\n2022-07-06T15:48:07,468 [INFO ] W-9000-face_detect_1.0-stdout MODEL_LOG -     initialize_fn(service.context)\r\n2022-07-06T15:48:07,469 [INFO ] W-9000-face_detect_1.0-stdout MODEL_LOG -   File \"/tmp/models/4b6bbba5e16445ffbe70f89282a0d30a/handler.py\", line 34, in initialize\r\n2022-07-06T15:48:07,469 [INFO ] W-9000-face_detect_1.0-stdout MODEL_LOG -     sym, arg_params, aux_params = mx.model.load_checkpoint(prefix, 0)\r\n2022-07-06T15:48:07,469 [INFO ] W-9000-face_detect_1.0-stdout MODEL_LOG -   File \"/apps/conda/huyvd/envs/insightface/lib/python3.8/site-packages/mxnet/model.py\", line 476, in load_checkpoint\r\n2022-07-06T15:48:07,470 [INFO ] W-9000-face_detect_1.0-stdout MODEL_LOG -     symbol = sym.load('%s-symbol.json' % prefix)\r\n2022-07-06T15:48:07,470 [INFO ] W-9000-face_detect_1.0-stdout MODEL_LOG -   File \"/apps/conda/huyvd/envs/insightface/lib/python3.8/site-packages/mxnet/symbol/symbol.py\", line 3054, in load\r\n2022-07-06T15:48:07,470 [INFO ] W-9000-face_detect_1.0-stdout MODEL_LOG -     check_call(_LIB.MXSymbolCreateFromFile(c_str(fname), ctypes.byref(handle)))\r\n2022-07-06T15:48:07,471 [INFO ] W-9000-face_detect_1.0-stdout MODEL_LOG -   File \"/apps/conda/huyvd/envs/insightface/lib/python3.8/site-packages/mxnet/base.py\", line 246, in check_call\r\n2022-07-06T15:48:07,471 [INFO ] W-9000-face_detect_1.0-stdout MODEL_LOG -     raise get_last_ffi_error()\r\n2022-07-06T15:48:07,471 [INFO ] W-9000-face_detect_1.0-stdout MODEL_LOG - mxnet.base.MXNetError: Traceback (most recent call last):\r\n2022-07-06T15:48:07,472 [INFO ] W-9000-face_detect_1.0-stdout MODEL_LOG -   File \"../include/dmlc/././json.h\", line 718\r\n2022-07-06T15:48:07,472 [INFO ] W-9000-face_detect_1.0-stdout MODEL_LOG - MXNetError: Check failed: !is_->fail(): Error at Line 32, around ^``, Expect number\r\n```\r\n",
    "url": "https://github.com/pytorch/serve/issues/1725",
    "state": "closed",
    "labels": [
      "help wanted",
      "question"
    ],
    "created_at": "2022-07-06T09:08:44Z",
    "updated_at": "2022-07-13T07:58:10Z",
    "user": "vuongdanghuy"
  },
  {
    "repo": "huggingface/optimum",
    "number": 262,
    "title": "How can i set number of threads for Optimum exported model?",
    "body": "### System Info\r\n\r\n```shell\r\noptimum==1.2.3\r\nonnxruntime==1.11.1\r\nonnx==1.12.0\r\ntransformers==4.20.1\r\npython version 3.7.13\r\n```\r\n\r\n\r\n### Who can help?\r\n\r\n@JingyaHuang @echarlaix \r\n\r\n### Information\r\n\r\n- [ ] The official example scripts\r\n- [X] My own modified scripts\r\n\r\n### Tasks\r\n\r\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\r\n- [X] My own task or dataset (give details below)\r\n\r\n### Reproduction\r\n\r\n\r\nHi!\r\n\r\nI can't specify the number of threads for inferencing Optimum ONNX models.\r\nI didn't have such a problem with the default transformers model before.\r\nIs there any Configuration in Optimum?\r\n\r\n### Optimum doesn't have a config for assigning the number of threads\r\n```\r\nfrom onnxruntime import SessionOptions\r\nSessionOptions().intra_op_num_threads = 1\r\n```\r\n### also limiting  on OS level doesn't work:\r\n\r\n```bash\r\ntaskset -c 0-16 python inference_onnx.py\r\n```\r\n![1](https://user-images.githubusercontent.com/33181902/177484888-416316b9-aa00-4370-9937-437f2bb85c38.png)\r\n\r\n\r\n```bash\r\ntaskset -c 0 python inference_onnx.py\r\n```\r\n![2](https://user-images.githubusercontent.com/33181902/177484909-b1f58bb9-019a-4099-abf7-1f1a2441f314.png)\r\n\r\n\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/optimum/issues/262",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-07-06T06:53:30Z",
    "updated_at": "2022-09-19T11:25:23Z",
    "comments": 1,
    "user": "MiladMolazadeh"
  },
  {
    "repo": "huggingface/optimum",
    "number": 257,
    "title": "Optimum Inference next steps",
    "body": "# What is this issue for?\r\n\r\nThis issue is a list of potential next steps for improving inference experience using `optimum`. The current list applies to the main namespace of optimum but should be soon extended to other namespaces including `intel`, `habana`, `graphcore`. \r\n\r\n## Next Steps/Features\r\n\r\n- [x] #199 \r\n- [x] #254 \r\n- [x] #213 \r\n- [x] #258\r\n- [x] #259\r\n- [x] #260\r\n- [x] #261\r\n- [ ] add new Accelerators, INC, OpenVino.....\r\n\r\n---\r\n\r\n_Note: this issue will be continuously updated to keep track of the developments. If you are part of the community and interested in contributing feel free to pick on and open a PR._",
    "url": "https://github.com/huggingface/optimum/issues/257",
    "state": "closed",
    "labels": [
      "inference",
      "Stale"
    ],
    "created_at": "2022-07-06T05:02:12Z",
    "updated_at": "2025-09-13T02:01:29Z",
    "comments": 1,
    "user": "philschmid"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1166,
    "title": "\u2753 [Question] How to run Torch-Tensorrt on JETSON AGX ORIN?",
    "body": "## \u2753 Question\r\n**Not able to run Torch-Tensorrt on Jetson AGX ORIN**\r\nAs per the [release note](https://github.com/pytorch/TensorRT/discussions/1043), it is mentioned that current release doesn't have support for Jetpack 5.0DP but ORIN only supports Jetpack 5.0DP (I might be wrong but inferring from this [Jetpack Archives.](https://developer.nvidia.com/embedded/jetpack-archive). **Is there a way to run Torch-Tensort on ORIN?** if not what's the possible timeline for new release with this support? \r\n\r\n## What you have already tried\r\n\r\nI did tried building for python, as suggested in the repo, it enables `import torch_tensorrt` but doesn't supports any attributes.  \r\n\r\n## Environment\r\n - PyTorch Version (e.g., 1.0): 1.11 \r\n - CPU Architecture: arm64\r\n - OS (e.g., Linux): Ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): tried both, wheels provided [here ](https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-11-now-available/72048) and building from source(instruction from [here](https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-11-now-available/72048)). \r\n - Build command you used (if compiling from source): python3 setup.py --use_cxx11_abi (however, this refers to jetpack 4.6 by default) \r\n - Python version: 3.8\r\n - CUDA version: 11.4\r\n - GPU models and configuration: Jetson ORIN \r\n - Any other relevant information:\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1166",
    "state": "closed",
    "labels": [
      "question",
      "channel: linux-jetpack"
    ],
    "created_at": "2022-07-05T19:46:00Z",
    "updated_at": "2022-08-11T02:55:46Z",
    "user": "krmayankb"
  },
  {
    "repo": "pytorch/functorch",
    "number": 933,
    "title": "Cannot import vmap after new release",
    "body": "I am installing functorch on google colab; when I don't specify the version, it installs version 0.2.2 and PyTorch version 1.12.0, and uninstall currently installed PyTorch 1.11.0 on colab. But, in the line where I import vmap, it throws an error that functorch is not compatible with PyTorch 1.12.0:\r\n\r\n```\r\nRuntimeError                              Traceback (most recent call last)\r\n[<ipython-input-1-0691ca18293b>](https://localhost:8080/#) in <module>()\r\n      3 \r\n      4 from torchsummary import summary\r\n----> 5 from functorch import vmap\r\n      6 import torch\r\n      7 import torch.nn as nn\r\n\r\n[/usr/local/lib/python3.7/dist-packages/functorch/__init__.py](https://localhost:8080/#) in <module>()\r\n     20         if torch_cuda_version not in pytorch_cuda_restrictions:\r\n     21             raise RuntimeError(\r\n---> 22                 f\"We've detected an installation of PyTorch 1.12 with {verbose_torch_cuda_version} support. \"\r\n     23                 \"This functorch 0.2.0 binary is not compatible with the PyTorch installation. \"\r\n     24                 \"Please see our install page for suggestions on how to resolve this: \"\r\n\r\nRuntimeError: We've detected an installation of PyTorch 1.12 with CUDA 10.2 support. This functorch 0.2.0 binary is not compatible with the PyTorch installation. Please see our install page for suggestions on how to resolve this: https://pytorch.org/functorch/stable/install.html\r\n```\r\n\r\nI tried the older version, functorch 0.1.1 with PyTorch 1.11.0, but it also gives some errors during the import:\r\n```\r\nImportError                               Traceback (most recent call last)\r\n[<ipython-input-3-abbd2ba6241c>](https://localhost:8080/#) in <module>()\r\n      3 \r\n      4 from torchsummary import summary\r\n----> 5 from functorch import vmap\r\n      6 import torch\r\n      7 import torch.nn as nn\r\n\r\n[/usr/local/lib/python3.7/dist-packages/functorch/__init__.py](https://localhost:8080/#) in <module>()\r\n      5 # LICENSE file in the root directory of this source tree.\r\n      6 import torch\r\n----> 7 from . import _C\r\n      8 \r\n      9 # Monkey patch PyTorch. This is a hack, we should try to upstream\r\n\r\nImportError: /usr/local/lib/python3.7/dist-packages/functorch/_C.so: undefined symbol: _ZNK3c1010TensorImpl5sizesEv\r\n```\r\n\r\nNote:  I was able to use vmap from older version just a few hours ago, then I came to notebook started it and now it doesn't work",
    "url": "https://github.com/pytorch/functorch/issues/933",
    "state": "open",
    "labels": [],
    "created_at": "2022-07-05T18:47:06Z",
    "updated_at": "2022-08-08T14:31:27Z",
    "comments": 4,
    "user": "KananMahammadli"
  },
  {
    "repo": "pytorch/vision",
    "number": 6239,
    "title": "n classes in ConvNeXt model ",
    "body": "### \ud83d\udc1b Describe the bug\n\n\r\nHI,\r\n\r\nI'm trying to train a ConvNeXt tiny model as a binary classifier by loading the model architecture and pretrained weights from torchvision.models.\r\n\r\nI use the following two lines of code to load the model and change the number of output nodes:\r\n\r\n>num_classes=2\r\nmodel_ft = models.convnext_tiny(weights=ConvNeXt_Tiny_Weights.DEFAULT)\r\nmodel_ft.classifier[2].out_features = num_classes\r\n\r\nAnd when I print this layer of the mode I get:\r\n\r\n>print(model_ft.classifier[2])\r\n\r\n>Linear(in_features=768, out_features=2, bias=True)\r\n\r\nThis suggests that the change had been made. However, when I train the model, the output has dimensions of 42 x 1,000. _i.e. batch_size_ x n classes in ImageNet:\r\n\r\n>batch_size=42\r\noutputs = model(inputs)\r\nprint(outputs.size())\r\n\r\n>torch.Size([42, 1000])\r\n\r\nAny thoughts on how solve this problem?\r\n\r\nCheers,\r\nJamie\r\n\r\np.s. it seems like the issue might be that the number of classes is hard coded as 1000 in:\r\npytorch/vision/tree/main/torchvision/models/convnext.py\r\nLines 90:100\r\n\r\n>class ConvNeXt(nn.Module):\r\ndef init(\r\nself,\r\nblock_setting: List[CNBlockConfig],\r\nstochastic_depth_prob: float = 0.0,\r\nlayer_scale: float = 1e-6,\r\nnum_classes: int = 1000,\r\nblock: Optional[Callable[..., nn.Module]] = None,\r\nnorm_layer: Optional[Callable[..., nn.Module]] = None,\r\n**kwargs: Any,\r\n) -> None:\r\n\r\n\n\n### Versions\n\nPytorch version: 1.13.0.dev20220624\r\nPython 3.8\r\n\r\n\n\ncc @datumbox",
    "url": "https://github.com/pytorch/vision/issues/6239",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2022-07-05T17:47:40Z",
    "updated_at": "2022-07-06T08:13:15Z",
    "user": "jrsykes"
  },
  {
    "repo": "pytorch/vision",
    "number": 6235,
    "title": "Creating a `cache-dataset` for Video classification.",
    "body": "Hello, now I am trying to test the video classification model R(2+1)D on Kinetics400. However the speed of loading data is so slow. I believe the loading speed can be improved by caching the data but I am not sure how to cache video files. In the code also, it is mentioned. I want to know to cache video files? is cache dataset creating feature also included in future updates? \r\nThank you !\n\ncc @datumbox",
    "url": "https://github.com/pytorch/vision/issues/6235",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "module: video"
    ],
    "created_at": "2022-07-05T04:27:54Z",
    "updated_at": "2022-07-05T08:28:20Z",
    "user": "yakhyo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4621,
    "title": "ImageFolder raises an error with parameters drop_metadata=True and drop_labels=False when metadata.jsonl is present",
    "body": "## Describe the bug\r\n\r\nIf you pass `drop_metadata=True` and `drop_labels=False` when a `data_dir` contains at least one `matadata.jsonl` file, you will get a KeyError. This is probably not a very useful case but we shouldn't get an error anyway. Asking users to move metadata files manually outside `data_dir` or pass features manually (when there is a tool that can infer them automatically) don't look like a good idea to me either.\r\n\r\n## Steps to reproduce the bug\r\n### Clone an example dataset from the Hub\r\n```bash\r\ngit clone https://huggingface.co/datasets/nateraw/test-imagefolder-metadata\r\n```\r\n### Try to load it\r\n```python\r\nfrom datasets import load_dataset\r\nds = load_dataset(\"test-imagefolder-metadata\", drop_metadata=True, drop_labels=False)\r\n```\r\nor even just\r\n```python\r\nds = load_dataset(\"test-imagefolder-metadata\", drop_metadata=True)\r\n```\r\nas `drop_labels=False` is a default value.\r\n\r\n## Expected results\r\nA DatasetDict object with two features: `\"image\"` and `\"label\"`.\r\n\r\n## Actual results\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/polina/workspace/datasets/debug.py\", line 18, in <module>\r\n    ds = load_dataset(\r\n  File \"/home/polina/workspace/datasets/src/datasets/load.py\", line 1732, in load_dataset\r\n    builder_instance.download_and_prepare(\r\n  File \"/home/polina/workspace/datasets/src/datasets/builder.py\", line 704, in download_and_prepare\r\n    self._download_and_prepare(\r\n  File \"/home/polina/workspace/datasets/src/datasets/builder.py\", line 1227, in _download_and_prepare\r\n    super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)\r\n  File \"/home/polina/workspace/datasets/src/datasets/builder.py\", line 793, in _download_and_prepare\r\n    self._prepare_split(split_generator, **prepare_split_kwargs)\r\n  File \"/home/polina/workspace/datasets/src/datasets/builder.py\", line 1218, in _prepare_split\r\n    example = self.info.features.encode_example(record)\r\n  File \"/home/polina/workspace/datasets/src/datasets/features/features.py\", line 1596, in encode_example\r\n    return encode_nested_example(self, example)\r\n  File \"/home/polina/workspace/datasets/src/datasets/features/features.py\", line 1165, in encode_nested_example\r\n    {\r\n  File \"/home/polina/workspace/datasets/src/datasets/features/features.py\", line 1165, in <dictcomp>\r\n    {\r\n  File \"/home/polina/workspace/datasets/src/datasets/utils/py_utils.py\", line 249, in zip_dict\r\n    yield key, tuple(d[key] for d in dicts)\r\n  File \"/home/polina/workspace/datasets/src/datasets/utils/py_utils.py\", line 249, in <genexpr>\r\n    yield key, tuple(d[key] for d in dicts)\r\nKeyError: 'label'\r\n```\r\n\r\n## Environment info\r\n`datasets` master branch \r\n\r\n- `datasets` version: 2.3.3.dev0\r\n- Platform: Linux-5.14.0-1042-oem-x86_64-with-glibc2.17\r\n- Python version: 3.8.12\r\n- PyArrow version: 6.0.1\r\n- Pandas version: 1.4.1\r\n\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4621",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-07-04T11:21:44Z",
    "updated_at": "2022-07-15T14:24:24Z",
    "comments": 0,
    "user": "polinaeterna"
  },
  {
    "repo": "pytorch/audio",
    "number": 2526,
    "title": "Need more detail and tutorial on how to use the language model to decrease the word rate error.",
    "body": "### \ud83d\udcda The doc issue\r\n\r\n1. How do we build our own language model and add it to the language model, such as wav2vec2? However many of the solutions from the doc require using another library.\r\n\r\n2. If 1 requires training the language model again, then It looks like we can use our own text file for the language model to form a bean search \r\n![image](https://user-images.githubusercontent.com/21982975/177036688-d44e4b55-496e-486a-86a7-53535c22e435.png)\r\nhttps://github.com/facebookresearch/fairseq/issues/3157\r\n\r\nI was working on a project for deaf students to have a subtitle. You know they found out that after wav2vec2 using a language model, such as n-gram the word rate error will be dropped. Thus, I was thinking to add a lecture note or textbook to decrease the WRE for college class subtitling. But a lot of language model implementation for Pytorch audio model requires other library, such as KenLM. But I was thinking if it is a n-gram model, it shouldn't be difficult to have it in Pytorch. If we want to deploy it in other language, such as Javascript, it will require ONNX in Pytorch, so we may need to write the language model in Pytorch rather than in KenLM\r\n\r\n\r\nFirst, this has been asked that it looks like we do not need to train the language model(such as n-gram) again. We just need to put the text file that has all the possible words that we want the n-gram model to do the beam search.\r\n![image](https://user-images.githubusercontent.com/21982975/177036345-903194f1-bb50-473b-8e59-dfb5ef19ba38.png)\r\nBut you can see the doc only gives you one line of code to \"short cut\" everything without telling the user how to use their own text file.\r\n\r\nAgain, if we look at the doc, we see \"Builds CTC beam search decoder from Flashlight\". Thus, how do we use our own language model? Again, my point of using my own language model is not because I have some powerful transformer models. It is I need to be clear on how the model handles the process of wav2vec2 output to text with the language model.\r\nThus this issue was proposed and asked, and I feel it was not explained detailly.\r\nhttps://github.com/facebookresearch/fairseq/issues/3157\r\n\r\n\r\nSuggestion: I prefer HuBERT since it is smaller than Wav2vec2.",
    "url": "https://github.com/pytorch/audio/issues/2526",
    "state": "open",
    "labels": [],
    "created_at": "2022-07-03T11:05:05Z",
    "updated_at": "2022-07-18T21:02:59Z",
    "user": "AliceSum"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4619,
    "title": "np arrays get turned into native lists",
    "body": "## Describe the bug\r\nWhen attaching an `np.array` field, it seems that it automatically gets turned into a list (see below). Why is this happening? Could it lose precision? Is there a way to make sure this doesn't happen?\r\n\r\n## Steps to reproduce the bug\r\n```python\r\n>>> import datasets, numpy as np\r\n>>> dataset = datasets.load_dataset(\"glue\", \"mrpc\")[\"validation\"]\r\nReusing dataset glue (...)\r\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 3/3 [00:00<00:00, 1360.61it/s]\r\n>>> dataset2 = dataset.map(lambda x: {\"tmp\": np.array([0.5])}, batched=False)\r\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 408/408 [00:00<00:00, 10819.97ex/s]\r\n>>> dataset2[0][\"tmp\"]\r\n[0.5]\r\n>>> type(dataset2[0][\"tmp\"])\r\n<class 'list'>\r\n```\r\n\r\n## Expected results\r\n`dataset2[0][\"tmp\"]` should be an `np.ndarray`.\r\n\r\n## Actual results\r\nIt's a list.\r\n\r\n## Environment info\r\n<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->\r\n- `datasets` version: 2.3.2\r\n- Platform: mac, though I'm pretty sure it happens on a linux machine too\r\n- Python version: 3.9.7\r\n- PyArrow version: 6.0.1\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4619",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2022-07-02T17:54:57Z",
    "updated_at": "2022-07-03T20:27:07Z",
    "comments": 3,
    "user": "ZhaofengWu"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1961,
    "title": "Update SpaCy to latest.",
    "body": "The old `spacy==2.3.2` is out of date, and I cannot install it (due to build failure). Is it possible to remove the version constraint?",
    "url": "https://github.com/pytorch/tutorials/issues/1961",
    "state": "closed",
    "labels": [
      "dependencies"
    ],
    "created_at": "2022-07-02T11:01:23Z",
    "updated_at": "2022-12-09T17:47:43Z",
    "comments": 2,
    "user": "evan0greenup"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1960,
    "title": "Question: how to run individual tutorial?",
    "body": "I don't make to `make doc`, I just want to run a specific individual tutorial.\r\n\r\nIs it safe to directly run it as script?",
    "url": "https://github.com/pytorch/tutorials/issues/1960",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-07-02T10:59:34Z",
    "updated_at": "2022-08-01T21:15:19Z",
    "user": "evan0greenup"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1156,
    "title": "\u2753 [Question] Support for CUDA 11.6?",
    "body": "##  Does latest version support CUDA 11.6\u2753\r\n\r\nPytorch officially supports CUDA 11.6, however docs say torch_tensort supports CUDA 11.3 at max. But in some issues it is said that CUDA version 11.6 is used. Is CUDA 11.6 officially supported by torch_tensorrt?\r\n\r\n## Environment\r\n\r\n - PyTorch Version (e.g., 1.0): any\r\n - CPU Architecture:\r\n - OS (e.g., Linux): Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.8 or 3.9\r\n - CUDA version: 11.6\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1156",
    "state": "closed",
    "labels": [
      "question",
      "component: dependencies"
    ],
    "created_at": "2022-07-01T11:41:24Z",
    "updated_at": "2022-08-12T03:16:44Z",
    "user": "alercelik"
  },
  {
    "repo": "pytorch/data",
    "number": 564,
    "title": "[RFC] Restricting `IterDataPipe` to have method `__iter__` as a generator function without method `__next__`",
    "body": "### \ud83d\ude80 The feature\r\n\r\n** Note that this is a RFC to solely discuss the design. There is currently no plan to implement this feature. This issue serves as a developer documentation of the current design and the complexity/issue that we encounter with certain aspects of `IterDataPipe`. It also provides a space to discuss what we can potentially do.\r\n\r\nThe overarching goal is to simplify certain aspects of `IterDataPipe` while providing flexibility for users.\r\n\r\nThe proposed feature is to restrict `IterDataPipe`, such that it must have a method `__iter__` that is a generator function and it cannot have the method `__next__`. All built-in `IterDataPipe` is already implemented that way, so this will only impact custom `IterDataPipe` that users create.\r\n\r\nAlternate solutions are also discussed below. We welcome suggestions as well!\r\n\r\n### Motivation, pitch\r\n\r\nFor context, currently, there are 3 main types of `IterDataPipe` that is allowed. The ones with:\r\n1. `__iter__` is a generator function (e.g. use `yield`)\r\n2. `__iter__` that returns an iterator but is not a generator function\r\n3. `__iter__` returns `self` and a `__next__` method exists\r\n\r\nNote that it is possible for users to have `__next__` but not have `__iter__` returning `self`, but that is not recommended and have unexpected behaviors. All built-in DataPipes belong to type 1.\r\n\r\nThe fact that there are 3 types of `IterDataPipe` makes the implementation of [`hook_iterator`](https://github.com/pytorch/pytorch/blob/master/torch/utils/data/datapipes/_hook_iterator.py) very complicated.\r\n\r\nThe hook is called every time `__iter__` of an `IterDataPipe` is invoked. The hook tries to do a few things:\r\n* Enforce the single iterator per `IterDataPipe` constraint (seeoperations to related to `valid_iterator_id`) and reset the DataPipe as needed\r\n* Count the number of elements yielded\r\n* Allow performance profiling of operations\r\n\r\nThe fact that there is no restriction on how users can implement `__iter__` and `__next__` for custom DataPipes means `hook_iterator` must be complicated in order to handle the many corner cases that can happen. As you can see, we have a long code block to manage the behavior of type 1, and have a custom class to manage the behavior of type 2 and 3. The behavior of the method `__next__` (type 3) is difficult to control and can lead to unexpected behaviors if users aren't careful.\r\n\r\nIf we are able to restrict `IterDataPipe`, the implementation of those functionalities within `hook_iterator` will be much cleaner at the cost of providing less flexibility for `IterDataPipe`. I believe users also will be less likely to run into errors if we have such restriction.\r\n\r\n### Alternatives\r\n\r\nSuggestion from @ejguan:\r\nCreate a class called `DataPipeIterator`, which contains `__self__` and `__next__`. `__iter__` from DataPipe always return a specific DataPipeIterator object. This might resolve the most of our problem.\r\n\r\n### Additional context\r\n\r\nSuch restriction will likely break some downstream usages. Whatever we do, we will proceed carefully.\r\n\r\nPerformance impact is also an aspect that we must consider as well.\r\n\r\nFeedback and suggestions are more than welcomed. Let us know if you have experienced issues while using `torchdata` or have a bad experience while implementing new features.",
    "url": "https://github.com/meta-pytorch/data/issues/564",
    "state": "open",
    "labels": [],
    "created_at": "2022-06-30T20:39:17Z",
    "updated_at": "2022-06-30T20:41:30Z",
    "comments": 0,
    "user": "NivekT"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4603,
    "title": "CI fails recurrently and randomly on Windows",
    "body": "As reported by @lhoestq,\r\n\r\nThe windows CI is currently flaky: some dependencies like `aiobotocore`, `multiprocess` and `seqeval` sometimes fail to install.\r\nIn particular it seems that building the wheels fail. Here is an example of logs:\r\n\r\n```\r\nBuilding wheel for seqeval (setup.py): started\r\n  Running command 'C:\\tools\\miniconda3\\envs\\py37\\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '\"'\"'C:\\\\Users\\\\circleci\\\\AppData\\\\Local\\\\Temp\\\\pip-install-h55pfgbv\\\\seqeval_d6cdb9d23ff6490b98b6c4bcaecb516e\\\\setup.py'\"'\"'; __file__='\"'\"'C:\\\\Users\\\\circleci\\\\AppData\\\\Local\\\\Temp\\\\pip-install-h55pfgbv\\\\seqeval_d6cdb9d23ff6490b98b6c4bcaecb516e\\\\setup.py'\"'\"';f = getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__) if os.path.exists(__file__) else io.StringIO('\"'\"'from setuptools import setup; setup()'\"'\"');code = f.read().replace('\"'\"'\\r\\n'\"'\"', '\"'\"'\\n'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' bdist_wheel -d 'C:\\Users\\circleci\\AppData\\Local\\Temp\\pip-wheel-x3cc8ym6'\r\n  No parent package detected, impossible to derive `name`\r\n  running bdist_wheel\r\n  running build\r\n  running build_py\r\n  package init file 'seqeval\\__init__.py' not found (or not a regular file)\r\n  package init file 'seqeval\\metrics\\__init__.py' not found (or not a regular file)\r\n  C:\\tools\\miniconda3\\envs\\py37\\lib\\site-packages\\setuptools\\command\\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.\r\n    setuptools.SetuptoolsDeprecationWarning,\r\n  installing to build\\bdist.win-amd64\\wheel\r\n  running install\r\n  running install_lib\r\n  warning: install_lib: 'build\\lib' does not exist -- no Python modules to install\r\n\r\n  running install_egg_info\r\n  running egg_info\r\n  creating UNKNOWN.egg-info\r\n  writing UNKNOWN.egg-info\\PKG-INFO\r\n  writing dependency_links to UNKNOWN.egg-info\\dependency_links.txt\r\n  writing top-level names to UNKNOWN.egg-info\\top_level.txt\r\n  writing manifest file 'UNKNOWN.egg-info\\SOURCES.txt'\r\n  reading manifest file 'UNKNOWN.egg-info\\SOURCES.txt'\r\n  writing manifest file 'UNKNOWN.egg-info\\SOURCES.txt'\r\n  Copying UNKNOWN.egg-info to build\\bdist.win-amd64\\wheel\\.\\UNKNOWN-0.0.0-py3.7.egg-info\r\n  running install_scripts\r\n  creating build\\bdist.win-amd64\\wheel\\UNKNOWN-0.0.0.dist-info\\WHEEL\r\n  creating 'C:\\Users\\circleci\\AppData\\Local\\Temp\\pip-wheel-x3cc8ym6\\UNKNOWN-0.0.0-py3-none-any.whl' and adding 'build\\bdist.win-amd64\\wheel' to it\r\n  adding 'UNKNOWN-0.0.0.dist-info/METADATA'\r\n  adding 'UNKNOWN-0.0.0.dist-info/WHEEL'\r\n  adding 'UNKNOWN-0.0.0.dist-info/top_level.txt'\r\n  adding 'UNKNOWN-0.0.0.dist-info/RECORD'\r\n  removing build\\bdist.win-amd64\\wheel\r\n  Building wheel for seqeval (setup.py): finished with status 'done'\r\n  Created wheel for seqeval: filename=UNKNOWN-0.0.0-py3-none-any.whl size=963 sha256=67eb93a6e1ff4796c5882a13f9fa25bb0d3d103796e2525f9cecf3b2ef26d4b1\r\n  Stored in directory: c:\\users\\circleci\\appdata\\local\\pip\\cache\\wheels\\05\\96\\ee\\7cac4e74f3b19e3158dce26a20a1c86b3533c43ec72a549fd7\r\n  WARNING: Built wheel for seqeval is invalid: Wheel has unexpected file name: expected 'seqeval', got 'UNKNOWN'\r\n```",
    "url": "https://github.com/huggingface/datasets/issues/4603",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-06-30T10:59:58Z",
    "updated_at": "2022-06-30T13:22:25Z",
    "comments": 0,
    "user": "albertvillanova"
  },
  {
    "repo": "pytorch/vision",
    "number": 6221,
    "title": "Customize FasterRCNN",
    "body": "Hi,\r\n\r\nI've been trying, unsuccessfully to customize a bit the implementation of FasterRCNN proposed by torchvision. For example, one thing I would like to do, would be to write a customized [postprocess_detections ](https://github.com/pytorch/vision/blob/87cde716b7f108f3db7b86047596ebfad1b88380/torchvision/models/detection/roi_heads.py#L668) function that return confidence for all labels and not only the one with highest confidence.\r\n\r\nIn the past I've managed to successfully overwrite the loss function by doing something like \r\n```\r\nmodel = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_fpn(pretrained=True)\r\ntorchvision.models.detection.roi_heads.fastrcnn_loss = custom_loss\r\n```\r\n\r\nBut the postprocess_detections function is within the RoIHeads class. If I try to replace the RoIHead class before defining my model I get this error:\r\n```\r\ntorchvision.models.detection.roi_heads.RoIHeads = RoIHeadsCustom\r\nmodel = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_fpn(\r\n    pretrained=True\r\n)\r\n```\r\n\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"test2.py\", line 80, in <module>\r\n    model = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_fpn(\r\n  File \"/home/paul/.local/lib/python3.8/site-packages/torchvision/models/detection/faster_rcnn.py\", line 470, in fasterrcnn_mobilenet_v3_large_fpn\r\n    return _fasterrcnn_mobilenet_v3_large_fpn(weights_name, pretrained=pretrained, progress=progress,\r\n  File \"/home/paul/.local/lib/python3.8/site-packages/torchvision/models/detection/faster_rcnn.py\", line 393, in _fasterrcnn_mobilenet_v3_large_fpn\r\n    model = FasterRCNN(backbone, num_classes, rpn_anchor_generator=AnchorGenerator(anchor_sizes, aspect_ratios),\r\n  File \"/home/paul/.local/lib/python3.8/site-packages/torchvision/models/detection/faster_rcnn.py\", line 222, in __init__\r\n    roi_heads = RoIHeads(\r\n  File \"/home/paul/.local/lib/python3.8/site-packages/torchvision/models/detection/roi_heads.py\", line 512, in __init__\r\n    super(RoIHeads, self).__init__()\r\nTypeError: super(type, obj): obj must be an instance or subtype of type\r\n```\r\n\r\n\r\nBut if I define it afterwards, the object is already created and the custom class is not taken into account\r\n```\r\nmodel = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_fpn(\r\n    pretrained=True\r\n)\r\ntorchvision.models.detection.roi_heads.RoIHeads = RoIHeadsCustom\r\n```\r\n\r\nIf anyone has some ideas on how to easily customize torchvision models that would be a great help. The only solution I'm seeing is creating a fork of torchvision, which I'd rather avoid.\r\nThanks.\n\ncc @datumbox @YosuaMichael",
    "url": "https://github.com/pytorch/vision/issues/6221",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2022-06-30T09:40:50Z",
    "updated_at": "2022-07-06T14:15:49Z",
    "user": "paullixo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 430,
    "title": "Shuffle the rows?",
    "body": "see https://github.com/huggingface/moon-landing/issues/3375",
    "url": "https://github.com/huggingface/dataset-viewer/issues/430",
    "state": "closed",
    "labels": [
      "question",
      "feature request",
      "P2"
    ],
    "created_at": "2022-06-30T08:31:20Z",
    "updated_at": "2023-09-08T13:41:42Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1150,
    "title": "\u2753 [Question] The same inputs producing very different outputs via pytorch & TensorRT.",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nHey, guys!\r\nI'm new to TensorRT, after the environment setup. I'm very excited to try the official demo in this page. [Resnet50-example.](https://pytorch.org/TensorRT/_notebooks/Resnet50-example.html). I got very different outputs when inference with the same inputs via pytorch & TensorRT.\r\nBut when I use efficientnet_b3 as the model, the results are same.\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version: 1.11.0+cu113\r\n - TensorRT Version: 8.4.1.5\r\n - torch_tensorrt. Version: 1.1.0\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Ubuntu 20.04.2 LTS\r\n - How you installed PyTorch : pip\r\n - How you installed TensorRT: pip\r\n - Are you using local sources or building from archives: No\r\n - Python version: 3.8.8\r\n - CUDA version: 11.4 \r\n - GPU models and configuration: NVIDIA GeForce RTX 3090\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\nHere is my model convert code from PyTorch to TensorRT\r\n```python\r\nimport time\r\nimport numpy as np\r\nimport torch\r\ntorch.manual_seed(1989)\r\nimport tensorrt\r\nimport torch_tensorrt\r\nfrom torchvision import models\r\n\r\n\r\n\r\nif __name__ == '__main__':\r\n    # 1 get pytorch model\r\n    model = models.resnet50(pretrained=False)\r\n    #model = models.efficientnet_b3(pretrained=False)\r\n    model = model.eval().to('cuda')\r\n\r\n    # 2 conver to tensorrt model\r\n    input_shape=(1,3,224,224)\r\n    ts_model = torch.jit.script(model)\r\n    trt_model = torch_tensorrt.compile(\r\n        model, \r\n        inputs=[torch_tensorrt.Input(input_shape, dtype=torch.float32)],\r\n        enabled_precisions = torch.float32,\r\n        workspace_size = 1 << 22\r\n        )\r\n    print('Convert over.')\r\n    #torch.jit.save(trt_model, 'trt_model.pt')\r\n    #trt_model = torch.jit.load('trt_model.pt')\r\n\r\n    # 3 check speedup\r\n    inputs = torch.randn(input_shape).to('cuda')\r\n    benchmark(model, inputs, dtype='fp32')\r\n    benchmark(ts_model, inputs, dtype='fp32')\r\n    benchmark(trt_model, inputs, dtype='fp32')\r\n```\r\n\r\nAnd here is the benchmark function for the same inputs.\r\n```python\r\ndef benchmark(model, inputs, dtype='fp32', nwarmup=50, nruns=3000):\r\n    model.eval()\r\n    if dtype=='fp16':\r\n        inputs = inputs.half()\r\n        \r\n    print(\"Warm up ...\")\r\n    with torch.no_grad():\r\n        for _ in range(nwarmup):\r\n            outputs = model(inputs)\r\n    torch.cuda.synchronize()\r\n    print(\"Start timing ...\")\r\n    timings = []\r\n    with torch.no_grad():\r\n        for i in range(1, nruns+1):\r\n            start_time = time.time()\r\n            outputs  = model(inputs)\r\n            torch.cuda.synchronize()\r\n            end_time = time.time()\r\n            timings.append(end_time - start_time)\r\n            if i%1000==0:\r\n                print('Iteration %d/%d, avg batch time %.2f ms'%(i, nruns, np.mean(timings)*1000))\r\n    print(outputs[0][:8])\r\n```\r\n\r\nAnd here are the strange outputs that I got. \ud83e\udd2f\r\n\r\nFor efficientnet_b3\r\n>WARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT was linked against cuDNN 8.4.1 but loaded cuDNN 8.4.0\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT was linked against cuDNN 8.4.1 but loaded cuDNN 8.4.0\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - The getMaxBatchSize() function should not be used with an engine built from a network created with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag. This function will always return 1.\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - The getMaxBatchSize() function should not be used with an engine built from a network created with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag. This function will always return 1.\r\nWARNING: [Torch-TensorRT] - TensorRT was linked against cuDNN 8.4.1 but loaded cuDNN 8.4.0\r\nWARNING: [Torch-TensorRT] - TensorRT was linked against cuDNN 8.4.1 but loaded cuDNN 8.4.0\r\nConvert over.\r\nWarm up ...\r\nStart timing ...\r\nIteration 1000/3000, avg batch time 10.76 ms\r\nIteration 2000/3000, avg batch time 10.75 ms\r\nIteration 3000/3000, avg batch time 10.75 ms\r\ntensor([ 2.5864e-15, -2.6358e-15,  4.9805e-15,  6.8343e-15,  3.6509e-16,\r\n         1.3975e-15,  1.7666e-15, -2.6696e-15], device='cuda:0')\r\nWarm up ...\r\nStart timing ...\r\nIteration 1000/3000, avg batch time 6.92 ms\r\nIteration 2000/3000, avg batch time 6.92 ms\r\nIteration 3000/3000, avg batch time 6.92 ms\r\ntensor([ 2.5864e-15, -2.6358e-15,  4.9805e-15,  6.8343e-15,  3.6509e-16,\r\n         1.3975e-15,  1.7666e-15, -2.6696e-15], device='cuda:0')\r\nWarm up ...\r\nStart timing ...\r\nIteration 1000/3000, avg batch time 0.59 ms\r\nIteration 2000/3000, avg batch time 0.59 ms\r\nIteration 3000/3000, avg batch time 0.59 ms\r\ntensor([ 2.5864e-15, -2.6358e-15,  4.9805e-15,  6.8343e-15,  3.6509e-16,\r\n         1.3975e-15,  1.7666e-15, -2.6696e-15], devic",
    "url": "https://github.com/pytorch/TensorRT/issues/1150",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "No Activity",
      "performance"
    ],
    "created_at": "2022-06-29T10:10:01Z",
    "updated_at": "2023-03-26T00:02:20Z",
    "user": "Amoko"
  },
  {
    "repo": "pytorch/vision",
    "number": 6216,
    "title": "EfficientNet_v2 models not loading through torchvision",
    "body": "### \ud83d\udc1b Describe the bug\n\nI am trying to train efficient_v2 classification models on custom dataset  using \r\n[this script](https://github.com/pytorch/vision/tree/f75272fa704452a1d9405126c3a09e2d7432d489/references/classification)\r\nI used following command \r\n```\r\npython3 train.py --model efficientnet_v2 --batch-size 128 --lr 0.5 --lr-scheduler cosineanne\r\nalinglr --lr-warmup-epochs 5 --lr-warmup-method linear --auto-augment ta_wide --epochs 600 --random-erase 0.1 --label-smoothing 0.1 --mixup-alpha 0.2 --cutmix-alpha 1.0 --w\r\neight-decay 0.00002 --norm-weight-decay 0.0 --train-crop-size 384 --model-ema --val-crop-size 480 --val-resize-size 480\r\n```\r\n\r\nI get following error\r\n```\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 501, in <module>\r\n    main(args)\r\n  File \"train.py\", line 224, in main\r\n    model = torchvision.models.__dict__[args.model](weights=args.weights, num_classes=num_classes)\r\nKeyError: 'efficientnet_v2'\r\n```\r\n\r\n\n\n### Versions\n\nCollecting environment information...\r\nPyTorch version: 1.10.0+cu102\r\nIs debug build: False\r\nCUDA used to build PyTorch: 10.2\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 20.04.3 LTS (x86_64)\r\nGCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0\r\nClang version: 10.0.0-4ubuntu1 \r\nCMake version: version 3.19.4\r\nLibc version: glibc-2.31\r\n\r\nPython version: 3.8.10 (default, Mar 15 2022, 12:22:08)  [GCC 9.4.0] (64-bit runtime)\r\nPython platform: Linux-5.4.0-1030-aws-x86_64-with-glibc2.29\r\nIs CUDA available: True\r\nCUDA runtime version: 11.5.119\r\nGPU models and configuration: GPU 0: Tesla T4\r\nNvidia driver version: 510.73.05\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.3.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.3.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.3.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.3.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.3.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.3.2\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.3.2\r\n/usr/local/cuda-11.5/targets/x86_64-linux/lib/libcudnn.so.8.3.1\r\n/usr/local/cuda-11.5/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8.3.1\r\n/usr/local/cuda-11.5/targets/x86_64-linux/lib/libcudnn_adv_train.so.8.3.1\r\n/usr/local/cuda-11.5/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8.3.1\r\n/usr/local/cuda-11.5/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8.3.1\r\n/usr/local/cuda-11.5/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8.3.1\r\n/usr/local/cuda-11.5/targets/x86_64-linux/lib/libcudnn_ops_train.so.8.3.1\r\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn.so.8.3.1\r\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8.3.1\r\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn_adv_train.so.8.3.1\r\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8.3.1\r\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8.3.1\r\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8.3.1\r\n/usr/local/cuda/targets/x86_64-linux/lib/libcudnn_ops_train.so.8.3.1\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] mypy-extensions==0.4.3\r\n[pip3] numpy==1.20.0\r\n[pip3] torch==1.10.0\r\n[pip3] torchaudio==0.8.0\r\n[pip3] torchvision==0.11.1\r\n[conda] Could not collect\n\ncc @datumbox",
    "url": "https://github.com/pytorch/vision/issues/6216",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2022-06-29T09:12:09Z",
    "updated_at": "2022-06-29T11:09:27Z",
    "user": "suyashhchougule"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4591,
    "title": "Can't push Images to hub with manual Dataset",
    "body": "## Describe the bug\r\n\r\nIf I create a dataset including an 'Image' feature manually, when pushing to hub decoded images are not pushed, \r\ninstead it looks for image where image local path is/used to be.\r\nThis doesn't (at least didn't used to) happen with imagefolder. I want to build dataset manually because it is complicated.\r\n\r\nThis happens even though the dataset is looking like decoded images:\r\n![image](https://user-images.githubusercontent.com/15624271/176322689-2cc819cf-9d5c-4a8f-9f3d-83ae8ec06f20.png)\r\nand I use `embed_external_files=True` while `push_to_hub` (same with false)\r\n## Steps to reproduce the bug\r\n```python\r\n\r\nfrom PIL import Image\r\nfrom datasets import Image as ImageFeature\r\nfrom datasets import Features,Dataset\r\n#manually create dataset\r\nfeats=Features(\r\n    {\r\n        \"images\": [ImageFeature()], #same even if explicitly ImageFeature(decode=True)\r\n        \"input_image\": ImageFeature(),\r\n    }\r\n)\r\n\r\ntest_data={\"images\":[[Image.open(\"test.jpg\"),Image.open(\"test.jpg\"),Image.open(\"test.jpg\")]], \"input_image\":[Image.open(\"test.jpg\")]}\r\ntest_dataset=Dataset.from_dict(test_data,features=feats)\r\nprint(test_dataset)\r\n\r\ntest_dataset.push_to_hub(\"ceyda/image_test_public\",private=False,token=\"\",embed_external_files=True)\r\n\r\n# clear cache rm -r ~/.cache/huggingface\r\n# remove \"test.jpg\" # remove to see that it is looking for image on the local path\r\n\r\ntest_dataset=load_dataset(\"ceyda/image_test_public\",use_auth_token=\"\")\r\nprint(test_dataset)\r\nprint(test_dataset['train'][0])\r\n```\r\n\r\n## Expected results\r\nshould be able to push image bytes if dataset has `Image(decode=True)`\r\n\r\n## Actual results\r\n\r\nerrors because it is trying to decode file from the non existing local path.\r\n```\r\n---->  print(test_dataset['train'][0])\r\n\r\nFile ~/.local/lib/python3.8/site-packages/datasets/arrow_dataset.py:2154, in Dataset.__getitem__(self, key)\r\n   2152 def __getitem__(self, key):  # noqa: F811\r\n   2153     \"\"\"Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).\"\"\"\r\n-> 2154     return self._getitem(\r\n   2155         key,\r\n   2156     )\r\n\r\nFile ~/.local/lib/python3.8/site-packages/datasets/arrow_dataset.py:2139, in Dataset._getitem(self, key, decoded, **kwargs)\r\n   2137 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs)\r\n   2138 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)\r\n-> 2139 formatted_output = format_table(\r\n   2140     pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns\r\n   2141 )\r\n   2142 return formatted_output\r\n\r\nFile ~/.local/lib/python3.8/site-packages/datasets/formatting/formatting.py:532, in format_table(table, key, formatter, format_columns, output_all_columns)\r\n    530 python_formatter = PythonFormatter(features=None)\r\n    531 if format_columns is None:\r\n...\r\n-> 3068     fp = builtins.open(filename, \"rb\")\r\n   3069     exclusive_fp = True\r\n   3071 try:\r\n\r\nFileNotFoundError: [Errno 2] No such file or directory: 'test.jpg'\r\n```\r\n\r\n## Environment info\r\n- `datasets` version: 2.3.2\r\n- Platform: Linux-5.4.0-1074-azure-x86_64-with-glibc2.29\r\n- Python version: 3.8.10\r\n- PyArrow version: 8.0.0\r\n- Pandas version: 1.4.2\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4591",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-06-29T00:01:23Z",
    "updated_at": "2022-07-08T12:01:36Z",
    "comments": 1,
    "user": "cceyda"
  },
  {
    "repo": "pytorch/serve",
    "number": 1713,
    "title": "How to specify which gpu is to be used for serve? ",
    "body": "### \ud83d\ude80 The feature\r\n\r\n\r\n```console\r\n:~$ lspci | grep VGA\r\n0000:00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P Integrated Graphics Controller (rev 0c)\r\n0000:01:00.0 VGA compatible controller: NVIDIA Corporation GA103M [GeForce RTX 3080 Ti Mobile] (rev a1)\r\n:~$ glxinfo | egrep -i \"device|memory\"\r\n    Device: Mesa Intel(R) Graphics (ADL GT2) (0x46a6)\r\n    Video memory: 29872MB\r\n    Unified memory: yes\r\n    GL_AMD_performance_monitor, GL_AMD_pinned_memory, \r\n    GL_EXT_framebuffer_object, GL_EXT_framebuffer_sRGB, GL_EXT_memory_object, \r\n    GL_EXT_memory_object_fd, GL_EXT_packed_depth_stencil, GL_EXT_packed_float, \r\n    GL_AMD_pinned_memory, GL_AMD_query_buffer_object, \r\n    GL_EXT_gpu_program_parameters, GL_EXT_gpu_shader4, GL_EXT_memory_object, \r\n    GL_EXT_memory_object_fd, GL_EXT_multi_draw_arrays, \r\n    GL_EXT_memory_object, GL_EXT_memory_object_fd, GL_EXT_multi_draw_arrays, \r\n:~$ nvidia-smi\r\nCommand 'nvidia-smi' not found, but can be installed with:\r\nsudo apt install nvidia-utils-418-server  # version 418.226.00-0ubuntu4, or\r\nsudo apt install nvidia-utils-390         # version 390.151-0ubuntu0.22.04.1\r\nsudo apt install nvidia-utils-450-server  # version 450.191.01-0ubuntu0.22.04.1\r\nsudo apt install nvidia-utils-470         # version 470.129.06-0ubuntu0.22.04.1\r\nsudo apt install nvidia-utils-470-server  # version 470.129.06-0ubuntu0.22.04.1\r\nsudo apt install nvidia-utils-510         # version 510.73.05-0ubuntu0.22.04.1\r\nsudo apt install nvidia-utils-510-server  # version 510.73.08-0ubuntu0.22.04.1\r\n```\r\n\r\n### Motivation, pitch\r\n\r\nJust wanna **NVIDIA driver** for **torchserve** and the other one **Intel** for display if possible ???\r\n\r\n### Alternatives\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/1713",
    "state": "closed",
    "labels": [
      "triaged_wait",
      "support"
    ],
    "created_at": "2022-06-28T19:35:33Z",
    "updated_at": "2022-07-07T02:13:46Z",
    "user": "jiapei-nexera"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 423,
    "title": "Add terms of service to the API?",
    "body": "See https://swagger.io/specification/#info-object\r\n\r\nMaybe to mention a rate-limiter, if we implement one",
    "url": "https://github.com/huggingface/dataset-viewer/issues/423",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-06-28T11:27:16Z",
    "updated_at": "2022-09-16T17:30:38Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/vision",
    "number": 6206,
    "title": "Wrong for pytorch-nightly version",
    "body": "### \ud83d\udc1b Describe the bug\n\nThe wrong is below:\r\nTraceback (most recent call last):\r\n  File \"/home/hxj/PycharmProjects/ImageNetTrain/main.py\", line 9, in <module>\r\n    weights = P.models.ResNet50_Weights.IMAGENET1K_V1\r\nAttributeError: module 'torchvision.prototype.models' has no attribute 'ResNet50_Weights'\n\n### Versions\n\npytorch-nightly 1.13\n\ncc @datumbox",
    "url": "https://github.com/pytorch/vision/issues/6206",
    "state": "open",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2022-06-27T08:44:00Z",
    "updated_at": "2022-06-27T08:55:49Z",
    "user": "wwwsent"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4571,
    "title": "move under the facebook org?",
    "body": "### Link\n\nhttps://huggingface.co/datasets/gsarti/flores_101\n\n### Description\n\nIt seems like streaming isn't supported for this dataset:\r\n\r\n```\r\nServer Error\r\nStatus code:   400\r\nException:     NotImplementedError\r\nMessage:       Extraction protocol for TAR archives like 'https://dl.fbaipublicfiles.com/flores101/dataset/flores101_dataset.tar.gz' is not implemented in streaming mode. Please use `dl_manager.iter_archive` instead.\r\n```\n\n### Owner\n\nNo",
    "url": "https://github.com/huggingface/datasets/issues/4571",
    "state": "open",
    "labels": [],
    "created_at": "2022-06-26T11:19:09Z",
    "updated_at": "2023-09-25T12:05:18Z",
    "comments": 3,
    "user": "lewtun"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4570,
    "title": "Dataset sharding non-contiguous?",
    "body": "## Describe the bug\r\nI'm not sure if this is a bug; more likely normal behavior but i wanted to double check.\r\nIs it normal that `datasets.shard` does not produce chunks that, when concatenated produce the original ordering of the sharded dataset? \r\n\r\nThis might be related to this pull request (https://github.com/huggingface/datasets/pull/4466) but I have to admit I did not properly look into the changes made.\r\n\r\n## Steps to reproduce the bug\r\n```python\r\nmax_shard_size = convert_file_size_to_int('300MB')\r\ndataset_nbytes = dataset.data.nbytes\r\nnum_shards = int(dataset_nbytes / max_shard_size) + 1\r\nnum_shards = max(num_shards, 1)\r\nprint(f\"{num_shards=}\")\r\nfor shard_index in range(num_shards):\r\n    shard = dataset.shard(num_shards=num_shards, index=shard_index)\r\n    shard.to_parquet(f\"tokenized/tokenized-{shard_index:03d}.parquet\")\r\nos.listdir('tokenized/')\r\n```\r\n\r\n## Expected results\r\nI expected the shards to match the order of the data of the original dataset; i.e. `dataset[10]` being the same as `shard_1[10]` for example\r\n\r\n## Actual results\r\nOnly the first element is the same; i.e. `dataset[0]` is the same as `shard_1[0]`\r\n\r\n## Environment info\r\n<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->\r\n- `datasets` version: 2.3.2\r\n- Platform: Linux-4.15.0-176-generic-x86_64-with-glibc2.31\r\n- Python version: 3.10.4\r\n- PyArrow version: 8.0.0\r\n- Pandas version: 1.4.2\r\n\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4570",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-06-26T08:34:05Z",
    "updated_at": "2022-06-30T11:00:47Z",
    "comments": 5,
    "user": "cakiki"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4569,
    "title": "Dataset Viewer issue for sst2",
    "body": "### Link\r\n\r\nhttps://huggingface.co/datasets/sst2\r\n\r\n### Description\r\n\r\nNot sure what is causing this, however it seems that `load_dataset(\"sst2\")` also hangs (even though it downloads the files without problem):\r\n\r\n```\r\nStatus code:   400\r\nException:     Exception\r\nMessage:       Give up after 5 attempts with ConnectionError\r\n```\r\n\r\n### Owner\r\n\r\nNo",
    "url": "https://github.com/huggingface/datasets/issues/4569",
    "state": "closed",
    "labels": [
      "dataset-viewer"
    ],
    "created_at": "2022-06-26T07:32:54Z",
    "updated_at": "2022-06-27T06:37:48Z",
    "comments": 2,
    "user": "lewtun"
  },
  {
    "repo": "pytorch/data",
    "number": 550,
    "title": "DataLoader2 should reset when a new iterator is created?",
    "body": "When a new iterator is created, `DataLoader2` currently resumes from when it was left off rather than resetting and starting from the beginning again (see code snippet below). This is divergent from the behavior of the original `DataLoader`. Users likely expect the latter behavior and we should properly reset the state of `DataLoader2` when a new iterator is created.\r\n\r\n```python\r\nfrom torchdata.dataloader2 import DataLoader2\r\nfrom torchdata.datapipes.iter import IterableWrapper\r\n\r\n\r\ndl = DataLoader2(IterableWrapper(range(10)))\r\n\r\nfor i in iter(dl):\r\n    print(i)\r\n    if i == 4:\r\n        print('--------------')\r\n        break\r\n\r\nfor i in iter(dl):\r\n    print(i)\r\n```\r\n\r\ncc: @VitalyFedyunin ",
    "url": "https://github.com/meta-pytorch/data/issues/550",
    "state": "closed",
    "labels": [],
    "created_at": "2022-06-24T18:19:09Z",
    "updated_at": "2022-08-26T21:02:39Z",
    "comments": 1,
    "user": "NivekT"
  },
  {
    "repo": "pytorch/data",
    "number": 549,
    "title": "DataLoader2.__len__() ?",
    "body": "This is somewhat related to https://github.com/pytorch/data/issues/533\r\n\r\nAs described in https://github.com/pytorch/data/issues/533#issuecomment-1163381945, we like to check the `len()` of the DataLoader in torchvision in our logging utils.\r\n\r\nAre there plans to implement `__len__()` on `DataLoader2`?",
    "url": "https://github.com/meta-pytorch/data/issues/549",
    "state": "open",
    "labels": [],
    "created_at": "2022-06-24T17:10:39Z",
    "updated_at": "2022-07-06T19:21:39Z",
    "comments": 1,
    "user": "NicolasHug"
  },
  {
    "repo": "pytorch/data",
    "number": 538,
    "title": "Warn about pickle-ablity when using `dp.map(some_local_function)` ?",
    "body": "`torchdata` issues a warning about pickle when we use lambdas (which is great!)\r\nAnother kind of function that isn't compatible with pickle are local functions. Would it be possible to throw the same warning there?\r\n\r\n\r\n```py\r\nimport torchdata\r\nimport pickle\r\n\r\ndef make_dp():\r\n\r\n    def f(x):  # local function, not pickleable\r\n        return x\r\n\r\n    return torchdata.datapipes.iter.IterableWrapper(range(40)).map(f)\r\n\r\ndp = make_dp()  # no warning\r\n\r\nf = \"/tmp/dp\"\r\npickle.dump(dp, open(f, \"wb\"))  # fails\r\n```",
    "url": "https://github.com/meta-pytorch/data/issues/538",
    "state": "closed",
    "labels": [],
    "created_at": "2022-06-23T13:02:33Z",
    "updated_at": "2022-06-27T21:48:29Z",
    "comments": 1,
    "user": "NicolasHug"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 416,
    "title": "Remove the Kubernetes CPU \"limits\"?",
    "body": "https://github.com/robusta-dev/alert-explanations/wiki/CPUThrottlingHigh-%28Prometheus-Alert%29#why-you-dont-need-cpu-limits\r\n\r\n> ## Why you don't need CPU limits\r\n> \r\n> As long as your pod has a CPU request, [Kubernetes maintainers like Tim Hockin recommend not using limits at all](https://twitter.com/thockin/status/1134193838841401345). This way pods are free to use spare CPU instead of letting the CPU stay idle.\r\n> \r\n> Contrary to common belief, [even if you remove this pod's CPU limit, other pods are still guaranteed the CPU they requested](https://github.com/kubernetes/design-proposals-archive/blob/8da1442ea29adccea40693357d04727127e045ed/node/resource-qos.md#compressible-resource-guaranteess). The CPU limit only effects how spare CPU is distributed.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/416",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-06-23T12:26:39Z",
    "updated_at": "2022-07-22T13:15:41Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 415,
    "title": "Expose an endpoint with the column types/modalities of each dataset?",
    "body": "It could be used on the Hub to find all the \"images\" or \"audio\" datasets.\r\n\r\nBy the way, the info is normally already in the datasets-info.json (.features)",
    "url": "https://github.com/huggingface/dataset-viewer/issues/415",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-06-23T10:36:01Z",
    "updated_at": "2022-09-16T17:32:45Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/data",
    "number": 533,
    "title": "`len(dataloader)` in distributed setting is different with datapipes and with map-style datasets",
    "body": "In a distributed setting, `len(dataloader)` will return:\r\n\r\n-  `len(dataset) // (batch_size * num_GPUs)` if `dataset` is a map-style dataset\r\n- `len(dataset) // batch_size` if `dataset` is a datapipe\r\n\r\nThis discrepancy makes it a bit difficult to work with torchvision's training recipes, where we often need the size of the dataloader.\r\n\r\nBelow is an illustration of this discrepancy - you can run the snippet (even without a GPU) with `torchrun --nproc_per_node 4 script.py`\r\n\r\n```py\r\n# Run this with e.g. `torchrun --nproc_per_node 4 script.py`\r\nimport torch.utils.data as data\r\nimport torch.distributed as dist\r\nimport torchdata\r\n\r\n\r\ndef replace_print():\r\n    import builtins as __builtin__\r\n    builtin_print = __builtin__.print\r\n    def print(*args, **kwargs):\r\n        if dist.get_rank() == 0:\r\n            builtin_print(f\"[GPU 0]\", *args, **kwargs)\r\n\r\n    __builtin__.print = print\r\n\r\n\r\n# Setting up DDP - you can ignore this\r\ndist.init_process_group(backend=\"gloo\")\r\nreplace_print()\r\ndist.barrier()\r\n\r\n\r\nsize = 800\r\ndp = torchdata.datapipes.iter.IterableWrapper(range(size)).sharding_filter()\r\ndl = data.DataLoader(dp, batch_size=10, num_workers=4, drop_last=True)\r\nprint(f\"with dp, {len(dl) = }\")\r\n# Gives : 80\r\n\r\nds = list(range(size))\r\ndl = data.DataLoader(ds, batch_size=10, num_workers=4, drop_last=True, sampler=data.DistributedSampler(ds, shuffle=False))\r\nprint(f\"with mapstyle, {len(dl) = }\")\r\n# Gives: 20\r\n\r\n```",
    "url": "https://github.com/meta-pytorch/data/issues/533",
    "state": "open",
    "labels": [],
    "created_at": "2022-06-22T16:32:01Z",
    "updated_at": "2022-06-22T16:57:09Z",
    "comments": 2,
    "user": "NicolasHug"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4542,
    "title": "[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?",
    "body": "To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory.\r\n\r\nIt seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset\r\n\r\nFeather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library.\r\n\r\nHere are a few points to explore\r\n- [ ] check the performance of ArrowFeatherDataset in tf.data\r\n- [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc.\r\n\r\nWe would also need to implement sharding when loading a dataset (this will be done anyway for #546)\r\n\r\ncc @Rocketknight1 @gante  feel free to comment in case I missed anything !\r\n\r\nI'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data",
    "url": "https://github.com/huggingface/datasets/issues/4542",
    "state": "open",
    "labels": [
      "generic discussion"
    ],
    "created_at": "2022-06-22T14:42:00Z",
    "updated_at": "2022-10-11T08:45:45Z",
    "comments": 48,
    "user": "lhoestq"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 413,
    "title": "URL design",
    "body": "Currently, the API is available at the root, ie: https://datasets-server.huggingface.co/rows?...\r\n\r\nThis can lead to some issues:\r\n- if we add other services, such as /doc or /search, the API will share the namespace with these other services. This means that we must take care of avoiding collisions between services and endpoints (I think it's OK), and that we cannot simply delegate a subroute to the `api` service (not really an issue either because we \"just\" have to treat all the other services first in the nginx config, then send the rest to the `api` service)\r\n- version: if we break the API one day, we might want to serve two versions of the API, namely v1 and v2. Notes: 1. it's better not to break the API, 2. if we create a v2 API, we can still namespace it under /v2/, so: not really an issue\r\n\r\nWhich one do you prefer?\r\n\r\n1. https://datasets-server.huggingface.co/  (current)\r\n2. https://datasets-server.huggingface.co/api/\r\n3. https://datasets-server.huggingface.co/api/v1/\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/413",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-06-22T07:13:24Z",
    "updated_at": "2022-06-28T08:48:02Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 80007,
    "title": "when forward use **kwargs\uff0chow to construct the example_ Inputs parameter in jit.trace?",
    "body": "### \ud83d\udc1b Describe the bug\n\nimport torch\r\n\r\nclass Model(nn.Module):\r\n    def forward(self, **kwargs):\r\n         # kwargs contains more than dozens of tensors\r\n         pass\r\n\r\nmodel = Model()\r\ntrace_model = torch.jit.trace(model, example_inputs=??)\n\n### Versions\n\nPyTorch version: 1.6.0+cu101\r\nIs debug build: False\r\nCUDA used to build PyTorch: 10.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 18.04.3 LTS (x86_64)\r\nGCC version: (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0\r\nClang version: Could not collect\r\nCMake version: version 3.10.2\r\nLibc version: glibc-2.26\r\n\r\nPython version: 3.7.5 (default, Nov  7 2019, 10:50:52)  [GCC 8.3.0] (64-bit runtime)\r\nPython platform: Linux-3.10.0-1.3.2.el7.x86_64-x86_64-with-Ubuntu-18.04-bionic\r\nIs CUDA available: True\r\nCUDA runtime version: 10.1.243\r\nGPU models and configuration: \r\nGPU 0: GeForce RTX 2080 Ti\r\nGPU 1: GeForce RTX 2080 Ti\r\n\r\nNvidia driver version: 440.44\r\ncuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.18.5\r\n[pip3] torch==1.6.0+cu101\r\n[pip3] torchvision==0.7.0+cu101\r\n[conda] blas                      1.0                         mkl  \r\n[conda] mkl                       2021.2.0           h06a4308_296  \r\n[conda] mkl-service               2.3.0            py38h27cfd23_1  \r\n[conda] mkl_fft                   1.3.0            py38h42c9631_2  \r\n[conda] mkl_random                1.2.1            py38ha9443f7_2  \r\n[conda] numpy                     1.20.1           py38h93e21f0_0  \r\n[conda] numpy-base                1.20.1           py38h7d8b39e_0  \r\n[conda] numpydoc                  1.1.0              pyhd3eb1b0_1",
    "url": "https://github.com/pytorch/pytorch/issues/80007",
    "state": "open",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2022-06-22T03:20:17Z",
    "updated_at": "2023-03-11T03:33:15Z",
    "user": "zyDotwei"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4538,
    "title": "Dataset Viewer issue for Pile of Law",
    "body": "### Link\r\n\r\nhttps://huggingface.co/datasets/pile-of-law/pile-of-law\r\n\r\n### Description\r\n\r\nHi, I would like to turn off the dataset viewer for our dataset without enabling access requests. To comply with upstream dataset creator requests/licenses, we would like to make sure that the data is not indexed by search engines and so would like to turn off dataset previews. But we do not want to collect user emails because it would violate single blind review, allowing us to deduce potential reviewers' identities. Is there a way that we can turn off the dataset viewer without collecting identity information?\r\n\r\nThanks so much! \r\n\r\n### Owner\r\n\r\nYes",
    "url": "https://github.com/huggingface/datasets/issues/4538",
    "state": "closed",
    "labels": [
      "dataset-viewer"
    ],
    "created_at": "2022-06-22T02:48:40Z",
    "updated_at": "2022-06-27T07:30:23Z",
    "comments": 5,
    "user": "Breakend"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1138,
    "title": "problem build in jetson nano jetpack4.6",
    "body": "## \u2753 Question\r\n\r\nHello\r\nI tried to compile the torch-tensorrt on the jetson nano I got this error \r\nsuggestions please\r\nThanks\r\n \r\n\r\nbazel build //:libtorchtrt --platforms //toolchains:jetpack_4.6 --verbose_failures\r\n\r\n\r\njetson@jetson-desktop:~/TensorRT$ bazel build //:libtorchtrt --platforms //toolchains:jetpack_4.6 --verbose_failures\r\nINFO: Analyzed target //:libtorchtrt (10 packages loaded, 2870 targets configured).\r\nINFO: Found 1 target...\r\nERROR: /home/jetson/TensorRT/core/lowering/BUILD:10:11: Compiling core/lowering/register_trt_placeholder_ops.cpp failed: (Exit 1): gcc failed: error executing command \r\n  (cd /home/jetson/.cache/bazel/_bazel_jetson/8770c998fbff2b8d5ee14d56a02ce872/sandbox/linux-sandbox/66/execroot/Torch-TensorRT && \\\r\n  exec env - \\\r\n    PATH=/home/jetson/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin \\\r\n    PWD=/proc/self/cwd \\\r\n  /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF bazel-out/aarch64-fastbuild/bin/core/lowering/_objs/lowering/register_trt_placeholder_ops.pic.d '-frandom-seed=bazel-out/aarch64-fastbuild/bin/core/lowering/_objs/lowering/register_trt_placeholder_ops.pic.o' -fPIC -iquote . -iquote bazel-out/aarch64-fastbuild/bin -iquote external/tensorrt -iquote bazel-out/aarch64-fastbuild/bin/external/tensorrt -iquote external/cuda -iquote bazel-out/aarch64-fastbuild/bin/external/cuda -iquote external/cudnn -iquote bazel-out/aarch64-fastbuild/bin/external/cudnn -iquote external/libtorch -iquote bazel-out/aarch64-fastbuild/bin/external/libtorch -Ibazel-out/aarch64-fastbuild/bin/external/libtorch/_virtual_includes/ATen -Ibazel-out/aarch64-fastbuild/bin/external/libtorch/_virtual_includes/c10_cuda -Ibazel-out/aarch64-fastbuild/bin/external/libtorch/_virtual_includes/c10 -isystem external/tensorrt/include/aarch64-linux-gnu -isystem bazel-out/aarch64-fastbuild/bin/external/tensorrt/include/aarch64-linux-gnu -isystem external/cuda/include -isystem bazel-out/aarch64-fastbuild/bin/external/cuda/include -isystem external/cudnn/include -isystem bazel-out/aarch64-fastbuild/bin/external/cudnn/include -isystem external/libtorch/include -isystem bazel-out/aarch64-fastbuild/bin/external/libtorch/include -isystem external/libtorch/include/torch/csrc/api/include -isystem bazel-out/aarch64-fastbuild/bin/external/libtorch/include/torch/csrc/api/include '-fdiagnostics-color=always' '-std=c++14' -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__=\"redacted\"' '-D__TIMESTAMP__=\"redacted\"' '-D__TIME__=\"redacted\"' -c core/lowering/register_trt_placeholder_ops.cpp -o bazel-out/aarch64-fastbuild/bin/core/lowering/_objs/lowering/register_trt_placeholder_ops.pic.o)\r\n# Configuration: 308cf0c0559d698e898984ad86ba68902429f53ed3b621b21d0881d53f6d42af\r\n# Execution platform: @local_config_platform//:host\r\n\r\nUse --sandbox_debug to see verbose messages from the sandbox\r\ncore/lowering/register_trt_placeholder_ops.cpp:16:34: error: invalid user-defined conversion from 'torch::jit::<lambda(torch::jit::Stack&)>' to 'torch::jit::OperationCreator {aka std::function<void(std::vector<c10::IValue>*)> (*)(const torch::jit::Node*)}' [-fpermissive]\r\n         aliasAnalysisFromSchema()),\r\n                                  ^\r\ncore/lowering/register_trt_placeholder_ops.cpp:15:24: note: candidate is: torch::jit::<lambda(torch::jit::Stack&)>::operator void (*)(torch::jit::Stack&)() const <near match>\r\n         [](Stack& stack) { /*noop*/ },\r\n                        ^\r\ncore/lowering/register_trt_placeholder_ops.cpp:15:24: note:   no known conversion from 'void (*)(torch::jit::Stack&) {aka void (*)(std::vector<c10::IValue>&)}' to 'torch::jit::OperationCreator {aka std::function<void(std::vector<c10::IValue>*)> (*)(const torch::jit::Node*)}'\r\nIn file included from external/libtorch/include/torch/csrc/jit/runtime/custom_operator.h:5:0,\r\n                 from core/lowering/register_trt_placeholder_ops.cpp:1:\r\nexternal/libtorch/include/torch/csrc/jit/runtime/operator.h:98:3: note:   initializing argument 2 of 'torch::jit::Operator::Operator(std::__cxx11::string, torch::jit::OperationCreator, c10::AliasAnalysisKind)'\r\n   Operator(\r\n   ^~~~~~~~\r\nTarget //:libtorchtrt failed to build\r\nINFO: Elapsed time: 115.163s, Critical Path: 73.60s\r\nINFO: 16 processes: 5 internal, 11 linux-sandbox.\r\nFAILED: Build did NOT complete successfully\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n    \r\n - PyTorch v1.8.0\r\n - Jetson nano\r\n - How you installed PyTorch ( `pip`):\r\n\r\n\r\n## Additional context\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1138",
    "state": "closed",
    "labels": [
      "question",
      "channel: linux-jetpack"
    ],
    "created_at": "2022-06-21T16:45:05Z",
    "updated_at": "2022-09-02T18:08:45Z",
    "user": "Sylia-C"
  },
  {
    "repo": "pytorch/functorch",
    "number": 892,
    "title": "Figure out how to get test coverage for more compositions of transforms",
    "body": "## Motivation\r\n\r\nCurrently, we only test the following compositions:\r\n- vmap\r\n- jvp\r\n- vjp\r\n- vmap x jvp\r\n- vmap x vjp\r\n- vjp x vjp\r\n- vjp x vmap\r\n\r\nThis has caught most of our bugs, but users still come to us with code that doesn't work due to it not being one of the above compositions. For example:\r\n- vmap x vmap can still error out even if just vmap works\r\n- vmap x vjp x vjp can error out if there is some backward operator (e.g. convolution_backward) that has a backward formula that is not composite compliant. Ditto for vmap x jvp x vjp.\r\n\r\n## The Ask\r\n\r\nFigure to get better test coverage for more compositions of transforms\r\n\r\n## Possibly related: OpInfos\r\n\r\nThis also is related to better OpInfo testing. OpInfos do not cover all aten operators. One way for us to really get good coverage using our existing tests is to add OpInfos for torch.ops.aten operations. For example, instead of checking the batching rule of torch.ops.aten.convolution_backward via a vmap x vjp test, it would be sufficient for us to just run a vmap test for torch.ops.aten.convolution_backward.\r\n\r\n",
    "url": "https://github.com/pytorch/functorch/issues/892",
    "state": "closed",
    "labels": [
      "actionable"
    ],
    "created_at": "2022-06-21T14:34:58Z",
    "updated_at": "2022-09-15T15:01:19Z",
    "user": "zou3519"
  },
  {
    "repo": "pytorch/serve",
    "number": 1701,
    "title": "curl 404 ResourceNotFoundException",
    "body": "Hello,\r\nI am stuck with an error that I am not sure what does it mean. \r\nwhen I do  `curl \"http://localhost:8080/models\"` I get : \r\n`{\r\n  \"code\": 404,\r\n  \"type\": \"ResourceNotFoundException\",\r\n  \"message\": \"Requested resource is not found, please refer to API document.\"\r\n}`\r\n\r\nI make an `.mar` file for my model with \r\n`\r\ntorch-model-archiver -f \\\r\n  --model-name=classifier \\\r\n  --version=1.0 \\\r\n  --serialized-file=pytorch_model.bin \\\r\n  --handler=custom_handler.py \\\r\n  --extra-files \"config.json,index_to_name.json,special_tokens_map.json,tokenizer_config.json,tokenizer.json,training_args.bin,vocab.txt\" \\\r\n  --export-path=model_store\r\n`\r\nAll of those files are stored in the same directory. \r\n\r\nWhen i run the serve `torchserve --start --model-store model_store --models classifier=classifier.mar` I dont get any error. normally when I do `curl \"http://localhost:8080/models\"` I will get my classifier but I instead I get that message.\r\n\r\nis there anything that I am missing here? or should I add something?\r\nI want to mention that I am using a handler (custom_handler.py) from [GoogleCloudPlatform](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/community-content/pytorch_text_classification_using_vertex_sdk_and_gcloud/pytorch-text-classification-vertex-ai-train-tune-deploy.ipynb). also, `curl localhost:8080/ping` give me `Healthy`\r\nThanks!",
    "url": "https://github.com/pytorch/serve/issues/1701",
    "state": "open",
    "labels": [
      "help wanted",
      "question"
    ],
    "created_at": "2022-06-21T14:15:31Z",
    "updated_at": "2023-01-31T16:04:09Z",
    "user": "ma-batita"
  },
  {
    "repo": "pytorch/serve",
    "number": 1699,
    "title": "How to properly understand MaxBatchDelay",
    "body": "From the documentation https://github.com/pytorch/serve/blob/master/docs/management_api.md#register-a-model\r\nThe parameter `maxBatchDelay` is the maximum delay for batch aggregation. It will wait this amount of time before aggregating all the requests (please correct me if I am wrong) into batches. Now, on the user side, if I set this number high, like 5000, then TorchServe will have enough time to receive possibly a large number of requests, then aggregates them. However, a large number like 5000 also means that the total time for the user to send requests and receive inference results will also be higher, and much higher if I set this number to 50. A user/client for sure wants to have as little time as possible before having the results, but setting maxBatchDelay low would also mean TorchServe wouldn't have enough time to aggregate. \r\n\r\nHow to properly understand this issue? Do I need a better metrics to measure the total time for the client, or should I set maxBatchDelay high? Or something else? ",
    "url": "https://github.com/pytorch/serve/issues/1699",
    "state": "closed",
    "labels": [
      "documentation",
      "benchmark"
    ],
    "created_at": "2022-06-20T19:01:44Z",
    "updated_at": "2023-08-18T02:53:37Z",
    "user": "Hegelim"
  },
  {
    "repo": "pytorch/serve",
    "number": 1698,
    "title": "Confused about Cumulative Inference Duration vs. PredictionTime",
    "body": "### \ud83d\udcda The doc issue\r\n\r\nI am running a model on TorchServe and I am trying to see how long it takes for inference. \r\nIf I use logging and view the logs, then I can see there is something called PredictionTime:\r\n![image](https://user-images.githubusercontent.com/55818214/174660754-3e3915a1-a3b6-4e28-9720-2bfd654f17b7.png)\r\n\r\nHowever, if I use the Metrics API, then I got something called \"Cumulative Inference Duration\"\r\n![image](https://user-images.githubusercontent.com/55818214/174660836-b4af8609-09ee-4ae7-ad8d-fdb7ab1aaf97.png)\r\n\r\nAnd in terms of values those 2 are very different. So I am not sure which one should I use to measure the total inference time for my requests? \r\n\r\nBtw, there is also something else called `HandlerTime` in the logs\r\n![image](https://user-images.githubusercontent.com/55818214/174662801-1fc649c9-37b5-44a6-9305-c0d8930cfedd.png)\r\n\r\nWhat does it mean? Where can I find related information about what are the meanings of these metrics? \r\n\r\nThanks, \r\n### Suggest a potential alternative/fix\r\n\r\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/1698",
    "state": "open",
    "labels": [
      "help wanted",
      "question"
    ],
    "created_at": "2022-06-20T18:35:03Z",
    "updated_at": "2022-07-08T18:50:45Z",
    "user": "Hegelim"
  },
  {
    "repo": "pytorch/data",
    "number": 523,
    "title": "Document how to create a DataLoader when reading data from S3",
    "body": "### \ud83d\udcda The doc issue\n\nI find the provided example [here](https://github.com/pytorch/data/blob/main/torchdata/datapipes/iter/load/README.md#example) a bit confusing. \r\n\r\n```\r\nfrom torchdata.datapipes.iter import S3FileLister, S3FileLoader\r\n\r\ns3_prefixes = ['s3://bucket-name/folder/', ...]\r\ndp_s3_urls = S3FileLister(s3_prefixes)\r\ndp_s3_files = S3FileLoader(s3_urls) # outputs in (url, StreamWrapper(BytesIO))\r\n# more datapipes to convert loaded bytes, e.g.\r\ndatapipe = StreamWrapper(dp_s3_files).parse_csv(delimiter=' ')\r\n\r\nfor d in datapipe: # Start loading data\r\n    pass\r\n```\r\n\r\nFirst, I think there is a mistake in the example: `s3_urls` should be `dp_s3_urls`?\r\nSecond, it is not clear why `parse_csv(delimiter=' ')` is being used.\r\nLast, I can't access my data after creating the `datapipe`. It would be great to have an example similar to [this one of the old plugin](https://github.com/aws/amazon-s3-plugin-for-pytorch/blob/master/examples/s3_cv_transform.py)\r\n\r\nI believe that an example of how to load a S3 folder containing images into a `torch.utils.data.DataLoader` would be very useful for new users (like me).\n\n### Suggest a potential alternative/fix\n\nProvide an example that starts with a S3 url of a folder with some images, and produce a dataloader with such images.",
    "url": "https://github.com/meta-pytorch/data/issues/523",
    "state": "closed",
    "labels": [],
    "created_at": "2022-06-20T15:52:53Z",
    "updated_at": "2022-06-23T00:17:12Z",
    "comments": 4,
    "user": "enric1994"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1136,
    "title": "\u2753 [Question] unable to save the model in TorchScript format? ",
    "body": "## \u2753 Question\r\nI'm trying to save my model as TorchScript format, unfortunately getting error.\r\n\r\n## What you have already tried\r\n```torch.jit.script(model)```\r\n\r\n## Environment\r\npython\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):1.11.0+cu113\r\n - CPU Architecture:\r\n - OS (e.g., Linux): ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:3.9.7\r\n - CUDA version:11.7\r\n - GPU models and configuration: RTX GEFORCE 2060\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\ncould you please help me save the model in TorchScript format\r\n@dignakov @narendasan @peri044 \r\n![Screenshot from 2022-06-20 11-29-31](https://user-images.githubusercontent.com/74839416/174584985-ca331c70-5a45-4811-860d-157878aa322b.png)\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1136",
    "state": "closed",
    "labels": [
      "question",
      "bug: triaged [not a bug]"
    ],
    "created_at": "2022-06-20T10:43:11Z",
    "updated_at": "2022-07-05T20:57:03Z",
    "user": "IamExperimenting"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1134,
    "title": "\u2753 [Question] Why TensorRT model is slower?",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nWhy TensorRT model is slower? I have tried TensorRT in a MHA (multihead attention) model, but found it is even slower than the jit scripted model.\r\n## What you have already tried\r\nI tested the original model, the jit scripted model, the jit model after optimization, and the TensorRT model. Then, I found the tensorrt model is not as fast as I expected. The model here is a simple MHA module modified from `fairseq` so it could pass the compilation.\r\n```py\r\nimport time\r\nimport tmp_attn\r\nimport torch\r\nimport tensorrt\r\nimport torch_tensorrt as torch_trt\r\n\r\n\r\ndef timer(m, i):\r\n    st = time.time()\r\n    for _ in range(10000):\r\n        m(i, i, i)\r\n    ed = time.time()\r\n    return ed - st\r\n\r\n\r\nt1 = torch.randn(64, 1, 1280, device=\"cuda:0\")\r\nmodel = tmp_attn.MultiheadAttention(1280, 8).to(\"cuda:0\")\r\nmodel2 = torch.jit.script(model)\r\nmodel3 = torch.jit.optimize_for_inference(model2)\r\nmodel4 = torch_trt.compile(model, inputs=[t1, t1, t1]).to(\"cuda:0\")\r\n\r\nprint(\"Original Model\", timer(model, t1))\r\nprint(\"Jit Script Model\", timer(model2, t1))\r\nprint(\"Jit Script Model after optimization\", timer(model3, t1))\r\nprint(\"TensorRT Model\", timer(model4, t1))\r\n```\r\n<!-- A clear and concise description of what you have already done. -->\r\nI ran these models 10000 times and record the spent time.\r\nThe output is:\r\nOriginal Model 5.6981117725372314\r\nJit Script Model 4.5694739818573\r\nJit Script Model after optimization 3.3332810401916504\r\nTensorRT Model 4.772718667984009\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.11.0\r\n - CPU Architecture: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz\r\n - OS (e.g., Linux): Linux, CentOS7\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): conda\r\n - Build command you used (if compiling from source): / \r\n - Are you using local sources or building from archives: No\r\n - Python version: 3.7\r\n - CUDA version: 11.7\r\n - GPU models and configuration:\r\n - TensorRT version: 8.2.5.1\r\n - Torch_tensorrt version: 1.1.0\r\n\r\n## Additional context\r\nThe code of MHA is here. \r\n`tmp_attn.py`\r\n\r\n\r\n[tmp_attn.py.zip](https://github.com/pytorch/TensorRT/files/8938221/tmp_attn.py.zip)\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1134",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "performance"
    ],
    "created_at": "2022-06-20T06:55:23Z",
    "updated_at": "2023-11-09T09:01:52Z",
    "user": "geekinglcq"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1133,
    "title": "\u2753 [Question] How to install torch_tensorrt python API in ubuntu 20.04? ",
    "body": "## \u2753 Question\r\n\r\nI want to install ```torch_tensorrt``` python API in ubuntu 20.04. could you please provide step by a step installation procedure? I tried \r\n```pip3 install torch-tensorrt -f https://github.com/NVIDIA/Torch-TensorRT/releases```\r\n\r\nwhen I try to import the module \r\n```import torch_tensorrt```\r\n\r\nI'm getting the below error,\r\n\r\n\r\n![Screenshot from 2022-06-19 15-41-46](https://user-images.githubusercontent.com/74839416/174486567-a3e92ba9-0636-49ed-ba2c-4d5ebfc2da22.png)\r\n\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.11.0\r\n - CPU Architecture:\r\n - OS (e.g., Linux): LINUX\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:no\r\n - Python version: 3.7.13\r\n - CUDA version: 11.3.1\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n@narendasan @peri044 \r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1133",
    "state": "closed",
    "labels": [
      "question",
      "component: build system",
      "component: packaging",
      "component: dependencies"
    ],
    "created_at": "2022-06-19T14:50:36Z",
    "updated_at": "2022-12-15T17:24:39Z",
    "user": "IamExperimenting"
  },
  {
    "repo": "pytorch/serve",
    "number": 1692,
    "title": "TorchServe How to Curl Multiple Images Properly",
    "body": "I am using TorchServe to potentially serve a model from MMOCR (https://github.com/open-mmlab/mmocr), and I have several questions:\r\n1. I tried to do inference on hundreds of images together using batch mode by using & to concatenate curl commands together, such as suggested here https://github.com/pytorch/serve/issues/1235#issuecomment-938231201. However, this doesn't provide a neat solution if I have hundreds of curls concatenated together. I can of course have a super long command that looks like \r\n```\r\ncurl -X POST http://localhost:8080/predictions/ABINet -T image1.png & curl -X POST http://localhost:8080/predictions/ABINet -T image2.png & curl -X POST http://localhost:8080/predictions/ABINet -T image3.png & curl -X POST http://localhost:8080/predictions/ABINet -T image4.png &... \r\n```\r\nBut I don't think this is the right way to go. \r\nMy questions are: is using & really parallel? What is a good/suggested way to do inference on hundreds of images? What is a Pythonic way to do this (maybe using requests/subprocess)? \r\n\r\n2. I used config.properties file that looks like below\r\n```\r\nInference address: http://127.0.0.1:8080\r\nManagement address: http://127.0.0.1:8081\r\nMetrics address: http://127.0.0.1:8082\r\nload_models=ABINet.mar\r\nmodels={\\\r\n  \"ABINet\": {\\\r\n    \"1.0\": {\\\r\n        \"defaultVersion\": true,\\\r\n        \"marName\": \"ABINet.mar\",\\\r\n        \"runtime\": \"python\",\\\r\n        \"minWorkers\": 1,\\\r\n        \"maxWorkers\": 8,\\\r\n        \"batchSize\": 200,\\\r\n        \"maxBatchDelay\": 50,\\\r\n        \"responseTimeout\": 120,\\\r\n        \"max_request_size\": 65535000\\\r\n    }\\\r\n  }\\\r\n}\r\n```\r\nI noticed that each time I do inference (using `curl -X POST http://localhost:8080/predictions/ABINet T image1.png & curl -X POST http://localhost:8080/predictions/ABINet T image2.png &...` hundreds of times concatenated), the GPU usage will increase, and the memory wouldn't be released after the inference is done. \r\n\r\nFor example, if I want to do inference on 300 images with config.properties that looks like\r\n```\r\nInference address: http://127.0.0.1:8080\r\nManagement address: http://127.0.0.1:8081\r\nMetrics address: http://127.0.0.1:8082\r\nload_models=ABINet.mar\r\nmodels={\\\r\n  \"ABINet\": {\\\r\n    \"1.0\": {\\\r\n        \"defaultVersion\": true,\\\r\n        \"marName\": \"ABINet.mar\",\\\r\n        \"runtime\": \"python\",\\\r\n        \"minWorkers\": 4,\\\r\n        \"maxWorkers\": 8,\\\r\n        \"batchSize\": 600,\\\r\n        \"maxBatchDelay\": 50,\\\r\n        \"responseTimeout\": 120,\\\r\n        \"max_request_size\": 65535000\\\r\n    }\\\r\n  }\\\r\n}\r\n```\r\nusing `gpustat`, after I start torchserve, before I run the first inference, the GPU usage looks like\r\n\r\n![image](https://user-images.githubusercontent.com/55818214/174396193-5a2b1e3b-d4e3-4eff-a9d7-1bf3be2fdfcd.png)\r\n\r\nAfter running the inference the 1st time, the GPU usage looks like\r\n\r\n![image](https://user-images.githubusercontent.com/55818214/174396264-c4ba61d4-25d2-4d40-aaf0-061ae43cb503.png)\r\n\r\nAfter running the inference the 2nd time, \r\n\r\n![image](https://user-images.githubusercontent.com/55818214/174396318-bc5ff7fb-18f0-493d-b109-e7ef8b6a1608.png)\r\n\r\nSo if I do this inference on hundreds of images for 3 times, it will break and error like\r\n```\r\n{\r\n  \"code\": 503,\r\n  \"type\": \"ServiceUnavailableException\",\r\n  \"message\": \"Model \\\"ABINet\\\" has no worker to serve inference request. Please use scale workers API to add workers.\"\r\n}\r\n```\r\nNow, I tried registering model with `initial_workers` as suggested here https://github.com/pytorch/serve/issues/29 but with no luck. \r\nMy questions are: \r\n* How to set this config.properties properly to handle this situation? How would I know what to set for batchsize and maxBatchDelay? \r\n* How to allow torchserve to release memory after one inference? Is there something similar to `gc.collect()` or `torch.cuda.reset_peak_memory_stats(device=None)`?\r\n* How does TorchServe work under the hood? If I send a request with hundreds of images, say, 600, will TorchServe take all in or take only whatever portion it can take? Or will it automatically partition the request (say, take 300 the first time, then take the rest 300)?\r\n\r\nI am attaching the MMOCR custom handler for reference\r\n```\r\nclass MMOCRHandler(BaseHandler):\r\n    threshold = 0.5\r\n\r\n    def initialize(self, context):\r\n        properties = context.system_properties\r\n        self.map_location = 'cuda' if torch.cuda.is_available() else 'cpu'\r\n        self.device = torch.device(self.map_location + ':' +\r\n                                   str(properties.get('gpu_id')) if torch.cuda.\r\n                                   is_available() else self.map_location)\r\n        self.manifest = context.manifest\r\n\r\n        model_dir = properties.get('model_dir')\r\n        serialized_file = self.manifest['model']['serializedFile']\r\n        checkpoint = os.path.join(model_dir, serialized_file)\r\n        self.config_file = os.path.join(model_dir, 'config.py')\r\n\r\n        self.model = init_detector(self.config_file, checkpoint, self.device)\r\n        self.initialized = True\r\n\r\n    ",
    "url": "https://github.com/pytorch/serve/issues/1692",
    "state": "open",
    "labels": [
      "documentation",
      "help wanted",
      "perf"
    ],
    "created_at": "2022-06-17T18:54:26Z",
    "updated_at": "2024-08-04T15:18:11Z",
    "user": "Hegelim"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4522,
    "title": "Try to reduce the number of datasets that require manual download",
    "body": "> Currently, 41 canonical datasets require manual download. I checked their scripts and I'm pretty sure this number can be reduced to \u2248 30 by not relying on bash scripts to download data, hosting data directly on the Hub when the license permits, etc. Then, we will mostly be left with datasets with restricted access, which we can ignore\r\n\r\nfrom https://github.com/huggingface/datasets-server/issues/12#issuecomment-1026920432",
    "url": "https://github.com/huggingface/datasets/issues/4522",
    "state": "open",
    "labels": [],
    "created_at": "2022-06-17T11:42:03Z",
    "updated_at": "2022-06-17T11:52:48Z",
    "comments": 0,
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 394,
    "title": "Implement API pagination?",
    "body": "Should we add API pagination right now? Maybe useful for the \"technical\" endpoints like https://datasets-server.huggingface.co/queue-dump-waiting-started or https://datasets-server.huggingface.co/cache-reports\r\n\r\nhttps://simonwillison.net/2021/Jul/1/pagnis/\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/394",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-06-17T08:54:41Z",
    "updated_at": "2022-08-01T19:02:00Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1129,
    "title": "\u2753 [Question] Torch traced model conversion with List[torch.Tensor] input",
    "body": "Is it possible to convert a torch traced model that accepts List[torch.Tensor] type of input to trt ts module? \r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1129",
    "state": "closed",
    "labels": [
      "question",
      "component: core"
    ],
    "created_at": "2022-06-17T08:17:26Z",
    "updated_at": "2022-08-12T01:53:15Z",
    "user": "ArmenGhambaryan"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 390,
    "title": "How to best manage the datasets that we cannot process due to RAM?",
    "body": "The dataset worker pod is killed (OOMKilled) for:\r\n\r\n```\r\nbigscience/P3\r\nGraphcore/gqa-lxmert\r\necharlaix/gqa-lxmert\r\n```\r\n\r\nand the split worker pod is killed (OOMKilled) for:\r\n\r\n```\r\nimthanhlv/binhvq_news21_raw / started / train\r\nopenclimatefix/nimrod-uk-1km / sample / train/test/validation\r\nPolyAI/minds14 / zh-CN / train\r\n```\r\n\r\nWith the current jobs management (https://github.com/huggingface/datasets-server/issues/264) the killed jobs remain marked as \"STARTED\" in the mongo db. If we \"cancel\" them with\r\n\r\n```\r\nkubectl exec datasets-server-prod-admin-79798989fb-scmjw -- make cancel-started-dataset-jobs\r\nkubectl exec datasets-server-prod-admin-79798989fb-scmjw -- make cancel-started-split-jobs\r\n```\r\n\r\nthey are re-enqueue with the status \"WAITING\" until they are processed and killed again.\r\n\r\nPossibly we should allow up to 3 attempts, for example, maybe increasing the dedicated RAM (see https://github.com/huggingface/datasets-server/issues/264#issuecomment-1158596143). Even so, we cannot have more RAM than the underlying node (eg: 32 GiB on the current nodes) and some datasets will still fail.\r\n\r\nIn that case, we should mark them as ERROR with a proper error message.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/390",
    "state": "closed",
    "labels": [
      "bug",
      "question"
    ],
    "created_at": "2022-06-17T08:04:45Z",
    "updated_at": "2022-09-19T09:42:36Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 388,
    "title": "what happened to the pods?",
    "body": "```\r\n$ k get pods -w\r\n...\r\ndatasets-server-prod-datasets-worker-776b774978-g7mpk   1/1     Evicted   0             73m                                             \u2502DEBUG: 2022-06-16 18:42:46,966 - datasets_server.worker - try to process a split job\r\ndatasets-server-prod-datasets-worker-776b774978-cdb4b   0/1     Pending   0             1s                                              \u2502DEBUG: 2022-06-16 18:42:47,011 - datasets_server.worker - job assigned: 62ab6804a502851c834d7e43 for split 'test' from dataset 'luozhou\r\ndatasets-server-prod-datasets-worker-776b774978-cdb4b   0/1     Pending   0             1s                                              \u2502yang/dureader' with config 'robust'\r\ndatasets-server-prod-datasets-worker-776b774978-cdb4b   0/1     OutOfmemory   0             1s                                          \u2502INFO: 2022-06-16 18:42:47,012 - datasets_server.worker - compute split 'test' from dataset 'luozhouyang/dureader' with config 'robust'\r\ndatasets-server-prod-datasets-worker-776b774978-7hw4j   0/1     Pending       0             0s                                          \u2502Downloading builder script: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 8.67k/8.67k [00:00<00:00, 4.85MB/s]\r\ndatasets-server-prod-datasets-worker-776b774978-7hw4j   0/1     Pending       0             0s                                          \u2502Downloading metadata: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2.85k/2.85k [00:00<00:00, 1.43MB/s]\r\ndatasets-server-prod-datasets-worker-776b774978-7hw4j   0/1     OutOfmemory   0             0s                                          \u2502Downloading builder script: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 8.67k/8.67k [00:00<00:00, 5.07MB/s]\r\ndatasets-server-prod-datasets-worker-776b774978-qtmtd   0/1     Pending       0             0s                                          \u2502Downloading metadata: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2.85k/2.85k [00:00<00:00, 1.18MB/s]\r\ndatasets-server-prod-datasets-worker-776b774978-qtmtd   0/1     Pending       0             0s                                          \u2502Downloading builder script: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 8.67k/8.67k [00:00<00:00, 4.52MB/s]\r\ndatasets-server-prod-datasets-worker-776b774978-qtmtd   0/1     OutOfmemory   0             0s                                          \u2502Downloading metadata: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2.85k/2.85k [00:00<00:00, 1.76MB/s]\r\ndatasets-server-prod-datasets-worker-776b774978-54zr6   0/1     Pending       0             0s                                          \u2502Downloading and preparing dataset dureader/robust (download: 19.57 MiB, generated: 57.84 MiB, post-processed: Unknown size, total: 77.4\r\ndatasets-server-prod-datasets-worker-776b774978-54zr6   0/1     Pending       0             0s                                          \u25021 MiB) to /cache/datasets/luozhouyang___dureader/robust/1.0.0/bdab4855e88c197f2297db78cfc86259fb874c2b977134bbe80d3af8616f33b1...\r\ndatasets-server-prod-datasets-worker-776b774978-54zr6   0/1     OutOfmemory   0             0s                                          \u2502Downloading data:   1%|          | 163k/20.5M [01:45<3:40:25, 1.54kB/s]\r\ndatasets-server-prod-datasets-worker-776b774978-rxcb2   0/1     Pending       0             0s                                          \u2502DEBUG: 2022-06-16 18:44:44,235 - datasets_server.worker - job finished with error: 62ab6804a502851c834d7e43 for split 'test' from datas\r\ndatasets-server-prod-datasets-worker-776b774978-rxcb2   0/1     Pending       0             0s                                          \u2502et 'luozhouyang/dureader' with config 'robust'\r\ndatasets-server-prod-datasets-worker-776b774978-rxcb2   0/1     OutOfmemory   0             0s                                          \u2502DEBUG: 2022-06-16 18:44:44,236 - datasets_server.worker - try to process a split job\r\ndatasets-server-prod-datasets-worker-776b774978-d8m42   0/1     Pending       0             0s                                          \u2502DEBUG: 2022-06-16 18:44:44,281 - datasets_server.worker - job assigned: 62ab6804a502851c834d7e45 for split 'test' from dataset 'opencli\r\ndatasets-server-prod-datasets-worker-776b774978-d8m42   0/1     Pending       0             0s                                          \u2502matefix/nimrod-uk-1km' with config 'sample'\r\ndatasets-server-prod-datasets-worker-776b774978-d8m42   0/1     OutOfmemory   0             0s                                          \u2502INFO: 2022-06-16 18:44:44,281 - datasets_server.worker - compute split 'test' from dataset 'openclimatefix/nimrod-uk-1km' with config '\r\ndatasets-server-prod-datasets-worker-776b774978-xx7hv   0/1     Pending       0             0s                                          \u2502sample'\r\ndatasets-server-prod-datasets-worker-776b774978-xx7hv   0/1     Pending       0             0s                                          \u2502Downloading builder script: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 15.2k/15.2k [00:00<00:00, 6.04MB/s]\r\ndatasets-server-prod-datasets-worker-776b774978-xx7hv   0/1     OutOfmemory   0             1s                                          \u2502Downloading builder script: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 15.2k/15.2k [00:00<00:",
    "url": "https://github.com/huggingface/dataset-viewer/issues/388",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-06-16T19:46:00Z",
    "updated_at": "2022-06-17T07:48:20Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/functorch",
    "number": 882,
    "title": "Can I use jvp with vmap?",
    "body": "Hi, experts.\r\n\r\nI want to use jvp with vmap, so that I can run jvp for each sample in a batch.\r\nHowever, unlike the jacrev example, jvp does not return a callable function, so I am not sure if it is compatible with vmap.\r\nIt seems like vjp returns a function like jacrev, so might be usable, but can I use jvp with vmap?\r\nIt is not clear to me whether vjp and jvp is interchangeable -- I don't see how I can use vjp instead to achieve what I need.\r\n\r\nThank you for the help!",
    "url": "https://github.com/pytorch/functorch/issues/882",
    "state": "closed",
    "labels": [],
    "created_at": "2022-06-16T18:40:05Z",
    "updated_at": "2022-06-16T19:00:52Z",
    "comments": 2,
    "user": "kwmaeng91"
  },
  {
    "repo": "huggingface/pytorch_block_sparse",
    "number": 17,
    "title": "What is \"custom\" \"custom-back\" in dispatch_policies.h?",
    "body": "Hi! I am learning SGEMM and find in dispatch_policies.h has a \"Custom\", \"CustomBack\". Not sure what does this mean? Thank you!!!",
    "url": "https://github.com/huggingface/pytorch_block_sparse/issues/17",
    "state": "open",
    "labels": [],
    "created_at": "2022-06-16T05:46:42Z",
    "updated_at": "2022-06-16T05:46:42Z",
    "user": "ziyuhuang123"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4507,
    "title": "How to let `load_dataset` return a `Dataset` instead of `DatasetDict` in customized loading script",
    "body": "If the dataset does not need splits, i.e., no training and validation split, more like a table. How can I let the `load_dataset` function return a `Dataset` object directly rather than return a `DatasetDict` object with only one key-value pair.\r\n\r\nOr I can paraphrase the question in the following way: how to skip `_split_generators` step in `DatasetBuilder` to let `as_dataset` gives a single `Dataset` rather than a list`[Dataset]`?\r\n\r\nMany thanks for any help.",
    "url": "https://github.com/huggingface/datasets/issues/4507",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-06-15T18:56:34Z",
    "updated_at": "2022-06-16T10:40:08Z",
    "comments": 2,
    "user": "liyucheng09"
  },
  {
    "repo": "pytorch/torchx",
    "number": 520,
    "title": "[torchx/ray] Is elastic training on ray clusters supported?",
    "body": "## \ud83d\udc1b Bug\r\nHi, I would like to know the current state of running elastic training on ray clusters.\r\n\r\nI tried to repeat some experiments([notebook](https://colab.research.google.com/drive/1vVCpgQ9z_1SN8K9CJxUT2LtvUDN0AlND?usp=sharing)) in this [blog](https://www.anyscale.com/blog/large-scale-distributed-training-with-torchx-and-ray) on my ray cluster, but I got unexpected behavior.\r\n- I EXPECT to see when use custom component and the cluster has fewer available nodes than the job requested, the submitted job continues running with current nodes, and when there are new nodes become available, they join can join the training process. What I OBSERVED is the job failed and got the error below:\r\n  ```\r\n  TimeoutError: Placement group creation timed out. Make sure your cluster either has enough resources or use an autoscaling cluster. Current resources available: {'memory': 18038862642.0, 'CPU': 8.0, 'node:10.130.6.66': 0.999, 'object_store_memory': 15071908982.0, 'GPU': 1.0, 'node:10.130.6.67': 1.0}, resources requested by the placement group: [{'CPU': 2.0}, {'CPU': 2.0}, {'CPU': 2.0}, {'CPU': 2.0}, {'CPU': 2.0}]\r\n  ```\r\n- When use the built-in `dist.ddp` component, even if there are enough computation resources, the ray job status  always shows succeed, but from the ray job logs, the expected output never appears, and the only information in the log is\r\n  ```\r\n  Waiting for placement group to start.\r\n  ```\r\n- When use custom component and the cluster has the required resources, the submitted job has expected log information in the log file, but the job will never stop, when I check the ray job status, it always shown\r\n  ```\r\n  Status for job 'raysubmit_kqtEAYVSmx4c1XgD': RUNNING\r\n  Status message: Job is currently running.\r\n  ```\r\n\r\n### Question\r\n<!-- your question here -->\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\nModule (check all that applies):\r\n * [ ] `torchx.spec`\r\n * [x] `torchx.component`\r\n * [ ] `torchx.apps`\r\n * [ ] `torchx.runtime`\r\n * [ ] `torchx.cli`\r\n * [x] `torchx.schedulers`\r\n * [ ] `torchx.pipelines`\r\n * [ ] `torchx.aws`\r\n * [ ] `torchx.examples`\r\n * [ ] `other`\r\n\r\n\r\n## To Reproduce\r\n\r\nI tried two ways to launch a TorchX job on ray:\r\n\r\n```bash\r\n# Use custom component\r\n# Required resouses are defined in the component.py file\r\ntorchx run -s ray \\ # use ray scheduler\r\n    -cfg dashboard_address=addr-of-cluster:8265,working_dir=. \\ # ray scheduler arguments\r\n    component.py:trainer # use custom component\r\n\r\n# Use built-in dist.ddp component\r\ntorchx run -s ray \\ # use ray scheduler\r\n    -cfg dashboard_address=addr-of-cluster:8265,working_dir=. \\ # ray scheduler arguments\r\n    dist.ddp \\ # use dist.ddp component\r\n    -j 4x1 \\ # nproc and nnodes\r\n    --script ./compute_world_size.py # a distributed script\r\n```\r\n\r\nA detailed description of the command is [here](https://pytorch.org/torchx/latest/quickstart.html).\r\n\r\nThe provisioned ray cluster:\r\n\r\n```python\r\n\"headCPU\": \"4\",\r\n\"headGPU\": \"0\",\r\n\"headMemory\": \"12Gi\",\r\n\"headMaxMemory\": \"24Gi\", \r\n\"workerMinCount\": 1, \r\n\"workerMaxCount\": 4,\r\n\"workerCPU\": \"4\",\r\n\"workerGPU\": \"0\",\r\n\"workerMemory\": \"12Gi\",\r\n\"workerMaxMemory\": \"24Gi\"\r\n```\r\n\r\nPerformed following experiments:\r\n\r\n- **(Autoscaling)** To test if torchx will trigger ray autoscaler to provide more nodes than the minimum nodes, I launched a job that requires 4 nodes.\r\nThe results are listed below:\r\n\r\n  - [Custom component](torchx-ray/component.py):\r\n    - Ray job status:\r\n\r\n        ```shell\r\n        Status for job 'raysubmit_kqtEAYVSmx4c1XgD': RUNNING\r\n        Status message: Job is currently running.\r\n        ```\r\n\r\n    - Ray job logs:\r\n\r\n        ```shell\r\n        Waiting for placement group to start.\r\n        (scheduler +1s) Tip: use `ray status` to view detailed cluster status. To disable these messages, set RAY_SCHEDULER_EVENTS=0.\r\n        (scheduler +1s) Adding 3 nodes of type worker_node.\r\n        (scheduler +21s) Resized to 20 CPUs, 4 GPUs.\r\n        (CommandActor pid=223, ip=10.130.6.73) initializing `gloo` process group\r\n        (CommandActor pid=223, ip=10.130.6.73) successfully initialized process group\r\n        (CommandActor pid=223, ip=10.130.6.73) rank: 3, actual world_size: 4, computed world_size: 4\r\n        (CommandActor pid=221, ip=10.131.6.32) initializing `gloo` process group\r\n        (CommandActor pid=221, ip=10.131.6.32) successfully initialized process group\r\n        (CommandActor pid=221, ip=10.131.6.32) rank: 1, actual world_size: 4, computed world_size: 4\r\n        (CommandActor pid=222, ip=10.130.6.74) initializing `gloo` process group\r\n        (CommandActor pid=222, ip=10.130.6.74) successfully initialized process group\r\n        (CommandActor pid=222, ip=10.130.6.74) rank: 0, actual world_size: 4, computed world_size: 4\r\n        (CommandActor pid=225, ip=10.131.6.30) initializing `gloo` process group\r\n        (CommandActor pid=225, ip=10.131.6.30) successfully initialized process group\r\n        (CommandActor pid=225, ip=10.131.6.30) rank: 2, actual world_siz",
    "url": "https://github.com/meta-pytorch/torchx/issues/520",
    "state": "open",
    "labels": [
      "question",
      "ray"
    ],
    "created_at": "2022-06-15T18:25:55Z",
    "updated_at": "2022-06-22T21:34:39Z",
    "comments": 7,
    "user": "ntlm1686"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4504,
    "title": "Can you please add the Stanford dog dataset?",
    "body": "## Adding a Dataset\r\n- **Name:** *Stanford dog dataset*\r\n- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*\r\n- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*\r\n- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*\r\n- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *\r\n\r\n\r\nInstructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4504",
    "state": "closed",
    "labels": [
      "good first issue",
      "dataset request"
    ],
    "created_at": "2022-06-15T15:39:35Z",
    "updated_at": "2024-12-09T15:44:11Z",
    "comments": 16,
    "user": "dgrnd4"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4502,
    "title": "Logic bug in arrow_writer?",
    "body": "https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488\r\n\r\nI got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:\r\n```\r\n-        if batch_examples and len(next(iter(batch_examples.values()))) == 0:\r\n+       if not batch_examples or len(next(iter(batch_examples.values()))) == 0:\r\n            return\r\n```\r\n@lhoestq ",
    "url": "https://github.com/huggingface/datasets/issues/4502",
    "state": "closed",
    "labels": [],
    "created_at": "2022-06-15T14:50:00Z",
    "updated_at": "2022-06-18T15:15:51Z",
    "comments": 10,
    "user": "changjonathanc"
  },
  {
    "repo": "huggingface/optimum",
    "number": 219,
    "title": "Support to wav2vec2",
    "body": "### Feature request\r\n\r\nIs there any plan to include wav2vec2 class to optimum?\r\n```python\r\nfrom optimum.onnxruntime.configuration import AutoQuantizationConfig\r\nfrom optimum.onnxruntime import ORTQuantizer\r\n\r\n# The model we wish to quantize\r\nmodel_checkpoint = \"facebook/wav2vec2-base-960h\"\r\n# The type of quantization to apply\r\nqconfig = AutoQuantizationConfig.arm64(is_static=False, per_channel=False)\r\nquantizer = ORTQuantizer.from_pretrained(model_checkpoint, feature=\"sequence-classification\")\r\n\r\n# Quantize the model!\r\nquantizer.export(\r\n    onnx_model_path=\"model.onnx\",\r\n    onnx_quantized_model_output_path=\"model-quantized.onnx\",\r\n    quantization_config=qconfig,\r\n)\r\n```\r\nOutput:\r\n```python\r\n---------------------------------------------------------------------------\r\n\r\nValueError                                Traceback (most recent call last)\r\n\r\n[<ipython-input-27-b874ded560cc>](https://localhost:8080/#) in <module>()\r\n      6 # The type of quantization to apply\r\n      7 qconfig = AutoQuantizationConfig.arm64(is_static=False, per_channel=False)\r\n----> 8 quantizer = ORTQuantizer.from_pretrained(model_checkpoint, feature=\"sequence-classification\")\r\n      9 \r\n     10 # Quantize the model!\r\n\r\n1 frames\r\n\r\n[/usr/local/lib/python3.7/dist-packages/transformers/models/auto/auto_factory.py](https://localhost:8080/#) in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)\r\n    446             return model_class.from_pretrained(pretrained_model_name_or_path, *model_args, config=config, **kwargs)\r\n    447         raise ValueError(\r\n--> 448             f\"Unrecognized configuration class {config.__class__} for this kind of AutoModel: {cls.__name__}.\\n\"\r\n    449             f\"Model type should be one of {', '.join(c.__name__ for c in cls._model_mapping.keys())}.\"\r\n    450         )\r\n\r\nValueError: Unrecognized configuration class <class 'transformers.models.wav2vec2.configuration_wav2vec2.Wav2Vec2Config'> for this kind of AutoModel: AutoModelForSequenceClassification.\r\nModel type should be one of BartConfig, YosoConfig, NystromformerConfig, QDQBertConfig, FNetConfig, PerceiverConfig, GPTJConfig, LayoutLMv2Config, PLBartConfig, RemBertConfig, CanineConfig, RoFormerConfig, BigBirdPegasusConfig, GPTNeoConfig, BigBirdConfig, ConvBertConfig, LEDConfig, IBertConfig, MobileBertConfig, DistilBertConfig, AlbertConfig, CamembertConfig, XLMRobertaXLConfig, XLMRobertaConfig, MBartConfig, MegatronBertConfig, MPNetConfig, BartConfig, ReformerConfig, LongformerConfig, RobertaConfig, DebertaV2Config, DebertaConfig, FlaubertConfig, SqueezeBertConfig, BertConfig, OpenAIGPTConfig, GPT2Config, TransfoXLConfig, XLNetConfig, XLMConfig, CTRLConfig, ElectraConfig, FunnelConfig, LayoutLMConfig, TapasConfig, Data2VecTextConfig.\r\n```\r\n\r\n\r\n### Motivation\r\n\r\nTo get some speed up on wav2vec2 models.\r\n\r\n### Your contribution\r\n\r\nNo at the moment, but I could help.",
    "url": "https://github.com/huggingface/optimum/issues/219",
    "state": "closed",
    "labels": [],
    "created_at": "2022-06-15T12:47:42Z",
    "updated_at": "2022-07-08T10:34:33Z",
    "comments": 4,
    "user": "asr-lord"
  },
  {
    "repo": "pytorch/serve",
    "number": 1687,
    "title": "How to install torchserve from source ???",
    "body": "### \ud83d\ude80 The feature\n\nWithout using\r\n`pip install torchserve` and `docker pull pytorch/torchserve`, how can I install **torchserve** using this open source ??\r\nI can build `model-archiver` and `workflow-archiver`, but how can I build out `torchserve` from source ?\n\n### Motivation, pitch\n\nWithout using\r\n`pip install torchserve` and `docker pull pytorch/torchserve`, how can I install **torchserve** using this open source ??\r\nI can build `model-archiver` and `workflow-archiver`, but how can I build out `torchserve` from source ?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/1687",
    "state": "closed",
    "labels": [],
    "created_at": "2022-06-14T18:03:48Z",
    "updated_at": "2022-06-15T03:05:30Z",
    "user": "jiapei-nexera"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 373,
    "title": "Add support for building GitHub Codespace dev environment",
    "body": "Add support for building a GitHub Codespace dev environment (as it was done for the [moon landing](https://github.com/huggingface/moon-landing/pull/3188) project) to make it easier to contribute to the project.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/373",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-06-14T14:37:58Z",
    "updated_at": "2022-09-19T09:05:26Z",
    "user": "mariosasko"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4491,
    "title": "Dataset Viewer issue for Pavithree/test",
    "body": "### Link\r\n\r\nhttps://huggingface.co/datasets/Pavithree/test\r\n\r\n### Description\r\n\r\nI have extracted the subset of original eli5 dataset found at hugging face. However, while loading the dataset It throws ArrowNotImplementedError: Unsupported cast from string to null using function cast_null error. Is there anything missing from my end? Kindly help.\r\n\r\n### Owner\r\n\r\n_No response_",
    "url": "https://github.com/huggingface/datasets/issues/4491",
    "state": "closed",
    "labels": [
      "dataset-viewer"
    ],
    "created_at": "2022-06-14T13:23:10Z",
    "updated_at": "2022-06-14T14:37:21Z",
    "comments": 1,
    "user": "Pavithree"
  },
  {
    "repo": "pytorch/examples",
    "number": 1012,
    "title": "Using SLURM for Imagenet training on multiple nodes",
    "body": "In the pytorch imagenet example of this repo, it says that for multiple nodes we have to run the command on each node like below:\r\n\r\n![image](https://user-images.githubusercontent.com/10924797/173546864-66c56fa9-3aef-4f26-9e06-12866db2220f.png)\r\n\r\nSince I am using a shared HPC cluster with SLURM, I cannot actively know which nodes my training will use so I'm not sure how to run these two commands. How can I run these two commands on the separate nodes using SLURM?",
    "url": "https://github.com/pytorch/examples/issues/1012",
    "state": "closed",
    "labels": [
      "distributed"
    ],
    "created_at": "2022-06-14T09:39:59Z",
    "updated_at": "2022-07-10T20:11:43Z",
    "comments": 2,
    "user": "b0neval"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 79495,
    "title": "How to stacked RGB images",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nHi, pytorch support teams.\r\n\r\nI want to stack a RGB images.\r\nI want to construct a 3D or 4D RGB tensor.\r\nAnd, create a GAN model using these tensor.\r\nHow do I define how to create such a tensor?\r\nI would like to stack the attached 2D RGB images.\r\nOr can you extract each RGB element from a 3D image as a 3D tensor?\r\n\r\nKind regards,\r\nyoshimura.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n![RGB image](https://user-images.githubusercontent.com/68062970/173480331-c74cf544-d349-4c10-a30e-d53735d7c00e.png)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/79495",
    "state": "closed",
    "labels": [],
    "created_at": "2022-06-14T02:40:40Z",
    "updated_at": "2022-06-14T18:01:50Z",
    "user": "kazuma0606"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1945,
    "title": "Calculating accuracy.",
    "body": "How can i calculate the accuracy of the model on seq2seq with attention chatbot?",
    "url": "https://github.com/pytorch/tutorials/issues/1945",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-06-13T22:34:03Z",
    "updated_at": "2022-08-17T20:26:00Z",
    "user": "OmarHaitham520"
  },
  {
    "repo": "pytorch/torchx",
    "number": 514,
    "title": "Launching hello world job on Kubernetes and getting logs",
    "body": "## \ud83d\udcda Documentation\r\n\r\n## Link\r\n<!-- link to the problematic documentation -->\r\nhttps://pytorch.org/torchx/0.1.0rc2/quickstart.html\r\n\r\n## What does it currently say?\r\n<!-- copy paste the section that is wrong -->\r\n`torchx run --scheduler kubernetes my_component.py:greet --image \"my_app:latest\" --user \"your name\"`\r\nThe documentation lacks information about getting logs for the hello world example with Kubernetes cluster.\r\n\r\n## What should it say?\r\n<!-- the proposed new documentation -->\r\nThe user should have a kubectl CLI configured. Refer to [this](https://kubernetes.io/docs/reference/kubectl/) \r\n\r\nTo get the logs of hello world job:\r\n`kubectl logs <pod name>`\r\n\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/514",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-06-13T14:20:20Z",
    "updated_at": "2022-06-13T16:50:35Z",
    "comments": 1,
    "user": "vishakha-ramani"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1114,
    "title": "How can i compile CUDA C in this project\u2753 [Question] How do you ....? ",
    "body": "## \u2753 Question\r\n\r\nI want compile tensorrt plugin in this project. But I do not know how to use bazel to compile the cuda c.\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture:\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1114",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-06-13T11:27:52Z",
    "updated_at": "2022-06-20T22:11:37Z",
    "user": "p517332051"
  },
  {
    "repo": "pytorch/serve",
    "number": 1684,
    "title": "How to decode the gRPC PredictionResponse string efficiently",
    "body": "### \ud83d\udcda The doc issue\n\nThere is no documentation about decoding the received bytes form PredictionResponse into torch tensor efficiently. Currently, the only working solution is using `ast.literal_eval`, which is extremely slow. \r\n\r\n```\r\nresponse = inference_stub.Predictions(\r\n            inference_pb2.PredictionsRequest(model_name=model_name, input=input_data))\r\npredictions = torch.astensor(literal_eval(response.prediction.decode('utf-8')))\r\n```\r\n\r\nUsing methods like numpy.fromstring, numpy.frombuffer or torch.frombuffer returns the following error:\r\n\r\n```\r\n> np.fromstring(response.prediction.decode(\"utf-8\"))\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\nValueError: string size must be a multiple of element size\r\n```\r\n\r\nThe following returns an incorrect tensor values. The number of elements are not the same as expected number of elements.\r\n```\r\ntorch.frombuffer(response.prediction, dtype = torch.float32)\r\n```\r\n\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/serve/issues/1684",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-06-13T10:47:16Z",
    "updated_at": "2022-09-20T11:50:44Z",
    "user": "IamMohitM"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 79384,
    "title": "torch.load() fails on MPS backend (\"don't know how to restore data location\")",
    "body": "### \ud83d\udc1b Describe the bug\n\n```bash\r\n# warning: 5.8GB file\r\nwget https://huggingface.co/Cene655/ImagenT5-3B/resolve/main/model.pt\r\n```\r\n\r\n```python\r\nimport torch\r\ntorch.load('./model.pt', map_location='mps')\r\n```\r\n\r\nError thrown [from serialization.py](https://github.com/pytorch/pytorch/blob/bd1a35dfc894eced537b825e5569836e6a91266d/torch/serialization.py#L178):\r\n\r\n```\r\nException has occurred: RuntimeError       (note: full exception trace is shown but execution is paused at: _run_module_as_main)\r\ndon't know how to restore data location of torch.storage._UntypedStorage (tagged with mps)\r\n  File \"/Users/birch/git/imagen-pytorch-cene/venv/lib/python3.9/site-packages/torch/serialization.py\", line 178, in default_restore_location\r\n    raise RuntimeError(\"don't know how to restore data location of \"\r\n  File \"/Users/birch/git/imagen-pytorch-cene/venv/lib/python3.9/site-packages/torch/serialization.py\", line 970, in restore_location\r\n    return default_restore_location(storage, map_location)\r\n  File \"/Users/birch/git/imagen-pytorch-cene/venv/lib/python3.9/site-packages/torch/serialization.py\", line 1001, in load_tensor\r\n    wrap_storage=restore_location(storage, location),\r\n  File \"/Users/birch/git/imagen-pytorch-cene/venv/lib/python3.9/site-packages/torch/serialization.py\", line 1019, in persistent_load\r\n    load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location))\r\n  File \"/Users/birch/git/imagen-pytorch-cene/venv/lib/python3.9/site-packages/torch/serialization.py\", line 1049, in _load\r\n    result = unpickler.load()\r\n  File \"/Users/birch/git/imagen-pytorch-cene/venv/lib/python3.9/site-packages/torch/serialization.py\", line 712, in load\r\n    return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)\r\n  File \"/Users/birch/git/imagen-pytorch-cene/repro.py\", line 2, in <module>\r\n    torch.load('./ImagenT5-3B/model.pt', map_location='mps')\r\n  File \"/Users/birch/anaconda3/envs/torch-nightly/lib/python3.9/runpy.py\", line 87, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/Users/birch/anaconda3/envs/torch-nightly/lib/python3.9/runpy.py\", line 97, in _run_module_code\r\n    _run_code(code, mod_globals, init_globals,\r\n  File \"/Users/birch/anaconda3/envs/torch-nightly/lib/python3.9/runpy.py\", line 268, in run_path\r\n    return _run_module_code(code, init_globals, run_name,\r\n  File \"/Users/birch/anaconda3/envs/torch-nightly/lib/python3.9/runpy.py\", line 87, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/Users/birch/anaconda3/envs/torch-nightly/lib/python3.9/runpy.py\", line 197, in _run_module_as_main (Current frame)\r\n    return _run_code(code, main_globals, None,\r\n```\r\n\r\nI think the solution will involve adding a [`register_package()` entry](https://github.com/pytorch/pytorch/blob/bd1a35dfc894eced537b825e5569836e6a91266d/torch/serialization.py#L160-L161) for the mps backend.\n\n### Versions\n\n```\r\nPyTorch version: 1.13.0.dev20220610\r\nIs debug build: False\r\nCUDA used to build PyTorch: None\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: macOS 12.4 (arm64)\r\nGCC version: Could not collect\r\nClang version: 13.0.0 (clang-1300.0.29.30)\r\nCMake version: version 3.22.1\r\nLibc version: N/A\r\n\r\nPython version: 3.9.12 (main, Jun  1 2022, 06:34:44)  [Clang 12.0.0 ] (64-bit runtime)\r\nPython platform: macOS-12.4-arm64-64bit\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] imagen-pytorch==0.0.0\r\n[pip3] numpy==1.22.4\r\n[pip3] torch==1.13.0.dev20220610\r\n[pip3] torchaudio==0.14.0.dev20220603\r\n[pip3] torchvision==0.14.0.dev20220609\r\n[conda] numpy                     1.23.0rc2                pypi_0    pypi\r\n[conda] torch                     1.13.0.dev20220606          pypi_0    pypi\r\n[conda] torchaudio                0.14.0.dev20220603          pypi_0    pypi\r\n[conda] torchvision               0.14.0a0+f9f721d          pypi_0    pypi\r\n```\n\ncc @mruberry @kulinseth @albanD",
    "url": "https://github.com/pytorch/pytorch/issues/79384",
    "state": "closed",
    "labels": [
      "module: serialization",
      "triaged",
      "module: mps"
    ],
    "created_at": "2022-06-12T19:30:24Z",
    "updated_at": "2022-08-06T09:25:21Z",
    "user": "Birch-san"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4478,
    "title": "Dataset slow during model training",
    "body": "## Describe the bug\r\nWhile migrating towards \ud83e\udd17 Datasets, I encountered an odd performance degradation: training suddenly slows down dramatically. I train with an image dataset using Keras and execute a `to_tf_dataset` just before training.\r\n\r\nFirst, I have optimized my dataset following https://discuss.huggingface.co/t/solved-image-dataset-seems-slow-for-larger-image-size/10960/6, which actually improved the situation from what I had before but did not completely solve it.\r\n\r\nSecond, I saved and loaded my dataset using `tf.data.experimental.save` and `tf.data.experimental.load` before training (for which I would have expected no performance change). However, I ended up with the performance I had before tinkering with \ud83e\udd17 Datasets.\r\n\r\nAny idea what's the reason for this and how to speed-up training with \ud83e\udd17 Datasets?\r\n\r\n## Steps to reproduce the bug\r\n```python\r\n# Sample code to reproduce the bug\r\n\r\nfrom datasets import load_dataset\r\nimport os\r\n\r\ndataset_dir = \"./dataset\"\r\nprep_dataset_dir = \"./prepdataset\"\r\nmodel_dir = \"./model\"\r\n\r\n# Load Data\r\ndataset = load_dataset(\"Lehrig/Monkey-Species-Collection\", \"downsized\")\r\ndef read_image_file(example):\r\n    with open(example[\"image\"].filename, \"rb\") as f:\r\n        example[\"image\"] = {\"bytes\": f.read()}\r\n        return example\r\ndataset = dataset.map(read_image_file)\r\ndataset.save_to_disk(dataset_dir)\r\n\r\n# Preprocess\r\nfrom datasets import (\r\n    Array3D,\r\n    DatasetDict,\r\n    Features,\r\n    load_from_disk,\r\n    Sequence,\r\n    Value\r\n)\r\nimport numpy as np\r\nfrom transformers import ImageFeatureExtractionMixin\r\n\r\ndataset = load_from_disk(dataset_dir)\r\n\r\nnum_classes = dataset[\"train\"].features[\"label\"].num_classes\r\none_hot_matrix = np.eye(num_classes)\r\nfeature_extractor = ImageFeatureExtractionMixin()\r\n\r\ndef to_pixels(image):\r\n    image = feature_extractor.resize(image, size=size)\r\n    image = feature_extractor.to_numpy_array(image, channel_first=False)\r\n    image = image / 255.0\r\n    return image\r\n\r\ndef process(examples):\r\n    examples[\"pixel_values\"] = [\r\n        to_pixels(image) for image in examples[\"image\"]\r\n    ]\r\n    examples[\"label\"] = [\r\n        one_hot_matrix[label] for label in examples[\"label\"]\r\n    ]\r\n    return examples\r\n\r\nfeatures = Features({\r\n    \"pixel_values\": Array3D(dtype=\"float32\", shape=(size, size, 3)),\r\n    \"label\": Sequence(feature=Value(dtype=\"int32\"), length=num_classes)\r\n})\r\n\r\nprep_dataset = dataset.map(\r\n    process,\r\n    remove_columns=[\"image\"],\r\n    batched=True,\r\n    batch_size=batch_size,\r\n    num_proc=2,\r\n    features=features,\r\n)\r\n\r\nprep_dataset = prep_dataset.with_format(\"numpy\")\r\n\r\n# Split\r\ntrain_dev_dataset = prep_dataset['test'].train_test_split(\r\n    test_size=test_size,\r\n    shuffle=True,\r\n    seed=seed\r\n)\r\n\r\ntrain_dev_test_dataset = DatasetDict({\r\n    'train': train_dev_dataset['train'],\r\n    'dev': train_dev_dataset['test'],\r\n    'test': prep_dataset['test'],\r\n})\r\n\r\ntrain_dev_test_dataset.save_to_disk(prep_dataset_dir)\r\n\r\n# Train Model\r\nimport datetime\r\nimport tensorflow as tf\r\nfrom tensorflow.keras import Sequential\r\nfrom tensorflow.keras.applications import InceptionV3\r\nfrom tensorflow.keras.layers import Dense, Dropout, GlobalAveragePooling2D, BatchNormalization\r\nfrom tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoint, EarlyStopping\r\nfrom transformers import DefaultDataCollator\r\n\r\ndataset = load_from_disk(prep_data_dir)\r\n\r\ndata_collator = DefaultDataCollator(return_tensors=\"tf\")\r\n\r\ntrain_dataset = dataset[\"train\"].to_tf_dataset(\r\n    columns=['pixel_values'],\r\n    label_cols=['label'],\r\n    shuffle=True,\r\n    batch_size=batch_size,\r\n    collate_fn=data_collator\r\n)\r\n\r\nvalidation_dataset = dataset[\"dev\"].to_tf_dataset(\r\n    columns=['pixel_values'],\r\n    label_cols=['label'],\r\n    shuffle=False,\r\n    batch_size=batch_size,\r\n    collate_fn=data_collator\r\n)\r\n\r\nprint(f'{datetime.datetime.now()} - Saving Data')\r\ntf.data.experimental.save(train_dataset, model_dir+\"/train\")\r\ntf.data.experimental.save(validation_dataset, model_dir+\"/val\")\r\n\r\nprint(f'{datetime.datetime.now()} - Loading Data')\r\ntrain_dataset = tf.data.experimental.load(model_dir+\"/train\")\r\nvalidation_dataset = tf.data.experimental.load(model_dir+\"/val\")\r\n\r\nshape = np.shape(dataset[\"train\"][0][\"pixel_values\"])\r\nbackbone = InceptionV3(\r\n    include_top=False,\r\n    weights='imagenet',\r\n    input_shape=shape\r\n)\r\n\r\nfor layer in backbone.layers:\r\n    layer.trainable = False\r\n\r\nmodel = Sequential()\r\nmodel.add(backbone)\r\nmodel.add(GlobalAveragePooling2D())\r\nmodel.add(Dense(128, activation='relu'))\r\nmodel.add(BatchNormalization())\r\nmodel.add(Dropout(0.3))\r\nmodel.add(Dense(64, activation='relu'))\r\nmodel.add(BatchNormalization())\r\nmodel.add(Dropout(0.3))\r\nmodel.add(Dense(10, activation='softmax'))\r\n\r\nmodel.compile(\r\n    optimizer='adam',\r\n    loss='categorical_crossentropy',\r\n    metrics=['accuracy']\r\n)\r\n\r\nprint(model.summary())\r\n\r\nearlyStopping = EarlyStopping(\r\n    monitor='val_loss',\r\n    patience=10,\r\n    verbose=0,\r\n    mode='min'\r\n)\r\n\r\nmcp_save = ModelCheckp",
    "url": "https://github.com/huggingface/datasets/issues/4478",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2022-06-11T19:40:19Z",
    "updated_at": "2022-06-14T12:04:31Z",
    "comments": 5,
    "user": "lehrig"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 79332,
    "title": "How to reimplement same behavior in AdaptiveAvgPooling2D",
    "body": "### \ud83d\udcda The doc issue\n\nHi, am trying written an op which should mimic behavior in Pytorch's AdaptiveAvgPooling, but I can not align the result.\r\n\r\nHere is what I do:\r\n\r\n```\r\ndef test_pool():\r\n    a = np.fromfile(\"in.bin\", dtype=np.float32)\r\n    a = np.reshape(a, [1, 12, 25, 25])\r\n    a = torch.as_tensor(a)\r\n\r\n    b = F.adaptive_avg_pool2d(a, [7, 7])\r\n    print(b)\r\n    print(b.shape)\r\n\r\n    avg_pool = torch.nn.AvgPool2d([7, 7], [3, 3])\r\n    c = avg_pool(a)\r\n    print(c)\r\n    print(c.shape)\r\n```\r\n\r\nthe `b` and `c` are not equal.\r\n\r\nMy algorithm was:\r\n\r\n```\r\nk = output_size // input_size\r\nstride = input_size - (output_size - 1) * k\r\npadding = 0\r\n```\r\n\r\nI think there maybe some gap in real algorithm in pytorch. But can not found any where said it.\r\n\r\nso, please make me clarify.\n\n### Suggest a potential alternative/fix\n\nDetails in adaptiveavgpool2d",
    "url": "https://github.com/pytorch/pytorch/issues/79332",
    "state": "closed",
    "labels": [],
    "created_at": "2022-06-11T02:06:59Z",
    "updated_at": "2022-08-18T11:39:51Z",
    "user": "lucasjinreal"
  },
  {
    "repo": "pytorch/functorch",
    "number": 867,
    "title": "Why is using vmap(jacrev) for BatchNorm2d in non-tracking mode not working?",
    "body": "Hi, experts.\r\nI am trying to use vmap(jacrev) to calculate the per-sample jacobian in a batch for my network during inference. However, when there is BatchNorm2d, it does not work. Because during inference, BatchNorm2d is simply applying the statistics previously tracked (and not doing any inter-sample operations), I think it should work just as any other simple operation from my understanding. Is there a way for me to make it work, or is there anything I am misunderstanding?\r\n\r\nBelow is my minimal code:\r\n```\r\nfrom functorch import jacrev, vmap\r\nimport torch\r\nfrom torch import nn\r\n\r\nlayers = nn.Sequential(\r\n        nn.Conv2d(3, 3, kernel_size=(3, 3)),\r\n        nn.BatchNorm2d(3, track_running_stats=False),\r\n    )\r\n\r\nx = torch.randn(4, 3, 30, 30)\r\nj = vmap(jacrev(layers))(x)\r\n```\r\n\r\nAnd I get this error in the bn layer\r\n`ValueError: expected 4D input (got 3D input)`\r\n\r\nI think this should fundamentally be doable, and just might be because of how vmap and jacrev is implemented.\r\nIs there any simple workaround, or am I misunderstanding anything?\r\n\r\nThank you for any help",
    "url": "https://github.com/pytorch/functorch/issues/867",
    "state": "closed",
    "labels": [],
    "created_at": "2022-06-11T00:15:32Z",
    "updated_at": "2022-07-18T18:44:14Z",
    "comments": 6,
    "user": "kwmaeng91"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 79106,
    "title": "How to find the code in '...'?",
    "body": "https://github.com/pytorch/pytorch/blob/4305f8e9bda34f18eb7aacab51c63651cfc61802/torch/storage.py#L34\r\n\r\nHere, I want to read the detailed code in `.cuda` func, however, I do not find any code about this api?\ud83d\ude22\r\n\r\nHope someone could help me\uff01\u2764\r\n\n\ncc @ngimel",
    "url": "https://github.com/pytorch/pytorch/issues/79106",
    "state": "closed",
    "labels": [
      "module: cuda",
      "triaged"
    ],
    "created_at": "2022-06-08T02:49:10Z",
    "updated_at": "2022-06-13T20:44:10Z",
    "user": "juinshell"
  },
  {
    "repo": "pytorch/data",
    "number": 574,
    "title": "Support offloading data pre-processing to auxiliary devices",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\r\n\r\nOccasionally one might find that their GPU is idle due to a bottleneck on the input data pre-processing pipeline (which might include data loading/filtering/manipulation/augmentation/etc). In these cases one could improve resource utilization by offloading some of the pre-processing to auxiliary CPU devices.\r\nI have demonstrated how to do this using gRPC in the following blog post:  https://towardsdatascience.com/overcoming-ml-data-preprocessing-bottlenecks-with-grpc-ca30fdc01bee\r\n\r\nTensorFlow has built in (experimental) support for this feature (https://www.tensorflow.org/api_docs/python/tf/data/experimental/service) that enables offloading in a few simple steps.\r\n\r\nThe request here is to include PyTorch APIs for offloading data pre-processing in a manner that would be simple and straight forward to the user... Similar to the TensorFlow APIs (though preferably without any limitations on pre-processing workload) .\r\n\r\n\r\n\r\n\r\n### Alternatives\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_\n\ncc @SsnL @VitalyFedyunin @ejguan @NivekT",
    "url": "https://github.com/meta-pytorch/data/issues/574",
    "state": "open",
    "labels": [
      "feature",
      "module: dataloader",
      "triaged",
      "module: data"
    ],
    "created_at": "2022-06-07T10:12:00Z",
    "updated_at": "2022-07-06T18:12:47Z",
    "comments": 2,
    "user": "czmrand"
  },
  {
    "repo": "pytorch/kineto",
    "number": 615,
    "title": "How to limit the scope of the profiler?",
    "body": "I am wondering if it is possible to limit the scope of the profiler to a particular part of the neural network. Currently, I am trying to analyze the bottleneck of my model using the following pseudocode:\r\n\r\n```\r\nimport torch.profiler as profiler\r\n    with profiler.profile(\r\n            activities=[\r\n                profiler.ProfilerActivity.CPU,\r\n                profiler.ProfilerActivity.CUDA,\r\n            ],\r\n            profile_memory=True,\r\n            schedule=profiler.schedule(wait=5, warmup=2, active=1, repeat=1), \r\n            on_trace_ready=profiler.tensorboard_trace_handler(tensorboard_logdir)\r\n    ) as p:\r\n    for sample in dataloader:\r\n         model(sample)\r\n```\r\n\r\nHowever, the trace I created is still way too large (~800MB) for the tensorboard to function properly. Apparently tensorboard is only able to load the trace if it is smaller than about 500 MB, so I am thinking about limiting the trace of the profiler to only look at part of the neural net that leads to the issue. However, it seems like a warmup is necessary, so inserting the profiler.profile within a network will generate inaccurate results. Is there a way to limit the scope of the profiler without breaking the interface?",
    "url": "https://github.com/pytorch/kineto/issues/615",
    "state": "closed",
    "labels": [],
    "created_at": "2022-06-06T20:34:35Z",
    "updated_at": "2022-06-21T17:57:42Z",
    "user": "hyhuang00"
  },
  {
    "repo": "pytorch/torchx",
    "number": 510,
    "title": "Implement an HPO builtin",
    "body": "## Description\r\nAdd a builtin component for launching HPO (hyper-parameter optimization) jobs. At a high-level something akin to:\r\n\r\n```\r\n# for grid search\r\n$ torchx run -s kubernetes hpo.grid_search --paramspacefile=~/parameters.json --component dist.ddp\r\n\r\n# for bayesian search\r\n$ torchx run -s kubernetes hpo.bayesian ...\r\n```\r\n\r\nIn both cases we use the Ax/TorchX integration to run the HPO driver job. (see motivation section below for details)\r\n\r\n## Motivation/Background\r\nTorchX already integrates with Ax that supports both bayesian and grid_search HPO. Some definitions before we get started:\r\n\r\n1. Ax: Experiment - ([docs](https://ax.dev/docs/glossary.html#experiment)) Defines the HPO search space and holds the optimizer state. Vends out the next set of parameters to search based on the observed results (relevant for Bayesian and Bandit optimizations, not so much for grid search).\r\n2. Ax: Trials - ([docs](https://ax.dev/docs/glossary.html#trial)) A step in an experiment, aka a (training) job that runs with a specific set of hyper-parameters as vended out by the optimizer in the experiment\r\n3. Ax: Runner - ([docs](https://ax.dev/docs/glossary.html#runner)) Responsible for launching trials.\r\n\r\nAx/TorchX integration is done at the Runner level. We implemented an [`ax/TorchXRunner`](https://ax.dev/api/runners.html#module-ax.runners.torchx) that implements Ax's `Runner` interface (do not confuse this with the TorchX runner. TorchX itself defines a runner concept). The `ax/TorchXRunner` runs the ax Trials using TorchX.\r\n\r\nThe [`ax/TorchXRunnerTest`](https://github.com/facebook/Ax/blob/main/ax/runners/tests/test_torchx.py#L72) serves as a full end-to-end example of how everything works. In summary the test runs a bayesian HPO to minimize the [\"booth\" function](https://en.wikipedia.org/wiki/Test_functions_for_optimization). **Note that in practice this function is replaced by your \"trainer\"**. The main module that computes the booth function given the parameters `x_1` and `x_2` as inputs is defined in [`torchx.apps.utils.booth`](https://github.com/pytorch/torchx/blob/main/torchx/apps/utils/booth_main.py).\r\n\r\nThe abridged code looks something like this:\r\n  ```python\r\n      parameters: List[Parameter] = [\r\n            RangeParameter(\r\n                name=\"x1\",\r\n                lower=-10.0,\r\n                upper=10.0,\r\n                parameter_type=ParameterType.FLOAT,\r\n            ),\r\n            RangeParameter(\r\n                name=\"x2\",\r\n                lower=-10.0,\r\n                upper=10.0,\r\n                parameter_type=ParameterType.FLOAT,\r\n            ),\r\n        ]\r\n      experiment = Experiment(\r\n            name=\"torchx_booth_sequential_demo\",\r\n            search_space=SearchSpace(parameters=self._parameters),\r\n            optimization_config=OptimizationConfig(\r\n                 objective = Objective(metric=TorchXMetric(name=\"booth_eval\"),\r\n                 minimize=True,\r\n            ),\r\n           runner=TorchXRunner(\r\n               tracker_base=self.test_dir,\r\n               component=utils.booth,\r\n               scheduler=\"local_cwd\",\r\n               cfg={\"prepend_cwd\": True},\r\n           ),\r\n       )\r\n\r\n      scheduler = Scheduler( \r\n            experiment=experiment,\r\n            generation_strategy=choose_generation_strategy(search_space=experiment.search_space),\r\n            options=SchedulerOptions(),\r\n      )\r\n\r\n      for _ in range(3):\r\n          scheduler.run_n_trials(max_trials=2)   \r\n      scheduler.report_results()\r\n  ```\r\n\r\n## Detailed Proposal\r\nThe task here is to essentially create pre-packaged applications for the code above. We can define a two types of HPO apps by the \"strategy\" used:\r\n1. hpo.grid_search\r\n2. hpo.bayesian\r\n\r\nEach application will come with a companion \"component\" (e.g. `hpo.grid_search` and `hpo.bayesian`). The applications should be designed to take as input:\r\n\r\n1. parameter space\r\n2. what the objective function is (e.g. trainer)\r\n3. torchx cfgs (e.g. scheduler, scheduler runcfg, etc)\r\n4. ax experiment configs\r\n\r\nThe challenge is to be able to correctly and sanely \"parameterize\" the application in such a way that allows the user to sanely pass these argument from the CLI. For complex parameters such as parameter space, one might consider taking a file in a specific format rather than conjuring up a complex string encoding to pass as CLI input. \r\n\r\nFor instance for the `20 x 20` for `x_1` and `x_2` in the example above, rather than taking the parameter space as:\r\n```\r\n$ torchx run hpo.bayesian --parameter_space x_1=-10:10,x2_=-10:10\r\n```\r\n\r\nOne can take it as a well defined python parameter file:\r\n```\r\n# params.py\r\n# just defines the parameters using the regular Ax APIs\r\nparameters: List[Parameter] = [\r\n            RangeParameter(\r\n                name=\"x1\",\r\n                lower=-10.0,\r\n                upper=10.0,\r\n                parameter_type=ParameterType.FLOAT,\r\n            ),\r\n            RangeParameter(\r\n                name=\"x2\",\r\n                low",
    "url": "https://github.com/meta-pytorch/torchx/issues/510",
    "state": "open",
    "labels": [
      "enhancement",
      "module: components"
    ],
    "created_at": "2022-06-03T20:06:10Z",
    "updated_at": "2022-10-27T01:55:08Z",
    "comments": 0,
    "user": "kiukchung"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4439,
    "title": "TIMIT won't load after manual download: Errors about files that don't exist",
    "body": "## Describe the bug\r\n\r\nI get the message from HuggingFace that it must be downloaded manually. From the URL provided in the message, I got to UPenn page for manual download. (UPenn apparently want $250? for the dataset??)   ...So, ok, I obtained a copy from a friend and also a smaller version from Kaggle. But in both cases the HF dataloader fails; it is looking for files that don't exist anywhere in the dataset: it is looking for files with lower-case letters like \"**test*\" (all the filenames in both my copies are uppercase) and certain file extensions that exclude the .DOC which is provided in TIMIT:\r\n\r\n\r\n## Steps to reproduce the bug\r\n```python\r\ndata = load_dataset('timit_asr', 'clean')['train']\r\n```\r\n\r\n## Expected results\r\nThe dataset should load with no errors. \r\n\r\n## Actual results\r\nThis error message:\r\n```\r\n  File \"/home/ubuntu/envs/data2vec/lib/python3.9/site-packages/datasets/data_files.py\", line 201, in resolve_patterns_locally_or_by_urls\r\n    raise FileNotFoundError(error_msg)\r\nFileNotFoundError: Unable to resolve any data file that matches '['**test*', '**eval*']' at /home/ubuntu/datasets/timit with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'zip']\r\n```\r\n\r\nBut this is a strange sort of error: why is it looking for lower-case file names when all the TIMIT dataset filenames are uppercase?  Why does it exclude .DOC files when the only parts of the TIMIT data set with \"TEST\" in them have \".DOC\" extensions?   ...I wonder, how was anyone able to get this to work in the first place?\r\n\r\nThe files in the dataset look like the following: \r\n```\r\n\u00b3       PHONCODE.DOC\r\n\u00b3       PROMPTS.TXT\r\n\u00b3       SPKRINFO.TXT\r\n\u00b3       SPKRSENT.TXT\r\n\u00b3       TESTSET.DOC\r\n```\r\n...so why are these being excluded by the dataset loader? \r\n\r\n\r\n## Environment info\r\n- `datasets` version: 2.2.2\r\n- Platform: Linux-5.4.0-1060-aws-x86_64-with-glibc2.27\r\n- Python version: 3.9.9\r\n- PyArrow version: 8.0.0\r\n- Pandas version: 1.4.2\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4439",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-06-02T16:35:56Z",
    "updated_at": "2022-06-03T08:44:17Z",
    "comments": 3,
    "user": "drscotthawley"
  },
  {
    "repo": "pytorch/vision",
    "number": 6124,
    "title": "How to timing 'model.to(device)' correctly?",
    "body": "I am using pytorch's api in my python code to measure time for different layers of resnet152 to device(GPU, V-100).However, I cannot get a stable result.\r\nHere is my code:\r\n```python\r\nimport torch.nn as nn\r\ndevice = torch.device('cuda:3' if torch.cuda.is_available() else 'cpu')\r\nmodel = torchvision.models.resnet152(pretrained=True)\r\n\r\ndef todevice(_model_, _device_=device):\r\n    T0 = time.perf_counter()\r\n    _model_.to(_device_)\r\n    torch.cuda.synchronize()\r\n    T1 = time.perf_counter()\r\n    print(\"model to device %s cost:%s ms\" % (_device_, ((T1 - T0) * 1000)))\r\n\r\nmodel1 = nn.Sequential(*list(resnet152.children())[:6])\r\ntodevice(model1)\r\n```\r\nWhen I use the code to test at different time, I can always get different answers, some of them are ridiculous, even to `200ms`.\r\nAlso, there are 4 GPU(Tesla V100) in my lab, I don't know whether other extra GPUs will affect my result.\r\nCould you tell me how to timing `model.to(device)` correctly? Is there anything wrong with my code or my lab environment?",
    "url": "https://github.com/pytorch/vision/issues/6124",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-06-02T11:55:14Z",
    "updated_at": "2022-06-06T08:34:34Z",
    "user": "juinshell"
  },
  {
    "repo": "pytorch/functorch",
    "number": 848,
    "title": "AOTAutograd makes unsafe assumptions on how the backward pass will look like",
    "body": "## Context: how AOTAutograd works today\r\n\r\nGiven a function `f`:\r\n- AOTAutograd traces out `run_forward_and_backward_f(*args, *grad_outputs)` to produce `forward_and_backward_trace`\r\n- AOTAutograd partitions `forward_and_backward_trace` into a forward_trace and a backward_trace\r\n- AOTAutograd compiles the forward_trace and backward_trace separately\r\n- The compiled_forward_trace and compiled_backward_trace are stitched into an autograd.Function\r\n\r\n## The Problem\r\n\r\nIn order to trace  `run_forward_and_backward_f(*args, *grad_outputs)`, AOTAutograd needs to construct a Proxy for the grad_outputs. This ends up assuming properties of the grad_output: for example, AOTAutograd assumes that the grad_outputs are contiguous.\r\n\r\nThere are some more adversarial examples that we could construct. If the backward formula of at::sin were instead:\r\n```\r\ndef sin_backward(grad_output, input):\r\n  if grad_output.is_sparse():\r\n    return grad_output * input.sin()\r\n  return grad_output * input.cos()\r\n```\r\nthen, depending on the properties of the input, the backward that should get executed is different. If AOTAutograd assumes that the Proxy is dense and contiguous, then the backward pass of the generated autograd.Function would be incorrect.\r\n\r\n## Potential proposal\r\n\r\nProposal: delay tracing the backward pass until the backward pass is invoked.\r\n\r\nSo, given a function `f`:\r\n- AOTAutograd constructs a trace of f (that includes intermediates as outputs), `forward_trace`\r\n- AOTAutograd constructs an autograd.Function that has `compiled(forward_trace)` as the forward pass\r\n\r\nThe autograd.Function's backward pass, when invoked:\r\n- traces out `run_forward_and_backward_f(*args, *grad_outputs)` to produce `forward_and_backward_trace`\r\n- takes the difference of `forward_and_backward_trace` and `forward_trace` to produce `backward_trace`.\r\n- compiles `backward_trace` into `compiled_backward_trace`\r\n- then invokes it.\r\n\r\nThings that we haven't mentioned that will need to be thought about:\r\n- how does AOTAutograd's rematerialization come into play here?\r\n\r\nThings that we haven't mentioned that should be orthogonal:\r\n- caching. `compiled(forward_trace)` needs a cache that uses the inputs as keys (among other things), `compiled(backward_trace)` needs a cache that takes the (inputs, grad_outputs) as keys.\r\n- what if the backward is user-defined (e.g., autograd.Function) and isn't traceable? See https://github.com/pytorch/pytorch/issues/93723 for ideas\r\n\r\n## Alternatives\r\n\r\nKeep the current scheme (AOTAutograd traces out both the forward+backward pass at the time of the forward), but somehow prove to ourselves that the produced trace of the backward pass is always correct.\r\n\r\ncc @Chillee @anijain2305 @ezyang @anjali411 @albanD ",
    "url": "https://github.com/pytorch/functorch/issues/848",
    "state": "open",
    "labels": [],
    "created_at": "2022-06-01T18:18:28Z",
    "updated_at": "2023-02-01T01:10:36Z",
    "comments": 4,
    "user": "zou3519"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 332,
    "title": "Change moonlanding app token?",
    "body": "Should we replace `dataset-preview-backend`with `datasets-server`:\r\n- here: https://github.com/huggingface/moon-landing/blob/f2ee3896cff3aa97aafb3476e190ef6641576b6f/server/models/App.ts#L16\r\n- and here: https://github.com/huggingface/moon-landing/blob/82e71c10ed0b385e55a29f43622874acfc35a9e3/server/test/end_to_end_apps.ts#L243-L271\r\n\r\nWhat are the consequences then? How to do it without too much downtime?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/332",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-06-01T09:29:12Z",
    "updated_at": "2022-09-19T09:33:33Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 325,
    "title": "Test if /valid is a blocking request",
    "body": "https://github.com/huggingface/datasets-server/issues/250#issuecomment-1142013300\r\n\r\n> > the requests to /valid are very long: do they block the incoming requests?)\r\n> Depends on if your long running query is blocking the GIL or not. If you have async calls, it should be able to switch and take care of other requests, if it's computing something then yeah, probably blocking everything else.\r\n\r\n- [ ] find if the long requests like /valid are blocking the concurrent requests\r\n- [ ] if so: fix it",
    "url": "https://github.com/huggingface/dataset-viewer/issues/325",
    "state": "closed",
    "labels": [
      "bug",
      "question"
    ],
    "created_at": "2022-05-31T13:43:20Z",
    "updated_at": "2022-09-16T17:39:20Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4419,
    "title": "Update `unittest` assertions over tuples from `assertEqual` to `assertTupleEqual`",
    "body": "**Is your feature request related to a problem? Please describe.**\r\n\r\nSo this is more a readability improvement rather than a proposal, wouldn't it be better to use `assertTupleEqual` over the tuples rather than `assertEqual`? As `unittest` added that function in `v3.1`, as detailed at https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertTupleEqual, so maybe it's worth updating.\r\n\r\nFind an example of an `assertEqual` over a tuple in \ud83e\udd17 `datasets` unit tests over an `ArrowDataset` at https://github.com/huggingface/datasets/blob/0bb47271910c8a0b628dba157988372307fca1d2/tests/test_arrow_dataset.py#L570\r\n\r\n**Describe the solution you'd like**\r\n\r\nStart slowly replacing all the `assertEqual` statements with `assertTupleEqual` if the assertion is done over a Python tuple, as we're doing with the Python lists using `assertListEqual` rather than `assertEqual`.\r\n\r\n**Additional context**\r\n\r\nIf so, please let me know and I'll try to go over the tests and create a PR if applicable, otherwise, if you consider this should stay as `assertEqual` rather than `assertSequenceEqual` feel free to close this issue! Thanks \ud83e\udd17 \r\n",
    "url": "https://github.com/huggingface/datasets/issues/4419",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-05-30T12:13:18Z",
    "updated_at": "2022-09-30T16:01:37Z",
    "comments": 3,
    "user": "alvarobartt"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4417,
    "title": "how to convert a dict generator into a huggingface dataset. ",
    "body": "### Link\r\n\r\n_No response_\r\n\r\n### Description\r\n\r\nHey there, I have used seqio to get a well distributed mixture of samples from multiple dataset. However the resultant output from seqio is a python generator dict, which I cannot produce back into huggingface dataset.\r\n\r\nThe generator contains all the samples needed for training the model but I cannot convert it into a huggingface dataset.\r\n\r\nThe code looks like this:\r\n\r\n\r\n```\r\nfor ex in seqio_data:\r\nprint(ex[\u201ctext\u201d])\r\n```\r\n\r\nI need to convert the seqio_data (generator) into huggingface dataset.\r\n\r\n\r\nthe complete seqio code goes here:\r\n```\r\nimport functools\r\n\r\nimport seqio\r\nimport tensorflow as tf\r\nimport t5.data\r\nfrom datasets import load_dataset\r\nfrom t5.data import postprocessors\r\nfrom t5.data import preprocessors\r\nfrom t5.evaluation import metrics\r\nfrom seqio import FunctionDataSource, utils\r\n\r\nTaskRegistry = seqio.TaskRegistry\r\n\r\n\r\n\r\ndef gen_dataset(split, shuffle=False, seed=None, column=\"text\", dataset_params=None):\r\n    dataset = load_dataset(**dataset_params)\r\n    if shuffle:\r\n        if seed:\r\n            dataset = dataset.shuffle(seed=seed)\r\n        else:\r\n            dataset = dataset.shuffle()\r\n    while True:\r\n        for item in dataset[str(split)]:\r\n            yield item[column]\r\n\r\n\r\ndef dataset_fn(split, shuffle_files, seed=None, dataset_params=None):\r\n    return tf.data.Dataset.from_generator(\r\n        functools.partial(gen_dataset, split, shuffle_files, seed, dataset_params=dataset_params),\r\n        output_signature=tf.TensorSpec(shape=(), dtype=tf.string, name=dataset_name)\r\n    )\r\n\r\n\r\n@utils.map_over_dataset\r\ndef target_to_key(x, key_map, target_key):\r\n    \"\"\"Assign the value from the dataset to target_key in key_map\"\"\"\r\n    return {**key_map, target_key: x}\r\n\r\n\r\n\r\ndataset_name = 'oscar-corpus/OSCAR-2109'\r\nsubset= 'mr'\r\ndataset_params = {\"path\": dataset_name, \"language\":subset, \"use_auth_token\":True}\r\ndataset_shapes = None\r\n\r\nTaskRegistry.add(\r\n    \"oscar_marathi_corpus\",\r\n    source=seqio.FunctionDataSource(\r\n        dataset_fn=functools.partial(dataset_fn, dataset_params=dataset_params),\r\n        splits=(\"train\", \"validation\"),\r\n        caching_permitted=False,\r\n        num_input_examples=dataset_shapes,\r\n    ),\r\npreprocessors=[\r\nfunctools.partial(\r\ntarget_to_key, key_map={\r\n\"targets\": None,\r\n}, target_key=\"targets\")],\r\n    output_features={\"targets\": seqio.Feature(vocabulary=seqio.PassThroughVocabulary, add_eos=False, dtype=tf.string, rank=0)},\r\n    metric_fns=[]\r\n)\r\n\r\ndataset = seqio.get_mixture_or_task(\"oscar_marathi_corpus\").get_dataset(\r\n    sequence_length=None,\r\n    split=\"train\",\r\n    shuffle=True,\r\n    num_epochs=1,\r\n    shard_info=seqio.ShardInfo(index=0, num_shards=10),\r\n    use_cached=False,\r\n    seed=42\r\n)\r\nfor _, ex in zip(range(5), dataset):\r\n     print(ex['targets'].numpy().decode())\r\n```\r\n\r\n\r\n### Owner\r\n\r\n_No response_",
    "url": "https://github.com/huggingface/datasets/issues/4417",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-05-29T16:28:27Z",
    "updated_at": "2022-09-16T14:44:19Z",
    "user": "StephennFernandes"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 78365,
    "title": "How to calculate the gradient of the previous layer when the gradient of the latter layer is given?",
    "body": "Hi, there. Can someone help me solve this problem? if the gradients of a certain layer is known, how can I use the API in torch to calculate the gradient of the previous layer?I would appreciate it if anyone could reply me in time.",
    "url": "https://github.com/pytorch/pytorch/issues/78365",
    "state": "closed",
    "labels": [],
    "created_at": "2022-05-26T16:05:40Z",
    "updated_at": "2022-05-31T14:46:40Z",
    "user": "mankasto"
  },
  {
    "repo": "pytorch/data",
    "number": 469,
    "title": "Suggestion: Dataloader with RPC-based workers",
    "body": "### \ud83d\ude80 The feature\r\n\r\nA dataloader which communicates with its workers via torch.distributed.rpc API.\r\n\r\n### Motivation, pitch\r\n\r\nPresently, process-based workers for Dataloader mean the workers live on the same server/PC as the process consuming that data. This incurs the following limitations:\r\n- the pre-processing workload cannot scale beyond the GPU server capacity\r\n- with random sampling, each worker might eventually see all the dataset, which is not cache friendly\r\n\r\n### Alternatives\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\nA proof of concept is available ~~[here](https://github.com/nlgranger/data/blob/rpc_dataloader/torchdata/rpc/dataloader.py)~~ -> https://github.com/CEA-LIST/RPCDataloader\r\n\r\nI have not yet tested how efficient this is compared to communicating the preprocessed batch data via process pipes. Obviously the use of shared-memory is lost when the worker is remote but the TensorPipe rpc backend might be able to take advantage of other fast transfer methods (GPUDirect, rmda?).\r\n\r\nThe load distribution scheme used in this first implementation is round-robin. I have not yet put thoughts on how to make this modifiable both in term of implementation and API.",
    "url": "https://github.com/meta-pytorch/data/issues/469",
    "state": "closed",
    "labels": [],
    "created_at": "2022-05-26T11:14:13Z",
    "updated_at": "2024-01-30T09:29:17Z",
    "comments": 2,
    "user": "nlgranger"
  },
  {
    "repo": "pytorch/examples",
    "number": 1010,
    "title": "Accessing weights of a pre-trained model",
    "body": "Hi, \r\n  Can you share how to print weights and biases for each layer of a pre-trained Alexnet model?\r\n\r\nRegards,\r\nNivedita",
    "url": "https://github.com/pytorch/examples/issues/1010",
    "state": "closed",
    "labels": [],
    "created_at": "2022-05-26T06:50:13Z",
    "updated_at": "2022-06-02T00:11:56Z",
    "comments": 1,
    "user": "nivi1501"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1091,
    "title": "\u2753 [Question] Linking error with PTQ function",
    "body": "## \u2753 Question\r\n\r\nI am getting a linking error when using `torch_tensorrt::ptq::make_int8_calibrator`. I am using the Windows build based on CMake, so I'm not sure if it's a problem with the way it was built, but I suspect not since I can use functions from ::torchscript just fine.\r\n\r\nI am trying to create a barebones program to test ptq based on examples/int8/ptq/main.cpp, and I get this linker error whenever `torch_tensorrt::ptq::make_int8_calibrator` is used. Any help would be greatly appreciated.\r\n\r\n## Environment\r\n\r\n - PyTorch Version (e.g., 1.0): 1.11+cu113\r\n - OS (e.g., Linux): Windows 10\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): libtorch from pytorch.org\r\n - CUDA version: 11.3\r\n\r\n## Additional context\r\n\r\nThis is the linker error that I get:\r\n> Severity\tCode\tDescription\tProject\tFile\tLine\tSuppression State\r\nError\tLNK2019\tunresolved external symbol \"__declspec(dllimport) class torch_tensorrt::ptq::Int8Calibrator<class nvinfer1::IInt8EntropyCalibrator2,class std::unique_ptr<class torch::data::StatelessDataLoader<class torch::data::datasets::MapDataset<class torch::data::datasets::MapDataset<class datasets::CIFAR10,struct torch::data::transforms::Normalize<class at::Tensor> >,struct torch::data::transforms::Stack<struct torch::data::Example<class at::Tensor,class at::Tensor> > >,class torch::data::samplers::RandomSampler>,struct std::default_delete<class torch::data::StatelessDataLoader<class torch::data::datasets::MapDataset<class torch::data::datasets::MapDataset<class datasets::CIFAR10,struct torch::data::transforms::Normalize<class at::Tensor> >,struct torch::data::transforms::Stack<struct torch::data::Example<class at::Tensor,class at::Tensor> > >,class torch::data::samplers::RandomSampler> > > > __cdecl torch_tensorrt::ptq::make_int8_calibrator<class nvinfer1::IInt8EntropyCalibrator2,class std::unique_ptr<class torch::data::StatelessDataLoader<class torch::data::datasets::MapDataset<class torch::data::datasets::MapDataset<class datasets::CIFAR10,struct torch::data::transforms::Normalize<class at::Tensor> >,struct torch::data::transforms::Stack<struct torch::data::Example<class at::Tensor,class at::Tensor> > >,class torch::data::samplers::RandomSampler>,struct std::default_delete<class torch::data::StatelessDataLoader<class torch::data::datasets::MapDataset<class torch::data::datasets::MapDataset<class datasets::CIFAR10,struct torch::data::transforms::Normalize<class at::Tensor> >,struct torch::data::transforms::Stack<struct torch::data::Example<class at::Tensor,class at::Tensor> > >,class torch::data::samplers::RandomSampler> > > >(class std::unique_ptr<class torch::data::StatelessDataLoader<class torch::data::datasets::MapDataset<class torch::data::datasets::MapDataset<class datasets::CIFAR10,struct torch::data::transforms::Normalize<class at::Tensor> >,struct torch::data::transforms::Stack<struct torch::data::Example<class at::Tensor,class at::Tensor> > >,class torch::data::samplers::RandomSampler>,struct std::default_delete<class torch::data::StatelessDataLoader<class torch::data::datasets::MapDataset<class torch::data::datasets::MapDataset<class datasets::CIFAR10,struct torch::data::transforms::Normalize<class at::Tensor> >,struct torch::data::transforms::Stack<struct torch::data::Example<class at::Tensor,class at::Tensor> > >,class torch::data::samplers::RandomSampler> > >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)\" (__imp_??$make_int8_calibrator@VIInt8EntropyCalibrator2@nvinfer1@@V?$unique_ptr@V?$StatelessDataLoader@V?$MapDataset@V?$MapDataset@VCIFAR10@datasets@@U?$Normalize@VTensor@at@@@transforms@data@torch@@@datasets@data@torch@@U?$Stack@U?$Example@VTensor@at@@V12@@data@torch@@@transforms@34@@datasets@data@torch@@VRandomSampler@samplers@34@@data@torch@@U?$default_delete@V?$StatelessDataLoader@V?$MapDataset@V?$MapDataset@VCIFAR10@datasets@@U?$Normalize@VTensor@at@@@transforms@data@torch@@@datasets@data@torch@@U?$Stack@U?$Example@VTensor@at@@V12@@data@torch@@@transforms@34@@datasets@data@torch@@VRandomSampler@samplers@34@@data@torch@@@std@@@std@@@ptq@torch_tensorrt@@YA?AV?$Int8Calibrator@VIInt8EntropyCalibrator2@nvinfer1@@V?$unique_ptr@V?$StatelessDataLoader@V?$MapDataset@V?$MapDataset@VCIFAR10@datasets@@U?$Normalize@VTensor@at@@@transforms@data@torch@@@datasets@data@torch@@U?$Stack@U?$Example@VTensor@at@@V12@@data@torch@@@transforms@34@@datasets@data@torch@@VRandomSampler@samplers@34@@data@torch@@U?$default_delete@V?$StatelessDataLoader@V?$MapDataset@V?$MapDataset@VCIFAR10@datasets@@U?$Normalize@VTensor@at@@@transforms@data@torch@@@datasets@data@torch@@U?$Stack@U?$Example@VTensor@at@@V12@@data@torch@@@transforms@34@@datasets@data@torch@@VRandomSampler@samplers@34@@data@torch@@@std@@@std@@@01@V?$unique_ptr@V?$StatelessDataLoader@V?$MapDataset@V?$MapDataset@VCIFAR10@datasets@@U?$Normalize@VTensor@at@@@transforms@data@torch@@@datasets@data@torch@@U?$Stack@U?$Example@VTensor@at@@V12@@data@torch@@@transforms@34@@",
    "url": "https://github.com/pytorch/TensorRT/issues/1091",
    "state": "closed",
    "labels": [
      "question",
      "component: quantization",
      "channel: windows"
    ],
    "created_at": "2022-05-26T01:19:17Z",
    "updated_at": "2022-09-02T17:45:50Z",
    "user": "jonahclarsen"
  },
  {
    "repo": "pytorch/torchx",
    "number": 503,
    "title": "add `torchx list` command and `Runner.list` APIs",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\nAdd a `torchx list` and `Runner/Scheduler.list` methods. This would allow listing all jobs the user has launched and see their status when tracking multiple different jobs. \r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\n\r\nCurrently users have to use the scheduler specific tools like `sacct/vcctl/ray job list` to see all of their jobs. Adding this would allow users to just interact via the torchx interface and not have to worry about interacting with other tools.\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\nWe'd likely want something similar to https://docker-py.readthedocs.io/en/stable/containers.html#docker.models.containers.ContainerCollection.list\r\n\r\nFilters may be hard to support across all schedulers so we probably want to limit it to just a few common ones or none at all initially. We also want to filter so we only return torchx jobs instead of all jobs on the scheduler.\r\n\r\nLimiting it to jobs that the user owns would also be nice to have though may not be feasible for all schedulers.\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n\r\n* https://docker-py.readthedocs.io/en/stable/containers.html#docker.models.containers.ContainerCollection.list\r\n* https://slurm.schedmd.com/sacct.html\r\n* https://docs.aws.amazon.com/batch/latest/APIReference/API_ListJobs.html\r\n* https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/CustomObjectsApi.md#list_namespaced_custom_object\r\n* https://docs.ray.io/en/master/cluster/jobs-package-ref.html#jobsubmissionclient\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/503",
    "state": "closed",
    "labels": [
      "enhancement",
      "module: runner",
      "cli"
    ],
    "created_at": "2022-05-25T21:02:11Z",
    "updated_at": "2022-09-21T21:52:31Z",
    "comments": 10,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1089,
    "title": "I wonder if torch_tensorrt support mixed precisions for different layer",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nI write a converter and plugin, but plugin only support fp32, then if I convert with enabled_precisions: torch.int8, then error happend\r\n\r\n**Describe the solution you'd like**\r\nif different layer can use different precisions, i can use fp32 this plugin layer and int8 other layers",
    "url": "https://github.com/pytorch/TensorRT/issues/1089",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-05-25T10:07:21Z",
    "updated_at": "2022-05-30T06:05:07Z",
    "user": "pupumao"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 309,
    "title": "Scale the worker pods depending on prometheus metrics?",
    "body": "We could scale the number of worker pods depending on:\r\n- the size of the job queue\r\n- the available resources\r\nThese data are available in prometheus, and we could use them to autoscale the pods.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/309",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-05-25T09:56:05Z",
    "updated_at": "2022-09-19T09:30:49Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 307,
    "title": "Add a /metrics endpoint on every worker?",
    "body": "",
    "url": "https://github.com/huggingface/dataset-viewer/issues/307",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-05-25T09:52:28Z",
    "updated_at": "2022-09-16T17:40:55Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/data",
    "number": 454,
    "title": "Make `IterToMap` loading more lazily",
    "body": "### \ud83d\ude80 The feature\n\nCurrently, `IterToMap` starts to load all data from prior `IterDataPipe` when the first `__getitem__` is invoked here.\r\nhttps://github.com/pytorch/data/blob/13b574c80e8732744fee6ab9cb7e35b5afc34a3c/torchdata/datapipes/iter/util/converter.py#L78\r\n\r\nWe can stop loading data from prior `IterDataPipe` whenever we find the requested index. And, we might need to add a flag to prevent loading data multiple times.\n\n### Motivation, pitch\n\nThis would improve the performance if users simply iterate over the `MapDataPipe` as we don't need to pre-load everything at the beginning of the iteration, basically, simulating the behavior of `IterDataPipe`.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/454",
    "state": "open",
    "labels": [
      "help wanted"
    ],
    "created_at": "2022-05-24T14:14:30Z",
    "updated_at": "2022-06-02T08:24:35Z",
    "comments": 7,
    "user": "ejguan"
  },
  {
    "repo": "pytorch/data",
    "number": 453,
    "title": "Fix installation document for nightly and official release",
    "body": "### \ud83d\udcda The doc issue\n\nIn https://github.com/pytorch/data#local-pip-or-conda, we talk about the commands would install nightly pytorch and torchdata, which is actually the official release.\r\n\r\nWe should change this part and add another section for nightly installation\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/453",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-05-24T14:07:13Z",
    "updated_at": "2022-05-24T17:33:20Z",
    "comments": 0,
    "user": "ejguan"
  },
  {
    "repo": "pytorch/torchx",
    "number": 498,
    "title": "Document .torchxconfig behavior in home directory",
    "body": "## \ud83d\udcda Documentation\r\n\r\n## Link\r\n<!-- link to the problematic documentation -->\r\n\r\nhttps://pytorch.org/torchx/main/runner.config.html\r\n\r\nContext: https://fb.workplace.com/groups/140700188041197/posts/326515519459662/?comment_id=328106399300574&reply_comment_id=328113552633192\r\n\r\n## What does it currently say?\r\n<!-- copy paste the section that is wrong -->\r\n\r\n```\r\nThe CLI only picks up .torchxconfig files from the current-working-directory (CWD) so chose a directory where you typically run torchx from.\r\n```\r\n\r\n## What should it say?\r\n<!-- the proposed new documentation -->\r\n\r\nIt should explain how it can also be read from home and how the options are merged together.\r\n\r\n## Why?\r\n<!-- (if not clear from the proposal) why is the new proposed documentation more correct/improvement over the existing one? -->\r\n\r\nBehavior is unclear to users.",
    "url": "https://github.com/meta-pytorch/torchx/issues/498",
    "state": "open",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-05-23T18:39:05Z",
    "updated_at": "2022-06-16T00:04:19Z",
    "comments": 2,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/serve",
    "number": 1647,
    "title": "How to return n images instead of 1? ",
    "body": "Hi,\r\n\r\nI am trying to deploy a DALL-E type model, in which you get as input a text and you receive as output a couple of images.\r\n\r\n\r\n```\r\noutputs = []\r\nfor i, image in enumerate(images):\r\n    byte_output = io.BytesIO()\r\n    output.convert('RGB').save(byte_output, format='JPEG')\r\n    bin_img_data = byte_output.getvalue()\r\n    \r\n    outputs.append(bin_img_data)\r\n\r\nreturn [outputs]\r\n```\r\n\r\n \r\n  This does not work and results in a failure, with the logs from torchserve saying 'object of type bytearray is not json serializable'\r\n  \r\n  However, changing `return [outputs]` into `return [outputs[0]]` makes it work. What can I do regarding this? ",
    "url": "https://github.com/pytorch/serve/issues/1647",
    "state": "closed",
    "labels": [],
    "created_at": "2022-05-23T15:13:07Z",
    "updated_at": "2022-05-23T17:21:30Z",
    "user": "mhashas"
  },
  {
    "repo": "pytorch/data",
    "number": 436,
    "title": "Is our handling of open files safe?",
    "body": "Our current strategy is to wrap all file handles in a [`StreamWrapper`](https://github.com/pytorch/pytorch/blob/88fca3be5924dd089235c72e651f3709e18f76b8/torch/utils/data/datapipes/utils/common.py#L154). It dispatches all calls to wrapped object and adds a `__del__` method:\r\n\r\n```py\r\nclass StreamWrapper:\r\n    def __init__(self, file_obj):\r\n        self.file_obj = file_obj\r\n\r\n    def __del__(self):\r\n        try:\r\n            self.file_obj.close()\r\n        except Exception:\r\n            pass\r\n```\r\n\r\nIt will be called as soon as there are no more references to instance. The rationale is that if this happens we can close the wrapped file object. Since the `StreamWrapper` has a reference to the file object, GC should never try to delete the file object before `__del__` of the `StreamWrapper` is called. Thus, we should never delete an open file object.\r\n\r\nUnfortunately, the reasoning above seems not to be correct. In some cases, it seems GC will delete the file object before the `StreamWrapper` is deleted. This will emit a warning which the `torchvision` test suite will turn into an error. This was discussed at length in pytorch/vision#5801 and includes minimum requirements to reproduce the issue. Still, there was no minimal reproduction outside of the test environment found. The issue was presumably fixed in pytorch/pytorch#76345, but was popping up again in https://github.com/pytorch/data/runs/6500848588#step:9:1977.\r\n\r\nThus, I think it is valid question to ask if our approach is safe at all. It would be a quite bad UX if a user gets a lot of unclosed file warnings although they used `torchdata` or in extension `torchvision.datasets` as documented.",
    "url": "https://github.com/meta-pytorch/data/issues/436",
    "state": "closed",
    "labels": [],
    "created_at": "2022-05-23T10:37:11Z",
    "updated_at": "2023-01-05T15:05:51Z",
    "comments": 3,
    "user": "pmeier"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 1562,
    "title": "Why is \"max_position_embeddings\" 514 in sbert where as 512 in bert",
    "body": "Why is \"max_position_embeddings\" different in sbert then in Bert? ",
    "url": "https://github.com/huggingface/sentence-transformers/issues/1562",
    "state": "open",
    "labels": [],
    "created_at": "2022-05-22T17:27:01Z",
    "updated_at": "2022-05-22T20:52:40Z",
    "user": "omerarshad"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1076,
    "title": "\u2753 [Question] What am I missing to install TensorRT v1.1.0 in a Jetson with JetPack 4.6",
    "body": "## \u2753 Question\r\n\r\nI am getting some errors trying to install TensorRT v1.1.0 in a Jetson with JetPack 4.6 for using with Python3\r\n\r\n## What you have already tried\r\n\r\nI followed the Official installation of Pytorch v1.10.0 by using binaries according to the [ offical Nvidia Forum](https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-10-now-available/72048). Then, I followed the official steps of this repository which are:\r\n\r\n1. Install Bazel - successfully\r\n2. Build Natively on aarch64 (Jetson) - Here I am getting the problem \r\n\r\n## Environment\r\n\r\n - PyTorch Version :1.10.0\r\n - OS (e.g., Linux): Ubuntu 18.04\r\n - How you installed PyTorch: Using pip3 according to [Nvidia Forum](https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-11-now-available/72048)\r\n - Python version: 3.6\r\n - CUDA version: 10.2\r\n - TensorRT version: 8.2.1.8\r\n - CUDNN version: 8.2.0.1\r\n - GPU models and configuration: Jetson NX with JetPack 4.6\r\n - Any other relevant information: Installation is clean. I am using the CUDA and TensorRT that come flashed wich JetPack.\r\n\r\n## Additional context\r\nStarting from a clean installation of JetPack and Torch 1.10.0 installed by using official binaries, I describe the installation steps I did for using this repository with the errors I am getting.\r\n\r\n### 1- Install Bazel\r\n\r\n```\r\ngit clone -b v1.1.0 https://github.com/pytorch/TensorRT.git\r\nsudo apt-get install openjdk-11-jdk\r\nexport BAZEL_VERSION=$(cat /home/tkh/TensorRT.bazelversion)\r\nmkdir bazel\r\ncd bazel\r\ncurl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-dist.zip\r\nunzip bazel-$BAZEL_VERSION-dist.zip\r\nbash ./compile.sh\r\ncp output/bazel /usr/local/bin/\r\n```\r\n\r\nAt this point I can see `bazel 5.1.1- (@non-git)` with `bazel --version`. \r\n\r\n### 2- Build Natively on aarch64 (Jetson)\r\n\r\nThen, I modified my WORKSPACE file of this repository in this way\r\n\r\n```\r\nworkspace(name = \"Torch-TensorRT\")\r\n\r\nload(\"@bazel_tools//tools/build_defs/repo:http.bzl\", \"http_archive\")\r\nload(\"@bazel_tools//tools/build_defs/repo:git.bzl\", \"git_repository\")\r\n\r\nhttp_archive(\r\n    name = \"rules_python\",\r\n    sha256 = \"778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f\",\r\n    url = \"https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz\",\r\n)\r\n\r\nload(\"@rules_python//python:pip.bzl\", \"pip_install\")\r\n\r\nhttp_archive(\r\n    name = \"rules_pkg\",\r\n    sha256 = \"038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d\",\r\n    urls = [\r\n        \"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz\",\r\n        \"https://github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz\",\r\n    ],\r\n)\r\n\r\nload(\"@rules_pkg//:deps.bzl\", \"rules_pkg_dependencies\")\r\n\r\nrules_pkg_dependencies()\r\n\r\ngit_repository(\r\n    name = \"googletest\",\r\n    commit = \"703bd9caab50b139428cea1aaff9974ebee5742e\",\r\n    remote = \"https://github.com/google/googletest\",\r\n    shallow_since = \"1570114335 -0400\",\r\n)\r\n\r\n# External dependency for torch_tensorrt if you already have precompiled binaries.\r\nlocal_repository(\r\n    name = \"torch_tensorrt\",\r\n    path = \"/opt/conda/lib/python3.8/site-packages/torch_tensorrt\"\r\n)\r\n\r\n# CUDA should be installed on the system locally\r\nnew_local_repository(\r\n    name = \"cuda\",\r\n    build_file = \"@//third_party/cuda:BUILD\",\r\n    path = \"/usr/local/cuda-10.2/\",\r\n)\r\n\r\nnew_local_repository(\r\n    name = \"cublas\",\r\n    build_file = \"@//third_party/cublas:BUILD\",\r\n    path = \"/usr\",\r\n)\r\n#############################################################################################################\r\n# Tarballs and fetched dependencies (default - use in cases when building from precompiled bin and tarballs)\r\n#############################################################################################################\r\n\r\n\r\n####################################################################################\r\n# Locally installed dependencies (use in cases of custom dependencies or aarch64)\r\n####################################################################################\r\n\r\n# NOTE: In the case you are using just the pre-cxx11-abi path or just the cxx11 abi path\r\n# with your local libtorch, just point deps at the same path to satisfy bazel.\r\n\r\n# NOTE: NVIDIA's aarch64 PyTorch (python) wheel file uses the CXX11 ABI unlike PyTorch's standard\r\n# x86_64 python distribution. If using NVIDIA's version just point to the root of the package\r\n# for both versions here and do not use --config=pre-cxx11-abi\r\n\r\nnew_local_repository(\r\n    name = \"libtorch\",\r\n    path = \"/home/tkh-ad/.local/lib/python3.6/site-packages/torch\",\r\n    build_file = \"third_party/libtorch/BUILD\"\r\n)\r\n\r\nnew_local_repository(\r\n    name = \"libtorch_pre_cxx11_abi\",\r\n    path = \"/home/tkh-ad/.local/lib/python3.6/site-packages/torch\",\r\n    build_file = \"third_party/libtorch/BUILD\"\r\n)\r\n\r\nnew_local_repository(\r\n    name = \"cudnn\",\r\n    path = \"/usr/local/cud",
    "url": "https://github.com/pytorch/TensorRT/issues/1076",
    "state": "closed",
    "labels": [
      "question",
      "channel: linux-jetpack"
    ],
    "created_at": "2022-05-20T13:56:30Z",
    "updated_at": "2022-05-20T22:35:42Z",
    "user": "mjack3"
  },
  {
    "repo": "pytorch/data",
    "number": 433,
    "title": "HashChecker example is broken",
    "body": "https://github.com/pytorch/data/blob/6a8415b1ced33e5653f7a38c93f767ac8e1c7e79/torchdata/datapipes/iter/util/hashchecker.py#L36-L48\r\n\r\nRunning this will raise a `StopIteration`. The reason is simple: we want to read from a stream that was already exhausted by the hash checking. The docstring tells us that much\r\n\r\nhttps://github.com/pytorch/data/blob/6a8415b1ced33e5653f7a38c93f767ac8e1c7e79/torchdata/datapipes/iter/util/hashchecker.py#L32-L33\r\n\r\nand we correctly set `rewind=False`.",
    "url": "https://github.com/meta-pytorch/data/issues/433",
    "state": "closed",
    "labels": [
      "documentation",
      "good first issue"
    ],
    "created_at": "2022-05-20T11:44:59Z",
    "updated_at": "2022-05-23T22:29:38Z",
    "comments": 1,
    "user": "pmeier"
  },
  {
    "repo": "pytorch/functorch",
    "number": 823,
    "title": "Dynamic shape error in vmap with jacrev of jacrev",
    "body": "I'd like to compute the following expression in a vectorized way: first take the derivative wrt. to the data, and then take the derivative of this expression wrt. the parameters. I tried implementing it like this\r\n```\r\nfunc, params, buffer = make_functional_with_buffers(network)\r\nvmap(jacrev(jacrev(func, 2), 0), (None, None, 0))(params, buffers, data)\r\n```\r\n\r\nbut this isn't working since I get this error message:\r\n\r\n> RuntimeError: vmap: We do not support batching operators that can support dynamic shape. Attempting to batch over indexing with a boolean mask.\r\n\r\nI'm a bit surprised since I expected a second application of `jacrev` shouldn't change how `vmap` interacts with the function, but I guess that was incorrect.\r\n\r\n**Edit**:\r\nI also tried replacing this expression above using the `hessian` operation (and just ignoring the small computational overhead of computing the double derivatives I'm not interested in)\r\n```\r\nvmap(hessian(func, (0, 2)), (None, None, 0))(params, buffers, data)\r\n```\r\nbut that code resulted in the same error.\r\nCan you please point me to information about how to solve this problem?",
    "url": "https://github.com/pytorch/functorch/issues/823",
    "state": "closed",
    "labels": [],
    "created_at": "2022-05-20T10:41:39Z",
    "updated_at": "2022-05-25T12:12:20Z",
    "comments": 5,
    "user": "zimmerrol"
  },
  {
    "repo": "pytorch/data",
    "number": 432,
    "title": "The developer install instruction are outdated",
    "body": "https://github.com/pytorch/data/blob/6a8415b1ced33e5653f7a38c93f767ac8e1c7e79/CONTRIBUTING.md?plain=1#L49-L56\r\n\r\nWhile debugging #418 it took my quite a while to figure out that I need to set \r\n\r\nhttps://github.com/pytorch/data/blob/6a8415b1ced33e5653f7a38c93f767ac8e1c7e79/tools/setup_helpers/extension.py#L41\r\n\r\nfor the C++ code to be built.",
    "url": "https://github.com/meta-pytorch/data/issues/432",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-05-20T08:35:01Z",
    "updated_at": "2022-06-10T20:04:08Z",
    "comments": 3,
    "user": "pmeier"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4374,
    "title": "extremely slow processing when using a custom dataset ",
    "body": "## processing a custom dataset loaded as .txt file  is extremely slow,  compared to a dataset of similar volume from the hub\r\n\r\nI have a large .txt file of 22 GB which i load into HF dataset \r\n\r\n`lang_dataset = datasets.load_dataset(\"text\", data_files=\"hi.txt\")`\r\n\r\nfurther i use a pre-processing function to clean the dataset \r\n\r\n `lang_dataset[\"train\"] = lang_dataset[\"train\"].map(\r\n            remove_non_indic_sentences, num_proc=12, batched=True,  remove_columns=lang_dataset['train'].column_names), batch_size=64)`\r\n\r\nthe following processing takes astronomical time to process, while hoging all the ram. \r\n\r\nsimilar dataset of same size that's available in the huggingface hub works completely fine. which runs the same processing function and has the same amount of data. \r\n`lang_dataset = datasets.load_dataset(\"oscar-corpus/OSCAR-2109\", \"hi\",  use_auth_token=True)`\r\n\r\nthe hours predicted to preprocess are as follows:\r\n\r\nhuggingface hub dataset:  6.5 hrs \r\ncustom loaded dataset: 7000 hrs\r\n\r\nnote: both the datasets are almost actually same, just provided by different sources with has +/- some samples, only one is hosted on the HF hub and the other is downloaded in a text format. \r\n\r\n## Steps to reproduce the bug\r\n```\r\nimport datasets\r\nimport psutil\r\nimport sys \r\nimport glob \r\nfrom fastcore.utils import listify\r\nimport re \r\nimport gc \r\n\r\ndef remove_non_indic_sentences(example): \r\n    tmp_ls = []\r\n    eng_regex = r'[. a-zA-Z0-9\u00d6\u00c4\u00c5\u00f6\u00e4\u00e5 _.,!\"\\'\\/$]*'\r\n    for e in listify(example['text']):\r\n        matches = re.findall(eng_regex, e)\r\n        for match in (str(match).strip() for match in matches if match not in [\"\",\" \", \"  \", \",\", \" ,\", \", \", \" , \"]):\r\n            if len(list(match.split(\" \"))) > 2:\r\n                e = re.sub(match,\" \",e,count=1)\r\n        tmp_ls.append(e)\r\n        gc.collect()\r\n    example['clean_text'] = tmp_ls\r\n    return example\r\n\r\nlang_dataset = datasets.load_dataset(\"text\", data_files=\"hi.txt\")\r\n\r\nlang_dataset[\"train\"] = lang_dataset[\"train\"].map(\r\n            remove_non_indic_sentences, num_proc=12, batched=True,  remove_columns=lang_dataset['train'].column_names), batch_size=64)\r\n\r\n\r\n## same thing work much faster when loading similar dataset from hub\r\n \r\nlang_dataset = datasets.load_dataset(\"oscar-corpus/OSCAR-2109\", \"hi\", split=\"train\", use_auth_token=True)\r\n\r\nlang_dataset[\"train\"] = lang_dataset[\"train\"].map(\r\n            remove_non_indic_sentences, num_proc=12, batched=True,  remove_columns=lang_dataset['train'].column_names), batch_size=64)\r\n\r\n```\r\n\r\n## Actual results\r\n\r\nsimilar dataset of same size that's available in the huggingface hub works completely fine. which runs the same processing function and has the same amount of data. \r\n`lang_dataset = datasets.load_dataset(\"oscar-corpus/OSCAR-2109\", \"hi\", use_auth_token=True)\r\n\r\n\r\n**the hours predicted to preprocess are as follows:**\r\nhuggingface hub dataset:  6.5 hrs \r\ncustom loaded dataset: 7000 hrs\r\n\r\n**i even tried the following:**\r\n\r\n-  sharding the large 22gb text files into smaller files and loading\r\n- saving the file to disk and then loading \r\n- using lesser num_proc \r\n- using smaller batch size \r\n- processing without batches ie :  without `batched=True`\r\n\r\n\r\n## Environment info\r\n<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->\r\n- `datasets` version: 2.2.2.dev0\r\n- Platform: Ubuntu 20.04 LTS \r\n- Python version: 3.9.7 \r\n- PyArrow version:8.0.0 \r\n\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4374",
    "state": "closed",
    "labels": [
      "bug",
      "question"
    ],
    "created_at": "2022-05-19T14:18:05Z",
    "updated_at": "2023-07-25T15:07:17Z",
    "user": "StephennFernandes"
  },
  {
    "repo": "huggingface/optimum",
    "number": 198,
    "title": "Posibility to load an ORTQuantizer or ORTOptimizer from Onnx",
    "body": "FIrst, thanks a lot for this library, it make work so much easier. \r\n\r\nI was wondering if it's possible to quantize and then optimize a model (or the reverse) but looking at the doc, it seems possible to do so only by passing a huggingface vanilla model. \r\n\r\nIs it possible to do so with already compiled models? \r\n\r\nLike : MyFineTunedModel ---optimize----> MyFineTunedOnnxOptimizedModel -----quantize-----> MyFinalReallyLightModel\r\n\r\n```python\r\n# Note that self.model_dir is my local folder with my custom fine-tuned hugginface model\r\nonnx_path = self.model_dir.joinpath(\"model.onnx\")\r\nonnx_quantized_path = self.model_dir.joinpath(\"quantized_model.onnx\")\r\nonnx_chad_path = self.model_dir.joinpath(\"chad_model.onnx\")\r\nonnx_path.unlink(missing_ok=True)\r\nonnx_quantized_path.unlink(missing_ok=True)\r\nonnx_chad_path.unlink(missing_ok=True)\r\n\r\nquantizer = ORTQuantizer.from_pretrained(self.model_dir, feature=\"token-classification\")\r\nquantized_path = quantizer.export(\r\n    onnx_model_path=onnx_path, onnx_quantized_model_output_path=onnx_quantized_path,\r\n    quantization_config=AutoQuantizationConfig.arm64(is_static=False, per_channel=False),\r\n)\r\nquantizer.model.save_pretrained(optimized_path.parent) # To have the model config.json\r\nquantized_path.parent.joinpath(\"pytorch_model.bin\").unlink() # To ensure that we're not loading the vanilla pytorch model\r\n\r\n# Load an Optimizer from an onnx path... \r\n# optimizer = ORTOptimizer.from_pretrained(quantized_path.parent, feature=\"token-classification\")  <-- this fails\r\n# optimizer.export(\r\n#     onnx_model_path=onnx_path,\r\n#     onnx_optimized_model_output_path=onnx_chad_path,\r\n#     optimization_config=OptimizationConfig(optimization_level=99),\r\n# )\r\nmodel = ORTModelForTokenClassification.from_pretrained(quantized_path.parent, file_name=\"quantized_model.onnx\")\r\n# Ideally would load onnx_chad_path (with chad_model.onnx) if the commented section works.\r\n\r\ntokenizer: PreTrainedTokenizer = AutoTokenizer.from_pretrained(self.model_dir)\r\nself.pipeline = cast(TokenClassificationPipeline, pipeline(\r\n    model=model, tokenizer=tokenizer,\r\n    task=\"token-classification\", accelerator=\"ort\",\r\n    aggregation_strategy=AggregationStrategy.SIMPLE,\r\n    device=device_number(self.device),\r\n))\r\n```\r\n\r\nNote that optimization alone works perfectly fine, quantization too, but I was hopping that both would be feasible.. unless optimization also does some kind of quantization or lighter model ?\r\n\r\nThanks in advance. \r\nHave a great day\r\n",
    "url": "https://github.com/huggingface/optimum/issues/198",
    "state": "closed",
    "labels": [],
    "created_at": "2022-05-18T20:19:23Z",
    "updated_at": "2022-06-30T08:33:58Z",
    "comments": 1,
    "user": "ierezell"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 77732,
    "title": "multiprocessing: how to put a model which copied from main thread in the shared_queue",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\n1. If I shared a model in cuda, it raises\r\n```RuntimeError: Attempted to send CUDA tensor received from another process; this is not currently supported. Consider cloning before sending.``` \r\nSpecifically, I accept a model from the main process and return a duplication create by using ```copy.deepcopy(model)```\r\n2. ```torch.multiprocessing.manager.queue.get``` taken a long time to finish. If the queue just passed a file descriptor, I don't think it should take 1/3 of the total time, is there any faster way?\r\nHere's my script\r\nI opened a [thread](https://discuss.pytorch.org/t/how-sharing-memory-actually-worked-in-pytorch/151706) in pytorch'forum also\r\n\r\nI think this is related to #10375 #9996 and #7204\r\n\r\n```python\r\nimport torch\r\n\r\nimport torch.multiprocessing as mp\r\n\r\nfrom copy import deepcopy\r\n\r\nfrom functools import partial\r\n\r\nfrom time import *\r\n\r\nfrom torchvision import models\r\n\r\nimport numpy as np\r\n\r\nfrom tqdm import tqdm\r\n\r\ndef parallel_produce(\r\n\r\n    queue: mp.Queue,\r\n\r\n    model_method,\r\n\r\n    i\r\n\r\n) -> None:\r\n\r\n    pure_model: torch.nn.Module = model_method()\r\n\r\n    # if you delete this line, model can be passed\r\n    pure_model.to('cuda')\r\n\r\n    pure_model.share_memory()\r\n\r\n    while True:\r\n\r\n        corrupt_model = deepcopy(pure_model)\r\n\r\n        dic = corrupt_model.state_dict()\r\n\r\n        dic[list(dic.keys())[0]]*=2\r\n\r\n        corrupt_model.share_memory()\r\n\r\n        queue.put(corrupt_model)\r\n\r\ndef parallel(\r\n\r\n    valid,\r\n\r\n    iteration: int = 1000,\r\n\r\n    process_size: int=2,\r\n\r\n    buffer_size: int=2\r\n\r\n):\r\n\r\n    pool = mp.Pool(process_size)\r\n\r\n    manager = mp.Manager()\r\n\r\n    queue = manager.Queue(buffer_size)\r\n\r\n    SeedSequence = np.random.SeedSequence()\r\n\r\n    model_method = partial(models.squeezenet1_1,True)\r\n\r\n    async_result = pool.map_async(\r\n\r\n        partial(\r\n\r\n            parallel_produce,\r\n\r\n            queue,\r\n\r\n            model_method,\r\n\r\n        ),\r\n\r\n        SeedSequence.spawn(process_size),\r\n\r\n    )\r\n\r\n    time = 0\r\n\r\n    for iter_times in tqdm(range(iteration)):\r\n\r\n        start = monotonic_ns()\r\n\r\n        # this takes a long time\r\n\r\n        corrupt_model: torch.nn.Module = queue.get()\r\n\r\n        time += monotonic_ns() - start\r\n\r\n        corrupt_model.to(\"cuda\")\r\n\r\n        corrupt_result = corrupt_model(valid)\r\n\r\n        del corrupt_model\r\n\r\n    pool.terminate()\r\n\r\n    print(time / 1e9)\r\n\r\nif __name__ == \"__main__\":\r\n\r\n    valid = torch.randn(1,3,224,224).to('cuda')\r\n\r\n    parallel(valid)\r\n\r\n```\r\n\r\n#total time of queue.get taken\r\n\r\n![image](https://user-images.githubusercontent.com/72636351/168984869-cc4e884d-1774-4b9f-81c8-701f4f02b7dc.png)\r\n\r\n### Versions\r\n\r\nCollecting environment information...\r\nPyTorch version: 1.10.0+cu113\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.3\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Microsoft Windows 11 Home\r\nGCC version: Could not collect\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\nLibc version: N/A\r\n\r\nPython version: 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)\r\nPython platform: Windows-10-10.0.22000-SP0\r\nIs CUDA available: True\r\nCUDA runtime version: 11.5.119\r\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 3050 Laptop GPU\r\nNvidia driver version: 512.77\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] mypy-extensions==0.4.3\r\n[pip3] numpy==1.21.5\r\n[pip3] pytorchfi==0.6.0\r\n[pip3] torch==1.10.0+cu113\r\n[pip3] torch-tb-profiler==0.3.1\r\n[pip3] torchaudio==0.10.0+cu113\r\n[pip3] torchei==0.0.4\r\n[pip3] torchinfo==1.5.4\r\n[pip3] torchstat==0.0.7\r\n[pip3] torchsummary==1.5.1\r\n[pip3] torchvision==0.11.1+cu113\r\n[conda] Could not collect\r\n\r\ncc @VitalyFedyunin",
    "url": "https://github.com/pytorch/pytorch/issues/77732",
    "state": "closed",
    "labels": [
      "module: multiprocessing",
      "triaged"
    ],
    "created_at": "2022-05-18T07:41:34Z",
    "updated_at": "2022-06-29T08:18:00Z",
    "user": "Force1ess"
  },
  {
    "repo": "pytorch/vision",
    "number": 6034,
    "title": "Question about center-ness branch in FCOS",
    "body": "Hi, thank you for your great work. I'm learning FCOS these days. I find some differences about position of center-ness between code and paper. In paper(https://arxiv.org/abs/1904.01355), the center-ness branch is put together with the classification branch. \r\n![image](https://user-images.githubusercontent.com/31005897/168759441-07ea8b54-3fe8-43aa-bd0e-8c05067b1547.png)\r\n\r\n\r\nBut in the code, the center-ness and regression branches are put together.\r\nhttps://github.com/pytorch/vision/blob/a1232c212d7cf84806189910ba83bc36bcea916c/torchvision/models/detection/fcos.py#L202-L233\r\n\r\nCould you tell me why? thanks.",
    "url": "https://github.com/pytorch/vision/issues/6034",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-05-17T07:59:37Z",
    "updated_at": "2022-05-18T00:47:41Z",
    "user": "WZMIAOMIAO"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1070,
    "title": "\u2753 [Question] How to convert Torch-TensorRT module to TRT engine?",
    "body": "## \u2753 Question\r\n\r\nHow to convert Torch-TensorRT module (*.ts) to TRT engine? Is there any Python API to do that?\r\n## What you have already tried\r\n\r\nIn examples, I found\r\n```cpp\r\nauto engine = torch_tensorrt::ts::convert_method_to_trt_engine(mod, \"forward\", compile_spec);\r\n```\r\nin https://github.com/pytorch/TensorRT/blob/master/examples/int8/qat/main.cpp\r\n\r\nIf this is the correct way to do converting? If yes, is there any Python API?\r\n## Environment\r\n\r\namd64 + Linux\r\nall software is newest version\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1070",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-05-17T07:36:45Z",
    "updated_at": "2022-05-23T16:16:13Z",
    "user": "lingffff"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 77589,
    "title": "How to handle __module__  attribute for Public API bindings",
    "body": "While working on the NN onboarding lab (with corresponding closed PR: #77425 ), after registering the functional version of new module in `torch/nn/functional.py` The following test would fail ` pytest test/test_public_bindings.py` with:\r\n```Bash\r\nFull list:\r\n# torch.nn.functional.bias:\r\n  - Is public: it is an attribute that does not start with `_` on a module that does not have `__all__` defined\r\n  - Does NOT look public: because its `__module__` attribute (`torch._C._nn`) is not within the torch library or does not start with the submodule where it is defined (`torch.nn.functional`)\r\n  - You can do either of these two things to fix this problem:\r\n    - To make it NOT public: either define a `__all__` for `torch.nn.functional` or add a `_` at the beginning of the name\r\n    - To make it look public: make sure the `__module__` is properly set and points to a submodule of `torch.nn.functional`\r\n```    \r\nI defined the functional version analogously to the linear module:\r\n```Python\r\nbias = _add_docstr(\r\n    torch._C._nn.bias,\r\n    r\"\"\"\r\nbias(input, bias) -> Tensor\r\n\r\nAdds a bias vector the last dimension of input tensor\r\n\r\nShape:\r\n    - Input: math:`(*, num\\_features)` where `*` means any number of\r\n      additional dimensions, including none\r\n    - Bias: :math:`(num\\_features)` or :math:`()`\r\n    - Output: :math:`(*, num\\_features)` where `*` means any number of\r\n      additional dimensions, including none, same shape as Input\r\n\"\"\")\r\n```\r\n\r\nI add this function 'bias' to the allowlist here: `test/allowlist_for_publicAPI.json` in the list for `\"torch.nn.functional\"`\r\n\r\nWhen reading the test function though it says that no new functions should be added to this list. If I def bias above and then implement `bias.__module__ = 'torch.nn.functional'` This does indeed work. \r\n\r\nIs that the correct solution?\r\n Would it be a nicer API if there was a function analogous to `_add_docstr` which also defined the `__module__` attribute when setting the doc string.\r\n\r\n\r\ncc @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/77589",
    "state": "open",
    "labels": [
      "module: tests",
      "triaged"
    ],
    "created_at": "2022-05-16T20:40:52Z",
    "updated_at": "2022-05-17T14:37:45Z",
    "user": "drisspg"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4352,
    "title": "When using `dataset.map()` if passed `Features` types do not match what is returned from the mapped function, execution does not except in an obvious way",
    "body": "## Describe the bug\r\nRecently I was trying to using `.map()` to preprocess a dataset. I defined the expected Features and passed them into `.map()` like `dataset.map(preprocess_data, features=features)`. My expected `Features` keys matched what came out of `preprocess_data`, but the types i had defined for them did not match the types that came back. Because of this, i ended up in tracebacks deep inside arrow_dataset.py and arrow_writer.py with exceptions that [did not make clear what the problem was](https://github.com/huggingface/datasets/issues/4349). In short i ended up with overflows and the OS killing processes when Arrow was attempting to write. It wasn't until I dug into `def write_batch` and the loop that loops over cols that I figured out what was going on.\r\n\r\nIt seems like `.map()` could set a boolean that it's checked that for at least 1 instance from the dataset, the returned data's types match the types provided by the `features` param and error out with a clear exception if they don't. This would make the cause of the issue much more understandable and save people time. This could be construed as a feature but it feels more like a bug to me.\r\n\r\n## Steps to reproduce the bug\r\nI don't have explicit code to repro the bug, but ill show an example\r\n\r\nCode prior to the fix:\r\n```python\r\ndef preprocess(examples):\r\n    # returns an encoded data dict with keys that match the features, but the types do not match\r\n...\r\n\r\ndef get_encoded_data(data):\r\n  dataset = Dataset.from_pandas(data)\r\n      unique_labels = data['audit_type'].unique().tolist()\r\n      features = Features({\r\n          'image': Array3D(dtype=\"uint8\", shape=(3, 224, 224))),\r\n          'input_ids': Sequence(feature=Value(dtype='int64'))),\r\n          'attention_mask': Sequence(Value(dtype='int64'))),\r\n          'token_type_ids': Sequence(Value(dtype='int64'))),\r\n          'bbox': Array2D(dtype=\"int64\", shape=(512, 4))),\r\n          'label': ClassLabel(num_classes=len(unique_labels), names=unique_labels),\r\n      })\r\n\r\n      encoded_dataset = dataset.map(preprocess_data, features=features, remove_columns=dataset.column_names)\r\n```\r\n\r\nThe Features set that fixed it:\r\n```python\r\n    features = Features({\r\n        'image': Sequence(Array3D(dtype=\"uint8\", shape=(3, 224, 224))),\r\n        'input_ids': Sequence(Sequence(feature=Value(dtype='int64'))),\r\n        'attention_mask': Sequence(Sequence(Value(dtype='int64'))),\r\n        'token_type_ids': Sequence(Sequence(Value(dtype='int64'))),\r\n        'bbox': Sequence(Array2D(dtype=\"int64\", shape=(512, 4))),\r\n        'label': ClassLabel(num_classes=len(unique_labels), names=unique_labels),\r\n    })\r\n```\r\nThe difference between my original code (which was based on documentation) and the working code is the addition of the `Sequence(...)` to 4/5 features as I am working with paginated data and the doc examples are not.\r\n\r\n## Expected results\r\nDataset.map() attempts to validate the data types for each Feature on the first iteration and errors out if they are not validated.\r\n\r\n## Actual results\r\nSpecify the actual results or traceback.\r\nBased on the value of `writer_batch_size`, execution errors out when Arrow attempts to write because the types do not match, though its error messages dont make this obvious\r\n\r\nExample errors:\r\n```\r\nOverflowError: There was an overflow with type <class 'list'>. Try to reduce writer_batch_size to have batches smaller than 2GB.\r\n(offset overflow while concatenating arrays)\r\n```\r\n\r\n```\r\nzsh: killed     python doc_classification.py\r\n\r\nUserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown\r\n```\r\n\r\n## Environment info\r\n<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->\r\ndatasets version: 2.1.0\r\nPlatform: macOS-12.2.1-arm64-arm-64bit\r\nPython version: 3.9.12\r\nPyArrow version: 6.0.1\r\nPandas version: 1.4.2\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4352",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2022-05-14T17:55:15Z",
    "updated_at": "2022-05-16T15:09:17Z",
    "user": "plamb-viso"
  },
  {
    "repo": "huggingface/optimum",
    "number": 191,
    "title": "Not possible to configure GPU in pipelines nor leveraging batch_size parallelisation",
    "body": "When setting the `device` variable in the `pipeline` function/class to `>= 0`, an error appears `AttributeError: 'ORTModelForCausalLM' object has no attribute 'to' - when running in GPU`. This was initially reported in #161 so opening this issue to encompass supporting the `device` parameter in the ORT classes. This is important as otherwise it won't be possible to allow configuration of CPU/GPU similar to normal transformer libraries.\r\n\r\nIs there currently a workaround to ensure that the class is run on GPU? By default it seems this woudl eb set in CPU even when GPU is available:\r\n```python\r\n>>> m = ORTModelForCausalLM.from_pretrained(\"gpt2\", from_transformers=True)\r\n>>> t = AutoTokenizer.from_pretrained(\"gpt2\")\r\n>>> pp = pipeline(\"text-generation\", model=m, tokenizer=t)\r\n>>> pp.device\r\n\r\ndevice(type='cpu')\r\n```\r\n\r\nThis is still the case even with the `optimum[onnxruntime-gpu]` package. I have validated by testing against a normal transformer with `batch_size=X` (ie `pp = pipeline(\"text-generation\", model=m, tokenizer=t, batch_size=128)`) and it seems there is no optimization with parallel processing with optimum, whereas normal transformer is orders of magnitude faster (which is most likely as it's not utilizing the parallelism)\r\n\r\nI can confirm that the model is loaded with GPU correctly:\r\n\r\n```python\r\n>>> m.device\r\n\r\ndevice(type='cuda', index=0)\r\n```\r\n\r\nAnd GPU is configured correctly:\r\n\r\n```python\r\n>>> from optimum.onnxruntime.utils import _is_gpu_available\r\n>>> _is_gpu_available()\r\n\r\nTrue\r\n```\r\n\r\nIs there a way to enable GPU for processing with batching in optimum?",
    "url": "https://github.com/huggingface/optimum/issues/191",
    "state": "closed",
    "labels": [
      "inference"
    ],
    "created_at": "2022-05-14T05:05:51Z",
    "updated_at": "2022-09-05T08:37:46Z",
    "comments": 4,
    "user": "axsaucedo"
  },
  {
    "repo": "pytorch/vision",
    "number": 6011,
    "title": "Imagenet Version not documented?",
    "body": "### \ud83d\udcda The doc issue\n\nHello torchvision team,\r\n\r\nFirst, thanks for the epic work you are all putting into this tool! I would like to know the exact version of imagenet used at pertaining different models in torchvision, for research purposes regarding model inversion. All of them use the 2012 Imagenet Dataset version or maybe some newer version?\r\n\r\nThank you,\r\nTudor\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/vision/issues/6011",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-05-13T11:24:32Z",
    "updated_at": "2022-05-13T11:51:24Z",
    "user": "tudorcebere"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4343,
    "title": "Metrics documentation is not accessible in the datasets doc UI",
    "body": "**Is your feature request related to a problem? Please describe.**\r\nSearch for a metric name like \"seqeval\" yields no results on https://huggingface.co/docs/datasets/master/en/index . One needs to go look in `datasets/metrics/README.md` to find the doc. Even in the `README.md`, it can be hard to understand what the metric expects as an input, for example for `squad` there is a [key `id`](https://github.com/huggingface/datasets/blob/1a4c185663a6958f48ec69624473fdc154a36a9d/metrics/squad/squad.py#L42) documented only in the function doc but not in the `README.md`, and one needs to go look into the code to understand what the metric expects.\r\n\r\n**Describe the solution you'd like**\r\nHave the documentation for metrics appear as well in the doc UI, e.g. this https://github.com/huggingface/datasets/blob/1a4c185663a6958f48ec69624473fdc154a36a9d/metrics/squad/squad.py#L21-L63\r\n\r\nI know there are plans to migrate metrics to the evaluate library, but just pointing this out.\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4343",
    "state": "closed",
    "labels": [
      "enhancement",
      "Metric discussion"
    ],
    "created_at": "2022-05-13T07:46:30Z",
    "updated_at": "2022-06-03T08:50:25Z",
    "comments": 1,
    "user": "fxmarty"
  },
  {
    "repo": "huggingface/optimum",
    "number": 183,
    "title": "about run_glue.py",
    "body": "how to enable GPU when run run_glue.py",
    "url": "https://github.com/huggingface/optimum/issues/183",
    "state": "closed",
    "labels": [],
    "created_at": "2022-05-12T12:13:16Z",
    "updated_at": "2022-06-23T13:35:25Z",
    "comments": 1,
    "user": "yichuan-w"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 255,
    "title": "Create a custom nginx image?",
    "body": "I think it would be clearer to create a custom nginx image, in /services/reverse-proxy, than the current \"hack\" with a template and env vars on the official nginx image.\r\n\r\nThis way, all the services (API, worker, reverse-proxy) would follow the same flow.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/255",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-05-12T08:48:12Z",
    "updated_at": "2022-09-16T17:43:30Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4323,
    "title": "Audio can not find value[\"bytes\"]",
    "body": "## Describe the bug\r\nI wrote down _generate_examples like:\r\n![image](https://user-images.githubusercontent.com/34292279/168027186-2fe8b255-2cd8-4b9b-ab1e-8d5a7182979b.png)\r\n\r\nbut where is the bytes?\r\n![image](https://user-images.githubusercontent.com/34292279/168027330-f2496dd0-1d99-464c-b15c-bc57eee0415a.png)\r\n\r\n\r\n## Expected results\r\nvalue[\"bytes\"] is not None, so i can make datasets with bytes, not path\r\n\r\n## bytes looks like:\r\nblah blah~~\r\n\\xfe\\x03\\x00\\xfb\\x06\\x1c\\x0bo\\x074\\x03\\xaf\\x01\\x13\\x04\\xbc\\x06\\x8c\\x05y\\x05,\\t7\\x08\\xaf\\x03\\xc0\\xfe\\xe8\\xfc\\x94\\xfe\\xb7\\xfd\\xea\\xfa\\xd5\\xf9$\\xf9>\\xf9\\x1f\\xf8\\r\\xf5F\\xf49\\xf4\\xda\\xf5-\\xf8\\n\\xf8k\\xf8\\x07\\xfb\\x18\\xfd\\xd9\\xfdv\\xfd\"\\xfe\\xcc\\x01\\x1c\\x04\\x08\\x04@\\x04{\\x06^\\tf\\t\\x1e\\x07\\x8b\\x06\\x02\\x08\\x13\\t\\x07\\x08 \\x06g\\x06\"\\x06\\xa0\\x03\\xc6\\x002\\xff \\xff\\x1d\\xff\\x19\\xfd?\\xfb\\xdb\\xfa\\xfc\\xfa$\\xfb}\\xf9\\xe5\\xf7\\xf9\\xf7\\xce\\xf8.\\xf9b\\xf9\\xc5\\xf9\\xc0\\xfb\\xfa\\xfcP\\xfc\\xba\\xfbQ\\xfc1\\xfe\\x9f\\xff\\x12\\x00\\xa2\\x00\\x18\\x02Z\\x03\\x02\\x04\\xb1\\x03\\xc5\\x03W\\x04\\x82\\x04\\x8f\\x04U\\x04\\xb6\\x04\\x10\\x05{\\x04\\x83\\x02\\x17\\x01\\x1d\\x00\\xa0\\xff\\xec\\xfe\\x03\\xfe#\\xfe\\xc2\\xfe2\\xff\\xe6\\xfe\\x9a\\xfe~\\x01\\x91\\x08\\xb3\\tU\\x05\\x10\\x024\\x02\\xe4\\x05\\xa8\\x07\\xa7\\x053\\x07I\\n\\x91\\x07v\\x02\\x95\\xfd\\xbb\\xfd\\x96\\xff\\x01\\xfe\\x1e\\xfb\\xbb\\xf9S\\xf8!\\xf8\\xf4\\xf5\\xd6\\xf3\\xf7\\xf3l\\xf4d\\xf6l\\xf7d\\xf6b\\xf7\\xc1\\xfa(\\xfd\\xcf\\xfd*\\xfdq\\xfe\\xe9\\x01\\xa8\\x03t\\x03\\x17\\x04B\\x07\\xce\\t\\t\\t\\xeb\\x06\\x0c\\x07\\x95\\x08\\x92\\t\\xbc\\x07O\\x06\\xfb\\x06\\xd2\\x06U\\x04\\x00\\x02\\x92\\x00\\xdc\\x00\\x84\\x00 \\xfeT\\xfc\\xf1\\xfb\\x82\\xfc\\x97\\xfb}\\xf9\\x00\\xf8_\\xf8\\x0b\\xf9\\xe5\\xf8\\xe2\\xf7\\xaa\\xf8\\xb2\\xfa\\x10\\xfbl\\xfa\\xf5\\xf9Y\\xfb\\xc0\\xfd\\xe8\\xfe\\xec\\xfe1\\x00\\xad\\x01\\xec\\x02E\\x03\\x13\\x03\\x9b\\x03o\\x04\\xce\\x04\\xa8\\x04\\xb2\\x04\\x1b\\x05\\xc0\\x05\\xd2\\x04\\xe8\\x02z\\x01\\xbe\\x00\\xae\\x00\\x07\\x00$\\xff|\\xff\\x8e\\x00\\x13\\x00\\x10\\xff\\x98\\xff0\\x05{\\x0b\\x05\\t\\xaa\\x03\\x82\\x01n\\x03\r\nblah blah~~\r\n\r\nthat function not return None\r\n\r\n## Environment info\r\n<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->\r\n- `datasets` version:2.2.1\r\n- Platform:ubuntu 18.04\r\n- Python version:3.6.9\r\n- PyArrow version:6.0.1\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4323",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-05-12T08:31:58Z",
    "updated_at": "2022-07-07T13:16:08Z",
    "comments": 9,
    "user": "YooSungHyun"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 77341,
    "title": "The input of the forward part of my model is a tuple, which cannot be converted to onnx format according to the existing methods. Can you tell me how to solve it",
    "body": "### \ud83d\udc1b Describe the bug\n\nimport torch\r\nimport torch.nn as nn\r\n\r\n\r\nclass Model(nn.Module):\r\n    def __init__(self):\r\n        super(Model, self).__init__()\r\n        self.conv1 = nn.Linear(32, 16)\r\n        self.relu1 = nn.ReLU(inplace=True)\r\n        self.relu2 = nn.ReLU(inplace=True)\r\n        self.fc = nn.Linear(32, 2)\r\n\r\n    def forward(self, x):\r\n        x1, x2 = x\r\n        x1 = self.conv1(x1)\r\n        x1 = self.relu1(x1)\r\n        x2 = self.conv1(x2)\r\n        x2 = self.relu1(x2)\r\n        out = torch.cat((x1, x2), dim=-1)\r\n        out = self.fc(out)\r\n        return out\r\n\r\n\r\nmodel = Model()\r\nmodel.eval()\r\n\r\nx1 = torch.randn((2, 10, 32))\r\nx2 = torch.randn((2, 10, 32))\r\nx = (x1, x2)\r\n\r\ntorch.onnx.export(model,\r\n                  x,\r\n                  'model.onnx',\r\n                  input_names=[\"input\"],\r\n                  output_names=[\"output\"],\r\n                  dynamic_axes={'input': {0: 'batch'}, 'output': {0: 'batch'}}\r\n                  )\r\nprint(\"Done\")\r\n\n\n### Versions\n\nBe like title!",
    "url": "https://github.com/pytorch/pytorch/issues/77341",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2022-05-12T06:38:49Z",
    "updated_at": "2022-05-18T01:04:49Z",
    "user": "singaln"
  },
  {
    "repo": "pytorch/extension-ffi",
    "number": 26,
    "title": "How to fix \"undefined symbol: state error\" once  importing a c shared library? ",
    "body": "I'm trying to import  the compiled c shared library \"_crop_and_resize.so\", but I am receiving below error! \r\n\r\npytorch version = 1.9.0+cu102\r\n\r\nTorchvision version = 0.9.1\r\n\r\npython version = 3.6.10\r\n\r\n```\r\n>>> import _crop_and_resize as _backend\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nImportError: /home/username/DeepFacade01/roialign/roi_align/_ext/crop_and_resize/_crop_and_resize.so: undefined symbol: state\r\n>>> \r\n```",
    "url": "https://github.com/pytorch/extension-ffi/issues/26",
    "state": "closed",
    "labels": [],
    "created_at": "2022-05-12T00:01:49Z",
    "updated_at": "2022-05-14T22:33:53Z",
    "user": "Abbsalehi"
  },
  {
    "repo": "pytorch/examples",
    "number": 1004,
    "title": "error: the following arguments are required: DIR",
    "body": "Excuse me\uff0chow can I deal with this problem\uff1f\r\n<img width=\"1227\" alt=\"image\" src=\"https://user-images.githubusercontent.com/58496897/167763473-f5d2a189-3ac5-4e77-9451-c6817065d5ed.png\">",
    "url": "https://github.com/pytorch/examples/issues/1004",
    "state": "closed",
    "labels": [],
    "created_at": "2022-05-11T03:31:07Z",
    "updated_at": "2022-07-01T16:07:30Z",
    "comments": 1,
    "user": "Elijah123463"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 77228,
    "title": "How can i  remove  'lib/libtorch_cuda.so'  gracefully to make deploy more small.  \u3010Questions and Help\u3011",
    "body": "i want import torch  in my project . and i will not use 'cuda' clearly .\r\n\r\nhow can i to remove  'lib/libtorch_cuda.so'  gracefully to make deploy package more smaller. (serverless deploy)\r\n\r\ni remove lib/libtorch_cuda.so ,then cmd 'python3 index.py'  . the result show...\r\n\r\n**Traceback (most recent call last):\r\n  File \"index.py\", line 7, in <module>\r\n    import torch\r\n  File \"/root/python/src/pic-linux_all/torch/__init__.py\", line 199, in <module>\r\n    from torch._C import *  # noqa: F403\r\nImportError: libtorch_cuda.so: cannot open shared object file: No such file or directory**\r\n\r\nwhat should  I do.\r\n\r\n### torch :  i use 'pip install' to install it\r\n\r\n\r\n### Versions\r\n\r\nPython version: 3.8.0 (default, May 11 2022, 08:57:48)  [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] (64-bit runtime)\r\nPython platform: Linux-3.10.0-514.26.2.el7.x86_64-x86_64-with-glibc2.17\r\nIs CUDA available: N/A\r\nCUDA runtime version: Could not collect\r\nGPU models and configuration: Could not collect\r\nNvidia driver version: Could not collect\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: N/A\r\n\r\nVersions of relevant libraries:\r\n[pip3] No relevant packages\r\n[conda] Could not collect\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/77228",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2022-05-11T03:27:31Z",
    "updated_at": "2022-05-12T00:26:04Z",
    "user": "wangping886"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 241,
    "title": "Setup the users directly in the images, not in Kubernetes?",
    "body": "See the second point in https://snyk.io/blog/10-kubernetes-security-context-settings-you-should-understand/: using `runAsUser` / `runAsGroup` is a (relative) security risk.\r\n\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/241",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-05-10T15:15:49Z",
    "updated_at": "2022-09-19T08:57:20Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1049,
    "title": "\u2753 [Question] How can I move the converted tensorRT model in a Jetson system?",
    "body": "## \u2753 Question\r\n\r\nI optimized a pytorch module with torch-TensorRT. How can I move the engine to a Jetson?\r\n\r\n## What you have already tried\r\n\r\n\r\nI tried torch.jit.load('trt_traced_model.ts') \r\n\r\nbut get **__torch__.torch.classes.tensorrt.Engine** error\r\n\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 10.0\r\n - OS (e.g., Linux): ARM Ubuntu 18\r\n - How you installed PyTorch : pip from offical Nvidia support\r\n - Python version: 3.6\r\n - CUDA version: 10.2\r\n - GPU models and configuration: Jetson NX\r\n\r\n## Additional context\r\nI have a Jetson NX system with jetpack 4.6, torch v0.10.0 and torchvision v0.11.0 where I want to deploy a tensorRT model.\r\n\r\nFor that in my main computer I installed this repository and converted my model to tensorRT successfully.  I need to move it into the Jetson for production.\r\n\r\nThis is the code that I use to export to tensorRT (main computer)\r\n\r\n```\r\nmodel.cuda().eval()\r\nmodel = torch.jit.trace(model, [torch.rand(1, 3, 224, 224).cuda()])\r\ntrt_model_fp32 = torch_tensorrt.compile(model,\r\n                                            inputs=[torch_tensorrt.Input((1, 3, 224, 224))],\r\n                                            enabled_precisions=torch.float32,  # Run with FP32\r\n                                            )\r\ntorch.jit.save(trt_model_fp32, dir)\r\n```\r\n\r\nThis is in my Jetson\r\n\r\n`model = torch.jit.load(dir)`\r\n\r\nbut i get  **__torch__.torch.classes.tensorrt.Engine** error\r\n\r\nJetson hasn't installed torch-tensorRT. How can I move the tensorRT model? Do I need to install this repo also in the Jetson?\r\n\r\nThanks!\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1049",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-05-10T15:08:47Z",
    "updated_at": "2022-05-10T15:45:51Z",
    "user": "mjack3"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4304,
    "title": "Language code search does direct matches",
    "body": "## Describe the bug\r\n\r\nHi. Searching for bcp47 tags that are just the language prefix (e.g. `sq` or `da`) excludes datasets that have added extra information in their language metadata (e.g. `sq-AL` or `da-bornholm`). The example codes given in the [tagging app](https://huggingface.co/spaces/huggingface/datasets-tagging) encourages addition of the additional codes (\"_expected format is BCP47 tags separated for ';' e.g. 'en-US;fr-FR'_\") but this would lead to those datasets being hidden in datasets search.\r\n\r\n## Steps to reproduce the bug\r\n1. Add a dataset using a variant tag (e.g. [`sq-AL`](https://huggingface.co/datasets?languages=languages:sq-AL))\r\n2. Look for datasets using the full code \r\n3. Note that they're missing when just the language is searched for (e.g. [`sq`](https://huggingface.co/datasets?languages=languages:sq))\r\n\r\nSome datasets are already affected by this - e.g. `AmazonScience/massive` is listed under `sq-AL` but not `sq`.\r\n\r\nOne workaround is for dataset creators to add an additional root language tag to dataset YAML metadata, but it's unclear how to communicate this. It might be possible to index the search on `languagecode.split('-')[0]` but I wanted to float this issue before trying to write any code :)\r\n\r\n## Expected results\r\nDatasets using longer bcp47 tags also appear under searches for just the language code; e.g. Quebecois datasets (`fr-CA`) would come up when looking for French datasets with no region specification (`fr`), or US English (`en-US`) datasets would come up when searching for English datasets (`en`).\r\n\r\n## Actual results\r\nThe language codes seem to be directly string matched, excluding datasets with specific language tags from non-specific searches.\r\n\r\n## Environment info\r\n(web app)",
    "url": "https://github.com/huggingface/datasets/issues/4304",
    "state": "open",
    "labels": [
      "bug"
    ],
    "created_at": "2022-05-10T11:59:16Z",
    "updated_at": "2022-05-10T12:38:42Z",
    "comments": 1,
    "user": "leondz"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1047,
    "title": "can torch-tensorrt-1.1.0 support libtorch1.9 and cuda10.2?",
    "body": "## \u2753 Question\r\n\r\nI want to know if torch-tensorrt-1.1.0 can be compiled with libtorch1.9 and cuda-10.2 ?\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.9.0):\r\n - CPU Architecture: x86\r\n - OS (e.g., Linux): linux\r\n - CUDA version:10.2\r\n - GPU models and configuration:T4\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1047",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-05-10T11:54:58Z",
    "updated_at": "2022-05-11T07:27:45Z",
    "user": "f291400"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1045,
    "title": "\u2753 __torch__.torch.classes.tensorrt.Engine what does it mean?",
    "body": "Hello community and thanks for this repo.\r\n\r\n\r\n## \u2753 Question\r\n\r\nHow can I load a tensorRT model after using torch.jit.save?\r\n\r\n## What you have already tried\r\n\r\n```\r\nimport torch\r\nmodel = torch.jit.load('trt_model.torch-tensorrt') # give error __torch__.torch.classes.tensorrt.Engine\r\n```\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.10\r\n - CPU Architecture: x64\r\n - OS (e.g., Linux): 20.04\r\n - How you installed PyTorch: conda\r\n - Python version: 3.8\r\n - CUDA version: 11.6\r\n - GPU models and configuration: Nvidia RTX3090\r\n - Information: torchvision installed by pip3 install torch-tensorrt -f https://github.com/NVIDIA/Torch-TensorRT/releases\r\n\r\n\r\n## Additional context\r\n\r\nMy code is very simple:\r\n\r\n```\r\nimport torch\r\nimport torch_tensorrt\r\n\r\ntraced_model = torch.jit.trace(eager_model, [torch.rand(1, 3, 224, 224).to(device)])\r\ntrt_model = torch_tensorrt.compile(traced_model,\r\n                                       inputs= [torch_tensorrt.Input((1, 3, 224, 224))],\r\n                                       enabled_precisions={torch.float32})\r\ntorch.jit.save(trt_model, 'trt_model.torch-tensorrt')\r\nmodel = torch.jit.load('trt_model.torch-tensorrt') # give error __torch__.torch.classes.tensorrt.Engine\r\n```\r\nAt the end, I want to move the trt_model.torch-tensorrt file into an Jetson for load with torch.jit.load\r\n\r\nThanks\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1045",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-05-10T09:56:05Z",
    "updated_at": "2022-09-03T02:25:25Z",
    "user": "mjack3"
  },
  {
    "repo": "pytorch/data",
    "number": 391,
    "title": "Allow users to provide `auth` and other data to `HttpReader`",
    "body": "### \ud83d\ude80 The feature\n\nThis should extend the functionality of `HttpReader` to send more complicated POST request.\r\nFor authentication, users don't necessarily need to provide via `http://user:password@domain.com/`. They should be able to provide `auth` to the `HttpReader` and relay it to `request`.\r\n\r\nhttps://github.com/pytorch/data/blob/8b95954ce431ade5905448ebd9a2909e30566377/torchdata/datapipes/iter/load/online.py#L38-L43\n\n### Motivation, pitch\n\nVersatile `HttpReader`\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/meta-pytorch/data/issues/391",
    "state": "closed",
    "labels": [
      "good first issue",
      "help wanted"
    ],
    "created_at": "2022-05-09T22:36:27Z",
    "updated_at": "2022-05-11T19:28:14Z",
    "comments": 3,
    "user": "ejguan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1034,
    "title": "torch_tensorrt.compile  dynamic input shape failed",
    "body": "## dynamic input shape failed\r\n\r\n![image](https://user-images.githubusercontent.com/13358476/167369566-faabca74-ba4d-453c-a7b8-ef55aa6fc500.png)\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/13358476/167369373-9980b51f-330b-4905-a0c8-7e1ea529fbc7.png)\r\n\r\nif set min_shape=[1,3,h, h] and op_shape= [1,3, h, h] and max_shape = [1,3, h, h] , which h is 32 or 512 or 1024,  it works. but if set\r\nmin_shape = [1, 3, 32, 32] and op_shape=[1,3,512,512] and max_shape = [1, 3, 1024, 1024], it is failed .\r\n\r\n## Environment\r\n![image](https://user-images.githubusercontent.com/13358476/167370248-ad9ff570-fdfa-4b6b-af2a-3b05d063820d.png)\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1034",
    "state": "closed",
    "labels": [
      "question",
      "component: core",
      "No Activity"
    ],
    "created_at": "2022-05-09T08:25:50Z",
    "updated_at": "2022-08-21T00:02:41Z",
    "user": "f291400"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 77016,
    "title": "Where is fx2trt fx to tensorrt tool?",
    "body": "### \ud83d\udcda The doc issue\n\nI found there are some PR:\r\n\r\nhttps://github.com/jerryzh168/pytorch/tree/fb09fd4ab4ba618db148f9dfc035be589efb9355/torch/fx/experimental/fx2trt\r\n\r\nwhich persist of fx2trt tool, where does it goes in main stream pytorch code?\n\n### Suggest a potential alternative/fix\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/77016",
    "state": "open",
    "labels": [
      "triaged",
      "module: fx"
    ],
    "created_at": "2022-05-07T08:43:04Z",
    "updated_at": "2022-07-20T21:25:20Z",
    "user": "lucasjinreal"
  },
  {
    "repo": "pytorch/serve",
    "number": 1609,
    "title": "How to set model batch size with TS_ environmental var",
    "body": "## \ud83d\udcda Documentation\r\n\r\nHi, I can't seem to figure out how to set the batch size with an environmental parameter. \r\n\r\nMy `config.properties` looks like this:\r\n\r\n```\r\ninference_address=http://0.0.0.0:8080\r\nmanagement_address=http://0.0.0.0:8081\r\nnumber_of_netty_threads=32\r\nenable_envvars_config=true\r\njob_queue_size=1000\r\nmodel_store=/opt/ml/model\r\nload_models=all\r\nenable_metrics_api=false\r\nmodels={\\\r\n  \"model\": {\\\r\n    \"1.0\": {\\\r\n        \"defaultVersion\": true,\\\r\n        \"marName\": \"model.mar\",\\\r\n        \"runtime\": \"python3\",\\\r\n        \"minWorkers\": 1,\\\r\n        \"maxWorkers\": 4,\\\r\n        \"batchSize\": 16,\\\r\n        \"maxBatchDelay\": 50,\\\r\n        \"responseTimeout\": 120\\\r\n    }\\\r\n  }\\\r\n}\r\n```\r\n\r\nBut I would like to be able to override `batchSize` with an env variable so that load testing is more simple (just creating endpoints with different env params instead of needing to generate different config files)\r\n",
    "url": "https://github.com/pytorch/serve/issues/1609",
    "state": "closed",
    "labels": [],
    "created_at": "2022-05-05T14:25:43Z",
    "updated_at": "2022-05-09T21:52:41Z",
    "user": "austinmw"
  },
  {
    "repo": "pytorch/vision",
    "number": 5945,
    "title": "Training recipe for these weights",
    "body": "https://github.com/pytorch/vision/blob/62740807c18e68bb0acd85895dca527f9a655bd5/torchvision/models/vision_transformer.py#L377\r\n\r\nDoes anyone know how these weights were generated. Where they training from scratch only on ImageNet 1k or was it pre-trained on ImageNet 21k? Looking at the original Vision transformer paper: https://arxiv.org/abs/2010.11929 I'm not quite sure where the accuracy numbers in these lines are coming from:\r\n\r\n```python\r\nclass ViT_B_32_Weights(WeightsEnum):\r\n    IMAGENET1K_V1 = Weights(\r\n        url=\"https://download.pytorch.org/models/vit_b_32-d86f8d99.pth\",\r\n        transforms=partial(ImageClassification, crop_size=224),\r\n        meta={\r\n            **_COMMON_META,\r\n            \"num_params\": 88224232,\r\n            \"min_size\": (224, 224),\r\n            \"recipe\": \"https://github.com/pytorch/vision/tree/main/references/classification#vit_b_32\",\r\n            \"metrics\": {\r\n                \"acc@1\": 75.912,\r\n                \"acc@5\": 92.466,\r\n            },\r\n        },\r\n    )\r\n    DEFAULT = IMAGENET1K_V1\r\n```\r\n\r\nHere's the corresponding numbers presented in the original Vision Transformer paper, ViT-B/32 accuracy of 75.912 is not in either the ImageNet 1k or the ImageNet 21k columns:\r\n\r\n![image](https://user-images.githubusercontent.com/1216594/166825518-d0279f89-b604-4ec7-9b61-ca13da794a71.png)\r\n\r\n\n\ncc @datumbox",
    "url": "https://github.com/pytorch/vision/issues/5945",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2022-05-04T21:07:25Z",
    "updated_at": "2022-05-05T16:49:12Z",
    "user": "briancheung"
  },
  {
    "repo": "pytorch/serve",
    "number": 1606,
    "title": "How to distribute multi models to each gpu?",
    "body": "I have two models: model0,model1 and two gpus: gpu0,gpu1. I want to set model0 to gpu0,model0 to gpu1,it means that the work of model0 will always on gpu0 and model1 is on gpu1.\r\nHow to make it?\r\nIs it possible to implement by serve configuration or handle.py?\r\nCould you help me?Thank you very much!",
    "url": "https://github.com/pytorch/serve/issues/1606",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-05-04T16:08:39Z",
    "updated_at": "2022-05-12T01:56:17Z",
    "user": "dzcmingdi"
  },
  {
    "repo": "pytorch/data",
    "number": 382,
    "title": "The protocol of fsspec can be a list of strings rather than a single string",
    "body": "### \ud83d\udc1b Describe the bug\n\nhttps://github.com/pytorch/data/blob/92d18b088eb43b9805bed5c90a0afca87292a338/torchdata/datapipes/iter/load/fsspec.py#L61-L62\r\nThe `fs.protocol` can be a list rather than a string. For example of `s3`, it will return a list of `['s3', 's3a']`.\r\nThen, there will be an error due to `self.root.startswith(fs.protocol)`. We can't run `startswith` with a list.\n\n### Versions\n\nmain",
    "url": "https://github.com/meta-pytorch/data/issues/382",
    "state": "closed",
    "labels": [
      "good first issue"
    ],
    "created_at": "2022-05-03T21:47:05Z",
    "updated_at": "2022-05-04T16:50:16Z",
    "comments": 1,
    "user": "ejguan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1019,
    "title": "Missing 3 input files: libnvinfer_plugin.so, libcudnn.so and libnvinfer.so",
    "body": "## \u2753 Question\r\nI've been looking at all the great progress done previously when it comes to using Torch-TensorRT on Windows. \r\nI made progress to the point that it seems like only 1 thing is missing. I'm missing the 3 .so mentioned above. \r\nHow are they supposed to be built? Am I missing something? Is there any fix that I missed? \r\n\r\n\r\n## What you have already tried\r\n\r\nI followed the guides from from #856 \r\n\r\n## Environment\r\n\r\nWindows 10, trying to build for Visual Studio usage\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.11.0\r\n - CPU Architecture:  i9\r\n - OS (e.g., Linux):  Windows 10\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): libtorch\r\n - Build command you used (if compiling from source):  bazel\r\n - Are you using local sources or building from archives: building from archive\r\n - Python version: 3.9\r\n - CUDA version: 11.5\r\n - GPU models and configuration:  RTX3090\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1019",
    "state": "closed",
    "labels": [
      "question",
      "channel: windows"
    ],
    "created_at": "2022-05-03T01:10:39Z",
    "updated_at": "2022-08-01T16:01:45Z",
    "user": "fschvart"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1014,
    "title": "\u2753 [Question] Building torch_tensorrt.lib on Windows",
    "body": "## \u2753 Question\r\n\r\nI am wondering how to build the torch_tensorrt.lib on Windows.\r\n\r\n## What you have already tried\r\n\r\nI have followed #960 and #856 (with the same WORKSPACE as the latter) and managed to successfully build torch_tensorrt.dll. However, I need the .lib file in order to compile my Libtorch program. I tried linking to some of the .lib files that were created already (like bazel-out\\x64_windows-opt\\bin\\cpp\\torch_tensorrt.lo.lib), but that didn't work. I expect it's a fairly simple bazel command, but I have no idea where to put it.\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.10.0 (release)\r\n - CPU Architecture: x86-64\r\n - OS (e.g., Linux): Windows 10\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): libtorch from pytorch.org\r\n - Build command you used (if compiling from source): bazel build //:libtorchtrt --compilation_mode opt\r\n - CUDA version: 11.3\r\n - Any other relevant information: Using VS2019\r\n\r\n## Additional context\r\n\r\nMy libtorch program runs fine even if I include the torch-tensorrt headers, but throws the following errors as soon as I try to use torch_tensorrt::torchscript::CompileSpec and call torch_tensorrt::torchscript::compile:\r\nError\tLNK1120\t2 unresolved externals\tOmkar 1.10.0+cu113\tB:\\Programming\\_Current Projects\\HelloLibTorch\\x64\\Release\\HelloTorch.exe\t1\r\n\t\r\nError\tLNK2019\tunresolved external symbol \"public: __cdecl torch_tensorrt::torchscript::CompileSpec::CompileSpec(class std::vector<class std::vector<__int64,class std::allocator<__int64> >,class std::allocator<class std::vector<__int64,class std::allocator<__int64> > > >)\" (??0CompileSpec@torchscript@torch_tensorrt@@QEAA@V?$vector@V?$vector@_JV?$allocator@_J@std@@@std@@V?$allocator@V?$vector@_JV?$allocator@_J@std@@@std@@@2@@std@@@Z) referenced in function main\tOmkar 1.10.0+cu113\tB:\\Programming\\_Current Projects\\HelloLibTorch\\main.obj\t1\t\r\n\r\nError\tLNK2019\tunresolved external symbol \"struct torch::jit::Module __cdecl torch_tensorrt::torchscript::compile(struct torch::jit::Module const &,struct torch_tensorrt::torchscript::CompileSpec)\" (?compile@torchscript@torch_tensorrt@@YA?AUModule@jit@torch@@AEBU345@UCompileSpec@12@@Z) referenced in function main\tOmkar 1.10.0+cu113\tB:\\Programming\\_Current Projects\\HelloLibTorch\\main.obj\t1\t\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1014",
    "state": "closed",
    "labels": [
      "question",
      "channel: windows"
    ],
    "created_at": "2022-04-29T14:24:59Z",
    "updated_at": "2022-09-02T18:09:26Z",
    "user": "jonahclarsen"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4238,
    "title": "Dataset caching policy",
    "body": "## Describe the bug\r\nI cannot clean cache of my datasets files, despite I have updated the `csv` files on the repository [here](https://huggingface.co/datasets/loretoparisi/tatoeba-sentences). The original file had a line with bad characters, causing the following error\r\n\r\n```\r\n[/usr/local/lib/python3.7/dist-packages/datasets/features/features.py](https://localhost:8080/#) in str2int(self, values)\r\n    852                 if value not in self._str2int:\r\n    853                     value = str(value).strip()\r\n--> 854                 output.append(self._str2int[str(value)])\r\n    855             else:\r\n    856                 # No names provided, try to integerize\r\n\r\nKeyError: '\\\\N'\r\n```\r\n\r\nThe file now is cleanup up, but I still get the error. This happens even if I inspect the local cached contents, and cleanup the files locally:\r\n\r\n```python\r\nfrom datasets import load_dataset_builder\r\ndataset_builder = load_dataset_builder(\"loretoparisi/tatoeba-sentences\")\r\nprint(dataset_builder.cache_dir)\r\nprint(dataset_builder.info.features)\r\nprint(dataset_builder.info.splits)\r\n```\r\n\r\n```\r\nUsing custom data configuration loretoparisi--tatoeba-sentences-e59b8ad92f1bb8dd\r\n/root/.cache/huggingface/datasets/csv/loretoparisi--tatoeba-sentences-e59b8ad92f1bb8dd/0.0.0/433e0ccc46f9880962cc2b12065189766fbb2bee57a221866138fb9203c83519\r\nNone\r\nNone\r\n```\r\n\r\nand removing files located at `/root/.cache/huggingface/datasets/csv/loretoparisi--tatoeba-sentences-*`.\r\n Is there any remote file caching policy in place? If so, is it possibile to programmatically disable it? \r\nCurrently it seems that the file `test.csv` on the repo [here](https://huggingface.co/datasets/loretoparisi/tatoeba-sentences/blob/main/test.csv) is cached remotely. In fact I download locally the file from raw link, the file is up-to-date; but If I use it within `datasets` as shown above, it gives to me always the first revision of the file, not the last.\r\n\r\nThank you.\r\n\r\n## Steps to reproduce the bug\r\n```python\r\nfrom datasets import load_dataset,Features,Value,ClassLabel\r\n\r\nclass_names = [\"cmn\",\"deu\",\"rus\",\"fra\",\"eng\",\"jpn\",\"spa\",\"ita\",\"kor\",\"vie\",\"nld\",\"epo\",\"por\",\"tur\",\"heb\",\"hun\",\"ell\",\"ind\",\"ara\",\"arz\",\"fin\",\"bul\",\"yue\",\"swe\",\"ukr\",\"bel\",\"que\",\"ces\",\"swh\",\"nno\",\"wuu\",\"nob\",\"zsm\",\"est\",\"kat\",\"pol\",\"lat\",\"urd\",\"sqi\",\"isl\",\"fry\",\"afr\",\"ron\",\"fao\",\"san\",\"bre\",\"tat\",\"yid\",\"uig\",\"uzb\",\"srp\",\"qya\",\"dan\",\"pes\",\"slk\",\"eus\",\"cycl\",\"acm\",\"tgl\",\"lvs\",\"kaz\",\"hye\",\"hin\",\"lit\",\"ben\",\"cat\",\"bos\",\"hrv\",\"tha\",\"orv\",\"cha\",\"mon\",\"lzh\",\"scn\",\"gle\",\"mkd\",\"slv\",\"frm\",\"glg\",\"vol\",\"ain\",\"jbo\",\"tok\",\"ina\",\"nds\",\"mal\",\"tlh\",\"roh\",\"ltz\",\"oss\",\"ido\",\"gla\",\"mlt\",\"sco\",\"ast\",\"jav\",\"oci\",\"ile\",\"ota\",\"xal\",\"tel\",\"sjn\",\"nov\",\"khm\",\"tpi\",\"ang\",\"aze\",\"tgk\",\"tuk\",\"chv\",\"hsb\",\"dsb\",\"bod\",\"sme\",\"cym\",\"mri\",\"ksh\",\"kmr\",\"ewe\",\"kab\",\"ber\",\"tpw\",\"udm\",\"lld\",\"pms\",\"lad\",\"grn\",\"mlg\",\"xho\",\"pnb\",\"grc\",\"hat\",\"lao\",\"npi\",\"cor\",\"nah\",\"avk\",\"mar\",\"guj\",\"pan\",\"kir\",\"myv\",\"prg\",\"sux\",\"crs\",\"ckt\",\"bak\",\"zlm\",\"hil\",\"cbk\",\"chr\",\"nav\",\"lkt\",\"enm\",\"arq\",\"lin\",\"abk\",\"pcd\",\"rom\",\"gsw\",\"tam\",\"zul\",\"awa\",\"wln\",\"amh\",\"bar\",\"hbo\",\"mhr\",\"bho\",\"mrj\",\"ckb\",\"osx\",\"pfl\",\"mgm\",\"sna\",\"mah\",\"hau\",\"kan\",\"nog\",\"sin\",\"glv\",\"dng\",\"kal\",\"liv\",\"vro\",\"apc\",\"jdt\",\"fur\",\"che\",\"haw\",\"yor\",\"crh\",\"pdc\",\"ppl\",\"kin\",\"shs\",\"mnw\",\"tet\",\"sah\",\"kum\",\"ngt\",\"nya\",\"pus\",\"hif\",\"mya\",\"moh\",\"wol\",\"tir\",\"ton\",\"lzz\",\"oar\",\"lug\",\"brx\",\"non\",\"mww\",\"hak\",\"nlv\",\"ngu\",\"bua\",\"aym\",\"vec\",\"ibo\",\"tkl\",\"bam\",\"kha\",\"ceb\",\"lou\",\"fuc\",\"smo\",\"gag\",\"lfn\",\"arg\",\"umb\",\"tyv\",\"kjh\",\"oji\",\"cyo\",\"urh\",\"kzj\",\"pam\",\"srd\",\"lmo\",\"swg\",\"mdf\",\"gil\",\"snd\",\"tso\",\"sot\",\"zza\",\"tsn\",\"pau\",\"som\",\"egl\",\"ady\",\"asm\",\"ori\",\"dtp\",\"cho\",\"max\",\"kam\",\"niu\",\"sag\",\"ilo\",\"kaa\",\"fuv\",\"nch\",\"hoc\",\"iba\",\"gbm\",\"sun\",\"war\",\"mvv\",\"pap\",\"ary\",\"kxi\",\"csb\",\"pag\",\"cos\",\"rif\",\"kek\",\"krc\",\"aii\",\"ban\",\"ssw\",\"tvl\",\"mfe\",\"tah\",\"bvy\",\"bcl\",\"hnj\",\"nau\",\"nst\",\"afb\",\"quc\",\"min\",\"tmw\",\"mad\",\"bjn\",\"mai\",\"cjy\",\"got\",\"hsn\",\"gan\",\"tzl\",\"dws\",\"ldn\",\"afh\",\"sgs\",\"krl\",\"vep\",\"rue\",\"tly\",\"mic\",\"ext\",\"izh\",\"sma\",\"jam\",\"cmo\",\"mwl\",\"kpv\",\"koi\",\"bis\",\"ike\",\"run\",\"evn\",\"ryu\",\"mnc\",\"aoz\",\"otk\",\"kas\",\"aln\",\"akl\",\"yua\",\"shy\",\"fkv\",\"gos\",\"fij\",\"thv\",\"zgh\",\"gcf\",\"cay\",\"xmf\",\"tig\",\"div\",\"lij\",\"rap\",\"hrx\",\"cpi\",\"tts\",\"gaa\",\"tmr\",\"iii\",\"ltg\",\"bzt\",\"syc\",\"emx\",\"gom\",\"chg\",\"osp\",\"stq\",\"frr\",\"fro\",\"nys\",\"toi\",\"new\",\"phn\",\"jpa\",\"rel\",\"drt\",\"chn\",\"pli\",\"laa\",\"bal\",\"hdn\",\"hax\",\"mik\",\"ajp\",\"xqa\",\"pal\",\"crk\",\"mni\",\"lut\",\"ayl\",\"ood\",\"sdh\",\"ofs\",\"nus\",\"kiu\",\"diq\",\"qxq\",\"alt\",\"bfz\",\"klj\",\"mus\",\"srn\",\"guc\",\"lim\",\"zea\",\"shi\",\"mnr\",\"bom\",\"sat\",\"szl\"]\r\nfeatures = Features({ 'label': ClassLabel(names=class_names), 'text': Value('string')})\r\nnum_labels = features['label'].num_classes\r\ndata_files = { \"train\": \"train.csv\", \"test\": \"test.csv\" }\r\nsentences = load_dataset(\r\n     \"loretoparisi/tatoeba-sentences\",\r\n     data_files=data_files,\r\n     delimiter='\\t', \r\n     column_names=['label', 'text'],\r\n)\r\n# You can make this part faster with num_proc=<some int>\r\nsentences = sentences.map(lambda ex: {\"label\" : features[\"label\"].str2int(ex[\"label\"]) if ex[\"label\"] is no",
    "url": "https://github.com/huggingface/datasets/issues/4238",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-04-27T10:42:11Z",
    "updated_at": "2022-04-27T16:29:25Z",
    "comments": 3,
    "user": "loretoparisi"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4235,
    "title": "How to load VERY LARGE dataset?",
    "body": "### System Info\n\n```shell\nI am using transformer trainer while meeting the issue.\r\nThe trainer requests torch.utils.data.Dataset as input, which loads the whole dataset into the memory at once. Therefore, when the dataset is too large to load, there's nothing I can do except using IterDataset, which loads samples of data seperately, and results in low efficiency. \r\nI wonder if there are any tricks like Sharding in huggingface trainer.\r\nLooking forward to your reply.\n```\n\n\n### Who can help?\n\nTrainer: @sgugger\n\n### Information\n\n- [ ] The official example scripts\n- [ ] My own modified scripts\n\n### Tasks\n\n- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)\n- [ ] My own task or dataset (give details below)\n\n### Reproduction\n\nNone\n\n### Expected behavior\n\n```shell\nI wonder if there are any tricks like fairseq Sharding very large datasets https://fairseq.readthedocs.io/en/latest/getting_started.html.\r\nThanks a lot!\n```\n",
    "url": "https://github.com/huggingface/datasets/issues/4235",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2022-04-27T07:50:13Z",
    "updated_at": "2023-07-25T15:07:57Z",
    "comments": 1,
    "user": "CaoYiqingT"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1006,
    "title": "[Question]Doesn't torch tensorrt support LSTM-based decoder optimization?? ",
    "body": "## \u2753 Question\r\nDoesn't torch tensorrt support LSTM-based decoder optimization? The reason for asking this question is that the model forward and model test structures learned in the seq2seq structure are different (beam search, sequence inference ..), and the optimized model cannot be used by inputting only training forward logic.\r\n\r\n## Environment\r\nTensorrt 22.03 docker image: \r\nhttps://docs.nvidia.com/deeplearning/tensorrt/container-release-notes/rel_22-03.html#rel_22-03\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/1006",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2022-04-27T06:50:45Z",
    "updated_at": "2022-11-10T00:02:45Z",
    "user": "koliaok"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4230,
    "title": "Why the `conll2003` dataset on huggingface only contains the `en` subset? Where is the  German data?",
    "body": "![image](https://user-images.githubusercontent.com/37113676/165416606-96b5db18-b16c-4b6b-928c-de8620fd943e.png)\r\n\r\nBut on huggingface datasets:\r\n![image](https://user-images.githubusercontent.com/37113676/165416649-8fd77980-ca0d-43f0-935e-f398ba8323a4.png)\r\n\r\nWhere is the  German data?",
    "url": "https://github.com/huggingface/datasets/issues/4230",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-04-27T00:53:52Z",
    "updated_at": "2023-07-25T15:10:15Z",
    "user": "beyondguo"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4221,
    "title": "Dictionary Feature",
    "body": "Hi, I'm trying to create the loading script for a dataset in which one feature is a list of dictionaries, which afaik doesn't fit very well the values and structures supported by Value and Sequence. Is there any suggested workaround, am I missing something?\r\n\r\nThank you in advance.",
    "url": "https://github.com/huggingface/datasets/issues/4221",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-04-26T12:50:18Z",
    "updated_at": "2022-04-29T14:52:19Z",
    "user": "jordiae"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 1001,
    "title": "\u2753 [Question] How to differentiate a Torch-TensorRT model from a pure TorchScript model? ",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nI'm developing a C++ inference server to deploy Torch-TensorRT models and TorchScript models. Since the Torch-TensorRT compilation process is done AOT, Is there a way to know wether the given .pt model file is a Torch-TensorRT model or a pure TorchScript model?\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/TensorRT/issues/1001",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-04-26T12:29:20Z",
    "updated_at": "2022-04-27T02:05:50Z",
    "user": "tiandi111"
  },
  {
    "repo": "pytorch/vision",
    "number": 5872,
    "title": "Keypoint RCNN visibility flag for keypoints",
    "body": "### \ud83d\ude80 The feature\n\nHello All,\r\n\r\nThis is only my first day posting a request here so I apologize for any errors on my part. Also, sorry for the long post below.\r\n\r\nThe purpose of this post is to request an improvement/correction for the visibility flag behavior of Keypoint RCNN. Based on my results and those of other users I have encountered on different forums and sites, Keypoint RCNN always predicts a flag value of v=1 for all keypoints, no matter the training flag value for v>0 (even v=0), and predicts coordinates for them as well. In other words, the model does not appear to actually learn the flag value. My understanding is that the flag should be learned and is supposed to follow the COCO convention (v=0 \u2018not in image\u2019; v=1 \u2018occluded\u2019; v=2 \u2018visible\u2019) but does not do so.\r\n\r\n\r\n\r\n\r\n\n\n### Motivation, pitch\n\nGiven the usefulness of the visibility flags, being able to accurately predict them and use the information during inference to mark occluded vs. visible keypoints would be an important addition to the model capability. My understanding is that this is already supposed to be the case, but for some reason the documentation as well as the model behavior on this are lacking. I have found the performance of Keypoint RCNN overall to be very good and I have successfully fine-tuned it on my custom (multiclass) dataset with very good success in predicting the class, bbox, and keypoints. It would be very helpful to be able to distinguish between keypoints using visibility flag.  \n\n### Alternatives\n\n_No response_\n\n### Additional context\n\nMy hope in writing here is to request and encourage updating of the model to address the issue/addition suggested. If not, then if I could please get some help in tracking down the source code where Keypoint RCNN is converting all flags to v=1 and handling/training flags so that I might be able to modify this behavior, as the model does not seem to learn the flag values presently. In my use case, what I want is for Keypoint RCNN to successfully predict the right flag (e.g. v=0) so that I can use it later on, or at least predict a coordinate of (0.0,0.0) (or some other fixed value) for keypoints with v=0. The need is to be able to distinguish between visible and occluded keypoints. Even just two learned flags that work as expected (v=0 and v=1) would be very useful to have. Any suggestions or guidance would be great. Thanks for taking the time to reply.\n\ncc @datumbox @YosuaMichael",
    "url": "https://github.com/pytorch/vision/issues/5872",
    "state": "open",
    "labels": [
      "question",
      "topic: object detection"
    ],
    "created_at": "2022-04-24T21:44:35Z",
    "updated_at": "2024-08-26T08:33:51Z",
    "user": "mbadal1996"
  },
  {
    "repo": "pytorch/torchx",
    "number": 470,
    "title": "Improve torchx/resources README",
    "body": "## \ud83d\udcda Documentation\r\n\r\n## Link\r\nhttps://github.com/pytorch/torchx/tree/main/resources\r\n\r\n## What does it currently say?\r\n```\r\n**Creating EKS cluster**\r\neksctl create cluster -f torchx-dev-eks.yml\r\n\r\n**Creating KFP**\r\nkfctl apply -V -f torchx-dev-kfp.yml\r\n```\r\n\r\n## What should it say?\r\nFor the **Creating EKS Cluster** it should actually list out how to create `torchx-dev-eks.yml`. The instructions are in `torchx-dev-eks-template.yml`, so just pulling those out to the README would be good.\r\n\r\nFor **Creating KFP**, it is missing the steps to generate `torchx-dev-kfp.yml`. I'm assuming you do this by following the instructions on the aws eks kfp website (https://www.kubeflow.org/docs/distributions/aws/deploy/install-kubeflow/), but a quick look at those docs doesn't seem like its obvious.\r\n\r\n## Why?\r\nFollowing the README step by step doesn't work due to missing files.\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/470",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-04-22T18:03:56Z",
    "updated_at": "2022-06-02T21:26:12Z",
    "comments": 1,
    "user": "kiukchung"
  },
  {
    "repo": "pytorch/PiPPy",
    "number": 149,
    "title": "Figure out how to get `**kwargs` working with MetaTracer",
    "body": "https://github.com/pytorch/PiPPy/pull/138/files#diff-6d49246d94990874a38b3d05e50ea765d5c0a75270de5eec6dcda377f934976dR251\r\n\r\nMichael B from HF is also looking into this, maybe we'll figure something out together",
    "url": "https://github.com/pytorch/PiPPy/issues/149",
    "state": "closed",
    "labels": [],
    "created_at": "2022-04-21T16:34:00Z",
    "updated_at": "2022-06-10T18:19:27Z",
    "user": "jamesr66a"
  },
  {
    "repo": "pytorch/vision",
    "number": 5845,
    "title": "about paste_mask_in_image question in mask rcnn",
    "body": "First of all, thanks for your great work.\r\nRecently, I was studying Mask R-CNN code in this repo. I have some questions, and I hope you could answer it when you are free.\r\n\r\n\r\nFirst question, Why do I need to expand the mask and box when mapping mask back to the original scale. I read the original paper of Mask R-CNN, which only said \"The m\u00d7m floating-number mask output is then resized to the RoI size, and binarized at a threshold of 0.5.\".\r\nhttps://github.com/pytorch/vision/blob/35d1d9d3f01016c65ac7f3d0700d2474929acdea/torchvision/models/detection/roi_heads.py#L474-L477\r\n\r\n\r\nSecond question, What is the function of TO_REMOVE here?\r\nhttps://github.com/pytorch/vision/blob/35d1d9d3f01016c65ac7f3d0700d2474929acdea/torchvision/models/detection/roi_heads.py#L403-L409\r\n\r\nLook forward to your reply. :laughing: \r\n\n\ncc @datumbox @YosuaMichael",
    "url": "https://github.com/pytorch/vision/issues/5845",
    "state": "closed",
    "labels": [
      "question",
      "topic: object detection"
    ],
    "created_at": "2022-04-21T08:52:39Z",
    "updated_at": "2022-05-18T00:51:04Z",
    "user": "WZMIAOMIAO"
  },
  {
    "repo": "pytorch/torchx",
    "number": 464,
    "title": "Volcano job scheduling issues due to bad upgrade",
    "body": "This is an after the fact issue to help anyone who stumbles upon it later resolve the issue.\r\n\r\n## Pod won't schedule due to CreateContainerConfigError\r\n\r\n```\r\nWarning  Failed     12m (x12 over 15m)    kubelet  Error: couldn't find key VC_PYTHON-0_HOSTS in ConfigMap default/torchxcomponentspython-bwg4m0sktd9mwc-svc\r\n```\r\n\r\n```\r\n    state:\r\n      waiting:\r\n        message: couldn't find key VC_PYTHON-0_HOSTS in ConfigMap default/torchxcomponentspython-bwg4m0sktd9mwc-svc\r\n        reason: CreateContainerConfigError\r\n```\r\n\r\nThis is likely due to a Volcano version upgrade issue. Volcano 1.4 changed the ENV key format to correctly handle `-` characters. This means if a job was submitted under Volcano 1.3 and then is upgraded to Volcano 1.4 before running the job will fail to schedule. You just need to relaunch your job under the new version.\r\n\r\n## Partial Upgrade Issues\r\n\r\n```\r\nError creating pods: [failed to create pod pv5xp2lpf65vz-python-0-0, err: &errors.StatusError{ErrStatus:v1.Status{TypeMeta:v1.TypeMeta{Kind:\"\", APIVersion:\"\"}, ListMeta:v1.ListMeta{SelfLink:\"\", ResourceVersion:\"\", Continue:\"\", RemainingItemCount:(*int64)(nil)}, Status:\"Failure\", Message:\"Internal error occurred: failed calling webhook \\\"mutatepod.volcano.sh\\\": the server could not find the requested resource\", Reason:\"InternalError\", Details:(*v1.StatusDetails)(0xc002a125a0), Code:500}}]\r\n```\r\n\r\nWhen you upgrade Volcano you need to completely delete the `volcano-system` namespace and all resources within it before running `kubectl apply .../development.yaml`. If you don't, some of the setup jobs resources will conflict and won't run for the new version leaving the cluster in a bad state.",
    "url": "https://github.com/meta-pytorch/torchx/issues/464",
    "state": "closed",
    "labels": [
      "bug",
      "documentation",
      "kubernetes"
    ],
    "created_at": "2022-04-20T19:14:15Z",
    "updated_at": "2022-04-20T20:30:06Z",
    "comments": 0,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/vision",
    "number": 5838,
    "title": "return_layers problem about fasterrcnn_mobilenet_v3_large_fpn",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nThere may be a problem with the setting of return_layers in fasterrcnn_mobilenet_v3_large_fpn.  If the default setting is used, the resolution  of collected feature map is the same. As a result, the effect of detecting small targets will become worse.\r\nhttps://github.com/pytorch/vision/blob/e8cb0bacd86c49e67a7e1a5f83c6da866bc451cf/torchvision/models/detection/backbone_utils.py#L225-L226\r\ntest code:\r\n```python\r\nimport torch\r\nfrom torchvision.models.detection import fasterrcnn_mobilenet_v3_large_fpn\r\nmodel = fasterrcnn_mobilenet_v3_large_fpn(pretrained_backbone=False)\r\nimg = torch.randn(1, 3, 224, 224)\r\noutputs = model.backbone(img)\r\n[print(f\"{k} shape: {v.shape}\") for k, v in outputs.items()]\r\n```\r\noutput:\r\n```\r\n0 shape: torch.Size([1, 256, 7, 7])\r\n1 shape: torch.Size([1, 256, 7, 7])\r\npool shape: torch.Size([1, 256, 4, 4])\r\n```\r\n`feauture map: 0` and `feature map: 1` have same resolution(`7x7`).\r\n\r\nmay need to change:\r\n```\r\nreturned_layers = [num_stages - 2, num_stages - 1]\r\n```\r\nto:\r\n```\r\nreturned_layers = [num_stages - 3, num_stages - 1]\r\n```\r\n\r\noutput:\r\n```\r\n0 shape: torch.Size([1, 256, 14, 14])\r\n1 shape: torch.Size([1, 256, 7, 7])\r\npool shape: torch.Size([1, 256, 4, 4])\r\n```\r\n\r\n### Versions\r\n\r\n```\r\nPyTorch version: 1.10.0+cpu\r\nIs debug build: False\r\nCUDA used to build PyTorch: Could not collect\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 18.04.6 LTS (x86_64)\r\nGCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0\r\nClang version: Could not collect\r\nCMake version: version 3.10.2\r\nLibc version: glibc-2.27\r\n\r\nPython version: 3.8.12 (default, Oct 12 2021, 13:49:34)  [GCC 7.5.0] (64-bit runtime)\r\nPython platform: Linux-5.4.0-107-generic-x86_64-with-glibc2.17\r\nIs CUDA available: False\r\nCUDA runtime version: Could not collect\r\nGPU models and configuration: GPU 0: Quadro P620\r\nNvidia driver version: 470.103.01\r\ncuDNN version: Could not collect\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.21.3\r\n[pip3] torch==1.10.0+cpu\r\n[pip3] torchaudio==0.10.0+cpu\r\n[pip3] torchvision==0.11.1+cpu\r\n[conda] numpy                     1.21.3                   pypi_0    pypi\r\n[conda] torch                     1.10.0+cpu               pypi_0    pypi\r\n[conda] torchaudio                0.10.0+cpu               pypi_0    pypi\r\n[conda] torchvision               0.11.1+cpu               pypi_0    pypi\r\n```\n\ncc @datumbox @YosuaMichael",
    "url": "https://github.com/pytorch/vision/issues/5838",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2022-04-20T04:32:20Z",
    "updated_at": "2022-04-21T07:47:05Z",
    "user": "WZMIAOMIAO"
  },
  {
    "repo": "pytorch/data",
    "number": 364,
    "title": "Linter for DataPipe/DataLoader2 ",
    "body": "### \ud83d\ude80 The feature\r\n\r\nThis issue proposes the addition of a linter for DataPipes and DataLoader2. The linter can analyze the graph of DataPipes and input arguments to DataLoaderV, and inform the users if any errors may occur ahead of time. The incomplete list of issues that the linter may try to analyze and raise is below. Please feel free to edit the list directly to add more or comment below.\r\n\r\nEssential:\r\n- [ ] Multiple references to the same iterator/DataPipe\r\n  - This can cause issue when serialized, suggest users to `fork`\r\n- [ ] Duplicate usage of shuffle/batch/collate\r\n- [ ] Shuffle/batch/collate are missing?\r\n- [ ] Warn if shuffling is not done?\r\n- [ ] Warn if sharding is not specificed for Distributed/Multiprocessing\r\n- [ ] Warn about shuffling before sharding (not mandatory because inputs may be pre-shuffled)\r\n- [ ] Multiprocess/distributed behavior related to sharding/shuffling\r\n- [ ] Warn if filter appears between on_disk_cache and end_caching sections.\r\n- [ ] Find unreachable children within graph and warns (because they might prevent buffers from being empty in `fork` and etc)\r\n- [ ] Warn about passing DataPipes that have already been partially read (invalid state), but are passed into DataLoader (and we might have to force `reset` the DataPipe in DataLoader)\r\n- [ ] Detect what external packages are not installed within DataPipe graph\r\n\r\nNice-to-have:\r\n- [ ] Check DataPipe object size and warn if it is too big (e.g. premature initialization of large structures)\r\n- [ ] Check if `fork` datapipe creates two or more copies of `StreamWrapper` or `IOBase`  \r\n\r\n### Motivation, pitch\r\nHaving a linter will encourage best practices of DataPipe usages and reduces the number of unexpected bugs/behaviors in the data loading process during runtime. \r\n\r\n### Alternatives\r\nOnly raise exceptions during runtime.\r\n\r\n### Additional context\r\nThis linter is expected to work with DataPipes and DataLoaderV2. We should consider if it should work with the original DataLoader as well (and how).\r\n\r\ncc: @VitalyFedyunin @ejguan ",
    "url": "https://github.com/meta-pytorch/data/issues/364",
    "state": "open",
    "labels": [
      "help wanted"
    ],
    "created_at": "2022-04-19T21:49:54Z",
    "updated_at": "2023-04-11T16:58:51Z",
    "comments": 5,
    "user": "NivekT"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 987,
    "title": "\u2753 [Question] How do you add CUDA kernels used for implemented plugins ? ",
    "body": "## \u2753 Question\r\n\r\nHow do you add CUDA kernels used for implemented plugins ? I have developed my own implementation for several layers that are not supported yet by Torch-TensorRT.  I'm not familiar with the bazel compilation flow and i  would like to know how to compile .cu files in Torch-TensorRT. \r\n\r\nCurrent provided Torch-TensorRT plugins make calls to external libraries (cuDNN for example) but there is no example about how  to add a custom plugins that call CUDA kernels.\r\n \r\n## Additional context\r\n\r\nIn addition it could be nice to have a clear way on how to get the PyTorch signature of the methods that we want to encapsulate.\r\n\r\nCheers\r\n\r\nDavid ",
    "url": "https://github.com/pytorch/TensorRT/issues/987",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: plugins"
    ],
    "created_at": "2022-04-19T15:59:59Z",
    "updated_at": "2022-08-12T00:02:25Z",
    "user": "david-PHR"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4181,
    "title": "Support streaming FLEURS dataset",
    "body": "## Dataset viewer issue for '*name of the dataset*'\r\n\r\nhttps://huggingface.co/datasets/google/fleurs\r\n\r\n```\r\nStatus code:   400\r\nException:     NotImplementedError\r\nMessage:       Extraction protocol for TAR archives like 'https://storage.googleapis.com/xtreme_translations/FLEURS/af_za.tar.gz' is not implemented in streaming mode. Please use `dl_manager.iter_archive` instead.\r\n```\r\n\r\nAm I the one who added this dataset ? Yes\r\n\r\nCan I fix this somehow in the script? @lhoestq @severo \r\n",
    "url": "https://github.com/huggingface/datasets/issues/4181",
    "state": "closed",
    "labels": [
      "dataset bug"
    ],
    "created_at": "2022-04-19T11:09:56Z",
    "updated_at": "2022-07-25T11:44:02Z",
    "comments": 9,
    "user": "patrickvonplaten"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 76023,
    "title": "How to disable check onnx in torch.onnx.export in pytorch1.11 version?",
    "body": "### \ud83d\udcda The doc issue\n\nOld params were removed, now how to disable check on onnx when export?\n\n### Suggest a potential alternative/fix\n\nAlso, why disable this feature? Some onnx using customized op can not pass check.",
    "url": "https://github.com/pytorch/pytorch/issues/76023",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged",
      "onnx-needs-info"
    ],
    "created_at": "2022-04-19T08:26:42Z",
    "updated_at": "2022-05-05T04:57:24Z",
    "user": "lucasjinreal"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 985,
    "title": "Error Code 1: Myelin  (Compiled against cuBLASLt 10.2.2.0 but running against cuBLASLt 11.4.2.0.)",
    "body": "Hi I am using TensorRT for an images in python but getting this issue. \r\n**I am Yolort to infer image.**\r\n[https://github.com/zhiqwang/yolov5-rt-stack](url)\r\n```\r\nimport os\r\nimport torch\r\nimport cv2\r\nfrom yolort.utils import Visualizer\r\nos.environ[\"CUDA_DEVICE_ORDER\"] = \"PCI_BUS_ID\"\r\ncuda_visible = \"0\"\r\nos.environ[\"CUDA_VISIBLE_DEVICES\"] = cuda_visible\r\nfrom yolort.runtime import PredictorTRT\r\nassert torch.cuda.is_available()\r\ndevice = torch.device('cuda')\r\nengine_path = \"yolov5n6.engine\"\r\ny_runtime = PredictorTRT(engine_path, device=device)\r\nimg_path = r\"D:\\new_york.jpg\"\r\nimg_raw = cv2.imread(img_path)\r\nlabel_source = r\"D:\\coco.names\"\r\nlabel_path = label_source.split(\"/\")[-1]\r\ny_runtime.warmup()\r\npredictions_trt = y_runtime.predict(img_path)\r\nprint(predictions_trt)\r\n```\r\n**Here is my environment** \r\n\r\n```\r\n>python -m torch.utils.collect_env\r\nCollecting environment information...\r\nPyTorch version: 1.11.0+cu113\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.3\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Microsoft Windows 10 Home\r\nGCC version: Could not collect\r\nClang version: Could not collect\r\nCMake version: version 3.23.0\r\nLibc version: N/A\r\n\r\nPython version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] (64-bit runtime)\r\nPython platform: Windows-10-10.0.19041-SP0\r\nIs CUDA available: True\r\nCUDA runtime version: 11.6.124\r\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 3060 Laptop GPU\r\nNvidia driver version: 511.65\r\ncuDNN version: C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6\\bin\\cudnn_ops_train64_8.dll\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.21.6\r\n[pip3] torch==1.11.0+cu113\r\n[pip3] torchaudio==0.11.0+cu113\r\n[pip3] torchvision==0.12.0+cu113\r\n[conda] blas                      1.0                         mkl\r\n[conda] cudatoolkit               11.3.1               h59b6b97_2\r\n[conda] libblas                   3.9.0              12_win64_mkl    conda-forge\r\n[conda] libcblas                  3.9.0              12_win64_mkl    conda-forge\r\n[conda] liblapack                 3.9.0              12_win64_mkl    conda-forge\r\n[conda] mkl                       2021.4.0           h0e2418a_729    conda-forge\r\n[conda] mkl-service               2.4.0            py39h6b0492b_0    conda-forge\r\n[conda] mkl_fft                   1.3.1            py39h0cb33c3_1    conda-forge\r\n[conda] mkl_random                1.2.2            py39h2e25243_0    conda-forge\r\n[conda] mypy_extensions           0.4.3            py39hcbf5309_5    conda-forge\r\n[conda] numpy                     1.22.3                   pypi_0    pypi\r\n[conda] numpy-base                1.20.3           py39hc2deb75_0\r\n[conda] numpydoc                  1.2.1              pyhd8ed1ab_2    conda-forge\r\n[conda] pytorch                   1.11.0          py3.9_cuda11.3_cudnn8_0    pytorch\r\n[conda] pytorch-mutex             1.0                        cuda    pytorch\r\n[conda] torchaudio                0.11.0               py39_cu113    pytorch\r\n[conda] torchvision               0.12.0               py39_cu113    pytorch\r\n```\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/76849182/163939405-8de7b9e3-a15d-4563-9ede-af71a70bc1f8.png)\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/985",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-04-19T06:40:10Z",
    "updated_at": "2022-04-20T10:02:08Z",
    "user": "IamNaQi"
  },
  {
    "repo": "huggingface/optimum",
    "number": 147,
    "title": "Support for electra model",
    "body": "I came across this tool and it looks very interesting but i am trying to use electra model and i can see this is not supported. By this \r\n`\"electra is not supported yet. Only ['albert', 'bart', 'mbart', 'bert', 'ibert', 'camembert', 'distilbert', 'longformer', 'marian', 'roberta', 't5', 'xlm-roberta', 'gpt2', 'gpt-neo', 'layoutlm'] are supported. If you want to support electra please propose a PR or open up an issue`. \r\nis any plans for electra models in future. \r\nExample of models https://huggingface.co/german-nlp-group/electra-base-german-uncased",
    "url": "https://github.com/huggingface/optimum/issues/147",
    "state": "closed",
    "labels": [],
    "created_at": "2022-04-15T11:03:21Z",
    "updated_at": "2022-04-21T07:24:48Z",
    "comments": 1,
    "user": "OriAlpha"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 977,
    "title": "\u2753 [Question] how to enable \"torch fallback\"",
    "body": "## \u2753 Question\r\n\r\nI was told that torch-trt was able to partially convert graph to tensorrt while keep the unsupported part running on torch-runtime.\r\nAnd I also hava Found some 'Torch Fallback' or 'torch_fallback' str at the source code.\r\n\r\nSo I generate a module containing `torch.argmax` , which is not supported by torch-tensorrt. And give it a shot, but it failed.\r\n\r\nI hava two question:\r\n1.  Is the fallback feature really supported by torch-tensorrt or is going to be supported?\r\n2.  If allready supported, is there any sample showing how to use it.\r\n\r\n## What you have already tried\r\n\r\ntake a look at this script:\r\n```python\r\nimport torch\r\nimport torch_tensorrt\r\nimport numpy as np\r\nfrom torchvision import models\r\n\r\nclass MyModel(torch.nn.Module):\r\n\r\n    def __init__(self):\r\n        super(MyModel, self).__init__()\r\n        models_dict = {\r\n            \"resnet50_v2\": models.resnet50,\r\n            \"resnet101_v2\": models.resnet101,\r\n            \"resnet152_v2\": models.resnet152,\r\n            \"mobilenet_v2\": models.mobilenet_v2,\r\n            \"shufflenet_v2\": models.shufflenet_v2_x1_0,\r\n            \"densenet169\": models.densenet169\r\n        }\r\n\r\n        self.model = models_dict['resnet50_v2'](pretrained=False)\r\n\r\n    def forward(self, x):\r\n        x = self.model(x)\r\n        return torch.argmax(x, -1)\r\n\r\ndef main():\r\n    model = MyModel().eval().cuda()  #.cuda()\r\n    x = torch.from_numpy(np.random.randn(1,3,224,224).astype(np.float32)).cuda()\r\n    scripted_model = torch.jit.script(model)\r\n\r\n    compile_settings = {\r\n        \"inputs\": [x],\r\n        \"enabled_precisions\": {torch.float},\r\n        \"torch_fallback\":  { # also tryied with Torch Fallback\r\n            \"enabled\": True\r\n            \"min_block_size\": 1\r\n            \"forced_fallback_operators\": [\r\n            ]\r\n            \"forced_fallback_modules\": [\r\n            ]\r\n        }\r\n    }\r\n    trt_ts_module = torch_tensorrt.ts.compile(scripted_model, **compile_settings)\r\n    print(trt_ts_module)\r\n\r\n    torch_tensorrt_out = trt_ts_module(x)\r\n    print('torch_tensorrt_out shape: \\n', torch_tensorrt_out.shape, print(torch_tensorrt_out))\r\n\r\n    pytorch_out = model(x)\r\n    print('pytorch out shape: \\n', pytorch_out.shape, pytorch_out)\r\n\r\n# torch._C._jit_to_backend is buggy, spec will be transformed into wrong json structure.\r\ndef main2():\r\n    model = MyModel().eval().cuda()  #.cuda()\r\n    x = torch.from_numpy(np.random.randn(1,3,224,224).astype(np.float32))\r\n    scripted_model = torch.jit.script(model)\r\n\r\n    spec = {\r\n    \"forward\":\r\n        torch_tensorrt.ts.TensorRTCompileSpec({\r\n            \"inputs\": [torch_tensorrt.Input([1, 3, 224, 224], dtype=torch.float)],\r\n            \"enabled_precisions\": {torch.float},\r\n            \"refit\": False,\r\n            \"debug\": False,\r\n            \"device\": {\r\n                \"device_type\": torch_tensorrt.DeviceType.GPU,\r\n                \"gpu_id\": 0,\r\n                \"dla_core\": 0,\r\n                \"allow_gpu_fallback\": True\r\n            },\r\n            \"capability\": torch_tensorrt.EngineCapability.default,\r\n            \"num_min_timing_iters\": 2,\r\n            \"num_avg_timing_iters\": 1,\r\n        })\r\n    }\r\n\r\n    trt_ts_module = torch._C._jit_to_backend(\"tensorrt\", script_model, spec)\r\n    print(trt_ts_module)\r\n\r\n    torch_tensorrt_out = trt_ts_module(x)\r\n    print('torch_tensorrt_out shape: \\n', torch_tensorrt_out.shape, print(torch_tensorrt_out))\r\n\r\n    pytorch_out = model(x)\r\n    print('pytorch out shape: \\n', pytorch_out.shape, pytorch_out)\r\n\r\nif __name__ == \"__main__\":\r\n    main()\r\n```\r\n\r\nget output:\r\n```bash\r\nTraceback (most recent call last):\r\n  File \"./torch_trt_custom.py\", line 86, in <module>\r\n    main()\r\n  File \"./torch_trt_custom.py\", line 42, in main\r\n    trt_ts_module = torch_tensorrt.ts.compile(scripted_model, **compile_settings)\r\nTypeError: compile() got an unexpected keyword argument 'torch_fallback'\r\n```\r\n## Environment\r\n\r\nngc pytorch 22.02\r\n\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/977",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-04-15T08:25:12Z",
    "updated_at": "2022-04-15T09:28:54Z",
    "user": "WingEdge777"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 75723,
    "title": "[ONNX] How to export fx quantized model to onnx?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nFX is great! How to export fx quantized model to onnx?\n\n### Alternatives\n\nCurrently, I have traced the quantized int8 model to torchscript, it works OK.\n\n### Additional context\n\nI just wonder, If torch already supported export fx model to onnx, how to do it? I got error:\r\n```\r\nRuntimeError: Exporting the operator quantize_per_tensor to ONNX opset version 13 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub.\r\n\r\n```\r\n\r\nIf not support, then, when will support? What's the obstacles behind it?\r\n\r\n**this is really needed, so that bring the gap between int8 quantize and other forward framework through onnx**\n\ncc @ezyang @SherlockNoMad",
    "url": "https://github.com/pytorch/pytorch/issues/75723",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged",
      "onnx-needs-info",
      "module: fx"
    ],
    "created_at": "2022-04-13T07:40:14Z",
    "updated_at": "2022-11-15T23:44:03Z",
    "user": "lucasjinreal"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 979,
    "title": "What is the correct format for file for tokenizer.train_from_files?",
    "body": "I am trying to use this library and train a new model with my own data. But before I start building my corpora, I want to understand what file format should I be looking for, if I am feeding it to [`train_from_files`](https://docs.rs/tokenizers/0.11.3/tokenizers/tokenizer/struct.TokenizerImpl.html#method.train_from_files)? Is there a standard for that? It would be great if that can be documented.\r\n",
    "url": "https://github.com/huggingface/tokenizers/issues/979",
    "state": "closed",
    "labels": [],
    "created_at": "2022-04-12T22:54:39Z",
    "updated_at": "2022-04-14T07:05:58Z",
    "user": "winston0410"
  },
  {
    "repo": "pytorch/examples",
    "number": 987,
    "title": "What accuracy should we expect when training Alexnet from scratch on ImageNet?",
    "body": "## \ud83d\udcda Documentation\r\n\r\nThe README https://github.com/pytorch/examples/blob/main/imagenet/README.md is very helpful when getting started with training AlexNet.\r\n\r\nWe are able to successfully train AlexNet to approximately 56% top-1 and 79% top-5 accuracy on the validation set.  But this is still a fair bit below Krizhevsky's published results of circa 83% or 85% top-5 accuracy on these training sets. \r\n\r\nWe are training with the default recommendations for a single GPU in the README for AlexNet:\r\n```\r\npython main.py -a alexnet --lr 0.01 --gpu 0 /data/datasets/imagenet/\r\n```\r\n\r\nWhat out-of the box accuracy should we expect when training AlexNet on ImageNet with the default PyTorch implementation?\r\n\r\nWhat sort of hyperparameter changes do you recommend to duplicate Alex Krizhevsky's accuracies?",
    "url": "https://github.com/pytorch/examples/issues/987",
    "state": "open",
    "labels": [
      "reproducibility"
    ],
    "created_at": "2022-04-11T20:56:15Z",
    "updated_at": "2023-01-12T03:26:38Z",
    "comments": 8,
    "user": "yoderj"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4141,
    "title": "Why is the dataset not visible under the dataset preview section?",
    "body": "## Dataset viewer issue for '*name of the dataset*'\r\n\r\n**Link:** *link to the dataset viewer page*\r\n\r\n*short description of the issue*\r\n\r\nAm I the one who added this dataset ? Yes-No\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4141",
    "state": "closed",
    "labels": [
      "dataset-viewer"
    ],
    "created_at": "2022-04-11T08:36:42Z",
    "updated_at": "2022-04-11T18:55:32Z",
    "comments": 0,
    "user": "Nid989"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4139,
    "title": "Dataset viewer issue for Winoground",
    "body": "## Dataset viewer issue for 'Winoground'\r\n\r\n**Link:** [*link to the dataset viewer page*](https://huggingface.co/datasets/facebook/winoground/viewer/facebook--winoground/train)\r\n\r\n*short description of the issue*\r\nGetting 401, message='Unauthorized'\r\nThe dataset is subject to authorization, but I can access the files from the interface, so I assume I'm granted to access it. I'd assume the permission somehow doesn't propagate to the dataset viewer tool.\r\n\r\nAm I the one who added this dataset ? No\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4139",
    "state": "closed",
    "labels": [
      "dataset-viewer",
      "dataset-viewer-gated"
    ],
    "created_at": "2022-04-11T06:11:41Z",
    "updated_at": "2022-06-21T16:43:58Z",
    "comments": 11,
    "user": "alcinos"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4138,
    "title": "Incorrect Russian filenames encoding after extraction by datasets.DownloadManager.download_and_extract()",
    "body": "## Dataset viewer issue for 'MalakhovIlya/RuREBus'\r\n\r\n**Link:** https://huggingface.co/datasets/MalakhovIlya/RuREBus\r\n\r\n**Description**\r\nUsing os.walk(topdown=False) in DatasetBuilder causes following error:\r\nStatus code:   400\r\nException:     TypeError\r\nMessage:       xwalk() got an unexpected keyword argument 'topdown'\r\nCouldn't find where \"xwalk\" come from. How can I fix this?\r\n\r\nAm I the one who added this dataset ? Yes\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4138",
    "state": "closed",
    "labels": [],
    "created_at": "2022-04-11T02:07:13Z",
    "updated_at": "2022-04-19T03:15:46Z",
    "comments": 5,
    "user": "iluvvatar"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4134,
    "title": "ELI5 supporting documents",
    "body": "if i am using dense search to create supporting documents for eli5 how much time it will take bcz i read somewhere that it takes about 18 hrs??",
    "url": "https://github.com/huggingface/datasets/issues/4134",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2022-04-08T23:36:27Z",
    "updated_at": "2022-04-13T13:52:46Z",
    "user": "saurabh-0077"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 204,
    "title": "Reduce the size of the endpoint responses?",
    "body": "Currently, the data contains a lot of redundancy, for example every row of the `/rows` response contains three fields for the dataset, config and split, and their value is the same for all the rows. It comes from a previous version in which we were able to request rows for several configs or splits at the same time.\r\nChanging the format would require changing the moon-landing client.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/204",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-04-08T15:31:35Z",
    "updated_at": "2022-08-24T18:03:38Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/text",
    "number": 1677,
    "title": "what is currently the ideal effective torchtext pipeline for almost any nlp tasks ",
    "body": "## searching the ideal torchtext pipeline \r\n\r\n**Description**\r\nhey there, so ive been using the legacy version of torchtext for quite sometime as it provides easier ways to load custom dataset  and custom pretrained word embeddings locally and i can semlessly implement it for seq2seq, text classification, pos tagging, language modeling etc. most importantly i could use Buckeriterator to sort samples based on their length and group batches based on similar length thus minimize padding. \r\nIve read that the torchdata has these functionalities implemented but couldnt find any tangible resources. \r\n\r\n**I have 3 requirements:**\r\n1. loading any custom dataset locally. \r\n2. loading any custom pre-trained embedding locally (fasttext, GLoVe) \r\n3. being able to implement sort and batch by length to get minimum padding \r\n",
    "url": "https://github.com/pytorch/text/issues/1677",
    "state": "open",
    "labels": [],
    "created_at": "2022-04-07T13:29:10Z",
    "updated_at": "2022-04-07T13:29:10Z",
    "user": "StephennFernandes"
  },
  {
    "repo": "pytorch/data",
    "number": 352,
    "title": "DataLoader tutorial does not handle num_workers > 0",
    "body": "I just wanted to document an issue with the tutorials https://pytorch.org/data/beta/tutorial.html#working-with-dataloader\r\n\r\nThe code in the tutorial will not work when running multiple DataLoader processes as the datapipe will be duplicated across workers:\r\n\r\n```py\r\n    dl = DataLoader(dataset=datapipe, batch_size=2, shuffle=True, num_workers=2)\r\n\r\n    for i, e in enumerate(dl):\r\n        print(e)\r\n```\r\ngives\r\n\r\n```\r\n{'label': tensor([7, 0], dtype=torch.int32), 'data': tensor([[0.5105, 0.7899],\r\n        [0.0152, 0.5981]], dtype=torch.float64)}\r\n{'label': tensor([7, 0], dtype=torch.int32), 'data': tensor([[0.5105, 0.7899],\r\n        [0.0152, 0.5981]], dtype=torch.float64)}\r\n{'label': tensor([4, 6], dtype=torch.int32), 'data': tensor([[0.9998, 0.5452],\r\n        [0.8515, 0.8264]], dtype=torch.float64)}\r\n{'label': tensor([4, 6], dtype=torch.int32), 'data': tensor([[0.9998, 0.5452],\r\n        [0.8515, 0.8264]], dtype=torch.float64)}\r\n{'label': tensor([1, 9], dtype=torch.int32), 'data': tensor([[0.8423, 0.3664],\r\n        [0.6397, 0.6408]], dtype=torch.float64)}\r\n{'label': tensor([1, 9], dtype=torch.int32), 'data': tensor([[0.8423, 0.3664],\r\n        [0.6397, 0.6408]], dtype=torch.float64)}\r\n...\r\n```\r\n\r\nEven though this is still beta, it may still be worth  letting users know about such pitfalls.\r\n\r\nAlso, since there are various ways to achieve the sharding, it could be useful to settle on a definite canonical way of handling all this.",
    "url": "https://github.com/meta-pytorch/data/issues/352",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-04-07T13:00:41Z",
    "updated_at": "2022-06-10T20:02:57Z",
    "comments": 3,
    "user": "NicolasHug"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4101,
    "title": "How can I download only the train and test split for full numbers using load_dataset()? ",
    "body": "How can I download only the train and test split for full numbers using load_dataset()? \r\n\r\nI do not need the extra split and it will take 40 mins just to download in Colab. I have very short time in hand. Please help.",
    "url": "https://github.com/huggingface/datasets/issues/4101",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-04-05T16:00:15Z",
    "updated_at": "2022-04-06T13:09:01Z",
    "comments": 1,
    "user": "Nakkhatra"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 960,
    "title": "\u2753 [Question] Problem with cudnn dependency when compiling plugins on windows? ",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nI am trying to compile a windows dll for torch-tensorRT, however I get the following traceback:\r\n\r\nERROR: C:/users/48698/source/libraries/torch-tensorrt-1.0.0/core/plugins/BUILD:10:11: Compiling core/plugins/register_plugins.cpp failed: undeclared inclusion(s) in rule '//core/plugins:torch_tensorrt_plugins':\r\nthis rule is missing dependency declarations for the following files included by 'core/plugins/register_plugins.cpp':\r\n  'external/cuda/cudnn.h'\r\n  'external/cuda/cudnn_version.h'\r\n  'external/cuda/cudnn_ops_infer.h'\r\n  'external/cuda/cudnn_ops_train.h'\r\n  'external/cuda/cudnn_adv_infer.h'\r\n  'external/cuda/cudnn_adv_train.h'\r\n  'external/cuda/cudnn_cnn_infer.h'\r\n  'external/cuda/cudnn_cnn_train.h'\r\n  'external/cuda/cudnn_backend.h'\r\n  \r\n  which is weird cause I do have the cudnn included, and can find the files under the  C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6 path\r\n\r\nI am new to Bazel, is there another way I could link those? \r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\nFollowed this guide: https://github.com/NVIDIA/Torch-TensorRT/issues/856 to a t. I think I am linking cudnn in a weird way?\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.11.0\r\n - OS (e.g., Linux): windows\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): libtorch\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives: local\r\n - Python version: 3.9\r\n - CUDA version: 11.6\r\n - GPU models and configuration: 3070\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\nMy torch-tensorrt-1.0.0/core/plugins/BUILD is as follows: \r\n\r\n```package(default_visibility = [\"//visibility:public\"])\r\n\r\nconfig_setting(\r\n    name = \"use_pre_cxx11_abi\",\r\n    values = {\r\n        \"define\": \"abi=pre_cxx11_abi\",\r\n    }\r\n)\r\n\r\ncc_library(\r\n    name = \"torch_tensorrt_plugins\",\r\n    hdrs = [\r\n        \"impl/interpolate_plugin.h\",\r\n        \"impl/normalize_plugin.h\",\r\n        \"plugins.h\",\r\n\r\n    ],\r\n    srcs = [\r\n        \"impl/interpolate_plugin.cpp\",\r\n        \"impl/normalize_plugin.cpp\",\r\n        \"register_plugins.cpp\",\r\n    ],\r\n    deps = [\r\n        \"@tensorrt//:nvinfer\",\r\n        \"@tensorrt//:nvinferplugin\",\r\n        \"//core/util:prelude\",\r\n    ] + select({\r\n        \":use_pre_cxx11_abi\":  [\"@libtorch_pre_cxx11_abi//:libtorch\"],\r\n        \"//conditions:default\":  [\"@libtorch//:libtorch\"],\r\n    }),\r\n    alwayslink = True,\r\n    copts = [\r\n        \"-pthread\"\r\n    ],\r\n    linkopts = [\r\n        \"-lpthread\",\r\n    ]\r\n)\r\n\r\nload(\"@rules_pkg//:pkg.bzl\", \"pkg_tar\")\r\n\r\npkg_tar(\r\n    name = \"include\",\r\n    package_dir = \"core/plugins/\",\r\n    srcs = [\"plugins.h\"],\r\n)\r\n\r\npkg_tar(\r\n    name = \"impl_include\",\r\n    package_dir = \"core/plugins/impl\",\r\n    srcs = [\"impl/interpolate_plugin.h\",\r\n            \"impl/normalize_plugin.h\"],\r\n)\r\n\r\n\r\nI could attach more build files if needed, but everything apart from the paths is the same as in the referenced issue.\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/960",
    "state": "closed",
    "labels": [
      "question",
      "channel: windows"
    ],
    "created_at": "2022-04-04T00:38:36Z",
    "updated_at": "2022-09-02T17:51:14Z",
    "user": "pepinu"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4074,
    "title": "Error in google/xtreme_s dataset card",
    "body": "**Link:** https://huggingface.co/datasets/google/xtreme_s\r\n\r\nNot a big deal but Hungarian is considered an Eastern European language, together with Serbian, Slovak, Slovenian (all correctly categorized; Slovenia is mostly to the West of Hungary, by the way).\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4074",
    "state": "closed",
    "labels": [
      "documentation",
      "dataset bug"
    ],
    "created_at": "2022-03-31T18:07:45Z",
    "updated_at": "2022-04-01T08:12:56Z",
    "comments": 1,
    "user": "wranai"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 947,
    "title": "hown to compile model for multi inputs?",
    "body": "1\uff09My model : out1, out2 = model(input1, input2)\r\n\r\n2\uff09How should i set compile settings, just like this:\r\n\r\ntrt_ts_module = torch_tensorrt.compile(torch_script_module,\r\n    inputs = [example_tensor, # Provide example tensor for input shape or...\r\n        torch_tensorrt.Input( # Specify input object with shape and dtype\r\n            min_shape=[1, 3, 224, 224],\r\n            opt_shape=[1, 3, 512, 512],\r\n            max_shape=[1, 3, 1024, 1024],\r\n            # For static size shape=[1, 3, 224, 224]\r\n            dtype=torch.half) # Datatype of input tensor. Allowed options torch.(float|half|int8|int32|bool)\r\n    ],\r\n    enabled_precisions = {torch.half}, # Run with FP16)",
    "url": "https://github.com/pytorch/TensorRT/issues/947",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-03-31T08:00:41Z",
    "updated_at": "2022-03-31T20:29:39Z",
    "user": "shuaizzZ"
  },
  {
    "repo": "pytorch/data",
    "number": 339,
    "title": "Build the nightlies a little earlier",
    "body": "`torchdata` builds the nightlies at 15:00 UTC+0\r\n\r\nhttps://github.com/pytorch/data/blob/198cffe7e65a633509ca36ad744f7c3059ad1190/.github/workflows/nightly_release.yml#L6\r\n\r\nand publishes them roughly 30 minutes later. The `torchvision` nightlies are build at 11:00 UTC+0 and also published roughly 30 minutes later.\r\n\r\nThis creates a 4 hour window where the `torchvision` tests that pull in `torchdata` run on outdated nightlies. For example see [this CI run](https://app.circleci.com/pipelines/github/pytorch/vision/16169/workflows/652e06c3-c941-4520-b6ee-f69b2348dd57/jobs/1309833):\r\n\r\nIn the step \"Install PyTorch from the nightly releases\" we have\r\n\r\n```\r\nInstalling collected packages: typing-extensions, torch\r\nSuccessfully installed torch-1.12.0.dev20220329+cpu typing-extensions-4.1.1\r\n```\r\n\r\nTwo steps later in \"Install torchdata from nightly releases\" we have\r\n\r\n```\r\nInstalling collected packages: torch, torchdata\r\n  Attempting uninstall: torch\r\n    Found existing installation: torch 1.12.0.dev20220329+cpu\r\n    Uninstalling torch-1.12.0.dev20220329+cpu:\r\n      Successfully uninstalled torch-1.12.0.dev20220329+cpu\r\nSuccessfully installed torch-1.12.0.dev20220328+cpu torchdata-0.4.0.dev20220328\r\n```\r\n\r\nWas the release schedule deliberately chosen this way? If not can we maybe move it to four hours earlier?",
    "url": "https://github.com/meta-pytorch/data/issues/339",
    "state": "closed",
    "labels": [],
    "created_at": "2022-03-29T15:42:24Z",
    "updated_at": "2022-03-29T19:24:52Z",
    "comments": 5,
    "user": "pmeier"
  },
  {
    "repo": "pytorch/torchx",
    "number": 441,
    "title": "[Req] LSF scheduler support ",
    "body": "## Description\r\nLSF scheduler support \r\nDoes torchx team have plan to support LSF scheduler? \r\nOr is there any guide for extension, I would make PR. \r\n\r\n## Motivation/Background\r\nThanks for torchx utils. We can target various scheduler by configure torchxconfig. \r\n\r\n## Detailed Proposal\r\nIt would be better to support LSF scheduler. \r\n\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/441",
    "state": "open",
    "labels": [
      "enhancement",
      "module: runner",
      "scheduler-request"
    ],
    "created_at": "2022-03-29T04:47:30Z",
    "updated_at": "2022-10-10T22:27:47Z",
    "comments": 6,
    "user": "ckddls1321"
  },
  {
    "repo": "pytorch/data",
    "number": 335,
    "title": "[BE] Unify `buffer_size` across datapipes",
    "body": "The `buffer_size` parameter is currently fairly inconsistent across datapipes:\r\n\r\n| name               |   default `buffer_size` | infinite `buffer_size`   | warn on infinite   |\r\n|--------------------|-------------------------|--------------------------|--------------------|\r\n| Demultiplexer      |                    1e3 | -1                       | yes                |\r\n| Forker             |                    1e3 | -1                       | yes                |\r\n| Grouper            |                   1e4 | N/A                      | N/A                |\r\n| Shuffler           |                   1e4 | N/A                      | N/A                |\r\n| MaxTokenBucketizer |                    1e3 | N/A                      | N/A                |\r\n| UnZipper           |                    1e3 | -1                       | yes                |\r\n| IterKeyZipper      |                   1e4 | None                     | no                 |\r\n\r\nHere are my suggestion on how to unify this:\r\n\r\n- Use the same default `buffer_size` everywhere. It makes little difference whether we use `1e3` or `1e4` given that it is tightly coupled with the data we know nothing about. Given today's hardware / datasets, I would go with 1e4, but no strong opinion.\r\n- Give every datapipe with buffer the ability for an infinite buffer. Otherwise users will just be annoyed and use a workaround. For example, `torchvision` simply uses [`INFINITE_BUFFER_SIZE = 1_000_000_000`](https://github.com/pytorch/vision/blob/1db8795733b91cd6dd62a0baa7ecbae6790542bc/torchvision/prototype/datasets/utils/_internal.py#L42-L43), which for all intents and purposes lives up to its name. Which sentinel we use, i.e. `-1` or `None`, again makes little difference. I personally would use `None` to have a clear separation, but again no strong opinion other than being consistent.\r\n- Do not warn on infinite buffer sizes. Especially since infinite buffer is not the default behavior, the user is expected to know what they are doing when setting `buffer_size=None`. I'm all for having a warning like this in the documentation, but I'm strongly against a runtime warning. For example, `torchvision` datasets need to use an infinite buffer everywhere. Thus, by using the infinite buffer sentinel, users would always get runtime warnings although neither them nor we did anything wrong. ",
    "url": "https://github.com/meta-pytorch/data/issues/335",
    "state": "open",
    "labels": [
      "Better Engineering"
    ],
    "created_at": "2022-03-28T17:36:32Z",
    "updated_at": "2022-07-06T18:44:05Z",
    "comments": 8,
    "user": "pmeier"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4041,
    "title": "Add support for IIIF in datasets ",
    "body": "This is a feature request for support for IIIF in `datasets`. Apologies for the long issue. I have also used a different format to the usual feature request since I think that makes more sense but happy to use the standard template if preferred. \r\n\r\n## What is [IIIF](https://iiif.io/)?\r\n\r\nIIIF (International Image Interoperability Framework)\r\n> is a set of open standards for delivering high-quality, attributed digital objects online at scale. It\u2019s also an international community developing and implementing the IIIF APIs. IIIF is backed by a consortium of leading cultural institutions.\r\n\r\nThe tl;dr is that IIIF provides various specifications for implementing useful functionality for:\r\n- Institutions to make available images for various use cases \r\n- Users to have a consistent way of interacting/requesting these images \r\n- For developers to have a common standard for developing tools for working with IIIF images that will work across all institutions that implement a particular IIIF standard (for example the image viewer for the BNF can also work for the Library of Congress if they both use IIIF). \r\n\r\nSome institutions that various levels of support IIF include: The British Library, Internet Archive, Library of Congress, Wikidata. There are also many smaller institutions that have IIIF support. An incomplete list can be found here: https://iiif.io/guides/finding_resources/ \r\n\r\n## IIIF APIs\r\n\r\nIIIF consists of a number of APIs which could be integrated with datasets. I think the most obvious candidate for inclusion would be the [Image API](https://iiif.io/api/image/3.0/)\r\n\r\n### IIIF Image API \r\nThe Image API https://iiif.io/api/image/3.0/ is likely the most suitable first candidate for integration with datasets. The Image API offers a consistent protocol for requesting images via a URL:\r\n\r\n```{scheme}://{server}{/prefix}/{identifier}/{region}/{size}/{rotation}/{quality}.{format}```\r\n\r\nA concrete example of this: \r\n \r\n```https://stacks.stanford.edu/image/iiif/hg676jb4964%2F0380_796-44/full/full/0/default.jpg```\r\n\r\nAs you can see the scheme offers a number of options that can be specified in the URL, for example, size. Using the example URL we return:\r\n\r\n![](https://stacks.stanford.edu/image/iiif/hg676jb4964%2F0380_796-44/full/full/0/default.jpg)\r\n \r\nWe can change the size to request a size of 250 by 250, this is done by changing the size from `full` to `250,250` i.e. switching the URL to `https://stacks.stanford.edu/image/iiif/hg676jb4964%2F0380_796-44/full/250,250/0/default.jpg`\r\n \r\n![](https://stacks.stanford.edu/image/iiif/hg676jb4964%2F0380_796-44/full/250,250/0/default.jpg)\r\n\r\nWe can also request the image with max width 250, max height 250 whilst maintaining the aspect ratio using `!w,h`. i.e. change the url to `https://stacks.stanford.edu/image/iiif/hg676jb4964%2F0380_796-44/full/!250,250/0/default.jpg`\r\n\r\n![](https://stacks.stanford.edu/image/iiif/hg676jb4964%2F0380_796-44/full/!250,250/0/default.jpg)\r\n\r\nA full overview of the options for size can be found here: https://iiif.io/api/image/3.0/#42-size\r\n \r\n \r\n## Why would/could this be useful for datasets? \r\n\r\nThere are a few reasons why support for the IIIF Image API could be useful. Broadly the ability to have more control over how an image is returned from a server is useful for many ML workflows:\r\n- images can be requested in the right size, this prevents having to download/stream large images when the actual desired size is much smaller \r\n- can select a subset of an image: it is possible to select a sub-region of an image, this could be useful for example when you already have a bounding box for a subset of an image and then want to use this subset of an image for another task. For example, https://github.com/Living-with-machines/nnanno uses IIIF to request parts of a newspaper image that have been detected as 'photograph', 'illustration' etc for downstream use. \r\n- options for quality, rotation, the format can all be encoded in the URL request. \r\n\r\nThese may become particularly useful when pre-training models on large image datasets where the cost of downloading images with 1600 pixel width when you actually want 240 has a larger impact. \r\n\r\n## What could this look like in datasets?\r\n\r\nI think there are various ways in which support for IIIF could potentially be included in `datasets`. These suggestions aren't fully fleshed out but hopefully, give a sense of possible approaches that match existing `datasets` methods in their approach. \r\n\r\n### Use through datasets scripts \r\n\r\nLoading images via URL is already supported. There are a few possible 'extras' that could be included when using IIIF. One option is to leverage the IIIF protocol in datasets scripts, i.e. the dataset script can expose the IIIF options via the dataset script:\r\n\r\n```python \r\nds = load_dataset(\"iiif_dataset\", image_size=\"250,250\", fmt=\"jpg\")\r\n```\r\n\r\nThis is already possible. The approach to parsing the IIIF URLs would be left to the person creating the dataset script. \r\n\r\n### Sup",
    "url": "https://github.com/huggingface/datasets/issues/4041",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-03-28T15:19:25Z",
    "updated_at": "2022-04-05T18:20:53Z",
    "comments": 1,
    "user": "davanstrien"
  },
  {
    "repo": "pytorch/vision",
    "number": 5686,
    "title": "Question on segmentation code",
    "body": "### \ud83d\ude80 The feature\r\n\r\nHello.\r\nI want to ask you a simple question.\r\nI'm not sure if it's right to post a question in this 'Feature request' category.\r\n\r\nIn train.py code in the reference/segmentation, the get_dataset function is set the coco dataset classes 21.\r\nWhy the number of classes is 21?\r\nIs it wrong to set the number of classes to 91 which is the number of classes in the coco dataset?\r\n\r\nHere is the reference code.\r\n```python\r\ndef get_dataset(dir_path, name, image_set, transform):\r\n    def sbd(*args, **kwargs):\r\n        return torchvision.datasets.SBDataset(*args, mode=\"segmentation\", **kwargs)\r\n\r\n    paths = {\r\n        \"voc\": (dir_path, torchvision.datasets.VOCSegmentation, 21),\r\n        \"voc_aug\": (dir_path, sbd, 21),\r\n        \"coco\": (dir_path, get_coco, 21),\r\n    }\r\n    p, ds_fn, num_classes = paths[name]\r\n\r\n    ds = ds_fn(p, image_set=image_set, transforms=transform)\r\n    return ds, num_classes\n\ncc @vfdev-5 @datumbox @YosuaMichael",
    "url": "https://github.com/pytorch/vision/issues/5686",
    "state": "closed",
    "labels": [
      "question",
      "topic: semantic segmentation"
    ],
    "created_at": "2022-03-28T06:05:39Z",
    "updated_at": "2022-03-28T07:29:35Z",
    "user": "kcs6568"
  },
  {
    "repo": "pytorch/torchx",
    "number": 435,
    "title": "[torchx/examples] Remove usages of custom components in app/pipeline examples",
    "body": "## \ud83d\udcda Documentation\r\n\r\nSince we are making TorchX focused on Job launching and less about authoring components and AppDefs, we need to adjust our app and pipeline examples to demonstrate running the applications with the builtin `dist.ddp` and `utils.python` components rather than showing how to author a component for the application.\r\n\r\nFor 90% of the launch patterns `dist.ddp` (multi-homogeneous node) and `utils.python` (single node) is sufficient.\r\n\r\nThere are a couple of things we need to do:\r\n\r\n1. Delete `torchx/example/apps/**/component.py`\r\n2. For each application example show how to run it with the existing `dist.ddp` or `utils.python` builtin\r\n3. Link a section on how to copy existing components and further customizing (e.g. `torchx builtins --print dist.ddp > custom.py`)\r\n4. Make adjustments to the integration tests to test the example applications using builtin components (as advertised)\r\n5. Do 1-4 for the pipeline examples too.",
    "url": "https://github.com/meta-pytorch/torchx/issues/435",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2022-03-25T23:34:26Z",
    "updated_at": "2022-05-25T22:52:40Z",
    "comments": 0,
    "user": "kiukchung"
  },
  {
    "repo": "huggingface/datasets",
    "number": 4027,
    "title": "ElasticSearch Indexing example: TypeError: __init__() missing 1 required positional argument: 'scheme'",
    "body": "## Describe the bug\r\nI am following the example in the documentation for elastic search step by step (on google colab): https://huggingface.co/docs/datasets/faiss_es#elasticsearch\r\n\r\n```\r\nfrom datasets import load_dataset\r\nsquad = load_dataset('crime_and_punish', split='train[:1000]')\r\n```\r\n\r\nWhen I run the line: \r\n`squad.add_elasticsearch_index(\"context\", host=\"localhost\", port=\"9200\")`\r\n\r\nI get the error: \r\n`TypeError: __init__() missing 1 required positional argument: 'scheme'`\r\n\r\n\r\n## Expected results\r\nNo error message\r\n\r\n## Actual results\r\n\r\n```\r\nTypeError                                 Traceback (most recent call last)\r\n\r\n[<ipython-input-23-9205593edef3>](https://localhost:8080/#) in <module>()\r\n      1 import elasticsearch\r\n----> 2 squad.add_elasticsearch_index(\"text\", host=\"localhost\", port=\"9200\")\r\n\r\n\r\n6 frames\r\n\r\n[/usr/local/lib/python3.7/dist-packages/elasticsearch/_sync/client/utils.py](https://localhost:8080/#) in host_mapping_to_node_config(host)\r\n    209         options[\"path_prefix\"] = options.pop(\"url_prefix\")\r\n    210 \r\n--> 211     return NodeConfig(**options)  # type: ignore\r\n    212 \r\n    213 \r\n\r\nTypeError: __init__() missing 1 required positional argument: 'scheme'\r\n```\r\n\r\n## Environment info\r\n<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->\r\n- `datasets` version: 2.2.0\r\n- Platform: Linux, Google Colab\r\n- Python version: Google Colab (probably 3.7)\r\n- PyArrow version: ?\r\n",
    "url": "https://github.com/huggingface/datasets/issues/4027",
    "state": "closed",
    "labels": [
      "bug",
      "duplicate"
    ],
    "created_at": "2022-03-25T16:22:28Z",
    "updated_at": "2022-04-07T10:29:52Z",
    "comments": 2,
    "user": "MoritzLaurer"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1872,
    "title": "Transfer learning tutorial: Loss and Accuracy curves the wrong way",
    "body": "Hey,\r\n\r\nI have a question concerning the transfer learning tutorial (https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html).\r\n\r\nFor a few days, I've been trying to figure out why the validation and training curves are reversed there. By this, I mean that for general neural networks the training curves are always better than the validation curves (lower loss and higher accuracy). However, as in the tutorial itself, this is not the case (see also values in the tutorial). To make the whole thing clearer, I also ran the tutorial for 100 epochs and plotted the accuracy and loss for training and validation. The graph looks like this:\r\n\r\n![100_epochs_training](https://user-images.githubusercontent.com/60505803/160148385-fc4f6de0-d799-4059-8c9a-eb2ee212e8d1.png)\r\n\r\nUnfortunately, I haven't found a real reason for this yet.\r\nIt shouldn't be the dataset itself (I tried the same with other data). The only thing is the BatchNorm, which is different for training and validation. But I also suspect that this is not the reason for this big difference and the changing role. In past projects also on neural networks, with batch normalization at least I didn't have these reversed roles of validation and training.\r\n\r\nHas anybody an idea, why this happens here and why it has not that effect using other neural networks?\n\ncc @suraj813",
    "url": "https://github.com/pytorch/tutorials/issues/1872",
    "state": "closed",
    "labels": [
      "question",
      "intro"
    ],
    "created_at": "2022-03-25T15:23:39Z",
    "updated_at": "2023-03-06T21:50:25Z",
    "user": "AlexanderGeng"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 74741,
    "title": "[FSDP] How to use fsdp in GPT model in Megatron-LM",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nAre there any examples similar to DeepSpeed \u200b\u200bthat can experience the fsdp function of pytorch. It would be nice to provide the GPT model in Megatron-LM.\n\n### Alternatives\n\nI hope to provide examples of benchmarking DeepSpeed \u200b\u200bto facilitate the in-depth use of the fsdp function.\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/74741",
    "state": "closed",
    "labels": [],
    "created_at": "2022-03-25T08:30:05Z",
    "updated_at": "2022-03-25T21:12:04Z",
    "user": "Baibaifan"
  },
  {
    "repo": "pytorch/text",
    "number": 1662,
    "title": "How to install LTS (0.9.2)?",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\n\r\nI've found that my PyTorch version is 1.8.2, so according to https://github.com/pytorch/text/#installation , the torchtext version is 0.9.2:\r\n![image](https://user-images.githubusercontent.com/48322321/160079803-6149cea6-ccfa-4b8f-a392-894c1a018216.png)\r\nBut as I use `conda install -c pytorch torchtext` to install, the version I installed defaultly is 0.6.0. So I wander, is this version also OK for  me as the torchtext version 0.9.2 is the highest version I can install, or it's not OK as I can only install 0.9.2 version?",
    "url": "https://github.com/pytorch/text/issues/1662",
    "state": "closed",
    "labels": [],
    "created_at": "2022-03-25T08:12:03Z",
    "updated_at": "2024-03-11T00:55:30Z",
    "user": "PolarisRisingWar"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 74740,
    "title": "How to export onnx with dynamic batch size for models with multiple outputs?",
    "body": "## Issue description\r\n\r\nI want to export my model to onnx. Following is my code:\r\ntorch.onnx._export(\r\nmodel,\r\ndummy_input,\r\nargs.output_name,\r\ninput_names=[args.input],\r\noutput_names=args.output,\r\nopset_version=args.opset,\r\n)\r\n\r\nIt works well. But I want to export it with dynamic batch size. So I try this:\r\ntorch.onnx._export(\r\nmodel,\r\ndummy_input,\r\nargs.output_name,\r\ninput_names=[args.input],\r\noutput_names=args.output,\r\nopset_version=args.opset,\r\ndynamic_axes={'input_tensor' : {0 : 'batch_size'},\r\n'classes' : {0 : 'batch_size'},\r\n'boxes' : {0 : 'batch_size'},\r\n'scores' : {0 : 'batch_size'},}\r\n)\r\n\r\nIt crashed with following message:\r\n``2022-03-25 13:38:11.201 | ERROR | main::114 - An error has been caught in function '', process 'MainProcess' (1376540), thread 'MainThread' (139864366814016):\r\nTraceback (most recent call last):\r\n\r\nFile \"tools/export_onnx.py\", line 114, in\r\nmain()\r\n\u2514 <function main at 0x7f3434447f70>\r\n\r\nFile \"tools/export_onnx.py\", line 107, in main\r\nmodel_simp, check = simplify(onnx_model)\r\n\u2502 \u2514 ir_version: 7\r\n\u2502 producer_name: \"pytorch\"\r\n\u2502 producer_version: \"1.10\"\r\n\u2502 graph {\r\n\u2502 node {\r\n\u2502 output: \"607\"\r\n\u2502 name: \"Constant_0\"\r\n\u2502 ...\r\n\u2514 <function simplify at 0x7f3417604dc0>\r\n\r\nFile \"/home/xyz/anaconda3/envs/yolox/lib/python3.8/site-packages/onnxsim/onnx_simplifier.py\", line 483, in simplify\r\nmodel = fixed_point(model, infer_shapes_and_optimize, constant_folding)\r\n\u2502 \u2502 \u2502 \u2514 <function simplify..constant_folding at 0x7f34175d5f70>\r\n\u2502 \u2502 \u2514 <function simplify..infer_shapes_and_optimize at 0x7f342715c160>\r\n\u2502 \u2514 ir_version: 7\r\n\u2502 producer_name: \"pytorch\"\r\n\u2502 producer_version: \"1.10\"\r\n\u2502 graph {\r\n\u2502 node {\r\n\u2502 output: \"607\"\r\n\u2502 name: \"Constant_0\"\r\n\u2502 ...\r\n\u2514 <function fixed_point at 0x7f3417604d30>\r\nFile \"/home/xyz/anaconda3/envs/yolox/lib/python3.8/site-packages/onnxsim/onnx_simplifier.py\", line 384, in fixed_point\r\nx = func_b(x)\r\n\u2502 \u2514 ir_version: 7\r\n\u2502 producer_name: \"pytorch\"\r\n\u2502 producer_version: \"1.10\"\r\n\u2502 graph {\r\n\u2502 node {\r\n\u2502 input: \"input_tensor\"\r\n\u2502 input: \"608\"\r\n\u2502 ...\r\n\u2514 <function simplify..constant_folding at 0x7f34175d5f70>\r\nFile \"/home/xyz/anaconda3/envs/yolox/lib/python3.8/site-packages/onnxsim/onnx_simplifier.py\", line 473, in constant_folding\r\nres = forward_for_node_outputs(model,\r\n\u2502 \u2514 ir_version: 7\r\n\u2502 producer_name: \"pytorch\"\r\n\u2502 producer_version: \"1.10\"\r\n\u2502 graph {\r\n\u2502 node {\r\n\u2502 input: \"input_tensor\"\r\n\u2502 input: \"608\"\r\n\u2502 ...\r\n\u2514 <function forward_for_node_outputs at 0x7f34176048b0>\r\nFile \"/home/xyz/anaconda3/envs/yolox/lib/python3.8/site-packages/onnxsim/onnx_simplifier.py\", line 229, in forward_for_node_outputs\r\nres = forward(model,\r\n\u2502 \u2514 ir_version: 7\r\n\u2502 producer_name: \"pytorch\"\r\n\u2502 producer_version: \"1.10\"\r\n\u2502 graph {\r\n\u2502 node {\r\n\u2502 input: \"input_tensor\"\r\n\u2502 input: \"608\"\r\n\u2502 ...\r\n\u2514 <function forward at 0x7f3417604820>\r\nFile \"/home/xyz/anaconda3/envs/yolox/lib/python3.8/site-packages/onnxsim/onnx_simplifier.py\", line 210, in forward\r\ninputs.update(generate_specific_rand_input(model, {name: shape}))\r\n\u2502 \u2502 \u2502 \u2502 \u2502 \u2514 [0, 3, 640, 640]\r\n\u2502 \u2502 \u2502 \u2502 \u2514 'input_tensor'\r\n\u2502 \u2502 \u2502 \u2514 ir_version: 7\r\n\u2502 \u2502 \u2502 producer_name: \"pytorch\"\r\n\u2502 \u2502 \u2502 producer_version: \"1.10\"\r\n\u2502 \u2502 \u2502 graph {\r\n\u2502 \u2502 \u2502 node {\r\n\u2502 \u2502 \u2502 input: \"input_tensor\"\r\n\u2502 \u2502 \u2502 input: \"608\"\r\n\u2502 \u2502 \u2502 ...\r\n\u2502 \u2502 \u2514 <function generate_specific_rand_input at 0x7f3417604550>\r\n\u2502 \u2514 <method 'update' of 'dict' objects>\r\n\u2514 {}\r\nFile \"/home/xyz/anaconda3/envs/yolox/lib/python3.8/site-packages/onnxsim/onnx_simplifier.py\", line 98, in generate_specific_rand_input\r\nraise RuntimeError(\r\n\r\nRuntimeError: The shape of input \"input_tensor\" has dynamic size \"[0, 3, 640, 640]\", please determine the input size manually by \"--dynamic-input-shape --input-shape xxx\" or \"--input-shape xxx\". Run \"python3 -m onnxsim -h\" for details\r\n``\r\nMy environments:\r\n`pip list\r\nPackage                   Version               Editable project location\r\n------------------------- --------------------- ------------------------------------------------------------------\r\nabsl-py                   1.0.0\r\nalbumentations            1.1.0\r\nanykeystore               0.2\r\napex                      0.1\r\nappdirs                   1.4.4\r\ncachetools                4.2.4\r\ncertifi                   2021.10.8\r\ncharset-normalizer        2.0.9\r\ncryptacular               1.6.2\r\ncycler                    0.11.0\r\nCython                    0.29.25\r\ndefusedxml                0.7.1\r\nflatbuffers               2.0\r\nfonttools                 4.28.3\r\ngoogle-auth               2.3.3\r\ngoogle-auth-oauthlib      0.4.6\r\ngreenlet                  1.1.2\r\ngrpcio                    1.42.0\r\nhupper                    1.10.3\r\nidna                      3.3\r\nimageio                   2.13.3\r\nimgaug                    0.4.0\r\nimportlib-metadata        4.8.2\r\njoblib                    1.1.0\r\nkiwisolver                1.3.2\r\nloguru                    0.5.3\r\nMako                      1.1.6\r\nMarkdown                  3.3.6\r\nMarkupSafe                2.0.1\r\nmatplotlib                3.5.1\r\nnetworkx                  2.6.3\r\nninja                     1.10.2.3\r\nnumpy                     1.2",
    "url": "https://github.com/pytorch/pytorch/issues/74740",
    "state": "closed",
    "labels": [],
    "created_at": "2022-03-25T07:55:45Z",
    "updated_at": "2022-03-25T08:15:58Z",
    "user": "LLsmile"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 74616,
    "title": "__rpow__(self, other) OpInfo should not test the case where `other` is a Tensor",
    "body": "### \ud83d\udc1b Describe the bug\n\nAfter https://github.com/pytorch/pytorch/pull/74280 (cc @mruberry), the `__rpow__` OpInfo has a sample input where `other` is a Tensor. This cannot happen during normal execution: to get to `Tensor.__rpow__` a user does the following:\r\n\r\n```\r\n# self = some_tensor\r\n# other = not_a_tensor\r\nnot_a_tensor ** some_tensor\r\n```\r\nIf instead `not_a_tensor` is a Tensor, this ends up calling `__pow__` in Python which will then handle the case.\r\n\r\nAre there any legitimate cases where we do want this to happen?\r\n\r\n## Context\r\n\r\nThis caused some functorch tests to fail because we don't support the route where both `self` and `other` are Tensors. pytorch/pytorch also has some cryptic warning in that route:\r\n![image](https://user-images.githubusercontent.com/5652049/159735534-1f19bbad-0596-4577-8ced-d3a61c6a8bfd.png)\r\n\r\nbut it's not clear to me if we want to support this or not.\n\n### Versions\n\npytorch main branch",
    "url": "https://github.com/pytorch/pytorch/issues/74616",
    "state": "open",
    "labels": [
      "module: tests",
      "triaged"
    ],
    "created_at": "2022-03-23T15:28:17Z",
    "updated_at": "2022-04-18T02:34:55Z",
    "user": "zou3519"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 936,
    "title": " \u2753[Question] RuntimeError: [Error thrown at core/conversion/converters/impl/select.cpp:236] Expected const_layer to be true but got false",
    "body": "## \u2753 Question\r\n\r\nwhen i convert jit model, got the error\r\nthis is my forward code: \r\ninput `x` shape is `(batch, 6, height, width)`, first step is to split `x` into two tensors, but failed\r\n```\r\n    def forward(self, x):\r\n        fg = x[:,0:3,:,:]   ## this line got error\r\n        bg = x[:,3:,:,:]\r\n        \r\n        fg = self.backbone(fg)\r\n        bg = self.backbone(bg)\r\n        out = self.heads(fg, bg)\r\n        return out\r\n```\r\ncomplete traceback:\r\n```\r\nERROR: [Torch-TensorRT TorchScript Conversion Context] - 3: [network.cpp::addConstant::1052] Error Code 3: Internal Error (Parameter check failed at: optimizer/api/network.cpp::addConstant::1052, condition: !weights.values == !weights.count\r\n)\r\nTraceback (most recent call last):\r\n  File \"model_converter.py\", line 263, in <module>\r\n    engine = get_engine(model_info.trt_engine_path, calib, int8_mode=int8_mode, optimize_params=optimize_params)\r\n  File \"model_converter.py\", line 173, in get_engine\r\n    return build_engine(max_batch_size)\r\n  File \"model_converter.py\", line 95, in build_engine\r\n    return build_engine_from_jit(max_batch_size)\r\n  File \"model_converter.py\", line 80, in build_engine_from_jit\r\n    tensorrt_engine_model = torch_tensorrt.ts.convert_method_to_trt_engine(traced_model, \"forward\", **compile_settings)\r\n  File \"/usr/local/lib/python3.6/dist-packages/torch_tensorrt/ts/_compiler.py\", line 211, in convert_method_to_trt_engine\r\n    return _C.convert_graph_to_trt_engine(module._c, method_name, _parse_compile_spec(compile_spec))\r\nRuntimeError: [Error thrown at core/conversion/converters/impl/select.cpp:236] Expected const_layer to be true but got false\r\nUnable to create constant layer from node: %575 : Tensor = aten::slice(%570, %13, %12, %14, %13) # /data/small_detection/centernet_pytorch_small_detection/models/low_freeze_comb_net.py:455:0\r\n```\r\n\r\n## What you have already tried\r\n\r\ntry use `fg, bg = x.split(int(x.shape[1] // 2), dim=1)` instead of `fg = x[:,0:3,:,:]` and `bg = x[:,3:,:,:]` but got convert error for op not support \r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.4.0\r\n - CPU Architecture: arm (nx)\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch: docker of nvidia l4t\r\n - Python version: 3.6.9\r\n - CUDA version: 10.2.300\r\n - Tensorrt version: 8.0.1.6\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/936",
    "state": "closed",
    "labels": [
      "question",
      "component: converters",
      "No Activity"
    ],
    "created_at": "2022-03-22T02:40:39Z",
    "updated_at": "2023-02-10T00:13:18Z",
    "user": "pupumao"
  },
  {
    "repo": "pytorch/text",
    "number": 1661,
    "title": "what's is the replacement of legacy?",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\n\r\n<!-- Please send questions or ask for help here. -->\r\nin torchtext0.12.0, the module legacy has been removed, so how to implement the same functions as the class legacy.Field?\r\nthanks for your help.",
    "url": "https://github.com/pytorch/text/issues/1661",
    "state": "closed",
    "labels": [],
    "created_at": "2022-03-21T11:03:55Z",
    "updated_at": "2022-10-04T01:51:51Z",
    "user": "1152545264"
  },
  {
    "repo": "pytorch/serve",
    "number": 1518,
    "title": "How to return a dict response, not a list",
    "body": "<!--\r\nThank you for suggesting an idea to improve torchserve model serving experience.\r\n\r\nPlease fill in as much of the template below as you're able.\r\n-->\r\n\r\n## Is your feature request related to a problem? Please describe.\r\n<!-- Please describe the problem you are trying to solve. -->\r\nwhen I retuan a dict value,  serve return a error.\r\n\r\n## Describe the solution\r\n<!-- Please describe the desired behavior. -->\r\n\r\n## Describe alternatives solution\r\n<!-- Please describe alternative solutions or features you have considered. -->\r\n",
    "url": "https://github.com/pytorch/serve/issues/1518",
    "state": "closed",
    "labels": [],
    "created_at": "2022-03-20T10:30:09Z",
    "updated_at": "2022-03-25T20:14:17Z",
    "user": "liuhuiCNN"
  },
  {
    "repo": "pytorch/data",
    "number": 310,
    "title": "MapDatapipe Mux/Demux Support",
    "body": "### \ud83d\ude80 The feature\r\n\r\nMapDatapipes are missing Mux and Demux pipes as noted in https://github.com/pytorch/pytorch/issues/57031\r\n\r\nTalked to @ejguan on https://discuss.pytorch.org/t/mapdatapipe-support-mux-demux/146305, I plan to do a PR with Mux/Demux added. However, I will add rough outlines / ideas here first. I plan to match the same test strategy as the Mux/Demux pipes already in IterDataPipes.\r\n\r\n### Motivation, pitch\r\n\r\nFor Demux: My basic test/goal is to download mnist, and split it into train/validation sets using map.\r\nFor Mux: Then attempt to mux them back together (not sure how to come up with a useful example of this). \r\n    - Might try a scenario where I split train into k splits and rejoin them? \r\n\r\nNot sure when this should be converted to a pr. This would be my first pr into pytorch, so I want the pr to be as clean as possible. Putting code changes ideas here I feel could allow for more dramatic/messy changes/avoid a messy git diff/worry about formatting once code is finalized.\r\n\r\nNote: doc strings are removed to make code shorter and will be readded in pr. Not-super-useful comments will be removed in pr.\r\n\r\nNote: let me know if a draft pr would be better.\r\n\r\nDemux working code:\r\nDraft 1: https://github.com/josiahls/fastrl/blob/848f90d0ed5b0c2cd0dd3e134b0b922dd8a53d7c/fastrl/fastai/data/pipes.py\r\n\r\nDemux working code + Basic Test\r\nDraft 1: https://github.com/josiahls/fastrl/blob/848f90d0ed5b0c2cd0dd3e134b0b922dd8a53d7c/nbs/02c_fastai.data.pipes.ipynb\r\n\r\nMux working code:\r\nDraft 1: https://github.com/josiahls/fastrl/blob/30cd47766e9fb1bc75d32de877f54b8de9567c36/fastrl/fastai/data/pipes/mux.py\r\n\r\nBasic Test\r\nDraft 1: https://github.com/josiahls/fastrl/blob/30cd47766e9fb1bc75d32de877f54b8de9567c36/nbs/02c_fastai.data.pipes.mux.ipynb\r\n",
    "url": "https://github.com/meta-pytorch/data/issues/310",
    "state": "open",
    "labels": [],
    "created_at": "2022-03-19T19:31:49Z",
    "updated_at": "2022-03-27T03:31:32Z",
    "comments": 7,
    "user": "josiahls"
  },
  {
    "repo": "pytorch/data",
    "number": 303,
    "title": "DataPipe for GCS (Google Cloud Storage)",
    "body": "### \ud83d\ude80 The feature\r\n\r\nBuild a DataPipe that allows users to connect to GCS (Google Cloud Storage). There is a chance that existing DataPipes may suffice, so we should examine the relevant APIs first.\r\n\r\n### Motivation, pitch\r\n\r\nGCS (Google Cloud Storage) is one of the commonly used cloud storage for storing data.\r\n\r\n### Alternatives\r\n\r\nExisting DataPipes are sufficient and we should provide an example of how that can be done instead.\r\n\r\n### Additional context\r\n\r\nFeel free to react or leave a comment if this feature is important for you or for any other suggestion.",
    "url": "https://github.com/meta-pytorch/data/issues/303",
    "state": "closed",
    "labels": [],
    "created_at": "2022-03-16T19:01:03Z",
    "updated_at": "2023-03-07T14:49:15Z",
    "comments": 2,
    "user": "NivekT"
  },
  {
    "repo": "pytorch/data",
    "number": 302,
    "title": "Notes on shuffling, sharding, and batchsize",
    "body": "(I'm writing this down here to have a written trace, but I'm looking forward to discuss this with you all in our upcoming meetings :) )\r\n\r\nI spent some time porting the torchvision training recipes to use datapipes, and I noticed that the model I trained on ImageNet with DPs was much less accurate than the one with regular datasets. After **a lot** of digging I came to the following conclusion:\r\n\r\n1. the datapipe must be shuffled **before** it is sharded\r\n2. the DataLoader does not behave in the same way with a datapipe and with a regular indexable dataset, in particular when it comes to size of the last batches in an epoch. This has a **dramatic** effect on accuracy (probably because of batch-norm).\r\n\r\nDetails below. Note: for sharding, I used [this custom torchvision sharder](https://github.com/pytorch/vision/blob/eb6e39157cf1aaca184b52477cf1e9159bbcbd63/torchvision/prototype/datasets/utils/_internal.py#L120) which takes DDP and dataloader workers into account, + the TakerIterDataPipe below it.\r\n\r\n-----\r\n\r\n### Shuffle before shard\r\n\r\nFirst, some quick results (training a resnext50_32x4d for 5 epochs with 8 GPUs and 12 workers per GPU):\r\nShuffle before shard: Acc@1 = 47%  -- this is on par with the regular indexable dataset version (phew!!)\r\nShuffle after shard: Acc@1 = 2%\r\n\r\nOne way to explain this is that if we shuffle after we shard, then only sub-parts of the dataset get shuffled. Namely, each of the 8 * 12 = 96 dataloader workers receive ~1/96th of the dataset, and each of these parts get shuffled. But that means that the shuffling is far from uniform and for datasets in which the layout is `all_samples_from_class1, all_samples_from_class2, ... all_samples_from_classN`, it's possible that some class i is **never** in the same batch as class j.\r\n\r\nSo it looks like we need to shuffle before we shard. Now, if we shuffle before sharding, we still need to make sure that all of the 96 workers shuffle the dataset with the same RNG. Otherwise we risk sampling a given sample in more than one worker, or not at all. For that to happen, one can set a random seed in `worker_init_fn`, but that causes a second problem: the random transformations of each worker will also be the same, and this will lead to slightly less accurate results; on top of that, all epochs will start with the same seed, so the shuffling is the same across all epochs. **I do not know how to solve this problem yet.**\r\n\r\nNote that TF shuffles the dataset before storing it. We might do something similar, but that would still not solve the issue for custom users datasets.\r\n\r\n\r\n----\r\n\r\n### Size of the batches at the end of an epoch\r\n\r\nSome quick results (same experiment as above):\r\n\r\nwith drop_last=True: Acc@1 = 47%\r\nwith drop_last=False: Acc@1 = 11%\r\n\r\nNear the end of the epoch, the dataloader with DP will produce a lot of batches with size 1 if drop_last is False. See the last batches of an epoch on indices from `[0, len(imagenet))` with a requested batch size of 32: https://pastebin.com/wjS7YC90. In contrast, this does not happen when using an indexable dataset: https://pastebin.com/Rje0U8Dx.\r\n\r\nI'm not too sure of why this has such a dramatic impact, but it's possible that this has to do with batch-norm, as @fmassa pointed out offline. Using `drop_last` will make sure that the 1-sized batches are eliminated, producing a much better accuracy.\r\n\r\nI guess the conclusion here is that it's worth unifying the behaviour of the DataLoader both DPs and regular indexable datasets regarding the batch size, because with indexable datasets and drop_last=False we still get ~47% acc.",
    "url": "https://github.com/meta-pytorch/data/issues/302",
    "state": "open",
    "labels": [],
    "created_at": "2022-03-16T18:08:41Z",
    "updated_at": "2022-05-24T12:55:18Z",
    "comments": 28,
    "user": "NicolasHug"
  },
  {
    "repo": "pytorch/data",
    "number": 301,
    "title": "Add TorchArrow Nightly CI Test",
    "body": "### \ud83d\ude80 The feature\r\n\r\nTorchArrow nightly build is now [available for Linux](https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html) (other versions will be next).\r\n\r\nWe should add TorchArrow nightly CI tests for these [TorchArrow dataframe related unit tests](https://github.com/pytorch/data/blob/main/test/test_dataframe.py).\r\n\r\n### Motivation, pitch\r\n\r\nThis will ensure that our usages remain compatible with TA's APIs.\r\n\r\n### Additional context\r\nThis is a good first issue for people who want to understand how our CI works. Other [domain CI tests](https://github.com/pytorch/data/blob/main/.github/workflows/domain_ci.yml) (for Vision, Text) can serve as examples on how to set this up.",
    "url": "https://github.com/meta-pytorch/data/issues/301",
    "state": "closed",
    "labels": [
      "good first issue"
    ],
    "created_at": "2022-03-16T17:28:27Z",
    "updated_at": "2022-05-09T15:38:31Z",
    "comments": 1,
    "user": "NivekT"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 74288,
    "title": "How to Minimize Rounding Error in torch.autograd.functional.jacobian?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nBefore I start, let me express my sincerest gratitude to issue #49171, in making it possible to take the jacobian wrt all model parameters! A great functionality indeed!\r\n\r\nI am raising an issue about the approximation error when the jacobian function goes to high dimensions. This is necessary when calculating the jacobian wrt parameters using batch inputs. In low dimensions, the following code work fine\r\n```\r\nimport torch\r\nfrom torch.autograd.functional import jacobian\r\nfrom torch.nn.utils import _stateless\r\nfrom torch import nn\r\nfrom torch.nn import functional as F\r\n```\r\n\r\n```\r\nmodel = nn.Conv2d(3,1,1)\r\ninput = torch.rand(1, 3, 32, 32)\r\ntwo_input = torch.cat([input, torch.rand(1, 3, 32, 32)], dim=0)\r\nnames = list(n for n, _ in model.named_parameters())\r\n\r\n# This is exactly the same code as in issue #49171\r\njac1 = jacobian(lambda *params: _stateless.functional_call(model, {n: p for n, p in zip(names, params)}, input), tuple(model.parameters()))\r\njac2 = jacobian(lambda *params: _stateless.functional_call(model, {n: p for n, p in zip(names, params)}, two_input), tuple(model.parameters()))\r\nassert torch.allclose(jac1[0][0], jac2[0][0])\r\n```\r\n\r\nHowever, when I make the model slightly larger the assertion breaks down, which seem like it's due to rounding errors\r\n```\r\nclass ResBasicBlock(nn.Module):\r\n    def __init__(self, n_channels, n_inner_channels, kernel_size=3):\r\n        super().__init__()\r\n\r\n        self.conv1 = nn.Conv2d(n_channels, n_inner_channels, (kernel_size, kernel_size), padding=kernel_size // 2,\r\n                               bias=False)\r\n        self.conv2 = nn.Conv2d(n_inner_channels, n_channels, (kernel_size, kernel_size), padding=kernel_size // 2,\r\n                               bias=False)\r\n        self.norm1 = nn.BatchNorm2d(n_inner_channels)\r\n        self.norm2 = nn.BatchNorm2d(n_channels)\r\n        self.norm3 = nn.BatchNorm2d(n_channels)\r\n\r\n    def forward(self, z, x=None):\r\n        if x == None:\r\n            x = torch.zeros_like(z)\r\n        y = self.norm1(F.relu(self.conv1(z)))\r\n        return self.norm3(F.relu(z + self.norm2(x + self.conv2(y))))\r\n\r\nmodel = ResBasicBlock(3, 1)\r\ninput = torch.rand(1, 3, 32, 32)\r\ntwo_input = torch.cat([input, torch.rand(1, 3, 32, 32)], dim=0)\r\nnames = list(n for n, _ in model.named_parameters())\r\n\r\n# This is exactly the same code as in issue #49171\r\njac1 = jacobian(lambda *params: _stateless.functional_call(model, {n: p for n, p in zip(names, params)}, input), tuple(model.parameters()))\r\njac2 = jacobian(lambda *params: _stateless.functional_call(model, {n: p for n, p in zip(names, params)}, two_input), tuple(model.parameters()))\r\nassert torch.allclose(jac1[0][0], jac2[0][0])\r\n```\r\n\r\n### Versions\r\n\r\n```\r\nCollecting environment information...\r\nPyTorch version: 1.11.0\r\nIs debug build: False\r\nCUDA used to build PyTorch: None\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: macOS 12.3 (x86_64)\r\nGCC version: Could not collect\r\nClang version: 13.1.6 (clang-1316.0.21.2)\r\nCMake version: version 3.17.1\r\nLibc version: N/A\r\n\r\nPython version: 3.8.12 (default, Oct 12 2021, 06:23:56)  [Clang 10.0.0 ] (64-bit runtime)\r\nPython platform: macOS-10.16-x86_64-i386-64bit\r\nIs CUDA available: False\r\nCUDA runtime version: No CUDA\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nIs XNNPACK available: True\r\n\r\nVersions of relevant libraries:\r\n[pip3] functorch==0.1.0\r\n[pip3] numpy==1.21.2\r\n[pip3] torch==1.11.0\r\n[pip3] torchaudio==0.11.0\r\n[pip3] torchvision==0.12.0\r\n[conda] blas                      1.0                         mkl    defaults\r\n[conda] ffmpeg                    4.3                  h0a44026_0    pytorch\r\n[conda] functorch                 0.1.0                    pypi_0    pypi\r\n[conda] mkl                       2021.4.0           hecd8cb5_637    defaults\r\n[conda] mkl-service               2.4.0            py38h9ed2024_0    defaults\r\n[conda] mkl_fft                   1.3.1            py38h4ab4a9b_0    defaults\r\n[conda] mkl_random                1.2.2            py38hb2f4e1b_0    defaults\r\n[conda] numpy                     1.21.2           py38h4b4dc7a_0    defaults\r\n[conda] numpy-base                1.21.2           py38he0bd621_0    defaults\r\n[conda] pytorch                   1.11.0                  py3.8_0    pytorch\r\n[conda] torchaudio                0.11.0                 py38_cpu    pytorch\r\n[conda] torchvision               0.12.0                 py38_cpu    pytorch\r\n```\n\ncc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7",
    "url": "https://github.com/pytorch/pytorch/issues/74288",
    "state": "closed",
    "labels": [
      "module: numerical-stability",
      "module: autograd",
      "triaged"
    ],
    "created_at": "2022-03-16T09:25:18Z",
    "updated_at": "2022-03-17T14:17:29Z",
    "user": "QiyaoWei"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 74256,
    "title": "Create secure credential storage for metrics credentials and associated documentation on how to regenerate them if needed",
    "body": "cc @seemethere @malfet @pytorch/pytorch-dev-infra",
    "url": "https://github.com/pytorch/pytorch/issues/74256",
    "state": "open",
    "labels": [
      "module: ci",
      "triaged"
    ],
    "created_at": "2022-03-15T20:21:20Z",
    "updated_at": "2022-03-16T17:30:02Z",
    "user": "seemethere"
  },
  {
    "repo": "pytorch/torchx",
    "number": 422,
    "title": "kubernetes: add support for persistent volume claim volumes",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\nAdd support for PersistentVolumeClaim mounts to Kubernetes scheduler.\r\n\r\n\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\n\r\nhttps://github.com/pytorch/torchx/pull/420 adds bindmounts to K8S, we want to add in persistent volume claims for Kubernetes which will let us support most of the other remote mounts. \r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\nAdd a new mount type to specs:\r\n\r\n```\r\nclass MountTypes(Enum):\r\n    PERSISTENT_CLAIM = \"persistent-claim\"\r\n    BIND = \"bind\"\r\n\r\nclass PersistentClaimMount(Mount):\r\n    name: str\r\n    dst_path: str\r\n    read_only: bool = False\r\n\r\nclass Role:\r\n    ...\r\n    mounts: List[Union[BindMount,PersistentClaimMount]]\r\n```\r\n\r\nAdd a new format to `parse_mounts`:\r\n\r\n```\r\n--mounts bind=persistent-claim,name=foo,dst=/foo[,readonly]\r\n```\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\nUsers can already mount a volume on the host node and then bind mount it into kubernetes pod but this violates some isolation principles and can be an issue from a security perspective. It also is a worse experience for users since the mounts need to be mounted on ALL hosts.\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n\r\n* V1Volume https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Volume.md\r\n* V1PersistentVolume https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1PersistentVolumeClaimVolumeSource.md\r\n* FSx on EKS https://github.com/kubernetes-sigs/aws-fsx-csi-driver/blob/master/examples/kubernetes/static_provisioning/README.md\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/422",
    "state": "closed",
    "labels": [],
    "created_at": "2022-03-15T18:21:10Z",
    "updated_at": "2022-03-16T22:12:26Z",
    "comments": 0,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 929,
    "title": "\u2753 [Question] Expected isITensor() to be true but got false Requested ITensor from Var, however Var type is c10::IValue",
    "body": "I try to use python trtorch==0.4.1 to compile my own pytorch jit traced model, and I find that it goes wrong with the following information:\r\n\r\n`\r\nTraceback (most recent call last):\r\n  File \"./prerecall_server.py\", line 278, in <module>\r\n    ModelServing(args),\r\n  File \"./prerecall_server.py\",, line 133, in __init__\r\n    self.model = trtorch.compile(self.model, compile_settings)\r\n  File \"/usr/local/lib/python3.6/dist-packages/trtorch/_compiler.py\", line 73, in compile\r\n    compiled_cpp_mod = trtorch._C.compile_graph(module._c, _parse_compile_spec(compile_spec))\r\nRuntimeError: [Error thrown at core/conversion/var/Var.cpp:149] Expected isITensor() to be true but got false\r\nRequested ITensor from Var, however Var type is c10::IValue\r\n`\r\n\r\nI make debug and find that the module contains the unknown operation.\r\n\r\n`\r\n\r\n  class Causal_Norm_Classifier(nn.Module):\r\n\r\n     def __init__(self, num_classes=1000, feat_dim=2048, use_effect=False, num_head=2, tau=16.0, alpha=1.0, gamma=0.03125, mu=0.9, *args):\r\n        super(Causal_Norm_Classifier, self).__init__()\r\n        # default alpha = 3.0\r\n        #self.weight = nn.Parameter(torch.Tensor(num_classes, feat_dim).cuda(), requires_grad=True)\r\n        self.scale = tau / num_head   # 16.0 / num_head\r\n        self.norm_scale = gamma       # 1.0 / 32.0\r\n        self.alpha = alpha            # 3.0\r\n        self.num_head = num_head\r\n        self.feat_dim = feat_dim\r\n        self.head_dim = feat_dim // num_head\r\n        self.use_effect = use_effect\r\n        self.relu = nn.ReLU(inplace=True)\r\n        self.mu = mu\r\n\r\n        self.register_parameter('weight', nn.Parameter(torch.Tensor(num_classes, feat_dim), requires_grad=True))\r\n\r\n        self.reset_parameters(self.weight)\r\n        \r\n    def reset_parameters(self, weight):\r\n        stdv = 1. / math.sqrt(weight.size(1))\r\n        weight.data.uniform_(-stdv, stdv)\r\n\r\n\r\n    def forward(self, x, training=True, use_effect=True):\r\n        # calculate capsule normalized feature vector and predict\r\n        normed_w = self.multi_head_call(self.causal_norm, self.weight, weight=self.norm_scale)\r\n        normed_x = self.multi_head_call(self.l2_norm, x)\r\n        y = torch.mm(normed_x * self.scale, normed_w.t())\r\n\r\n        return y\r\n\r\n    def multi_head_call(self, func, x, weight=None):\r\n        assert len(x.shape) == 2\r\n        x_list = torch.split(x, self.head_dim, dim=1)\r\n        if weight:\r\n            y_list = [func(item, weight) for item in x_list]\r\n        else:\r\n            y_list = [func(item) for item in x_list]\r\n        assert len(x_list) == self.num_head\r\n        assert len(y_list) == self.num_head\r\n        return torch.cat(y_list, dim=1)\r\n\r\n    def l2_norm(self, x):\r\n        normed_x = x / torch.norm(x, 2, 1, keepdim=True)\r\n        return normed_x\r\n\r\n    def causal_norm(self, x, weight):\r\n        norm= torch.norm(x, 2, 1, keepdim=True)\r\n        normed_x = x / (norm + weight)\r\n        return normed_x\r\n`\r\n\r\n\r\nCan you help me with this?",
    "url": "https://github.com/pytorch/TensorRT/issues/929",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: partitioning"
    ],
    "created_at": "2022-03-15T10:17:07Z",
    "updated_at": "2023-04-01T00:02:11Z",
    "user": "clks-wzz"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1860,
    "title": "Where is the mnist_sample notebook?",
    "body": "In tutorial [WHAT IS TORCH.NN REALLY?](https://pytorch.org/tutorials/beginner/nn_tutorial.html#closing-thoughts), `Closing thoughts` part:\r\n\r\n```\r\nTo see how simple training a model can now be, take a look at the mnist_sample sample notebook.\r\n```\r\n\r\nDoes`mnist_sample notebook ` refer to https://github.com/pytorch/tutorials/blob/master/beginner_source/nn_tutorial.py and https://pytorch.org/tutorials/_downloads/5ddab57bb7482fbcc76722617dd47324/nn_tutorial.ipynb ?\r\n\r\nNote:\r\n\r\nhttps://github.com/pytorch/tutorials/blob/b1d8993adc3663f0f00d142ac67f6695baaf107a/beginner_source/nn_tutorial.py#L853",
    "url": "https://github.com/pytorch/tutorials/issues/1860",
    "state": "closed",
    "labels": [],
    "created_at": "2022-03-14T12:21:14Z",
    "updated_at": "2022-08-18T17:35:34Z",
    "user": "Yang-Xijie"
  },
  {
    "repo": "pytorch/torchx",
    "number": 421,
    "title": "Document usage of .torchxconfig",
    "body": "## \ud83d\udcda Documentation\r\n\r\n## Link\r\nCurrent `.torchxconfig` docs (https://pytorch.org/torchx/main/runner.config.html) explain how it works and its APIs but does not provide any practical guidance on what configs can be put into it and why its useful.\r\n\r\n## What does it currently say?\r\nNothing wrong with what it currently says. \r\n\r\n## What should it say?\r\nShould add more practical user guide on what are the supported configs in `.torchxconfig` and under what circumstances it gets picked up with the `torchx` CLI. As well as:\r\n\r\n1. Examples\r\n2. Best Practices\r\n\r\n## Why?\r\nCurrent .torchxconfig docs is useful to the programmer but not for the user.\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/421",
    "state": "closed",
    "labels": [],
    "created_at": "2022-03-12T00:30:59Z",
    "updated_at": "2022-03-28T20:58:44Z",
    "comments": 1,
    "user": "kiukchung"
  },
  {
    "repo": "pytorch/torchx",
    "number": 418,
    "title": "cli/colors: crash when importing if sys.stdout is closed",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\nSometimes `sys.stdout` is closed and `isatty()` throws an error at https://github.com/pytorch/torchx/blob/main/torchx/cli/colors.py#L11\r\n\r\nSwitching to a variant that checks if it's closed should work:\r\n```\r\nnot sys.stdout.closed and sys.stdout.isatty()\r\n```\r\n\r\nModule (check all that applies):\r\n * [ ] `torchx.spec`\r\n * [ ] `torchx.component`\r\n * [ ] `torchx.apps`\r\n * [ ] `torchx.runtime`\r\n * [x] `torchx.cli`\r\n * [ ] `torchx.schedulers`\r\n * [ ] `torchx.pipelines`\r\n * [ ] `torchx.aws`\r\n * [ ] `torchx.examples`\r\n * [ ] `other`\r\n\r\n\r\n## To Reproduce\r\n\r\nI'm not sure how to repro this externally other than explicitly closing `sys.stdout`\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n```\r\nI/O operation on closed file\r\nStack trace:\r\n...\r\nfrom torchx.cli.cmd_log import get_logs\r\nFile: <\"/mnt/xarfuse/uid-27156/4adc7caa-seed-nspid4026533510_cgpid2017229-ns-4026533507/torchx/cli/cmd_log.py\">, line 20, in <module>\r\nfrom torchx.cli.colors import GREEN, ENDC\r\nFile: <\"/mnt/xarfuse/uid-27156/4adc7caa-seed-nspid4026533510_cgpid2017229-ns-4026533507/torchx/cli/colors.py\">, line 11, in <module>\r\nif sys.stdout.isatty():\r\n```\r\n\r\n## Expected behavior\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\nDoesn't crash\r\n\r\n## Environment\r\n\r\n - torchx version (e.g. 0.1.0rc1): main\r\n - Python version:\r\n - OS (e.g., Linux):\r\n - How you installed torchx (`conda`, `pip`, source, `docker`):\r\n - Docker image and tag (if using docker):\r\n - Git commit (if installed from source):\r\n - Execution environment (on-prem, AWS, GCP, Azure etc):\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/418",
    "state": "closed",
    "labels": [
      "bug",
      "cli"
    ],
    "created_at": "2022-03-11T19:24:44Z",
    "updated_at": "2022-03-11T23:32:30Z",
    "comments": 0,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/extension-cpp",
    "number": 76,
    "title": "How to debug in cuda-pytorch env?",
    "body": "Hi! I am wondering how to debug in such environment? I have tried to insert a \"printf(\"hello wolrd\")\" sentence in .cu file, but it compiles failure! If I delete it, everything works fine..... So how you debug in such environment? Thank you!!!!",
    "url": "https://github.com/pytorch/extension-cpp/issues/76",
    "state": "open",
    "labels": [],
    "created_at": "2022-03-10T07:45:31Z",
    "updated_at": "2022-03-10T07:45:31Z",
    "user": "Arsmart123"
  },
  {
    "repo": "huggingface/datasets",
    "number": 3881,
    "title": "How to use Image folder",
    "body": "Ran this code\r\n```\r\n load_dataset(\"imagefolder\", data_dir=\"./my-dataset\")\r\n```\r\n\r\n`https://raw.githubusercontent.com/huggingface/datasets/master/datasets/imagefolder/imagefolder.py` missing\r\n```\r\n---------------------------------------------------------------------------\r\nFileNotFoundError                         Traceback (most recent call last)\r\n/tmp/ipykernel_33/1648737256.py in <module>\r\n----> 1 load_dataset(\"imagefolder\", data_dir=\"./my-dataset\")\r\n\r\n/opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, script_version, **config_kwargs)\r\n   1684         revision=revision,\r\n   1685         use_auth_token=use_auth_token,\r\n-> 1686         **config_kwargs,\r\n   1687     )\r\n   1688 \r\n\r\n/opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, script_version, **config_kwargs)\r\n   1511         download_config.use_auth_token = use_auth_token\r\n   1512     dataset_module = dataset_module_factory(\r\n-> 1513         path, revision=revision, download_config=download_config, download_mode=download_mode, data_files=data_files\r\n   1514     )\r\n   1515 \r\n\r\n/opt/conda/lib/python3.7/site-packages/datasets/load.py in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_files, **download_kwargs)\r\n   1200                         f\"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory. \"\r\n   1201                         f\"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}\"\r\n-> 1202                     ) from None\r\n   1203                 raise e1 from None\r\n   1204     else:\r\n\r\nFileNotFoundError: Couldn't find a dataset script at /kaggle/working/imagefolder/imagefolder.py or any data file in the same directory. Couldn't find 'imagefolder' on the Hugging Face Hub either: FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/master/datasets/imagefolder/imagefolder.py\r\n```",
    "url": "https://github.com/huggingface/datasets/issues/3881",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-03-09T21:18:52Z",
    "updated_at": "2022-03-11T08:45:52Z",
    "user": "rozeappletree"
  },
  {
    "repo": "pytorch/examples",
    "number": 969,
    "title": "DDP: why does every process allocate memory of GPU 0 and how to avoid it?",
    "body": "Run [this](https://github.com/pytorch/examples/tree/main/imagenet) example with 2 GPUs.\r\nprocess 2 will allocate some memory on GPU 0.\r\n```\r\npython main.py --multiprocessing-distributed --world-size 1 --rank 0\r\n```\r\n\r\n![image](https://user-images.githubusercontent.com/34199488/157247908-a2f6be5a-a2f2-46f0-b3da-4cdee956470d.png)\r\n\r\n\r\nI have carefully checked the sample code and there seems to be no obvious error that would cause process 2 to transfer data to GPU 0.\r\n\r\nSo: \r\n1. Why does process 2 allocate memory of GPU 0?\r\n2. Is this part of the data involved in the calculation? I think if this part of the data is involved in the calculation when the number of processes becomes large, it will cause GPU 0 to be seriously overloaded?\r\n3. Is there any way to avoid it?\r\n\r\nThanks in advance to partners in the PyTorch community for their hard work.",
    "url": "https://github.com/pytorch/examples/issues/969",
    "state": "open",
    "labels": [
      "distributed"
    ],
    "created_at": "2022-03-08T13:41:16Z",
    "updated_at": "2024-09-22T11:41:26Z",
    "user": "siaimes"
  },
  {
    "repo": "huggingface/datasets",
    "number": 3854,
    "title": "load only England English dataset from common voice english dataset",
    "body": "training_data = load_dataset(\"common_voice\", \"en\",split='train[:250]+validation[:250]')\r\ntesting_data = load_dataset(\"common_voice\", \"en\", split=\"test[:200]\")\r\n\r\nI'm trying to load only 8% of the English common voice data with accent == \"England English.\" Can somebody assist me with this?\r\n\r\n**Typical Voice Accent Proportions:**\r\n\r\n- 24% United States English \r\n- 8% England English \r\n- 5% India and South Asia (India, Pakistan, Sri Lanka) \r\n- 3% Australian English \r\n- 3% Canadian English \r\n- 2% Scottish English \r\n- 1% Irish English \r\n- 1% Southern African (South Africa, Zimbabwe, Namibia) \r\n- 1% New Zealand English\r\n\r\nCan we replicate this for Age as well?\r\n\r\n**Age proportions of the common voice:-**\r\n\r\n- 24% 19 - 29 \r\n- 14% 30 - 39 \r\n- 10% 40 - 49 \r\n- 6% < 19 \r\n- 4% 50 - 59 \r\n- 4% 60 - 69 \r\n- 1% 70 \u2013 79 ",
    "url": "https://github.com/huggingface/datasets/issues/3854",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-03-08T09:40:52Z",
    "updated_at": "2024-03-23T12:40:58Z",
    "user": "amanjaiswal777"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 912,
    "title": "\u2728[Feature] New Release for pip",
    "body": "Would it be possible to get a new release for use with pip?\r\n\r\nThere have been quite a few features and bug-fixes added since November, and it would be great to have an up to date version available.\r\n\r\nI know that docker containers are often recommended, but that's often not a viable option.\r\n\r\nThank you for all of the great work!!\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/912",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-03-06T05:27:27Z",
    "updated_at": "2022-03-06T21:25:13Z",
    "user": "dignakov"
  },
  {
    "repo": "pytorch/torchx",
    "number": 405,
    "title": "SLURM quality of life improvements",
    "body": "## Description\r\nMaking a couple of requests to improve QoL on SLURM \r\n\r\n## Detailed Proposal\r\nIt would be helpful to have -\r\n- [x] The ability to specify the output path. Currently, you need to cd to the right path for this, which generally needs a helper function to set up the directory, cd to it, and then launch via torchx. torchx can ideally handle it for us. #416\r\n- [x] Code isolation and reproducibility. While doing research, we make a change, launch an experiment, and repeat. To make sure each experiment uses the same consistent code, we copy the code to the experiment directory (which also helps with reproducibility). #416\r\n- [ ] Verification of the passed launch script. If I launch from a wrong directory for instance, I would still queue up the job, wait for a few minutes / hours only to crash because of a wrong path (i.e. the launch script does not exist).\r\n- [x] Being able to specify a job name - SLURM shows job details when running the `squeue` command including the job name. If our jobs are all run via torchx, every job will be named `train_app-{i}` which makes it hard to identify which experiment / project the job is from.\r\n- [x] The `time` argument doesn't say what the unit is - maybe we just follow the SLURM API, but it would be nice if we clarified that.\r\n- [ ] torchx submits jobs in [heterogeneous mode](https://slurm.schedmd.com/heterogeneous_jobs.html). This is something FAIR users don't have familiarity with - I'm guessing in terms of execution and command support there should be feature and scheduling speed parity (not sure about the latter)? The `squeue` logs show every node as a separate line - so a 32 node job would take 32 lines instead of 1. This just makes it harder to monitor jobs - not a technical issue, just a QoL one :)\r\n- [x] The job logs are created in `slurm-{job-id}-train_app-{node-id}.out` files (per node) and a single `slurm-{job-id}.out`. Normally, our jobs instead have logs of the form `{job-id}-{node-id}.out` and `{job-id}-{node-id}.err` (per node) - the separation between `stderr` and `stdout` helps find which machine actually crashed more easily. And I'm not sure what `slurm-{job-id}.out` corresponds to - maybe it's a consequence of the heterogeneous jobs? With torchelastic, it becomes harder to debug which node crashed since every node logs a crash (so grepping for `Traceback` will return each log file instead of just the node which originally crashed) - maybe there is a way to figure this out and I just don't know what to look for?\r\n- [ ] The `global_rank` is not equal to `local_rank + node_id * gpus_per_node`, i.e. the global rank 0 can be on node 3.\r\n- [ ] automatically set nomem on pcluster",
    "url": "https://github.com/meta-pytorch/torchx/issues/405",
    "state": "open",
    "labels": [
      "slurm"
    ],
    "created_at": "2022-03-04T17:42:08Z",
    "updated_at": "2022-04-14T21:42:21Z",
    "comments": 5,
    "user": "mannatsingh"
  },
  {
    "repo": "pytorch/serve",
    "number": 1487,
    "title": "how to get model.py file ?",
    "body": "`https://github.com/pytorch/serve/blob/master/docker/README.md#create-torch-model-archiver-from-container` in \r\nthe 4 step ,how to get model.py file\uff1f\r\n\r\nI followed the doc step by step \uff0cbut in step 4 \r\n`torch-model-archiver --model-name densenet161 --version 1.0 --model-file /home/model-server/examples/image_classifier/densenet_161/model.py --serialized-file /home/model-server/examples/image_classifier/densenet161-8d451a50.pth --export-path /home/model-server/model-store --extra-files /home/model-server/examples/image_classifier/index_to_name.json --handler image_classifier`\r\n\r\nerror because no model.py file.\r\nwhere to get this model.py file",
    "url": "https://github.com/pytorch/serve/issues/1487",
    "state": "closed",
    "labels": [],
    "created_at": "2022-03-04T01:41:59Z",
    "updated_at": "2022-03-04T20:03:41Z",
    "user": "jaffe-fly"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 73699,
    "title": "How to get tolerance override in OpInfo-based test?",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nThe documentation appears to be wrong, it suggests to use self.rtol and self.precision:\r\nhttps://github.com/pytorch/pytorch/blob/4168c87ed3ba044c9941447579487a2f37eb7973/torch/testing/_internal/common_device_type.py#L1000\r\n\r\nself.tol doesn't seem to exist in my tests.\r\nI did find a self.rel_tol, is that the right flag?\r\n\r\n### Versions\r\n\r\nmain\n\ncc @brianjo @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/73699",
    "state": "open",
    "labels": [
      "module: docs",
      "triaged",
      "module: testing"
    ],
    "created_at": "2022-03-02T22:48:11Z",
    "updated_at": "2022-03-07T14:42:39Z",
    "user": "zou3519"
  },
  {
    "repo": "pytorch/vision",
    "number": 5510,
    "title": "[RFC] How do we want to deal with images that include alpha channels?",
    "body": "This discussion started in https://github.com/pytorch/vision/pull/5500#discussion_r816503203 and @vfdev-5 and I continued offline.\r\n\r\nPIL as well as our image reading functions support RGBA images\r\n\r\nhttps://github.com/pytorch/vision/blob/95d418970e6dbf2e4d928a204c4e620da7bccdc0/torchvision/io/image.py#L16-L31\r\n\r\nbut our color transformations currently only support RGB images ignoring an extra alpha channel. This leads to wrong results. One thing that we agreed upon is that these transforms should fail if anything but 3 channels is detected.\r\n\r\n\r\nStill, some datasets include non-RGB images so we need to deal with this for a smooth UX. Previously we implicitly converted every image to RGB before returning it from a dataset\r\n\r\nhttps://github.com/pytorch/vision/blob/f9fbc104c02f277f9485d9f8727f3d99a1cf5f0b/torchvision/datasets/folder.py#L245-L249\r\n\r\nSince we no longer decode images in the datasets, we need to provide a solution for the users here. I currently see two possible options:\r\n\r\n1. We could deal with this on a per-image basis within the dataset. For example, the train split of ImageNet contains a single RGBA image. We could simply perform an appropriate conversion for irregular image modes in the dataset so this issue is abstracted away from the user. `tensorflow-datasets` uses this approach: https://github.com/tensorflow/datasets/blob/a1caff379ed3164849fdefd147473f72a22d3fa7/tensorflow_datasets/image_classification/imagenet.py#L105-L131\r\n2. The most common non-RGB image in datasets are grayscale images. For example, the train split of ImageNet contains 19970 grayscale images. Thus, the users will need a `transforms.ConvertImageColorSpace(\"rgb\")` in most cases anyway. If that would support RGBA to RGB conversions the problem would also be solved. The conversion happens with this formula:\r\n\r\n    ```\r\n    pixel_new = (1 - alpha) * background + alpha * pixel_old\r\n    ```\r\n    \r\n    where `pixel_{old|new}` is a single value from a color channel. Since we don't know `background` we need to either make assumptions or require the user to provide a value for it. I'd wager a guess that in 99% of the cases the background is white. i.e. `background == 1`, but we can't be sure about that.\r\n    \r\n    Another issue with this is that the user has no option to set the background on a per-image basis in the transforms pipeline if that is needed.\r\n\r\n    In special case for `alpha == 1` everywhere, the equation above simplifies to\r\n\r\n    ```\r\n    pixel_new = pixel_old\r\n    ```\r\n\r\n    which is equivalent to stripping the alpha channel. We could check for that and only perform the RGBA to RGB transform if the condition holds or the user supplies a background color.\r\n\r\n\r\n\n\ncc @pmeier @vfdev-5 @datumbox @bjuncek",
    "url": "https://github.com/pytorch/vision/issues/5510",
    "state": "closed",
    "labels": [
      "module: datasets",
      "module: transforms",
      "prototype"
    ],
    "created_at": "2022-03-02T09:43:42Z",
    "updated_at": "2023-03-28T13:01:09Z",
    "user": "pmeier"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 73600,
    "title": "Add a section in DDP tutorial to explain why DDP sometimes is slower than local training and how to improve it",
    "body": "### \ud83d\udcda The doc issue\n\nAdd a section in DDP tutorial to explain why DDP sometimes is slower than local training and how to improve it\n\n### Suggest a potential alternative/fix\n\n_No response_\n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang",
    "url": "https://github.com/pytorch/pytorch/issues/73600",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "triaged",
      "module: ddp"
    ],
    "created_at": "2022-03-01T20:34:58Z",
    "updated_at": "2022-03-08T22:03:17Z",
    "user": "zhaojuanmao"
  },
  {
    "repo": "pytorch/tensorpipe",
    "number": 431,
    "title": "How to enable CudaGdrChannel  registration in tensorpipeAgent when using  pytorch's rpc",
    "body": "Can we just enable it by define some environment variables or we need to recompile pytorch? Thx!",
    "url": "https://github.com/pytorch/tensorpipe/issues/431",
    "state": "closed",
    "labels": [],
    "created_at": "2022-03-01T08:14:17Z",
    "updated_at": "2022-03-01T12:09:53Z",
    "user": "eedalong"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1839,
    "title": "Missing 'img/teapot.jpg', 'img/trilobite.jpg' for `MODEL UNDERSTANDING WITH CAPTUM` tutorial.",
    "body": "Running this tutorial: https://pytorch.org/tutorials/beginner/introyt/captumyt.html\r\nCould not found 'img/teapot.jpg', 'img/trilobite.jpg' under _static folder.\r\n\r\nCould anyone help to provide?\r\nThanks!",
    "url": "https://github.com/pytorch/tutorials/issues/1839",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-02-26T10:32:52Z",
    "updated_at": "2022-10-17T16:24:06Z",
    "user": "MonkandMonkey"
  },
  {
    "repo": "pytorch/data",
    "number": 256,
    "title": "Support `keep_key` in `Grouper`?",
    "body": "`IterKeyZipper` has an option to keep the key that was zipped on:\r\n\r\nhttps://github.com/pytorch/data/blob/2cf1f208e76301f3e013b7569df0d75275f1aaee/torchdata/datapipes/iter/util/combining.py#L53\r\n\r\nIs this something we want to support going forward? If yes, it would be nice to have this also on `Grouper` and possibly other similar datapipes. That would come in handy in situations if the key is used multiple times for example if we have a `IterKeyZipper` after an `Grouper`.\r\n\r\n### Additional Context for New Contributors\r\n\r\nSee comment below",
    "url": "https://github.com/meta-pytorch/data/issues/256",
    "state": "closed",
    "labels": [
      "good first issue"
    ],
    "created_at": "2022-02-25T08:39:53Z",
    "updated_at": "2023-01-27T19:03:08Z",
    "comments": 15,
    "user": "pmeier"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 894,
    "title": "\u2753 [Question] Can you convert model that operates on custom classes?",
    "body": "## \u2753 Question\r\n\r\nI have a torch module that creates objects of custom classes that have tensors as fields. It can be torch.jit.scripted but torch.jit.trace can be problematic. When I torch.jit.script module and then torch_tensorrt.compile it I get the following error: `Unable to get schema for Node %317 : __torch__.src.MyClass = prim::CreateObject() (conversion.VerifyCoverterSupportForBlock)`\r\n\r\n## What you have already tried\r\n\r\ntorch.jit.trace avoids the problem but introduces problems with loops in module.\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.10.2\r\n - CPU Architecture: intel\r\n - OS (e.g., Linux): linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives: from archives\r\n - Python version: 3.8\r\n - CUDA version: 11.3\r\n - GPU models and configuration:  rtx 3090\r\n - Any other relevant information:\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/894",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-02-24T09:51:13Z",
    "updated_at": "2022-05-18T21:21:05Z",
    "user": "MarekPokropinski"
  },
  {
    "repo": "pytorch/xla",
    "number": 3391,
    "title": "I want to Multi-Node Multi GPU training, how should I configure the environment",
    "body": "## \u2753 Questions and Help\r\nRunning XLA MultiGPU MultiNode\uff0cI know that I need to set XRT_SHARD_WORLD_SIZE and XRT_WORKERS, but I don't know how to configure the variable value of XRT_WORKERS.\r\nAre there some examples that exist for me to refer to?",
    "url": "https://github.com/pytorch/xla/issues/3391",
    "state": "closed",
    "labels": [
      "stale",
      "xla:gpu"
    ],
    "created_at": "2022-02-23T06:52:01Z",
    "updated_at": "2022-04-28T00:10:36Z",
    "user": "ZhongYFeng"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 881,
    "title": "\u2753 [Question] How do you convert part of the model to TRT? ",
    "body": "## \u2753 Question\r\n\r\nIs it possible to convert only part of the model to TRT. I have model that cannot be directly converted  to trt because it uses custom classes. I wanted to convert only modules that can be converted but as I tried it torch cannot save it.\r\n\r\n## What you have already tried\r\n\r\nI tried the following:\r\n\r\n```\r\nimport torch.nn\r\nimport torch_tensorrt\r\n\r\n\r\nclass MySubmodule(torch.nn.Module):\r\n    def __init__(self):\r\n        super(MySubmodule, self).__init__()\r\n        self.layer = torch.nn.Linear(10, 10)\r\n\r\n    def forward(self, x):\r\n        return self.layer(x)\r\n\r\n\r\nclass MyMod(torch.nn.Module):\r\n    def __init__(self):\r\n        super(MyMod, self).__init__()\r\n        self.submod = MySubmodule()\r\n        self.submod = torch_tensorrt.compile(self.submod, inputs=[\r\n            torch_tensorrt.Input(shape=(1, 10))\r\n        ])\r\n\r\n    def forward(self, x):\r\n        return self.submod(x)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    model = MyMod()\r\n    scripted = torch.jit.script(model)\r\n    scripted(torch.zeros(1, 10).cuda())\r\n    scripted.save(\"test.pt\")\r\n\r\n```\r\nBut it raises exception: `RuntimeError: method.qualname() == QualifiedName(selfClass->name()->qualifiedName(), methodName)INTERNAL ASSERT FAILED at \"../torch/csrc/jit/serialization/python_print.cpp\":1105, please report a bug to PyTorch. \r\n`\r\n## Environment\r\n - PyTorch Version (e.g., 1.0): 1.10.2\r\n - CPU Architecture: intel\r\n - OS (e.g., Linux): linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives: from archives\r\n - Python version: 3.8\r\n - CUDA version: 11.3\r\n - GPU models and configuration: rtx 3090\r\n - Any other relevant information:\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/881",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-02-18T09:00:43Z",
    "updated_at": "2022-02-19T23:57:17Z",
    "user": "MarekPokropinski"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 880,
    "title": "\u2753 [Question] What is the difference between docker built on PyTorch NGC Container and PyTorch NGC Container?",
    "body": "## \u2753 Question\r\n\r\nSince PyTorch NGC 21.11+ already includes Torch-TensorRT, is it possible to use Torch-TensorRT directly in PyTorch NGC Container?\r\n\r\n## What you have already tried\r\n\r\nI read the README and tried to build docker according to it, but it keeps failing.\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):Do I need to install PyTorch locally?\r\n - CPU Architecture:AMD64/x64\r\n - OS (e.g., Linux):Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source)\uff1anot installed\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/880",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-02-18T08:40:22Z",
    "updated_at": "2022-02-19T23:56:30Z",
    "user": "Guangyun-Xu"
  },
  {
    "repo": "pytorch/serve",
    "number": 1440,
    "title": "[Discussion]: How to extend the base handler",
    "body": "Recently we've realized that an easy place for new contributors to improve torchserve is to either\r\n1. Add a reference example in `examples`\r\n2. Make an improvement to the base handler\r\n\r\n1 is easiest but makes means that users that want to benefit from that example, need to go through source code and adapt it to their examples\r\n\r\n2 is a bit less easy but still OK because the benefits are to anyone using torchserve. Unfortunately it's slowly making the base handler unmaintainable as it now includes code for model optimization, profiling, model interpretability https://github.com/pytorch/serve/blob/master/ts/torch_handler/base_handler.py\r\n\r\nThis problem will continue getting worse as we need to runtime exports, profiling techniques and other useful workflows for model serving all of which will be gated by slow error handling code that will encourage users to pip install missing dependencies.\r\n\r\n> So how we can continue making improvements to the base handler while keeping it simple and modular?\r\n\r\n## Option 1: Inheritance\r\n\r\nInstead of adding features to the base handler\r\n\r\nwe can instead create a new handler like\r\n\r\n```\r\nclass ExtendedHandler(BaseHandler):\r\n```\r\n\r\nBenefit is code remains modular but con is that to use profiling and a runtime users would need to resort to multiple inheritance which can be hard to debug\r\n\r\n## Option 2: Generic interfaces\r\nInstead of having a line that looks like this in our code \r\n\r\n`self.model = ipex.optimize(self.model)`\r\n\r\n\r\nWe can add a generic `optimize` in the base handler which specializes for a particular implementation depending on what's in the `config.properties`\r\n\r\nBenefit is this very modular but requires more work to create a future proof interface and needs users to change Java code to support their usecase \r\n\r\n## Option 3: Dynamic runtime loads\r\nInstead of having code in the base handler we can load it at runtime\r\n\r\n```\r\nclass BaseHandler:\r\n...\r\n\r\ndef optimize(self):\r\n    print(\"self.v =\", self.v)\r\n\r\nsetattr(BaseHandler, 'optimize', optimize)\r\n\r\nBaseHandler().optimize\r\n```\r\n\r\nBenefit is this is very modular, doesn't require any changes to base handler code but given that torchserve is used via a CLI tool and not just running a python file it's tricky to figure out where this change needs to be\r\n\r\n## Option 4: Utility functions\r\nAnother simple approach is to move helpful utility functions to a different file called `handler_utils.py`\r\n\r\nA good candidate is moving a function like https://github.com/pytorch/serve/blob/master/ts/torch_handler/base_handler.py#L229\r\n\r\n` def _infer_with_profiler(self, data):`\r\n\r\nThat said this approach isn't perfect since even if modularized, profiling would need a footprint like https://github.com/pytorch/serve/blob/master/ts/torch_handler/base_handler.py#L213\r\n\r\n`if is_profiler_enabled:`\r\n\r\n## Option 5: Python decorators\r\n\r\nNot a silver bullet but python decorator like could make code more maintainable\r\n```\r\n@optimize\r\n@profile\r\n@metrics\r\n```\r\n\r\nFor example `@metrics` would be a decorator to keep track of a function start and end time. This works well for `@metrics` and maybe `@profile` but for `@optimize` would require passing the right argument as in the model which is not a parameter in `inference` but a property of the handler class. Maybe there's a larger discussion here in that handlers need to hold less state \r\n\r\nRelated we could use Python `contextmanager` to allocate a runtime so users can say something like\r\n`with ipex|tensorrt|etc..` and not have to worry about changes to the base handler.\r\n\r\n## Option 6: ?\r\n\r\nThere may be other options but I think this is an important problem to figure out to make it simpler for new contributors to add their changes\r\n\r\ncc: @HamidShojanazeri @chauhang @lxning @maaquib @nskool @min-jean-cho",
    "url": "https://github.com/pytorch/serve/issues/1440",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2022-02-17T16:15:09Z",
    "updated_at": "2022-05-04T03:57:34Z",
    "user": "msaroufim"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 876,
    "title": "\u2753 [Question] How to Enable the Torch-TensorRT Partition Feature ? ",
    "body": "## \u2753 Question\r\nHello\uff0c\r\n\r\nI want to use TensorRT to run VectorNet  from https://github.com/xk-huang/yet-another-vectornet \r\n\r\nHowever\uff0c when I try to convert torchscript using torchtrtc\uff0c it terminates by showing an unsupported op\uff1atorch_scatter::scatter_max \r\n\r\n```\r\nterminate called after throwing an instance of 'torch::jit::ErrorReport'\r\n  what():\r\nUnknown builtin op: torch_scatter::scatter_max.\r\nCould not find any similar ops to torch_scatter::scatter_max. This op may not exist or may not be currently supported in TorchScript.\r\n:\r\n/Data0/Users/tom.hx/.local/lib/python3.6/site-packages/torch_scatter/scatter.py(72): scatter_max\r\n/Data0/Users/tom.hx/.local/lib/python3.6/site-packages/torch_scatter/scatter.py(160): scatter\r\n/Data0/Users/tom.hx/.local/lib/python3.6/site-packages/torch_geometric/nn/conv/message_passing.py(426): aggregate\r\n/tmp/tom.hx_pyg/tmpjesxc50s.py(168): propagate\r\n/tmp/tom.hx_pyg/tmpjesxc50s.py(188): forward\r\n/Data0/Users/tom.hx/.local/lib/python3.6/site-packages/torch/nn/modules/module.py(1090): _slow_forward\r\n/Data0/Users/tom.hx/.local/lib/python3.6/site-packages/torch/nn/modules/module.py(1102): _call_impl\r\n/Data0/Users/tom.hx/work/ai-compiler/tvm/vectornet_test/modeling/subgraph.py(50): forward\r\n/Data0/Users/tom.hx/.local/lib/python3.6/site-packages/torch/nn/modules/module.py(1090): _slow_forward\r\n/Data0/Users/tom.hx/.local/lib/python3.6/site-packages/torch/nn/modules/module.py(1102): _call_impl\r\n/Data0/Users/tom.hx/work/ai-compiler/tvm/vectornet_test/modeling/vectornet.py(52): forward\r\n/Data0/Users/tom.hx/.local/lib/python3.6/site-packages/torch/nn/modules/module.py(1090): _slow_forward\r\n/Data0/Users/tom.hx/.local/lib/python3.6/site-packages/torch/nn/modules/module.py(1102): _call_impl\r\n/Data0/Users/tom.hx/.local/lib/python3.6/site-packages/torch/jit/_trace.py(965): trace_module\r\n/Data0/Users/tom.hx/.local/lib/python3.6/site-packages/torch/jit/_trace.py(750): trace\r\nprofile.py(156): <module>\r\nSerialized   File \"code/__torch__/GraphLayerPropJittable_4074db.py\", line 15\r\n    src = torch.index_select(_0, -2, index)\r\n    index0 = torch.select(edge_index, 0, 1)\r\n    aggr_out, _1 = ops.torch_scatter.scatter_max(src, index0, -2, None, 225)\r\n                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n    return torch.cat([_0, aggr_out], 1)\r\n\r\nAborted\r\n\r\n```\r\n\r\nI have been noticed that Torch-TensorRT can fallback to native PyTorch when TensorRT does not support the model subgraphs.\r\n\r\nThe question is, why does not this function work, and how to enable it?\r\n\r\n\r\n\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/876",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-02-16T08:01:25Z",
    "updated_at": "2022-02-19T23:57:32Z",
    "user": "huangxiao2008"
  },
  {
    "repo": "pytorch/text",
    "number": 1615,
    "title": "How to build pytorch text with system third_party libraries?",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\n\r\nThree packages are under [pytorch text third_party](https://github.com/pytorch/text/tree/main/third_party). However, I personally prefer using system installed packages, \r\n- libre2-dev\r\n- libdouble-conversion-dev\r\n- libsentencepiece-dev\r\n\r\nIn addition, isn't there a **CMakeLists.txt** for  **pytorch text**??\r\n\r\nCheers\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/text/issues/1615",
    "state": "open",
    "labels": [],
    "created_at": "2022-02-16T03:03:31Z",
    "updated_at": "2023-04-18T06:07:10Z",
    "user": "jiapei100"
  },
  {
    "repo": "pytorch/torchx",
    "number": 388,
    "title": "RFC: Improve OCI Image Python Tooling",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\nQuite a few of the cloud services / cluster tools for running ML jobs use OCI/Docker containers so I've been looking into how to make dealing with these easier.\r\n\r\nContainer based services:\r\n* Kubernetes / Volcano scheduler\r\n* AWS EKS / Batch\r\n* Google AI Platform training\r\n* Recent versions of slurm https://slurm.schedmd.com/containers.html\r\n\r\nTorchX currently supports patches on top of existing images to make it fast to iterate and then launch a training job. These patches are just overlaying files from the local directory on top of a base image. Our current patching implementation relies on having a local docker daemon to build a patch layer and push it: https://github.com/pytorch/torchx/blob/main/torchx/schedulers/docker_scheduler.py#L437-L493\r\n\r\nIdeally we could build a patch layer and push it in pure Python without requiring any local docker instances since that's an extra burden on ML researchers/users. Building a patch should be fairly straightforward since it's just appending to a layer and pushing will require some ability to talk to the registry to download/upload containers.\r\n\r\nIt seems like OCI containers are a logical choice to use for packaging ML training jobs/apps but the current Python tooling is fairly lacking as far as I can see. Making it easier to work with this will likely help with the cloud story.\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\nCreate a library for Python to manipulate OCI images with the following subset of features:\r\n\r\n* download/upload images to OCI repos\r\n* append layers to OCI images\r\n\r\nNon-goals:\r\n\r\n* Execute containers\r\n* Dockerfiles\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n\r\nThere is an existing oci-python library but it's fairly early. May be able to build upon it to enable this.\r\n\r\nI opened an issue there as well: https://github.com/vsoch/oci-python/issues/15\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/388",
    "state": "open",
    "labels": [
      "enhancement",
      "RFC",
      "kubernetes",
      "slurm"
    ],
    "created_at": "2022-02-11T04:47:27Z",
    "updated_at": "2023-01-23T14:54:10Z",
    "comments": 1,
    "user": "d4l3k"
  },
  {
    "repo": "huggingface/nn_pruning",
    "number": 33,
    "title": "What is the difference between \"finetune\" and \"final-finetune\" in `/example`.",
    "body": "Hello,\r\n\r\nThanks for the amazing repo!\r\n\r\nI'm wondering what is the difference between \"finetune\" and \"final-finetune\" in `/example`.\r\nDo we train the model and the mask score in the finetune stage, and only train the optimized model in the final-finetune stage?\r\n\r\nIs there a way to directly save the optimized model and load the optimized model instead of loading the patched model and optimizing to get the pruned model?\r\n\r\nBig thanks again for the great work!",
    "url": "https://github.com/huggingface/nn_pruning/issues/33",
    "state": "open",
    "labels": [],
    "created_at": "2022-02-11T03:25:13Z",
    "updated_at": "2023-01-08T14:27:37Z",
    "user": "eric8607242"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 862,
    "title": "\u2753 [Question] Running a same torchscript using the same input producing different results.",
    "body": "## \u2753 Question\r\n\r\nI'm trying to run a pretrained resnet50 model from torch.torchvision.models. enabled_precisions is set to torch.half.\r\nEach time I load the same resnet50 torchscript, using the same input\uff08which is set to zero using np.zeros\uff09. But after running serveral times I've found the output is not stable.\r\n\r\n## What you have already tried\r\n\r\nI've tried two ways:\r\n\r\n1. Load the same resetnet50 torchscript and compile it, the do the inference. The output is not stable.\r\n2. Save the compiled script, load it each time and to the inference. The output is stable.\r\n\r\nI wonder whether there's some random behaviors in `torch_tensorrt.compile()` when enabled_precisions is set to torch.half.\r\n\r\n## Environment\r\n\r\n - PyTorch Version : 1.10\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source): installed via pip3 install torch-tensorrt -f https://github.com/NVIDIA/Torch-TensorRT/releases\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.6.9\r\n - CUDA version: 11.4\r\n - GPU models and configuration: pretrained resnet50 model from torch.torchvision.models\r\n - Any other relevant information: Torch-TensorRT version: v1.0\r\n\r\n## Additional context\r\n\r\nThe python code producing unstable result is as below:\r\n\r\n```python\r\nfrom torchvision import models\r\nimport numpy as np\r\nimport torch\r\nimport torch_tensorrt\r\nimport time\r\n\r\ninput = np.zeros((1, 3, 224, 224)).astype(np.float32)\r\ninput = torch.from_numpy(input).cuda()\r\n\r\ntorch_script_module = torch.jit.load('torch_script_module.ts')\r\n\r\ntrt_ts_module = torch_tensorrt.compile(torch_script_module,\r\n    inputs=[\r\n        torch_tensorrt.Input(  # Specify input object with shape and dtype\r\n            min_shape=[1, 3, 224, 224],\r\n            opt_shape=[1, 3, 224, 224],\r\n            max_shape=[1, 3, 224, 224],\r\n            # For static size shape=[1, 3, 224, 224]\r\n            dtype=torch.float32)  # Datatype of input tensor. Allowed options torch.(float|half|int8|int32|bool)\r\n    ],\r\n    enabled_precisions={torch.half},)  # Run with FP16)\r\n\r\nresult=trt_ts_module(input)  # run inference\r\n\r\nt1 = time.time()\r\nfor i in range(1000):\r\n    result=trt_ts_module(input)  # run inference\r\nt2 = time.time()\r\nprint('result', result[0][0])\r\nprint(\"Cost: \", round(t2-t1, 4))\r\n```\r\nTwo iterations produce different outputs:\r\nIteration 1:\r\n```\r\nWARNING: [Torch-TensorRT] - Dilation not used in Max pooling converter\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT was linked against cuBLAS/cuBLAS LT 11.5.1 but loaded cuBLAS/cuBLAS LT 11.4.2\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT was linked against cuDNN 8.2.1 but loaded cuDNN 8.2.0\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - Detected invalid timing cache, setup a local cache instead\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT was linked against cuBLAS/cuBLAS LT 11.5.1 but loaded cuBLAS/cuBLAS LT 11.4.2\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT was linked against cuDNN 8.2.1 but loaded cuDNN 8.2.0\r\nWARNING: [Torch-TensorRT] - TensorRT was linked against cuBLAS/cuBLAS LT 11.5.1 but loaded cuBLAS/cuBLAS LT 11.4.2\r\nWARNING: [Torch-TensorRT] - TensorRT was linked against cuDNN 8.2.1 but loaded cuDNN 8.2.0\r\nWARNING: [Torch-TensorRT] - TensorRT was linked against cuBLAS/cuBLAS LT 11.5.1 but loaded cuBLAS/cuBLAS LT 11.4.2\r\nWARNING: [Torch-TensorRT] - TensorRT was linked against cuDNN 8.2.1 but loaded cuDNN 8.2.0\r\nresult tensor(-0.4390, device='cuda:0')\r\nCost:  1.3429\r\n```\r\nIteration 2:\r\n```\r\nWARNING: [Torch-TensorRT] - Dilation not used in Max pooling converter\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT was linked against cuBLAS/cuBLAS LT 11.5.1 but loaded cuBLAS/cuBLAS LT 11.4.2\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT was linked against cuDNN 8.2.1 but loaded cuDNN 8.2.0\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - Detected invalid timing cache, setup a local cache instead\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT was linked against cuBLAS/cuBLAS LT 11.5.1 but loaded cuBLAS/cuBLAS LT 11.4.2\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT was linked against cuDNN 8.2.1 but loaded cuDNN 8.2.0\r\nWARNING: [Torch-TensorRT] - TensorRT was linked against cuBLAS/cuBLAS LT 11.5.1 but loaded cuBLAS/cuBLAS LT 11.4.2\r\nWARNING: [Torch-TensorRT] - TensorRT was linked against cuDNN 8.2.1 but loaded cuDNN 8.2.0\r\nWARNING: [Torch-TensorRT] - TensorRT was linked against cuBLAS/cuBLAS LT 11.5.1 but loaded cuBLAS/cuBLAS LT 11.4.2\r\nWARNING: [Torch-TensorRT] - TensorRT was linked against cuDNN 8.2.1 but loaded cuDNN 8.2.0\r\nresult tensor(-0.4463, device='cuda:0')\r\nCost:  1.3206\r\n```\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/862",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2022-02-10T12:18:34Z",
    "updated_at": "2022-09-10T00:02:32Z",
    "user": "SeTriones"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 858,
    "title": "\u2753 [Question] ImportError: libcudnn.so.8: cannot open shared object file: No such file or directory",
    "body": "## \u2753 Question\r\n\r\nAs I can't install `torch-tensorrt` for some reason in this method:`pip3 install torch-tensorrt -f https://github.com/NVIDIA/Torch-TensorRT/releases\r\n`\r\nI download `torch-tensorrt` from here `https://github.com/NVIDIA/Torch-TensorRT/releases/tag/v1.0.0`\r\nusing `pip install torch_tensorrt-1.0.0-cp36-cp36m-linux_x86_64.whl`\r\n\r\nhowever when I `import torch_tensorrt`\r\nhere comes the error `ImportError: libcudnn.so.8: cannot open shared object file: No such file or directory`\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):1.10.2+cu113\r\n - CPU Architecture:\r\n - OS (e.g., Linux):linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):pip\r\n - Build command you used (if compiling from source): pip install \r\n - Are you using local sources or building from archives:\r\n - Python version:3.6.2\r\n - CUDA version:11.3\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\ntensorrt==8.2.1.8\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/858",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2022-02-09T03:27:44Z",
    "updated_at": "2022-06-19T12:55:25Z",
    "user": "Biaocsu"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 856,
    "title": "\u2753 [Question] Is it possibile to use a model optimized through TorchTensorRT in LibTorch under Windows?",
    "body": "## \u2753 Question\r\n\r\nI would need to optimize an already trained segmentation model through TorchTensorRT, the idea would be to optimize the model by running the [newest PyTorch NGC docker image](https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel_22-01.html#rel_22-01) under WSL2, exporting the model and then loading it in a C++ application that uses LibTorch, e.g.\r\n```\r\n#include <torch/script.h>\r\n// ...\r\ntorch::jit::script::Module module;\r\ntry {\r\n  // Deserialize the ScriptModule from a file using torch::jit::load().\r\n  module = torch::jit::load(argv[1]);\r\n}\r\n```\r\nWould this be the right approach?\r\n## What you have already tried\r\nAt the moment I only tried to optimize the model through TorchTensorRT, and something weird happens. Here I'll show the results for the Python script below that I obtained on two different devices:\r\n- a Ubuntu desktop with a GTX1080Ti (that I use for development)\r\n- a Windows PC with a RTX3080 (that is my target device)\r\n\r\nAs you can see, **the optimization process under WSL gives me a lot of GPU errors**, while on Ubuntu it seems to work fine. Why does this happen?\r\n\r\nMy script:\r\n```\r\nimport torch_tensorrt\r\nimport yaml\r\nimport torch\r\nimport os\r\nimport time\r\nimport numpy as np\r\nimport torch.backends.cudnn as cudnn\r\nimport argparse\r\nimport segmentation_models_pytorch as smp\r\nimport pytorch_lightning as pl\r\ncudnn.benchmark = True\r\n\r\ndef benchmark(model, input_shape=(1, 3, 512, 512), dtype=torch.float, nwarmup=50, nruns=1000):\r\n    input_data = torch.randn(input_shape)\r\n    input_data = input_data.to(\"cuda\")\r\n    if dtype==torch.half:\r\n        input_data = input_data.half()\r\n        \r\n    print(\"Warm up ...\")\r\n    with torch.no_grad():\r\n        for _ in range(nwarmup):\r\n            features = model(input_data)\r\n    torch.cuda.synchronize()\r\n    print(\"Start timing ...\")\r\n    timings = []\r\n    with torch.no_grad():\r\n        for i in range(1, nruns+1):\r\n            start_time = time.time()\r\n            features = model(input_data)\r\n            torch.cuda.synchronize()\r\n            end_time = time.time()\r\n            timings.append(end_time - start_time)\r\n            if i%100==0:\r\n                print('Iteration %d/%d, ave batch time %.2f ms'%(i, nruns, np.mean(timings)*1000))\r\n\r\n    print(\"Input shape:\", input_data.size())\r\n    print(\"Output features size:\", features.size())\r\n    \r\n    print('Average batch time: %.2f ms'%(np.mean(timings)*1000))\r\n    \r\ndef load_config(config_path: str):\r\n    with open(config_path) as f:\r\n        config = yaml.load(f, Loader=yaml.FullLoader)\r\n    return config\r\n    \r\n    \r\n    \r\ndef main():\r\n    # Load target model\r\n    parser = argparse.ArgumentParser()\r\n    parser.add_argument(\"weights_path\")\r\n    parser.add_argument(\"config_path\")\r\n    args = parser.parse_args()\r\n    config = load_config(args.config_path)\r\n    model_dict = config[\"model\"]\r\n    model_dict[\"activation\"] = \"softmax2d\"\r\n    model = smp.create_model(**model_dict)\r\n    state_dict = torch.load(args.weights_path)[\"state_dict\"]\r\n    model.load_state_dict(state_dict)\r\n    model.to(\"cuda\")\r\n    model.eval()\r\n    # Create dummy data for tracing and benchmarking purposes.\r\n    dtype = torch.float32\r\n    shape = (1, 3, 512, 512)\r\n    input_data = torch.randn(shape).to(\"cuda\")\r\n    \r\n    # Convert model to script module\r\n    print(\"Tracing PyTorch model...\")\r\n    traced_script_module = torch.jit.trace(model, input_data)\r\n    # torch_script_module = torch.jit.load(model_path).cuda()\r\n    print(\"Script Module generated.\")\r\n    print(\"\\nBenchmarking Script Module...\")\r\n    # First benchmark <===================================\r\n    benchmark(traced_script_module, shape, dtype)\r\n    \r\n    \r\n    # Convert to TRT Module...\r\n    output_path = args.config_path.split(os.path.sep)[-1] + \"_trt_.pt\"\r\n    print(\"Creating TRT module...\")\r\n    trt_ts_module = torch_tensorrt.compile(\r\n        traced_script_module,\r\n        inputs = [\r\n            torch_tensorrt.Input( # Specify input object with shape and dtype\r\n                shape=shape,\r\n                dtype=dtype) # Datatype of input tensor. Allowed options torch.(float|half|int8|int32|bool)\r\n        ],\r\n        enabled_precisions = {dtype},\r\n      )\r\n    print(\"TRT Module created\")\r\n    print(\"\\nBenchmarking TRT Module...\")\r\n    benchmark(trt_ts_module, shape, dtype)\r\n    torch.jit.save(trt_ts_module, os.path.join(\"models\",output_path)) # save the TRT embedded Torchscript\r\n    \r\nif __name__ == \"__main__\":\r\n    main()\r\n    \r\n```\r\n\r\n### Ubuntu desktop\r\n```\r\nroot@ca10ddc496a3:/DockerStuff# python script.py path/to/checkout.tar path/to/config.yaml\r\nNo pretrained weights exist for this model. Using random initialization.\r\nTracing PyTorch model...\r\n/opt/conda/lib/python3.8/site-packages/segmentation_models_pytorch/base/model.py:16: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that",
    "url": "https://github.com/pytorch/TensorRT/issues/856",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "channel: windows"
    ],
    "created_at": "2022-02-08T10:22:57Z",
    "updated_at": "2022-08-27T00:03:53Z",
    "user": "andreabonvini"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 852,
    "title": "How to set custom GCC path when compiling the source code",
    "body": "## \u2753 Question\r\nHow to set the GCC path when compiling the source code\r\n\r\n## What you have already tried\r\nI try to build  Torch-TensorRT using locally installed cuDNN & TensorRT, But the following error occurred\r\n![image](https://user-images.githubusercontent.com/61401199/152751388-e243228f-84f9-4761-8011-3f650adc91d0.png)\r\nI found that this maybe a problem with the GCC version and needs to be upgraded, but the default /usr/bin/gcc requires root permission to change, I can't do anything about this path. So, I want to install a higher version of GCC in another path and specify the path of GCC when compiling Torch-TensorRT, but I don't know where to set the path of GCC.\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/852",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-02-07T08:33:12Z",
    "updated_at": "2022-04-25T17:01:14Z",
    "user": "yuezhuang1387"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 851,
    "title": "docker build failed",
    "body": "```\r\ngit clone https://github.com/NVIDIA/Torch-TensorRT\r\ncd Torch-TensorRT\r\n```\r\n\r\n`docker build --build-arg BASE=21.11 -f docker/Dockerfile -t torch_tensorrt:latest .`\r\n\r\n```\r\ngets the error like this:\r\nSending build context to Docker daemon  29.61MB\r\nStep 1/33 : ARG BASE=21.10\r\nStep 2/33 : ARG BASE_IMG=nvcr.io/nvidia/pytorch:${BASE}-py3\r\nStep 3/33 : FROM ${BASE_IMG} as base\r\n ---> 6eae00e8ee65\r\nStep 4/33 : FROM base as torch-tensorrt-builder-base\r\n ---> 6eae00e8ee65\r\nStep 5/33 : RUN rm -rf /opt/torch-tensorrt /usr/bin/bazel\r\n ---> Using cache\r\n ---> 407b606a69ba\r\nStep 6/33 : ARG ARCH=\"x86_64\"\r\n ---> Using cache\r\n ---> a47c16d2137b\r\nStep 7/33 : ARG TARGETARCH=\"amd64\"\r\n ---> Using cache\r\n ---> 2aa5a3eab761\r\nStep 8/33 : ARG BAZEL_VERSION=4.2.1\r\n ---> Using cache\r\n ---> f21f368cf46b\r\nStep 9/33 : RUN git config --global url.\"https://github.com.cnpmjs.org/\".insteadOf https://github.com/\r\n ---> Using cache\r\n ---> 8b689f617bb2\r\nStep 10/33 : RUN [[ \"$TARGETARCH\" == \"amd64\" ]] && ARCH=\"x86_64\" || ARCH=\"${TARGETARCH}\"  && wget -q https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-${ARCH} -O /usr/bin/bazel  && chmod a+x /usr/bin/bazel\r\n ---> Using cache\r\n ---> a3c8f7522040\r\nStep 11/33 : RUN touch /usr/lib/$HOSTTYPE-linux-gnu/libnvinfer_static.a\r\n ---> Using cache\r\n ---> d21a2d4dff51\r\nStep 12/33 : RUN rm -rf /usr/local/cuda/lib* /usr/local/cuda/include   && ln -sf /usr/local/cuda/targets/$HOSTTYPE-linux/lib /usr/local/cuda/lib64   && ln -sf /usr/local/cuda/targets/$HOSTTYPE-linux/include /usr/local/cuda/include\r\n ---> Using cache\r\n ---> 39ee2cf4915f\r\nStep 13/33 : RUN apt-get update && apt-get install -y --no-install-recommends locales ninja-build && rm -rf /var/lib/apt/lists/* && locale-gen en_US.UTF-8\r\n ---> Using cache\r\n ---> 711e012e97fd\r\nStep 14/33 : FROM torch-tensorrt-builder-base as torch-tensorrt-builder\r\n ---> 711e012e97fd\r\nStep 15/33 : COPY . /workspace/torch_tensorrt/src\r\n ---> Using cache\r\n ---> 2ea5a90787b7\r\nStep 16/33 : WORKDIR /workspace/torch_tensorrt/src\r\n ---> Using cache\r\n ---> b8e79eb37534\r\nStep 17/33 : RUN cp ./docker/WORKSPACE.docker WORKSPACE\r\n ---> Using cache\r\n ---> 7a90e4a378d4\r\nStep 18/33 : RUN ./docker/dist-build.sh\r\n ---> Running in 669eeb348f7c\r\nrunning bdist_wheel\r\nExtracting Bazel installation...\r\nStarting local Bazel server and connecting to it...\r\nLoading:\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nAnalyzing: target //:libtorchtrt (1 packages loaded, 0 targets configured)\r\nINFO: Analyzed target //:libtorchtrt (43 packages loaded, 2965 targets configured).\r\nINFO: Found 1 target...\r\n[0 / 10] [Prepa] Creating source manifest for @rules_pkg//:build_tar\r\n[1,111 / 1,235] Compiling core/lowering/passes/remove_bn_dim_check.cpp; 3s processwrapper-sandbox ... (3 actions running)\r\n[1,112 / 1,235] Compiling core/lowering/passes/remove_bn_dim_check.cpp; 7s processwrapper-sandbox ... (4 actions, 3 running)\r\n[1,115 / 1,235] Compiling core/lowering/passes/linear_to_addmm.cpp; 8s processwrapper-sandbox ... (4 actions running)\r\n[1,118 / 1,235] Compiling core/lowering/passes/exception_elimination.cpp; 6s processwrapper-sandbox ... (4 actions running)\r\n[1,121 / 1,235] Compiling core/conversion/converters/impl/squeeze.cpp; 10s processwrapper-sandbox ... (4 actions running)\r\n[1,122 / 1,235] Compiling core/conversion/converters/impl/interpolate.cpp; 13s processwrapper-sandbox ... (4 actions running)\r\n[1,125 / 1,235] Compiling core/conversion/converters/impl/lstm_cell.cpp; 11s processwrapper-sandbox ... (4 actions, 3 running)\r\n[1,129 / 1,235] Compiling cpp/bin/torchtrtc/main.cpp; 8s processwrapper-sandbox ... (4 actions, 3 running)\r\n[1,133 / 1,235] Compiling cpp/bin/torchtrtc/main.cpp; 21s processwrapper-sandbox ... (4 actions, 3 running)\r\n[1,142 / 1,235] Compiling core/conversion/converters/Weights.cpp; 7s processwrapper-sandbox ... (4 actions, 3 running)\r\n[1,147 / 1,235] Compiling core/conversion/converters/impl/topk.cpp; 12s processwrapper-sandbox ... (4 actions, 3 running)\r\n[1,155 / 1,235] Compiling core/conversion/converters/impl/cast.cpp; 16s processwrapper-sandbox ... (4 actions, 3 running)\r\n[1,163 / 1,235] Compiling core/conversion/converters/impl/layer_norm.cpp; 15s processwrapper-sandbox ... (4 actions, 3 running)\r\n[1,176 / 1,235] Compiling cpp/src/ptq.cpp; 8s processwrapper-sandbox ... (4 actions, 3 running)\r\n[1,187 / 1,235] Compiling core/conversion/evaluators/aten.cpp; 17s processwrapper-sandbox ... (4 actions running)\r\nERROR: /workspace/torch_tensorrt/src/core/conversion/evaluators/BUILD:10:11: Compiling core/conversion/evaluators/eval_util.cpp failed: (Exit 1): gcc failed: error executing command /usr/",
    "url": "https://github.com/pytorch/TensorRT/issues/851",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2022-02-07T07:02:01Z",
    "updated_at": "2022-05-20T00:02:07Z",
    "user": "Biaocsu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 72365,
    "title": "How is Tensor.type supposed to work with strings?",
    "body": "### \ud83d\udc1b Describe the bug\n\nI was looking for a functionality to convert Tensor dtype in-place by passing a string instead of the relevant `torch.dtype`.\r\n\r\n`Tensor.type`, according to the docs, is supposed to work with `dtype`s and `str`s:\r\n```python\r\ndef type(self: T, dst_type: Union[dtype, str]) -> T:\r\n        r\"\"\"Casts all parameters and buffers to :attr:`dst_type`.\r\n\r\n        .. note::\r\n            This method modifies the module in-place.\r\n\r\n        Args:\r\n            dst_type (type or string): the desired type\r\n\r\n        Returns:\r\n            Module: self\r\n        \"\"\"\r\n```\r\n\r\nHowever, it seems not to work if `dst_type` is passed as a string.\r\nI would expect it to work the same way as NumPy's `astype(...)`\r\nI did not find usage examples around.\r\n\r\nExample code:\r\n```python\r\nimport torch\r\nimport numpy as np\r\n\r\nx = torch.rand(5,5)\r\ny = np.random.rand(5,5)\r\n\r\n# conversion using the relevant dtype works\r\nx.type(torch.float16)\r\ny.astype(np.float16)\r\n\r\n# np supports also dtype passed as strings\r\ny.astype(\"float16\")\r\n\r\n# however, torch does not\r\nx.type(\"float16\")\r\n\r\n# also this does not work\r\nx.type(\"torch.float16\")\r\n```\r\n\r\n#### Error stack\r\nFirst example:\r\n```\r\n>>> x.type(\"float16\")\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nValueError: invalid type: 'float16'\r\n```\r\nSecond example:\r\n```\r\n>>> x.type(\"torch.float16\")\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nValueError: invalid type: 'torch.float16'\r\n```\n\n### Versions\n\nCollecting environment information...\r\nPyTorch version: 1.10.0\r\nIs debug build: False\r\nCUDA used to build PyTorch: 10.2\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 21.04 (x86_64)\r\nGCC version: (Ubuntu 10.3.0-1ubuntu1) 10.3.0\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\nLibc version: glibc-2.33\r\n\r\nPython version: 3.8.12 (default, Oct 12 2021, 13:49:34)  [GCC 7.5.0] (64-bit runtime)\r\nPython platform: Linux-5.11.0-46-generic-x86_64-with-glibc2.17\r\nIs CUDA available: True\r\nCUDA runtime version: Could not collect\r\nGPU models and configuration: GPU 0: GeForce RTX 2080\r\nNvidia driver version: 460.91.03\r\ncuDNN version: Probably one of the following:\r\n/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn.so.8\r\n/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8\r\n/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn_adv_train.so.8\r\n/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8\r\n/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8\r\n/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8\r\n/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn_ops_train.so.8\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.19.2\r\n[pip3] pytorch-ranger==0.1.1\r\n[pip3] torch==1.10.0\r\n[pip3] torch-optimizer==0.1.0\r\n[pip3] torch-pruning==0.2.7\r\n[pip3] torch-summary==1.4.5\r\n[pip3] torchattacks==3.1.0\r\n[pip3] torchaudio==0.10.0\r\n[pip3] torchinfo==0.0.9\r\n[pip3] torchvision==0.11.1\r\n[conda] blas                      1.0                         mkl  \r\n[conda] cudatoolkit               10.2.89              hfd86e86_1  \r\n[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch\r\n[conda] mkl                       2020.2                      256  \r\n[conda] mkl-service               2.3.0            py38he904b0f_0  \r\n[conda] mkl_fft                   1.3.0            py38h54f3939_0  \r\n[conda] mkl_random                1.1.1            py38h0573a6f_0  \r\n[conda] numpy                     1.19.2           py38h54aff64_0  \r\n[conda] numpy-base                1.19.2           py38hfa32c7d_0  \r\n[conda] pytorch                   1.10.0          py3.8_cuda10.2_cudnn7.6.5_0    pytorch\r\n[conda] pytorch-mutex             1.0                        cuda    pytorch\r\n[conda] pytorch-ranger            0.1.1                    pypi_0    pypi\r\n[conda] torch-optimizer           0.1.0                    pypi_0    pypi\r\n[conda] torch-pruning             0.2.7                    pypi_0    pypi\r\n[conda] torch-summary             1.4.5                    pypi_0    pypi\r\n[conda] torchattacks              3.1.0                    pypi_0    pypi\r\n[conda] torchaudio                0.10.0               py38_cu102    pytorch\r\n[conda] torchinfo                 0.0.9                    pypi_0    pypi\r\n[conda] torchvision               0.11.1               py38_cu102    pytorch\n\ncc @mruberry @rgommers",
    "url": "https://github.com/pytorch/pytorch/issues/72365",
    "state": "closed",
    "labels": [
      "triaged",
      "module: numpy",
      "module: ux"
    ],
    "created_at": "2022-02-04T21:44:27Z",
    "updated_at": "2023-05-13T06:07:10Z",
    "user": "marcozullich"
  },
  {
    "repo": "pytorch/text",
    "number": 1581,
    "title": "Specified Field dtype <torchtext.legacy.data.pipeline.Pipeline object at ...> can not be used with use_vocab=False because we do not know how to numericalize it.",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\n<!-- Please send questions or ask for help here. -->\r\nI am trying to implement a sequence (multi-output) regression task using `torchtext`, but I am getting the error in the title. \r\n\r\ntorch version: 1.10.1\r\ntorchtext version: 0.11.1\r\n\r\nHere's how I proceed: \r\n\r\n**Given.** sequential data (own data) of the form:\r\n```\r\n   text    label\r\n    'w1'    '[0.1, 0.3, 0.1]' \r\n    'w2'    '[0.74, 0.4, 0.65]'  \r\n    'w3'    '[0.21, 0.56, 0.23]' \r\n<empty line denoting the beginning of a new sentence>\r\n    ...       ...\r\n```\r\n**TorchText Fields to read this data.** (works perfectly)\r\n\r\n```\r\nimport torchtext\r\nfrom torchtext.legacy import data\r\nfrom torchtext.legacy import datasets\r\n\r\n\r\nTEXT = data.Field(use_vocab=True,  #  use torchtext.vocab, and later on, numericalization based on pre-trained vectors\r\n                              lower=True)\r\n\r\nLABEL = data.Field(is_target=True,\r\n                   use_vocab=False, # I don't think that I need a vocab for my task, because the output is a list of doubles \r\n                   unk_token=None,\r\n                   preprocessing=data.Pipeline(\r\n                       lambda x: torch.tensor(list(map(float, removeBracets(x).split(' '))),\r\n                                              dtype=torch.double)),      # I implement this Pipeline to transform labels from string(list(doubles)) to torch.Tensor(doubles)\r\n                   dtype=torch.DoubleTensor)  # the label is a tensor of doubles\r\n\r\nfields = [(\"text\",TEXT) , (\"label\",LABEL)]\r\n```\r\n\r\nSince I have sequential data, I used `datasets.SequenceTaggingDataset` to split the data into training, validation and testing sets.\r\n\r\n```\r\ntrain, valid, test = datasets.SequenceTaggingDataset.splits(path='./data/',\r\n                                                                                              train = train_path,\r\n                                                                                              validation = validate_path,\r\n                                                                                              test = test_path,\r\n                                                                                              fields=fields)\r\n```\r\nThen, I use a pre-trained embedding to build the vocab for the `TEXT` `Field`, e.g.\r\n\r\n``` \r\nTEXT.build_vocab(train, vectors=\"glove.840B.300d\")\r\n```\r\n\r\nAfter that, I use `BucketIterator` to create batches of the training data efficiently.\r\n\r\n```\r\ntrain_iterator, valid_iterator = data.BucketIterator.splits(\r\n                                                        (train, valid),\r\n                                                        device=DEVICE,\r\n                                                        batch_size=BATCH_SIZE,\r\n                                                        sort_key=lambda x: len(x.text),\r\n                                                        repeat=False,\r\n                                                        sort=True) # for validation/testing, better set it to False\r\n``` \r\nEverything works perfectly till now. However, when I try to iterate over train_iterator,\r\n\r\n```\r\nbatch = next(iter(train_iterator))\r\nprint(\"text\", batch.text)\r\nprint(\"label\", batch.label)\r\n```\r\n\r\n I get the following error:\r\n\r\n```\r\n    229         \"\"\"\r\n    230         padded = self.pad(batch)\r\n--> 231         tensor = self.numericalize(padded, device=device)\r\n    232         return tensor\r\n    233 \r\n\r\nPATH_TO\\torchtext\\legacy\\data\\field.py in numericalize(self, arr, device)\r\n    340                     \"use_vocab=False because we do not know how to numericalize it. \"\r\n    341                     \"Please raise an issue at \"\r\n--> 342                     \"https://github.com/pytorch/text/issues\".format(self.dtype))\r\n    343             numericalization_func = self.dtypes[self.dtype]\r\n    344             # It doesn't make sense to explicitly coerce to a numeric type if\r\n\r\nValueError: Specified Field dtype <torchtext.legacy.data.pipeline.Pipeline object at 0x0XXXXXXXX> can not be used with use_vocab=False because we do not know how to numericalize it. Please raise an issue at https://github.com/pytorch/text/issues\r\n```\r\nI looked into the question #609. Unlike this issue, I need to find a numericalization for the labels, which are of the form list(torch.DoubleTensor). Do you have any suggestion? ",
    "url": "https://github.com/pytorch/text/issues/1581",
    "state": "open",
    "labels": [
      "legacy"
    ],
    "created_at": "2022-02-04T16:25:50Z",
    "updated_at": "2022-04-17T08:46:36Z",
    "user": "MSiba"
  },
  {
    "repo": "pytorch/data",
    "number": 195,
    "title": "Documentation Improvements Tracker",
    "body": "Here are some improvements that we should make to the documentation. Some of these likely should be completed before beta release.\r\n\r\nCrucial:\r\n- [x] Add docstrings for the class `IterDataPipe` and `MapDataPipe`\r\n  https://github.com/pytorch/pytorch/pull/72618\r\n- [x] Review the categorization of `IterDataPipe` in `torchdata.datapipes.iter.rst`\r\n  https://github.com/pytorch/data/pull/219\r\n- [x] Edit first sentence of each DataPipe docstring to be a concise summary of functionality (also include functional name when it exists)\r\n  https://github.com/pytorch/pytorch/pull/72476\r\n  https://github.com/pytorch/pytorch/pull/72475\r\n  https://github.com/pytorch/data/pull/209\r\n- [x] Add usage examples to each DataPipe docstring\r\n  https://github.com/pytorch/pytorch/pull/73033\r\n  https://github.com/pytorch/pytorch/pull/73250\r\n  https://github.com/pytorch/data/pull/249\r\n- [x] Add tutorial (how to use DataPipe, how to write one, how to use it with DataLoader)\r\n  https://github.com/pytorch/data/pull/212\r\n- [x] Add domain usage examples (links to files)\r\n  https://github.com/pytorch/data/pull/216\r\n- [x] Decide what utility functions to include\r\n  https://github.com/pytorch/data/pull/205\r\n- [x] Link to relevant DataLoader documentation\r\n  https://github.com/pytorch/data/pull/205\r\n- [x] Turn on 'gh-pages' in this repo's setting\r\n  It is enabled.\r\n- [x] Clear labelling of prototype vs beta phase\r\n  https://github.com/pytorch/data/pull/252\r\n- [x] Add a link under the 'Docs' tab on pytorch.org\r\n\r\nNice-to-have:\r\n- [x] Update issue form for documentation related issues\r\n  https://github.com/pytorch/data/pull/215\r\n- [ ] Add links to domain usage examples onto individual DataPipe pages (see how TorchVision does this)\r\n- [x] Remove tutorial from README.md and link it to the documentation tutorial\r\n- [ ] Make a functional equivalent table in documentation (in a separate page?)\r\n\r\ncc: @VitalyFedyunin @ejguan @wenleix @dongreenberg @NivekT ",
    "url": "https://github.com/meta-pytorch/data/issues/195",
    "state": "open",
    "labels": [
      "todo"
    ],
    "created_at": "2022-02-03T19:39:09Z",
    "updated_at": "2022-06-02T15:18:39Z",
    "comments": 3,
    "user": "NivekT"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 843,
    "title": "\u2753 [Question] Trying to find compatible versions between two different environments",
    "body": "## \u2753 Question\r\n\r\nI'm trying to save a serialized tensorRT optimized model using torch_tensorrt from one environment and then load it in another environment (different GPUs.  one has Quadro M1000M, and another has Tesla P100.\r\n\r\nIn both environments I don't have full sudo control where I can install whatever I want (i.e. can't change nvidia driver), but I am able to install different cuda toolkits locally, same with pip installs with wheels.\r\n\r\n## What you have already tried\r\n\r\nI have tried (ones marked with @ are ones I can't change):\r\nenv #1 = \r\n@1. Tesla P100\r\n@2. Nvidia driver 460\r\n3. CUDA 11.3 (checked via torch.version.cuda). nvidia-smi shows 11.2. has many cuda versions installed from 10.2 to 11.4\r\n4. CuDNN 8.2.1.32\r\n5. TensorRT 8.2.1.8\r\n6. Torch_TensorRT 1.0.0\r\n7. Pytorch 1.10.1+cu113 (conda installed)\r\n\r\nenv #2 =\r\n@1. Quadro M1000M\r\n@2. Nvidia driver 455\r\n3. CUDA 11.3(checked via torch.version.cuda, backwards compatibilty mode I believe, but technically 11.3 requires 460+ nvidia driver according to the compatibility table). nvidia-smi shows 11.1. has 10.2 version available aside from 11.3 I installed.\r\n4. CuDNN 8.2.1.32\r\n5. TensorRT 8.2.1.8\r\n6. Torch_TensorRT 1.0.0\r\n7. Pytorch 1.10.1+cu113 (pip installed)\r\n\r\nSo as you can see the only difference is really the GPU and the NVIDIA driver (455 vs 460).\r\nIs this supposed to work?\r\nOn env#1, I can torch_tensorrt compile any models\r\nOn env#2, I run into issues if I try to compile any slightly complex models (i.e. resnet34) where it says:\r\nWARNING: [Torch-TensorRT] - Dilation not used in Max pooling converter\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT was linked against cuBLAS/cuBLAS LT 11.6.3 but loaded cuBLAS/cuBLAS LT 11.5.1\r\nERROR: [Torch-TensorRT TorchScript Conversion Context] - 1: [wrapper.cpp::plainGemm::197] Error Code 1: Cublas (CUBLAS_STATUS_NOT_SUPPORTED)\r\nERROR: [Torch-TensorRT TorchScript Conversion Context] - 2: [builder.cpp::buildSerializedNetwork::609] Error Code 2: Internal Error (Assertion enginePtr != nullptr failed. )\r\n\r\nIf I try to \"torch.jit.load\" any model made in env #1 (even the simplest ones like a model with 1 conv2d layer) on env #2, I get the following error msg:\r\n~/.local/lib/python3.6/site-packages/torch/jit/_serialization.py in load(f, map_location, _extra_files)\r\n    159     cu = torch._C.CompilationUnit()\r\n    160     if isinstance(f, str) or isinstance(f, pathlib.Path):\r\n--> 161         cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files)\r\n    162     else:\r\n    163         cpp_module = torch._C.import_ir_module_from_buffer(\r\n\r\nRuntimeError: [Error thrown at core/runtime/TRTEngine.cpp:44] Expected most_compatible_device to be true but got false\r\nNo compatible device was found for instantiating TensorRT engine\r\n\r\n\r\n## Environment\r\nExplained above\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/843",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2022-02-01T19:33:31Z",
    "updated_at": "2022-05-20T00:02:07Z",
    "user": "hanbrianlee"
  },
  {
    "repo": "pytorch/functorch",
    "number": 433,
    "title": "Determine how to mitigate the challenge of pytorch/pytorch changes breaking functorch",
    "body": "We get broken by pytorch/pytorch on an almost daily basis. Some of these changes are easy to resolve, some are not easy to resolve. This has cost me 10s of hours so far and going forward will cost even more. We should come up with some way to mitigate this.\r\n\r\nThere are at least two axes for the proposals. On one axis is development velocity for functorch, on the other axis is how much time it takes for us to get notified of a change in pytorch/pytorch that is problematic. These generally get traded off in the proposals.\r\n\r\nSome proposals that we've heard so far:\r\n- Follow what pytorch/xla did. That is, have a test in pytorch/pytorch that builds functorch main and signals if there's a problem. The tradeoff here is that functorch main must now be green most of the time (e.g. no more committing directly to main) and we need our CI to run off of pytorch main, not the pytorch nightlies.\r\n- The pytorch/xla idea, except, the test always reports green but emails someone if there is a problem.\r\n- Just merge functorch into pytorch/pytorch. This gives us the fastest signal to a problematic change (in fact, the problematic change won't get merged if they break a functorch test), but it trades off our development velocity completely.\r\n- put functorch as a submodule on pytorch/pytorch, package the two libraries together",
    "url": "https://github.com/pytorch/functorch/issues/433",
    "state": "closed",
    "labels": [
      "actionable",
      "needs design"
    ],
    "created_at": "2022-02-01T15:54:27Z",
    "updated_at": "2022-10-17T19:55:44Z",
    "user": "zou3519"
  },
  {
    "repo": "huggingface/transformers",
    "number": 15404,
    "title": "what is the equivalent manner for those lines?",
    "body": "",
    "url": "https://github.com/huggingface/transformers/issues/15404",
    "state": "closed",
    "labels": [],
    "created_at": "2022-01-29T16:03:12Z",
    "updated_at": "2022-02-18T21:37:08Z",
    "user": "mathshangw"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 124,
    "title": "Cache /valid?",
    "body": "<strike>It is called multiple times per second by moon landing, and it impacts a lot the loading time of the /datasets page (https://github.com/huggingface/moon-landing/issues/1871#issuecomment-1024414854).</strike>\r\n\r\nCurrently, several queries are done to check all the valid datasets on every request",
    "url": "https://github.com/huggingface/dataset-viewer/issues/124",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-01-28T17:37:47Z",
    "updated_at": "2022-01-31T20:31:41Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 71991,
    "title": "How to make an LSTM Bidirectional?",
    "body": "### \ud83d\udc1b Describe the bug\n\nGoal: make LSTM `self.classifier()` learn from bidirectional layers. \r\n\r\n`# !` = code lines of interest\r\n\r\n**Question:**\r\nWhat changes to `LSTMClassifier` do I need to make, in order to have this LSTM work bidirectionally?\r\n\r\n---\r\n\r\nI *think* the problem is in `forward()`. It learns from the **last state** of LSTM neural network, by slicing:\r\n```python\r\ntag_space = self.classifier(lstm_out[:,-1,:])\r\n``` \r\n\r\nHowever, bidirectional changes the architecture and thus the output shape. \r\n\r\nDo I need to sum up or concatenate the values of the 2 layers/ directions?\r\n\r\n---\r\n\r\nInstalls:\r\n```\r\n!pip install cloud-tpu-client==0.10 https://storage.googleapis.com/tpu-pytorch/wheels/torch_xla-1.8-cp37-cp37m-linux_x86_64.whl\r\n!pip -q install pytorch-lightning==1.2.7 torchmetrics awscli mlflow boto3 pycm\r\n!pip install cloud-tpu-client==0.10 https://storage.googleapis.com/tpu-pytorch/wheels/torch_xla-1.9-cp37-cp37m-linux_x86_64.whl\r\n!pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchtext==0.10.0 -f https://download.pytorch.org/whl/cu111/torch_stable.html\r\n```\r\n\r\nWorking Code:\r\n```python\r\nfrom argparse import ArgumentParser\r\n\r\nimport torchmetrics\r\nimport pytorch_lightning as pl\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\nclass LSTMClassifier(nn.Module):\r\n\r\n    def __init__(self, \r\n        num_classes, \r\n        batch_size=10,\r\n        embedding_dim=100, \r\n        hidden_dim=50, \r\n        vocab_size=128):\r\n\r\n        super(LSTMClassifier, self).__init__()\r\n\r\n        initrange = 0.1\r\n\r\n        self.num_labels = num_classes\r\n        n = len(self.num_labels)\r\n        self.hidden_dim = hidden_dim\r\n        self.batch_size = batch_size\r\n\r\n        self.word_embeddings = nn.Embedding(vocab_size, embedding_dim)\r\n        self.word_embeddings.weight.data.uniform_(-initrange, initrange)\r\n        self.lstm = nn.LSTM(input_size=embedding_dim, hidden_size=hidden_dim, batch_first=True, bidirectional=True)  # !\r\n        \r\n        print(\"# !\")\r\n        \r\n        bi_grus = torch.nn.GRU(input_size=embedding_dim, hidden_size=hidden_dim, batch_first=True, bidirectional=True)\r\n        reverse_gru = torch.nn.GRU(input_size=embedding_dim, hidden_size=hidden_dim, batch_first=True, bidirectional=False)\r\n        \r\n        self.lstm.weight_ih_l0_reverse = bi_grus.weight_ih_l0_reverse\r\n        self.lstm.weight_hh_l0_reverse = bi_grus.weight_hh_l0_reverse\r\n        self.lstm.bias_ih_l0_reverse = bi_grus.bias_ih_l0_reverse\r\n        self.lstm.bias_hh_l0_reverse = bi_grus.bias_hh_l0_reverse\r\n        \r\n        bi_output, bi_hidden = bi_grus()\r\n        reverse_output, reverse_hidden = reverse_gru()\r\n        \r\n        print(\"# !\")\r\n\r\n        # self.classifier = nn.Linear(hidden_dim, self.num_labels[0])\r\n        self.classifier = nn.Linear(2 * hidden_dim, self.num_labels[0])  # !\r\n\r\n\r\n    def repackage_hidden(h):\r\n        \"\"\"Wraps hidden states in new Tensors, to detach them from their history.\"\"\"\r\n\r\n        if isinstance(h, torch.Tensor):\r\n            return h.detach()\r\n        else:\r\n            return tuple(repackage_hidden(v) for v in h)\r\n\r\n\r\n    def forward(self, sentence, labels=None):\r\n        embeds = self.word_embeddings(sentence)\r\n        lstm_out, _ = self.lstm(embeds)  # lstm_out - 2 tensors, _ - hidden layer\r\n        print(lstm_out[:,-1,:])\r\n        tag_space = self.classifier(lstm_out[:,-1,:] + lstm_out[:,-1,:])  # !  # lstm_out[:,-1,:] - 1 tensor\r\n        logits = F.log_softmax(tag_space, dim=1)\r\n        loss = None\r\n        if labels:\r\n            loss = F.cross_entropy(logits.view(-1, self.num_labels[0]), labels[0].view(-1))\r\n        return loss, logits\r\n\r\n\r\nclass LSTMTaggerModel(pl.LightningModule):\r\n    def __init__(\r\n        self,\r\n        num_classes,\r\n        class_map,\r\n        from_checkpoint=False,\r\n        model_name='last.ckpt',\r\n        learning_rate=3e-6,\r\n        **kwargs,\r\n    ):\r\n\r\n        super().__init__()\r\n        self.save_hyperparameters()\r\n        self.learning_rate = learning_rate\r\n        self.model = LSTMClassifier(num_classes=num_classes)\r\n        self.model.load_state_dict(torch.load(model_name), strict=False)  # !\r\n        self.class_map = class_map\r\n        self.num_classes = num_classes\r\n        self.valid_acc = torchmetrics.Accuracy()\r\n        self.valid_f1 = torchmetrics.F1()\r\n\r\n\r\n    def forward(self, *input, **kwargs):\r\n        return self.model(*input, **kwargs)\r\n\r\n    def training_step(self, batch, batch_idx):\r\n        x, y_true = batch\r\n        loss, _ = self(x, labels=y_true)\r\n        self.log('train_loss', loss)\r\n        return loss\r\n\r\n    def validation_step(self, batch, batch_idx):\r\n        x, y_true = batch\r\n        _, y_pred = self(x, labels=y_true)\r\n        preds = torch.argmax(y_pred, axis=1)\r\n        self.valid_acc(preds, y_true[0])\r\n        self.log('val_acc', self.valid_acc, prog_bar=True)\r\n        self.valid_f1(preds, y_true[0])\r\n        self.log('f1', self.valid_f1, prog_bar=True)     \r\n\r\n    def configure_optimizers(self):\r\n        'Pre",
    "url": "https://github.com/pytorch/pytorch/issues/71991",
    "state": "closed",
    "labels": [],
    "created_at": "2022-01-28T16:03:23Z",
    "updated_at": "2022-01-31T09:59:27Z",
    "user": "danielbellhv"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 830,
    "title": "\u2753 [Question] Why BERT Base is slower w/ Torch-TensorRT than native PyTorch? ",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nI'm trying to optimize hugging face's BERT Base uncased model using Torch-TensorRT, the code works after disabling full compilation (`require_full_compilation=False`), and the avg latency is ~10ms on T4. However, it it slower than native PyTorch implementation (~6ms on T4). In contrast, running the same model with `trtexec` only takes ~4ms. So, for BERT Base, it's 2.5x slower than TensorRT. I wonder if this is expected?\r\n\r\nHere's the full code:\r\n```\r\nfrom transformers import BertModel, BertTokenizer, BertConfig\r\nimport torch\r\nimport time\r\n\r\nenc = BertTokenizer.from_pretrained(\"./bert-base-uncased\")\r\n\r\n# Tokenizing input text\r\ntext = \"[CLS] Who was Jim Henson ? [SEP] Jim Henson was a puppeteer [SEP]\"\r\ntokenized_text = enc.tokenize(text)\r\n\r\n# Masking one of the input tokens\r\nmasked_index = 8\r\ntokenized_text[masked_index] = '[MASK]'\r\nindexed_tokens = enc.convert_tokens_to_ids(tokenized_text)\r\nsegments_ids = [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]\r\n\r\n# Creating a dummy input\r\ntokens_tensor = torch.tensor([indexed_tokens]).to(torch.int32).cuda()\r\nsegments_tensors = torch.tensor([segments_ids]).to(torch.int32).cuda()\r\n\r\ndummy_input = [tokens_tensor, segments_tensors]\r\ndummy_input_shapes = [list(v.size()) for v in dummy_input]\r\n\r\n# Initializing the model with the torchscript flag\r\n# Flag set to True even though it is not necessary as this model does not have an LM Head.\r\nconfig = BertConfig(vocab_size_or_config_json_file=32000, hidden_size=768,\r\n    num_hidden_layers=12, num_attention_heads=12, intermediate_size=3072, torchscript=True)\r\n\r\n# Instantiating the model\r\nmodel = BertModel(config)\r\n\r\n# The model needs to be in evaluation mode\r\nmodel.eval()\r\n\r\n# If you are instantiating the model with `from_pretrained` you can also easily set the TorchScript flag\r\nmodel = BertModel.from_pretrained(\"./bert-base-uncased\", torchscript=True)\r\n\r\nmodel = model.eval().cuda()\r\n\r\n# Creating the trace\r\ntraced_model = torch.jit.trace(model, dummy_input)\r\n\r\nimport torch_tensorrt\r\ncompile_settings = {\r\n    \"require_full_compilation\": False,\r\n    \"truncate_long_and_double\": True,\r\n    \"torch_executed_ops\": [\"aten::Int\"]\r\n}\r\noptimized_model = torch_tensorrt.compile(traced_model, inputs=dummy_input, **compile_settings)\r\n\r\ndef benchmark(model, input):\r\n    # Warming up\r\n    for _ in range(10):\r\n        model(*input)\r\n\r\n    inference_count = 1000\r\n    # inference test\r\n    start = time.time()\r\n    for _ in range(inference_count):\r\n        model(*input)\r\n    end = time.time()\r\n    print(f\"use {(end-start)/inference_count*1000} ms each inference\")\r\n    print(f\"{inference_count/(end-start)} step/s\")\r\n\r\nprint(\"before compile\")\r\nbenchmark(traced_model, dummy_input)\r\n\r\nprint(\"after compile\")\r\nbenchmark(optimized_model, dummy_input)\r\n```\r\n\r\nSo, my question is why it is slower than native PyTorch, and how do I fine-tune it?\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\nI've checked out the log from Torch-TensorRT, looks like the model is partitioned into 3 parts, separated by `at::Int` op, and looks like Int op is [hard to implement](https://github.com/NVIDIA/Torch-TensorRT/issues/513).\r\n\r\nNext, I profiled the inference process with Nsight System, here's the screenshot:\r\n![CleanShot 2022-01-26 at 18 44 38](https://user-images.githubusercontent.com/552990/151149720-d707afcb-0fb0-467d-a468-b1b35eb9330a.png)\r\n\r\nIt is expected to see 3 divided segments, however, there are 2 things that caught my attention:\r\n1. Why segment 0 is slower than pure TensorRT? Is it due to over complicated conversion?\r\n2. Why the `cudaMemcpyAsync` took so long? Shouldn't it only return the `last_hidden_state` tensor?\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.10\r\n - CPU Architecture:\r\n - OS (e.g., Linux): Ubuntu 18.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source): python setup.py develop\r\n - Are you using local sources or building from archives: local sources\r\n - Python version: 3.6.9\r\n - CUDA version: 10.2\r\n - GPU models and configuration: T4\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/830",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "performance"
    ],
    "created_at": "2022-01-26T10:55:56Z",
    "updated_at": "2023-11-09T09:13:15Z",
    "user": "void-main"
  },
  {
    "repo": "pytorch/torchx",
    "number": 375,
    "title": "[torchx/config] Generate docs on the available configuration options in .torchxconfig",
    "body": "## \ud83d\udcda Documentation\r\n\r\nNote: not a request for correction of documentation!\r\n\r\n## Link\r\nhttps://pytorch.org/torchx/latest/experimental/runner.config.html\r\n\r\n## What does it currently say?\r\nNothing wrong with the current docs, but would be nice to have a list of the options that are \"set-able\" via .torchxconfig\r\n\r\n## What should it say?\r\nAdd a section that lists out the possible options and section names. Note that some options (e.g. the types of schedulers available and their respective runopts) are different between Meta-internal and OSS. Having a contextual `TorchXConfig` DAO-like object with placeholders and generating a docs page by dumping that object would make it possible to capture these differences.\r\n\r\n## Why?\r\nCurrently it is not clear what options can/cannot be set via .torchxconfig, we need a glossary of all the available options along with a help string on what they do and default values (if any)\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/375",
    "state": "open",
    "labels": [],
    "created_at": "2022-01-25T23:49:07Z",
    "updated_at": "2022-04-08T18:23:57Z",
    "comments": 2,
    "user": "kiukchung"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 824,
    "title": "\u2753 [Question] How to use FP16 precision in C++",
    "body": "## \u2753 Question\r\n\r\nI am trying run inference on an FP16-Engine in C++. `engine->getBindingDataType(i)` correctly returns '1' (kHALF) for all Bindings. However, when I am using the following lines to get the output, the compiler is obviously interpreting it as normal floats (=FP32)\r\n```\r\n\r\nstd::vector<float> cpu_output(getSizeByDim(output_dims[0]) * 1);\r\ncudaMemcpy(cpu_output.data(), buffers[outputIndex], cpu_output.size() * sizeof(float), cudaMemcpyDeviceToHost);\r\n```\r\n\r\nHow can I make sure that the contents are correctly converted to float, or what datatype can I use to interpret them as halfs? Right now, the `cpu_output` vector somehow casts the halfs so that the output floats are way too large (estimated ~100 times larger than they should be). Can I just do something like \"`cpu_output[i] = cpu_output[i]<<8`\"?\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/824",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-01-25T09:52:19Z",
    "updated_at": "2022-01-25T10:01:40Z",
    "user": "DavidBaldsiefen"
  },
  {
    "repo": "pytorch/text",
    "number": 1537,
    "title": "[META] how do we want to handle stale issues/PRs?",
    "body": "## \u2753 Questions and Help\r\n\r\nThere are many issues and PRs in the repo either related to long-gone legacy APIs or have been overcome by events. How do we want to track/manage these potentially stale issues?\r\n\r\nOptions:\r\n- A bot\r\n  - I don't like this option because it can permit false positives which makes it hard for users to find real issues\r\n- Manual inspection\r\n  - This can take a bit of time, but it's more precise\r\n- Others?\r\n",
    "url": "https://github.com/pytorch/text/issues/1537",
    "state": "closed",
    "labels": [],
    "created_at": "2022-01-24T17:24:28Z",
    "updated_at": "2022-03-07T22:52:11Z",
    "user": "erip"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 823,
    "title": "\u2753 [Question] How do you override or remove evaluators ",
    "body": "## \u2753 Question\r\n\r\nI am trying to use YOLOv5 with Torch-TensorRT. When I load the model, I get the following error message (among others):\r\n```\r\n\r\nERROR: [Torch-TensorRT TorchScript Conversion Context] - 4: [layers.cpp::validate::2385] Error Code 4: Internal Error (%3264 : Tensor = aten::mul(%3263, %3257) # /home/.../yolov5/models/yolo.py:66:0: operation PROD has incompatible input types Float and Int32)\r\n```\r\n\r\nThus I wanted to try to overload the `aten::mul` operator to support `float*int` and `int*float` operations, which fails (see below)\r\n\r\n**(How) Is it possible to override or remove existing evaluators?**\r\n\r\n## What you have already tried\r\n\r\nI am using the following code:\r\n```\r\n\r\nstatic auto atenmul_evaluator =\r\n    torch_tensorrt::core::conversion::evaluators::RegisterNodeEvaluators().evaluator(\r\n        {c10::Symbol::fromQualString(\"aten::mul\"),\r\n         [](const torch::jit::Node *n, torch_tensorrt::core::conversion::evaluators::kwargs &args)\r\n             -> c10::optional<torch::jit::IValue> {\r\n             ROS_INFO(\"Custom Evaluator is being accessed!\");\r\n\r\n             if (args.at(n->input(0)).IValue()->isInt() && args.at(n->input(1)).IValue()->isInt()) {\r\n                 auto a = args.at(n->input(0)).unwrapToInt();\r\n                 auto b = args.at(n->input(1)).unwrapToInt();\r\n                 return a * b;\r\n             } else if (args.at(n->input(0)).IValue()->isDouble() &&\r\n                        args.at(n->input(1)).IValue()->isDouble()) {\r\n                 auto a = args.at(n->input(0)).unwrapToDouble();\r\n                 auto b = args.at(n->input(1)).unwrapToDouble();\r\n                 return a * b;\r\n             } else if (args.at(n->input(0)).IValue()->isInt() &&\r\n                        args.at(n->input(1)).IValue()->isDouble()) {\r\n                 auto a = args.at(n->input(0)).unwrapToInt();\r\n                 auto b = args.at(n->input(1)).unwrapToDouble();\r\n                 return a * b;\r\n             } else if (args.at(n->input(0)).IValue()->isDouble() &&\r\n                        args.at(n->input(1)).IValue()->isInt()) {\r\n                 auto a = args.at(n->input(0)).unwrapToDouble();\r\n                 auto b = args.at(n->input(1)).unwrapToInt();\r\n                 return a * b;\r\n             } else {\r\n                 TORCHTRT_THROW_ERROR(\"Unimplemented data type for aten::mul evaluator: \"\r\n                                      << args.at(n->input(0)).IValue()->type()->str());\r\n                 return {};\r\n             }\r\n         },\r\n         torch_tensorrt::core::conversion::evaluators::EvalOptions().validSchemas(\r\n             {\"aten::mul.int(int a, int b) -> (float)\",\r\n              \"aten::mul.float(float a, float b) -> (float)\",\r\n              \"aten::mul.int_float(int a, float b) -> (float)\",\r\n              \"aten::mul.float_int(float a, int b) -> (float)\"})});\r\n```\r\n\r\nBut then I get the errormessage `Attempting to override already registered evaluator aten::mul, merge implementations instead`. Thus I want to try and find a way to override or remove the evaluator without recompiling Torch-TensorRT.\r\n\r\nWhen I implemented the above only for `int_float` and `float_int` seperately, the output returned to the orignal errormessage from above, indicating that the new evaluator wasn't used.\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/823",
    "state": "closed",
    "labels": [
      "question",
      "component: converters",
      "No Activity"
    ],
    "created_at": "2022-01-24T08:43:17Z",
    "updated_at": "2022-11-21T16:12:05Z",
    "user": "DavidBaldsiefen"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 820,
    "title": "\u2753 [Question] Have anyone encounter this: RuntimeError: expected type comment but found 'eof' here",
    "body": "## \u2753 Question\r\n\r\nwhen I run compile command like this:\r\n```python\r\ntrt_ts_module = torch_tensorrt.compile(model,\r\n                                inputs=[torch_tensorrt.Input((1, 3, 128, 128), dtype=torch.float32),\r\n                                        torch_tensorrt.Input((1, 3, 320, 320), dtype=torch.float32)],\r\n                                enabled_precisions = {torch.float, torch.half})\r\n```\r\nI encounter this error:\r\n```\r\n  File \"/opt/conda/lib/python3.8/site-packages/torch/jit/frontend.py\", line 310, in build_def\r\n    type_comment_decl = torch._C.parse_type_comment(type_line)\r\nRuntimeError: expected type comment but found 'eof' here:\r\n#     # type: (List[Tensor], Tensor) -> Tensor\r\n```\r\n\r\n## What you have already tried\r\n\r\nNo other attempts.\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.11.0a0+b6df043\r\n - CPU Architecture: amd64\r\n - OS (e.g., Linux): ubuntu18.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.8\r\n - CUDA version: 11.5\r\n - GPU models and configuration: GTX 1660ti\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\nI just use docker recommended by tutorial at [https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch)\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/820",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2022-01-20T13:57:51Z",
    "updated_at": "2022-05-05T00:02:27Z",
    "user": "laisimiao"
  },
  {
    "repo": "pytorch/data",
    "number": 175,
    "title": "Refactor test suite to be more readable?",
    "body": "While working on #174, I also worked on the test suite. In there we have the ginormous tests that are hard to parse, because they do so many things at the same time:\r\n\r\nhttps://github.com/pytorch/data/blob/c06066ae360fc6054fb826ae041b1cb0c09b2f3b/test/test_datapipe.py#L382-L426\r\n\r\nI was wondering if there is a reason for that. Can't we split this into multiple smaller ones? Utilizing `pytest`, placing the following class in the test module is equivalent to the test above:\r\n\r\n```python\r\nclass TestLineReader:\r\n    @pytest.fixture\r\n    def text1(self):\r\n        return \"Line1\\nLine2\"\r\n\r\n    @pytest.fixture\r\n    def text2(self):\r\n        return \"Line2,1\\nLine2,2\\nLine2,3\"\r\n\r\n    def test_functional_read_lines_correctly(self, text1, text2):\r\n        source_dp = IterableWrapper([(\"file1\", io.StringIO(text1)), (\"file2\", io.StringIO(text2))])\r\n        line_reader_dp = source_dp.readlines()\r\n        expected_result = [(\"file1\", line) for line in text1.split(\"\\n\")] + [\r\n            (\"file2\", line) for line in text2.split(\"\\n\")\r\n        ]\r\n        assert expected_result == list(line_reader_dp)\r\n\r\n    def test_functional_strip_new_lines_for_bytes(self, text1, text2):\r\n        source_dp = IterableWrapper(\r\n            [(\"file1\", io.BytesIO(text1.encode(\"utf-8\"))), (\"file2\", io.BytesIO(text2.encode(\"utf-8\")))]\r\n        )\r\n        line_reader_dp = source_dp.readlines()\r\n        expected_result_bytes = [(\"file1\", line.encode(\"utf-8\")) for line in text1.split(\"\\n\")] + [\r\n            (\"file2\", line.encode(\"utf-8\")) for line in text2.split(\"\\n\")\r\n        ]\r\n        assert expected_result_bytes == list(line_reader_dp)\r\n\r\n    def test_functional_do_not_strip_newlines(self, text1, text2):\r\n        source_dp = IterableWrapper([(\"file1\", io.StringIO(text1)), (\"file2\", io.StringIO(text2))])\r\n        line_reader_dp = source_dp.readlines(strip_newline=False)\r\n        expected_result = [\r\n            (\"file1\", \"Line1\\n\"),\r\n            (\"file1\", \"Line2\"),\r\n            (\"file2\", \"Line2,1\\n\"),\r\n            (\"file2\", \"Line2,2\\n\"),\r\n            (\"file2\", \"Line2,3\"),\r\n        ]\r\n        assert expected_result == list(line_reader_dp)\r\n\r\n    def test_reset(self, text1, text2):\r\n        source_dp = IterableWrapper([(\"file1\", io.StringIO(text1)), (\"file2\", io.StringIO(text2))])\r\n        line_reader_dp = LineReader(source_dp, strip_newline=False)\r\n        expected_result = [\r\n            (\"file1\", \"Line1\\n\"),\r\n            (\"file1\", \"Line2\"),\r\n            (\"file2\", \"Line2,1\\n\"),\r\n            (\"file2\", \"Line2,2\\n\"),\r\n            (\"file2\", \"Line2,3\"),\r\n        ]\r\n\r\n        n_elements_before_reset = 2\r\n        res_before_reset, res_after_reset = reset_after_n_next_calls(line_reader_dp, n_elements_before_reset)\r\n        assert expected_result[:n_elements_before_reset] == res_before_reset\r\n        assert expected_result == res_after_reset\r\n\r\n    def test_len(self, text1, text2):\r\n        source_dp = IterableWrapper([(\"file1\", io.StringIO(text1)), (\"file2\", io.StringIO(text2))])\r\n        line_reader_dp = LineReader(source_dp, strip_newline=False)\r\n\r\n        with pytest.raises(TypeError, match=\"has no len\"):\r\n            len(line_reader_dp)\r\n```\r\n\r\nThis is a lot more readable, since we now actually have 5 separate test cases that can individually fail. Plus, while writing this I also found that `test_reset` and `test_len` were somewhat dependent on `test_functional_do_not_strip_newlines` since they don't neither define `line_reader_dp` nor `expected_result` themselves.",
    "url": "https://github.com/meta-pytorch/data/issues/175",
    "state": "open",
    "labels": [
      "Better Engineering"
    ],
    "created_at": "2022-01-20T09:52:17Z",
    "updated_at": "2023-04-11T16:59:28Z",
    "comments": 6,
    "user": "pmeier"
  },
  {
    "repo": "pytorch/functorch",
    "number": 400,
    "title": "how to get related commits of pytorch/pytorch and pytorch/functorch ?",
    "body": "For some reason, i need to install newest **pytorch/functorch** from sources. but i don't know the related **pytorch/pytorch** newest source. if the pytorch/pytorch and pytorch/functorch is not compatible, functorch will not work. how i get a newest relative pair of pytorch/pytorch commit and pytorch/functorch commit ?\r\n\r\ndoes pytorch/functorch only match the released or nightly version of pytorch/pytorch?",
    "url": "https://github.com/pytorch/functorch/issues/400",
    "state": "open",
    "labels": [],
    "created_at": "2022-01-20T03:25:26Z",
    "updated_at": "2022-01-20T15:43:40Z",
    "user": "GipsonLeo"
  },
  {
    "repo": "huggingface/transformers",
    "number": 15223,
    "title": "where is the 4.16.0dev??",
    "body": "I'm running the run_mlm.py script.\r\nThere is such a line,\r\n\r\n# Will error if the minimal version of Transformers is not installed. Remove at your own risks.\r\ncheck_min_version(\"4.16.0.dev0\")\r\n\r\nbut where is it?\r\ncan't find by pip,no in github too.",
    "url": "https://github.com/huggingface/transformers/issues/15223",
    "state": "closed",
    "labels": [],
    "created_at": "2022-01-19T11:41:04Z",
    "updated_at": "2022-02-27T15:02:00Z",
    "user": "sipie800"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 819,
    "title": "Build torch-trt failed in Ubuntu18.04",
    "body": "I try to build the project from source according to the guide in. https://nvidia.github.io/Torch-TensorRT/tutorials/installation.html with bazel but failed.\r\n\r\nMy environment:\r\n```\r\nos: Ubuntu18.04\r\ngcc: 7.5.0\r\ng++: 7.5.0\r\ncuda: 11.3\r\ncudnn: 8.2\r\ntensorRT: 8.2\r\ntorch-trt branch: ngc-21.12\r\nbazel: 4.2.1 (installed in conde env through: `conda install -c conda-forge bazel=4.2.1`)\r\n```\r\n\r\nBuild command:\r\n```\r\n$ export TEST_TMPDIR=/tmp/cache_bazel\r\n$ export BAZEL_USER_ROOT=/tmp/trt/ltp\r\n$ export LD_LIBRARY_PATH=/usr/local/cuda-11.3/lib64:$LD_LIBRARY_PATH\r\n\r\n$ bazel --output_user_root=${BAZEL_USER_ROOT} \\\r\n        build //:libtorchtrt -c opt \\\r\n        --distdir third_party/dist_dir/[x86_64-linux-gnu | aarch64-linux-gnu]\r\n```\r\n\r\nError: `cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'k8'`\r\nDetail log: \r\n```\r\n$TEST_TMPDIR defined: output root default is '/tmp/cache_bazel' and max_idle_secs default is '15'.\r\nStarting local Bazel server and connecting to it...\r\nLoading:\r\nLoading: 0 packages loaded\r\nAnalyzing: target //:libtorchtrt (1 packages loaded, 0 targets configured)\r\nINFO: non-existent distdir /home/tianping/Torch-TensorRT/third_party/dist_dir/[x86_64-linux-gnu\r\nINFO: non-existent distdir /home/tianping/Torch-TensorRT/third_party/dist_dir/[x86_64-linux-gnu\r\nERROR: /tmp/trt/ltp/a7833d9e16b047b679ab8ac389d55fc8/external/local_config_cc/BUILD:47:19: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'k8'\r\nINFO: Repository tensorrt instantiated at:\r\n  /home/tianping/Torch-TensorRT/WORKSPACE:89:13: in <toplevel>\r\nRepository rule http_archive defined at:\r\n  /tmp/trt/ltp/a7833d9e16b047b679ab8ac389d55fc8/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>\r\nAnalyzing: target //:libtorchtrt (39 packages loaded, 155 targets configured)\r\nINFO: Repository libtorch instantiated at:\r\n  /home/tianping/Torch-TensorRT/WORKSPACE:56:13: in <toplevel>\r\nRepository rule http_archive defined at:\r\n  /tmp/trt/ltp/a7833d9e16b047b679ab8ac389d55fc8/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>\r\nERROR: Analysis of target '//:libtorchtrt' failed; build aborted: Analysis of target '@local_config_cc//:toolchain' failed\r\nINFO: Elapsed time: 3.881s\r\nINFO: 0 processes.\r\nFAILED: Build did NOT complete successfully (39 packages loaded, 155 targets configured)\r\nFAILED: Build did NOT complete successfully (39 packages loaded, 155 targets configured)\r\n```\r\n\r\ncould you help solve this problem, thanks a lot.",
    "url": "https://github.com/pytorch/TensorRT/issues/819",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2022-01-19T11:24:27Z",
    "updated_at": "2022-01-20T01:42:26Z",
    "user": "Mookel"
  },
  {
    "repo": "pytorch/xla",
    "number": 3305,
    "title": "how to get relative commits of pytorch/pytorch and pytorch/xla ?",
    "body": "## \u2753 Questions and Help\r\nFor some reason, i need to install newest torch XLA from sources.  but i don't know the related pytorch/pytorch newest source.  if the pytorch/pytorch and pytorch/xla is not compatible, xla will not work.  how i get a newest relative pair of pytorch/pytorch commit and pytorch/xla commit ?\r\n\r\nFor example, an old pair is as flow, but too old:\r\npytorch/pytorch - HEAD git hash is a95abc46\r\npytorch/xla - HEAD git hash is 9c2f91e\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/3305",
    "state": "closed",
    "labels": [],
    "created_at": "2022-01-19T08:38:55Z",
    "updated_at": "2022-02-19T00:30:08Z",
    "user": "GipsonLeo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 71272,
    "title": "UserWarning: Seems like `optimizer.step()` has been overridden after learning rate scheduler initialization. Please, make sure to call `optimizer.step()` before `lr_scheduler.step()`. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate   warnings.warn(\"Seems like `optimizer.step()` has been overridden after learning rate scheduler",
    "body": "### \ud83d\udc1b Describe the bug\n\nI am following the same way that is provided [here ](https://pytorch.org/docs/1.10.1/generated/torch.optim.lr_scheduler.StepLR.html#torch.optim.lr_scheduler.StepLR) for using `StepLR`:\r\n```python \r\n\r\nscheduler = StepLR(optimizer, step_size=30, gamma=0.1)\r\nfor epoch in range(100):\r\n    train(...)\r\n    validate(...)\r\n    scheduler.step()\r\n```\r\nbut I keep getting the following warning which is very annoying\r\n\r\n``` python\r\nUserWarning: Seems like `optimizer.step()` has been overridden after learning rate scheduler initialization. Please, make sure to call `optimizer.step()` before `lr_scheduler.step()`. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate\r\n  warnings.warn(\"Seems like `optimizer.step()` has been overridden after learning rate scheduler\r\n```\r\n\r\n\r\nalso the output of `collect_env` is:\r\n\r\n```\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.21.4\r\n[pip3] torch==1.10.0\r\n[pip3] torchaudio==0.10.0\r\n[pip3] torcheck==1.0.1\r\n[pip3] torchinfo==1.5.4\r\n[pip3] torchvision==0.11.1\r\n[conda] blas                      1.0                         mkl    defaults\r\n[conda] cudatoolkit               11.3.1               h2bc3f7f_2    defaults\r\n[conda] mkl                       2021.4.0           h06a4308_640    defaults\r\n[conda] mkl-service               2.4.0            py39h7e14d7c_0    conda-forge\r\n[conda] mkl_fft                   1.3.1            py39h0c7bc48_1    conda-forge\r\n[conda] mkl_random                1.2.2            py39hde0f152_0    conda-forge\r\n[conda] numpy                     1.21.2           py39h20f2e39_0    defaults\r\n[conda] numpy-base                1.21.2           py39h79a1101_0    defaults\r\n[conda] pytorch                   1.10.0          py3.9_cuda11.3_cudnn8.2.0_0    pytorch\r\n[conda] pytorch-mutex             1.0                        cuda    pytorch\r\n[conda] torchaudio                0.10.0               py39_cu113    pytorch\r\n[conda] torchinfo                 1.5.4              pyhd8ed1ab_0    conda-forge\r\n[conda] torchvision               0.11.1               py39_cu113    pytorch\r\n```\n\n### Versions\n\nalso the output of `collect_env` is:\r\n\r\n```\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.21.4\r\n[pip3] torch==1.10.0\r\n[pip3] torchaudio==0.10.0\r\n[pip3] torcheck==1.0.1\r\n[pip3] torchinfo==1.5.4\r\n[pip3] torchvision==0.11.1\r\n[conda] blas                      1.0                         mkl    defaults\r\n[conda] cudatoolkit               11.3.1               h2bc3f7f_2    defaults\r\n[conda] mkl                       2021.4.0           h06a4308_640    defaults\r\n[conda] mkl-service               2.4.0            py39h7e14d7c_0    conda-forge\r\n[conda] mkl_fft                   1.3.1            py39h0c7bc48_1    conda-forge\r\n[conda] mkl_random                1.2.2            py39hde0f152_0    conda-forge\r\n[conda] numpy                     1.21.2           py39h20f2e39_0    defaults\r\n[conda] numpy-base                1.21.2           py39h79a1101_0    defaults\r\n[conda] pytorch                   1.10.0          py3.9_cuda11.3_cudnn8.2.0_0    pytorch\r\n[conda] pytorch-mutex             1.0                        cuda    pytorch\r\n[conda] torchaudio                0.10.0               py39_cu113    pytorch\r\n[conda] torchinfo                 1.5.4              pyhd8ed1ab_0    conda-forge\r\n[conda] torchvision               0.11.1               py39_cu113    pytorch\r\n```\n\ncc @vincentqb @jbschlosser @albanD",
    "url": "https://github.com/pytorch/pytorch/issues/71272",
    "state": "open",
    "labels": [
      "needs reproduction",
      "module: optimizer",
      "triaged",
      "module: LrScheduler"
    ],
    "created_at": "2022-01-13T19:03:46Z",
    "updated_at": "2022-01-20T16:33:17Z",
    "user": "seyeeet"
  },
  {
    "repo": "pytorch/xla",
    "number": 3283,
    "title": "How to benchmark the JIT / XLA?",
    "body": "## \u2753 Questions and Help\r\n\r\nDear JAX developers,\r\n\r\nI am trying to better understand the performance of JAX and its underlying just-in-time compilation architecture, but am puzzled how to get access to this information. For example, it would be helpful to distinguish how much time is spent tracing in Python, doing HLO optimizations within XLA, and time spent further downstream in LLVM->PTX and PTX->SASS compilation steps.\r\n\r\nSurely these are useful metrics to JAX developers as well, but I could not find any information on how to access them.\r\n\r\nSearching online brings me to a [PyTorch/XLA troubleshoooting guide](https://github.com/pytorch/xla/blob/master/TROUBLESHOOTING.md) with promising-looking interfaces like\r\n\r\n```\r\nimport torch_xla.debug.metrics as met\r\n\r\nprint(met.metrics_report())\r\n```\r\n\r\nThis page also mentions a `XLA_METRICS_FILE` and other environment variables that can be used to extract metrics information --- however, it seems that all of these are 100% PyTorch specific.\r\n\r\nAny suggestions would be greatly appreciated!\r\n\r\nThanks,\r\nWenzel",
    "url": "https://github.com/pytorch/xla/issues/3283",
    "state": "closed",
    "labels": [],
    "created_at": "2022-01-08T16:31:55Z",
    "updated_at": "2022-01-10T08:26:40Z",
    "user": "wjakob"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 71058,
    "title": "`torch.Tensor.where` cannot work when `y` is float",
    "body": "### \ud83d\udc1b Describe the bug\n\nBased on the [documentation](https://pytorch.org/docs/stable/generated/torch.Tensor.where.html?highlight=where#torch.Tensor.where) of `torch.Tensor.where`, `self.where(condition, y)` is equivalent to `torch.where(condition, self, y)`. However, `torch.where` will succeed when `y` is a float but `Tensor.where` will raise an error.\r\n\r\n```python\r\nimport torch\r\ncondition= torch.randint(0,2,[2, 2], dtype=torch.bool)\r\nx= torch.rand([2, 2], dtype=torch.float64)\r\ny = 0.0\r\nprint( torch.where(condition, x, y) )\r\n# tensor([[0.0000, 0.6290],\r\n#        [0.0000, 0.0000]], dtype=torch.float64)\r\nprint( x.where(condition, y) )\r\n# TypeError: where(): argument 'other' (position 2) must be Tensor, not float\r\n```\n\n### Versions\n\npytorch: 1.10.1\n\ncc @nairbv @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/71058",
    "state": "open",
    "labels": [
      "triaged",
      "module: type promotion"
    ],
    "created_at": "2022-01-08T15:18:11Z",
    "updated_at": "2022-01-11T15:36:54Z",
    "user": "TestSomething22"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 70923,
    "title": "type promotion is broken in `torch.where`",
    "body": "The [array API specification stipulates](https://data-apis.org/array-api/latest/API_specification/searching_functions.html?highlight=where#id7) that the return value of `torch.where` should undergo regular type promotion. Currently we do not support different dtypes for `x` and `y`:\r\n\r\n```python\r\nimport torch\r\n\r\ncondition = torch.tensor([False, True])\r\nx = torch.ones(2, dtype=torch.float32)\r\ny = torch.zeros(2, dtype=torch.float64)\r\n\r\ntorch.where(condition, x, y)\r\n```\r\n\r\n```\r\nRuntimeError: expected scalar type float but found double\r\n```\r\n\r\nNote that the error message is also misleading since we deal with 1d tensors here. \n\ncc @nairbv @mruberry @rgommers @pmeier @asmeurer @leofang @AnirudhDagar @asi1024 @emcastillo @kmaehashi",
    "url": "https://github.com/pytorch/pytorch/issues/70923",
    "state": "closed",
    "labels": [
      "triaged",
      "module: type promotion",
      "module: python array api"
    ],
    "created_at": "2022-01-06T14:39:05Z",
    "updated_at": "2022-01-07T07:50:40Z",
    "user": "pmeier"
  },
  {
    "repo": "pytorch/serve",
    "number": 1389,
    "title": "how to determine number of workers and batch size to obtain best performance?",
    "body": "I have one model and 3 gpus. I register my model with the command:\r\ncurl -X POST \"localhost:8444/models?url=yoyo_ai.mar&**batch_size=8**&max_batch_delay=8000&**initial_workers=8**\"\r\n\r\nIn this setup, gpu:0 is assigned 2 workers and others are assigned 3 workers. (2 + 3 + 3)\r\nI make requests with the following code where data_batch is a list holding 64 images (i assume each worker to handle 8 images):\r\n\r\nasync def do_post(session, url, image):\r\n    async with session.post(url, data=image) as response:\r\n        return await response.text()\r\n\r\nasync def make_predictions(data_stack, model_url):\r\n    async with aiohttp.ClientSession() as session:\r\n        post_tasks = []\r\n        # prepare the coroutines that post\r\n        for img in data_stack:\r\n            post_tasks.append(do_post(session, model_url, img))\r\n        # now execute them all at once\r\n        responses = await asyncio.gather(*post_tasks)\r\n        return responses\r\n\r\ndef get_predictions(data_batch, model_url):\r\n    loop = asyncio.get_event_loop()\r\n    predictions = None\r\n    try:\r\n        predictions = loop.run_until_complete(make_predictions(data_batch, model_url))\r\n    finally:\r\n        return predictions\r\n\r\nWhile making requests in an endless loop this is the memory usage i get:\r\n![Screenshot from 2022-01-06 10-51-02](https://user-images.githubusercontent.com/45604971/148348602-5ed1ff68-3f71-416d-a31a-e482c5f3bb55.png)\r\n\r\nIf i further increase the batch size to 12 because of high memory usage of gpu:0  torchserve throws exception. Same happens if i keep batch size as 8 but increase number of workers (e.g. 9). This time each gpu gets 3 workers and gpu:0 fails to handle it. On the other hand, if i set the number of workers to 6 and keep batch size as 8, total processing time not become worse compared to 8/8 setup. Meanwhile, either 8/6 or 8/8 setup don't use memory at full capacity. As a final note, gpu utilization keeps going back and forth between %0 and %100 during inference (not at 100% or %80/%90 all time).\r\n\r\nIs there a way to use gpus at full capacity? I wonder how should i register my model with the best batch size and number of workers combination to use gpus optimally. Or do i have a problem at making requests?\r\n\r\nThank you very much for any help",
    "url": "https://github.com/pytorch/serve/issues/1389",
    "state": "closed",
    "labels": [
      "help wanted"
    ],
    "created_at": "2022-01-06T08:14:27Z",
    "updated_at": "2022-02-03T22:27:03Z",
    "user": "orkunozturk"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1781,
    "title": "tutorials/advanced_source/super_resolution_with_onnxruntime.py is maybe outdated?",
    "body": "I am working at the moment trough the [tutorial](https://github.com/pytorch/tutorials/blob/master/advanced_source/super_resolution_with_onnxruntime.py) and realized, that the entry notes are not up-to-date. \r\n\r\n- line 19 says, onnx is available/compatible between 3.5 to 3.7:\r\n    - I tested installation in a venv with 3.9 without problems\r\n- line 21-22 says, says that the main/master branch is needed:\r\n   - I tested the standard imports from line 26 to 32 and all imports worked without a problem.\r\n\r\nI am running a ubuntu 20.04 with torch stable 1.10.1 installed via pip for cuda 10.2.\r\n\r\nI did not finished the tutorial yet and will append further informations while continuing.\r\n\r\nEDIT:\r\nI can confirm: works without any issues",
    "url": "https://github.com/pytorch/tutorials/issues/1781",
    "state": "closed",
    "labels": [
      "content",
      "docathon-h1-2023",
      "easy"
    ],
    "created_at": "2022-01-05T15:29:57Z",
    "updated_at": "2023-06-02T22:24:09Z",
    "comments": 2,
    "user": "MaKaNu"
  },
  {
    "repo": "pytorch/serve",
    "number": 1385,
    "title": "How to decode response after post process?",
    "body": "Hello.  I'm using custom bert model on my custom handler using Korean.\r\n\r\nWhen I request input text, handler encodes it and process like this.\r\n\r\n``` {'body': bytearray(b'[\\n\\t\\t\\t[\"\\xec\\x9a\\x94\\xec\\xa6\\x98 \\xeb\\xb6\\x80\\xeb\\xaa\\xa8\\xeb\\x8b\\x98\\xea\\xb3\\xbc \\xeb\\xa7\\x8e\\xec\\x9d\\xb4 \\xeb\\xb6\\x80\\xeb\\x94\\xaa\\xed\\x98\\x80.\",\\n\\t\\t\\t \"\\xec\\x96\\xb4\\xeb\\x96\\xa4 \\xec\\x9d\\xbc\\xeb\\xa1\\x9c ... ```\r\n\r\n But results in custom model came out with Korean.\r\n\r\nProblem is response.\r\n\r\nAlthought my custom model gives Korean Results, \r\nTorch serve's response is encoded again.\r\n\r\nHow can I fix this?\r\n\r\nThank you.",
    "url": "https://github.com/pytorch/serve/issues/1385",
    "state": "closed",
    "labels": [
      "help wanted"
    ],
    "created_at": "2022-01-04T01:33:02Z",
    "updated_at": "2022-01-07T17:32:22Z",
    "user": "MinsuKim3095"
  },
  {
    "repo": "pytorch/text",
    "number": 1476,
    "title": "How to get all tokens in a Vocab using text",
    "body": "## \ud83d\ude80 Feature\r\n<!-- A clear and concise description of the feature proposal -->\r\n\r\n**Motivation**\r\nHi,\r\n\r\nWhen I load a vocab or have built a vocab using torchtext.vocab, I can not print its all token in the Vocab\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/text/issues/1476",
    "state": "closed",
    "labels": [],
    "created_at": "2022-01-01T06:53:51Z",
    "updated_at": "2022-01-01T14:07:08Z",
    "user": "yipliu"
  },
  {
    "repo": "huggingface/datasets-tagging",
    "number": 28,
    "title": "Why datasets version is pinned in requirements.txt?",
    "body": "In file `requirements.txt`, the version of `datasets` is pinned. Why?",
    "url": "https://github.com/huggingface/datasets-tagging/issues/28",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2021-12-29T09:39:40Z",
    "updated_at": "2021-12-29T11:51:59Z",
    "user": "albertvillanova"
  },
  {
    "repo": "pytorch/xla",
    "number": 3271,
    "title": "How to specify compute capability when building from soruce to support GPU?",
    "body": "Hello, when I finish building from soruce to support GPU, and run the test script test_train_mp_imagenet.py, a warning is shown:\r\n\r\nTensorFlow was not built with CUDA kernel binaries compatible with compute capability 7.5. CUDA kernels will be jit-compiled from PTX, which could take 30 minutes or longer.\r\n\r\nI am wondering how to specify the compute capability when building xla ?\r\n\r\nThanks very much!",
    "url": "https://github.com/pytorch/xla/issues/3271",
    "state": "closed",
    "labels": [
      "xla:gpu"
    ],
    "created_at": "2021-12-28T06:05:07Z",
    "updated_at": "2022-02-19T00:36:41Z",
    "user": "yxd886"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 70413,
    "title": "PyTorch crashes without an error message, when running this code snippet with torch.tensor subclassing & forward hooks (Not sure what the exact cause is, but the code snippet reliably causes it)",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nWhile working a project for PyTorch's [Captum](https://github.com/pytorch/captum) library, I came across a bug that I've been struggling to narrow down the cause of. I've done my best to simplify what is happening in the Captum code, and the snippet of code below should reliably reproduce the crash, though I apologies for not being able to narrow it down to smaller snippet of code.\r\n\r\nThe example code uses torch.tensor subclassing and forward hooks, and they appear to be important for causing the crash.\r\n\r\nI have no idea if there should be an error message when running the code, or if there should be no issue at all.\r\n\r\n```\r\nimport torch\r\nfrom torchvision import models\r\nmodel = models.resnet18()\r\n\r\nfrom typing import Type, Callable, List, Tuple, Union\r\nimport numpy as np\r\nfrom types import MethodType\r\n\r\n\r\nclass TestTensor(torch.Tensor):\r\n    @staticmethod\r\n    def __new__(\r\n        cls: Type[\"TestTensor\"],\r\n        x: Union[List, np.ndarray, torch.Tensor] = [],\r\n        *args,\r\n        **kwargs,\r\n    ) -> torch.Tensor:\r\n        if isinstance(x, torch.Tensor) and x.is_cuda:\r\n            x.show = MethodType(cls.show, x)\r\n            x.export = MethodType(cls.export, x)\r\n            return x\r\n        else:\r\n            return super().__new__(cls, x, *args, **kwargs)\r\n\r\n    @classmethod\r\n    def __torch_function__(\r\n        cls: Type[\"TestTensor\"],\r\n        func: Callable,\r\n        types: List[Type[torch.Tensor]],\r\n        args: Tuple = (),\r\n        kwargs: dict = None,\r\n    ) -> torch.Tensor:\r\n        if kwargs is None:\r\n            kwargs = {}\r\n        return super().__torch_function__(func, types, args, kwargs)\r\n\r\n\r\nclass TestTensor2(torch.nn.Module):\r\n\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.test_tensor = torch.randn(3,3,224,224).clamp(0,1)\r\n\r\n    def forward(self):\r\n        x = self.test_tensor\r\n        return TestTensor(x)\r\n\r\n\r\ndef test_hook(target):\r\n\r\n    def forward_hook(self, input, output) -> None:\r\n         pass\r\n\r\n    test_hooks = target.register_forward_hook(forward_hook)\r\n    test_hooks.remove()\r\n    return image().detach(), torch.randn(5)\r\n\r\n\r\nclass CaptumModuleOutputsHook:\r\n    def __init__(self, target_modules) -> None:\r\n        self.outputs = dict.fromkeys(target_modules, None)\r\n        self.hooks = [\r\n            module.register_forward_hook(self._forward_hook())\r\n            for module in target_modules\r\n        ]\r\n\r\n    def _forward_hook(self) -> Callable:\r\n        def forward_hook(\r\n            module: torch.nn.Module, input: Tuple[torch.Tensor], output: torch.Tensor\r\n        ) -> None:\r\n            assert module in self.outputs.keys()\r\n            self.outputs[module] = output\r\n\r\n        return forward_hook\r\n\r\n    def consume_outputs(self):\r\n        outputs = self.outputs\r\n        self.outputs = dict.fromkeys(self.outputs.keys(), None)\r\n        return outputs\r\n\r\n    def remove_hooks(self) -> None:\r\n        for hook in self.hooks:\r\n            hook.remove()\r\n\r\n\r\ndef collect_activations(model, target, input_tensor):\r\n    layers = CaptumModuleOutputsHook(target)\r\n    try:\r\n        model(input_tensor)\r\n        activations_dict = layers.consume_outputs()\r\n    finally:\r\n        layers.remove_hooks()\r\n    return activations_dict[target[0]]\r\n\r\n\r\ndef trigger_crash(\r\n    model,\r\n    image,\r\n    target,\r\n):\r\n    attempts, attempt_losses = [], []\r\n\r\n    # Removing this loop somehow prevents the crash from happening\r\n    for a in range(1):\r\n        imgs, losses = test_hook(target)\r\n        attempts.append(imgs.detach()); attempt_losses.append(losses)\r\n    final_image, final_losses = torch.cat(attempts, 0), torch.stack(attempt_losses)\r\n\r\n    activ = collect_activations(model, [target], final_image) # Crash happens on this line\r\n\r\n    # Commenting out these lines of code somehow prevents the crash from happening\r\n    comparison_losses = torch.stack([activ.mean()]*3)\r\n    sorted_idx = torch.sort(comparison_losses)[1]\r\n    best_image = final_image[sorted_idx[0:3]]\r\n    best_losses = final_losses[sorted_idx[0:3]]\r\n    return best_image, best_losses\r\n\r\n\r\nimage = TestTensor2()\r\ntrigger_crash(model, image, model.layer1)\r\n```\r\n\r\n### Versions\r\n\r\n```\r\nPyTorch version: 1.10.0+cu111\r\nIs debug build: False\r\nCUDA used to build PyTorch: 11.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 18.04.5 LTS (x86_64)\r\nGCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0\r\nClang version: 6.0.0-1ubuntu2 (tags/RELEASE_600/final)\r\nCMake version: version 3.12.0\r\nLibc version: glibc-2.26\r\n\r\nPython version: 3.7.12 (default, Sep 10 2021, 00:21:48)  [GCC 7.5.0] (64-bit runtime)\r\nPython platform: Linux-5.4.144+-x86_64-with-Ubuntu-18.04-bionic\r\nIs CUDA available: False\r\nCUDA runtime version: 11.1.105\r\nGPU models and configuration: Could not collect\r\nNvidia driver version: Could not collect\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.0.5\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.0.5\r\n/usr/lib/",
    "url": "https://github.com/pytorch/pytorch/issues/70413",
    "state": "open",
    "labels": [
      "triaged",
      "Stale",
      "tensor subclass"
    ],
    "created_at": "2021-12-26T18:33:55Z",
    "updated_at": "2022-02-26T21:02:46Z",
    "user": "ProGamerGov"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 70411,
    "title": "How to use custom dataset with SSD",
    "body": "I am trying to use SSD and retinanet from torchvision on my own dataset. However I cant find any reference on how to use my own dataset and what format requuired. Could any one please advice me \r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/70411",
    "state": "closed",
    "labels": [],
    "created_at": "2021-12-26T12:37:21Z",
    "updated_at": "2021-12-28T16:19:14Z",
    "user": "myasser63"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1778,
    "title": "[Help Wanted] Why take the log function and then apply exp?",
    "body": "In [line of code](https://github.com/pytorch/tutorials/blob/master/beginner_source/transformer_tutorial.py#L113), you calculate positional encoding for Transformers by taking the log first and then apply the exponential function.\r\n\r\nWould you please elaborate on why you do this instead of directly doing the calculation?\r\n\r\nI'm aware that log transformation can make multiplication become addition, but it seems that this is not the case here.\n\ncc @suraj813",
    "url": "https://github.com/pytorch/tutorials/issues/1778",
    "state": "closed",
    "labels": [
      "question",
      "intro",
      "docathon-h1-2023",
      "easy"
    ],
    "created_at": "2021-12-24T17:09:56Z",
    "updated_at": "2024-05-24T18:34:43Z",
    "user": "Superhzf"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 788,
    "title": "\u2753 [Question] How do you ....? ",
    "body": "## \u2753 Question\r\n\r\nHi, could you please explain how this is better than pytorch to Onnx to TensorRT export path?\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/788",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-12-22T17:36:54Z",
    "updated_at": "2022-01-04T23:56:04Z",
    "user": "andrei-pokrovsky"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 786,
    "title": "\u2753 [Question] How do you ....? ",
    "body": "## \u2753 Question\r\n\r\nHow can do you use [OpenAI's CLIP](https://github.com/openai/CLIP) \r\n\r\n## What you have already tried\r\n\r\n```\r\nimport clip \r\nfrom torchvision import transforms\r\nimport torch_tensorrt\r\nimport torch\r\n\r\n\r\ndevice = \"cuda:0\"\r\n\r\nbatch_size = 4\r\n\r\nclip_model_name = \"ViT-B/32\"\r\n\r\nscripted_model , preprocess = clip.load(clip_model_name, device, jit=True)\r\n\r\nscripted_model = scripted_model.visual.to(device)\r\n\r\npreprocess = transforms.Compose([\r\n    preprocess,\r\n    lambda x: x.half()\r\n    ])\r\n\r\ntrt_ts_module = torch_tensorrt.compile(scripted_model,\r\n                inputs = [\r\n                    torch_tensorrt.Input( # Specify input object with shape and dtype\r\n                        shape=[batch_size, 3, 224, 224],\r\n                        dtype=torch.half) # Datatype of input tensor. Allowed options torch.(float|half|int8|int32|bool)\r\n                ])\r\n```\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\nI have build my docker image using base image `21.10` with nvidia driver `470.86`.\r\n\r\n```\r\ndocker build --build-arg BASE=21.10 -f docker/Dockerfile -t torch_tensorrt:latest .\r\n```\r\n\r\nWith the following libraries installed. \r\n\r\n```\r\nnvidia-dlprof-pytorch-nvtx @ file:///nvidia/opt/dlprof/bin/nvidia_dlprof_pytorch_nvtx-1.6.0-py3-none-any.whl\r\nonnx @ file:///opt/pytorch/pytorch/third_party/onnx\r\npytorch-quantization==2.1.0\r\ntorch==1.10.0a0+0aef44c\r\ntorch-tensorrt @ file:///workspace/torch_tensorrt-1.1.0a0%2B733a4b1c-cp38-cp38-linux_x86_64.whl\r\ntorchtext @ file:///opt/pytorch/text\r\ntorchvision @ file:///opt/pytorch/vision\r\nclip @ git+https://github.com/openai/CLIP.git@573315e83f07b53a61ff5098757e8fc885f1703e\r\n```\r\n\r\n## Additional context\r\n\r\nThe error I am getting is: \r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"benchmark.py\", line 155, in <module>\r\n    trt_ts_module = torch_tensorrt.compile(scripted_model,\r\n  File \"/opt/conda/lib/python3.8/site-packages/torch_tensorrt/_compile.py\", line 97, in compile\r\n    return torch_tensorrt.ts.compile(ts_mod, inputs=inputs, enabled_precisions=enabled_precisions, **kwargs)\r\n  File \"/opt/conda/lib/python3.8/site-packages/torch_tensorrt/ts/_compiler.py\", line 119, in compile\r\n    compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))\r\nRuntimeError: The following operation failed in the TorchScript interpreter.\r\nTraceback of TorchScript, serialized code (most recent call last):\r\n  File \"code/__torch__/multimodal/model/multimodal_transformer.py\", line 34, in forward\r\n    x2 = torch.add(x1, torch.to(_4, 5, False, False, None), alpha=1)\r\n    x3 = torch.permute((_3).forward(x2, ), [1, 0, 2])\r\n    x4 = torch.permute((_2).forward(x3, ), [1, 0, 2])\r\n                        ~~~~~~~~~~~ <--- HERE\r\n    _15 = torch.slice(x4, 0, 0, 9223372036854775807, 1)\r\n    x5 = torch.slice(torch.select(_15, 1, 0), 1, 0, 9223372036854775807, 1)\r\n  File \"code/__torch__/multimodal/model/multimodal_transformer/___torch_mangle_9477.py\", line 8, in forward\r\n  def forward(self: __torch__.multimodal.model.multimodal_transformer.___torch_mangle_9477.Transformer,\r\n    x: Tensor) -> Tensor:\r\n    return (self.resblocks).forward(x, )\r\n            ~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n  def forward1(self: __torch__.multimodal.model.multimodal_transformer.___torch_mangle_9477.Transformer,\r\n    x: Tensor) -> Tensor:\r\n  File \"code/__torch__/torch/nn/modules/container/___torch_mangle_9476.py\", line 29, in forward\r\n    _8 = getattr(self, \"3\")\r\n    _9 = getattr(self, \"2\")\r\n    _10 = (getattr(self, \"1\")).forward((getattr(self, \"0\")).forward(x, ), )\r\n                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n    _11 = (_7).forward((_8).forward((_9).forward(_10, ), ), )\r\n    _12 = (_4).forward((_5).forward((_6).forward(_11, ), ), )\r\n  File \"code/__torch__/multimodal/model/multimodal_transformer/___torch_mangle_9376.py\", line 13, in forward\r\n    _0 = self.mlp\r\n    _1 = self.ln_2\r\n    _2 = (self.attn).forward((self.ln_1).forward(x, ), )\r\n          ~~~~~~~~~~~~~~~~~~ <--- HERE\r\n    x0 = torch.add(x, _2, alpha=1)\r\n    x1 = torch.add(x0, (_0).forward((_1).forward(x0, ), ), alpha=1)\r\n  File \"code/__torch__/torch/nn/modules/activation/___torch_mangle_9369.py\", line 34, in forward\r\n    _13 = torch.contiguous(k, memory_format=0)\r\n    _14 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _9]\r\n    k0 = torch.transpose(torch.view(_13, _14), 0, 1)\r\n                         ~~~~~~~~~~ <--- HERE\r\n    _15 = torch.contiguous(v, memory_format=0)\r\n    _16 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _8]\r\n\r\nTraceback of TorchScript, original code (most recent call last):\r\n/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py(4265): multi_head_attention_forward\r\n/opt/conda/lib/python3.7/site-packages/torch/nn/modules/activation.py(985): forward\r\n/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py(709): _slow_forward\r\n/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py(725): _call_impl\r\n/root/workspace/multimod",
    "url": "https://github.com/pytorch/TensorRT/issues/786",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-12-22T09:10:31Z",
    "updated_at": "2022-01-25T10:01:54Z",
    "user": "hfawaz"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 70280,
    "title": "How to create build-in buffers which is writable during onnx inference?",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nFirst, I'm sorry that this question may not be strictly relative to a feature request, but it has been posted on discuss.pytorch.org without any replies for one week.\r\n\r\nHi, I try to create a first-in-first-out queue as a pytorch model, export it to onnx and infer with onnxruntime. The queue, with a limited size, updates every time when a new input comes, and returns the updated queue. Codes are very simple:\r\n```\r\nimport torch\r\nimport torch.nn as nn\r\n\r\nclass WavBuffer(nn.Module):\r\n    def __init__(self, size=10):\r\n        super().__init__()\r\n        self.size = size\r\n        wavbuf = torch.zeros(size)\r\n        self.register_buffer('wavbuf', wavbuf)\r\n\r\n    def forward(self, x):\r\n        self.wavbuf = torch.cat([self.wavbuf, x])[-self.size:]\r\n        return self.wavbuf\r\n\r\nmodel = WavBuffer(10)\r\nx = torch.ones(5)\r\nfor i in range(2):\r\n    wavbuf = model(x)\r\n    print(wavbuf)\r\n```\r\nAs expected, the outputs are:\r\n```\r\ntensor([0., 0., 0., 0., 0., 1., 1., 1., 1., 1.])\r\ntensor([1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])\r\n```\r\nThen I export the model to onnx format and infer with onnxruntime:\r\n```\r\ntorch.onnx.export(\r\n    model, torch.zeros(5), 'model.onnx', verbose=False, input_names=['wav'],\r\n    output_names=['wavbuf'], opset_version=11\r\n)\r\n\r\nimport numpy as np\r\nimport onnxruntime\r\n\r\nmodel = onnxruntime.InferenceSession('model.onnx')\r\nx = np.ones(5, dtype=np.float32)\r\ninputs = {model.get_inputs()[0].name: x}\r\nfor i in range(2):\r\n    outputs = model.run(None, inputs)\r\n    wavbuf = outputs[0]\r\n    print(wavbuf)\r\n```\r\nHowever, now the outputs are:\r\n```\r\n[0. 0. 0. 0. 0. 1. 1. 1. 1. 1.]\r\n[0. 0. 0. 0. 0. 1. 1. 1. 1. 1.]\r\n```\r\nI guess that weights in onnx models are not changeable, but is there any solution to create writable build-in buffers during model design and change the buffers in onnx inference? An available example is LSTM, where the hidden states update for each time step. However, it is too difficult for me to its implementation.\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/70280",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2021-12-22T02:26:28Z",
    "updated_at": "2022-01-05T01:46:44Z",
    "user": "lawlict"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 783,
    "title": "\u2753 [Question] Is there a way to visualize the TRT model? ",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nI'm wondering if there is a way to get the TRT model after compilation and visualize it. I trying to compare a PTQ model to a QAT model. I know I might have to do some further optimization just trying to visualize the graphs and see what is going on . Currently using DenseNet169 \r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\nI can visualize an ONNX graph but unsure of TRT\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.10.0\r\n - CPU Architecture:  x86 (Intel Skylake)\r\n - OS (e.g., Linux): Ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source): N/A\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.8.10\r\n - CUDA version: 11.4\r\n - GPU models and configuration: Tesla T4\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/783",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-12-21T16:39:50Z",
    "updated_at": "2022-05-18T20:34:06Z",
    "user": "jessicarcassidy"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 70244,
    "title": " [feature request]how to merge many models to one model with shared backbone just use some code ,not a create a new model",
    "body": "    I train some models with different datas ,these models' some parameters are shared ,\r\nwhen i inference the models ,i need merge the models to one model ,i know the shared op ,so ,i want to merge these models\r\nshared op to one op  with seperate head only when inference not train.\r\n    i don't want to write a new model ,could i write a function to merge the op with same dict name ,and create a new inference model \r\nautomatic .\r\n   or maybe any way else is ok \r\n  thank you !\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/70244",
    "state": "closed",
    "labels": [],
    "created_at": "2021-12-21T13:11:35Z",
    "updated_at": "2021-12-23T16:55:09Z",
    "user": "designerZhou"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 222,
    "title": "how 640*640 to 320*320",
    "body": "Input 640*640 model to 320*320 model. I changed the relevant parameters and the program flashed back. How do I change it to 320*320 input",
    "url": "https://github.com/pytorch/android-demo-app/issues/222",
    "state": "closed",
    "labels": [],
    "created_at": "2021-12-21T02:41:41Z",
    "updated_at": "2021-12-21T05:58:05Z",
    "user": "mozeqiu"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 779,
    "title": "\u2753 [Question] Failed to compile trtorch use pre cxx11 abi",
    "body": "## \u2753 Question\r\n\r\nI'm trying to build trtorch v0.2.0 with pre cxx11 abi\r\nBut I always get the error like below\r\n\r\nINFO: Analyzed target //:libtrtorch (40 packages loaded, 2667 targets configured).\r\nINFO: Found 1 target...\r\nERROR: /root/git_source/Torch-TensorRT-0.2.0/cpp/trtorchc/BUILD:10:10: Linking cpp/trtorchc/trtorchc failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc @bazel-out/k8-opt/bin/cpp/trtorchc/trtorchc-2.params\r\n\r\nUse --sandbox_debug to see verbose messages from the sandbox gcc failed: error executing command /usr/bin/gcc @bazel-out/k8-opt/bin/cpp/trtorchc/trtorchc-2.params\r\n\r\nUse --sandbox_debug to see verbose messages from the sandbox\r\nbazel-out/k8-opt/bin/cpp/trtorchc/_objs/trtorchc/main.o:main.cpp:function c10::Device::validate(): error: undefined reference to 'c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'\r\nbazel-out/k8-opt/bin/cpp/trtorchc/_objs/trtorchc/main.o:main.cpp:function c10::Device::validate(): error: undefined reference to 'c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'\r\nbazel-out/k8-opt/bin/cpp/trtorchc/_objs/trtorchc/main.o:main.cpp:function c10::IValue::toTuple() const &: error: undefined reference to 'c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'\r\nbazel-out/k8-opt/bin/cpp/trtorchc/_objs/trtorchc/main.o:main.cpp:function c10::IValue::toTensor() const &: error: undefined reference to 'c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'\r\nbazel-out/k8-opt/bin/cpp/trtorchc/_objs/trtorchc/main.o:main.cpp:function torch::jit::Module::forward(std::vector<c10::IValue, std::allocator<c10::IValue> >): error: undefined reference to 'torch::jit::Object::find_method(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'\r\nbazel-out/k8-opt/bin/cpp/trtorchc/_objs/trtorchc/main.o:main.cpp:function torch::jit::Module::forward(std::vector<c10::IValue, std::allocator<c10::IValue> >): error: undefined reference to 'torch::jit::Method::operator()(std::vector<c10::IValue, std::allocator<c10::IValue> >, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, c10::IValue, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, c10::IValue> > > const&)'\r\nbazel-out/k8-opt/bin/cpp/trtorchc/_objs/trtorchc/main.o:main.cpp:function main: error: undefined reference to 'torch::jit::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, c10::optional<c10::Device>, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&)'\r\nbazel-out/k8-opt/bin/cpp/trtorchc/_objs/trtorchc/main.o:main.cpp:function main: error: undefined reference to 'torch::jit::Module::save(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&) const'\r\nbazel-out/k8-opt/bin/cpp/api/_objs/trtorch/trtorch.o:trtorch.cpp:function trtorch::get_build_info[abi:cxx11](): error: undefined reference to 'at::show_config[abi:cxx11]()'\r\nbazel-out/k8-opt/bin/core/_objs/core/compiler.o:compiler.cpp:function c10::ClassType::addOrCheckAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<c10::Type>, bool, bool): error: undefined reference to 'c10::ClassType::addAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<c10::Type> const&, bool, bool)'\r\n......\r\n\r\n------------------------",
    "url": "https://github.com/pytorch/TensorRT/issues/779",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-12-21T02:13:39Z",
    "updated_at": "2021-12-21T03:03:08Z",
    "user": "Fans0014"
  },
  {
    "repo": "pytorch/tensorpipe",
    "number": 420,
    "title": "[Question]How to detect pipe(obtained from ctx->connect()) is writable?",
    "body": "Hi,\r\n\r\nwhen I get a pipe via `ctx->context(address)`, how do I know the pipe is ready for write or read? A return from `ctx->connect()` does not mean the connection has been built, right? If I call `pipe->write()` immediately, such write could fail as the underlying connection has not built yet.",
    "url": "https://github.com/pytorch/tensorpipe/issues/420",
    "state": "open",
    "labels": [],
    "created_at": "2021-12-19T02:14:39Z",
    "updated_at": "2022-02-16T01:51:04Z",
    "user": "Rhett-Ying"
  },
  {
    "repo": "pytorch/data",
    "number": 144,
    "title": "Multiprocessing with any DataPipe writing to local file",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nWe need to take extra care all DataPipe that would write to file system when DataLoader2 triggered multiprocessing. If the file name on the local file system is same across multiple processes, it would be a racing condition.\r\nThis is found when TorchText team is using `on_disk_cache` to cache file.\r\nDataLoader needs to know such DataPipe must be sharded with multiprocessing or enforce it into single process.\r\n\r\nAs a workaround, users have to download the file to local file system to prevent writing within DataPipe.\r\n\r\n### Versions\r\n\r\nmain branch",
    "url": "https://github.com/meta-pytorch/data/issues/144",
    "state": "closed",
    "labels": [
      "bug",
      "good first issue",
      "help wanted",
      "high priority"
    ],
    "created_at": "2021-12-18T03:40:43Z",
    "updated_at": "2022-05-19T03:59:34Z",
    "comments": 13,
    "user": "ejguan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 70099,
    "title": "Question:  what is \"Parameter indices\"?",
    "body": "I meet the error. I know some variables which do not contribute to loss. How I can know these parameters' name?  I don't know whether \"Parameter indices\" help me or not?\r\n\r\n> Parameter indices which did not receive grad for rank 7: 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380\r\n\r\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @mruberry @jbschlosser @walterddr @kshitij12345",
    "url": "https://github.com/pytorch/pytorch/issues/70099",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "Stale"
    ],
    "created_at": "2021-12-17T09:34:29Z",
    "updated_at": "2022-02-15T15:02:44Z",
    "user": "shoutOutYangJie"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 776,
    "title": "could not support gelu\uff1f",
    "body": "I use this docker( nvcr.io/nvidia/pytorch:21.11-py3 ) you suggested to test torch-tensorrt, but can not trans pytorch model to torchscript model. It seems like gelu is not support, but I also use this docker (pytorch-20.12-py3) to trans pytorch model to torchscript model, it can work well.\r\n\r\nFile \"/opt/conda/lib/python3.8/site-packages/torch/jit/_serialization.py\", line 161, in load\r\n    cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files)\r\nRuntimeError: \r\nArguments for call are not valid.\r\nThe following variants are available:\r\n  \r\n  aten::gelu(Tensor self, bool approximate) -> (Tensor):\r\n  Argument approximate not provided.\r\n  \r\n  aten::gelu.out(Tensor self, bool approximate, *, Tensor(a!) out) -> (Tensor(a!)):\r\n  Argument approximate not provided.\r\n\r\nThe original call is:\r\n\r\ntools/pytorch2torchscript.py(123): pytorch2libtorch\r\ntools/pytorch2torchscript.py(186): <module>\r\nSerialized   File \"code/__torch__/torch/nn/modules/activation.py\", line 27\r\n  def forward(self: __torch__.torch.nn.modules.activation.GELU,\r\n    argument_1: Tensor) -> Tensor:\r\n    return torch.gelu(argument_1)\r\n           ~~~~~~~~~~ <--- HERE",
    "url": "https://github.com/pytorch/TensorRT/issues/776",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-12-17T08:38:37Z",
    "updated_at": "2022-04-01T00:02:17Z",
    "user": "daeing"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 70094,
    "title": "how to get the pre operator of current opeartor in PyTorch\uff1f",
    "body": "### \ud83d\ude80 The feature, motivation and pitch\n\nI want to get the pre operator of current operator in forward? Can pytorch support this now?\n\n### Alternatives\n\n_No response_\n\n### Additional context\n\n_No response_",
    "url": "https://github.com/pytorch/pytorch/issues/70094",
    "state": "closed",
    "labels": [],
    "created_at": "2021-12-17T07:01:52Z",
    "updated_at": "2021-12-17T14:36:30Z",
    "user": "kevinVegBird"
  },
  {
    "repo": "pytorch/data",
    "number": 140,
    "title": "Installing torchdata installs `example` folder as well",
    "body": "### \ud83d\udc1b Describe the bug\n\nLooks like installing torchdata also installs `examples`. This should probably be removed from `setup.py` so that only the `torchdata` folder gets installed.\r\n\r\nExample of what happens when trying to uninstall torchdata\r\n```\r\nfmassa@devfair0163:~/work/vision_datasets$ pip uninstall torchdata\r\nFound existing installation: torchdata 0.3.0a0+6bad0e5\r\nUninstalling torchdata-0.3.0a0+6bad0e5:\r\n  Would remove:\r\n    /private/home/fmassa/.conda/envs/xformers/lib/python3.8/site-packages/examples/vision/*\r\n    /private/home/fmassa/.conda/envs/xformers/lib/python3.8/site-packages/torchdata-0.3.0a0+6bad0e5.dist-info/*\r\n    /private/home/fmassa/.conda/envs/xformers/lib/python3.8/site-packages/torchdata/*\r\nProceed (y/n)?\r\n```\n\n### Versions\n\nLasted one from master",
    "url": "https://github.com/meta-pytorch/data/issues/140",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2021-12-15T14:09:24Z",
    "updated_at": "2021-12-16T17:05:20Z",
    "comments": 0,
    "user": "fmassa"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 772,
    "title": "\u2753 [Question] Is there support for optional arguments in model's `forward()`?",
    "body": "## \u2753 Question\r\n\r\nIs there support for optional arguments in model's `forward()`? For example, I have the following: `def forward(self, x, y: Optional[Tensor] = None):` where `y` is an optional tensor. The return result is `x + y` if `y` is provided, otherwise just `x`.\r\n\r\n## What you have already tried\r\nI added a second `torch_tensorrt.Input()` in the input spec, then at inference time got the error:\r\n`Expected dimension specifications for all input tensors, but found 1 input tensors and 2 dimension specs`\r\n\r\nI then removed the `Optional` annotation and just pass in `None` or the actual tensor for `y`. When `None` is passed in, I got the error: `RuntimeError: forward() Expected a value of type 'Tensor' for argument 'input_1' but instead found type 'NoneType'.`\r\n\r\nI also tried passing in just 1 argument for `x`, and got:\r\n`RuntimeError: forward() is missing value for argument 'input_1'` \r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.10.0+cu113\r\n - CPU Architecture: \r\n - OS (e.g., Linux): Ubuntu 18.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): `pip`\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.7.11\r\n - CUDA version: 11.1\r\n - GPU models and configuration: Tesla V100 with 32GB memory\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/772",
    "state": "closed",
    "labels": [
      "question",
      "component: core",
      "No Activity"
    ],
    "created_at": "2021-12-14T22:14:55Z",
    "updated_at": "2023-02-27T00:02:28Z",
    "user": "lhai37"
  },
  {
    "repo": "pytorch/data",
    "number": 132,
    "title": "[TODO] can this also have a timeout?",
    "body": "\nThis issue is generated from the TODO line\nhttps://github.com/pytorch/data/blob/f102d25f9f444de3380c6d49bf7aaf52c213bb1f/build/lib/torchdata/datapipes/iter/load/online.py#L113\n\n    ",
    "url": "https://github.com/meta-pytorch/data/issues/132",
    "state": "closed",
    "labels": [
      "todo"
    ],
    "created_at": "2021-12-10T20:09:55Z",
    "updated_at": "2022-01-07T21:29:12Z",
    "comments": 0,
    "user": "VitalyFedyunin"
  },
  {
    "repo": "pytorch/tensorpipe",
    "number": 417,
    "title": "how to install pytensorpipe",
    "body": "I built tensorpipe with ninja and try to build python package running `python setup.py`, it tells me:\r\n```\r\nmake: *** No rule to make target 'pytensorpipe'. Stop.\r\n```",
    "url": "https://github.com/pytorch/tensorpipe/issues/417",
    "state": "closed",
    "labels": [],
    "created_at": "2021-12-10T14:21:30Z",
    "updated_at": "2021-12-10T14:27:30Z",
    "user": "eedalong"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 771,
    "title": "\u2753 [Question] Get no indications on the exact code that cause errors?",
    "body": "## \u2753 Question\r\nHi, thanks for making this amazing tool! I met some errors when converting my model. However, for some of the errors, there is only information about unsupported operators without any indication of the exact code that causes the errors.\r\n\r\nWhy does this happen and are there any potential solutions?\r\n\r\n\r\n![Screen Shot 2021-12-10 at 9 16 32 PM](https://user-images.githubusercontent.com/25219214/145579919-24e5a34a-1287-48f3-8a54-2e9696ec2478.png)\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/771",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-12-10T13:22:59Z",
    "updated_at": "2022-04-01T00:02:18Z",
    "user": "DeriZSY"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 767,
    "title": "\u2753 [Question] Handling non-tensor input of module",
    "body": "## \u2753 Question\r\nCan `torch_tensorrt.compile` handle non-tensor input of the module (for example boolean and integer)? How should I do it?",
    "url": "https://github.com/pytorch/TensorRT/issues/767",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-12-09T09:46:12Z",
    "updated_at": "2022-04-01T00:02:18Z",
    "user": "DeriZSY"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 69610,
    "title": "[Question] How to extract/expose the complete PyTorch computation graph (forward and backward)?",
    "body": "How to extract the complete computation graph PyTorch  generates?\r\n\r\nHere is my understanding:\r\n1. The forward graph can be generated by `jit.trace` or `jit.script`\r\n2. The backward graph is created from scratch each time `loss.backward()` is invoked in the training loop.\r\n\r\nI am attempting to lower the computation graph generated by PyTorch into GLOW manually for some custom downstream optimization. I am not able to extract the complete computation graph at the framework level (forward AND backward).\r\n\r\nAny help or guidance in this regard is greatly appreciated.\n\ncc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7",
    "url": "https://github.com/pytorch/pytorch/issues/69610",
    "state": "open",
    "labels": [
      "module: autograd",
      "triaged",
      "oncall: visualization"
    ],
    "created_at": "2021-12-08T14:37:00Z",
    "updated_at": "2025-12-24T06:43:52Z",
    "user": "anubane"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 765,
    "title": "\u2753 [Question] Sometimes inference time is too slow.. ",
    "body": "## \u2753 Question\r\n\r\nThank you for this nice project,  I successfully converted [my model](https://github.com/sejong-rcv/MLPD-Multi-Label-Pedestrian-Detection), which feeds multispectral images, using Torch-TensorRT as below. \r\n\r\n```\r\n    model = torch.load(model_path)['model']\r\n    model = model.to(device)\r\n    model.eval()\r\n\r\n    \r\n    scripted_model = torch.jit.script(model)\r\n    \r\n    # For static size shape=[1, 3, 224, 224]\r\n    \r\n    compile_settings = {\r\n        \"inputs\": [torch_tensorrt.Input(\r\n            min_shape=[1, 3, 512, 640],\r\n            opt_shape=[1, 3, 512, 640],\r\n            max_shape=[1, 3, 512, 640],\r\n            dtype=torch.half),\r\n            torch_tensorrt.Input(\r\n            min_shape=[1, 1, 512, 640],\r\n            opt_shape=[1, 1, 512, 640],\r\n            max_shape=[1, 1, 512, 640],\r\n            dtype=torch.half\r\n        )],\r\n        \"enabled_precisions\": {torch.half}  # Run with FP16\r\n    }\r\n    \r\n    trt_ts_module = torch_tensorrt.ts.compile(scripted_model, **compile_settings)\r\n    \r\n    fake_vis_fp16 = torch.ones((1, 3, 512, 640)).half().cuda()\r\n    fake_lwir_fp16 = torch.ones((1, 1, 512, 640)).half().cuda()\r\n    \r\n    fake_vis_fp32 = torch.ones((1, 3, 512, 640)).float().cuda()\r\n    fake_lwir_fp32 = torch.ones((1, 1, 512, 640)).float().cuda()\r\n        \r\n    torch.jit.save(trt_ts_module, \"MLPD_trt_torchscript_module.ts\") # save the TRT embedded Torchscript\r\n```\r\n\r\nThen, I tested the inference time of the model. I found that sometimes it is too slow as below.\r\n\r\n![image](https://user-images.githubusercontent.com/44772344/145186650-619a5883-07d7-4134-b33b-b735ee4f80cd.png)\r\n\r\nHow can i solve this problem..? Performance(Miss-rate) of converted model is the same as performance of original model.\r\n\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 3.7\r\n - OS (e.g., Linux): Linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): conda\r\n - Python version: 3.8.12\r\n - CPU Architecture:\r\n - CUDA version: 11.4\r\n - GPU models and configuration: 2080Ti\r\n - Any other relevant information: I used docker image\r\n\r\n## Additional context\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/765",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-12-08T09:57:32Z",
    "updated_at": "2022-04-01T00:02:19Z",
    "user": "socome"
  },
  {
    "repo": "pytorch/vision",
    "number": 5045,
    "title": "[Discussion] How do we want to handle `torchvision.prototype.features.Feature`'s?",
    "body": "This issue should spark a discussion about how we want to handle `Feature`'s in the future. There are a lot of open questions I'm trying to summarize. I'll give my opinion to each of them. You can find the current implementation under `torchvision.prototype.features`.\r\n\r\n## What are `Feature`'s?\r\n\r\n`Feature`'s are subclasses of `torch.Tensor` and their purpose is threefold:\r\n\r\n1. With their type, e.g. `Image`, they information about the data they carry. The prototype transformations (`torchvision.prototype.transforms`) use this information to automatically dispatch an input to the correct kernel.\r\n2. They can optionally carry additional meta data that might be needed for transforming the feature. For example, most geometric transformations can only be performed on bounding boxes if the size of the corresponding image is known.\r\n3. They provide a convenient interface for feature specific functionality, for example transforming the format of a bounding box.\r\n\r\nThere are currently three `Feature`'s implemented\r\n\r\n- `Image`,\r\n- `BoundingBox`, and\r\n- `Label`,\r\n\r\nbut in the future we should add at least three more:\r\n\r\n- `SemanticSegmentationMask`,\r\n- `InstanceSegementationMask`, and\r\n- `Video`.\r\n\r\n## What is the policy of adding new `Feature`'s?\r\n\r\nWe could allow subclassing of `Feature`'s. On the one hand, this would make it easier for datasets to conveniently bundle meta data. For example, the COCO dataset could return a `CocoLabel`, which in addition to the default `Label.category` could also have the `super_category` field. On the other hand, this would also mean that the transforms need to handle subclasses of features well, for example a `CocoLabel` could be treated the same as a `Label`.\r\n\r\nI see two downsides with that:\r\n\r\n1. What if a transform needs the additional meta data carried by a feature subclass? Imagine I've added a special transformation that needs `CocoLabel.super_category`. Although from the surface this now supports plain `Label`'s this will fail at runtime.\r\n2. Documentation custom features is more complicated than documenting a separate field in the sample dictionary of a dataset.\r\n\r\nThus, I'm leaning towards only having a few base classes.\r\n\r\n## From what data should a `Feature` be instantiable?\r\n\r\nSome of the features like `Image` or `Video` have non-tensor objects that carry the data. Should these features know how to handle them? For example should something like `Image(PIL.Image.open(...))` work?\r\n\r\nMy vote is out for yes. IMO this is very convenient and also not an unexpected semantic compared to passing the data directly, e.g. `Image(torch.rand(3, 256, 256))`\r\n\r\n## Should `Feature`'s have a fixed shape?\r\n\r\nConsider the following table:\r\n\r\n| `Feature`                   | `.shape`                      |\r\n|-----------------------------|-------------------------------|\r\n| `Image`                     | `(*, C, H, W)`                |\r\n| `Label`                     | `(*)`                         |\r\n| `BoundingBox`               | `(*, 4)`                      |\r\n| `SemanticSegmentationMask`  | `(*, H, W)` or `(*, C, H, W)` |\r\n| `InstanceSegementationMask` | `(*, N, H, W)`                |\r\n| `Video`                     | `(*, T, C, H, W)`             |\r\n\r\n(For `SemanticSegmentationMask` I'm not sure about the shape yet. Having an extra channel dimension makes the tensor unnecessarily large, but it aligns well with segmentation image files, which are usually stored as RGB)\r\n\r\nShould we fix the shape to a single feature, i.e. remove the `*` from the table above, or should we only care about the shape in the last dimensions to be correct?\r\n\r\nMy vote is out for having a flexible shape, since otherwise batching is not possible. For example, if we fix bounding boxes to shape `(4,)` a transformation would need to transform `N` bounding boxes individually, while for shape `(N, 4)` it could make use of parallelism.\r\n\r\nOn the same note, if we go for the flexible shape, do we keep the singular name of the feature? For example, do we regard a batch of images with shape `(B, C, H, W)` still as `Image` or should we go for the plural `Images` in general? My vote is out for always keeping the singular, since I've often seen something like:\r\n\r\n```python\r\nfor image, target in data_loader(dataset, batch_size=4):\r\n    ...\r\n```\r\n\r\n## Should `Feature`'s have a fixed dtype?\r\n\r\nThis makes sense for `InstanceSegementationMask` which should always be `torch.bool`. For all the other features I'm unsure. My gut says to use a default dtype, but also allow other dtypes.\r\n\r\n## What meta data should `Feature`'s carry?\r\n\r\nIMO, this really depends on the decision above about the fixed / flexible shapes. If we go for fixed shapes, it can basically carry any information. If we go for flexible shapes instead, we should only have meta data, which is the same for batched features. For example, `BoundingBox.image_size` is fine, but `Label.category` is not.\r\n\r\n## What methods should `Feature`'s provide?\r\n\r\nFor now I've only in",
    "url": "https://github.com/pytorch/vision/issues/5045",
    "state": "open",
    "labels": [
      "needs discussion",
      "prototype"
    ],
    "created_at": "2021-12-07T13:17:58Z",
    "updated_at": "2022-02-11T11:42:36Z",
    "user": "pmeier"
  },
  {
    "repo": "pytorch/data",
    "number": 113,
    "title": "datapipe serialization support / cloudpickle / parallel support",
    "body": "I've been looking at how we might go about supporting torchdata within TorchX and with components. I was wondering what the serialization options were for transforms and what that might look like.\r\n\r\nThere's a couple of common patterns that would be nice to support:\r\n\r\n* general data transforms (with potentially distributed preprocessing via torch elastic/ddp)\r\n* data splitting into train/validation sets\r\n* summary statistic computation\r\n\r\nFor the general transforms and handling arbitrary user data we were wondering how we might go about serializing the data pipes and transforms for use in a pipeline with TorchX. \r\n\r\nThere's a couple of options here:\r\n\r\n1. add serialization support to the transforms so you can serialize them (lambdas?)\r\n1. generate a .py file from a provided user function\r\n1. pickle the transform using something like cloudpickle/torch.package and load it in a trainer app\r\n1. ask the user to write a .py file that uses the datapipes as the transform and create a TorchX component (what we currently have)\r\n\r\nHas there been any thought about how to support this well? Is there extra work that should be done here to make this better?\r\n\r\nAre DataPipes guaranteed to be pickle safe and is there anything that needs to be done to support that?\r\n\r\nI was also wondering if there's multiprocessing based datapipes and how that works since this seems comparable. I did see https://github.com/pytorch/pytorch/blob/master/torch/utils/data/distributed.py but didn't see any examples on how to use that to achieve a traditional PyTorch dataloader style workers.\r\n\r\nP.S. should this be on the pytorch discussion forums instead? it's half feature request half questions so wasn't sure where best to put it\r\n\r\ncc @kiukchung ",
    "url": "https://github.com/meta-pytorch/data/issues/113",
    "state": "open",
    "labels": [],
    "created_at": "2021-12-04T00:46:36Z",
    "updated_at": "2022-12-09T15:34:39Z",
    "comments": 7,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 761,
    "title": "can i server my model with triton inference server",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture:\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/761",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-12-03T14:10:51Z",
    "updated_at": "2024-09-12T16:27:05Z",
    "user": "leo-XUKANG"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 69352,
    "title": "I want to know how to read the LMDB file once when using DDP",
    "body": "Hi, I meet a question. I have an LMDB dataset of about 50G. My machine has 100G memory and 8 V100 GPUs of 32GB.\r\nthe format of My dataset is like:\r\n\r\n```\r\nclass MyDataset(Dataset):\r\n    def __init__(self, img_lmdb_dir) -> None:\r\n        super().__init__()\r\n        self.env = lmdb.open(    # open LMDB dataset\r\n            img_lmdb_dir, readonly=True,\r\n            create=False)  \r\n        self.txn = self.env.begin(buffers=True)\r\n    def __len__(self) -> int:\r\n        raise NotImplemented\r\n    def __getitem__(self, index: int):\r\n        ...\r\n         return ...\r\n```\r\n\r\nAs you can see, I open an LMDB dataset at the \"init\" method. However, if I use 8 GPUs. The each process will build this dataset and open LMDB dataset 8 times.  One LMDB need 50G, so 8 LMDB needs 400G, which is more than my machine's memory.\r\n\r\nSo, I want to know how to use the LMDB file to accelerate to load training data and meanwhile total memory cost is lower than in my environment.\n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang",
    "url": "https://github.com/pytorch/pytorch/issues/69352",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "module: dataloader"
    ],
    "created_at": "2021-12-03T07:34:16Z",
    "updated_at": "2022-12-29T14:32:17Z",
    "user": "shoutOutYangJie"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 69283,
    "title": "how to get required arguments name in forward",
    "body": "I want to get the required arguments name in different model's forward, removing optional arguments. I used python inspect, but got all inputs' name. I have no idea to deal it. please help",
    "url": "https://github.com/pytorch/pytorch/issues/69283",
    "state": "closed",
    "labels": [],
    "created_at": "2021-12-02T08:14:49Z",
    "updated_at": "2021-12-02T17:47:53Z",
    "user": "TXacs"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 69204,
    "title": "How to assign tensor to tensor",
    "body": "I have a 3D tensor J, and I want to assign values to it. Below is my code\r\n```\r\nimport torch\r\nJ = torch.eye(2).unsqueeze(0).expand(5, 2, 2)\r\nfor i in range(2):\r\n    J[:, i, :] = torch.randn([5, 2])\r\n```\r\nThen there is an error: unsupported operation: more than one element of the written-to tensor refers to a single memory location. Please clone() the tensor before performing the operation.",
    "url": "https://github.com/pytorch/pytorch/issues/69204",
    "state": "closed",
    "labels": [],
    "created_at": "2021-12-01T10:45:06Z",
    "updated_at": "2021-12-01T20:33:43Z",
    "user": "LeZhengThu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 69070,
    "title": "how to compute the real Jacobian matrix using autograd tool",
    "body": "I want to compute the real Jacobian matrix instead of the vector-Jacobian product. For example, I have \r\n```f=(f1, f2, f3), f1=x1^2+2*x2+x3, f2=x1+x2^3+x3^2, f3=2*x1+x2^2+x3^3```\r\nThen the Jacobian is ```J=[2*x1, 2, 1; 1, 3*x2^2, 2*x3; 2, 2*x2, 3*x3^2] ```\r\nBut backward() or grad() only gives the vector-Jacobian product. The following is my test code\r\n```\r\nimport torch\r\nimport numpy as np\r\nx = torch.tensor(np.array([[1,2,3]]), requires_grad=True, dtype=torch.float)\r\ny = torch.randn(3) \r\ny[0] = x[0][0]**2+2*x[0][1]+x[0][2]\r\ny[1] = x[0][0]+x[0][1]**3+x[0][2]**2\r\ny[2] = 2*x[0][0]+x[0][1]**2+x[0][2]**3\r\ntorch.autograd.grad(y, x, torch.ones_like(y))\r\n```\r\nThe result is tensor([[5,18,34]]). This is the result of J*[1;1;1] since I put torch.ones_like(y) in the code. Of course, I can use [1,0,0] to get each element of J, but that is too slow. Do we have any faster way to achieve this?\r\n\r\nBTW, when I try to replace torch.ones_like(y) with torch.eye(y.shape[0]), an error occurs: Mismatch in shape: grad_output[0] has a shape of torch.Size([3, 3]) and output[0] has a shape of torch.Size([3]).\r\n\r\n\r\n\r\n\r\n\r\n\n\ncc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7",
    "url": "https://github.com/pytorch/pytorch/issues/69070",
    "state": "closed",
    "labels": [
      "module: autograd",
      "triaged"
    ],
    "created_at": "2021-11-30T10:05:01Z",
    "updated_at": "2021-12-01T19:44:55Z",
    "user": "LeZhengThu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 69068,
    "title": "how to build libtorch without mkl?",
    "body": "## \u2753 Questions and Help\r\n\r\nI download the libtorch(CPU) 1.3.0 from [pytorch](https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.3.0%2Bcpu.zip)\uff0c The dependency library is follow:\r\n\r\n![image](https://user-images.githubusercontent.com/20365125/144023701-6631a8b0-f547-476a-b9ce-a8322c9de41c.png)\r\n\r\nBut the library is not available in my environment due to the gcc version is 4.8.5\uff0c so I builded it from pytorch source and the dependency library is follow:\r\n \r\n![image](https://user-images.githubusercontent.com/20365125/144024436-eba078c3-a7de-4367-a17e-217278e417ed.png)\r\n\r\n```\r\nexport BLAS=Eigen\r\nexport USE_CUDA=False\r\nexport BUILD_TEST=False\r\nexport USE_NINJA=OFF\r\nexport BUILD_CAFFE2_MOBILE=OFF\r\nexport BUILD_CAFFE2_OPS=OFF\r\nexport USE_MKL=OFF\r\nexport USE_MKLDNN=OFF\r\n```\r\n\r\nFor some reason, I want not to depended on mkl, so how to build libtorch without mkl?\r\n\r\n\r\n\n\ncc @malfet @seemethere",
    "url": "https://github.com/pytorch/pytorch/issues/69068",
    "state": "closed",
    "labels": [
      "module: build",
      "triaged"
    ],
    "created_at": "2021-11-30T09:52:16Z",
    "updated_at": "2021-12-01T02:26:05Z",
    "user": "zhoujinhai"
  },
  {
    "repo": "pytorch/serve",
    "number": 1347,
    "title": "how to use body in json format to predict",
    "body": "## \ud83d\udcda Documentation\r\n\r\ni have a model named greedy as a demo, and use baseHander \r\n\r\ni can't find the doc to deal with input of predictions api\r\n\r\nexamples all use the file to predict, can i use body for application/json format to predict\r\n\r\nand this is the curl \r\n```bash\r\ncurl --location --request POST 'http://localhost:6080/predictions/greedy' \\\r\n--header 'Content-Type: application/json' \\\r\n--data-raw '{\r\n    \"model_name\": \"greedy\",\r\n    \"model_version \": 1.0,\r\n    \"input\": {\r\n        \"data\": [\r\n            1,\r\n            2,\r\n            3\r\n        ]\r\n    }\r\n}'\r\n```",
    "url": "https://github.com/pytorch/serve/issues/1347",
    "state": "closed",
    "labels": [],
    "created_at": "2021-11-26T14:36:43Z",
    "updated_at": "2021-11-26T16:00:39Z",
    "user": "SpringTY"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 744,
    "title": "how to  convert   the  pytorch quantized  model  to  trt model ?",
    "body": "I   use   the    pytorch   qat   method  to  train   the   model  and   save    the    quantized  model ( int8 ) .\r\nBut  when  I  use  torch_tensorrt.ts.compile  interface  to  convert  the  int8   model  to   trt ,  errors  happen, such  as  \"ERROR: [Torch-TensorRT] - **Unsupported operator: quantized::linear**\" , \"**Unsupported operator: quantized::conv2d.new**\" , and  so on.\r\n\r\n Dose the  torch_tensorrt.ts.compile  support   pytorch     quantized    model? how  to  solve   the   problem?\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/744",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-11-26T11:11:00Z",
    "updated_at": "2022-03-13T00:02:19Z",
    "user": "jiinhui"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 68925,
    "title": "How to implement `bucket_by_sequence_length` with IterableDataset and DataLoader",
    "body": "## How to implement `bucket_by_sequence_length` with IterableDataset and DataLoader?\r\n\r\nI have a custom **IterableDataset** for question answering, which reads training data from a huge file. And I want to bucket the tranining exampels by their sequence length, like `tf.data.Dataset.bucket_by_sequence_length`.\r\n\r\nAny documents or tutorials about this?\r\n\n\ncc @SsnL @VitalyFedyunin @ejguan @NivekT",
    "url": "https://github.com/pytorch/pytorch/issues/68925",
    "state": "open",
    "labels": [
      "module: dataloader",
      "triaged",
      "module: data"
    ],
    "created_at": "2021-11-26T03:06:17Z",
    "updated_at": "2021-11-30T15:32:48Z",
    "user": "luozhouyang"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 740,
    "title": "What's the difference compared to native tensort sdk?",
    "body": "I used to convert a pytorch model to onnx format,and try to run it using native TensorRT SDK,but I failed for some operators in model is not supported by trt sdk; So if I use Torch-TensorRT to run the model, will I still have the same problem? Is there any more operators added compared to the native trt sdk?\r\n    \r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/740",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-11-23T08:09:14Z",
    "updated_at": "2021-11-29T20:14:45Z",
    "user": "pango99"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 213,
    "title": "how to converto torchscript_int8@tracing file to pt file?",
    "body": "i have a custom model file,ie model.jit,how can i convert to d2go.pt?",
    "url": "https://github.com/pytorch/android-demo-app/issues/213",
    "state": "closed",
    "labels": [],
    "created_at": "2021-11-23T03:34:57Z",
    "updated_at": "2022-06-29T08:42:41Z",
    "user": "cloveropen"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 68729,
    "title": "How to specify the backends when running on CPU",
    "body": "## \u2753 Questions and Help\r\n\r\n### How to specify the backends when running on CPU.\r\n\r\nHi, I noticed that there are multiple backends available on CPU in pytorch: mkl, mkldnn, openmp. \r\nHow do I know which backend pytorch is using in current model and can I specify the backend?\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/68729",
    "state": "closed",
    "labels": [],
    "created_at": "2021-11-22T13:54:35Z",
    "updated_at": "2021-11-22T18:53:55Z",
    "user": "zheng-ningxin"
  },
  {
    "repo": "huggingface/transformers",
    "number": 14482,
    "title": "where can I find the dataset bert-base-chinese is pretrained on?",
    "body": "",
    "url": "https://github.com/huggingface/transformers/issues/14482",
    "state": "closed",
    "labels": [],
    "created_at": "2021-11-22T09:22:51Z",
    "updated_at": "2021-12-30T15:02:07Z",
    "user": "BoomSky0416"
  },
  {
    "repo": "pytorch/xla",
    "number": 3221,
    "title": "[Question] How to do deterministic training on GPUs.",
    "body": "## \u2753 Questions and Help\r\nHi, I'm testing torch xla on GPU. The script used is based on the test_train_mp_mnist.py. I changed the data input to be consistent for all workers (use the same dataset, no distributed sampler, turn off shuffle), don't adjust the learning rate, adding deterministic functions, andd adding logic to run with torch native.\r\n\r\nThe loss trends of the standalone torch xla and torch native are mostly aligned, although not bitwise, but given the nature of floating point calculations, the results are mostly satisfactory.\r\n\r\nHowever, I noticed a rather strange behavior, as the torch native results are consistent for each round of the run with two cards, even with the single card bitwise. However, the loss of torch xla with two cards kept changing, and with XLA_SYNC_WAIT on, the consistent results with torch xla standalone was gotten (I'm not sure if it's always that).\r\n\r\nI would like to know why, is there something wrong with my code? Thanks!\r\n\r\n## code\r\n\r\n```\r\nimport args_parse\r\n\r\nFLAGS = args_parse.parse_common_options(\r\n    datadir=\"/tmp/mnist-data\",\r\n    batch_size=128,\r\n    momentum=0.5,\r\n    lr=0.01,\r\n    target_accuracy=98.0,\r\n    num_epochs=18,\r\n)\r\n\r\nimport os\r\nimport shutil\r\nimport sys\r\nimport numpy as np\r\nimport torch\r\nimport random\r\nimport numpy as np\r\nfrom torch.nn.parallel import DistributedDataParallel as DDP\r\nimport torch.distributed as dist\r\n\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport torch.optim as optim\r\nfrom torchvision import datasets, transforms\r\nimport torch_xla\r\nimport torch_xla.debug.metrics as met\r\nimport torch_xla.distributed.parallel_loader as pl\r\nimport torch_xla.utils.utils as xu\r\nimport torch_xla.core.xla_model as xm\r\nimport torch_xla.distributed.xla_multiprocessing as xmp\r\nimport torch_xla.test.test_utils as test_utils\r\n\r\ndef set_deterministic(seed=101):\r\n    torch.manual_seed(seed)\r\n    random.seed(seed)\r\n    np.random.seed(seed)\r\n    torch.use_deterministic_algorithms(True)\r\n    torch.backends.cudnn.deterministic = True\r\n    torch.backends.cudnn.benchmark = False\r\n    os.environ['CUBLAS_WORKSPACE_CONFIG']=':4096:8'\r\n    os.environ['TF_CUDNN_DETERMINISTIC']='1'\r\n    os.environ['TF_DETERMINISTIC_OPS']='1'\r\n    xm.set_rng_state(seed)\r\n    torch_xla._XLAC._xla_set_use_full_mat_mul_precision(\r\n        use_full_mat_mul_precision=True)\r\n\r\n\r\nclass MNIST(nn.Module):\r\n    def __init__(self):\r\n        super(MNIST, self).__init__()\r\n        self.conv1 = nn.Conv2d(1, 10, kernel_size=5)\r\n        self.bn1 = nn.BatchNorm2d(10)\r\n        self.conv2 = nn.Conv2d(10, 20, kernel_size=5)\r\n        self.bn2 = nn.BatchNorm2d(20)\r\n        self.fc1 = nn.Linear(320, 50)\r\n        self.fc2 = nn.Linear(50, 10)\r\n\r\n    def forward(self, x):\r\n        x = F.relu(F.max_pool2d(self.conv1(x), 2))\r\n        x = self.bn1(x)\r\n        x = F.relu(F.max_pool2d(self.conv2(x), 2))\r\n        x = self.bn2(x)\r\n        x = torch.flatten(x, 1)\r\n        x = F.relu(self.fc1(x))\r\n        x = self.fc2(x)\r\n        return F.log_softmax(x, dim=1)\r\n\r\n\r\ndef _train_update(device, x, loss, tracker, writer):\r\n    test_utils.print_training_update(\r\n        device, x, loss.item(), tracker.rate(), tracker.global_rate(), summary_writer=writer\r\n    )\r\n\r\n\r\ndef train_mnist(flags, **kwargs):\r\n\r\n    if flags.fake_data:\r\n        train_loader = xu.SampleGenerator(\r\n            data=(\r\n                torch.zeros(flags.batch_size, 1, 28, 28),\r\n                torch.zeros(flags.batch_size, dtype=torch.int64),\r\n            ),\r\n            sample_count=60000 // flags.batch_size // xm.xrt_world_size(),\r\n        )\r\n        test_loader = xu.SampleGenerator(\r\n            data=(\r\n                torch.zeros(flags.batch_size, 1, 28, 28),\r\n                torch.zeros(flags.batch_size, dtype=torch.int64),\r\n            ),\r\n            sample_count=10000 // flags.batch_size // xm.xrt_world_size(),\r\n        )\r\n    else:\r\n        train_dataset = datasets.MNIST(\r\n            os.path.join(flags.datadir, str(xm.get_ordinal())),\r\n            train=True,\r\n            download=True,\r\n            transform=transforms.Compose(\r\n                [transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,))]\r\n            ),\r\n        )\r\n        test_dataset = datasets.MNIST(\r\n            os.path.join(flags.datadir, str(xm.get_ordinal())),\r\n            train=False,\r\n            download=True,\r\n            transform=transforms.Compose(\r\n                [transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,))]\r\n            ),\r\n        )\r\n        train_sampler = None\r\n\r\n        train_loader = torch.utils.data.DataLoader(\r\n            train_dataset,\r\n            batch_size=flags.batch_size,\r\n            sampler=train_sampler,\r\n            drop_last=flags.drop_last,\r\n            shuffle=False,\r\n            num_workers=flags.num_workers,\r\n        )\r\n\r\n        test_loader = torch.utils.data.DataLoader(\r\n            test_dataset,\r\n            batch_size=flags.batch_size,\r\n            drop_last=flags.drop_last,\r\n            shuffle=False",
    "url": "https://github.com/pytorch/xla/issues/3221",
    "state": "closed",
    "labels": [
      "stale",
      "xla:gpu"
    ],
    "created_at": "2021-11-22T09:16:11Z",
    "updated_at": "2022-04-28T00:10:33Z",
    "user": "cicirori"
  },
  {
    "repo": "pytorch/hub",
    "number": 254,
    "title": "How to use hub if don't have network?",
    "body": "Downloading: \"https://github.com/ultralytics/yolov5/archive/master.zip\" to /root/.cache/torch/hub/master.zip\r\nI always stop in last line.\r\nIs there anyway to use hub offline.",
    "url": "https://github.com/pytorch/hub/issues/254",
    "state": "closed",
    "labels": [],
    "created_at": "2021-11-22T08:44:47Z",
    "updated_at": "2021-11-22T09:40:01Z",
    "user": "Skypow2012"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1747,
    "title": "Is it possible to perform partial conversion of a pytorch model to ONNX?",
    "body": "I have the following VAE model in pytorch that I would like to convert to ONNX (and eventually to TensorFlow):\r\nhttps://github.com/jlalvis/VAE_SGD/blob/master/VAE/autoencoder_in.py\r\n\r\nI am only interested in the decoding part of the model. Is it possible to convert only the decoder to ONNX?\r\n\r\nThanks in advance :)\n\ncc @BowenBao",
    "url": "https://github.com/pytorch/tutorials/issues/1747",
    "state": "closed",
    "labels": [
      "question",
      "onnx"
    ],
    "created_at": "2021-11-19T10:49:56Z",
    "updated_at": "2023-03-07T17:36:34Z",
    "user": "ShiLevy"
  },
  {
    "repo": "pytorch/functorch",
    "number": 280,
    "title": "How to update the original model parameters after calling make_functional?",
    "body": "As per the title, I find that updating the tensors pointed by the `params` returned by `make_functional` does not update the real parameters in the original model.\r\nIs there a way to do this? I find that it would be extremely useful to implement optimization algorithms in a way that is more similar to their mathematical description.\r\n\r\nTo provide more context I add an example script of what standard Gradient Descent should look like in this way:\r\n```python\r\nimport torch\r\nfrom torch import nn\r\nfrom functorch import make_functional\r\n\r\nlearning_rate = 0.1\r\n\r\ndef optstep(params, jacobians):\r\n    with torch.no_grad():\r\n        for i, param in enumerate(params):\r\n            param.add_(jacobians[i], alpha=-learning_rate)\r\n\r\nif __name__ == '__main__':\r\n    model = nn.Linear(3, 5)\r\n    x, targets = torch.randn(2, 3), torch.randn(2, 5)\r\n    criterion = nn.MSELoss()\r\n\r\n    print(\"INITIAL LOSS:\", criterion(model(x), targets).item())\r\n    # Render the model functional and compute the jacobian                                                           \r\n    func_model, params = make_functional(model)\r\n    def f(*params):\r\n        out = func_model(params, x)\r\n        return criterion(out, targets)\r\n    jacobian = torch.autograd.functional.jacobian(f, params)\r\n\r\n    # Ideally would train on the current input                                                                       \r\n    optstep(params, jacobian)\r\n    # Now compute the new loss                                                                                       \r\n    print(\"NEW LOSS:\", criterion(model(x), targets).item())\r\n```\r\n\r\nExecuting the script shows that the parameters are not updated since the loss doesn't change\r\n```\r\nINITIAL LOSS: 1.2894147634506226\r\nNEW LOSS: 1.2894147634506226\r\n```",
    "url": "https://github.com/pytorch/functorch/issues/280",
    "state": "open",
    "labels": [
      "actionable"
    ],
    "created_at": "2021-11-19T08:54:25Z",
    "updated_at": "2022-04-13T22:32:19Z",
    "user": "trenta3"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 733,
    "title": "Unable to use any Torch-TensorRT methods",
    "body": "I'm facing this error: \r\n\r\n> AttributeError: module 'torch_tensorrt' has no attribute 'compile'\r\n\r\nI also get this error when I try to use any other method like Input().\r\n\r\nThis is how I installed Torch-TensorRT: \r\n`pip install torch-tensorrt -f github.com/NVIDIA/Torch-TensorRT/releases`\r\n\r\nCode (from official documentation):\r\n```\r\nimport torch_tensorrt\r\n\r\nmodel = model.eval()\r\ncompile_settings = {\r\n    \"input_shapes\": [\r\n        {\r\n            \"min\": [1, 1, 16, 16],\r\n            \"opt\": [1, 1, 32, 32],\r\n            \"max\": [1, 1, 64, 64]\r\n        },\r\n    ],\r\n    \"op_precision\": torch.half # Run with fp16\r\n}\r\nenabled_precisions = {torch.float, torch.half}\r\n\r\ntrt_ts_module = torch_tensorrt.compile(model, inputs=compile_settings, enabled_precisions=enabled_precisions) \r\n```\r\n\r\nStack Trace:\r\n```\r\nAttributeError                            Traceback (most recent call last)\r\n<command-3167120371910218> in <module>\r\n     14 enabled_precisions = {torch.float, torch.half}\r\n     15 \r\n---> 16 trt_ts_module = torch_tensorrt.compile(model, inputs=compile_settings, enabled_precisions=enabled_precisions)\r\n\r\nAttributeError: module 'torch_tensorrt' has no attribute 'compile'\r\n```\r\n\r\nPlease let me know how I can fix this issue.",
    "url": "https://github.com/pytorch/TensorRT/issues/733",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "channel: windows"
    ],
    "created_at": "2021-11-18T20:40:58Z",
    "updated_at": "2022-10-27T13:01:48Z",
    "user": "Arjunp24"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 732,
    "title": "\u2753 [Question] More average batch time for torch-tensorrt compiled model than torchscript model (fp32 mode).",
    "body": "## \u2753 Question\r\nI am comparing the performances of the torchscript model and the torch-tensorrt compiled model, when I am running in float32 mode, the average batch time is more for torch-tensorrt model. Is this expected?1. I am running the below code to compare torchscript model and torch-tensorrt compiled models, \r\n\r\n```\r\nclass LeNetFeatExtractor(nn.Module):\r\n    def __init__(self):\r\n        super(LeNetFeatExtractor, self).__init__()\r\n        self.conv1 = nn.Conv2d(1, 128, 3)\r\n        self.conv2 = nn.Conv2d(128, 16, 3)\r\n\r\n    def forward(self, x):\r\n        x = F.max_pool2d(F.relu(self.conv1(x)), (2, 2))\r\n        x = F.max_pool2d(F.relu(self.conv2(x)), 2)\r\n        return x\r\n\r\nclass LeNetClassifier(nn.Module):\r\n    def __init__(self):\r\n        super(LeNetClassifier, self).__init__()\r\n        self.fc1 = nn.Linear(16 * 6 * 6, 120)\r\n        self.fc2 = nn.Linear(120, 84)\r\n        self.fc3 = nn.Linear(84, 10)\r\n\r\n    def forward(self, x):\r\n        x = torch.flatten(x,1)\r\n        x = F.relu(self.fc1(x))\r\n        x = F.relu(self.fc2(x))\r\n        x = self.fc3(x)\r\n        return x\r\n\r\nclass LeNet(nn.Module):\r\n    def __init__(self):\r\n        super(LeNet, self).__init__()\r\n        self.feat = LeNetFeatExtractor()\r\n        self.classifer = LeNetClassifier()\r\n\r\n    def forward(self, x):\r\n        x = self.feat(x)\r\n        x = self.classifer(x)\r\n        return x\r\n\r\ndef benchmark(model, input_shape=(1024, 1, 32, 32), dtype='fp32', nwarmup=50, nruns=100):\r\n    input_data = torch.randn(input_shape)\r\n    input_data = input_data.to(\"cuda\")\r\n    if dtype=='fp16':\r\n        input_data = input_data.half()\r\n        \r\n    print(\"Warm up ...\")\r\n    with torch.no_grad():\r\n        for _ in range(nwarmup):\r\n            features = model(input_data)\r\n    torch.cuda.synchronize()\r\n    print(\"Start timing ...\")\r\n    timings = []\r\n    with torch.no_grad():\r\n        for i in range(1, nruns+1):\r\n            start_time = time.time()\r\n            features = model(input_data)\r\n            torch.cuda.synchronize()\r\n            end_time = time.time()\r\n            timings.append(end_time - start_time)\r\n            if i%100==0:\r\n                print('Iteration %d/%d, ave batch time %.2f ms'%(i, nruns, np.mean(timings)*1000))\r\n\r\n    print(\"Input shape:\", input_data.size())\r\n    print(\"Output features size:\", features.size())\r\n    \r\n    print('Average batch time: %.2f ms'%(np.mean(timings)*1000))\r\n    \r\nmodel = LeNet()\r\nmodel.to(\"cuda\").eval()\r\nbenchmark(model, dtype=\"fp32\")\r\ninpt = torch.empty([1,1,32,32]).to(\"cuda\")\r\ntraced_model = torch.jit.trace(model, inpt)\r\nbenchmark(traced_model, dtype=\"fp32\")\r\nscript_model = torch.jit.script(model)\r\nbenchmark(script_model, dtype=\"fp32\")\r\n\r\ncompile_settings = {\r\n    \"inputs\": [torch_tensorrt.Input(\r\n            min_shape=[1024, 1, 32, 32],\r\n            opt_shape=[1024, 1, 33, 33],\r\n            max_shape=[1024, 1, 34, 34],\r\n            dtype=torch.float\r\n        )],\r\n    \"enabled_precisions\": {torch.float} # Run with FP16\r\n}\r\n\r\ntrt_ts_module = torch_tensorrt.compile(traced_model, **compile_settings)\r\nbenchmark(trt_ts_module, input_shape=(1024, 1, 32, 32), dtype=\"fp32\")\r\n```\r\n2. Check below my performance comparison results:\r\n```\r\nWarm up ...\r\nStart timing ...\r\nIteration 100/100, ave batch time 39.72 ms\r\nInput shape: torch.Size([1024, 1, 32, 32])\r\nOutput features size: torch.Size([1024, 10])\r\nAverage batch time: 39.72 ms\r\nWarm up ...\r\nStart timing ...\r\nIteration 100/100, ave batch time 39.74 ms\r\nInput shape: torch.Size([1024, 1, 32, 32])\r\nOutput features size: torch.Size([1024, 10])\r\nAverage batch time: 39.74 ms\r\nWarm up ...\r\nStart timing ...\r\nIteration 100/100, ave batch time 39.77 ms\r\nInput shape: torch.Size([1024, 1, 32, 32])\r\nOutput features size: torch.Size([1024, 10])\r\nAverage batch time: 39.77 ms\r\nWARNING: [Torch-TensorRT] - Dilation not used in Max pooling converter\r\nWARNING: [Torch-TensorRT] - Dilation not used in Max pooling converter\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT was linked against cuBLAS/cuBLAS LT 11.5.1 but loaded cuBLAS/cuBLAS LT 10.2.2\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - Detected invalid timing cache, setup a local cache instead\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - Max value of this profile is not valid\r\nWARNING: [Torch-TensorRT TorchScript Conversion Context] - TensorRT was linked against cuBLAS/cuBLAS LT 11.5.1 but loaded cuBLAS/cuBLAS LT 10.2.2\r\nWARNING: [Torch-TensorRT] - TensorRT was linked against cuBLAS/cuBLAS LT 11.5.1 but loaded cuBLAS/cuBLAS LT 10.2.2\r\nWARNING: [Torch-TensorRT] - TensorRT was linked against cuBLAS/cuBLAS LT 11.5.1 but loaded cuBLAS/cuBLAS LT 10.2.2\r\nWarm up ...\r\nStart timing ...\r\nIteration 100/100, ave batch time 57.29 ms\r\nInput shape: torch.Size([1024, 1, 32, 32])\r\nOutput features size: torch.Size([1024, 10])\r\nAverage batch time: 57.29 ms\r\n\r\n```\r\n\r\n## Environment\r\n\r\n> Build information about Torch-TensorRT can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.10\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/732",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-11-18T17:58:10Z",
    "updated_at": "2022-02-28T17:49:23Z",
    "user": "harishkool"
  },
  {
    "repo": "huggingface/transformers",
    "number": 14440,
    "title": "What does \"is_beam_sample_gen_mode\" mean ",
    "body": "Hi, I find there are many ways for generating sequences in `Transformers`(when calling the `generate` method).\r\nAccording to the code there:\r\nhttps://github.com/huggingface/transformers/blob/01f8e639d35feb91f16fd3c31f035df11a726cc5/src/transformers/generation_utils.py#L947-L951\r\nAs far as I known:\r\n`is_greedy_gen_mode` stands for Greedy Search.\r\n`is_sample_gen_mode` stands for Sampling(with top_k and top_p).\r\n`is_beam_gen_mode` stands for Beam Search .\r\n\r\nBut what does `is_beam_sample_gen_mode` mean?\r\n\r\nBesides, I want to know how do I choose the correct way for generating. I have tried serval ways, but:\r\n1. I find the sequences out from \"beam search\" mode becomes too similar.\r\n2. I also find the sequences out from \"sample\" mode, while being diverse, are lacking context coherence.\r\n\r\nThank you!",
    "url": "https://github.com/huggingface/transformers/issues/14440",
    "state": "closed",
    "labels": [],
    "created_at": "2021-11-18T06:31:52Z",
    "updated_at": "2023-02-28T05:13:29Z",
    "user": "huhk-sysu"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 730,
    "title": "Convert YoloV5 models ",
    "body": "It is my understanding that the new stable release should be able to convert any PyTorch model with fallback to PyTorch when operations cannot be directly converted to TensorRT. I am trying to convert \r\nI am trying to convert YoloV5s6 to TensorRT using the code that you can find below. I believe that it would be great to be able to convert this particular model given its popularity.\r\nDuring the conversion I am encountering some errors. Is this because the model cannot be converted to TorchScript? I also noticed that the model is composed of classes which extends `nn.Module`.\r\nOf course, YoloV5 code can be found here: https://github.com/ultralytics/yolov5\r\nThank you!\r\n\r\n## To Reproduce\r\n\r\n```\r\nimport torch\r\nimport torch_tensorrt\r\nmodel = torch.hub.load(\"ultralytics/yolov5\", \"yolov5s6\")\r\nmodel.eval()\r\ncompile_settings = {\r\n    \"inputs\": [torch_tensorrt.Input(\r\n        # For static size\r\n        shape=[1, 3, 640, 640],  # TODO: depends on the model size\r\n        # For dynamic size\r\n        # min_shape=[1, 3, 224, 224],\r\n        # opt_shape=[1, 3, 512, 512],\r\n        # max_shape=[1, 3, 1024, 1024],\r\n        dtype=torch.half,  # Datatype of input tensor. Allowed options torch.(float|half|int8|int32|bool)\r\n    )],\r\n    # \"require_full_compilation\": False,\r\n    \"enabled_precisions\": {torch.half},  # Run with FP16\r\n    \"torch_fallback\": {\r\n        \"enabled\": True,  # Turn on or turn off falling back to PyTorch if operations are not supported in TensorRT\r\n    }\r\n}\r\ntrt_ts_module = torch_tensorrt.compile(model, **compile_settings)\r\n```\r\n\r\nOutput:\r\n```\r\nUsing cache found in /home/ubuntu/.cache/torch/hub/ultralytics_yolov5_master\r\nYOLOv5 \ud83d\ude80 2021-11-17 torch 1.10.0+cu113 CUDA:0 (Tesla T4, 15110MiB)\r\nFusing layers... \r\nModel Summary: 280 layers, 12612508 parameters, 0 gradients\r\nAdding AutoShape... \r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.6/code.py\", line 91, in runcode\r\n    exec(code, self.locals)\r\n  File \"<input>\", line 21, in <module>\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch_tensorrt/_compile.py\", line 96, in compile\r\n    ts_mod = torch.jit.script(module)\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/_script.py\", line 1258, in script\r\n    obj, torch.jit._recursive.infer_methods_to_compile\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/_recursive.py\", line 451, in create_script_module\r\n    return create_script_module_impl(nn_module, concrete_type, stubs_fn)\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/_recursive.py\", line 513, in create_script_module_impl\r\n    script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn)\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/_script.py\", line 587, in _construct\r\n    init_fn(script_module)\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/_recursive.py\", line 491, in init_fn\r\n    scripted = create_script_module_impl(orig_value, sub_concrete_type, stubs_fn)\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/_recursive.py\", line 517, in create_script_module_impl\r\n    create_methods_and_properties_from_stubs(concrete_type, method_stubs, property_stubs)\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/_recursive.py\", line 368, in create_methods_and_properties_from_stubs\r\n    concrete_type._create_methods_and_properties(property_defs, property_rcbs, method_defs, method_rcbs, method_defaults)\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/_script.py\", line 1433, in _recursive_compile_class\r\n    return _compile_and_register_class(obj, rcb, _qual_name)\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/_recursive.py\", line 42, in _compile_and_register_class\r\n    ast = get_jit_class_def(obj, obj.__name__)\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/frontend.py\", line 201, in get_jit_class_def\r\n    is_classmethod=is_classmethod(obj)) for (name, obj) in methods]\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/frontend.py\", line 201, in <listcomp>\r\n    is_classmethod=is_classmethod(obj)) for (name, obj) in methods]\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/frontend.py\", line 264, in get_jit_def\r\n    return build_def(parsed_def.ctx, fn_def, type_line, def_name, self_name=self_name, pdt_arg_types=pdt_arg_types)\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/frontend.py\", line 302, in build_def\r\n    param_list = build_param_list(ctx, py_def.args, self_name, pdt_arg_types)\r\n  File \"/home/ubuntu/pycharm/venv/lib/python3.6/site-packages/torch/jit/frontend.py\", line 330, in build_param_list\r\n    raise NotSupportedError(ctx_range, _vararg_kwarg_err)\r\ntorch.jit.frontend.NotSupportedError: Compiled functions can't take variable number of arguments or use keyword-only arguments with defaults:\r\n  File \"/usr",
    "url": "https://github.com/pytorch/TensorRT/issues/730",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "component: partitioning"
    ],
    "created_at": "2021-11-17T18:37:44Z",
    "updated_at": "2023-02-27T00:02:29Z",
    "user": "mfoglio"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 727,
    "title": "I trained a model by libtorch,how to convert it to  tensorrt?",
    "body": "by libtorch,not by pytorch.\r\nhow to convert the model to tensorrt?",
    "url": "https://github.com/pytorch/TensorRT/issues/727",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-11-17T07:35:55Z",
    "updated_at": "2022-02-26T00:01:58Z",
    "user": "henbucuoshanghai"
  },
  {
    "repo": "pytorch/vision",
    "number": 4949,
    "title": "GPU usage keeps increasing marginally with each inference request",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nI have been trying to deploy the RetinaNet pre-trained model available in torchvision. However, after every inference request with exactly same image, the gpu usage keeps increasing marginally (by roughly 10 MiB, as visible in nvidia-smi). (Same behavior is noticed if I try the same with other Object Detection models like fasterrcnn_resnet50_fpn, fasterrcnn_mobilenet_v3_large_fpn.)\r\n\r\nThe brief code used for inference\r\n```python\r\n\r\n# load the model\r\nself.Model = retinanet_resnet50_fpn(pretrained=True)\r\nself.Model.to(torch.device('cuda'))\r\nself.Model.eval()\r\n\r\n# inference fn\r\n@torch.no_grad()\r\ndef DetectObjects(self, image, threshold=0.4)->dict:\r\n    image = convert_image_dtype(torch.stack([image]), dtype=torch.float)\r\n    image = image.to(torch.device('cuda'))\r\n    results = self.Model(image)[0]\r\n    gt = results['scores']>threshold\r\n    labels, boxes, scores = results['labels'][gt].cpu().tolist(), results['boxes'][gt].cpu().tolist(), results['scores'][gt].cpu().tolist()\r\n    torch.cuda.empty_cache()\r\n    return boxes, labels, scores\r\n```\r\n\r\n\r\n### Versions\r\n```\r\nCollecting environment information...\r\nPyTorch version: 1.10.0+cu102\r\nIs debug build: False\r\nCUDA used to build PyTorch: 10.2\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 18.04.6 LTS (x86_64)\r\nGCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0\r\nClang version: Could not collect\r\nCMake version: version 3.10.2\r\nLibc version: glibc-2.17\r\n\r\nPython version: 3.7.10 (default, Feb 20 2021, 21:21:24)  [GCC 5.4.0 20160609] (64-bit runtime)\r\nPython platform: Linux-4.15.0-162-generic-x86_64-with-Ubuntu-18.04-bionic\r\nIs CUDA available: True\r\nCUDA runtime version: Could not collect\r\nGPU models and configuration: GPU 0: NVIDIA GeForce GTX 1660 SUPER\r\nNvidia driver version: 465.19.01\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.2.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.2.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.2.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.2.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.2.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.2.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.2.4\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.21.4\r\n[pip3] torch==1.10.0\r\n[pip3] torchvision==0.11.1\r\n[conda] Could not collect\r\n```\r\n\n\ncc @datumbox",
    "url": "https://github.com/pytorch/vision/issues/4949",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2021-11-16T19:43:49Z",
    "updated_at": "2024-02-28T15:01:40Z",
    "user": "shv07"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 209,
    "title": "How to add language model in ASR demo",
    "body": "The wav2vec2 used in the SpeechRecognition example does not have a language model. How to add language model in the demo app\uff1f",
    "url": "https://github.com/pytorch/android-demo-app/issues/209",
    "state": "open",
    "labels": [],
    "created_at": "2021-11-16T10:55:43Z",
    "updated_at": "2021-12-10T11:36:07Z",
    "user": "guijuzhejiang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 68414,
    "title": "I used libtorch train a model,how to convert it to onnx?",
    "body": "libtorch trained a model",
    "url": "https://github.com/pytorch/pytorch/issues/68414",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2021-11-16T07:30:36Z",
    "updated_at": "2021-11-17T00:03:41Z",
    "user": "henbucuoshanghai"
  },
  {
    "repo": "pytorch/torchx",
    "number": 345,
    "title": "slurm_scheduler: handle OCI images",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\nAdd support for running TorchX components via the Slurm OCI interface.\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\n\r\nSlurm 21.08+ has support for running OCI containers as the environment. This matches well with our other docker/k8s images that we use by default. With workspaces + OCI we can support slurm like the docker based environments.\r\n\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\nThe new slurm container support doesn't handle the image finding the same way docker/podman does. This means that the images need to be placed on disk in the same way a virutalenv would be supported which would have to be a user configurable path.\r\n\r\nThis also means that we have to interact with docker/buildah to download the images and export them to an OCI image on disk. There's some extra questions about image management to avoid disk space issues etc.\r\n\r\nThe cluster would have to be configured with `nvidia-container-runtime` for use with GPUs.\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n\r\nhttps://slurm.schedmd.com/containers.html\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/345",
    "state": "open",
    "labels": [
      "enhancement",
      "module: runner",
      "slurm"
    ],
    "created_at": "2021-11-15T23:25:21Z",
    "updated_at": "2021-11-15T23:25:21Z",
    "comments": 0,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/torchx",
    "number": 344,
    "title": "workspace notebook UX",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\nWe should add some notebook specific integrations to make working with workspace and launching remote jobs first class. This builds upon the workspace support tracked by #333.\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\n\r\nCurrently there's no specific TorchX integrations for running from within notebooks. It's possible but it's not as fleshed out as it could be.\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\n### Jupyter Custom Magics\r\n\r\nWe want to add a custom magic to allow adding files to the workspace.\r\n\r\nhttps://ipython.readthedocs.io/en/stable/config/custommagics.html#defining-custom-magics\r\n\r\n```py\r\nfrom torchx.notebook import register_magics, get_workspace\r\n\r\nregister_magics()\r\n```\r\n\r\n```py\r\n%%workspacefile train.py\r\n\r\nprint(\"train Hello world!\")\r\n```\r\n\r\n```py\r\nfrom torchx.components.utils import python\r\nfrom torchx.runner import get_runner\r\n\r\napp = python(m=\"train\")\r\napp_id = runner.run(app, scheduler=\"local_docker\", workspace=get_workspace())\r\nprint(app_id)\r\nstatus = runner.wait(app_id)\r\nprint(status)\r\n```\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\nThis can already be accomplished by writing out a file and directly calling docker build etc. That's a lot more work on the user and requires having an on disk project so the notebook isn't fully self contained.\r\n\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n\r\nWorkspace/canary tracking #333",
    "url": "https://github.com/meta-pytorch/torchx/issues/344",
    "state": "open",
    "labels": [
      "enhancement",
      "module: runner"
    ],
    "created_at": "2021-11-15T22:50:59Z",
    "updated_at": "2021-11-15T22:50:59Z",
    "comments": 0,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 208,
    "title": "How to run model with grayscale input?",
    "body": "",
    "url": "https://github.com/pytorch/android-demo-app/issues/208",
    "state": "open",
    "labels": [],
    "created_at": "2021-11-15T09:59:11Z",
    "updated_at": "2021-11-15T09:59:11Z",
    "user": "bartproo"
  },
  {
    "repo": "pytorch/torchx",
    "number": 340,
    "title": "Advanced Pipeline Example Errors on KFP",
    "body": "## \ud83d\udcda Documentation\r\n\r\n## Link\r\nhttps://pytorch.org/torchx/main/examples_pipelines/kfp/advanced_pipeline.html#sphx-glr-examples-pipelines-kfp-advanced-pipeline-py\r\n\r\n## What does it currently say?\r\nThe pipeline.yaml can be generated and run on Kubeflow\r\n\r\n## What should it say?\r\nUnknown, I believe it is a race condition in the code where the pipeline begins execution before the download of the data is complete.\r\n\r\n## Why?\r\n<img width=\"804\" alt=\"Screen Shot 2021-11-13 at 1 36 46 AM\" src=\"https://user-images.githubusercontent.com/43734688/141608949-e41c0d23-4131-4eb8-82c6-e86aeb579e8e.png\">\r\n\r\n\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/340",
    "state": "closed",
    "labels": [],
    "created_at": "2021-11-13T06:40:22Z",
    "updated_at": "2022-01-04T05:06:42Z",
    "comments": 2,
    "user": "sam-h-bean"
  },
  {
    "repo": "pytorch/torchx",
    "number": 339,
    "title": "separate .torchxconfig for fb/ and oss",
    "body": "## Description\r\nWe want to have a FB internal .torchxconfig file to specify scheduler_args for internal cluster and a OSS .torchxconfig file to run on public clusters\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\n\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/339",
    "state": "closed",
    "labels": [],
    "created_at": "2021-11-12T19:34:39Z",
    "updated_at": "2021-11-16T00:31:48Z",
    "comments": 1,
    "user": "colin2328"
  },
  {
    "repo": "pytorch/xla",
    "number": 3212,
    "title": "How to enable oneDNN optimization\uff1f",
    "body": "## \u2753 Questions and Help\r\nI am doing training and inference on XLA_CPU, but I find that the training speed is particularly slow. Compared with pytorch, the training speed is about 10 times slower.\r\nAccording to the log, I found that mklcnn acceleration is enabled by default during pytorch training, but when I use xla training, mklcnn is not enabled.\r\n\r\n2021-11-12 16:12:44.683410: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  SSE3 SSE4.1 SSE4.2 AVX AVX2 AVX512F FMA\r\nTo enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\r\n\r\nHow can I enable mkldnn on xla to get training acceleration?",
    "url": "https://github.com/pytorch/xla/issues/3212",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2021-11-12T08:26:47Z",
    "updated_at": "2022-04-16T13:44:03Z",
    "user": "ZhongYFeng"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 708,
    "title": "ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory",
    "body": "I installed torch-tensorrt via pip: `pip3 install torch-tensorrt -f github.com/NVIDIA/Torch-TensorRT/releases`. And when I try to import it the _ImportError_ raises:\r\n_ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory_\r\nThe full error:\r\n\r\n```\r\nImportError                               Traceback (most recent call last)\r\n<ipython-input-13-82536c89b207> in <module>\r\n     13 from vision.utils.misc import str2bool, Timer, freeze_net_layers, store_labels\r\n     14 \r\n---> 15 import torch_tensorrt as torchtrt\r\n     16 \r\n     17 # import pytorch_quantization\r\n\r\n~/.local/lib/python3.6/site-packages/torch_tensorrt/__init__.py in <module>\r\n      9 \r\n     10 from torch_tensorrt._version import __version__\r\n---> 11 from torch_tensorrt._compile import *\r\n     12 from torch_tensorrt._util import *\r\n     13 from torch_tensorrt import ts\r\n\r\n~/.local/lib/python3.6/site-packages/torch_tensorrt/_compile.py in <module>\r\n      1 from typing import List, Dict, Any\r\n----> 2 from torch_tensorrt import _enums\r\n      3 import torch_tensorrt.ts\r\n      4 from torch_tensorrt import logging\r\n      5 import torch\r\n\r\n~/.local/lib/python3.6/site-packages/torch_tensorrt/_enums.py in <module>\r\n----> 1 from torch_tensorrt._C import dtype, DeviceType, EngineCapability, TensorFormat\r\n\r\nImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory\r\n```\r\n\r\n## Environment\r\n\r\n - PyTorch Version (e.g., 1.0): 1.10.0\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Ubuntu 18.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip3 install torch-tensorrt -f github.com/NVIDIA/Torch-TensorRT/releases\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.6\r\n - CUDA version: 10.2\r\n - GPU models and configuration: GeForce RTX 2080 Ti\r\n - Any other relevant information:\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/708",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-11-11T09:04:07Z",
    "updated_at": "2022-07-29T15:02:57Z",
    "user": "anvarganiev"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 697,
    "title": "why  https://github.com/NVIDIA/Torch-TensorRT/releases/torch_tensorrt-1.0.0-cp36-cp36m-linux_x86_64.whl depends on cuda 10.2 library",
    "body": "\r\nwhy  https://github.com/NVIDIA/Torch-TensorRT/releases/torch_tensorrt-1.0.0-cp36-cp36m-linux_x86_64.whl depends on cuda 10.2 library\r\n<!-- Your question -->\r\n\r\nwhen I  try to install torch-tensorrt and import torch_tensorrt ,It was reported ImportError:libcudart.so.10.2: cannot open shared object file: No such file or directory\r\n\r\n## Environment\r\n\r\n> ImportError                               Traceback (most recent call last)\r\n><ipython-input-1-291a947ced8e> in <module>\r\n>----> 1 import torch_tensorrt\r\n>\r\n>/usr/local/python3/lib/python3.6/site-packages/torch_tensorrt/__init__.py in <module>\r\n>      9\r\n>     10 from torch_tensorrt._version import __version__\r\n>---> 11 from torch_tensorrt._compile import *\r\n>     12 from torch_tensorrt._util import *\r\n>     13 from torch_tensorrt import ts\r\n>\r\n>/usr/local/python3/lib/python3.6/site-packages/torch_tensorrt/_compile.py in <module>\r\n>      1 from typing import List, Dict, Any\r\n>----> 2 from torch_tensorrt import _enums\r\n>      3 import torch_tensorrt.ts\r\n>      4 from torch_tensorrt import logging\r\n>      5 import torch\r\n>\r\n>/usr/local/python3/lib/python3.6/site-packages/torch_tensorrt/_enums.py in <module>\r\n>----> 1 from torch_tensorrt._C import dtype, DeviceType, EngineCapability, TensorFormat\r\n>\r\n>ImportError: libcudart.so.10.2: cannot open shared object file: No such file or directory\r\n\r\n - PyTorch Version (e.g., 1.0):torch_1.10+cu113\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Centos 7\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip3\r\n - Build command you used (if compiling from source): \r\n - Are you using local sources or building from archives:\r\n - Python version: python3.6\r\n - CUDA version: cuda-11.3\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/697",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-11-10T12:48:15Z",
    "updated_at": "2021-11-10T17:02:41Z",
    "user": "ylz1104"
  },
  {
    "repo": "pytorch/torchx",
    "number": 336,
    "title": "[docs] add context/intro to each docs page",
    "body": "## \ud83d\udcda Documentation\r\n\r\n## Link\r\nEx: https://pytorch.org/torchx/main/basics.html\r\n\r\nand some other pages\r\n\r\n## What does it currently say?\r\ndoesn't currently have an intro about the page and how it fits in context, just jumps right into the documentation\r\n\r\n## What should it say?\r\n<!-- the proposed new documentation -->\r\n\r\n## Why?\r\n<!-- (if not clear from the proposal) why is the new proposed documentation more correct/improvement over the existing one? -->\r\n\r\nWe got some good feedback from the documentation folks about adding context to each page so if someone gets linked to it they're not totally lost. This matches some of the user feedback we've received so would be good to update this.\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/336",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2021-11-08T23:26:47Z",
    "updated_at": "2021-11-11T18:33:18Z",
    "comments": 1,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 67965,
    "title": "how to set the quantized data type in QAT",
    "body": "When I use the qat and extract the intermedia layer's output I find it's quint8\r\n![MicrosoftTeams-image](https://user-images.githubusercontent.com/32367611/140634280-ce018cf8-2d53-4ee1-98b3-97cf44f9e54f.png)\r\n.\r\nThis datatype will be the input to the next layer I think.\r\nBut the weights are qint8 type. multiple a qint8 with quin8. Does this make sense?\r\n\r\n\r\nCurrently I use the default way to do the qat prepration:\r\n`model_new.qconfig = torch.quantization.get_default_qat_qconfig('fbgemm')`\r\n\r\nIt seems the observer controls the data type. is there a way to set the data type and do QAT preparation?\n\ncc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo",
    "url": "https://github.com/pytorch/pytorch/issues/67965",
    "state": "closed",
    "labels": [
      "oncall: quantization"
    ],
    "created_at": "2021-11-07T06:03:27Z",
    "updated_at": "2021-11-09T13:45:28Z",
    "user": "mathmax12"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1742,
    "title": "ddp_pipeline",
    "body": "I ran the code as is on the cluster. Gives\r\n\r\n`RuntimeError: unsupported operation: some elements of the input tensor and the written-to tensor refer to a single memory location. Please clone() the tensor before performing the operation.`\r\n\r\nWhat could be wrong? Also, is there any way to run this code in Jupyter? By the way, the Colab [notebook](https://colab.research.google.com/github/pytorch/tutorials/blob/gh-pages/_downloads/8976a0b7cba4d8c4bc2a28205b91a7da/ddp_pipeline.ipynb) doesn't run and gives and error\r\n\r\n`Traceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"/home/r/roman-koshkin/miniconda3/envs/tranformer/lib/python3.8/multiprocessing/spawn.py\", line 116, in spawn_main\r\n    exitcode = _main(fd, parent_sentinel)\r\n  File \"/home/r/roman-koshkin/miniconda3/envs/tranformer/lib/python3.8/multiprocessing/spawn.py\", line 126, in _main\r\n    self = reduction.pickle.load(from_parent)\r\nAttributeError: Can't get attribute 'run_worker' on <module '__main__' (built-in)>\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"/home/r/roman-koshkin/miniconda3/envs/tranformer/lib/python3.8/multiprocessing/spawn.py\", line 116, in spawn_main\r\n    exitcode = _main(fd, parent_sentinel)\r\n  File \"/home/r/roman-koshkin/miniconda3/envs/tranformer/lib/python3.8/multiprocessing/spawn.py\", line 126, in _main\r\n    self = reduction.pickle.load(from_parent)\r\nAttributeError: Can't get attribute 'run_worker' on <module '__main__' (built-in)>`",
    "url": "https://github.com/pytorch/tutorials/issues/1742",
    "state": "closed",
    "labels": [],
    "created_at": "2021-11-06T01:13:50Z",
    "updated_at": "2022-09-28T15:11:42Z",
    "comments": 2,
    "user": "RomanKoshkin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 67757,
    "title": "How to build libtorch on aarch64 machine?",
    "body": "I used command lines below to build libtorch on aarch64 machine.\r\n```shell\r\ngit clone https://github.com/pytorch/pytorch --recursive\r\ncd pytorch\r\npip3 install pyyaml # \u7f3a\u5931\u76f8\u5173\u4f9d\u8d56\uff0c\u8fdb\u884c\u5b89\u88c5\uff0c\u5982\u6709\u5176\u4ed6\u7f3a\u5931\uff0c\u4f9d\u6b21\u5b89\u88c5\u5373\u53ef\r\nexport USE_CUDA=False # \u4f7f\u7528cpu\r\nexport BUILD_TEST=False # \u4e0d\u7f16\u8bd1\u6d4b\u8bd5\u90e8\u5206\r\npython3 ../tools/build_libtorch.py # \u4f1a\u81ea\u52a8\u521b\u5efabuild\u6587\u4ef6\u5939\uff0c\u5e76\u8fdb\u884c\u76f8\u5173\u7f16\u8bd1\r\n```\r\nBut when I test it like [example](https://pytorch.org/cppdocs/installing.html),it shows some error.\r\n![image](https://user-images.githubusercontent.com/7894966/140027833-0e27c9b0-578d-4dde-bb8d-1dd88e2516b7.png)\r\nI see that size of my libtorch_cpu.so is only 100Mb,far less than the official one in cpu. But I dont konw whats wrong with it.",
    "url": "https://github.com/pytorch/pytorch/issues/67757",
    "state": "closed",
    "labels": [],
    "created_at": "2021-11-03T08:19:34Z",
    "updated_at": "2021-11-04T13:43:36Z",
    "user": "zihaoliao"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 67596,
    "title": "How to upgrade the NCCL version of pytorch 1.7.1 from 2.7.8 to 2.11.4? ",
    "body": "\r\n I have installed version 2.11.4 in wsl2 and can pass the nccl-tests. However, when training the model, pytorch 1.7.1 still calls NCCL 2.7.8. In addition to rebuilding, is there a way for pytorch 1.7.1 to call NCCL 2.11.4 in the system instead of calling the compiled version NCCL 2.7.8\uff1f",
    "url": "https://github.com/pytorch/pytorch/issues/67596",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-31T09:01:45Z",
    "updated_at": "2021-11-02T11:41:14Z",
    "user": "cascgu"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 198,
    "title": "How to reduce the size of pt file ",
    "body": "Thanks for your Image Segmentation deepLab v3. I have used it to implement an android file, but the size is about 150MB. Can you enlighten me how can I reduce the size. Thanks. ",
    "url": "https://github.com/pytorch/android-demo-app/issues/198",
    "state": "open",
    "labels": [],
    "created_at": "2021-10-31T07:36:36Z",
    "updated_at": "2021-10-31T07:36:36Z",
    "user": "jjlchui"
  },
  {
    "repo": "pytorch/vision",
    "number": 4802,
    "title": "How to monitor and when to retrain the object detection model in production?",
    "body": "I recently moved regression model to production and I\u2019m monitoring the model drift and data drift using statistical tests, based on their distributions i retrain the model. \n\nCould you please tell me how to monitoring the object detection model and detect drifts ? \n\n\nDo you use statistical test to detect drifts? If yes, how do you do that? And which value you as an input to detect?\n\n\nPlease guide me? Even if you could provide any relevant article also would help me\n\nThanks in advance\ud83d\ude0a",
    "url": "https://github.com/pytorch/vision/issues/4802",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-30T12:45:47Z",
    "updated_at": "2021-10-31T14:33:09Z",
    "user": "IamExperimenting"
  },
  {
    "repo": "pytorch/vision",
    "number": 4795,
    "title": "[docs] Pretrained model docs should explain how to specify cache dir and norm_layer",
    "body": "### \ud83d\udc1b Describe the bug\r\n\r\nhttps://pytorch.org/vision/stable/models.html?highlight=resnet18#torchvision.models.resnet18\r\n\r\nshould document:\r\n- how to set cache dir for downloaded models. many university systems have tight quota for home dir that prohibits clogging it with weights. it is explained at the very top of very long document (`TORCH_MODEL_ZOO`) but it would be nice to duplicate it / link to this from every pretrained method\r\n\r\n- how to set `norm_layer = torchvision.ops.misc.FrozenBatchNorm2d` since this is a very frequent need for fine-tuning\r\n\r\n- how to replace stride with dilation for ResNet and to what layers it applies and what it can help achieving\r\n\r\nCurrently docs just specify `**kwargs: Any` which isn't very helpful\r\n\r\n### Versions\r\n\r\nN/A",
    "url": "https://github.com/pytorch/vision/issues/4795",
    "state": "open",
    "labels": [],
    "created_at": "2021-10-29T11:50:17Z",
    "updated_at": "2021-11-13T21:46:45Z",
    "user": "vadimkantorov"
  },
  {
    "repo": "pytorch/torchx",
    "number": 316,
    "title": "[torchx/cli] Implement a torchx \"template\" subcommand that copies the given builtin",
    "body": "Torchx cli maintains a list of builtin components that are available via `torchx builtin` cmd. The builtin components are the patterns that are configured to execute one or another use-case. Users can use these components without the need to manage their own, e.g. \r\n\r\n```\r\ntorchx run -s local_cwd dist.ddp --script main.py\r\n```\r\n\r\nwould run user `main.py` script in a distributed manner.\r\n\r\nIt is better for users to own their own components for production use-cases. \r\nTorch copy command enables users to create initial templetized version of their components from the existing builtin components.  Users then can modify the code however they want.\r\n\r\nExample of usage\r\n\r\n```\r\n# torchx/components/dist.py\r\n\r\ndef ddp(..., nnodes=1):\r\n   return AppDef(..., roles=[Role(name=\"worker\", num_replicas=nnodes)])\r\n\r\ntorchx copy dist.ddp  \r\n\r\n# Output:\r\n\r\n\r\ndef ddp(..., nnodes=1):\r\n   return AppDef(..., roles=[Role(name=\"worker\", num_replicas=nnodes)])\r\n\r\n```\r\n\r\nTorchx copy will print the corresponding component to the stdout, so users can inspect the source code and copy it via:\r\n\r\n```\r\ntorchx copy dist.ddp > my_component.py\r\n```",
    "url": "https://github.com/meta-pytorch/torchx/issues/316",
    "state": "closed",
    "labels": [
      "enhancement",
      "cli"
    ],
    "created_at": "2021-10-28T20:28:07Z",
    "updated_at": "2021-11-03T21:27:12Z",
    "comments": 0,
    "user": "aivanou"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1735,
    "title": "Missing tutorial on using the transformer decoder layer?",
    "body": "Hi, i'm new with transformers.\r\nFor research purpose, with a colleague, I'm trying to implement a transformer for anomaly detection in human pose.\r\nThe transformer setting we need is very similar to an autoencoder, where the encoder generates a sort of latent representation and the decoder output is just a model attempt to reconstruct the input.\r\n\r\nWe were looking for transformer tutorials where both nn.TransformerEncoder and nn.TransformerDecoder are used, but we couldn't find anyone. Are we missing something or pytorch literally didn't provide any tutorial except the ones with just the using of the encoder?",
    "url": "https://github.com/pytorch/tutorials/issues/1735",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-28T16:27:27Z",
    "updated_at": "2022-03-17T16:15:07Z",
    "comments": 0,
    "user": "AndreaLombax"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 67438,
    "title": "how to use torch.jit.script with toch.nn.DataParallel",
    "body": "### \ud83d\udc1b Describe the bug\n\nnet = torch.nn.DataParallel(net)\r\nnet.load_state_dict(state1,False)\r\nwith torch.jit.optimized_execution(True):\r\n    net_jit = torch.jit.script(net)\r\n\r\n\r\ntorch.jit.frontend.NotSupportedError: Compiled functions can't take variable number of arguments or use keyword-only arguments with defaults:\n\n### Versions\n\ntorch.jit.frontend.NotSupportedError: Compiled functions can't take variable number of arguments or use keyword-only arguments with defaults:",
    "url": "https://github.com/pytorch/pytorch/issues/67438",
    "state": "closed",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2021-10-28T12:13:51Z",
    "updated_at": "2022-11-22T11:58:22Z",
    "user": "anliyuan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 685,
    "title": "\u2753 [Question] TRtorch v0.1.0 does support aten::divonly?",
    "body": "## \u2753 Question\r\nI am trying to compile my model.\r\nHowever compiler stops owing to a error.\r\nDoss TRTorch v0.1.0 support `aten::divonly`?\r\nAlso, does the newer TRTorch support `aten::divonly`?\r\n\r\n## What you have already tried\r\nI searched the error messages at the internet.\r\n\r\n## Environment\r\npytorch 1.6\r\nTRTorch 0.1.0\r\n\r\n## Additional context\r\nThe error message is this one.\r\n```\r\n>       compiled_cpp_mod = trtorch._C.compile_graph(module._c, _parse_compile_spec(compile_spec))\r\nE       RuntimeError: [enforce fail at core/conversion/evaluators/NodeEvaluatorRegistry.cpp:56] Expected schema to be true but got false\r\nE       Evaluator for aten::divonly runs on certain schemas, but schema for node is not retrievable\r\n```",
    "url": "https://github.com/pytorch/TensorRT/issues/685",
    "state": "closed",
    "labels": [
      "feature request",
      "question",
      "No Activity"
    ],
    "created_at": "2021-10-27T16:34:18Z",
    "updated_at": "2022-02-15T00:01:49Z",
    "user": "yoshida-ryuhei"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 67338,
    "title": "how to get the rank list in a new group",
    "body": "## \u2753 Questions and Help\r\nHow to get the rank list in a new group?  I just find the `distributed.get_rank` and `distributed.get_world_size()` but not `get_rank_list` API.\r\nThanks :)\n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang",
    "url": "https://github.com/pytorch/pytorch/issues/67338",
    "state": "closed",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2021-10-27T16:30:02Z",
    "updated_at": "2021-11-05T02:45:16Z",
    "user": "hclearner"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 682,
    "title": "\u2753 [Question] is there in8 quantization support with python?",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\nI did quantize to FP16 by using python. but i didn't find way to do that with int8 \r\nlet me know if there is support",
    "url": "https://github.com/pytorch/TensorRT/issues/682",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-10-26T21:30:44Z",
    "updated_at": "2021-10-26T21:51:26Z",
    "user": "yokosyun"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1727,
    "title": "your \"numpy_extensions_tutorial.py \" example",
    "body": "Hello,\r\nI would like to use the example in your `numpy_extensions_tutorial.py ` coda, but it appears ti computes on a single channel.\r\nDo you happen to know how I can compute it on several channels?\r\nThanks!",
    "url": "https://github.com/pytorch/tutorials/issues/1727",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-10-25T12:09:33Z",
    "updated_at": "2023-03-06T22:59:39Z",
    "user": "lovodkin93"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 1227,
    "title": "What is the training data to train the checkpoint \"nli-roberta-base-v2\"?",
    "body": "Hi, I wonder what is the training data for the provided checkpoint \"nli-roberta-base-v2\"?\r\n\r\nThe checkpoint name indicates that the training data is related to the nli dataset, but I just want to clarify what it is.\r\n\r\nThanks in advance.",
    "url": "https://github.com/huggingface/sentence-transformers/issues/1227",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-25T08:59:45Z",
    "updated_at": "2021-10-25T09:47:36Z",
    "user": "sh0416"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 67157,
    "title": "What is the replacement in PyTorch>=1.8 for `torch.rfft` in PyTorch <=1.6?",
    "body": "Hi,\r\n\r\nI have been working on a project since last year and at that time, the PyTorch version was 1.6. I was using `f1 = torch.rfft(input, signal_ndim=3)` in that version. However, after PyTorch 1.8, `torch.rfft` has been removed. I was trying to use `f2=torch.fft.rfftn(input)` as the replacement, but both the real and imaginary parts of the output f2 are totally different from the output from `torch.rfft`. \r\n\r\nI am wondering what is the correct replacement now in PyTorch>=1.8 for torch.rfft in PyTorch 1.6?\r\n\r\nThanks in advance!\r\n\r\nBest,\r\nSongyou",
    "url": "https://github.com/pytorch/pytorch/issues/67157",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-24T14:49:29Z",
    "updated_at": "2021-10-24T15:23:27Z",
    "user": "pengsongyou"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 67156,
    "title": "[ONNX] How to gathering on a tensor with two-dim indexing?",
    "body": "Hi,\r\n\r\nHow can I perform the following **without** getting a Gather node in my onnx graph? As the Gather node gives me an error in TensorRT 7.\r\n\r\n```\r\nx = data[:, x_indices, y_indices]\r\n```\r\ndata is tensor of size[32, 64, 1024]\r\nx_indices is tensor of size [50000,] -> range of indices 0 to 31\r\ny_indices is tensor of size [50000,] -> range of indices 0 to 1023\r\n\r\nThe size of tensor x would be [32,50000]\r\n\r\nThanks in advance.",
    "url": "https://github.com/pytorch/pytorch/issues/67156",
    "state": "closed",
    "labels": [
      "module: onnx"
    ],
    "created_at": "2021-10-24T13:06:58Z",
    "updated_at": "2021-10-26T15:33:37Z",
    "user": "yasser-h-khalil"
  },
  {
    "repo": "pytorch/data",
    "number": 81,
    "title": "Improve debuggability",
    "body": "## \ud83d\ude80 Feature\r\nCurrently, when iteration on DataPipe starts and Error is raised, the traceback would report at each `__iter__` method pointing to the DataPipe Class file.\r\nIt's hard to figure out which part of DataPipe is broken, especially when multiple same DataPipe calls exist in the pipeline.\r\n\r\nAs normally developer would iterate over the sequence of DataPipe for debugging, we can't rely on DataLoader to handle this case.\r\n\r\nI am not sure how to reference `self` object from each `Iterator` instance. https://docs.python.org/3/reference/expressions.html?highlight=generator#generator-iterator-methods\r\n\r\n(I guess this is also one thing we need to think about singleton iterator should be able to reference back to the object)",
    "url": "https://github.com/meta-pytorch/data/issues/81",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-22T18:12:36Z",
    "updated_at": "2022-03-16T19:42:11Z",
    "comments": 0,
    "user": "ejguan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 67013,
    "title": "How to use torch.distributions.multivariate_normal.MultivariateNormal in multi-gpu mode",
    "body": "## \u2753 Questions and Help\r\n\r\nIn single gpu mode,MultivariateNormal can run correctly, but when i switch to multi-gpu mode, always get the error:\r\n\r\nG = torch.exp(m.log_prob(Delta))\r\n  File \"xxxxx\", line 210, in log_prob\r\n    M = _batch_mahalanobis(self._unbroadcasted_scale_tril, diff)\r\n  File \"xxxxx\", line 57, in _batch_mahalanobis\r\n    M_swap = torch.triangular_solve(flat_x_swap, flat_L, upper=False)[0].pow(2).sum(-2)  # shape = b x c\r\nRuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling `cublasStrsmBatched( handle, side, uplo, trans, diag, m, n, alpha, A, lda, B, ldb, batchCount)\r\n\r\nthe code is:\r\nmean = torch.zeros(2).to(x.device)\r\ncov = torch.eye(2).to(x.device)\r\nm = MultivariateNormal(mean, cov * self.sigma**2)\r\n\r\nI would be very grateful if you could give some suggestions\r\n\n\ncc @ngimel @jianyuh @nikitaved @pearu @mruberry @walterddr @IvanYashchuk @xwang233 @Lezcano @fritzo @neerajprad @alicanb",
    "url": "https://github.com/pytorch/pytorch/issues/67013",
    "state": "closed",
    "labels": [
      "module: cuda",
      "triaged",
      "module: linear algebra"
    ],
    "created_at": "2021-10-21T10:36:41Z",
    "updated_at": "2023-11-30T13:45:58Z",
    "user": "SkylerHuang"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 195,
    "title": "The Performance of  the Deployed Model on Android is Far from What on the PC",
    "body": "Hi, \r\n    I trained one model to detect the steel rebar base on yolov5x model. The testing result is good on PC. And I followed the guide (https://github.com/pytorch/android-demo-app/pull/185) to convert  the model to torchscript model (ptl) and integrate it to the demo app. Then the demo app could work and output the result, but there is huge gap between the results on PC and app, see below pic for comparison. \r\n\r\nResult on PC (confidence thresh is 0.25)\r\n![image](https://user-images.githubusercontent.com/15626897/138205624-c55fc0c9-65d9-47fe-b9ad-2e41fb467f5b.png)\r\nResult on App(confidence thresh is 0.2)\r\n![image](https://user-images.githubusercontent.com/15626897/138205741-346258cf-ce09-4d41-b62f-eb6afba8d0b0.png)\r\nI also tuned the --optimze when export the model\r\npython3 /workspace/src/github/yolov5/export.py --weight runs/train/exp32/weights/best.pt --include torchscript --optimize\r\nBut there is no significant difference after the tuning. So far have no more clue to figure out ...\r\n\r\nAny tips or suggestion is appreciated, thanks!\r\n",
    "url": "https://github.com/pytorch/android-demo-app/issues/195",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-21T03:21:12Z",
    "updated_at": "2021-12-10T07:20:54Z",
    "user": "joeshow79"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 66916,
    "title": "how to install torch version1.8.0 with cuda 11.2",
    "body": "## \u2753 Questions and Help\r\n\r\nhow to install torch version1.8.0 with cuda 11.2\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/66916",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-20T01:09:16Z",
    "updated_at": "2021-10-21T15:16:54Z",
    "user": "ZTurboX"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 66873,
    "title": "Add documentation for how to work with PyTorch in Windows SSH",
    "body": "Our Windows machines require all dependencies to be installed before you could do anything with PyTorch (like run tests).\r\n\r\nWe should document how someone could get to a stage where they can work with PyTorch, or provide a script to automate this process.\r\n\r\nMoreover, our Windows scripts need cleaning up in general, but that's more tracked with https://github.com/pytorch/pytorch/issues/65718\n\ncc @brianjo @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/66873",
    "state": "closed",
    "labels": [
      "module: docs",
      "triaged",
      "better-engineering"
    ],
    "created_at": "2021-10-19T15:25:18Z",
    "updated_at": "2022-02-28T20:45:59Z",
    "user": "janeyx99"
  },
  {
    "repo": "pytorch/torchx",
    "number": 277,
    "title": "Improve docs page toctree index",
    "body": "## \ud83d\udcda Documentation\r\n\r\n## Link\r\nhttps://pytorch.org/torchx\r\n\r\n## What does it currently say?\r\nNo issues with the documentation. This calls for a revamped indexing of the toctree in the torchx docs page\r\n\r\n## What should it say?\r\n\r\nMake the toctree be:\r\n1. Usage:\r\n    - Basic Concepts\r\n    - Installation\r\n    - 10 Min Tutorial (Hello World should be renamed to this)\r\n2. Examples:\r\n    - Application\r\n    - Component -> (links to) list of builtins (4. below)\r\n    - Pipelines\r\n\r\n3. Best Practices:\r\n     - Application\r\n     - Component\r\n\r\n3. Application (Runtime)\r\n    - Overview\r\n    - HPO\r\n    - Tracking\r\n\r\n4. Components\r\n     - Train\r\n     - Distributed\r\n     - ...\r\n\r\n6. Runner (Schedulers)\r\n    - Localhost\r\n    - Kubernetes\r\n    - Slurm\r\n\r\n7. Pipelines\r\n     - Kubeflow\r\n\r\n8. API\r\n    - torchx.specs\r\n    - torchx.runner\r\n    - torchx.schedulers\r\n    - torchx.pipelines\r\n  \r\n 9. Experimental\r\n     - (beta) torchx.config\r\n\r\n## Why?\r\nThe proposed toctree is a better organization compared to the one we have today. It better organizes parallels between app, component, and piplines. Logically lays out sections so that it reads better top to bottom\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/277",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-18T22:30:22Z",
    "updated_at": "2021-10-20T22:13:50Z",
    "comments": 0,
    "user": "kiukchung"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 71,
    "title": "Download and cache the images and other files?",
    "body": "Fields with an image URL are detected, and the \"ImageUrl\" type is passed in the features, to let the client (moonlanding) put the URL in `<img src=\"...\" />`.\r\n\r\nThis means that pages such as https://hf.co/datasets/severo/wit will download images directly from Wikipedia for example. Hotlinking presents various [issues](https://en.wikipedia.org/wiki/Inline_linking#Controversial_uses_of_inline_linking). In particular, it's harder for us to know for sure if the image really exists or if it has an error. It might also generate a lot of traffic to other websites.\r\n\r\nThus: we might want to download the images as an asset in the backend, then serve them directly. Coding a good downloading bot is not easy ([User-Agent](https://meta.wikimedia.org/wiki/User-Agent_policy), avoid reaching rate-limits, detect the filename, detect the mime-type/extension, etc.)\r\n\r\nRelated: https://github.com/huggingface/datasets/issues/3105",
    "url": "https://github.com/huggingface/dataset-viewer/issues/71",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-10-18T15:37:59Z",
    "updated_at": "2022-09-16T20:09:24Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/torchx",
    "number": 250,
    "title": "[torchx/configs] Make runopts, Runopt, RunConfig, scheduler_args more consistent",
    "body": "## Description\r\nConsolidate redundant names, classes, and arguments that represent scheduler `RunConfig`.\r\n\r\n## Motivation/Background\r\nCurrently there are different names for what essentially ends up being the additional runtime options for the [`torchx.scheduler`](https://pytorch.org/torchx/latest/schedulers.html) (see [`dryrun(..., cfg: RunConfig))`](https://pytorch.org/torchx/latest/schedulers.html).\r\n\r\nThis runconfig is:\r\n\r\n1. has class type `torchx.specs.api.RunConfig` (dataclass)\r\n2. function argument name `cfg` or `runcfg` in most places in the scheduler and runner source code\r\n3. passed from the `torchx run` cli as `--scheduler_args`\r\n\r\nAdditionally each scheduler has what is called a `runopts`, which are the runconfig options that the scheduler advertises and takes (see runopts for [local_scheduler](https://github.com/pytorch/torchx/blob/main/torchx/schedulers/local_scheduler.py#L543)).\r\n\r\nThe difference between  `RunConfig` and `runopts` is that the `RunConfig` object is simply a holder for the user-provided config key-value pairs while `runopts` is the schema (type, default, is_required, help string) of the configs that it takes. Think of `runopts` being the `argparse.ArgumentParser` of the Scheduler if it were a cli tool, and `RunConfig` the `sys.argv[1:]` (but instead of an array it is a map).\r\n\r\n## Detailed Proposal\r\nThe proposal is to clean up the nomenclature as follows:\r\n\r\n1. Deprecate `--scheduler_args` option in torchx cli and instead call it `--cfg` (consistent with the parameter names in the Scheduler API).\r\n2. Change the section name In the runner INI config files from `[$profile.scheduler_args.$sched_name]` to `[$profile.$scheduler_name.cfg]` (e.g. `[default.scheduler_args.local_cwd]` would become `[default.local_cwd.cfg]`)\r\n3. Rename [`Runopt`](https://github.com/pytorch/torchx/blame/431c0e2131bfae738eb17a00afa83c36a932cec6/torchx/specs/api.py#L512) to `runopt` (to be consistant with `runopts` which is a holder for runopt by name)\r\n\r\n## Alternatives\r\n(not really an alternative but other deeper cleanups considered)\r\n\r\n1. changing the `cfg` parameter name in Scheduler and Runner interfaces to be `runconfig` (consistent with `RunConfig`) or alternatively changing `RunConfig` to `RunCfg`. This is going to be a huge codemod, hence I've decided to live with it and change the rest of the settings to match `cfg`.\r\n2. `RunConfig` is simply a wrapper around a regular python `Dict[str, ConfigValue]` (`ConfigValue` is a type alias not an actual class) and does not provide any additional functionality on top of the dict other than a prettyprint `__repr__()`. Considering just dropping the `RunConfig` dataclass and using `Dict[str, ConfigValue]` directly (also requires a huge codemod)\r\n\r\n## Additional context/links\r\nSee hyperlinks above.\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/250",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-14T15:03:56Z",
    "updated_at": "2021-10-14T19:14:18Z",
    "comments": 0,
    "user": "kiukchung"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 66511,
    "title": "Add a config to PRs where we assume there is only 1 GPU available",
    "body": "We recently had a gap in PR coverage where we did not catch when a test case attempted to access an invalid GPU from this PR https://github.com/pytorch/pytorch/pull/65914. We should capture that in PR testing somehow to catch these early next time.\r\n\r\nAction:\r\nMake our tests run on only one \"available\" GPU.\r\nWe could take advantage of this and split up our tests to run on separate GPUs when they're available!\n\ncc @seemethere @malfet @pytorch/pytorch-dev-infra @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/66511",
    "state": "closed",
    "labels": [
      "module: ci",
      "module: tests",
      "triaged"
    ],
    "created_at": "2021-10-12T21:42:19Z",
    "updated_at": "2021-11-15T22:37:13Z",
    "user": "janeyx99"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 66418,
    "title": "How to implement dynamic sampling of training data?",
    "body": "Hi, thank you for your work.\r\n\r\nNow I have multiple train datasets including real data and synthetic data. When sampling data during training, It is necessary to ensure that the ratio of real data samples to synthetic data samples in a batch is 1:1~1:3. How to achieve this operation?\r\n\r\nLooking forward to your answer, thank you.\n\ncc @SsnL @VitalyFedyunin @ejguan @NivekT",
    "url": "https://github.com/pytorch/pytorch/issues/66418",
    "state": "closed",
    "labels": [
      "module: dataloader",
      "triaged"
    ],
    "created_at": "2021-10-11T12:10:16Z",
    "updated_at": "2021-10-13T02:38:14Z",
    "user": "Danee-wawawa"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1705,
    "title": "StopIteration Error in torch.fx tutorial with TransformerEncoderLayer",
    "body": "I\u2019m trying to run the fx profiling tutorial in tutorials/fx_profiling_tutorial.py at master \u00b7 pytorch/tutorials \u00b7 GitHub 1 on a single nn.TransformerEncoderLayer as opposed to the resnet in the example and I keep running into a StopIteration error. Why is this happening? All I did was replace the resnet with a transformer encoder layer. \n\ncc @eellison @suo @gmagogsfm @jamesr66a @msaroufim @SherlockNoMad @sekyondaMeta @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/1705",
    "state": "closed",
    "labels": [
      "question",
      "fx",
      "easy",
      "docathon-h2-2023"
    ],
    "created_at": "2021-10-09T06:28:59Z",
    "updated_at": "2023-11-07T00:41:23Z",
    "user": "lkp411"
  },
  {
    "repo": "pytorch/functorch",
    "number": 192,
    "title": "Figure out how to market functorch.vmap over torch.vmap that is in PyTorch nightly binaries",
    "body": "Motivation:\r\n- Many folks are using torch.vmap instead of functorch.vmap and basing their initial impressions off of it. We'd like them to use functorch.vmap instead, especially if we do a beta release of functorch out-of-tree.\r\n\r\nConstraints:\r\n- Features that rely on it (torch.autograd.functional.jacobian, torch.autograd.grad(batched_grad=True) should probably continue to work.\r\n\r\nPotential solutions:\r\n- Have the torch.vmap API in the nightly binaries error out and tell users to use functorch.vmap...\r\n\r\nThoughts? cc @Chillee @albanD @soulitzer",
    "url": "https://github.com/pytorch/functorch/issues/192",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-08T13:55:19Z",
    "updated_at": "2022-02-03T14:55:34Z",
    "user": "zou3519"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 189,
    "title": "how  to  loadMoudule  by  Absolutepath",
    "body": "Hello, I use the objectdetection app to run normally. There are some new requirements. The. **Pt file is relatively large**. I don't want to include it in the app, but want to **load it directly from the local**.\r\nI use Android Python version 1.8. I found that the pytorch_android class in his jar package does not implement the method of loading locally, **but the nativepeer class contains\r\nNativePeer(String moduleAbsolutePath, Device device) {}**\r\nMy idea is to write a method in pytorch_android and call the above function.\r\nHowever, I **failed to replace the jar package's class** with the local pytorchandroid. Class. It will always be restored. If I delete it locally, it will still be downloaded. I don't know what I should do now.thanks\r\n",
    "url": "https://github.com/pytorch/android-demo-app/issues/189",
    "state": "open",
    "labels": [],
    "created_at": "2021-10-08T12:09:07Z",
    "updated_at": "2021-10-08T12:09:07Z",
    "user": "dota2mhxy"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 66309,
    "title": "How to find the source kernel code of cumsum (gpu)",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nHi,\r\n     As the title, how could I find the source kernel code of cumsum (gpu). I just find the cumsum (cpu). Thanks.\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/66309",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-08T09:53:03Z",
    "updated_at": "2021-10-08T17:47:39Z",
    "user": "foreveronehundred"
  },
  {
    "repo": "pytorch/audio",
    "number": 1837,
    "title": "ERROR: Could not find a version that satisfies the requirement torchaudio (from versions: none) ERROR: No matching distribution found for torchaudio",
    "body": "### \ud83d\udc1b Describe the bug\n\nERROR: Could not find a version that satisfies the requirement torchaudio>=0.5.0 (from asteroid) (from versions: none)\r\nERROR: No matching distribution found for torchaudio>=0.5.0 (from asteroid)\r\n21:40:18-root@Desktop:/pr/Neural/voicefixer_main# pip3 install torchaudio\r\n\n\n### Versions\n\npython collect_env.py \r\nTraceback (most recent call last):\r\n  File \"/media/sd/Projects/Neural/voicefixer_main/collect_env.py\", line 16, in <module>\r\n    import torch\r\n  File \"/home/plab/.local/lib/python3.9/site-packages/torch/__init__.py\", line 196, in <module>\r\n    from torch._C import *\r\nRuntimeError: module compiled against API version 0xe but this version of numpy is 0xd\r\n\r\n21:45:45-root@Desktop:/pr/Neural/voicefixer_main# pip3 install numpy\r\nRequirement already satisfied: numpy in /usr/lib/python3/dist-packages (1.19.5)\r\n\r\nPlease fix torchaudio to install.  Thanks!",
    "url": "https://github.com/pytorch/audio/issues/1837",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-10-07T21:17:48Z",
    "updated_at": "2023-07-31T18:37:00Z",
    "user": "clort81"
  },
  {
    "repo": "pytorch/data",
    "number": 44,
    "title": "KeyZipper improvement",
    "body": "Currently multiple stacked `KeyZipper` would create a recursive data structure:\r\n```py\r\ndp = KeyZipper(dp, ref_dp1, lambda x: x)\r\ndp = KeyZipper(dp, ref_dp2, lambda x: x[0])\r\ndp = KeyZipper(dp, ref_dp3, lambda x: x[0][0])\r\n```\r\nThis is super annoying if we are using same key for each `KeyZipper`. At the end, it yields `(((dp, ref_dp1), ref_dp2), ref_dp3)\r\n\r\nWe should either accept multiple reference DataPipe for KeyZipper to preserve same key, or have some expand or collate function to convert result to `(dp, (ref_dp1, ref_dp2, ref_dp3))`\r\n\r\n\r\n- If we take multiple reference DataPipe and ref_key_fn, we need to figure out how to ensure buffer not blown up.\r\n\r\n\r\ncc: @VitalyFedyunin @NivekT ",
    "url": "https://github.com/meta-pytorch/data/issues/44",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-05T17:02:00Z",
    "updated_at": "2021-10-22T14:45:38Z",
    "comments": 1,
    "user": "ejguan"
  },
  {
    "repo": "huggingface/datasets",
    "number": 3013,
    "title": "Improve `get_dataset_infos`?",
    "body": "Using the dedicated function `get_dataset_infos` on a dataset that has no dataset-info.json file returns an empty info:\r\n\r\n```\r\n>>> from datasets import get_dataset_infos\r\n>>> get_dataset_infos('wit')\r\n{}\r\n```\r\n\r\nWhile it's totally possible to get it (regenerate it) with:\r\n\r\n```\r\n>>> from datasets import load_dataset_builder\r\n>>> builder = load_dataset_builder('wit')\r\n>>> builder.info\r\nDatasetInfo(description='Wikipedia-based Image Text (WIT) Dataset is a large multimodal multilingual dataset. WIT is composed of a curated set\\n of 37.6 million entity rich image-text examples with 11.5 million unique images across 108 Wikipedia languages. Its\\n size enables WIT to be used as a pretraining dataset for multimodal machine learning models.\\n', citation='@article{srinivasan2021wit,\\n  title={WIT: Wikipedia-based Image Text Dataset for Multimodal Multilingual Machine Learning},\\n  author={Srinivasan, Krishna and Raman, Karthik and Chen, Jiecao and Bendersky, Michael and Najork, Marc},\\n  journal={arXiv preprint arXiv:2103.01913},\\n  year={2021}\\n}\\n', homepage='https://github.com/google-research-datasets/wit', license='', features={'b64_bytes': Value(dtype='string', id=None), 'embedding': Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None), 'image_url': Value(dtype='string', id=None), 'metadata_url': Value(dtype='string', id=None), 'original_height': Value(dtype='int32', id=None), 'original_width': Value(dtype='int32', id=None), 'mime_type': Value(dtype='string', id=None), 'caption_attribution_description': Value(dtype='string', id=None), 'wit_features': Sequence(feature={'language': Value(dtype='string', id=None), 'page_url': Value(dtype='string', id=None), 'attribution_passes_lang_id': Value(dtype='string', id=None), 'caption_alt_text_description': Value(dtype='string', id=None), 'caption_reference_description': Value(dtype='string', id=None), 'caption_title_and_reference_description': Value(dtype='string', id=None), 'context_page_description': Value(dtype='string', id=None), 'context_section_description': Value(dtype='string', id=None), 'hierarchical_section_title': Value(dtype='string', id=None), 'is_main_image': Value(dtype='string', id=None), 'page_changed_recently': Value(dtype='string', id=None), 'page_title': Value(dtype='string', id=None), 'section_title': Value(dtype='string', id=None)}, length=-1, id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name='wit', config_name='default', version=0.0.0, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)\r\n```\r\n\r\nShould we test if info is empty, and in that case regenerate it? Or always generate it?",
    "url": "https://github.com/huggingface/datasets/issues/3013",
    "state": "closed",
    "labels": [
      "question",
      "dataset-viewer"
    ],
    "created_at": "2021-10-04T09:47:04Z",
    "updated_at": "2022-02-21T15:57:10Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 55,
    "title": "Should the features be associated to a split, instead of a config?",
    "body": "For now, we assume that all the splits of a config will share the same features, but it seems that it's not necessarily the case (https://github.com/huggingface/datasets/issues/2968). Am I right @lhoestq ?\r\n\r\nIs there any example of such a dataset on the hub or in the canonical ones?",
    "url": "https://github.com/huggingface/dataset-viewer/issues/55",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-10-01T18:14:53Z",
    "updated_at": "2021-10-05T09:25:04Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 65992,
    "title": "How to use `MASTER_ADDR` in a distributed training script",
    "body": "## \u2753 Questions and Help\r\n\r\nhttps://pytorch.org/docs/stable/elastic/run.html\r\n\r\n> `MASTER_ADDR` - The FQDN of the host that is running worker with rank 0; used to initialize the Torch Distributed backend.\r\n\r\nThe document says `MASTER_ADDR` is the hostname of the master node. But the hostname may not be resolved by other nodes. What's the use case of `MASTER_ADDR`?\r\n\r\nFor example, in AWS, the hostname of the master node is `ip-172-30-2-12` which is not recognized by other nodes.\r\n\r\nOn \"ip-172-30-2-12\":\r\n```sh\r\n(dev) \u279c  ~ hostname\r\nip-172-30-2-12\r\n```\r\nOn another machine:\r\n```sh\r\n(dev) \u279c  ~ getent hosts ip-172-30-2-12\r\n\r\n(dev) \u279c  ~\r\n```\r\n\r\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang",
    "url": "https://github.com/pytorch/pytorch/issues/65992",
    "state": "closed",
    "labels": [
      "oncall: distributed",
      "module: elastic"
    ],
    "created_at": "2021-10-01T09:19:31Z",
    "updated_at": "2025-02-04T08:17:51Z",
    "user": "jasperzhong"
  },
  {
    "repo": "pytorch/serve",
    "number": 1262,
    "title": "What is the Proper Model Save Method?",
    "body": "The example given in the documentation shows downloading and archiving a pre-existing model from Pytorch. But if serving a custom-built model, what is the correct save method?\r\n\r\nFor example, on the Save/Loading Documentation, there are several save methods:\r\n\r\nhttps://pytorch.org/tutorials/beginner/saving_loading_models.html\r\n\r\nShould the model artifacts be saved as simply torch.save(model, PATH) or should it be saved as torch.save(model.state_dict(), PATH)?\r\n\r\nThank you.",
    "url": "https://github.com/pytorch/serve/issues/1262",
    "state": "closed",
    "labels": [],
    "created_at": "2021-10-01T06:02:40Z",
    "updated_at": "2021-10-01T06:42:16Z",
    "user": "CerebralSeed"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 65915,
    "title": "I am getting undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE error. This I am getting when I am trying to \"import torch from nemo.collections import nlp\". I am trying to use pytorch ngc container 21.05. I tried to import torch before the nemo extension. Please suggest how I can resolve this.",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/65915",
    "state": "open",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2021-09-30T12:08:43Z",
    "updated_at": "2021-09-30T12:17:54Z",
    "user": "gangadharsingh056"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 65816,
    "title": "How to install PyTorch on ppc64le with pip?",
    "body": "I am going to build a virtual environment (python -m venv) and install PyTorch on a ppc64le machine. But there is no package in pip to install PyTorch, however it is available in conda. But I wanted not to use conda because I need to install some specific packages and versions. So, how can I install PyTorch on a ppc64le(IBM Power8) machine?",
    "url": "https://github.com/pytorch/pytorch/issues/65816",
    "state": "closed",
    "labels": [],
    "created_at": "2021-09-29T13:02:10Z",
    "updated_at": "2021-10-01T18:00:20Z",
    "user": "M-Amrollahi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 65689,
    "title": "Questions in use pack_padded_sequence: how to pack Multiple tensor?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n- I have some problem in use pack_padded_sequence. I have some 2-dimensional data in varible length,but i can not use pack_padded_sequence to dealwith it.\r\n- \r\n```python\r\n#mydata seems like this\r\nimg=torch.from_numpy(np.array([[[1,2,3,4,5],[1,2,3,4,5]],[[1,2,3,4,0],[1,2,3,4,0]],[[1,2,3,0,0],[1,2,3,0,0]],[[1,2,0,0,0],[1,2,0,0,0]]]))\r\na=[[1,2,3,4,5],[1,2,3,4,5]]\r\nb=[[1,2,3,4],[1,2,3,4]]\r\nc=[[1,2,3],[1,2,3]]\r\n#so i deal with it by padding \r\nimg=torch.from_numpy(np.array([[[1,2,3,4,5],[1,2,3,4,5]],[[1,2,3,4,0],[1,2,3,4,0]],[[1,2,3,0,0],[1,2,3,0,0]],[[1,2,0,0,0],[1,2,0,0,0]]]))\r\nlabel=torch.from_numpy(np.array([[1],[2],[3],[3]]))\r\nlenght=torch.from_numpy(np.array([4,4,3,2]))\r\n\r\ntrain_ids=Data.TensorDataset(img,label,lenght)\r\ntrain_loader = Data.DataLoader(dataset=train_ids, batch_size=1, shuffle=False)\r\nfor step,(b_x, b_y,b_len) in enumerate(train_loader):\r\n    X= torch.nn.utils.rnn.pack_padded_sequence(b_x,b_len, batch_first=True,enforce_sorted=False)\r\n   #it canot be like  [[1,2,3,4],[1,2,3,4]] what could i do\r\n\r\n    print(step,X)\r\n    X, _ =nn.utils.rnn.pad_packed_sequence(X, batch_first=True)\r\n```\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/65689",
    "state": "closed",
    "labels": [],
    "created_at": "2021-09-27T13:02:55Z",
    "updated_at": "2021-09-27T23:31:06Z",
    "user": "jingxingzhi"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 52,
    "title": "Regenerate dataset-info instead of loading it?",
    "body": "Currently, getting the rows with `/rows` requires a previous (internal) call to `/infos` to get the features (type of the columns). But sometimes the dataset-info.json file is missing, or not coherent with the dataset script (for example: https://huggingface.co/datasets/lhoestq/custom_squad/tree/main), while we are using `datasets.get_dataset_infos()`, which only loads the exported dataset-info.json files:\r\n\r\nhttps://github.com/huggingface/datasets-preview-backend/blob/c2a78e7ce8e36cdf579fea805535fa9ef84a2027/src/datasets_preview_backend/queries/infos.py#L45\r\n\r\n\r\nhttps://github.com/huggingface/datasets/blob/26ff41aa3a642e46489db9e95be1e9a8c4e64bea/src/datasets/inspect.py#L115\r\n\r\n\r\nWe might want to call `._info()` from the builder to get the info, and features, instead of relying on the dataset-info.json file.\r\n",
    "url": "https://github.com/huggingface/dataset-viewer/issues/52",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-09-27T11:28:13Z",
    "updated_at": "2021-09-27T13:21:00Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 65682,
    "title": "How to export split to ONNX with dynamic split_size?",
    "body": "## \u2753 Questions and Help\r\nI need to implement dynamic tensor split op in work. But when I want to export this split op to ONNX with dynamic split_size, it seems not work. \r\n\r\nI am new to ONNX. Anyone can help me? Thanks a lot.\r\n\r\n## To Reproduce\r\n\r\n```python\r\nimport torch\r\n\r\ndummy_input = (torch.tensor([1, 4, 2, 7, 3]), torch.tensor([1, 2, 2]))\r\n\r\nclass Split(torch.nn.Module):\r\n    def forward(self, x, l):\r\n        return x.split(l.cpu().numpy().tolist(), dim=-1)\r\n    \r\nmodel = Split()\r\n\r\nwith torch.no_grad():\r\n    torch.onnx.export(\r\n        model, dummy_input, 'split.onnx', verbose=False, opset_version=13,\r\n        input_names=['a', 'b'],\r\n        output_names=['c'],\r\n        dynamic_axes={'a': [0], 'b': [0], 'c': [0]}\r\n    )\r\n```\r\nwhen I use the onnx model, it seems not to work. I get this error:\r\n[ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Invalid Feed Input Name:b\r\n\r\n```python\r\nimport onnxruntime as ort\r\n\r\nmodel_path = './split.onnx'\r\nsess = ort.InferenceSession(model_path)\r\n\r\na = torch.tensor([4, 2, 3, 4])\r\nb = torch.tensor([1, 3])\r\nsess.run(['c'], {'a':a.numpy(), 'b':b.numpy()})\r\n```\r\nTensor b seems can not be used as an input, but I do need a parameter to represent the dynamic split_size.\r\n\r\n## Environment\r\n- PyTorch Version (e.g., 1.0): 1.8.1+cu111\r\n- Python version: 3.8\r\n\n\ncc @BowenBao @neginraoof",
    "url": "https://github.com/pytorch/pytorch/issues/65682",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2021-09-27T09:27:15Z",
    "updated_at": "2022-10-27T20:57:22Z",
    "user": "Wwwwei"
  },
  {
    "repo": "huggingface/transformers",
    "number": 13747,
    "title": "I want to understand the source code of transformers. Where should I start? Is there a tutorial link? thank you very much!",
    "body": "I want to understand the source code of transformers. Where should I start? Is there a tutorial link? thank you very much!",
    "url": "https://github.com/huggingface/transformers/issues/13747",
    "state": "closed",
    "labels": [
      "Migration"
    ],
    "created_at": "2021-09-26T08:27:24Z",
    "updated_at": "2021-11-04T15:06:05Z",
    "user": "limengqigithub"
  },
  {
    "repo": "huggingface/accelerate",
    "number": 174,
    "title": "What is the recommended way of training GANs?",
    "body": "Currently, the examples folder doesn't contain any example of training GAN. I wonder what is the recommended way of handling multiple models and optimizers when using accelerate.\r\n\r\nIn terms of interface, `Accelerator.prepare` can wrap arbitrary number of models and optimizers at once. However, it seems to me that the current implementation of `Accelerator` only has one gradient scaler (when native amp is enabled), this might potentially cause issues for wrapping multiple optimizers with one `Accelerator` instance. One way of fixing this might be to move the ownership of `GradScaler` to an `AcceleratedOptimizer`, but this would case problems when calling `Accelerator.backward`.\r\n\r\nOn the other hand, to use deepspeed, one would have to create two `DeepSpeedEngine` instances to wrap two models. Maybe accelerate could follow this pattern, since deepspeed would be one of the supported backend.\r\n\r\nAnyway, I guess a minimum GAN training script should be added to examples as a guildline.",
    "url": "https://github.com/huggingface/accelerate/issues/174",
    "state": "closed",
    "labels": [],
    "created_at": "2021-09-26T07:30:41Z",
    "updated_at": "2023-10-24T17:55:15Z",
    "user": "yuxinyuan"
  },
  {
    "repo": "pytorch/torchx",
    "number": 199,
    "title": "Installation from source examples fail",
    "body": "## \ud83d\udcda Documentation\r\n\r\n## Link\r\n<!-- link to the problematic documentation -->\r\nhttps://github.com/pytorch/torchx#source\r\n\r\n## What does it currently say?\r\n<!-- copy paste the section that is wrong -->\r\n```bash\r\n# install torchx sdk and CLI from source\r\n$ pip install -e git+https://github.com/pytorch/torchx.git\r\n```\r\n\r\n## What should it say?\r\n<!-- the proposed new documentation -->\r\nNo idea.\r\n\r\n## Why?\r\n<!-- (if not clear from the proposal) why is the new proposed documentation more correct/improvement over the existing one? -->\r\nOn Linux:\r\n```\r\n(venv) sbyan % pip --version\r\npip 21.2.4 from /mnt/shared_ad2_mt1/sbyan/git/PrivateFederatedLearning/venv/lib64/python3.6/site-packages/pip (python 3.6)\r\n(venv) sbyan % pip install -e git+https://github.com/pytorch/torchx.git\r\nERROR: Could not detect requirement name for 'git+https://github.com/pytorch/torchx.git', please specify one with #egg=your_package_name\r\n```\r\n\r\n\r\nOn MacOS:\r\n```\r\n(venv) smb % pip --version\r\npip 21.2.4 from /Users/smb/Work/GIT/PrivateFederatedLearning/venv/lib/python3.9/site-packages/pip (python 3.9)\r\n(venv) smb % pip install -e git+https://github.com/pytorch/torchx.git\r\nERROR: Could not detect requirement name for 'git+https://github.com/pytorch/torchx.git', please specify one with #egg=your_package_name\r\n```\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/199",
    "state": "closed",
    "labels": [],
    "created_at": "2021-09-24T16:07:12Z",
    "updated_at": "2021-10-01T02:28:58Z",
    "comments": 2,
    "user": "stevebyan"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 48,
    "title": "\"flatten\" the nested values?",
    "body": "See https://huggingface.co/docs/datasets/process.html#flatten",
    "url": "https://github.com/huggingface/dataset-viewer/issues/48",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-09-24T12:58:34Z",
    "updated_at": "2022-09-16T20:10:22Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 45,
    "title": "use `environs` to manage the env vars?",
    "body": "https://pypi.org/project/environs/ instead of utils.py",
    "url": "https://github.com/huggingface/dataset-viewer/issues/45",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-09-24T08:05:38Z",
    "updated_at": "2022-09-19T08:49:33Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/torchx",
    "number": 197,
    "title": "Documentation feedback",
    "body": "## \ud83d\udcda Documentation\r\n\r\nAt a high level the repo really needs a glossary of terms in a single page otherwise easy to forget what they mean when you get to a new page. Lots of content can be deleted specifically the example application notebooks don't add anything relative to the pipeline examples.\r\n\r\nGeneral list of feedback - not sure how to fix yet so opening issue instead of PR\r\n\r\n### https://pytorch.org/torchx/latest/quickstart.html\r\n\r\n* Add a link to where built in are defined in the code\r\n\r\n\r\n### https://pytorch.org/torchx/latest/cli.html\r\n\r\n* App bundle is never defined - is it the app ID? in the docs `echo_c944ffb2`?\r\n\r\n### https://pytorch.org/torchx/latest/configure.html\r\n\r\n* One thing wasn't too clear is a resource basically number of CPUs and GPUs? Would be helpful to add some helper enum which includes something higher level like a V100 machine for provisioning\r\n\r\n### https://pytorch.org/torchx/latest/examples_apps/datapreproc/component.html#sphx-glr-examples-apps-datapreproc-component-py\r\n\r\n* Example has no main function\r\n\r\n### https://pytorch.org/torchx/latest/examples_apps/datapreproc/datapreproc.html#sphx-glr-examples-apps-datapreproc-datapreproc-py\r\n\r\nI'm not sure what the entire Application Examples notebooks do? May be best to refactor together with pipeline examples? Let me know I can send a PR to delete\r\n\r\n\r\n### https://pytorch.org/torchx/latest/examples_pipelines/kfp/intro_pipeline.html#sphx-glr-examples-pipelines-kfp-intro-pipeline-py\r\n\r\n* Make it clearer that pipeline.yaml is generated and not an input - I kept looking for it in the source directory\r\n\r\n### https://pytorch.org/torchx/latest/components/base.html\r\n\r\nWhy is torch.elastic mentioned here? Whole repo feels like it needs a glossary. For example by image do you mean docker image?\r\n\r\n### https://pytorch.org/torchx/latest/components/hpo.html\r\n\r\n* Just sat TBD - delete for now?\r\n\r\n### https://pytorch.org/torchx/latest/components/utils.html\r\n\r\n* Have a link to supported utils in the codebase\r\n\r\n### https://pytorch.org/torchx/latest/schedulers/kubernetes.html\r\n\r\n* This says coming soon but looks like feature is available?\r\n\r\n### https://pytorch.org/torchx/latest/beta.html\r\n\r\nAlso empty just remove\r\n\r\n\r\n\r\n\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/197",
    "state": "closed",
    "labels": [],
    "created_at": "2021-09-23T18:01:21Z",
    "updated_at": "2021-09-27T17:37:49Z",
    "comments": 4,
    "user": "msaroufim"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 41,
    "title": "Move benchmark to a different repo?",
    "body": "It's a client of the API",
    "url": "https://github.com/huggingface/dataset-viewer/issues/41",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-09-23T10:44:08Z",
    "updated_at": "2021-10-12T08:49:11Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 35,
    "title": "Refresh the cache?",
    "body": "Force a cache refresh on a regular basis (cron)",
    "url": "https://github.com/huggingface/dataset-viewer/issues/35",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-09-23T09:36:02Z",
    "updated_at": "2021-10-12T08:34:41Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1692,
    "title": "UserWarning during Datasets & DataLoaders Tutorial",
    "body": "Hi,\r\n\r\nI am following the 'Introduction to PyTorch' tutorial. During [Datasets & DataLoaders](https://pytorch.org/tutorials/beginner/basics/data_tutorial.html) I copied the following:\r\n\r\n```import torch\r\nfrom torch.utils.data import Dataset\r\nfrom torchvision import datasets\r\nfrom torchvision.transforms import ToTensor\r\nimport matplotlib.pyplot as plt\r\n\r\ntraining_data = datasets.FashionMNIST(\r\n    root=\"data\",\r\n    train=True,\r\n    download=True,\r\n    transform=ToTensor()\r\n)\r\ntest_data = datasets.FashionMNIST(\r\n    root=\"data\",\r\n    train=False,\r\n    download=True,\r\n    transform=ToTensor()\r\n)\r\n```\r\n\r\nWhich led me to the following warning:\r\n\r\n```/home/jelle/PycharmProjects/pytoch_learning/venv/lib/python3.9/site-packages/torchvision/datasets/mnist.py:498:\r\n UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means\r\n  you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the\r\n  array to protect its data or make it writeable before converting it to a tensor. This type of warning will be \r\n  suppressed for the rest of this program. (Triggered internally at  ../torch/csrc/utils/tensor_numpy.cpp:180.)\r\n  return torch.from_numpy(parsed.astype(m[2], copy=False)).view(*s)\r\n  ```\r\n\r\nIt seems this issue has been solved before? \r\n[47160](https://github.com/pytorch/pytorch/issues/47160)\r\n\r\nI am using\r\n\r\n- Python 3.9\r\n- torch 1.9.1\r\n- torchvision 0.10.1\r\n- numpy 1.21.2\r\n- Pycharm 2021.2\r\n- Ubuntu 21.4\r\n\r\nI installed using a virtual environment and the guide on https://pytorch.org/get-started/locally/\r\n`pip3 install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html`\r\n\r\nThis warning was also given during the 'quickstart' tutorial. The warning seems to have no further effect on the tutorial.\r\nWhy is the warning not mentioned in the tutorial?\n\ncc @suraj813",
    "url": "https://github.com/pytorch/tutorials/issues/1692",
    "state": "closed",
    "labels": [
      "intro",
      "docathon-h1-2023",
      "easy"
    ],
    "created_at": "2021-09-23T06:07:54Z",
    "updated_at": "2023-06-08T17:07:12Z",
    "comments": 12,
    "user": "Jelle-Bijlsma"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 632,
    "title": "\u2753 [Question] Unknown type name '__torch__.torch.classes.tensorrt.Engine'",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\nwhen I tried to load trt module which saved with python\r\n```\r\ntorch::jit::load(trtorch_path);\r\n```\r\nI got this error \r\n\r\n```\r\nterminate called after throwing an instance of 'torch::jit::ErrorReport'\r\n  what():  \r\nUnknown type name '__torch__.torch.classes.tensorrt.Engine':\r\nSerialized   File \"code/__torch__/models/backbone.py\", line 4\r\n  __parameters__ = []\r\n  __buffers__ = []\r\n  __torch___models_backbone_Backbone_trt_engine_ : __torch__.torch.classes.tensorrt.Engine\r\n                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n  def forward(self_1: __torch__.models.backbone.Backbone_trt,\r\n    input_0: Tensor) -> Tensor:\r\n```\r\n\r\nI linked libtrtorch.so as bellow\r\n```\r\ntarget_link_libraries(\r\n    ${ProjectTargetLibName}\r\n    PRIVATE\r\n        ${TORCH_LIBRARIES}\r\n        /opt/trtorch/lib/libtrtorch.so\r\n)\r\n```\r\nmaybe I need to compile trt_module in c++ instead of python??\r\n\r\n## What you have already tried\r\n\r\nI can save trt_module and load and run with python without any problem\r\n\r\n\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n\r\n## Environment\r\n - PyTorch 1.9\r\n - Libtorch 1.9\r\n - OS (Linux):\r\n - CUDA 11.0:\r\n - TensorRT 8.0\r\n - TRTorch 0.4(libtrtorch-v0.4.0-cudnn8.2-tensorrt8.0-cuda11.1-libtorch-1.9.0.tar.gz)\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/632",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-09-22T08:45:45Z",
    "updated_at": "2021-09-27T14:38:21Z",
    "user": "yokosyun"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 65446,
    "title": "libtorch compile problem. How to get the correct protobuf version? what PROTOBUF_VERSION <3011000 and 3011004 <PROTOBUF_MIN_PROTOC_VERSION?",
    "body": "How to get the correct protobuf version?\r\n\r\nWhen using libtorch to compile, using PROTOBUF_VERSION <3011000 and 3011004 <PROTOBUF_MIN_PROTOC_VERSION will report an error, which version should be used? 3011000 also did not show any content, thank you\r\n\r\nlibtorch ==libtorch-cxx11-abi-shared-with-deps-1.9.0+cu102.zip\r\ntorchvision = v0.10.0\r\nCompiled protobuf version = 3.18.0\r\n\r\nerror info:\r\n![image](https://user-images.githubusercontent.com/22077027/134283505-374d684d-7b62-4c57-a97b-bd57a8ce50d5.png)\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/22077027/134283532-aa08517a-a43a-48e0-b16a-be76a109b7b6.png)\r\n\r\n\r\n\r\n## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1.\r\n1.\r\n1.\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n## Environment\r\n\r\nPlease copy and paste the output from our\r\n[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)\r\n(or fill out the checklist below manually).\r\n\r\nYou can get the script and run it with:\r\n```\r\nwget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py\r\n# For security purposes, please check the contents of collect_env.py before running it.\r\npython collect_env.py\r\n```\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, source):\r\n - Build command you used (if compiling from source):\r\n - Python version:\r\n - CUDA/cuDNN version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n\n\ncc @malfet @seemethere",
    "url": "https://github.com/pytorch/pytorch/issues/65446",
    "state": "open",
    "labels": [
      "module: build",
      "module: protobuf",
      "triaged"
    ],
    "created_at": "2021-09-22T04:28:27Z",
    "updated_at": "2021-09-22T14:27:18Z",
    "user": "ahong007007"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 65312,
    "title": "How to get the same RandomResizedCrop result of img and gt",
    "body": "my code snippet is below\r\n![TIM\u56fe\u724720210919214656](https://user-images.githubusercontent.com/54461374/133929974-1baa0031-3562-45ea-95b9-68555206a1eb.png)\r\n![TIM\u56fe\u724720210919214702](https://user-images.githubusercontent.com/54461374/133929964-acf0cb30-dbeb-4d6e-934e-b5af92b00d5d.png)\r\n\r\nNow ,the img ,gt do different RandomResizedCrop. But I want they do the same, because the img and gt must be correspond.\r\nHow should I modify the code?",
    "url": "https://github.com/pytorch/pytorch/issues/65312",
    "state": "closed",
    "labels": [],
    "created_at": "2021-09-19T13:54:59Z",
    "updated_at": "2021-09-21T03:17:23Z",
    "user": "HaoRan-hash"
  },
  {
    "repo": "pytorch/vision",
    "number": 4446,
    "title": "Question:  FFmpeg dependency",
    "body": "Sorry, I am little bit of a newbie on this subject.  I notice at Torchvision 0.9+ that ffmpeg >= 4.2 is a hard dependency for Linux conda distributions.  At Torchvision <= 0.8.2, this was not a dependency.  We all know ffmpeg licensing and the other dependencies it pulls in is problematic in some scenarios.\r\n\r\nQuestion 1:  Is it possible to build Torchvision for Linux without ffmpeg?  What breaks?\r\nQuestion 2:  If I manually alter the .bz2 file from Anaconda.org to remove the ffmpeg dependency, what breaks?\r\n\r\nAny other suggestions?",
    "url": "https://github.com/pytorch/vision/issues/4446",
    "state": "closed",
    "labels": [
      "question",
      "topic: build"
    ],
    "created_at": "2021-09-19T11:21:21Z",
    "updated_at": "2021-09-24T19:36:12Z",
    "user": "rwmajor2"
  },
  {
    "repo": "pytorch/vision",
    "number": 4445,
    "title": "How to use TenCrop and FiveCrop on video",
    "body": "Hi everyone,\r\nI am wanting to use TenCrop and FiveCrop on video but I have no idea how to do this.\r\nCan you tell me how to do it?\r\nSorry, I am new to this field.\r\nThank you very much!",
    "url": "https://github.com/pytorch/vision/issues/4445",
    "state": "open",
    "labels": [
      "question",
      "module: video"
    ],
    "created_at": "2021-09-18T16:08:03Z",
    "updated_at": "2021-09-19T12:33:10Z",
    "user": "DungVo1507"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 30,
    "title": "Use FastAPI instead of only Starlette?",
    "body": "It would allow to have doc, and surely a lot of other benefits",
    "url": "https://github.com/huggingface/dataset-viewer/issues/30",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-09-17T14:45:40Z",
    "updated_at": "2021-09-20T10:25:17Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 65199,
    "title": "How to register a Module as one custom OP when export to onnx",
    "body": "## \u2753 How to register a Module as one custom OP when export to onnx\r\n\r\nThe custom modules may be split to multiple OPs when using `torch.onnx.export`.  In many cases, we can manually optimize these OPs into a custom OP(with a custom node in onnx), and handle it by a plugin in TensorRT. Is there any way to register a Module as one custom OP when export to onnx?\n\ncc @BowenBao @neginraoof",
    "url": "https://github.com/pytorch/pytorch/issues/65199",
    "state": "closed",
    "labels": [
      "module: onnx"
    ],
    "created_at": "2021-09-17T06:01:28Z",
    "updated_at": "2024-02-01T02:38:25Z",
    "user": "OYCN"
  },
  {
    "repo": "pytorch/torchx",
    "number": 184,
    "title": "Update builtin components to use best practices + documentation",
    "body": "Before stable release we want to do some general cleanups on the current built in components.\r\n\r\n- [ ] all components should default to docker images (no /tmp)\r\n- [ ] all components should use `python -m` entrypoints to make it easier to support all environments by using python's resolution system\r\n- [ ] update the component best practice documentation to indicate above\r\n\r\nSlurm image handling will be revisited later to make it easier to deal with virtualenvs and the local paths.",
    "url": "https://github.com/meta-pytorch/torchx/issues/184",
    "state": "closed",
    "labels": [
      "documentation",
      "enhancement",
      "module: components"
    ],
    "created_at": "2021-09-16T23:16:52Z",
    "updated_at": "2021-09-21T20:59:19Z",
    "comments": 0,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 626,
    "title": "\u2753 [Question] How to install trtorchc? ",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\nHow to install trtorchc?\r\n## What you have already tried\r\nI use Dockerfile.21.07 build the docker. I found the trtorchc can't be used.\r\nSo I run `bazel build //cpp/bin/trtorchc --cxxopt=\"-DNDEBUG` to build the trtorchc.\r\nHowever, it doesn't work.\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture:\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/626",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-09-16T10:32:47Z",
    "updated_at": "2021-09-16T15:54:00Z",
    "user": "shiyongming"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 65132,
    "title": "How to reference a tensor variable from a superclass of `torch.Tensor`?",
    "body": "Consider I have the following code where I subclass `torch.Tensor`. I'd like to avoid using `self.t_` and instead access the tensor variable in the superclass. Though, when looking at the PyTorch code, I don't seem to identify how that can be done. Your help is appreciated.\r\n\r\n```\r\nclass XLATensor(torch.Tensor):\r\n    def __init__(self, data, **kwargs):\r\n        self.t_ = torch.as_tensor(data, dtype=torch.float32, **kwargs)\r\n```\r\n\r\nThis [`document`](https://docs.google.com/document/d/1u5kJ18HKnoJ-i8shymt__wRrnw-eYII3c-AHUlnky-s/edit?resourcekey=0-THFZXxHHehVBA-oBsLU0Jw#heading=h.9iwsbbqufptx) contains more details regarding my question.\r\n\r\nCC @albanD, @wconstab, @ezyang \r\n\n\ncc @bdhirsh",
    "url": "https://github.com/pytorch/pytorch/issues/65132",
    "state": "open",
    "labels": [
      "triaged",
      "module: xla"
    ],
    "created_at": "2021-09-16T07:31:05Z",
    "updated_at": "2021-09-16T21:35:37Z",
    "user": "miladm"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 64939,
    "title": "BC CI error message should link to some information about how to squash the warning",
    "body": "## \ud83d\ude80 Feature\r\nThe BC CI error message says:\r\n```\r\nThe PR is introducing backward incompatible changes to the operator library. Please contact PyTorch team to confirm whether this change is wanted or not. \r\n```\r\n\r\nI know the change is wanted, but I don't remember how to actually \"add the change so that the BC mechanism stops complaining\". This information can easily be found by searching the codebase or looking for similar PRs, but it would be nice if we just linked directly to a note or a wiki page or something so that we don't have to go searching around every time.\r\n\r\n## Motivation\r\n\r\nSave devs (old and new) some time when reading the message!\r\n\r\n## Pitch\r\n\r\nThe error message should be improved with a \"see this link for more details\"\r\n\r\n## Alternatives\r\n\r\nNot sure\r\n\n\ncc @ezyang @seemethere @malfet @lg20987 @pytorch/pytorch-dev-infra",
    "url": "https://github.com/pytorch/pytorch/issues/64939",
    "state": "open",
    "labels": [
      "module: ci",
      "triaged",
      "better-engineering"
    ],
    "created_at": "2021-09-13T17:33:53Z",
    "updated_at": "2021-09-13T17:38:17Z",
    "user": "zou3519"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 64904,
    "title": "How to use python to implement _VF.lstm",
    "body": "## How to use python to implement _VF.lstm\r\n\r\nHello! When I want to modify the calculation formula of the LSTM\uff0cI found the calculation process in nn.LSTM is realized by _VF.lstm. I found the \"_VF.lstm\" is written by C++, and I can't find the RNN.cpp in my computer.\r\n\r\nSo I wanna implement _VF.lstm by using python, can u help me? \r\nLooking forward to your reply\uff01 Thanks a lot\uff01\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/64904",
    "state": "closed",
    "labels": [],
    "created_at": "2021-09-13T06:41:39Z",
    "updated_at": "2021-09-14T02:37:26Z",
    "user": "TimothyLiuu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 64793,
    "title": "How to get \"finfo\" in C++ torchlib like that in pytorch",
    "body": "I am using  C++ torchlib, but I don't know what to do it in c++ like that in pytorch:\r\n```python \r\n        min_real = torch.finfo(self.logits.dtype).min\r\n# or\r\n        min_real = torch.finfo(self.logits.dtype).tiny\r\n\r\n```\n\ncc @yf225 @glaringlee",
    "url": "https://github.com/pytorch/pytorch/issues/64793",
    "state": "closed",
    "labels": [
      "module: cpp",
      "triaged"
    ],
    "created_at": "2021-09-10T01:37:53Z",
    "updated_at": "2021-09-13T01:13:27Z",
    "user": "dbsxdbsx"
  },
  {
    "repo": "huggingface/datasets",
    "number": 2888,
    "title": "v1.11.1 release date",
    "body": "Hello, i need to use latest features in one of my packages but there have been no new datasets release since 2 months ago.\r\n\r\nWhen do you plan to publush v1.11.1 release?",
    "url": "https://github.com/huggingface/datasets/issues/2888",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-09-09T21:53:15Z",
    "updated_at": "2021-09-12T20:18:35Z",
    "user": "fcakyon"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 620,
    "title": "\u2753 [Question] Is it possible to install TRTorch with CUDA 11.1 support on aarch64?",
    "body": "# \u2753 Question\r\nis there a particular reason why there is no pre-built wheel file for the combination of CUDA11.1 + aarch64\r\n\r\n# What you have already tried\r\nI have tried to install wheel files for CUDA 10.2 aarch64 but it obviously didn't work because it tried to find the CUDA 10.2 libraries.\r\n\r\n# Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n- PyTorch Version (e.g., 1.0): 1.9.0\r\n- CPU Architecture: 8.6\r\n- OS (e.g., Linux): Linux\r\n- How you installed PyTorch (conda, pip, libtorch, source): pip\r\n- Build command you used (if compiling from source): pip install\r\n- Are you using local sources or building from archives: building from archives\r\n- Python version: 3.6\r\n- CUDA version: 11.1\r\n- GPU models and configuration: Nvida RTX 6000\r\n- Any other relevant information: N/A\r\n\r\nMy question would be, is there a particular reason why there is no pre-built wheel file for the combination of CUDA11.1 + aarch64?\r\n\r\nThank you!",
    "url": "https://github.com/pytorch/TensorRT/issues/620",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-09-09T00:45:37Z",
    "updated_at": "2021-12-20T00:01:58Z",
    "user": "lppllppl920"
  },
  {
    "repo": "pytorch/text",
    "number": 1386,
    "title": "how to make clear what  torchtext._torchtext module do\uff0cwhen i import something from the module.",
    "body": "## \ud83d\udcda Documentation\r\n\r\n**Description**\r\nyesterday\uff0ci learn Vectors and Vocab from torchtext 0.5. But today, i update it to torchtext0.10 by pip install --upgrade,and then,  i found Vocab is changed.\r\nNow, when you use the method 'torchtext.vocab.build_vocab_from_iterator' to create instance of Vocab, you will call the method 'torchtext._torchtext.Vocab'.\r\nThen, i want to know clear what  torchtext._torchtext module do, so i find the file named '_torchtext.pyd'. But it is unreadable by humans. Why torchtext write it to '.pyd' file? How to really know about it but not just invoke it?\r\nThanks.",
    "url": "https://github.com/pytorch/text/issues/1386",
    "state": "open",
    "labels": [],
    "created_at": "2021-09-05T07:41:13Z",
    "updated_at": "2021-09-13T20:57:01Z",
    "user": "wn1652400018"
  },
  {
    "repo": "pytorch/xla",
    "number": 3114,
    "title": "How to aggregate the results running on multiple tpu cores",
    "body": "## \u2753 Questions and Help\r\nHi, How can we aggregate the results or say combine all the predictions and use it further.\r\n\r\nI understand this could be a issue addressed earlier, if yes please share some links related to this\r\n```\r\ndef _run():\r\n    <model loading,  training arguments and etc >\r\n    # using hugging face Trainer fn\r\n    trainer = Trainer(\r\n        model=model,\r\n        args=training_args,\r\n        train_dataset=data_train,\r\n        tokenizer=tokenizer,\r\n        eval_dataset=data_val,\r\n        compute_metrics=compute_metrics,\r\n\r\n    )\r\n    trainer.train()\r\n    results = trainer.evaluate()\r\n    return results\r\n\r\ndef _mp_fn(rank, flags):\r\n    results = _run()\r\n\r\nFLAGS={}\r\nxmp.spawn(_mp_fn, args=(FLAGS,), nprocs=8, start_method='fork')\r\n```",
    "url": "https://github.com/pytorch/xla/issues/3114",
    "state": "closed",
    "labels": [],
    "created_at": "2021-09-03T05:13:35Z",
    "updated_at": "2021-09-04T08:21:31Z",
    "user": "pradeepkr12"
  },
  {
    "repo": "pytorch/serve",
    "number": 1227,
    "title": "How to torch-model-archiver directory with its content?",
    "body": "I'm trying to generate .mar file which contain some extra files including a directory. I'm not sure how can I add that. Here is what I'm trying to archive:\r\n\r\n\r\n```bash\r\nmy_model/\r\n\u251c\u2500\u2500 [4.0K]  1_Pooling\r\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 [ 190]  config.json\r\n\u251c\u2500\u2500 [ 696]  config.json\r\n\u251c\u2500\u2500 [ 122]  config_sentence_transformers.json\r\n\u251c\u2500\u2500 [ 168]  handler.py\r\n\u251c\u2500\u2500 [ 276]  model_setup_config.json\r\n\u251c\u2500\u2500 [ 229]  modules.json\r\n\u251c\u2500\u2500 [ 87M]  pytorch_model.bin\r\n\u251c\u2500\u2500 [  53]  sentence_bert_config.json\r\n\u251c\u2500\u2500 [ 112]  special_tokens_map.json\r\n\u251c\u2500\u2500 [455K]  tokenizer.json\r\n\u251c\u2500\u2500 [ 591]  tokenizer_config.json\r\n\u2514\u2500\u2500 [226K]  vocab.txt\r\n```\r\n\r\nHere is my `torch-model-archiver` command which is replacing `my_model/config.json` with `my_model/1_Pooling/config.json` in model.mar file.\r\n\r\n```bash\r\n$ torch-model-archiver \\\r\n--model-name my_model \\\r\n--version 1.0 \\\r\n--serialized-file ../pytorch_model.bin \\\r\n--handler ../handler.py \\\r\n--extra-files \"../config.json,../config_sentence_transformers.json,../modules.json,../sentence_bert_config.json,../special_tokens_map.json,../tokenizer.json,../tokenizer_config.json,../vocab.txt,../1_Pooling/config.json,../model_setup_config.json\"\r\n```\r\n\r\nHow can I keep the `1_Pooling/` directory as it is in .mar file with all its content? ",
    "url": "https://github.com/pytorch/serve/issues/1227",
    "state": "closed",
    "labels": [
      "triaged_wait"
    ],
    "created_at": "2021-09-01T19:44:08Z",
    "updated_at": "2021-09-01T21:06:36Z",
    "user": "spate141"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 18,
    "title": "CI: how to acknowledge a \"safety\" warning?",
    "body": "We use `safety` to check vulnerabilities in the dependencies. But in the case below, `tensorflow` is marked as insecure while the last published version on pipy is still 2.6.0. What to do in this case?\r\n\r\n```\r\n+==============================================================================+\r\n|                                                                              |\r\n|                               /$$$$$$            /$$                         |\r\n|                              /$$__  $$          | $$                         |\r\n|           /$$$$$$$  /$$$$$$ | $$  \\__//$$$$$$  /$$$$$$   /$$   /$$           |\r\n|          /$$_____/ |____  $$| $$$$   /$$__  $$|_  $$_/  | $$  | $$           |\r\n|         |  $$$$$$   /$$$$$$$| $$_/  | $$$$$$$$  | $$    | $$  | $$           |\r\n|          \\____  $$ /$$__  $$| $$    | $$_____/  | $$ /$$| $$  | $$           |\r\n|          /$$$$$$$/|  $$$$$$$| $$    |  $$$$$$$  |  $$$$/|  $$$$$$$           |\r\n|         |_______/  \\_______/|__/     \\_______/   \\___/   \\____  $$           |\r\n|                                                          /$$  | $$           |\r\n|                                                         |  $$$$$$/           |\r\n|  by pyup.io                                              \\______/            |\r\n|                                                                              |\r\n+==============================================================================+\r\n| REPORT                                                                       |\r\n| checked 137 packages, using free DB (updated once a month)                   |\r\n+============================+===========+==========================+==========+\r\n| package                    | installed | affected                 | ID       |\r\n+============================+===========+==========================+==========+\r\n| tensorflow                 | 2.6.0     | ==2.6.0                  | 41161    |\r\n+==============================================================================+\r\n```",
    "url": "https://github.com/huggingface/dataset-viewer/issues/18",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-09-01T07:20:45Z",
    "updated_at": "2021-09-15T11:58:56Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 64334,
    "title": "How to add nan value judgment for variable t0_1 in fused_clamp kernel generated by torch/csrc/jit/tensorexpr/cuda_codegen.cpp.",
    "body": "For this python program:\r\n\r\n```import torch\r\n\r\ntorch._C._jit_set_profiling_executor(True)\r\ntorch._C._jit_set_profiling_mode(True)\r\ntorch._C._jit_override_can_fuse_on_cpu(True)\r\ntorch._C._jit_override_can_fuse_on_gpu(True)\r\ntorch._C._debug_set_fusion_group_inlining(False)\r\ntorch._C._jit_set_texpr_fuser_enabled(True)\r\n\r\ndef func2(a, b):\r\n    return torch.clamp(a + b, min=0, max=2)\r\n\r\ndevice = 'cuda'\r\na = torch.randn(4, 4, dtype=torch.float, device=device, requires_grad=True)\r\nnan = torch.tensor(float('nan'), dtype=torch.float, device=device)\r\n\r\nscripted_fn = torch.jit.script(func2)\r\nscript_outputs = scripted_fn(a,nan)\r\nopt_script_outputs = scripted_fn(a,nan)\r\n\r\nprint(script_outputs.detach().cpu())\r\nprint(opt_script_outputs.detach().cpu())\r\n```\r\n\r\nthis program will call 2 cuda kernel:\r\nclamp_kernel_cuda is show as follow,\r\n\r\n```\r\nvoid clamp_kernel_cuda(TensorIterator& iter, Scalar min_value, Scalar max_value) {\r\n  AT_DISPATCH_ALL_TYPES_AND2(kHalf, kBFloat16, iter.dtype(), \"clamp_cuda\", [&]() {\r\n    auto lower = min_value.to<scalar_t>();\r\n    auto upper = max_value.to<scalar_t>();\r\n    gpu_kernel(iter, [=]GPU_LAMBDA(scalar_t v) -> scalar_t {\r\n      // Propagate nan, which doesn't propagate automatically for ROCm\r\n      if (_isnan(v)) {\r\n        return v;\r\n      } else {\r\n        return ::min(::max(v, lower), upper);\r\n      }\r\n    });\r\n  });\r\n}\r\n```\r\nand jit codegen kernel is show as follow,\r\n\r\n```\r\nextern \"C\" __global__\r\nvoid fused_clamp(float* t0, float* aten_clamp) \r\n{\r\n  if (512 * blockIdx.x + threadIdx.x<16 ? 1 : 0) {\r\n    float t0_1 = t0[512 * blockIdx.x + threadIdx.x];\r\n    aten_clamp[512 * blockIdx.x + threadIdx.x] = (t0_1<0.f ? 0.f : t0_1)>2.f ? 2.f : (t0_1<0.f ? 0.f : t0_1);\r\n    }\r\n  }\r\n}\r\n```\r\nMy question is why not to add nan value judgment for variable t0_1, expect generated kernel is show as follows,\r\n\r\n```\r\nextern \"C\" __global__\r\nvoid fused_clamp(float* t0, float* aten_clamp) \r\n{\r\n  if (512 * blockIdx.x + threadIdx.x<16 ? 1 : 0) {\r\n    float t0_1 = t0[512 * blockIdx.x + threadIdx.x];\r\n    aten_clamp[512 * blockIdx.x + threadIdx.x] = isnan(t0_1) ? t0_1 : ((t0_1<0.f ? 0.f : t0_1)>2.f ? 2.f : (t0_1<0.f ? 0.f : t0_1));\r\n    }\r\n  }\r\n}\r\n```\r\nFor AMD device(ROCM), if not nan value judgment, fused_clamp kernel will return 0 without nan. If we want to generate fused_clamp kernel as above, how to modify code in torch/csrc/jit/tensorexpr/kernel.cpp:979, \r\n```\r\n\r\n```\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/64334",
    "state": "open",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2021-09-01T02:35:39Z",
    "updated_at": "2021-09-01T02:53:24Z",
    "user": "HangJie720"
  },
  {
    "repo": "pytorch/functorch",
    "number": 106,
    "title": "how to install torch>=1.10.0.dev",
    "body": "when I run this command\r\npip install --user \"git+https://github.com/facebookresearch/functorch.git\"\r\n\r\nERROR: Could not find a version that satisfies the requirement torch>=1.10.0.dev",
    "url": "https://github.com/pytorch/functorch/issues/106",
    "state": "open",
    "labels": [],
    "created_at": "2021-08-31T09:28:39Z",
    "updated_at": "2021-11-05T15:45:05Z",
    "user": "agdkyang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 64247,
    "title": "How to optimize jit-script model performance (backend device is gpu)",
    "body": "I have lots of script models, Now I want to optimize their performance, the bacnkend is gpu && project is written in c++ api(torch::jit::load). \r\nDoes there any ways to do this optimize?\r\nRecently, I find that pytorch support cuda-graph now, maybe this should be a way to optimize performance.\r\nBut there are few documents about how to use this feature in c++. Can you give me some examples about how to use cuda-graph in c++ api with script model? \r\nThanks very much!   :)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/64247",
    "state": "open",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2021-08-31T05:31:44Z",
    "updated_at": "2021-08-31T05:31:46Z",
    "user": "fwz-fpga"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 64206,
    "title": "Document how to generate Pybind bindings for C++ Autograd",
    "body": "## \ud83d\ude80 Feature\r\nhttps://pytorch.org/tutorials/advanced/cpp_autograd.html provides a good example on how to define your own function with a forward and backward pass, along with registering it with the autograd system. However, it lacks any information on how to actually link this module to use in Python / Pytorch / Pybind. There is this one example that shows it in a hacky way (https://pytorch.org/tutorials/advanced/cpp_extension.html), but I want something I can include directly in Pybind.\r\n\r\nEg. something like this which doesnt work\r\n```\r\n  py::class_<LinearFunction, std::shared_ptr<LinearFunction>>(\r\n    m, \"LinearFunction\")\r\n    .def(py::init<>())\r\n    .def(\"forward\", &LinearFunction::forward)\r\n    .def(\"backward\", &LinearFunction::backward);\r\n```\r\n\n\ncc @yf225 @glaringlee",
    "url": "https://github.com/pytorch/pytorch/issues/64206",
    "state": "open",
    "labels": [
      "module: cpp",
      "triaged"
    ],
    "created_at": "2021-08-30T18:12:12Z",
    "updated_at": "2021-08-31T14:20:23Z",
    "user": "yaadhavraajagility"
  },
  {
    "repo": "huggingface/transformers",
    "number": 13331,
    "title": "bert:What is the tf version corresponding to tensformers?",
    "body": " I use python3.7, tf2.4.0, cuda11.1 and cudnn 8.0.4 to run bert-base-un and report an error\r\n- albert, bert, xlm: @LysandreJik\r\n- tensorflow: @Rocketkn\r\n",
    "url": "https://github.com/huggingface/transformers/issues/13331",
    "state": "closed",
    "labels": [],
    "created_at": "2021-08-30T11:42:36Z",
    "updated_at": "2021-08-30T15:46:16Z",
    "user": "xmcs111"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1662,
    "title": "seq2seq with character encoding",
    "body": "hi, i am hoping to build a seq2seq model with attention with character level encoding. idea is to build a model which can predict a correct name by handling all sort of spelling mistakes (qwerty keyboard error, double typing, omitting word etc.) . my test data will few example of mistyped words mapping to correct word. i am hoping i can mostly follow this https://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html and just change the input and output tensors to contain the character tensors..similar to a tutorial which predicts country by looking at last name. ( i think first one in nlp series)..does this approach make sense? is there any other thing i need to consider or better model to consider.\n\ncc @pytorch/team-text-core @Nayef211",
    "url": "https://github.com/pytorch/tutorials/issues/1662",
    "state": "closed",
    "labels": [
      "question",
      "Text",
      "module: torchtext"
    ],
    "created_at": "2021-08-30T04:10:01Z",
    "updated_at": "2023-03-06T23:54:02Z",
    "user": "manish-shukla01"
  },
  {
    "repo": "pytorch/vision",
    "number": 4332,
    "title": "Customize the number of input_channels in MobileNetv3_Large",
    "body": "I would like to know how to customize the MobileNetV3_Large torchvision model to accept single-channel inputs with number of classes = 2.\r\n\r\nAs mentioned in some of the PyTorch discussion forums, I have tried\r\n`model_ft.conv1 = nn.Conv2d(1, 64, kernel_size=7, stride=2, padding=3, bias=False)`\r\nwhich works for ResNet models but not MobileNetV3.\r\n\r\nAlso tried,\r\n`model.input_channels=1`\r\n\r\nI keep getting the error \r\n`Given groups=1, weight of size [16, 3, 3, 3], expected input[12, 1, 512, 512] to have 3 channels, but got 1 channels instead`\r\n\r\nPlease provide suggestions for customizing the MobileNet model to accept single channel input, as is possible in the case of ResNet. Repeating my input tensor to have 3 channels is not a solution I would be interested in. ",
    "url": "https://github.com/pytorch/vision/issues/4332",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-29T10:48:29Z",
    "updated_at": "2021-08-31T09:41:23Z",
    "user": "ananda1996ai"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 64094,
    "title": "Document how to disable python tests on CI through issues",
    "body": "## \ud83d\udcda Documentation\r\n\r\nWe should document the use of issues to disable tests in a public wiki.\r\n\n\ncc @ezyang @seemethere @malfet @walterddr @lg20987 @pytorch/pytorch-dev-infra",
    "url": "https://github.com/pytorch/pytorch/issues/64094",
    "state": "closed",
    "labels": [
      "module: ci",
      "triaged",
      "better-engineering",
      "actionable"
    ],
    "created_at": "2021-08-27T14:36:39Z",
    "updated_at": "2021-10-11T21:54:25Z",
    "user": "janeyx99"
  },
  {
    "repo": "pytorch/hub",
    "number": 222,
    "title": "torch.hub shouldn't assume model dependencies have __spec__ defined",
    "body": "**Problem**\r\nI'm using torch.hub to load a model that has the `transformers` library as a dependency, however, the last few versions of `transformes` haven't had `__spec__` defined. Currently, this gives an error with torch.hub when trying to load the model and checking that the dependencies exist with `importlib.util.find_spec(name)` inside `_check_module_exists()` ([source code](https://github.com/pytorch/pytorch/blob/b0396e39f41da9f61c61ed8758b5e9505a370ebc/torch/hub.py#L198)).\r\n\r\n**Solution**\r\nDon't check for `__spec__` when checking that a module exists.",
    "url": "https://github.com/pytorch/hub/issues/222",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-27T13:59:40Z",
    "updated_at": "2021-08-27T18:03:24Z",
    "user": "laurahanu"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1660,
    "title": "Visualizing the results from trained model",
    "body": "I wanted to know how to test any images on the pre-trained model from this tutorial : https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html#putting-everything-together  \r\n\r\n1) So given i maybe just have an image, how do i feed it to the model?\r\n2) How exactly did you arrive to these results? (image shown below)\r\n![image](https://user-images.githubusercontent.com/65582456/131035518-a9666522-c96b-4785-a291-cab0b2335810.png)",
    "url": "https://github.com/pytorch/tutorials/issues/1660",
    "state": "closed",
    "labels": [
      "question",
      "torchvision"
    ],
    "created_at": "2021-08-26T21:04:24Z",
    "updated_at": "2023-02-23T22:48:10Z",
    "user": "jspsiy"
  },
  {
    "repo": "pytorch/serve",
    "number": 1217,
    "title": "How to cache inferences with torchserve",
    "body": "Reference architecture showcasing how to cache inferences from torchserve\r\n\r\nSo potentially the `inference` handler would reach from some cloud cache or KV store\r\n\r\nThe benefit of this is it'd dramatically reduce latency for common queries\r\n\r\nProbably a good level 3-4 bootcamp task for a specific kind of KV store like Redis or specific cloud cache in AWS.",
    "url": "https://github.com/pytorch/serve/issues/1217",
    "state": "closed",
    "labels": [
      "good first issue"
    ],
    "created_at": "2021-08-26T18:00:51Z",
    "updated_at": "2021-10-07T04:36:17Z",
    "user": "msaroufim"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 15,
    "title": "Add an endpoint to get the dataset card?",
    "body": "See https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/hf_api.py#L427, `full` argument\r\n\r\nThe dataset card is the README.md.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/15",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-26T13:43:29Z",
    "updated_at": "2022-09-16T20:15:52Z",
    "user": "severo"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 12,
    "title": "Install the datasets that require manual download",
    "body": "Some datasets require a manual download (https://huggingface.co/datasets/arxiv_dataset, for example). We might manually download them on the server, so that the backend returns the rows, instead of an error.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/12",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-25T16:30:11Z",
    "updated_at": "2022-06-17T11:47:18Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/vision",
    "number": 4312,
    "title": "Hidden torch.flatten block in ResNet module",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\nThis bug arise when last 2 layers (avg pool and fc) are changed to nn.Identity\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\nimport torch\r\nimport torch.nn as nn\r\nimport torchvision\r\n\r\nresnet = torchvision.models.resnet18()\r\nresnet.avgpool = nn.Identity()\r\nresnet.fc = nn.Identity()\r\n\r\nimg = torch.randn([1,3,256,256])\r\n\r\nresnet(img).shape\r\n\r\n**Result:** torch.Size([1, 32768])\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n**Expected result:** torch.Size([1, 8, 8, 512])\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\nhttps://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py\r\nline 243 to delete",
    "url": "https://github.com/pytorch/vision/issues/4312",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-25T13:09:31Z",
    "updated_at": "2021-08-25T13:18:34Z",
    "user": "1paragraph"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 10,
    "title": "Use /info as the source for configs and splits?",
    "body": "It's a refactor. As the dataset info contains the configs and splits, maybe the code can be factorized. Before doing it: review the errors for /info, /configs, and /splits (https://observablehq.com/@huggingface/quality-assessment-of-datasets-loading) and ensure we will not increase the number of erroneous datasets.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/10",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-25T09:43:51Z",
    "updated_at": "2021-09-01T07:08:25Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 597,
    "title": "\u2753 [Question] request a converter: aten::lstm",
    "body": "ERROR: [TRTorch] - Requested converter for aten::lstm, but no such converter was found\r\nThanks",
    "url": "https://github.com/pytorch/TensorRT/issues/597",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-08-23T12:38:05Z",
    "updated_at": "2021-12-02T00:01:46Z",
    "user": "gaosanyuan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 596,
    "title": "\u2753 [Question] module 'trtorch' has no attribute 'Input'",
    "body": "Why the installed trtorch has no attribute 'Input'? Thanks\r\ntrtorch version: 0.3.0",
    "url": "https://github.com/pytorch/TensorRT/issues/596",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-23T12:17:20Z",
    "updated_at": "2021-08-23T16:32:26Z",
    "user": "gaosanyuan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 586,
    "title": "\u2753 [Question] Not faster vs torch::jit ",
    "body": "## \u2753 Question\r\nI run my model used TrTorch and torch::jit both on fp16 with C++ API,  but Trtorch is not faster than JIT.\r\nWhat can I do to get the reason? \r\n\r\nSome information may be helpful. \r\n1. I used two plugins to just call the libtorch function (inverse and grid_smapler).\r\n2. I fix some bugs by change the pytorch model code discript at #585 #584 \r\n3. I compile trtorch model and run it all with C++ API.\r\n4. the compile code is :\r\n```\r\nstd::cout << \"Load ts detector model ...\" << std::endl;\r\n    torch::jit::Module ts_detector_model;\r\n    try{\r\n        // Deserialize the ScriptModule from a file using torch::jit::load().\r\n        ts_detector_model = torch::jit::load(TS_DETECTOR_PATH);\r\n    }\r\n    catch (const c10::Error& e){\r\n        std::cerr << \"Error loading the model \\n\";\r\n        return -1;\r\n    }\r\n\r\n    // convert trt detector\r\n    std::cout << \"Convert trt detector model ...\" << std::endl;\r\n    ts_detector_model.to(at::kCUDA);\r\n    ts_detector_model.eval();\r\n\r\n    std::vector<trtorch::CompileSpec::Input> inputs_d = {\r\n      trtorch::CompileSpec::Input(std::vector<int64_t>({1, 3, 256, 256}), trtorch::CompileSpec::DataType::kHalf)};\r\n    auto info_d = trtorch::CompileSpec(inputs_d);\r\n    info_d.enabled_precisions.insert(trtorch::CompileSpec::DataType::kHalf);\r\n\r\n    auto trt_detector_model = trtorch::CompileGraph(ts_detector_model, info_d);\r\n   \r\n   // generator complied like above\r\n   ......\r\n```\r\n\r\n\r\nthe runtim code :\r\n```\r\ntorch::jit::Module trt_detector_model;\r\n    try{\r\n        // Deserialize the ScriptModule from a file using torch::jit::load().\r\n        trt_detector_model = torch::jit::load(TRT_DETECTOR_PATH);\r\n    }\r\n    catch (const c10::Error& e){\r\n        std::cerr << \"error loading the model \\n\";\r\n        return -1;\r\n    }\r\n    trt_detector_model.to(at::kCUDA);\r\n    trt_detector_model.eval();\r\n\r\n    torch::jit::Module trt_generator_model;\r\n    try{\r\n        // Deserialize the ScriptModule from a file using torch::jit::load().\r\n        trt_generator_model = torch::jit::load(TRT_GENERATOR_PATH);\r\n    }\r\n    catch (const c10::Error& e){\r\n        std::cerr << \"error loading the model \\n\";\r\n        return -1;\r\n    }\r\n    trt_generator_model.to(at::kCUDA);\r\n    trt_generator_model.eval();\r\n\r\n    std::cout << \"Run trt model ... \" << std::endl;\r\n    auto in0 = torch::ones({1, 3, 256, 256}, {torch::kCUDA}).to(torch::kFloat16);\r\n    std::cout << \"Run detector ... \" << std::endl;\r\n    auto out0_ = trt_detector_model.forward({in0});\r\n    auto out0 = out0_.toTuple()->elements()[1].toTensor();\r\n    std::cout << \"====\\tdetector out mean and std\\t====\" << std::endl;\r\n    std::cout << at::mean(out0) << \"\\n\" << at::std(out0) << std::endl;\r\n\r\n    auto in1 = torch::ones({1, 3, 256, 256}, {torch::kCUDA}).to(torch::kFloat16);\r\n    auto in2 = torch::ones({1, 10, 2}, {torch::kCUDA}).to(torch::kFloat16);\r\n    auto in3 = torch::ones({1, 10, 2}, {torch::kCUDA}).to(torch::kFloat16);\r\n    auto in4 = torch::ones({1, 10, 2, 2}, {torch::kCUDA}).to(torch::kFloat16);\r\n    std::cout << \"Run generator ... \" << std::endl;\r\n    auto out1 = trt_generator_model.forward({in1, in2, out0.to(torch::kFloat16), in3, in4}).toTensor();\r\n    std::cout << \"====\\tgenerator out mean and std\\t====\" << std::endl;\r\n```\r\n\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n> I build the Trtorch recently(21.8.19) use the master branch.\r\n\r\n - TRTorch Version (8.0.1.6): \r\n - PyTorch Version (libtorch 1.9.0):\r\n - OS (Ubuntu):\r\n - How you installed PyTorch (`libtorch):\r\n - Build command you used (bazel build //:libtrtorch --compilation_mode opt):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.8\r\n - CUDA version: 11.1\r\n - GPU models and configuration: GTX3070\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/586",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-08-19T13:06:37Z",
    "updated_at": "2022-03-10T00:02:16Z",
    "user": "JuncFang-git"
  },
  {
    "repo": "pytorch/vision",
    "number": 4292,
    "title": "about train fcn questions.",
    "body": "thanks for your great work!\r\n\r\nI have read https://github.com/pytorch/vision/blob/master/references/segmentation/train.py script. And there are some questions.\r\n\r\n1. why use aux_classifier for fcn, are there any references ?\r\n2. why is the learning rate of aux_classifier ten times that of base lr?https://github.com/pytorch/vision/blob/master/references/segmentation/train.py#L131\r\n3. If I want to fine-train fcn, how to set the appropriate learning rate? I use default learning rate 0.01 to train PASCAL VOC2012 with res50_rcn,  the result is bad(first epoch, mean IOU=10.1). If not train model, directly evaluate, mean IoU=69.  \r\n\n\ncc @datumbox",
    "url": "https://github.com/pytorch/vision/issues/4292",
    "state": "closed",
    "labels": [
      "question",
      "topic: object detection"
    ],
    "created_at": "2021-08-19T08:51:34Z",
    "updated_at": "2021-08-19T11:50:05Z",
    "user": "WZMIAOMIAO"
  },
  {
    "repo": "pytorch/xla",
    "number": 3090,
    "title": "How to concatenate all the predicted labels in XLA?",
    "body": "## \u2753 Questions and Help\r\nHi does anyone knows how to get all predicted labels from all 8 cores of XLA and concatenate them together?\r\n\r\nSay I have a model:\r\n`outputs = model(ids, mask, token_type_ids)`\r\n`_, pred_label = torch.max(outputs.data, dim = 1)`\r\n\r\nIf I do\r\n`all_predictions_np = pred_label.cpu().detach().numpy().tolist()`\r\n\r\napparently, this only sends the result to CPU from TPU core:0. How can I get all 8 cores and concatenate them together in the same list? I am not sure if `xm.all_gather() ` is used in this case?",
    "url": "https://github.com/pytorch/xla/issues/3090",
    "state": "closed",
    "labels": [],
    "created_at": "2021-08-19T01:13:39Z",
    "updated_at": "2021-08-19T20:51:58Z",
    "user": "gabrielwong1991"
  },
  {
    "repo": "pytorch/serve",
    "number": 1203,
    "title": "How to add a custom Handler?",
    "body": "## \ud83d\udcda Documentation\r\n\r\nHow to add custom handlers python files friendly and automatic?\r\n\r\nBy now, I understand that is necessary to modify `pytorch/serve` source code. is that correct?\r\n\r\nIn my case, I need a custom handler with\r\ninput: numpy array or json or list of numbers\r\noutput: numpy array or json or list of numbers\r\n\r\nI just want to do the inference in  `pytorch/serve`  because I have complex preprocess and postprocess in other microservice",
    "url": "https://github.com/pytorch/serve/issues/1203",
    "state": "closed",
    "labels": [],
    "created_at": "2021-08-18T01:43:40Z",
    "updated_at": "2021-08-18T20:01:54Z",
    "user": "pablodz"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 63395,
    "title": "How to efficiently (without looping) get data from tensor predicted by a torchscript in C++?",
    "body": "I am calling a torchscript (neural network serialized from Python) from a C++ program:\r\n\r\n```\r\n  // define inputs\r\n  int batch = 3; // batch size\r\n  int n_inp = 2; // number of inputs\r\n  double I[batch][n_inp] = {{1.0, 1.0}, {2.0, 3.0}, {4.0, 5.0}}; // some random input\r\n  std::cout << \"inputs\" \"\\n\";  // print inputs\r\n  for (int i = 0; i < batch; ++i)\r\n  {    \r\n    std::cout << \"\\n\";\r\n    for (int j = 0; j < n_inp; ++j)\r\n    {\r\n      std::cout << I[i][j] << \"\\n\";\r\n    }\r\n  }\r\n\r\n   // prepare inputs for feeding to neural network\r\n  std::vector<torch::jit::IValue> inputs;\r\n  inputs.push_back(torch::from_blob(I, {batch, n_inp}, at::kDouble));\r\n\r\n  // deserialize and load scriptmodule\r\n  torch::jit::script::Module module;\r\n  module = torch::jit::load(\"Net-0.pt\");\r\n\r\n  // do forward pass\r\n  auto outputs = module.forward(inputs).toTensor();\r\n```\r\n\r\nUsually, to get data from the outputs, the following (element-wise) operation is performed:\r\n\r\n```\r\n  // get data from outputs\r\n  std::cout << \"outputs\" << \"\\n\";\r\n  int n_out = 1;\r\n  double outputs_data[batch][n_out];\r\n  for (int i = 0; i < batch; i++) \r\n  {\r\n    for (int j = 0; j < n_out; j++)\r\n    {\r\n      outputs_data[i][j] = outputs[i][j].item<double>();\r\n      std::cout << outputs_data[i][j] << \"\\n\";\r\n    }\r\n  }\r\n```\r\n\r\nHowever, such looping using .item is highly inefficient (in the actual code I will have millions of points predicted at each time step). I want to get data from outputs directly (without looping over elements). I tried:\r\n\r\n  ```\r\nint n_out = 1;\r\n  double outputs_data[batch][n_out];\r\n  outputs_data = outputs.data_ptr<double>();\r\n```\r\nHowever, it is giving the error:\r\n\r\n```\r\nerror: incompatible types in assignment of \u2018double*\u2019 to \u2018double [batch][n_out]\u2019\r\n   outputs_data = outputs.data_ptr<double>();\r\n                                           ^\r\n```\r\nNote, that type of outputs_data is fixed to double and cannot be changed.\n\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/63395",
    "state": "open",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2021-08-17T12:42:58Z",
    "updated_at": "2021-11-28T03:54:22Z",
    "user": "aiskhak"
  },
  {
    "repo": "pytorch/hub",
    "number": 218,
    "title": "DeeplabV3-Resnet101. Where is the mIOU calculation and postprocessing code?",
    "body": "The following link mentions mIOU = 67.4\r\nhttps://pytorch.org/hub/pytorch_vision_deeplabv3_resnet101/\r\n\r\nIs there any codebase where we can refer the evaluation and postprocessing code?",
    "url": "https://github.com/pytorch/hub/issues/218",
    "state": "closed",
    "labels": [],
    "created_at": "2021-08-16T11:32:49Z",
    "updated_at": "2021-10-18T11:42:40Z",
    "user": "ashg1910"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 580,
    "title": "\u2753 [Question] How to convert nvinfer1::ITensor into at::tensor?",
    "body": "## \u2753 Question\r\nHi, \r\nHow to convert nvinfer1::ITensor into at::tensor?   Like   #146 \r\n\r\n## What you have already tried\r\n\r\nI want to do some operations use libtorch on the nvinfer1::ITensor. So, can I convert nvinfer1::ITensor into at::tensor? Or I must write a custom converter with the libtorch function?\r\n@xsacha @aaronp24 @itsliupeng @lukeyeager @elezar \r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/580",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-16T09:54:00Z",
    "updated_at": "2021-08-18T03:02:03Z",
    "user": "JuncFang-git"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 63304,
    "title": "How to build a release version libtorch1.8.1 on windows",
    "body": "\r\n## Issue description\r\nI am doing some work with libtorch on Windows 10 recently. I want to build the libtorch library since I have addedd some new features. The build work was done successfully on develop environment. However, when I copy the exe(including dependent DLLs) to another PC(running env, mentioned below), it could not run normally. I have also built the corresponding python package and it could run normally on the develop environment. Also, it shows that the official release version of 1.8.1 has more libs than mine.  It seems that the official version has more torch_cuda*.dll than mine and their size is relatively larger than mine.\r\nI just want to know how to configure the env and can build nearly the same as the official one.\r\n\r\nSelf-build release version\r\n2021/08/12  11:22           242,176 asmjit.dll\r\n2021/08/10  21:06            92,664 asmjit.lib\r\n2021/08/12  11:22           417,792 c10.dll\r\n2021/08/10  21:09           303,982 c10.lib\r\n2021/08/12  14:02        10,382,510 c10d.lib\r\n2021/08/12  11:25           246,784 c10_cuda.dll\r\n2021/08/10  21:09            27,942 c10_cuda.lib\r\n2021/08/12  14:03        20,131,328 caffe2_detectron_ops_gpu.dll\r\n2021/08/10  22:22            34,660 caffe2_detectron_ops_gpu.lib\r\n2021/08/12  14:02            70,144 caffe2_module_test_dynamic.dll\r\n2021/08/10  22:21            24,130 caffe2_module_test_dynamic.lib\r\n2021/08/12  11:25            15,872 caffe2_nvrtc.dll\r\n2021/08/10  21:09             1,850 caffe2_nvrtc.lib\r\n2021/08/12  11:21            18,316 clog.lib\r\n2021/08/12  11:21           118,076 cpuinfo.lib\r\n2021/08/12  11:25       323,147,004 dnnl.lib\r\n2021/08/12  11:22         3,282,432 fbgemm.dll\r\n2021/08/10  21:06         1,156,374 fbgemm.lib\r\n2021/08/12  11:22        15,456,424 gloo.lib\r\n2021/08/12  11:22        36,464,038 gloo_cuda.lib\r\n2021/08/12  14:00           135,168 jitbackend_test.dll\r\n2021/08/10  22:19            21,206 jitbackend_test.lib\r\n2015/01/22  09:23         1,146,272 libiomp5md.dll\r\n2021/08/12  11:20         5,220,954 libprotobuf-lite.lib\r\n2021/08/12  11:21        36,811,506 libprotobuf.lib\r\n2021/08/12  11:21        38,708,546 libprotoc.lib\r\n2021/08/12  11:25       323,147,004 mkldnn.lib\r\n2021/08/12  11:21           142,874 pthreadpool.lib\r\n2021/08/12  13:59             9,728 torch.dll\r\n2021/08/10  22:18             1,832 torch.lib\r\n2021/08/12  14:00           339,456 torchbind_test.dll\r\n2021/08/10  22:19            21,154 torchbind_test.lib\r\n2021/08/12  12:07       201,914,368 torch_cpu.dll\r\n2021/08/10  21:41        17,095,310 torch_cpu.lib\r\n2021/08/12  13:59       149,539,840 torch_cuda.dll\r\n2021/08/12  13:58         3,024,940 torch_cuda.lib\r\n2021/08/12  11:22             9,728 torch_global_deps.dll\r\n2020/09/18  19:02           195,072 uv.dll\r\n2021/08/12  11:21         5,984,034 XNNPACK.lib\r\n\r\nOfficial release version\r\n2021/03/24  11:07           241,664 asmjit.dll\r\n2021/03/24  11:07            92,664 asmjit.lib\r\n2021/03/24  11:08           418,304 c10.dll\r\n2021/03/24  11:08           303,982 c10.lib\r\n2021/03/24  12:44        10,209,446 c10d.lib\r\n2021/03/24  11:08           249,344 c10_cuda.dll\r\n2021/03/24  11:08            27,942 c10_cuda.lib\r\n2021/03/24  12:47        20,971,008 caffe2_detectron_ops_gpu.dll\r\n2021/03/24  12:47            34,660 caffe2_detectron_ops_gpu.lib\r\n2021/03/24  12:45            69,632 caffe2_module_test_dynamic.dll\r\n2021/03/24  12:45            24,130 caffe2_module_test_dynamic.lib\r\n2021/03/24  11:08            15,872 caffe2_nvrtc.dll\r\n2021/03/24  11:08             1,850 caffe2_nvrtc.lib\r\n2021/03/24  11:07            18,300 clog.lib\r\n2021/03/24  11:07           117,714 cpuinfo.lib\r\n2020/09/16  11:17       113,329,664 cublas64_11.dll\r\n2020/09/16  11:17       214,235,648 cublasLt64_11.dll\r\n2020/09/16  13:05           431,616 cudart64_110.dll\r\n2020/11/01  04:08           222,720 cudnn64_8.dll\r\n2020/11/01  04:52       146,511,360 cudnn_adv_infer64_8.dll\r\n2020/11/01  05:06        95,296,512 cudnn_adv_train64_8.dll\r\n2020/11/01  05:06       705,361,408 cudnn_cnn_infer64_8.dll\r\n2020/11/01  05:16        81,943,552 cudnn_cnn_train64_8.dll\r\n2020/11/01  04:15       323,019,776 cudnn_ops_infer64_8.dll\r\n2020/11/01  04:28        37,118,464 cudnn_ops_train64_8.dll\r\n2020/09/16  13:05       234,427,904 cufft64_10.dll\r\n2020/09/16  13:05           258,560 cufftw64_10.dll\r\n2020/09/16  13:05        55,511,040 curand64_10.dll\r\n2020/09/16  13:05       681,608,704 cusolver64_11.dll\r\n2020/09/16  13:05       388,617,216 cusolverMg64_11.dll\r\n2020/09/16  13:05       233,562,624 cusparse64_11.dll\r\n2021/03/24  11:08       319,083,802 dnnl.lib\r\n2021/03/24  11:07         3,280,384 fbgemm.dll\r\n2021/03/24  11:07         1,156,374 fbgemm.lib\r\n2021/03/24  11:08           342,016 fbjni.dll\r\n2021/03/24  11:08         1,191,002 fbjni.lib\r\n2021/03/24  11:07        15,140,756 gloo.lib\r\n2021/03/24  11:07        31,536,174 gloo_cuda.lib\r\n2020/06/23  14:03         1,961,328 libiomp5md.dll\r\n2020/06/23  14:03           110,448 libiompstubs5md.dll\r\n2021/03",
    "url": "https://github.com/pytorch/pytorch/issues/63304",
    "state": "closed",
    "labels": [
      "module: build",
      "module: windows",
      "module: docs",
      "module: cpp",
      "triaged"
    ],
    "created_at": "2021-08-16T07:30:26Z",
    "updated_at": "2023-12-19T06:56:17Z",
    "user": "RocskyLu"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 579,
    "title": "\u2753 memcpy d2d occupies a lot time of inference  (resnet50 model  after trtorch)",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\nI use trtorch to optimize resnet50 model on the IMAGENET as follows\r\n<img width=\"998\" alt=\"\u622a\u5c4f2021-08-16 10 34 32\" src=\"https://user-images.githubusercontent.com/46394627/129503893-4d252f02-07d4-448a-ac9c-7f64f15aa30a.png\">\r\n Unfortunately, i found that the memcpy d2d occupies a lot time of inference when i'm testing the performance of optimized model\r\n<img width=\"1420\" alt=\"\u622a\u5c4f2021-08-16 10 23 43\" src=\"https://user-images.githubusercontent.com/46394627/129504130-66f60eae-d9eb-4384-bcbd-53c6e83f4d0e.png\">\r\nIn the above figure, we can observe that the memcpy d2d occurs at the beginning of the inference and result in about 10% time consumption. I haven't found the reason yet. I did not have this phenomenon when I used tensorrt engine.\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.6.0):\r\n - OS (e.g., Linux):linux\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):pip\r\n - Python version:3.6.0\r\n - CUDA version:10.0\r\n - GPU models and configuration:T4*1 16G\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/579",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-16T02:51:22Z",
    "updated_at": "2021-08-19T12:21:32Z",
    "user": "zhang-xh95"
  },
  {
    "repo": "pytorch/vision",
    "number": 4276,
    "title": "I want to convert model resnet to onnx, how to do?",
    "body": "## \ud83d\udcda Documentation\r\n\r\n<!-- A clear and concise description of what content in https://pytorch.org/docs is an issue. If this has to do with the general https://pytorch.org website, please file an issue at https://github.com/pytorch/pytorch.github.io/issues/new/choose instead. If this has to do with https://pytorch.org/tutorials, please file an issue at https://github.com/pytorch/tutorials/issues/new -->\r\n",
    "url": "https://github.com/pytorch/vision/issues/4276",
    "state": "closed",
    "labels": [],
    "created_at": "2021-08-14T04:17:42Z",
    "updated_at": "2021-08-16T08:41:46Z",
    "user": "xinsuinizhuan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 576,
    "title": "\u2753 [Question] How can i write a converter just use a Libtorch function? ",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\nHi,\r\nI am trying to write some converter like \"torch.inverse\", \"F.grid_sample\", but it's really difficult for me. So, I want to skip that using just some libtorch function.\r\nFor example, I want to build a converter just use torch::inverse.\r\n![image](https://user-images.githubusercontent.com/76929740/129295419-43256861-c4a9-4f5f-a0fc-345cf01df7e0.png)\r\nBut I got some errors like this :\r\n![image](https://user-images.githubusercontent.com/76929740/129295506-b48255a1-4ce4-4511-8786-642f8a8072e3.png)\r\n\r\n\r\nSo, how can i write a converter just use a Libtorch function? \r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (1.8.1):\r\n - OS (ubuntu18.04):\r\n - How you installed PyTorch ( `pip`, `libtorch`):\r\n - Build command you used (trtorchv0.3.0 form release):\r\n - Python version: 3.8\r\n - CUDA version: 11.1\r\n - GPU models and configuration:GTX3070\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/576",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-13T02:18:42Z",
    "updated_at": "2021-08-19T11:49:02Z",
    "user": "JuncFang-git"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 63182,
    "title": "Improve doc about docker images and how to run them locally",
    "body": "Updated the wiki page https://github.com/pytorch/pytorch/wiki/Docker-image-build-on-CircleCI\r\n\r\n- [x] Document the new ecr_gc job\r\n- [x] How to get images from AWS ECR\r\n- [x] Document how to use the docker image and run `build` and `test` locally",
    "url": "https://github.com/pytorch/pytorch/issues/63182",
    "state": "closed",
    "labels": [
      "module: docs",
      "triaged",
      "hackathon"
    ],
    "created_at": "2021-08-12T20:58:43Z",
    "updated_at": "2021-08-13T00:53:01Z",
    "user": "zhouzhuojie"
  },
  {
    "repo": "pytorch/torchx",
    "number": 132,
    "title": "Add Torchx Validate command",
    "body": "## Description\r\nTorchx allows users to develop their own components. Torchx component is defined as a python function with several restrictions as described in https://pytorch.org/torchx/latest/quickstart.html#defining-your-own-component\r\n\r\nThe `torchx validate` cmd will help users to develop the components.\r\n\r\n\r\n`torchx validate ~/my_component.py:func` whether the component is a valid component or not. If component is not valid, the command will print the detailed message explaining what is wrong with the function. \r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/132",
    "state": "closed",
    "labels": [
      "enhancement",
      "cli"
    ],
    "created_at": "2021-08-12T18:38:52Z",
    "updated_at": "2022-01-22T00:32:22Z",
    "comments": 2,
    "user": "aivanou"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 575,
    "title": "\u2753 [Question] How to build latest TRTorch with Pytorch 1.9.0",
    "body": "## \u2753 Question\r\n\r\nI am trying to build latest TRTorch with Torch 1.9.0 but I am getting some issue. I follow the instruction from [here](https://github.com/NVIDIA/TRTorch/blob/master/README.md)\r\n\r\nAlso followed https://nvidia.github.io/TRTorch/tutorials/installation.html but not able to build. Please help!\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version: `1.9.0`\r\n - CPU Architecture: `x86_64`\r\n - OS: `Linux` (Ubuntu 18.04)\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): `pip` from [here](https://pytorch.org/get-started/locally/)\r\n - Build command you used (if compiling from source):  `bazel build //:libtrtorch --compilation_mode opt` and `cd py && sudo python3.7 setup.py install`\r\n - Are you using local sources or building from archives: `local`\r\n - Python version: `3.7`\r\n - CUDA version: `11.1`\r\n - CUDNN version: `8.1`\r\n - TensorRT: `7.2.3.4`\r\n - Bazel: `4.0.0`\r\n - GPU models and configuration: `RTX 2070 super 8GB`\r\n - Any other relevant information:\r\n\r\n## Additional context\r\nAttached the error I got while I run `bazel build //:libtrtorch --compilation_mode opt` or `cd py && sudo python3.7 setup.py install`\r\n```\r\nuser@test ~/Documents/TRTorch/py\r\n \u2514\u2500 (master) $ sudo python3.7 setup.py install\r\nrunning install\r\nbuilding libtrtorch\r\nINFO: Analyzed target //cpp/api/lib:libtrtorch.so (18 packages loaded, 2249 targets configured).\r\nINFO: Found 1 target...\r\nERROR: /home/user/Documents/TRTorch/core/lowering/passes/BUILD:10:11: Compiling core/lowering/passes/op_aliasing.cpp failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 62 argument(s) skipped)\r\n\r\nUse --sandbox_debug to see verbose messages from the sandbox gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 62 argument(s) skipped)\r\n\r\nUse --sandbox_debug to see verbose messages from the sandbox\r\nIn file included from ./core/util/prelude.h:10:0,\r\n                 from core/lowering/passes/op_aliasing.cpp:3:\r\n./core/util/trt_util.h: In function 'std::ostream& nvinfer1::operator<<(std::ostream&, const nvinfer1::EngineCapability&)':\r\n./core/util/trt_util.h:90:38: error: 'kSTANDARD' is not a member of 'nvinfer1::EngineCapability'\r\n     case nvinfer1::EngineCapability::kSTANDARD:\r\n                                      ^~~~~~~~~\r\n./core/util/trt_util.h:92:38: error: 'kSAFETY' is not a member of 'nvinfer1::EngineCapability'\r\n     case nvinfer1::EngineCapability::kSAFETY:\r\n                                      ^~~~~~~\r\n./core/util/trt_util.h:94:38: error: 'kDLA_STANDALONE' is not a member of 'nvinfer1::EngineCapability'\r\n     case nvinfer1::EngineCapability::kDLA_STANDALONE:\r\n                                      ^~~~~~~~~~~~~~~\r\nTarget //cpp/api/lib:libtrtorch.so failed to build\r\nUse --verbose_failures to see the command lines of failed build steps.\r\nINFO: Elapsed time: 8.640s, Critical Path: 6.17s\r\nINFO: 8 processes: 8 internal.\r\nFAILED: Build did NOT complete successfully\r\n```\r\n\r\nWorkspace modified file: \r\n```\r\nworkspace(name = \"TRTorch\")\r\n\r\nload(\"@bazel_tools//tools/build_defs/repo:http.bzl\", \"http_archive\")\r\nload(\"@bazel_tools//tools/build_defs/repo:git.bzl\", \"git_repository\")\r\n\r\nhttp_archive(\r\n    name = \"rules_python\",\r\n    sha256 = \"778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f\",\r\n    url = \"https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz\",\r\n)\r\n\r\nload(\"@rules_python//python:pip.bzl\", \"pip_install\")\r\n\r\nhttp_archive(\r\n    name = \"rules_pkg\",\r\n    sha256 = \"038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d\",\r\n    urls = [\r\n        \"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz\",\r\n        \"https://github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz\",\r\n    ],\r\n)\r\n\r\nload(\"@rules_pkg//:deps.bzl\", \"rules_pkg_dependencies\")\r\n\r\nrules_pkg_dependencies()\r\n\r\ngit_repository(\r\n    name = \"googletest\",\r\n    commit = \"703bd9caab50b139428cea1aaff9974ebee5742e\",\r\n    remote = \"https://github.com/google/googletest\",\r\n    shallow_since = \"1570114335 -0400\",\r\n)\r\n\r\n# CUDA should be installed on the system locally\r\nnew_local_repository(\r\n    name = \"cuda\",\r\n    build_file = \"@//third_party/cuda:BUILD\",\r\n    path = \"/usr/local/cuda-11.1/\",\r\n)\r\n\r\nnew_local_repository(\r\n    name = \"cublas\",\r\n    build_file = \"@//third_party/cublas:BUILD\",\r\n    path = \"/usr\",\r\n)\r\n#####################################################################",
    "url": "https://github.com/pytorch/TensorRT/issues/575",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-12T09:29:10Z",
    "updated_at": "2021-08-16T02:33:12Z",
    "user": "rajusm"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 63140,
    "title": "[documentation] torch.distributed.elastic: illustrate how to write load_checkpoint and save_checkpoint in Train Script ",
    "body": "https://pytorch.org/docs/master/elastic/train_script.html\r\n\r\nIf users want to run elastic jobs, he/she needs to write some logic to load and save checkpoints. And maybe `State` like this https://github.com/pytorch/elastic/blob/master/examples/imagenet/main.py#L196 should be defined.\r\n\r\nIt is not clear in the documentation, it will be better to document it.\n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23 @brianjo @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/63140",
    "state": "open",
    "labels": [
      "module: docs",
      "triaged",
      "module: elastic",
      "oncall: r2p"
    ],
    "created_at": "2021-08-12T08:54:25Z",
    "updated_at": "2022-06-03T20:47:29Z",
    "user": "gaocegege"
  },
  {
    "repo": "pytorch/vision",
    "number": 4270,
    "title": "annotation_path parameter in torchvision.datasets.UCF101 is not clear.",
    "body": "## \ud83d\udcda Documentation\r\n\r\nPlease describe what kind of files should be in annotation_path, and what the files should contain. It is not obvious.\n\ncc @pmeier",
    "url": "https://github.com/pytorch/vision/issues/4270",
    "state": "open",
    "labels": [
      "question",
      "module: datasets",
      "module: documentation"
    ],
    "created_at": "2021-08-12T03:40:59Z",
    "updated_at": "2021-08-13T16:50:25Z",
    "user": "damtharvey"
  },
  {
    "repo": "pytorch/torchx",
    "number": 130,
    "title": "components: copy component",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\nAdds a basic copy io component that uses fsspec to allow ingressing data or copying from one location to another.\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\n\r\nWe previously had a simple copy component using the old Python style component classes. We deleted that since it didn't use the new style component definitions. \r\n\r\nHaving a copy component is generally useful and we should use it for data ingress in the KFP advanced example.\r\n\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\nio.py\r\n```py\r\ndef copy(from: string, to: string, image: string = \"\") -> specs.AppDef: ...\r\n```\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/130",
    "state": "closed",
    "labels": [
      "enhancement",
      "module: components"
    ],
    "created_at": "2021-08-11T20:15:42Z",
    "updated_at": "2021-09-13T18:09:16Z",
    "comments": 1,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/torchx",
    "number": 128,
    "title": "components: tensorboard component",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\nIt would be nice to have a tensorboard component that could be used as either a mixin as a new role or standalone. This would make it easy to launch a job and monitor it while it's running.\r\n\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\nAdd a new built in component `tensorboard` to `components/metrics.py`. This would provide a component with the interface:\r\n\r\n```\r\ndef tensorboard(logdir: string, duration: float, image: string = \"<image>\"): \r\n   \"\"\"\r\n   Args:\r\n      duration: number of hours to run the container for\r\n   \"\"\"\r\n```\r\n\r\n### Lifetime\r\n\r\nThere's a bit of consideration here on how to manage the lifetime of the tensorboard role. Ideally it would be tied to the other containers but practically we can't support that on most schedulers. Launching it as a standalone component with a fixed duration i.e. 8 hours is likely going to be the best supported and should be good enough. Tensorboard is quite lightweight so having it run longer than necessary shouldn't be a big deal. \r\n\r\nThere may be better ways of handling this though. Volcano allows for flexible policies and we could allow for containers that get killed on first sucessful (0 exit code) replica.\r\n\r\nIt also could be good to watch a specific file. tensorboard uses a remote path so we could add in a `watch_file` arg with a specific path that the manager can long poll on to detect shutdown. The app would have to know to write out a `foo://bar/done` or `foo://bar/model.pt` that the component can poll on for termination purposes.\r\n\r\n### fsspec\r\n\r\nOne other painpoint is that tensorboard uses it's own filesystem interface that has relatively view implementations. It is extensible but other components use fsspec which could cause confusion for users. \r\n\r\nThere is an issue about this on tensorboard but it's quite new https://github.com/tensorflow/tensorboard/issues/5165 \r\n\r\nWe could write our own fsspec tensorboard adapter if necessary and provide it as part of a custom docker image.\r\n\r\n### Docker images\r\n\r\nThere's not a specific docker image we can use to provide tensorboard right now. It's possible to use `tensorflow/tensorflow` but that doesn't contain boto3 so no s3 support or other file systems. We may want to provide our own cutdown tensorboard container that can be used with the component.\r\n\r\n### Role\r\n\r\nWe also want to provide tensorboard as a role so you can have it run as a companion to the main training job. You can then easily include the tensorboard role as an extra role in your AppDef and use it as is.\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\nCurrently you can launch tensorboard via KFP UI or via the command line. This requires an extra step and in the case of KFP you can only do that after the job has run.\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/128",
    "state": "closed",
    "labels": [
      "enhancement",
      "module: components"
    ],
    "created_at": "2021-08-11T19:39:28Z",
    "updated_at": "2021-11-02T17:49:39Z",
    "comments": 0,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 177,
    "title": "How to compress the model size when use the API: module._save_for_lite_interpreter",
    "body": "I want to deploy the model on IOS.\r\nWhen I deploy the model to android, the following code can work.\r\n    mobile = torch.jit.trace(model, input_tensor)\r\n    mobile.save(path)\r\nI get a model which size is 23.4MB\r\n\r\nWhen i deploy the model to IOS, i must use the following API:\r\n    from torch.utils.mobile_optimizer import optimize_for_mobile\r\n    optimized_scripted_module = optimize_for_mobile(mobile)\r\n    optimized_scripted_module._save_for_lite_interpreter(optimized_path)\r\nI get the model which size is 45.7MB\r\n\r\nThe model size of the second method is almost twice as big as the previous one, i know the second approach are doing some optimization on the model, but how can I use the second method to get a model which size is as similar as the first one? ",
    "url": "https://github.com/pytorch/android-demo-app/issues/177",
    "state": "open",
    "labels": [],
    "created_at": "2021-08-11T10:17:03Z",
    "updated_at": "2022-02-11T14:21:17Z",
    "user": "kunlongsolid"
  },
  {
    "repo": "pytorch/vision",
    "number": 4264,
    "title": "ImportError: cannot import name '_NewEmptyTensorOp' from 'torchvision.ops.misc'",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## ImportError\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. Git clone the repository of [SOLQ](https://github.com/megvii-research/SOLQ)\r\n2. Update the dataset you want to use.\r\n3. Update the data paths in the file SOLQ/datasets/coco.py\r\n4.  RUn the bash file **configs/r50_solq_train.sh**\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\n\r\nIt should now show the error and move further to run the SOL-Q model.\r\n\r\n## Environment\r\n\r\nPyTorch version: 1.9.0+cu102\r\nIs debug build: False\r\nCUDA used to build PyTorch: 10.2\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 18.04.5 LTS (x86_64)\r\nGCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0\r\nClang version: 6.0.0-1ubuntu2 (tags/RELEASE_600/final)\r\nCMake version: version 3.12.0\r\nLibc version: glibc-2.26\r\n\r\nPython version: 3.7.11 (default, Jul  3 2021, 18:01:19)  [GCC 7.5.0] (64-bit runtime)\r\nPython platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic\r\nIs CUDA available: True\r\nCUDA runtime version: 11.0.221\r\nGPU models and configuration: GPU 0: Tesla T4\r\nNvidia driver version: 460.32.03\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.8.0.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.0.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.0.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.0.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.0.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.0.4\r\n/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.0.4\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.19.5\r\n[pip3] torch==1.9.0+cu102\r\n[pip3] torchsummary==1.5.1\r\n[pip3] torchtext==0.10.0\r\n[pip3] torchvision==0.10.0+cu102\r\n[conda] Could not collect\r\n\r\n\r\n## Additional context\r\n\r\nWhen running the script  ```!bash configs/r50_solq_train.sh``` it, shows ImportError like shown below :\r\n``` \r\nTraceback (most recent call last):\r\n  File \"main.py\", line 22, in <module>\r\n    import datasets\r\n  File \"/content/SOLQ/datasets/__init__.py\", line 13, in <module>\r\n    from .coco import build as build_coco\r\n  File \"/content/SOLQ/datasets/coco.py\", line 23, in <module>\r\n    from util.misc import get_local_rank, get_local_size\r\n  File \"/content/SOLQ/util/misc.py\", line 36, in <module>\r\n    from torchvision.ops.misc import _NewEmptyTensorOp\r\n``` ",
    "url": "https://github.com/pytorch/vision/issues/4264",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-10T05:04:23Z",
    "updated_at": "2021-08-12T09:19:48Z",
    "user": "sagnik1511"
  },
  {
    "repo": "pytorch/torchx",
    "number": 121,
    "title": "cli: support fetching logs from all roles",
    "body": "## Description\r\n<!-- concise description of the feature/enhancement -->\r\n\r\nCurrently you have to specify which role you want to fetch logs when using `torchx log`. Ideally you could just specify the job name to fetch all of them.\r\n\r\n```\r\ntorchx log kubernetes://torchx_tristanr/default:sh-hxkkr/sh\r\n```\r\n\r\n## Motivation/Background\r\n<!-- why is this feature/enhancement important? provide background context -->\r\n\r\nThis reduces friction for users with single role jobs when trying to fetch logs. It's very common I forget to add the role and then have to run the command again with the role. There's no technical limitation here and it removes friction for the user.\r\n\r\n\r\n## Detailed Proposal\r\n<!-- provide a detailed proposal -->\r\n\r\nThis would require updating the log CLI to support iterating over all roles and fetching logs from all the replicas. https://github.com/pytorch/torchx/blob/master/torchx/cli/cmd_log.py#L81\r\n\r\nThis doesn't require any changes to the scheduler implementations and is purely a CLI improvement.\r\n\r\n\r\n## Alternatives\r\n<!-- discuss the alternatives considered and their pros/cons -->\r\n\r\nWe could instead change the CLI to automatically select the role when there's only one role in a job. That would improve the UX a fair bit while also preventing tons of log spam for complex jobs.\r\n\r\n## Additional context/links\r\n<!-- link to code, documentation, etc. -->\r\n",
    "url": "https://github.com/meta-pytorch/torchx/issues/121",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2021-08-09T20:22:07Z",
    "updated_at": "2021-09-23T18:09:56Z",
    "comments": 0,
    "user": "d4l3k"
  },
  {
    "repo": "pytorch/xla",
    "number": 3076,
    "title": "What is xm.RateTracker? Why there is no document for this class?",
    "body": "`xm.RateTracker()` is used in the example script. But I can' find any document for this class(even the doc string does not exist).\r\nWhat is this class?\r\n## \u2753 Questions and Help\r\nhttps://github.com/pytorch/xla/blob/81eecf457af5db09a3131a00864daf1ca5b8ed20/test/test_train_mp_mnist.py#L123",
    "url": "https://github.com/pytorch/xla/issues/3076",
    "state": "closed",
    "labels": [],
    "created_at": "2021-08-09T15:07:03Z",
    "updated_at": "2021-08-11T01:54:53Z",
    "user": "DayuanJiang"
  },
  {
    "repo": "huggingface/dataset-viewer",
    "number": 6,
    "title": "Expand the purpose of this backend?",
    "body": "Depending on the evolution of https://github.com/huggingface/datasets, this project might disappear, or its features might be reduced, in particular, if one day it allows caching the data by self-generating:\r\n\r\n- an arrow or a parquet data file (maybe with sharding and compression for the largest datasets)\r\n- or a SQL database\r\n- or precompute and store a partial list of known offsets (every 10MB for example)\r\n\r\nIt would allow getting random access to the data.",
    "url": "https://github.com/huggingface/dataset-viewer/issues/6",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-09T14:03:41Z",
    "updated_at": "2022-02-04T11:24:32Z",
    "user": "severo"
  },
  {
    "repo": "pytorch/examples",
    "number": 925,
    "title": "How many data does fast neural style need ?",
    "body": "Hi, I am recently implementing fast neural style with your example but I don't have much disk space for coco dataset instead I used my own dataset which contains 1200 images and the result is not good at all (a totally distorted picture, the style is 'starry night').\r\n\r\n![image](https://user-images.githubusercontent.com/47134502/128693050-5d60f199-d309-42f7-8e5f-f238ddf6ab2b.png)\r\n\r\nHere is my setting,\r\n```\r\nimage_size = 224\r\ncontent_weight = 1e5\r\nstyle_weight = 1e10\r\nlr = 1e-3\r\nepoches = 2\r\nbatch_size = 2 (4 will OOM)\r\nstyle_layer = ['1_2','2_2','3_3','4_3']\r\ncontent_layer = ['2_2']\r\n```\r\n\r\nOther questions like \r\n1. why do we need centercrop in transformation, it crops the whole resized picture?\r\n2. why do we mul 255 then div 255 to batch?\r\n\r\nThanks in advance!",
    "url": "https://github.com/pytorch/examples/issues/925",
    "state": "closed",
    "labels": [],
    "created_at": "2021-08-09T10:27:12Z",
    "updated_at": "2022-03-09T21:16:55Z",
    "comments": 1,
    "user": "gitE0Z9"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 566,
    "title": "\u2753 [Question] How can i build a Makefile for this example? ",
    "body": "## \u2753 Question\r\nHi, \r\nI want to run the official [example ](https://github.com/NVIDIA/TRTorch/blob/master/examples/sample_rt_app/main.cpp) with a Makefile. But there is always something wrong. So, could you give me the Makefile that successfully links to the .so file?\r\n\r\n## Environment\r\n\r\n - PyTorch Version (1.8):\r\n - OS (Ubuntu18.04):\r\n - How you installed PyTorch (`pip`, `libtorch`)\r\n - Python version: 3.8\r\n - CUDA version: 11.3\r\n - GPU models and configuration: GTX3070\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/566",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-09T09:51:43Z",
    "updated_at": "2021-08-12T01:15:41Z",
    "user": "JuncFang-git"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 62951,
    "title": "when call `torch.onnx.export()`, the graph is pruned by default ? how to cancel pruning",
    "body": "## \ud83d\ude80 Feature\r\n<!-- A clear and concise description of the feature proposal -->\r\n\r\nFor example:\r\n```python\r\nimport torch\r\n\r\nhidden_dim1 = 10\r\nhidden_dim2 = 5\r\ntagset_size = 2\r\n\r\nclass MyModel(torch.nn.Module):\r\n    def __init__(self):\r\n        super(MyModel, self).__init__()\r\n        self.line1 = torch.nn.Linear(hidden_dim1, hidden_dim2)\r\n        self.line2 = torch.nn.Linear(hidden_dim2, tagset_size)\r\n\r\n    def forward(self, x, y):\r\n        out1 = self.line1(x)\r\n        out2 = self.line2(y)\r\n        return out1\r\n\r\nX = torch.randn(20, hidden_dim1)\r\nY = torch.randn(hidden_dim1, hidden_dim2)\r\ninputs = (X, Y)\r\n\r\nmodel = MyModel()\r\nf = './model.onnx'\r\ntorch.onnx.export(model, inputs, f,\r\n                    opset_version=9,\r\n                    example_outputs=None,\r\n                    input_names=[\"X\"], output_names=[\"Y\"],verbose=True)\r\n```\r\n\r\n\r\n```bash\r\ngraph(%X : Float(20, 10, strides=[10, 1], requires_grad=0, device=cpu),\r\n      %line1.weight : Float(5, 10, strides=[10, 1], requires_grad=1, device=cpu),\r\n      %line1.bias : Float(5, strides=[1], requires_grad=1, device=cpu)):\r\n  %Y : Float(20, 5, strides=[5, 1], requires_grad=1, device=cpu) = onnx::Gemm[alpha=1., beta=1., transB=1](%X, %line1.weight, %line1.bias) # /root/.conda/envs/torch1.9/lib/python3.6/site-packages/torch/nn/functional.py:1847:0\r\n  return (%Y)\r\n```\r\n#### How every, the exported graph doesn't contain `line2` , maybe because the  output of MyModel  is not depend on `out2 = self.line2(y)` ? I guess the graph is pruned by default.\r\n\r\n**What should I do if I want to not do pruning?**\r\n\r\n## Motivation\r\n\r\n<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->\r\n\r\nI want to do something for `self.named_parameters()` in `model.forward()`, eg.\r\n\r\n```python\r\ndef check_parameters():\r\n  # do something for parameters by calling \r\n  # some ops including OP1, OP2 and so on\r\n  return\r\n\r\nclass MyModel(torch.nn.Module):\r\n    def __init__(self):\r\n        super(MyModel, self).__init__()\r\n        self.line = torch.nn.Linear(hidden_dim1, hidden_dim2)\r\n\r\n    def forward(self, x, y):\r\n        out = self.line1(x)\r\n        check_parameters()\r\n        return out\r\n```\r\n\r\nHow every, the exported graph doesn't contain `OP1, OP2` , maybe because the  output of MyModel  is not depend on `check_parameters()` ? I guess the graph is pruned by default.\r\n\r\n## Pitch\r\n\r\n<!-- A clear and concise description of what you want to happen. -->\r\n\r\n## Alternatives\r\n\r\n<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context or screenshots about the feature request here. -->\r\n\n\ncc @BowenBao @neginraoof",
    "url": "https://github.com/pytorch/pytorch/issues/62951",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged",
      "onnx-needs-info"
    ],
    "created_at": "2021-08-08T14:31:20Z",
    "updated_at": "2021-09-10T08:09:02Z",
    "user": "liym27"
  },
  {
    "repo": "pytorch/serve",
    "number": 1186,
    "title": "[Question] GPU memory",
    "body": "Hi! Say I have about 10 models and a single GPU is it possible to load a model object for a specific task at the request time and then completely free up the memory for a different model object? For instance, completely deleting it and then reinitialize it when needed. I know this will increase the response time but the crucial part is the amount of VRAM left for the inference.",
    "url": "https://github.com/pytorch/serve/issues/1186",
    "state": "closed",
    "labels": [
      "question",
      "triaged_wait"
    ],
    "created_at": "2021-08-06T17:35:15Z",
    "updated_at": "2021-08-16T20:56:08Z",
    "user": "p1x31"
  },
  {
    "repo": "pytorch/java-demo",
    "number": 26,
    "title": "How to compile from command line (using javac instead of gradle)?",
    "body": "Hi, could you maybe help with the following?\r\n\r\nI want to show a very simple example of running a jitted model, and using gradle seems like quite some overhead ... Is there a way to just use `javac` with a classpath (or some other setup)?\r\n\r\nI've been trying \r\n\r\n```\r\njavac -cp ~/libtorch/lib src/main/java/demo/App.java\r\n```\r\n\r\nbut that does not work: \r\n\r\n```\r\nsrc/main/java/demo/App.java:3: error: cannot find symbol\r\nimport org.pytorch.IValue;\r\n```\r\n\r\n\r\nIn addition, having stumbled over https://www.graphics-muse.org/wp/?p=136, I've tried the hack of putting App.java in a package`org.pytorch`, but this does not work either.\r\n\r\nMany thanks!",
    "url": "https://github.com/pytorch/java-demo/issues/26",
    "state": "closed",
    "labels": [],
    "created_at": "2021-08-06T12:44:05Z",
    "updated_at": "2021-11-04T13:15:33Z",
    "user": "skeydan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 562,
    "title": "\u2753 [Question] How can i get libtrtorchrt.so? ",
    "body": "## \u2753 Question\r\n\r\nThanks for your contribution. \r\nI can't get the \"libtrtorchrt.so\" described in the following document after completing the trtorch. So, how can I get it?\r\n![image](https://user-images.githubusercontent.com/76929740/128478080-d7ba65c1-413e-4072-88bf-972daf826fe8.png)\r\n\r\n\r\n## What you have already tried\r\n\r\n complete the trtorch as the github guide\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version ( 1.8.1):\r\n - OS ( Linux):\r\n - How you installed PyTorch (`pip`, `libtorch`):\r\n - Build command you used (bazel build //:libtrtorch -c opt):\r\n - Python version: 3.8\r\n - CUDA version: 11.3\r\n - GPU models and configuration: GTX3070\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/562",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-08-06T08:14:01Z",
    "updated_at": "2021-08-06T10:04:25Z",
    "user": "JuncFang-git"
  },
  {
    "repo": "pytorch/vision",
    "number": 4257,
    "title": "R-CNN predictions change with different batch sizes",
    "body": "## \ud83d\udc1b Bug\r\n\r\nEven when using `model.eval()` I get different predictions when changing the batch size. I've found this issue when working on a project with Faster R-CNN and my own data, but I can replicate it in the tutorial \"TorchVision Object Detection Finetuning Tutorial\" (https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html), which uses Mask R-CNN. \r\n\r\n## To Reproduce\r\n\r\nSteps to replicate the issue:\r\n1. Open collab version: https://colab.research.google.com/github/pytorch/vision/blob/temp-tutorial/tutorials/torchvision_finetuning_instance_segmentation.ipynb\r\n2. Run all cells\r\n3. Insert a new cell at the bottom with the code below and run it:\r\n```\r\ndef get_device():\r\n    if torch.cuda.is_available():\r\n        return torch.device('cuda')  \r\n    else:\r\n        return torch.device('cpu')\r\n\r\ndef predict(model, image_tensors):\r\n    \"\"\"\r\n    Generate model's prediction (bounding boxes, scores and labels) for a batch \r\n    of image tensors\r\n    \"\"\"\r\n    model.eval()\r\n    with torch.no_grad():\r\n        predictions = model([x.to(get_device()) for x in image_tensors])\r\n    return predictions\r\n\r\ndef generate_preds(model, batch_size):\r\n  \"\"\"\r\n  Create dataloader for test dataset with configurable batch size.\r\n  Generate predictions. Return a list of predictions per sample.\r\n  \"\"\"\r\n  dataloader = torch.utils.data.DataLoader(\r\n    dataset_test, batch_size=batch_size, shuffle=False, num_workers=2,\r\n    collate_fn=utils.collate_fn)\r\n  all_pred = []\r\n  for batch in dataloader: \r\n    image_tensors, targets = batch\r\n    predictions = predict(model, image_tensors)\r\n    all_pred += predictions\r\n  return all_pred\r\n\r\n# Generate two sets of predictions, only change is batch size\r\npreds1 = generate_preds(model, 1)\r\npreds8 = generate_preds(model, 8)\r\nassert len(preds1) == len(preds8)\r\n\r\n# Investigate first five samples:\r\nfor x in range(5):\r\n  print(f\"\\nSample {x}:\")\r\n  print(\"-Boxes\")\r\n  print(preds1[x][\"boxes\"])\r\n  print(preds8[x][\"boxes\"])\r\n  print(\"-Scores\")\r\n  print(preds1[x][\"scores\"])\r\n  print(preds8[x][\"scores\"])\r\n  print(\"-Labels\")\r\n  print(preds1[x][\"labels\"])\r\n  print(preds8[x][\"labels\"])\r\n```\r\nThe code above generates two sets of predictions for the test set. The first one is generated with a batch size 1 and the second with a batch size 8. The output that I get when I run that cell:\r\n```\r\nSample 0:\r\n-Boxes\r\ntensor([[ 61.2343,  37.6461, 197.8525, 325.6508],\r\n        [276.4769,  23.9664, 290.8987,  73.1913]], device='cuda:0')\r\ntensor([[ 59.1616,  36.3829, 201.7858, 331.4406],\r\n        [276.4261,  23.7988, 290.8489,  72.8123],\r\n        [ 81.2091,  37.6342, 192.8113, 217.8009]], device='cuda:0')\r\n-Scores\r\ntensor([0.9989, 0.5048], device='cuda:0')\r\ntensor([0.9988, 0.6410, 0.1294], device='cuda:0')\r\n-Labels\r\ntensor([1, 1], device='cuda:0')\r\ntensor([1, 1, 1], device='cuda:0')\r\n\r\nSample 1:\r\n-Boxes\r\ntensor([[ 90.7305,  60.1291, 232.4859, 341.7854],\r\n        [245.7694,  56.3715, 305.2585, 349.5301],\r\n        [243.0723,  16.5198, 360.2888, 351.5983]], device='cuda:0')\r\ntensor([[ 91.1201,  59.8146, 233.0968, 342.2685],\r\n        [245.7369,  56.6024, 305.2173, 349.3939],\r\n        [241.1119,  32.6983, 362.4162, 346.0358]], device='cuda:0')\r\n-Scores\r\ntensor([0.9976, 0.9119, 0.1945], device='cuda:0')\r\ntensor([0.9975, 0.9128, 0.1207], device='cuda:0')\r\n-Labels\r\ntensor([1, 1, 1], device='cuda:0')\r\ntensor([1, 1, 1], device='cuda:0')\r\n\r\nSample 2:\r\n-Boxes\r\ntensor([[281.1774,  53.5141, 428.7436, 330.3915],\r\n        [139.6456,  23.7953, 264.7703, 330.2114]], device='cuda:0')\r\ntensor([[281.7463,  53.2942, 429.3290, 327.9640],\r\n        [138.7147,  23.8612, 264.6823, 332.3202]], device='cuda:0')\r\n-Scores\r\ntensor([0.9969, 0.9947], device='cuda:0')\r\ntensor([0.9968, 0.9945], device='cuda:0')\r\n-Labels\r\ntensor([1, 1], device='cuda:0')\r\ntensor([1, 1], device='cuda:0')\r\n\r\nSample 3:\r\n-Boxes\r\ntensor([[175.3683,  34.3320, 289.3029, 306.8307],\r\n        [ 76.7871,  15.4444, 187.0855, 299.1662],\r\n        [  0.0000,  45.9045,  51.3796, 222.0583],\r\n        [319.1224,  53.0593, 377.1693, 232.7251],\r\n        [260.2587,  55.8976, 309.0191, 229.4261],\r\n        [ 70.2029,  27.2173, 126.4584, 234.3767],\r\n        [ 38.0638,  55.5370,  65.4132, 164.1965],\r\n        [ 98.7189,  91.5356, 172.5915, 295.5404],\r\n        [ 70.1933,  56.1804, 103.6161, 218.4743]], device='cuda:0')\r\ntensor([[175.1848,  36.0377, 288.8358, 305.3505],\r\n        [ 76.8171,  15.7485, 187.4645, 299.5779],\r\n        [  0.0000,  45.9045,  51.3796, 222.0582],\r\n        [319.1060,  53.0140, 377.3391, 232.7926],\r\n        [260.2587,  55.8976, 309.0191, 229.4261],\r\n        [ 70.2030,  27.2173, 126.4584, 234.3767],\r\n        [ 38.0638,  55.5370,  65.4132, 164.1965],\r\n        [ 70.1933,  56.1804, 103.6161, 218.4743]], device='cuda:0')\r\n-Scores\r\ntensor([0.9968, 0.9959, 0.9942, 0.9937, 0.9271, 0.8133, 0.4273, 0.1163, 0.0884],\r\n       device='cuda:0')\r\ntensor([0.9974, 0.9965, 0.9942, 0.9937, 0.9271, 0.8133, 0.4273, 0.0884],\r\n       device='cuda:0')\r\n-Labels\r\ntensor([1, 1, 1, 1, 1, 1, 1, 1, 1], devic",
    "url": "https://github.com/pytorch/vision/issues/4257",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2021-08-06T07:22:41Z",
    "updated_at": "2021-08-16T12:25:30Z",
    "user": "alfonsomhc"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 561,
    "title": "Are FastRCNN models from TorchVision supported in TRTorch?",
    "body": "## \u2753 Question\r\n\r\nTried FastRCNN and MaskRCNN models from TorchVision. The model fails to compile with error \"RuntimeError: tuple appears in op that does not forward tuples, unsupported kind: aten::append\"\r\n\r\n## What you have already tried\r\n\r\ncode to reproduce: \r\nimport torch\r\nprint(torch.__version__)\r\nimport trtorch\r\nprint(trtorch.__version__)\r\nimport torchvision\r\n\r\nfastrcnn = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)\r\nmodel = fastrcnn.eval().to(\"cuda\")\r\nscripted_model = torch.jit.script(model)\r\ncompile_settings = {\r\n         \"input_shapes\": [ [3, 300, 400],[3, 300, 400] ],\r\n       \"op_precision\": torch.float \r\n}\r\ntrt_model = trtorch.compile(scripted_model, compile_settings)\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.8.1\r\n -  CPU Architecture: \r\n - OS (e.g., Linux): Ubuntu\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source): N/A\r\n - Are you using local sources or building from archives:  N/A\r\n - Python version: python3.7\r\n - CUDA version: 11.1\r\n - GPU models and configuration:\r\n - Any other relevant information: TRTorch - 0.3.0\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/561",
    "state": "closed",
    "labels": [
      "feature request",
      "question",
      "component: lowering",
      "No Activity",
      "component: partitioning"
    ],
    "created_at": "2021-08-06T01:36:18Z",
    "updated_at": "2023-07-29T00:02:10Z",
    "user": "saipj"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1637,
    "title": "Distributed Data Parallel Tutorial UX improvement suggestion",
    "body": "referring to the tutorial: https://pytorch.org/tutorials/intermediate/ddp_tutorial.html \r\n\r\nThough the tutorial is broken down into sections, it doesn't show how to actually run the code from each section until the very end of the tutorial.\r\n\r\nThe code as presented in each section only gives function definitions despite the tutorial text carrying on as though the user is supposed to be able to see something from running the code snippet that has been provided. This combination of info presented in a way that seems self contained, with code that seems self contained but isn't was rather confusing. \r\n\r\nto remedy this issue I think it'd make things easier if either \r\nA) the code to run each section is included in that code snippet\r\nB) a notebook is included in the tutorial so users can see how the code is actually run, without having to guess/find that this code is only listed at the bottom of the tutorial\r\nC) mention that a reasonable default set to run the code snippets can be found at the bottom of the tutorial.\r\n\r\nadditional data point: Before I noticed the code at the bottom of the tutorial to invoke the functions, I looked for other resources and came across an external tutorial: https://yangkky.github.io/2019/07/08/distributed-pytorch-tutorial.html which specifically references the pytorch DDP tutorial and raises similar criticism. Though some of the flaws pointed out have been fixed, this piece remains\n\ncc @sekyondaMeta @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/1637",
    "state": "open",
    "labels": [
      "content",
      "medium",
      "docathon-h2-2023"
    ],
    "created_at": "2021-08-05T01:28:20Z",
    "updated_at": "2023-11-17T15:30:16Z",
    "comments": 10,
    "user": "HDCharles"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 62565,
    "title": "support comparisons between types `c10::optional<T>` and `U` where `T` is comparable to `U`",
    "body": "## \ud83d\ude80 Feature\r\nSupport comparisons between `c10::optional<T>` and `U` if `T` is comparable to `U`.\r\n\r\n## Motivation\r\n\r\nA very common use-case for this is:\r\n```\r\nc10::optional<std::string> opt = ...;\r\nif (opt == \"blah\") ...\r\n```\r\n\r\nNote that this is supported by `std::optional`. See https://en.cppreference.com/w/cpp/utility/optional/operator_cmp\r\nunder\r\n\r\n> Compare an optional object with a value\r\n\r\n## Pitch\r\n\r\nAdd support and testing for these additional overloads. These are expected to just replace the operators that look like:\r\n```\r\ntemplate <typename T>\r\nbool operator==(std::optional<T> const& opt, T const& val);\r\n```\r\nwith\r\n```\r\ntemplate <typename T, typename U>\r\nbool operator==(std::optional<T> const& opt, U const& val);\r\n```\r\n\r\n## Alternatives\r\n\r\nThis makes the library more expressive. The alternative with existing functionality is `if (opt && *opt == \"blah\") ...`.\r\n\r\n## Additional context\r\n\r\nThis is not expected to be a significant amount of work (< one day).\n\ncc @ezyang @bhosmer @smessmer @ljk53 @bdhirsh",
    "url": "https://github.com/pytorch/pytorch/issues/62565",
    "state": "closed",
    "labels": [
      "module: internals",
      "module: bootcamp",
      "triaged"
    ],
    "created_at": "2021-08-02T14:03:38Z",
    "updated_at": "2021-08-19T04:41:51Z",
    "user": "dagitses"
  },
  {
    "repo": "pytorch/text",
    "number": 1369,
    "title": "How to use TorchText with Java",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\nI have a SentencePiece model which I serialized using `sentencepiece_processor`. My end goal is to use this torchscript serialized tokenizer in Java along with DJL Pytorch dependency. I am looking for guidance on how can I import torchtext dependency in Java environment.\r\n\r\nSteps:\r\n**1. Serializing SPM Tokenizer using Torchtext**\r\nTorchscript Serialized file is saved as 'spm-jit.pt'\r\n```\r\nimport torch\r\nfrom torchtext.experimental.transforms import sentencepiece_processor\r\nspm_processor = sentencepiece_processor('foo.model')\r\njit_spm_processor = torch.jit.script(spm_processor)\r\ntorch.jit.save(jit_spm_processor,  'spm-jit.pt')\r\n```\r\n\r\n**2. Deserializing SPM Tokenizer in Python**\r\nLoading`spm-jit.pt` without importing torchtext fails with the following error.\r\n\r\n```\r\nimport torch\r\nspm_tokenizer = torch.jit.load('spm-jit.pt')  # Fails when torchtext is not imported\r\n```\r\nError\r\n```\r\n/usr/local/lib/python3.6/dist-packages/torch/jit/_serialization.py in load(f, map_location, _extra_files)\r\n    159     cu = torch._C.CompilationUnit()\r\n    160     if isinstance(f, str) or isinstance(f, pathlib.Path):\r\n--> 161         cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files)\r\n    162     else:\r\n    163         cpp_module = torch._C.import_ir_module_from_buffer(\r\n\r\nRuntimeError: \r\nUnknown type name '__torch__.torch.classes.torchtext.SentencePiece':\r\nSerialized   File \"code/__torch__/torchtext/experimental/transforms.py\", line 6\r\n  training : bool\r\n  _is_full_backward_hook : Optional[bool]\r\n  sp_model : __torch__.torch.classes.torchtext.SentencePiece\r\n             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n  def forward(self: __torch__.torchtext.experimental.transforms.SentencePieceProcessor,\r\n    line: str) -> List[int]:\r\n```\r\n\r\nAfter importing torchtext, I am able to load the tokenizer from torchscript file.\r\n```\r\nimport torch\r\nimport torchtext\r\nspm_tokenizer = torch.jit.load('spm-jit.pt')  # Succeeds\r\n```\r\n\r\nThis led me to the conclusion that serialized file has dependency on torchtext for it to load successfully in Java/Python/C++ environment.\r\n\r\nAny guidance on how can I use torchtext in Java and/or C++\r\n\r\nThanks!\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/text/issues/1369",
    "state": "open",
    "labels": [],
    "created_at": "2021-07-29T20:41:12Z",
    "updated_at": "2021-08-05T23:30:05Z",
    "user": "anjali-chadha"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 62332,
    "title": "How to Fix \u201cAssertionError: CUDA unavailable, invalid device 0 requested\u201d",
    "body": "## \ud83d\udc1b Bug\r\n\r\nI'm trying to use my GPU to run the YOLOR model, and I keep getting the error that CUDA is unavailable, not sure how to fix.\r\n\r\nI keep getting the error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"D:\\yolor\\detect.py\", line 198, in <module>\r\n    detect()\r\n  File \"D:\\yolor\\detect.py\", line 41, in detect\r\n    device = select_device(opt.device)\r\n  File \"D:\\yolor\\utils\\torch_utils.py\", line 47, in select_device\r\n    assert torch.cuda.is_available(), 'CUDA unavailable, invalid device %s requested' % device  # check availablity\r\nAssertionError: CUDA unavailable, invalid device 0 requested\r\n```\r\n\r\nWhen I check CUDA availability with:\r\n```\r\npy\r\n>>import torch\r\n>>print(torch.cuda.is_available())\r\n```\r\n\r\nI get `False`, which explains the problem. I tried running the command:\r\n\r\n`py -m pip install torch1.9.0+cu111 torchvision0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html`\r\n\r\nI get the error:` ERROR: Invalid requirement: 'torch1.9.0+cu111'`\r\n\r\nRunning `nvcc --version`, I get:\r\n```\r\nnvcc: NVIDIA (R) Cuda compiler driver\r\nCopyright (c) 2005-2021 NVIDIA Corporation\r\nBuilt on Mon_May__3_19:41:42_Pacific_Daylight_Time_2021\r\nCuda compilation tools, release 11.3, V11.3.109\r\nBuild cuda_11.3.r11.3/compiler.29920130_0\r\n```\r\n\r\nThus, I'm not really sure what the issue is, or how to fix it.\r\n\r\n## Expected behavior\r\n\r\nI expect the program to be able to run, and CUDA to be available.\r\n\r\n## Environment\r\n\r\n - **PyTorch Version (e.g., 1.0):** 1.9.0\r\n - **OS (e.g., Linux):** Windows\r\n - **How you installed PyTorch (`conda`, `pip`, source):** pip\r\n - **Python version:**  Python 3.9.4\r\n - **CUDA/cuDNN version:** Cuda compilation tools, release 11.3, V11.3.109\r\n - **GPU models and configuration:** 2070 Super\r\n\r\n\r\nEDIT:\r\nI noticed that I forgot the `==` sign. I ran `py -m pip install --user torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html`, and even after doing so, \r\n```\r\npy\r\n>>import torch\r\n>>print(torch.cuda.is_available())\r\n```\r\nstill gets `False`.\r\n\r\nAdditionally, `torch.version.cuda` gives `None`. Please help!\r\n\r\ncc @ngimel @ezyang @seemethere @malfet @walterddr ",
    "url": "https://github.com/pytorch/pytorch/issues/62332",
    "state": "open",
    "labels": [
      "module: binaries",
      "triaged"
    ],
    "created_at": "2021-07-28T15:05:52Z",
    "updated_at": "2021-07-29T14:36:15Z",
    "user": "Hana-Ali"
  },
  {
    "repo": "huggingface/transformers",
    "number": 12925,
    "title": "How to reproduce XLNet correctly And What is the config for finetuning XLNet?",
    "body": "I fintune a XLNet for English text classification. But it seems that I did something wrong about it because xlnet-base is worse than bert-base in my case. I set every 1/3 epoch report validation accuracy. At the beginning Bert-base is about 0.50 while XLNet-base is only 0.24. The config I use for xlnet is listed as follows:\r\n```python\r\nconfig = {\r\n  batch_size = 4,\r\n  learning_rate = 1e-5,\r\n  gradient_accumulation_steps =  32,\r\n  epochs = 4,\r\n  max_sep_length = 384,\r\n  weight_decay = 0.01,\r\n  adam_epsilon = 1e-6,\r\n  16-bit_training = False\r\n}\r\n\r\n```\r\nDoes finetune XLNet needs a special setting or XLNet converges slowly?\r\n\r\nThanks for everyone willing to help in advance!  :-)\r\n",
    "url": "https://github.com/huggingface/transformers/issues/12925",
    "state": "closed",
    "labels": [
      "Migration"
    ],
    "created_at": "2021-07-28T01:16:19Z",
    "updated_at": "2021-07-29T05:50:07Z",
    "user": "sherlcok314159"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 62282,
    "title": "What is slow-path and fast-path?",
    "body": "## \u2753 Questions and Help\r\n\r\nI am reading pytorch code base and issue to get a better understanding of the design choices. I keep seeing fast-pathed or fast-passed function. I was wondering what these are? For instance, the issue here (https://github.com/pytorch/pytorch/pull/46469 2).\r\n\r\nThank you in advance!\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/62282",
    "state": "closed",
    "labels": [],
    "created_at": "2021-07-27T18:50:43Z",
    "updated_at": "2021-07-27T19:11:20Z",
    "user": "tarekmak"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 62162,
    "title": "Clarify sparse COO tensor coalesce behavior wrt overflow + how to binarize a sparse tensor",
    "body": "https://pytorch.org/docs/stable/sparse.html#sparse-uncoalesced-coo-docs does not explain what would be the behavior if passed sparse tensor dtype does not fit the accumulated values (e.g. it is torch.bool). Will it do the saturation properly? Or will it overflow during coalescing?\r\n\r\nBasically, I would like to binarize a sparse tensor, e.g. to clamp all nonzero values by 1. How can I do that? I've tried `S > 0`, `S.clamp(max = 1)`, `S.to(torch.bool)`.\r\n\r\nOnly the latter seems to work.\n\ncc @brianjo @mruberry @nikitaved @pearu @cpuhrsch @IvanYashchuk",
    "url": "https://github.com/pytorch/pytorch/issues/62162",
    "state": "open",
    "labels": [
      "module: sparse",
      "module: docs",
      "triaged"
    ],
    "created_at": "2021-07-25T12:37:49Z",
    "updated_at": "2021-08-23T14:53:45Z",
    "user": "vadimkantorov"
  },
  {
    "repo": "huggingface/transformers",
    "number": 12805,
    "title": "What is the data format of transformers language modeling run_clm.py fine-tuning?",
    "body": "I now use run_clm.py to fine-tune gpt2, the command is as follows:\r\n\r\n```\r\npython run_clm.py \\\\\r\n    --model_name_or_path gpt2 \\\\\r\n    --train_file train1.txt \\\\\r\n    --validation_file validation1.txt \\\\\r\n    --do_train \\\\\r\n    --do_eval \\\\\r\n    --output_dir /tmp/test-clm\r\n```\r\n\r\nThe training data is as follows:\r\n[train1.txt](https://github.com/huggingface/transformers/files/6847229/train1.txt)\r\n[validation1.txt](https://github.com/huggingface/transformers/files/6847234/validation1.txt)\r\n\r\n\r\nThe following error always appears:\r\n\r\n```\r\n[INFO|modeling_utils.py:1354] 2021-07-20 17:37:01,399 >> All the weights of GPT2LMHeadModel were initialized from the model checkpoint at gpt2.\r\nIf your task is similar to the task the model of the checkpoint was trained on, you can already use GPT2LMHeadModel for predictions without further training.\r\nRunning tokenizer on dataset: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1/1 [00:00<00:00, 90.89ba/s]\r\nRunning tokenizer on dataset: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1/1 [00:00<00:00, 333.09ba/s]\r\nGrouping texts in chunks of 1024:   0%|          | 0/1 [00:00<?, ?ba/s]\r\nTraceback (most recent call last):\r\n  File \"D:/NLU/tanka-reminder-suggestion/language_modeling/run_clm.py\", line 492, in <module>\r\n    main()\r\n  File \"D:/NLU/tanka-reminder-suggestion/language_modeling/run_clm.py\", line 407, in main\r\n    desc=f\"Grouping texts in chunks of {block_size}\",\r\n  File \"D:\\lib\\site-packages\\datasets\\dataset_dict.py\", line 489, in map\r\n    for k, dataset in self.items()\r\n  File \"D:\\lib\\site-packages\\datasets\\dataset_dict.py\", line 489, in <dictcomp>\r\n    for k, dataset in self.items()\r\n  File \"D:\\lib\\site-packages\\datasets\\arrow_dataset.py\", line 1673, in map\r\n    desc=desc,\r\n  File \"D:\\lib\\site-packages\\datasets\\arrow_dataset.py\", line 185, in wrapper\r\n    out: Union[\"Dataset\", \"DatasetDict\"] = func(self, *args, **kwargs)\r\n  File \"D:\\lib\\site-packages\\datasets\\fingerprint.py\", line 397, in wrapper\r\n    out = func(self, *args, **kwargs)\r\n  File \"D:\\lib\\site-packages\\datasets\\arrow_dataset.py\", line 2024, in _map_single\r\n    writer.write_batch(batch)\r\n  File \"D:\\lib\\site-packages\\datasets\\arrow_writer.py\", line 388, in write_batch\r\n    pa_table = pa.Table.from_pydict(typed_sequence_examples)\r\n  File \"pyarrow\\table.pxi\", line 1631, in pyarrow.lib.Table.from_pydict\r\n  File \"pyarrow\\array.pxi\", line 332, in pyarrow.lib.asarray\r\n  File \"pyarrow\\array.pxi\", line 223, in pyarrow.lib.array\r\n  File \"pyarrow\\array.pxi\", line 110, in pyarrow.lib._handle_arrow_array_protocol\r\n  File \"D:\\lib\\site-packages\\datasets\\arrow_writer.py\", line 100, in __arrow_array__\r\n    if trying_type and out[0].as_py() != self.data[0]:\r\n  File \"pyarrow\\array.pxi\", line 1076, in pyarrow.lib.Array.__getitem__\r\n  File \"pyarrow\\array.pxi\", line 551, in pyarrow.lib._normalize_index\r\nIndexError: index out of bounds\r\n```\r\n\r\nIs the format of my training data incorrect? Please help me thanks\uff01",
    "url": "https://github.com/huggingface/transformers/issues/12805",
    "state": "closed",
    "labels": [],
    "created_at": "2021-07-20T09:43:30Z",
    "updated_at": "2021-08-27T15:07:19Z",
    "user": "gongshaojie12"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 61836,
    "title": "How to support multi-arch in built Docker",
    "body": "Hello?\r\nI'm using pip3 to install and use PyTorch by writing my own Dockerfile.\r\nArch error when trying to use an image built on V100 on RTX3090.\r\nI want to build an image that supports multiple Arches, such as V100, A100, RTX3090, and use it.\r\nAny good way?\n\ncc @malfet @seemethere @walterddr",
    "url": "https://github.com/pytorch/pytorch/issues/61836",
    "state": "closed",
    "labels": [
      "module: build",
      "triaged",
      "module: docker"
    ],
    "created_at": "2021-07-19T11:15:03Z",
    "updated_at": "2021-07-19T21:39:37Z",
    "user": "DonggeunYu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 61831,
    "title": "How data transfer from disk to GPU?",
    "body": "## \u2753 Questions and Help\r\n\r\nI have learned that we can use.to(device) to.CUDA () to transfer data to the GPU. I want to know how this process is implemented in the bottom layer.\r\n\r\nThanks, hundan.\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/61831",
    "state": "closed",
    "labels": [],
    "created_at": "2021-07-19T08:32:32Z",
    "updated_at": "2021-07-19T21:21:53Z",
    "user": "pyhundan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 61765,
    "title": "How to save tensors on mobile (lite interpreter)?",
    "body": "## Issue description\r\n\r\nBased on the discussion in https://github.com/pytorch/pytorch/pull/30108 it's clear that `pickle_save` is not supported on mobile, because `/csrc/jit/serialization/export.cpp` is not included when building for lite interpreter; producing the following runtime error:\r\n\r\n```c++\r\n#else\r\n  AT_ERROR(\r\n      \"pickle_save not supported on mobile \"\r\n      \"(see https://github.com/pytorch/pytorch/pull/30108)\");\r\n#endif\r\n```\r\n \r\nFor loading there's an option of using `torch::jit::_load_for_mobile`. \r\n\r\n**However, are there any methods, or alternative approaches, of serialising and saving `c10::IValue` objects on the mobile device?**\r\n\r\n---\r\n\r\nMobile code compiled with libraries at `master: 5c1505076bfa764088e2ccef19d7f18336084530`",
    "url": "https://github.com/pytorch/pytorch/issues/61765",
    "state": "open",
    "labels": [
      "oncall: mobile"
    ],
    "created_at": "2021-07-16T09:43:03Z",
    "updated_at": "2021-07-21T10:06:17Z",
    "user": "lytcherino"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 539,
    "title": "\u2753 [Question] Unknown output type. Only a single tensor or a TensorList type is supported",
    "body": "## \u2753 Question\r\n\r\nTRTorch Throw \"Unknown output type. Only a single tensor or a TensorList type is supported\"\r\n\r\n## What you have already tried\r\n\r\nI define a model \r\n```python\r\nimport os\r\nimport time\r\nimport torch\r\n\r\nimport torchvision\r\n\r\n\r\nclass Sparse(torch.nn.Module):\r\n\r\n    def __init__(self, embedding_size):\r\n        super().__init__()\r\n        self._embedding_size = embedding_size\r\n        self._output = torch.zeros((4, self._embedding_size))\r\n\r\n    def forward(self, x):\r\n        return self._output\r\n\r\n\r\nclass Model(torch.nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.sparse = Sparse(100)\r\n        self.linear = torch.nn.Linear(100, 200)\r\n\r\n    def forward(self, x):\r\n        y = self.sparse(x)\r\n        return self.linear(y)\r\n\r\n\r\nif __name__ == '__main__':\r\n    model = torch.jit.script(Model())\r\n    model.eval()\r\n    model.save(\"data/ali.pt\")\r\n\r\n```\r\nsave it to \"data/ali.pt\"\uff0cand convert it with trtorch\uff08input_shapes is need but not used by model)\r\n\r\n\r\n```python\r\nimport torch\r\nimport trtorch\r\nimport trtorch.logging\r\nimport sys\r\n\r\n\r\ndef main(model_path):\r\n    trtorch.logging.set_reportable_log_level(trtorch.logging.Level.Debug)\r\n    scripted_model = torch.jit.load(model_path).eval().cuda()\r\n    compile_settings = {\r\n        \"input_shapes\": [\r\n            {\r\n                \"min\": [1, 3, 224, 224, 1024],\r\n                \"opt\": [1, 3, 512, 512, 2048],\r\n                \"max\": [1, 3, 1024, 1024, 4096]\r\n            }],\r\n        \"op_precision\": torch.float32\r\n    }\r\n    #print(\"check_method_op_support {}\".format(trtorch.check_method_op_support(scripted_model, \"torch.gelu\")))\r\n    print(\"Model {} With Graph {}\".format(model_path, scripted_model.graph))\r\n    trt_ts_module = trtorch.compile(scripted_model, compile_settings)\r\n    torch.jit.save(trt_ts_module, '{}.jit'.format(model_path))\r\n    print(\"Generated Torchscript-TRT models.\")\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    if len(sys.argv) == 0:\r\n        main(\"data/with_dense.pt\")\r\n    else:\r\n        main(sys.argv[1])\r\n\r\n```\r\n\r\nI also try with c++ api to convert, but got same error\r\n\r\n```cpp\r\nint main(int argc, const char *argv[]) {\r\n  if (argc < 2) {\r\n    std::cerr << \"usage: samplertapp <path-to-pre-built-trt-ts module>\\n\";\r\n    return -1;\r\n  }\r\n\r\n  std::string trt_ts_module_path = argv[1];\r\n  std::string mode = argv[2];\r\n  //trtorch::logging::set_reportable_log_level(trtorch::logging::Level::kINFO);\r\n  trtorch::logging::set_reportable_log_level(trtorch::logging::Level::kDEBUG);\r\n  torch::jit::Module trt_ts_mod;\r\n  try {\r\n    // Deserialize the ScriptModule from a file using torch::jit::load().\r\n    trt_ts_mod = torch::jit::load(trt_ts_module_path);\r\n  } catch (const c10::Error &e) {\r\n    std::cerr << \"error loading the model from : \" << trt_ts_module_path\r\n              << std::endl;\r\n    return -1;\r\n  }\r\n  if (1) {\r\n    trt_ts_mod.to(at::kCUDA);\r\n    trt_ts_mod.eval();\r\n\r\n    auto in = torch::randn({1, 1, 32, 32}, {at::kCUDA}).to(torch::kHalf);\r\n    auto input_sizes =\r\n        std::vector<trtorch::CompileSpec::InputRange>({in.sizes()});\r\n    trtorch::CompileSpec cspec(input_sizes);\r\n    cspec.op_precision = torch::kHalf;\r\n    auto trt_mod = trtorch::CompileGraph(trt_ts_mod, cspec);\r\n    auto out = trt_mod.forward({in});\r\n    std::cout << \"==================TRT outputs================\" << std::endl;\r\n    std::cout << out << std::endl;\r\n    std::cout << \"=============================================\" << std::endl;\r\n  }\r\n  return 0;\r\n}\r\n```\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version 1.8.1\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (pip)\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.6.13\r\n - CUDA version: 11.1\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n## Additional context\r\n\r\nRunning TRT engine\r\nDEBUG: [TRTorch] - TRTorch Version: 0.3.0\r\nUsing TensorRT Version: 7.2.3.4\r\nPyTorch built with:\r\n  - GCC 5.4\r\n  - C++ Version: 201402\r\n  - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications\r\n  - Intel(R) MKL-DNN v1.7.0 (Git Hash 7aed236906b1f7a05c0917e5257a1af05e9ff683)\r\n  - OpenMP 201307 (a.k.a. OpenMP 4.0)\r\n  - NNPACK is enabled\r\n  - CPU capability usage: AVX2\r\n  - CUDA Runtime 11.1\r\n  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86\r\n  - CuDNN 8.0.5\r\n  - Magma 2.5.2\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/539",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-07-16T06:35:29Z",
    "updated_at": "2021-10-29T00:01:39Z",
    "user": "westfly"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 1070,
    "title": "What is the difference between training(https://www.sbert.net/docs/training/overview.html#training-data) and unsupervised learning",
    "body": "Hi,\r\n\r\nI have some bunch of PDF's and I am building a QnA system from the pdf's. Currently, I am using deepset/haystack repo for the same task.\r\n\r\nMy doubt is if we want to generate embeddings for my text which training I should do, what is the difference as both approaches mostly takes sentences right?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/1070",
    "state": "open",
    "labels": [],
    "created_at": "2021-07-15T12:13:37Z",
    "updated_at": "2021-07-15T12:41:22Z",
    "user": "SAIVENKATARAJU"
  },
  {
    "repo": "pytorch/vision",
    "number": 4180,
    "title": "[Detectron2] RuntimeError: No such operator torchvision::nms and RecursionError: maximum recursion depth exceeded",
    "body": "## \ud83d\udc1b Bug\r\n\r\nRunning Detectron2 demo.py creates `RuntimeError: No such operator torchvision::nms` error. \r\nSo far it's the same as #1405 but it gets worse. Creates a Max Recursion Depth error.\r\n\r\nThe primary issue is resolve with a simple naming change (below, thanks to @feiyuhuahuo). However,  this creates the `RecursionError: maximum recursion depth exceeded in comparison` issue referenced by @vasyllyashkevych. \r\n\r\nThis fix to `torchvision::nms` creates `RecursionError`\r\n```\r\n# edit file: `local/lib/python3.6/dist-packages/torchvision-0.7.0a0+78ed10c-py3.6-linux-aarch64.egg/torchvision/ops/boxes.py`\r\n\r\n# OLD (bad): \r\ntorch.ops.torchvision.nms(boxes, scores, iou_thres)\r\n\r\n# NEW (better):\r\nimport torchvision # top of file\r\ntorchvision.ops.nms(boxes, scores, iou_thres)\r\n```\r\n## This fix creates the RecursionError: maximum recursion depth exceeded\r\n```\r\n  File \"/usr/local/lib/python3.6/dist-packages/torchvision-0.7.0a0+78ed10c-py3.6-linux-aarch64.egg/torchvision/ops/boxes.py\", line 43, in nms\r\n    return torchvision.ops.nms(boxes, scores, iou_threshold)\r\n  [Previous line repeated 970 more times]\r\nRecursionError: maximum recursion depth exceeded\r\n```\r\nFull stack trace below \ud83d\udc47\ud83d\udc47!\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. Build Detectron2 from source\r\n```\r\nsudo python3 -m pip install 'git+https://github.com/facebookresearch/detectron2.git'\r\n```\r\n2. Clone Detectron2 repo \r\n3. Run Demo (from the docs https://detectron2.readthedocs.io/en/latest/tutorials/getting_started.html)\r\n```\r\n$ sudo python3 demo.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml \\\r\n  --input kasDemo.png \\\r\n  --opts MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl\r\n```\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Environment\r\n\r\n\u2757Note Pytorch was installed via [PyTorch for Jetson](https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-9-0-now-available/72048)\r\n\r\nSimple system info:\r\n```\r\nHost machine: Nvidia Jetson Xaiver (arm architecture, not x64)\r\nPython: python3.6\r\nDetectron2: installed from source on Github (July 14, 2021)\r\ntorch version: 1.8.0\r\ntorchvision version: 0.7.0 (a0)\r\nCuda version: 10.2\r\n```\r\n\r\nEnv collection script:\r\n```\r\nPyTorch version: 1.8.0\r\nIs debug build: False\r\nCUDA used to build PyTorch: 10.2\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 18.04.5 LTS (aarch64)\r\nGCC version: (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0\r\nClang version: Could not collect\r\nCMake version: version 3.10.2\r\nLibc version: glibc-2.25\r\n\r\nPython version: 3.6.9 (default, Jan 26 2021, 15:33:00)  [GCC 8.4.0] (64-bit runtime)\r\nPython platform: Linux-4.9.201-tegra-aarch64-with-Ubuntu-18.04-bionic\r\nIs CUDA available: True\r\nCUDA runtime version: Could not collect\r\nGPU models and configuration: Could not collect\r\nNvidia driver version: Could not collect\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/aarch64-linux-gnu/libcudnn.so.8.0.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_adv_infer.so.8.0.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_adv_train.so.8.0.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_cnn_infer.so.8.0.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_cnn_train.so.8.0.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_ops_infer.so.8.0.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_ops_train.so.8.0.0\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.19.5\r\n[pip3] torch==1.8.0\r\n[pip3] torchvision==0.7.0a0+78ed10c\r\n[conda] Could not collect\r\n```\r\n\r\nFull stack trace:\r\n```\r\n$ sudo python3 demo.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml \\\r\n  --video-input IMG_3578.MOV \\\r\n  --opts MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl\r\n  \r\n[07/14 17:23:49 detectron2]: Arguments: Namespace(confidence_threshold=0.5, config_file='../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml', input=None, opts=['MODEL.WEIGHTS', 'detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl'], output=None, video_input='IMG_3578.MOV', webcam=False)\r\n[07/14 17:24:00 fvcore.common.checkpoint]: [Checkpointer] Loading from detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl ...\r\n[07/14 17:24:01 fvcore.common.checkpoint]: Reading a file from 'Detectron2 Model Zoo'\r\nWARNING [07/14 17:24:01 fvcore.common.checkpoint]: The checkpoint state_dict contains keys that are not used by the model:\r\n  proposal_generator.anchor_generator.cell_anchors.{0, 1, 2, 3, 4}\r\n  0%|                                                                                   | 0/221 [00:04<?, ?it/s]\r\nTraceback (most recent call last):\r\n  File \"demo.py\", line 176, in <module>\r\n    for vis_frame in tqdm.tqdm(demo.run_on_video(video), total=num_frames):\r\n  File \"/usr/local/lib/python3.6/dist-packages/tqdm/std.py\", line 1185, in __iter__\r\n    for ",
    "url": "https://github.com/pytorch/vision/issues/4180",
    "state": "closed",
    "labels": [
      "question",
      "module: ops"
    ],
    "created_at": "2021-07-14T23:51:28Z",
    "updated_at": "2021-08-12T11:16:20Z",
    "user": "KastanDay"
  },
  {
    "repo": "huggingface/transformers",
    "number": 12704,
    "title": "Where is the casual mask when using BertLMHeadModel and set config.is_decoder = True?",
    "body": "I hope to use BERT for the task of causal language modeling.  \r\n\r\n`BertLMHeadModel ` seems to meet my needs, but I did not find any code snippets about the causal mask, even if I set the `config.is_decoder=True`.\r\n\r\nI only find the following related code in https://github.com/huggingface/transformers/blob/master/src/transformers/models/bert/modeling_bert.py#L968.\r\n\r\nhowever, I do not have any values to pass into the argument `encoder_hidden_states` when doing causal language modeling.\r\nSo maybe the causal mask does not work?\r\n\r\n```\r\nif self.config.is_decoder and encoder_hidden_states is not None:\r\n    encoder_batch_size, encoder_sequence_length, _ = encoder_hidden_states.size()\r\n    encoder_hidden_shape = (encoder_batch_size, encoder_sequence_length)\r\n    if encoder_attention_mask is None:\r\n        encoder_attention_mask = torch.ones(encoder_hidden_shape, device=device)\r\n    encoder_extended_attention_mask = self.invert_attention_mask(encoder_attention_mask)\r\nelse:\r\n    encoder_extended_attention_mask = None\r\n```",
    "url": "https://github.com/huggingface/transformers/issues/12704",
    "state": "closed",
    "labels": [],
    "created_at": "2021-07-14T13:15:50Z",
    "updated_at": "2021-07-24T06:42:04Z",
    "user": "Doragd"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 61526,
    "title": "how to put ```trainer.fit()``` in for loop?",
    "body": "I am trying to create multiple model using loop as below.\r\n\r\n```\r\nfor client in clients:\r\n    t.manual_seed(10)\r\n    client['model'] = LinearNN(learning_rate = args.lr, i_s = args.input_size,  h1_s = args.hidden1, h2_s = args.hidden2, n_c = args.output, client=client)\r\n    client['optim'] = optim.Adam(client['model'].parameters(), lr= args.lr)\r\n```\r\n\r\nHowever, ```trainer.fit()``` is an async method. To train multiple models, I need to put ```trainer.fit()``` in a loop as follows \r\n\r\n```\r\nfor client in clients:\r\n     trainer = pl.Trainer(\r\n     max_epochs=args.epochs+1,\r\n     progress_bar_refresh_rate=20,\r\n     )\r\n     trainer.fit(client['model'])\r\n```\r\n\r\nAs this is an async method, it gives an error \r\n\r\n> AttributeError: can't set attribute\r\n\r\nas it doesn't wait for finishing ```trainer.fit()```.\r\n\r\nIs there any way to do that? \r\n\r\nThanks in advance.",
    "url": "https://github.com/pytorch/pytorch/issues/61526",
    "state": "closed",
    "labels": [],
    "created_at": "2021-07-12T11:29:16Z",
    "updated_at": "2021-07-12T12:32:18Z",
    "user": "anik123"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 527,
    "title": "\u2753 [Question] TRTorch and Pytorch Serve ",
    "body": "## \u2753 Question\r\n\r\nIs it possbile to use TRTorch with TorchServe?\r\nIf not what is the best way to deploy TRTorch programs?\r\n\r\n## What you have already tried\r\n\r\nIn the documentation, it is said I can continue to use programs via PyTorch API\r\nI have converted all my models to TRTorch.\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture:\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/527",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-07-11T21:12:02Z",
    "updated_at": "2021-07-14T18:32:38Z",
    "user": "p1x31"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 61510,
    "title": "What is find_package(Torch REQUIRED) doing that a manual include/glob doesnt?",
    "body": "In my project, if i do \r\n```\r\nset(CMAKE_PREFIX_PATH \"...lib/python3.6/site-packages/torch/share/cmake/Torch\")\r\nfind_package(Torch REQUIRED)\r\nadd_library(lib SHARED \"lib.hpp\" \"lib.cpp\")\r\ntarget_link_libraries( lib  ${TORCH_LIBRARIES})\r\n```\r\nIt all links and works great!\r\n\r\nBut, if I do the following manually, \r\n\r\n```\r\nfile(GLOB TORCH_LIBRARIES \".../lib/python3.6/site-packages/torch/lib/*.so\")\r\ninclude_directories(\".../python3.6/site-packages/torch/include/torch/csrc/api/include/\"\r\n\"...lib/python3.6/site-packages/torch/include\")\r\nadd_library(lib SHARED \"lib.hpp\" \"lib.cpp\")\r\ntarget_link_libraries( lib  ${TORCH_LIBRARIES})\r\n```\r\n\r\nIt fails when i try to load the library with:\r\n```\r\nliblib.so: undefined reference to `c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)\r\n```\r\n\r\nWhat is find_package(Torch) adding that i am missing?\r\n\r\nEDIT:\r\n\r\nSo it appears that despite include torchlib.so on my own (which that glob command does), the linker doesnt include `libtorch.so`\n\ncc @malfet @seemethere @walterddr",
    "url": "https://github.com/pytorch/pytorch/issues/61510",
    "state": "open",
    "labels": [
      "module: build",
      "triaged"
    ],
    "created_at": "2021-07-10T18:35:09Z",
    "updated_at": "2021-07-12T15:39:08Z",
    "user": "yaadhavraajagility"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1605,
    "title": "Need to update the tutorial description in index.rst",
    "body": "In [index.rst](https://github.com/pytorch/tutorials/blame/master/index.rst#L165), the description of `Text Classification with Torchtext` is duplicated with [the previous tutorial](https://github.com/pytorch/tutorials/blame/master/index.rst#L158) but not correctly explain the tutorial.\r\n\r\nSo we need to update this description as follows:\r\n\r\n* As-is: This is the third and final tutorial on doing \u201cNLP From Scratch\u201d, where we write our own classes and functions to preprocess the data to do our NLP modeling tasks.\r\n* To-be: Learn how to build the dataset and classify text using torchtext library.\r\n\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/1605",
    "state": "closed",
    "labels": [],
    "created_at": "2021-07-10T13:00:03Z",
    "updated_at": "2021-07-27T21:33:05Z",
    "comments": 0,
    "user": "9bow"
  },
  {
    "repo": "pytorch/serve",
    "number": 1153,
    "title": "What is the post route link to upload the kitten.jpg? instead of the \"-T\"",
    "body": "## \ud83d\udcda Documentation\r\n\r\n\r\nFor example, if I use something like postman, how should I upload the image?\r\nThank you.\r\n\r\n![image](https://user-images.githubusercontent.com/21982975/124931000-a7f7aa00-dfb6-11eb-8e7e-22501874981f.png)\r\nAll these ways are failed.",
    "url": "https://github.com/pytorch/serve/issues/1153",
    "state": "closed",
    "labels": [],
    "created_at": "2021-07-08T13:00:48Z",
    "updated_at": "2021-07-08T13:56:39Z",
    "user": "AliceSum"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 526,
    "title": "\u2753 [Question] Lowering pass for PyTorch Linear",
    "body": "## \u2753 Question\r\n\r\nHi, I saw that one of the lowering pass TRTorch has is lowering linear to mm + add. I'm wondering what the reason behind this is. Does TensorRT provide better performance with matmul layer + elementwise sum layer than fully connected layer? Or breaking it down help the fusion process in TensorRT?\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/526",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-07-08T05:45:28Z",
    "updated_at": "2021-07-12T16:14:09Z",
    "user": "842974287"
  },
  {
    "repo": "pytorch/serve",
    "number": 1152,
    "title": "How to access API outside of localhost?",
    "body": "Hi! \r\n\r\nI have Wireguard in my machine and have a few other devices connected with it.\r\nLet's say my Wireguard IP is 10.0.0.1, then in the `config.properties` file, I change `inference_address=http://10.0.0.1:8080`. \r\nI'm able to use the API locally but unable to do so outside of the device (I keep getting a timeout error). \r\n\r\n**What I've tried so far:** \r\nI have also tried changing `inference_address` to `0.0.0.0:8080`, but that didn't help either. \r\nEven running it on a different port like `0.0.0.0:5000` didn't help.\r\nIf I use a tunnel (like ngrok) and expose port 8080, it works perfectly. \r\n\r\nIf I have another application running on a separate port, that is accessible by my other device. \r\n\r\nCan someone help out? \r\n\r\nThanks!\r\n",
    "url": "https://github.com/pytorch/serve/issues/1152",
    "state": "open",
    "labels": [
      "help wanted",
      "support"
    ],
    "created_at": "2021-07-07T07:20:50Z",
    "updated_at": "2023-03-17T09:44:42Z",
    "user": "kkmehta03"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 523,
    "title": "\u2753 [Question] My aten::chunk op converter does not work correctly",
    "body": "## \u2753 Question\r\n\r\nI want to use trtorch to compile shufflenet. However, aten::chunk op is not currently supported. I wrote a converter implementation referring to `converters/impl/select.cpp`. Unfortunately, it does not work.\r\n\r\nIs there anything wrong? \r\n\r\nThe python code\r\n```python \r\nmodel = torchvision.models.shufflenet_v2_x1_0(pretrained=True).cuda().eval()\r\ninput_data = torch.randn(1, 3, 224, 224).cuda()\r\nscripted_model = torch.jit.script(model)\r\nout = scripted_model(input_data)\r\n\r\ncompile_settings = {\r\n    \"input_shapes\": [(1, 3, 224, 224)],\r\n}\r\n\r\ntrt_ts_module = trtorch.compile(scripted_model, compile_settings)\r\n```\r\n\r\nThe converter I wrote (compared with the converter of `aten::select`, I only changed `numOuputs` and `sizes`)\r\n```cpp\r\nauto chunk_registrations TRTORCH_UNUSED =\r\n    RegisterNodeConversionPatterns()\r\n        .pattern({\"aten::chunk(Tensor(a) self, int chunks, int dim=0) -> (Tensor[])\",\r\n                  [](ConversionCtx* ctx, const torch::jit::Node* n, args& args) -> bool {\r\n                    auto in = args[0].ITensor();\r\n                    auto numOutputs = args[1].unwrapToInt();\r\n                    auto axis = args[2].unwrapToInt();\r\n                    auto inDimSize = in->getDimensions().d[axis];\r\n                    LOG_DEBUG(\"Number of chunk outputs: \" << numOutputs);\r\n                    std::vector<int64_t> sizes;\r\n\r\n                    if (inDimSize % numOutputs == 0) {\r\n                        for (int64_t i = 0; i < numOutputs; i++) {\r\n                            sizes.push_back(inDimSize / numOutputs);\r\n                        }\r\n                    }\r\n                    else {\r\n                        for (int64_t i = 0; i < numOutputs - 1; i++) {\r\n                            sizes.push_back(inDimSize / numOutputs + 1);\r\n                        }\r\n                        sizes.push_back(inDimSize - (inDimSize / numOutputs + 1) * (numOutputs - 1));\r\n                    }\r\n\r\n                    c10::ListTypePtr lt = n->output()->type()->expect<c10::ListType>();\r\n                    c10::TypePtr elementType = lt->getElementType();\r\n                    auto list = c10::impl::GenericList(elementType);\r\n                    list.reserve(numOutputs);\r\n\r\n                    int start_idx = 0;\r\n                    for (int64_t i = 0; i < numOutputs; i++) {\r\n                        at::Tensor indices = torch::arange(start_idx, start_idx + sizes[i], 1).to(torch::kI32);\r\n                        auto indicesTensor = tensor_to_const(ctx, indices);\r\n\r\n                        auto gather_layer = ctx->net->addGather(*in, *indicesTensor, axis);\r\n                        auto gather_out = gather_layer->getOutput(0);\r\n\r\n                        auto tensor_holder = TensorContainer();\r\n                        tensor_holder.hold_tensor(gather_out);\r\n                        auto ival = c10::IValue(std::move(c10::make_intrusive<TensorContainer>(tensor_holder)));\r\n                        list.emplace_back(ival);\r\n\r\n                        start_idx = start_idx + sizes[i];\r\n                    }\r\n\r\n                    auto chunk_output_ivalue = std::move(torch::jit::IValue(list));\r\n                    ctx->AssociateValueAndIValue(n->outputs()[0], chunk_output_ivalue);\r\n\r\n                    LOG_DEBUG(\"Converted chunk op into a list of IValues\");\r\n                    return true;\r\n                  }});\r\n```\r\nDEBUG log\r\n```\r\nINFO: [TRTorch Conversion Context] - Adding Layer %78 : Tensor[] = aten::chunk(%input.152, %self.stage2.0.stride, %self.stage2.1.stride) # /opt/conda/lib/python3.8/site-packages/torchvision/models/shufflenetv2.py:89:21 (ctx.AddLayer)\r\nDEBUG: [TRTorch Conversion Context] - Node input is an already converted tensor\r\nDEBUG: [TRTorch Conversion Context] - Node input is a result of a previously evaluated value\r\nDEBUG: [TRTorch Conversion Context] - Node input is a result of a previously evaluated value\r\nDEBUG: [TRTorch] - Number of chunk outputs: 2\r\nDEBUG: [TRTorch] - Weights: [58]\r\n    Number of input maps: 58\r\n    Number of output maps: 58\r\n    Element shape: [1]\r\nDEBUG: [TRTorch Conversion Context] - Freezing tensor 0x7fbb1c37c4e0 as an IConstantLayer\r\nDEBUG: [TRTorch] - Weights: [58]\r\n    Number of input maps: 58\r\n    Number of output maps: 58\r\n    Element shape: [1]\r\nDEBUG: [TRTorch Conversion Context] - Freezing tensor 0x7fbb1be22d30 as an IConstantLayer\r\nDEBUG: [TRTorch] - Converted chunk op into a list of IValues\r\nDEBUG: [TRTorch Conversion Context] - Evaluating %x1.9 : Tensor, %x2.9 : Tensor = prim::ListUnpack(%78)\r\nDEBUG: [TRTorch Conversion Context] - Found the evaluated value(s) to be True for node: %x1.9 : Tensor, %x2.9 : Tensor = prim::ListUnpack(%78)\r\nDEBUG: [TRTorch Conversion Context] - Found the evaluated value(s) to be True for node: %x1.9 : Tensor, %x2.9 : Tensor = prim::ListUnpack(%78)\r\nDEBUG: [TRTorch Conversion Context] - Evaluating %81 : Float(58, 58, 1, 1, strides=[58, 1, 1, 1], requires_grad=0, device=cuda:0) = prim::Constant[value=<Tensor>]()\r\nDEBUG: [TRTo",
    "url": "https://github.com/pytorch/TensorRT/issues/523",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-07-05T08:50:04Z",
    "updated_at": "2021-07-07T09:30:47Z",
    "user": "letian-jiang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 61220,
    "title": "How to submit a DDP job on the PBS/SLURM using multiple nodes",
    "body": "Hi everyone, I am trying to train using DistributedDataParallel. Thanks to the great work of the team at PyTorch, a very high efficiency has been achieved. Everything is fine when a model is trained on a single node. However, when I try to use multiple nodes in one job script, all the processes will be on the host node and the slave node will not have any processes running on it. Here is my script for the PBS workload manager:\r\n```\r\n#!/bin/sh\r\n#PBS -V\r\n#PBS -q gpu\r\n#PBS -N test_1e4_T=1\r\n#PBS -l nodes=2:ppn=2\r\nsource /share/home/bjiangch/group-zyl/.bash_profile\r\nconda activate Pytorch-181\r\ncd $PBS_O_WORKDIR\r\n\r\npath=\"/share/home/bjiangch/group-zyl/zyl/pytorch/multi-GPU/program/eann/\"\r\n\r\n#Number of processes per node to launch\r\nNPROC_PER_NODE=2\r\n\r\n#Number of process in all modes\r\nWORLD_SIZE=`expr $PBS_NUM_NODES \\* $NPROC_PER_NODE`\r\n\r\nMASTER=`/bin/hostname -s`\r\ncat $PBS_NODEFILE>nodelist\r\n#Make sure this node (MASTER) comes first\r\nSLAVES=`cat nodelist | grep -v $MASTER | uniq`\r\n\r\n#We want names of master and slave nodes\r\nHOSTLIST=\"$MASTER $SLAVES\"\r\n\r\n\r\n#The path you place your code\r\n#This command to run your pytorch script\r\n#You will want to replace this\r\nCOMMAND=\"$path --world_size=$WORLD_SIZE\"\r\n\r\n\r\n#Get a random unused port on this host(MASTER)\r\n#First line gets list of unused ports\r\n#3rd line gets single random port from the list\r\nMPORT=`ss -tan | awk '{print $5}' | cut -d':' -f2 | \\\r\n        grep \"[2-9][0-9]\\{3,3\\}\" | sort | uniq | shuf -n 1`\r\n\r\n\r\n#Launch the pytorch processes, first on master (first in $HOSTLIST) then on the slaves\r\nRANK=0\r\nfor node in $HOSTLIST; do\r\n        ssh -q $node\r\n                python3 -m torch.distributed.launch \\\r\n                --nproc_per_node=$NPROC_PER_NODE \\\r\n                --nnodes=$PBS_NUM_NODES \\\r\n                --node_rank=$RANK \\\r\n                --master_addr=\"$MASTER\" --master_port=\"$MPORT\" \\\r\n                $COMMAND &\r\n        RANK=$((RANK+1))\r\ndone\r\nwait\r\n```\r\nIt is modified according to the [here](https://www.glue.umd.edu/hpcc/help/software/pytorch.html). \r\nI want to submit a 4 process work ( 2 nodes and 2 process each node). \r\nFor validation, I manually ssh to each node from the login node and execute the \r\nssh gpu1\r\npython3 -m torch.distributed.launch --nnodes=2 --node_rank=0\r\nssh gpu2\r\npython3 -m torch.distributed.launch --nnodes=2 --node_rank=1\r\n\r\nIt will work and has a pretty good parallel efficiency. The same problem will occur on another cluster with a slurm workload manager. I don't see any difference between the two and lead to the totally different results.\r\nAnd the final error \r\n```\r\nTraceback (most recent call last):\r\n  File \"/share/home/bjiangch/group-zyl/.conda/envs/Pytorch-181/lib/python3.8/runpy.py\", line 194, in _run_module_as_main\r\nTraceback (most recent call last):\r\n  File \"/share/home/bjiangch/group-zyl/.conda/envs/Pytorch-181/lib/python3.8/runpy.py\", line 194, in _run_module_as_main\r\nTraceback (most recent call last):\r\n  File \"/share/home/bjiangch/group-zyl/.conda/envs/Pytorch-181/lib/python3.8/runpy.py\", line 194, in _run_module_as_main\r\nTraceback (most recent call last):\r\n  File \"/share/home/bjiangch/group-zyl/.conda/envs/Pytorch-181/lib/python3.8/runpy.py\", line 194, in _run_module_as_main\r\n        return _run_code(code, main_globals, None,return _run_code(code, main_globals, None,\r\n\r\n  File \"/share/home/bjiangch/group-zyl/.conda/envs/Pytorch-181/lib/python3.8/runpy.py\", line 87, in _run_code\r\n  File \"/share/home/bjiangch/group-zyl/.conda/envs/Pytorch-181/lib/python3.8/runpy.py\", line 87, in _run_code\r\n    return _run_code(code, main_globals, None,\r\n  File \"/share/home/bjiangch/group-zyl/.conda/envs/Pytorch-181/lib/python3.8/runpy.py\", line 87, in _run_code\r\n    return _run_code(code, main_globals, None,\r\n  File \"/share/home/bjiangch/group-zyl/.conda/envs/Pytorch-181/lib/python3.8/runpy.py\", line 87, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/share/home/bjiangch/group-zyl/zyl/pytorch/multi-GPU/program/eann/__main__.py\", line 1, in <module>\r\n    exec(code, run_globals)\r\n  File \"/share/home/bjiangch/group-zyl/zyl/pytorch/multi-GPU/program/eann/__main__.py\", line 1, in <module>\r\n    exec(code, run_globals)\r\n  File \"/share/home/bjiangch/group-zyl/zyl/pytorch/multi-GPU/program/eann/__main__.py\", line 1, in <module>\r\n    exec(code, run_globals)\r\n  File \"/share/home/bjiangch/group-zyl/zyl/pytorch/multi-GPU/program/eann/__main__.py\", line 1, in <module>\r\n    import run.train\r\n  File \"/share/home/bjiangch/group-zyl/zyl/pytorch/multi-GPU/program/eann/run/train.py\", line 70, in <module>\r\n    import run.train\r\n  File \"/share/home/bjiangch/group-zyl/zyl/pytorch/multi-GPU/program/eann/run/train.py\", line 70, in <module>\r\n    import run.train\r\n  File \"/share/home/bjiangch/group-zyl/zyl/pytorch/multi-GPU/program/eann/run/train.py\", line 70, in <module>\r\n    import run.train\r\n  File \"/share/home/bjiangch/group-zyl/zyl/pytorch/multi-GPU/program/eann/run/train.py\", line 70, in <module>\r\n    Prop_class = DDP(Prop_class, device_ids=[local_rank], o",
    "url": "https://github.com/pytorch/pytorch/issues/61220",
    "state": "closed",
    "labels": [],
    "created_at": "2021-07-04T05:52:54Z",
    "updated_at": "2021-07-12T20:11:16Z",
    "user": "zhangylch"
  },
  {
    "repo": "pytorch/functorch",
    "number": 67,
    "title": "How to perform jvps and not vjps?",
    "body": "Hi! Thanks for the working prototype, it would be a great addition to pytorch!\r\n\r\nI'm currently using pytorch for research purposes, and I would like to implicitly compute jacobian-vector products (i.e. where the given vectors should multiply the \"inputs\" and not the \"outputs\" of the transformation).\r\n\r\nIs there a `jvp` function? Is there a workaround?",
    "url": "https://github.com/pytorch/functorch/issues/67",
    "state": "closed",
    "labels": [],
    "created_at": "2021-07-03T07:34:59Z",
    "updated_at": "2022-12-08T20:04:56Z",
    "user": "trenta3"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 61128,
    "title": "How to get in touch about a security issue?",
    "body": "Hey there,\r\n\r\nAs there isn't a `SECURITY.md` with an email on your repository, I am unsure how to contact you regarding a potential security issue.\r\n\r\nWould you kindly add a `SECURITY.md` file with an e-mail to your repository? GitHub [recommends](https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository) this as the best way to ensure security issues are responsibly disclosed, and it would massively help security researchers get in touch next time.\r\n\r\nThank you so much and I look forward to hearing from you!",
    "url": "https://github.com/pytorch/pytorch/issues/61128",
    "state": "closed",
    "labels": [],
    "created_at": "2021-07-01T16:07:47Z",
    "updated_at": "2021-07-12T17:13:59Z",
    "user": "zidingz"
  },
  {
    "repo": "pytorch/vision",
    "number": 4147,
    "title": "Nan Loss while using resnet_fpn(not pretrained) backbone with FasterRCNN",
    "body": "## \ud83d\udc1b Bug\r\nI am using this model\r\n```\r\nfrom torchvision.models.detection import FasterRCNN\r\nfrom torchvision.models.detection.backbone_utils import resnet_fpn_backbone\r\nbackbone = resnet_fpn_backbone(backbone_name='resnet152', pretrained=False)\r\nmodel = FasterRCNN(backbone,\r\n                       num_classes=2)\r\n```\r\nWhen I set pretrained=True in the backbone, it works absolutely fine but when I set pretrained=False. It starts giving such output\r\n\r\n```\r\nEpoch: [0]  [  0/457]  eta: 0:27:14  lr: 0.000003  loss: 141610976.0000 (141610976.0000)  loss_classifier: 50311224.0000 (50311224.0000)  loss_box_reg: 62420652.0000 (62420652.0000)  loss_objectness: 7461720.0000 (7461720.0000)  loss_rpn_box_reg: 21417388.0000 (21417388.0000)  time: 3.5773  data: 0.8030  max mem: 10427\r\nLoss is nan, stopping training\r\n{'loss_classifier': tensor(nan, device='cuda:1', grad_fn=<NllLossBackward>), 'loss_box_reg': tensor(nan, device='cuda:1', grad_fn=<DivBackward0>), 'loss_objectness': tensor(nan, device='cuda:1', grad_fn=<BinaryCrossEntropyWithLogitsBackward>), 'loss_rpn_box_reg': tensor(nan, device='cuda:1', grad_fn=<DivBackward0>)}\r\n```\r\n\r\n## Environment\r\n\r\n```\r\ntorch-version =  1.9.0a0+c3d40fd\r\ntorchvision-version =  0.10.0a0\r\n```\r\n\r\nUsing this dockerfile\r\n```\r\nFROM nvcr.io/nvidia/pytorch:21.06-py3\r\n\r\nRUN pip install   pytorch-lightning\r\nRUN pip install -U git+https://github.com/albu/albumentations --no-cache-dir\r\nRUN pip install --upgrade albumentations \r\nRUN pip install timm\r\nRUN pip install odach\r\nRUN pip install ensemble_boxes\r\nRUN pip install opencv-python-headless\r\nRUN pip install --no-cache-dir --upgrade pip\r\n\r\nRUN apt update && apt install -y libsm6 libxext6\r\nRUN apt-get install -y libxrender-dev\r\n\r\nRUN apt install -y p7zip-full p7zip-rar\r\n```\r\nHelp!\n\ncc @datumbox",
    "url": "https://github.com/pytorch/vision/issues/4147",
    "state": "closed",
    "labels": [
      "question",
      "topic: object detection"
    ],
    "created_at": "2021-07-01T13:57:44Z",
    "updated_at": "2021-08-17T18:37:51Z",
    "user": "sahilg06"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 519,
    "title": "\u2753 [Question] Are there plans to support TensorRT 8 and Ubuntu 20.04? ",
    "body": "",
    "url": "https://github.com/pytorch/TensorRT/issues/519",
    "state": "closed",
    "labels": [
      "question",
      "No Activity",
      "Story: TensorRT 8"
    ],
    "created_at": "2021-06-30T23:01:38Z",
    "updated_at": "2022-02-13T00:01:42Z",
    "user": "danielgordon10"
  },
  {
    "repo": "pytorch/text",
    "number": 1350,
    "title": "How to build vocab from Glove embedding?",
    "body": "## \u2753 How to build vocab from Glove embedding?\r\n\r\n**Description**\r\n<!-- Please send questions or ask for help here. -->\r\nHow to build vocab from Glove embedding?\r\n\r\nI have gone through the documentation and the release update, I got to know that the Vectors object is not an attribute of the new Vocab object anymore.\r\n\r\nBut I would still want to build my vocab using Glove embedding or perhaps using Glove embedding in my model, anyway for the new API? ",
    "url": "https://github.com/pytorch/text/issues/1350",
    "state": "open",
    "labels": [],
    "created_at": "2021-06-30T16:11:53Z",
    "updated_at": "2022-02-27T11:29:03Z",
    "user": "OsbertTay"
  },
  {
    "repo": "pytorch/vision",
    "number": 4134,
    "title": "Hey, after changing the segmention.py script, has anyone tested the backbone using Mobilenetv3_large as deeplabv3? When I start the train.py script, I throw the error shown in the screenshot:",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n[\r\n![image](https://user-images.githubusercontent.com/49866330/123753767-ca216600-d8ec-11eb-88a5-81a4374ca9f2.png)\r\n](url)",
    "url": "https://github.com/pytorch/vision/issues/4134",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-06-29T07:15:14Z",
    "updated_at": "2021-06-29T10:32:17Z",
    "user": "GalSang17"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 60847,
    "title": "How to release CPU memory cache in Libtorch JIT ?",
    "body": "## \u2753 Questions and Help\r\nHi every one, I would like to know to release CPU memory cache in Libtorch JIT? If there is no such way, can I set percentile of maximum memory used as cache ?  And I want to know if each torchscript::jit::module has its own memory cache , or all modules share one global memory cache ? Thanks.\r\n\r\n\r\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/60847",
    "state": "open",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2021-06-28T03:40:21Z",
    "updated_at": "2021-07-07T03:01:06Z",
    "user": "w1d2s"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 60825,
    "title": "Where OpInfo doesn't handle cases where one of the inputs is a scalar",
    "body": "https://github.com/pytorch/pytorch/blob/master/torch/testing/_internal/common_methods_invocations.py#L4436\r\n\r\nIt'd be nice to cover the other cases as well.\n\ncc @mruberry @VitalyFedyunin @walterddr @heitorschueroff",
    "url": "https://github.com/pytorch/pytorch/issues/60825",
    "state": "open",
    "labels": [
      "module: tests",
      "triaged",
      "module: sorting and selection"
    ],
    "created_at": "2021-06-26T20:37:52Z",
    "updated_at": "2021-08-30T20:34:56Z",
    "user": "Chillee"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 511,
    "title": "\u2753 [Question] How can I trace the code that causing Unsupported operators",
    "body": "## \u2753 Question\r\n\r\nHi. I'm trying to enable TensorRT for a Torch Script model and getting a bunch of Unsupported operators. I'm willing to change the implementation to avoid those unsupported operators or even trying to add support for it. But I struggling to find which line of code in my model are causing it.\r\n\r\nI'm doing something like this:\r\n```python\r\nmodel = torch.jit.script(model)\r\nmodel = torch._C._jit_to_backend(\"tensorrt\", model, spec)\r\n```\r\n\r\nAnd getting something like this:\r\n```console\r\nERROR: [TRTorch] - Method requested cannot be compiled by TRTorch.\r\nUnsupported operators listed below:\r\n  -  aten::__contains__.str_list(str[] l, str item) -> (bool)\r\n  -  aten::_set_item.str(Dict(str, t)(a!) l, str(b -> *) idx, t(c -> *) v) -> ()\r\n  -  aten::dict() -> (Dict(str, Tensor))\r\n  -  aten::format(str self, ...) -> (str)\r\n  -  aten::list.t(t[] l) -> (t[])\r\n  -  aten::values.str(Dict(str, t) self) -> (t[](*))\r\nYou can either implement converters for these ops in your application or request implementation\r\nhttps://www.github.com/nvidia/TRTorch/issues\r\n\r\nTraceback (most recent call last):\r\n  File \"convert.py\", line 6, in <module>\r\n    model = SomeModel('weights/ghostnet0.5.pth')\r\n  File \"/home/linus/model/model.py\", line 88, in __init__\r\n    self.model = torch._C._jit_to_backend(\"tensorrt\", self.model, spec)\r\nRuntimeError: The following operation failed in the TorchScript interpreter.\r\nTraceback of TorchScript (most recent call last):\r\n  File \"<string>\", line 4, in __preprocess\r\n            def __preprocess(self, mod: Any, method_compile_spec: Dict[str, Any]):\r\n                self.__create_backend()\r\n                self.__processed_module = self.__backend.preprocess(mod, method_compile_spec)\r\n                                          ~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n          \r\nRuntimeError: [enforce fail at /workspace/TRTorch/py/trtorch/csrc/tensorrt_backend.cpp:19] Expected core::CheckMethodOperatorSupport(mod.toModule(), it->key()) to be true but got false\r\nMethod forwardcannot be compiled by TRTorch\r\n```\r\n\r\nMy question is:\r\n- Does TRTorch have some traceback (like TorchScript) to tell the users which line of code caused the problem ?\r\n- How can I find which line of code are using the unsupported operations?\r\n\r\n## What you have already tried\r\nI have tried printing out the graph for my scripted model with: `print(model.graph)` but yet to find those listed operators above.\r\n```\r\ngraph(%self : __torch__.retinaface.RetinaFace,\r\n      %inputs.1 : Tensor):\r\n  %124 : Function = prim::Constant[name=\"softmax\"]()\r\n  %123 : None = prim::Constant()\r\n  %122 : int = prim::Constant[value=3]()\r\n  %121 : int = prim::Constant[value=-1]() # /home/linus/model/model.py:121:67\r\n  %index.1 : int = prim::Constant[value=0]() # /home/linus/model/model.py:98:33\r\n  %index.3 : int = prim::Constant[value=1]() # /home/linus/model/model.py:99:33\r\n....\r\n```\r\n\r\nI thought that by finding the ops, I can use that comment on the right to find which part of my code are using an unsupported ops. But so far, none have been found ;(\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.8.1\r\n - CPU Architecture: x86\r\n - OS (e.g., Linux): Ubuntu 20.04 LTS\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): conda\r\n - Build command you used (if compiling from source): None\r\n - Are you using local sources or building from archives: local sources\r\n - Python version: 3.8.8\r\n - CUDA version: 11.1.74\r\n - GPU models and configuration: GTX 1080Ti\r\n - Any other relevant information: \r\n\r\n## Additional context\r\n\r\nNone for now. Thanks for checking by ;)",
    "url": "https://github.com/pytorch/TensorRT/issues/511",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-06-26T13:48:04Z",
    "updated_at": "2021-07-22T17:06:15Z",
    "user": "lamhoangtung"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 60819,
    "title": "I want to use the bach size of image to foward with libtorch, how should i do?",
    "body": "single image forward:\r\n\r\nstd::vector<std::vector<Detection>>\r\nmodel4_dec::Run(const cv::Mat& img, float conf_threshold, float iou_threshold) {\r\n\ttorch::NoGradGuard no_grad;\r\n\tstd::cout << \"----------New Frame----------\" << std::endl;\r\n\r\n\t// TODO: check_img_size()\r\n\r\n\t/*** Pre-process ***/\r\n\r\n\tauto start = std::chrono::high_resolution_clock::now();\r\n\r\n\t// keep the original image for visualization purpose\r\n\tcv::Mat img_input = img.clone();\r\n\r\n\tstd::vector<float> pad_info;\r\n\tpad_info = LetterboxImage(img_input, img_input, cv::Size(INPUT_W, INPUT_H));\r\n\tconst float pad_w = pad_info[0];\r\n\tconst float pad_h = pad_info[1];\r\n\tconst float scale = pad_info[2];\r\n\r\n\tcv::cvtColor(img_input, img_input, cv::COLOR_BGR2RGB);  // BGR -> RGB\r\n\timg_input.convertTo(img_input, CV_32FC3, 1.0f / 255.0f);  // normalization 1/255\r\n\tauto tensor_img = torch::from_blob(img_input.data, { 1, img_input.rows, img_input.cols, img_input.channels() }).to(device_);\r\n\r\n\ttensor_img = tensor_img.permute({ 0, 3, 1, 2 }).contiguous();  // BHWC -> BCHW (Batch, Channel, Height, Width)\r\n\r\n\tif (half_) {\r\n\t\ttensor_img = tensor_img.to(torch::kHalf);\r\n\t}\r\n\r\n\tstd::vector<torch::jit::IValue> inputs;\r\n\tinputs.emplace_back(tensor_img);\r\n\r\n\tauto end = std::chrono::high_resolution_clock::now();\r\n\tauto duration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);\r\n\t// It should be known that it takes longer time at first time\r\n\tstd::cout << \"pre-process takes : \" << duration.count() << \" ms\" << std::endl;\r\n\r\n\t/*** Inference ***/\r\n\t// TODO: add synchronize point\r\n\tstart = std::chrono::high_resolution_clock::now();\r\n\r\n\t// inference\r\n\ttorch::jit::IValue output = module_.forward(inputs);\r\n\r\n\tend = std::chrono::high_resolution_clock::now();\r\n\tduration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);\r\n\t// It should be known that it takes longer time at first time\r\n\tstd::cout << \"inference takes : \" << duration.count() << \" ms\" << std::endl;\r\n\r\n\t/*** Post-process ***/\r\n\r\n\tstart = std::chrono::high_resolution_clock::now();\r\n\tauto detections = output.toTuple()->elements()[0].toTensor();\r\n\r\n\t// result: n * 7\r\n\t// batch index(0), top-left x/y (1,2), bottom-right x/y (3,4), score(5), class id(6)\r\n\tauto result = PostProcessing(detections, pad_w, pad_h, scale, img.size(), conf_threshold, iou_threshold);\r\n\r\n\tend = std::chrono::high_resolution_clock::now();\r\n\tduration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);\r\n\t// It should be known that it takes longer time at first time\r\n\tstd::cout << \"post-process takes : \" << duration.count() << \" ms\" << std::endl;\r\n\r\n\treturn result;\r\n}\r\n\r\nbut i want to use bach of image to forward:\r\nstd::vector<std::vector<Detection>> model4_dec::tensor_run(std::vector<cv::Mat>& _vecimg, float conf_threshold, float iou_threshold)\r\n{\r\n\ttorch::NoGradGuard no_grad;\r\n\r\n\tfloat scale = 1;// std::min(out_w / in_w, out_h / in_h);\r\n\tint imgwidth = INPUT_W;\r\n\tint imgheight = INPUT_H;\r\n\tstatic float data[BATCH_SIZE * 3 * INPUT_H * INPUT_W];\r\n\tfor (int b = 0; b < _vecimg.size(); b++)\r\n\t{\r\n\t\t// keep the original image for visualization purpose\r\n\t\tcv::Mat img_input = _vecimg[b].clone();\r\n\t\timgwidth = img_input.cols;\r\n\t\timgheight = img_input.rows;\r\n\t\tscale = std::min(INPUT_W / img_input.cols, INPUT_H / img_input.rows);\r\n\t\tif (img_input.empty()) continue;\r\n\t\tcv::Mat pr_img = preprocess_img(img_input, INPUT_W, INPUT_H); // letterbox BGR to RGB\r\n\t\tpr_img.convertTo(pr_img, CV_32FC3, 1.0f / 255.0f);  // normalization 1/255\r\n\t\tint i = 0;\r\n\t\tfor (int row = 0; row < INPUT_H; ++row) {\r\n\t\t\tuchar* uc_pixel = pr_img.data + row * pr_img.step;\r\n\t\t\tfor (int col = 0; col < INPUT_W; ++col) {\r\n\t\t\t\tdata[b * 3 * INPUT_H * INPUT_W + i] = (float)uc_pixel[1] / 255.0;\r\n\t\t\t\tdata[b * 3 * INPUT_H * INPUT_W + i + INPUT_H * INPUT_W] = (float)uc_pixel[1] / 255.0;\r\n\t\t\t\tdata[b * 3 * INPUT_H * INPUT_W + i + 2 * INPUT_H * INPUT_W] = (float)uc_pixel[0] / 255.0;\r\n\t\t\t\tuc_pixel += 3;\r\n\t\t\t\t++i;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tauto tensor_img = torch::from_blob(data, { BATCH_SIZE, INPUT_H, INPUT_W, 3 }).to(device_);\r\n\ttensor_img = tensor_img.permute({ 0, 3, 1, 2 }).contiguous();  // BHWC -> BCHW (Batch, Channel, Height, Width)\r\n\r\n\tif (half_) {\r\n\t\ttensor_img = tensor_img.to(torch::kHalf);\r\n\t}\r\n\r\n\tstd::vector<torch::jit::IValue> inputs;\r\n\tinputs.emplace_back(tensor_img);\r\n\r\n\t// inference\r\n\ttorch::jit::IValue output = module_.forward(inputs);\r\n\r\n\r\n\t/*** Post-process ***/\r\n\tauto detections = output.toTuple()->elements()[0].toTensor();\r\n\r\n\t// result: n * 7\r\n\t// batch index(0), top-left x/y (1,2), bottom-right x/y (3,4), score(5), class id(6)\r\n\tauto result = PostProcessing(detections, 0, 0, scale, cv::Size(imgwidth, imgheight), conf_threshold, iou_threshold);\r\n\r\n\treturn result;\r\n}\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/60819",
    "state": "closed",
    "labels": [],
    "created_at": "2021-06-26T08:28:09Z",
    "updated_at": "2021-06-28T13:27:36Z",
    "user": "xinsuinizhuan"
  },
  {
    "repo": "pytorch/vision",
    "number": 4117,
    "title": "publish nightly v0.11 to Conda channel `pytorch-nightly`",
    "body": "## \ud83d\ude80 Feature\r\n\r\nI would kindly request if you can update the latest nightly to Conda\r\n\r\n## Motivation\r\n\r\nWe are going to test some against future Pytorch v1.10 but we also need to have a TV for these test and as TV is fixed to a particular PT version with the latest TV revert PT to v1.9\r\n\r\n## Pitch\r\n\r\nsimple testing against future versions\r\n\r\n## Alternatives\r\n\r\nmixing conda and pypi sources\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context or screenshots about the feature request here. -->\r\n",
    "url": "https://github.com/pytorch/vision/issues/4117",
    "state": "closed",
    "labels": [
      "question",
      "topic: binaries"
    ],
    "created_at": "2021-06-25T07:42:01Z",
    "updated_at": "2021-06-29T10:41:04Z",
    "user": "Borda"
  },
  {
    "repo": "pytorch/vision",
    "number": 4115,
    "title": "Again details about how pretrained models are trained?",
    "body": "1. I use [v0.5.0/references](https://github.com/pytorch/vision/blob/build/v0.5.0/references/classification/train.py) to train a resnet50 wirth defalut config. But, I got Best_val Top1=75.806%, which has a gap of 0.3% about the pretrained model. How can I to repreduce your accuracy ?\r\n2. I notice you said you use you recompute the batch norm statistics after training, can you show more details?",
    "url": "https://github.com/pytorch/vision/issues/4115",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2021-06-25T05:51:59Z",
    "updated_at": "2021-06-28T14:59:26Z",
    "user": "YYangZiXin"
  },
  {
    "repo": "pytorch/vision",
    "number": 4105,
    "title": "Hi, why rate is two times with paper",
    "body": "https://github.com/pytorch/vision/blob/d1ab583d0d2df73208e2fc9c4d3a84e969c69b70/torchvision/models/segmentation/deeplabv3.py#L32\r\n\r\n```\r\nn. In the\r\nend, our improved ASPP consists of (a) one 1\u00d71 convolution\r\nand three 3 \u00d7 3 convolutions with rates = (6, 12, 18) when\r\noutput stride = 16 (all with 256 filters and batch normalization), and (b) the image-level features, \r\n```\r\n",
    "url": "https://github.com/pytorch/vision/issues/4105",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2021-06-24T07:04:07Z",
    "updated_at": "2021-07-02T03:52:59Z",
    "user": "flystarhe"
  },
  {
    "repo": "pytorch/vision",
    "number": 4104,
    "title": "whats diff in this code ```try....except```",
    "body": "https://github.com/pytorch/vision/blob/d1ab583d0d2df73208e2fc9c4d3a84e969c69b70/torchvision/_internally_replaced_utils.py#L13\r\n\r\n![image](https://user-images.githubusercontent.com/49515380/123214308-a24f8e00-d4f9-11eb-90fc-6deddf8e3926.png)\r\n\r\n\r\nexcept code also use torch.hub,its same as try code!!!\r\n\r\nwhy do like this?",
    "url": "https://github.com/pytorch/vision/issues/4104",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-06-24T06:37:49Z",
    "updated_at": "2021-06-24T11:46:28Z",
    "user": "jaffe-fly"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 60625,
    "title": "How to checkout 1.8.1 release",
    "body": "I am trying to compile pytorch 1.8.1 release from source but not sure which branch to checkout, as there is no 1.8.1 and the 1.8.0 branches seem to be rc1 or rc2. \r\n\r\nso for example\r\n\r\n```\r\ngit checkout -b  remotes/origin/lts/release/1.8\r\n\r\ngit describe --tags\r\n```\r\n\r\nreturns\r\n\r\nv1.8.0-rc1-4570-g80f40b172f\r\n\r\n\r\nSo how to get 1.8.1? I know the release tarballs don't work\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/60625",
    "state": "closed",
    "labels": [],
    "created_at": "2021-06-24T04:17:58Z",
    "updated_at": "2021-06-24T19:06:58Z",
    "user": "beew"
  },
  {
    "repo": "pytorch/serve",
    "number": 1135,
    "title": "how to serve model converted by hummingbird from sklearn?",
    "body": "if i have a sklearn model, and then use hummingbird (https://github.com/microsoft/hummingbird) to transfer as pytorch tensor model \r\n\r\nso the model structure is from hummingbird, but not by my own such as :\r\n\r\nhummingbird.ml.containers.sklearn.pytorch_containers.PyTorchSklearnContainerClassification\r\nso i dont have the model.py\r\n\r\nhow to use torch serve to serve this model?\r\ni tried below:\r\n\r\ntorch-model-archiver --model-name aa --version 1.0 --handler text_classifier --serialized-file torch_hm_model_cuda.pth\r\ntorchserve --start --ncs --model-store model_store --models tt=aa.mar\r\n\r\nit juse show :\r\n\r\nRemoving orphan pid file.\r\njava.lang.NoSuchMethodError: java.nio.file.Files.readString(Ljava/nio/file/Path;)Ljava/lang/String;\r\n\r\nno other messages.  thanks in advance.\r\n\r\n\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/serve/issues/1135",
    "state": "closed",
    "labels": [],
    "created_at": "2021-06-23T07:25:56Z",
    "updated_at": "2021-06-24T10:03:57Z",
    "user": "aohan237"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 60433,
    "title": "Libtorch JIT :  Does enabling profiling mode increase CPU memory usage ?  How to disable profiling mode properly ?",
    "body": "Hi, I am trying to deploying an Attention-based Encoder Decoder (AED) model with libtorch C++ frontend, when model's decoder loops at output sequence ( the decoder jit module 's forward method is repeatedly called at each label time step ), the CPU memory usage is very high (~ 20 GB), and I think it's far too high compared to it should be ( at each decoder step, the internal state tensors should occupy about < 400 MB in total, and state tensors at previous steps is released correctly with management of smart pointers).\r\n\r\nI call torch::jit::getProfilingMode() at begining of inference, and it's true; I try to set it false, but the memory usage is still high.\r\n\r\nI would like to know :\r\n1) whether the high CPU memory usage is related to torch JIT 's profiling mode ?\r\n2) is there any other way to profile CPU memory usage ?\r\n\r\nThe libtorch version used is 1.9.0\r\n\r\nThanks a lot.\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\r\n\r\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/60433",
    "state": "closed",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2021-06-22T04:13:05Z",
    "updated_at": "2021-06-28T03:36:08Z",
    "user": "w1d2s"
  },
  {
    "repo": "pytorch/vision",
    "number": 4091,
    "title": "Unnecessary call .clone() in box_convert function",
    "body": "https://github.com/pytorch/vision/blob/d391a0e992a35d7fb01e11110e2ccf8e445ad8a0/torchvision/ops/boxes.py#L183-L184\r\n\r\nWe can just return boxes without .clone().\r\n\r\nWhat's the purpose?",
    "url": "https://github.com/pytorch/vision/issues/4091",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-06-22T02:03:37Z",
    "updated_at": "2021-06-22T14:14:56Z",
    "user": "developer0hye"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 156,
    "title": "How to add Model Inference Time to yolov5 demo when using live function? Like the iOS demo?",
    "body": "Dear developer, I watched this repository (for Android) yolov5 application test video and I compared another repository (for iOS) yolov5 application test video.\r\nI found that the Android application is missing the provision of \" Model Inference Time\" for real time detection, could you please add it? If not, could you please tell me how to add it? Thank you.\r\n![yolov5_Android](https://user-images.githubusercontent.com/61718945/122684823-64711200-d23a-11eb-9911-ef87a0682102.png)\r\n![yolov5_ios](https://user-images.githubusercontent.com/61718945/122684824-663ad580-d23a-11eb-9be2-5be9c595c89a.png)\r\n",
    "url": "https://github.com/pytorch/android-demo-app/issues/156",
    "state": "closed",
    "labels": [],
    "created_at": "2021-06-20T18:43:18Z",
    "updated_at": "2022-05-08T15:41:52Z",
    "user": "zxsitu"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 154,
    "title": "where is yolov5 model",
    "body": "Does anyone know how to download yolov5s.torchscript.ptl, I don't have this file",
    "url": "https://github.com/pytorch/android-demo-app/issues/154",
    "state": "open",
    "labels": [],
    "created_at": "2021-06-19T14:38:56Z",
    "updated_at": "2021-06-19T15:18:46Z",
    "user": "GuoQuanhao"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 60266,
    "title": "UserWarning: The epoch parameter in `scheduler.step()` was not necessary and is being deprecated where possible. Please use `scheduler.step()` to step the scheduler.",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1.\r\n1.\r\n1.\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n## Environment\r\n\r\nPlease copy and paste the output from our\r\n[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)\r\n(or fill out the checklist below manually).\r\n\r\nYou can get the script and run it with:\r\n```\r\nwget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py\r\n# For security purposes, please check the contents of collect_env.py before running it.\r\npython collect_env.py\r\n```\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, source):\r\n - Build command you used (if compiling from source):\r\n - Python version:\r\n - CUDA/cuDNN version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/60266",
    "state": "closed",
    "labels": [],
    "created_at": "2021-06-18T13:09:33Z",
    "updated_at": "2021-06-18T15:53:56Z",
    "user": "wanyne-yyds"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 60253,
    "title": "How to export SPP-NET to onnx ?",
    "body": "Here's my code\uff1a\r\n----------------------------------------------------------start----------------------------------------------------------------\r\nimport torch\r\nimport torch.nn as nn\r\nimport math\r\nimport torch.nn.functional as F\r\n\r\n\r\nclass Spp(nn.Module):\r\n\r\n    def __init__(self, level, pooling_type=\"max_pool\"):\r\n        super().__init__()\r\n        self.num = level\r\n        self.pooling_type = pooling_type\r\n\r\n    def forward(self, x):\r\n        h, w = x.shape[2:]\r\n        kernel_size = (math.ceil(h / self.num), math.ceil(w / self.num))\r\n        stride = kernel_size\r\n        pooling = (math.ceil((kernel_size[0] * self.num - h) / 2), math.ceil((kernel_size[1] * self.num - w) / 2))\r\n        if self.pooling_type == 'max_pool' or self.pooling_type == \"max\":\r\n            tensor = F.max_pool2d(x, kernel_size=kernel_size, stride=stride, padding=pooling)\r\n        else:\r\n            tensor = F.avg_pool2d(x, kernel_size=kernel_size, stride=stride, padding=pooling)\r\n        return tensor\r\n\r\n\r\nclass SppNet(nn.Module):\r\n    \r\n    def __init__(self, pooling_type=\"max_pool\", level=1):\r\n        super(SppNet, self).__init__()\r\n        self.spps = []\r\n        for i in range(level):\r\n            self.spps.append(Spp(pooling_type=pooling_type, level=i+1))\r\n        pass\r\n\r\n    def forward(self, x):\r\n        n, c = input.shape[0:2]\r\n        out = []\r\n        for spp in self.spps:\r\n            y = spp(x).reshape(n, c, -1)\r\n            out.append(y)\r\n        out = torch.cat(out, dim=2)\r\n        return out\r\n\r\n\r\n\r\nif __name__ == '__main__':\r\n    input = torch.randn(3, 45, 100, 120)\r\n    sppNet = SppNet(level=7)\r\n    y0 = sppNet(input)\r\n    print(y0.shape)\r\n\r\n    sppNet.eval()\r\n\r\n    torch.onnx.export(sppNet,  # model being run\r\n                      input,  # model input (or a tuple for multiple inputs)\r\n                      'spp-net.onnx',\r\n                      # where to save the model (can be a file or file-like object)\r\n                      export_params=True,  # store the trained parameter weights inside the model file\r\n                      opset_version=11,  # the ONNX version to export the model to\r\n                      do_constant_folding=True,  # whether to execute constant folding for optimization\r\n                      input_names=[\"input\"],  # the model's input names\r\n                      output_names=[\"output\"],  # the model's output names\r\n                      dynamic_axes={\r\n                          \"input\": {0: \"batch_size\", 1: \"channel\", 2:\"height\", 3:\"width\"},\r\n                          \"output\": {0: \"batch_size\", 1: \"channel\", 2:\"length\"}\r\n                      },\r\n                      enable_onnx_checker=True)\r\n\r\n------------------------------------------------------end----------------------------------------------------------------\r\n\r\nExported model  \u201ckernel_ size\u3001pooling \u201d parameter is fixed. \r\nBut I need to set it to a fixed parameter. \r\nThat is to say, the kernel is calculated automatically according to the input size and other parameters, so how to do?\r\nAsk for advice\uff0cThank  you!\r\n\r\n\r\n\n\ncc @garymm @BowenBao @neginraoof",
    "url": "https://github.com/pytorch/pytorch/issues/60253",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged",
      "onnx-triaged"
    ],
    "created_at": "2021-06-18T06:56:59Z",
    "updated_at": "2022-11-01T22:16:36Z",
    "user": "yongxin3344520"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 502,
    "title": "\u2753 [Question] failed to build docker image",
    "body": "## \u2753 Question\r\n\r\nfailed to build docker image\r\n\r\n## What you have already tried\r\n\r\n`docker build -t trtorch -f notebooks/Dockerfile.notebook .`\r\n\r\n\r\n## Additional context\r\n\r\n```\r\nStep 13/21 : WORKDIR /workspace/TRTorch\r\n ---> Running in 6043f6a80286\r\nRemoving intermediate container 6043f6a80286\r\n ---> 18eaa4134512\r\nStep 14/21 : RUN bazel build //:libtrtorch --compilation_mode opt\r\n ---> Running in e5ae54ec3c1e\r\nExtracting Bazel installation...\r\nStarting local Bazel server and connecting to it...\r\nLoading:\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nLoading: 0 packages loaded\r\nAnalyzing: target //:libtrtorch (1 packages loaded, 0 targets configured)\r\nAnalyzing: target //:libtrtorch (39 packages loaded, 155 targets configured)\r\nINFO: Analyzed target //:libtrtorch (42 packages loaded, 2697 targets configured).\r\nINFO: Found 1 target...\r\n[0 / 112] [Prepa] BazelWorkspaceStatusAction stable-status.txt ... (6 actions, 0 running)\r\nERROR: /workspace/TRTorch/cpp/api/BUILD:3:11: C++ compilation of rule '//cpp/api:trtorch' failed (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 61 argument(s) skipped)\r\n\r\nUse --sandbox_debug to see verbose messages from the sandbox gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 61 argument(s) skipped)\r\n\r\nUse --sandbox_debug to see verbose messages from the sandbox\r\nIn file included from cpp/api/src/compile_spec.cpp:6:0:\r\nbazel-out/k8-opt/bin/cpp/api/_virtual_includes/trtorch/trtorch/trtorch.h:26:25: error: different underlying type in enum 'enum class c10::DeviceType'\r\n enum class DeviceType : int8_t;\r\n                         ^~~~~~\r\nIn file included from bazel-out/k8-opt/bin/external/libtorch/_virtual_includes/c10_cuda/c10/core/Device.h:3:0,\r\n                 from bazel-out/k8-opt/bin/external/libtorch/_virtual_includes/ATen/ATen/core/TensorBody.h:3,\r\n                 from bazel-out/k8-opt/bin/external/libtorch/_virtual_includes/ATen/ATen/Tensor.h:3,\r\n                 from external/libtorch/include/torch/csrc/autograd/function_hook.h:5,\r\n                 from external/libtorch/include/torch/csrc/autograd/variable.h:7,\r\n                 from external/libtorch/include/torch/csrc/jit/api/module.h:3,\r\n                 from cpp/api/src/compile_spec.cpp:1:\r\nbazel-out/k8-opt/bin/external/libtorch/_virtual_includes/c10_cuda/c10/core/DeviceType.h:15:12: note: previous definition here\r\n enum class DeviceType : int16_t {\r\n            ^~~~~~~~~~\r\nTarget //:libtrtorch failed to build\r\nUse --verbose_failures to see the command lines of failed build steps.\r\nINFO: Elapsed time: 490.394s, Critical Path: 28.98s\r\nINFO: 1030 processes: 1024 internal, 6 processwrapper-sandbox.\r\nFAILED: Build did NOT complete successfully\r\nFAILED: Build did NOT complete successfully\r\n```\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/502",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-06-17T10:22:25Z",
    "updated_at": "2021-09-27T00:01:13Z",
    "user": "chrjxj"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 60122,
    "title": "what version of python is suggested with pytorch 1.9",
    "body": "I know pytorch support a variety of python version, but I wonder what version is suggested? python 3.6.6? 3.7.7? etc? \r\nThanks",
    "url": "https://github.com/pytorch/pytorch/issues/60122",
    "state": "closed",
    "labels": [],
    "created_at": "2021-06-16T19:05:52Z",
    "updated_at": "2021-06-16T20:54:15Z",
    "user": "seyeeet"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 60115,
    "title": "How to install torchaudio on Mac M1 ARM?",
    "body": "`torchaudio` doesn't seem to be available for Mac M1. \r\n\r\nIf I run `conda install pytorch torchvision torchaudio -c pytorch` (as described on pytorch's main page) I get this error message:\r\n\r\n```\r\nPackagesNotFoundError: The following packages are not available from current channels:\r\n  - torchaudio \r\n```\r\nIf I run the command without `torchaudio` everything installs fine.\r\n\r\nHow can I fix this and install torchaudio too? \r\n\r\nIf it isn't available (yet) \u2013 do you have any plans to release it too?\r\n\r\nThanks in advance for your help! And I apologize in advance if I don't see the forest for the trees and overlooked sth. obvious.\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/60115",
    "state": "closed",
    "labels": [],
    "created_at": "2021-06-16T18:24:04Z",
    "updated_at": "2021-06-16T20:42:03Z",
    "user": "suissemaxx"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 59933,
    "title": "If I only have the model of PyTorch and don't know the dimension of the input, how to convert it to onnx?",
    "body": "## \u2753 If I only have the model of PyTorch and don't know the dimension of the input, how to convert it to onnx?\r\n\r\n### Question\r\n\r\nI have a series of PyTorch trained models, such as \"model.pth\", but I don't know the input dimensions of the model.\r\nFor instance, in the following function: torch.onnx.export(model, args, f, export_params=True, verbose=False, training=False, input_names=None, output_names=None).\r\nI don't know the \"args\" of the function. How do I define it by just having the model file such as \"model.pth\"?\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/59933",
    "state": "closed",
    "labels": [],
    "created_at": "2021-06-14T08:38:29Z",
    "updated_at": "2021-06-14T15:31:26Z",
    "user": "Wendy-liu17"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 59870,
    "title": "How to export a model with nn.Module in for loop to onnx?",
    "body": "Bellow is a demo code:\r\n```\r\nclass Demo(nn.Module):\r\n    def __init__(self, hidden_size, max_span_len):\r\n        super().__init__()\r\n        self.max_span_len = max_span_len\r\n        self.fc = nn.Linear(hidden_size * 2, hidden_size)\r\n\r\n    def forward(self, seq_hiddens):\r\n        '''\r\n        seq_hiddens: (batch_size, seq_len, hidden_size)\r\n        '''\r\n        seq_len = seq_hiddens.size()[1]\r\n\r\n        hiddens_list = []\r\n        for ind in range(seq_len):\r\n            hidden_each_step = seq_hiddens[:, ind, :]\r\n            a = seq_hiddens[:, ind:ind + self.max_span_len, :]\r\n            b = hidden_each_step[:, None, :].repeat(1, a.shape[1], 1)  \r\n            \r\n            tmp = torch.cat([a, b], dim=-1)\r\n            tmp = torch.tanh(self.fc(tmp))\r\n            hiddens_list.append(tmp)\r\n\r\n        output = torch.cat(hiddens_list, dim = 1)\r\n        return output\r\n\r\n```\r\nHow to expot it to onnx? I need the fc Layer in for loop. Script function seems not work.\r\nThanks!!!\r\n\n\ncc @garymm @BowenBao @neginraoof",
    "url": "https://github.com/pytorch/pytorch/issues/59870",
    "state": "closed",
    "labels": [
      "module: onnx"
    ],
    "created_at": "2021-06-11T12:25:15Z",
    "updated_at": "2021-06-15T18:34:50Z",
    "user": "JaheimLee"
  },
  {
    "repo": "huggingface/transformers",
    "number": 12105,
    "title": "What is the correct way to pass labels to DetrForSegmentation?",
    "body": "The [current documentation](https://huggingface.co/transformers/master/model_doc/detr.html#transformers.DetrForSegmentation.forward) for `DetrModelForSegmentation.forward` says the following about `labels` kwarg:\r\n\r\n> The class labels themselves should be a torch.LongTensor of len (number of bounding boxes in the image,), the boxes a torch.FloatTensor of shape (number of bounding boxes in the image, 4) and the **masks a torch.FloatTensor of shape (number of bounding boxes in the image, 4).**\r\n\r\nBut when I looked at the tests, it seems the shape of `masks` is `torch.rand(self.n_targets, self.min_size, self.max_size)` . \r\n\r\nhttps://github.com/huggingface/transformers/blob/d2753dcbec7123500c1a84a7c2143a79e74df48f/tests/test_modeling_detr.py#L87-L103\r\n\r\n---\r\n\r\nI'm guessing this is a documentation mixup!\r\n\r\nAnyways, it would be super helpful to include a snippet in the DETR docs that shows how to correctly pass masks/other labels + get the loss/loss dict. \ud83d\ude04 \r\n\r\nCC: @NielsRogge ",
    "url": "https://github.com/huggingface/transformers/issues/12105",
    "state": "closed",
    "labels": [],
    "created_at": "2021-06-10T22:15:23Z",
    "updated_at": "2021-06-17T14:37:54Z",
    "user": "nateraw"
  },
  {
    "repo": "pytorch/vision",
    "number": 4001,
    "title": "Unable to build torchvision on Windows (installed torch from source and it is running)",
    "body": "## \u2753 Questions and Help\r\n\r\nI have installed torch successfully in my PC via source, but I am facing this issue while installing the torchvison. I don't think I can install torchvision via pip as it is re-downloading the torch.\r\n\r\nPlease help me to install it\r\n\r\nTIA\r\ni used `python setup.py install`\r\n```\r\nBuilding wheel torchvision-0.9.0a0+01dfa8e\r\nPNG found: True\r\nRunning build on conda-build: False\r\nRunning build on conda: True\r\nJPEG found: True\r\nBuilding torchvision with JPEG image support\r\nFFmpeg found: True\r\nTraceback (most recent call last):\r\n  File \"C:\\Users\\dhawals\\repos\\build_binaries\\vision\\setup.py\", line 472, in <module>\r\n    ext_modules=get_extensions(),\r\n  File \"C:\\Users\\dhawals\\repos\\build_binaries\\vision\\setup.py\", line 352, in get_extensions\r\n    platform_tag = subprocess.run(\r\n  File \"C:\\Users\\dhawals\\miniconda3\\lib\\subprocess.py\", line 501, in run\r\n    with Popen(*popenargs, **kwargs) as process:\r\n  File \"C:\\Users\\dhawals\\miniconda3\\lib\\subprocess.py\", line 947, in __init__\r\n    self._execute_child(args, executable, preexec_fn, close_fds,\r\n  File \"C:\\Users\\dhawals\\miniconda3\\lib\\subprocess.py\", line 1356, in _execute_child\r\n    args = list2cmdline(args)\r\n  File \"C:\\Users\\dhawals\\miniconda3\\lib\\subprocess.py\", line 561, in list2cmdline\r\n    for arg in map(os.fsdecode, seq):\r\n  File \"C:\\Users\\dhawals\\miniconda3\\lib\\os.py\", line 822, in fsdecode\r\n    filename = fspath(filename)  # Does type-checking of `filename`.\r\nTypeError: expected str, bytes or os.PathLike object, not NoneType\r\n```",
    "url": "https://github.com/pytorch/vision/issues/4001",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-06-08T09:48:25Z",
    "updated_at": "2021-06-14T11:01:21Z",
    "user": "dhawals1939"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 59607,
    "title": "Where is libtorch archive???",
    "body": "Where is libtorch archive???\r\n\r\nI can't find libtorch 1.6.0..",
    "url": "https://github.com/pytorch/pytorch/issues/59607",
    "state": "closed",
    "labels": [],
    "created_at": "2021-06-08T01:03:23Z",
    "updated_at": "2023-04-07T13:29:34Z",
    "user": "hi-one-gg"
  },
  {
    "repo": "pytorch/xla",
    "number": 2981,
    "title": "Where is torch_xla/csrc/XLANativeFunctions.h?",
    "body": "## \ud83d\udc1b Bug\r\n\r\nTrying to compile master found that there is no https://github.com/pytorch/xla/blob/master/torch_xla/csrc/XLANativeFunctions.h after updating to latest master.\r\n\r\nHow this file is generated? (aka which step Im missing?)\r\n\r\n```\r\n$ time pip install -e . --verbose\r\n...............\r\n    [23/101] clang++-8 -MMD -MF /home/tyoc213/Documents/github/pytorch/xla/build/temp.linux-x86_64-3.8/torch_xla/csrc/init_python_bindings.o.d -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/tyoc213/Documents/github/pytorch/xla -I/home/tyoc213/Documents/github/pytorch/xla/third_party/tensorflow/bazel-tensorflow -I/home/tyoc213/Documents/github/pytorch/xla/third_party/tensorflow/bazel-bin -I/home/tyoc213/Documents/github/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/protobuf_archive/src -I/home/tyoc213/Documents/github/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/com_google_protobuf/src -I/home/tyoc213/Documents/github/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/eigen_archive -I/home/tyoc213/Documents/github/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/com_google_absl -I/home/tyoc213/Documents/github/pytorch -I/home/tyoc213/Documents/github/pytorch/torch/csrc -I/home/tyoc213/Documents/github/pytorch/torch/lib/tmp_install/include -I/home/tyoc213/Documents/github/pytorch/torch/include -I/home/tyoc213/Documents/github/pytorch/torch/include/torch/csrc/api/include -I/home/tyoc213/Documents/github/pytorch/torch/include/TH -I/home/tyoc213/Documents/github/pytorch/torch/include/THC -I/home/tyoc213/miniconda3/envs/xla/include/python3.8 -c -c /home/tyoc213/Documents/github/pytorch/xla/torch_xla/csrc/init_python_bindings.cpp -o /home/tyoc213/Documents/github/pytorch/xla/build/temp.linux-x86_64-3.8/torch_xla/csrc/init_python_bindings.o -std=c++14 -Wno-sign-compare -Wno-deprecated-declarations -Wno-return-type -Wno-macro-redefined -Wno-return-std-move -DNDEBUG -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_clang\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1002\"' -DTORCH_EXTENSION_NAME=_XLAC -D_GLIBCXX_USE_CXX11_ABI=1\r\n    FAILED: /home/tyoc213/Documents/github/pytorch/xla/build/temp.linux-x86_64-3.8/torch_xla/csrc/init_python_bindings.o\r\n    clang++-8 -MMD -MF /home/tyoc213/Documents/github/pytorch/xla/build/temp.linux-x86_64-3.8/torch_xla/csrc/init_python_bindings.o.d -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/tyoc213/Documents/github/pytorch/xla -I/home/tyoc213/Documents/github/pytorch/xla/third_party/tensorflow/bazel-tensorflow -I/home/tyoc213/Documents/github/pytorch/xla/third_party/tensorflow/bazel-bin -I/home/tyoc213/Documents/github/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/protobuf_archive/src -I/home/tyoc213/Documents/github/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/com_google_protobuf/src -I/home/tyoc213/Documents/github/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/eigen_archive -I/home/tyoc213/Documents/github/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/com_google_absl -I/home/tyoc213/Documents/github/pytorch -I/home/tyoc213/Documents/github/pytorch/torch/csrc -I/home/tyoc213/Documents/github/pytorch/torch/lib/tmp_install/include -I/home/tyoc213/Documents/github/pytorch/torch/include -I/home/tyoc213/Documents/github/pytorch/torch/include/torch/csrc/api/include -I/home/tyoc213/Documents/github/pytorch/torch/include/TH -I/home/tyoc213/Documents/github/pytorch/torch/include/THC -I/home/tyoc213/miniconda3/envs/xla/include/python3.8 -c -c /home/tyoc213/Documents/github/pytorch/xla/torch_xla/csrc/init_python_bindings.cpp -o /home/tyoc213/Documents/github/pytorch/xla/build/temp.linux-x86_64-3.8/torch_xla/csrc/init_python_bindings.o -std=c++14 -Wno-sign-compare -Wno-deprecated-declarations -Wno-return-type -Wno-macro-redefined -Wno-return-std-move -DNDEBUG -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_clang\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1002\"' -DTORCH_EXTENSION_NAME=_XLAC -D_GLIBCXX_USE_CXX11_ABI=1\r\n    /home/tyoc213/Documents/github/pytorch/xla/torch_xla/csrc/init_python_bindings.cpp:36:10: fatal error: 'torch_xla/csrc/XLANativeFunctions.h' file not found\r\n    #include \"torch_xla/csrc/XLANativeFunctions.h\"\r\n             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    1 error generated.\r\n\r\n```\r\n\r\n## Environment\r\n\r\n - Installing from source on Linux/CUDA:\r\n - torch_xla version: master\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/2981",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2021-06-08T00:42:14Z",
    "updated_at": "2021-07-21T13:22:46Z",
    "user": "tyoc213"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 495,
    "title": "\u2753 [Question] How does the compiler uses the optimal input shape ? ",
    "body": "When compiling the model we have to specify an optimal input shape as well as a minimal and maximal one. \r\n\r\nI tested various optimal sizes to evaluate the impact of this parameter but found little to no difference for the inference time. \r\n\r\nHow is this parameter used by the compiler ?\r\n\r\n\r\nThank you for your time and consideration, \r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/495",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-06-07T13:21:20Z",
    "updated_at": "2021-06-09T09:52:53Z",
    "user": "MatthieuToulemont"
  },
  {
    "repo": "pytorch/text",
    "number": 1323,
    "title": "How to use pretrained embeddings (`Vectors`) in the new API?",
    "body": "From what is see in the `experimental` module is that we pass a vocab object, which transforms the token into an unique integer.\r\n\r\nhttps://github.com/pytorch/text/blob/e189c260e959ab966b1eaa986177549a6445858c/torchtext/experimental/datasets/text_classification.py#L50-L55\r\n\r\nThus something like `['hello', 'word']` might turn into `[42, 43]`, this can then be fed into an `nn.Embedding` layer to get the corresponding embedding vector and so on.\r\n\r\nWhat i dont't understand is how do i use\r\n\r\nhttps://github.com/pytorch/text/blob/e189c260e959ab966b1eaa986177549a6445858c/torchtext/vocab.py#L475-L487\r\n\r\n`GloVe` is a `Vectors` but it transforms `['hello', 'world']` into its corresponding `Embedding` tensor representation, this doesn't allow me to pad the sentences beforehand.\r\n\r\nAlso its weird that now i don't need a `Vocab` object, but in most of the modules i see that `Vocab` is built if its set to `None`.\r\n\r\nhttps://github.com/pytorch/text/blob/e189c260e959ab966b1eaa986177549a6445858c/torchtext/experimental/datasets/text_classification.py#L85-L89\r\n\r\nI don't really understand how am i supposed to interpret `Vocab` and `Vectors` and where should i use them? In `nn.Module` i.e. my model, or in `data.Dataset`, i.e. my dataset ? What if i want to fine tune the pretrained embeddings as well ?\r\n\r\nShould both of them be used, or just either one ?\r\n\r\nI couldn't even find good examples in https://github.com/pytorch/text/tree/master/examples/text_classification\r\n\r\nI'm coming from the traditional torch vision library guy, so kudos to dumping the old legacy style torchtext, i really hated it, the new api's seem promising, but just a little confusing as of now.",
    "url": "https://github.com/pytorch/text/issues/1323",
    "state": "open",
    "labels": [],
    "created_at": "2021-06-05T10:58:38Z",
    "updated_at": "2021-07-01T03:26:20Z",
    "user": "satyajitghana"
  },
  {
    "repo": "huggingface/transformers",
    "number": 12005,
    "title": "where is the code for  DetrFeatureExtractor, DetrForObjectDetection",
    "body": "Hello my dear friend. \r\ni am long for the model of https://huggingface.co/facebook/detr-resnet-50\r\ni cannot find the code of it in transformers==4.7.0.dev0  and  4.6.1  pleae help me . appreciated.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n## Environment info\r\n<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.\r\n     Don't forget to fill out the missing fields in that output! -->\r\n\r\n- `transformers` version:\r\n- Platform:\r\n- Python version:\r\n- PyTorch version (GPU?):\r\n- Tensorflow version (GPU?):\r\n- Using GPU in script?:\r\n- Using distributed or parallel set-up in script?:\r\n\r\n### Who can help\r\n<!-- Your issue will be replied to more quickly if you can figure out the right person to tag with @\r\n If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.\r\n Please tag fewer than 3 people.\r\n\r\nModels:\r\n\r\n- albert, bert, xlm: @LysandreJik\r\n- blenderbot, bart, marian, pegasus, encoderdecoder,  t5: @patrickvonplaten, @patil-suraj\r\n- longformer, reformer, transfoxl, xlnet: @patrickvonplaten\r\n- fsmt: @stas00\r\n- funnel: @sgugger\r\n- gpt2: @patrickvonplaten, @LysandreJik\r\n- rag: @patrickvonplaten, @lhoestq\r\n- tensorflow: @Rocketknight1\r\n\r\nLibrary:\r\n\r\n- benchmarks: @patrickvonplaten\r\n- deepspeed: @stas00\r\n- ray/raytune: @richardliaw, @amogkam\r\n- text generation: @patrickvonplaten\r\n- tokenizers: @LysandreJik\r\n- trainer: @sgugger\r\n- pipelines: @LysandreJik\r\n\r\nDocumentation: @sgugger\r\n\r\nModel hub:\r\n\r\n- for issues with a model report at https://discuss.huggingface.co/ and tag the model's creator.\r\n\r\nHF projects:\r\n\r\n- datasets: [different repo](https://github.com/huggingface/datasets)\r\n- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)\r\n\r\nExamples:\r\n\r\n- maintained examples (not research project or legacy): @sgugger, @patil-suraj\r\n- research_projects/bert-loses-patience: @JetRunner\r\n- research_projects/distillation: @VictorSanh\r\n\r\n -->\r\n\r\n## Information\r\n\r\nModel I am using (Bert, XLNet ...):\r\n\r\nThe problem arises when using:\r\n* [ ] the official example scripts: (give details below)\r\n* [ ] my own modified scripts: (give details below)\r\n\r\nThe tasks I am working on is:\r\n* [ ] an official GLUE/SQUaD task: (give the name)\r\n* [ ] my own task or dataset: (give details below)\r\n\r\n## To reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1.\r\n2.\r\n3.\r\n\r\n<!-- If you have code snippets, error messages, stack traces please provide them here as well.\r\n     Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting\r\n     Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.-->\r\n\r\n## Expected behavior\r\n\r\n<!-- A clear and concise description of what you would expect to happen. -->\r\n",
    "url": "https://github.com/huggingface/transformers/issues/12005",
    "state": "closed",
    "labels": [],
    "created_at": "2021-06-03T09:28:27Z",
    "updated_at": "2021-06-10T07:06:59Z",
    "user": "zhangbo2008"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 59368,
    "title": "How to remap RNNs hidden tensor to other device in torch.jit.load?",
    "body": "Model: CRNN (used in OCR)\r\n\r\n1. When I trace model in cpu device, and use torch.jit.load(f, map_location=\"cuda:0\"), I got an error as below\r\nInput and hidden tensor are not at same device, found input tensor at cuda:0 and hidden tensor at cpu.\r\n\r\n2. When I trace model in cuda:0 device, and use torch.jit.load(f, map_location=\"cuda:1\"), I got an error as below\r\nInput and hidden tensor are not at same device, found input tensor at cuda:1 and hidden tensor at cuda:0.\r\n\r\nIs there a way to remap RNNs hidden tensor to other device in loaded module by jit?\r\n\r\nPyTorch Version: 1.8.1\r\n\r\n\r\n\r\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/59368",
    "state": "closed",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2021-06-03T09:24:23Z",
    "updated_at": "2021-10-21T06:19:02Z",
    "user": "shihaoyin"
  },
  {
    "repo": "pytorch/vision",
    "number": 3949,
    "title": "Meaning of Assertion of infer_scale function in  torchvision/ops/poolers.py",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\nI want to know the meaning of the assert at infer_scale function in  torchvision/ops/poolers.py.\r\n![image](https://user-images.githubusercontent.com/23451721/120587728-dee71700-c470-11eb-8057-0d26a9afdfd1.png)\r\n\r\nIt makes assertion error \r\n\r\n  File \"/home/ubuntu/.jupyter/engine.py\", line 199, in evaluate_one_image\r\n    output = model(loader)\r\n  File \"/home/ubuntu/.venv/jupyter/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 889, in _call_impl\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/home/ubuntu/.venv/jupyter/lib/python3.6/site-packages/torchvision/models/detection/generalized_rcnn.py\", line 98, in forward\r\n    detections, detector_losses = self.roi_heads(features, proposals, images.image_sizes, targets)\r\n  File \"/home/ubuntu/.venv/jupyter/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 889, in _call_impl\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/home/ubuntu/.venv/jupyter/lib/python3.6/site-packages/torchvision/models/detection/roi_heads.py\", line 752, in forward\r\n    box_features = self.box_roi_pool(features, proposals, image_shapes)\r\n  File \"/home/ubuntu/.venv/jupyter/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 889, in _call_impl\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/home/ubuntu/.venv/jupyter/lib/python3.6/site-packages/torchvision/ops/poolers.py\", line 221, in forward\r\n    self.setup_scales(x_filtered, image_shapes)\r\n  File \"/home/ubuntu/.venv/jupyter/lib/python3.6/site-packages/torchvision/ops/poolers.py\", line 182, in setup_scales\r\n    scales = [self.infer_scale(feat, original_input_shape) for feat in features]\r\n  File \"/home/ubuntu/.venv/jupyter/lib/python3.6/site-packages/torchvision/ops/poolers.py\", line 182, in <listcomp>\r\n    scales = [self.infer_scale(feat, original_input_shape) for feat in features]\r\n  File \"/home/ubuntu/.venv/jupyter/lib/python3.6/site-packages/torchvision/ops/poolers.py\", line 166, in infer_scale\r\n    assert possible_scales[0] == possible_scales[1]\r\nAssertionError\r\n\r\nlike this, and without assertion it makes correct results.\r\nwhat's the meaning of that assertion?\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/3949",
    "state": "closed",
    "labels": [
      "question",
      "module: ops"
    ],
    "created_at": "2021-06-03T04:38:03Z",
    "updated_at": "2021-06-09T11:59:52Z",
    "user": "teang1995"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 59231,
    "title": "How to solve the AssertionError: Torch not compiled with CUDA enabled",
    "body": "For the usage of the repo based on PyTorch(Person_reID_baseline_pytorch), I followed the guidance on its readme.md. However, I've got an error on the training step below: (I used --gpu_ids -1 as I use CPU only option in my MacOS)\r\n\r\n`python train.py --gpu_ids -1 --name ft_ResNet50 --train_all --batchsize 32 --data_dir /Users/455832/Person_reID_baseline_pytorch/Market-1501-v15.09.15/pytorch`\r\n\r\nThe error I got is below:\r\n\r\n```\r\nDownloading: \"https://download.pytorch.org/models/resnet50-19c8e357.pth\" to /Users/455832/.cache/torch/checkpoints/resnet50-19c8e357.pth\r\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 102502400/102502400 [00:14<00:00, 7210518.23it/s]\r\nft_net(\r\n  (model): ResNet(\r\n    (conv1): Conv2d(3, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False)\r\n    (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n    (relu): ReLU(inplace)\r\n    (maxpool): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)\r\n    (layer1): Sequential(\r\n      (0): Bottleneck(\r\n        (conv1): Conv2d(64, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\r\n        (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n        (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\r\n        (bn2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n        (conv3): Conv2d(64, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\r\n        (bn3): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n        (relu): ReLU(inplace)\r\n        (downsample): Sequential(\r\n          (0): Conv2d(64, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\r\n          (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n        )\r\n      )\r\n      (1): Bottleneck(\r\n        (conv1): Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\r\n        (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n        (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\r\n        (bn2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n        (conv3): Conv2d(64, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\r\n        (bn3): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n        (relu): ReLU(inplace)\r\n      )\r\n      (2): Bottleneck\r\n.......\r\n.......\r\n)\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 386, in <module>\r\n    model = model.cuda()\r\n  File \"/Users/455832/opt/anaconda3/envs/reid_conda/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 265, in cuda\r\n    return self._apply(lambda t: t.cuda(device))\r\n  File \"/Users/455832/opt/anaconda3/envs/reid_conda/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 193, in _apply\r\n    module._apply(fn)\r\n  File \"/Users/455832/opt/anaconda3/envs/reid_conda/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 193, in _apply\r\n    module._apply(fn)\r\n  File \"/Users/455832/opt/anaconda3/envs/reid_conda/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 199, in _apply\r\n    param.data = fn(param.data)\r\n  File \"/Users/455832/opt/anaconda3/envs/reid_conda/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 265, in <lambda>\r\n    return self._apply(lambda t: t.cuda(device))\r\n  File \"/Users/455832/opt/anaconda3/envs/reid_conda/lib/python3.6/site-packages/torch/cuda/__init__.py\", line 162, in _lazy_init\r\n    _check_driver()\r\n  File \"/Users/455832/opt/anaconda3/envs/reid_conda/lib/python3.6/site-packages/torch/cuda/__init__.py\", line 75, in _check_driver\r\n    raise AssertionError(\"Torch not compiled with CUDA enabled\")\r\nAssertionError: Torch not compiled with CUDA enabled\r\n```\r\n\r\n\r\nAs suggested in its readme.md, I installed pytorch=1.1.0 and torchvision=0.3.0 and numpy=1.13.1, which are requirements, into my virtual environment using 3.6.12 python requirement over the instructions in PyTorch official website (https://pytorch.org/get-started/previous-versions/#wheel-10)\r\n\r\n`conda install pytorch==1.1.0 torchvision==0.3.0 -c pytorch`\r\n\r\nCan you please guide me to solve this issue?\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/59231",
    "state": "closed",
    "labels": [],
    "created_at": "2021-05-31T20:45:33Z",
    "updated_at": "2023-06-04T06:22:56Z",
    "user": "aktaseren"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 493,
    "title": "\u2753 [Question] How to set three input tensor shape in input_shape? ",
    "body": "## \u2753 Question\r\n\r\n<!-- How to set three input tensor shape in input_shape\uff1f-->\r\nI have three input tensor:src_tokens, dummy_embeded_x, dummy_encoder_embedding\r\nIn this case, I don't konw how to set input_shape in compile_settings's \"input_shape\"\r\nWho can help me? Thank you!\r\n\r\n`encoder_out = model.forward_encoder([src_tokens, dummy_embeded_x, dummy_encoder_embedding])`\r\n`...`\r\n`script_encoder = torch.jit.script(encoder)...`\r\n`compile_settings = {\r\n            \"input_shapes\": [[2, 16]],\r\n            \"op_precision\": torch.float32\r\n        }`",
    "url": "https://github.com/pytorch/TensorRT/issues/493",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-05-31T02:48:53Z",
    "updated_at": "2021-06-23T19:56:33Z",
    "user": "wxyhv"
  },
  {
    "repo": "pytorch/vision",
    "number": 3938,
    "title": "Batch size of the training recipes on multiple GPUs",
    "body": "## \u2753 Questions and Help\r\n\r\nIn the README file that describes the recipes of training the classification models, under the references directory, it is stated that the models are trained with batch-size=32 on 8 GPUs. \r\n\r\nDoes it mean that:\r\n- the whole batch-size is 32 and each GPU gets only 4 images to process at a time?\r\n- OR each GPU gets 32 images to process at a time, meaning that the global batch-size is actually 256?\r\n\r\nThanks.\r\n",
    "url": "https://github.com/pytorch/vision/issues/3938",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-05-30T13:16:07Z",
    "updated_at": "2021-05-30T14:52:38Z",
    "user": "talcs"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 59186,
    "title": "Document on how to use ATEN_CPU_CAPABILITY",
    "body": "## \ud83d\ude80 Feature\r\n<!-- A clear and concise description of the feature proposal -->\r\nIt would be great if ATEN_CPU_CAPABILITY would be documented with an example on how to use it. \r\n\r\n## Motivation\r\n\r\n<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->\r\nI am currently trying to build PyTorch without AVX instructions, because I am deploying my docker image to a lot of different systems. While trying to understand how to remove AVX instructions I found ATEN_CPU_CAPABILITY. It is not clear on how to use it. \r\n\r\nMy unanswered questions are: Does it work on runtime? Do I have build PyTorch myself and set ATEN_CPU_CAPABILITY before building? Can I pass ATEN_CPU_CAPABILITY to setup.py? How do I know if I set it the right way? Are there any wheels without AVX instructions available?\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/59186",
    "state": "closed",
    "labels": [],
    "created_at": "2021-05-30T11:40:07Z",
    "updated_at": "2021-05-30T21:31:30Z",
    "user": "derneuere"
  },
  {
    "repo": "pytorch/serve",
    "number": 1103,
    "title": "Can two workflows share the same model with each other?",
    "body": "Continuing my previous post: [How i do models chain processing and batch processing for analyzing text data?](https://github.com/pytorch/serve/issues/1055)\r\n\r\nCan I create two workflows using the same RoBERTa base model to perform two different tasks, let's say the classifier_model and summarizer_model? I would like to be able to share the base model with two workflows.\r\n\r\nI am trying to register two workflows: wf_classifier.war and wf_summarizer.war. The first one is registered and the second one is not.\r\n\r\n[log.log](https://github.com/pytorch/serve/files/6562664/log.log)\r\n\r\n\r\n**wf_classifier.war**\r\n```\r\nmodels:\r\n    min-workers: 1\r\n    max-workers: 1\r\n    batch-size: 1\r\n    max-batch-delay: 1000\r\n    retry-attempts: 5\r\n    timeout-ms: 300000\r\n\r\n    roberta:\r\n      url: roberta_base.mar\r\n\r\n    classifier:\r\n      url: classifier.mar\r\n\r\ndag:\r\n  roberta: [classifier]\r\n```\r\n\r\n**wf_summarizer.war**\r\n```\r\nmodels:\r\n    min-workers: 1\r\n    max-workers: 1\r\n    batch-size: 1\r\n    max-batch-delay: 1000\r\n    retry-attempts: 5\r\n    timeout-ms: 300000\r\n\r\n    roberta:\r\n      url: roberta_base.mar\r\n\r\n    summarizer:\r\n      url: summarizer.mar\r\n\r\ndag:\r\n  roberta_base: [summarizer]\r\n```\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/serve/issues/1103",
    "state": "open",
    "labels": [
      "question",
      "triaged_wait",
      "workflowx"
    ],
    "created_at": "2021-05-28T18:04:57Z",
    "updated_at": "2022-09-08T12:27:30Z",
    "user": "yurkoff-mv"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 490,
    "title": "\u2753 [Question] How could I integrate TensorRT's Group Normalization plugin into a TRTorch model ? ",
    "body": "## \u2753 Question\r\n\r\nWhat would be the steps to be able to use TensorRT's Group Normalization plugin into a TRTorch model ? \r\n\r\nThe plugin is defined [here](https://github.com/NVIDIA/TensorRT/tree/master/plugin/groupNormalizationPlugin)\r\n\r\n## Context\r\n\r\nBeing new to this, the Readme from core/conversion/converters didn't really clarify the steps I should follow to make the converter for a TensorRt plugin\r\n\r\n## Environment\r\n\r\nAs an environment I use the `docker/Dockerfile.20.10 -t trtorch:pytorch1.7-cuda11.1-trt7.2.1` from the commit 6bb9fbf561c9cc3f0f1c4c7dde3d61c88e687efc\r\n\r\nThank you for your time and consideration",
    "url": "https://github.com/pytorch/TensorRT/issues/490",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-05-27T12:53:09Z",
    "updated_at": "2021-06-09T09:53:11Z",
    "user": "MatthieuToulemont"
  },
  {
    "repo": "pytorch/cpuinfo",
    "number": 55,
    "title": "Compilation for freeRTOS",
    "body": "Hi all,\r\n\r\nWe are staring to look into using cpuinfo in a freeRTOS / ZedBoard setup.\r\nDo you know if any attempts to port this code to freeRTOS before?\r\nIf not, do you have any tips / advise on how to start this porting?\r\n\r\nThanks,\r\n\r\nPablo.",
    "url": "https://github.com/pytorch/cpuinfo/issues/55",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2021-05-26T09:57:18Z",
    "updated_at": "2024-01-11T00:56:44Z",
    "user": "pablogh-2000"
  },
  {
    "repo": "huggingface/notebooks",
    "number": 42,
    "title": "what is the ' token classification head'?",
    "body": "",
    "url": "https://github.com/huggingface/notebooks/issues/42",
    "state": "closed",
    "labels": [],
    "created_at": "2021-05-25T09:17:49Z",
    "updated_at": "2021-05-29T11:36:11Z",
    "user": "zingxy"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 58894,
    "title": "ease use `scheduler.step()` to step the scheduler. During the deprecation, if epoch is different from None, the closed form is used instead of the new chainable form, where available. Please open an issue if you are unable to replicate your use case: https://github.com/pytorch/pytorch/issues/new/choose.   warnings.warn(EPOCH_DEPRECATION_WARNING, UserWarning)",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/58894",
    "state": "closed",
    "labels": [],
    "created_at": "2021-05-25T02:41:52Z",
    "updated_at": "2021-05-25T21:30:41Z",
    "user": "umie0128"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1539,
    "title": "(Libtorch)How to use packed_accessor64 to access tensor elements in CUDA?",
    "body": "The [tutorial ](https://pytorch.org/cppdocs/notes/tensor_basics.html#cuda-accessors) gives an example about using _packed_accessor64_ to access tensor elements efficiently as follows. However, I still do not know how to use _packed_accessor64_. Can anyone give me a more specific example? Thanks.\r\n```\r\n__global__ void packed_accessor_kernel(\r\n    PackedTensorAccessor64<float, 2> foo,\r\n    float* trace) {\r\n  int i=threadIdx.x\r\n  gpuAtomicAdd(trace, foo[i][i])\r\n}\r\n \r\ntorch::Tensor foo = torch::rand({12, 12});\r\n \r\n// assert foo is 2-dimensional and holds floats.\r\nauto foo_a = foo.packed_accessor64<float,2>();\r\nfloat trace = 0;\r\n \r\npacked_accessor_kernel<<<1, 12>>>(foo_a, &trace);\r\n```\n\ncc @sekyondaMeta @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/1539",
    "state": "open",
    "labels": [
      "CUDA",
      "medium",
      "docathon-h2-2023"
    ],
    "created_at": "2021-05-24T15:56:26Z",
    "updated_at": "2023-11-14T06:41:03Z",
    "user": "tangyipeng100"
  },
  {
    "repo": "pytorch/text",
    "number": 1316,
    "title": "How to load AG_NEWS data from local files",
    "body": "## How to load AG_NEWS data from local files\r\n\r\nI can't get ag news data with `train_iter, test_iter = AG_NEWS(split=('train', 'test'))` online because of my bad connection. So I download the the `train.csv` and `test.csv` manually to my local folder `AG_NEWS` from url `'train': \"https://raw.githubusercontent.com/mhjabreel/CharCnn_Keras/master/data/ag_news_csv/train.csv\",\r\n    'test': \"https://raw.githubusercontent.com/mhjabreel/CharCnn_Keras/master/data/ag_news_csv/test.csv\"`\r\n\r\nAfter that I tried to load ag news data with `train_iter, test_iter = AG_NEWS(root = './AG_NEWS', split=('train', 'test'))`, throw a exception `RuntimeError: The hash of /myfolder/AG_NEWS/train.csv does not match. Delete the file manually and retry.`\r\n\r\nMy file content is \r\n```\r\nmyfolder\r\n\u2502    \r\n\u2514\u2500\u2500\u2500AG_NEWS\r\n\u2502     \u2514\u2500\u2500\u2500   train.csv\r\n\u2502     \u2514\u2500\u2500\u2500   test.csv\r\n```\r\n",
    "url": "https://github.com/pytorch/text/issues/1316",
    "state": "open",
    "labels": [],
    "created_at": "2021-05-24T06:23:55Z",
    "updated_at": "2021-05-24T14:54:04Z",
    "user": "robbenplus"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1534,
    "title": "Why libtorch tensor value assignment takes so much time?",
    "body": "I just assign 10000 values to a tensor:\r\n```\r\nclock_t start = clock();\r\ntorch::Tensor transform_tensor = torch::zeros({ 10000 });\r\nfor (size_t m = 0; m < 10000 m++)\r\n\ttransform_tensor[m] = int(m);\r\nclock_t finish = clock();\r\n```\r\nAnd it takes 0.317s. If I assign 10,000 to an array or a vector, the time cost will be less.\r\nWhy tensor takes so much time? Can the time cost be decreased?\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/1534",
    "state": "open",
    "labels": [
      "question",
      "Tensors"
    ],
    "created_at": "2021-05-24T01:59:42Z",
    "updated_at": "2023-03-08T16:31:16Z",
    "user": "tangyipeng100"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 58554,
    "title": "How to install pytorch1.8.1 with cuda 11.3?",
    "body": "How to install pytorch1.8.1 with cuda 11.3?",
    "url": "https://github.com/pytorch/pytorch/issues/58554",
    "state": "closed",
    "labels": [],
    "created_at": "2021-05-19T13:24:42Z",
    "updated_at": "2021-05-20T03:42:17Z",
    "user": "Bonsen"
  },
  {
    "repo": "pytorch/xla",
    "number": 2957,
    "title": "How to compile xla_ltc_plugin",
    "body": "I was following https://github.com/pytorch/xla/tree/asuhan/xla_ltc_plugin to build ltc-based torch/xla. I compiled ltc successfully but encountered errors when compiling xla. I guess I must have missed something here. Help is greatly appreciated :) cc @asuhan \r\n\r\n<details>\r\n\r\n  <summary>Error log</summary>\r\n\r\n```\r\n[1/14] clang++-8 -MMD -MF /home/ubuntu/pytorch/xla/build/temp.linux-x86_64-3.7/lazy_xla/csrc/version.o.d -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/ubuntu/pytorch/xla -I/home/ubuntu/pytorch/xla/../lazy_tensor_core -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-bin -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/protobuf_archive/src -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/com_google_protobuf/src -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/eigen_archive -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/com_google_absl -I/home/ubuntu/pytorch -I/home/ubuntu/pytorch/torch/csrc -I/home/ubuntu/pytorch/torch/lib/tmp_install/include -I/home/ubuntu/anaconda3/envs/torch-dev/lib/python3.7/site-packages/torch/include -I/home/ubuntu/anaconda3/envs/torch-dev/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/anaconda3/envs/torch-dev/lib/python3.7/site-packages/torch/include/TH -I/home/ubuntu/anaconda3/envs/torch-dev/lib/python3.7/site-packages/torch/include/THC -I/home/ubuntu/anaconda3/envs/torch-dev/include/python3.7m -c -c /home/ubuntu/pytorch/xla/lazy_xla/csrc/version.cpp -o /home/ubuntu/pytorch/xla/build/temp.linux-x86_64-3.7/lazy_xla/csrc/version.o -std=c++14 -Wno-sign-compare -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-return-type -Wno-macro-redefined -Wno-return-std-move -DNDEBUG -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1011\"' -DTORCH_EXTENSION_NAME=_LAZYXLAC -D_GLIBCXX_USE_CXX11_ABI=1\r\n[2/14] clang++-8 -MMD -MF /home/ubuntu/pytorch/xla/build/temp.linux-x86_64-3.7/lazy_xla/csrc/compiler/data_ops.o.d -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/ubuntu/pytorch/xla -I/home/ubuntu/pytorch/xla/../lazy_tensor_core -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-bin -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/protobuf_archive/src -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/com_google_protobuf/src -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/eigen_archive -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/com_google_absl -I/home/ubuntu/pytorch -I/home/ubuntu/pytorch/torch/csrc -I/home/ubuntu/pytorch/torch/lib/tmp_install/include -I/home/ubuntu/anaconda3/envs/torch-dev/lib/python3.7/site-packages/torch/include -I/home/ubuntu/anaconda3/envs/torch-dev/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/anaconda3/envs/torch-dev/lib/python3.7/site-packages/torch/include/TH -I/home/ubuntu/anaconda3/envs/torch-dev/lib/python3.7/site-packages/torch/include/THC -I/home/ubuntu/anaconda3/envs/torch-dev/include/python3.7m -c -c /home/ubuntu/pytorch/xla/lazy_xla/csrc/compiler/data_ops.cpp -o /home/ubuntu/pytorch/xla/build/temp.linux-x86_64-3.7/lazy_xla/csrc/compiler/data_ops.o -std=c++14 -Wno-sign-compare -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-return-type -Wno-macro-redefined -Wno-return-std-move -DNDEBUG -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1011\"' -DTORCH_EXTENSION_NAME=_LAZYXLAC -D_GLIBCXX_USE_CXX11_ABI=1\r\nFAILED: /home/ubuntu/pytorch/xla/build/temp.linux-x86_64-3.7/lazy_xla/csrc/compiler/data_ops.o \r\nclang++-8 -MMD -MF /home/ubuntu/pytorch/xla/build/temp.linux-x86_64-3.7/lazy_xla/csrc/compiler/data_ops.o.d -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/ubuntu/pytorch/xla -I/home/ubuntu/pytorch/xla/../lazy_tensor_core -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-bin -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/protobuf_archive/src -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/com_google_protobuf/src -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/eigen_archive -I/home/ubuntu/pytorch/xla/third_party/tensorflow/bazel-tensorflow/external/com_google_absl -I/home/ubuntu/pytorch -I/home/ubuntu/pytorch/torch/csrc -I/home/ubuntu/pytorch/torch/lib/tmp_install/include -I/home/ubuntu/anaconda3/envs/torch-dev/lib/python3.7/site-packages/torch/include -I/home/ubuntu/anaconda3/envs/torch-dev/lib/python3.7/site-packages/torch/incl",
    "url": "https://github.com/pytorch/xla/issues/2957",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2021-05-19T09:31:12Z",
    "updated_at": "2021-07-08T09:11:02Z",
    "user": "hzfan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 58530,
    "title": "How to remove layer use parent name",
    "body": "Hi, I am a new user of pytorch. I try to load trained model and want to remove the last layer named 'fc'\r\n\r\n```\r\nmodel = models.alexnet()\r\nmodel.fc = nn.Linear(4096, 4)\r\n\r\nckpt = torch.load('net_epoch_24.pth')\r\nmodel.load_state_dict(ckpt)\r\n    \r\nmodel.classifier = nn.Sequential(nn.Linear(9216, 1024),\r\n                                 nn.ReLU(),\r\n                                 nn.Dropout(0.5),\r\n                                 nn.Linear(1024, 8),\r\n                                 nn.LogSoftmax(dim=1))\r\n\r\nprint(model)\r\n```\r\nprint out :\r\n```\r\nAlexNet(\r\n  (features): Sequential(\r\n    (0): Conv2d(3, 64, kernel_size=(11, 11), stride=(4, 4), padding=(2, 2))\r\n    (1): ReLU(inplace=True)\r\n    (2): MaxPool2d(kernel_size=3, stride=2, padding=0, dilation=1, ceil_mode=False)\r\n    (3): Conv2d(64, 192, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2))\r\n    (4): ReLU(inplace=True)\r\n    (5): MaxPool2d(kernel_size=3, stride=2, padding=0, dilation=1, ceil_mode=False)\r\n    (6): Conv2d(192, 384, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\r\n    (7): ReLU(inplace=True)\r\n    (8): Conv2d(384, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\r\n    (9): ReLU(inplace=True)\r\n    (10): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\r\n    (11): ReLU(inplace=True)\r\n    (12): MaxPool2d(kernel_size=3, stride=2, padding=0, dilation=1, ceil_mode=False)\r\n  )\r\n  (avgpool): AdaptiveAvgPool2d(output_size=(6, 6))\r\n  (classifier): Sequential(\r\n    (0): Linear(in_features=9216, out_features=1024, bias=True)\r\n    (1): ReLU()\r\n    (2): Dropout(p=0.5, inplace=False)\r\n    (3): Linear(in_features=1024, out_features=8, bias=True)\r\n    (4): LogSoftmax(dim=1)\r\n  )\r\n  (fc): Linear(in_features=4096, out_features=4, bias=True)\r\n)\r\n```\r\n\r\nis there any simple way to remove the last layer ('fc') ?\r\n\r\nthanks",
    "url": "https://github.com/pytorch/pytorch/issues/58530",
    "state": "closed",
    "labels": [],
    "created_at": "2021-05-19T03:54:29Z",
    "updated_at": "2021-05-20T05:29:28Z",
    "user": "ramdhan1989"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 58460,
    "title": "how to convert scriptmodel to onnx?",
    "body": "how to convert scriptmodel to onnx?\r\nD:\\Python\\Python37\\lib\\site-packages\\torch\\onnx\\utils.py:348: UserWarning: Model has no forward function\r\n  warnings.warn(\"Model has no forward function\")\r\nException occurred when processing textline: 1\n\ncc @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof @SplitInfinity",
    "url": "https://github.com/pytorch/pytorch/issues/58460",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2021-05-18T03:15:29Z",
    "updated_at": "2022-02-24T08:22:22Z",
    "user": "williamlzw"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 473,
    "title": "\u2753 Is it possible to use TRTorch with batchedNMSPlugin for TensorRT?",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\n\r\nHi, I am trying to convert detectron2 traced keypoint-rcnn model that contains ops from torchvision like torchvision::nms. I get the following error:\r\n\r\n> \r\n> terminate called after throwing an instance of 'torch::jit::ErrorReport'\r\n>  what():  \r\n> Unknown builtin op: torchvision::nms.\r\n> Could not find any similar ops to torchvision::nms. This op may not exist or may not be currently supported in TorchScript.\r\n> :\r\n>   File \"/usr/local/lib/python3.7/dist-packages/torchvision/ops/boxes.py\", line 36\r\n>     \"\"\"\r\n>     _assert_has_ops()\r\n>     return torch.ops.torchvision.nms(boxes, scores, iou_threshold)\r\n>            ~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n> Serialized   File \"code/__torch__/torchvision/ops/boxes.py\", line 26\r\n>   _8 = __torch__.torchvision.extension._assert_has_ops\r\n>   _9 = _8()\r\n>   _10 = ops.torchvision.nms(boxes, scores, iou_threshold)\r\n>         ~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n>   return _10\r\n> 'nms' is being compiled since it was called from 'batched_nms'\r\n>   File \"/usr/local/lib/python3.7/dist-packages/torchvision/ops/boxes.py\", line 75\r\n>         offsets = idxs.to(boxes) * (max_coordinate + torch.tensor(1).to(boxes))\r\n>         boxes_for_nms = boxes + offsets[:, None]\r\n>         keep = nms(boxes_for_nms, scores, iou_threshold)\r\n>                ~~~ <--- HERE\r\n>         return keep\r\n> Serialized   File \"code/__torch__/torchvision/ops/boxes.py\", line 18\r\n>     _7 = torch.slice(offsets, 0, 0, 9223372036854775807, 1)\r\n>     boxes_for_nms = torch.add(boxes, torch.unsqueeze(_7, 1), alpha=1)\r\n>     keep = __torch__.torchvision.ops.boxes.nms(boxes_for_nms, scores, iou_threshold, )\r\n>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n>     _0 = keep\r\n>   return _0\r\n> 'batched_nms' is being compiled since it was called from 'RPN.forward'\r\n> Serialized   File \"code/__torch__/detectron2/modeling/proposal_generator/rpn.py\", line 19\r\n>     argument_9: Tensor,\r\n>     image_size: Tensor) -> Tensor:\r\n>     _0 = __torch__.torchvision.ops.boxes.batched_nms\r\n>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\r\n>     _1 = self.rpn_head\r\n>     _2 = (self.anchor_generator).forward(argument_1, argument_2, argument_3, argument_4, argument_5, argument_6, argument_7, argument_8, )\r\n> \r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n - PyTorch Version: 1.8.0\r\n - CPU Architecture: arm64\r\n - OS (e.g., Linux): Ubuntu 18.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): .whl file for jetson\r\n - Build command you used (if compiling from source): `bazel build //:libtrtorch`\r\n - Are you using local sources or building from archives: Local\r\n - Python version: 3.7\r\n - CUDA version: 10.2\r\n - GPU models and configuration: Nvidia Jetson Xavier nx\r\n - Any other relevant information: torchvision C++ API compiled locally\r\n\r\n## Additional context\r\n\r\nI know that there is [batchedNMSPlugin](https://www.ccoderun.ca/programming/doxygen/tensorrt/md_TensorRT_plugin_batchedNMSPlugin_README.html) for TensorRT, but I have no idea how to include it for conversion. I'd appreciate any advice.\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/473",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-05-16T11:28:14Z",
    "updated_at": "2022-08-20T07:31:37Z",
    "user": "VRSEN"
  },
  {
    "repo": "pytorch/extension-cpp",
    "number": 72,
    "title": "How does the layer of C++ extensions translate to TorchScript or onnx?",
    "body": "\r\n",
    "url": "https://github.com/pytorch/extension-cpp/issues/72",
    "state": "open",
    "labels": [],
    "created_at": "2021-05-14T09:50:12Z",
    "updated_at": "2025-08-26T03:36:50Z",
    "user": "yanglinxiabuaaa"
  },
  {
    "repo": "pytorch/vision",
    "number": 3832,
    "title": "Error converting to onnx: forward function contains for loop",
    "body": "Hello, there is a for loop in my forward function. When I turned to onnx, the following error occurred:\r\n\r\n`[ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running Split node. Name:'Split_ 1277' Status Message: Cannot split using values in 'split' attribute. Axis=0 Input shape={59} NumOutputs=17 Num entries in 'split' (must equal number of outputs) was 17 Sum of sizes in 'split' (must equal size of selected axis) was 17`\r\n\r\nPart of my forward code\uff1a\r\n```\r\n    y, ey, x, ex = pad(boxes, w, h)\r\n    if len(boxes) > 0:\r\n        im_data = []\r\n        indx_y = torch.where(ey > y-1)[0]\r\n        for ind in indx_y:\r\n             img_k =  imgs[image_inds[ind],:, (y[ind] - 1).type(torch.int64):ey[ind].type(torch.int64), (x[ind]-1).type(torch.int64):ex[ind].type(torch.int64)].unsqueeze(0)\r\n             im_data.append(imresample(img_k, (24, 24)))\r\n        im_data = torch.cat(im_data, dim=0)\r\n        return im_data\r\n```\r\nI found that during the first onnx conversion, the for loop was executed 17 times, but when I tested it, the for loop required 59 times, so there was an error. In the forward function, indx_y is dynamic, so the number of for loops is also dynamic. Is there any way to solve this problem\uff1f\r\n\n\ncc @neginraoof",
    "url": "https://github.com/pytorch/vision/issues/3832",
    "state": "open",
    "labels": [
      "question",
      "awaiting response",
      "module: onnx"
    ],
    "created_at": "2021-05-14T03:52:58Z",
    "updated_at": "2021-05-18T09:42:32Z",
    "user": "wytcsuch"
  },
  {
    "repo": "pytorch/vision",
    "number": 3825,
    "title": "Why does RandomErasing transform aspect ratio use log scale",
    "body": "See from https://github.com/pytorch/vision/commit/06a5858b3b73d62351456886f0a9f725fddbb3fe the aspect ratio is chosen randomly from a log scale\r\n\r\nI didn't see this in the original paper? And in the reference implementation. \r\n\r\nhttps://github.com/zhunzhong07/Random-Erasing/blob/c699ae481219334755de93e9c870151f256013e4/transforms.py#L38 \n\ncc @vfdev-5",
    "url": "https://github.com/pytorch/vision/issues/3825",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2021-05-13T11:43:04Z",
    "updated_at": "2021-05-13T12:05:11Z",
    "user": "jxu"
  },
  {
    "repo": "pytorch/vision",
    "number": 3822,
    "title": "torchvision C++ compiling ",
    "body": "1. quesion:\r\n\r\nWhen I trying to compile torchvision from source in c++ language,  the terminal thow erros:\r\nIn file included from /home/pc/anaconda3/include/python3.8/pytime.h:6:0,\r\n                 from /home/pc/anaconda3/include/python3.8/Python.h:85,\r\n                 from /media/pc/data/software/vision-0.9.0/torchvision/csrc/vision.cpp:4:\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:647:30: error: stray \u2018\\343\u2019 in program\r\n   const std::vector<IValue>& slots() const {\r\n                                               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:647:30: error: stray \u2018\\200\u2019 in program\r\n   const std::vector<IValue>& slots() const {\r\n                                               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:647:30: error: stray \u2018\\200\u2019 in program\r\n   const std::vector<IValue>& slots() const {\r\n                                               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:647:30: error: stray \u2018\\343\u2019 in program\r\n   const std::vector<IValue>& slots() const {\r\n                                              ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:647:30: error: stray \u2018\\200\u2019 in program\r\n   const std::vector<IValue>& slots() const {\r\n                                               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:647:30: error: stray \u2018\\200\u2019 in program\r\n   const std::vector<IValue>& slots() const {\r\n                                               ^\r\nIn file included from /media/pc/data/software/libtorch/include/c10/core/DispatchKey.h:6:0,\r\n                 from /media/pc/data/software/libtorch/include/torch/library.h:61,\r\n                 from /media/pc/data/software/vision-0.9.0/torchvision/csrc/vision.cpp:6:\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:835:12: error: stray \u2018\\343\u2019 in program\r\n       obj->slots().size() == 1,\r\n               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:835:12: error: stray \u2018\\200\u2019 in program\r\n       obj->slots().size() == 1,\r\n               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:835:12: error: stray \u2018\\200\u2019 in program\r\n       obj->slots().size() == 1,\r\n               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:835:12: error: stray \u2018\\343\u2019 in program\r\n       obj->slots().size() == 1,\r\n               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:835:12: error: stray \u2018\\200\u2019 in program\r\n       obj->slots().size() == 1,\r\n               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:835:12: error: stray \u2018\\200\u2019 in program\r\n       obj->slots().size() == 1,\r\n               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:853:12: error: stray \u2018\\343\u2019 in program\r\n       obj->slots().size() == 1,\r\n               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:853:12: error: stray \u2018\\200\u2019 in program\r\n       obj->slots().size() == 1,\r\n               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:853:12: error: stray \u2018\\200\u2019 in program\r\n       obj->slots().size() == 1,\r\n               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:853:12: error: stray \u2018\\343\u2019 in program\r\n       obj->slots().size() == 1,\r\n               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:853:12: error: stray \u2018\\200\u2019 in program\r\n       obj->slots().size() == 1,\r\n               ^\r\n/media/pc/data/software/libtorch/include/ATen/core/ivalue_inl.h:853:12: error: stray \u2018\\200\u2019 in program\r\n       obj->slots().size() == 1,\r\n               ^\r\n\r\n2. enviroment:\r\n libtorch: 1.8.1\r\n vision: 0.9.1\r\n cmake: 3.19.6\r\n gcc: 7.5.0\r\n python: 3.8.5\r\n system: Ubuntu 18.04\r\n\r\n3. compile code\r\n cmake -DCMAKE_PREFIX_PATH=/media/pc/data/software/libtorch -DCMAKE_INSTALL_PREFIX=/media/pc/data/software/torchvision/install -DCMAKE_BUILD_TYPE=Release -DWITH_CUDA=ON ..\r\n\r\nThanks~\uff01",
    "url": "https://github.com/pytorch/vision/issues/3822",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-05-13T10:29:13Z",
    "updated_at": "2021-05-13T12:02:06Z",
    "user": "swordnosword"
  },
  {
    "repo": "pytorch/text",
    "number": 1305,
    "title": "On Vocab Factory functions behavior",
    "body": "Related discussion #1016 \r\nRelated PRs #1304, #1302   \r\n\r\n---------\r\n\r\ntorchtext provides several factory functions to construct [Vocab class](https://github.com/pytorch/text/blob/f7a6fbd3a910c4066b9a748545df388ae5933a6a/torchtext/vocab.py#L19) object. The primary ways to construct vocabulary are:\r\n\r\n1. Reading raw text from file followed by tokenization to get token entries.\r\n2. Reading token entries directly from file\r\n3. Through iterators that yields iterator or list of tokens\r\n3. Through user supplied ordered dictionary that maps tokens to their corresponding occurrence frequencies\r\n\r\nTypically a vocabulary not only serve the purpose of numericalizing supplied tokens, but they also provide index for special occasions for example when the queried token is out of vocabulary (OOV) or when we need indices for special places like padding, masking, sentence beginning and end etc. \r\n\r\nAs the NLP is fast evolving, research and applied community alike will find novel and creative ways to push  the frontiers of the field. Hence as a platform provider for NLP research and application, it is best not to make assumptions on special symbols including unknown token. We shall provide the aforementioned factory functions with minimal API requirements. We would expect the user to set the special symbols and fallback index through low level APIs of Vocab class. \r\n\r\nBelow are the examples of few scenarios and use cases:\r\n\r\nNote that querying OOV token through Vocab object without setting default index would raise RuntimeError. Hence it is necessary to explicitly set this through API unless user wants to explicitly handle the runtime error as and when it happens. In below examples we set the default index to be same as index of `<unk>` token.\r\n\r\nExample 1: Creating Vocab through text file and explicitly handling special symbols and fallback scenario\r\n```\r\nfrom torchtext.vocab import build_vocab_from_text_file\r\nvocab = build_vocab_from_text_file(\"path/to/raw_text.txt\", min_freq = 1)\r\nspecial_symbols = {'<unk>':0,'<pad>':1,'<s>':2,'</s>':3} \r\ndefault_index = special_symbols['<unk>']\r\nfor token, index in special_symbols.items():\r\n    if token in vocab:\r\n        vocab.reassign_token(token, index)\r\n    else:\r\n        vocab.insert_token(token, index)\r\nvocab.set_default_index(default_index)\r\n```\r\n\r\nExample 2: Reading vocab directly from file with all the special symbols and setting fallback index to unknown token\r\n```\r\nfrom torchtext.vocab import build_vocab_from_file\r\nunk_token = '<unk>'\r\nvocab = build_vocab_from_text_file(\"path/to/tokens.txt\", min_freq = 1)\r\nassert unk_token in vocab\r\nvocab.set_default_index(vocab[unk_token])\r\n```\r\n\r\nExample 3: Building Vocab using Iterators and explicitly adding special symbols and fallback index\r\n```\r\nfrom torchtext.vocab import build_vocab_from_iterator\r\nspecial_symbols = {'<unk>':0,'<pad>':1,'<s>':2,'</s>':3} \r\nvocab = build_vocab_from_iterator(iter_obj, min_freq = 1)\r\nfor token, index in special_symbols.items():\r\n    if token in vocab:\r\n        vocab.reassign_token(token, index)\r\n    else:\r\n        vocab.insert_token(token, index)\r\nvocab.set_default_index(vocab[unk_token])\r\n```\r\n\r\nExample 4: Creating vocab through user supplied ordered dictionary that also contains all the special symbols\r\n```\r\nfrom torchtext.vocab import vocab as vocab_factory\r\nunk_token = '<unk>'\r\nvocab = vocab_factory(ordered_dict, min_freq = 1)\r\nassert unk_token in vocab\r\nvocab.set_default_index(vocab[unk_token])\r\n```\r\n\r\nFurthermore, legacy [Vocab class constructor](https://github.com/pytorch/text/blob/f7a6fbd3a910c4066b9a748545df388ae5933a6a/torchtext/legacy/vocab.py#L28) provide additional arguments to build Vocab using [Counters](https://docs.python.org/3/library/collections.html#collections.Counter). Here it provide support to add special symbols directly through input arguments rather than calling any low-level API. \r\n\r\n\r\nWe would love to hear from our users and community if the factory functions above is a good trade-off between flexibility and abstraction or if users would like to handle special symbols and default index through API arguments instead of explicitly calling the low level APIs of Vocab class.\r\n\r\nwith @cpuhrsch \r\n\r\ncc: @hudeven, @snisarg, @dongreenberg \r\n\r\n\r\n",
    "url": "https://github.com/pytorch/text/issues/1305",
    "state": "open",
    "labels": [
      "enhancement",
      "question",
      "need discussions"
    ],
    "created_at": "2021-05-13T02:52:19Z",
    "updated_at": "2021-05-13T04:07:13Z",
    "user": "parmeet"
  },
  {
    "repo": "pytorch/functorch",
    "number": 23,
    "title": "Figure out how to transform over optimizers",
    "body": "One way to transform over training loops (e.g. to do model ensembling or the inner step of a MAML) is to use a function that represents the optimizer step instead of an actual PyTorch optimizer. Right now I think we have the following requirements\r\n- There should be a function version of each optimizer (e.g. `F.sgd`)\r\n- The function should have an option to not mutate (e.g. `F.sgd(..., inplace=False)`)\r\n- The function should be differentiable\r\n\r\nPyTorch already has some here (in Prototype stage): https://github.com/pytorch/pytorch/blob/master/torch/optim/_functional.py, so we should check if these fit the requirements, and, if not, decide if we should influence the design",
    "url": "https://github.com/pytorch/functorch/issues/23",
    "state": "open",
    "labels": [],
    "created_at": "2021-05-11T13:13:39Z",
    "updated_at": "2021-05-11T13:13:39Z",
    "user": "zou3519"
  },
  {
    "repo": "pytorch/vision",
    "number": 3811,
    "title": "Mask-rcnn training - all AP and Recall scores in \u201cIoU Metric: segm\u201d remain 0",
    "body": "With torchvision\u2019s pre-trained mask-rcnn model, trying to train on a custom dataset prepared in COCO format.\r\n\r\nUsing torch/vision/detection/engine\u2019s `train_one_epoch` and `evaluate` methods for training and evaluation, respectively.\r\n\r\nThe loss_mask metric is reducing as can be seen here:\r\n```\r\nEpoch: [5]  [ 0/20]  eta: 0:00:54  lr: 0.005000  loss: 0.5001 (0.5001)  loss_classifier: 0.2200 (0.2200)  loss_box_reg: 0.2616 (0.2616)  loss_mask: 0.0014 (0.0014)  loss_objectness: 0.0051 (0.0051)  loss_rpn_box_reg: 0.0120 (0.0120)  time: 2.7308  data: 1.2866  max mem: 9887\r\nEpoch: [5]  [10/20]  eta: 0:00:26  lr: 0.005000  loss: 0.4734 (0.4982)  loss_classifier: 0.2055 (0.2208)  loss_box_reg: 0.2515 (0.2595)  loss_mask: 0.0012 (0.0013)  loss_objectness: 0.0038 (0.0054)  loss_rpn_box_reg: 0.0094 (0.0113)  time: 2.6218  data: 1.1780  max mem: 9887\r\nEpoch: [5]  [19/20]  eta: 0:00:02  lr: 0.005000  loss: 0.5162 (0.5406)  loss_classifier: 0.2200 (0.2384)  loss_box_reg: 0.2616 (0.2820)  loss_mask: 0.0014 (0.0013)  loss_objectness: 0.0051 (0.0062)  loss_rpn_box_reg: 0.0120 (0.0127)  time: 2.6099  data: 1.1755  max mem: 9887\r\n```\r\nBut the `evaluate` output shows absolutely no improvement from zero for IoU segm metric:\r\n\r\nIoU metric: bbox\r\n```\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.653\r\n Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.843\r\n Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.723\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.788\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.325\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.701\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.738\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.739\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.832\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.456\r\nIoU metric: segm\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.000\r\n````\r\nThe segm metrics don\u2019t improve even after training 500 epochs.\r\n\r\nAnd, the masks that I get as output after training for 100 or 500 epochs, if I visualize, they are showing a couple of dots here and there.\r\n\r\nWith the same dataset and annotations json, I was able to train instance seg model on detectron2. the the segmentation IoU metrics have clearly improved by each epoch.\r\n\r\nPlease suggest, what needs to be done. Posting here as there was no response on discuss.pytorch forum for 5 days\n\ncc @vfdev-5",
    "url": "https://github.com/pytorch/vision/issues/3811",
    "state": "open",
    "labels": [
      "question",
      "topic: semantic segmentation"
    ],
    "created_at": "2021-05-11T12:09:41Z",
    "updated_at": "2023-03-02T19:34:03Z",
    "user": "hemasunder"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 449,
    "title": "error: \u2018tryTypeMetaToScalarType\u2019 is not a member of \u2018c10\u2019",
    "body": "## \u2753 CMake building error using this [repo](https://github.com/JosephChenHub/TRTorch)\r\n\r\n<!-- Your question -->\r\nHow to build the TRTorch or use the release packages of TRTorch in Ubuntu 18.04?\r\n## What you have already tried\r\nTried build TRTorch through CMakeLists.txt provided by [this](https://github.com/NVIDIA/TRTorch/issues/263).\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - OS (e.g., Linux):Ubuntu18.04\r\n - Build command you used (if compiling from source):cmake.. and make\r\n - Are you using local sources or building from archives:Yes\r\n - CUDA version:11.1\r\n - TensorRT version:7.2.3.4\r\n - Make error:\r\nA bunch of warnings and then the error:\r\n```\r\n/home/SENSETIME/dongchunyu/dongchunyu/depends/TensorRT-7.2.3.4/include/NvInfer.h:3250:22: note: declared here\r\n class TRT_DEPRECATED IRNNv2Layer : public ILayer\r\n                      ^~~~~~~~~~~\r\n/home/SENSETIME/dongchunyu/dongchunyu/depends/TensorRT-7.2.3.4/include/NvInfer.h:5662:85: warning: \u2018IPluginLayer\u2019 is deprecated [-Wdeprecated-declarations]\r\n  ITensor* const* inputs, int32_t nbInputs, IPluginExt& plugin) TRTNOEXCEPT = 0;\r\n                                                                              ^\r\n/home/SENSETIME/dongchunyu/dongchunyu/depends/TensorRT-7.2.3.4/include/NvInfer.h:3454:22: note: declared here\r\n class TRT_DEPRECATED IPluginLayer : public ILayer\r\n                      ^~~~~~~~~~~~\r\n/home/SENSETIME/dongchunyu/dongchunyu/codes/c++/tmp/TRTorch/core/util/trt_util.cpp: In function \u2018c10::optional<nvinfer1::DataType> trtorch::core::util::toTRTDataType(caffe2::TypeMeta)\u2019:\r\n/home/SENSETIME/dongchunyu/dongchunyu/codes/c++/tmp/TRTorch/core/util/trt_util.cpp:270:21: error: \u2018tryTypeMetaToScalarType\u2019 is not a member of \u2018c10\u2019\r\n   if (auto t = c10::tryTypeMetaToScalarType(dtype)) {\r\n                     ^~~~~~~~~~~~~~~~~~~~~~~\r\n/home/SENSETIME/dongchunyu/dongchunyu/codes/c++/tmp/TRTorch/core/util/trt_util.cpp:270:21: note: suggested alternative: \u2018optTypeMetaToScalarType\u2019\r\n   if (auto t = c10::tryTypeMetaToScalarType(dtype)) {\r\n                     ^~~~~~~~~~~~~~~~~~~~~~~\r\n                     optTypeMetaToScalarType\r\nCMakeFiles/util.dir/build.make:110: recipe for target 'CMakeFiles/util.dir/core/util/trt_util.cpp.o' failed\r\nmake[2]: *** [CMakeFiles/util.dir/core/util/trt_util.cpp.o] Error 1\r\nCMakeFiles/Makefile2:219: recipe for target 'CMakeFiles/util.dir/all' failed\r\nmake[1]: *** [CMakeFiles/util.dir/all] Error 2\r\nMakefile:83: recipe for target 'all' failed\r\nmake: *** [all] Error 2\r\n```\r\n\r\n## Additional context\r\nWishing for official cmake tool!!!\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/449",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-05-10T06:45:33Z",
    "updated_at": "2021-11-01T00:01:56Z",
    "user": "AllentDan"
  },
  {
    "repo": "pytorch/vision",
    "number": 3801,
    "title": "Unable to train the keypointrcnn_resnet50_fpn model",
    "body": "## \u2753 The Predictions after training the model are empty.\r\n\r\n### I'm trying to train the model for keypoints detection, & bounding boxes, using the script in the references section, while training the loss_keypoint is always 0.0000. Using those weights for prediction is giving no predictions at all.\r\n\r\nI'm running this on a Windows 2016 server (EC2 instance on AWS), with a single GPU (Instance Type: p2.xlarge)\r\n\r\nMy Dataset is in COCO format, but I'm using only 14 keypoints per person, so I had defined the model in the train.py file as below:\r\n```\r\nmodel = torchvision.models.detection.keypointrcnn_resnet50_fpn(\r\n        pretrained=False, progress=True, num_classes=1, num_keypoints=14, \r\n        pretrained_backbone=True, trainable_backbone_layers=None)\r\n```\r\n\r\n& I've made appropriate changes in coco_utils.py for Keypoint flip.\r\n\r\n**Training**\r\nCommand:\r\n```\r\npython train.py --dataset coco_kp2 --model keypointrcnn_resnet50_fpn --epochs 1 --lr-steps 36 43 \r\n--aspect-ratio-group-factor 3\r\n```\r\nOutput:\r\n```\r\nNot using distributed mode\r\nNamespace(aspect_ratio_group_factor=3, batch_size=2, data_augmentation='hflip', data_path='/datasets01/COCO/022719/', dataset='coco_kp2', device='cuda', dist_url='env://', distributed=False, epochs=1, lr=0.02, lr_gamma=0.1, lr_step_size=8, lr_steps=[36, 43], model='keypointrcnn_resnet50_fpn', momentum=0.9, output_dir='.', pretrained=False, print_freq=20, resume='', rpn_score_thresh=None, start_epoch=0, test_only=False, trainable_backbone_layers=None, weight_decay=0.0001, workers=4, world_size=1)\r\nLoading data\r\nloading annotations into memory...\r\nDone (t=0.02s)\r\ncreating index...\r\nindex created!\r\nloading annotations into memory...\r\nDone (t=0.02s)\r\ncreating index...\r\nindex created!\r\nCreating data loaders\r\nUsing [0, 0.5, 0.6299605249474366, 0.7937005259840997, 1.0, 1.2599210498948732, 1.5874010519681994, 2.0, inf] as bins for aspect ratio quantization\r\nCount of instances per bin: [180]\r\nCreating model\r\nStart training\r\nEpoch: [0]  [ 0/90]  eta: 0:11:55  lr: 0.000244  loss: 0.7178 (0.7178)  loss_classifier: 0.0000 (0.0000)  loss_box_reg: 0.0000 (0.0000)  loss_keypoint: 0.0000 (0.0000)  loss_objectness: 0.6962 (0.6962)  loss_rpn_box_reg: 0.0216 (0.0216)  time: 7.9505  data: 5.2040  max mem: 2618\r\nEpoch: [0]  [20/90]  eta: 0:02:04  lr: 0.004734  loss: 0.6764 (0.6253)  loss_classifier: 0.0000 (0.0000)  loss_box_reg: 0.0000 (0.0000)  loss_keypoint: 0.0000 (0.0000)  loss_objectness: 0.6526 (0.6053)  loss_rpn_box_reg: 0.0186 (0.0200)  time: 1.4630  data: 0.0062  max mem: 2951\r\nEpoch: [0]  [40/90]  eta: 0:01:22  lr: 0.009224  loss: 0.0664 (0.3587)  loss_classifier: 0.0000 (0.0000)  loss_box_reg: 0.0000 (0.0000)  loss_keypoint: 0.0000 (0.0000)  loss_objectness: 0.0488 (0.3400)  loss_rpn_box_reg: 0.0147 (0.0186)  time: 1.5132  data: 0.0061  max mem: 2951\r\nEpoch: [0]  [60/90]  eta: 0:00:47  lr: 0.013714  loss: 0.0196 (0.2480)  loss_classifier: 0.0000 (0.0000)  loss_box_reg: 0.0000 (0.0000)  loss_keypoint: 0.0000 (0.0000)  loss_objectness: 0.0072 (0.2316)  loss_rpn_box_reg: 0.0118 (0.0164)  time: 1.4801  data: 0.0065  max mem: 2951\r\nEpoch: [0]  [80/90]  eta: 0:00:15  lr: 0.018204  loss: 0.0192 (0.1919)  loss_classifier: 0.0000 (0.0000)  loss_box_reg: 0.0000 (0.0000)  loss_keypoint: 0.0000 (0.0000)  loss_objectness: 0.0067 (0.1761)  loss_rpn_box_reg: 0.0121 (0.0158)  time: 1.4868  data: 0.0062  max mem: 2951\r\nEpoch: [0]  [89/90]  eta: 0:00:01  lr: 0.020000  loss: 0.0182 (0.1745)  loss_classifier: 0.0000 (0.0000)  loss_box_reg: 0.0000 (0.0000)  loss_keypoint: 0.0000 (0.0000)  loss_objectness: 0.0067 (0.1591)  loss_rpn_box_reg: 0.0107 (0.0153)  time: 1.4933  data: 0.0053  max mem: 2951\r\nEpoch: [0] Total time: 0:02:20 (1.5584 s / it)\r\nTest:  [ 0/90]  eta: 0:08:32  model_time: 0.4447 (0.4447)  evaluator_time: 0.0010 (0.0010)  time: 5.6930  data: 5.2317  max mem: 2951\r\nTest:  [89/90]  eta: 0:00:00  model_time: 0.3594 (0.3613)  evaluator_time: 0.0010 (0.0011)  time: 0.3689  data: 0.0033  max mem: 2951\r\nTest: Total time: 0:00:38 (0.4315 s / it)\r\nAveraged stats: model_time: 0.3594 (0.3613)  evaluator_time: 0.0010 (0.0011)\r\nAccumulating evaluation results...\r\nDONE (t=0.02s).\r\nAccumulating evaluation results...\r\nDONE (t=0.00s).\r\nIoU metric: bbox\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | ar",
    "url": "https://github.com/pytorch/vision/issues/3801",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: object detection"
    ],
    "created_at": "2021-05-09T16:28:57Z",
    "updated_at": "2021-05-10T15:54:04Z",
    "user": "d1nz-g33k"
  },
  {
    "repo": "pytorch/serve",
    "number": 1055,
    "title": "How i do models chain processing and batch processing for analyzing text data?",
    "body": "Hello, I wanted to thank you for creating such a convenient and easily deployable model service.\r\nI have several questions / suggestions (maybe they have already been implemented).\r\n\r\nThe first thing I would like to know / get is the launch of a chain of models... Example: I have a basic model, let's say BERT, I would like to use it to get embeddings for further solving other tasks, such as classification, text summarization, Question/Answering etc. Those I would like to transfer data from the base model (BERT) to other models for solving particular problems (QA_model, classifier_model, summarizer_model). I would like to be able to dynamically change the output.\r\n```\r\n[\r\n  {\r\n    \"modelName\": \"BERT\",\r\n    \"modelVersion\": \"1.0\",\r\n  }\r\n  \r\n  {\r\n    \"modelName\": \"QA_model\",\r\n    \"modelVersion\": \"1.0\",\r\n  }\r\n  {\r\n    \"modelName\": \"classifier_model\",\r\n    \"modelVersion\": \"1.0\",\r\n  }\r\n  {\r\n    \"modelName\": \"summarizer_model\",\r\n    \"modelVersion\": \"1.0\",\r\n  }\r\n]\r\n```\r\n\r\nThe second question is how to perform batch processing of text data in order to get execution for several sentences at once? And what are the restrictions on the batch size?",
    "url": "https://github.com/pytorch/serve/issues/1055",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-05-08T10:42:46Z",
    "updated_at": "2021-05-17T09:19:23Z",
    "user": "yurkoff-mv"
  },
  {
    "repo": "pytorch/vision",
    "number": 3784,
    "title": "Could T.Lambda be nn.Module?",
    "body": "It would allow it to be placed in nn.ModuleList for passing to RandomApply (for scriptability)\r\n\r\nhttps://pytorch.org/vision/stable/transforms.html#torchvision.transforms.RandomApply\n\ncc @vfdev-5",
    "url": "https://github.com/pytorch/vision/issues/3784",
    "state": "open",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2021-05-06T12:22:19Z",
    "updated_at": "2021-05-07T14:13:30Z",
    "user": "vadimkantorov"
  },
  {
    "repo": "pytorch/vision",
    "number": 3783,
    "title": "[docs] Unclear if to_pil_image / to_tensor copy or zero-copy for CPU<->CPU",
    "body": "It currently uses a vague language \"convert\". It's not sure if \"conversion\" incurs a copy or not\n\ncc @vfdev-5",
    "url": "https://github.com/pytorch/vision/issues/3783",
    "state": "open",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2021-05-06T11:52:59Z",
    "updated_at": "2021-05-12T11:53:46Z",
    "user": "vadimkantorov"
  },
  {
    "repo": "pytorch/vision",
    "number": 3782,
    "title": "ToTensor confuse me with the way it takes input",
    "body": "So the `ToTensor` class of `to_tensor` function takes input in the dimension of (H, W) while PIL has it's images dimension be (W, H).\r\nWhy is this transpose ?\n\ncc @vfdev-5",
    "url": "https://github.com/pytorch/vision/issues/3782",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2021-05-06T10:17:52Z",
    "updated_at": "2021-05-07T06:49:38Z",
    "user": "MohamedAliRashad"
  },
  {
    "repo": "pytorch/vision",
    "number": 3772,
    "title": "Unable to get segmented mask output image",
    "body": ".",
    "url": "https://github.com/pytorch/vision/issues/3772",
    "state": "closed",
    "labels": [
      "question",
      "awaiting response",
      "topic: semantic segmentation"
    ],
    "created_at": "2021-05-05T08:31:26Z",
    "updated_at": "2021-06-01T06:16:06Z",
    "user": "shubhamkotal"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1506,
    "title": "Seq2seq Transformer Tutorial best model saving",
    "body": "In [this tutorial](https://pytorch.org/tutorials/beginner/transformer_tutorial.html#load-and-batch-data), it says \"Save the model if the validation loss is the best we\u2019ve seen so far.\", and then the following code follows (also [here](https://github.com/pytorch/tutorials/blob/master/beginner_source/transformer_tutorial.py#L324-L326)).\r\n\r\n```\r\nif val_loss < best_val_loss:\r\n        best_val_loss = val_loss\r\n        best_model = model\r\n```\r\nHowever, my understanding is that this kind of checkpointing won't work, as `best_model` will contain a pointer to the same set of parameters as `model` (which will be updated). I tried to verify this by checking that `next(model.parameters())` and `next(best_model.parameters())` are identical, and it seemed like that was the case (although admittedly I did not check that the last model was indeed not the best one).\r\n\n\ncc @pytorch/team-text-core @Nayef211",
    "url": "https://github.com/pytorch/tutorials/issues/1506",
    "state": "closed",
    "labels": [
      "question",
      "Text",
      "module: torchtext"
    ],
    "created_at": "2021-05-05T05:04:47Z",
    "updated_at": "2023-03-08T20:55:00Z",
    "user": "micahcarroll"
  },
  {
    "repo": "pytorch/xla",
    "number": 2927,
    "title": "How to install torch_xla with python version 3.9.2",
    "body": "## \u2753 Questions and Help\r\n\r\nI have to use 3.9.2 for other dependency. Given that my python version must be 3.9.2, how do I install torch_xla ? \r\n\r\nI tried these 2 method shown in tutorial \r\n\r\n1)\r\n\r\n`!pip install cloud-tpu-client==0.10 https://storage.googleapis.com/tpu-pytorch/wheels/torch_xla-1.8.1-cp37-cp37m-linux_x86_64.whl` \r\n\r\nThis ( and c38 c39 variant of it ) does not work. \r\n\r\n<img width=\"682\" alt=\"Screen Shot 2021-05-03 at 11 18 17 PM\" src=\"https://user-images.githubusercontent.com/14815380/116957477-ec3c9600-ac65-11eb-8e2c-ba5c7050af25.png\">\r\n\r\n2)\r\n```\r\nVERSION = \"20200516\"  #@param [\"1.5\" , \"20200516\", \"nightly\"]\r\n!curl https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py -o pytorch-xla-env-setup.py\r\n!python pytorch-xla-env-setup.py --version $VERSION\r\n```\r\n\r\nRunning these gives\r\n\r\n<img width=\"706\" alt=\"Screen Shot 2021-05-03 at 11 20 02 PM\" src=\"https://user-images.githubusercontent.com/14815380/116957546-18f0ad80-ac66-11eb-97c2-4d134f50f90e.png\">\r\n\r\n\r\n## Question\r\n\r\nHow do I use xla with python 3.9.2 ?\r\n\r\nDo I must have python 3.7.x  in order to use xla ???",
    "url": "https://github.com/pytorch/xla/issues/2927",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2021-05-04T03:21:02Z",
    "updated_at": "2021-06-22T17:43:47Z",
    "user": "sirgarfieldc"
  },
  {
    "repo": "pytorch/vision",
    "number": 3767,
    "title": "Failing to load the pre-trained weights on multi-gpus.",
    "body": "## \ud83d\udc1b Bug\r\n\r\nDownloading the pre-trained weights for following models, Alexnet, Resnet_152, Resnet -18, SqueezeNet, VGG11 and trying to load them on any gpu other than cuda:0, it throw error.\r\n\r\n\r\n## To Reproduce\r\n\r\nwget https://download.pytorch.org/models/alexnet-owt-4df8aa71.pth\r\n\r\n```\r\nimport torch\r\nfrom torchvision.models.alexnet import AlexNet\r\nclass ImageClassifier(AlexNet):\r\n    def __init__(self):\r\n        super(ImageClassifier, self).__init__()             \r\ndevice1='cuda:0'\r\ndevice2='cuda:2'\r\nmodel = ImageClassifier()\r\nstate_dict = torch.load(\"alexnet-owt-4df8aa71.pth\", map_location=device2)\r\nmodel.load_state_dict(state_dict)\r\nmodel = model.to(device2)\r\n```\r\n\r\n## Error \r\n_File \"test_device.py\", line 16, in\r\nstate_dict = torch.load(\"alexnet-owt-4df8aa71.pth\", map_location=device2)........_\r\n\r\n_RuntimeError: Attempted to set the storage of a tensor on device \"cuda:0\" to a storage on different device \"cuda:2\". This is no longer allowed; the devices must match_\r\n\r\n## Expected behavior\r\n\r\nBe able to load the state_dict on any cuda device using map_location.\r\n\r\n## Enviroment\r\n - PyTorch / torchvision Version (e.g., 1.0 / 0.4.0):1.7.1, 1.8.0,1.8.1\r\n - OS (e.g., Linux): ubuntu 18.04\r\n - How you installed PyTorch / torchvision (`conda`, `pip`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Python version: 3.7\r\n - CUDA/cuDNN version:10.2\r\n - GPU models and configuration: Nvidia Tesla k80\r\n - Any other relevant information:\r\n\r\n## Additional context\r\nThese models are being used in Torchserve examples are failing in multi-gpu setting to be loaded on different cuda device. As a work around in Torchserve stated dicts are loaded first  on cuda:0 then move the model to another device/ cuda+ids which creates this  [issue](https://github.com/pytorch/serve/issues/1037) where it results in duplicated processes on two gpus and adding to the memory footprint.\r\n",
    "url": "https://github.com/pytorch/vision/issues/3767",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-05-03T21:33:58Z",
    "updated_at": "2023-08-22T16:03:22Z",
    "user": "HamidShojanazeri"
  },
  {
    "repo": "pytorch/serve",
    "number": 1045,
    "title": "How to add a new handler guide",
    "body": "Goal is to support new use cases easily\r\n\r\nThe base handler is also quite general in its capabilities so want to showcase a bit more what can be done",
    "url": "https://github.com/pytorch/serve/issues/1045",
    "state": "closed",
    "labels": [
      "documentation",
      "enhancement"
    ],
    "created_at": "2021-04-28T20:43:10Z",
    "updated_at": "2021-05-05T19:17:39Z",
    "user": "msaroufim"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 57118,
    "title": "How to view VLOG information",
    "body": " How to use VLOG, which is same to  specify TF_CPP_MIN_VLOG_LEVEL variable in TensorFlow.\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/57118",
    "state": "open",
    "labels": [
      "module: logging",
      "triaged"
    ],
    "created_at": "2021-04-28T11:16:12Z",
    "updated_at": "2024-09-04T19:25:04Z",
    "user": "HangJie720"
  },
  {
    "repo": "pytorch/vision",
    "number": 3746,
    "title": "Details on pre-training of torchvision models",
    "body": "I realize there is a closed issue on this topic here: https://github.com/pytorch/vision/issues/666\r\n\r\nThe issue has been opened in 2018. I have not found any documentation on how the models of torchvision are pre-trained, therefore I am opening another issue. Is the above answer still valid? Are the models still trained according to https://github.com/pytorch/examples/tree/master/imagenet ?\r\nSpecifically, I would like to know the details on the image size and data transformation used.\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/vision/issues/3746",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2021-04-28T11:13:01Z",
    "updated_at": "2021-04-28T11:44:38Z",
    "user": "spurra"
  },
  {
    "repo": "pytorch/text",
    "number": 1295,
    "title": "How to train data with the similar number of tokens in a batch using distributed training?",
    "body": "My code needs two functions:\r\n1.  Bucket iterator;\r\n2.  In each batch, the number of tokens are similar. (This means the batch size of each batch is not same.)\r\n\r\nI think I could fulfill the function 2 with a custom sampler which inherits torch.utils.data.Sampler, but as seen in the tutorial, Bucket iterator inherits torch.utils.data.Dataset, and for distributed training,   the torch.utils.data.distributed.DistributeSampler should be used. The custom sampler and the DistributedSampler can\u2019t both be used in torch.utils.data.DataLoader (dataset, batch_size=1, shuffle=False, sampler=None, batch_sampler=None, num_workers=0, collate_fn=None, pin_memory=False).\r\n\r\nSo, how to sample data (sentences) in a batch with the similar number of tokens for distributed training?\r\n\r\nThanks a lot.\r\n",
    "url": "https://github.com/pytorch/text/issues/1295",
    "state": "open",
    "labels": [],
    "created_at": "2021-04-27T09:36:11Z",
    "updated_at": "2021-07-06T16:22:55Z",
    "user": "sandthou"
  },
  {
    "repo": "pytorch/vision",
    "number": 3729,
    "title": "Evaluation Method does not work for detection",
    "body": "## \ud83d\udc1b Bug\r\n\r\nAfter the training process, when running the evaluation function available here (https://github.com/pytorch/vision/blob/dc42f933f3343c76727dbfba6e4242f1bcb8e1a0/references/detection/engine.py), the process gets stuck without any error. I left the evaluation method running for two days but there are no error or any suggestion of what this problem could be when interrupting the process. \r\n\r\n## Expected behaviour\r\n\r\nThe result of this function is supposed to be the IoU metrics (the image is taken from the tutorial available on PyTorch)\r\n![Schermata 2021-04-26 alle 10 49 10](https://user-images.githubusercontent.com/30385910/116055497-0f22e500-a67d-11eb-9e2d-fde967773920.png)\r\n\r\n## Environment\r\n\r\n - PyTorch version: 1.7.0a0+7036e91\r\n - OS: Ubuntu 18.04\r\n - How you installed PyTorch / torchvision: pip\r\n - Build command you used (if compiling from source): //\r\n - Python version: 3.6\r\n - CUDA/cuDNN version: //\r\n - GPU models and configuration: Tesla T4\r\n",
    "url": "https://github.com/pytorch/vision/issues/3729",
    "state": "closed",
    "labels": [
      "question",
      "awaiting response",
      "module: reference scripts"
    ],
    "created_at": "2021-04-26T08:54:08Z",
    "updated_at": "2025-01-02T07:26:34Z",
    "user": "aliceinland"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 56898,
    "title": "How do I convert the quantified model to onnx or ncnn\uff1f",
    "body": "## \u2753 How do I convert the quantified model to onnx or ncnn\uff1f\r\n\r\n### how to convert int8 model in pytorch to onnx. \r\nI train a model with quantization aware train in pytorch,  however I need use quantizated model to onnx, I have tried, but normal code is not work. Any bady can help me, thanks a lot.\r\n@eklitzke @dreiss @huitseeker @jfsantos  bug for guidance",
    "url": "https://github.com/pytorch/pytorch/issues/56898",
    "state": "closed",
    "labels": [],
    "created_at": "2021-04-26T03:07:06Z",
    "updated_at": "2021-04-27T22:51:13Z",
    "user": "fucker007"
  },
  {
    "repo": "pytorch/serve",
    "number": 1041,
    "title": "How to debug slow serve models",
    "body": "## \ud83d\udcda Documentation\r\n\r\nMany issues are essentially people confused about the overhead that torch serve introduces so a good solution would be to have the below in a guide before opening a perf issue.\r\n1. Point to existing benchmarks so people can get a baseline estimate\r\n2. Running model without serve\r\n3. Commands to get serve overhead\r\n4. Expectations around how serve will scale horizontally and vertically\r\n\r\n",
    "url": "https://github.com/pytorch/serve/issues/1041",
    "state": "closed",
    "labels": [
      "documentation",
      "enhancement",
      "help wanted"
    ],
    "created_at": "2021-04-22T15:09:57Z",
    "updated_at": "2021-05-13T16:21:35Z",
    "user": "msaroufim"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 56634,
    "title": "[package] Module name reported in error message does not always match what is needed to extern/mock it",
    "body": "## \ud83d\udc1b Bug\r\nThe module name as printed in the packaging error messages is not always the name with which it can be successfully externed or mocked.\r\n\r\n## To Reproduce\r\n```\r\nimport torch\r\nimport io\r\n\r\nmodel = torch.hub.load('nicolalandro/ntsnet-cub200', 'ntsnet', pretrained=True, **{'topN': 6, 'device':'cpu', 'num_classes': 200})\r\nmodel.eval()\r\n\r\nwith torch.package.PackageExporter(io.BytesIO()) as exp:\r\n    exp.extern([\r\n        \"sys\",\r\n        \"io\",\r\n        \"PIL.**\",\r\n        \"_queue\",\r\n        \"urllib3.**\",\r\n    ])\r\n    exp.save_pickle(\"ntsnet\", \"model.pkl\", model)\r\n```\r\nThis code produces the following error:\r\n```\r\nValueError: cannot save source for module \"mklinit\" because its source file \"/home/meghanl/local/miniconda3/envs/tutorial/lib/python3.8/site-packages/mkl/_mklinit.cpython-38-x86_64-linux-gnu.so\" could not be found. See the dependency graph for more info:\r\n```\r\n\r\n## Expected Outcome\r\n`exp.extern(\"mklinit\")` externs this module.\r\n\r\n## Actual Outcome\r\n`exp.extern(\"mklinit\")` does not extern this module; the same error is produced. `exp.extern(\"mkl.**\")` does extern this module.\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/56634",
    "state": "open",
    "labels": [
      "triaged"
    ],
    "created_at": "2021-04-21T21:41:20Z",
    "updated_at": "2021-04-21T21:43:22Z",
    "user": "SplitInfinity"
  },
  {
    "repo": "huggingface/pytorch-image-models",
    "number": 572,
    "title": "What is EfficientNetV2s? What is it relationship with EfficientNetV2\uff1f",
    "body": "",
    "url": "https://github.com/huggingface/pytorch-image-models/issues/572",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2021-04-21T07:24:51Z",
    "updated_at": "2021-04-21T15:51:02Z",
    "user": "chenyang9799"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 56473,
    "title": "how to restore a model's weight from jit.traced model file?",
    "body": "Hi guys,\r\n   i have a traced pt model file, now i need to use it restore a net instance like below\r\n```py\r\ntraced_model = torch.jit.load('traced.pt')\r\nstate_dict = extract_state_dict(traced_model) #need to implement\r\nmodel = construct_model(args)\r\nmodel.load_state_dict(state_dict)\r\n```\r\nextract_state_dict is the function i want to know to implement,thanks\r\n\n\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/56473",
    "state": "closed",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2021-04-20T12:54:26Z",
    "updated_at": "2021-04-21T03:51:31Z",
    "user": "fortuneko"
  },
  {
    "repo": "pytorch/examples",
    "number": 901,
    "title": "Pytorch C++ Frontend: generating networks at runtime?",
    "body": "closing and moving to pytorch repo",
    "url": "https://github.com/pytorch/examples/issues/901",
    "state": "closed",
    "labels": [],
    "created_at": "2021-04-20T04:25:48Z",
    "updated_at": "2021-04-20T04:30:13Z",
    "comments": 0,
    "user": "r2dliu"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 875,
    "title": "Where is the saved model after the training?",
    "body": "model.fit(train_objectives=[(train_dataloader, train_loss)], output_path=dir, epochs=1, warmup_steps=100)\r\nI have specified the output_path where the model output, but I didn't see any documents after training.\r\nthank you.",
    "url": "https://github.com/huggingface/sentence-transformers/issues/875",
    "state": "open",
    "labels": [],
    "created_at": "2021-04-17T00:45:41Z",
    "updated_at": "2021-04-17T09:54:52Z",
    "user": "Bulando"
  },
  {
    "repo": "pytorch/vision",
    "number": 3678,
    "title": "Deformable convolution best practice? ",
    "body": "## \u2753 Questions and Help\r\nWould appreciate it if anyone has some insight on how to use deformable convolution correctly. \r\n\r\nDeformable convolution is tricky as even the official implementation is different from what's described in the paper. The paper claims to use 2N offset size instead of 2 x ks x ks. \r\n\r\nAnyway, we're using the 2 x ks x ks offset here, but I always got poor performance. Accuracy drops in CIFAR10 and YOLACT. Anything wrong with my usage? \r\n```\r\nfrom torchvision.ops import DeformConv2d\r\n\r\nclass DConv(nn.Module):\r\n    def __init__(self, inplanes, planes, kernel_size=3, stride=1, padding=1, bias=False):\r\n        super(DConv, self).__init__()\r\n        self.conv1 = nn.Conv2d(inplanes, 2 * kernel_size * kernel_size, kernel_size=kernel_size,\r\n                               stride=stride, padding=padding, bias=bias)\r\n        self.conv2 = DeformConv2d(inplanes, planes, kernel_size=kernel_size, stride=stride, padding=padding, bias=bias)\r\n\r\n    def forward(self, x):\r\n        out = self.conv1(x)\r\n        out = self.conv2(x, out)\r\n        return out\r\n```\r\n",
    "url": "https://github.com/pytorch/vision/issues/3678",
    "state": "open",
    "labels": [
      "question",
      "module: ops"
    ],
    "created_at": "2021-04-16T07:20:24Z",
    "updated_at": "2021-04-21T12:56:47Z",
    "user": "liyy201912"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 56149,
    "title": "how to RegisterPass for torch.jit.trace() ",
    "body": "## \u2753 Questions and Help\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\r\n\r\nis there are new way to create a custom transformation pass in torchscript with torch1.8.0 ?\r\n\r\njust like here: pytorch_compiler_tutorial/register.cpp at master \u00b7 bwasti/pytorch_compiler_tutorial \u00b7 GitHub 2\r\n\r\ntorch.jit.trace() doesnt call: RegisterPass pass anymore\r\n\n\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/56149",
    "state": "closed",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2021-04-15T15:25:42Z",
    "updated_at": "2021-06-04T16:57:02Z",
    "user": "Andrechang"
  },
  {
    "repo": "pytorch/vision",
    "number": 3673,
    "title": "The document of torchvision.ops.deform_conv2d is not clear",
    "body": "## \ud83d\udcda Documentation\r\nFrom the documentation, I cannot get the exact meaning of 18(ie, 2*3*3) channels of the offset in a deformable convolution? \r\n\r\nI want to visualize the offset of the deformable convolution with kernel size 3*3.\r\nSo It\u2019s essential for me to know what\u2019s the exact meaning of these channels.\r\n\r\nI write down something possible here:\r\n```python\r\nupper-left: ul\r\nupper-right: ur\r\nbottom-left: bl\r\nbottom-right: br\r\nup: u\r\nbottom: b\r\nright: r\r\nleft: l\r\ncenter: c\r\n\r\npossible offset layout (maybe not correct):\r\ndelta_ul_x, delta_ul_y,   delta_u_x, delta_u_y,     delta_ur_x, delta_ur_y;\r\ndelta_l_x, delta_l_y,       delta_c_x, delta_c_y,      delta_r_x, delta_r_y;\r\ndelta_bl_x, delta_bl_y,   delta_b_x, delta_b_y,     delta_br_x, delta_br_y;\r\n```\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/3673",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2021-04-15T06:43:49Z",
    "updated_at": "2022-05-18T04:57:34Z",
    "user": "Zhaoyi-Yan"
  },
  {
    "repo": "pytorch/xla",
    "number": 2883,
    "title": "How to dump HLO IR",
    "body": "## \u2753 Questions and Help\r\n\r\nHi, \r\nI want to extract the HLO PROTO/TEXT of a function/module that I wrote in  PyTorch.\r\nSomething similar to what jax is doing [here](https://jax.readthedocs.io/en/latest/jax.html#jax.xla_computation):\r\n\r\n```\r\ndef f(x): \r\n     return jax.numpy.sin(jax.numpy.cos(x))\r\nc = jax.xla_computation(f)(3.)\r\nhlo_proto = c. as_serialized_hlo_module_proto() \r\nhlo_txt = c. as_hlo_text()\r\n```\r\n\r\nIs there something similar that I can do it torch_xla?\r\n",
    "url": "https://github.com/pytorch/xla/issues/2883",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2021-04-15T02:42:09Z",
    "updated_at": "2021-06-22T17:43:37Z",
    "user": "KatiaSN602"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 55914,
    "title": "how to convert libtorch trained model to torch script model",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/55914",
    "state": "closed",
    "labels": [],
    "created_at": "2021-04-13T15:57:00Z",
    "updated_at": "2021-04-13T16:28:26Z",
    "user": "WuLoing"
  },
  {
    "repo": "pytorch/vision",
    "number": 3658,
    "title": "Failed to compile torchvision for ROCm as documented in pytorch.org",
    "body": "## \ud83d\udc1b Bug\r\n\r\nFailed to compile torchvision for ROCm as documented in pytorch.org/get-started\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\nas in: https://pytorch.org/get-started/locally/\r\n1. python -m venv ptamd; source ptamd/bin/activate\r\n1. pip install torch -f https://download.pytorch.org/whl/rocm4.0.1/torch_stable.html\r\n1. pip install ninja && pip install 'git+https://github.com/pytorch/vision.git@v0.9.1'\r\n\r\nsame with v0.9.0\r\n\r\n## Error\r\n\r\nptamd/lib/python3.8/site-packages/torch/include/c10/util/complex.h:9:10: fatal error: 'thrust/complex.h' file not found\r\n#include <thrust/complex.h>\r\n       ^~~~~~~~~~~~~~~~~~\r\n1 error generated when compiling for gfx803.\r\n\r\n## Environment\r\n\r\n```\r\nPyTorch version: 1.8.1+rocm4.0.1\r\nIs debug build: False\r\nROCM used to build PyTorch: 4.0.20496-4f163c68\r\n\r\nOS: CentOS Linux 8 (x86_64)\r\nGCC version: (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)   # same on GCC 10\r\n\r\nPython version: 3.8 (64-bit runtime)\r\nIs CUDA available: True\r\nGPU models and configuration: Vega 20\r\nHIP runtime version: 3.21.2\r\nMIOpen runtime version: 2.9.0\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.20.2\r\n[pip3] torch==1.8.1+rocm4.0.1\r\n```\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/3658",
    "state": "open",
    "labels": [
      "question",
      "topic: build",
      "topic: binaries"
    ],
    "created_at": "2021-04-11T12:32:10Z",
    "updated_at": "2021-07-03T13:15:58Z",
    "user": "henrique"
  },
  {
    "repo": "huggingface/datasets",
    "number": 2196,
    "title": "`load_dataset` caches two arrow files?",
    "body": "Hi,\r\n\r\nI am using datasets to load large json file of 587G.\r\nI checked the cached folder and found that there are two arrow files created:\r\n* `cache-ed205e500a7dc44c.arrow` - 355G\r\n*  `json-train.arrow` - 582G\r\n\r\nWhy is the first file created?\r\nIf I delete it, would I still be able to `load_from_disk`?",
    "url": "https://github.com/huggingface/datasets/issues/2196",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-04-09T03:49:19Z",
    "updated_at": "2021-04-12T05:25:29Z",
    "user": "hwijeen"
  },
  {
    "repo": "huggingface/datasets",
    "number": 2193,
    "title": "Filtering/mapping on one column is very slow",
    "body": "I'm currently using the `wikipedia` dataset\u2014 I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.\r\n\r\nI want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like that\u2014 I'm not very familiar with the pyarrow API.\r\n\r\nI know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.\r\n\r\nPS: This is definitely not a \"dataset request.\" I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.",
    "url": "https://github.com/huggingface/datasets/issues/2193",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-04-08T18:16:14Z",
    "updated_at": "2021-04-26T16:13:59Z",
    "user": "norabelrose"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 429,
    "title": "\u2753 [Question] Does TRTorch support autograd in inference?",
    "body": "## \u2753 Question\r\n\r\nSome models can contain autograd as part of their inference pass; a simple example, which does compile to TorchScript, would be:\r\n```python\r\nimport torch\r\nclass M(torch.nn.Module):\r\n    def forward(self, x):\r\n        x.requires_grad_(True)\r\n        y = x**2\r\n        return torch.autograd.grad([y.sum()], [x])[0]\r\n\r\nm = M()\r\nm(3*torch.ones(3))  # =>  tensor([6., 6., 6.])\r\nms = torch.jit.script(m)\r\nms(3*torch.ones(3))  # => tensor([6., 6., 6.])\r\n```\r\n\r\nI know `autograd.grad` isn't in the list of supported operations, but I'm curious whether something like this would be possible in TRTorch, or if it is fundamentally incompatible with the TensorRT design.\r\n\r\nThanks!\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/429",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-04-08T05:12:50Z",
    "updated_at": "2021-04-12T14:03:51Z",
    "user": "Linux-cpp-lisp"
  },
  {
    "repo": "huggingface/datasets",
    "number": 2187,
    "title": "Question (potential issue?) related to datasets caching",
    "body": "I thought I had disabled datasets caching in my code, as follows:\r\n```\r\nfrom datasets import set_caching_enabled\r\n...\r\ndef main():\r\n\r\n    # disable caching in datasets\r\n    set_caching_enabled(False)\r\n```\r\nHowever, in my log files I see messages like the following:\r\n\r\n```\r\n04/07/2021 18:34:42 - WARNING - datasets.builder -   Using custom data configuration default-888a87931cbc5877\r\n04/07/2021 18:34:42 - WARNING - datasets.builder -   Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93\r\n```\r\nCan you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!",
    "url": "https://github.com/huggingface/datasets/issues/2187",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2021-04-08T00:16:28Z",
    "updated_at": "2023-01-03T18:30:38Z",
    "user": "ioana-blue"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 55452,
    "title": "How to access model embedded functions?",
    "body": "## \u2753 Questions and Help\r\n\r\nI am working on C# .NET with Visual Studio 2019, over Windows Server 2019 Standard. \r\nI aim to export a Python model to run inference on C# with onnxruntime.\r\nI am using [Resemble-ai voice encoder](https://github.com/resemble-ai/Resemblyzer/blob/master/resemblyzer/voice_encoder.py) as ONNX, using:\r\n\r\nimport torch\r\nimport torch.onnx\r\nx = torch.randn(1,3,40,requires_grad=True)\r\ntorch_out = encoder(x)\r\n\r\ntorch.onnx.export(encoder,\r\n                  x,\r\n                  \"resemblyzer.onnx\",\r\n                  opset_version=13,\r\n                  input_names=['input'],\r\n                  output_names=['output'])\r\n\r\nThe export takes place without warnings or errors. The graph and input/outputs of the onnx model seem all right.\r\n\r\nBut I can't figure out how to use the model's embedded functions \"embed_utterance\" and \"embed_speaker\". Is that even possible? I mean, do the ONNX model include those functions or just the parameters of the trained model?\r\nIf the functions are inside de ONNX model, a snippet on how to access them would be great.\r\n\r\n\n\ncc @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof @SplitInfinity",
    "url": "https://github.com/pytorch/pytorch/issues/55452",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2021-04-07T10:22:44Z",
    "updated_at": "2021-04-21T08:56:02Z",
    "user": "ADD-eNavarro"
  },
  {
    "repo": "huggingface/transformers",
    "number": 11057,
    "title": "Difference in tokenizer output depending on where `add_prefix_space` is set. ",
    "body": "## Environment info\r\n<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.\r\n     Don't forget to fill out the missing fields in that output! -->\r\n\r\n- `transformers` version: 4.4.2\r\n- Platform: Linux-4.19.112+-x86_64-with-Ubuntu-18.04-bionic\r\n- Python version: 3.7.10\r\n- PyTorch version (GPU?): 1.8.1+cu101 (False)\r\n- Tensorflow version (GPU?): 2.4.1 (False)\r\n- Using GPU in script?: no\r\n- Using distributed or parallel set-up in script?: no\r\n\r\n\r\n### Who can help\r\n\r\n@LysandreJik\r\n\r\n## Information\r\n\r\nI am using `roberta-base` tokenizer. The tokenization output changes depending on whether `add_prefix_space` is passed into the `from_pretrained` factory as keyword argument or set using property after constructing the .\r\n\r\n## To reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n``` python\r\nfrom transformers import RobertaTokenizerFast\r\ntokenizer_1 = RobertaTokenizerFast.from_pretrained('roberta-base', add_prefix_space=True)\r\ntokenizer_2 = RobertaTokenizerFast.from_pretrained('roberta-base')\r\ntokenizer_2.add_prefix_space = True\r\n\r\npre_tokenized_inputs = [\"Is\", \"this\", \"tokenization\", \"correct\"]\r\ntokenizer_1(pre_tokenized_inputs, is_split_into_words=True) \r\n# {'input_ids': [0, 1534, 42, 19233, 1938, 4577, 2], 'attention_mask': [1, 1, 1, 1, 1, 1, 1]}\r\ntokenizer_2(pre_tokenized_inputs, is_split_into_words=True)\r\n# {'input_ids': [0, 6209, 9226, 46657, 1938, 36064, 2], 'attention_mask': [1, 1, 1, 1, 1, 1, 1]}\r\n```\r\n\r\n## Expected behavior\r\n\r\nThe addition of prefix space is not working for `tokenizer_2`. Either setting the property should add prefix space to each tokens before splitting into sub-words, or we shouldn't allow it to be set to `True` (raise a exception) after object creation. ",
    "url": "https://github.com/huggingface/transformers/issues/11057",
    "state": "closed",
    "labels": [],
    "created_at": "2021-04-05T10:30:25Z",
    "updated_at": "2021-06-07T15:18:36Z",
    "user": "sai-prasanna"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 55223,
    "title": "How to use PyTorch with ROCm (radeon gpu)? How to transfer data to gpu? ",
    "body": "Hey,\r\nSo far I didnt see any documentation or similar, which gives a hint how to use PyTorch with other GPUs than NVIDIA (when the new ROCm package is installed). How can I choose my radeon GPU as device and so use it for training? Very glad for any advices.\r\n\r\nBest\n\ncc @jeffdaily @sunway513 @jithunnair-amd @ROCmSupport",
    "url": "https://github.com/pytorch/pytorch/issues/55223",
    "state": "closed",
    "labels": [
      "module: rocm",
      "triaged"
    ],
    "created_at": "2021-04-02T08:07:42Z",
    "updated_at": "2023-08-22T22:02:51Z",
    "user": "oconnor127"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 420,
    "title": "\u2753 [Question] How can I pull TRTorch docker image?",
    "body": "## \u2753 Question\r\nI use the command to pull TRTorch docker image\r\n```\r\nsudo docker pull docker.pkg.github.com/nvidia/trtorch/docgen:0.3.0\r\n```\r\nGet respose  unauthorized: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.\r\n\r\nI can't find anyway to accsee the token.",
    "url": "https://github.com/pytorch/TensorRT/issues/420",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-04-01T12:18:50Z",
    "updated_at": "2021-04-02T15:57:07Z",
    "user": "Tshzzz"
  },
  {
    "repo": "pytorch/text",
    "number": 1265,
    "title": "How to split `_RawTextIterableDataset`",
    "body": "## \u2753 Questions and Help\r\nI am trying to move from using `legacy` and use new provided features, i was doing this:\r\n```\r\nfrom torchtext import legacy\r\nTEXT = legacy.data.Field(lower=True, batch_first=True)\r\nLABEL = legacy.data.LabelField(dtype=torch.float)\r\ntrain_data, test_data = legacy.datasets.IMDB.splits(TEXT, LABEL, root='/tmp/imdb/')\r\ntrain_data, valid_data = train_data.split(split_ratio=0.8, random_state=random.seed(SEED))\r\n```\r\nBut now i want to split train_data, how can i do that?\r\n```\r\nfrom torchtext.datasets import IMDB\r\ntrain_iter, test_iter = IMDB(split=('train', 'test'))\r\n# I need to split train_iter into train_iter and valid_iter\r\n```\r\nAnd i think providing more features more than just this [one](https://github.com/pytorch/text/blob/master/examples/legacy_tutorial/migration_tutorial.ipynb) would help more, Thanks!\r\n<!-- Please send questions or ask for help here. -->\r\n",
    "url": "https://github.com/pytorch/text/issues/1265",
    "state": "open",
    "labels": [
      "feature request"
    ],
    "created_at": "2021-03-30T15:34:40Z",
    "updated_at": "2023-07-30T03:13:25Z",
    "user": "KickItLikeShika"
  },
  {
    "repo": "huggingface/transformers",
    "number": 10960,
    "title": "What is the score of trainer.predict()?",
    "body": "I want to know the meaning of output of trainer.predict().\r\n\r\nexample:\r\n`PredictionOutput(predictions=array([[-2.2704859,  2.442343 ]], dtype=float32), label_ids=array([1]), metrics={'eval_loss': 0.008939245715737343, 'eval_runtime': 0.0215, 'eval_samples_per_second': 46.56})`\r\n\r\nWhat is this score? -> predictions=array([[-2.2704859,  2.442343 ]]\r\n\r\nI use it for Sequence Classification.\r\n",
    "url": "https://github.com/huggingface/transformers/issues/10960",
    "state": "closed",
    "labels": [],
    "created_at": "2021-03-30T07:53:13Z",
    "updated_at": "2021-03-30T23:41:38Z",
    "user": "Yuukp"
  },
  {
    "repo": "pytorch/text",
    "number": 1264,
    "title": "How to use fasttext emebddings in the torchtext Nightly Vocab",
    "body": "I have a custom trained facebook fasttext embedding which i want to use in my RNN. \r\n\r\ni use the nightly version of torchtext so the Vocab is kinda new. \r\nHow do i use fastext embedding there. a simple clear example would be great. \r\n",
    "url": "https://github.com/pytorch/text/issues/1264",
    "state": "open",
    "labels": [],
    "created_at": "2021-03-27T12:48:11Z",
    "updated_at": "2021-03-29T01:44:16Z",
    "user": "StephennFernandes"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 54790,
    "title": "tools/git-clang-format: The downloaded binary is not what was expected!",
    "body": "`tools/git-clang-format` seems to do a test on hash of the clang-format binary, but if it mismatches it just says \"The downloaded binary is not what was expected!\" and no instructions how to remediate. I rm -rf'ed .clang-format-bin that might help",
    "url": "https://github.com/pytorch/pytorch/issues/54790",
    "state": "closed",
    "labels": [
      "module: lint",
      "triaged"
    ],
    "created_at": "2021-03-26T18:58:06Z",
    "updated_at": "2021-04-07T00:19:01Z",
    "user": "ezyang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 54758,
    "title": "How to release unnecessary tensor which occupys memory when executing inference at test phrase?",
    "body": "## \u2753 Questions and Help\r\nI have a memory-cost operation, I put this operation into a function like this:\r\n```\r\nclass xxx(nn.Module):\r\n    def forward(xxx):\r\n        xxx = self.cost_memory_function(xxx)\r\n        ...  # OOM error occurs here rather than at the above function.\r\n        return xxx\r\n    def cost_memory_function(xxx):\r\n        ...\r\n```\r\nBut If the tensors generated from the function \"cost_memory_function\" release, the next part should successfully run. So I guess the tensors at function \"cost_memory_function\"  still occupy memory even though the function has exited. \r\nSo I want to know how to release some tensors which is unnecessary. I have set \"torch.set_grad_enable\" as False.\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/54758",
    "state": "closed",
    "labels": [],
    "created_at": "2021-03-26T06:14:24Z",
    "updated_at": "2021-03-26T16:08:40Z",
    "user": "shoutOutYangJie"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 411,
    "title": "how to compile on windows\uff1f",
    "body": "",
    "url": "https://github.com/pytorch/TensorRT/issues/411",
    "state": "closed",
    "labels": [
      "help wanted",
      "No Activity"
    ],
    "created_at": "2021-03-25T22:51:05Z",
    "updated_at": "2021-07-28T00:01:06Z",
    "user": "statham123"
  },
  {
    "repo": "huggingface/datasets",
    "number": 2108,
    "title": "Is there a way to use a GPU only when training an Index  in the process of add_faisis_index?",
    "body": "Motivation - Some FAISS indexes like IVF consist of the training step that clusters the dataset into a given number of indexes. It would be nice if we can use a GPU to do the training step and covert the index back to CPU as mention in [this faiss example](https://gist.github.com/mdouze/46d6bbbaabca0b9778fca37ed2bcccf6).",
    "url": "https://github.com/huggingface/datasets/issues/2108",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2021-03-24T21:32:16Z",
    "updated_at": "2021-03-25T06:31:43Z",
    "user": "shamanez"
  },
  {
    "repo": "pytorch/vision",
    "number": 3602,
    "title": "Imagenet dataloader error: RuntimeError: The archive ILSVRC2012_devkit_t12.tar.gz is not present in the root directory or is corrupted.",
    "body": "## \ud83d\udc1b Bug\r\n\r\nI am using pytorch 1.8.0 and torchvision 0.9.\r\nI am trying to use the pretrained models from pytorch and evaluate them on imagenet val data. That should be fairly straightforward, but I am getting stuck on the dataloader.\r\nI downloaded the imagenet and the folder structure that I have is like this:\r\n```\r\n/media/SSD2/ILSVRC/\r\n                |----Annotation\r\n                |----ImageSets\r\n                |----Data\r\n                      |----CLS-LOC\r\n                               |----test\r\n                               |----train\r\n                               |----val\r\n                                      |----ILSVRC2012_val_00000009.JPEG\r\n                                      |----ILSVRC2012_val_00000010.JPEG\r\n                                      |----...\r\n```\r\nI tried `datasets.ImageNet`, based on [pytorch](https://pytorch.org/vision/stable/datasets.html#imagenet)  where it says to use the following\r\n\r\n```\r\nimagenet_data = torchvision.datasets.ImageNet('path/to/imagenet_root/')\r\ndata_loader = torch.utils.data.DataLoader(imagenet_data,\r\n                                          batch_size=4,\r\n                                          shuffle=True,\r\n                                          num_workers=args.nThreads)\r\n```\r\nI changed the path_to_imagenet_to `/media/SSD2/ILSVRC/` like this\r\n\r\n `torchvision.datasets.ImageNet('/media/SSD2/ILSVRC/',split='val',download=False)` \r\nbut I get this error:\r\n```\r\nRuntimeError: The archive ILSVRC2012_devkit_t12.tar.gz is not present in the root directory or is corrupted. You need to download it externally and place it in /media/SSD2/ILSVRC/.\r\n```\r\nIs it a bug or I am doing something wrong?\r\n\n\ncc @pmeier",
    "url": "https://github.com/pytorch/vision/issues/3602",
    "state": "closed",
    "labels": [
      "question",
      "module: datasets"
    ],
    "created_at": "2021-03-24T19:15:28Z",
    "updated_at": "2021-03-25T17:01:31Z",
    "user": "seyeeet"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 54583,
    "title": "How to specific a op qconfig in \"prepare_jit\" qconfig_dict",
    "body": "## \u2753 Questions and Help\r\npytorch1.7/torchvision0.8.0\r\n\r\nI want to use \"prepare_jit\" and \"convert_jit\" to quantize Resnet18. But I can't specific 'layer1.0.conv1' to different qconfig.\r\nmy code:\r\nmodel = models.__dict__['resnet18] (pretrained=True)\r\nmodel = torch.jit.script(model.eval())\r\nqconfig1 = torch.quantization.QConfig(\r\n                activation=torch.quantization.HistogramObserver.with_args(\r\n                    reduce_range=False),\r\n                weight=torch.quantization.default_per_channel_weight_observer)\r\ntorch.quantization.prepare_jit(model, {'layer1.0.conv1':qconfig1}, True)\r\nmodel(torch.randn(1, 3, 224, 224))\r\ntorch.quantization.convert_jit(model, True, False)\r\n\r\nBut it will fail as below message:\r\nFile \"/home/xxx/python3.7/site-packages/torch/quantization/quantize_jit.py\", line 58, in _prepare_jit\r\n    quant_type)\r\nRuntimeError: __torch__.torch.nn.modules.conv.___torch_mangle_67.Conv2d (of Python compilation unit at: 0x56088f811c00) is not compatible with the type __torch__.torch.nn.modules.conv.___torch_mangle_66.Conv2d (of Python compilation unit at: 0x56088f811c00) for the field 'conv1'\r\n\r\nIt seems the key 'layer1.0.conv1' is not correct.\r\nHow can I do?\r\n\r\n\r\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/54583",
    "state": "closed",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2021-03-24T09:57:19Z",
    "updated_at": "2021-03-25T19:22:22Z",
    "user": "PenghuiCheng"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1439,
    "title": "Question about pytorch mobile",
    "body": "Hello, I'm using Pytorch Mobile to deploy a model to phone via Android Studio.\r\n\r\nI follow the official direction turn the model in to '.pt' , and load it in android studio, but it seems that it doesn't give the right prediction after turn it into '.pt', it always predict to the same label no matter any label of image I feed in.\r\n\r\nThe second question is that ,how can I avoid normalization in function TensorImageUtils.bitmapToFloat32Tensor , just turn it in to Tensor.",
    "url": "https://github.com/pytorch/tutorials/issues/1439",
    "state": "closed",
    "labels": [
      "question",
      "Mobile"
    ],
    "created_at": "2021-03-24T07:14:40Z",
    "updated_at": "2023-03-10T17:22:49Z",
    "user": "stillbetter"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1432,
    "title": "Reinforcement Tutorial (DQN)",
    "body": "Hey, \r\nI try to reproduce [PyTorch Reinforcement Tutorial (DGN)](https://pytorch.org/tutorials/intermediate/reinforcement_q_learning.html#training) in \r\n\r\nIn each time step, the state of the environment need to be evaluated in the function ```def get_screen()```\r\n\r\nThe line \r\n```\r\nscreen = env.render(mode='rgb_array').transpose((2, 0, 1))\r\n```\r\nthrows an error both in Google Colabs and on my local machine. The error is related to the gym environment \r\n```\r\nenv = gym.make('CartPole-v0').unwrapped\r\n```\r\nIs there any idea, how to solve this problem and make this tutorial reproducible again?\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/1432",
    "state": "closed",
    "labels": [
      "Reinforcement Learning"
    ],
    "created_at": "2021-03-21T23:36:44Z",
    "updated_at": "2022-09-06T17:44:22Z",
    "comments": 2,
    "user": "sambaPython24"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 54390,
    "title": " UserWarning: The epoch parameter in `scheduler.step()` was not necessary and is being deprecated where possible. Please use `scheduler.step()` to step the scheduler. During the deprecation, if epoch is different from None, the closed form is used instead of the new chainable form, where available. Please open an issue if you are unable to replicate your use case: https://github.com/pytorch/pytorch/issues/new/choose.   warnings.warn(EPOCH_DEPRECATION_WARNING, UserWarning)",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/54390",
    "state": "closed",
    "labels": [],
    "created_at": "2021-03-21T14:17:10Z",
    "updated_at": "2021-03-22T15:26:58Z",
    "user": "ZengcanXUE"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 408,
    "title": "\ud83d\udc1b [Bug] Tests are not being linked properly, fail with 'symbol lookup error'",
    "body": "##  Bug Description\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1.  bazel test //tests --compilation_mode=dbg --test_output=errors --jobs=4 --runs_per_test=5\r\n\r\nYou will see all the tests fail. I am using stock 1.7.1 PyTorch.\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\nboris@snikolaev-DGXStation:~/git/TRTorch$ /home/boris/.cache/bazel/_bazel_boris/c6ee020343103959b26b654eb14e89ac/execroot/TRTorch/bazel-out/k8-dbg/bin/tests/core/conversion/converters/test_linear.runfiles/TRTorch/tests/core/conversion/converters/test_linear\r\n/home/boris/.cache/bazel/_bazel_boris/c6ee020343103959b26b654eb14e89ac/execroot/TRTorch/bazel-out/k8-dbg/bin/tests/core/conversion/converters/test_linear.runfiles/TRTorch/tests/core/conversion/converters/test_linear: symbol lookup error: /home/boris/.cache/bazel/_bazel_boris/c6ee020343103959b26b654eb14e89ac/execroot/TRTorch/bazel-out/k8-dbg/bin/tests/core/conversion/converters/../../../../_solib_k8/libcore_Sutil_Slibtrt_Uutil.so: undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE\r\nboris@snikolaev-DGXStation:~/git/TRTorch$ nm /usr/local/lib/python3.6/dist-packages/torch/lib/libc10.so | grep _ZN3c105ErrorC1ENS_14SourceLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE\r\nboris@snikolaev-DGXStation:~/git/TRTorch$ nm /usr/local/lib/python3.6/dist-packages/torch/lib/libc10.so | grep SourceLocation\r\n000000000004f130 T _ZN3c1014WarningHandler7processERKNS_14SourceLocationERKSsb\r\n0000000000051870 T _ZN3c105ErrorC1ENS_14SourceLocationESs\r\n0000000000051870 T _ZN3c105ErrorC2ENS_14SourceLocationESs\r\n000000000004f210 T _ZN3c107Warning4warnENS_14SourceLocationERKSsb\r\n00000000000527c0 t _ZN3c10lsERSoRKNS_14SourceLocationE\r\n\r\n## Expected behavior\r\nTests run (or at least start up) successfully.\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.7.1\r\n - CPU Architecture: \r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source):  bazel test //tests --compilation_mode=dbg --test_output=errors --jobs=4 --runs_per_test=5\r\n - Are you using local sources or building from archives: local\r\n - Python version: 3.6\r\n - CUDA version: 11\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/408",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-03-20T04:06:57Z",
    "updated_at": "2021-04-07T01:42:26Z",
    "user": "borisfom"
  },
  {
    "repo": "pytorch/examples",
    "number": 895,
    "title": "Video classification example",
    "body": "Hi,\r\n\r\nAs we all know that video representation learning is a hot topic in computer vision community (thanks to recent advances in self-supervised learning), is it time to add a toy example for video classification? This code would be as simple as image classification examples. For example, we can add an example of video classification using I3D on UCF-101/HMDB-51? \r\n\r\n",
    "url": "https://github.com/pytorch/examples/issues/895",
    "state": "open",
    "labels": [
      "good first issue"
    ],
    "created_at": "2021-03-18T19:08:06Z",
    "updated_at": "2022-03-09T20:44:51Z",
    "comments": 1,
    "user": "avijit9"
  },
  {
    "repo": "pytorch/xla",
    "number": 2831,
    "title": "RuntimeError: Cannot access data pointer of Tensor that doesn't have storage, how to resolve it?",
    "body": "## Issue description\r\nCurrently I am trying to solve an object detection problem using FastRCNN model with the help of Pytorch XLA module \r\nBut while training I am getting a  **RuntimeError: Cannot access data pointer of Tensor that doesn't have storage**\r\nIt was working fine when I trained the model in GPU kernel, but started giving error when I switched to TPU\r\n\r\n## Code example\r\nHere's the link to my notebook --> [Object Detection Kernel](https://www.kaggle.com/mesparky/vunbigdata-chest-xray-object-detection?scriptVersionId=57113528)\r\n![image](https://user-images.githubusercontent.com/42636586/111666653-eca9da80-8839-11eb-9d86-65d47bce4309.png)\r\n\r\n## System Info\r\nI am using Kaggle TPU kernel for training my model.\r\n\r\n**PLEASE HELP ME RESOLVING THIS ISSUE**",
    "url": "https://github.com/pytorch/xla/issues/2831",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2021-03-18T17:03:32Z",
    "updated_at": "2021-06-26T02:22:49Z",
    "user": "IamSparky"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1421,
    "title": "Chatbot tutorial - RuntimeError: 'lengths' argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor",
    "body": "https://github.com/pytorch/tutorials/blob/master/beginner_source/chatbot_tutorial.py\r\nTried running this chatbot tutorial. Training goes well but when actually using the model by uncommenting the final line of code (as specified in the comments) it returns the following error:\r\n\r\n`Iteration: 4000; Percent complete: 100.0%; Average loss: 2.4559\r\n> hello?\r\nTraceback (most recent call last):\r\n  File \"C:/Users/user/PycharmProjects/pytorch-tests/main.py\", line 1377, in <module>\r\n    evaluateInput(encoder, decoder, searcher, voc)\r\n  File \"C:/Users/user/PycharmProjects/pytorch-tests/main.py\", line 1242, in evaluateInput\r\n    output_words = evaluate(encoder, decoder, searcher, voc, input_sentence)\r\n  File \"C:/Users/user/PycharmProjects/pytorch-tests/main.py\", line 1225, in evaluate\r\n    tokens, scores = searcher(input_batch, lengths, max_length)\r\n  File \"C:\\Users\\user\\.conda\\envs\\pytorch-tests\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 889, in _call_impl\r\n    result = self.forward(*input, **kwargs)\r\n  File \"C:/Users/user/PycharmProjects/pytorch-tests/main.py\", line 1160, in forward\r\n    encoder_outputs, encoder_hidden = self.encoder(input_seq, input_length)\r\n  File \"C:\\Users\\user\\.conda\\envs\\pytorch-tests\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 889, in _call_impl\r\n    result = self.forward(*input, **kwargs)\r\n  File \"C:/Users/user/PycharmProjects/pytorch-tests/main.py\", line 693, in forward\r\n    packed = nn.utils.rnn.pack_padded_sequence(embedded, input_lengths)\r\n  File \"C:\\Users\\user\\.conda\\envs\\pytorch-tests\\lib\\site-packages\\torch\\nn\\utils\\rnn.py\", line 245, in pack_padded_sequence\r\n    _VF._pack_padded_sequence(input, lengths, batch_first)\r\nRuntimeError: 'lengths' argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor\r\n\r\nProcess finished with exit code 1`\r\n\r\nUnfamiliar with pytorch so no idea what the cause is or how to solve it, but it looks like something to do with tensor types.\r\nPackages in environment:\r\n![image](https://user-images.githubusercontent.com/33965786/111622596-af1d6100-87e9-11eb-9f51-783b80383287.png)\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/1421",
    "state": "closed",
    "labels": [
      "Text"
    ],
    "created_at": "2021-03-18T11:59:07Z",
    "updated_at": "2023-03-09T19:06:58Z",
    "comments": 1,
    "user": "0xVavaldi"
  },
  {
    "repo": "pytorch/serve",
    "number": 1013,
    "title": "How to debug handlers?",
    "body": "Since the handler's logic is copied inside every `.mar` file, there is no sense of breakpoints in the original handler `.py` file. Can you please suggest how can we debug our handler modules?",
    "url": "https://github.com/pytorch/serve/issues/1013",
    "state": "closed",
    "labels": [
      "triaged_wait"
    ],
    "created_at": "2021-03-17T21:52:46Z",
    "updated_at": "2021-04-09T18:47:43Z",
    "user": "duklin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 54212,
    "title": "How to update a Wiki page?",
    "body": "## \u2753 Questions and Help\r\n\r\n\r\nThe `-k` option for filtering tests with a string can no longer be used with `python`, and should be used with `pytest` now.\r\n\r\nPull requests can't be submitted for the Wiki, so I couldn't suggest an update to https://github.com/pytorch/pytorch/wiki/Writing-tests-in-PyTorch-1.8. \r\n\r\nPlease update the Wiki page with this detail. Thank you!\n\ncc @brianjo @mruberry @VitalyFedyunin @walterddr",
    "url": "https://github.com/pytorch/pytorch/issues/54212",
    "state": "closed",
    "labels": [
      "module: docs",
      "module: tests",
      "triaged"
    ],
    "created_at": "2021-03-17T21:31:48Z",
    "updated_at": "2021-03-18T15:10:54Z",
    "user": "imaginary-person"
  },
  {
    "repo": "pytorch/FBGEMM",
    "number": 553,
    "title": "Is it possible to speed up matrix multiplication by adjusting the values of the Packing parameters under the same hardware environment?",
    "body": "Hi! I am reading the source code of FBGEMM and interested in the CPU optimization part. I found that FBGEMM sets Packing parameters for each ISA separately. I am curious whether the values of these parameters are determined empirically or by a certain algorithm? Is it possible to speed up matrix multiplication by adjusting the values of the Packing parameters under the same hardware environment? Is it possible to run FBGEMM on more ISA by appropriately setting the values of the Packing parameters? I will be very grateful for your help.",
    "url": "https://github.com/pytorch/FBGEMM/issues/553",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-03-17T05:03:16Z",
    "updated_at": "2021-03-25T07:39:09Z",
    "user": "umiswing"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 53993,
    "title": "How to set the amp to all fp16 training?",
    "body": "Hello, I would like to ask how to set up all amp training for fp16? Similar to apex's O1 O2 O3 mode? thank you very much!\n\ncc @mcarilli @ptrblck",
    "url": "https://github.com/pytorch/pytorch/issues/53993",
    "state": "closed",
    "labels": [
      "triaged",
      "module: amp (automated mixed precision)"
    ],
    "created_at": "2021-03-15T08:02:23Z",
    "updated_at": "2021-03-16T03:04:16Z",
    "user": "sky-fly97"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 53957,
    "title": "Is pytorch 1.8.0 incompatible with cuda 11.2 or what is the reason for this error?",
    "body": "I have spent all day trying to upgrade cuda to 11.2 and get it working with pytorch. At the moment I believe I should have a fully working version of Cuda 11.2, yet I still get the following error when I try to run my pytorch code, which normally works without issues.\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/snap/pycharm-community/226/plugins/python-ce/helpers/pydev/pydevd.py\", line 1477, in _exec\r\n    pydev_imports.execfile(file, globals, locals)  # execute the script\r\n  File \"/snap/pycharm-community/226/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py\", line 18, in execfile\r\n    exec(compile(contents+\"\\n\", file, 'exec'), glob, loc)\r\n  File \"/home/tue/PycharmProjects/Pfold/run_1d_supervised.py\", line 112, in <module>\r\n    losses = main()\r\n  File \"/home/tue/PycharmProjects/Pfold/supervised/main.py\", line 73, in main\r\n    net = train(net, optimizer, dl_train, loss_fnc, dl_test=dl_test, scheduler=lr_scheduler,ite=ite_start, loss_reg_fnc=loss_reg_fnc, loss_reg_min_sep_fnc=loss_reg_min_sep_fnc)\r\n  File \"/home/tue/PycharmProjects/Pfold/supervised/optimization.py\", line 75, in train\r\n    dists_pred, coords_pred = net(features,mask)\r\n  File \"/home/tue/.local/lib/python3.8/site-packages/torch/nn/modules/module.py\", line 889, in _call_impl\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/home/tue/PycharmProjects/Pfold/supervised/network_vnet.py\", line 508, in forward\r\n    dists += (tr2DistSmall(x[:,i*3:(i+1)*3,:]),)\r\n  File \"/home/tue/PycharmProjects/Pfold/supervised/network_transformer.py\", line 155, in tr2DistSmall\r\n    D = torch.sum(Z**2, dim=1).unsqueeze(1) + torch.sum(Z**2, dim=1).unsqueeze(2) - 2*Z.transpose(1,2) @ Z\r\nRuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling `cublasSgemmStridedBatched( handle, opa, opb, m, n, k, &alpha, a, lda, stridea, b, ldb, strideb, &beta, c, ldc, stridec, num_batches)`\r\npython-BaseException\r\nBackend TkAgg is interactive backend. Turning interactive mode on.\r\n\r\nProcess finished with exit code 130 (interrupted by signal 2: SIGINT)\r\n\r\n```\r\n\r\nI have checked that cuda/cudnn seems to work, at least I was able to compile and run a hello_world script with nvcc. Additional information:\r\n\r\n```\r\ntue@tue-laptop:~$ nvcc -V\r\nnvcc: NVIDIA (R) Cuda compiler driver\r\nCopyright (c) 2005-2021 NVIDIA Corporation\r\nBuilt on Sun_Feb_14_21:12:58_PST_2021\r\nCuda compilation tools, release 11.2, V11.2.152\r\nBuild cuda_11.2.r11.2/compiler.29618528_0\r\n```\r\n\r\n```\r\nPython 3.8.5 (default, Jan 27 2021, 15:41:15) \r\n[GCC 9.3.0] on linux\r\nimport torch\r\ntorch.version.cuda\r\n'11.1'\r\ntorch.version\r\n<module 'torch.version' from '/home/tue/.local/lib/python3.8/site-packages/torch/version.py'>\r\ntorch.version.__version__\r\n'1.8.0+cu111'\r\n```\r\n\r\nSearching on the error pytorch is giving, hasn't really lead me to any understanding of what the problem could be, so I'm hoping for some insight here and perhaps a solution?\n\ncc @ngimel",
    "url": "https://github.com/pytorch/pytorch/issues/53957",
    "state": "open",
    "labels": [
      "module: cuda",
      "triaged"
    ],
    "created_at": "2021-03-13T06:02:04Z",
    "updated_at": "2021-03-24T14:13:31Z",
    "user": "tueboesen"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 53888,
    "title": "How to shift columns (or rows) in a tensor with different offsets?",
    "body": "`torch.roll` function is only able to shift columns (or rows) with same offsets. But I want to shift columns with different offsets. Suppose the input tensor is\r\n```\r\n[[1,2,3],\r\n [4,5,6],\r\n [7,8,9]]\r\n```\r\nSay, to shift with offset `i` for the i-th column, the expected output is\r\n```\r\n[[1,8,6],\r\n [4,2,9],\r\n [7,5,3]]\r\n```\r\nAn option to do so is to separately shift every column using `torch.roll` and stack them. But for the consideration of effectiveness and code compactness, I don't want to introduce the loop structure. Is there a better way\uff1f",
    "url": "https://github.com/pytorch/pytorch/issues/53888",
    "state": "closed",
    "labels": [
      "triaged",
      "module: advanced indexing"
    ],
    "created_at": "2021-03-12T10:11:21Z",
    "updated_at": "2021-03-13T05:05:51Z",
    "user": "changmenseng"
  },
  {
    "repo": "pytorch/FBGEMM",
    "number": 540,
    "title": "Is it possible to generate SPMDM kernels with asmjit?",
    "body": "Hi all, \r\nThanks for sharing such a high-performance GEMM library.\r\n\r\nAfter reading through source codes,  I found that only U8S8S32AC* kernels are generated from asmjit. \r\nIs it possible to port SpMDM codes to asmjit? I'm tring to optimzie SpMDM by myself.\r\n\r\nThanks!\r\nYang",
    "url": "https://github.com/pytorch/FBGEMM/issues/540",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-03-12T03:08:40Z",
    "updated_at": "2021-03-17T16:38:56Z",
    "user": "YangWang92"
  },
  {
    "repo": "pytorch/vision",
    "number": 3547,
    "title": "How to train a classifier with custom class num while also want pretrain=True?",
    "body": "It will gives an error:\r\n\r\n```\r\n\tsize mismatch for fc.weight: copying a param with shape torch.Size([1000, 1024]) from checkpoint, the shape in current model is torch.Size([42, 1024]).\r\n\r\n```",
    "url": "https://github.com/pytorch/vision/issues/3547",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2021-03-11T09:35:42Z",
    "updated_at": "2021-03-19T18:06:32Z",
    "user": "lucasjinreal"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 53693,
    "title": "how to use torch.distributions.Normal/log_prob in libtorch?",
    "body": "I dont find class like torch.distributions in libtorch,so is there any way to get log_prob of a tensor?\n\ncc @yf225 @glaringlee @fritzo @neerajprad @alicanb @vishwakftw @nikitaved",
    "url": "https://github.com/pytorch/pytorch/issues/53693",
    "state": "closed",
    "labels": [
      "module: distributions",
      "module: cpp",
      "triaged"
    ],
    "created_at": "2021-03-10T07:23:51Z",
    "updated_at": "2021-03-10T15:33:47Z",
    "user": "scirocc"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 53678,
    "title": "[FX] Regression from 1.8: FX can no longer trace functions where the first element of an int list is a Proxy",
    "body": "```\r\nimport torch\r\nimport torch.fx as fx\r\n\r\ndef f(x):\r\n  return torch.reshape(x, (x.shape[0], -1))\r\n\r\nmod = fx.symbolic_trace(f)\r\nprint(mod.code)\r\n```\r\n\r\nIn 1.18 this worked, but it was broken by this PR, which fails since it verifies that the first element of the list is an integer (while it's actually a Proxy): https://github.com/pytorch/pytorch/pull/51350\n\ncc @ezyang",
    "url": "https://github.com/pytorch/pytorch/issues/53678",
    "state": "open",
    "labels": [
      "triaged",
      "module: fx"
    ],
    "created_at": "2021-03-10T02:13:32Z",
    "updated_at": "2022-07-20T21:23:30Z",
    "user": "Chillee"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 53676,
    "title": "How to concatenate a variable number of tensors",
    "body": "## \u2753 Questions and Help\r\n\r\nHow to concatenate a variable number of tensors using `torch.cat() `. For example, I have three layers and I need to concatenate the output of these layers as below:\r\n\r\n```\r\n        for layer in self.layers:\r\n            src = layer(src, src_mask)            \r\n            # I have three layers and I expect 3 vectors\r\n            src = torch.cat([src],1) \r\n```\r\nKind regards,\r\nAiman Solyman",
    "url": "https://github.com/pytorch/pytorch/issues/53676",
    "state": "closed",
    "labels": [],
    "created_at": "2021-03-10T01:36:15Z",
    "updated_at": "2021-03-10T08:34:26Z",
    "user": "aimanmutasem"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 391,
    "title": "\u2753 [Question] PyTorch 1.8 Support",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\n## What you have already tried\r\nPyTorch 1.8(stable) is released recently.\r\n\r\nWhen will TRTorch be compatible to PyTorch 1.8? ",
    "url": "https://github.com/pytorch/TensorRT/issues/391",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-03-09T05:57:53Z",
    "updated_at": "2021-03-22T21:50:54Z",
    "user": "developer0hye"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 53584,
    "title": "How to delete Module from GPU? (libtorch C++)",
    "body": "All the demo only show how to load model files. But how to unload the model file from the GPU and free up the GPU memory space?\r\nI tried this, but it doesn't work.\r\n\r\n```cpp\r\nmodel.~Module(); \r\nc10::cuda::CUDACachingAllocator::emptyCache();\r\n```\n\ncc @yf225 @glaringlee",
    "url": "https://github.com/pytorch/pytorch/issues/53584",
    "state": "open",
    "labels": [
      "module: cpp-extensions",
      "module: cpp",
      "triaged"
    ],
    "created_at": "2021-03-09T02:55:03Z",
    "updated_at": "2021-03-11T03:11:09Z",
    "user": "ZhiZe-ZG"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 53580,
    "title": "how to use logging in libtorch C++ ? any example ? Many thanks",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\n\ncc @yf225 @glaringlee",
    "url": "https://github.com/pytorch/pytorch/issues/53580",
    "state": "closed",
    "labels": [
      "module: cpp",
      "triaged"
    ],
    "created_at": "2021-03-09T02:34:56Z",
    "updated_at": "2021-03-10T02:58:13Z",
    "user": "yulinhuyang"
  },
  {
    "repo": "pytorch/serve",
    "number": 1001,
    "title": "How to deploy on the cloud sentence transformer from the UKPLab from ",
    "body": "Hi community,\r\n\r\nHow could I practically deploy on the cloud pre-trained sentence transformer from the UKPLab ?\r\n\r\nI saw the issue #681 and customisation proposed but didn't know whether it was intended for cloud.\r\n\r\nSecondly, once deployed on cloud how to configure at scale?\r\n\r\nThanks !",
    "url": "https://github.com/pytorch/serve/issues/1001",
    "state": "closed",
    "labels": [
      "triaged_wait"
    ],
    "created_at": "2021-03-08T20:24:40Z",
    "updated_at": "2021-05-13T16:51:01Z",
    "user": "mattvan83"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1401,
    "title": "Dynamic Quantization for GPT2 model from huggingface.",
    "body": "Hi,\r\n\r\nReproducibility required: PyTorch version 1.4.0\r\n\r\nI am trying to use the ```torch.quantization.quantize_dynamic``` function to quantize the ```pre_trained``` DistilGPT2 model from Hugging-face.\r\n\r\nAs most transformer blocks in this model are made up of the ```nn.Conv1d``` modules, there occurs a problem while performing the quantization.\r\n\r\nI understand, because the function ```torch.quantization.quantize_dynamic``` does not define a way for quantizing the ```nn.Conv1d``` layer (see the snippet below), they all just go **UN-Quantized** \r\n```\r\n    if qconfig_spec is None:\r\n        if dtype == torch.qint8:\r\n            qconfig_spec = {\r\n                nn.Linear : default_dynamic_qconfig,\r\n                nn.LSTM : default_dynamic_qconfig\r\n            }\r\n```\r\n\r\nPlease suggest a solution.\n\ncc @jerryzh168 @jianyuh",
    "url": "https://github.com/pytorch/tutorials/issues/1401",
    "state": "open",
    "labels": [
      "question",
      "module: quantization"
    ],
    "created_at": "2021-03-08T15:06:23Z",
    "updated_at": "2023-03-09T19:37:48Z",
    "user": "mriganktiwari"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 53395,
    "title": "How to solve dist.init_process_group from hanging (or deadlocks) with DGX A100?",
    "body": "## \ud83d\udc1b Bug\r\n\r\nDDP deadlocks on a new dgx A100 machine with 8 gpus\r\n\r\n## To Reproduce\r\n\r\nRun this self contained code:\r\n```\r\n\"\"\"\r\nFor code used in distributed training.\r\n\"\"\"\r\nfrom typing import Tuple\r\n\r\nimport torch\r\nimport torch.distributed as dist\r\n\r\nimport os\r\n\r\nfrom torch import Tensor\r\n\r\nimport torch.multiprocessing as mp\r\n\r\ndef set_sharing_strategy(new_strategy=None):\r\n    \"\"\"\r\n    https://pytorch.org/docs/stable/multiprocessing.html\r\n    https://discuss.pytorch.org/t/how-does-one-setp-up-the-set-sharing-strategy-strategy-for-multiprocessing/113302\r\n    https://stackoverflow.com/questions/66426199/how-does-one-setup-the-set-sharing-strategy-strategy-for-multiprocessing-in-pyto\r\n    \"\"\"\r\n    from sys import platform\r\n\r\n    if new_strategy is not None:\r\n        mp.set_sharing_strategy(new_strategy=new_strategy)\r\n    else:\r\n        if platform == 'darwin':  # OS X\r\n            # only sharing strategy available at OS X\r\n            mp.set_sharing_strategy('file_system')\r\n        else:\r\n            # ulimit -n 32767 or ulimit -n unlimited (perhaps later do try catch to execute this increase fd limit)\r\n            mp.set_sharing_strategy('file_descriptor')\r\n\r\ndef use_file_system_sharing_strategy():\r\n    \"\"\"\r\n    when to many file descriptor error happens\r\n\r\n    https://discuss.pytorch.org/t/how-does-one-setp-up-the-set-sharing-strategy-strategy-for-multiprocessing/113302\r\n    \"\"\"\r\n    import torch.multiprocessing\r\n    torch.multiprocessing.set_sharing_strategy('file_system')\r\n\r\ndef find_free_port():\r\n    \"\"\" https://stackoverflow.com/questions/1365265/on-localhost-how-do-i-pick-a-free-port-number \"\"\"\r\n    import socket\r\n    from contextlib import closing\r\n\r\n    with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s:\r\n        s.bind(('', 0))\r\n        s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\r\n        return str(s.getsockname()[1])\r\n\r\ndef setup_process(rank, world_size, backend='gloo'):\r\n    \"\"\"\r\n    Initialize the distributed environment (for each process).\r\n\r\n    gloo: is a collective communications library (https://github.com/facebookincubator/gloo). My understanding is that\r\n    it's a library/API for process to communicate/coordinate with each other/master. It's a backend library.\r\n\r\n    export NCCL_SOCKET_IFNAME=eth0\r\n    export NCCL_IB_DISABLE=1\r\n\r\n    https://stackoverflow.com/questions/61075390/about-pytorch-nccl-error-unhandled-system-error-nccl-version-2-4-8\r\n\r\n    https://pytorch.org/docs/stable/distributed.html#common-environment-variables\r\n    \"\"\"\r\n    import torch.distributed as dist\r\n    import os\r\n    import torch\r\n\r\n    if rank != -1:  # -1 rank indicates serial code\r\n        print(f'setting up rank={rank} (with world_size={world_size})')\r\n        # MASTER_ADDR = 'localhost'\r\n        MASTER_ADDR = '127.0.0.1'\r\n        MASTER_PORT = find_free_port()\r\n        # set up the master's ip address so this child process can coordinate\r\n        os.environ['MASTER_ADDR'] = MASTER_ADDR\r\n        print(f\"{MASTER_ADDR=}\")\r\n        os.environ['MASTER_PORT'] = MASTER_PORT\r\n        print(f\"{MASTER_PORT}\")\r\n\r\n        # - use NCCL if you are using gpus: https://pytorch.org/tutorials/intermediate/dist_tuto.html#communication-backends\r\n        if torch.cuda.is_available():\r\n            # unsure if this is really needed\r\n            # os.environ['NCCL_SOCKET_IFNAME'] = 'eth0'\r\n            # os.environ['NCCL_IB_DISABLE'] = '1'\r\n            backend = 'nccl'\r\n        print(f'{backend=}')\r\n        # Initializes the default distributed process group, and this will also initialize the distributed package.\r\n        dist.init_process_group(backend, rank=rank, world_size=world_size)\r\n        # dist.init_process_group(backend, rank=rank, world_size=world_size)\r\n        # dist.init_process_group(backend='nccl', init_method='env://', world_size=world_size, rank=rank)\r\n        print(f'--> done setting up rank={rank}')\r\n\r\ndef cleanup(rank):\r\n    \"\"\" Destroy a given process group, and deinitialize the distributed package \"\"\"\r\n    # only destroy the process distributed group if the code is not running serially\r\n    if rank != -1:  # -1 rank indicates serial code\r\n        dist.destroy_process_group()\r\n\r\ndef get_batch(batch: Tuple[Tensor, Tensor], rank) -> Tuple[Tensor, Tensor]:\r\n    x, y = batch\r\n    if torch.cuda.is_available():\r\n        x, y = x.to(rank), y.to(rank)\r\n    else:\r\n        # I don't think this is needed...\r\n        # x, y = x.share_memory_(), y.share_memory_()\r\n        pass\r\n    return x, y\r\n\r\ndef test_setup():\r\n    print('test_setup')\r\n    world_size = 4\r\n    mp.spawn(setup_process, args=(world_size,), nprocs=4)\r\n    dist.destroy_process_group()\r\n    print('successful test_setup!')\r\n\r\n\r\nif __name__ == '__main__':\r\n    test_setup()\r\n```\r\n\r\nerror msg\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/miranda9/miniconda3/envs/metalearning/lib/python3.8/multiprocessing/process.py\", line 315, in _bootstrap\r\n    self.run()\r\n  File \"/home/miranda9/miniconda3/envs/metalearning/lib/python3.8/mu",
    "url": "https://github.com/pytorch/pytorch/issues/53395",
    "state": "closed",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2021-03-05T19:14:08Z",
    "updated_at": "2023-06-08T10:36:24Z",
    "user": "brando90"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 53348,
    "title": "How to obtain the gradient of a tensor when in-place operation included?",
    "body": "## \u2753 How to obtain the gradient of a tensor when in-place operation included?\r\nFor simplicity, here is the code to describe the question: when using `res = ma @ mb` in pytorch, we can easily obtain the gradient of ma by calling some backward function, e.g. `(res**2).sum().backward(); print(ma.grad)`. But when this multiplication is implemented in a for loop manner, how can we can the gradient of tensor ma or mb?\r\n```python\r\nimport torch\r\nma = torch.randn(2,3,3,4).requires_grad_(True)\r\nmb = torch.randn(2,3,4,5).requires_grad_(True)\r\nB,C,H,W = ma.shape\r\nB,C,W,K = mb.shape\r\nres_torch = torch.zeros((B,C,H,K), requires_grad=True)\r\nfor b in range(B):\r\n    for c in range(C):\r\n        for h in range(H):\r\n            for k in range(K):\r\n                for r in range(W):\r\n                    res_torch[b][c][h][k] = res_torch[b][c][h][k] +  ma[b][c][h][r] * mb[b][c][r][k]\r\nres_torch.sum().backward()\r\nprint(ma.grad)\r\n```\r\nA runtime error raised for the above code: `RuntimeError: leaf variable has been moved into the graph interio`.\r\n\r\nHowever for this one, it can not yield the expected result:\r\n```python\r\nma = torch.randn(2,3,3,4).requires_grad_(True)\r\nmb = torch.randn(2,3,4,5).requires_grad_(True)\r\nB,C,H,W = ma.shape\r\nB,C,W,K = mb.shape\r\nres_torch = torch.zeros((B,C,H,K), requires_grad=True)\r\nfor b in range(B):\r\n    for c in range(C):\r\n        for h in range(H):\r\n            for k in range(K):\r\n                res = 0\r\n                for r in range(W):\r\n                    res = res + ma[b][c][h][r] * mb[b][c][r][k]\r\n                res_torch[b][c][h][k].data.fill_(res)\r\nres_torch.sum().backward()\r\nprint(ma.grad)\r\n```\r\nthe output was `None`.\r\nAny hints for solving this problem?\n\ncc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer",
    "url": "https://github.com/pytorch/pytorch/issues/53348",
    "state": "closed",
    "labels": [
      "module: autograd",
      "triaged"
    ],
    "created_at": "2021-03-05T09:33:53Z",
    "updated_at": "2021-03-06T02:53:54Z",
    "user": "Leiwx52"
  },
  {
    "repo": "pytorch/vision",
    "number": 3509,
    "title": "simple API discussion about the AutoAugment",
    "body": "## \u2753 Questions and Help\r\n\r\nquestion about the user interface API  \r\n[transforms/autoaugment.py](https://github.com/pytorch/vision/blob/7b9d30eb7c4d92490d9ac038a140398e0a690db6/torchvision/transforms/autoaugment.py)  \r\nThe current usage would be `AutoAugment(AutoAugmentPolicy('cifar10'))`, but since the policy is just an `Enum`, I doubt whether it'll be more convenient to be `AutoAugment('cifar10')`. Is there any future advantage to use the policy?\n\ncc @vfdev-5",
    "url": "https://github.com/pytorch/vision/issues/3509",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2021-03-05T06:19:31Z",
    "updated_at": "2021-03-07T02:58:29Z",
    "user": "ain-soph"
  },
  {
    "repo": "pytorch/examples",
    "number": 889,
    "title": "Low training accuracy using pre-trained model",
    "body": "Hello,\r\nI am trying to evaluate a pre-trained mobilenetv2 model from torchvision on the ImageNet training dataset using this script. \r\nTo do so, I modify lines 235-237 to perform validation on the train loader instead of the val loader:\r\n```\r\n    if args.evaluate:\r\n        validate(train_loader, model, criterion, args)\r\n        return\r\n```\r\nEverything else is left untouched. The command I use to run is:\r\n`python imagenet_train_example.py -a mobilenet_v2 -j 16 -b 1024 -e --pretrained /data/ImageNet`\r\nHowever, the results are lower than expected:\r\n`Acc@1 2.926 Acc@5 15.079 Loss 11.795791`",
    "url": "https://github.com/pytorch/examples/issues/889",
    "state": "open",
    "labels": [
      "help wanted",
      "vision"
    ],
    "created_at": "2021-03-04T15:15:11Z",
    "updated_at": "2022-03-09T21:10:33Z",
    "comments": 2,
    "user": "AndreiXYZ"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 53264,
    "title": "How to load trained . torch from conversion to .mlmodel",
    "body": "Hi , I need in help in converting the .torch to .mlmodel ,, while doing it i faced an error . After researching found no solution for the same and posted for help .\r\nthe error:\r\n<img width=\"1009\" alt=\"Screenshot 2021-03-01 at 10 24 01 PM\" src=\"https://user-images.githubusercontent.com/35099512/109978249-b2154d80-7d23-11eb-8e2f-39497d77051d.png\">\r\nthe code used :\r\n<img width=\"843\" alt=\"Screenshot 2021-03-02 at 10 46 58 PM\" src=\"https://user-images.githubusercontent.com/35099512/109978278-b93c5b80-7d23-11eb-8286-43ac2cab72e3.png\">\r\n \n\ncc @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/53264",
    "state": "open",
    "labels": [
      "oncall: mobile"
    ],
    "created_at": "2021-03-04T14:27:11Z",
    "updated_at": "2021-03-12T05:28:21Z",
    "user": "NaveenTg"
  },
  {
    "repo": "pytorch/serve",
    "number": 989,
    "title": "How to get the URL parameters within the custom inference handler?",
    "body": "Hi guys, recently I'm writing an custom service handler for yolov5. However, I have no idea about how to get the URL parameters in my inference handler. \r\n\r\nFor example:\r\n```\r\ncurl -XPOST http://localhost:8080/predictions/yolo?my_parameter=123 -T@sample.jpg\r\n```\r\nHow can I get the value of ``my_parameter`` in my custom service handler? \r\n\r\nI know that I could pass the parameters within the multipart/form-data or json body to my service handler. But I can't, because the API signature is by-design. Passing the parameter with URL is the only choice of mine.\r\n\r\nAny suggestions would be appreciated!",
    "url": "https://github.com/pytorch/serve/issues/989",
    "state": "open",
    "labels": [
      "triaged_wait"
    ],
    "created_at": "2021-03-03T09:48:50Z",
    "updated_at": "2023-11-07T12:42:08Z",
    "user": "neoragex2002"
  },
  {
    "repo": "huggingface/datasets",
    "number": 1973,
    "title": "Question: what gets stored in the datasets cache and why is it so huge?",
    "body": "I'm running several training jobs (around 10) with a relatively large dataset (3M samples). The datasets cache reached 178G and it seems really large. What is it stored in there and why is it so large? I don't think I noticed this problem before and seems to be related to the new version of the datasets library. Any insight? Thank you!",
    "url": "https://github.com/huggingface/datasets/issues/1973",
    "state": "closed",
    "labels": [],
    "created_at": "2021-03-02T14:35:53Z",
    "updated_at": "2021-03-30T14:03:59Z",
    "user": "ioana-blue"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 53101,
    "title": "How to compile torch/lib/c10d/ProcessGroupNCCL.cpp",
    "body": "I want to modify `ProcessGroupNCCL.cpp` to add some print statements, but I don't know how to recompile this file.\r\n\r\nIt is located at [https://github.com/pytorch/pytorch/tree/v1.7.1/torch/lib/c10d](https://github.com/pytorch/pytorch/tree/v1.7.1/torch/lib/c10d).\r\n\r\nI'm using pytorch 1.7.1 installed by anaconda.\r\n\n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu",
    "url": "https://github.com/pytorch/pytorch/issues/53101",
    "state": "closed",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2021-03-02T09:06:49Z",
    "updated_at": "2021-03-04T03:14:39Z",
    "user": "1013801464"
  },
  {
    "repo": "pytorch/text",
    "number": 1218,
    "title": "how to load data using TabularDataset and the new nightly torchtext experimental dataloader",
    "body": "the `torchtext.data.TabularDataset` returns an iterable of objects that cannot further be split into batches, or (x,y) sets of values. making it impossible to use the new `torchtext.vocab.Vocab` to build vocab using `Counter` \r\n\r\n**my use-case code:**\r\ntokenize = lambda x:x.split(\" \")\r\n\r\nkonkani = Field(sequential=True, tokenize=tokenize, init_token='<sos>', eos_token='<eos>')\r\n\r\nhindi = Field(sequential=True, tokenize=tokenize, init_token='<sos>', eos_token='<eos>')\r\n\r\nfields = [(\"word_token_konkani\", konkani), ('word_token_hindi', hindi)]\r\n\r\ntrain_data, test_data = TabularDataset.splits(path=\"translation/\", train=\"train.csv\",\r\n                                              test=\"test.csv\", format=\"csv\", fields=fields)\r\n\r\n\r\ni was trying to refer the migration tutorials here : [link](https://github.com/pytorch/text/blob/master/examples/legacy_tutorial/migration_tutorial.ipynb) \r\n\r\n\r\n",
    "url": "https://github.com/pytorch/text/issues/1218",
    "state": "closed",
    "labels": [],
    "created_at": "2021-02-26T08:08:49Z",
    "updated_at": "2021-02-26T16:47:50Z",
    "user": "StephennFernandes"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 52850,
    "title": "How to skip the images in a custom dataset and deal with None values?",
    "body": "I have an object detection dataset with RGB images and annotations in Json. I use a custom DataLoader class to read the images and the labels. One issue that I\u2019m facing is that I would like to skip images when training my model if/when labels don\u2019t contain certain objects.\r\n\r\nFor example, If one image doesn\u2019t contain any target labels belonging to the class \u2018Cars\u2019, I would like to skip them. When parsing my Json annotation, I tried checking for labels that don\u2019t contain the class \u2018Cars\u2019 and returned None. Subsequently, I used a collate function to filter the None but unfortunately, It is not working.\r\n\r\n\r\n\r\n\r\n```\r\nimport torch\r\nfrom torch.utils.data.dataset import Dataset\r\nimport json\r\nimport os\r\nfrom PIL import Image\r\nfrom torchvision import transforms\r\n#import cv2\r\nimport numpy as np\r\ngeneral_classes = {\r\n    # Cars\r\n    \"Toyota Corolla\" : 0,\r\n    \"VW Golf\" : 0,\r\n    \"VW Beetle\" : 0,\r\n\r\n    # Motor-cycles\r\n    \"Harley Davidson\" : 1,\r\n    \"Yamaha YZF-R6\" : 1,\r\n}\r\n\r\ncar_classes={\r\n\"Toyota Corolla\" : 0,\r\n\"VW Golf\" : 0,\r\n\"VW Beetle\" : 0\r\n}\r\n\r\ndef get_transform(train):\r\n    transforms = []\r\n    # converts the image, a PIL image, into a PyTorch Tensor\r\n    transforms.append(T.ToTensor())\r\n    if train:\r\n        # during training, randomly flip the training images\r\n        # and ground-truth for data augmentation\r\n        transforms.append(T.RandomHorizontalFlip(0.5))\r\n    return T.Compose(transforms)\r\n\r\n\r\ndef my_collate(batch):\r\n    batch = list(filter(lambda x: x is not None, batch))\r\n    return torch.utils.data.dataloader.default_collate(batch)\r\n\r\n\r\nclass FilteredDataset(Dataset):\r\n    # The dataloader will skip the image and corresponding labels based on the dictionary 'car_classes'\r\n    def __init__(self, data_dir, transforms):\r\n        self.data_dir = data_dir\r\n        img_folder_list = os.listdir(self.data_dir)\r\n        self.transforms = transforms\r\n\r\n        imgs_list = []\r\n        json_list = []\r\n        self.filter_count=0\r\n        self.filtered_label_list=[]\r\n\r\n        for img_path in img_folder_list:\r\n            #img_full_path = self.data_dir + img_path\r\n            img_full_path=os.path.join(self.data_dir,img_path)\r\n            json_file = os.path.join(img_full_path, 'annotations-of-my-images.json')\r\n            img_file = os.path.join(img_full_path, 'Image-Name.png')\r\n\r\n            json_list.append(json_file)\r\n            imgs_list.append(img_file)\r\n        self.imgs = imgs_list\r\n        self.annotations = json_list\r\n        total_count=0\r\n\r\n        for one_annotation in self.annotations:\r\n            filtered_obj_id=[]\r\n            with open(one_annotation) as f:\r\n                img_annotations = json.load(f)\r\n\r\n            parts_list = img_annotations['regions']\r\n            for part in parts_list:\r\n                current_obj_id = part['tags'][0] # bbox label \r\n                check_obj_id = general_classes[current_obj_id]\r\n                if(check_obj_id==0):\r\n                    subclass_id=car_classes[current_obj_id]\r\n                    filtered_obj_id.append(subclass_id)\r\n                    total_count=total_count+1\r\n\r\n            if(len(filtered_obj_id)>0):\r\n                self.filter_count=self.filter_count+1\r\n                self.filtered_label_list.append(one_annotation)\r\n\r\n        print(\"The total number of the objects in all images: \",total_count)\r\n\r\n\r\n    # get one image and the bboxes,img_id, labels of parts, etc in the image as target.\r\n    def __getitem__(self, idx):\r\n\r\n        img_path = self.imgs[idx]\r\n        image_id = torch.tensor([idx])\r\n        \r\n        with open(self.annotations[idx]) as f:\r\n            img_annotations = json.load(f)\r\n        parts_list = img_annotations['regions']\r\n        obj_ids = []\r\n        boxes = []\r\n        for part in parts_list:\r\n            obj_id = part['tags'][0]\r\n            check_obj_id = general_classes[obj_id]\r\n            if(check_obj_id==0):\r\n               obj_id=car_classes[obj_id]\r\n               obj_ids.append(obj_id)\r\n                #print(\"---------------------------------------------------\")\r\n                \r\n        if(len(obj_ids)>0):\r\n            img = Image.open(img_path).convert(\"RGB\")\r\n            labels = torch.as_tensor(obj_ids, dtype = torch.int64)\r\n            target = {}\r\n            target['labels'] = labels\r\n            \r\n            if self.transforms is not None:\r\n                img, target = self.transforms(img, target)\r\n                return img, target\r\n        else:\r\n            return None\r\n\r\n\r\n    def __len__(self):\r\n        return len(self.filtered_label_list)\r\n\r\n\r\n\r\n\r\ntrain_data_path = \"path-to-my-annotation\"\r\n# Generators\r\ntrain_dataset = FilteredDataset(train_data_path,get_transform(train=True))\r\nprint(\"Total files in the train_dataset: \",len(train_dataset))\r\n#print(\"The first instance in the train dataset : \",train_dataset[0])\r\n#training_generator = torch.utils.data.DataLoader(train_dataset)\r\ntraining_generator = torch.utils.data.DataLoader(train_dataset,collate_fn=my_collate)\r\nprint(\"\\n\\n Iterat",
    "url": "https://github.com/pytorch/pytorch/issues/52850",
    "state": "open",
    "labels": [
      "module: dataloader",
      "triaged"
    ],
    "created_at": "2021-02-25T18:04:33Z",
    "updated_at": "2021-02-25T22:04:56Z",
    "user": "srinivasgln"
  },
  {
    "repo": "pytorch/vision",
    "number": 3451,
    "title": "Can't compile master: requires nightly PyTorch?",
    "body": "I have installed torch 1.7.1 and g++ 7.5.0. Do I need nightly PyTorch version to compile nightly torchvision 0.9.0?\r\n\r\n`pip install git+https://github.com/pytorch/vision --no-dependencies`: [log.txt](https://github.com/pytorch/vision/files/6037409/log.txt)\r\n",
    "url": "https://github.com/pytorch/vision/issues/3451",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-02-24T16:28:35Z",
    "updated_at": "2021-02-24T18:18:30Z",
    "user": "vadimkantorov"
  },
  {
    "repo": "pytorch/vision",
    "number": 3436,
    "title": "Windows CPU build missing on PyPI?",
    "body": "## \ud83d\udc1b Bug\r\n\r\nIs there a reason the CPU build of `torchvision` is not pushed to PyPI anymore?\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. `pip install torch==1.7.1 torchvision==0.8.2 torchaudio==0.7.1`\r\n\r\nOutput:\r\n```\r\nCollecting torch==1.7.1\r\n  Downloading torch-1.7.1-cp38-cp38-win_amd64.whl (184.0 MB)\r\n     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 184.0 MB 201 kB/s\r\nERROR: Could not find a version that satisfies the requirement torchvision==0.8.2\r\nERROR: No matching distribution found for torchvision==0.8.2\r\n```\r\n\r\n## Expected behavior\r\n\r\nCPU build of `torchvision` is installed.\r\n\r\n## Environment\r\n\r\n - OS: Windows\r\n - Python version: 3.8.6\r\n\r\n## Additional context\r\n\r\n`torchvision` used to be pushed to PyPI ([up until v0.5.0](https://pypi.org/project/torchvision/0.5.0/#files)) and I'm wondering why this isn't the case anymore. I'm aware the standard/recommended way of installing is through [the pytorch.org index](https://download.pytorch.org/whl/torch_stable.html). However, the main `torch` package (CPU only) is being pushed to PyPI, so I'm wondering whether it is inteded that both `torchvision` and `torchaudio` are not or if it's just a bug?\r\n\r\nI could not find any helpful recent information on this, only some discussions around PyPI binary size contraints (mainly [this](https://github.com/pytorch/vision/issues/1774) and [this](https://github.com/pytorch/pytorch/issues/24310#)). I understand this is a problem for the CUDA builds but for the CPU build I really do not see any issue (e.g. `torchvision` v0.5.0 is 1.2 MB).\r\n\r\nDoes anybody have some insight as to why this is happening?\r\n\n\ncc @peterjc123 @nbcsm @guyang3532 @maxluk @gunandrose4u @smartcat2010 @mszhanyi",
    "url": "https://github.com/pytorch/vision/issues/3436",
    "state": "closed",
    "labels": [
      "question",
      "windows",
      "topic: binaries"
    ],
    "created_at": "2021-02-23T11:54:25Z",
    "updated_at": "2021-03-09T11:25:53Z",
    "user": "1enn0"
  },
  {
    "repo": "pytorch/audio",
    "number": 1298,
    "title": "how to compute log filter bank energy in torch audio compare with python_speech_feature?",
    "body": "## \u2753 I want re-procedure result like when i use compute log-filterbank energy of lib: python_speech_feature by using torchaudio.\r\n\r\nthis is my code, and I'm see the result is difference:\r\n\r\n```\r\n# load audio data by librosa\r\npath_audio = \"audio_a.wav\"\r\ny, sr = librosa.load(path_audio, sr=16000, offset=0.5, duration=0.4)\r\n\r\n# load audio data by torch audio\r\naudio_ft, sr = torchaudio.load(path_audio)\r\naudio_ft = audio_ft.squeeze(0)\r\ny_torch = audio_ft[int(0.5*16000):int(0.9*16000)]\r\n\r\n# the result is the same then i compute log filterbank energy\r\nft_f_bank = python_speech_features.logfbank(y, samplerate=16000, winlen=0.025, winstep=0.01, nfilt=64,nfft=512)\r\nprint(ft_f_bank.shape) # result: (39, 64)\r\nft_f_bank_by_torch = torchaudio.compliance.kaldi.fbank(y_torch, sample_frequency=16000.0, frame_length=25.0, frame_shift=10.0, use_log_fbank=True, use_energy=True, num_mel_bins=64)\r\nprint(ft_f_bank_by_torch.shape) # result: (38, 65)\r\n```\r\nHow can i make result return by torchaudio is the same with python speech feature. I'm not have deep understand more about speech feature, so question can so weird, sorry. \r\nThankyou\r\n\r\n",
    "url": "https://github.com/pytorch/audio/issues/1298",
    "state": "closed",
    "labels": [],
    "created_at": "2021-02-23T10:20:25Z",
    "updated_at": "2021-02-23T16:34:42Z",
    "user": "trangtv57"
  },
  {
    "repo": "pytorch/vision",
    "number": 3429,
    "title": "Inconsistency between the pretrained models and labels",
    "body": "I notice that for pretrain models that are provided the labels are not consistent.\r\nFor example vgg16 class 1 is different from Resnet50 class 1.\r\nCan you let us know where we can find the corresponding labels for each model?\r\nFor vgg i notice that the one that looks like this:\r\n```{\r\n  \"0\": [\r\n    \"n01440764\",\r\n    \"tench\"\r\n  ],\r\n  \"1\": [\r\n    \"n01443537\",\r\n    \"goldfish\"\r\n  ],\r\n  \"2\": [\r\n    \"n01484850\",\r\n    \"great_white_shark\"\r\n  ],\r\n  \"3\": [\r\n    \"n01491361\",\r\n    \"tiger_shark\"\r\n  ],\r\n  \"4\": [\r\n    \"n01494475\",\r\n    \"hammerhead\"\r\n  ],\r\n  \"5\": [\r\n    \"n01496331\",\r\n    \"electric_ray\"\r\n  ],\r\n  \"6\": [\r\n    \"n01498041\",\r\n    \"stingray\"\r\n  ],\r\n  \"7\": [\r\n    \"n01514668\",\r\n    \"cock\"\r\n  ],\r\n  \"8\": [\r\n    \"n01514859\",\r\n    \"hen\"\r\n```\r\nworks, but this one is not the one that we should use for resnets, please let us know what we should do.\r\nThanks",
    "url": "https://github.com/pytorch/vision/issues/3429",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "module: reference scripts"
    ],
    "created_at": "2021-02-22T22:50:42Z",
    "updated_at": "2021-03-31T08:46:32Z",
    "user": "seyeeet"
  },
  {
    "repo": "pytorch/text",
    "number": 1193,
    "title": "Looking for an example on how to use BucketIterator with a transformer model?",
    "body": "I would appreciate an end-to-end example. The examples that I found stop with the BucketIterator. It is unclear what to do with it.\r\n\r\n",
    "url": "https://github.com/pytorch/text/issues/1193",
    "state": "closed",
    "labels": [
      "legacy"
    ],
    "created_at": "2021-02-20T02:41:12Z",
    "updated_at": "2024-07-12T11:58:25Z",
    "user": "sorenwacker"
  },
  {
    "repo": "pytorch/vision",
    "number": 3421,
    "title": "error making: python-torchvision-cuda",
    "body": "can't make an app from AUR `python-torchvision-cuda` in Arch Linux\r\n\r\n\r\n```sh\r\n=========================================================================================== short test summary info ===========================================================================================\r\nFAILED test/test_functional_tensor.py::Tester::test_adjust_brightness - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_adjust_contrast - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_adjust_gamma - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_adjust_hue - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_adjust_saturation - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_affine - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_center_crop - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_crop - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_five_crop - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_gaussian_blur - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_hflip - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_hsv2rgb - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_pad - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_perspective - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_resize - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_resized_crop - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_rgb2hsv - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_rgb_to_grayscale - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_rotate - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_ten_crop - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_functional_tensor.py::Tester::test_vflip - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_image.py::ImageTester::test_decode_image - AssertionError: False is not true\r\nFAILED test/test_image.py::ImageTester::test_decode_jpeg - AssertionError: False is not true\r\nFAILED test/test_image.py::ImageTester::test_encode_jpeg - AssertionError: False is not true\r\nFAILED test/test_image.py::ImageTester::test_write_jpeg - AssertionError: b'\\xf[2208 chars]e6\\xa6\\x87\\xc2\\x0c\\xaa\\xcc\\xd9\\xe4\\xfd\\xe3\\x82[170942 chars]\\xd9' != b'\\xf[2208 chars]e6\\xa7\\x0f\\xf0\\x83*\\xb36y?x...\r\nFAILED test/test_models.py::ModelTester::test_fasterrcnn_resnet50_fpn_cpu - TypeError: Object of type 'NoneType' is not an instance of 'function'\r\nFAILED test/test_models.py::ModelTester::test_googlenet_eval - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_models.py::ModelTester::test_keypointrcnn_resnet50_fpn_cpu - RuntimeError: class '__torch__.torchvision.models.detection._utils.BoxCoder' already defined.\r\nFAILED test/test_models.py::ModelTester::test_maskrcnn_resnet50_fpn_cpu - RuntimeError: class '__torch__.torchvision.models.detection._utils.BoxCoder' already defined.\r\nFAILED test/test_models.py::ModelTester::test_retinanet_resnet50_fpn_cpu - RuntimeError: class '__torch__.torchvision.models.detection._utils.BoxCoder' already defined.\r\nFAILED test/test_ops.py::RoIPoolTester::test_backward_cpu_contiguous - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_ops.py::RoIPoolTester::test_backward_cpu_non_contiguous - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_ops.py::PSRoIPoolTester::test_backward_cpu_contiguous - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_ops.py::PSRoIPoolTester::test_backward_cpu_non_contiguous - TypeError: Object of type 'module' is not an instance of 'function'\r\nFAILED test/test_ops.py::RoIAlignTester::test_backwar",
    "url": "https://github.com/pytorch/vision/issues/3421",
    "state": "closed",
    "labels": [
      "question",
      "topic: build"
    ],
    "created_at": "2021-02-19T19:53:46Z",
    "updated_at": "2021-02-21T23:01:29Z",
    "user": "chiboreache"
  },
  {
    "repo": "pytorch/cpuinfo",
    "number": 53,
    "title": "Cpuinfo in sparc",
    "body": "I was able to compile pytorch on Debian 10, with Sparc processor. However, when it runs, it gives the error that it does not recognize the cpuinfo information and uses only one processor of the 32 existing ones. I would like to know if I can modify something to take at least one 16 core socket. On several occasions I was able to modify the code so that it takes the correct information. Thanks in advance.",
    "url": "https://github.com/pytorch/cpuinfo/issues/53",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2021-02-19T17:48:14Z",
    "updated_at": "2024-01-11T00:57:03Z",
    "user": "alerenato"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 344,
    "title": "[Question ][Error ]  at least 4 dimensions are required for input",
    "body": "## \u2753 Question\r\nHi I managed to compile TRTorch but it gives me very weird results when I apply it to a simple Conv2d model. \r\nThe model is as follows  : \r\n```\r\nclass DummyModel(torch.nn.Module):\r\n    def __init__(self,):\r\n        super().__init__()\r\n        self.conv = torch.nn.Conv2d(in_channels=3, out_channels=10, kernel_size=3)\r\n    def forward(self, x):\r\n        return torch.mean(self.conv(x))\r\nmd = DummyModel().to(DEVICE)\r\ninput_ = torch.ones((1, 3, 1024, 1024)).to(DEVICE)\r\nwith torch.no_grad():\r\n    traced_model = torch.jit.trace(md, input_)\r\ntorch.jit.save(traced_model, \"net.pth\")\r\n```\r\n\r\nRunning \r\n`bazel run //cpp/trtorchexec -- net.pth \"(1,3,1024,1024)\"`\r\nGives : \r\n\r\n```\r\nDEBUG: [TRTorch - Debug Build] - stride: [1, 1]\r\nDEBUG: [TRTorch - Debug Build] - padding: [0, 0]\r\nDEBUG: [TRTorch - Debug Build] - dilation: [1, 1]\r\nDEBUG: [TRTorch - Debug Build] - out_padding: [0, 0]\r\nDEBUG: [TRTorch - Debug Build] - groups: 1\r\nDEBUG: [TRTorch - Debug Build] - Weights: [10]\r\n    Number of input maps: 10\r\n    Number of output maps: 10\r\n    Element shape: [1]\r\nERROR: [TRTorch Conversion Context] - %10 : Tensor = aten::_convolution(%input.1, %self.conv.weight, %self.conv.bias, %3, %2, %3, %5, %2, %6, %5, %5, %4) # /home/matthieu/anaconda3/envs/gym/lib/python3.7/site-packages/torch/nn/modules/conv.py:416:0: at least 4 dimensions are required for input.\r\nDEBUG: [TRTorch - Debug Build] - Output tensor shape: []\r\nINFO: [TRTorch Conversion Context] - Adding Layer %11 : Tensor = aten::mean(%10, %7) # <ipython-input-76-8dff675398f2>:6:0 (ctx.AddLayer)\r\nDEBUG: [TRTorch Conversion Context] - Node input is an already converted tensor\r\nDEBUG: [TRTorch Conversion Context] - Node input is a result of a previously evaluated value\r\nERROR: [TRTorch Conversion Context] - %10 : Tensor = aten::_convolution(%input.1, %self.conv.weight, %self.conv.bias, %3, %2, %3, %5, %2, %6, %5, %5, %4) # /home/matthieu/anaconda3/envs/gym/lib/python3.7/site-packages/torch/nn/modules/conv.py:416:0: at least 4 dimensions are required for input.\r\nDEBUG: [TRTorch - Debug Build] - Frozen tensor shape: []\r\nERROR: [TRTorch Conversion Context] - %10 : Tensor = aten::_convolution(%input.1, %self.conv.weight, %self.conv.bias, %3, %2, %3, %5, %2, %6, %5, %5, %4) # /home/matthieu/anaconda3/envs/gym/lib/python3.7/site-packages/torch/nn/modules/conv.py:416:0: at least 4 dimensions are required for input.\r\nWARNING: [TRTorch - Debug Build] - Mean Converter disregards dtype\r\nERROR: [TRTorch Conversion Context] - %10 : Tensor = aten::_convolution(%input.1, %self.conv.weight, %self.conv.bias, %3, %2, %3, %5, %2, %6, %5, %5, %4) # /home/matthieu/anaconda3/envs/gym/lib/python3.7/site-packages/torch/nn/modules/conv.py:416:0: at least 4 dimensions are required for input.\r\nDEBUG: [TRTorch - Debug Build] - Output shape: []\r\nINFO: [TRTorch Conversion Context] - Marking Output 11 named output_0 in engine (ctx.MarkOutput)\r\nERROR: [TRTorch Conversion Context] - %10 : Tensor = aten::_convolution(%input.1, %self.conv.weight, %self.conv.bias, %3, %2, %3, %5, %2, %6, %5, %5, %4) # /home/matthieu/anaconda3/envs/gym/lib/python3.7/site-packages/torch/nn/modules/conv.py:416:0: at least 4 dimensions are required for input.\r\nERROR: [TRTorch Conversion Context] - %10 : Tensor = aten::_convolution(%input.1, %self.conv.weight, %self.conv.bias, %3, %2, %3, %5, %2, %6, %5, %5, %4) # /home/matthieu/anaconda3/envs/gym/lib/python3.7/site-packages/torch/nn/modules/conv.py:416:0: at least 4 dimensions are required for input.\r\nERROR: [TRTorch Conversion Context] - Layer %10 : Tensor = aten::_convolution(%input.1, %self.conv.weight, %self.conv.bias, %3, %2, %3, %5, %2, %6, %5, %5, %4) # /home/matthieu/anaconda3/envs/gym/lib/python3.7/site-packages/torch/nn/modules/conv.py:416:0 failed validation\r\nERROR: [TRTorch Conversion Context] - Network validation failed.\r\n```\r\n\r\nIs there another to specify the input size ? \r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):1.7.1\r\n - CPU Architecture:\r\n - OS (e.g., Linux):Ubuntu 18.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip \r\n - Build command you used (if compiling from source):bazel build //:libtrtorch --compilation_mode opt\r\n - Are you using local sources or building from archives:local sources\r\n - Python version:3.7.9\r\n - CUDA version:11.0\r\n - GPU models and configuration:2080 TI\r\n - Any other relevant information:Nvidia-driver : 450.51.05\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/344",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-02-17T14:59:17Z",
    "updated_at": "2021-02-17T17:36:29Z",
    "user": "MatthieuToulemont"
  },
  {
    "repo": "pytorch/vision",
    "number": 3406,
    "title": "RetinaNet: TypeError: __init__() got an unexpected keyword argument 'trainable_backbone_layers'",
    "body": "## \ud83d\udc1b Bug\r\n\r\n`retinanet_resnet50_fpn` throws an error while passing `trainable_backbone_layers` as an argument.\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n```python\r\nimport torchvision\r\nmodel = torchvision.models.detection.retinanet_resnet50_fpn(trainable_backbone_layers=2)\r\n```\r\n\r\n```\r\n~/gridai/venv/lib/python3.8/site-packages/torchvision/models/detection/retinanet.py in retinanet_resnet50_fpn(pretrained, progress, num_classes, pretrained_backbone, **kwargs)\r\n    620     backbone = resnet_fpn_backbone('resnet50', pretrained_backbone,\r\n    621                                    returned_layers=[2, 3, 4], extra_blocks=LastLevelP6P7(256, 256))\r\n--> 622     model = RetinaNet(backbone, num_classes, **kwargs)\r\n    623     if pretrained:\r\n    624         state_dict = load_state_dict_from_url(model_urls['retinanet_resnet50_fpn_coco'],\r\n\r\nTypeError: __init__() got an unexpected keyword argument 'trainable_backbone_layers'\r\n```\r\n\r\n## Expected behavior\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n## Environment\r\n\r\nPlease copy and paste the output from our\r\n[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)\r\n(or fill out the checklist below manually).\r\n\r\nYou can get the script and run it with:\r\n```\r\nwget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py\r\n# For security purposes, please check the contents of collect_env.py before running it.\r\npython collect_env.py\r\n```\r\n\r\n - PyTorch / torchvision Version (e.g., 1.0 / 0.4.0):\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch / torchvision (`conda`, `pip`, source):\r\n - Build command you used (if compiling from source):\r\n - Python version:\r\n - CUDA/cuDNN version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/vision/issues/3406",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-02-16T05:20:25Z",
    "updated_at": "2021-02-27T17:22:53Z",
    "user": "kaushikb11"
  },
  {
    "repo": "pytorch/vision",
    "number": 3397,
    "title": "Bug Report: No module named 'torchvision.models.mobilenetv2'",
    "body": "## \u2753 Questions and Help\r\n\r\nHi there, I encounter a bug when running this following line \r\n\r\n>>> import torch\r\n>>> res = torch.hub.load('pytorch/vision', 'resnet50')\r\n\r\nthe error is:\r\n\r\n-------------------------------------begin of error info---------------------------------\r\n\r\nUsing cache found in /root/.cache/torch/hub/pytorch_vision_master\r\n---------------------------------------------------------------------------\r\nModuleNotFoundError                       Traceback (most recent call last)\r\n<ipython-input-21-55b890d7b167> in <module>()\r\n      1 import torch\r\n----> 2 res = torch.hub.load('pytorch/vision', 'resnet50')\r\n      3 print(res)\r\n\r\n5 frames\r\n/root/.cache/torch/hub/pytorch_vision_master/hubconf.py in <module>()\r\n     12 from torchvision.models.googlenet import googlenet\r\n     13 from torchvision.models.shufflenetv2 import shufflenet_v2_x0_5, shufflenet_v2_x1_0\r\n---> 14 from torchvision.models.mobilenetv2 import mobilenet_v2\r\n     15 from torchvision.models.mobilenetv3 import mobilenet_v3_large, mobilenet_v3_small\r\n     16 from torchvision.models.mnasnet import mnasnet0_5, mnasnet0_75, mnasnet1_0, \\\r\n\r\nModuleNotFoundError: No module named 'torchvision.models.mobilenetv2'\r\n\r\n-----------------end of error info------------------------------------------------\r\nBTW, my environment is torch-1.7.1, torchvision-0.8.2, I also try to \r\npip install torchvision.models.mobilenetv2\r\nit turns out useless.\r\n\r\nGrateful to hear any suggestions!\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/3397",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-02-15T12:24:50Z",
    "updated_at": "2021-02-15T14:35:27Z",
    "user": "DemonsHunter"
  },
  {
    "repo": "pytorch/vision",
    "number": 3392,
    "title": "How to compile arbitrary nn modules with jit pytorch? ( RuntimeError: builtin cannot be used as a value, with a dict)",
    "body": "## \ud83d\udc1b Bug\r\n\r\nSimilar to https://github.com/pytorch/vision/issues/1675.\r\n\r\nSimple, I compare my value to a dict and it throws an error.\r\n\r\n```\r\n        \"\"\"\r\n        if type(json_data) is dict:\r\n                              ~~~~ <--- HERE\r\n```\r\n\r\n## To Reproduce\r\n\r\nSimple, any code that has a comparison with a dict:\r\n\r\n```\r\nclass Node(object):\r\n    def __init__(self):\r\n        pass\r\n\r\n    @classmethod\r\n    def from_json(cls, json_data):\r\n        if type(json_data) is dict:\r\n            node_data = next(iter(json_data))\r\n            assert type(json_data[node_data]) is list\r\n            node_children = [cls.from_json(child) for child in json_data[node_data]]\r\n            return Node(node_data, node_children)\r\n        else:\r\n            return Node(json_data)\r\n\r\n```\r\n\r\n## Expected behavior\r\n\r\nJit makes my checkpoint.\r\n\r\n## Environment\r\n\r\n - PyTorch / torchvision Version (e.g., 1.0 / 0.4.0): 1.7.1\r\n - OS (e.g., Linux): mac os x\r\n - How you installed PyTorch / torchvision (`conda`, `pip`, source): conda\r\n - Build command you used (if compiling from source): conda\r\n - Python version: 3.8\r\n - CUDA/cuDNN version: CPU\r\n - GPU models and configuration: CPU\r\n - Any other relevant information: CPU\r\n\r\n## Additional context\r\n\r\nCompiling arbitrary custom nn modules to jit\r\n\r\nerror:\r\n\r\n```\r\n/Users/brando/anaconda3/envs/coq_gym/bin/python /Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py --cmd-line --multiproc --qt-support=auto --client 127.0.0.1 --port 59213 --file /Users/brando/ML4Coq/playground/running_pytorch_ocaml/treenn2jit_ckpt.py\r\nConnected to pydev debugger (build 203.7148.72)\r\n1.7.1\r\nTraceback (most recent call last):\r\n  File \"/Users/brando/anaconda3/envs/coq_gym/lib/python3.7/site-packages/torch/jit/_recursive.py\", line 680, in compile_unbound_method\r\n    create_methods_and_properties_from_stubs(concrete_type, (stub,), ())\r\n  File \"/Users/brando/anaconda3/envs/coq_gym/lib/python3.7/site-packages/torch/jit/_recursive.py\", line 304, in create_methods_and_properties_from_stubs\r\n    concrete_type._create_methods_and_properties(property_defs, property_rcbs, method_defs, method_rcbs, method_defaults)\r\n  File \"/Users/brando/anaconda3/envs/coq_gym/lib/python3.7/site-packages/torch/jit/annotations.py\", line 330, in try_ann_to_type\r\n    torch.jit._script._recursive_compile_class(ann, loc)\r\n  File \"/Users/brando/anaconda3/envs/coq_gym/lib/python3.7/site-packages/torch/jit/_script.py\", line 1056, in _recursive_compile_class\r\n    _compile_and_register_class(obj, rcb, _qual_name)\r\n  File \"/Users/brando/anaconda3/envs/coq_gym/lib/python3.7/site-packages/torch/jit/_script.py\", line 64, in _compile_and_register_class\r\n    torch._C._jit_script_class_compile(qualified_name, ast, defaults, rcb)\r\nRuntimeError: \r\nbuiltin cannot be used as a value:\r\n  File \"/Users/brando/ML4Coq/ml4coq-proj/embeddings_zoo/extract_tactic_from_lasse_data.py\", line 56\r\n            term = string\r\n        \"\"\"\r\n        if type(json_data) is dict:\r\n                              ~~~~ <--- HERE\r\n            node_data = next(iter(json_data))\r\n            assert type(json_data[node_data]) is list\r\n'Node.from_json' is being compiled since it was called from '__torch__.embeddings_zoo.extract_tactic_from_lasse_data.Node'\r\n```\r\n\r\nhttps://stackoverflow.com/questions/66179121/how-to-fix-the-runtimeerror-builtin-cannot-be-used-as-a-value-with-a-dict-whe",
    "url": "https://github.com/pytorch/vision/issues/3392",
    "state": "closed",
    "labels": [
      "invalid"
    ],
    "created_at": "2021-02-12T21:11:15Z",
    "updated_at": "2021-02-17T16:29:07Z",
    "user": "brando90"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 753,
    "title": "What is 'sentence_embedding' of a Sentence Transformer Model?",
    "body": "Hey, I try to understand where this comes from. It is just mentioned here  [link](https://github.com/UKPLab/sentence-transformers/blob/9932965c92a06835eda255dac7eacd53f48c5cd7/sentence_transformers/SentenceTransformer.py#L144)\r\n\r\nBut seems not be used anywhere than. Because this feature is used in the losses like OnlineContrastive. I don't hink it comes from the huggingface model?\r\n\r\nTo which forward is this [here ](https://github.com/UKPLab/sentence-transformers/blob/9932965c92a06835eda255dac7eacd53f48c5cd7/sentence_transformers/SentenceTransformer.py#L181)referring to? \r\n\r\nI also wonder what this _modules is like [here](https://github.com/UKPLab/sentence-transformers/blob/9932965c92a06835eda255dac7eacd53f48c5cd7/sentence_transformers/SentenceTransformer.py#L338).\r\n\r\nWhy is this not in the init?\r\n\r\nThanks. :-)\r\n",
    "url": "https://github.com/huggingface/sentence-transformers/issues/753",
    "state": "open",
    "labels": [],
    "created_at": "2021-02-11T20:48:07Z",
    "updated_at": "2021-02-12T14:03:59Z",
    "user": "PaulForInvent"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 52147,
    "title": "Pointer passed where number is expected for PYTORCH_CUDA_FUSER_JIT_OPT_LEVEL leading to crash",
    "body": "## \ud83d\udc1b Bug\r\n\r\nThe CUDA API expects a `void**` for option values for functions like `cuModuleLoadDataEx`. The documentation seems to be unclear, what that should be but according to other sources (see below) that value should be simply the value casted to a `void*`, not a pointer to that value.\r\nHence the code at https://github.com/pytorch/pytorch/blob/7763c127cd5630ba4123ad89fc5243c28e91aa4a/torch/csrc/jit/codegen/cuda/executor_utils.cpp#L320 is wrong and may lead to failed executions or wrong optimization levels.\r\n\r\nI've seen this in one of the PyTorch tests (see below) where I get:\r\n```\r\n======================================================================\r\nERROR: test_unary_ops (test_jit_cuda_fuser.TestCudaFuser)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/tmp/install_pt/lib/python3.8/site-packages/torch/testing/_internal/common_utils.py\", line 827, in wrapper\r\n    method(*args, **kwargs)\r\n  File \"/dev/shm/s3248973-EasyBuild/PyTorch/1.7.1/fosscuda-2020b/pytorch-1.7.1/test/test_jit_cuda_fuser.py\", line 369, in test_unary_ops\r\n    self._unary_test_helper(op)\r\n  File \"/dev/shm/s3248973-EasyBuild/PyTorch/1.7.1/fosscuda-2020b/pytorch-1.7.1/test/test_jit_cuda_fuser.py\", line 328, in _unary_test_helper\r\n    jit_o = t_jit(x, 2.0)\r\n  File \"/tmp/install_pt/lib/python3.8/site-packages/torch/testing/_internal/common_utils.py\", line 126, in prof_func_call\r\n    return prof_callable(func_call, *args, **kwargs)\r\n  File \"/tmp/install_pt/lib/python3.8/site-packages/torch/testing/_internal/common_utils.py\", line 123, in prof_callable\r\n    return callable(*args, **kwargs)\r\nRuntimeError: The following operation failed in the TorchScript interpreter2.\r\nTraceback of TorchScript (most recent call last):\r\nRuntimeError: CUDA driver error: a PTX JIT compilation failed\r\n```\r\n\r\nAnd to verify I added the following code to torch/csrc/jit/codegen/cuda/executor_utils.cpp above the call to `cuModuleLoadDataEx`:\r\n```\r\n  options.push_back(CU_JIT_ERROR_LOG_BUFFER);\r\n  options.push_back(CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES);\r\n  std::string errors(8000, '\\0');\r\n  option_vals.push_back((void*) errors.data());\r\n  option_vals.push_back((void*) errors.size());\r\n```\r\n\r\nWhen printing this string on failure I got: \r\n> ptxas fatal   : 32-bit integer value (3849789140) out of range\r\n\r\nThis is exactly the pointer to `jit_opt_level` which confirms the above.\r\n\r\nPS: It is likely a good idea to include the JIT error buffer in PyTorch and report it on failure.\r\n\r\nReferences:\r\n- https://stackoverflow.com/a/17070844/1930508\r\n- https://github.com/HongjianLi/cuda/blob/dd52fd563558667315de3fecea3559ac6ba2a89a/vectorAdd/vectorAdd.cpp#L74\r\n- https://github.com/MentorEmbedded/nvptx-tools/blob/59e0b755e3ab085a3a348bd001bad4f010fd9c00/nvptx-run.c#L77-L88\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. `python test_jit_cuda_fuser_legacy.py -k test_unary_ops`\r\n\r\n## Environment\r\n\r\n - PyTorch Version (e.g., 1.0): 1.7.1, master\r\n\n\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/52147",
    "state": "open",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2021-02-11T17:04:53Z",
    "updated_at": "2021-02-11T17:44:14Z",
    "user": "Flamefire"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 338,
    "title": "\u2753 [Question] What is the correct way to create a trtorch::CompileSpec for a single input? ",
    "body": "## \u2753 Question\r\n\r\nMy network has a single input of the following shape [1, 3, 224, 224]. I a trying to create the trtorch::CompileSpec as follows\r\n`auto compile_settings = trtorch::CompileSpec({1, 3, 224, 224});` however I am getting the following output\r\n\r\n````\r\nterminate called after throwing an instance of 'trtorch::Error'\r\n  what():  [enforce fail at core/conversion/conversion.cpp:135] Expected input_tensors.size() == input_dims.size() to be true but got false\r\nExpected dimension specifications for all input tensors, but found 1 input tensors and 4 dimension specs (conversion.AddInputs)\r\n````\r\nI am wondering whether the constructor is a vector of input shapes? If so, doing \r\n\r\n````\r\nstd::vector<std::vector<int64_t>> input_dims = {{1, 3, 224, 224}};\r\nauto compile_settings = trtorch::CompileSpec(input_dims);\r\n````\r\ngives the following error\r\n\r\n````\r\nERROR: [TRTorch] - Requested converter for aten::adaptive_max_pool2d, but no such converter was found\r\nterminate called after throwing an instance of 'trtorch::Error'\r\n  what():  [enforce fail at core/conversion/conversion.cpp:108] Expected converter to be true but got false\r\nUnable to convert node: %512 : Tensor, %513 : Tensor = aten::adaptive_max_pool2d(%511, %7) # /home/federico/.local/lib/python3.8/site-packages/torch/nn/functional.py:844:0 (conversion.AddLayer)\r\nSchema: aten::adaptive_max_pool2d(Tensor self, int[2] output_size) -> (Tensor, Tensor)\r\nConverter for aten::adaptive_max_pool2d requested, but no such converter was found.\r\nIf you need a converter for this operator, you can try implementing one yourself\r\nor request a converter: https://www.github.com/NVIDIA/TRTorch/issues\r\n````\r\n\r\nSo my question is, which approach is the correct one. If the second is, I can try to implement the converter myself but I want to be sure what has to be passed to create a correct `CompileSpec`.\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.7.1\r\n - CPU Architecture: amd64\r\n - OS (e.g., Linux): Ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source): `LD_LIBRARY_PATH=$(pwd)/bazel-TRTorch/external/libtorch/lib/:$(pwd)/bazel-TRTorch/external/cudnn/lib64/:$(pwd)/bazel-TRTorch/external/tensorrt/lib/:/usr/local/cuda/lib64/:$LD_LIBRARY_PATH bazel run //adv_test:adv_trtorch -c opt --jobs=3 --distdir third_party/dist_dir/x86_64-linux-gnu/`\r\n - Are you using local sources or building from archives: archives\r\n - Python version: 3.8\r\n - CUDA version: 11.0\r\n - GPU models and configuration: GTX 1050\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/338",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-02-10T14:23:19Z",
    "updated_at": "2021-02-11T08:04:42Z",
    "user": "federicohml"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1354,
    "title": "Tensors tutorial broken?",
    "body": "It looks like a lot of content is missing from this tutorial: https://pytorch.org/tutorials/beginner/blitz/tensor_tutorial.html#sphx-glr-beginner-blitz-tensor-tutorial-py.",
    "url": "https://github.com/pytorch/tutorials/issues/1354",
    "state": "closed",
    "labels": [],
    "created_at": "2021-02-10T09:58:54Z",
    "updated_at": "2021-02-12T07:20:38Z",
    "comments": 2,
    "user": "Attila94"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 337,
    "title": "\u2753 [Question] Why bazel is not able to find libcudart-xxxxxxx.so.11.0? ",
    "body": "## \u2753 Question\r\n\r\nI cloned TRTorch repo and try to play with it with a sample code. I created a folder for this playground in the root path (next to WORKSPACE), add the corresponding `BUILD` and `cpp` files. However when executing `bazel build //adv_test:adv_torchscript --distdir third_party/dist_dir/x86_64-linux-gnu/` I get the following error `execroot/TRTorch/bazel-out/k8-fastbuild/bin/adv_test/adv_torchscript: error while loading shared libraries: libcudart-3f3c6934.so.11.0: cannot open shared object file: No such file or directory`\r\n\r\nThe BUILD file looks like\r\n\r\n```\r\ncc_binary(\r\n    name = \"adv_torchscript\",\r\n    srcs = [\"adv_torchscript.cc\"],\r\n    deps = [\r\n        \"@cuda\",\r\n        \"@libtorch\",\r\n        \"@libtorch//:caffe2\",\r\n    ],\r\n)\r\n````\r\nThe cpp file looks like\r\n````\r\n#include <torch/script.h>\r\n// #include <trtorch/trtorch.h>\r\n\r\n// #include <chrono>\r\n#include <iostream>\r\n#include <string>\r\n\r\n// https://gist.github.com/zeryx/526dbc05479e166ca7d512a670e6b82d\r\n// https://github.com/pytorch/vision/issues/2691\r\n\r\nint main(int argc, char** argv) {\r\n  const std::string model_file = \"./my_net_torch_script.pt\";\r\n  const std::string img_file = \"./test_img.jpg\";\r\n  const float num_iterations = 1000.F;\r\n\r\n  bool use_gpu = false;\r\n  if (argc == 2) {\r\n    use_gpu = std::atoi(argv[1]) ? true : false;\r\n  }\r\n\r\n  std::cout << \"Device set to \" << ((use_gpu) ? \"GPU\" : \"CPU\") << std::endl;\r\n\r\n  std::cout << \"Loading TorchScript Model\";\r\n  torch::jit::script::Module ts_module;\r\n  if (use_gpu) {\r\n    ts_module = torch::jit::load(model_file, torch::kCUDA);\r\n  } else {\r\n    ts_module = torch::jit::load(model_file);\r\n  }\r\n  std::cout << \" ... OK\" << std::endl;\r\n  return 0;\r\n}\r\n````\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture: amd64\r\n - OS (e.g., Linux): Ubuntu 20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source): bazel build //adv_test:adv_torchscript --distdir third_party/dist_dir/x86_64-linux-gnu/\r\n - Are you using local sources or building from archives: archives\r\n - Python version: 3.8\r\n - CUDA version: 11.2\r\n - GPU models and configuration: GTX 1050\r\n - Any other relevant information: I updated the relevant parts of WORKSPACE to use the latest and greatest of CUDNN and TensorRT, i.e. URL and sha256sum.\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/337",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-02-09T16:33:25Z",
    "updated_at": "2021-02-09T21:34:10Z",
    "user": "federicohml"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 335,
    "title": "\u2753 [Question] Typo in \"/py/README.md\"",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\nThere are typo in example in \"/py/README.md\"\r\n\r\n## Example Usage\r\n\r\n``` python\r\nimport torch\r\nimport torchvision\r\nimport trtorch\r\n\r\n# Get a model\r\nmodel = torchvision.models.alexnet(pretrained=True).eval().cuda()\r\n\r\n# Create some example data\r\ndata = torch.randn((1, 3, 224, 224)).to(\"cuda\")\r\n\r\n# Trace the module with example data\r\ntraced_model = torch.jit.trace(model, [data])\r\n\r\n# Compile module\r\ncompiled_trt_model = trtorch.compile(model, {\r\n    \"input_shapes\": [data.shape],\r\n    \"op_precision\": torch.half, # Run in FP16\r\n})\r\n\r\nresults = compiled_trt_model(data.half())\r\n```\r\n\r\n\r\n```\r\n# Compile module\r\ncompiled_trt_model = trtorch.compile(model, {\r\n    \"input_shapes\": [data.shape],\r\n    \"op_precision\": torch.half, # Run in FP16\r\n})\r\n```\r\nThe above code should be fixed like the below code.\r\n\r\n```\r\n# Compile module\r\ncompiled_trt_model = trtorch.compile(traced_model , {\r\n    \"input_shapes\": [data.shape],\r\n    \"op_precision\": torch.half, # Run in FP16\r\n})\r\n```\r\n\r\n## What you have already tried\r\n\r\nI fixed typo, and requested pull request.\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture:\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/335",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-02-09T07:43:17Z",
    "updated_at": "2021-02-09T23:57:31Z",
    "user": "developer0hye"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 334,
    "title": "\u2753 [Question] Typo in \"core/conversion/conversionctx/ConversionCtx.cpp \"",
    "body": "## \u2753 Question\r\n\r\n<!-- Your question -->\r\n\r\nThere are typo in \"core/conversion/conversionctx/ConversionCtx.cpp \"\r\n\r\nhttps://github.com/NVIDIA/TRTorch/blob/6442fce997e1506d859fab789527fe1e282f683f/core/conversion/conversionctx/ConversionCtx.cpp#L57-L62\r\n\r\nIs this typo, right?\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\nI requested [Pull requests](https://github.com/NVIDIA/TRTorch/pull/333).\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - CPU Architecture:\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source):\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version:\r\n - CUDA version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/334",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-02-09T07:36:32Z",
    "updated_at": "2021-02-09T23:57:40Z",
    "user": "developer0hye"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 51859,
    "title": "Need help when using torch jit with an thread pool. (how to use at::set_num_threads correctly)",
    "body": "Hi, I'm trying to using an thread pool with size N to manage N torch::jit::Module instances, and I want assign one thread to each individual torch::jit::Modules. I'm currently wrapping one torch::jit::Module with a wrapper class, and in the constructor I call at::set_num_threads(1) and at::set_num_interop_threads(1), but it seems not behaving as expected (there being only one working thread doing inference at any time, but not N threads). How should I call at::set_num_threads and at::set_num_interop_threads in my program ?   Thanks for attention.\r\n\r\nIn short, how can I restrict one torch::jit::Module doing inference with only one working thread, while controlling the concurrency of different inferences by an existing thread pool ?\r\n\r\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/51859",
    "state": "closed",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2021-02-07T13:09:51Z",
    "updated_at": "2021-02-12T08:23:52Z",
    "user": "w1d2s"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 326,
    "title": "\u2753 [Question] Is there a way to do multithreaded half-precision compilation?",
    "body": "## \u2753 Question\r\n\r\nI want to compile a Torch script in a different thread than the main thread in a C++ program. However, doing so with half precision for large networks will result in a Segmentation fault.\r\n\r\nHere's a program that extracts what I want to do:\r\nhttps://github.com/SakodaShintaro/trtorch-test/blob/master/main.cpp\r\n\r\n```cpp\r\n#include <torch/script.h>\r\n#include <trtorch/trtorch.h>\r\nusing namespace std;\r\n\r\nvoid compile(bool fp16) {\r\n  constexpr int64_t INPUT_CHANNEL_NUM = 256;\r\n  constexpr int64_t WIDTH = 32;\r\n  torch::jit::Module module = torch::jit::load(\"model.ts\");\r\n  if (fp16) {\r\n    module.to(torch::kCUDA, torch::kHalf);\r\n  } else {\r\n    module.to(torch::kCUDA);\r\n  }\r\n  module.eval();\r\n\r\n  std::vector<int64_t> in_sizes = {1, INPUT_CHANNEL_NUM, WIDTH, WIDTH};\r\n  trtorch::CompileSpec::InputRange range(in_sizes);\r\n  trtorch::CompileSpec info({range});\r\n  if (fp16) {\r\n    info.op_precision = torch::kHalf;\r\n  }\r\n  module = trtorch::CompileGraph(module, info);\r\n}\r\n\r\nint main() {\r\n  // fp32, this thread -> OK\r\n  compile(false);\r\n  cout << \"fp32, this thread -> finish\" << endl;\r\n\r\n  // fp32, another thread -> OK\r\n  std::thread thread0([]() { compile(false); });\r\n  thread0.join();\r\n  cout << \"fp32, another thread -> finish\" << endl;\r\n\r\n  // fp16, this thread -> OK\r\n  compile(true);\r\n  cout << \"fp16, this thread -> finish\" << endl;\r\n\r\n  // fp16, another thread -> NG\r\n  std::thread thread1([]() { compile(true); });\r\n  thread1.join();\r\n  cout << \"fp16, another thread -> finish\" << endl;\r\n}\r\n```\r\n\r\n result\r\n\r\n```\r\nfp32, this thread -> finish\r\nfp32, another thread -> finish\r\nfp16, this thread -> finish\r\nSegmentation fault (core dumped)\r\n```\r\n\r\n Is there anything wrong with my code?\r\n\r\n## Environment\r\n I used a Dockerfile I made.\r\nhttps://github.com/SakodaShintaro/trtorch-test/blob/master/docker/Dockerfile\r\n\r\nIf I create a container with this image and execute `./Test`, a Segmentation fault will occur on the 4th line.\r\n\r\nIn `trtorch-test/docker`,\r\n\r\n```\r\ndocker build -t trtorch_test_image .\r\ndocker run --gpus all -it --name trtorch_test_container trtorch_test_image:latest bash\r\n./Test\r\n```\r\n\r\nI sometimes succeed in it, so try it a few times if you want to reproduce it.\r\n\r\n - PyTorch Version (e.g., 1.0): 1.7\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Ubuntu 20.04 (on Docker)\r\n - Build command you used (if compiling from source): bazel build //:libtrtorch --compilation_mode opt\r\n - CUDA version: 11.0\r\n - GPU models and configuration: RTX 2080ti\r\n - Nvidia driver version : 460",
    "url": "https://github.com/pytorch/TensorRT/issues/326",
    "state": "closed",
    "labels": [
      "bug",
      "question",
      "bug: triaged [verified]"
    ],
    "created_at": "2021-02-05T08:50:21Z",
    "updated_at": "2021-02-26T02:18:13Z",
    "user": "SakodaShintaro"
  },
  {
    "repo": "pytorch/examples",
    "number": 885,
    "title": "DDP on GPUs invalid ordinal",
    "body": "there is a node with 8 gpus\uff0cand I can't train my model on any 4 of the gpus, except gpu-id is 0,1,2,3.\r\nhow can I use any permutation and combination of the 8 gpus? Thanks \r\n\r\n`-- Process 2 terminated with the following error:\r\nTraceback (most recent call last):\r\n  File \"/home/lab-chen.qi/anaconda3/envs/torch17/lib/python3.7/site-packages/torch/multiprocessing/spawn.py\", line 19, in _wrap\r\n    fn(i, *args)\r\n  File \"/home/lab-chen.qi/sc/resweightv1/tiny_imagenet_multi.py\", line 223, in main_worker\r\n    torch.cuda.set_device(gpu)\r\n  File \"/home/lab-chen.qi/anaconda3/envs/torch17/lib/python3.7/site-packages/torch/cuda/__init__.py\", line 263, in set_device\r\n    torch._C._cuda_setDevice(device)\r\nRuntimeError: CUDA error: invalid device ordinal`\r\n\r\n\r\nsome of my code\r\n\r\n```\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.distributed as dist\r\nimport torch.utils.data.distributed\r\nimport torch.multiprocessing as mp\r\nimport argparse\r\nimport os\r\n\r\n\r\n\r\nparser = argparse.ArgumentParser(description = 'multi process')\r\n\r\nparser.add_argument('--gpu-id',type =str,default='0,1,2,4')\r\nparser.add_argument('--world-size', default=1, type=int,\r\n                    help='number of nodes for distributed training')\r\nparser.add_argument('--rank', default=0, type=int,\r\n                    help='node rank for distributed training')\r\nparser.add_argument('--dist-url', default='tcp://localhost:23456', type=str,\r\n                    help='url used to set up distributed training')\r\nparser.add_argument('--dist-backend', default='nccl', type=str,\r\n                    help='distributed backend')\r\nargs = parser.parse_args()\r\n\r\n\r\n\r\n\r\n\r\n\r\ndef  main():\r\n    global args\r\n\r\n\r\n    os.environ['CUDA_VISIBLE_DEVICES'] = args.gpu_id\r\n    # args.gpu = list(map(int,args.gpu_id.split(',')))\r\n\r\n    # state = {k: v for k, v in args._get_kwargs()}\r\n\r\n    # ngpus_per_node = torch.cuda.device_count() #len(args.gpu)\r\n\r\n    ngpus_per_node = args.gpu_id.split(',').__len__()\r\n    # print(os.environ['CUDA_VISIBLE_DEVICES'])\r\n    # print('\u80fd\u770b\u5230\u7684gpu',ngpus_per_node)\r\n    args.nprocs = ngpus_per_node\r\n    args.world_size = ngpus_per_node * args.world_size\r\n    mp.spawn(main_worker, nprocs=ngpus_per_node, args=(ngpus_per_node, args))\r\n\r\n\r\n# Random seed\r\n\r\n# best_acc = 0  # best test accuracy\r\n\r\ndef main_worker(local_rank,ngpus_per_node,args):\r\n    # global best_acc\r\n # start from epoch 0 or last checkpoint epoch\r\n\r\n    # if not os.path.isdir(args.checkpoint):\r\n    #     mkdir_p(args.checkpoint)\r\n    # # import pdb\r\n    # pdb.set_trace()\r\n    gpus = os.environ['CUDA_VISIBLE_DEVICES'].split(',')\r\n    gpu = int(gpus[local_rank])\r\n\r\n    args.gpu = gpu\r\n    best_acc = 0\r\n    # print(best_acc)\r\n    args.rank = args.rank * ngpus_per_node + local_rank#args.gpu[gpu]\r\n    print('rank: {} / {}'.format(args.rank, args.world_size))\r\n\r\n    dist.init_process_group(backend=args.dist_backend,\r\n                            init_method=args.dist_url,\r\n                            world_size=args.world_size,\r\n                            rank=args.rank)\r\n\r\n\r\n\r\n    torch.cuda.set_device(gpu)\r\n\r\n\r\nif __name__ == '__main__':\r\n    main()`\r\n```\r\n\r\n\r\nI try this, but it doesn't work [https://github.com/PyTorchLightning/pytorch-lightning/issues/3791](https://github.com/PyTorchLightning/pytorch-lightning/issues/3791)\r\n\r\n",
    "url": "https://github.com/pytorch/examples/issues/885",
    "state": "open",
    "labels": [
      "distributed"
    ],
    "created_at": "2021-02-05T02:40:06Z",
    "updated_at": "2023-03-31T08:30:25Z",
    "comments": 1,
    "user": "ccijunk"
  },
  {
    "repo": "pytorch/serve",
    "number": 965,
    "title": "How to change loadedAtStartup to be true while registering a model?",
    "body": "## \ud83d\udcda Documentation\r\n\r\n<!-- A clear and concise description of what content in https://pytorch.org/serve/ is an issue. If this has to do with the general https://pytorch.org website, please file an issue at https://github.com/pytorch/pytorch.github.io/issues/new/choose instead. If this has to do with https://pytorch.org/tutorials, please file an issue at https://github.com/pytorch/tutorials/issues/new -->\r\n\r\nWhen a model is registered loadedAtStartup is false by default. Is this option related to model pre-load? Is the model supposed to be loaded all time if this is set to be true? And how exactly do we change it while registering a model? Thank you in advance.\r\n",
    "url": "https://github.com/pytorch/serve/issues/965",
    "state": "closed",
    "labels": [
      "triaged_wait"
    ],
    "created_at": "2021-02-05T01:58:37Z",
    "updated_at": "2021-05-13T17:41:39Z",
    "user": "wangs0007"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 51712,
    "title": "UserWarning: The epoch parameter in `scheduler.step()` was not necessary and is being deprecated where possible. Please use `scheduler.step()`",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1.\r\n1.\r\n1.\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n## Environment\r\n\r\nPlease copy and paste the output from our\r\n[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)\r\n(or fill out the checklist below manually).\r\n\r\nYou can get the script and run it with:\r\n```\r\nwget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py\r\n# For security purposes, please check the contents of collect_env.py before running it.\r\npython collect_env.py\r\n```\r\n\r\n - PyTorch Version (e.g., 1.0):\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch (`conda`, `pip`, source):\r\n - Build command you used (if compiling from source):\r\n - Python version:\r\n - CUDA/cuDNN version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/51712",
    "state": "closed",
    "labels": [],
    "created_at": "2021-02-04T08:03:59Z",
    "updated_at": "2021-02-04T15:52:25Z",
    "user": "vkl-git"
  },
  {
    "repo": "huggingface/transformers",
    "number": 9961,
    "title": "What is the correct way to use Adafactor?",
    "body": "Hi, from the papers I've seen that Adafactor is typically used with no learning rate (as in Pegasus paper), however, when I try to execute run_seq2seq.py or seq2seq/finetune_trainer.py from your examples, and set --adafactor parameter, without specifying learning rate (for no learning rate), it uses the default 3e-05. Is there a way to use Adafactor without learning rate?",
    "url": "https://github.com/huggingface/transformers/issues/9961",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2021-02-02T15:42:08Z",
    "updated_at": "2021-03-06T00:12:07Z",
    "user": "avacaondata"
  },
  {
    "repo": "huggingface/datasets",
    "number": 1808,
    "title": "writing Datasets in a human readable format",
    "body": "Hi\r\nI see there is a save_to_disk function to save data, but this is not human readable format, is there a way I could save a Dataset object in a human readable  format to a file like json? thanks @lhoestq ",
    "url": "https://github.com/huggingface/datasets/issues/1808",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2021-02-02T02:55:40Z",
    "updated_at": "2022-06-01T15:38:13Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 51431,
    "title": "torch.where dtype inference is not smart",
    "body": "## \ud83d\udc1b Bug\r\n\r\n\r\nIf we call `torch.where(mask, float_py_scalar, int_py_scalar)`, the dtype inference will error, but it should use floating type.\r\n\r\n```py\r\nIn [198]: torch.__version__\r\nOut[198]: '1.7.0'\r\n\r\nIn [199]: x = torch.randn(3)\r\n\r\nIn [200]: x\r\nOut[200]: tensor([0.1649, 2.0497, 1.2026])\r\n\r\nIn [201]: torch.where(x > 1, 1.0, 0.0)\r\nOut[201]: tensor([0., 1., 1.])\r\n\r\nIn [202]: torch.where(x > 1, 1.0, 0)\r\n---------------------------------------------------------------------------\r\nRuntimeError                              Traceback (most recent call last)\r\n<ipython-input-202-d99e0dfc5858> in <module>\r\n----> 1 torch.where(x > 1, 1.0, 0)\r\n\r\nRuntimeError: expected scalar type float but found long long\r\n\r\nIn [203]: torch.where(x > 1, 1, 0)\r\nOut[203]: tensor([0, 1, 1])\r\n\r\n```\r\n\r\nWhile one may argue for this error because `int64` and `float32` are not fully compatible, we also support \r\n1. `float32_tensor.add(1)` \r\n2. \r\n    ```py\r\n    In [211]: torch.where(x > 0, 1.0, 0.0)\r\n    Out[211]: tensor([1., 1., 1.])\r\n    \r\n    In [212]: torch.where(x > 0, 1.0, 0.0).dtype\r\n    Out[212]: torch.float32\r\n    ```\r\n    Note how we don't use float64 either.\r\n\r\nso I don't think it should be a problem. \r\n\r\nSimilarly, these errors are also quite annoying\r\n\r\n```py\r\nIn [204]: torch.where(x > 1, x, 0)\r\n---------------------------------------------------------------------------\r\nRuntimeError                              Traceback (most recent call last)\r\n<ipython-input-204-c1551b46bfbc> in <module>\r\n----> 1 torch.where(x > 1, x, 0)\r\n\r\nRuntimeError: expected scalar type float but found long long\r\n\r\nIn [205]: torch.where(x > 1, x, 0.)\r\n---------------------------------------------------------------------------\r\nRuntimeError                              Traceback (most recent call last)\r\n<ipython-input-205-b52b9d3df92f> in <module>\r\n----> 1 torch.where(x > 1, x, 0.)\r\n\r\nRuntimeError: expected scalar type float but found double\r\n```\n\ncc @heitorschueroff",
    "url": "https://github.com/pytorch/pytorch/issues/51431",
    "state": "closed",
    "labels": [
      "triaged",
      "module: sorting and selection",
      "function request"
    ],
    "created_at": "2021-01-31T17:00:30Z",
    "updated_at": "2021-02-03T17:33:05Z",
    "user": "ssnl"
  },
  {
    "repo": "pytorch/examples",
    "number": 880,
    "title": "How to run",
    "body": "",
    "url": "https://github.com/pytorch/examples/issues/880",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-31T08:26:07Z",
    "updated_at": "2022-03-09T19:59:23Z",
    "user": "1158481739"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 305,
    "title": "aten::view error",
    "body": "## \u2753 Question\r\n\r\nDuring conversion, it seems like I found an incomplete support of the torch.view function:\r\n\r\nError as follows:\r\n`at most one dimension may be inferred`\r\n\r\nThe function it is trying to convert is this:\r\n\r\n`out.view(out.shape[0], -1, 4)`\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/305",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2021-01-29T21:31:49Z",
    "updated_at": "2021-05-11T00:06:59Z",
    "user": "rafale77"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 51345,
    "title": "how to convert torch::conv2d return value(tensor) to cv::mat",
    "body": "I run the following program:\r\n\r\nread a picture of 3 channel input torch::nn::conv2d(3,3,3).pad(1).stride(1),then I got the results:\r\n![results](https://user-images.githubusercontent.com/8663412/106253310-463a5380-6252-11eb-9fb9-07ac33ee8d37.png)\r\ncode:\r\n\r\n```\r\ncv::Mat img = cv::imread(\"babyx2.png\", 1);\r\ntorch::Tensor img_tensor = torch::from_blob(img.data, { img.rows, img.cols, 3 }, torch::kByte);\r\nimg_tensor = img_tensor.permute({ 2, 0, 1 }); \r\nimg_tensor = img_tensor.unsqueeze(0);\r\nimg_tensor = img_tensor.to(kFloat32);\r\ntorch::Tensor result = C1(img_tensor);       //C1: torch::nn::Conv2d(torch::nn::Conv2dOptions(3, 3, 5).padding(1))\r\n.....then get the result use following method\r\nauto ToCvImage(at::Tensor tensor)\r\n{\r\n\tint width = tensor.sizes()[0];\r\n\tint height = tensor.sizes()[1];\r\n\t//auto sizes = tensor.sizes();\r\n\ttry\r\n\t{\r\n\t\tcv::Mat output_mat(cv::Size{ height, width }, CV_8UC3, tensor.data_ptr<uchar>());\r\n\r\n\t\treturn output_mat.clone();\r\n\t}\r\n\tcatch (const c10::Error& e)\r\n\t{\r\n\t\tstd::cout << \"an error has occured : \" << e.msg() << std::endl;\r\n\t}\r\n\treturn cv::Mat(height, width, CV_8UC3);\r\n}\r\n```\r\n\r\nwhat happen????? ",
    "url": "https://github.com/pytorch/pytorch/issues/51345",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-29T08:58:10Z",
    "updated_at": "2021-01-29T16:20:09Z",
    "user": "yzqxmu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 51339,
    "title": "gcc 4.8.5 -std=11  how to build pytorch1.7",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\r\ni want to use gcc4.8.5 to make pytorch1.7 code \r\nWhat should i do on torch1.7.\r\n\r\non torch1.2 usr gcc4.8.5 is ok! but torch 1.7 is  bad!\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/51339",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-29T07:55:01Z",
    "updated_at": "2021-01-30T03:39:58Z",
    "user": "joinhe"
  },
  {
    "repo": "pytorch/vision",
    "number": 3322,
    "title": "a question about  segmentation model loading",
    "body": "## \u2753 Questions and Help\r\nWhy they are different\uff1f\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n![image](https://user-images.githubusercontent.com/32593161/106227085-8d5d2000-6223-11eb-9c66-fcb037faac92.png)\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\n\ncc @vfdev-5",
    "url": "https://github.com/pytorch/vision/issues/3322",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: semantic segmentation"
    ],
    "created_at": "2021-01-29T03:19:01Z",
    "updated_at": "2021-01-29T13:45:39Z",
    "user": "njzyxiong"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 51320,
    "title": "Pytorch not working properly (I don't know how to summarize it, see below)",
    "body": "When I have a pytorch model, I sometimes would like to extract the features before the final softmax layers or such. Here, I have a model trained and loaded from a pickle:\r\n\r\n```\r\ndef build_model():\r\n    model = resnet18(pretrained=True)\r\n  \r\n    n_features = model.fc.in_features\r\n    n_hidden = 100\r\n    model.fc = torch.nn.Sequential(\r\n        torch.nn.Linear(n_features, n_hidden),\r\n        torch.nn.ReLU(),\r\n        torch.nn.Linear(n_hidden, 2)\r\n    )\r\n    \r\n    model.to(device)\r\n    return model\r\n\r\nmodel = build_model()\r\nmodel.load_state_dict(torch.load('./model.pickle'))\r\nmodel.eval()\r\n```\r\n\r\nThen, I would suppose that the model can be rebuild from it's children:\r\n\r\n```\r\nmodules = list(model.children())\r\nencoder = nn.Sequential(*modules)\r\n```\r\n\r\nHowever, given a test tensor:\r\n\r\n```\r\n>>> x_test.shape\r\ntorch.Size([100, 3, 128, 128])\r\n```\r\n\r\nmodel(x_test) produces an output normaly, but encoder(x_test) gives RuntimeError: mat1 dim 1 must match mat2 dim 0. I don't have any idea on how to investigate it further. The error messages are quite poor. The documentation is also EXTREMELY poor and doesn't specify at all the interface of the torchvision models (for example. the \".children\" method came from a forum, because it doesn't appear anywhere in the documentation, which is insane).\n\ncc @albanD @mruberry @jbschlosser",
    "url": "https://github.com/pytorch/pytorch/issues/51320",
    "state": "open",
    "labels": [
      "module: nn",
      "triaged"
    ],
    "created_at": "2021-01-29T00:17:31Z",
    "updated_at": "2021-02-08T23:52:23Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/transformers",
    "number": 9867,
    "title": "where is position_embedding_type used",
    "body": "When I was using pytorch Electra Model, I read its source code but I didn't find where position_embedding_type is used.\r\nSo did I miss something?",
    "url": "https://github.com/huggingface/transformers/issues/9867",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-28T08:29:08Z",
    "updated_at": "2021-01-29T02:00:07Z",
    "user": "awdrgyjilplij"
  },
  {
    "repo": "huggingface/datasets",
    "number": 1786,
    "title": "How to use split dataset ",
    "body": "![Capture1](https://user-images.githubusercontent.com/78090287/106057436-cb6a1f00-6111-11eb-8c9c-3658065b1fdf.PNG)\r\n\r\nHey,\r\nI want to split the lambada dataset into corpus, test, train and valid txt files (like penn treebank) but I am not able to achieve this. What I am doing is, executing the lambada.py file in my project but its not giving desired results. Any help will be appreciated!",
    "url": "https://github.com/huggingface/datasets/issues/1786",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-01-27T21:37:47Z",
    "updated_at": "2021-04-23T15:17:39Z",
    "user": "kkhan188"
  },
  {
    "repo": "pytorch/xla",
    "number": 2756,
    "title": "How to sync XLA GPU Tensor between torch and torch_xla",
    "body": "I'm newly to torch_xla and trying to enable torch_xla in distributed training in PyTorch with multi-node gpu. \r\nHowever, it seems torch_xla doesn't support this scenario well\uff0cfor the following reasons:\r\n1. torch_xla only support single-node multi-processing training by [xmp.spawn](https://pytorch.org/xla/release/1.7/index.html#running-on-multiple-xla-devices-with-multiprocessing)\r\n2. torch_xla GPU aten::Tensor dosen't compatible well with cuda aten::Tensor(since they are difference device)\r\n\r\nTo workaround the issue, I had try to sync xla tensor gradients and move to cuda aten::Tensor mannually before all-reduce. And something weird found:\r\n1. Each xla tensor sync create a SyncTensorGraph, the compilation slow down very much \r\n2. Xla aten::ensor conversion to cuda aten::Tensor would actually do copy\r\n\r\n## \u2753 Questions and Help\r\n1. Is there any function or API that support zero-copy between aten::cuda::Tensor & XLA_GPU aten::tensor?\r\n2. Does each SyncTensor trigger a full-subgraph XLA Compilation?\r\n3. Any best practices or good suggestions to PyTorch multi-node distributed training?",
    "url": "https://github.com/pytorch/xla/issues/2756",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2021-01-27T02:21:37Z",
    "updated_at": "2021-06-26T02:22:41Z",
    "user": "tanyokwok"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 294,
    "title": "Python Library error after painful compilation.",
    "body": "## \u2753 Question\r\n\r\nAfter very painfully building the repo from source due to a lot of strangely hardcoded paths to libraries and include which had me modify both the setup.py and the WORKSPACE, I have successfully completed the compilation using bazel. However when I try to use the python extension, I get the following error upon import of the library:\r\n\r\n```\r\n    import trtorch\r\n  File \"/home/user/.local/lib/python3.8/site-packages/trtorch/__init__.py\", line 11, in <module>\r\n    from trtorch._compiler import *\r\n  File \"/home/user/.local/lib/python3.8/site-packages/trtorch/_compiler.py\", line 5, in <module>\r\n    import trtorch._C\r\nImportError: /home/anhman/.local/lib/python3.8/site-packages/trtorch/lib/libtrtorch.so: undefined symbol: _ZN2at11show_configB5cxx11Ev\r\n```\r\n\r\n## What you have already tried\r\n\r\nThe last time I have seen something similar, it was due to attempts of running a compiled binary under a different version of pytorch than the one it was compiled with. It's not the case here as I compiles with 1.7.1.\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.7.1-cu110\r\n - CPU Architecture: x64\r\n - OS (e.g., Linux): Ubuntu20.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source): bazel build //:libtrtorch --compilation_mode opt and then python3 setup.py install.\r\n - Are you using local sources or building from archives: source\r\n - Python version: 3.8.7\r\n - CUDA version: 11.2\r\n - GPU models and configuration: RTX 3070\r\n - Any other relevant information: TensorRT 7.2.2.3 and cudnn 8.1\r\n\r\n## Additional context\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/294",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-01-27T01:57:24Z",
    "updated_at": "2021-02-15T02:41:41Z",
    "user": "rafale77"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 51114,
    "title": "How to find the module dependency?",
    "body": "## \u2753 There are many operations in a Model\r\n\r\nIf we run these codes below:\r\n```\r\nimport torch\r\nimport torchvision\r\nmodel = torchvision.models.resnet18()\r\ninp   = torch.zeros([64, 3, 7, 7])\r\nfor temp in model.children():\r\n    print(temp)\r\n```\r\n\r\nWe can get several modules:\r\n\r\n```\r\nConv2d(3, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False)\r\nBatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\nReLU(inplace=True)\r\nMaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)\r\nSequential(\r\n  (0): BasicBlock(\r\n    (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\r\n    (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n    (relu): ReLU(inplace=True)\r\n    (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\r\n    (bn2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n  )\r\n  (1): BasicBlock(\r\n    (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\r\n    (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n    (relu): ReLU(inplace=True)\r\n    (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\r\n    (bn2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n  )\r\n)\r\nSequential(\r\n  (0): BasicBlock(\r\n    (conv1): Conv2d(64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\r\n    (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n    (relu): ReLU(inplace=True)\r\n    (conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\r\n    (bn2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n    (downsample): Sequential(\r\n      (0): Conv2d(64, 128, kernel_size=(1, 1), stride=(2, 2), bias=False)\r\n      (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n    )\r\n  )\r\n  (1): BasicBlock(\r\n    (conv1): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\r\n    (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n    (relu): ReLU(inplace=True)\r\n    (conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\r\n    (bn2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n  )\r\n)\r\n........\r\n```\r\n## My problems are:\r\n\r\n1.  We can only see constructed modules, but cannot see their input\\output dependencies: In restnet18, the input of second Sequential module are both from the first Sequential and MaxPool2d. Is there any way we can figure out the depencies among different modules \uff08maybe in Python client\uff09?\r\n\r\n2. Moudules are related to high-level operations, can we see related operations and their dependencies in Python client (the outputs of torch.jit._get_trace_graph are too low-level)?\r\n\r\n3. How can wen find back propagation dependencies in Python client?\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/51114",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-26T17:28:57Z",
    "updated_at": "2021-01-26T21:51:08Z",
    "user": "Xuyuanjia2014"
  },
  {
    "repo": "pytorch/vision",
    "number": 3294,
    "title": "Using torchvision roi_align in libtorch c++ jit modules",
    "body": "## \ud83d\udc1b Bug\r\n\r\nHi, I\u2019m trying to use libtorch 1.7.1 to load a jit model that is created with pytorch 1.5.1 and torchvision 0.6.1.\r\nThis model is using torchvision::roi_align operator.\r\nWhen running the model I get this error:\r\n\r\n**Could not find any similar ops to torchvision::roi_align. This op may not exist or may not be currently supported in TorchScript.**\r\n\r\nloading the model in pytorch is working fine.\r\nAny idea why its not loading?\r\nI need to install another package to my c++ env to be able to load this model?\r\n\r\n## Expected behavior\r\n\r\nload and forward the model successfully in libtorch\r\n\r\n## Environment\r\n\r\nlibtorch version: 1.7.1\r\n\r\nCollecting environment information...\r\nPyTorch version: 1.5.1\r\nIs debug build: False\r\nCUDA used to build PyTorch: 10.2\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 18.04.2 LTS (x86_64)\r\nGCC version: (Ubuntu 6.4.0-17ubuntu1) 6.4.0 20180424\r\nClang version: Could not collect\r\nCMake version: version 3.18.0\r\n\r\nPython version: 3.6 (64-bit runtime)\r\nIs CUDA available: False\r\nCUDA runtime version: 10.1.243\r\nGPU models and configuration: GPU 0: Quadro P5000\r\nNvidia driver version: 418.87.01\r\ncuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.3\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.17.2\r\n[pip3] numpy-indexed==0.3.5\r\n[pip3] numpy-quaternion==2019.10.3.10.26.21\r\n[pip3] numpydoc==0.9.1\r\n[pip3] pytorch3d==0.2.0\r\n[pip3] torch==1.5.1\r\n[pip3] torchvision==0.6.1\r\n[conda] Could not collect\r\n\r\n\r\nThanks",
    "url": "https://github.com/pytorch/vision/issues/3294",
    "state": "closed",
    "labels": [
      "question",
      "module: ops",
      "topic: object detection",
      "module: c++ frontend"
    ],
    "created_at": "2021-01-26T07:23:02Z",
    "updated_at": "2022-11-28T05:56:59Z",
    "user": "natangold85"
  },
  {
    "repo": "pytorch/vision",
    "number": 3293,
    "title": "Affine Transform: why is translate a list[int] when the code suggests it could be floating point?",
    "body": "https://github.com/pytorch/vision/blob/f16322b596c7dc9e9d67d3b40907694f29e16357/torchvision/transforms/functional.py#L956\n\ncc @vfdev-5",
    "url": "https://github.com/pytorch/vision/issues/3293",
    "state": "open",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2021-01-26T07:14:08Z",
    "updated_at": "2021-01-26T15:41:51Z",
    "user": "varung"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 291,
    "title": "Questions about Value_Tensor_map and Evaluated_Value_map? (Not an issue, just try to understand them...)",
    "body": "I have just gone through TRTorch's 2020 GTC talk/slides/documentation focusing mainly on the graph conversion implementation part. There are some confusions of concepts and questions:\r\n\r\n1. What's the relationship between `torch::jit::Values` and `torch::jit::IValue`, Are they the same thing? I noticed they are used interchangeably in some situations and are referring to different classes in others.\r\n2. Why do we need to record Value -> ITensor map and Value->IValue map? What's the main use of these two maps?\r\n\r\nCould someone help me? Thanks in advance!\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/291",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-01-25T12:40:35Z",
    "updated_at": "2021-01-25T19:19:48Z",
    "user": "maxyanghu"
  },
  {
    "repo": "pytorch/elastic",
    "number": 140,
    "title": "Torch Elastic - How to make sure all nodes are in the same AZ?",
    "body": "## \u2753 Questions and Help\r\n\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nBefore submitting, please ensure you have gone through our documentation. Here\r\nare some links that may be helpful:\r\n\r\n* [What is torchelastic?](../../README.md)\r\n* [Quickstart on AWS](../../aws/README.md)\r\n* [Usage](../../USAGE.md)\r\n* [Examples](../../examples/README.md)\r\n* API documentation\r\n    * [Overview](../../USAGE.md)\r\n    * [Rendezvous documentation](../../torchelastic/rendezvous/README.md)\r\n    * [Checkpointing documentation](../../torchelastic/checkpoint/README.md)\r\n* [Configuring](../../USAGE.md#configuring)\r\n\r\n  \r\n### Question\r\n\r\nHi, when using TorchElastic + AWS EKS, how can we ensure that multi-node training jobs have all of the nodes located in the same AZ? This is critical for multi-node training jobs, in terms of speed of data transfer and data transfer costs.\r\n\r\nOne naive way would be to just specify 1 subnet when creating the EKS cluster, but is there a way we can create an EKS cluster with multiple subnets, and when TorchElastic attempts to launch multiple nodes for a training job, it will try to launch them such that all of the nodes are located within 1 subnet/AZ (where that subnet would be one of the subnets that the EKS cluster has)? And is this possible to do with spot instances?\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/elastic/issues/140",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-25T00:14:10Z",
    "updated_at": "2021-05-17T15:47:49Z",
    "user": "thecooltechguy"
  },
  {
    "repo": "pytorch/vision",
    "number": 3283,
    "title": "How to install torchvision to use video_reader backend?",
    "body": "I simply installed torchvision from conda (as advertised on pytorch.org). But `torchvision.set_video_backend('video_reader')` prints `video_reader video backend is not available. Please compile torchvision from source and try again`. This should be mentioned in https://pytorch.org/docs/stable/torchvision/index.html#torchvision.set_video_backend and in torchvision README (including if the `video_reader` is temporarily not supported)\n\ncc @bjuncek",
    "url": "https://github.com/pytorch/vision/issues/3283",
    "state": "closed",
    "labels": [
      "enhancement",
      "module: documentation",
      "module: video"
    ],
    "created_at": "2021-01-24T03:09:56Z",
    "updated_at": "2022-08-16T10:58:31Z",
    "user": "vadimkantorov"
  },
  {
    "repo": "pytorch/vision",
    "number": 3281,
    "title": "Can we use DeeplabV3 in Salient Object Detection ?",
    "body": "Recently, I start doing more in Deep Learning in Semantic Segmentation. I can't figure DeepLabV3 is possible to apply in Salient Object Detection ?",
    "url": "https://github.com/pytorch/vision/issues/3281",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-01-24T01:32:09Z",
    "updated_at": "2021-04-12T07:40:18Z",
    "user": "duynguyen51"
  },
  {
    "repo": "pytorch/xla",
    "number": 2750,
    "title": "How to change torch tpu v3 baseline into torch tpu pod v2?",
    "body": "i was trying to run this working torch tpu v3 baseline : https://www.kaggle.com/mobassir/faster-pytorch-tpu-baseline-for-cld-cv-0-9 into torch tpu pod v2.\r\n\r\ni changed hardware accelerator from tpu v3-8 to tpu v2 pod in kaggle and changed used batch size = 1 and \r\n\r\n\r\n```\r\ndef _mp_fn(rank, flags):\r\n    global acc_list\r\n    torch.set_default_tensor_type('torch.FloatTensor')\r\n    res = train_model()\r\n\r\nFLAGS={}\r\nxmp.spawn(_mp_fn, args=(FLAGS,), nprocs=32//8, start_method='fork')\r\n```\r\nbut i get error saying \"process 0 terminated with exit code 1\"\r\ni am not finding any resource or tutorial to convert tpu v3 notebook into tpu pod v2 in pytorch xla,so i wanted to give it a try myself,,,, @taylanbil need your help",
    "url": "https://github.com/pytorch/xla/issues/2750",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-23T07:48:39Z",
    "updated_at": "2021-01-25T21:29:29Z",
    "user": "mobassir94"
  },
  {
    "repo": "pytorch/vision",
    "number": 3274,
    "title": "Different ENODATA code on macOS",
    "body": "## \ud83d\udc1b Bug\r\nIt seems macOS ENODATA code (96) is different than the Linux one (61). The Linux code is currently hard-coded in `Video.cpp`, which results in an (unnecessary?) error being shown when using the video decoder on macOS:\r\n\r\nhttps://github.com/pytorch/vision/blob/7d831a2f9b3ebab9eb8e5c899cf70b103ad6908a/torchvision/csrc/io/video/Video.cpp#L314-L318\n\ncc @bjuncek",
    "url": "https://github.com/pytorch/vision/issues/3274",
    "state": "closed",
    "labels": [
      "question",
      "module: video"
    ],
    "created_at": "2021-01-22T12:05:45Z",
    "updated_at": "2021-01-22T17:29:52Z",
    "user": "stefanwayon"
  },
  {
    "repo": "pytorch/serve",
    "number": 943,
    "title": "how to return Chinese characters  with UTF-8 code",
    "body": "1.  When I use torch sever, I return a list in the **postprocess function** of the handler. Each element of the list is a python dictionary and the dictionary value is Chinese characters. Torch sever directly returns a json with the unicode encoding like \"\\u59d3\". Can I control the return using UTF-8? \r\n2.  In addition, Is there a corresponding document for \"model-server.jar \u201d ? What's the relationship with torch sever?\r\n\r\nWe look forward to your reply. Thanks a lot.",
    "url": "https://github.com/pytorch/serve/issues/943",
    "state": "open",
    "labels": [
      "triaged_wait",
      "language"
    ],
    "created_at": "2021-01-22T09:19:00Z",
    "updated_at": "2021-05-27T04:36:56Z",
    "user": "aixuedegege"
  },
  {
    "repo": "pytorch/vision",
    "number": 3273,
    "title": "What is expected Kinetics400 dataset directory structure?",
    "body": "Given that the dataset does not come with official downloader scripts and that most roll their own or hack some third-party scripts, it would be much clearer if https://pytorch.org/docs/stable/torchvision/datasets.html#kinetics-400 explained what directory structure is expected by `torchvision.datasets.Kinetics400`\r\n\r\nWhat is the expected dataset size? and the video file extensions?\r\n\r\nThanks!\n\ncc @pmeier",
    "url": "https://github.com/pytorch/vision/issues/3273",
    "state": "closed",
    "labels": [
      "enhancement",
      "module: datasets",
      "module: documentation"
    ],
    "created_at": "2021-01-22T01:02:24Z",
    "updated_at": "2021-03-01T10:18:21Z",
    "user": "vadimkantorov"
  },
  {
    "repo": "pytorch/vision",
    "number": 3267,
    "title": "get v0.8.1 branch compile out torchvision==0.9.0a0+7b9d30e",
    "body": "I clone the v0.8.1 branch and compiled it with pytorch 1.7.0,  but at last the compiled version is 0.9.0, does anything wrong?\r\n",
    "url": "https://github.com/pytorch/vision/issues/3267",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-01-20T09:52:05Z",
    "updated_at": "2021-01-20T10:29:08Z",
    "user": "helloyan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 50709,
    "title": "conv3d in r3d_18: How to maintain the dimension?",
    "body": "## How to maintain the dimension in conv3d(r3d_18)?\r\n\r\n### convolution in conv3d about padding\r\n\r\n1. the input is (1, 3, 5, 112, 112)\r\n2. the model is `models.video.r3d_18(pretrained=True, progress=False)`\r\n3. the model summary \r\n```\r\nVideoResNet(\r\n  (stem): BasicStem(\r\n    (0): Conv3d(3, 64, kernel_size=(3, 7, 7), stride=(1, 2, 2), padding=(1, 3, 3), bias=False)\r\n    (1): BatchNorm3d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n    (2): ReLU(inplace=True)\r\n  )\r\n  (layer1): Sequential(\r\n    (0): BasicBlock(\r\n      (conv1): Sequential(\r\n        (0): Conv3DSimple(64, 64, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1), bias=False)\r\n        (1): BatchNorm3d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n        (2): ReLU(inplace=True)\r\n      )\r\n      (conv2): Sequential(\r\n        (0): Conv3DSimple(64, 64, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1), bias=False)\r\n        (1): BatchNorm3d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n      )\r\n      (relu): ReLU(inplace=True)\r\n    )\r\n    (1): BasicBlock(\r\n      (conv1): Sequential(\r\n        (0): Conv3DSimple(64, 64, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1), bias=False)\r\n        (1): BatchNorm3d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n        (2): ReLU(inplace=True)\r\n      )\r\n      (conv2): Sequential(\r\n        (0): Conv3DSimple(64, 64, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1), bias=False)\r\n        (1): BatchNorm3d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n      )\r\n      (relu): ReLU(inplace=True)\r\n    )\r\n  )\r\n.............\r\n```\r\n4. input through the first layer in model\r\n```\r\ninput = torch.zeros(1, 3, 5, 112, 112)\r\noutput = model.stem(input)\r\n>>> torch.Size([1, 64, 5, 56, 56])\r\n```\r\n5. my question is : why the output is 1* 64* 5* 56* 56 \r\nhow to padding in pytorch\r\nthis is my Schematic diagram\r\n![image](https://user-images.githubusercontent.com/17065425/104982826-6d20aa80-5a46-11eb-9d9d-c167bcae51fb.png)\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/50709",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-19T03:07:16Z",
    "updated_at": "2021-01-20T14:08:55Z",
    "user": "u0251077"
  },
  {
    "repo": "pytorch/vision",
    "number": 3261,
    "title": "ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. from torchvision import _C\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n>>> from torchvision import _C                                                                                                                                                                                     Traceback (most recent call last):                                                                                                                                                                                   File \"<stdin>\", line 1, in <module>                                                                                                                                                                              ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory.\r\n\r\n## Environment\r\n\r\npython collect_env.py\r\n```\r\nCollecting environment information...\r\nPyTorch version: 1.1.0\r\nIs debug build: False\r\nCUDA used to build PyTorch: 10.0.130\r\nROCM used to build PyTorch: N/A\r\nOS: Ubuntu 16.04.5 LTS (x86_64)\r\nGCC version: (Ubuntu 8.4.0-1ubuntu1~16.04.1) 8.4.0\r\nClang version: Could not collect\r\nCMake version: version 3.14.4\r\nPython version: 3.6 (64-bit runtime)\r\nIs CUDA available: True\r\nCUDA runtime version: 10.0.130\r\nGPU models and configuration:\r\nGPU 0: GeForce GTX 1080 Ti\r\nGPU 1: GeForce GTX 1080 Ti\r\nGPU 2: GeForce GTX 1080 Ti\r\nGPU 3: GeForce GTX 1080 Ti\r\nGPU 4: GeForce GTX 1080 Ti\r\nGPU 5: GeForce GTX 1080 Ti\r\nGPU 6: GeForce GTX 1080 Ti\r\nGPU 7: GeForce GTX 1080 Ti\r\nNvidia driver version: 418.39\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.7.5.0\r\n/usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.5.1.10\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.19.5\r\n[pip3] torch==1.1.0\r\n[pip3] torchvision==0.4.2\r\n[conda] cudatoolkit               10.0.130             hf841e97_6    conda-forge\r\n[conda] mkl                       2020.2                      256\r\n[conda] numpy                     1.19.5           py36h2aa4a07_1    conda-forge\r\n[conda] pytorch                   1.1.0           py3.6_cuda10.0.130_cudnn7.5.1_0    pytorch\r\n[conda] torchvision               0.3.0           py36_cu10.0.130_1    pytorch\r\n```\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\nI was using fasterRCNN Object detector in torchvision while doing keep = nms(boxes_for_nms, scores, iou_threshold) it is giving this error. Easy way to reproduce this error is to run \r\n\r\n> from torchvision import _C\r\n\r\nPlease help. \n\ncc @fmassa @vfdev-5",
    "url": "https://github.com/pytorch/vision/issues/3261",
    "state": "closed",
    "labels": [
      "question",
      "topic: binaries"
    ],
    "created_at": "2021-01-17T17:08:27Z",
    "updated_at": "2021-06-16T15:08:15Z",
    "user": "IISCAditayTripathi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 50657,
    "title": "How to maximize inference speed of models implemented with C++ API ? (not using torchscript or jit) ",
    "body": "I'm currently implementing some seq2seq model with LibTorch C++ API (build from torch::nn::Modules, not using jit), is there any special techniques to optimize the inference speed ? Thanks.\r\n\r\ncc @yf225 @glaringlee @VitalyFedyunin @ngimel @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/50657",
    "state": "closed",
    "labels": [
      "module: performance",
      "module: cpp",
      "triaged"
    ],
    "created_at": "2021-01-17T02:55:51Z",
    "updated_at": "2024-06-27T07:58:38Z",
    "user": "w1d2s"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 693,
    "title": "What is 'Spearman\u2019s rank correlation between the cosine-similarity of the sentence embeddings and the gold labels.' ?",
    "body": "In your paper,you mention this \r\n`we compute the Spearman\u2019s rank\r\ncorrelation between the cosine-similarity of the\r\nsentence embeddings and the gold labels.`\r\nin **section 4.1**\r\n\r\nHere is my question,what is the `gold labels` mean ,and can you provide a example to explain how to calculate the Spearman\u2019s rank correlation in your paper?Any help will be appreciate!",
    "url": "https://github.com/huggingface/sentence-transformers/issues/693",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-15T08:46:57Z",
    "updated_at": "2021-01-15T09:55:00Z",
    "user": "Gpwner"
  },
  {
    "repo": "pytorch/xla",
    "number": 2733,
    "title": "How to install Torch_XLA in my own laptop?",
    "body": "## \u2753 Questions and Help\r\nI want build a envirment about Torch_XLA on my own laptop by Annconda3. But I do not find any information about this. Is it difficult to use Annconda3 or pip install Torch_XLA?",
    "url": "https://github.com/pytorch/xla/issues/2733",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-15T02:38:39Z",
    "updated_at": "2021-04-09T04:54:46Z",
    "user": "TianshengSun"
  },
  {
    "repo": "pytorch/examples",
    "number": 870,
    "title": "Permissions to contribute",
    "body": "Hi there, I thought I could contribute a few notebooks with really low barrier to entry for concepts like regression using tensors and for loops, small and highly documented shallow nets to illustrate concepts etc. I tried to push a notebook today to a branch I checked out for a PR but don't have permissions. How I can I request them? ",
    "url": "https://github.com/pytorch/examples/issues/870",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-13T13:26:02Z",
    "updated_at": "2022-03-09T20:16:51Z",
    "comments": 1,
    "user": "rbownes"
  },
  {
    "repo": "huggingface/datasets",
    "number": 1733,
    "title": "connection issue with glue, what is the data url for glue? ",
    "body": "Hi\r\nmy codes sometimes fails due to connection issue with glue, could you tell me how I can have the URL datasets library is trying to read GLUE from to test the machines I am working on if there is an issue on my side or not\r\nthanks ",
    "url": "https://github.com/huggingface/datasets/issues/1733",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-13T08:37:40Z",
    "updated_at": "2021-08-04T18:13:55Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/vision",
    "number": 3246,
    "title": "assert error len(grid_sizes) == len(strides) == len(cell_anchors)",
    "body": "It looks like a bug. When I do not set the AnchorGenerator() in FasterRCNN, the default anchor_sizes in ### **detection/faster_rcnn.py** line**182** shows that 'anchor_sizes = ((32,), (64,), (128,), (512,))' which cause len(cell_anchors) == 5. And  I found that in the **detection/faster_rcnn.py** line**120** the anchor_size set '((32, 64, 128, 256, 512), )' and len(cell_anchors) == 1",
    "url": "https://github.com/pytorch/vision/issues/3246",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-01-13T03:30:16Z",
    "updated_at": "2021-01-20T11:06:09Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/transformers",
    "number": 9556,
    "title": "Where is convert_bert_original_tf_checkpoint_to_pytorch.py?",
    "body": "HI:  \r\n\r\nI am getting the following error when implementing entity extraction in BERT.  OSError: Error no file named ['pytorch_model.bin', 'tf_model.h5', 'model.ckpt.index']\r\n\r\nI am very new to using BERT, and noted that [issue 2110](https://github.com/huggingface/transformers/issues/2110) had a similar issue.  Issue 2110 was referred to the convert_bert_original_tf_checkpoint_to_pytorch.py file.  However, the current link isn't working.  Could you point me to its current location?\r\n\r\nV/r,\r\nL",
    "url": "https://github.com/huggingface/transformers/issues/9556",
    "state": "closed",
    "labels": [
      "wontfix",
      "Migration"
    ],
    "created_at": "2021-01-13T02:49:48Z",
    "updated_at": "2021-03-06T00:13:15Z",
    "user": "sednaasil"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 50426,
    "title": "How to do gathering on a tensor with two-dim indexing",
    "body": "### Question\r\nHi,\r\nWant to add symbolic func to a custom PyTorch op and export it to ONNX using existing ONNX ops. There is two-dim indexing operation. Have tried `index_select`, but not work. So could anyone take a look into this and help me with this?\r\n### Further information\r\n\r\nSample code\r\n```\r\ndef my_custom_op(data, x_indices, y_indices):\r\n    ## suppose this op is written in c++\r\n    return data[x_indice, y_indices]\r\n\r\nclass MyCustomOp(torch.autograd.Function):\r\n    \r\n    @staticmethod\r\n    def forward(ctx, data, x_indices, y_indices):\r\n        return my_custom_op(data, x_indices, y_indices)\r\n\r\n    @staticmethod\r\n    def symbolic(g, data, x_indices, y_indices):\r\n        from torch.onnx.symbolic_opset9 import index_select, transpose\r\n        data_xs = index_select(g, data, 0, x_indices)\r\n        ## don't know how to do this because index_select not work for this \r\n        # data_xs = transpose(g, data_xs, 0, 1)\r\n        # data_ys = index_select(g, data_xs, 0, y_indices)\r\n        return out\r\n\r\n```\r\nThanks in advance.",
    "url": "https://github.com/pytorch/pytorch/issues/50426",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-12T10:21:14Z",
    "updated_at": "2021-01-12T22:15:39Z",
    "user": "RunningLeon"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 50346,
    "title": "how to save weights when using RPC framework",
    "body": "Hi,\r\n\r\nI am using the RPC framework to split the model across different processes/ranks. However, I notice that calling torch.save will only save the weights of the part of the model on a single rank. I am wondering if there is a way to save the weights of all models into one file?\r\n\n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @jjlilley @osalpekar @jiayisuse @mrzzd @agolynski @SciPioneer @H-Huang @cbalioglu",
    "url": "https://github.com/pytorch/pytorch/issues/50346",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "triaged",
      "module: rpc"
    ],
    "created_at": "2021-01-10T08:26:37Z",
    "updated_at": "2024-11-18T17:04:45Z",
    "user": "FrankLeeeee"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 267,
    "title": "prim::ListUnpack unable to get schema",
    "body": "When I try to complie a model, I got such error\r\n```\r\n\u001b[1;35mDEBUG: \u001b[0mUnable to get schema for Node %b.1 : int, %nframe.1 : int, %c : int, %h.1 : int, %w.1 : int = prim::ListUnpack(%15) (NodeConverterRegistry.Convertable)\r\nterminate called after throwing an instance of 'trtorch::Error'\r\n  what():  [enforce fail at core/conversion/conversion.cpp:392] Expected schema to be true but got false\r\nUnable to get schema for Node %b.1 : int, %nframe.1 : int, %c : int, %h.1 : int, %w.1 : int = prim::ListUnpack(%15) (conversion.VerifyCoverterSupportForBlock)\r\n```\r\nand the related graph definition is this\r\n```\r\n  %15 : int[] = aten::size(%images.1) # <string>:7:9\r\n  %b.1 : int, %nframe.1 : int, %c : int, %h.1 : int, %w.1 : int = prim::ListUnpack(%15)\r\n```\r\nInput shape is (1,1,3,672,672)\r\n\r\ndetailed log is here \r\n[listunpack.txt](https://github.com/NVIDIA/TRTorch/files/5786336/listunpack.txt)\r\nGDB backtrace\r\n```\r\n#0  0x00007fff63987438 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54\r\n#1  0x00007fff6398903a in __GI_abort () at abort.c:89\r\n#2  0x00007ffff7a8ddde in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6\r\n#3  0x00007ffff7a99896 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6\r\n#4  0x00007ffff7a99901 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6\r\n#5  0x00007ffff7a99b55 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6\r\n#6  0x000000000047b116 in trtorch::core::conversion::GetUnsupportedOpsInBlock[abi:cxx11](torch::jit::Block const*) (b=0x5d4b9d50) at core/conversion/conversion.cpp:390\r\n#7  0x000000000047b3a7 in trtorch::core::conversion::VerifyConverterSupportForBlock (b=0x5d4b9d50) at core/conversion/conversion.cpp:406\r\n#8  0x000000000045d784 in trtorch::core::CheckMethodOperatorSupport (mod=..., method_name=\"forward\") at core/compiler.cpp:136\r\n#9  0x000000000045ac55 in trtorch::CheckMethodOperatorSupport (module=..., method_name=\"forward\") at cpp/api/src/trtorch.cpp:14\r\n#10 0x000000000042178d in main (argc=5, argv=0x7fffffffdf68) at cpp/trtorchc/main.cpp:371\r\n```\r\n\r\nIn official pytorch source code, I find this\r\n```\r\n  %16 : Tensor[] = aten::chunk(%gates, %7, %8)\r\n  %ingate.1 : Tensor, %forgetgate.1 : Tensor, %cellgate.1 : Tensor, %outgate.1 : Tensor = prim::ListUnpack(%16)\r\n```\r\nDose this mean the aten::size is a operator rather than evaluator ?\r\n\r\nIn trtorch aten.cpp, we have\r\n```\r\n        .evaluator({c10::Symbol::fromQualString(\"aten::size\"),\r\n                    [](const torch::jit::Node* n, kwargs& args) -> c10::optional<torch::jit::IValue> {\r\n                      LOG_WARNING(\"There may be undefined behavior using dynamic shape and aten::size\");\r\n                      auto tensor_var = args.at(n->input(0));\r\n                      if (n->inputs().size() == 1) {\r\n                        if (tensor_var.isITensor()) {\r\n                          auto tensor = tensor_var.ITensor();\r\n                          return util::toVec(tensor->getDimensions());\r\n                        } else {\r\n                          auto tensor = tensor_var.unwrapToTensor();\r\n                          return tensor.sizes();\r\n                        }\r\n                      } else {\r\n                        auto dim = args.at(n->input(1)).unwrapToInt();\r\n                        if (tensor_var.isITensor()) {\r\n                          auto tensor = tensor_var.ITensor();\r\n                          return util::toVec(tensor->getDimensions())[dim];\r\n                        } else {\r\n                          auto tensor = tensor_var.unwrapToTensor();\r\n                          return tensor.sizes()[dim];\r\n                        }\r\n                      }\r\n                    },\r\n                    EvalOptions().validSchemas(\r\n                        {\"aten::size(Tensor self) -> (int[])\", \"aten::size.int(Tensor self, int dim) -> (int)\"})})\r\n        .evaluator({c10::Symbol::fromQualString(\"aten::__getitem__\"),\r\n```\r\n\r\nIn another graph, compiling have the same issue\r\n```\r\n  %46 : Tensor[] = aten::split(%45, %6, %7) # /opt/tiger/conda/lib/python3.7/site-packages/torch/tensor.py:375:0\r\n  %47 : Tensor, %48 : Tensor = prim::ListUnpack(%46)\r\n\r\n\u001b[1;35mDEBUG: \u001b[0mUnable to get schema for Node %47 : Tensor, %48 : Tensor = prim::ListUnpack(%46) (NodeConverterRegistry.Convertable)\r\nterminate called after throwing an instance of 'trtorch::Error'\r\n  what():  [enforce fail at core/conversion/conversion.cpp:392] Expected schema to be true but got false\r\nUnable to get schema for Node %47 : Tensor, %48 : Tensor = prim::ListUnpack(%46) (conversion.VerifyCoverterSupportForBlock)\r\n```",
    "url": "https://github.com/pytorch/TensorRT/issues/267",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2021-01-08T09:28:32Z",
    "updated_at": "2021-01-22T19:51:16Z",
    "user": "inocsin"
  },
  {
    "repo": "pytorch/vision",
    "number": 3233,
    "title": "Which paper is torchvision.ops.deform_conv2d from?",
    "body": "## \ud83d\udcda Documentation\r\n\r\n<!-- A clear and concise description of what content in https://pytorch.org/docs is an issue. If this has to do with the general https://pytorch.org website, please file an issue at https://github.com/pytorch/pytorch.github.io/issues/new/choose instead. If this has to do with https://pytorch.org/tutorials, please file an issue at https://github.com/pytorch/tutorials/issues/new -->\r\n\r\nI want to know which paper [torchvision.ops.deform_conv2d](https://pytorch.org/docs/stable/torchvision/ops.html#torchvision.ops.deform_conv2d) is from, is it DCNv1 or DCNv2?\r\n",
    "url": "https://github.com/pytorch/vision/issues/3233",
    "state": "closed",
    "labels": [
      "question",
      "module: documentation"
    ],
    "created_at": "2021-01-08T09:17:08Z",
    "updated_at": "2021-01-08T10:11:11Z",
    "user": "songyuc"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 50139,
    "title": "How to correctly nest datasets and dataloaders?",
    "body": "## \u2753 Questions and Help\r\n\r\nHi, I am asking here because it seemed like the right place, if it isn't please tell me where to ask.\r\n  \r\n \r\n Consider a stream of tabular data.\r\n\r\n```\r\nimport pandas as pd\r\nimport numpy as np\r\n\r\n\r\ndef data_stream():\r\n    for _ in range(1000):\r\n        df = pd.DataFrame({\r\n            'a': np.arange(10000),\r\n            'b': (np.arange(10000) + 10000)\r\n        })\r\n        yield df\r\n```\r\n\r\nPlease assume the dataframes will be large (and different).\r\n\r\n\r\nI want to create a dataloader for data that is arranged as I stated above.\r\nbatches should be of X rows of the current dataframe, until it is done (including shuffling flexibility ect.). Can throw away the last batch if it is not full.\r\nThen, go on to the next dataframe, until StopIteration.\r\n\r\nIf it were a single dataframe, I would simply use the good old torch.utils.data.Dataset with a standard dataloader, with small configuration of the number of df rows per sample and be done.\r\n\r\nIf it were a stream of single sample per stream item, I would use torch.utils.data.IterableDataset exactly like the doc states.\r\n\r\nHowever, I have both.\r\n\r\nIf I use a torch.utils.data.IterableDataset, I have to define a DataLoader for it, and I then lose the power of the DataLoader that would operate on the df itself. The same problem would arise in the other direction.\r\n\r\n___\r\n\r\nWhat's the correct way of handling data that is arranged like this?",
    "url": "https://github.com/pytorch/pytorch/issues/50139",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-06T11:44:07Z",
    "updated_at": "2021-01-07T00:46:10Z",
    "user": "noamzilo"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1304,
    "title": "NLP FROM SCRATCH: TRANSLATION WITH A SEQUENCE TO SEQUENCE NETWORK AND ATTENTION",
    "body": "Hi\r\nI'm exgausted... how to save and load model in future?",
    "url": "https://github.com/pytorch/tutorials/issues/1304",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-06T10:45:46Z",
    "updated_at": "2021-06-02T19:39:35Z",
    "comments": 1,
    "user": "aloska"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 266,
    "title": "How to convert model from double to float",
    "body": "When I try to complie torchscript model, I get this log\r\n```\r\nDEBUG: [TRTorch Conversion Context] - Found IValue containing object of type Double(requires_grad=0, device=cpu)\r\nterminate called after throwing an instance of 'trtorch::Error'\r\n  what():  [enforce fail at core/util/trt_util.cpp:293] Expected aten_trt_type_map.find(t) != aten_trt_type_map.end() to be true but got false\r\nUnsupported Aten datatype\r\n```\r\n\r\nSo I try to convert model to float using this\r\n```\r\nscript_model = torch.jit.load(path)\r\nscript_model = script_model.eval()\r\nscript_model = script_model.float()\r\nscript_model.save(new_path)\r\n```\r\nAnd it still throw this error",
    "url": "https://github.com/pytorch/TensorRT/issues/266",
    "state": "closed",
    "labels": [
      "question",
      "component: core"
    ],
    "created_at": "2021-01-06T09:59:10Z",
    "updated_at": "2022-08-12T21:10:14Z",
    "user": "inocsin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 50118,
    "title": "torch.where scalar/tensor documentation is unclear and not formatted",
    "body": "## \ud83d\udcda Documentation\r\n\r\nSee:\r\n`\r\nCurrently valid scalar and tensor combination are 1. Scalar of floating dtype and torch.double 2. Scalar of integral dtype and torch.long 3. Scalar of complex dtype and torch.complex128\r\n`\r\n\r\nI believe these are supposed to be on separate lines.  Also this message comes before the type information, it's not clear what. \"scalar and tensor combination\" are.  It should at least mention it's talking about `x` and `y` and not `condition`.\r\n\r\n\r\n<!-- A clear and concise description of what content in https://pytorch.org/docs is an issue. If this has to do with the general https://pytorch.org website, please file an issue at https://github.com/pytorch/pytorch.github.io/issues/new/choose instead. If this has to do with https://pytorch.org/tutorials, please file an issue at https://github.com/pytorch/tutorials/issues/new -->\r\n\n\ncc @jlin27 @mruberry @heitorschueroff",
    "url": "https://github.com/pytorch/pytorch/issues/50118",
    "state": "open",
    "labels": [
      "module: docs",
      "triaged",
      "module: sorting and selection"
    ],
    "created_at": "2021-01-05T22:52:49Z",
    "updated_at": "2021-01-07T17:14:35Z",
    "user": "gchanan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 50112,
    "title": "need a clear guide for when and how to use torch.cuda.set_device()",
    "body": "## \ud83d\ude80 Feature\r\n<!-- A clear and concise description of the feature proposal -->\r\n\r\nI find myself quite unclear about `torch.cuda.set_device()`. The current documentation is very unsatisfactory, ambgious and confusing. e.g. the first 3 lines of code sample: https://pytorch.org/docs/stable/notes/cuda.html#cuda-semantics\r\n```\r\ncuda = torch.device('cuda')     # Default CUDA device\r\ncuda0 = torch.device('cuda:0')\r\ncuda2 = torch.device('cuda:2')  # GPU 2 (these are 0-indexed)\r\n```\r\nit's very ambiguous and doesn't tell me anything. What is the default device in that example?\r\n\r\nHow come  `torch.cuda.set_device()` is not used here - as it's the latter that's supposed to set the default device.\r\n\r\nIf possible I would like to ask for a clarification of what @ngimel shared here: https://github.com/pytorch/pytorch/issues/49961#issuecomment-754319348 quote:\r\n\r\n> Default device is the device you are setting with torch.cuda.set_device(). It's possible to set device to 1 and then operate on the tensors on device 0, but for every function internally pytorch would be calling cudaSetDevice(0) - launch function kernel - cudaSetDevice(1) as part of setting device guards, and this is generally less efficient then setting device to 0 in the first place.\r\n\r\nShe suggested that unless I explicitly set `torch.cuda.set_device()` when switching to a different device (say 0->1) the code could incur a performance hit, because it'll first switch to device 0 and then 1 on every pytorch op if the default device was somehow 0 at that point.\r\n\r\nSo, say, if I'm setting up a DDP in the program. Do I have to call `torch.cuda.set_device(local_rank)` at some point after  `torch.distributed.init_process_group()` since otherwise the default device will be `cpu` and the whole program will be slower because of that.\r\n\r\nShould pytorch flag to users when the default device isn't matching the device the op is run on?\r\n\r\nAnd say, I'm doing model parallelism as explained in this [tutorial](https://pytorch.org/tutorials/intermediate/model_parallel_tutorial.html#apply-model-parallel-to-existing-modules) - why doesn't it do `torch.cuda.set_device()` when switching devices?\r\n\r\nWould it be possible to write a clear documentation on when to use `torch.cuda.set_device()`? Currently, it seems to be used more as a band-aid when related to device-switching bugs are encountered, since most of the time most code seems to work just fine w/o it, yet we unknowingly create a performance hit. \r\n\r\nThank you!\n\ncc @ngimel @jlin27 @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/50112",
    "state": "open",
    "labels": [
      "module: docs",
      "module: cuda",
      "triaged",
      "needs design"
    ],
    "created_at": "2021-01-05T22:11:26Z",
    "updated_at": "2025-12-26T12:57:46Z",
    "user": "stas00"
  },
  {
    "repo": "pytorch/examples",
    "number": 866,
    "title": "Structure of train_loader",
    "body": "Hi and thanks in advice for your help! I would like to upload my own set of images and to train the variational autoencoder model with my training set. I don't understand what is the structure of your train_loader. I see you use torch.utils.data.DataLoader on datasets.MNIST to obtain train_loader, but I don't understand if train_loader is the list of the images represented as numpy array or what else.",
    "url": "https://github.com/pytorch/examples/issues/866",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-04T15:57:34Z",
    "updated_at": "2022-03-09T21:17:33Z",
    "comments": 1,
    "user": "Silvia-Sciva"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 50030,
    "title": "How to realize Cross Validation using torchtext?",
    "body": "I want to realize cross validation using torchtext. Here is what I have done:\r\n1. First, I use TabularDataset to define a dataset from the JSON file\r\n2. Then, I use train_exs_arr = np.array(train_data.examples), d_train = train_exs_arr[train_idx].tolist() \r\n3. Then, I use Dataset to define a sub-dataset from Examples d_train\r\n4. Finally, I use BucketIterator. However, I can not access the data from BucketIterator",
    "url": "https://github.com/pytorch/pytorch/issues/50030",
    "state": "closed",
    "labels": [],
    "created_at": "2021-01-04T03:08:29Z",
    "updated_at": "2021-01-04T07:09:40Z",
    "user": "yipliu"
  },
  {
    "repo": "huggingface/transformers",
    "number": 9387,
    "title": "Where is the impact when output_attentions=True?",
    "body": "Is there any impact regarding performance (training/fine-tuning time, GPU memory, batch size, etc.) when  `output_attentions=True`?\r\n\r\n```python\r\nself.bert_encoder = BertModel.from_pretrained(\r\n            hparams.architecture, # \"bert-base-uncased\"\r\n            output_attentions=True)\r\n```",
    "url": "https://github.com/huggingface/transformers/issues/9387",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2021-01-02T23:16:57Z",
    "updated_at": "2021-03-06T00:13:32Z",
    "user": "celsofranssa"
  },
  {
    "repo": "pytorch/xla",
    "number": 2707,
    "title": "How to write pure Python function which can be ran on TPUs while using PyTorch-XLA?",
    "body": "I got existing code to train EfficientNet using PyTorch which contains custom augmentations like CutMix, MixUp etc. in my training loop. This runs perfectly on GPU. Now I want to change my code such that it can run on TPUs.\r\n\r\nI've made required changes to run my code on 8 TPU cores using PyTorch XLA but it's runs very slow when I use custom augmentations in training loop (even slower than GPU). When I remove them it runs significantly faster. So I think I have to make changes in my augmentation functions as well.\r\n\r\nHere is my training loop.\r\n```python\r\ndef train():\r\n    for batch in train_loader:\r\n        X, y = batch[0].to(device), batch[1].to(device)  # device is xla\r\n        cutmixup_prob = random.random()\r\n\r\n        if cutmixup_prob > 0.4:\r\n            X, y, y_shuffled, lam = cutmix(X, y, 0.4)\r\n\r\n        # forward pass\r\n        # calc. loss\r\n        # backward pass\r\n        xm.optimizer_step(optimizer)\r\n        \r\n        # calc. and return accuracy\r\n```\r\n\r\nAnd here is my complete `cutmix` function, which causes issues:\r\n\r\n```python\r\n# https://www.kaggle.com/c/bengaliai-cv19/discussion/126504\r\ndef rand_bbox(size, lam):\r\n    W = size[2]\r\n    H = size[3]\r\n    cut_rat = np.sqrt(1. - lam)\r\n    cut_w = np.int(W * cut_rat)\r\n    cut_h = np.int(H * cut_rat)\r\n\r\n    # uniform\r\n    cx = np.random.randint(W)\r\n    cy = np.random.randint(H)\r\n\r\n    bbx1 = np.clip(cx - cut_w // 2, 0, W)\r\n    bby1 = np.clip(cy - cut_h // 2, 0, H)\r\n    bbx2 = np.clip(cx + cut_w // 2, 0, W)\r\n    bby2 = np.clip(cy + cut_h // 2, 0, H)\r\n    \r\n    return bbx1, bby1, bbx2, bby2\r\n\r\ndef cutmix(images, targets, alpha):\r\n    device = images.device\r\n    indices = torch.randperm(images.size(0)).to(device)\r\n    shuffled_targets = targets[indices].to(device)\r\n\r\n    lam = np.random.beta(alpha, alpha)\r\n    bbx1, bby1, bbx2, bby2 = rand_bbox(images.size(), lam)\r\n    # Cutmix\r\n    images[:, :, bbx1:bbx2, bby1:bby2] = images[indices, :, bbx1:bbx2, bby1:bby2]\r\n    # adjust lambda to exactly match pixel ratio\r\n    lam = 1 - ((bbx2 - bbx1) * (bby2 - bby1) / (images.size()[-1] * images.size()[-2]))\r\n    return images, targets, shuffled_targets, lam\r\n```\r\n\r\nWhenever I'm creating tensors, I'm moving them to xla device, but still this slows down the training loop on TPUs.\r\n\r\nSo my question is how can I write pure python functions (here is `cutmix` is pure python function which just does some processing with image tensors) which can efficiently run on TPUs? What changes should I make here? Am I supposed to create all new variables on \"xla\" device?\r\n\r\nEDIT: I tried converting everything to tensors (with xla device) in `cutmix` function, but still no speed gain.\r\n\r\nThanks.",
    "url": "https://github.com/pytorch/xla/issues/2707",
    "state": "closed",
    "labels": [],
    "created_at": "2020-12-31T14:25:56Z",
    "updated_at": "2021-01-08T17:34:16Z",
    "user": "Kaushal28"
  },
  {
    "repo": "pytorch/examples",
    "number": 862,
    "title": "Why not move images onto gpu?",
    "body": "https://github.com/pytorch/examples/blob/792d336019a28a679e29cf174e10cee80ead8722/imagenet/main.py#L284\r\n\r\nI'm trying to training vgg on imagenet with one node DataParallel and no multiprocessing\u3002But I find 'images.device' before computation is 'cpu', and 'target.device=cuda:0'.  I'm not sure why these four lines of codes move 'images' to gpu only when I choose only one gpu(args.gpu is not None) and move 'target' to gpu even with argument device=None(args.gpu=None). \r\n\r\nI would appreciate it if someone could help me understand it.",
    "url": "https://github.com/pytorch/examples/issues/862",
    "state": "closed",
    "labels": [
      "good first issue"
    ],
    "created_at": "2020-12-29T13:52:36Z",
    "updated_at": "2022-04-28T14:55:08Z",
    "comments": 3,
    "user": "I-Doctor"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 49888,
    "title": "How to apply functions to nested modules?",
    "body": "## \u2753 Questions and Help\r\n\r\nHi, all,\r\n        I understood when we want to apply a certain function to layers in a model, we can call self.apply(_function). For instance, apply weight norm to all convolutional layers. I checked the document of module.apply(), where its says the function will be applied to all the children.\r\n       My question is, if the model is complicated, say\r\n```python\r\nBlock1=nn.Sequential(nn.Linear(10,10), nn.Linear(10,10))\r\nBlock2=nn.Sequential(nn.Linear(10,10), nn.Linear(10,10))\r\nModel=nn.Sequential([nn.Linear(2,10), Block1, Block2])\r\n```\r\nNow if I want to apply a certain function on all linear layers (say a certain weight initialization), I can not directly call Model.apply(_function), right? Is there any elegant way to do this when nested modules are presented?\r\nThanks a lot!\r\n\r\n\r\n\n\ncc @albanD @mruberry @jbschlosser",
    "url": "https://github.com/pytorch/pytorch/issues/49888",
    "state": "closed",
    "labels": [
      "module: nn",
      "triaged"
    ],
    "created_at": "2020-12-28T12:34:25Z",
    "updated_at": "2020-12-28T17:34:15Z",
    "user": "121898"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 49862,
    "title": "How to transform the adjacency matrix into the incidence matrix\uff1f ",
    "body": "## \u2753 Questions and Help\r\n\r\nHow to transform the adjacency matrix into the incidence matrix using the pytorch functions provided\uff1f It's easy to implement it using for loops, but it's Inefficient.\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/49862",
    "state": "closed",
    "labels": [],
    "created_at": "2020-12-26T02:34:08Z",
    "updated_at": "2020-12-26T03:31:19Z",
    "user": "zlpure"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 49855,
    "title": "NN.CTCloss may be something wrong?How to decode CTC results?",
    "body": "pytorch 1.7.0 windows python3.7.5\r\n\r\nI tried to train the ocr rec model with this code, where Nn. Ctcloss was used : https://github.com/WenmuZhou/PytorchOCR/tree/master/tools/rec_train.py\r\nLoss went down to 0.02, ACC to 0.99. And then I try to deduce the model with https://github.com/WenmuZhou/PytorchOCR/tree/master/tools/rec_infer.py .The results are all wrong, not consistent with ACC.\r\n\r\nCan you write an example of text recognition based on Nn.CTCLOSS?",
    "url": "https://github.com/pytorch/pytorch/issues/49855",
    "state": "closed",
    "labels": [],
    "created_at": "2020-12-25T15:18:50Z",
    "updated_at": "2020-12-29T20:43:02Z",
    "user": "williamlzw"
  },
  {
    "repo": "pytorch/vision",
    "number": 3198,
    "title": "Boxes with negative scores in NMS input?",
    "body": "Hi, I found that the use of NMS in `RegionProposalNetwork` can take on boxes with negative scores as inputs. I found this when running MaskRCNN in v0.8 release.\r\n\r\nhttps://github.com/pytorch/vision/blob/90645ccd0e774ad76200245e32222a23d09f2312/torchvision/models/detection/rpn.py#L261\r\n\r\n\r\nIn other use of NMS in `ROIHeads`, scores are thresholded to keep only boxes with positive scores:\r\nhttps://github.com/pytorch/vision/blob/90645ccd0e774ad76200245e32222a23d09f2312/torchvision/models/detection/roi_heads.py#L703\r\n\r\nI'm wondering if that lack of score thresholding in RPN is intentional or not... In TVM, we expects NMS input with negative scores to be invalid. Since NMS in PyTorch doesn't have a score threshold parameter, we didn't realize that there could be boxes with negative scores. \r\n\r\nI proposed to fix TVM's NMS conversion in https://github.com/apache/tvm/pull/7137, but since it would have a big performance implication and I heard that negative boxes don't matter in the final output anyway, I'm now inclined not to fix this in TVM side.\r\n\r\ncc @fmassa  @t-vi ",
    "url": "https://github.com/pytorch/vision/issues/3198",
    "state": "closed",
    "labels": [
      "question",
      "topic: object detection"
    ],
    "created_at": "2020-12-21T22:53:14Z",
    "updated_at": "2021-01-06T13:57:38Z",
    "user": "masahi"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 635,
    "title": "sbert.net is down. Where can I view list of pretrained models?",
    "body": "",
    "url": "https://github.com/huggingface/sentence-transformers/issues/635",
    "state": "closed",
    "labels": [],
    "created_at": "2020-12-19T12:16:46Z",
    "updated_at": "2020-12-19T14:10:36Z",
    "user": "mani-rai"
  },
  {
    "repo": "pytorch/vision",
    "number": 3188,
    "title": "Cannot Build With FFmpeg Support",
    "body": "## \u2753 Questions and Help\r\n\r\n### Cannot Build With FFmpeg Support\r\n\r\nHi.\r\n\r\nWhile trying to build `torchvision` from source, I've seen this output:\r\n\r\n```\r\n+ python3 setup.py build\r\nBuilding wheel torchvision-0.8.2\r\nPNG found: True\r\nlibpng version: 1.6.37\r\nBuilding torchvision with PNG image support\r\nlibpng include path: /usr/include/libpng16\r\nRunning build on conda-build: False\r\nRunning build on conda: False\r\nJPEG found: True\r\nBuilding torchvision with JPEG image support\r\nFFmpeg found: False\r\nrunning build\r\nrunning build_py\r\ncreating build\r\n\r\n(omitted)\r\n```\r\n\r\nIt showed that **`FFmpeg found: False`**. I tried `apt install ffmpeg` and built again, it still showed FFmpeg not found.\r\n\r\nThen I tried:\r\n\r\n```shell\r\napt update\r\napt install ffmpeg \\\r\n    libavformat-dev libavcodec-dev libavdevice-dev \\\r\n    libavutil-dev libswscale-dev libavresample-dev libavfilter-dev\r\n# deps of python package av\r\npip3 install ffmpeg av\r\n```\r\n\r\nBut it showed `FFmpeg found: False` once again.\r\n\r\nI could not find any instructions in [README](../blob/master/README.rst) about installing `ffmpeg` dependencies for building `torchvision` yet, so how could I do that, or where could I find it?\r\n\r\nThanks.\n\ncc @bjuncek",
    "url": "https://github.com/pytorch/vision/issues/3188",
    "state": "closed",
    "labels": [
      "question",
      "topic: build",
      "module: video"
    ],
    "created_at": "2020-12-18T15:41:06Z",
    "updated_at": "2021-11-16T07:26:28Z",
    "user": "KumaTea"
  },
  {
    "repo": "huggingface/datasets",
    "number": 1600,
    "title": "AttributeError: 'DatasetDict' object has no attribute 'train_test_split'",
    "body": "The following code fails with \"'DatasetDict' object has no attribute 'train_test_split'\" - am I doing something wrong?\r\n```\r\nfrom datasets import load_dataset\r\ndataset = load_dataset('csv', data_files='data.txt')\r\ndataset = dataset.train_test_split(test_size=0.1)\r\n```\r\n\r\n> AttributeError: 'DatasetDict' object has no attribute 'train_test_split'",
    "url": "https://github.com/huggingface/datasets/issues/1600",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-12-18T05:37:10Z",
    "updated_at": "2023-05-03T04:22:55Z",
    "user": "david-waterworth"
  },
  {
    "repo": "pytorch/vision",
    "number": 3184,
    "title": "Are these 2 lines of code necessary?",
    "body": "Hi,\r\nhttps://github.com/pytorch/vision/blob/master/references/video_classification/train.py#L134\r\nhttps://github.com/pytorch/vision/blob/master/references/video_classification/train.py#L169\r\n\r\nI wonder if these two lines are necessary.\r\nWhy do we need to assign transforms to dataset after loading them from cache, whose transforms have been declared when being saved.\r\nI remove them and code seems still work.\r\nThanks.\r\n",
    "url": "https://github.com/pytorch/vision/issues/3184",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-12-17T16:40:06Z",
    "updated_at": "2021-01-21T13:10:18Z",
    "user": "jc-hou"
  },
  {
    "repo": "pytorch/serve",
    "number": 917,
    "title": "Implement one of the TODOs: Pass request id while loading model in model_loader.py",
    "body": "<!--\r\nThank you for suggesting an idea to improve torchserve model serving experience.\r\n\r\nPlease fill in as much of the template below as you're able.\r\n-->\r\n**TODO**\r\nhttps://github.com/pytorch/serve/blob/6c078d6cd1f91c1614c18abf2f94d3571be1b659/ts/model_loader.py#L71\r\n\r\n```python\r\nclass TsModelLoader(ModelLoader):\r\n    \"\"\"\r\n    TorchServe 1.0 Model Loader\r\n    \"\"\"\r\n\r\n    def load(self, model_name, model_dir, handler, gpu_id, batch_size, envelope=None):\r\n        \"\"\"\r\n        Load TorchServe 1.0 model from file.\r\n        :param model_name:\r\n        :param model_dir:\r\n        :param handler:\r\n        :param gpu_id:\r\n        :param batch_size:\r\n        :param envelope:\r\n        :return:\r\n        \"\"\"\r\n        logging.debug(\"Loading model - working dir: %s\", os.getcwd())\r\n        # TODO: Request ID is not given. UUID is a temp UUID.\r\n        metrics = MetricsStore(uuid.uuid4(), model_name)\r\n        manifest_file = os.path.join(model_dir, \"MAR-INF/MANIFEST.json\")\r\n        manifest = None\r\n        if os.path.exists(manifest_file):\r\n            with open(manifest_file) as f:\r\n                manifest = json.load(f)\r\n```\r\n\r\n## Is your feature request related to a problem? Please describe.\r\n<!-- Please describe the problem you are trying to solve. -->\r\nThe main aim is to connect request maker(frontend) to request processor(backend) using request-id. One of the use cases can be when there is an error and we need to debug. It will be easy if we have request-id instead of random uuid\r\n\r\n## Describe the solution\r\n<!-- Please describe the desired behavior. -->\r\nWhen encoding the `ModelLoadModelRequest` into buffer, also send request-id which was used to create that particular request\r\n\r\n## Describe alternatives solution\r\n<!-- Please describe alternative solutions or features you have considered. -->\r\n",
    "url": "https://github.com/pytorch/serve/issues/917",
    "state": "closed",
    "labels": [
      "help wanted",
      "question"
    ],
    "created_at": "2020-12-17T04:06:19Z",
    "updated_at": "2021-11-16T02:42:09Z",
    "user": "rishabh1212"
  },
  {
    "repo": "pytorch/vision",
    "number": 3175,
    "title": "error: \u2018constexpr\u2019 call flows off the end of the function",
    "body": "### envs\r\nlibtorch==1.7.1\r\nvision == 0.8.2\r\n\r\n### install\r\n```bash\r\ncmake _DWITH_CUDA=on ..\r\nmake\r\n```\r\n### errors\r\nlibtorch-cxx11-abi-shared-with-deps-1.7.1/libtorch/include/ATen/core/op_registration/infer_schema.h:120:16: error: \u2018constexpr\u2019 call flows off the end of the function\r\n  constexpr auto returns = createReturns<ReturnType>::call();\r\n                ^~~~~~~\r\nmake[2]: *** [CMakeFiles/torchvision.dir/build.make:518: CMakeFiles/torchvision.dir/torchvision/csrc/ops/cuda/deform_conv2d_kernel.cu.o] Error 1\r\nmake[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/torchvision.dir/all] Error 2\r\n\r\ni have test cxx11/cxx14/cxx17, cxx14 and cxx17 have the same error\n\ncc @seemethere",
    "url": "https://github.com/pytorch/vision/issues/3175",
    "state": "closed",
    "labels": [
      "question",
      "module: c++ frontend"
    ],
    "created_at": "2020-12-16T05:18:51Z",
    "updated_at": "2020-12-17T15:16:04Z",
    "user": "onism26"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 49445,
    "title": "[doc] how to prevent pytorch-nightly from being replaced by a released version on pip install",
    "body": "## \ud83d\udcda Documentation\r\n\r\nI found an issue with pytorch-nightly and pip install of some packages depending on pytorch. \r\n\r\nIf a user installs pytorch-nightly using:\r\n```\r\npip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu110/torch_nightly.html -U\r\n```\r\nwhich allows for pre-released versions as prescribed on https://pytorch.org/get-started/locally/, e.g.:\r\n\r\ninstalling some other packages that include `torch` in their requirements with:\r\n```\r\npip install package1 package2\r\n```\r\nwill wipe out the nightly build and install the latest release instead. \r\n\r\nI'm not 100% sure yet when this happens. I think it might be the case for python pip packages that don't have a binary wheel and need to be built from source and perhaps depend on pytorch to build.\r\n\r\nFor example this happens with `fairscale` (no binary wheel provided) but doesn't happen with `fairseq` which provides a binary wheel on pypi. It happened before with other packages - I will try to identify the correct group.\r\n\r\nThe solution in such circumstances is to pass the same `--pre --f https://download.pytorch.org/whl/nightly/cu110/torch_nightly.html` used to install the nightly to `pip install package-depending-on-pytorch` to keep the pre-released version installed. e.g.:\r\n```\r\npip install fairscale --pre --f https://download.pytorch.org/whl/nightly/cu110/torch_nightly.html\r\n```\r\n\r\n I have no idea where this could be documented.\n\ncc @ezyang @seemethere @malfet @walterddr @jlin27 @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/49445",
    "state": "open",
    "labels": [
      "module: binaries",
      "module: docs",
      "oncall: releng",
      "triaged"
    ],
    "created_at": "2020-12-16T02:42:27Z",
    "updated_at": "2021-05-31T17:06:32Z",
    "user": "stas00"
  },
  {
    "repo": "pytorch/vision",
    "number": 3169,
    "title": "Width Calculation For Bounding Boxes in torchvision\\models\\detection\\_utils.py",
    "body": "In the function encode_boxes (line 79 of torchvision\\models\\detection\\_utils.py), it seems that the width of the ground truth proposals matched is being computed as \r\n\r\nex_widths = proposals_x2 - proposals_x1\r\nex_heights = proposals_y2 - proposals_y1\r\n\r\nBut for a bounding box from ms coco [368, 413, 368, 417]. I guess this is just a matter of opinion if this is a \"valid\" bounding box, but it seems to me that x_min = x_max is valid for a box that is 1 pixel wide, and y_max-y_min pixels high. Anyway this causes the targets_dw or targets_dh to take the torch.log of 0, giving float(-inf), which can of course be easily fixed by adding +1 to the width, or the fix:\r\n\r\nex_widths = proposals_x2 - proposals_x1 + 1\r\nex_heights = proposals_y2 - proposals_y1 + 1\r\n\r\nEither that or I could just filter out these boxes with x_min = x_max or y_min = y_max",
    "url": "https://github.com/pytorch/vision/issues/3169",
    "state": "closed",
    "labels": [
      "question",
      "module: ops"
    ],
    "created_at": "2020-12-14T08:54:46Z",
    "updated_at": "2020-12-14T14:57:04Z",
    "user": "JamesMcCullochDickens"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 49304,
    "title": "How to save model with half precision?",
    "body": "## \u2753 Questions and Help\r\n\r\nMy model includes 5 resnet18, if they are saved with default precision(float32),  then about 220MB space in my disk is occupied.\r\nMy idea is to reduce the storage to 110MB, so I used model.half() to apply precision 16. \r\nI used torch.save(model.state_dict(),'model.pt') to save my model, however there still is 220MB for the model storage.\r\n\r\nDoes anyone know how to deal with this? Thanks very much.",
    "url": "https://github.com/pytorch/pytorch/issues/49304",
    "state": "closed",
    "labels": [],
    "created_at": "2020-12-14T02:07:34Z",
    "updated_at": "2020-12-14T06:54:39Z",
    "user": "xinfangliu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 49298,
    "title": "[question] How hard would it be to implement 4-bit precision training?",
    "body": "I came across the paper [Ultra-Low Precision 4-bit Training of Deep Neural Networks](https://proceedings.neurips.cc/paper/2020/file/13b919438259814cd5be8cb45877d577-Paper.pdf) on NeurIPS 2020. I think it would be cool to implement support for it in PyTorch. I think it can be done quite efficiently on CPU using the AVX2 instruction set, as all the multiplication/addition operations can be stored in a fast cache. The operations would just make a lookup in this table.\r\n\r\nI had a look how things are implemented in the library. If I am correct, there is enough of level of abstraction to make this doable. I need to implement a kernel and add it to the ATEN's DispatchStub or something like that. If I copy-paste implementation of `\r\npytorch/aten/src/ATen/quantized/` and make it work with custom `fp4` type that should work for end-to-end training, right? To start playing around with this, like training my own MNIST, it should be enough to just implement addition and multiplication for something like MLP with relus: all computation consists only from  affine operations so + and * should be enough. \r\n\r\nI would appreciate high-level guidance / help links on this. Thank you!\n\ncc @ezyang @bhosmer @smessmer @ljk53 @bdhirsh @ailzhang",
    "url": "https://github.com/pytorch/pytorch/issues/49298",
    "state": "open",
    "labels": [
      "module: internals",
      "triaged"
    ],
    "created_at": "2020-12-13T18:04:02Z",
    "updated_at": "2024-05-29T19:02:17Z",
    "user": "michalsustr"
  },
  {
    "repo": "pytorch/vision",
    "number": 3168,
    "title": "Getting Error: NotADirectoryError: [WinError 267] The directory name is invalid. File and folder both are valid",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\nI am getting the following error \r\nGetting Error: NotADirectoryError: [WinError 267] The directory name is invalid. File and folder both are valid\r\nI am using the following code:\r\n\r\n# Load all image data\r\ndata_dir = os.getcwd()\r\nfolder_name = \"train\"\r\nimage_folders = os.path.join(data_dir, folder_name)\r\ntransform = transforms.Compose([transforms.Resize((512,512)), transforms.ToTensor()])\r\nimages = []\r\nfor file in os.listdir(image_folders):\r\n    #print(\"1-->\"+file)\r\n    images.append(ImageFolder(os.path.join(image_folders, file), transform=transform))\r\ndatasets = torch.utils.data.ConcatDataset(images)\r\n\r\n## To Reproduce\r\nI have placed the files in the D:\\MS_Program\\DR\\Code\\train \r\nFile Extension is . JPG \r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. Run the piece of code\r\n1.\r\n1.\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n## Environment\r\n\r\nPlease copy and paste the output from our\r\n[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)\r\n(or fill out the checklist below manually).\r\n\r\nYou can get the script and run it with:\r\n```\r\nwget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py\r\n# For security purposes, please check the contents of collect_env.py before running it.\r\npython collect_env.py\r\n```\r\n\r\n - PyTorch / torchvision Version (e.g., 1.0 / 0.4.0): 1.7.1\r\n - OS (e.g., Linux): Windows\r\n - How you installed PyTorch / torchvision (`conda`, `pip`, source): Conda\r\n - Build command you used (if compiling from source):\r\n - Python version: Python 3.7.6\r\n - CUDA/cuDNN version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n\n\ncc @pmeier",
    "url": "https://github.com/pytorch/vision/issues/3168",
    "state": "closed",
    "labels": [
      "question",
      "module: datasets"
    ],
    "created_at": "2020-12-13T15:33:38Z",
    "updated_at": "2021-02-21T16:12:31Z",
    "user": "manojrustagi79"
  },
  {
    "repo": "huggingface/datasets",
    "number": 1514,
    "title": "how to get all the options of a property in datasets ",
    "body": "Hi\r\ncould you tell me how I can get all unique options of a property of dataset?\r\nfor instance in case of boolq, if the user wants to know which unique labels it has, is there a way to access unique labels without getting all training data lables and then forming a set i mean? thanks",
    "url": "https://github.com/huggingface/datasets/issues/1514",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-12-12T16:24:08Z",
    "updated_at": "2022-05-25T16:27:29Z",
    "user": "rabeehk"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1277,
    "title": "cannot import name 'extract_archive', when run seq-to-seq model in the google colab.",
    "body": "Why run Seq to Seq model example in the pytorch use google colab exists the problem? how to solution it?\r\nThe model example following :\r\n\r\nimport io\r\nimport torch\r\nfrom torchtext.utils import download_from_url, extract_archive\r\nfrom torchtext.data.utils import get_tokenizer\r\nfrom torchtext.vocab import build_vocab_from_iterator\r\n\r\nurl = 'https://s3.amazonaws.com/research.metamind.io/wikitext/wikitext-2-v1.zip'\r\ntest_filepath, valid_filepath, train_filepath = extract_archive(download_from_url(url))\r\ntokenizer = get_tokenizer('basic_english')\r\nvocab = build_vocab_from_iterator(map(tokenizer,\r\n                                      iter(io.open(train_filepath,\r\n                                                   encoding=\"utf8\"))))\r\n\r\ndef data_process(raw_text_iter):\r\n  data = [torch.tensor([vocab[token] for token in tokenizer(item)],\r\n                       dtype=torch.long) for item in raw_text_iter]\r\n  return torch.cat(tuple(filter(lambda t: t.numel() > 0, data)))\r\n\r\ntrain_data = data_process(iter(io.open(train_filepath, encoding=\"utf8\")))\r\nval_data = data_process(iter(io.open(valid_filepath, encoding=\"utf8\")))\r\ntest_data = data_process(iter(io.open(test_filepath, encoding=\"utf8\")))\r\n\r\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")",
    "url": "https://github.com/pytorch/tutorials/issues/1277",
    "state": "closed",
    "labels": [],
    "created_at": "2020-12-11T02:55:52Z",
    "updated_at": "2021-07-27T15:12:26Z",
    "comments": 4,
    "user": "funny000"
  },
  {
    "repo": "pytorch/vision",
    "number": 3149,
    "title": "How can I install torchvision on Apple M1?",
    "body": "How can I install torchvision on Apple M1?",
    "url": "https://github.com/pytorch/vision/issues/3149",
    "state": "closed",
    "labels": [
      "help wanted",
      "question",
      "topic: build"
    ],
    "created_at": "2020-12-10T09:21:41Z",
    "updated_at": "2021-06-06T05:59:32Z",
    "user": "huwei1024"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 248,
    "title": "failed build trtorch",
    "body": "Hi,\r\n\r\nwhen run bazel build //:libtrtorch -c opt I got the following error:\r\n\r\nno such package '@platforms//os': The repository '@platforms' could not be resolved and referenced by '//:windows'",
    "url": "https://github.com/pytorch/TensorRT/issues/248",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-12-09T08:29:33Z",
    "updated_at": "2020-12-10T05:11:34Z",
    "user": "pribadihcr"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1272,
    "title": "AssertionError:  Not equal to tolerance rtol=0.001, atol=1e-05",
    "body": "Recently I am converting the pytorch segmentation model to onnx model\u3002I can export the onnx model, pass the onnx.checker.check_model() and use the onnxruntime to do inference. But when I use np.testing.assert_allclose(to_numpy(torch_out), ort_outs[0], rtol=1e-03, atol=1e-05) to compare ONNX Runtime and PyTorch results, there is an AssertionError, like follows:\r\n\r\nAssertionError: \r\nNot equal to tolerance rtol=0.001, atol=1e-05\r\n\r\nMismatched elements: 20827169 / 20971520 (99.3%)\r\nMax absolute difference: 1.8859415\r\nMax relative difference: 1008390.8\r\n x: array([[[[ 1.165803e+01,  1.163278e+01,  1.160753e+01, ...,\r\n           1.179392e+01,  1.176985e+01,  1.174578e+01],\r\n         [ 1.167064e+01,  1.164517e+01,  1.161970e+01, ...,...\r\n y: array([[[[11.636896, 11.6166  , 11.596304, ..., 12.943967, 12.909642,\r\n          12.875318],\r\n         [11.656967, 11.636346, 11.615723, ..., 12.954525, 12.920053,...\r\n\r\nThe code snippet to export the model is as follows\uff1a\r\n\r\nmodel.eval()\r\nbatch_size = 1  \r\ninput_shape = (3, 512, 512)  \r\n# # x = torch.autograd.Variable(torch.randn(batch_size, *input_shape))\r\nx = torch.rand(batch_size, 3, 512, 512, requires_grad=True)\r\ntorch.onnx.export(model, x, model_file_name + '.onnx', export_params=True, opset_version=11, verbose=False)\r\n\r\nIn this tutorial, https://pytorch.org/tutorials/advanced/super_resolution_with_onnxruntime.html, it said, if the results do not match then there is an issue in the ONNX exporter. But i don't know where is the mistake.\n\ncc @BowenBao @sekyondaMeta @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/1272",
    "state": "closed",
    "labels": [
      "onnx",
      "medium",
      "docathon-h2-2023"
    ],
    "created_at": "2020-12-09T06:50:04Z",
    "updated_at": "2023-11-07T00:44:48Z",
    "comments": 7,
    "user": "GeneralJing"
  },
  {
    "repo": "pytorch/examples",
    "number": 855,
    "title": "cannot find dcgan-sample-10.png",
    "body": "Hello, recently I learn the code from https://github.com/pytorch/examples/tree/master/cpp/dcgan. But when I want to run \r\npython display_samples.py -i dcgan-sample-10.png\r\n\r\nI didn't find the dcgan-sample-10.png.\r\n\r\ncan you tell me how to find the image correctly?\r\n\r\nAnd when I run ./dcgan to train, I got some warning:\r\n[W Resize.cpp:19] Warning: An output with one or more elements was resized since it had shape [64, 1, 1, 1], which does not match the required output shape [64, 1, 1, 64].This behavior is deprecated, and in a future PyTorch release outputs will not be resized unless they have zero elements. You can explicitly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (function resize_output)\r\n\r\nI didn't know how to fix it? could you help me?",
    "url": "https://github.com/pytorch/examples/issues/855",
    "state": "closed",
    "labels": [],
    "created_at": "2020-12-09T02:47:37Z",
    "updated_at": "2022-03-09T20:42:06Z",
    "comments": 1,
    "user": "liubamboo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 48995,
    "title": "How to do polymorphism on torch::nn::ModuleHolder?",
    "body": "The C++ frontend tutorial https://pytorch.org/tutorials/advanced/cpp_frontend.html recommends use ModuleHolder to create our own modules, but the inheritance relation does seem not translate to ModuleHolder. So I am wondering if there is a way to have both the benefit of ModuleHolder while having polymorphism among my customized modules.\n\ncc @yf225 @glaringlee @albanD @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/48995",
    "state": "closed",
    "labels": [
      "module: cpp",
      "module: nn",
      "triaged"
    ],
    "created_at": "2020-12-08T03:26:39Z",
    "updated_at": "2020-12-22T20:23:06Z",
    "user": "thisisi3"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 48928,
    "title": "When multiple GPUs run multiple processes, it is found that any process not running in GPU 0 will have some more memory (such as 200m) in GPU 0. What is the cause of this?\uff08\u591a\u4e2aGPU\u8dd1\u591a\u8fdb\u7a0b\u65f6\u5019\uff0c\u53d1\u73b0\u53ea\u8981\u4e0d\u57280\u53f7GPU\u8dd1\u7684\u8fdb\u7a0b\u90fd\u4f1a\u57280\u53f7GPU\u591a\u51fa\u4e00\u4e9b\u5185\u5b58(\u5982200M)\uff0c\u8bf7\u95ee\u8fd9\u662f\u4ec0\u4e48\u60c5\u51b5\u5bfc\u81f4\u7684\uff1f\uff09",
    "body": "Hello everyone, when multiple GPUs run multiple processes, we find that a process running in GPU 0 only occupies 1000m of memory; however, running a process with GPU 1 will occupy 1000m of memory in GPU 1, and it will also occupy 200m of memory in GPU 0; GPU 2 or GPU 3 are the same; we found that as long as the processes not running in GPU 0 will have 200m more memory in GPU 0, what is the cause of this? Thank you!\r\n\r\n\u5927\u5bb6\u597d\uff0c\u5728\u591a\u4e2aGPU\u8dd1\u591a\u4e2a\u8fdb\u7a0b\u7684\u65f6\u5019\u53d1\u73b0\uff0c0\u53f7GPU\u8dd1\u7684\u4e00\u4e2a\u8fdb\u7a0b\u53ea\u5360\u663e\u5b581000M\uff1b\u4f46\u662f\u75281\u53f7GPU\u8dd1\u4e00\u4e2a\u8fdb\u7a0b\u4f1a\u57281\u53f7GPU\u5360\u663e\u5b581000M\uff0c\u800c\u4e14\u4f1a\u57280\u53f7GPU\u4e5f\u5360\u7528200M\u663e\u5b58\uff1b2\u53f7\u62163\u53f7GPU\u90fd\u4e00\u6837\uff1b\u53d1\u73b0\u53ea\u8981\u4e0d\u57280\u53f7GPU\u8dd1\u7684\u8fdb\u7a0b\u90fd\u4f1a\u57280\u53f7GPU\u591a\u51fa200M\u663e\u5b58\uff0c\u8bf7\u95ee\u8fd9\u662f\u4ec0\u4e48\u60c5\u51b5\u5bfc\u81f4\u7684\uff0c\u8c22\u8c22\uff01\n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd",
    "url": "https://github.com/pytorch/pytorch/issues/48928",
    "state": "open",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2020-12-07T11:28:55Z",
    "updated_at": "2021-01-21T06:46:15Z",
    "user": "zoufangyu1987"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 48927,
    "title": "how to train a \"mask keypoint r-cnn\"",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\r\n\r\n**Question**\r\nTo have a detection model predict bbox, mask and keypoints simultaneously, I wrote a script of \"mask keypoint r-cnn\", based on pytorch's indigenous implementation of  mask r-cnn and keypoint r-cnn.\r\n\r\nTo test the baseline I use a dataset with 10 images of pedestrians, labeled with keypoints and masks. In training I sum the losses of each module together and optimize it. But the result is unsatisfactory after even 200 epochs. Neither the predicted bboxes nor keypoints and masks looks fine. Yet the loss seems already converged and no more decreasing.\r\n\r\nIn my expectation, with so few samples, it should be easy for the model to overfit the dataset.\r\n\r\nI tried ignoring one among mask loss and keypoint loss, then the model is well trained as expected, becoming a good keypoint r-cnn, or mask r-cnn. I think this proves my implementation didn't go wrong.\r\n\r\nThe question, is there advise or experience for training keypoint and mask together? Thanks in advance :)\r\n\r\n**Appendix**\r\nMy implementation of mask keypoint r-cnn:\r\n```\r\nimport torch\r\nfrom torchvision.models.utils import load_state_dict_from_url\r\nfrom torchvision.ops import MultiScaleRoIAlign\r\nfrom torchvision.models.detection.faster_rcnn import FasterRCNN\r\nfrom torchvision.models.detection.backbone_utils import resnet_fpn_backbone\r\nfrom torchvision.models.detection.mask_rcnn import MaskRCNNHeads, MaskRCNNPredictor\r\nfrom torchvision.models.detection.keypoint_rcnn import KeypointRCNNHeads, KeypointRCNNPredictor\r\nimport time\r\n\r\n\r\nclass MaskKeypointRCNN(FasterRCNN):\r\n    def __init__(self, backbone, num_classes=None,\r\n                 # transform parameters\r\n                 min_size=800, max_size=1333,\r\n                 image_mean=None, image_std=None,\r\n                 # RPN parameters\r\n                 rpn_anchor_generator=None, rpn_head=None,\r\n                 rpn_pre_nms_top_n_train=2000, rpn_pre_nms_top_n_test=1000,\r\n                 rpn_post_nms_top_n_train=2000, rpn_post_nms_top_n_test=1000,\r\n                 rpn_nms_thresh=0.7,\r\n                 rpn_fg_iou_thresh=0.7, rpn_bg_iou_thresh=0.3,\r\n                 rpn_batch_size_per_image=256, rpn_positive_fraction=0.5,\r\n                 # Box parameters\r\n                 box_roi_pool=None, box_head=None, box_predictor=None,\r\n                 box_score_thresh=0.05, box_nms_thresh=0.5, box_detections_per_img=100,\r\n                 box_fg_iou_thresh=0.5, box_bg_iou_thresh=0.5,\r\n                 box_batch_size_per_image=512, box_positive_fraction=0.25,\r\n                 bbox_reg_weights=None,\r\n                 # Mask parameters\r\n                 mask_roi_pool=None, mask_head=None, mask_predictor=None,\r\n                 # keypoint parameters\r\n                 keypoint_roi_pool = None, keypoint_head = None, keypoint_predictor = None,\r\n                 num_keypoints = 17):\r\n\r\n        out_channels = backbone.out_channels\r\n\r\n        # mask predictor initialization\r\n        assert isinstance(mask_roi_pool, (MultiScaleRoIAlign, type(None)))\r\n        if num_classes is not None:\r\n            if mask_predictor is not None:\r\n                raise ValueError(\"num_classes should be None when mask_predictor is specified\")\r\n        if mask_roi_pool is None:\r\n            mask_roi_pool = MultiScaleRoIAlign(\r\n                featmap_names=['0', '1', '2', '3'],\r\n                output_size=14,\r\n                sampling_ratio=2)\r\n        if mask_head is None:\r\n            mask_layers = (256, 256, 256, 256)\r\n            mask_dilation = 1\r\n            mask_head = MaskRCNNHeads(out_channels, mask_layers, mask_dilation)\r\n        if mask_predictor is None:\r\n            mask_predictor_in_channels = 256  # == mask_layers[-1]\r\n            mask_dim_reduced = 256\r\n            mask_predictor = MaskRCNNPredictor(mask_predictor_in_channels,\r\n                                               mask_dim_reduced, num_classes)\r\n\r\n        # keypoint predictor initialization\r\n        assert isinstance(keypoint_roi_pool, (MultiScaleRoIAlign, type(None)))\r\n        if min_size is None:\r\n            min_size = (640, 672, 704, 736, 768, 800)\r\n        if num_classes is not None:\r\n            if keypoint_predictor is not None:\r\n                raise ValueError(\"num_classes should be None when keypoint_predictor is specified\")\r\n        if keypoint_roi_pool is None:\r\n            keypoint_roi_pool = MultiScaleRoIAlign(\r\n                featmap_names=['0', '1', '2', '3'],\r\n                output_size=14,\r\n                sampling_ratio=2)\r\n        if keypoint_head is None:\r\n            keypoint_layers = tuple(512 for _ in range(8))\r\n            keypoint_head = KeypointRCNNHeads(out_channels, keypoint_layers)\r\n        if keypoint_predi",
    "url": "https://github.com/pytorch/pytorch/issues/48927",
    "state": "closed",
    "labels": [],
    "created_at": "2020-12-07T09:04:08Z",
    "updated_at": "2020-12-08T01:38:01Z",
    "user": "feiyangsuo"
  },
  {
    "repo": "pytorch/examples",
    "number": 854,
    "title": "why multiple token embedding by math.sqrt(self.ninp)?",
    "body": "Dear author, \r\n\r\nI am wondering why you multiple token's embedding by math.sqrt(self.ninp) in [model.py](https://github.com/pytorch/examples/blob/a3f28a26851867b314f4471ec6ca1c2c048217f1/word_language_model/model.py#L148) from the word_language_model example.\r\n\r\nBest",
    "url": "https://github.com/pytorch/examples/issues/854",
    "state": "closed",
    "labels": [],
    "created_at": "2020-12-07T07:11:14Z",
    "updated_at": "2022-03-09T21:05:40Z",
    "comments": 1,
    "user": "KK666-AI"
  },
  {
    "repo": "huggingface/datasets",
    "number": 1167,
    "title": "\u2753 On-the-fly tokenization with datasets, tokenizers, and torch Datasets and Dataloaders",
    "body": "Hi there,\r\n\r\nI have a question regarding \"on-the-fly\" tokenization. This question was elicited by reading the \"How to train a new language model from scratch using Transformers and Tokenizers\" [here](https://huggingface.co/blog/how-to-train). Towards the end there is this sentence: \"If your dataset is very large, you can opt to load and tokenize examples on the fly, rather than as a preprocessing step\". I've tried coming up with a solution that would combine both `datasets` and `tokenizers`, but did not manage to find a good pattern.\r\n\r\nI guess the solution would entail wrapping a dataset into a Pytorch dataset.\r\n\r\nAs a concrete example from the [docs](https://huggingface.co/transformers/custom_datasets.html)\r\n\r\n```python\r\nimport torch\r\n\r\nclass SquadDataset(torch.utils.data.Dataset):\r\n    def __init__(self, encodings):\r\n        # instead of doing this beforehand, I'd like to do tokenization on the fly\r\n        self.encodings = encodings \r\n\r\n    def __getitem__(self, idx):\r\n        return {key: torch.tensor(val[idx]) for key, val in self.encodings.items()}\r\n\r\n    def __len__(self):\r\n        return len(self.encodings.input_ids)\r\n\r\ntrain_dataset = SquadDataset(train_encodings)\r\n```\r\n\r\nHow would one implement this with \"on-the-fly\" tokenization exploiting the vectorized capabilities of tokenizers?\r\n\r\n\r\n----\r\n\r\nEdit: I have come up with this solution. It does what I want, but I feel it's not very elegant\r\n\r\n```python\r\nclass CustomPytorchDataset(Dataset):\r\n    def __init__(self):\r\n        self.dataset = some_hf_dataset(...)\r\n        self.tokenizer = BertTokenizerFast.from_pretrained(\"bert-base-uncased\")\r\n\r\n    def __getitem__(self, batch_idx):\r\n        instance = self.dataset[text_col][batch_idx]\r\n        tokenized_text = self.tokenizer(instance, truncation=True, padding=True)\r\n        return tokenized_text\r\n\r\n    def __len__(self):\r\n        return len(self.dataset)\r\n\r\n    @staticmethod\r\n    def collate_fn(batch):\r\n        # batch is a list, however it will always contain 1 item because we should not use the\r\n        # batch_size argument as batch_size is controlled by the sampler\r\n        return {k: torch.tensor(v) for k, v in batch[0].items()}\r\n\r\ntorch_ds = CustomPytorchDataset()\r\n\r\n# NOTE: batch_sampler returns list of integers and since here we have SequentialSampler\r\n# it returns: [1, 2, 3], [4, 5, 6], etc. - check calling `list(batch_sampler)`\r\nbatch_sampler = BatchSampler(SequentialSampler(torch_ds), batch_size=3, drop_last=True)\r\n\r\n# NOTE: no `batch_size` as now the it is controlled by the sampler!\r\ndl = DataLoader(dataset=torch_ds, sampler=batch_sampler, collate_fn=torch_ds.collate_fn)\r\n```",
    "url": "https://github.com/huggingface/datasets/issues/1167",
    "state": "closed",
    "labels": [
      "question",
      "generic discussion"
    ],
    "created_at": "2020-12-05T17:02:56Z",
    "updated_at": "2023-07-20T15:49:42Z",
    "user": "pietrolesci"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1267,
    "title": "Weird results in the AUTOMATIC MIXED PRECISION tutorial.",
    "body": "I followed the [amp tutorial](https://pytorch.org/tutorials/recipes/recipes/amp_recipe.html#automatic-mixed-precision) (authored by @mcarilli). It's succinct and perspicuous. But the results show that mixed precision takes more memory than default precision. Can someone explain?\r\n\r\nMore details about the settings and results of my experiment are [here](https://discuss.pytorch.org/t/automatic-mixed-precision-increases-max-memory-used-by-tensors/104875).",
    "url": "https://github.com/pytorch/tutorials/issues/1267",
    "state": "closed",
    "labels": [
      "question",
      "amp"
    ],
    "created_at": "2020-12-04T04:24:26Z",
    "updated_at": "2023-03-14T18:26:59Z",
    "user": "qimingyudaowenti"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 48770,
    "title": "How can I find a function to calculate correlation coefficient matrix like numpy.corrcoef ()  in pytorch?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/48770",
    "state": "closed",
    "labels": [],
    "created_at": "2020-12-03T05:40:21Z",
    "updated_at": "2020-12-03T16:49:24Z",
    "user": "jiangzhiwei2018"
  },
  {
    "repo": "pytorch/serve",
    "number": 822,
    "title": "How to fix this problem",
    "body": "When I run the official example,I've got this problem,Does anyone have the same problem as Me?How can I solve it? thank you!",
    "url": "https://github.com/pytorch/serve/issues/822",
    "state": "closed",
    "labels": [],
    "created_at": "2020-12-02T12:22:07Z",
    "updated_at": "2020-12-02T15:37:40Z",
    "user": "shyoulala"
  },
  {
    "repo": "pytorch/vision",
    "number": 3093,
    "title": "VOCSegmentation transforms.ToTensor() not working",
    "body": "Hi, \r\nI want to use the VOCSegmentation dataset but I always get this error:\r\n\r\n```\r\nTypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class 'PIL.PngImagePlugin.PngImageFile'>\r\n```\r\nThis is a code snippet to recreate the error\r\n```python\r\ntransform=transforms.Compose([\r\n                              transforms.Resize((256, 256)),\r\n                              transforms.ToTensor()\r\n                              ])\r\n\r\nvoc_train = VOCSegmentation(os.getcwd(), year='2012', image_set='train', transform=transform)\r\ntrain_loader = DataLoader(voc_train, batch_size=64)\r\n\r\ntrain_iter = iter(train_loader)\r\nnext(train_iter)\r\n```\r\n\r\nWhen I use the MNIST or CIFAR10 data set the code works as expected.\r\nIs there something special about the `VOCSegmentation` data set?\r\nThanks\n\ncc @vfdev-5",
    "url": "https://github.com/pytorch/vision/issues/3093",
    "state": "closed",
    "labels": [
      "question",
      "topic: semantic segmentation"
    ],
    "created_at": "2020-12-02T10:16:12Z",
    "updated_at": "2024-01-08T06:45:57Z",
    "user": "sirtris"
  },
  {
    "repo": "pytorch/vision",
    "number": 3090,
    "title": "about retrain shufflenetv2 question",
    "body": "First of all, thanks for your perfect projects.\r\n\r\n## Environments\r\npyhton: 3.7\r\npytorch: 1.7+cpu\r\ntorchvison: 0.8.1+cpu\r\nsystem-os: ubuntu18.04\r\n\r\n## Hyperparameters\r\nlr: 0.001\r\nmomentum: 0.9\r\nweights_decay: 0.0001\r\nbatch_size: 16\r\n\r\n## Question introduction\r\nRecently, I was learning the source code your provided in torchvision about shufflenetv2.\r\nBut when I was fine-training the network(only training fc layer), I had a problem that network convergence is very slow. like this:\r\n```\r\n[epoch 0] accuracy: 0.246\r\n[epoch 1] accuracy: 0.253\r\n[epoch 2] accuracy: 0.28\r\n[epoch 3] accuracy: 0.305\r\n[epoch 4] accuracy: 0.338\r\n[epoch 5] accuracy: 0.353\r\n```\r\nI have read this document [https://pytorch.org/docs/stable/torchvision/models.html#classification](https://pytorch.org/docs/stable/torchvision/models.html#classification)\r\nAccording to this document, I downloaded the weights [https://download.pytorch.org/models/shufflenetv2_x1-5666bf0f80.pth](https://download.pytorch.org/models/shufflenetv2_x1-5666bf0f80.pth), and use same preprocessing method.\r\n```python\r\n    data_transform = {\r\n        \"train\": transforms.Compose([transforms.RandomResizedCrop(224),\r\n                                     transforms.RandomHorizontalFlip(),\r\n                                     transforms.ToTensor(),\r\n                                     transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])]),\r\n        \"val\": transforms.Compose([transforms.Resize(256),\r\n                                   transforms.CenterCrop(224),\r\n                                   transforms.ToTensor(),\r\n                                   transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])])}\r\n```\r\nBut with conditions unchanged, I just replace the model with resnet34 your provided in torchvision, and I can get great results. like this:\r\n```\r\n[epoch 0] accuracy: 0.968\r\n```\r\n\r\nStrangely, When fine-training shfflenetv2 if I change the learning rate from 0.001 to 0.1, I can get the following results:\r\n```\r\n[epoch 0] accuracy: 0.85\r\n[epoch 1] accuracy: 0.848\r\n.....\r\n[epoch 29] accuracy: 0.899\r\n```\r\nDoes fine-training shufflenet network need such a large learning rate?\r\n\r\nI guess the preprocessing algorithm is not like that. Because if I use the mobilenetv2 network, I can get better results under the same conditions. Could you help me find out what's wrong? Thank you very much.\r\n\r\n\r\n## Code\r\n[https://github.com/WZMIAOMIAO/deep-learning-for-image-processing/blob/master/pytorch_classification/Test7_shufflenet/train.py](https://github.com/WZMIAOMIAO/deep-learning-for-image-processing/blob/master/pytorch_classification/Test7_shufflenet/train.py)\r\n",
    "url": "https://github.com/pytorch/vision/issues/3090",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2020-12-02T02:35:51Z",
    "updated_at": "2021-01-25T00:55:45Z",
    "user": "WZMIAOMIAO"
  },
  {
    "repo": "pytorch/xla",
    "number": 2657,
    "title": "Using iterative datasets with pytorch XLA is very slow on TPU, how to use it correctly ",
    "body": "## Environment info\r\n- Platform: TPU\r\n- Python version: 3.7\r\n\r\n## Information\r\nI am running the following codes on TPU and GPU and on TPU this is very slow. I am not sure if the way I define dataloader for iterative dsatasets is correct or not.  Here is how I define the dataloader, https://github.com/google-research/ruse/blob/d4dd58a2d8efe0ffb1a9e9e77e3228d6824d3c3c/seq2seq/tasks/tasks.py#L496 \r\n\r\nI shard the data per-tpu core here: https://github.com/google-research/ruse/blob/d4dd58a2d8efe0ffb1a9e9e77e3228d6824d3c3c/seq2seq/trainers/t5_trainer.py#L326 \r\n\r\nCould you point me if I am not using distributed data samplers and shard the data per core, how I can do distributed trianing properly? thanks \r\n \r\n## To reproduce\r\n```\r\ngit clone git@github.com:google-research/ruse.git\r\ngo to iter branch \r\npip install -r requirements.txt\r\npython setup.py develop\r\ncd seq2seq\r\npython xla_spawn.py finetune_t5_trainer.py  configs/mrpc_adapter_tpu.json\r\n```",
    "url": "https://github.com/pytorch/xla/issues/2657",
    "state": "closed",
    "labels": [],
    "created_at": "2020-12-02T01:01:14Z",
    "updated_at": "2020-12-06T00:00:11Z",
    "user": "rabeehkarimimahabadi"
  },
  {
    "repo": "pytorch/vision",
    "number": 3083,
    "title": "Getting an error when modifying the faster_rcnn model to add inception_v3 backbone model",
    "body": "I was following this tutorial  [Modifying the model to add a different backbone](https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html#modifying-the-model-to-add-a-different-backbone). When I replace the mobilenet_v2 model with inception_v3, the code does not work and  gives the following error:\r\n```\r\n  File \"/home/gpu-user/projects/building-outline-detection/src/models/faster_rcnn/vision/engine.py\", line 46, in train_one_epoch\r\n    loss_dict = model(images, targets)\r\n  File \"/home/gpu-user/miniconda3/envs/faster_rcnn/lib/python3.8/site-packages/torch/nn/modules/module.py\", line 727, in _call_impl\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/home/gpu-user/miniconda3/envs/faster_rcnn/lib/python3.8/site-packages/torchvision/models/detection/generalized_rcnn.py\", line 99, in forward\r\n    proposals, proposal_losses = self.rpn(images, features, targets)\r\n  File \"/home/gpu-user/miniconda3/envs/faster_rcnn/lib/python3.8/site-packages/torch/nn/modules/module.py\", line 727, in _call_impl\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/home/gpu-user/miniconda3/envs/faster_rcnn/lib/python3.8/site-packages/torchvision/models/detection/rpn.py\", line 330, in forward\r\n    features = list(features.values())\r\nAttributeError: 'InceptionOutputs' object has no attribute 'values'\r\n```\r\nI am using the following environment:\r\n\r\n* Ubuntu 18.04.4 LTS\r\n* CUDA Version: 10.2\r\n* Python: 3.8.6\r\n* Pytorch: 1.7.0\r\n\r\nIt will be great if someone can help me in resolving this issue.\r\nThanks",
    "url": "https://github.com/pytorch/vision/issues/3083",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2020-12-01T20:19:44Z",
    "updated_at": "2020-12-02T12:10:21Z",
    "user": "js-kalsi"
  },
  {
    "repo": "pytorch/vision",
    "number": 3068,
    "title": "torchvison.ops.nms uses too much gpu memory",
    "body": "hi there, i have a quesetion nms operator. \r\nIf i use torchvision.ops.nms to filter bbox, about 900MB GPU memory is used, where the input box and score are put into GPU. But there is no problem if the box and score in cpu.  meanwhile the time cost of gpu is 0.0007s, 0.0018s in cpu.\r\ni do not know actually why this operator uses such much GPU mem. or is there any configuration about nms to save gpu mem?\r\n\r\nmy torchvision version is 0.4.0. thanks~",
    "url": "https://github.com/pytorch/vision/issues/3068",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-12-01T07:44:41Z",
    "updated_at": "2021-03-23T15:48:01Z",
    "user": "ThomsonW"
  },
  {
    "repo": "pytorch/vision",
    "number": 3064,
    "title": "I cannot reach the ori accuracy by training the ResNeXt-50 on the ImageNet. ",
    "body": "I use the ['PyTorch ImageNet Training' example](https://github.com/pytorch/examples/tree/master/imagenet) and the ['models'](https://github.com/pytorch/vision/tree/master/torchvision/models) of TorchVision 0.4.2 to train ResNeXt-50 twice but got 23.52% and 23.57% (Top-1) on ImageNet Val set, which do not reach the ori Err. (22.2%). Besides, I find that the hyper parameters setting of ['PyTorch ImageNet Training' example](https://github.com/pytorch/examples/tree/master/imagenet) is same to the [original paper](https://arxiv.org/abs/1611.05431). Can you give me some advices for training to reach the ori Err. ?\r\n\r\nThe val acc alongside training is shown below: \r\n<summary>\r\nlogs\r\n<details>\r\nTop-1\r\n16.894\r\n32.488\r\n36.116\r\n40.272\r\n45.394\r\n46.328\r\n50.126\r\n50.336\r\n52.242\r\n54.414\r\n53.096\r\n54.438\r\n55.662\r\n54.972\r\n55.902\r\n57.204\r\n54.932\r\n57.068\r\n55.586\r\n56.9\r\n58.018\r\n56.67\r\n58.564\r\n57.272\r\n58.224\r\n57.736\r\n57.816\r\n58.292\r\n57.618\r\n56.664\r\n70.7\r\n71.502\r\n72.04\r\n72.452\r\n72.69\r\n72.754\r\n73.03\r\n72.996\r\n72.504\r\n72.812\r\n72.318\r\n72.294\r\n72.584\r\n72.318\r\n72.42\r\n72.528\r\n72.238\r\n72.14\r\n71.76\r\n71.91\r\n72.282\r\n72.508\r\n72.156\r\n71.424\r\n72.3\r\n72.48\r\n72.42\r\n72.61\r\n72.61\r\n72.178\r\n75.62\r\n75.86\r\n76.16\r\n76.184\r\n76.26\r\n76.252\r\n76.376\r\n76.3\r\n76.404\r\n76.48\r\n76.326\r\n76.368\r\n76.304\r\n76.386\r\n76.462\r\n76.36\r\n76.452\r\n76.396\r\n76.258\r\n76.308\r\n76.334\r\n76.228\r\n76.252\r\n76.304\r\n76.15\r\n76.298\r\n76.362\r\n76.15\r\n76.17\r\n76.058\r\n</details>\r\n</summary>\r\n\r\nEDIT: (vfdev-5) I updated the message and put the training logs into summary/details block.\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/3064",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2020-11-30T19:53:15Z",
    "updated_at": "2021-04-25T16:12:11Z",
    "user": "PoonKinWang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 48576,
    "title": "how to avoid the precision loss(float32) caused by the gradient accumulation of Ring Allreduce in the case of ddp",
    "body": "## \u2753 Questions and Help\r\n\r\n### how to avoid the precision loss(float32) caused by the gradient accumulation of Ring Allreduce in the case of ddp.\r\n\r\n\r\nHow to avoid the precision loss(float32) caused by the gradient accumulation of Ring Allreduce in the case of ddp\r\n\r\nwhen run model in single gpu twice, the weight is always same; \r\nwhen run model in ddp twice , the weight is different in grad apply. \r\n\r\nI suspect that the gradient error is accumulated in the Ring Allreduce.\r\n\r\n\r\n\n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd",
    "url": "https://github.com/pytorch/pytorch/issues/48576",
    "state": "closed",
    "labels": [
      "oncall: distributed",
      "triaged"
    ],
    "created_at": "2020-11-30T09:24:09Z",
    "updated_at": "2020-12-07T01:42:03Z",
    "user": "lezasantaizi"
  },
  {
    "repo": "pytorch/vision",
    "number": 3058,
    "title": "How to solve this error? RuntimeError: Could not run 'torchvision::nms' with arguments from the 'CUDA' backend",
    "body": "## \u2753 Questions and Help\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nI'm beginner of ML and trying to use some solution based on pytorch (called detectron2)\r\nWhen the solution inferred the image, I always got the below error.\r\n\r\nRuntimeError: Could not run 'torchvision::nms' with arguments from the 'CUDA' backend. 'torchvision::nms' is only available for these backends: [CPU, BackendSelect, Named, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, Tracer, Autocast, Batched, VmapMode].\r\n\r\nActually, I didn't get this error and couldn't search anything about this on google.\r\nIs there anybody who knows the way to handle this?\r\n\r\nInfo:\r\nI installed the CUDA v11.1 from https://developer.nvidia.com/cuda-downloads \r\ntorch version: 1.7.0\r\ntorchvision version: 0.8.0",
    "url": "https://github.com/pytorch/vision/issues/3058",
    "state": "open",
    "labels": [
      "needs reproduction",
      "module: ops"
    ],
    "created_at": "2020-11-30T08:17:04Z",
    "updated_at": "2024-01-18T01:41:05Z",
    "user": "manmani3"
  },
  {
    "repo": "pytorch/vision",
    "number": 3056,
    "title": "torchvision.roi_align does not support TPU",
    "body": "Hello. \r\nWe are using TPU in GCP.\r\n\r\nWe are currently modifying the code to allow the TPU to return to Detectron2.\r\nHowever, there is an error that roi_align in Torchvision is not supported by TPU.\r\nPlease check the bottom. Can you solve it for me?\r\n\r\n`File \"/anaconda3/envs/torch-xla-1.7/lib/python3.6/site-packages/torchvision/ops/roi_align.py\", line 51, in roi_align\r\n    return torch.ops.torchvision.roi_align(input, rois, spatial_scale, output_size[0], output_size[1], sampling_ratio, aligned)\r\nRuntimeError: Could not run 'torchvision::roi_align' with arguments from the 'XLA' backend. 'torchvision::roi_align' is only available for these backends: [CPU, BackendSelect, Named, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, AutogradPrivateUse1, AutogradPrivateUse2, AutogradPrivateUse3, Tracer, Autocast, Batched, VmapMode].`",
    "url": "https://github.com/pytorch/vision/issues/3056",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2020-11-28T12:16:32Z",
    "updated_at": "2020-11-30T10:06:01Z",
    "user": "CheonJiEun"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 48528,
    "title": "I am unable to install, How to install it?",
    "body": "## \u2753 Questions and Help\r\n\r\n### I am unable to install pytorch like the way they said\r\n\r\nHere are all the screen shots to describe error is most of the detail\r\n\r\n#### Website\r\n<img width=\"960\" alt=\"chrome page\" src=\"https://user-images.githubusercontent.com/71920621/100496065-07ffb580-3177-11eb-9e8d-7445d613e97f.PNG\">\r\n\r\n#### Command Prompt\r\n<img width=\"614\" alt=\"cmd\" src=\"https://user-images.githubusercontent.com/71920621/100496068-1221b400-3177-11eb-8402-856ac1d037d7.PNG\">\r\n\r\n#### System Info\r\n<img width=\"900\" alt=\"sys1\" src=\"https://user-images.githubusercontent.com/71920621/100496070-18179500-3177-11eb-8a80-6c0d1638f557.PNG\">\r\n<img width=\"900\" alt=\"sys2\" src=\"https://user-images.githubusercontent.com/71920621/100496073-1cdc4900-3177-11eb-97d7-e57f1cbf6659.PNG\">\r\n\n\ncc @ezyang @seemethere @malfet @walterddr @peterjc123 @maxluk @nbcsm @guyang3532 @gunandrose4u @mszhanyi @skyline75489",
    "url": "https://github.com/pytorch/pytorch/issues/48528",
    "state": "closed",
    "labels": [
      "module: binaries",
      "module: windows",
      "triaged"
    ],
    "created_at": "2020-11-28T07:13:38Z",
    "updated_at": "2020-11-30T15:44:32Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/vision",
    "number": 3049,
    "title": "In function `ROIPool_forward(at::Tensor const&, at::Tensor const&, double, long, long)':",
    "body": "https://github.com/pytorch/vision/issues/1849, i try this,but it cannot work. Please help me . Thanks a lot.\r\n\r\nIn function `ROIPool_forward(at::Tensor const&, at::Tensor const&, double, long, long)':\r\nundefined reference to `ROIPool_forward_cuda(at::Tensor const&, at::Tensor const&, float, int, int)'\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/3049",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-11-26T10:34:31Z",
    "updated_at": "2020-12-24T08:58:28Z",
    "user": "wj1017090777"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 242,
    "title": "Failure when add aten::gt converter",
    "body": "I was trying add new conveter aten::gt.Scalar(Tensor self, Scalar other) -> Tensor, but it failed in test_case\r\n\r\n\r\nin core/conversion/conveters/impl/element_wise.cpp, I add this\r\n```\r\n        .pattern({\"aten::gt.Scalar(Tensor self, Scalar other) -> (Tensor)\",\r\n                  [](ConversionCtx* ctx, const torch::jit::Node* n, args& args) -> bool {\r\n                    // TODO: Remove with functionalization\r\n                    auto self = args[0].ITensorOrFreeze(ctx);\r\n                    auto otherScalar = args[1].unwrapToScalar().to<float>();\r\n                    auto other = tensor_to_const(ctx, torch::tensor({otherScalar}));\r\n                    auto gt =\r\n                        add_elementwise(ctx, nvinfer1::ElementWiseOperation::kGREATER, self, other, util::node_info(n));\r\n                    TRTORCH_CHECK(gt, \"Unable to create Greater layer from node: \" << *n);\r\n\r\n                    gt->setName(util::node_info(n).c_str());\r\n                    auto out = ctx->AssociateValueAndTensor(n->outputs()[0], gt->getOutput(0));\r\n\r\n                    LOG_DEBUG(\"Output tensor shape: \" << out->getDimensions());\r\n                    return true;\r\n                  }})\r\n```\r\n\r\nin tests/core/convters/test_element_wise.cpp, I add this\r\n```\r\nTEST(Converters, ATenGtWithScalarConvertsCorrectly) {\r\n  const auto graph = R\"IR(\r\n      graph(%0 : Tensor):\r\n        %scalar : float = prim::Constant[value=0.5]()\r\n        %1 : Tensor = aten::gt(%0, %scalar)\r\n        return (%1))IR\";\r\n  pointwise_test_helper(graph, true);\r\n}\r\n```\r\n\r\nAnd I use following command to build and test\r\n```\r\nbazel build //:libtrtorch --compilation_mode opt --distdir third_party/dist_dir/x86_64-linux-gnu\r\nbazel build //tests/core/converters:test_converters --compilation_mode opt --distdir third_party/dist_dir/x86_64-linux-gnu\r\nbazel run //tests/core/converters:test_element_wise\r\n```\r\n\r\nAnd get this error message\r\n```\r\n[ RUN      ] Converters.ATenGtWithScalarConvertsCorrectly\r\nDEBUG: [TRTorch - Debug Build] - Running JIT version\r\nDEBUG: [TRTorch - Debug Build] - Running TRT version\r\nDEBUG: [TRTorch - Debug Build] - Settings requested for TensorRT engine:\r\n    Operating Precision: Float32\r\n    Make Refittable Engine: 0\r\n    Debuggable Engine: 0\r\n    Strict Types: 0\r\n    GPU ID: 0\r\n    Allow GPU Fallback (if running on DLA): 0\r\n    Min Timing Iterations: 2\r\n    Avg Timing Iterations: 1\r\n    Max Workspace Size: 1048576\r\n    Max Batch Size: Not set\r\n    Device Type: GPU\r\n    GPU ID: 0\r\n    Engine Capability: Default\r\n    Calibrator Created: 0\r\nINFO: [TRTorch Conversion Context] - Converting Block\r\nINFO: [TRTorch Conversion Context] - Adding Input 0 named input_0 in engine (conversion.AddInputs)\r\nDEBUG: [TRTorch Conversion Context] - Input shape set to [5]\r\nDEBUG: [TRTorch Conversion Context] - Evaluating %1 : float = prim::Constant[value=0.5]()\r\nDEBUG: [TRTorch Conversion Context] - Found the value to be: 0.5\r\nINFO: [TRTorch Conversion Context] - Adding Layer %2 : Tensor = aten::gt(%0, %1) (ctx.AddLayer)\r\nDEBUG: [TRTorch Conversion Context] - Node input is an already converted tensor\r\nDEBUG: [TRTorch Conversion Context] - Node input is a result of a previously evaluated value\r\nDEBUG: [TRTorch - Debug Build] - Frozen tensor shape: [5]\r\nDEBUG: [TRTorch - Debug Build] - Weights: [1]\r\n    Number of input maps: 1\r\n    Number of output maps: 1\r\n    Element shape: [1]\r\nDEBUG: [TRTorch Conversion Context] - Freezing tensor 0x662238f0 as an IConstantLayer\r\nDEBUG: [TRTorch - Debug Build] - Output tensor shape: [5]\r\nINFO: [TRTorch Conversion Context] - Marking Output 2 named output_0 in engine (ctx.MarkOutput)\r\nDEBUG: [TRTorch Conversion Context] - Applying generic optimizations to the graph for inference.\r\nDEBUG: [TRTorch Conversion Context] - Original: 2 layers\r\nDEBUG: [TRTorch Conversion Context] - After dead-layer removal: 2 layers\r\nDEBUG: [TRTorch Conversion Context] - After Myelin optimization: 2 layers\r\nDEBUG: [TRTorch Conversion Context] - After scale fusion: 2 layers\r\nDEBUG: [TRTorch Conversion Context] - After vertical fusions: 2 layers\r\nDEBUG: [TRTorch Conversion Context] - After final dead-layer removal: 1 layers\r\nDEBUG: [TRTorch Conversion Context] - After tensor merging: 1 layers\r\nDEBUG: [TRTorch Conversion Context] - After concat removal: 1 layers\r\nDEBUG: [TRTorch Conversion Context] - Graph construction and optimization completed in 0.000104867 seconds.\r\nDEBUG: [TRTorch Conversion Context] - Constructing optimization profile number 0 out of 1\r\n*************** Autotuning format combination: Float(1) -> Bool(1) ***************\r\nDEBUG: [TRTorch Conversion Context] - --------------- Timing Runner: {%2 : Tensor = aten::gt(%0, %1)} (Myelin)\r\nDEBUG: [TRTorch Conversion Context] - Tactic: 0 is the only option, timing skipped\r\nDEBUG: [TRTorch Conversion Context] - Fastest Tactic: 0 Time: 0\r\nDEBUG: [TRTorch Conversion Context] - Formats and tactics selection completed in 0.0941442 seconds.\r\nDEBUG: [TRTorch Conversion Context] - After reformat layers: 1 layers\r",
    "url": "https://github.com/pytorch/TensorRT/issues/242",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2020-11-26T06:45:23Z",
    "updated_at": "2021-01-22T00:34:40Z",
    "user": "inocsin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 48444,
    "title": "How to export to onnx with nms?",
    "body": "Hi, I am trying to add nms in pytorch detection model and export it to onnx so that I can convert the onnx to tensorrt7.1, so how can I export a model with nms ? Any examples or documents?\r\nThanks.",
    "url": "https://github.com/pytorch/pytorch/issues/48444",
    "state": "closed",
    "labels": [],
    "created_at": "2020-11-25T08:32:56Z",
    "updated_at": "2020-11-26T00:58:23Z",
    "user": "Edwardmark"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 240,
    "title": "\u2753 [Question] How to solve aten::floor converter not found?",
    "body": "## \u2753 Question\r\n\r\nHow to solve aten::floor converter not found?\r\n\r\n## What you have already tried\r\n\r\n I am trying to convert a jit trace of a Fast SCNN network into TensorRT.  I've confirmed that the trace was created in python3.6 using PyTorch 1.6.0.  When printing the trace graph I do not even see the aten::floor operator.  I also cannot locate a torch.floor operator in the original PyTorch model structure so I'm not sure what is even calling this operator?  Here is the resulting error:\r\n```\r\nRuntimeError: [enforce fail at core/conversion/conversion.cpp:112] Expected converter to be true but got false\r\nUnable to convert node: %376 : Tensor = aten::floor(%324) # /home/nmonhollen/tensorrt/venv/lib/python3.6/site-packages/torch/nn/functional.py:3010:0 (conversion.AddLayer)\r\nSchema: aten::floor.int(int a) -> (int)\r\nConverter for aten::floor requested, but no such converter was found.\r\nIf you need a converter for this operator, you can try implementing one yourself\r\nor request a converter: https://www.github.com/NVIDIA/TRTorch/issues\r\n```\r\n\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.6.0\r\n - CPU Architecture: x86-64\r\n - OS (e.g., Linux): Ubuntu 18.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip\r\n - Build command you used (if compiling from source): \r\n - Are you using local sources or building from archives: local sources (cuDNN=7.6.5, TensorRT=7.0.0.11)\r\n - Python version: 3.6.9\r\n - CUDA version: 10.2\r\n - GPU models and configuration: \r\n - Any other relevant information:\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/240",
    "state": "closed",
    "labels": [
      "feature request",
      "question"
    ],
    "created_at": "2020-11-24T16:13:34Z",
    "updated_at": "2021-04-22T00:54:15Z",
    "user": "nmonhollen"
  },
  {
    "repo": "huggingface/datasets",
    "number": 883,
    "title": "Downloading/caching only a part of a datasets' dataset.",
    "body": "Hi,\r\nI want to use the validation data *only* (of natural question).\r\nI don't want to have the whole dataset cached in my machine, just the dev set.\r\nIs this possible? I can't find a way to do it in the docs.\r\n\r\nThank you,\r\nSapir",
    "url": "https://github.com/huggingface/datasets/issues/883",
    "state": "open",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2020-11-24T14:25:18Z",
    "updated_at": "2020-11-27T13:51:55Z",
    "user": "SapirWeissbuch"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 48390,
    "title": "what is the different between https://download.pytorch.org/whl/torch_stable.html and the tag",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/48390",
    "state": "closed",
    "labels": [],
    "created_at": "2020-11-23T12:40:06Z",
    "updated_at": "2020-11-26T01:06:09Z",
    "user": "jihuacao"
  },
  {
    "repo": "huggingface/datasets",
    "number": 878,
    "title": "Loading Data From S3 Path in Sagemaker",
    "body": "In Sagemaker Im tring to load the data set from S3 path as follows\r\n\r\n`train_path = 's3://xxxxxxxxxx/xxxxxxxxxx/train.csv'\r\n    valid_path = 's3://xxxxxxxxxx/xxxxxxxxxx/validation.csv'\r\n    test_path = 's3://xxxxxxxxxx/xxxxxxxxxx/test.csv'\r\n    \r\n    data_files = {}\r\n    data_files[\"train\"] = train_path\r\n    data_files[\"validation\"] = valid_path\r\n    data_files[\"test\"] = test_path\r\n    extension = train_path.split(\".\")[-1]\r\n    datasets = load_dataset(extension, data_files=data_files, s3_enabled=True)\r\n    print(datasets)`\r\n\r\n\r\nI getting an error of\r\n\r\n`algo-1-7plil_1  |   File \"main.py\", line 21, in <module>\r\nalgo-1-7plil_1  |     datasets = load_dataset(extension, data_files=data_files)\r\nalgo-1-7plil_1  |   File \"/opt/conda/lib/python3.6/site-packages/datasets/load.py\", line 603, in load_dataset\r\nalgo-1-7plil_1  |     **config_kwargs,\r\nalgo-1-7plil_1  |   File \"/opt/conda/lib/python3.6/site-packages/datasets/builder.py\", line 155, in __init__\r\nalgo-1-7plil_1  |     **config_kwargs,\r\nalgo-1-7plil_1  |   File \"/opt/conda/lib/python3.6/site-packages/datasets/builder.py\", line 305, in _create_builder_config\r\nalgo-1-7plil_1  |     m.update(str(os.path.getmtime(data_file)))\r\nalgo-1-7plil_1  |   File \"/opt/conda/lib/python3.6/genericpath.py\", line 55, in getmtime\r\nalgo-1-7plil_1  |     return os.stat(filename).st_mtime\r\nalgo-1-7plil_1  | FileNotFoundError: [Errno 2] No such file or directory: 's3://lsmv-sagemaker/pubmedbert/test.csv`\r\n\r\nBut when im trying with pandas , it is able to load from S3\r\n\r\nDoes the datasets library support S3 path to load",
    "url": "https://github.com/huggingface/datasets/issues/878",
    "state": "open",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2020-11-23T09:17:22Z",
    "updated_at": "2020-12-23T09:53:08Z",
    "user": "mahesh1amour"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 235,
    "title": "\u2753[Question] Dynamic shape for ResNet-50",
    "body": "## \u2753 Question\r\n\r\nHi, I try to convert ResNet-50 with dynamic shape: \r\n```\r\n   {\r\n        \"min\": (1, 3, 224, 224),\r\n        \"opt\": (1, 3, 224, 224),\r\n        \"max\": (3, 3, 224, 224)\r\n    }\r\n``` \r\n, but i get this error:\r\n```\r\nERROR: [TRTorch Conversion Context] - %x.21 : Tensor = aten::flatten(%x.19, %3, %81) # /root/.cache/torch/hub/pytorch_vision_v0.6.0/torchvision/models/resnet.py:214:12: at most one dimension may be inferred\r\nERROR: [TRTorch Conversion Context] - %x.21 : Tensor = aten::flatten(%x.19, %3, %81) # /root/.cache/torch/hub/pytorch_vision_v0.6.0/torchvision/models/resnet.py:214:12: at most one dimension may be inferred\r\nERROR: [TRTorch Conversion Context] - %x.21 : Tensor = aten::flatten(%x.19, %3, %81) # /root/.cache/torch/hub/pytorch_vision_v0.6.0/torchvision/models/resnet.py:214:12: at most one dimension may be inferred\r\nERROR: [TRTorch Conversion Context] - %x.21 : Tensor = aten::flatten(%x.19, %3, %81) # /root/.cache/torch/hub/pytorch_vision_v0.6.0/torchvision/models/resnet.py:214:12: at most one dimension may be inferred\r\nERROR: [TRTorch Conversion Context] - %x.21 : Tensor = aten::flatten(%x.19, %3, %81) # /root/.cache/torch/hub/pytorch_vision_v0.6.0/torchvision/models/resnet.py:214:12: at most one dimension may be inferred\r\nERROR: [TRTorch Conversion Context] - %x.21 : Tensor = aten::flatten(%x.19, %3, %81) # /root/.cache/torch/hub/pytorch_vision_v0.6.0/torchvision/models/resnet.py:214:12: at most one dimension may be inferred\r\nERROR: [TRTorch Conversion Context] - %x.21 : Tensor = aten::flatten(%x.19, %3, %81) # /root/.cache/torch/hub/pytorch_vision_v0.6.0/torchvision/models/resnet.py:214:12: at most one dimension may be inferred\r\nERROR: [TRTorch Conversion Context] - %x.21 : Tensor = aten::flatten(%x.19, %3, %81) # /root/.cache/torch/hub/pytorch_vision_v0.6.0/torchvision/models/resnet.py:214:12: at most one dimension may be inferred\r\nERROR: [TRTorch Conversion Context] - %x.21 : Tensor = aten::flatten(%x.19, %3, %81) # /root/.cache/torch/hub/pytorch_vision_v0.6.0/torchvision/models/resnet.py:214:12: at most one dimension may be inferred\r\nERROR: [TRTorch Conversion Context] - %x.21 : Tensor = aten::flatten(%x.19, %3, %81) # /root/.cache/torch/hub/pytorch_vision_v0.6.0/torchvision/models/resnet.py:214:12: at most one dimension may be inferred\r\nERROR: [TRTorch Conversion Context] - %x.21 : Tensor = aten::flatten(%x.19, %3, %81) # /root/.cache/torch/hub/pytorch_vision_v0.6.0/torchvision/models/resnet.py:214:12: at most one dimension may be inferred\r\nSegmentation fault (core dumped)\r\n```\r\n\r\nCode: \r\n```\r\nimport torch\r\nimport trtorch\r\n\r\ntorch_model = torch.hub.load('pytorch/vision:v0.6.0', 'resnet50', pretrained=False)\r\nscript_model = torch.jit.script(torch_model.eval().cuda())\r\ntrt_model = trtorch.compile(script_model, {\r\n    \"input_shapes\": [{\r\n        \"min\": (1, 3, 224, 224),\r\n        \"opt\": (1, 3, 224, 224),\r\n        \"max\": (3, 3, 224, 224)\r\n    }],\r\n    \"op_precision\": torch.float32,\r\n})\r\n```\r\n\r\n## What you have already tried\r\n\r\nI run this [code](https://github.com/NVIDIA/TRTorch/issues/193#issuecomment-718162687). It works correct.\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - docker image: nvcr.io/nvidia/tensorrt :20.03-py3\r\n - PyTorch Version (e.g., 1.0): 1.6.0, installed with pip\r\n - CPU Architecture: x86\r\n - OS (e.g., Linux): Ubuntu 18.04\r\n - How installed TRTorch: pip install https://github.com/NVIDIA/TRTorch/releases/download/v0.1.0/trtorch-0.1.0-cp36-cp36m-linux_x86_64.whl\r\n - Python version: 3.6.9\r\n - CUDA version: 10.2\r\n - GPU models and configuration: RTX 2060 SUPER",
    "url": "https://github.com/pytorch/TensorRT/issues/235",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-11-23T05:02:13Z",
    "updated_at": "2021-02-23T23:25:09Z",
    "user": "gavrin-s"
  },
  {
    "repo": "pytorch/vision",
    "number": 3040,
    "title": "I am not able to obtain results with custom backbone",
    "body": "_I am following the tutorial about FasterRCNN and I would like to test my network as backbone of the net:\r\n\r\nUCapsNet return 512 features maps\r\nI am training on VocPascal 2007_\r\n\r\n\r\nFRCN_model = FasterRCNN(backbone_model.Ucapsnet, 21, rpn_anchor_generator=backbone_model.anchor_generator, box_roi_pool=backbone_model.roi_pooler)\r\nFRCN_model = FRCN_model.to(device)\r\n\r\nparams = [p for p in FRCN_model.parameters() if p.requires_grad]\r\noptimizer = torch.optim.SGD(params, lr=0.02, momentum=0.9, weight_decay=1e-4)\r\n\r\npbar = tqdm(range(n_epochs))\r\nfor epoch in pbar:\r\n    train_one_epoch(FRCN_model, optimizer, dataloaders['train'], device, epoch, print_freq=10)\r\n    evaluate(FRCN_model, dataloaders['val'], device=device)\r\n\r\n\r\n**I got**:\r\nAveraged stats: model_time: 1605886336.0000 (1605886304.8101)  evaluator_time: 0.0275 (0.0285)\r\nAccumulating evaluation results...\r\nDONE (t=0.06s).\r\nIoU metric: bbox\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.000\r\n\r\n\r\nIn training, the loss is dropping slowly to 1.15 but in evaluation, i do not get anything. \r\n\r\nPlease help me understand\r\n\r\ncc @fmassa ",
    "url": "https://github.com/pytorch/vision/issues/3040",
    "state": "open",
    "labels": [
      "question",
      "module: documentation"
    ],
    "created_at": "2020-11-20T15:45:08Z",
    "updated_at": "2020-11-24T08:08:56Z",
    "user": "Riretta"
  },
  {
    "repo": "pytorch/vision",
    "number": 3036,
    "title": "Faster R-CNN raise errors when input  tensor has require_grad=True",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nI am using the pretrained Faster R-CNN model in torchvision as a sub-model in my own image generating model. In fact,I need the Faster R-CNN to backward properly when training my whole model.\r\nBut I found that when i feed the  Faster R-CNN model in torchvision with the input having  require_grad=True,it will raise following errors.\r\n```\r\nimport torch\r\nimport torchvision\r\n\r\nif __name__ == '__main__':\r\n    Faster_RCNN_ins=torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True, progress=True,\r\n num_classes=91,pretrained_backbone=True)\r\n    Faster_RCNN_ins.eval()\r\n    Faster_RCNN_ins(torch.zeros(2,3,256,256,requires_grad=True))\r\n```\r\nOR\r\n```\r\nimport torch\r\nimport torchvision\r\n\r\nif __name__ == '__main__':\r\n    Faster_RCNN_ins=torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True, progress=True,\r\n num_classes=91,pretrained_backbone=True)\r\n    Faster_RCNN_ins.eval()\r\n    out_tep=nn.Conv2d(3,3,3,stride=1,padding=1)(torch.zeros(2,3,256,256))\r\n    Faster_RCNN_ins(out_tep)\r\n```\r\nboth code blocks will raise error:\r\n```\r\n  File \"/data/gaoyan/style_transfer/scripts/tep.py\", line 23, in <module>\r\n    Faster_RCNN_ins(torch.zeros(2,3,256,256,requires_grad=True))\r\n  File \"/data/gaoyan/.local/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 727, in _call_impl\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/data/gaoyan/.local/lib/python3.6/site-packages/torchvision/models/detection/generalized_rcnn.py\", line 80, in forward\r\n    images, targets = self.transform(images, targets)\r\n  File \"/data/gaoyan/.local/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 727, in _call_impl\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/data/gaoyan/.local/lib/python3.6/site-packages/torchvision/models/detection/transform.py\", line 111, in forward\r\n    images = self.batch_images(images)\r\n  File \"/data/gaoyan/.local/lib/python3.6/site-packages/torchvision/models/detection/transform.py\", line 211, in batch_images\r\n    pad_img[: img.shape[0], : img.shape[1], : img.shape[2]].copy_(img)\r\nRuntimeError: A view was created in no_grad mode and its base or another view of its base has been modified inplace with grad mode enabled. This view is the output of a function that returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace operation by an out-of-place one.\r\n```\r\n\r\n\r\n\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\nIt can forward and backward wihout errors.\r\n## Environment\r\n\r\noutput of the environment script\r\n```\r\nPyTorch version: 1.7.0\r\nIs debug build: True\r\nCUDA used to build PyTorch: 10.2\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: CentOS Linux 7 (Core) (x86_64)\r\nGCC version: (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)\r\nClang version: Could not collect\r\nCMake version: Could not collect\r\n\r\nPython version: 3.6 (64-bit runtime)\r\nIs CUDA available: True\r\nCUDA runtime version: 10.1.243\r\nGPU models and configuration: \r\nGPU 0: Tesla V100-SXM2-32GB\r\nGPU 1: Tesla V100-SXM2-32GB\r\nGPU 2: Tesla V100-SXM2-32GB\r\nGPU 3: Tesla V100-SXM2-32GB\r\n\r\nNvidia driver version: 440.33.01\r\ncuDNN version: /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudnn.so.7.6.5\r\nHIP runtime version: N/A\r\nMIOpen runtime version: N/A\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.19.4\r\n[pip3] pytorch-model-summary==0.1.2\r\n[pip3] torch==1.7.0\r\n[pip3] torchstat==0.0.7\r\n[pip3] torchsummary==1.5.1\r\n[pip3] torchvision==0.8.1\r\n[conda] Could not collect\r\n```\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\nI think the bug may lay in torchvision/models/detection/transform.py\r\n```\r\n    def batch_images(self, images, size_divisible=32):\r\n        # type: (List[Tensor], int) -> Tensor\r\n        if torchvision._is_tracing():\r\n            # batch_images() does not export well to ONNX\r\n            # call _onnx_batch_images() instead\r\n            return self._onnx_batch_images(images, size_divisible)\r\n\r\n        max_size = self.max_by_axis([list(img.shape) for img in images])\r\n        stride = float(size_divisible)\r\n        max_size = list(max_size)\r\n        max_size[1] = int(math.ceil(float(max_size[1]) / stride) * stride)\r\n        max_size[2] = int(math.ceil(float(max_size[2]) / stride) * stride)\r\n\r\n        batch_shape = [len(images)] + max_size\r\n        batched_imgs = images[0].new_full(batch_shape, 0)\r\n        for img, pad_img in zip(images, batched_imgs):\r\n            pad_img[: img.shape[0], : img.shape[1], : img.shape[2]].copy_(img)\r\n\r\n        return batched_imgs\r\n```\r\nthis funciton cannot work when images is a list of tensors with require_grad=True\r\n",
    "url": "https://github.com/pytorch/vision/issues/3036",
    "state": "closed",
    "labels": [
      "question",
      "wontfix",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-11-20T06:38:35Z",
    "updated_at": "2020-11-20T09:38:14Z",
    "user": "EZ4NO1"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 232,
    "title": "How do you activate trtorch::CompileGraph with multi inputs?",
    "body": "## \u2753 Question\r\n\r\nCan you provide an example of using more than one input please?\r\n\r\n\r\n## What you have already tried\r\n\r\nFor example I tried to do the following:\r\n` auto Input1= torch::randn({ 4, 24, 64, 64 }, { torch::kCUDA });\r\n  auto Input2= torch::randn({ 1, 24, 1, 1 }, { torch::kCUDA });\r\n\r\nstd::vector<trtorch::CompileSpec::InputRange> inputRanges;\r\n\r\ninputRanges.push_back(Input1.sizes());\r\ninputRanges.push_back(Input2.sizes());\r\n\r\nauto trt_mod = trtorch::CompileGraph(module, inputRanges);\r\n\r\n`\r\n\r\nA std::out_of_range exception was raised.\r\n\r\nI can't be sure that the exception root cause related to the multi inputs that I used but for now I have no other suspicious.\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.6\r\n - CPU Architecture: Jetson Xavier AGX\r\n - OS (e.g., Linux): JetPack 4.4\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip3\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives: Local\r\n - Python version: 3.6.9\r\n - CUDA version: 10.2\r\n - GPU models and configuration: Jetson Xavier AGX\r\n - Any other relevant information: JetPack 4.4\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/232",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-11-19T14:35:22Z",
    "updated_at": "2020-11-24T15:56:11Z",
    "user": "OronG13"
  },
  {
    "repo": "pytorch/vision",
    "number": 3030,
    "title": "randomroate by some change",
    "body": "```\r\ndef mapper(dataset_dict):\r\n    dataset_dict = copy.deepcopy(dataset_dict)  # it will be modified by code below\r\n    image = utils.read_image(dataset_dict[\"file_name\"], format=\"BGR\")    \r\n    transform_list = [\r\n                  \r\n                     T.ResizeShortestEdge(short_edge_length=(640, 672, 704, 736, 768, 800), max_size=1333, sample_style='choice')\r\n                     ,T.RandomRotation([10,15])\r\n                \r\n                      ]\r\n    image, transforms = T.apply_transform_gens(transform_list, image)\r\n    dataset_dict[\"image\"] = torch.as_tensor(image.transpose(2, 0, 1).astype(\"float32\"))\r\n\r\n    \r\n    #print('image_shape->',image.shape,image.shape[:2])\r\n\r\n    annos = [\r\n        utils.transform_instance_annotations(obj, transforms, image.shape[:2])\r\n        for obj in dataset_dict.pop(\"annotations\")\r\n        if obj.get(\"iscrowd\", 0) == 0\r\n    ]\r\n\r\n    instances = utils.annotations_to_instances(annos, image.shape[:2])\r\n    dataset_dict[\"instances\"] = instances\r\n    #dataset_dict[\"instances\"] = utils.filter_empty_instances(instances)\r\n    return dataset_dict\r\n```\r\nthis is my mapper for augmentation.\r\nis T.RandomRotation([10,15]) happen every image? or by some change. \r\nif it apply to every images. how should I apply it by only some percentage?\r\n\n\ncc @vfdev-5",
    "url": "https://github.com/pytorch/vision/issues/3030",
    "state": "open",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2020-11-19T14:22:27Z",
    "updated_at": "2020-11-20T09:39:28Z",
    "user": "SlowMonk"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 231,
    "title": "How to solve \"Unable to get schema\" issue",
    "body": "I was trying to compile torchscript model, and the log says \"Unable to get schema for Node\". What should I do to fix this problem?\r\n\r\n\r\n```\r\n  %2 : int = prim::Constant[value=2]()\r\n  %3 : int = prim::Constant[value=6]()\r\n  %4 : bool = prim::Constant[value=0]()\r\n  %5 : None = prim::Constant()\r\n  %6 : int[] = prim::Constant[value=[2]]()\r\n  %7 : bool = prim::Constant[value=1]()\r\n  %8 : int = prim::Constant[value=1]()\r\n  %9 : Tensor = prim::Constant[value={255}]()\r\n  %10 : Tensor = prim::Constant[value={0.447}]()\r\n  %11 : Tensor = prim::Constant[value={0.226}]()\r\n  %12 : Float(32:27, 3:9, 3:3, 3:1) = prim::Constant[value=<Tensor>]()\r\n  %13 : int[] = prim::Constant[value=[2, 2]]()\r\n\r\n........\r\n\r\nDEBUG: Unable to get schema for Node %323 : Tensor = aten::mean(%3, %6, %7, %5) # tasks/moco_simclr/export/export.py:21:0 (NodeConverterRegistry.Convertable)\r\nterminate called after throwing an instance of 'trtorch::Error'\r\n  what():  [enforce fail at core/conversion/conversion.cpp:392] Expected schema to be true but got false\r\nUnable to get schema for Node %323 : Tensor = aten::mean(%3, %6, %7, %5) # tasks/moco_simclr/export/export.py:21:0 (conversion.VerifyCoverterSupportForBlock)\r\n\r\n```",
    "url": "https://github.com/pytorch/TensorRT/issues/231",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2020-11-19T09:53:50Z",
    "updated_at": "2020-12-26T00:11:00Z",
    "user": "inocsin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 48241,
    "title": "How to use torch.onnx.export with customed input datatype, like SparseTensor?",
    "body": "## \u2753 Questions and Help\r\nIn this repo [torchsparse](https://github.com/mit-han-lab/torchsparse), there is a customed datatype [SparseTensor`](https://github.com/mit-han-lab/torchsparse/blob/d2a5817c1b30565ffdfcd191b171a0957db408a8/torchsparse/sparse_tensor.py#L6).\r\n```python\r\nclass SparseTensor:\r\n    def __init__(self, feats, coords, cur_tensor_stride=1):\r\n        self.F = feats\r\n        self.C = coords\r\n        self.s = cur_tensor_stride\r\n        self.coord_maps = {}\r\n        self.kernel_maps = {}\r\n\r\n    def check(self):\r\n        if self.s not in self.coord_maps:\r\n            self.coord_maps[self.s] = self.C\r\n\r\n    def cuda(self):\r\n        assert type(self.F) == torch.Tensor\r\n        assert type(self.C) == torch.Tensor\r\n        self.F = self.F.cuda()\r\n        self.C = self.C.cuda()\r\n        return self\r\n\r\n    def detach(self):\r\n        assert type(self.F) == torch.Tensor\r\n        assert type(self.C) == torch.Tensor\r\n        self.F = self.F.detach()\r\n        self.C = self.C.detach()\r\n        return self\r\n\r\n    def to(self, device, non_blocking=True):\r\n        assert type(self.F) == torch.Tensor\r\n        assert type(self.C) == torch.Tensor\r\n        self.F = self.F.to(device, non_blocking=non_blocking)\r\n        self.C = self.C.to(device, non_blocking=non_blocking)\r\n        return self\r\n\r\n    def __add__(self, other):\r\n        tensor = SparseTensor(self.F + other.F, self.C, self.s)\r\n        tensor.coord_maps = self.coord_maps\r\n        tensor.kernel_maps = self.kernel_maps\r\n        return tensor\r\n```\r\n\r\nAnd I want to export to ONNX model, but when I ran `torch.onnx.export`, I got this ERROR:\r\n```\r\nRuntimeError: Only tuples, lists and Variables supported as JIT inputs/outputs. \r\nDictionaries and strings are also accepted but their usage is not recommended. \r\nBut got unsupported type SparseTensor\r\n```\r\nThis problem may be same to other custome data types. \r\n\r\nI also noticed this line in [torch.onnx.__init__.py](https://github.com/pytorch/pytorch/blob/6da26fe79b7045fac743c81ca8d38c5340de17ab/torch/onnx/__init__.py#L45)\r\nWhat do you mean by this ?\r\n> Any non-Tensor arguments (including None) will be hard-coded into the exported model\r\n\r\n\r\nThanks in advance for any help!\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/48241",
    "state": "closed",
    "labels": [],
    "created_at": "2020-11-19T07:05:42Z",
    "updated_at": "2020-11-19T22:25:24Z",
    "user": "zeng-hello-world"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1247,
    "title": "Training with batch size > 1 for adverserial example generation",
    "body": "The tutorial notebook on [Adverserial Training](https://github.com/pytorch/tutorials/blob/master/beginner_source/fgsm_tutorial.py) uses a batch size of 1. What code changes are needed if we want to train on a batch size of say 16. My understanding is, we only need to change the logic of \r\n       `final_pred = output.max(1, keepdim=True)[1] # get the index of the max log-probability`\r\n       ` # Now we have batch size > 1`\r\n       `final_pred.squeeze_()`\r\n        `indexes = final_pred == target`\r\n       `correct += torch.sum(indexes).item()`\r\n\r\nIs there something else needed. With this code change, I get values that are very similar to the case of batch_size=1 although not the same values. Any help would be appreciated.",
    "url": "https://github.com/pytorch/tutorials/issues/1247",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-11-18T16:35:29Z",
    "updated_at": "2023-03-14T21:02:30Z",
    "user": "chinmay5"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 230,
    "title": "\u2753 [Question] We don't have an op for aten::addmm",
    "body": "## \u2753 Question\r\n\r\nI'm trying to convert a modified version of Yolov3 to TesnorRT, I have the model scripted to TorchScript and I'm trying to run trtorchexec on it\r\nI'm getting an error\r\n```\r\nChecking operator support\r\nterminate called after throwing an instance of 'c10::Error'\r\n  what():  0 INTERNAL ASSERT FAILED at \"../torch/csrc/jit/ir/alias_analysis.cpp\":461, please report a bug to PyTorch. We don't have an op for aten::addmm but it isn't a special case.  Argument types: Tensor, int[], int[], int[], int[], bool,\r\nException raised from analyzeImpl at ../torch/csrc/jit/ir/alias_analysis.cpp:461 (most recent call first):\r\n```\r\n\r\nI'm using the `pytorch_update` branch (since I need to use pytorch 1.7.0 & cuda 11.1), and I've merge master into it to get the latest updates (https://github.com/lablabla/TRTorch/tree/pytorch_update)\r\n\r\n## What you have already tried\r\n\r\n<!-- A clear and concise description of what you have already done. -->\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.7.0\r\n - CPU Architecture:\r\n - OS (e.g., Linux): Ubuntu 16.04\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): Built TRTorch from sources, Bazel downloads prebuilt 1.7.0\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives: local sources\r\n - Python version: 3.8.5\r\n - CUDA version: 11.1\r\n - GPU models and configuration: GeForce GTX 980\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\nI saw this commit https://github.com/NVIDIA/TRTorch/commit/c5b6202 so I figured `aten:addmm` should be supported, but I guess I'm missing something\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/230",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2020-11-18T15:41:45Z",
    "updated_at": "2021-04-20T00:02:56Z",
    "user": "lablabla"
  },
  {
    "repo": "pytorch/vision",
    "number": 3022,
    "title": "MaskRCNN Training on Images with no Annotations",
    "body": "Hi all,\r\nI am working on a little MaskRCNN training program and ran into an issue. I know it is common practice to remove any images from the dataset that lack annotations upon initializing the dataset which I am doing. However, I am running a series of transforms using albumentations on my image and my mask. One of these transforms is a random crop and sometimes the resulting mask image no longer contains any instances. I was trying to find a way to pass in an empty tensor of some kind without much success. Would it be common practice just to remove it from the batch, and if so what happens if you had a batch size of 1 or an image that only had one annotation and the chances the random crop came across it are really low. I was able to create an empty tensor and pass it in but then received this error.\r\n\r\n`RuntimeError: cannot reshape tensor of 0 elements into shape [0, -1] because the unspecified dimension size -1 can be any value and is ambiguous`\r\n\r\nThis is because my box tensor had a shape of 0, 4 which is what I want since there are no instances. I read some of the other issue reports and they talked about creating a background class and just making a small bounding box and having an empty segmentation mask but this seems a little hacky and I was wondering if there would be a better solution for my specific use case.\r\n",
    "url": "https://github.com/pytorch/vision/issues/3022",
    "state": "open",
    "labels": [
      "question",
      "awaiting response",
      "topic: object detection"
    ],
    "created_at": "2020-11-18T15:23:52Z",
    "updated_at": "2020-11-30T10:42:01Z",
    "user": "gatordevin"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 229,
    "title": "Build trtorch failed in ubuntu",
    "body": "I try to build the project with bazel but failed.\r\n\r\nmy environment:\r\ngcc: 7.5.0\r\ng++: 7.5.0\r\ncuda: 10.2\r\ncudnn: 7.6.5\r\ntensorRT: 7.0.0.11\r\n\r\nerror log:\r\n[log.txt](https://github.com/NVIDIA/TRTorch/files/5559949/log.txt)\r\n\r\n$ bazel build //:libtrtorch --compilation_mode opt\r\n\r\nStarting local Bazel server and connecting to it...\r\nINFO: Analyzed target //:libtrtorch (39 packages loaded, 2546 targets configured).\r\nINFO: Found 1 target...\r\nERROR: /home/vincent/Projects/TRTorch/cpp/trtorchc/BUILD:10:10: Linking of rule '//cpp/trtorchc:trtorchc' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc @bazel-out/k8-opt/bin/cpp/trtorchc/trtorchc-2.params\r\n\r\nUse --sandbox_debug to see verbose messages from the sandbox\r\nexternal/tensorrt/lib/x86_64-linux-gnu/libnvinfer_static.a(helpers.o):helpers.cpp:function nvinfer1::getNvrtcMajorVersion(): error: undefined reference to 'nvrtcVersion'\r\nexternal/tensorrt/lib/x86_64-linux-gnu/libnvinfer_static.a(profile.o):profile.cpp:function nvtxDomainSyncUserReleasing_impl_init_v3: error: undefined reference to 'dlopen'\r\nexternal/tensorrt/lib/x86_64-linux-gnu/libnvinfer_static.a(profile.o):profile.cpp:function nvtxDomainSyncUserReleasing_impl_init_v3: error: undefined reference to 'dlsym'\r\nexternal/tensorrt/lib/x86_64-linux-gnu/libnvinfer_static.a(profile.o):profile.cpp:function nvtxDomainSyncUserReleasing_impl_init_v3: error: undefined reference to 'dlclose'\r\nexternal/tensorrt/lib/x86_64-linux-gnu/libnvinfer_static.a(profile.o):profile.cpp:function nvtxDomainResourceDestroy_impl_init_v3: error: undefined reference to 'dlopen'\r\nexternal/tensorrt/lib/x86_64-linux-gnu/libnvinfer_static.a(profile.o):profile.cpp:function nvtxDomainResourceDestroy_impl_init_v3: error: undefined reference to 'dlsym'\r\nexternal/tensorrt/lib/x86_64-linux-gnu/libnvinfer_static.a(profile.o):profile.cpp:function nvtxDomainResourceDestroy_impl_init_v3: error: undefined reference to 'dlclose'\r\nexternal/tensorrt/lib/x86_64-linux-gnu/libnvinfer_static.a(profile.o):profile.cpp:function nvtxDomainDestroy_impl_init_v3: error: undefined reference to 'dlopen'\r\nexternal/tensorrt/lib/x86_64-linux-gnu/libnvinfer_static.a(profile.o):profile.cpp:function nvtxDomainDestroy_impl_init_v3: error: undefined reference to 'dlsym'\r\nexternal/tensorrt/lib/x86_64-linux-gnu/libnvinfer_static.a(profile.o):profile.cpp:function nvtxDomainDestroy_impl_init_v3: error: undefined reference to 'dlclose'\r\nexternal/tensorrt/lib/x86_64-linux-gnu/libnvinfer_static.a(profile.o):profile.cpp:function nvtxMarkA_impl_init_v3: error: undefined reference to 'dlopen'\r\nexternal/tensorrt/lib/x86_64-linux-gnu/libnvinfer_static.a(profile.o):profile.cpp:function nvtxMarkA_impl_init_v3: error: undefined reference to 'dlsym'\r\nexternal/tensorrt/lib/x86_64-linux-gnu/libnvinfer_static.a(profile.o):profile.cpp:function nvtxMarkA_impl_init_v3: error: undefined reference to 'dlclose'\r\n\r\ncould you help solve this problem, thanks a lot\r\n@narendasan",
    "url": "https://github.com/pytorch/TensorRT/issues/229",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-11-18T12:23:02Z",
    "updated_at": "2020-11-20T02:23:10Z",
    "user": "inocsin"
  },
  {
    "repo": "huggingface/datasets",
    "number": 861,
    "title": "Possible Bug: Small training/dataset file creates gigantic output",
    "body": "Hey guys,\r\n\r\nI was trying to create a new bert model from scratch via _huggingface transformers + tokenizers + dataets_ (actually using this example script by your team: https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_mlm.py). It was supposed to be a first test with a small 5 GB raw text file but I can't even end the preprocessing handled by datasets because this tiny 5 GB text file becomes more than 1 TB when processing. My system was running out of space and crashed prematurely.\r\n\r\nI've done training from scratch via Google's bert repo in the past and I can remember that the resulting pretraining data can become quite big. But 5 GB becoming 1 TB was never the case. Is this considered normal or is it a bug?\r\n\r\nI've used the following CMD:\r\n`python xla_spawn.py --num_cores=8 run_mlm.py --model_type bert --config_name config.json --tokenizer_name tokenizer.json --train_file dataset_full.txt --do_train --output_dir out --max_steps 500000 --save_steps 2500 --save_total_limit 2 --prediction_loss_only --line_by_line --max_seq_length 128 --pad_to_max_length --preprocessing_num_workers 16 --per_device_train_batch_size 128 --overwrite_output_dir --debug`\r\n\r\n",
    "url": "https://github.com/huggingface/datasets/issues/861",
    "state": "closed",
    "labels": [
      "enhancement",
      "question"
    ],
    "created_at": "2020-11-17T13:48:59Z",
    "updated_at": "2021-03-30T14:04:04Z",
    "user": "NebelAI"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 226,
    "title": "How to build from sources on Windows",
    "body": "## \u2753 Question\r\n\r\nHow shall I edit the WORKSPACE file in order to build tag 0.1.0 from sources on Windows?\r\n\r\n## What you have already tried\r\n\r\n1. I successfully did the build from sources process for Jetson Xavier AGX, see:\r\n[https://github.com/NVIDIA/TRTorch/issues/222](url)\r\n\r\n1. Based on the material that I was already had from the Jetson process I tried to do the same for my Windows by editing the WORKSPACE based on my Windows setup.\r\nI changed all required new_local_repository arguments of the cuda, torch, cudnn and tensorrt based on my Windows installations      \r\n1. Activate the following command:\r\nbazel build //:libtrtorch\r\n\r\nThe following errors report was generated:\r\n\r\nINFO: Repository rules_python instantiated at:\r\n  no stack (--record_rule_instantiation_callstack not enabled)\r\nRepository rule git_repository defined at:\r\n  C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18: in <toplevel>\r\nERROR: An error occurred during the fetch of repository 'rules_python':\r\n   Traceback (most recent call last):\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git.bzl\", line 177\r\n                _clone_or_update(ctx)\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git.bzl\", line 36, in _clone_or_update\r\n                git_repo(ctx, directory)\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 91, in git_repo\r\n                _update(ctx, git_repo)\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 103, in _update\r\n                fetch(ctx, git_repo)\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 129, in fetch\r\n                _git_maybe_shallow(ctx, <5 more arguments>)\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 171, in _git_maybe_shallow\r\n                _error(ctx.name, <2 more arguments>)\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 181, in _error\r\n                fail(<1 more arguments>)\r\nerror running 'git fetch origin refs/heads/*:refs/remotes/origin/* refs/tags/*:refs/tags/*' while working with @rules_python:\r\nBUG: run-command.c:519: disabling cancellation: Invalid argument\r\nERROR: no such package '@rules_python//python': Traceback (most recent call last):\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git.bzl\", line 177\r\n                _clone_or_update(ctx)\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git.bzl\", line 36, in _clone_or_update\r\n                git_repo(ctx, directory)\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 91, in git_repo\r\n                _update(ctx, git_repo)\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 103, in _update\r\n                fetch(ctx, git_repo)\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 129, in fetch\r\n                _git_maybe_shallow(ctx, <5 more arguments>)\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 171, in _git_maybe_shallow\r\n                _error(ctx.name, <2 more arguments>)\r\n        File \"C:/users/General/_bazel_General/zs4npqzu/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 181, in _error\r\n                fail(<1 more arguments>)\r\nerror running 'git fetch origin refs/heads/*:refs/remotes/origin/* refs/tags/*:refs/tags/*' while working with @rules_python:\r\nBUG: run-command.c:519: disabling cancellation: Invalid argument\r\nINFO: Elapsed time: 1.097s\r\nINFO: 0 processes.\r\nFAILED: Build did NOT complete successfully (0 packages loaded)\r\n\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version (e.g., 1.0): 1.6\r\n - CPU Architecture: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 2592 Mhz, 4 Core(s), 8 Logical Processor(s)\r\n - OS (e.g., Linux): Windows\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): pip3\r\n - Build command you used (if compiling from source):\r\n - Are you using local sources or building from archives:\r\n - Python version: 3.6.8\r\n - CUDA version: 11.0\r\n - GPU models and configuration: Quadro M2000M\r\n - Any other relevant information: TensorRT 7.2.1, CuDNN 8.0.1\r\n\r\n\r\n## Additional context\r\n\r\nI have a good experience with TensorRT development on my Windows setup so I know that from NVIDIA libraries setup point of view everything should b",
    "url": "https://github.com/pytorch/TensorRT/issues/226",
    "state": "closed",
    "labels": [
      "question",
      "channel: windows"
    ],
    "created_at": "2020-11-17T11:57:18Z",
    "updated_at": "2022-09-02T18:12:18Z",
    "user": "OronG13"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 48075,
    "title": "How to convert syncbn to batchnormND?",
    "body": "I want to run a model with syncBn in cpu, so I have to convert syncBN to batchNormND, how can I  do that?\r\nI just found a way to convert from bn to syncbn, but how to do the opposite? Thanks in advance.\r\n[convert2syncbn](https://pytorch.org/docs/stable/generated/torch.nn.SyncBatchNorm.html?highlight=sync#torch.nn.SyncBatchNorm.convert_sync_batchnorm)\n\ncc @albanD @mruberry",
    "url": "https://github.com/pytorch/pytorch/issues/48075",
    "state": "closed",
    "labels": [
      "module: nn",
      "triaged",
      "enhancement"
    ],
    "created_at": "2020-11-17T02:41:22Z",
    "updated_at": "2020-11-18T02:42:34Z",
    "user": "Edwardmark"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 48074,
    "title": "How use libtorch(or other API) to implement \"contiguous\", \"view\", \"permute\", \"transpose\" in c++?",
    "body": "## How use libtorch to implement \"contiguous\", \"view\", \"permute\", \"transpose\" in c++?\r\nHello~ I need to transplant python to c++, I don't know how to implement \"contiguous\", \"view\", \"permute\" in c++. I found that libtorch can help me, but I have not find all the \"Tensor operations\" which I need,such as \"contiguous\", \"view\", \"permute\", \"transpose\".\r\nThe python code shows bellow:\r\n\r\n    def process_input_bmm(self, x):\r\n        bsz = x.size(0)  # 18   # x.shape()=[18,192]\r\n        # [B x N] --> [B x g  x N/g]\r\n        x = x.contiguous().view(bsz, self.n_groups, -1)  # [18, 2, 96]\r\n\r\n        # [B x g x N/g] --> [g x B  x N/g]\r\n        x = x.transpose(0, 1)  # transpose so that group is first # [2,18,96]\r\n\r\n        # [g x B  x N/g] x [g x N/g x M/g] --> [g x B x M/g]\r\n        x = torch.bmm(x, self.weights)  # multiply with Weights #[2,18,96]\r\n\r\n        # add bias\r\n        if self.use_bias:\r\n            x = torch.add(x, self.bias)\r\n\r\n        if self.feature_shuffle:\r\n            # [g x B x M/g] --> [B x M/g x g]\r\n            # [2,18,96] --> [18,96,2]\r\n            x = x.permute(1, 2, 0)  # permute:\u5e8f\u53f7\u6539\u53d8\u7684\u610f\u601d\u3002\r\n\r\n            # [B x M/g x g] --> [B x g x M/g]\r\n            # [18, 96, 2] --> [18,2,96]\r\n            x = x.contiguous().view(bsz, self.n_groups, -1)\r\n\r\n        else:\r\n            # [g x B x M/g] --> [B x g x M/g]\r\n            x = x.transpose(0, 1)  # transpose so that batch is first\r\n\r\n        # feature map normalization\r\n        if self.normalization_fn is not None:\r\n            x = self.normalization_fn(x)\r\n\r\n        # feature map activation (or thresholding)\r\n        if self.act_fn is not None:  # self.act_fn:swish\r\n            # print(\"act_fun in glt: \",self.act_fn) #Swish((sigmoid): Sigmoid())\r\n            x = self.act_fn(x)\r\n\r\n        return x\r\n\r\n    def forward(self, x):\r\n        \"\"\"\r\n        :param x: Input of shape [T x B x N] (should work with [B x T x N]\r\n        :return:\r\n        \"\"\"\r\n        if x.dim() == 2:\r\n            x = self.process_input_bmm(x)\r\n        elif x.dim() == 3:\r\n            T, B, N = x.size()  # [18,1,192]\r\n            x = x.contiguous().view(B * T, -1)  # [1*18,192]\r\n            x = self.process_input_bmm(x)\r\n            x = x.contiguous().view(T, B, -1)\r\n        else:\r\n            raise NotImplementedError\r\n\r\n        # dropout\r\n        if self.use_dropout:\r\n            x = self.drop_layer(x)\r\n        return x\r\n\r\nThe code I need help to write in C++ are as bellow:\r\n        \r\n        x = x.contiguous().view(bsz, self.n_groups, -1)  \r\n        x = x.transpose(0, 1) \r\n        x = x.permute(1, 2, 0)\r\n\r\nIf you can help me, please answer me with C++ code which work with libtorch, or the method to implement \"contiguous\", \"view\", \"permute\", \"transpose\" by libtorch(or other API)!\r\nThank you Very much!!!\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/48074",
    "state": "closed",
    "labels": [],
    "created_at": "2020-11-17T02:16:24Z",
    "updated_at": "2020-11-17T15:44:11Z",
    "user": "wxyhv"
  },
  {
    "repo": "huggingface/datasets",
    "number": 853,
    "title": "concatenate_datasets support axis=0 or 1 \uff1f",
    "body": "I want to achieve the following result\r\n![image](https://user-images.githubusercontent.com/12437751/99207426-f0c8db80-27f8-11eb-820a-4d9f7287b742.png)\r\n",
    "url": "https://github.com/huggingface/datasets/issues/853",
    "state": "closed",
    "labels": [
      "enhancement",
      "help wanted",
      "question"
    ],
    "created_at": "2020-11-16T02:46:23Z",
    "updated_at": "2021-04-19T16:07:18Z",
    "user": "renqingcolin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 47980,
    "title": "How to avoid `torch.onnx.export` use INT64?",
    "body": "In order to do inference in browser/JavaScript, I used `torch.onnx.export()` to get the onnx model. \r\n\r\nHowever, the exported model used INT64 which is invalid for the JavaScript environment. I tried to change the data type in ONNX manually but it brings more error.\r\nMay I know how to force the `torch.onnx.export` use INT32? Or is there any way to deal with the INT64 before getting the ONNX model?\r\n\r\nThank you!\n\ncc @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof",
    "url": "https://github.com/pytorch/pytorch/issues/47980",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2020-11-15T04:11:06Z",
    "updated_at": "2021-04-21T11:23:35Z",
    "user": "waittim"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1237,
    "title": "DistributedDataParallel tutorial should use actual data",
    "body": "The current DistributedDataParallel tutorial feeds in data randomly generated on the spot. This is useful to a point but, since all real world applications will use a dataloader, it would be good to have a complete example with even MNIST that implements DistributedDataParallel. \"https://pytorch.org/tutorials/intermediate/dist_tuto.html\" implements the code required to use real data but also isn't using DistributedDataParallel thus leaving it up to the reader to determine which pieces they need to implement themselves and which pieces are included with DistributedDataParallel. Using real data and DistributedDataParallel would answer that question right away. One key question this would answer is how does the partitioning happen. Is the partitioning fully left to the user or is it handled by DistributedDataParallel like it is with DataParallel? I'm assuming the first one but it would be nice to have a clear example of it.",
    "url": "https://github.com/pytorch/tutorials/issues/1237",
    "state": "closed",
    "labels": [],
    "created_at": "2020-11-13T18:51:01Z",
    "updated_at": "2023-03-14T21:05:55Z",
    "comments": 1,
    "user": "rmcavoy"
  },
  {
    "repo": "pytorch/vision",
    "number": 2999,
    "title": "CMake build failed with error: 'class c10::OperatorHandle' has no member named 'typed'",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n1. Install PyTorch that was built myself, with build information:\r\n```\r\n#python3\r\nPython 3.6.8 (default, Apr 20 2020, 14:49:33)\r\n[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import torch\r\n>>> print(torch.__config__.show())\r\nPyTorch built with:\r\n  - GCC 6.3\r\n  - C++ Version: 201402\r\n  - Intel(R) MKL-DNN v1.2.0 (Git Hash 70f8b879ea7a0c38caedb3320b7c85e8497ff50d)\r\n  - OpenMP 201511 (a.k.a. OpenMP 4.5)\r\n  - NNPACK is enabled\r\n  - CPU capability usage: AVX2\r\n  - CUDA Runtime 10.0\r\n  - NVCC architecture flags: -gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75\r\n  - CuDNN 7.6.3\r\n  - Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 -Wno-deprecated -fvisibility-inlines-hidden -fopenmp -DNDEBUG -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_INTERNAL_THREADPOOL_IMPL -DUSE_VULKAN_WRAPPER -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EIGEN_FOR_BLAS=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=OFF, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=0, USE_NNPACK=ON, USE_OPENMP=ON, USE_STATIC_DISPATCH=OFF,\r\n```\r\n2. Resolve similar problem with the solution: https://github.com/pytorch/vision/issues/2001#issuecomment-611923412\r\n\r\n> @bmanga tow-names works.\r\n> just add these lines to the end of the CMakeLists.txt\r\n> ```\r\n> set_property(TARGET torch_cuda PROPERTY INTERFACE_COMPILE_OPTIONS \"\")  \r\n> set_property(TARGET torch_cpu PROPERTY INTERFACE_COMPILE_OPTIONS \"\")\r\n> ```\r\n\r\n3. Build vision with following commands:\r\n```\r\nsource /opt/rh/devtoolset-6/enable\r\nTORCH_DIR=/usr/local/lib64/python3.6/site-packages/torch\r\nexport CUDA_HOME=/usr/local/cuda\r\nexport CUDA_NVCC_EXECUTABLE=${CUDA_HOME}/bin/nvcc\r\nexport PATH=${CUDA_HOME}/bin/:$PATH\r\nexport TORCH_CUDA_ARCH_LIST=\"6.0 6.1 7.0 7.5\"\r\n\r\nmkdir build\r\ncd build\r\ncmake .. -DCMAKE_PREFIX_PATH=${TORCH_DIR} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON\r\nmake -j\r\n```\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n```\r\n[ 88%] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/cpu/nms_cpu.cpp.o\r\n[ 94%] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/vision.cpp.o\r\nIn file included from /home/tianyou.gty/builds/blade2.0/vision_cpp/torchvision/csrc/vision.cpp:14:0:\r\n/home/tianyou.gty/builds/blade2.0/vision_cpp/torchvision/csrc/ROIAlign.h: In function 'at::Tensor roi_align(const at::Tensor&, const at::Tensor&, double, int64_t, int64_t, int64_t, bool)':\r\n/home/tianyou.gty/builds/blade2.0/vision_cpp/torchvision/csrc/ROIAlign.h:29:25: error: 'class c10::OperatorHandle' has no member named 'typed'\r\n                        .typed<decltype(roi_align)>();\r\n                         ^~~~~\r\n/home/tianyou.gty/builds/blade2.0/vision_cpp/torchvision/csrc/ROIAlign.h:29:31: error: expected primary-expression before 'decltype'\r\n                        .typed<decltype(roi_align)>();\r\n                               ^~~~~~~~\r\n/home/tianyou.gty/builds/blade2.0/vision_cpp/torchvision/csrc/ROIAlign.h: In function 'at::Tensor _roi_align_backward(const at::Tensor&, const at::Tensor&, double, int64_t, int64_t, int64_t, int64_t, int6\r\n4_t, int64_t, int64_t, bool)':\r\n/home/tianyou.gty/builds/blade2.0/vision_cpp/torchvision/csrc/ROIAlign.h:77:12: error: 'class c10::OperatorHandle' has no member named 'typed'\r\n           .typed<decltype(_roi_align_backward)>();\r\n            ^~~~~\r\n/home/tianyou.gty/builds/blade2.0/vision_cpp/torchvision/csrc/ROIAlign.h:77:18: error: expected primary-expression before 'decltype'\r\n           .typed<decltype(_roi_align_backward)>();\r\n                  ^~~~~~~~\r\nIn file included from /home/tianyou.gty/builds/blade2.0/vision_cpp/torchvision/csrc/vision.cpp:17:0:\r\n/home/tianyou.gty/builds/blade2.0/vision_cpp/torchvision/csrc/nms.h: In function 'at::Tensor nms(const at::Tensor&, const at::Tensor&, double)':\r\n/home/tianyou.gty/builds/blade2.0/vision_cpp/torchvision/csrc/nms.h:19:25: error: 'class c10::OperatorHandle' has no member named 'typed'\r\n                        .typed<decltype(nms)>();\r\n                      ",
    "url": "https://github.com/pytorch/vision/issues/2999",
    "state": "closed",
    "labels": [
      "question",
      "topic: build"
    ],
    "created_at": "2020-11-13T09:47:07Z",
    "updated_at": "2020-11-13T13:18:19Z",
    "user": "tanyokwok"
  },
  {
    "repo": "pytorch/vision",
    "number": 2994,
    "title": "How to dynamically split tensor",
    "body": "##  How to split a tensor dynamically by split_sizes, not by constant shape\r\nTrying to convert mask-rcnn to onnx and run on onnxruntime.\r\nFollowing code try to split mask_pred by num_mask_roi_per_img\r\nHowever, while run in onnxruntime, num_mask_roi_per_img becomes constant value, for instance (68,) which is number of boxes while tracing.\r\n\r\n```\r\n# split batch mask prediction back to each image\r\nnum_mask_roi_per_img = [ det_bbox.shape[0] for det_bbox in det_bboxes ]\r\nmask_preds = mask_pred.split(num_mask_roi_per_img, 0)\r\n```\r\nIt got this error while run in onnxruntime with another input image.\r\n\r\n> \r\n\r\n<class 'onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument'>\", \"[ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Non-zero status code returned while running SplitToSequence node. Name:'SplitToSequence_1396' Status Message: split_size_sum (68) != split_dim_size (23)\"\r\n\r\nCould anyone help me with this?\r\nMany thanks in advance.\r\n\n\ncc @neginraoof",
    "url": "https://github.com/pytorch/vision/issues/2994",
    "state": "closed",
    "labels": [
      "topic: object detection",
      "module: onnx"
    ],
    "created_at": "2020-11-12T13:27:05Z",
    "updated_at": "2022-07-21T09:11:35Z",
    "user": "RunningLeon"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 47823,
    "title": "How to frozen weights in TorchScript IR?",
    "body": "Hi, i just add a pass in TorchScript IR to convert BertLayer to fastertransformer Encoder, however i find model is slow after convert to TorchScript. I get Nvprof result and find a time consuming activity:\r\n```\r\nType  Time(%)      Time     Calls       Avg       Min       Max  Name\r\n GPU activities:   57.50%  1.49484s     25200  59.319us  3.2000us  151.55us  _ZN2at6native27unrolled_elementwise_kernelIZZZNS0_21copy_device_to_deviceERNS_14TensorIteratorEbENKUlvE0_clEvENKUlvE2_clEvEUlfE_NS_6detail5ArrayIPcLi2EEE16OffsetCalculatorILi1EjESC_NS0_6memory15LoadWithoutCastENSD_16StoreWithoutCastEEEviT_T0_T1_T2_T3_T4_\r\n```\r\nI watched my final TorchScript IR, and i guess it's reason is each time it runs it will do aten::contiguous several times, like:\r\n```\r\n%1752 : Float(*, *, requires_grad=1, device=cuda:0) = aten::contiguous(%1153, %21)\r\n```\r\naten::contiguous is needed for Tensors which will be send to custom op because they will be convert by .transpose(-1, -2) first,  but aten::contiguous seems time consuming. So is there any way that i can convert model weights to constant in TorchScript IR so that aten::contiguous(weights) will be convert to Constant Tensor, or if i can do something to avoid aten::contiguous? Thankyou very much!\r\n\r\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/47823",
    "state": "closed",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2020-11-12T02:51:07Z",
    "updated_at": "2020-11-12T07:54:27Z",
    "user": "Sun-Knight-Soral"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 47681,
    "title": "How to install Pytorch on AIX7.2 without internet access?",
    "body": "I am trying to install Pytorch on AIX7.2 server without internet access.  I have pytorch-1.0.2.tar.gz from PYPI website and run the PIP installation as ```python -m pip install Flask --no-build-isolation --no-index --find-links ./ $pkg``` where $pkg is pytorch-1.0.2.tar.gz.  However, it has the following error.  How to fix it?  Is it possible to install pytorch on a server without internet access?\r\n\r\nThanks.\r\n```\r\nLooking in links: ./\r\nProcessing ./pytorch-1.0.2.tar.gz\r\nBuilding wheels for collected packages: pytorch\r\n  Building wheel for pytorch (setup.py): started\r\n  Building wheel for pytorch (setup.py): finished with status 'error'\r\n  ERROR: Command errored out with exit status 1:\r\n   command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/tmp/pip-req-build-84fugyap/setup.py'\"'\"'; __file__='\"'\"'/tmp/pip-req-build-84fugyap/setup.py'\"'\"';f=getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__);code=f.read().replace('\"'\"'\\r\\n'\"'\"', '\"'\"'\\n'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' bdist_wheel -d /tmp/pip-wheel-640v38y9\r\n       cwd: /tmp/pip-req-build-84fugyap/\r\n  Complete output (5 lines):\r\n  Traceback (most recent call last):\r\n    File \"<string>\", line 1, in <module>\r\n    File \"/tmp/pip-req-build-84fugyap/setup.py\", line 15, in <module>\r\n      raise Exception(message)\r\n  Exception: You tried to install \"pytorch\". The package named for PyTorch is \"torch\"\r\n  ----------------------------------------\r\n  ERROR: Failed building wheel for pytorch\r\n  Running setup.py clean for pytorch\r\nFailed to build pytorch\r\nInstalling collected packages: pytorch\r\n    Running setup.py install for pytorch: started\r\n    Running setup.py install for pytorch: finished with status 'error'\r\n    ERROR: Command errored out with exit status 1:\r\n     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/tmp/pip-req-build-84fugyap/setup.py'\"'\"'; __file__='\"'\"'/tmp/pip-req-build-84fugyap/setup.py'\"'\"';f=getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__);code=f.read().replace('\"'\"'\\r\\n'\"'\"', '\"'\"'\\n'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' install --record /tmp/pip-record-k2dyu_63/install-record.txt --single-version-externally-managed --compile --install-headers /opt/freeware/include/python3.7m/pytorch\r\n         cwd: /tmp/pip-req-build-84fugyap/\r\n    Complete output (5 lines):\r\n    Traceback (most recent call last):\r\n      File \"<string>\", line 1, in <module>\r\n      File \"/tmp/pip-req-build-84fugyap/setup.py\", line 11, in <module>\r\n        raise Exception(message)\r\n    Exception: You tried to install \"pytorch\". The package named for PyTorch is \"torch\"\r\n    ----------------------------------------\r\nERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/tmp/pip-req-build-84fugyap/setup.py'\"'\"'; __file__='\"'\"'/tmp/pip-req-build-84fugyap/setup.py'\"'\"';f=getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__);code=f.read().replace('\"'\"'\\r\\n'\"'\"', '\"'\"'\\n'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' install --record /tmp/pip-record-k2dyu_63/install-record.txt --single-version-externally-managed --compile --install-headers /opt/freeware/include/python3.7m/pytorch Check the logs for full command output.\r\n```\n\ncc @malfet @seemethere @walterddr",
    "url": "https://github.com/pytorch/pytorch/issues/47681",
    "state": "open",
    "labels": [
      "module: build",
      "triaged"
    ],
    "created_at": "2020-11-10T17:02:24Z",
    "updated_at": "2020-11-11T02:05:42Z",
    "user": "bergen288"
  },
  {
    "repo": "pytorch/serve",
    "number": 779,
    "title": "Hi, any suggestion on how to serve yolov5 on torchserve ?",
    "body": "<!--\r\nThank you for suggesting an idea to improve torchserve model serving experience.\r\n\r\nPlease fill in as much of the template below as you're able.\r\n-->\r\n\r\n## Is your feature request related to a problem? Please describe.\r\n<!-- Please describe the problem you are trying to solve. -->\r\nI'd like to serve yolov5 model, but there is no template in the example.\r\n## Describe the solution\r\n<!-- Please describe the desired behavior. -->\r\n\r\nserve model from https://github.com/ultralytics/yolov5/\r\n\r\n## Describe alternatives solution\r\n<!-- Please describe alternative solutions or features you have considered. -->\r\n",
    "url": "https://github.com/pytorch/serve/issues/779",
    "state": "closed",
    "labels": [
      "triaged_wait"
    ],
    "created_at": "2020-11-10T03:18:54Z",
    "updated_at": "2023-07-31T17:53:42Z",
    "user": "yuanyuangoo"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1227,
    "title": "Yolov5 quantization : problem with FloatFunctional()",
    "body": "I'm trying quantize [Yolov5 (object detection)](https://github.com/ultralytics/yolov5). And i'm following [this tutorial](https://pytorch.org/tutorials/advanced/static_quantization_tutorial.html) to do static quantization. As per tutorial I'm changing all torch.add s to torch.nn.quantized.FloatFunctional() like this.\r\n\r\n`return x + self.cv2(self.cv1(x)) if self.add else self.cv2(self.cv1(x))` to \r\n`return torch.nn.quantized.FloatFunctional().add(x , self.cv2(self.cv1(x))) if self.add else self.cv2(self.cv1(x))`\r\n\r\nwhen the model is calibrating it's working fine. But when it comes to evaluating the quantized model, I'm getting this error.\r\n`RuntimeError: Could not run 'aten::add.Tensor' with arguments from the 'QuantizedCPU' backend. 'aten::add.Tensor' is only available for these backends: [CPU, CUDA, MkldnnCPU, SparseCPU, SparseCUDA, Met 'aten::add.Tensor' is only available for these backends: [CPU, CUDA, MkldnnCPU, SparseCPU, SparseCUDA, Meta, Named, Autograd, Profiler, Tracer].`\r\n\r\nNow I changed FloatFunctional() to Qfunctional() hoping to get a result, then I got an error during the calibration stage.\r\n\r\nCan someone help me? Thanks in advance.\n\ncc @jerryzh168 @jianyuh",
    "url": "https://github.com/pytorch/tutorials/issues/1227",
    "state": "closed",
    "labels": [
      "question",
      "module: quantization"
    ],
    "created_at": "2020-11-09T16:38:33Z",
    "updated_at": "2023-03-16T22:31:13Z",
    "user": "bingiflash"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1225,
    "title": "Seq2Seq Transformer Tutorial",
    "body": "I'm having difficulty understanding a few aspects of the Seq2Seq transformer tutorial (https://pytorch.org/tutorials/beginner/transformer_tutorial.html)\r\n\r\n1. The tutorial says that it implements the architecture from Attention Is All You Need, but I don't see a TransformerDecoder used anywhere. It instead looks like only a TransformerEncoder is used. How does this example work without the decoder?\r\n2. The tutorial says that it uses a softmax to output probabilities over the dictionary, but I only see a linear output layer. Where is the softmax applied?\r\n3. Is this model learning to predict one word ahead (e.g. [hi how are you] -> [how are you doing])? I can't find the actual task described anywhere, only the inputs and targets in terms of an alphabet\r\n\r\nAppreciate any help.\r\n\r\n\n\ncc @pytorch/team-text-core @Nayef211",
    "url": "https://github.com/pytorch/tutorials/issues/1225",
    "state": "closed",
    "labels": [
      "module: torchtext",
      "docathon-h1-2023",
      "easy"
    ],
    "created_at": "2020-11-08T20:39:19Z",
    "updated_at": "2023-06-09T16:32:37Z",
    "comments": 5,
    "user": "mmwebster"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 47577,
    "title": "How to implement Iterative dataset with multiple workers ",
    "body": "Hi\r\nI have a TFDS dataset, which I convert it to an iterative dataset in pytorch, this is not clear for me how to make it work with multiple-workers, here is the minimal code to show what I mean, could you help me please complete it with different workers, and provide me with how I can implement worker_init_fn(worker_id) for this case. I also need to implement distributed sampler for this data class which I also appreciate your help on this. thanks \r\n\r\n```\r\nfrom torch.utils.data import Dataset, DataLoader\r\nimport torch\r\nimport tensorflow_datasets as tfds\r\nimport tensorflow as tf\r\nimport itertools\r\nfrom itertools import cycle, islice\r\n\r\n\r\n\r\ndef get_dummy_dataset():\r\n  inputs = [\"input 1\",\r\n        \"input 2\",\r\n        \"input 3\",\r\n        \"input 4\"]\r\n  target = [\"target 1\",\r\n            \"target 2\",\r\n            \"target 3\",\r\n            \"target 4\"]\r\n  features = {\"inputs\": inputs, \"targets\": target}\r\n  def my_fn(features):\r\n    ret = {}\r\n    for k, v in features.items():\r\n          ret[f'{k}_plaintext'] = v\r\n    return ret\r\n  dataset = tf.data.Dataset.from_tensor_slices(features)\r\n  dataset = dataset.map(my_fn, num_parallel_calls=tf.data.experimental.AUTOTUNE)\r\n  return dataset\r\n\r\n\r\nclass WMTDataset(torch.utils.data.IterableDataset):\r\n    def __init__(self, batch_size):\r\n        super(WMTDataset).__init__()\r\n        dataset = get_dummy_dataset()\r\n        self.dataset_size = 4\r\n        self.batch_size = batch_size\r\n        self.dataset = self.create_dataset(dataset)\r\n\r\n    def __len__(self):\r\n      return self.dataset_size\r\n\r\n    def __iter__(self):\r\n      return self.dataset\r\n\r\n    def create_dataset(self, dataset):\r\n      dataset = dataset.batch(self.batch_size, drop_remainder=False)\r\n      return itertools.cycle(dataset)\r\n\r\n\r\n\r\niterable_dataset = WMTDataset(batch_size=2)\r\nloader = DataLoader(iterable_dataset, batch_size=None)\r\nfor batch in islice(loader, 2):\r\n    print(\"#########batch \", batch)\r\n```\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/47577",
    "state": "closed",
    "labels": [],
    "created_at": "2020-11-08T13:01:52Z",
    "updated_at": "2020-11-09T16:03:07Z",
    "user": "rabeehkarimimahabadi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 47574,
    "title": "How to add custom CUDA function as torchScript Node?",
    "body": "Hi, i want to add my CUDA function as a torchScript Node, but i can't use torchScript extention op as i can't let other people to use so file. It's there a way? Thank you very much!\n\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/47574",
    "state": "closed",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2020-11-08T10:28:25Z",
    "updated_at": "2021-02-27T07:58:59Z",
    "user": "Sun-Knight-Soral"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 47573,
    "title": "How to add custom CUDA function as torchScript Node?",
    "body": "Hi, i want to add my CUDA function as a torchScript Node, but i can't use torchScript extention op as i can't let other people to use so file. It's there a way? Thank you very much!\n\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/47573",
    "state": "closed",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2020-11-08T10:28:06Z",
    "updated_at": "2020-11-08T17:15:02Z",
    "user": "Sun-Knight-Soral"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 47572,
    "title": "How to add custom CUDA function as torchScript node?",
    "body": "Hi, i want to add my CUDA function to torchScript as a Node, but i don't want to use torchScript extention op as i can't let other people to load so file, is there any way? Thankyou very much!\n\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/47572",
    "state": "closed",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2020-11-08T10:25:02Z",
    "updated_at": "2020-11-08T17:15:35Z",
    "user": "Sun-Knight-Soral"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 47548,
    "title": "how to extract more than two variables using default_collate from torch.utils.data.dataloader?",
    "body": "Kindly help as how to extract more than just two variables (x,y) using default_collate from torch.utils.data.dataloader.",
    "url": "https://github.com/pytorch/pytorch/issues/47548",
    "state": "closed",
    "labels": [],
    "created_at": "2020-11-07T05:52:49Z",
    "updated_at": "2020-11-09T16:00:31Z",
    "user": "Jayashree-Pougajendy"
  },
  {
    "repo": "pytorch/xla",
    "number": 2613,
    "title": "How to get function return from xmp.spawn distributed processes",
    "body": "Wonder how do we get value returned from spawned functions.\r\nFor example, if accuracy is calculated in each core, and i want it to be returned to the main function\r\n\r\n```\r\ndef _mp_fn():\r\n    #some training and valuation code here\r\n\r\n    return accuracy\r\n```\r\n\r\n```\r\naccuracy = xmp.spawn(_mp_fn, nprocs=8)\r\n```\r\n\r\nIn multiprocessor library we can do something like\r\n\r\n```\r\nif __name__ == '__main__':\r\n    p = Pool(processes=20)\r\n    data = p.map(job, [i for i in range(20)])\r\n    p.close()\r\n    print(data)\r\n```\r\n\r\nHow do we do it with xmp.spawn?",
    "url": "https://github.com/pytorch/xla/issues/2613",
    "state": "closed",
    "labels": [],
    "created_at": "2020-11-06T19:58:07Z",
    "updated_at": "2020-11-11T14:51:43Z",
    "user": "8key"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 47491,
    "title": "How to get averaged loss in multi-gpu training ?",
    "body": "Hi,\r\n\r\nI am using multi-gpu training, following the tutorial:\r\nhttps://pytorch.org/docs/stable/notes/ddp.html\r\n\r\nI am trying to construct the curves of training and validation losses for visulization. But it seems I can only access the loss of one gpu.\r\n\r\nI know that the losses of multi-gpu will be averaged before back propagation. So how to get the averaged loss ? \r\n\r\nThank you !",
    "url": "https://github.com/pytorch/pytorch/issues/47491",
    "state": "closed",
    "labels": [],
    "created_at": "2020-11-06T05:44:59Z",
    "updated_at": "2020-11-06T05:58:38Z",
    "user": "shuuchen"
  },
  {
    "repo": "pytorch/text",
    "number": 1071,
    "title": "How to get the translation results from tensor in seq2seq model",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\n<!-- Please send questions or ask for help here. -->\r\nI am try to implement my own MT engine, i am following the steps in https://github.com/bentrevett/pytorch-seq2seq/blob/master/1%20-%20Sequence%20to%20Sequence%20Learning%20with%20Neural%20Networks.ipynb\r\nI also propose a question on https://stackoverflow.com/questions/64694786/pytorch-build-seq2seq-mt-model-but-how-to-get-the-translation-results-from-the\r\n``` \r\n\r\n\r\nSRC = Field(tokenize=tokenize_en,\r\n            init_token='<sos>',\r\n            eos_token='<eos>',\r\n            lower=True)\r\n\r\nTRG = Field(tokenize=tokenize_de,\r\n            init_token='<sos>',\r\n            eos_token='<eos>',\r\n            lower=True)\r\n```\r\nAfter training the model,the link only share a way to batch evaluate but i want to try single string and get the translation results. for example i want my model to translate the input \"Boys\" and get the German translations.\r\n\r\n```\r\nsavedfilemodelpath='./pretrained_model/2020-09-27en-de.pth'\r\nmodel.load_state_dict(torch.load(savedfilemodelpath))\r\nmodel.eval()\r\ninputstring = 'Boys'\r\nprocessed=SRC.process([SRC.preprocess(inputstring)]).to(device)\r\noutput=model(processed,processed)\r\noutput_dim = output.shape[-1]\r\noutputs = output[1:].view(-1, output_dim)\r\nfor item in outputs:\r\n    print('item shape is {} and item.argmax is {}, and words is {}'.format(item.shape,item.argmax(),TRG.vocab.itos[item.argmax()]))\r\n\r\n```\r\nSo my question is that it it right to get the translation results by:\r\nFirst: convert the string to tensor\r\n```\r\ninputstring = 'Boys'\r\nprocessed=SRC.process([SRC.preprocess(inputstring)]).to(device)\r\n```\r\nSecond: send the tensor to the model. As the model have a TRG param.I have to give the tensor,am i able not given the TRG tensor?\r\n```\r\noutput=model(processed,processed)\r\noutput_dim = output.shape[-1]\r\noutputs = output[1:].view(-1, output_dim)\r\n```\r\nThird\uff1athrough the return tensor, i use the argmax to get the translation results? is it right?\r\n\r\nOr how can i get the right translation results?\r\n```\r\nfor item in outputs:\r\n        print('item shape is {} and item.argmax is {}, and words is {}'.format(item.shape,item.argmax(),TRG.vocab.itos[item.argmax()+1]))\r\n```\r\nThanks a lot.",
    "url": "https://github.com/pytorch/text/issues/1071",
    "state": "closed",
    "labels": [],
    "created_at": "2020-11-06T02:12:34Z",
    "updated_at": "2020-11-06T06:05:17Z",
    "user": "Oscarjia"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 47483,
    "title": "Update how to build PyTorch with CUDA Windows instructions",
    "body": "PyTorch currently could not be build using recommended `14.11.25503` minimal toolchain, see:\r\nhttps://github.com/pytorch/pytorch/blame/b4b0fa637178baf9147416b550c7db70de6a5fa3/README.md#L258\r\n\r\nBut if one tries to following this instructions using PyTorch-1.7 or newer it will fail with as shown in:\r\nhttps://github.com/pytorch/pytorch/issues/46208#issuecomment-707352250\n\ncc @malfet @seemethere @walterddr @jlin27 @mruberry @peterjc123 @maxluk @nbcsm @guyang3532 @gunandrose4u @smartcat2010 @mszhanyi",
    "url": "https://github.com/pytorch/pytorch/issues/47483",
    "state": "closed",
    "labels": [
      "module: build",
      "module: windows",
      "module: docs",
      "triaged",
      "windows-triaged"
    ],
    "created_at": "2020-11-06T01:27:58Z",
    "updated_at": "2020-11-16T16:16:00Z",
    "user": "malfet"
  },
  {
    "repo": "pytorch/xla",
    "number": 2606,
    "title": "how to make sure pytorch xla is doing data parallelism",
    "body": "Hi\r\nwhen I call xm.spawn to distribute a work over multiple TPU cores, how can I make sure this is actually working and getting use of all cores? thanks",
    "url": "https://github.com/pytorch/xla/issues/2606",
    "state": "closed",
    "labels": [],
    "created_at": "2020-11-05T16:30:15Z",
    "updated_at": "2020-11-30T18:18:00Z",
    "user": "rabeehkarimimahabadi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 47439,
    "title": "how to use torch.utils.checkpoint + gru with variable length sequence?",
    "body": "I just want to use torch.utils.checkpoint on GRU to save gpu memory.\r\n\r\n```py\r\ndef check(self, packed):\r\n    out, _ = self.rnn(packed)\r\n    padded = pad_packed_sequence(out, batch_first=True)\r\n\r\n    return padded\r\n\r\ndef forward(self, x, lengths):\r\n    \"\"\"Handles variable size captions\r\n    \"\"\"\r\n    x = self.embed(x)\r\n\r\n    packed = pack_padded_sequence(x, lengths, batch_first=True)\r\n    padded = checkpoint(self.check, packed)\r\n```\r\nmy code is shown above.\r\n\r\ni got a warning:\r\n**UserWarning: None of the inputs have requires_grad=True. Gradients will be None**\r\nbecause packed is a PackedSequence, it has no attribute requires_grad\r\n\r\nthen, i tried another way to do it\r\n```py\r\ndef check(self, x, lengths):\r\n    packed = pack_padded_sequence(x, lengths, batch_first=True)\r\n    out, _ = self.rnn(packed)\r\n    padded = pad_packed_sequence(out, batch_first=True)\r\n\r\n    return padded\r\n\r\ndef forward(self, x, lengths):\r\n    \"\"\"Handles variable size captions\r\n    \"\"\"\r\n    x = self.embed(x)\r\n    padded = checkpoint(self.check, x, lengths)\r\n```\r\nthan i got a error. \r\n\r\nTraceback (most recent call last):\r\n  File \"D:\\\u5b89\u88c5\u7a0b\u5e8f\\PyCharm 2019.2.3\\helpers\\pydev\\pydevd.py\", line 2073, in <module>\r\n    main()\r\n  File \"D:\\\u5b89\u88c5\u7a0b\u5e8f\\PyCharm 2019.2.3\\helpers\\pydev\\pydevd.py\", line 2067, in main\r\n    globals = debugger.run(setup['file'], None, None, is_module)\r\n  File \"D:\\\u5b89\u88c5\u7a0b\u5e8f\\PyCharm 2019.2.3\\helpers\\pydev\\pydevd.py\", line 1418, in run\r\n    return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)\r\n  File \"D:\\\u5b89\u88c5\u7a0b\u5e8f\\PyCharm 2019.2.3\\helpers\\pydev\\pydevd.py\", line 1425, in _exec\r\n    pydev_imports.execfile(file, globals, locals)  # execute the script\r\n  File \"D:\\\u5b89\u88c5\u7a0b\u5e8f\\PyCharm 2019.2.3\\helpers\\pydev\\_pydev_imps\\_pydev_execfile.py\", line 18, in execfile\r\n    exec(compile(contents+\"\\n\", file, 'exec'), glob, loc)\r\n  File \"D:/study/workspace/Python/xxxx/train.py\", line 300, in <module>\r\n    main()\r\n  File \"D:/study/workspace/Python/xxxx/train.py\", line 144, in main\r\n    train(opt, train_loader, model, epoch, val_loader)\r\n  File \"D:/study/workspace/Python/xxxx/train.py\", line 181, in train\r\n    model.train_emb(*train_data)\r\n  File \"D:\\study\\workspace\\Python\\SCAN\\model.py\", line 632, in train_emb\r\n    loss.backward()\r\n  File \"D:\\Environment\\Anaconda\\envs\\PyTorch\\lib\\site-packages\\torch\\tensor.py\", line 185, in backward\r\n    torch.autograd.backward(self, gradient, retain_graph, create_graph)\r\n  File \"D:\\Environment\\Anaconda\\envs\\PyTorch\\lib\\site-packages\\torch\\autograd\\__init__.py\", line 127, in backward\r\n    allow_unreachable=True)  # allow_unreachable flag\r\n<b>RuntimeError: element 1 of tensors does not require grad and does not have a grad_fn</b>\r\n\r\nso, i want to know how can i use torch.utils.checkpoint on gru with variable length sequence\r\n\r\nthank you \r\n\r\ncc @zou3519",
    "url": "https://github.com/pytorch/pytorch/issues/47439",
    "state": "open",
    "labels": [
      "module: rnn",
      "triaged"
    ],
    "created_at": "2020-11-05T13:25:06Z",
    "updated_at": "2023-11-02T13:26:34Z",
    "user": "liuyyy111"
  },
  {
    "repo": "pytorch/vision",
    "number": 2963,
    "title": "detector as feature extractor",
    "body": "Hello,\r\n\r\nI am using mask rcnn for detection. So basically fine tuning. However I want extract feature for each object that is being detected. \r\nSo possibly extracting feature vector just before last layer. How can I do that ? forward hooks ? \r\n\r\nI was also looking into https://github.com/pytorch/vision/blob/master/torchvision/models/_utils.py ? could not get it working. \r\n\r\nAlso how to use jit for the same ?\r\n\r\nAny leads would be helpful. @fmassa \r\n\r\nCheers! \r\n",
    "url": "https://github.com/pytorch/vision/issues/2963",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2020-11-04T22:49:19Z",
    "updated_at": "2020-11-10T12:39:51Z",
    "user": "gaussiangit"
  },
  {
    "repo": "pytorch/vision",
    "number": 2959,
    "title": "Allow torchvision.io to pass through ToTensor()",
    "body": "## \ud83d\ude80 Ensure torchvision.io is a drop-in replacement with current workflows\r\n\r\nThe following snippet will fail.\r\n```\r\nimg = torchvision.io.read_image()\r\nimg = torchvision.transforms.ToTensor()(img)\r\n```\r\n\r\n## Pitch\r\nConsider making native io compatible with existing transform workflows by allowing the tensor type to pass through `ToTensor()`. This would still scale down tensor values to the range 0-1 and not impact downstream transformations.",
    "url": "https://github.com/pytorch/vision/issues/2959",
    "state": "closed",
    "labels": [
      "question",
      "needs discussion"
    ],
    "created_at": "2020-11-04T03:56:27Z",
    "updated_at": "2020-11-20T09:46:26Z",
    "user": "jgbradley1"
  },
  {
    "repo": "pytorch/vision",
    "number": 2955,
    "title": "[RFC] How to handle BC breaking changes on Model weights or hyper-parameters",
    "body": "## \ud83d\ude80 Feature\r\nIn order to fix bugs we are sometimes forced to introduce BC breaking changes. While the process of such introductions is clear when it comes to code changes, it's not when it comes to model weights or hyper-parameters. Thus we should define when, why and how to introduce BC-breaking changes when it comes to model weights or model hyper-parameters.\r\n\r\n## Motivation\r\n\r\nWe have recently bumped to a few issues that motivate this. Here are a few examples:\r\n- On #2326 we discovered a bug in the initialization of some weights of all detection models. If we fix the bug on code, we should probably retrain the models. What happens if their accuracy improves? How do we make them available to our users? \r\n- How do we handle cases such as #2599 where in order to fix a bug we need to update the hyper-parameters of the model?\r\n\r\n## Approaches\r\n\r\nThere are quite a few different approaches for this:\r\n1. Replace the old parameters and Inform the community about the BC breaking changes. Example: #2942\r\n   - Reasonable approach when the accuracy improvement is substantial or the effect on the model behaviour is negligible.\r\n   - Keeps the code-base clean from workarounds and minimizes the number of weights we provide.\r\n   - Can potentially cause issues to users who use transfer learning.\r\n2. Write code/workarounds to minimize the effect of the changes on existing models. Example: #2940\r\n   - Reasonable approach when the changes lead to slight decrease in accuracy.\r\n   - Minimizes the effects on users who used pre-trained models.\r\n   - Introduces ugly workarounds on the code and increases the number of weights we provide.\r\n3. Introduce versioning on model weights:\r\n   - Appropriate when introducing significant changes on the models.\r\n   - Keeps the code-base clean from workarounds.\r\n   - Forces us to maintain multiple versions of weights and model config.\r\n\r\nIt's worth discussing whether we want to adapt our approach depending on the characteristics of the problem or if we want to go with one approach for all cases. Moreover it's worth investigating whether we need to handle differently changes on weights vs changes on hyper-parameters used on inference.\r\n\r\ncc @fmassa @cpuhrsch @vfdev-5 @mthrok ",
    "url": "https://github.com/pytorch/vision/issues/2955",
    "state": "open",
    "labels": [
      "needs discussion",
      "version incompatibility"
    ],
    "created_at": "2020-11-03T12:10:36Z",
    "updated_at": "2021-09-04T16:37:54Z",
    "user": "datumbox"
  },
  {
    "repo": "pytorch/vision",
    "number": 2951,
    "title": "Imagenet Pre-trained model for other Depth Multiplier",
    "body": "On the mnasnet model under mnasnet.py file, the link provided for imagenet pretrained model is only for two depth multiplier, as shown in the code below:\r\n\r\n_MODEL_URLS = {\r\n    \"mnasnet0_5\":\r\n    \"https://download.pytorch.org/models/mnasnet0.5_top1_67.823-3ffadce67e.pth\",\r\n    \"mnasnet0_75\": None,\r\n    \"mnasnet1_0\":\r\n    \"https://download.pytorch.org/models/mnasnet1.0_top1_73.512-f206786ef8.pth\",\r\n    \"mnasnet1_3\": None\r\n}\r\n\r\n\r\nCan you provide the link for Imagenet pre-trained model for  mnasnet0_75 and mnasnet1_3?\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/2951",
    "state": "open",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2020-11-03T06:58:39Z",
    "updated_at": "2020-11-06T00:56:35Z",
    "user": "NaifahNurya"
  },
  {
    "repo": "pytorch/vision",
    "number": 2943,
    "title": "the divide mistake of  positive and negative samples",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\nWhen dividing positive and negative samples, the gt_boxes index that anchor matches to is 0 will be mistaken as negative samples\r\nfor matched_idxs_per_image in matched_idxs:  \r\n\r\n> positive = torch.nonzero(matched_idxs_per_image >= 1).squeeze(1)  \r\n\r\n> negative = torch.nonzero(matched_idxs_per_image == 0).squeeze(1)",
    "url": "https://github.com/pytorch/vision/issues/2943",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-10-31T07:58:29Z",
    "updated_at": "2020-11-06T10:29:01Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 47147,
    "title": "libtorch 1.6.0: How to make the data of each batch have different sizes",
    "body": "libtorch 1.6.0 win10 x64 .\r\n\r\nI wrote an OCR model of the dataset.The word is encoded with different lengths as the label input.How to make the data of each batch have different sizes?\r\nexample: \r\ndata:123.png datasize:[batchsize,3,180,32]   ,label: 123,labelsize:[batchsize,3]\r\ndata:3234.png datasize:[batchsize,3,180,32]  ,label: 3234,lablesize:[batchsize,4]\r\n[batchsize,3]!=[batchsize,4]\r\nThe dataset in Pytorch supports different sizes, but libtorch does not.\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/47147",
    "state": "closed",
    "labels": [],
    "created_at": "2020-10-31T04:30:47Z",
    "updated_at": "2020-11-01T03:52:41Z",
    "user": "williamlzw"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 47118,
    "title": "How to specify the instances for batches",
    "body": "I am trying to solve a multi-task learning problem where I want to implement a homogeneous epoch sampling strategy (i.e in a single batch, instances from only one task are present and such batches are shuffled).\r\n\r\nFor example, Bij represents ith batch during training is of jth task\r\nLet's assume tasks are A,B,C\r\nB1A, B2B, B3A, B4C, B5B, ....\r\nSo a batch contains instances of one task only.\r\n\r\nHow can this be achieved?\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/47118",
    "state": "closed",
    "labels": [],
    "created_at": "2020-10-30T15:13:54Z",
    "updated_at": "2020-10-30T16:38:44Z",
    "user": "nrjvarshney"
  },
  {
    "repo": "huggingface/pytorch-image-models",
    "number": 261,
    "title": "What is different with paper for mobilenet v3 and efficientNet",
    "body": "Thank for your great works.\r\n\r\nThe results with your code show much higher accuracy compared to reported accuracy. (mobilenet v3 and efficientNet)\r\nI want to know what is main different with paper. \r\n",
    "url": "https://github.com/huggingface/pytorch-image-models/issues/261",
    "state": "closed",
    "labels": [],
    "created_at": "2020-10-29T13:34:35Z",
    "updated_at": "2020-10-30T01:15:38Z",
    "user": "gksruf"
  },
  {
    "repo": "pytorch/vision",
    "number": 2919,
    "title": "How to change the num_classes from 1000 in vgg?",
    "body": "I use\r\n        model = vgg.vgg16(pretrained=True, progress = True, num_classes=10)\r\nand use pretrained model     'vgg16': 'https://download.pytorch.org/models/vgg16-397923af.pth',\r\nthen, the error happend:\r\nRuntimeError: Error(s) in loading state_dict for VGG:\r\n\tsize mismatch for classifier.6.weight: copying a param with shape torch.Size([1000, 4096]) from checkpoint, the shape in current model is torch.Size([10, 4096]).\r\n\tsize mismatch for classifier.6.bias: copying a param with shape torch.Size([1000]) from checkpoint, the shape in current model is torch.Size([10]).\r\n\r\nwhen i use          model = vgg.vgg16(pretrained=True, progress = True, num_classes=1000)\r\nerror above not occur, but after seizing a long time, cuda out of memory.\r\nso how can i fix these?\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/2919",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-10-28T07:43:00Z",
    "updated_at": "2020-10-28T14:53:37Z",
    "user": "SunJJ1996"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 46902,
    "title": "How to use clang as a cuda compiler instead of nvcc?",
    "body": "I want to ask if we can use clang as a cuda compiler instead of nvcc, such as 'TF_CUDA_CLANG', 'CLANG_CUDA_COMPILER_PATH' options similar to tensorflow/third_party/gpus/cuda_configure.bzl?\r\n\n\ncc @malfet @seemethere @walterddr",
    "url": "https://github.com/pytorch/pytorch/issues/46902",
    "state": "open",
    "labels": [
      "module: build",
      "triaged",
      "enhancement"
    ],
    "created_at": "2020-10-27T05:52:23Z",
    "updated_at": "2020-11-10T03:48:41Z",
    "user": "HangJie720"
  },
  {
    "repo": "pytorch/vision",
    "number": 2894,
    "title": "Activation function for object proposals in RoI (test time)",
    "body": "## \ud83d\ude80 Feature\r\nReplace softmax with sigmoid in `postprocess_detections `method in `roi_heads`:\r\nhttps://github.com/pytorch/vision/blob/5cb77a20c3c65ca6199fdf1c1bc642af7447d311/torchvision/models/detection/roi_heads.py#L677         \r\n\r\n## Motivation\r\nIn the current implementation, score is class-dependent (softmax), but NMS is class-independent. So the question is, can/should one RoI output more than 1 prediction.  \r\n## Pitch\r\n\r\nIf there are` C` classes, each RoI outputs `C` score and bounding box predictions (two tensors, size` (1, C)` and `(4,C)` resp.) at test stage (`postprocess_detections `method). Non-max suppression is done independently of the class (i.e. boxes overlapping more than NMS are kept if they are different classes). But the normalization function is not class-independent:\r\n\r\n`pred_scores = F.softmax(class_logits, -1)`\r\n\r\nSo if there are two positive classes, pred_scores vector will be, e.g. [0.9, 0.1], and at some point both of these scores will be compared to `box_score_thresh`. Obviously one of them is very likely to be rejected. Therefore, I don\u2019t quite understand this implementation. It should be either:\r\n\r\n```\r\npred_scores = F.sigmoid(class_logits, -1)\r\npreds =  torch.nonzero(pred_scores.sigmoid()>box_score_thresh)\r\n```\r\n\r\nto compute the scores independently, or\r\n\r\n```\r\npreds = class_logits.max(-1)\r\npreds.values[preds.indices>0].sigmoid()>box_score_thresh\r\n``` \r\n\r\nto extract the best prediction from every RoI. Then the predictions will be independent. I think it needs to be re-implemented or at least added as an argument to choose from. Mask predictions are done independently in this way:\r\n\r\nhttps://github.com/pytorch/vision/blob/5cb77a20c3c65ca6199fdf1c1bc642af7447d311/torchvision/models/detection/roi_heads.py#L73\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/2894",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-10-26T11:34:58Z",
    "updated_at": "2020-10-26T12:51:20Z",
    "user": "AlexTS1980"
  },
  {
    "repo": "pytorch/examples",
    "number": 837,
    "title": "License of the fast-neural-style models?",
    "body": "Are the fast-neural-style models that are downloadable through\r\n\r\nhttps://github.com/pytorch/examples/blob/0f0c9131ca5c79d1332dce1f4c06fe942fbdc665/fast_neural_style/download_saved_models.py#L27\r\n\r\nalso licensed under the [BSD-3-Clause license](https://github.com/pytorch/examples/blob/master/LICENSE)?",
    "url": "https://github.com/pytorch/examples/issues/837",
    "state": "closed",
    "labels": [],
    "created_at": "2020-10-26T06:59:51Z",
    "updated_at": "2021-03-04T06:12:57Z",
    "comments": 3,
    "user": "pmeier"
  },
  {
    "repo": "pytorch/vision",
    "number": 2884,
    "title": "GroupedBatchSampler related bug in vision/references/detection/train.py ",
    "body": "I strongly suspect that there is a bug in the detection trainer code that uses `GroupedBatchSampler` to group images by aspect ratio.\r\n\r\n```\r\nif args.distributed:\r\n    train_sampler = torch.utils.data.distributed.DistributedSampler(dataset)\r\n    test_sampler = torch.utils.data.distributed.DistributedSampler(dataset_test)\r\nelse:\r\n    train_sampler = torch.utils.data.RandomSampler(dataset)\r\n    test_sampler = torch.utils.data.SequentialSampler(dataset_test)\r\n\r\nif args.aspect_ratio_group_factor >= 0:\r\n    group_ids = create_aspect_ratio_groups(dataset, k=args.aspect_ratio_group_factor)\r\n    train_batch_sampler = GroupedBatchSampler(train_sampler, group_ids, args.batch_size)\r\n```\r\nhttps://github.com/pytorch/vision/blob/cffac640d703196ea9a369166fa8ae587cb5e64d/references/detection/train.py#L80\r\n\r\nDue to the random shuffle done by `DistributedSampler` and `RandomSampler`, there is an inconsistency between `train_sampler` and `group_ids`. Specifically: `group_ids` is with respect to the original dataset order (as dictated by `dataset`), but `GroupedBatchSampler` will index into `group_ids` using the indices output by `train_sampler`, eg:\r\n\r\n```\r\ndef __iter__(self):\r\n    buffer_per_group = defaultdict(list)\r\n    samples_per_group = defaultdict(list)\r\n\r\n    num_batches = 0\r\n    for idx in self.sampler:\r\n        group_id = self.group_ids[idx]\r\n```\r\nhttps://github.com/pytorch/vision/blob/cffac640d703196ea9a369166fa8ae587cb5e64d/references/detection/group_by_aspect_ratio.py#L53\r\n\r\nThe impact is: `GroupedBatchSampler` will use retrieve the wrong aspect ratios when attempting to batch images with the same aspect ratio together, resulting in batches that are sub-optimally aspect-ratio balanced.\r\n\r\nIf my understanding is correct, then: to fix this, we'd need to change the `train.py` to ensure that the `train_sampler` and `group_ids` are consistent.\r\nI haven't yet had the time to write a small, contained test case that demonstrates the bug, but just in case I'll create this issue while it's on my mind.",
    "url": "https://github.com/pytorch/vision/issues/2884",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: object detection"
    ],
    "created_at": "2020-10-24T07:48:48Z",
    "updated_at": "2020-10-26T12:36:38Z",
    "user": "erickim555"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1203,
    "title": "Put some more better practices in custom operator tutorial",
    "body": "Given our experience with internal users of custom operator registration API, there are some more important things the tutorial should cover:\r\n\r\n* Handling non-contiguous inputs\r\n* How to use TensorIterator for easy pointwise operators\r\n* (FB only) The rest of the scaffolding you need for fbcode\r\n\r\ncc @dzhulgakov ",
    "url": "https://github.com/pytorch/tutorials/issues/1203",
    "state": "open",
    "labels": [
      "C++",
      "torchscript"
    ],
    "created_at": "2020-10-23T21:15:48Z",
    "updated_at": "2021-07-27T22:04:45Z",
    "comments": 0,
    "user": "ezyang"
  },
  {
    "repo": "pytorch/vision",
    "number": 2878,
    "title": "Hello , i found a mismatch between the implemented torchvision.models.detection.backbone_utils.resnet_fpn_backbone() in github and what we get by installing via pip, the one in github is having returned_layer and extra_blocks as parameters but one we get by installign doesnt have any of these parameters,",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/vision/issues/2878",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-10-23T10:18:55Z",
    "updated_at": "2020-10-23T10:38:52Z",
    "user": "akashprakas"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 46760,
    "title": "How to define a new data type in  native_functions.yaml?",
    "body": "How to define a new data type in  native_functions.yaml? \r\nSuch as there is exist a data type \"int[]\"\uff0cbu i want a data type \"float[]\"\uff0cwhat sould i do?\r\nLooking forward to your advice, I will be very grateful\uff01\r\n\n\ncc @ezyang @bhosmer @smessmer @ljk53 @bdhirsh @ailzhang",
    "url": "https://github.com/pytorch/pytorch/issues/46760",
    "state": "open",
    "labels": [
      "module: internals",
      "triaged"
    ],
    "created_at": "2020-10-23T09:04:27Z",
    "updated_at": "2020-10-26T15:16:34Z",
    "user": "max-niu"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 193,
    "title": "\u2753 [Question] How does max_batch_size work? ",
    "body": "## \u2753 Question\r\n\r\nHow one should use `max_batch_size` compilation option? There's not a lot said about it on [documentation](https://nvidia.github.io/TRTorch/py_api/trtorch.html) apart of that it should greater than 0.\r\n\r\n## What you have already tried\r\n\r\nHere's the toy example I'm playing with:\r\n```\r\nimport torch\r\nimport trtorch\r\n\r\ntorch.manual_seed(0)\r\n\r\nsize = (1, 1)\r\ntorch_model = torch.nn.Linear(*size)\r\nscript_model = torch.jit.script(torch_model.eval().cuda())\r\ntrt_model = trtorch.compile(script_model, {\r\n    \"input_shapes\": [size],\r\n    \"op_precision\": torch.half,\r\n    \"max_batch_size\": 2\r\n})\r\n\r\nprint(\"Single value:\")\r\nx1 = torch.rand(size).cuda()\r\nprint(torch_model(x1).tolist(), trt_model(x1.half()).tolist())\r\n\r\nprint(\"Batch:\")\r\nx2 = torch.rand((2, 1)).cuda()\r\nprint(torch_model(x2).tolist(), trt_model(x2.half()).tolist())\r\n```\r\nI'm expecting the output to be the same for both PyTorch and TRTorch models for both `x1` and `x2`. Here's the output I'm getting (notice the error message and missing second value from TRTorch model on the last line):\r\n```\r\n$ python test.py \r\nSingle value:\r\n[[0.53578120470047]] [[0.5357810258865356]]\r\nBatch:\r\nERROR: [__torch__.torch.nn.modules.linear.Linear_trt_engine] - Parameter check failed at: engine.cpp::setBindingDimensions::948, condition: profileMaxDims.d[i] >= dimensions.d[i]\r\n[[0.5354551076889038], [0.5341419577598572]] [[0.5354547500610352]]\r\n```\r\nI expected that setting `max_batch_size=2` would do the trick but apparently it does not.\r\n## Environment\r\n - x86 CPU Architecture, 1660Ti GPU, Linux OS;\r\n - Python 3.8.6;\r\n - CUDA 10.1;\r\n - PyTorch 1.5.1, installed using pip;\r\n - TRTorch 0.0.3, installed using `pip install  https://github.com/NVIDIA/TRTorch/releases/download/v0.0.3/trtorch-0.0.3-cp38-cp38-linux_x86_64.whl`\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/193",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-10-21T15:49:13Z",
    "updated_at": "2020-10-30T08:22:33Z",
    "user": "ateraz"
  },
  {
    "repo": "pytorch/vision",
    "number": 2853,
    "title": "How to get corresponding feature regions of final detections from feature map of backbone?",
    "body": "Hi, \r\n\r\nFor every output detection [x1, y1, x2, y2], I would like to extract its corresponding region in the feature map output of the backbone of Faster-RCNN. Similarly, I want to extract the corresponding region in the feature map for the target (groundtruth) bounding boxes.\r\n\r\nCan you point me to how this should be done?\r\n\r\nThank you. \r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/2853",
    "state": "open",
    "labels": [
      "question",
      "topic: object detection"
    ],
    "created_at": "2020-10-21T13:24:56Z",
    "updated_at": "2020-10-27T12:11:54Z",
    "user": "igygi"
  },
  {
    "repo": "pytorch/vision",
    "number": 2850,
    "title": "Can pretrained resnet-50 extract feature from a higher resolution picture?",
    "body": "Can pre-trained ResNet-50 extract feature from a higher resolution picture?\r\n\r\nTypically, when we use Resnet to extract features, we need to crop the image into  224 x 224 then pass the image to ResNet.\r\n\r\nI want to know if we want a larger image( e.g. 720 x 720) to be processed, we have to modify the network and re-train the network? Can we directly use the original pre-train network? Is the quality of feature extraction guaranteed?\r\n\r\nThanks! \r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/2850",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-10-21T04:45:24Z",
    "updated_at": "2020-10-26T12:58:27Z",
    "user": "Frank-Dz"
  },
  {
    "repo": "pytorch/vision",
    "number": 2832,
    "title": "About the segmentation.",
    "body": "In the reference, I replaced the cross entropy in the semantic segmentation module with weighted cross entropy. The result was worse. The weight is calculated based on the training set. If the cross entropy is replaced by focal loss, the effect is also poor. Why is this? Still, the best loss function for semantic segmentation is cross entropy.\r\nI sincerely need your help!\r\n",
    "url": "https://github.com/pytorch/vision/issues/2832",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-10-19T01:53:05Z",
    "updated_at": "2020-10-19T07:26:20Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/text",
    "number": 1045,
    "title": "How to get the original sentences from train_iter object?",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\nIs there a easy way to print out the original input sentences instead of tensor objects? For example:\r\n\r\n```\r\ndef eval(data_iter, model, args):\r\n    model.eval()\r\n    corrects, avg_loss = 0, 0\r\n    for batch in data_iter:\r\n        feature, target = batch.text, batch.label\r\n        print (feature.original_sentence)\r\n```\r\n",
    "url": "https://github.com/pytorch/text/issues/1045",
    "state": "closed",
    "labels": [],
    "created_at": "2020-10-16T18:30:17Z",
    "updated_at": "2020-10-16T19:25:24Z",
    "user": "sunyangfu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 46450,
    "title": "How to use GPU Tensor in diffrent GPUStreams with multi threads",
    "body": "thread task codes as follow\uff1a\r\nvoid* task_routine3(void** arg)\r\n{\r\n    struct timeval time_cur;\r\n    auto options = torch::TensorOptions().device(torch::kCUDA, 0);\r\n    torch::Device device(torch::kCUDA, 0);\r\n\r\n    pthread_t tid = pthread_self();\r\n    std::cout << tid << \"Start time:\" << time_cur.tv_sec << \":\" << time_cur.tv_usec << std::endl;\r\n    at::cuda::CUDAStream mystream = at::cuda::getStreamFromPool();\r\n    at::cuda::setCurrentCUDAStream(mystream);\r\n\r\n    {\r\n        at::cuda::CUDAStreamGuard guard(mystream);\r\n        std::cout << \"Stream ID: \" << mystream.id() << std::endl;\r\n\r\n        torch::Tensor* pt_base_feature_cpu = (torch::Tensor*) arg[0];\r\n        torch::Tensor* pt_match_feature_cpu = (torch::Tensor*) arg[1];\r\n\r\n        for(int i = 0; i < 10; i++)\r\n        {\r\n            torch::Tensor base_feature = (pt_base_feature_cpu->slice(0, i*50000, (i+1)*50000, 1)).to(device);\r\n            torch::Tensor match_feature = (*pt_match_feature_cpu).to(device);\r\n\r\n            torch::Tensor tensor_tmp;\r\n            torch::Tensor tensor_sum;\r\n            std::tuple<torch::Tensor, torch::Tensor> sort_ret;\r\n\r\n            tensor_tmp = torch::sub(base_feature, match_feature);\r\n            tensor_tmp = torch::pow(tensor_tmp, 2);\r\n            tensor_sum = torch::sum(tensor_tmp, 1);\r\n            sort_ret = torch::topk(tensor_sum, 1);\r\n        }\r\n    }\r\n}\r\n\r\nI use thread pools to run the thread-func in multi-threads.  I found that running time using single thread is seem to multi threads. T want to using multi threads to save running time.\r\nHow can I do it? Anyone can help me?\r\n\r\n\r\n## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/46450",
    "state": "closed",
    "labels": [],
    "created_at": "2020-10-16T06:44:57Z",
    "updated_at": "2020-10-16T22:33:05Z",
    "user": "litttl"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 497,
    "title": "What is the meaning of warmup_steps when I fine-tune the model, can I remove it?",
    "body": "```python\r\nevaluator = evaluation.EmbeddingSimilarityEvaluator(sentences1, sentences2, scores)\r\n# Define your train dataset, the dataloader and the train loss\r\ntrain_dataset = SentencesDataset(train_data, model)\r\ntrain_dataloader = DataLoader(train_dataset, shuffle=True, batch_size=32)\r\ntrain_loss = losses.CosineSimilarityLoss(model)\r\n\r\n# Tune the model\r\nmodel.fit(train_objectives=[(train_dataloader, train_loss)], epochs=1, warmup_steps=100, evaluator=evaluator, evaluation_steps=100, output_path='./Ko2CnModel')\r\n```",
    "url": "https://github.com/huggingface/sentence-transformers/issues/497",
    "state": "closed",
    "labels": [],
    "created_at": "2020-10-14T10:03:43Z",
    "updated_at": "2020-10-14T10:31:27Z",
    "user": "wmathor"
  },
  {
    "repo": "pytorch/vision",
    "number": 2804,
    "title": "loss\u540e\u9762\u62ec\u53f7\u662f\u4ec0\u4e48Epoch: [0]  [ 440/3560]  eta: 0:22:22  lr: 0.00997769948251307  loss: 0.5050 (0.8583)",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\u8bf7\u95ee\u6709\u8c01\u77e5\u9053loss\u540e\u9762\u62ec\u53f7\u91cc\u7684\u662f\u4ec0\u4e48\u5417\uff0c\u4e5f\u662floss\u5417\uff0c\u90a3\u662f\u4ec0\u4e48loss\r\n",
    "url": "https://github.com/pytorch/vision/issues/2804",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-10-14T06:19:14Z",
    "updated_at": "2020-10-14T08:19:45Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 494,
    "title": "what is the license for this repository?",
    "body": "",
    "url": "https://github.com/huggingface/sentence-transformers/issues/494",
    "state": "closed",
    "labels": [],
    "created_at": "2020-10-12T09:31:41Z",
    "updated_at": "2020-10-12T09:32:15Z",
    "user": "pinkeshbadjatiya"
  },
  {
    "repo": "huggingface/transformers",
    "number": 7727,
    "title": "what is the perplexity of distilbert-base-uncased ? ",
    "body": "# \u2753 Questions & Help\r\n\r\n\r\n## Details\r\n\r\nIn the [readme](https://github.com/huggingface/transformers/tree/master/examples/distillation) , it is said that distilbert-base-uncased is pretraind on the same data used to pretrain Bert, so I wonder what is the final perplexity or cross entropy of the pretrain?\r\n",
    "url": "https://github.com/huggingface/transformers/issues/7727",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2020-10-12T09:11:49Z",
    "updated_at": "2020-12-20T13:34:47Z",
    "user": "OleNet"
  },
  {
    "repo": "pytorch/vision",
    "number": 2788,
    "title": "Error with torchvision.io.read_image with models",
    "body": "## \ud83d\udc1b Bug\r\n\r\n![image](https://user-images.githubusercontent.com/47158509/95675524-87d8bd00-0bd5-11eb-8e50-8fe1ddad0aa0.png)\r\n\r\n\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behaviour:\r\n\r\nHere is simple code to reproduce the error.\r\nNotice that I'm not passing any transforms to image. Since `torchvision.io.read_image` will read normalized images only.\r\n\r\n```\r\n# from PIL import Image, ImageDraw\r\nimport torch\r\nfrom torchvision.models.detection import fasterrcnn_resnet50_fpn\r\n# from typing import Dict\r\nfrom torchvision.io.image import read_image\r\n\r\nimg_path = \"../test/assets/grace_hopper_517x606.jpg\"\r\n\r\nif __name__ == \"__main__\":\r\n    #  img = torch.rand(3, 226, 226)        # This Works\r\n    img = read_image(img_path)             # This does not.\r\n   ## img = Image.open(img_path)        ## This works\r\n   ## img = T.ToTensor()(img)                ## With this\r\n\r\n    img = torch.unsqueeze(img, 0)\r\n    print(img.shape)\r\n    model = fasterrcnn_resnet50_fpn()\r\n    model = model.eval()\r\n    out = model(img)\r\n    print(out)\r\n\r\n```\r\n\r\n\r\n## Expected behavior\r\n\r\nWe should get output. This works if tensor is simply `torch.randn(1, 3, 226, 226)` and it should be same with `read_image`.\r\n\r\n## Environment\r\n - PyTorch / torchvision Version (e.g., 1.0 / 0.4.0): 1.6 torchvision: master \r\n - OS (e.g., Linux): Windows\r\n - How you installed PyTorch / torchvision (`conda`, `pip`, source): source\r\n - Build command you used (if compiling from source): `pip install .`\r\n - Python version: 3.6\r\n - CUDA/cuDNN version: None\r\n - GPU models and configuration: None\r\n\r\n## Additional context\r\n\r\nMaybe I have misinterpreted what `read_image` does.\r\n\n\ncc @vfdev-5",
    "url": "https://github.com/pytorch/vision/issues/2788",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2020-10-11T09:51:20Z",
    "updated_at": "2023-12-16T16:40:18Z",
    "user": "oke-aditya"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 46137,
    "title": "How to build on Arch Linux",
    "body": "# How to build on Arch Linux\r\n\r\nBuild from source doco:\r\nhttps://github.com/pytorch/pytorch#from-source\r\n\r\n## Cheat sheet:\r\nCreate new environment:\r\n```\r\nconda update -n base conda\r\nconda create --name pytorch-build\r\nactivate pytorch-build\r\n```\r\n\r\nInstall dependencies listed here:\r\nhttps://github.com/pytorch/pytorch#install-dependencies\r\n\r\n```\r\ngit submodule sync --recursive\r\ngit submodule update --init --recursive\r\nmake -j4\r\n```\r\n\r\nBuild doco:\r\n\r\n    cd docs\r\n    pip install -r requirements.txt\r\n    # If necessary:   pip install --ignore-installed certifi\r\n    make html\r\n\r\n### Only if necessary\r\n\r\nI was getting errors importing packages that I had explicitly installed:\r\n\r\n    conda update --all\r\n\r\nThe above submodule update will likely fix the below issues that needed to be \"solved\" otherwise:\r\n\r\nIf `glog` is required:\r\n\r\n    sudo pacman -S --asdeps google-glog\r\n\r\nHave make find pthread:\r\n\r\n    CMAKE_THREAD_LIBS_INIT=\"-pthread\" make\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/46137",
    "state": "closed",
    "labels": [],
    "created_at": "2020-10-10T07:33:32Z",
    "updated_at": "2020-10-12T04:37:49Z",
    "user": "HaleTom"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 46081,
    "title": "where is the Source Code of torch.mode operator?",
    "body": "Hi, Developers,\r\n\r\nI use PyTorch 1.5 (build from source code) and want to check the source code of the implementation of **torch.mode**.\r\nHowever, I cannot find the **THFloatTensor_mode(values_, indices_, self_, dim, keepdim)**, where is it?\r\n\r\nReally want to get your reply.\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/46081",
    "state": "closed",
    "labels": [],
    "created_at": "2020-10-09T06:43:35Z",
    "updated_at": "2020-10-10T08:42:08Z",
    "user": "ddummkopfer"
  },
  {
    "repo": "pytorch/serve",
    "number": 712,
    "title": "how to register model present in local file system",
    "body": "I have `my-model`, present in `/path/to/models`; the path is local file system path.\r\n\r\n**command to start `torchserve`**: `docker run -p 8080:8080 -p 8081:8081 --name my-serve pytorch/torchserve:0.2.0-cpu`\r\n\r\nThen when I try to register `my-model` -> `curl -X POST \"http://localhost:8081/models?url=/path/to/models/my-model.mar\"`, I get:\r\n\r\n\t{\r\n\t  \"code\": 404,\r\n\t  \"type\": \"ModelNotFoundException\",\r\n\t  \"message\": \"Model not found in model store: /path/to/models/my-model.mar\"\r\n\t}\r\n\r\nThe _register api call_ link is broken on the [docs](https://pytorch.org/serve/server.html#arguments) and I couldn't find anywhere for local file system.",
    "url": "https://github.com/pytorch/serve/issues/712",
    "state": "closed",
    "labels": [
      "triaged_wait"
    ],
    "created_at": "2020-10-06T10:29:33Z",
    "updated_at": "2020-10-06T14:01:18Z",
    "user": "paniabhisek"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 45856,
    "title": "What option(USE_NNAPI \"Use NNAPI\") is used for?",
    "body": "Hello all,\r\n\r\nthere is an `option(USE_NNAPI \"Use NNAPI\" OFF)` within [CMakeLists.txt#L179](https://github.com/pytorch/pytorch/blob/cf48872d28f945d47793f63e19c54dd15bf580f7/CMakeLists.txt#L179)   \r\nI'd like to know if this option is on, what is in this case enabled?\r\nI do have a device with NN-API driver - is this help to use this device NN-API backend?\r\n\r\nThank you.",
    "url": "https://github.com/pytorch/pytorch/issues/45856",
    "state": "closed",
    "labels": [],
    "created_at": "2020-10-05T18:08:27Z",
    "updated_at": "2020-10-05T21:19:31Z",
    "user": "peter197321"
  },
  {
    "repo": "pytorch/elastic",
    "number": 130,
    "title": "How to programmatically determine if a training job has finished using `kubectl`? ",
    "body": "## \u2753 Questions and Help\r\nHow to programmatically determine if a training job has finished using `kubectl`? \r\nThe field `status.replicaStatuses.Worker.succeeded` seems to indicate the number of succeeded pods.\r\nHow does one determine if the whole job has succeeded? \r\nThis is useful when the training job is part of a workflow (e.g. orchestrated by argo or airflow).  \r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nBefore submitting, please ensure you have gone through our documentation. Here\r\nare some links that may be helpful:\r\n\r\n* [What is torchelastic?](../../README.md)\r\n* [Quickstart on AWS](../../aws/README.md)\r\n* [Usage](../../USAGE.md)\r\n* [Examples](../../examples/README.md)\r\n* API documentation\r\n    * [Overview](../../USAGE.md)\r\n    * [Rendezvous documentation](../../torchelastic/rendezvous/README.md)\r\n    * [Checkpointing documentation](../../torchelastic/checkpoint/README.md)\r\n* [Configuring](../../USAGE.md#configuring)\r\n\r\n  \r\n### Question\r\n<!-- your question here -->",
    "url": "https://github.com/pytorch/elastic/issues/130",
    "state": "closed",
    "labels": [],
    "created_at": "2020-10-03T06:12:30Z",
    "updated_at": "2020-10-28T08:18:54Z",
    "user": "darthsuogles"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 45797,
    "title": "How to set a correct random seed?",
    "body": "\r\nHi, I am using pytorch==1.3/1.1 with 4/2 GPUs to training network.\r\nI use the following code to set random seed at the beginning of program:\r\n`\r\ndef seed_torch(seed=1029):\r\n    random.seed(seed)\r\n    os.environ['PYTHONHASHSEED'] = str(seed)\r\n    np.random.seed(seed)\r\n    torch.manual_seed(seed)\r\n    torch.cuda.manual_seed(seed)\r\n    torch.cuda.manual_seed_all(seed)  # if you are using multi-GPU.\r\n    torch.backends.cudnn.benchmark = False\r\n    torch.backends.cudnn.deterministic = True\r\n\r\n\r\nseed_torch()\r\n`\r\nThe only random function I called during training/testing time is torch.randint.\r\nHowever, I found that though I have set the random seed, the testing result is still different every time.\r\nIf I replace torch.randint with torch.zeros, I can get same accuracy even without setting the random seed.\r\n\r\nI do not know why?\r\nCan any one help me about this?",
    "url": "https://github.com/pytorch/pytorch/issues/45797",
    "state": "closed",
    "labels": [],
    "created_at": "2020-10-03T02:49:13Z",
    "updated_at": "2020-10-05T20:47:56Z",
    "user": "densechen"
  },
  {
    "repo": "pytorch/serve",
    "number": 711,
    "title": "[Question] How to debug custom handlers?",
    "body": "Hi! I am very excited about torch serve, so thanks to all contributors to this awesome tool! \r\nI have already run my custom model with custom postprocessing and here is a question that I am struggling to find an answer on. Any help would be very appreciated!\r\n\r\nQuestion:\r\nHow to debug my custom handlers? In other words, how can I see what is happening with the data on each step (i.e initialize, preprocess, inference, postprocess, and my custom one) in my IDE while sending requests to running torchserve server? I was able to fix simple issues using the `ts_log.log` file and it was helpful. BUT it becomes not very comfortable for me once I want to do something more complicated.\r\n\r\nThanks for any help! \r\n",
    "url": "https://github.com/pytorch/serve/issues/711",
    "state": "open",
    "labels": [
      "triaged_wait"
    ],
    "created_at": "2020-10-02T18:38:28Z",
    "updated_at": "2023-04-14T00:06:23Z",
    "user": "veronikayurchuk"
  },
  {
    "repo": "pytorch/vision",
    "number": 2740,
    "title": "ValueError: All bounding boxes should have positive height and width. Found invaid box [500.728515625, 533.3333129882812, 231.10546875, 255.2083282470703] for target at index 0.",
    "body": "i am training detecto for custom object detection. anyone who can help me as soon as possible. i will be very grateful to you.\r\nhere is the code.\r\n     from detecto import core, utils, visualize\r\n    dataset = core.Dataset('content/sample_data/newdataset/car/images/')\r\n    model = core.Model(['car'])\r\n    model.fit(dataset)\r\n\r\nhere is the output:\r\n\r\n\r\nValueError                                Traceback (most recent call last)\r\n<ipython-input-8-02dc210525d1> in <module>()\r\n      4 model = core.Model(['car'])\r\n      5 \r\n----> 6 model.fit(dataset)\r\n\r\n2 frames\r\n/usr/local/lib/python3.6/dist-packages/torchvision/models/detection/generalized_rcnn.py in forward(self, images, targets)\r\n     91                     raise ValueError(\"All bounding boxes should have positive height and width.\"\r\n     92                                      \" Found invalid box {} for target at index {}.\"\r\n---> 93                                      .format(degen_bb, target_idx))\r\n     94 \r\n     95         features = self.backbone(images.tensors)\r\n\r\nValueError: All bounding boxes should have positive height and width. Found invaid box [500.728515625, 533.3333129882812, 231.10546875, 255.2083282470703] for target at index 0.\r\n",
    "url": "https://github.com/pytorch/vision/issues/2740",
    "state": "closed",
    "labels": [
      "question",
      "topic: object detection"
    ],
    "created_at": "2020-10-02T06:11:29Z",
    "updated_at": "2024-05-13T09:19:30Z",
    "user": "kashf99"
  },
  {
    "repo": "pytorch/serve",
    "number": 706,
    "title": "How to serve model trained over mmdetection framework?",
    "body": "I have trained my model using the MMdetection framework. After training the model, I have a checkpoint file in the .pth format and config file which helps in making inference/prediction. To draw an inference or making prediction steps take the following lines to generate predictions- \r\n\r\n    from mmdet.apis import init_detector, inference_detector, show_result,show_result_pyplot\r\n    import mmcv\r\n    config_file = 'path to configuration file path'\r\n    checkpoint_file = checkpoint path\r\n     img= 'image_path'\r\n     model = init_detector(config_file, checkpoint_file, device='cuda:0')\r\n     result = inference_detector(model, img)\r\n\r\nCan you help me making it possible to serve mmdetection model through torch serve?",
    "url": "https://github.com/pytorch/serve/issues/706",
    "state": "closed",
    "labels": [
      "bug",
      "triaged_wait"
    ],
    "created_at": "2020-09-30T10:36:39Z",
    "updated_at": "2022-07-30T13:40:08Z",
    "user": "Atul997"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1171,
    "title": "Efficiency of dcgan tutorial",
    "body": "When I run the [dcgan_faces_tutorial.py](https://github.com/pytorch/tutorials/blob/master/beginner_source/dcgan_faces_tutorial.py) script, I have noticed that two python processes are created on the CPU according to the top command.\r\n\r\n```\r\n 27062 mahmood   20   0 9404132   1.5g  90116 D  31.9   1.6   5:55.09 python3\r\n 27004 mahmood   20   0   12.0g   3.3g 929032 S   7.3   3.5   1:56.48 python3\r\n```\r\n\r\nAlso, the GPU utilization according to nvidia-smi is pretty low\r\n\r\n```\r\n+-----------------------------------------------------------------------------+\r\n| NVIDIA-SMI 418.67       Driver Version: 418.67       CUDA Version: 10.1     |\r\n|-------------------------------+----------------------+----------------------+\r\n| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |\r\n| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |\r\n|===============================+======================+======================|\r\n|   0  GeForce RTX 208...  Off  | 00000000:41:00.0  On |                  N/A |\r\n| 45%   54C    P2    94W / 260W |   1956MiB / 10984MiB |      9%      Default |\r\n+-------------------------------+----------------------+----------------------+\r\n\r\n+-----------------------------------------------------------------------------+\r\n| Processes:                                                       GPU Memory |\r\n|  GPU       PID   Type   Process name                             Usage      |\r\n|=============================================================================|\r\n|    0      1196      G   /usr/lib/xorg/Xorg                            16MiB |\r\n|    0      1226      G   /usr/bin/gnome-shell                          49MiB |\r\n|    0     14727      G   /usr/lib/xorg/Xorg                            62MiB |\r\n|    0     14898      G   /usr/bin/gnome-shell                          94MiB |\r\n|    0     27004      C   python3                                     1625MiB |\r\n+-----------------------------------------------------------------------------+\r\n```\r\nIs that normal? I don't think so.\n\ncc @datumbox @nairbv @fmassa @NicolasHug @YosuaMichael",
    "url": "https://github.com/pytorch/tutorials/issues/1171",
    "state": "closed",
    "labels": [
      "question",
      "module: vision",
      "docathon-h1-2023",
      "medium"
    ],
    "created_at": "2020-09-29T12:21:24Z",
    "updated_at": "2023-06-01T07:18:28Z",
    "user": "mahmoodn"
  },
  {
    "repo": "pytorch/examples",
    "number": 830,
    "title": "imagenet how to download the classicication dataset?",
    "body": "",
    "url": "https://github.com/pytorch/examples/issues/830",
    "state": "closed",
    "labels": [],
    "created_at": "2020-09-29T07:05:24Z",
    "updated_at": "2022-03-09T21:31:26Z",
    "user": "henbucuoshanghai"
  },
  {
    "repo": "pytorch/text",
    "number": 1013,
    "title": "How to pass new pre-trained embeddings while sharing the same vocabulary across torchtext.Field?",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\nI was trying to concatenate two embedding layers in my CNN from two different pre-trained embeddings, before applying my convolutions.\r\n\r\nHere's the basic workflow:\r\n\r\n    # Load pre-trained embeddings (dim=100)\r\n    from torchtext.vocab import Vectors\r\n    vectors_amazon = Vectors(name='gensim_embeddings_amazon.txt', cache='{}/{}'.format(PROJECT_FOLDER, OUTPUT_FOLDER))\r\n    vectors_imdb = Vectors(name='gensim_embeddings_imdb.txt', cache='{}/{}'.format(PROJECT_FOLDER, OUTPUT_FOLDER))\r\n\r\nThen I create my `text_field` and `label_field` as follow:\r\n\r\n    # Custom_tokenizer is my tokenizer, MAX_SIZE=20000\r\n    text_field = Field(sequential=True, use_vocab=True, tokenize=custom_tokenizer)\r\n    label_field = LabelField()\r\n\r\n    text_field.build_vocab(train_data,\r\n                           max_size=MAX_SIZE,\r\n                           vectors=vectors_amazon)\r\n    label_field.build_vocab(train_data)\r\n\r\nand after creating my train/valid/test iterator with `BucketIterator`, I create my CNN `model` for sentiment analysis.\r\n\r\nSo far so good, the problem is that I'd like to create another embedding considering also the `vectors_imdb` and I'm stuck here, since for the embedding layer I'd do the following:\r\n\r\n    pretrained_embeddings = text_field.vocab.vectors\r\n    model.embedding.weight.data.copy_(pretrained_embeddings)\r\n\r\nbut I have no idea how I can pass to a `model.second_embedding.weight.data` the values in `vectors_imdb` while keeping the correct alignment between embeddings and sharing the same vocab (coming from my training data)\r\n\r\nI tried something like \r\n\r\n    second_text_field = text_field\r\n    second_text_field.vocab.set_vectors(text_field.vocab.stoi, vectors_imdb, 100)\r\n\r\nbut of course it doesn't work since changing vectors in `second_text_field` also modify `text_field` ones.\r\n\r\nHow can I modify vectors while keeping the correct mapping word:vector representation?\r\nI'm afraid the only way is to loop through `vectors_imdb` keeping only words that are in my vocab, sorting them so that the two embeddings match and pass the result to the second_embedding layer, right?\r\n",
    "url": "https://github.com/pytorch/text/issues/1013",
    "state": "open",
    "labels": [
      "legacy"
    ],
    "created_at": "2020-09-28T17:27:14Z",
    "updated_at": "2020-10-05T13:38:07Z",
    "user": "jacopo-repossi"
  },
  {
    "repo": "pytorch/vision",
    "number": 2717,
    "title": "What's the pretrained_settings for r2plus1d_18?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\nHi,\r\nI want to know the pretrained_settings for r2plus1d_18, which has not been implemented, including input_space,input_size,input_range,mean,std.  In pytorch.pretrainedmodels, they implement resnet152, vgg19_bn, inceptionv4 with those pretrained_settings, which are necessary for TransformImage to transform the image. If include pretrained_settings, it will be more user-friendly for r3d_18,mc3_18,r2plus1d_18 models to extract vidoe frame features.Many thanks!\r\n![image](https://user-images.githubusercontent.com/33551398/94428918-1c015800-01c4-11eb-910d-bb4e39d9fd13.png)\r\n\n\ncc @bjuncek",
    "url": "https://github.com/pytorch/vision/issues/2717",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "module: video"
    ],
    "created_at": "2020-09-28T12:00:52Z",
    "updated_at": "2020-09-29T12:20:12Z",
    "user": "XinyuLyu"
  },
  {
    "repo": "pytorch/vision",
    "number": 2711,
    "title": "Test the model with an image",
    "body": "Hello\r\nI compressed Mask R-CNN and finished the training,  but the checkpoint (.pth) is different from the regular one, what can I do if I want to load the checkpoint to Mask R-CNN to test its speed with a new image? Thank you! ",
    "url": "https://github.com/pytorch/vision/issues/2711",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-09-27T16:26:52Z",
    "updated_at": "2020-09-28T10:00:04Z",
    "user": "jiaerfei"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 45387,
    "title": "How to build from a release tar package ?",
    "body": "Hi, I download newest release tar package and find it can not build pytorch, Can anyone help meo build this release version from source?\r\n\r\n```\r\nwget https://github.com/pytorch/pytorch/archive/v1.6.0.tar.gz\r\ntar xf v1.6.0.tar.gz\r\ncd pytorch-1.6.0\r\npython3 setup.py install\r\n```\r\n\r\noutput:\r\nfatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).\r\nBuilding wheel torch-1.6.0a0\r\n-- Building version 1.6.0a0\r\nCould not find /home/xzpeng/pytorch/pytorch-1.6.0/third_party/gloo/CMakeLists.txt\r\nDid you run 'git submodule update --init --recursive'?\r\n\r\nDoes the release tar package support building from source?\r\n\n\ncc @ezyang @seemethere @malfet @walterddr",
    "url": "https://github.com/pytorch/pytorch/issues/45387",
    "state": "closed",
    "labels": [
      "module: binaries",
      "triaged"
    ],
    "created_at": "2020-09-27T03:09:03Z",
    "updated_at": "2020-09-29T19:11:21Z",
    "user": "haoren3696"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 45386,
    "title": "How to convert pytorch model to Nvidia faster transformer?",
    "body": "Hi, i want to detect Bert model structure in pytorch model and convert the structure by Nvidia faster transformer op automatically.\r\nIs there any existing project? If not, i want to develop one, so should i develop on origin pytorch or TorchScript? Should i develop a pass to detect Bert in TorchScript IR and replace it by faster transformer op?\r\nThankyou very much!\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/45386",
    "state": "closed",
    "labels": [],
    "created_at": "2020-09-27T02:08:14Z",
    "updated_at": "2020-09-28T15:56:34Z",
    "user": "wangxiang2713"
  },
  {
    "repo": "pytorch/examples",
    "number": 826,
    "title": "language model bug?",
    "body": "https://github.com/pytorch/examples/blob/master/word_language_model/data.py#L46\r\n\r\non the last iteration of the loop ids holds onto the tensor before catting idss but no other iteration of ids is.\r\nI get significantly better results after adding:\r\nids = []\r\nBefore catting idss into ids.",
    "url": "https://github.com/pytorch/examples/issues/826",
    "state": "closed",
    "labels": [],
    "created_at": "2020-09-25T18:14:49Z",
    "updated_at": "2020-09-25T18:44:08Z",
    "comments": 0,
    "user": "wesboyt"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1166,
    "title": "Char RNN classification with batch size",
    "body": "I'm replicating [this example](https://github.com/pytorch/tutorials/blob/master/intermediate_source/char_rnn_classification_tutorial.py) for a **classification** with a **char-rnn**.\r\n```python\r\nfor iter in range(1, n_iters + 1):\r\n    category, line, category_tensor, line_tensor = randomTrainingExample()\r\n    output, loss = train(category_tensor, line_tensor)\r\n    current_loss += loss\r\n```\r\nI see that every epoch only 1 example is taken and random. I would like that each epoch **all the dataset** is taken with a specific **batch size** of examples. I can adjust the code to do this myself but I was wondering if some flags already exist.\r\n\r\nThank you\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/1166",
    "state": "closed",
    "labels": [
      "question",
      "Text"
    ],
    "created_at": "2020-09-25T17:57:29Z",
    "updated_at": "2024-12-11T17:57:11Z",
    "user": "paulthemagno"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 45331,
    "title": "How to print C++ log like GRAPH_DEBUG?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/45331",
    "state": "closed",
    "labels": [],
    "created_at": "2020-09-25T06:37:24Z",
    "updated_at": "2020-09-25T14:36:45Z",
    "user": "liym27"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 45328,
    "title": "How long would it takes for pytorch cuda version to support RTX30 series?",
    "body": "## \ud83d\ude80 Feature\r\nAs the title. When would pytorch cuda version support RTX30 series?",
    "url": "https://github.com/pytorch/pytorch/issues/45328",
    "state": "closed",
    "labels": [],
    "created_at": "2020-09-25T05:55:51Z",
    "updated_at": "2020-10-04T10:58:05Z",
    "user": "GregXu247"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 45266,
    "title": "how to register hook on +, - ,*, /  or how to get the input of them?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\nhow to register hook on +, - ,*, /  or how to get the input of them ?",
    "url": "https://github.com/pytorch/pytorch/issues/45266",
    "state": "closed",
    "labels": [],
    "created_at": "2020-09-24T09:20:57Z",
    "updated_at": "2020-09-25T15:08:27Z",
    "user": "Stick-To"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1163,
    "title": "How do I go back to the old view of the site",
    "body": "Hi, I like the old version of the Pytorch website on the tutorial that I can view everything at once. But now they changed that I can only view like 7 to 5 of it on one page. How do I go back to the old one?",
    "url": "https://github.com/pytorch/tutorials/issues/1163",
    "state": "open",
    "labels": [],
    "created_at": "2020-09-21T09:32:53Z",
    "updated_at": "2020-09-21T09:32:53Z",
    "user": "AliceSum"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 45059,
    "title": "How to view C++ error report stack of pytorch?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/45059",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2020-09-21T09:09:54Z",
    "updated_at": "2020-09-22T16:28:17Z",
    "user": "liym27"
  },
  {
    "repo": "pytorch/xla",
    "number": 2502,
    "title": "How to prevent cyclic computation graph in torch xla multiprocessing?",
    "body": "## \u2753 Questions and Help\r\nHi,\r\n\r\nI am trying to build a dynamics simulator software on the TPU. On the high level, it basically needs to do this (I have pre-trained the model separately elsewhere):\r\n\r\n```\r\nfor i in range(num_of_step):\r\n    forces = model(positions)\r\n    new_positions = update_functions(forces, positions)\r\n    positions = new_positions\r\n```\r\n\r\nWhen I do this workflow on a single TPU, it is quite fast. While I am aware that there is generally an issue with slow `tensor.item()` call, the following sequence will work quite fast for me:\r\n\r\n```\r\nfor i in range(num_of_step):\r\n    positions = torch.Tensor(structure.positions).to(xla_device, non_blocking=True)\r\n    forces = model(positions)\r\n    cpu_forces = forces.to(cpu_device).numpy()\r\n    structure.positions = update_function(cpu_forces, structure.positions)\r\n```\r\n\r\nHowever, when I do xla multiprocessing on the TPU, somehow the `.to(cpu_device)` call will be extremely slow. The code snippet looks like this:\r\n\r\n```\r\ndef _map_fn(xla_index):\r\n    xla_device = xm.xla_device()\r\n    for i in range(num_of_step):\r\n        positions = torch.Tensor(structure.positions).to(xla_device, non_blocking=True)\r\n        model_indices = indexing_function(positions, xla_index)\r\n        forces = model(positions, model_indices).detach()\r\n        forces = xm.all_reduce(xm.REDUCE_SUM, forces).detach().clone()\r\n        cpu_forces = forces.to(cpu_device).numpy()\r\n        structure.positions = update_function(cpu_forces, structure.positions)\r\n        xm.rendezvous('sync_step')\r\nxmp.spawn(_map_fn, nprocs=8, start_method='fork')\r\n```\r\n\r\nIf I were to modify the software to eliminate `.to(cpu_device)` call, I can get this to run fast:\r\n```\r\ndef _map_fn(xla_index):\r\n    xla_device = xm.xla_device()\r\n    structure.positions = torch.Tensor(structure.positions).to(xla_device, non_blocking=True)\r\n\r\n    for i in range(num_of_step):\r\n        positions = structure.positions.detach().clone()\r\n        model_indices = indexing_function(positions, xla_index)\r\n        forces = model(positions, model_indices).detach()\r\n        forces = xm.all_reduce(xm.REDUCE_SUM, forces).detach().clone()\r\n        structure.positions = update_function(forces, structure.positions).detach().clone()\r\n        xm.rendezvous('sync_step')\r\nxmp.spawn(_map_fn, nprocs=8, start_method='fork')\r\n```\r\n\r\nHowever, the compiler seems to have decided to unfold this code snippet into one giant computation graph to execute at once. So I get a weird behavior... on a standard `structure` size, I can run 16 steps but the code won't run at all if I try to run 17 steps (no error thrown either). If I were to increase the input `structure` size by 2x, the compiler will only allow the code snippet to run & finish 8 steps (but won't start at all if I try to run 9 steps instead). So my suspicion is that this code snippet runs when the compiler can place the entire chain in a single graph in the TPU, despite my best effort to separate the computation graph from the `structure.positions` variable.\r\n\r\n\r\nDo you have any suggestion on what I should look for? Is `.detach().clone()` the right method to separate the computation graph in pytorch XLA?",
    "url": "https://github.com/pytorch/xla/issues/2502",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2020-09-20T00:10:10Z",
    "updated_at": "2020-11-02T01:19:35Z",
    "user": "jpmailoa"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1162,
    "title": "Problem of QAT Demo?",
    "body": "When i try PyTorch QAT Demo [GitHub File](https://github.com/pytorch/tutorials/blob/master/advanced_source/static_quantization_tutorial.py) [Webpage](https://pytorch.org/tutorials/advanced/static_quantization_tutorial.html#quantization-aware-training), i want to know how to find the scale and zero_point of the activations?",
    "url": "https://github.com/pytorch/tutorials/issues/1162",
    "state": "closed",
    "labels": [],
    "created_at": "2020-09-19T13:53:34Z",
    "updated_at": "2020-09-20T13:05:45Z",
    "comments": 0,
    "user": "wZuck"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 44924,
    "title": "How to get the information like the output of Model.get_config() in keras?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n![1](https://user-images.githubusercontent.com/34546552/93542850-a825ab00-f98c-11ea-9eb2-8a1b7d06f588.png)\r\n\r\nI want to get some information like this.\r\nThe input layer of one layer and the output layer of one layer.",
    "url": "https://github.com/pytorch/pytorch/issues/44924",
    "state": "closed",
    "labels": [],
    "created_at": "2020-09-18T00:54:18Z",
    "updated_at": "2020-09-21T16:01:05Z",
    "user": "Stick-To"
  },
  {
    "repo": "pytorch/java-demo",
    "number": 15,
    "title": "any instructions on how to use the downloaded libtorch in Maven project?",
    "body": "I am not familiar with Maven and I want to get some help on how to use the same libtorch in a Maven project, could anyone give me some hint?",
    "url": "https://github.com/pytorch/java-demo/issues/15",
    "state": "closed",
    "labels": [],
    "created_at": "2020-09-17T07:02:53Z",
    "updated_at": "2021-07-19T19:11:47Z",
    "user": "xiaonanchong"
  },
  {
    "repo": "pytorch/examples",
    "number": 822,
    "title": "Gradient vanishing of G in the DCGAN example",
    "body": "Hello,\r\n\r\nI have trained the DCGAN with the default hyper-parameter settings on the downloaded \"img_align_celeba\" dataset (recommended in the tutorial). However, the results reveal strong gradient vanishing of G. While Loss_D keeps decreasing towards 0, Loss_G grows high (towards 100). \r\n\r\nIt seems that D is trained so well, preventing a good training on G. I didn't do any modifications on the code. Do you know what happened?\r\n\r\nThanks!\r\n",
    "url": "https://github.com/pytorch/examples/issues/822",
    "state": "open",
    "labels": [
      "help wanted"
    ],
    "created_at": "2020-09-11T14:02:58Z",
    "updated_at": "2022-03-09T21:32:12Z",
    "comments": 0,
    "user": "zhan4817"
  },
  {
    "repo": "pytorch/serve",
    "number": 681,
    "title": "how to deploy sentence transformer model which has bert-base-nli-mean-tokens weights using torchserve",
    "body": "i tried so many times to deploy my model using torchserve , it did not work \r\n\r\nsometimes it is coming like this\r\n\r\n2020-09-11 10:41:02,757 [INFO ] W-9004-encoder_model_1.0-stdout org.pytorch.serve.wlm.WorkerLifeCycle -   File \"/tmp/models/a7e46f396a6348deba9e844a002f7b36/handler.py\", line 61, in handle\r\n2020-09-11 10:41:02,757 [INFO ] W-9004-encoder_model_1.0-stdout org.pytorch.serve.wlm.WorkerLifeCycle -     _service.initialize(context)\r\n2020-09-11 10:41:02,757 [INFO ] W-9004-encoder_model_1.0-stdout org.pytorch.serve.wlm.WorkerLifeCycle -   File \"/tmp/models/a7e46f396a6348deba9e844a002f7b36/handler.py\", line 23, in initialize\r\n2020-09-11 10:41:02,757 [INFO ] W-9004-encoder_model_1.0-stdout org.pytorch.serve.wlm.WorkerLifeCycle -     self.model = AutoModelForSequenceClassification.from_pretrained(model_dir)\r\n2020-09-11 10:41:02,757 [WARN ] W-9004-encoder_model_1.0 org.pytorch.serve.wlm.BatchAggregator - Load model failed: encoder_model, error: Worker died.\r\n2020-09-11 10:41:02,757 [INFO ] W-9004-encoder_model_1.0-stdout org.pytorch.serve.wlm.WorkerLifeCycle -   File \"/home/ubuntu/anaconda3/envs/torch/lib/python3.8/site-packages/transformers/modeling_auto.py\", line 1359, in from_pretrained\r\n2020-09-11 10:41:02,758 [INFO ] W-9004-encoder_model_1.0-stdout org.pytorch.serve.wlm.WorkerLifeCycle -     config = AutoConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)\r\n2020-09-11 10:41:02,757 [DEBUG] W-9004-encoder_model_1.0 org.pytorch.serve.wlm.WorkerThread - W-9004-encoder_model_1.0 State change WORKER_STARTED -> WORKER_STOPPED\r\n2020-09-11 10:41:02,758 [INFO ] W-9004-encoder_model_1.0-stdout org.pytorch.serve.wlm.WorkerLifeCycle -   File \"/home/ubuntu/anaconda3/envs/torch/lib/python3.8/site-packages/transformers/configuration_auto.py\", line 214, in from_pretrained\r\n2020-09-11 10:41:02,758 [INFO ] W-9004-encoder_model_1.0-stdout org.pytorch.serve.wlm.WorkerLifeCycle -     raise ValueError(\r\n2020-09-11 10:41:02,758 [INFO ] W-9004-encoder_model_1.0-stdout org.pytorch.serve.wlm.WorkerLifeCycle - ValueError: Unrecognized model in /tmp/models/a7e46f396a6348deba9e844a002f7b36. Should have a `model_type` key in its config.json, or contain one of the following strings in its name: retribert, t5, mobilebert, distilbert, albert, camembert, xlm-roberta, marian, mbart, bart, reformer, longformer, roberta, flaubert, bert, openai-gpt, gpt2, transfo-xl, xlnet, xlm, ctrl, electra, encoder-decoder\r\n\r\n\r\ndoes torchserve needs a config.json , give me a suggestion on json file format",
    "url": "https://github.com/pytorch/serve/issues/681",
    "state": "closed",
    "labels": [
      "triaged_wait"
    ],
    "created_at": "2020-09-11T05:16:34Z",
    "updated_at": "2021-11-06T07:00:17Z",
    "user": "mgeethabhargava"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 44460,
    "title": "How to package pytorch with the file build from source.",
    "body": "## \u2753 Questions and Help\r\n\r\nI've noticed in https://github.com/pytorch/pytorch/issues/31285 that pytorch only compile binaries for NV cards with CC 3.7 and up. Now i've build pytorch from source on my machine. Is there any way to package it into a new pip image please\uff1f Thanks a lot.\r\n\r\n\n\ncc @malfet @seemethere @walterddr",
    "url": "https://github.com/pytorch/pytorch/issues/44460",
    "state": "closed",
    "labels": [
      "module: build",
      "triaged"
    ],
    "created_at": "2020-09-10T08:18:15Z",
    "updated_at": "2022-10-20T22:55:01Z",
    "user": "Abbyyan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 44448,
    "title": "How to print optimized IR?",
    "body": "I read Pytorch 1.6 code: torch/csrc/jit/runtime/graph_executor.cpp, and see:\r\n```\r\nInline(*opt_graph);\r\nGRAPH_DEBUG(\"After Inline, before LowerGradOf\\n\", *opt_graph);\r\nLowerGradOf(*opt_graph);\r\nGRAPH_DEBUG(\r\n  \"After LowerGradOf, before specializeAutogradZero\\n\", *opt_graph);\r\n```\r\n\r\nI want to print optimized IR, so i run: `export PYTORCH_JIT_LOG_LEVEL=\">graph_executor\"`, my pytorch code is:\r\n```\r\nimport torch\r\n\r\ndef f(x, y):\r\n  a = x + y\r\n  b = x - y\r\n  c = a * b\r\n  d = c ** 3\r\n  e = d.sum()\r\n  return e\r\n\r\nscript_f = torch.jit.script(f)\r\nx, h = torch.rand(3, 4), torch.rand(3, 4)\r\nprint(script_f(x, h))\r\n```\r\n\r\nHowever, i got nothing. If i use pytorch 1.4, i can get:\r\n```\r\n[DUMP graph_executor.cpp:550] Optimizing the following function:\r\n[DUMP graph_executor.cpp:550] def source_dump(x: Tensor,\r\n[DUMP graph_executor.cpp:550]     y: Tensor) -> Tensor:\r\n[DUMP graph_executor.cpp:550]   a = torch.add(x, y, alpha=1)\r\n[DUMP graph_executor.cpp:550]   b = torch.sub(x, y, alpha=1)\r\n[DUMP graph_executor.cpp:550]   c = torch.mul(a, b)\r\n[DUMP graph_executor.cpp:550]   d = torch.pow(c, 3)\r\n[DUMP graph_executor.cpp:550]   return torch.sum(d, dtype=None)\r\n```\r\nbut can't get GRAPH_DEBUG info.\r\n\r\nI don't know the reason, i can get a lot of logs if i set `export PYTORCH_JIT_LOG_LEVEL=dead_code_elimination:guard_elimination` when i use pytorch 1.6, but got nothing with `export PYTORCH_JIT_LOG_LEVEL=\">graph_executor\"`\r\n\n\ncc @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/44448",
    "state": "closed",
    "labels": [
      "oncall: jit"
    ],
    "created_at": "2020-09-10T03:02:33Z",
    "updated_at": "2020-09-16T03:16:38Z",
    "user": "wangxiang2713"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 44377,
    "title": "How to get optimized IR?",
    "body": "## How to get optimized IR?\r\nHi, i can get torch_script IR by print(script.grah), and i know the IR will be optimized several times while running.\r\nSo how can i get all of optimized IR while running torchscript code? Thankyou.\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/44377",
    "state": "closed",
    "labels": [],
    "created_at": "2020-09-09T11:55:03Z",
    "updated_at": "2020-09-09T14:41:25Z",
    "user": "wangxiang2713"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 44353,
    "title": "DDP training with syncBatchNorm\uff0chow to catch and handle the exception in training processes?",
    "body": "When training with the DDP and syncBatchNorm, one process runing on one GPU, When I catch the gpu OOM exception, the training is blocked. What should we do?\r\nMy code is following, when OOM exception occurs in one process, I just ignore this batch, the training phase continue.\r\n\r\n```\r\nfor i, (inputs, targets) in enumerate(train_loader):\r\n    try:\r\n        # do forward and backprop\r\n    except RuntimeError as e:\r\n        if 'out of memory' in str(e):\r\n            print('| WARNING: ran out of memory, skipping this batch.')\r\n            if hasattr(torch.cuda, 'empty_cache'):\r\n                torch.cuda.empty_cache()\r\n            optimizer.zero_grad()\r\n        else:\r\n            raise e\r\n\r\n```\r\n\r\nwhen one process catch the exception, the others get blocked. \n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528 @osalpekar @jiayisuse @agolynski",
    "url": "https://github.com/pytorch/pytorch/issues/44353",
    "state": "closed",
    "labels": [
      "oncall: distributed",
      "triaged"
    ],
    "created_at": "2020-09-09T01:53:41Z",
    "updated_at": "2020-09-10T02:44:35Z",
    "user": "eeewhe"
  },
  {
    "repo": "pytorch/vision",
    "number": 2652,
    "title": "Image to Tensor data",
    "body": "Library: **pytorch_java_only-1.6.0** \r\n\r\nI want to convert BufferedImage/File to Tensor data, is there some method or library for this?\r\n\r\nPython solution:\r\n\r\n```\r\nimage = Image.open(image_path)\r\nimage = image.convert('RGB') \r\ntransform = Compose([ToTensor()])\r\nimage = transform(image)\r\nimage = image.view(1, 3, 64, 64).cuda()\r\noutput = my_model(image)\r\noutput = output.view(-1, self.quantity)\r\noutput = nn.functional.softmax(output, dim=1)\r\noutput = torch.argmax(output, dim=1)\r\noutput = output.view(-1, self.size)[0]\r\n```\r\n\r\nI need something like that for pytorch_java. I'm sorry if my question is stupid i'm newbee \r\n\r\nP.S: Thanks for reply",
    "url": "https://github.com/pytorch/vision/issues/2652",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-09-07T21:19:22Z",
    "updated_at": "2020-09-09T13:14:49Z",
    "user": "beeqwe"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 44279,
    "title": "How to use CUDA Dynamic Parallelism in PyTorch CPP extension?",
    "body": "I found discussions at discuss.pytorch.org .  But there is still no solution now.\r\n\r\nHere is the error message:\r\n```\r\nerror: kernel launch from __device__ or __global__ functions requires separate compilation mode\r\n```\r\nand\r\n```\r\nerror: a __device__ function call cannot be configured\r\n```\r\n\r\nThanks.\n\ncc @ngimel",
    "url": "https://github.com/pytorch/pytorch/issues/44279",
    "state": "open",
    "labels": [
      "module: cuda",
      "triaged"
    ],
    "created_at": "2020-09-07T10:55:28Z",
    "updated_at": "2021-09-18T11:30:15Z",
    "user": "qinjian623"
  },
  {
    "repo": "pytorch/examples",
    "number": 821,
    "title": "Recommended RAM for training ResNeXt-101?",
    "body": "I am training a ResNeXt-101 model in an end-to-end manner on a version of ImageNet with 13k classes (using the method presented of the ImageNet Shuffle paper). This version contains around 12 M images. My machine has a single NVIDIA GeForce RTX 2080, intel i5 9400 and 16 GB of RAM. I am deploying 4 workers for this task. It seems that I don't get the best GPU utilization, since GPU-Util percentage ranges from 0% to 94%. Furthermore, each worker uses around 2GB of swap memory, which definitely degrades training speed/data fetch. This makes me wonder if my RAM is enough for this task. If I upgrade my RAM to 32 GB, am I expected to get a significant performance boost?\r\n\r\nThanks!!",
    "url": "https://github.com/pytorch/examples/issues/821",
    "state": "closed",
    "labels": [],
    "created_at": "2020-09-07T08:40:05Z",
    "updated_at": "2022-03-09T21:36:05Z",
    "comments": 1,
    "user": "AlexMetsai"
  },
  {
    "repo": "pytorch/vision",
    "number": 2647,
    "title": "rgb2hsv bug in functional_tensor.py.",
    "body": "https://github.com/pytorch/vision/blob/bb88c4520b835e79d5d3c4423eb7ff7c26fa2043/torchvision/transforms/functional_tensor.py#L429-L442\r\n\r\nAs stated in the comments, when `r=g=b`, the calculation of `h` is expected to be value `6`. However, in the current implementation, only `hr` will be counted in, because `hg` and `hr` are just ignored with the condition `(maxc != r)`. I think this is not expected and could lead to non-zero value of `h` when `r=g=b`.\n\ncc @vfdev-5",
    "url": "https://github.com/pytorch/vision/issues/2647",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2020-09-07T03:34:24Z",
    "updated_at": "2020-09-09T10:08:37Z",
    "user": "yelantf"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 44265,
    "title": "How to run a simple benchmark test on a custom RNN?",
    "body": "Say I have a custom LSTM cell... how can I use this repository to run a simple benchmark test on that?",
    "url": "https://github.com/pytorch/pytorch/issues/44265",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2020-09-06T20:11:40Z",
    "updated_at": "2020-09-09T16:37:19Z",
    "user": "slerman12"
  },
  {
    "repo": "pytorch/benchmark",
    "number": 73,
    "title": "Add docs on how to profile benchmark models",
    "body": "",
    "url": "https://github.com/pytorch/benchmark/issues/73",
    "state": "closed",
    "labels": [],
    "created_at": "2020-09-02T21:10:29Z",
    "updated_at": "2023-07-26T18:51:23Z",
    "user": "wconstab"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 181,
    "title": "\u2753 [Question] Is the module compiled by TRTorch thread safe?",
    "body": "Hi\r\nIf the native torchscript module is thread safe when its `forward` function is called from multithread, would the module compiled by TRTorch be thread safe?",
    "url": "https://github.com/pytorch/TensorRT/issues/181",
    "state": "closed",
    "labels": [
      "feature request",
      "question"
    ],
    "created_at": "2020-09-02T10:34:46Z",
    "updated_at": "2021-11-11T01:23:36Z",
    "user": "uni19"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 43946,
    "title": "How to use torch.nn.SyncBatchNorm and torch.uitls.checkpoint together",
    "body": "\r\nWhen I use  net = torch.nn.SyncBatchNorm.convert_sync_batchnorm(net) to convert model,and  use torch.uitls.checkpoint in model ,loss backward, It seems to be stuck in process communication",
    "url": "https://github.com/pytorch/pytorch/issues/43946",
    "state": "closed",
    "labels": [],
    "created_at": "2020-09-01T09:29:37Z",
    "updated_at": "2020-09-01T09:47:25Z",
    "user": "devilztt"
  },
  {
    "repo": "huggingface/transformers",
    "number": 6790,
    "title": "What is the size of the context window in the 'openai-gpt' pre-trained model?",
    "body": "What is the size of the context window in the 'openai-gpt' pre-trained model?\r\n# \u2753 Questions & Help\r\n\r\n<!-- The GitHub issue tracker is primarly intended for bugs, feature requests,\r\n     new models and benchmarks, and migration questions. For all other questions,\r\n     we direct you to the Hugging Face forum: https://discuss.huggingface.co/ .\r\n     You can also try Stack Overflow (SO) where a whole community of PyTorch and\r\n     Tensorflow enthusiast can help you out. In this case, make sure to tag your\r\n     question with the right deep learning framework as well as the\r\n     huggingface-transformers tag: \r\n     https://stackoverflow.com/questions/tagged/huggingface-transformers \r\n     -->\r\n\r\n## Details\r\n<!-- Description of your issue -->\r\n\r\n<!-- You should first ask your question on the forum or SO, and only if\r\n     you didn't get an answer ask it here on GitHub. -->\r\n**A link to original question on the forum/Stack Overflow**:",
    "url": "https://github.com/huggingface/transformers/issues/6790",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2020-08-28T09:17:02Z",
    "updated_at": "2020-11-07T05:42:47Z",
    "user": "lzl19971215"
  },
  {
    "repo": "pytorch/serve",
    "number": 654,
    "title": "How to change Temp Directory?",
    "body": "## \ud83d\udcda Documentation\r\n\r\n<!-- A clear and concise description of what content in https://pytorch.org/serve/ is an issue. If this has to do with the general https://pytorch.org website, please file an issue at https://github.com/pytorch/pytorch.github.io/issues/new/choose instead. If this has to do with https://pytorch.org/tutorials, please file an issue at https://github.com/pytorch/tutorials/issues/new -->\r\n\r\nMy computer has little space to mount '/tmp'. And I can't find any helps. \r\nAre there any way to change Temp Directory? ",
    "url": "https://github.com/pytorch/serve/issues/654",
    "state": "closed",
    "labels": [
      "triaged_wait"
    ],
    "created_at": "2020-08-27T09:06:21Z",
    "updated_at": "2020-08-27T09:34:02Z",
    "user": "CSLujunyu"
  },
  {
    "repo": "pytorch/vision",
    "number": 2624,
    "title": "RuntimeError: each element in list of batch should be of equal size",
    "body": "## \ud83d\udc1b Bug\r\n```python\r\n\"python3.7/site-packages/torch/utils/data/_utils/collate.py\", line 82, in default_collate\r\n    raise RuntimeError('each element in list of batch should be of equal size')\r\nRuntimeError: each element in list of batch should be of equal size\r\n```\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n```python\r\nmodel = models.resnet50()\r\n\r\ntransform = transforms.Compose([\r\n    transforms.Resize((480, 640)),\r\n    transforms.ToTensor(),\r\n])\r\n\r\ntrain_dataset = datasets.CocoDetection(\r\n    root=args.train_dataset, annFile=args.train_annotation, transform=transform)\r\n\r\ntrain_loader = DataLoader(train_dataset, batch_size=64)\r\n\r\nfor (img, anno) in train_loader:\r\n    out = model(img)\r\n```\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\nforward\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n## Environment\r\n\r\nPlease copy and paste the output from our\r\n[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)\r\n(or fill out the checklist below manually).\r\n\r\nYou can get the script and run it with:\r\n```\r\nwget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py\r\n# For security purposes, please check the contents of collect_env.py before running it.\r\npython collect_env.py\r\n```\r\n\r\n - PyTorch Version (e.g., 1.0): 1.6\r\n - OS (e.g., Linux): Ubuntu\r\n - How you installed PyTorch (`conda`, `pip`, source): conda -c pytorch\r\n - Build command you used (if compiling from source):\r\n - Python version: 3.7\r\n - CUDA/cuDNN version: 10.2\r\n - GPU models and configuration: V100\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\nhttps://github.com/pytorch/pytorch/issues/42654\n\ncc @pmeier",
    "url": "https://github.com/pytorch/vision/issues/2624",
    "state": "closed",
    "labels": [
      "question",
      "module: datasets"
    ],
    "created_at": "2020-08-27T05:53:50Z",
    "updated_at": "2021-03-31T06:56:03Z",
    "user": "ZhiyuanChen"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 43625,
    "title": "How to see the weight  value of the quantified model?",
    "body": "\r\nHow to see the weight  value of the quantified model?\r\n\r\nError:\r\n```\r\ntorch.nn.modules.module.ModuleAttributeError: 'LinearPackedParams' object has no attribute '_parameters'\r\n```\r\n\r\nCode:\r\n```\r\nimport torch\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\nMODLE_LOCATION = \"./models/mfi_0.97400.pth\"\r\nMODLE_LOCATION_QUAN = \"./models/quantized_1_model.pth\"\r\nTENSOR_NAME = \"fc1.weight\"\r\n\r\ndef plot_distribution(model_name, tensor_set, resolution):\r\n    model = torch.load(model_name)\r\n    print(model)\r\n    params = model.state_dict()\r\n    tensor_value = params[TENSOR_NAME]\r\n    tensor_value_np = tensor_value.numpy()\r\n    tensor_value_np = tensor_value_np.flatten()\r\n    bins = np.arange(-1, 1, resolution)\r\n    plt.hist(tensor_value_np,bins) \r\n    plt.title(\"histogram\") \r\n    plt.show()\r\n\r\n\r\nif __name__ == '__main__':\r\n    plot_distribution(MODLE_LOCATION, TENSOR_NAME, 0.01)\r\n    plot_distribution(MODLE_LOCATION_QUAN, TENSOR_NAME, 0.01)\r\n```\r\n\r\nOutput:\r\n```\r\n(bnntorch) D:\\FewShotMFI\\Python\\MFI_pytorch>python  plt_distribution.py\r\nLeNet5_Improved(\r\n  (conv1): Conv2d(1, 6, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2))\r\n  (bn1): BatchNorm2d(6, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n  (max_pool_1): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\r\n  (conv2): Conv2d(6, 16, kernel_size=(5, 5), stride=(1, 1))\r\n  (bn2): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n  (max_pool_2): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\r\n  (fc1): Linear(in_features=400, out_features=180, bias=True)\r\n  (dropout1): Dropout(p=0.2, inplace=False)\r\n  (fc2): Linear(in_features=180, out_features=100, bias=True)\r\n  (dropout2): Dropout(p=0.2, inplace=False)\r\n  (fc3): Linear(in_features=100, out_features=20, bias=True)\r\n)\r\nLeNet5_Improved(\r\n  (conv1): Conv2d(1, 6, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2))\r\n  (bn1): BatchNorm2d(6, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n  (max_pool_1): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\r\n  (conv2): Conv2d(6, 16, kernel_size=(5, 5), stride=(1, 1))\r\n  (bn2): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\r\n  (max_pool_2): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\r\n  (fc1): DynamicQuantizedLinear(in_features=400, out_features=180, dtype=torch.qint8, qscheme=torch.per_tensor_affine)\r\n  (dropout1): Dropout(p=0.2, inplace=False)\r\n  (fc2): DynamicQuantizedLinear(in_features=180, out_features=100, dtype=torch.qint8, qscheme=torch.per_tensor_affine)\r\n  (dropout2): Dropout(p=0.2, inplace=False)\r\n  (fc3): DynamicQuantizedLinear(in_features=100, out_features=20, dtype=torch.qint8, qscheme=torch.per_tensor_affine)\r\n)\r\nTraceback (most recent call last):\r\n  File \"plt_distribution.py\", line 26, in <module>\r\n    plot_distribution(MODLE_LOCATION_QUAN, TENSOR_NAME, 0.01)\r\n  File \"plt_distribution.py\", line 14, in plot_distribution\r\n    params = model.state_dict()\r\n  File \"C:\\Users\\huangyongtao\\AppData\\Local\\conda\\conda\\envs\\bnntorch\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 900, in state_dict\r\n    module.state_dict(destination, prefix + name + '.', keep_vars=keep_vars)\r\n  File \"C:\\Users\\huangyongtao\\AppData\\Local\\conda\\conda\\envs\\bnntorch\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 900, in state_dict\r\n    module.state_dict(destination, prefix + name + '.', keep_vars=keep_vars)\r\n  File \"C:\\Users\\huangyongtao\\AppData\\Local\\conda\\conda\\envs\\bnntorch\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 897, in state_dict\r\n    self._save_to_state_dict(destination, prefix, keep_vars)\r\n  File \"C:\\Users\\huangyongtao\\AppData\\Local\\conda\\conda\\envs\\bnntorch\\lib\\site-packages\\torch\\nn\\quantized\\modules\\linear.py\", line 62, in _save_to_state_dict\r\n    super(LinearPackedParams, self)._save_to_state_dict(destination, prefix, keep_vars)\r\n  File \"C:\\Users\\huangyongtao\\AppData\\Local\\conda\\conda\\envs\\bnntorch\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 856, in _save_to_state_dict\r\n    for name, param in self._parameters.items():\r\n  File \"C:\\Users\\huangyongtao\\AppData\\Local\\conda\\conda\\envs\\bnntorch\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 772, in __getattr__\r\n    type(self).__name__, name))\r\ntorch.nn.modules.module.ModuleAttributeError: 'LinearPackedParams' object has no attribute '_parameters'\r\n\r\n```\r\n\n\ncc @jerryzh168 @jianyuh @dzhulgakov @raghuramank100 @jamesr66a @vkuzo",
    "url": "https://github.com/pytorch/pytorch/issues/43625",
    "state": "closed",
    "labels": [
      "oncall: quantization",
      "triaged"
    ],
    "created_at": "2020-08-26T15:31:53Z",
    "updated_at": "2020-08-26T16:23:03Z",
    "user": "YongtaoHuang1994"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 43536,
    "title": "How do I debug \"RuntimeError: trying to initialize the default process group twice!\"",
    "body": "## \ud83d\udc1b Bug\r\n\r\nWhen triggering distributed training in pytorch, the error `RuntimeError: trying to initialize the default process group twice!` occurs. How would one debug it?\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. on master node ip 10.163.60.19, run `local_rank=0; master_port=1303; python -m torch.distributed.launch --node_rank=$local_rank --master_addr=\"10.163.60.19\" --master_port=$master_port regression_train.py --config_file weights/cnn3_pad_32_pad_ratio_5.ini --distributed 1 --local_rank $local_rank --master_addr 10.163.60.19 --master_port $master_port --world_size 2`\r\n2. on slave node ip 10.163.60.18, run `local_rank=1; master_port=1303; python -m torch.distributed.launch --node_rank=$local_rank --master_addr=\"10.163.60.19\" --master_port=$master_port regression_train.py --config_file weights/cnn3_pad_32_pad_ratio_5.ini --distributed 1 --local_rank $local_rank --master_addr 10.163.60.19 --master_port $master_port --world_size 2`\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"regression_train.py\", line 180, in <module>\r\n    torch.distributed.init_process_group(backend=args.distributed_backend, world_size=args.world_size)\r\n  File \"/home/kdang/anaconda3/envs/edge-detection/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py\", line 370, in init_process_group\r\n    raise RuntimeError(\"trying to initialize the default process group \"\r\nRuntimeError: trying to initialize the default process group twice!\r\nTraceback (most recent call last):\r\n  File \"/home/kdang/anaconda3/envs/edge-detection/lib/python3.7/runpy.py\", line 193, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/home/kdang/anaconda3/envs/edge-detection/lib/python3.7/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/home/kdang/anaconda3/envs/edge-detection/lib/python3.7/site-packages/torch/distributed/launch.py\", line 263, in <module>\r\n    main()\r\n  File \"/home/kdang/anaconda3/envs/edge-detection/lib/python3.7/site-packages/torch/distributed/launch.py\", line 259, in main\r\n    cmd=cmd)\r\nsubprocess.CalledProcessError: Command '['/home/kdang/anaconda3/envs/edge-detection/bin/python', '-u', 'regression_train.py', '--local_rank=0', '--config_file', 'weights/cnn3_pad_32_pad_ratio_5.ini', '--distributed', '1', '--local_rank', '0', '--master_addr', '10.163.60.19', '--master_port', '1303', '--world_size', '2']' returned non-zero exit status 1.\r\n```\r\n\r\n## Expected behavior\r\n\r\nDistributed training should start\r\n\r\n## Environment\r\n\r\n```\r\n(edge-detection) \u279c  EDGE-DETECTION-TRAINER git:(master) python -m torch.utils.collect_env\r\nCollecting environment information...\r\nPyTorch version: 1.4.0\r\nIs debug build: No\r\nCUDA used to build PyTorch: 10.1\r\n\r\nOS: Ubuntu 16.04.6 LTS\r\nGCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609\r\nCMake version: version 3.5.1\r\n\r\nPython version: 3.7\r\nIs CUDA available: Yes\r\nCUDA runtime version: Could not collect\r\nGPU models and configuration: GPU 0: GeForce RTX 2080\r\nNvidia driver version: 418.152.00\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.4\r\n/usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudnn.so.7.6.4\r\n\r\nVersions of relevant libraries:\r\n[pip] numpy==1.18.1\r\n[pip] torch==1.4.0\r\n[pip] torchvision==0.5.0\r\n[conda] mkl                       2020.0                      166    conda-forge\r\n[conda] pytorch                   1.4.0           py3.7_cuda10.1.243_cudnn7.6.3_0    pytorch\r\n[conda] torchvision               0.5.0                py37_cu101    pytorch\r\n(edge-detection) \u279c  EDGE-DETECTION-TRAINER git:(master)\r\n```\n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528 @osalpekar @jiayisuse @agolynski",
    "url": "https://github.com/pytorch/pytorch/issues/43536",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "triaged"
    ],
    "created_at": "2020-08-25T02:55:51Z",
    "updated_at": "2023-12-04T14:46:49Z",
    "user": "wakandan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 43489,
    "title": "How to extract the hidden feature of a multi-submodule model",
    "body": "How to extract the feature in advantage (with dim=512), given a PyTorch model like below.\r\nDuelingCnnDQN(\r\n  (cnn): Sequential(\r\n    (0): Conv2d(1, 32, kernel_size=(8, 8), stride=(4, 4))\r\n    (1): ReLU()\r\n    (2): Conv2d(32, 64, kernel_size=(4, 4), stride=(2, 2))\r\n    (3): ReLU()\r\n    (4): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1))\r\n    (5): ReLU()\r\n    (6): Flatten()\r\n  )\r\n  (advantage): Sequential(\r\n    (0): Linear(in_features=3136, out_features=512, bias=True)\r\n    (1): ReLU()\r\n    (2): Linear(in_features=512, out_features=6, bias=True)\r\n  )\r\n  (value): Sequential(\r\n    (0): Linear(in_features=3136, out_features=512, bias=True)\r\n    (1): ReLU()\r\n    (2): Linear(in_features=512, out_features=1, bias=True)\r\n  )\r\n)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/43489",
    "state": "closed",
    "labels": [],
    "created_at": "2020-08-24T11:50:57Z",
    "updated_at": "2020-08-24T20:51:30Z",
    "user": "xinghua-qu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 43463,
    "title": "from sources install pytorch on ubuntu18.04,the question is this.What should I do ?",
    "body": "-- Generating done\r\n-- Build files have been written to: /home/wuji/pytorch/build\r\nTraceback (most recent call last):\r\n  File \"setup.py\", line 737, in <module>\r\n    build_deps()\r\n  File \"setup.py\", line 321, in build_deps\r\n    cmake=cmake)\r\n  File \"/home/wuji/pytorch/tools/build_pytorch_libs.py\", line 59, in build_caffe2\r\n    rerun_cmake)\r\n  File \"/home/wuji/pytorch/tools/setup_helpers/cmake.py\", line 329, in generate\r\n    self.run(args, env=my_env)\r\n  File \"/home/wuji/pytorch/tools/setup_helpers/cmake.py\", line 141, in run\r\n    check_call(command, cwd=self.build_dir, env=env)\r\n  File \"/home/wuji/anaconda3/lib/python3.7/subprocess.py\", line 363, in check_call\r\n    raise CalledProcessError(retcode, cmd)\r\nsubprocess.CalledProcessError: Command '['cmake', '-GNinja', '-DBUILD_PYTHON=True', '-DBUILD_TEST=True', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX=/home/wuji/pytorch/torch', '-DCMAKE_PREFIX_PATH=/home/wuji/anaconda3', '-DNUMPY_INCLUDE_DIR=/home/wuji/anaconda3/lib/python3.7/site-packages/numpy/core/include', '-DPYTHON_EXECUTABLE=/home/wuji/anaconda3/bin/python', '-DPYTHON_INCLUDE_DIR=/home/wuji/anaconda3/include/python3.7m', '-DPYTHON_LIBRARY=/home/wuji/anaconda3/lib/libpython3.7m.so.1.0', '-DTORCH_BUILD_VERSION=1.7.0a0+7c50c2f', '-DUSE_NUMPY=True', '/home/wuji/pytorch']' returned non-zero exit status 1.\n\ncc @malfet",
    "url": "https://github.com/pytorch/pytorch/issues/43463",
    "state": "closed",
    "labels": [
      "module: build",
      "triaged"
    ],
    "created_at": "2020-08-23T02:05:48Z",
    "updated_at": "2020-08-25T22:26:18Z",
    "user": "functail"
  },
  {
    "repo": "pytorch/vision",
    "number": 2599,
    "title": "Change default value of eps in FrozenBatchNorm to match BatchNorm",
    "body": "## \u2753 Questions and Help\r\nHello\r\nLoss is nan error occurs when I learn fast rcnn with resnext101 backbone\r\nMy code is as follows\r\n```python\r\nbackbone = resnet_fpn_backbone('resnext101_32x8d', pretrained=True)\r\nmodel = FasterRCNN(backbone, num_classes)\r\nin_features = model.roi_heads.box_predictor.cls_score.in_features\r\nmodel.roi_heads.box_predictor = FastRCNNPredictor(in_features, num_classes)\r\n```\r\n\r\nerror message\r\n```\r\nEpoch: [0]  [   0/7208]  eta: 1:27:42  lr: 0.000040  loss: 40613806080.0000 (40613806080.0000)  loss_box_reg: 7979147264.0000 (7979147264.0000)  loss_classifier: 11993160704.0000 (11993160704.0000)  loss_objectness: 9486380032.0000 (9486380032.0000)  loss_rpn_box_reg: 11155118080.0000 (11155118080.0000)  time: 0.7301  data: 0.4106  max mem: 1241\r\nLoss is nan, stopping training\r\n```\r\n\r\nWhen i change the backbone to resnet50 and resnet152, no error occrus.\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/vision/issues/2599",
    "state": "closed",
    "labels": [
      "question",
      "topic: object detection"
    ],
    "created_at": "2020-08-21T04:56:22Z",
    "updated_at": "2020-12-10T10:05:26Z",
    "user": "juyunsang"
  },
  {
    "repo": "pytorch/pytorch_sphinx_theme",
    "number": 78,
    "title": "How to use it? Canonical way seems to not work",
    "body": "Dear All,\r\n\r\nI have installed the theme using\r\n\r\n```\r\npip install git+https://github.com/pytorch/pytorch_sphinx_theme.git\r\n```\r\n\r\nimported and included in my `conf.py` file as follows:\r\n\r\n```python\r\nextensions = [\r\n    \"sphinx.ext.autodoc\",\r\n    \"sphinx.ext.githubpages\",\r\n    'sphinx.ext.coverage',\r\n    \"sphinx.ext.napoleon\",\r\n    \"pytorch_sphinx_theme\", # <- HERE!\r\n    \"recommonmark\"\r\n]\r\n```\r\n\r\nHowever, the theme is still `sphinx_rtd_theme`. \r\n\r\nThank you in advance.\r\n\r\nBest Regards,\r\n\r\nFrancesco ",
    "url": "https://github.com/pytorch/pytorch_sphinx_theme/issues/78",
    "state": "closed",
    "labels": [],
    "created_at": "2020-08-18T12:50:08Z",
    "updated_at": "2020-08-18T12:50:50Z",
    "user": "FrancescoSaverioZuppichini"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 374,
    "title": "where is the pre-build tokenizers for 'merge.txt and vacab.json'",
    "body": "or how to build my private version",
    "url": "https://github.com/huggingface/tokenizers/issues/374",
    "state": "closed",
    "labels": [],
    "created_at": "2020-08-17T08:45:13Z",
    "updated_at": "2021-01-06T20:02:22Z",
    "user": "SeekPoint"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 43135,
    "title": "How to use torch.utils.checkpoint and DistributedDataParallel together",
    "body": "when I use DistributedDataParallel in mutil-GPU , If I use checkpoint  in the model forward ,it can not work \r\n\n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528 @osalpekar @jiayisuse @agolynski",
    "url": "https://github.com/pytorch/pytorch/issues/43135",
    "state": "closed",
    "labels": [
      "oncall: distributed",
      "triaged"
    ],
    "created_at": "2020-08-17T06:54:13Z",
    "updated_at": "2023-01-20T14:40:29Z",
    "user": "devilztt"
  },
  {
    "repo": "pytorch/xla",
    "number": 2433,
    "title": "How to speed up the compilation process for contributor for c++ lib",
    "body": "## \u2753 Questions and Help\r\n\r\nWhen I only modify 1 c++ file, I expect the compile process only need rebuild this c++ file and do related link process. In PyTorch, it uses ninja to speed up this process.\r\n\r\nBut when use \"DEBUG=1 python setup.py develop\", it will recompile whole TensorFlow and xla code by Bazel, it take a long time.\r\nAny best practice your guy can share?\r\nWe should write down this part on the contributing.md.\r\nThanks\r\n",
    "url": "https://github.com/pytorch/xla/issues/2433",
    "state": "closed",
    "labels": [],
    "created_at": "2020-08-17T02:22:04Z",
    "updated_at": "2020-08-19T00:20:11Z",
    "user": "maxwillzq"
  },
  {
    "repo": "pytorch/text",
    "number": 938,
    "title": "How to use Torchtext model in flask app with vocabulary and vectors?",
    "body": "## \u2753 Questions and Help\r\n\r\nI have the the following code for my model:\r\n\r\n```\r\nTEXT = data.Field(tokenize=\"spacy\", include_lengths=True)\r\nLABEL = data.LabelField(dtype=torch.float)\r\nfrom torchtext import datasets\r\ntrain_data, valid_data = train_data.split(random_state=random.seed(SEED))\r\ntrain_data, test_data = datasets.IMDB.splits(TEXT, LABEL)\r\n\r\nTEXT.build_vocab(train_data, vectors=\"glove.6B.100d\", unk_init=torch.Tensor.normal_)\r\n\r\nLABEL.build_vocab(train_data)\r\n\r\nBATCH_SIZE = 64\r\n\r\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\r\n\r\ntrain_iterator, valid_iterator, test_iterator = data.BucketIterator.splits(\r\n    (train_data, valid_data, test_data),\r\n    batch_size=BATCH_SIZE,\r\n    sort_within_batch=True,\r\n    device=device,\r\n)\r\n\r\nclass RNN(nn.Module):\r\n    def __init__(\r\n        self,\r\n        vocab_size,\r\n        embedding_dim,\r\n        hidden_dim,\r\n        output_dim,\r\n        n_layers,\r\n        bidirectional,\r\n        dropout,\r\n        pad_idx,\r\n    ):\r\n\r\n        super().__init__()\r\n\r\n        self.embedding = nn.Embedding(vocab_size, embedding_dim, padding_idx=pad_idx)\r\n\r\n        self.rnn = nn.LSTM(\r\n            embedding_dim,\r\n            hidden_dim,\r\n            num_layers=n_layers,\r\n            bidirectional=bidirectional,\r\n            dropout=dropout,\r\n        )\r\n\r\n        self.fc = nn.Linear(hidden_dim * 2, output_dim)\r\n\r\n        self.dropout = nn.Dropout(dropout)\r\n\r\n    def forward(self, text, text_lengths):\r\n\r\n        # text = [sent len, batch size]\r\n\r\n        embedded = self.dropout(self.embedding(text))\r\n\r\n        # embedded = [sent len, batch size, emb dim]\r\n\r\n        # pack sequence\r\n        packed_embedded = nn.utils.rnn.pack_padded_sequence(embedded, text_lengths)\r\n\r\n        packed_output, (hidden, cell) = self.rnn(packed_embedded)\r\n\r\n        # unpack sequence\r\n        output, output_lengths = nn.utils.rnn.pad_packed_sequence(packed_output)\r\n\r\n        # output = [sent len, batch size, hid dim * num directions]\r\n        # output over padding tokens are zero tensors\r\n\r\n        # hidden = [num layers * num directions, batch size, hid dim]\r\n        # cell = [num layers * num directions, batch size, hid dim]\r\n\r\n        # concat the final forward (hidden[-2,:,:]) and backward (hidden[-1,:,:]) hidden layers\r\n        # and apply dropout\r\n\r\n        hidden = self.dropout(torch.cat((hidden[-2, :, :], hidden[-1, :, :]), dim=1))\r\n\r\n        # hidden = [batch size, hid dim * num directions]\r\n\r\n        return self.fc(hidden)\r\n\r\nINPUT_DIM = len(TEXT.vocab)\r\nEMBEDDING_DIM = 100\r\nHIDDEN_DIM = 256\r\nOUTPUT_DIM = 1\r\nN_LAYERS = 2\r\nBIDIRECTIONAL = True\r\nDROPOUT = 0.5\r\nPAD_IDX = TEXT.vocab.stoi[TEXT.pad_token]\r\n\r\nmodel = RNN(\r\n    INPUT_DIM,\r\n    EMBEDDING_DIM,\r\n    HIDDEN_DIM,\r\n    OUTPUT_DIM,\r\n    N_LAYERS,\r\n    BIDIRECTIONAL,\r\n    DROPOUT,\r\n    PAD_IDX,\r\n)\r\n\r\npretrained_embeddings = TEXT.vocab.vectors\r\n\r\nprint(pretrained_embeddings.shape)\r\n\r\nmodel.embedding.weight.data.copy_(pretrained_embeddings)\r\n\r\nUNK_IDX = TEXT.vocab.stoi[TEXT.unk_token]\r\n\r\nmodel.embedding.weight.data[UNK_IDX] = torch.zeros(EMBEDDING_DIM)\r\nmodel.embedding.weight.data[PAD_IDX] = torch.zeros(EMBEDDING_DIM)\r\n\r\noptimizer = optim.Adam(model.parameters())\r\ncriterion = nn.BCEWithLogitsLoss()\r\n\r\nmodel = model.to(device)\r\ncriterion = criterion.to(device)\r\n\r\n*training and evaluation functions and such*\r\n\r\nnlp = spacy.load(\"en\")\r\n\r\n\r\ndef predict_sentiment(model, sentence):\r\n    model.eval()\r\n    tokenized = [tok.text for tok in nlp.tokenizer(sentence)]\r\n    indexed = [TEXT.vocab.stoi[t] for t in tokenized]\r\n    length = [len(indexed)]\r\n    tensor = torch.LongTensor(indexed).to(device)\r\n    tensor = tensor.unsqueeze(1)\r\n    length_tensor = torch.LongTensor(length)\r\n    prediction = torch.sigmoid(model(tensor, length_tensor))\r\n    return prediction.item()\r\n```\r\nsaved and loaded in the same as this:\r\n\r\n```\r\ntorch.save(model.state_dict(), \"Finished Models/Pytorch/LSTM_w_vectors.pt\")\r\n\r\nmodel.load_state_dict(torch.load(\"Finished Models/Pytorch/LSTM_w_vectors.pt\"))\r\n```\r\n\r\nHow can I use import / deploy this model? Do I need to pickle the vocab and PAD_IDX? ",
    "url": "https://github.com/pytorch/text/issues/938",
    "state": "closed",
    "labels": [],
    "created_at": "2020-08-16T19:54:22Z",
    "updated_at": "2020-08-24T14:16:22Z",
    "user": "EmreTokyuez"
  },
  {
    "repo": "pytorch/audio",
    "number": 879,
    "title": "How to index subsegments of audio tensor based on time",
    "body": "## How to select a subsegment from a tensor\r\n\r\nHello!\r\n\r\nThis may be a very noobie question but I can't get to solve it on my own. \r\n\r\nLets say I want to select the first 10 seconds of an audio sample that I have loaded into a torch tensor with torchaudio, how should I determine the indexes of the tensor that correspond to the 10sec sample?\r\n\r\nI have done some playing with audio files with different sample rate and if I were to save a subset of the tensor to audio `.wav` the same index `[:, :600000]` (600000 elements of all channels) doesn't return.\r\n\r\nSo if I select the subset `[:, :600000]` of a waveform tensor with shape `torch.Size([1, 21091521])` and sample rate `16000` I will get the first ~38 seconds.\r\n\r\nWhile If I select the subset `[:, :600000]` of a waveform tensor with shape `torch.Size([2, 5385600])\r\n` and sample rate `44100` I will get the first ~14seconds.\r\n\r\nI suspect this is basic audio theory and how is stored in different channels and how sample rate affects but I haven't been able to find information about it.\r\n\r\nBased on the channels and sample rate of a tensor, can I select a subset of seconds of this one? If so, how can I?\r\n\r\nThanks\r\n",
    "url": "https://github.com/pytorch/audio/issues/879",
    "state": "closed",
    "labels": [],
    "created_at": "2020-08-14T11:40:28Z",
    "updated_at": "2020-08-14T19:12:34Z",
    "user": "jiwidi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 42996,
    "title": "How to use and debug mixed-precision in 1.6.0 ?",
    "body": "## \u2753 Questions and Help\r\n\r\nHi. I've been trying to take advantage of new mixed-precision set of tools, mainly following the instructions given in https://pytorch.org/docs/stable/amp.html#autocasting. My code is running, I see that the gradients are being scaled as expected, however, my memory footprint is de facto the same (inspected by nvidia-smi), and the overall execution time is even longer. I was wondering how I can debug this and what could possibly go wrong.\r\n\r\nThe changes to my code are minimal: (1) I added autocast context to the body of my forward method; and (2) gradient scaling updates as suggested in the tutorial. The operations in my code are standard, lots of CNN and torch.mm executions. My program is being executed on 8 GPUs, for data parallelism.\r\n\r\n## Environment\r\n\r\n - PyTorch Version: 1.6.0\r\n - OS: Linux\r\n - How you installed PyTorch: pip\r\n - Python version: 3.7\r\n - CUDA/cuDNN version: 10.1\r\n - GPU models and configuration: 8 x Tesla V100\r\n\n\ncc @mcarilli @jlin27",
    "url": "https://github.com/pytorch/pytorch/issues/42996",
    "state": "closed",
    "labels": [
      "module: docs",
      "triaged",
      "module: amp (automated mixed precision)"
    ],
    "created_at": "2020-08-13T10:00:53Z",
    "updated_at": "2020-08-31T13:02:07Z",
    "user": "djordjemila"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 171,
    "title": "\ud83d\udc1b [Bug] Encountered bug when using TRTorch 0.3.0 and torch_1.6.0_update versions on Jetson Xavier AGX",
    "body": "## \u2753 Question\r\n\r\nAre there some missing instructions on how to build the TRTorch 'torch_1.6.0_update' for Jetson Xavier AGX?<!-- Your question -->\r\n\r\n## What you have already tried\r\n\r\n- Downloaded two TRTorch versions: 0.3.0. tag and torch_1.6.0_update\r\n\r\n- Follow the Compilations TRTorch instructions of both versions\r\n\r\n- Both versions compilation have errors:\r\n\r\n    - 0.3.0: \r\n       core/lowering/lowering.cpp:10:10: fatal error: torch/csrc/jit/passes/quantization.h: No such file or directory\r\n       #include \"torch/csrc/jit/passes/quantization.h\"\r\n\r\n     - torch_1.6.0_update:\r\n\r\n         ERROR: \r\n        /home/ubuntu/.cache/bazel/_bazel_root/7f0ba44765888be019f9da1ca19341ed/external/tensorrt/BUILD.bazel:63:10: \r\n       @tensorrt//:nvinfer_lib: invalid label '' in each branch in select expression of attribute 'static_library' in 'cc_import' rule \r\n       (including '//conditions:default'): empty package-relative label\r\n       ERROR: /home/ubuntu/Downloads/TRTorch-torch_1.6.0_update/core/util/BUILD:69:11: Target '@tensorrt//:nvinfer' contains \r\n       an error and its package is in error and referenced by '//core/util:trt_util'\r\n       ERROR: Analysis of target '//:libtrtorch' failed; build aborted: Analysis failed\r\n\r\n## Environment\r\n> Jetson Xavier AGX with JetPack 4.4 \r\n\r\n - PyTorch Version (e.g., 1.0): 1.6.0\r\n - CPU Architecture: Jetson Xavier AGX\r\n - OS (e.g., Linux): Jetson Xavier AGX JetPack 4.4\r\n - How you installed PyTorch (`conda`, `pip`, `libtorch`, source): **pip**\r\n - Build command you used (if compiling from source): NA\r\n - Are you using local sources or building from archives: Build from JetPack 4.4\r\n - Python version: 3.6.9\r\n - CUDA version: 10.2\r\n - GPU models and configuration: Jetson Xavier AGX\r\n - Any other relevant information:\r\n\r\n## Additional context\r\nAttached are my edited WORKSPACE files.\r\n\r\n[TRTorchBuildErrors.zip](https://github.com/NVIDIA/TRTorch/files/5068075/TRTorchBuildErrors.zip)\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/171",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2020-08-13T08:46:40Z",
    "updated_at": "2020-09-23T00:05:53Z",
    "user": "OronG13"
  },
  {
    "repo": "pytorch/audio",
    "number": 876,
    "title": "Where is version.py if I insist on building from source?",
    "body": "When I tried to install by `pip setup.py build`, I obtained the following **ERROR** message:\r\n\r\n```console\r\n-- Building version 0.7.0a0\r\nTraceback (most recent call last):\r\n  File \"setup.py\", line 30, in <module>\r\n    with open(version_path, 'w') as f:\r\nTypeError: expected str, bytes or os.PathLike object, not PosixPath\r\n```\r\n\r\nIt looks **version.py** is missing.\r\n\r\nCheers\r\n",
    "url": "https://github.com/pytorch/audio/issues/876",
    "state": "closed",
    "labels": [],
    "created_at": "2020-08-12T09:01:40Z",
    "updated_at": "2020-08-14T20:31:04Z",
    "user": "jiapei100"
  },
  {
    "repo": "pytorch/text",
    "number": 919,
    "title": "Where is version.py if I insist on building from source?",
    "body": "\r\nWhen I tried to install by `pip setup.py build`, I obtained the following **ERROR** message:\r\n\r\n```console\r\nTraceback (most recent call last):\r\n  File \"setup.py\", line 48, in <module>\r\n    _export_version(VERSION, SHA)\r\n  File \"setup.py\", line 42, in _export_version\r\n    with open(version_path, 'w') as fileobj:\r\nTypeError: expected str, bytes or os.PathLike object, not PosixPath\r\n```\r\n\r\nIt looks **version.py** is missing.\r\n\r\nCheers\r\n",
    "url": "https://github.com/pytorch/text/issues/919",
    "state": "open",
    "labels": [],
    "created_at": "2020-08-12T09:00:36Z",
    "updated_at": "2020-08-13T13:51:20Z",
    "user": "jiapei100"
  },
  {
    "repo": "pytorch/vision",
    "number": 2578,
    "title": "Calculate Training Accuracy on resnet152",
    "body": "I'm trying to calculate training accuracy on resnet152, however\r\n`loss_dict = model(images, targets)`\r\nonly contains loss values. \r\n\r\nUsually the model accepts only the images and the outputs are then passed to a loss function as well as used to calculate the accuracy. Calling it without the targets parameter results in:\r\n`ValueError: In training mode, targets should be passed`\r\n\r\nSorry if this is the wrong place, I'm still quite a beginner.",
    "url": "https://github.com/pytorch/vision/issues/2578",
    "state": "closed",
    "labels": [
      "invalid",
      "question",
      "module: models"
    ],
    "created_at": "2020-08-11T22:30:00Z",
    "updated_at": "2020-08-21T14:11:44Z",
    "user": "FrostByteGER"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1117,
    "title": "But in Spatial Transformer Network?",
    "body": "Hi,\r\n\r\nI am opening this issue because I noticed a weird behavior of the the spatial transformer networks implementation (https://github.com/pytorch/tutorials/blob/78e91c54dd0cd4fb0d02dfcc86fe94d16ab03df6/intermediate_source/spatial_transformer_tutorial.py#L57)\r\n\r\nI summarized my findings [here](https://github.com/theRealSuperMario/pytorch_stn). In short, what is happening is that\r\nwhen the input is normalised and then fed to the STN, the `F.grid_sample` call adds a zero-padding, however, the normalisation changes the background value from `0` to `-mean/std`. \r\n(https://github.com/pytorch/tutorials/blob/78e91c54dd0cd4fb0d02dfcc86fe94d16ab03df6/intermediate_source/spatial_transformer_tutorial.py#L127)\r\n\r\nThis causes the STN to collapse very early and to actually never learn the correct transformation. You can actually see that in the example code already (https://pytorch.org/tutorials/intermediate/spatial_transformer_tutorial.html), because the learnt transformation is zooming OUT instead of zooming IN on the digits. For the original 28 x 28 images, this is not such a big problem, However, when you continue to cluttered MNIST as in the original publication, the difference is huge. Once again, please have a look [here](https://github.com/theRealSuperMario/pytorch_stn).\r\n\r\nI think the tutorial for the STN should be updated and also include the cluttered MNIST example because that is what drives the point home. I would volunteer to do so, if I get the permission to go ahead.\r\n\r\nUnfortunately, most other implementations I was able to find on the web also have this bug.\n\ncc @sekyondaMeta @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/1117",
    "state": "open",
    "labels": [
      "Text",
      "medium",
      "docathon-h2-2023"
    ],
    "created_at": "2020-08-11T11:37:35Z",
    "updated_at": "2023-11-01T16:41:21Z",
    "comments": 5,
    "user": "theRealSuperMario"
  },
  {
    "repo": "pytorch/vision",
    "number": 2574,
    "title": "ValueError: bad value(s) in fds_to_keep",
    "body": "Traceback (most recent call last):\r\n  File \"/home/sucom/hdd_1T/project/video_rec/my_video_rec/self_video_train.py\", line 161, in <module>\r\n    trainer.train(task)\r\n  File \"/home/sucom/.conda/envs/classy_vision/lib/python3.6/site-packages/classy_vision/trainer/local_trainer.py\", line 27, in train\r\n    super().train(task)\r\n  File \"/home/sucom/.conda/envs/classy_vision/lib/python3.6/site-packages/classy_vision/trainer/classy_trainer.py\", line 45, in train\r\n    task.on_phase_start()\r\n  File \"/home/sucom/.conda/envs/classy_vision/lib/python3.6/site-packages/classy_vision/tasks/classification_task.py\", line 945, in on_phase_start\r\n    self.advance_phase()\r\n  File \"/home/sucom/.conda/envs/classy_vision/lib/python3.6/site-packages/classy_vision/tasks/classification_task.py\", line 847, in advance_phase\r\n    self.create_data_iterator()\r\n  File \"/home/sucom/.conda/envs/classy_vision/lib/python3.6/site-packages/classy_vision/tasks/classification_task.py\", line 900, in create_data_iterator\r\n    self.data_iterator = iter(self.dataloaders[self.phase_type])\r\n  File \"/home/sucom/.conda/envs/classy_vision/lib/python3.6/site-packages/torch/utils/data/dataloader.py\", line 279, in __iter__\r\n    return _MultiProcessingDataLoaderIter(self)\r\n  File \"/home/sucom/.conda/envs/classy_vision/lib/python3.6/site-packages/torch/utils/data/dataloader.py\", line 721, in __init__\r\n    w.start()\r\n  File \"/home/sucom/.conda/envs/classy_vision/lib/python3.6/multiprocessing/process.py\", line 105, in start\r\n    self._popen = self._Popen(self)\r\n  File \"/home/sucom/.conda/envs/classy_vision/lib/python3.6/multiprocessing/context.py\", line 284, in _Popen\r\n    return Popen(process_obj)\r\n  File \"/home/sucom/.conda/envs/classy_vision/lib/python3.6/multiprocessing/popen_spawn_posix.py\", line 32, in __init__\r\n    super().__init__(process_obj)\r\n  File \"/home/sucom/.conda/envs/classy_vision/lib/python3.6/multiprocessing/popen_fork.py\", line 19, in __init__\r\n    self._launch(process_obj)\r\n  File \"/home/sucom/.conda/envs/classy_vision/lib/python3.6/multiprocessing/popen_spawn_posix.py\", line 59, in _launch\r\n    cmd, self._fds)\r\n  File \"/home/sucom/.conda/envs/classy_vision/lib/python3.6/multiprocessing/util.py\", line 417, in spawnv_passfds\r\n    False, False, None)\r\nValueError: bad value(s) in fds_to_keep\r\n",
    "url": "https://github.com/pytorch/vision/issues/2574",
    "state": "closed",
    "labels": [
      "invalid",
      "question"
    ],
    "created_at": "2020-08-11T05:18:17Z",
    "updated_at": "2020-08-11T17:21:26Z",
    "user": "siyangbing"
  },
  {
    "repo": "pytorch/vision",
    "number": 2572,
    "title": "How to fill in splits_dir and metadata_file in the video classification, my ufc101 data set only has pictures, how can I get them, if I can provide any help, I would be very grateful",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/vision/issues/2572",
    "state": "closed",
    "labels": [],
    "created_at": "2020-08-11T02:35:10Z",
    "updated_at": "2020-08-11T06:16:55Z",
    "user": "siyangbing"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 42777,
    "title": "custom function too slow, how to be as  fast as native?",
    "body": "##   function/Module  too slow\r\n\r\n### conext\r\nubuntu18.04.1 64 cuda11 pytorch1.6 \r\n\r\n\r\n```\r\nclass Relu0(Function):\r\n    @staticmethod\r\n    def forward(ctx, input,d=1):\r\n        ctx.save_for_backward(input)  # save input for backward pass\r\n        x=torch.clone(input)\r\n        x[x<0]=0\r\n        return x\r\n\r\n    @staticmethod\r\n    def backward(ctx, grad_output,d=1):\r\n        input, = ctx.saved_tensors # restore input from context\r\n        grad_output[input<0]= 0\r\n        return grad_output\r\n\r\n# more faster , not enough\r\ndef relu(x):\r\n    return (x>0)*x\r\n\r\n# clamp fastest , any more?\r\n\r\n```\r\n\r\n### benchmark\r\nRelu0.apply cost 10 times of torch.nn.functional.relu\r\n\r\nabove way seems not use accelerate library.\r\nwhich operations can be as fast as native?\r\n\r\n\n\ncc @VitalyFedyunin @ngimel",
    "url": "https://github.com/pytorch/pytorch/issues/42777",
    "state": "closed",
    "labels": [
      "module: performance",
      "triaged"
    ],
    "created_at": "2020-08-08T11:36:06Z",
    "updated_at": "2020-08-15T07:48:42Z",
    "user": "laohur"
  },
  {
    "repo": "pytorch/text",
    "number": 912,
    "title": "How to combine train and test set for IMDB Dataset in Torchtext / Pytorch",
    "body": "## \u2753 Questions and Help\r\n\r\n\r\n\r\nI want to use the examples in the test set of the IMDB Sentiment Analysis Dataset for training, as I have built my own benchmark with which I will compare the performance of various Models (my Matura Thesis)\r\n\r\nSo after trying, I got the appending working and also managed ot split it, so that I have a validation set as well. The code is the following:\r\n\r\n```\r\n from torchtext import datasets\r\n    \r\n    train_data, test_data = datasets.IMDB.splits(TEXT, LABEL)\r\n    \r\n    import random\r\n    train_data, valid_data = train_data.split(random_state = random.seed(SEED))\r\n    from torch.utils.data import ConcatDataset\r\n    data_list = list()\r\n    data_list.append(train_data)\r\n    data_list.append(test_data)\r\n    train_data = ConcatDataset(data_list)\r\n    print(f'Number of validation examples: {len(valid_data)}')\r\n    print(f'Number of training examples: {len(train_data)}')\r\n```\r\n\r\nAnd I get the following split (which is my goal):\r\n\r\n```\r\nNumber of validation examples: 7500\r\nNumber of training examples: 42500\r\n```\r\n\r\nNow when I want to built the vocab with the following code, I get this error:\r\n\r\n```\r\nMAX_VOCAB_SIZE = 25_000 \r\nLABEL.build_vocab(train_data)\r\n\r\nTEXT.build_vocab(train_data, max_size = MAX_VOCAB_SIZE)\r\n~\\.conda\\envs\\matura-ml\\lib\\collections\\__init__.py in update(*args, **kwds)\r\n    654             else:\r\n--> 655                 _count_elements(self, iterable)\r\n    656         if kwds:\r\n\r\nTypeError: 'Example' object is not iterable\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTypeError                                 Traceback (most recent call last)\r\n in \r\n      1 MAX_VOCAB_SIZE = 25_000\r\n      2 \r\n----> 3 TEXT.build_vocab(train_data, max_size = MAX_VOCAB_SIZE)\r\n      4 LABEL.build_vocab(train_data)\r\n\r\n~\\.conda\\envs\\matura-ml\\lib\\site-packages\\torchtext\\data\\field.py in build_vocab(self, *args, **kwargs)\r\n    299                     counter.update(x)\r\n    300                 except TypeError:\r\n--> 301                     counter.update(chain.from_iterable(x))\r\n    302         specials = list(OrderedDict.fromkeys(\r\n    303             tok for tok in [self.unk_token, self.pad_token, self.init_token,\r\n\r\nTypeError: 'Example' object is not iterable\r\n```\r\n\r\nHow can I combine the train and test split in the correct way?\r\n\r\n",
    "url": "https://github.com/pytorch/text/issues/912",
    "state": "closed",
    "labels": [
      "legacy"
    ],
    "created_at": "2020-08-07T11:10:51Z",
    "updated_at": "2020-08-08T22:34:43Z",
    "user": "EmreTokyuez"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 42722,
    "title": "How to build libtorch static libraries on Windows?",
    "body": "I'm developing the Windows program using libtorch dynamic libraries released on pytorch website. However, I find the dynamic libraries are quite large (the torch_cpu.dll is larger than 100MB). Is there the static library version, or how could I build the libtorch static library by myself?\r\n\r\nLook forward to your response. Thanks a lot!\n\ncc @ezyang @seemethere @malfet @walterddr @peterjc123 @maxluk @nbcsm @guyang3532 @gunandrose4u @smartcat2010 @mszhanyi",
    "url": "https://github.com/pytorch/pytorch/issues/42722",
    "state": "closed",
    "labels": [
      "module: binaries",
      "module: build",
      "module: windows",
      "triaged",
      "windows-triaged"
    ],
    "created_at": "2020-08-07T02:37:24Z",
    "updated_at": "2024-08-12T13:36:33Z",
    "user": "lawlict"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1110,
    "title": "How to Inference non-val images in Transfer Learning Tutorial",
    "body": "The transfer learning tutorial is great, however it leaves off after evaluating the accuracy of the model. My goal is to then use the model that has been created to inference other images, but have run into trouble getting the new data adhere to the correct format and shape. Do you have any insight on how I could do this?",
    "url": "https://github.com/pytorch/tutorials/issues/1110",
    "state": "closed",
    "labels": [
      "torchvision",
      "docathon-h1-2023",
      "medium"
    ],
    "created_at": "2020-08-06T00:53:45Z",
    "updated_at": "2023-06-09T18:17:55Z",
    "user": "ScottMoffatLittle"
  },
  {
    "repo": "pytorch/vision",
    "number": 2555,
    "title": "Unable to load fasterrcnn state_dict with custom num_classes",
    "body": "## \ud83d\udc1b Bug\r\n\r\ntorchvision.models.detection.fasterrcnn_resnet50_fpn() giving error when the parameter pretrained is set to True and num_classes parameter is also supplied(other than 91). \r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n```\r\n>> from torchvision import models\r\n>> my_model = models.detection.fasterrcnn_resnet50_fpn(pretrained=True,num_classes=50)\r\n```\r\nThe error that it gives\r\n```\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/home/username/miniconda2/envs/form_ocr/lib/python3.7/site-packages/torchvision/models/detection/faster_rcnn.py\", line 354, in fasterrcnn_resnet50_fpn\r\n    model.load_state_dict(state_dict)\r\n  File \"/home/username/miniconda2/envs/form_ocr/lib/python3.7/site-packages/torch/nn/modules/module.py\", line 847, in load_state_dict\r\n    self.__class__.__name__, \"\\n\\t\".join(error_msgs)))\r\nRuntimeError: Error(s) in loading state_dict for FasterRCNN:\r\n\tsize mismatch for roi_heads.box_predictor.cls_score.weight: copying a param with shape torch.Size([91, 1024]) from checkpoint, the shape in current model is torch.Size([50, 1024]).\r\n\tsize mismatch for roi_heads.box_predictor.cls_score.bias: copying a param with shape torch.Size([91]) from checkpoint, the shape in current model is torch.Size([50]).\r\n\tsize mismatch for roi_heads.box_predictor.bbox_pred.weight: copying a param with shape torch.Size([364, 1024]) from checkpoint, the shape in current model is torch.Size([200, 1024]).\r\n\tsize mismatch for roi_heads.box_predictor.bbox_pred.bias: copying a param with shape torch.Size([364]) from checkpoint, the shape in current model is torch.Size([200]).\r\n\r\n```\r\n\r\n## Expected behavior\r\n\r\nI was hoping it would load the state_dict on the base model and then change the `model.roi_heads.box_predictor.cls_score` layer.\r\nSomething like this perhaps,\r\n```\r\nfrom torchvision import models\r\nimport torch.nn as nn\r\n\r\nclass RCNN_Model(nn.Module):\r\n    def __init__(self,pretrained=True,out_classes=91):\r\n        super(RCNN_Model,self).__init__()\r\n        self.model = models.detection.fasterrcnn_resnet50_fpn(pretrained=pretrained)#,num_classes=out_classes)\r\n        if out_classes!=91:\r\n            self.model.roi_heads.box_predictor.cls_score = nn.Linear(in_features=1024,out_features=out_classes,bias=True)\r\n            \r\n    def forward(self,x):\r\n        return self.model(x)\r\n```\r\n\r\n\r\n## Environment\r\n\r\n```\r\nPyTorch version: 1.5.1\r\nIs debug build: No\r\nCUDA used to build PyTorch: 10.2\r\n\r\nOS: Ubuntu 18.04.3 LTS\r\nGCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0\r\nCMake version: version 3.10.2\r\n\r\nPython version: 3.7\r\nIs CUDA available: No\r\nCUDA runtime version: No CUDA\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.13.3\r\n[pip3] torch==1.0.1.post2\r\n[pip3] torchvision==0.4.0\r\n[conda] blas                      1.0                         mkl  \r\n[conda] cudatoolkit               9.0                  h13b8566_0  \r\n[conda] mkl                       2019.4                      243  \r\n[conda] mkl-service               2.3.0            py37he904b0f_0  \r\n[conda] mkl_fft                   1.0.14           py37ha843d7b_0  \r\n[conda] mkl_random                1.1.0            py37hd6b4f25_0  \r\n[conda] numpy                     1.17.4                   pypi_0    pypi\r\n[conda] numpy-base                1.17.2           py37hde5b4d6_0  \r\n[conda] pytorch-nightly           1.0.0.dev20190328 py3.7_cuda9.0.176_cudnn7.4.2_0    pytorch\r\n[conda] torch                     1.5.1                    pypi_0    pypi\r\n[conda] torchvision               0.6.1                    pypi_0    pypi\r\n```\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/2555",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2020-08-05T13:09:57Z",
    "updated_at": "2020-08-05T15:14:34Z",
    "user": "devarshi16"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1104,
    "title": "Error on https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html ?",
    "body": "In Section 6 of https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html, the following code is presented:\r\n\r\n```\r\ndef add_pr_curve_tensorboard(class_index, test_probs, test_preds, global_step=0):\r\n    '''\r\n    Takes in a \"class_index\" from 0 to 9 and plots the corresponding\r\n    precision-recall curve\r\n    '''\r\n    tensorboard_preds = test_preds == class_index\r\n    tensorboard_probs = test_probs[:, class_index]\r\n\r\n    writer.add_pr_curve(classes[class_index],\r\n                        tensorboard_preds,\r\n                        tensorboard_probs,\r\n                        global_step=global_step)\r\n    writer.close()\r\n```\r\n\r\n`writer.add_pr_curve` should take the _true_ labels, not a variable testing equality between the prediction and the class index (from `https://pytorch.org/docs/stable/tensorboard.html`), so I think the second argument, `tensorboard_preds`, is wrong:  `tensorboard_preds = test_preds == class_index` tests whether the prediction is equal to the given class_index.\r\n\r\nI think this should be something like `tensorboard_preds = labels == class_index`, which gives you 0/1 based on the true labels and not the predicted labels",
    "url": "https://github.com/pytorch/tutorials/issues/1104",
    "state": "closed",
    "labels": [
      "docathon-h1-2023",
      "medium"
    ],
    "created_at": "2020-08-04T20:43:47Z",
    "updated_at": "2023-10-05T16:51:09Z",
    "comments": 6,
    "user": "motiwari"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 42505,
    "title": "how to use get_trace_graph to get the attribute of a node in trace graph in pytorch 1.6?",
    "body": "In pytorch 1.1 when using get_trace_graph to trace the model, we could get the node's attibution as follows:\r\n%469 : bool = prim::Constant[value=0](), scope: Model/Backbone[backbone]/ConvBn[conv1]/BatchNorm2d[bn]\r\nThen we could get the the attribution of the Node: backbone.conv1.bn and its class BatchNorm.\r\n\r\nThen how to get the attribution name of the node in pytorch 1.6, as we can only get\r\n%23 : float = prim::Constant[value=1]() # test.py:12:23\r\n\r\nso how to  get the attribution in pytorch 1.6\n\ncc @suo @gmagogsfm",
    "url": "https://github.com/pytorch/pytorch/issues/42505",
    "state": "closed",
    "labels": [
      "oncall: jit",
      "triaged",
      "days"
    ],
    "created_at": "2020-08-04T03:02:51Z",
    "updated_at": "2020-08-13T11:20:07Z",
    "user": "ioou"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 42445,
    "title": "how to run SVM/Random forest/xgboost on the pytorch?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/42445",
    "state": "closed",
    "labels": [],
    "created_at": "2020-08-03T10:12:34Z",
    "updated_at": "2020-08-03T17:17:24Z",
    "user": "cvJie"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 42439,
    "title": "How to use libtorch on Jetson TX2",
    "body": "Refer to https://forums.developer.nvidia.com/t/pytorch-for-jetson-nano-version-1-5-0-now-available/72048\uff0cI successfully installed Pytorch 1.0.0 and torchvision0.2.2 on jetpack4.3.According to the authentication method, I also succeeded in authentication: python\u2013>import torch\u2026\r\nHowever,I want to call a scriptModel by libtorch on a QT project.but meet the error:\r\nerror:undefined reference to \u2018nvrtcGetProgramLogSize\u2019\r\nerror:undefined reference to \u2018culaunchKernel\u2019\r\nerror:undefined reference to \u2018nvrtcComplieProgram\u2019\r\nerror:undefined reference to \u2018nvrtcCreateProgram\u2019\r\nerror:undefined reference to \u2018nvrtcGetErrorString\u2019\r\nerror:undefined reference to \u2018cuModuleGetFunction\u2019\r\nand so on.\r\n\r\nAlso I can not find libnvrtc.so at ~/.local/lib/python3.6/site-packages/torch/lib.\r\n\r\nwhat is the problem?\r\n\n\ncc @ezyang @seemethere @malfet",
    "url": "https://github.com/pytorch/pytorch/issues/42439",
    "state": "open",
    "labels": [
      "module: binaries",
      "triaged",
      "module: arm"
    ],
    "created_at": "2020-08-03T06:14:11Z",
    "updated_at": "2020-08-05T21:03:37Z",
    "user": "xifanlover"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 42404,
    "title": "How to deploy a \"LSTMcell\" style attention by torch.onnx?",
    "body": "I'm deploying a NMT network and I fail when I try to define attention module.\r\nThe first thing is that,when i put nn.LSTMcell in my init function,it would raise some errors which may caused by no inplementation in torch.onnx.\r\n\r\nAnd when I want to replace it with nn.LSTM, i still get an error with torch.onnx:\r\n```\r\nclass test(nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n\r\n        self.rnn = nn.LSTM(10, 20)\r\n    \r\n    def forward(self, x ,hx,cx):\r\n\r\n        outputs = []\r\n        for i in range(x.shape[0]):\r\n          output ,next_step = self.rnn(x[[i]], (hx, cx))\r\n          hx,cx=next_step\r\n          outputs.append(output)\r\n        return torch.stack(outputs).squeeze(1)\r\n\r\ninput = torch.randn(6, 1, 10)\r\nhx = torch.randn(1,1, 20)\r\ncx = torch.randn(1,1, 20)\r\ntorch_model = torch.jit.script(test())\r\na=torch_model(input,hx,cx)\r\na.shape\r\n\r\n#this turns out to be fine\r\ntorch.Size([6, 1, 20])\r\n\r\ntorch.onnx.export(torch_model,              \r\n                  (input,hx,cx),                       \r\n                  \"torch_model.onnx\",  \r\n                  export_params=True,        \r\n                  opset_version=10,          \r\n                  input_names = ['input',\"hx\",\"cx\"],  \r\n                  output_names = ['output'], \r\n                  dynamic_axes={'input' : {0 : 'seq_length'},\r\n                         'output' : {0 : 'seq_length'}},\r\n                  example_outputs=a\r\n          )\r\n# this will raise\r\nRuntimeError: Unknown type bool encountered in graph lowering. This type is not supported in ONNX export.\r\n```\r\nAny help would be thankful!\n\ncc @suo @gmagogsfm @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof",
    "url": "https://github.com/pytorch/pytorch/issues/42404",
    "state": "closed",
    "labels": [
      "oncall: jit",
      "module: onnx"
    ],
    "created_at": "2020-08-01T10:31:10Z",
    "updated_at": "2021-10-18T05:09:31Z",
    "user": "andylida"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 335,
    "title": "What is the key difference between mean pooling BERT vs. mean pooling sentence-transformers?",
    "body": "Hi!\r\n\r\nIf I run sentence-transformers without pre-training, is it equivalent to apply mean-pooling to the last layer of BERT?\r\n\r\nFor example, if I run the below code,\r\n```python\r\n# Use BERT for mapping tokens to embeddings\r\nword_embedding_model = models.Transformer('bert-base-uncased')\r\n\r\n# Apply mean pooling to get one fixed sized sentence vector\r\npooling_model = models.Pooling(word_embedding_model.get_word_embedding_dimension())\r\n\r\nmodel = SentenceTransformer(modules=[word_embedding_model, pooling_model])\r\nmodel.encode('This is an example')\r\n```\r\n\r\nwill the embedding vector be different than averaging the last layer of BERT?",
    "url": "https://github.com/huggingface/sentence-transformers/issues/335",
    "state": "open",
    "labels": [],
    "created_at": "2020-08-01T02:35:56Z",
    "updated_at": "2020-08-01T08:39:45Z",
    "user": "yuwon"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 163,
    "title": "\u2753 [Question] Could your team provide a cmake version?",
    "body": "## \u2753 Question\r\n\r\nI think many people block in building stage?\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/163",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-07-31T14:22:24Z",
    "updated_at": "2020-08-01T02:29:39Z",
    "user": "alanzhai219"
  },
  {
    "repo": "huggingface/pytorch-image-models",
    "number": 205,
    "title": "when I use the old version\uff0c the result is good\uff0cbut I update the newest code, the result is error.what's wrong with me?",
    "body": "same dataset,and same train scripts,with this:\r\n`\r\n./distributed_train.sh 2 /data/data/product/product --model swsl_resnet50 --epochs 20 --warmup-epochs 1 --lr 0.001 --batch-size 16 --img-size 224 --num-classes 30 --pretrained --amp\r\n`\r\n\r\nthe old code result:\r\n\r\nTrain: 10 [   0/185 (  0%)]  Loss:  0.866020 (0.8660)  Time: 0.599s,   53.41/s  (0.599s,   53.41/s)  LR: 1.000e-03  Data: 0.455 (0.455)\r\nTrain: 10 [  50/185 ( 27%)]  Loss:  0.857730 (0.8619)  Time: 0.129s,  248.96/s  (0.144s,  222.42/s)  LR: 1.000e-03  Data: 0.003 (0.013)\r\nTrain: 10 [ 100/185 ( 54%)]  Loss:  0.765654 (0.8298)  Time: 0.129s,  247.52/s  (0.139s,  230.35/s)  LR: 1.000e-03  Data: 0.003 (0.008)\r\nTrain: 10 [ 150/185 ( 82%)]  Loss:  0.984192 (0.8684)  Time: 0.133s,  240.71/s  (0.138s,  232.42/s)  LR: 1.000e-03  Data: 0.003 (0.007)\r\nTrain: 10 [ 184/185 (100%)]  Loss:  0.725536 (0.8398)  Time: 0.191s,  167.12/s  (0.137s,  232.97/s)  LR: 1.000e-03  Data: 0.061 (0.006)\r\nTest: [   0/2]  Time: 0.830 (0.830)  Loss:  0.1307 (0.1307)  Prec@1: 98.4375 (98.4375)  Prec@5: 100.0000 (100.0000)\r\nTest: [   2/2]  Time: 0.128 (0.348)  Loss:  0.0857 (0.0974)  Prec@1: 98.8889 (99.1329)  Prec@5: 100.0000 (100.0000)\r\nCurrent checkpoints:\r\n ('./output/train/20200731-174448-swsl_resnet50-224/checkpoint-3.pth.tar', 99.42196443590815)\r\n ('./output/train/20200731-174448-swsl_resnet50-224/checkpoint-8.pth.tar', 99.42196443590815)\r\n ('./output/train/20200731-174448-swsl_resnet50-224/checkpoint-5.pth.tar', 99.13294709486769)\r\n ('./output/train/20200731-174448-swsl_resnet50-224/checkpoint-10.pth.tar', 99.13294709486769)\r\n\r\n#########################################################################\r\nthe new code reslut:\r\n`\r\nTrain: 2 [   0/185 (  0%)]  Loss:  1.102509 (1.1025)  Time: 0.559s,   57.21/s  (0.559s,   57.21/s)  LR: 1.000e-03  Data: 0.413 (0.413)\r\nTrain: 2 [  50/185 ( 27%)]  Loss:  0.973374 (1.0379)  Time: 0.131s,  244.76/s  (0.142s,  225.78/s)  LR: 1.000e-03  Data: 0.003 (0.012)\r\nTrain: 2 [ 100/185 ( 54%)]  Loss:  1.284053 (1.1200)  Time: 0.130s,  245.52/s  (0.138s,  231.99/s)  LR: 1.000e-03  Data: 0.003 (0.008)\r\nTrain: 2 [ 150/185 ( 82%)]  Loss:  0.874424 (1.0586)  Time: 0.157s,  204.25/s  (0.137s,  233.52/s)  LR: 1.000e-03  Data: 0.021 (0.007)\r\nTrain: 2 [ 184/185 (100%)]  Loss:  0.963474 (1.0396)  Time: 0.201s,  159.49/s  (0.137s,  234.15/s)  LR: 1.000e-03  Data: 0.066 (0.007)\r\nTest: [   0/10]  Time: 0.455 (0.455)  Loss:  6.2966 (6.2966)  Acc@1:  0.0000 ( 0.0000)  Acc@5:  0.0000 ( 0.0000)\r\nTest: [  10/10]  Time: 0.087 (0.070)  Loss:  6.2156 (6.4805)  Acc@1:  0.0000 ( 0.0000)  Acc@5:  7.6923 ( 1.1561)\r\nCurrent checkpoints:\r\n ('./output/train/20200731-175136-swsl_resnet50-224/checkpoint-0.pth.tar', 0.28901735068745693)\r\n ('./output/train/20200731-175136-swsl_resnet50-224/checkpoint-1.pth.tar', 0.0)\r\n ('./output/train/20200731-175136-swsl_resnet50-224/checkpoint-2.pth.tar', 0.0)\r\n\r\n\r\n\r\n\r\n",
    "url": "https://github.com/huggingface/pytorch-image-models/issues/205",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-31T09:54:39Z",
    "updated_at": "2020-08-03T09:45:04Z",
    "user": "runauto"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 42349,
    "title": "I want to build the pytorch and link with openblas static library,  so how to modify the CMakeList.txt ?",
    "body": "",
    "url": "https://github.com/pytorch/pytorch/issues/42349",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-31T02:01:02Z",
    "updated_at": "2020-08-01T08:25:07Z",
    "user": "lfcarol"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 42268,
    "title": "how to enable CUDNN_TENSOR_OP_MATH for float32 torch.mm operator ",
    "body": "I am wondering in pytorch, how to enable tensor cores for float32 torch.mm operations.\r\nI posted the same question at https://discuss.pytorch.org/t/using-nvidia-tensor-core-for-float-mm-computation/90901,\r\nbut got no response. Thanks.\r\n\n\ncc @ngimel",
    "url": "https://github.com/pytorch/pytorch/issues/42268",
    "state": "closed",
    "labels": [
      "module: cuda",
      "triaged"
    ],
    "created_at": "2020-07-30T00:58:17Z",
    "updated_at": "2020-07-30T01:48:39Z",
    "user": "shz0116"
  },
  {
    "repo": "pytorch/serve",
    "number": 566,
    "title": "How to use model archiver utility for complex projects?",
    "body": "I am trying to serve the model from the [NCRFpp](https://github.com/jiesutd/NCRFpp) project using torchserve. The files that are required by my custom _handler.py_ file are in multiple folders and have import statements which refer to this folder hierarchy. The model archiver zips all these files and extracts into a temporary folder at the same level without this folder hierarchy, leading to runtime errors because the import statements fail. How do I ensure that the import statements work, with same folder hierarchy as used during development, while using torchserve?",
    "url": "https://github.com/pytorch/serve/issues/566",
    "state": "closed",
    "labels": [
      "triaged_wait"
    ],
    "created_at": "2020-07-29T13:44:24Z",
    "updated_at": "2023-01-12T01:56:23Z",
    "user": "sagjounkani"
  },
  {
    "repo": "pytorch/examples",
    "number": 806,
    "title": "How to use torch.multiprocessing in Windows",
    "body": "The following error occurred when I used the torch.multiprocessing [demo](https://github.com/pytorch/examples/tree/master/mnist_hogwild) provided by Pytorch.\r\n\r\nC:\\Users\\user\\anaconda3\\python.exe D:/HPO-Pro/PBT3/main_demo.py\r\ncuda\r\ncuda\r\nTHCudaCheck FAIL file=..\\torch/csrc/generic/StorageSharing.cpp line=247 error=801 : operation not supported\r\nTraceback (most recent call last):\r\n  File \"D:/HPO-Pro/PBT3/main_demo.py\", line 88, in <module>\r\n    p.start()\r\n  File \"C:\\Users\\user\\anaconda3\\lib\\multiprocessing\\process.py\", line 112, in start\r\n    self._popen = self._Popen(self)\r\n  File \"C:\\Users\\user\\anaconda3\\lib\\multiprocessing\\context.py\", line 322, in _Popen\r\n    return Popen(process_obj)\r\n  File \"C:\\Users\\user\\anaconda3\\lib\\multiprocessing\\popen_spawn_win32.py\", line 89, in __init__\r\n    reduction.dump(process_obj, to_child)\r\n  File \"C:\\Users\\user\\anaconda3\\lib\\multiprocessing\\reduction.py\", line 60, in dump\r\n    ForkingPickler(file, protocol).dump(obj)\r\n  File \"C:\\Users\\user\\anaconda3\\lib\\site-packages\\torch\\multiprocessing\\reductions.py\", line 240, in reduce_tensor\r\n    event_sync_required) = storage._share_cuda_()\r\nRuntimeError: cuda runtime error (801) : operation not supported at ..\\torch/csrc/generic/StorageSharing.cpp:247\r\n\r\nCan't I use CUDA while using torch.multiprocessing in Windows?",
    "url": "https://github.com/pytorch/examples/issues/806",
    "state": "open",
    "labels": [
      "windows"
    ],
    "created_at": "2020-07-29T09:06:18Z",
    "updated_at": "2022-03-09T20:46:19Z",
    "user": "zhong-xin"
  },
  {
    "repo": "huggingface/transformers",
    "number": 6092,
    "title": "i dont know what Tranier`s Dataset is.",
    "body": "# \u2753 Questions & Help\r\n\r\n<!-- The GitHub issue tracker is primarly intended for bugs, feature requests,\r\n     new models and benchmarks, and migration questions. For all other questions,\r\n     we direct you to the Hugging Face forum: https://discuss.huggingface.co/ .\r\n     You can also try Stack Overflow (SO) where a whole community of PyTorch and\r\n     Tensorflow enthusiast can help you out. In this case, make sure to tag your\r\n     question with the right deep learning framework as well as the\r\n     huggingface-transformers tag: \r\n     https://stackoverflow.com/questions/tagged/huggingface-transformers \r\n     -->\r\n\r\n## Details\r\n<!-- Description of your issue -->\r\n![image](https://user-images.githubusercontent.com/32102558/88669501-8ccdba80-d116-11ea-8b29-8dda1a61ce42.png)\r\n![image](https://user-images.githubusercontent.com/32102558/88669549-9bb46d00-d116-11ea-840c-ff661b0a2b0d.png)\r\n i thought its my customer dataset goes wrong, i dont konw what dataset it should return. the Trainer receive what dataset.\r\n<!-- You should first ask your question on the forum or SO, and only if\r\n     you didn't get an answer ask it here on GitHub. -->\r\n**A link to original question on the forum/Stack Overflow**:",
    "url": "https://github.com/huggingface/transformers/issues/6092",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-28T13:11:48Z",
    "updated_at": "2020-07-28T13:48:43Z",
    "user": "Ted8000"
  },
  {
    "repo": "pytorch/serve",
    "number": 558,
    "title": "Is there a way to test my handle file before serving my model?",
    "body": "Hi, i recently use TorchServer to serving my model. For each model i write a handle file, but i don't know how to test it. Is there a way to test my handle file before serving my model?",
    "url": "https://github.com/pytorch/serve/issues/558",
    "state": "closed",
    "labels": [
      "question",
      "triaged_wait"
    ],
    "created_at": "2020-07-28T09:35:33Z",
    "updated_at": "2020-08-21T04:06:11Z",
    "user": "wangxiang2713"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 157,
    "title": "\u201cerror while loading shared libraries: libnvinfer.so.7: cannot open shared object file: No such file or directory\u201d when running sample ",
    "body": "I'm trying to run the sample code. I've installed TRTorch according to the official [TRTorch](https://nvidia.github.io/TRTorch/tutorials/installation.html) instruction.\r\nWhen the sample code is run (with the below command from this link) the given error arise: <br/>\r\n>sudo bazel run //cpp/trtorchexec -- $(realpath /home/TRTorch/tests/modules/alexnet_scripted.jit.pt) \"(1,3,228,228)\"\r\n\r\n>error while loading shared libraries: libnvinfer.so.7: cannot open shared object file: No such file or directory\r\n\r\nAlso, the LD_LIBRARY_PATH is set correctly.\r\n\r\n>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/TensorRT/TensorRT-7.0.0.11/lib\r\n\r\nMore info:\r\n\r\n>TRTorch: latest version (python package and binary) <br/>\r\n>TensorRT: 7.0.0.11 <br/>\r\n>Pytorch: 1.5.1 <br/>\r\n>CUDA: 10.2 <br/>\r\n>Python: 3.6\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/157",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2020-07-28T08:02:31Z",
    "updated_at": "2023-03-23T07:18:44Z",
    "user": "Soroorsh"
  },
  {
    "repo": "huggingface/pytorch-image-models",
    "number": 201,
    "title": "where is CheckpointSaver?",
    "body": "hello, going over your repo\r\n(thx for the great repo btw)\r\n\r\nI can't find where the code for CheckpointSaver is...\r\nnor do I find any checkpoint saved in my pc..\r\nwhere can I find them??",
    "url": "https://github.com/huggingface/pytorch-image-models/issues/201",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-28T03:51:45Z",
    "updated_at": "2020-07-28T04:32:20Z",
    "user": "ooodragon94"
  },
  {
    "repo": "pytorch/vision",
    "number": 2508,
    "title": "Number of anchors VS. number of aspect ratios.",
    "body": "https://github.com/pytorch/vision/blob/1aef87d01eec2c0989458387fa04baebcc86ea7b/torchvision/models/detection/faster_rcnn.py#L188\r\n\r\nThe line above seems to fetch, for each location, the number of aspect ratios of anchors (not multiplying by the number of different sized anchors).",
    "url": "https://github.com/pytorch/vision/issues/2508",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-07-25T16:15:42Z",
    "updated_at": "2020-07-30T12:30:11Z",
    "user": "fulkast"
  },
  {
    "repo": "pytorch/vision",
    "number": 2505,
    "title": "Error when training Resnet with nn.DistributedDataParallel",
    "body": "When I try to train [Resnet](https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py) with `nn.DistributedDataParallel` using multi-gpus, the error occurs as below. But when I use only one gpu, it's just ok. \r\n\r\n![image](https://user-images.githubusercontent.com/40142236/88374211-ed35c280-cdcb-11ea-8f8b-e452e52c11ce.png)\r\n\r\n\r\nSome of the code:\r\n```\r\nclass Bottleneck(nn.Module):\r\n    expansion = 4\r\n    def __init__(self, inplanes, planes, stride=1, downsample=None):\r\n        super(Bottleneck, self).__init__()\r\n        self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=1, bias=False)  # decrease the channel, does't change size\r\n        self.bn1 = nn.BatchNorm2d(planes)\r\n        self.conv2 = nn.Conv2d(planes, planes, kernel_size=3, stride=stride,\r\n                               padding=1, bias=False)\r\n        self.bn2 = nn.BatchNorm2d(planes)\r\n        self.conv3 = nn.Conv2d(planes, planes * 4, kernel_size=1, bias=False)\r\n        self.bn3 = nn.BatchNorm2d(planes * 4)\r\n        self.relu = nn.ReLU(inplace=False)\r\n        self.downsample = downsample\r\n        self.stride = stride\r\n\r\n    def forward(self, x):\r\n        residual = x\r\n\r\n        out = self.conv1(x)\r\n        out = self.bn1(out)\r\n        out = self.relu(out)\r\n\r\n        out = self.conv2(out)\r\n        out = self.bn2(out)\r\n        out = self.relu(out)\r\n\r\n        out = self.conv3(out)\r\n        out = self.bn3(out)\r\n\r\n        if self.downsample is not None:\r\n            residual = self.downsample(x)\r\n\r\n        out = out + residual\r\n        out = self.relu(out)\r\n\r\n        return out\r\n\r\n\r\nclass ResNet(nn.Module):\r\n\r\n    def __init__(self, block, layers, num_classes=9):\r\n        self.inplanes = 64\r\n        super(ResNet, self).__init__()\r\n        self.conv1 = nn.Conv2d(3, 64, kernel_size=7, stride=2, padding=3,\r\n                               bias=False)  # the size become 1/2\r\n        self.bn1 = nn.BatchNorm2d(64)\r\n        self.relu = nn.ReLU(inplace=False)\r\n        self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=1)  # the size become 1/2\r\n        self.layer1 = self._make_layer(block, 64, layers[0])\r\n        self.layer2 = self._make_layer(block, 128, layers[1], stride=2)\r\n        self.layer3 = self._make_layer(block, 256, layers[2], stride=2)\r\n        self.layer4 = self._make_layer(block, 512, layers[3], stride=2)\r\n        self.avgpool = nn.AdaptiveAvgPool2d((1, 1))\r\n        # self.fc = nn.Linear(512 * block.expansion, num_classes)\r\n        self.fc1 = nn.Linear(2048, 1024)\r\n        self.fc2 = nn.Linear(1024, num_classes)\r\n\r\n\r\n        for m in self.modules():\r\n            if isinstance(m, nn.Conv2d):\r\n                n = m.kernel_size[0] * m.kernel_size[1] * m.out_channels\r\n                m.weight.data.normal_(0, math.sqrt(2. / n))\r\n            elif isinstance(m, nn.BatchNorm2d):\r\n                m.weight.data.fill_(1)\r\n                m.bias.data.zero_()\r\n\r\n    def _make_layer(self, block, planes, blocks, stride=1):\r\n        #  block: object, planes: output channel, blocks: the num of blocks\r\n        downsample = None\r\n        if stride != 1 or self.inplanes != planes * block.expansion:\r\n            downsample = nn.Sequential(\r\n                nn.Conv2d(self.inplanes, planes * block.expansion,\r\n                          kernel_size=1, stride=stride, bias=False),\r\n                nn.BatchNorm2d(planes * block.expansion),\r\n            )\r\n\r\n        layers = []\r\n        layers.append(block(self.inplanes, planes, stride, downsample))\r\n        self.inplanes = planes * block.expansion  # the input channel num become 4 times\r\n        for i in range(1, blocks):\r\n            layers.append(block(self.inplanes, planes))\r\n\r\n        return nn.Sequential(*layers)\r\n\r\n    def forward(self, x):\r\n        x = self.conv1(x)\r\n        x = self.bn1(x)\r\n        x = self.relu(x)\r\n        x = self.maxpool(x)\r\n\r\n        x = self.layer1(x)\r\n        x = self.layer2(x)\r\n        x = self.layer3(x)\r\n        x = self.layer4(x)\r\n\r\n        x = self.avgpool(x)\r\n        x = x.view(x.size(0), -1)\r\n        x = self.fc1(x)\r\n        x = nn.init.normal_(x, mean=0, std=1024 ** -0.5)\r\n        # x = self.fc2(x)\r\n        return x\r\n```",
    "url": "https://github.com/pytorch/vision/issues/2505",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: classification"
    ],
    "created_at": "2020-07-24T08:38:04Z",
    "updated_at": "2020-08-10T11:51:33Z",
    "user": "alwayshjia"
  },
  {
    "repo": "pytorch/serve",
    "number": 553,
    "title": "Dump system metrics in a database",
    "body": "How should I access system metrics to dump it in a SQL database?\r\n\r\nAlso, what are the best practices for logging inference predictions in a database?",
    "url": "https://github.com/pytorch/serve/issues/553",
    "state": "closed",
    "labels": [
      "question",
      "triaged_wait"
    ],
    "created_at": "2020-07-24T07:23:39Z",
    "updated_at": "2020-08-07T08:25:47Z",
    "user": "vishal-wiai"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 41935,
    "title": "How to Upgrade PyTorch to 1.6 in Docker Image",
    "body": "## \u2753 How to Upgrade PyTorch to 1.6 in Docker Image?\r\n\r\n### Hi, I have a docker image that has pytorch 1.4, torchvision 0.5, cudnn 7.6.5 and cuda 10.1, and other tools and packages. I want to upgrade my pytorch to 1.6. Is there some way to do it without rebuild the whole image again?\r\n\r\nThanks!\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\n\ncc @ezyang @seemethere @malfet",
    "url": "https://github.com/pytorch/pytorch/issues/41935",
    "state": "closed",
    "labels": [
      "module: binaries",
      "triaged",
      "module: docker"
    ],
    "created_at": "2020-07-23T17:56:25Z",
    "updated_at": "2021-01-26T20:11:26Z",
    "user": "zhenhuahu"
  },
  {
    "repo": "pytorch/examples",
    "number": 802,
    "title": "How to use a pre-trained models weights? ",
    "body": "How do we specify to use the pre-trained model? Typing in python main.py -a mobilenet_v2 is not giving me the model with pretrained weights.",
    "url": "https://github.com/pytorch/examples/issues/802",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-22T22:36:47Z",
    "updated_at": "2022-03-09T21:37:31Z",
    "user": "stunbomb"
  },
  {
    "repo": "pytorch/vision",
    "number": 2502,
    "title": "Why do we need target put .to(device)?",
    "body": "Consider key points detection task.\r\nThe question refers to this line \r\nhttps://github.com/pytorch/vision/blob/1aef87d01eec2c0989458387fa04baebcc86ea7b/references/detection/engine.py#L86\r\nSeems to be redundant.\r\nIn my case, I comment out this line and remove .item() in line 95, and at least evaluation starts.\r\nMoreover, COCO dataset output is a tuple({'image_id': int, 'annotations': list(...)}) and I do not get it how it could work in 86 line.",
    "url": "https://github.com/pytorch/vision/issues/2502",
    "state": "closed",
    "labels": [
      "enhancement",
      "question",
      "module: reference scripts",
      "topic: object detection"
    ],
    "created_at": "2020-07-22T13:38:19Z",
    "updated_at": "2020-07-30T12:10:54Z",
    "user": "dmitrysarov"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 41847,
    "title": "How to fix \"Unknown IValue type for pickling: Device\" in PyTorch 1.3?",
    "body": "## \u2753 Questions and Help\r\nI got a model trained with PyTorch 1.4. If I script and save this model with PyTorch 1.4, it will save successfully, but I need to script and save this model with PyTorch 1.3. When I save model with 1.3, I got error message:\r\n```\r\nRuntimeError: Unknown IValue type for pickling: Device (pushIValueImpl at /pytorch/torch/csrc/jit/pickler.cpp:125)\r\n```\r\nI want to know how to fix this `Device` issue. Thx.\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)",
    "url": "https://github.com/pytorch/pytorch/issues/41847",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-22T10:48:50Z",
    "updated_at": "2020-07-23T01:53:53Z",
    "user": "kaituoxu"
  },
  {
    "repo": "huggingface/transformers",
    "number": 5940,
    "title": "What is the difference between the function of add_tokens() and add_special_tokens() in tokenizer",
    "body": "# \u2753 Questions & Help\r\n\r\n<!-- The GitHub issue tracker is primarly intended for bugs, feature requests,\r\n     new models and benchmarks, and migration questions. For all other questions,\r\n     we direct you to the Hugging Face forum: https://discuss.huggingface.co/ .\r\n     You can also try Stack Overflow (SO) where a whole community of PyTorch and\r\n     Tensorflow enthusiast can help you out. In this case, make sure to tag your\r\n     question with the right deep learning framework as well as the\r\n     huggingface-transformers tag: \r\n     https://stackoverflow.com/questions/tagged/huggingface-transformers \r\n     -->\r\n\r\n## Details\r\n<!-- Description of your issue -->\r\nWhen I read the code of tokenizer, I have a problem if I want to use a pretrained model in NMT task, I need to add some tag tokens, such as '2English' or '2French'. I think these tokens are special tokens, so which function should I use: add_tokens() or add_special_tokens(). What is the difference between them?\r\n",
    "url": "https://github.com/huggingface/transformers/issues/5940",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-21T15:29:14Z",
    "updated_at": "2025-03-05T20:33:05Z",
    "user": "kugwzk"
  },
  {
    "repo": "pytorch/vision",
    "number": 2497,
    "title": "Grayscale image mask is transformed in a performance decreasing way with ToTensor()",
    "body": "## \ud83d\udc1b Bug\r\n\r\nPreface: This is only in the context of my usage, where I use a custom dataset for semantic segmentation. My goal was to train different models on a semantic segmentation dataset and obviously I wanted to use the torchvision transforms.\r\nThe dataset does not matter much, but the labels are interesting: The labels are grayscale in a 2d array with values from 0 to NUM_CLASSES). (I mean in form of a PIL image when I say array for the label)\r\n\r\nI realized after training on a subset of the data, that the performance was incredibly bad and the models could not even overfit on a simple dataset.\r\n\r\nI debugged for a while and finally realized, that the ToTensor() operation changes the arrays from (W, H) to (3, W, H) and the values become some float values because of the [0,255] to [0,1] rescaling. What I did not realize is how much of a performance impact this change has. When just using torch.tensor() to create a tensor from the array, the performance was WAY better (see chart below, the gray performance was using the torch.tensor approach). Note that in the chart, the ONLY change I made is replace the transforms (see in reproduction explanation).\r\n\r\nCharts with MIoU and Loss, pink: HRNet with old transform, orange: DeepLabV3+ with old transform, grey: HRNet with new transform. (All pretrained on a different dataset btw)\r\n![Screenshot from 2020-07-21 14-04-06](https://user-images.githubusercontent.com/14922864/88052834-24516d00-cb5b-11ea-8d18-164190cf329e.png)\r\n\r\n![Screenshot from 2020-07-21 14-04-19](https://user-images.githubusercontent.com/14922864/88052842-27e4f400-cb5b-11ea-8296-5407c6024dba.png)\r\n\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. Create labelset that does not use RGB labels but uses a grayscale array with each class having a corresponding number\r\n1. Prepare a semantic segmentation model (I used HRNet and DeepLabV3+) for training\r\n1. Load the dataset with these transforms for the labels:  \r\n```\r\nlabel_transform = transforms.Compose([\r\n    transforms.Resize(downsampling_size, interpolation=Image.NEAREST),\r\n    transforms.ToTensor(),\r\n])\r\n```\r\n1. Train the model, plot performance (mIoU is bad even though loss keeps decreasing)\r\n1. Load the dataset with the following different transforms:  \r\n```\r\ncustom_to_tensor = lambda a : torch.tensor(np.array(a))\r\nlabel_transform = transforms.Compose([\r\n    # Nearest interpolation to keep valid labels\r\n    transforms.Resize(downsampling_size, interpolation=Image.NEAREST),\r\n    custom_to_tensor,\r\n])\r\n```\r\n1. Train again, realize the performance is way better??\r\n\r\n## Expected behavior\r\n\r\nToTensor() should not lead to such a huge performance loss when using grayscale image masks :(\r\n\r\n## Environment\r\n\r\nUsing pytorch/pytorch:1.5.1-cuda10.1-cudnn7-runtime with these pip dependencies installed:\r\n* tensorboard==2.2.0\r\n* matplotlib==3.2.2\r\n* tensorboardx==2.0\r\n* Pillow==7.2.0\r\n* numpy==1.19.0\r\n* python-box==5.0.1\r\n* pytorch-ignite==0.4.0.post1 \r\n\r\n GPU is Nvidia Quadro P6000, only used one so far\r\n\r\n\r\n## Additional context\r\n\r\nI realize this might not be a bug per definition, but it still threw me for a loop. I absolutely did not expect the simple usage of ToTensor() to hinder the performance this much.\r\n",
    "url": "https://github.com/pytorch/vision/issues/2497",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2020-07-21T12:07:06Z",
    "updated_at": "2020-07-30T12:22:02Z",
    "user": "Areiser"
  },
  {
    "repo": "pytorch/vision",
    "number": 2486,
    "title": "Torchvision Object detection TPU Support",
    "body": "## \u2753 Torchvision object detection models with TPU.\r\n\r\nMy doubt lies somewhere between feature request and question. hence posting here.\r\n\r\nPyTorch supports TPU through torch_xla. It makes it possible to train models over TPU.\r\nI guess most torchvision classification models can be used with transfer learning/training over TPU.\r\n\r\nFor torchvision object detection models, do they support TPU?\r\nSome operations such as `NMS`, `rpn`, `roi_align` do not support TPU and hence I get an error as follows.\r\n\r\nI was trying Faster R-CNN resnet50 fpn model for object detection.\r\n\r\n```\r\n  File \"/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py\", line 550, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/usr/local/lib/python3.6/dist-packages/torchvision/models/detection/generalized_rcnn.py\", line 70, in forward\r\n    proposals, proposal_losses = self.rpn(images, features, targets)\r\n  File \"/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py\", line 550, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/usr/local/lib/python3.6/dist-packages/torchvision/models/detection/rpn.py\", line 493, in forward\r\n    boxes, scores = self.filter_proposals(proposals, objectness, images.image_sizes, num_anchors_per_level)\r\n  File \"/usr/local/lib/python3.6/dist-packages/torchvision/models/detection/rpn.py\", line 416, in filter_proposals\r\n    keep = box_ops.batched_nms(boxes, scores, lvl, self.nms_thresh)\r\nRuntimeError: Cannot access data pointer of Tensor that doesn't have storage\r\n```\r\nMy doubts/concerns/feature request.\r\n1. Do torchvision object detection models support TPU training?\r\n2. Any Plans for TPU support in future releases for these models?\r\n3. Are these ops only CUDA native and GPU/CPU specific? Is there a work-around to train object detection / segmentation models with TPU?\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/2486",
    "state": "open",
    "labels": [
      "question",
      "topic: object detection",
      "new feature"
    ],
    "created_at": "2020-07-17T18:47:07Z",
    "updated_at": "2021-05-02T18:03:08Z",
    "user": "oke-aditya"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 41592,
    "title": "Add SpectralOps CPU implementation for ARM/PowerPC processors (where MKL is not available)",
    "body": "## \ud83d\udc1b Bug\r\n\r\n`fft: ATen not compiled with MKL support` RuntimeError thrown when trying to compute Spectrogram on Jetson Nano that uses ARM64 processor.\r\n\r\n## To Reproduce\r\n\r\nCode sample:\r\n```\r\nimport torchaudio\r\n\r\nwaveform, sample_rate = torchaudio.load('test.wav')\r\nspectrogram = torchaudio.transforms.Spectrogram(sample_rate)(waveform)\r\n```\r\n\r\nStack trace:\r\n```\r\nTraceback (most recent call last):\r\n  File \"spectrogram_test.py\", line 4, in <module>\r\n    spectrogram = torchaudio.transforms.Spectrogram(sample_rate)(waveform)\r\n  File \"/home/witty/ai-benchmark-2/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 722, in _call_impl\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/home/witty/ai-benchmark-2/lib/python3.6/site-packages/torchaudio-0.7.0a0+102174e-py3.6-linux-aarch64.egg/torchaudio/transforms.py\", line 84, in forward\r\n    self.win_length, self.power, self.normalized)\r\n  File \"/home/witty/ai-benchmark-2/lib/python3.6/site-packages/torchaudio-0.7.0a0+102174e-py3.6-linux-aarch64.egg/torchaudio/functional.py\", line 162, in spectrogram\r\n    waveform, n_fft, hop_length, win_length, window, True, \"reflect\", False, True\r\n  File \"/home/witty/ai-benchmark-2/lib/python3.6/site-packages/torch/functional.py\", line 465, in stft\r\n    return _VF.stft(input, n_fft, hop_length, win_length, window, normalized, onesided)\r\nRuntimeError: fft: ATen not compiled with MKL support\r\n```\r\n\r\n## Expected behavior\r\n\r\nSpectrogram from waveform created\r\n\r\n## Environment\r\n\r\nCommands used to install PyTorch:\r\n```\r\nwget https://nvidia.box.com/shared/static/yr6sjswn25z7oankw8zy1roow9cy5ur1.whl -O torch-1.6.0rc2-cp36-cp36m-linux_aarch64.whl\r\nsudo apt-get install python-pip libopenblas-base libopenmpi-dev \r\npip install Cython\r\npip install numpy torch-1.6.0rc2-cp36-cp36m-linux_aarch64.whl\r\n```\r\n\r\nCommands used to install torchaudio:\r\nsox:\r\n```\r\nsudo apt-get update -y\r\nsudo apt-get install -y libsox-dev\r\npip install sox\r\n```\r\n\r\ntorchaudio:\r\n```\r\ngit clone https://github.com/pytorch/audio.git audio\r\ncd audio && python setup.py install\r\n```\r\n\r\n`torchaudio.__version__` output:\r\n`0.7.0a0+102174e`\r\n\r\n`collect_env.py` output:\r\n```\r\nPyTorch version: 1.6.0\r\nIs debug build: No\r\nCUDA used to build PyTorch: 10.2\r\n\r\nOS: Ubuntu 18.04.4 LTS\r\nGCC version: (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0\r\nCMake version: version 3.10.2\r\n\r\nPython version: 3.6\r\nIs CUDA available: Yes\r\nCUDA runtime version: Could not collect\r\nGPU models and configuration: Could not collect\r\nNvidia driver version: Could not collect\r\ncuDNN version: Probably one of the following:\r\n/usr/lib/aarch64-linux-gnu/libcudnn.so.8.0.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_adv_infer.so.8.0.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_adv_train.so.8.0.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_cnn_infer.so.8.0.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_cnn_train.so.8.0.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_etc.so.8.0.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_ops_infer.so.8.0.0\r\n/usr/lib/aarch64-linux-gnu/libcudnn_ops_train.so.8.0.0\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.16.1\r\n[pip3] pytorch-ignite==0.3.0\r\n[pip3] torch==1.6.0\r\n[pip3] torchaudio==0.7.0a0+102174e\r\n[conda] Could not collect\r\n```\r\n\r\n Other relevant information:\r\nMKL is not installed, because it is not supported on ARM processors; oneDNN installed\r\n\r\n## Additional context\r\n\r\nI did not install MKL because it is not supported on ARM processors, so building PyTorch from source with MKL support is not possible. Is there any workaround to this problem?\n\ncc @malfet @seemethere @walterddr @mruberry @peterbell10 @ezyang",
    "url": "https://github.com/pytorch/pytorch/issues/41592",
    "state": "closed",
    "labels": [
      "module: build",
      "triaged",
      "module: POWER",
      "module: arm",
      "module: fft",
      "function request"
    ],
    "created_at": "2020-07-17T13:02:43Z",
    "updated_at": "2021-06-30T23:29:36Z",
    "user": "arnasRad"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 146,
    "title": "\u2753 [Question] How to convert at::tensor into nvinfer1::ITensor?",
    "body": "## \u2753 Question\r\n\r\nhow to convert at::tensor into nvinfer1::ITensor?\r\n\r\n## What you have already tried\r\n\r\n\r\nI tried to run resnet101 using trtorch, however, there was an error when compiling the graph.\r\nAs a result of my analysis\r\n\r\nTRTorch/core/conversion/converters/impl/element_wise.cpp\r\n\r\n```\r\n\"aten::div.Tensor(Tensor self, Tensor other) -> Tensor\",\r\n[](ConversionCtx* ctx, const torch::jit::Node* n, args& args) -> bool {\r\n\t// Should implement self / other\r\n\tauto self = args[0].ITensor();\r\n\tauto other = args[1].ITensor();\r\n\tauto div = add_elementwise(ctx, nvinfer1::ElementWiseOperation::kDIV, self, other, util::node_info(n));\r\n\r\n\tTRTORCH_CHECK(div, \"Unable to create div layer from node: \" << *n);\r\n\r\n\tdiv->setName(util::node_info(n).c_str());\r\n\tauto out = ctx->AssociateValueAndTensor(n->outputs()[0], div->getOutput(0));\r\n\r\n\tLOG_DEBUG(\"Output tensor shape: \" << out->getDimensions());\r\n\treturn true;\r\n }\r\n```\r\n\r\nself is the ITensor type\r\nother is the IValue type\r\n\r\nThus, this program exits with an error in determining the type.\r\n\r\n`auto other = args[1].ITensor();`\r\n\r\nI know IValue can be unpacked into at::tensor, however add_elementwise requires nvinfer1::ITensor\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - CPU Architecture: x86_64\r\n - OS (e.g., Linux): Ubuntu\r\n - CUDA version: 10.2 with cudnn 8.0\r\n - GCC/G++: 7.5.0\r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/146",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-07-17T12:49:26Z",
    "updated_at": "2020-07-20T21:26:24Z",
    "user": "zhanjw"
  },
  {
    "repo": "pytorch/vision",
    "number": 2481,
    "title": "How to use torchvision roi_align?",
    "body": "I'm confused about the input parameter `boxes` and output of `torchvision.ops.roi_align`. Now I have an input image and one bbox coordinate `[x1, y1, x2, y2]`. Does `roi_align` directly return the region determined by the coordinate?\r\n\r\nFor exampe, here is my test code:\r\n\r\n```python\r\nimport torch\r\nfrom torchvision.ops import roi_align\r\n\r\na = torch.Tensor([[i * 6 + j for j in range(6)] for i in range(6)])\r\nprint(a)\r\na = a.unsqueeze(dim=0)\r\n\r\nboxes = [torch.Tensor([[0, 2, 2, 4]])]\r\na = a.unsqueeze(dim=0)\r\n\r\naligned_rois = roi_align(input=a, boxes=boxes, output_size=2)\r\nprint(aligned_rois.shape)\r\nprint(\"aligned_rois:\", aligned_rois)\r\n```\r\n\r\nAnd the result is:\r\n\r\n```\r\ntensor([[ 0.,  1.,  2.,  3.,  4.,  5.],\r\n        [ 6.,  7.,  8.,  9., 10., 11.],\r\n        [12., 13., 14., 15., 16., 17.],\r\n        [18., 19., 20., 21., 22., 23.],\r\n        [24., 25., 26., 27., 28., 29.],\r\n        [30., 31., 32., 33., 34., 35.]])\r\ntorch.Size([1, 1, 2, 2])\r\naligned_rois: tensor([[[[15.5000, 16.5000],\r\n          [21.5000, 22.5000]]]])\r\n```\r\nWhat I want to know is why the returned region is `[15, 16; 21, 22]`?\r\n\r\nThanks for answering!\r\n",
    "url": "https://github.com/pytorch/vision/issues/2481",
    "state": "closed",
    "labels": [
      "question",
      "module: ops"
    ],
    "created_at": "2020-07-17T04:57:15Z",
    "updated_at": "2021-03-09T01:56:32Z",
    "user": "xuantengh"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 139,
    "title": "\ud83d\udc1b [Bug] Fail to build the NVIDIA TRTorch container on AGX device with JetPack 4.4",
    "body": "##  Bug Description\r\n\r\nI was following this page of [instruction](https://github.com/NVIDIA/TRTorch/tree/master/notebooks#1-requirements).\r\n\r\nCommand:\r\n```\r\n$ sudo docker build -t trtorch -f Dockerfile.notebook .\r\n```\r\n\r\nOutput:\r\n```\r\n[sudo] password for nvidia: \r\nSending build context to Docker daemon  44.18MB\r\nStep 1/14 : FROM nvcr.io/nvidia/pytorch:20.03-py3\r\n20.03-py3: Pulling from nvidia/pytorch\r\n423ae2b273f4: Pulling fs layer \r\nde83a2304fa1: Pulling fs layer \r\nf9a83bce3af0: Pulling fs layer \r\nb6b53be908de: Waiting \r\n031ae32ea045: Waiting \r\n2e90bee95401: Waiting \r\n23b28e4930eb: Waiting \r\n440cfb09d608: Waiting \r\n6f3b05de36c6: Waiting \r\nb0444ce283f5: Waiting \r\n8326831bdd40: Waiting \r\n6cb1b0c70efa: Waiting \r\n51bcf8ebb1f7: Waiting \r\n69bbced5c7a2: Waiting \r\n5f6e40c02ff4: Waiting \r\nca7835aa5ed2: Waiting \r\n4c512b1ff8a5: Waiting \r\nd85924290896: Waiting \r\n97bb0d3f884c: Waiting \r\n56a4e3b147c2: Waiting \r\n468df4aef4c6: Waiting \r\n522d2b613df7: Pulling fs layer \r\n7d6417f56587: Pulling fs layer \r\n522d2b613df7: Waiting \r\n7d6417f56587: Waiting \r\n0ccda1e4ca15: Waiting \r\n18244f890475: Waiting \r\nc7986e09dff5: Waiting \r\n2d210642f30c: Waiting \r\nc564a113d3bd: Waiting \r\n44abac184be5: Waiting \r\n61817282129e: Waiting \r\n77b3c5340637: Waiting \r\ne7911ce14988: Waiting \r\n59bc17a4d14a: Waiting \r\n6b2f7c275865: Pull complete \r\n07c633be5574: Pull complete \r\n6d767ce36c21: Pull complete \r\n46bbec03f88b: Pull complete \r\n96da7d87df89: Pull complete \r\nd2663f680b06: Pull complete \r\n0ed7e2db20ab: Pull complete \r\nafd57a3ccf55: Pull complete \r\n19ac17f49e57: Pull complete \r\n2984c7bac0e3: Pull complete \r\ne2244eb6a8e7: Pull complete \r\n070f20eb03a3: Pull complete \r\nf6580f25c383: Pull complete \r\n7cc17e0c99d8: Pull complete \r\naaf5c91bb3d5: Pull complete \r\nc9ad85820d20: Pull complete \r\ne4aaec5cb4a5: Pull complete \r\n3965323727b2: Pull complete \r\n5d75d4272baf: Pull complete \r\n318400c074f7: Pull complete \r\nb5295904374f: Pull complete \r\nb962e5b89d31: Pull complete \r\nfe830d24a0da: Pull complete \r\nDigest: sha256:5f7b67b14fed35890e06f8f4907099ed4506fe0d39250aeb10b755ac6a04a0ad\r\nStatus: Downloaded newer image for nvcr.io/nvidia/pytorch:20.03-py3\r\n ---> 16c4987611fa\r\nStep 2/14 : RUN apt update && apt install curl gnupg\r\n ---> Running in 6bf12c661c88\r\nstandard_init_linux.go:211: exec user process caused \"exec format error\" \r\nThe command '/bin/sh -c apt update && apt install curl gnupg' returned a non-zero code: 1\r\n```\r\n\r\nI wonder how can I fix this error?\r\nThank you\r\n\r\nBR,\r\nChieh \r\n\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\nFollow steps from the page of [instruction](https://github.com/NVIDIA/TRTorch/tree/master/notebooks#1-requirements).\r\n\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n- PyTorch Version: 1.15.0\r\n- JetPack Version: 4.4\r\n- How you installed PyTorch: from here\r\n- Python version: 3.6\r\n- CUDA version: 10.2\r\n- GPU models and configuration: AGX jetson device\r\n- TRT version default is 7.1.0.16 on JetPack 4.4\r\n- bazel version: 3.4.0",
    "url": "https://github.com/pytorch/TensorRT/issues/139",
    "state": "closed",
    "labels": [
      "question",
      "platform: aarch64"
    ],
    "created_at": "2020-07-16T02:05:18Z",
    "updated_at": "2020-07-20T06:13:49Z",
    "user": "chiehpower"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 76,
    "title": "how to get outputTensor as 3d float[][][]?",
    "body": "the output of my network is 3d, but getDataAsFloatArray() can only return a 1d float[]\r\nfloat[] outArr = outputTensor.getDataAsFloatArray();",
    "url": "https://github.com/pytorch/android-demo-app/issues/76",
    "state": "open",
    "labels": [],
    "created_at": "2020-07-14T06:23:26Z",
    "updated_at": "2020-08-25T03:46:28Z",
    "user": "Xiaofeng-life"
  },
  {
    "repo": "pytorch/vision",
    "number": 2469,
    "title": "ImageNet pre-trained model code and hyper-parameters",
    "body": "Hi,\r\n\r\nIs the code used to trained the torchvision models (especially Resnet) on ImageNet available ? What are the hyper-parameters used  ? Did you use specific methods (dropout, weight decay, specific augmentation such as cutout...etc) during training ? \r\n\r\nThank you very much",
    "url": "https://github.com/pytorch/vision/issues/2469",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts"
    ],
    "created_at": "2020-07-14T05:35:23Z",
    "updated_at": "2020-07-14T06:58:07Z",
    "user": "Jobanan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 132,
    "title": "Bug about native compilation on NVIDIA Jetson AGX",
    "body": "## \ud83d\udc1b Bug\r\nAfter I installed the bazel from scratch on AGX device, I directly build it by bazel.  However, I got the error like below.\r\n\r\n```\r\n$ bazel build //:libtrtorch --distdir third_party/distdir/aarch64-linux-gnu         \r\n\r\nStarting local Bazel server and connecting to it...\r\nINFO: Repository trtorch_py_deps instantiated at:\r\n  no stack (--record_rule_instantiation_callstack not enabled)\r\nRepository rule pip_import defined at:\r\n  /home/nvidia/.cache/bazel/_bazel_nvidia/d7326de2ca76e35cc08b88f9bba7ab43/external/rules_python/python/pip.bzl:51:29: in <toplevel>\r\nERROR: An error occurred during the fetch of repository 'trtorch_py_deps':\r\n   pip_import failed: Collecting torch==1.5.0 (from -r /home/nvidia/ssd256/github/TRTorch/py/requirements.txt (line 1))\r\n (  Could not find a version that satisfies the requirement torch==1.5.0 (from -r /home/nvidia/ssd256/github/TRTorch/py/requirements.txt (line 1)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)\r\nNo matching distribution found for torch==1.5.0 (from -r /home/nvidia/ssd256/github/TRTorch/py/requirements.txt (line 1))\r\n)\r\nERROR: no such package '@trtorch_py_deps//': pip_import failed: Collecting torch==1.5.0 (from -r /home/nvidia/ssd256/github/TRTorch/py/requirements.txt (line 1))\r\n (  Could not find a version that satisfies the requirement torch==1.5.0 (from -r /home/nvidia/ssd256/github/TRTorch/py/requirements.txt (line 1)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)\r\nNo matching distribution found for torch==1.5.0 (from -r /home/nvidia/ssd256/github/TRTorch/py/requirements.txt (line 1))\r\n)\r\nINFO: Elapsed time: 8.428s\r\nINFO: 0 processes.\r\nFAILED: Build did NOT complete successfully (0 packages loaded)\r\n```\r\n\r\nIf I used `python3 setup.py install`, I got the error below:\r\n```\r\nrunning install\r\nbuilding libtrtorch\r\nINFO: Build options --compilation_mode, --cxxopt, --define, and 1 more have changed, discarding analysis cache.\r\nINFO: Repository tensorrt instantiated at:\r\n  no stack (--record_rule_instantiation_callstack not enabled)\r\nRepository rule http_archive defined at:\r\n  /home/nvidia/.cache/bazel/_bazel_nvidia/d7326de2ca76e35cc08b88f9bba7ab43/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>\r\nWARNING: Download from https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/7.1/tars/TensorRT-7.1.3.4.Ubuntu-18.04.x86_64-gnu.cuda-10.2.cudnn8.0.tar.gz failed: class java.io.IOException GET returned 403 Forbidden\r\nERROR: An error occurred during the fetch of repository 'tensorrt':\r\n   java.io.IOException: Error downloading [https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/7.1/tars/TensorRT-7.1.3.4.Ubuntu-18.04.x86_64-gnu.cuda-10.2.cudnn8.0.tar.gz] to /home/nvidia/.cache/bazel/_bazel_nvidia/d7326de2ca76e35cc08b88f9bba7ab43/external/tensorrt/TensorRT-7.1.3.4.Ubuntu-18.04.x86_64-gnu.cuda-10.2.cudnn8.0.tar.gz: GET returned 403 Forbidden\r\nINFO: Repository libtorch_pre_cxx11_abi instantiated at:\r\n  no stack (--record_rule_instantiation_callstack not enabled)\r\nRepository rule http_archive defined at:\r\n  /home/nvidia/.cache/bazel/_bazel_nvidia/d7326de2ca76e35cc08b88f9bba7ab43/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>\r\nERROR: /home/nvidia/ssd256/github/TRTorch/core/BUILD:10:11: //core:core depends on @tensorrt//:nvinfer in repository @tensorrt which failed to fetch. no such package '@tensorrt//': java.io.IOException: Error downloading [https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/7.1/tars/TensorRT-7.1.3.4.Ubuntu-18.04.x86_64-gnu.cuda-10.2.cudnn8.0.tar.gz] to /home/nvidia/.cache/bazel/_bazel_nvidia/d7326de2ca76e35cc08b88f9bba7ab43/external/tensorrt/TensorRT-7.1.3.4.Ubuntu-18.04.x86_64-gnu.cuda-10.2.cudnn8.0.tar.gz: GET returned 403 Forbidden\r\nERROR: Analysis of target '//cpp/api/lib:libtrtorch.so' failed; build aborted: Analysis failed\r\nINFO: Elapsed time: 18.044s\r\nINFO: 0 processes.\r\nFAILED: Build did NOT complete successfully (0 packages loaded, 62 targets configured)\r\n```\r\n\r\nIs there any idea about this?\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. Install bazel from [here](https://github.com/chiehpower/Installation/blob/master/Bazel/README.md)\r\n2. Use this command:\r\n```\r\nbazel build //:libtrtorch --distdir third_party/distdir/aarch64-linux-gnu         \r\n```\r\n\r\n## Environment\r\n\r\n> Build information about the TRTorch compiler can be found by turning on debug messages\r\n\r\n - PyTorch Version: 1.15.0\r\n - JetPack Version: 4.4\r\n - How you installed PyTorch: from [here](https://github.com/chiehpower/Installation/tree/master/AGX#install-pytorch) \r\n - Python version: 3.6\r\n - CUDA version: 10.2\r\n - GPU models and configuration: AGX jetson device\r\n- TRT version default is `7.1.0.16` on JetPack 4.4\r\n- bazel version: 3.4.0\r\n\r\nThank you\r\n\r\nBR,\r\nChieh",
    "url": "https://github.com/pytorch/TensorRT/issues/132",
    "state": "closed",
    "labels": [
      "documentation",
      "question",
      "platform: aarch64"
    ],
    "created_at": "2020-07-14T03:30:25Z",
    "updated_at": "2020-07-17T18:02:12Z",
    "user": "chiehpower"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 41328,
    "title": "How to transform from input points to rendered image ",
    "body": "",
    "url": "https://github.com/pytorch/pytorch/issues/41328",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-13T06:15:35Z",
    "updated_at": "2020-07-14T02:50:59Z",
    "user": "Gaozhongpai"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 41309,
    "title": "How to make build_pytorch_android.sh running with python 3 on mac?",
    "body": "Hi all, I was trying to following the tutrials from https://pytorch.org/mobile/android/#building-pytorch-android-from-source.\r\n\r\nwhen I run the  \r\n\r\n> git clone https://github.com/pytorch/pytorch.git\r\n> cd pytorch\r\n> sh ./scripts/build_pytorch_android.sh\r\n\r\nIt reports me the error such that \r\n\r\n>   File \"/Users/huanghenglin/pytorch/tools/shared/module_loader.py\", line 12, in import_module\r\n>     from importlib.machinery import SourceFileLoader\r\n> ImportError: No module named machinery\r\n\r\nI guessn this issue was caused by the scrip run the module_loader.py with python 2.\r\n\r\nI already set the python 3 as my default python by adding the following code on .zshrc\r\n\r\n> export PATH=${PATH}:/usr/local/opt/python@3.8/libexec/bin\r\n> alias python=\"/usr/local/opt/python@3.8/libexec/bin/python\"\r\n\r\nand the code \r\n\r\n> from importlib.machinery import SourceFileLoader\r\n\r\nruns ok on terminal's python.\r\n\r\nthe end part of report from the secipt:\r\n\r\n> [ 63%] Generating ../../torch/csrc/autograd/generated/Functions.cpp, ../../torch/csrc/jit/generated/generated_unboxing_wrappers_0.cpp, ../../torch/csrc/jit/generated/generated_unboxing_wrappers_1.cpp, ../../torch/csrc/jit/generated/generated_unboxing_wrappers_2.cpp, ../../torch/csrc/autograd/generated/Functions.h, ../../torch/csrc/autograd/generated/variable_factories.h, ../../torch/csrc/autograd/generated/python_functions.cpp, ../../torch/csrc/autograd/generated/python_variable_methods.cpp, ../../torch/csrc/autograd/generated/python_torch_functions.cpp, ../../torch/csrc/autograd/generated/python_nn_functions.cpp, ../../torch/csrc/autograd/generated/python_functions.h\r\n> Traceback (most recent call last):\r\n>   File \"tools/setup_helpers/generate_code.py\", line 118, in <module>\r\n>     main()\r\n>   File \"tools/setup_helpers/generate_code.py\", line 113, in main\r\n>     options.force_schema_registration,\r\n>   File \"tools/setup_helpers/generate_code.py\", line 34, in generate_code\r\n>     from tools.autograd.gen_autograd import gen_autograd, gen_autograd_python\r\n>   File \"/Users/huanghenglin/pytorch/tools/autograd/gen_autograd.py\", line 30, in <module>\r\n>     from .utils import YamlLoader, split_name_params, signature_without_args\r\n>   File \"/Users/huanghenglin/pytorch/tools/autograd/utils.py\", line 15, in <module>\r\n>     CodeTemplate = import_module('code_template', 'aten/src/ATen/code_template.py').CodeTemplate\r\n>   File \"/Users/huanghenglin/pytorch/tools/shared/module_loader.py\", line 12, in import_module\r\n>     from importlib.machinery import SourceFileLoader\r\n> ImportError: No module named machinery\r\n> make[2]: *** [../torch/csrc/autograd/generated/Functions.cpp] Error 1\r\n> make[1]: *** [caffe2/CMakeFiles/torch_cpu.dir/all] Error 2\r\n> make: *** [all] Error 2\r\n> \r\n\r\n\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/41309",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-11T15:54:32Z",
    "updated_at": "2020-07-12T02:46:13Z",
    "user": "hehedaozuiteng"
  },
  {
    "repo": "huggingface/transformers",
    "number": 5682,
    "title": "What is the decoder_input for encoder-decoder transformer in training time?",
    "body": "https://datascience.stackexchange.com/questions/76261/whats-the-input-dimension-for-transformer-decoder-during-training\r\n\r\nIs the link's answer right?\r\n\r\nThank you very much!",
    "url": "https://github.com/huggingface/transformers/issues/5682",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-11T10:48:07Z",
    "updated_at": "2020-07-12T03:32:38Z",
    "user": "guotong1988"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 130,
    "title": "Can't compile python package",
    "body": "I am able to compile the CXX API, but the python package fails with the error:\r\n\r\n```\r\nfatal error: NvInfer.h: No such file or directory\r\n #include \"NvInfer.h\"\r\n          ^~~~~~~~~~~\r\ncompilation terminated.\r\n```\r\nA quick search confirms that ``NvInfer.h`` is not in the repo, so I assume it is part of LibTorch / cuDNN / TRT, so I suspect bazel has an issue with the location of one of these, but I find it strange that I can compile the C++ API, so I was wondering if the python package is currently building correctly and, if so, what I can do to troubleshoot this.\r\nMy OS is Ubuntu 20.04, python 3.8 inside a conda environment, with bazel 3.3.1, cuda 10.2, TensorRT 7.1.3.4 and cuDNN 8.0.1.13 \r\n",
    "url": "https://github.com/pytorch/TensorRT/issues/130",
    "state": "closed",
    "labels": [
      "question",
      "component: build system",
      "No Activity"
    ],
    "created_at": "2020-07-10T05:28:08Z",
    "updated_at": "2020-08-18T00:06:25Z",
    "user": "IgnacioJPickering"
  },
  {
    "repo": "pytorch/vision",
    "number": 2449,
    "title": "Custom Weights for Pytorch Hub for yolo v5",
    "body": "\r\nHello\r\nJust wanted to know if there a way of import yolo v5 model using PyTorch Hub and then loading my custom weights on top of it.",
    "url": "https://github.com/pytorch/vision/issues/2449",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "module: hub"
    ],
    "created_at": "2020-07-10T04:47:29Z",
    "updated_at": "2020-07-10T06:49:43Z",
    "user": "sakshamjn"
  },
  {
    "repo": "pytorch/xla",
    "number": 2328,
    "title": "What is tracker.rate() and tracker.global_rate()",
    "body": "## \u2753 Questions and Help\r\nHello, I am still trying pytorch tpu. In the pytorch tpu mnist colab tutorial. It uses tracker.rate() and tracker.global_rate(). What are these two things? Thank you!",
    "url": "https://github.com/pytorch/xla/issues/2328",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-08T13:22:35Z",
    "updated_at": "2020-07-09T08:19:03Z",
    "user": "sharkdeng"
  },
  {
    "repo": "pytorch/text",
    "number": 874,
    "title": "how to keep tracking the record using original id?",
    "body": "## \u2753 Questions and Help\r\n\r\nHi, I have a dataset and each record has its own id and some meta info. I want to keep tracking the record using id so that I know which output is for which record. I tried use Filed but it give the error, TypeError: '<' not supported between instances of 'Example' and 'Example'\r\n\r\n`\r\n\r\nsrc = data.Field(\r\n        sequential=True,\r\n        tokenize=tokenize_en,\r\n        pad_first=True,\r\n        lower=True,\r\n        # fix_length=fix_length,\r\n        include_lengths=True,\r\n        init_token='<SOS>',\r\n        eos_token='<EOS>'\r\n    )\r\n    raw_data = data.TabularDataset(\r\n        path=data_path, format='csv',\r\n        train='data.csv',\r\n        fields=[\r\n            ('src', src),\r\n            ('id', data.Field()),\r\n            ('type', data.Field())\r\n        ])\r\n    src.build_vocab(\r\n        raw_data,\r\n        #max_size=20000,\r\n        # min_freq=2,\r\n        #vectors=vectors\r\n    )\r\n\r\n`",
    "url": "https://github.com/pytorch/text/issues/874",
    "state": "open",
    "labels": [],
    "created_at": "2020-07-08T12:26:00Z",
    "updated_at": "2020-07-08T12:26:00Z",
    "user": "Marvinmw"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 41065,
    "title": "How to use (torch.utils.data.DataLoader) in android? ",
    "body": "        Now , I try running PSENet in Android .  Project urls : https://github.com/whai362/PSENet \r\nIts testcode need  \uff08torch.utils.data.DataLoader\uff09\u3002 you can look PSENet Project .> test_ic15.py    72 lines \r\nI have torch==1.4.0    change PSENet.pth ==> PSENet.pt  and  model load  in Android is OK\u3002But\uff0c\r\nnext I don't know what to do.\r\n       I want  a little alittle translation the PSENet testcode in Android \u3002\r\n       Sorry\uff0cmy English is very poor, if you can, give me some android advice\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/41065",
    "state": "closed",
    "labels": [
      "triaged",
      "module: android",
      "oncall: mobile"
    ],
    "created_at": "2020-07-07T08:28:30Z",
    "updated_at": "2020-07-08T20:35:26Z",
    "user": "Micla-SHL"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 41064,
    "title": "When using _MultiProcessingDataLoaderIter in Dataloader, how to add a filelock in Dataset to make the file io thread-safety?  ",
    "body": "## \u2753 Questions and Help\r\nWhen I use DataLoader to load a dataset consisted of several files, I find when I cannot set the `num_workers > 0` because it will occurs a Error `TypeError: function takes exactly 5 arguments (1 given)`.\r\n\r\nWhen I set `shuffle = True` into DataLoader,  this Error when occur randomly (e.g. I will train it for several epochs and the Error happens), however, when I set the `shuffle = False`, the error will appear in the first several minibatch.\r\n\r\nI'm very sure that the bug is from the _MultiProcessingDataLoaderIter in Dataloader and the data I've prepared is correct, because if I set the `num_workers = 0`, my code can finished the training process.\r\n\r\n### Code Details\r\nI offer some details here, and hope someone can help me \ud83d\ude2d\r\n\r\nThis is the Dataset:\r\n```python\r\nclass ChunkDataset(Dataset):\r\n    def __init__(self, feat_scp_file, chunk_size_range=(100, 500)):\r\n        super(ChunkDataset, self).__init__()\r\n        self.feat_scp_file = feat_scp_file\r\n\r\n        self.feature_reader = SynchronizedFeatureReader(self.feat_scp_file)\r\n        self.utt_list = self.feature_reader.get_utt_list()\r\n        self.min_chunk_size = chunk_size_range[0]\r\n        self.max_chunk_size = chunk_size_range[1]\r\n\r\n    def __len__(self):\r\n        return len(self.feature_reader)\r\n\r\n    def __getitem__(self, item):\r\n        utt_id = self.utt_list[item]\r\n        feat = self.feature_reader[utt_id]\r\n        feat_len = feat.shape[0]\r\n\r\n        chunk_size = random.randint(self.min_chunk_size, self.max_chunk_size)\r\n        chunk_start = random.randint(0, max(0, feat_len - chunk_size))\r\n\r\n        return feat[chunk_start: min(chunk_start + chunk_size, feat_len), :]\r\n```\r\nThe key part in it is the SynchronizedFeatureReader: ( I wrapper the data reader many times because other function need it ,not just for pytorch)\r\n```python\r\nclass SynchronizedFeatureReader(object):\r\n    def __init__(self, scp_file):\r\n        self.scp_file = scp_file\r\n        self.feat_dict = ScriptReader(scp_file)\r\n\r\n    def _load(self, utt_id):\r\n        return self.feat_dict[utt_id]\r\n\r\n    def __len__(self):\r\n        return len(self.feat_dict)\r\n\r\n    def __getitem__(self, item):\r\n        return self.feat_dict[item]\r\n\r\n    def __iter__(self):\r\n        for (utt_id, feat) in self.feat_dict:\r\n            yield utt_id, feat\r\n\r\n    def get_utt_list(self):\r\n        return self.feat_dict.index_keys\r\n```\r\n\r\nAnd finally, you can see how I read the data:\r\n```python\r\nclass ScriptReader(Reader):\r\n    def __init__(self, ark_scp):\r\n        self.fmgr = dict()\r\n        def addr_processor(addr):\r\n            addr_token = addr.split(\":\")\r\n            if len(addr_token) == 1:\r\n                raise ValueError(\"Unsupported scripts address format\")\r\n            path, offset = \":\".join(addr_token[0:-1]), int(addr_token[-1])\r\n            return (path, offset)\r\n\r\n        super(ScriptReader, self).__init__(ark_scp,\r\n                                           value_processor=addr_processor)\r\n\r\n    def __del__(self):\r\n        for name in self.fmgr:\r\n            self.fmgr[name].close()\r\n\r\n    def _open(self, obj, addr):\r\n        if obj not in self.fmgr:\r\n            self.fmgr[obj] = open(obj, \"rb\")\r\n        arkf = self.fmgr[obj]\r\n        arkf.seek(addr)\r\n        return arkf\r\n\r\n    def _load(self, key):\r\n        path, addr = self.index_dict[key]\r\n        fd = self._open(path, addr) \r\n        obj = io.read_float_mat_vec(fd, direct_access=True) \r\n        return obj\r\n```\r\nI have to explain here the `io.read_float_mat_vec` is writtern by myself, it will read the first two bytes to make sure the `fd.seek()` is right. The assert is like:\r\n```python\r\ndef expect_binary(fd):\r\n    flags = bytes.decode(fd.read(2))\r\n    throw_on_error(flags == '\\0B', f'Expect binary flag, but gets {flags}')\r\n```\r\nand you will find the the flags will be wrong when dataloader run.\r\n\r\nThe `scp_file` I used is like this , It's come from other code which is not important for this issue, I think. The format is like:\r\n```\r\na0001 file.vec.ark:9\r\na0002 file.vec.ark:2076\r\na0003 file.vec.ark:4143\r\na0004 file.vec.ark:6210\r\na0005 file.vec.ark:8277\r\na0006 file.vec.ark:10344\r\n......\r\n```\r\n\r\nThe Error log is:\r\n```\r\nTraceback (most recent call last):\r\n  File \"TestFeatureReader.py\", line 172, in <module>\r\n    main()\r\n  File \"TestFeatureReader.py\", line 168, in main\r\n    process.test_data(tr_dataloader)\r\n  File \"/home/lycheng/workspace/corecode/Python/SRE-Pytorch-Tools/process/test_process.py\", line 31, in test_data\r\n    for index, (data, label) in enumerate(data_loader):\r\n  File \"/home/work_nfs2/lycheng/env/anaconda3/anaconda_py36/lib/python3.6/site-packages/torch/utils/data/dataloader.py\", line 345, in __next__\r\n    data = self._next_data()\r\n  File \"/home/work_nfs2/lycheng/env/anaconda3/anaconda_py36/lib/python3.6/site-packages/torch/utils/data/dataloader.py\", line 856, in _next_data\r\n    return self._process_data(data)\r\n  File \"/home/work_nfs2/lycheng/env/anaconda3/anaconda_py36/lib/python3.6/site-packages/torch/utils/data/datal",
    "url": "https://github.com/pytorch/pytorch/issues/41064",
    "state": "closed",
    "labels": [
      "module: dataloader",
      "triaged"
    ],
    "created_at": "2020-07-07T07:18:47Z",
    "updated_at": "2020-07-12T03:19:32Z",
    "user": "GeekOrangeLuYao"
  },
  {
    "repo": "pytorch/vision",
    "number": 2400,
    "title": "DownSample",
    "body": "https://github.com/pytorch/vision/blob/86b6c3e22e9d7d8b0fa25d08704e6a31a364973b/torchvision/models/resnet.py#L195\r\n\r\nWhy don't we need a downsample in this loop??",
    "url": "https://github.com/pytorch/vision/issues/2400",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-07-07T03:17:34Z",
    "updated_at": "2020-07-07T09:21:55Z",
    "user": "jianjiandandande"
  },
  {
    "repo": "huggingface/transformers",
    "number": 5564,
    "title": "Where is the documentation on migrating to the 3.0 tokenizer API?",
    "body": "I see that you folks have completely changed the API to do tokenizing, e.g. for BertTokenizer. I have a lot of code using the two methods `encode_plus()` and `batch_encode_plus()`, and when I went to the [documentation](https://huggingface.co/transformers/main_classes/tokenizer.html) to look up an argument, I found that these methods are completely gone. All that remains is a little blurb saying:\r\n\r\n> `BatchEncoding` holds the output of the tokenizer\u2019s encoding methods (`__call__`, `encode_plus` and `batch_encode_plus`) and is derived from a Python dictionary.\r\n\r\nAre these two methods deprecated now? Did you post a migration guide for users? \r\n\r\nOn the main [Huggingface Transformers page](https://github.com/huggingface/transformers), you have sections for `Migrating from pytorch-transformers to transformers` and `Migrating from pytorch-pretrained-bert to transformers`, so it's not like there's no precedent for you to provide some information to users on major API changes.",
    "url": "https://github.com/huggingface/transformers/issues/5564",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-07T03:17:26Z",
    "updated_at": "2020-07-07T21:15:04Z",
    "user": "githubrandomuser2017"
  },
  {
    "repo": "pytorch/examples",
    "number": 799,
    "title": "How to use my own backbone\uff1f",
    "body": "",
    "url": "https://github.com/pytorch/examples/issues/799",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-06T03:31:29Z",
    "updated_at": "2022-03-09T21:37:54Z",
    "user": "wangbin2018"
  },
  {
    "repo": "pytorch/vision",
    "number": 2393,
    "title": "Mask R-CNN: get all the parts and train specific ones",
    "body": "Hi,\r\nI would like to access all the different parts of Mask R-CNN in order to only train some of them.\r\nI learnt in the discussion forum that I can use `requires_grad` to enable/disable training, but how can I access all the `trainable` parts?\r\nThanks,\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/2393",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-07-05T09:21:15Z",
    "updated_at": "2020-07-07T09:33:13Z",
    "user": "FiReTiTi"
  },
  {
    "repo": "pytorch/vision",
    "number": 2391,
    "title": "How to Change All BN layers to GN layers?",
    "body": "i tried this : \r\n\r\n```\r\nimport torchvision.models as models\r\nmodel  = models.resnet18()\r\n\r\n#then this : \r\n\r\nfor name, module in model.named_modules():\r\n    if isinstance(module, nn.BatchNorm2d):\r\n        # Get current bn layer\r\n        bn = getattr(model, name)\r\n        # Create new gn layer\r\n        gn = nn.GroupNorm(1, bn.num_features)\r\n        # Assign gn\r\n        print('Swapping {} with {}'.format(bn, gn))\r\n        setattr(model, name, gn)\r\n\r\nprint(model)\r\n```\r\n\r\nand it gives this error :\r\n\r\n```\r\nSwapping BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) with GroupNorm(1, 64, eps=1e-05, affine=True)\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n<ipython-input-26-dc2f23e093cc> in <module>\r\n      2     if isinstance(module, nn.BatchNorm2d):\r\n      3         # Get current bn layer\r\n----> 4         bn = getattr(model, name)\r\n      5         # Create new gn layer\r\n      6         gn = nn.GroupNorm(1, bn.num_features)\r\n\r\n/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in __getattr__(self, name)\r\n    592                 return modules[name]\r\n    593         raise AttributeError(\"'{}' object has no attribute '{}'\".format(\r\n--> 594             type(self).__name__, name))\r\n    595 \r\n    596     def __setattr__(self, name, value):\r\n\r\nAttributeError: 'ResNet' object has no attribute 'layer1.0.bn1'\r\n```",
    "url": "https://github.com/pytorch/vision/issues/2391",
    "state": "closed",
    "labels": [
      "invalid"
    ],
    "created_at": "2020-07-04T09:52:25Z",
    "updated_at": "2020-07-07T09:31:44Z",
    "user": "mobassir94"
  },
  {
    "repo": "pytorch/vision",
    "number": 2390,
    "title": "Excessive memory consumption while using DistributedDataParallel ",
    "body": "## \ud83d\udc1b Bug\r\n\r\nTL;DR : While using `DistributedDataParallel` and multiple GPU, memory consumption on each GPU seems to be more than twice as much as what is observed when without using `DistributedDataParallel` on a single GPU.\r\n \r\n## To Reproduce\r\n\r\nI have been using FasterRCNN from Torchvision\u2019s models that uses DistributedDataParallel for training. However, I find that while using multiple GPU, the memory consumption is far more than without multiple GPU. Here is my code\r\n\r\n```\r\nkwargs = {}\r\n  kwargs['min_size'] = args.min_size\r\n  kwargs['max_size'] = args.max_size\r\n  model = ModifiedFRCNN(cfg=cfg, custom_anchor=args.custom_anchor,\r\n                        use_def=args.use_def, cpm=args.cpm,\r\n                        default_filter=args.default_filter,\r\n                        soft_nms=args.soft_nms,\r\n                        upscale_r=args.upscale_r, **kwargs).cuda().eval()\r\n  model = restore_network(model)\r\n  model_without_ddp = model\r\n  dataset = GenData(args.test_dataset,\r\n                    args.base_path,\r\n                    dataset_param=None,\r\n                    train=False)\r\n\r\n  if args.n_gpu > 1:\r\n      init_distributed_mode(args)\r\n      model = torch.nn.parallel.DistributedDataParallel(model, device_ids=[args.gpu],\r\n                                                        find_unused_parameters=True)\r\n      model_without_ddp = model.module\r\n      sampler = torch.utils.data.distributed.DistributedSampler(dataset)\r\n      batch_sampler = torch.utils.data.BatchSampler(sampler,\r\n                                                    args.batch_size,\r\n                                                    drop_last=True)\r\n      data_loader = torch.utils.data.DataLoader(dataset,\r\n                                                batch_sampler=batch_sampler,\r\n                                                num_workers=args.num_workers,\r\n                                                collate_fn=coco_collate)\r\n      metric_logger = MetricLogger(delimiter=\"  \")\r\n      header = 'Valid:'\r\n      batch_iterator = metric_logger.log_every(data_loader, 100, header)\r\n  else:\r\n      model = model.cuda()\r\n      data_loader =  iter(data.DataLoader(dataset, args.batch_size, shuffle=False,\r\n                                                num_workers=args.num_workers,\r\n                                                collate_fn=coco_collate))\r\n      batch_iterator = iter(data_loader)\r\n```\r\n`ModifiedFRCNN` is a class that inherits `FasterRCNN` to make trivial changes, such as parameter, postprocessing etc.\r\nCase 1 : When n_gpu=1, I am able to use a batch size of upto 8.\r\nCase 2 : When n_gpu=4, I am unable to even use a batch size of 1.\r\n\r\nBoth the above mentioned cases are on same the GPU, 2080Ti. \r\n\r\n## Expected behavior\r\n\r\nConsume comparable memory if not equal on each GPUs as the case of training on a single GPU.\r\n\r\n## Environment\r\n```\r\nCollecting environment information...\r\nPyTorch version: 1.2.0\r\nIs debug build: No\r\nCUDA used to build PyTorch: 10.0.130\r\n\r\nOS: Debian GNU/Linux 10 (buster)\r\nGCC version: (Debian 8.3.0-6) 8.3.0\r\nCMake version: version 3.13.4\r\n\r\nPython version: 3.7\r\nIs CUDA available: Yes\r\nCUDA runtime version: Could not collect\r\nGPU models and configuration: \r\nGPU 0: GeForce RTX 2080 Ti\r\nGPU 1: GeForce RTX 2080 Ti\r\n\r\nNvidia driver version: 430.14\r\ncuDNN version: Could not collect\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.19.0\r\n[pip3] torch==1.2.0\r\n[pip3] torchvision==0.4.0\r\n```\r\n## Additional context\r\n\r\nThe command I use to launch\r\n\r\n```\r\npython -m torch.distributed.launch --nproc_per_node=4 --use_env test.py <other_arguments> --world_size 4 --n_gpu 4\r\n```\r\n\r\n## PS\r\n\r\nI have posted this issue [here](https://discuss.pytorch.org/t/excessive-memory-consumption-while-using-distributeddataparallel/87568) and since I did not receive any response, I was not sure whether the place where I posted this was correct, hence re-posting here. Apologies if that shouldn't be done.\r\n\r\nThank you!",
    "url": "https://github.com/pytorch/vision/issues/2390",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-07-04T06:46:25Z",
    "updated_at": "2020-07-07T09:44:35Z",
    "user": "Sentient07"
  },
  {
    "repo": "pytorch/examples",
    "number": 797,
    "title": "train from last weight",
    "body": "Can this project continue training from the last saved weight\uff1fI trained one epoch with seven hours.and now I want to train on it basis",
    "url": "https://github.com/pytorch/examples/issues/797",
    "state": "open",
    "labels": [
      "help wanted"
    ],
    "created_at": "2020-07-02T12:47:38Z",
    "updated_at": "2022-03-10T00:06:38Z",
    "comments": 1,
    "user": "Muxindawang"
  },
  {
    "repo": "huggingface/transformers",
    "number": 5447,
    "title": "Where did \"prepare_for_model\" go?  What is the replacement?",
    "body": "I'm working with already numericalized data (e.g., where the text has been converted to ids via `tokenizer.tokenize()`) and was using `prepare_for_model` to build the appropriate input dictionary ... ***but*** that method is gone in 3.0.\r\n\r\nSo ... what should I use/do now?\r\n\r\nThanks",
    "url": "https://github.com/huggingface/transformers/issues/5447",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-01T19:20:34Z",
    "updated_at": "2020-07-03T14:51:22Z",
    "user": "ohmeow"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 40855,
    "title": "Don't know how to translate op Conv",
    "body": "(sent here from https://github.com/onnx/onnx/issues/2822)\r\n\r\nI'm only seeing this error on Windows. It's working fine on Linux (Docker).\r\n\r\nI can't find any other issues or documentation, but I get the impression that the op registry is not populated fully. Is there some kind of setup that I need to go through? Prerequisite installation needed?\r\n\r\nI'm working on Windows 10, python 3.6, I've installed `onnx==1.7.0` indirectly with pip by installing pytorch according to the [getting started page instructions at pytorch's website](https://pytorch.org/get-started/locally/): `pip install torch==1.4.0 torchvision==0.5.0 -f https://download.pytorch.org/whl/torch_stable.html`\r\n\r\n```\r\n.venv\\lib\\site-packages\\caffe2\\python\\onnx\\backend.py:713: in prepare\r\n    init_net, predict_net = cls._onnx_model_to_caffe2_net(model, device, opset_version, False)\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\ncls = <class 'caffe2.python.onnx.backend.Caffe2Backend'>\r\nonnx_model = ir_version: 3\r\nproducer_name: \"pytorch\"\r\nproducer_version: \"0.4\"\r\ngraph {\r\n  node {\r\n    input: \"0\"\r\n    input: \"1\"\r\n    outp... dim {\r\n            dim_value: 512\r\n          }\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\nopset_import {\r\n  domain: \"\"\r\n  version: 9\r\n}\r\n\r\ndevice = 'CPU', opset_version = 9, include_initializers = False\r\n\r\n# <snip>\r\n\r\nE           RuntimeError: ONNX conversion failed, encountered 69 errors:\r\n\r\n# <snip>\r\n\r\nE           . Exception: [enforce fail at ..\\caffe2\\onnx\\backend.cc:1426] . Don't know how to translate op Conv\r\nE           (no backtrace available)\r\n```",
    "url": "https://github.com/pytorch/pytorch/issues/40855",
    "state": "closed",
    "labels": [],
    "created_at": "2020-07-01T08:40:42Z",
    "updated_at": "2020-07-01T14:42:50Z",
    "user": "Korijn"
  },
  {
    "repo": "pytorch/examples",
    "number": 795,
    "title": "Under the Mnist-Hogwild framework, how to use multi-gpu computing\uff1f",
    "body": "When I execute the code example of mnist_hogwild, I find that multiple processes are running parallelly on one gpu. Question: Can multiple processes be executed in parallel on multiple GPUs?",
    "url": "https://github.com/pytorch/examples/issues/795",
    "state": "open",
    "labels": [
      "distributed"
    ],
    "created_at": "2020-06-29T08:21:04Z",
    "updated_at": "2022-03-09T20:56:18Z",
    "user": "Wang-Zhenxing"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1038,
    "title": "Simplify numpy function call in object detection tutorial",
    "body": "In the second code block in the tutorial, the line `pos = np.where(masks[i])` has been used to get the indices of the non zero points in the image. But [numpy documentation for `np.where()`](https://numpy.org/doc/1.18/reference/generated/numpy.where.html) advises to use [`np.nonzero()`](https://numpy.org/doc/1.18/reference/generated/numpy.nonzero.html) when there is only one argument for `np.where()`, and it also makes the code more readable.\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/1038",
    "state": "closed",
    "labels": [
      "torchvision",
      "docathon-h1-2023",
      "easy"
    ],
    "created_at": "2020-06-23T09:30:21Z",
    "updated_at": "2023-10-05T17:20:12Z",
    "comments": 4,
    "user": "ashok-arjun"
  },
  {
    "repo": "huggingface/transformers",
    "number": 5204,
    "title": "T5 Model : What is maximum sequence length that can be used with   pretrained T5 (3b model) checkpoint?",
    "body": "As the paper described, T5 uses a relative attention mechanism and the answer for this [issue](https://github.com/google-research/text-to-text-transfer-transformer/issues/273) says, T5 can use any sequence length were the only constraint is memory. \r\n\r\nAccording to this, can I use T5 to summarize inputs that have more than 512 tokens in a sequence?",
    "url": "https://github.com/huggingface/transformers/issues/5204",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-23T02:36:22Z",
    "updated_at": "2023-08-29T21:43:31Z",
    "user": "shamanez"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 40257,
    "title": "How to get pytorch 1.4?",
    "body": "Pytorch 1.4 is not in this list https://pytorch.org/get-started/previous-versions/\r\n\r\nI tried to replace the 1.2 to 1.4 as below, but still it didnt work\r\n`conda install pytorch==1.4.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch`",
    "url": "https://github.com/pytorch/pytorch/issues/40257",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-19T00:42:18Z",
    "updated_at": "2020-06-19T03:44:09Z",
    "user": "ivder"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 259,
    "title": "getting a none value for  `print(doc._.coref_clusters)`",
    "body": "hey people, I have attached code and the output. As you can see I am getting a none value when I am trying to  `print(doc._.coref_clusters)` and the code above line in the given program is giving the output well and good. why is this? something related to new version bugs or something like that? please respond, thanks.\r\n\r\n\r\n\r\n```\r\nimport spacy\r\nimport neuralcoref\r\n\r\nnlp = spacy.load('en')\r\ndoc = nlp('My sister has a dog. She loves him.')\r\n\r\nfor token in doc:\r\n\tprint('{}:{}'.format(token,token.vector[:3]))\r\nneuralcoref.add_to_pipe(nlp)\r\nprint(doc._.coref_clusters)\r\n\r\ndoc2 = nlp('Angela lives in Boston. She is quite happy in that city.')\r\nfor ent in doc2.ents:\r\n    print(ent._.coref_cluster)\r\n```\r\n\r\n\r\n\r\n```\r\n(spacy) C:\\Users\\Gourav\\Desktop\\py3>python coref.py\r\nC:\\Users\\Gourav\\Anaconda3\\envs\\spacy\\lib\\importlib\\_bootstrap.py:219: RuntimeWarning: spacy.morphology.Morphology size changed, may indicate binary incompatibility. Expected 104 from C header, got 112 \r\nfrom PyObject\r\n  return f(*args, **kwds)\r\nC:\\Users\\Gourav\\Anaconda3\\envs\\spacy\\lib\\importlib\\_bootstrap.py:219: RuntimeWarning: spacy.vocab.Vocab size changed, may indicate binary incompatibility. Expected 96 from C header, got 112 from PyObject\r\n  return f(*args, **kwds)\r\nC:\\Users\\Gourav\\Anaconda3\\envs\\spacy\\lib\\importlib\\_bootstrap.py:219: RuntimeWarning: spacy.tokens.span.Span size changed, may indicate binary incompatibility. Expected 72 from C header, got 80 from PyObject\r\n  return f(*args, **kwds)\r\nMy:[3.3386087  0.17132008 2.5449834 ]\r\nsister:[ 0.57823443  2.995358   -0.9161793 ]\r\nhas:[-1.2454867   0.10024977 -2.9887996 ]\r\na:[-2.6144893  -0.87124985  0.77286935]\r\ndog:[-1.5898073  1.3804269 -1.875045 ]\r\n.:[-0.20775741 -3.216754   -0.9142698 ]\r\nShe:[ 1.9065745 -1.1759269 -1.1481409]\r\nloves:[-3.0270743  0.6966858 -3.8048356]\r\nhim:[ 2.6918807 -1.7273386 -5.5162654]\r\n.:[-1.5350039 -2.1957831 -1.6328099]\r\nNone\r\n```",
    "url": "https://github.com/huggingface/neuralcoref/issues/259",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-06-18T19:12:59Z",
    "updated_at": "2020-06-19T07:58:38Z",
    "user": "chettipalli"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1033,
    "title": "A PR to fix typos failed build/deploy (#1001)",
    "body": "I corrected some typos in chatbot_tutorial.py and opened a pull request #1001 .\r\nOnly texts written in a comment of a .py file were modified, but I got build fail.\r\nIs there any guideline to cope with such case?\r\nI don't know why but some PR like #1017, which just corrects a typo, was successfully built.",
    "url": "https://github.com/pytorch/tutorials/issues/1033",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-18T14:17:47Z",
    "updated_at": "2021-06-07T21:51:03Z",
    "comments": 1,
    "user": "lewha0"
  },
  {
    "repo": "pytorch/vision",
    "number": 2329,
    "title": "A problem of multiclassifier task with Squeezenet trained on VOC2012",
    "body": "I got a problem when I dealed with a multiclassifier task with squeezenent on VOC2012. I just wrote a train code, and called the '''torchversion.models.squeezenet1_1''', changed num_classes. I used '''torch.nn.MultiLabelSoftMarginLoss()''' for my loss function. However, my loss never changed when I trained my network. If there is someone having same problem like me, and having some specific soluation, please help me. please! Thank you~\r\n```\r\nEpoch: [  0/2000] step:  0, Loss: 0.754, mAP 26.93%\r\nEpoch: [  0/2000] step: 20, Loss: 0.693, mAP 7.48%\r\nEpoch: [  0/2000] step: 40, Loss: 0.693, mAP 6.65%\r\nEpoch: [  0/2000] step: 60, Loss: 0.693, mAP 6.43%\r\nEpoch: [  0/2000] step: 80, Loss: 0.693, mAP 6.39%\r\nEpoch: [  0/2000] step: 100, Loss: 0.693, mAP 6.55%\r\nEpoch: [  0/2000] step: 120, Loss: 0.693, mAP 6.83%\r\n```\r\n",
    "url": "https://github.com/pytorch/vision/issues/2329",
    "state": "closed",
    "labels": [
      "invalid",
      "question"
    ],
    "created_at": "2020-06-18T08:48:09Z",
    "updated_at": "2020-07-07T15:07:28Z",
    "user": "JiahangWu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 40165,
    "title": "How to replace a parameter with other variable while keeping the backpropagation?",
    "body": "For example, now I have a parameter 'D' in the model.\r\n\r\nNow I want to replace the 'D' with 'C', where 'C = a+b'. Is there anyway in pytorch that can achieve that replacement while keeping the backpropagation between 'C' and 'a+b'. (e.g., training the model will update the value of 'a' and 'b'.\r\n\r\nI've tried D.data = C, but obviously that just changed the value and violate the backpropagation. Besides, '.copy' and '.clone' didn't work either.",
    "url": "https://github.com/pytorch/pytorch/issues/40165",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-17T14:41:18Z",
    "updated_at": "2020-06-17T22:04:06Z",
    "user": "kunwuz"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1032,
    "title": "Adversarial example generation by FGSM: different normalization of training vs test images?",
    "body": "In the Adversarial example generation tutorial the classifier from https://github.com/pytorch/examples/tree/master/mnist is used. However, this classifier is trained with input normalization  `transforms.Normalize((0.1307,), (0.3081,))` while in the FGSM tutorial no normalization is used and the perturbed images are clamped to [0,1] - is this not a contradiction?",
    "url": "https://github.com/pytorch/tutorials/issues/1032",
    "state": "closed",
    "labels": [
      "docathon-h1-2023",
      "medium"
    ],
    "created_at": "2020-06-17T13:09:32Z",
    "updated_at": "2023-06-12T20:41:43Z",
    "comments": 3,
    "user": "hookxs"
  },
  {
    "repo": "pytorch/text",
    "number": 828,
    "title": "How to fix the order of data in iterator during training step?",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\n<!-- Please send questions or ask for help here. -->\r\n\r\nCurrently, I'm running experiments with several datasets in torchtext, and I just found that I can't reproduce my experiments although I excluded all the possible randomness as following:\r\n\r\n    torch.manual_seed(seed)\r\n    torch.cuda.manual_seed(seed)\r\n    torch.cuda.manual_seed_all(seed)\r\n    random.seed(seed)\r\n    np.random.seed(seed)\r\n    torch.backends.cudnn.benchmark = False\r\n    torch.backends.cudnn.deterministic = True\r\n\r\nI found that, when Iterator class is initialized, `RandomShuffler()` defined in torchtext.data.utils is set as a `self.random_shuffler`, and this is used to shuffle data in training dataset. However, although one can set random state of `RandomShuffler` by feeding it as an argument of it, the line `self.random_shuffler = RandomShuffler()` doesn't let us to manually set the random state of it. Am I right? Is there a way to fix the order of data for training step?",
    "url": "https://github.com/pytorch/text/issues/828",
    "state": "open",
    "labels": [
      "new datasets and building blocks"
    ],
    "created_at": "2020-06-17T06:23:45Z",
    "updated_at": "2020-06-29T19:32:14Z",
    "user": "seewoo5"
  },
  {
    "repo": "pytorch/vision",
    "number": 2325,
    "title": "pytorch pre-trained models preprocessing results 9 images",
    "body": "I am using vgg16 and for preprocessing I use transforms module (as used in the documentation)\r\nand I don't know why, but when it takes my image as input, it outputs 9 small copy of the input image and combines them into one single image (nonetheless the output is correct)\r\n\r\nis it a problem?",
    "url": "https://github.com/pytorch/vision/issues/2325",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-06-16T20:24:38Z",
    "updated_at": "2020-06-19T10:00:17Z",
    "user": "aliamiri1380"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1029,
    "title": "questions about \"CHATBOT TUTORIAL\", some meaningless words at the end of the genertated sentences.",
    "body": "n_iteration set to 8000, the results as follow:\r\n\r\nD:\\ProgramData\\Anaconda3\\envs\\pytorch\\python.exe \"some/3evaluate_use.py\"\r\nBuilding encoder and decoder ...\r\nModels built and ready to go!\r\n> \u4e0d\u660e\u767d\u4f60\u8bf4\u5565\u9ebb\u70e6\u60a8\u8001\u8bf4\u660e\u767d\u70b9\r\nBuilding prefix dict from the default dictionary ...\r\nLoading model from cache some\\jieba.cache\r\nLoading model cost 0.777 seconds.\r\nPrefix dict has been built successfully.\r\nBot: \u8fd9 \u90fd \u4f60 \u4e5f \u592a\u7b28 \u4e86 \u70b9 \u5427 \u5427 \u54e6 \u5440 \u8bf4 \u554a \uff1f\r\n> \u4f60\u5728\u5e72\u561b\r\nBot: \u9664\u4e86 \u804a\u5929 \u8fd8\u662f \u804a\u5929 \u804a\u5929 \u5440 \u7fa4\u4e3b \u5440 \u7fa4\u4e3b \u5440\r\n> \u4f60\u662f\u50bb\u903c\u5417\uff1f\r\nBot: \u4efb\u4f55 \u4eba\u5de5\u667a\u80fd \u90fd \u654c\u4e0d\u8fc7 \u9601\u4e0b \u8fd9 \u6b3e \u5929\u7136 \u50bb\u74dc \u50bb \u903c \uff0c \u8fd8\u6015 \u5f53\u56de \u50bb \u903c\r\n> \u5367\u69fd\r\nBot: \u5927\u54e5 \uff0c \u4e70\u65a4 \u7d20\u8d28 \u586b\u8865 \u4e00\u4e0b \u4f60 \u7325\u7410 \u7684 \u5927\u8111 \uff01 \u6ca1\u6cd5 \uff01 \u6253 \u4ed6 \u7684 \uff01\r\n> \u54c8\u54c8\u54c8\u54c8\r\nBot: \u522b\u7b11 \u4e86 \uff0c \u9732\u51fa \u4e00\u5634 \u7684 \u9ec4\u7259 \u3002 \u4eb2\u7231 \u7684 \u3002 \u9a82 \u4f60 \u3002\r\n> \u6211\u559c\u6b22\u4f60\r\nBot: \u4f60 \u5230\u5e95 \u559c\u6b22 \u6211 \u4ec0\u4e48 \uff0c \u6211 \u6539 \u8fd8 \u4e0d\u6210 \u5417 \uff1f \u884c \u554a \uff01 \u4e0a \u4e86\r\n> \u6211\u60f3\u4f60\r\nBot: \u4e00\u5b9a \u8981 \u591a \u60f3 \u54e6 \uff0c \u9664\u4e86 wc \u4ee5\u5916 \u7684 \u65f6\u95f4 \u90fd \u8981 \u60f3 \u6211 \u54e6 \uff01\r\n> \u6211\u4eec\u4e00\u8d77\u79c1\u5954\u5427\r\nBot: \u4f60 \u5435 \u4e0d\u8fc7 \u6211 \u7684 \uff01 \u5462 \u54df \u54df \u3002 \u4eb2\u7231 \u7684 \u3002 \u4eca\u5929\r\n> \u62dc\u62dc\r\nBot: \u55ef \u554a \uff0c \u518d\u89c1 \uff0c \u6211\u4f1a \u60f3 \u4f60 \u7684 \u3002 \u4eb2\u7231 \u7684 \uff01\r\n> \u4f60\u559c\u6b22\u6211\u5417\r\nBot: \u5f88 \u559c\u6b22 \u5f88 \u559c\u6b22 \u5566 \u6ef4 \u4e8b\u60c5 \u4e8b\u60c5 \u4e8b\u60c5 \u4e8b\u60c5 \u4e8b\u60c5 \u4e8b\u60c5\r\n> \u4f60\u559c\u6b22\u6211\u5417\uff1f\r\nBot: \u5f88 \u559c\u6b22 \u5f88 \u559c\u6b22 \u5566 \u6ef4 \uff01 \u732a\u732a \uff01 \u6253 \uff01 \u6253 \uff01 \u6253\r\n> \u4f60\u5403\u90a3\u4e48\u591a\r\nBot: \u662f \u554a \uff0c \u597d\u591a \u3002 \u559c\u6b22 \u3002 \u559c\u6b22 \u3002 \u4eb2\u7231 \u7684 \u3002 \u3002\r\n> \u4f60\u5403\u592a\u591a\u4e86\r\nBot: \u662f \u554a \uff0c \u597d\u591a \u3002 \u559c\u6b22 \u3002 \u4eb2\u7231 \u7684 \u3002 \u3002 \u3002 \u3002\r\n> \u4f60\u957f\u592a\u80d6\u4e86\r\nBot: \u4e0d\u8981 \u7dca \uff0c \u6709 \u6211 \uff01 \u770b \uff01 \uff01 \u6253 \uff01 \u6253 \uff01\r\n> \u4f60\u653e\u5c41\r\nBot: \u4f60 \u624d \u653e\u5c41 \u5462 \u3002 \u53ef\u80fd \u5927\u6982 \u662f \u54e5 \u3002\r\n> \u4f60\u4e0d\u662f\u4eba\r\nBot: \u662f \u554a \u3002 \u5927\u65b9 3 \u3002 \u53ef\u80fd \u5927\u6982 \u662f \u5c41\u80a1 \uff01 \u6253\r\n> \u4f60\u662f\u771f\u7684\u50bb\r\nBot: \u4f60 \u624d \u50bb \u4e86 \u50bb \u903c \u5416 \u3002 \u4eb2\u7231 \u7684\r\n> \u7d2f\u4e0d\u7d2f\r\nBot: \u7d2f \u554a \uff0c \u7d2f \u5f97 \u591f\u545b \u7684 \u8bf4 \u5440 \u8bf4 \u3002 \u7325\u7410\r\n> \u7ea6\u4e48\uff1f\r\nBot: \u95ee \u5929\u95ee \u5730 \uff0c \u8bf4 \u8bf4 \u4f60 \uff0c \u8bf4 \u8bf4 \u6211 \uff0c \u6211 \u5c31 \u8bf4 \u561b\r\n> \u4f60\u592a\u53ef\u7231\u4e86\r\nBot: \u563b\u563b \uff0c \u4f60 \u4e5f \u5f88 \u53ef\u7231 \u7684 \u8bf4 \u554a \u3002 \u4eb2\u7231 \u7684\r\n> \u5927\u957f\u817f\r\nError: Encountered unknown word.\r\n> \u597d\u6f02\u4eae\r\nBot: \u5bf9 \u554a \uff0c \u5bf9 \u554a \uff0c \u6211 \u7231 \u7f8e\u5973 \uff0c \u7f8e\u5973 \u7231 \u6211 \uff01 \u7231 \u4f60 \uff01\r\n> \u4f60\u51fa\u53bb\r\nBot: \u6211\u4f1a \u7ed9 \u4f60 \u5b89\u5168 \u4e48 3 \u3002 \u68d2 \u3002\r\n> \u6eda\r\nBot: \u8be5 \u6eda \u7684 \u662f \u7f51\u53cb \u5427 \u7684 \u8bf4 \uff0c \u73b0\u5728 \u662f \u5728 \u8868\u626c \u4f60 \u4e00\u65a4\r\n> \r\n\r\n\r\n\r\n\r\nThe words marked in the red square are meaningless words.\r\n\r\n\r\n![1111](https://user-images.githubusercontent.com/3395025/84722935-0f5f4800-afb7-11ea-97db-c2b9bdfeec74.png)\r\n\r\nIn such situation, why this happened, and how to improve this?\r\n\r\nThe average loss from 9.6302 to 0.3282\r\n![2222](https://user-images.githubusercontent.com/3395025/84722941-1423fc00-afb7-11ea-9945-a39011cb12c0.png)\r\n\r\n\r\n......\r\n\r\n![333](https://user-images.githubusercontent.com/3395025/84722944-18e8b000-afb7-11ea-9eb4-29f042cc157a.png)\r\n\r\n Any big guns can do me a favor, thank you!",
    "url": "https://github.com/pytorch/tutorials/issues/1029",
    "state": "closed",
    "labels": [
      "Text"
    ],
    "created_at": "2020-06-16T01:53:46Z",
    "updated_at": "2023-03-17T20:02:26Z",
    "comments": 3,
    "user": "jobsfan"
  },
  {
    "repo": "pytorch/xla",
    "number": 2225,
    "title": "How to call tensor.item() on single proc after a collective op ?",
    "body": "## \u2753 Questions and Help\r\n\r\nHi, I'm trying to log tensor value by calling `res[0].item()` in a single process after `all_reduce` on this tensor. Execution seems to hang.\r\n\r\nTo reproduce:\r\n```python\r\nimport torch\r\nimport torch_xla.core.xla_model as xm\r\nimport torch_xla.distributed.xla_multiprocessing as xmp\r\n\r\n\r\ndef test_tensor_item(index):\r\n\r\n  xm.rendezvous('init')\r\n  print(index, \"test_tensor_item\")\r\n\r\n  device = xm.xla_device()\r\n  rank = xm.get_ordinal()\r\n  t = torch.tensor([rank + 0.0, rank + 1.0, rank + 2.0], device=device)\r\n\r\n  res = xm.all_reduce(\"sum\", t)\r\n  print(index, res, flush=True)\r\n\r\n  xm.rendezvous('sync')\r\n  if index == 0:\r\n      print(index, res[0].item(), flush=True)\r\n\r\nxmp.spawn(test_tensor_item, args=(), nprocs=8, start_method='fork')\r\n```\r\n\r\nAny hints, please.\r\nThanks ",
    "url": "https://github.com/pytorch/xla/issues/2225",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2020-06-15T12:15:45Z",
    "updated_at": "2020-07-25T08:02:46Z",
    "user": "vfdev-5"
  },
  {
    "repo": "pytorch/serve",
    "number": 459,
    "title": "How to avoid contention between models, workers and runtime parallelism?",
    "body": "Hi! this is a question, not an issue\r\n\r\nI see that TorchServe can serve multiple models or multiple workers per model. For example the [AWS blog](https://aws.amazon.com/blogs/machine-learning/deploying-pytorch-models-for-inference-at-scale-using-torchserve/) says \"If your model is hosted on a CPU with many cores such as the c5.24xlarge EC2 instance with 96 vCPUs, you can easily scale the number of threads by using the method described previously\"\r\n\r\nSo I see possibly up to 3 things competing for cores:\r\n\r\n- multiple models\r\n- multiple workers per model\r\n- multiple threads of the inference runtime running in each worker\r\n\r\nIs that understanding correct? How is TorchServe handling that triple level of parallelism? Is there any best practice or settings to tune?",
    "url": "https://github.com/pytorch/serve/issues/459",
    "state": "closed",
    "labels": [
      "question",
      "triaged_wait"
    ],
    "created_at": "2020-06-15T09:07:21Z",
    "updated_at": "2020-10-22T04:06:27Z",
    "user": "la-cruche"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 40016,
    "title": "how to load weights when using torch.nn.parallel.DistributedDataParallel?",
    "body": "platform: linux 16.04 ;python==3.8.2, pytorch==1.4.0-gpu\r\n\r\nStand-alone multi-card\r\n\r\nI try to load weights when using torch.nn.parallel.DistributedDataParallel to load model, There have be wrong.\r\n\r\n    model = torch.nn.parallel.DistributedDataParallel(model,device_ids=[args.local_rank],output_device=args.local_rank,find_unused_parameters=True)\r\n  File \"/home/jiashuaihe/anaconda2/envs/torch1.1/lib/python3.8/site-packages/torch/nn/parallel/distributed.py\", line 301, in __init__\r\n    self._distributed_broadcast_coalesced(\r\n  File \"/home/jiashuaihe/anaconda2/envs/torch1.1/lib/python3.8/site-packages/torch/nn/parallel/distributed.py\", line 485, in _distributed_broadcast_coalesced\r\n    dist._broadcast_coalesced(self.process_group, tensors, buffer_size)\r\nRuntimeError: Broken pipe\r\nTraceback (most recent call\r\n![image](https://user-images.githubusercontent.com/50036961/84616510-c350cc80-aefe-11ea-99c5-69b18c3fc676.png)\r\n\r\n\n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528 @osalpekar",
    "url": "https://github.com/pytorch/pytorch/issues/40016",
    "state": "closed",
    "labels": [
      "needs reproduction",
      "oncall: distributed",
      "triaged"
    ],
    "created_at": "2020-06-15T03:53:06Z",
    "updated_at": "2020-06-18T02:52:03Z",
    "user": "aboy2018"
  },
  {
    "repo": "pytorch/examples",
    "number": 790,
    "title": " DCGAN kernel_size ",
    "body": "DCGAN kernel_size why is 4,or why not 3(Isn't odd number more common)",
    "url": "https://github.com/pytorch/examples/issues/790",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-14T02:46:12Z",
    "updated_at": "2022-03-09T21:38:43Z",
    "comments": 1,
    "user": "yixiyixi5"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 257,
    "title": "Load new trained model",
    "body": "Dear guys,\r\n\r\nThank you so much for your interesting works. I was able to train a new model based on [this instruction](https://github.com/huggingface/neuralcoref/blob/master/neuralcoref/train/training.md) and this [blog post](https://medium.com/huggingface/how-to-train-a-neural-coreference-model-neuralcoref-2-7bb30c1abdfe). However, I could not find anywhere a manual how to load the trained model.\r\n\r\nTo understand how the model was loaded using `add_to_pipe` function, I downloaded the model from this [URL](https://s3.amazonaws.com/models.huggingface.co/neuralcoref/neuralcoref.tar.gz) and unzipped it. Inside, I could saw the `static_vectors` and `tuned_vectors`. I guess those are exactly the like the ones I used to train the model. However, I also see new file which is `key2row` and I don't know what it is and how to construct this file.\r\n\r\nCan some one please give me a small instruction how to do the inference for the trained model?\r\nThank you so much!",
    "url": "https://github.com/huggingface/neuralcoref/issues/257",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2020-06-13T16:14:52Z",
    "updated_at": "2021-07-15T07:32:04Z",
    "user": "SysDevHayes"
  },
  {
    "repo": "pytorch/serve",
    "number": 456,
    "title": "How to use management API in Sagemaker? e.g how to change batch size",
    "body": "Hi,\r\n\r\nIs it possible to use management api to a sagemaker deployed model?\r\n\r\nI am trying to increase the batch size but I don't know if it is doable in sagemaker.\r\n\r\nCan we just customise it (batch size) through config.properties so it will apply when sagemaker deploy the model ?\r\n\r\nThanks\r\n",
    "url": "https://github.com/pytorch/serve/issues/456",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-13T02:06:41Z",
    "updated_at": "2020-06-14T23:28:44Z",
    "user": "bananemure"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 98,
    "title": "What does it all mean Bazel?",
    "body": "Please specify what version to Bazel this needs to be built with?  Also please make sure you can actually compile that version for aarch64 on the Jetpacks Nvidia provides for its products.  If can't be compiled on aarch64 please fix this.  Nvidia should really do a better job of making sure its stuff is able to be compiled on its Jetpacks.  It would be nice if Nvidia would not use build systems which cannot be easily installed on their provided Jetpacks.  There is not simple command to install bazel.",
    "url": "https://github.com/pytorch/TensorRT/issues/98",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-06-12T16:50:08Z",
    "updated_at": "2020-06-13T00:04:07Z",
    "user": "oasisgunter"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 39939,
    "title": "How to resolve this issue in pycharm?  ERROR: Could not find a version that satisfies the requirement torch>=1.0 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) I have installed through command promt but still it is showing same issue as before.",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/39939",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-12T10:05:42Z",
    "updated_at": "2020-06-12T10:10:52Z",
    "user": "RizwanShaukat936"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 39936,
    "title": "How to deploy C++ LibTorch in Windows XP 32bit? ",
    "body": "I want to deploy a CNN model in Windows XP 32 bit, and here are my operations:\r\n\r\ncompile LibTorch-1.4.0 32bit with VS2017;\r\nfinish the C++11 code and the .exe run successfully in win10 and win7 32bit;\r\nThe code fails in XP which reports \u201cMSVCP140.dll is invalid\u201d.\r\nI want to use VS2015_XP to compile and avoid the error in XP. However, the LibTorch uses C++11/14 which is not supported by VS2015. So, what should I do to run successfully in XP 32bit? \r\n\r\nNeed help! TAT",
    "url": "https://github.com/pytorch/pytorch/issues/39936",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-12T07:37:04Z",
    "updated_at": "2020-06-12T14:29:35Z",
    "user": "SakuraRiven"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 96,
    "title": "Error when trying to build with compiled binaries",
    "body": "I am building an application with TRTorch precompiled binaries, and I am able to compile full precision and half precision graphs successfully.\r\n\r\nI run into build errors while trying to compile the int8 graph \r\nas long as I include this line\r\n```\r\nauto calibrator = trtorch::ptq::make_int8_calibrator(std::move(calibration_dataloader), calibration_cache_file, true);\r\n```\r\nthe build error\r\n```\r\nIn file included from /home/tsai/TRTorchSample/../trtorch/include/trtorch/trtorch.h:38,\r\n                 from /home/tsai/TRTorchSample/main.cpp:4:\r\n/home/tsai/TRTorchSample/../trtorch/include/trtorch/ptq.h: In instantiation of \u2018trtorch::ptq::Int8Calibrator<Algorithm, DataLoaderUniquePtr>::Int8Calibrator(DataLoaderUniquePtr, const string&, bool) [with Algorithm = nvinfer1::IInt8EntropyCalibrator2; DataLoaderUniquePtr = std::unique_ptr<torch::data::StatelessDataLoader<torch::data::datasets::MapDataset<torch::data::datasets::MapDataset<datasets::CIFAR10, Resize>, torch::data::transforms::Normalize<> >, torch::data::samplers::RandomSampler>, std::default_delete<torch::data::StatelessDataLoader<torch::data::datasets::MapDataset<torch::data::datasets::MapDataset<datasets::CIFAR10, Resize>, torch::data::transforms::Normalize<> >, torch::data::samplers::RandomSampler> > >; std::string = std::__cxx11::basic_string<char>]\u2019:\r\n/home/tsai/TRTorchSample/../trtorch/include/trtorch/trtorch.h:430:12:   required from \u2018trtorch::ptq::Int8Calibrator<Algorithm, DataLoader> trtorch::ptq::make_int8_calibrator(DataLoader, const string&, bool) [with Algorithm = nvinfer1::IInt8EntropyCalibrator2; DataLoader = std::unique_ptr<torch::data::StatelessDataLoader<torch::data::datasets::MapDataset<torch::data::datasets::MapDataset<datasets::CIFAR10, Resize>, torch::data::transforms::Normalize<> >, torch::data::samplers::RandomSampler>, std::default_delete<torch::data::StatelessDataLoader<torch::data::datasets::MapDataset<torch::data::datasets::MapDataset<datasets::CIFAR10, Resize>, torch::data::transforms::Normalize<> >, torch::data::samplers::RandomSampler> > >; std::string = std::__cxx11::basic_string<char>]\u2019\r\n/home/tsai/TRTorchSample/main.cpp:77:121:   required from here\r\n/home/tsai/TRTorchSample/../trtorch/include/trtorch/ptq.h:55:13: error: no matching function for call to \u2018std::vector<at::Tensor>::push_back(<unresolved overloaded function type>)\u2019\r\n   55 |             batched_data_.push_back(batch.data);\r\n      |             ^~~~~~~~~~~~~\r\nIn file included from /usr/include/c++/9/vector:67,\r\n                 from /home/tsai/libtorch/include/c10/util/StringUtil.h:11,\r\n                 from /home/tsai/libtorch/include/c10/util/Exception.h:5,\r\n                 from /home/tsai/libtorch/include/c10/core/Device.h:5,\r\n                 from /home/tsai/libtorch/include/c10/core/Allocator.h:6,\r\n                 from /home/tsai/libtorch/include/ATen/ATen.h:3,\r\n                 from /home/tsai/libtorch/include/torch/csrc/api/include/torch/types.h:3,\r\n                 from /home/tsai/libtorch/include/torch/script.h:3,\r\n                 from /home/tsai/TRTorchSample/main.cpp:1:\r\n/usr/include/c++/9/bits/stl_vector.h:1184:7: note: candidate: \u2018void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = at::Tensor; _Alloc = std::allocator<at::Tensor>; std::vector<_Tp, _Alloc>::value_type = at::Tensor]\u2019\r\n 1184 |       push_back(const value_type& __x)\r\n      |       ^~~~~~~~~\r\n/usr/include/c++/9/bits/stl_vector.h:1184:35: note:   no known conversion for argument 1 from \u2018<unresolved overloaded function type>\u2019 to \u2018const value_type&\u2019 {aka \u2018const at::Tensor&\u2019}\r\n 1184 |       push_back(const value_type& __x)\r\n      |                 ~~~~~~~~~~~~~~~~~~^~~\r\n/usr/include/c++/9/bits/stl_vector.h:1200:7: note: candidate: \u2018void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = at::Tensor; _Alloc = std::allocator<at::Tensor>; std::vector<_Tp, _Alloc>::value_type = at::Tensor]\u2019\r\n 1200 |       push_back(value_type&& __x)\r\n      |       ^~~~~~~~~\r\n/usr/include/c++/9/bits/stl_vector.h:1200:30: note:   no known conversion for argument 1 from \u2018<unresolved overloaded function type>\u2019 to \u2018std::vector<at::Tensor>::value_type&&\u2019 {aka \u2018at::Tensor&&\u2019}\r\n 1200 |       push_back(value_type&& __x)\r\n      |                 ~~~~~~~~~~~~~^~~\r\nmake[2]: *** [CMakeFiles/TRTorchSample.dir/build.make:63: CMakeFiles/TRTorchSample.dir/main.cpp.o] Error 1\r\nmake[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/TRTorchSample.dir/all] Error 2\r\nmake: *** [Makefile:84: all] Error 2\r\n\r\n```\r\n\r\nCMakeLists.txt\r\n\r\n```\r\ncmake_minimum_required(VERSION 3.10)\r\n\r\nproject(TRTorchSample)\r\nenable_language(CUDA)\r\n\r\nfind_package(Torch REQUIRED)\r\nset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}\")\r\nset(CUDA_TOOLKIT_ROOT_DIR \"/usr/local/cuda\")\r\nset(CUDA_INCLUDE_DIRS \"/usr/local/cuda/include\")\r\n\r\nadd_executable(TRTorchSample main.cpp cifar10.cpp cifar10.h)\r\n\r\ntarget_link_libraries(TRTorchSample \"${TORCH_LIBRARIES}\")\r\ntarget_link_libraries(TRTorchSample \"${PROJECT_SOURCE_DIR",
    "url": "https://github.com/pytorch/TensorRT/issues/96",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2020-06-12T03:17:18Z",
    "updated_at": "2020-07-19T00:03:52Z",
    "user": "tsaizhenling"
  },
  {
    "repo": "huggingface/transformers",
    "number": 4937,
    "title": "What is the different options for pooler_type in Bert config ?",
    "body": "# \u2753 Questions & Help\r\n\r\n<!-- The GitHub issue tracker is primarly intended for bugs, feature requests,\r\n     new models and benchmarks, and migration questions. For all other questions,\r\n     we direct you to Stack Overflow (SO) where a whole community of PyTorch and\r\n     Tensorflow enthusiast can help you out. Make sure to tag your question with the\r\n     right deep learning framework as well as the huggingface-transformers tag: \r\n     https://stackoverflow.com/questions/tagged/huggingface-transformers \r\n     \r\n     If your question wasn't answered after a period of time on Stack Overflow, you\r\n     can always open a question on GitHub. You should then link to the SO question \r\n     that you posted.\r\n     -->\r\n\r\n## Details\r\n<!-- Description of your issue -->\r\nI want to change the pooling type at the top of the output hidden states of Bert.\r\nI search in the documentation and find nothing. Can anyone help me ? I just want the different option of pooling (max, average etc.). Here's a piece of code to see the option i am talking about.\r\n`import transformers\r\nencoder = transformers.TFBertModel.from_pretrained(\"bert-base-uncased\")\r\nencoder.config`\r\n<!-- You should first ask your question on SO, and only if\r\n     you didn't get an answer ask it here on GitHub. -->\r\n**A link to original question on Stack Overflow**:\r\n",
    "url": "https://github.com/huggingface/transformers/issues/4937",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-11T14:26:20Z",
    "updated_at": "2020-06-18T07:26:02Z",
    "user": "ClementViricel"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1022,
    "title": "math text size is too small",
    "body": "![BlitzMathTooSmall](https://user-images.githubusercontent.com/20859781/84378673-2c37fc00-ac02-11ea-9cc6-80764e5ea082.png)  \r\nI cannot easily read what's written in the equations. The Math is rendering very small on Blitz page.  \r\n[Here](https://pytorch.org/tutorials/beginner/blitz/autograd_tutorial.html). How can I help correct this?\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/1022",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-11T11:14:34Z",
    "updated_at": "2021-06-07T22:28:11Z",
    "comments": 7,
    "user": "PradeepSinghMakwana"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 39778,
    "title": "How to Build Stable PyTorch (not from master) from source and output Wheel? ",
    "body": "Currently, in the PyTorch docs the suggested way of building from source includes the following main commands:\r\n\r\n```bash\r\ngit clone --recursive https://github.com/pytorch/pytorch\r\ncd pytorch\r\nexport CMAKE_PREFIX_PATH=${CONDA_PREFIX:-\"$(dirname $(which conda))/../\"}\r\npython setup.py install\r\n```\r\nThe clone command gets the PyTorch repo and the next command builds PyTorch in a Conda environment.\r\n\r\nThe problem here is that when the build starts it uses the `master` branch, which is not the stable (currently builds unstable `torch-1.6.0a0+8a6914d`). How do I checkout and build a stable version? The docs don't mention how to do this\r\n\r\nSecondly, `python setup.py install` builds in conda environment, it works fine, but there is no way to port that build to other machines, I would like to create a **pip wheel**, instead, how should I do that?\r\n\r\nAny help will be greatly appreciated, thanks. ",
    "url": "https://github.com/pytorch/pytorch/issues/39778",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-10T13:15:19Z",
    "updated_at": "2020-06-10T13:43:16Z",
    "user": "RafayAK"
  },
  {
    "repo": "pytorch/xla",
    "number": 2191,
    "title": "How to aggregate per-process statistics in xmp.spawn?",
    "body": "## \u2753 Questions and Help\r\n\r\nI am using the idiom:\r\n\r\n```\r\nxmp.spawn(_mp_fn, args=(), nprocs=1, start_method='fork')\r\n```\r\nwhere my `_mp_fn` calls `xm.optimizer_step(optim)`\r\n\r\nIs there any way to combine the other statistics (loss, various stats on gradients etc) across processes and report just the aggregate for each minibatch?\r\n\r\nAt the moment, the `_mp_fn` just prints out its local values for loss etc, which don't reflect the merged gradients used to update the model.\r\n\r\nThanks!\r\n\r\nHenry\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/2191",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-10T06:01:33Z",
    "updated_at": "2020-06-12T00:21:38Z",
    "user": "hrbigelow"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 90,
    "title": "Issues When Using Compiled Binaries",
    "body": "After compiling TRTorch on an x86 machine, and copying the outputted binaries to another machine, then using them in an include directory, I get the following error when compiling my code:\r\n```\r\n/usr/bin/ld: warning: libnvinfer.so.7, needed by /home/caelin/Github/br-core/ros2_ws/src/br-detection/include/trtorch/lib/libtrtorch.so, not found (try using -rpath or -rpath-link)\r\n/usr/bin/ld: warning: libopencv_imgcodecs.so.3.2, needed by /opt/ros/eloquent/lib/libcv_bridge.so, may conflict with libopencv_imgcodecs.so.4.2\r\n/usr/bin/ld: warning: libopencv_imgproc.so.3.2, needed by /opt/ros/eloquent/lib/libcv_bridge.so, may conflict with libopencv_imgproc.so.4.2\r\n/usr/bin/ld: warning: libopencv_core.so.3.2, needed by /opt/ros/eloquent/lib/libcv_bridge.so, may conflict with libopencv_core.so.4.2\r\n/usr/bin/ld: warning: libopencv_calib3d.so.3.2, needed by /opt/ros/eloquent/lib/libimage_geometry.so, may conflict with libopencv_calib3d.so.4.2\r\n/home/caelin/Github/br-core/ros2_ws/src/br-detection/include/trtorch/lib/libtrtorch.so: undefined reference to `createInferBuilder_INTERNAL'\r\n/home/caelin/Github/br-core/ros2_ws/src/br-detection/include/trtorch/lib/libtrtorch.so: undefined reference to `createInferRuntime_INTERNAL'\r\n```",
    "url": "https://github.com/pytorch/TensorRT/issues/90",
    "state": "closed",
    "labels": [
      "question",
      "No Activity"
    ],
    "created_at": "2020-06-10T00:39:26Z",
    "updated_at": "2020-09-11T00:05:16Z",
    "user": "caelinsutch"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 39641,
    "title": "What is the difference between torch.mean and caffe2 ReduceMean?",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\nI manually convert the model from Caffe2 to Pytorch. I built the full architecture of the model in Pytorch using weights from a Caffe2. In Caffe2, the model has a ReduceMean layer, which in Pytorch I replaced with torch.mean. As a result of the replacement, the difference in the calculations turned out to be too large, which does not allow to complete the conversion successfully.\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. [input_data.txt](https://github.com/pytorch/pytorch/files/4742801/input_data.txt)\r\n1.\r\n ```\r\nimport numpy as np\r\nimport torch\r\nfrom caffe2.python import workspace, core\r\n\r\ndata = np.load(\"input_data.npy\")\r\n\r\n#caffe2\r\nop_reduce_mean = core.CreateOperator(\"ReduceMean\", [\"X_reduce\"], [\"Y_reduce\"], axes=(3,), keepdims=1)\r\nworkspace.ResetWorkspace()\r\nworkspace.FeedBlob(\"X_reduce\", data)\r\nworkspace.RunOperatorOnce(op_reduce_mean)\r\nshape_reduce_mean_caffe2 = workspace.FetchBlob(\"Y_reduce\").shape\r\ndata_reduce_mean_caffe2 = workspace.FetchBlob(\"Y_reduce\")\r\ndata_reduce_mean_caffe2 = np.array(data_reduce_mean_caffe2, dtype=np.float32).reshape(data_reduce_mean_caffe2.shape)\r\nprint(data_reduce_mean_caffe2)  # -0.4089698, -0.5118571, -0.5328341, -0.50671, ... , -0.5756652, -0.38777262, -0.43768662, -0.49657446\r\n\r\n#pytorch\r\ntorch_data = torch.from_numpy(data)\r\ndata_mean_torch = torch.mean(torch_data, dim=(3,), keepdim=True)\r\nprint(data_mean_torch)  # -0.4089695, -0.5118583, -0.532835, -0.50670993, ... , -0.57566583, -0.38777304, -0.43768588, -0.49657464\r\n\r\n#numpy\r\ndata_mean_numpy = np.mean(data, asix=(3,), keepdims=True)  # -0.40896943, -0.5118579, -0.53283495, -0.50670964, ..., -0.5756654, -0.38777274, -0.43768603, -0.49657455\r\nprint(data_mean_numpy)\r\n```\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\n\r\nThe same results.\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n## Environment\r\n\r\n - PyTorch Version (e.g., 1.0): 1.5\r\n - OS (e.g., Linux): Windows 10\r\n - How you installed PyTorch (`conda`, `pip`, source): conda\r\n - Build command you used (if compiling from source):\r\n - Python version: 3.7\r\n - CUDA/cuDNN version: No\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/39641",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-07T19:58:45Z",
    "updated_at": "2020-06-08T18:15:33Z",
    "user": "dryarullin"
  },
  {
    "repo": "huggingface/datasets",
    "number": 246,
    "title": "What is the best way to cache a dataset? ",
    "body": "For example if I want to use streamlit with a nlp dataset:\r\n\r\n```\r\n@st.cache\r\ndef load_data():\r\n    return nlp.load_dataset('squad')\r\n```\r\nThis code raises the error \"uncachable object\"\r\n\r\nRight now I just fixed with a constant for my specific case:\r\n```\r\n    @st.cache(hash_funcs={pyarrow.lib.Buffer: lambda b: 0})\r\n```\r\nBut I was curious to know what is the best way in general\r\n\r\n",
    "url": "https://github.com/huggingface/datasets/issues/246",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-06T11:02:07Z",
    "updated_at": "2020-07-09T09:15:07Z",
    "user": "Mistobaan"
  },
  {
    "repo": "huggingface/transformers",
    "number": 4817,
    "title": "Question: Where do I find the Transformer model from the paper \"Attention is all you need\" ?",
    "body": "Hello\r\n\r\n  Firstly, thanks for supporting all questions here.\r\n\r\nI read the paper \"Attention is all you need\" and wondering which class should I use in the HuggingFace library to use the Transformer architecture used in the paper.\r\n\r\nCan you please advise?\r\n\r\nThanks\r\nAbhishek ",
    "url": "https://github.com/huggingface/transformers/issues/4817",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-06T10:34:56Z",
    "updated_at": "2020-06-08T22:37:27Z",
    "user": "abhisheksgumadi"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 84,
    "title": "TRTorch on torchvision ResNet152",
    "body": "Hi, \r\n\r\nI tried the script below and get error messages and a segmentation fault. Is this a bug or am I doing it wrong?\r\n\r\n`import copy\r\nimport itertools\r\nimport logging\r\nimport numpy as np\r\nimport os\r\nimport sys\r\n\r\nimport torch\r\nimport torchvision.models\r\nimport trtorch\r\n\r\ndef torchvision_benchmark():    \r\n    os.environ[\"CUDA_DEVICE_ORDER\"]=\"PCI_BUS_ID\"\r\n    os.environ[\"CUDA_VISIBLE_DEVICES\"]=\"0,1,2\"\r\n\r\n    B, C, H, W = 1, 3, 224, 224\r\n\r\n    pytorch_model = torchvision.models.resnet152(pretrained=True)\r\n    print(f\"Started torch.jit.script() ...\", end='')\r\n    torchscript_model = torch.jit.script(copy.deepcopy(pytorch_model))\r\n    print(f\" done.\")\r\n\r\n    compile_settings = {\r\n        \"input_shapes\": [[1, 3, 224, 224]],\r\n        \"op_precision\": torch.float\r\n    }\r\n\r\n    for i, (k, v) in enumerate(torchscript_model.named_parameters()):\r\n        print(k, v.shape)\r\n        if i > 10:\r\n            break  \r\n\r\n    _ = torch.jit.script(copy.deepcopy(pytorch_model).eval())\r\n    graph_lines = str(_.inlined_graph).split('\\n')\r\n    ls, le = 0, 20\r\n    for l in graph_lines[ls:le]:\r\n        print(l)\r\n    print(f\"Started trtorch.compile() ...\", end='')\r\n    trt_ts_module = trtorch.compile(_, compile_settings)\r\n    print(f\" done.\")\r\n`\r\n\r\nI get following results:\r\n\r\n> Started torch.jit.script() ... done.\r\nconv1.weight torch.Size([64, 3, 7, 7])\r\nbn1.weight torch.Size([64])\r\nbn1.bias torch.Size([64])\r\nlayer1.0.conv1.weight torch.Size([64, 64, 1, 1])\r\nlayer1.0.bn1.weight torch.Size([64])\r\nlayer1.0.bn1.bias torch.Size([64])\r\nlayer1.0.conv2.weight torch.Size([64, 64, 3, 3])\r\nlayer1.0.bn2.weight torch.Size([64])\r\nlayer1.0.bn2.bias torch.Size([64])\r\nlayer1.0.conv3.weight torch.Size([256, 64, 1, 1])\r\nlayer1.0.bn3.weight torch.Size([256])\r\nlayer1.0.bn3.bias torch.Size([256])\r\ngraph(%self : __torch__.torchvision.models.resnet.ResNet,\r\n      %x.1 : Tensor):\r\n  %3 : int = prim::Constant[value=-1]()\r\n  %4 : int = prim::Constant[value=1]() # /opt/conda/lib/python3.7/site-packages/torchvision-0.7.0a0+34810c0-py3.7-linux-x86_64.egg/torchvision/models/resnet.py:214:29\r\n  %5 : __torch__.torch.nn.modules.conv.Conv2d = prim::GetAttr[name=\"conv1\"](%self)\r\n  %6 : Tensor = prim::GetAttr[name=\"weight\"](%5)\r\n  %7 : int = prim::Constant[value=3]() # /opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py:346:24\r\n  %8 : int = prim::Constant[value=1]() # /opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py:344:38\r\n  %9 : int = prim::Constant[value=2]() # /opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py:343:47\r\n  %10 : Tensor? = prim::GetAttr[name=\"bias\"](%5)\r\n  %11 : int[] = prim::ListConstruct(%9, %9)\r\n  %12 : int[] = prim::ListConstruct(%7, %7)\r\n  %13 : int[] = prim::ListConstruct(%8, %8)\r\n  %x.3 : Tensor = aten::conv2d(%x.1, %6, %10, %11, %12, %13, %8) # /opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py:345:15\r\n  %15 : __torch__.torch.nn.modules.batchnorm.BatchNorm2d = prim::GetAttr[name=\"bn1\"](%self)\r\n  %16 : Function = prim::Constant[name=\"batch_norm\"]()\r\n  %17 : float = prim::Constant[value=1.0000000000000001e-05]() # /opt/conda/lib/python3.7/site-packages/torch/nn/modules/batchnorm.py:106:40\r\n  %18 : bool = prim::Constant[value=0]() # /opt/conda/lib/python3.7/site-packages/torch/nn/modules/batchnorm.py:94:11\r\n  %19 : bool = prim::Constant[value=1]() # /opt/conda/lib/python3.7/site-packages/torch/nn/modules/batchnorm.py:94:29\r\n  %exponential_average_factor.126 : float = prim::Constant[value=0.10000000000000001]() # /opt/conda/lib/python3.7/site-packages/torch/nn/modules/batchnorm.py:92:41\r\nERROR: [TRTorch Conversion Context] - %791 : Tensor = aten::_convolution(%x.1, %self.conv1.weight, %self.conv1.bias, %10, %9, %8, %788, %789, %12, %788, %788, %790): kernel weights has count 9408 but 441 was expected\r\nERROR: [TRTorch Conversion Context] - %791 : Tensor = aten::_convolution(%x.1, %self.conv1.weight, %self.conv1.bias, %10, %9, %8, %788, %789, %12, %788, %788, %790): count of 9408 weights in kernel, but kernel dimensions (7,7) with 3 input channels, 3 output channels and 1 groups were specified. Expected Weights count is 3 * 7*7 * 3 / 1 = 441\r\nERROR: [TRTorch Conversion Context] - %791 : Tensor = aten::_convolution(%x.1, %self.conv1.weight, %self.conv1.bias, %10, %9, %8, %788, %789, %12, %788, %788, %790): kernel weights has coun\r\nt 9408 but 441 was expected\r\nERROR: [TRTorch Conversion Context] - %791 : Tensor = aten::_convolution(%x.1, %self.conv1.weight, %self.conv1.bias, %10, %9, %8, %788, %789, %12, %788, %788, %790): count of 9408 weights i\r\nn kernel, but kernel dimensions (7,7) with 3 input channels, 3 output channels and 1 groups were specified. Expected Weights count is 3 * 7*7 * 3 / 1 = 441\r\nERROR: [TRTorch Conversion Context] - %791 : Tensor = aten::_convolution(%x.1, %self.conv1.weight, %self.conv1.bias, %10, %9, %8, %788, %789, %12, %788, %788, %790): kernel weights has coun\r\nt 9408 but 441 was expected\r\nERROR: [TRTorch Conversion Context] - %791 : Tensor = aten::_convolution(%x.1, %se",
    "url": "https://github.com/pytorch/TensorRT/issues/84",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-06-05T21:23:22Z",
    "updated_at": "2020-07-03T20:04:26Z",
    "user": "esghif"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 39573,
    "title": "What is the difference between 0.4.1 and 0.4.1.post2?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/39573",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-05T10:52:13Z",
    "updated_at": "2020-06-06T00:22:18Z",
    "user": "Lucksong"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 39561,
    "title": "How to replace the original model's classes with new class",
    "body": "## \ud83d\ude80 Feature\r\n<!-- A clear and concise description of the feature proposal -->\r\n\r\n## Motivation\r\n\r\n<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->\r\n\r\n## Pitch\r\n\r\n<!-- A clear and concise description of what you want to happen. -->\r\n\r\n## Alternatives\r\n\r\n<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context or screenshots about the feature request here. -->\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/39561",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-05T04:59:14Z",
    "updated_at": "2020-06-06T00:14:52Z",
    "user": "Aiswariyasugavanam"
  },
  {
    "repo": "pytorch/vision",
    "number": 2286,
    "title": "Architecture differences in Zoo Models ?",
    "body": "Hi, I am comparing few zoo models implementation in DL4J with Pytorch zoo models and found\r\nthat the padding in Convolution layers does not match most of time ?\r\n\r\nFor **Resnet50 and SqueezeNet** :\r\n\r\nIn DL4J, they **do not** apply padding : [0, 0] ; while in PyTorch they have padding [1, 1].\r\nThis results in different output in layers\r\n\r\nIn DL4J, they apply **Bias** in Conv layers while in PyTorch, they do not.\r\n\r\nWhy such irregularities in Network structure across frameworks ?\r\n",
    "url": "https://github.com/pytorch/vision/issues/2286",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: classification"
    ],
    "created_at": "2020-06-04T06:22:57Z",
    "updated_at": "2020-06-05T09:19:08Z",
    "user": "nitin2212"
  },
  {
    "repo": "pytorch/text",
    "number": 806,
    "title": "torchtext and training of a Transformer",
    "body": "Hello\r\n\r\nI am a bit confused about training my pytorch Transformer.\r\nI am using the code below to pre-process the Penn Treebank corpus before I analyze it with my (non pre-trained) Transformer:\r\n\r\n```python\r\n# define the English text field\r\nTEXT_ch2 = Field(init_token = '<sos>',\r\n                 eos_token = '<eos>',\r\n                 unk_token = '<unk>',\r\n                 pad_token = '<pad>',\r\n                 fix_length = bptt,\r\n                 lower = True)\r\n\r\n# split the PennTreeBank corpus into a train, val, and test set.\r\ntrain_penn, val_penn, test_penn = torchtext.datasets.PennTreebank.splits(TEXT_ch2)\r\n\r\n# build vocabulary based on the field that we just definTVD.\r\n# (building vocabulary over all language datasets)\r\nTEXT_ch2.build_vocab(train_penn, val_penn, test_penn,\r\n                     specials=['<sos>','<eos>','<unk>','<pad>'])\r\n\r\n# BPTTIterator\r\ntrain_penn_iter, val_penn_iter, test_penn_iter = BPTTIterator.splits(\r\n            (train_penn, val_penn, test_penn),\r\n            batch_size = batch_size,\r\n            bptt_len= bptt,\r\n            sort_key=lambda x: len(x.text),\r\n            sort_within_batch = True,\r\n            shuffle = False,\r\n            device= device,\r\n            repeat=False)\r\n```\r\n\r\nMy question is, since my Penn Treebank corpus are separated into train, validation, and test sets, when I train my Transformer on the Penn Treebank corpus, I would only be training the model on the Penn Treebank train and validation sets (`train_penn_iter`), am I right?\r\n\r\nBut then if I train my Transformer only on the train and validation portions of the corpus, wouldn't this mean that my Transformer will not be trained to properly handle those tokens that are contained only in the test set? so does this mean that I need to train my Transformer on the entire Penn Treebank corpus, instead of just on the training  and validation sets? But if this is the case, what then is the point of having the `split` function to separate the corpus into training, validation, and test sets? To me, this contradicts how the test sets are normally used in machine learning.\r\n\r\nDoes it make sense to \"test\" a Transformer on the sequences that contain the tokens which it was not trained on?\r\n\r\nThank you,",
    "url": "https://github.com/pytorch/text/issues/806",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-06-04T02:22:17Z",
    "updated_at": "2020-06-04T14:14:12Z",
    "user": "h56cho"
  },
  {
    "repo": "pytorch/vision",
    "number": 2285,
    "title": "Finetuning deeplab/FCN",
    "body": "How do I fine tune deeplabv3 ? ",
    "url": "https://github.com/pytorch/vision/issues/2285",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: semantic segmentation"
    ],
    "created_at": "2020-06-03T20:53:38Z",
    "updated_at": "2020-06-05T09:16:56Z",
    "user": "gaussiangit"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 1010,
    "title": "Tutorial on custom dataloaders (NOT datasets)",
    "body": "I really like [this](https://pytorch.org/tutorials/beginner/data_loading_tutorial.html#iterating-through-the-dataset) tutorial on custom datasets. However, the `torch.utils.data.DataLoader` class is only briefly mentioned in it:\r\n\r\n>However, we are losing a lot of features by using a simple for loop to iterate over the data. In particular, we are missing out on:\r\n\r\n> * Batching the data\r\n> * Shuffling the data\r\n> * Load the data in parallel using multiprocessing workers.\r\n\r\n> `torch.utils.data.DataLoader` is an iterator which provides all these features. Parameters used below should be clear. One parameter of interest is collate_fn . You can specify how exactly the samples need to be batched using collate_fn . However, default collate should work fine for most use cases.\r\n\r\nI am aware of this [issue](https://github.com/pytorch/tutorials/issues/78) and this [issue](https://github.com/pytorch/tutorials/issues/735) but neither have led to a tutorial.\r\n\r\nI am happy to make a tutorial on custom dataloaders using the `torch.utils.data.DataLoader` class, focusing on how to interface with its parameters, especially the `num_workers` and `collate_fn` parameters. Also, I am not sure if it is possible to inherit from the `torch.utils.data.DataLoader` class, similar to the `torch.utils.data.Dataset`, so I would appreciate some guidance on this.\r\n\r\nThis would be my first ever tutorial, so some guidance on formatting would be greatly helpful.\n\ncc @suraj813 @sekyondaMeta @svekars @carljparker @NicolasHug @kit1980 @subramen",
    "url": "https://github.com/pytorch/tutorials/issues/1010",
    "state": "open",
    "labels": [
      "enhancement",
      "60_min_blitz",
      "advanced",
      "docathon-h2-2023"
    ],
    "created_at": "2020-06-03T13:18:03Z",
    "updated_at": "2025-05-20T10:14:47Z",
    "comments": 11,
    "user": "mhdadk"
  },
  {
    "repo": "pytorch/examples",
    "number": 784,
    "title": "Difference between src_mask and src_key_padding_mask",
    "body": "I am having a difficult time in understanding transformers. Everything is getting clear bit by bit but one thing that makes my head scratch is what is the difference between src_mask and src_key_padding_mask which is passed as an argument in forward function in both encoder layer and decoder layer.\r\n\r\nhttps://pytorch.org/docs/master/_modules/torch/nn/modules/transformer.html#Transformer",
    "url": "https://github.com/pytorch/examples/issues/784",
    "state": "open",
    "labels": [
      "nlp"
    ],
    "created_at": "2020-06-03T10:53:19Z",
    "updated_at": "2022-03-09T21:39:01Z",
    "comments": 0,
    "user": "saahiluppal"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 79,
    "title": "Does TRTorch support bail-out mechanism?",
    "body": "A neural network model may have some operators which aren't supported by TensorRT.\r\nWhen TensorRT cannot compile a subgraph, can the execution of the subgraph invoke torch operators again? Can a model execution mix TensorRT and vanilla torch operators?",
    "url": "https://github.com/pytorch/TensorRT/issues/79",
    "state": "closed",
    "labels": [
      "question",
      "component: execution",
      "No Activity"
    ],
    "created_at": "2020-06-03T10:21:27Z",
    "updated_at": "2020-07-10T00:03:57Z",
    "user": "shiwenloong"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 39427,
    "title": "How to save tensor to 16-bit image?",
    "body": "So, I have a Tensor, which represents my 16-bit 3-channel image and I wanna save it. How could I do this? I was trying \r\n\r\n```\r\ntorchvision.utils.save_image(gt[j], f\"hdr_{j+1}.tiff\")\r\n```\r\nBut seems like it works only for 8-bit images... Could someone help me to save my tensor to 16-bit 3-channel image(any format would be good. I think .tiff is fine)?",
    "url": "https://github.com/pytorch/pytorch/issues/39427",
    "state": "closed",
    "labels": [],
    "created_at": "2020-06-03T02:54:45Z",
    "updated_at": "2020-06-03T15:16:12Z",
    "user": "wh75er"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 78,
    "title": "Support Tuple Inputs",
    "body": "Hello. I am working with  a model that takes in a tuple of inputs of different sizes. Is there a way to handle this within the existing TRTorch framework? I am attempting to compile the model with the following settings but get the accompanied error. I am running form source version on commit 247c748.\r\n\r\nCompile settings:\r\n```\r\ncompile_settings = {\r\n    \"input_shapes\": [\r\n        {\r\n            \"min\": ([1, 3, 180, 320], [1,49,2]),\r\n            \"opt\": ([1, 3, 180, 320], [1,49,2]),\r\n            \"max\": ([1, 3, 180, 320], [1,49,2])\r\n        }, # For static size [1, 3, 224, 224]\r\n    ],\r\n#     \"op_precision\": torch.half # Run with FP16\r\n}\r\n```\r\n\r\nError:\r\n```\r\nTypeError: (): incompatible function arguments. The following argument types are supported:\r\n    1. (self: trtorch._C.InputRange, arg0: List[int]) -> None\r\n\r\nInvoked with: <trtorch._C.InputRange object at 0x7fda486f67b0>, ([1, 3, 180, 320], [1, 49, 2])\r\n```\r\n\r\n\r\nThe forward function of my model is the following:\r\n```\r\n    def forward(self,x,seq):\r\n        \r\n        x = self.input_conv(x)\r\n        x = self.input_fc(x).unsqueeze(0)\r\n        \r\n        actions = self.action_fc(seq)\r\n        x, hidden = self.lstm(actions, (x, x))\r\n        \r\n        output = self.output_fc(x)\r\n        \r\n        return output\r\n```\r\n\r\nThanks",
    "url": "https://github.com/pytorch/TensorRT/issues/78",
    "state": "closed",
    "labels": [
      "question",
      "component: api [Python]",
      "No Activity"
    ],
    "created_at": "2020-06-01T19:35:26Z",
    "updated_at": "2020-07-05T00:06:46Z",
    "user": "Michael-Equi"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 256,
    "title": "Can't locate CorScorer.pm",
    "body": "Dear guys,\r\n\r\nThank you for your interesting works. I'm training the model for new language (Dutch) using the SoNars corpus. Due to the fact that SoNars was in MMAX, I used the modification of this script (https://github.com/andreasvc/dutchcoref/blob/master/mmaxconll.py) to convert it to CONLL format.\r\n\r\nAfter that, I trained a word2vec model (to prepare the static_word_embeddings files), I still have no clue what tuned_word_embeddings are, but I just use exactly the same static_word_embeddings files and it seemed to worked. I modified the load_function and other related functions as stated in the tutorial for training new language. Everything went well until the training, I got this error:\r\n\r\n`Error during the scoring\r\nCommand '['perl', 'c:\\\\users\\\\administrator\\\\desktop\\\\neural_coref\\\\neuralcoref\\\\neuralcoref\\\\train\\\\scorer_wrapper.pl', 'muc', 'c:\\\\users\\\\administrator\\\\desktop\\\\neural_coref\\\\neuralcoref\\\\neuralcoref\\\\train/data//key.txt', 'c:\\\\users\\\\administrator\\\\desktop\\\\neural_coref\\\\neuralcoref\\\\neuralcoref\\\\train\\\\test_mentions.txt']' returned non-zero exit status 2.\r\nCan't locate CorScorer.pm in @INC (you may need to install the CorScorer module) (@INC contains: scorer/lib /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at c:\\users\\administrator\\desktop\\neural_coref\\neuralcoref\\neuralcoref\\train\\scorer_wrapper.pl line 16.\r\nBEGIN failed--compilation aborted at c:\\users\\administrator\\desktop\\neural_coref\\neuralcoref\\neuralcoref\\train\\scorer_wrapper.pl line 16.`\r\n\r\nI could not find any information about the CorScorer.pm on anywhere on the internet. Can someone please help me to fix this? Am I doing anything wrong?",
    "url": "https://github.com/huggingface/neuralcoref/issues/256",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-05-31T10:33:59Z",
    "updated_at": "2021-11-02T14:06:49Z",
    "user": "SysDevHayes"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 38976,
    "title": "How to load the trained weights in libtorch to continue the training?",
    "body": "How to load the trained weights in libtorch to continue the training?I can't find an example.\r\nlibtorch 1.5\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/38976",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-25T08:39:26Z",
    "updated_at": "2020-05-26T18:52:27Z",
    "user": "williamlzw"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 38965,
    "title": "what is the difference of 'torch.onnx._export()' and 'torch.onnx.export()'?",
    "body": "## \u2753 Questions and Help\r\nSorry, I can not understand.\r\nWhen the inputs are same, their output files(onnx file) are difference .\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/38965",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-24T15:12:42Z",
    "updated_at": "2024-05-16T06:29:50Z",
    "user": "cs-xiao"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 68,
    "title": "TRTorch with CUDA 10.0",
    "body": "Hi, \r\n\r\nI tried installing TRTorch on my Ubuntu 16.04, PyTorch 1.5 compiled from source, CUDA 10.0, CUDNN 7.6.\r\n\r\nI am getting a symbol error in all configurations I tried. I am grateful for any help.\r\n\r\n`seh2bp@trtorch:/workspace$ python -c \"import torch; import trtorch\"\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"/opt/conda/lib/python3.7/site-packages/torch/__init__.py\", line 165, in <module>\r\n    from torch._C import *\r\nImportError: /opt/conda/lib/python3.7/site-packages/torch/lib/libshm.so: undefined symbol: _Z8_THErrorPKciS0_z`\r\n\r\nldd output is here:\r\n\r\n`seh2bp@trtorch:/workspace$ ldd /opt/conda/lib/python3.7/site-packages/trtorch/lib/libtrtorch.so\r\n        linux-vdso.so.1 (0x00007ffdff3c7000)\r\n        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f338cc4d000)\r\n        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f338c8af000)\r\n        libnvinfer.so.7 => /opt/tensorrt/TensorRT-7.0.0.11/lib/libnvinfer.so.7 (0x00007f337ec34000)\r\n        libcublas.so.10.0 => /usr/local/cuda-10.0/targets/x86_64-linux/lib/libcublas.so.10.0 (0x00007f337a69e000)\r\n        libcudnn.so.7 => /usr/lib/x86_64-linux-gnu/libcudnn.so.7 (0x00007f3362e8d000)\r\n        libtorch.so => /workspace/scer-docker/trtorch/files/libtorch/lib/libtorch.so (0x00007f3362c8b000)\r\n        libtorch_cuda.so => /workspace/scer-docker/trtorch/files/libtorch/lib/libtorch_cuda.so (0x00007f33211cc000)\r\n        libtorch_cpu.so => /workspace/scer-docker/trtorch/files/libtorch/lib/libtorch_cpu.so (0x00007f3311fae000)\r\n        libtorch_global_deps.so => /workspace/scer-docker/trtorch/files/libtorch/lib/libtorch_global_deps.so (0x00007f3311da9000)\r\n        libc10_cuda.so => /workspace/scer-docker/trtorch/files/libtorch/lib/libc10_cuda.so (0x00007f3311b73000)\r\n        libc10.so => /workspace/scer-docker/trtorch/files/libtorch/lib/libc10.so (0x00007f3311923000)\r\n        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f331170b000)\r\n        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f331131a000)\r\n        /lib64/ld-linux-x86-64.so.2 (0x00007f338cfd6000)\r\n        libcudart.so.10.0 => /usr/local/cuda-10.0/targets/x86_64-linux/lib/libcudart.so.10.0 (0x00007f33110a0000)\r\n        libmyelin.so.1 => /opt/tensorrt/TensorRT-7.0.0.11/lib/libmyelin.so.1 (0x00007f331088f000)\r\n        libnvrtc.so.10.0 => /usr/local/cuda-10.0/targets/x86_64-linux/lib/libnvrtc.so.10.0 (0x00007f330f273000)\r\n        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f330f06f000)\r\n        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f330ee50000)\r\n        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f330ec48000)\r\n        libcudart-80664282.so.10.2 => /workspace/scer-docker/trtorch/files/libtorch/lib/libcudart-80664282.so.10.2 (0x00007f330e9c7000)\r\n        libnvToolsExt-3965bdd0.so.1 => /workspace/scer-docker/trtorch/files/libtorch/lib/libnvToolsExt-3965bdd0.so.1 (0x00007f330e7bd000)\r\n        libgomp-75eea7e8.so.1 => /workspace/scer-docker/trtorch/files/libtorch/lib/libgomp-75eea7e8.so.1 (0x00007f330e598000)`\r\n\r\nI tried different configurations:\r\n\r\n- use the downloaded libtorch built for cuda 10.2, I get the same error as above\r\n- use the installed libtorch (for a reason I don't understand I have 2 versions on in \r\n`.../site-packages/torch` and one in `.../site-packages/torch-1.5.0-py3.7-linux-x86_64.egg/torch`. Build with `.../site-packages/torch` fails because it is missing optimizer.h. I will not give further detail as I believe it will just complicate the issue unnecessarily. Any help is welcome.",
    "url": "https://github.com/pytorch/TensorRT/issues/68",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-05-23T08:48:38Z",
    "updated_at": "2020-06-05T21:16:24Z",
    "user": "esghif"
  },
  {
    "repo": "pytorch/vision",
    "number": 2254,
    "title": "Using `vision.references`",
    "body": "Hi,\r\n\r\nI was wondering if there was a way by which I can use the modules inside `vision.references`, especially `vision.references.detection.engine`'s `train_one_epoch` method. At the moment, I am unable to import and use it rather would have to copy-paste or download. Could this be simplified into an import? (by adding an `__init__.py`) ? Or, perhaps there is a way to do this more elegantly and I'm unaware? \r\n\r\nThanks and Regards,",
    "url": "https://github.com/pytorch/vision/issues/2254",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts"
    ],
    "created_at": "2020-05-23T06:19:33Z",
    "updated_at": "2020-05-29T10:32:56Z",
    "user": "Sentient07"
  },
  {
    "repo": "pytorch/examples",
    "number": 778,
    "title": "Runtime error when trying to run dcgan.cpp example",
    "body": "I am new to libtorch and I was completing the featured example to learn Pytoch C++ frontend.\r\nI downloaded the cmake and dcgan.cpp files from git and was able to cmake it on a cluster using the clang-llvm/11 compilers. I am using libtorch files downloaded from https://download.pytorch.org/libtorch/nightly/cu100/libtorch-cxx11-abi-shared-with-deps-latest.zip\r\nI am using cuda 10.2.89 and pytorch v1.5.0-gpu.\r\nWhen I try running the executable, I get the following error\r\n`./dcgan: symbol lookup error: ./dcgan: undefined symbol: _ZN5torch5optim6detail13OptimizerBase15add_param_groupERKNS0_19OptimizerParamGroupE\r\n`\r\nIt appears that the following lines are responsible for this error:\r\n`   torch::optim::Adam generator_optimizer(generator->parameters(), torch::optim::AdamOptions(2e-4).betas(std::make_tuple (0.5, 0.5)));\r\ntorch::optim::Adam discriminator_optimizer(discriminator->parameters(), torch::optim::AdamOptions(2e-4).betas(std::make_tuple (0.5, 0.5)));`\r\n\r\nIs there anyone who has previously encountered this error? May I please request your help regarding the same?\r\nThank you",
    "url": "https://github.com/pytorch/examples/issues/778",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-23T02:17:54Z",
    "updated_at": "2020-05-23T02:51:29Z",
    "comments": 0,
    "user": "namehta4"
  },
  {
    "repo": "pytorch/vision",
    "number": 2250,
    "title": "cuda10.0 support for torchvision6",
    "body": "I try to install torchvision6-cu100 with pip but failed, I can only find  the cu92 and cu101 version,  is there no support for cuda10.0 ?",
    "url": "https://github.com/pytorch/vision/issues/2250",
    "state": "closed",
    "labels": [
      "question",
      "topic: binaries"
    ],
    "created_at": "2020-05-21T17:13:19Z",
    "updated_at": "2020-05-21T18:20:42Z",
    "user": "feihuidiqiu"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 62,
    "title": "How to use local pytorch instead of installing again.",
    "body": "Hi Naren,\r\nglad to see that you check-in py binding and test. \r\nTRTorch needs to install pytorch and torchvision again and I know it is easy to build trt from scratch.\r\nBut as a developer, I always build and set pytorch env locally and do need to install it again. Could you help provide options to call local pytorch instead of installing again. @narendasan \r\n\r\nThanks,\r\nAlan",
    "url": "https://github.com/pytorch/TensorRT/issues/62",
    "state": "closed",
    "labels": [
      "question",
      "component: build system",
      "component: api [Python]",
      "No Activity"
    ],
    "created_at": "2020-05-19T09:52:44Z",
    "updated_at": "2020-06-27T00:03:18Z",
    "user": "alanzhai219"
  },
  {
    "repo": "pytorch/vision",
    "number": 2237,
    "title": "fresh installation of pytorch 1.5 and torchvision .6 yields error with docs ",
    "body": "## \ud83d\udc1b Bug\r\n\r\nusing the latest installations from the pytorch recommended conda line, along with the following required libraries\r\n\r\n```\r\ncython\r\npycocotools\r\nmatplotlib\r\n```\r\n\r\nI was able to hit an error in the line given under https://github.com/pytorch/vision/blob/master/references/detection/README.md\r\nfor performing Faster R CNN\r\n\r\nI would also wonder if I can improve the docs by mentioning the fact that, in order to run that example you must pip install cython, pycocotools, and matplotlib ?\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. copy the `references/detection/` folder somewhere\r\n2. create a conda environment and install latest stable pytorch and torchvision\r\n3. attempt to run the `README.md` provided command\r\n\r\n```\r\n(clone_reference_torchvision) emcp@2600k:~/Dev/git/clone_reference_torchvision$ python -m torch.distributed.launch --nproc_per_node=8 --use_env train.py --dataset coco --model fasterrcnn_resnet50_fpn --epochs 26 --lr-steps 16 22 --aspect-ratio-group-factor 3\r\n*****************************************\r\nSetting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed. \r\n*****************************************\r\nTHCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1587428207430/work/torch/csrc/cuda/Module.cpp line=59 error=101 : invalid device ordinal\r\nTHCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1587428207430/work/torch/csrc/cuda/Module.cpp line=59 error=101 : invalid device ordinal\r\n| distributed init (rank 0): env://\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 201, in <module>\r\n    main(args)\r\n  File \"train.py\", line 60, in main\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 201, in <module>\r\n        main(args)\r\n  File \"train.py\", line 60, in main\r\n    utils.init_distributed_mode(args)\r\n  File \"/home/emcp/Dev/git/clone_reference_torchvision/utils.py\", line 317, in init_distributed_mode\r\nutils.init_distributed_mode(args)\r\n    torch.cuda.set_device(args.gpu)\r\n  File \"/home/emcp/anaconda3/envs/clone_reference_torchvision/lib/python3.8/site-packages/torch/cuda/__init__.py\", line 245, in set_device\r\n  File \"/home/emcp/Dev/git/clone_reference_torchvision/utils.py\", line 317, in init_distributed_mode\r\n    torch._C._cuda_setDevice(device)\r\n    torch.cuda.set_device(args.gpu)\r\n  File \"/home/emcp/anaconda3/envs/clone_reference_torchvision/lib/python3.8/site-packages/torch/cuda/__init__.py\", line 245, in set_device\r\nRuntimeError    torch._C._cuda_setDevice(device)\r\nRuntimeError: cuda runtime error (101) : invalid device ordinal at /opt/conda/conda-bld/pytorch_1587428207430/work/torch/csrc/cuda/Module.cpp:59\r\n: cuda runtime error (101) : invalid device ordinal at /opt/conda/conda-bld/pytorch_1587428207430/work/torch/csrc/cuda/Module.cpp:59\r\nTHCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1587428207430/work/torch/csrc/cuda/Module.cpp line=59 error=101 : invalid device ordinal\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 201, in <module>\r\n    main(args)\r\n  File \"train.py\", line 60, in main\r\n    utils.init_distributed_mode(args)\r\n  File \"/home/emcp/Dev/git/clone_reference_torchvision/utils.py\", line 317, in init_distributed_mode\r\n    torch.cuda.set_device(args.gpu)\r\n  File \"/home/emcp/anaconda3/envs/clone_reference_torchvision/lib/python3.8/site-packages/torch/cuda/__init__.py\", line 245, in set_device\r\n    torch._C._cuda_setDevice(device)\r\nRuntimeError: cuda runtime error (101) : invalid device ordinal at /opt/conda/conda-bld/pytorch_1587428207430/work/torch/csrc/cuda/Module.cpp:59\r\nTHCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1587428207430/work/torch/csrc/cuda/Module.cpp line=59 error=101 : invalid device ordinal\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 201, in <module>\r\n    main(args)\r\n  File \"train.py\", line 60, in main\r\n    utils.init_distributed_mode(args)\r\n  File \"/home/emcp/Dev/git/clone_reference_torchvision/utils.py\", line 317, in init_distributed_mode\r\n    torch.cuda.set_device(args.gpu)\r\n  File \"/home/emcp/anaconda3/envs/clone_reference_torchvision/lib/python3.8/site-packages/torch/cuda/__init__.py\", line 245, in set_device\r\n    torch._C._cuda_setDevice(device)\r\nRuntimeError: cuda runtime error (101) : invalid device ordinal at /opt/conda/conda-bld/pytorch_1587428207430/work/torch/csrc/cuda/Module.cpp:59\r\nTHCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1587428207430/work/torch/csrc/cuda/Module.cpp line=59 error=101 : invalid device ordinal\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 201, in <module>\r\n    main(args)\r\n  File \"train.py\", line 60, in main\r\n    utils.init_distributed_mode(args)\r\n  File \"/home/emcp/Dev/git/clone_reference_torchvision/utils.py\", line 317, in init_distributed_mode\r\n    torch.cuda.set_device(args.gpu)\r\n  File \"/home/emcp/anaconda3/envs/clone_reference_torchvision/lib/python3.8/site-packages/torch/cuda/__init__",
    "url": "https://github.com/pytorch/vision/issues/2237",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: object detection"
    ],
    "created_at": "2020-05-19T07:15:13Z",
    "updated_at": "2020-05-20T10:32:24Z",
    "user": "EMCP"
  },
  {
    "repo": "pytorch/serve",
    "number": 363,
    "title": "Best practice question - how to chain multiple models together for pipeline process?",
    "body": "Hi all - I couldn't find anything in the documentation so wondering if there is a recommendation for how to chain multiple models together in an internal pipeline?\r\nExample - we need to take an incoming image, do obj detection , then do a seperate mdoel classification from items cropped and zoomed, return the result...i.e.:\r\n\r\n1 - Model A -  Run obj detector on incoming image\r\n1a - post process to determine cropped subset of image where object is  (inside model handler)\r\n\r\n2 - Model B - run inference on subset image from step 1a to classify the detected item\r\n3 - return final result\r\n\r\nIs our only option to force the client to do two calls to the /serve and effectively remote control this pipeline?  \r\nIdeally we want to pass in the large image, and just return the final result all from one client http POST call since its  expensive in our setup to pass/ do multiple remote calls  (i.e. post to model 1, post to model 2). \r\nBut where would one control this two step process from within torch server or is there any built in 'controller' concept?  \r\nIt seems the current design model is based around hosting independent models each doing their own work without any reference to how to internally bind them together into a pipeline. \r\nCould you provide any recommendations for how to best structure a pipeline like the above or is it not supported/possible/recommended?\r\nThanks very much!\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/serve/issues/363",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-19T05:16:35Z",
    "updated_at": "2020-05-19T19:37:08Z",
    "user": "lessw2020"
  },
  {
    "repo": "pytorch/xla",
    "number": 2092,
    "title": "How to set XLA random seed",
    "body": "## \u2753 Questions and Help\r\n\r\nOn CPU (same from run to run):\r\n```python\r\ntorch.manual_seed(0)\r\ntorch.zeros(5).uniform_()\r\n# tensor([0.4963, 0.7682, 0.0885, 0.1320, 0.3074])\r\n\r\ntorch.manual_seed(0)\r\ntorch.zeros(5).uniform_()\r\n# tensor([0.4963, 0.7682, 0.0885, 0.1320, 0.3074])\r\n```\r\n\r\nOn XLA (different from run to run):\r\n```python\r\ntorch.manual_seed(0)\r\ntorch.zeros(5, device=xm.xla_device()).uniform_()\r\n# tensor([0.9650, 0.4818, 0.2164, 0.2308, 0.8543], device='xla:1')\r\n\r\ntorch.manual_seed(0)\r\ntorch.zeros(5, device=xm.xla_device()).uniform_()\r\n# tensor([0.3197, 0.6271, 0.0868, 0.2445, 0.3315], device='xla:1')\r\n```",
    "url": "https://github.com/pytorch/xla/issues/2092",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-18T19:13:07Z",
    "updated_at": "2020-05-18T19:21:22Z",
    "user": "myleott"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 998,
    "title": "Per-tutorial dependencies/build",
    "body": "Current documented instructions say how to build tutorials tell you how to install dependencies and the build ALL of the tutorials at once. If you want to work on a single tutorial, this is not great, since many of the tutorials are quite involved (in terms of the dependencies they need, what external resources they need, and also how long they take to download). There should be clearer instructions about how to develop a single tutorial at a time.",
    "url": "https://github.com/pytorch/tutorials/issues/998",
    "state": "open",
    "labels": [
      "build issue"
    ],
    "created_at": "2020-05-15T14:16:25Z",
    "updated_at": "2021-07-27T23:25:51Z",
    "comments": 1,
    "user": "ezyang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 38542,
    "title": "How to use torch::where?",
    "body": "libtorch 1.5\r\nHow to use torch::where?  for emample:\r\n-------------------------------------------------\r\nimport torch\r\nimport numpy as np\r\ncc=np.array(range(0,24)).reshape(-1,4)\r\nvalidIndex=np.where( ((cc[:,:2]>=0) & (cc[:,2:]>(1,2))).all(axis=1) )[0]\r\nprint(validIndex)\r\n>>[0 1 2 3 4 5]\r\n---------------------------------------------------\r\ntorch::Tensor cc = torch::range(0, 23, 1).view({ 4,6 }).view({-1,4});\r\n\ttorch::Tensor c = cc.index({ torch::indexing::Slice(),torch::indexing::Slice(2,torch::indexing::None) });\r\n?????\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/38542",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-15T07:09:05Z",
    "updated_at": "2020-05-15T21:48:30Z",
    "user": "williamlzw"
  },
  {
    "repo": "pytorch/serve",
    "number": 343,
    "title": "Docker: How to add your .mar files?",
    "body": "Dear all,\r\n\r\nCould you please update the doc showing how to use your `.mar` files and `model-store` dir with docker? Assuming I have a stored `.mar` and `model-store` dir locally on my pc and I want to run `torchserve` on docker with them, what should I do? Is there an option to add the `mar` file? The docker page of `torchserve` doesn't contain information.\r\n\r\nThank you.\r\n\r\nBe safe and best regards,\r\n\r\nFrancesco Saverio",
    "url": "https://github.com/pytorch/serve/issues/343",
    "state": "closed",
    "labels": [
      "documentation",
      "duplicate",
      "triaged_wait"
    ],
    "created_at": "2020-05-13T14:37:23Z",
    "updated_at": "2020-06-09T23:39:52Z",
    "user": "FrancescoSaverioZuppichini"
  },
  {
    "repo": "pytorch/examples",
    "number": 770,
    "title": "Building cpp example with libtorch fails with LibTorch downloaded from the website",
    "body": "I have tried to build some of the examples and the codes which have been tested before. But When updated the libtorch version I keep getting the following error. I downloaded the libtorch from website. \r\n\r\nUbuntu 18.04\r\nc++14\r\nmake 10.0\r\n\r\nOne of the tested Example: [https://github.com/dendisuhubdy/libtorch_examples.git](url)\r\nlog file :\r\n`-- The C compiler identification is GNU 7.5.0\r\n-- The CXX compiler identification is GNU 7.5.0\r\n-- Check for working C compiler: /usr/bin/cc\r\n-- Check for working C compiler: /usr/bin/cc -- works\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Detecting C compile features\r\n-- Detecting C compile features - done\r\n-- Check for working CXX compiler: /usr/bin/c++\r\n-- Check for working CXX compiler: /usr/bin/c++ -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- Detecting CXX compile features\r\n-- Detecting CXX compile features - done\r\n-- Looking for pthread.h\r\n-- Looking for pthread.h - found\r\n-- Looking for pthread_create\r\n-- Looking for pthread_create - not found\r\n-- Looking for pthread_create in pthreads\r\n-- Looking for pthread_create in pthreads - not found\r\n-- Looking for pthread_create in pthread\r\n-- Looking for pthread_create in pthread - found\r\n-- Found Threads: TRUE  \r\n-- Found CUDA: /usr/local/cuda-10.2 (found version \"10.2\") \r\n-- Caffe2: CUDA detected: 10.2\r\n-- Caffe2: CUDA nvcc is: /usr/local/cuda-10.2/bin/nvcc\r\n-- Caffe2: CUDA toolkit directory: /usr/local/cuda-10.2\r\n-- Caffe2: Header version is: 10.2\r\n-- Found CUDNN: /usr/lib/x86_64-linux-gnu/libcudnn.so  \r\n-- Found cuDNN: v7.6.5  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so)\r\n-- Autodetected CUDA architecture(s):  5.2\r\n-- Added CUDA NVCC flags for: -gencode;arch=compute_52,code=sm_52\r\n-- Found Torch: /home/ubuntu/libtorch/libtorch/lib/libtorch.so  \r\n-- Found OpenCV: /usr/local (found version \"3.4.9\") \r\n-- OpenCV library status:\r\n--     config: /usr/local/share/OpenCV\r\n--     version: 3.4.9\r\n--     libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_shape;opencv_stitching;opencv_superres;opencv_video;opencv_videoio;opencv_videostab\r\n--     include path: /usr/local/include;/usr/local/include/opencv\r\n-- Downloading MNIST dataset\r\n/home/ubuntu/libtorch_examples/build/../data/mnist/train-images-idx3-ubyte.gz already exists, skipping ...\r\n/home/ubuntu/libtorch_examples/build/../data/mnist/train-images-idx3-ubyte already exists, skipping ... \r\n/home/ubuntu/libtorch_examples/build/../data/mnist/train-labels-idx1-ubyte.gz already exists, skipping ...\r\n/home/ubuntu/libtorch_examples/build/../data/mnist/train-labels-idx1-ubyte already exists, skipping ... \r\n/home/ubuntu/libtorch_examples/build/../data/mnist/t10k-images-idx3-ubyte.gz already exists, skipping ...\r\n/home/ubuntu/libtorch_examples/build/../data/mnist/t10k-images-idx3-ubyte already exists, skipping ... \r\n/home/ubuntu/libtorch_examples/build/../data/mnist/t10k-labels-idx1-ubyte.gz already exists, skipping ...\r\n/home/ubuntu/libtorch_examples/build/../data/mnist/t10k-labels-idx1-ubyte already exists, skipping ... \r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: /home/ubuntu/libtorch_examples/build\r\nScanning dependencies of target mnist\r\n[ 14%] Building CXX object src/CMakeFiles/mnist.dir/mnist.cpp.o\r\nScanning dependencies of target dcgan\r\n[ 28%] Building CXX object src/CMakeFiles/dcgan.dir/dcgan.cpp.o\r\nScanning dependencies of target yolov3\r\n[ 42%] Building CXX object src/CMakeFiles/yolov3.dir/darknet.cpp.o\r\n[ 57%] Building CXX object src/CMakeFiles/yolov3.dir/yolov3.cpp.o\r\nIn file included from /home/ubuntu/libtorch_examples/src/mnist.cpp:8:0:\r\n/home/ubuntu/libtorch_examples/include/mnist.h:55:13: error: \u2018FeatureDropout\u2019 in namespace \u2018torch::nn\u2019 does not name a type\r\n  torch::nn::FeatureDropout conv2_drop;\r\n             ^~~~~~~~~~~~~~\r\n/home/ubuntu/libtorch_examples/include/mnist.h: In constructor \u2018Net::Net()\u2019:\r\n/home/ubuntu/libtorch_examples/include/mnist.h:37:33: error: \u2018conv2_drop\u2019 was not declared in this scope\r\n   register_module(\"conv2_drop\", conv2_drop);\r\n                                 ^~~~~~~~~~\r\n/home/ubuntu/libtorch_examples/include/mnist.h:37:33: note: suggested alternative: \u2018conv2\u2019\r\n   register_module(\"conv2_drop\", conv2_drop);\r\n                                 ^~~~~~~~~~\r\n                                 conv2\r\n/home/ubuntu/libtorch_examples/include/mnist.h: In member function \u2018at::Tensor Net::forward(at::Tensor)\u2019:\r\n/home/ubuntu/libtorch_examples/include/mnist.h:45:22: error: \u2018conv2_drop\u2019 was not declared in this scope\r\n    torch::max_pool2d(conv2_drop->forward(conv2->forward(x)), 2));\r\n                      ^~~~~~~~~~\r\n/home/ubuntu/libtorch_examples/include/mnist.h:45:22: note: suggested alternative: \u2018conv2\u2019\r\n    torch::max_pool2d(conv2_drop->forward(conv2->forward(x)), 2));\r\n                      ^~~~",
    "url": "https://github.com/pytorch/examples/issues/770",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-13T11:53:26Z",
    "updated_at": "2020-05-17T16:28:00Z",
    "comments": 1,
    "user": "Gfuse"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 995,
    "title": "data_loading_tutorial.py iterators",
    "body": "I like this tutorial but I think it would be better if it included an example of how to define __next__() and __iter__() methods so that the dataset can be used with `enumerate`.",
    "url": "https://github.com/pytorch/tutorials/issues/995",
    "state": "closed",
    "labels": [
      "data loading",
      "docathon-h1-2023",
      "medium"
    ],
    "created_at": "2020-05-12T21:55:37Z",
    "updated_at": "2023-06-02T15:45:12Z",
    "comments": 3,
    "user": "patricknaughton01"
  },
  {
    "repo": "pytorch/vision",
    "number": 2205,
    "title": "Some issues in conv_transpose2d. ",
    "body": "Recently I met this problem bothering me.\r\nIn TensorFlow, there is a funciton:\r\n`tf.nn.conv2d_transpose(\r\n    input, filters, output_shape, strides, padding='SAME', data_format='NHWC',\r\n    dilations=None, name=None\r\n)`\r\nBut in PyTorch:\r\n`torch.nn.functional.conv_transpose2d(input, weight, bias=None, stride=1, padding=0, output_padding=0, groups=1, dilation=1) \u2192 Tensor`\r\nAs you can see there is no parameter named output_shape. But my project need this parameter to recitify the size of output. Anyone can help me? Thanks~",
    "url": "https://github.com/pytorch/vision/issues/2205",
    "state": "closed",
    "labels": [
      "invalid",
      "question"
    ],
    "created_at": "2020-05-12T04:30:00Z",
    "updated_at": "2020-05-12T13:21:51Z",
    "user": "dhiyu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 38129,
    "title": "how to get the libtorch code from the python?",
    "body": "![image](https://user-images.githubusercontent.com/31852119/81431554-ea93db80-9193-11ea-96f4-d2f1df0982ce.png)\r\n\r\nin the python, it's easy to slice, but in the libtorch i don't find any information about it? so please tell me how to get the code from the above python code? thanks",
    "url": "https://github.com/pytorch/pytorch/issues/38129",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-08T17:26:41Z",
    "updated_at": "2020-05-08T17:52:13Z",
    "user": "Peterisfar"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 987,
    "title": "where is folder \"reference\"?",
    "body": "At toturial [https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html](https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html#putting-everything-together),\r\nin Putting Everything Together, a couple of files under folder `reference` is mentioned, yet this folder has never shown up before. I didn't find it in either `torch`(version 1.5.0) or `torchvision`(version 0.6.0) pakage in my anaconda environment.",
    "url": "https://github.com/pytorch/tutorials/issues/987",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-08T04:34:31Z",
    "updated_at": "2020-05-09T02:18:05Z",
    "user": "feiyangsuo"
  },
  {
    "repo": "pytorch/text",
    "number": 758,
    "title": "How to apply Torchtext  convenience classes to prepare data for a Transformer",
    "body": "Hello,\r\nReading the tutorial [Language Translation with torchText](https://pytorch.org/tutorials/beginner/torchtext_translation_tutorial.html) I wondered how someone could use those convenience classes (`Field, BucketIterator`) to train/fine-tune a `Transformer` such as those available at [Huggingface](https://github.com/huggingface/transformers).\r\n\r\nFor instance, I'm currently working with a large dataset distributed in jsonl files which looks like:\r\n```python\r\n{ \"query\": \"this is a query 1\", \"doc\": \"relevant document regarding query 1\" },\r\n{ \"query\": \"this is a query 2\", \"doc\": \"relevant document regarding query 2\" },\r\n               ...\r\n \r\n```\r\n\r\nNow, to forward this data into a transformer like Bert, it is necessary to convert this dataset into the format:\r\n\r\n```python3\r\n(\r\n#queries\r\n {\r\n    'input_ids': tensor([\r\n        [  101,  2023,  2003,  1037, 23032,  1015,   102,     0],\r\n        [  101,  2023,  2003,  1037, 23032,  1016,   102,     0]]), \r\n    'attention_mask': tensor([\r\n        [1, 1, 1, 1, 1, 1, 1, 0],\r\n        [1, 1, 1, 1, 1, 1, 1, 0]])\r\n }, \r\n\r\n #docs\r\n {\r\n    'input_ids': tensor([\r\n        [ 101, 2023, 2003, 2028, 7882, 6254, 4953,  102],\r\n        [ 101, 2023, 2003, 2028, 7882, 6254, 4953,  102]]), \r\n    'attention_mask': 'input_ids': tensor([\r\n        [1, 1, 1, 1, 1, 1, 1, 1],\r\n        [1, 1, 1, 1, 1, 1, 1, 1]])\r\n}\r\n```\r\nSo, what would be a clear and efficient approach to apply those convenience classes to tokenize a text dataset to fit it in the required format of a transformer?\r\n",
    "url": "https://github.com/pytorch/text/issues/758",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-06T23:47:51Z",
    "updated_at": "2020-05-07T13:54:37Z",
    "user": "celsofranssa"
  },
  {
    "repo": "pytorch/text",
    "number": 757,
    "title": "How to apply torchtext to prepare data for a transformer",
    "body": "Hello,\r\nReading the tutorial [Language Translation with torchText](https://pytorch.org/tutorials/beginner/torchtext_translation_tutorial.html) I wondered how someone could use those convenience classes (`Field, BucketIterator`) to train/fine-tune a `Transformer` such as those available at [Huggingface](https://github.com/huggingface/transformers).\r\n\r\nFor instance, I'm currently working with a large dataset distributed in jsonl files which looks like:\r\n```python\r\n{ \"query\": \"this is a query 1\", \"doc\": \"relevant document regarding query 1\" },\r\n{ \"query\": \"this is a query 2\", \"doc\": \"relevant document regarding query 2\" },\r\n               ...\r\n \r\n```\r\n\r\nNow, to forward this data into a transformer like Bert, it is necessary to convert this dataset into the format:\r\n\r\n```python3\r\n(\r\n#queries\r\n {\r\n    'input_ids': tensor([\r\n        [  101,  2023,  2003,  1037, 23032,  1015,   102,     0],\r\n        [  101,  2023,  2003,  1037, 23032,  1016,   102,     0]]), \r\n    'attention_mask': tensor([\r\n        [1, 1, 1, 1, 1, 1, 1, 0],\r\n        [1, 1, 1, 1, 1, 1, 1, 0]])\r\n }, \r\n\r\n #docs\r\n {\r\n    'input_ids': tensor([\r\n        [ 101, 2023, 2003, 2028, 7882, 6254, 4953,  102],\r\n        [ 101, 2023, 2003, 2028, 7882, 6254, 4953,  102]]), \r\n    'attention_mask': 'input_ids': tensor([\r\n        [1, 1, 1, 1, 1, 1, 1, 1],\r\n        [1, 1, 1, 1, 1, 1, 1, 1]])\r\n}\r\n```\r\nSo, what would be a clear and efficient approach to apply those convenience classes to tokenize a text dataset to fit it in the required format of a transformer?\r\n",
    "url": "https://github.com/pytorch/text/issues/757",
    "state": "closed",
    "labels": [
      "legacy"
    ],
    "created_at": "2020-05-06T23:47:18Z",
    "updated_at": "2022-06-23T21:46:27Z",
    "user": "celsofranssa"
  },
  {
    "repo": "huggingface/swift-coreml-transformers",
    "number": 19,
    "title": "What GPT-2 model is distilled here?",
    "body": "Is it the gpt2-small (124M), gpt2-medium (345M), gpt2-large (774M), or the gpt-xl (1.5B) that this implementation uses out of the box?",
    "url": "https://github.com/huggingface/swift-coreml-transformers/issues/19",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-05T02:08:49Z",
    "updated_at": "2023-04-01T18:01:45Z",
    "user": "philipkd"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 977,
    "title": "is the log softmax function missing in the Transformer Example?",
    "body": "Hello,\r\nThe tutorial (https://pytorch.org/tutorials/beginner/transformer_tutorial.html) describes the Transformer paper and says that \"... .To have the actual words, the output of nn.TransformerEncoder model is sent to the final Linear layer, which is followed by a log-Softmax function.\" The code, however, does return the output directly from the last Linear layer and does not use a (log) softmax anywhere. Do I fail to see something or is it actually missing?",
    "url": "https://github.com/pytorch/tutorials/issues/977",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-04T19:41:07Z",
    "updated_at": "2020-09-13T13:52:55Z",
    "comments": 2,
    "user": "hilfe123"
  },
  {
    "repo": "pytorch/xla",
    "number": 2026,
    "title": "How are kernel implementations registered to PyTorch",
    "body": "## \u2753 Questions and Help\r\nHi,\r\n\r\nI was wondering how the PyTorch dispatcher finds the kernel implementations for functions defined in `aten_xla_type_default.h`\r\n\r\nand what is the purpose of `RegisterAtenTypeFunctions `",
    "url": "https://github.com/pytorch/xla/issues/2026",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-04T16:32:41Z",
    "updated_at": "2020-05-08T19:14:16Z",
    "user": "a2bhulla"
  },
  {
    "repo": "pytorch/vision",
    "number": 2175,
    "title": "ModuleNotFoundError: No module named 'torchvision.models.detection'",
    "body": "I have pytorch1.1.0 and torchvision0.2.2 installed in my anaconda environment.\r\nI can: 1. `import torch`; 2.`import torchvision` (following the toturial) Yet when `from torchvision.models.detection.faster_rcnn import FastRCNNPredictor`, error raised as:\r\n```\r\nTraceback (most recent call last):\r\n  File \"<input>\", line 1, in <module>\r\n  File \"D:\\Applications\\PyCharm 2019.2.3\\helpers\\pydev\\_pydev_bundle\\pydev_import_hook.py\", line 21, in do_import\r\n    module = self._system_import(name, *args, **kwargs)\r\nModuleNotFoundError: No module named 'torchvision.models.detection'\r\n```\r\nI suspect that my version of torchvision is somewhat low. But my GPU driver only support cudatoolkit9.0, and version 0.2.2 is automatically chosen when I install torchvision.\r\n",
    "url": "https://github.com/pytorch/vision/issues/2175",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-05-03T06:51:40Z",
    "updated_at": "2020-05-04T12:33:56Z",
    "user": "feiyangsuo"
  },
  {
    "repo": "pytorch/xla",
    "number": 2021,
    "title": "How to run nprocs > 1 on local CPU using the XRT client ?",
    "body": "## \u2753 Questions and Help\r\n\r\nI would like to test locally some code with `xmp.spawn(..., nprocs=8)`. When I use suggested env vars in https://github.com/pytorch/xla/blob/master/CONTRIBUTING.md#running-the-tests, my tests pass with nprocs=1 and fail with nprocs > 1 complaining about gRPC\r\n```\r\n2020-05-02 23:51:20.896158: E    1654 tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:509] Unknown: Could not start gRPC server\r\n```\r\nAny suggestions on how to setup properly XRT_DEVICE_MAP and XRT_WORKERS ?\r\nThanks \r\n\r\nPS: \r\nI test the code with docker : gcr.io/tpu-pytorch/xla r1.5\r\n",
    "url": "https://github.com/pytorch/xla/issues/2021",
    "state": "closed",
    "labels": [],
    "created_at": "2020-05-03T00:05:20Z",
    "updated_at": "2020-05-03T00:44:06Z",
    "user": "vfdev-5"
  },
  {
    "repo": "pytorch/xla",
    "number": 2000,
    "title": "How are operations recorded once tensors are dispatched to XLA",
    "body": "## \u2753 Questions and Help\r\nIn the pytorch/xla docs it states \"XLA tensors, on the other hand, are lazy. They record operations in a graph until the results are needed\"\r\n\r\nI was wondering once pytorch dispatches to XLA how this recording occurs. Does the creation of an XLATensor also create a node for this operations which is added to an XLA graph? \r\n\r\nThanks",
    "url": "https://github.com/pytorch/xla/issues/2000",
    "state": "closed",
    "labels": [
      "stale"
    ],
    "created_at": "2020-04-30T20:13:08Z",
    "updated_at": "2020-06-06T21:04:18Z",
    "user": "a2bhulla"
  },
  {
    "repo": "pytorch/vision",
    "number": 2167,
    "title": "engine.py error while following tutorial",
    "body": "## \ud83d\udcda Documentation\r\n\r\nI have found this library via the examples at https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html\r\n\r\nI ran the google colab and that successfully finished.. however when I go to copy `master` from here and use it locally I am getting an error..\r\n\r\nEngine.py line \r\n![image](https://user-images.githubusercontent.com/3691722/80714967-f9c0bc80-8af5-11ea-8d17-1d8f1278a69d.png)\r\n\r\n![image](https://user-images.githubusercontent.com/3691722/80715039-14933100-8af6-11ea-89ee-894b769723f7.png)\r\n\r\nError\r\n\r\n```\r\n    train_one_epoch(model, optimizer, training_data_loader, device, epoch, print_freq=model_conf[\"hyperParameters\"][\"display\"])\r\n  File \"/home/emcp/Dev/git/EMCP/faster-rcnn-torchvision/model_components/model/engine.py\", line 27, in train_one_epoch\r\n    images = list(image.to(device) for image in images)\r\n  File \"/home/emcp/Dev/git/EMCP/faster-rcnn-torchvision/model_components/model/engine.py\", line 27, in <genexpr>\r\n    images = list(image.to(device) for image in images)\r\nAttributeError: 'Image' object has no attribute 'to'\r\n``\r\nseems to be an image did not load perhaps ?",
    "url": "https://github.com/pytorch/vision/issues/2167",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "module: reference scripts",
      "topic: object detection"
    ],
    "created_at": "2020-04-30T13:21:38Z",
    "updated_at": "2022-09-15T11:04:05Z",
    "user": "EMCP"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 37478,
    "title": "How to do indexing in one-dimensional tensor?",
    "body": "How to do indexing in one-dimensional tensor?\r\n```\r\ntorch::Tensor keep = nms(c_bboxes, c_scores.index({Slice(), 1}), 0.3);\r\ncout << keep.sizes() << endl;\r\nint keep_end = min(750, (int)keep.size(0));\r\ncout << keep_end << endl;\r\nkeep = keep.index({Slice(), keep_end});\r\n```\r\nHow to index 1 dimension tensor in libtorch?\r\n\r\nThe output is :\r\n```\r\n[775]\r\n750\r\nterminate called after throwing an instance of 'c10::IndexError'\r\n  what():  too many indices for tensor of dimension 1 (applySlicing at ../aten/src/ATen/TensorIndexing.h:422)\r\n\r\n```\r\n\r\nSo why is that? And how to do the index correctly?",
    "url": "https://github.com/pytorch/pytorch/issues/37478",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-29T03:15:08Z",
    "updated_at": "2020-04-29T03:28:45Z",
    "user": "Edwardmark"
  },
  {
    "repo": "pytorch/vision",
    "number": 2151,
    "title": "Cannot train deeplabv3_resnet50 with batch size of 1",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. train a `deeplabv3_resnet50`\r\n1. call `forward` with tensor of shape: `torch.Size([1, 3, 240, 320])` (batch with single colour image)\r\n1. receive error message: `ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 256, 1, 1])`\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\nTraining should conduct as with `torch.Size([2, 3, 240, 320])` (batch size 2 and up).\r\n\r\n## Environment\r\n```\r\nCollecting environment information...\r\nPyTorch version: 1.5.0\r\nIs debug build: No\r\nCUDA used to build PyTorch: 10.2\r\n\r\nOS: Ubuntu 18.04.4 LTS\r\nGCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0\r\nCMake version: version 3.10.2\r\n\r\nPython version: 3.6\r\nIs CUDA available: No\r\nCUDA runtime version: No CUDA\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.18.2\r\n[pip3] torch==1.5.0\r\n[pip3] torchsummary==1.5.1\r\n[pip3] torchvision==0.6.0\r\n[conda] Could not collect\r\n```\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n\r\nTraining with batch size of 1 is probably uncommon but there is no technical reason why this should not be possible and the error message is rather cryptic and unhelpful.",
    "url": "https://github.com/pytorch/vision/issues/2151",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: semantic segmentation"
    ],
    "created_at": "2020-04-28T17:05:52Z",
    "updated_at": "2020-04-28T17:47:30Z",
    "user": "christian-rauch"
  },
  {
    "repo": "pytorch/elastic",
    "number": 97,
    "title": "How to run elastically on kubernetes (nnodes vs worker replicas)",
    "body": "### Question\r\n- On the frontpage README.md of the repo it says to run Elastic on 1 ~ 4 nodes, 8 trainers/node, total 8 ~ 32 trainers. Job starts as soon as 1 node is healthy, you may add up to 4 nodes.\r\n\r\n```\r\npython -m torchelastic.distributed.launch\r\n            --nnodes=1:4\r\n            --nproc_per_node=8\r\n            --rdzv_id=JOB_ID\r\n            --rdzv_backend=etcd\r\n            --rdzv_endpoint=ETCD_HOST:ETCD_PORT\r\n            YOUR_TRAINING_SCRIPT.py (--arg1 ... train script args...)\r\n```\r\n\r\n- In the docs for the kube example it says:\r\n```\r\nset Worker.replicas to the number of nodes to start with (you may modify this later to scale the job in/out)\r\n```\r\n\r\n- When I try to run with a minReplicas of 1, maxReplicas of 2, and replicas of 2 and **the autoscaling group for my training nodes only has one node available** training starts with the one available node, and then the second one joins in when it can, but it seems to reset progress \ud83d\udc47, is this expected because we haven't hit a checkpoint yet? Is this desired? Especially in a world where we're using spot instances, how can I make sure I don't get stuck in a loop similar to this redoing the same epoch?\r\n```\r\nInstance: [i-015067026ed8f10a3] Epoch: [0][1830/3125]   Time  0.139 ( 0.137)    Data  0.034 ( 0.034)    Loss 4.8472e+00 (5.0661e+00)    Acc@1   3.12 (  3.16)   Acc@5   9.38 ( 11.34)\r\nInstance: [i-015067026ed8f10a3] Epoch: [0][1840/3125]   Time  0.139 ( 0.137)    Data  0.034 ( 0.034)    Loss 4.7636e+00 (5.0644e+00)    Acc@1   9.38 (  3.17)   Acc@5  18.75 ( 11.37)\r\nINFO 2020-04-27 18:52:52,967 Etcd machines: ['http://0.0.0.0:2379']\r\nINFO 2020-04-27 18:52:53,585 Attempting to join next rendezvous\r\nInstance: [i-015067026ed8f10a3] Epoch: [0][1850/3125]   Time  0.139 ( 0.137)    Data  0.034 ( 0.034)    Loss 4.6797e+00 (5.0630e+00)    Acc@1   3.12 (  3.17)   Acc@5  18.75 ( 11.39)\r\nInstance: [i-015067026ed8f10a3] Epoch: [0][1860/3125]   Time  0.139 ( 0.137)    Data  0.034 ( 0.034)    Loss 5.0609e+00 (5.0614e+00)    Acc@1   6.25 (  3.17)   Acc@5  15.62 ( 11.42)\r\nINFO 2020-04-27 18:52:53,587 Observed existing rendezvous state: {'status': 'final', 'version': '10', 'participants': [0], 'keep_alives': ['/torchelastic/p2p/run_imagenet/rdzv/v_10/rank_0'], 'num_workers_waiting': 0}\r\nInstance: [i-015067026ed8f10a3] Epoch: [0][1870/3125]   Time  0.139 ( 0.137)    Data  0.034 ( 0.034)    Loss 4.1825e+00 (5.0594e+00)    Acc@1   6.25 (  3.18)   Acc@5  28.12 ( 11.46)\r\nINFO 2020-04-27 18:52:53,628 Added self to waiting list. Rendezvous full state: {\"status\": \"final\", \"version\": \"10\", \"participants\": [0], \"keep_alives\": [\"/torchelastic/p2p/run_imagenet/rdzv/v_10/rank_0\"], \"num_workers_waiting\": 1}\r\nInstance: [i-015067026ed8f10a3] Epoch: [0][1880/3125]   Time  0.139 ( 0.137)    Data  0.034 ( 0.034)    Loss 5.0155e+00 (5.0574e+00)    Acc@1   0.00 (  3.18)   Acc@5   6.25 ( 11.47)\r\nInstance: [i-015067026ed8f10a3] Epoch: [0][1890/3125]   Time  0.139 ( 0.137)    Data  0.034 ( 0.034)    Loss 4.8805e+00 (5.0552e+00)    Acc@1   9.38 (  3.21)   Acc@5  18.75 ( 11.53)\r\nINFO 2020-04-27 18:52:58,719 Attempting to join next rendezvous\r\nINFO 2020-04-27 18:52:58,722 Observed existing rendezvous state: {'status': 'final', 'version': '10', 'participants': [0], 'keep_alives': ['/torchelastic/p2p/run_imagenet/rdzv/v_10/rank_0'], 'num_workers_waiting': 1}\r\nINFO 2020-04-27 18:52:58,782 Added self to waiting list. Rendezvous full state: {\"status\": \"final\", \"version\": \"10\", \"participants\": [0], \"keep_alives\": [\"/torchelastic/p2p/run_imagenet/rdzv/v_10/rank_0\"], \"num_workers_waiting\": 2}\r\nINFO 2020-04-27 18:53:08,501 Keep-alive key /torchelastic/p2p/run_imagenet/rdzv/v_10/rank_0 is not renewed.\r\nINFO 2020-04-27 18:53:08,501 Rendevous version 10 is incomplete. \r\nINFO 2020-04-27 18:53:08,501 Attempting to destroy it.\r\nINFO 2020-04-27 18:53:08,502 Keep-alive key /torchelastic/p2p/run_imagenet/rdzv/v_10/rank_0 is not renewed.\r\nINFO 2020-04-27 18:53:08,502 Destroyed rendezvous version 10 successfully.\r\nINFO 2020-04-27 18:53:08,502 Previously existing rendezvous state changed. Will re-try joining.\r\nINFO 2020-04-27 18:53:08,502 Rendevous version 10 is incomplete. \r\nINFO 2020-04-27 18:53:08,502 Attempting to destroy it.\r\nINFO 2020-04-27 18:53:08,503 Rendezvous attempt failed, will retry. Reason: Key not found : /torchelastic/p2p/run_imagenet/rdzv/active_version\r\nINFO 2020-04-27 18:53:08,502 Attempting to join next rendezvous\r\nINFO 2020-04-27 18:53:08,506 New rendezvous state created: {'status': 'joinable', 'version': '11', 'participants': []}\r\nINFO 2020-04-27 18:53:08,541 Joined rendezvous version 11 as rank 0. Full state: {'status': 'joinable', 'version': '11', 'participants': [0]}\r\nINFO 2020-04-27 18:53:08,541 Rank 0 is responsible for join last call.\r\nINFO 2020-04-27 18:53:09,504 Attempting to join next rendezvous\r\nINFO 2020-04-27 18:53:09,507 Observed existing rendezvous state: {'status': 'joinable', 'version': '11', 'participants': [0]}\r\nINFO 2020-04-27 18:53:09,540 Joined rendezvous version 11 as rank ",
    "url": "https://github.com/pytorch/elastic/issues/97",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-27T18:58:03Z",
    "updated_at": "2020-04-30T16:29:37Z",
    "user": "mttcnnff"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 37341,
    "title": "how to covert libtorch model to onnx model in libtorch1.5",
    "body": "how to convert libtorch model to onnx model in libtorch1.5 .      how to convert libtorch model to tensorrt model in libtorch \uff1f\r\n\n\ncc @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof",
    "url": "https://github.com/pytorch/pytorch/issues/37341",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2020-04-27T11:03:44Z",
    "updated_at": "2020-04-27T15:13:44Z",
    "user": "williamlzw"
  },
  {
    "repo": "pytorch/java-demo",
    "number": 10,
    "title": "how to build demo with javac ",
    "body": "Thanks for the tutorial. \r\n\r\nWell, could you pls write a guide start from javac for the users who are not familiar with Gradle. \r\n\r\nThanks again.\r\n---\r\nwhen running the app, I had always got this.\r\n![image](https://user-images.githubusercontent.com/12872935/80546590-55842c00-89b6-11ea-937f-53363d729906.png)\r\n",
    "url": "https://github.com/pytorch/java-demo/issues/10",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-26T19:57:31Z",
    "updated_at": "2020-05-03T10:08:38Z",
    "user": "fzwqq"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 45,
    "title": "Build Project failed with Bazel",
    "body": "Hi,\r\n\r\nI configure the env and try to build such project. \r\nINFO: Analyzed target //:libtrtorch (34 packages loaded, 1830 targets configured).\r\nINFO: Found 1 target...\r\nINFO: Deleting stale sandbox base /home/xxx/.cache/bazel/_bazel_xxx/2ed6247d0d5238dab6f58f41a8e8ad4b/sandbox\r\nERROR: missing input file 'external/tensorrt/lib/x86_64-linux-gnu/libnvinfer.so', owner: '@tensorrt//:lib/x86_64-linux-gnu/libnvinfer.so'\r\nERROR: /home/xxx/2ed6247d0d5238dab6f58f41a8e8ad4b/external/tensorrt/BUILD.bazel:15:1: @tensorrt//:nvinfer_lib: missing input file '@tensorrt//:lib/x86_64-linux-gnu/libnvinfer.so'\r\nTarget //:libtrtorch failed to build\r\nUse --verbose_failures to see the command lines of failed build steps.\r\nERROR: /home/xxx/.cache/bazel/_bazel_xxxd5238dab6f58f41a8e8ad4b/external/tensorrt/BUILD.bazel:15:1 1 input file(s) do not exist\r\nINFO: Elapsed time: 2.964s, Critical Path: 0.13s\r\nINFO: 0 processes.\r\nFAILED: Build did NOT complete successfully\r\n\r\ncould you help solve such errors or provide more env setting details?\r\nI have email @narendasan and please check it.\r\nThanks.",
    "url": "https://github.com/pytorch/TensorRT/issues/45",
    "state": "closed",
    "labels": [
      "question",
      "component: build system"
    ],
    "created_at": "2020-04-26T04:02:19Z",
    "updated_at": "2020-04-30T03:59:00Z",
    "user": "alanzhai219"
  },
  {
    "repo": "pytorch/vision",
    "number": 2144,
    "title": "Negative Samples in  Faster RCNN training results in NaN RPN_BOX_REG Loss",
    "body": "Overview:\r\nI updated torch and torchvision to the latest builds. A cool update was that now negative samples could be included in RCNN training. However, I end up getting  a NaN value for loss_rpn_box_reg when I provide negative samples.\r\n\r\nI was training a Pedestrian Detector. Based on my custom dataset input, if a label wasn't provided, I would use it as a negative sample. This is the code snippet I used.\r\n```\r\n    def __getitem__(self, idx):\r\n        img_path , x1 , y1 , x2 ,y2 , label = self.imgs[idx].split(\",\")\r\n        img = Image.open(img_path).convert(\"RGB\")\r\n        boxes = []\r\n        if label:\r\n            pos = np.asarray([[y1,y2],[x1,x2]]).astype(np.float)\r\n            xmin = np.min(pos[1])\r\n            xmax = np.max(pos[1])\r\n            ymin = np.min(pos[0])\r\n            ymax = np.max(pos[0])\r\n            boxes.append([xmin, ymin, xmax, ymax])\r\n            labels = torch.ones((1,), dtype=torch.int64)\r\n            iscrowd = torch.zeros((1,), dtype=torch.int64)\r\n        else:\r\n            boxes.append([0.0,0.0,0.0,0.0])\r\n            labels = torch.zeros((1,), dtype=torch.int64)\r\n            iscrowd = torch.zeros((0,), dtype=torch.int64)\r\n        # convert everything into a torch.Tensor\r\n        boxes = torch.as_tensor(boxes, dtype=torch.float32)\r\n        image_id = torch.tensor([idx])\r\n        area = (boxes[:, 3] - boxes[:, 1]) * (boxes[:, 2] - boxes[:, 0])\r\n        target = {}\r\n        target[\"boxes\"] = boxes\r\n        target[\"labels\"] = labels\r\n        target[\"image_id\"] = image_id\r\n        target[\"area\"] = area\r\n        target[\"iscrowd\"] = iscrowd\r\n        if self.transforms is not None:\r\n            img, target = self.transforms(img, target)\r\n        return img, target\r\n```\r\n\r\nThe training seems to work fine if I replace the following line:\r\n```\r\nboxes.append([0.0,0.0,0.0,0.0])\r\n```\r\nwith \r\n```\r\nboxes.append([0.0,0.0,0.1,0.1])\r\n```\r\nSo i'm guessing it's because both xmin/ymin and xmax/ymax are equal.\r\n\r\nSetup:\r\nTorch : 1.5.0 \r\nTorchvision: 0.6.0\r\n Nvidia - 440.33 \r\n Cuda-10.2\r\n\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/2144",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-04-24T23:00:57Z",
    "updated_at": "2021-08-13T13:19:57Z",
    "user": "praneet195"
  },
  {
    "repo": "pytorch/examples",
    "number": 759,
    "title": "torch::Tensor can't be use with std::tuple or std::vector?",
    "body": "#include <torch/torch.h>\r\n#include <Windows.h>\r\n#include <iostream>\r\n#include <string>\r\n#include <vector>\r\n\r\nauto ReadRsv(const std::string path) {\r\n\tHANDLE filea= CreateFileA((LPCSTR)path.c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN,NULL);\r\n\tint cout;\r\n\tint length;\r\n\tReadFile(filea, &cout,4,NULL,NULL);\r\n\tstd::vector<std::tuple<torch::Tensor, torch::Tensor>> rsv;\r\n\tbyte* dataa = new byte[784];\r\n\tbyte* datab = new byte[1];\r\n\tDWORD hasread;\r\n\tfor (int i = 0; i<cout; ++i) {\r\n\t\tReadFile(filea, &length, 4, &hasread, NULL);\r\n\t\tReadFile(filea, &dataa, 784, &hasread, NULL);\r\n\t\ttorch::Tensor line = torch::from_blob(&dataa, { 784 },torch::kByte);\r\n\t\tReadFile(filea, &datab, 1, &hasread, NULL);\r\n\t\ttorch::Tensor label = torch::from_blob(&datab, { 1 }, torch::kByte);\r\n\t\trsv.push_back(std::make_tuple(line,label)); //wrong?\r\n\t}\r\n\tdelete []dataa;\r\n\tdelete []datab;\r\n\tCloseHandle(filea);\r\n\treturn rsv;\r\n}\r\n\r\n--------------------------------------------------\r\nwin10 x64;libtorch 1.5 release x64;\r\n------------------------\r\ndownload rsv file: https://share.weiyun.com/5DYsiDe\r\n-------------\r\nwhen i=0,it run success,but when i=1,it run wrong. \r\n0x00007FFD618EF7E4 (torch_cpu.dll) (in consoleapplication1.exe) throws an exception: 0xC0000005: an access conflict occurs while writing to location 0x0000000000000000.\r\nRemove this sentence and it will run successfully  ->rsv.push_back(std::make_tuple(line,label)); ",
    "url": "https://github.com/pytorch/examples/issues/759",
    "state": "open",
    "labels": [
      "c++"
    ],
    "created_at": "2020-04-24T04:46:38Z",
    "updated_at": "2022-03-09T20:49:36Z",
    "comments": 1,
    "user": "williamlzw"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 37201,
    "title": "Libtorch:how to create tensor from tensorRT fp16 cuda half type pointer?",
    "body": "how to create tensor from tensorRT fp16 half type pointer in libtorch?\r\nI am working on a detection model. I change the backbone of it to tensorRT to do FP16 inference, and the detection code such as decode boxes and nms is done in libtorch and torchvisoin, so how to create fp16 tensor from tensorRT half type pointers?\r\nThe important code is to illustrate the issue:\r\n```\r\n// tensorRT code to get half type outpus\r\nhalf_float::half* outputs[18];\r\ndoInference(*engine, data, outputs, 1);\r\n// to get the final outputs with libtorch\r\nvector<torch::Tensor> output;\r\n//???? how to feed the date in outpus to output????\r\n// get the result with libtorch method detect_trt->forward\r\n auto res = detect_trt->forward(output); \r\n```\r\nThanks in advance.\n\ncc @yf225 @glaringlee",
    "url": "https://github.com/pytorch/pytorch/issues/37201",
    "state": "closed",
    "labels": [
      "module: cpp",
      "triaged"
    ],
    "created_at": "2020-04-24T02:19:45Z",
    "updated_at": "2020-04-29T03:28:20Z",
    "user": "Edwardmark"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 37134,
    "title": "C++ model output is a List, how to get each item?",
    "body": "## \u2753 Questions and Help\r\nI'm using PyTorch1.3 and libtorch1.3.\r\n\r\nIn python, my scripted model's returned type is `List[List[Dict[str, Tensor]]]`\r\n\r\nIn C++, I get model output from `auto output = model.forward(inputs);`, I find that output is a `GenericList`. I don't know how to access each item of GenericList, and I want to know how to get each Tensor from Dict[str, Tensor].\r\n\r\nThx.\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)",
    "url": "https://github.com/pytorch/pytorch/issues/37134",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-23T07:53:56Z",
    "updated_at": "2020-04-23T12:07:01Z",
    "user": "kaituoxu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 37132,
    "title": "How to rebuild the libtorch to get the lib.so after download the libtorch from https://download.pytorch.org/libtorch/nightly/cu92/libtorch-win-shared-with-deps-latest.zip?",
    "body": "how to build and make libtorch after I change the code in https://download.pytorch.org/libtorch/nightly/cu92/libtorch-win-shared-with-deps-latest.zip?\r\nAny guide please?\r\nThanks in advance.",
    "url": "https://github.com/pytorch/pytorch/issues/37132",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-23T06:08:40Z",
    "updated_at": "2020-04-23T07:22:20Z",
    "user": "Edwardmark"
  },
  {
    "repo": "pytorch/examples",
    "number": 757,
    "title": "the learning rate of word_language_model",
    "body": "Hi, I have a question about the learning rate in the example \"word_language_model\", \r\nthe init lr = 20, which seems very large, can you tell me  why lr is set to equal 20?\r\nThanks a lot!\r\nIf you have some advices about improving the performance, please let me know and thanks",
    "url": "https://github.com/pytorch/examples/issues/757",
    "state": "open",
    "labels": [
      "help wanted",
      "nlp"
    ],
    "created_at": "2020-04-22T09:07:29Z",
    "updated_at": "2024-04-02T21:27:56Z",
    "comments": 3,
    "user": "zhangyingbit"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 36991,
    "title": "how to convert quantization_ware_training model to onnx",
    "body": "## \u2753 Questions and Help\r\npython  3.6\r\npytorch version: 1.4.0\r\nonnx 1.6.0\r\nIn most issues, some of them mentioned about this question. but I still don't know how to convert a int8 model to onnx. I followed the tutorial (https://pytorch.org/tutorials/advanced/static_quantization_tutorial.html#quantization-aware-training) to try to train a quantization model, the pretrained model is got from model zoo. I already got the int8 model, but how to convert it to onnx??\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/36991",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-21T08:31:29Z",
    "updated_at": "2020-04-21T20:19:36Z",
    "user": "onesnow123q"
  },
  {
    "repo": "pytorch/examples",
    "number": 755,
    "title": "Process doesn't exit properly for single-node distributed setting.",
    "body": "Hello, I trained an ImageNet using the following arguments, \r\n```\r\nCUDA_VISIBLE_DEVICES=0,2,3,4 python main.py /media/ramdisk/images --arch resnet18 -j 16 --multiprocessing-distributed --dist-url 'tcp://127.0.0.1:52038' --dist-backend 'nccl' --world-size 1 --rank 0 --print-freq 2500\r\n```\r\nThe visible devices were set to 0,2,3,4 since I had to leave it empty for another use at the time, and print-freq was set at 2500 to avoid generating too much std outputs. The training runs well, but its termination is not so smooth.\r\n\r\nHere is the last few lines of [log](https://github.com/pytorch/examples/files/4498140/log.txt), and a capture of the nvidia-smi at the time. \r\n\r\n![image](https://user-images.githubusercontent.com/19501347/79676978-ce50ee80-8226-11ea-948a-26a7eea72cb6.png)\r\n\r\nOne of the gpu shows an ERR! on GPU Fan and Power usage. And even after killing the processes manually, the error remains. (I had to restart the server in order to get out of the ERR state)\r\n\r\n1. Why does the processes remain?\r\n2. What is the proper way to terminate them?\r\n",
    "url": "https://github.com/pytorch/examples/issues/755",
    "state": "open",
    "labels": [
      "distributed"
    ],
    "created_at": "2020-04-19T01:28:55Z",
    "updated_at": "2022-03-09T20:52:47Z",
    "comments": 0,
    "user": "inventor71"
  },
  {
    "repo": "pytorch/examples",
    "number": 754,
    "title": "Why the kernel size of discriminator & generator is 4 in dcgan",
    "body": "I don't understand, is there any special role? or cited other model?\r\nthanks\uff01",
    "url": "https://github.com/pytorch/examples/issues/754",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-18T00:33:19Z",
    "updated_at": "2022-03-09T21:44:47Z",
    "comments": 2,
    "user": "mltloveyy"
  },
  {
    "repo": "pytorch/examples",
    "number": 753,
    "title": "Imagenet data?",
    "body": "I'd like to use the imagenet example to train a resnet on the whole imagenet dataset... The problem is I can't seem to actually find the entire dataset anywhere (14 million images). The URLs link on the imagenet website is dead. Does anyone know the standard way to get the classification dataset? i.e. how were the pretrained models in pytorch trained?",
    "url": "https://github.com/pytorch/examples/issues/753",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-18T00:01:24Z",
    "updated_at": "2021-08-11T23:05:25Z",
    "comments": 3,
    "user": "justinblaber"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 250,
    "title": "How to improve processing speed?",
    "body": "Hi.\r\n\r\nCould you give me some information about how to tune the parameters to make processing faster, even at the expense of accuracy?\r\n\r\nHow much impact does the `greedyness` parameter have on speed?\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/neuralcoref/issues/250",
    "state": "closed",
    "labels": [
      "question",
      "wontfix",
      "perf / speed"
    ],
    "created_at": "2020-04-17T16:32:08Z",
    "updated_at": "2022-01-09T04:06:48Z",
    "user": "murphd40"
  },
  {
    "repo": "pytorch/examples",
    "number": 751,
    "title": "Example of MNIST using RNN",
    "body": "Hi @osalpekar ,\r\n\r\nI would like to implement an example of MNIST using RNN.\r\n\r\n**Motivation:** Create pytorch example similar to Official Tensorflow Keras RNN example using MNIST [here](https://www.tensorflow.org/guide/keras/rnn)\r\n\r\nI have written and tested the code by modifying following example on MNIST [here](https://github.com/pytorch/examples/tree/master/mnist) . Please let me know if I can raise a PR for this. \r\n\r\nThanks and regards,\r\nRakesh",
    "url": "https://github.com/pytorch/examples/issues/751",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-16T11:52:49Z",
    "updated_at": "2022-03-10T00:30:41Z",
    "comments": 6,
    "user": "rakesh-malviya"
  },
  {
    "repo": "pytorch/vision",
    "number": 2109,
    "title": "development plan of \"functional_tensor\"",
    "body": "## \u2753 Questions and Help\r\n\r\nHi torchvision team,\r\n\r\nThis is Nic from NVIDIA, thanks for sharing your great work on data processing solutions!\r\n1. I saw you developed \"functional_tensor.py\" to support Tensor type data but didn't find where it is used in transforms, may I know the reason?\r\n2. And what's your future plan of transforms for Numpy and Tensor data type?\r\nActually, I found 2 Tensor only transforms, others are for PIL or numpy.\r\n3. If you want to support both Tensor and Numpy for all transforms, explicitly ask users to select transform for Numpy or for Tensor?\r\nOr implicitly detect data type in transforms and use \"function.py\" or \"function_tensor.py\"?\r\n\r\nThanks in advance.\r\n",
    "url": "https://github.com/pytorch/vision/issues/2109",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2020-04-16T02:10:03Z",
    "updated_at": "2020-10-21T08:23:16Z",
    "user": "Nic-Ma"
  },
  {
    "repo": "pytorch/vision",
    "number": 2108,
    "title": "Not getting proper mask as instance.",
    "body": "Hi guys\r\n\r\nUse pretrained weights=yes\r\nno. of epoch=400\r\nno. of class=1\r\n\r\nAt the time of prediction i am not getting individual masks for individual object. i am getting some extra mask but those are empty or partial . what can be the reason? ",
    "url": "https://github.com/pytorch/vision/issues/2108",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-04-15T11:41:30Z",
    "updated_at": "2020-04-15T15:11:43Z",
    "user": "vivekdeepquanty"
  },
  {
    "repo": "pytorch/vision",
    "number": 2106,
    "title": "I can't load mobilenet  under version 0.5.0",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1.a =models.mobilenet()\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nTypeError: 'module' object is not callable\r\n## Expected behavior\r\nload the mobilenet model, but I can find  mobilenet module in dir(torchvision.models)\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n## Environment\r\nubuntu16.04\r\ntorchvision version 0.5.0\r\nPlease copy and paste the output from our\r\n[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)\r\n(or fill out the checklist below manually).\r\n\r\nYou can get the script and run it with:\r\n```\r\nwget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py\r\n# For security purposes, please check the contents of collect_env.py before running it.\r\npython collect_env.py\r\n```\r\n\r\n - PyTorch / torchvision Version (e.g., 1.0 / 0.4.0):\r\n - OS (e.g., Linux):\r\n - How you installed PyTorch / torchvision (`conda`, `pip`, source):pip\r\n - Build command you used (if compiling from source):\r\n - Python version:\r\n - CUDA/cuDNN version:\r\n - GPU models and configuration:\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/vision/issues/2106",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: classification"
    ],
    "created_at": "2020-04-15T06:08:59Z",
    "updated_at": "2020-04-15T10:04:09Z",
    "user": "lunasdejavu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 36644,
    "title": "I had build pytourch from source. But how to install after making a build?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\r\nCan anybody let me know how to install after build from source?",
    "url": "https://github.com/pytorch/pytorch/issues/36644",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-15T06:04:05Z",
    "updated_at": "2020-04-18T05:34:15Z",
    "user": "tnavadiya"
  },
  {
    "repo": "pytorch/vision",
    "number": 2103,
    "title": "size -> size() ?",
    "body": "traceback\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Users/maksim/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/193.6911.25/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_exec2.py\", line 3, in Exec\r\n    exec(exp, global_vars, local_vars)\r\n  File \"<string>\", line 3, in <module>\r\n  File \"/Users/maksim/dev_projects/denoising-fluorescence/denoising/venv/lib/python3.7/site-packages/torchvision/transforms/transforms.py\", line 247, in __call__\r\n    return F.center_crop(img, self.size)\r\n  File \"/Users/maksim/dev_projects/denoising-fluorescence/denoising/venv/lib/python3.7/site-packages/torchvision/transforms/functional.py\", line 382, in center_crop\r\n    image_width, image_height = img.size\r\nTypeError: cannot unpack non-iterable builtin_function_or_method object\r\n>>> img.size()\r\ntorch.Size([1, 1, 2160, 2560])\r\n```\r\n\r\nline with bug\r\n\r\nhttps://github.com/pytorch/vision/blob/master/torchvision/transforms/functional.py#L374\r\n\r\nmy version numbers\r\n\r\n```\r\ntorch==1.4.0\r\ntorchvision==0.5.0\r\n```",
    "url": "https://github.com/pytorch/vision/issues/2103",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2020-04-14T14:15:57Z",
    "updated_at": "2020-04-14T15:09:30Z",
    "user": "makslevental"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 36574,
    "title": "how to remove ios dependency",
    "body": "I have written pytorch c++ app.\r\nI clone pytorch code and build it as per guidelines in pytorch mobile\r\nwhen i compile the app for x86_64 i am getting ios dependencies as below.\r\nplease help me avoid these ios errors. I want to run app in x86 linux pc.\r\n\r\n-- The C compiler identification is GNU 6.5.0\r\n-- The CXX compiler identification is GNU 6.5.0\r\n-- Check for working C compiler: /usr/bin/cc\r\n-- Check for working C compiler: /usr/bin/cc -- works\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Detecting C compile features\r\n-- Detecting C compile features - done\r\n-- Check for working CXX compiler: /usr/bin/c++\r\n-- Check for working CXX compiler: /usr/bin/c++ -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- Detecting CXX compile features\r\n-- Detecting CXX compile features - done\r\n-- Found torch: /home/anilkumar.av/pytorch-mobile/pytorch/build_android/install/lib/libtorch.a\r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: /home/anilkumar.av/pytorch-mobile/helloworld/build\r\nScanning dependencies of target pythExec\r\n[ 50%] Building CXX object CMakeFiles/pythExec.dir/pythExec.cpp.o\r\n[100%] Linking CXX executable pythExec\r\n/home/anilkumar.av/pytorch-mobile/pytorch/build_android/install/lib/libc10.a(TensorImpl.cpp.o): In function `std::__ndk1::basic_ios<char, std::__ndk1::char_traits<char> >::init(std::__ndk1::basic_streambuf<char, std::__ndk1::char_traits<char> >*)':\r\n/home/anilkumar.av/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/ios:711: undefined reference to `std::__ndk1::ios_base::init(void*)'\r\n/home/anilkumar.av/pytorch-mobile/pytorch/build_android/install/lib/libc10.a(TensorImpl.cpp.o): In function `basic_streambuf':\r\n/home/anilkumar.av/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/streambuf:232: undefined reference to `std::__ndk1::locale::locale()'\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/36574",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-14T09:54:47Z",
    "updated_at": "2020-04-14T15:19:48Z",
    "user": "avanilkumar"
  },
  {
    "repo": "pytorch/vision",
    "number": 2101,
    "title": "Where to download torchvision0.5.1 .whl files",
    "body": "Hi,\r\nI would like to download the torchvision 0.5.1 version but I cannot find a source to download the .whl file.\r\nIt is not in pypi.org nor in pytorch.org, nor anaconda.org.\r\n\r\nI have proxy issues on my computer so I can not use pip command, I need to download the .whl file first.\r\nCan you help me by giving an address of the 0.5.1 version? or some other hint to solve this? Thank you.",
    "url": "https://github.com/pytorch/vision/issues/2101",
    "state": "closed",
    "labels": [
      "question",
      "topic: binaries"
    ],
    "created_at": "2020-04-14T09:12:26Z",
    "updated_at": "2020-04-14T13:32:57Z",
    "user": "300LiterPropofol"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 36554,
    "title": "How to save sth in python-api pytorch, but load it in libtorch?",
    "body": "How can I save some tensor in python, but load it in libtorch:\r\n\r\nI save tensor named piror using python, using the code:\r\n```\r\ntorch.save(prior,  'prior.pth')\r\n```\r\nAnd I load the tensor in libtorch using C++, by the following code:\r\n```\r\nstd::vector<torch::Tensor> tensorVec;\r\ntorch::load(tensorVec, \"/app/model/prior.pth\");\r\ntorch::Tensor priors = tensorVec[0];\r\n```\r\nBut I got the error:\r\nterminate called after throwing an instance of 'c10::Error'\r\n  what():  `torch::jit::load()` received a file from `torch.save()`, but `torch::jit::load()` can only load files produced by `torch.jit.save()` (load at ../torch/csrc/jit/serialization/import.cpp:285)\r\n\r\nWhy is that? And what should I do to solve the issue? Thanks in advance.\n\ncc @suo @yf225",
    "url": "https://github.com/pytorch/pytorch/issues/36554",
    "state": "closed",
    "labels": [
      "oncall: jit",
      "module: cpp",
      "module: serialization"
    ],
    "created_at": "2020-04-14T02:14:09Z",
    "updated_at": "2020-04-14T14:31:07Z",
    "user": "Edwardmark"
  },
  {
    "repo": "pytorch/serve",
    "number": 192,
    "title": "Steps for how to preserve model store state across docker container restarts",
    "body": "When running torchserve in docker containers, provide steps for how to preserve state across container restarts",
    "url": "https://github.com/pytorch/serve/issues/192",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2020-04-12T21:37:27Z",
    "updated_at": "2022-02-09T23:49:05Z",
    "user": "chauhang"
  },
  {
    "repo": "pytorch/serve",
    "number": 191,
    "title": "Add steps for how to run gpu docker container",
    "body": "Please add the steps for running GPU docker container in the docker readme. Steps should describe how to specify the gpus to be used on a multi-gpu machine \r\n\r\neg \r\n\r\n`docker run --rm -it --gpus device=0 -p 8080:8080 -p 8081:8081  torchserve:v0.1-gpu-latest`\r\n\r\nwhere device=0,1,2,3 selects GPUs indexed by ordinals 0,1,2 and 3, respectively. torchserve will see only these GPUs. If you specify device=all, then the torchserve will see all the available GPUs.\r\n",
    "url": "https://github.com/pytorch/serve/issues/191",
    "state": "closed",
    "labels": [
      "documentation"
    ],
    "created_at": "2020-04-12T20:05:15Z",
    "updated_at": "2020-06-09T23:47:47Z",
    "user": "chauhang"
  },
  {
    "repo": "pytorch/vision",
    "number": 2095,
    "title": "Unable to reproduce Faster RCNN evaluation metrics on pascal voc 2010 for Object Detection ",
    "body": "Hi Everyone,\r\n\r\nI am training the **pretrained Faster RCNN model** on PASCAL VOC 2010 dataset for Object Detection by following this pyTorch finetuning tutorial: [pytorch.org/tutorials/intermediate/torchvision_tutorial.html](https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html)\r\n\r\n```\r\nmodel = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)\r\n    \r\nin_features = model.roi_heads.box_predictor.cls_score.in_features\r\nmodel.roi_heads.box_predictor = FastRCNNPredictor(in_features, num_classes=21)\r\n```\r\nI also tried changing backbone to mobilenet_v2 as described in the above tutorial but results were much worse.\r\n\r\nI am using this dataset loading code with a batch size of 2: [https://github.com/pytorch/vision/issues/1097#issuecomment-508917489](https://github.com/pytorch/vision/issues/1097#issuecomment-508917489). I am also using RandomHorizontalFlip transformation while training. I train the models using the code in the tutorial ([github.com/pytorch/vision/blob/master/references/detection/engine.py](https://github.com/pytorch/vision/blob/master/references/detection/engine.py)).\r\n\r\nThe model performance on val dataset degrades after 5th epoch and the best **mAP** I could get is about **47%** which is much less than the expected performance (69.9%). Please note that I train on train split and evaluate on val split whereas in the paper, the model is trained on trainval and tested on test split but I don't think this can lead to such a reduction of performance.\r\n```\r\nparams = [p for p in model.parameters() if p.requires_grad]\r\noptimizer = torch.optim.SGD(params, lr=0.0001, momentum=0.9, weight_decay=0.005)\r\n\r\n# optimizer = torch.optim.Adam(params, lr=0.0001, weight_decay=0.005)\r\n# Adam gives much worse results (< 10% mAP!) for some reason!\r\n\r\nfor epoch in range(30):\r\n    train_one_epoch(model, optimizer, train_loader, device, epoch, print_freq=1000)\r\n    evaluate(model, val_loader, device=device)\r\n```\r\n\r\n```\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.472\r\n Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.768\r\n Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.522\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.188\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.402\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.518\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.412\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.599\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.607\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.318\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.535\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.650\r\n```\r\nCan anyone please help me resolve the issue? Do I have to make any changes to the default parameters in torchvision's faster_rcnn implementation?\r\n\r\n**Specifications:**\r\nPython - v3.7.3\r\npyTorch - v1.3.0\r\ntorchvision - v0.4.1\r\nCUDA - v10.1\r\nGPU - NVIDIA GeForce RTX 2080 8GB\r\n\r\nThanks for your time!",
    "url": "https://github.com/pytorch/vision/issues/2095",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: object detection"
    ],
    "created_at": "2020-04-12T03:26:34Z",
    "updated_at": "2020-04-25T00:31:08Z",
    "user": "kevalmorabia97"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 36384,
    "title": "[quantization] how to quantize model which include not support to quantize layer",
    "body": "Hi, I have a model which include `prelu` layer, not support to quantize in current pytorch version, how to  quantize this model for x86 CPU now?  I try to define this model with the following format: \r\n```python\r\nself.convbn1 = QuantizableConvBNBlock(xxx) (has defined)\r\nself.prelu = nn.PReLU()\r\nself.convbn2 = QuantizableConvBNBlock(xxx)        \r\nself.quant = torch.quantization.QuantStub()\r\nself.dequant = torch.quantization.DeQuantStub()\r\n        \r\ndef forward(self, x):\r\n    x = self.quant(x)\r\n    x = self.convbn1(x) \r\n    x = self.dequant(x)\r\n    x = self.prelu(x)\r\n    x = self.quant(x)\r\n    x = self.convbn2(x)\r\n    ...\r\n```\r\nbut I found after perform the quantization-aware training following tutorial, eval result is very terrible, what is the reason and how to solve it ?\r\nThanks            ",
    "url": "https://github.com/pytorch/pytorch/issues/36384",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-10T13:24:18Z",
    "updated_at": "2020-04-13T04:19:47Z",
    "user": "zhangyongwei93"
  },
  {
    "repo": "pytorch/vision",
    "number": 2089,
    "title": "How to use torchvision.ops.nms in cpp?",
    "body": "How to use torchvision.ops.nms in cpp?\r\nWhat should I include and how to call the funciton? Any doc?",
    "url": "https://github.com/pytorch/vision/issues/2089",
    "state": "closed",
    "labels": [
      "help wanted",
      "module: documentation",
      "module: c++ frontend"
    ],
    "created_at": "2020-04-10T09:57:56Z",
    "updated_at": "2021-02-08T13:19:28Z",
    "user": "Edwardmark"
  },
  {
    "repo": "pytorch/ELF",
    "number": 165,
    "title": "How to parse SGF files analyzed by ELF GO",
    "body": "Hi, I want to ask for more detailed information about SGF files provided in the Facebook elf-go tools.\r\n\r\nhttps://ai.facebook.com/tools/elf-opengo\r\nIn the above link, SGF files analyzed by elf-go are provided and I want to analyze those files.\r\nMore specifically SGF files in the link below.\r\nhttps://dl.fbaipublicfiles.com/elfopengo/analysis/data/gogod_commentary_sgfs.gzip\r\n\r\nThe format is slightly different from typical SGF files. Each line in the recorded move includes additional tree structured information generated by elf-go.\r\nBut I cannot find detailed information about the format of the file nor how to parse them.\r\nCan I get a parser for these files? Or any detailed instructions on how to parse them correctly?\r\n\r\nThank you.",
    "url": "https://github.com/pytorch/ELF/issues/165",
    "state": "open",
    "labels": [],
    "created_at": "2020-04-10T08:32:52Z",
    "updated_at": "2020-04-10T08:32:52Z",
    "user": "mibastro"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 36367,
    "title": "how to ensure the quality of pytorch framework?",
    "body": "Hi, I am a postgrad student, and I am developing my own deep-learning framework inside my lab, I just curious about how you guys maintained your framwork?Besides unit tests, is there any methods that can guarantee qulity?",
    "url": "https://github.com/pytorch/pytorch/issues/36367",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-10T05:02:35Z",
    "updated_at": "2020-04-13T04:14:45Z",
    "user": "MountainHil"
  },
  {
    "repo": "pytorch/ios-demo-app",
    "number": 14,
    "title": "how to quantize the mobilenet",
    "body": "would you please provide the steps to quantize the mobilenet?\r\n\r\nhttps://github.com/pytorch/ios-demo-app/blob/master/PyTorchDemo/PyTorchDemo/ImageClassification/model/mobilenet_quantized.pt",
    "url": "https://github.com/pytorch/ios-demo-app/issues/14",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-09T10:32:56Z",
    "updated_at": "2020-12-16T07:38:59Z",
    "user": "ronjian"
  },
  {
    "repo": "pytorch/vision",
    "number": 2083,
    "title": "COCO AP of FPN with ResNet-50 backbone for object detection",
    "body": "Hi @fmassa, thanks for the great codes.\r\nI am confused about COCO AP of `Faster R-CNN ResNet-50 FPN`,\r\nfrom [Document](https://pytorch.org/docs/stable/torchvision/models.html) and #925 and [Source Code](https://github.com/pytorch/vision/blob/master/references/detection/train.py#L156,L173),\r\nI guess that the model `Faster R-CNN ResNet-50 FPN` was trained with following hyperparameters and got AP 37.0, am I right?\r\n\r\n| Repo                           | Network    | box AP | scheduler | epochs | lr-steps        | batch size | lr         |\r\n|:-----------------------------:|:-------------:|:----------:|:-------------:|:---------:|:----------------:|:--------------:|:--------:|\r\n| vision                          | R-50 FPN | 37.0      | **2x**       | 26        | 16, 22          | 16             | 0.02    |\r\n\r\n> batch_size = 2 * 8 (NUM_GPU) = 16\r\n\r\nHowever, I noticed that the box AP in [maskrcnn-benchmark](https://github.com/facebookresearch/maskrcnn-benchmark/blob/master/MODEL_ZOO.md#end-to-end-faster-and-mask-r-cnn-baselines) and [Detectron](https://github.com/facebookresearch/Detectron/blob/master/MODEL_ZOO.md#end-to-end-faster--mask-r-cnn-baselines) seems to have better performance as below:\r\n\r\n| Repo                           | Network    | box AP | scheduler | epochs | lr-steps        | batch size | lr         |\r\n|:-----------------------------:|:-------------:|:----------:|:-------------:|:---------:|:-----------------:|:--------------:|:--------:|\r\n| maskrcnn-benchmark | R-50 FPN | 36.8      | **1x**       | 12.28   | 8.19, 10.92   | 16             | 0.02    |\r\n| Detectron                    | R-50 FPN | 36.7      | **1x**       | 12.28   | 8.19, 10.92   | 16             | 0.02    |\r\n| Detectron                    | R-50 FPN | 37.9      | **2x**       | 24.56   | 16.37, 21.83 | 16             | 0.02    |\r\n\r\n> from [maskrcnn-benchmark 1x config](https://github.com/facebookresearch/maskrcnn-benchmark/blob/master/configs/e2e_faster_rcnn_R_50_FPN_1x.yaml)\r\n> epochs = 90000 (steps) * 16 (batch size) / 117266 (training images per epoch) = 12.28\r\n> btw, COCO2017 has 118287 training images but only 117266 training images contain at least one object\r\n\r\nI would like to know what causes this gap?\r\n\r\n- 37.0 (torchvision 2x) vs 36.8 (maskrcnn-benchmark 1x)\r\n- 37.0 (torchvision 2x) vs 37.9 (Detectron 2x)\r\n\r\nBesides, could I have the result which trained with scheduler 1x?\r\n\r\n| Repo                           | Network    | box AP | scheduler | epochs | lr-steps        | batch size | lr         |\r\n|:-----------------------------:|:-------------:|:----------:|:-------------:|:---------:|:----------------:|:--------------:|:--------:|\r\n| vision                          | R-50 FPN | ??         | **1x**       | 13        | 8, 11            | 16             | 0.02    |\r\n\r\nThank you!",
    "url": "https://github.com/pytorch/vision/issues/2083",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-04-09T03:44:06Z",
    "updated_at": "2020-04-27T00:59:56Z",
    "user": "potterhsu"
  },
  {
    "repo": "pytorch/vision",
    "number": 2082,
    "title": "Does vision cpp api support half cuda precision ?",
    "body": "Does vision cpp api support half cuda precision ?\r\nI see that in the CMakelist.txt, it used flags as -D__CUDA_NO_HALF_OPERATORS_.\r\nhttps://github.com/pytorch/vision/blob/master/CMakeLists.txt#L10",
    "url": "https://github.com/pytorch/vision/issues/2082",
    "state": "closed",
    "labels": [
      "question",
      "module: c++ frontend"
    ],
    "created_at": "2020-04-09T03:29:21Z",
    "updated_at": "2020-04-16T06:49:46Z",
    "user": "Edwardmark"
  },
  {
    "repo": "pytorch/vision",
    "number": 2079,
    "title": "batch normalization affects model.eval's prediction",
    "body": "## \ud83d\udc1b Bug\r\nI'm not entirely sure if I maybe do not miss something VERY obvious here, feel free to tell me if that is the case, however I think it might be a bug: Batch normalization should only affect the input during training. However, I find with an easy experiment, that this is not the case. Note that dropout is not applied.\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n0. generate Input \"input_\"\r\n1. initialize model densenet121\r\n2. set model to eval mode and predict using prediction1 = model(input_)\r\n3. set model to training mode\r\n4. predict something (without model update!)\r\n5. set model to eval mode again\r\n6. predict class from the same input prediction2 = model(input_)\r\n7. note that there was no weight update and the prediction1 != prediction2\r\n\r\n```python\r\nfrom torchvision import models\r\nimport torch\r\n\r\ndef set_parameter_requires_grad(model):\r\n    for param in model.parameters():\r\n        param.requires_grad = False\r\n\r\nif __name__ == \"__main__\":\r\n    model = models.densenet121(pretrained=True)\r\n    set_parameter_requires_grad(model)\r\n    input_ = torch.zeros((1,3, 224, 224))\r\n    model.eval()\r\n    eval_value = model(input_)\r\n    model.train()\r\n    another_variable = model(input_)\r\n    model.eval()\r\n    eval_value_2 = model(input_)\r\n\r\n    print(eval_value[0,0:3])\r\n    print(eval_value_2[0,0:3])\r\n\r\n###### RETURNS######\r\ntensor([-0.3295,  0.2166, -0.6806])\r\ntensor([-0.5839,  0.4981, -0.4104])\r\n```\r\n\r\n\r\n## Expected behavior\r\n\r\nI expected the model to be independent from batch normalization during model.eval(), i.e. prediction1 == prediction2\r\n\r\n## Environment\r\n\r\ntested on ubuntu 1804 and windows 10 using python 3.7, torchvision 0.5.0 and torch 1.4.0\r\n\r\n__\r\nEdit: I'm stupid. The batch normalization layers apply the statistics seen in the training during the evaluation. I closed this issue.",
    "url": "https://github.com/pytorch/vision/issues/2079",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-04-08T19:27:33Z",
    "updated_at": "2020-04-09T10:09:54Z",
    "user": "dnns92"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 37,
    "title": "Should the compiler check to see if modules are in eval mode?",
    "body": "",
    "url": "https://github.com/pytorch/TensorRT/issues/37",
    "state": "closed",
    "labels": [
      "question",
      "component: core"
    ],
    "created_at": "2020-04-07T22:03:59Z",
    "updated_at": "2020-05-28T20:33:41Z",
    "user": "narendasan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 36132,
    "title": "how to get cuda stream in torch 1.5?",
    "body": "I previous using this get cuda stream:\r\n\r\n```\r\nmodulated_deformable_col2im_coord_cuda(THCState_getCurrentStream(state),\r\n```\r\n\r\nI found this API gone `THCState_getCurrentStream` without even a deprecation warning, what's the altinate of this API?\r\nin torch 1.5?\n\ncc @yf225",
    "url": "https://github.com/pytorch/pytorch/issues/36132",
    "state": "closed",
    "labels": [
      "module: cpp",
      "triaged"
    ],
    "created_at": "2020-04-07T06:59:27Z",
    "updated_at": "2020-04-09T03:21:48Z",
    "user": "lucasjinreal"
  },
  {
    "repo": "pytorch/text",
    "number": 723,
    "title": "How to use custom parsers in Torchtext",
    "body": " I would like to use custom parser like nltk in torchtext, how to do that? \r\n",
    "url": "https://github.com/pytorch/text/issues/723",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-05T07:56:22Z",
    "updated_at": "2022-06-24T00:15:05Z",
    "user": "nawshad"
  },
  {
    "repo": "pytorch/vision",
    "number": 2063,
    "title": "Wrong lr schedule in semantic segmentation sample?",
    "body": "Hi! I am using the semantic segmentation reference training scripts and I think I found an issue with the lr scheduler.\r\n \r\nIn the documentation of [torch.optim.lr_scheduler.LambdaLR](https://pytorch.org/docs/stable/optim.html#torch.optim.lr_scheduler.LambdaLR) it says that the lambda function receives an integer parameter epoch, but in the training reference script it looks that the parameter `x` is used as if it was the global step: https://github.com/pytorch/vision/blob/e61538cba036c42bab23ce8f9d205da9889977ae/references/segmentation/train.py#L158\r\nIf I understand it correctly, this is the poly learning rate policy used in [DeepLab](https://arxiv.org/pdf/1606.00915.pdf), so I think that instead it should be:\r\n```python\r\nlambda x: (1 - x / args.epochs) ** 0.9)\r\n```\r\nAlso, it'd be interesting to have a way of changing the learning rate at the finer resolution of iterations, instead of epochs.\r\n\r\n@fmassa what do you think?",
    "url": "https://github.com/pytorch/vision/issues/2063",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts"
    ],
    "created_at": "2020-04-04T17:56:02Z",
    "updated_at": "2020-04-06T13:26:57Z",
    "user": "oscmansan"
  },
  {
    "repo": "pytorch/text",
    "number": 722,
    "title": "How to load a word embedding dictionary using torchtext",
    "body": "Hi,\r\n\r\nI have tried to write that to a gensim word2vec format then load, but it throws error about string to float conversion. Is there a standard way to use custom pre-trained embedding (not created through gensim) which is a python dictionary to load using torchtext?\r\n\r\nThanks,\r\n",
    "url": "https://github.com/pytorch/text/issues/722",
    "state": "open",
    "labels": [],
    "created_at": "2020-04-04T01:05:08Z",
    "updated_at": "2020-04-06T15:57:47Z",
    "user": "nawshad"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 35877,
    "title": "How to use a network B to obtain a tensor and use it to replace the weight of a layer of network A, and this back propagation process will train A and B",
    "body": "## \u2753 Questions and Help\r\n\r\n### How to use a network B to obtain a tensor and use it to replace the weight of a layer of network A and this backpropagation process will train A and B\u3002\r\n\r\nI make a code, which uses the weight of a layer of network A as input into network B. then B output a tensor and I use it to replace the weight of a layer of the network A. But I find the weight only needs the type of nn.Parameter() and I convert the tensor to Parameter type, but I find the weight of network B does not get an update. Can you help me please!  \r\n\r\nIt's noted that I want to train the weight of network B by the loss of the network A.\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/35877",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-02T13:28:13Z",
    "updated_at": "2020-04-06T17:09:36Z",
    "user": "syiswell"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 924,
    "title": "5x5 kernel size instead of 3x3?",
    "body": "Hi, I just read this tutorial on your official website [NEURAL NETWORKS](https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html#sphx-glr-beginner-blitz-neural-networks-tutorial-py)\r\nand think according to the image and the following code, maybe the kernel size of the first convolution layer should be 5x5 instead of 3x3.\r\nIf we follow [this formula](https://stackoverflow.com/questions/44193270/how-to-calculate-the-output-size-after-convolving-and-pooling-to-the-input-image) and by default the argument of **conv2d** is **padding = 0** and **stride = 1**, we have\r\n* **1st conv2d with 5x5 kernel**: 32x32 -> 28x28\r\n* **1st max pooling**: 28x28 -> 14x14\r\n* **2nd conv2d with 3x3 kernel**: 14x14 -> 12x12\r\n* **2nd max pooling**: 12x12 -> 6x6\r\n\r\nWhich will explain both the image and the following linear layer (6x6 image dimension) in your code.\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/924",
    "state": "closed",
    "labels": [],
    "created_at": "2020-04-02T08:36:52Z",
    "updated_at": "2021-04-26T20:13:45Z",
    "comments": 1,
    "user": "sudo-bcli"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 34,
    "title": "What the advantages of TRTorch? ",
    "body": "I used to use torch2trt to convert pytorch module, could you explain the advatage over torch2trt? \r\n\r\nIf the model contain op that tensorrt don't support, can trtorch convert it to engine? \r\nOtherwise run the op supported by tensorrt with tensorrt, and other use libtorch?\r\n\r\nI really appreciate for your great works, if you can answer my doubts, I will be very grateful.",
    "url": "https://github.com/pytorch/TensorRT/issues/34",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-04-01T10:07:45Z",
    "updated_at": "2020-05-28T20:33:19Z",
    "user": "dancingpipi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 35759,
    "title": "how to do 3d data augmentation in parallel on the gpu?",
    "body": "I have a lot of 3d data and need to do various data augmentation. I want to do data augmentation in parallel on the gpu, but it seems that pytorch does not allow gpu operation in the dataloader. Is there any good way?\r\n\n\ncc @ngimel @SsnL",
    "url": "https://github.com/pytorch/pytorch/issues/35759",
    "state": "open",
    "labels": [
      "module: dataloader",
      "module: cuda",
      "triaged"
    ],
    "created_at": "2020-03-31T15:25:22Z",
    "updated_at": "2020-04-01T13:23:34Z",
    "user": "chuxiang93"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 918,
    "title": "Saving the weights",
    "body": "After training for certain iterations. How to save the weights, Which can be used for further analysis",
    "url": "https://github.com/pytorch/tutorials/issues/918",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-31T08:39:49Z",
    "updated_at": "2021-06-08T21:29:42Z",
    "comments": 1,
    "user": "SRIKARHI"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 28,
    "title": "How can I build TRTorch without network?",
    "body": "as the title.",
    "url": "https://github.com/pytorch/TensorRT/issues/28",
    "state": "closed",
    "labels": [
      "question",
      "component: build system"
    ],
    "created_at": "2020-03-30T08:15:49Z",
    "updated_at": "2020-04-24T17:29:30Z",
    "user": "dancingpipi"
  },
  {
    "repo": "pytorch/ELF",
    "number": 163,
    "title": "How to use ELF in Sabaki or gogui?",
    "body": "Could anybody help tell me how to use ELF OpenGo with Sabaki or gogui?\r\ndon't use weight of  leelazero-elf.",
    "url": "https://github.com/pytorch/ELF/issues/163",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-28T11:37:49Z",
    "updated_at": "2020-05-21T06:43:16Z",
    "user": "herogan2017"
  },
  {
    "repo": "pytorch/vision",
    "number": 2021,
    "title": "IndexError: list index out of range",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. Run the [TorchVision Object Detection Finetuning Tutorial](https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html). \r\n2. For the model, I used the instructions for \r\n\r\n> 2. Modifying the model to add a different backbone\r\n\r\nBut I keep getting the following error:\r\n\r\n`---------------------------------------------------------------------------\r\nIndexError                                Traceback (most recent call last)\r\n<ipython-input-16-159df024665a> in <module>\r\n      4 for epoch in range(num_epochs):\r\n      5     # train for one epoch, printing every 10 iterations\r\n----> 6     train_one_epoch(model, optimizer, train_loader, device, epoch, print_freq=10)\r\n      7     # update the learning rate\r\n      8     lr_scheduler.step()\r\n\r\n/Volumes/Samsung_T5/OneDrive - Coventry University/detector/faster_rcnn_v23/engine.py in train_one_epoch(model, optimizer, data_loader, device, epoch, print_freq)\r\n     28         targets = [{k: v.to(device) for k, v in t.items()} for t in targets]\r\n     29 \r\n---> 30         loss_dict = model(imgs1, targets)\r\n     31 \r\n     32         losses = sum(loss for loss in loss_dict.values())\r\n\r\n~/opt/miniconda3/envs/torch/lib/python3.8/site-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)\r\n    530             result = self._slow_forward(*input, **kwargs)\r\n    531         else:\r\n--> 532             result = self.forward(*input, **kwargs)\r\n    533         for hook in self._forward_hooks.values():\r\n    534             hook_result = hook(self, input, result)\r\n\r\n~/opt/miniconda3/envs/torch/lib/python3.8/site-packages/torchvision/models/detection/generalized_rcnn.py in forward(self, images, targets)\r\n     69             features = OrderedDict([('0', features)])\r\n     70         proposals, proposal_losses = self.rpn(images, features, targets)\r\n---> 71         detections, detector_losses = self.roi_heads(features, proposals, images.image_sizes, targets)\r\n     72         detections = self.transform.postprocess(detections, images.image_sizes, original_image_sizes)\r\n     73 \r\n\r\n~/opt/miniconda3/envs/torch/lib/python3.8/site-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)\r\n    530             result = self._slow_forward(*input, **kwargs)\r\n    531         else:\r\n--> 532             result = self.forward(*input, **kwargs)\r\n    533         for hook in self._forward_hooks.values():\r\n    534             hook_result = hook(self, input, result)\r\n\r\n~/opt/miniconda3/envs/torch/lib/python3.8/site-packages/torchvision/models/detection/roi_heads.py in forward(self, features, proposals, image_shapes, targets)\r\n    754             matched_idxs = None\r\n    755 \r\n--> 756         box_features = self.box_roi_pool(features, proposals, image_shapes)\r\n    757         box_features = self.box_head(box_features)\r\n    758         class_logits, box_regression = self.box_predictor(box_features)\r\n\r\n~/opt/miniconda3/envs/torch/lib/python3.8/site-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)\r\n    530             result = self._slow_forward(*input, **kwargs)\r\n    531         else:\r\n--> 532             result = self.forward(*input, **kwargs)\r\n    533         for hook in self._forward_hooks.values():\r\n    534             hook_result = hook(self, input, result)\r\n\r\n~/opt/miniconda3/envs/torch/lib/python3.8/site-packages/torchvision/ops/poolers.py in forward(self, x, boxes, image_shapes)\r\n    186         rois = self.convert_to_roi_format(boxes)\r\n    187         if self.scales is None:\r\n--> 188             self.setup_scales(x_filtered, image_shapes)\r\n    189 \r\n    190         scales = self.scales\r\n\r\n~/opt/miniconda3/envs/torch/lib/python3.8/site-packages/torchvision/ops/poolers.py in setup_scales(self, features, image_shapes)\r\n    159         # get the levels in the feature map by leveraging the fact that the network always\r\n    160         # downsamples by a factor of 2 at each level.\r\n--> 161         lvl_min = -torch.log2(torch.tensor(scales[0], dtype=torch.float32)).item()\r\n    162         lvl_max = -torch.log2(torch.tensor(scales[-1], dtype=torch.float32)).item()\r\n    163         self.scales = scales\r\n\r\nIndexError: list index out of range`\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\nI tried different models and adjusted the actors and scales, but keep getting this error. \r\n\r\n## Environment\r\n\r\n```\r\nPyTorch version: 1.4.0\r\nIs debug build: No\r\nCUDA used to build PyTorch: None\r\n\r\nOS: Mac OSX 10.15.3\r\nGCC version: Could not collect\r\nCMake version: Could not collect\r\n\r\nPython version: 3.8\r\nIs CUDA available: No\r\nCUDA runtime version: No CUDA\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\n\r\nVersions of relevant libraries:\r\n[pip] numpy==1.18.1\r\n[pip] torch==1.4.0\r\n[pip] torchvision==0.5.0\r\n[conda] blas                  ",
    "url": "https://github.com/pytorch/vision/issues/2021",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-03-26T16:27:03Z",
    "updated_at": "2024-03-26T17:41:15Z",
    "user": "17sarf"
  },
  {
    "repo": "pytorch/vision",
    "number": 2019,
    "title": "How to plot masks of maskrcnn? ",
    "body": "Hello,\r\n\r\nDoes someone know how to plot masks of maskrcnn? In the output of maskrcnn_inference in roi_heads.py mask_logits pass through sigmoid to become mask_probs and its output_size is generally very small to correctly see anything (28*28 by default, which is defined in the roi_align parameters). I tried to binarize this mask_probs using cv2.threshold (with threshold value equals to np.median of mask_probs) then convert to polygon with cv2.findcontours and finally resize it in the image shape but the results are not good. \r\n\r\nThanks",
    "url": "https://github.com/pytorch/vision/issues/2019",
    "state": "closed",
    "labels": [
      "question",
      "topic: object detection",
      "module: utils"
    ],
    "created_at": "2020-03-26T15:19:47Z",
    "updated_at": "2021-05-06T13:27:06Z",
    "user": "leglandudu69"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 35372,
    "title": "How to support single-process-multiple-devices in DistributedDataParallel other than CUDA device",
    "body": "Hi,\r\n\r\nI am investigating to extend the DistributedDataParallel to other accelerator devices than CUDA devices.\r\nNot only to support single-process-single-device but also to support the single-process-multiple-devices and multple-processes-multiple-devices.\r\n\r\nThere are a lot of CUDA dependency in the DistributedDataParallel.\r\n\r\nMy question is:\r\n1. How to override CUDA logical dependency and dispatch the gather and scatter (and other APIs used) to the c10d backend without modifying the distributed.py ?  [https://github.com/pytorch/pytorch/blob/master/torch/nn/parallel/distributed.py](url)\r\n \r\n\r\n\n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23",
    "url": "https://github.com/pytorch/pytorch/issues/35372",
    "state": "open",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2020-03-25T08:52:08Z",
    "updated_at": "2021-06-04T13:57:34Z",
    "user": "JohnLLLL"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 905,
    "title": "prune: model sparity increase,but inference time doesn't cut down",
    "body": "`prune.l1_unstructured(conv_module, name='weight', amount=0.8)<br>prune.remove(conv_module, 'weight')`\r\n\r\nwith these two function, I process all module with convolution,and their sparsity become 80%.\r\nbut the model inference time incease. Is it expected ?\r\nand another question is that after prune,I save model with:\r\n\r\n`torch.save(model.state_dict(), 'new_model.pth')`\r\nand then ,load the save model,it's module sparsity go back to 0 , How to save pruned model correctly ?\r\nThank you !",
    "url": "https://github.com/pytorch/tutorials/issues/905",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-25T02:26:48Z",
    "updated_at": "2021-06-08T22:05:51Z",
    "comments": 1,
    "user": "gyc-code"
  },
  {
    "repo": "huggingface/transformers",
    "number": 3424,
    "title": "Where is the code of Bart fine-tuning?Thanks",
    "body": "",
    "url": "https://github.com/huggingface/transformers/issues/3424",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-25T01:54:34Z",
    "updated_at": "2020-04-16T15:03:10Z",
    "user": "qiunlp"
  },
  {
    "repo": "pytorch/examples",
    "number": 742,
    "title": "No saved *.png in checkpoint in dcgan.cpp",
    "body": "In the README file of \"DCGAN Example with the PyTorch C++ Frontend\" it says that:\r\n\r\n_The training script periodically generates image samples. Use the display_samples.py script situated in this folder to generate a plot image. For example:_\r\n\r\nBut the dcgan.cpp file just saves the model in *.pt format, doesnt save any picture. Then, the command stated in the README:\r\n```\r\n$ python display_samples.py -i dcgan-sample-10.png\r\nSaved out.png\r\n```\r\nGives an error as ```dcgan-sample-10.png``` doesnt exist",
    "url": "https://github.com/pytorch/examples/issues/742",
    "state": "open",
    "labels": [
      "bug",
      "help wanted"
    ],
    "created_at": "2020-03-24T15:15:32Z",
    "updated_at": "2023-04-20T20:59:19Z",
    "comments": 3,
    "user": "hect1995"
  },
  {
    "repo": "pytorch/vision",
    "number": 2007,
    "title": "Learning rate become 0",
    "body": "my lr was 0.0001\r\n\r\nBut after some epoch it become zero.\r\n\r\nEpoch: [15]  [  0/209]  eta: 0:03:06  lr: 0.000000  loss: 0.5737 (0.5737)  loss_classifier: 0.0601 (0.0601)  loss_box_reg: 0.0831 (0.0831)  loss_mask: 0.4023 (0.4023)  loss_objectness: 0.0062 (0.0062)  loss_rpn_box_reg: 0.0221 (0.0221)  time: 0.8938  data: 0.2370  max mem: 6450\r\nEpoch: [15]  [ 10/209]  eta: 0:02:13  lr: 0.000000  loss: 0.5818 (0.6080)  loss_classifier: 0.0609 (0.0621)  loss_box_reg: 0.0782 (0.0759)  loss_mask: 0.4273 (0.4496)  loss_objectness: 0.0061 (0.0073)  loss_rpn_box_reg: 0.0119 (0.0132)  time: 0.6731  data: 0.0303  max mem: 6450\r\nEpoch: [15]  [ 20/209]  eta: 0:02:05  lr: 0.000000  loss: 0.5848 (0.5937)  loss_classifier: 0.0595 (0.0620)  loss_box_reg: 0.0693 (0.0756)  loss_mask: 0.4273 (0.4355)  loss_objectness: 0.0060 (0.0068)  loss_rpn_box_reg: 0.0118 (0.0138)  time: 0.6527  data: 0.0096  max mem: 6450\r\nEpoch: [15]  [ 30/209]  eta: 0:01:59  lr: 0.000000  loss: 0.5848 (0.5950)  loss_classifier: 0.0616 (0.0626)  loss_box_reg: 0.0710 (0.0762)  loss_mask: 0.4182 (0.4338)  loss_objectness: 0.0065 (0.0087)  loss_rpn_box_reg: 0.0106 (0.0137)  time: 0.6611  data: 0.0098  max mem: 6450\r\nEpoch: [15]  [ 40/209]  eta: 0:01:50  lr: 0.000000  loss: 0.5718 (0.5921)  loss_classifier: 0.0639 (0.0642)  loss_box_reg: 0.0767 (0.0768)  loss_mask: 0.4173 (0.4295)  loss_objectness: 0.0072 (0.0086)  loss_rpn_box_reg: 0.0101 (0.0130)  time: 0.6396  data: 0.0092  max mem: 6450\r\nEpoch: [15]  [ 50/209]  eta: 0:01:43  lr: 0.000000  loss: 0.5703 (0.5907)  loss_classifier: 0.0640 (0.0655)  loss_box_reg: 0.0798 (0.0764)  loss_mask: 0.4035 (0.4259)  loss_objectness: 0.0062 (0.0098)  loss_rpn_box_reg: 0.0109 (0.0131)  time: 0.6363  data: 0.0088  max mem: 6450\r\n\r\ni am training on custom data with 2(1class+background) class.",
    "url": "https://github.com/pytorch/vision/issues/2007",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: object detection"
    ],
    "created_at": "2020-03-24T13:01:26Z",
    "updated_at": "2020-03-25T14:28:20Z",
    "user": "vivekdeepquanty"
  },
  {
    "repo": "pytorch/vision",
    "number": 2004,
    "title": "Suspicious results",
    "body": "## Questions about suspicious results \u2753\r\n\r\nI've trained MaskRCNN with a pre-trained ResNet50 to segment nuclei in immunofluorescence images. The results are really good, so thanks again for this terrific implementation.\r\n\r\nHowever, I've noticed in some cases that an object (here a nucleus) might be cut in multiple small parts (see bottom right part of the attached image).\r\n\r\n<img width=\"531\" alt=\"Capture d\u2019\u00e9cran 2020-03-23 \u00e0 15 27 27\" src=\"https://user-images.githubusercontent.com/6014800/77369519-0fcfa600-6d1c-11ea-820d-3186fc1bc037.png\">\r\n\r\nWe can observe that the nucleus labeled 247 is cut in multiple parts.\r\nI get that in most detection/segmentation applications, an object can partially obfuscate another one that is further in a scene. But, is it a normal behavior for this implementation?\r\n",
    "url": "https://github.com/pytorch/vision/issues/2004",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-03-23T22:38:10Z",
    "updated_at": "2020-03-24T18:18:58Z",
    "user": "FiReTiTi"
  },
  {
    "repo": "pytorch/FBGEMM",
    "number": 328,
    "title": "quantized matrix multiplication question",
    "body": "Could you please point me to a quantized matrix-matrix multiplication example in the test or benchmark directory ?   That is to say,\r\n\r\nC = A * B   // A, B, C are single-precision floating-point matrices \r\nC' = dequant (quant(A) * quant (B) )  // quant(A) and quant(B) are int8  matrices\r\n\r\nThanks",
    "url": "https://github.com/pytorch/FBGEMM/issues/328",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-03-23T04:03:40Z",
    "updated_at": "2022-03-18T06:43:26Z",
    "user": "jinz2014"
  },
  {
    "repo": "pytorch/examples",
    "number": 740,
    "title": "Question: How to cite your work",
    "body": "Hi,\r\n\r\nI am writing a paper that modifies the codes for the example of MNIST dataset in your repository. May I ask how you would prefer that I cite your work?\r\n\r\nThank you.\r\n\r\n ",
    "url": "https://github.com/pytorch/examples/issues/740",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-22T21:30:47Z",
    "updated_at": "2020-04-11T18:13:40Z",
    "user": "hql5143"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 35159,
    "title": "How to implement bmm between two sparse tensor",
    "body": "## \ud83d\ude80 Feature\r\n<!-- A clear and concise description of the feature proposal -->\r\n\r\n## Motivation\r\n\r\n<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->\r\n\r\n## Pitch\r\n\r\n<!-- A clear and concise description of what you want to happen. -->\r\n\r\n## Alternatives\r\n\r\n<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context or screenshots about the feature request here. -->\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/35159",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-21T16:57:58Z",
    "updated_at": "2020-03-23T18:46:54Z",
    "user": "xhcgit"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 35153,
    "title": "How to impove conv2d performance in cpu mode ",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\r\n1. when i use PIP to install pytorch, con2d perforamance is better\r\n\r\n2. when i down pytorch 1.0.0 source code in gitlab, bad performance\r\n\r\n3.USE_MKL or OPENMP or some other optimizition results in the performance difference?\r\n\r\n\r\nHere is  con2d op shape:\r\nConv2d(64, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\r\nway 1:\r\npytorch install:\r\nconda install pytorch-cpu==1.0.0 torchvision-cpu==0.2.1 cpuonly -c pytorch\r\nlog: the conv2D infer time :3.85 s\r\nway 2:\r\ndown pytorch 1.0.0 source code and compile with \"python setup.py install\"\r\nlog: the conv2D infer time :13.63 s\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/35153",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-21T07:33:23Z",
    "updated_at": "2020-03-23T09:04:07Z",
    "user": "daydayfun"
  },
  {
    "repo": "pytorch/examples",
    "number": 738,
    "title": "Neural Style fails if style image has an alpha channel",
    "body": "In `fast_neural_style/neural_style/neural_style.py` line 55, if the style image has an alpha channel, then the generated tensor has 4 dimensions and this causes `utils.normalize_batch` to throw due to a tensor dimension mismatch a few lines down.\r\n\r\nI've _fixed_ this by appending `.convert('RGB')` so line 55 now reads\r\n```\r\nstyle = utils.load_image(args.style_image, size=args.style_size).convert('RGB')\r\n```\r\nThe `ImageFolder` data loader does the same transformation, however, maybe a warning should be issued since it is the key file.",
    "url": "https://github.com/pytorch/examples/issues/738",
    "state": "open",
    "labels": [
      "help wanted"
    ],
    "created_at": "2020-03-20T17:00:20Z",
    "updated_at": "2022-03-09T21:48:53Z",
    "comments": 0,
    "user": "hackf5"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 899,
    "title": "How to apply torch.quantization.quantize_dynamic for conv2d layer?",
    "body": "I am working on quantizing resnet50 model. I tried to use the following command.\r\n\r\n```\r\nquantized_model = torch.quantization.quantize_dynamic(\r\n    resnet18, {torch.nn.Conv2d,torch.nn.Linear}, dtype=torch.qint8\r\n)\r\n```\r\n\r\nBut only the linear layer has quaantized but not the convolutional layer. Can anyone help me how to dynamically quantize the convolutional layer?",
    "url": "https://github.com/pytorch/tutorials/issues/899",
    "state": "open",
    "labels": [
      "quantization"
    ],
    "created_at": "2020-03-20T09:02:12Z",
    "updated_at": "2021-07-30T20:28:16Z",
    "user": "Midhilesh29"
  },
  {
    "repo": "pytorch/vision",
    "number": 1999,
    "title": "Request Mobilenet fpn",
    "body": "## \ud83d\ude80 Feature\r\nHi I want to write mobilenet fpn.\r\n## Motivation\r\n\r\nImprove MaskRCNN speed and accuracy.\r\n\r\n## Pitch\r\n\r\n<!-- A clear and concise description of what you want to happen. -->\r\n\r\n## Alternatives\r\n\r\n<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context or screenshots about the feature request here. -->\r\n\r\n## Code:\r\n**/torchvision/models/detection/backbone_utils.py**\r\n```\r\nfrom collections import OrderedDict\r\nfrom torch import nn\r\nfrom torchvision.ops.feature_pyramid_network import FeaturePyramidNetwork, LastLevelMaxPool\r\n\r\nfrom torchvision.ops import misc as misc_nn_ops\r\nfrom .._utils import IntermediateLayerGetter\r\nfrom .. import resnet\r\nfrom .. import mobilenet_v2\r\n\r\nfrom torchvision.models import mobilenet_v2 as MobileNetV2\r\nclass BackboneWithFPN(nn.Sequential):\r\n \r\n    def __init__(self, backbone, return_layers, in_channels_list, out_channels):\r\n        body = IntermediateLayerGetter(backbone, return_layers=return_layers)\r\n        fpn = FeaturePyramidNetwork(\r\n            in_channels_list=in_channels_list,\r\n            out_channels=out_channels,\r\n            extra_blocks=LastLevelMaxPool(),\r\n        )\r\n        super(BackboneWithFPN, self).__init__(OrderedDict(\r\n            [(\"body\", body), (\"fpn\", fpn)]))\r\n        self.out_channels = out_channels\r\n\r\n\r\ndef resnet_fpn_backbone(backbone_name, pretrained):\r\n    backbone = resnet.__dict__[backbone_name](\r\n        pretrained=pretrained,\r\n        norm_layer=misc_nn_ops.FrozenBatchNorm2d)\r\n    # freeze layers\r\n    for name, parameter in backbone.named_parameters():\r\n        if 'layer2' not in name and 'layer3' not in name and 'layer4' not in name:\r\n            parameter.requires_grad_(False)\r\n\r\n    return_layers = {'layer1': 0, 'layer2': 1, 'layer3': 2, 'layer4': 3}\r\n    in_channels_stage2 = backbone.inplanes // 8\r\n    in_channels_list = [\r\n        in_channels_stage2,\r\n        in_channels_stage2 * 2,\r\n        in_channels_stage2 * 4,\r\n        in_channels_stage2 * 8,\r\n    ]\r\n    out_channels = 256\r\n    return BackboneWithFPN(backbone, return_layers, in_channels_list, out_channels)\r\n\r\n\r\nclass FPNMobileNet(nn.Module):\r\n    def __init__(self, pretrained=True):\r\n        super().__init__()\r\n        net = MobileNetV2(pretrained)\r\n        self.features = net.features\r\n        self.layer1= nn.Sequential(*self.features[0:4])\r\n        self.layer2 = nn.Sequential(*self.features[4:7])\r\n        self.layer3 = nn.Sequential(*self.features[7:11])\r\n        self.layer4 = nn.Sequential(*self.features[11:19])\r\n        for param in self.features.parameters():\r\n            param.requires_grad = False\r\n\r\n\r\n    def forward(self, x):\r\n\r\n        # Bottom-up pathway, from ResNet\r\n        enc0 = self.layer1(x)\r\n\r\n        enc1 = self.layer2(enc0) # 256\r\n\r\n        enc2 = self.layer3(enc1) # 512\r\n\r\n        enc3 = self.layer4(enc2) # 1024\r\n\r\n        return enc3\r\n\r\ndef mobilenet_fpn_backbone(pretrained):\r\n    backbone = FPNMobileNet(pretrained)\r\n    print(backbone)\r\n    # freeze layers\r\n    for name, parameter in backbone.named_parameters():\r\n        if 'layer2' not in name and 'layer3' not in name and 'layer4' not in name:\r\n            parameter.requires_grad_(False)\r\n\r\n    return_layers = {'layer1': 0, 'layer2': 1, 'layer3': 2, 'layer4': 3}\r\n\r\n    in_channels_stage2 =1280 // 8\r\n    in_channels_list = [\r\n        in_channels_stage2,\r\n        in_channels_stage2 * 2,\r\n        in_channels_stage2 * 4,\r\n        in_channels_stage2 * 8,\r\n    ]\r\n    \r\n    out_channels = 256\r\n    return BackboneWithFPN(backbone, return_layers, in_channels_list, out_channels)\r\n\r\n```\r\n**/torchvision/models/detection/mobilenet_fpn.py**\r\n```\r\nfrom .backbone_utils import mobilenet_fpn_backbone\r\n\r\ndef fpn(pretrained = True):\r\n\tbackbone = mobilenet_fpn_backbone( pretrained)\r\n\treturn backbone\r\n\t\r\n```\r\n**demo.py**\r\n```from torchvision.models.detection import mobilenet_fpn\r\n   backbone = mobilenet_fpn.fpn(True)\r\n   backbone.eval()\r\n\r\n   x = torch.rand(1,3, 100, 100)\r\n   out = backbone(x)\r\n   print(out)\r\n\r\n\r\n```\r\n\r\n\r\n## Bug:\r\n\"RuntimeError: Given groups=1, weight of size 32 3 3 3, expected input[1, 1280, 4, 4] to have 3 channels, but got 1280 channels instead\"\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/1999",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection",
      "topic: feature extraction"
    ],
    "created_at": "2020-03-20T08:34:56Z",
    "updated_at": "2020-11-30T07:22:50Z",
    "user": "finnickniu"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 68,
    "title": "How to create a new nlp model?",
    "body": "Thanks for the project.\r\nThe example successful run on Android.\r\nHowever, I want to create my our model for other nlp tasks.\r\nSo, can you show me the way to create the nlp model? Or the source of creating model-reddit16-f140225004_2.pt1?\r\n",
    "url": "https://github.com/pytorch/android-demo-app/issues/68",
    "state": "open",
    "labels": [],
    "created_at": "2020-03-20T07:45:01Z",
    "updated_at": "2020-05-20T01:29:55Z",
    "user": "anbo724"
  },
  {
    "repo": "pytorch/vision",
    "number": 1986,
    "title": "Training scheme of the pretrained imagenet models?",
    "body": "Hi,\r\n\r\nAre the pretrained models reported by torchvision using the same hyper-parameters as https://github.com/pytorch/examples/blob/master/imagenet/main.py? I used the default hyper-parameters to train mobilenet_v2, but the results were much worse than reported.\r\n\r\nThanks\r\n",
    "url": "https://github.com/pytorch/vision/issues/1986",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "module: reference scripts"
    ],
    "created_at": "2020-03-15T09:16:29Z",
    "updated_at": "2020-03-19T18:43:05Z",
    "user": "tzm1003306213"
  },
  {
    "repo": "huggingface/transformers",
    "number": 3283,
    "title": "What is the most effective way to use BERT , ROBERTA , GPT-2 architectures as frozen feature extractors ?",
    "body": "We use pretrained self-supervised learning (SSL) models for NLP as feature extractors for downstream tasks like sentiment analysis. In most of such cases, we add a simple new classification layer and **fine-tune the whole model**.  With the SSL models getting bigger and the amount of unsupervised training data is huge it would be nice if we can use the problem agnostic behavior of SSL embeddings. In other words if we use them as **Frozen Feature extractors**, we can save lot of time and computational cost. \r\n\r\n**Have anyone seen a good review on using SSL networks as frozen feature extractors?**  ",
    "url": "https://github.com/huggingface/transformers/issues/3283",
    "state": "closed",
    "labels": [
      "Discussion",
      "wontfix"
    ],
    "created_at": "2020-03-15T09:06:20Z",
    "updated_at": "2020-06-02T09:15:03Z",
    "user": "shamanez"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 34775,
    "title": "How to do a split operation for dataset, not random split. I mean just like dataset[0:100] and dataset[100:200]]",
    "body": "How to do a split operation for dataset, not random split. I mean just like dataset[0:100] and dataset[100:200]]",
    "url": "https://github.com/pytorch/pytorch/issues/34775",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-15T02:28:33Z",
    "updated_at": "2020-03-15T02:37:14Z",
    "user": "HymEric"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 34773,
    "title": "How to write codes to support second order derivative (double backward) for custom CUDA extension",
    "body": "Hi,\r\n\r\nI am lost in figuring out how to compute second order derivatives for custom CUDA extensions after reading the [Extend Torch With Cpp and CUDA](https://pytorch.org/tutorials/advanced/cpp_extension.html). \r\n\r\nCould somebody tell me how to do this? Many thanks!",
    "url": "https://github.com/pytorch/pytorch/issues/34773",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-15T01:17:24Z",
    "updated_at": "2020-03-18T15:03:39Z",
    "user": "xieshuqin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 34720,
    "title": "Where is dd.h ?",
    "body": "\r\n```console\r\n....../pytorch/third_party/sleef/src/quad/sleefsimdqp.c:111:10: fatal error: dd.h: No such file or directory\r\n #include \"dd.h\"\r\n          ^~~~~~\r\ncompilation terminated.\r\nsleef/src/quad/CMakeFiles/sleefquadavx512f_obj.dir/build.make:70: recipe for target 'sleef/src/quad/CMakeFiles/sleefquadavx512f_obj.dir/sleefsimdqp.c.o' failed\r\nmake[2]: *** [sleef/src/quad/CMakeFiles/sleefquadavx512f_obj.dir/sleefsimdqp.c.o] Error 1\r\nmake[2]: Leaving directory '....../pytorch/build_18.04'\r\nCMakeFiles/Makefile2:4939: recipe for target 'sleef/src/quad/CMakeFiles/sleefquadavx512f_obj.dir/all' failed\r\nmake[1]: *** [sleef/src/quad/CMakeFiles/sleefquadavx512f_obj.dir/all] Error 2\r\nmake[1]: *** Waiting for unfinished jobs....\r\n....../pytorch/third_party/sleef/src/quad/sleefsimdqp.c:111:10: fatal error: dd.h: No such file or directory\r\n #include \"dd.h\"\r\n          ^~~~~~\r\ncompilation terminated.\r\nsleef/src/quad/CMakeFiles/sleefquadavx2_obj.dir/build.make:70: recipe for target 'sleef/src/quad/CMakeFiles/sleefquadavx2_obj.dir/sleefsimdqp.c.o' failed\r\nmake[2]: *** [sleef/src/quad/CMakeFiles/sleefquadavx2_obj.dir/sleefsimdqp.c.o] Error 1\r\nmake[2]: Leaving directory '....../pytorch/build_18.04'\r\nCMakeFiles/Makefile2:5329: recipe for target 'sleef/src/quad/CMakeFiles/sleefquadavx2_obj.dir/all' failed\r\nmake[1]: *** [sleef/src/quad/CMakeFiles/sleefquadavx2_obj.dir/all] Error 2\r\nmake[2]: Leaving directory '....../pytorch/build_18.04'\r\n[ 63%] Built target ATEN_CPU_FILES_GEN_TARGET\r\nmake[2]: Leaving directory '....../pytorch/build_18.04'\r\n[ 63%] Built target generate-torch-sources\r\nmake[1]: Leaving directory '....../pytorch/build_18.04'\r\nMakefile:165: recipe for target 'all' failed\r\nmake: *** [all] Error 2\r\n```",
    "url": "https://github.com/pytorch/pytorch/issues/34720",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-13T17:31:27Z",
    "updated_at": "2020-03-14T00:15:45Z",
    "user": "jiapei100"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 13,
    "title": "RFC: Converter API",
    "body": "Right now the Converter API expects lambdas of the type: `(ConversionCtx* ctx, torch::jit::Node* n, kwargs* args) -> bool`\r\n\r\nQuestions:\r\n1. The bool return is a quick way to signal success or failure in converting the op. This could be something more descriptive\r\n\r\n2. Right now it is the responsibility of converters to log associations between `torch::jit::Value`s and `nvinfer1::ITensors`s so that later is significantly easier to assemble the arguments to a node. It may be nice if you could return a vector of unions of IValues and ITensors and have the converter executor do the insertions. This would probably need to rely on some guarantee that order of return is easy to determine and constant \r\n ",
    "url": "https://github.com/pytorch/TensorRT/issues/13",
    "state": "closed",
    "labels": [
      "question",
      "priority: low",
      "component: converters",
      "No Activity"
    ],
    "created_at": "2020-03-13T01:07:55Z",
    "updated_at": "2020-06-10T00:02:51Z",
    "user": "narendasan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 7,
    "title": "RFC: How should engines be integrated into the JIT Interpreter?",
    "body": "Right now as a side effect of registering an engine in the execution manager, a new op specifically for the engine is registered in the op registry. For instance running a ResNet backbone will be implemented with a new op with schema `trt::execute_engine_55d1de7b7b50(Tensor in_input_38) -> (Tensor)`. We could also have a generic op like `trt::execute_engine(int id, Tensor in_input_38, ...) -> (Tensor, ...)` and rely on information in the engine manager to run the correct engine, as long as variadic arguments (and returns) work. ",
    "url": "https://github.com/pytorch/TensorRT/issues/7",
    "state": "closed",
    "labels": [
      "question",
      "component: execution"
    ],
    "created_at": "2020-03-11T20:08:12Z",
    "updated_at": "2020-05-28T20:34:13Z",
    "user": "narendasan"
  },
  {
    "repo": "pytorch/TensorRT",
    "number": 6,
    "title": "Verify that engine runs in the correct stream",
    "body": "This is the stream that is used right now \r\n`c10::cuda::CUDAStream stream = c10::cuda::getCurrentCUDAStream(inputs[0].device().index());`\r\n\r\nWill this always be correct? What are the cases where this will give an incorrect stream? ",
    "url": "https://github.com/pytorch/TensorRT/issues/6",
    "state": "closed",
    "labels": [
      "question",
      "component: execution",
      "No Activity"
    ],
    "created_at": "2020-03-11T19:59:20Z",
    "updated_at": "2020-07-09T00:17:53Z",
    "user": "narendasan"
  },
  {
    "repo": "pytorch/vision",
    "number": 1964,
    "title": "The simplest way to use checkpoint to maximize the GPU memory usage",
    "body": "## \u2753 The simplest way to use checkpoint to maximize the GPU memory usage\r\n\r\nHi, guys,\r\nI am learning about how to use the checkpoint to optimize the GPU memory usage, and I see there is a example in [densenet.py](https://github.com/pytorch/vision/blob/216035315185edec747dca8879d7197e7fb22c7d/torchvision/models/densenet.py#L53) as\r\n```python\r\n    @torch.jit.unused  # noqa: T484\r\n    def call_checkpoint_bottleneck(self, input):\r\n        # type: (List[Tensor]) -> Tensor\r\n        def closure(*inputs):\r\n            return self.bn_function(*inputs)\r\n\r\n        return cp.checkpoint(closure, input)\r\n```\r\nFirstly, I think using checkpoint to maximize the GPU memory usage **only apply to activation modules, such as ReLU**. So, why not just create an new Module like:\r\n```python\r\nclass cp_ReLU(nn.Module):\r\n    def __init__(self, inplace) -> None:\r\n        super(cp_ReLU, self).__init__()\r\n        \r\n        relu = nn.ReLU(inplace = inplace)\r\n    \r\n    def forward(self, x):\r\n        y=cp.checkpoint(relu, x)\r\n        return y\r\n```\r\nAnd use cp_ReLU instead of original ReLU in all the places where a ReLU is need as:\r\n```python\r\nif self.memory_efficient:\r\n    self.add_module('relu2', nn.ReLU(inplace=True)),\r\nelse \r\n    self.add_module('relu2', cp_ReLU(inplace=True)),\r\n```\r\nI think this kind of implementation will make best use of the checkpoint.\r\nAm I right?\r\nOr would checkpoint also have effect to other kinds of modules like, Conv2d or BatchNorm2d?\r\n\r\nYour suggestion and answer will be appreciated! \r\n \r\n",
    "url": "https://github.com/pytorch/vision/issues/1964",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2020-03-11T10:37:12Z",
    "updated_at": "2020-03-12T18:03:53Z",
    "user": "songyuc"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 248,
    "title": "German Training not working",
    "body": "Hi we tried to train your model for german. We used Glove in german but it doesnt work.\r\n\r\nHow does the binary static_word_embeddings.npy needs to be structured?\r\n",
    "url": "https://github.com/huggingface/neuralcoref/issues/248",
    "state": "closed",
    "labels": [
      "question",
      "wontfix",
      "training",
      "feat / coref"
    ],
    "created_at": "2020-03-11T10:25:36Z",
    "updated_at": "2022-01-09T04:06:40Z",
    "user": "SimonF89"
  },
  {
    "repo": "huggingface/transformers",
    "number": 3205,
    "title": "where is the position emdeddings in bert for training a new model from scratch ?",
    "body": "# \u2753 Questions & Help\r\n\r\n<!-- The GitHub issue tracker is primarly intended for bugs, feature requests,\r\n     new models and benchmarks, and migration questions. For all other questions,\r\n     we direct you to Stack Overflow (SO) where a whole community of PyTorch and\r\n     Tensorflow enthusiast can help you out. Make sure to tag your question with the\r\n     right deep learning framework as well as the huggingface-transformers tag: \r\n     https://stackoverflow.com/questions/tagged/huggingface-transformers \r\n     \r\n     If your question wasn't answered after a period of time on Stack Overflow, you\r\n     can always open a question on GitHub. You should then link to the SO question \r\n     that you posted.\r\n     -->\r\n\r\n## Details\r\n<!-- Description of your issue -->\r\n\r\n<!-- You should first ask your question on SO, and only if\r\n     you didn't get an answer ask it here on GitHub. -->\r\n**A link to original question on Stack Overflow**: ",
    "url": "https://github.com/huggingface/transformers/issues/3205",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2020-03-10T13:35:16Z",
    "updated_at": "2020-05-16T17:44:04Z",
    "user": "2hip3ng"
  },
  {
    "repo": "huggingface/transformers",
    "number": 3193,
    "title": "Where is the default download address for pre-trained weight",
    "body": "# \u2753 Questions & Help\r\n\r\n```\r\nfrom transformers import DistilBertTokenizer, DistilBertModel\r\n\r\ntokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased')\r\nmodel = DistilBertModel.from_pretrained('distilbert-base-uncased')\r\n```\r\nI can't find the downloaded file.\r\nThanks for your help",
    "url": "https://github.com/huggingface/transformers/issues/3193",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-09T17:35:47Z",
    "updated_at": "2020-03-09T17:52:49Z",
    "user": "649459021"
  },
  {
    "repo": "pytorch/vision",
    "number": 1952,
    "title": "FastRCNNPredictor doesn't return prediction in evaluation",
    "body": "## \ud83d\udc1b Bug\r\n\r\nDear all,\r\n\r\nI am doing object detection in an image with one class. After training, `FastRCNNPredictor` does not return anything in validation mode. I have followed this official tutorial https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html.\r\n\r\nThanks.\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\nI have created a custom dataset, this is one of the output:\r\n\r\n```\r\ntensor([[[0.0549, 0.0549, 0.0549,  ..., 0.1647, 0.1569, 0.1569],\r\n          [0.0549, 0.0549, 0.0549,  ..., 0.1686, 0.1569, 0.1569],\r\n          [0.0549, 0.0549, 0.0549,  ..., 0.1647, 0.1569, 0.1529],\r\n          ...,\r\n          [0.0471, 0.0471, 0.0471,  ..., 0.1490, 0.1490, 0.1490],\r\n          [0.0471, 0.0471, 0.0471,  ..., 0.1490, 0.1490, 0.1490],\r\n          [0.0471, 0.0471, 0.0471,  ..., 0.1490, 0.1490, 0.1490]],\r\n \r\n         [[0.0471, 0.0471, 0.0471,  ..., 0.1255, 0.1176, 0.1176],\r\n          [0.0471, 0.0471, 0.0471,  ..., 0.1294, 0.1176, 0.1176],\r\n          [0.0471, 0.0471, 0.0471,  ..., 0.1255, 0.1176, 0.1137],\r\n          ...,\r\n          [0.0235, 0.0235, 0.0235,  ..., 0.1098, 0.1098, 0.1098],\r\n          [0.0235, 0.0235, 0.0235,  ..., 0.1098, 0.1098, 0.1098],\r\n          [0.0235, 0.0235, 0.0235,  ..., 0.1098, 0.1098, 0.1098]],\r\n \r\n         [[0.0510, 0.0510, 0.0510,  ..., 0.1176, 0.1098, 0.1098],\r\n          [0.0510, 0.0510, 0.0510,  ..., 0.1216, 0.1098, 0.1098],\r\n          [0.0510, 0.0510, 0.0510,  ..., 0.1176, 0.1098, 0.1059],\r\n          ...,\r\n          [0.0314, 0.0314, 0.0314,  ..., 0.1059, 0.1059, 0.1059],\r\n          [0.0314, 0.0314, 0.0314,  ..., 0.1059, 0.1059, 0.1059],\r\n          [0.0314, 0.0314, 0.0314,  ..., 0.1059, 0.1059, 0.1059]]]),\r\n {'boxes': tensor([[315.0003, 213.5002, 626.0004, 329.5002]]),\r\n  'labels': tensor([0]),\r\n  'image_id': tensor([1]),\r\n  'area': tensor([36503.9961]),\r\n  'iscrowd': tensor([0])})\r\n```\r\nTo prove its correctness I have also visualized the bbox on the image:\r\n\r\n![image](https://user-images.githubusercontent.com/15908060/76199447-2e984d80-61f0-11ea-931c-bd2cb0687ed3.png)\r\n\r\nThen I create a `Dataloader`:\r\n\r\n```python\r\n\r\ndl = DataLoader(ds, batch_size=8, num_workers=4, collate_fn=lambda x: tuple(zip(*x)))\r\n\r\nmodel = fasterrcnn_resnet50_fpn(num_classes=1).to(device)\r\n\r\nparams = [p for p in model.parameters() if p.requires_grad]\r\noptimizer = torch.optim.SGD(params, lr=0.005,\r\n                            momentum=0.9, weight_decay=0.0005)\r\n```\r\n\r\nTraining works:\r\n\r\n```python\r\nmodel.train()\r\nfor i in range(5):\r\n\r\n    for images, targets in dl:\r\n        images = list(image.to(device) for image in images)\r\n        targets = [{k: v.to(device) for k,v in t.items()} for t in targets]\r\n        loss_dict = model(images, targets)\r\n        losses = sum(loss for loss in loss_dict.values())\r\n        optimizer.zero_grad()\r\n        losses.backward()\r\n        optimizer.step()\r\n\r\n        print(losses)\r\n```\r\n\r\nOutput:\r\n\r\n```\r\ntensor(0.6391, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.6329, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.6139, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.5965, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.5814, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.5468, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.5049, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.4502, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.3787, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.2502, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.1605, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.0940, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.0558, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.0507, device='cuda:0', grad_fn=<AddBackward0>)\r\ntensor(0.0413, device='cuda:0', grad_fn=<AddBackward0>)\r\n```\r\n\r\nBut, when I try to get a prediction I have no output:\r\n\r\n```python\r\nmodel = model.eval()\r\nwith torch.no_grad():\r\n    model = model.cuda()\r\n    pred = model([ds[2][0].cuda()])\r\n```\r\n\r\n`pred` is\r\n\r\n```\r\n[{'boxes': tensor([], size=(0, 4)),\r\n  'labels': tensor([], dtype=torch.int64),\r\n  'scores': tensor([])}]\r\n```\r\n\r\nThank you in advance\r\n## Expected behavior\r\n\r\nThe model should return a valid prediction.\r\n\r\n## Environment\r\n```\r\nPyTorch version: 1.4.0\r\nIs debug build: No\r\nCUDA used to build PyTorch: 10.1\r\n\r\nOS: Ubuntu 18.04.4 LTS\r\nGCC version: (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0\r\nCMake version: Could not collect\r\n\r\nPython version: 3.7\r\nIs CUDA available: Yes\r\nCUDA runtime version: 10.1.243\r\nGPU models and configuration: GPU 0: GeForce GTX 1080 Ti\r\nNvidia driver version: 430.50\r\ncuDNN version: Could not collect\r\n\r\nVersions of relevant libraries:\r\n[pip] efficientnet-pytorch==0.5.1\r\n[pip] msgpack-numpy==0.4.3.2\r\n[pip] numpy==1.17.4\r\n[pip] PytorchStorage==0.0.0\r\n[pip] torch==1.4.0\r\n[pip] torchbearer==0.5.3\r\n[pip] torchlego==0.0.0\r\n[pip] torchsummary==1.5.1\r\n[pip] torchvision==0.5.0\r\n[conda] _pytorch_select           0.2                       gpu_0  \r\n[conda] blas                      1.0                         mkl  \r\n[conda] efficie",
    "url": "https://github.com/pytorch/vision/issues/1952",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-03-09T09:27:19Z",
    "updated_at": "2024-12-25T07:03:50Z",
    "user": "FrancescoSaverioZuppichini"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 34437,
    "title": "How to quantize CNN in pytorch 1.3? ",
    "body": "I tried to quantize CNN refer to https://pytorch.org/tutorials/advanced/dynamic_quantization_tutorial.html\r\n\r\nbut I got this error:\r\nRuntimeError: Didn't find engine for operation quantized::linear_prepack NoQEngine\r\n\r\nHow can I solve it?\r\n\r\nmy environment:\r\n\r\npytorch1.3.0+cpu\r\nwindows 10\r\npython3.7",
    "url": "https://github.com/pytorch/pytorch/issues/34437",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-08T03:12:25Z",
    "updated_at": "2020-03-08T06:41:59Z",
    "user": "zhanyike"
  },
  {
    "repo": "pytorch/vision",
    "number": 1944,
    "title": "Use the pretrained model of ResNet50 on ImageNet, the val acc is 4% less than reported.",
    "body": "As the title mentioned, anyone have met the same issue?Thx!",
    "url": "https://github.com/pytorch/vision/issues/1944",
    "state": "closed",
    "labels": [
      "question",
      "awaiting response",
      "needs discussion",
      "module: models",
      "topic: classification"
    ],
    "created_at": "2020-03-05T14:17:18Z",
    "updated_at": "2020-10-21T08:25:11Z",
    "user": "liu-zhenhua"
  },
  {
    "repo": "pytorch/examples",
    "number": 726,
    "title": "How can I sue freeze_support() in the train.py?",
    "body": "\r\n",
    "url": "https://github.com/pytorch/examples/issues/726",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-05T03:00:07Z",
    "updated_at": "2020-03-05T03:01:18Z",
    "comments": 0,
    "user": "K-M-Ibrahim-Khalilullah"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 873,
    "title": "Regarding torch.utils.data.DataLoader and batch_size",
    "body": "Hi all the high-level engineers! \r\n\r\nI am very new to pytorch and even to pythone.\r\nNonetheless, I am trying to understand pytorch by the documentation of the tutorial of pytorch.\r\nNow I am going through TRAINING A CLASSIFIER using dataset, CIFAR10.\r\n\r\nCode Link: https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html\r\n\r\nIn the code, there is the lines as follows;\r\n\r\nfor i, data in enumerate(trainloader, 0):\r\n    inputs, labels=data\r\n\r\nI have checked the size of data[0] and input[0], and they are different and it was [4, 3, 32, 32] and [3, 32, 32] respectively.\r\nI understand that data[0] has the size of [4, 3, 32, 32] as it is the first batch that contains 4 images.\r\n\r\nQuestion\r\n1. But why is the size of input[0] [3, 32, 32]? As I checked, input[0] is the first image of the data[0].\r\n    Why is input[0] only taking the first image of data[0]? According to the code, input[0]=data[0], shouldn't it ?\r\n\r\n2. According to the tutorial, \"data is a list of [inputs, labels]\". But I don't see labels[0] value in data[0].\r\n    Why is so?\r\n\r\nSorry if it is too basic, but please help.\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/873",
    "state": "closed",
    "labels": [],
    "created_at": "2020-03-03T18:48:08Z",
    "updated_at": "2021-07-30T21:15:54Z",
    "comments": 2,
    "user": "jjong2ya"
  },
  {
    "repo": "pytorch/vision",
    "number": 1934,
    "title": "torchvision.models.detection.fasterrcnn_resnet50_fpn has loss_rpn_box_reg exploding to nan after evaluation",
    "body": "## \ud83d\udc1b Bug / Misuse?\r\nI'm attempting to use `torchvision.models.detection.fasterrcnn_resnet50_fpn` on a custom dataset, following along with the [Detection Finetuning Tutorial](https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html) where applicable.\r\n\r\nHowever, I consistently have an issue where the loss of `loss_rpn_box_reg` appears to rapidly explode, but _only_ after the first epoch has completed **(edit: the culprit now appears to be the call to the evaluation function).**\r\n\r\nI've ruled out every annotation / dataloading issue I can think of (no boxes w/ non-positive dims or out-of-bounds coords, etc).\r\nI've also (hopefully) ruled out issues with the RPN by following the steps to replace the `AnchorGenerator` and `RPNHead` outlined in #978 \r\n```\r\n    rpn_anchor_generator = AnchorGenerator(sizes=config.RPN_ANCHOR_SIZES,\r\n                                           aspect_ratios=config.RPN_ANCHOR_ASPECT_RATIOS)\r\n    rpn_head = RPNHead(in_channels=model.backbone.out_channels,\r\n                       num_anchors=rpn_anchor_generator.num_anchors_per_location()[0])\r\n    model.rpn.anchor_generator = rpn_anchor_generator\r\n    model.rpn.head = rpn_head\r\n```\r\n\r\nAnd, if it's relevant, replaced the `RoIHeads` box predictor:\r\n```\r\n    box_predictor = FastRCNNPredictor(in_channels=model.roi_heads.box_predictor.cls_score.in_features,\r\n                                      num_classes=len(dataset_util.ClassLabelEnum) + 1)\r\n    model.roi_heads.box_predictor = box_predictor\r\n```\r\nI've also been tinkering with my choice of optimizer & scheduler as well as trying to drastically lower LR or change batch size, just to see if anything seems to impact it (to no avail).\r\n\r\nBelow is a stack trace of this behavior on a small dummy subset. The behavior is similar on the full dataset, with `loss_rpn_box_reg` apparently exploding to `nan` shortly after the first epoch.\r\n```\r\nEpoch: [0]  [0/5]  eta: 0:00:03  lr: 0.001254  loss: 4.8643 (4.8643)  loss_classifier: 3.7656 (3.7656)  loss_box_reg: 0.0778 (0.0778)  loss_objectness: 0.6919 (0.6919)  loss_rpn_box_reg: 0.3290 (0.3290)  time: 0.7243  data: 0.1862  max mem: 2508\r\nEpoch: [0]  [4/5]  eta: 0:00:00  lr: 0.005000  loss: 2.9177 (3.2553)  loss_classifier: 1.8250 (2.1365)  loss_box_reg: 0.1284 (0.1319)  loss_objectness: 0.6914 (0.6905)  loss_rpn_box_reg: 0.3255 (0.2964)  time: 0.4570  data: 0.0405  max mem: 2776\r\nEpoch: [0] Total time: 0:00:02 (0.4618 s / it)\r\ncreating index...\r\nindex created!\r\nTest:  [0/5]  eta: 0:00:01  model_time: 0.0841 (0.0841)  evaluator_time: 0.0014 (0.0014)  time: 0.2295  data: 0.1396  max mem: 2776\r\nTest:  [4/5]  eta: 0:00:00  model_time: 0.0819 (0.0821)  evaluator_time: 0.0007 (0.0008)  time: 0.1168  data: 0.0296  max mem: 2776\r\nTest: Total time: 0:00:00 (0.1209 s / it)\r\nAveraged stats: model_time: 0.0819 (0.0821)  evaluator_time: 0.0007 (0.0008)\r\nAccumulating evaluation results...\r\nDONE (t=0.01s).\r\nIoU metric: bbox\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.000\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000\r\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000\r\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.000\r\nEpoch: [1]  [0/5]  eta: 0:00:03  lr: 0.005000  loss: 17.6448 (17.6448)  loss_classifier: 0.4119 (0.4119)  loss_box_reg: 0.0663 (0.0663)  loss_objectness: 0.6992 (0.6992)  loss_rpn_box_reg: 16.4674 (16.4674)  time: 0.6068  data: 0.1749  max mem: 2776\r\nLoss is nan, stopping training\r\n{'loss_classifier': tensor(0.4476, device='cuda:0', grad_fn=<NllLossBackward>), 'loss_box_reg': tensor(0.0805, device='cuda:0', grad_fn=<DivBackward0>), 'loss_objectness': tensor(0.6914, device='cuda:0', grad_fn=<BinaryCrossEntropyWithLogitsBackward>), 'loss_rpn_box_reg': tensor(nan, device='cuda:0', grad_fn=<DivBackward0>)}\r\n```\r\n\r\nCould I be horribly misusing the model API or incorrectly setting any hparams? This is my first time really working with `torch` & `torchvision` in-depth, so any and all suggestions are hugely appreciated.\r\n\r\n## Environment\r\nBare-metal + conda environment, single GPU set-up.\r\n - PyTorch / torchvision Version (e.g., 1.0 / 0.4.0): **1.4.0 / 0.5.0**\r\n - OS (e.g., Linux): **Ubuntu 18.04**\r\n - How you installed PyTorch / torchvision (`conda`, `pip`, source): **pip (from pypi) i",
    "url": "https://github.com/pytorch/vision/issues/1934",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "module: reference scripts",
      "topic: object detection"
    ],
    "created_at": "2020-03-03T16:40:50Z",
    "updated_at": "2020-03-24T15:43:09Z",
    "user": "dsandii"
  },
  {
    "repo": "pytorch/vision",
    "number": 1953,
    "title": "roi_pool is seem to be different from which in FasterRCNN",
    "body": "```python\r\nimport torchvision\r\nimport torch\r\n\r\na = torch.linspace(1,8*8,8*8).reshape(1, 1, 8, 8)\r\nboxes = torch.tensor([[0,0,3,3]],dtype=a.dtype)\r\nout = torchvision.ops.roi_pool(a, boxes, output_size=(2,2))\r\n```\r\ni expect that out would be [[10 12],[26 28]]\r\nbut it's [[26 26],[26 28]]\r\nand, i try more\r\n```python\r\nimport torchvision\r\nimport torch\r\na = torch.linspace(1,8*8,8*8).reshape(1, 1, 8, 8)\r\nboxes = torch.tensor([[1,1,3,3]],dtype=a.dtype)\r\nout = torchvision.ops.roi_pool(a, boxes, output_size=(2,2))\r\n```\r\nout is \r\n[[4.373779945881600000e+15\t4.373779945881600000e+15],\r\n[4.373779945881600000e+15\t4.373779945881600000e+15]]\r\nthat is so werid, i think roi_pool should be like [this](https://deepsense.ai/region-of-interest-pooling-explained/)\r\n\n\ncc @fmassa",
    "url": "https://github.com/pytorch/vision/issues/1953",
    "state": "closed",
    "labels": [
      "question",
      "module: ops"
    ],
    "created_at": "2020-03-03T11:16:38Z",
    "updated_at": "2020-03-10T12:34:38Z",
    "user": "SeniorCtrlPlayer"
  },
  {
    "repo": "pytorch/vision",
    "number": 1933,
    "title": "error",
    "body": "Sorry to bother you here,I saw your comment at maskrcnn-benchmark, and I encountered the following error, even using boxlist[[0]] is the same error, can you help me please? Thank you!\r\n![image](https://user-images.githubusercontent.com/53242456/75760743-bc98b200-5d72-11ea-800f-a6cc055db20b.png)\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/1933",
    "state": "closed",
    "labels": [
      "invalid",
      "question"
    ],
    "created_at": "2020-03-03T09:19:16Z",
    "updated_at": "2020-03-10T14:47:23Z",
    "user": "buxpeng"
  },
  {
    "repo": "pytorch/vision",
    "number": 1930,
    "title": "Summary of TorchScript and ONNX support",
    "body": "Hi,\r\nIs there a summary somewhere of the current state of support for TorchScript and ONNX by the models in this repo? A\u00a0complete summary would include the version of support for both CPU and GPU.\r\n\r\nI'm mostly interested in FasterRCNN but I\u00a0got confused looking around the related issues. I suppose a general summary could save time to other end users.",
    "url": "https://github.com/pytorch/vision/issues/1930",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "module: onnx",
      "torchscript"
    ],
    "created_at": "2020-03-02T22:30:31Z",
    "updated_at": "2020-03-10T16:12:12Z",
    "user": "MLaurenceFournier"
  },
  {
    "repo": "pytorch/vision",
    "number": 1926,
    "title": "Support for different pooling options with Faster R-CNN",
    "body": "I've been trying to setup a Faster R-CNN network to detect lesions on CT images.\r\n\r\nTherefor I wanted to use the FasterRCNN class which is provided by torchvision. However, I've noticed that the framework is very great except for the supported pooling (roi_box_pooling). The pooling only allows a [MultiScaleRoIAlign](https://github.com/pytorch/vision/blob/master/torchvision/models/detection/faster_rcnn.py#L168). Is it possible to use the MultiScaleRoIAlign for any use-case?\r\n\r\nI wanted to setup my network like it is described in this [project](https://github.com/chenyuntc/simple-faster-rcnn-pytorch):\r\n![Diagram](https://github.com/chenyuntc/simple-faster-rcnn-pytorch/blob/master/imgs/model_all.png?raw=true)\r\n\r\nThat's my idea so far:\r\n```python\r\nclass BoxHead(torch.nn.Module):\r\n    def __init__(self, vgg):\r\n        super(BoxHead, self).__init__()\r\n        self.classifier = torch.nn.Sequential(*list(vgg.classifier._modules.values())[:-1])\r\n\r\n    def forward(self, x):\r\n        x = x.flatten(start_dim=1)\r\n        x = self.classifier(x)\r\n        return x\r\n\r\n# VGG16 backbone\r\nvgg = vgg16(pretrained=True)\r\nbackbone = vgg.features[:-1]\r\nfor layer in backbone[:10]:\r\n    for p in layer.parameters():\r\n        p.requires_grad = False\r\nbackbone.out_channels = 512\r\n\r\nbox_head = BoxHead(vgg)\r\n\r\n# RPN - Anchor Generator\r\nanchor_generator = AnchorGenerator(sizes=((8, 16, 32),), aspect_ratios=((0.5, 1.0, 1.5),))\r\n\r\n# Head - Box RoI pooling\r\nroi_pooler = MultiScaleRoIAlign(featmap_names=['0'], output_size=7, sampling_ratio=2)\r\n\r\n# Faster RCNN - Model\r\nmodel = FasterRCNN(\r\n    backbone=backbone,\r\n    min_size=224, max_size=224,\r\n    rpn_anchor_generator=anchor_generator,\r\n    box_roi_pool=roi_pooler,\r\n    box_head=box_head,\r\n    box_predictor=FastRCNNPredictor(4096, num_classes=2)\r\n)\r\n```",
    "url": "https://github.com/pytorch/vision/issues/1926",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-03-01T16:31:14Z",
    "updated_at": "2020-03-10T14:57:42Z",
    "user": "FHellmann"
  },
  {
    "repo": "pytorch/vision",
    "number": 1929,
    "title": "cannot use group norm in torchvision API",
    "body": "## \ud83d\udc1b Bug\r\n\r\nCannot use nn.GroupNorm for \"norm_layer\" in torchvision.models.resnet50. However, nn.GroupNorm is supposed to be OK since there are codes to initialize the weights of nn.GroupNorm in the resnet50 file. \r\n\r\n## To Reproduce\r\n```\r\nimport torch.nn as nn\r\nimport torchvision\r\nnet = torchvision.models.resnet50(norm_layer=nn.BatchNorm2d)\r\nnet = torchvision.models.resnet50(norm_layer=nn.GroupNorm)\r\n```\r\n## Expected behavior\r\n\r\nBoth nets should be OK, however the second raised an error in torchvision/models/resnet.py line 143. nn.GroupNorm should have two arguments.\r\n\r\n## Environment\r\n\r\nPyTorch version: 1.4.0\r\nIs debug build: No\r\nCUDA used to build PyTorch: None\r\n\r\nOS: Mac OSX 10.13.6\r\nGCC version: Could not collect\r\nCMake version: version 3.14.5\r\n\r\nPython version: 3.7\r\nIs CUDA available: No\r\nCUDA runtime version: No CUDA\r\nGPU models and configuration: No CUDA\r\nNvidia driver version: No CUDA\r\ncuDNN version: No CUDA\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1.18.1\r\n[pip3] torch==1.4.0\r\n[pip3] torchvision==0.5.0\r\n[conda] torch                     1.4.0                    pypi_0    pypi\r\n[conda] torchvision               0.5.0                    pypi_0    pypi\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/1929",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: classification"
    ],
    "created_at": "2020-03-01T11:32:15Z",
    "updated_at": "2020-03-04T12:57:31Z",
    "user": "hukkai"
  },
  {
    "repo": "pytorch/vision",
    "number": 1925,
    "title": "module 'torchvision' has no attribute '__version__' [0.4.2]",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. `print(\"Torchvision Version: \",torchvision.__version__)`\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\nAttributeError: module 'torchvision' has no attribute '__version__'\r\n\r\n## Environment\r\n\r\n - PyTorch / torchvision Version (e.g., 1.0 / 0.4.0): pytorch: 1.3.1, torchvision: 0.4.2\r\n - OS (e.g., Linux): Ubuntu 19.10\r\n - How you installed PyTorch / torchvision (`conda`, `pip`, source): conda\r\n - Python version: 3.7\r\n - CUDA/cuDNN version: 1.01\r\n",
    "url": "https://github.com/pytorch/vision/issues/1925",
    "state": "closed",
    "labels": [
      "question",
      "topic: binaries"
    ],
    "created_at": "2020-03-01T09:37:32Z",
    "updated_at": "2020-03-04T11:59:03Z",
    "user": "duskybomb"
  },
  {
    "repo": "pytorch/xla",
    "number": 1708,
    "title": "How to properly clip gradients with data parallel training?",
    "body": "The XLA API recommends that we call `xm.optimizer_step(optimizer)`, which [allreduces the gradients and performs the optimization step](https://github.com/pytorch/xla/blob/ffde50813f01b57d6e782a63aac6453bfa12ffdf/torch_xla/core/xla_model.py#L429-L455).\r\n\r\nGradient clipping is typically performed on the reduced gradients, however it seems the current API doesn't give us access to the reduced gradients before taking the optimization step.\r\n\r\nThe code for `optimizer_step` is pretty simple, so I'm also wondering why we have `xm.optimizer_step` interface in the first place, compared to the more standard DistributedDataParallel interface that PyTorch uses. For example, in fairseq we have a [very simple DistributedDataParallel wrapper](https://github.com/pytorch/fairseq/blob/master/fairseq/legacy_distributed_data_parallel.py) that just calls allreduce, so it seems something like that could be a drop-in replacement here.\r\n\r\nIs there something else special happening with `xm.optimizer_step` that I'm missing?",
    "url": "https://github.com/pytorch/xla/issues/1708",
    "state": "closed",
    "labels": [],
    "created_at": "2020-02-29T14:13:03Z",
    "updated_at": "2023-08-31T12:27:07Z",
    "user": "myleott"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 62,
    "title": "How to apply quantization to models?",
    "body": "The iOS demo has to set a quantization backend before loading the model, is this operation necessary on Android? and how? ",
    "url": "https://github.com/pytorch/android-demo-app/issues/62",
    "state": "open",
    "labels": [],
    "created_at": "2020-02-27T21:54:17Z",
    "updated_at": "2020-05-15T08:47:13Z",
    "user": "himajin2045"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 33809,
    "title": "How to release the gpu memory after use interpolate\uff1f",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\r\n After used the interpolate \uff0cthe gpu memory can not be released during inference\u3002I try to use torch.cuda.empty_cache() after, but it can work only in feding the images one by one\u3002when theimages is concurrently fedding \uff0cthe GPU still increase\u3002Can you tell me how to do\uff1f \r\n",
    "url": "https://github.com/pytorch/pytorch/issues/33809",
    "state": "closed",
    "labels": [],
    "created_at": "2020-02-26T10:04:47Z",
    "updated_at": "2020-02-26T18:21:30Z",
    "user": "lyc6749"
  },
  {
    "repo": "pytorch/vision",
    "number": 1912,
    "title": "A weird problem: \"No module named 'torchvision.models'; 'torchvision' is not a package\"",
    "body": "",
    "url": "https://github.com/pytorch/vision/issues/1912",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2020-02-24T03:09:41Z",
    "updated_at": "2020-02-26T02:48:55Z",
    "user": "TengFeiHan0"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 33673,
    "title": "python int type how to convert to at::IntArrayRef",
    "body": "## \u2753 Questions and Help\r\nWhen I write C++/CUDA extension, I use at::IntArrayRef in my C++ source code. But I build custom layer using python, I find that I do not use my C++ extension. Because int of python does not convert to at::IntArrayRef of C++. How to solve this problem?\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/33673",
    "state": "closed",
    "labels": [],
    "created_at": "2020-02-23T16:56:54Z",
    "updated_at": "2020-02-23T19:34:10Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/vision",
    "number": 1904,
    "title": "DenseNet generated image embeddings have very small variance and are sparse",
    "body": "I'm working with pretrained DenseNet161 model to learn and generate image embeddings.\r\nI consider output of adaptive_avg_pool2d layer image embedding. I noticed that it's very sparse and has small variance. If we consider a batch of 64 images, variance of the same feature over all images in a batch is ~2e-6. Also the feature values are just very small (~1e-3). This is for pretrained model, if I start fine-tuning the model, some features quickly become 0 across all images in the batch.\r\nSurprisingly, this is not the case for resnet. Running the same training for resnet50 results in expected features of size ~[0, 2] and variance around 1.\r\nThis is stunning difference for me. Not sure if there's some problem with implementation or this is just DenseNet works. Please let me know if  you have similar experiences.",
    "url": "https://github.com/pytorch/vision/issues/1904",
    "state": "closed",
    "labels": [
      "question",
      "awaiting response",
      "module: models",
      "topic: classification"
    ],
    "created_at": "2020-02-21T22:44:45Z",
    "updated_at": "2021-01-06T17:42:28Z",
    "user": "zlenyk"
  },
  {
    "repo": "pytorch/xla",
    "number": 1675,
    "title": "What is \"Lowering\" referring to?",
    "body": "## \u2753 Questions and Help\r\nSorry for the stupid question, but what is meant by \"Lowering\", as it applies to LowerContext class, which appears to convert IR->XLA?  \r\n\r\nsuch as:\r\n```cpp\r\nXlaOpVector LoweringContext::LowerNode(const Node* node) {\r\n...\r\n}\r\n```",
    "url": "https://github.com/pytorch/xla/issues/1675",
    "state": "closed",
    "labels": [],
    "created_at": "2020-02-21T22:29:36Z",
    "updated_at": "2020-02-21T23:48:31Z",
    "user": "cjolivier01"
  },
  {
    "repo": "pytorch/xla",
    "number": 1672,
    "title": "How to join a model from distributed replicas?",
    "body": "## \u2753 Questions and Help\r\n\r\nFrom what I understand, a deepcopy model replica is deployed on each XLA device and then individually trained on non-overlapping data (via ParallelLoader). Each model can then be also evaluated via the same approach.\r\n\r\nI would like to save a model for production use. But now I assume I have 8 different models (from each XLA core) trained on different data batches. Are they all synced after training and have the same weights (so I just choose random XLA model) or do I need to somehow manually merge them?",
    "url": "https://github.com/pytorch/xla/issues/1672",
    "state": "closed",
    "labels": [],
    "created_at": "2020-02-21T04:45:16Z",
    "updated_at": "2020-02-21T05:56:23Z",
    "user": "AVancans"
  },
  {
    "repo": "pytorch/vision",
    "number": 1901,
    "title": "DeeplapV3 accuracy result for person ",
    "body": "Can I know the accuracy of the Deeplap v3-Resnet-101 pre-trained model evaluated on COCO val2017 dataset\r\nfor **person** class only?\r\nI searched about it but I did not find the accuracy for each class?",
    "url": "https://github.com/pytorch/vision/issues/1901",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: semantic segmentation"
    ],
    "created_at": "2020-02-20T12:56:41Z",
    "updated_at": "2020-02-25T15:50:39Z",
    "user": "muna-cs"
  },
  {
    "repo": "pytorch/vision",
    "number": 1900,
    "title": "Why the inplace in the ReLU in deeplabv3.py is not set True?",
    "body": "Hi guys,\r\nI am reproducing DeepLabV3+ these days, and I learning about the code of [deeplabv3.py](https://github.com/pytorch/vision/blob/2f64dd90e14fe5463b4e5bd152d56e4a6f0419de/torchvision/models/segmentation/deeplabv3.py).\r\nAnd I found that some ReLUs in this code don't use \"inplace = True\", like,\r\n```python\r\ndef __init__(self, in_channels, atrous_rates):\r\n        super(ASPP, self).__init__()\r\n        out_channels = 256\r\n        modules = []\r\n        modules.append(nn.Sequential(\r\n            nn.Conv2d(in_channels, out_channels, 1, bias=False),\r\n            nn.BatchNorm2d(out_channels),\r\n            nn.ReLU()))\r\n\r\n        rate1, rate2, rate3 = tuple(atrous_rates)\r\n        modules.append(ASPPConv(in_channels, out_channels, rate1))\r\n        modules.append(ASPPConv(in_channels, out_channels, rate2))\r\n        modules.append(ASPPConv(in_channels, out_channels, rate3))\r\n        modules.append(ASPPPooling(in_channels, out_channels))\r\n\r\n        self.convs = nn.ModuleList(modules)\r\n\r\n        self.project = nn.Sequential(\r\n            nn.Conv2d(5 * out_channels, out_channels, 1, bias=False),\r\n            nn.BatchNorm2d(out_channels),\r\n            nn.ReLU(),\r\n            nn.Dropout(0.5))\r\n```\r\nSo what is the consideration of not using \"inplace = True\" here?\r\n\r\nAny answer or idea  will be appreciated!\r\n",
    "url": "https://github.com/pytorch/vision/issues/1900",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: semantic segmentation"
    ],
    "created_at": "2020-02-20T06:20:33Z",
    "updated_at": "2020-02-25T15:52:10Z",
    "user": "songyuc"
  },
  {
    "repo": "huggingface/blog",
    "number": 5,
    "title": "Where is the CoNLL-2003 formatted Esperanto dataset ref. in the tutorial?",
    "body": "> Using a dataset of annotated Esperanto POS tags formatted in the CoNLL-2003 format\r\n\r\nWhere is this dataset?\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/blog/issues/5",
    "state": "open",
    "labels": [],
    "created_at": "2020-02-20T04:26:54Z",
    "updated_at": "2020-03-04T16:30:32Z",
    "user": "ohmeow"
  },
  {
    "repo": "pytorch/vision",
    "number": 1896,
    "title": "How can I get the intermediate layers if I used the nn.Sequential to make a Module",
    "body": "Hi guys,\r\nI am reproducing the DeepLabV3+ these days,\r\nand I write a Module like this,\r\n```python\r\n        self.entry_flow = nn.Sequential()\r\n        # entry_flow\u7684\u7b2c\u4e00\u4e2a\u5377\u79ef\u5c42\r\n        self.entry_flow.add_module(\"conv1\", nn.Conv2d(3, 32, 3, 2, 0, bias=False))\r\n        self.entry_flow.add_module(\"bn_relu1\", BNReLU(32))\r\n        self.entry_flow.add_module(\"conv2\", nn.Conv2d(32, 64, 3, bias=False))\r\n        self.entry_flow.add_module(\"bn_relu2\", BNReLU(64))\r\n        # \u6dfb\u52a0\u4e09\u4e2aBlock\u6a21\u5757\r\n        self.entry_flow.add_module(\"block1\", XceptionBlock(64, 64, [1, 1, 2]))\r\n        self.entry_flow.add_module(\"block2\", XceptionBlock(128, 128, [1, 1, 2]))\r\n        self.entry_flow.add_module(\"block2\", XceptionBlock(256, 256, [1, 1, 2]))\r\n```\r\nand I am wondering if I can get the the intermediate output of inner module \"block1\" and \"block2\"?\r\n\r\nAny answer or suggestion will be appreciated!",
    "url": "https://github.com/pytorch/vision/issues/1896",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: feature extraction"
    ],
    "created_at": "2020-02-18T04:14:26Z",
    "updated_at": "2020-02-25T15:55:06Z",
    "user": "songyuc"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 853,
    "title": "happy to contribute my intuitive visual guide to how convolutions and transposed convenient work",
    "body": "Unlike fully connected linear layers, convolutions layers need a bit of work to calculate the size of the data as it passes through them. \r\n\r\nThere aren't many easy to understand guides on how convolution works. Many report that transposed convolution is particularly difficult to understand.\r\n\r\nAs part of my upcoming book on GANs with PyTorch I include an appendix with worked examples of convolutions and transposed convolutions, which I've also published a version of online for free access.\r\n\r\n[https://makeyourownneuralnetwork.blogspot.com/2020/02/calculating-output-size-of-convolutions.html](https://makeyourownneuralnetwork.blogspot.com/2020/02/calculating-output-size-of-convolutions.html)\r\n\r\nI'd be happy if you thought these should be included in the Pytorch tutorials, or linked to from there.\r\n\r\nAlso happy to receive feedback on improving them.\r\n\r\nThe main point of the guide is to develop an intuitive understanding, avoiding too much mathematical jargon. \r\n\r\nAn example of the friendly style of diagrams used ...\r\n\r\n![appendix_C_eg_7](https://user-images.githubusercontent.com/17411198/74676158-49f1d900-51ad-11ea-897f-74a089d07320.png)\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/853",
    "state": "open",
    "labels": [],
    "created_at": "2020-02-17T17:46:06Z",
    "updated_at": "2020-02-20T13:56:34Z",
    "user": "makeyourownneuralnetwork"
  },
  {
    "repo": "pytorch/vision",
    "number": 1895,
    "title": "It seems the IntermediateLayerGetter will not use the forward function in the original model",
    "body": "Hi guys,\r\nI am working on reproducing DeepLabV3+ model these days,\r\nand I need to get some intermediate layers from the backbone.\r\nAnd I found a class of `IntermediateLayerGetter` with similar effect.\r\nWhen I read the code, I found that in the `forward` function of `IntermediateLayerGetter`, that the `IntermediateLayerGetter` would do the inference like,\r\n```python\r\nfor name, module in self.named_children():\r\n            x = module(x)\r\n            # rest of the code\r\n```\r\nBut this may mean that, the `IntermediateLayerGetter` class would not use the `forward` function in the original wrapped model, which seems unsuual.\r\nI don't think this would let the original model behave in a right way.\r\n\r\nAny explanation or idea  would be appreciated!\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/1895",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: feature extraction"
    ],
    "created_at": "2020-02-17T12:02:27Z",
    "updated_at": "2020-02-25T15:22:30Z",
    "user": "songyuc"
  },
  {
    "repo": "pytorch/vision",
    "number": 1894,
    "title": "Can I use the IntermediateLayerGetter function for my customized backbone network?",
    "body": "Hi, guys,\r\nI am reimplementing DeepLabV3+ model these days,\r\nand I need to return some of the intermediate layers from my customized backbone network, \r\nand I found the `IntermediateLayerGetter` function with the similar effect.\r\nSo I am wondering if I can use  the `IntermediateLayerGetter` function to get the intermediate layers from my customized backbone?\r\n\r\nAny idea or answer will be appreciated!",
    "url": "https://github.com/pytorch/vision/issues/1894",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: feature extraction"
    ],
    "created_at": "2020-02-17T11:33:10Z",
    "updated_at": "2020-02-27T19:40:34Z",
    "user": "songyuc"
  },
  {
    "repo": "pytorch/vision",
    "number": 1892,
    "title": "How to look at bbox predictions after training?",
    "body": "Hi, I finetuned a pretrained Faster RCNN model.\r\nI used the instance segmentation Mask RCNN pytorch tutorial as a guide.\r\n\r\nI finished training and can't figure out how to look at bbox predictions.\r\n\r\nFor segmentation prediction, the guide used the following to display the mask\r\nImage.fromarray(prediction[0]['masks'][0, 0].mul(255).byte().cpu().numpy())\r\n\r\nI tried \r\nImage.fromarray(prediction[0]['boxes'].mul(255).byte().cpu().numpy()) \r\nBut this doesn't work.\r\n\r\nlink to tutorial I followed : https://colab.research.google.com/github/pytorch/vision/blob/temp-tutorial/tutorials/torchvision_finetuning_instance_segmentation.ipynb#scrollTo=5v5S3bm07SO1\r\n\r\nI used the following to train on a custom dataset. \r\n      \r\n\r\n- def get_faster_rcnn_model(num_classes):\r\n-     model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)\r\n-     num_classes = 2  # 1 class (person) + background\r\n-     in_features = model.roi_heads.box_predictor.cls_score.in_features\r\n-     model.roi_heads.box_predictor = FastRCNNPredictor(in_features, num_classes) \r\n- \r\n-     return model\r\n",
    "url": "https://github.com/pytorch/vision/issues/1892",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-02-17T04:36:23Z",
    "updated_at": "2020-02-25T15:45:56Z",
    "user": "alareza619"
  },
  {
    "repo": "pytorch/vision",
    "number": 1891,
    "title": "Pre-trained segmentation models can't load state dicts",
    "body": "<img width=\"1024\" alt=\"Screen Shot 2020-02-16 at 7 51 57 PM\" src=\"https://user-images.githubusercontent.com/37163544/74622526-07b99080-50f6-11ea-8483-bc891aeb5f3a.png\">\r\n",
    "url": "https://github.com/pytorch/vision/issues/1891",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: semantic segmentation"
    ],
    "created_at": "2020-02-17T03:53:49Z",
    "updated_at": "2020-02-27T19:34:26Z",
    "user": "devanshuDesai"
  },
  {
    "repo": "pytorch/vision",
    "number": 1888,
    "title": "convert_to_coco_api so slow",
    "body": "i found that it costs about 20min for the convert_to_coco_api to process 670 images when i evaluate my model per epoch. But WHY so slow?",
    "url": "https://github.com/pytorch/vision/issues/1888",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: object detection"
    ],
    "created_at": "2020-02-15T05:14:15Z",
    "updated_at": "2020-02-27T19:43:04Z",
    "user": "cl2227619761"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 33343,
    "title": "How to convert the model to onnx in libtorch? ",
    "body": "struct Net : torch::nn::Module {\r\n\tNet()\r\n\t\t: conv1(torch::nn::Conv2dOptions(1, 20, /*kernel_size=*/5).stride(1)),\r\n\t\tconv2(torch::nn::Conv2dOptions(20, 40, /*kernel_size=*/5)),\r\n\t\tfc1(640, 120),\r\n\t\tfc2(120, 10) {\r\n\t\tregister_module(\"conv1\", conv1);\r\n\t\tregister_module(\"conv2\", conv2);\r\n\t\tregister_module(\"conv2_drop\", conv2_drop);\r\n\t\tregister_module(\"fc1\", fc1);\r\n\t\tregister_module(\"fc2\", fc2);\r\n\t}\r\n\ttorch::Tensor forward(torch::Tensor x) {\r\n\t\tx = torch::relu(torch::max_pool2d(conv1->forward(x), 2));//(28-5)+1=24,12 x 12 x 10\r\n\t\tx = torch::relu(torch::max_pool2d(conv2_drop->forward(conv2->forward(x)), 2));//(12-5)+1=8,4 x 4 x 20\r\n\t\t//x = torch::relu(torch::avg_pool2d(conv2_drop->forward(conv2->forward(x)), 2));//(12-5)+1=8,4 x 4 x 20\r\n\r\n\t\tx = x.view({ -1, 640 });\r\n\t\tx = torch::relu(fc1->forward(x));\r\n\t\tx = torch::dropout(x, /*p=*/0.5, /*training=*/is_training());\r\n\t\tx = fc2->forward(x);\r\n\t\treturn torch::log_softmax(x, /*dim=*/1);\r\n\t}\r\n\ttorch::nn::Conv2d conv1;\r\n\ttorch::nn::Conv2d conv2;\r\n\ttorch::nn::Dropout2d conv2_drop;\r\n\ttorch::nn::Linear fc1;\r\n\ttorch::nn::Linear fc2;\r\n};\n\ncc @yf225 @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof",
    "url": "https://github.com/pytorch/pytorch/issues/33343",
    "state": "closed",
    "labels": [
      "module: onnx",
      "module: cpp",
      "triaged"
    ],
    "created_at": "2020-02-14T13:14:23Z",
    "updated_at": "2021-11-08T22:01:30Z",
    "user": "bjliuzp"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 33341,
    "title": "how-to-adjust-learning-rate using libtorch",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/33341",
    "state": "open",
    "labels": [
      "triaged"
    ],
    "created_at": "2020-02-14T11:25:57Z",
    "updated_at": "2020-02-14T17:57:33Z",
    "user": "w1005444804"
  },
  {
    "repo": "pytorch/examples",
    "number": 715,
    "title": "C++ tutorial on sentence classification",
    "body": "@soumith \r\nCurrently, all the examples in C++ are related to image classification/ GAN. There are not many examples on text/nlp. I would like to include a starter example on sentence classification in c++. Can I go ahead and work on this??",
    "url": "https://github.com/pytorch/examples/issues/715",
    "state": "open",
    "labels": [
      "c++"
    ],
    "created_at": "2020-02-13T17:05:24Z",
    "updated_at": "2024-03-16T23:09:13Z",
    "comments": 4,
    "user": "avinashsai"
  },
  {
    "repo": "pytorch/vision",
    "number": 1883,
    "title": "Torchvision NMS description",
    "body": "I think here should be  `boxes with IoU >= iou_threshold`. Is this only a documentation typo and the cuda function called here is actually correctly implemented?\r\n\r\nhttps://github.com/pytorch/vision/blob/bf8595798eaccbaffb6c04db11406426eb1b3800/torchvision/ops/boxes.py#L22",
    "url": "https://github.com/pytorch/vision/issues/1883",
    "state": "closed",
    "labels": [
      "question",
      "module: documentation"
    ],
    "created_at": "2020-02-13T14:53:30Z",
    "updated_at": "2020-02-13T18:03:20Z",
    "user": "sharifza"
  },
  {
    "repo": "pytorch/vision",
    "number": 1882,
    "title": "How to modify the loss function of models in torchvison?",
    "body": "Excuse me if this question is a little stupid, for I just recently got access to this extraordinary field and cannot find the answer after some researching. \r\nI invoked the pretrained mrcnn model in torchvison however its output wasn't so ideal. So I wonder if I can modify the loss function to improve its performance without rewriting the whole framework?\r\nThanks a lot for any advice.",
    "url": "https://github.com/pytorch/vision/issues/1882",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-02-13T13:23:31Z",
    "updated_at": "2023-06-28T15:01:18Z",
    "user": "Michael-J98"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 850,
    "title": "Why is the pytorch sphinx theme included as a submodule?",
    "body": "I'm not an expert in sphinx, but after a lot of testing and headache while trying to improve a tutorial I really wonder why the sphinx theme under `./src` is included at all (as a submodule on github).\r\nIf you clone the repo with `git clone ...` it doesn't get downloaded.\r\nThe theme gets downloaded with `pip install -e git+git://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme` as it is defined in the `requirements.txt`. If the dir `src/pytorch-sphinx-theme` already exists you get ask if you want to wipe it, no matter if it is empty or not.\r\nAnd if you cloned the repo with `--recurse-submodules` you'd download an old version of the theme. \r\nSo why not drop the submodule and just include an empty `src` dir where the theme will be installed w/o error messages during installation from `requirements.txt`?",
    "url": "https://github.com/pytorch/tutorials/issues/850",
    "state": "closed",
    "labels": [
      "build issue"
    ],
    "created_at": "2020-02-13T13:02:16Z",
    "updated_at": "2024-09-06T21:25:48Z",
    "comments": 1,
    "user": "wAuner"
  },
  {
    "repo": "pytorch/vision",
    "number": 1878,
    "title": "So, what is the meaning for DeepLabHead in deeplabv3.py",
    "body": "Hi guys,\r\nI am implementing the deeplabv3+, imitating the pattern of deeplabv3.py,\r\nbut I don't quite understand the meaning for DeepLabHead,\r\nso do I need to put the upsampling operations in the DeepLabHead?\r\n\r\nAny answer and idea will be appreciated!",
    "url": "https://github.com/pytorch/vision/issues/1878",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: semantic segmentation"
    ],
    "created_at": "2020-02-12T09:45:51Z",
    "updated_at": "2020-02-14T05:57:44Z",
    "user": "songyuc"
  },
  {
    "repo": "pytorch/vision",
    "number": 1875,
    "title": "[Bug?]  roialign operation returning incorrect numerics",
    "body": "torchvision.ops.roialign is returning incorrect results for a simple test case-\r\n\r\n```\r\n# x: tensor of size (1,1,3,3)\r\nx= torch.tensor([[[[1,2,3],[4,5,6],[7,8,9]]]], dtype=torch.float)\r\nboxes = torch.tensor(([[0, 0, 2, 2, 0]]), dtype=torch.float)\r\nz = torchvision.ops.roi_align(x, boxes, (2,2),sampling_ratio=1)\r\n\r\n\r\n```\r\n\r\nreturns z as -\r\n```\r\ntensor([[[[7.5000, 8.5000],\r\n          [7.5000, 8.5000]]]])\r\n```\r\n\r\nshouldn't this be\r\n```\r\ntensor([[[[3.0000 4.0000],\r\n          [6.0000, 7.0000]]]])\r\n```\r\n",
    "url": "https://github.com/pytorch/vision/issues/1875",
    "state": "closed",
    "labels": [
      "question",
      "module: ops"
    ],
    "created_at": "2020-02-11T21:06:04Z",
    "updated_at": "2020-02-14T13:24:48Z",
    "user": "coderAddy"
  },
  {
    "repo": "pytorch/vision",
    "number": 1872,
    "title": "Shouldn't have a `+1` in the NMS implementation for the boxes width/height computation ?",
    "body": "The standard is to have a bounding box defined as quoted [here](https://github.com/facebookresearch/Detectron/blob/master/detectron/utils/boxes.py#L23).\r\n\r\nBut in the NMS [source code](https://github.com/pytorch/vision/blob/e2a8b4185e2b668b50039c91cdcf81eb4175d765/torchvision/csrc/cpu/nms_cpu.cpp), there is no `+1` when computing the areas and intersection values. This also leaves a bug in the case of getting `union = 0`, raising a `NaN` error when computing the `iou`.\r\n\r\nIf the code is correct, what am I missing ? Shouldn't the [documentation](https://pytorch.org/docs/stable/torchvision/ops.html#torchvision.ops.nms) explain this better ?\r\n\r\nThanks.",
    "url": "https://github.com/pytorch/vision/issues/1872",
    "state": "closed",
    "labels": [
      "question",
      "module: ops"
    ],
    "created_at": "2020-02-11T15:11:17Z",
    "updated_at": "2020-02-14T13:59:38Z",
    "user": "viniciusarruda"
  },
  {
    "repo": "pytorch/vision",
    "number": 1870,
    "title": "Unexpected behavior of torchvision.ops.nms",
    "body": "Following the example below and looking the nms [source code](https://github.com/pytorch/vision/blob/e2a8b4185e2b668b50039c91cdcf81eb4175d765/torchvision/csrc/cpu/nms_cpu.cpp), I expected a `NaN` error, as the intersection and union will be zero.\r\n\r\n    import torchvision  # torchvision==0.5.0+cpu\r\n    import torch        # torch==1.4.0+cpu\r\n\r\n    boxes = [[0.0, 0.0, 1.0, 1.0],\r\n             [2.0, 1.0, 1.0, 2.0]]\r\n\r\n    boxes = torch.tensor(boxes)\r\n    scores = torch.tensor([1., 0.5])\r\n\r\n    keep = torchvision.ops.nms(boxes, scores, 0.7)\r\n\r\nIf this same example is used with [this](https://github.com/rbgirshick/fast-rcnn/blob/master/lib/utils/nms.py) nms implementation (removing the +1 from the source code to be equivalent to the torchvision implementation), it raises a `NaN` error as expected.\r\n\r\nAm I missing something ?\r\nThanks.",
    "url": "https://github.com/pytorch/vision/issues/1870",
    "state": "closed",
    "labels": [
      "question",
      "module: ops"
    ],
    "created_at": "2020-02-11T12:09:02Z",
    "updated_at": "2020-02-27T19:57:35Z",
    "user": "viniciusarruda"
  },
  {
    "repo": "pytorch/vision",
    "number": 1869,
    "title": "It seems there is no upsampling operations in the implementation of Deeplabv3?",
    "body": "Hi, guys,\r\nI am learning about the the implementation of Deeplabv3 today,\r\nand I find that it seems, there is no upsampling operations in deeplabv3.py,\r\nso where is the upsampling operations of Deeplabv3 model?\r\n\r\nAny answer or idea will be appreciated!",
    "url": "https://github.com/pytorch/vision/issues/1869",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: semantic segmentation"
    ],
    "created_at": "2020-02-11T11:12:13Z",
    "updated_at": "2020-02-13T18:23:26Z",
    "user": "songyuc"
  },
  {
    "repo": "pytorch/vision",
    "number": 1860,
    "title": "Is there a backbone implementation of Xception?",
    "body": "Hi, guys,\r\nI want to know if there is a backbone implementation of Xception?\r\n\r\nAny answer or idea will be appreciated!",
    "url": "https://github.com/pytorch/vision/issues/1860",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: classification"
    ],
    "created_at": "2020-02-10T10:06:27Z",
    "updated_at": "2020-02-10T13:46:21Z",
    "user": "songyuc"
  },
  {
    "repo": "pytorch/vision",
    "number": 1859,
    "title": "Is there an implementation of Deeplabv3+?",
    "body": "Hi, guys,\r\nI want to know if there is an implementation of Deeplabv3+?\r\n\r\nAny answer will be appreciated!",
    "url": "https://github.com/pytorch/vision/issues/1859",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: semantic segmentation"
    ],
    "created_at": "2020-02-10T07:24:51Z",
    "updated_at": "2020-02-10T14:10:28Z",
    "user": "songyuc"
  },
  {
    "repo": "pytorch/vision",
    "number": 1856,
    "title": "FasterRCNN ground truth boxes reference system",
    "body": "Hi,\r\nI'm trying to train a FasterRCNN on a custom dataset.\r\nI have the ground truth bounding boxes in the [x1, y1, x2, y2] format, where:\r\n- 0 <= x1 <= x2 <= H\r\n- 0 <= y1 <= y2 <= W\r\n- `H, W = img.shape` with img being loaded with cv2\r\nWith numpy, if I extract `img[x1:x2, y1:y2]`, it's the correct portion of the image.\r\nNow, this seems to me the right way of formatting the boxes, since the documentation says:\r\n> boxes (``FloatTensor[N, 4]``): the ground-truth boxes in ``[x1, y1, x2, y2]`` format, with values\r\n          between ``0`` and ``H`` and ``0`` and ``W``\r\n\r\nHowever, the network doesn't seem to be learning anything during training.\r\nInstead, if I switch x1 with y1, x2 with y2, the network starts working properly.\r\nIt seems to be a reference system problem.\r\nWhat am I missing? It feels like there is an easy explanation to this problem.\r\n\r\nThanks in advance!",
    "url": "https://github.com/pytorch/vision/issues/1856",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-02-07T12:55:44Z",
    "updated_at": "2020-02-11T07:54:48Z",
    "user": "Robylyon93"
  },
  {
    "repo": "pytorch/vision",
    "number": 1854,
    "title": "Clarify the quantization bits in the pretrained models?",
    "body": "Thanks for the great work, and quantized pretrained models had been added in torchvision 0.5.\r\nhttps://github.com/pytorch/vision/releases\r\n\r\n>Quantized models\r\ntorchvision now provides quantized models for ResNet, ResNext, MobileNetV2, GoogleNet, InceptionV3 and ShuffleNetV2, as well as reference scripts for quantizing your own model in references/classification/train_quantization.py (https://github.com/pytorch/vision/blob/master/references/classification/train_quantization.py). \r\n\r\nHowever, I was confused what is the quantized bits this models are in.\r\nIs it in FP16 or INT8? I think this should be clarified to lessen confusion.\r\n",
    "url": "https://github.com/pytorch/vision/issues/1854",
    "state": "closed",
    "labels": [
      "question",
      "module: documentation",
      "module: models.quantization"
    ],
    "created_at": "2020-02-07T04:50:29Z",
    "updated_at": "2020-03-10T10:39:08Z",
    "user": "kentaroy47"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 33022,
    "title": "How do you convert Torch output iOS NSNumber to UIImage",
    "body": "I recently trained a model in PyTorch and created the .pt model file. I was able to use the model file in iOS with https://pytorch.org/mobile/ios/ to get an output.\r\n\r\nBut the output is an array of NSNumber.\r\n\r\nHow can I convert that to UIImage?\r\n\r\nHere's how i'm loading the model:\r\n\r\n```\r\n    private lazy var module: TorchModule = {\r\n        if let filePath = Bundle.main.path(forResource: \"face\", ofType: \"pt\"),\r\n            let module = TorchModule(fileAtPath: filePath) {\r\n            print(\"Loaded Model\")\r\n            return module\r\n        } else {\r\n            print(Bundle.main.path(forResource: \"face\", ofType: \"pt\"))\r\n            fatalError(\"Can't find the model file!\")\r\n        }\r\n    }()\r\n```\r\n\r\nHere's how i'm passing and image and getting the NSNumber output:\r\n\r\n```\r\n        let image = imageView.image!\r\n        let resizedImage = image.resized(to: CGSize(width: 256, height: 256))\r\n        guard var pixelBuffer = resizedImage.normalized() else {\r\n            return\r\n        }\r\n\r\n        guard let outputs = module.predict(image: UnsafeMutableRawPointer(&pixelBuffer)) else {\r\n            return\r\n        }\r\n```\r\n\r\nAnd here are the numbers I'm getting back:\r\n\r\n```\r\n1000 elements\r\n  - 0 : 0.9556794\r\n  - 1 : 0.959437\r\n  - 2 : 0.9545235\r\n  - 3 : 0.9602792\r\n  - 4 : 0.9626616\r\n  - 5 : 0.9451413\r\n  - 6 : 0.9630886\r\n  - 7 : 0.9649493\r\n  - 8 : 0.96794\r\n  - 9 : 0.9451433\r\n  - 10 : 0.9606364\r\n  - 11 : 0.9666034\r\n  - 12 : 0.9719177\r\n  - 13 : 0.9503573\r\n  - 14 : 0.9689084\r\n  - 15 : 0.9644295\r\n  - 16 : 0.9715278\r\n  - 17 : 0.9545213\r\n  - 18 : 0.9695826\r\n  - 19 : 0.9616866\r\n  - 20 : 0.9709251\r\n  - 21 : 0.9504414\r\n  - 22 : 0.9684582\r\n  - 23 : 0.9636042\r\n  - 24 : 0.9707479\r\n  - 25 : 0.9474098\r\n  - 26 : 0.9687761\r\n  - 27 : 0.962492\r\n  - 28 : 0.9722843\r\n  - 29 : 0.9512891\r\n  - 30 : 0.9713559\r\n  - 31 : 0.9646252\r\n  - 32 : 0.9709271\r\n  - 33 : 0.9450958\r\n  - 34 : 0.9687521\r\n  - 35 : 0.9592332\r\n  - 36 : 0.9614322\r\n  - 37 : 0.9501442\r\n  - 38 : 0.9671555\r\n  - 39 : 0.9576904\r\n  - 40 : 0.966316\r\n  - 41 : 0.9518282\r\n  - 42 : 0.9691417\r\n  - 43 : 0.9573505\r\n  - 44 : 0.9599486\r\n  - 45 : 0.9461015\r\n  - 46 : 0.9679283\r\n  - 47 : 0.9560247\r\n  - 48 : 0.9592899\r\n  - 49 : 0.9511722\r\n  - 50 : 0.9696479\r\n  - 51 : 0.9560531\r\n  - 52 : 0.9652212\r\n  - 53 : 0.9524947\r\n  - 54 : 0.9737433\r\n  - 55 : 0.960919\r\n  - 56 : 0.968053\r\n  - 57 : 0.9475061\r\n  - 58 : 0.9700636\r\n  - 59 : 0.9567729\r\n  - 60 : 0.9692516\r\n  - 61 : 0.9438604\r\n  - 62 : 0.9666854\r\n  - 63 : 0.9534383\r\n  - 64 : 0.9692665\r\n  - 65 : 0.940613\r\n  - 66 : 0.9655256\r\n  - 67 : 0.9560776\r\n  - 68 : 0.9666242\r\n  - 69 : 0.9394323\r\n  - 70 : 0.968111\r\n  - 71 : 0.95995\r\n  - 72 : 0.965363\r\n  - 73 : 0.9503852\r\n  - 74 : 0.9690766\r\n  - 75 : 0.9677175\r\n  - 76 : 0.9689373\r\n  - 77 : 0.958289\r\n  - 78 : 0.9717255\r\n  - 79 : 0.9717532\r\n  - 80 : 0.9726413\r\n  - 81 : 0.9699872\r\n  - 82 : 0.9718522\r\n  - 83 : 0.970526\r\n  - 84 : 0.9766954\r\n  - 85 : 0.969599\r\n  - 86 : 0.9727935\r\n  - 87 : 0.9729283\r\n  - 88 : 0.976265\r\n  - 89 : 0.9681603\r\n  - 90 : 0.9752769\r\n  - 91 : 0.9746329\r\n  - 92 : 0.9779454\r\n  - 93 : 0.9716548\r\n  - 94 : 0.9771305\r\n  - 95 : 0.9763421\r\n  - 96 : 0.9785836\r\n  - 97 : 0.972732\r\n  - 98 : 0.9775047\r\n  - 99 : 0.972182\r\n  - 100 : 0.9754875\r\n  - 101 : 0.9716605\r\n  - 102 : 0.9703948\r\n  - 103 : 0.9705175\r\n  - 104 : 0.9728737\r\n  - 105 : 0.9674641\r\n  - 106 : 0.9717978\r\n  - 107 : 0.9679852\r\n  - 108 : 0.9708558\r\n  - 109 : 0.9624084\r\n  - 110 : 0.971324\r\n  - 111 : 0.9681918\r\n  - 112 : 0.9727319\r\n  - 113 : 0.9670874\r\n  - 114 : 0.974831\r\n  - 115 : 0.9708152\r\n  - 116 : 0.9764423\r\n  - 117 : 0.9653759\r\n  - 118 : 0.9755697\r\n  - 119 : 0.9701872\r\n  - 120 : 0.9722598\r\n  - 121 : 0.9629219\r\n  - 122 : 0.9759187\r\n  - 123 : 0.9682656\r\n  - 124 : 0.9722873\r\n  - 125 : 0.9610798\r\n  - 126 : 0.9722118\r\n  - 127 : 0.9668668\r\n  - 128 : 0.9654322\r\n  - 129 : 0.9550279\r\n  - 130 : 0.9650962\r\n  - 131 : 0.9669107\r\n  - 132 : 0.9664246\r\n  - 133 : 0.9492099\r\n  - 134 : 0.968359\r\n  - 135 : 0.961526\r\n  - 136 : 0.9675772\r\n  - 137 : 0.9473796\r\n  - 138 : 0.9685749\r\n  - 139 : 0.9654633\r\n  - 140 : 0.9687688\r\n  - 141 : 0.9504932\r\n  - 142 : 0.9691511\r\n  - 143 : 0.9665062\r\n  - 144 : 0.9718524\r\n  - 145 : 0.9436379\r\n  - 146 : 0.9687477\r\n  - 147 : 0.9655094\r\n  - 148 : 0.9710371\r\n  - 149 : 0.9442329\r\n  - 150 : 0.9679898\r\n  - 151 : 0.9687661\r\n  - 152 : 0.9667206\r\n  - 153 : 0.9499748\r\n  - 154 : 0.9711047\r\n  - 155 : 0.9650826\r\n  - 156 : 0.9675245\r\n  - 157 : 0.9424814\r\n  - 158 : 0.9717015\r\n  - 159 : 0.961861\r\n  - 160 : 0.9632423\r\n  - 161 : 0.95027\r\n  - 162 : 0.9681548\r\n  - 163 : 0.95991\r\n  - 164 : 0.9622825\r\n  - 165 : 0.9419831\r\n  - 166 : 0.9676843\r\n  - 167 : 0.9502627\r\n  - 168 : 0.9604739\r\n  - 169 : 0.9390262\r\n  - 170 : 0.9632315\r\n  - 171 : 0.9489474\r\n  - 172 : 0.9538567\r\n  - 173 : 0.9387113\r\n  - 174 : 0.9685857\r\n  - 175 : 0.9537058\r\n  - 176 : 0.9516653\r\n  - 177 : 0.9406225\r\n  - 178 : 0.9654861\r\n  - 179 : 0.9563531\r\n  - 180 : 0.9503596\r\n  - 181 : 0.9421797\r\n  - 182 : 0.9610486\r\n  - 183 : 0.9516525\r\n  - 184 : 0.9575865\r\n  - 185 : 0.9422593\r\n  - 186 : 0.9571754\r\n  - 187",
    "url": "https://github.com/pytorch/pytorch/issues/33022",
    "state": "closed",
    "labels": [
      "oncall: mobile",
      "module: ios"
    ],
    "created_at": "2020-02-05T21:41:29Z",
    "updated_at": "2020-02-07T19:12:04Z",
    "user": "rooseveltrp"
  },
  {
    "repo": "pytorch/vision",
    "number": 1848,
    "title": "training FCN and DeepLab for segmentation",
    "body": "does PyTorch provide steps on how to use the deeplab or fcn for training a segmentation task?\r\nif it already exists, where I can find it?",
    "url": "https://github.com/pytorch/vision/issues/1848",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: semantic segmentation"
    ],
    "created_at": "2020-02-04T19:34:28Z",
    "updated_at": "2020-02-13T17:50:09Z",
    "user": "isalirezag"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 120,
    "title": "What is the expected number of epochs for training sentenceBERT",
    "body": "Hi, \r\n\r\nGiven a model in {BERT, XLM, .XLnet, ...}, do you have a dictionary of estimated best number of epochs for training your Siamese Network on NLI dataset? \r\n\r\nElse, what would be your suggestion on this? (other than just keep trying with different epochs parameters since it takes a lot of computational time \ud83d\ude1e )\r\n\r\nThat would be very useful for other users as well I think. \r\n\r\nCheers and great job! :D ",
    "url": "https://github.com/huggingface/sentence-transformers/issues/120",
    "state": "open",
    "labels": [],
    "created_at": "2020-02-04T14:17:22Z",
    "updated_at": "2020-06-08T19:48:20Z",
    "user": "MastafaF"
  },
  {
    "repo": "pytorch/vision",
    "number": 1847,
    "title": "Required range is confusing in torchvision.utils.save_image",
    "body": "https://discuss.pytorch.org/t/float-vs-int-in-torchvision-utils-save-image/68596",
    "url": "https://github.com/pytorch/vision/issues/1847",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2020-02-04T07:47:28Z",
    "updated_at": "2025-01-23T10:55:55Z",
    "user": "chinglamchoi"
  },
  {
    "repo": "huggingface/transformers",
    "number": 2705,
    "title": "What is the input for TFBertForSequenceClassification?",
    "body": "# \u2753 Questions & Help\r\nWhat is the input for TFBertForSequenceClassification?\r\n## Details\r\nI have a simple multiclass text data on which I want to train the BERT model.\r\n\r\nFrom docs I have found the input format of data:\r\n```a list of varying length with one or several input Tensors IN THE ORDER given in the docstring: model([input_ids, attention_mask]) or model([input_ids, attention_mask, token_type_ids])```\r\n \r\nIn my understanding:\r\n`input_ids`- tokenized sentences, generated from BERT tokenizer.\r\n`attention_mask`- As name suggests it is attention mask. I should use it to mask out padding tokens. Please correct me if I am wrong.\r\nNow what is `token_type_ids'? is it necessary?\r\n\r\nWhen I tried to print output_shape of the model? I got:\r\n`AttributeError: The layer has never been called and thus has no defined output shape.`\r\nSo, let's say my dataset has 5 classes. Does this model expect one-hot encoded vector of shape [BATCH_SIZE, CLASSES] for .fit() method? \r\n\r\nAlso if I don't use .from_pretrained() method, will it load an untrained model?",
    "url": "https://github.com/huggingface/transformers/issues/2705",
    "state": "closed",
    "labels": [],
    "created_at": "2020-02-01T10:20:29Z",
    "updated_at": "2020-03-12T08:41:25Z",
    "user": "sainimohit23"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 32690,
    "title": "How to customize build torchscript model to be used in end devices codebase",
    "body": "## \ud83d\ude80 Feature\r\nI want to compile my model to be executed in the Python/C script running on our customers computers/end devices, without the need to load the entire torch/libtorch package, but only what is needed based on the model operations.\r\n\r\n## Motivation\r\nCurrently, the size of my ResNet model (for example) is ~100MB but it needs torch/libtorch, which requires ~1.5GB of space.\r\nEnd devices (smart cameras, robots, etc.) are low in resources. R&D efforts for deployment on end devices includes a large efforts to optimize the model and reduce its size to minimum. Having my model accompanied by torch/libtorch is a difficult restriction. I am aware that the mobile community is leading the attention for similar features. However, considering modern smartphones resources, there is even a greater need for such a solution for other end devices.\r\n\r\n## Current status\r\nCurrently i am doing this series of commands:\r\n`model = torchvision.models.resnet50(pretrained=True)`\r\n`model.eval()`\r\n`example = torch.ones(1, 3, 224, 224)`\r\n`traced_model = torch.jit.trace(model, example)`\r\n`ops = torch.jit.export_opnames(model)`\r\n`traced_model.save('traced_model.pt')`\r\n`with open('model_ops.yaml', 'w') as output:`\r\n`   yaml.dump(ops, output)`\r\nThe request is to enable building a model i can use in another python/c script without the need to load the entire torch or libtorch packages, but only what is needed based on the model operations.\r\n\r\n## Alternatives\r\nI am not aware of such alternatives. Will be happy to hear about them, if there are any.\r\n\r\n\r\n\r\ncc @suo",
    "url": "https://github.com/pytorch/pytorch/issues/32690",
    "state": "open",
    "labels": [
      "oncall: jit",
      "triaged",
      "oncall: mobile"
    ],
    "created_at": "2020-01-28T10:11:07Z",
    "updated_at": "2020-02-28T18:54:55Z",
    "user": "danmalowany-allegro"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 833,
    "title": "Using encoder output in attention model",
    "body": "I study this [NLP from scratch](https://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html) tutorial. Encoder's output shape is `(seq_len, batch, hidden_size)`\r\n\r\nWhy does the author only save `[0, 0]` part (later is needed for attention weights) but not `[0]`:\r\nhttps://github.com/pytorch/tutorials/blob/8244bffa52641fab0c37d35c6843faa1beaba06b/intermediate_source/seq2seq_translation_tutorial.py#L563\r\n\r\nIs there a mistake?",
    "url": "https://github.com/pytorch/tutorials/issues/833",
    "state": "closed",
    "labels": [],
    "created_at": "2020-01-25T18:06:14Z",
    "updated_at": "2020-01-29T19:03:51Z",
    "comments": 0,
    "user": "kenenbek"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 32485,
    "title": "How to specify pytroch as a package requirement on windows ?",
    "body": "## \u2753 Questions and Help\r\n\r\nI have a python package which depends on pytorch and which I\u2019d like windows users to be able to install via pip (the specific package is: https://github.com/mindsdb/lightwood, but I don\u2019t think this is very relevant to my question).\r\n\r\nWhat are the best practices for going about this ?\r\n\r\nAre there some project I could use as examples ?\r\n\r\nIt seems like the pypi hosted version of torch & torchvision aren\u2019t windows compatible and the \u201cgetting started\u201d section suggests installing from the custom pytorch repository, but beyond that I\u2019m not sure what the ideal solution would be to incorporate this as part of a setup script.",
    "url": "https://github.com/pytorch/pytorch/issues/32485",
    "state": "closed",
    "labels": [],
    "created_at": "2020-01-22T09:31:44Z",
    "updated_at": "2020-01-22T10:27:03Z",
    "user": "George3d6"
  },
  {
    "repo": "huggingface/transformers",
    "number": 2591,
    "title": "What is the f1 score of Squad v2.0 on bert-base? I only got f1 score 74.78.",
    "body": "## \u2753 Questions & Help\r\n\r\n<!-- A clear and concise description of the question. -->\r\nHello, I am doing some experiment of squad v2.0 on bert-base (NOT bert-large).\r\nAccording to the BERT paper, bert-large achieves f1 score 81.9 with squad v2.0.\r\nSince I couldn't find the official result for bert-base, I am not sure if I am getting the right f1 score.\r\nHas anyone tried running squad v2.0 on bert base? \r\n\r\nI got f1 score **74.78** for squad v2.0 result on bert-base, using below command:\r\nsudo python3 ../../../run_squad.py \\\r\n  --model_type bert \\\r\n  --model_name_or_path bert-base-cased \\\r\n  --do_train \\\r\n  --do_eval \\\r\n  --train_file $SQUAD2_DIR/train-v2.0.json \\\r\n  --predict_file $SQUAD2_DIR/dev-v2.0.json \\\r\n  --per_gpu_train_batch_size 4 \\\r\n  --learning_rate 4e-5 \\\r\n  --num_train_epochs 2.0 \\\r\n  --max_seq_length 384 \\\r\n  --doc_stride 128 \\\r\n  --version_2_with_negative \\\r\n  --overwrite_output_dir \\\r\n  --output_dir ../../../bert_base/$TASK_NAME/",
    "url": "https://github.com/huggingface/transformers/issues/2591",
    "state": "closed",
    "labels": [],
    "created_at": "2020-01-20T09:03:45Z",
    "updated_at": "2020-01-22T05:03:12Z",
    "user": "YJYJLee"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 828,
    "title": "Multiple input tutorial",
    "body": "I am currently trying to build a model that takes two different inputs into account, trying to generalize the interaction between both from their properties. \r\nHowever, I cannot find any resource on how to build a dataset that allows multiple inputs, while it seems to be quite simple to build the neural net itself. Yet, I haven't found a solution. It would be great to address this issue in the PyTorch documentation, or give a tutorial for this. ",
    "url": "https://github.com/pytorch/tutorials/issues/828",
    "state": "closed",
    "labels": [],
    "created_at": "2020-01-20T08:21:57Z",
    "updated_at": "2021-06-09T21:14:17Z",
    "comments": 6,
    "user": "THinnerichs"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 32418,
    "title": "how to install pytorch on AMD GPU",
    "body": "I find that the pytorch offer one version of downloading which not requires CUDA. And  I follow the instruction.\r\nI choose the pytorch 1.4.\r\nMy OS is Windows.\r\nPip is used to install.\r\nMy version of python is python 3.6\r\nCUDA None\r\nand I run the command pip3 install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html\r\nHowever, here comes two errors\r\nERROR: Could not find a version that satisfies the requirement torch==1.4.0+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)\r\nERROR: No matching distribution found for torch==1.4.0+cpu\r\nWhy? Thanks a lot for help",
    "url": "https://github.com/pytorch/pytorch/issues/32418",
    "state": "closed",
    "labels": [],
    "created_at": "2020-01-20T06:19:18Z",
    "updated_at": "2023-04-10T18:58:46Z",
    "user": "PIPIKAI-Sung"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 32403,
    "title": "How to accelerate the compiling of pytorch ",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\nI modify some file of Aten for some reason, when I compile the pytorch project, it takes a lot of  time, almost 5 minutes in my computer...\r\npython setup install  costs a lot of time,  can anybody  help me accelerate the compiling of  pytorch, thanks a lot ",
    "url": "https://github.com/pytorch/pytorch/issues/32403",
    "state": "open",
    "labels": [
      "module: build",
      "triaged"
    ],
    "created_at": "2020-01-19T13:42:14Z",
    "updated_at": "2020-01-21T23:25:36Z",
    "user": "daydayfun"
  },
  {
    "repo": "pytorch/java-demo",
    "number": 3,
    "title": "how and where is it better to install the LIBTORCH library localy for the project?",
    "body": "how and where is it better to install the LIBTORCH library localy for the project in linux(Ubuntu)?\r\nWhile make proj Intellij idea write Error: \"A problem occurred evaluating root project 'java-demo'. > LIBTORCH_HOME not present in environment.\"\r\n",
    "url": "https://github.com/pytorch/java-demo/issues/3",
    "state": "closed",
    "labels": [],
    "created_at": "2020-01-18T18:03:04Z",
    "updated_at": "2020-04-29T02:53:34Z",
    "user": "vit1967"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 32282,
    "title": "How to convert layer_norm layer to ONNX?",
    "body": "I\u2019m trying to convert my model to ONNX format for further deployment in TensorRT. Here is a sample code to illustrate my problem in layer_norm here.\r\n\r\n``` python\r\nimport torch\r\nfrom torch import nn\r\n\r\nclass ExportModel(nn.Module):\r\n    def __init__(self):\r\n        super().__init__()\r\n\r\n    def forward(self, x):\r\n        # n, c, h, w = x.shape\r\n        # y = nn.functional.layer_norm(x, [c, h, w])       # not working\r\n        # y = nn.functional.layer_norm(x, x.size()[1:])     # not working\r\n        y = nn.functional.layer_norm(x, [16, 32, 128])\r\n\r\n        return y\r\n\r\ndef main():\r\n    model = ExportModel()\r\n\r\n    dummy_input = torch.randn(64, 16, 32, 128)\r\n    input_names = [ \"input\" ]\r\n    output_names = [ \"output\" ]\r\n\r\n    with torch.no_grad():\r\n        torch.onnx.export(\r\n            model, dummy_input, \"sample.onnx\", verbose=True,\r\n            input_names=input_names, output_names=output_names\r\n        )\r\n    return\r\n\r\nif __name__ == '__main__':\r\n    main()\r\n```\r\n\r\nIt could only work when the parameter of layer_norm is constant number. If not, the following error will occur.\r\n\r\n``` shell\r\nTraceback (most recent call last):\r\n  File \"sample.py\", line 31, in <module>\r\n    main()\r\n  File \"sample.py\", line 26, in main\r\n    verbose=True, input_names=input_names, output_names=output_names\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/onnx/__init__.py\", line 148, in export\r\n    strip_doc_string, dynamic_axes, keep_initializers_as_inputs)\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/onnx/utils.py\", line 66, in export\r\n    dynamic_axes=dynamic_axes, keep_initializers_as_inputs=keep_initializers_as_inputs)\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/onnx/utils.py\", line 409, in _export\r\n    fixed_batch_size=fixed_batch_size)\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/onnx/utils.py\", line 289, in _model_to_graph\r\n    fixed_batch_size=fixed_batch_size)\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/onnx/utils.py\", line 132, in _optimize_graph\r\n    graph = torch._C._jit_pass_onnx(graph, operator_export_type)\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/onnx/__init__.py\", line 179, in _run_symbolic_function\r\n    return utils._run_symbolic_function(*args, **kwargs)\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/onnx/utils.py\", line 647, in _run_symbolic_function\r\n    return op_fn(g, *inputs, **attrs)\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/onnx/symbolic_helper.py\", line 128, in wrapper\r\n    args = [_parse_arg(arg, arg_desc) for arg, arg_desc in zip(args, arg_descriptors)]\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/onnx/symbolic_helper.py\", line 128, in <listcomp>\r\n    args = [_parse_arg(arg, arg_desc) for arg, arg_desc in zip(args, arg_descriptors)]\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/onnx/symbolic_helper.py\", line 81, in _parse_arg\r\n    \"', since it's not constant, please try to make \"\r\nRuntimeError: Failed to export an ONNX attribute 'onnx::Gather', since it's not constant, please try to make things (e.g., kernel size) static if possible\r\n```\r\n\r\nI have few code blocks in my model have layer_norm op. It would turn into some ugly code if I explicitly mark all parameters constant number. Is there any \u201cbest practice\u201d of how to use dynamic shape for this kind of use case?\r\n\r\nAlso, I have posted the same issue on [forum](https://discuss.pytorch.org/t/how-to-convert-layer-norm-layer-to-onnx/66841). I'm not sure where is the better place for this kind of quesion, so I duplicate the issue here.\r\n\r\nThanks in advance.\n\ncc @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof",
    "url": "https://github.com/pytorch/pytorch/issues/32282",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2020-01-16T10:53:52Z",
    "updated_at": "2020-03-23T08:24:02Z",
    "user": "rtrobin"
  },
  {
    "repo": "pytorch/vision",
    "number": 1757,
    "title": "Torchvision Resnet 50 accuracy",
    "body": "Hey, Pytorch\u2019s (torchvision) Resnet 50 accuracy is declared to be 76.15.\r\nBut when I\u2019m using the training script from PyTorch\u2019s repo, which is mentioned in the official torchvision website(https://pytorch.org/docs/stable/torchvision/models.html#classification):\r\n[https://github.com/pytorch/examples/blob/master/imagenet/main.py]\r\nand the Resnet50 from torchvision:\r\n[https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py]\r\nWhen training it, after one epoch I\u2019m getting an accuracy of 76.6, how can it be? isn\u2019t the models fully trained?\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/vision/issues/1757",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2020-01-16T09:43:54Z",
    "updated_at": "2021-06-30T15:08:29Z",
    "user": "Esaada"
  },
  {
    "repo": "pytorch/vision",
    "number": 1751,
    "title": " module 'torchvision' has no attribute 'ops'",
    "body": "torchvision. ops implements operators that are specific for Computer Vision. Those operators currently do not support TorchScript. Performs non-maximum suppression (NMS) on the boxes according to their intersection-over-union (IoU)\r\n\r\noutput[image_i] = pred[torchvision.ops.boxes.batched_nms(pred[:, :4], pred[:, 4], c, iou_thres)]\r\n\r\nAttributeError: module 'torchvision' has no attribute 'ops'\r\n\r\n[https://github.com/ultralytics/yolov3/blob/master/utils/utils.py](url)\r\n\r\ncan anyone please help me to bypass this problem?",
    "url": "https://github.com/pytorch/vision/issues/1751",
    "state": "closed",
    "labels": [
      "question",
      "module: ops"
    ],
    "created_at": "2020-01-15T15:01:54Z",
    "updated_at": "2020-01-15T18:45:32Z",
    "user": "omizonly"
  },
  {
    "repo": "huggingface/tokenizers",
    "number": 73,
    "title": "Decoding to string",
    "body": "Hi, thanks for this awesome library!\r\n\r\nI want to decode BPE back to *actual* text, so that I can calculate BLEU scores. When I use the tokenizer.decoder, I get a string without any whitespace. I understand I can use a `pre_tokenizer` to get whitespaces, but in that case the decoded output would be `i can feel the mag i c , can you ?` (or something similar, depending on the BPE model). How do I get the actual text through decoding, so that I can calculate BLEU scores like I normally would?\r\n\r\n```\r\nfrom tokenizers import Tokenizer, models, pre_tokenizers, decoders\r\n\r\n# Load a BPE Model\r\nvocab = \"./scripts/vocab.json\"\r\nmerges = \"./path/to/merges.txt\"\r\nbpe = models.BPE.from_files(vocab, merges)\r\n\r\n# Initialize a tokenizer\r\ntokenizer = Tokenizer(bpe)\r\n\r\n# Customize pre-tokenization and decoding\r\ntokenizer.pre_tokenizer = pre_tokenizers.ByteLevel.new(add_prefix_space=True)\r\ntokenizer.decoder = decoders.ByteLevel.new()\r\n\r\n# And then encode:\r\nencoded = tokenizer.encode(\"i can feel the magic, can you?\")\r\n\r\ndecoded = tokenizer.decode(encoded.ids)\r\nprint(encoded)\r\nprint(decoded)\r\n>>> ['i', 'can', 'feel', 'the', 'mag', 'i', 'c', ',', 'can', 'you', '?']\r\n>>> icanfeelthemagic,canyou?\r\n\r\n```\r\n",
    "url": "https://github.com/huggingface/tokenizers/issues/73",
    "state": "closed",
    "labels": [
      "question",
      "python"
    ],
    "created_at": "2020-01-15T12:58:44Z",
    "updated_at": "2020-01-20T15:38:29Z",
    "user": "davidstap"
  },
  {
    "repo": "pytorch/vision",
    "number": 1737,
    "title": "Pyramid layer",
    "body": "I want to extract the third layer of feature pyramid from \r\n\r\nfeatures = self.backbone(images.tensors) in generalized_rcnn.py\r\n\r\nany help please?",
    "url": "https://github.com/pytorch/vision/issues/1737",
    "state": "open",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2020-01-10T15:44:20Z",
    "updated_at": "2020-01-10T16:29:44Z",
    "user": "MitraTj"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 32041,
    "title": "How to export L2-normalization to onnx",
    "body": "## \ud83d\ude80 Feature\r\nSupport export for LpNormalization from PyTorch to ONNX, thus it could be used in TensorRT model.\r\n\r\n\n\ncc @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof",
    "url": "https://github.com/pytorch/pytorch/issues/32041",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged",
      "enhancement",
      "onnx-needs-info"
    ],
    "created_at": "2020-01-10T14:37:38Z",
    "updated_at": "2022-10-24T18:08:40Z",
    "user": "stoneyang"
  },
  {
    "repo": "pytorch/vision",
    "number": 1732,
    "title": "How to use Resnet to deal with one channel input through pytorch.hub ?",
    "body": "I did this to load the Resnet model, and since my input contains only one channel, the model does not work.\r\n\r\n`model = torch.hub.load('pytorch/vision:v0.4.2', 'resnet18', pretrained=True)`\r\n\r\nI know how to modify the 'resnet.py' file to satisfy my demands, but that means I must include the modified 'resnet.py' file in my project, which may be unnecessary. It will be a lot better if the model can be loaded simply from pytorch.\r\n\r\nAnyone has solutions? Thanks a lot.\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/1732",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: classification"
    ],
    "created_at": "2020-01-09T09:22:50Z",
    "updated_at": "2020-01-09T20:22:18Z",
    "user": "PhilWallace"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31984,
    "title": "Question about how to predict the derivation of the output?",
    "body": "I expect a neural network predict a value and the derivation of value.Is the following code the correct way?\r\n```python\r\nimport torch\r\nfrom torch import nn\r\nfrom torch.autograd import grad\r\n\r\nclass net(nn.Module):\r\n    def __init__(self):\r\n        super(net, self).__init__()\r\n        self.lin1 = nn.Linear(3, 30)\r\n        self.lin2 = nn.Linear(30, 1)\r\n\r\n    def forward(self, p):\r\n        x = self.lin1(p)\r\n        x = nn.ReLU()(x)\r\n        return self.lin2(x)\r\n\r\nx = torch.randn(1000, 3)\r\ny = (5 * torch.sin(x) + 3 * torch.cos(x)).sum(dim=-1).unsqueeze(-1)\r\nz = (5 * torch.cos(x) - 3 * torch.sin(x)).sum(dim=-1).unsqueeze(-1)\r\nmodel = net()\r\noptimizer = torch.optim.Adam(model.parameters(), lr=3e-3)\r\n\r\nfor epoch in range(10000):\r\n    model.train()\r\n    x.requires_grad = True\r\n    optimizer.zero_grad()\r\n    output = model(x)\r\n    grad_x = grad(output.sum(), x, retain_graph=True)[0]\r\n    loss_y = nn.MSELoss()(output, y)\r\n    loss_z = nn.MSELoss()(grad_x.sum(dim=-1).unsqueeze(-1), z)\r\n    loss = loss_y + loss_z\r\n    loss.backward(retain_graph=True)\r\n    optimizer.step()\r\n    print('Loss_y = {:.4f} | Loss_z = {:.4f}.'.format(loss_y.item(), loss_z.item())\r\n```\r\nI check the grad_fn of variable ```loss_z```,find ```loss_y.grad_fn = <MseLossBackward object at 0x0000024F2AB8DF98>```,but ```loss_z.grad_fn = None```.So although ```loss_z``` decreases,this means the loss of the derivation of output doesn\u2019t participate in the gradient decent.Maybe just the model predicts ```y``` very well,so it can predict ```z``` well.If the dataset is not as easy as this form,loss_z even doesn\u2019t decrease.\r\nThen I try to only predict z without predict y,like the following code:\r\n```python\r\nimport torch\r\nfrom torch import nn\r\nfrom torch.autograd import grad\r\n\r\nclass net(nn.Module):\r\n    def __init__(self):\r\n        super(net, self).__init__()\r\n        self.lin1 = nn.Linear(3, 30)\r\n        self.lin2 = nn.Linear(30, 1)\r\n\r\n    def forward(self, p):\r\n        x = self.lin1(p)\r\n        x = nn.ReLU()(x)\r\n        return self.lin2(x)\r\n\r\nx = torch.randn(100, 3)\r\ny = (5 * torch.sin(x) + 3 * torch.cos(x)).sum(dim=-1).unsqueeze(-1)\r\nz = (5 * torch.cos(x) - 3 * torch.sin(x)).sum(dim=-1).unsqueeze(-1)\r\nmodel = net()\r\noptimizer = torch.optim.Adam(model.parameters(), lr=3e-3)\r\n\r\nfor epoch in range(1000):\r\n    model.train()\r\n    x.requires_grad = True\r\n    optimizer.zero_grad()\r\n    output = model(x)\r\n    grad_x = grad(output.sum(), x, retain_graph=True)[0]\r\n    loss_z = nn.MSELoss()(grad_x.sum(dim=-1).unsqueeze(-1), z)\r\n    print(loss_z.grad_fn)  # None\r\n    loss_z.backward()\r\n    optimizer.step()\r\n    print('Loss_z = {:.4f}.'.format(loss_z.item()))\r\n```\r\nThis code can't run,with the error:\r\n```python\r\nTraceback (most recent call last):\r\n  File \"c:/Users/wz/Desktop/test.py\", line 33, in <module>\r\n    loss_z.backward()\r\n  File \"C:\\Users\\wz\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\torch\\tensor.py\", line 118, in backward\r\n    torch.autograd.backward(self, gradient, retain_graph, create_graph)\r\n  File \"C:\\Users\\wz\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\torch\\autograd\\__init__.py\", line 93, in backward\r\n    allow_unreachable=True)  # allow_unreachable flag\r\nRuntimeError: element 0 of tensors does not require grad and does not have a grad_fn\r\n```\r\nI print ```loss_z.grad_fn``` and find it's None,but I don't know how to fix it.So how to predict the derivation of the output correctly?",
    "url": "https://github.com/pytorch/pytorch/issues/31984",
    "state": "closed",
    "labels": [],
    "created_at": "2020-01-09T07:31:25Z",
    "updated_at": "2020-01-09T18:57:24Z",
    "user": "thu-wangz17"
  },
  {
    "repo": "pytorch/vision",
    "number": 1723,
    "title": "torchvision fail to use GPU.",
    "body": "While I am using [detectron2](https://github.com/facebookresearch/detectron2), I meet the problem that some function in torchvision can't use GPU.\r\n\r\nThe details are here: https://github.com/facebookresearch/detectron2/issues/469\r\n\r\nIt seems an install problem. Directly using conda to install torchvision should be ok for most situations, but I am not sure whether this will lead to cuda usage error. \r\n\r\nCould you give some suggestions to fix this problem?  : )",
    "url": "https://github.com/pytorch/vision/issues/1723",
    "state": "closed",
    "labels": [
      "question",
      "topic: build"
    ],
    "created_at": "2020-01-07T09:23:49Z",
    "updated_at": "2020-05-11T12:18:51Z",
    "user": "dihuangdh"
  },
  {
    "repo": "huggingface/transformers",
    "number": 2411,
    "title": "What is the difference between T5Model, T5WithLMHeadModel, T5PreTrainedModel?",
    "body": "## \u2753 Questions & Help\r\n\r\n<!-- A clear and concise description of the question. -->\r\nI notice that for T5 model, there are more choices(T5Model, T5WithLMHeadModel, T5PreTrainedModel) than BERT or GPT. What is the difference between these three? I think all three are pre-trained model. We do not use T5PreTrainedModel in our downstream task code. Besides, the difference between T5Model and T5WithLMHeadModel is that the latter contains one more linear layer at the end.   Am I right about these?",
    "url": "https://github.com/huggingface/transformers/issues/2411",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2020-01-06T07:01:32Z",
    "updated_at": "2020-03-13T08:09:42Z",
    "user": "g-jing"
  },
  {
    "repo": "pytorch/vision",
    "number": 1720,
    "title": "Enquiry on Implementation of RandomHorizontalFlip (in transforms.py from references folder)",
    "body": "I am a bit confused by the implementation RandomHorizontalFlip defined [here](https://github.com/pytorch/vision/blob/master/references/detection/transforms.py). Note the following snippet extracted:\r\n```\r\nclass RandomHorizontalFlip(object):\r\n    def __init__(self, prob):\r\n        self.prob = prob\r\n\r\n    def __call__(self, image, target):\r\n        if random.random() < self.prob:\r\n            height, width = image.shape[-2:]\r\n            image = image.flip(-1)\r\n            bbox = target[\"boxes\"]\r\n            bbox[:, [0, 2]] = width - bbox[:, [2, 0]]\r\n            target[\"boxes\"] = bbox\r\n```\r\n\r\nshould ```bbox[:, [0, 2]] = width - bbox[:, [2, 0]]``` be ```bbox[:, [1, 3]] = width - bbox[:, [3, 1]]``` instead?  \r\nLet original bounding box be ```[xmin, ymin, xmax, ymax]``` and image have size ```(height, width)```.  After horizontal flip, the bounding box location should be ```[xmin, width - ymax, xmax, width - ymin]```.  \r\n(Please correct me if I have something wrong)",
    "url": "https://github.com/pytorch/vision/issues/1720",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms",
      "module: reference scripts"
    ],
    "created_at": "2020-01-05T11:04:12Z",
    "updated_at": "2020-01-08T10:28:44Z",
    "user": "riven314"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31869,
    "title": "How to save int value in ctx.save_for_backward",
    "body": "I want to define a new memory  op,  and first impl  a new   memory function(torch.autograd.Function), but forward and backward are static method, \r\nand inputs have some int value for some config(like stride in conv function), ctx.save_for_backward can't save int value,   How to fix this problem?  \r\n\r\nFirst, i want to follow torch.nn.conv1d example,  but i can't find any source for F.conv1d function?  \r\n",
    "url": "https://github.com/pytorch/pytorch/issues/31869",
    "state": "closed",
    "labels": [],
    "created_at": "2020-01-05T07:13:11Z",
    "updated_at": "2020-01-06T05:22:12Z",
    "user": "kuramawzw1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31865,
    "title": "how to install pytorch 0.4.1",
    "body": "For some reason I have to install 0.4.1, I tired many times including install from source, I tried to install 0.4.1 under cuda9.0 and cuda 9.2, but it failed. my card is 2080ti. please help and tell me if there is a way to solve the problem, thanks!",
    "url": "https://github.com/pytorch/pytorch/issues/31865",
    "state": "closed",
    "labels": [],
    "created_at": "2020-01-05T03:25:46Z",
    "updated_at": "2020-01-06T05:24:02Z",
    "user": "lapetite123"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31853,
    "title": "How to modify the internal calculation process of LSTM in pytorch-v1.1.0?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\nI want to modify the calculation process inside the LSTM. However, when I queried the _VF.lstm() method, no corresponding python implementation was found. Then I found the C++ implementation at this address (i.e., https://github.com/pytorch/pytorch/tree/master/aten/src/ATen/native/RNN.cpp) on GitHub. My question is which files need to be modified under the local PyTorch directory.\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/31853",
    "state": "closed",
    "labels": [],
    "created_at": "2020-01-04T03:14:06Z",
    "updated_at": "2020-01-06T05:24:17Z",
    "user": "zwd2016"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31823,
    "title": "How to set quantization aware training scaling factors?",
    "body": "## \u2753 Questions and Help\r\n\r\nwhen i use quantization aware training , The weight tensor scaling factors is a standard floating point number.\r\nI want to convert my model as 8bit at FPGA, so the weight tensor scaling factor must be an integer power-of-two value exponent. Is there such an option? what should I do?\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/31823",
    "state": "closed",
    "labels": [],
    "created_at": "2020-01-03T10:53:36Z",
    "updated_at": "2020-01-06T05:24:37Z",
    "user": "sunkr1995"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31821,
    "title": "How to convert model with a new QConv to onnx?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\nI wrapped a new conv class to support quantization. When I convert this model to onnx, I want each conv in the onnx model to have quantized parameters such as quantization bits. Could you tell me  how to convert this model to onnx.\n\ncc @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof @jerryzh168 @jianyuh @dzhulgakov @raghuramank100 @jamesr66a",
    "url": "https://github.com/pytorch/pytorch/issues/31821",
    "state": "closed",
    "labels": [
      "module: onnx",
      "oncall: quantization",
      "triaged"
    ],
    "created_at": "2020-01-03T07:56:58Z",
    "updated_at": "2021-12-16T00:16:35Z",
    "user": "Wuqiman"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31818,
    "title": "How to distinguish different layers in hook\uff1f",
    "body": "## \ud83d\ude80 Feature\r\n<!-- A clear and concise description of the feature proposal -->\r\nA way to distinguish different layers in each module itself\r\n\r\n## Motivation\r\n<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->\r\nI'd like to store some intermedia data such as output data of all conv layers, and I want to use hook. It is easy to judge which class the module is in hook function like \" if isinstance(module, nn.Conv2d):\", but if I want to store the data, I need a name which can be got in hook function to be the file name so that data from different layers will be saved in different files. e.g. \"save(filename, output)\" How can I get this name?\r\n\r\nEven if I collect all output data in a list and save it outside the hook function, I still don't know to which layer each data belongs. \r\n\r\n## Pitch\r\n\r\n<!-- A clear and concise description of what you want to happen. -->\r\nThere is no way to identify each layer now, a unique name or id.\r\n```\r\ndef hook(moudle, input, output):\r\n    name = get_unique_name(module)\r\n    save(name+'.h5', output)\r\n\r\nfor n,m in model.named_module():\r\n    m.register_forward_hook(hook)\r\n```\r\n\r\n## Alternatives\r\n\r\n<!-- A clear and concise description of any alternative solutions or features you've considered if any. -->\r\nBecause we can only get names from parent modules using\"named_module\", it will also work if I can pass arguments to hook function.\r\n```\r\ndef hook(moudle, input, output, n):     \r\n    save(n+'.h5', output)  \r\n\r\nfor n,m in model.named_module():     \r\n    m.register_forward_hook(hook, n)\r\n```\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context or screenshots about the feature request here. -->\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/31818",
    "state": "open",
    "labels": [
      "module: nn",
      "triaged"
    ],
    "created_at": "2020-01-03T03:48:13Z",
    "updated_at": "2022-09-22T22:55:48Z",
    "user": "I-Doctor"
  },
  {
    "repo": "pytorch/examples",
    "number": 689,
    "title": "DDP training multi nodes nccl error",
    "body": "pytroch:1.3.1\r\npython:3.6\r\nsystem:ubuntu 16\r\ncuda:10.0\r\n\r\nwhen i run imagenet main.py in multi-nodes ,there is a error likes,(single node can run ):\r\nUse GPU: 1 for training\r\nUse GPU: 0 for training\r\n=> creating model 'resnet50'\r\n=> creating model 'resnet50'\r\n\r\nid-d3:714:714 [0] misc/ibvwrap.cu:63 NCCL WARN Failed to open libibverbs.so[.1]\r\nNCCL version 2.4.2+cuda9.0\r\n\r\nid-d3:715:715 [1] misc/ibvwrap.cu:63 NCCL WARN Failed to open libibverbs.so[.1]\r\n\r\nid-d3:715:790 [1] include/socket.h:382 NCCL WARN Connect to 172.18.0.1<49273> failed : Connection refused\r\nTraceback (most recent call last):\r\n  File \"dis_train.py\", line 455, in <module>\r\n    main()\r\n  File \"dis_train.py\", line 120, in main\r\n    mp.spawn(main_worker, nprocs=ngpus_per_node, args=(ngpus_per_node, args))\r\n  File \"/usr/local/anaconda3/lib/python3.6/site-packages/torch/multiprocessing/spawn.py\", line 167, in spawn\r\n    while not spawn_context.join():\r\n  File \"/usr/local/anaconda3/lib/python3.6/site-packages/torch/multiprocessing/spawn.py\", line 114, in join\r\n    raise Exception(msg)\r\nException:\r\n\r\n-- Process 1 terminated with the following error:\r\nTraceback (most recent call last):\r\n  File \"/usr/local/anaconda3/lib/python3.6/site-packages/torch/multiprocessing/spawn.py\", line 19, in _wrap\r\n    fn(i, *args)\r\n  File \"/mnt/sdc/zhangwg/cv/image_review/src/dis_train.py\", line 197, in main_worker\r\n    model = torch.nn.parallel.DistributedDataParallel(model, device_ids=[args.gpu])\r\n  File \"/usr/local/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/distributed.py\", line 286, in __init__\r\n    self.broadcast_bucket_size)\r\n  File \"/usr/local/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/distributed.py\", line 410, in _dist_broadcast_coalesced\r\n    dist._dist_broadcast_coalesced(self.process_group, tensors, buffer_size, False)\r\nRuntimeError: NCCL error in: /pytorch/torch/lib/c10d/ProcessGroupNCCL.cpp:272, unhandled system error\r\n\r\ndoes somebody konw how to fix it ? \r\nthanks a lot ",
    "url": "https://github.com/pytorch/examples/issues/689",
    "state": "open",
    "labels": [
      "distributed"
    ],
    "created_at": "2020-01-02T03:56:27Z",
    "updated_at": "2024-09-27T05:43:31Z",
    "comments": 1,
    "user": "ciel-zhang"
  },
  {
    "repo": "pytorch/vision",
    "number": 1710,
    "title": "finetuning inception_v3",
    "body": "finetuning resnet18 as\r\ntrain: `models.resnet18(pretrained=True)`\r\nval:   `models.resnet18()`\r\nBut while finetuning inception_v3 as above, I got poor result. The valuation must be\r\nval:   `models.inception_v3(pretrained=True)`\r\nI spent much time stucking here..",
    "url": "https://github.com/pytorch/vision/issues/1710",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2020-01-01T14:45:26Z",
    "updated_at": "2020-01-08T10:54:17Z",
    "user": "stormchasingg"
  },
  {
    "repo": "huggingface/transformers",
    "number": 2372,
    "title": "What is the \"could not find answer\" warning in squad.py",
    "body": "Hello, \r\n\r\nI am trying to run run_squad.py for BERT (italian-cased) with an italian version of squad.\r\n\r\nDuring the creation of features from dataset, I got some answer skipped like in the following: \r\n<img width=\"478\" alt=\"Screenshot 2019-12-30 at 23 30 19\" src=\"https://user-images.githubusercontent.com/26765504/71603304-81081e80-2b5c-11ea-8333-73608e3141a7.png\">\r\n\r\nCan you tell why is this happening and if this influences the overall accuracy of the training?\r\n",
    "url": "https://github.com/huggingface/transformers/issues/2372",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2019-12-30T22:31:58Z",
    "updated_at": "2020-08-29T15:05:37Z",
    "user": "cppntn"
  },
  {
    "repo": "pytorch/vision",
    "number": 1707,
    "title": "'loss_dict' error from 'train_one_epoch'",
    "body": "Navigating through the code in 'train_one_epoch', running this line:\r\n`loss_dict = model(image,targets)`\r\ngives the error:\r\n\r\n> 397         # RPN uses all feature maps that are available\r\n--> 398         features = list(features.values())\r\n    399         objectness, pred_bbox_deltas = self.head(features)\r\n    400         anchors = self.anchor_generator(images, features)\r\nAttributeError: 'tuple' object has no attribute 'values'\r\n\r\nCan anyone help?",
    "url": "https://github.com/pytorch/vision/issues/1707",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts"
    ],
    "created_at": "2019-12-30T10:32:15Z",
    "updated_at": "2020-10-10T09:43:24Z",
    "user": "madiltalay"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31699,
    "title": "How to implement multiple different kernel shapes in 2D convolution?",
    "body": "Hello. I\u2019m currently working on spherical convolutional network topic. Right now I\u2019m trying to develop a new kind of kernel used for the convolutional layer.\r\nThe usual kernel is 3x3 matrix. But for spherical images, after being projected onto a plane using equirectangular projection, there will be distortion. So I want to define the kernel as a spherical cap and project it on plane according to its position.\r\nFor example, the kernel at different positions of the sphere perspective to the panorama pictures will look like this:\r\n![image](https://user-images.githubusercontent.com/51077545/71574908-c6f5c000-2b25-11ea-80e1-1387ccdcfc82.png)\r\nIs there any way to determine the shape of the kernels in these ways? I have already had the whole coordinate of the points in every case. I would very appreciate any help and information.\r\nThank you guys very much!\r\n\n\ncc @csarofeen @ptrblck",
    "url": "https://github.com/pytorch/pytorch/issues/31699",
    "state": "closed",
    "labels": [
      "feature",
      "module: nn",
      "triaged",
      "needs research"
    ],
    "created_at": "2019-12-30T08:59:59Z",
    "updated_at": "2020-01-07T15:14:06Z",
    "user": "vhchuong"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31696,
    "title": "how to set cuda stream by  call Aten function",
    "body": "at::Tensor a = at::ones({16, 32}, opts);\r\nat::Tensor b = at::randn({32, 64}, opts);\r\nat::Tensor b1 = at::randn({32, 64}, opts);\r\nauto c = at::matmul(a,b);\r\nauto c1 = at::matmul(a,b1);\r\n  I want to call matmul by attach different cuda stream.\r\n call  at::matmul(a,b) by using stream1 , and call  at::matmul(a,b1) by using stream2.\r\nHow to do it?   Thanks\n\ncc @ngimel",
    "url": "https://github.com/pytorch/pytorch/issues/31696",
    "state": "closed",
    "labels": [
      "module: cuda",
      "triaged"
    ],
    "created_at": "2019-12-30T05:44:55Z",
    "updated_at": "2019-12-31T06:48:42Z",
    "user": "kuramawzw1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31685,
    "title": "What is the significance of torchvision._is_tracing()? ",
    "body": "## What is the significance of torchvision._is_tracing()? \u2753 \r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\n\ncc @fmassa",
    "url": "https://github.com/pytorch/pytorch/issues/31685",
    "state": "open",
    "labels": [
      "triaged",
      "module: vision"
    ],
    "created_at": "2019-12-29T04:07:08Z",
    "updated_at": "2019-12-30T21:50:08Z",
    "user": "AyanKumarBhunia"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 799,
    "title": "Should I rewrote the \"dcgan_faces_tutorial notebook\" for the student to able to run it on colab for that 1GB dataset?",
    "body": "OK, I see it sets \" data root = \"/home/ubuntu/facebook/datasets/celeba...\"\". This is definitely not for Colab, and there are some students' computer does not have a GPU. I have a solution. I have rewritten it, so we can just download the zip file from google drive and unzip it. However, this requires to upload the 1GB data set to the student's own google drive, or someone can tell me that I can upload that 1 GB dataset to somewhere and be able to download with a link ending to .zip.\r\n\r\nThus, should I rewrite it so the student can run it on colab with GPU instead of their local computer?\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/799",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-27T14:44:39Z",
    "updated_at": "2019-12-29T12:07:31Z",
    "comments": 0,
    "user": "AliceSum"
  },
  {
    "repo": "pytorch/vision",
    "number": 1701,
    "title": "Errors with COCO targets",
    "body": "I am using the COCO dataset for training with annotations available at the COCO website.\r\nI use this dataloader:\r\n`train_dataloader = torch.utils.data.DataLoader(train_dataset, batch_size=1, shuffle=True, num_workers=4, collate_fn=collate_fn)\r\n`\r\n\r\nRunning one iteration:\r\n`image, target = next(iter(train_dataloader))`\r\ngives 'image' and 'target' of type 'tuple'\r\n\r\nTo convert the 'target' into the desired type (list of dicts), I use:\r\n`target = [[{k: v for k, v in obj.items()} for obj in t] for t in target]`\r\n\r\nNow when I run:\r\n`loss_dict = model(image,target)`\r\nIt gives:\r\n\r\n> /usr/local/lib/python3.6/dist-packages/torchvision/models/detection/transform.py in resize(self, image, target)\r\n     73             return image, target\r\n     74 \r\n---> 75         bbox = target[\"boxes\"]\r\n     76         bbox = resize_boxes(bbox, (h, w), image.shape[-2:])\r\n     77         target[\"boxes\"] = bbox\r\nTypeError: list indices must be integers or slices, not str\r\n\r\nI try to play around:\r\n```\r\nnew_target = {} \r\nnew_target['boxes'] = [t['bbox'] for t in target[0]] \r\nnew_target['labels'] = [t['category_id'] for t in target[0]] \r\nnew_target = [new_target]\r\n```\r\nAnd it gives another error:\r\n\r\n> /usr/local/lib/python3.6/dist-packages/torchvision/models/detection/transform.py in resize_boxes(boxes, original_size, new_size)\r\n    135     ratios = tuple(float(s) / float(s_orig) for s, s_orig in zip(new_size, original_size))\r\n    136     ratio_height, ratio_width = ratios\r\n--> 137     xmin, ymin, xmax, ymax = boxes.unbind(1)\r\n    138     xmin = xmin * ratio_width\r\n    139     xmax = xmax * ratio_width\r\nAttributeError: 'list' object has no attribute 'unbind'\r\n\r\nCan anyone please help?",
    "url": "https://github.com/pytorch/vision/issues/1701",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts"
    ],
    "created_at": "2019-12-27T07:17:14Z",
    "updated_at": "2020-01-08T10:44:53Z",
    "user": "madiltalay"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31643,
    "title": "how to know the input_shape of a pretrained model ?",
    "body": "\r\nhi,dear,\r\nJust wanna know the model's input_shape,\r\nbut got nothing,\r\nSo could you help me ?\r\nthx\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/31643",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-27T01:12:54Z",
    "updated_at": "2019-12-27T01:49:43Z",
    "user": "ucasiggcas"
  },
  {
    "repo": "pytorch/vision",
    "number": 1699,
    "title": "'train_one_epoch' gives error while using COCO annotations",
    "body": "I am using the COCO dataset for training with annotations available at the COCO website.\r\nWhile using the code from: [https://github.com/pytorch/vision/blob/master/references/detection/engine.py](url), I get an error:\r\n\r\n> AttributeError: 'list' object has no attribute 'items'\r\n\r\nfor the code snippet:\r\n`targets = [{k: v.to(device) for k, v in t.items()} for t in targets]`\r\n\r\nFurther digging into the issue, I find that the 'targets' I receive from the 'for loop':\r\n`for images, targets in metric_logger.log_every(data_loader, print_freq, header):`\r\n\r\nare in tuple format, with length equal to the batch_size.\r\nMoreover, each item in this tuple is a list, and each list consists of seven dictionaries containing the annotation information.\r\nWhen I apply this code to an individual object, it works fine:\r\n```\r\ntarget = targets[0]\r\nobj_1 = target[0]\r\ndict_1 = [{k: v for k, v in obj_1.items()}]\r\n```\r\nSo I suppose the code might be written as follows:\r\n`targets = [[{k: v for k, v in obj.items()} for obj in target] for target in targets]`\r\n\r\nCan you guys please confirm this and provide help in this regard?\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/1699",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts"
    ],
    "created_at": "2019-12-25T10:15:51Z",
    "updated_at": "2022-10-07T16:13:55Z",
    "user": "madiltalay"
  },
  {
    "repo": "huggingface/transformers",
    "number": 2278,
    "title": "where is the script of a second step of  knwoledge distillation on SQuAD 1.0?",
    "body": "## \u2753 Questions & Help\r\n\r\n<!-- A clear and concise description of the question. -->\r\nIn Distil part, there is a paragraph description which is \"distilbert-base-uncased-distilled-squad: A finetuned version of distilbert-base-uncased finetuned using (a second step of) knwoledge distillation on SQuAD 1.0. This model reaches a F1 score of 86.9 on the dev set (for comparison, Bert bert-base-uncased version reaches a 88.5 F1 score).\"\r\nso where is the script of \"a second step of  knwoledge distillation on SQuAD 1.0\" mentioned above?\r\nThanks a lot, it will be very helpful to me!\r\n",
    "url": "https://github.com/huggingface/transformers/issues/2278",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2019-12-23T09:13:26Z",
    "updated_at": "2020-05-08T15:29:08Z",
    "user": "c0derm4n"
  },
  {
    "repo": "huggingface/pytorch-image-models",
    "number": 63,
    "title": "what is the value range of magnitude in auto-augment when the MAX_LEVEL is set as 10.",
    "body": "Dear @rwightman , I have read the code about auto-augmentation and random-augmentation, and I noticed that the MAX_LEVEL is set as 10, same as the google's implementation. Also in the google implementation, they say an optimal magnitude is often in [5, 30]. But in your implementation you clip the input magnitude to be less than MAX_LEVEL (`magnitude = min(_MAX_LEVEL, max(0, magnitude)) # clip to valid range`).\r\n\r\nCould you give me some hints about why MAX_LEVEL is set as 10, but the input magnitude range is recommended as [5, 30]? Really thanks!\r\n\r\n",
    "url": "https://github.com/huggingface/pytorch-image-models/issues/63",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-23T08:49:19Z",
    "updated_at": "2019-12-26T23:40:49Z",
    "user": "cddlyf"
  },
  {
    "repo": "pytorch/text",
    "number": 669,
    "title": "How to use datasets for distributed training?",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\n<!-- Please send questions or ask for help here. -->\r\n\r\nI built a dataset from my corpus, and use each line as an Example.\r\nIt works fine at first until I try to use it for distributed training.\r\n\r\nIt seems that torch.nn.parallel.DistributedParallel has to use DistributedSampler, but it's not compatible with torchtext datasets.\r\n\r\nIs there any idea to use torchtext datasets for distributed training?\r\nThx!",
    "url": "https://github.com/pytorch/text/issues/669",
    "state": "open",
    "labels": [],
    "created_at": "2019-12-22T03:20:56Z",
    "updated_at": "2020-01-02T17:56:48Z",
    "user": "styxjedi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31543,
    "title": "how to install torch by python3.8? ",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/31543",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-21T03:15:45Z",
    "updated_at": "2019-12-21T05:43:47Z",
    "user": "Fenghuixueha"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 46,
    "title": "How to create custom model for the PyTorchDemoApplication?Thanks",
    "body": "Hi, I want to learn about  how to apply pytorch model on andorid platform. And this android-demo-app is very useful to me. \r\nThe PyTorchDemoApp has already been deployed on my android mobile ,and it can be runned successfully.\r\nBut I want to know how to create a custom model with my own Image data.\r\nWhen I copy the model.pt from HelloWorldApp, the PyTorchDemoApp crashes and tells me \" Sorry There is an error\"\r\nCan anyone tell me how to create a custom model? \r\nThanks very much.\r\n",
    "url": "https://github.com/pytorch/android-demo-app/issues/46",
    "state": "open",
    "labels": [],
    "created_at": "2019-12-20T08:55:31Z",
    "updated_at": "2021-06-27T18:52:02Z",
    "user": "btdan"
  },
  {
    "repo": "pytorch/xla",
    "number": 1490,
    "title": "pytorch/xla vs TF",
    "body": "## \u2753 Questions and Help\r\n\r\nHi, is training a model with pytorch xla slower than training a model with tf? Are there any other limitations to using pytorch/xla compared to TF?",
    "url": "https://github.com/pytorch/xla/issues/1490",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2019-12-19T21:03:11Z",
    "updated_at": "2019-12-19T22:01:41Z",
    "user": "bilal2vec"
  },
  {
    "repo": "huggingface/transformers",
    "number": 2230,
    "title": "what is the most efficient way to store all hidden layers' weights?",
    "body": "Hi,\r\n\r\nI am following this [post](https://mccormickml.com/2019/05/14/BERT-word-embeddings-tutorial/) for getting all 12 hidden layers' weights for every token in a sentence.\r\n\r\nConsider I have a short text with 2 sentences: `He stole money today. He is fishing on the Mississippi riverbank.`\r\n\r\nI want to store 5 + 8 = 13 tokens - all 12 hidden layers weights where each tensor's size=768. So, I will have 13 x 12 = 156 tensors.\r\n\r\nI want to save all the weights in a file and I am wondering if I should use `pickle` or `hd5` format (I am working with long text documents.) I am planning to separate two sentences by a blank line, please suggest if any better ways to do it.\r\n\r\nThanks!",
    "url": "https://github.com/huggingface/transformers/issues/2230",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2019-12-19T19:41:00Z",
    "updated_at": "2020-02-24T20:38:46Z",
    "user": "vr25"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31466,
    "title": "how to pass trained weight to neural network module",
    "body": "Suppose i used own data and trained a `conv1d`, how could we pass the weight to `conv1d` in c++ like what the `PyTorch`  acts ?\r\n\r\nNoticed that the implementation of `conv1d` in `PyTorch`, we could update the parameters like `in_channels`, `out_channels`, etc in the `__init__` function. If we want to update the `weights` and `bias`, which are from pretrained model, we could rewrite the `Conv1d`, which may not so difficult.\r\n\r\n```\r\nclass Conv1d(_ConvNd):\r\n\r\n    def __init__(self, in_channels, out_channels, kernel_size, stride=1,\r\n                 padding=0, dilation=1, groups=1,\r\n                 bias=True, padding_mode='zeros'):\r\n        kernel_size = _single(kernel_size)\r\n        stride = _single(stride)\r\n        padding = _single(padding)\r\n        dilation = _single(dilation)\r\n        super(Conv1d, self).__init__(\r\n            in_channels, out_channels, kernel_size, stride, padding, dilation,\r\n            False, _single(0), groups, bias, padding_mode)\r\n\r\n    def forward(self, input):\r\n        if self.padding_mode == 'circular':\r\n            expanded_padding = ((self.padding[0] + 1) // 2, self.padding[0] // 2)\r\n            return F.conv1d(F.pad(input, expanded_padding, mode='circular'),\r\n                            self.weight, self.bias, self.stride,\r\n                            _single(0), self.dilation, self.groups)\r\n        return F.conv1d(input, self.weight, self.bias, self.stride,\r\n                        self.padding, self.dilation, self.groups)\r\n```\r\nWhile notice the `conv1d` implementation in libtorch, noticed that \r\n\r\n```\r\nnamespace nn {\r\nConv1dImpl::Conv1dImpl(\r\n    Conv1dOptions options_)\r\n    : ConvNdImpl(\r\n        detail::ConvNdOptions<1>(\r\n          /*in_channels=*/options_.in_channels(),\r\n          /*out_channels=*/options_.out_channels(),\r\n          /*kernel_size=*/options_.kernel_size())\r\n          .stride(options_.stride())\r\n          .padding(options_.padding())\r\n          .dilation(options_.dilation())\r\n          .transposed(false)\r\n          .output_padding(0)\r\n          .groups(options_.groups())\r\n          .bias(options_.bias())\r\n          .padding_mode(options_.padding_mode())) {}\r\n\r\nTensor Conv1dImpl::forward(const Tensor& input) {\r\n  if (c10::get_if<enumtype::kCircular>(&options.padding_mode())) {\r\n    std::vector<int64_t> expanded_padding = {((*options.padding())[0] + 1) / 2, (*options.padding())[0] / 2};\r\n    return F::detail::conv1d(\r\n      F::detail::pad(input, expanded_padding, torch::kCircular, 0),\r\n      weight, bias,\r\n      options.stride(),\r\n      /*padding=*/0,\r\n      options.dilation(),\r\n      options.groups());\r\n  }\r\n  return F::detail::conv1d(\r\n    input,\r\n    weight,\r\n    bias,\r\n    options.stride(),\r\n    options.padding(),\r\n    options.dilation(),\r\n    options.groups());\r\n}\r\n``` \r\nSo how could we pass the weight in the c++ version ?",
    "url": "https://github.com/pytorch/pytorch/issues/31466",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-19T10:18:14Z",
    "updated_at": "2019-12-19T14:53:57Z",
    "user": "OswaldoBornemann"
  },
  {
    "repo": "pytorch/examples",
    "number": 682,
    "title": "\"EOFError: Ran out of input\u201c occurred in example mnist_hogwild",
    "body": "Hi, when I ran example **mnist_hogwild** on cuda, errors occurred as below:\r\n```\r\nFile \"main.py\", line 66, in <module>\r\n    p.start()\r\n  File \"D:\\Python3.7.3\\lib\\multiprocessing\\process.py\", line 112, in start\r\n    self._popen = self._Popen(self)\r\n  File \"D:\\Python3.7.3\\lib\\multiprocessing\\context.py\", line 223, in _Popen\r\n    return _default_context.get_context().Process._Popen(process_obj)\r\n  File \"D:\\Python3.7.3\\lib\\multiprocessing\\context.py\", line 322, in _Popen\r\n    return Popen(process_obj)\r\n  File \"D:\\Python3.7.3\\lib\\multiprocessing\\popen_spawn_win32.py\", line 89, in __init__\r\n    reduction.dump(process_obj, to_child)\r\n  File \"D:\\Python3.7.3\\lib\\multiprocessing\\reduction.py\", line 60, in dump\r\n    ForkingPickler(file, protocol).dump(obj)\r\n  File \"D:\\Python3.7.3\\lib\\site-packages\\torch\\multiprocessing\\reductions.py\", line 232, in reduce_tensor\r\n    event_sync_required) = storage._share_cuda_()\r\nRuntimeError: cuda runtime error (71) : operation not supported at C:\\w\\1\\s\\windows\\pytorch\\torch/csrc/generic/StorageSharing.cpp:245\r\n\r\nC:\\Users\\audrey\\Desktop\\test>Traceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"D:\\Python3.7.3\\lib\\multiprocessing\\spawn.py\", line 105, in spawn_main\r\n    exitcode = _main(fd)\r\n  File \"D:\\Python3.7.3\\lib\\multiprocessing\\spawn.py\", line 115, in _main\r\n    self = reduction.pickle.load(from_parent)\r\n```\r\nMy system: **Windows10**\r\ndevice: GeForce RTX 2080 Ti\r\nPyTorch version: 1.2.0\r\n\r\nHow to fix this? Thanks!",
    "url": "https://github.com/pytorch/examples/issues/682",
    "state": "open",
    "labels": [
      "distributed",
      "pickle"
    ],
    "created_at": "2019-12-19T05:06:30Z",
    "updated_at": "2023-10-11T06:19:14Z",
    "comments": 2,
    "user": "audreycs"
  },
  {
    "repo": "pytorch/examples",
    "number": 681,
    "title": "SNLI:  The examples doesn't work",
    "body": "\r\nhelp, I try to run the snli task in examples\uff0cand I got the errors as follow:\r\n\r\nTraceback (most recent call last):\r\n  File \"C:/Users/syk/Desktop/git/examples/snli/train.py\", line 35, in <module>\r\n    inputs.vocab.load_vectors(wv_dir=args.data_cache, wv_type=args.word_vectors, wv_dim=args.d_embed)\r\nTypeError: load_vectors() missing 1 required positional argument: 'vectors'\r\n\r\nit seems that the vocab.load_vectors need an argument  vectors  according to the definition of this function.\r\n\r\nDoes anyone know how to solve this?    \r\nI'm not sure if it's my problem.       thank you very much\uff01",
    "url": "https://github.com/pytorch/examples/issues/681",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-18T12:50:50Z",
    "updated_at": "2020-09-13T13:50:53Z",
    "comments": 0,
    "user": "Youarerare"
  },
  {
    "repo": "huggingface/pytorch-image-models",
    "number": 61,
    "title": "where is your MixNet code? I can't find it. ",
    "body": "",
    "url": "https://github.com/huggingface/pytorch-image-models/issues/61",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-17T02:49:04Z",
    "updated_at": "2019-12-17T05:30:46Z",
    "user": "xiebinghua"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 793,
    "title": "Explain how we can use same dataset for training an non-training",
    "body": "In the [Training a Classifer tutorial](https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html#sphx-glr-beginner-blitz-cifar10-tutorial-py), explain how can we use the same dataset for training and non-training? Is it cause we shuffle to randomize and use a subset?",
    "url": "https://github.com/pytorch/tutorials/issues/793",
    "state": "closed",
    "labels": [
      "60_min_blitz"
    ],
    "created_at": "2019-12-16T23:24:55Z",
    "updated_at": "2020-05-18T17:58:46Z",
    "comments": 1,
    "user": "jlin27"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 790,
    "title": "Clarify why there are 6 output channels",
    "body": "In the [Define the network section of the Neural Network tutorial](https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html#sphx-glr-beginner-blitz-neural-networks-tutorial-py), clarify why is it 6 outputs? Is it bias? \r\n\r\n![image](https://user-images.githubusercontent.com/8042156/70950107-730eb580-2014-11ea-8cc2-21b28ed3e15b.png)\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/790",
    "state": "closed",
    "labels": [
      "60_min_blitz"
    ],
    "created_at": "2019-12-16T22:58:37Z",
    "updated_at": "2020-05-18T17:59:34Z",
    "comments": 4,
    "user": "jlin27"
  },
  {
    "repo": "pytorch/vision",
    "number": 1669,
    "title": "Question regarding only bbox",
    "body": "https://github.com/pytorch/vision/blob/bce17fddd4da744e23512b8e224d085818e6d921/references/detection/coco_utils.py#L231\r\n``\r\nWhat if there are only bbox annotations and no segmentation available at all?! ",
    "url": "https://github.com/pytorch/vision/issues/1669",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: object detection"
    ],
    "created_at": "2019-12-16T14:24:54Z",
    "updated_at": "2019-12-16T14:54:44Z",
    "user": "gaussiangit"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 772,
    "title": "Text classification dataset",
    "body": "Where can I find the dataset for text classification tutorial? I mean \r\nhttps://pytorch.org/tutorials/beginner/text_sentiment_ngrams_tutorial.html",
    "url": "https://github.com/pytorch/tutorials/issues/772",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-15T17:21:34Z",
    "updated_at": "2021-06-10T21:18:29Z",
    "comments": 1,
    "user": "mahmoodn"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 771,
    "title": "Using CUDA for deep learning",
    "body": "For the deep learning [tutorial](https://pytorch.org/tutorials/beginner/nlp/deep_learning_tutorial.html), I have added the device command at the top to offload the work on GPU.\r\n\r\n```\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport torch.optim as optim\r\ntorch.device(\"cuda:0\")\r\n```\r\nHowever, no process will go to the GPU. I see only CPU usage. \r\nHow can I fix that?",
    "url": "https://github.com/pytorch/tutorials/issues/771",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-15T17:06:10Z",
    "updated_at": "2021-07-30T21:55:36Z",
    "comments": 1,
    "user": "mahmoodn"
  },
  {
    "repo": "pytorch/vision",
    "number": 1665,
    "title": "Automatic Background Removal technology",
    "body": "I am looking for a deep learning library/sdk which can be used to remove the background from any image automatically (with quality as good as www.remove.bg).\r\n\r\nI tried some image segmentation SDKs with pre-trained models such as Tensorflow Lite & Fritz AI, but the accuracy of the cutout mask was very low, amongst other issues.\r\n\r\nCriteria :-\r\n\r\n1) Background Removal rather than just Human/Portrait Segmentation\r\n\r\nIf the foreground consists of person holding a balloon, sittting on a chair, with a pet on his side, then I want all of this to get extracted. Not just the human cutout. The segmentation SDKs I tried are only extracting humans (the chair gets vanished), that too with a very low quality mask (hair gets cut, parts of ear gets cut, etc).\r\n\r\n2) Mask quality should be Super-Accurate\r\n\r\nI want even the finer details like the hair, delicate clothes, etc to be extracted perfectly.\r\n\r\n3) Fast & Lightweight (for mobile phone)\r\n\r\nI want to use this technology on mobile phones (in an Android app) which should ideally work even in an offline environment. If this option is difficult to achieve, then plan B would be install the technoloy on our server.\r\n\r\n4) Technology\r\nWhat technology should I be exploring to achieve this? Is it called image segmentation or the better term would be image matting? (e.g. http://alphamatting.com/eval_25.php)\r\n\r\nI have been reading a lot and I am currently lost in the sea of various technologies out there (OpenCV, Deep Matting, Mask RCNN, Instance Segmentation, Detectron2, Tensorflow, Pytorch, etc). I wonder what magic is happening behind the curtains of www.remove.bg\r\n\r\nWould your library help me me to achieve what I am looking for? Any help you could provide would be awesome.\r\n\r\nThanks a ton!",
    "url": "https://github.com/pytorch/vision/issues/1665",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2019-12-15T06:53:21Z",
    "updated_at": "2020-03-24T15:44:36Z",
    "user": "InternetMaster1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31246,
    "title": "How to do independent random number generatation in multiprocessing dataloader.",
    "body": "When I use num_woker > 0 in DataLoader, and I generate a random number in __getitem__ function.\r\n\r\nI found all threads will generate the same random number... \r\n\r\nFor example, I set num_worker=8, and I want to got a random number to define my scale augmentation. \r\n\r\nI will get \r\n0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9\r\neight same 0.9!\r\n\r\nSo I want to know how to inplement  independent random number generation in multiprocessing dataloader.\r\n\r\nTHanks...\r\n\n\ncc @SsnL",
    "url": "https://github.com/pytorch/pytorch/issues/31246",
    "state": "closed",
    "labels": [
      "module: dataloader",
      "triaged"
    ],
    "created_at": "2019-12-13T08:34:29Z",
    "updated_at": "2019-12-16T17:29:43Z",
    "user": "EricKani"
  },
  {
    "repo": "pytorch/text",
    "number": 666,
    "title": "How to use torchtext for tasks involving image/tabular data like image captioning?",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\n<!-- Please send questions or ask for help here. -->\r\nHi, thanks for the great library. I am wondering is there a way to use torchtext Dataset for multi-modal data? An example task will be image captioning, where we need to generate some text based on the input image. Or generating text from tabular data, from example table summarization. \r\n",
    "url": "https://github.com/pytorch/text/issues/666",
    "state": "open",
    "labels": [],
    "created_at": "2019-12-13T05:24:33Z",
    "updated_at": "2020-04-11T07:55:54Z",
    "user": "Hans0124SG"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31098,
    "title": "How to install pytorch for CUDA 10.2?",
    "body": "Hello everyone. I have installed CUDA 10.2 and i tried to install pytorch on windows.\r\nBut I catched error like this:\r\nFAILED: build.ninja\r\nC:\\Users\\TensorFlow\\.conda\\envs\\torch\\Library\\bin\\cmake.exe -SF:\\Git\\pytorch -BF:\\Git\\pytorch\\build\r\nninja: error: rebuilding 'build.ninja': subcommand failed\r\nTraceback (most recent call last):\r\n  File \"setup.py\", line 755, in <module>\r\n    build_deps()\r\n  File \"setup.py\", line 316, in build_deps\r\n    cmake=cmake)\r\n  File \"F:\\Git\\pytorch\\tools\\build_pytorch_libs.py\", line 62, in build_caffe2\r\n    cmake.build(my_env)\r\n  File \"F:\\Git\\pytorch\\tools\\setup_helpers\\cmake.py\", line 337, in build\r\n    self.run(build_args, my_env)\r\n  File \"F:\\Git\\pytorch\\tools\\setup_helpers\\cmake.py\", line 141, in run\r\n    check_call(command, cwd=self.build_dir, env=env)\r\n  File \"C:\\Users\\TensorFlow\\.conda\\envs\\torch\\lib\\subprocess.py\", line 311, in check_call\r\n    raise CalledProcessError(retcode, cmd)\r\nsubprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '8']' returned non-zero exit status 1.\r\n\r\nHelp me, please. How to I can fix this bug?",
    "url": "https://github.com/pytorch/pytorch/issues/31098",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-11T06:56:22Z",
    "updated_at": "2019-12-11T17:01:39Z",
    "user": "tensor2flow"
  },
  {
    "repo": "pytorch/text",
    "number": 665,
    "title": "How to load downloaded dataset?",
    "body": "I download sougoNews and try to use it like this:\r\n`train_dataset, test_dataset = datasets.SogouNews(root='data',ngrams=3)`\r\nbut it didn't work.still autodownload the datasets.",
    "url": "https://github.com/pytorch/text/issues/665",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-11T01:03:17Z",
    "updated_at": "2022-06-24T00:20:48Z",
    "user": "LotusQing"
  },
  {
    "repo": "huggingface/transformers",
    "number": 2127,
    "title": "Where is extract_features.py and run_classifier.py ?",
    "body": "## \u2753 Questions & Help\r\n\r\n<!-- A clear and concise description of the question. -->\r\nHello! I couldn't find the extract_features.py and run_classifier.py. Have they been renamed ?",
    "url": "https://github.com/huggingface/transformers/issues/2127",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-10T17:14:27Z",
    "updated_at": "2019-12-13T15:09:01Z",
    "user": "JiangYanting"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 31041,
    "title": "How to load PyTorch model using C++ api",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/31041",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-10T09:57:21Z",
    "updated_at": "2019-12-10T10:30:15Z",
    "user": "henbucuoshanghai"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 30962,
    "title": "How can I add masks to parameters",
    "body": "Hi,\r\n\r\nCan I use hook to add a parameter masking function to Conv2d. Specifically, I\u2019d like to add a binary mask buffer to each Conv2d module, during each training step, I need to update the mask buffer and then use it to mask the weight.\r\n\r\nOr, is there any method to add masks and apply the masks to Conv2d in a given model.\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/pytorch/issues/30962",
    "state": "open",
    "labels": [
      "module: nn",
      "triaged"
    ],
    "created_at": "2019-12-09T12:50:11Z",
    "updated_at": "2019-12-11T07:37:43Z",
    "user": "tzm1003306213"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 761,
    "title": "RuntimeError: CUDA error: out of memory",
    "body": "I'm trying to run the code below:\r\n\r\n_if torch.cuda.is_available():\r\n    device = torch.device(\"cuda\")          # a CUDA device object\r\n    y = torch.ones_like(x, device=device)  # directly create a tensor on GPU\r\n    x = x.to(device)                       # or just use strings ``.to(\"cuda\")``\r\n    z = x + y\r\n    print(z)\r\n    print(z.to(\"cpu\", torch.double))       # ``.to`` can also change dtype together!_\r\n\r\nbut I always get the error:\r\n**y = torch.ones_like(x, device=device)  # directly create a tensor on GPU\r\n RuntimeError: CUDA error: out of memory**\r\n\r\nI'm running this on CUDA version 10.1.243 and torch version 1.3.1 .\r\nAnyone knows what is the problem?!\r\n\r\n\r\nthe source of the code: https://pytorch.org/tutorials/beginner/blitz/tensor_tutorial.html#cuda-tensors \r\n\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/761",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-09T10:03:49Z",
    "updated_at": "2021-07-30T22:15:11Z",
    "comments": 3,
    "user": "Ala770"
  },
  {
    "repo": "pytorch/examples",
    "number": 676,
    "title": "Reading my own dataset ",
    "body": "Hi, I want to read/load my own dataset and build my models by using these datasets. But, I did not understand how can I read/load my own dataset. All examples are using PyTorch's datasets but do not help for me. Can you help me with this problem? ",
    "url": "https://github.com/pytorch/examples/issues/676",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-08T08:49:16Z",
    "updated_at": "2019-12-09T14:48:38Z",
    "comments": 2,
    "user": "gozeloglu"
  },
  {
    "repo": "pytorch/vision",
    "number": 1646,
    "title": "What is the meta.bin file used by the ImageNet dataset?",
    "body": "[Comment from @kanonjz in #1457](https://github.com/pytorch/vision/pull/1457#issuecomment-562807954)\r\n\r\n> I downloaded imagenet myself and used `parse_val_archive` to prepare the folders, but got an error below. What is the `meta.bin`? I didn't find it in the imagenet.\r\n> \r\n> `The meta file meta.bin is not present in the root directory or is corrupted. \" \"This file is automatically created by the ImageNet dataset.`",
    "url": "https://github.com/pytorch/vision/issues/1646",
    "state": "closed",
    "labels": [
      "module: datasets"
    ],
    "created_at": "2019-12-07T12:30:20Z",
    "updated_at": "2019-12-10T13:07:42Z",
    "user": "pmeier"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 30929,
    "title": "How to set not to build libtorch_cpu.so and libmkl_*.so dependencies?",
    "body": "```       linux-vdso.so.1 (0x00007fffa4bfc000)\r\n        libtorch_cpu.so => /home/xxxxx/workfiles/work/pytorch/torch/lib/./libtorch_cpu.so (0x00007f63d4f6c000)\r\n        librt.so.1 => /lib64/librt.so.1 (0x00007f63d4d52000)\r\n        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f63d4b3c000)\r\n        libdl.so.2 => /lib64/libdl.so.2 (0x00007f63d4938000)\r\n        libmkl_intel_lp64.so => /lib/libmkl_intel_lp64.so (0x00007f63d3e06000)\r\n        libmkl_gnu_thread.so => /lib/libmkl_gnu_thread.so (0x00007f63d25cd000)\r\n        libmkl_core.so => /lib/libmkl_core.so (0x00007f63ce494000)\r\n        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f63ce275000)\r\n        libm.so.6 => /lib64/libm.so.6 (0x00007f63cdf73000)\r\n        libc10.so => /home/xxxxx/workfiles/work/pytorch/torch/lib/./libc10.so (0x00007f63cdd31000)\r\n        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f63cd9ae000)\r\n        libgomp.so.1 => /lib64/libgomp.so.1 (0x00007f63cd788000)\r\n        libc.so.6 => /lib64/libc.so.6 (0x00007f63cd3dc000)\r\n        /lib64/ld-linux-x86-64.so.2 (0x000055795895f000)\r\n```\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/30929",
    "state": "open",
    "labels": [
      "module: build",
      "triaged",
      "module: mkl"
    ],
    "created_at": "2019-12-07T04:08:13Z",
    "updated_at": "2020-05-01T18:47:25Z",
    "user": "LinGeLin"
  },
  {
    "repo": "pytorch/examples",
    "number": 675,
    "title": "what do parameters 'ndf' and 'ngf' mean?",
    "body": "Thanks for your code. However, I was wondering if you could tell me what 'ndf' and 'ngf' mean? I do know how these two parameters are used, but I do not know why they are called 'ndf' and 'ngf' , respectively. Looking forward to your reply.",
    "url": "https://github.com/pytorch/examples/issues/675",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-06T21:29:40Z",
    "updated_at": "2022-03-09T21:52:39Z",
    "comments": 1,
    "user": "jianzhuwang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 30869,
    "title": "How to specify install path when build libtorch\uff1fno use cmake-gui",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/30869",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-06T12:28:59Z",
    "updated_at": "2019-12-06T13:39:39Z",
    "user": "LinGeLin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 30796,
    "title": "How to Build pytorch with local protobuf rather than third_party/protobuf?",
    "body": "## \u2753 Questions and Help\r\nI want to build pytorch with my own os built protobuf lib rather than third_part/protobuf, Which prefix to change, Can anyone help me?\r\n\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/30796",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-05T06:11:52Z",
    "updated_at": "2019-12-06T17:31:11Z",
    "user": "Raneee"
  },
  {
    "repo": "pytorch/text",
    "number": 660,
    "title": "How to prefetch data?",
    "body": "Currently, the bottleneck of my model training is on the data loading part, is there any example about how to prefetch data? Like the `pin_memory` and `num_workers` arguments of `torch.utils.data.DataLoader`",
    "url": "https://github.com/pytorch/text/issues/660",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-04T14:04:20Z",
    "updated_at": "2022-06-24T00:39:44Z",
    "user": "speedcell4"
  },
  {
    "repo": "pytorch/vision",
    "number": 1633,
    "title": "how can I use ROI align in torch version 1.0",
    "body": "",
    "url": "https://github.com/pytorch/vision/issues/1633",
    "state": "closed",
    "labels": [
      "question",
      "module: ops"
    ],
    "created_at": "2019-12-04T13:25:24Z",
    "updated_at": "2019-12-04T14:51:40Z",
    "user": "scut-salmon"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 30720,
    "title": "what is tensor's storage C++ pointer?",
    "body": "Recently I look into PyTorch source codes. tensor's impl object is created after a tensor is created. But I can't know where the tensor's storage is and its pointer.\r\nCould anyone give me some help? \ud83d\ude0a \r\n",
    "url": "https://github.com/pytorch/pytorch/issues/30720",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-04T08:38:09Z",
    "updated_at": "2019-12-04T16:22:54Z",
    "user": "alanzhai219"
  },
  {
    "repo": "pytorch/xla",
    "number": 1448,
    "title": "python on XLA for CPU/GPU?",
    "body": "IIUC, with the same HLO, XLA is able to run on GPU and TPU. \r\n\r\nI wonder if this project allows running PyTorch on top of XLA for CPU/GPU and future AI chips (as soon as they support XLA)?\r\n\r\nThanks,\r\nTiezhen",
    "url": "https://github.com/pytorch/xla/issues/1448",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2019-12-04T06:51:32Z",
    "updated_at": "2020-01-26T17:08:48Z",
    "user": "wangtz"
  },
  {
    "repo": "pytorch/examples",
    "number": 672,
    "title": "I faced on the build error of libtorch:mnist.cpp  in Ubuntu18.04",
    "body": "(1)Issue\r\n    I faced the build error of one of libtorch examples :mnist.cpp in Ubuntu18.04.\r\n    Please tell me the way to solve the build error.\r\n![builderror](https://user-images.githubusercontent.com/18341725/70106407-e7e20700-1686-11ea-8856-da44dc548b9f.png)\r\n\r\n(2)Enviroment\r\n     OS:Ubbuntu18.04LTS\r\n     libtorch: I downloaded  https://download.pytorch.org/libtorch/cu101/libtorch-shared-with-deps-1.3.1.zip\r\n    cmake version 3.16.0\r\n    CUDA:10.1\r\n\r\n(3)the way to reproduce of error\r\n1.$mkdir OnPre and cd OnPre\r\n\r\n2.I downloaded libtorch-shared-with-deps-1.3.1.zip and $unzip libtorch-shared-with-deps-1.3.1.zip.\r\n\r\n3.the folder \"libtorch\" was made and $ cd libtorch.\r\n\r\n4.$mkdir mnist and $cd mnist\r\n\r\n5.I copied CMakeLists.txt and mnist.cpp from https://github.com/pytorch/examples/tree/master/cpp/mnist\r\n\r\n6.$mkdir build and cd build\r\n\r\n7.$ cmake -DCMAKE_PREFIX_PATH=/home/yoshiki/OnPre/libtorch ..\r\n -- The C compiler identification is GNU 7.4.0\r\n-- The CXX compiler identification is GNU 7.4.0\r\n-- Check for working C compiler: /usr/bin/cc\r\n-- Check for working C compiler: /usr/bin/cc -- works\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Detecting C compile features\r\n-- Detecting C compile features - done\r\n-- Check for working CXX compiler: /usr/bin/c++\r\n-- Check for working CXX compiler: /usr/bin/c++ -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- Detecting CXX compile features\r\n-- Detecting CXX compile features - done\r\n-- Looking for pthread.h\r\n-- Looking for pthread.h - found\r\n-- Performing Test CMAKE_HAVE_LIBC_PTHREAD\r\n-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed\r\n-- Looking for pthread_create in pthreads\r\n-- Looking for pthread_create in pthreads - not found\r\n-- Looking for pthread_create in pthread\r\n-- Looking for pthread_create in pthread - found\r\n-- Found Threads: TRUE  \r\n-- Found CUDA: /usr/local/cuda (found version \"10.1\") \r\n-- Caffe2: CUDA detected: 10.1\r\n-- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc\r\n-- Caffe2: CUDA toolkit directory: /usr/local/cuda\r\n-- Caffe2: Header version is: 10.1\r\n-- Found CUDNN: /usr/local/cuda/lib64/libcudnn.so  \r\n-- Found cuDNN: v7.6.5  (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)\r\n-- Autodetected CUDA architecture(s):  5.2\r\n-- Added CUDA NVCC flags for: -gencode;arch=compute_52,code=sm_52\r\n-- Found torch: /home/yoshiki/OnPre/libtorch/lib/libtorch.so  \r\n-- Downloading MNIST dataset\r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: /home/yoshiki/OnPre/libtorch/mnist/build\r\n\r\n8.$ make\r\nScanning dependencies of target mnist\r\n[ 50%] Building CXX object CMakeFiles/mnist.dir/mnist.cpp.o\r\n/home/yoshiki/OnPre/libtorch/mnist/mnist.cpp: In function \u2018void test(Net&, c10::Device, DataLoader&, size_t)\u2019:\r\n/home/yoshiki/OnPre/libtorch/mnist/mnist.cpp:102:26: error: \u2018at::Reduction\u2019 has not been declared\r\n                      at::Reduction::Sum)\r\n                          ^~~~~~~~~\r\nCMakeFiles/mnist.dir/build.make:62: recipe for target 'CMakeFiles/mnist.dir/mnist.cpp.o' failed\r\nmake[2]: *** [CMakeFiles/mnist.dir/mnist.cpp.o] Error 1\r\nCMakeFiles/Makefile2:75: recipe for target 'CMakeFiles/mnist.dir/all' failed\r\nmake[1]: *** [CMakeFiles/mnist.dir/all] Error 2\r\nMakefile:83: recipe for target 'all' failed\r\nmake: *** [all] Error 2\r\n\r\n9.The build error appeared .  \r\n",
    "url": "https://github.com/pytorch/examples/issues/672",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-04T02:13:45Z",
    "updated_at": "2019-12-04T07:35:11Z",
    "comments": 1,
    "user": "yoshihingis"
  },
  {
    "repo": "pytorch/vision",
    "number": 1630,
    "title": "GeneralizedRCNNTransform doesn't work with four-channel inputs",
    "body": "When I modify the input channel of FasterRCNN from 3 to 4, GeneralizedRCNNTransform doesn't work.\r\n```\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py\", line 541, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/usr/local/lib/python3.6/dist-packages/torchvision/models/detection/generalized_rcnn.py\", line 47, in forward\r\n    images, targets = self.transform(images, targets)\r\n  File \"/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py\", line 541, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/usr/local/lib/python3.6/dist-packages/torchvision/models/detection/transform.py\", line 40, in forward\r\n    image = self.normalize(image)\r\n  File \"/usr/local/lib/python3.6/dist-packages/torchvision/models/detection/transform.py\", line 55, in normalize\r\n    return (image - mean[:, None, None]) / std[:, None, None]\r\nRuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimension 0\r\n```",
    "url": "https://github.com/pytorch/vision/issues/1630",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2019-12-04T00:53:20Z",
    "updated_at": "2019-12-04T12:58:30Z",
    "user": "ZhiangChen"
  },
  {
    "repo": "pytorch/xla",
    "number": 1447,
    "title": "How to use a specific commit of pytorch-xla in Colab?",
    "body": "## \u2753 Questions and Help\r\n\r\nHi,\r\n\r\nI'm eager to use a specific commit (or the latest) in Colab.  My current setup is this cell:\r\n\r\n```bash\r\nXRT_VERSION = \"nightly\"\r\nDIST_BUCKET = \"gs://tpu-pytorch/wheels\"\r\nTORCH_WHEEL = \"torch-{}-cp36-cp36m-linux_x86_64.whl\".format(XRT_VERSION)\r\nTORCH_XLA_WHEEL = \"torch_xla-{}-cp36-cp36m-linux_x86_64.whl\".format(XRT_VERSION)\r\nTORCHVISION_WHEEL = \"torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl\"\r\n\r\n# Update TPU XRT version\r\nimport os\r\nimport requests\r\nimport threading\r\ndef update_server_xrt():\r\n  print(\"Updating server-side XRT...\")\r\n  url = 'http://{TPU_ADDRESS}:8475/requestversion/{XRT_VERSION}'.format(\r\n      TPU_ADDRESS=os.environ['COLAB_TPU_ADDR'].split(':')[0],\r\n      XRT_VERSION=XRT_VERSION,\r\n  )\r\n  print(\"Done updating server-side XRT: {}\".format(requests.post(url)))\r\n\r\nupdate = threading.Thread(target=update_server_xrt)\r\nupdate.start()\r\n\r\n# Install Colab TPU compat PyTorch/TPU wheels and dependencies\r\n!pip uninstall -y torch torchvision\r\n!gsutil cp \"$DIST_BUCKET/$TORCH_WHEEL\" .\r\n!gsutil cp \"$DIST_BUCKET/$TORCH_XLA_WHEEL\" .\r\n!gsutil cp \"$DIST_BUCKET/$TORCHVISION_WHEEL\" .\r\n!pip install \"$TORCH_WHEEL\"\r\n!pip install \"$TORCH_XLA_WHEEL\"\r\n!pip install \"$TORCHVISION_WHEEL\"\r\n!sudo apt-get install libomp5\r\nupdate.join()\r\n```\r\n\r\nBut that only gets the nightly version.  Is there some way to name a specific commit?\r\n",
    "url": "https://github.com/pytorch/xla/issues/1447",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2019-12-03T20:04:55Z",
    "updated_at": "2020-02-12T17:36:30Z",
    "user": "hrbigelow"
  },
  {
    "repo": "pytorch/vision",
    "number": 1629,
    "title": "Reference detection script image sizes help",
    "body": "Hi @fmassa , \r\nSomehow the reference detection script does not handle big images of size  > 3000. \r\nAlways throw me cuda out of memory error. \r\nAny suggestions on that ? ",
    "url": "https://github.com/pytorch/vision/issues/1629",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "module: reference scripts",
      "topic: object detection"
    ],
    "created_at": "2019-12-03T12:11:21Z",
    "updated_at": "2019-12-03T12:30:55Z",
    "user": "gaussiangit"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 30655,
    "title": "How to convert Tensor back to BitMap or any image format in Android?",
    "body": "I have converted a PyTorch model for Android mobile. The purpose of the model is to achieve Super Resolution. The problem I am facing is that the model gives output in the form of Tensor. Whereas I want to convert that tensor into some imaging format but I haven't been able to find a method to achieve this task. \r\n\r\nI cannot find something suitable in Pytorch Java documentation for this certain task. Please advise regarding this issue.\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/30655",
    "state": "closed",
    "labels": [
      "module: android",
      "oncall: mobile"
    ],
    "created_at": "2019-12-03T09:32:11Z",
    "updated_at": "2023-09-29T16:39:11Z",
    "user": "nauyan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 30654,
    "title": "What is the different between nn.Functional.conv2d and nn.Conv2d?It seems a bit redundant?",
    "body": "## \u2753 Questions and Help\r\nHi,I have just started learning pytorch recently. In the official website tutorials, I often see nn.Conv2d and nn.Functional.conv2d. I don't understand the difference between the two writing methods. It seems that one of these two is enough.\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/30654",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-03T08:27:21Z",
    "updated_at": "2019-12-04T01:09:44Z",
    "user": "wulongjian"
  },
  {
    "repo": "pytorch/xla",
    "number": 1442,
    "title": "Out of memory error?",
    "body": "Is the following an out-of-memory error from the TPU?: \r\n\r\n![image](https://user-images.githubusercontent.com/37097934/70020496-abf15980-1541-11ea-8dd5-406c295ecd8c.png)\r\n\r\nThe text just keeps scrolling with similar messages.\r\n\r\nIt's surprising I get this error, because all I wanted to do is have a batch of 512 for 224x224 images, which I thought the TPU could handle.",
    "url": "https://github.com/pytorch/xla/issues/1442",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2019-12-03T04:26:23Z",
    "updated_at": "2019-12-10T18:57:22Z",
    "user": "tmabraham"
  },
  {
    "repo": "pytorch/examples",
    "number": 671,
    "title": "nn.Transformer tutorial uses nn.TransformerEncoder only",
    "body": "hello,\r\nwhen I search for nn.Transformer use example, I find example which uses nn.TransformerEncoder, is there example use of nn.Transformer?",
    "url": "https://github.com/pytorch/examples/issues/671",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2019-12-02T12:49:33Z",
    "updated_at": "2022-03-10T04:46:18Z",
    "user": "vainaixr"
  },
  {
    "repo": "huggingface/transformers",
    "number": 2013,
    "title": "What is the real parameters to weight the triple loss (L_{ce}, L_{mlm}, L_{cos}) in DistilBert?",
    "body": "Hello! Thanks for your great work DistilBert. I want to ask what is the real parameters \"alpha\" you used in DistilBert to weight the triple loss (L_{ce}, L_{mlm}, L_{cos})?\r\n\r\nYou did not mention this detail in your NIPS workshop paper (http://arxiv.org/abs/1910.01108). In the [README](https://github.com/huggingface/transformers/blob/master/examples/distillation/README.md) file, you listed two different setups: `--alpha_ce 5.0 --alpha_mlm 2.0 --alpha_cos 1.0 --alpha_clm 0.0` for single GPU training and `--alpha_ce 0.33 --alpha_mlm 0.33 --alpha_cos 0.33 --alpha_clm 0.0` for distributed training. Can you tell me what is the best setting?\r\n\r\nActually, I have tried to reproduce your results of DistilBert. I trained the DistilBert with the corpus used by BERT, but the performance of GLUE seemed slightly fall behind your pre-trained `distilbert-base-uncased` by 2 points. I would be appreciated if you can tell me the parameters for reproducibility. Thanks!\r\n",
    "url": "https://github.com/huggingface/transformers/issues/2013",
    "state": "closed",
    "labels": [],
    "created_at": "2019-12-01T16:49:05Z",
    "updated_at": "2019-12-02T15:37:37Z",
    "user": "voidism"
  },
  {
    "repo": "pytorch/vision",
    "number": 1625,
    "title": "Why does the rpn use the L1_Loss?",
    "body": "https://github.com/pytorch/vision/blob/master/torchvision/models/detection/rpn.py#L426\r\n\r\nthe code in the rpn.py , line 426 as follows:\r\n\r\n**box_loss = F.l1_loss(\r\n            pred_bbox_deltas[sampled_pos_inds],\r\n            regression_targets[sampled_pos_inds],\r\n            reduction=\"sum\",\r\n        ) / (sampled_inds.numel())**\r\n\r\nHowever, as said in the paper of Faster RCNN, the loss funtion used in the rpn training stage is smooth_L1_LOSS.\r\n\r\nand I found that when computing the **rcnn_box_loss**, the loss function used in the torchvsion is **Smooth_L1_Loss**,:\r\nhttps://github.com/pytorch/vision/blob/master/torchvision/models/detection/roi_heads.py#L47\r\n\r\nWhy not use the **Smooth_L1_LOSS** in  both places ?",
    "url": "https://github.com/pytorch/vision/issues/1625",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2019-12-01T12:54:15Z",
    "updated_at": "2019-12-02T12:14:14Z",
    "user": "TeeyoHuang"
  },
  {
    "repo": "pytorch/vision",
    "number": 1618,
    "title": "is faster rcnn scriptable\uff1fI tried\uff0cbut failed~",
    "body": "",
    "url": "https://github.com/pytorch/vision/issues/1618",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2019-11-27T06:32:41Z",
    "updated_at": "2019-11-30T15:24:03Z",
    "user": "dao-kun"
  },
  {
    "repo": "pytorch/vision",
    "number": 1617,
    "title": "Question about converting custom dataset to coco api",
    "body": "https://github.com/pytorch/vision/blob/a44d55d87ba3628ac79292fdcaead7fb98fc130b/references/detection/coco_utils.py#L163\r\n\r\nIf the box is [3,10,6,20](xyxy format),the converted box should be [3,10,4,11]. I think this code should be added 1. Because there are 4 pixels between [3,6] and 11 pixels between [10,20]. It actually computes the pixels in grid.\r\nMay be the original computation of the area need to do this as well. Such as this tutorial, https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html\r\n`area = (boxes[:, 3] - boxes[:, 1]) * (boxes[:, 2] - boxes[:, 0])`\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/1617",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts"
    ],
    "created_at": "2019-11-27T03:22:53Z",
    "updated_at": "2019-12-02T12:26:12Z",
    "user": "kangkang59812"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 735,
    "title": "Dataloader with SAMPLER tutorial missing. ",
    "body": "Original discussion thread: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252\r\n\r\nPreviously closed issue: https://github.com/pytorch/tutorials/issues/78\r\nRelated PR Merged: https://github.com/pytorch/tutorials/pull/96\r\nAgain posting a new issue because the previous issue has been closed and pr merged without providing a complete and thorough tutorial as was felt required in the initial discussion. \r\n\r\ntldr; how to properly implement \r\n\r\n> torch.utils.data.Sampler \r\n\r\n\r\n\r\nSpecifically for my current use-case, I have a deep metric loss model that implements an online hard mining strategy (probability of the selection of some samples per epoch is higher than rest based on certain metrics ). \r\n\r\nIt didn't feel correct putting the logic in the transforms, and I currently do the mining in the \"run\" function:\r\n- Pull the current minibatch1 from the dataloader  \r\n- Apply hard mining logic to find samples to train on from current batch : \r\n   -  dry forward run without back-prop\r\n   - get all misclassified samples as 'hard samples' for current batch\r\n   - calculate probability ranking of this subset based on certain heuristics ( Wrongly classified sample of higher similarity will have higher probability)\r\n- based on sample rankings again create a dataset on the fly for these samples, wherein `__getitem__` :  chooses  a minibatch2 as subset of these hard samples (might have repeated samples which have a higher probability ranking)\r\n- run forward and backward pass for samples in minibatch2 \r\n\r\nFor reference size of minibatch1 ~ 10X minibatch2\r\n\r\nThe strategy works pretty well in training; though one can imagine the code sanity and running time :disappointed: \r\n\r\n\r\nI understand, if the dataloader class was not intended for online sampling which requires a forward pass; \r\nbut can we atleast have the *complete* tutorial on the data.sampler et al methods showing different offline sampling techniques - choosing samples from the current batch based on some set heuristics.  \r\n\r\nOr did I completely misunderstand the use of the  Samplers ?? \r\n\r\n\r\n@soumith @chsasank @apaszke ",
    "url": "https://github.com/pytorch/tutorials/issues/735",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-27T00:28:36Z",
    "updated_at": "2021-07-30T22:19:49Z",
    "comments": 3,
    "user": "crazysal"
  },
  {
    "repo": "pytorch/text",
    "number": 652,
    "title": "How to add special token in torch text.Data.Field( )?",
    "body": "Hello,\r\n\r\nI defined my text Field as below:\r\n```js\r\nTEXT_openbookQA = Field(tokenize = \"spacy\",\r\n             init_token = '<sos>',\r\n             eos_token = '<eos>',\r\n             unk_token = '<unk>',\r\n             pad_token = '<pad>',\r\n             tokenizer_language = 'en',\r\n             lower = True)\r\n```\r\nHowever, in the text `openbookQA`, there is a special token named `<mcoption>`. How can I make the text Field to recognize this special token?\r\n\r\nThank you,",
    "url": "https://github.com/pytorch/text/issues/652",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-26T12:50:00Z",
    "updated_at": "2019-11-26T13:40:24Z",
    "user": "h56cho"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 30408,
    "title": "Where is the script of the synchronization of gradients during the backwards for DDP",
    "body": "## \u2753 Questions and Help\r\n\r\nHi, I know the synchronization of gradients happens during the backwards for DDP. But I didn\u2019t find the corresponding script in backwards. Where can I find it?\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/30408",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-25T17:15:45Z",
    "updated_at": "2019-11-26T00:49:21Z",
    "user": "meiluzhu"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 228,
    "title": "Integration of different word embeddings for prediction ",
    "body": "HI,\r\n\r\nI am using SciSpacy with neuralcoref (by adding `ENTITY` to `ACCEPTED_ENTS`) and would also like to use the SciSpacy word vectors if possible. \r\n\r\nI already have switched the `self.static_vectors` and `self.tuned_vectors` to point to the `self.vocab.vectors` in the `NeuralCoref` constructor. I also changed `SIZE_EMBEDDING` constant to 300 dims (the dimensions of the SciSpacy vectors). \r\n\r\nAfter these changes I am running into shape conflicts within the `thinc` module. \r\n\r\nThis said I have three questions:\r\n- Being that I am working with biomedical text, would you think using domain-specific would improve performance since I would only be using them during prediction rather than training?\r\n\r\n- Is there a better way to integrate these embeddings than what I am currently doing?\r\n\r\n- If I am on the right path of integrating these embeddings, could you perhaps point me to a resource or give me an idea of how to adjust sizes in the ```# A BUNCH OF SIZES #``` section to accept my embeddings with 300 dimension?\r\n\r\nPlease let me know if I can provide any more information.\r\n\r\nThanks in advance and for making this very awesome tool :) \r\n\r\n",
    "url": "https://github.com/huggingface/neuralcoref/issues/228",
    "state": "closed",
    "labels": [
      "question",
      "wontfix",
      "usage"
    ],
    "created_at": "2019-11-25T17:01:15Z",
    "updated_at": "2022-01-09T04:06:41Z",
    "user": "masonedmison"
  },
  {
    "repo": "pytorch/vision",
    "number": 1610,
    "title": "code for visualization in the object detection tutorial",
    "body": "At the end of the [object detection tutorial ](https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html#torchvision-object-detection-finetuning-tutorial) it  visualizes the masks.\r\ncan you please provide the code for that task? or guide how to do it?",
    "url": "https://github.com/pytorch/vision/issues/1610",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2019-11-25T15:41:21Z",
    "updated_at": "2020-07-07T21:21:26Z",
    "user": "isalirezag"
  },
  {
    "repo": "pytorch/vision",
    "number": 1608,
    "title": "What's the input format of the fasterrcnn_resnet50_fpn? I mean RGB or BGR.",
    "body": "### pytorch>=1.1\r\n\r\nI notice that both the RGB and BGR input of `[n,c,h,w]`  can get a good result(BGR is slightly higher). \r\n```\r\nmodel = fasterrcnn_resnet50_fpn(pretrained=True)\r\nmodel.eval()\r\n\r\n## RGB\r\nimg1 = Image.open('image1.jpg')\r\n## BGR\r\nimg2 = np.array(img1)[:, :, [2, 1, 0]].copy()\r\n\r\nx1= [transforms.ToTensor()(img1)]\r\nx2= [transforms.ToTensor()(img2)]\r\n\r\npredictions1 = model(x1)\r\npredictions2 = model(x2)\r\n```\r\nIt seems that `predictions2` is better. So, should I use the BGR format to fine-tuning and eval ?  I can't find this information in the code and I only know the size is `[n,c,h,w]`. In the config of the detectron2 of facebook, it says \r\n```\r\n# Values to be used for image normalization (BGR order).\r\n# To train on images of different number of channels, just set different mean & std.\r\n# Default values are the mean pixel value from ImageNet: [103.53, 116.28, 123.675]\r\n_C.MODEL.PIXEL_MEAN = [103.530, 116.280, 123.675]\r\n```\r\nSo BGR is the one we should choose?",
    "url": "https://github.com/pytorch/vision/issues/1608",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2019-11-25T12:20:25Z",
    "updated_at": "2019-11-25T12:52:15Z",
    "user": "kangkang59812"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 227,
    "title": "What is the performance on CoNLL-2012 test set?",
    "body": "Hi,\r\n\r\nThank you for your excellent work. I am looking for an off-the-shelf tool to do some coref text processing. I am wondering about the model performance of this repo on the CoNLL-2012, such as the Avg. F1 score.\r\n\r\nWould you please post it here or in the readme file? Thanks a lot.",
    "url": "https://github.com/huggingface/neuralcoref/issues/227",
    "state": "closed",
    "labels": [
      "question",
      "perf / accuracy"
    ],
    "created_at": "2019-11-25T09:26:30Z",
    "updated_at": "2019-12-06T21:57:04Z",
    "user": "magic282"
  },
  {
    "repo": "pytorch/text",
    "number": 649,
    "title": "How to perform common sense reasoning task with GPT-2?",
    "body": "Hello,\r\n\r\nI am new to NLP so I have lots of questions.\r\nI am interested in carrying out common sense reasoning task with GPT-2, for example, with Winograd Schema Challenge dataset.\r\n\r\nQ1. How should I tokenize the Winograd Schema Challenge dataset to process it with GPT-2 (with the double heads model, for instance)? Can someone please give me an example?\r\n\r\nQ2. Can GPT2DoubleHeadsModel be used to conduct common sense reasoning task with Winograd Schema Challenge dataset?\r\n\r\nThank you,",
    "url": "https://github.com/pytorch/text/issues/649",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-22T12:52:44Z",
    "updated_at": "2019-11-23T14:38:47Z",
    "user": "h56cho"
  },
  {
    "repo": "pytorch/xla",
    "number": 1399,
    "title": "Why does printing progress every step slow things down?",
    "body": "## \u2753 Questions and Help\r\n\r\n@dlibenzi  You mentioned the ParallelLoader background sender and its ability somehow to overlap communication between TPU and CPU without interrupting the flow of TPU computations.  But, you also mentioned that printing the values of summary statistics (which ultimately requires calling `loss.item()` and so forth) triggers \"an exit from the tensor world to CPU world\".  I'm wondering why this would be the case?  Couldn't there be some sort of asynchronous process in which the tensor world does the quick `item()` calculation, sends the value to the CPU in the \"background\" and resumes its cycle, while the CPU goes to work printing the result?\r\n\r\nThanks very much,\r\n\r\nHenry\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/1399",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2019-11-21T22:29:43Z",
    "updated_at": "2019-11-22T17:29:28Z",
    "user": "hrbigelow"
  },
  {
    "repo": "pytorch/xla",
    "number": 1398,
    "title": "Should CPU constants be ported to tensors to prevent IR recompilation?",
    "body": "## \u2753 Questions and Help\r\n\r\nI have various constructs in my code like:\r\n\r\n```python\r\nrec_loss = - log_pred_target.mean()\r\nze_norm = (self.bottleneck.ze ** 2).sum(dim=1).sqrt()\r\nnorm_loss = self.norm_gamma * torch.abs(ze_norm - 1.0).mean()\r\ntotal_loss = rec_loss + norm_loss\r\n```\r\n\r\nWould moving the `2` and `1.0` constants from CPU to scalar TPU tensors improve anything or will this be cached efficiently in the IR graph?",
    "url": "https://github.com/pytorch/xla/issues/1398",
    "state": "closed",
    "labels": [
      "good first issue",
      "question",
      "stale"
    ],
    "created_at": "2019-11-21T22:18:27Z",
    "updated_at": "2019-12-28T23:23:21Z",
    "user": "hrbigelow"
  },
  {
    "repo": "pytorch/vision",
    "number": 1599,
    "title": "ResNet identity (line 55) mustn't be mutable",
    "body": "The identity variable in line 55 is mutable\r\n    def forward(self, x):\r\n        identity = x\r\n\r\nIt must be immutable as follows:\r\n\r\n    def forward(self, x):\r\n        identity = 1*x",
    "url": "https://github.com/pytorch/vision/issues/1599",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2019-11-20T12:39:36Z",
    "updated_at": "2019-11-21T13:53:04Z",
    "user": "Abolfazl-Mehranian"
  },
  {
    "repo": "pytorch/vision",
    "number": 1598,
    "title": "How to feed negative samples during Faster R-CNN training",
    "body": "Hi all,\r\nI have lots of non-annotated images in my training set, where there is no object of interest but there are couple other objects that should be interpreted as part of background. Is there any way I can provide background (negative) samples explicitly in my dataloder? \r\nI tried to set a single fake bounding box with label zero for those non-annotated images, and set my num_classes as 3, i.e., I have 2 objects and background, and then performed transfer learning,\r\n\r\n`model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True,\r\n                                                                 pretrained_backbone=False)`\r\n`in_features = model.roi_heads.box_predictor.cls_score.in_features`\r\n`model.roi_heads.box_predictor = FastRCNNPredictor(in_features, num_classes)`\r\n\r\n But I received a crash at `/torchvision/models/detection/roi_heads.py\", line 34, in fastrcnn_loss`\r\n`sampled_pos_inds_subset = torch.nonzero(labels > 0).squeeze(1)`\r\n\r\nI think this is happening because I have fed some images with only label zero, i.e., with no positive bbox.\r\nIs there any workaround for that purpose?",
    "url": "https://github.com/pytorch/vision/issues/1598",
    "state": "closed",
    "labels": [
      "enhancement",
      "help wanted",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2019-11-20T12:15:54Z",
    "updated_at": "2023-03-29T16:37:30Z",
    "user": "kkirtac"
  },
  {
    "repo": "huggingface/transformers",
    "number": 1866,
    "title": "BertForTokenClassification for NER . what is the conclusion of  this output ?",
    "body": "## \u2753 Questions & Help\r\n\r\n<!-- A clear and concise description of the question. -->\r\nHi ,\r\nIm trying to perform NER using BertForTokenClassification  .I saw this sample code in transformers GIT page. \r\n\r\nfrom transformers import BertForTokenClassification\r\ntokenizer = BertTokenizer.from_pretrained('bert-base-uncased')\r\nmodel = BertForTokenClassification.from_pretrained('bert-base-uncased')\r\ninput_ids = torch.tensor(tokenizer.encode(\"Hello, my dog is cute\")).unsqueeze(0)  # Batch size 1\r\nlabels = torch.tensor([1] * input_ids.size(1)).unsqueeze(0)  # Batch size 1\r\nprint(labels)\r\noutputs = model(input_ids, labels=labels)\r\nloss, scores = outputs[:2]\r\n\r\n\r\n\r\noutput loss:\r\ntensor(0.5975, grad_fn=<NllLossBackward>)\r\n\r\noutput scores:\r\n\r\ntensor([[[-0.1622,  0.1824],\r\n         [-0.1552, -0.0534],\r\n         [-0.3032, -0.1166],\r\n         [-0.2453, -0.1182],\r\n         [-0.4388, -0.1898],\r\n         [-0.3159, -0.1067]]], grad_fn=<AddBackward0>)\r\n\r\n1.When i printed the loss and score i got below values .Now how should i infer this output ? what dose these value represent for  performing NER ? what should i do to get the NER tags for the sentence \"Hello, my dog is cute\" .\r\n\r\n\r\n2.i referred few NER codes in GIT using BERT  and they have  humongous line of code written for performing the NER . Is there any simple way to perform NER using bert ?  like how Flair library has very simple method for performing the NER task ? \r\n\r\n",
    "url": "https://github.com/huggingface/transformers/issues/1866",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2019-11-19T09:23:23Z",
    "updated_at": "2020-02-04T21:23:21Z",
    "user": "AjitAntony"
  },
  {
    "repo": "pytorch/xla",
    "number": 1385,
    "title": "How original pytorch calls xla's ops?",
    "body": "## \u2753 Questions and Help\r\nRecently, I am looking into pytorch/xla code but I am confused with some things.\r\n\r\n- How original pytorch calls xla's ops?\r\n\r\nIs there pytorch-xla internal mechanism\uff1f\r\n\r\nAny reply will be much appreciated. THX",
    "url": "https://github.com/pytorch/xla/issues/1385",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2019-11-19T07:45:18Z",
    "updated_at": "2019-12-28T16:29:15Z",
    "user": "alanzhai219"
  },
  {
    "repo": "pytorch/examples",
    "number": 666,
    "title": "Distributed training resnet50 using 4 nodes 32 TeslaV100",
    "body": "I checked a lot of literature, but I didn't find the results. The questions are as follows:\r\nHow many hours can it converge\uff1f\uff08Distributed training resnet50 using 4 nodes 32 TeslaV100 cards\uff09\r\n\r\nDo you have internal test results that can be displayed to better understand the performance of your distributed training.",
    "url": "https://github.com/pytorch/examples/issues/666",
    "state": "open",
    "labels": [
      "distributed"
    ],
    "created_at": "2019-11-19T06:01:31Z",
    "updated_at": "2022-03-09T20:52:45Z",
    "comments": 0,
    "user": "gentelyang"
  },
  {
    "repo": "pytorch/FBGEMM",
    "number": 199,
    "title": "[Question] 8bit integers and negative numbers",
    "body": "Hey,\r\n\r\nI have been reading the code for sparse 8bit gemm: https://github.com/pytorch/FBGEMM/blob/master/test/SpMMI8Test.cc and I have a few questions.\r\n\r\nI noticed that `getRandomSparseVector` will only generate positive numbers. Is this because you rely on the `maddubs` instruction? Does it mean that the A matrix can only contain positive numbers?\r\n\r\nI noticed this bit in the code:\r\n```c++\r\nfor (int i = 0; i < m * k; ++i) {\r\n   aptr[i] &= 0x7F;\r\n }\r\n```\r\n\r\nYou avoid large numbers to avoid saturation. Does this mean there is no handling of saturation when it happens?\r\n\r\nThanks,\r\n\r\nNick",
    "url": "https://github.com/pytorch/FBGEMM/issues/199",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2019-11-18T17:09:26Z",
    "updated_at": "2019-11-20T18:08:28Z",
    "user": "XapaJIaMnu"
  },
  {
    "repo": "pytorch/vision",
    "number": 1592,
    "title": "unable to load inception model. Or any other architect other than alexnet",
    "body": "import torchvision.models.inception\r\n\r\n# works fine\r\narch = torchMd.alexnet(pretrained=True)\r\n\r\n# gives error, also tried vgg, densenet\r\narch = torchMd.inception(pretrained=True)\r\n\r\nAttributeError                            Traceback (most recent call last)\r\n<ipython-input-43-3882461a2f37> in <module>\r\n----> 1 print(torchvision.__version__)\r\n\r\nAttributeError: module 'torchvision' has no attribute '__version__'\r\n",
    "url": "https://github.com/pytorch/vision/issues/1592",
    "state": "closed",
    "labels": [
      "question",
      "module: models"
    ],
    "created_at": "2019-11-18T07:30:01Z",
    "updated_at": "2019-11-19T10:44:02Z",
    "user": "richesh09"
  },
  {
    "repo": "pytorch/xla",
    "number": 1379,
    "title": "Successive frames growing, but why?",
    "body": "## \u2753 Questions and Help\r\n\r\nIn the attached report below, I see successive frames growing by ~30 lines at each.  The relevant code is below.  The approach I used was to load all of the training data (about 300 mb) into memory into two tensors (`data_source.snd_data` and `data_source.mel_data`) and then at each training step, fill the batch with a different slice of those tensors.  I thought the varying slices at each iteration were causing graph recompilation.  But, in the code below, I replace that step with the same hard-coded slice, and the problem remains.\r\n\r\nWould anyone have any insights into this problem?\r\n\r\nAny help would be greatly appreciated!\r\n\r\n```python\r\n    def set(self, b, sample_slice, data_source):\r\n        ss = sample_slice\r\n        # self.voice_index[b] = ss.voice_index\r\n        wo = ss.wav_offset\r\n        mo = ss.mel_offset\r\n        dws = ss.dec_wav_slice\r\n        mis = ss.mel_in_slice\r\n\r\n        self.lcond_slice[b] = ss.lcond_slice \r\n        self.loss_wav_slice[b] = ss.loss_wav_slice \r\n        # self.wav_input[b,...] = data_source.snd_data[wo + dws[0]:wo + dws[1]] \r\n        # self.mel_input[b,...] = data_source.mel_data[mo + mis[0]:mo +\r\n        #         mis[1],:].transpose(1, 0)\r\n\r\n        self.wav_input[b,...] = data_source.snd_data[3184397:3186543]\r\n        self.mel_input[b,...] = \\\r\n174 =>            data_source.mel_data[19855:19899,:].transpose(1, 0)\r\n```\r\n\r\n[xla.report.618294e.txt](https://github.com/pytorch/xla/files/3855904/xla.report.618294e.txt)\r\n[xla_metrics.618294e.txt](https://github.com/pytorch/xla/files/3855905/xla_metrics.618294e.txt)\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/1379",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2019-11-17T18:04:30Z",
    "updated_at": "2019-12-29T18:57:28Z",
    "user": "hrbigelow"
  },
  {
    "repo": "pytorch/vision",
    "number": 1591,
    "title": "Training data set for pretrained resnet18",
    "body": "Anybody knows what the training data set of pretrained resnet18 is .\r\nI cannot find the official information of training data set used for pretrained models in torchvision.models. ",
    "url": "https://github.com/pytorch/vision/issues/1591",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: classification"
    ],
    "created_at": "2019-11-17T09:01:12Z",
    "updated_at": "2019-11-18T14:37:55Z",
    "user": "pantheon5100"
  },
  {
    "repo": "pytorch/vision",
    "number": 1588,
    "title": "pretrained model",
    "body": "Anybody know how to train a pretrain model(etc mobile net v2 in pysot ) ?",
    "url": "https://github.com/pytorch/vision/issues/1588",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: classification"
    ],
    "created_at": "2019-11-16T08:30:07Z",
    "updated_at": "2019-11-26T01:58:11Z",
    "user": "zhu2014yi"
  },
  {
    "repo": "pytorch/text",
    "number": 643,
    "title": "How to skip last batch that has a different batch size?",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\n<!-- Please send questions or ask for help here. -->\r\n\r\nSorry if this is a newbie question.\r\nIn `torch.nn.utils.data.dataloader` we can drop the last batch by specifying `drop_last=True`.\r\nDo we have something equivalent for our `Iterator`? Currently I continue the training loop if I see the current `batch_size` is different from my preset `batch_size`. Is there something built-in?\r\n\r\nThank you very much!\r\n",
    "url": "https://github.com/pytorch/text/issues/643",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-16T04:08:41Z",
    "updated_at": "2019-11-18T15:54:07Z",
    "user": "Hans0124SG"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 725,
    "title": "transfer_learning_tutorial get a warning under pytorch1.3",
    "body": ">`/usr/local/lib/python3.6/dist-packages/torch/optim/lr_scheduler.py:100: UserWarning: Detected call of `lr_scheduler.step()` before `optimizer.step()`. In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `lr_scheduler.step()`.  Failure to do this will result in PyTorch skipping the first value of the learning rate schedule.See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate\r\n  \"https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate\", UserWarning)`\r\nHello, I'm new to pytorch. In tutorial [transfer_learning_tutorial](https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html), I run it in google colab, and got this warning,  how to fix this?\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/725",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-15T08:21:45Z",
    "updated_at": "2019-11-15T08:32:13Z",
    "comments": 1,
    "user": "neo0801"
  },
  {
    "repo": "pytorch/xla",
    "number": 1368,
    "title": "How to tell if a graph recompilation is happening?",
    "body": "## \ud83d\udcda Documentation\r\n\r\nThanks so much for the great library!  I'm running my Pytorch model on Google Colab with TPU.  Following the tips in TROUBLESHOOTING.md, I see the following in my XLA_METRICS_FILE:\r\n```\r\nMetric: CompileTime\r\n  TotalSamples: 12\r\n  Accumulator: 44s280ms699.409us\r\n  ValueRate: 952ms609.347us / second\r\n  Rate: 0.25789 / second\r\n  Percentiles: 1%=230ms554.170us; 5%=230ms554.170us; 10%=253ms547.395us; 20%=256ms764.061us; 50%=304ms288.564us; 80%=12s512ms567.169us; 90%=12s778ms277.508us; 95%=18s450ms18.269us; 99%=18s450ms18.269us\r\n...\r\nMetric: CompileTime\r\n  TotalSamples: 14\r\n  Accumulator: 01m03s282ms217.172us\r\n  ValueRate: 924ms148.456us / second\r\n  Rate: 0.20445 / second\r\n  Percentiles: 1%=026ms136.061us; 5%=026ms136.061us; 10%=230ms554.170us; 20%=253ms547.395us; 50%=304ms288.564us; 80%=12s778ms277.508us; 90%=18s450ms18.269us; 95%=19s976ms381.702us; 99%=19s976ms381.702us\r\n[more to follow]\r\n```\r\n\r\nThere is one of these sections produced per SGD iteration.  Does the fact that the ValueRate value is about the same in each one, mean that the graph is being compiled each time?  If so, how do I tell what is causing it?  I have studied the output of XLA_SAVE_TENSORS_FILE, and I can't find any place where the tensor dimensions are different.\r\n\r\nHowever, I do also see lots of occurrences of `aten::permute`, `aten::view`, `aten::squeeze`, `aten::relu`, etc.\r\n\r\nI also find that the code runs quite slow compared to GPU.\r\n\r\nThanks again,\r\n\r\nHenry\r\n\r\n<!-- A clear and concise description of what content is an issue. -->\r\n",
    "url": "https://github.com/pytorch/xla/issues/1368",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2019-11-15T03:13:04Z",
    "updated_at": "2019-12-03T02:37:56Z",
    "user": "hrbigelow"
  },
  {
    "repo": "pytorch/vision",
    "number": 1578,
    "title": "pilImage convert to tensor, than convert back to pilimage is not the same to the original",
    "body": "I convert a PILImage to tensor and than convert it back to PILImage. Saving the result, and compare to the original PILImage I loaded, they are not the same. \r\n\r\nWhy it is so?",
    "url": "https://github.com/pytorch/vision/issues/1578",
    "state": "closed",
    "labels": [
      "question",
      "module: transforms"
    ],
    "created_at": "2019-11-14T21:37:00Z",
    "updated_at": "2019-11-26T12:43:44Z",
    "user": "Yumin-Sun-00"
  },
  {
    "repo": "huggingface/transformers",
    "number": 1834,
    "title": "Where is Model2Model PreTrainedEncoderDecoder in run_summerization_finetune",
    "body": "## \u2753 Questions & Help\r\n\r\n<!-- A clear and concise description of the question. -->\r\n",
    "url": "https://github.com/huggingface/transformers/issues/1834",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2019-11-14T18:09:24Z",
    "updated_at": "2020-03-09T03:39:51Z",
    "user": "yeliu918"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 29802,
    "title": "How to release gpu  memory  of intermediate result tensor",
    "body": "In the example below, after calling torch.matmul, the gpu memory usage increases by  181796864 bytes, which is almost the sum of the sizes of c and b.transpose(2,3).  So I guess the unreferenced intermediate result b.transpose(2,3) is stored in gpu memory.  How could I release the gpu memory allocated to this intermediate result to save gpu memory?\r\n\r\n\r\nimport torch\r\nfrom torch.autograd import Variable\r\na = Variable(torch.rand(32, 8, 151, 1024), requires_grad=True).cuda()\r\nb = Variable(torch.rand(32, 8, 151, 1024), requires_grad=True).cuda()\r\ntorch.cuda.memory_allocated(0) # 316669952\r\nc=torch.matmul(a, b.transpose(2,3))\r\ntorch.cuda.memory_allocated(0) # 498466816, increased by 181796864\r\nc.element_size() * c.nelement() # 23348224\r\nb.transpose(2,3).element_size() * b.transpose(2,3).nelement() #158334976\r\n\r\n## Environment\r\n\r\n - PyTorch Version (e.g., 1.0): 1.0.1\r\n - OS (e.g., Linux): centos\r\n - How you installed PyTorch (`conda`, `pip`, source): pip\r\n - Build command you used (if compiling from source):\r\n - Python version: 3.6.9\r\n - CUDA/cuDNN version: cuda9.2/cudnn7.4.2\r\n - GPU models and configuration:NVIDIA 1080TI\r\n - Any other relevant information:\r\n\r\n\n\ncc @ngimel",
    "url": "https://github.com/pytorch/pytorch/issues/29802",
    "state": "closed",
    "labels": [
      "module: cuda",
      "module: memory usage",
      "triaged"
    ],
    "created_at": "2019-11-14T11:36:21Z",
    "updated_at": "2019-11-15T15:49:09Z",
    "user": "akikaaa"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 31,
    "title": "How to add built AAR libraries to a project",
    "body": "Hi, \r\n\r\nI've faced an issue. On PyTorch website there's an intro how to build and deploy pytorch-mobile from source (https://pytorch.org/mobile/android/#building-pytorch-android-from-source) but the part with Gradle won't work for me.\r\n\r\nI've succesfully build AAR files, then edited `HelloWorldApp/app/gradle.build` as it said in intro, and added this AAR files to `HelloWorldApp/app/libs/`\r\n\r\nAnd run it `./gradlew installDebug --stacktrace`\r\n\r\n```\r\n> Task :app:javaPreCompileDebug FAILED\r\n\r\nFAILURE: Build failed with an exception.\r\n\r\n* What went wrong:\r\nExecution failed for task ':app:javaPreCompileDebug'.\r\n> Could not resolve all files for configuration ':app:debugCompileClasspath'.\r\n   > Failed to transform artifact 'pytorch_android-release.aar (:pytorch_android-release:)' to match attributes {artifactType=android-classes, org.gradle.usage=java-api}.\r\n      > Execution failed for JetifyTransform: /root/android-demo-app/HelloWorldApp/app/libs/pytorch_android-release.aar.\r\n         > Java heap space\r\n\r\n* Try:\r\nRun with --info or --debug option to get more log output. Run with --scan to get full insights.\r\n\r\n* Exception is:\r\norg.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:javaPreCompileDebug'.\r\n        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:38)\r\n        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:73)\r\n        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)\r\n        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:49)\r\n        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)\r\n        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)\r\n        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)\r\n        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)\r\n        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)\r\n        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)\r\n        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)\r\n        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:49)\r\n        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)\r\n        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)\r\n        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)\r\n        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)\r\n        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)\r\n        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)\r\n        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)\r\n        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)\r\n        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)\r\n        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)\r\n        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)\r\n        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)\r\n        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)\r\nCaused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugCompileClasspath'.\r\n        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.rethrowFailure(DefaultConfiguration.java:1195)\r\n        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$2100(DefaultConfiguration.java:138)\r\n        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:1170)\r\n        at org.gradle.api.internal.file.AbstractFileCollection.iterator(AbstractFileCollection.java:72)\r",
    "url": "https://github.com/pytorch/android-demo-app/issues/31",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-14T10:41:10Z",
    "updated_at": "2022-08-13T17:06:38Z",
    "user": "zetyquickly"
  },
  {
    "repo": "pytorch/examples",
    "number": 663,
    "title": "how do we pass multiple indices as input to generate multiple outputs in word_language model",
    "body": "The current codebase of [`word_language_model/generate.py`](https://github.com/pytorch/examples/blob/master/word_language_model/generate.py) uses a single (randomly sampled) index as `input` and generates a text based on this.\r\n\r\nNow, I'd like to extend this a bit and would like to pass a set of indices (i.e. > 1) as `input` and be able to generate a set of texts as output. I tried it with a simple loop based approach of iteratively querying the model but it's taking hours to do this task, since it has to be done sequentially.\r\n\r\nAny ideas about how to pass in a list of indices as input, particularly in the line: [`word_language_model/generate.py#L56`](https://github.com/pytorch/examples/blob/master/word_language_model/generate.py#L56) ? This can be called as *batchified generate* function!",
    "url": "https://github.com/pytorch/examples/issues/663",
    "state": "open",
    "labels": [
      "nlp"
    ],
    "created_at": "2019-11-14T03:55:33Z",
    "updated_at": "2022-03-09T23:42:32Z",
    "user": "kmario23"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 29745,
    "title": "How to add PyTorch to requirements.txt",
    "body": "I'm trying to include PyTorch in a requirements.txt file to be installed in a Docker container, but can't seem to get it to work. I've tried adding the following with no luck:\r\n\r\n```\r\ntorch==1.3.1\r\n> ERROR: Could not find a version that satisfies the requirement torch==1.3.1 (from -r /requirements/./base.txt (line 28))\r\n```\r\n\r\n```\r\ntorch==1.2.0+cpu\r\n> Could not find a version that satisfies the requirement torch==1.2.0+cpu (from -r /requirements/./base.txt (line 28)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)\r\n```\r\n\r\nHow do you add PyTorch to requirements.txt?",
    "url": "https://github.com/pytorch/pytorch/issues/29745",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-13T20:12:58Z",
    "updated_at": "2021-01-19T13:35:28Z",
    "user": "econti"
  },
  {
    "repo": "pytorch/xla",
    "number": 1348,
    "title": "How to downgrade torch version?",
    "body": "Hey guys, I'm trying to train my image classification model on multi-cores. I'm using Pytorch-nightly version but the problem is that torch version is 1.4.0a0+be75795, which isn't compatible with my Torchvision version(0.3.0). It gives the following error-\r\n\r\n`AttributeError: module 'torch' has no attribute 'gels'`\r\n\r\nThis gels attribute is defined in previous torch versions, so how can I downgrade only the torch version to 1.2.0 once I'm inside the container?\r\n\r\nThanks",
    "url": "https://github.com/pytorch/xla/issues/1348",
    "state": "closed",
    "labels": [
      "bug"
    ],
    "created_at": "2019-11-13T06:17:52Z",
    "updated_at": "2019-11-14T00:21:42Z",
    "user": "ajay960singh"
  },
  {
    "repo": "pytorch/examples",
    "number": 660,
    "title": "how to run  resnet on Single node, multiple GPUs",
    "body": "can i use  \"CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python main.py -a resnet50 .......\"",
    "url": "https://github.com/pytorch/examples/issues/660",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-12T03:42:46Z",
    "updated_at": "2019-11-12T03:43:53Z",
    "user": "gentelyang"
  },
  {
    "repo": "pytorch/examples",
    "number": 659,
    "title": "Do we need average_gradient when we do mutiprocess distributed training?",
    "body": "In the tutorial, it is said that we need to write `avereage_gradients` to get the average gradient for different process, then we can do `optimizer.step()`, however, in the imagenet example, `avereage_gradients`  is not there. Does it means we do not need this function in new version of pytorch for mutiprocess distributed training?(I am using torch 1.3.0)",
    "url": "https://github.com/pytorch/examples/issues/659",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-12T00:11:38Z",
    "updated_at": "2019-11-12T03:43:36Z",
    "comments": 1,
    "user": "dzk9528"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 29521,
    "title": "How to perform multi-task regression with pytorch?",
    "body": "```\r\nimport torch\r\nfrom torch import nn\r\nimport torch.nn.functional as F\r\n\r\nclass mynet(nn.Module):\r\n    def __init__(self):\r\n        super(mynet, self).__init__()\r\n        self.lin1 = nn.Linear(5, 10)\r\n        self.lin2 = nn.Linear(10, 3)\r\n        self.lin3 = nn.Linear(10, 4)\r\n\r\n    def forward(self, x):\r\n        x = self.lin1(x)\r\n        x1 = self.lin2(x)\r\n        x2 = self.lin3(x)\r\n        return x1, x2\r\n\r\nif __name__ == '__main__':\r\n    x = torch.randn(1000, 5)\r\n    y1 = torch.randn(1000, 3)\r\n    y2 = torch.randn(1000,  4)\r\n    model = mynet()\r\n    optimizer = torch.optim.Adam(model.parameters(), lr=0.001, weight_decay=1e-4)\r\n    for epoch in range(100):\r\n        model.train()\r\n        optimizer.zero_grad()\r\n        out1, out2 = model(x)\r\n        loss = 0.2 * F.mse_loss(out1, y1) + 0.8 * F.mse_loss(out2, y2)\r\n        loss.backward()\r\n        optimizer.step()\r\n\r\n```\r\n\r\nAlthough the code above can run,I have a question that if I expect loss=0.2*loss1+0.8*loss2,how can loss be divides into two parts in proportion when backward propagating?",
    "url": "https://github.com/pytorch/pytorch/issues/29521",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-10T11:35:47Z",
    "updated_at": "2019-11-11T03:50:40Z",
    "user": "thu-wangz17"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 29517,
    "title": "Where is the source code for mathematical operations like specifically torch.mean()?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/29517",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-10T07:08:09Z",
    "updated_at": "2019-11-10T08:56:45Z",
    "user": "C-Weed28"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 29441,
    "title": "error when export to onnx:Auto nesting doesn't know how to process an input object of type maskrcnn_benchmark.structures.image_list.ImageList. Accepted types: Tensors, or lists/tuples of them",
    "body": "## \u2753 Questions and Help\r\npytorch:1.0.0\r\ncuda:10.0\r\ntorchvision:0.2.1\r\nubuntu:16.04\r\n\r\ni clone the [facebook/maskrcnn-benchmark](https://github.com/facebookresearch/maskrcnn-benchmark), and want to export the model to onnx:\r\n```\r\nx = torch.ones(1, 3, 224, 224, requires_grad=True)\r\ntorch.onnx.export(model, x, \"faster.onnx\", export_params=True)\r\n```\r\nbut it get the error:\r\n```\r\n......\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 487, in __call__\r\n    result = self._slow_forward(*input, **kwargs)\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 477, in _slow_forward\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/nn/parallel/distributed.py\", line 357, in forward\r\n    return self.module(*inputs[0], **kwargs[0])\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 487, in __call__\r\n    result = self._slow_forward(*input, **kwargs)\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 477, in _slow_forward\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/opt/conda/lib/python3.6/site-packages/maskrcnn_benchmark/modeling/detector/generalized_rcnn.py\", line 50, in forward\r\n    proposals, proposal_losses = self.rpn(images, features, targets)\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 487, in __call__\r\n    result = self._slow_forward(*input, **kwargs)\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 464, in _slow_forward\r\n    input_vars = tuple(torch.autograd.function._iter_tensors(input))\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/autograd/function.py\", line 284, in _iter\r\n    for var in _iter(o):\r\n  File \"/opt/conda/lib/python3.6/site-packages/torch/autograd/function.py\", line 293, in _iter\r\n    if condition_msg else \"\"))\r\nValueError: Auto nesting doesn't know how to process an input object of type maskrcnn_benchmark.structures.image_list.ImageList. Accepted types: Tensors, or lists/tuples of the\r\n```\r\n\r\n\r\n\n\ncc @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof",
    "url": "https://github.com/pytorch/pytorch/issues/29441",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2019-11-08T06:14:52Z",
    "updated_at": "2021-12-23T01:43:59Z",
    "user": "zsk423200"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 29434,
    "title": "How to know which whl version can be selected?",
    "body": "@svenstaro @eklitzke @jfsantos I wan't use pip install torch with cuda10, i know use bash like this: \r\npip3 install https://download.pytorch.org/whl/cu100/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl\r\nwhen i choose python vision is cp37, It will be reported wrong: \r\nERROR: torch-1.1.0-cp37-cp37m-linux_x86_64.whl is not a supported wheel on this platform.\r\nso i want know which whl version can be selected?\r\n\n\ncc @ezyang",
    "url": "https://github.com/pytorch/pytorch/issues/29434",
    "state": "closed",
    "labels": [
      "module: binaries",
      "triaged"
    ],
    "created_at": "2019-11-08T02:52:04Z",
    "updated_at": "2019-11-09T05:54:40Z",
    "user": "moyans"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 29422,
    "title": "How to inference with nn.TransformerDecoder layer",
    "body": "I am using customized Transformer with nn.TransformerDecoder layer . It seem like nn.TransformerDecoder layer doesn't support inference process(generation/testing), like sending token id one by one with fixed memory generated from nn.TransformerEncoder layer. I am wondering is there a tutorial that I can refer to as I didn't find a tutorial in the official documents. Thank  you in advance for your help! \r\n",
    "url": "https://github.com/pytorch/pytorch/issues/29422",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-07T23:41:50Z",
    "updated_at": "2019-11-08T21:47:20Z",
    "user": "xdwang0726"
  },
  {
    "repo": "pytorch/vision",
    "number": 1557,
    "title": "Can KeypointRCNN also detect objects that do not need to be predicted with keypoints?",
    "body": "As far as I understand keypoints would be computed for all the box classes (apart from background) in Keypoint-RCNN. I need to do object detection and keypoint prediction at the same time, however keypoints should only be predicted for one class. Does current version support this? \r\n\r\nIf not, I would need to modify some of the code in FasterRCNN and KeypointRCNN as far as I understand but in principle it is possible, right?",
    "url": "https://github.com/pytorch/vision/issues/1557",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2019-11-06T00:26:08Z",
    "updated_at": "2019-11-06T09:56:00Z",
    "user": "anuar12"
  },
  {
    "repo": "pytorch/examples",
    "number": 656,
    "title": "About DCGAN datasets",
    "body": "May I know what is the dataset URL for fake input in DCGAN example?",
    "url": "https://github.com/pytorch/examples/issues/656",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-05T18:51:11Z",
    "updated_at": "2022-03-09T23:28:56Z",
    "comments": 1,
    "user": "mahmoodn"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 29190,
    "title": "How to run two different jit models in two GPUs respectively in one scrip?",
    "body": "I have an encoder-decoder model.  After converted encoder and decoder model into jit models, I want to load encoder on GPU:0 and the encoder outputs **Keys** and **Value**. Then I move the **Keys** and **Values** to GPU:1 since the decoder is loaded on GPU:1. \r\n\r\n    encoder = torch.jit.load(feat_model).cuda(0)\r\n    gru_decoder = torch.jit.load(gru_model, map_location=torch.device(\"cpu\")).cuda(1)\r\n\r\n    loader = getLoader(data_path, batch_size)\r\n    for data in loader:\r\n        audio, label = data\r\n        batch_size = audio.size(0)\r\n        k, v = encoder(audio.type(\"torch.FloatTensor\").cuda(0))\r\n        k = k.cuda(1)\r\n        v = v.cuda(1)\r\n        hidden = torch.zeros(1, batch_size, 512).type(\"torch.FloatTensor\").cuda(1)\r\n        target = torch.tensor(sos_id).repeat(batch_size).cuda(1)\r\n\r\n        for step in range(k.size(1)):\r\n            probs, hidden = gru_decoder(target, hidden, k, v)\r\n            target = torch.argmax(probs, dim=-1)\r\nI have checked that target, hidden, k, v are on GPU:1. However, an error occurs:\r\n\r\n    arguments are located on different GPUs at /pytorch/aten/src/THC/generic/THCTensorIndex.cu:519:\r\n    operation failed in interpreter:\r\n    op_version_set = 0\r\n    def forward(self,\r\n        target: Tensor,\r\n        hx: Tensor,\r\n        keys: Tensor,\r\n        values: Tensor) -> Tuple[Tensor, Tensor]:\r\n        input_1 = torch.to(target, dtype=4, layout=0, device=torch.device(\"cuda\"), non_blocking=False, copy=False)\r\n        _0 = torch.embedding(self.classifier.embedding.weight, input_1, -1, False, False)\r\n            ~~~~~~~~~~~~~~~ <--- HERE\r\n        input_2 = torch.unsqueeze(_0, 1)\r\n        _1 = [self.classifier.rnn.weight_ih_l0, self.classifier.rnn.weight_hh_l0, self.classifier.rnn.bias_ih_l0, self.classifier.rnn.bias_hh_l0]\r\n        querys, _2 = torch.gru(input_2, hx, _1, True, 1, 0., False, False, True)\r\n        _3 = torch.matmul(keys, torch.permute(querys, [0, 2, 1]))\r\n        input_3 = torch.div(_3, CONSTANTS.c0)\r\n        attn_w = torch.softmax(input_3, 1)\r\n        sums = torch.matmul(torch.permute(attn_w, [0, 2, 1]), values)\r\n        input_4 = torch.view(torch.add(querys, sums, alpha=1), [-1, 512])\r\n       input = torch.addmm(self.classifier.h.bias, input_4, torch.t(self.classifier.h.weight), beta=1, alpha=1)\r\n\r\nIt seems that the embedding layer in decoder is on GPU:0. But I have already set decoder on CUDA:1. \r\nDoes anyone have any solutions or ideas? Thanks a lot.\r\n\r\ncc @suo",
    "url": "https://github.com/pytorch/pytorch/issues/29190",
    "state": "open",
    "labels": [
      "oncall: jit",
      "triaged"
    ],
    "created_at": "2019-11-05T10:09:34Z",
    "updated_at": "2020-03-19T06:14:43Z",
    "user": "lzj9072"
  },
  {
    "repo": "pytorch/vision",
    "number": 1553,
    "title": "Trained Mask RCNN without ground truth bounding boxes ",
    "body": "Hi all,\r\n\r\nIs acceptable to train mask rcnn without bounding boxes? I want to generate only negative samples after RPN model in order to lower false positive cases.",
    "url": "https://github.com/pytorch/vision/issues/1553",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: object detection"
    ],
    "created_at": "2019-11-05T03:08:39Z",
    "updated_at": "2019-11-05T10:48:14Z",
    "user": "ghost"
  },
  {
    "repo": "pytorch/vision",
    "number": 1552,
    "title": "Best practice to run Mask R-CNN in parallel",
    "body": "What ist the best practice to run Mask R-CNN in parallel?\r\n\r\n@fmassa wrote in #1255 \r\n\r\n> The current code assumes that you are using 1 GPU per process, with DistributedDataParallel.\r\n\r\nIs this information up-to-date?",
    "url": "https://github.com/pytorch/vision/issues/1552",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: object detection"
    ],
    "created_at": "2019-11-04T15:56:36Z",
    "updated_at": "2019-11-05T10:42:50Z",
    "user": "maxfrei750"
  },
  {
    "repo": "pytorch/QNNPACK",
    "number": 68,
    "title": "How to build dependencies separately",
    "body": "I'm trying to add a package for QNNPACK to the [Spack package manager](https://spack.io). I see that QNNPACK downloads its own dependencies, and that this can be avoided by setting `*_SOURCE_DIR` via cmake. Is there a way to point to an existing external installation instead of a source directory so that Spack doesn't need to rebuild all of these dependencies? Spack is designed to work on air-gapped supercomputers that don't have internet access, so I can't have it download anything at build time.",
    "url": "https://github.com/pytorch/QNNPACK/issues/68",
    "state": "open",
    "labels": [],
    "created_at": "2019-11-01T22:08:50Z",
    "updated_at": "2019-11-01T22:08:50Z",
    "user": "adamjstewart"
  },
  {
    "repo": "pytorch/examples",
    "number": 653,
    "title": "What is the meaning of transforms.Normalize((0.1307,), (0.3081,)) in mnist",
    "body": "In mnist/main.py, when reading the dataset using DataLoader, there is a line:\r\n\r\n`transforms.Normalize((0.1307,), (0.3081,))`\r\n\r\ncan any one explain its meaning? I know that it tries to normalize the data, but why there are two parameters and where do those 0.1307 and 0.3081 come from?",
    "url": "https://github.com/pytorch/examples/issues/653",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-01T15:41:13Z",
    "updated_at": "2024-07-30T12:09:26Z",
    "user": "copyrightly"
  },
  {
    "repo": "pytorch/examples",
    "number": 652,
    "title": "why not divide by batch size ?",
    "body": "https://github.com/pytorch/examples/blob/4e00723456160d910092aae567a0b8daf66c49ec/vae/main.py#L82\r\n\r\nI think finally loss should be **(BCE+KLD) / batch_size** , is right?",
    "url": "https://github.com/pytorch/examples/issues/652",
    "state": "closed",
    "labels": [],
    "created_at": "2019-11-01T08:56:53Z",
    "updated_at": "2022-03-09T23:26:30Z",
    "comments": 2,
    "user": "Johnson-yue"
  },
  {
    "repo": "pytorch/xla",
    "number": 1280,
    "title": "machine translation validation fails with multi-process",
    "body": "## \u2753 Questions and Help\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. create an instance using the latest torch-xla\r\n```bash\r\nexport PROJECT_NAME=xxx\r\ngcloud config set project ${PROJECT_NAME}\r\ngcloud compute --project=${PROJECT_NAME} instances create instance-1 \\\r\n--zone=europe-west4-a  \\\r\n--machine-type=n1-standard-8  \\\r\n--image=debian-9-torch-xla-v20191026 \\\r\n--image-project=ml-images  \\\r\n--boot-disk-size=200GB\r\n```\r\n2. conda activate `torch-xla-nightly`\r\n3. run machine translation scirpt following https://cloud.google.com/tpu/docs/tutorials/transformer-pytorch in tpu branch of fairseq-tpu (https://github.com/pytorch-tpu/fairseq/tree/tpu) as\r\n```bash\r\ngcloud compute tpus create transformer-pytorch-tutorial \\\r\n--zone=europe-west4-a \\\r\n--network=default \\\r\n--range=10.2.3.0 \\\r\n--version=pytorch-nightly \\\r\n--accelerator-type=v3-8\r\n\r\nexport TPU_IP_ADDRESS=ip-address; \\\r\nexport XRT_TPU_CONFIG=\"tpu_worker;0;$TPU_IP_ADDRESS:8470\";\r\n\r\npython train.py \\\r\n  $HOME/pytorch-tutorial-data/wmt18_en_de_bpej32k \\\r\n  --save-interval=1 \\\r\n  --arch=transformer_vaswani_wmt_en_de_big \\\r\n  --max-target-positions=64 \\\r\n  --attention-dropout=0.1 \\\r\n  --no-progress-bar \\\r\n  --criterion=label_smoothed_cross_entropy \\\r\n  --source-lang=en \\\r\n  --lr-scheduler=inverse_sqrt \\\r\n  --min-lr 1e-09 \\\r\n  --skip-invalid-size-inputs-valid-test \\\r\n  --target-lang=de \\\r\n  --label-smoothing=0.1 \\\r\n  --update-freq=1 \\\r\n  --optimizer adam \\\r\n  --adam-betas '(0.9, 0.98)' \\\r\n  --warmup-init-lr 1e-07 \\\r\n  --lr 0.0005 \\\r\n  --warmup-updates 4000 \\\r\n  --share-all-embeddings \\\r\n  --dropout 0.3 \\\r\n  --weight-decay 0.0 \\\r\n  --valid-subset=valid \\\r\n  --max-epoch=25 \\\r\n  --input_shapes 128x64 \\\r\n  --num_cores=8 \\\r\n  --metrics_debug \\\r\n  --log_steps=100\r\n```\r\n\r\nAfter the first epoch during validation, it reports \r\n`/anaconda3/envs/torch-xla-nightly/lib/python3.6/multiprocessing/semaphore_tracker.py:143: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown\r\n  len(cache))` and then crushes. There is no checkpoint saved, too.\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\nIt crushes with the SIGKILL from multiprocessing:\r\n```base\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 632, in <module>\r\n    cli_main()\r\n  File \"train.py\", line 623, in cli_main\r\n    xmp.spawn(_mp_fn, args=(args,), nprocs=args.num_cores)\r\n  File \"/anaconda3/envs/torch-xla-nightly/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py\", line 154, in spawn\r\n    _start_fn, args=(fn, args), nprocs=nprocs, join=join, daemon=daemon)\r\n  File \"/anaconda3/envs/torch-xla-nightly/lib/python3.6/site-packages/torch/multiprocessing/spawn.py\", line 171, in spawn\r\n    while not spawn_context.join():\r\n  File \"/anaconda3/envs/torch-xla-nightly/lib/python3.6/site-packages/torch/multiprocessing/spawn.py\", line 107, in join\r\n    (error_index, name)\r\nException: process 0 terminated with signal SIGKILL\r\n```\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n## Environment\r\n\r\n - reproducible on XLA backend [CPU/TPU]: TPU\r\n - torch_xla version: torch-xla-nightly (v1026)\r\n - Any other relevant information:",
    "url": "https://github.com/pytorch/xla/issues/1280",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2019-10-31T20:24:20Z",
    "updated_at": "2021-05-22T04:59:05Z",
    "user": "sIncerass"
  },
  {
    "repo": "pytorch/vision",
    "number": 1538,
    "title": "Problem train/finetuning segmentation (fcn_resnet101) on voc data",
    "body": "Hi\r\nThanks for a great api. \r\n\r\nI am trying to train/finetuning the trained fcn_resnet101 trained on coco dataset, but it seems like after 1. epoch it is way worse on voc data, than it is before. \r\n\r\nIf i test the already trained fcn_resnet101 on the voc data i get  mean IoU: 73.3. \r\n\r\nThen i train the fcn_resnet101 on the voc data and after 1. epoch i get mean IoU: 3.8.\r\nWhy is it so much worse after training 1. epoch? \r\nSeems like i am not using the pretrained network for training.\r\n\r\nThe command line i am using for finetuning the network is:\r\npython3 -m torch.distributed.launch --use_env train.py --lr 0.02 --dataset voc -b 2 --model fcn_resnet101 --aux-loss --pretrained\r\n\r\nAnd for testing i use:\r\npython3 -m torch.distributed.launch --use_env train.py --lr 0.02 --dataset voc -b 2 --model fcn_resnet101 --aux-loss --pretrained --test-only\r\n\r\nHave somebody experinced the same?\r\n\r\nHope somebody can help?\r\n\r\nBecause after this i want to train on my own dataset.\r\n\r\n\r\n \r\n\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/1538",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: semantic segmentation"
    ],
    "created_at": "2019-10-30T15:10:32Z",
    "updated_at": "2019-11-01T08:37:40Z",
    "user": "Denlar2"
  },
  {
    "repo": "pytorch/examples",
    "number": 650,
    "title": "This project fast-neural-style takes too long, how to solve?",
    "body": "1. 32346.619 ms\r\n2. 12375.127ms",
    "url": "https://github.com/pytorch/examples/issues/650",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-30T10:56:34Z",
    "updated_at": "2022-03-09T23:24:07Z",
    "user": "tcxia"
  },
  {
    "repo": "pytorch/xla",
    "number": 1262,
    "title": "How to share weights memory while running big models",
    "body": "## \u2753 Questions and Help\r\n\r\nHello, I use pytorch-xla multiprocessing approach to train my gpt2 model from `huggingface-transformers`. When training from pretrained weights, the model is however loaded multiple times, which increase the need for host memory. While for GPT2-small it's not a problem. GPT2-large can fill up to 80GB of ram when loaded by all processes. What is the suggested way to share host memory for model weights while running multiprocessing? Is this possible at all?\r\n\r\nThe part of code, run by each thread that causes the problem:\r\n```\r\n    model_class = GPT2LMHeadModel\r\n    model = model_class.from_pretrained(\"gpt2\")\r\n    model.to(device).train()\r\n```",
    "url": "https://github.com/pytorch/xla/issues/1262",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2019-10-30T09:59:28Z",
    "updated_at": "2020-02-27T18:44:54Z",
    "user": "Glorf"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 28868,
    "title": "How to build caffe2 with ONNX opset version greater than 9?",
    "body": "## \u2753 Questions and Help\r\n\r\nHello,\r\nI've currently worked with freshly merged feature pytorch/vision#1401 and won't able to find a way to make Caffe2 work with ONNX operation set 10?\r\n\r\nIs there a way to build a Caffe2 from source with this opset?\r\n ",
    "url": "https://github.com/pytorch/pytorch/issues/28868",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-30T09:51:52Z",
    "updated_at": "2019-10-31T00:50:02Z",
    "user": "zetyquickly"
  },
  {
    "repo": "pytorch/vision",
    "number": 1534,
    "title": "The output of features is 512*7*7,why we still need AdaptiveAvgPool2d here to make the output size 7*7 output diamension ",
    "body": "https://github.com/pytorch/vision/blob/13b35ffaa5167f3713ea7a53c43395d90b3a7cbc/torchvision/models/vgg.py#L44",
    "url": "https://github.com/pytorch/vision/issues/1534",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: classification"
    ],
    "created_at": "2019-10-30T02:44:27Z",
    "updated_at": "2019-10-30T10:04:25Z",
    "user": "shenlinyao"
  },
  {
    "repo": "pytorch/xla",
    "number": 1260,
    "title": "Is tensorboard visualization of computation graphs supported?",
    "body": "Hi. I would like to know is it possible to dump a tensorboard visualization of the structure of the computation graph and the TPU compatibility graph for debugging purposes.\r\n[reference](https://cloud.google.com/tpu/docs/cloud-tpu-tools#profile_tab) This can be done in TF by setting the \"model_dir\" attribute of tf.estimator API.\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/xla/issues/1260",
    "state": "closed",
    "labels": [
      "question",
      "stale"
    ],
    "created_at": "2019-10-30T02:18:09Z",
    "updated_at": "2019-12-13T07:44:20Z",
    "user": "20171130"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 24,
    "title": "Hello, I use Java to load my training model, the program is stuck in \u201cmodule.forward\uff08\uff09\u201d this step is not gone, how to do?",
    "body": "",
    "url": "https://github.com/pytorch/android-demo-app/issues/24",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-28T10:23:04Z",
    "updated_at": "2019-11-20T23:35:59Z",
    "user": "niushaoda"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 28778,
    "title": "andoroid  quantization  model (mobilenetv2) first forward  very slow?  but second forward  faster why how to fix it",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\n\ncc @jerryzh168 @jianyuh @dzhulgakov @raghuramank100 @jamesr66a",
    "url": "https://github.com/pytorch/pytorch/issues/28778",
    "state": "closed",
    "labels": [
      "oncall: quantization",
      "triaged"
    ],
    "created_at": "2019-10-28T04:42:36Z",
    "updated_at": "2019-10-29T05:53:17Z",
    "user": "hexiangquan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 28776,
    "title": "How to use torch.quantization.get_observer_dict(mod, target_dict, prefix='')",
    "body": "## \u2753 How to use torch.quantization.get_observer_dict(mod, target_dict, prefix='') to get the observer dict\r\n\r\nCan you provide an example for this usage? Thanks a lot!\r\n\n\ncc @jerryzh168 @jianyuh @dzhulgakov @raghuramank100 @jamesr66a",
    "url": "https://github.com/pytorch/pytorch/issues/28776",
    "state": "closed",
    "labels": [
      "oncall: quantization",
      "triaged"
    ],
    "created_at": "2019-10-28T04:13:45Z",
    "updated_at": "2019-10-29T01:40:28Z",
    "user": "vippeterhou"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 28771,
    "title": "why the data-type of output is quint8 in static quantize? what  static quantize does under the hood?",
    "body": "Here is a example of static quantize,My python is version 3.7 and torch is 1.3.:\r\n`\r\nimport torch\r\nimport torch.nn as nn\r\nm = nn.quantized.Linear(20,30)\r\ninput = torch.randn(128.20)\r\ninput = torch.quantize_per_tensor(input,1.0,0,torch.quint8)\r\noutput = m(input)\r\nprint (output.dtype)\r\n`\r\nI feel confused why the data-type of output is quint8 rather than float or int-32 in static quantize\uff0cit may  will cause accuracy loss when model 'm' is joint with a  soft-max layer at last ?what static quantize does underlying?\r\n\n\ncc @jerryzh168 @jianyuh @dzhulgakov @raghuramank100 @jamesr66a @pytorch/quantization",
    "url": "https://github.com/pytorch/pytorch/issues/28771",
    "state": "closed",
    "labels": [
      "oncall: quantization",
      "triaged"
    ],
    "created_at": "2019-10-28T02:11:47Z",
    "updated_at": "2020-04-15T01:02:31Z",
    "user": "litaozijin"
  },
  {
    "repo": "pytorch/examples",
    "number": 648,
    "title": "C++ MNIST without CUDA",
    "body": "Hi\r\n\r\nFollowing instructions for MNIST in C++ I get this after make:\r\n\r\n```\r\n-- The C compiler identification is GNU 4.8.5\r\n-- The CXX compiler identification is GNU 4.8.5\r\n-- Check for working C compiler: /usr/bin/cc\r\n-- Check for working C compiler: /usr/bin/cc -- works\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Detecting C compile features\r\n-- Detecting C compile features - done\r\n-- Check for working CXX compiler: /usr/bin/c++\r\n-- Check for working CXX compiler: /usr/bin/c++ -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- Detecting CXX compile features\r\n-- Detecting CXX compile features - done\r\n-- Looking for pthread.h\r\n-- Looking for pthread.h - found\r\n-- Looking for pthread_create\r\n-- Looking for pthread_create - not found\r\n-- Looking for pthread_create in pthreads\r\n-- Looking for pthread_create in pthreads - not found\r\n-- Looking for pthread_create in pthread\r\n-- Looking for pthread_create in pthread - found\r\n-- Found Threads: TRUE  \r\nCUDA_TOOLKIT_ROOT_DIR not found or specified\r\n-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) \r\n\r\nCMake Error at (my path to)/libtorch/share/cmake/Caffe2/Caffe2Config.cmake:90 (message):\r\n  Your installed Caffe2 version uses CUDA but I cannot find the CUDA\r\n  libraries.  Please set the proper CUDA prefixes and / or install CUDA.\r\n```\r\n\r\nI was wondering if there is a way to run this without CUDA. \r\nThanks",
    "url": "https://github.com/pytorch/examples/issues/648",
    "state": "open",
    "labels": [
      "c++"
    ],
    "created_at": "2019-10-27T22:44:15Z",
    "updated_at": "2022-03-09T20:49:35Z",
    "comments": 0,
    "user": "maziar840"
  },
  {
    "repo": "pytorch/text",
    "number": 629,
    "title": "How to use custom-built Torchtext vocabulary with the HuggingFace TransfoXLLMHeadModel?",
    "body": "Hello,\r\n\r\nI am trying to use my custom built vocabulary which I defined using Torchtext functions with the HuggingFace TransfoXLLMHeadModel, and I am having some troubles with it.\r\nI defined my text field as below:\r\n```js\r\n\r\n# Import packages \r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nfrom transformers import TransfoXLConfig, TransfoXLTokenizer, TransfoXLLMHeadModel\r\nfrom transformers import AdamW, WarmupLinearSchedule\r\nimport spacy\r\nimport torchtext\r\nfrom torchtext.data.utils import get_tokenizer\r\nfrom torchtext.data import Field, BPTTIterator, TabularDataset \r\nimport tensorflow as tf\r\n#import lineflow as lf\r\n#import lineflow.datasets as lfds\r\nimport math\r\nimport random\r\nimport numpy as np\r\nimport pandas as pd \r\nimport time\r\n\r\n# define tokenizer\r\nen = spacy.load('en')\r\n\r\ndef Sp_Tokenizer(text): \r\n    return [tok.text for tok in en.tokenizer(text)]\r\n\r\n# define the English text field\r\nTEXT = Field(tokenize = Sp_Tokenizer,\r\n             init_token='< sos >',\r\n             eos_token='< eos >',\r\n             unk_token='< unk >',\r\n             tokenizer_language='en',\r\n             lower=True)\r\n\r\n# load WikiText-2 dataset and split it into train and test set\r\ntrain_Wiki2, val_Wiki2, test_Wiki2 = torchtext.datasets.WikiText2.splits(TEXT)\r\ntrain_Wiki103, val_Wiki103, test_Wiki103 = torchtext.datasets.WikiText103.splits(TEXT)\r\ntrain_Penn, val_Penn, test_Penn = torchtext.datasets.PennTreebank.splits(TEXT)\r\n\r\n# build custom vocabulary based on the field that we just defined.\r\nTEXT.build_vocab(train_Wiki2, val_Wiki2, test_Wiki2, \r\n                 train_Wiki103, val_Wiki103, test_Wiki103,\r\n                 train_Penn, val_Penn, test_Penn)\r\n```\r\nand then I defined the HuggingFace transformer's configuration as below:\r\n```js\r\n\r\n# set hyperparameter ntokens\r\nntokens = len(TEXT.vocab.stoi)\r\n\r\n# define transformer-XL configuration.\r\ntransfoXLconfig = TransfoXLConfig(vocab_size_or_config_json_file = ntokens,\r\n                                  cutoffs = [20000, 40000, 200000], \r\n                                  d_model = 64, \r\n                                  d_embed = 64, \r\n                                  n_head = 16, \r\n                                  d_head = 64,\r\n                                  n_layer = 5,\r\n                                  attn_type = 0,\r\n                                  dropout = 0.1, \r\n                                  output_hidden_states = True,\r\n                                  output_attentions = True)\r\n\r\n# define the transformer-XL model based on the specified configuration.\r\nmodel = TransfoXLLMHeadModel(transfoXLconfig)\r\n\r\n# add new tokens to the embeddings of our model\r\nmodel.resize_token_embeddings(ntokens)\r\n```\r\nand then I want to somehow specify that I want to use my `TEXT.vocab` that I defined earlier via Torchtext for my vocabulary along with the TransfoXLLMHeadModel, but I am not sure how to do this. Can someone help me on this? Thank you!\r\n",
    "url": "https://github.com/pytorch/text/issues/629",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-27T09:02:13Z",
    "updated_at": "2019-11-01T15:21:23Z",
    "user": "h56cho"
  },
  {
    "repo": "pytorch/android-demo-app",
    "number": 23,
    "title": "Does \"pth\" model need to convert \"pt\"? and how to convert",
    "body": "",
    "url": "https://github.com/pytorch/android-demo-app/issues/23",
    "state": "open",
    "labels": [],
    "created_at": "2019-10-25T09:52:27Z",
    "updated_at": "2020-08-25T03:50:08Z",
    "user": "niushaoda"
  },
  {
    "repo": "pytorch/vision",
    "number": 1523,
    "title": "Unable to pass `extensions` when creating custom `Kinetics400` Video Dataset",
    "body": "Thank you for the video support!\r\n\r\nWhen imported using `from torchvision.datasets.kinetics import *`, the `Kinetics400` class doesn't accept an `extensions` argument:\r\n```python\r\ndata = Kinetics400(root=data_path, frames_per_clip=32, extensions=('.mp4',))\r\n\r\n\r\n\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n<ipython-input-4-904c8992e847> in <module>\r\n----> 1 data = Kinetics400(root=data_path, frames_per_clip=32, extensions=('.mp4',))\r\n\r\nTypeError: __init__() got an unexpected keyword argument 'extensions'\r\n```\r\n\r\nHowever, if I copy-paste the code from `kinetics.py` in my script/notebook, I have the option to pass in an `extensions` argument and it works fine for a dataset with, say, `.mp4` videos. \r\n\r\nWhy does this happen?\r\n\r\nI'm using `python 3.7+`, torch `1.3.0` and `torchvision 0.4.1`\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/vision/issues/1523",
    "state": "closed",
    "labels": [
      "question",
      "module: datasets",
      "module: video"
    ],
    "created_at": "2019-10-25T07:28:37Z",
    "updated_at": "2019-10-25T09:48:03Z",
    "user": "rsomani95"
  },
  {
    "repo": "huggingface/transformers",
    "number": 1626,
    "title": "What is currently the best way to add a custom dictionary to a neural machine translator that uses the transformer architecture?",
    "body": "## \u2753 Questions & Help\r\n\r\nIt's common to add a custom dictionary to a machine translator to ensure that terminology from a specific domain is correctly translated. For example, the term server should be translated differently when the document is about data centers, vs when the document is about restaurants.\r\n\r\nWith a transformer model, this is not very obvious to do, since words are not aligned 1:1. I've seen a couple of papers on this topic, but I'm not sure which would be the best one to use. What are the best practices for this problem?\r\n\r\nOne paper I found that seem to describe what I'm looking for is [here](aclweb.org/anthology/W18-6318.pdf ) - I have a bunch of questions regarding the paper, which I'm happy to discuss here as well. I'm also wondering if there are other approaches.\r\n",
    "url": "https://github.com/huggingface/transformers/issues/1626",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2019-10-24T17:48:10Z",
    "updated_at": "2020-01-04T09:41:58Z",
    "user": "moyid"
  },
  {
    "repo": "pytorch/examples",
    "number": 645,
    "title": "Add Siamese Network example",
    "body": "Hi, I  want to add an example for Siamese network, since it is one of the popular use cases in ML. I am thinking of implementing it in a way similar to other examples viz. command line arguments to choose which dataset to train, hyperparameters etc.\r\nIs there something I need to keep in mind specifically apart from these:\r\n- Use torchvision's Dataset class and PyTorch's DataLoader class to handle data.\r\n- Implement a simple CNN as a nn.Module subclass\r\n- Implement triplet loss\r\n- Create train and test functions and a main function that calls those 2 methods at each epoch.\r\n- Report final loss and accuracy\r\n\r\nIs this something that is worth adding to the repository. ",
    "url": "https://github.com/pytorch/examples/issues/645",
    "state": "open",
    "labels": [
      "good first issue"
    ],
    "created_at": "2019-10-24T11:08:50Z",
    "updated_at": "2022-05-13T18:17:30Z",
    "comments": 4,
    "user": "piyush01123"
  },
  {
    "repo": "pytorch/vision",
    "number": 1521,
    "title": "per class mAP in coco_eval script?",
    "body": "Hi,\r\nI was looking around the eval code and did not find function to calculate **per class mAP**? Is there an easy work around to include that. Thanks. @fmassa ",
    "url": "https://github.com/pytorch/vision/issues/1521",
    "state": "closed",
    "labels": [
      "question",
      "module: reference scripts",
      "topic: object detection"
    ],
    "created_at": "2019-10-23T15:58:28Z",
    "updated_at": "2019-10-25T14:43:13Z",
    "user": "manoja328"
  },
  {
    "repo": "pytorch/vision",
    "number": 1520,
    "title": "DeepLabV3: segment only person",
    "body": "How can I segment person only and skip the other classes by using DeepLabV3?",
    "url": "https://github.com/pytorch/vision/issues/1520",
    "state": "closed",
    "labels": [
      "question",
      "topic: semantic segmentation"
    ],
    "created_at": "2019-10-23T10:22:46Z",
    "updated_at": "2020-01-13T17:37:27Z",
    "user": "muna-cs"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 28478,
    "title": "How to train a torch::jit::script::Module?",
    "body": "Existing documentation / tutorials show only how to train a `torch::nn::Module` https://pytorch.org/cppdocs/frontend.html#end-to-end-example\r\n\r\nI have attempted to make a training loop in the following manner\r\n```\r\n#include <torch/script.h>\r\n#include <torch/torch.h>\r\n#include <iostream>\r\n#include <vector>\r\n// custom loader code\r\n#include \"nets/nets.h\"\r\n#include \"util/runfiles.h\"\r\n\r\nint main(int argc, char** argv) {\r\n  std::cout << \"Nets example\" << std::endl;\r\n\r\n  // Custom code that loads the module on CUDA\r\n  auto runfiles = MakeRunfiles(argv[0]);\r\n  torch::jit::script::Module script_module = LoadSegnetBackbone(*runfiles);\r\n  script_module.train();\r\n  std::cout << \"Loaded script module\" << std::endl;\r\n\r\n  // Pull parameters out of the script module so we can push them into the\r\n  // optimizer.\r\n  std::vector<at::Tensor> parameters;\r\n  for (const auto& parameter : script_module.get_parameters()) {\r\n    parameters.push_back(parameter.value().toTensor());\r\n  }\r\n  torch::optim::SGD optimizer(std::move(parameters), /*lr=*/0.01);\r\n\r\n  constexpr int kBatchSize = 1;\r\n  for (int epoch = 1; epoch <= 1000; ++epoch) {\r\n    optimizer.zero_grad();\r\n\r\n    // The input is a (kBatchSize,3,300,300) tensor filled with ones\r\n    at::Tensor input = torch::ones({kBatchSize, /*channels (rgb) =*/3,\r\n                                    /*height=*/300, /*width=*/300})\r\n                           .to(at::kFloat)\r\n                           .to(at::kCUDA);\r\n\r\n    // Push the input through the script module\r\n    std::vector<torch::jit::IValue> inputs;\r\n    inputs.push_back(input);\r\n    at::Tensor script_module_forward = script_module.forward(inputs).toTensor();\r\n    // The result is an output tensor of size (kBatchSize, 32, 300, 300)\r\n\r\n    // ground truth is a (kBatchSize, 300, 300) tensor filled with ones\r\n    at::Tensor ground_truth =\r\n        torch::ones({kBatchSize, /*height=*/300, /*width=*/300})\r\n            .to(at::kLong)\r\n            .to(at::kCUDA);\r\n\r\n    at::Tensor loss = torch::nll_loss2d(\r\n        torch::log_softmax(script_module_forward, /*dim=*/1), ground_truth);\r\n    loss.backward();\r\n    optimizer.step();\r\n\r\n    if (epoch % 50 == 0) {\r\n      std::cout << \"Loss was \" << loss.item<float>() << std::endl;\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nbut the loss never changes. I have also posted about this on the pytorch forums. https://discuss.pytorch.org/t/jit-module-parameters-are-not-updating-when-training/58945 \r\n\r\ncc @suo @yf225",
    "url": "https://github.com/pytorch/pytorch/issues/28478",
    "state": "closed",
    "labels": [
      "oncall: jit",
      "module: cpp",
      "triaged"
    ],
    "created_at": "2019-10-22T23:36:22Z",
    "updated_at": "2022-01-20T22:41:16Z",
    "user": "markisus"
  },
  {
    "repo": "pytorch/text",
    "number": 622,
    "title": "How to integrate HuggingFace transformers with Torchtext BPTTIterator?",
    "body": "## \u2753 Questions and Help\r\n\r\nHello,\r\n\r\nI am trying to use the pretrained tokenizer from the HuggingFace Transformer-XL when training my custom transformer-XL model on WikiText2, and I am having a trouble making the BPTTIterator from the Torchtext to work.\r\n\r\nBelow are my code:\r\n\r\n```js\r\n# Import packages \r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nfrom transformers import AdamW, WarmupLinearSchedule\r\nfrom transformers import TransfoXLConfig, TransfoXLTokenizer, TransfoXLModel, TransfoXLLMHeadModel \r\nimport torchtext\r\nimport torchtext.data.utils \r\nfrom torchtext.data import Field, BPTTIterator\r\nimport lineflow as lf\r\nimport lineflow.datasets as lfds\r\nimport math\r\nimport random\r\nimport numpy as np\r\nimport pandas as pd \r\nimport time\r\n\r\n# set hyperparameters for this experiment\r\nbptt = 30\r\nbatch_size = 64\r\nlr = 0.01 # learning rate\r\n\r\n# load the pretrained tokenizer\r\ntokenizer = TransfoXLTokenizer.from_pretrained('transfo-xl-wt103', do_lower_case=True)\r\n\r\n# for huggingface - torchtext integration\r\ntokenizer.mask_token = 'maskTok'\r\ntokenizer.pad_token = '<pad>'\r\ntokenizer.eos_token = '<eos>'\r\ntokenizer.unk_token = '<unk>'\r\ntokenizer.bos_token = '<sos>'\r\n\r\npad_index = tokenizer.convert_tokens_to_ids(tokenizer.pad_token)\r\neos_index = tokenizer.convert_tokens_to_ids(tokenizer.eos_token)\r\nunk_index = tokenizer.convert_tokens_to_ids(tokenizer.unk_token)\r\nmask_index = tokenizer.convert_tokens_to_ids(tokenizer.mask_token)\r\nbos_index = tokenizer.convert_tokens_to_ids(tokenizer.bos_token)\r\n\r\n# for huggingface - torchtext integration\r\ntokenizer.mask_token = 'maskTok'\r\ntokenizer.pad_token = '<pad>'\r\ntokenizer.eos_token = '<eos>'\r\ntokenizer.unk_token = '<unk>'\r\ntokenizer.bos_token = '<sos>'\r\n\r\npad_index = tokenizer.convert_tokens_to_ids(tokenizer.pad_token)\r\neos_index = tokenizer.convert_tokens_to_ids(tokenizer.eos_token)\r\nunk_index = tokenizer.convert_tokens_to_ids(tokenizer.unk_token)\r\nmask_index = tokenizer.convert_tokens_to_ids(tokenizer.mask_token)\r\nbos_index = tokenizer.convert_tokens_to_ids(tokenizer.bos_token)\r\n\r\n# load WikiText-2 dataset and split it into train and test set\r\ntrain_Wiki2, val_Wiki2, test_Wiki2 = torchtext.datasets.WikiText2.splits(TEXT)\r\n             \r\n\r\n# extract total number of tokens in the vocabulary\r\nntokens = tokenizer.vocab_size\r\n\r\n# define transformer-XL configuration.\r\ntransfoXLconfig = TransfoXLConfig(vocab_size_or_config_json_file = ntokens,\r\n                                  cutoffs = [20000, 40000, 200000], \r\n                                  d_model = 1024, \r\n                                  d_embed = 1024, \r\n                                  n_head = 16, \r\n                                  d_head = 64,\r\n                                  n_layer = 5,\r\n                                  dropout = 0.1,\r\n                                  attn_type = 0,\r\n                                  output_hidden_states = True,\r\n                                  output_attentions = True)\r\n\r\nmodel = TransfoXLLMHeadModel(config = transfoXLconfig)\r\nmodel.resize_token_embeddings(len(tokenizer))\r\n\r\ntrain_iter, test_iter = BPTTIterator.splits(\r\n            (train_Wiki2, test_Wiki2),\r\n            batch_size = batch_size,\r\n            bptt_len= bptt,\r\n            shuffle = False,\r\n            repeat=False)\r\n\r\n# error occurs here; the error message is:\r\n#  File \"/Users/jin-dominique/anaconda3/lib/python3.7/site-packages/torchtext/data/field.py\", \r\n# line 359, in numericalize\r\n# var = torch.tensor(arr, dtype=self.dtype, device=device)\r\n# \"TypeError: an integer is required (got type str)\"\r\ntrain = next(iter(train_iter))\r\ntest = next(iter(test_iter))\r\n```\r\n\r\nHow can I fix this error?\r\n\r\nThank you,",
    "url": "https://github.com/pytorch/text/issues/622",
    "state": "open",
    "labels": [],
    "created_at": "2019-10-21T17:27:46Z",
    "updated_at": "2020-07-18T19:13:42Z",
    "user": "h56cho"
  },
  {
    "repo": "pytorch/ios-demo-app",
    "number": 3,
    "title": "Add example of how to optimize model for mobile inference",
    "body": "This demo is great and works fine although it would be great to have an example of how to prepare model for mobile inference cause it's non trivial. For example you can add the receipt of how you've prepare the `mobilenet_quantized.pt`.\r\n(Personally i've tried to convert my model to `float16` (it didn't work: model didn't load on mobile), also i've tried `torch.quantization.quantize` and it also didn't work.\r\nTnx!",
    "url": "https://github.com/pytorch/ios-demo-app/issues/3",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-19T14:53:57Z",
    "updated_at": "2020-03-11T17:59:13Z",
    "user": "mirth"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 28331,
    "title": "How to save quantized model in PyTorch1.3 with quantization information",
    "body": "## \u2753 How to save the quantized model in PyTorch1.3 with quantization information\r\nIs there any way to save the quantized model in PyTorch1.3, which keeps the original information remaining? \r\n\r\nI have known that I can save it after tracing it by:\r\n```python\r\n# Save\r\ntorch.jit.save(torch.jit.script(self.model_q), \"quant_model.pth\")\r\n# Load\r\nmq = torch.jit.load(\"quant_model.pth\")\r\n```\r\nAlthough `mq` has the right result, it, **however**, losts the quantized information, such as module(layer) name, zero point, scale, etc.\r\n\n\ncc @jerryzh168 @jianyuh @dzhulgakov @raghuramank100",
    "url": "https://github.com/pytorch/pytorch/issues/28331",
    "state": "closed",
    "labels": [
      "oncall: quantization",
      "triaged"
    ],
    "created_at": "2019-10-19T07:55:01Z",
    "updated_at": "2019-10-23T17:08:14Z",
    "user": "vippeterhou"
  },
  {
    "repo": "pytorch/examples",
    "number": 643,
    "title": "How to run dcgan example?",
    "body": "I want to run `dcgan` example, however, the readme is not very clear.\r\nI have downloaded classroom model from lsun as below\r\n\r\n```\r\n$ ls classroom_train_lmdb -lh\r\ntotal 3.5G\r\n-rw-r--r-- 1 mahmood mahmood 3.5G May  1  2015 data.mdb\r\n-rw-r--r-- 1 mahmood mahmood  63K May  1  2015 lock.mdb\r\n$ ls classroom_val_lmdb -lh\r\ntotal 6.5M\r\n-rw-r--r-- 1 mahmood mahmood 6.4M May  1  2015 data.mdb\r\n-rw-r--r-- 1 mahmood mahmood  63K May  1  2015 lock.mdb\r\n```\r\n\r\nNow, the command is `python main.py --dataset lsun --dataroot XXX`. \r\nWhat is XXX exactly? Is it the root folder that contains `classroom_val_lmdb/` and `classroom_train_lmdb/`?",
    "url": "https://github.com/pytorch/examples/issues/643",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-18T07:24:45Z",
    "updated_at": "2022-03-09T23:35:07Z",
    "user": "mahmoodn"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 705,
    "title": "Where is the demo dataset and model files in (EXPERIMENTAL) STATIC QUANTIZATION WITH EAGER MODE IN PYTORCH ",
    "body": "I'm trying to run the codes in [(EXPERIMENTAL) STATIC QUANTIZATION WITH EAGER MODE IN PYTORCH](https://pytorch.org/tutorials/advanced/static_quantization_tutorial.html#experimental-static-quantization-with-eager-mode-in-pytorch), but there are no dataset and model files available, such as **imagenet_1k, mobilenet_quantization.pth** and so on.    \r\nSo anyone can provide the address of the necessary files and dataset in this tutorial?",
    "url": "https://github.com/pytorch/tutorials/issues/705",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-18T01:38:06Z",
    "updated_at": "2019-10-27T08:14:15Z",
    "user": "Aspirinkb"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 219,
    "title": "Pre-trained english model",
    "body": "Hi,\r\n\r\nIs the pre-trained english model shipped with coref a model trained on the CoNLL and Ontonotes datasets?\r\n\r\nThanks! ",
    "url": "https://github.com/huggingface/neuralcoref/issues/219",
    "state": "closed",
    "labels": [
      "question",
      "training"
    ],
    "created_at": "2019-10-17T18:49:51Z",
    "updated_at": "2019-10-17T20:06:00Z",
    "user": "masonedmison"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 218,
    "title": "State-of-the-art benchmark",
    "body": "Hi,\r\nYou are claiming neuralCoref to be state-of-the-art for coreference resolution. Do you have any benchmark supporting the claim? I would like to include it in my paper. Also can it be cited yet?",
    "url": "https://github.com/huggingface/neuralcoref/issues/218",
    "state": "closed",
    "labels": [
      "question",
      "perf / accuracy"
    ],
    "created_at": "2019-10-17T15:30:16Z",
    "updated_at": "2019-10-21T13:59:12Z",
    "user": "Masum06"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 217,
    "title": "train conll with BERT",
    "body": "Hi\r\nI would like to train the conll-2012 data with BERT, for this the common thing is to first convert data to NLI format, then use the NLI bert for it, I was wondering if you could assist and the BERT-based codes to this repo. I really appreciate for your help.\r\nthanks a lot \r\nBest\r\nJulia",
    "url": "https://github.com/huggingface/neuralcoref/issues/217",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2019-10-17T09:25:01Z",
    "updated_at": "2019-10-17T15:33:22Z",
    "user": "ghost"
  },
  {
    "repo": "huggingface/transformers",
    "number": 1543,
    "title": "Where is pytorch-pretrained-BERT?",
    "body": "## \u2753 Questions & Help\r\n\r\n<!-- A clear and concise description of the question. -->\r\n\r\nAs the title shows, where is pytorch-pretrained-BERT? Please tell me the path, THX.",
    "url": "https://github.com/huggingface/transformers/issues/1543",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-17T07:46:13Z",
    "updated_at": "2019-12-05T10:27:31Z",
    "user": "Foehnc"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 28202,
    "title": "How to quantize resnet in pytorch 1.3?",
    "body": "I tried to quantize resnet18 refer to https://pytorch.org/tutorials/advanced/dynamic_quantization_tutorial.html\r\n\r\nbut I got this error\r\n```\r\n>>> from torchvision.models import resnet18\r\n>>> net= resnet18()\r\n>>> from torch.quantization import quantize_dynamic\r\n>>> qnet = quantize_dynamic(net,{nn.Conv2d,nn.Linear},dtype=torch.qint8)\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"E:\\Program Files\\Anaconda3\\envs\\torch\\lib\\site-packages\\torch\\quantization\\quantize.py\", line 241, in quantize_dynamic\r\n    convert(model, mapping, inplace=True)\r\n  File \"E:\\Program Files\\Anaconda3\\envs\\torch\\lib\\site-packages\\torch\\quantization\\quantize.py\", line 294, in convert\r\n    reassign[name] = swap_module(mod, mapping)\r\n  File \"E:\\Program Files\\Anaconda3\\envs\\torch\\lib\\site-packages\\torch\\quantization\\quantize.py\", line 316, in swap_module\r\n    new_mod = mapping[type(mod)].from_float(mod)\r\n  File \"E:\\Program Files\\Anaconda3\\envs\\torch\\lib\\site-packages\\torch\\nn\\quantized\\dynamic\\modules\\linear.py\", line 70, in from_float\r\n    qlinear = Linear(mod.in_features, mod.out_features)\r\n  File \"E:\\Program Files\\Anaconda3\\envs\\torch\\lib\\site-packages\\torch\\nn\\quantized\\dynamic\\modules\\linear.py\", line 33, in __init__\r\n    super(Linear, self).__init__(in_features, out_features, bias_)\r\n  File \"E:\\Program Files\\Anaconda3\\envs\\torch\\lib\\site-packages\\torch\\nn\\quantized\\modules\\linear.py\", line 119, in __init__\r\n    self.set_weight_bias(qweight, bias)\r\n  File \"E:\\Program Files\\Anaconda3\\envs\\torch\\lib\\site-packages\\torch\\nn\\quantized\\modules\\linear.py\", line 208, in set_weight_bias\r\n    self._packed_params = torch.ops.quantized.linear_prepack(w, b)\r\nRuntimeError: Didn't find engine for operation quantized::linear_prepack NoQEngine (operator () at ..\\aten\\src\\ATen\\native\\quantized\\cpu\\qlinear_prepack.cpp:202)\r\n(no backtrace available)\r\n```\r\n\r\nHow can I solve it?\r\n\r\nmy environment:\r\n\r\ntorch1.3.0+cpu \r\nwindows 7\r\npython3.6.6",
    "url": "https://github.com/pytorch/pytorch/issues/28202",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-17T04:03:02Z",
    "updated_at": "2020-06-23T14:10:10Z",
    "user": "Arctanxy"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 28066,
    "title": "How to speed up installing pytorch1.3?",
    "body": "I am installing pytorch1.3 using pip. The command from the official site is `pip3 install torch===1.3.0 torchvision===0.4.1 -f https://download.pytorch.org/whl/torch_stable.html`.\r\n![pytorch](https://user-images.githubusercontent.com/19465753/66896730-02551800-f028-11e9-8301-42856ef44589.png)\r\nMy pip are using a mirror source which is fast for me. But the `-f https://download.pytorch.org/whl/torch_stable.html` part in the commad force pip to download things from the official site, which is slow for me. \r\n**So my question is how to replace the `-f site` part to speed it up using mirror sites?**\r\nThanks for help!\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/28066",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2019-10-16T07:19:30Z",
    "updated_at": "2019-10-17T23:13:46Z",
    "user": "gaopinghai"
  },
  {
    "repo": "pytorch/pytorch.github.io",
    "number": 287,
    "title": "How to replace the website in the install command after -f ?",
    "body": "I am intalling pytorch on windows7 using pip. I get the command throgh the official website as the picture shows.\r\n![pytorch](https://user-images.githubusercontent.com/19465753/66892580-a6d25c80-f01e-11e9-9e9c-c335c79b995c.png)\r\nThe command is `pip3 install torch===1.3.0 torchvision===0.4.1 -f https://download.pytorch.org/whl/torch_stable.html`. \r\nBut it is too slow because of the `-f https://download.pytorch.org/whl/torch_stable.html`. \r\n**How can I replace this?** My pip is already using a different source, but is no use. Thanks for help.",
    "url": "https://github.com/pytorch/pytorch.github.io/issues/287",
    "state": "open",
    "labels": [],
    "created_at": "2019-10-16T06:12:43Z",
    "updated_at": "2019-10-16T06:13:18Z",
    "user": "gaopinghai"
  },
  {
    "repo": "pytorch/text",
    "number": 619,
    "title": "How to use torchtext for sequence labelling with wordpiece tokeniers",
    "body": "## \u2753 Questions and Help\r\n\r\n**Description**\r\n<!-- Please send questions or ask for help here. -->\r\n\r\nHi,\r\n\r\nIn a previous issue (#609), I asked how to use the tokenizer from the [Transformers](https://github.com/huggingface/transformers) library with torch text.\r\n\r\nI now would like to be able to use this tokenizer and torchtext to load sequence labelling datasets. The issue I am facing is that the tokenizer introduces wordpiece tokens, which ends up breaking the alignment between tokens and labels.\r\n\r\nIgnoring labels, I am able to load a sequence labelling dataset with a Transformer tokenizer like so,\r\n\r\n```python\r\nfrom torchtext import data\r\nfrom torchtext import datasets\r\nfrom transformers import AutoTokenizer\r\n\r\ntokenizer = AutoTokenizer.from_pretrained('bert-base-cased', do_lower_case=False)\r\n\r\ndef preprocessor(batch):\r\n    return tokenizer.encode(batch, add_special_tokens=True)\r\n\r\nTEXT = data.Field(\r\n    use_vocab=False,\r\n    batch_first=True,\r\n    pad_token=tokenizer.pad_token_id,\r\n    preprocessing=preprocessor\r\n)\r\n# LABEL = data.LabelField()\r\n\r\nfields = [('text', TEXT), ('unused_col_1', None), ('unused_col_2', None), ('label', None)]\r\n\r\ntrain, valid, test = datasets.SequenceTaggingDataset.splits(\r\n    path='/Users/johngiorgi/Downloads/bert_data/BC5CDR/chem',\r\n    train='train.tsv',\r\n    validation='devel.tsv',\r\n    test='test.tsv',\r\n    fields=fields\r\n)\r\n\r\ntrain_iter, valid_iter, test_iter = data.BucketIterator.splits(\r\n    (train, valid, test), batch_sizes=(16, 256, 256)\r\n)\r\n\r\n# LABEL.build_vocab(train)\r\n``` \r\n\r\nThe data comes from [here](https://github.com/ncbi-nlp/BLUE_Benchmark/releases/download/0.1/bert_data.zip), and is a tab-seperated file with four columns. The first column contains words, the last labels and each sentence is sperated by a newline, e.g.\r\n\r\n```\r\nNaloxone\t227508\t0\tB\r\nreverses\t-\t9\tO\r\nthe\t-\t18\tO\r\nantihypertensive\t-\t22\tO\r\neffect\t-\t39\tO\r\nof\t-\t46\tO\r\nclonidine\t-\t49\tB\r\n.\t-\t58\tO\r\n\r\nIn\t227508\t60\tO\r\n.\r\n.\r\n.\r\n```\r\n\r\nBut when I try to load the labels, e.g.\r\n\r\n```python\r\nfrom torchtext import data\r\nfrom torchtext import datasets\r\nfrom transformers import AutoTokenizer\r\n\r\ntokenizer = AutoTokenizer.from_pretrained('bert-base-cased', do_lower_case=False)\r\n\r\ndef preprocessor(batch):\r\n    return tokenizer.encode(batch, add_special_tokens=True)\r\n\r\nTEXT = data.Field(\r\n    use_vocab=False,\r\n    batch_first=True,\r\n    pad_token=tokenizer.pad_token_id,\r\n    preprocessing=preprocessor\r\n)\r\nLABEL = data.LabelField()\r\n\r\nfields = [('text', TEXT), ('unused_col_1', None), ('unused_col_2', None), ('label', LABEL)]\r\n\r\ntrain, valid, test = datasets.SequenceTaggingDataset.splits(\r\n    path='/Users/johngiorgi/Downloads/bert_data/BC5CDR/chem',\r\n    train='train.tsv',\r\n    validation='devel.tsv',\r\n    test='test.tsv',\r\n    fields=fields\r\n)\r\n\r\ntrain_iter, valid_iter, test_iter = data.BucketIterator.splits(\r\n    (train, valid, test), batch_sizes=(16, 256, 256)\r\n)\r\n\r\nLABEL.build_vocab(train)\r\n``` \r\n\r\nI get issues when trying to access the batch\r\n\r\n```python\r\nbatch = next(iter(train_iter))\r\n\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n<ipython-input-39-9919119fad82> in <module>\r\n----> 1 batch = next(iter(train_iter))\r\n\r\n~/miniconda3/envs/ml4h/lib/python3.7/site-packages/torchtext/data/iterator.py in __iter__(self)\r\n    154                     else:\r\n    155                         minibatch.sort(key=self.sort_key, reverse=True)\r\n--> 156                 yield Batch(minibatch, self.dataset, self.device)\r\n    157             if not self.repeat:\r\n    158                 return\r\n\r\n~/miniconda3/envs/ml4h/lib/python3.7/site-packages/torchtext/data/batch.py in __init__(self, data, dataset, device)\r\n     32                 if field is not None:\r\n     33                     batch = [getattr(x, name) for x in data]\r\n---> 34                     setattr(self, name, field.process(batch, device=device))\r\n     35 \r\n     36     @classmethod\r\n\r\n~/miniconda3/envs/ml4h/lib/python3.7/site-packages/torchtext/data/field.py in process(self, batch, device)\r\n    235         \"\"\"\r\n    236         padded = self.pad(batch)\r\n--> 237         tensor = self.numericalize(padded, device=device)\r\n    238         return tensor\r\n    239 \r\n\r\n~/miniconda3/envs/ml4h/lib/python3.7/site-packages/torchtext/data/field.py in numericalize(self, arr, device)\r\n    336                 arr = [[self.vocab.stoi[x] for x in ex] for ex in arr]\r\n    337             else:\r\n--> 338                 arr = [self.vocab.stoi[x] for x in arr]\r\n    339 \r\n    340             if self.postprocessing is not None:\r\n\r\n~/miniconda3/envs/ml4h/lib/python3.7/site-packages/torchtext/data/field.py in <listcomp>(.0)\r\n    336                 arr = [[self.vocab.stoi[x] for x in ex] for ex in arr]\r\n    337             else:\r\n--> 338                 arr = [self.vocab.stoi[x] for x in arr]\r\n    339 \r\n    340             if self.postprocessing is not None:\r\n\r\nTypeError: unhashable type: 'list",
    "url": "https://github.com/pytorch/text/issues/619",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-15T14:42:09Z",
    "updated_at": "2020-02-22T03:22:23Z",
    "user": "JohnGiorgi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 27958,
    "title": "how to use libtorch library in cuda file with nvcc compiler(c++)?",
    "body": "## \u2753 Questions and Help\r\n\r\n# Motivation\r\ni want to implement nms in parallel processing with libtorch library.\r\ni use this cuda code(https://github.com/gdlg/pytorch_nms)\r\n\r\n# Environment\r\nPyTorch version : 1.2.0\r\nCUDA (nvcc compiler ) : 10.0\r\nlibtorch version : 1.2.0\r\nsystem : win10\r\n\r\n# Operation\r\nthe command :`i use nvcc -c nms_kernel.cu -L -lcudart -I D:\\Code-software\\NNF\\libtorch\\libtorch\\include -I D:\\Code-software\\NNF\\libtorch\\libtorch\\include\\torch\\csrc\\api\\include` to compiled it \r\n\r\n# ERROR\r\n`D:/Code-software/NNF/libtorch/libtorch/include\\torch/csrc/jit/argument_spec.h(181): error: member \"torch::jit::ArgumentSpecCreator::DEPTH_LIMIT\" may not be initialized 1 error detected in the compilation of \"C:/Users/Cason/AppData/Local/Temp/tmpxft_00001b28_00000000-10_nms_kernel.cpp1.ii\"`\r\n\r\nas long as i add `#include <torch/extension.h>` or `#include <torch/script.h>` in cuda files,It makes this kind of mistake.\r\n\r\n\r\n \r\n\r\n\r\n\n\ncc @yf225",
    "url": "https://github.com/pytorch/pytorch/issues/27958",
    "state": "open",
    "labels": [
      "module: cpp",
      "triaged"
    ],
    "created_at": "2019-10-15T03:35:07Z",
    "updated_at": "2020-05-08T08:30:40Z",
    "user": "CasonTsai"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 27827,
    "title": "How to hide latency on libtorch by multithreads? A problem about double stream pipelines execution.",
    "body": "Hello, I want to hide latency between data_loader and inference. I simply apply it by OpenMP with a simple double stream pipelines execution. However, the code \"auto t=model->forward({Tensor.to(kCUDA)}.toTensor()\" don't support multithreads(OpenMP). \r\n\r\nIs there any solution?\r\n\r\nMy idea is just like Fig. 6 on this website: https://software.intel.com/en-us/articles/heterogeneous-computing-pipelining ",
    "url": "https://github.com/pytorch/pytorch/issues/27827",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-14T02:50:44Z",
    "updated_at": "2019-10-14T08:20:37Z",
    "user": "xiaoLiuxiaoLiuxiaoLiu"
  },
  {
    "repo": "pytorch/examples",
    "number": 640,
    "title": "Do we still need to divide sample by ourselves when using a single GPU per process?",
    "body": "In https://github.com/pytorch/examples/blob/ee964a2eeb41e1712fe719b83645c79bcbd0ba1a/imagenet/main.py#L149, args.batch_size is manually divided by the number of processes.\r\n\r\nHowever, when I checked https://pytorch.org/docs/stable/_modules/torch/utils/data/distributed.html#DistributedSampler, I found that DistributedSampler already subsampled the batch.\r\n\r\nIs it a bug in the imagenet example, or have I missed anything?\r\n",
    "url": "https://github.com/pytorch/examples/issues/640",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-14T01:58:19Z",
    "updated_at": "2020-02-14T10:24:15Z",
    "comments": 2,
    "user": "taroxd"
  },
  {
    "repo": "pytorch/examples",
    "number": 638,
    "title": "missing indent in def train(...) in `imagenet`",
    "body": "https://github.com/pytorch/examples/blob/ee964a2eeb41e1712fe719b83645c79bcbd0ba1a/imagenet/main.py#L284\r\n\r\nIt seems a missing indent in imagenet train(...) function.\r\n\r\n`/example/imagenet/main.py`, line 282 to 284.\r\n\r\n```python\r\n        if args.gpu is not None:\r\n            images = images.cuda(args.gpu, non_blocking=True)\r\n        target = target.cuda(args.gpu, non_blocking=True)\r\n```\r\nThe default value of `args.gpu` is None.\r\nWhen `args.gpu` is not specified (default as None), `images` tensor is not moved to cuda, which is reasonable. But, why `target` tensor is still moved to cuda? Is there a missing tab indent?\r\n\r\nIn this example, the `model` is always moved to cuda, so the `outputs` is in cuda. Always moving `target` tensor to cuda can avoid causing error for the following `loss = criterion(outputs, targets)`. If this is the consideration, then why `images` tensor is kept in cpu?\r\n",
    "url": "https://github.com/pytorch/examples/issues/638",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-12T05:07:56Z",
    "updated_at": "2019-10-22T21:53:05Z",
    "comments": 1,
    "user": "HearyShen"
  },
  {
    "repo": "huggingface/transformers",
    "number": 1503,
    "title": "What is the best way to handle sequences > max_len for tasks like abstract summarization?",
    "body": "What is the best way to handle situations where a sequence in your dataset exceeds the max length defined for a model?\r\n\r\nFor example, if I'm working on an abstract summarization task with a Bert model having a `max_position_embeddings=512` and tokenizer with `max_len=512`, how should I handle documents where the tokens to evaluate exceed 512?\r\n\r\nIs there a recommended practice for this situation?\r\n\r\nThanks",
    "url": "https://github.com/huggingface/transformers/issues/1503",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2019-10-12T00:40:50Z",
    "updated_at": "2020-02-17T13:26:11Z",
    "user": "ohmeow"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 694,
    "title": " net visualization image (https://pytorch.org/tutorials/_images/mnist.png) has the wrong dimensions",
    "body": "In the tutorial: beginner_source/blitz/neural_networks_tutorial.py, \r\nThe explanation for the first linear layer dimensions is unclear: \r\nself.fc1 = nn.Linear(16 * 6 * 6, 120)  # 6*6 from image dimension \r\nThe input image dimension expected is 32 x 32. \r\nThe visualization of the net shows a dimension of 5x5 after the last max pool layer.\r\nWhere is the extra 1 x 1 coming from ?  \r\n\r\nThe layer dimensions calculation can be a hurdle for beginners, is for me anyway.\r\nIts confusing because the dimension sizes is complicatedly dependent on the input image size, which is nowhere in the initialization parameters.  \r\nThe paper linked in the docs is helpful: https://arxiv.org/pdf/1603.07285.pdf\r\n\r\nSo, after printing the dimensions before and after each step in the net, i see that the net visualization image (https://pytorch.org/tutorials/_images/mnist.png) has the wrong dimensions listed.  The actual sizes after each step in the net are: \r\ntorch.Size([1, 1, 32, 32])  # input size \r\ntorch.Size([1, 6, 30, 30]) # after conv1\r\ntorch.Size([1, 6, 30, 30]) # after relu1\r\ntorch.Size([1, 6, 15, 15]) # after maxpool1\r\ntorch.Size([1, 16, 13, 13]) # after conv2  \r\ntorch.Size([1, 16, 13, 13]) # after relu2\r\ntorch.Size([1, 16, 6, 6]) # after maxpool2\r\ntorch.Size([1, 576]) # after flattening\r\ntorch.Size([1, 120]) # after fully connected layer 1\r\ntorch.Size([1, 84]) # after fully connected layer 2 \r\ntorch.Size([1, 10]) # after fully connected layer 3",
    "url": "https://github.com/pytorch/tutorials/issues/694",
    "state": "closed",
    "labels": [],
    "created_at": "2019-10-11T15:30:46Z",
    "updated_at": "2021-04-26T20:14:34Z",
    "comments": 1,
    "user": "tinku99"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 27479,
    "title": "[JIT] Figure out how to easily investigate memory usage issues issues",
    "body": "e.g. https://github.com/pytorch/pytorch/issues/25267\r\n And other internal reports\n\ncc @suo",
    "url": "https://github.com/pytorch/pytorch/issues/27479",
    "state": "open",
    "labels": [
      "oncall: jit",
      "triaged"
    ],
    "created_at": "2019-10-07T18:24:08Z",
    "updated_at": "2020-02-28T18:54:51Z",
    "user": "jamesr66a"
  },
  {
    "repo": "pytorch/vision",
    "number": 1395,
    "title": "How to Crop single image before calling torchvision.utils.save_image, If I am using PIL lib Image.crop(....) method then image quality degrade.",
    "body": "\r\n     vutils.save_image(fixed_fake.data,outputpath , normalize=True)\r\n    print(\"output path\",outputpath)\r\n    img = Image.open(outputpath)\r\n    noOfRow = 5\r\n    noOfColumn = 8\r\n    x1 = 2\r\n    y1 = 2\r\n    x2 = 130\r\n    y2 = 130\r\n    folder = file_batch\r\n\r\n    for i in range(0, noOfColumn):\r\n        dest_dir = file_batch[i].split(\"/\")[7]\r\n        if not os.path.exists(outf+\"/\"+dest_dir):\r\n            os.mkdir(outf+\"/\"+dest_dir)\r\n        for j in range(1, noOfRow + 1):\r\n            area = (x1, y1, x2, y2)\r\n            cropped_img = img.crop(area)\r\n            imgName = \"{}{}\".format(i, j)\r\n            cropped_img.save(os.path.join(outf+dest_dir,filename))\r\n            y1 = y1 + 130\r\n            y2 = y2 + 130\r\n        x1 = x1 + 130\r\n        x2 = x2 + 130\r\n       y1 = 2\r\n        y2 = 130",
    "url": "https://github.com/pytorch/vision/issues/1395",
    "state": "open",
    "labels": [
      "module: utils"
    ],
    "created_at": "2019-09-30T20:35:12Z",
    "updated_at": "2021-02-21T15:56:52Z",
    "user": "praveenkumarchandaliya"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 27070,
    "title": "How to share a submodule but not copying its parameters in the computing graph?",
    "body": "Hi,\r\n\r\nI am trying to feed a list of input images to a model that incorporates a number of the same submodule. The model is like following:\r\n\r\n```\r\nclass SubModule(nn.Module):\r\n\tdef __init__(self):\r\n\t\tsuper(SubModule, self).__init__()\r\n\t\tself.embedding = nn.Linear(1000,20)\r\n\r\n\tdef forward(self, input):\r\n\t\treturn self.embedding(input)\r\n\r\nclass Model(nn.Module):\r\n\tdef __init__(self, subnet, n):\r\n\t\tsuper(Model, self).__init__()\r\n\t\tself.subnet = subnet\r\n\t\tself.fc = nn.Linear(n*20, 2)\r\n\t\tself.n = n\r\n\r\n\tdef forward(self, x_list):\r\n\t\t# x_list is a list of n input images\r\n\t\tout = []\r\n\t\tfor i in range(self.n):\r\n\t\t\th = self.subnet(x_list[i]) # h: shape[batch_size, feature_length(20)]\r\n\t\t\tout.append(h.unsqueeze_(1))\r\n\r\n\t\tout = torch.cat(out, dim=1) #out: shape[batch_size, n, feature_length(20)]\r\n\t\tout = out.view(out.shape[0], -1)\r\n\t\tout = self.fc(out)\r\n\t\treturn out\r\n\r\nsubnet = SubModule()\r\nm = Model(subnet, 12)\r\n```\r\n\r\nBoth \"subnet\" and \"m\" will be trained by back propagation at some point. I found that \"m\" actually creates n copies of \"subnet\". I want the parameters of \"subnet\" to be shared during training; i.e. every input image is fed through the same submodule. However, I don't want to create a computing graph forwarding multiple submodules at the same time, especially when n is large. Is there anyway to do so? Is there something similar to how RNN's are handled in pytorch for my case?",
    "url": "https://github.com/pytorch/pytorch/issues/27070",
    "state": "closed",
    "labels": [],
    "created_at": "2019-09-30T16:02:24Z",
    "updated_at": "2020-03-19T06:06:45Z",
    "user": "ukaneverin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 27033,
    "title": "How to increase numerical accuracy of Pytorch model?",
    "body": "I write this sentence in my script\r\n\r\n`print(self.netG(self.real_A)-self.netG(self.real_A))\r\n`\r\nI think I can get a all zero tensor but no.\r\n\r\n```\r\ntensor([[ [[-0.0032,  0.0089, -0.0085,  ..., -0.0027,  0.0004, -0.0022],\r\n          [-0.0019, -0.0022,  0.0775,  ...,  0.0236, -0.0277, -0.0125],\r\n          [ 0.0049,  0.0159,  0.0203,  ..., -0.0212,  0.0010, -0.0069],\r\n          ...,\r\n          [ 0.0042,  0.0081, -0.0127,  ..., -0.0097,  0.0136, -0.0002],\r\n          [-0.0010,  0.0020, -0.0066,  ...,  0.0260,  0.0433,  0.0088],\r\n          [-0.0023,  0.0095,  0.0125,  ...,  0.0005,  0.0090,  0.0029]]]],\r\n       device='cuda:0', grad_fn=<SubBackward0>)\r\n```",
    "url": "https://github.com/pytorch/pytorch/issues/27033",
    "state": "closed",
    "labels": [],
    "created_at": "2019-09-29T13:11:06Z",
    "updated_at": "2019-10-02T12:56:36Z",
    "user": "gentlezr"
  },
  {
    "repo": "pytorch/vision",
    "number": 1384,
    "title": "How to test my trained model on my data set",
    "body": "",
    "url": "https://github.com/pytorch/vision/issues/1384",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2019-09-29T09:52:21Z",
    "updated_at": "2019-09-30T12:35:10Z",
    "user": "PL-96"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 26880,
    "title": "in TracedModel how to get model parameter like convolution stride info.",
    "body": "## \u2753 Questions and Help\r\n\r\nI use traced_model._modules[\u2018conv1\u2019] to access conv module.\r\nBut how can I find \u2018stride\u2019 info in tracedModel object?\r\nIs there any document to describe tracedModel API and structure?\r\n\r\nThanks,\r\n8086",
    "url": "https://github.com/pytorch/pytorch/issues/26880",
    "state": "closed",
    "labels": [],
    "created_at": "2019-09-26T08:31:45Z",
    "updated_at": "2019-09-26T20:34:53Z",
    "user": "joe8086"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 26803,
    "title": "install pytorch1.2  where the environment is cuda9.0?",
    "body": "Can you tell me how to install pytorch1.2  in the environment is cuda9.0?\r\nI don't have the root power, so can't upgrade cuda.",
    "url": "https://github.com/pytorch/pytorch/issues/26803",
    "state": "closed",
    "labels": [
      "module: build",
      "triaged"
    ],
    "created_at": "2019-09-25T14:29:19Z",
    "updated_at": "2019-09-25T22:17:47Z",
    "user": "zyxdSTU"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 26717,
    "title": "How to use RandomSampler?",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\nclass RandomSampler in torch/utils/data/sampler.py\r\n\r\ndef __iter__(self):\r\n        n = len(self.data_source)\r\n        if self.replacement:\r\n            return iter(torch.randint(high=n, size=(self.num_samples,), dtype=torch.int64).tolist())\r\n        return iter(torch.randperm(n).tolist())\r\n\r\n\r\nproblem:\r\n`return iter(torch.randperm(n).tolist())`\r\n\r\n\r\nIf you want to get a random int number in [0,n) when `__iter__(self)` is called, you only need to use `random.randint(0, n-1)`.  This code `return iter(torch.randperm(n).tolist())` uses much resource but only generates a random number when called.\r\n\r\n\r\nI think in this function you want to generate a list like `torch.randperm(n)` and return the next number when called. Furthermore, we should shuffle the list again when we reach the end of the list. To implement this idea, we can modify the code like this:\r\n- add\r\n`self.iter = iter(torch.randperm(len(self.data_source)).tolist())` in `__init__(self, ...)`\r\n- add\r\n`def __next__(self):`\r\n`try:`\r\n`return next(self.iter)`\r\n`except StopIteration:`\r\n`self.iter = iter(torch.randperm(len(self.data_source)).tolist())`\r\n`return next(self.iter)`\r\n- add\r\n`return self` in  `__iter__(self)`",
    "url": "https://github.com/pytorch/pytorch/issues/26717",
    "state": "closed",
    "labels": [],
    "created_at": "2019-09-24T15:13:42Z",
    "updated_at": "2019-09-24T15:31:55Z",
    "user": "sp2823"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 26707,
    "title": "How to build pytorch for android",
    "body": "## \u2753 How to build pytorch for android\r\n\r\nwhen i run  this command,\r\n```\r\nexport ANDROID_NDK=~/android-ndk-r20\r\nset USE_NCCL=OFF\r\nset USE_CUDA=OFF\r\nbash scripts/build_android.sh \r\n```\r\ni got follow errors\r\n``` \r\n@ error/constitute.c/WriteImage/1028.\r\n' @ error/constitute.c/WriteImage/1028.\r\n: not foundL/ly/software/pytorch/pytorch/cmake/../aten/src/ATen/gen.py: 3: /media/zw/DL/ly/software/pytorch/pytorch/cmake/../aten/src/ATen/gen.py: \r\n' @ error/constitute.c/WriteImage/1028.\r\nfrom: can't read /var/mail/collections\r\n```\r\nMy env:\r\n- pytorch-1.1.0\r\n- cmake-3.15.1\r\n- android-ndk-r20\r\n \r\n",
    "url": "https://github.com/pytorch/pytorch/issues/26707",
    "state": "closed",
    "labels": [
      "module: build",
      "triaged",
      "oncall: mobile"
    ],
    "created_at": "2019-09-24T03:02:44Z",
    "updated_at": "2019-09-24T15:09:23Z",
    "user": "blackxer"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 203,
    "title": "training new language(French)",
    "body": "How can I get data like the English forme (there is any tool to do that) ?",
    "url": "https://github.com/huggingface/neuralcoref/issues/203",
    "state": "closed",
    "labels": [
      "question",
      "training"
    ],
    "created_at": "2019-09-23T13:16:42Z",
    "updated_at": "2019-10-14T07:48:00Z",
    "user": "Berrougui"
  },
  {
    "repo": "pytorch/extension-cpp",
    "number": 44,
    "title": "How to write cuda code of the multilayer units",
    "body": "This tutorials helped me to write a single layer unit with CUDA code.\r\nBut how to write CUDA code of the multilayer units, like torch/nn/_functions/rnn.py 281?\r\n ```\r\noutput, hy, cy, reserve, new_weight_buf = torch._cudnn_rnn(\r\n            input, weight_arr, weight_stride0,\r\n            flat_weight,\r\n            hx, cx,\r\n            mode, hidden_size, num_layers,\r\n            batch_first, dropout, train, bool(bidirectional),\r\n            list(batch_sizes.data) if variable_length else (),\r\n            dropout_ts)\r\n```\r\nI have achieved the same results by using the template of AutogradRNN, i.e., torch/nn/_functions/rnn.py 212.\r\n```\r\ndef AutogradRNN(mode, input_size, hidden_size, num_layers=1, batch_first=False,\r\n                dropout=0, train=True, bidirectional=False, variable_length=False,\r\n                dropout_state=None, flat_weight=None):\r\n```\r\nBut gpu utilization was too low and speed was too slow. Perhaps because each single layer unit is called individually, which involve launch of a CUDA kernel. So I want to rewrite multilayer units in CUDA and fuse particular groups of single layer. Can you provide a boilerplate?",
    "url": "https://github.com/pytorch/extension-cpp/issues/44",
    "state": "open",
    "labels": [],
    "created_at": "2019-09-23T03:37:04Z",
    "updated_at": "2019-09-24T14:54:37Z",
    "user": "haoyz"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 26630,
    "title": "How to script a model using c++ extension? I met this error",
    "body": "## \u2753 How to script a model using c++ extension? I met this error\r\n```\r\nRuntimeError: \r\nCould not export Python function call '_DCNv2'. Remove calls to Python functions before export. Did you forget add @script or @script_method annotation? If this is a nn.ModuleList\r\n```\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/26630",
    "state": "closed",
    "labels": [],
    "created_at": "2019-09-22T11:30:34Z",
    "updated_at": "2019-09-24T14:42:22Z",
    "user": "yinnhao"
  },
  {
    "repo": "huggingface/transformers",
    "number": 1299,
    "title": "What is the best CPU inference acceleration solution for BERT now?",
    "body": "Thank you very much.\r\nThank you very much.\r\nThank you very much.",
    "url": "https://github.com/huggingface/transformers/issues/1299",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2019-09-20T02:50:55Z",
    "updated_at": "2019-11-20T01:42:25Z",
    "user": "guotong1988"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 26392,
    "title": "How to print out the name and value of parameters in module?",
    "body": "torch::jit::script::Module module = torch::jit::load(model_path);\r\nHow to print out the name and value of parameters in module?",
    "url": "https://github.com/pytorch/pytorch/issues/26392",
    "state": "closed",
    "labels": [],
    "created_at": "2019-09-18T03:13:03Z",
    "updated_at": "2019-09-18T16:15:05Z",
    "user": "boyob"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 26344,
    "title": "How to get rid of zombie processes using torch.multiprocessing.Pool?",
    "body": "I am using torch.multiprocessing.Pool to speed up my NN in inference, like this:\r\n\r\n    import torch.multiprocessing as mp\r\n    mp = mp.get_context('forkserver')\r\n\r\n    def parallel_predict(predict_func, sequences, args):\r\n        predicted_cluster_ids = []\r\n        pool = mp.Pool(args.num_workers, maxtasksperchild=1)\r\n        out = pool.imap(\r\n            func=functools.partial(predict_func, args=args),\r\n            iterable=sequences,\r\n            chunksize=1)\r\n        for item in tqdm(out, total=len(sequences), ncols=85):\r\n           predicted_cluster_ids.append(item)\r\n       pool.close()\r\n       pool.terminate()\r\n       pool.join()\r\n       return predicted_cluster_ids\r\n\r\nNote 1) I am using `imap` because I want to be able to show a progress bar with tqdm.\r\nNote 2) I tried with both `forkserver` and spawn but no luck. I cannot use other methods because of how they interact (poorly) with CUDA.\r\nNote 3) I am using `maxtasksperchild=1` and `chunksize=1` so for each sequence in sequences it spawns a new process.\r\nNote 4) Adding or removing `pool.terminate()` and `pool.join()` makes no difference.\r\nNote 5) `predict_func` is a method of a class I created. I could also pass the whole model to `parallel_predict` but it does not change anything.\r\n\r\nEverything works fine except the fact that after a while I run out of memory on the CPU (while on the GPU everything works as expected). Using `htop` to monitor memory usage I notice that, for every process I spawn with pool I get a zombie that uses 0.4% of the memory. They don't get cleared, so they keep using space. Still, `parallel_predict` does return the correct result and the computation goes on. My script is structured in a way that id does validation multiple times so next time `parallel_predict` is called the zombies add up.\r\n\r\nThis is what I get in `htop`: \r\n![Screenshot from 2019-09-17 11-46-21](https://user-images.githubusercontent.com/19649581/65039556-cfe5cb80-d952-11e9-80e7-102e455f3874.png)\r\n\r\nUsually, these zombies get cleared after ctrl-c but in some rare cases I need to killall.\r\n\r\nIs there some way I can force the`Pool` to close them?\r\n\r\nUPDATE:\r\nI tried to kill the zombies using this:\r\n\r\n    def kill(pool):\r\n        import multiprocessing\r\n        import signal\r\n        # stop repopulating new child\r\n        pool._state = multiprocessing.pool.TERMINATE\r\n        pool._worker_handler._state = multiprocessing.pool.TERMINATE\r\n        for p in pool._pool:\r\n            os.kill(p.pid, signal.SIGKILL)\r\n        # .is_alive() will reap dead process\r\n        while any(p.is_alive() for p in pool._pool):\r\n            pass\r\n        pool.terminate()\r\n\r\nBut it does not work. It hangs in `pool.terminate()`\r\n\r\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen",
    "url": "https://github.com/pytorch/pytorch/issues/26344",
    "state": "open",
    "labels": [
      "module: dependency bug",
      "oncall: distributed",
      "module: multiprocessing",
      "triaged"
    ],
    "created_at": "2019-09-17T11:55:41Z",
    "updated_at": "2019-11-14T00:08:11Z",
    "user": "DonkeyShot21"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 25990,
    "title": "How to reproduce a Cross Entropy Loss without losing numerical accuracy?",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\nI get a discrepancy between the values of the losses obtained by the torch. CrossEntropyLoss and CustomeCrossEntropyLoss.\r\n\r\n## To Reproduce\r\n\r\n\r\n\r\n    import torch\r\n    import torch.nn.modules.loss as L  \r\n\r\n    class CustomCrossEntropyLoss(L._Loss):\r\n        def __init__(self, reduction=True):\r\n            super(CustomCrossEntropyLoss, self).__init__()\r\n            self.reduction = reduction\r\n    \r\n         def forward(self, inp, target):\r\n             input_target = inp.gather(1, target.view(-1, 1))\r\n             input_max, _ = inp.max(dim=1, keepdim=True)\r\n             output_exp = torch.exp(inp - input_max)\r\n             output_softmax_sum = output_exp.sum(dim=1)\r\n             output = -input_target + torch.log(output_softmax_sum).view(-1, 1) + input_max\r\n             if self.reduction:\r\n                 output = output.mean()\r\n             return output\r\n\r\n     torch_ce = torch.nn.CrossEntropyLoss(reduction='none')\r\n     custom_ce = CustomCrossEntropyLoss(reduction=False)\r\n     batch_size = 128\r\n     N_class = 90000\r\n     logits = torch.randn((batch_size,N_class))\r\n     targets = torch.randint(N_class, (batch_size,))\r\n     print((torch_ce(logits, targets).view(-1) - custom_ce(logits,targets).view(-1)).mean())\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\n\r\nI get a minimal non-zero discrepancy of the order of 10e-7, which then occurs in gradients and can affect the learning outcome.\r\nHow to fix this problem?\r\n\r\n## Environment\r\n\r\n       Collecting environment information...\r\n\tPyTorch version: 1.2.0\r\n\tIs debug build: No\r\n\tCUDA used to build PyTorch: 10.0.130\r\n\r\n\tOS: CentOS Linux 7 (Core)\r\n\tGCC version: (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)\r\n\tCMake version: version 2.8.12.2\r\n\r\n\tPython version: 3.7\r\n\tIs CUDA available: Yes\r\n\tCUDA runtime version: Could not collect\r\n\r\n\tNvidia driver version: 430.14\r\n\tcuDNN version: Could not collect\r\n\r\n\tVersions of relevant libraries:\r\n\t[pip3] numpy==1.15.4\r\n\t[pip3] tensorboard-pytorch==0.7.1\r\n\t[pip3] torch==1.0.0\r\n\t[pip3] torchvision==0.2.1\r\n\t[conda] blas                      1.0                   mkl.conda\r\n\t[conda] mkl                       2019.4                243.conda\r\n\t[conda] mkl-service               2.0.2           py37h7b6447c_0.conda\r\n\t[conda] mkl_fft                   1.0.12          py37ha843d7b_0.conda\r\n\t[conda] mkl_random                1.0.2           py37hd81dba3_0.conda\r\n\t[conda] pytorch                   1.2.0           py3.7_cuda10.0.130_cudnn7.6.2_0    pytorch\r\n\t[conda] torchvision               0.4.0                py37_cu100    pytorch\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/25990",
    "state": "closed",
    "labels": [],
    "created_at": "2019-09-11T10:45:29Z",
    "updated_at": "2019-09-11T19:51:51Z",
    "user": "tamerlansb"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 25910,
    "title": "How to use batch norm when there has padding?",
    "body": "I am doing a NLP task and input various-length sentences into model, so I add some padding to keep every sentence to the longest length in one batch. However, padding length can affect batch norm obviously. And I cannot find a module with a parameter of mask? Can you help me ?",
    "url": "https://github.com/pytorch/pytorch/issues/25910",
    "state": "closed",
    "labels": [],
    "created_at": "2019-09-10T12:22:13Z",
    "updated_at": "2019-09-10T16:19:48Z",
    "user": "RichardHWD"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 25766,
    "title": "how to get cube-root of a negative?",
    "body": "hello, I want to know how to get cube-root of a negative\uff1f\r\nfor example (-8)^(1/3) = -2\r\nhowever, torch.pow(-8, 1/3) get Nan.",
    "url": "https://github.com/pytorch/pytorch/issues/25766",
    "state": "closed",
    "labels": [],
    "created_at": "2019-09-06T13:33:15Z",
    "updated_at": "2021-06-18T15:26:46Z",
    "user": "qianlinjun"
  },
  {
    "repo": "pytorch/examples",
    "number": 628,
    "title": "No data on lo interface for a single node training",
    "body": "Hi, I ran the single node training and it ran normally. I want to monitor the bandwidth of the process in one single machine. I used `iptraf-ng` on CentOS 7. I selected the `lo` interface. But it showed nothing. The IP I used is `127.0.0.1`. Is there something wrong?\r\n\r\nThanks",
    "url": "https://github.com/pytorch/examples/issues/628",
    "state": "open",
    "labels": [
      "triaged"
    ],
    "created_at": "2019-09-06T12:28:10Z",
    "updated_at": "2022-03-09T23:48:11Z",
    "comments": 0,
    "user": "ElegantLin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 25699,
    "title": "PyTorch C++ API as a static lib: how to compile ?",
    "body": "## \u2753 Questions and Help\r\n\r\nthis questions is linked to the bug described in the issue https://github.com/pytorch/pytorch/issues/25698\r\n\r\nI'd like to have instructions on how to compile PyTorch C++ API (libtorch project) as a statical library to link with my C++ projects :\r\n\r\n- for Linux, Windows and MacOS\r\n- with the last Intel compilers if possible\r\n- mode with and witout GPU support (CPU vs GPU),  with the last drivers and controling GPU cart 'compute capabilities' support, to be able to execute the code on old Kepler cards\r\n- debug and release (advanced optimization and vectorization) modes\r\n\r\nthanks for your help and assistance !",
    "url": "https://github.com/pytorch/pytorch/issues/25699",
    "state": "closed",
    "labels": [],
    "created_at": "2019-09-05T10:30:33Z",
    "updated_at": "2025-07-02T12:59:59Z",
    "user": "VitaMusic"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 25572,
    "title": "How to change dynamic model to onnx?",
    "body": "## \ud83d\udcda Documentation\r\nI want to change [Extremenet](https://github.com/xingyizhou/ExtremeNet) to onnx, which programmed a dynamic model, I searched \r\n1 https://pytorch.org/docs/stable/onnx.html#tracing-vs-scripting\r\n2 https://github.com/onnx/tutorials\r\nIt seems not told how to change a dynamic pytorch model to onnx\uff0c where is the example of change dynamic model to onnx?\r\nbelow is core dynamic code patch:\r\n\r\n    class exkp(nn.Module):\r\n    def __init__(\r\n        self, n, nstack, dims, modules, out_dim, pre=None, cnv_dim=256, \r\n        make_tl_layer=None, make_br_layer=None,\r\n        make_cnv_layer=make_cnv_layer, make_heat_layer=make_kp_layer,\r\n        make_tag_layer=make_kp_layer, make_regr_layer=make_kp_layer,\r\n        make_up_layer=make_layer, make_low_layer=make_layer, \r\n        make_hg_layer=make_layer, make_hg_layer_revr=make_layer_revr,\r\n        make_pool_layer=make_pool_layer, make_unpool_layer=make_unpool_layer,\r\n        make_merge_layer=make_merge_layer, make_inter_layer=make_inter_layer, \r\n        kp_layer=residual\r\n    ):\r\n        super(exkp, self).__init__()\r\n        self.nstack    = nstack\r\n        self._decode   = _exct_decode\r\n\r\n        curr_dim = dims[0]\r\n\r\n        self.pre = nn.Sequential(\r\n            convolution(7, 3, 128, stride=2),\r\n            residual(3, 128, 256, stride=2)\r\n        ) if pre is None else pre\r\n\r\n        self.kps  = nn.ModuleList([\r\n            kp_module(\r\n                n, dims, modules, layer=kp_layer,\r\n                make_up_layer=make_up_layer,\r\n                make_low_layer=make_low_layer,\r\n                make_hg_layer=make_hg_layer,\r\n                make_hg_layer_revr=make_hg_layer_revr,\r\n                make_pool_layer=make_pool_layer,\r\n                make_unpool_layer=make_unpool_layer,\r\n                make_merge_layer=make_merge_layer\r\n            ) for _ in range(nstack)\r\n        ])\r\n        self.cnvs = nn.ModuleList([\r\n            make_cnv_layer(curr_dim, cnv_dim) for _ in range(nstack)\r\n        ])\r\n\r\n        ## keypoint heatmaps\r\n        self.t_heats = nn.ModuleList([\r\n            make_heat_layer(cnv_dim, curr_dim, out_dim) for _ in range(nstack)\r\n        ])\r\n\r\n        self.l_heats = nn.ModuleList([\r\n            make_heat_layer(cnv_dim, curr_dim, out_dim) for _ in range(nstack)\r\n        ])\r\n\r\n        self.b_heats = nn.ModuleList([\r\n            make_heat_layer(cnv_dim, curr_dim, out_dim) for _ in range(nstack)\r\n        ])\r\n\r\n        self.r_heats = nn.ModuleList([\r\n            make_heat_layer(cnv_dim, curr_dim, out_dim) for _ in range(nstack)\r\n        ])\r\n\r\n        self.ct_heats = nn.ModuleList([\r\n            make_heat_layer(cnv_dim, curr_dim, out_dim) for _ in range(nstack)\r\n        ])\r\n\r\n        for t_heat, l_heat, b_heat, r_heat, ct_heat in \\\r\n          zip(self.t_heats, self.l_heats, self.b_heats, \\\r\n              self.r_heats, self.ct_heats):\r\n            t_heat[-1].bias.data.fill_(-2.19)\r\n            l_heat[-1].bias.data.fill_(-2.19)\r\n            b_heat[-1].bias.data.fill_(-2.19)\r\n            r_heat[-1].bias.data.fill_(-2.19)\r\n            ct_heat[-1].bias.data.fill_(-2.19)\r\n\r\n        self.inters = nn.ModuleList([\r\n            make_inter_layer(curr_dim) for _ in range(nstack - 1)\r\n        ])\r\n\r\n        self.inters_ = nn.ModuleList([\r\n            nn.Sequential(\r\n                nn.Conv2d(curr_dim, curr_dim, (1, 1), bias=False),\r\n                nn.BatchNorm2d(curr_dim)\r\n            ) for _ in range(nstack - 1)\r\n        ])\r\n        self.cnvs_   = nn.ModuleList([\r\n            nn.Sequential(\r\n                nn.Conv2d(cnv_dim, curr_dim, (1, 1), bias=False),\r\n                nn.BatchNorm2d(curr_dim)\r\n            ) for _ in range(nstack - 1)\r\n        ])\r\n\r\n        self.t_regrs = nn.ModuleList([\r\n            make_regr_layer(cnv_dim, curr_dim, 2) for _ in range(nstack)\r\n        ])\r\n        self.l_regrs = nn.ModuleList([\r\n            make_regr_layer(cnv_dim, curr_dim, 2) for _ in range(nstack)\r\n        ])\r\n        self.b_regrs = nn.ModuleList([\r\n            make_regr_layer(cnv_dim, curr_dim, 2) for _ in range(nstack)\r\n        ])\r\n        self.r_regrs = nn.ModuleList([\r\n            make_regr_layer(cnv_dim, curr_dim, 2) for _ in range(nstack)\r\n        ])\r\n\r\n        self.relu = nn.ReLU(inplace=True)\r\n\r\n    def _train(self, *xs):\r\n        image  = xs[0]\r\n        t_inds = xs[1]\r\n        l_inds = xs[2]\r\n        b_inds = xs[3]\r\n        r_inds = xs[4]\r\n\r\n        inter = self.pre(image)\r\n        outs  = []\r\n\r\n        layers = zip(\r\n            self.kps, self.cnvs,\r\n            self.t_heats, self.l_heats, self.b_heats, self.r_heats,\r\n            self.ct_heats,\r\n            self.t_regrs, self.l_regrs, self.b_regrs, self.r_regrs,\r\n        )\r\n        for ind, layer in enumerate(layers):\r\n            kp_, cnv_          = layer[0:2]\r\n            t_heat_, l_heat_, b_heat_, r_heat_ = layer[2:6]\r\n            ct_heat_                           = layer[6]\r\n            t_regr_, l_regr_, b_regr_, r_regr_ = layer[7:11]\r\n\r\n            kp  = kp_(inter)\r\n            cnv = cnv_(kp)\r\n\r\n  ",
    "url": "https://github.com/pytorch/pytorch/issues/25572",
    "state": "closed",
    "labels": [
      "module: onnx"
    ],
    "created_at": "2019-09-03T05:27:41Z",
    "updated_at": "2019-09-03T14:17:53Z",
    "user": "qingzhouzhen"
  },
  {
    "repo": "huggingface/transformers",
    "number": 1150,
    "title": "What is the relationship between `run_lm_finetuning.py` and the scripts in `lm_finetuning`?",
    "body": "## \u2753 Questions & Help\r\n\r\nIt looks like there are now two scripts for running LM fine-tuning. While `run_lm_finetuning` seems to be newer, the documentation in `lm_finetuning` seems to indicate that there is more subtlety to generating the right data for performing LM fine-tuning in the BERT format. Does the new script take this into account?\r\n\r\nSorry if I'm missing something obvious!",
    "url": "https://github.com/huggingface/transformers/issues/1150",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2019-08-29T18:15:45Z",
    "updated_at": "2019-12-30T15:04:14Z",
    "user": "zphang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 25383,
    "title": "In  torch::jit::script::Module module = torch::jit::load(\"xxx.pt\"), How to release module?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\n\ncc @suo",
    "url": "https://github.com/pytorch/pytorch/issues/25383",
    "state": "closed",
    "labels": [
      "oncall: jit",
      "triaged"
    ],
    "created_at": "2019-08-29T09:16:14Z",
    "updated_at": "2019-12-12T19:40:20Z",
    "user": "pxEkin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 25294,
    "title": "What is the purpose of fp16 training? faster training? or better accuracy?",
    "body": "I think for fp16 inference, just train a model on FP32 and then just model.half() will work.\r\nBut this forceful type casting would lead worse accuracy.\r\n\r\nI'm not sure which is better between \r\n1. FP32 training then model.half() -> fp16 inference VS \r\n2. FP16 training using apex then inference FP16 with the same setting.\r\n\r\nif 1 and 2 has not that big accuracy gap, case 1 would be used just for faster/memory efficent training?\r\n\r\nPlease give me any hint. \r\n\r\nThank you.\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/25294",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-28T06:12:01Z",
    "updated_at": "2019-09-18T02:06:39Z",
    "user": "dedoogong"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 25284,
    "title": "How to preserve backward grad_fn after distributed 'all_gather' operations",
    "body": "I am trying to implement model parallelism in a distributed data parallel setting.\r\n\r\nLet\u2019s say I have a tensor output in each process and a number of operations have been performed on it (in each process independently). The tensor has a .grad_fn attached to it. Now I want to perform an all_gather to create a list [tensor_1, tensor_2...tensor_n]. But all the tensors in the list will lose the grad_fn property. \r\n\r\nMy expectation is to be able to backward() using concated tensor list in each process i through tensor_i.\n\ncc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera",
    "url": "https://github.com/pytorch/pytorch/issues/25284",
    "state": "closed",
    "labels": [
      "oncall: distributed"
    ],
    "created_at": "2019-08-28T02:00:49Z",
    "updated_at": "2019-08-28T10:13:50Z",
    "user": "JoyHuYY1412"
  },
  {
    "repo": "pytorch/examples",
    "number": 624,
    "title": "How to get  Class Activation Map (CAM) in c++ front end ?",
    "body": "Hi everyone , \r\n\r\nI saw many example of visualizing  CAM with python using  \"register_backward_hook\" but can't find any way to do the same in C++ frontend. \r\n\r\nIs there away to visualize Conv layers in c++ frontend ?\r\n\r\nThank you in advance. ",
    "url": "https://github.com/pytorch/examples/issues/624",
    "state": "open",
    "labels": [
      "c++"
    ],
    "created_at": "2019-08-28T00:52:19Z",
    "updated_at": "2022-03-09T23:48:32Z",
    "user": "zirid"
  },
  {
    "repo": "pytorch/xla",
    "number": 961,
    "title": "[Question] how to track TPU memory usage",
    "body": "How can I access TPU (internal) memory utilization? \r\n\r\nThanks!",
    "url": "https://github.com/pytorch/xla/issues/961",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2019-08-27T20:10:59Z",
    "updated_at": "2019-10-30T16:50:52Z",
    "user": "nosound2"
  },
  {
    "repo": "pytorch/examples",
    "number": 622,
    "title": "how to train MnasNet? I use the main.py to train MnasNet, but get the worse result. It is just 60.7%, while it should be 73% as you say in Mnasnet.py",
    "body": "",
    "url": "https://github.com/pytorch/examples/issues/622",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-27T14:25:29Z",
    "updated_at": "2019-09-06T18:12:16Z",
    "user": "xufana7"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 25247,
    "title": "where is the link to this NOTE?",
    "body": "## \ud83d\udcda Documentation\r\n\r\n<!-- A clear and concise description of what content in https://pytorch.org/docs is an issue. If this has to do with the general https://pytorch.org website, please file an issue at https://github.com/pytorch/pytorch.github.io/issues/new/choose instead. If this has to do with https://pytorch.org/tutorials, please file an issue at https://github.com/pytorch/tutorials/issues/new -->\r\n\r\n```\r\n# No `def __len__(self)` default?\r\n# See NOTE [ Lack of Default `__len__` in Python Abstract Base Classes ]\r\n```",
    "url": "https://github.com/pytorch/pytorch/issues/25247",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-27T13:14:09Z",
    "updated_at": "2024-02-27T05:02:26Z",
    "user": "vainaixr"
  },
  {
    "repo": "pytorch/examples",
    "number": 621,
    "title": "RuntimeError: CUDA out of memory. Tried to allocate 26.00 MiB .................",
    "body": "RuntimeError: CUDA out of memory. Tried to allocate 26.00 MiB (GPU 0; 1024.00 MiB total capacity; 435.61 MiB already allocated; 24.17 MiB free; 26.39 MiB cached)\r\nI have tried to set the batch-size as 16 or 32, but it didn't work. Would you please tell me how to solve this problem?",
    "url": "https://github.com/pytorch/examples/issues/621",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-27T12:38:17Z",
    "updated_at": "2022-03-09T23:46:25Z",
    "comments": 4,
    "user": "qiahui"
  },
  {
    "repo": "pytorch/examples",
    "number": 620,
    "title": "Can I use async in ImageNet",
    "body": "Does the example of ImageNet support async? If not, how can I add this? Are there some suggestions?\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/examples/issues/620",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-27T02:38:13Z",
    "updated_at": "2019-09-23T00:13:17Z",
    "comments": 2,
    "user": "ElegantLin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 25180,
    "title": "How to filter with a transfer function in Pytorch??",
    "body": "Hi,\r\n\r\nI am trying to implement a 1D convolution operation with `F.conv1d`. The current usage of this function is to provide the weights of the filter directly in the time domain. However, for some DSP purposes, it is more effective to apply the filtering process in terms of the transfer function of the filter. In other words, to provide the coefficients of numerator and denominator of the transfer function and the function applies the filtering process accordingly. \r\n\r\nThis is already provided in [scipy](https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.lfilter.html) as well as [Matlab](https://www.mathworks.com/help/matlab/ref/filter.html). \r\n\r\nI think it is possible to do the same with Pytorch, but I am still struggling to grasp all the details to achieve this .. could you please give any tips?\r\n\r\nMany thanks in advance\r\nBest",
    "url": "https://github.com/pytorch/pytorch/issues/25180",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-26T15:22:31Z",
    "updated_at": "2019-08-26T15:42:02Z",
    "user": "ahmed-fau"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 25003,
    "title": "How to use manually installed third_party libraries, instead of recursive third_party?",
    "body": "Some of the packages **have been manually installed** on the system. How to build **everything** based on existing packages, instead of the **recursively checked out** third_party libraries?\r\n\r\nFor instance: **pybind11** ???",
    "url": "https://github.com/pytorch/pytorch/issues/25003",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-22T00:39:11Z",
    "updated_at": "2019-08-22T15:28:57Z",
    "user": "jiapei100"
  },
  {
    "repo": "pytorch/xla",
    "number": 943,
    "title": "[Looking for suggestions] How to start looking at xla code?",
    "body": "not really an issue, it's just I met so many random errors from stack-trace-back or other source which I barely understand, and the model training is quite slow and I cannot spot which tensors got various shape at different training and are re-allocated to cpu, so I'm thinking if looking into the `csrc` would help. Yet not quite sure if I wanna find out the reason of the slow training where shall I get started with? thanks so much!",
    "url": "https://github.com/pytorch/xla/issues/943",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-19T14:58:08Z",
    "updated_at": "2019-08-25T14:24:47Z",
    "user": "crystina-z"
  },
  {
    "repo": "pytorch/examples",
    "number": 611,
    "title": "Problem on multiple nodes",
    "body": "Hi, when I am running ImageNet example on multiple nodes, I met the problem showing \r\n`RuntimeError: NCCL error in: /pytorch/torch/lib/c10d/ProcessGroupNCCL.cpp:272, unhandled system error` on my node 0.\r\n\r\nThe command I used is \r\n`python main.py -a resnet50 --dist-url 'tcp://IP_OF_NODE0:FREEPORT' --dist-backend 'nccl' --multiprocessing-distributed --world-size 2 --rank 0 [imagenet-folder with train and val folders]`\r\n\r\nThe platform I used is `Python 3.6` using Anaconda on CentOS and the PyTorch Version is `1.1.0`.\r\n\r\nActually, I met this problem on single node and multi GPUs but I solved it by setting\r\n`export NCCL_P2P_DISABLE=1`.\r\n\r\nAlso before I ran the code, I would set `OMP_NUM_THREADS=1` to make the distributed training faster. \r\n\r\nI made sure that my IP and port were correct.\r\n\r\nDo you know how to solve it? \r\n\r\nThanks\r\n",
    "url": "https://github.com/pytorch/examples/issues/611",
    "state": "open",
    "labels": [
      "distributed"
    ],
    "created_at": "2019-08-15T09:21:21Z",
    "updated_at": "2022-03-09T20:52:45Z",
    "comments": 2,
    "user": "ElegantLin"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 24399,
    "title": "How to get NLLLoss grad?",
    "body": "import torch\r\nimport torch.nn as nn\r\n\r\nm = nn.LogSoftmax(dim=1)\r\nloss = nn.NLLLoss()\r\na=[[2.,  0.],\r\n[1.,  1.]]\r\ninput = torch.tensor(a, requires_grad=True)\r\ntarget = torch.tensor([1, 1])\r\noutput = loss(m(input), target)\r\noutput.backward()\r\nprint(input.grad)\r\n-------------------------------------------------------\r\ntensor([[ 0.4404, -0.4404],\r\n        [ 0.2500, -0.2500]])\r\n----------------------------------\r\nHow to get input.grad?What's the formula\uff1f\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/24399",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-15T09:07:53Z",
    "updated_at": "2019-08-15T16:26:06Z",
    "user": "williamlzw"
  },
  {
    "repo": "pytorch/audio",
    "number": 235,
    "title": "How to make the data precision loaded by torchaudio.load be consistent with the data loaded by the librosa.load",
    "body": "I found that data precision loaded by torchaudio.load is much lower than librosa. Is there a way to improve data precision?\r\n",
    "url": "https://github.com/pytorch/audio/issues/235",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-14T15:13:41Z",
    "updated_at": "2019-08-27T20:12:50Z",
    "user": "YapengTian"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 24310,
    "title": "[Question] Who can tell me where is the windows version torch in PYPI? It just like missing.",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/24310",
    "state": "closed",
    "labels": [
      "module: windows",
      "triaged"
    ],
    "created_at": "2019-08-14T05:48:57Z",
    "updated_at": "2020-02-04T03:10:59Z",
    "user": "xiaohuihuichao"
  },
  {
    "repo": "pytorch/examples",
    "number": 607,
    "title": "Does this variable 'tokens' make sense?",
    "body": "https://github.com/pytorch/examples/blob/4581968193699de14b56527296262dd76ab43557/word_language_model/data.py#L32\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/examples/issues/607",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-13T03:33:11Z",
    "updated_at": "2019-08-16T12:01:08Z",
    "comments": 4,
    "user": "standbyme"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 24220,
    "title": "Where is nn.Transformer for pytorch 1.2.0 on win10? ",
    "body": "## \u2753 Questions and Help\r\nI ran the installing code \"pip3 install torch==1.2.0 torchvision==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html\" and installed torch 1.2.0.\r\n\r\nYet, I can't find the Transformers in nn module, where are they?    platform: WIN10 \r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/24220",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-13T01:08:31Z",
    "updated_at": "2019-10-07T02:07:59Z",
    "user": "shuaishuaij"
  },
  {
    "repo": "pytorch/examples",
    "number": 605,
    "title": "DistributedDataParralle training speed",
    "body": "Hi, I am using image net. But there is no big difference between the time consuming when I used 2 GPUs, 4 GPUs or 8 GPUs. I just changed the `gpu id` and batch size to guarantee the memory of GPU was fully used. The speed did not increase although I used more GPUs. Is there something wrong about what I did?\r\n\r\nThanks a lot.",
    "url": "https://github.com/pytorch/examples/issues/605",
    "state": "open",
    "labels": [
      "distributed"
    ],
    "created_at": "2019-08-10T16:37:09Z",
    "updated_at": "2022-10-11T11:29:08Z",
    "comments": 5,
    "user": "ElegantLin"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 606,
    "title": "Is there any reason for using tensor.data?",
    "body": "https://github.com/pytorch/tutorials/blob/60d6ef365e36f3ba82c2b61bf32cc40ac4e86c7b/beginner_source/blitz/autograd_tutorial.py#L160\r\n\r\nThis is an official tutorial codes.\r\n\r\nIs there any reason for using tensor.data? \r\n~~~\r\nx = torch.randn(3, requires_grad=True)\r\n\r\ny = x * 2\r\nwhile y.data.norm() < 1000:\r\n    y = y * 2\r\n~~~\r\n\r\nIf not, I think this code should be replaced by \r\n~~~\r\ny = x * 2\r\nwhile y.detach().norm() < 1000:\r\n    y = y * 2\r\n~~~",
    "url": "https://github.com/pytorch/tutorials/issues/606",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-09T06:27:43Z",
    "updated_at": "2019-09-04T13:35:22Z",
    "comments": 0,
    "user": "minlee077"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 24009,
    "title": "How to convert pytorch model(faster-rcnn) to onnx?",
    "body": "## \u2753 Questions and Help\r\n\r\nI trained a faster-rcnn model use the project: jwyang/faster-rcnn.pytorch\r\n[https://github.com/jwyang/faster-rcnn.pytorch](url)\r\nI want convert the model to onnx, this is my code:\r\n`          torch_out=torch.onnx.export(fasterRCNN,\\\r\n            (im_data,im_info,gt_boxes,num_boxes),\\ \r\n               \"onnx_model_name.onnx\",\\\r\n                 export_params=True,\\\r\n                   opset_version=10,\\\r\n                     do_constant_folding=True,\\\r\n                       input_names=['input'],\\\r\n                         output_names=['output'])`\r\nI get this error:\r\nFile \"/home/user/anaconda3/envs/mypytorch-env/lib/python3.7/site-packages/torch/jit/__init__.py\", line 297, in forward\r\n    out_vars, _ = _flatten(out)\r\nRuntimeError: Only tuples, lists and Variables supported as JIT inputs, but got int\r\nTerminated\r\n\r\nWho ever encountered this problem? \r\nPlease help me. Thank you very much.",
    "url": "https://github.com/pytorch/pytorch/issues/24009",
    "state": "closed",
    "labels": [
      "module: onnx",
      "triaged"
    ],
    "created_at": "2019-08-08T08:57:05Z",
    "updated_at": "2021-12-22T21:51:39Z",
    "user": "waynebianxx"
  },
  {
    "repo": "pytorch/examples",
    "number": 604,
    "title": "Do you have any instructions for the use of functions related to C + + ports?",
    "body": "Do you have any instructions for the use of functions related to C + + ports?\r\nfor example:\r\nauto aa = torch::tensor({ 1, 2 , 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 });\r\nauto bb = torch::reshape(aa, { 2, 2, 2, 2 });\r\nconst void *src = bb.data<int>();\r\nstd::vector<int>value;\r\nvoid *dst = &value;\r\ntorch::CopyBytes(2, src, torch::DeviceType::CPU, dst, torch::DeviceType::CPU, 0);\r\nBut I found that I could not get the desired result.\r\nI hope to get your help. Thank you.",
    "url": "https://github.com/pytorch/examples/issues/604",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-07T06:56:32Z",
    "updated_at": "2019-08-07T17:26:02Z",
    "comments": 1,
    "user": "yeyuxmf"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 593,
    "title": "does the attention need do mask on the encoder_outputs?",
    "body": "attn_weights = self.attn(rnn_output, encoder_outputs)\r\nthis is the attn_weights,  the number of output vector in a batch is different because the input length is different,  and the number of output vector is padded align max_seq_len in the batch.\r\nbut when compute attn_weights,  there is no mask operation on the padding output vec\uff0cis this right ?",
    "url": "https://github.com/pytorch/tutorials/issues/593",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-06T12:45:14Z",
    "updated_at": "2019-08-07T19:11:51Z",
    "comments": 1,
    "user": "littttttlebird"
  },
  {
    "repo": "huggingface/sentence-transformers",
    "number": 6,
    "title": "What is the classical loss for doc ranking problem? Thank you.",
    "body": "Based on my understanding, Multiple Negatives Ranking Loss is a better loss for doc ranking problem.\r\nWhat is the former classical loss for doc ranking problem?\r\nThank you very much.",
    "url": "https://github.com/huggingface/sentence-transformers/issues/6",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-05T03:49:39Z",
    "updated_at": "2019-08-05T08:21:27Z",
    "user": "guotong1988"
  },
  {
    "repo": "pytorch/examples",
    "number": 600,
    "title": "What is the different between train_loss and test_loss?",
    "body": "Hello, I am a student who is just beginning to learn pytorch, I have runnd the examples of MNIST code, I am curious why the train_loss and test_loss are calculated differently.Here is the calculation code.Why are they not using the same code?\r\n`loss = F.nll_loss(output, target)  # train_loss`\r\n\r\n` test_loss = F.nll_loss(output, target, reduction='sum')`\r\n`test_loss = test_loss/len(test_loader.dataset)`\r\n",
    "url": "https://github.com/pytorch/examples/issues/600",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-05T02:35:51Z",
    "updated_at": "2019-08-18T11:15:44Z",
    "user": "wulongjian"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 23773,
    "title": " how to modify activation in GRU",
    "body": "We know in keras, `Bidirectional(GRU(128, activation='linear', return_sequences=True))(a1) # (240,256)`\uff0cthat is to say, we can choose activation.But in torch,there\u2019s no para to choose.`nn.GRU(n_in, n_hidden, bidirectional=True, dropout=droupout, batch_first=True, num_layers=num_layers)\r\n`I want to know how to modify activation in GRU in torch\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/23773",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-05T01:45:08Z",
    "updated_at": "2019-08-05T02:05:10Z",
    "user": "MichelleYang2017"
  },
  {
    "repo": "pytorch/examples",
    "number": 598,
    "title": "Problem finding the model en",
    "body": "Hi,\r\nHow can I resolve this error?\r\n```\r\n$ python train.py \r\nTraceback (most recent call last):\r\n  File \"train.py\", line 20, in <module>\r\n    inputs = data.Field(lower=args.lower, tokenize='spacy')\r\n  File \"/home/mahmood/.local/lib/python2.7/site-packages/torchtext/data/field.py\", line 152, in __init__\r\n    self.tokenize = get_tokenizer(tokenize)\r\n  File \"/home/mahmood/.local/lib/python2.7/site-packages/torchtext/data/utils.py\", line 12, in get_tokenizer\r\n    spacy_en = spacy.load('en')\r\n  File \"/home/mahmood/.local/lib/python2.7/site-packages/spacy/__init__.py\", line 27, in load\r\n    return util.load_model(name, **overrides)\r\n  File \"/home/mahmood/.local/lib/python2.7/site-packages/spacy/util.py\", line 139, in load_model\r\n    raise IOError(Errors.E050.format(name=name))\r\nIOError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.\r\n\r\n```",
    "url": "https://github.com/pytorch/examples/issues/598",
    "state": "closed",
    "labels": [],
    "created_at": "2019-08-01T11:09:46Z",
    "updated_at": "2022-03-10T00:25:00Z",
    "comments": 1,
    "user": "mahmoodn"
  },
  {
    "repo": "pytorch/text",
    "number": 572,
    "title": "How to set the max length for batches?",
    "body": "Is there a way to use something like `max_len` argument: all text entries in a dataset longer than a certain length can be thrown out.",
    "url": "https://github.com/pytorch/text/issues/572",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-29T18:25:25Z",
    "updated_at": "2019-09-16T15:04:40Z",
    "user": "XinDongol"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 23490,
    "title": "upcoming PEP 554: how much effort we need to support sub-interpreter",
    "body": "## \ud83d\ude80 Feature\r\nsupport python sub-interpreters and maintains all status of the torch library.\r\n\r\n## Motivation\r\n\r\nas #10950 demonstrates, the current ``torch`` library cannot lives on multiple sub-interpreter  simultaneously within the same process. But we do need to run python codes on multiple \"threads\" at the same time for the very reasons why ``torch`` introduces ``torch.multiprocessing`` and ``DistributedDataParallel`` (the single node scenario). As [PEP 554](https://www.python.org/dev/peps/pep-0554/) is proposed back in 2017 and maybe available by 2019 or 2020, I think it is necessary to make use of it because:\r\n- It is easier to sharing data between interpreters than between processes\r\n- It will reduce gpu memory overhead (Every subprocess consume at least 400~500MB gpu memory)\r\n- It can help avoid relatively complex process management problems\r\n\r\nAnd between multi-interpreter and multi-process, there is almost no difference on user coding experience and front-end design, and the changes will be made behind the scene. \r\n\r\n## Pitch\r\n\r\n<!-- A clear and concise description of what you want to happen. -->\r\nI think works need to be done on following aspects:\r\n- Changes any global status that should bind to a interpreter to a per-interpreter status set. (the ``detach`` method mentioned in #10950, for example)\r\n  ``Tensor`` lifecycle management maybe not a good example, because it is also a choice that ``Tensor`` can be shared across interpreters.\r\n- Prevent re-initializing and double-finalize for those status that are indeed global. (CUDA initialization, for example)\r\n- Create interface and infrastructure for controlling communication and sharing ``Tensor`` between interpreters. \r\n- Deprecate ``torch.multiprocessing`` module\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/23490",
    "state": "open",
    "labels": [
      "feature",
      "triaged"
    ],
    "created_at": "2019-07-28T16:19:53Z",
    "updated_at": "2019-08-02T16:16:00Z",
    "user": "winggan"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 23423,
    "title": "how to  process c++ forward multiple return values",
    "body": "my model return value like this  , it is detection model\r\noutput = (\r\n                tensor1,                   # loc preds\r\n                tensor2          # conf preds\r\n )\r\n\r\nhow to get return values in c++\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/23423",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-26T07:37:15Z",
    "updated_at": "2019-07-26T11:14:56Z",
    "user": "kakaluote"
  },
  {
    "repo": "pytorch/vision",
    "number": 1166,
    "title": "How to train resnet18 to the best accuracy?",
    "body": "I recently did a simple experiment, training cifar10 with resnet18( torchvision.models), but I can't  achieve the desired accuracy(93%).\r\n\r\n\r\nI found a GitHub repository where the example can be trained to 93% accuracy, [pytorch-cifar](https://github.com/kuangliu/pytorch-cifar). But his implementation is different from torchvision.models.resnet18, The difference may be [here](https://github.com/kuangliu/pytorch-cifar/issues/91#issuecomment-514933998).  \r\n\r\n\r\n\r\nIs there any example to teach us how to train cifar10 with resnet18 to the optimal precision?",
    "url": "https://github.com/pytorch/vision/issues/1166",
    "state": "closed",
    "labels": [
      "question",
      "module: models",
      "topic: classification"
    ],
    "created_at": "2019-07-25T09:57:20Z",
    "updated_at": "2019-07-26T09:05:35Z",
    "user": "zerolxf"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 187,
    "title": "Where is the conll parser?",
    "body": "In the [instructions](https://github.com/huggingface/neuralcoref/blob/master/neuralcoref/train/training.md) there is a reference to a conll parser and conll processing scripts, but those links are dead. They have been removed but it's not clear to me why.",
    "url": "https://github.com/huggingface/neuralcoref/issues/187",
    "state": "closed",
    "labels": [
      "training",
      "docs"
    ],
    "created_at": "2019-07-23T20:59:40Z",
    "updated_at": "2019-12-17T06:30:02Z",
    "user": "BramVanroy"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 23218,
    "title": "What is the torchvision version  for pytorch-nightly? Use 0.3.0 to report errors",
    "body": "The official website does not provide the torchvison version installation method.\r\nHere is the error message  when torchvison 0.3.0 is used.\r\ntorchvision/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at7getTypeERKNS_6TensorE\r\n\r\nThat should be caused by the mismatch version  between pytorch-nightly and torchvision  0.3.0.\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/23218",
    "state": "closed",
    "labels": [
      "module: docs",
      "triaged",
      "module: vision"
    ],
    "created_at": "2019-07-23T06:37:44Z",
    "updated_at": "2021-03-12T13:00:16Z",
    "user": "zymale"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 23215,
    "title": "How the ops are registerd to ATenDispatch's op tables_",
    "body": "I want to know how ops are registered to ATenDispatch's op_tables_;\r\nI see ATenDispatch has registerOp/registerVariableOp interface, but not found code that these interfaces are called to register ops;\r\nIs ATenDispatch use the global static varable to trigger the registration like C10_DECLARE_REGISTRY  mechanism\uff1f\r\n\r\nI see the code below, but cannot find where \"aten::linear(Tensor input, Tensor weight, Tensor? bias=None) -> Tensor\" is registered to ATenDispatch.\r\n\r\n`static inline Tensor linear(const Tensor & input, const Tensor & weight, const Tensor & bias) {\r\n    static auto table = globalATenDispatch().getOpTable(\"aten::linear(Tensor input, Tensor weight, Tensor? bias=None) -> Tensor\");\r\n    return table->getOp<Tensor (const Tensor &, const Tensor &, const Tensor &)>(at::detail::infer_backend(input), at::detail::infer_is_variable(input))(input, weight, bias);\r\n}`\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/23215",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-23T06:17:08Z",
    "updated_at": "2019-07-23T10:44:28Z",
    "user": "dongfangduoshou123"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 566,
    "title": "Is this RNN implementation different from the vanilla RNN?",
    "body": "https://github.com/pytorch/tutorials/blob/master/intermediate_source/char_rnn_classification_tutorial.py\r\n\r\nStandard Interpretation\r\n-------------------------\r\n\r\nIn the original RNN, the hidden state and output are calculated as\r\n\r\n[![enter image description here][1]][1]\r\n\r\nin other words, we obtain the the output from the hidden state.\r\n\r\nAccording to [Wiki][2], the RNN architecture can be unfolded like this\r\n[![vani][3]][3]\r\n\r\nAnd the code I have been using is like:\r\n\r\n    class Model(nn.Module):\r\n        def __init__(self, input_size, output_size, hidden_dim, n_layers):\r\n            super(Model, self).__init__()\r\n            self.hidden_dim = hidden_dim\r\n            self.rnn = nn.RNN(input_size, hidden_dim, 1)   \r\n            self.fc = nn.Linear(hidden_dim, output_size)\r\n        \r\n        def forward(self, x):\r\n            batch_size = x.size(0)\r\n    \r\n            out, hidden = self.rnn(x)\r\n            \r\n            # getting output from the hidden state\r\n            out = out..view(-1, self.hidden_dim)\r\n            out = self.fc(out)\r\n            \r\n            return out, hidden\r\n\r\nRNN as \"pure\" feed-forward layers\r\n-------------------------\r\nBut in this tutorial the hidden layer calculation is same as the standard interpretation, but the output is is calculated independently from the current hidden state `h`.\r\n\r\nTo me, the math behind this implementation is:\r\n\r\n[![enter image description here][6]][6]\r\n\r\nSo, this implementation is different from the original RNN implementation?\r\n\r\n  [1]: https://i.stack.imgur.com/1IdH7.png\r\n  [2]: https://en.wikipedia.org/wiki/Recurrent_neural_network\r\n  [3]: https://i.stack.imgur.com/aJL7l.png\r\n  [4]: https://pytorch.org/tutorials/intermediate/char_rnn_classification_tutorial.html#creating-the-network\r\n  [5]: https://i.stack.imgur.com/mfjcp.png\r\n  [6]: https://i.stack.imgur.com/M3jgf.gif\r\n\r\n@chsasank @zou3519 ",
    "url": "https://github.com/pytorch/tutorials/issues/566",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-20T07:49:30Z",
    "updated_at": "2021-06-16T00:15:41Z",
    "comments": 1,
    "user": "KinWaiCheuk"
  },
  {
    "repo": "pytorch/xla",
    "number": 837,
    "title": "How to save/load a model trained with `torch_xla_py.data_parallel`",
    "body": "A `torch_xla_py.data_parallel` model doesn't have an implementation for the function `state_dict()` which is required to save/load the model. Is there a way around this?\r\n\r\nThanks",
    "url": "https://github.com/pytorch/xla/issues/837",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-18T17:23:42Z",
    "updated_at": "2019-07-29T23:23:51Z",
    "user": "ibeltagy"
  },
  {
    "repo": "pytorch/xla",
    "number": 836,
    "title": "how to read the output of  `_xla_metrics_report`",
    "body": "This is not an issue, but I am curious how to read the metrics report printed by:\r\n`print(torch_xla._XLAC._xla_metrics_report())`\r\n\r\nI want to see if all the operations I am using are supported or not, and if there's something to do to speed it up. \r\n\r\nHere's a sample output: \r\n```\r\n2019-07-18 17:15:45,048: ** ** * Saving fine-tuned model ** ** * \r\nMetric: CompileTime\r\n  TotalSamples: 24\r\n  Counter: 07s501ms263.438us\r\n  ValueRate: 415ms845.224us / second\r\n  Rate: 1.53144 / second\r\n  Percentiles: 1%=092ms776.335us; 5%=116ms990.572us; 10%=184ms266.354us; 20%=185ms543.885us; 50%=270ms754.761us; 80%=415ms236.583us; 90%=416ms362.582us; 95%=417ms693.385us; 99%=417ms171.393us\r\nMetric: ExecuteTime\r\n  TotalSamples: 1752\r\n  Counter: 07m04s113ms694.219us\r\n  ValueRate: 03s312ms257.946us / second\r\n  Rate: 25.5639 / second\r\n  Percentiles: 1%=068ms224.061us; 5%=069ms564.310us; 10%=069ms785.400us; 20%=069ms102.875us; 50%=181ms379.773us; 80%=189ms745.170us; 90%=191ms81.607us; 95%=194ms931.718us; 99%=225ms80.436us\r\nMetric: InboundData\r\n  TotalSamples: 880\r\n  Counter: 3.44KB\r\n  ValueRate: 37.22B / second\r\n  Rate: 9.30398 / second\r\n  Percentiles: 1%=4.00B; 5%=4.00B; 10%=4.00B; 20%=4.00B; 50%=4.00B; 80%=4.00B; 90%=4.00B; 95%=4.00B; 99%=4.00B\r\nMetric: OutboundData\r\n  TotalSamples: 1976\r\n  Counter: 4.09GB\r\n  ValueRate: 20.98MB / second\r\n  Rate: 10.5791 / second\r\n  Percentiles: 1%=4.00B; 5%=3.00KB; 10%=3.00KB; 20%=3.00KB; 50%=12.00KB; 80%=2.25MB; 90%=2.25MB; 95%=9.00MB; 99%=9.00MB\r\nMetric: ReleaseCompileHandlesTime\r\n  TotalSamples: 14\r\n  Counter: 41s345ms872.979us\r\n  ValueRate: 02s970ms383.483us / second\r\n  Rate: 0.667202 / second\r\n  Percentiles: 1%=001ms416.541us; 5%=001ms416.541us; 10%=049ms618.232us; 20%=059ms4.227us; 50%=130ms959.829us; 80%=10s703ms744.276us; 90%=11s570ms353.038us; 95%=11s585ms908.001us; 99%=11s585ms908.001us\r\nMetric: ReleaseDataHandlesTime\r\n  TotalSamples: 3409\r\n  Counter: 18s036ms534.459us\r\n  ValueRate: 101ms925.451us / second\r\n  Rate: 49.556 / second\r\n  Percentiles: 1%=643.545us; 5%=776.956us; 10%=879.853us; 20%=001ms27.498us; 50%=001ms436.214us; 80%=003ms823.050us; 90%=004ms105.973us; 95%=005ms355.654us; 99%=008ms39.847us\r\nMetric: TransferFromServerTime\r\n  TotalSamples: 880\r\n  Counter: 09s893ms77.809us\r\n  ValueRate: 094ms23.901us / second\r\n  Rate: 9.30398 / second\r\n  Percentiles: 1%=001ms136.428us; 5%=001ms262.894us; 10%=001ms369.658us; 20%=002ms514.730us; 50%=002ms768.530us; 80%=002ms232.447us; 90%=055ms522.896us; 95%=063ms333.605us; 99%=071ms470.850us\r\nMetric: TransferToServerTime\r\n  TotalSamples: 1976\r\n  Counter: 02m42s730ms811.808us\r\n  ValueRate: 670ms609.184us / second\r\n  Rate: 10.5653 / second\r\n  Percentiles: 1%=001ms358.042us; 5%=002ms672.558us; 10%=003ms745.003us; 20%=005ms642.737us; 50%=016ms554.496us; 80%=077ms944.343us; 90%=187ms107.324us; 95%=231ms913.229us; 99%=263ms297.246us\r\nCounter: CachedSyncTensors\r\n  Value: 1736\r\nCounter: CreateCompileHandles\r\n  Value: 17\r\nCounter: CreateDataHandles\r\n  Value: 190064\r\nCounter: CreateXlaTensor\r\n  Value: 2813256\r\nCounter: DestroyCompileHandles\r\n  Value: 14\r\nCounter: DestroyDataHandles\r\n  Value: 186616\r\nCounter: DestroyXlaTensor\r\n  Value: 2809944\r\nCounter: ReleaseCompileHandles\r\n  Value: 14\r\nCounter: ReleaseDataHandles\r\n  Value: 186616\r\nCounter: UncachedSyncTensors\r\n  Value: 24\r\nCounter: XRTAllocateFromTensor_Empty\r\n  Value: 1629\r\nCounter: XrtCompile_Empty\r\n  Value: 2176\r\nCounter: XrtExecuteChained_Empty\r\n  Value: 2176\r\nCounter: XrtExecute_Empty\r\n  Value: 2176\r\nCounter: XrtRead_Empty\r\n  Value: 2176\r\nCounter: XrtReleaseAllocationHandle_Empty\r\n  Value: 2176\r\nCounter: XrtReleaseCompileHandle_Empty\r\n  Value: 2176\r\nCounter: XrtSessionCount\r\n  Value: 25\r\nCounter: XrtSubTuple_Empty\r\n  Value: 2176\r\nCounter: aten::_local_scalar_dense\r\n  Value: 880\r\n```",
    "url": "https://github.com/pytorch/xla/issues/836",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-18T17:21:05Z",
    "updated_at": "2019-07-25T23:21:40Z",
    "user": "ibeltagy"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 23015,
    "title": "I used libtorch to write resnet18 for training in C++, so how to load resnet18.pth in pytorch to help pre-training",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\nI used libtorch to write resnet18 for training in C++, so how to load resnet18.pth in pytorch to help pre-training\uff1b\r\nCannot import using torch::load(resnet18,\"./resnet18.pth\")\r\nResnet18 written in c++ is correct",
    "url": "https://github.com/pytorch/pytorch/issues/23015",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-18T08:53:31Z",
    "updated_at": "2019-07-18T08:57:16Z",
    "user": "CF-chen-feng-CF"
  },
  {
    "repo": "huggingface/transformers",
    "number": 805,
    "title": "Where is \"run_bert_classifier.py\"?",
    "body": "Thanks for this great repo.\r\nIs there any equivalent to [the previous run_bert_classifier.py](https://github.com/huggingface/pytorch-pretrained-BERT/tree/master/examples/run_bert_classifier.py)?\r\n",
    "url": "https://github.com/huggingface/transformers/issues/805",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-17T14:57:53Z",
    "updated_at": "2020-12-02T15:59:46Z",
    "user": "amirj"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 22858,
    "title": "What is the abbreviation of CI?",
    "body": "## \u2753 Questions and Help\r\nI ma sorry, I don't understand the sentence: ` On CI, we test with BUILD_SHARED_LIBS=OFF.`\r\nWhat is the CI ?\r\nWhat is the BUILD_SHARED_LIBS?\r\nCould someone explain it for me?\r\nThank you very much!\r\n![image](https://user-images.githubusercontent.com/30762967/61199981-868abd00-a712-11e9-9fc3-fc3d3e25446d.png)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/22858",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-15T07:11:37Z",
    "updated_at": "2019-07-15T07:17:31Z",
    "user": "137996047"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 22791,
    "title": "How to use mpi backend without CUDA_aware",
    "body": "We noticed that the MPI backend doesn't support the GPU from the official website,(https://pytorch.org/docs/master/distributed.html), then we complied the Pytorch with USE_MPI=1. The command line is `python3 main.py -a resnet50 --dist-url 'tcp://12.0.50.1:12348' --dist-backend 'mpi' --multiprocessing-distributed --world-size 2 --rank 0 /data/tiny-imagenet-200/`.  However, we got the error message \"CUDA tensor detected and the MPI used doesn't have CUDA-aware MPI support\". I think the GPU-Direct is not enabled if used MPI backend, I don't know why it uses the CUDA tensor and CUDA-aware , seems GPU-Direct route. And how to set the args for avoiding the CUDA-aware. Thank you :)",
    "url": "https://github.com/pytorch/pytorch/issues/22791",
    "state": "open",
    "labels": [
      "triaged",
      "module: mpi"
    ],
    "created_at": "2019-07-12T08:09:15Z",
    "updated_at": "2020-11-25T06:05:04Z",
    "user": "401qingkong"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 22731,
    "title": "How to convert at::Tensor (one element) type into a float type in c++ libtorch?",
    "body": "When I take an element A (eg: x[1][2][3][4], also type at::Tensor) from a four-dimensional variable x(at::Tensor), I want to compare (or multiply) A and B (float type) , how do I convert A (at::Tensor) to float? Thanks a lot!",
    "url": "https://github.com/pytorch/pytorch/issues/22731",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-11T05:33:49Z",
    "updated_at": "2023-06-16T06:44:22Z",
    "user": "FightStone"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 22709,
    "title": "[docs] Unclear how to use pixel_shuffle",
    "body": "## \ud83d\udcda Documentation\r\n\r\nThe function is documented as taking no inputs, but uses inputs in the example. \r\n\r\n![image](https://user-images.githubusercontent.com/5652049/61009358-6d63c400-a340-11e9-8633-7d798588089b.png)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/22709",
    "state": "closed",
    "labels": [
      "module: docs",
      "triaged"
    ],
    "created_at": "2019-07-10T22:28:19Z",
    "updated_at": "2020-10-06T10:53:53Z",
    "user": "zou3519"
  },
  {
    "repo": "pytorch/examples",
    "number": 590,
    "title": "Why normalize rewards?",
    "body": "In [line 75](https://github.com/pytorch/examples/blob/master/reinforcement_learning/actor_critic.py#L75) of actor-critic.py, there is a code that normalizes the rewards. However, we don't normalize the values returned from the critic. Why do we do this?",
    "url": "https://github.com/pytorch/examples/issues/590",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-10T12:06:56Z",
    "updated_at": "2022-03-09T23:58:34Z",
    "comments": 1,
    "user": "ThisIsIsaac"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 553,
    "title": "improve pytorch tutorial for Data Parallelism",
    "body": "in this tutorial for data parallel ([link](https://pytorch.org/tutorials/beginner/blitz/data_parallel_tutorial.html))\r\nit can be useful if you can add how to handle loss function for the case that we are using multiple gpus.\r\nusually naive way will cause unbalance gpu memory usage \r\n",
    "url": "https://github.com/pytorch/tutorials/issues/553",
    "state": "open",
    "labels": [],
    "created_at": "2019-07-08T21:04:57Z",
    "updated_at": "2021-10-28T13:15:08Z",
    "comments": 3,
    "user": "isalirezag"
  },
  {
    "repo": "pytorch/examples",
    "number": 586,
    "title": "syntax for evaluation mode on custom data?",
    "body": "I fine-tuned a model on a custom dataset that was pretrained with Imagenet. Now that I have the model and resulting best epoch in a pth file. What is the correct syntax for evaluation on the validation dataset using my new model. I know I need to set the '-e' flag, butI don't see how to point the script to my newly-trained model. Apologies if this is a novice issue. ",
    "url": "https://github.com/pytorch/examples/issues/586",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-06T16:41:18Z",
    "updated_at": "2022-03-10T05:54:16Z",
    "comments": 1,
    "user": "gbrow004"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 22549,
    "title": "How to programmatically check PyTorch version",
    "body": "## \ud83d\udcda Documentation\r\n\r\n[Minor minor detail]\r\nIn the reproducibility section of the docs or in the FAQ, I would add a simple subsection/snippet of code to show how to programmatically check the running version of PyTorch. \r\nThis can also encourage users to take into account heterogeneity of PyTorch versions in their code.\r\n\r\nBy the way, a simple regex on `torch.__version__` is enough (this assuming version numbering will not change).\r\n```python\r\nimport torch\r\nimport re\r\nif int(re.search(r'([\\d.]+)', torch.__version__).group(1).replace('.', '')) < 100:\r\n    raise ImportError('Your PyTorch version is not supported. '\r\n                      'Please download and install PyTorch 1.x')\r\n```\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/22549",
    "state": "closed",
    "labels": [
      "module: docs",
      "triaged",
      "enhancement"
    ],
    "created_at": "2019-07-05T15:02:31Z",
    "updated_at": "2019-11-16T11:55:47Z",
    "user": "srossi93"
  },
  {
    "repo": "pytorch/xla",
    "number": 803,
    "title": "How to monitor the TPU utilization and memory usage when training?",
    "body": "",
    "url": "https://github.com/pytorch/xla/issues/803",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2019-07-05T11:19:51Z",
    "updated_at": "2021-11-15T18:12:41Z",
    "user": "anhle-uet"
  },
  {
    "repo": "pytorch/xla",
    "number": 802,
    "title": "Is there any detailed document on how to build and train Pytorch network on TPU?",
    "body": "Hi, I couldn't find any detailed guide or tutorial on how to use this project. Could you point me out some? Thanks a lot!",
    "url": "https://github.com/pytorch/xla/issues/802",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-05T05:27:11Z",
    "updated_at": "2019-07-05T05:46:57Z",
    "user": "anhle-uet"
  },
  {
    "repo": "pytorch/examples",
    "number": 584,
    "title": "in DCGAN example, Why do we need to make netD inference twice?",
    "body": "To my understanding, the two lines nearly have the same functionality (same input, same output) except in the first inference `fake` is detached.\r\n\r\nhttps://github.com/pytorch/examples/blob/1de2ff9338bacaaffa123d03ce53d7522d5dcc2e/dcgan/main.py#L229\r\n\r\nhttps://github.com/pytorch/examples/blob/1de2ff9338bacaaffa123d03ce53d7522d5dcc2e/dcgan/main.py#L241\r\n\r\nIs it necessary to make netD inference twice with the same input?\r\nWhat if we re-use the output of the first inference (with fake input) to calculate `errG`?\r\n\r\ninstead of the original codes:\r\n```\r\n        ############################\r\n        # (1) Update D network: maximize log(D(x)) + log(1 - D(G(z)))\r\n        ###########################\r\n        # train with real\r\n        netD.zero_grad()\r\n        real_cpu = data[0].to(device)\r\n        batch_size = real_cpu.size(0)\r\n        label = torch.full((batch_size,), real_label, device=device)\r\n\r\n        output = netD(real_cpu)\r\n        errD_real = criterion(output, label)\r\n        errD_real.backward()\r\n        D_x = output.mean().item()\r\n\r\n        # train with fake\r\n        noise = torch.randn(batch_size, nz, 1, 1, device=device)\r\n        fake = netG(noise)\r\n        label.fill_(fake_label)\r\n        output = netD(fake.detach())\r\n        errD_fake = criterion(output, label)\r\n        errD_fake.backward()\r\n        D_G_z1 = output.mean().item()\r\n        errD = errD_real + errD_fake\r\n        optimizerD.step()\r\n\r\n        ############################\r\n        # (2) Update G network: maximize log(D(G(z)))\r\n        ###########################\r\n        netG.zero_grad()\r\n        label.fill_(real_label)  # fake labels are real for generator cost\r\n        output = netD(fake)\r\n        errG = criterion(output, label)\r\n        errG.backward()\r\n        D_G_z2 = output.mean().item()\r\n        optimizerG.step()\r\n```\r\n\r\ncan we re-write them as following?\r\n```\r\n        ############################\r\n        # (1) Update D network: maximize log(D(x)) + log(1 - D(G(z)))\r\n        ###########################\r\n        # train with real\r\n        netD.zero_grad()\r\n        real_cpu = data[0].to(device)\r\n        batch_size = real_cpu.size(0)\r\n        label = torch.full((batch_size,), real_label, device=device)\r\n\r\n        real_output = netD(real_cpu)\r\n        errD_real = criterion(real_output, label)\r\n        errD_real.backward()\r\n        D_x = real_output.mean().item()\r\n\r\n        # train with fake\r\n        noise = torch.randn(batch_size, nz, 1, 1, device=device)\r\n        fake = netG(noise)\r\n        label.fill_(fake_label)\r\n        # output = netD(fake.detach())\r\n        fake_output = netD(fake)\r\n        errD_fake = criterion(fake_output, label)\r\n        #errD_fake.backward()\r\n        errD_fake.backward(retain_graph=True)\r\n        D_G_z1 = fake_output.mean().item()\r\n        errD = errD_real + errD_fake\r\n        optimizerD.step()\r\n\r\n        ############################\r\n        # (2) Update G network: maximize log(D(G(z)))\r\n        ###########################\r\n        netG.zero_grad()\r\n        netD.zero_grad()\r\n        label.fill_(real_label)  # fake labels are real for generator cost\r\n        # output = netD(fake)\r\n        errG = criterion(fake_output, label)\r\n        errG.backward()\r\n        D_G_z2 = fake_output.mean().item()\r\n        optimizerG.step()\r\n```",
    "url": "https://github.com/pytorch/examples/issues/584",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-04T08:37:17Z",
    "updated_at": "2022-03-10T00:37:26Z",
    "comments": 7,
    "user": "DreamChaserMXF"
  },
  {
    "repo": "pytorch/xla",
    "number": 797,
    "title": "How to use LR schedulers?",
    "body": "Can you provide an example of how to use torch.optim LR schedulers with Pytorch/XLA? I've been basing my code on the [test examples](https://github.com/pytorch/xla/tree/master/test), but not sure where to define the LR scheduler and where to step the scheduler since it looks like the optimizer is re-initialized each training loop. Thanks!",
    "url": "https://github.com/pytorch/xla/issues/797",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-04T04:41:29Z",
    "updated_at": "2019-07-10T05:32:16Z",
    "user": "brianhhu"
  },
  {
    "repo": "pytorch/examples",
    "number": 582,
    "title": "[How to write nn.ModuleList() in Pytorch C++ API]",
    "body": "Hi,\r\nHow can i write nn.Modulelist() using Pytorch C++?\r\n\r\n@goldsborough \r\n@soumith \r\nAny help would be great.\r\n\r\nThank you\r\n",
    "url": "https://github.com/pytorch/examples/issues/582",
    "state": "open",
    "labels": [
      "c++"
    ],
    "created_at": "2019-07-03T05:55:19Z",
    "updated_at": "2022-03-09T20:49:35Z",
    "user": "vinayak618"
  },
  {
    "repo": "pytorch/xla",
    "number": 793,
    "title": "How to use a cluster of tpus?",
    "body": "Hi,\r\nThe documentation described the use case with only one cloud tpu. However, in tensorflow it is possible to setup multiple TPU's via TPUClusterResolver. So, how to setup pytorch-xla for training on a multiple tpu devices?. In my case it is 25 preemptible v2-8 TPUs.",
    "url": "https://github.com/pytorch/xla/issues/793",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-02T14:43:29Z",
    "updated_at": "2019-07-10T05:37:19Z",
    "user": "Rexhaif"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 549,
    "title": "How to combine Rescale with other transforms.RandomHorizontalFlip?",
    "body": "I am following the tutorial, but meet the problem:` File \"/home/swg/anaconda3/envs/pytorch/lib/python3.6/site-packages/torchvision/transforms/transforms.py\", line 49, in __call__\r\n    img = t(img)\r\n  File \"/home/swg/anaconda3/envs/pytorch/lib/python3.6/site-packages/torchvision/transforms/transforms.py\", line 448, in __call__\r\n    return F.hflip(img)\r\n  File \"/home/swg/anaconda3/envs/pytorch/lib/python3.6/site-packages/torchvision/transforms/functional.py\", line 345, in hflip\r\n    raise TypeError('img should be PIL Image. Got {}'.format(type(img)))\r\nTypeError: img should be PIL Image. Got <class 'dict'>\r\n`   How to solve?  Thx",
    "url": "https://github.com/pytorch/tutorials/issues/549",
    "state": "closed",
    "labels": [],
    "created_at": "2019-07-01T09:47:31Z",
    "updated_at": "2021-06-16T16:20:20Z",
    "user": "swg209"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 22381,
    "title": "How to apply transfer learning for custom  object detection ?",
    "body": "## \u2753 Questions and Help\r\n\r\nIs there an example to apply transfer learning for **custom**  object detection.\r\n[https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html](https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html)\r\n\r\nReference:-\r\nhttps://www.learnopencv.com/faster-r-cnn-object-detection-with-pytorch/",
    "url": "https://github.com/pytorch/pytorch/issues/22381",
    "state": "closed",
    "labels": [
      "triaged",
      "module: vision"
    ],
    "created_at": "2019-06-30T16:44:47Z",
    "updated_at": "2019-07-01T21:38:00Z",
    "user": "spatiallysaying"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 548,
    "title": "how to set two inputs for caffe2",
    "body": "when I try to run the model on mobile devices by ONNX, I read the code in official turorials as follow:\r\n\r\n`import onnx`\r\n`import caffe2.python.onnx.backend as onnx_caffe2_backend`\r\n`model = onnx.load(\"super_resolution.onnx\")`\r\n`prepared_backend = onnx_caffe2_backend.prepare(model)`\r\n`W = {model.graph.input[0].name: x.data.numpy()}`\r\n`c2_out = prepared_backend.run(W)[0]`\r\n\r\nthe input in this demo is x, but what should i do if i want to set two inputs?\r\nthanks for you attention!",
    "url": "https://github.com/pytorch/tutorials/issues/548",
    "state": "closed",
    "labels": [],
    "created_at": "2019-06-30T11:55:22Z",
    "updated_at": "2019-07-31T05:11:54Z",
    "user": "mmmmayi"
  },
  {
    "repo": "huggingface/transformers",
    "number": 739,
    "title": "where is \"pytorch_model.bin\"?",
    "body": "",
    "url": "https://github.com/huggingface/transformers/issues/739",
    "state": "closed",
    "labels": [
      "wontfix"
    ],
    "created_at": "2019-06-28T15:09:50Z",
    "updated_at": "2019-09-03T17:19:30Z",
    "user": "jufengada"
  },
  {
    "repo": "pytorch/examples",
    "number": 579,
    "title": "Implementing some C++ examples",
    "body": "Hi @soumith I want to implement some examples for C++ side. I want to start with an example of loading dataset with OpenCV and another example for RNN. \r\n\r\nThere is this [PR](https://github.com/pytorch/examples/pull/506) but it is not active and the example doesn't contain training. Should I write one myself? ",
    "url": "https://github.com/pytorch/examples/issues/579",
    "state": "open",
    "labels": [
      "c++"
    ],
    "created_at": "2019-06-27T07:14:40Z",
    "updated_at": "2022-03-09T20:49:35Z",
    "comments": 4,
    "user": "ShahriarRezghi"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 22290,
    "title": "How to define a new backward function in libtorch ?",
    "body": "## \u2753Is it possible to define a backward function libtorch ?\r\n\r\n###  In pytorch, a new backward function can  be defined\r\n`\r\n\r\nclass new_function(torch.autograd.Function):\r\n\r\n         def ....\r\n\r\n         def forward(self,...)\r\n\r\n         def backward(self, ...)\r\n\r\n`\r\nHowever, in libtorch,  how to define a new backward function?  \r\n\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/22290",
    "state": "closed",
    "labels": [
      "module: cpp",
      "triaged"
    ],
    "created_at": "2019-06-27T03:05:20Z",
    "updated_at": "2019-06-29T05:13:07Z",
    "user": "buduo15"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 22249,
    "title": "How to convert pytorch0.41 model to CAFFE",
    "body": "\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/22249",
    "state": "closed",
    "labels": [],
    "created_at": "2019-06-26T03:25:03Z",
    "updated_at": "2019-06-26T03:28:12Z",
    "user": "BokyLiu"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 543,
    "title": "Can I translate this tutorial and make a book?",
    "body": "Hello sir,\r\nAs the title says, can I translate this whole tutorial into S.Korean and make a book?\r\nI've noticed that this project is BSD licensed but the first thing to do will be asking you for permission.\r\nIt would be a great & fun job for me and I'm in a plan to donate the book royalty to charity.",
    "url": "https://github.com/pytorch/tutorials/issues/543",
    "state": "closed",
    "labels": [],
    "created_at": "2019-06-24T12:49:48Z",
    "updated_at": "2019-08-20T11:03:06Z",
    "comments": 0,
    "user": "amsukdu"
  },
  {
    "repo": "pytorch/examples",
    "number": 578,
    "title": "DCGAN BatchNorm initialization weight looks different",
    "body": "Hi there,\r\n\r\nI used the `torch.utils.tensorboard` to watch the weight/grad when training the DCGAN example on MNIST dataset.\r\n\r\nIn the DCGAN example, we use the normal distribution to initialize both the weight of Conv and BatchNorm. However, I find it is strange when I visualize the weight of them. In the following figure, it seems that the `G/main/1/weight` (BatchNorm) is not initialized with the normal distribution because it looks so different from `G/main/0/weight` (ConvTranspose2d). It has been trained for 10 iters with batch size 64.\r\n\r\nCould someone explain this?\r\n\r\n![image](https://user-images.githubusercontent.com/15101533/59962209-e677b480-9514-11e9-8387-827d58fbd791.png)\r\n\r\nThe related tensorboard code is copied from [here](https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/04-utils/tensorboard/main.py):\r\n```python\r\n# logging weight and grads\r\nfor tag, value in netD.named_parameters():\r\n    tag = 'D/' + tag.replace('.', '/')\r\n    writer.add_histogram(tag, value.data.cpu().numpy(), global_step)\r\n    writer.add_histogram(tag+'/grad', value.grad.data.cpu().numpy(), global_step)\r\nfor tag, value in netG.named_parameters():\r\n    tag = 'G/' + tag.replace('.', '/')\r\n    writer.add_histogram(tag, value.data.cpu().numpy(), global_step)\r\n    writer.add_histogram(tag+'/grad', value.grad.data.cpu().numpy(), global_step)\r\n```\r\n\r\n",
    "url": "https://github.com/pytorch/examples/issues/578",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2019-06-22T09:51:44Z",
    "updated_at": "2022-03-10T05:48:52Z",
    "comments": 0,
    "user": "daa233"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 541,
    "title": "Sphinx error (builder name data not registered)",
    "body": "Notebooks for beginner and intermediate tutorials have been generated fine. When building advanced tutorial I have problems: 1) need to install torchaudio in a hard way  (no easy way, need to compile from sources and hack some command to be completed, but checked - python can import torchaudio); 2) when running \"make data\" I am getting Sphinx error:\r\nmake data\r\nRunning Sphinx v2.1.2\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.7/site-packages/sphinx/registry.py\", line 145, in preload_builder\r\n    entry_point = next(entry_points)\r\nStopIteration\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.7/site-packages/sphinx/cmd/build.py\", line 283, in build_main\r\n    args.tags, args.verbosity, args.jobs, args.keep_going)\r\n  File \"/usr/lib/python3.7/site-packages/sphinx/application.py\", line 238, in __init__\r\n    self.preload_builder(buildername)\r\n  File \"/usr/lib/python3.7/site-packages/sphinx/application.py\", line 315, in preload_builder\r\n    self.registry.preload_builder(self, name)\r\n  File \"/usr/lib/python3.7/site-packages/sphinx/registry.py\", line 148, in preload_builder\r\n    ' through entry point') % name)\r\nsphinx.errors.SphinxError: Builder name data not registered or available through entry point\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/541",
    "state": "closed",
    "labels": [],
    "created_at": "2019-06-22T01:29:50Z",
    "updated_at": "2021-06-16T16:27:17Z",
    "comments": 2,
    "user": "olegmikul"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 539,
    "title": "how to create custom dataloader for with labels of varying length?",
    "body": "My image labels are in .csv format and it has labels in varying order.\r\n![Screenshot_2019-06-20 transferl(1)](https://user-images.githubusercontent.com/17276742/59912925-66b7f000-9417-11e9-95a3-1aca37c4d88b.png)\r\n\r\ni have created custom dataset. My labels are in separate csv files and they have varying length.\r\nI have tried making customdataset and then dataloader.\r\nI want to do transfer learning with Resnet. Can anyonehelp, I am a beginner to both pytorch and deep learning.\r\n![Screenshot_2019-06-20 transferl(2)](https://user-images.githubusercontent.com/17276742/59913219-0c6b5f00-9418-11e9-8ce8-84a669796c95.png)\r\n\r\n![Screenshot_2019-06-21 transferl(4)](https://user-images.githubusercontent.com/17276742/59915757-b0a3d480-941d-11e9-94d5-91c726d8d334.png)\r\n\r\n![Screenshot_2019-06-21 transferl(2)](https://user-images.githubusercontent.com/17276742/59914010-b8fa1080-9419-11e9-91fe-2a143de2351d.png)\r\nUpto this step, Everything is fine, However, when i create dataloader,\r\nit shows problem. Can anyone help? i am a beginner.\r\n![Screenshot_2019-06-21 transferl(3)](https://user-images.githubusercontent.com/17276742/59915497-12b00a00-941d-11e9-9632-50cf0121e60e.png)\r\n![Screenshot_2019-06-21 transferl(1)](https://user-images.githubusercontent.com/17276742/59915568-38d5aa00-941d-11e9-86fc-123257ce8ef8.png)\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/539",
    "state": "closed",
    "labels": [],
    "created_at": "2019-06-21T11:33:27Z",
    "updated_at": "2021-07-30T22:48:21Z",
    "user": "nisnab"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 175,
    "title": "what version of python is required to run the script  ?",
    "body": "I did try to run the script as described in CoNLL 2012 to produce the *._conll files.\r\nHowever without any success.\r\nthe command:\r\nskeleton2conll.sh  -D [path_to_ontonotes_train_folder] [path_to_skeleton_train_folder]\r\nalways returns that \"please make sure that you are pointing to the directory 'conll-2012'\"\r\nI did all as pointed on the web site and according other posts about that, which i did check.\r\nI work under windows 10 , so to run .sh file I use cygwin.\r\nHowever, i'm not sure what version of python I need , is it 2.7 or 3.xx and is this related to the issue i have?\r\nAny help is welcome.\r\n\r\n",
    "url": "https://github.com/huggingface/neuralcoref/issues/175",
    "state": "closed",
    "labels": [
      "training",
      "usage"
    ],
    "created_at": "2019-06-20T16:01:14Z",
    "updated_at": "2019-09-26T12:31:16Z",
    "user": "dtsonov"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 535,
    "title": "Under which license are the images?",
    "body": "Hi,\r\n\r\nUnder which license are the style and content images? I want to use your tutorial in an open source repository and wonder if the images won't change the license of my repo.\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/tutorials/issues/535",
    "state": "open",
    "labels": [],
    "created_at": "2019-06-19T12:21:57Z",
    "updated_at": "2019-06-19T12:21:57Z",
    "comments": 0,
    "user": "HyamsG"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 21962,
    "title": "How to deploy pytorch???",
    "body": "How to deploy pytorch???",
    "url": "https://github.com/pytorch/pytorch/issues/21962",
    "state": "closed",
    "labels": [],
    "created_at": "2019-06-19T08:47:10Z",
    "updated_at": "2019-06-19T14:22:20Z",
    "user": "yuanjie-ai"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 21945,
    "title": "how to use mkl-dnn after installing by conda?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\nhow to use mkl-dnn after installing by conda \"conda install mkl-dnn\"? And I don`t know what to do in the next step for using mkl-dnn on the pytorch?",
    "url": "https://github.com/pytorch/pytorch/issues/21945",
    "state": "closed",
    "labels": [],
    "created_at": "2019-06-19T02:53:45Z",
    "updated_at": "2019-06-20T21:57:03Z",
    "user": "HITerStudy"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 172,
    "title": "Accuracy Report of model",
    "body": "Hi,\r\nI am doing a research on co-reference resolution and comparing different models currently available. I have been looking for an accuracy measure of your model but couldn't find it in your GitHub Repo. description nor in your medium blog.\r\n\r\nCan you report how much accuracy (F1/Precision/Recall) have you achieved using this model and on which test dataset?\r\nThank you!",
    "url": "https://github.com/huggingface/neuralcoref/issues/172",
    "state": "closed",
    "labels": [
      "question",
      "wontfix",
      "perf / accuracy"
    ],
    "created_at": "2019-06-18T07:26:35Z",
    "updated_at": "2019-10-16T08:48:23Z",
    "user": "uahmad235"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 21630,
    "title": "How to accerlate dataloader?",
    "body": "how to accelerate dataloader?\r\nWhen we load data like :\r\nfor  i\uff0c data  in enumerate(dataset):\r\n      data.to(gpu)\r\nif we transfer data to gpu, the operation takes a lot of time. \r\nhow can we get data stored in gpu directly? Or any other ways to accelerate the dataloader",
    "url": "https://github.com/pytorch/pytorch/issues/21630",
    "state": "closed",
    "labels": [],
    "created_at": "2019-06-11T14:19:14Z",
    "updated_at": "2019-06-11T18:57:33Z",
    "user": "luhc15"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 21583,
    "title": "where is boradcast.h after installation caffe2",
    "body": "I'm trying to run cpp program with caffe2 in ubuntu 16.04.\r\nI installed caffe2 according to the official guide and checked that it is working properly.\r\n\r\nIn my case, I linked caffe2 & c10 libs and set include dir as `/usr/local/lib/python*.*/dist-packages/torch/include/`\r\nThen I confronted with below error.\r\n```bash\r\nIn file included from /usr/include/caffe2/utils/filler.h:8:0,\r\n                 from /usr/include/caffe2/core/operator_schema.h:16,\r\n                 from /usr/include/caffe2/core/net.h:18\r\n/usr/include/caffe2/utils/math.h:18:41: fatal error: caffe2/utils/math/broadcast.h: No such file or directory\r\n```\r\nIn build progress, the whole directory `/caffe2/core/utils` is omitted. Is there any reason?\r\n\r\nIf I can get, any solution to this problem?",
    "url": "https://github.com/pytorch/pytorch/issues/21583",
    "state": "closed",
    "labels": [
      "caffe2"
    ],
    "created_at": "2019-06-10T08:11:43Z",
    "updated_at": "2020-04-17T07:52:10Z",
    "user": "helloahn"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 21571,
    "title": "How to retrieve hidden states for all time steps in LSTM or BiLSTM?",
    "body": "How to retrieve hidden states for all time steps in LSTM or BiLSTM?",
    "url": "https://github.com/pytorch/pytorch/issues/21571",
    "state": "closed",
    "labels": [],
    "created_at": "2019-06-09T08:49:29Z",
    "updated_at": "2019-06-09T22:12:28Z",
    "user": "gongel"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 21551,
    "title": "How to disable MKL-DNN 64-bit compilation?",
    "body": "My build from current source on RPi 3B fails because the compilation is selecting the 64-bit option for the Intel MKL-DNN library. Is there an _option/flag_ to disable this selection during the **make** process?\r\n\r\nThanks.\r\n\r\n```\r\n-- MIOpen not found. Compiling without MIOpen support\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100   621    0   621    0     0   1408      0 --:--:-- --:--:-- --:--:--  1411\r\n100 66.4M  100 66.4M    0     0  8019k      0  0:00:08  0:00:08 --:--:-- 9169k\r\nDownloaded and unpacked Intel(R) MKL small libraries to /home/pi/projects/pytorch/third_party/ideep/mkl-dnn/external\r\nCMake Error at third_party/ideep/mkl-dnn/CMakeLists.txt:59 (message):\r\n  Intel(R) MKL-DNN supports 64 bit platforms only\r\n```\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/21551",
    "state": "closed",
    "labels": [
      "module: build",
      "triaged",
      "module: mkldnn"
    ],
    "created_at": "2019-06-08T00:25:42Z",
    "updated_at": "2019-09-10T08:46:33Z",
    "user": "baqwas"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 21477,
    "title": "Not obvious how to install torchvision with PyTorch source build",
    "body": "Previously, it used to be possible to build PyTorch from source, and then `pip install torchvision` and get torchvision available. Now that torchvision is binary distributions, this no longer works; to make matters worse, it explodes in non-obvious ways.\r\n\r\nWhen I had an existing install of torchvision 0.3.0, I got this error:\r\n\r\n```\r\nImportError: /scratch/ezyang/pytorch-tmp-env/lib/python3.7/site-packages/torchvision/_C.cpython-37m-x86_64-linux-gnu.so: u\r\nndefined symbol: _ZN3c106Device8validateEv\r\n```\r\n\r\nI reinstalled torchvision with `pip install torchvision`. Then I got this error:\r\n\r\n```\r\n  File \"/scratch/ezyang/pytorch-tmp-env/lib/python3.7/site-packages/torchvision/ops/boxes.py\", line 2, in <module>\r\n    from torchvision import _C\r\nImportError: libcudart.so.9.0: cannot open shared object file: No such file or directory\r\n```\r\n\r\n(I'm on a CUDA 10 system).\r\n\r\nIn the end, I cloned torchvision and built/installed it from source.",
    "url": "https://github.com/pytorch/pytorch/issues/21477",
    "state": "open",
    "labels": [
      "triaged",
      "module: vision"
    ],
    "created_at": "2019-06-06T18:04:12Z",
    "updated_at": "2019-06-11T22:10:40Z",
    "user": "ezyang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 21456,
    "title": "Where is the algorithm for conv being selected?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n\r\nHi,\r\nI would like to deploy PyTorch on some specific HW. Problem is it is very slow if the algorithms for conv are not changed. I'd like to rely to some specific algorithms - optimized for the HW. My problem is I cannot figure out where in PyTorch code of conv2d for example the actual algorithm is selected.\r\nThank you.\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/21456",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2019-06-06T11:25:27Z",
    "updated_at": "2019-07-04T14:23:56Z",
    "user": "snippler"
  },
  {
    "repo": "pytorch/examples",
    "number": 571,
    "title": "why only save the rank 0 model when use distributeddataparallel?",
    "body": "hi, should we save all the model in different rank when we use the distributeddataparallel? \r\ndifferent rank seems do not share the same bn parameters. do we need to save all the model in different rank? Thanks very much!",
    "url": "https://github.com/pytorch/examples/issues/571",
    "state": "open",
    "labels": [
      "distributed"
    ],
    "created_at": "2019-06-05T03:30:59Z",
    "updated_at": "2022-03-10T00:12:25Z",
    "comments": 0,
    "user": "v-wewei"
  },
  {
    "repo": "pytorch/examples",
    "number": 570,
    "title": "Why there is no tanh activation at the end of TransformerNet?",
    "body": "In Fast Style Transfer, it seems like there is no tanh layer at the end of TransformerNet model.\r\nThere is no gurantee that output values fti in certain range e.g. [0, 1] for PIL image.\r\n\r\nUsing only deconv is also valid? How does it work?",
    "url": "https://github.com/pytorch/examples/issues/570",
    "state": "open",
    "labels": [
      "good first issue"
    ],
    "created_at": "2019-06-03T06:10:19Z",
    "updated_at": "2022-03-10T00:08:18Z",
    "comments": 0,
    "user": "DongHwanJang"
  },
  {
    "repo": "pytorch/examples",
    "number": 568,
    "title": "Use official dataset for ImageNet?",
    "body": "As of  version `0.3.0`,  `torchvision` [officially supports](https://github.com/pytorch/vision/blob/v0.3.0/torchvision/datasets/imagenet.py) the `ImageNet` dataset. Do we want to use it in the corresponding example?\r\n\r\n### Cons\r\n\r\n- We break backward compatibility for earlier `torchvision` versions\r\n\r\n### Pros\r\n\r\n- We can add a `download` flag, which automates the download and extraction process without any further user interference\r\n- We can _spread the word_ that this rather famous dataset is now officially supported\r\n\r\nI can add a PR for this if we want to do this.",
    "url": "https://github.com/pytorch/examples/issues/568",
    "state": "closed",
    "labels": [],
    "created_at": "2019-05-31T13:51:39Z",
    "updated_at": "2022-03-10T00:34:59Z",
    "comments": 1,
    "user": "pmeier"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 517,
    "title": "The pipelined example of model_parallel_tutorial.py got worse performance",
    "body": "I download the example model_parallel_tutorial.py and execute it on my server. However the results don't match the results in the tutorial. I make sure the two GPUs are dedicate to the example. Is there any missed condition?\r\nNote. The two GPUs are Telsa P100 connected with NVLINK.\r\n\r\n![mp_vs_rn](https://user-images.githubusercontent.com/40190145/58627105-fc74c980-8308-11e9-8a8c-24175a0509ae.png)\r\n![split_size_tradeoff](https://user-images.githubusercontent.com/40190145/58627107-fc74c980-8308-11e9-9e72-cf56f612f978.png)\r\n![mp_vs_rn_vs_pp](https://user-images.githubusercontent.com/40190145/58627108-fd0d6000-8308-11e9-8abf-f72908050cb2.png)\r\n@mrshenli ",
    "url": "https://github.com/pytorch/tutorials/issues/517",
    "state": "closed",
    "labels": [],
    "created_at": "2019-05-30T10:31:21Z",
    "updated_at": "2019-05-30T13:52:59Z",
    "comments": 2,
    "user": "cofiiwu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 21117,
    "title": "How to open \"USE_LMDB\" by install from source code",
    "body": "## \ud83d\udcda Documentation\r\nlinux : ubuntu 16.04\r\n\r\nI follow the [doc](https://github.com/pytorch/pytorch#from-source) to install pytorch form source code. But I don't know how to change the install config, I want to open the \"USE_LMDB\".\r\nI run this cmd:  \r\n```\r\nexport CMAKE_PREFIX_PATH=${CONDA_PREFIX:-\"$(dirname $(which conda))/../\"}\r\npython setup.py install\r\n```\r\nthen I found the log  \"USE_LMDB: OFF\", I try to modify the CMakeLists.txt, and also try\r\n```\r\nUSE_LMDB=ON python setup.py install\r\n```\r\nthe log is also show \"USE_LMDB: OFF\", how can I modify the config ?",
    "url": "https://github.com/pytorch/pytorch/issues/21117",
    "state": "closed",
    "labels": [],
    "created_at": "2019-05-30T03:32:20Z",
    "updated_at": "2019-05-31T02:19:32Z",
    "user": "daohu527"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 21060,
    "title": "What is Mac system requirement to install caffe2?",
    "body": "Hi, @ezyang @apaszke @neoinmtv @soumith what is the Mac machine requirements to install caffe2?\r\n\r\nI have Mac mini with 500GB storage, 4GB RAM, and Intel Core i5 processor. is it possible to install caffe2 on my Mac mini?\r\n\r\n> OS: MacOS Mojave 10.14.2\r\n> Processor: Intel Core i5 2.5 GHz\r\n> Graphics: Intel HD Graphics 4000 1536 MB\r\n> RAM: 4GB DDR3\r\n> Storage: 500GB SATA",
    "url": "https://github.com/pytorch/pytorch/issues/21060",
    "state": "closed",
    "labels": [],
    "created_at": "2019-05-29T11:24:04Z",
    "updated_at": "2019-05-29T23:02:59Z",
    "user": "notebookdata"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 21015,
    "title": "How to use Infiniband for cpu-cluster with backend gloo?",
    "body": "Now I'm trying to build pytorch from source for my cpu-cluster with backend gloo.\r\nAfter installing pytorch, I got this information from install summay:\r\n```\r\n --   USE_DISTRIBUTED       : True\r\n --     USE_MPI             : ON\r\n --     USE_GLOO            : ON\r\n --     USE_GLOO_IBVERBS    : 1\r\n```\r\nIn my cluster, the network interface \"eno1\" represents Ethernet, and \"ib0\" represents Infiniband.\r\nI set the environment variable `GLOO_SOCKET_IFNAME=eno1`, and distributed pytorch works fine. But when I set `GLOO_SOCKET_IFNAME=ib0`, it will cause some error.\r\n\r\nWhat should I do?\r\nThanks.",
    "url": "https://github.com/pytorch/pytorch/issues/21015",
    "state": "open",
    "labels": [
      "oncall: distributed",
      "triaged"
    ],
    "created_at": "2019-05-28T11:41:53Z",
    "updated_at": "2019-07-26T02:26:22Z",
    "user": "sth1997"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 20993,
    "title": "The true value is not what it looks like",
    "body": "## \ud83d\udc1b Bug\r\n\r\nThe true value of the element of tensor seems not to be what it looks like and what it should be. \r\nThe debuger shows that a variable x is 1.0000, while `torch.sqrt(1.0 - torch.pow(x, 2))` is nan and `x > 1` is true.  What's worse, some other 1.0000 variable shows the opposite. They are all produced by computing cos, which means they should be no more than 1.\r\n\r\n## To Reproduce\r\n```\r\nx = _l2_norm(x, 1)\r\ncosine = torch.matmul(x, x.transpose(0, 1))\r\nsine = torch.sqrt(1.0 - torch.pow(cosine, 2))\r\n```\r\n```\r\ndef _l2_norm(input, axis=1):\r\n    norm = torch.norm(input, 2, axis, True)\r\n    output = torch.div(input, norm)\r\n    return output\r\n```\r\n\r\n\r\n## Expected behavior\r\n\r\nThere are some `nan` in diagonal of sine and `cosine < 1` behaves strange.\r\nI am wondering whether there are some tricks about storage I don't know.\r\n\r\n## Environment\r\n\r\nPyTorch version: 0.3.1\r\nIs debug build: No\r\nCUDA used to build PyTorch: 9.0.176\r\n\r\nOS: Ubuntu 16.04.1 LTS\r\nGCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609\r\nCMake version: version 3.5.1\r\n\r\nPython version: 2.7\r\nIs CUDA available: Yes\r\nCUDA runtime version: 9.2.148\r\nGPU models and configuration: \r\nGPU 0: GeForce GTX 1080 Ti\r\nGPU 1: GeForce GTX 1080 Ti\r\nGPU 2: GeForce GTX 1080 Ti\r\nGPU 3: GeForce GTX 1080 Ti\r\nGPU 4: GeForce GTX 1080 Ti\r\nGPU 5: GeForce GTX 1080 Ti\r\nGPU 6: GeForce GTX 1080 Ti\r\nGPU 7: GeForce GTX 1080 Ti\r\n\r\nNvidia driver version: 396.37\r\ncuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.4.1\r\n\r\nVersions of relevant libraries:\r\n[pip] Could not collect\r\n[conda] blas                      1.0                         mkl    defaults\r\n[conda] cuda92                    1.0                           0    pytorch\r\n[conda] mkl                       2019.1                      144    https://mirrors.ustc.edu.cn/anaconda/pkgs/main\r\n[conda] mkl-service               1.1.2            py37h90e4bf4_5    defaults\r\n[conda] mkl_fft                   1.0.10           py37h14c3975_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge\r\n[conda] mkl_random                1.0.2            py37h637b7d7_2    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge\r\n[conda] pytorch                   0.4.1           py37_cuda9.2.148_cudnn7.1.4_1  [cuda92]  pytorch\r\n[conda] torchfile                 0.1.0                      py_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge\r\n[conda] torchsample               0.1.3                    pypi_0    pypi\r\n[conda] torchvision               0.2.1                 py37_1000    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/20993",
    "state": "closed",
    "labels": [],
    "created_at": "2019-05-27T18:33:45Z",
    "updated_at": "2019-05-29T23:23:43Z",
    "user": "Woolseyyy"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 20988,
    "title": "How to do matrix multiplication between two 2D sparse directly and quickly",
    "body": "## \ud83d\ude80 Feature\r\nI want a function like torch.sparse.mm(sparse_matrix1, sparse_matrix2)\r\n\r\n## Motivation\r\nI know torch.sparse.mm(sparse_magrix1, sparse_matrix2.to_dense()) , but this will spend a lot of memory when sparse_matrix2's shape is large.",
    "url": "https://github.com/pytorch/pytorch/issues/20988",
    "state": "closed",
    "labels": [
      "module: sparse",
      "triaged"
    ],
    "created_at": "2019-05-27T15:46:32Z",
    "updated_at": "2021-01-04T17:58:49Z",
    "user": "Louis-udm"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 20902,
    "title": "How to speed up the TorchScipt code ?",
    "body": "## \u2753 Questions and Help\r\nHi! Recently I use the TorchScipt Module to produce the serialized model, then, I loaded the pt and predict the input, but I find it still at a low speed? Is that any tools or method to speed up? \r\n",
    "url": "https://github.com/pytorch/pytorch/issues/20902",
    "state": "closed",
    "labels": [],
    "created_at": "2019-05-24T09:01:56Z",
    "updated_at": "2019-05-24T13:59:03Z",
    "user": "JiYuanFeng"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 20705,
    "title": "How to reserve negative values of features extracting by register_forward_hook?",
    "body": "I am trying to extract features of a certain layer of a pretrained model. The fellowing code does work, however, the values of template_feature_map changed and I did nothing of it.\r\n\r\n    vgg_feature = models.vgg13(pretrained=True).features\r\n    template_feature_map=[]\r\n    def save_template_feature_map(self, input, output):\r\n        template_feature_map.append(output.detach())\r\n        print(template_feature_map)\r\n    template_handle = vgg_feature[5].register_forward_hook(save_template_feature_map)\r\n    vgg_feature(template[0])\r\n    print(template_feature_map)\r\n\r\nThe output of 6th layer of the model should have negative values, as first print(template_feature_map) shows. But, the negative values which should maintain in second print(template_feature_map) are changed to zeros, I don\u2019t know why. If you know the mechanism of this, please tell me how to keep the negative values.\r\n\r\nThe output of two print(template_feature_map):\r\n\r\n` [tensor([[[[-5.7389e-01, -2.7154e+00, -4.0990e+00,  ...,  4.1902e+00,\r\n            3.1757e+00,  2.2461e+00],\r\n          [-2.2217e+00, -4.3395e+00, -6.8158e+00,  ..., -1.4454e+00,\r\n            9.8012e-01, -2.3653e+00],\r\n          [-4.1940e+00, -6.3235e+00, -6.8422e+00,  ..., -2.8329e+00,\r\n            2.5570e+00, -2.7704e+00],\r\n          ...,\r\n          [-3.3250e+00,  1.3792e-01,  5.4926e+00,  ..., -4.1722e+00,\r\n           -6.1008e-01, -2.6037e+00],\r\n          [ 1.5377e+00,  6.0671e-01,  2.0974e+00,  ...,  1.2441e+00,\r\n            1.5033e+00, -2.7246e+00],\r\n          [ 6.8857e-01, -3.5160e-02,  6.7858e-01,  ...,  1.2052e+00,\r\n            1.4533e+00, -1.4160e+00]],\r\n\r\n         [[ 6.8798e-01,  1.6971e+00,  2.1629e+00,  ...,  3.1701e-01,\r\n            8.5424e-01,  2.8768e+00],\r\n          [ 1.4013e+00,  2.7217e+00,  2.1476e+00,  ...,  3.1156e+00,\r\n            4.4858e+00,  3.6936e+00],\r\n          [ 3.1807e+00,  2.2245e+00,  2.4665e+00,  ...,  1.3838e+00,\r\n            1.0580e-02, -3.1445e-03],\r\n          ...,\r\n          [-4.7298e+00, -3.3037e+00, -1.2982e+00,  ...,  2.3266e-01,\r\n            6.7711e+00,  3.8166e+00],\r\n          [-4.7972e+00, -5.4591e+00, -2.5201e+00,  ...,  3.7584e+00,\r\n            5.1524e+00,  2.3072e+00],\r\n          [-2.4306e+00, -2.8033e+00, -2.0912e+00,  ...,  1.9888e+00,\r\n            2.0582e+00,  1.9266e+00]],\r\n\r\n         [[-4.4257e+00, -4.6331e+00, -3.3580e-03,  ..., -8.2233e+00,\r\n           -7.4645e+00, -1.7361e+00],\r\n          [-4.5593e+00, -8.4195e+00, -8.8428e+00,  ..., -6.7950e+00,\r\n           -1.4665e+01, -2.5335e+00],\r\n          [-2.3481e+00, -3.8543e+00, -3.5965e+00,  ..., -1.5105e+00,\r\n           -1.6923e+01, -5.9852e+00],\r\n          ...,\r\n          [-8.0165e+00,  8.0185e+00,  6.5506e+00,  ...,  5.3241e+00,\r\n            3.3854e+00, -1.6342e+00],\r\n          [-1.3689e+01, -2.2930e+00,  4.7097e+00,  ...,  3.2021e+00,\r\n            2.9208e+00, -8.0228e-01],\r\n          [-1.3055e+01, -1.1470e+01, -8.4442e+00,  ...,  1.8155e-02,\r\n           -6.2866e-02, -2.0333e+00]],\r\n\r\n         ...,\r\n\r\n         [[ 3.4622e+00, -1.2417e+00, -5.0749e+00,  ...,  5.3184e+00,\r\n            1.4744e+01,  8.3968e+00],\r\n          [-2.7820e+00, -9.1911e+00, -1.1069e+01,  ...,  2.5380e+00,\r\n            9.8336e+00,  4.0623e+00],\r\n          [-3.9794e+00, -1.0140e+01, -9.9133e+00,  ...,  3.0999e+00,\r\n            5.5936e+00,  2.5775e+00],\r\n          ...,\r\n          [ 2.0299e+00,  2.1304e-01, -2.2307e+00,  ...,  1.1388e+01,\r\n            8.8098e+00,  1.8991e+00],\r\n          [ 8.0663e-01, -1.5073e+00,  3.3977e-01,  ...,  8.5316e+00,\r\n            4.9923e+00, -3.6818e-01],\r\n          [-3.5146e+00, -7.2647e+00, -5.4331e+00,  ..., -1.9781e+00,\r\n           -3.4463e+00, -4.9034e+00]],\r\n\r\n         [[-3.2915e+00, -7.3263e+00, -6.8458e+00,  ...,  2.3122e+00,\r\n            9.7774e-01, -1.3498e+00],\r\n          [-4.5396e+00, -8.6832e+00, -8.8582e+00,  ...,  7.1535e-02,\r\n           -4.1133e+00, -4.4045e+00],\r\n          [-4.8781e+00, -7.0239e+00, -4.7350e+00,  ..., -3.6954e+00,\r\n           -9.6687e+00, -8.8289e+00],\r\n          ...,\r\n          [-4.7072e+00, -4.4823e-01,  1.7099e+00,  ...,  3.7923e+00,\r\n            1.6887e+00, -4.3305e+00],\r\n          [-5.5120e+00, -3.2324e+00,  2.3594e+00,  ...,  4.6031e+00,\r\n            1.8856e+00, -4.0147e+00],\r\n          [-5.1355e+00, -5.5335e+00, -1.7738e+00,  ...,  1.6159e+00,\r\n           -1.3950e+00, -4.1055e+00]],\r\n\r\n         [[-2.0252e+00, -2.3971e+00, -1.6477e+00,  ..., -3.3740e+00,\r\n           -4.9965e+00, -2.1219e+00],\r\n          [-7.6059e-01, -3.3901e-01, -1.8980e-01,  ..., -4.3286e+00,\r\n           -7.1350e+00, -3.9186e+00],\r\n          [ 8.4101e-01,  1.3403e+00,  2.5821e-01,  ..., -5.1847e+00,\r\n           -7.1829e+00, -3.7724e+00],\r\n          ...,\r\n          [-6.0619e+00, -5.6475e+00, -1.6446e+00,  ..., -9.2322e+00,\r\n           -9.1981e+00, -5.5239e+00],\r\n          [-7.4606e+00, -7.6054e+00, -5.8401e+00,  ..., -7.6998e+00,\r\n           -6.4111e+00, -2.9374e+00],\r\n          [-6.4147e+00, -7.2813e+00, -6.1880e+00,  ..., -4.6726e+00,\r\n           -3.1090e+00, -7.8383e-01]]]])]\r",
    "url": "https://github.com/pytorch/pytorch/issues/20705",
    "state": "closed",
    "labels": [],
    "created_at": "2019-05-20T17:04:31Z",
    "updated_at": "2019-05-20T18:40:27Z",
    "user": "iminfine"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 20627,
    "title": "How to transfer tf.layers.dense to pytorch?",
    "body": "How to transfer tf.layers.dense to pytorch?\r\n\r\n~~~\r\ntf.layers.dense(post_outputs, hp.num_freq)\r\n~~~",
    "url": "https://github.com/pytorch/pytorch/issues/20627",
    "state": "closed",
    "labels": [],
    "created_at": "2019-05-17T04:40:19Z",
    "updated_at": "2019-05-17T04:55:15Z",
    "user": "DonggeunYu"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 20566,
    "title": " What is a C ++ torch api similar to the registor_hook function in Python?",
    "body": "I want to know the backward grdient value of a particular layer.\r\nIn Python, there is a function called registor_hook. C ++ does not have the same function. \r\nIs there a similar method?",
    "url": "https://github.com/pytorch/pytorch/issues/20566",
    "state": "closed",
    "labels": [],
    "created_at": "2019-05-16T02:27:37Z",
    "updated_at": "2019-05-16T11:39:28Z",
    "user": "Navifra-Kerry"
  },
  {
    "repo": "pytorch/examples",
    "number": 557,
    "title": "[ImageNet] Where is the checkpoint and best model?",
    "body": "I ran `main.py` as follows:\r\n\r\n`python main.py -a resnet50 --dist-url 'tcp://127.0.0.1:FREEPORT' --dist-backend 'nccl' --multiprocessing-distributed --world-size 1 --rank 0 [imagenet-folder with train and val folders]`\r\n\r\nI can't find any ckpt files or model files in the current directory. \r\n\r\nSomebodies have the same problem. See the latest replies of this issue:\r\nhttps://github.com/pytorch/examples/issues/292",
    "url": "https://github.com/pytorch/examples/issues/557",
    "state": "closed",
    "labels": [],
    "created_at": "2019-05-10T08:36:12Z",
    "updated_at": "2022-03-10T05:12:16Z",
    "user": "dqgdqg"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 162,
    "title": "Citation in publication",
    "body": "Can you provide an article so that this work can be cited?",
    "url": "https://github.com/huggingface/neuralcoref/issues/162",
    "state": "closed",
    "labels": [
      "question",
      "wontfix"
    ],
    "created_at": "2019-05-10T05:56:55Z",
    "updated_at": "2019-10-16T08:47:51Z",
    "user": "pradipcyb"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 20316,
    "title": "What is the meaning of such a formula in some functions",
    "body": "## \ud83d\udcda Documentation\r\nWhat is the meaning of such a formula in some functions\uff1f Just like the formula in the following picture\r\nmath::\r\n        v = \\frac{v}{\\max(\\lVert v \\rVert_p, \\epsilon)}.\r\n![image](https://user-images.githubusercontent.com/22348625/57455073-e8efb900-729c-11e9-895f-588ec050ed4b.png)\r\nIs my chrome lack of some Plug-ins so they can not show correctly?? ",
    "url": "https://github.com/pytorch/pytorch/issues/20316",
    "state": "closed",
    "labels": [],
    "created_at": "2019-05-09T13:01:12Z",
    "updated_at": "2019-05-09T14:22:28Z",
    "user": "heslowen"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 20271,
    "title": "Official instructions for how to build libtorch don't have same structure as prebuilt binaries",
    "body": "On Slack, Geoffrey Yu asked:\r\n\r\n> Are there instructions for building libtorch from source? I feel like I'm missing something since I've tried building with `tools/build_libtorch.py`. However the build output doesn't seem to have the same structure as the prebuilt libtorch that you can download on pytorch.org\r\n\r\n@pjh5 responded: \"If you're curious, here's exactly what builds the libtorches https://github.com/pytorch/builder/blob/master/manywheel/build_common.sh#L120 . It's mostly tools/build_libtorch.py but also copies some header files from a wheel file\"\r\n\r\nThis is not mentioned at all in the \"how to build libtorch\" documentation: https://github.com/pytorch/pytorch/blob/master/docs/libtorch.rst Normally we give build instructions in README but there are no libtorch build instructions in the README. Additionally, the C++ API docs https://pytorch.org/cppdocs/ don't explain how to build from source.\r\n\r\nSome more users being confused about the matter:\r\n* https://discuss.pytorch.org/t/building-libtorch-c-distribution-from-source/27519/2\r\n* https://github.com/pytorch/pytorch/issues/20156\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/20271",
    "state": "closed",
    "labels": [
      "high priority",
      "module: binaries",
      "module: build",
      "module: docs",
      "module: cpp",
      "triaged"
    ],
    "created_at": "2019-05-08T13:02:51Z",
    "updated_at": "2019-05-30T19:52:28Z",
    "user": "ezyang"
  },
  {
    "repo": "huggingface/transformers",
    "number": 591,
    "title": "What is the use of [SEP]?",
    "body": "Hello. I know that [CLS] means the start of a sentence and [SEP] makes BERT know the second sentence has begun. [SEP] can\u2019t stop one sentence from extracting information from another sentence. However, I have a question.\r\nIf I have 2 sentences, which are s1 and s2., and our fine-tuning task is the same. In one way, I add special tokens and the input looks like [CLS]+s1+[SEP] + s2 + [SEP]. In another, I make the input look like [CLS] + s1 + s2 + [SEP]. When I input them to BERT respectively, what is the difference between them? Will the s1 in second one integrate more information from s2 than the s1 in first one does? Will the token embeddings change a lot between the 2 methods?\r\nThanks for any help!",
    "url": "https://github.com/huggingface/transformers/issues/591",
    "state": "closed",
    "labels": [],
    "created_at": "2019-05-07T04:12:16Z",
    "updated_at": "2019-05-21T10:51:31Z",
    "user": "RomanShen"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 20090,
    "title": "How to add dynamically allocated strings to Pickler?",
    "body": "The following code prints `111` and `111`, instead of `222` and `111`, because `222` is skipped [here](https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/pickler.cpp#L68). Is this by design as Pickler only works for statically allocated strings? Or is there a way to correctly add dynamically allocated strings? (and all other types listed [here](https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/pickler.cpp#L104-L114))? \r\n\r\n```c++\r\n  std::string str1 = \"111\";\r\n  std::string str2 = \"222\";\r\n\r\n  std::vector<at::Tensor> tensor_table;\r\n  torch::jit::Pickler pickler(&tensor_table);\r\n  pickler.start();\r\n  pickler.addIValue(str1);\r\n  pickler.addIValue(str2);\r\n  pickler.finish();\r\n\r\n  auto buffer = new char[pickler.stack().size()];\r\n  memcpy(buffer, pickler.stack().data(), pickler.stack().size());\r\n\r\n  torch::jit::Unpickler unpickler(buffer, pickler.stack().size(), &tensor_table);\r\n  auto values = unpickler.parse_ivalue_list();\r\n  std::cout << values.back().toStringRef() << std::endl;\r\n  values.pop_back();\r\n  std::cout << values.back().toStringRef() << std::endl;\r\n  values.pop_back();\r\n```\r\n\r\ncc @zdevito ",
    "url": "https://github.com/pytorch/pytorch/issues/20090",
    "state": "closed",
    "labels": [
      "oncall: jit",
      "triaged"
    ],
    "created_at": "2019-05-03T04:43:08Z",
    "updated_at": "2019-05-17T21:45:41Z",
    "user": "mrshenli"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 157,
    "title": "Performance?",
    "body": "Hi there, \r\n\r\nThanks for the nice package! \r\n\r\nAre there any performance comparisons with other systems? (say, Lee et el'18: https://arxiv.org/pdf/1804.05392.pdf). \r\n\r\n",
    "url": "https://github.com/huggingface/neuralcoref/issues/157",
    "state": "closed",
    "labels": [
      "question",
      "perf / accuracy"
    ],
    "created_at": "2019-04-30T21:38:56Z",
    "updated_at": "2019-10-16T08:48:09Z",
    "user": "danyaljj"
  },
  {
    "repo": "pytorch/examples",
    "number": 554,
    "title": "Where is the hook?",
    "body": "On the tutorial, I see it says this is an example of hook. So where is the hook?",
    "url": "https://github.com/pytorch/examples/issues/554",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-30T11:38:40Z",
    "updated_at": "2019-05-27T21:00:53Z",
    "user": "yanbixing"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 19908,
    "title": "c++/pytorch How to convert tensor to image array?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\nI would like to convert a tensor to image array and use tensor.data<short>() method. But it doesn't work. \r\n\r\nMy function is showed below:\r\n```\r\n#include <torch/script.h> // One-stop header.\r\n\r\n#include <iostream>\r\n#include <memory>\r\n#include <sstream>\r\n#include <string>\r\n#include <vector>\r\n\r\n#include \"itkImage.h\"\r\n#include \"itkImageFileReader.h\"\r\n#include \"itkImageFileWriter.h\"\r\n#include \"itkImageRegionIterator.h\"\r\n\r\n//////////////////////////////////////////////////////\r\n//Goal: load jit script model and segment myocardium\r\n//Step: 1. load jit script model\r\n//      2. load input image\r\n//      3. predict by model\r\n//      4. save the result to file\r\n//////////////////////////////////////////////////////\r\ntypedef short                                 \t\t\t\tPixelType;\r\nconst unsigned int Dimension = 3;\r\ntypedef itk::Image<PixelType, Dimension>      \t\t\t\tImageType;\r\ntypedef itk::ImageFileReader<ImageType>       \t\t\t\tReaderType;\r\ntypedef itk::ImageRegionIterator<ImageType> \t\t\t    IteratorType;\r\n\r\nbool itk2tensor(ImageType::Pointer itk_img, torch::Tensor &tensor_img) {\r\n\t\r\n\ttypename ImageType::RegionType region = itk_img->GetLargestPossibleRegion();\r\n\tconst typename ImageType::SizeType size = region.GetSize();\r\n\tstd::cout << \"Input size: \" << size[0] << \", \" << size[1]<< \", \" << size[2] << std::endl;\r\n\r\n\tint len = size[0] * size[1] * size[2];\r\n\tshort rowdata[len];\r\n\tint count = 0;\r\n\tIteratorType iter(itk_img, itk_img->GetRequestedRegion());\r\n\t\r\n\t// convert itk to array\r\n\tfor (iter.GoToBegin(); !iter.IsAtEnd(); ++iter) {\r\n\t\trowdata[count] = iter.Get();\r\n\t\tcount++;\r\n\t}\r\n\tstd::cout << \"Convert itk to array DONE!\" << std::endl;\r\n\r\n\t// convert array to tensor\r\n\ttensor_img = torch::from_blob(rowdata, {1, 1, (int)size[0], (int)size[1], (int)size[2]}, torch::kShort).clone();\r\n\ttensor_img = tensor_img.toType(torch::kFloat);\r\n\ttensor_img = tensor_img.to(torch::kCUDA);\r\n\ttensor_img.set_requires_grad(0);\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nbool tensor2itk(torch::Tensor &t, ImageType::Pointer itk_img) {\r\n\r\n\tstd::cout << \"tensor dtype = \" << t.dtype() << std::endl;\r\n\tstd::cout << \"tensor size = \" << t.sizes() << std::endl;\r\n\tt = t.toType(torch::kShort);\r\n\tshort * array = t.data<short>();\r\n\r\n\tImageType::IndexType start;\r\n\tstart[0] = 0;  // first index on X\r\n\tstart[1] = 0;  // first index on Y\r\n\tstart[2] = 0;  // first index on Z\r\n\r\n\tImageType::SizeType  size;\r\n\tsize[0] = t.size(2);\r\n\tsize[1] = t.size(3);\r\n\tsize[2] = t.size(4);\r\n\r\n\tImageType::RegionType region;\r\n\tregion.SetSize( size );\r\n\tregion.SetIndex( start );\r\n\r\n\titk_img->SetRegions( region );\r\n\titk_img->Allocate();\r\n\r\n\tint len = size[0] * size[1] * size[2];\r\n\r\n\tIteratorType iter(itk_img, itk_img->GetRequestedRegion());\r\n\tint count = 0;\r\n\t// convert array to itk\r\n\tstd::cout << \"start!\" << std::endl;\r\n\tfor (iter.GoToBegin(); !iter.IsAtEnd(); ++iter) {\r\n\t\tshort temp = *array++;    //  ERROR!\r\n\t\tstd::cout << temp << \" \";\r\n\t\titer.Set(temp);\r\n\t\tcount++;\r\n\t}\r\n\tstd::cout << \"end!\" << std::endl;\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nint main(int argc, const char* argv[]) {\r\n\tint a, b, c;\r\n\tif (argc != 4) {\r\n\t\tstd::cerr << \"usage: automyo input jitmodel output\\n\";\r\n\t\treturn -1;\r\n\t}\r\n\r\n\tstd::cout << \"=========  jit start  =========\\n\";\r\n\t// 1. load jit script model\r\n\tstd::cout << \"Load script module: \" << argv[2] << std::endl;\r\n\tstd::shared_ptr<torch::jit::script::Module> module = torch::jit::load(argv[2]);\r\n\tmodule->to(at::kCUDA);\r\n\r\n\t// assert(module != nullptr);\r\n\tstd::cout << \"Load script module DONE\" << std::endl;\r\n\r\n\t// 2. load input image\r\n\tconst char* img_path = argv[1];\r\n\tstd::cout << \"Load image: \" << img_path << std::endl;\r\n\r\n\tReaderType::Pointer reader = ReaderType::New();\r\n\r\n\tif (!img_path) {\r\n\t\tstd::cout << \"Load input file error!\" << std::endl;\r\n\t\treturn false;\r\n\t}\r\n\r\n\treader->SetFileName(img_path);\r\n\treader->Update();\r\n\r\n\tstd::cout << \"Load image DONE!\" << std::endl;\r\n\r\n\tImageType::Pointer itk_img = reader->GetOutput();\r\n\r\n\ttorch::Tensor tensor_img;\r\n\tif (!itk2tensor(itk_img, tensor_img)) {\r\n\t\tstd::cerr << \"itk2tensor ERROR!\" << std::endl;\r\n\t}\r\n\telse {\r\n\t\tstd::cout << \"Convert array to tensor DONE!\" << std::endl;\r\n\t}\r\n\r\n\tstd::vector<torch::jit::IValue> inputs;\r\n\tinputs.push_back(tensor_img);\r\n\r\n\t// 3. predict by model\r\n\ttorch::Tensor y = module->forward(inputs).toTensor();\r\n\tstd::cout << \"Inference DONE!\" << std::endl;\r\n\r\n\t// 4. save the result to file\r\n\ttorch::Tensor seg = y.gt(0.5);\r\n\t// std::cout << seg << std::endl;\r\n\r\n\tImageType::Pointer out_itk_img = ImageType::New();\r\n\tif (!tensor2itk(seg, out_itk_img)) {\r\n\t\tstd::cerr << \"tensor2itk ERROR!\" << std::endl;\r\n\t}\r\n\telse {\r\n\t\tstd::cout << \"Convert tensor to itk DONE!\" << std::endl;\r\n\t}\r\n\r\n\tstd::cout << out_itk_img << std::endl;\r\n\r\n\treturn true;\r\n}\r\n```\r\n\r\nThe runtime log is showed below:\r\n\r\n\r\n> Load script module: model_myo_jit.pt\r\n> Load script module DONE\r\n> Load image: patch_6.nii.gz\r\n> Load image DONE!\r\n> Input size: 128,",
    "url": "https://github.com/pytorch/pytorch/issues/19908",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-29T07:49:29Z",
    "updated_at": "2019-04-29T09:58:24Z",
    "user": "JingLiRaysightmed"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 19822,
    "title": " How to use torch.tensor(n)  in Python3 to adapt to \u2019 at::TensorImpl\u2018  ",
    "body": "## \u2753 Questions and Help\r\nHi ,when nms_cpp compiled  by cpp_extension ,it didnt work  but work in pytorch0.4.0.: \r\n\r\n \r\n## TypeError: gpu_nms(): incompatible function arguments. The following argument types are supported:\r\n    1. (arg0: at::TensorImpl, arg1: at::TensorImpl, arg2: at::TensorImpl, arg3:\r\nfloat) -> int\r\n## Invoked with: \r\ntensor([ 2.5353e+09,  2.5238e+09, -4.5295e+18,  ...,  4.7854e+18,\r\n         4.7424e+18,  4.7895e+18]), tensor([ 566]), \r\ntensor([[ 146.1686,  111.1691,  242.2774,  288.5695,    0.8267],\r\n        [ 144.7030,  108.2768,  244.0824,  282.2564,    0.8234],\r\n        [ 144.5566,  110.4112,  243.3897,  283.4086,    0.8225],\r\n        ...,\r\n        [ 100.9274,   81.2732,  155.0707,  130.5494,    0.0500],\r\n        [   0.0000,  185.7541,   47.3124,  276.2884,    0.0500],\r\n        [   4.5178,   57.4754,   37.1159,  115.0753,    0.0500]], device='cuda:0\r\n'), // \r\n0.5\r\n## cpp file:\r\n## Code\r\n// ------------------------------------------------------------------\r\n// Faster R-CNN\r\n// Copyright (c) 2015 Microsoft\r\n// Licensed under The MIT License [see fast-rcnn/LICENSE for details]\r\n// Written by Shaoqing Ren\r\n// ------------------------------------------------------------------\r\n#include <torch/script.h>\r\n#include<torch/serialize/tensor.h>\r\n#include <THC/THC.h>\r\n#include <ATen/ATen.h>//state\r\n#include <TH/TH.h>\r\n#include <THC/THCTensorCopy.h>\r\n//#include <TH/generic/THTensorCopy.h>\r\n#include <THC/generic/THCTensorCopy.h>//generic/THCTensorCopy.h\r\n#include <THC/THCTensorCopy.hpp>\r\n#include <math.h>\r\n#include <stdio.h>\r\n\r\n#include <cstddef>\r\n\r\n#include <torch/torch.h>\r\n#include <torch/script.h>\r\n\r\n#include \"cuda/nms_kernel2.h\"\r\n#include \"nms.h\"\r\n\r\n//src/nms_cuda.cpp(27): error C2440: \u201c\u521d\u59cb\u5316\u201d: \u65e0\u6cd5\u4ece\u201c\r\n//std::unique_ptr<THCState,void (__cdecl *)(THCState *)>\r\n//THCState *state = at::globalContext().thc_state;\r\n//std::unique_ptr<THCState,void (__cdecl *)(THCState *)> state= at::globalContext().thc_state;\r\n\t\r\n THCState *state;\r\n\r\nint gpu_nms(THLongTensor * keep, THLongTensor* num_out, THCudaTensor * boxes, float nms_overlap_thresh) {\r\n  // boxes has to be sorted\r\n  THArgCheck(THLongTensor_isContiguous(keep), 0, \"boxes must be contiguous\");\r\n  THArgCheck(THCudaTensor_isContiguous(state, boxes), 2, \"boxes must be contiguous\");\r\n \r\n  // Number of ROIs\r\n  int64_t boxes_num = THCudaTensor_size(state, boxes, 0);\r\n  int64_t boxes_dim = THCudaTensor_size(state, boxes, 1);\r\n\r\n  float* boxes_flat = THCudaTensor_data(state, boxes);\r\n\r\n  const int64_t col_blocks = DIVUP(boxes_num, threadsPerBlock);\r\n  printf(\"100,%d,%d ,%d ,%d \"  , *state,boxes_num, boxes_dim, col_blocks);\r\n  //, *state\r\n  THCudaLongTensor * mask = THCudaLongTensor_newWithSize2d(state, boxes_num, col_blocks);\r\n//#unsigned\r\n  unsigned long long* mask_flat = (unsigned long long* )THCudaLongTensor_data(state, mask);\r\n\r\n//_mns from \r\n  _nms(boxes_num, boxes_flat, mask_flat, nms_overlap_thresh);\r\n\r\n\r\n  THLongTensor * mask_cpu = THLongTensor_newWithSize2d(boxes_num, col_blocks);\r\n  //THCudaTensor_copyFloat\r\n  //THLongTensor_copyCuda(state, mask_cpu, mask); #no found\r\n  //THCTensor_(copyAsyncCPU)\r\n  //THTensor_copyCuda(state, mask_cpu, mask);\r\n  //THLongTensor_copyCudaLong(state, mask_cpu, mask);\r\n  //not found   cu file\r\n  //THCStorage_copyCudaLong(state, mask_cpu, mask);#\r\n  //THCTensor_copy(state, mask_cpu, mask);\r\n  //THCudaTensor_copyLong(state, mask_cpu, mask); \r\n  \r\n  //THLongTensor_copyCudaLong(state, mask_cpu, mask);\r\n  //copy_from_cpu(state, mask_cpu, mask);\r\n  //ok mask 2 mask_cpu \r\n  //\r\n  THCudaLongTensor_freeCopyTo(state, mask_cpu, mask);  \r\n  //Copy_Long(state, mask_cpu, mask);  \r\n  //copyAsyncCuda \r\n  //THTensor_copyLong(state, mask_cpu, mask);\r\n  \r\n  THCudaLongTensor_free(state, mask);\r\n  \r\n//unsigned\r\n   long long * mask_cpu_flat = THLongTensor_data(mask_cpu);\r\n\r\n  THLongTensor * remv_cpu = THLongTensor_newWithSize1d(col_blocks);\r\n  //unsigned\r\n   long long* remv_cpu_flat = THLongTensor_data(remv_cpu);\r\n  THLongTensor_fill(remv_cpu, 0);\r\n\r\n  int64_t * keep_flat = THLongTensor_data(keep);\r\n  long num_to_keep = 0;\r\n\r\n  int i, j;\r\n  for (i = 0; i < boxes_num; i++) {\r\n    int nblock = i / threadsPerBlock;\r\n    int inblock = i % threadsPerBlock;\r\n\r\n    if (!(remv_cpu_flat[nblock] & (1ULL << inblock))) {\r\n      keep_flat[num_to_keep++] = i;\r\n       long long *p = &mask_cpu_flat[0] + i * col_blocks;\r\n      for (j = nblock; j < col_blocks; j++) {\r\n        remv_cpu_flat[j] |= p[j];\r\n      }\r\n    }\r\n  }\r\n\r\n  int64_t * num_out_flat = THLongTensor_data(num_out);\r\n  * num_out_flat = num_to_keep;\r\n\r\n  THLongTensor_free(mask_cpu);\r\n  THLongTensor_free(remv_cpu);\r\n\r\n  \r\n  //return 1; \r\n  return num_to_keep;\r\n}\r\nPYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {\r\n  m.def(\"cpu_nms\", &cpu_nms, \"nms cpu_nms \");\r\n\r\n  m.def(\"gpu_nms\", &gpu_nms, \"nms gpu_nms (CUDA)\");\r\n\r\n}\r\n\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/19822",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-27T08:40:06Z",
    "updated_at": "2019-04-28T07:42:41Z",
    "user": "liuchanfeng165"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 19744,
    "title": "How to select cl.exe for a config of cpp_extension?",
    "body": "## \u2753 Questions and Help\r\nHi, I got this error and dont wanna change vs15 again because  the compiler keeps in OS,if I use  cl.exe of VS2015 not VS2017 to compile my cpp_extension by  setup.py and how to modify setup.py\r\n![image](https://user-images.githubusercontent.com/18642811/56752176-46bed400-67ba-11e9-8852-072930b90dde.png)\r\n## setup.py\r\nfrom setuptools import setup\r\nimport os\r\n#import torch\r\nfrom torch.utils.cpp_extension import BuildExtension, CUDAExtension\r\n\r\n_ext_src_root= ['E:/Program Files (x86)/Microsoft Visual Studio 14.0/VC'] #\r\ncx_path= 'E:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64'\r\ncc = os.environ.get('CC', cx_path+'/cl.exe')\r\ncxx = os.environ.get('CXX', cx_path+'/cl.exe')\r\ncl=os.environ.get('cl', cx_path+'/cl.exe')\r\n\r\nprint(cxx)\r\nvs_bin= '%VS140COMNTOOLS%/../../VC/bin/amd64'\r\n#nvcc sets --compiler-bindir for compiler ; -ccbin\r\nsetup(\r\n    name='lltm_cuda',\r\n    ext_modules=[\r\n        CUDAExtension('lltm_cuda', [\r\n            'lltm_cuda.cpp',\r\n            'lltm_cuda_kernel.cu',\r\n               ],\r\n            # include_dirs=torch.utils.cpp_extension.include_paths(),\r\n            extra_compile_args={'cxx': ['-g'],\r\n                                'nvcc': ['-O2' , '--compiler-bindir' \" {}\".format(cx_path+'/cl.exe')]}\r\n                      #extra_cflags\r\n             # extra_compile_args ={\r\n             #           \"cxx\": [\"-O2\", \"-I{}\".format(\"{}/include\".format(_ext_src_root))],\r\n             #          # \"nvcc\": [\"-O2\", \"-I{}\".format(\"{}/include\".format(_ext_src_root))],\r\n             #      \"cl\": [\"-O2\", \"-I{}\".format(\"{}/include\".format(_ext_src_root))],\r\n             #  },\r\n\r\n              ),\r\n    ],\r\n    cmdclass={\r\n        'build_ext': BuildExtension\r\n    })\r\n##  add list\r\njust to compile ' .cu' not '.cpp ', mabe modify there or not?\r\nline 240 in cpp_extension.py :+1: \r\n        # Register .cu and .cuh as valid source extensions.\r\n        self.compiler.src_extensions += ['.cu', '.cuh']\r\n        # Save the original _compile method for later.\r\n        if self.compiler.compiler_type == 'msvc':\r\n            self.compiler._cpp_extensions += ['.cu', '.cuh']\r\n            original_compile = self.compiler.compile\r\n            original_spawn = self.compiler.spawn\r\n        else:\r\n            original_compile = self.compiler._compile\r\n\r\n## Thanks a lot",
    "url": "https://github.com/pytorch/pytorch/issues/19744",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-25T16:29:54Z",
    "updated_at": "2019-04-26T08:28:24Z",
    "user": "liuchanfeng165"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 19611,
    "title": "How to understand the results of model. Eval () and how to obtain the predictive probability value?",
    "body": "Hello everyone\r\nI've been using tensorflow before, but I met torch when I added functionality to a tool. My ultimate goal was to get the classification probability. On a binary classification problem, I used model. Eval () (inputs). numpy () to get the prediction results.\r\n\r\nlike this \r\n2.19903\t-2.06323\r\n2.22841\t-2.09061\r\n2.20833\t-2.07209\r\n2.22888\t-2.09125\r\n2.22644\t-2.08869\r\n\r\nI don't know how to convert it to probability, or should I use other commands to get classification probability?\r\n\r\nI hope I can get help. Thank you.",
    "url": "https://github.com/pytorch/pytorch/issues/19611",
    "state": "closed",
    "labels": [
      "triaged"
    ],
    "created_at": "2019-04-23T09:29:27Z",
    "updated_at": "2019-04-23T19:26:02Z",
    "user": "xujiameng"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 19561,
    "title": "How to do prediction/inference for a batch of images at a time with libtorch?",
    "body": "Anybody knows how to do prediction/inference for a batch of images at a time with libtorch/pytorch C++?\r\nany reply would be appreciated, thank you!\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/19561",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-22T08:40:04Z",
    "updated_at": "2019-04-22T20:59:27Z",
    "user": "asa008"
  },
  {
    "repo": "pytorch/examples",
    "number": 547,
    "title": "where can I get the inference code for classification?",
    "body": "I have trained the resnet-18 model for classification on my own dataset with examples/imagenet/main.py. And now I want to infernece the images, but there is no inference code.",
    "url": "https://github.com/pytorch/examples/issues/547",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-22T03:20:25Z",
    "updated_at": "2019-04-24T10:50:50Z",
    "comments": 2,
    "user": "ShaneYS"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 19453,
    "title": "How to load PyTorch model with LSTM using C++ api",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. Establish a PyTorch model with LSTM module using python, and store the script module after using torch.jit.trace. Python code like this:\r\n\r\n```python\r\nclass MyModule(nn.Module):\r\n    def __init__(self, N, M):\r\n        super(MyModule, self).__init__()\r\n        self.lstm = nn.LSTM(M, M, batch_first=True)\r\n        self.linear = nn.Linear(M, 1)\r\n\r\n    def forward(self, inputs, h0, c0):\r\n\r\n        output, (_, _) = self.lstm(inputs, h0, c0)\r\n        output, _ = torch.max(output, dim=1)\r\n        # output, _ = torch.max(inputs, dim=1)\r\n        output = self.linear(output)\r\n        return output\r\n\r\nbatch_size = 8\r\nh = 33\r\nw = 45\r\nmodel =  MyModule(h, w)\r\ndata = np.random.normal(1, 1, size=(batch_size, h, w))\r\ndata = torch.Tensor(data)\r\nh0, c0 = torch.zeros(1, batch_size, w), torch.zeros(1, batch_size, w)\r\n\r\ntraced_script_module = torch.jit.trace(model, (data, h0,c0))\r\ntraced_script_module.save('model.pt')\r\n```\r\n\r\n\r\n\r\n2. Load the model and move the model to GPU, then when the script exit, there is a core dump. However, If we don't move the model to gpu, the cpp script exits normally.My cpp script like this:\r\n\r\n```c++\r\nint main(int argc, const char* argv[]) {\r\n  if (argc != 2) {\r\n    std::cerr << \"usage: example-app <path-to-exported-script-module>\\n\";\r\n    return -1;\r\n  }\r\n\r\n  // Deserialize the ScriptModule from a file using torch::jit::load().\r\n  std::shared_ptr<torch::jit::script::Module> module = torch::jit::load(argv[1]);\r\n\r\n  assert(module != nullptr);\r\n  std::cout << \"ok\\n\";\r\n  this->module->to(at::Device(\"cuda:0\"))\r\n\r\n  vector<torch::jit::IValue> inputs;\r\n  int b = 2, h = 33, w = 45;\r\n  vector<float> data(b*h*w, 1.0);\r\n  torch::Tensor data_tensor = torch::from_blob(data.data(), {b, h, w}.to(at::Device(\"cuda:0\"));\r\n  torch::Tensor h0 = torch::from_blob(vector<float>(1*b*w, 0.0), {b, h, w}).to(at::Device(\"cuda:0\"));\r\n  torch::Tensor c0 = torch::from_blob(vector<float>(1*b*w, 0.0), {b, h, w}).to(at::Device(\"cuda:0\"));\r\n  inputs.push_back(data_tensor);\r\n  inputs.push_back(h0);\r\n  inputs.push(c0);\r\n  torch::Tensor output = module->forward(inputs).toTensor().cpu();\r\n  auto accessor = output.accessor<float, 2>();\r\n  vector<float> answer(b);\r\n  for (int i=0; i<accessor.size(0); ++i){\r\n        answer[i] = accessor[i][0];\r\n  }\r\n  cout << \"predict ok\" << endl;\r\n}\r\n```\r\n\r\n> Note: There is a bug to move init hidden state tensor of lstm to gpu [link](https://github.com/pytorch/pytorch/issues/15272) I use two methods to solve this problem, one is to specify the device in python model using hard code, another is to pass init hidden state as input parameter of forward in cpp script, which may cause a warning [link](https://discuss.pytorch.org/t/rnn-module-weights-are-not-part-of-single-contiguous-chunk-of-memory/6011/14)\r\n\r\nthe gdb trace info like this:\r\n\r\n```shell\r\n(gdb) where\r\n#0  0x00007ffff61ca9fe in ?? () from /usr/local/cuda/lib64/libcudart.so.10.0\r\n#1  0x00007ffff61cf96b in ?? () from /usr/local/cuda/lib64/libcudart.so.10.0\r\n#2  0x00007ffff61e4be2 in cudaDeviceSynchronize () from /usr/local/cuda/lib64/libcudart.so.10.0\r\n#3  0x00007fffb945dcf4 in cudnnDestroy () from repo/pytorch_cpp/libtorch/lib/libcaffe2_gpu.so\r\n#4  0x00007fffb4fca17d in std::unordered_map<int, std::vector<at::native::(anonymous namespace)::Handle, std::allocator<at::native::(anonymous namespace)::Handle> >, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, std::vector<at::native::(anonymous namespace)::Handle, std::allocator<at::native::(anonymous namespace)::Handle> > > > >::~unordered_map() () from repo/pytorch_cpp/libtorch/lib/libcaffe2_gpu.so\r\n#5  0x00007fffb31fe615 in __cxa_finalize (d=0x7fffe8519680) at cxa_finalize.c:83\r\n#6  0x00007fffb4dd3ac3 in __do_global_dtors_aux () from repo/pytorch_cpp/libtorch/lib/libcaffe2_gpu.so\r\n#7  0x00007fffffffe010 in ?? ()\r\n#8  0x00007ffff7de5b73 in _dl_fini () at dl-fini.c:138\r\nBacktrace stopped: frame did not save the PC\r\n\r\n```\r\n\r\n3. When I remove the LSTM in python model, then the cpp script exits normally.\r\n\r\n4. I guess the hidden state of LSTM cause the core dump, maybe relate to the release the init hidden state memory?\r\n\r\n\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\n\r\nSo, When I want to load a model with LSTM using c++, how to deal with the hidden state, and how to avoid core dump?\r\n\r\n## Environment\r\n\r\nPyTorch version: 1.0.1.post2\r\nIs debug build: No\r\nCUDA used to build PyTorch: 10.0.130\r\n\r\nOS: Ubuntu 18.04.2 LTS\r\nGCC version: (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0\r\nCMake version: version 3.10.2\r\n\r\nPython version: 3.6\r\nIs CUDA available: Yes\r\nCUDA runtime version: 10.0.130\r\nGPU models and configuration:\r\nGPU 0: GeForce RTX 2080 Ti\r\nGPU 1: GeForce RTX 2080 Ti\r\n\r\nNvidia driver version: 410.48\r\ncuDNN version: Could not collect\r\n\r\nVersions of relevant libraries:\r\n[pip3] numpy==1",
    "url": "https://github.com/pytorch/pytorch/issues/19453",
    "state": "open",
    "labels": [
      "module: cpp",
      "triaged"
    ],
    "created_at": "2019-04-19T02:11:06Z",
    "updated_at": "2024-07-24T20:52:00Z",
    "user": "SixerWang"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 484,
    "title": "different results",
    "body": "HI, i copied to code exactly and and ran with all the appropriate downloads and im not achieving the resutls stated with 40 epochs. the loss stays at around 2.2 with test accuracy of 100/837 .. around 11%.. \r\n\r\nis there something i need to change to get over 50% accuracy ? ",
    "url": "https://github.com/pytorch/tutorials/issues/484",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-18T16:04:34Z",
    "updated_at": "2021-06-16T17:49:27Z",
    "comments": 1,
    "user": "taylerpauls"
  },
  {
    "repo": "pytorch/examples",
    "number": 544,
    "title": "the error when I run the example for the imagenet",
    "body": "When I tried to run the model for the example/imagenet, I encounter such error.So could you tell me how to solve the problem?\r\n\r\npython /home/zrz/code/imagenet_dist/examples-master/imagenet/main.py -a resnet18 -/home/zrz/dataset/imagenet/imagenet2012/ILSVRC2012/raw-data/imagenet-data\r\n\r\n=> creating model 'resnet18'\r\n\r\nEpoch: [0][     0/320292]\tTime  3.459 ( 3.459)\tData  0.295 ( 0.295)\tLoss 7.2399e+00 (7.2399e+00)\tAcc@1   0.00 (  0.00)\tAcc@5   0.00 (  0.00)\r\n\r\nEpoch: [0][    10/320292]\tTime  0.043 ( 0.357)\tData  0.000 ( 0.027)\tLoss 9.4861e+00 (1.3169e+01)\tAcc@1   0.00 (  0.00)\tAcc@5   0.00 (  0.00)\r\n\r\nEpoch: [0][    20/320292]\tTime  0.046 ( 0.209)\tData  0.000 ( 0.014)\tLoss 7.3722e+00 (1.0817e+01)\tAcc@1   0.00 (  0.00)\tAcc@5   0.00 (  0.00)\r\n\r\nEpoch: [0][    30/320292]\tTime  0.032 ( 0.154)\tData  0.000 ( 0.010)\tLoss 6.9166e+00 (9.5394e+00)\tAcc@1   0.00 (  0.00)\tAcc@5   0.00 (  0.00)\r\n\r\n/opt/conda/conda-bld/pytorch_1549630534704/work/aten/src/THCUNN/ClassNLLCriterion.cu:105: void cunn_ClassNLLCriterion_updateOutput_kernel(Dtype *, Dtype *, Dtype *, long *, Dtype *, int, int, int, int, long) [with Dtype = float, Acctype = float]: block: [0,0,0], thread: [3,0,0] Assertion `t >= 0 && t < n_classes` failed.\r\n\r\nTraceback (most recent call last):\r\n\r\n  File \"/home/zrz/code/imagenet_dist/examples-master/imagenet/main.py\", line 417, in <module>\r\n\r\n    main()\r\n\r\n  File \"/home/zrz/code/imagenet_dist/examples-master/imagenet/main.py\", line 113, in main\r\n\r\n    main_worker(args.gpu, ngpus_per_node, args)\r\n\r\n  File \"/home/zrz/code/imagenet_dist/examples-master/imagenet/main.py\", line 239, in main_worker\r\n\r\n    train(train_loader, model, criterion, optimizer, epoch, args)\r\n\r\n  File \"/home/zrz/code/imagenet_dist/examples-master/imagenet/main.py\", line 286, in train\r\n\r\n    losses.update(loss.item(), input.size(0))\r\n\r\nRuntimeError: CUDA error: device-side assert triggered\r\n\r\nterminate called after throwing an instance of 'c10::Error'\r\n\r\n  what():  CUDA error: device-side assert triggered (insert_events at /opt/conda/conda-bld/pytorch_1549630534704/work/aten/src/THC/THCCachingAllocator.cpp:470)\r\n\r\nframe #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x45 (0x7f099a50acf5 in /home/zrz/miniconda3/envs/runze_env_name/lib/python3.6/site-packages/torch/lib/libc10.so)\r\n\r\nframe #1: <unknown function> + 0x123b8c0 (0x7f099e7ee8c0 in /home/zrz/miniconda3/envs/runze_env_name/lib/python3.6/site-packages/torch/lib/libcaffe2_gpu.so)\r\n\r\nframe #2: at::TensorImpl::release_resources() + 0x50 (0x7f099ac76c30 in /home/zrz/miniconda3/envs/runze_env_name/lib/python3.6/site-packages/torch/lib/libcaffe2.so)\r\n\r\nframe #3: <unknown function> + 0x2a836b (0x7f099818b36b in /home/zrz/miniconda3/envs/runze_env_name/lib/python3.6/site-packages/torch/lib/libtorch.so.1)\r\n\r\nframe #4: <unknown function> + 0x30eff0 (0x7f09981f1ff0 in /home/zrz/miniconda3/envs/runze_env_name/lib/python3.6/site-packages/torch/lib/libtorch.so.1)\r\n\r\nframe #5: torch::autograd::deleteFunction(torch::autograd::Function*) + 0x2f0 (0x7f099818dd70 in /home/zrz/miniconda3/envs/runze_env_name/lib/python3.6/site-packages/torch/lib/libtorch.so.1)\r\n\r\nframe #6: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() + 0x45 (0x7f09c17f87f5 in /home/zrz/miniconda3/envs/runze_env_name/lib/python3.6/site-packages/torch/lib/libtorch_python.so)\r\n\r\nframe #7: torch::autograd::Variable::Impl::release_resources() + 0x4a (0x7f09984001ba in /home/zrz/miniconda3/envs/runze_env_name/lib/python3.6/site-packages/torch/lib/libtorch.so.1)\r\n\r\nframe #8: <unknown function> + 0x12148b (0x7f09c181048b in /home/zrz/miniconda3/envs/runze_env_name/lib/python3.6/site-packages/torch/lib/libtorch_python.so)\r\n\r\nframe #9: <unknown function> + 0x31a49f (0x7f09c1a0949f in /home/zrz/miniconda3/envs/runze_env_name/lib/python3.6/site-packages/torch/lib/libtorch_python.so)\r\n\r\nframe #10: <unknown function> + 0x31a4e1 (0x7f09c1a094e1 in /home/zrz/miniconda3/envs/runze_env_name/lib/python3.6/site-packages/torch/lib/libtorch_python.so)\r\n\r\nframe #11: <unknown function> + 0x1993cf (0x5574e4c9a3cf in /home/zrz/miniconda3/envs/runze_env_name/bin/python3.6)\r\n\r\nframe #12: <unknown function> + 0xf12b7 (0x5574e4bf22b7 in /home/zrz/miniconda3/envs/runze_env_name/bin/python3.6)\r\n\r\nframe #13: <unknown function> + 0xf1147 (0x5574e4bf2147 in /home/zrz/miniconda3/envs/runze_env_name/bin/python3.6)\r\n\r\nframe #14: <unknown function> + 0xf115d (0x5574e4bf215d in /home/zrz/miniconda3/envs/runze_env_name/bin/python3.6)\r\n\r\nframe #15: <unknown function> + 0xf115d (0x5574e4bf215d in /home/zrz/miniconda3/envs/runze_env_name/bin/python3.6)\r\n\r\nframe #16: <unknown function> + 0xf115d (0x5574e4bf215d in /home/zrz/miniconda3/envs/runze_env_name/bin/python3.6)\r\n\r\nframe #17: PyDict_SetItem + 0x3da (0x5574e4c37e7a in /home/zrz/miniconda3/envs/runze_env_name/bin/python3.6)\r\n\r\nframe #18: PyDict_SetItemString + 0x4f (0x5574e4c4078f in /home/zrz/miniconda3/envs/runze_env_name/bin/python3.6)\r\n\r\nframe #19: PyImport_Cleanup + 0x99 (0x5574e4ca4709 in /ho",
    "url": "https://github.com/pytorch/examples/issues/544",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-14T06:22:38Z",
    "updated_at": "2022-03-10T05:56:43Z",
    "comments": 4,
    "user": "runzeer"
  },
  {
    "repo": "pytorch/examples",
    "number": 543,
    "title": "[Important BUG] non-consistent behavior between \"final evaluation\" and \"eval on each epoch\" for mnist example",
    "body": "It is a common sense that, during evaluation, the model is not trained by the dev dataset. \r\nHowever, I noticed a strange different behavior between the two results:\r\n(1) train 10 epoch,  having final evaluate on test data\r\n(2) train 10 epoch, having an evaluation after each training epoch on test data\r\n\r\n## Prior knowledge:\r\nEven though you set seed for everything \r\n```\r\n# set seed\r\nrandom.seed(args.seed)\r\nnp.random.seed(args.seed)\r\ntorch.manual_seed(args.seed)\r\nif use_cuda:\r\n    torch.cuda.manual_seed_all(args.seed)  # if got GPU also set this seed\r\n```\r\nWhen you run `examples/mnist/main.py`, it still give different result on GPU.\r\n```\r\nrun 1\r\n-------------\r\nTest set: Average loss: 0.1018, Accuracy: 9660/10000 (97%)\r\nTest set: Average loss: 0.0611, Accuracy: 9825/10000 (98%)\r\nTest set: Average loss: 0.0555, Accuracy: 9813/10000 (98%)\r\nTest set: Average loss: 0.0409, Accuracy: 9862/10000 (99%)\r\nTest set: Average loss: 0.0381, Accuracy: 9870/10000 (99%)\r\nTest set: Average loss: 0.0339, Accuracy: 9891/10000 (99%)\r\nTest set: Average loss: 0.0340, Accuracy: 9877/10000 (99%)\r\nTest set: Average loss: 0.0399, Accuracy: 9872/10000 (99%)\r\nTest set: Average loss: 0.0291, Accuracy: 9908/10000 (99%)\r\nTest set: Average loss: 0.0315, Accuracy: 9896/10000 (99%)\r\n\r\nrun 2\r\n--------------\r\nTest set: Average loss: 0.1016, Accuracy: 9666/10000 (97%)\r\nTest set: Average loss: 0.0608, Accuracy: 9828/10000 (98%)\r\nTest set: Average loss: 0.0567, Accuracy: 9810/10000 (98%)\r\nTest set: Average loss: 0.0408, Accuracy: 9864/10000 (99%)\r\nTest set: Average loss: 0.0382, Accuracy: 9868/10000 (99%)\r\nTest set: Average loss: 0.0339, Accuracy: 9894/10000 (99%)\r\nTest set: Average loss: 0.0349, Accuracy: 9871/10000 (99%)\r\nTest set: Average loss: 0.0396, Accuracy: 9876/10000 (99%)\r\nTest set: Average loss: 0.0294, Accuracy: 9911/10000 (99%)\r\nTest set: Average loss: 0.0304, Accuracy: 9895/10000 (99%)\r\n```\r\nAs long as you set `torch.backends.cudnn.deterministic = True`\r\nYou could get consistent results:\r\n\r\n```\r\n====== parameters ========\r\n  batch_size: 64\r\n  do_eval: True\r\n  do_eval_each_epoch: True\r\n  epochs: 10\r\n  log_interval: 10\r\n  lr: 0.01\r\n  momentum: 0.5\r\n  no_cuda: False\r\n  save_model: False\r\n  seed: 42\r\n  test_batch_size: 1000\r\n==========================\r\nTest set: Average loss: 0.1034, Accuracy: 9679/10000 (97%)\r\nTest set: Average loss: 0.0615, Accuracy: 9804/10000 (98%)\r\nTest set: Average loss: 0.0484, Accuracy: 9847/10000 (98%)\r\nTest set: Average loss: 0.0361, Accuracy: 9888/10000 (99%)\r\nTest set: Average loss: 0.0341, Accuracy: 9887/10000 (99%)\r\nTest set: Average loss: 0.0380, Accuracy: 9877/10000 (99%)\r\nTest set: Average loss: 0.0302, Accuracy: 9899/10000 (99%)\r\nTest set: Average loss: 0.0315, Accuracy: 9884/10000 (99%)\r\nTest set: Average loss: 0.0283, Accuracy: 9909/10000 (99%)\r\nTest set: Average loss: 0.0266, Accuracy: 9907/10000 (99%)  -> epoch 10\r\n\r\n\r\n====== parameters ========\r\n  batch_size: 64\r\n  do_eval: True\r\n  do_eval_each_epoch: True\r\n  epochs: 20\r\n  log_interval: 10\r\n  lr: 0.01\r\n  momentum: 0.5\r\n  no_cuda: False\r\n  save_model: False\r\n  seed: 42\r\n  test_batch_size: 1000\r\n==========================\r\nTest set: Average loss: 0.1034, Accuracy: 9679/10000 (97%)\r\nTest set: Average loss: 0.0615, Accuracy: 9804/10000 (98%)\r\nTest set: Average loss: 0.0484, Accuracy: 9847/10000 (98%)\r\nTest set: Average loss: 0.0361, Accuracy: 9888/10000 (99%)\r\nTest set: Average loss: 0.0341, Accuracy: 9887/10000 (99%)\r\nTest set: Average loss: 0.0380, Accuracy: 9877/10000 (99%)\r\nTest set: Average loss: 0.0302, Accuracy: 9899/10000 (99%)\r\nTest set: Average loss: 0.0315, Accuracy: 9884/10000 (99%)\r\nTest set: Average loss: 0.0283, Accuracy: 9909/10000 (99%)\r\nTest set: Average loss: 0.0266, Accuracy: 9907/10000 (99%) -> epoch 10\r\nTest set: Average loss: 0.0373, Accuracy: 9870/10000 (99%)\r\nTest set: Average loss: 0.0286, Accuracy: 9909/10000 (99%)\r\nTest set: Average loss: 0.0309, Accuracy: 9908/10000 (99%)\r\nTest set: Average loss: 0.0302, Accuracy: 9899/10000 (99%)\r\nTest set: Average loss: 0.0261, Accuracy: 9907/10000 (99%)\r\nTest set: Average loss: 0.0258, Accuracy: 9913/10000 (99%)\r\nTest set: Average loss: 0.0288, Accuracy: 9917/10000 (99%)\r\nTest set: Average loss: 0.0280, Accuracy: 9904/10000 (99%)\r\nTest set: Average loss: 0.0294, Accuracy: 9902/10000 (99%)\r\nTest set: Average loss: 0.0257, Accuracy: 9914/10000 (99%) -> epoch 20\r\n```\r\n\r\nHowever, when you change the model to have `final evaluation` after epoch 10, the result becomes:\r\n```\r\n====== parameters ========\r\n  batch_size: 64\r\n  do_eval: True\r\n  do_eval_each_epoch: False\r\n  epochs: 10\r\n  log_interval: 10\r\n  lr: 0.01\r\n  momentum: 0.5\r\n  no_cuda: False\r\n  save_model: False\r\n  seed: 42\r\n  test_batch_size: 1000\r\n==========================\r\nTest set: Average loss: 0.0361, Accuracy: 9885/10000 (99%) -> epoch 10\r\n```\r\n\r\nI also tried to add `torch.backends.cudnn.benchmark = False`, it gives the same result.\r\n\r\nRepeatability and consistent result is crucial in machine learning, do you guys know what is the r",
    "url": "https://github.com/pytorch/examples/issues/543",
    "state": "open",
    "labels": [
      "help wanted",
      "nlp"
    ],
    "created_at": "2019-04-12T06:09:13Z",
    "updated_at": "2022-03-10T06:03:31Z",
    "comments": 1,
    "user": "Jacob-Ma"
  },
  {
    "repo": "pytorch/examples",
    "number": 542,
    "title": "non-deterministic behavior on PyTorch mnist example",
    "body": "I tried PyTorch `examples/mnist/main.py` example to check if it is deterministic. \r\nAlthough I modified the code to set the seed on everything, it still gives quite different results on GPU. \r\n\r\nDo you know how to make the code be deterministic?  Thank you very much.\r\n\r\nBelow is the code I have run and the output.\r\n```\r\nfrom __future__ import print_function\r\nimport argparse\r\nimport random\r\nimport numpy as np\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport torch.optim as optim\r\nfrom torchvision import datasets, transforms\r\n\r\n\r\n\r\nclass Net(nn.Module):\r\n    def __init__(self):\r\n        super(Net, self).__init__()\r\n        self.conv1 = nn.Conv2d(1, 20, 5, 1)\r\n        self.conv2 = nn.Conv2d(20, 50, 5, 1)\r\n        self.fc1 = nn.Linear(4 * 4 * 50, 500)\r\n        self.fc2 = nn.Linear(500, 10)\r\n\r\n    def forward(self, x):\r\n        x = F.relu(self.conv1(x))\r\n        x = F.max_pool2d(x, 2, 2)\r\n        x = F.relu(self.conv2(x))\r\n        x = F.max_pool2d(x, 2, 2)\r\n        x = x.view(-1, 4 * 4 * 50)\r\n        x = F.relu(self.fc1(x))\r\n        x = self.fc2(x)\r\n        return F.log_softmax(x, dim=1)\r\n\r\n\r\ndef train(args, model, device, train_loader, optimizer, epoch):\r\n    model.train()\r\n    for batch_idx, (data, target) in enumerate(train_loader):\r\n        data, target = data.to(device), target.to(device)\r\n        optimizer.zero_grad()\r\n        output = model(data)\r\n        loss = F.nll_loss(output, target)\r\n        loss.backward()\r\n        optimizer.step()\r\n        #if batch_idx % args.log_interval == 0:\r\n            #print('Train Epoch: {} [{}/{} ({:.0f}%)]\\tLoss: {:.6f}'.format(\r\n                #epoch, batch_idx * len(data), len(train_loader.dataset),\r\n                       #100. * batch_idx / len(train_loader), loss.item()))\r\n\r\n\r\ndef test(args, model, device, test_loader):\r\n    model.eval()\r\n    test_loss = 0\r\n    correct = 0\r\n    with torch.no_grad():\r\n        for data, target in test_loader:\r\n            data, target = data.to(device), target.to(device)\r\n            output = model(data)\r\n            test_loss += F.nll_loss(output, target, reduction='sum').item()  # sum up batch loss\r\n            pred = output.argmax(dim=1, keepdim=True)  # get the index of the max log-probability\r\n            correct += pred.eq(target.view_as(pred)).sum().item()\r\n\r\n    test_loss /= len(test_loader.dataset)\r\n    print('Test set: Average loss: {:.4f}, Accuracy: {}/{} ({:.0f}%)'.format(\r\n        test_loss, correct, len(test_loader.dataset),\r\n        100. * correct / len(test_loader.dataset)))\r\n\r\n\r\ndef main():\r\n    # Training settings\r\n    parser = argparse.ArgumentParser(description='PyTorch MNIST Example')\r\n    parser.add_argument('--batch-size', type=int, default=64, metavar='N',\r\n                        help='input batch size for training (default: 64)')\r\n    parser.add_argument('--test-batch-size', type=int, default=1000, metavar='N',\r\n                        help='input batch size for testing (default: 1000)')\r\n    parser.add_argument('--epochs', type=int, default=10, metavar='N',\r\n                        help='number of epochs to train (default: 10)')\r\n    parser.add_argument('--lr', type=float, default=0.01, metavar='LR',\r\n                        help='learning rate (default: 0.01)')\r\n    parser.add_argument('--momentum', type=float, default=0.5, metavar='M',\r\n                        help='SGD momentum (default: 0.5)')\r\n    parser.add_argument('--no-cuda', action='store_true', default=False,\r\n                        help='disables CUDA training')\r\n    parser.add_argument('--seed', type=int, default=1, metavar='S',\r\n                        help='random seed (default: 1)')\r\n    parser.add_argument('--log-interval', type=int, default=10, metavar='N',\r\n                        help='how many batches to wait before logging training status')\r\n\r\n    parser.add_argument('--save-model', action='store_true', default=False,\r\n                        help='For Saving the current Model')\r\n    args = parser.parse_args()\r\n    use_cuda = not args.no_cuda and torch.cuda.is_available()\r\n\r\n    # set seed\r\n    random.seed(args.seed)\r\n    np.random.seed(args.seed)\r\n    torch.manual_seed(args.seed)\r\n    if use_cuda:\r\n        torch.cuda.manual_seed_all(args.seed)  # if got GPU also set this seed\r\n\r\n\r\n    # torch.manual_seed(args.seed)\r\n\r\n    device = torch.device(\"cuda\" if use_cuda else \"cpu\")\r\n\r\n    kwargs = {'num_workers': 1, 'pin_memory': True} if use_cuda else {}\r\n    train_loader = torch.utils.data.DataLoader(\r\n        datasets.MNIST('../data', train=True, download=True,\r\n                       transform=transforms.Compose([\r\n                           transforms.ToTensor(),\r\n                           transforms.Normalize((0.1307,), (0.3081,))\r\n                       ])),\r\n        batch_size=args.batch_size, shuffle=True, **kwargs)\r\n    test_loader = torch.utils.data.DataLoader(\r\n        datasets.MNIST('../data', train=False, transform=transforms.Compose([\r\n            transforms.ToTensor(),\r\n            transforms.Norm",
    "url": "https://github.com/pytorch/examples/issues/542",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-12T04:31:25Z",
    "updated_at": "2019-04-12T05:53:14Z",
    "comments": 1,
    "user": "Jacob-Ma"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 476,
    "title": "Example with torch.empty in What is PyTorch? is misleading",
    "body": "In this [example](https://github.com/pytorch/tutorials/blob/master/beginner_source/blitz/tensor_tutorial.py) the output of a `torch.empty` call looks the same result I would obtain with `torch.zeros`, while it should be filled with garbage values.\r\n\r\nThis might be misleading to beginners.",
    "url": "https://github.com/pytorch/tutorials/issues/476",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-11T09:19:06Z",
    "updated_at": "2019-08-23T21:18:53Z",
    "user": "alexchapeaux"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 19098,
    "title": "[C++ front end] how to use clamp to clip gradients?",
    "body": "## \u2753 Questions and Help\r\nhi,  I wonder if this could clip the gradients: \r\n\r\nfor(int i=0; i<net.parameters().size(); i++)\r\n\t\t{\r\n\t\t\tnet.parameters().at(i).grad() = torch::clamp(net.parameters().at(i).grad(), -GRADIENT_CLIP, GRADIENT_CLIP);\t\t\t\r\n\t\t}\r\noptimizer.step();\r\n\r\nI found it doesn't seem to work, and I still got large output.\r\nHow can I use the \"clamp\u201c correctly?\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/19098",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-10T05:37:24Z",
    "updated_at": "2019-04-10T05:38:01Z",
    "user": "ZhuXingJune"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 19012,
    "title": "I have a piece of code that is written in LUA and  I want to know what is the pytorch equivalent of the code.?How do I implement these lines in pytorch .. Can somebody help me with it? The code is mentioned in the comment",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/19012",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-08T10:15:59Z",
    "updated_at": "2019-04-08T10:30:32Z",
    "user": "AshishRMenon"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 18951,
    "title": "Completed code with bug report for hdf5 dataset. How to fix?",
    "body": "Hello all, I want to report the issue of pytorch with hdf5 loader. The full source code and bug are provided \r\nThe problem is that I want to call the `test_dataloader.py` in two terminals. The file is used to load the custom hdf5 dataset (`custom_h5_loader`). To generate h5 files, you may need first run the file `convert_to_h5` to generate 100 random h5 files.\r\nTo reproduce the error. Please run follows steps\r\n\r\n**Step 1:** Generate the hdf5\r\n\r\n```\r\nfrom __future__ import print_function\r\nimport h5py\r\nimport numpy as np\r\nimport random\r\nimport os\r\n\r\nif not os.path.exists('./data_h5'):\r\n        os.makedirs('./data_h5')\r\n\r\nfor index in range(100):\r\n    data = np.random.uniform(0,1, size=(3,128,128))\r\n    data = data[None, ...]\r\n    print (data.shape)\r\n    with h5py.File('./data_h5/' +'%s.h5' % (str(index)), 'w') as f:\r\n        f['data'] = data\r\n```\r\nStep2: Create a python file custom_h5_loader.py and paste the code\r\n```\r\nimport h5py\r\nimport torch.utils.data as data\r\nimport glob\r\nimport torch\r\nimport numpy as np\r\nimport os\r\nclass custom_h5_loader(data.Dataset):\r\n\r\n    def __init__(self, root_path):\r\n        self.hdf5_list = [x for x in glob.glob(os.path.join(root_path, '*.h5'))]\r\n        self.data_list = []\r\n        for ind in range (len(self.hdf5_list)):\r\n            self.h5_file = h5py.File(self.hdf5_list[ind])\r\n            data_i = self.h5_file.get('data')     \r\n            self.data_list.append(data_i)\r\n\r\n    def __getitem__(self, index):\r\n        self.data = np.asarray(self.data_list[index])   \r\n        return (torch.from_numpy(self.data).float())\r\n\r\n    def __len__(self):\r\n        return len(self.hdf5_list)\r\n```\r\n**Step 3:**  Create a python file with name test_dataloader.py\r\n```\r\nfrom dataloader import custom_h5_loader\r\nimport torch\r\nimport torchvision.datasets as dsets\r\n\r\ntrain_h5_dataset = custom_h5_loader('./data_h5')\r\nh5_loader = torch.utils.data.DataLoader(dataset=train_h5_dataset, batch_size=2, shuffle=True, num_workers=4)      \r\nfor epoch in range(100000):\r\n    for i, data in enumerate(h5_loader):       \r\n        print (data.shape)\r\n```\r\nStep 4: Open first terminal and run (it worked)\r\n\r\n> python test_dataloader.py\r\n\r\nStep 5: Open the second terminal and run (Error report in below)\r\n\r\n> python test_dataloader.py\r\n\r\nThe error is \r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/john/anaconda3/lib/python3.6/site-packages/h5py/_hl/files.py\", line 162, in make_fid\r\n    fid = h5f.open(name, h5f.ACC_RDWR, fapl=fapl)\r\n  File \"h5py/_objects.pyx\", line 54, in h5py._objects.with_phil.wrapper\r\n  File \"h5py/_objects.pyx\", line 55, in h5py._objects.with_phil.wrapper\r\n  File \"h5py/h5f.pyx\", line 78, in h5py.h5f.open\r\nOSError: Unable to open file (unable to lock file, errno = 11, error message = 'Resource temporarily unavailable')\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/john/anaconda3/lib/python3.6/site-packages/h5py/_hl/files.py\", line 165, in make_fid\r\n    fid = h5f.open(name, h5f.ACC_RDONLY, fapl=fapl)\r\n  File \"h5py/_objects.pyx\", line 54, in h5py._objects.with_phil.wrapper\r\n  File \"h5py/_objects.pyx\", line 55, in h5py._objects.with_phil.wrapper\r\n  File \"h5py/h5f.pyx\", line 78, in h5py.h5f.open\r\nOSError: Unable to open file (unable to lock file, errno = 11, error message = 'Resource temporarily unavailable')\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"test_dataloader.py\", line 5, in <module>\r\n    train_h5_dataset = custom_h5_loader('./data_h5')\r\n  File \"/home/john/test_hdf5/dataloader.py\", line 13, in __init__\r\n    self.h5_file = h5py.File(self.hdf5_list[ind])\r\n  File \"/home/john/anaconda3/lib/python3.6/site-packages/h5py/_hl/files.py\", line 312, in __init__\r\n    fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)\r\n  File \"/home/john/anaconda3/lib/python3.6/site-packages/h5py/_hl/files.py\", line 167, in make_fid\r\n    fid = h5f.create(name, h5f.ACC_EXCL, fapl=fapl, fcpl=fcpl)\r\n  File \"h5py/_objects.pyx\", line 54, in h5py._objects.with_phil.wrapper\r\n  File \"h5py/_objects.pyx\", line 55, in h5py._objects.with_phil.wrapper\r\n  File \"h5py/h5f.pyx\", line 98, in h5py.h5f.create\r\nOSError: Unable to create file (unable to open file: name = './data_h5/47.h5', errno = 17, error message = 'File exists', flags = 15, o_flags = c2)\r\n```\r\n\r\nThis is my configuration\r\n```\r\nHDF5 Version: 1.10.2\r\nConfigured on: Wed May  9 23:24:59 UTC 2018\r\nFeatures:\r\n---------\r\n                  Parallel HDF5: no\r\n             High-level library: yes\r\n                   Threadsafety: yes\r\nprint (torch.__version__)\r\n1.0.0.dev20181227\r\n\r\n```",
    "url": "https://github.com/pytorch/pytorch/issues/18951",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-05T14:50:55Z",
    "updated_at": "2019-04-06T12:36:34Z",
    "user": "John1231983"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 18872,
    "title": "How to convert a cudnn.BLSTM model to nn.LSTM bidirectional model",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\nI have a *.t7 model that consists in few convolution layers and 1 block of cudnn.BLSTM(). To convert the model to pytorch, I create the same architecture with pytorch and try to get the weights from the t7 file. I think the convolution layers were correct but I have a doubt about the cudnn.BLSTM. When I extract the BLSTM weighs, I got one dimentional list of millions of parameters which corresponds to the same numbers of parameters in pytorch LSTM. However, in pytorch the weights and biases are with well know structure and weight_ih_l0,   weight_hh_l0,... bias_ih_l_0, bias_hh_l0, ...   weight_ih_l0_reverse, ... but in the  cuddnn.BLSTM(), all parameters are set in one flattened list, so how to know the order and the shape of weights and biases ??\r\nI debug the cudnn.BLSTM structure on th terminal and I get some idea about the concatenation orders and the shape:\r\n Exemple \r\n```\r\n# torch\r\nrnn = cudnn.BLSTM(1,1, 2, false, 0.5)\r\n# get the weights\r\nweights = rnn:weights() \r\nth> rnn:weights()\r\n{\r\n  1 : \r\n    {\r\n      1 : CudaTensor - size: 1\r\n      2 : CudaTensor - size: 1\r\n      3 : CudaTensor - size: 1\r\n      4 : CudaTensor - size: 1\r\n      5 : CudaTensor - size: 1\r\n      6 : CudaTensor - size: 1\r\n      7 : CudaTensor - size: 1\r\n      8 : CudaTensor - size: 1\r\n    }\r\n  2 : \r\n    {\r\n      1 : CudaTensor - size: 1\r\n      2 : CudaTensor - size: 1\r\n      3 : CudaTensor - size: 1\r\n      4 : CudaTensor - size: 1\r\n      5 : CudaTensor - size: 1\r\n      6 : CudaTensor - size: 1\r\n      7 : CudaTensor - size: 1\r\n      8 : CudaTensor - size: 1\r\n    }\r\n  3 : \r\n    {\r\n      1 : CudaTensor - size: 2\r\n      2 : CudaTensor - size: 2\r\n      3 : CudaTensor - size: 2\r\n      4 : CudaTensor - size: 2\r\n      5 : CudaTensor - size: 1\r\n      6 : CudaTensor - size: 1\r\n      7 : CudaTensor - size: 1\r\n      8 : CudaTensor - size: 1\r\n    }\r\n  4 : \r\n    {\r\n      1 : CudaTensor - size: 2\r\n      2 : CudaTensor - size: 2\r\n      3 : CudaTensor - size: 2\r\n      4 : CudaTensor - size: 2\r\n      5 : CudaTensor - size: 1\r\n      6 : CudaTensor - size: 1\r\n      7 : CudaTensor - size: 1\r\n      8 : CudaTensor - size: 1\r\n    }\r\n}\r\n\r\nbiases = rnn:biaises()\r\n\r\nth> rnn:biases()\r\n{\r\n  1 : \r\n    {\r\n      1 : CudaTensor - size: 1\r\n      2 : CudaTensor - size: 1\r\n      3 : CudaTensor - size: 1\r\n      4 : CudaTensor - size: 1\r\n      5 : CudaTensor - size: 1\r\n      6 : CudaTensor - size: 1\r\n      7 : CudaTensor - size: 1\r\n      8 : CudaTensor - size: 1\r\n    }\r\n  2 : \r\n    {\r\n      1 : CudaTensor - size: 1\r\n      2 : CudaTensor - size: 1\r\n      3 : CudaTensor - size: 1\r\n      4 : CudaTensor - size: 1\r\n      5 : CudaTensor - size: 1\r\n      6 : CudaTensor - size: 1\r\n      7 : CudaTensor - size: 1\r\n      8 : CudaTensor - size: 1\r\n    }\r\n  3 : \r\n    {\r\n      1 : CudaTensor - size: 1\r\n      2 : CudaTensor - size: 1\r\n      3 : CudaTensor - size: 1\r\n      4 : CudaTensor - size: 1\r\n      5 : CudaTensor - size: 1\r\n      6 : CudaTensor - size: 1\r\n      7 : CudaTensor - size: 1\r\n      8 : CudaTensor - size: 1\r\n    }\r\n  4 : \r\n    {\r\n      1 : CudaTensor - size: 1\r\n      2 : CudaTensor - size: 1\r\n      3 : CudaTensor - size: 1\r\n      4 : CudaTensor - size: 1\r\n      5 : CudaTensor - size: 1\r\n      6 : CudaTensor - size: 1\r\n      7 : CudaTensor - size: 1\r\n      8 : CudaTensor - size: 1\r\n    }\r\n}\r\n\r\n```\r\nall_flattened_params = rnn:parameters()\r\n\r\nwith this small example: I see that the rnn:parameters() function put the weighs and after that the biases in the above order. So:\r\nweights =all_flattened_params[:-32]\r\nbiases = all_flattened_params[-32:]\r\nNow, How to know the order of weights and biases regarding the pytorch nn.LSTM() ?\r\nI supposed that this order:\r\n weight_ih_l0, weight_hh_l0, weight_ih_l0_reverse, weight_hh_l0_reverse,  weight_ih_l1, ....\r\nbias_ih_l0, bias_hh_l0, bias_ih_l0_reverse, bias_hh_l0_reverse, .... but my model does not give the right output!!",
    "url": "https://github.com/pytorch/pytorch/issues/18872",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-04T18:30:20Z",
    "updated_at": "2019-04-04T19:00:04Z",
    "user": "rafikg"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 18837,
    "title": "How to use libtorch api torch::nn::parallel::data_parallel train on multi-gpu",
    "body": "## \ud83d\udcda Documentation\r\n\r\n<!-- A clear and concise description of what content in https://pytorch.org/docs is an issue. If this has to do with the general https://pytorch.org website, please file an issue at https://github.com/pytorch/pytorch.github.io/issues/new/choose instead. If this has to do with https://pytorch.org/tutorials, please file an issue at https://github.com/pytorch/tutorials/issues/new -->\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/18837",
    "state": "closed",
    "labels": [
      "module: performance",
      "oncall: distributed",
      "module: multi-gpu",
      "module: docs",
      "module: cpp",
      "module: nn",
      "triaged"
    ],
    "created_at": "2019-04-04T02:48:41Z",
    "updated_at": "2020-06-25T16:48:51Z",
    "user": "DDFlyInCode"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 468,
    "title": "auxilary net confusion Inception_v3 Vs. GoogLeNet in finetune script?",
    "body": "Hi, I followed the finetune tutorial (but using this script to train from scratch): for `inception` as there is only one `aux_logit` below snippet working fine.\r\n\r\n```\r\n    elif model_name == \"inception\":\r\n        \"\"\" Inception v3 \r\n        Be careful, expects (299,299) sized images and has auxiliary output\r\n        \"\"\"\r\n        model_ft = models.inception_v3(pretrained=use_pretrained)\r\n        set_parameter_requires_grad(model_ft, feature_extract)\r\n        # Handle the auxilary net\r\n        num_ftrs = model_ft.AuxLogits.fc.in_features\r\n        model_ft.AuxLogits.fc = nn.Linear(num_ftrs, num_classes)\r\n        # Handle the primary net\r\n        num_ftrs = model_ft.fc.in_features\r\n        model_ft.fc = nn.Linear(num_ftrs,num_classes)\r\n        input_size = 299\r\n```\r\ncorrespoing `inception_v3` net file snippet:\r\n\r\n```\r\nif self.training and self.aux_logits:\r\naux = self.AuxLogits(x)\r\n```\r\nand the `fc` snippet:\r\n```\r\nself.fc = nn.Linear(768, num_classes)\r\n```\r\n\r\nWhereas for `GoogLeNet` has two auxilary outputs, the net file snippet has:\r\n\r\n```\r\nif self.training and self.aux_logits:\r\naux1 = self.aux1(x)\r\n.....\r\nif self.training and self.aux_logits:\r\naux2 = self.aux2(x)\r\n```\r\n\r\nand the `fc` snippets: \r\n\r\n```\r\nself.fc1 = nn.Linear(2048, 1024)\r\nself.fc2 = nn.Linear(1024, num_classes)\r\n```\r\n\r\nNow, my confusion is about using the `fc` in finetuning script, how to embed?\r\n\r\n```\r\nnum_ftrs = model_ft.(aux1/aux2).(fc1/fc2).in_features\r\nmodel_ft.(aux1/aux2).(fc1/fc2) = nn.Linear(num_ftrs, num_classes)\r\n```\r\nany thoughts?\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/468",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-03T15:43:05Z",
    "updated_at": "2019-04-07T10:52:28Z",
    "comments": 0,
    "user": "rajasekharponakala"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 18781,
    "title": "TORCH_CUDA_ARCH_LIST=All should know what is possible",
    "body": "## \ud83d\udc1b Bug\r\n\r\nWhen setting TORCH_CUDA_ARCH_LIST=All, I expect Torch to compile with all CUDA architectures available to my current version of CUDA. Instead, it attempted to build for cuda 2.0.\r\n\r\nSee error:\r\nnvcc fatal   : Unsupported gpu architecture 'compute_20'\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. Install CUDA >= 9.0\r\n2. TORCH_CUDA_ARCH_LIST=All cmake -DUSE_CUDA=ON ..\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\n\r\nFilters out 2.x architectures if CUDA >= 9.0\r\n\r\n## Environment\r\nCUDA 10.1",
    "url": "https://github.com/pytorch/pytorch/issues/18781",
    "state": "closed",
    "labels": [
      "module: build",
      "module: docs",
      "module: cuda",
      "module: molly-guard",
      "triaged"
    ],
    "created_at": "2019-04-03T00:31:35Z",
    "updated_at": "2024-08-04T05:06:56Z",
    "user": "xsacha"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 463,
    "title": "The input of a GRU is of shape (seq_len, batch, input_size). I wonder does seq_len means anything?",
    "body": "I noticed that in the documentation of pytorch GRU, the input shape should be (seq_len, batch, input_size), thus the input ought to be a sequence and the model will deal with the sequence inside itself. But in this notebook, the author passes a tensor only of length one in each iteration in function `train`. I mean if the model can deal with sequential inputs, why not just feed a sequence of sentence to it?\r\n\r\nThis is my first time to start an issue on github, please forgive me if there is anything wrong.",
    "url": "https://github.com/pytorch/tutorials/issues/463",
    "state": "closed",
    "labels": [],
    "created_at": "2019-04-02T09:32:10Z",
    "updated_at": "2019-08-23T21:49:49Z",
    "comments": 1,
    "user": "CSUN1997"
  },
  {
    "repo": "pytorch/text",
    "number": 522,
    "title": "how to set random seed for BucketIterator to guarantee that it produce the same itrator every time you run the code ?",
    "body": "",
    "url": "https://github.com/pytorch/text/issues/522",
    "state": "closed",
    "labels": [
      "obsolete"
    ],
    "created_at": "2019-04-02T01:47:03Z",
    "updated_at": "2022-01-25T04:04:42Z",
    "user": "zide05"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 18677,
    "title": "How to compile/install caffe2 with cuda 9.0?",
    "body": "I'm building caffe2 on ubuntu 18.04 with CUDA 9.0? But when I run \"python setup.py install\" command, I have met issue about version of CUDA. It needs to CUDA 9.2 instead of 9.0 but i only want to build with 9.0. \r\nHow to pass it?\r\n\r\nThank you!",
    "url": "https://github.com/pytorch/pytorch/issues/18677",
    "state": "open",
    "labels": [
      "caffe2"
    ],
    "created_at": "2019-04-01T06:54:50Z",
    "updated_at": "2019-05-27T12:43:18Z",
    "user": "TuanHAnhVN"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 459,
    "title": "Inappropriate example code of vector-Jacobian product in  (AUTOGRAD: AUTOMATIC DIFFERENTIATION) ",
    "body": "I want to check the vector-Jacobian product. But in the example code the x is randomly generated and the the function relation between x and y is not clear.  So how can I check if I correctly understand the vector-Jacobian product ?  Can you improve it ?",
    "url": "https://github.com/pytorch/tutorials/issues/459",
    "state": "closed",
    "labels": [],
    "created_at": "2019-03-30T13:57:54Z",
    "updated_at": "2021-06-16T20:24:11Z",
    "comments": 2,
    "user": "guixianjin"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 458,
    "title": "how can i remove the layers in model.",
    "body": "I want to use the googlenet model to do finetuing, remove the fc layer, and then add other layers.",
    "url": "https://github.com/pytorch/tutorials/issues/458",
    "state": "closed",
    "labels": [],
    "created_at": "2019-03-30T08:28:08Z",
    "updated_at": "2021-06-16T20:25:08Z",
    "comments": 1,
    "user": "wangjue-wzq"
  },
  {
    "repo": "pytorch/examples",
    "number": 534,
    "title": "when i run the main.py in imagenet,i encounter a problem",
    "body": "![image](https://user-images.githubusercontent.com/45848862/55045271-37901d80-5078-11e9-954e-4d7f4bdb4894.png)\r\n",
    "url": "https://github.com/pytorch/examples/issues/534",
    "state": "open",
    "labels": [
      "help wanted"
    ],
    "created_at": "2019-03-27T02:09:15Z",
    "updated_at": "2022-03-10T06:03:41Z",
    "comments": 0,
    "user": "Xavier-cvpr"
  },
  {
    "repo": "pytorch/examples",
    "number": 531,
    "title": "Running examples/world_language_model",
    "body": "Hello, I am trying to run 'examples/world_language_model'.\r\nHowever, when I do 'python main.py --cuda' in the above directory.\r\nIt prints an error like this.\r\n![image](https://user-images.githubusercontent.com/45330740/54750424-fa143600-4c1a-11e9-99ad-227b54d115f9.png)\r\nDoes anyone know how to solve this problem?",
    "url": "https://github.com/pytorch/examples/issues/531",
    "state": "closed",
    "labels": [],
    "created_at": "2019-03-21T11:51:02Z",
    "updated_at": "2020-03-25T00:54:09Z",
    "comments": 1,
    "user": "ohcurrent"
  },
  {
    "repo": "huggingface/transformers",
    "number": 370,
    "title": "What is Synthetic Self-Training?",
    "body": "The current best performing model on[ SQuAD 2.0](https://rajpurkar.github.io/SQuAD-explorer/) is BERT + N-Gram Masking + Synthetic Self-Training (ensemble):\r\n\r\n![image](https://user-images.githubusercontent.com/2398765/54234467-24466380-454a-11e9-8674-d9e7004da027.png)\r\n\r\nWhat is Synthetic Self-Training?\r\n",
    "url": "https://github.com/huggingface/transformers/issues/370",
    "state": "closed",
    "labels": [
      "Discussion",
      "wontfix"
    ],
    "created_at": "2019-03-12T20:40:50Z",
    "updated_at": "2019-07-13T20:58:32Z",
    "user": "hsm207"
  },
  {
    "repo": "pytorch/examples",
    "number": 524,
    "title": "[super_resolution]How can I get  'model_epoch_500.pth' file? ",
    "body": "When I run:\r\n`python super_resolve.py --input_image dataset/BSDS300/images/test/16077.jpg --model model_epoch_500.pth --output_filename out.png` .\r\n\r\nIt outpus : \r\n`  [Errno 2] No such file or directory: 'model_epoch_500.pth'`\r\n\r\nHow can I get  'model_epoch_500.pth' file? ",
    "url": "https://github.com/pytorch/examples/issues/524",
    "state": "closed",
    "labels": [],
    "created_at": "2019-03-08T11:08:17Z",
    "updated_at": "2019-05-31T08:57:22Z",
    "comments": 0,
    "user": "dyfloveslife"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 17654,
    "title": "I want to know how to use the  select(int64_t dim, int64_t index) in at::Tensor?What is the definition of a parameter ?",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/17654",
    "state": "closed",
    "labels": [],
    "created_at": "2019-03-04T12:57:04Z",
    "updated_at": "2019-03-04T17:05:24Z",
    "user": "SongyiGao"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 441,
    "title": "Add 'Open in Colab' Button to Tutorial Code ",
    "body": "Is it possible to edit the downloadable Jupyter notebooks at the bottom of each 60-minute blitz section? In a utopian scenario there would be a button at the top of each file, allowing the user to 'Open in Colab'. If this button was present the user would fix the code so that each cell was ran with the output visible.\r\n\r\nHere is an example with Keras, to explicate what I mean. There are some uploaded PyTorch Jupyter Notebook files in the same repository (along with the Keras Jupyter Notebooks) to gain a more comprehensive perspective.\r\n\r\nhttps://github.com/PhillySchoolofAI/DL-Libraries/blob/master/KerasFunctionalAPI.ipynb",
    "url": "https://github.com/pytorch/tutorials/issues/441",
    "state": "closed",
    "labels": [],
    "created_at": "2019-03-04T12:26:51Z",
    "updated_at": "2019-03-31T10:34:34Z",
    "comments": 2,
    "user": "pynchmeister"
  },
  {
    "repo": "pytorch/examples",
    "number": 518,
    "title": "How to train from scratch on custom model",
    "body": "Hi,\r\n\r\nThank you very much for the code.\r\nI am new to pytorch (have worked a lot with tensorflow), and have a question which is probably basic, but I can't find the answer.\r\nIf I want to train ImageNet on a model which doesn't appear in the code list (under \"model names\"), but I do have the model as pth.tar file, how am I able to do the training?\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/examples/issues/518",
    "state": "closed",
    "labels": [],
    "created_at": "2019-02-26T10:19:24Z",
    "updated_at": "2022-03-10T05:28:08Z",
    "comments": 1,
    "user": "jennyzu"
  },
  {
    "repo": "huggingface/transformers",
    "number": 320,
    "title": "what is the batch size we can use for SQUAD task?",
    "body": "I am running the squad example. \r\n\r\nI have a Tesla M60 GPU which has about 8GB of memory. For bert-large-uncased model, I can only take batch size as 2, even after I used --fp16. Is it normal? \r\n\r\n",
    "url": "https://github.com/huggingface/transformers/issues/320",
    "state": "closed",
    "labels": [],
    "created_at": "2019-02-26T08:56:20Z",
    "updated_at": "2019-03-03T00:21:25Z",
    "user": "leonwyang"
  },
  {
    "repo": "pytorch/examples",
    "number": 517,
    "title": "How to save model in mnist.cpp?",
    "body": "How to save the model in cpp api mnist.cpp?\r\nmodel.save and torch::save(model,\"mnisttrain.pkl\")\r\nAll error",
    "url": "https://github.com/pytorch/examples/issues/517",
    "state": "open",
    "labels": [
      "c++"
    ],
    "created_at": "2019-02-26T06:58:05Z",
    "updated_at": "2022-03-09T20:49:34Z",
    "comments": 5,
    "user": "engineer1109"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 437,
    "title": "A short tutorial showing the input arguments for NLL loss/ cross entropy loss would be incredibly helpful",
    "body": "The arguments NLL loss (and by proxy cross entropy loss) take are in a relatively weird format. The documentation for the function does all it can within reason of the original documentation, but there's an incredible number of questions posted about weird problems giving them the kind of arguments. Much more than for other comparable things, and most don't really have good reusable answers.\r\n\r\nThe obvious solution to this is for someone to create a simple example based tutorial of using NLL loss, and clearly showing exactly what format the arguments need to be in (perhaps starting with input and targets that are one hot encoded to make it as idiot proof as possible). \r\n\r\nI've spent 4 hours trying to solve a problem exactly like this without success, and am about to refer to source over it. Someone please take mercy on future programmers.",
    "url": "https://github.com/pytorch/tutorials/issues/437",
    "state": "open",
    "labels": [],
    "created_at": "2019-02-26T05:35:50Z",
    "updated_at": "2019-02-26T05:35:50Z",
    "comments": 0,
    "user": "jkterry1"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 17368,
    "title": "What is a version/git-hash of nightly build? ",
    "body": "## \ud83d\ude80 Feature\r\n\r\nNightly build does not include git-hash of pytorch.\r\nSo we can not know what the build is.\r\n\r\nhttps://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip\r\n\r\nI know the zip includes build_version which is like \"1.0.0dev20190221\".\r\nCould you add git-hash of pytorch in build_version and include native_functions.yaml and the README of the yaml?\r\n\r\n## Motivation\r\n\r\nWe are writing ffi-bindings by using nightly build and native_functions.yaml of pytorch-github.\r\nBoth the build and the yaml-spec's format are changed frequently and do not match version.\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/17368",
    "state": "closed",
    "labels": [
      "awaiting response (this tag is deprecated)"
    ],
    "created_at": "2019-02-21T19:54:41Z",
    "updated_at": "2019-02-28T22:34:49Z",
    "user": "junjihashimoto"
  },
  {
    "repo": "pytorch/ELF",
    "number": 142,
    "title": "what is meaning of outputs at verbose mode?",
    "body": "after I input quit at the df_console  , it was still calulateing\r\n```\r\nD:\\elfv2\\play_opengo_v2\\elf_gpu_full\\elf>df_console --load  d:/pretrained-go-19x19-v1.bin --num_block 20 --dim 224 --ver\r\nbose\r\n[2019-02-21 10:35:22.103] [elfgames::go::common::GoGameBase-12] [info] [0] Seed: 62127748, thread_id: 156604934899288204\r\n\r\n\r\n? Invalid input\r\n\r\n\r\n? Invalid input\r\n\r\ngenmove b\r\n[2019-02-21 10:48:10.811] [elfgames::go::GoGameSelfPlay-0-15] [info] Current board:\r\n   A B C D E F G H J K L M N O P Q R S T\r\n19 . . . . . . . . . . . . . . . . . . . 19\r\n18 . . . . . . . . . . . . . . . . . . . 18\r\n17 . . . . . . . . . . . . . . . . . . . 17\r\n16 . . . + . . . . . + . . . . . + . . . 16\r\n15 . . . . . . . . . . . . . . . . . . . 15\r\n14 . . . . . . . . . . . . . . . . . . . 14\r\n13 . . . . . . . . . . . . . . . . . . . 13\r\n12 . . . . . . . . . . . . . . . . . . . 12\r\n11 . . . . . . . . . . . . . . . . . . . 11     WHITE (O) has captured 0 stones\r\n10 . . . + . . . . . + . . . . . + . . . 10     BLACK (X) has captured 0 stones\r\n 9 . . . . . . . . . . . . . . . . . . . 9\r\n 8 . . . . . . . . . . . . . . . . . . . 8\r\n 7 . . . . . . . . . . . . . . . . . . . 7\r\n 6 . . . . . . . . . . . . . . . . . . . 6\r\n 5 . . . . . . . . . . . . . . . . . . . 5\r\n 4 . . . + . . . . . + . . . . . + . . . 4\r\n 3 . . . . . . . . . . . . . . . . . . . 3\r\n 2 . . . . . . . . . . . . . . . . . . . 2\r\n 1 . . . . . . . . . . . . . . . . . . . 1\r\n   A B C D E F G H J K L M N O P Q R S T\r\nLast move: C0, nextPlayer: Black\r\n\r\n[1] Propose move [Q16][pp][352]\r\n\r\n= Q16\r\n\r\n\r\n? Invalid input\r\n\r\n\r\n? Invalid input\r\n\r\n\r\n? Invalid input\r\n\r\n\r\n? Invalid input\r\n\r\nquit\r\n[2019-02-21 10:51:47.147] [elf::base::Context-3] [info] Prepare to stop ...\r\n[2019-02-21 10:51:47.521] [elfgames::go::GoGameSelfPlay-0-15] [info] Current board:\r\n   A B C D E F G H J K L M N O P Q R S T\r\n19 . . . . . . . . . . . . . . . . . . . 19\r\n18 . . . . . . . . . . . . . . . . . . . 18\r\n17 . . . . . . . . . . . . . . . . . . . 17\r\n16 . . . + . . . . . + . . . . . X). . . 16\r\n15 . . . . . . . . . . . . . . . . . . . 15\r\n14 . . . . . . . . . . . . . . . . . . . 14\r\n13 . . . . . . . . . . . . . . . . . . . 13\r\n12 . . . . . . . . . . . . . . . . . . . 12\r\n11 . . . . . . . . . . . . . . . . . . . 11     WHITE (O) has captured 0 stones\r\n10 . . . + . . . . . + . . . . . + . . . 10     BLACK (X) has captured 0 stones\r\n 9 . . . . . . . . . . . . . . . . . . . 9\r\n 8 . . . . . . . . . . . . . . . . . . . 8\r\n 7 . . . . . . . . . . . . . . . . . . . 7\r\n 6 . . . . . . . . . . . . . . . . . . . 6\r\n 5 . . . . . . . . . . . . . . . . . . . 5\r\n 4 . . . + . . . . . + . . . . . + . . . 4\r\n 3 . . . . . . . . . . . . . . . . . . . 3\r\n 2 . . . . . . . . . . . . . . . . . . . 2\r\n 1 . . . . . . . . . . . . . . . . . . . 1\r\n   A B C D E F G H J K L M N O P Q R S T\r\nLast move: Q16, nextPlayer: White\r\n\r\n[2] Propose move [D4][dd][88]\r\n\r\n[2019-02-21 10:51:48.657] [elfgames::go::GoGameSelfPlay-0-15] [info] Current board:\r\n   A B C D E F G H J K L M N O P Q R S T\r\n19 . . . . . . . . . . . . . . . . . . . 19\r\n18 . . . . . . . . . . . . . . . . . . . 18\r\n17 . . . . . . . . . . . . . . . . . . . 17\r\n16 . . . + . . . . . + . . . . . X . . . 16\r\n15 . . . . . . . . . . . . . . . . . . . 15\r\n14 . . . . . . . . . . . . . . . . . . . 14\r\n13 . . . . . . . . . . . . . . . . . . . 13\r\n12 . . . . . . . . . . . . . . . . . . . 12\r\n11 . . . . . . . . . . . . . . . . . . . 11     WHITE (O) has captured 0 stones\r\n10 . . . + . . . . . + . . . . . + . . . 10     BLACK (X) has captured 0 stones\r\n 9 . . . . . . . . . . . . . . . . . . . 9\r\n 8 . . . . . . . . . . . . . . . . . . . 8\r\n 7 . . . . . . . . . . . . . . . . . . . 7\r\n 6 . . . . . . . . . . . . . . . . . . . 6\r\n 5 . . . . . . . . . . . . . . . . . . . 5\r\n 4 . . . O . . . . . + . . . . . + . . . 4\r\n 3 . . . . . . . . . . . . . . . . . . . 3\r\n 2 X). . . . . . . . . . . . . . . . . . 2\r\n 1 . . . . . . . . . . . . . . . . . . . 1\r\n   A B C D E F G H J K L M N O P Q R S T\r\nLast move: A2, nextPlayer: White\r\n\r\n[4] Propose move [F17][fq][363]\r\n\r\n[2019-02-21 10:51:50.631] [elfgames::go::GoGameSelfPlay-0-15] [info] Current board:\r\n   A B C D E F G H J K L M N O P Q R S T\r\n19 . . . . . . . . . . . . . . . . . . . 19\r\n18 . . . . . . . . . . . . . . . . . . . 18\r\n17 . . . . . O). . . . . . . . . . . . . 17\r\n16 . . . + . . . . . + . . . . . X . . . 16\r\n15 . . . . . . . . . . . . . . . . . . . 15\r\n14 . . . . . . . . . . . . . . . . . . . 14\r\n13 . . . . . . . . . . . . . . . . . . . 13\r\n12 . . . . . . . . . . . . . . . . . . . 12\r\n11 . . . . . . . . . . . . . . . . . . . 11     WHITE (O) has captured 0 stones\r\n10 . . . + . . . . . + . . . . . + . . . 10     BLACK (X) has captured 0 stones\r\n 9 . . . . . . . . . . . . . . . . . . . 9\r\n 8 . . . . . . . . . . . . . . . . . . . 8\r\n 7 . . . . . . . . . . . . . . . . . . . 7\r\n 6 . . . . . . . . . . . . . . . . . . . 6\r\n 5 . . . . . . . . . . . . . . . . . . . 5\r\n 4 . . . O . . . . . + . . . . . + . . . 4\r\n 3 . . . . . . . . . . . . . . . . . . . 3\r\n 2 X . . . . . . .",
    "url": "https://github.com/pytorch/ELF/issues/142",
    "state": "open",
    "labels": [],
    "created_at": "2019-02-21T02:51:58Z",
    "updated_at": "2019-02-21T02:51:58Z",
    "user": "l1t1"
  },
  {
    "repo": "pytorch/examples",
    "number": 514,
    "title": "Why does discriminator's output change between batchsize:64 and batchsize:1 on inference.",
    "body": "I'm trying to get the discriminator output using train finished discriminator.\r\nProcedure is below.\r\n1. training dcgan.\r\n2. preparing my image data and resize it 64 * 64.\r\n3. load my image data using dataloader(same as training's one.)\r\n4. I change only batch size at inference.\r\n5. I got small Discriminator outputs(after sigmoid result).\r\n\r\nfor example)\r\nI prepared 64 images under the dataroot directory. And I tried 2 experience.\r\n\r\nI got a below's discriminator output at inference using batch size 64.\r\n```\r\ntensor([0.9955, 0.8801, 0.9727, 0.7377, 0.2667, 0.9432, 0.9941, 0.6896, 0.8638,\r\n        0.5006, 0.9766, 0.4148, 0.9577, 0.9065, 0.9849, 0.9027, 0.1619, 0.5418,\r\n        0.9256, 0.7502, 0.1467, 0.8197, 0.9100, 0.3416, 0.0066, 0.9521, 0.9973,\r\n        1.0000, 0.4952, 0.3026, 0.5347, 0.8695, 0.8033, 0.6709, 0.3602, 0.2145,\r\n        0.6901, 0.0129, 0.6780, 0.5321, 0.8195, 0.8662, 0.1759, 0.5599, 0.7313,\r\n        0.5138, 0.9396, 0.9256, 0.3011, 0.8163, 0.8046, 0.4802, 0.6256, 0.1656,\r\n        0.9368, 0.1080, 0.5960, 0.9493, 0.9533, 0.9609, 0.0137, 0.1603, 0.7717,\r\n        0.5684], device='cuda:0', grad_fn=<SqueezeBackward1>)\r\n```\r\n\r\nI got a below's discriminator output at inference using batch size 1.\r\n```\r\ntensor([0.6289], device='cuda:0', grad_fn=<SqueezeBackward1>)\r\ntensor([0.2455], device='cuda:0', grad_fn=<SqueezeBackward1>)\r\ntensor([0.8702], device='cuda:0', grad_fn=<SqueezeBackward1>)\r\ntensor([0.0000], device='cuda:0', grad_fn=<SqueezeBackward1>)\r\ntensor([0.0002], device='cuda:0', grad_fn=<SqueezeBackward1>)\r\n............\r\ntensor([0.0002], device='cuda:0', grad_fn=<SqueezeBackward1>)\r\ntensor([0.0022], device='cuda:0', grad_fn=<SqueezeBackward1>)\r\ntensor([0.9955], device='cuda:0', grad_fn=<SqueezeBackward1>)\r\ntensor([0.1370], device='cuda:0', grad_fn=<SqueezeBackward1>)\r\n```\r\n\r\nI wonder why I got a small output(different from batch size64) on batch size1. \r\nFor instance, I got the 0.0000 on batch size 1, but at batch size 64 0.0000 is nothing.\r\n\r\nAlso I tried to match tensor size using torch.cat at batch size 1.\r\nI changed from [1, 3, 64, 64] -> [64, 3, 64, 64], using same one image's tensor and torch.cat.\r\nBut I got different output value.\r\n\r\nIf you have any suggestions or point out then please let me know.",
    "url": "https://github.com/pytorch/examples/issues/514",
    "state": "closed",
    "labels": [],
    "created_at": "2019-02-20T09:07:47Z",
    "updated_at": "2019-02-20T10:55:48Z",
    "comments": 2,
    "user": "y-shirai-r"
  },
  {
    "repo": "pytorch/examples",
    "number": 507,
    "title": "Is there a plan to make the imagenet example in this repository support `fp16`?",
    "body": "Thanks! :)",
    "url": "https://github.com/pytorch/examples/issues/507",
    "state": "closed",
    "labels": [],
    "created_at": "2019-02-14T19:38:58Z",
    "updated_at": "2022-03-10T03:12:22Z",
    "comments": 1,
    "user": "deepakn94"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 17111,
    "title": "where is the code for the implement of loss?",
    "body": "i want to find the implement of nn.BCEWithLogitsLoss, but it returns F functions , and i cannot find where F functions is , i want to modify the loss",
    "url": "https://github.com/pytorch/pytorch/issues/17111",
    "state": "closed",
    "labels": [],
    "created_at": "2019-02-14T12:29:06Z",
    "updated_at": "2019-02-14T15:29:47Z",
    "user": "Jasperty"
  },
  {
    "repo": "pytorch/examples",
    "number": 503,
    "title": "I have some basic questions about training",
    "body": "Hi, I have some questions about training the model.\r\n\r\n1.   \"neural_style.py train --dataset /Users/me/Downloads/examples-master/fast_neural_style/me0 --style-image /Users/met/Downloads/examples-master/fast_neural_style/images/content-images/amber.jpg --save-model-dir /Users/umit/Downloads/examples-master/fast_neural_style/me/11 --epochs 2 --cuda 0\" \r\n\r\nThis is saving a .model file to my computer. What is the model format? How can i convert to onnx and eventually to coreml? \r\n\r\n2. Training image set data is [80K/13GB] on here. What happens i use much less photos? Like around 100?",
    "url": "https://github.com/pytorch/examples/issues/503",
    "state": "open",
    "labels": [
      "onnx"
    ],
    "created_at": "2019-02-03T08:40:43Z",
    "updated_at": "2022-03-10T03:14:41Z",
    "comments": 0,
    "user": "Umity"
  },
  {
    "repo": "pytorch/examples",
    "number": 502,
    "title": "neural_style.py: error: unrecognized arguments: --export_onnx",
    "body": "I am getting this error when i use:\r\n\r\npython neural_style/neural_style.py train --dataset /Users/me/Downloads/examples-master/fast_neural_style/me0 --style-image /Users/me/Downloads/examples-master/fast_neural_style/images/content-images/amber.jpg --save-model-dir /Users/me/Downloads/examples-master/fast_neural_style/me2 --epochs 2 --cuda 0 --export_onnx /Users/umit/Downloads/examples-master/fast_neural_style/me2/onnx/pytorch_model.onnx\r\n\r\nhow can i fix this?\r\n\r\n",
    "url": "https://github.com/pytorch/examples/issues/502",
    "state": "closed",
    "labels": [],
    "created_at": "2019-02-02T21:19:03Z",
    "updated_at": "2019-02-03T08:30:05Z",
    "comments": 0,
    "user": "Umity"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 431,
    "title": "cpp extension tutorial: not device agnostic?",
    "body": "Would the kerne calll in `lltm_cuda_forward` in  the tutorial  `tutorials/advanced_source/cpp_extension.rst` fail on multi gpu systems if the inputs are not on the default device, i.e., `device:0`?\r\n\r\nTo my understanding, some \"magic\" takes care of setting the right context if we add functionality do pytorch via custom kernels,  [see here](https://github.com/pytorch/pytorch/tree/7d7855ea3124c16862ea7ed4758f4c7a804ca1ac/aten/src/ATen/native#device_guard).\r\nHowever, it seems like in the tutorial this machinery is not used. \r\nExplicit usage of `at::OptionalDeviceGuard` should resolve the issue (?) in the tutorial. \r\n\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/431",
    "state": "open",
    "labels": [
      "C++"
    ],
    "created_at": "2019-01-31T07:39:07Z",
    "updated_at": "2023-03-15T02:14:36Z",
    "comments": 1,
    "user": "c-hofer"
  },
  {
    "repo": "pytorch/examples",
    "number": 501,
    "title": "why you set epoch to the sampler in the distributed example?",
    "body": "Hi,\r\n\r\nThanks for providing this helpful tutorial series. I am reading the part of training imagenet with distributed mode: \r\n\r\nAt [this line](https://github.com/pytorch/examples/blob/fe8abc3c810420df2856c6e668258f396b154cee/imagenet/main.py#L208), I do not understand the reason why shall I set epoch it the sampler. What is the difference between setting the epoch or not? Cannot I directly fetch data from the dataloader with this sampler as one args? ",
    "url": "https://github.com/pytorch/examples/issues/501",
    "state": "closed",
    "labels": [],
    "created_at": "2019-01-30T03:44:09Z",
    "updated_at": "2023-01-05T08:01:47Z",
    "comments": 4,
    "user": "CoinCheung"
  },
  {
    "repo": "huggingface/transformers",
    "number": 233,
    "title": "What is get_lr() meaning in the optimizer.py",
    "body": "I use a Model based on BertModel, and when I use the BertAdam the learning rate isn't changed. And when I use `get_lr()`, the return result is `[0]`. And I see the length of state isn't 0, but why I get that?",
    "url": "https://github.com/huggingface/transformers/issues/233",
    "state": "closed",
    "labels": [],
    "created_at": "2019-01-28T13:19:06Z",
    "updated_at": "2019-02-05T16:12:33Z",
    "user": "kugwzk"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 16439,
    "title": "What is the difference between F.cross_entropy() and F.nll_loss() ??",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/16439",
    "state": "closed",
    "labels": [],
    "created_at": "2019-01-28T11:06:23Z",
    "updated_at": "2019-01-28T13:25:31Z",
    "user": "lakshmiumenon"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 16438,
    "title": "What is the difference between F.cross_entropy() and F.nll_loss() ??",
    "body": "## \u2753 Questions and Help\r\n\r\n### Please note that this issue tracker is not a help form and this issue will be closed.\r\n\r\nWe have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:\r\n\r\n- [Discussion Forum](https://discuss.pytorch.org/)\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/16438",
    "state": "closed",
    "labels": [],
    "created_at": "2019-01-28T11:06:21Z",
    "updated_at": "2019-01-28T13:45:23Z",
    "user": "lakshmiumenon"
  },
  {
    "repo": "pytorch/examples",
    "number": 500,
    "title": "_pickle.UnpicklingError: invalid load key, '\\xff'.",
    "body": "May I know how to fix the following error\r\n```\r\n\r\nmahmood@orca:fast_neural_style$ python3.7 neural_style/neural_style.py eval --content-image images/content-images/amber.jpg --model images/style-images/mosaic.jpg --output-image a1.jpg --cuda 1\r\nTraceback (most recent call last):\r\n  File \"neural_style/neural_style.py\", line 240, in <module>\r\n    main()\r\n  File \"neural_style/neural_style.py\", line 236, in main\r\n    stylize(args)\r\n  File \"neural_style/neural_style.py\", line 138, in stylize\r\n    state_dict = torch.load(args.model)\r\n  File \"/home/mahmood/anaconda3/lib/python3.7/site-packages/torch/serialization.py\", line 367, in load\r\n    return _load(f, map_location, pickle_module)\r\n  File \"/home/mahmood/anaconda3/lib/python3.7/site-packages/torch/serialization.py\", line 528, in _load\r\n    magic_number = pickle_module.load(f)\r\n_pickle.UnpicklingError: invalid load key, '\\xff'.\r\n\r\n```",
    "url": "https://github.com/pytorch/examples/issues/500",
    "state": "open",
    "labels": [
      "bug",
      "vision",
      "pickle"
    ],
    "created_at": "2019-01-26T15:37:28Z",
    "updated_at": "2022-03-10T05:20:57Z",
    "comments": 0,
    "user": "mahmoodn"
  },
  {
    "repo": "pytorch/examples",
    "number": 499,
    "title": "Crash in mnist example with num_workers > 0",
    "body": "I'm getting a crash in the mnist example at the end of the 1st epoch when I run with any num_workers > 0  I'm running the python code in PyCharm debugger on a Ubuntu 16.04 system with PyTorch 1.0 with CUDA enabled. \r\n\r\nraceback (most recent call last):\r\n  File \"/snap/pycharm-community/108/helpers/pydev/pydevd.py\", line 1741, in <module>\r\nTraceback (most recent call last):\r\n  File \"/snap/pycharm-community/108/helpers/pydev/pydevd.py\", line 1741, in <module>\r\n    main()\r\n  File \"/snap/pycharm-community/108/helpers/pydev/pydevd.py\", line 1735, in main\r\n    main()\r\n  File \"/snap/pycharm-community/108/helpers/pydev/pydevd.py\", line 1735, in main\r\n    globals = debugger.run(setup['file'], None, None, is_module)\r\n  File \"/snap/pycharm-community/108/helpers/pydev/pydevd.py\", line 1135, in run\r\n    globals = debugger.run(setup['file'], None, None, is_module)\r\n  File \"/snap/pycharm-community/108/helpers/pydev/pydevd.py\", line 1135, in run\r\n    pydev_imports.execfile(file, globals, locals)  # execute the script\r\n      File \"/snap/pycharm-community/108/helpers/pydev/_pydev_imps/_pydev_execfile.py\", line 18, in execfile\r\npydev_imports.execfile(file, globals, locals)  # execute the script\r\n  File \"/snap/pycharm-community/108/helpers/pydev/_pydev_imps/_pydev_execfile.py\", line 18, in execfile\r\n        exec(compile(contents+\"\\n\", file, 'exec'), glob, loc)exec(compile(contents+\"\\n\", file, 'exec'), glob, loc)\r\n\r\n  File \"/home/ankur/dev/benchmark/mnist_main.py\", line 119, in <module>\r\n  File \"/home/ankur/dev/benchmark/mnist_main.py\", line 119, in <module>\r\n        main()main()\r\n\r\n  File \"/home/ankur/dev/benchmark/mnist_main.py\", line 112, in main\r\n  File \"/home/ankur/dev/benchmark/mnist_main.py\", line 112, in main\r\n        test(args, model, device, test_loader)test(args, model, device, test_loader)\r\n\r\n  File \"/home/ankur/dev/benchmark/mnist_main.py\", line 49, in test\r\n  File \"/home/ankur/dev/benchmark/mnist_main.py\", line 49, in test\r\n        for data, target in test_loader:for data, target in test_loader:\r\n\r\n  File \"/home/ankur/miniconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 819, in __iter__\r\n  File \"/home/ankur/miniconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 631, in __next__\r\n    idx, batch = self._get_batch()\r\n  File \"/home/ankur/miniconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 601, in _get_batch\r\n    return _DataLoaderIter(self)\r\n  File \"/home/ankur/miniconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 560, in __init__\r\n    return self.data_queue.get(timeout=MP_STATUS_CHECK_INTERVAL)\r\n  File \"/home/ankur/miniconda3/lib/python3.7/queue.py\", line 179, in get\r\n    w.start()\r\n  File \"/home/ankur/miniconda3/lib/python3.7/multiprocessing/process.py\", line 112, in start\r\n    self.not_empty.wait(remaining)\r\n  File \"/home/ankur/miniconda3/lib/python3.7/threading.py\", line 300, in wait\r\n    self._popen = self._Popen(self)\r\n  File \"/home/ankur/miniconda3/lib/python3.7/multiprocessing/context.py\", line 223, in _Popen\r\n        gotit = waiter.acquire(True, timeout)\r\nreturn _default_context.get_context().Process._Popen(process_obj)\r\n  File \"/home/ankur/miniconda3/lib/python3.7/multiprocessing/context.py\", line 277, in _Popen\r\nKeyboardInterrupt\r\n    return Popen(process_obj)\r\n  File \"/home/ankur/miniconda3/lib/python3.7/multiprocessing/popen_fork.py\", line 20, in __init__\r\n    self._launch(process_obj)\r\n  File \"/home/ankur/miniconda3/lib/python3.7/multiprocessing/popen_fork.py\", line 70, in _launch\r\n    self.pid = os.fork()\r\n  File \"/snap/pycharm-community/108/helpers/pydev/_pydev_bundle/pydev_monkey.py\", line 496, in new_fork\r\n",
    "url": "https://github.com/pytorch/examples/issues/499",
    "state": "open",
    "labels": [
      "help wanted"
    ],
    "created_at": "2019-01-25T22:24:02Z",
    "updated_at": "2022-03-10T06:03:51Z",
    "comments": 0,
    "user": "ankur6ue"
  },
  {
    "repo": "huggingface/transformers",
    "number": 205,
    "title": "What is the meaning of Attention Mask",
    "body": "Hi, I noticed that there is something called `Attention Mask` in the model.\r\n\r\nIn the annotation of class `BertForQuestionAnswering`, \r\n\r\n```python\r\n`attention_mask`: an optional torch.LongTensor of shape [batch_size, sequence_length] with indices\r\n            selected in [0, 1]. It's a mask to be used if the input sequence length is smaller than the max\r\n            input sequence length in the current batch. It's the mask that we typically use for attention when\r\n            a batch has varying length sentences.\r\n```\r\n\r\nAnd its usage is in class `BertSelfAttention`, function `forward`,\r\n\r\n```python\r\n# Apply the attention mask is (precomputed for all layers in BertModel forward() function)\r\nattention_scores = attention_scores + attention_mask\r\n```\r\n\r\nIt seems the attention_mask is used to add 1 to the scores for positions that is taken up by real tokens, and add 0 to the positions outside current sequence. \r\n\r\nThen, why not set the scores to `-inf` where the positions are outside the current sequence. Then pass the scores to a softmax layer, those score will become 0 as we want.",
    "url": "https://github.com/huggingface/transformers/issues/205",
    "state": "closed",
    "labels": [],
    "created_at": "2019-01-18T14:04:11Z",
    "updated_at": "2022-08-19T19:37:44Z",
    "user": "jianyucai"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 127,
    "title": "Can't find mention type in doc class",
    "body": "I can't find the mention type of a span, so I just copy get_span_type function to get mention types as follows. \r\nMaybe it could be merged into doc object.\r\n```\r\nACCEPTED_ENTS = [\"PERSON\", \"NORP\", \"FACILITY\", \"ORG\", \"GPE\", \"LOC\", \"PRODUCT\", \"EVENT\", \"WORK_OF_ART\", \"LANGUAGE\"]\r\nMENTION_TYPE = {\"PRONOMINAL\": 0, \"NOMINAL\": 1, \"PROPER\": 2, \"LIST\": 3}\r\nPRP_TAGS = [\"PRP\", \"PRP$\"]\r\nCONJ_TAGS = [\"CC\", \",\"]\r\nPROPER_TAGS = [\"NNP\", \"NNPS\"]\r\n\r\ndef get_span_type(span):\r\n    ''' Find the type of a Span '''\r\n    if any(t.tag_ in CONJ_TAGS and t.ent_type_ not in ACCEPTED_ENTS for t in span):\r\n        mention_type = MENTION_TYPE[\"LIST\"]\r\n    elif span.root.tag_ in PRP_TAGS:\r\n        mention_type = MENTION_TYPE[\"PRONOMINAL\"]\r\n    elif span.root.ent_type_ in ACCEPTED_ENTS or span.root.tag_ in PROPER_TAGS:\r\n        mention_type = MENTION_TYPE[\"PROPER\"]\r\n    else:\r\n        mention_type = MENTION_TYPE[\"NOMINAL\"]\r\n    return mention_type\r\n```",
    "url": "https://github.com/huggingface/neuralcoref/issues/127",
    "state": "closed",
    "labels": [
      "question",
      "wontfix"
    ],
    "created_at": "2019-01-16T07:46:38Z",
    "updated_at": "2019-06-21T08:31:42Z",
    "user": "joe32140"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 411,
    "title": "ValueError low>=high in RandomCrop",
    "body": "Hello everyone,\r\n\r\nFirst off, thanks for such detailed PyTorch tutorials! Recently, I was going through the data loading and processing tutorial [here](https://pytorch.org/tutorials/beginner/data_loading_tutorial.html). Maybe there's some misunderstanding from my side but in `beginner_source/data_loading_tutorial.py`, for class `RandomCrop`, when the value of `output_size` is greater than original image size, it throws a `ValueError: low >= high` as `h < new_h` and `w < new_w`.\r\n\r\nSo, can I get a confirmation as to whether or not this is a bug? If yes, I would be happy to fix it. \r\n\r\n(**Note**: To reproduce the error try changing value of `crop` [here](https://github.com/pytorch/tutorials/blob/master/beginner_source/data_loading_tutorial.py#L304) to something greater such as `crop = RandomCrop(224)`)\r\n\r\nPing @chsasank \r\n\r\nThanks,\r\nGaurav",
    "url": "https://github.com/pytorch/tutorials/issues/411",
    "state": "closed",
    "labels": [],
    "created_at": "2019-01-11T23:54:39Z",
    "updated_at": "2019-09-12T04:24:36Z",
    "comments": 1,
    "user": "Demfier"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 410,
    "title": "TypeError : filename should be a str in beginner/nn_tutorial.py",
    "body": "I got a `TypeError` error in `beginner_source/nn_tutorial.py` while building tutorials with Python 3.5 on Ubuntu 16.04.\r\n\r\nIt seems like the type of parameter passed in `gzip.open()` in [\"beginner_source/nn_tutorial.py(L64)\"](https://github.com/pytorch/tutorials/blob/master/beginner_source/nn_tutorial.py#L64) should be converted.\r\n\r\nThe error message is like below:\r\n```\r\nWARNING: /home/ubuntu/tutorials/beginner_source/nn_tutorial.py failed to execute correctly: Traceback (most recent call last):\r\n File \"/home/ubuntu/tutorials/beginner_source/nn_tutorial.py\", line 64, in <module>\r\n   with gzip.open(PATH / FILENAME, \"rb\") as f:\r\n File \"/usr/lib/python3.5/gzip.py\", line 57, in open\r\n   raise TypeError(\"filename must be a str or bytes object, or a file\")\r\nTypeError: filename must be a str or bytes object, or a file\r\n```\r\n\r\nI think using `(PATH / FILENAME).as_posix()` more suitable.\r\n\r\nIf this error is visible to everyone, can I fix it?\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/410",
    "state": "closed",
    "labels": [],
    "created_at": "2019-01-11T06:37:53Z",
    "updated_at": "2019-02-08T20:26:28Z",
    "comments": 1,
    "user": "9bow"
  },
  {
    "repo": "pytorch/examples",
    "number": 483,
    "title": "different node has different parameters",
    "body": "I have tried it, but if I found that each model in all node has different gradients,so it results to different model among GPUs, At last I do like this:\r\n            #something to do###############\r\n            loss.backward()\r\n            self.average_gradients()\r\n            self.optimizer.step():\r\n           #other thing to do###############\r\n\r\n    def average_gradients(self):\r\n        world_size = distributed.get_world_size()\r\n\r\n        for p in self.net.parameters():\r\n            distributed.all_reduce(p.grad.data, op=distributed.reduce_op.SUM)\r\n            p.grad.data /= float(world_size)\r\n\r\nIt work normally,but I do not know whether it is right, cause official of pyTorch do not mention it.\r\ncould you tell me is it right? thank you!!!\r\n\r\n\r\nAnd another question: I found I can not run on 2 or more machines, I do not know how to configure it, should I make a configur so that all machines in my group can access each other without password by ssh?",
    "url": "https://github.com/pytorch/examples/issues/483",
    "state": "closed",
    "labels": [],
    "created_at": "2018-12-24T11:54:04Z",
    "updated_at": "2018-12-30T03:53:49Z",
    "comments": 1,
    "user": "YihengJiang"
  },
  {
    "repo": "pytorch/examples",
    "number": 482,
    "title": "Encountered IsADirectoryError at neural style eval",
    "body": "Hello, I am new in python and machine learning related field.\r\n\r\nI caught the following error when trying to test a style from the examples:\r\n\r\n```\r\n /cygdrive/d/Downloaded Programs/git/examples/fast_neural_style\r\n$ python neural_style/neural_style.py eval --content-image <images/content-images/amber.jpg> --model <saved_models/candy.pth> --output-image <images/output-images/> --content-scale 1 --cuda 1\r\nFatal Python error: init_sys_streams: can't initialize sys standard streams\r\nIsADirectoryError: [Errno 21] Is a directory: 0\r\n```\r\nHow can I fix this error?\r\nThanks for any suggestions!\r\n\r\n",
    "url": "https://github.com/pytorch/examples/issues/482",
    "state": "closed",
    "labels": [],
    "created_at": "2018-12-24T09:19:06Z",
    "updated_at": "2022-03-10T05:47:27Z",
    "comments": 1,
    "user": "HosinLau"
  },
  {
    "repo": "pytorch/examples",
    "number": 481,
    "title": "the imagenet main when is use multi gpu(not set gpu args) then the input will not call input.cuda() why?",
    "body": "![image](https://user-images.githubusercontent.com/6283983/50394800-c734e000-079a-11e9-89cd-964cb751a227.png)\r\nif i do't set args.gpu, the only target.cuda() call, why do this kind, but the code run success",
    "url": "https://github.com/pytorch/examples/issues/481",
    "state": "closed",
    "labels": [],
    "created_at": "2018-12-24T08:42:29Z",
    "updated_at": "2018-12-30T03:45:44Z",
    "comments": 1,
    "user": "mmxuan18"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 400,
    "title": "C++ Frontend Tutorial with GPU Support",
    "body": "I am following [this tutorial](https://pytorch.org/cppdocs/installing.html) on using PyTorch with C++ frontend. However, I would like to have a CUDA support, not a CPU only. I have also the `torch` package installed using `conda` but I guess it is not enough to compile C++ sources because I am getting the following error:\r\n```\r\n$ cmake -DCMAKE_PREFIX_PATH=/usr/lib/libtorch ..\r\nCUDA_TOOLKIT_ROOT_DIR not found or specified\r\n-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version \"7.0\")\r\nCMake Warning at /usr/lib/libtorch/share/cmake/Caffe2/public/cuda.cmake:15 (message):\r\n  Caffe2: CUDA cannot be found.  Depending on whether you are building Caffe2\r\n  or a Caffe2 dependent library, the next warning / error will give you more\r\n  info.\r\n```\r\nAs I can see, I need a CUDA toolkit installed, and the env variable pointing to the installation. Could you please create a version of the tutorial that would explain how to better handle this? I would like to have _both_ Python package and to build programmes from C++ sources.\r\n\r\n---\r\n_I am not sure if I've submitted the issue into a right repository so let me know if this should be moved somewhere else._",
    "url": "https://github.com/pytorch/tutorials/issues/400",
    "state": "closed",
    "labels": [],
    "created_at": "2018-12-24T07:50:37Z",
    "updated_at": "2021-06-16T20:45:56Z",
    "comments": 0,
    "user": "i-zaitsev"
  },
  {
    "repo": "pytorch/examples",
    "number": 479,
    "title": "Share dataloader in multi node multi gpus training with multiprocessing-distributed",
    "body": "In the example of [imagenet](https://github.com/pytorch/examples/blob/master/imagenet/main.py), `ngpus` process is created, so if I am training on 4 nodes with 4 gpus on each, there would be 16 processes in total. \r\nIs there any way I could share the dataloader for the processes on the same node? Since I implemented a special dataloader with cost a lot of memory. \r\nMany thanks. ",
    "url": "https://github.com/pytorch/examples/issues/479",
    "state": "closed",
    "labels": [],
    "created_at": "2018-12-19T13:41:36Z",
    "updated_at": "2020-09-11T12:57:16Z",
    "comments": 0,
    "user": "xvjiarui"
  },
  {
    "repo": "pytorch/examples",
    "number": 478,
    "title": "in imagenet example why the val need to first resize to 256 and then crop 224, if the input is 299 how to set the resize input?",
    "body": "![image](https://user-images.githubusercontent.com/6283983/50218419-da286880-03c6-11e9-84a7-fc6bb57a61b1.png)\r\nwhen the model is inceptionv3 the input size is 299,  while others is 224. so the resize parameter counld set to what?   and why in val stage there need to first resize to a bigger size then crop, some example directly use resize(224) ",
    "url": "https://github.com/pytorch/examples/issues/478",
    "state": "closed",
    "labels": [],
    "created_at": "2018-12-19T11:48:52Z",
    "updated_at": "2019-03-27T18:01:58Z",
    "comments": 1,
    "user": "mmxuan18"
  },
  {
    "repo": "pytorch/examples",
    "number": 476,
    "title": "--resume fails after 1 epoch with Pytorch 1.0 release",
    "body": "Using --resume fails after 1 epoch with Pytorch 1.0 release with error below.  I tried this with resnet50 and resnet18\r\n```\r\nTraceback (most recent call last):\r\n  File \"main.py\", line 398, in <module>\r\n    main()\r\n  File \"main.py\", line 110, in main\r\n    mp.spawn(main_worker, nprocs=ngpus_per_node, args=(ngpus_per_node, args))\r\n  File \"/home/tools/anaconda3-5.3/lib/python3.7/site-packages/torch/multiprocessing/spawn.py\", line 167, in spawn\r\n    while not spawn_context.join():\r\n  File \"/home/tools/anaconda3-5.3/lib/python3.7/site-packages/torch/multiprocessing/spawn.py\", line 114, in join\r\n    raise Exception(msg)\r\nException:\r\n\r\n-- Process 1 terminated with the following error:\r\nTraceback (most recent call last):\r\n  File \"/home/tools/anaconda3-5.3/lib/python3.7/site-packages/torch/multiprocessing/spawn.py\", line 19, in _wrap\r\n    fn(i, *args)\r\n  File \"/space8T/mdflickner/pytorch/examples/imagenet/main.py\", line 241, in main_worker\r\n    is_best = acc1 > best_acc1\r\nRuntimeError: arguments are located on different GPUs at /pytorch/aten/src/THC/generic/THCTensorMathCompareT.cu:15\r\n```",
    "url": "https://github.com/pytorch/examples/issues/476",
    "state": "open",
    "labels": [
      "help wanted",
      "vision"
    ],
    "created_at": "2018-12-17T17:04:15Z",
    "updated_at": "2022-03-10T06:04:01Z",
    "comments": 1,
    "user": "mdflickner"
  },
  {
    "repo": "pytorch/examples",
    "number": 473,
    "title": "the sum of doc_topics is not equal 1",
    "body": "Hi, I have a question. when I run lda.py, I find the sum of `doc_topics` is not equal 1. In fact, they are decreasing in the training process. Is there something wrong?",
    "url": "https://github.com/pytorch/examples/issues/473",
    "state": "closed",
    "labels": [],
    "created_at": "2018-12-14T14:50:43Z",
    "updated_at": "2018-12-19T22:17:36Z",
    "comments": 2,
    "user": "dongfeng951"
  },
  {
    "repo": "pytorch/examples",
    "number": 472,
    "title": "How can I find a reference to understand the meaning of pro.sample?",
    "body": "what is the meaning of `pyro.sample( ........, infer={\"enumerate\": \"parallel\"})`? How can I find a reference to understand the meaning of `pro.sample`? I cannot find it.\r\nThanks!",
    "url": "https://github.com/pytorch/examples/issues/472",
    "state": "closed",
    "labels": [],
    "created_at": "2018-12-14T13:33:42Z",
    "updated_at": "2018-12-15T04:02:46Z",
    "comments": 1,
    "user": "dongfeng951"
  },
  {
    "repo": "pytorch/examples",
    "number": 471,
    "title": "How to invoke GPU?",
    "body": "Hi, when I run the example codes such as vae.py, the GPU cannot be invoked automatically and therefore the training is very slow.\r\nBut the pytorch can invoke GPU automatically.\r\nSo how to invoke GPU? \r\nThank you!",
    "url": "https://github.com/pytorch/examples/issues/471",
    "state": "closed",
    "labels": [],
    "created_at": "2018-12-14T08:14:46Z",
    "updated_at": "2018-12-15T04:18:49Z",
    "comments": 2,
    "user": "dongfeng951"
  },
  {
    "repo": "pytorch/examples",
    "number": 470,
    "title": "The Volatile GPU-Util is always 0, in examples/imagenet",
    "body": "I run the example of imagenet in https://github.com/pytorch/examples/tree/master/imagenet, althougt I can run it successfully, but it is slow, and the Volatile GPU-Util is always 0 with command 'nvidia-smi'\r\n```\r\n+-----------------------------------------------------------------------------+\r\n| NVIDIA-SMI 390.87                 Driver Version: 390.87                    |\r\n|-------------------------------+----------------------+----------------------+\r\n| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |\r\n| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |\r\n|===============================+======================+======================|\r\n|   0  GeForce GTX 108...  Off  | 00000000:01:00.0  On |                  N/A |\r\n| 31%   58C    P2    70W / 250W |   9584MiB / 11170MiB |      0%      Default |\r\n+-------------------------------+----------------------+----------------------+\r\n                                                                               \r\n+-----------------------------------------------------------------------------+\r\n| Processes:                                                       GPU Memory |\r\n|  GPU       PID   Type   Process name                             Usage      |\r\n|=============================================================================|\r\n|    0       947      G   /usr/lib/xorg/Xorg                           285MiB |\r\n|    0      1752      G   compiz                                       154MiB |\r\n|    0      1930      G   fcitx-qimpanel                                 9MiB |\r\n|    0      4690      G   ...quest-channel-token=4115043597718524916    72MiB |\r\n|    0     26519      C   python                                      9057MiB |\r\n+-----------------------------------------------------------------------------+\r\n\r\n```\r\n",
    "url": "https://github.com/pytorch/examples/issues/470",
    "state": "open",
    "labels": [
      "question"
    ],
    "created_at": "2018-12-13T06:49:15Z",
    "updated_at": "2022-03-10T16:46:35Z",
    "comments": 10,
    "user": "wangxianrui"
  },
  {
    "repo": "huggingface/transformers",
    "number": 114,
    "title": "What is the best dataset structure for BERT?",
    "body": "First I want to say thanks for setting up all this!\r\n\r\nI am using BertForSequenceClassification and am wondering what the optimal way is to structure my sequences. \r\n\r\nRight now my sequences are blog post which could be upwards to 400 words long. \r\n\r\nWould it be better to split my blog posts in sentences and use the sentences as my sequences instead? \r\n\r\nThanks!",
    "url": "https://github.com/huggingface/transformers/issues/114",
    "state": "closed",
    "labels": [],
    "created_at": "2018-12-11T16:28:00Z",
    "updated_at": "2018-12-11T20:57:45Z",
    "user": "wahlforss"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 14889,
    "title": "what is the algorithm theory of torch.nn.AdaptiveMaxPool2d?",
    "body": "what is the algorithm theory of torch.nn.AdaptiveMaxPool2d?\r\n Is there any papers about torch.nn.AdaptiveMaxPool2d?\r\n And how to find the c++ of implementing torch.nn.AdaptiveMaxPool2d in pytorch?",
    "url": "https://github.com/pytorch/pytorch/issues/14889",
    "state": "closed",
    "labels": [],
    "created_at": "2018-12-07T10:16:15Z",
    "updated_at": "2018-12-07T15:46:19Z",
    "user": "zsf23"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 14850,
    "title": "Document what is C10",
    "body": "C10 seems to have an increasingly important role throughout the PyTorch code base (e.g., see #6325 or count the number of open issues containing \"c10\") yet I was unable to find a high-level description about it. There are only \"rumors\" to be found about C10, see for example [this post](https://discuss.pytorch.org/t/pytorch-and-caffe2-convergence/21713/4) at pytorch.org:\r\n> I read on github, that there is a new backend called C10 in progress which combines features and backends from ATen and Caffe2. This backend should be a more generic one which means that adding new tensor types and similar stuff will be easier (the actual discussion was about introducing complex tensors).\r\n\r\nSomeone else on [Reddit](https://www.reddit.com/r/MachineLearning/comments/8xurkp/n_tensorflow_190_is_out/e27ewhz/):\r\n> I'd never heard of C10 until you posted this, so caveat emptor, but from the few Google hits available it seems that the major motivations for C10 include:\r\n>\r\n> * Common Tensor ops for PyTorch and Caffe2 (only PyTorch uses ATen)\r\n> * Pluggable tensor ops/backend (maybe easing future AMD, TPU, etc support?)\r\n>\r\n> There's also talk of C10 helping integration of Complex tensor support for PyTorch, which helps give an idea of the level of abstraction they are shooting for.\r\n\r\nAt the minimum, please add a README to the pytorch/c10 directory briefly describing the project.",
    "url": "https://github.com/pytorch/pytorch/issues/14850",
    "state": "closed",
    "labels": [
      "module: docs",
      "triaged"
    ],
    "created_at": "2018-12-06T16:00:51Z",
    "updated_at": "2024-03-13T05:40:46Z",
    "user": "christoph-conrads"
  },
  {
    "repo": "pytorch/examples",
    "number": 456,
    "title": "How can I get the name of each image in the whole imagenet training process?",
    "body": "I want to obtain the name and the true label of each image, how can I modify the code to do that ? I find the data_loader just return the input tensor and the label without the image name.",
    "url": "https://github.com/pytorch/examples/issues/456",
    "state": "closed",
    "labels": [],
    "created_at": "2018-11-30T06:40:48Z",
    "updated_at": "2018-11-30T06:54:39Z",
    "comments": 1,
    "user": "lith0613"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 113,
    "title": "what is the different between en_coref models?",
    "body": "for three models, en_coref_lg, en_coref_md, en_coref_sm, which one has best performance? only consider the performance, is lg best? ",
    "url": "https://github.com/huggingface/neuralcoref/issues/113",
    "state": "closed",
    "labels": [],
    "created_at": "2018-11-30T06:36:43Z",
    "updated_at": "2019-04-11T12:14:11Z",
    "user": "Jasperty"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 14460,
    "title": "C++ API use model.pt in GPU . When I use lstm in model, there is what():  Expected object of backend CPU but got backend CUDA for argument #2 'mat2' (checked_tensor_unwrap at /pytorch/aten/src/ATen/Utils.h:70)",
    "body": "## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nC++ code\uff1a\r\n\r\nmodule->to(at::kCUDA);\r\nauto gpu_tensor = img_var.to(at::kCUDA);\r\nvector<torch::jit::IValue> inputs;\r\ninputs.push_back(gpu_tensor);\r\nauto  out_tensor = module->forward(inputs).toTensor();\r\n\r\nmodel\uff1a\r\n\r\n\t\t# LSTM\r\n\r\n\t\tself.lstm1 = nn.LSTM(input_size=64, hidden_size=64, num_layers=2, batch_first=True)\r\n\r\n\t\tself.lstm2 = nn.LSTM(input_size=64, hidden_size=64, num_layers=2, batch_first=True)\r\n\r\n\t\t#self.lstm2 = nn.Sequential(*lstm2)\r\n\r\n\t\tself.lstm3 = nn.LSTM(input_size=64, hidden_size=64, num_layers=2, batch_first=True)\r\n\r\n\r\nand\r\n\r\n\t\tim6_1, hidden1 = self.lstm1(img5_1)\r\n\t\t#self.encode5(a)\r\n\t\tim6_2, hidden2 = self.lstm2(img5_2, hidden1)\r\n\t\t#self.encode5(a)\r\n\t\tim6_3, hidden3 = self.lstm3(img5_3, hidden2)\r\n\r\n  error\uff1a\r\n![image](https://user-images.githubusercontent.com/30424546/49136932-10be1680-f326-11e8-90ca-7bd061b8f8c2.png)\r\n\r\n\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n## Expected behavior\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n## Environment\r\n\r\n\r\n - PyTorch Version ( 1.0):\r\n - OS ( CentOS):\r\n\r\n - Python version:2.7\r\n - CUDA/cuDNN version:9.0\r\n - GCC version:5.4.0\r\n \r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n",
    "url": "https://github.com/pytorch/pytorch/issues/14460",
    "state": "closed",
    "labels": [],
    "created_at": "2018-11-28T07:58:33Z",
    "updated_at": "2021-06-01T21:26:27Z",
    "user": "joy-yjl"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 14456,
    "title": "What is wrong with my model? It slows many times after switching from version 0.4.1 to 1.0",
    "body": "This is the definition of my model: \r\n```python\r\nimport torchvision\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\n\r\n\r\nclass Model(nn.Module):\r\n    def __init__(self, in_dim, out_dim, *args, **kwargs):\r\n        super(Model, self).__init__(*args, **kwargs)\r\n        vgg16 = torchvision.models.vgg16()\r\n\r\n        layers = []\r\n        layers.append(nn.Conv2d(in_dim, 64, kernel_size = 3, stride = 1, padding = 1))\r\n        layers.append(nn.ReLU(inplace = True))\r\n        layers.append(nn.Conv2d(64, 64, kernel_size = 3, stride = 1, padding = 1))\r\n        layers.append(nn.ReLU(inplace = True))\r\n        layers.append(nn.MaxPool2d(3, stride = 2, padding = 1))\r\n\r\n        layers.append(nn.Conv2d(64, 128, kernel_size = 3, stride = 1, padding = 1))\r\n        layers.append(nn.ReLU(inplace = True))\r\n        layers.append(nn.Conv2d(128, 128, kernel_size = 3, stride = 1, padding = 1))\r\n        layers.append(nn.ReLU(inplace = True))\r\n        layers.append(nn.MaxPool2d(3, stride = 2, padding = 1))\r\n\r\n        layers.append(nn.Conv2d(128, 256, kernel_size = 3, stride = 1, padding = 1))\r\n        layers.append(nn.ReLU(inplace = True))\r\n        layers.append(nn.Conv2d(256, 256, kernel_size = 3, stride = 1, padding = 1))\r\n        layers.append(nn.ReLU(inplace = True))\r\n        layers.append(nn.Conv2d(256, 256, kernel_size = 3, stride = 1, padding = 1))\r\n        layers.append(nn.ReLU(inplace = True))\r\n        layers.append(nn.MaxPool2d(3, stride = 2, padding = 1))\r\n\r\n        layers.append(nn.Conv2d(256, 512, kernel_size = 3, stride = 1, padding = 1))\r\n        layers.append(nn.ReLU(inplace = True))\r\n        layers.append(nn.Conv2d(512, 512, kernel_size = 3, stride = 1, padding = 1))\r\n        layers.append(nn.ReLU(inplace = True))\r\n        layers.append(nn.Conv2d(512, 512, kernel_size = 3, stride = 1, padding = 1))\r\n        layers.append(nn.ReLU(inplace = True))\r\n        layers.append(nn.MaxPool2d(3, stride = 1, padding = 1))\r\n\r\n        layers.append(nn.Conv2d(512,\r\n            512,\r\n            kernel_size = 3,\r\n            stride = 1,\r\n            padding = 2,\r\n            dilation = 2))\r\n        layers.append(nn.ReLU(inplace = True))\r\n        layers.append(nn.Conv2d(512,\r\n            512,\r\n            kernel_size = 3,\r\n            stride = 1,\r\n            padding = 2,\r\n            dilation = 2))\r\n        layers.append(nn.ReLU(inplace = True))\r\n        layers.append(nn.Conv2d(512,\r\n            512,\r\n            kernel_size = 3,\r\n            stride = 1,\r\n            padding = 2,\r\n            dilation = 2))\r\n        layers.append(nn.ReLU(inplace = True))\r\n        layers.append(nn.MaxPool2d(3, stride = 1, padding = 1))\r\n        self.features = nn.Sequential(*layers)\r\n\r\n        classifier = []\r\n        classifier.append(nn.AvgPool2d(3, stride = 1, padding = 1))\r\n        classifier.append(nn.Conv2d(512,\r\n            1024,\r\n            kernel_size = 3,\r\n            stride = 1,\r\n            padding = 12,\r\n            dilation = 12))\r\n        classifier.append(nn.ReLU(inplace = True))\r\n        classifier.append(nn.Conv2d(1024, 1024, kernel_size = 1, stride = 1, padding = 0))\r\n        classifier.append(nn.ReLU(inplace = True))\r\n        classifier.append(nn.Dropout(p = 0.5))\r\n        classifier.append(nn.Conv2d(1024, out_dim, kernel_size = 1))\r\n        self.classifier = nn.Sequential(*classifier)\r\n\r\n        self.init_weights()\r\n\r\n\r\n    def forward(self, x):\r\n        im = x\r\n        x = self.features(x)\r\n        x = self.classifier(x)\r\n        return x\r\n\r\n    def init_weights(self):\r\n        vgg = torchvision.models.vgg16(pretrained = True)\r\n        state_vgg = vgg.features.state_dict()\r\n        self.features.load_state_dict(state_vgg)\r\n\r\n        for ly in self.classifier.children():\r\n            if isinstance(ly, nn.Conv2d):\r\n                nn.init.kaiming_normal_(ly.weight, a=1)\r\n                nn.init.constant_(ly.bias, 0)\r\n```\r\nAnd this is my test script: \r\n```python\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport time\r\nfrom model import Model\r\n\r\n\r\nif __name__ == \"__main__\":\r\n\r\n    net = Model(3, 21)\r\n    net.train()\r\n    net.cuda()\r\n    net = nn.DataParallel(net)\r\n    Loss = nn.CrossEntropyLoss(ignore_index = 255)\r\n    Loss.cuda()\r\n    optim = torch.optim.SGD(net.parameters(), lr = 1e-3, momentum = 0.9, weight_decay = 5e-4)\r\n\r\n    st = time.time()\r\n    scale = [0.5, 0.75, 1]\r\n    loss_avg = []\r\n    for i in range(10000):\r\n        in_ten = torch.randn(70, 3, 224, 224)\r\n        label = torch.randint(0, 21, [70, 1, 224, 224])\r\n        in_ten = in_ten.cuda()\r\n        label = label.cuda()\r\n        label = torch.tensor(label).long().cuda()\r\n        optim.zero_grad()\r\n        H, W = in_ten.size()[2:]\r\n        for sub_i, s in enumerate(scale):\r\n            print(time.time() - st)\r\n            h, w = int(H * s), int(W * s)\r\n            in_ten_s = F.interpolate(in_ten, (h, w), mode = 'bilinear')\r\n            out = net(in_ten_s)\r\n            out = F.interpolate(out, [H, W], mode = 'bilinear')\r\n  ",
    "url": "https://github.com/pytorch/pytorch/issues/14456",
    "state": "closed",
    "labels": [
      "module: performance"
    ],
    "created_at": "2018-11-28T06:44:26Z",
    "updated_at": "2019-06-09T02:44:25Z",
    "user": "CoinCheung"
  },
  {
    "repo": "pytorch/examples",
    "number": 453,
    "title": "Is the loss of the first word covered during the language model evaluation?",
    "body": "In the language model example, it seems that during the evaluation, the code starts from computing the loss of the second word. Thus, skipping the loss of the first word. \r\nhttps://github.com/pytorch/examples/blob/537f6971872b839b36983ff40dafe688276fe6c3/word_language_model/main.py#L136\r\nhttps://github.com/pytorch/examples/blob/537f6971872b839b36983ff40dafe688276fe6c3/word_language_model/main.py#L121-L125\r\n\r\nFurthermore, the evaluation data is divided into 10 batches, hence, the losses of 10 words are skipped.\r\nAm I right or I did miss something?\r\nhttps://github.com/pytorch/examples/blob/537f6971872b839b36983ff40dafe688276fe6c3/word_language_model/main.py#L85-L88",
    "url": "https://github.com/pytorch/examples/issues/453",
    "state": "open",
    "labels": [
      "good first issue",
      "nlp"
    ],
    "created_at": "2018-11-26T10:28:03Z",
    "updated_at": "2022-03-10T06:08:08Z",
    "comments": 0,
    "user": "khassanoff"
  },
  {
    "repo": "pytorch/examples",
    "number": 450,
    "title": "How to use trained model to classifier pictures?",
    "body": "I have trained a best model by imagenet,but code repo has given does not have test option,so how can I use the model have trained to classifier pictures with labels?",
    "url": "https://github.com/pytorch/examples/issues/450",
    "state": "open",
    "labels": [
      "help wanted",
      "vision"
    ],
    "created_at": "2018-11-25T03:27:13Z",
    "updated_at": "2022-03-10T06:07:49Z",
    "comments": 2,
    "user": "mohhao"
  },
  {
    "repo": "pytorch/examples",
    "number": 448,
    "title": "which pytorch version can run the fast rcnn demo?",
    "body": "",
    "url": "https://github.com/pytorch/examples/issues/448",
    "state": "closed",
    "labels": [],
    "created_at": "2018-11-21T10:42:41Z",
    "updated_at": "2022-03-10T00:26:13Z",
    "comments": 2,
    "user": "Bigwode"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 110,
    "title": "Doesn't work when span is merged.",
    "body": "```python\r\nnlp = spacy.load('en_coref_sm')\r\ntext = nlp(\"Michelle Obama is the wife of former U.S. President Barack Obama. Prior to her role as first lady, she was a lawyer.\")\r\n           \r\nspans = list(text.noun_chunks)\r\nfor span in spans:\r\n    span.merge()\r\n\r\nfor word in text:\r\n    print(word)\r\n    if(word._.in_coref):\r\n        print(text._.coref_clusters)\r\n```\r\nWhen the above code is run, it gives the following error:\r\n```\r\n---------------------------------------------------------------------------\r\nIndexError                                Traceback (most recent call last)\r\n<ipython-input-98-4252d464f86d> in <module>()\r\n      1 for word in text:\r\n      2     print(word)\r\n----> 3     if(word._.in_coref):\r\n      4         print(text._.coref_clusters)\r\n\r\n~\\Anaconda3\\lib\\site-packages\\spacy\\tokens\\underscore.py in __getattr__(self, name)\r\n     29         default, method, getter, setter = self._extensions[name]\r\n     30         if getter is not None:\r\n---> 31             return getter(self._obj)\r\n     32         elif method is not None:\r\n     33             return functools.partial(method, self._obj)\r\n\r\nneuralcoref.pyx in __iter__()\r\n\r\nspan.pyx in __iter__()\r\n\r\nspan.pyx in spacy.tokens.span.Span._recalculate_indices()\r\n\r\nIndexError: [E037] Error calculating span: Can't find a token ending at character offset 78.\r\n```",
    "url": "https://github.com/huggingface/neuralcoref/issues/110",
    "state": "closed",
    "labels": [
      "question",
      "wontfix"
    ],
    "created_at": "2018-11-21T10:12:43Z",
    "updated_at": "2019-06-17T14:22:21Z",
    "user": "lahsuk"
  },
  {
    "repo": "pytorch/examples",
    "number": 443,
    "title": "DCGAN: Generate more number of images",
    "body": "Is there a way we can generate an arbitrary number of images? Right now the fake sample is outputting to 64 images with default settings. My goal is to get 250 fake images. Is this possible?",
    "url": "https://github.com/pytorch/examples/issues/443",
    "state": "closed",
    "labels": [],
    "created_at": "2018-11-16T04:49:33Z",
    "updated_at": "2018-11-16T04:50:14Z",
    "comments": 1,
    "user": "MonojitBanerjee"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 13460,
    "title": "What is the net *.pb file encoding?",
    "body": "Hi there,\r\n\r\nI am running the following code:\r\n\r\n```python\r\nwith open(EXPORT_PATH + \"mnist_init_net.pb\", encoding=\"utf-8\") as f:\r\n    init_net = f.read()\r\n```\r\n\r\nI get the following error:\r\n```python\r\nUnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 24: invalid continuation byte\r\n```\r\n\r\nIt seems like the simple thing to do is to change the encoding type from not being utf-8 (which open() defaults to it seems in this case). What encoding should I use?\r\n\r\nmnist_init_net.pb file is generated via:\r\n\r\n```python\r\ninit_net, predict_net = c2.onnx_graph_to_caffe2_net(model)\r\nwith open(EXPORT_PATH + \"mnist_init_net.pb\", \"wb\") as f:\r\n    f.write(init_net.SerializeToString())\r\n```\r\n\r\nIs ISO-8859-1 correct?\r\n\r\n---- \r\n```\r\npython -c \"import torch; print(torch.__version__)\"\r\n1.0.0.dev20181029\r\n\r\npython -c \"import onnx; print(onnx.__version__)\"\r\n1.3.0\r\n\r\nOS: OS X 10.13\r\n\r\npython --version\r\nPython 3.6.6 :: Anaconda custom (64-bit)\r\n```",
    "url": "https://github.com/pytorch/pytorch/issues/13460",
    "state": "closed",
    "labels": [],
    "created_at": "2018-11-01T18:26:20Z",
    "updated_at": "2018-11-07T16:07:03Z",
    "user": "Suhail"
  },
  {
    "repo": "pytorch/examples",
    "number": 431,
    "title": "How to run distributed training on multiple Node using ImageNet using ResNet model ",
    "body": "The script mentioned in https://github.com/pytorch/examples/tree/master/imagenet does provides good guideline on single node training however it doesn't have good documentation on Distributed training on multiple Node.\r\n\r\nI tried to use two machines with 8 gpus with below command\r\n\r\nMachine-1 script\r\n```\r\nHOST_PORT=\"tcp://Machine-1-ip:13333\"\r\n\r\nNODE=0\r\nRANKS_PER_NODE=8\r\n\r\n\r\nfor i in $(seq 0 7); do\r\n  LOCAL_RANK=$i\r\n  DISTRIBUTED_RANK=$((RANKS_PER_NODE * NODE + LOCAL_RANK))\r\n  NCCL_DEBUG=INFO NCCL_MIN_NRINGS=5 python /home/ubuntu/examples/imagenet/main.py  \\\r\n       --a resnet18 \\\r\n       /home/ubuntu/mini_imagenet \\\r\n       --dist-url $HOST_PORT        \\\r\n       --gpu $DISTRIBUTED_RANK \\\r\n       --dist-backend nccl \\\r\n       --world-size  16 &\r\n  PIDS[$LOCAL_RANK]=$!\r\ndone\r\n```\r\n\r\nOn machine-2\r\n\r\n```\r\nHOST_PORT=\"tcp://Machine-1-ip:13333\"\r\n\r\nNODE=1\r\nRANKS_PER_NODE=8\r\n\r\n\r\nfor i in $(seq 0 7); do\r\n  LOCAL_RANK=$i\r\n  DISTRIBUTED_RANK=$((RANKS_PER_NODE * NODE + LOCAL_RANK))\r\n  NCCL_DEBUG=INFO NCCL_MIN_NRINGS=5 python /home/ubuntu/examples/imagenet/main.py  \\\r\n       --a resnet18 \\\r\n       /home/ubuntu/mini_imagenet \\\r\n       --dist-url $HOST_PORT        \\\r\n       --gpu $DISTRIBUTED_RANK \\\r\n       --dist-backend nccl \\\r\n       --world-size  16 &\r\n  PIDS[$LOCAL_RANK]=$!\r\ndone\r\n```\r\n\r\nHowever it fails with below **error** \r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/ubuntu/examples/imagenet/main.py\", line 347, in <module>\r\n    main()\r\n  File \"/home/ubuntu/examples/imagenet/main.py\", line 96, in main\r\n    world_size=args.world_size)\r\n  File \"/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/distributed/__init__.py\", line 94, in init_process_group\r\n    group_name, rank)\r\nRuntimeError: the MPI backend is not available; try to recompile the THD package with MPI support at /opt/conda/conda-bld/pytorch_1532579245307/work/torch/lib/THD/process_group/General.cpp:17\r\n\r\n```\r\n",
    "url": "https://github.com/pytorch/examples/issues/431",
    "state": "open",
    "labels": [
      "distributed"
    ],
    "created_at": "2018-10-31T06:11:37Z",
    "updated_at": "2022-06-15T10:40:29Z",
    "comments": 12,
    "user": "goswamig"
  },
  {
    "repo": "pytorch/examples",
    "number": 430,
    "title": "error in the backward pass while using the pytorch roi pooling",
    "body": "I am using [link](https://github.com/pytorch/examples/blob/d8d378c31d2766009db400ac03f41dd837a56c2a/fast_rcnn/roi_pooling.py#L38-L53) but i get error while doing the backward pass \r\n```\r\n\r\n  File \"/home/alireza/anaconda3/lib/python3.6/site-packages/spyder_kernels/customize/spydercustomize.py\", line 668, in runfile\r\n    execfile(filename, namespace)\r\n\r\n  File \"/home/alireza/anaconda3/lib/python3.6/site-packages/spyder_kernels/customize/spydercustomize.py\", line 108, in execfile\r\n    exec(compile(f.read(), filename, 'exec'), namespace)\r\n\r\n  File \"/home/alireza/RFCN/trainval_net.py\", line 357, in <module>\r\n    loss.backward()\r\n\r\n  File \"/home/alireza/anaconda3/lib/python3.6/site-packages/torch/autograd/variable.py\", line 167, in backward\r\n    torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables)\r\n\r\n  File \"/home/alireza/anaconda3/lib/python3.6/site-packages/torch/autograd/__init__.py\", line 99, in backward\r\n    variables, grad_variables, retain_graph)\r\n\r\n  File \"/home/alireza/anaconda3/lib/python3.6/site-packages/torch/autograd/function.py\", line 195, in backward\r\n    raise NotImplementedError\r\n\r\nNotImplementedError\r\n```\r\nany suggestion what should i do?\r\n\r\nin the example of the code [link](https://github.com/pytorch/examples/blob/d8d378c31d2766009db400ac03f41dd837a56c2a/fast_rcnn/roi_pooling.py#L38-L53) mentioned that for backward i should use     \r\n\r\n`out.backward(out.data.clone().uniform_())`\r\nbut im not sure where should i use that?\r\nim using the forward pass inside another function as below:\r\n```\r\nclass PSRoIPoolingFunction(Function):\r\n    def __init__(self, pooled_height, pooled_width, spatial_scale, group_size, output_dim):\r\n        self.pooled_width = int(pooled_width)\r\n        self.pooled_height = int(pooled_height)\r\n        self.spatial_scale = float(spatial_scale)\r\n        self.group_size = int(group_size)\r\n        self.output_dim = int(output_dim)\r\n        self.output = None\r\n        self.mappingchannel = None\r\n        self.rois = None\r\n        self.feature_size = None\r\n\r\n    def forward(self, features, rois):\r\n        batch_size, num_channels, data_height, data_width = features.size()\r\n        num_rois = rois.size()[0]\r\n        output = torch.zeros(num_rois, self.output_dim, self.pooled_height, self.pooled_width)\r\n        #        mappingchannel = torch.IntTensor(num_rois, self.output_dim, self.pooled_height, self.pooled_width).zero_()\r\n\r\n        # ROI Pooling\r\n        out2 = roi_pooling(features, rois, size=(self.pooled_height,self.pooled_width),\r\n                           spatial_scale = self.spatial_scale)\r\n        \r\n        # AVerage pooling for Position Sensitive\r\n        \r\n        output = Variable(output.cuda())\r\n\r\n        chan= 0\r\n        for i in range(0,out2.size(1),self.pooled_height*self.pooled_width):\r\n            output[:,chan,:,:] = torch.mean(out2[:,i:i+self.pooled_height*self.pooled_width,:,:],1,keepdim=True)\r\n            chan += 1\r\n\r\n\r\n        return output.data\r\n```\r\n\r\nshould i use the backward pass somewhere?\r\n\r\nHow I should use it? :/",
    "url": "https://github.com/pytorch/examples/issues/430",
    "state": "closed",
    "labels": [],
    "created_at": "2018-10-30T20:00:14Z",
    "updated_at": "2018-10-30T23:31:42Z",
    "comments": 2,
    "user": "isalirezag"
  },
  {
    "repo": "pytorch/examples",
    "number": 428,
    "title": "how to deal with backward pass in pytorch version of ROI Pooling",
    "body": "I am trying to make position sensitive roi pooling  (PSROIPooling)which is proposed in RFCN work.\r\nPSROIPooling is basically ROIPooling + average pooling.\r\nI am using the `roi_pooling.py`  that is written in pytorch and provided [here](https://github.com/pytorch/examples/blob/d8d378c31d2766009db400ac03f41dd837a56c2a/fast_rcnn/roi_pooling.py#L38-L53).\r\n\r\nand trying to change [this part of the code](https://github.com/princewang1994/R-FCN.pytorch/blob/master/lib/model/psroi_pooling/functions/psroi_pooling.py) to be completely in pytorch (please note that the current version is in cuda, but i need to do some modification, so that is why im trying to change it to be in pytorch)\r\n\r\nso I change that [file](https://github.com/princewang1994/R-FCN.pytorch/blob/master/lib/model/psroi_pooling/functions/psroi_pooling.py) from:\r\n```\r\nimport torch\r\nfrom torch.autograd import Function\r\nfrom .._ext import psroi_pooling \r\n\r\n\r\nclass PSRoIPoolingFunction(Function):\r\n    def __init__(self, pooled_height, pooled_width, spatial_scale, group_size, output_dim):\r\n        self.pooled_width = int(pooled_width)\r\n        self.pooled_height = int(pooled_height)\r\n        self.spatial_scale = float(spatial_scale)\r\n        self.group_size = int(group_size)\r\n        self.output_dim = int(output_dim)\r\n        self.output = None\r\n        self.mappingchannel = None\r\n        self.rois = None\r\n        self.feature_size = None\r\n\r\n    def forward(self, features, rois):\r\n        batch_size, num_channels, data_height, data_width = features.size()\r\n        num_rois = rois.size()[0]\r\n\r\n        output = torch.zeros(num_rois, self.output_dim, self.pooled_height, self.pooled_width)\r\n        mappingchannel = torch.IntTensor(num_rois, self.output_dim, self.pooled_height, self.pooled_width).zero_()\r\n        output = output.cuda()\r\n\r\n        mappingchannel = mappingchannel.cuda()\r\n\r\n        psroi_pooling.psroi_pooling_forward_cuda(self.pooled_height, self.pooled_width, self.spatial_scale, self.group_size, self.output_dim, \\\r\n        features, rois, output, mappingchannel)\r\n\r\n\r\n        \r\n        \r\n        self.output = output\r\n        self.mappingchannel = mappingchannel\r\n        self.rois = rois\r\n        self.feature_size = features.size()\r\n\r\n        return output\r\n\r\n    def backward(self, grad_output):\r\n        assert(self.feature_size is not None and grad_output.is_cuda)\r\n\r\n        batch_size, num_channels, data_height, data_width = self.feature_size\r\n\r\n        grad_input = torch.zeros(batch_size, num_channels, data_height, data_width).cuda()\r\n\r\n        psroi_pooling.psroi_pooling_backward_cuda(self.pooled_height, self.pooled_width, self.spatial_scale, self.output_dim,  \\\r\n        grad_output, self.rois, grad_input, self.mappingchannel)\r\n        return grad_input, None\r\n\r\n```\r\n\r\n\r\n\r\nto be like this:\r\n\r\n```\r\nimport torch\r\nfrom torch.autograd import Function\r\nfrom .._ext import psroi_pooling \r\n\r\n\r\nfrom .ROI_Pooling_PyTorch import *\r\nfrom .ROI_Pooling_PyTorch import roi_pooling\r\nfrom torch.autograd  import Variable\r\n\r\nclass PSRoIPoolingFunction(Function):\r\n    def __init__(self, pooled_height, pooled_width, spatial_scale, group_size, output_dim):\r\n        self.pooled_width = int(pooled_width)\r\n        self.pooled_height = int(pooled_height)\r\n        self.spatial_scale = float(spatial_scale)\r\n        self.group_size = int(group_size)\r\n        self.output_dim = int(output_dim)\r\n        self.output = None\r\n        self.mappingchannel = None\r\n        self.rois = None\r\n        self.feature_size = None\r\n\r\n    def forward(self, features, rois):\r\n        batch_size, num_channels, data_height, data_width = features.size()\r\n        num_rois = rois.size()[0]\r\n        output = torch.zeros(num_rois, self.output_dim, self.pooled_height, self.pooled_width)\r\n        #        mappingchannel = torch.IntTensor(num_rois, self.output_dim, self.pooled_height, self.pooled_width).zero_()\r\n\r\n        # ROI Pooling\r\n        out2 = roi_pooling(features, rois, size=(self.pooled_height,self.pooled_width),\r\n                           spatial_scale = self.spatial_scale)\r\n        \r\n        # AVerage pooling for Position Sensitive\r\n        \r\n        output = Variable(output.cuda())\r\n\r\n        chan= 0\r\n        for i in range(0,out2.size(1),self.pooled_height*self.pooled_width):\r\n            output[:,chan,:,:] = torch.mean(out2[:,i:i+self.pooled_height*self.pooled_width,:,:],1,keepdim=True)\r\n            chan += 1\r\n            \r\n        #        mappingchannel = mappingchannel.cuda()\r\n        \r\n        self.output = output\r\n        #        self.mappingchannel = mappingchannel\r\n        self.rois = rois\r\n        self.feature_size = features.size()\r\n        \r\n\r\n        return output.data\r\n\r\n    def backward(self, grad_output):\r\n        \r\n# =============================================================================\r\n#         What should i put here?????\r\n# =============================================================================\r\n```\r\n\r\n\r\nthe forward pass sounds like working, but the backwar",
    "url": "https://github.com/pytorch/examples/issues/428",
    "state": "closed",
    "labels": [],
    "created_at": "2018-10-30T02:08:40Z",
    "updated_at": "2018-10-30T02:21:14Z",
    "comments": 1,
    "user": "isalirezag"
  },
  {
    "repo": "pytorch/examples",
    "number": 425,
    "title": "DCGAN: code and paper don't have the same feature maps?",
    "body": "## From the code\r\n\r\nInput(100\\*1\\*1) --->((ngf\\*8) \\*4\\*4)--->((ngf\\*4) \\*8\\*8)--->((ngf\\*2) \\*16\\*16)--->(ngf \\*32\\*32)--->(3\\*64\\*64)\r\naccording to the code, **ngf=64**. Therefore we have\r\n**Input(100\\*1\\*1) --->(512\\*4\\*4)--->(256\\*8\\*8)--->(128\\*16\\*16)--->(64\\*32\\*32)--->(3\\*64\\*64)**\r\n```python\r\nclass Generator(nn.Module):\r\n    def __init__(self, ngpu):\r\n        super(Generator, self).__init__()\r\n        self.ngpu = ngpu\r\n        self.main = nn.Sequential(\r\n            # input is Z, going into a convolution\r\n            nn.ConvTranspose2d(     nz, ngf * 8, 4, 1, 0, bias=False),\r\n            nn.BatchNorm2d(ngf * 8),\r\n            nn.ReLU(True),\r\n            # state size. (ngf*8) x 4 x 4\r\n            nn.ConvTranspose2d(ngf * 8, ngf * 4, 4, 2, 1, bias=False),\r\n            nn.BatchNorm2d(ngf * 4),\r\n            nn.ReLU(True),\r\n            # state size. (ngf*4) x 8 x 8\r\n            nn.ConvTranspose2d(ngf * 4, ngf * 2, 4, 2, 1, bias=False),\r\n            nn.BatchNorm2d(ngf * 2),\r\n            nn.ReLU(True),\r\n            # state size. (ngf*2) x 16 x 16\r\n            nn.ConvTranspose2d(ngf * 2,     ngf, 4, 2, 1, bias=False),\r\n            nn.BatchNorm2d(ngf),\r\n            nn.ReLU(True),\r\n            # state size. (ngf) x 32 x 32\r\n            nn.ConvTranspose2d(    ngf,      nc, 4, 2, 1, bias=False),\r\n            nn.Tanh()\r\n            # state size. (nc) x 64 x 64\r\n        )\r\n\r\n```\r\n\r\n## From the paper \r\n\r\n![image](https://user-images.githubusercontent.com/4425798/47482661-cbf81900-d869-11e8-9dfd-df6b5d6fb3c0.png)\r\n**Input(100\\*1\\*1) --->(1024\\*4\\*4)--->(512\\*8\\*8)--->(256\\*16\\*16)--->(128\\*32\\*32)--->(3\\*64\\*64)**\r\n\r\n## My question is \r\nwhy the two generator's feature maps sizes don't match?\r\n\r\nThank you\r\n",
    "url": "https://github.com/pytorch/examples/issues/425",
    "state": "closed",
    "labels": [],
    "created_at": "2018-10-25T07:36:28Z",
    "updated_at": "2018-11-03T04:24:48Z",
    "comments": 1,
    "user": "zhibo-liu"
  },
  {
    "repo": "pytorch/examples",
    "number": 421,
    "title": "what is spatial_scale in roi pooling",
    "body": "can you please explain to me what is spatial_scale here:\r\n[Link](https://github.com/pytorch/examples/blob/d8d378c31d2766009db400ac03f41dd837a56c2a/fast_rcnn/roi_pooling.py#L38-L53)\r\n\r\nalso in ```[..., roi[2]:(roi[4]+1), roi[1]:(roi[3]+1)]```, what does `...` in the begining of the list do?\r\n\r\nThanks",
    "url": "https://github.com/pytorch/examples/issues/421",
    "state": "closed",
    "labels": [],
    "created_at": "2018-10-11T14:39:24Z",
    "updated_at": "2018-10-11T19:06:28Z",
    "user": "isalirezag"
  },
  {
    "repo": "pytorch/text",
    "number": 424,
    "title": "What is \"parse_field\" for?",
    "body": "In torchtext.datasets.SNLI.splits, there is a parameter named \"parse_field\". I found if setting this field with a \"datasets.snli.ShiftReduceField\" object, the vocabulary becomes much smaller and SNLI accuracy always improves (compared with default value). It is amazing! But I can't find any description about it...\r\n\r\n\r\n ",
    "url": "https://github.com/pytorch/text/issues/424",
    "state": "closed",
    "labels": [],
    "created_at": "2018-09-27T04:45:10Z",
    "updated_at": "2018-10-02T03:39:58Z",
    "user": "jueliangguke"
  },
  {
    "repo": "pytorch/examples",
    "number": 412,
    "title": "RuntimeError: Found 0 images in subfolders of          in AWS",
    "body": "Have anyone used torchvision.datasets.ImageFolder in AWS?\r\nI met this error in predicting my pictures in my own folder\r\n\r\nRuntimeError: Found 0 images in subfolders of: mine/1/2\r\nSupported extensions are: .jpg,.jpeg,.png,.ppm,.bmp,.pgm,.tif\r\n\r\nBut, I have uploaded 3 jpg images in  mine/1/2.\r\n\r\nIt also have found the folder\r\n\r\nIs there anything I have missed?\r\nAny suggestion will be appreciated\r\n<img width=\"371\" alt=\"2\" src=\"https://user-images.githubusercontent.com/42711020/45485510-cfb75c80-b74f-11e8-8ce5-bbfc05ea19ad.png\">\r\n<img width=\"413\" alt=\"2 2\" src=\"https://user-images.githubusercontent.com/42711020/45485518-d2b24d00-b74f-11e8-91b3-c5953d27b165.png\">\r\n<img width=\"249\" alt=\"2 1\" src=\"https://user-images.githubusercontent.com/42711020/45485520-d7770100-b74f-11e8-9f3b-5d0fa0b47f3b.png\">\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/examples/issues/412",
    "state": "closed",
    "labels": [],
    "created_at": "2018-09-13T11:23:47Z",
    "updated_at": "2021-09-07T03:11:15Z",
    "comments": 2,
    "user": "Aaron4Fun"
  },
  {
    "repo": "pytorch/examples",
    "number": 411,
    "title": "AlexNet code",
    "body": "Where can I find the AlexNet code? I would like to implement it in a distributed mode using MPI. ",
    "url": "https://github.com/pytorch/examples/issues/411",
    "state": "closed",
    "labels": [],
    "created_at": "2018-09-11T13:08:24Z",
    "updated_at": "2022-03-10T00:27:48Z",
    "comments": 1,
    "user": "abidmalikwaterloo"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 11130,
    "title": "where is the caffe2 folder?",
    "body": "Hi,\r\n\r\nIn the old version of caffe2, I could find the caffe2 folder ( \"/usr/local/caffe2\").  Where is the the  caffe2 folder(within PYTORCH ) right now?\r\n \r\n ",
    "url": "https://github.com/pytorch/pytorch/issues/11130",
    "state": "closed",
    "labels": [
      "caffe2"
    ],
    "created_at": "2018-08-31T02:25:04Z",
    "updated_at": "2018-09-07T02:59:19Z",
    "user": "ddeeppnneett"
  },
  {
    "repo": "pytorch/examples",
    "number": 409,
    "title": "How to extract a trained model ",
    "body": "Hi,\r\n\r\nI have trained a model of resnet 152 using the code provided in  'examples/imagenet/main.py' I understand that it saves a checkpoint after every epoch, and at the end of the training it will save the best trained model.\r\n\r\nMy question is how can i extract this model?\r\n",
    "url": "https://github.com/pytorch/examples/issues/409",
    "state": "closed",
    "labels": [],
    "created_at": "2018-08-29T04:33:42Z",
    "updated_at": "2022-03-10T05:45:07Z",
    "comments": 3,
    "user": "mvk07"
  },
  {
    "repo": "pytorch/examples",
    "number": 406,
    "title": "UserWarning: nn.Upsampling is deprecated. Use nn.functional.interpolate instead.   warnings.warn(\"nn.Upsampling is deprecated. Use nn.functional.interpolate instead.\")",
    "body": "UserWarning: nn.Upsampling is deprecated. Use nn.functional.interpolate instead.\r\n  warnings.warn(\"nn.Upsampling is deprecated. Use nn.functional.interpolate instead.\")\r\n\r\nHow can I solve this problem?",
    "url": "https://github.com/pytorch/examples/issues/406",
    "state": "closed",
    "labels": [],
    "created_at": "2018-08-26T09:23:08Z",
    "updated_at": "2022-03-10T06:01:35Z",
    "comments": 1,
    "user": "u0251077"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 281,
    "title": "Question: neural_style_tutorial\uff1ahow to adjust different input image size to achieve this?",
    "body": "I'm new to dl and pytorch.  \r\n\r\nneural_style_tutorial\r\nthis tutorial is about fixed size image.\r\n\r\nbut most image cant have the same size defined,how to adjust different input image size to this model?\r\n\r\nmany thanks, if you can help!!!",
    "url": "https://github.com/pytorch/tutorials/issues/281",
    "state": "closed",
    "labels": [],
    "created_at": "2018-08-10T06:02:04Z",
    "updated_at": "2021-06-16T21:11:13Z",
    "comments": 0,
    "user": "aohan237"
  },
  {
    "repo": "pytorch/examples",
    "number": 399,
    "title": "Why don't we use MSE as a reconstruction loss for VAE ?",
    "body": "Hi,\r\n\r\nI am wondering if there is a theoretical reason for using BCE as a reconstruction loss for variation auto-encoders ? Can't we simply use MSE or norm-based reconstruction loss instead ?\r\n\r\nBest Regards",
    "url": "https://github.com/pytorch/examples/issues/399",
    "state": "open",
    "labels": [
      "good first issue"
    ],
    "created_at": "2018-08-07T11:23:11Z",
    "updated_at": "2022-03-10T06:02:04Z",
    "comments": 7,
    "user": "ahmed-fau"
  },
  {
    "repo": "pytorch/examples",
    "number": 393,
    "title": "How large batch size should I set for imagenet training",
    "body": "I just use the default setting of batch size 256 and 8 TiTAN XP gpus on resnet34\uff0c it takes about 1.5 hours for one epoch, I want to speed up the training process,  Can I increase the batch size ?",
    "url": "https://github.com/pytorch/examples/issues/393",
    "state": "closed",
    "labels": [],
    "created_at": "2018-07-26T02:51:18Z",
    "updated_at": "2018-07-27T04:04:14Z",
    "comments": 1,
    "user": "lith0613"
  },
  {
    "repo": "pytorch/examples",
    "number": 384,
    "title": "lm example\uff1aiteration over a 0-d tensor",
    "body": "I run example code ,  give me this error.  I don't know how to solve this .\r\nAll error give from function repackage_hidden.\r\nmy pytorch version is .4",
    "url": "https://github.com/pytorch/examples/issues/384",
    "state": "closed",
    "labels": [],
    "created_at": "2018-07-13T10:53:35Z",
    "updated_at": "2019-06-24T11:15:58Z",
    "comments": 2,
    "user": "EricAugust"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 9207,
    "title": "Where is the include and lib path for caffe2?",
    "body": "i installed pytorch with caffe2 from source by using 'python setup_caffe2.py install' command.\r\nCan anyone tell that where is the default include and lib path for caffe2?",
    "url": "https://github.com/pytorch/pytorch/issues/9207",
    "state": "open",
    "labels": [
      "caffe2"
    ],
    "created_at": "2018-07-06T14:44:20Z",
    "updated_at": "2018-07-14T03:58:25Z",
    "user": "universewill"
  },
  {
    "repo": "huggingface/pytorch-openai-transformer-lm",
    "number": 19,
    "title": "what is the use of dropout in the Transformer?",
    "body": "https://github.com/huggingface/pytorch-openai-transformer-lm/blob/55ba4d78407ae12c7454dc8f3342f476be3dece5/model_pytorch.py#L161",
    "url": "https://github.com/huggingface/pytorch-openai-transformer-lm/issues/19",
    "state": "open",
    "labels": [],
    "created_at": "2018-07-05T16:18:48Z",
    "updated_at": "2018-07-09T13:59:41Z",
    "user": "teucer"
  },
  {
    "repo": "pytorch/examples",
    "number": 376,
    "title": "trying to understand the meaning of model.train() and model.eval()",
    "body": "Hi\r\n\r\nSo i see in the main.py we have model.train() and model.val(), i dont understand how to use them. can someone explain it to me please.\r\nFor example in here: \r\n`python main.py -a resnet18 [imagenet-folder with train and val folders]` we did not specify train or eval, so how do we know which one to use.\r\nI know my question is stupid, please let me know if there is any good tutorial to read and understand it.\r\n\r\nThanks",
    "url": "https://github.com/pytorch/examples/issues/376",
    "state": "closed",
    "labels": [],
    "created_at": "2018-06-23T22:14:02Z",
    "updated_at": "2018-06-23T22:18:09Z",
    "comments": 1,
    "user": "isalirezag"
  },
  {
    "repo": "pytorch/examples",
    "number": 374,
    "title": "About distributed training of Imagenet, I  am confused there is no operation to collect grads from machines and average them before update grads. ",
    "body": "I write a distributed training model refer to the code  imagenet/main.py , and the models on different machine own their independent optimizer. But I noticed that after backward() there is no operation to collect param grads from other processes and average them to get new grads for update. Does pytorch accomplish the average task implicitly by the optimizer.step() function? I am so confused.. ",
    "url": "https://github.com/pytorch/examples/issues/374",
    "state": "closed",
    "labels": [],
    "created_at": "2018-06-14T11:41:15Z",
    "updated_at": "2019-05-21T21:49:59Z",
    "comments": 4,
    "user": "TobeyYang"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 259,
    "title": "Confirm if batch training in seq2seq tutorial?",
    "body": "for the tutorial _pytorch->tutorials/intermediate_source/seq2seq_translation_tutorial.py_: [https://github.com/pytorch/tutorials/blob/master/intermediate_source/seq2seq_translation_tutorial.py](url)\r\n\r\nAccording to lines 636-646, It seems like it is training with one sentence at a time, instead of batch training. Am I understanding it right? ",
    "url": "https://github.com/pytorch/tutorials/issues/259",
    "state": "closed",
    "labels": [],
    "created_at": "2018-06-14T04:55:06Z",
    "updated_at": "2021-07-30T23:01:59Z",
    "comments": 3,
    "user": "ecilay"
  },
  {
    "repo": "pytorch/examples",
    "number": 373,
    "title": "float16 mixed precision training on Titan V is slower than float32",
    "body": "Since I cannot find a place to download imagenet dataset, I modified mnist example to support float16 training, please see the code in https://github.com/qigtang/examples.git, commit ed095d384529808f930161cbf005963ad482c22a\r\n\r\nWhen running in my Titan V GPU\r\n![image](https://user-images.githubusercontent.com/7813095/41369964-34d2d178-6efb-11e8-9367-c16cca1a9b5b.png)\r\n\r\n=======float 32 mode, ========\r\ntime python main.py\r\n\r\nreal    0m31.326s\r\nuser    1m24.282s\r\nsys     0m19.782s\r\n\r\n=======float 16 mode==========\r\ntime python main.py  --fp16\r\nreal    0m34.736s\r\nuser    1m23.025s\r\nsys     0m21.134s\r\n\r\nThe float16 code is actually slower. What a surprise. \r\nThe docker image I am using is \r\nnvcr.io/nvidia/pytorch      18.05-py3 \r\n\r\n@csarofeen @nvidia \r\n\r\nQustion: \r\n1. Does pytorch 0.4 compile half math into Volta tensorcore float16*float16  operation? \r\n2. Why the official nvidia mixed training document is not writing down any performance number at all?\r\n\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/examples/issues/373",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2018-06-13T18:22:29Z",
    "updated_at": "2022-03-10T04:11:59Z",
    "comments": 1,
    "user": "qigtang"
  },
  {
    "repo": "pytorch/examples",
    "number": 372,
    "title": "SNLI Why config.d_out is 4 in snli/train.py?",
    "body": "In SNLI, the unknown label in answers is removed. It becomes a 3-way classification, i.e., entailment, neutral, and contradiction. But why the config.d_out is assigned to 4 in line 39 in [snli/train.py](https://github.com/pytorch/examples/blob/f83508117b1ba9b752b227de992799093af3b215/snli/train.py#L39)?",
    "url": "https://github.com/pytorch/examples/issues/372",
    "state": "closed",
    "labels": [],
    "created_at": "2018-06-12T11:21:10Z",
    "updated_at": "2020-02-19T06:43:35Z",
    "comments": 0,
    "user": "shaoxiongji"
  },
  {
    "repo": "pytorch/text",
    "number": 335,
    "title": "where is the documentation?",
    "body": "",
    "url": "https://github.com/pytorch/text/issues/335",
    "state": "closed",
    "labels": [],
    "created_at": "2018-06-05T08:24:53Z",
    "updated_at": "2018-06-06T11:05:01Z",
    "user": "udion"
  },
  {
    "repo": "pytorch/examples",
    "number": 368,
    "title": "Is it a right implement for rnn model?",
    "body": "I find a implement of rnn model,but the \"forward\" is not the normal format,there are there parameters for \"forward\" function.I wonder is it a right implement of rnn model?\r\nthe link:https://github.com/zhangxu0307/time_series_forecasting_pytorch/blob/master/code/model.py",
    "url": "https://github.com/pytorch/examples/issues/368",
    "state": "closed",
    "labels": [],
    "created_at": "2018-06-04T10:15:28Z",
    "updated_at": "2018-06-04T16:20:42Z",
    "comments": 1,
    "user": "lxj0276"
  },
  {
    "repo": "pytorch/examples",
    "number": 367,
    "title": "TransformerNet no longer works in pytorch 0.4",
    "body": "Is there anything that can be done to fix this?\r\nWhen I call it I receive: \r\n\r\nTraceback (most recent call last):\r\n  File \"neural_style.py\", line 651, in <module>\r\n    main()\r\n  File \"neural_style.py\", line 645, in main\r\n    stylize(args)\r\n  File \"neural_style.py\", line 437, in stylize\r\n    style_model.load_state_dict(torch.load(modX))\r\n  File \"D:\\Vitrual.C.Drive\\Anaconda\\envs\\Pytorch\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 721, in load_state_dict\r\n    self.__class__.__name__, \"\\n\\t\".join(error_msgs)))\r\nRuntimeError: Error(s) in loading state_dict for TransformerNet:\r\n        Unexpected running stats buffer(s) \"in1.running_mean\" and \"in1.running_var\" for InstanceNorm2d with track_running_stats=False. If state_dict is a checkpoint saved before 0.4.0, this may be expected because InstanceNorm2d does not track running stats by default since 0.4.0. Please remove these keys from state_dict. If the running stats are actually needed, instead set track_running_stats=True in InstanceNorm2d to enable them. See the documentation of InstanceNorm2d for details.\r\n        Unexpected running stats buffer(s) \"in2.running_mean\" and \"in2.running_var\" for InstanceNorm2d with track_running_stats=False. If state_dict is a checkpoint saved before 0.4.0, this may be expected because InstanceNorm2d does not track running stats by default since 0.4.0. Please remove these keys from state_dict. If the running stats are actually needed, instead set track_running_stats=True in InstanceNorm2d to enable them. See the documentation of InstanceNorm2d for details.\r\n        Unexpected running stats buffer(s) \"in3.running_mean\" and \"in3.running_var\" for InstanceNorm2d with track_running_stats=False. If state_dict is a checkpoint saved before 0.4.0, this may be expected because InstanceNorm2d does not track running stats by default since 0.4.0. Please remove these keys from state_dict. If the running stats are actually needed, instead set track_running_stats=True in InstanceNorm2d to enable them. See the documentation of InstanceNorm2d for details.\r\n        Unexpected running stats buffer(s) \"res1.in1.running_mean\" and \"res1.in1.running_var\" for InstanceNorm2d with track_running_stats=False. If state_dict is a checkpoint saved before 0.4.0, this may be expected because InstanceNorm2d does not track running stats by default since 0.4.0. Please remove these keys from state_dict. If the running stats are actually needed, instead set track_running_stats=True in InstanceNorm2d to enable them. See the documentation of InstanceNorm2d for details.\r\n        Unexpected running stats buffer(s) \"res1.in2.running_mean\" and \"res1.in2.running_var\" for InstanceNorm2d with track_running_stats=False. If state_dict is a checkpoint saved before 0.4.0, this may be expected because InstanceNorm2d does not track running stats by default since 0.4.0. Please remove these keys from state_dict. If the running stats are actually needed, instead set track_running_stats=True in InstanceNorm2d to enable them. See the documentation of InstanceNorm2d for details.\r\n        Unexpected running stats buffer(s) \"res2.in1.running_mean\" and \"res2.in1.running_var\" for InstanceNorm2d with track_running_stats=False. If state_dict is a checkpoint saved before 0.4.0, this may be expected because InstanceNorm2d does not track running stats by default since 0.4.0. Please remove these keys from state_dict. If the running stats are actually needed, instead set track_running_stats=True in InstanceNorm2d to enable them. See the documentation of InstanceNorm2d for details.\r\n        Unexpected running stats buffer(s) \"res2.in2.running_mean\" and \"res2.in2.running_var\" for InstanceNorm2d with track_running_stats=False. If state_dict is a checkpoint saved before 0.4.0, this may be expected because InstanceNorm2d does not track running stats by default since 0.4.0. Please remove these keys from state_dict. If the running stats are actually needed, instead set track_running_stats=True in InstanceNorm2d to enable them. See the documentation of InstanceNorm2d for details.\r\n        Unexpected running stats buffer(s) \"res3.in1.running_mean\" and \"res3.in1.running_var\" for InstanceNorm2d with track_running_stats=False. If state_dict is a checkpoint saved before 0.4.0, this may be expected because InstanceNorm2d does not track running stats by default since 0.4.0. Please remove these keys from state_dict. If the running stats are actually needed, instead set track_running_stats=True in InstanceNorm2d to enable them. See the documentation of InstanceNorm2d for details.\r\n        Unexpected running stats buffer(s) \"res3.in2.running_mean\" and \"res3.in2.running_var\" for InstanceNorm2d with track_running_stats=False. If state_dict is a checkpoint saved before 0.4.0, this may be expected because InstanceNorm2d does not track running stats by default since 0.4.0. Please remove these keys from state_dict. If the running stats are actually needed, instead set track_running_stats=True in InstanceNorm2d to e",
    "url": "https://github.com/pytorch/examples/issues/367",
    "state": "closed",
    "labels": [],
    "created_at": "2018-06-03T22:24:45Z",
    "updated_at": "2022-11-25T21:38:19Z",
    "comments": 2,
    "user": "Zekodon"
  },
  {
    "repo": "pytorch/examples",
    "number": 362,
    "title": "InceptionV3 cannot work!",
    "body": "`python main.py -a inception_v3  ./imagenet/cat2dog --batch-size 16 --print-freq 1 --pretrained;`\r\n=> using pre-trained model 'inception_v3'\r\nTraceback (most recent call last):\r\n  File \"main.py\", line 314, in <module>\r\n    main()\r\n  File \"main.py\", line 157, in main\r\n    train(train_loader, model, criterion, optimizer, epoch)\r\n  File \"main.py\", line 189, in train\r\n    target = target.cuda(non_blocking=True)\r\nTypeError: _cuda() got an unexpected keyword argument 'non_blocking'\r\n",
    "url": "https://github.com/pytorch/examples/issues/362",
    "state": "open",
    "labels": [
      "help wanted",
      "vision"
    ],
    "created_at": "2018-05-27T21:15:55Z",
    "updated_at": "2022-03-10T06:02:49Z",
    "comments": 8,
    "user": "happsky"
  },
  {
    "repo": "pytorch/examples",
    "number": 357,
    "title": "language model generator question",
    "body": "In this file:\r\n\r\nhttps://github.com/pytorch/examples/blob/master/word_language_model/generate.py\r\n\r\nWhat does this input mean in the generation?\r\n\r\n    input = torch.randint(ntokens, (1, 1), dtype=torch.long).to(device)\r\n\r\nAs I understand it in a rnn-based language model, the last output of the rnn is fed into the current input and the sequence is unrolled. What is the meaning of this random input? Does it enforce the last output is being fed into the current input in the unrolling?\r\n\r\nThanks!\r\n\r\n(I am building a sequence generator that needs to consume its output from the last input, and I am wondering how to do it. Are you suggesting just feeding in random input would also work? Any hints would be helpful ! )",
    "url": "https://github.com/pytorch/examples/issues/357",
    "state": "open",
    "labels": [
      "triaged"
    ],
    "created_at": "2018-05-18T22:37:47Z",
    "updated_at": "2022-03-10T00:29:50Z",
    "comments": 2,
    "user": "evanthebouncy"
  },
  {
    "repo": "pytorch/examples",
    "number": 355,
    "title": "Imagenet training example - RandomResizedCrop",
    "body": "This is regarding \r\nhttps://github.com/pytorch/examples/blob/master/imagenet/main.py#L122\r\n\r\n\r\nThe default scale argument for the transform RandomResizedCrop is defined as scale=(0.08, 1.0) - defined in pytorch/vision/transform\r\n\r\nRandomResizedCrop is doing a crop first and then scale to the desired size. What could be the logic in in setting the lower limit of crop to as low as 0.08? 0.08 would corresponds to a very small portion of the image.\r\n\r\nI have seen (in my limited experimentation) that this is the reason for very slow training on ImageNet classification.\r\n\r\nIf we just change it to scale=(0.5, 1.0), then it trains fine. 0.75 would roughly correspond to what is commonly used area ratio of (224x224)/(256x256). Since this scale is a random range, and we want the middle to be around 0.75, scale=(0.5, 1.0) is a good choice.\r\n\r\nThe change can be done by passing scale argument to RandomResizedCrop transform.\r\n\r\n        transforms.Compose([\r\n            transforms.RandomResizedCrop(224, scale=(0.5, 1.0)),\r\n            transforms.RandomHorizontalFlip(),\r\n            transforms.ToTensor(),\r\n            normalize,\r\n        ]))\r\n\r\nDoes this make sense? I have to admit that I have done only limited experimentation with this.\r\n",
    "url": "https://github.com/pytorch/examples/issues/355",
    "state": "closed",
    "labels": [],
    "created_at": "2018-05-16T21:40:38Z",
    "updated_at": "2018-06-05T13:24:36Z",
    "comments": 1,
    "user": "mathmanu"
  },
  {
    "repo": "pytorch/examples",
    "number": 347,
    "title": "fast_neural_style using cuda",
    "body": "0.4.0\r\nCuda 9.0\r\ncudnn 7.1\r\npython3.5\r\n\r\nI am trying to train a new model using cuda. \r\n\r\nI am getting a RuntimeError\r\n```\r\n\r\nTraceback (most recent call last):\r\n  File \"neural_style/neural_style.py\", line 239, in <module>\r\n    main()\r\n  File \"neural_style/neural_style.py\", line 233, in main\r\n    train(args)\r\n  File \"neural_style/neural_style.py\", line 78, in train\r\n    features_x = vgg(x)\r\n  File \"/home/dell/sbull/onnx/env/lib/python3.5/site-packages/torch/nn/modules/module.py\", line 491, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/home/dell/sbull/onnx/examples/fast_neural_style/neural_style/vgg.py\", line 28, in forward\r\n    h = self.slice1(X)\r\n  File \"/home/dell/sbull/onnx/env/lib/python3.5/site-packages/torch/nn/modules/module.py\", line 491, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/home/dell/sbull/onnx/env/lib/python3.5/site-packages/torch/nn/modules/container.py\", line 91, in forward\r\n    input = module(input)\r\n  File \"/home/dell/sbull/onnx/env/lib/python3.5/site-packages/torch/nn/modules/module.py\", line 491, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/home/dell/sbull/onnx/env/lib/python3.5/site-packages/torch/nn/modules/conv.py\", line 301, in forward\r\n    self.padding, self.dilation, self.groups)\r\nRuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #2 'weight'\r\n\r\n```\r\n\r\nI have spent some time trying to figure it out what to fix, but without luck.\r\n\r\nIt seems like vgg16 for x needs to be set to run using cuda, like y, but I cannot figure out how to get that to work.\r\n\r\n\r\n",
    "url": "https://github.com/pytorch/examples/issues/347",
    "state": "closed",
    "labels": [],
    "created_at": "2018-05-03T19:17:57Z",
    "updated_at": "2018-05-15T20:39:02Z",
    "comments": 2,
    "user": "spencerbull"
  },
  {
    "repo": "pytorch/ELF",
    "number": 6,
    "title": "What is the winrate for the Leela Zero rematch how is it coming along? ",
    "body": "https://github.com/gcp/leela-zero/issues/1311#issuecomment-386156687",
    "url": "https://github.com/pytorch/ELF/issues/6",
    "state": "closed",
    "labels": [],
    "created_at": "2018-05-03T03:21:42Z",
    "updated_at": "2018-05-03T15:09:12Z",
    "user": "bochen2027"
  },
  {
    "repo": "pytorch/vision",
    "number": 484,
    "title": "What is the relationship between the output label of pretrained model in model zoo and wordnet synset id? ",
    "body": "we can easily access pytorch pre-trained model like VGG, AlexNet and SqueezeNet by\r\n\r\n    import torchvision \r\n    torchvision.models.vgg16(pretrained=True)\r\n\r\ncan anyone point out what's the relationship between the output label(index of maximum output value) and the actual category?\r\n\r\ni downloaded ILSVRC2012_devkit_t12 and got the imagenet id and other metainfo provided by meta.mat, however it seems pre-trained model have some different id. because when i evaluate the network with ILSVRC2012 validation set, it reports 100% error.",
    "url": "https://github.com/pytorch/vision/issues/484",
    "state": "open",
    "labels": [
      "enhancement"
    ],
    "created_at": "2018-05-02T07:23:46Z",
    "updated_at": "2019-06-10T10:06:57Z",
    "user": "imkzh"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 226,
    "title": "how to get turtorial for pytorch-0.3.1",
    "body": "the site http://pytorch.org/tutorials/ is only for pytorch-0.4.0 now\r\nhow to get the earlier version of tutorials",
    "url": "https://github.com/pytorch/tutorials/issues/226",
    "state": "closed",
    "labels": [],
    "created_at": "2018-04-25T04:18:33Z",
    "updated_at": "2018-04-27T11:06:26Z",
    "comments": 1,
    "user": "HarryRuiTse"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 6486,
    "title": "Where is the Caffe2 website?",
    "body": "The gh-pages branch doesn't exist.",
    "url": "https://github.com/pytorch/pytorch/issues/6486",
    "state": "closed",
    "labels": [],
    "created_at": "2018-04-10T21:54:41Z",
    "updated_at": "2018-04-10T21:58:08Z",
    "user": "louisabraham"
  },
  {
    "repo": "pytorch/examples",
    "number": 330,
    "title": "Use pretrained word embeddings",
    "body": "I want to use my pretrained word embeddings to train this model. How do I go about implementing it? \r\n\r\nThanks! ",
    "url": "https://github.com/pytorch/examples/issues/330",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2018-04-10T18:07:59Z",
    "updated_at": "2022-03-10T03:43:27Z",
    "comments": 3,
    "user": "BordiaS"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 6468,
    "title": "BatchNorm2d when batch size 1 works, what is it doing?",
    "body": "`BatchNorm2d` works even when batch size is 1, which puzzles me. So what is it doing when batch size is 1? The only related thread I could find is https://github.com/pytorch/pytorch/issues/1381 without much explanation.\r\n\r\nminimal example:\r\n```\r\nx = Variable(torch.randn(1,2,3,3))\r\nm = nn.BatchNorm2d(2)\r\ny = m(x)\r\n```",
    "url": "https://github.com/pytorch/pytorch/issues/6468",
    "state": "closed",
    "labels": [],
    "created_at": "2018-04-10T15:09:39Z",
    "updated_at": "2018-04-10T16:04:25Z",
    "user": "chanshing"
  },
  {
    "repo": "pytorch/examples",
    "number": 327,
    "title": "Absence of seed for result reproduction",
    "body": "Hello,\r\n\r\nWhen running ImageNet with different resnet architectures (18,152..) l'm not able to reproduce the results. There is a small variation in accuracy.\r\n\r\nhttps://github.com/pytorch/examples/blob/master/imagenet/main.py\r\n\r\nWhat is wrong ?\r\n\r\n\r\neven by making in \r\n```\r\n  main() :     \r\n    seed=15\r\n    torch.manual_seed(seed)\r\n    np.random.seed(seed)\r\n```\r\n\r\nl don't get the same result.\r\n\r\nThank you for your consideration\r\n    ",
    "url": "https://github.com/pytorch/examples/issues/327",
    "state": "closed",
    "labels": [],
    "created_at": "2018-04-09T13:40:23Z",
    "updated_at": "2022-03-10T03:40:23Z",
    "comments": 1,
    "user": "pinkfloyd06"
  },
  {
    "repo": "pytorch/examples",
    "number": 326,
    "title": "[Super resolution] image Resizing &low psnr value result",
    "body": "https://github.com/pytorch/examples/blob/dcdabc22b305d2f2989c6f03570dfcd3919e8a5b/super_resolution/data.py#L41\r\nI think resizing LANCZOS interpolation is better than default BILINEAR\r\n`Resize(crop_size // upscale_factor,interpolation=Image.LANCZOS)`\r\n__How does downsampling work in a normal SR?__\r\n\r\nAnd In the Set5 dataset, I found that the psnr value is lower than the bicubic method.\r\nWhy..? ",
    "url": "https://github.com/pytorch/examples/issues/326",
    "state": "open",
    "labels": [
      "vision"
    ],
    "created_at": "2018-04-08T13:17:50Z",
    "updated_at": "2022-03-10T03:44:41Z",
    "comments": 8,
    "user": "ryujaehun"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 221,
    "title": "epub format support",
    "body": "Is it possible to provide an epub format of the tutorials  officially ?\r\nI have tried to build by `make epub`,  \r\nbut it took too much time and I never finishd it. ",
    "url": "https://github.com/pytorch/tutorials/issues/221",
    "state": "closed",
    "labels": [],
    "created_at": "2018-04-05T13:11:36Z",
    "updated_at": "2018-04-27T11:08:18Z",
    "comments": 3,
    "user": "zmlcc"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 218,
    "title": "Char-RNN tutorial giving Error.",
    "body": "I was running the code for Char level RNN in the PyTorch docs, found here: http://pytorch.org/tutorials/intermediate/char_rnn_classification_tutorial.html . \r\nI got the error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"names.py\", line 86, in <module>\r\n    rnn = RNN(n_letters, n_hidden, n_categories)\r\n  File \"names.py\", line 72, in __init__\r\n    self.i2o = nn.Linear(input_size + hidden_size, output_size)\r\n  File \"/home/ayush99/anaconda3/lib/python3.6/site-packages/torch/nn/modules/linear.py\", line 46, in __init__\r\n    self.reset_parameters()\r\n  File \"/home/ayush99/anaconda3/lib/python3.6/site-packages/torch/nn/modules/linear.py\", line 49, in reset_parameters\r\n    stdv = 1. / math.sqrt(self.weight.size(1))\r\nRuntimeError: invalid argument 2: dimension 1 out of range of 0D tensor at /opt/conda/conda-bld/pytorch-cpu_1518282373170/work/torch/lib/TH/generic/THTensor.c:24\r\n```\r\nSystem specs: I was running this on the CPU.\r\nWhy is this happening? The examples from the docs should work just fine.",
    "url": "https://github.com/pytorch/tutorials/issues/218",
    "state": "closed",
    "labels": [],
    "created_at": "2018-03-25T15:37:52Z",
    "updated_at": "2021-06-16T21:33:27Z",
    "comments": 1,
    "user": "ayush1999"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 216,
    "title": "The code snippets in How to create custom C extension has something wrong IMHO.",
    "body": "In the official tutorial about [how to create custom C extension](http://pytorch.org/tutorials/advanced/c_extension.html) page, I think there are still minor problems. First, in the src/my_lib.c file, here is the code snippets,\r\n```\r\nint my_lib_add_backward(THFloatTensor *grad_output, THFloatTensor *grad_input)\r\n{\r\n    THFloatTensor_resizeAs(grad_input, grad_output);\r\n    THFloatTensor_fill(grad_input, 1);\r\n    return 1;\r\n}\r\n```\r\nthe statement `THFloatTensor_fill(grad_input, 1)` in the function `my_lib_add_backward` isn't correct enough in my opinion, because I think in the backward function, given the gradient w.r.t the output, you should return that gradient w.r.t the input, so grad_input should be the same as grad_output rather than filled with 1 only, \r\n\r\nWhat's more, in the step2, at the backward method of Function MyAddFunction, there should return 2 grad_input, because there are 2 inputs in the corresponding forward method. Below is the related class definition.\r\n\r\n```\r\nclass MyAddFunction(Function):\r\n    def forward(self, input1, input2):\r\n        output = torch.FloatTensor()\r\n        my_lib.my_lib_add_forward(input1, input2, output)\r\n        return output\r\n\r\n    def backward(self, grad_output):\r\n        grad_input = torch.FloatTensor()\r\n        my_lib.my_lib_add_backward(grad_output, grad_input)\r\n        return grad_input\r\n```\r\n\r\nHoping for explanation or modification in order not to confuse the newbies who reads this page.",
    "url": "https://github.com/pytorch/tutorials/issues/216",
    "state": "closed",
    "labels": [],
    "created_at": "2018-03-24T14:53:42Z",
    "updated_at": "2018-05-19T18:00:54Z",
    "comments": 1,
    "user": "sonack"
  },
  {
    "repo": "pytorch/examples",
    "number": 317,
    "title": "How to understand this way of declaring a class?",
    "body": "`class Linear(Bottle, nn.Linear):\r\n    pass`\r\n(in snli/model.py line 16)\r\nI'm new user of torch. I get confused about this statement. Can someone help me?\r\n\r\n",
    "url": "https://github.com/pytorch/examples/issues/317",
    "state": "closed",
    "labels": [],
    "created_at": "2018-03-17T08:24:56Z",
    "updated_at": "2018-03-17T14:25:02Z",
    "comments": 1,
    "user": "jueliangguke"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 5833,
    "title": "[Doc Bug] where is classmethod torch.nn.Embedding.from_pretrained?",
    "body": "There is a method to initialize Embedding from pretrained data (torch.Tensor).\r\n\r\nhttp://pytorch.org/docs/master/nn.html\r\n\r\nHowever that method does not exist in pytorch 0.3.1 .\r\n\r\nIf it was deprecated, what should I do to load pretrained word vectors such as torchtext.vocab.GloVe?\r\n\r\n```python\r\nimport torch as th\r\nemb = th.nn.Embedding(10, 20)\r\nemb.weight[1] = 0 # ERROR\r\nemb.weight.requires_grad = False\r\nemb.weight[1] = 0 # still ERROR\r\n```\r\n\r\nerror message:\r\n```\r\nRuntimeError: in-place operations can be only used on variables that don't share storage with any other variables, but detected that there are 2 objects sharing it\r\n```",
    "url": "https://github.com/pytorch/pytorch/issues/5833",
    "state": "closed",
    "labels": [],
    "created_at": "2018-03-16T13:03:21Z",
    "updated_at": "2018-03-16T13:19:43Z",
    "user": "cdluminate"
  },
  {
    "repo": "pytorch/examples",
    "number": 316,
    "title": "Imagenet datasets",
    "body": " How to get validation images of ImageNet dataset",
    "url": "https://github.com/pytorch/examples/issues/316",
    "state": "closed",
    "labels": [],
    "created_at": "2018-03-16T08:31:52Z",
    "updated_at": "2018-11-07T17:33:11Z",
    "comments": 2,
    "user": "22wei22"
  },
  {
    "repo": "pytorch/examples",
    "number": 312,
    "title": "Doc comment on `accuracy` method in imagenet example, incorrect?",
    "body": "I'm confused with the doc comment for the `accuracy` function in the imagenet example:\r\n\r\n```python\r\ndef accuracy(output, target, topk=(1,)):\r\n    \"\"\"Computes the precision@k for the specified values of k\"\"\"\r\n    maxk = max(topk)\r\n    batch_size = target.size(0)\r\n\r\n    _, pred = output.topk(maxk, 1, True, True)\r\n    pred = pred.t()\r\n    correct = pred.eq(target.view(1, -1).expand_as(pred))\r\n\r\n    res = []\r\n    for k in topk:\r\n        correct_k = correct[:k].view(-1).float().sum(0, keepdim=True)\r\n        res.append(correct_k.mul_(100.0 / batch_size))\r\nreturn res\r\n```\r\nhttps://github.com/pytorch/examples/blob/master/imagenet/main.py#L298-L299\r\n\r\nThis seems like it computes accuracy and not precision as false positives are not accounted for. Should the doc comment read \"Computes the accuracy@k for the specified values of k\" or is my understanding of precision for object detection incorrect?\r\n\r\nMany thanks for pytorch, it's a great library!",
    "url": "https://github.com/pytorch/examples/issues/312",
    "state": "open",
    "labels": [
      "good first issue"
    ],
    "created_at": "2018-02-27T12:02:28Z",
    "updated_at": "2022-03-10T03:09:32Z",
    "comments": 1,
    "user": "willprice"
  },
  {
    "repo": "pytorch/examples",
    "number": 308,
    "title": "Clarification",
    "body": "https://github.com/pytorch/examples/blob/4ef2d4d0c8524372d0047e050065edcac665ce1a/vae/main.py#L61\r\nIs there a particular reason why the method .exp_() is preferred to .exp() ?",
    "url": "https://github.com/pytorch/examples/issues/308",
    "state": "closed",
    "labels": [],
    "created_at": "2018-02-23T12:07:39Z",
    "updated_at": "2018-12-13T06:45:41Z",
    "comments": 1,
    "user": "ggbioing"
  },
  {
    "repo": "pytorch/examples",
    "number": 304,
    "title": "Is it possible to run snli: train.py on CPU (without CUDA)?",
    "body": "```\r\n$ conda list pytorch\r\n# packages in environment at /Users/davidlaxer/anaconda:\r\n#\r\npytorch                   0.2.0                py27_4cu75    soumith\r\n\r\n$ export NO_CUDA=0; python train.py \r\nTraceback (most recent call last):\r\n  File \"train.py\", line 17, in <module>\r\n    torch.cuda.set_device(args.gpu)\r\n  File \"/Users/davidlaxer/anaconda/lib/python2.7/site-packages/torch/cuda/__init__.py\", line 162, in set_device\r\n    torch._C._cuda_setDevice(device)\r\nAttributeError: 'module' object has no attribute '_cuda_setDevice'\r\n```\r\n",
    "url": "https://github.com/pytorch/examples/issues/304",
    "state": "closed",
    "labels": [],
    "created_at": "2018-02-10T19:38:49Z",
    "updated_at": "2022-04-07T18:19:14Z",
    "comments": 3,
    "user": "dbl001"
  },
  {
    "repo": "pytorch/examples",
    "number": 298,
    "title": "Reversed Sign?",
    "body": "https://github.com/pytorch/examples/blob/963f7d1777cd20af3be30df40633356ba82a6b0c/vae/main.py#L105\r\n\r\nAren't we trying to maximize that and hence there needs to be a negative sign here?",
    "url": "https://github.com/pytorch/examples/issues/298",
    "state": "closed",
    "labels": [],
    "created_at": "2018-02-03T18:14:11Z",
    "updated_at": "2018-02-07T11:29:35Z",
    "comments": 2,
    "user": "whamza15"
  },
  {
    "repo": "pytorch/examples",
    "number": 286,
    "title": "Batching in Word Level Language Model",
    "body": "Hi,\r\n\r\nIt is not clear how does the batching happen in the Language model?\r\n\r\nIt is not clear if it the input to the model in every iteration of the loop is [seq_length, batch_size, embed_size] or [batch_size, seq_length, embed_size]?\r\n\r\nAlso, why does rnn model return output and hidden separately, they are the same... as for a rnn layer hidden itself is the output.\r\n\r\nThanks for the awesome library.",
    "url": "https://github.com/pytorch/examples/issues/286",
    "state": "closed",
    "labels": [],
    "created_at": "2018-01-15T16:44:11Z",
    "updated_at": "2018-01-17T03:32:51Z",
    "comments": 7,
    "user": "mourinhoxyz"
  },
  {
    "repo": "pytorch/examples",
    "number": 280,
    "title": "Needs updating for PyTorch HEAD (no_grad)",
    "body": "volatile is no more in PyTorch HEAD, which means that you have to use the `no_grad` context manager now. Any examples using volatile need to be ported accordingly. However, we shouldn't do this until the next release, because examples should work for the current release. (If someone wants to get the jump, maybe a dev branch is warranted.)\r\n\r\nCC @colesbury \r\n  ",
    "url": "https://github.com/pytorch/examples/issues/280",
    "state": "open",
    "labels": [
      "help wanted"
    ],
    "created_at": "2018-01-09T18:58:27Z",
    "updated_at": "2022-03-10T05:54:42Z",
    "comments": 2,
    "user": "ezyang"
  },
  {
    "repo": "pytorch/examples",
    "number": 278,
    "title": "Is total variation loss necessary in fast_neural_style?",
    "body": "I notice that there is no total variation loss regularization implemented in the example of `fast_neural_style`. But the paper declared it and their torch version use it. I'm wondering if total variation loss is necessary or not in style transfer. ",
    "url": "https://github.com/pytorch/examples/issues/278",
    "state": "open",
    "labels": [
      "question",
      "good first issue"
    ],
    "created_at": "2018-01-03T08:26:09Z",
    "updated_at": "2022-03-10T05:55:02Z",
    "comments": 0,
    "user": "ZhuFengdaaa"
  },
  {
    "repo": "pytorch/examples",
    "number": 277,
    "title": "ValueError: optimizer got an empty parameter list",
    "body": "Hi PyTorch Friends,\r\n\r\nI'm trying to building customized layer by following the guide [Extending PyTorch Tutorial](http://pytorch.org/docs/master/notes/extending.html)  and use the customized layers to replace the nn.Conv2d and nn.Linear layer in the official example of [mnist main.py](https://github.com/pytorch/examples/blob/master/mnist/main.py) line 55-59.\r\n\r\nHowever, after replacing with my own customized layers, the testing step (forward) is working without error, while training the new model, it gives an error as \"ValueError: optimizer got an empty parameter list\". Also, the new_model.parameters() does not have any items.\r\n\r\nThe following is my modified Net (nn.Module)\r\n\r\n    class Decomp_Net(nn.Module):\r\n        def __init__(self, path_pretrained_model=\"mymodel.pth\"):\r\n            super(Decomp_Net, self).__init__()\r\n            # Load the pretrained model\r\n            # Load the saved weights\r\n            self.path_pretrained_model = path_pretrained_model\r\n            try:\r\n                params = torch.load(self.path_pretrained_model)\r\n                print(\"Loaded pretrained model.\")\r\n            except:\r\n                raise(\"No pretrained model saved.\")\r\n\r\n            # Conv Layer 1\r\n            self.W_conv1 = params.items()[0]\r\n            self.B_conv1 = params.items()[1][1]\r\n            self.W_conv1 = self.W_conv1[1].view(10, 25)\r\n            self.W_conv1 = self.W_conv1.t()\r\n            self.D_conv1, self.X_a_conv1 = create_dic_fuc.create_dic(A=self.W_conv1, M=25, N=10, Lmax=9, Epsilon=0.7, mode=1)\r\n\r\n            # Conv Layer 2\r\n            self.W_conv2 = params.items()[2]\r\n            self.B_conv2 = params.items()[3][1]\r\n            self.W_conv2 = self.W_conv2[1].view(200, 25)\r\n            self.W_conv2 = self.W_conv2.t()\r\n            self.D_conv2, self.X_a_conv2 = create_dic_fuc.create_dic(A=self.W_conv2, M=25, N=200, Lmax=199, Epsilon=0.7, mode=1)\r\n\r\n            # Layer FC1\r\n            self.W_fc1 = params.items()[4]\r\n            self.B_fc1 = params.items()[5][1]\r\n            self.D_fc1, self.X_a_fc1 = create_dic_fuc.create_dic(A=self.W_fc1[1], M=50, N=320, Lmax=319, Epsilon=0.8, mode=1)\r\n\r\n            # Layer FC2\r\n            self.W_fc2 = params.items()[6] # Feching the last fully connect layer of the orinal model\r\n            self.B_fc2 = params.items()[7][1] \r\n            self.D_fc2, self.X_a_fc2 = create_dic_fuc.create_dic(A=self.W_fc2[1], M=10, N=50, Lmax=49, Epsilon=0.5, mode=1)\r\n\r\n            self.conv1 = ConvDecomp2d(coefs=self.X_a_conv1, dictionary=self.D_conv1, bias_val=self.B_conv1, input_channels=1, output_channels=10, kernel_size=5, bias=True)\r\n            self.conv2 = ConvDecomp2d(coefs=self.X_a_conv2, dictionary=self.D_conv2, bias_val=self.B_conv2, input_channels=10, output_channels=20, kernel_size=5, bias=True)\r\n            self.conv2_drop = nn.Dropout2d()\r\n            self.fc1 = FCDecomp(coefs=self.X_a_fc1, dictionary=self.D_fc1, bias_val=self.B_fc1, input_features=320, output_features=50)\r\n            self.fc2 = FCDecomp(coefs=self.X_a_fc2, dictionary=self.D_fc2, bias_val=self.B_fc2, input_features=50, output_features=10)\r\n\r\n        def forward(self, x):\r\n            x = F.relu(F.max_pool2d(self.conv1(x), 2))\r\n            x = F.relu(F.max_pool2d(self.conv2_drop(self.conv2(x)), 2))\r\n            x = x.view(-1, 320)\r\n            x = F.relu(self.fc1(x))\r\n            x = F.dropout(x, training=self.training)\r\n            x = self.fc2(x)\r\n            return F.log_softmax(x)\r\n\r\nI defined the customized function as follows:\r\n\r\n    class LinearDecomp(Function):\r\n        # Note that both forward and backward are @staticmethods\r\n        @staticmethod\r\n        def forward(ctx, input, coefs, dictionary, bias=None):\r\n            weight = torch.mm(dictionary, coefs).cuda() # reconstruct the weight\r\n            ctx.save_for_backward(input, weight, dictionary, coefs, bias)\r\n            output = input.mm(weight.t())\r\n            if bias is not None:\r\n                output += bias.unsqueeze(0).expand_as(output)\r\n            return output\r\n\r\n        # This function has only a single output, so it gets only one gradient\r\n        @staticmethod\r\n        def backward(ctx, grad_output):\r\n            input, weight, coefs, dictionary, bias = ctx.saved_variables\r\n            grad_input = grad_input = grad_coefs = grad_bias = None\r\n            grad_weight = grad_output.t().mm(input) # do not output\r\n\r\n            if ctx.needs_input_grad[0]:\r\n                grad_input = grad_output.mm(weight)\r\n\r\n            # if ctx.needs_input_grad[1]:\r\n            grad_weight = grad_output.t().mm(input) # do not output grad_weight\r\n\r\n            if ctx.needs_input_grad[2]:\r\n                grad_coefs = dictionary.t().mm(grad_weight)\r\n\r\n            if ctx.needs_input_grad[3]:\r\n                grad_dictionary = grad_weight.t().mm(grad_coefs.t())\r\n\r\n            if bias is not None and ctx.needs_input_grad[4]:\r\n                grad_bias = grad_output.sum(0).squeeze(0)\r\n\r\n            return grad_input, grad_coefs, grad_d",
    "url": "https://github.com/pytorch/examples/issues/277",
    "state": "closed",
    "labels": [],
    "created_at": "2018-01-03T04:35:54Z",
    "updated_at": "2018-03-05T10:06:12Z",
    "comments": 1,
    "user": "OpenBanboo"
  },
  {
    "repo": "pytorch/examples",
    "number": 271,
    "title": "Transfer Learning on DC-GAN",
    "body": "Are the models for the generator and discriminator trained on LSUN or imagenet dataset made public?. If they are made public, where can I download them from?",
    "url": "https://github.com/pytorch/examples/issues/271",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2017-12-19T06:26:09Z",
    "updated_at": "2022-03-10T02:41:26Z",
    "comments": 1,
    "user": "brijml"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 189,
    "title": "Tutorial about torch.distributions ?",
    "body": "",
    "url": "https://github.com/pytorch/tutorials/issues/189",
    "state": "closed",
    "labels": [],
    "created_at": "2017-12-18T15:57:51Z",
    "updated_at": "2021-06-16T21:41:33Z",
    "comments": 3,
    "user": "zuoxingdong"
  },
  {
    "repo": "huggingface/neuralcoref",
    "number": 10,
    "title": "what is the training data for this project?",
    "body": " is it the same to clark and manning paper?",
    "url": "https://github.com/huggingface/neuralcoref/issues/10",
    "state": "closed",
    "labels": [],
    "created_at": "2017-12-04T22:16:52Z",
    "updated_at": "2017-12-19T01:40:18Z",
    "user": "xinyadu"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 176,
    "title": "[Request] Tutorial on testing and improving data loading",
    "body": "Hi, I think pytorch is a great framework and I'm using it consistently in my work. As a self-taught in machine learning I have sometimes difficulties to understand how to solve some bottlenecks in training, for example slow I/O. I get the idea, but I lack a general view of the topic.\r\n\r\nI think it would be nice to have something similar to [this](https://github.com/kzuiderveld/deeplearning1/blob/master/Improving%20training%20speeds%20using%20Keras%202.ipynb) and expanding it by explaining some common problems, how to catch them and some actions to solve them.",
    "url": "https://github.com/pytorch/tutorials/issues/176",
    "state": "closed",
    "labels": [],
    "created_at": "2017-11-14T12:39:26Z",
    "updated_at": "2018-01-22T05:34:20Z",
    "comments": 1,
    "user": "iacolippo"
  },
  {
    "repo": "pytorch/examples",
    "number": 253,
    "title": "Error For imagenet/main.py training with DistributedDataParallel().",
    "body": "I got DistributedDataParallel() error.\r\n\r\nI just fixed calling init_process_group() to pass rank like the below\r\ndist.init_process_group(backend=args.dist_backend, init_method=args.dist_url, rank = args.rank,\r\n                                world_size=args.world_size)\r\n\r\n$ CUDA_VISIBLE_DEVICES=0 python main.py /dataset/imagenet_classify/ --world-size 2 --dist-backend gloo --dist-url tcp://127.0.0.1:23456 --rank 0\r\n$ CUDA_VISIBLE_DEVICES=1 python main.py /dataset/imagenet_classify/ --world-size 2 --dist-backend gloo --dist-url tcp://127.0.0.1:23456 --rank 1\r\n\r\n\r\nError Message\r\n=> creating model 'resnet18'\r\nTraceback (most recent call last):\r\n  File \"distributed_imagenet_main.py\", line 319, in <module>\r\n    main()\r\n  File \"distributed_imagenet_main.py\", line 92, in main\r\n    model = torch.nn.parallel.DistributedDataParallel(model)\r\n  File \"/home/andrew/ml/local/lib/python2.7/site-packages/torch/nn/parallel/distributed.py\", line 124, in __init__\r\n    for param_tuple in zip(*map(lambda m: m.parameters(), self._module_copies)):\r\n  File \"/home/andrew/ml/local/lib/python2.7/site-packages/torch/nn/modules/module.py\", line 262, in __getattr__\r\n    type(self).__name__, name))\r\nAttributeError: 'DistributedDataParallel' object has no attribute '_module_copies'\r\nterminate called after throwing an instance of 'gloo::EnforceNotMet'\r\n  what():  [enforce fail at /pytorch/torch/lib/gloo/gloo/cuda.cu:249] error == cudaSuccess. 29 vs 0. Error at: /pytorch/torch/lib/gloo/gloo/cuda.cu:249: driver shutting down\r\nAborted (core dumped)\r\n\r\nWhat is the problem?\r\nIs there any guild document for training ImageNet with distributed nodes?",
    "url": "https://github.com/pytorch/examples/issues/253",
    "state": "closed",
    "labels": [],
    "created_at": "2017-11-10T06:50:22Z",
    "updated_at": "2018-12-11T07:49:24Z",
    "comments": 2,
    "user": "andrew-yang0722"
  },
  {
    "repo": "pytorch/examples",
    "number": 252,
    "title": "mnist dataset(jpg format) load slow",
    "body": "I put different label of Mnist datasets in different folders, as is shown in attached figure.\r\n![1510280662 1](https://user-images.githubusercontent.com/7909474/32640049-ac7d6d80-c601-11e7-9fb8-e1af8b7934f6.png)\r\n![1510280674 1](https://user-images.githubusercontent.com/7909474/32640050-ace75998-c601-11e7-976d-583b5bae2b0b.jpg)\r\n![1510280765 1](https://user-images.githubusercontent.com/7909474/32640051-ad239a84-c601-11e7-8eaa-7125168f0476.jpg)\r\n I found dataset loading is very slow compared to official example, my script is also attached!\r\n[mnist-example.txt](https://github.com/pytorch/examples/files/1459883/mnist-example.txt)\r\nmy data load time and official example load time log\r\n![1510281089 1](https://user-images.githubusercontent.com/7909474/32640276-e6b60e20-c602-11e7-9004-260d8b86cce6.jpg)\r\n![1510281229 1](https://user-images.githubusercontent.com/7909474/32640277-e7ea9b8a-c602-11e7-8e32-593bb9a72fd1.jpg)\r\n\r\n",
    "url": "https://github.com/pytorch/examples/issues/252",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2017-11-10T02:35:47Z",
    "updated_at": "2022-03-10T02:20:15Z",
    "comments": 3,
    "user": "Darknesszlx"
  },
  {
    "repo": "pytorch/examples",
    "number": 248,
    "title": " UserWarning: RNN module weights are not part...",
    "body": "Hello, on World LM model I get this user warning,\r\ndo not know what is means, so I am posting it here just to let you know.\r\n\r\n`python3 main.py --cuda --epochs 6`\r\n\r\n```\r\nUserWarning: RNN module weights are not part of single contiguous chunk of memory. This means they need to be compacted at every call, possibly greately increasing memory usage. To compact weights again call flatten_parameters().\r\n  output, hidden = self.rnn(emb, hidden)\r\n```\r\n",
    "url": "https://github.com/pytorch/examples/issues/248",
    "state": "closed",
    "labels": [],
    "created_at": "2017-10-29T09:32:06Z",
    "updated_at": "2018-12-03T13:59:27Z",
    "comments": 7,
    "user": "Robomate"
  },
  {
    "repo": "pytorch/examples",
    "number": 241,
    "title": "Any example for Domain Adaptation?",
    "body": "Domain Adaptation is an interesting area at present. If any example of Domain adaptation in pytorch is available, it would be really helpful.  For an example, Deep CORAL paper is developed using caffe. The code of Deep CORAL is: \r\nhttps://github.com/VisionLearningGroup/CORAL\r\nIf this code would be available in pytorch, it would be really great.",
    "url": "https://github.com/pytorch/examples/issues/241",
    "state": "closed",
    "labels": [],
    "created_at": "2017-10-24T23:09:31Z",
    "updated_at": "2022-03-10T02:26:00Z",
    "comments": 1,
    "user": "redhat12345"
  },
  {
    "repo": "pytorch/examples",
    "number": 240,
    "title": "error in vae?",
    "body": "In vae/main.py, line 61, shoudn't `std = logvar.mul(0.5).exp_()` be `std = logvar.exp_().pow(0.5)`?\r\n\r\nsorry, I just realized...\r\n",
    "url": "https://github.com/pytorch/examples/issues/240",
    "state": "closed",
    "labels": [],
    "created_at": "2017-10-24T14:14:25Z",
    "updated_at": "2017-10-24T16:01:59Z",
    "comments": 0,
    "user": "fedecarne"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 156,
    "title": "Explain optimizer.zero_grad()",
    "body": "I think the call to [optimizer.zero_grad()](https://github.com/pytorch/tutorials/blob/master/beginner_source/examples_nn/two_layer_net_optim.py#L52) should be explained in the beginner tutorials. In particular:\r\n\r\n* What is the point of this call?\r\n* Why is not it made automatically?\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/tutorials/issues/156",
    "state": "closed",
    "labels": [],
    "created_at": "2017-10-11T12:32:06Z",
    "updated_at": "2018-01-22T08:22:20Z",
    "comments": 0,
    "user": "Vayel"
  },
  {
    "repo": "pytorch/examples",
    "number": 231,
    "title": "As for the pretrained model in torchvision, what's the image channel RGB or BGR?",
    "body": "",
    "url": "https://github.com/pytorch/examples/issues/231",
    "state": "closed",
    "labels": [],
    "created_at": "2017-10-10T13:48:00Z",
    "updated_at": "2017-10-12T00:53:17Z",
    "comments": 2,
    "user": "AlexHex7"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 147,
    "title": "No module named 'torch.onnx' when following super_resolution_with_caffe2.html ",
    "body": "I am following tutorial http://pytorch.org/tutorials/advanced/super_resolution_with_caffe2.html (Transfering a model from PyTorch to Caffe2 and Mobile using ONNX). At the beginning I get:\r\nModuleNotFoundError                       Traceback (most recent call last)\r\n<ipython-input-2-cabf174890ab> in <module>()\r\n      5 from torch.autograd import Variable\r\n      6 import torch.utils.model_zoo as model_zoo\r\n----> 7 import torch.onnx\r\n\r\nModuleNotFoundError: No module named 'torch.onnx'\r\n\r\nMy environment is: Ubuntu 16.04, anaconda 4.3.25. my environment has Python 3.6. PyTorch 0.20. onnx 0.1, torchvision 0.1.9.\r\n\r\nPlease let me know what is missing, Thanks, \r\n\r\n\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/147",
    "state": "closed",
    "labels": [],
    "created_at": "2017-09-28T20:17:10Z",
    "updated_at": "2017-11-08T12:58:48Z",
    "comments": 4,
    "user": "liqunfu"
  },
  {
    "repo": "pytorch/text",
    "number": 125,
    "title": "what is the purpose of this project?",
    "body": "pytorch has offered utils.data.dataset, and what is the purpose of torchtext?\r\nwhat features do torchtext support?",
    "url": "https://github.com/pytorch/text/issues/125",
    "state": "closed",
    "labels": [],
    "created_at": "2017-09-19T05:44:43Z",
    "updated_at": "2017-12-22T07:00:38Z",
    "user": "rabintang"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 2557,
    "title": "What is the Torch7 's nn.Add layer in PyTorch?",
    "body": "I find the torch.legacy.nn.Add layer, but it doesn't support autograd. Any other solutions?",
    "url": "https://github.com/pytorch/pytorch/issues/2557",
    "state": "closed",
    "labels": [],
    "created_at": "2017-08-29T02:32:49Z",
    "updated_at": "2017-08-29T02:40:14Z",
    "user": "yytdfc"
  },
  {
    "repo": "pytorch/examples",
    "number": 207,
    "title": "how to finetune my own trained model on new datasets?",
    "body": "I have trained my own model ,now i want use this trained model to initialize my new networks or finetune this trained model  on new datasets, anyone know how to do it ?",
    "url": "https://github.com/pytorch/examples/issues/207",
    "state": "closed",
    "labels": [],
    "created_at": "2017-08-24T09:01:19Z",
    "updated_at": "2017-08-24T09:53:38Z",
    "comments": 0,
    "user": "visonpon"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 123,
    "title": "Neural style transfer question",
    "body": "Hi, not sure if this is the right place to ask questions, but I'm working through the neural style transfer tutorial and am confused about something.\r\n\r\nWhat is the purpose of the `backward` method in `ContentLoss` and `StyleLoss`?\r\n\r\nIf we remove the `backward` method, won't this work as well for the `closure` function in `run_style_transfer`?\r\n\r\n```python\r\n    def closure():\r\n            # correct the values of updated input image\r\n            input_param.data.clamp_(0, 1)\r\n\r\n            optimizer.zero_grad()\r\n            model(input_param)\r\n            style_score = 0\r\n            content_score = 0\r\n\r\n            for sl in style_losses:\r\n                style_score += sl.loss\r\n            for cl in content_losses:\r\n                content_score += cl.loss\r\n\r\n            run[0] += 1\r\n            if run[0] % 50 == 0:\r\n                print(\"run {}:\".format(run))\r\n                print('Style Loss : {:4f} Content Loss: {:4f}'.format(\r\n                    style_score.data[0], content_score.data[0]))\r\n                print()\r\n\r\n            total_score = style_score+content_score\r\n            total_score.backward()\r\n\r\n            return total_score\r\n```\r\n\r\nOn a related note, won't multiple `backward` calls in the original code accumulate the gradients for the image? Why is it okay to do this? Am I wrong in assuming that you should only call `backward` once? I'm new to Pytorch so I apologize if I'm missing anything fundamental. Thanks!\r\n\r\nEDIT: Tagging the author @alexis-jacq if you don't mind :)",
    "url": "https://github.com/pytorch/tutorials/issues/123",
    "state": "closed",
    "labels": [],
    "created_at": "2017-08-10T17:48:30Z",
    "updated_at": "2017-08-12T14:07:01Z",
    "comments": 2,
    "user": "reiinakano"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 2247,
    "title": "what is exactly batch_size in pytorch?",
    "body": "Sorry im new to this.\r\nI am not sure if I understand right. in pytorch it says: batch_size (int, optional) \u2013 how many samples per batch to load (default: 1).\r\nI know that, batch size = the number of training examples in one forward/backward pass. \r\nWhat does it mean that it says \"how many **samples** per **batch** to load\". can you define sample and batch here for me please. \r\nAlso, what would be the maximum number for batch_size?\r\n\r\nThanks",
    "url": "https://github.com/pytorch/pytorch/issues/2247",
    "state": "closed",
    "labels": [],
    "created_at": "2017-07-30T04:38:06Z",
    "updated_at": "2017-07-31T07:38:59Z",
    "user": "isalirezag"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 2227,
    "title": "where is the  torch.nn.NLLLoss ?",
    "body": "i want to find how NLLLoss calcuate the loss, but i can't find its code.\r\n\r\n\r\n# loss\r\ndef nll_loss(input, target, weight=None, size_average=True, ignore_index=-100):\r\n    r\"\"\"The negative log likelihood loss.\r\n    See :class:`~torch.nn.NLLLoss` for details.\r\n\r\nwhere is `~torch.nn.NLLLoss`  ?",
    "url": "https://github.com/pytorch/pytorch/issues/2227",
    "state": "closed",
    "labels": [],
    "created_at": "2017-07-28T08:35:34Z",
    "updated_at": "2022-07-26T18:28:32Z",
    "user": "susht3"
  },
  {
    "repo": "pytorch/examples",
    "number": 187,
    "title": "fast-neural-style uses mscoco but normalizes for imagenet mean",
    "body": "Documentation for `fast-neural-style` uses mscoco training dataset, but subtracts imagenet mean from image input data. \r\n\r\nThe effects are probably very minor, but anybody have the mean stats for mscoco?",
    "url": "https://github.com/pytorch/examples/issues/187",
    "state": "closed",
    "labels": [],
    "created_at": "2017-07-21T09:18:40Z",
    "updated_at": "2017-07-24T01:20:02Z",
    "comments": 1,
    "user": "twairball"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 116,
    "title": "How to save the model in Classifying name tutorial?",
    "body": "I am 100% successfully run the tutorial and I make some problem change, where I fixed the sequence to 10 and just 3 feature. It almost same with the tutorial. I have successfully save the model, but I have problem when loading it.\r\n\r\n```\r\nimport torch.nn as nn\r\nfrom torch.autograd import Variable\r\nclass RNN(nn.Module):\r\n    def __init__(self, input_size, hidden_size, output_size):\r\n        super(RNN, self).__init__() \r\n        self.input_size = input_size\r\n        self.hidden_size = hidden_size\r\n        self.output_size = output_size\r\n        \r\n        self.i2h = nn.Linear(input_size + hidden_size, hidden_size)\r\n        self.i2o = nn.Linear(input_size + hidden_size, output_size)\r\n        self.softmax = nn.LogSoftmax()\r\n    \r\n    def forward(self, input, hidden):\r\n        combined = torch.cat((input, hidden), 1)\r\n        hidden = self.i2h(combined)\r\n        output = self.i2o(combined)\r\n        output = self.softmax(output)\r\n        return output, hidden\r\n\r\n    def init_hidden(self):\r\n        return Variable(torch.zeros(1, self.hidden_size))`\r\n```\r\nI saved the model using this code. I put it in the end of training.\r\n`torch.save(rnn.state_dict(),'./halo.pkl')`\r\nThe network is still same. Here is the code to load the model.\r\n```\r\ndef restore_net(filename):\r\n    n_hidden = 128\r\n    n_letters = 3\r\n    n_categories = 2\r\n    rnn = RNN(n_letters, n_hidden, n_categories)\r\n    rnn.load_state_dict(filename)\r\n    return rnn\r\n```\r\nHowever I got this error.\r\n![image](https://user-images.githubusercontent.com/2309538/28114649-4165a2f0-6734-11e7-9103-1c871e803531.png)\r\n\r\nAnyone can have a suggestion how should I save it?\r\n-Thank you-",
    "url": "https://github.com/pytorch/tutorials/issues/116",
    "state": "closed",
    "labels": [],
    "created_at": "2017-07-12T11:02:16Z",
    "updated_at": "2017-07-12T11:07:13Z",
    "comments": 1,
    "user": "herleeyandi"
  },
  {
    "repo": "pytorch/examples",
    "number": 178,
    "title": "ImageNet Error",
    "body": "Hi,\r\n\r\nI am trying to train the models on ImageNet following [this](https://github.com/pytorch/examples/tree/master/imagenet#training). However, I got no luck.\r\n\r\nDoes anyone know how to fix the following issue?\r\n\r\n```shell\r\nkwang@cdc-177:~/PyTorch/examples/imagenet$ CUDA_VISIBLE_DEVICES=1 python main.py -a resnet18 /imagenet_dir\r\n=> creating model 'resnet18'\r\nTraceback (most recent call last):\r\n  File \"main.py\", line 289, in <module>\r\n    main()\r\n  File \"main.py\", line 131, in main\r\n    train(train_loader, model, criterion, optimizer, epoch)\r\n  File \"main.py\", line 159, in train\r\n    for i, (input, target) in enumerate(train_loader):\r\n  File \"/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py\", line 201, in __next__\r\n    return self._process_next_batch(batch)\r\n  File \"/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py\", line 221, in _process_next_batch\r\n    raise batch.exc_type(batch.exc_msg)\r\nAttributeError: Traceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py\", line 40, in _worker_loop\r\n    samples = collate_fn([dataset[i] for i in batch_indices])\r\n  File \"build/bdist.linux-x86_64/egg/torchvision/datasets/folder.py\", line 116, in __getitem__\r\n    img = self.loader(path)\r\n  File \"build/bdist.linux-x86_64/egg/torchvision/datasets/folder.py\", line 63, in default_loader\r\n    return pil_loader(path)\r\n  File \"build/bdist.linux-x86_64/egg/torchvision/datasets/folder.py\", line 45, in pil_loader\r\n    with Image.open(f) as img:\r\n  File \"/usr/lib/python2.7/dist-packages/PIL/Image.py\", line 528, in __getattr__\r\n    raise AttributeError(name)\r\nAttributeError: __exit__\r\n```\r\n\r\n`PyTorch` is okay and I can run some other experiments with it.\r\n\r\nThanks!",
    "url": "https://github.com/pytorch/examples/issues/178",
    "state": "closed",
    "labels": [],
    "created_at": "2017-07-07T07:03:45Z",
    "updated_at": "2017-07-08T02:50:51Z",
    "comments": 1,
    "user": "wk910930"
  },
  {
    "repo": "pytorch/examples",
    "number": 173,
    "title": "imagenet example did not transfer input to gpu?",
    "body": "In the imagenet training code, `input` is not explicitly converted to cuda in these [lines](https://github.com/pytorch/examples/blob/master/imagenet/main.py#L163-L165). \r\n\r\nI've noticed that the training loader has `pin_memory` flag as True. In fact, even if a tensor has called `pin_memory()`, it is still a `FloatTensor` instead of `cuda.FloatTensor`. If I understand the [documentation](http://pytorch.org/docs/master/notes/cuda.html) correctly, the benefit of using `pin_memory()` is that you can use `async=True` in the `cuda()` method, which would be faster due to asynchronous. \r\n\r\nIf I did not miss anything, this is a bug in the code, right?",
    "url": "https://github.com/pytorch/examples/issues/173",
    "state": "closed",
    "labels": [],
    "created_at": "2017-06-30T03:12:38Z",
    "updated_at": "2018-03-16T08:35:16Z",
    "comments": 2,
    "user": "iammarvelous"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 101,
    "title": "Regarding exercises in Character-Level RNN ",
    "body": "I was wondering where I can find the dataset for the exercises given in Classifying Names with Character-Level RNN.\r\nFor example:\r\nAny word -> language\r\nFirst name -> gender\r\nCharacter name -> writer\r\nPage title -> blog or subreddit\r\n\r\nTo complete this task, do I have to create my own dataset or is there any repo where I can download those datasets?",
    "url": "https://github.com/pytorch/tutorials/issues/101",
    "state": "closed",
    "labels": [],
    "created_at": "2017-06-26T21:36:40Z",
    "updated_at": "2018-01-22T04:55:21Z",
    "comments": 1,
    "user": "oya163"
  },
  {
    "repo": "pytorch/examples",
    "number": 170,
    "title": "Potential speedup for DCGAN ",
    "body": "In the dcgan example, while training the discriminator, why is backward called twice ? First its called on the real images, then the fake images. \r\nInstead, shouldn't doing something like: \r\n`totalError = real_loss + fake_loss , \r\nand then calling totalError.backward() `\r\nsave one whole backprop ?\r\nDoes doing it the way i suggested change anything qualitatively ?",
    "url": "https://github.com/pytorch/examples/issues/170",
    "state": "closed",
    "labels": [],
    "created_at": "2017-06-16T05:47:31Z",
    "updated_at": "2017-10-04T15:02:47Z",
    "comments": 8,
    "user": "harveyslash"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 98,
    "title": "update beginner tutorial to most recent pytorch version?",
    "body": "This [beginner tutorial](http://pytorch.org/tutorials/beginner/blitz/autograd_tutorial.html#sphx-glr-beginner-blitz-autograd-tutorial-py) uses `y.grad_fn` where, from googling around it seems like it should now use `y.creator`. The image is updated, but the text/code isn't.\r\n\r\nRegardless, the tutorial should probably say what version of PyTorch it's for and how to check, right?\r\n\r\nI'm happy to make the modifications and do a pull request, but wasn't sure what kind of solution was desired.",
    "url": "https://github.com/pytorch/tutorials/issues/98",
    "state": "closed",
    "labels": [],
    "created_at": "2017-06-15T02:50:43Z",
    "updated_at": "2017-06-15T19:48:14Z",
    "comments": 3,
    "user": "erindb"
  },
  {
    "repo": "pytorch/examples",
    "number": 168,
    "title": "Regarding dimensions of mean and variance ",
    "body": "Its a multivariate normal distribution in latent space and input space so mean(mu) and variance should be in multidimensional form(matrix) per distribution but your code is generating single value of mean and variance per distribution. So what is the math or implementation process behind it?",
    "url": "https://github.com/pytorch/examples/issues/168",
    "state": "closed",
    "labels": [],
    "created_at": "2017-06-09T10:31:23Z",
    "updated_at": "2017-10-01T22:51:56Z",
    "comments": 1,
    "user": "anindyasarkarIITH"
  },
  {
    "repo": "pytorch/examples",
    "number": 166,
    "title": "why input data is not copied to CUDA memory during training (only target) ?",
    "body": "in ImageNet example why only target is copied to CUDA memory target.cuda(async=True)  and the absence of input.cuda() in training phase? ",
    "url": "https://github.com/pytorch/examples/issues/166",
    "state": "closed",
    "labels": [],
    "created_at": "2017-06-07T08:48:38Z",
    "updated_at": "2017-06-07T09:52:22Z",
    "comments": 1,
    "user": "chahrazaddo"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 94,
    "title": "blog tutorial and slides",
    "body": "Couldn't find you on twitter so raising this here.\r\n\r\nI wrote a beginner's first steps blog and a presentation for the pydata london monthly meetup:\r\n\r\n- [https://goo.gl/EmSfNk](https://goo.gl/EmSfNk)\r\n- [http://makeyourownneuralnetwork.blogspot.co.uk/2017/05/learning-mnist-with-gpu-acceleration.html](http://makeyourownneuralnetwork.blogspot.co.uk/2017/05/learning-mnist-with-gpu-acceleration.html)\r\n\r\nPerhaps these could be the basis for a very beginner-friendly gentle introduction to PyTorch and it's concepts?\r\n\r\nMyself I couldn't find beginner-friendly guides with a logical progression, The existing tutorials are not really for complete (but intelligent or interested) beginners.\r\n\r\nHow do I help?",
    "url": "https://github.com/pytorch/tutorials/issues/94",
    "state": "closed",
    "labels": [],
    "created_at": "2017-06-01T12:54:46Z",
    "updated_at": "2017-07-05T17:28:08Z",
    "comments": 1,
    "user": "makeyourownneuralnetwork"
  },
  {
    "repo": "pytorch/examples",
    "number": 163,
    "title": "super_resolution model building question",
    "body": "class Net(nn.Module):\r\n    def __init__(self, upscale_factor):\r\n        super(Net, self).__init__()\r\n\r\n        self.relu = nn.ReLU()\r\n        self.conv1 = nn.Conv2d(1, 64, 5, 1, 2)\r\n        self.conv2 = nn.Conv2d(64, 64, 3, 1, 1)\r\n        self.conv3 = nn.Conv2d(64, 32, 3, 1, 1)\r\n        self.conv4 = nn.Conv2d(32, upscale_factor ** 2, 3, 1, 1)\r\n        self.pixel_shuffle = nn.PixelShuffle(upscale_factor)\r\n\r\nhow could u get the following information from the paper,\r\nin the self.conv1,  there is padding = 2\r\nlayer num l in paper is 3 ,why do u add self.conv2,?\r\nself.conv4 's output_channel is upscale_factor**2\r\n",
    "url": "https://github.com/pytorch/examples/issues/163",
    "state": "closed",
    "labels": [
      "question"
    ],
    "created_at": "2017-05-30T12:48:11Z",
    "updated_at": "2022-03-10T01:56:57Z",
    "comments": 1,
    "user": "pageedward"
  },
  {
    "repo": "pytorch/examples",
    "number": 162,
    "title": "Request for examples on Recurrent Highway Networks (RHN)",
    "body": "Is it possible to use the existing torch.nn modules and implement RHNs? Would it make sense to have RHN as a separate module in torch.nn?\r\n\r\nFor reference, someone did raise this issue in pytorch/pytorch https://github.com/pytorch/pytorch/issues/516",
    "url": "https://github.com/pytorch/examples/issues/162",
    "state": "closed",
    "labels": [],
    "created_at": "2017-05-30T05:49:20Z",
    "updated_at": "2022-03-10T01:56:13Z",
    "comments": 2,
    "user": "sanyam5"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 89,
    "title": "is the grad value wrong in beginner_source/blitz/autograd_tutorial.py line 92?",
    "body": "in line 92: `z_i = 3(x_i+2)^2` and `z_i\\bigr\\rvert_{x_i=1} = 27`.\r\n\r\nI think `z_i\\bigr\\rvert_{x_i=1} = 6(x_i+2)\\rvert_{x_i=1} = 6*(1+2) = 18`, please correct me if I am wrong, otherwise i will submit a pull request.\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/89",
    "state": "closed",
    "labels": [],
    "created_at": "2017-05-25T23:59:47Z",
    "updated_at": "2017-05-29T17:02:53Z",
    "comments": 2,
    "user": "ningzhou"
  },
  {
    "repo": "pytorch/examples",
    "number": 158,
    "title": "Shapes in SNLI",
    "body": "Looking over the SNLI example, something seems off to me. I hope I'm just missing something. First, a batch is embedded and, from the docs, I understand that Embedding layers output the shape `(N, W, D)` where N is the batch size and W is the sequence length. This is passed to the Encoder where it extracts the batch_size with `batch_size = inputs.size()[1]`. Wouldn't that give you the W and not N? Also, the inputs are passed as-is to the LSTM, which expects the shape `(W, N, D)`, but no reshaping is ever done. It seems like the Encoder is assuming `(W, N, D)` data from the start but there is never any `view` done on the embed to change the order of the dimensions, right?",
    "url": "https://github.com/pytorch/examples/issues/158",
    "state": "closed",
    "labels": [
      "question",
      "nlp"
    ],
    "created_at": "2017-05-07T02:32:11Z",
    "updated_at": "2022-03-10T03:19:09Z",
    "comments": 2,
    "user": "neverfox"
  },
  {
    "repo": "pytorch/examples",
    "number": 157,
    "title": "two lines of code in mnist/main.py",
    "body": "There are two arguments called batch_size and test_batch_size:\r\n`parser.add_argument('--batch-size', type=int, default=64, metavar='N',\r\n                    help='input batch size for training (default: 64)')`\r\n`parser.add_argument('--test-batch-size', type=int, default=1000, metavar='N',\r\n                    help='input batch size for testing (default: 1000)')`\r\nbut batch_size is used here:\r\n`test_loader = torch.utils.data.DataLoader(\r\n    datasets.MNIST('../data', train=False, transform=transforms.Compose([\r\n                       transforms.ToTensor(),\r\n                       transforms.Normalize((0.1307,), (0.3081,))\r\n                   ])),\r\n    batch_size=args.batch_size, shuffle=True, **kwargs)`\r\n\r\nAlso, what does this line(line 105) do:\r\n`test_loss = test_loss`\r\n\r\nand it seems that `epoch` is not used in test().",
    "url": "https://github.com/pytorch/examples/issues/157",
    "state": "closed",
    "labels": [],
    "created_at": "2017-05-04T07:40:05Z",
    "updated_at": "2020-10-10T02:22:56Z",
    "comments": 0,
    "user": "iamabug"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 77,
    "title": "Slowdown in DQN RL Tutorial",
    "body": "After about 5 episodes on latest master build of Pytorch, the time to execute each step t in the main loop slows way down. I tried a pip install of Pytorch as well to test if it was just my version and same thing. I am on OSX with no cuda. Is slowdown normal? I don't see anything in the optimization step that should really slow this down over time. Didn't know if this could be gym related as well. \r\n\r\nIf this isn't normal I will try to dig in some more and see what is causing this for me.\r\n\r\nThanks",
    "url": "https://github.com/pytorch/tutorials/issues/77",
    "state": "closed",
    "labels": [],
    "created_at": "2017-04-26T21:58:41Z",
    "updated_at": "2018-01-22T04:54:10Z",
    "comments": 1,
    "user": "lbollar"
  },
  {
    "repo": "pytorch/pytorch",
    "number": 1344,
    "title": "What the function is about element-wise product(Hadamard product) in pytorch?",
    "body": "",
    "url": "https://github.com/pytorch/pytorch/issues/1344",
    "state": "closed",
    "labels": [],
    "created_at": "2017-04-24T10:59:08Z",
    "updated_at": "2017-04-24T13:07:50Z",
    "user": "stevenhanjun"
  },
  {
    "repo": "pytorch/examples",
    "number": 147,
    "title": "imagenet example training gets slower over time.",
    "body": "It seems that as I do training, the per batch time gets slower and slower. \r\n\r\nFor example, when I run `CUDA_VISIBLE_DEVICES=0 python main.py -a alexnet --lr 0.01 --workers 22 /ssd/cv_datasets/ILSVRC2015/Data/CLS-LOC`.\r\n\r\nInitially I get an average per batch time of about 0.25s\r\n\r\nAfter several batches, I get 0.5s.\r\n\r\nI `top` and find that most of memory (128GB) is occupied \r\n\r\nHow to fix this?",
    "url": "https://github.com/pytorch/examples/issues/147",
    "state": "closed",
    "labels": [],
    "created_at": "2017-04-20T19:27:35Z",
    "updated_at": "2019-05-03T09:09:49Z",
    "comments": 10,
    "user": "zym1010"
  },
  {
    "repo": "pytorch/examples",
    "number": 144,
    "title": "why treating Alexnet/VGG differently in ImageNet example?",
    "body": "in <https://github.com/pytorch/examples/blob/master/imagenet/main.py#L68-L72>, it seems that special care has to be taken when wrapping the module with `DataParallel`. Why is this the case? Also, I don't understand why for AlexNet and VGG, `features` is wrapped, yet `classifier` is not.",
    "url": "https://github.com/pytorch/examples/issues/144",
    "state": "closed",
    "labels": [],
    "created_at": "2017-04-16T04:26:33Z",
    "updated_at": "2020-01-08T00:27:23Z",
    "comments": 6,
    "user": "zym1010"
  },
  {
    "repo": "pytorch/examples",
    "number": 142,
    "title": "action.reinforce(reward)",
    "body": "What does \"action.reinforce(reward)\" mean? Does it means gradient descent?\r\n![image](https://cloud.githubusercontent.com/assets/12723964/25036722/01b61e70-2128-11e7-9c41-3f21fb5fe13b.png)\r\n",
    "url": "https://github.com/pytorch/examples/issues/142",
    "state": "closed",
    "labels": [],
    "created_at": "2017-04-14T07:35:47Z",
    "updated_at": "2017-04-14T11:54:32Z",
    "comments": 1,
    "user": "susht3"
  },
  {
    "repo": "pytorch/examples",
    "number": 137,
    "title": "How To Correctly Kill MultiProcesses During Multi-GPU Training",
    "body": "During the training of using examples/imagenet/main.py, I used the following command:\r\n\r\n    CUDA_VISIBLE_DEVICES=0,1,2,3 nohup python main.py [options] path/to/imagenetdir 1>a.log 2>a.err &\r\n\r\nThen it starts 5 processes in the system, 1 main process appears in nvidia-smi.\r\n\r\nMost of the Time (90% of the time) after I first kill the main process, GPU usage down to 0% so I can kill the other 4 to release GPU Mem to start a new training task. Sometimes (10% of the time), after I killed these 5 processes, the main process remained to be \"python [defunct]\" that cannot be killed even by sudo kill -s 9. The usage of GPU AND the GPU mem are not released.\r\n\r\nMulti-gpu training happened at where I use the following line in my code:\r\n\r\n    model = torch.nn.DataParallel(model).cuda()\r\n\r\nPlease give some hint on \"how to correctly kill multi-gpu training pytorch process[es].\"\r\n\r\nThanks.",
    "url": "https://github.com/pytorch/examples/issues/137",
    "state": "closed",
    "labels": [],
    "created_at": "2017-04-10T07:36:38Z",
    "updated_at": "2022-03-09T21:27:41Z",
    "comments": 1,
    "user": "catalystfrank"
  },
  {
    "repo": "pytorch/examples",
    "number": 126,
    "title": "ImageNet example is falling apart in multiple ways",
    "body": "I am experimenting with Soumith's ImageNet example, but it is crashing or deadlocking in three different ways.  I have added a bunch of \"print\" statements to it to figure out where it is crashing, and here is the GIST of full script: (as you can see, there are almost no significant modifications to the original code.)   All code is running on 2x NVidia Titan X 12 GB cards with 96 GB RAM. \r\n\r\nhttps://gist.github.com/FuriouslyCurious/81742b8126f07f919522a588147e6086\r\n\r\n## Issue 1: transforms.Scale(512) fails in THCTensorMathBlas.cu:241\r\n\r\nHow to reproduce:   \r\n1. Images are being fed with transforms.Scale(512)  or transforms.Scale(1024)  \r\n2. Source images are 2048x2048.\r\n3. Workers >= 1\r\n4. Batchsize >= 2\r\n5. Script will crash on its own in few minutes\r\n\r\nOutput\r\n```\r\n python train.py -a resnet18 -j 1 -b 2 /home/FC/data/P/\r\n=> Parsing complete...\r\n=> creating model 'resnet18'\r\n=> Using CUDA DataParallel\r\n=> Starting training images loading...\r\n=> Starting validation images loading...\r\n=> Loss criterion and optimizer setup\r\n=> Starting training...\r\n=> Training Epoch 0\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 299, in <module>\r\n    main()\r\n  File \"train.py\", line 140, in main\r\n    train(train_loader, model, criterion, optimizer, epoch)\r\n  File \"train.py\", line 177, in train\r\n    output = model(input_var)\r\n  File \"/conda3/envs/idp/lib/python3.5/site-packages/torch/nn/modules/module.py\", line 202, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/conda3/envs/idp/lib/python3.5/site-packages/torch/nn/parallel/data_parallel.py\", line 92, in forward\r\n    outputs = self.parallel_apply(replicas, scattered, gpu_dicts)\r\n  File \"/conda3/envs/idp/lib/python3.5/site-packages/torch/nn/parallel/data_parallel.py\", line 102, in parallel_apply\r\n    return parallel_apply(replicas, inputs, kwargs)\r\n  File \"/conda3/envs/idp/lib/python3.5/site-packages/torch/nn/parallel/parallel_apply.py\", line 50, in parallel_apply\r\n    raise output\r\n  File \"/conda3/envs/idp/lib/python3.5/site-packages/torch/nn/parallel/parallel_apply.py\", line 30, in _worker\r\n    output = module(*input, **kwargs)\r\n  File \"/conda3/envs/idp/lib/python3.5/site-packages/torch/nn/modules/module.py\", line 202, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/conda3/envs/idp/lib/python3.5/site-packages/torchvision-0.1.6-py3.5.egg/torchvision/models/resnet.py\", line 150, in forward\r\n  File \"/conda3/envs/idp/lib/python3.5/site-packages/torch/nn/modules/module.py\", line 202, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/conda3/envs/idp/lib/python3.5/site-packages/torch/nn/modules/linear.py\", line 54, in forward\r\n    return self._backend.Linear()(input, self.weight, self.bias)\r\n  File \"/conda3/envs/idp/lib/python3.5/site-packages/torch/nn/_functions/linear.py\", line 10, in forward\r\n    output.addmm_(0, 1, input, weight.t())\r\nRuntimeError: size mismatch at /data/users/soumith/miniconda2/conda-bld/pytorch-cuda80-0.1.10_1488757768560/work/torch/lib/THC/generic/THCTensorMathBlas.cu:241\r\n```\r\n\r\n\r\n\r\n##  Issue 2: Multiple worker threads deadlock in index_queue.get() and waiter.acquire()\r\n\r\nHow to reproduce:   \r\n1. Images are being fed with default crop: transforms.RandomSizedCrop(224) \r\n2. Source images are 2048x2048.\r\n3. Workers > 2\r\n4. Batchsize > 40\r\n5. When you see GPU clock speed fall to resting MHz on NVidia-smi, script has deadlocked in waiter.acquire() and index_queue.get().  Abort the script manually.\r\n\r\n```\r\npython train.py -a resnet18 /home/FC/data/P\r\n=> Parsing complete...\r\n=> creating model 'resnet18'\r\n=> Using CUDA DataParallel\r\n=> Starting training images loading...\r\n=> Starting validation images loading...\r\n=> Loss criterion and optimizer setup\r\n=> Starting training...\r\n=> Training Epoch 0\r\n^CProcess Process-4:\r\nProcess Process-3:\r\nTraceback (most recent call last):\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 299, in <module>\r\n    main()\r\n  File \"train.py\", line 140, in main\r\n    train(train_loader, model, criterion, optimizer, epoch)\r\n  File \"train.py\", line 168, in train\r\n    for i, (input, target) in enumerate(train_loader):\r\n  File \"/conda3/envs/idp/lib/python3.5/site-packages/torch/utils/data/dataloader.py\", line 168, in __next__\r\n    idx, batch = self.data_queue.get()\r\n  File \"/conda3/envs/idp/lib/python3.5/queue.py\", line 164, in get\r\n    self.not_empty.wait()\r\n  File \"/conda3/envs/idp/lib/python3.5/threading.py\", line 293, in wait\r\n    waiter.acquire()\r\nTraceback (most recent call last):\r\n  File \"/conda3/envs/idp/lib/python3.5/multiprocessing/process.py\", line 249, in _bootstrap\r\n    self.run()\r\n  File \"/conda3/envs/idp/lib/python3.5/multiprocessing/process.py\", line 93, in run\r\n    self._target(*self._args, **self._kwargs)\r\n  File \"/conda3/envs/idp/lib/python3.5/site-packages/torch/utils/data/dataloader.py\", line 26, in _worker_loop\r\n    r = index_queue.get()\r\n  File \"/conda3/envs/idp/lib/python3.5/multiprocessing/queues.py\", line 342, in get\r\n    with self._rlock:\r",
    "url": "https://github.com/pytorch/examples/issues/126",
    "state": "closed",
    "labels": [],
    "created_at": "2017-03-28T01:07:36Z",
    "updated_at": "2017-03-28T01:08:39Z",
    "comments": 1,
    "user": "FuriouslyCurious"
  },
  {
    "repo": "pytorch/examples",
    "number": 116,
    "title": "why is detach necessary ",
    "body": "Hi, I am wondering why is detach necessary in this line:\r\nhttps://github.com/pytorch/examples/blob/a60bd4e261afc091004ea3cf582d0ad3b2e01259/dcgan/main.py#L230\r\n\r\nI understand that we want to update the gradients of netD without changin the ones of netG. But if the optimizer is only using the parameters of netD, then only its weight will be updated. Am I missing something here?\r\nThanks in advance!\r\n",
    "url": "https://github.com/pytorch/examples/issues/116",
    "state": "closed",
    "labels": [],
    "created_at": "2017-03-20T22:12:36Z",
    "updated_at": "2022-04-16T07:20:21Z",
    "comments": 17,
    "user": "rogertrullo"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 47,
    "title": "Web page for Tutorials ",
    "body": "Hi,\r\n\r\nI've been working on beautifying/integrating all the tutorials on pytorch into one. see https://github.com/pytorch/pytorch/pull/778. These tutorials are based on [sphinx-gallery](http://sphinx-gallery.readthedocs.io) and tutorials are executed during build time. \r\n\r\nI've created a [separate repo](https://github.com/chsasank/pytorch-tutorials) for the tutorials and used gh-pages to host them: http://chsasank.github.io/pytorch-tutorials. I also added my own [transfer learning tutorial](https://chsasank.github.io/pytorch-tutorials/tutorials/transfer_learning_tutorial.html) \r\n\r\nAfter a discussion with @soumith, he suggested we should host these tutorials at tutorials.pytorch.org. He also requested a change:\r\n\r\n- [x] Categorize tutorials by level instead of source\r\n\r\nIf indeed this is to be front face of tutorials, we'll need to figure out \r\n- [x] how to modify the repo\r\n- [x] how to build the sources and host \r\n\r\n\r\nFor hosting, we shouldn't probably use github pages as it will mess up the git history with all the html files. \r\n\r\nSince these tutorials are executed at build, we might need a decently powered build environment. Most tutorials  take may be 5 min on my macbook air. Except [seq2seq](https://chsasank.github.io/pytorch-tutorials/practical-pytorch/seq2seq-translation-tutorial.html) tutorial, which took 40 min on CPU/25 min on GPU. Note that a tutorial is re-excuted only if changes are made to the tutorial file.\r\n\r\n\r\nThanks,\r\nSasank.",
    "url": "https://github.com/pytorch/tutorials/issues/47",
    "state": "closed",
    "labels": [],
    "created_at": "2017-03-14T12:37:35Z",
    "updated_at": "2017-04-14T18:46:27Z",
    "comments": 13,
    "user": "chsasank"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 44,
    "title": "Where is Variable?",
    "body": "In `Reinforcement (Q-)Learning with PyTorch2`, the section  `Training hyperparameters and utilities`  claim the cell providing `Variable` which is \"a simple wrapper around torch.autograd\". But I can't found it in the cell. Then I encounter `NameError: name 'Variable' is not defined`, anyway I import Variable from `torch.autograd` instead. So where is Variable? Or how can I implement it by scratch?",
    "url": "https://github.com/pytorch/tutorials/issues/44",
    "state": "closed",
    "labels": [],
    "created_at": "2017-03-06T04:57:01Z",
    "updated_at": "2019-12-02T12:42:11Z",
    "user": "yiyuezhuo"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 41,
    "title": "Numerically unstable initialized values for uninitialized tensors?",
    "body": "I was trying to follow the tutorial when I noticed that if I just create an \"uninitialized matrix\", its values are not numerically stable. I guess since we will have to initialize the matrix later, it doesn't really matter, but I'm just wondering if this is intentional.\r\n\r\nI'm running pyTorch with anaconda python 3.6, CUDA v8 on Linux.\r\n\r\n```python\r\nfrom __future__ import print_function\r\nimport torch\r\n```\r\n\r\n\r\n```python\r\nx = torch.Tensor(5, 3)\r\n```\r\n\r\n\r\n```python\r\nx = torch.rand(5, 3)\r\n```\r\n\r\n\r\n```python\r\nx\r\n```\r\n\r\n\r\n\r\n\r\n    \r\n    -1.6775e+31  4.5895e-41  4.0929e-37\r\n     0.0000e+00  0.0000e+00  0.0000e+00\r\n     0.0000e+00  0.0000e+00  0.0000e+00\r\n     0.0000e+00  0.0000e+00  0.0000e+00\r\n     0.0000e+00  0.0000e+00  0.0000e+00\r\n    [torch.FloatTensor of size 5x3]\r\n\r\n\r\n\r\n\r\n```python\r\ny = torch.Tensor(5, 3); y\r\n```\r\n\r\n\r\n\r\n\r\n    \r\n    -1.6775e+31  4.5895e-41  4.2770e-37\r\n     0.0000e+00  0.0000e+00  0.0000e+00\r\n     0.0000e+00  0.0000e+00  0.0000e+00\r\n     0.0000e+00  0.0000e+00  0.0000e+00\r\n     0.0000e+00  0.0000e+00  0.0000e+00\r\n    [torch.FloatTensor of size 5x3]\r\n\r\n\r\n\r\n\r\n```python\r\nx * y\r\n```\r\n\r\n\r\n\r\n\r\n    \r\n    inf   0   0\r\n      0   0   0\r\n      0   0   0\r\n      0   0   0\r\n      0   0   0\r\n    [torch.FloatTensor of size 5x3]\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/41",
    "state": "closed",
    "labels": [],
    "created_at": "2017-02-27T03:17:09Z",
    "updated_at": "2017-02-27T03:38:54Z",
    "comments": 1,
    "user": "r-luo"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 26,
    "title": "Training on GPU in deep learning notebook - inputs/labels need cuda()",
    "body": "In working through the deep learning notebook, it's not obvious at first how to get the learning working once you put the net on the GPU.\r\n\r\nAfter some trial and error, this worked \r\n\r\n        inputs, labels = Variable(inputs).cuda(), Variable(labels).cuda()\r\n\r\nI could make a PR with this addition if desired",
    "url": "https://github.com/pytorch/tutorials/issues/26",
    "state": "closed",
    "labels": [],
    "created_at": "2017-02-04T21:38:56Z",
    "updated_at": "2017-05-23T16:37:32Z",
    "comments": 3,
    "user": "gojira"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 15,
    "title": "There is any fine tune tutorials?",
    "body": "Fine tune is very easy in Torch and Caffe, but I can't find how do fine tune in pytorch. Is there any fine tune examples or tutorials?  ",
    "url": "https://github.com/pytorch/tutorials/issues/15",
    "state": "closed",
    "labels": [],
    "created_at": "2017-01-22T09:06:53Z",
    "updated_at": "2017-10-31T07:24:56Z",
    "comments": 9,
    "user": "Teaonly"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 14,
    "title": "Potential improvement to 60 minute blitz for pasteability?",
    "body": "Hello! I'm very much a newbie to this:\r\n\r\nhttps://github.com/pytorch/tutorials/blob/master/Deep%20Learning%20with%20PyTorch.ipynb\r\n\r\nI followed this guide with Anaconda 3.5 and got to this point: `out = net(input)`\r\nI got a NotImplementedError from the original nn module that the class was supposed to override.\r\n\r\nTurns out I skipped the error messages I got in interactive python where the indentation was wrong (so forward function wasn't implemented in my `Net` class).\r\n\r\nIf we removed the spaces between the functions or used comments we could avoid the issue:\r\n```\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\nclass Net(nn.Module):\r\n    def __init__(self):\r\n        super(Net, self).__init__()\r\n        self.conv1 = nn.Conv2d(1, 6, 5) # 1 input image channel, 6 output channels, 5x5 square convolution kernel\r\n        self.conv2 = nn.Conv2d(6, 16, 5)\r\n        self.fc1   = nn.Linear(16*5*5, 120) # an affine operation: y = Wx + b\r\n        self.fc2   = nn.Linear(120, 84)\r\n        self.fc3   = nn.Linear(84, 10)\r\n    def forward(self, x):\r\n        x = F.max_pool2d(F.relu(self.conv1(x)), (2, 2)) # Max pooling over a (2, 2) window\r\n        x = F.max_pool2d(F.relu(self.conv2(x)), 2) # If the size is a square you can only specify a single number\r\n        x = x.view(-1, self.num_flat_features(x))\r\n        x = F.relu(self.fc1(x))\r\n        x = F.relu(self.fc2(x))\r\n        x = self.fc3(x)\r\n        return x\r\n    def num_flat_features(self, x):\r\n        size = x.size()[1:] # all dimensions except the batch dimension\r\n        num_features = 1\r\n        for s in size:\r\n            num_features *= s\r\n        return num_features\r\n\r\nnet = Net()\r\nnet\r\n```",
    "url": "https://github.com/pytorch/tutorials/issues/14",
    "state": "closed",
    "labels": [],
    "created_at": "2017-01-22T02:29:52Z",
    "updated_at": "2017-01-22T03:05:36Z",
    "comments": 1,
    "user": "youanden"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 7,
    "title": "Feature Request: tutorial on loading datasets",
    "body": "A tutorial outlining how to make use of the `torch.utils.data.Dataset` and `torch.utils.data.DataLoader` on your own data (not just the `torchvision.datasets`) would be good. The documentation page is quite obscure, and it is not entirely clear how these can be made use of on your own data. \r\n\r\nAlso outlining what would be good practices for when your data is: \r\n\r\n- A numpy array\r\n- A folder full of image files\r\n\r\nAnd if pytorch has built in functions for creating queues of data, for when the data is too big to all fit in memory in one go (eg in the case of a folder full of image files). \r\n\r\n",
    "url": "https://github.com/pytorch/tutorials/issues/7",
    "state": "closed",
    "labels": [
      "enhancement"
    ],
    "created_at": "2017-01-19T11:08:21Z",
    "updated_at": "2023-05-26T20:43:34Z",
    "comments": 8,
    "user": "ronrest"
  },
  {
    "repo": "pytorch/tutorials",
    "number": 5,
    "title": "Initialize with t7 files?",
    "body": "If I trained a model with Torch and stored the weights using t7 format. Is it possible to use this as initialization in pytorch? Thank you.",
    "url": "https://github.com/pytorch/tutorials/issues/5",
    "state": "closed",
    "labels": [],
    "created_at": "2017-01-18T18:50:08Z",
    "updated_at": "2017-01-18T19:20:07Z",
    "comments": 2,
    "user": "Yuliang-Zou"
  }
]